From f716a228f476545e3af7a9d4f2d2bb3653299002 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Sat, 3 Feb 2018 17:39:28 +0100 Subject: [PATCH] Updated bgfx, bx, and bimg --- 3rdparty/bgfx/.appveyor.yml | 11 +- 3rdparty/bgfx/.travis.yml | 17 +- 3rdparty/bgfx/3rdparty/edtaa3/edtaa3func.cpp | 580 - 3rdparty/bgfx/3rdparty/edtaa3/edtaa3func.h | 7 - 3rdparty/bgfx/3rdparty/etc1/LICENSE | 161 - 3rdparty/bgfx/3rdparty/etc1/etc1.cpp | 686 - 3rdparty/bgfx/3rdparty/etc1/etc1.h | 114 - 3rdparty/bgfx/3rdparty/etc2/LICENSE.txt | 24 - 3rdparty/bgfx/3rdparty/etc2/Math.hpp | 90 - 3rdparty/bgfx/3rdparty/etc2/ProcessCommon.hpp | 51 - 3rdparty/bgfx/3rdparty/etc2/ProcessRGB.cpp | 719 - 3rdparty/bgfx/3rdparty/etc2/ProcessRGB.hpp | 9 - 3rdparty/bgfx/3rdparty/etc2/Tables.cpp | 109 - 3rdparty/bgfx/3rdparty/etc2/Tables.hpp | 25 - 3rdparty/bgfx/3rdparty/etc2/Types.hpp | 17 - 3rdparty/bgfx/3rdparty/etc2/Vector.hpp | 222 - 3rdparty/bgfx/3rdparty/fcpp/cpp1.c | 11 +- 3rdparty/bgfx/3rdparty/fcpp/cpp3.c | 2 +- 3rdparty/bgfx/3rdparty/fcpp/cpp6.c | 25 +- 3rdparty/bgfx/3rdparty/fcpp/cppadd.h | 3 +- .../forsythtriangleorderoptimizer.cpp | 117 +- .../forsythtriangleorderoptimizer.h | 38 +- .../glsl-optimizer/include/c99_compat.h | 9 +- .../src/glsl/builtin_functions.cpp | 3 + .../src/glsl/glsl_optimizer.cpp | 4 + .../src/glsl/glsl_parser_extras.cpp | 4 +- 3rdparty/bgfx/3rdparty/glslang/.appveyor.yml | 52 +- 3rdparty/bgfx/3rdparty/glslang/.gitignore | 5 +- 3rdparty/bgfx/3rdparty/glslang/.travis.yml | 93 +- 3rdparty/bgfx/3rdparty/glslang/CMakeLists.txt | 74 +- .../3rdparty/glslang/External/CMakeLists.txt | 69 +- .../glslang/OGLCompilersDLL/CMakeLists.txt | 7 +- .../glslang/OGLCompilersDLL/InitializeDll.cpp | 34 +- .../glslang/OGLCompilersDLL/InitializeDll.h | 4 +- 3rdparty/bgfx/3rdparty/glslang/README.md | 50 +- .../3rdparty/glslang/SPIRV/CMakeLists.txt | 21 +- .../3rdparty/glslang/SPIRV/GLSL.ext.AMD.h | 34 +- .../3rdparty/glslang/SPIRV/GLSL.ext.EXT.h | 39 + .../3rdparty/glslang/SPIRV/GLSL.ext.KHR.h | 17 +- .../3rdparty/glslang/SPIRV/GlslangToSpv.cpp | 1048 +- .../3rdparty/glslang/SPIRV/GlslangToSpv.h | 17 +- .../glslang/SPIRV/InReadableOrder.cpp | 16 +- .../3rdparty/glslang/SPIRV/SPVRemapper.cpp | 194 +- .../bgfx/3rdparty/glslang/SPIRV/SPVRemapper.h | 12 +- .../3rdparty/glslang/SPIRV/SpvBuilder.cpp | 147 +- .../bgfx/3rdparty/glslang/SPIRV/SpvBuilder.h | 43 +- 3rdparty/bgfx/3rdparty/glslang/SPIRV/doc.cpp | 43 +- 3rdparty/bgfx/3rdparty/glslang/SPIRV/doc.h | 2 + .../bgfx/3rdparty/glslang/SPIRV/hex_float.h | 2 +- .../bgfx/3rdparty/glslang/SPIRV/spirv.hpp | 80 +- 3rdparty/bgfx/3rdparty/glslang/SPIRV/spvIR.h | 16 +- .../glslang/StandAlone/CMakeLists.txt | 22 +- .../glslang/StandAlone/DirStackFileIncluder.h | 141 + .../glslang/StandAlone/StandAlone.cpp | 981 +- 3rdparty/bgfx/3rdparty/glslang/Test/300.vert | 17 + 3rdparty/bgfx/3rdparty/glslang/Test/310.comp | 2 +- .../bgfx/3rdparty/glslang/Test/310AofA.vert | 6 + .../Test/310implicitSizeArrayError.vert | 2 +- 3rdparty/bgfx/3rdparty/glslang/Test/400.frag | 10 +- 3rdparty/bgfx/3rdparty/glslang/Test/440.vert | 6 + 3rdparty/bgfx/3rdparty/glslang/Test/450.comp | 5 + 3rdparty/bgfx/3rdparty/glslang/Test/450.frag | 12 + 3rdparty/bgfx/3rdparty/glslang/Test/450.geom | 2 + 3rdparty/bgfx/3rdparty/glslang/Test/450.tesc | 9 + 3rdparty/bgfx/3rdparty/glslang/Test/450.tese | 7 + 3rdparty/bgfx/3rdparty/glslang/Test/450.vert | 28 + .../glslang/Test/baseResults/100.frag.out | 2 +- .../glslang/Test/baseResults/120.frag.out | 8 +- .../glslang/Test/baseResults/120.vert.out | 2 +- .../glslang/Test/baseResults/150.tesc.out | 7 +- .../glslang/Test/baseResults/300.frag.out | 2 +- .../glslang/Test/baseResults/300.vert.out | 21 +- .../glslang/Test/baseResults/310.comp.out | 12 +- .../glslang/Test/baseResults/310.frag.out | 13 +- .../glslang/Test/baseResults/310.geom.out | 1 - .../glslang/Test/baseResults/310.tesc.out | 1 - .../glslang/Test/baseResults/310.tese.out | 1 - .../glslang/Test/baseResults/310.vert.out | 1 - .../glslang/Test/baseResults/310AofA.vert.out | 24 +- .../310implicitSizeArrayError.vert.out | 9 +- .../glslang/Test/baseResults/330.frag.out | 16 +- .../glslang/Test/baseResults/400.frag.out | 46 +- .../glslang/Test/baseResults/400.geom.out | 3 +- .../glslang/Test/baseResults/400.tesc.out | 1 - .../glslang/Test/baseResults/400.tese.out | 1 - .../glslang/Test/baseResults/400.vert.out | 1 - .../glslang/Test/baseResults/410.geom.out | 1 - .../glslang/Test/baseResults/410.tesc.out | 1 - .../glslang/Test/baseResults/410.vert.out | 2 - .../glslang/Test/baseResults/420.comp.out | 1 - .../glslang/Test/baseResults/420.frag.out | 5 +- .../glslang/Test/baseResults/420.geom.out | 1 - .../glslang/Test/baseResults/420.tesc.out | 1 - .../glslang/Test/baseResults/420.tese.out | 3 +- .../glslang/Test/baseResults/420.vert.out | 3 +- .../Test/baseResults/420_size_gl_in.geom.out | 1 - .../glslang/Test/baseResults/430.comp.out | 1 - .../glslang/Test/baseResults/430.vert.out | 5 +- .../glslang/Test/baseResults/430AofA.frag.out | 5 +- .../Test/baseResults/430scope.vert.out | 1 - .../glslang/Test/baseResults/440.frag.out | 1 - .../glslang/Test/baseResults/440.vert.out | 84 +- .../glslang/Test/baseResults/450.comp.out | 14 +- .../glslang/Test/baseResults/450.frag.out | 15 +- .../glslang/Test/baseResults/450.geom.out | 6 +- .../glslang/Test/baseResults/450.tesc.out | 12 +- .../glslang/Test/baseResults/450.tese.out | 25 +- .../glslang/Test/baseResults/450.vert.out | 61 +- .../Test/baseResults/atomic_uint.frag.out | 1 - .../Test/baseResults/badChars.frag.out | 2 +- .../Test/baseResults/badMacroArgs.frag.out | 1 - .../glslang/Test/baseResults/comment.frag.out | 1 - .../Test/baseResults/constFold.frag.out | 3 +- .../glslang/Test/baseResults/cppBad.vert.out | 5 +- .../Test/baseResults/cppIndent.vert.out | 2 +- .../Test/baseResults/cppSimple.vert.out | 5 +- .../glslang/Test/baseResults/dce.frag.out | 2 - .../baseResults/functionSemantics.frag.out | 1 - .../Test/baseResults/glspv.esversion.vert.out | 1 - .../glslang/Test/baseResults/glspv.frag.out | 10 +- .../Test/baseResults/glspv.version.frag.out | 2 +- .../glslang/Test/baseResults/glspv.vert.out | 3 +- .../Test/baseResults/hlsl.amend.frag.out | 2 +- .../baseResults/hlsl.array.flatten.frag.out | 321 +- .../Test/baseResults/hlsl.array.frag.out | 619 +- .../hlsl.array.implicit-size.frag.out | 2 +- .../baseResults/hlsl.array.multidim.frag.out | 18 +- .../Test/baseResults/hlsl.assoc.frag.out | 2 +- .../hlsl.attribute.expression.comp.out | 8 +- .../Test/baseResults/hlsl.attribute.frag.out | 8 +- .../Test/baseResults/hlsl.basic.comp.out | 2 +- .../Test/baseResults/hlsl.basic.geom.out | 164 +- .../Test/baseResults/hlsl.buffer.frag.out | 469 +- .../hlsl.calculatelod.dx10.frag.out | 34 +- .../hlsl.calculatelodunclamped.dx10.frag.out | 16 +- .../Test/baseResults/hlsl.cast.frag.out | 2 +- .../baseResults/hlsl.comparison.vec.frag.out | 18 +- .../baseResults/hlsl.conditional.frag.out | 1144 +- .../baseResults/hlsl.constructexpr.frag.out | 18 +- .../hlsl.deadFunctionMissingBody.vert.out | 2 +- .../baseResults/hlsl.depthGreater.frag.out | 2 +- .../Test/baseResults/hlsl.depthLess.frag.out | 2 +- .../Test/baseResults/hlsl.discard.frag.out | 2 +- .../Test/baseResults/hlsl.doLoop.frag.out | 246 +- .../hlsl.emptystructreturn.frag.out | 21 +- .../hlsl.emptystructreturn.vert.out | 25 +- .../Test/baseResults/hlsl.entry-in.frag.out | 113 +- .../Test/baseResults/hlsl.entry-out.frag.out | 66 +- .../baseResults/hlsl.entry.rename.frag.out | 18 +- .../baseResults/hlsl.flatten.return.frag.out | 66 +- .../Test/baseResults/hlsl.float1.frag.out | 2 +- .../Test/baseResults/hlsl.float4.frag.out | 2 +- .../Test/baseResults/hlsl.forLoop.frag.out | 298 +- .../hlsl.gather.array.dx10.frag.out | 34 +- .../hlsl.gather.basic.dx10.frag.out | 34 +- .../hlsl.gather.basic.dx10.vert.out | 28 +- .../hlsl.gather.offset.dx10.frag.out | 34 +- .../hlsl.gather.offsetarray.dx10.frag.out | 34 +- .../hlsl.gatherRGBA.array.dx10.frag.out | 34 +- .../hlsl.gatherRGBA.basic.dx10.frag.out | 34 +- .../hlsl.gatherRGBA.offset.dx10.frag.out | 34 +- .../hlsl.gatherRGBA.offsetarray.dx10.frag.out | 34 +- .../hlsl.gathercmpRGBA.offset.dx10.frag.out | 618 +- .../hlsl.getdimensions.dx10.frag.out | 35 +- .../hlsl.getdimensions.dx10.vert.out | 28 +- .../hlsl.getdimensions.rw.dx10.frag.out | 38 +- .../hlsl.getsampleposition.dx10.frag.out | 849 +- .../Test/baseResults/hlsl.hull.1.tesc.out | 130 +- .../Test/baseResults/hlsl.hull.2.tesc.out | 146 +- .../Test/baseResults/hlsl.hull.void.tesc.out | 11 +- .../hlsl.identifier.sample.frag.out | 2 +- .../glslang/Test/baseResults/hlsl.if.frag.out | 8 +- .../Test/baseResults/hlsl.init.frag.out | 2 +- .../Test/baseResults/hlsl.init2.frag.out | 18 +- .../Test/baseResults/hlsl.inoutquals.frag.out | 502 +- .../hlsl.intrinsics.barriers.comp.out | 28 +- .../Test/baseResults/hlsl.intrinsics.comp.out | 578 +- .../hlsl.intrinsics.d3dcolortoubyte4.frag.out | 2 +- .../hlsl.intrinsics.double.frag.out | 74 +- .../hlsl.intrinsics.evalfns.frag.out | 11 +- .../hlsl.intrinsics.f1632.frag.out | 2 +- .../hlsl.intrinsics.f3216.frag.out | 2 +- .../Test/baseResults/hlsl.intrinsics.frag.out | 13851 ++++++++-------- .../baseResults/hlsl.intrinsics.lit.frag.out | 2 +- .../hlsl.intrinsics.negative.comp.out | 2 +- .../hlsl.intrinsics.negative.frag.out | 32 +- .../hlsl.intrinsics.negative.vert.out | 2 +- .../hlsl.intrinsics.promote.down.frag.out | 18 +- .../hlsl.intrinsics.promote.frag.out | 18 +- .../hlsl.intrinsics.promote.outputs.frag.out | 18 +- .../Test/baseResults/hlsl.intrinsics.vert.out | 2154 +-- .../Test/baseResults/hlsl.layout.frag.out | 206 +- .../baseResults/hlsl.load.2dms.dx10.frag.out | 35 +- .../baseResults/hlsl.load.array.dx10.frag.out | 34 +- .../baseResults/hlsl.load.basic.dx10.frag.out | 34 +- .../baseResults/hlsl.load.basic.dx10.vert.out | 28 +- .../hlsl.load.buffer.dx10.frag.out | 34 +- .../hlsl.load.buffer.float.dx10.frag.out | 34 +- .../hlsl.load.offset.dx10.frag.out | 34 +- .../hlsl.load.offsetarray.dx10.frag.out | 34 +- .../hlsl.load.rwbuffer.dx10.frag.out | 20 +- .../hlsl.load.rwtexture.array.dx10.frag.out | 36 +- .../hlsl.load.rwtexture.dx10.frag.out | 36 +- .../baseResults/hlsl.logical.binary.frag.out | 155 +- .../hlsl.logical.binary.vec.frag.out | 127 +- .../baseResults/hlsl.logical.unary.frag.out | 18 +- .../Test/baseResults/hlsl.matNx1.frag.out | 18 +- .../baseResults/hlsl.matType.bool.frag.out | 18 +- .../Test/baseResults/hlsl.matType.frag.out | 2 +- .../baseResults/hlsl.matType.int.frag.out | 18 +- .../baseResults/hlsl.matrixSwizzle.vert.out | 2 +- .../baseResults/hlsl.matrixindex.frag.out | 18 +- .../Test/baseResults/hlsl.max.frag.out | 2 +- .../Test/baseResults/hlsl.mintypes.frag.out | 18 +- .../Test/baseResults/hlsl.multiEntry.vert.out | 2 +- .../baseResults/hlsl.multiReturn.frag.out | 6 +- .../hlsl.nonstaticMemberFunction.frag.out | 2 +- .../baseResults/hlsl.numericsuffixes.frag.out | 18 +- .../Test/baseResults/hlsl.numthreads.comp.out | 32 +- .../Test/baseResults/hlsl.overload.frag.out | 2 +- .../baseResults/hlsl.params.default.frag.out | 2 +- .../baseResults/hlsl.partialInit.frag.out | 66 +- .../Test/baseResults/hlsl.pp.line.frag.out | 34 +- .../Test/baseResults/hlsl.precedence.frag.out | 2 +- .../baseResults/hlsl.precedence2.frag.out | 38 +- .../Test/baseResults/hlsl.precise.frag.out | 18 +- .../baseResults/hlsl.promote.atomic.frag.out | 4 +- .../baseResults/hlsl.promote.binary.frag.out | 18 +- .../baseResults/hlsl.promote.vec1.frag.out | 2 +- .../Test/baseResults/hlsl.promotions.frag.out | 18 +- .../Test/baseResults/hlsl.reflection.vert.out | 32 +- .../Test/baseResults/hlsl.rw.atomics.frag.out | 22 +- .../Test/baseResults/hlsl.rw.bracket.frag.out | 20 +- .../baseResults/hlsl.rw.register.frag.out | 22 +- .../hlsl.rw.scalar.bracket.frag.out | 20 +- .../Test/baseResults/hlsl.rw.swizzle.frag.out | 4 +- .../baseResults/hlsl.rw.vec2.bracket.frag.out | 20 +- .../hlsl.sample.array.dx10.frag.out | 34 +- .../hlsl.sample.basic.dx10.frag.out | 34 +- .../hlsl.sample.offset.dx10.frag.out | 34 +- .../hlsl.sample.offsetarray.dx10.frag.out | 34 +- .../hlsl.sample.sub-vec4.dx10.frag.out | 18 +- .../hlsl.samplebias.array.dx10.frag.out | 34 +- .../hlsl.samplebias.basic.dx10.frag.out | 34 +- .../hlsl.samplebias.offset.dx10.frag.out | 34 +- .../hlsl.samplebias.offsetarray.dx10.frag.out | 34 +- .../hlsl.samplecmp.array.dx10.frag.out | 597 +- .../hlsl.samplecmp.basic.dx10.frag.out | 573 +- .../hlsl.samplecmp.offset.dx10.frag.out | 464 +- .../hlsl.samplecmp.offsetarray.dx10.frag.out | 488 +- ...lsl.samplecmplevelzero.array.dx10.frag.out | 599 +- ...lsl.samplecmplevelzero.basic.dx10.frag.out | 575 +- ...sl.samplecmplevelzero.offset.dx10.frag.out | 466 +- ...mplecmplevelzero.offsetarray.dx10.frag.out | 490 +- .../hlsl.samplegrad.array.dx10.frag.out | 34 +- .../hlsl.samplegrad.basic.dx10.frag.out | 34 +- .../hlsl.samplegrad.basic.dx10.vert.out | 28 +- .../hlsl.samplegrad.offset.dx10.frag.out | 34 +- .../hlsl.samplegrad.offsetarray.dx10.frag.out | 34 +- .../hlsl.samplelevel.array.dx10.frag.out | 34 +- .../hlsl.samplelevel.basic.dx10.frag.out | 34 +- .../hlsl.samplelevel.basic.dx10.vert.out | 28 +- .../hlsl.samplelevel.offset.dx10.frag.out | 34 +- ...hlsl.samplelevel.offsetarray.dx10.frag.out | 34 +- .../Test/baseResults/hlsl.scope.frag.out | 2 +- .../Test/baseResults/hlsl.semantic.geom.out | 406 +- .../Test/baseResults/hlsl.semantic.vert.out | 583 +- .../Test/baseResults/hlsl.semicolons.frag.out | 18 +- .../Test/baseResults/hlsl.shapeConv.frag.out | 204 +- .../baseResults/hlsl.shapeConvRet.frag.out | 2 +- .../Test/baseResults/hlsl.sin.frag.out | 2 +- .../hlsl.staticMemberFunction.frag.out | 2 +- .../Test/baseResults/hlsl.string.frag.out | 2 +- .../baseResults/hlsl.stringtoken.frag.out | 18 +- .../Test/baseResults/hlsl.struct.frag.out | 304 +- .../baseResults/hlsl.struct.split-1.vert.out | 130 +- .../hlsl.struct.split.array.geom.out | 41 +- .../hlsl.struct.split.assign.frag.out | 245 +- .../hlsl.struct.split.call.vert.out | 130 +- .../hlsl.struct.split.nested.geom.out | 453 +- .../hlsl.struct.split.trivial.geom.out | 63 +- .../hlsl.struct.split.trivial.vert.out | 44 +- .../baseResults/hlsl.structIoFourWay.frag.out | 307 +- .../hlsl.structStructName.frag.out | 2 +- .../hlsl.structarray.flatten.frag.out | 271 +- .../hlsl.structarray.flatten.geom.out | 114 +- .../hlsl.structbuffer.atomics.frag.out | 11 +- .../hlsl.structbuffer.byte.frag.out | 47 +- .../hlsl.structbuffer.coherent.frag.out | 13 +- .../baseResults/hlsl.structbuffer.fn.frag.out | 211 +- .../baseResults/hlsl.structbuffer.frag.out | 186 +- .../baseResults/hlsl.structbuffer.rw.frag.out | 11 +- .../hlsl.structbuffer.rwbyte.frag.out | 770 +- .../Test/baseResults/hlsl.structin.vert.out | 556 +- .../Test/baseResults/hlsl.switch.frag.out | 26 +- .../Test/baseResults/hlsl.swizzle.frag.out | 2 +- .../baseResults/hlsl.templatetypes.frag.out | 2 +- .../Test/baseResults/hlsl.this.frag.out | 2 +- .../Test/baseResults/hlsl.tx.bracket.frag.out | 18 +- .../Test/baseResults/hlsl.type.half.frag.out | 175 +- .../baseResults/hlsl.type.identifier.frag.out | 97 +- .../baseResults/hlsl.typeGraphCopy.vert.out | 2 +- .../Test/baseResults/hlsl.typedef.frag.out | 2 +- .../Test/baseResults/hlsl.void.frag.out | 2 +- .../Test/baseResults/hlsl.whileLoop.frag.out | 8 +- .../baseResults/lineContinuation.vert.out | 2 +- .../Test/baseResults/link1.vk.frag.out | 4 - .../Test/baseResults/missingBodies.vert.out | 2 - .../baseResults/negativeArraySize.comp.out | 1 - .../Test/baseResults/newTexture.frag.out | 2 - .../Test/baseResults/nonVulkan.frag.out | 1 - .../glslang/Test/baseResults/numeral.frag.out | 19 +- .../glslang/Test/baseResults/precise.tesc.out | 2 - .../baseResults/precise_struct_block.vert.out | 2 - .../preprocessor.edge_cases.vert.err | 2 - .../baseResults/preprocessor.errors.vert.err | 1 - .../preprocessor.extensions.vert.err | 1 - .../preprocessor.function_macro.vert.err | 2 - .../baseResults/preprocessor.line.frag.err | 2 - .../baseResults/preprocessor.pragma.vert.err | 2 - .../baseResults/preprocessor.simple.vert.err | 2 - .../baseResults/preprocessor.simple.vert.out | 2 +- .../Test/baseResults/reflection.vert.out | 11 +- .../baseResults/remap.basic.dcefunc.frag.out | 4 +- .../remap.basic.everything.frag.out | 4 +- .../baseResults/remap.basic.none.frag.out | 4 +- .../baseResults/remap.basic.strip.frag.out | 4 +- ...emap.hlsl.sample.basic.everything.frag.out | 16 +- .../remap.hlsl.sample.basic.none.frag.out | 18 +- .../remap.hlsl.sample.basic.strip.frag.out | 2 +- ...map.hlsl.templatetypes.everything.frag.out | 2 +- .../remap.hlsl.templatetypes.none.frag.out | 2 +- .../baseResults/remap.if.everything.frag.out | 4 +- .../Test/baseResults/remap.if.none.frag.out | 4 +- .../remap.similar_1a.everything.frag.out | 4 +- .../remap.similar_1a.none.frag.out | 4 +- .../remap.similar_1b.everything.frag.out | 4 +- .../remap.similar_1b.none.frag.out | 4 +- .../remap.switch.everything.frag.out | 3 +- .../baseResults/remap.switch.none.frag.out | 3 +- .../remap.uniformarray.everything.frag.out | 3 +- .../remap.uniformarray.none.frag.out | 3 +- .../Test/baseResults/specExamples.frag.out | 1 - .../Test/baseResults/specExamples.vert.out | 1 - .../Test/baseResults/spv.100ops.frag.out | 4 +- .../glslang/Test/baseResults/spv.130.frag.out | 2 +- .../glslang/Test/baseResults/spv.140.frag.out | 2 +- .../glslang/Test/baseResults/spv.150.geom.out | 2 +- .../glslang/Test/baseResults/spv.150.vert.out | 2 +- .../Test/baseResults/spv.300BuiltIns.vert.out | 4 +- .../Test/baseResults/spv.300layout.frag.out | 4 +- .../Test/baseResults/spv.300layout.vert.out | 4 +- .../Test/baseResults/spv.300layoutp.vert.out | 4 +- .../Test/baseResults/spv.310.bitcast.frag.out | 4 +- .../glslang/Test/baseResults/spv.310.comp.out | 168 +- .../glslang/Test/baseResults/spv.330.geom.out | 2 +- .../glslang/Test/baseResults/spv.400.frag.out | 4 +- .../glslang/Test/baseResults/spv.400.tesc.out | 143 +- .../glslang/Test/baseResults/spv.400.tese.out | 4 +- .../glslang/Test/baseResults/spv.420.geom.out | 4 +- .../glslang/Test/baseResults/spv.430.frag.out | 4 +- .../glslang/Test/baseResults/spv.430.vert.out | 4 +- .../glslang/Test/baseResults/spv.450.geom.out | 20 +- .../baseResults/spv.450.noRedecl.tesc.out | 4 +- .../glslang/Test/baseResults/spv.450.tesc.out | 165 +- .../Test/baseResults/spv.AofA.frag.out | 4 +- .../spv.GeometryShaderPassthrough.geom.out | 4 +- .../Test/baseResults/spv.Operations.frag.out | 4 +- .../Test/baseResults/spv.accessChain.frag.out | 4 +- .../Test/baseResults/spv.aggOps.frag.out | 3 +- .../baseResults/spv.always-discard.frag.out | 3 +- .../baseResults/spv.always-discard2.frag.out | 3 +- .../Test/baseResults/spv.atomic.comp.out | 143 +- .../Test/baseResults/spv.bitCast.frag.out | 4 +- .../Test/baseResults/spv.bool.vert.out | 4 +- .../Test/baseResults/spv.boolInBlock.frag.out | 30 +- .../baseResults/spv.branch-return.vert.out | 4 +- .../spv.buffer.autoassign.frag.out | 10 +- .../spv.conditionalDiscard.frag.out | 5 +- .../Test/baseResults/spv.conversion.frag.out | 3 +- .../Test/baseResults/spv.dataOut.frag.out | 2 +- .../baseResults/spv.dataOutIndirect.frag.out | 2 +- .../baseResults/spv.dataOutIndirect.vert.out | 2 +- .../Test/baseResults/spv.deepRvalue.frag.out | 3 +- .../Test/baseResults/spv.depthOut.frag.out | 4 +- .../Test/baseResults/spv.deviceGroup.frag.out | 4 +- .../Test/baseResults/spv.discard-dce.frag.out | 3 +- .../Test/baseResults/spv.do-simple.vert.out | 4 +- .../spv.do-while-continue-break.vert.out | 4 +- .../Test/baseResults/spv.doWhileLoop.frag.out | 3 +- .../Test/baseResults/spv.double.comp.out | 4 +- .../Test/baseResults/spv.drawParams.vert.out | 4 +- .../spv.earlyReturnDiscard.frag.out | 3 +- .../Test/baseResults/spv.float16.frag.out | 8 +- .../Test/baseResults/spv.flowControl.frag.out | 3 +- .../spv.for-complex-condition.vert.out | 4 +- .../spv.for-continue-break.vert.out | 4 +- .../Test/baseResults/spv.for-nobody.vert.out | 4 +- .../Test/baseResults/spv.for-notest.vert.out | 4 +- .../Test/baseResults/spv.for-simple.vert.out | 4 +- .../Test/baseResults/spv.forLoop.frag.out | 3 +- .../Test/baseResults/spv.forwardFun.frag.out | 3 +- .../baseResults/spv.functionCall.frag.out | 3 +- .../spv.functionNestedOpaque.vert.out | 4 +- .../spv.functionSemantics.frag.out | 5 +- .../Test/baseResults/spv.glFragColor.frag.out | 3 +- .../spv.glsl.register.autoassign.frag.out | 5 +- .../spv.glsl.register.noautoassign.frag.out | 5 +- .../Test/baseResults/spv.image.frag.out | 13 +- .../Test/baseResults/spv.int64.frag.out | 4 +- .../Test/baseResults/spv.intOps.vert.out | 4 +- .../Test/baseResults/spv.interpOps.frag.out | 4 +- .../baseResults/spv.layoutNested.vert.out | 4 +- .../Test/baseResults/spv.length.frag.out | 3 +- .../baseResults/spv.localAggregates.frag.out | 5 +- .../Test/baseResults/spv.loops.frag.out | 3 +- .../baseResults/spv.loopsArtificial.frag.out | 3 +- .../Test/baseResults/spv.matFun.vert.out | 4 +- .../Test/baseResults/spv.matrix.frag.out | 4 +- .../Test/baseResults/spv.matrix2.frag.out | 2 +- .../baseResults/spv.memoryQualifier.frag.out | 10 +- .../spv.merge-unreachable.frag.out | 4 +- .../Test/baseResults/spv.multiStruct.comp.out | 396 +- .../spv.multiStructFuncall.frag.out | 4 +- .../Test/baseResults/spv.multiView.frag.out | 4 +- .../spv.multiviewPerViewAttributes.tesc.out | 4 +- .../spv.multiviewPerViewAttributes.vert.out | 4 +- .../Test/baseResults/spv.newTexture.frag.out | 4 +- .../spv.noDeadDecorations.vert.out | 4 +- .../Test/baseResults/spv.noWorkgroup.comp.out | 4 +- .../Test/baseResults/spv.nonSquare.vert.out | 2 +- .../Test/baseResults/spv.offsets.frag.out | 4 +- .../Test/baseResults/spv.precise.tesc.out | 4 +- .../Test/baseResults/spv.precise.tese.out | 4 +- .../Test/baseResults/spv.precision.frag.out | 4 +- .../Test/baseResults/spv.prepost.frag.out | 3 +- .../baseResults/spv.pushConstant.vert.out | 4 +- .../baseResults/spv.pushConstantAnon.vert.out | 4 +- .../Test/baseResults/spv.qualifiers.vert.out | 4 +- .../Test/baseResults/spv.queryL.frag.out | 4 +- .../spv.register.autoassign-2.frag.out | 10 +- .../spv.register.autoassign.frag.out | 10 +- .../spv.register.noautoassign.frag.out | 10 +- .../baseResults/spv.rw.autoassign.frag.out | 14 +- .../spv.sampleMaskOverrideCoverage.frag.out | 5 +- .../Test/baseResults/spv.separate.frag.out | 5 +- .../glslang/Test/baseResults/spv.set.vert.out | 4 +- .../baseResults/spv.shaderBallot.comp.out | 4 +- .../baseResults/spv.shaderBallotAMD.comp.out | 7 +- .../baseResults/spv.shaderDrawParams.vert.out | 4 +- .../baseResults/spv.shaderGroupVote.comp.out | 4 +- .../Test/baseResults/spv.shiftOps.frag.out | 4 +- .../baseResults/spv.shortCircuit.frag.out | 4 +- .../spv.simpleFunctionCall.frag.out | 3 +- .../Test/baseResults/spv.simpleMat.vert.out | 2 +- .../baseResults/spv.sparseTexture.frag.out | 5 +- .../spv.sparseTextureClamp.frag.out | 4 +- .../Test/baseResults/spv.specConst.vert.out | 4 +- .../baseResults/spv.specConstant.comp.out | 4 +- .../baseResults/spv.specConstant.vert.out | 10 +- .../spv.specConstantComposite.vert.out | 4 +- .../spv.specConstantOperations.vert.out | 4 +- .../baseResults/spv.ssbo.autoassign.frag.out | 160 +- .../spv.stereoViewRendering.tesc.out | 103 +- .../spv.stereoViewRendering.vert.out | 5 +- .../baseResults/spv.structAssignment.frag.out | 3 +- .../Test/baseResults/spv.structDeref.frag.out | 3 +- .../Test/baseResults/spv.structure.frag.out | 3 +- .../Test/baseResults/spv.subpass.frag.out | 4 +- .../Test/baseResults/spv.switch.frag.out | 3 +- .../Test/baseResults/spv.swizzle.frag.out | 3 +- .../baseResults/spv.swizzleInversion.frag.out | 4 +- .../Test/baseResults/spv.test.frag.out | 5 +- .../Test/baseResults/spv.test.vert.out | 2 +- .../Test/baseResults/spv.texture.frag.out | 3 +- .../Test/baseResults/spv.texture.vert.out | 2 +- .../Test/baseResults/spv.types.frag.out | 3 +- .../Test/baseResults/spv.uint.frag.out | 4 +- .../baseResults/spv.uniformArray.frag.out | 3 +- .../spv.variableArrayIndex.frag.out | 5 +- .../baseResults/spv.varyingArray.frag.out | 3 +- .../spv.varyingArrayIndirect.frag.out | 3 +- .../baseResults/spv.viewportArray2.tesc.out | 42 +- .../baseResults/spv.viewportArray2.vert.out | 5 +- .../baseResults/spv.voidFunction.frag.out | 5 +- .../spv.while-continue-break.vert.out | 4 +- .../baseResults/spv.while-simple.vert.out | 4 +- .../Test/baseResults/spv.whileLoop.frag.out | 3 +- .../Test/baseResults/syntaxError.frag.out | 2 +- .../Test/baseResults/tokenLength.vert.out | 8 +- .../Test/baseResults/tokenPaste.vert.out | 1 - .../Test/baseResults/versionsClean.vert.out | 2 - .../Test/baseResults/versionsErrors.vert.out | 1 - .../Test/baseResults/vulkan.ast.vert.out | 4 +- .../glslang/Test/baseResults/vulkan.comp.out | 1 - .../glslang/Test/baseResults/vulkan.frag.out | 11 +- .../glslang/Test/baseResults/vulkan.vert.out | 7 +- .../bgfx/3rdparty/glslang/Test/cppSimple.vert | 10 + .../bgfx/3rdparty/glslang/Test/glspv.frag | 15 +- .../3rdparty/glslang/Test/hlsl.array.frag | 15 +- .../3rdparty/glslang/Test/hlsl.buffer.frag | 49 +- .../glslang/Test/hlsl.conditional.frag | 28 +- .../3rdparty/glslang/Test/hlsl.doLoop.frag | 7 +- .../3rdparty/glslang/Test/hlsl.forLoop.frag | 14 +- .../Test/hlsl.gathercmpRGBA.array.dx10.frag | 4 + .../Test/hlsl.gathercmpRGBA.basic.dx10.frag | 8 + .../Test/hlsl.gathercmpRGBA.offset.dx10.frag | 10 +- .../hlsl.gathercmpRGBA.offsetarray.dx10.frag | 4 + .../Test/hlsl.getsampleposition.dx10.frag | 6 +- .../3rdparty/glslang/Test/hlsl.hull.void.tesc | 2 +- .../glslang/Test/hlsl.inoutquals.frag | 5 +- .../glslang/Test/hlsl.intrinsics.frag | 8 +- .../3rdparty/glslang/Test/hlsl.layout.frag | 3 +- .../glslang/Test/hlsl.numthreads.comp | 7 +- .../glslang/Test/hlsl.reflection.vert | 45 +- .../3rdparty/glslang/Test/hlsl.semantic.geom | 5 +- .../3rdparty/glslang/Test/hlsl.semantic.vert | 8 +- .../3rdparty/glslang/Test/hlsl.shapeConv.frag | 19 +- .../Test/hlsl.struct.split.assign.frag | 2 +- .../Test/hlsl.struct.split.nested.geom | 7 +- .../3rdparty/glslang/Test/hlsl.structin.vert | 13 +- .../3rdparty/glslang/Test/hlsl.switch.frag | 2 +- .../3rdparty/glslang/Test/hlsl.type.half.frag | 19 +- .../glslang/Test/hlsl.type.identifier.frag | 5 +- .../bgfx/3rdparty/glslang/Test/numeral.frag | 3 + .../3rdparty/glslang/Test/reflection.vert | 24 + 3rdparty/bgfx/3rdparty/glslang/Test/runtests | 127 +- .../bgfx/3rdparty/glslang/Test/spv.310.comp | 2 + .../bgfx/3rdparty/glslang/Test/spv.450.geom | 2 + .../bgfx/3rdparty/glslang/Test/spv.450.tesc | 3 +- .../glslang/Test/spv.stereoViewRendering.tesc | 3 +- .../glslang/Test/spv.viewportArray2.tesc | 8 +- .../bgfx/3rdparty/glslang/Test/vulkan.frag | 10 +- .../bgfx/3rdparty/glslang/Test/vulkan.vert | 16 + .../3rdparty/glslang/glslang/CMakeLists.txt | 23 +- .../glslang/glslang/Include/BaseTypes.h | 18 +- .../3rdparty/glslang/glslang/Include/Common.h | 14 +- .../glslang/glslang/Include/ConstantUnion.h | 6 +- .../glslang/Include/InitializeGlobals.h | 3 - .../glslang/glslang/Include/PoolAlloc.h | 9 +- .../glslang/glslang/Include/ShHandle.h | 7 +- .../3rdparty/glslang/glslang/Include/Types.h | 142 +- .../3rdparty/glslang/glslang/Include/arrays.h | 35 +- .../glslang/glslang/Include/intermediate.h | 255 +- .../glslang/glslang/Include/revision.h | 4 +- .../glslang/MachineIndependent/Constant.cpp | 66 +- .../glslang/MachineIndependent/Initialize.cpp | 697 +- .../glslang/MachineIndependent/Initialize.h | 10 +- .../MachineIndependent/Intermediate.cpp | 684 +- .../MachineIndependent/LiveTraverser.h | 2 + .../MachineIndependent/ParseContextBase.cpp | 29 + .../MachineIndependent/ParseHelper.cpp | 443 +- .../glslang/MachineIndependent/ParseHelper.h | 94 +- .../glslang/MachineIndependent/PoolAlloc.cpp | 62 +- .../glslang/MachineIndependent/RemoveTree.h | 2 + .../glslang/MachineIndependent/Scan.cpp | 83 +- .../glslang/glslang/MachineIndependent/Scan.h | 17 +- .../glslang/MachineIndependent/ScanContext.h | 2 + .../glslang/MachineIndependent/ShaderLang.cpp | 389 +- .../MachineIndependent/SymbolTable.cpp | 21 + .../glslang/MachineIndependent/SymbolTable.h | 22 +- .../glslang/MachineIndependent/Versions.cpp | 75 +- .../glslang/MachineIndependent/Versions.h | 44 +- .../glslang/MachineIndependent/attribute.cpp | 257 + .../glslang/MachineIndependent/attribute.h | 102 + .../glslang/MachineIndependent/gl_types.h | 2 + .../glslang/MachineIndependent/glslang.y | 181 +- .../MachineIndependent/glslang_tab.cpp | 9819 +++++------ .../MachineIndependent/glslang_tab.cpp.h | 642 +- .../glslang/MachineIndependent/intermOut.cpp | 250 +- .../glslang/MachineIndependent/iomapper.cpp | 477 +- .../MachineIndependent/linkValidate.cpp | 16 +- .../MachineIndependent/localintermediate.h | 280 +- .../glslang/MachineIndependent/parseConst.cpp | 6 - .../MachineIndependent/parseVersions.h | 2 + .../MachineIndependent/preprocessor/Pp.cpp | 87 +- .../preprocessor/PpAtom.cpp | 2 + .../preprocessor/PpContext.h | 20 +- .../preprocessor/PpMemory.cpp | 81 - .../preprocessor/PpScanner.cpp | 344 +- .../preprocessor/PpSymbols.cpp | 77 - .../preprocessor/PpTokens.cpp | 18 +- .../preprocessor/PpTokens.h | 4 + .../propagateNoContraction.h | 2 + .../glslang/MachineIndependent/reflection.cpp | 49 +- .../glslang/MachineIndependent/reflection.h | 37 +- .../glslang/OSDependent/Unix/CMakeLists.txt | 7 +- .../glslang/OSDependent/Unix/ossource.cpp | 13 + .../OSDependent/Windows/CMakeLists.txt | 9 +- .../glslang/glslang/Public/ShaderLang.h | 180 +- .../3rdparty/glslang/gtests/AST.FromFile.cpp | 18 + .../3rdparty/glslang/gtests/CMakeLists.txt | 100 +- .../3rdparty/glslang/gtests/Hlsl.FromFile.cpp | 124 +- .../glslang/gtests/Link.FromFile.Vk.cpp | 1 + .../glslang/gtests/Remap.FromFile.cpp | 1 + .../3rdparty/glslang/gtests/Spv.FromFile.cpp | 52 +- .../3rdparty/glslang/gtests/TestFixture.h | 46 +- .../bgfx/3rdparty/glslang/hlsl/CMakeLists.txt | 9 +- .../3rdparty/glslang/hlsl/hlslAttributes.cpp | 88 +- .../3rdparty/glslang/hlsl/hlslAttributes.h | 57 +- .../3rdparty/glslang/hlsl/hlslGrammar.cpp | 769 +- .../bgfx/3rdparty/glslang/hlsl/hlslGrammar.h | 26 +- .../3rdparty/glslang/hlsl/hlslParseHelper.cpp | 3789 +++-- .../3rdparty/glslang/hlsl/hlslParseHelper.h | 218 +- .../3rdparty/glslang/hlsl/hlslParseables.cpp | 91 +- .../3rdparty/glslang/hlsl/hlslScanContext.cpp | 81 +- .../bgfx/3rdparty/glslang/hlsl/hlslTokens.h | 20 + .../bgfx/3rdparty/glslang/known_good.json | 18 + .../glslang/update_glslang_sources.py | 151 + 3rdparty/bgfx/3rdparty/iqa/LICENSE | 32 - 3rdparty/bgfx/3rdparty/iqa/README.txt | 36 - 3rdparty/bgfx/3rdparty/iqa/include/convolve.h | 111 - 3rdparty/bgfx/3rdparty/iqa/include/decimate.h | 55 - 3rdparty/bgfx/3rdparty/iqa/include/iqa.h | 134 - 3rdparty/bgfx/3rdparty/iqa/include/iqa_os.h | 68 - .../bgfx/3rdparty/iqa/include/math_utils.h | 64 - 3rdparty/bgfx/3rdparty/iqa/include/ssim.h | 117 - 3rdparty/bgfx/3rdparty/iqa/source/convolve.c | 195 - 3rdparty/bgfx/3rdparty/iqa/source/decimate.c | 59 - .../bgfx/3rdparty/iqa/source/math_utils.c | 82 - 3rdparty/bgfx/3rdparty/iqa/source/ms_ssim.c | 277 - 3rdparty/bgfx/3rdparty/iqa/source/mse.c | 50 - 3rdparty/bgfx/3rdparty/iqa/source/psnr.c | 42 - 3rdparty/bgfx/3rdparty/iqa/source/ssim.c | 322 - .../3rdparty/khronos/vulkan/vk_platform.h | 16 +- .../bgfx/3rdparty/khronos/vulkan/vulkan.h | 1936 ++- 3rdparty/bgfx/3rdparty/libsquish/LICENSE | 20 - 3rdparty/bgfx/3rdparty/libsquish/README | 35 - 3rdparty/bgfx/3rdparty/libsquish/alpha.cpp | 350 - 3rdparty/bgfx/3rdparty/libsquish/alpha.h | 41 - .../bgfx/3rdparty/libsquish/clusterfit.cpp | 392 - 3rdparty/bgfx/3rdparty/libsquish/clusterfit.h | 61 - .../bgfx/3rdparty/libsquish/colourblock.cpp | 214 - .../bgfx/3rdparty/libsquish/colourblock.h | 41 - .../bgfx/3rdparty/libsquish/colourfit.cpp | 54 - 3rdparty/bgfx/3rdparty/libsquish/colourfit.h | 56 - .../bgfx/3rdparty/libsquish/colourset.cpp | 121 - 3rdparty/bgfx/3rdparty/libsquish/colourset.h | 58 - 3rdparty/bgfx/3rdparty/libsquish/config.h | 49 - 3rdparty/bgfx/3rdparty/libsquish/maths.cpp | 259 - 3rdparty/bgfx/3rdparty/libsquish/maths.h | 233 - 3rdparty/bgfx/3rdparty/libsquish/rangefit.cpp | 201 - 3rdparty/bgfx/3rdparty/libsquish/rangefit.h | 54 - 3rdparty/bgfx/3rdparty/libsquish/simd.h | 32 - 3rdparty/bgfx/3rdparty/libsquish/simd_float.h | 183 - .../3rdparty/libsquish/singlecolourfit.cpp | 172 - .../bgfx/3rdparty/libsquish/singlecolourfit.h | 58 - .../3rdparty/libsquish/singlecolourlookup.inl | 1064 -- 3rdparty/bgfx/3rdparty/libsquish/squish.cpp | 260 - 3rdparty/bgfx/3rdparty/libsquish/squish.h | 269 - 3rdparty/bgfx/3rdparty/lodepng/README.md | 10 - 3rdparty/bgfx/3rdparty/lodepng/lodepng.cpp | 6224 ------- 3rdparty/bgfx/3rdparty/lodepng/lodepng.h | 1759 -- .../{edtaa3/LICENSE.md => mtlpp/LICENSE} | 25 +- 3rdparty/bgfx/3rdparty/mtlpp/mtlpp.hpp | 2706 +++ 3rdparty/bgfx/3rdparty/mtlpp/mtlpp.mm | 4599 +++++ .../nvtt/NVIDIA_Texture_Tools_LICENSE.txt | 24 - 3rdparty/bgfx/3rdparty/nvtt/bc6h/bits.h | 75 - 3rdparty/bgfx/3rdparty/nvtt/bc6h/shapes_two.h | 133 - 3rdparty/bgfx/3rdparty/nvtt/bc6h/tile.h | 82 - 3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh.cpp | 197 - 3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh.h | 65 - .../bgfx/3rdparty/nvtt/bc6h/zoh_utils.cpp | 324 - 3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh_utils.h | 72 - 3rdparty/bgfx/3rdparty/nvtt/bc6h/zohone.cpp | 799 - 3rdparty/bgfx/3rdparty/nvtt/bc6h/zohtwo.cpp | 883 - 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl.cpp | 264 - 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl.h | 99 - .../bgfx/3rdparty/nvtt/bc7/avpcl_mode0.cpp | 1066 -- .../bgfx/3rdparty/nvtt/bc7/avpcl_mode1.cpp | 1047 -- .../bgfx/3rdparty/nvtt/bc7/avpcl_mode2.cpp | 1004 -- .../bgfx/3rdparty/nvtt/bc7/avpcl_mode3.cpp | 1059 -- .../bgfx/3rdparty/nvtt/bc7/avpcl_mode4.cpp | 1214 -- .../bgfx/3rdparty/nvtt/bc7/avpcl_mode5.cpp | 1216 -- .../bgfx/3rdparty/nvtt/bc7/avpcl_mode6.cpp | 1055 -- .../bgfx/3rdparty/nvtt/bc7/avpcl_mode7.cpp | 1094 -- .../bgfx/3rdparty/nvtt/bc7/avpcl_utils.cpp | 389 - 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_utils.h | 61 - 3rdparty/bgfx/3rdparty/nvtt/bc7/bits.h | 76 - 3rdparty/bgfx/3rdparty/nvtt/bc7/endpts.h | 81 - .../bgfx/3rdparty/nvtt/bc7/shapes_three.h | 132 - 3rdparty/bgfx/3rdparty/nvtt/bc7/shapes_two.h | 133 - 3rdparty/bgfx/3rdparty/nvtt/bc7/tile.h | 41 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/array.h | 181 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/array.inl | 437 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/debug.h | 216 - .../3rdparty/nvtt/nvcore/defsgnucdarwin.h | 57 - .../bgfx/3rdparty/nvtt/nvcore/defsgnuclinux.h | 63 - .../bgfx/3rdparty/nvtt/nvcore/defsgnucwin32.h | 65 - .../bgfx/3rdparty/nvtt/nvcore/defsvcwin32.h | 94 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/foreach.h | 68 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/hash.h | 83 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/memory.h | 30 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/nvcore.h | 363 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/posh.h | 1030 -- .../bgfx/3rdparty/nvtt/nvcore/stdstream.h | 459 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/stream.h | 163 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/strlib.h | 429 - 3rdparty/bgfx/3rdparty/nvtt/nvcore/utils.h | 281 - .../bgfx/3rdparty/nvtt/nvmath/fitting.cpp | 1200 -- 3rdparty/bgfx/3rdparty/nvtt/nvmath/fitting.h | 49 - 3rdparty/bgfx/3rdparty/nvtt/nvmath/matrix.h | 112 - 3rdparty/bgfx/3rdparty/nvtt/nvmath/matrix.inl | 1274 -- 3rdparty/bgfx/3rdparty/nvtt/nvmath/nvmath.h | 61 - 3rdparty/bgfx/3rdparty/nvtt/nvmath/plane.h | 40 - 3rdparty/bgfx/3rdparty/nvtt/nvmath/plane.inl | 49 - 3rdparty/bgfx/3rdparty/nvtt/nvmath/vector.h | 148 - 3rdparty/bgfx/3rdparty/nvtt/nvmath/vector.inl | 921 - 3rdparty/bgfx/3rdparty/nvtt/nvtt.cpp | 95 - 3rdparty/bgfx/3rdparty/nvtt/nvtt.h | 13 - .../bgfx/3rdparty/ocornut-imgui/imconfig.h | 6 +- .../bgfx/3rdparty/ocornut-imgui/imgui.cpp | 6442 ++++--- 3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h | 1020 +- .../3rdparty/ocornut-imgui/imgui_demo.cpp | 1612 +- .../3rdparty/ocornut-imgui/imgui_draw.cpp | 1199 +- .../3rdparty/ocornut-imgui/imgui_internal.h | 654 +- .../ocornut-imgui/imgui_node_graph_test.cpp | 232 - .../bgfx/3rdparty/ocornut-imgui/imgui_user.h | 3 +- .../3rdparty/ocornut-imgui/imgui_user.inl | 6 +- .../bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp | 1681 -- .../bgfx/3rdparty/ocornut-imgui/imgui_wm.h | 310 - .../ocornut-imgui/widgets/color_picker.inl | 2 +- .../ocornut-imgui/widgets/color_wheel.h | 7 + .../ocornut-imgui/widgets/color_wheel.inl | 39 + .../3rdparty/ocornut-imgui/widgets/dock.inl | 35 +- .../ocornut-imgui/widgets/file_list.inl | 4 +- .../3rdparty/ocornut-imgui/widgets/gizmo.inl | 606 +- .../ocornut-imgui/widgets/memory_editor.inl | 4 +- .../ocornut-imgui/widgets/range_slider.inl | 4 +- 3rdparty/bgfx/3rdparty/pvrtc/AlphaBitmap.h | 20 - 3rdparty/bgfx/3rdparty/pvrtc/BitScale.cpp | 183 - 3rdparty/bgfx/3rdparty/pvrtc/BitScale.h | 28 - 3rdparty/bgfx/3rdparty/pvrtc/BitUtility.h | 19 - 3rdparty/bgfx/3rdparty/pvrtc/Bitmap.h | 36 - 3rdparty/bgfx/3rdparty/pvrtc/ColorRgba.h | 152 - 3rdparty/bgfx/3rdparty/pvrtc/Interval.h | 21 - 3rdparty/bgfx/3rdparty/pvrtc/LICENSE.TXT | 25 - 3rdparty/bgfx/3rdparty/pvrtc/MortonTable.cpp | 43 - 3rdparty/bgfx/3rdparty/pvrtc/MortonTable.h | 18 - 3rdparty/bgfx/3rdparty/pvrtc/Point2.h | 17 - 3rdparty/bgfx/3rdparty/pvrtc/PvrTcDecoder.cpp | 144 - 3rdparty/bgfx/3rdparty/pvrtc/PvrTcDecoder.h | 25 - 3rdparty/bgfx/3rdparty/pvrtc/PvrTcEncoder.cpp | 464 - 3rdparty/bgfx/3rdparty/pvrtc/PvrTcEncoder.h | 43 - 3rdparty/bgfx/3rdparty/pvrtc/PvrTcPacket.cpp | 209 - 3rdparty/bgfx/3rdparty/pvrtc/PvrTcPacket.h | 65 - 3rdparty/bgfx/3rdparty/pvrtc/README.md | 17 - 3rdparty/bgfx/3rdparty/pvrtc/RgbBitmap.h | 25 - 3rdparty/bgfx/3rdparty/pvrtc/RgbaBitmap.h | 24 - 3rdparty/bgfx/3rdparty/remotery/LICENSE | 175 - .../bgfx/3rdparty/remotery/lib/Remotery.c | 6697 -------- .../bgfx/3rdparty/remotery/lib/Remotery.h | 620 - 3rdparty/bgfx/3rdparty/remotery/readme.md | 216 - .../bgfx/3rdparty/remotery/sample/sample.c | 45 - .../bgfx/3rdparty/remotery/screenshot.png | Bin 87218 -> 0 bytes .../3rdparty/remotery/vis/Code/Console.js | 194 - .../remotery/vis/Code/PixelTimeRange.js | 61 - .../3rdparty/remotery/vis/Code/Remotery.js | 330 - .../remotery/vis/Code/SampleWindow.js | 178 - .../3rdparty/remotery/vis/Code/ThreadFrame.js | 28 - .../3rdparty/remotery/vis/Code/TimelineRow.js | 376 - .../remotery/vis/Code/TimelineWindow.js | 270 - .../3rdparty/remotery/vis/Code/TitleWindow.js | 59 - .../remotery/vis/Code/WebSocketConnection.js | 137 - .../3rdparty/remotery/vis/Styles/Remotery.css | 212 - .../extern/BrowserLib/Core/Code/Animation.js | 65 - .../vis/extern/BrowserLib/Core/Code/Bind.js | 92 - .../extern/BrowserLib/Core/Code/Convert.js | 218 - .../vis/extern/BrowserLib/Core/Code/Core.js | 20 - .../vis/extern/BrowserLib/Core/Code/DOM.js | 499 - .../extern/BrowserLib/Core/Code/Keyboard.js | 149 - .../extern/BrowserLib/Core/Code/LocalStore.js | 26 - .../vis/extern/BrowserLib/Core/Code/Mouse.js | 83 - .../BrowserLib/Core/Code/MurmurHash3.js | 68 - .../BrowserLib/WindowManager/Code/Button.js | 131 - .../BrowserLib/WindowManager/Code/ComboBox.js | 237 - .../WindowManager/Code/Container.js | 34 - .../BrowserLib/WindowManager/Code/EditBox.js | 119 - .../BrowserLib/WindowManager/Code/Grid.js | 252 - .../BrowserLib/WindowManager/Code/Label.js | 31 - .../BrowserLib/WindowManager/Code/Treeview.js | 352 - .../WindowManager/Code/TreeviewItem.js | 109 - .../BrowserLib/WindowManager/Code/Window.js | 243 - .../WindowManager/Code/WindowManager.js | 54 - .../WindowManager/Styles/WindowManager.css | 546 - .../bgfx/3rdparty/remotery/vis/index.html | 55 - 3rdparty/bgfx/3rdparty/stb/stb_image.c | 6769 -------- 3rdparty/bgfx/3rdparty/stb/stb_rect_pack.h | 11 + 3rdparty/bgfx/3rdparty/stb/stb_truetype.h | 926 +- 3rdparty/bgfx/3rdparty/tinyexr/README.md | 274 - 3rdparty/bgfx/3rdparty/tinyexr/tinyexr.cc | 2 - 3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h | 12354 -------------- 3rdparty/bgfx/CMakeLists.txt | 28 +- 3rdparty/bgfx/LICENSE | 2 +- 3rdparty/bgfx/README.md | 90 +- 3rdparty/bgfx/examples/common/aviwriter.h | 2 +- 3rdparty/bgfx/examples/common/bgfx_utils.cpp | 68 +- 3rdparty/bgfx/examples/common/bgfx_utils.h | 12 +- 3rdparty/bgfx/examples/common/bounds.cpp | 316 +- 3rdparty/bgfx/examples/common/bounds.h | 44 +- 3rdparty/bgfx/examples/common/camera.cpp | 24 +- 3rdparty/bgfx/examples/common/common.h | 4 +- 3rdparty/bgfx/examples/common/common.sh | 2 +- 3rdparty/bgfx/examples/common/cube_atlas.cpp | 2 +- .../examples/common/debugdraw/debugdraw.cpp | 780 +- .../examples/common/debugdraw/debugdraw.h | 38 +- .../common/debugdraw/fs_debugdraw_fill.bin.h | 333 +- .../common/debugdraw/fs_debugdraw_fill.sc | 2 +- .../debugdraw/fs_debugdraw_fill_lit.bin.h | 657 +- .../common/debugdraw/fs_debugdraw_fill_lit.sc | 2 +- .../debugdraw/fs_debugdraw_fill_texture.bin.h | 319 + .../debugdraw/fs_debugdraw_fill_texture.sc | 15 + .../common/debugdraw/fs_debugdraw_lines.bin.h | 322 +- .../common/debugdraw/fs_debugdraw_lines.sc | 2 +- .../fs_debugdraw_lines_stipple.bin.h | 453 +- .../debugdraw/fs_debugdraw_lines_stipple.sc | 2 +- .../bgfx/examples/common/debugdraw/makefile | 2 +- .../common/debugdraw/vs_debugdraw_fill.bin.h | 476 +- .../common/debugdraw/vs_debugdraw_fill.sc | 2 +- .../debugdraw/vs_debugdraw_fill_lit.bin.h | 606 +- .../common/debugdraw/vs_debugdraw_fill_lit.sc | 2 +- .../vs_debugdraw_fill_lit_mesh.bin.h | 389 + .../debugdraw/vs_debugdraw_fill_lit_mesh.sc | 17 + .../debugdraw/vs_debugdraw_fill_mesh.bin.h | 294 + .../debugdraw/vs_debugdraw_fill_mesh.sc | 14 + .../debugdraw/vs_debugdraw_fill_texture.bin.h | 355 + .../debugdraw/vs_debugdraw_fill_texture.sc | 16 + .../common/debugdraw/vs_debugdraw_lines.bin.h | 450 +- .../common/debugdraw/vs_debugdraw_lines.sc | 2 +- .../vs_debugdraw_lines_stipple.bin.h | 534 +- .../debugdraw/vs_debugdraw_lines_stipple.sc | 2 +- 3rdparty/bgfx/examples/common/entry/cmd.cpp | 20 +- 3rdparty/bgfx/examples/common/entry/cmd.h | 4 +- 3rdparty/bgfx/examples/common/entry/dbg.cpp | 87 - 3rdparty/bgfx/examples/common/entry/dbg.h | 2 +- 3rdparty/bgfx/examples/common/entry/entry.cpp | 399 +- 3rdparty/bgfx/examples/common/entry/entry.h | 82 +- .../examples/common/entry/entry_android.cpp | 98 +- .../examples/common/entry/entry_asmjs.cpp | 10 +- .../bgfx/examples/common/entry/entry_glfw.cpp | 231 +- .../bgfx/examples/common/entry/entry_ios.mm | 43 +- .../bgfx/examples/common/entry/entry_nacl.cpp | 231 - .../bgfx/examples/common/entry/entry_noop.cpp | 10 +- .../bgfx/examples/common/entry/entry_osx.mm | 130 +- 3rdparty/bgfx/examples/common/entry/entry_p.h | 49 +- .../bgfx/examples/common/entry/entry_sdl.cpp | 83 +- .../examples/common/entry/entry_windows.cpp | 85 +- .../bgfx/examples/common/entry/entry_winrt.cx | 22 +- .../bgfx/examples/common/entry/entry_x11.cpp | 20 +- 3rdparty/bgfx/examples/common/entry/input.cpp | 2 +- 3rdparty/bgfx/examples/common/entry/input.h | 2 +- .../bgfx/examples/common/example-glue.cpp | 392 + .../examples/common/font/font_manager.cpp | 127 +- .../examples/common/font/fs_font_basic.bin.h | 661 +- .../common/font/fs_font_distance_field.bin.h | 798 +- .../fs_font_distance_field_subpixel.bin.h | 855 +- 3rdparty/bgfx/examples/common/font/makefile | 2 +- .../common/font/text_buffer_manager.cpp | 36 +- .../common/font/text_buffer_manager.h | 10 +- .../examples/common/font/vs_font_basic.bin.h | 515 +- .../common/font/vs_font_distance_field.bin.h | 515 +- .../vs_font_distance_field_subpixel.bin.h | 515 +- .../common/imgui/fs_imgui_color.bin.h | 322 +- .../examples/common/imgui/fs_imgui_color.sc | 2 +- .../common/imgui/fs_imgui_cubemap.bin.h | 561 +- .../examples/common/imgui/fs_imgui_cubemap.sc | 2 +- .../common/imgui/fs_imgui_image.bin.h | 564 +- .../common/imgui/fs_imgui_image_swizz.bin.h | 617 +- .../common/imgui/fs_imgui_latlong.bin.h | 703 +- .../common/imgui/fs_imgui_texture.bin.h | 532 +- .../examples/common/imgui/fs_imgui_texture.sc | 2 +- .../common/imgui/fs_ocornut_imgui.bin.h | 498 +- 3rdparty/bgfx/examples/common/imgui/imgui.cpp | 3835 +---- 3rdparty/bgfx/examples/common/imgui/imgui.h | 210 +- 3rdparty/bgfx/examples/common/imgui/makefile | 2 +- .../examples/common/imgui/ocornut_imgui.cpp | 451 - .../examples/common/imgui/ocornut_imgui.h | 18 - .../bgfx/examples/common/imgui/scintilla.cpp | 138 +- .../bgfx/examples/common/imgui/scintilla.h | 2 +- .../common/imgui/vs_imgui_color.bin.h | 450 +- .../examples/common/imgui/vs_imgui_color.sc | 2 +- .../common/imgui/vs_imgui_cubemap.bin.h | 456 +- .../examples/common/imgui/vs_imgui_cubemap.sc | 2 +- .../common/imgui/vs_imgui_image.bin.h | 454 +- .../common/imgui/vs_imgui_latlong.bin.h | 458 +- .../common/imgui/vs_imgui_texture.bin.h | 528 +- .../examples/common/imgui/vs_imgui_texture.sc | 2 +- .../common/imgui/vs_ocornut_imgui.bin.h | 565 +- .../common/nanovg/fs_nanovg_fill.bin.h | 1696 +- 3rdparty/bgfx/examples/common/nanovg/makefile | 2 +- .../bgfx/examples/common/nanovg/nanovg.cpp | 65 - 3rdparty/bgfx/examples/common/nanovg/nanovg.h | 8 - .../examples/common/nanovg/nanovg_bgfx.cpp | 325 +- .../bgfx/examples/common/nanovg/nanovg_bgfx.h | 49 +- .../common/nanovg/vs_nanovg_fill.bin.h | 558 +- 3rdparty/bgfx/examples/common/packrect.h | 2 +- .../bgfx/examples/common/ps/fs_particle.bin.h | 395 + .../bgfx/examples/common/ps/fs_particle.sc | 19 + 3rdparty/bgfx/examples/common/ps/makefile | 9 + .../examples/common/ps/particle_system.cpp | 757 + .../bgfx/examples/common/ps/particle_system.h | 106 + .../bgfx/examples/common/ps/varying.def.sc | 6 + .../bgfx/examples/common/ps/vs_particle.bin.h | 352 + .../bgfx/examples/common/ps/vs_particle.sc | 16 + 3rdparty/bgfx/examples/common/shaderlib.sh | 2 +- 3rdparty/bgfx/examples/makefile | 5 +- 3rdparty/bgfx/include/bgfx/bgfx.h | 1558 +- 3rdparty/bgfx/include/bgfx/c99/bgfx.h | 278 +- 3rdparty/bgfx/include/bgfx/c99/platform.h | 101 +- 3rdparty/bgfx/include/bgfx/defines.h | 305 +- 3rdparty/bgfx/include/bgfx/embedded_shader.h | 19 +- 3rdparty/bgfx/include/bgfx/platform.h | 26 +- 3rdparty/bgfx/makefile | 123 +- 3rdparty/bgfx/scripts/bgfx.lua | 24 +- 3rdparty/bgfx/scripts/bgfx.pc | 11 - 3rdparty/bgfx/scripts/common.ninja | 26 - 3rdparty/bgfx/scripts/example-common.lua | 23 +- 3rdparty/bgfx/scripts/genie.lua | 220 +- 3rdparty/bgfx/scripts/geometryc.lua | 12 +- 3rdparty/bgfx/scripts/shader-embeded.mk | 2 +- 3rdparty/bgfx/scripts/shader.mk | 14 +- 3rdparty/bgfx/scripts/shaderc.lua | 14 +- 3rdparty/bgfx/scripts/texturec.lua | 11 +- 3rdparty/bgfx/scripts/texturev.lua | 3 +- 3rdparty/bgfx/scripts/tools.mk | 2 +- 3rdparty/bgfx/src/amalgamated.cpp | 10 +- 3rdparty/bgfx/src/amalgamated.mm | 2 +- 3rdparty/bgfx/src/bgfx.cpp | 1941 ++- 3rdparty/bgfx/src/bgfx_compute.sh | 364 +- 3rdparty/bgfx/src/bgfx_p.h | 2253 +-- 3rdparty/bgfx/src/bgfx_shader.sh | 18 +- 3rdparty/bgfx/src/charset.h | 2 +- 3rdparty/bgfx/src/config.h | 101 +- 3rdparty/bgfx/src/debug_renderdoc.cpp | 34 +- 3rdparty/bgfx/src/debug_renderdoc.h | 2 +- 3rdparty/bgfx/src/fs_clear0.bin.h | 268 +- 3rdparty/bgfx/src/fs_clear0.sc | 2 +- 3rdparty/bgfx/src/fs_clear1.bin.h | 308 +- 3rdparty/bgfx/src/fs_clear1.sc | 2 +- 3rdparty/bgfx/src/fs_clear2.bin.h | 346 +- 3rdparty/bgfx/src/fs_clear2.sc | 2 +- 3rdparty/bgfx/src/fs_clear3.bin.h | 381 +- 3rdparty/bgfx/src/fs_clear3.sc | 2 +- 3rdparty/bgfx/src/fs_clear4.bin.h | 403 +- 3rdparty/bgfx/src/fs_clear4.sc | 2 +- 3rdparty/bgfx/src/fs_clear5.bin.h | 436 +- 3rdparty/bgfx/src/fs_clear5.sc | 2 +- 3rdparty/bgfx/src/fs_clear6.bin.h | 466 +- 3rdparty/bgfx/src/fs_clear6.sc | 2 +- 3rdparty/bgfx/src/fs_clear7.bin.h | 505 +- 3rdparty/bgfx/src/fs_clear7.sc | 2 +- 3rdparty/bgfx/src/fs_debugfont.bin.h | 502 +- 3rdparty/bgfx/src/fs_debugfont.sc | 2 +- 3rdparty/bgfx/src/glcontext_eagl.h | 2 +- 3rdparty/bgfx/src/glcontext_eagl.mm | 15 +- 3rdparty/bgfx/src/glcontext_egl.cpp | 2 +- 3rdparty/bgfx/src/glcontext_egl.h | 2 +- 3rdparty/bgfx/src/glcontext_glx.cpp | 2 +- 3rdparty/bgfx/src/glcontext_glx.h | 2 +- 3rdparty/bgfx/src/glcontext_nsgl.h | 2 +- 3rdparty/bgfx/src/glcontext_nsgl.mm | 2 +- 3rdparty/bgfx/src/glcontext_ppapi.cpp | 254 - 3rdparty/bgfx/src/glcontext_ppapi.h | 43 - 3rdparty/bgfx/src/glcontext_wgl.cpp | 2 +- 3rdparty/bgfx/src/glcontext_wgl.h | 2 +- 3rdparty/bgfx/src/glimports.h | 2 +- 3rdparty/bgfx/src/hmd.cpp | 2 +- 3rdparty/bgfx/src/hmd.h | 4 +- 3rdparty/bgfx/src/hmd_openvr.cpp | 2 +- 3rdparty/bgfx/src/hmd_openvr.h | 2 +- 3rdparty/bgfx/src/hmd_ovr.cpp | 2 +- 3rdparty/bgfx/src/hmd_ovr.h | 28 +- 3rdparty/bgfx/src/makefile | 2 +- 3rdparty/bgfx/src/nvapi.cpp | 188 + 3rdparty/bgfx/src/nvapi.h | 46 + 3rdparty/bgfx/src/renderer.h | 157 +- 3rdparty/bgfx/src/renderer_d3d.h | 22 +- 3rdparty/bgfx/src/renderer_d3d11.cpp | 1544 +- 3rdparty/bgfx/src/renderer_d3d11.h | 114 +- 3rdparty/bgfx/src/renderer_d3d12.cpp | 2085 ++- 3rdparty/bgfx/src/renderer_d3d12.h | 123 +- 3rdparty/bgfx/src/renderer_d3d9.cpp | 956 +- 3rdparty/bgfx/src/renderer_d3d9.h | 108 +- 3rdparty/bgfx/src/renderer_gl.cpp | 2782 ++-- 3rdparty/bgfx/src/renderer_gl.h | 341 +- 3rdparty/bgfx/src/renderer_gnm.cpp | 5 +- 3rdparty/bgfx/src/renderer_mtl.h | 38 +- 3rdparty/bgfx/src/renderer_mtl.mm | 965 +- 3rdparty/bgfx/src/renderer_noop.cpp | 100 +- 3rdparty/bgfx/src/renderer_vk.cpp | 417 +- 3rdparty/bgfx/src/renderer_vk.h | 2 +- 3rdparty/bgfx/src/shader.cpp | 13 +- 3rdparty/bgfx/src/shader.h | 2 +- 3rdparty/bgfx/src/shader_dx9bc.cpp | 26 +- 3rdparty/bgfx/src/shader_dx9bc.h | 2 +- 3rdparty/bgfx/src/shader_dxbc.cpp | 63 +- 3rdparty/bgfx/src/shader_dxbc.h | 40 +- 3rdparty/bgfx/src/shader_spirv.cpp | 2 +- 3rdparty/bgfx/src/shader_spirv.h | 2 +- 3rdparty/bgfx/src/topology.cpp | 50 +- 3rdparty/bgfx/src/topology.h | 2 +- 3rdparty/bgfx/src/vertexdecl.cpp | 119 +- 3rdparty/bgfx/src/vertexdecl.h | 2 +- 3rdparty/bgfx/src/vs_clear.bin.h | 215 +- 3rdparty/bgfx/src/vs_clear.sc | 2 +- 3rdparty/bgfx/src/vs_debugfont.bin.h | 518 +- 3rdparty/bgfx/src/vs_debugfont.sc | 2 +- 3rdparty/bgfx/tools/geometryc/geometryc.cpp | 204 +- 3rdparty/bgfx/tools/shaderc/shaderc.cpp | 2178 +-- 3rdparty/bgfx/tools/shaderc/shaderc.h | 89 +- 3rdparty/bgfx/tools/shaderc/shaderc_glsl.cpp | 88 +- 3rdparty/bgfx/tools/shaderc/shaderc_hlsl.cpp | 103 +- 3rdparty/bgfx/tools/shaderc/shaderc_pssl.cpp | 6 +- 3rdparty/bgfx/tools/shaderc/shaderc_spirv.cpp | 55 +- 3rdparty/bgfx/tools/texturec/texturec.cpp | 427 - 3rdparty/bgfx/tools/texturev/common.sh | 28 + 3rdparty/bgfx/tools/texturev/fs_texture.bin.h | 600 +- 3rdparty/bgfx/tools/texturev/fs_texture.sc | 11 +- .../bgfx/tools/texturev/fs_texture_3d.bin.h | 567 + 3rdparty/bgfx/tools/texturev/fs_texture_3d.sc | 16 + .../tools/texturev/fs_texture_array.bin.h | 631 +- .../bgfx/tools/texturev/fs_texture_array.sc | 12 +- .../bgfx/tools/texturev/fs_texture_cube.bin.h | 793 +- .../bgfx/tools/texturev/fs_texture_cube.sc | 13 +- .../tools/texturev/fs_texture_cube2.bin.h | 544 + .../bgfx/tools/texturev/fs_texture_cube2.sc | 16 + .../bgfx/tools/texturev/fs_texture_msdf.bin.h | 491 + .../bgfx/tools/texturev/fs_texture_msdf.sc | 25 + .../bgfx/tools/texturev/fs_texture_sdf.bin.h | 426 + .../bgfx/tools/texturev/fs_texture_sdf.sc | 20 + 3rdparty/bgfx/tools/texturev/makefile | 2 +- 3rdparty/bgfx/tools/texturev/texturev.cpp | 1609 +- 3rdparty/bgfx/tools/texturev/varying.def.sc | 8 +- 3rdparty/bgfx/tools/texturev/vs_texture.bin.h | 482 +- 3rdparty/bgfx/tools/texturev/vs_texture.sc | 4 +- .../bgfx/tools/texturev/vs_texture_cube.bin.h | 431 +- .../bgfx/tools/texturev/vs_texture_cube.sc | 2 +- 3rdparty/bimg/.appveyor.yml | 20 + 3rdparty/bimg/.editorconfig | 19 + 3rdparty/bimg/.gitattributes | 11 + 3rdparty/bimg/.gitignore | 7 + 3rdparty/bimg/.travis.yml | 32 + 3rdparty/bimg/3rdparty/nvtt/nvcore/nvcore.h | 6 + 3rdparty/bimg/3rdparty/nvtt/nvcore/posh.h | 9 +- 3rdparty/bimg/3rdparty/nvtt/nvtt.cpp | 63 +- 3rdparty/bimg/3rdparty/stb/stb_image.h | 6 + 3rdparty/bimg/3rdparty/tinyexr/tinyexr.h | 6 + 3rdparty/bimg/CMakeLists.txt | 1 + 3rdparty/bimg/LICENSE | 2 +- 3rdparty/bimg/README.md | 6 +- 3rdparty/bimg/include/bimg/bimg.h | 129 +- 3rdparty/bimg/include/bimg/decode.h | 5 +- 3rdparty/bimg/include/bimg/encode.h | 116 +- 3rdparty/bimg/makefile | 58 +- 3rdparty/bimg/scripts/bimg.lua | 14 +- 3rdparty/bimg/scripts/bimg_decode.lua | 3 +- 3rdparty/bimg/scripts/bimg_encode.lua | 3 +- 3rdparty/bimg/scripts/genie.lua | 4 +- 3rdparty/bimg/scripts/texturec.lua | 4 +- 3rdparty/bimg/src/bimg_p.h | 16 +- 3rdparty/bimg/src/image.cpp | 1769 +- 3rdparty/bimg/src/image_decode.cpp | 473 +- 3rdparty/bimg/src/image_encode.cpp | 637 +- 3rdparty/bimg/src/image_gnf.cpp | 37 + 3rdparty/bimg/tools/texturec/texturec.cpp | 1131 +- 3rdparty/bx/.appveyor.yml | 6 +- 3rdparty/bx/.travis.yml | 15 +- 3rdparty/bx/3rdparty/.editorconfig | 6 + 3rdparty/bx/3rdparty/CL/cl.h | 1214 -- 3rdparty/bx/3rdparty/CL/cl_d3d10.h | 126 - 3rdparty/bx/3rdparty/CL/cl_d3d11.h | 126 - .../bx/3rdparty/CL/cl_dx9_media_sharing.h | 127 - 3rdparty/bx/3rdparty/CL/cl_egl.h | 131 - 3rdparty/bx/3rdparty/CL/cl_ext.h | 306 - 3rdparty/bx/3rdparty/CL/cl_gl.h | 162 - 3rdparty/bx/3rdparty/CL/cl_gl_ext.h | 69 - 3rdparty/bx/3rdparty/CL/cl_platform.h | 1254 -- 3rdparty/bx/3rdparty/CL/opencl.h | 54 - 3rdparty/bx/3rdparty/ini/README.md | 1 + 3rdparty/bx/3rdparty/ini/ini.h | 1054 ++ 3rdparty/bx/3rdparty/ini/ini.md | 333 + 3rdparty/bx/LICENSE | 2 +- 3rdparty/bx/README.md | 6 +- 3rdparty/bx/include/bx/allocator.h | 49 +- 3rdparty/bx/include/bx/bx.h | 43 +- 3rdparty/bx/include/bx/cl.h | 925 -- 3rdparty/bx/include/bx/commandline.h | 8 +- 3rdparty/bx/include/bx/config.h | 24 +- 3rdparty/bx/include/bx/cpu.h | 318 +- 3rdparty/bx/include/bx/crtimpl.h | 149 - 3rdparty/bx/include/bx/debug.h | 5 +- 3rdparty/bx/include/bx/easing.h | 1005 +- 3rdparty/bx/include/bx/endian.h | 2 +- 3rdparty/bx/include/bx/error.h | 4 +- 3rdparty/bx/include/bx/file.h | 98 + 3rdparty/bx/include/bx/filepath.h | 114 + 3rdparty/bx/include/bx/float4x4_t.h | 148 +- 3rdparty/bx/include/bx/foreach.h | 71 - 3rdparty/bx/include/bx/handlealloc.h | 14 +- 3rdparty/bx/include/bx/hash.h | 80 +- 3rdparty/bx/include/bx/inline/allocator.inl | 11 +- 3rdparty/bx/include/bx/inline/bx.inl | 50 +- 3rdparty/bx/include/bx/inline/cpu.inl | 351 + 3rdparty/bx/include/bx/inline/easing.inl | 24 +- 3rdparty/bx/include/bx/inline/endian.inl | 2 +- 3rdparty/bx/include/bx/inline/error.inl | 2 +- 3rdparty/bx/include/bx/inline/float4x4_t.inl | 150 + 3rdparty/bx/include/bx/inline/fpumath.inl | 1352 -- 3rdparty/bx/include/bx/inline/handlealloc.inl | 68 +- 3rdparty/bx/include/bx/inline/hash.inl | 69 +- 3rdparty/bx/include/bx/inline/math.inl | 945 ++ 3rdparty/bx/include/bx/inline/mpscqueue.inl | 8 +- 3rdparty/bx/include/bx/inline/mutex.inl | 2 +- 3rdparty/bx/include/bx/inline/pixelformat.inl | 38 +- .../bx/include/bx/inline/readerwriter.inl | 44 +- 3rdparty/bx/include/bx/inline/ringbuffer.inl | 2 +- 3rdparty/bx/include/bx/inline/rng.inl | 43 +- .../bx/include/bx/inline/simd128_langext.inl | 299 +- .../bx/include/bx/inline/simd128_neon.inl | 252 +- 3rdparty/bx/include/bx/inline/simd128_ref.inl | 320 +- 3rdparty/bx/include/bx/inline/simd128_sse.inl | 39 +- .../bx/include/bx/inline/simd128_swizzle.inl | 2 +- 3rdparty/bx/include/bx/inline/simd256_avx.inl | 11 +- 3rdparty/bx/include/bx/inline/simd256_ref.inl | 11 +- 3rdparty/bx/include/bx/inline/simd_ni.inl | 7 +- 3rdparty/bx/include/bx/inline/sort.inl | 2 +- 3rdparty/bx/include/bx/inline/spscqueue.inl | 24 +- 3rdparty/bx/include/bx/inline/string.inl | 53 +- 3rdparty/bx/include/bx/inline/uint32_t.inl | 12 +- 3rdparty/bx/include/bx/macros.h | 31 +- 3rdparty/bx/include/bx/maputil.h | 2 +- 3rdparty/bx/include/bx/{fpumath.h => math.h} | 420 +- 3rdparty/bx/include/bx/mpscqueue.h | 7 +- 3rdparty/bx/include/bx/mutex.h | 2 +- 3rdparty/bx/include/bx/os.h | 25 +- 3rdparty/bx/include/bx/pixelformat.h | 13 +- 3rdparty/bx/include/bx/platform.h | 54 +- 3rdparty/bx/include/bx/process.h | 109 +- 3rdparty/bx/include/bx/radixsort.h | 291 - 3rdparty/bx/include/bx/readerwriter.h | 66 +- 3rdparty/bx/include/bx/ringbuffer.h | 2 +- 3rdparty/bx/include/bx/rng.h | 22 +- 3rdparty/bx/include/bx/sem.h | 266 - 3rdparty/bx/include/bx/semaphore.h | 2 +- 3rdparty/bx/include/bx/settings.h | 61 + 3rdparty/bx/include/bx/simd128_langext.inl | 515 - 3rdparty/bx/include/bx/simd128_neon.inl | 562 - 3rdparty/bx/include/bx/simd128_ref.inl | 650 - 3rdparty/bx/include/bx/simd128_sse.inl | 647 - 3rdparty/bx/include/bx/simd128_swizzle.inl | 266 - 3rdparty/bx/include/bx/simd256_avx.inl | 45 - 3rdparty/bx/include/bx/simd256_ref.inl | 51 - 3rdparty/bx/include/bx/simd_ni.inl | 558 - 3rdparty/bx/include/bx/simd_t.h | 350 +- 3rdparty/bx/include/bx/sort.h | 2 +- 3rdparty/bx/include/bx/spscqueue.h | 14 +- 3rdparty/bx/include/bx/string.h | 161 +- 3rdparty/bx/include/bx/thread.h | 15 +- 3rdparty/bx/include/bx/timer.h | 2 +- 3rdparty/bx/include/bx/tokenizecmd.h | 146 - 3rdparty/bx/include/bx/uint32_t.h | 2 +- 3rdparty/bx/include/bx/url.h | 52 + 3rdparty/bx/include/compat/mingw/sal.h | 892 +- 3rdparty/bx/include/compat/mingw/salieri.h | 1607 ++ 3rdparty/bx/include/compat/msvc/dirent.h | 4 +- 3rdparty/bx/include/compat/nacl/memory.h | 1 - 3rdparty/bx/makefile | 77 +- 3rdparty/bx/scripts/bin2c.lua | 7 +- 3rdparty/bx/scripts/bx.lua | 24 +- 3rdparty/bx/scripts/genie.lua | 35 +- 3rdparty/bx/scripts/lemon.lua | 21 + 3rdparty/bx/scripts/toolchain.lua | 320 +- 3rdparty/bx/scripts/uncrustify.cfg | 218 - 3rdparty/bx/src/allocator.cpp | 75 + 3rdparty/bx/src/amalgamated.cpp | 15 +- 3rdparty/bx/src/bx.cpp | 3 +- 3rdparty/bx/src/bx_p.h | 44 + 3rdparty/bx/src/commandline.cpp | 31 +- 3rdparty/bx/src/crtimpl.cpp | 361 - 3rdparty/bx/src/crtnone.cpp | 99 +- 3rdparty/bx/src/debug.cpp | 50 +- 3rdparty/bx/src/dtoa.cpp | 670 +- 3rdparty/bx/src/easing.cpp | 64 + 3rdparty/bx/src/file.cpp | 407 + 3rdparty/bx/src/filepath.cpp | 569 + 3rdparty/bx/src/fpumath.cpp | 166 - 3rdparty/bx/src/hash.cpp | 151 + 3rdparty/bx/src/math.cpp | 920 + 3rdparty/bx/src/mutex.cpp | 13 +- 3rdparty/bx/src/os.cpp | 258 +- 3rdparty/bx/src/process.cpp | 169 + 3rdparty/bx/src/semaphore.cpp | 187 +- 3rdparty/bx/src/settings.cpp | 214 + 3rdparty/bx/src/sort.cpp | 3 +- 3rdparty/bx/src/string.cpp | 438 +- 3rdparty/bx/src/thread.cpp | 39 +- 3rdparty/bx/src/timer.cpp | 11 +- 3rdparty/bx/src/url.cpp | 158 + 3rdparty/bx/tests/atomic_test.cpp | 46 + 3rdparty/bx/tests/crt_test.cpp | 43 + 3rdparty/bx/tests/dbg.cpp | 87 - 3rdparty/bx/tests/dbg.h | 2 +- 3rdparty/bx/tests/easing_test.cpp | 58 + 3rdparty/bx/tests/filepath_test.cpp | 136 + 3rdparty/bx/tests/fpumath.cpp | 76 - 3rdparty/bx/tests/fpumath_test.cpp | 96 - 3rdparty/bx/tests/handle.cpp | 79 - 3rdparty/bx/tests/handle_bench.cpp | 7 +- 3rdparty/bx/tests/handle_test.cpp | 12 +- 3rdparty/bx/tests/hash_test.cpp | 79 + 3rdparty/bx/tests/macros.cpp | 55 - 3rdparty/bx/tests/macros_test.cpp | 4 +- 3rdparty/bx/tests/main.cpp | 48 - 3rdparty/bx/tests/main_test.cpp | 21 +- 3rdparty/bx/tests/math_bench.cpp | 78 + 3rdparty/bx/tests/math_test.cpp | 222 + 3rdparty/bx/tests/misc.cpp | 8 - 3rdparty/bx/tests/misc_test.cpp | 8 - 3rdparty/bx/tests/os_test.cpp | 28 + 3rdparty/bx/tests/queue_test.cpp | 36 + 3rdparty/bx/tests/ringbuffer_test.cpp | 20 + 3rdparty/bx/tests/rng_test.cpp | 88 + 3rdparty/bx/tests/run_test.cpp | 20 + 3rdparty/bx/tests/settings_test.cpp | 49 + 3rdparty/bx/tests/simd_bench.cpp | 133 + 3rdparty/bx/tests/simd_t.cpp | 439 - 3rdparty/bx/tests/simd_test.cpp | 35 +- 3rdparty/bx/tests/sort_test.cpp | 53 + 3rdparty/bx/tests/string_test.cpp | 316 +- 3rdparty/bx/tests/test.h | 2 +- 3rdparty/bx/tests/thread.cpp | 38 - 3rdparty/bx/tests/thread_test.cpp | 43 +- 3rdparty/bx/tests/tokenizecmd.cpp | 92 - 3rdparty/bx/tests/tokenizecmd_test.cpp | 20 +- 3rdparty/bx/tests/uint32_t.cpp | 52 - 3rdparty/bx/tests/uint32_test.cpp | 2 +- 3rdparty/bx/tests/unordered_map_nonpod.cpp | 41 - 3rdparty/bx/tests/unordered_set_copyctor.cpp | 42 - 3rdparty/bx/tests/unordered_set_pod.cpp | 38 - 3rdparty/bx/tests/url_test.cpp | 69 + 3rdparty/bx/tests/vector_complex.cpp | 266 - 3rdparty/bx/tests/vector_header.cpp | 29 - 3rdparty/bx/tests/vector_nocopy.cpp | 229 - 3rdparty/bx/tests/vector_nodefault.cpp | 262 - 3rdparty/bx/tests/vector_primitive.cpp | 245 - 3rdparty/bx/tests/vector_shrinktofit.cpp | 68 - 3rdparty/bx/tests/vsnprintf_test.cpp | 167 + 3rdparty/bx/tools/bin/darwin/bin2c | Bin 25572 -> 113544 bytes 3rdparty/bx/tools/bin/darwin/genie | Bin 500152 -> 516536 bytes 3rdparty/bx/tools/bin/darwin/lemon | Bin 0 -> 95148 bytes 3rdparty/bx/tools/bin/darwin/lempar.c | 981 ++ 3rdparty/bx/tools/bin/linux/bin2c | Bin 135938 -> 68272 bytes 3rdparty/bx/tools/bin/linux/genie | Bin 478872 -> 499272 bytes 3rdparty/bx/tools/bin/linux/lemon | Bin 0 -> 80952 bytes 3rdparty/bx/tools/bin/linux/lempar.c | 981 ++ 3rdparty/bx/tools/bin/windows/bin2c.exe | Bin 818437 -> 859136 bytes 3rdparty/bx/tools/bin/windows/genie.exe | Bin 486400 -> 504832 bytes 3rdparty/bx/tools/bin/windows/lemon.exe | Bin 0 -> 99840 bytes 3rdparty/bx/tools/bin/windows/lempar.c | 981 ++ 3rdparty/bx/tools/bin2c/bin2c.cpp | 35 +- 3rdparty/bx/tools/lemon/lemon.c | 5466 ++++++ 3rdparty/bx/tools/lemon/lempar.c | 981 ++ 3rdparty/imgui_dock/imgui_dock.cpp | 1150 ++ 3rdparty/imgui_dock/imgui_dock.h | 33 + CMakeLists.txt | 8 +- src/main.cc | 2 - src/modules/CharacterModule.cc | 224 +- src/modules/RenderModule.cc | 274 +- src/modules/RenderModule.h | 4 +- src/modules/RenderUtils.cc | 44 +- src/modules/TestModule.cc | 4 +- tests/CMakeLists.txt | 3 +- tests/RenderModuleTests.cc | 2 +- tests/TestUtils.h | 5 +- 1274 files changed, 119249 insertions(+), 146419 deletions(-) delete mode 100644 3rdparty/bgfx/3rdparty/edtaa3/edtaa3func.cpp delete mode 100644 3rdparty/bgfx/3rdparty/edtaa3/edtaa3func.h delete mode 100644 3rdparty/bgfx/3rdparty/etc1/LICENSE delete mode 100644 3rdparty/bgfx/3rdparty/etc1/etc1.cpp delete mode 100644 3rdparty/bgfx/3rdparty/etc1/etc1.h delete mode 100644 3rdparty/bgfx/3rdparty/etc2/LICENSE.txt delete mode 100644 3rdparty/bgfx/3rdparty/etc2/Math.hpp delete mode 100644 3rdparty/bgfx/3rdparty/etc2/ProcessCommon.hpp delete mode 100644 3rdparty/bgfx/3rdparty/etc2/ProcessRGB.cpp delete mode 100644 3rdparty/bgfx/3rdparty/etc2/ProcessRGB.hpp delete mode 100644 3rdparty/bgfx/3rdparty/etc2/Tables.cpp delete mode 100644 3rdparty/bgfx/3rdparty/etc2/Tables.hpp delete mode 100644 3rdparty/bgfx/3rdparty/etc2/Types.hpp delete mode 100644 3rdparty/bgfx/3rdparty/etc2/Vector.hpp create mode 100644 3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.EXT.h create mode 100644 3rdparty/bgfx/3rdparty/glslang/StandAlone/DirStackFileIncluder.h create mode 100644 3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/attribute.cpp create mode 100644 3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/attribute.h delete mode 100644 3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp delete mode 100644 3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp create mode 100644 3rdparty/bgfx/3rdparty/glslang/known_good.json create mode 100755 3rdparty/bgfx/3rdparty/glslang/update_glslang_sources.py delete mode 100644 3rdparty/bgfx/3rdparty/iqa/LICENSE delete mode 100644 3rdparty/bgfx/3rdparty/iqa/README.txt delete mode 100644 3rdparty/bgfx/3rdparty/iqa/include/convolve.h delete mode 100644 3rdparty/bgfx/3rdparty/iqa/include/decimate.h delete mode 100644 3rdparty/bgfx/3rdparty/iqa/include/iqa.h delete mode 100644 3rdparty/bgfx/3rdparty/iqa/include/iqa_os.h delete mode 100644 3rdparty/bgfx/3rdparty/iqa/include/math_utils.h delete mode 100644 3rdparty/bgfx/3rdparty/iqa/include/ssim.h delete mode 100644 3rdparty/bgfx/3rdparty/iqa/source/convolve.c delete mode 100644 3rdparty/bgfx/3rdparty/iqa/source/decimate.c delete mode 100644 3rdparty/bgfx/3rdparty/iqa/source/math_utils.c delete mode 100644 3rdparty/bgfx/3rdparty/iqa/source/ms_ssim.c delete mode 100644 3rdparty/bgfx/3rdparty/iqa/source/mse.c delete mode 100644 3rdparty/bgfx/3rdparty/iqa/source/psnr.c delete mode 100644 3rdparty/bgfx/3rdparty/iqa/source/ssim.c delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/LICENSE delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/README delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/alpha.cpp delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/alpha.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/clusterfit.cpp delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/clusterfit.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/colourblock.cpp delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/colourblock.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/colourfit.cpp delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/colourfit.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/colourset.cpp delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/colourset.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/config.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/maths.cpp delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/maths.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/rangefit.cpp delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/rangefit.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/simd.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/simd_float.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/singlecolourfit.cpp delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/singlecolourfit.h delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/singlecolourlookup.inl delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/squish.cpp delete mode 100644 3rdparty/bgfx/3rdparty/libsquish/squish.h delete mode 100644 3rdparty/bgfx/3rdparty/lodepng/README.md delete mode 100644 3rdparty/bgfx/3rdparty/lodepng/lodepng.cpp delete mode 100644 3rdparty/bgfx/3rdparty/lodepng/lodepng.h rename 3rdparty/bgfx/3rdparty/{edtaa3/LICENSE.md => mtlpp/LICENSE} (58%) create mode 100644 3rdparty/bgfx/3rdparty/mtlpp/mtlpp.hpp create mode 100644 3rdparty/bgfx/3rdparty/mtlpp/mtlpp.mm delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/NVIDIA_Texture_Tools_LICENSE.txt delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc6h/bits.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc6h/shapes_two.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc6h/tile.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh_utils.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh_utils.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc6h/zohone.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc6h/zohtwo.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode0.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode1.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode2.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode3.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode4.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode5.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode6.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode7.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_utils.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_utils.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/bits.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/endpts.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/shapes_three.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/shapes_two.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/bc7/tile.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/array.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/array.inl delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/debug.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucdarwin.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnuclinux.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucwin32.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/defsvcwin32.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/foreach.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/hash.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/memory.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/nvcore.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/posh.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/stdstream.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/stream.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/strlib.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvcore/utils.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvmath/fitting.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvmath/fitting.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvmath/matrix.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvmath/matrix.inl delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvmath/nvmath.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvmath/plane.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvmath/plane.inl delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvmath/vector.h delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvmath/vector.inl delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvtt.cpp delete mode 100644 3rdparty/bgfx/3rdparty/nvtt/nvtt.h delete mode 100644 3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_node_graph_test.cpp delete mode 100644 3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp delete mode 100644 3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.h create mode 100644 3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_wheel.h create mode 100644 3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_wheel.inl delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/AlphaBitmap.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/BitScale.cpp delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/BitScale.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/BitUtility.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/Bitmap.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/ColorRgba.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/Interval.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/LICENSE.TXT delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/MortonTable.cpp delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/MortonTable.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/Point2.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/PvrTcDecoder.cpp delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/PvrTcDecoder.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/PvrTcEncoder.cpp delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/PvrTcEncoder.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/PvrTcPacket.cpp delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/PvrTcPacket.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/README.md delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/RgbBitmap.h delete mode 100644 3rdparty/bgfx/3rdparty/pvrtc/RgbaBitmap.h delete mode 100644 3rdparty/bgfx/3rdparty/remotery/LICENSE delete mode 100644 3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c delete mode 100644 3rdparty/bgfx/3rdparty/remotery/lib/Remotery.h delete mode 100644 3rdparty/bgfx/3rdparty/remotery/readme.md delete mode 100644 3rdparty/bgfx/3rdparty/remotery/sample/sample.c delete mode 100644 3rdparty/bgfx/3rdparty/remotery/screenshot.png delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/Code/Console.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/Code/PixelTimeRange.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/Code/Remotery.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/Code/SampleWindow.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/Code/ThreadFrame.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/Code/TimelineRow.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/Code/TimelineWindow.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/Code/TitleWindow.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/Code/WebSocketConnection.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/Styles/Remotery.css delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Animation.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Bind.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Convert.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Core.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/DOM.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Keyboard.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/LocalStore.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Mouse.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/MurmurHash3.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Button.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/ComboBox.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Container.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/EditBox.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Grid.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Label.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Treeview.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/TreeviewItem.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Window.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/WindowManager.js delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Styles/WindowManager.css delete mode 100644 3rdparty/bgfx/3rdparty/remotery/vis/index.html delete mode 100644 3rdparty/bgfx/3rdparty/stb/stb_image.c delete mode 100644 3rdparty/bgfx/3rdparty/tinyexr/README.md delete mode 100644 3rdparty/bgfx/3rdparty/tinyexr/tinyexr.cc delete mode 100644 3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h create mode 100644 3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_texture.bin.h create mode 100644 3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_texture.sc create mode 100644 3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit_mesh.bin.h create mode 100644 3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit_mesh.sc create mode 100644 3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_mesh.bin.h create mode 100644 3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_mesh.sc create mode 100644 3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_texture.bin.h create mode 100644 3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_texture.sc delete mode 100644 3rdparty/bgfx/examples/common/entry/dbg.cpp delete mode 100644 3rdparty/bgfx/examples/common/entry/entry_nacl.cpp create mode 100644 3rdparty/bgfx/examples/common/example-glue.cpp delete mode 100644 3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp delete mode 100644 3rdparty/bgfx/examples/common/imgui/ocornut_imgui.h create mode 100644 3rdparty/bgfx/examples/common/ps/fs_particle.bin.h create mode 100644 3rdparty/bgfx/examples/common/ps/fs_particle.sc create mode 100644 3rdparty/bgfx/examples/common/ps/makefile create mode 100644 3rdparty/bgfx/examples/common/ps/particle_system.cpp create mode 100644 3rdparty/bgfx/examples/common/ps/particle_system.h create mode 100644 3rdparty/bgfx/examples/common/ps/varying.def.sc create mode 100644 3rdparty/bgfx/examples/common/ps/vs_particle.bin.h create mode 100644 3rdparty/bgfx/examples/common/ps/vs_particle.sc delete mode 100644 3rdparty/bgfx/scripts/bgfx.pc delete mode 100644 3rdparty/bgfx/scripts/common.ninja delete mode 100644 3rdparty/bgfx/src/glcontext_ppapi.cpp delete mode 100644 3rdparty/bgfx/src/glcontext_ppapi.h create mode 100644 3rdparty/bgfx/src/nvapi.cpp create mode 100644 3rdparty/bgfx/src/nvapi.h delete mode 100644 3rdparty/bgfx/tools/texturec/texturec.cpp create mode 100644 3rdparty/bgfx/tools/texturev/common.sh create mode 100644 3rdparty/bgfx/tools/texturev/fs_texture_3d.bin.h create mode 100644 3rdparty/bgfx/tools/texturev/fs_texture_3d.sc create mode 100644 3rdparty/bgfx/tools/texturev/fs_texture_cube2.bin.h create mode 100644 3rdparty/bgfx/tools/texturev/fs_texture_cube2.sc create mode 100644 3rdparty/bgfx/tools/texturev/fs_texture_msdf.bin.h create mode 100644 3rdparty/bgfx/tools/texturev/fs_texture_msdf.sc create mode 100644 3rdparty/bgfx/tools/texturev/fs_texture_sdf.bin.h create mode 100644 3rdparty/bgfx/tools/texturev/fs_texture_sdf.sc create mode 100644 3rdparty/bimg/.appveyor.yml create mode 100644 3rdparty/bimg/.editorconfig create mode 100644 3rdparty/bimg/.gitattributes create mode 100644 3rdparty/bimg/.gitignore create mode 100644 3rdparty/bimg/.travis.yml create mode 100644 3rdparty/bimg/src/image_gnf.cpp create mode 100644 3rdparty/bx/3rdparty/.editorconfig delete mode 100644 3rdparty/bx/3rdparty/CL/cl.h delete mode 100644 3rdparty/bx/3rdparty/CL/cl_d3d10.h delete mode 100644 3rdparty/bx/3rdparty/CL/cl_d3d11.h delete mode 100644 3rdparty/bx/3rdparty/CL/cl_dx9_media_sharing.h delete mode 100644 3rdparty/bx/3rdparty/CL/cl_egl.h delete mode 100644 3rdparty/bx/3rdparty/CL/cl_ext.h delete mode 100644 3rdparty/bx/3rdparty/CL/cl_gl.h delete mode 100644 3rdparty/bx/3rdparty/CL/cl_gl_ext.h delete mode 100644 3rdparty/bx/3rdparty/CL/cl_platform.h delete mode 100644 3rdparty/bx/3rdparty/CL/opencl.h create mode 100644 3rdparty/bx/3rdparty/ini/README.md create mode 100644 3rdparty/bx/3rdparty/ini/ini.h create mode 100644 3rdparty/bx/3rdparty/ini/ini.md delete mode 100644 3rdparty/bx/include/bx/cl.h delete mode 100644 3rdparty/bx/include/bx/crtimpl.h create mode 100644 3rdparty/bx/include/bx/file.h create mode 100644 3rdparty/bx/include/bx/filepath.h delete mode 100644 3rdparty/bx/include/bx/foreach.h create mode 100644 3rdparty/bx/include/bx/inline/cpu.inl create mode 100644 3rdparty/bx/include/bx/inline/float4x4_t.inl delete mode 100644 3rdparty/bx/include/bx/inline/fpumath.inl create mode 100644 3rdparty/bx/include/bx/inline/math.inl rename 3rdparty/bx/include/bx/{fpumath.h => math.h} (51%) delete mode 100644 3rdparty/bx/include/bx/radixsort.h delete mode 100644 3rdparty/bx/include/bx/sem.h create mode 100644 3rdparty/bx/include/bx/settings.h delete mode 100644 3rdparty/bx/include/bx/simd128_langext.inl delete mode 100644 3rdparty/bx/include/bx/simd128_neon.inl delete mode 100644 3rdparty/bx/include/bx/simd128_ref.inl delete mode 100644 3rdparty/bx/include/bx/simd128_sse.inl delete mode 100644 3rdparty/bx/include/bx/simd128_swizzle.inl delete mode 100644 3rdparty/bx/include/bx/simd256_avx.inl delete mode 100644 3rdparty/bx/include/bx/simd256_ref.inl delete mode 100644 3rdparty/bx/include/bx/simd_ni.inl delete mode 100644 3rdparty/bx/include/bx/tokenizecmd.h create mode 100644 3rdparty/bx/include/bx/url.h create mode 100644 3rdparty/bx/include/compat/mingw/salieri.h delete mode 100644 3rdparty/bx/include/compat/nacl/memory.h create mode 100644 3rdparty/bx/scripts/lemon.lua delete mode 100644 3rdparty/bx/scripts/uncrustify.cfg create mode 100644 3rdparty/bx/src/allocator.cpp create mode 100644 3rdparty/bx/src/bx_p.h delete mode 100644 3rdparty/bx/src/crtimpl.cpp create mode 100644 3rdparty/bx/src/easing.cpp create mode 100644 3rdparty/bx/src/file.cpp create mode 100644 3rdparty/bx/src/filepath.cpp delete mode 100644 3rdparty/bx/src/fpumath.cpp create mode 100644 3rdparty/bx/src/hash.cpp create mode 100644 3rdparty/bx/src/math.cpp create mode 100644 3rdparty/bx/src/process.cpp create mode 100644 3rdparty/bx/src/settings.cpp create mode 100644 3rdparty/bx/src/url.cpp create mode 100644 3rdparty/bx/tests/atomic_test.cpp create mode 100644 3rdparty/bx/tests/crt_test.cpp delete mode 100644 3rdparty/bx/tests/dbg.cpp create mode 100644 3rdparty/bx/tests/easing_test.cpp create mode 100644 3rdparty/bx/tests/filepath_test.cpp delete mode 100644 3rdparty/bx/tests/fpumath.cpp delete mode 100644 3rdparty/bx/tests/fpumath_test.cpp delete mode 100644 3rdparty/bx/tests/handle.cpp create mode 100644 3rdparty/bx/tests/hash_test.cpp delete mode 100644 3rdparty/bx/tests/macros.cpp delete mode 100644 3rdparty/bx/tests/main.cpp create mode 100644 3rdparty/bx/tests/math_bench.cpp create mode 100644 3rdparty/bx/tests/math_test.cpp delete mode 100644 3rdparty/bx/tests/misc.cpp delete mode 100644 3rdparty/bx/tests/misc_test.cpp create mode 100644 3rdparty/bx/tests/os_test.cpp create mode 100644 3rdparty/bx/tests/queue_test.cpp create mode 100644 3rdparty/bx/tests/ringbuffer_test.cpp create mode 100644 3rdparty/bx/tests/rng_test.cpp create mode 100644 3rdparty/bx/tests/run_test.cpp create mode 100644 3rdparty/bx/tests/settings_test.cpp create mode 100644 3rdparty/bx/tests/simd_bench.cpp delete mode 100644 3rdparty/bx/tests/simd_t.cpp create mode 100644 3rdparty/bx/tests/sort_test.cpp delete mode 100644 3rdparty/bx/tests/thread.cpp delete mode 100644 3rdparty/bx/tests/tokenizecmd.cpp delete mode 100644 3rdparty/bx/tests/uint32_t.cpp delete mode 100644 3rdparty/bx/tests/unordered_map_nonpod.cpp delete mode 100644 3rdparty/bx/tests/unordered_set_copyctor.cpp delete mode 100644 3rdparty/bx/tests/unordered_set_pod.cpp create mode 100644 3rdparty/bx/tests/url_test.cpp delete mode 100644 3rdparty/bx/tests/vector_complex.cpp delete mode 100644 3rdparty/bx/tests/vector_header.cpp delete mode 100644 3rdparty/bx/tests/vector_nocopy.cpp delete mode 100644 3rdparty/bx/tests/vector_nodefault.cpp delete mode 100644 3rdparty/bx/tests/vector_primitive.cpp delete mode 100644 3rdparty/bx/tests/vector_shrinktofit.cpp create mode 100644 3rdparty/bx/tests/vsnprintf_test.cpp create mode 100755 3rdparty/bx/tools/bin/darwin/lemon create mode 100644 3rdparty/bx/tools/bin/darwin/lempar.c create mode 100755 3rdparty/bx/tools/bin/linux/lemon create mode 100644 3rdparty/bx/tools/bin/linux/lempar.c create mode 100644 3rdparty/bx/tools/bin/windows/lemon.exe create mode 100644 3rdparty/bx/tools/bin/windows/lempar.c create mode 100644 3rdparty/bx/tools/lemon/lemon.c create mode 100644 3rdparty/bx/tools/lemon/lempar.c create mode 100644 3rdparty/imgui_dock/imgui_dock.cpp create mode 100644 3rdparty/imgui_dock/imgui_dock.h diff --git a/3rdparty/bgfx/.appveyor.yml b/3rdparty/bgfx/.appveyor.yml index 852cf22..15bcc62 100644 --- a/3rdparty/bgfx/.appveyor.yml +++ b/3rdparty/bgfx/.appveyor.yml @@ -1,22 +1,21 @@ shallow_clone: true os: - - Visual Studio 2015 + - Visual Studio 2017 environment: matrix: - - TOOLSET: vs2010 - - TOOLSET: vs2012 - - TOOLSET: vs2013 - TOOLSET: vs2015 + - TOOLSET: vs2017 configuration: - Debug - Release install: - - git clone https://github.com/bkaradzic/bx ..\bx - - ..\bx\tools\bin\windows\genie --with-tools %TOOLSET% + - git clone --depth 1 https://github.com/bkaradzic/bx ..\bx + - git clone --depth 1 https://github.com/bkaradzic/bimg ..\bimg + - ..\bx\tools\bin\windows\genie --with-tools --with-examples %TOOLSET% build: project: .build/projects/$(TOOLSET)/bgfx.sln diff --git a/3rdparty/bgfx/.travis.yml b/3rdparty/bgfx/.travis.yml index 8c08170..8fc61d2 100644 --- a/3rdparty/bgfx/.travis.yml +++ b/3rdparty/bgfx/.travis.yml @@ -6,11 +6,22 @@ matrix: - compiler: clang os: osx +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-5 + - g++-5 + - clang + before_script: - git clone https://github.com/bkaradzic/bx ../bx + - git clone --depth 1 https://github.com/bkaradzic/bx ../bx + - git clone --depth 1 https://github.com/bkaradzic/bimg ../bimg script: - make build + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then make build CXX="g++-5" CC="gcc-5"; fi + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then make build; fi branches: only: @@ -19,4 +30,4 @@ branches: notifications: email: false -osx_image: xcode7.3 +osx_image: xcode9.3 diff --git a/3rdparty/bgfx/3rdparty/edtaa3/edtaa3func.cpp b/3rdparty/bgfx/3rdparty/edtaa3/edtaa3func.cpp deleted file mode 100644 index e209529..0000000 --- a/3rdparty/bgfx/3rdparty/edtaa3/edtaa3func.cpp +++ /dev/null @@ -1,580 +0,0 @@ -/* - * edtaa3() - * - * Sweep-and-update Euclidean distance transform of an - * image. Positive pixels are treated as object pixels, - * zero or negative pixels are treated as background. - * An attempt is made to treat antialiased edges correctly. - * The input image must have pixels in the range [0,1], - * and the antialiased image should be a box-filter - * sampling of the ideal, crisp edge. - * If the antialias region is more than 1 pixel wide, - * the result from this transform will be inaccurate. - * - * By Stefan Gustavson (stefan.gustavson@gmail.com). - * - * Originally written in 1994, based on a verbal - * description of Per-Erik Danielsson's SSED8 algorithm - * as presented in the PhD dissertation of Ingemar - * Ragnemalm. This is Per-Erik Danielsson's scanline - * scheme from 1979 - I only implemented it in C. - * - * Updated in 2004 to treat border pixels correctly, - * and cleaned up the code to improve readability. - * - * Updated in 2009 to handle anti-aliased edges, - * as published in the article "Anti-aliased Euclidean - * distance transform" by Stefan Gustavson and Robin Strand, - * Pattern Recognition Letters 32 (2011) 252–257. - * - * Updated in 2011 to avoid a corner case causing an - * infinite loop for some input data. - * -*/ - -/* - -Copyright (C) 2011 by Stefan Gustavson - -(stefan.gustavson@liu.se) - -This code is distributed under the permissive "MIT license": - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -#include - -/* - * Compute the local gradient at edge pixels using convolution filters. - * The gradient is computed only at edge pixels. At other places in the - * image, it is never used, and it's mostly zero anyway. - */ -void computegradient(double *img, int w, int h, double *gx, double *gy) -{ - int i,j,k; - double glength; -#define SQRT2 1.4142136 - for(i = 1; i < h-1; i++) { // Avoid edges where the kernels would spill over - for(j = 1; j < w-1; j++) { - k = i*w + j; - if((img[k]>0.0) && (img[k]<1.0)) { // Compute gradient for edge pixels only - gx[k] = -img[k-w-1] - SQRT2*img[k-1] - img[k+w-1] + img[k-w+1] + SQRT2*img[k+1] + img[k+w+1]; - gy[k] = -img[k-w-1] - SQRT2*img[k-w] - img[k-w+1] + img[k+w-1] + SQRT2*img[k+w] + img[k+w+1]; - glength = gx[k]*gx[k] + gy[k]*gy[k]; - if(glength > 0.0) { // Avoid division by zero - glength = sqrt(glength); - gx[k]=gx[k]/glength; - gy[k]=gy[k]/glength; - } - } - } - } - // TODO: Compute reasonable values for gx, gy also around the image edges. - // (These are zero now, which reduces the accuracy for a 1-pixel wide region - // around the image edge.) 2x2 kernels would be suitable for this. -} - -/* - * A somewhat tricky function to approximate the distance to an edge in a - * certain pixel, with consideration to either the local gradient (gx,gy) - * or the direction to the pixel (dx,dy) and the pixel greyscale value a. - * The latter alternative, using (dx,dy), is the metric used by edtaa2(). - * Using a local estimate of the edge gradient (gx,gy) yields much better - * accuracy at and near edges, and reduces the error even at distant pixels - * provided that the gradient direction is accurately estimated. - */ -double edgedf(double gx, double gy, double a) -{ - double df, glength, temp, a1; - - if ((gx == 0) || (gy == 0)) { // Either A) gu or gv are zero, or B) both - df = 0.5-a; // Linear approximation is A) correct or B) a fair guess - } else { - glength = sqrt(gx*gx + gy*gy); - if(glength>0) { - gx = gx/glength; - gy = gy/glength; - } - /* Everything is symmetric wrt sign and transposition, - * so move to first octant (gx>=0, gy>=0, gx>=gy) to - * avoid handling all possible edge directions. - */ - gx = fabs(gx); - gy = fabs(gy); - if(gx 1.0) a = 1.0; - if(a < 0.0) a = 0.0; // Clip grayscale values outside the range [0,1] - if(a == 0.0) return 1000000.0; // Not an object pixel, return "very far" ("don't know yet") - - dx = (double)xi; - dy = (double)yi; - di = sqrt(dx*dx + dy*dy); // Length of integer vector, like a traditional EDT - if(di==0) { // Use local gradient only at edges - // Estimate based on local gradient only - df = edgedf(gx, gy, a); - } else { - // Estimate gradient based on direction to edge (accurate for large di) - df = edgedf(dx, dy, a); - } - return di + df; // Same metric as edtaa2, except at edges (where di=0) -} - -// Shorthand macro: add ubiquitous parameters img, gx, gy and w and call distaa3() -#define DISTAA(c,xc,yc,xi,yi) (distaa3(img, gx, gy, w, c, xc, yc, xi, yi)) - -void edtaa3(double *img, double *gx, double *gy, int w, int h, short *distx, short *disty, double *dist) -{ - int x, y, i, c; - int offset_u, offset_ur, offset_r, offset_rd, - offset_d, offset_dl, offset_l, offset_lu; - double olddist, newdist; - int cdistx, cdisty, newdistx, newdisty; - int changed; - double epsilon = 1e-3; // Safeguard against errors due to limited precision - - /* Initialize index offsets for the current image width */ - offset_u = -w; - offset_ur = -w+1; - offset_r = 1; - offset_rd = w+1; - offset_d = w; - offset_dl = w-1; - offset_l = -1; - offset_lu = -w-1; - - /* Initialize the distance images */ - for(i=0; i 0) // If non-zero distance or not set yet - { - c = i + offset_u; // Index of candidate for testing - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx; - newdisty = cdisty+1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_ur; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty+1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - i++; - - /* Middle pixels have all neighbors */ - for(x=1; x 0) // If not already zero distance - { - c = i+offset_l; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx+1; - newdisty = cdisty; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_lu; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx+1; - newdisty = cdisty+1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_u; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx; - newdisty = cdisty+1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - - /* Move index to second rightmost pixel of current row. */ - /* Rightmost pixel is skipped, it has no right neighbor. */ - i = y*w + w-2; - - /* scan left, propagate distance from right */ - for(x=w-2; x>=0; x--, i--) - { - olddist = dist[i]; - if(olddist <= 0) continue; // Already zero distance - - c = i+offset_r; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - } - - /* Scan rows in reverse order, except last row */ - for(y=h-2; y>=0; y--) - { - /* move index to rightmost pixel of current row */ - i = y*w + w-1; - - /* Scan left, propagate distances from below & right */ - - /* Rightmost pixel is special, has no right neighbors */ - olddist = dist[i]; - if(olddist > 0) // If not already zero distance - { - c = i+offset_d; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_dl; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx+1; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - i--; - - /* Middle pixels have all neighbors */ - for(x=w-2; x>0; x--, i--) - { - olddist = dist[i]; - if(olddist <= 0) continue; // Already zero distance - - c = i+offset_r; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_rd; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_d; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_dl; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx+1; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - /* Leftmost pixel is special, has no left neighbors */ - olddist = dist[i]; - if(olddist > 0) // If not already zero distance - { - c = i+offset_r; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_rd; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx-1; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - olddist=newdist; - changed = 1; - } - - c = i+offset_d; - cdistx = distx[c]; - cdisty = disty[c]; - newdistx = cdistx; - newdisty = cdisty-1; - newdist = DISTAA(c, cdistx, cdisty, newdistx, newdisty); - if(newdist < olddist-epsilon) - { - distx[i]=newdistx; - disty[i]=newdisty; - dist[i]=newdist; - changed = 1; - } - } - - /* Move index to second leftmost pixel of current row. */ - /* Leftmost pixel is skipped, it has no left neighbor. */ - i = y*w + 1; - for(x=1; x - -/* From http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt - - The number of bits that represent a 4x4 texel block is 64 bits if - is given by ETC1_RGB8_OES. - - The data for a block is a number of bytes, - - {q0, q1, q2, q3, q4, q5, q6, q7} - - where byte q0 is located at the lowest memory address and q7 at - the highest. The 64 bits specifying the block is then represented - by the following 64 bit integer: - - int64bit = 256*(256*(256*(256*(256*(256*(256*q0+q1)+q2)+q3)+q4)+q5)+q6)+q7; - - ETC1_RGB8_OES: - - a) bit layout in bits 63 through 32 if diffbit = 0 - - 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 - ----------------------------------------------- - | base col1 | base col2 | base col1 | base col2 | - | R1 (4bits)| R2 (4bits)| G1 (4bits)| G2 (4bits)| - ----------------------------------------------- - - 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 - --------------------------------------------------- - | base col1 | base col2 | table | table |diff|flip| - | B1 (4bits)| B2 (4bits)| cw 1 | cw 2 |bit |bit | - --------------------------------------------------- - - - b) bit layout in bits 63 through 32 if diffbit = 1 - - 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 - ----------------------------------------------- - | base col1 | dcol 2 | base col1 | dcol 2 | - | R1' (5 bits) | dR2 | G1' (5 bits) | dG2 | - ----------------------------------------------- - - 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 - --------------------------------------------------- - | base col 1 | dcol 2 | table | table |diff|flip| - | B1' (5 bits) | dB2 | cw 1 | cw 2 |bit |bit | - --------------------------------------------------- - - - c) bit layout in bits 31 through 0 (in both cases) - - 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 - ----------------------------------------------- - | most significant pixel index bits | - | p| o| n| m| l| k| j| i| h| g| f| e| d| c| b| a| - ----------------------------------------------- - - 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -------------------------------------------------- - | least significant pixel index bits | - | p| o| n| m| l| k| j| i| h| g| f| e| d| c | b | a | - -------------------------------------------------- - - - Add table 3.17.2: Intensity modifier sets for ETC1 compressed textures: - - table codeword modifier table - ------------------ ---------------------- - 0 -8 -2 2 8 - 1 -17 -5 5 17 - 2 -29 -9 9 29 - 3 -42 -13 13 42 - 4 -60 -18 18 60 - 5 -80 -24 24 80 - 6 -106 -33 33 106 - 7 -183 -47 47 183 - - - Add table 3.17.3 Mapping from pixel index values to modifier values for - ETC1 compressed textures: - - pixel index value - --------------- - msb lsb resulting modifier value - ----- ----- ------------------------- - 1 1 -b (large negative value) - 1 0 -a (small negative value) - 0 0 a (small positive value) - 0 1 b (large positive value) - - - */ - -static const int kModifierTable[] = { -/* 0 */2, 8, -2, -8, -/* 1 */5, 17, -5, -17, -/* 2 */9, 29, -9, -29, -/* 3 */13, 42, -13, -42, -/* 4 */18, 60, -18, -60, -/* 5 */24, 80, -24, -80, -/* 6 */33, 106, -33, -106, -/* 7 */47, 183, -47, -183 }; - -static const int kLookup[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; - -static inline etc1_byte clamp(int x) { - return (etc1_byte) (x >= 0 ? (x < 255 ? x : 255) : 0); -} - -static -inline int convert4To8(int b) { - int c = b & 0xf; - return (c << 4) | c; -} - -static -inline int convert5To8(int b) { - int c = b & 0x1f; - return (c << 3) | (c >> 2); -} - -static -inline int convert6To8(int b) { - int c = b & 0x3f; - return (c << 2) | (c >> 4); -} - -static -inline int divideBy255(int d) { - return (d + 128 + (d >> 8)) >> 8; -} - -static -inline int convert8To4(int b) { - int c = b & 0xff; - return divideBy255(c * 15); -} - -static -inline int convert8To5(int b) { - int c = b & 0xff; - return divideBy255(c * 31); -} - -static -inline int convertDiff(int base, int diff) { - return convert5To8((0x1f & base) + kLookup[0x7 & diff]); -} - -static -void decode_subblock(etc1_byte* pOut, int r, int g, int b, const int* table, - etc1_uint32 low, bool second, bool flipped) { - int baseX = 0; - int baseY = 0; - if (second) { - if (flipped) { - baseY = 2; - } else { - baseX = 2; - } - } - for (int i = 0; i < 8; i++) { - int x, y; - if (flipped) { - x = baseX + (i >> 1); - y = baseY + (i & 1); - } else { - x = baseX + (i >> 2); - y = baseY + (i & 3); - } - int k = y + (x * 4); - int offset = ((low >> k) & 1) | ((low >> (k + 15)) & 2); - int delta = table[offset]; - etc1_byte* q = pOut + 3 * (x + 4 * y); - *q++ = clamp(r + delta); - *q++ = clamp(g + delta); - *q++ = clamp(b + delta); - } -} - -// Input is an ETC1 compressed version of the data. -// Output is a 4 x 4 square of 3-byte pixels in form R, G, B - -void etc1_decode_block(const etc1_byte* pIn, etc1_byte* pOut) { - etc1_uint32 high = (pIn[0] << 24) | (pIn[1] << 16) | (pIn[2] << 8) | pIn[3]; - etc1_uint32 low = (pIn[4] << 24) | (pIn[5] << 16) | (pIn[6] << 8) | pIn[7]; - int r1, r2, g1, g2, b1, b2; - if (high & 2) { - // differential - int rBase = high >> 27; - int gBase = high >> 19; - int bBase = high >> 11; - r1 = convert5To8(rBase); - r2 = convertDiff(rBase, high >> 24); - g1 = convert5To8(gBase); - g2 = convertDiff(gBase, high >> 16); - b1 = convert5To8(bBase); - b2 = convertDiff(bBase, high >> 8); - } else { - // not differential - r1 = convert4To8(high >> 28); - r2 = convert4To8(high >> 24); - g1 = convert4To8(high >> 20); - g2 = convert4To8(high >> 16); - b1 = convert4To8(high >> 12); - b2 = convert4To8(high >> 8); - } - int tableIndexA = 7 & (high >> 5); - int tableIndexB = 7 & (high >> 2); - const int* tableA = kModifierTable + tableIndexA * 4; - const int* tableB = kModifierTable + tableIndexB * 4; - bool flipped = (high & 1) != 0; - decode_subblock(pOut, r1, g1, b1, tableA, low, false, flipped); - decode_subblock(pOut, r2, g2, b2, tableB, low, true, flipped); -} - -typedef struct { - etc1_uint32 high; - etc1_uint32 low; - etc1_uint32 score; // Lower is more accurate -} etc_compressed; - -static -inline void take_best(etc_compressed* a, const etc_compressed* b) { - if (a->score > b->score) { - *a = *b; - } -} - -static -void etc_average_colors_subblock(const etc1_byte* pIn, etc1_uint32 inMask, - etc1_byte* pColors, bool flipped, bool second) { - int r = 0; - int g = 0; - int b = 0; - - if (flipped) { - int by = 0; - if (second) { - by = 2; - } - for (int y = 0; y < 2; y++) { - int yy = by + y; - for (int x = 0; x < 4; x++) { - int i = x + 4 * yy; - if (inMask & (1 << i)) { - const etc1_byte* p = pIn + i * 3; - r += *(p++); - g += *(p++); - b += *(p++); - } - } - } - } else { - int bx = 0; - if (second) { - bx = 2; - } - for (int y = 0; y < 4; y++) { - for (int x = 0; x < 2; x++) { - int xx = bx + x; - int i = xx + 4 * y; - if (inMask & (1 << i)) { - const etc1_byte* p = pIn + i * 3; - r += *(p++); - g += *(p++); - b += *(p++); - } - } - } - } - pColors[0] = (etc1_byte)((r + 4) >> 3); - pColors[1] = (etc1_byte)((g + 4) >> 3); - pColors[2] = (etc1_byte)((b + 4) >> 3); -} - -static -inline int square(int x) { - return x * x; -} - -static etc1_uint32 chooseModifier(const etc1_byte* pBaseColors, - const etc1_byte* pIn, etc1_uint32 *pLow, int bitIndex, - const int* pModifierTable) { - etc1_uint32 bestScore = ~0; - int bestIndex = 0; - int pixelR = pIn[0]; - int pixelG = pIn[1]; - int pixelB = pIn[2]; - int r = pBaseColors[0]; - int g = pBaseColors[1]; - int b = pBaseColors[2]; - for (int i = 0; i < 4; i++) { - int modifier = pModifierTable[i]; - int decodedG = clamp(g + modifier); - etc1_uint32 score = (etc1_uint32) (6 * square(decodedG - pixelG)); - if (score >= bestScore) { - continue; - } - int decodedR = clamp(r + modifier); - score += (etc1_uint32) (3 * square(decodedR - pixelR)); - if (score >= bestScore) { - continue; - } - int decodedB = clamp(b + modifier); - score += (etc1_uint32) square(decodedB - pixelB); - if (score < bestScore) { - bestScore = score; - bestIndex = i; - } - } - etc1_uint32 lowMask = (((bestIndex >> 1) << 16) | (bestIndex & 1)) - << bitIndex; - *pLow |= lowMask; - return bestScore; -} - -static -void etc_encode_subblock_helper(const etc1_byte* pIn, etc1_uint32 inMask, - etc_compressed* pCompressed, bool flipped, bool second, - const etc1_byte* pBaseColors, const int* pModifierTable) { - int score = pCompressed->score; - if (flipped) { - int by = 0; - if (second) { - by = 2; - } - for (int y = 0; y < 2; y++) { - int yy = by + y; - for (int x = 0; x < 4; x++) { - int i = x + 4 * yy; - if (inMask & (1 << i)) { - score += chooseModifier(pBaseColors, pIn + i * 3, - &pCompressed->low, yy + x * 4, pModifierTable); - } - } - } - } else { - int bx = 0; - if (second) { - bx = 2; - } - for (int y = 0; y < 4; y++) { - for (int x = 0; x < 2; x++) { - int xx = bx + x; - int i = xx + 4 * y; - if (inMask & (1 << i)) { - score += chooseModifier(pBaseColors, pIn + i * 3, - &pCompressed->low, y + xx * 4, pModifierTable); - } - } - } - } - pCompressed->score = score; -} - -static bool inRange4bitSigned(int color) { - return color >= -4 && color <= 3; -} - -static void etc_encodeBaseColors(etc1_byte* pBaseColors, - const etc1_byte* pColors, etc_compressed* pCompressed) { - int r1, g1, b1, r2, g2, b2; // 8 bit base colors for sub-blocks - bool differential; - { - int r51 = convert8To5(pColors[0]); - int g51 = convert8To5(pColors[1]); - int b51 = convert8To5(pColors[2]); - int r52 = convert8To5(pColors[3]); - int g52 = convert8To5(pColors[4]); - int b52 = convert8To5(pColors[5]); - - r1 = convert5To8(r51); - g1 = convert5To8(g51); - b1 = convert5To8(b51); - - int dr = r52 - r51; - int dg = g52 - g51; - int db = b52 - b51; - - differential = inRange4bitSigned(dr) && inRange4bitSigned(dg) - && inRange4bitSigned(db); - if (differential) { - r2 = convert5To8(r51 + dr); - g2 = convert5To8(g51 + dg); - b2 = convert5To8(b51 + db); - pCompressed->high |= (r51 << 27) | ((7 & dr) << 24) | (g51 << 19) - | ((7 & dg) << 16) | (b51 << 11) | ((7 & db) << 8) | 2; - } - } - - if (!differential) { - int r41 = convert8To4(pColors[0]); - int g41 = convert8To4(pColors[1]); - int b41 = convert8To4(pColors[2]); - int r42 = convert8To4(pColors[3]); - int g42 = convert8To4(pColors[4]); - int b42 = convert8To4(pColors[5]); - r1 = convert4To8(r41); - g1 = convert4To8(g41); - b1 = convert4To8(b41); - r2 = convert4To8(r42); - g2 = convert4To8(g42); - b2 = convert4To8(b42); - pCompressed->high |= (r41 << 28) | (r42 << 24) | (g41 << 20) | (g42 - << 16) | (b41 << 12) | (b42 << 8); - } - pBaseColors[0] = r1; - pBaseColors[1] = g1; - pBaseColors[2] = b1; - pBaseColors[3] = r2; - pBaseColors[4] = g2; - pBaseColors[5] = b2; -} - -static -void etc_encode_block_helper(const etc1_byte* pIn, etc1_uint32 inMask, - const etc1_byte* pColors, etc_compressed* pCompressed, bool flipped) { - pCompressed->score = ~0; - pCompressed->high = (flipped ? 1 : 0); - pCompressed->low = 0; - - etc1_byte pBaseColors[6]; - - etc_encodeBaseColors(pBaseColors, pColors, pCompressed); - - int originalHigh = pCompressed->high; - - const int* pModifierTable = kModifierTable; - for (int i = 0; i < 8; i++, pModifierTable += 4) { - etc_compressed temp; - temp.score = 0; - temp.high = originalHigh | (i << 5); - temp.low = 0; - etc_encode_subblock_helper(pIn, inMask, &temp, flipped, false, - pBaseColors, pModifierTable); - take_best(pCompressed, &temp); - } - pModifierTable = kModifierTable; - etc_compressed firstHalf = *pCompressed; - for (int i = 0; i < 8; i++, pModifierTable += 4) { - etc_compressed temp; - temp.score = firstHalf.score; - temp.high = firstHalf.high | (i << 2); - temp.low = firstHalf.low; - etc_encode_subblock_helper(pIn, inMask, &temp, flipped, true, - pBaseColors + 3, pModifierTable); - if (i == 0) { - *pCompressed = temp; - } else { - take_best(pCompressed, &temp); - } - } -} - -static void writeBigEndian(etc1_byte* pOut, etc1_uint32 d) { - pOut[0] = (etc1_byte)(d >> 24); - pOut[1] = (etc1_byte)(d >> 16); - pOut[2] = (etc1_byte)(d >> 8); - pOut[3] = (etc1_byte) d; -} - -// Input is a 4 x 4 square of 3-byte pixels in form R, G, B -// inmask is a 16-bit mask where bit (1 << (x + y * 4)) tells whether the corresponding (x,y) -// pixel is valid or not. Invalid pixel color values are ignored when compressing. -// Output is an ETC1 compressed version of the data. - -void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 inMask, - etc1_byte* pOut) { - etc1_byte colors[6]; - etc1_byte flippedColors[6]; - etc_average_colors_subblock(pIn, inMask, colors, false, false); - etc_average_colors_subblock(pIn, inMask, colors + 3, false, true); - etc_average_colors_subblock(pIn, inMask, flippedColors, true, false); - etc_average_colors_subblock(pIn, inMask, flippedColors + 3, true, true); - - etc_compressed a, b; - etc_encode_block_helper(pIn, inMask, colors, &a, false); - etc_encode_block_helper(pIn, inMask, flippedColors, &b, true); - take_best(&a, &b); - writeBigEndian(pOut, a.high); - writeBigEndian(pOut + 4, a.low); -} - -// Return the size of the encoded image data (does not include size of PKM header). - -etc1_uint32 etc1_get_encoded_data_size(etc1_uint32 width, etc1_uint32 height) { - return (((width + 3) & ~3) * ((height + 3) & ~3)) >> 1; -} - -// Encode an entire image. -// pIn - pointer to the image data. Formatted such that the Red component of -// pixel (x,y) is at pIn + pixelSize * x + stride * y + redOffset; -// pOut - pointer to encoded data. Must be large enough to store entire encoded image. - -int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height, - etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut) { - if (pixelSize < 2 || pixelSize > 4) { - return -1; - } - static const unsigned short kYMask[] = { 0x0, 0xf, 0xff, 0xfff, 0xffff }; - static const unsigned short kXMask[] = { 0x0, 0x1111, 0x3333, 0x7777, - 0xffff }; - etc1_byte block[ETC1_DECODED_BLOCK_SIZE]; - etc1_byte encoded[ETC1_ENCODED_BLOCK_SIZE]; - - etc1_uint32 encodedWidth = (width + 3) & ~3; - etc1_uint32 encodedHeight = (height + 3) & ~3; - - for (etc1_uint32 y = 0; y < encodedHeight; y += 4) { - etc1_uint32 yEnd = height - y; - if (yEnd > 4) { - yEnd = 4; - } - int ymask = kYMask[yEnd]; - for (etc1_uint32 x = 0; x < encodedWidth; x += 4) { - etc1_uint32 xEnd = width - x; - if (xEnd > 4) { - xEnd = 4; - } - int mask = ymask & kXMask[xEnd]; - for (etc1_uint32 cy = 0; cy < yEnd; cy++) { - etc1_byte* q = block + (cy * 4) * 3; - const etc1_byte* p = pIn + pixelSize * x + stride * (y + cy); - if (pixelSize >= 3) { - for (etc1_uint32 cx = 0; cx < xEnd; cx++) { - memcpy(q, p, 3); - q += 3; - p += pixelSize; - } - } else { - for (etc1_uint32 cx = 0; cx < xEnd; cx++) { - int pixel = (p[1] << 8) | p[0]; - *q++ = convert5To8(pixel >> 11); - *q++ = convert6To8(pixel >> 5); - *q++ = convert5To8(pixel); - p += pixelSize; - } - } - } - etc1_encode_block(block, mask, encoded); - memcpy(pOut, encoded, sizeof(encoded)); - pOut += sizeof(encoded); - } - } - return 0; -} - -// Decode an entire image. -// pIn - pointer to encoded data. -// pOut - pointer to the image data. Will be written such that the Red component of -// pixel (x,y) is at pIn + pixelSize * x + stride * y + redOffset. Must be -// large enough to store entire image. - - -int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut, - etc1_uint32 width, etc1_uint32 height, - etc1_uint32 pixelSize, etc1_uint32 stride) { - if (pixelSize < 2 || pixelSize > 4) { - return -1; - } - etc1_byte block[ETC1_DECODED_BLOCK_SIZE]; - - etc1_uint32 encodedWidth = (width + 3) & ~3; - etc1_uint32 encodedHeight = (height + 3) & ~3; - - for (etc1_uint32 y = 0; y < encodedHeight; y += 4) { - etc1_uint32 yEnd = height - y; - if (yEnd > 4) { - yEnd = 4; - } - for (etc1_uint32 x = 0; x < encodedWidth; x += 4) { - etc1_uint32 xEnd = width - x; - if (xEnd > 4) { - xEnd = 4; - } - etc1_decode_block(pIn, block); - pIn += ETC1_ENCODED_BLOCK_SIZE; - for (etc1_uint32 cy = 0; cy < yEnd; cy++) { - const etc1_byte* q = block + (cy * 4) * 3; - etc1_byte* p = pOut + pixelSize * x + stride * (y + cy); - if (pixelSize >= 3) { - for (etc1_uint32 cx = 0; cx < xEnd; cx++) { - memcpy(p, q, 3); - q += 3; - p += pixelSize; - } - } else { - for (etc1_uint32 cx = 0; cx < xEnd; cx++) { - etc1_byte r = *q++; - etc1_byte g = *q++; - etc1_byte b = *q++; - etc1_uint32 pixel = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); - *p++ = (etc1_byte) pixel; - *p++ = (etc1_byte) (pixel >> 8); - } - } - } - } - } - return 0; -} - -static const char kMagic[] = { 'P', 'K', 'M', ' ', '1', '0' }; - -static const etc1_uint32 ETC1_PKM_FORMAT_OFFSET = 6; -static const etc1_uint32 ETC1_PKM_ENCODED_WIDTH_OFFSET = 8; -static const etc1_uint32 ETC1_PKM_ENCODED_HEIGHT_OFFSET = 10; -static const etc1_uint32 ETC1_PKM_WIDTH_OFFSET = 12; -static const etc1_uint32 ETC1_PKM_HEIGHT_OFFSET = 14; - -static const etc1_uint32 ETC1_RGB_NO_MIPMAPS = 0; - -static void writeBEUint16(etc1_byte* pOut, etc1_uint32 data) { - pOut[0] = (etc1_byte) (data >> 8); - pOut[1] = (etc1_byte) data; -} - -static etc1_uint32 readBEUint16(const etc1_byte* pIn) { - return (pIn[0] << 8) | pIn[1]; -} - -// Format a PKM header - -void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height) { - memcpy(pHeader, kMagic, sizeof(kMagic)); - etc1_uint32 encodedWidth = (width + 3) & ~3; - etc1_uint32 encodedHeight = (height + 3) & ~3; - writeBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET, ETC1_RGB_NO_MIPMAPS); - writeBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET, encodedWidth); - writeBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET, encodedHeight); - writeBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET, width); - writeBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET, height); -} - -// Check if a PKM header is correctly formatted. - -etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader) { - if (memcmp(pHeader, kMagic, sizeof(kMagic))) { - return false; - } - etc1_uint32 format = readBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET); - etc1_uint32 encodedWidth = readBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET); - etc1_uint32 encodedHeight = readBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET); - etc1_uint32 width = readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET); - etc1_uint32 height = readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET); - return format == ETC1_RGB_NO_MIPMAPS && - encodedWidth >= width && encodedWidth - width < 4 && - encodedHeight >= height && encodedHeight - height < 4; -} - -// Read the image width from a PKM header - -etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader) { - return readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET); -} - -// Read the image height from a PKM header - -etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader){ - return readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET); -} diff --git a/3rdparty/bgfx/3rdparty/etc1/etc1.h b/3rdparty/bgfx/3rdparty/etc1/etc1.h deleted file mode 100644 index d66ca9d..0000000 --- a/3rdparty/bgfx/3rdparty/etc1/etc1.h +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -////////////////////////////////////////////////////////////////////////////////////////// - -// This is a fork of the AOSP project ETC1 codec. The original code can be found -// at the following web site: -// https://android.googlesource.com/platform/frameworks/native/+/master/opengl/libs/ETC1/ - -////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef __etc1_h__ -#define __etc1_h__ - -#define ETC1_ENCODED_BLOCK_SIZE 8 -#define ETC1_DECODED_BLOCK_SIZE 48 - -#ifndef ETC1_RGB8_OES -#define ETC1_RGB8_OES 0x8D64 -#endif - -typedef unsigned char etc1_byte; -typedef int etc1_bool; -typedef unsigned int etc1_uint32; - -#ifdef __cplusplus -extern "C" { -#endif - -// Encode a block of pixels. -// -// pIn is a pointer to a ETC_DECODED_BLOCK_SIZE array of bytes that represent a -// 4 x 4 square of 3-byte pixels in form R, G, B. Byte (3 * (x + 4 * y) is the R -// value of pixel (x, y). -// -// validPixelMask is a 16-bit mask where bit (1 << (x + y * 4)) indicates whether -// the corresponding (x,y) pixel is valid. Invalid pixel color values are ignored when compressing. -// -// pOut is an ETC1 compressed version of the data. - -void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 validPixelMask, etc1_byte* pOut); - -// Decode a block of pixels. -// -// pIn is an ETC1 compressed version of the data. -// -// pOut is a pointer to a ETC_DECODED_BLOCK_SIZE array of bytes that represent a -// 4 x 4 square of 3-byte pixels in form R, G, B. Byte (3 * (x + 4 * y) is the R -// value of pixel (x, y). - -void etc1_decode_block(const etc1_byte* pIn, etc1_byte* pOut); - -// Return the size of the encoded image data (does not include size of PKM header). - -etc1_uint32 etc1_get_encoded_data_size(etc1_uint32 width, etc1_uint32 height); - -// Encode an entire image. -// pIn - pointer to the image data. Formatted such that -// pixel (x,y) is at pIn + pixelSize * x + stride * y; -// pOut - pointer to encoded data. Must be large enough to store entire encoded image. -// pixelSize can be 2 or 3. 2 is an GL_UNSIGNED_SHORT_5_6_5 image, 3 is a GL_BYTE RGB image. -// returns non-zero if there is an error. - -int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height, - etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut); - -// Decode an entire image. -// pIn - pointer to encoded data. -// pOut - pointer to the image data. Will be written such that -// pixel (x,y) is at pIn + pixelSize * x + stride * y. Must be -// large enough to store entire image. -// pixelSize can be 2 or 3. 2 is an GL_UNSIGNED_SHORT_5_6_5 image, 3 is a GL_BYTE RGB image. -// returns non-zero if there is an error. - -int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut, - etc1_uint32 width, etc1_uint32 height, - etc1_uint32 pixelSize, etc1_uint32 stride); - -// Size of a PKM header, in bytes. - -#define ETC_PKM_HEADER_SIZE 16 - -// Format a PKM header - -void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height); - -// Check if a PKM header is correctly formatted. - -etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader); - -// Read the image width from a PKM header - -etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader); - -// Read the image height from a PKM header - -etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/LICENSE.txt b/3rdparty/bgfx/3rdparty/etc2/LICENSE.txt deleted file mode 100644 index 2254f9e..0000000 --- a/3rdparty/bgfx/3rdparty/etc2/LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2013, Bartosz Taudul -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/3rdparty/bgfx/3rdparty/etc2/Math.hpp b/3rdparty/bgfx/3rdparty/etc2/Math.hpp deleted file mode 100644 index 3a92a2e..0000000 --- a/3rdparty/bgfx/3rdparty/etc2/Math.hpp +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef __DARKRL__MATH_HPP__ -#define __DARKRL__MATH_HPP__ - -#include -#include - -#include "Types.hpp" - -template -inline T AlignPOT( T val ) -{ - if( val == 0 ) return 1; - val--; - for( unsigned int i=1; i> i; - } - return val + 1; -} - -inline int CountSetBits( uint32 val ) -{ - val -= ( val >> 1 ) & 0x55555555; - val = ( ( val >> 2 ) & 0x33333333 ) + ( val & 0x33333333 ); - val = ( ( val >> 4 ) + val ) & 0x0f0f0f0f; - val += val >> 8; - val += val >> 16; - return val & 0x0000003f; -} - -inline int CountLeadingZeros( uint32 val ) -{ - val |= val >> 1; - val |= val >> 2; - val |= val >> 4; - val |= val >> 8; - val |= val >> 16; - return 32 - CountSetBits( val ); -} - -inline float sRGB2linear( float v ) -{ - const float a = 0.055f; - if( v <= 0.04045f ) - { - return v / 12.92f; - } - else - { - return powf( ( v + a ) / ( 1 + a ), 2.4f ); - } -} - -inline float linear2sRGB( float v ) -{ - const float a = 0.055f; - if( v <= 0.0031308f ) - { - return 12.92f * v; - } - else - { - return ( 1 + a ) * pow( v, 1/2.4f ) - a; - } -} - -template -inline T SmoothStep( T x ) -{ - return x*x*(3-2*x); -} - -inline uint8 clampu8( int32 val ) -{ - return std::min( std::max( 0, val ), 255 ); -} - -template -inline T sq( T val ) -{ - return val * val; -} - -static inline int mul8bit( int a, int b ) -{ - int t = a*b + 128; - return ( t + ( t >> 8 ) ) >> 8; -} - -#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/ProcessCommon.hpp b/3rdparty/bgfx/3rdparty/etc2/ProcessCommon.hpp deleted file mode 100644 index 7e6addb..0000000 --- a/3rdparty/bgfx/3rdparty/etc2/ProcessCommon.hpp +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef __PROCESSCOMMON_HPP__ -#define __PROCESSCOMMON_HPP__ - -#include -#include - -#include "Types.hpp" - -template -static size_t GetLeastError( const T* err, size_t num ) -{ - size_t idx = 0; - for( size_t i=1; i> 24 ) | - ( ( d & 0x000000FF00000000 ) << 24 ) | - ( ( d & 0x00FF000000000000 ) >> 8 ) | - ( ( d & 0x0000FF0000000000 ) << 8 ); -} - -template -static uint64 EncodeSelectors( uint64 d, const T terr[2][8], const S tsel[16][8], const uint32* id ) -{ - size_t tidx[2]; - tidx[0] = GetLeastError( terr[0], 8 ); - tidx[1] = GetLeastError( terr[1], 8 ); - - d |= tidx[0] << 26; - d |= tidx[1] << 29; - for( int i=0; i<16; i++ ) - { - uint64 t = tsel[i][tidx[id[i]%2]]; - d |= ( t & 0x1 ) << ( i + 32 ); - d |= ( t & 0x2 ) << ( i + 47 ); - } - - return d; -} - -#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.cpp b/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.cpp deleted file mode 100644 index 29f0f7e..0000000 --- a/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.cpp +++ /dev/null @@ -1,719 +0,0 @@ -#include - -#include "Math.hpp" -#include "ProcessCommon.hpp" -#include "ProcessRGB.hpp" -#include "Tables.hpp" -#include "Types.hpp" -#include "Vector.hpp" - -#include - -#ifdef __SSE4_1__ -# ifdef _MSC_VER -# include -# include -# else -# include -# endif -#endif - -namespace -{ - -typedef uint16 v4i[4]; - -void Average( const uint8* data, v4i* a ) -{ -#ifdef __SSE4_1__ - __m128i d0 = _mm_loadu_si128(((__m128i*)data) + 0); - __m128i d1 = _mm_loadu_si128(((__m128i*)data) + 1); - __m128i d2 = _mm_loadu_si128(((__m128i*)data) + 2); - __m128i d3 = _mm_loadu_si128(((__m128i*)data) + 3); - - __m128i d0l = _mm_unpacklo_epi8(d0, _mm_setzero_si128()); - __m128i d0h = _mm_unpackhi_epi8(d0, _mm_setzero_si128()); - __m128i d1l = _mm_unpacklo_epi8(d1, _mm_setzero_si128()); - __m128i d1h = _mm_unpackhi_epi8(d1, _mm_setzero_si128()); - __m128i d2l = _mm_unpacklo_epi8(d2, _mm_setzero_si128()); - __m128i d2h = _mm_unpackhi_epi8(d2, _mm_setzero_si128()); - __m128i d3l = _mm_unpacklo_epi8(d3, _mm_setzero_si128()); - __m128i d3h = _mm_unpackhi_epi8(d3, _mm_setzero_si128()); - - __m128i sum0 = _mm_add_epi16(d0l, d1l); - __m128i sum1 = _mm_add_epi16(d0h, d1h); - __m128i sum2 = _mm_add_epi16(d2l, d3l); - __m128i sum3 = _mm_add_epi16(d2h, d3h); - - __m128i sum0l = _mm_unpacklo_epi16(sum0, _mm_setzero_si128()); - __m128i sum0h = _mm_unpackhi_epi16(sum0, _mm_setzero_si128()); - __m128i sum1l = _mm_unpacklo_epi16(sum1, _mm_setzero_si128()); - __m128i sum1h = _mm_unpackhi_epi16(sum1, _mm_setzero_si128()); - __m128i sum2l = _mm_unpacklo_epi16(sum2, _mm_setzero_si128()); - __m128i sum2h = _mm_unpackhi_epi16(sum2, _mm_setzero_si128()); - __m128i sum3l = _mm_unpacklo_epi16(sum3, _mm_setzero_si128()); - __m128i sum3h = _mm_unpackhi_epi16(sum3, _mm_setzero_si128()); - - __m128i b0 = _mm_add_epi32(sum0l, sum0h); - __m128i b1 = _mm_add_epi32(sum1l, sum1h); - __m128i b2 = _mm_add_epi32(sum2l, sum2h); - __m128i b3 = _mm_add_epi32(sum3l, sum3h); - - __m128i a0 = _mm_srli_epi32(_mm_add_epi32(_mm_add_epi32(b2, b3), _mm_set1_epi32(4)), 3); - __m128i a1 = _mm_srli_epi32(_mm_add_epi32(_mm_add_epi32(b0, b1), _mm_set1_epi32(4)), 3); - __m128i a2 = _mm_srli_epi32(_mm_add_epi32(_mm_add_epi32(b1, b3), _mm_set1_epi32(4)), 3); - __m128i a3 = _mm_srli_epi32(_mm_add_epi32(_mm_add_epi32(b0, b2), _mm_set1_epi32(4)), 3); - - _mm_storeu_si128((__m128i*)&a[0], _mm_packus_epi32(_mm_shuffle_epi32(a0, _MM_SHUFFLE(3, 0, 1, 2)), _mm_shuffle_epi32(a1, _MM_SHUFFLE(3, 0, 1, 2)))); - _mm_storeu_si128((__m128i*)&a[2], _mm_packus_epi32(_mm_shuffle_epi32(a2, _MM_SHUFFLE(3, 0, 1, 2)), _mm_shuffle_epi32(a3, _MM_SHUFFLE(3, 0, 1, 2)))); -#else - uint32 r[4]; - uint32 g[4]; - uint32 b[4]; - - memset(r, 0, sizeof(r)); - memset(g, 0, sizeof(g)); - memset(b, 0, sizeof(b)); - - for( int j=0; j<4; j++ ) - { - for( int i=0; i<4; i++ ) - { - int index = (j & 2) + (i >> 1); - b[index] += *data++; - g[index] += *data++; - r[index] += *data++; - data++; - } - } - - a[0][0] = uint16( (r[2] + r[3] + 4) / 8 ); - a[0][1] = uint16( (g[2] + g[3] + 4) / 8 ); - a[0][2] = uint16( (b[2] + b[3] + 4) / 8 ); - a[0][3] = 0; - a[1][0] = uint16( (r[0] + r[1] + 4) / 8 ); - a[1][1] = uint16( (g[0] + g[1] + 4) / 8 ); - a[1][2] = uint16( (b[0] + b[1] + 4) / 8 ); - a[1][3] = 0; - a[2][0] = uint16( (r[1] + r[3] + 4) / 8 ); - a[2][1] = uint16( (g[1] + g[3] + 4) / 8 ); - a[2][2] = uint16( (b[1] + b[3] + 4) / 8 ); - a[2][3] = 0; - a[3][0] = uint16( (r[0] + r[2] + 4) / 8 ); - a[3][1] = uint16( (g[0] + g[2] + 4) / 8 ); - a[3][2] = uint16( (b[0] + b[2] + 4) / 8 ); - a[3][3] = 0; -#endif -} - -void CalcErrorBlock( const uint8* data, uint err[4][4] ) -{ -#ifdef __SSE4_1__ - __m128i d0 = _mm_loadu_si128(((__m128i*)data) + 0); - __m128i d1 = _mm_loadu_si128(((__m128i*)data) + 1); - __m128i d2 = _mm_loadu_si128(((__m128i*)data) + 2); - __m128i d3 = _mm_loadu_si128(((__m128i*)data) + 3); - - __m128i dm0 = _mm_and_si128(d0, _mm_set1_epi32(0x00FFFFFF)); - __m128i dm1 = _mm_and_si128(d1, _mm_set1_epi32(0x00FFFFFF)); - __m128i dm2 = _mm_and_si128(d2, _mm_set1_epi32(0x00FFFFFF)); - __m128i dm3 = _mm_and_si128(d3, _mm_set1_epi32(0x00FFFFFF)); - - __m128i d0l = _mm_unpacklo_epi8(dm0, _mm_setzero_si128()); - __m128i d0h = _mm_unpackhi_epi8(dm0, _mm_setzero_si128()); - __m128i d1l = _mm_unpacklo_epi8(dm1, _mm_setzero_si128()); - __m128i d1h = _mm_unpackhi_epi8(dm1, _mm_setzero_si128()); - __m128i d2l = _mm_unpacklo_epi8(dm2, _mm_setzero_si128()); - __m128i d2h = _mm_unpackhi_epi8(dm2, _mm_setzero_si128()); - __m128i d3l = _mm_unpacklo_epi8(dm3, _mm_setzero_si128()); - __m128i d3h = _mm_unpackhi_epi8(dm3, _mm_setzero_si128()); - - __m128i sum0 = _mm_add_epi16(d0l, d1l); - __m128i sum1 = _mm_add_epi16(d0h, d1h); - __m128i sum2 = _mm_add_epi16(d2l, d3l); - __m128i sum3 = _mm_add_epi16(d2h, d3h); - - __m128i sum0l = _mm_unpacklo_epi16(sum0, _mm_setzero_si128()); - __m128i sum0h = _mm_unpackhi_epi16(sum0, _mm_setzero_si128()); - __m128i sum1l = _mm_unpacklo_epi16(sum1, _mm_setzero_si128()); - __m128i sum1h = _mm_unpackhi_epi16(sum1, _mm_setzero_si128()); - __m128i sum2l = _mm_unpacklo_epi16(sum2, _mm_setzero_si128()); - __m128i sum2h = _mm_unpackhi_epi16(sum2, _mm_setzero_si128()); - __m128i sum3l = _mm_unpacklo_epi16(sum3, _mm_setzero_si128()); - __m128i sum3h = _mm_unpackhi_epi16(sum3, _mm_setzero_si128()); - - __m128i b0 = _mm_add_epi32(sum0l, sum0h); - __m128i b1 = _mm_add_epi32(sum1l, sum1h); - __m128i b2 = _mm_add_epi32(sum2l, sum2h); - __m128i b3 = _mm_add_epi32(sum3l, sum3h); - - __m128i a0 = _mm_add_epi32(b2, b3); - __m128i a1 = _mm_add_epi32(b0, b1); - __m128i a2 = _mm_add_epi32(b1, b3); - __m128i a3 = _mm_add_epi32(b0, b2); - - _mm_storeu_si128((__m128i*)&err[0], a0); - _mm_storeu_si128((__m128i*)&err[1], a1); - _mm_storeu_si128((__m128i*)&err[2], a2); - _mm_storeu_si128((__m128i*)&err[3], a3); -#else - uint terr[4][4]; - - memset(terr, 0, 16 * sizeof(uint)); - - for( int j=0; j<4; j++ ) - { - for( int i=0; i<4; i++ ) - { - int index = (j & 2) + (i >> 1); - uint d = *data++; - terr[index][0] += d; - d = *data++; - terr[index][1] += d; - d = *data++; - terr[index][2] += d; - data++; - } - } - - for( int i=0; i<3; i++ ) - { - err[0][i] = terr[2][i] + terr[3][i]; - err[1][i] = terr[0][i] + terr[1][i]; - err[2][i] = terr[1][i] + terr[3][i]; - err[3][i] = terr[0][i] + terr[2][i]; - } - for( int i=0; i<4; i++ ) - { - err[i][3] = 0; - } -#endif -} - -uint CalcError( const uint block[4], const v4i& average ) -{ - uint err = 0x3FFFFFFF; // Big value to prevent negative values, but small enough to prevent overflow - err -= block[0] * 2 * average[2]; - err -= block[1] * 2 * average[1]; - err -= block[2] * 2 * average[0]; - err += 8 * ( sq( average[0] ) + sq( average[1] ) + sq( average[2] ) ); - return err; -} - -void ProcessAverages( v4i* a ) -{ -#ifdef __SSE4_1__ - for( int i=0; i<2; i++ ) - { - __m128i d = _mm_loadu_si128((__m128i*)a[i*2]); - - __m128i t = _mm_add_epi16(_mm_mullo_epi16(d, _mm_set1_epi16(31)), _mm_set1_epi16(128)); - - __m128i c = _mm_srli_epi16(_mm_add_epi16(t, _mm_srli_epi16(t, 8)), 8); - - __m128i c1 = _mm_shuffle_epi32(c, _MM_SHUFFLE(3, 2, 3, 2)); - __m128i diff = _mm_sub_epi16(c, c1); - diff = _mm_max_epi16(diff, _mm_set1_epi16(-4)); - diff = _mm_min_epi16(diff, _mm_set1_epi16(3)); - - __m128i co = _mm_add_epi16(c1, diff); - - c = _mm_blend_epi16(co, c, 0xF0); - - __m128i a0 = _mm_or_si128(_mm_slli_epi16(c, 3), _mm_srli_epi16(c, 2)); - - _mm_storeu_si128((__m128i*)a[4+i*2], a0); - } - - for( int i=0; i<2; i++ ) - { - __m128i d = _mm_loadu_si128((__m128i*)a[i*2]); - - __m128i t0 = _mm_add_epi16(_mm_mullo_epi16(d, _mm_set1_epi16(15)), _mm_set1_epi16(128)); - __m128i t1 = _mm_srli_epi16(_mm_add_epi16(t0, _mm_srli_epi16(t0, 8)), 8); - - __m128i t2 = _mm_or_si128(t1, _mm_slli_epi16(t1, 4)); - - _mm_storeu_si128((__m128i*)a[i*2], t2); - } -#else - for( int i=0; i<2; i++ ) - { - for( int j=0; j<3; j++ ) - { - int32 c1 = mul8bit( a[i*2+1][j], 31 ); - int32 c2 = mul8bit( a[i*2][j], 31 ); - - int32 diff = c2 - c1; - if( diff > 3 ) diff = 3; - else if( diff < -4 ) diff = -4; - - int32 co = c1 + diff; - - a[5+i*2][j] = ( c1 << 3 ) | ( c1 >> 2 ); - a[4+i*2][j] = ( co << 3 ) | ( co >> 2 ); - } - } - - for( int i=0; i<4; i++ ) - { - a[i][0] = g_avg2[mul8bit( a[i][0], 15 )]; - a[i][1] = g_avg2[mul8bit( a[i][1], 15 )]; - a[i][2] = g_avg2[mul8bit( a[i][2], 15 )]; - } -#endif -} - -void EncodeAverages( uint64& _d, const v4i* a, size_t idx ) -{ - uint64 d = _d; - d |= ( idx << 24 ); - size_t base = idx << 1; - - if( ( idx & 0x2 ) == 0 ) - { - for( int i=0; i<3; i++ ) - { - d |= uint64( a[base+0][i] >> 4 ) << ( i*8 ); - d |= uint64( a[base+1][i] >> 4 ) << ( i*8 + 4 ); - } - } - else - { - for( int i=0; i<3; i++ ) - { - d |= uint64( a[base+1][i] & 0xF8 ) << ( i*8 ); - int32 c = ( ( a[base+0][i] & 0xF8 ) - ( a[base+1][i] & 0xF8 ) ) >> 3; - c &= ~0xFFFFFFF8; - d |= ((uint64)c) << ( i*8 ); - } - } - _d = d; -} - -uint64 CheckSolid( const uint8* src ) -{ -#ifdef __SSE4_1__ - __m128i d0 = _mm_loadu_si128(((__m128i*)src) + 0); - __m128i d1 = _mm_loadu_si128(((__m128i*)src) + 1); - __m128i d2 = _mm_loadu_si128(((__m128i*)src) + 2); - __m128i d3 = _mm_loadu_si128(((__m128i*)src) + 3); - - __m128i c = _mm_shuffle_epi32(d0, _MM_SHUFFLE(0, 0, 0, 0)); - - __m128i c0 = _mm_cmpeq_epi8(d0, c); - __m128i c1 = _mm_cmpeq_epi8(d1, c); - __m128i c2 = _mm_cmpeq_epi8(d2, c); - __m128i c3 = _mm_cmpeq_epi8(d3, c); - - __m128i m0 = _mm_and_si128(c0, c1); - __m128i m1 = _mm_and_si128(c2, c3); - __m128i m = _mm_and_si128(m0, m1); - - if (!_mm_testc_si128(m, _mm_set1_epi32(-1))) - { - return 0; - } -#else - const uint8* ptr = src + 4; - for( int i=1; i<16; i++ ) - { - if( memcmp( src, ptr, 4 ) != 0 ) - { - return 0; - } - ptr += 4; - } -#endif - return 0x02000000 | - ( uint( src[0] & 0xF8 ) << 16 ) | - ( uint( src[1] & 0xF8 ) << 8 ) | - ( uint( src[2] & 0xF8 ) ); -} - -void PrepareAverages( v4i a[8], const uint8* src, uint err[4] ) -{ - Average( src, a ); - ProcessAverages( a ); - - uint errblock[4][4]; - CalcErrorBlock( src, errblock ); - - for( int i=0; i<4; i++ ) - { - err[i/2] += CalcError( errblock[i], a[i] ); - err[2+i/2] += CalcError( errblock[i], a[i+4] ); - } -} - -void FindBestFit( uint64 terr[2][8], uint16 tsel[16][8], v4i a[8], const uint32* id, const uint8* data ) -{ - for( size_t i=0; i<16; i++ ) - { - uint16* sel = tsel[i]; - uint bid = id[i]; - uint64* ter = terr[bid%2]; - - uint8 b = *data++; - uint8 g = *data++; - uint8 r = *data++; - data++; - - int dr = a[bid][0] - r; - int dg = a[bid][1] - g; - int db = a[bid][2] - b; - -#ifdef __SSE4_1__ - // Reference implementation - - __m128i pix = _mm_set1_epi32(dr * 77 + dg * 151 + db * 28); - // Taking the absolute value is way faster. The values are only used to sort, so the result will be the same. - __m128i error0 = _mm_abs_epi32(_mm_add_epi32(pix, g_table256_SIMD[0])); - __m128i error1 = _mm_abs_epi32(_mm_add_epi32(pix, g_table256_SIMD[1])); - __m128i error2 = _mm_abs_epi32(_mm_sub_epi32(pix, g_table256_SIMD[0])); - __m128i error3 = _mm_abs_epi32(_mm_sub_epi32(pix, g_table256_SIMD[1])); - - __m128i index0 = _mm_and_si128(_mm_cmplt_epi32(error1, error0), _mm_set1_epi32(1)); - __m128i minError0 = _mm_min_epi32(error0, error1); - - __m128i index1 = _mm_sub_epi32(_mm_set1_epi32(2), _mm_cmplt_epi32(error3, error2)); - __m128i minError1 = _mm_min_epi32(error2, error3); - - __m128i minIndex0 = _mm_blendv_epi8(index0, index1, _mm_cmplt_epi32(minError1, minError0)); - __m128i minError = _mm_min_epi32(minError0, minError1); - - // Squaring the minimum error to produce correct values when adding - __m128i minErrorLow = _mm_shuffle_epi32(minError, _MM_SHUFFLE(1, 1, 0, 0)); - __m128i squareErrorLow = _mm_mul_epi32(minErrorLow, minErrorLow); - squareErrorLow = _mm_add_epi64(squareErrorLow, _mm_loadu_si128(((__m128i*)ter) + 0)); - _mm_storeu_si128(((__m128i*)ter) + 0, squareErrorLow); - __m128i minErrorHigh = _mm_shuffle_epi32(minError, _MM_SHUFFLE(3, 3, 2, 2)); - __m128i squareErrorHigh = _mm_mul_epi32(minErrorHigh, minErrorHigh); - squareErrorHigh = _mm_add_epi64(squareErrorHigh, _mm_loadu_si128(((__m128i*)ter) + 1)); - _mm_storeu_si128(((__m128i*)ter) + 1, squareErrorHigh); - - // Taking the absolute value is way faster. The values are only used to sort, so the result will be the same. - error0 = _mm_abs_epi32(_mm_add_epi32(pix, g_table256_SIMD[2])); - error1 = _mm_abs_epi32(_mm_add_epi32(pix, g_table256_SIMD[3])); - error2 = _mm_abs_epi32(_mm_sub_epi32(pix, g_table256_SIMD[2])); - error3 = _mm_abs_epi32(_mm_sub_epi32(pix, g_table256_SIMD[3])); - - index0 = _mm_and_si128(_mm_cmplt_epi32(error1, error0), _mm_set1_epi32(1)); - minError0 = _mm_min_epi32(error0, error1); - - index1 = _mm_sub_epi32(_mm_set1_epi32(2), _mm_cmplt_epi32(error3, error2)); - minError1 = _mm_min_epi32(error2, error3); - - __m128i minIndex1 = _mm_blendv_epi8(index0, index1, _mm_cmplt_epi32(minError1, minError0)); - minError = _mm_min_epi32(minError0, minError1); - - // Squaring the minimum error to produce correct values when adding - minErrorLow = _mm_shuffle_epi32(minError, _MM_SHUFFLE(1, 1, 0, 0)); - squareErrorLow = _mm_mul_epi32(minErrorLow, minErrorLow); - squareErrorLow = _mm_add_epi64(squareErrorLow, _mm_loadu_si128(((__m128i*)ter) + 2)); - _mm_storeu_si128(((__m128i*)ter) + 2, squareErrorLow); - minErrorHigh = _mm_shuffle_epi32(minError, _MM_SHUFFLE(3, 3, 2, 2)); - squareErrorHigh = _mm_mul_epi32(minErrorHigh, minErrorHigh); - squareErrorHigh = _mm_add_epi64(squareErrorHigh, _mm_loadu_si128(((__m128i*)ter) + 3)); - _mm_storeu_si128(((__m128i*)ter) + 3, squareErrorHigh); - __m128i minIndex = _mm_packs_epi32(minIndex0, minIndex1); - _mm_storeu_si128((__m128i*)sel, minIndex); -#else - int pix = dr * 77 + dg * 151 + db * 28; - - for( int t=0; t<8; t++ ) - { - const int64* tab = g_table256[t]; - uint idx = 0; - uint64 err = sq( tab[0] + pix ); - for( int j=1; j<4; j++ ) - { - uint64 local = sq( tab[j] + pix ); - if( local < err ) - { - err = local; - idx = j; - } - } - *sel++ = idx; - *ter++ += err; - } -#endif - } -} - -#ifdef __SSE4_1__ -// Non-reference implementation, but faster. Produces same results as the AVX2 version -void FindBestFit( uint32 terr[2][8], uint16 tsel[16][8], v4i a[8], const uint32* id, const uint8* data ) -{ - for( size_t i=0; i<16; i++ ) - { - uint16* sel = tsel[i]; - uint bid = id[i]; - uint32* ter = terr[bid%2]; - - uint8 b = *data++; - uint8 g = *data++; - uint8 r = *data++; - data++; - - int dr = a[bid][0] - r; - int dg = a[bid][1] - g; - int db = a[bid][2] - b; - - // The scaling values are divided by two and rounded, to allow the differences to be in the range of signed int16 - // This produces slightly different results, but is significant faster - __m128i pixel = _mm_set1_epi16(dr * 38 + dg * 76 + db * 14); - __m128i pix = _mm_abs_epi16(pixel); - - // Taking the absolute value is way faster. The values are only used to sort, so the result will be the same. - // Since the selector table is symmetrical, we need to calculate the difference only for half of the entries. - __m128i error0 = _mm_abs_epi16(_mm_sub_epi16(pix, g_table128_SIMD[0])); - __m128i error1 = _mm_abs_epi16(_mm_sub_epi16(pix, g_table128_SIMD[1])); - - __m128i index = _mm_and_si128(_mm_cmplt_epi16(error1, error0), _mm_set1_epi16(1)); - __m128i minError = _mm_min_epi16(error0, error1); - - // Exploiting symmetry of the selector table and use the sign bit - // This produces slightly different results, but is needed to produce same results as AVX2 implementation - __m128i indexBit = _mm_andnot_si128(_mm_srli_epi16(pixel, 15), _mm_set1_epi8(-1)); - __m128i minIndex = _mm_or_si128(index, _mm_add_epi16(indexBit, indexBit)); - - // Squaring the minimum error to produce correct values when adding - __m128i squareErrorLo = _mm_mullo_epi16(minError, minError); - __m128i squareErrorHi = _mm_mulhi_epi16(minError, minError); - - __m128i squareErrorLow = _mm_unpacklo_epi16(squareErrorLo, squareErrorHi); - __m128i squareErrorHigh = _mm_unpackhi_epi16(squareErrorLo, squareErrorHi); - - squareErrorLow = _mm_add_epi32(squareErrorLow, _mm_loadu_si128(((__m128i*)ter) + 0)); - _mm_storeu_si128(((__m128i*)ter) + 0, squareErrorLow); - squareErrorHigh = _mm_add_epi32(squareErrorHigh, _mm_loadu_si128(((__m128i*)ter) + 1)); - _mm_storeu_si128(((__m128i*)ter) + 1, squareErrorHigh); - - _mm_storeu_si128((__m128i*)sel, minIndex); - } -} -#endif - -uint8_t convert6(float f) -{ - int i = (std::min(std::max(static_cast(f), 0), 1023) - 15) >> 1; - return (i + 11 - ((i + 11) >> 7) - ((i + 4) >> 7)) >> 3; -} - -uint8_t convert7(float f) -{ - int i = (std::min(std::max(static_cast(f), 0), 1023) - 15) >> 1; - return (i + 9 - ((i + 9) >> 8) - ((i + 6) >> 8)) >> 2; -} - -std::pair Planar(const uint8* src) -{ - int32 r = 0; - int32 g = 0; - int32 b = 0; - - for (int i = 0; i < 16; ++i) - { - b += src[i * 4 + 0]; - g += src[i * 4 + 1]; - r += src[i * 4 + 2]; - } - - int32 difRyz = 0; - int32 difGyz = 0; - int32 difByz = 0; - int32 difRxz = 0; - int32 difGxz = 0; - int32 difBxz = 0; - - const int32 scaling[] = { -255, -85, 85, 255 }; - - for (int i = 0; i < 16; ++i) - { - int32 difB = (static_cast(src[i * 4 + 0]) << 4) - b; - int32 difG = (static_cast(src[i * 4 + 1]) << 4) - g; - int32 difR = (static_cast(src[i * 4 + 2]) << 4) - r; - - difRyz += difR * scaling[i % 4]; - difGyz += difG * scaling[i % 4]; - difByz += difB * scaling[i % 4]; - - difRxz += difR * scaling[i / 4]; - difGxz += difG * scaling[i / 4]; - difBxz += difB * scaling[i / 4]; - } - - const float scale = -4.0f / ((255 * 255 * 8.0f + 85 * 85 * 8.0f) * 16.0f); - - float aR = difRxz * scale; - float aG = difGxz * scale; - float aB = difBxz * scale; - - float bR = difRyz * scale; - float bG = difGyz * scale; - float bB = difByz * scale; - - float dR = r * (4.0f / 16.0f); - float dG = g * (4.0f / 16.0f); - float dB = b * (4.0f / 16.0f); - - // calculating the three colors RGBO, RGBH, and RGBV. RGB = df - af * x - bf * y; - float cofR = (aR * 255.0f + (bR * 255.0f + dR)); - float cofG = (aG * 255.0f + (bG * 255.0f + dG)); - float cofB = (aB * 255.0f + (bB * 255.0f + dB)); - float chfR = (aR * -425.0f + (bR * 255.0f + dR)); - float chfG = (aG * -425.0f + (bG * 255.0f + dG)); - float chfB = (aB * -425.0f + (bB * 255.0f + dB)); - float cvfR = (aR * 255.0f + (bR * -425.0f + dR)); - float cvfG = (aG * 255.0f + (bG * -425.0f + dG)); - float cvfB = (aB * 255.0f + (bB * -425.0f + dB)); - - // convert to r6g7b6 - int32 coR = convert6(cofR); - int32 coG = convert7(cofG); - int32 coB = convert6(cofB); - int32 chR = convert6(chfR); - int32 chG = convert7(chfG); - int32 chB = convert6(chfB); - int32 cvR = convert6(cvfR); - int32 cvG = convert7(cvfG); - int32 cvB = convert6(cvfB); - - // Error calculation - int32 ro0 = coR; - int32 go0 = coG; - int32 bo0 = coB; - int32 ro1 = (ro0 >> 4) | (ro0 << 2); - int32 go1 = (go0 >> 6) | (go0 << 1); - int32 bo1 = (bo0 >> 4) | (bo0 << 2); - int32 ro2 = (ro1 << 2) + 2; - int32 go2 = (go1 << 2) + 2; - int32 bo2 = (bo1 << 2) + 2; - - int32 rh0 = chR; - int32 gh0 = chG; - int32 bh0 = chB; - int32 rh1 = (rh0 >> 4) | (rh0 << 2); - int32 gh1 = (gh0 >> 6) | (gh0 << 1); - int32 bh1 = (bh0 >> 4) | (bh0 << 2); - - int32 rh2 = rh1 - ro1; - int32 gh2 = gh1 - go1; - int32 bh2 = bh1 - bo1; - - int32 rv0 = cvR; - int32 gv0 = cvG; - int32 bv0 = cvB; - int32 rv1 = (rv0 >> 4) | (rv0 << 2); - int32 gv1 = (gv0 >> 6) | (gv0 << 1); - int32 bv1 = (bv0 >> 4) | (bv0 << 2); - - int32 rv2 = rv1 - ro1; - int32 gv2 = gv1 - go1; - int32 bv2 = bv1 - bo1; - - uint64 error = 0; - - for (int i = 0; i < 16; ++i) - { - int32 cR = clampu8((rh2 * (i / 4) + rv2 * (i % 4) + ro2) >> 2); - int32 cG = clampu8((gh2 * (i / 4) + gv2 * (i % 4) + go2) >> 2); - int32 cB = clampu8((bh2 * (i / 4) + bv2 * (i % 4) + bo2) >> 2); - - int32 difB = static_cast(src[i * 4 + 0]) - cB; - int32 difG = static_cast(src[i * 4 + 1]) - cG; - int32 difR = static_cast(src[i * 4 + 2]) - cR; - - int32 dif = difR * 38 + difG * 76 + difB * 14; - - error += dif * dif; - } - - /**/ - uint32 rgbv = cvB | (cvG << 6) | (cvR << 13); - uint32 rgbh = chB | (chG << 6) | (chR << 13); - uint32 hi = rgbv | ((rgbh & 0x1FFF) << 19); - uint32 lo = (chR & 0x1) | 0x2 | ((chR << 1) & 0x7C); - lo |= ((coB & 0x07) << 7) | ((coB & 0x18) << 8) | ((coB & 0x20) << 11); - lo |= ((coG & 0x3F) << 17) | ((coG & 0x40) << 18); - lo |= coR << 25; - - const int32 idx = (coR & 0x20) | ((coG & 0x20) >> 1) | ((coB & 0x1E) >> 1); - - lo |= g_flags[idx]; - - uint64 result = static_cast(bx::endianSwap(lo)); - result |= static_cast(static_cast(bx::endianSwap(hi))) << 32; - - return std::make_pair(result, error); -} - -template -uint64 EncodeSelectors( uint64 d, const T terr[2][8], const S tsel[16][8], const uint32* id, const uint64 value, const uint64 error) -{ - size_t tidx[2]; - tidx[0] = GetLeastError( terr[0], 8 ); - tidx[1] = GetLeastError( terr[1], 8 ); - - if ((terr[0][tidx[0]] + terr[1][tidx[1]]) >= error) - { - return value; - } - - d |= tidx[0] << 26; - d |= tidx[1] << 29; - for( int i=0; i<16; i++ ) - { - uint64 t = tsel[i][tidx[id[i]%2]]; - d |= ( t & 0x1 ) << ( i + 32 ); - d |= ( t & 0x2 ) << ( i + 47 ); - } - - return FixByteOrder(d); -} -} - -uint64 ProcessRGB( const uint8* src ) -{ - uint64 d = CheckSolid( src ); - if( d != 0 ) return d; - - v4i a[8]; - uint err[4] = {}; - PrepareAverages( a, src, err ); - size_t idx = GetLeastError( err, 4 ); - EncodeAverages( d, a, idx ); - -#if defined __SSE4_1__ && !defined REFERENCE_IMPLEMENTATION - uint32 terr[2][8] = {}; -#else - uint64 terr[2][8] = {}; -#endif - uint16 tsel[16][8]; - const uint32* id = g_id[idx]; - FindBestFit( terr, tsel, a, id, src ); - - return FixByteOrder( EncodeSelectors( d, terr, tsel, id ) ); -} - -uint64 ProcessRGB_ETC2( const uint8* src ) -{ - std::pair result = Planar( src ); - - uint64 d = 0; - - v4i a[8]; - uint err[4] = {}; - PrepareAverages( a, src, err ); - size_t idx = GetLeastError( err, 4 ); - EncodeAverages( d, a, idx ); - - uint64 terr[2][8] = {}; - uint16 tsel[16][8]; - const uint32* id = g_id[idx]; - FindBestFit( terr, tsel, a, id, src ); - - return EncodeSelectors( d, terr, tsel, id, result.first, result.second ); -} diff --git a/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.hpp b/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.hpp deleted file mode 100644 index 21434a3..0000000 --- a/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.hpp +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __PROCESSRGB_HPP__ -#define __PROCESSRGB_HPP__ - -#include "Types.hpp" - -uint64 ProcessRGB( const uint8* src ); -uint64 ProcessRGB_ETC2( const uint8* src ); - -#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/Tables.cpp b/3rdparty/bgfx/3rdparty/etc2/Tables.cpp deleted file mode 100644 index 968fbf5..0000000 --- a/3rdparty/bgfx/3rdparty/etc2/Tables.cpp +++ /dev/null @@ -1,109 +0,0 @@ -#include "Tables.hpp" - -const int32 g_table[8][4] = { - { 2, 8, -2, -8 }, - { 5, 17, -5, -17 }, - { 9, 29, -9, -29 }, - { 13, 42, -13, -42 }, - { 18, 60, -18, -60 }, - { 24, 80, -24, -80 }, - { 33, 106, -33, -106 }, - { 47, 183, -47, -183 } -}; - -const int64 g_table256[8][4] = { - { 2*256, 8*256, -2*256, -8*256 }, - { 5*256, 17*256, -5*256, -17*256 }, - { 9*256, 29*256, -9*256, -29*256 }, - { 13*256, 42*256, -13*256, -42*256 }, - { 18*256, 60*256, -18*256, -60*256 }, - { 24*256, 80*256, -24*256, -80*256 }, - { 33*256, 106*256, -33*256, -106*256 }, - { 47*256, 183*256, -47*256, -183*256 } -}; - -const uint32 g_id[4][16] = { - { 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, - { 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2 }, - { 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4 }, - { 7, 7, 6, 6, 7, 7, 6, 6, 7, 7, 6, 6, 7, 7, 6, 6 } -}; - -const uint32 g_avg2[16] = { - 0x00, - 0x11, - 0x22, - 0x33, - 0x44, - 0x55, - 0x66, - 0x77, - 0x88, - 0x99, - 0xAA, - 0xBB, - 0xCC, - 0xDD, - 0xEE, - 0xFF -}; - -const uint32 g_flags[64] = { - 0x80800402, 0x80800402, 0x80800402, 0x80800402, - 0x80800402, 0x80800402, 0x80800402, 0x8080E002, - 0x80800402, 0x80800402, 0x8080E002, 0x8080E002, - 0x80800402, 0x8080E002, 0x8080E002, 0x8080E002, - 0x80000402, 0x80000402, 0x80000402, 0x80000402, - 0x80000402, 0x80000402, 0x80000402, 0x8000E002, - 0x80000402, 0x80000402, 0x8000E002, 0x8000E002, - 0x80000402, 0x8000E002, 0x8000E002, 0x8000E002, - 0x00800402, 0x00800402, 0x00800402, 0x00800402, - 0x00800402, 0x00800402, 0x00800402, 0x0080E002, - 0x00800402, 0x00800402, 0x0080E002, 0x0080E002, - 0x00800402, 0x0080E002, 0x0080E002, 0x0080E002, - 0x00000402, 0x00000402, 0x00000402, 0x00000402, - 0x00000402, 0x00000402, 0x00000402, 0x0000E002, - 0x00000402, 0x00000402, 0x0000E002, 0x0000E002, - 0x00000402, 0x0000E002, 0x0000E002, 0x0000E002 -}; - -#ifdef __SSE4_1__ -const uint8 g_flags_AVX2[64] = -{ - 0x63, 0x63, 0x63, 0x63, - 0x63, 0x63, 0x63, 0x7D, - 0x63, 0x63, 0x7D, 0x7D, - 0x63, 0x7D, 0x7D, 0x7D, - 0x43, 0x43, 0x43, 0x43, - 0x43, 0x43, 0x43, 0x5D, - 0x43, 0x43, 0x5D, 0x5D, - 0x43, 0x5D, 0x5D, 0x5D, - 0x23, 0x23, 0x23, 0x23, - 0x23, 0x23, 0x23, 0x3D, - 0x23, 0x23, 0x3D, 0x3D, - 0x23, 0x3D, 0x3D, 0x3D, - 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x1D, - 0x03, 0x03, 0x1D, 0x1D, - 0x03, 0x1D, 0x1D, 0x1D, -}; - -const __m128i g_table_SIMD[2] = -{ - _mm_setr_epi16( 2, 5, 9, 13, 18, 24, 33, 47), - _mm_setr_epi16( 8, 17, 29, 42, 60, 80, 106, 183) -}; -const __m128i g_table128_SIMD[2] = -{ - _mm_setr_epi16( 2*128, 5*128, 9*128, 13*128, 18*128, 24*128, 33*128, 47*128), - _mm_setr_epi16( 8*128, 17*128, 29*128, 42*128, 60*128, 80*128, 106*128, 183*128) -}; -const __m128i g_table256_SIMD[4] = -{ - _mm_setr_epi32( 2*256, 5*256, 9*256, 13*256), - _mm_setr_epi32( 8*256, 17*256, 29*256, 42*256), - _mm_setr_epi32( 18*256, 24*256, 33*256, 47*256), - _mm_setr_epi32( 60*256, 80*256, 106*256, 183*256) -}; -#endif - diff --git a/3rdparty/bgfx/3rdparty/etc2/Tables.hpp b/3rdparty/bgfx/3rdparty/etc2/Tables.hpp deleted file mode 100644 index b570526..0000000 --- a/3rdparty/bgfx/3rdparty/etc2/Tables.hpp +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __TABLES_HPP__ -#define __TABLES_HPP__ - -#include "Types.hpp" -#ifdef __SSE4_1__ -#include -#endif - -extern const int32 g_table[8][4]; -extern const int64 g_table256[8][4]; - -extern const uint32 g_id[4][16]; - -extern const uint32 g_avg2[16]; - -extern const uint32 g_flags[64]; - -#ifdef __SSE4_1__ -extern const uint8 g_flags_AVX2[64]; -extern const __m128i g_table_SIMD[2]; -extern const __m128i g_table128_SIMD[2]; -extern const __m128i g_table256_SIMD[4]; -#endif - -#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/Types.hpp b/3rdparty/bgfx/3rdparty/etc2/Types.hpp deleted file mode 100644 index b31da22..0000000 --- a/3rdparty/bgfx/3rdparty/etc2/Types.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __DARKRL__TYPES_HPP__ -#define __DARKRL__TYPES_HPP__ - -#include - -typedef int8_t int8; -typedef uint8_t uint8; -typedef int16_t int16; -typedef uint16_t uint16; -typedef int32_t int32; -typedef uint32_t uint32; -typedef int64_t int64; -typedef uint64_t uint64; - -typedef unsigned int uint; - -#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/Vector.hpp b/3rdparty/bgfx/3rdparty/etc2/Vector.hpp deleted file mode 100644 index 3005fdc..0000000 --- a/3rdparty/bgfx/3rdparty/etc2/Vector.hpp +++ /dev/null @@ -1,222 +0,0 @@ -#ifndef __DARKRL__VECTOR_HPP__ -#define __DARKRL__VECTOR_HPP__ - -#include -#include -#include - -#include "Math.hpp" -#include "Types.hpp" - -template -struct Vector2 -{ - Vector2() : x( 0 ), y( 0 ) {} - Vector2( T v ) : x( v ), y( v ) {} - Vector2( T _x, T _y ) : x( _x ), y( _y ) {} - - bool operator==( const Vector2& rhs ) const { return x == rhs.x && y == rhs.y; } - bool operator!=( const Vector2& rhs ) const { return !( *this == rhs ); } - - Vector2& operator+=( const Vector2& rhs ) - { - x += rhs.x; - y += rhs.y; - return *this; - } - Vector2& operator-=( const Vector2& rhs ) - { - x -= rhs.x; - y -= rhs.y; - return *this; - } - Vector2& operator*=( const Vector2& rhs ) - { - x *= rhs.x; - y *= rhs.y; - return *this; - } - - T x, y; -}; - -template -Vector2 operator+( const Vector2& lhs, const Vector2& rhs ) -{ - return Vector2( lhs.x + rhs.x, lhs.y + rhs.y ); -} - -template -Vector2 operator-( const Vector2& lhs, const Vector2& rhs ) -{ - return Vector2( lhs.x - rhs.x, lhs.y - rhs.y ); -} - -template -Vector2 operator*( const Vector2& lhs, const float& rhs ) -{ - return Vector2( lhs.x * rhs, lhs.y * rhs ); -} - -template -Vector2 operator/( const Vector2& lhs, const T& rhs ) -{ - return Vector2( lhs.x / rhs, lhs.y / rhs ); -} - - -typedef Vector2 v2i; -typedef Vector2 v2f; - - -template -struct Vector3 -{ - Vector3() : x( 0 ), y( 0 ), z( 0 ) {} - Vector3( T v ) : x( v ), y( v ), z( v ) {} - Vector3( T _x, T _y, T _z ) : x( _x ), y( _y ), z( _z ) {} - template - Vector3( const Vector3& v ) : x( T( v.x ) ), y( T( v.y ) ), z( T( v.z ) ) {} - - T Luminance() const { return T( x * 0.3f + y * 0.59f + z * 0.11f ); } - void Clamp() - { - x = std::min( T(1), std::max( T(0), x ) ); - y = std::min( T(1), std::max( T(0), y ) ); - z = std::min( T(1), std::max( T(0), z ) ); - } - - bool operator==( const Vector3& rhs ) const { return x == rhs.x && y == rhs.y && z == rhs.z; } - bool operator!=( const Vector2& rhs ) const { return !( *this == rhs ); } - - T& operator[]( uint idx ) { assert( idx < 3 ); return ((T*)this)[idx]; } - const T& operator[]( uint idx ) const { assert( idx < 3 ); return ((T*)this)[idx]; } - - Vector3 operator+=( const Vector3& rhs ) - { - x += rhs.x; - y += rhs.y; - z += rhs.z; - return *this; - } - - Vector3 operator*=( const Vector3& rhs ) - { - x *= rhs.x; - y *= rhs.y; - z *= rhs.z; - return *this; - } - - Vector3 operator*=( const float& rhs ) - { - x *= rhs; - y *= rhs; - z *= rhs; - return *this; - } - - T x, y, z; - T padding; -}; - -template -Vector3 operator+( const Vector3& lhs, const Vector3& rhs ) -{ - return Vector3( lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z ); -} - -template -Vector3 operator-( const Vector3& lhs, const Vector3& rhs ) -{ - return Vector3( lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z ); -} - -template -Vector3 operator*( const Vector3& lhs, const Vector3& rhs ) -{ - return Vector3( lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z ); -} - -template -Vector3 operator*( const Vector3& lhs, const float& rhs ) -{ - return Vector3( T( lhs.x * rhs ), T( lhs.y * rhs ), T( lhs.z * rhs ) ); -} - -template -Vector3 operator/( const Vector3& lhs, const T& rhs ) -{ - return Vector3( lhs.x / rhs, lhs.y / rhs, lhs.z / rhs ); -} - -template -bool operator<( const Vector3& lhs, const Vector3& rhs ) -{ - return lhs.Luminance() < rhs.Luminance(); -} - -typedef Vector3 v3i; -typedef Vector3 v3f; -typedef Vector3 v3b; - - -static inline v3b v3f_to_v3b( const v3f& v ) -{ - return v3b( uint8( std::min( 1.f, v.x ) * 255 ), uint8( std::min( 1.f, v.y ) * 255 ), uint8( std::min( 1.f, v.z ) * 255 ) ); -} - -template -Vector3 Mix( const Vector3& v1, const Vector3& v2, float amount ) -{ - return v1 + ( v2 - v1 ) * amount; -} - -template<> -inline v3b Mix( const v3b& v1, const v3b& v2, float amount ) -{ - return v3b( v3f( v1 ) + ( v3f( v2 ) - v3f( v1 ) ) * amount ); -} - -template -Vector3 Desaturate( const Vector3& v ) -{ - T l = v.Luminance(); - return Vector3( l, l, l ); -} - -template -Vector3 Desaturate( const Vector3& v, float mul ) -{ - T l = T( v.Luminance() * mul ); - return Vector3( l, l, l ); -} - -template -Vector3 pow( const Vector3& base, float exponent ) -{ - return Vector3( - pow( base.x, exponent ), - pow( base.y, exponent ), - pow( base.z, exponent ) ); -} - -template -Vector3 sRGB2linear( const Vector3& v ) -{ - return Vector3( - sRGB2linear( v.x ), - sRGB2linear( v.y ), - sRGB2linear( v.z ) ); -} - -template -Vector3 linear2sRGB( const Vector3& v ) -{ - return Vector3( - linear2sRGB( v.x ), - linear2sRGB( v.y ), - linear2sRGB( v.z ) ); -} - -#endif diff --git a/3rdparty/bgfx/3rdparty/fcpp/cpp1.c b/3rdparty/bgfx/3rdparty/fcpp/cpp1.c index 17e6fc8..7f19b9a 100644 --- a/3rdparty/bgfx/3rdparty/fcpp/cpp1.c +++ b/3rdparty/bgfx/3rdparty/fcpp/cpp1.c @@ -42,6 +42,7 @@ int fppPreProcess(struct fppTag *tags) { size_t i=0; ReturnCode ret; /* cpp return code */ + int retVal; /* fppPreProcess return code */ struct Global *global; global=(struct Global *)malloc(sizeof(struct Global)); @@ -144,10 +145,16 @@ int fppPreProcess(struct fppTag *tags) } fflush(stdout); // BK - fclose(stdout); + delalldefines(global); + retVal = IO_NORMAL; if (global->errors > 0 && !global->eflag) - return(IO_ERROR); - return(IO_NORMAL); /* No errors or -E option set */ + retVal = IO_ERROR; + free(global->tokenbuf); + free(global->functionname); + free(global->spacebuf); + free(global); + return retVal; /* No errors or -E option set */ } INLINE FILE_LOCAL diff --git a/3rdparty/bgfx/3rdparty/fcpp/cpp3.c b/3rdparty/bgfx/3rdparty/fcpp/cpp3.c index 981c499..245c7df 100644 --- a/3rdparty/bgfx/3rdparty/fcpp/cpp3.c +++ b/3rdparty/bgfx/3rdparty/fcpp/cpp3.c @@ -363,7 +363,7 @@ ReturnCode initdefines(struct Global *global) return(FPP_OK); } -void deldefines(struct Global *global) +void delbuiltindefines(struct Global *global) { /* * Delete the built-in #define's. diff --git a/3rdparty/bgfx/3rdparty/fcpp/cpp6.c b/3rdparty/bgfx/3rdparty/fcpp/cpp6.c index 30d2269..fe8278a 100644 --- a/3rdparty/bgfx/3rdparty/fcpp/cpp6.c +++ b/3rdparty/bgfx/3rdparty/fcpp/cpp6.c @@ -619,12 +619,35 @@ DEFBUF *defendel(struct Global *global, } +void delalldefines(struct Global *global) +{ + /* + * Delete all the defines in the tables and free memory + */ + + DEFBUF *dp; + DEFBUF *prevp; + int i; + + for (i = 0; i < SBSIZE; ++i) + { + prevp = global->symtab[i]; + while ((dp = prevp) != (DEFBUF *)NULL) { + prevp = dp->link; + free(dp->repl); /* Free the replacement */ + free((char *)dp); /* Free the symbol */ + } + global->symtab[i] = NULL; + } +} + + void outdefines(struct Global *global) { DEFBUF *dp; DEFBUF **syp; - deldefines(global); /* Delete built-in #defines */ + delbuiltindefines(global); /* Delete built-in #defines */ for (syp = global->symtab; syp < &global->symtab[SBSIZE]; syp++) { if ((dp = *syp) != (DEFBUF *) NULL) { do { diff --git a/3rdparty/bgfx/3rdparty/fcpp/cppadd.h b/3rdparty/bgfx/3rdparty/fcpp/cppadd.h index 8494ac6..9749486 100644 --- a/3rdparty/bgfx/3rdparty/fcpp/cppadd.h +++ b/3rdparty/bgfx/3rdparty/fcpp/cppadd.h @@ -407,7 +407,8 @@ void dumpadef(char *, register DEFBUF *); #endif ReturnCode openfile(struct Global *,char *); int cget(struct Global *); -void deldefines(struct Global *); +void delbuiltindefines(struct Global *); +void delalldefines(struct Global *); char *Getmem(struct Global *, int); ReturnCode openinclude(struct Global *, char *, int); ReturnCode expstuff(struct Global *, char *, char *); diff --git a/3rdparty/bgfx/3rdparty/forsyth-too/forsythtriangleorderoptimizer.cpp b/3rdparty/bgfx/3rdparty/forsyth-too/forsythtriangleorderoptimizer.cpp index 261016f..a0d973a 100644 --- a/3rdparty/bgfx/3rdparty/forsyth-too/forsythtriangleorderoptimizer.cpp +++ b/3rdparty/bgfx/3rdparty/forsyth-too/forsythtriangleorderoptimizer.cpp @@ -14,18 +14,14 @@ // IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //----------------------------------------------------------------------------- +#include #include #include #include -#include #include namespace Forsyth { - typedef unsigned int uint; - typedef unsigned short uint16; - typedef unsigned char byte; - //----------------------------------------------------------------------------- // OptimizeFaces //----------------------------------------------------------------------------- @@ -36,13 +32,27 @@ namespace Forsyth // the number of indices in the list // vertexCount // the largest index value in indexList + // vertexBaseIndex + // starting vertex index subtracted from each index in indexList to + // allow safe operation on multiple objects in a single index buffer // newIndexList // a pointer to a preallocated buffer the same size as indexList to // hold the optimized index list // lruCacheSize // the size of the simulated post-transform cache (max:64) //----------------------------------------------------------------------------- - void OptimizeFaces(const uint16* indexList, uint indexCount, uint vertexCount, uint16* newIndexList, uint16 lruCacheSize); + template + void OptimizeFacesImpl(const IndexT* indexList, uint32_t indexCount, uint32_t vertexCount, IndexT vertexBaseIndex, IndexT* newIndexList, uint16_t lruCacheSize); + + void OptimizeFaces(const uint16_t* indexList, uint32_t indexCount, uint32_t vertexCount, uint16_t vertexBaseIndex, uint16_t* newIndexList, uint16_t lruCacheSize) + { + OptimizeFacesImpl( indexList, indexCount, vertexCount, vertexBaseIndex, newIndexList, lruCacheSize ); + } + + void OptimizeFaces(const uint32_t* indexList, uint32_t indexCount, uint32_t vertexCount, uint32_t vertexBaseIndex, uint32_t* newIndexList, uint16_t lruCacheSize) + { + OptimizeFacesImpl( indexList, indexCount, vertexCount, vertexBaseIndex, newIndexList, lruCacheSize ); + } namespace { @@ -82,7 +92,7 @@ namespace Forsyth return score; } - float ComputeVertexValenceScore(uint numActiveFaces) + float ComputeVertexValenceScore(uint32_t numActiveFaces) { const float FindVertexScore_ValenceBoostScale = 2.0f; const float FindVertexScore_ValenceBoostPower = 0.5f; @@ -100,7 +110,7 @@ namespace Forsyth const int kMaxVertexCacheSize = 64; - const uint kMaxPrecomputedVertexValenceScores = 64; + const uint32_t kMaxPrecomputedVertexValenceScores = 64; float s_vertexCacheScores[kMaxVertexCacheSize+1][kMaxVertexCacheSize]; float s_vertexValenceScores[kMaxPrecomputedVertexValenceScores]; @@ -114,7 +124,7 @@ namespace Forsyth } } - for (uint valence=0; valence + void OptimizeFacesImpl(const IndexT* indexList, uint32_t indexCount, uint32_t vertexCount, IndexT vertexBaseIndex, IndexT* newIndexList, uint16_t lruCacheSize) { - std::vector vertexDataList; + std::vector< OptimizeVertexData > vertexDataList; vertexDataList.resize(vertexCount); // compute face count per vertex - for (uint i=0; i= 0) && (index < vertexCount)); OptimizeVertexData& vertexData = vertexDataList[index]; vertexData.activeFaceListSize++; } - std::vector activeFaceList; + std::vector activeFaceList; - const uint16 kEvictedCacheIndex = std::numeric_limits::max(); + const IndexT kEvictedCacheIndex = std::numeric_limits::max(); { // allocate face list per vertex - uint curActiveFaceListPos = 0; - for (uint i=0; i processedFaceList; + std::vector processedFaceList; processedFaceList.resize(indexCount); - uint16 vertexCacheBuffer[(kMaxVertexCacheSize+3)*2]; - uint16* cache0 = vertexCacheBuffer; - uint16* cache1 = vertexCacheBuffer+(kMaxVertexCacheSize+3); - uint16 entriesInCache0 = 0; + IndexT vertexCacheBuffer[(kMaxVertexCacheSize+3)*2]; + IndexT* cache0 = vertexCacheBuffer; + IndexT* cache1 = vertexCacheBuffer+(kMaxVertexCacheSize+3); + IndexT entriesInCache0 = 0; - uint bestFace = 0; + uint32_t bestFace = 0; float bestScore = -1.f; const float maxValenceScore = FindVertexScore(1, kEvictedCacheIndex, lruCacheSize) * 3.f; - for (uint i = 0; i < indexCount; i += 3) + for (uint32_t i = 0; i < indexCount; i += 3) { if (bestScore < 0.f) { // no verts in the cache are used by any unprocessed faces so // search all unprocessed faces for a new starting point - for (uint j = 0; j < indexCount; j += 3) + for (uint32_t j = 0; j < indexCount; j += 3) { if (processedFaceList[j] == 0) { - uint face = j; + uint32_t face = j; float faceScore = 0.f; - for (uint k=0; k<3; ++k) + for (uint32_t k=0; k<3; ++k) { - uint16 index = indexList[face+k]; + IndexT index = indexList[face+k] - vertexBaseIndex; OptimizeVertexData& vertexData = vertexDataList[index]; assert(vertexData.activeFaceListSize > 0); assert(vertexData.cachePos0 >= lruCacheSize); @@ -269,13 +280,13 @@ namespace Forsyth } processedFaceList[bestFace] = 1; - uint16 entriesInCache1 = 0; + uint16_t entriesInCache1 = 0; // add bestFace to LRU cache and to newIndexList - for (uint v = 0; v < 3; ++v) + for (uint32_t v = 0; v < 3; ++v) { - uint16 index = indexList[bestFace+v]; - newIndexList[i+v] = index; + IndexT index = indexList[bestFace+v] - vertexBaseIndex; + newIndexList[i+v] = index + vertexBaseIndex; OptimizeVertexData& vertexData = vertexDataList[index]; @@ -292,9 +303,9 @@ namespace Forsyth } assert(vertexData.activeFaceListSize > 0); - uint* begin = &activeFaceList[vertexData.activeFaceListStart]; - uint* end = &(activeFaceList[vertexData.activeFaceListStart + vertexData.activeFaceListSize - 1]) + 1; - uint* it = std::find(begin, end, bestFace); + uint32_t* begin = &activeFaceList[vertexData.activeFaceListStart]; + uint32_t* end = &(activeFaceList[vertexData.activeFaceListStart + vertexData.activeFaceListSize - 1]) + 1; + uint32_t* it = std::find(begin, end, bestFace); assert(it != end); std::swap(*it, *(end-1)); --vertexData.activeFaceListSize; @@ -303,9 +314,9 @@ namespace Forsyth } // move the rest of the old verts in the cache down and compute their new scores - for (uint c0 = 0; c0 < entriesInCache0; ++c0) + for (uint32_t c0 = 0; c0 < entriesInCache0; ++c0) { - uint16 index = cache0[c0]; + IndexT index = cache0[c0]; OptimizeVertexData& vertexData = vertexDataList[index]; if (vertexData.cachePos1 >= entriesInCache1) @@ -318,19 +329,19 @@ namespace Forsyth // find the best scoring triangle in the current cache (including up to 3 that were just evicted) bestScore = -1.f; - for (uint c1 = 0; c1 < entriesInCache1; ++c1) + for (uint32_t c1 = 0; c1 < entriesInCache1; ++c1) { - uint16 index = cache1[c1]; + IndexT index = cache1[c1]; OptimizeVertexData& vertexData = vertexDataList[index]; vertexData.cachePos0 = vertexData.cachePos1; vertexData.cachePos1 = kEvictedCacheIndex; - for (uint j=0; jstage == MESA_SHADER_VERTEX || state->is_version(130, 300) || + state->EXT_texture_array_enable || /* BK - don't complain about texture array in fragment shaders. */ + state->OES_texture_3D_enable || /* BK - shut up */ + state->EXT_shader_texture_lod_enable || /* BK - pretend it's ok too */ state->ARB_shader_texture_lod_enable; } diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp index 5d790f7..b5cf24c 100644 --- a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glsl_optimizer.cpp @@ -170,6 +170,10 @@ struct glslopt_shader { for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) ralloc_free(whole_program->_LinkedShaders[i]); + for(GLuint i =0;i< whole_program->NumShaders;i++) + ralloc_free(whole_program->Shaders[i]); + ralloc_free(whole_program->Shaders); + ralloc_free(whole_program->InfoLog); ralloc_free(whole_program); ralloc_free(rawOutput); ralloc_free(optimizedOutput); diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.cpp b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.cpp index f742e9f..4741185 100644 --- a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.cpp +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glsl_parser_extras.cpp @@ -568,9 +568,9 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(EXT_separate_shader_objects, false, true, dummy_true), EXT(EXT_shader_framebuffer_fetch, false, true, EXT_shader_framebuffer_fetch), EXT(EXT_shader_integer_mix, true, true, EXT_shader_integer_mix), - EXT(EXT_shader_texture_lod, false, true, ARB_shader_texture_lod), + EXT(EXT_shader_texture_lod, true, true, ARB_shader_texture_lod), // BK - made it available in GLSL EXT(EXT_shadow_samplers, false, true, EXT_shadow_samplers), - EXT(EXT_texture_array, true, false, EXT_texture_array), + EXT(EXT_texture_array, true, true, EXT_texture_array), // BK - made it available in ESSL }; #undef EXT diff --git a/3rdparty/bgfx/3rdparty/glslang/.appveyor.yml b/3rdparty/bgfx/3rdparty/glslang/.appveyor.yml index 64e7ae6..07e269b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/.appveyor.yml +++ b/3rdparty/bgfx/3rdparty/glslang/.appveyor.yml @@ -7,7 +7,7 @@ version: "{build}" os: Visual Studio 2013 platform: - - Any CPU + - x64 configuration: - Debug @@ -17,6 +17,13 @@ branches: only: - master +# Travis advances the master-tot tag to current top of the tree after +# each push into the master branch, because it relies on that tag to +# upload build artifacts to the master-tot release. This will cause +# double testing for each push on Appveyor: one for the push, one for +# the tag advance. Disable testing tags. +skip_tags: true + clone_depth: 5 matrix: @@ -25,6 +32,7 @@ matrix: # scripts that run after cloning repository install: - git clone https://github.com/google/googletest.git External/googletest + - C:/Python27/python.exe update_glslang_sources.py build: parallel: true # enable MSBuild parallel builds @@ -38,3 +46,45 @@ build_script: test_script: - ctest -C %CONFIGURATION% --output-on-failure - cd ../Test && bash runtests + - cd ../build + +after_test: + # For debug build, the generated dll has a postfix "d" in its name. + - ps: >- + If ($env:configuration -Match "Debug") { + $env:SUFFIX="d" + } Else { + $env:SUFFIX="" + } + - cd install + # Zip all glslang artifacts for uploading and deploying + - 7z a glslang-master-windows-"%PLATFORM%"-"%CONFIGURATION%".zip + bin\glslangValidator.exe + include\glslang\* + include\SPIRV\* + lib\glslang%SUFFIX%.lib + lib\HLSL%SUFFIX%.lib + lib\OGLCompiler%SUFFIX%.lib + lib\OSDependent%SUFFIX%.lib + lib\SPIRV%SUFFIX%.lib + lib\SPVRemapper%SUFFIX%.lib + lib\SPIRV-Tools%SUFFIX%.lib + lib\SPIRV-Tools-opt%SUFFIX%.lib + +artifacts: + - path: build\install\*.zip + name: artifacts-zip + +deploy: + - provider: GitHub + auth_token: + secure: YglcSYdl0TylEa59H4K6lylBEDr586NAt2EMgZquSo+iuPrwgZQuJLPCoihSm9y6 + release: master-tot + description: "Continuous build of the latest master branch by Appveyor and Travis CI" + artifact: artifacts-zip + draft: false + prerelease: false + force_update: true + on: + branch: master + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 diff --git a/3rdparty/bgfx/3rdparty/glslang/.gitignore b/3rdparty/bgfx/3rdparty/glslang/.gitignore index 30889ac..a1fe394 100644 --- a/3rdparty/bgfx/3rdparty/glslang/.gitignore +++ b/3rdparty/bgfx/3rdparty/glslang/.gitignore @@ -6,8 +6,5 @@ tags TAGS build/ Test/localResults/ -Test/multiThread.out -Test/singleThread.out -Test/vert.spv -Test/frag.spv External/googletest +External/spirv-tools diff --git a/3rdparty/bgfx/3rdparty/glslang/.travis.yml b/3rdparty/bgfx/3rdparty/glslang/.travis.yml index 4a88dce..4fe4b5e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/.travis.yml +++ b/3rdparty/bgfx/3rdparty/glslang/.travis.yml @@ -7,12 +7,15 @@ os: - osx # Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment. -sudo: required +sudo: false dist: trusty env: - - GLSLANG_BUILD_TYPE=Release - - GLSLANG_BUILD_TYPE=Debug + global: + - secure: aGFrgzyKp+84hKrGkxVWg8cHV61uqrKEHT38gfSQK6+WS4GfLOyH83p7WnsEBb7AMhzU7LMNFdvOFr6+NaMpVnqRvc40CEG1Q+lNg9Pq9mhIZLowvDrfqTL9kQ+8Nbw5Q6/dg6CTvY7fvRfpfCEmKIUZBRkoKUuHeuM1uy3IupFcdNuL5bSYn3Beo+apSJginh9DI4BLDXFUgBzTRSLLyCX5g3cpaeGGOCr8quJlYx75W6HRck5g9SZuLtUoH9GFEV3l+ZEWB8noErW+J56L03bwNwFuuAh321evw++oQk5KFa8rlDvar3SJ3b1RHB8u/eq5DBYMyaK/fS8+Q7QbGr8diF/wDe68bKO7U9IhpNfExXmczCpExjHomW5TQv4rYdGhygPMfW97aIsPRYyNKcl4fkmb7NDrM8w0Jscdq2g5c2Kz0ItyZoBri/NXLwFQQjaVCs7Pf97TjuMA7mK0GJmDTRzi6SrDYlWMt5BQL3y0CCojyfLIRcTh0CQjQI29s97bLfQrYAxt9GNNFR+HTXRLLrkaAlJkPGEPwUywlSfEThnvHLesNxYqemolAYpQT4ithoL4GehGIHmaxsW295aKVhuRf8K9eBODNqrfblvM42UHhjntT+92ZnQ/Gkq80GqaMxnxi4PO5FyPIxt0r981b54YBkWi8YA4P7w5pNI= + matrix: + - GLSLANG_BUILD_TYPE=Release + - GLSLANG_BUILD_TYPE=Debug compiler: - clang @@ -24,6 +27,9 @@ matrix: # Skip GCC builds on Mac OS X. - os: osx compiler: gcc + include: + # Additional build using Android NDK. + - env: BUILD_NDK=ON cache: apt: true @@ -36,25 +42,82 @@ addons: apt: packages: - clang-3.6 - - ninja-build install: - # Install ninja on Mac OS X. - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ninja; fi - # Make sure that clang-3.6 is selected. + # Make sure that clang-3.6 is selected on Linux. - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then export CC=clang-3.6 CXX=clang++-3.6; fi + # Download Android NDK and Android CMake toolchain file. + - if [[ "$BUILD_NDK" == "ON" ]]; then + git clone --depth=1 https://github.com/urho3d/android-ndk.git $HOME/android-ndk; + export ANDROID_NDK=$HOME/android-ndk; + git clone --depth=1 https://github.com/taka-no-me/android-cmake.git $HOME/android-cmake; + export TOOLCHAIN_PATH=$HOME/android-cmake/android.toolchain.cmake; + fi before_script: - - git clone https://github.com/google/googletest.git External/googletest + - git clone --depth=1 https://github.com/google/googletest.git External/googletest + - ./update_glslang_sources.py script: - mkdir build && cd build - # We need to install the compiled binaries so the paths in the runtests script can resolve correctly. - - cmake -GNinja -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=`pwd`/install .. - - ninja install - # Run Google-Test-based tests. - - ctest --output-on-failure - # Run runtests-based tests. - - cd ../Test && ./runtests + # For Android, do release building using NDK without testing. + # For Linux and macOS, do debug/release building with testing. + - if [[ "$BUILD_NDK" == "ON" ]]; then + cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH} + -DANDROID_NATIVE_API_LEVEL=android-12 + -DCMAKE_BUILD_TYPE=Release + -DANDROID_ABI="armeabi-v7a with NEON" + -DBUILD_TESTING=OFF ..; + make -j4; + else + cmake -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE} + -DCMAKE_INSTALL_PREFIX=`pwd`/install ..; + make -j4 install; + ctest --output-on-failure && + cd ../Test && ./runtests; + fi + +after_success: + # For debug build, the generated dll has a postfix "d" in its name. + - if [[ "${GLSLANG_BUILD_TYPE}" == "Debug" ]]; then + export SUFFIX="d"; + else + export SUFFIX=""; + fi + # Create tarball for deployment + - if [[ ${CC} == clang* && "${BUILD_NDK}" != "ON" ]]; then + cd ../build/install; + export TARBALL=glslang-master-${TRAVIS_OS_NAME}-${GLSLANG_BUILD_TYPE}.zip; + zip ${TARBALL} + bin/glslangValidator + include/glslang/* + include/SPIRV/* + lib/libglslang${SUFFIX}.a + lib/libHLSL${SUFFIX}.a + lib/libOGLCompiler${SUFFIX}.a + lib/libOSDependent${SUFFIX}.a + lib/libSPIRV${SUFFIX}.a + lib/libSPVRemapper${SUFFIX}.a + lib/libSPIRV-Tools${SUFFIX}.a + lib/libSPIRV-Tools-opt${SUFFIX}.a; + fi + +before_deploy: + # Tag the current top of the tree as "master-tot". + # Travis CI replies on the tag name to properly push to GitHub Releases. + - git config --global user.name "Travis CI" + - git config --global user.email "builds@travis-ci.org" + - git tag -f master-tot + - git push -q -f https://${glslangtoken}@github.com/KhronosGroup/glslang --tags + +deploy: + provider: releases + api_key: ${glslangtoken} + on: + branch: master + condition: ${CC} == clang* && ${BUILD_NDK} != ON + file: ${TARBALL} + skip_cleanup: true + overwrite: true diff --git a/3rdparty/bgfx/3rdparty/glslang/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/CMakeLists.txt index 32395c0..0d453cc 100644 --- a/3rdparty/bgfx/3rdparty/glslang/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/CMakeLists.txt @@ -1,6 +1,19 @@ -cmake_minimum_required(VERSION 2.8.11) +# increase to 3.1 once all major distributions +# include a version of CMake >= 3.1 +cmake_minimum_required(VERSION 2.8.12) +if (POLICY CMP0048) + cmake_policy(SET CMP0048 NEW) +endif() set_property(GLOBAL PROPERTY USE_FOLDERS ON) +# Adhere to GNU filesystem layout conventions +include(GNUInstallDirs) + +option(SKIP_GLSLANG_INSTALL "Skip installation" ${SKIP_GLSLANG_INSTALL}) +if(NOT ${SKIP_GLSLANG_INSTALL}) + set(ENABLE_GLSLANG_INSTALL ON) +endif() + option(ENABLE_AMD_EXTENSIONS "Enables support of AMD-specific extensions" ON) option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON) @@ -8,11 +21,15 @@ option(ENABLE_NV_EXTENSIONS "Enables support of Nvidia-specific extensions" ON) option(ENABLE_HLSL "Enables HLSL input support" ON) -enable_testing() +option(ENABLE_OPT "Enables spirv-opt capability if present" ON) -set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32) + set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE) +endif() project(glslang) +# make testing optional +include(CTest) if(ENABLE_AMD_EXTENSIONS) add_definitions(-DAMD_EXTENSIONS) @@ -33,42 +50,59 @@ if(WIN32) endif(MSVC) add_definitions(-DGLSLANG_OSINCLUDE_WIN32) elseif(UNIX) - add_definitions(-fPIC) add_definitions(-DGLSLANG_OSINCLUDE_UNIX) else(WIN32) message("unknown platform") endif(WIN32) -if(CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs - -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable) - add_definitions(-Wno-reorder) # disable this from -Wall, since it happens all over. - add_definitions(-std=c++11) +if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs + -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions) + add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over. elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") - add_definitions(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs - -Wunused-parameter -Wunused-value -Wunused-variable) - add_definitions(-Wno-reorder) # disable this from -Wall, since it happens all over. - add_definitions(-std=c++11) + add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs + -Wunused-parameter -Wunused-value -Wunused-variable) + add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over. +endif() + +# Request C++11 +if(${CMAKE_VERSION} VERSION_LESS 3.1) + # CMake versions before 3.1 do not understand CMAKE_CXX_STANDARD + # remove this block once CMake >=3.1 has fixated in the ecosystem + add_compile_options(-std=c++11) +else() + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) endif() function(glslang_set_link_args TARGET) # For MinGW compiles, statically link against the GCC and C++ runtimes. # This avoids the need to ship those runtimes as DLLs. - if(WIN32) - if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") - set_target_properties(${TARGET} PROPERTIES - LINK_FLAGS "-static -static-libgcc -static-libstdc++") - endif() - endif(WIN32) + if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + set_target_properties(${TARGET} PROPERTIES + LINK_FLAGS "-static -static-libgcc -static-libstdc++") + endif() endfunction(glslang_set_link_args) # We depend on these for later projects, so they should come first. add_subdirectory(External) +if(NOT TARGET SPIRV-Tools-opt) + set(ENABLE_OPT OFF) +endif() + +if(ENABLE_OPT) + message(STATUS "optimizer enabled") + add_definitions(-DENABLE_OPT) +elseif(ENABLE_HLSL) + message(STATUS "spirv-tools not linked - illegal SPIRV may be generated for HLSL") +endif() + add_subdirectory(glslang) add_subdirectory(OGLCompilersDLL) if(ENABLE_GLSLANG_BINARIES) - add_subdirectory(StandAlone) + add_subdirectory(StandAlone) endif() add_subdirectory(SPIRV) if(ENABLE_HLSL) diff --git a/3rdparty/bgfx/3rdparty/glslang/External/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/External/CMakeLists.txt index 5180ea5..4d96901 100644 --- a/3rdparty/bgfx/3rdparty/glslang/External/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/External/CMakeLists.txt @@ -1,34 +1,43 @@ # Suppress all warnings from external projects. set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS -w) -if (TARGET gmock) - message(STATUS "Google Mock already configured - use it") -elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/googletest) - # We need to make sure Google Test does not mess up with the - # global CRT settings on Windows. - if(WIN32) - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - endif(WIN32) - add_subdirectory(googletest) - set(GTEST_TARGETS - gtest - gtest_main - gmock - gmock_main - ) - foreach(target ${GTEST_TARGETS}) - set_property(TARGET ${target} PROPERTY FOLDER gtest) - endforeach() - mark_as_advanced(gmock_build_tests - BUILD_GMOCK - BUILD_GTEST - BUILD_SHARED_LIBS - gtest_build_samples - gtest_build_tests - gtest_disable_pthreads - gtest_force_shared_crt - gtest_hide_internal_symbols) -else() - message(STATUS - "Google Mock was not found - tests based on that will not build") +if(BUILD_TESTING) + if(TARGET gmock) + message(STATUS "Google Mock already configured - use it") + elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/googletest) + # We need to make sure Google Test does not mess up with the + # global CRT settings on Windows. + if(WIN32) + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + endif(WIN32) + add_subdirectory(googletest) + set(GTEST_TARGETS + gtest + gtest_main + gmock + gmock_main) + foreach(target ${GTEST_TARGETS}) + set_property(TARGET ${target} PROPERTY FOLDER gtest) + endforeach() + mark_as_advanced(gmock_build_tests + BUILD_GMOCK + BUILD_GTEST + BUILD_SHARED_LIBS + gtest_build_samples + gtest_build_tests + gtest_disable_pthreads + gtest_force_shared_crt + gtest_hide_internal_symbols) + else() + message(STATUS + "Google Mock was not found - tests based on that will not build") + endif() endif() + +if(ENABLE_OPT AND NOT TARGET SPIRV-Tools-opt) + if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools) + set(SPIRV_SKIP_TESTS ON CACHE BOOL "Skip building SPIRV-Tools tests") + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/spirv-tools spirv-tools) + endif() +endif() + diff --git a/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/CMakeLists.txt index 4954db9..5bb3f0e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/CMakeLists.txt @@ -2,10 +2,13 @@ set(SOURCES InitializeDll.cpp InitializeDll.h) add_library(OGLCompiler STATIC ${SOURCES}) set_property(TARGET OGLCompiler PROPERTY FOLDER glslang) +set_property(TARGET OGLCompiler PROPERTY POSITION_INDEPENDENT_CODE ON) if(WIN32) source_group("Source" FILES ${SOURCES}) endif(WIN32) -install(TARGETS OGLCompiler - ARCHIVE DESTINATION lib) +if(ENABLE_GLSLANG_INSTALL) + install(TARGETS OGLCompiler + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif(ENABLE_GLSLANG_INSTALL) diff --git a/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/InitializeDll.cpp b/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/InitializeDll.cpp index 2eb912c..abea910 100644 --- a/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/InitializeDll.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/InitializeDll.cpp @@ -38,13 +38,17 @@ #include "InitializeDll.h" #include "../glslang/Include/InitializeGlobals.h" - #include "../glslang/Public/ShaderLang.h" +#include "../glslang/Include/PoolAlloc.h" namespace glslang { OS_TLSIndex ThreadInitializeIndex = OS_INVALID_TLS_INDEX; +// Per-process initialization. +// Needs to be called at least once before parsing, etc. is done. +// Will also do thread initialization for the calling thread; other +// threads will need to do that explicitly. bool InitProcess() { glslang::GetGlobalLock(); @@ -85,7 +89,9 @@ bool InitProcess() return true; } - +// Per-thread scoped initialization. +// Must be called at least once by each new thread sharing the +// symbol tables, etc., needed to parse. bool InitThread() { // @@ -99,17 +105,21 @@ bool InitThread() if (OS_GetTLSValue(ThreadInitializeIndex) != 0) return true; - InitializeMemoryPools(); - if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) { assert(0 && "InitThread(): Unable to set init flag."); return false; } + glslang::SetThreadPoolAllocator(nullptr); + return true; } - +// Not necessary to call this: InitThread() is reentrant, and the need +// to do per thread tear down has been removed. +// +// This is kept, with memory management removed, to satisfy any exiting +// calls to it that rely on it. bool DetachThread() { bool success = true; @@ -125,14 +135,18 @@ bool DetachThread() assert(0 && "DetachThread(): Unable to clear init flag."); success = false; } - - FreeGlobalPools(); - } return success; } +// Not necessary to call this: InitProcess() is reentrant. +// +// This is kept, with memory management removed, to satisfy any exiting +// calls to it that rely on it. +// +// Users of glslang should call shFinalize() or glslang::FinalizeProcess() for +// process-scoped memory tear down. bool DetachProcess() { bool success = true; @@ -140,12 +154,8 @@ bool DetachProcess() if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) return true; - ShFinalize(); - success = DetachThread(); - FreePoolIndex(); - OS_FreeTLSIndex(ThreadInitializeIndex); ThreadInitializeIndex = OS_INVALID_TLS_INDEX; diff --git a/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/InitializeDll.h b/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/InitializeDll.h index 60b2b15..661cee4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/InitializeDll.h +++ b/3rdparty/bgfx/3rdparty/glslang/OGLCompilersDLL/InitializeDll.h @@ -40,8 +40,8 @@ namespace glslang { bool InitProcess(); bool InitThread(); -bool DetachThread(); -bool DetachProcess(); +bool DetachThread(); // not called from standalone, perhaps other tools rely on parts of it +bool DetachProcess(); // not called from standalone, perhaps other tools rely on parts of it } // end namespace glslang diff --git a/3rdparty/bgfx/3rdparty/glslang/README.md b/3rdparty/bgfx/3rdparty/glslang/README.md index 193e38d..a6bddf8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/README.md +++ b/3rdparty/bgfx/3rdparty/glslang/README.md @@ -49,21 +49,30 @@ There is also a non-shader extension Building -------- +Instead of building manually, you can also download the binaries for your +platform directly from the [master-tot release][master-tot-release] on GitHub. +Those binaries are automatically uploaded by the buildbots after successful +testing and they always reflect the current top of the tree of the master +branch. + ### Dependencies +* A C++11 compiler * [CMake][cmake]: for generating compilation targets. +* make: _Linux_, ninja is an alternative, if configured. +* [Python 2.7][python]: for executing SPIRV-Tools scripts. (Optional if not using SPIRV-Tools.) * [bison][bison]: _optional_, but needed when changing the grammar (glslang.y). * [googletest][googletest]: _optional_, but should use if making any changes to glslang. ### Build steps +The following steps assume a Bash shell. On Windows, that could be the Git Bash +shell or some other shell of your choosing. + #### 1) Check-Out this project ```bash cd -# If using SSH -git clone git@github.com:KhronosGroup/glslang.git -# Or if using HTTPS git clone https://github.com/KhronosGroup/glslang.git ``` @@ -74,24 +83,35 @@ cd git clone https://github.com/google/googletest.git External/googletest ``` -#### 3) Configure - -Assume the source directory is `$SOURCE_DIR` and -the build directory is `$BUILD_DIR`: - -For building on Linux (assuming using the Ninja generator): +If you wish to assure that SPIR-V generated from HLSL is legal for Vulkan, +or wish to invoke -Os to reduce SPIR-V size from HLSL or GLSL, install +spirv-tools with this: ```bash -cd $BUILD_DIR +./update_glslang_sources.py +``` -cmake -GNinja -DCMAKE_BUILD_TYPE={Debug|Release|RelWithDebInfo} \ - -DCMAKE_INSTALL_PREFIX=`pwd`/install $SOURCE_DIR +#### 3) Configure + +Assume the source directory is `$SOURCE_DIR` and the build directory is +`$BUILD_DIR`. First ensure the build directory exists, then navigate to it: + +```bash +mkdir -p $BUILD_DIR +cd $BUILD_DIR +``` + +For building on Linux: + +```bash +cmake -DCMAKE_BUILD_TYPE={Debug|Release|RelWithDebInfo} \ + -DCMAKE_INSTALL_PREFIX="$(pwd)/install" $SOURCE_DIR ``` For building on Windows: ```bash -cmake $SOURCE_DIR -DCMAKE_INSTALL_PREFIX=`pwd`/install +cmake $SOURCE_DIR -DCMAKE_INSTALL_PREFIX="$(pwd)/install" # The CMAKE_INSTALL_PREFIX part is for testing (explained later). ``` @@ -101,7 +121,7 @@ The CMake GUI also works for Windows (version 3.4.1 tested). ```bash # for Linux: -ninja install +make -j4 install # for Windows: cmake --build . --config {Release|Debug|MinSizeRel|RelWithDebInfo} \ @@ -301,6 +321,8 @@ Basic Internal Operation [cmake]: https://cmake.org/ +[python]: https://www.python.org/ [bison]: https://www.gnu.org/software/bison/ [googletest]: https://github.com/google/googletest [bison-gnu-win32]: http://gnuwin32.sourceforge.net/packages/bison.htm +[master-tot-release]: https://github.com/KhronosGroup/glslang/releases/tag/master-tot diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/SPIRV/CMakeLists.txt index aaf1178..b1c0277 100755 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/CMakeLists.txt @@ -41,17 +41,30 @@ endif(ENABLE_NV_EXTENSIONS) add_library(SPIRV STATIC ${SOURCES} ${HEADERS}) set_property(TARGET SPIRV PROPERTY FOLDER glslang) -target_link_libraries(SPIRV glslang) +set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) add_library(SPVRemapper STATIC ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) set_property(TARGET SPVRemapper PROPERTY FOLDER glslang) +set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON) + +if(ENABLE_OPT) + target_include_directories(SPIRV + PRIVATE ${spirv-tools_SOURCE_DIR}/include + PRIVATE ${spirv-tools_SOURCE_DIR}/source + ) + target_link_libraries(SPIRV glslang SPIRV-Tools-opt SPVRemapper) +else() + target_link_libraries(SPIRV glslang) +endif(ENABLE_OPT) if(WIN32) source_group("Source" FILES ${SOURCES} ${HEADERS}) source_group("Source" FILES ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) endif(WIN32) -install(TARGETS SPIRV SPVRemapper - ARCHIVE DESTINATION lib) +if(ENABLE_GLSLANG_INSTALL) + install(TARGETS SPIRV SPVRemapper + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION include/SPIRV/) + install(FILES ${HEADERS} ${SPVREMAP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/SPIRV/) +endif(ENABLE_GLSLANG_INSTALL) diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.AMD.h b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.AMD.h index d2098cc..d4f57ef 100644 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.AMD.h +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.AMD.h @@ -28,24 +28,16 @@ #define GLSLextAMD_H enum BuiltIn; +enum Capability; enum Decoration; enum Op; static const int GLSLextAMDVersion = 100; -static const int GLSLextAMDRevision = 2; +static const int GLSLextAMDRevision = 6; // SPV_AMD_shader_ballot static const char* const E_SPV_AMD_shader_ballot = "SPV_AMD_shader_ballot"; -static const Op OpGroupIAddNonUniformAMD = static_cast(5000); -static const Op OpGroupFAddNonUniformAMD = static_cast(5001); -static const Op OpGroupFMinNonUniformAMD = static_cast(5002); -static const Op OpGroupUMinNonUniformAMD = static_cast(5003); -static const Op OpGroupSMinNonUniformAMD = static_cast(5004); -static const Op OpGroupFMaxNonUniformAMD = static_cast(5005); -static const Op OpGroupUMaxNonUniformAMD = static_cast(5006); -static const Op OpGroupSMaxNonUniformAMD = static_cast(5007); - enum ShaderBallotAMD { ShaderBallotBadAMD = 0, // Don't use @@ -79,16 +71,6 @@ enum ShaderTrinaryMinMaxAMD { // SPV_AMD_shader_explicit_vertex_parameter static const char* const E_SPV_AMD_shader_explicit_vertex_parameter = "SPV_AMD_shader_explicit_vertex_parameter"; -static const BuiltIn BuiltInBaryCoordNoPerspAMD = static_cast(4992); -static const BuiltIn BuiltInBaryCoordNoPerspCentroidAMD = static_cast(4993); -static const BuiltIn BuiltInBaryCoordNoPerspSampleAMD = static_cast(4994); -static const BuiltIn BuiltInBaryCoordSmoothAMD = static_cast(4995); -static const BuiltIn BuiltInBaryCoordSmoothCentroidAMD = static_cast(4996); -static const BuiltIn BuiltInBaryCoordSmoothSampleAMD = static_cast(4997); -static const BuiltIn BuiltInBaryCoordPullModelAMD = static_cast(4998); - -static const Decoration DecorationExplicitInterpAMD = static_cast(4999); - enum ShaderExplicitVertexParameterAMD { ShaderExplicitVertexParameterBadAMD = 0, // Don't use @@ -113,4 +95,16 @@ enum GcnShaderAMD { // SPV_AMD_gpu_shader_half_float static const char* const E_SPV_AMD_gpu_shader_half_float = "SPV_AMD_gpu_shader_half_float"; +// SPV_AMD_texture_gather_bias_lod +static const char* const E_SPV_AMD_texture_gather_bias_lod = "SPV_AMD_texture_gather_bias_lod"; + +// SPV_AMD_gpu_shader_int16 +static const char* const E_SPV_AMD_gpu_shader_int16 = "SPV_AMD_gpu_shader_int16"; + +// SPV_AMD_shader_image_load_store_lod +static const char* const E_SPV_AMD_shader_image_load_store_lod = "SPV_AMD_shader_image_load_store_lod"; + +// SPV_AMD_shader_fragment_mask +static const char* const E_SPV_AMD_shader_fragment_mask = "SPV_AMD_shader_fragment_mask"; + #endif // #ifndef GLSLextAMD_H diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.EXT.h b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.EXT.h new file mode 100644 index 0000000..e879714 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.EXT.h @@ -0,0 +1,39 @@ +/* +** Copyright (c) 2014-2016 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ + +#ifndef GLSLextEXT_H +#define GLSLextEXT_H + +enum BuiltIn; +enum Op; +enum Capability; + +static const int GLSLextEXTVersion = 100; +static const int GLSLextEXTRevision = 1; + +static const char* const E_SPV_EXT_fragment_fully_covered = "SPV_EXT_fragment_fully_covered"; + +#endif // #ifndef GLSLextEXT_H diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.KHR.h b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.KHR.h index a8f20c3..2eb10ae 100644 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.KHR.h +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GLSL.ext.KHR.h @@ -32,12 +32,17 @@ enum Op; enum Capability; static const int GLSLextKHRVersion = 100; -static const int GLSLextKHRRevision = 1; +static const int GLSLextKHRRevision = 2; -static const char* const E_SPV_KHR_shader_ballot = "SPV_KHR_shader_ballot"; -static const char* const E_SPV_KHR_subgroup_vote = "SPV_KHR_subgroup_vote"; -static const char* const E_SPV_KHR_device_group = "SPV_KHR_device_group"; -static const char* const E_SPV_KHR_multiview = "SPV_KHR_multiview"; -static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shader_draw_parameters"; +static const char* const E_SPV_KHR_shader_ballot = "SPV_KHR_shader_ballot"; +static const char* const E_SPV_KHR_subgroup_vote = "SPV_KHR_subgroup_vote"; +static const char* const E_SPV_KHR_device_group = "SPV_KHR_device_group"; +static const char* const E_SPV_KHR_multiview = "SPV_KHR_multiview"; +static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shader_draw_parameters"; +static const char* const E_SPV_KHR_16bit_storage = "SPV_KHR_16bit_storage"; +static const char* const E_SPV_KHR_storage_buffer_storage_class = "SPV_KHR_storage_buffer_storage_class"; +static const char* const E_SPV_KHR_post_depth_coverage = "SPV_KHR_post_depth_coverage"; +static const char* const E_SPV_EXT_shader_stencil_export = "SPV_EXT_shader_stencil_export"; +static const char* const E_SPV_EXT_shader_viewport_index_layer = "SPV_EXT_shader_viewport_index_layer"; #endif // #ifndef GLSLextKHR_H diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.cpp b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.cpp index ebb7230..ec7dd17 100755 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.cpp @@ -44,6 +44,7 @@ namespace spv { #include "GLSL.std.450.h" #include "GLSL.ext.KHR.h" + #include "GLSL.ext.EXT.h" #ifdef AMD_EXTENSIONS #include "GLSL.ext.AMD.h" #endif @@ -52,6 +53,16 @@ namespace spv { #endif } +#ifdef ENABLE_OPT + #include "spirv-tools/optimizer.hpp" + #include "message.h" + #include "SPVRemapper.h" +#endif + +#ifdef ENABLE_OPT +using namespace spvtools; +#endif + // Glslang includes #include "../glslang/MachineIndependent/localintermediate.h" #include "../glslang/MachineIndependent/SymbolTable.h" @@ -68,11 +79,6 @@ namespace spv { namespace { -// For low-order part of the generator's magic number. Bump up -// when there is a change in the style (e.g., if SSA form changes, -// or a different instruction sequence to do something gets used). -const int GeneratorVersion = 1; - namespace { class SpecConstantOpModeGuard { public: @@ -101,7 +107,8 @@ private: // class TGlslangToSpvTraverser : public glslang::TIntermTraverser { public: - TGlslangToSpvTraverser(const glslang::TIntermediate*, spv::SpvBuildLogger* logger); + TGlslangToSpvTraverser(unsigned int spvVersion, const glslang::TIntermediate*, spv::SpvBuildLogger* logger, + glslang::SpvOptions& options); virtual ~TGlslangToSpvTraverser() { } bool visitAggregate(glslang::TVisit, glslang::TIntermAggregate*); @@ -122,6 +129,10 @@ protected: spv::Decoration TranslateAuxiliaryStorageDecoration(const glslang::TQualifier& qualifier); spv::BuiltIn TranslateBuiltInDecoration(glslang::TBuiltInVariable, bool memberDeclaration); spv::ImageFormat TranslateImageFormat(const glslang::TType& type); + spv::SelectionControlMask TranslateSelectionControl(const glslang::TIntermSelection&) const; + spv::SelectionControlMask TranslateSwitchControl(const glslang::TIntermSwitch&) const; + spv::LoopControlMask TranslateLoopControl(const glslang::TIntermLoop&, unsigned int& dependencyLength) const; + spv::StorageClass TranslateStorageClass(const glslang::TType&); spv::Id createSpvVariable(const glslang::TIntermSymbol*); spv::Id getSampledType(const glslang::TSampler&); spv::Id getInvertedSwizzleType(const glslang::TIntermTyped&); @@ -145,6 +156,8 @@ protected: void declareUseOfStructMember(const glslang::TTypeList& members, int glslangMember); bool isShaderEntryPoint(const glslang::TIntermAggregate* node); + bool writableParam(glslang::TStorageQualifier); + bool originalParam(glslang::TStorageQualifier, const glslang::TType&, bool implicitThisParam); void makeFunctions(const glslang::TIntermSequence&); void makeGlobalInitializers(const glslang::TIntermSequence&); void visitFunctions(const glslang::TIntermSequence&); @@ -175,8 +188,11 @@ protected: bool isTrivialLeaf(const glslang::TIntermTyped* node); bool isTrivial(const glslang::TIntermTyped* node); spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right); +#ifdef AMD_EXTENSIONS spv::Id getExtBuiltins(const char* name); +#endif + glslang::SpvOptions& options; spv::Function* shaderEntry; spv::Function* currentFunction; spv::Instruction* entryPoint; @@ -244,37 +260,6 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage) } } -// Translate glslang type to SPIR-V storage class. -spv::StorageClass TranslateStorageClass(const glslang::TType& type) -{ - if (type.getQualifier().isPipeInput()) - return spv::StorageClassInput; - else if (type.getQualifier().isPipeOutput()) - return spv::StorageClassOutput; - else if (type.getBasicType() == glslang::EbtAtomicUint) - return spv::StorageClassAtomicCounter; - else if (type.containsOpaque()) - return spv::StorageClassUniformConstant; - else if (type.getQualifier().isUniformOrBuffer()) { - if (type.getQualifier().layoutPushConstant) - return spv::StorageClassPushConstant; - if (type.getBasicType() == glslang::EbtBlock) - return spv::StorageClassUniform; - else - return spv::StorageClassUniformConstant; - } else { - switch (type.getQualifier().storage) { - case glslang::EvqShared: return spv::StorageClassWorkgroup; break; - case glslang::EvqGlobal: return spv::StorageClassPrivate; - case glslang::EvqConstReadOnly: return spv::StorageClassFunction; - case glslang::EvqTemporary: return spv::StorageClassFunction; - default: - assert(0); - return spv::StorageClassFunction; - } - } -} - // Translate glslang sampler type to SPIR-V dimensionality. spv::Dim TranslateDimensionality(const glslang::TSampler& sampler) { @@ -310,12 +295,12 @@ spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type) } // Translate glslang type to SPIR-V block decorations. -spv::Decoration TranslateBlockDecoration(const glslang::TType& type) +spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useStorageBuffer) { if (type.getBasicType() == glslang::EbtBlock) { switch (type.getQualifier().storage) { case glslang::EvqUniform: return spv::DecorationBlock; - case glslang::EvqBuffer: return spv::DecorationBufferBlock; + case glslang::EvqBuffer: return useStorageBuffer ? spv::DecorationBlock : spv::DecorationBufferBlock; case glslang::EvqVaryingIn: return spv::DecorationBlock; case glslang::EvqVaryingOut: return spv::DecorationBlock; default: @@ -480,17 +465,13 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI return spv::BuiltInCullDistance; case glslang::EbvViewportIndex: - if (!memberDeclaration) { - builder.addCapability(spv::CapabilityMultiViewport); -#ifdef NV_EXTENSIONS - if (glslangIntermediate->getStage() == EShLangVertex || - glslangIntermediate->getStage() == EShLangTessControl || - glslangIntermediate->getStage() == EShLangTessEvaluation) { + builder.addCapability(spv::CapabilityMultiViewport); + if (glslangIntermediate->getStage() == EShLangVertex || + glslangIntermediate->getStage() == EShLangTessControl || + glslangIntermediate->getStage() == EShLangTessEvaluation) { - builder.addExtension(spv::E_SPV_NV_viewport_array2); - builder.addCapability(spv::CapabilityShaderViewportIndexLayerNV); - } -#endif + builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer); + builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT); } return spv::BuiltInViewportIndex; @@ -503,23 +484,17 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI return spv::BuiltInSamplePosition; case glslang::EbvSampleMask: - builder.addCapability(spv::CapabilitySampleRateShading); return spv::BuiltInSampleMask; case glslang::EbvLayer: - if (!memberDeclaration) { - builder.addCapability(spv::CapabilityGeometry); -#ifdef NV_EXTENSIONS - if (glslangIntermediate->getStage() == EShLangVertex || - glslangIntermediate->getStage() == EShLangTessControl || - glslangIntermediate->getStage() == EShLangTessEvaluation) { + builder.addCapability(spv::CapabilityGeometry); + if (glslangIntermediate->getStage() == EShLangVertex || + glslangIntermediate->getStage() == EShLangTessControl || + glslangIntermediate->getStage() == EShLangTessEvaluation) { - builder.addExtension(spv::E_SPV_NV_viewport_array2); - builder.addCapability(spv::CapabilityShaderViewportIndexLayerNV); - } -#endif + builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer); + builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT); } - return spv::BuiltInLayer; case glslang::EbvPosition: return spv::BuiltInPosition; @@ -548,6 +523,11 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addCapability(spv::CapabilityGeometry); return spv::BuiltInPrimitiveId; + case glslang::EbvFragStencilRef: + builder.addExtension(spv::E_SPV_EXT_shader_stencil_export); + builder.addCapability(spv::CapabilityStencilExportEXT); + return spv::BuiltInFragStencilRefEXT; + case glslang::EbvInvocationId: return spv::BuiltInInvocationId; case glslang::EbvTessLevelInner: return spv::BuiltInTessLevelInner; case glslang::EbvTessLevelOuter: return spv::BuiltInTessLevelOuter; @@ -671,6 +651,10 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addCapability(spv::CapabilityPerViewAttributesNV); } return spv::BuiltInViewportMaskPerViewNV; + case glslang::EbvFragFullyCoveredNV: + builder.addExtension(spv::E_SPV_EXT_fragment_fully_covered); + builder.addCapability(spv::CapabilityFragmentFullyCoveredEXT); + return spv::BuiltInFullyCoveredEXT; #endif default: return spv::BuiltInMax; @@ -765,6 +749,86 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy } } +spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSelectionControl(const glslang::TIntermSelection& selectionNode) const +{ + if (selectionNode.getFlatten()) + return spv::SelectionControlFlattenMask; + if (selectionNode.getDontFlatten()) + return spv::SelectionControlDontFlattenMask; + return spv::SelectionControlMaskNone; +} + +spv::SelectionControlMask TGlslangToSpvTraverser::TranslateSwitchControl(const glslang::TIntermSwitch& switchNode) const +{ + if (switchNode.getFlatten()) + return spv::SelectionControlFlattenMask; + if (switchNode.getDontFlatten()) + return spv::SelectionControlDontFlattenMask; + return spv::SelectionControlMaskNone; +} + +// return a non-0 dependency if the dependency argument must be set +spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang::TIntermLoop& loopNode, + unsigned int& dependencyLength) const +{ + spv::LoopControlMask control = spv::LoopControlMaskNone; + + if (loopNode.getDontUnroll()) + control = control | spv::LoopControlDontUnrollMask; + if (loopNode.getUnroll()) + control = control | spv::LoopControlUnrollMask; + if (loopNode.getLoopDependency() == glslang::TIntermLoop::dependencyInfinite) + control = control | spv::LoopControlDependencyInfiniteMask; + else if (loopNode.getLoopDependency() > 0) { + control = control | spv::LoopControlDependencyLengthMask; + dependencyLength = loopNode.getLoopDependency(); + } + + return control; +} + +// Translate glslang type to SPIR-V storage class. +spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type) +{ + if (type.getQualifier().isPipeInput()) + return spv::StorageClassInput; + if (type.getQualifier().isPipeOutput()) + return spv::StorageClassOutput; + + if (glslangIntermediate->getSource() != glslang::EShSourceHlsl || + type.getQualifier().storage == glslang::EvqUniform) { + if (type.getBasicType() == glslang::EbtAtomicUint) + return spv::StorageClassAtomicCounter; + if (type.containsOpaque()) + return spv::StorageClassUniformConstant; + } + + if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) { + builder.addExtension(spv::E_SPV_KHR_storage_buffer_storage_class); + return spv::StorageClassStorageBuffer; + } + + if (type.getQualifier().isUniformOrBuffer()) { + if (type.getQualifier().layoutPushConstant) + return spv::StorageClassPushConstant; + if (type.getBasicType() == glslang::EbtBlock) + return spv::StorageClassUniform; + return spv::StorageClassUniformConstant; + } + + switch (type.getQualifier().storage) { + case glslang::EvqShared: return spv::StorageClassWorkgroup; + case glslang::EvqGlobal: return spv::StorageClassPrivate; + case glslang::EvqConstReadOnly: return spv::StorageClassFunction; + case glslang::EvqTemporary: return spv::StorageClassFunction; + default: + assert(0); + break; + } + + return spv::StorageClassFunction; +} + // Return whether or not the given type is something that should be tied to a // descriptor set. bool IsDescriptorResource(const glslang::TType& type) @@ -834,17 +898,44 @@ bool HasNonLayoutQualifiers(const glslang::TType& type, const glslang::TQualifie // Implement the TGlslangToSpvTraverser class. // -TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* glslangIntermediate, spv::SpvBuildLogger* buildLogger) - : TIntermTraverser(true, false, true), shaderEntry(nullptr), currentFunction(nullptr), +TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const glslang::TIntermediate* glslangIntermediate, + spv::SpvBuildLogger* buildLogger, glslang::SpvOptions& options) + : TIntermTraverser(true, false, true), + options(options), + shaderEntry(nullptr), currentFunction(nullptr), sequenceDepth(0), logger(buildLogger), - builder((glslang::GetKhronosToolId() << 16) | GeneratorVersion, logger), + builder(spvVersion, (glslang::GetKhronosToolId() << 16) | glslang::GetSpirvGeneratorVersion(), logger), inEntryPoint(false), entryPointTerminated(false), linkageOnly(false), glslangIntermediate(glslangIntermediate) { spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage()); builder.clearAccessChain(); - builder.setSource(TranslateSourceLanguage(glslangIntermediate->getSource(), glslangIntermediate->getProfile()), glslangIntermediate->getVersion()); + builder.setSource(TranslateSourceLanguage(glslangIntermediate->getSource(), glslangIntermediate->getProfile()), + glslangIntermediate->getVersion()); + + if (options.generateDebugInfo) { + builder.setEmitOpLines(); + builder.setSourceFile(glslangIntermediate->getSourceFile()); + + // Set the source shader's text. If for SPV version 1.0, include + // a preamble in comments stating the OpModuleProcessed instructions. + // Otherwise, emit those as actual instructions. + std::string text; + const std::vector& processes = glslangIntermediate->getProcesses(); + for (int p = 0; p < (int)processes.size(); ++p) { + if (glslangIntermediate->getSpv().spv < 0x00010100) { + text.append("// OpModuleProcessed "); + text.append(processes[p]); + text.append("\n"); + } else + builder.addModuleProcessed(processes[p]); + } + if (glslangIntermediate->getSpv().spv < 0x00010100 && (int)processes.size() > 0) + text.append("#line 1\n"); + text.append(glslangIntermediate->getSourceText()); + builder.setSourceText(text); + } stdBuiltins = builder.import("GLSL.std.450"); builder.setMemoryModel(spv::AddressingModelLogical, spv::MemoryModelGLSL450); shaderEntry = builder.makeEntryPoint(glslangIntermediate->getEntryPointName().c_str()); @@ -950,6 +1041,12 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(const glslang::TIntermediate* gls if (glslangIntermediate->getEarlyFragmentTests()) builder.addExecutionMode(shaderEntry, spv::ExecutionModeEarlyFragmentTests); + if (glslangIntermediate->getPostDepthCoverage()) { + builder.addCapability(spv::CapabilitySampleMaskPostDepthCoverage); + builder.addExecutionMode(shaderEntry, spv::ExecutionModePostDepthCoverage); + builder.addExtension(spv::E_SPV_KHR_post_depth_coverage); + } + switch(glslangIntermediate->getDepth()) { case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break; case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break; @@ -1023,8 +1120,10 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) // Include all "static use" and "linkage only" interface variables on the OpEntryPoint instruction if (builder.isPointer(id)) { spv::StorageClass sc = builder.getStorageClass(id); - if (sc == spv::StorageClassInput || sc == spv::StorageClassOutput) - iOSet.insert(id); + if (sc == spv::StorageClassInput || sc == spv::StorageClassOutput) { + if (!symbol->getType().isStruct() || symbol->getType().getStruct()->size() > 0) + iOSet.insert(id); + } } // Only process non-linkage-only nodes for generating actual static uses @@ -1052,6 +1151,8 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::TIntermBinary* node) { + builder.setLine(node->getLoc().line); + SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (node->getType().getQualifier().isSpecConstant()) spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); @@ -1239,6 +1340,8 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TIntermUnary* node) { + builder.setLine(node->getLoc().line); + SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (node->getType().getQualifier().isSpecConstant()) spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); @@ -1339,6 +1442,10 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI #endif else if (node->getBasicType() == glslang::EbtInt64 || node->getBasicType() == glslang::EbtUint64) one = builder.makeInt64Constant(1); +#ifdef AMD_EXTENSIONS + else if (node->getBasicType() == glslang::EbtInt16 || node->getBasicType() == glslang::EbtUint16) + one = builder.makeInt16Constant(1); +#endif else one = builder.makeIntConstant(1); glslang::TOperator op; @@ -1397,7 +1504,11 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt builder.setAccessChainRValue(result); return false; +#ifdef AMD_EXTENSIONS + } else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod) { +#else } else if (node->getOp() == glslang::EOpImageStore) { +#endif // "imageStore" is a special case, which has no result return false; } @@ -1482,6 +1593,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt return false; case glslang::EOpFunctionCall: { + builder.setLine(node->getLoc().line); if (node->isUserDefined()) result = handleUserFunctionCall(node); // assert(result); // this can happen for bad shaders because the call graph completeness checking is not yet done @@ -1511,6 +1623,33 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructDMat4x2: case glslang::EOpConstructDMat4x3: case glslang::EOpConstructDMat4x4: + case glslang::EOpConstructIMat2x2: + case glslang::EOpConstructIMat2x3: + case glslang::EOpConstructIMat2x4: + case glslang::EOpConstructIMat3x2: + case glslang::EOpConstructIMat3x3: + case glslang::EOpConstructIMat3x4: + case glslang::EOpConstructIMat4x2: + case glslang::EOpConstructIMat4x3: + case glslang::EOpConstructIMat4x4: + case glslang::EOpConstructUMat2x2: + case glslang::EOpConstructUMat2x3: + case glslang::EOpConstructUMat2x4: + case glslang::EOpConstructUMat3x2: + case glslang::EOpConstructUMat3x3: + case glslang::EOpConstructUMat3x4: + case glslang::EOpConstructUMat4x2: + case glslang::EOpConstructUMat4x3: + case glslang::EOpConstructUMat4x4: + case glslang::EOpConstructBMat2x2: + case glslang::EOpConstructBMat2x3: + case glslang::EOpConstructBMat2x4: + case glslang::EOpConstructBMat3x2: + case glslang::EOpConstructBMat3x3: + case glslang::EOpConstructBMat3x4: + case glslang::EOpConstructBMat4x2: + case glslang::EOpConstructBMat4x3: + case glslang::EOpConstructBMat4x4: #ifdef AMD_EXTENSIONS case glslang::EOpConstructF16Mat2x2: case glslang::EOpConstructF16Mat2x3: @@ -1558,9 +1697,20 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructU64Vec2: case glslang::EOpConstructU64Vec3: case glslang::EOpConstructU64Vec4: +#ifdef AMD_EXTENSIONS + case glslang::EOpConstructInt16: + case glslang::EOpConstructI16Vec2: + case glslang::EOpConstructI16Vec3: + case glslang::EOpConstructI16Vec4: + case glslang::EOpConstructUint16: + case glslang::EOpConstructU16Vec2: + case glslang::EOpConstructU16Vec3: + case glslang::EOpConstructU16Vec4: +#endif case glslang::EOpConstructStruct: case glslang::EOpConstructTextureSampler: { + builder.setLine(node->getLoc().line); std::vector arguments; translateArguments(*node, arguments); spv::Id constructed; @@ -1632,8 +1782,9 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpMemoryBarrierImage: case glslang::EOpMemoryBarrierShared: case glslang::EOpGroupMemoryBarrier: + case glslang::EOpDeviceMemoryBarrier: case glslang::EOpAllMemoryBarrierWithGroupSync: - case glslang::EOpGroupMemoryBarrierWithGroupSync: + case glslang::EOpDeviceMemoryBarrierWithGroupSync: case glslang::EOpWorkgroupMemoryBarrier: case glslang::EOpWorkgroupMemoryBarrierWithGroupSync: noReturnValue = true; @@ -1651,6 +1802,20 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt atomic = true; break; + case glslang::EOpAtomicCounterAdd: + case glslang::EOpAtomicCounterSubtract: + case glslang::EOpAtomicCounterMin: + case glslang::EOpAtomicCounterMax: + case glslang::EOpAtomicCounterAnd: + case glslang::EOpAtomicCounterOr: + case glslang::EOpAtomicCounterXor: + case glslang::EOpAtomicCounterExchange: + case glslang::EOpAtomicCounterCompSwap: + builder.addExtension("SPV_KHR_shader_atomic_counter_ops"); + builder.addCapability(spv::CapabilityAtomicStorageOps); + atomic = true; + break; + default: break; } @@ -1671,6 +1836,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt right->traverse(this); spv::Id rightId = accessChainLoad(right->getType()); + builder.setLine(node->getLoc().line); result = createBinaryOperation(binOp, precision, TranslateNoContractionDecoration(node->getType().getQualifier()), resultType(), leftId, rightId, left->getType().getBasicType(), reduceComparison); @@ -1720,6 +1886,15 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpAtomicXor: case glslang::EOpAtomicExchange: case glslang::EOpAtomicCompSwap: + case glslang::EOpAtomicCounterAdd: + case glslang::EOpAtomicCounterSubtract: + case glslang::EOpAtomicCounterMin: + case glslang::EOpAtomicCounterMax: + case glslang::EOpAtomicCounterAnd: + case glslang::EOpAtomicCounterOr: + case glslang::EOpAtomicCounterXor: + case glslang::EOpAtomicCounterExchange: + case glslang::EOpAtomicCounterCompSwap: if (arg == 0) lvalue = true; break; @@ -1743,10 +1918,13 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt glslangOperands[arg]->traverse(this); if (lvalue) operands.push_back(builder.accessChainGetLValue()); - else + else { + builder.setLine(node->getLoc().line); operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType())); + } } + builder.setLine(node->getLoc().line); if (atomic) { // Handle all atomics result = createAtomicOperation(node->getOp(), precision, resultType(), operands, node->getBasicType()); @@ -1828,6 +2006,8 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang node->getFalseBlock()->traverse(this); spv::Id falseValue = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); + builder.setLine(node->getLoc().line); + // smear condition to vector, if necessary (AST is always scalar) if (builder.isVector(trueValue)) condition = builder.smearScalar(spv::NoPrecision, condition, @@ -1852,8 +2032,7 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang return false; } - // Instead, emit control flow... - + // Instead, emit control flow... // Don't handle results as temporaries, because there will be two names // and better to leave SSA to later passes. spv::Id result = (node->getBasicType() == glslang::EbtVoid) @@ -1863,8 +2042,11 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang // emit the condition before doing anything with selection node->getCondition()->traverse(this); + // Selection control: + const spv::SelectionControlMask control = TranslateSelectionControl(*node); + // make an "if" based on the value created by the condition - spv::Builder::If ifBuilder(accessChainLoad(node->getCondition()->getType()), builder); + spv::Builder::If ifBuilder(accessChainLoad(node->getCondition()->getType()), control, builder); // emit the "then" statement if (node->getTrueBlock() != nullptr) { @@ -1902,6 +2084,9 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T node->getCondition()->traverse(this); spv::Id selector = accessChainLoad(node->getCondition()->getAsTyped()->getType()); + // Selection control: + const spv::SelectionControlMask control = TranslateSwitchControl(*node); + // browse the children to sort out code segments int defaultSegment = -1; std::vector codeSegments; @@ -1927,7 +2112,7 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T // make the switch statement std::vector segmentBlocks; // returned, as the blocks allocated in the call - builder.makeSwitch(selector, (int)codeSegments.size(), caseValues, valueIndexToSegment, defaultSegment, segmentBlocks); + builder.makeSwitch(selector, control, (int)codeSegments.size(), caseValues, valueIndexToSegment, defaultSegment, segmentBlocks); // emit all the code in the segments breakForLoop.push(false); @@ -1958,22 +2143,27 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn { auto blocks = builder.makeNewLoop(); builder.createBranch(&blocks.head); + + // Loop control: + unsigned int dependencyLength = glslang::TIntermLoop::dependencyInfinite; + const spv::LoopControlMask control = TranslateLoopControl(*node, dependencyLength); + // Spec requires back edges to target header blocks, and every header block // must dominate its merge block. Make a header block first to ensure these // conditions are met. By definition, it will contain OpLoopMerge, followed // by a block-ending branch. But we don't want to put any other body/test // instructions in it, since the body/test may have arbitrary instructions, // including merges of its own. + builder.setLine(node->getLoc().line); builder.setBuildPoint(&blocks.head); - builder.createLoopMerge(&blocks.merge, &blocks.continue_target, spv::LoopControlMaskNone); + builder.createLoopMerge(&blocks.merge, &blocks.continue_target, control, dependencyLength); if (node->testFirst() && node->getTest()) { spv::Block& test = builder.makeNewBlock(); builder.createBranch(&test); builder.setBuildPoint(&test); node->getTest()->traverse(this); - spv::Id condition = - accessChainLoad(node->getTest()->getType()); + spv::Id condition = accessChainLoad(node->getTest()->getType()); builder.createConditionalBranch(condition, &blocks.body, &blocks.merge); builder.setBuildPoint(&blocks.body); @@ -1988,6 +2178,7 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn node->getTerminal()->traverse(this); builder.createBranch(&blocks.head); } else { + builder.setLine(node->getLoc().line); builder.createBranch(&blocks.body); breakForLoop.push(true); @@ -2022,6 +2213,8 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T if (node->getExpression()) node->getExpression()->traverse(this); + builder.setLine(node->getLoc().line); + switch (node->getFlowOp()) { case glslang::EOpKill: builder.makeDiscard(); @@ -2074,6 +2267,26 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* spv::StorageClass storageClass = TranslateStorageClass(node->getType()); spv::Id spvType = convertGlslangToSpvType(node->getType()); +#ifdef AMD_EXTENSIONS + const bool contains16BitType = node->getType().containsBasicType(glslang::EbtFloat16) || + node->getType().containsBasicType(glslang::EbtInt16) || + node->getType().containsBasicType(glslang::EbtUint16); + if (contains16BitType) { + if (storageClass == spv::StorageClassInput || storageClass == spv::StorageClassOutput) { + builder.addExtension(spv::E_SPV_KHR_16bit_storage); + builder.addCapability(spv::CapabilityStorageInputOutput16); + } else if (storageClass == spv::StorageClassPushConstant) { + builder.addExtension(spv::E_SPV_KHR_16bit_storage); + builder.addCapability(spv::CapabilityStoragePushConstant16); + } else if (storageClass == spv::StorageClassUniform) { + builder.addExtension(spv::E_SPV_KHR_16bit_storage); + builder.addCapability(spv::CapabilityStorageUniform16); + if (node->getType().getQualifier().storage == glslang::EvqBuffer) + builder.addCapability(spv::CapabilityStorageUniformBufferBlock16); + } + } +#endif + const char* name = node->getName().c_str(); if (glslang::IsAnonymous(name)) name = ""; @@ -2170,13 +2383,21 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty spvType = builder.makeUintType(32); break; case glslang::EbtInt64: - builder.addCapability(spv::CapabilityInt64); spvType = builder.makeIntType(64); break; case glslang::EbtUint64: - builder.addCapability(spv::CapabilityInt64); spvType = builder.makeUintType(64); break; +#ifdef AMD_EXTENSIONS + case glslang::EbtInt16: + builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16); + spvType = builder.makeIntType(16); + break; + case glslang::EbtUint16: + builder.addExtension(spv::E_SPV_AMD_gpu_shader_int16); + spvType = builder.makeUintType(16); + break; +#endif case glslang::EbtAtomicUint: builder.addCapability(spv::CapabilityAtomicStorage); spvType = builder.makeUintType(32); @@ -2315,7 +2536,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy // Create a vector of struct types for SPIR-V to consume std::vector spvMembers; int memberDelta = 0; // how much the member's index changes from glslang to SPIR-V, normally 0, except sometimes for blocks - int locationOffset = 0; // for use across struct members, when they are called recursively for (int i = 0; i < (int)glslangMembers->size(); i++) { glslang::TType& glslangMember = *(*glslangMembers)[i].type; if (glslangMember.hiddenMember()) { @@ -2332,11 +2552,9 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy glslang::TQualifier memberQualifier = glslangMember.getQualifier(); InheritQualifiers(memberQualifier, qualifier); - // manually inherit location; it's more complex + // manually inherit location if (! memberQualifier.hasLocation() && qualifier.hasLocation()) - memberQualifier.layoutLocation = qualifier.layoutLocation + locationOffset; - if (qualifier.hasLocation()) - locationOffset += glslangIntermediate->computeTypeLocationSize(glslangMember); + memberQualifier.layoutLocation = qualifier.layoutLocation; // recurse spvMembers.push_back(convertGlslangToSpvType(glslangMember, explicitLayout, memberQualifier)); @@ -2392,36 +2610,21 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, } addMemberDecoration(spvType, member, TranslateInvariantDecoration(memberQualifier)); - if (qualifier.storage == glslang::EvqBuffer) { + if (type.getBasicType() == glslang::EbtBlock && + qualifier.storage == glslang::EvqBuffer) { + // Add memory decorations only to top-level members of shader storage block std::vector memory; TranslateMemoryDecoration(memberQualifier, memory); for (unsigned int i = 0; i < memory.size(); ++i) addMemberDecoration(spvType, member, memory[i]); } - // Compute location decoration; tricky based on whether inheritance is at play and - // what kind of container we have, etc. - // TODO: This algorithm (and it's cousin above doing almost the same thing) should - // probably move to the linker stage of the front end proper, and just have the - // answer sitting already distributed throughout the individual member locations. - int location = -1; // will only decorate if present or inherited + // Location assignment was already completed correctly by the front end, + // just track whether a member needs to be decorated. // Ignore member locations if the container is an array, as that's - // ill-specified and decisions have been made to not allow this anyway. - // The object itself must have a location, and that comes out from decorating the object, - // not the type (this code decorates types). - if (! type.isArray()) { - if (memberQualifier.hasLocation()) { // no inheritance, or override of inheritance - // struct members should not have explicit locations - assert(type.getBasicType() != glslang::EbtStruct); - location = memberQualifier.layoutLocation; - } else if (type.getBasicType() != glslang::EbtBlock) { - // If it is a not a Block, (...) Its members are assigned consecutive locations (...) - // The members, and their nested types, must not themselves have Location decorations. - } else if (qualifier.hasLocation()) // inheritance - location = qualifier.layoutLocation + locationOffset; - } - if (location >= 0) - builder.addMemberDecoration(spvType, member, spv::DecorationLocation, location); + // ill-specified and decisions have been made to not allow this. + if (! type.isArray() && memberQualifier.hasLocation()) + builder.addMemberDecoration(spvType, member, spv::DecorationLocation, memberQualifier.layoutLocation); if (qualifier.hasLocation()) // track for upcoming inheritance locationOffset += glslangIntermediate->computeTypeLocationSize(glslangMember); @@ -2473,18 +2676,11 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, // Decorate the structure addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix)); - addDecoration(spvType, TranslateBlockDecoration(type)); + addDecoration(spvType, TranslateBlockDecoration(type, glslangIntermediate->usingStorageBuffer())); if (type.getQualifier().hasStream() && glslangIntermediate->isMultiStream()) { builder.addCapability(spv::CapabilityGeometryStreams); builder.addDecoration(spvType, spv::DecorationStream, type.getQualifier().layoutStream); } - if (glslangIntermediate->getXfbMode()) { - builder.addCapability(spv::CapabilityTransformFeedback); - if (type.getQualifier().hasXfbStride()) - builder.addDecoration(spvType, spv::DecorationXfbStride, type.getQualifier().layoutXfbStride); - if (type.getQualifier().hasXfbBuffer()) - builder.addDecoration(spvType, spv::DecorationXfbBuffer, type.getQualifier().layoutXfbBuffer); - } } // Turn the expression forming the array size into an id. @@ -2550,19 +2746,24 @@ void TGlslangToSpvTraverser::accessChainStore(const glslang::TType& type, spv::I // Conversion for bool spv::Id boolType = builder.makeBoolType(); if (nominalTypeId != boolType) { + // keep these outside arguments, for determinant order-of-evaluation + spv::Id one = builder.makeUintConstant(1); spv::Id zero = builder.makeUintConstant(0); - spv::Id one = builder.makeUintConstant(1); rvalue = builder.createTriOp(spv::OpSelect, nominalTypeId, rvalue, one, zero); - } + } else if (builder.getTypeId(rvalue) != boolType) + rvalue = builder.createBinOp(spv::OpINotEqual, boolType, rvalue, builder.makeUintConstant(0)); } else if (builder.isVectorType(nominalTypeId)) { // Conversion for bvec int vecSize = builder.getNumTypeComponents(nominalTypeId); spv::Id bvecType = builder.makeVectorType(builder.makeBoolType(), vecSize); if (nominalTypeId != bvecType) { + // keep these outside arguments, for determinant order-of-evaluation + spv::Id one = makeSmearedConstant(builder.makeUintConstant(1), vecSize); spv::Id zero = makeSmearedConstant(builder.makeUintConstant(0), vecSize); - spv::Id one = makeSmearedConstant(builder.makeUintConstant(1), vecSize); rvalue = builder.createTriOp(spv::OpSelect, nominalTypeId, rvalue, one, zero); - } + } else if (builder.getTypeId(rvalue) != bvecType) + rvalue = builder.createBinOp(spv::OpINotEqual, bvecType, rvalue, + makeSmearedConstant(builder.makeUintConstant(0), vecSize)); } } @@ -2695,7 +2896,7 @@ int TGlslangToSpvTraverser::getMatrixStride(const glslang::TType& matrixType, gl // 'currentOffset' should be passed in already initialized, ready to modify, and reflecting // the migration of data from nextOffset -> currentOffset. It should be -1 on the first call. // -1 means a non-forced member offset (no decoration needed). -void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& /*structType*/, const glslang::TType& memberType, int& currentOffset, int& nextOffset, +void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& structType, const glslang::TType& memberType, int& currentOffset, int& nextOffset, glslang::TLayoutPacking explicitLayout, glslang::TLayoutMatrix matrixLayout) { // this will get a positive value when deemed necessary @@ -2729,8 +2930,12 @@ void TGlslangToSpvTraverser::updateMemberOffset(const glslang::TType& /*structTy int memberAlignment = glslangIntermediate->getBaseAlignment(memberType, memberSize, dummyStride, explicitLayout == glslang::ElpStd140, matrixLayout == glslang::ElmRowMajor); // Adjust alignment for HLSL rules + // TODO: make this consistent in early phases of code: + // adjusting this late means inconsistencies with earlier code, which for reflection is an issue + // Until reflection is brought in sync with these adjustments, don't apply to $Global, + // which is the most likely to rely on reflection, and least likely to rely implicit layouts if (glslangIntermediate->usingHlslOFfsets() && - ! memberType.isArray() && memberType.isVector()) { + ! memberType.isArray() && memberType.isVector() && structType.getTypeName().compare("$Global") != 0) { int dummySize; int componentAlignment = glslangIntermediate->getBaseAlignmentScalar(memberType, dummySize); if (componentAlignment <= 4) @@ -2756,8 +2961,6 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList& case glslang::EbvCullDistance: case glslang::EbvPointSize: #ifdef NV_EXTENSIONS - case glslang::EbvLayer: - case glslang::EbvViewportIndex: case glslang::EbvViewportMaskNV: case glslang::EbvSecondaryPositionNV: case glslang::EbvSecondaryViewportMaskNV: @@ -2780,9 +2983,40 @@ bool TGlslangToSpvTraverser::isShaderEntryPoint(const glslang::TIntermAggregate* return node->getName().compare(glslangIntermediate->getEntryPointMangledName().c_str()) == 0; } +// Does parameter need a place to keep writes, separate from the original? +// Assumes called after originalParam(), which filters out block/buffer/opaque-based +// qualifiers such that we should have only in/out/inout/constreadonly here. +bool TGlslangToSpvTraverser::writableParam(glslang::TStorageQualifier qualifier) +{ + assert(qualifier == glslang::EvqIn || + qualifier == glslang::EvqOut || + qualifier == glslang::EvqInOut || + qualifier == glslang::EvqConstReadOnly); + return qualifier != glslang::EvqConstReadOnly; +} + +// Is parameter pass-by-original? +bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier, const glslang::TType& paramType, + bool implicitThisParam) +{ + if (implicitThisParam) // implicit this + return true; + if (glslangIntermediate->getSource() == glslang::EShSourceHlsl) + return paramType.getBasicType() == glslang::EbtBlock; + return paramType.containsOpaque() || // sampler, etc. + (paramType.getBasicType() == glslang::EbtBlock && qualifier == glslang::EvqBuffer); // SSBO +} + // Make all the functions, skeletally, without actually visiting their bodies. void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslFunctions) { + const auto getParamDecorations = [](std::vector& decorations, const glslang::TType& type) { + spv::Decoration paramPrecision = TranslatePrecisionDecoration(type); + if (paramPrecision != spv::NoPrecision) + decorations.push_back(paramPrecision); + TranslateMemoryDecoration(type.getQualifier(), decorations); + }; + for (int f = 0; f < (int)glslFunctions.size(); ++f) { glslang::TIntermAggregate* glslFunction = glslFunctions[f]->getAsAggregate(); if (! glslFunction || glslFunction->getOp() != glslang::EOpFunction || isShaderEntryPoint(glslFunction)) @@ -2803,32 +3037,31 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF // GLSL has copy-in/copy-out semantics. They can be handled though with a pointer to a copy. std::vector paramTypes; - std::vector paramPrecisions; + std::vector> paramDecorations; // list of decorations per parameter glslang::TIntermSequence& parameters = glslFunction->getSequence()[0]->getAsAggregate()->getSequence(); - bool implicitThis = (int)parameters.size() > 0 && parameters[0]->getAsSymbolNode()->getName() == glslangIntermediate->implicitThisName; + bool implicitThis = (int)parameters.size() > 0 && parameters[0]->getAsSymbolNode()->getName() == + glslangIntermediate->implicitThisName; + paramDecorations.resize(parameters.size()); for (int p = 0; p < (int)parameters.size(); ++p) { const glslang::TType& paramType = parameters[p]->getAsTyped()->getType(); spv::Id typeId = convertGlslangToSpvType(paramType); - // can we pass by reference? - if (paramType.containsOpaque() || // sampler, etc. - (paramType.getBasicType() == glslang::EbtBlock && - paramType.getQualifier().storage == glslang::EvqBuffer) || // SSBO - (p == 0 && implicitThis)) // implicit 'this' + if (originalParam(paramType.getQualifier().storage, paramType, implicitThis && p == 0)) typeId = builder.makePointer(TranslateStorageClass(paramType), typeId); - else if (paramType.getQualifier().storage != glslang::EvqConstReadOnly) + else if (writableParam(paramType.getQualifier().storage)) typeId = builder.makePointer(spv::StorageClassFunction, typeId); else rValueParameters.insert(parameters[p]->getAsSymbolNode()->getId()); - paramPrecisions.push_back(TranslatePrecisionDecoration(paramType)); + getParamDecorations(paramDecorations[p], paramType); paramTypes.push_back(typeId); } spv::Block* functionBlock; spv::Function *function = builder.makeFunctionEntry(TranslatePrecisionDecoration(glslFunction->getType()), convertGlslangToSpvType(glslFunction->getType()), - glslFunction->getName().c_str(), paramTypes, paramPrecisions, &functionBlock); + glslFunction->getName().c_str(), paramTypes, + paramDecorations, &functionBlock); if (implicitThis) function->setImplicitThis(); @@ -2947,7 +3180,7 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if (i == 6) lvalue = true; break; - case glslang::EOpSparseTextureGather: + case glslang::EOpSparseTextureGather: if ((sampler.shadow && i == 3) || (! sampler.shadow && i == 2)) lvalue = true; break; @@ -2956,6 +3189,21 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if ((sampler.shadow && i == 4) || (! sampler.shadow && i == 3)) lvalue = true; break; +#ifdef AMD_EXTENSIONS + case glslang::EOpSparseTextureGatherLod: + if (i == 3) + lvalue = true; + break; + case glslang::EOpSparseTextureGatherLodOffset: + case glslang::EOpSparseTextureGatherLodOffsets: + if (i == 4) + lvalue = true; + break; + case glslang::EOpSparseImageLoadLod: + if (i == 3) + lvalue = true; + break; +#endif default: break; } @@ -2976,9 +3224,11 @@ void TGlslangToSpvTraverser::translateArguments(glslang::TIntermUnary& node, std spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermOperator* node) { - if (! node->isImage() && ! node->isTexture()) { + if (! node->isImage() && ! node->isTexture()) return spv::NoResult; - } + + builder.setLine(node->getLoc().line); + auto resultType = [&node,this]{ return convertGlslangToSpvType(node->getType()); }; // Process a GLSL texturing op (will be SPV image) @@ -2997,9 +3247,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO glslang::TCrackedTextureOp cracked; node->crackTexture(sampler, cracked); - const bool isUnsignedResult = - node->getType().getBasicType() == glslang::EbtUint64 || - node->getType().getBasicType() == glslang::EbtUint; + const bool isUnsignedResult = node->getType().getBasicType() == glslang::EbtUint; // Check for queries if (cracked.query) { @@ -3051,30 +3299,64 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO operands.push_back(spv::ImageOperandsSampleMask); operands.push_back(*(opIt++)); } - return builder.createOp(spv::OpImageRead, resultType(), operands); + spv::Id result = builder.createOp(spv::OpImageRead, resultType(), operands); + builder.setPrecision(result, precision); + return result; } operands.push_back(*(opIt++)); +#ifdef AMD_EXTENSIONS + if (node->getOp() == glslang::EOpImageLoad || node->getOp() == glslang::EOpImageLoadLod) { +#else if (node->getOp() == glslang::EOpImageLoad) { +#endif if (sampler.ms) { operands.push_back(spv::ImageOperandsSampleMask); operands.push_back(*opIt); +#ifdef AMD_EXTENSIONS + } else if (cracked.lod) { + builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod); + builder.addCapability(spv::CapabilityImageReadWriteLodAMD); + + operands.push_back(spv::ImageOperandsLodMask); + operands.push_back(*opIt); +#endif } if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown) builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat); - return builder.createOp(spv::OpImageRead, resultType(), operands); + + spv::Id result = builder.createOp(spv::OpImageRead, resultType(), operands); + builder.setPrecision(result, precision); + return result; +#ifdef AMD_EXTENSIONS + } else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod) { +#else } else if (node->getOp() == glslang::EOpImageStore) { +#endif if (sampler.ms) { operands.push_back(*(opIt + 1)); operands.push_back(spv::ImageOperandsSampleMask); operands.push_back(*opIt); +#ifdef AMD_EXTENSIONS + } else if (cracked.lod) { + builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod); + builder.addCapability(spv::CapabilityImageReadWriteLodAMD); + + operands.push_back(*(opIt + 1)); + operands.push_back(spv::ImageOperandsLodMask); + operands.push_back(*opIt); +#endif } else operands.push_back(*opIt); builder.createNoResultOp(spv::OpImageWrite, operands); if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown) builder.addCapability(spv::CapabilityStorageImageWriteWithoutFormat); return spv::NoResult; +#ifdef AMD_EXTENSIONS + } else if (node->getOp() == glslang::EOpSparseImageLoad || node->getOp() == glslang::EOpSparseImageLoadLod) { +#else } else if (node->getOp() == glslang::EOpSparseImageLoad) { +#endif builder.addCapability(spv::CapabilitySparseResidency); if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown) builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat); @@ -3082,6 +3364,14 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO if (sampler.ms) { operands.push_back(spv::ImageOperandsSampleMask); operands.push_back(*opIt++); +#ifdef AMD_EXTENSIONS + } else if (cracked.lod) { + builder.addExtension(spv::E_SPV_AMD_shader_image_load_store_lod); + builder.addCapability(spv::CapabilityImageReadWriteLodAMD); + + operands.push_back(spv::ImageOperandsLodMask); + operands.push_back(*opIt++); +#endif } // Create the return type that was a special structure @@ -3114,16 +3404,67 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } } +#ifdef AMD_EXTENSIONS + // Check for fragment mask functions other than queries + if (cracked.fragMask) { + assert(sampler.ms); + + auto opIt = arguments.begin(); + std::vector operands; + + // Extract the image if necessary + if (builder.isSampledImage(params.sampler)) + params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler); + + operands.push_back(params.sampler); + ++opIt; + + if (sampler.isSubpass()) { + // add on the (0,0) coordinate + spv::Id zero = builder.makeIntConstant(0); + std::vector comps; + comps.push_back(zero); + comps.push_back(zero); + operands.push_back(builder.makeCompositeConstant(builder.makeVectorType(builder.makeIntType(32), 2), comps)); + } + + for (; opIt != arguments.end(); ++opIt) + operands.push_back(*opIt); + + spv::Op fragMaskOp = spv::OpNop; + if (node->getOp() == glslang::EOpFragmentMaskFetch) + fragMaskOp = spv::OpFragmentMaskFetchAMD; + else if (node->getOp() == glslang::EOpFragmentFetch) + fragMaskOp = spv::OpFragmentFetchAMD; + + builder.addExtension(spv::E_SPV_AMD_shader_fragment_mask); + builder.addCapability(spv::CapabilityFragmentMaskAMD); + return builder.createOp(fragMaskOp, resultType(), operands); + } +#endif + // Check for texture functions other than queries bool sparse = node->isSparseTexture(); bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow; // check for bias argument bool bias = false; +#ifdef AMD_EXTENSIONS + if (! cracked.lod && ! cracked.grad && ! cracked.fetch && ! cubeCompare) { +#else if (! cracked.lod && ! cracked.gather && ! cracked.grad && ! cracked.fetch && ! cubeCompare) { +#endif int nonBiasArgCount = 2; +#ifdef AMD_EXTENSIONS + if (cracked.gather) + ++nonBiasArgCount; // comp argument should be present when bias argument is present +#endif if (cracked.offset) ++nonBiasArgCount; +#ifdef AMD_EXTENSIONS + else if (cracked.offsets) + ++nonBiasArgCount; +#endif if (cracked.grad) nonBiasArgCount += 2; if (cracked.lodClamp) @@ -3142,6 +3483,17 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler); } +#ifdef AMD_EXTENSIONS + if (cracked.gather) { + const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions(); + if (bias || cracked.lod || + sourceExtensions.find(glslang::E_GL_AMD_texture_gather_bias_lod) != sourceExtensions.end()) { + builder.addExtension(spv::E_SPV_AMD_texture_gather_bias_lod); + builder.addCapability(spv::CapabilityImageGatherBiasLodAMD); + } + } +#endif + // set the rest of the arguments params.coords = arguments[1]; @@ -3168,7 +3520,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO // lod if (cracked.lod) { - params.lod = arguments[2]; + params.lod = arguments[2 + extraArgs]; ++extraArgs; } else if (glslangIntermediate->getStage() != EShLangFragment) { // we need to invent the default lod for an explicit lod instruction for a non-fragment stage @@ -3177,7 +3529,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO // multisample if (sampler.ms) { - params.sample = arguments[2]; // For MS, "sample" should be specified + params.sample = arguments[2 + extraArgs]; // For MS, "sample" should be specified ++extraArgs; } @@ -3209,21 +3561,20 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO ++extraArgs; } - // bias - if (bias) { - params.bias = arguments[2 + extraArgs]; - ++extraArgs; - } - // gather component if (cracked.gather && ! sampler.shadow) { // default component is 0, if missing, otherwise an argument if (2 + extraArgs < (int)arguments.size()) { params.component = arguments[2 + extraArgs]; ++extraArgs; - } else { + } else params.component = builder.makeIntConstant(0); - } + } + + // bias + if (bias) { + params.bias = arguments[2 + extraArgs]; + ++extraArgs; } // projective component (might not to move) @@ -3281,8 +3632,9 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg builder.clearAccessChain(); glslangArgs[a]->traverse(this); argTypes.push_back(¶mType); - // keep outputs and opaque objects as l-values, evaluate input-only as r-values - if (qualifiers[a] != glslang::EvqConstReadOnly || paramType.containsOpaque()) { + // keep outputs and pass-by-originals as l-values, evaluate others as r-values + if (originalParam(qualifiers[a], paramType, function->hasImplicitThis() && a == 0) || + writableParam(qualifiers[a])) { // save l-value lValues.push_back(builder.getAccessChain()); } else { @@ -3301,13 +3653,11 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg for (int a = 0; a < (int)glslangArgs.size(); ++a) { const glslang::TType& paramType = glslangArgs[a]->getAsTyped()->getType(); spv::Id arg; - if (paramType.containsOpaque() || - (paramType.getBasicType() == glslang::EbtBlock && qualifiers[a] == glslang::EvqBuffer) || - (a == 0 && function->hasImplicitThis())) { + if (originalParam(qualifiers[a], paramType, function->hasImplicitThis() && a == 0)) { builder.setAccessChain(lValues[lValueCount]); arg = builder.accessChainGetLValue(); ++lValueCount; - } else if (qualifiers[a] != glslang::EvqConstReadOnly) { + } else if (writableParam(qualifiers[a])) { // need space to hold the copy arg = builder.createVariable(spv::StorageClassFunction, convertGlslangToSpvType(paramType), "param"); if (qualifiers[a] == glslang::EvqIn || qualifiers[a] == glslang::EvqInOut) { @@ -3334,7 +3684,9 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg lValueCount = 0; for (int a = 0; a < (int)glslangArgs.size(); ++a) { const glslang::TType& paramType = glslangArgs[a]->getAsTyped()->getType(); - if (qualifiers[a] != glslang::EvqConstReadOnly) { + if (originalParam(qualifiers[a], paramType, function->hasImplicitThis() && a == 0)) + ++lValueCount; + else if (writableParam(qualifiers[a])) { if (qualifiers[a] == glslang::EvqOut || qualifiers[a] == glslang::EvqInOut) { spv::Id copy = builder.createLoad(spvArgs[a]); builder.setAccessChain(lValues[lValueCount]); @@ -3353,10 +3705,11 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv spv::Id typeId, spv::Id left, spv::Id right, glslang::TBasicType typeProxy, bool reduceComparison) { - bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; #ifdef AMD_EXTENSIONS + bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64 || typeProxy == glslang::EbtUint16; bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; #else + bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; #endif bool isBool = typeProxy == glslang::EbtBool; @@ -3683,10 +4036,11 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: spv::Op unaryOp = spv::OpNop; int extBuiltins = -1; int libCall = -1; - bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; #ifdef AMD_EXTENSIONS + bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64 || typeProxy == glslang::EbtUint16; bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; #else + bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; #endif @@ -3825,6 +4179,12 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: case glslang::EOpDoubleBitsToUint64: case glslang::EOpInt64BitsToDouble: case glslang::EOpUint64BitsToDouble: +#ifdef AMD_EXTENSIONS + case glslang::EOpFloat16BitsToInt16: + case glslang::EOpFloat16BitsToUint16: + case glslang::EOpInt16BitsToFloat16: + case glslang::EOpUint16BitsToFloat16: +#endif unaryOp = spv::OpBitcast; break; @@ -3873,6 +4233,14 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, spv: break; #ifdef AMD_EXTENSIONS + case glslang::EOpPackInt2x16: + case glslang::EOpUnpackInt2x16: + case glslang::EOpPackUint2x16: + case glslang::EOpUnpackUint2x16: + case glslang::EOpPackInt4x16: + case glslang::EOpUnpackInt4x16: + case glslang::EOpPackUint4x16: + case glslang::EOpUnpackUint4x16: case glslang::EOpPackFloat2x16: case glslang::EOpUnpackFloat2x16: unaryOp = spv::OpBitcast; @@ -4072,8 +4440,18 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvUintToBool: case glslang::EOpConvInt64ToBool: case glslang::EOpConvUint64ToBool: - zero = (op == glslang::EOpConvInt64ToBool || - op == glslang::EOpConvUint64ToBool) ? builder.makeUint64Constant(0) : builder.makeUintConstant(0); +#ifdef AMD_EXTENSIONS + case glslang::EOpConvInt16ToBool: + case glslang::EOpConvUint16ToBool: +#endif + if (op == glslang::EOpConvInt64ToBool || op == glslang::EOpConvUint64ToBool) + zero = builder.makeUint64Constant(0); +#ifdef AMD_EXTENSIONS + else if (op == glslang::EOpConvInt16ToBool || op == glslang::EOpConvUint16ToBool) + zero = builder.makeUint16Constant(0); +#endif + else + zero = builder.makeUintConstant(0); zero = makeSmearedConstant(zero, vectorSize); return builder.createBinOp(spv::OpINotEqual, destType, operand, zero); @@ -4116,15 +4494,53 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvBoolToInt: case glslang::EOpConvBoolToInt64: - zero = (op == glslang::EOpConvBoolToInt64) ? builder.makeInt64Constant(0) : builder.makeIntConstant(0); - one = (op == glslang::EOpConvBoolToInt64) ? builder.makeInt64Constant(1) : builder.makeIntConstant(1); +#ifdef AMD_EXTENSIONS + case glslang::EOpConvBoolToInt16: +#endif + if (op == glslang::EOpConvBoolToInt64) + zero = builder.makeInt64Constant(0); +#ifdef AMD_EXTENSIONS + else if (op == glslang::EOpConvBoolToInt16) + zero = builder.makeInt16Constant(0); +#endif + else + zero = builder.makeIntConstant(0); + + if (op == glslang::EOpConvBoolToInt64) + one = builder.makeInt64Constant(1); +#ifdef AMD_EXTENSIONS + else if (op == glslang::EOpConvBoolToInt16) + one = builder.makeInt16Constant(1); +#endif + else + one = builder.makeIntConstant(1); + convOp = spv::OpSelect; break; case glslang::EOpConvBoolToUint: case glslang::EOpConvBoolToUint64: - zero = (op == glslang::EOpConvBoolToUint64) ? builder.makeUint64Constant(0) : builder.makeUintConstant(0); - one = (op == glslang::EOpConvBoolToUint64) ? builder.makeUint64Constant(1) : builder.makeUintConstant(1); +#ifdef AMD_EXTENSIONS + case glslang::EOpConvBoolToUint16: +#endif + if (op == glslang::EOpConvBoolToUint64) + zero = builder.makeUint64Constant(0); +#ifdef AMD_EXTENSIONS + else if (op == glslang::EOpConvBoolToUint16) + zero = builder.makeUint16Constant(0); +#endif + else + zero = builder.makeUintConstant(0); + + if (op == glslang::EOpConvBoolToUint64) + one = builder.makeUint64Constant(1); +#ifdef AMD_EXTENSIONS + else if (op == glslang::EOpConvBoolToUint16) + one = builder.makeUint16Constant(1); +#endif + else + one = builder.makeUintConstant(1); + convOp = spv::OpSelect; break; @@ -4133,6 +4549,9 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvInt64ToFloat: case glslang::EOpConvInt64ToDouble: #ifdef AMD_EXTENSIONS + case glslang::EOpConvInt16ToFloat: + case glslang::EOpConvInt16ToDouble: + case glslang::EOpConvInt16ToFloat16: case glslang::EOpConvIntToFloat16: case glslang::EOpConvInt64ToFloat16: #endif @@ -4144,6 +4563,9 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvUint64ToFloat: case glslang::EOpConvUint64ToDouble: #ifdef AMD_EXTENSIONS + case glslang::EOpConvUint16ToFloat: + case glslang::EOpConvUint16ToDouble: + case glslang::EOpConvUint16ToFloat16: case glslang::EOpConvUintToFloat16: case glslang::EOpConvUint64ToFloat16: #endif @@ -4168,6 +4590,9 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvFloatToInt64: case glslang::EOpConvDoubleToInt64: #ifdef AMD_EXTENSIONS + case glslang::EOpConvFloatToInt16: + case glslang::EOpConvDoubleToInt16: + case glslang::EOpConvFloat16ToInt16: case glslang::EOpConvFloat16ToInt: case glslang::EOpConvFloat16ToInt64: #endif @@ -4178,10 +4603,21 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvIntToUint: case glslang::EOpConvUint64ToInt64: case glslang::EOpConvInt64ToUint64: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvUint16ToInt16: + case glslang::EOpConvInt16ToUint16: +#endif if (builder.isInSpecConstCodeGenMode()) { // Build zero scalar or vector for OpIAdd. - zero = (op == glslang::EOpConvUint64ToInt64 || - op == glslang::EOpConvInt64ToUint64) ? builder.makeUint64Constant(0) : builder.makeUintConstant(0); + if (op == glslang::EOpConvUint64ToInt64 || op == glslang::EOpConvInt64ToUint64) + zero = builder.makeUint64Constant(0); +#ifdef AMD_EXTENSIONS + else if (op == glslang::EOpConvUint16ToInt16 || op == glslang::EOpConvInt16ToUint16) + zero = builder.makeUint16Constant(0); +#endif + else + zero = builder.makeUintConstant(0); + zero = makeSmearedConstant(zero, vectorSize); // Use OpIAdd, instead of OpBitcast to do the conversion when // generating for OpSpecConstantOp instruction. @@ -4196,6 +4632,9 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvFloatToUint64: case glslang::EOpConvDoubleToUint64: #ifdef AMD_EXTENSIONS + case glslang::EOpConvFloatToUint16: + case glslang::EOpConvDoubleToUint16: + case glslang::EOpConvFloat16ToUint16: case glslang::EOpConvFloat16ToUint: case glslang::EOpConvFloat16ToUint64: #endif @@ -4204,11 +4643,23 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvIntToInt64: case glslang::EOpConvInt64ToInt: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvIntToInt16: + case glslang::EOpConvInt16ToInt: + case glslang::EOpConvInt64ToInt16: + case glslang::EOpConvInt16ToInt64: +#endif convOp = spv::OpSConvert; break; case glslang::EOpConvUintToUint64: case glslang::EOpConvUint64ToUint: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvUintToUint16: + case glslang::EOpConvUint16ToUint: + case glslang::EOpConvUint64ToUint16: + case glslang::EOpConvUint16ToUint64: +#endif convOp = spv::OpUConvert; break; @@ -4216,24 +4667,58 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec case glslang::EOpConvInt64ToUint: case glslang::EOpConvUint64ToInt: case glslang::EOpConvUintToInt64: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvInt16ToUint: + case glslang::EOpConvUintToInt16: + case glslang::EOpConvInt16ToUint64: + case glslang::EOpConvUint64ToInt16: + case glslang::EOpConvUint16ToInt: + case glslang::EOpConvIntToUint16: + case glslang::EOpConvUint16ToInt64: + case glslang::EOpConvInt64ToUint16: +#endif // OpSConvert/OpUConvert + OpBitCast switch (op) { case glslang::EOpConvIntToUint64: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvInt16ToUint64: +#endif convOp = spv::OpSConvert; type = builder.makeIntType(64); break; case glslang::EOpConvInt64ToUint: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvInt16ToUint: +#endif convOp = spv::OpSConvert; type = builder.makeIntType(32); break; case glslang::EOpConvUint64ToInt: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvUint16ToInt: +#endif convOp = spv::OpUConvert; type = builder.makeUintType(32); break; case glslang::EOpConvUintToInt64: +#ifdef AMD_EXTENSIONS + case glslang::EOpConvUint16ToInt64: +#endif convOp = spv::OpUConvert; type = builder.makeUintType(64); break; +#ifdef AMD_EXTENSIONS + case glslang::EOpConvUintToInt16: + case glslang::EOpConvUint64ToInt16: + convOp = spv::OpUConvert; + type = builder.makeUintType(16); + break; + case glslang::EOpConvIntToUint16: + case glslang::EOpConvInt64ToUint16: + convOp = spv::OpSConvert; + type = builder.makeIntType(16); + break; +#endif default: assert(0); break; @@ -4246,8 +4731,22 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, spv::Dec if (builder.isInSpecConstCodeGenMode()) { // Build zero scalar or vector for OpIAdd. - zero = (op == glslang::EOpConvIntToUint64 || - op == glslang::EOpConvUintToInt64) ? builder.makeUint64Constant(0) : builder.makeUintConstant(0); +#ifdef AMD_EXTENSIONS + if (op == glslang::EOpConvIntToUint64 || op == glslang::EOpConvUintToInt64 || + op == glslang::EOpConvInt16ToUint64 || op == glslang::EOpConvUint16ToInt64) + zero = builder.makeUint64Constant(0); + else if (op == glslang::EOpConvIntToUint16 || op == glslang::EOpConvUintToInt16 || + op == glslang::EOpConvInt64ToUint16 || op == glslang::EOpConvUint64ToInt16) + zero = builder.makeUint16Constant(0); + else + zero = builder.makeUintConstant(0); +#else + if (op == glslang::EOpConvIntToUint64 || op == glslang::EOpConvUintToInt64) + zero = builder.makeUint64Constant(0); + else + zero = builder.makeUintConstant(0); +#endif + zero = makeSmearedConstant(zero, vectorSize); // Use OpIAdd, instead of OpBitcast to do the conversion when // generating for OpSpecConstantOp instruction. @@ -4294,34 +4793,45 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv switch (op) { case glslang::EOpAtomicAdd: case glslang::EOpImageAtomicAdd: + case glslang::EOpAtomicCounterAdd: opCode = spv::OpAtomicIAdd; break; + case glslang::EOpAtomicCounterSubtract: + opCode = spv::OpAtomicISub; + break; case glslang::EOpAtomicMin: case glslang::EOpImageAtomicMin: - opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMin : spv::OpAtomicSMin; + case glslang::EOpAtomicCounterMin: + opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ? spv::OpAtomicUMin : spv::OpAtomicSMin; break; case glslang::EOpAtomicMax: case glslang::EOpImageAtomicMax: - opCode = typeProxy == glslang::EbtUint ? spv::OpAtomicUMax : spv::OpAtomicSMax; + case glslang::EOpAtomicCounterMax: + opCode = (typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64) ? spv::OpAtomicUMax : spv::OpAtomicSMax; break; case glslang::EOpAtomicAnd: case glslang::EOpImageAtomicAnd: + case glslang::EOpAtomicCounterAnd: opCode = spv::OpAtomicAnd; break; case glslang::EOpAtomicOr: case glslang::EOpImageAtomicOr: + case glslang::EOpAtomicCounterOr: opCode = spv::OpAtomicOr; break; case glslang::EOpAtomicXor: case glslang::EOpImageAtomicXor: + case glslang::EOpAtomicCounterXor: opCode = spv::OpAtomicXor; break; case glslang::EOpAtomicExchange: case glslang::EOpImageAtomicExchange: + case glslang::EOpAtomicCounterExchange: opCode = spv::OpAtomicExchange; break; case glslang::EOpAtomicCompSwap: case glslang::EOpImageAtomicCompSwap: + case glslang::EOpAtomicCounterCompSwap: opCode = spv::OpAtomicCompareExchange; break; case glslang::EOpAtomicCounterIncrement: @@ -4338,11 +4848,15 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv break; } + if (typeProxy == glslang::EbtInt64 || typeProxy == glslang::EbtUint64) + builder.addCapability(spv::CapabilityInt64Atomics); + // Sort out the operands // - mapping from glslang -> SPV // - there are extra SPV operands with no glslang source // - compare-exchange swaps the value and comparator // - compare-exchange has an extra memory semantics + // - EOpAtomicCounterDecrement needs a post decrement std::vector spvAtomicOperands; // hold the spv operands auto opIt = operands.begin(); // walk the glslang operands spvAtomicOperands.push_back(*(opIt++)); @@ -4361,7 +4875,14 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv for (; opIt != operands.end(); ++opIt) spvAtomicOperands.push_back(*opIt); - return builder.createOp(opCode, typeId, spvAtomicOperands); + spv::Id resultId = builder.createOp(opCode, typeId, spvAtomicOperands); + + // GLSL and HLSL atomic-counter decrement return post-decrement value, + // while SPIR-V returns pre-decrement value. Translate between these semantics. + if (op == glslang::EOpAtomicCounterDecrement) + resultId = builder.createBinOp(spv::OpISub, typeId, resultId, builder.makeIntConstant(1)); + + return resultId; } // Create group invocation operations. @@ -4633,10 +5154,11 @@ spv::Id TGlslangToSpvTraverser::CreateInvocationsVectorOperation(spv::Op op, spv spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy) { - bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; #ifdef AMD_EXTENSIONS + bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64 || typeProxy == glslang::EbtUint16; bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble || typeProxy == glslang::EbtFloat16; #else + bool isUnsigned = typeProxy == glslang::EbtUint || typeProxy == glslang::EbtUint64; bool isFloat = typeProxy == glslang::EbtFloat || typeProxy == glslang::EbtDouble; #endif @@ -4927,40 +5449,65 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv: builder.createNoResultOp(spv::OpEndPrimitive); return 0; case glslang::EOpBarrier: - builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeDevice, spv::MemorySemanticsMaskNone); + if (glslangIntermediate->getStage() == EShLangTessControl) { + builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeInvocation, spv::MemorySemanticsMaskNone); + // TODO: prefer the following, when available: + // builder.createControlBarrier(spv::ScopePatch, spv::ScopePatch, + // spv::MemorySemanticsPatchMask | + // spv::MemorySemanticsAcquireReleaseMask); + } else { + builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeWorkgroup, + spv::MemorySemanticsWorkgroupMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); + } return 0; case glslang::EOpMemoryBarrier: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAllMemory); + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAllMemory | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpMemoryBarrierAtomicCounter: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAtomicCounterMemoryMask); + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsAtomicCounterMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpMemoryBarrierBuffer: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsUniformMemoryMask); + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsUniformMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpMemoryBarrierImage: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsImageMemoryMask); + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsImageMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpMemoryBarrierShared: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupMemoryMask); + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsWorkgroupMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpGroupMemoryBarrier: - builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsCrossWorkgroupMemoryMask); + builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsAllMemory | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpAllMemoryBarrierWithGroupSync: - // Control barrier with non-"None" semantic is also a memory barrier. - builder.createControlBarrier(spv::ScopeDevice, spv::ScopeDevice, spv::MemorySemanticsAllMemory); + builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeDevice, + spv::MemorySemanticsAllMemory | + spv::MemorySemanticsAcquireReleaseMask); return 0; - case glslang::EOpGroupMemoryBarrierWithGroupSync: - // Control barrier with non-"None" semantic is also a memory barrier. - builder.createControlBarrier(spv::ScopeDevice, spv::ScopeDevice, spv::MemorySemanticsCrossWorkgroupMemoryMask); + case glslang::EOpDeviceMemoryBarrier: + builder.createMemoryBarrier(spv::ScopeDevice, spv::MemorySemanticsUniformMemoryMask | + spv::MemorySemanticsImageMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); + return 0; + case glslang::EOpDeviceMemoryBarrierWithGroupSync: + builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeDevice, spv::MemorySemanticsUniformMemoryMask | + spv::MemorySemanticsImageMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpWorkgroupMemoryBarrier: - builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsWorkgroupMemoryMask); + builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsWorkgroupMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; case glslang::EOpWorkgroupMemoryBarrierWithGroupSync: - // Control barrier with non-"None" semantic is also a memory barrier. - builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeWorkgroup, spv::MemorySemanticsWorkgroupMemoryMask); + builder.createControlBarrier(spv::ScopeWorkgroup, spv::ScopeWorkgroup, + spv::MemorySemanticsWorkgroupMemoryMask | + spv::MemorySemanticsAcquireReleaseMask); return 0; #ifdef AMD_EXTENSIONS case glslang::EOpTime: @@ -4999,15 +5546,6 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addDecoration(id, spv::DecorationIndex, symbol->getQualifier().layoutIndex); if (symbol->getQualifier().hasComponent()) builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent); - if (glslangIntermediate->getXfbMode()) { - builder.addCapability(spv::CapabilityTransformFeedback); - if (symbol->getQualifier().hasXfbStride()) - builder.addDecoration(id, spv::DecorationXfbStride, symbol->getQualifier().layoutXfbStride); - if (symbol->getQualifier().hasXfbBuffer()) - builder.addDecoration(id, spv::DecorationXfbBuffer, symbol->getQualifier().layoutXfbBuffer); - if (symbol->getQualifier().hasXfbOffset()) - builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutXfbOffset); - } // atomic counters use this: if (symbol->getQualifier().hasOffset()) builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutOffset); @@ -5034,8 +5572,14 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addCapability(spv::CapabilityTransformFeedback); if (symbol->getQualifier().hasXfbStride()) builder.addDecoration(id, spv::DecorationXfbStride, symbol->getQualifier().layoutXfbStride); - if (symbol->getQualifier().hasXfbBuffer()) + if (symbol->getQualifier().hasXfbBuffer()) { builder.addDecoration(id, spv::DecorationXfbBuffer, symbol->getQualifier().layoutXfbBuffer); + unsigned stride = glslangIntermediate->getXfbStride(symbol->getQualifier().layoutXfbBuffer); + if (stride != glslang::TQualifier::layoutXfbStrideEnd) + builder.addDecoration(id, spv::DecorationXfbStride, stride); + } + if (symbol->getQualifier().hasXfbOffset()) + builder.addDecoration(id, spv::DecorationOffset, symbol->getQualifier().layoutXfbOffset); } if (symbol->getType().isImage()) { @@ -5065,14 +5609,12 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol } else if (builtIn == spv::BuiltInLayer) { // SPV_NV_viewport_array2 extension - if (symbol->getQualifier().layoutViewportRelative) - { + if (symbol->getQualifier().layoutViewportRelative) { addDecoration(id, (spv::Decoration)spv::DecorationViewportRelativeNV); builder.addCapability(spv::CapabilityShaderViewportMaskNV); builder.addExtension(spv::E_SPV_NV_viewport_array2); } - if(symbol->getQualifier().layoutSecondaryViewportRelativeOffset != -2048) - { + if (symbol->getQualifier().layoutSecondaryViewportRelativeOffset != -2048) { addDecoration(id, (spv::Decoration)spv::DecorationSecondaryViewportRelativeNV, symbol->getQualifier().layoutSecondaryViewportRelativeOffset); builder.addCapability(spv::CapabilityShaderStereoViewNV); builder.addExtension(spv::E_SPV_NV_stereo_view_rendering); @@ -5221,6 +5763,14 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla case glslang::EbtUint64: spvConsts.push_back(builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const())); break; +#ifdef AMD_EXTENSIONS + case glslang::EbtInt16: + spvConsts.push_back(builder.makeInt16Constant(zero ? 0 : (short)consts[nextConst].getIConst())); + break; + case glslang::EbtUint16: + spvConsts.push_back(builder.makeUint16Constant(zero ? 0 : (unsigned short)consts[nextConst].getUConst())); + break; +#endif case glslang::EbtFloat: spvConsts.push_back(builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; @@ -5258,6 +5808,14 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla case glslang::EbtUint64: scalar = builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const(), specConstant); break; +#ifdef AMD_EXTENSIONS + case glslang::EbtInt16: + scalar = builder.makeInt16Constant(zero ? 0 : (short)consts[nextConst].getIConst(), specConstant); + break; + case glslang::EbtUint16: + scalar = builder.makeUint16Constant(zero ? 0 : (unsigned short)consts[nextConst].getUConst(), specConstant); + break; +#endif case glslang::EbtFloat: scalar = builder.makeFloatConstant(zero ? 0.0F : (float)consts[nextConst].getDConst(), specConstant); break; @@ -5315,13 +5873,18 @@ bool TGlslangToSpvTraverser::isTrivialLeaf(const glslang::TIntermTyped* node) } // A node is trivial if it is a single operation with no side effects. -// Error on the side of saying non-trivial. +// HLSL (and/or vectors) are always trivial, as it does not short circuit. +// Otherwise, error on the side of saying non-trivial. // Return true if trivial. bool TGlslangToSpvTraverser::isTrivial(const glslang::TIntermTyped* node) { if (node == nullptr) return false; + // count non scalars as trivial, as well as anything coming from HLSL + if (! node->getType().isScalarOrVec1() || glslangIntermediate->getSource() == glslang::EShSourceHlsl) + return true; + // symbols and constants are trivial if (isTrivialLeaf(node)) return true; @@ -5392,7 +5955,7 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan leftId = builder.createUnaryOp(spv::OpLogicalNot, boolTypeId, leftId); // make an "if" based on the left value - spv::Builder::If ifBuilder(leftId, builder); + spv::Builder::If ifBuilder(leftId, spv::SelectionControlMaskNone, builder); // emit right operand as the "then" part of the "if" builder.clearAccessChain(); @@ -5410,6 +5973,7 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan return builder.createOp(spv::OpPhi, boolTypeId, phiOperands); } +#ifdef AMD_EXTENSIONS // Return type Id of the imported set of extended instructions corresponds to the name. // Import this set if it has not been imported yet. spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name) @@ -5423,6 +5987,7 @@ spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name) return extBuiltins; } } +#endif }; // end anonymous namespace @@ -5436,6 +6001,16 @@ void GetSpirvVersion(std::string& version) version = buf; } +// For low-order part of the generator's magic number. Bump up +// when there is a change in the style (e.g., if SSA form changes, +// or a different instruction sequence to do something gets used). +int GetSpirvGeneratorVersion() +{ + // return 1; // start + // return 2; // EOpAtomicCounterDecrement gets a post decrement, to map between GLSL -> SPIR-V + return 3; // change/correct barrier-instruction operands, to match memory model group decisions +} + // Write SPIR-V out to a binary file void OutputSpvBin(const std::vector& spirv, const char* baseName) { @@ -5480,29 +6055,86 @@ void OutputSpvHex(const std::vector& spirv, const char* baseName, out.close(); } +#ifdef ENABLE_OPT +void errHandler(const std::string& str) { + std::cerr << str << std::endl; +} +#endif + // // Set up the glslang traversal // -void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv) +void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, SpvOptions* options) { spv::SpvBuildLogger logger; - GlslangToSpv(intermediate, spirv, &logger); + GlslangToSpv(intermediate, spirv, &logger, options); } -void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger) +void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, + spv::SpvBuildLogger* logger, SpvOptions* options) { TIntermNode* root = intermediate.getTreeRoot(); if (root == 0) return; + glslang::SpvOptions defaultOptions; + if (options == nullptr) + options = &defaultOptions; + glslang::GetThreadPoolAllocator().push(); - TGlslangToSpvTraverser it(&intermediate, logger); + TGlslangToSpvTraverser it(intermediate.getSpv().spv, &intermediate, logger, *options); root->traverse(&it); it.finishSpv(); it.dumpSpv(spirv); +#ifdef ENABLE_OPT + // If from HLSL, run spirv-opt to "legalize" the SPIR-V for Vulkan + // eg. forward and remove memory writes of opaque types. + if ((intermediate.getSource() == EShSourceHlsl || + options->optimizeSize) && + !options->disableOptimizer) { + spv_target_env target_env = SPV_ENV_UNIVERSAL_1_2; + + spvtools::Optimizer optimizer(target_env); + optimizer.SetMessageConsumer([](spv_message_level_t level, + const char* source, + const spv_position_t& position, + const char* message) { + std::cerr << StringifyMessage(level, source, position, message) + << std::endl; + }); + + optimizer.RegisterPass(CreateInlineExhaustivePass()); + optimizer.RegisterPass(CreateEliminateDeadFunctionsPass()); + optimizer.RegisterPass(CreateScalarReplacementPass()); + optimizer.RegisterPass(CreateLocalAccessChainConvertPass()); + optimizer.RegisterPass(CreateLocalSingleBlockLoadStoreElimPass()); + optimizer.RegisterPass(CreateLocalSingleStoreElimPass()); + optimizer.RegisterPass(CreateInsertExtractElimPass()); + optimizer.RegisterPass(CreateAggressiveDCEPass()); + optimizer.RegisterPass(CreateDeadBranchElimPass()); + optimizer.RegisterPass(CreateCFGCleanupPass()); + optimizer.RegisterPass(CreateBlockMergePass()); + optimizer.RegisterPass(CreateLocalMultiStoreElimPass()); + optimizer.RegisterPass(CreateInsertExtractElimPass()); + optimizer.RegisterPass(CreateAggressiveDCEPass()); + // TODO(greg-lunarg): Add this when AMD driver issues are resolved + // if (options->optimizeSize) + // optimizer.RegisterPass(CreateCommonUniformElimPass()); + + if (!optimizer.Run(spirv.data(), spirv.size(), &spirv)) + return; + + // Remove dead module-level objects: functions, types, vars + // TODO(greg-lunarg): Switch to spirv-opt versions when available + spv::spirvbin_t Remapper(0); + Remapper.registerErrorHandler(errHandler); + Remapper.remap(spirv, spv::spirvbin_t::DCE_ALL); + } +#endif + glslang::GetThreadPoolAllocator().pop(); } diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.h b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.h index 11e22f5..3a43713 100644 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.h +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/GlslangToSpv.h @@ -32,6 +32,8 @@ // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. +#pragma once + #if _MSC_VER >= 1900 #pragma warning(disable : 4464) // relative include path contains '..' #endif @@ -45,9 +47,20 @@ namespace glslang { +struct SpvOptions { + SpvOptions() : generateDebugInfo(false), disableOptimizer(true), + optimizeSize(false) { } + bool generateDebugInfo; + bool disableOptimizer; + bool optimizeSize; +}; + void GetSpirvVersion(std::string&); -void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv); -void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger); +int GetSpirvGeneratorVersion(); +void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, + SpvOptions* options = nullptr); +void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, + spv::SpvBuildLogger* logger, SpvOptions* options = nullptr); void OutputSpvBin(const std::vector& spirv, const char* baseName); void OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName); diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/InReadableOrder.cpp b/3rdparty/bgfx/3rdparty/glslang/SPIRV/InReadableOrder.cpp index 4bb3d77..52b2961 100644 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/InReadableOrder.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/InReadableOrder.cpp @@ -51,7 +51,7 @@ #include "spvIR.h" #include -#include +#include using spv::Block; using spv::Id; @@ -69,33 +69,33 @@ public: void visit(Block* block) { assert(block); - if (visited_[block] || delayed_[block]) + if (visited_.count(block) || delayed_.count(block)) return; callback_(block); - visited_[block] = true; + visited_.insert(block); Block* mergeBlock = nullptr; Block* continueBlock = nullptr; auto mergeInst = block->getMergeInstruction(); if (mergeInst) { Id mergeId = mergeInst->getIdOperand(0); mergeBlock = block->getParent().getParent().getInstruction(mergeId)->getBlock(); - delayed_[mergeBlock] = true; + delayed_.insert(mergeBlock); if (mergeInst->getOpCode() == spv::OpLoopMerge) { Id continueId = mergeInst->getIdOperand(1); continueBlock = block->getParent().getParent().getInstruction(continueId)->getBlock(); - delayed_[continueBlock] = true; + delayed_.insert(continueBlock); } } const auto successors = block->getSuccessors(); for (auto it = successors.cbegin(); it != successors.cend(); ++it) visit(*it); if (continueBlock) { - delayed_[continueBlock] = false; + delayed_.erase(continueBlock); visit(continueBlock); } if (mergeBlock) { - delayed_[mergeBlock] = false; + delayed_.erase(mergeBlock); visit(mergeBlock); } } @@ -103,7 +103,7 @@ public: private: std::function callback_; // Whether a block has already been visited or is being delayed. - std::unordered_map visited_, delayed_; + std::unordered_set visited_, delayed_; }; } diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/SPVRemapper.cpp b/3rdparty/bgfx/3rdparty/glslang/SPIRV/SPVRemapper.cpp index 9b12705..4e45cbb 100755 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/SPVRemapper.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/SPVRemapper.cpp @@ -135,6 +135,9 @@ namespace spv { const unsigned typeStart = idPos(id); const spv::Op opCode = asOpCode(typeStart); + if (errorLatch) + return 0; + switch (opCode) { case spv::OpTypeInt: // fall through... case spv::OpTypeFloat: return (spv[typeStart+2]+31)/32; @@ -148,8 +151,10 @@ namespace spv { unsigned spirvbin_t::idTypeSizeInWords(spv::Id id) const { const auto tid_it = idTypeSizeMap.find(id); - if (tid_it == idTypeSizeMap.end()) + if (tid_it == idTypeSizeMap.end()) { error("type size for ID not found"); + return 0; + } return tid_it->second; } @@ -215,14 +220,19 @@ namespace spv { bool spirvbin_t::isConstOp(spv::Op opCode) const { switch (opCode) { - case spv::OpConstantNull: error("unimplemented constant type"); - case spv::OpConstantSampler: error("unimplemented constant type"); + case spv::OpConstantNull: + case spv::OpConstantSampler: + error("unimplemented constant type"); + return true; case spv::OpConstantTrue: case spv::OpConstantFalse: case spv::OpConstantComposite: - case spv::OpConstant: return true; - default: return false; + case spv::OpConstant: + return true; + + default: + return false; } } @@ -248,19 +258,31 @@ namespace spv { { assert(id != spv::NoResult && newId != spv::NoResult); + if (id > bound()) { + error(std::string("ID out of range: ") + std::to_string(id)); + return spirvbin_t::unused; + } + if (id >= idMapL.size()) idMapL.resize(id+1, unused); if (newId != unmapped && newId != unused) { - if (isOldIdUnused(id)) + if (isOldIdUnused(id)) { error(std::string("ID unused in module: ") + std::to_string(id)); + return spirvbin_t::unused; + } - if (!isOldIdUnmapped(id)) + if (!isOldIdUnmapped(id)) { error(std::string("ID already mapped: ") + std::to_string(id) + " -> " - + std::to_string(localId(id))); + + std::to_string(localId(id))); - if (isNewIdMapped(newId)) + return spirvbin_t::unused; + } + + if (isNewIdMapped(newId)) { error(std::string("ID already used in module: ") + std::to_string(newId)); + return spirvbin_t::unused; + } msg(4, 4, std::string("map: ") + std::to_string(id) + " -> " + std::to_string(newId)); setMapped(newId); @@ -294,6 +316,10 @@ namespace spv { process(inst_fn_nop, // ignore instructions [this](spv::Id& id) { id = localId(id); + + if (errorLatch) + return; + assert(id != unused && id != unmapped); } ); @@ -312,14 +338,22 @@ namespace spv { continue; // Find a new mapping for any used but unmapped IDs - if (isOldIdUnmapped(id)) + if (isOldIdUnmapped(id)) { localId(id, unusedId = nextUnusedId(unusedId)); + if (errorLatch) + return; + } - if (isOldIdUnmapped(id)) + if (isOldIdUnmapped(id)) { error(std::string("old ID not mapped: ") + std::to_string(id)); + return; + } // Track max bound maxBound = std::max(maxBound, localId(id) + 1); + + if (errorLatch) + return; } bound(maxBound); // reset header ID bound to as big as it now needs to be @@ -401,6 +435,9 @@ namespace spv { if (typeId != spv::NoResult) { const unsigned idTypeSize = typeSizeInWords(typeId); + if (errorLatch) + return false; + if (idTypeSize != 0) idTypeSizeMap[resultId] = idTypeSize; } @@ -416,17 +453,26 @@ namespace spv { } else if (opCode == spv::Op::OpEntryPoint) { entryPoint = asId(start + 2); } else if (opCode == spv::Op::OpFunction) { - if (fnStart != 0) + if (fnStart != 0) { error("nested function found"); + return false; + } + fnStart = start; fnRes = asId(start + 2); } else if (opCode == spv::Op::OpFunctionEnd) { assert(fnRes != spv::NoResult); - if (fnStart == 0) + if (fnStart == 0) { error("function end without function start"); + return false; + } + fnPos[fnRes] = range_t(fnStart, start + asWordCount(start)); fnStart = 0; } else if (isConstOp(opCode)) { + if (errorLatch) + return false; + assert(asId(start + 2) != spv::NoResult); typeConstPos.insert(start); } else if (isTypeOp(opCode)) { @@ -446,29 +492,37 @@ namespace spv { { msg(2, 2, std::string("validating: ")); - if (spv.size() < header_size) + if (spv.size() < header_size) { error("file too short: "); + return; + } - if (magic() != spv::MagicNumber) + if (magic() != spv::MagicNumber) { error("bad magic number"); + return; + } // field 1 = version // field 2 = generator magic // field 3 = result bound - if (schemaNum() != 0) + if (schemaNum() != 0) { error("bad schema, must be 0"); + return; + } } int spirvbin_t::processInstruction(unsigned word, instfn_t instFn, idfn_t idFn) { const auto instructionStart = word; const unsigned wordCount = asWordCount(instructionStart); - const spv::Op opCode = asOpCode(instructionStart); const int nextInst = word++ + wordCount; + spv::Op opCode = asOpCode(instructionStart); - if (nextInst > int(spv.size())) + if (nextInst > int(spv.size())) { error("spir instruction terminated too early"); + return -1; + } // Base for computing number of operands; will be updated as more is learned unsigned numOperands = wordCount - 1; @@ -506,6 +560,18 @@ namespace spv { // Store IDs from instruction in our map for (int op = 0; numOperands > 0; ++op, --numOperands) { + // SpecConstantOp is special: it includes the operands of another opcode which is + // given as a literal in the 3rd word. We will switch over to pretending that the + // opcode being processed is the literal opcode value of the SpecConstantOp. See the + // SPIRV spec for details. This way we will handle IDs and literals as appropriate for + // the embedded op. + if (opCode == spv::OpSpecConstantOp) { + if (op == 0) { + opCode = asOpCode(word++); // this is the opcode embedded in the SpecConstantOp. + --numOperands; + } + } + switch (spv::InstructionDesc[opCode].operands.getClass(op)) { case spv::OperandId: case spv::OperandScope: @@ -538,6 +604,9 @@ namespace spv { const unsigned literalSize = idTypeSizeInWords(idBuffer[literalSizePos]); const unsigned numLiteralIdPairs = (nextInst-word) / (1+literalSize); + if (errorLatch) + return -1; + for (unsigned arg=0; arg 0) @@ -915,6 +1010,9 @@ namespace spv { }, op_fn_nop); + if (errorLatch) + return; + // Chase replacements to their origins, in case there is a chain such as: // 2 = store 1 // 3 = load 2 @@ -948,6 +1046,9 @@ namespace spv { } ); + if (errorLatch) + return; + strip(); // strip out data we decided to eliminate } @@ -991,6 +1092,9 @@ namespace spv { fn->second.first, fn->second.second); + if (errorLatch) + return; + fn = fnPos.erase(fn); } else ++fn; } @@ -1023,6 +1127,9 @@ namespace spv { [&](spv::Id& id) { if (varUseCount[id]) ++varUseCount[id]; } ); + if (errorLatch) + return; + // Remove single-use function variables + associated decorations and names process( [&](spv::Op opCode, unsigned start) { @@ -1064,6 +1171,9 @@ namespace spv { [&](spv::Id& id) { if (isType[id]) ++typeUseCount[id]; } ); + if (errorLatch) + return; + // Remove single reference types for (const auto typeStart : typeConstPos) { const spv::Id typeId = asTypeConstId(typeStart); @@ -1073,6 +1183,9 @@ namespace spv { stripInst(typeStart); } } + + if (errorLatch) + return; } } @@ -1151,8 +1264,10 @@ namespace spv { unsigned spirvbin_t::idPos(spv::Id id) const { const auto tid_it = idPosR.find(id); - if (tid_it == idPosR.end()) + if (tid_it == idPosR.end()) { error("ID not found"); + return 0; + } return tid_it->second; } @@ -1251,8 +1366,14 @@ namespace spv { const spv::Id resId = asTypeConstId(typeStart); const std::uint32_t hashval = hashType(typeStart); - if (isOldIdUnmapped(resId)) + if (errorLatch) + return; + + if (isOldIdUnmapped(resId)) { localId(resId, nextUnusedId(hashval % softTypeIdLimit + firstMappedID)); + if (errorLatch) + return; + } } } @@ -1271,7 +1392,7 @@ namespace spv { int strippedPos = 0; for (unsigned word = 0; word < unsigned(spv.size()); ++word) { - if (strip_it != stripRange.end() && word >= strip_it->second) + while (strip_it != stripRange.end() && word >= strip_it->second) ++strip_it; if (strip_it == stripRange.end() || word < strip_it->first || word >= strip_it->second) @@ -1298,24 +1419,49 @@ namespace spv { msg(3, 4, std::string("ID bound: ") + std::to_string(bound())); if (options & STRIP) stripDebug(); + if (errorLatch) return; + strip(); // strip out data we decided to eliminate + if (errorLatch) return; + if (options & OPT_LOADSTORE) optLoadStore(); + if (errorLatch) return; + if (options & OPT_FWD_LS) forwardLoadStores(); + if (errorLatch) return; + if (options & DCE_FUNCS) dceFuncs(); + if (errorLatch) return; + if (options & DCE_VARS) dceVars(); + if (errorLatch) return; + if (options & DCE_TYPES) dceTypes(); + if (errorLatch) return; strip(); // strip out data we decided to eliminate + if (errorLatch) return; + stripDeadRefs(); // remove references to things we DCEed + if (errorLatch) return; + // after the last strip, we must clean any debug info referring to now-deleted data if (options & MAP_TYPES) mapTypeConst(); + if (errorLatch) return; + if (options & MAP_NAMES) mapNames(); + if (errorLatch) return; + if (options & MAP_FUNCS) mapFnBodies(); + if (errorLatch) return; if (options & MAP_ALL) { mapRemainder(); // map any unmapped IDs + if (errorLatch) return; + applyMap(); // Now remap each shader to the new IDs we've come up with + if (errorLatch) return; } } diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/SPVRemapper.h b/3rdparty/bgfx/3rdparty/glslang/SPIRV/SPVRemapper.h index f9f369a..97e3f31 100755 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/SPVRemapper.h +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/SPVRemapper.h @@ -39,6 +39,7 @@ #include #include #include +#include namespace spv { @@ -111,7 +112,9 @@ namespace spv { class spirvbin_t : public spirvbin_base_t { public: - spirvbin_t(int verbose = 0) : entryPoint(spv::NoResult), largestNewId(0), verbose(verbose) { } + spirvbin_t(int verbose = 0) : entryPoint(spv::NoResult), largestNewId(0), verbose(verbose), errorLatch(false) + { } + virtual ~spirvbin_t() { } // remap on an existing binary in memory @@ -165,7 +168,7 @@ private: typedef std::unordered_map typesize_map_t; // handle error - void error(const std::string& txt) const { errorHandler(txt); } + void error(const std::string& txt) const { errorLatch = true; errorHandler(txt); } bool isConstOp(spv::Op opCode) const; bool isTypeOp(spv::Op opCode) const; @@ -286,6 +289,11 @@ private: std::uint32_t options; int verbose; // verbosity level + // Error latch: this is set if the error handler is ever executed. It would be better to + // use a try/catch block and throw, but that's not desired for certain environments, so + // this is the alternative. + mutable bool errorLatch; + static errorfn_t errorHandler; static logfn_t logHandler; }; diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvBuilder.cpp b/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvBuilder.cpp index 0add1db..f877a2e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvBuilder.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvBuilder.cpp @@ -56,9 +56,13 @@ namespace spv { -Builder::Builder(unsigned int magicNumber, SpvBuildLogger* buildLogger) : +Builder::Builder(unsigned int spvVersion, unsigned int magicNumber, SpvBuildLogger* buildLogger) : + spvVersion(spvVersion), source(SourceLanguageUnknown), sourceVersion(0), + sourceFileStringId(NoResult), + currentLine(0), + emitOpLines(false), addressModel(AddressingModelLogical), memoryModel(MemoryModelGLSL450), builderNumber(magicNumber), @@ -84,6 +88,26 @@ Id Builder::import(const char* name) return import->getResultId(); } +// Emit an OpLine if we've been asked to emit OpLines and the line number +// has changed since the last time, and is a valid line number. +void Builder::setLine(int lineNum) +{ + if (lineNum != 0 && lineNum != currentLine) { + currentLine = lineNum; + if (emitOpLines) + addLine(sourceFileStringId, currentLine, 0); + } +} + +void Builder::addLine(Id fileName, int lineNum, int column) +{ + Instruction* line = new Instruction(OpLine); + line->addIdOperand(fileName); + line->addImmediateOperand(lineNum); + line->addImmediateOperand(column); + buildPoint->addInstruction(std::unique_ptr(line)); +} + // For creating new groupedTypes (will return old type if the requested one was already made). Id Builder::makeVoidType() { @@ -379,6 +403,8 @@ Id Builder::makeFunctionType(Id returnType, const std::vector& paramTypes) Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format) { + assert(sampled == 1 || sampled == 2); + // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[OpTypeImage].size(); ++t) { @@ -410,27 +436,27 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo // deal with capabilities switch (dim) { case DimBuffer: - if (sampled) + if (sampled == 1) addCapability(CapabilitySampledBuffer); else addCapability(CapabilityImageBuffer); break; case Dim1D: - if (sampled) + if (sampled == 1) addCapability(CapabilitySampled1D); else addCapability(CapabilityImage1D); break; case DimCube: if (arrayed) { - if (sampled) + if (sampled == 1) addCapability(CapabilitySampledCubeArray); else addCapability(CapabilityImageCubeArray); } break; case DimRect: - if (sampled) + if (sampled == 1) addCapability(CapabilitySampledRect); else addCapability(CapabilityImageRect); @@ -443,10 +469,14 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo } if (ms) { - if (arrayed) - addCapability(CapabilityImageMSArray); - if (! sampled) - addCapability(CapabilityStorageImageMultisample); + if (sampled == 2) { + // Images used with subpass data are not storage + // images, so don't require the capability for them. + if (dim != Dim::DimSubpassData) + addCapability(CapabilityStorageImageMultisample); + if (arrayed) + addCapability(CapabilityImageMSArray); + } } return type->getResultId(); @@ -928,17 +958,6 @@ void Builder::addMemberName(Id id, int memberNumber, const char* string) names.push_back(std::unique_ptr(name)); } -void Builder::addLine(Id target, Id fileName, int lineNum, int column) -{ - Instruction* line = new Instruction(OpLine); - line->addIdOperand(target); - line->addIdOperand(fileName); - line->addImmediateOperand(lineNum); - line->addImmediateOperand(column); - - lines.push_back(std::unique_ptr(line)); -} - void Builder::addDecoration(Id id, Decoration decoration, int num) { if (decoration == spv::DecorationMax) @@ -971,16 +990,16 @@ Function* Builder::makeEntryPoint(const char* entryPoint) Block* entry; std::vector params; - std::vector precisions; + std::vector> decorations; - entryPointFunction = makeFunctionEntry(NoPrecision, makeVoidType(), entryPoint, params, precisions, &entry); + entryPointFunction = makeFunctionEntry(NoPrecision, makeVoidType(), entryPoint, params, decorations, &entry); return entryPointFunction; } // Comments in header Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, - const std::vector& paramTypes, const std::vector& precisions, Block **entry) + const std::vector& paramTypes, const std::vector>& decorations, Block **entry) { // Make the function and initial instructions in it Id typeId = makeFunctionType(returnType, paramTypes); @@ -989,8 +1008,10 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const // Set up the precisions setPrecision(function->getId(), precision); - for (unsigned p = 0; p < (unsigned)precisions.size(); ++p) - setPrecision(firstParamId + p, precisions[p]); + for (unsigned p = 0; p < (unsigned)decorations.size(); ++p) { + for (int d = 0; d < (int)decorations[p].size(); ++d) + addDecoration(firstParamId + p, decorations[p][d]); + } // CFG if (entry) { @@ -1997,9 +2018,10 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector& } // Comments in header -Builder::If::If(Id cond, Builder& gb) : +Builder::If::If(Id cond, unsigned int ctrl, Builder& gb) : builder(gb), condition(cond), + control(ctrl), elseBlock(0) { function = &builder.getBuildPoint()->getParent(); @@ -2040,7 +2062,7 @@ void Builder::If::makeEndIf() // Go back to the headerBlock and make the flow control split builder.setBuildPoint(headerBlock); - builder.createSelectionMerge(mergeBlock, SelectionControlMaskNone); + builder.createSelectionMerge(mergeBlock, control); if (elseBlock) builder.createConditionalBranch(condition, thenBlock, elseBlock); else @@ -2052,7 +2074,7 @@ void Builder::If::makeEndIf() } // Comments in header -void Builder::makeSwitch(Id selector, int numSegments, const std::vector& caseValues, +void Builder::makeSwitch(Id selector, unsigned int control, int numSegments, const std::vector& caseValues, const std::vector& valueIndexToSegment, int defaultSegment, std::vector& segmentBlocks) { @@ -2065,7 +2087,7 @@ void Builder::makeSwitch(Id selector, int numSegments, const std::vector& c Block* mergeBlock = new Block(getUniqueId(), function); // make and insert the switch's selection-merge instruction - createSelectionMerge(mergeBlock, SelectionControlMaskNone); + createSelectionMerge(mergeBlock, control); // make the switch instruction Instruction* switchInst = new Instruction(NoResult, NoType, OpSwitch); @@ -2382,7 +2404,7 @@ void Builder::dump(std::vector& out) const { // Header, before first instructions: out.push_back(MagicNumber); - out.push_back(Version); + out.push_back(spvVersion); out.push_back(builderNumber); out.push_back(uniqueId + 1); out.push_back(0); @@ -2411,12 +2433,9 @@ void Builder::dump(std::vector& out) const dumpInstructions(out, executionModes); // Debug instructions - if (source != SourceLanguageUnknown) { - Instruction sourceInst(0, 0, OpSource); - sourceInst.addImmediateOperand(source); - sourceInst.addImmediateOperand(sourceVersion); - sourceInst.dump(out); - } + dumpInstructions(out, strings); + dumpModuleProcesses(out); + dumpSourceInstructions(out); for (int e = 0; e < (int)sourceExtensions.size(); ++e) { Instruction sourceExtInst(0, 0, OpSourceExtension); sourceExtInst.addStringOperand(sourceExtensions[e]); @@ -2554,12 +2573,15 @@ void Builder::createSelectionMerge(Block* mergeBlock, unsigned int control) buildPoint->addInstruction(std::unique_ptr(merge)); } -void Builder::createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control) +void Builder::createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control, + unsigned int dependencyLength) { Instruction* merge = new Instruction(OpLoopMerge); merge->addIdOperand(mergeBlock->getId()); merge->addIdOperand(continueBlock->getId()); merge->addImmediateOperand(control); + if ((control & LoopControlDependencyLengthMask) != 0) + merge->addImmediateOperand(dependencyLength); buildPoint->addInstruction(std::unique_ptr(merge)); } @@ -2574,6 +2596,48 @@ void Builder::createConditionalBranch(Id condition, Block* thenBlock, Block* els elseBlock->addPredecessor(buildPoint); } +// OpSource +// [OpSourceContinued] +// ... +void Builder::dumpSourceInstructions(std::vector& out) const +{ + const int maxWordCount = 0xFFFF; + const int opSourceWordCount = 4; + const int nonNullBytesPerInstruction = 4 * (maxWordCount - opSourceWordCount) - 1; + + if (source != SourceLanguageUnknown) { + // OpSource Language Version File Source + Instruction sourceInst(NoResult, NoType, OpSource); + sourceInst.addImmediateOperand(source); + sourceInst.addImmediateOperand(sourceVersion); + // File operand + if (sourceFileStringId != NoResult) { + sourceInst.addIdOperand(sourceFileStringId); + // Source operand + if (sourceText.size() > 0) { + int nextByte = 0; + std::string subString; + while ((int)sourceText.size() - nextByte > 0) { + subString = sourceText.substr(nextByte, nonNullBytesPerInstruction); + if (nextByte == 0) { + // OpSource + sourceInst.addStringOperand(subString.c_str()); + sourceInst.dump(out); + } else { + // OpSourcContinued + Instruction sourceContinuedInst(OpSourceContinued); + sourceContinuedInst.addStringOperand(subString.c_str()); + sourceContinuedInst.dump(out); + } + nextByte += nonNullBytesPerInstruction; + } + } else + sourceInst.dump(out); + } else + sourceInst.dump(out); + } +} + void Builder::dumpInstructions(std::vector& out, const std::vector >& instructions) const { for (int i = 0; i < (int)instructions.size(); ++i) { @@ -2581,4 +2645,13 @@ void Builder::dumpInstructions(std::vector& out, const std::vector } } +void Builder::dumpModuleProcesses(std::vector& out) const +{ + for (int i = 0; i < (int)moduleProcesses.size(); ++i) { + Instruction moduleProcessed(OpModuleProcessed); + moduleProcessed.addStringOperand(moduleProcesses[i]); + moduleProcessed.dump(out); + } +} + }; // end spv namespace diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvBuilder.h b/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvBuilder.h index d93174e..9f15989 100755 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvBuilder.h +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/SpvBuilder.h @@ -60,7 +60,7 @@ namespace spv { class Builder { public: - Builder(unsigned int userNumber, SpvBuildLogger* logger); + Builder(unsigned int spvVersion, unsigned int userNumber, SpvBuildLogger* logger); virtual ~Builder(); static const int maxMatrixSize = 4; @@ -70,7 +70,17 @@ public: source = lang; sourceVersion = version; } + void setSourceFile(const std::string& file) + { + Instruction* fileString = new Instruction(getUniqueId(), NoType, OpString); + fileString->addStringOperand(file.c_str()); + sourceFileStringId = fileString->getResultId(); + strings.push_back(std::unique_ptr(fileString)); + } + void setSourceText(const std::string& text) { sourceText = text; } void addSourceExtension(const char* ext) { sourceExtensions.push_back(ext); } + void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); } + void setEmitOpLines() { emitOpLines = true; } void addExtension(const char* ext) { extensions.insert(ext); } Id import(const char*); void setMemoryModel(spv::AddressingModel addr, spv::MemoryModel mem) @@ -92,6 +102,12 @@ public: return id; } + // Log the current line, and if different than the last one, + // issue a new OpLine, using the current file name. + void setLine(int line); + // Low-level OpLine. See setLine() for a layered helper. + void addLine(Id fileName, int line, int column); + // For creating new types (will return old type if the requested one was already made). Id makeVoidType(); Id makeBoolType(); @@ -199,6 +215,10 @@ public: Id makeUintConstant(unsigned u, bool specConstant = false) { return makeIntConstant(makeUintType(32), u, specConstant); } Id makeInt64Constant(long long i, bool specConstant = false) { return makeInt64Constant(makeIntType(64), (unsigned long long)i, specConstant); } Id makeUint64Constant(unsigned long long u, bool specConstant = false) { return makeInt64Constant(makeUintType(64), u, specConstant); } +#ifdef AMD_EXTENSIONS + Id makeInt16Constant(short i, bool specConstant = false) { return makeIntConstant(makeIntType(16), (unsigned)((unsigned short)i), specConstant); } + Id makeUint16Constant(unsigned short u, bool specConstant = false) { return makeIntConstant(makeUintType(16), (unsigned)u, specConstant); } +#endif Id makeFloatConstant(float f, bool specConstant = false); Id makeDoubleConstant(double d, bool specConstant = false); #ifdef AMD_EXTENSIONS @@ -213,7 +233,6 @@ public: void addExecutionMode(Function*, ExecutionMode mode, int value1 = -1, int value2 = -1, int value3 = -1); void addName(Id, const char* name); void addMemberName(Id, int member, const char* name); - void addLine(Id target, Id fileName, int line, int column); void addDecoration(Id, Decoration, int num = -1); void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1); @@ -229,7 +248,7 @@ public: // Return the function, pass back the entry. // The returned pointer is only valid for the lifetime of this builder. Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, const std::vector& paramTypes, - const std::vector& precisions, Block **entry = 0); + const std::vector>& precisions, Block **entry = 0); // Create a return. An 'implicit' return is one not appearing in the source // code. In the case of an implicit return, no post-return block is inserted. @@ -367,7 +386,7 @@ public: // Helper to use for building nested control flow with if-then-else. class If { public: - If(Id condition, Builder& builder); + If(Id condition, unsigned int ctrl, Builder& builder); ~If() {} void makeBeginElse(); @@ -379,6 +398,7 @@ public: Builder& builder; Id condition; + unsigned int control; Function* function; Block* headerBlock; Block* thenBlock; @@ -398,7 +418,7 @@ public: // Returns the right set of basic blocks to start each code segment with, so that the caller's // recursion stack can hold the memory for it. // - void makeSwitch(Id condition, int numSegments, const std::vector& caseValues, + void makeSwitch(Id condition, unsigned int control, int numSegments, const std::vector& caseValues, const std::vector& valueToSegment, int defaultSegment, std::vector& segmentBB); // return argument // Add a branch to the innermost switch's merge block. @@ -541,7 +561,7 @@ public: void createBranch(Block* block); void createConditionalBranch(Id condition, Block* thenBlock, Block* elseBlock); - void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control); + void createLoopMerge(Block* mergeBlock, Block* continueBlock, unsigned int control, unsigned int dependencyLength); // Sets to generate opcode for specialization constants. void setToSpecConstCodeGenMode() { generatingOpCodeForSpecConst = true; } @@ -561,12 +581,20 @@ public: void simplifyAccessChainSwizzle(); void createAndSetNoPredecessorBlock(const char*); void createSelectionMerge(Block* mergeBlock, unsigned int control); + void dumpSourceInstructions(std::vector&) const; void dumpInstructions(std::vector&, const std::vector >&) const; + void dumpModuleProcesses(std::vector&) const; + unsigned int spvVersion; // the version of SPIR-V to emit in the header SourceLanguage source; int sourceVersion; + spv::Id sourceFileStringId; + std::string sourceText; + int currentLine; + bool emitOpLines; std::set extensions; std::vector sourceExtensions; + std::vector moduleProcesses; AddressingModel addressModel; MemoryModel memoryModel; std::set capabilities; @@ -579,6 +607,7 @@ public: AccessChain accessChain; // special blocks of instructions for output + std::vector > strings; std::vector > imports; std::vector > entryPoints; std::vector > executionModes; @@ -599,7 +628,7 @@ public: // Our loop stack. std::stack loops; - // The stream for outputing warnings and errors. + // The stream for outputting warnings and errors. SpvBuildLogger* logger; }; // end Builder class diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/doc.cpp b/3rdparty/bgfx/3rdparty/glslang/SPIRV/doc.cpp index 903421c..809af4c 100755 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/doc.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/doc.cpp @@ -49,6 +49,7 @@ namespace spv { extern "C" { // Include C-based headers that don't have a namespace #include "GLSL.ext.KHR.h" + #include "GLSL.ext.EXT.h" #ifdef AMD_EXTENSIONS #include "GLSL.ext.AMD.h" #endif @@ -175,12 +176,13 @@ const char* ExecutionModeString(int mode) case 31: return "ContractionOff"; case 32: return "Bad"; + case 4446: return "PostDepthCoverage"; case ExecutionModeCeiling: default: return "Bad"; } } -const int StorageClassCeiling = 12; +const int StorageClassCeiling = 13; const char* StorageClassString(int StorageClass) { @@ -197,6 +199,7 @@ const char* StorageClassString(int StorageClass) case 9: return "PushConstant"; case 10: return "AtomicCounter"; case 11: return "Image"; + case 12: return "StorageBuffer"; case StorageClassCeiling: default: return "Bad"; @@ -329,6 +332,7 @@ const char* BuiltInString(int builtIn) case 4424: return "BaseVertex"; case 4425: return "BaseInstance"; case 4426: return "DrawIndex"; + case 5014: return "FragStencilRefEXT"; #ifdef AMD_EXTENSIONS case 4992: return "BaryCoordNoPerspAMD"; @@ -348,6 +352,8 @@ const char* BuiltInString(int builtIn) case 5262: return "ViewportMaskPerViewNV"; #endif + case 5264: return "FullyCoveredEXT"; + case BuiltInCeiling: default: return "Bad"; } @@ -635,13 +641,15 @@ const char* SelectControlString(int cont) } } -const int LoopControlCeiling = 2; +const int LoopControlCeiling = 4; const char* LoopControlString(int cont) { switch (cont) { case 0: return "Unroll"; case 1: return "DontUnroll"; + case 2: return "DependencyInfinite"; + case 3: return "DependencyLength"; case LoopControlCeiling: default: return "Bad"; @@ -830,9 +838,25 @@ const char* CapabilityString(int info) case 4427: return "DrawParameters"; case 4431: return "SubgroupVoteKHR"; + case 4433: return "StorageUniformBufferBlock16"; + case 4434: return "StorageUniform16"; + case 4435: return "StoragePushConstant16"; + case 4436: return "StorageInputOutput16"; + case 4437: return "DeviceGroup"; case 4439: return "MultiView"; + case 5013: return "StencilExportEXT"; + +#ifdef AMD_EXTENSIONS + case 5009: return "ImageGatherBiasLodAMD"; + case 5010: return "FragmentMaskAMD"; + case 5015: return "ImageReadWriteLodAMD"; +#endif + + case 4445: return "AtomicStorageOps"; + + case 4447: return "SampleMaskPostDepthCoverage"; #ifdef NV_EXTENSIONS case 5251: return "GeometryShaderPassthroughNV"; case 5254: return "ShaderViewportIndexLayerNV"; @@ -841,6 +865,8 @@ const char* CapabilityString(int info) case 5260: return "PerViewAttributesNV"; #endif + case 5265: return "FragmentFullyCoveredEXT"; + case CapabilityCeiling: default: return "Bad"; } @@ -1187,6 +1213,9 @@ const char* OpcodeString(int op) case 5005: return "OpGroupFMaxNonUniformAMD"; case 5006: return "OpGroupUMaxNonUniformAMD"; case 5007: return "OpGroupSMaxNonUniformAMD"; + + case 5011: return "OpFragmentMaskFetchAMD"; + case 5012: return "OpFragmentFetchAMD"; #endif case OpcodeCeiling: @@ -2529,6 +2558,7 @@ void Parameterize() InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'"); InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'"); InstructionDesc[OpLoopMerge].operands.push(OperandLoop, ""); + InstructionDesc[OpLoopMerge].operands.push(OperandOptionalLiteral, ""); InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'"); InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, ""); @@ -2849,6 +2879,15 @@ void Parameterize() InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpFragmentMaskFetchAMD].capabilities.push_back(CapabilityFragmentMaskAMD); + InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'"); + InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'"); + + InstructionDesc[OpFragmentFetchAMD].capabilities.push_back(CapabilityFragmentMaskAMD); + InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'"); + InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'"); #endif } diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/doc.h b/3rdparty/bgfx/3rdparty/glslang/SPIRV/doc.h index 7dcc51d..710ca1a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/doc.h +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/doc.h @@ -36,6 +36,8 @@ // Parameterize the SPIR-V enumerants. // +#pragma once + #include "spirv.hpp" #include diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/hex_float.h b/3rdparty/bgfx/3rdparty/glslang/SPIRV/hex_float.h index 31b9f9e..905b21a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/hex_float.h +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/hex_float.h @@ -23,7 +23,7 @@ #include #include -#if defined(_MSC_VER) && _MSC_VER < 1700 +#if defined(_MSC_VER) && _MSC_VER < 1800 namespace std { bool isnan(double f) { diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/spirv.hpp b/3rdparty/bgfx/3rdparty/glslang/SPIRV/spirv.hpp index 91cb59e..c677663 100755 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/spirv.hpp +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/spirv.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2017 The Khronos Group Inc. +// Copyright (c) 2014-2018 The Khronos Group Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and/or associated documentation files (the "Materials"), @@ -46,12 +46,12 @@ namespace spv { typedef unsigned int Id; -#define SPV_VERSION 0x10000 -#define SPV_REVISION 10 +#define SPV_VERSION 0x10200 +#define SPV_REVISION 3 static const unsigned int MagicNumber = 0x07230203; -static const unsigned int Version = 0x00010000; -static const unsigned int Revision = 10; +static const unsigned int Version = 0x00010200; +static const unsigned int Revision = 3; static const unsigned int OpCodeMask = 0xffff; static const unsigned int WordCountShift = 16; @@ -122,6 +122,15 @@ enum ExecutionMode { ExecutionModeOutputTriangleStrip = 29, ExecutionModeVecTypeHint = 30, ExecutionModeContractionOff = 31, + ExecutionModeInitializer = 33, + ExecutionModeFinalizer = 34, + ExecutionModeSubgroupSize = 35, + ExecutionModeSubgroupsPerWorkgroup = 36, + ExecutionModeSubgroupsPerWorkgroupId = 37, + ExecutionModeLocalSizeId = 38, + ExecutionModeLocalSizeHintId = 39, + ExecutionModePostDepthCoverage = 4446, + ExecutionModeStencilRefReplacingEXT = 5027, ExecutionModeMax = 0x7fffffff, }; @@ -376,6 +385,10 @@ enum Decoration { DecorationNoContraction = 42, DecorationInputAttachmentIndex = 43, DecorationAlignment = 44, + DecorationMaxByteOffset = 45, + DecorationAlignmentId = 46, + DecorationMaxByteOffsetId = 47, + DecorationExplicitInterpAMD = 4999, DecorationOverrideCoverageNV = 5248, DecorationPassthroughNV = 5250, DecorationViewportRelativeNV = 5252, @@ -435,11 +448,20 @@ enum BuiltIn { BuiltInDrawIndex = 4426, BuiltInDeviceIndex = 4438, BuiltInViewIndex = 4440, + BuiltInBaryCoordNoPerspAMD = 4992, + BuiltInBaryCoordNoPerspCentroidAMD = 4993, + BuiltInBaryCoordNoPerspSampleAMD = 4994, + BuiltInBaryCoordSmoothAMD = 4995, + BuiltInBaryCoordSmoothCentroidAMD = 4996, + BuiltInBaryCoordSmoothSampleAMD = 4997, + BuiltInBaryCoordPullModelAMD = 4998, + BuiltInFragStencilRefEXT = 5014, BuiltInViewportMaskNV = 5253, BuiltInSecondaryPositionNV = 5257, BuiltInSecondaryViewportMaskNV = 5258, BuiltInPositionPerViewNV = 5261, BuiltInViewportMaskPerViewNV = 5262, + BuiltInFullyCoveredEXT = 5264, BuiltInMax = 0x7fffffff, }; @@ -458,6 +480,8 @@ enum SelectionControlMask { enum LoopControlShift { LoopControlUnrollShift = 0, LoopControlDontUnrollShift = 1, + LoopControlDependencyInfiniteShift = 2, + LoopControlDependencyLengthShift = 3, LoopControlMax = 0x7fffffff, }; @@ -465,6 +489,8 @@ enum LoopControlMask { LoopControlMaskNone = 0, LoopControlUnrollMask = 0x00000001, LoopControlDontUnrollMask = 0x00000002, + LoopControlDependencyInfiniteMask = 0x00000004, + LoopControlDependencyLengthMask = 0x00000008, }; enum FunctionControlShift { @@ -615,6 +641,9 @@ enum Capability { CapabilityStorageImageReadWithoutFormat = 55, CapabilityStorageImageWriteWithoutFormat = 56, CapabilityMultiViewport = 57, + CapabilitySubgroupDispatch = 58, + CapabilityNamedBarrier = 59, + CapabilityPipeStorage = 60, CapabilitySubgroupBallotKHR = 4423, CapabilityDrawParameters = 4427, CapabilitySubgroupVoteKHR = 4431, @@ -628,12 +657,23 @@ enum Capability { CapabilityMultiView = 4439, CapabilityVariablePointersStorageBuffer = 4441, CapabilityVariablePointers = 4442, + CapabilityAtomicStorageOps = 4445, + CapabilitySampleMaskPostDepthCoverage = 4447, + CapabilityImageGatherBiasLodAMD = 5009, + CapabilityFragmentMaskAMD = 5010, + CapabilityStencilExportEXT = 5013, + CapabilityImageReadWriteLodAMD = 5015, CapabilitySampleMaskOverrideCoverageNV = 5249, CapabilityGeometryShaderPassthroughNV = 5251, + CapabilityShaderViewportIndexLayerEXT = 5254, CapabilityShaderViewportIndexLayerNV = 5254, CapabilityShaderViewportMaskNV = 5255, CapabilityShaderStereoViewNV = 5259, CapabilityPerViewAttributesNV = 5260, + CapabilityFragmentFullyCoveredEXT = 5265, + CapabilitySubgroupShuffleINTEL = 5568, + CapabilitySubgroupBufferBlockIOINTEL = 5569, + CapabilitySubgroupImageBlockIOINTEL = 5570, CapabilityMax = 0x7fffffff, }; @@ -932,12 +972,42 @@ enum Op { OpAtomicFlagTestAndSet = 318, OpAtomicFlagClear = 319, OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpExecutionModeId = 331, + OpDecorateId = 332, OpSubgroupBallotKHR = 4421, OpSubgroupFirstInvocationKHR = 4422, OpSubgroupAllKHR = 4428, OpSubgroupAnyKHR = 4429, OpSubgroupAllEqualKHR = 4430, OpSubgroupReadInvocationKHR = 4432, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, OpMax = 0x7fffffff, }; diff --git a/3rdparty/bgfx/3rdparty/glslang/SPIRV/spvIR.h b/3rdparty/bgfx/3rdparty/glslang/SPIRV/spvIR.h index ce8b4b8..faa2701 100755 --- a/3rdparty/bgfx/3rdparty/glslang/SPIRV/spvIR.h +++ b/3rdparty/bgfx/3rdparty/glslang/SPIRV/spvIR.h @@ -65,12 +65,17 @@ const Id NoResult = 0; const Id NoType = 0; const Decoration NoPrecision = DecorationMax; + +#ifdef __GNUC__ +# define POTENTIALLY_UNUSED __attribute__((unused)) +#else +# define POTENTIALLY_UNUSED +#endif + +POTENTIALLY_UNUSED const MemorySemanticsMask MemorySemanticsAllMemory = - (MemorySemanticsMask)(MemorySemanticsSequentiallyConsistentMask | - MemorySemanticsUniformMemoryMask | - MemorySemanticsSubgroupMemoryMask | + (MemorySemanticsMask)(MemorySemanticsUniformMemoryMask | MemorySemanticsWorkgroupMemoryMask | - MemorySemanticsCrossWorkgroupMemoryMask | MemorySemanticsAtomicCounterMemoryMask | MemorySemanticsImageMemoryMask); @@ -87,7 +92,6 @@ public: void addImmediateOperand(unsigned int immediate) { operands.push_back(immediate); } void addStringOperand(const char* str) { - originalString = str; unsigned int word; char* wordString = (char*)&word; char* wordPtr = wordString; @@ -120,7 +124,6 @@ public: Id getTypeId() const { return typeId; } Id getIdOperand(int op) const { return operands[op]; } unsigned int getImmediateOperand(int op) const { return operands[op]; } - const char* getStringOperand() const { return originalString.c_str(); } // Write out the binary form. void dump(std::vector& out) const @@ -151,7 +154,6 @@ protected: Id typeId; Op opCode; std::vector operands; - std::string originalString; // could be optimized away; convenience for getting string operand Block* block; }; diff --git a/3rdparty/bgfx/3rdparty/glslang/StandAlone/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/StandAlone/CMakeLists.txt index 2a9a3c4..b0d863d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/StandAlone/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/StandAlone/CMakeLists.txt @@ -1,14 +1,13 @@ add_library(glslang-default-resource-limits - ${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp -) + ${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp) set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang) +set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON) target_include_directories(glslang-default-resource-limits - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} - PUBLIC ${PROJECT_SOURCE_DIR} -) + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} + PUBLIC ${PROJECT_SOURCE_DIR}) -set(SOURCES StandAlone.cpp) +set(SOURCES StandAlone.cpp DirStackFileIncluder.h) set(REMAPPER_SOURCES spirv-remap.cpp) add_executable(glslangValidator ${SOURCES}) @@ -24,7 +23,6 @@ set(LIBRARIES SPVRemapper glslang-default-resource-limits) - if(WIN32) set(LIBRARIES ${LIBRARIES} psapi) elseif(UNIX) @@ -40,8 +38,10 @@ if(WIN32) source_group("Source" FILES ${SOURCES}) endif(WIN32) -install(TARGETS glslangValidator - RUNTIME DESTINATION bin) +if(ENABLE_GLSLANG_INSTALL) + install(TARGETS glslangValidator + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -install(TARGETS spirv-remap - RUNTIME DESTINATION bin) + install(TARGETS spirv-remap + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +endif(ENABLE_GLSLANG_INSTALL) diff --git a/3rdparty/bgfx/3rdparty/glslang/StandAlone/DirStackFileIncluder.h b/3rdparty/bgfx/3rdparty/glslang/StandAlone/DirStackFileIncluder.h new file mode 100644 index 0000000..1873413 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/StandAlone/DirStackFileIncluder.h @@ -0,0 +1,141 @@ +// +// Copyright (C) 2002-2005 3Dlabs Inc. Ltd. +// Copyright (C) 2017 Google, Inc. +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + +#pragma once + +#include +#include +#include +#include + +#include "./../glslang/Public/ShaderLang.h" + +// Default include class for normal include convention of search backward +// through the stack of active include paths (for nested includes). +// Can be overridden to customize. +class DirStackFileIncluder : public glslang::TShader::Includer { +public: + DirStackFileIncluder() : externalLocalDirectoryCount(0) { } + + virtual IncludeResult* includeLocal(const char* headerName, + const char* includerName, + size_t inclusionDepth) override + { + return readLocalPath(headerName, includerName, (int)inclusionDepth); + } + + virtual IncludeResult* includeSystem(const char* headerName, + const char* /*includerName*/, + size_t /*inclusionDepth*/) override + { + return readSystemPath(headerName); + } + + // Externally set directories. E.g., from a command-line -I. + // - Most-recently pushed are checked first. + // - All these are checked after the parse-time stack of local directories + // is checked. + // - This only applies to the "local" form of #include. + // - Makes its own copy of the path. + virtual void pushExternalLocalDirectory(const std::string& dir) + { + directoryStack.push_back(dir); + externalLocalDirectoryCount = (int)directoryStack.size(); + } + + virtual void releaseInclude(IncludeResult* result) override + { + if (result != nullptr) { + delete [] static_cast(result->userData); + delete result; + } + } + + virtual ~DirStackFileIncluder() override { } + +protected: + typedef char tUserDataElement; + std::vector directoryStack; + int externalLocalDirectoryCount; + + // Search for a valid "local" path based on combining the stack of include + // directories and the nominal name of the header. + virtual IncludeResult* readLocalPath(const char* headerName, const char* includerName, int depth) + { + // Discard popped include directories, and + // initialize when at parse-time first level. + directoryStack.resize(depth + externalLocalDirectoryCount); + if (depth == 1) + directoryStack.back() = getDirectory(includerName); + + // Find a directory that works, using a reverse search of the include stack. + for (auto it = directoryStack.rbegin(); it != directoryStack.rend(); ++it) { + std::string path = *it + '/' + headerName; + std::replace(path.begin(), path.end(), '\\', '/'); + std::ifstream file(path, std::ios_base::binary | std::ios_base::ate); + if (file) { + directoryStack.push_back(getDirectory(path)); + return newIncludeResult(path, file, (int)file.tellg()); + } + } + + return nullptr; + } + + // Search for a valid path. + // Not implemented yet; returning nullptr signals failure to find. + virtual IncludeResult* readSystemPath(const char* /*headerName*/) const + { + return nullptr; + } + + // Do actual reading of the file, filling in a new include result. + virtual IncludeResult* newIncludeResult(const std::string& path, std::ifstream& file, int length) const + { + char* content = new tUserDataElement [length]; + file.seekg(0, file.beg); + file.read(content, length); + return new IncludeResult(path, content, length, content); + } + + // If no path markers, return current working directory. + // Otherwise, strip file name and return path leading up to it. + virtual std::string getDirectory(const std::string path) const + { + size_t last = path.find_last_of("/\\"); + return last == std::string::npos ? "." : path.substr(0, last); + } +}; diff --git a/3rdparty/bgfx/3rdparty/glslang/StandAlone/StandAlone.cpp b/3rdparty/bgfx/3rdparty/glslang/StandAlone/StandAlone.cpp index 60dbc4d..69cea88 100644 --- a/3rdparty/bgfx/3rdparty/glslang/StandAlone/StandAlone.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/StandAlone/StandAlone.cpp @@ -35,10 +35,13 @@ // // this only applies to the standalone wrapper, not the front end in general +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #include "ResourceLimits.h" #include "Worklist.h" +#include "DirStackFileIncluder.h" #include "./../glslang/Include/ShHandle.h" #include "./../glslang/Include/revision.h" #include "./../glslang/Public/ShaderLang.h" @@ -46,11 +49,13 @@ #include "../SPIRV/GLSL.std.450.h" #include "../SPIRV/doc.h" #include "../SPIRV/disassemble.h" + #include #include #include #include #include +#include #include #include @@ -87,6 +92,13 @@ enum TOptions { EOptionNoStorageFormat = (1 << 21), EOptionKeepUncalled = (1 << 22), EOptionHlslOffsets = (1 << 23), + EOptionHlslIoMapping = (1 << 24), + EOptionAutoMapLocations = (1 << 25), + EOptionDebug = (1 << 26), + EOptionStdin = (1 << 27), + EOptionOptimizeDisable = (1 << 28), + EOptionOptimizeSize = (1 << 29), + EOptionInvertY = (1 << 30), }; // @@ -108,17 +120,16 @@ enum TFailCode { EShLanguage FindLanguage(const std::string& name, bool parseSuffix=true); void CompileFile(const char* fileName, ShHandle); void usage(); -void FreeFileData(char** data); -char** ReadFileData(const char* fileName); +char* ReadFileData(const char* fileName); +void FreeFileData(char* data); void InfoLogMsg(const char* msg, const char* name, const int num); // Globally track if any compile or link failure. bool CompileFailed = false; bool LinkFailed = false; -// Use to test breaking up a single shader file into multiple strings. -// Set in ReadFileData(). -int NumShaderStrings; +// array of unique places to leave the shader names and infologs for the asynchronous compiles +std::vector> WorkItems; TBuiltInResource Resources; std::string ConfigFile; @@ -128,29 +139,13 @@ std::string ConfigFile; // void ProcessConfigFile() { - char** configStrings = 0; - char* config = 0; - if (ConfigFile.size() > 0) { - configStrings = ReadFileData(ConfigFile.c_str()); - if (configStrings) - config = *configStrings; - else { - printf("Error opening configuration file; will instead use the default configuration\n"); - usage(); - } - } - - if (config == 0) { + if (ConfigFile.size() == 0) Resources = glslang::DefaultTBuiltInResource; - return; + else { + char* configString = ReadFileData(ConfigFile.c_str()); + glslang::DecodeResourceLimits(&Resources, configString); + FreeFileData(configString); } - - glslang::DecodeResourceLimits(&Resources, config); - - if (configStrings) - FreeFileData(configStrings); - else - delete[] config; } int Options = 0; @@ -160,12 +155,72 @@ const char* entryPointName = nullptr; const char* sourceEntryPointName = nullptr; const char* shaderStageName = nullptr; const char* variableName = nullptr; +std::vector IncludeDirectoryList; +int ClientInputSemanticsVersion = 100; // maps to, say, #define VULKAN 100 +int VulkanClientVersion = 100; // would map to, say, Vulkan 1.0 +int OpenGLClientVersion = 450; // doesn't influence anything yet, but maps to OpenGL 4.50 +unsigned int TargetVersion = 0x00010000; // maps to, say, SPIR-V 1.0 +std::vector Processes; // what should be recorded by OpModuleProcessed, or equivalent -std::array baseSamplerBinding; -std::array baseTextureBinding; -std::array baseImageBinding; -std::array baseUboBinding; -std::array baseSsboBinding; +// Per descriptor-set binding base data +typedef std::map TPerSetBaseBinding; + +std::array, glslang::EResCount> baseBinding; +std::array, glslang::EResCount> baseBindingForSet; +std::array, EShLangCount> baseResourceSetBinding; + +// Add things like "#define ..." to a preamble to use in the beginning of the shader. +class TPreamble { +public: + TPreamble() { } + + bool isSet() const { return text.size() > 0; } + const char* get() const { return text.c_str(); } + + // #define... + void addDef(std::string def) + { + text.append("#define "); + fixLine(def); + + Processes.push_back("D"); + Processes.back().append(def); + + // The first "=" needs to turn into a space + const size_t equal = def.find_first_of("="); + if (equal != def.npos) + def[equal] = ' '; + + text.append(def); + text.append("\n"); + } + + // #undef... + void addUndef(std::string undef) + { + text.append("#undef "); + fixLine(undef); + + Processes.push_back("U"); + Processes.back().append(undef); + + text.append(undef); + text.append("\n"); + } + +protected: + void fixLine(std::string& line) + { + // Can't go past a newline in the line + const size_t end = line.find_first_of("\n"); + if (end != line.npos) + line = line.substr(0, end); + } + + std::string text; // contents of preamble +}; + +TPreamble UserPreamble; // // Create the default name for saving a binary if -o is not provided. @@ -210,16 +265,63 @@ bool SetConfigFile(const std::string& name) // void Error(const char* message) { - printf("%s: Error %s (use -h for usage)\n", ExecutableName, message); + fprintf(stderr, "%s: Error %s (use -h for usage)\n", ExecutableName, message); exit(EFailUsage); } // -// Process an optional binding base of the form: -// --argname [stage] base +// Process an optional binding base of one the forms: +// --argname [stage] base // base for stage (if given) or all stages (if not) +// --argname [stage] [base set]... // set/base pairs: set the base for given binding set. + // Where stage is one of the forms accepted by FindLanguage, and base is an integer // -void ProcessBindingBase(int& argc, char**& argv, std::array& base) +void ProcessBindingBase(int& argc, char**& argv, glslang::TResourceType res) +{ + if (argc < 2) + usage(); + + EShLanguage lang = EShLangCount; + int singleBase = 0; + TPerSetBaseBinding perSetBase; + int arg = 1; + + // Parse stage, if given + if (!isdigit(argv[arg][0])) { + if (argc < 3) // this form needs one more argument + usage(); + + lang = FindLanguage(argv[arg++], false); + } + + if ((argc - arg) > 2 && isdigit(argv[arg+0][0]) && isdigit(argv[arg+1][0])) { + // Parse a per-set binding base + while ((argc - arg) > 2 && isdigit(argv[arg+0][0]) && isdigit(argv[arg+1][0])) { + const int baseNum = atoi(argv[arg++]); + const int setNum = atoi(argv[arg++]); + perSetBase[setNum] = baseNum; + } + } else { + // Parse single binding base + singleBase = atoi(argv[arg++]); + } + + argc -= (arg-1); + argv += (arg-1); + + // Set one or all languages + const int langMin = (lang < EShLangCount) ? lang+0 : 0; + const int langMax = (lang < EShLangCount) ? lang+1 : EShLangCount; + + for (int lang = langMin; lang < langMax; ++lang) { + if (!perSetBase.empty()) + baseBindingForSet[res][lang] = perSetBase; + else + baseBinding[res][lang] = singleBase; + } +} + +void ProcessResourceSetBindingBase(int& argc, char**& argv, std::array, EShLangCount>& base) { if (argc < 2) usage(); @@ -228,15 +330,28 @@ void ProcessBindingBase(int& argc, char**& argv, std::array 1 && argv[1] != nullptr && argv[1][0] != '-') { + base[lang].push_back(argv[1]); + + argc--; + argv++; + } + + // Must have one arg, or a multiple of three (for [regname set binding] triples) + if (base[lang].size() != 1 && (base[lang].size() % 3) != 0) + usage(); + } else { - // Parse form: --argname base + // Parse form: --argname set for (int lang=0; lang>& workItems, int argc, char* argv[]) { - baseSamplerBinding.fill(0); - baseTextureBinding.fill(0); - baseImageBinding.fill(0); - baseUboBinding.fill(0); - baseSsboBinding.fill(0); + for (int res = 0; res < glslang::EResCount; ++res) + baseBinding[res].fill(0); ExecutableName = argv[0]; workItems.reserve(argc); - argc--; - argv++; - for (; argc >= 1; argc--, argv++) { + const auto bumpArg = [&]() { + if (argc > 0) { + argc--; + argv++; + } + }; + + // read a string directly attached to a single-letter option + const auto getStringOperand = [&](const char* desc) { + if (argv[0][2] == 0) { + printf("%s must immediately follow option (no spaces)\n", desc); + exit(EFailUsage); + } + return argv[0] + 2; + }; + + // read a number attached to a single-letter option + const auto getAttachedNumber = [&](const char* desc) { + int num = atoi(argv[0] + 2); + if (num == 0) { + printf("%s: expected attached non-0 number\n", desc); + exit(EFailUsage); + } + return num; + }; + + // minimum needed (without overriding something else) to target Vulkan SPIR-V + const auto setVulkanSpv = []() { + Options |= EOptionSpv; + Options |= EOptionVulkanRules; + Options |= EOptionLinkProgram; + }; + + // minimum needed (without overriding something else) to target OpenGL SPIR-V + const auto setOpenGlSpv = []() { + Options |= EOptionSpv; + Options |= EOptionLinkProgram; + // undo a -H default to Vulkan + Options &= ~EOptionVulkanRules; + }; + + for (bumpArg(); argc >= 1; bumpArg()) { if (argv[0][0] == '-') { switch (argv[0][1]) { case '-': @@ -271,118 +422,182 @@ void ProcessArguments(std::vector>& workItem std::transform(lowerword.begin(), lowerword.end(), lowerword.begin(), ::tolower); // handle --word style options - if (lowerword == "shift-sampler-bindings" || // synonyms - lowerword == "shift-sampler-binding" || - lowerword == "ssb") { - ProcessBindingBase(argc, argv, baseSamplerBinding); - } else if (lowerword == "shift-texture-bindings" || // synonyms - lowerword == "shift-texture-binding" || - lowerword == "stb") { - ProcessBindingBase(argc, argv, baseTextureBinding); - } else if (lowerword == "shift-image-bindings" || // synonyms - lowerword == "shift-image-binding" || - lowerword == "sib") { - ProcessBindingBase(argc, argv, baseImageBinding); - } else if (lowerword == "shift-ubo-bindings" || // synonyms - lowerword == "shift-ubo-binding" || - lowerword == "sub") { - ProcessBindingBase(argc, argv, baseUboBinding); - } else if (lowerword == "shift-ssbo-bindings" || // synonyms - lowerword == "shift-ssbo-binding" || - lowerword == "sbb") { - ProcessBindingBase(argc, argv, baseSsboBinding); - } else if (lowerword == "auto-map-bindings" || // synonyms - lowerword == "auto-map-binding" || - lowerword == "amb") { + if (lowerword == "auto-map-bindings" || // synonyms + lowerword == "auto-map-binding" || + lowerword == "amb") { Options |= EOptionAutoMapBindings; + } else if (lowerword == "auto-map-locations" || // synonyms + lowerword == "aml") { + Options |= EOptionAutoMapLocations; + } else if (lowerword == "client") { + if (argc > 1) { + if (strcmp(argv[1], "vulkan100") == 0) + setVulkanSpv(); + else if (strcmp(argv[1], "opengl100") == 0) + setOpenGlSpv(); + else + Error("--client expects vulkan100 or opengl100"); + } + bumpArg(); } else if (lowerword == "flatten-uniform-arrays" || // synonyms lowerword == "flatten-uniform-array" || lowerword == "fua") { Options |= EOptionFlattenUniformArrays; - } else if (lowerword == "no-storage-format" || // synonyms - lowerword == "nsf") { - Options |= EOptionNoStorageFormat; - } else if (lowerword == "variable-name" || // synonyms - lowerword == "vn") { - Options |= EOptionOutputHexadecimal; - variableName = argv[1]; - if (argc > 0) { - argc--; - argv++; - } else - Error("no provided for --variable-name"); - break; - } else if (lowerword == "source-entrypoint" || // synonyms - lowerword == "sep") { - sourceEntryPointName = argv[1]; - if (argc > 0) { - argc--; - argv++; - } else - Error("no provided for --source-entrypoint"); - break; + } else if (lowerword == "hlsl-offsets") { + Options |= EOptionHlslOffsets; + } else if (lowerword == "hlsl-iomap" || + lowerword == "hlsl-iomapper" || + lowerword == "hlsl-iomapping") { + Options |= EOptionHlslIoMapping; } else if (lowerword == "keep-uncalled" || // synonyms lowerword == "ku") { Options |= EOptionKeepUncalled; - } else if (lowerword == "hlsl-offsets") { - Options |= EOptionHlslOffsets; + } else if (lowerword == "no-storage-format" || // synonyms + lowerword == "nsf") { + Options |= EOptionNoStorageFormat; + } else if (lowerword == "relaxed-errors") { + Options |= EOptionRelaxedErrors; + } else if (lowerword == "resource-set-bindings" || // synonyms + lowerword == "resource-set-binding" || + lowerword == "rsb") { + ProcessResourceSetBindingBase(argc, argv, baseResourceSetBinding); + } else if (lowerword == "shift-image-bindings" || // synonyms + lowerword == "shift-image-binding" || + lowerword == "sib") { + ProcessBindingBase(argc, argv, glslang::EResImage); + } else if (lowerword == "shift-sampler-bindings" || // synonyms + lowerword == "shift-sampler-binding" || + lowerword == "ssb") { + ProcessBindingBase(argc, argv, glslang::EResSampler); + } else if (lowerword == "shift-uav-bindings" || // synonyms + lowerword == "shift-uav-binding" || + lowerword == "suavb") { + ProcessBindingBase(argc, argv, glslang::EResUav); + } else if (lowerword == "shift-texture-bindings" || // synonyms + lowerword == "shift-texture-binding" || + lowerword == "stb") { + ProcessBindingBase(argc, argv, glslang::EResTexture); + } else if (lowerword == "shift-ubo-bindings" || // synonyms + lowerword == "shift-ubo-binding" || + lowerword == "shift-cbuffer-bindings" || + lowerword == "shift-cbuffer-binding" || + lowerword == "sub" || + lowerword == "scb") { + ProcessBindingBase(argc, argv, glslang::EResUbo); + } else if (lowerword == "shift-ssbo-bindings" || // synonyms + lowerword == "shift-ssbo-binding" || + lowerword == "sbb") { + ProcessBindingBase(argc, argv, glslang::EResSsbo); + } else if (lowerword == "source-entrypoint" || // synonyms + lowerword == "sep") { + if (argc <= 1) + Error("no provided for --source-entrypoint"); + sourceEntryPointName = argv[1]; + bumpArg(); + break; + } else if (lowerword == "stdin") { + Options |= EOptionStdin; + shaderStageName = argv[1]; + } else if (lowerword == "suppress-warnings") { + Options |= EOptionSuppressWarnings; + } else if (lowerword == "target-env") { + if (argc > 1) { + if (strcmp(argv[1], "vulkan1.0") == 0) { + setVulkanSpv(); + VulkanClientVersion = 100; + } else if (strcmp(argv[1], "opengl") == 0) { + setOpenGlSpv(); + OpenGLClientVersion = 450; + } else + Error("--target-env expected vulkan1.0 or opengl"); + } + bumpArg(); + } else if (lowerword == "variable-name" || // synonyms + lowerword == "vn") { + Options |= EOptionOutputHexadecimal; + if (argc <= 1) + Error("no provided for --variable-name"); + variableName = argv[1]; + bumpArg(); + break; + } else if (lowerword == "invert-y" || // synonyms + lowerword == "iy") { + Options |= EOptionInvertY; } else { usage(); } } break; - case 'H': - Options |= EOptionHumanReadableSpv; - if ((Options & EOptionSpv) == 0) { - // default to Vulkan - Options |= EOptionSpv; - Options |= EOptionVulkanRules; - Options |= EOptionLinkProgram; - } + case 'C': + Options |= EOptionCascadingErrors; break; - case 'V': - Options |= EOptionSpv; - Options |= EOptionVulkanRules; - Options |= EOptionLinkProgram; - break; - case 'S': - shaderStageName = argv[1]; - if (argc > 0) { - argc--; - argv++; - } else - Error("no specified for -S"); - break; - case 'G': - Options |= EOptionSpv; - Options |= EOptionLinkProgram; - // undo a -H default to Vulkan - Options &= ~EOptionVulkanRules; + case 'D': + if (argv[0][2] == 0) + Options |= EOptionReadHlsl; + else + UserPreamble.addDef(getStringOperand("-D macro name")); break; case 'E': Options |= EOptionOutputPreprocessed; break; + case 'G': + // OpenGL Client + setOpenGlSpv(); + if (argv[0][2] != 0) + ClientInputSemanticsVersion = getAttachedNumber("-G client input semantics"); + break; + case 'H': + Options |= EOptionHumanReadableSpv; + if ((Options & EOptionSpv) == 0) { + // default to Vulkan + setVulkanSpv(); + } + break; + case 'I': + IncludeDirectoryList.push_back(getStringOperand("-I include path")); + break; + case 'O': + if (argv[0][2] == 'd') + Options |= EOptionOptimizeDisable; + else if (argv[0][2] == 's') +#ifdef ENABLE_OPT + Options |= EOptionOptimizeSize; +#else + Error("-Os not available; optimizer not linked"); +#endif + else + Error("unknown -O option"); + break; + case 'S': + if (argc <= 1) + Error("no specified for -S"); + shaderStageName = argv[1]; + bumpArg(); + break; + case 'U': + UserPreamble.addUndef(getStringOperand("-U: macro name")); + break; + case 'V': + setVulkanSpv(); + if (argv[0][2] != 0) + ClientInputSemanticsVersion = getAttachedNumber("-G client input semantics"); + break; case 'c': Options |= EOptionDumpConfig; break; - case 'C': - Options |= EOptionCascadingErrors; - break; case 'd': Options |= EOptionDefaultDesktop; break; - case 'D': - Options |= EOptionReadHlsl; - break; case 'e': // HLSL todo: entry point handle needs much more sophistication. // This is okay for one compilation unit with one entry point. entryPointName = argv[1]; - if (argc > 0) { - argc--; - argv++; - } else - Error("no provided for -e"); + if (argc <= 1) + Error("no provided for -e"); + bumpArg(); + break; + case 'g': + Options |= EOptionDebug; break; case 'h': usage(); @@ -397,12 +612,10 @@ void ProcessArguments(std::vector>& workItem Options |= EOptionMemoryLeakMode; break; case 'o': - binaryFileName = argv[1]; - if (argc > 0) { - argc--; - argv++; - } else + if (argc <= 1) Error("no provided for -o"); + binaryFileName = argv[1]; + bumpArg(); break; case 'q': Options |= EOptionDumpReflection; @@ -437,6 +650,10 @@ void ProcessArguments(std::vector>& workItem } } + // Make sure that -S is always specified if --stdin is specified + if ((Options & EOptionStdin) && shaderStageName == nullptr) + Error("must provide -S when --stdin is given"); + // Make sure that -E is not specified alongside linking (which includes SPV generation) if ((Options & EOptionOutputPreprocessed) && (Options & EOptionLinkProgram)) Error("can't use -E when linking is selected"); @@ -475,6 +692,8 @@ void SetMessageOptions(EShMessages& messages) messages = (EShMessages)(messages | EShMsgKeepUncalled); if (Options & EOptionHlslOffsets) messages = (EShMessages)(messages | EShMsgHlslOffsets); + if (Options & EOptionDebug) + messages = (EShMessages)(messages | EShMsgDebugInfo); } // @@ -483,17 +702,31 @@ void SetMessageOptions(EShMessages& messages) void CompileShaders(glslang::TWorklist& worklist) { glslang::TWorkItem* workItem; - while (worklist.remove(workItem)) { - ShHandle compiler = ShConstructCompiler(FindLanguage(workItem->name), Options); + if (Options & EOptionStdin) { + worklist.remove(workItem); + ShHandle compiler = ShConstructCompiler(FindLanguage("stdin"), Options); if (compiler == 0) return; - CompileFile(workItem->name.c_str(), compiler); + CompileFile("stdin", compiler); - if (! (Options & EOptionSuppressInfolog)) - workItem->results = ShGetInfoLog(compiler); + if (! (Options & EOptionSuppressInfolog)) + workItem->results = ShGetInfoLog(compiler); ShDestruct(compiler); + } else { + while (worklist.remove(workItem)) { + ShHandle compiler = ShConstructCompiler(FindLanguage(workItem->name), Options); + if (compiler == 0) + return; + + CompileFile(workItem->name.c_str(), compiler); + + if (! (Options & EOptionSuppressInfolog)) + workItem->results = ShGetInfoLog(compiler); + + ShDestruct(compiler); + } } } @@ -510,36 +743,41 @@ void PutsIfNonEmpty(const char* str) // This prevents erroneous newlines from appearing. void StderrIfNonEmpty(const char* str) { - if (str && str[0]) { - fprintf(stderr, "%s\n", str); - } + if (str && str[0]) + fprintf(stderr, "%s\n", str); } // Simple bundling of what makes a compilation unit for ease in passing around, // and separation of handling file IO versus API (programmatic) compilation. struct ShaderCompUnit { EShLanguage stage; - std::string fileName; - char** text; // memory owned/managed externally - const char* fileNameList[1]; + static const int maxCount = 1; + int count; // live number of strings/names + const char* text[maxCount]; // memory owned/managed externally + std::string fileName[maxCount]; // hold's the memory, but... + const char* fileNameList[maxCount]; // downstream interface wants pointers - // Need to have a special constructors to adjust the fileNameList, since back end needs a list of ptrs - ShaderCompUnit(EShLanguage istage, std::string &ifileName, char** itext) - { - stage = istage; - fileName = ifileName; - text = itext; - fileNameList[0] = fileName.c_str(); - } + ShaderCompUnit(EShLanguage stage) : stage(stage), count(0) { } - ShaderCompUnit(const ShaderCompUnit &rhs) + ShaderCompUnit(const ShaderCompUnit& rhs) { stage = rhs.stage; - fileName = rhs.fileName; - text = rhs.text; - fileNameList[0] = fileName.c_str(); + count = rhs.count; + for (int i = 0; i < count; ++i) { + fileName[i] = rhs.fileName[i]; + text[i] = rhs.text[i]; + fileNameList[i] = rhs.fileName[i].c_str(); + } } + void addString(std::string& ifileName, const char* itext) + { + assert(count < maxCount); + fileName[count] = ifileName; + text[count] = itext; + fileNameList[count] = fileName[count].c_str(); + ++count; + } }; // @@ -566,30 +804,76 @@ void CompileAndLinkShaderUnits(std::vector compUnits) for (auto it = compUnits.cbegin(); it != compUnits.cend(); ++it) { const auto &compUnit = *it; glslang::TShader* shader = new glslang::TShader(compUnit.stage); - shader->setStringsWithLengthsAndNames(compUnit.text, NULL, compUnit.fileNameList, 1); + shader->setStringsWithLengthsAndNames(compUnit.text, NULL, compUnit.fileNameList, compUnit.count); if (entryPointName) // HLSL todo: this needs to be tracked per compUnits shader->setEntryPoint(entryPointName); - if (sourceEntryPointName) + if (sourceEntryPointName) { + if (entryPointName == nullptr) + printf("Warning: Changing source entry point name without setting an entry-point name.\n" + "Use '-e '.\n"); shader->setSourceEntryPoint(sourceEntryPointName); + } + if (UserPreamble.isSet()) + shader->setPreamble(UserPreamble.get()); + shader->addProcesses(Processes); + + // Set IO mapper binding shift values + for (int r = 0; r < glslang::EResCount; ++r) { + const glslang::TResourceType res = glslang::TResourceType(r); + + // Set base bindings + shader->setShiftBinding(res, baseBinding[res][compUnit.stage]); + + // Set bindings for particular resource sets + // TODO: use a range based for loop here, when available in all environments. + for (auto i = baseBindingForSet[res][compUnit.stage].begin(); + i != baseBindingForSet[res][compUnit.stage].end(); ++i) + shader->setShiftBindingForSet(res, i->second, i->first); + } - shader->setShiftSamplerBinding(baseSamplerBinding[compUnit.stage]); - shader->setShiftTextureBinding(baseTextureBinding[compUnit.stage]); - shader->setShiftImageBinding(baseImageBinding[compUnit.stage]); - shader->setShiftUboBinding(baseUboBinding[compUnit.stage]); - shader->setShiftSsboBinding(baseSsboBinding[compUnit.stage]); shader->setFlattenUniformArrays((Options & EOptionFlattenUniformArrays) != 0); shader->setNoStorageFormat((Options & EOptionNoStorageFormat) != 0); + shader->setResourceSetBinding(baseResourceSetBinding[compUnit.stage]); + + if (Options & EOptionHlslIoMapping) + shader->setHlslIoMapping(true); if (Options & EOptionAutoMapBindings) shader->setAutoMapBindings(true); + if (Options & EOptionAutoMapLocations) + shader->setAutoMapLocations(true); + + if (Options & EOptionInvertY) + shader->setInvertY(true); + + // Set up the environment, some subsettings take precedence over earlier + // ways of setting things. + if (Options & EOptionSpv) { + if (Options & EOptionVulkanRules) { + shader->setEnvInput((Options & EOptionReadHlsl) ? glslang::EShSourceHlsl + : glslang::EShSourceGlsl, + compUnit.stage, glslang::EShClientVulkan, ClientInputSemanticsVersion); + shader->setEnvClient(glslang::EShClientVulkan, VulkanClientVersion); + shader->setEnvTarget(glslang::EShTargetSpv, TargetVersion); + } else { + shader->setEnvInput((Options & EOptionReadHlsl) ? glslang::EShSourceHlsl + : glslang::EShSourceGlsl, + compUnit.stage, glslang::EShClientOpenGL, ClientInputSemanticsVersion); + shader->setEnvClient(glslang::EShClientOpenGL, OpenGLClientVersion); + shader->setEnvTarget(glslang::EshTargetSpv, TargetVersion); + } + } + shaders.push_back(shader); - const int defaultVersion = Options & EOptionDefaultDesktop? 110: 100; + const int defaultVersion = Options & EOptionDefaultDesktop ? 110 : 100; + DirStackFileIncluder includer; + std::for_each(IncludeDirectoryList.rbegin(), IncludeDirectoryList.rend(), [&includer](const std::string& dir) { + includer.pushExternalLocalDirectory(dir); }); if (Options & EOptionOutputPreprocessed) { std::string str; - glslang::TShader::ForbidIncluder includer; if (shader->preprocess(&Resources, defaultVersion, ENoProfile, false, false, messages, &str, includer)) { PutsIfNonEmpty(str.c_str()); @@ -600,14 +884,14 @@ void CompileAndLinkShaderUnits(std::vector compUnits) StderrIfNonEmpty(shader->getInfoDebugLog()); continue; } - if (! shader->parse(&Resources, defaultVersion, false, messages)) + if (! shader->parse(&Resources, defaultVersion, false, messages, includer)) CompileFailed = true; program.addShader(shader); if (! (Options & EOptionSuppressInfolog) && ! (Options & EOptionMemoryLeakMode)) { - PutsIfNonEmpty(compUnit.fileName.c_str()); + PutsIfNonEmpty(compUnit.fileName[0].c_str()); PutsIfNonEmpty(shader->getInfoLog()); PutsIfNonEmpty(shader->getInfoDebugLog()); } @@ -650,7 +934,12 @@ void CompileAndLinkShaderUnits(std::vector compUnits) std::vector spirv; std::string warningsErrors; spv::SpvBuildLogger logger; - glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage), spirv, &logger); + glslang::SpvOptions spvOptions; + if (Options & EOptionDebug) + spvOptions.generateDebugInfo = true; + spvOptions.disableOptimizer = (Options & EOptionOptimizeDisable) != 0; + spvOptions.optimizeSize = (Options & EOptionOptimizeSize) != 0; + glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage), spirv, &logger, &spvOptions); // Dump the spv to a file or stdout, etc., but only if not doing // memory/perf testing, as it's not internal to programmatic use. @@ -698,25 +987,32 @@ void CompileAndLinkShaderFiles(glslang::TWorklist& Worklist) { std::vector compUnits; - // Transfer all the work items from to a simple list of - // of compilation units. (We don't care about the thread - // work-item distribution properties in this path, which - // is okay due to the limited number of shaders, know since - // they are all getting linked together.) - glslang::TWorkItem* workItem; - while (Worklist.remove(workItem)) { - ShaderCompUnit compUnit( - FindLanguage(workItem->name), - workItem->name, - ReadFileData(workItem->name.c_str()) - ); - - if (! compUnit.text) { - usage(); - return; - } - + // If this is using stdin, we can't really detect multiple different file + // units by input type. We need to assume that we're just being given one + // file of a certain type. + if ((Options & EOptionStdin) != 0) { + ShaderCompUnit compUnit(FindLanguage("stdin")); + std::istreambuf_iterator begin(std::cin), end; + std::string tempString(begin, end); + char* fileText = strdup(tempString.c_str()); + std::string fileName = "stdin"; + compUnit.addString(fileName, fileText); compUnits.push_back(compUnit); + } else { + // Transfer all the work items from to a simple list of + // of compilation units. (We don't care about the thread + // work-item distribution properties in this path, which + // is okay due to the limited number of shaders, know since + // they are all getting linked together.) + glslang::TWorkItem* workItem; + while (Worklist.remove(workItem)) { + ShaderCompUnit compUnit(FindLanguage(workItem->name)); + char* fileText = ReadFileData(workItem->name.c_str()); + if (fileText == nullptr) + usage(); + compUnit.addString(workItem->name, fileText); + compUnits.push_back(compUnit); + } } // Actual call to programmatic processing of compile and link, @@ -730,18 +1026,16 @@ void CompileAndLinkShaderFiles(glslang::TWorklist& Worklist) glslang::OS_DumpMemoryCounters(); } + // free memory from ReadFileData, which got stored in a const char* + // as the first string above for (auto it = compUnits.begin(); it != compUnits.end(); ++it) - FreeFileData(it->text); + FreeFileData(const_cast(it->text[0])); } -int C_DECL main(int argc, char* argv[]) +int singleMain() { - // array of unique places to leave the shader names and infologs for the asynchronous compiles - std::vector> workItems; - ProcessArguments(workItems, argc, argv); - glslang::TWorklist workList; - std::for_each(workItems.begin(), workItems.end(), [&workList](std::unique_ptr& item) { + std::for_each(WorkItems.begin(), WorkItems.end(), [&workList](std::unique_ptr& item) { assert(item); workList.add(item.get()); }); @@ -761,16 +1055,22 @@ int C_DECL main(int argc, char* argv[]) printf("SPIR-V Version %s\n", spirvVersion.c_str()); printf("GLSL.std.450 Version %d, Revision %d\n", GLSLstd450Version, GLSLstd450Revision); printf("Khronos Tool ID %d\n", glslang::GetKhronosToolId()); + printf("SPIR-V Generator Version %d\n", glslang::GetSpirvGeneratorVersion()); printf("GL_KHR_vulkan_glsl version %d\n", 100); printf("ARB_GL_gl_spirv version %d\n", 100); if (workList.empty()) return ESuccess; } - if (workList.empty()) { + if (workList.empty() && ((Options & EOptionStdin) == 0)) { usage(); } + if (Options & EOptionStdin) { + WorkItems.push_back(std::unique_ptr{new glslang::TWorkItem("stdin")}); + workList.add(WorkItems.back().get()); + } + ProcessConfigFile(); // @@ -781,22 +1081,25 @@ int C_DECL main(int argc, char* argv[]) if (Options & EOptionLinkProgram || Options & EOptionOutputPreprocessed) { glslang::InitializeProcess(); + glslang::InitializeProcess(); // also test reference counting of users + glslang::InitializeProcess(); // also test reference counting of users + glslang::FinalizeProcess(); // also test reference counting of users + glslang::FinalizeProcess(); // also test reference counting of users CompileAndLinkShaderFiles(workList); glslang::FinalizeProcess(); } else { ShInitialize(); + ShInitialize(); // also test reference counting of users + ShFinalize(); // also test reference counting of users bool printShaderNames = workList.size() > 1; - if (Options & EOptionMultiThreaded) - { + if (Options & EOptionMultiThreaded) { std::array threads; - for (unsigned int t = 0; t < threads.size(); ++t) - { + for (unsigned int t = 0; t < threads.size(); ++t) { threads[t] = std::thread(CompileShaders, std::ref(workList)); - if (threads[t].get_id() == std::thread::id()) - { - printf("Failed to create thread\n"); + if (threads[t].get_id() == std::thread::id()) { + fprintf(stderr, "Failed to create thread\n"); return EFailThreadCreate; } } @@ -806,11 +1109,11 @@ int C_DECL main(int argc, char* argv[]) CompileShaders(workList); // Print out all the resulting infologs - for (size_t w = 0; w < workItems.size(); ++w) { - if (workItems[w]) { - if (printShaderNames || workItems[w]->results.size() > 0) - PutsIfNonEmpty(workItems[w]->name.c_str()); - PutsIfNonEmpty(workItems[w]->results.c_str()); + for (size_t w = 0; w < WorkItems.size(); ++w) { + if (WorkItems[w]) { + if (printShaderNames || WorkItems[w]->results.size() > 0) + PutsIfNonEmpty(WorkItems[w]->name.c_str()); + PutsIfNonEmpty(WorkItems[w]->results.c_str()); } } @@ -825,6 +1128,25 @@ int C_DECL main(int argc, char* argv[]) return 0; } +int C_DECL main(int argc, char* argv[]) +{ + ProcessArguments(WorkItems, argc, argv); + + int ret = 0; + + // Loop over the entire init/finalize cycle to watch memory changes + const int iterations = 1; + if (iterations > 1) + glslang::OS_DumpMemoryCounters(); + for (int i = 0; i < iterations; ++i) { + ret = singleMain(); + if (iterations > 1) + glslang::OS_DumpMemoryCounters(); + } + + return ret; +} + // // Deduce the language from the filename. Files must end in one of the // following extensions: @@ -881,29 +1203,29 @@ EShLanguage FindLanguage(const std::string& name, bool parseSuffix) void CompileFile(const char* fileName, ShHandle compiler) { int ret = 0; - char** shaderStrings = ReadFileData(fileName); - if (! shaderStrings) { - usage(); + char* shaderString; + if ((Options & EOptionStdin) != 0) { + std::istreambuf_iterator begin(std::cin), end; + std::string tempString(begin, end); + shaderString = strdup(tempString.c_str()); + } else { + shaderString = ReadFileData(fileName); } - int* lengths = new int[NumShaderStrings]; - // move to length-based strings, rather than null-terminated strings - for (int s = 0; s < NumShaderStrings; ++s) - lengths[s] = (int)strlen(shaderStrings[s]); - - if (! shaderStrings) { - CompileFailed = true; - return; - } + int* lengths = new int[1]; + lengths[0] = (int)strlen(shaderString); EShMessages messages = EShMsgDefault; SetMessageOptions(messages); + if (UserPreamble.isSet()) + Error("-D and -U options require -l (linking)\n"); + for (int i = 0; i < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++i) { for (int j = 0; j < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++j) { // ret = ShCompile(compiler, shaderStrings, NumShaderStrings, lengths, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages); - ret = ShCompile(compiler, shaderStrings, NumShaderStrings, nullptr, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages); + ret = ShCompile(compiler, &shaderString, 1, nullptr, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages); // const char* multi[12] = { "# ve", "rsion", " 300 e", "s", "\n#err", // "or should be l", "ine 1", "string 5\n", "float glo", "bal", // ";\n#error should be line 2\n void main() {", "global = 2.3;}" }; @@ -916,7 +1238,7 @@ void CompileFile(const char* fileName, ShHandle compiler) } delete [] lengths; - FreeFileData(shaderStrings); + FreeFileData(shaderString); if (ret == 0) CompileFailed = true; @@ -929,8 +1251,8 @@ void usage() { printf("Usage: glslangValidator [option]... [file]...\n" "\n" - "Where: each 'file' ends in ., where is one of\n" - " .conf to provide an optional config file that replaces the default configuration\n" + "'file' can end in . for auto-stage classification, where is:\n" + " .conf to provide a config file that replaces the default configuration\n" " (see -c option below for generating a template)\n" " .vert for a vertex shader\n" " .tesc for a tessellation control shader\n" @@ -939,76 +1261,112 @@ void usage() " .frag for a fragment shader\n" " .comp for a compute shader\n" "\n" - "Compilation warnings and errors will be printed to stdout.\n" - "\n" - "To get other information, use one of the following options:\n" - "Each option must be specified separately.\n" - " -V create SPIR-V binary, under Vulkan semantics; turns on -l;\n" - " default file name is .spv (-o overrides this)\n" - " -G create SPIR-V binary, under OpenGL semantics; turns on -l;\n" - " default file name is .spv (-o overrides this)\n" - " -H print human readable form of SPIR-V; turns on -V\n" + "Options:\n" + " -C cascading errors; risk crash from accumulation of error recoveries\n" + " -D input is HLSL\n" + " -D\n" + " -D define a pre-processor macro\n" " -E print pre-processed GLSL; cannot be used with -l;\n" " errors will appear on stderr.\n" + " -G[ver] create SPIR-V binary, under OpenGL semantics; turns on -l;\n" + " default file name is .spv (-o overrides this)\n" + " 'ver', when present, is the version of the input semantics,\n" + " which will appear in #define GL_SPIRV ver\n" + " '--client opengl100' is the same as -G100\n" + " a '--target-env' for OpenGL will also imply '-G'\n" + " -H print human readable form of SPIR-V; turns on -V\n" + " -I add dir to the include search path; includer's directory\n" + " is searched first, followed by left-to-right order of -I\n" + " -Od disables optimization. May cause illegal SPIR-V for HLSL.\n" + " -Os optimizes SPIR-V to minimize size.\n" " -S uses specified stage rather than parsing the file extension\n" - " valid choices for are vert, tesc, tese, geom, frag, or comp\n" + " choices for are vert, tesc, tese, geom, frag, or comp\n" + " -U undefine a pre-processor macro\n" + " -V[ver] create SPIR-V binary, under Vulkan semantics; turns on -l;\n" + " default file name is .spv (-o overrides this)\n" + " 'ver', when present, is the version of the input semantics,\n" + " which will appear in #define VULKAN ver\n" + " '--client vulkan100' is the same as -V100\n" + " a '--target-env' for Vulkan will also imply '-V'\n" " -c configuration dump;\n" " creates the default configuration file (redirect to a .conf file)\n" - " -C cascading errors; risks crashes from accumulation of error recoveries\n" " -d default to desktop (#version 110) when there is no shader #version\n" " (default is ES version 100)\n" - " -D input is HLSL\n" - " -e specify entry-point name\n" + " -e specify as the entry-point name\n" + " -g generate debug information\n" " -h print this usage message\n" " -i intermediate tree (glslang AST) is printed out\n" " -l link all input files together to form a single module\n" " -m memory leak mode\n" - " -o save binary to , requires a binary option (e.g., -V)\n" + " -o save binary to , requires a binary option (e.g., -V)\n" " -q dump reflection query database\n" - " -r relaxed semantic error-checking mode\n" - " -s silent mode\n" + " -r synonym for --relaxed-errors\n" + " -s silence syntax and semantic error reporting\n" " -t multi-threaded mode\n" " -v print version strings\n" - " -w suppress warnings (except as required by #extension : warn)\n" - " -x save 32-bit hexadecimal numbers as text, requires a binary option (e.g., -V)\n" - "\n" - " --shift-sampler-binding [stage] num set base binding number for samplers\n" - " --ssb [stage] num synonym for --shift-sampler-binding\n" - "\n" - " --shift-texture-binding [stage] num set base binding number for textures\n" - " --stb [stage] num synonym for --shift-texture-binding\n" - "\n" - " --shift-image-binding [stage] num set base binding number for images (uav)\n" - " --sib [stage] num synonym for --shift-image-binding\n" - "\n" - " --shift-UBO-binding [stage] num set base binding number for UBOs\n" - " --sub [stage] num synonym for --shift-UBO-binding\n" - "\n" - " --shift-ssbo-binding [stage] num set base binding number for SSBOs\n" - " --sbb [stage] num synonym for --shift-ssbo-binding\n" - "\n" - " --auto-map-bindings automatically bind uniform variables without\n" - " explicit bindings.\n" - " --amb synonym for --auto-map-bindings\n" - "\n" - " --flatten-uniform-arrays flatten uniform texture & sampler arrays to scalars\n" - " --fua synonym for --flatten-uniform-arrays\n" - "\n" - " --no-storage-format use Unknown image format\n" - " --nsf synonym for --no-storage-format\n" - "\n" - " --source-entrypoint name the given shader source function is renamed to be the entry point given in -e\n" - " --sep synonym for --source-entrypoint\n" - "\n" - " --keep-uncalled don't eliminate uncalled functions when linking\n" - " --ku synonym for --keep-uncalled\n" - "\n" - " --variable-name Creates a C header file that contains a uint32_t array named \n" - " initialized with the shader binary code.\n" - " --vn synonym for --variable-name \n" - "\n" - " --hlsl-offsets Allow block offsets to follow HLSL rules instead of GLSL rules.\n" - " Works independently of source language.\n" + " -w synonym for --suppress-warnings\n" + " -x save binary output as text-based 32-bit hexadecimal numbers\n" + " --auto-map-bindings automatically bind uniform variables\n" + " without explicit bindings.\n" + " --amb synonym for --auto-map-bindings\n" + " --auto-map-locations automatically locate input/output lacking\n" + " 'location' (fragile, not cross stage)\n" + " --aml synonym for --auto-map-locations\n" + " --client {vulkan|opengl} see -V and -G\n" + " --flatten-uniform-arrays flatten uniform texture/sampler arrays to\n" + " scalars\n" + " --fua synonym for --flatten-uniform-arrays\n" + " --hlsl-offsets Allow block offsets to follow HLSL rules\n" + " Works independently of source language\n" + " --hlsl-iomap Perform IO mapping in HLSL register space\n" + " --keep-uncalled don't eliminate uncalled functions\n" + " --ku synonym for --keep-uncalled\n" + " --no-storage-format use Unknown image format\n" + " --nsf synonym for --no-storage-format\n" + " --relaxed-errors relaxed GLSL semantic error-checking mode\n" + " --resource-set-binding [stage] name set binding\n" + " Set descriptor set and binding for individual resources\n" + " --resource-set-binding [stage] set\n" + " Set descriptor set for all resources\n" + " --rsb [stage] type set binding synonym for --resource-set-binding\n" + " --shift-image-binding [stage] num base binding number for images (uav)\n" + " --shift-image-binding [stage] [num set]... per-descriptor-set shift values\n" + " --sib [stage] num synonym for --shift-image-binding\n" + " --shift-sampler-binding [stage] num base binding number for samplers\n" + " --shift-sampler-binding [stage] [num set]... per-descriptor-set shift values\n" + " --ssb [stage] num synonym for --shift-sampler-binding\n" + " --shift-ssbo-binding [stage] num base binding number for SSBOs\n" + " --shift-ssbo-binding [stage] [num set]... per-descriptor-set shift values\n" + " --sbb [stage] num synonym for --shift-ssbo-binding\n" + " --shift-texture-binding [stage] num base binding number for textures\n" + " --shift-texture-binding [stage] [num set]... per-descriptor-set shift values\n" + " --stb [stage] num synonym for --shift-texture-binding\n" + " --shift-uav-binding [stage] num base binding number for UAVs\n" + " --shift-uav-binding [stage] [num set]... per-descriptor-set shift values\n" + " --suavb [stage] num synonym for --shift-uav-binding\n" + " --shift-UBO-binding [stage] num base binding number for UBOs\n" + " --shift-UBO-binding [stage] [num set]... per-descriptor-set shift values\n" + " --shift-cbuffer-binding [stage] num synonym for --shift-UBO-binding\n" + " --shift-cbuffer-binding [stage] [num set]... per-descriptor-set shift values\n" + " --sub [stage] num synonym for --shift-UBO-binding\n" + " --source-entrypoint the given shader source function is\n" + " renamed to be the given in -e\n" + " --sep synonym for --source-entrypoint\n" + " --stdin Read from stdin instead of from a file.\n" + " You'll have to provide the shader stage\n" + " using -S.\n" + " --suppress-warnings suppress GLSL warnings\n" + " (except as required by #extension : warn)\n" + " --target-env {vulkan1.0|opengl} set the execution environment code will\n" + " execute in (as opposed to language\n" + " semantics selected by --client) defaults:\n" + " 'vulkan1.0' under '--client vulkan'\n" + " 'opengl' under '--client opengl'\n" + " --variable-name Creates a C header file that contains a\n" + " uint32_t array named \n" + " initialized with the shader binary code.\n" + " --vn synonym for --variable-name \n" + " --invert-y | --iy invert position.Y output in vertex shader\n" ); exit(EFailUsage); @@ -1046,76 +1404,33 @@ int fopen_s( // // Malloc a string of sufficient size and read a string into it. // -char** ReadFileData(const char* fileName) +char* ReadFileData(const char* fileName) { FILE *in = nullptr; int errorCode = fopen_s(&in, fileName, "r"); - - int count = 0; - const int maxSourceStrings = 5; // for testing splitting shader/tokens across multiple strings - char** return_data = (char**)malloc(sizeof(char *) * (maxSourceStrings+1)); // freed in FreeFileData() - if (errorCode || in == nullptr) Error("unable to open input file"); + int count = 0; while (fgetc(in) != EOF) count++; fseek(in, 0, SEEK_SET); - char *fdata = (char*)malloc(count+2); // freed before return of this function - if (! fdata) - Error("can't allocate memory"); - - if ((int)fread(fdata, 1, count, in) != count) { - free(fdata); + char* return_data = (char*)malloc(count + 1); // freed in FreeFileData() + if ((int)fread(return_data, 1, count, in) != count) { + free(return_data); Error("can't read input file"); } - fdata[count] = '\0'; + return_data[count] = '\0'; fclose(in); - if (count == 0) { - // recover from empty file - return_data[0] = (char*)malloc(count+2); // freed in FreeFileData() - return_data[0][0]='\0'; - NumShaderStrings = 0; - free(fdata); - - return return_data; - } else - NumShaderStrings = 1; // Set to larger than 1 for testing multiple strings - - // compute how to split up the file into multiple strings, for testing multiple strings - int len = (int)(ceil)((float)count/(float)NumShaderStrings); - int ptr_len = 0; - int i = 0; - while (count > 0) { - return_data[i] = (char*)malloc(len + 2); // freed in FreeFileData() - memcpy(return_data[i], fdata + ptr_len, len); - return_data[i][len] = '\0'; - count -= len; - ptr_len += len; - if (count < len) { - if (count == 0) { - NumShaderStrings = i + 1; - break; - } - len = count; - } - ++i; - } - - free(fdata); - return return_data; } -void FreeFileData(char** data) +void FreeFileData(char* data) { - for(int i = 0; i < NumShaderStrings; i++) - free(data[i]); - free(data); } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/300.vert b/3rdparty/bgfx/3rdparty/glslang/Test/300.vert index 83b9bb1..daf98b8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/300.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/300.vert @@ -184,4 +184,21 @@ void fooDeeparray() yp = y; xp = y; // ERROR, wrong size yp = x; // ERROR, wrong size +} + +layout(num_views = 2) in; // ERROR, no extension + +void mwErr() +{ + gl_ViewID_OVR; // ERROR, no extension +} + +#extension GL_OVR_multiview : enable + +layout(num_views = 2) uniform float mwUniform; // ERROR, must be global +layout(num_views = 2) in; // OK + +void mwOk() +{ + gl_ViewID_OVR; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/310.comp b/3rdparty/bgfx/3rdparty/glslang/Test/310.comp index 9575b6f..9ca8eaa 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/310.comp +++ b/3rdparty/bgfx/3rdparty/glslang/Test/310.comp @@ -4,7 +4,7 @@ layout(local_size_x = 2) in; layout(local_size_x = 16) in; // ERROR, changing layout(local_size_z = 4096) in; // ERROR, too large layout(local_size_x = 2) in; - +layout(local_size_y = 0) in; // ERROR, 0 not allowed const int total = gl_MaxComputeWorkGroupCount.y + gl_MaxComputeUniformComponents + gl_MaxComputeTextureImageUnits diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/310AofA.vert b/3rdparty/bgfx/3rdparty/glslang/Test/310AofA.vert index a196388..fba2977 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/310AofA.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/310AofA.vert @@ -113,3 +113,9 @@ out float outArray[2][3]; // ERROR uniform ubaa { int a; } ubaaname[2][3]; // ERROR + +vec3 func(in mat3[2] x[3]) +{ + mat3 a0 = x[2][1]; + return a0[2]; +} diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/310implicitSizeArrayError.vert b/3rdparty/bgfx/3rdparty/glslang/Test/310implicitSizeArrayError.vert index 72c403e..7aa0ee1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/310implicitSizeArrayError.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/310implicitSizeArrayError.vert @@ -1,5 +1,5 @@ #version 310 es -layout (location=0) uniform Block { +layout (binding=0) uniform Block { highp int a[]; } uni; layout (location=0) out highp int o; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/400.frag b/3rdparty/bgfx/3rdparty/glslang/Test/400.frag index b7460b4..039d480 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/400.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/400.frag @@ -184,10 +184,8 @@ void qlod() lod = textureQueryLod(sampRect, pf2); // ERROR } -struct SKeyMem { int precise; } KeyMem; // ERROR, keyword can't be a member - uniform uint uu; -out int iout; +out uint iout; void bitwiseConv() { @@ -195,3 +193,9 @@ void bitwiseConv() iout += uu ^ i; iout += i | uu; } + +subroutine(subT1, subT2); +subroutine float subT1() { return 1.0; } +subroutine float subT2() { return 1.0; } + +struct SKeyMem { int precise; } KeyMem; // ERROR, keyword can't be a member diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/440.vert b/3rdparty/bgfx/3rdparty/glslang/Test/440.vert index 2e61f79..4ab6f2e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/440.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/440.vert @@ -174,6 +174,12 @@ out layout(xfb_buffer=7, xfb_offset=0) bblck10 { // link ERROR, implicit stride float f; } bbinst10; +layout(xfb_buffer = 3) out; +layout(xfb_offset = 32) out gl_PerVertex { + layout(xfb_buffer = 2) float gl_PointSize; // ERROR, change in xfb_buffer + vec4 gl_Position; +}; + int drawParamsBad() { return gl_BaseVertexARB + gl_BaseInstanceARB + gl_DrawIDARB; // ERROR, extension not requested diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/450.comp b/3rdparty/bgfx/3rdparty/glslang/Test/450.comp index 7f723ec..fb2b56a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/450.comp +++ b/3rdparty/bgfx/3rdparty/glslang/Test/450.comp @@ -1 +1,6 @@ #version 450 core +layout(local_size_x = 0) in; // ERROR, 0 not allowed +void main() +{ + shared float f; // ERROR shared must be global +} diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/450.frag b/3rdparty/bgfx/3rdparty/glslang/Test/450.frag index 04f3aa1..076d0b3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/450.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/450.frag @@ -54,3 +54,15 @@ float cull(int i) { return (i >= 6) ? gl_CullDistance[5] : gl_CullDistance[i]; } + +layout(location = 6) in bName1 { + float f; + layout(location = 7) float g; + mat4 m; +} bInst1; +layout(location = 12) in bName2 { + float f; + layout(location = 13) float g; // ERROR, location on array +} bInst2[3]; + +layout(early_fragment_tests) in float f; // ERROR, must be standalone diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/450.geom b/3rdparty/bgfx/3rdparty/glslang/Test/450.geom index 83d99aa..45cbecb 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/450.geom +++ b/3rdparty/bgfx/3rdparty/glslang/Test/450.geom @@ -15,3 +15,5 @@ void main() gl_in[3].gl_Position; // ERROR, out of range gl_CullDistance[2] = gl_in[1].gl_CullDistance[2]; } + +layout(points) in float f[3]; // ERROR, must be standalone diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/450.tesc b/3rdparty/bgfx/3rdparty/glslang/Test/450.tesc index 75a9bf4..bf5c083 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/450.tesc +++ b/3rdparty/bgfx/3rdparty/glslang/Test/450.tesc @@ -12,3 +12,12 @@ void main() { gl_out[gl_InvocationID].gl_CullDistance[2] = gl_in[1].gl_CullDistance[2]; } + +layout(location = 4) out bName1 { + float f; + layout(location = 5) float g; +} bInst1[2]; +layout(location = 6) out bName2 { + float f; + layout(location = 7) float g; // ERROR, location on array +} bInst2[2][3]; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/450.tese b/3rdparty/bgfx/3rdparty/glslang/Test/450.tese index 6144793..8cdeb20 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/450.tese +++ b/3rdparty/bgfx/3rdparty/glslang/Test/450.tese @@ -12,3 +12,10 @@ void main() { gl_CullDistance[2] = gl_in[1].gl_CullDistance[2]; } + +layout(equal_spacing) in float f1[]; // ERROR, must be standalone +layout(fractional_even_spacing) in float f2[]; // ERROR, must be standalone +layout(fractional_odd_spacing) in float f3[]; // ERROR, must be standalone +layout(cw) in float f4[]; // ERROR, must be standalone +layout(ccw) in float f5[]; // ERROR, must be standalone +layout(point_mode) in float f6[]; // ERROR, must be standalone diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/450.vert b/3rdparty/bgfx/3rdparty/glslang/Test/450.vert index 0834d16..e99a133 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/450.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/450.vert @@ -22,7 +22,35 @@ out SA outSA; struct SS { float f; S s; }; out SS outSS; +layout(binding = 0) uniform atomic_uint aui; +uint ui; + void foo() { SS::f; + atomicCounterAdd(aui, ui); // ERROR, need 4.6 + atomicCounterSubtract(aui, ui); // ERROR, need 4.6 + atomicCounterMin(aui, ui); // ERROR, need 4.6 + atomicCounterMax(aui, ui); // ERROR, need 4.6 + atomicCounterAnd(aui, ui); // ERROR, need 4.6 + atomicCounterOr(aui, ui); // ERROR, need 4.6 + atomicCounterXor(aui, ui); // ERROR, need 4.6 + atomicCounterExchange(aui, ui); // ERROR, need 4.6 + atomicCounterCompSwap(aui, ui, ui); // ERROR, need 4.6 + + int a = gl_BaseVertex + gl_BaseInstance + gl_DrawID; // ERROR, need 4.6 + + bool b1; + anyInvocation(b1); // ERROR, need 4.6 + allInvocations(b1); // ERROR, need 4.6 + allInvocationsEqual(b1); // ERROR, need 4.6 } +; // ERROR: no extraneous semicolons + +layout(location = 0) uniform locBlock { // ERROR, no location uniform block + int a; +}; + +layout(location = 0) buffer locBuffBlock { // ERROR, no location on buffer block + int b; +}; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/100.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/100.frag.out index 67be9e0..3464dcb 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/100.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/100.frag.out @@ -84,7 +84,7 @@ ERROR: 0:194: '.' : cannot apply to an array: method ERROR: 0:194: 'a' : can't use function syntax on variable ERROR: 0:214: 'non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)' : not supported for this version or the enabled extensions ERROR: 0:3000: '#error' : line of this error should be 3000 -ERROR: 0:3002: '' : syntax error +ERROR: 0:3002: '' : syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON ERROR: 77 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/120.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/120.frag.out index 6a635ec..7aa91ec 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/120.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/120.frag.out @@ -19,7 +19,7 @@ ERROR: 0:82: 'xr' : vector swizzle selectors not from the same set ERROR: 0:83: 'xyxyx' : vector swizzle too long ERROR: 0:84: 'z' : vector swizzle selection out of range ERROR: 0:85: 'assign' : l-value required -ERROR: 0:91: 'int' : overloaded functions must have the same return type +ERROR: 0:91: 'main' : overloaded functions must have the same return type ERROR: 0:91: 'main' : function already has a body ERROR: 0:91: 'int' : entry point cannot return a value ERROR: 0:92: 'main' : function cannot take any parameter(s) @@ -52,8 +52,10 @@ ERROR: 0:209: 'assign' : cannot convert from ' const float' to ' temp 4-compone ERROR: 0:212: 'sampler2DRect' : Reserved word. ERROR: 0:244: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type ' global void' and a right operand of type ' const int' (or there is no acceptable conversion) ERROR: 0:245: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type ' const int' and a right operand of type ' global void' (or there is no acceptable conversion) -ERROR: 0:248: '' : syntax error -ERROR: 54 compilation errors. No code generated. +ERROR: 0:248: 'shader half float' : required extension not requested: GL_AMD_gpu_shader_half_float +ERROR: 0:248: 'half floating-point suffix' : not supported with this profile: none +ERROR: 0:248: '' : syntax error, unexpected IDENTIFIER, expecting COMMA or SEMICOLON +ERROR: 56 compilation errors. No code generated. Shader version: 120 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/120.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/120.vert.out index c89be98..33537d1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/120.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/120.vert.out @@ -34,7 +34,7 @@ ERROR: 0:51: 'arrays of arrays' : not supported with this profile: none ERROR: 0:52: 'arrays of arrays' : not supported with this profile: none ERROR: 0:53: 'arrays of arrays' : not supported with this profile: none ERROR: 0:56: 'out' : overloaded functions must have the same parameter storage qualifiers for argument 1 -ERROR: 0:57: 'float' : overloaded functions must have the same return type +ERROR: 0:57: 'overloadA' : overloaded functions must have the same return type ERROR: 0:87: 'overloadC' : no matching overloaded function found ERROR: 0:90: 'overloadC' : no matching overloaded function found ERROR: 0:95: 'overloadD' : ambiguous function signature match: multiple signatures match under implicit type conversion diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/150.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/150.tesc.out index 526b6e7..25e44ed 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/150.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/150.tesc.out @@ -210,7 +210,6 @@ ERROR: node is still EOpNull! 0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out implicitly-sized array of float ClipDistance gl_ClipDistance}) 400.tesc -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:6: 'quads' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) ERROR: 0:7: 'ccw' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) ERROR: 0:8: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) @@ -442,7 +441,6 @@ ERROR: node is still EOpNull! 0:? 'badOrder' ( invariant noContraction out 4-element array of 4-component vector of float) 400.tese -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:3: 'vertices' : there is no such layout identifier for this stage taking an assigned value ERROR: 0:5: 'triangles' : cannot change previously set input primitive ERROR: 0:6: 'isolines' : cannot change previously set input primitive @@ -612,7 +610,6 @@ ERROR: node is still EOpNull! 0:? 'pinbi' ( patch in block{ in int a}) 410.tesc -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:4: 'length' : array must first be sized by a redeclaration or layout qualifier ERROR: 1 compilation errors. No code generated. @@ -628,7 +625,6 @@ ERROR: node is still EOpNull! 0:? 'patchOut' ( patch out 4-component vector of float) 420.tesc -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:7: 'vertices' : inconsistent output number of vertices for array size of gl_out ERROR: 0:11: 'vertices' : inconsistent output number of vertices for array size of a ERROR: 0:12: 'vertices' : inconsistent output number of vertices for array size of outb @@ -747,7 +743,6 @@ ERROR: node is still EOpNull! 0:? 'vs_tcs_last' (layout( location=12) in 32-element array of 2X4 matrix of double) 420.tese -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:7: '=' : cannot convert from ' const 3-element array of float' to ' global 2-element array of float' ERROR: 0:8: 'initializer list' : wrong vector size (or rows in a matrix column): temp 2-component vector of float ERROR: 0:9: 'initializer list' : wrong number of matrix columns: temp 3X3 matrix of float @@ -759,7 +754,7 @@ ERROR: 0:29: 'constructor' : cannot convert parameter 2 from ' const 2X2 matrix ERROR: 0:29: ' const 2-element array of 4-component vector of float' : cannot construct with these arguments ERROR: 0:29: '=' : cannot convert from ' const float' to ' global 2-element array of 4-component vector of float' ERROR: 0:30: 'initializer list' : wrong number of matrix columns: temp 4X2 matrix of float -ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' temp float' to ' temp structure{ global float s, global float t}' +ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' const structure{ global 4-component vector of float a, global 4-component vector of float b}' to ' temp structure{ global float s, global float t}' ERROR: 0:70: 'initializer list' : wrong number of structure members ERROR: 13 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.frag.out index 371d9c2..63abec1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.frag.out @@ -43,7 +43,7 @@ ERROR: 0:156: 'invariant' : can only apply to an output ERROR: 0:157: 'invariant' : can only apply to an output ERROR: 0:158: 'invariant' : can only apply to an output ERROR: 0:160: 'imageBuffer' : Reserved word. -ERROR: 0:160: '' : syntax error +ERROR: 0:160: '' : syntax error, unexpected IMAGEBUFFER, expecting COMMA or SEMICOLON ERROR: 45 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.vert.out index ec5d5d0..507ad73 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/300.vert.out @@ -43,10 +43,18 @@ ERROR: 0:172: 'std430' : requires the 'buffer' storage qualifier ERROR: 0:175: '' : array size required ERROR: 0:185: 'assign' : cannot convert from ' temp 4-element array of highp float' to ' temp 3-element array of highp float' ERROR: 0:186: 'assign' : cannot convert from ' temp 3-element array of highp float' to ' temp 4-element array of highp float' -ERROR: 44 compilation errors. No code generated. +ERROR: 0:189: 'num_views' : required extension not requested: Possible extensions include: +GL_OVR_multiview +GL_OVR_multiview2 +ERROR: 0:193: 'gl_ViewID_OVR' : required extension not requested: Possible extensions include: +GL_OVR_multiview +GL_OVR_multiview2 +ERROR: 0:198: 'num_views' : can only apply to a standalone qualifier +ERROR: 47 compilation errors. No code generated. Shader version: 300 +Requested GL_OVR_multiview ERROR: node is still EOpNull! 0:27 Function Definition: main( ( global void) 0:27 Function Parameters: @@ -289,6 +297,14 @@ ERROR: node is still EOpNull! 0:184 'y' ( temp 4-element array of highp float) 0:185 'xp' ( temp 3-element array of highp float) 0:186 'yp' ( temp 4-element array of highp float) +0:191 Function Definition: mwErr( ( global void) +0:191 Function Parameters: +0:193 Sequence +0:193 'gl_ViewID_OVR' ( in highp uint ViewIndex) +0:201 Function Definition: mwOk( ( global void) +0:201 Function Parameters: +0:203 Sequence +0:203 'gl_ViewID_OVR' ( in highp uint ViewIndex) 0:? Linker Objects 0:? 'm43' ( uniform highp 4X3 matrix of float) 0:? 'm33' ( uniform highp 3X3 matrix of float) @@ -323,6 +339,7 @@ ERROR: node is still EOpNull! 0:? 'Binst' (layout( column_major shared) uniform block{layout( column_major shared) uniform highp int a}) 0:? 'Bfoo' ( global highp int) 0:? 'B430i' (layout( column_major std430) uniform block{layout( column_major std430 offset=0) uniform highp int a}) +0:? 'mwUniform' ( uniform highp float) 0:? 'gl_VertexID' ( gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId) @@ -331,6 +348,7 @@ Linked vertex stage: Shader version: 300 +Requested GL_OVR_multiview ERROR: node is still EOpNull! 0:27 Function Definition: main( ( global void) 0:27 Function Parameters: @@ -481,6 +499,7 @@ ERROR: node is still EOpNull! 0:? 'Binst' (layout( column_major shared) uniform block{layout( column_major shared) uniform highp int a}) 0:? 'Bfoo' ( global highp int) 0:? 'B430i' (layout( column_major std430) uniform block{layout( column_major std430 offset=0) uniform highp int a}) +0:? 'mwUniform' ( uniform highp float) 0:? 'gl_VertexID' ( gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.comp.out index 3246622..f2d48ef 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.comp.out @@ -1,7 +1,7 @@ 310.comp -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:4: 'local_size' : cannot change previously set size ERROR: 0:5: 'local_size' : too large; see gl_MaxComputeWorkGroupSize +ERROR: 0:7: 'local_size_y' : must be at least 1 ERROR: 0:23: '' : array size required ERROR: 0:39: 'in' : global storage input qualifier cannot be used in a compute shader ERROR: 0:39: 'location qualifier on input' : not supported in this stage: compute @@ -16,7 +16,7 @@ ERROR: 0:47: 'local_size' : can only apply to 'in' ERROR: 0:61: 'assign' : l-value required "ro" (can't modify a readonly buffer) ERROR: 0:66: 'buffer' : buffers can be declared only as blocks ERROR: 0:68: 'sampler/image' : type requires declaration of default precision qualifier -ERROR: 0:76: 'image variables declared 'writeonly' without a format layout qualifier' : not supported with this profile: es +ERROR: 0:76: 'image variables not declared 'writeonly' and without a format layout qualifier' : not supported with this profile: es ERROR: 0:81: 'sampler/image' : type requires declaration of default precision qualifier ERROR: 0:82: 'sampler/image' : type requires declaration of default precision qualifier ERROR: 0:87: 'imageAtomicCompSwap' : required extension not requested: GL_OES_shader_image_atomic @@ -54,12 +54,12 @@ ERROR: 0:171: 'samplerCubeArray' : Reserved word. ERROR: 0:171: 'sampler/image' : type requires declaration of default precision qualifier ERROR: 0:172: 'iimage2DRect' : Reserved word. ERROR: 0:172: 'sampler/image' : type requires declaration of default precision qualifier -ERROR: 0:172: 'image variables declared 'writeonly' without a format layout qualifier' : not supported with this profile: es +ERROR: 0:172: 'image variables not declared 'writeonly' and without a format layout qualifier' : not supported with this profile: es ERROR: 0:173: 'image2DMS' : Reserved word. -ERROR: 0:173: 'image variables declared 'writeonly' without a format layout qualifier' : not supported with this profile: es +ERROR: 0:173: 'image variables not declared 'writeonly' and without a format layout qualifier' : not supported with this profile: es ERROR: 0:174: 'uimage2DMSArray' : Reserved word. ERROR: 0:174: 'sampler/image' : type requires declaration of default precision qualifier -ERROR: 0:174: 'image variables declared 'writeonly' without a format layout qualifier' : not supported with this profile: es +ERROR: 0:174: 'image variables not declared 'writeonly' and without a format layout qualifier' : not supported with this profile: es ERROR: 0:181: 'rgba32f' : format requires readonly or writeonly memory qualifier ERROR: 0:182: 'rgba8i' : format requires readonly or writeonly memory qualifier ERROR: 0:183: 'rgba16ui' : format requires readonly or writeonly memory qualifier @@ -84,7 +84,7 @@ WARNING: 0:238: '#define' : names containing consecutive underscores are reserve ERROR: 0:244: 'gl_DeviceIndex' : required extension not requested: GL_EXT_device_group ERROR: 0:245: 'gl_ViewIndex' : undeclared identifier ERROR: 0:255: 'gl_ViewIndex' : undeclared identifier -ERROR: 82 compilation errors. No code generated. +ERROR: 83 compilation errors. No code generated. Shader version: 310 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.frag.out index 3b2fdd0..8107556 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.frag.out @@ -1,5 +1,4 @@ 310.frag -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:2: 'float' : type requires declaration of default precision qualifier ERROR: 0:8: 'origin_upper_left' : not supported with this profile: es ERROR: 0:8: 'pixel_center_integer' : not supported with this profile: es @@ -19,13 +18,13 @@ ERROR: 0:44: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, ERROR: 0:45: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset] ERROR: 0:45: 'texel offset' : value is out of range: [gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset] ERROR: 0:66: 'sampler/image' : type requires declaration of default precision qualifier -ERROR: 0:66: 'image variables declared 'writeonly' without a format layout qualifier' : not supported with this profile: es +ERROR: 0:66: 'image variables not declared 'writeonly' and without a format layout qualifier' : not supported with this profile: es ERROR: 0:67: 'sampler/image' : type requires declaration of default precision qualifier -ERROR: 0:67: 'image variables declared 'writeonly' without a format layout qualifier' : not supported with this profile: es +ERROR: 0:67: 'image variables not declared 'writeonly' and without a format layout qualifier' : not supported with this profile: es ERROR: 0:68: 'sampler/image' : type requires declaration of default precision qualifier -ERROR: 0:68: 'image variables declared 'writeonly' without a format layout qualifier' : not supported with this profile: es +ERROR: 0:68: 'image variables not declared 'writeonly' and without a format layout qualifier' : not supported with this profile: es ERROR: 0:69: 'sampler/image' : type requires declaration of default precision qualifier -ERROR: 0:69: 'image variables declared 'writeonly' without a format layout qualifier' : not supported with this profile: es +ERROR: 0:69: 'image variables not declared 'writeonly' and without a format layout qualifier' : not supported with this profile: es ERROR: 0:73: 'binding' : requires block, or sampler/image, or atomic-counter type ERROR: 0:77: 'location' : location is too large ERROR: 0:81: 'location' : too large for fragment output @@ -36,7 +35,7 @@ ERROR: 0:83: 'layout-id value' : cannot be negative ERROR: 0:96: 'sampler/image' : type requires declaration of default precision qualifier ERROR: 0:110: 'out' : cannot be bool ERROR: 0:111: 'image2D' : sampler/image types can only be used in uniform variables or function parameters: imageOut -ERROR: 0:111: 'image variables declared 'writeonly' without a format layout qualifier' : not supported with this profile: es +ERROR: 0:111: 'image variables not declared 'writeonly' and without a format layout qualifier' : not supported with this profile: es ERROR: 0:112: 'out' : cannot be a matrix ERROR: 0:114: 'in' : cannot be bool ERROR: 0:115: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: ino @@ -124,7 +123,7 @@ ERROR: 0:391: 'interpolateAtOffset' : first argument must be an interpolant, or ERROR: 0:392: 'interpolateAtOffset' : first argument must be an interpolant, or interpolant-array element ERROR: 0:396: 'interpolateAtCentroid' : first argument must be an interpolant, or interpolant-array element ERROR: 0:397: 'interpolateAtSample' : first argument must be an interpolant, or interpolant-array element -ERROR: 0:400: 'blend equation' : required extension not requested: GL_KHR_blend_equation_advanced +ERROR: 0:400: 'blend equation' : not supported for this version or the enabled extensions ERROR: 0:423: 'blend equation' : can only apply to 'out' ERROR: 0:424: 'blend equation' : can only apply to a standalone qualifier ERROR: 0:425: 'blend equation' : can only apply to a standalone qualifier diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.geom.out index e57c822..b0dabc3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.geom.out @@ -1,5 +1,4 @@ 310.geom -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:29: 'fromVertex' : block instance name redefinition ERROR: 0:33: 'fromVertex' : redefinition ERROR: 0:35: 'fooC' : block instance name redefinition diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.tesc.out index 9c3d1d5..01d7ecf 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.tesc.out @@ -1,5 +1,4 @@ 310.tesc -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:8: 'quads' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) ERROR: 0:9: 'ccw' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) ERROR: 0:10: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.tese.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.tese.out index 4550230..52d19b4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.tese.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.tese.out @@ -1,5 +1,4 @@ 310.tese -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:7: 'vertices' : there is no such layout identifier for this stage taking an assigned value ERROR: 0:9: 'triangles' : cannot change previously set input primitive ERROR: 0:10: 'isolines' : cannot change previously set input primitive diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.vert.out index 6d4599c..21fa27b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310.vert.out @@ -1,5 +1,4 @@ 310.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:3: 'shared' : not supported in this stage: vertex ERROR: 0:4: 'local_size_x' : there is no such layout identifier for this stage taking an assigned value ERROR: 0:5: 'buffer' : buffers can be declared only as blocks diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310AofA.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310AofA.vert.out index ffba25f..fdb5796 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310AofA.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310AofA.vert.out @@ -1,5 +1,4 @@ 310AofA.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:17: '' : array size required ERROR: 0:23: '' : array size required ERROR: 0:28: '[]' : only outermost dimension of an array of arrays can be implicitly sized @@ -318,10 +317,29 @@ ERROR: node is still EOpNull! 0:99 0 (const int) 0:99 Constant: 0:99 1 (const int) +0:117 Function Definition: func(mf33[3][2]; ( global highp 3-component vector of float) +0:117 Function Parameters: +0:117 'x' ( in 3-element array of 2-element array of highp 3X3 matrix of float) +0:119 Sequence +0:119 Sequence +0:119 move second child to first child ( temp highp 3X3 matrix of float) +0:119 'a0' ( temp highp 3X3 matrix of float) +0:119 direct index ( temp highp 3X3 matrix of float) +0:119 direct index ( temp 2-element array of highp 3X3 matrix of float) +0:119 'x' ( in 3-element array of 2-element array of highp 3X3 matrix of float) +0:119 Constant: +0:119 2 (const int) +0:119 Constant: +0:119 1 (const int) +0:120 Branch: Return with expression +0:120 direct index ( temp highp 3-component vector of float) +0:120 'a0' ( temp highp 3X3 matrix of float) +0:120 Constant: +0:120 2 (const int) 0:? Linker Objects 0:? 'name' (layout( column_major shared) buffer 3-element array of block{layout( column_major shared) buffer implicitly-sized array of highp float u, layout( column_major shared) buffer implicitly-sized array of highp 4-component vector of float v}) 0:? 'uname' (layout( column_major shared) uniform 3-element array of block{layout( column_major shared) uniform highp float u, layout( column_major shared) uniform implicitly-sized array of highp 4-component vector of float v}) -0:? 'name2' (layout( column_major shared) buffer 3-element array of block{layout( column_major shared) buffer highp float u, layout( column_major shared) buffer implicitly-sized array of implicitly-sized array of highp 4-component vector of float v}) +0:? 'name2' (layout( column_major shared) buffer 3-element array of block{layout( column_major shared) buffer highp float u, layout( column_major shared) buffer implicitly-sized array of 1-element array of highp 4-component vector of float v}) 0:? 'name3' (layout( column_major shared) buffer 3-element array of block{layout( column_major shared) buffer highp float u, layout( column_major shared) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v}) 0:? 'many' ( global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of highp float) 0:? 'gu' ( global implicitly-sized array of 7-element array of highp float) @@ -362,7 +380,7 @@ ERROR: node is still EOpNull! 0:? Linker Objects 0:? 'name' (layout( column_major shared) buffer 3-element array of block{layout( column_major shared) buffer implicitly-sized array of highp float u, layout( column_major shared) buffer implicitly-sized array of highp 4-component vector of float v}) 0:? 'uname' (layout( column_major shared) uniform 3-element array of block{layout( column_major shared) uniform highp float u, layout( column_major shared) uniform 1-element array of highp 4-component vector of float v}) -0:? 'name2' (layout( column_major shared) buffer 3-element array of block{layout( column_major shared) buffer highp float u, layout( column_major shared) buffer implicitly-sized array of implicitly-sized array of highp 4-component vector of float v}) +0:? 'name2' (layout( column_major shared) buffer 3-element array of block{layout( column_major shared) buffer highp float u, layout( column_major shared) buffer implicitly-sized array of 1-element array of highp 4-component vector of float v}) 0:? 'name3' (layout( column_major shared) buffer 3-element array of block{layout( column_major shared) buffer highp float u, layout( column_major shared) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v}) 0:? 'many' ( global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of highp float) 0:? 'gu' ( global 1-element array of 7-element array of highp float) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310implicitSizeArrayError.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310implicitSizeArrayError.vert.out index 07ac523..9826348 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310implicitSizeArrayError.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/310implicitSizeArrayError.vert.out @@ -1,5 +1,4 @@ 310implicitSizeArrayError.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:3: '' : array size required ERROR: 1 compilation errors. No code generated. @@ -13,13 +12,13 @@ ERROR: node is still EOpNull! 0:7 'o' (layout( location=0) smooth out highp int) 0:7 direct index (layout( column_major shared) temp highp int) 0:7 a: direct index for structure (layout( column_major shared) uniform implicitly-sized array of highp int) -0:7 'uni' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a}) +0:7 'uni' (layout( binding=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a}) 0:7 Constant: 0:7 0 (const int) 0:7 Constant: 0:7 2 (const int) 0:? Linker Objects -0:? 'uni' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a}) +0:? 'uni' (layout( binding=0 column_major shared) uniform block{layout( column_major shared) uniform implicitly-sized array of highp int a}) 0:? 'o' (layout( location=0) smooth out highp int) 0:? 'gl_VertexID' ( gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId) @@ -37,13 +36,13 @@ ERROR: node is still EOpNull! 0:7 'o' (layout( location=0) smooth out highp int) 0:7 direct index (layout( column_major shared) temp highp int) 0:7 a: direct index for structure (layout( column_major shared) uniform 1-element array of highp int) -0:7 'uni' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a}) +0:7 'uni' (layout( binding=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a}) 0:7 Constant: 0:7 0 (const int) 0:7 Constant: 0:7 2 (const int) 0:? Linker Objects -0:? 'uni' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a}) +0:? 'uni' (layout( binding=0 column_major shared) uniform block{layout( column_major shared) uniform 1-element array of highp int a}) 0:? 'o' (layout( location=0) smooth out highp int) 0:? 'gl_VertexID' ( gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/330.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/330.frag.out index 4b5a84b..7745631 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/330.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/330.frag.out @@ -16,6 +16,7 @@ ERROR: 0:57: 'location on block member' : not supported for this version or the ERROR: 0:62: 'location on block member' : can only use in an in/out block ERROR: 0:62: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions ERROR: 0:60: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions +ERROR: 0:60: 'location' : cannot apply to uniform or buffer block ERROR: 0:68: 'layout-id value' : cannot be negative ERROR: 0:69: 'layout-id value' : cannot be negative ERROR: 0:76: 'f2' : cannot use layout qualifiers on structure members @@ -23,6 +24,7 @@ ERROR: 0:91: 'location on block member' : can only use in an in/out block ERROR: 0:91: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions ERROR: 0:91: 'location' : overlapping use of location 3 ERROR: 0:89: 'location qualifier on uniform or buffer' : not supported for this version or the enabled extensions +ERROR: 0:89: 'location' : cannot apply to uniform or buffer block ERROR: 0:94: 'location' : either the block needs a location, or all members need a location, or no members have a location ERROR: 0:108: 'A' : cannot use layout qualifiers on structure members ERROR: 0:119: 'location' : overlapping use of location 44 @@ -38,7 +40,7 @@ ERROR: 0:140: 'assign' : cannot convert from ' const float' to ' temp 2-compone ERROR: 0:141: 'textureQueryLod' : no matching overloaded function found ERROR: 0:141: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float' ERROR: 0:152: 'index' : value must be 0 or 1 -ERROR: 39 compilation errors. No code generated. +ERROR: 41 compilation errors. No code generated. Shader version: 330 @@ -100,7 +102,7 @@ ERROR: node is still EOpNull! 0:? 'v20' ( smooth in 4-component vector of float) 0:? 'v21' (layout( location=60) smooth in float) 0:? 'v22' (layout( location=2) smooth in float) -0:? 'anon@1' ( in block{layout( location=1 component=0) in float f1, layout( location=3) in float f2}) +0:? 'anon@1' ( in block{layout( location=1) in float f1, layout( location=3) in float f2}) 0:? 'uinst' (layout( location=1 column_major shared) uniform block{layout( column_major shared) uniform float f1, layout( location=3 column_major shared) uniform float f2}) 0:? 'v3' (layout( location=6) smooth in 4-component vector of float) 0:? 'v4' ( smooth in 4-component vector of float) @@ -108,12 +110,12 @@ ERROR: node is still EOpNull! 0:? 'v6' (layout( location=30) smooth in 4-component vector of float) 0:? 'v23' (layout( location=61) smooth in float) 0:? 'v24' (layout( location=62) smooth in float) -0:? 'ininst2' ( in block{layout( location=28 component=0) in bool b1, layout( location=29 component=0) in float f1, layout( location=25) in float f2, layout( location=26 component=0) in 4-component vector of float f3, layout( location=21) in structure{ global float f1, temp float f2} s2, layout( location=23 component=0) in 4-component vector of float f4, layout( location=24 component=0) in 4-component vector of float f5}) +0:? 'ininst2' ( in block{layout( location=28) in bool b1, layout( location=29) in float f1, layout( location=25) in float f2, layout( location=26) in 4-component vector of float f3, layout( location=21) in structure{ global float f1, temp float f2} s2, layout( location=23) in 4-component vector of float f4, layout( location=24) in 4-component vector of float f5}) 0:? 'uinst2' (layout( location=13 column_major shared) uniform block{layout( column_major shared) uniform float f1, layout( location=3 column_major shared) uniform float f2}) 0:? 'in3' ( in block{ in float f1, layout( location=40) in float f2}) 0:? 'in4' ( in block{layout( location=50) in float f1, layout( location=51) in float f2}) 0:? 's' (layout( location=33) smooth in structure{ global 3-component vector of float a, global 2X2 matrix of float b, global 2-element array of 4-component vector of float c, temp 2-component vector of float A}) -0:? 'anon@2' ( in block{layout( location=44 component=0) in 4-component vector of float d, layout( location=45 component=0) in 4-component vector of float e, layout( location=47) in 4-component vector of float f, layout( location=48 component=0) in 4-component vector of float g, layout( location=41) in 4-component vector of float h, layout( location=42 component=0) in 4-component vector of float i, layout( location=43 component=0) in 4-component vector of float j, layout( location=44 component=0) in 4-component vector of float k}) +0:? 'anon@2' ( in block{layout( location=44) in 4-component vector of float d, layout( location=45) in 4-component vector of float e, layout( location=47) in 4-component vector of float f, layout( location=48) in 4-component vector of float g, layout( location=41) in 4-component vector of float h, layout( location=42) in 4-component vector of float i, layout( location=43) in 4-component vector of float j, layout( location=44) in 4-component vector of float k}) 0:? 'outVar2' (layout( location=4095 index=0) out 4-component vector of float) 0:? 'outVar3' (layout( location=0 index=1) out 4-component vector of float) 0:? 'outVar4' (layout( location=0 index=1) out 4-component vector of float) @@ -165,7 +167,7 @@ ERROR: node is still EOpNull! 0:? 'v20' ( smooth in 4-component vector of float) 0:? 'v21' (layout( location=60) smooth in float) 0:? 'v22' (layout( location=2) smooth in float) -0:? 'anon@1' ( in block{layout( location=1 component=0) in float f1, layout( location=3) in float f2}) +0:? 'anon@1' ( in block{layout( location=1) in float f1, layout( location=3) in float f2}) 0:? 'uinst' (layout( location=1 column_major shared) uniform block{layout( column_major shared) uniform float f1, layout( location=3 column_major shared) uniform float f2}) 0:? 'v3' (layout( location=6) smooth in 4-component vector of float) 0:? 'v4' ( smooth in 4-component vector of float) @@ -173,12 +175,12 @@ ERROR: node is still EOpNull! 0:? 'v6' (layout( location=30) smooth in 4-component vector of float) 0:? 'v23' (layout( location=61) smooth in float) 0:? 'v24' (layout( location=62) smooth in float) -0:? 'ininst2' ( in block{layout( location=28 component=0) in bool b1, layout( location=29 component=0) in float f1, layout( location=25) in float f2, layout( location=26 component=0) in 4-component vector of float f3, layout( location=21) in structure{ global float f1, temp float f2} s2, layout( location=23 component=0) in 4-component vector of float f4, layout( location=24 component=0) in 4-component vector of float f5}) +0:? 'ininst2' ( in block{layout( location=28) in bool b1, layout( location=29) in float f1, layout( location=25) in float f2, layout( location=26) in 4-component vector of float f3, layout( location=21) in structure{ global float f1, temp float f2} s2, layout( location=23) in 4-component vector of float f4, layout( location=24) in 4-component vector of float f5}) 0:? 'uinst2' (layout( location=13 column_major shared) uniform block{layout( column_major shared) uniform float f1, layout( location=3 column_major shared) uniform float f2}) 0:? 'in3' ( in block{ in float f1, layout( location=40) in float f2}) 0:? 'in4' ( in block{layout( location=50) in float f1, layout( location=51) in float f2}) 0:? 's' (layout( location=33) smooth in structure{ global 3-component vector of float a, global 2X2 matrix of float b, global 2-element array of 4-component vector of float c, temp 2-component vector of float A}) -0:? 'anon@2' ( in block{layout( location=44 component=0) in 4-component vector of float d, layout( location=45 component=0) in 4-component vector of float e, layout( location=47) in 4-component vector of float f, layout( location=48 component=0) in 4-component vector of float g, layout( location=41) in 4-component vector of float h, layout( location=42 component=0) in 4-component vector of float i, layout( location=43 component=0) in 4-component vector of float j, layout( location=44 component=0) in 4-component vector of float k}) +0:? 'anon@2' ( in block{layout( location=44) in 4-component vector of float d, layout( location=45) in 4-component vector of float e, layout( location=47) in 4-component vector of float f, layout( location=48) in 4-component vector of float g, layout( location=41) in 4-component vector of float h, layout( location=42) in 4-component vector of float i, layout( location=43) in 4-component vector of float j, layout( location=44) in 4-component vector of float k}) 0:? 'outVar2' (layout( location=4095 index=0) out 4-component vector of float) 0:? 'outVar3' (layout( location=0 index=1) out 4-component vector of float) 0:? 'outVar4' (layout( location=0 index=1) out 4-component vector of float) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.frag.out index bd936c7..443b102 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.frag.out @@ -1,5 +1,4 @@ 400.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:18: 'textureGatherOffsets(...)' : must be a compile-time constant: offsets argument ERROR: 0:22: 'textureGatherOffset(...)' : must be a compile-time constant: component argument ERROR: 0:23: 'textureGatherOffset(...)' : must be 0, 1, 2, or 3: component argument @@ -34,8 +33,12 @@ ERROR: 0:183: 'textureQueryLod' : no matching overloaded function found ERROR: 0:183: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float' ERROR: 0:184: 'textureQueryLod' : no matching overloaded function found ERROR: 0:184: 'assign' : cannot convert from ' const float' to ' temp 2-component vector of float' -ERROR: 0:187: '' : syntax error -ERROR: 35 compilation errors. No code generated. +ERROR: 0:197: 'subroutine' : feature not yet implemented +ERROR: 0:197: '' : default qualifier requires 'uniform', 'buffer', 'in', or 'out' storage qualification +ERROR: 0:198: 'subroutine' : feature not yet implemented +ERROR: 0:199: 'subroutine' : feature not yet implemented +ERROR: 0:201: '' : syntax error, unexpected PRECISE, expecting IDENTIFIER +ERROR: 39 compilation errors. No code generated. Shader version: 400 @@ -469,6 +472,39 @@ ERROR: node is still EOpNull! 0:181 'pf3' ( temp 3-component vector of float) 0:183 'lod' ( temp 2-component vector of float) 0:184 'lod' ( temp 2-component vector of float) +0:190 Function Definition: bitwiseConv( ( global void) +0:190 Function Parameters: +0:192 Sequence +0:192 move second child to first child ( temp uint) +0:192 'iout' ( out uint) +0:192 bitwise and ( temp uint) +0:192 'uu' ( uniform uint) +0:192 Convert int to uint ( temp uint) +0:192 'i' ( flat in int) +0:193 add second child into first child ( temp uint) +0:193 'iout' ( out uint) +0:193 exclusive-or ( temp uint) +0:193 'uu' ( uniform uint) +0:193 Convert int to uint ( temp uint) +0:193 'i' ( flat in int) +0:194 add second child into first child ( temp uint) +0:194 'iout' ( out uint) +0:194 inclusive-or ( temp uint) +0:194 Convert int to uint ( temp uint) +0:194 'i' ( flat in int) +0:194 'uu' ( uniform uint) +0:198 Function Definition: subT1( ( temp float) +0:198 Function Parameters: +0:198 Sequence +0:198 Branch: Return with expression +0:198 Constant: +0:198 1.000000 +0:199 Function Definition: subT2( ( temp float) +0:199 Function Parameters: +0:199 Sequence +0:199 Branch: Return with expression +0:199 Constant: +0:199 1.000000 0:? Linker Objects 0:? 'c2D' ( smooth in 2-component vector of float) 0:? 'i' ( flat in int) @@ -512,6 +548,8 @@ ERROR: node is still EOpNull! 0:? 'sampCubeAs' ( uniform samplerCubeArrayShadow) 0:? 'sampBuf' ( uniform samplerBuffer) 0:? 'sampRect' ( uniform sampler2DRect) +0:? 'uu' ( uniform uint) +0:? 'iout' ( out uint) Linked fragment stage: @@ -685,4 +723,6 @@ ERROR: node is still EOpNull! 0:? 'sampCubeAs' ( uniform samplerCubeArrayShadow) 0:? 'sampBuf' ( uniform samplerBuffer) 0:? 'sampRect' ( uniform sampler2DRect) +0:? 'uu' ( uniform uint) +0:? 'iout' ( out uint) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.geom.out index 989b439..52ebebc 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.geom.out @@ -1,8 +1,7 @@ 400.geom -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:12: 'invocations' : can only apply to a standalone qualifier ERROR: 0:20: 'patch' : not supported in this stage: geometry -ERROR: 0:20: 'gl_PointSize' : cannot add layout to redeclared block member +ERROR: 0:20: 'gl_PointSize' : cannot add non-XFB layout to redeclared block member ERROR: 0:20: 'gl_PointSize' : cannot add patch to redeclared block member ERROR: 0:25: 'length' : array must first be sized by a redeclaration or layout qualifier ERROR: 0:36: 'length' : array must first be sized by a redeclaration or layout qualifier diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.tesc.out index 434079e..762f0b8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.tesc.out @@ -1,5 +1,4 @@ 400.tesc -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:6: 'quads' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) ERROR: 0:7: 'ccw' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) ERROR: 0:8: 'fractional_even_spacing' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.tese.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.tese.out index 2f1c97c..e9ffcdf 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.tese.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.tese.out @@ -1,5 +1,4 @@ 400.tese -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:3: 'vertices' : there is no such layout identifier for this stage taking an assigned value ERROR: 0:5: 'triangles' : cannot change previously set input primitive ERROR: 0:6: 'isolines' : cannot change previously set input primitive diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.vert.out index 0fd453d..05f58e2 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/400.vert.out @@ -1,5 +1,4 @@ 400.vert -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:3: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions ERROR: 0:4: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions ERROR: 0:5: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.geom.out index 7219e4d..4d35d52 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.geom.out @@ -1,5 +1,4 @@ 410.geom -Warning, version 410 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:8: 'myIn' : cannot redeclare a built-in block with a user name ERROR: 0:12: 'gl_myIn' : no declaration found for redeclaration ERROR: 0:20: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.tesc.out index 9b459b1..68593d0 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.tesc.out @@ -1,5 +1,4 @@ 410.tesc -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:4: 'length' : array must first be sized by a redeclaration or layout qualifier ERROR: 1 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.vert.out index 0e2c87e..aacdf36 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/410.vert.out @@ -1,6 +1,4 @@ 410.vert -Warning, version 410 is not yet complete; most version-specific features are present, but some are missing. - Shader version: 410 0:? Sequence 0:7 Function Definition: main( ( global void) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.comp.out index 07944de..4e091ac 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.comp.out @@ -1,5 +1,4 @@ 420.comp -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:3: 'gl_WorkGroupSize' : not supported for this version or the enabled extensions ERROR: 1 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.frag.out index 31fe7f9..5f2b0f7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.frag.out @@ -1,10 +1,9 @@ 420.frag -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:4: 'redeclaration' : all redeclarations must use the same depth layout on gl_FragDepth ERROR: 0:11: 'layout qualifier' : can only apply depth layout to gl_FragDepth ERROR: 0:12: 'gl_FragDepth' : cannot redeclare after use -WARNING: 0:14: 'atomic_uint' : implicitly sized atomic_uint array treated as having one element for tracking the default offset -ERROR: 3 compilation errors. No code generated. +ERROR: 0:14: 'atomic_uint' : array must be explicitly sized +ERROR: 4 compilation errors. No code generated. Shader version: 420 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.geom.out index 0fccfe0..fe9e12f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.geom.out @@ -1,5 +1,4 @@ 420.geom -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:9: 'length' : array must first be sized by a redeclaration or layout qualifier ERROR: 0:11: '[' : array must be sized by a redeclaration or layout qualifier before being indexed with a variable ERROR: 0:42: 'assign' : l-value required (can't modify a const) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.tesc.out index 83816f3..7876bd6 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.tesc.out @@ -1,5 +1,4 @@ 420.tesc -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:7: 'vertices' : inconsistent output number of vertices for array size of gl_out ERROR: 0:11: 'vertices' : inconsistent output number of vertices for array size of a ERROR: 0:12: 'vertices' : inconsistent output number of vertices for array size of outb diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.tese.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.tese.out index 9986c2a..f14e1c0 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.tese.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.tese.out @@ -1,5 +1,4 @@ 420.tese -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:7: '=' : cannot convert from ' const 3-element array of float' to ' global 2-element array of float' ERROR: 0:8: 'initializer list' : wrong vector size (or rows in a matrix column): temp 2-component vector of float ERROR: 0:9: 'initializer list' : wrong number of matrix columns: temp 3X3 matrix of float @@ -11,7 +10,7 @@ ERROR: 0:29: 'constructor' : cannot convert parameter 2 from ' const 2X2 matrix ERROR: 0:29: ' const 2-element array of 4-component vector of float' : cannot construct with these arguments ERROR: 0:29: '=' : cannot convert from ' const float' to ' global 2-element array of 4-component vector of float' ERROR: 0:30: 'initializer list' : wrong number of matrix columns: temp 4X2 matrix of float -ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' temp float' to ' temp structure{ global float s, global float t}' +ERROR: 0:40: 'constructor' : cannot convert parameter 1 from ' const structure{ global 4-component vector of float a, global 4-component vector of float b}' to ' temp structure{ global float s, global float t}' ERROR: 0:70: 'initializer list' : wrong number of structure members ERROR: 13 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.vert.out index 8fb8546..b912dc0 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420.vert.out @@ -1,5 +1,4 @@ 420.vert -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:2: '#version' : must occur first in shader WARNING: 0:3: varying deprecated in version 130; may be removed in future release ERROR: 0:3: 'varying' : no longer supported in core profile; removed in version 420 @@ -33,7 +32,7 @@ ERROR: 0:85: '' : vertex input cannot be further qualified ERROR: 0:86: 'patch' : not supported in this stage: vertex ERROR: 0:100: '=' : global const initializers must be constant ' const int' ERROR: 0:101: '' : array size must be a constant integer expression -ERROR: 0:107: 'image variables declared 'writeonly' without a format layout qualifier' : not supported for this version or the enabled extensions +ERROR: 0:107: 'image variables not declared 'writeonly' and without a format layout qualifier' : not supported for this version or the enabled extensions ERROR: 0:114: 'imageAtomicMin' : only supported on image with format r32i or r32ui ERROR: 0:115: 'imageAtomicMax' : no matching overloaded function found ERROR: 0:119: 'writeonly' : argument cannot drop memory qualifier when passed to formal parameter diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420_size_gl_in.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420_size_gl_in.geom.out index 3c3b810..d058013 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420_size_gl_in.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/420_size_gl_in.geom.out @@ -1,5 +1,4 @@ 420_size_gl_in.geom -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:19: 'gl_PerVertex' : can only redeclare a built-in block once, and before any use ERROR: 1 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.comp.out index 91aaf78..c4ad19e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.comp.out @@ -1,5 +1,4 @@ 430.comp -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:4: 'local_size' : cannot change previously set size ERROR: 0:5: 'local_size' : too large; see gl_MaxComputeWorkGroupSize ERROR: 0:43: 'in' : global storage input qualifier cannot be used in a compute shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.vert.out index a5898f2..29ffb01 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430.vert.out @@ -1,5 +1,4 @@ 430.vert -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:3: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers ERROR: 0:7: 'input block' : not supported in this stage: vertex ERROR: 0:7: 'location qualifier on in/out block' : not supported for this version or the enabled extensions @@ -233,7 +232,7 @@ ERROR: node is still EOpNull! 0:? 'start2' ( const int) 0:? 5 (const int) 0:? 'v6' (layout( location=19) in 4-component vector of float) -0:? 'ininst2' ( in block{layout( location=28 component=0) in bool b1, layout( location=29 component=0) in float f1, layout( location=25) in float f2}) +0:? 'ininst2' ( in block{layout( location=28) in bool b1, layout( location=29) in float f1, layout( location=25) in float f2}) 0:? 'in4' ( in block{layout( location=50) in float f1, layout( location=51) in float f2}) 0:? 'bbinst2g' ( out block{layout( xfb_buffer=3 xfb_offset=64) out 4-component vector of float bbv}) 0:? 'bg' (layout( xfb_buffer=1 xfb_offset=48 xfb_stride=80) smooth out 4-component vector of float) @@ -308,7 +307,7 @@ ERROR: node is still EOpNull! 0:? 'start2' ( const int) 0:? 5 (const int) 0:? 'v6' (layout( location=19) in 4-component vector of float) -0:? 'ininst2' ( in block{layout( location=28 component=0) in bool b1, layout( location=29 component=0) in float f1, layout( location=25) in float f2}) +0:? 'ininst2' ( in block{layout( location=28) in bool b1, layout( location=29) in float f1, layout( location=25) in float f2}) 0:? 'in4' ( in block{layout( location=50) in float f1, layout( location=51) in float f2}) 0:? 'bbinst2g' ( out block{layout( xfb_buffer=3 xfb_offset=64) out 4-component vector of float bbv}) 0:? 'bg' (layout( xfb_buffer=1 xfb_offset=48 xfb_stride=80) smooth out 4-component vector of float) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430AofA.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430AofA.frag.out index 3d53280..22dc4d3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430AofA.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430AofA.frag.out @@ -1,5 +1,4 @@ 430AofA.frag -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:6: '[]' : only outermost dimension of an array of arrays can be implicitly sized ERROR: 0:14: 'constructor' : constructing non-array constituent from array argument ERROR: 0:15: 'constructor' : array constructor argument not correct type to construct array element @@ -406,7 +405,7 @@ ERROR: node is still EOpNull! 0:? Linker Objects 0:? 'many' ( global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of float) 0:? 'gu' ( global implicitly-sized array of 7-element array of float) -0:? 'gimp' ( global implicitly-sized array of implicitly-sized array of float) +0:? 'gimp' ( global implicitly-sized array of 1-element array of float) 0:? 'g4' ( global 4-element array of 7-element array of float) 0:? 'g5' ( global 5-element array of 7-element array of float) @@ -769,7 +768,7 @@ ERROR: node is still EOpNull! 0:? Linker Objects 0:? 'many' ( global 1-element array of 2-element array of 3-element array of 4-element array of 5-element array of 6-element array of float) 0:? 'gu' ( global 1-element array of 7-element array of float) -0:? 'gimp' ( global 1-element array of implicitly-sized array of float) +0:? 'gimp' ( global 1-element array of 1-element array of float) 0:? 'g4' ( global 4-element array of 7-element array of float) 0:? 'g5' ( global 5-element array of 7-element array of float) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430scope.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430scope.vert.out index 3e71002..0d91389 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430scope.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/430scope.vert.out @@ -1,5 +1,4 @@ 430scope.vert -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:5: 'a' : redefinition ERROR: 0:17: 'b' : function name is redeclaration of existing name ERROR: 0:20: 'c' : redefinition diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.frag.out index ff27641..18e014f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.frag.out @@ -1,5 +1,4 @@ 440.frag -Warning, version 440 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:11: 'location' : overlapping use of location 4 ERROR: 0:13: 'component' : type overflows the available 4 components ERROR: 0:22: 'location' : fragment outputs sharing the same location must be the same basic type 30 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.vert.out index 3448113..41796cb 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/440.vert.out @@ -1,5 +1,4 @@ 440.vert -Warning, version 440 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:8: 'component' : type overflows the available 4 components ERROR: 0:15: 'component' : component is too large ERROR: 0:23: 'location' : overlapping use of location 4 @@ -47,51 +46,54 @@ ERROR: 0:166: 'xfb_buffer' : buffer is too large: gl_MaxTransformFeedbackBuffers ERROR: 0:169: 'xfb_buffer' : buffer is too large: gl_MaxTransformFeedbackBuffers is 4 ERROR: 0:169: 'xfb_stride' : 1/4 stride is too large: gl_MaxTransformFeedbackInterleavedComponents is 64 ERROR: 0:171: 'xfb_buffer' : buffer is too large: gl_MaxTransformFeedbackBuffers is 4 -ERROR: 0:179: 'gl_BaseVertexARB' : required extension not requested: GL_ARB_shader_draw_parameters -ERROR: 0:179: 'gl_BaseInstanceARB' : required extension not requested: GL_ARB_shader_draw_parameters -ERROR: 0:179: 'gl_DrawIDARB' : required extension not requested: GL_ARB_shader_draw_parameters -ERROR: 0:187: 'assign' : l-value required "gl_BaseVertexARB" (can't modify shader input) -ERROR: 0:188: 'assign' : l-value required "gl_BaseInstanceARB" (can't modify shader input) -ERROR: 0:189: 'assign' : l-value required "gl_DrawIDARB" (can't modify shader input) -ERROR: 0:190: 'glBaseInstanceARB' : undeclared identifier -ERROR: 54 compilation errors. No code generated. +ERROR: 0:178: 'xfb_offset' : overlapping offsets at offset 36 in buffer 3 +ERROR: 0:179: 'xfb_buffer' : member cannot contradict block (or what block inherited from global) +ERROR: 0:178: 'xfb_offset' : overlapping offsets at offset 32 in buffer 3 +ERROR: 0:185: 'gl_BaseVertexARB' : required extension not requested: GL_ARB_shader_draw_parameters +ERROR: 0:185: 'gl_BaseInstanceARB' : required extension not requested: GL_ARB_shader_draw_parameters +ERROR: 0:185: 'gl_DrawIDARB' : required extension not requested: GL_ARB_shader_draw_parameters +ERROR: 0:193: 'assign' : l-value required "gl_BaseVertexARB" (can't modify shader input) +ERROR: 0:194: 'assign' : l-value required "gl_BaseInstanceARB" (can't modify shader input) +ERROR: 0:195: 'assign' : l-value required "gl_DrawIDARB" (can't modify shader input) +ERROR: 0:196: 'glBaseInstanceARB' : undeclared identifier +ERROR: 57 compilation errors. No code generated. Shader version: 440 Requested GL_ARB_shader_draw_parameters in xfb mode ERROR: node is still EOpNull! -0:177 Function Definition: drawParamsBad( ( global int) -0:177 Function Parameters: -0:179 Sequence -0:179 Branch: Return with expression -0:179 add ( temp int) -0:179 add ( temp int) -0:179 'gl_BaseVertexARB' ( in int BaseVertex) -0:179 'gl_BaseInstanceARB' ( in int BaseInstance) -0:179 'gl_DrawIDARB' ( in int DrawId) -0:184 Function Definition: drawParams( ( global int) -0:184 Function Parameters: -0:186 Sequence -0:186 Branch: Return with expression -0:186 add ( temp int) -0:186 add ( temp int) -0:186 'gl_BaseVertexARB' ( in int BaseVertex) -0:186 'gl_BaseInstanceARB' ( in int BaseInstance) -0:186 'gl_DrawIDARB' ( in int DrawId) -0:187 move second child to first child ( temp int) -0:187 'gl_BaseVertexARB' ( in int BaseVertex) -0:187 Constant: -0:187 3 (const int) -0:188 move second child to first child ( temp int) -0:188 'gl_BaseInstanceARB' ( in int BaseInstance) -0:188 Constant: -0:188 3 (const int) -0:189 move second child to first child ( temp int) -0:189 'gl_DrawIDARB' ( in int DrawId) -0:189 Constant: -0:189 3 (const int) -0:190 'glBaseInstanceARB' ( temp float) +0:183 Function Definition: drawParamsBad( ( global int) +0:183 Function Parameters: +0:185 Sequence +0:185 Branch: Return with expression +0:185 add ( temp int) +0:185 add ( temp int) +0:185 'gl_BaseVertexARB' ( in int BaseVertex) +0:185 'gl_BaseInstanceARB' ( in int BaseInstance) +0:185 'gl_DrawIDARB' ( in int DrawId) +0:190 Function Definition: drawParams( ( global int) +0:190 Function Parameters: +0:192 Sequence +0:192 Branch: Return with expression +0:192 add ( temp int) +0:192 add ( temp int) +0:192 'gl_BaseVertexARB' ( in int BaseVertex) +0:192 'gl_BaseInstanceARB' ( in int BaseInstance) +0:192 'gl_DrawIDARB' ( in int DrawId) +0:193 move second child to first child ( temp int) +0:193 'gl_BaseVertexARB' ( in int BaseVertex) +0:193 Constant: +0:193 3 (const int) +0:194 move second child to first child ( temp int) +0:194 'gl_BaseInstanceARB' ( in int BaseInstance) +0:194 Constant: +0:194 3 (const int) +0:195 move second child to first child ( temp int) +0:195 'gl_DrawIDARB' ( in int DrawId) +0:195 Constant: +0:195 3 (const int) +0:196 'glBaseInstanceARB' ( temp float) 0:? Linker Objects 0:? 'a' (layout( location=2 component=2) in 2-component vector of float) 0:? 'b' (layout( location=2 component=1) in float) @@ -154,6 +156,7 @@ ERROR: node is still EOpNull! 0:? 'bbinst9' ( out block{layout( xfb_buffer=4 xfb_offset=1) out bool b, layout( xfb_buffer=4 xfb_offset=12) out structure{ global bool b, global structure{ global int i, global double d, global float f} s, global 2-component vector of float v2} t, layout( xfb_buffer=4 xfb_offset=52) out 3X3 matrix of float m3, layout( xfb_buffer=4 xfb_offset=90) out int i, layout( xfb_buffer=4 xfb_offset=98) out double d, layout( xfb_buffer=4 xfb_offset=108) out structure{ global int a} s}) 0:? 'bm' (layout( xfb_buffer=5 xfb_offset=0) smooth out float) 0:? 'bbinst10' ( out block{layout( xfb_buffer=7 xfb_offset=0) out 4X4 matrix of double m1, layout( xfb_buffer=7 xfb_offset=128) out 4X4 matrix of double m2, layout( xfb_buffer=7 xfb_offset=256) out float f}) +0:? 'anon@0' ( out block{layout( xfb_buffer=3 xfb_offset=36) gl_Position 4-component vector of float Position gl_Position, layout( xfb_buffer=3 xfb_offset=32) gl_PointSize float PointSize gl_PointSize, }) 0:? 'gl_VertexID' ( gl_VertexId int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) @@ -236,6 +239,7 @@ ERROR: node is still EOpNull! 0:? 'bbinst9' ( out block{layout( xfb_buffer=4 xfb_offset=1) out bool b, layout( xfb_buffer=4 xfb_offset=12) out structure{ global bool b, global structure{ global int i, global double d, global float f} s, global 2-component vector of float v2} t, layout( xfb_buffer=4 xfb_offset=52) out 3X3 matrix of float m3, layout( xfb_buffer=4 xfb_offset=90) out int i, layout( xfb_buffer=4 xfb_offset=98) out double d, layout( xfb_buffer=4 xfb_offset=108) out structure{ global int a} s}) 0:? 'bm' (layout( xfb_buffer=5 xfb_offset=0) smooth out float) 0:? 'bbinst10' ( out block{layout( xfb_buffer=7 xfb_offset=0) out 4X4 matrix of double m1, layout( xfb_buffer=7 xfb_offset=128) out 4X4 matrix of double m2, layout( xfb_buffer=7 xfb_offset=256) out float f}) +0:? 'anon@0' ( out block{layout( xfb_buffer=3 xfb_offset=36) gl_Position 4-component vector of float Position gl_Position, layout( xfb_buffer=3 xfb_offset=32) gl_PointSize float PointSize gl_PointSize, }) 0:? 'gl_VertexID' ( gl_VertexId int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.comp.out index 203c4b2..4ae77cc 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.comp.out @@ -1,18 +1,24 @@ 450.comp -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. +ERROR: 0:2: 'local_size_x' : must be at least 1 +ERROR: 0:5: 'shared' : not allowed in nested scope +ERROR: 2 compilation errors. No code generated. + Shader version: 450 local_size = (1, 1, 1) -0:? Sequence +ERROR: node is still EOpNull! +0:3 Function Definition: main( ( global void) +0:3 Function Parameters: 0:? Linker Objects Linked compute stage: -ERROR: Linking compute stage: Missing entry point: Each stage requires one entry point Shader version: 450 local_size = (1, 1, 1) -0:? Sequence +ERROR: node is still EOpNull! +0:3 Function Definition: main( ( global void) +0:3 Function Parameters: 0:? Linker Objects diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.frag.out index 297ae63..9cbb4cb 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.frag.out @@ -1,8 +1,11 @@ 450.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. +ERROR: 0:63: 'location' : cannot use in a block array where new locations are needed for each block element +ERROR: 0:68: 'early_fragment_tests' : can only apply to a standalone qualifier +ERROR: 2 compilation errors. No code generated. + Shader version: 450 -0:? Sequence +ERROR: node is still EOpNull! 0:8 Function Definition: main( ( global void) 0:8 Function Parameters: 0:10 Sequence @@ -160,13 +163,16 @@ Shader version: 450 0:? 'us2dmsa' ( uniform usampler2DMSArray) 0:? 'ii2dms' (layout( rgba32i) uniform iimage2DMS) 0:? 'i2dmsa' (layout( rgba32f) uniform image2DMSArray) +0:? 'bInst1' ( in block{layout( location=6) in float f, layout( location=7) in float g, layout( location=8) in 4X4 matrix of float m}) +0:? 'bInst2' ( in 3-element array of block{layout( location=12) in float f, layout( location=13) in float g}) +0:? 'f' ( smooth in float) Linked fragment stage: Shader version: 450 -0:? Sequence +ERROR: node is still EOpNull! 0:8 Function Definition: main( ( global void) 0:8 Function Parameters: 0:10 Sequence @@ -273,4 +279,7 @@ Shader version: 450 0:? 'us2dmsa' ( uniform usampler2DMSArray) 0:? 'ii2dms' (layout( rgba32i) uniform iimage2DMS) 0:? 'i2dmsa' (layout( rgba32f) uniform image2DMSArray) +0:? 'bInst1' ( in block{layout( location=6) in float f, layout( location=7) in float g, layout( location=8) in 4X4 matrix of float m}) +0:? 'bInst2' ( in 3-element array of block{layout( location=12) in float f, layout( location=13) in float g}) +0:? 'f' ( smooth in float) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.geom.out index 8d313c8..e75bf93 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.geom.out @@ -1,8 +1,8 @@ 450.geom -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:15: '[' : array index out of range '3' ERROR: 0:15: 'gl_Position' : no such field in structure -ERROR: 2 compilation errors. No code generated. +ERROR: 0:19: 'points' : can only apply to a standalone qualifier +ERROR: 3 compilation errors. No code generated. Shader version: 450 @@ -39,6 +39,7 @@ ERROR: node is still EOpNull! 0:? Linker Objects 0:? 'gl_in' ( in 3-element array of block{ in 3-element array of float CullDistance gl_CullDistance}) 0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) out 3-element array of float CullDistance gl_CullDistance}) +0:? 'f' ( in 3-element array of float) Linked geometry stage: @@ -80,4 +81,5 @@ ERROR: node is still EOpNull! 0:? Linker Objects 0:? 'gl_in' ( in 3-element array of block{ in 3-element array of float CullDistance gl_CullDistance}) 0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) out 3-element array of float CullDistance gl_CullDistance}) +0:? 'f' ( in 3-element array of float) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.tesc.out index 29da425..b3f4e25 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.tesc.out @@ -1,9 +1,11 @@ 450.tesc -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. +ERROR: 0:20: 'location' : cannot use in a block array where new locations are needed for each block element +ERROR: 1 compilation errors. No code generated. + Shader version: 450 vertices = -1 -0:? Sequence +ERROR: node is still EOpNull! 0:11 Function Definition: main( ( global void) 0:11 Function Parameters: 0:13 Sequence @@ -30,6 +32,8 @@ vertices = -1 0:? Linker Objects 0:? 'gl_in' ( in 32-element array of block{ in 3-element array of float CullDistance gl_CullDistance}) 0:? 'gl_out' ( out 4-element array of block{ out 3-element array of float CullDistance gl_CullDistance}) +0:? 'bInst1' ( out 2-element array of block{layout( location=4) out float f, layout( location=5) out float g}) +0:? 'bInst2' ( out 2-element array of 3-element array of block{layout( location=6) out float f, layout( location=7) out float g}) Linked tessellation control stage: @@ -38,7 +42,7 @@ ERROR: Linking tessellation control stage: At least one shader must specify an o Shader version: 450 vertices = -1 -0:? Sequence +ERROR: node is still EOpNull! 0:11 Function Definition: main( ( global void) 0:11 Function Parameters: 0:13 Sequence @@ -65,4 +69,6 @@ vertices = -1 0:? Linker Objects 0:? 'gl_in' ( in 32-element array of block{ in 3-element array of float CullDistance gl_CullDistance}) 0:? 'gl_out' ( out 4-element array of block{ out 3-element array of float CullDistance gl_CullDistance}) +0:? 'bInst1' ( out 2-element array of block{layout( location=4) out float f, layout( location=5) out float g}) +0:? 'bInst2' ( out 2-element array of 3-element array of block{layout( location=6) out float f, layout( location=7) out float g}) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.tese.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.tese.out index b7735e6..796d6f1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.tese.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.tese.out @@ -1,11 +1,18 @@ 450.tese -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. +ERROR: 0:16: 'equal_spacing' : can only apply to a standalone qualifier +ERROR: 0:17: 'fractional_even_spacing' : can only apply to a standalone qualifier +ERROR: 0:18: 'fractional_odd_spacing' : can only apply to a standalone qualifier +ERROR: 0:19: 'cw' : can only apply to a standalone qualifier +ERROR: 0:20: 'ccw' : can only apply to a standalone qualifier +ERROR: 0:21: 'point_mode' : can only apply to a standalone qualifier +ERROR: 6 compilation errors. No code generated. + Shader version: 450 input primitive = none vertex spacing = none triangle order = none -0:? Sequence +ERROR: node is still EOpNull! 0:11 Function Definition: main( ( global void) 0:11 Function Parameters: 0:13 Sequence @@ -30,6 +37,12 @@ triangle order = none 0:? Linker Objects 0:? 'gl_in' ( in 32-element array of block{ in 3-element array of float CullDistance gl_CullDistance}) 0:? 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance}) +0:? 'f1' ( in 32-element array of float) +0:? 'f2' ( in 32-element array of float) +0:? 'f3' ( in 32-element array of float) +0:? 'f4' ( in 32-element array of float) +0:? 'f5' ( in 32-element array of float) +0:? 'f6' ( in 32-element array of float) Linked tessellation evaluation stage: @@ -40,7 +53,7 @@ Shader version: 450 input primitive = none vertex spacing = equal_spacing triangle order = ccw -0:? Sequence +ERROR: node is still EOpNull! 0:11 Function Definition: main( ( global void) 0:11 Function Parameters: 0:13 Sequence @@ -65,4 +78,10 @@ triangle order = ccw 0:? Linker Objects 0:? 'gl_in' ( in 32-element array of block{ in 3-element array of float CullDistance gl_CullDistance}) 0:? 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance}) +0:? 'f1' ( in 32-element array of float) +0:? 'f2' ( in 32-element array of float) +0:? 'f3' ( in 32-element array of float) +0:? 'f4' ( in 32-element array of float) +0:? 'f5' ( in 32-element array of float) +0:? 'f6' ( in 32-element array of float) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.vert.out index cc300d9..0f5f231 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/450.vert.out @@ -1,9 +1,27 @@ 450.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:12: 'out' : cannot be bool ERROR: 0:13: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: outo -ERROR: 0:27: '::' : not supported -ERROR: 3 compilation errors. No code generated. +ERROR: 0:30: '::' : not supported +ERROR: 0:31: 'atomicCounterAdd' : no matching overloaded function found +ERROR: 0:32: 'atomicCounterSubtract' : no matching overloaded function found +ERROR: 0:33: 'atomicCounterMin' : no matching overloaded function found +ERROR: 0:34: 'atomicCounterMax' : no matching overloaded function found +ERROR: 0:35: 'atomicCounterAnd' : no matching overloaded function found +ERROR: 0:36: 'atomicCounterOr' : no matching overloaded function found +ERROR: 0:37: 'atomicCounterXor' : no matching overloaded function found +ERROR: 0:38: 'atomicCounterExchange' : no matching overloaded function found +ERROR: 0:39: 'atomicCounterCompSwap' : no matching overloaded function found +ERROR: 0:41: 'gl_BaseVertex' : undeclared identifier +ERROR: 0:41: 'gl_BaseInstance' : undeclared identifier +ERROR: 0:41: 'gl_DrawID' : undeclared identifier +ERROR: 0:41: '=' : cannot convert from ' temp float' to ' temp int' +ERROR: 0:44: 'anyInvocation' : no matching overloaded function found +ERROR: 0:45: 'allInvocations' : no matching overloaded function found +ERROR: 0:46: 'allInvocationsEqual' : no matching overloaded function found +ERROR: 0:48: 'extraneous semicolon' : not supported for this version or the enabled extensions +ERROR: 0:50: 'location' : cannot apply to uniform or buffer block +ERROR: 0:54: 'location' : cannot apply to uniform or buffer block +ERROR: 22 compilation errors. No code generated. Shader version: 450 @@ -21,8 +39,33 @@ ERROR: node is still EOpNull! 0:9 2 (const int) 0:9 Constant: 0:9 4.500000 -0:25 Function Definition: foo( ( global void) -0:25 Function Parameters: +0:28 Function Definition: foo( ( global void) +0:28 Function Parameters: +0:? Sequence +0:31 Constant: +0:31 0.000000 +0:32 Constant: +0:32 0.000000 +0:33 Constant: +0:33 0.000000 +0:34 Constant: +0:34 0.000000 +0:35 Constant: +0:35 0.000000 +0:36 Constant: +0:36 0.000000 +0:37 Constant: +0:37 0.000000 +0:38 Constant: +0:38 0.000000 +0:39 Constant: +0:39 0.000000 +0:44 Constant: +0:44 0.000000 +0:45 Constant: +0:45 0.000000 +0:46 Constant: +0:46 0.000000 0:? Linker Objects 0:? 'anon@0' ( out block{ out 3-element array of float CullDistance gl_CullDistance}) 0:? 'outb' ( smooth out bool) @@ -34,6 +77,10 @@ ERROR: node is still EOpNull! 0:? 'outsa' ( smooth out 4-element array of structure{ global float f}) 0:? 'outSA' ( smooth out structure{ global 4-element array of float f}) 0:? 'outSS' ( smooth out structure{ global float f, global structure{ global float f} s}) +0:? 'aui' (layout( binding=0 offset=0) uniform atomic_uint) +0:? 'ui' ( global uint) +0:? 'anon@1' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform int a}) +0:? 'anon@2' (layout( location=0 column_major shared) buffer block{layout( column_major shared) buffer int b}) 0:? 'gl_VertexID' ( gl_VertexId int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) @@ -67,6 +114,10 @@ ERROR: node is still EOpNull! 0:? 'outsa' ( smooth out 4-element array of structure{ global float f}) 0:? 'outSA' ( smooth out structure{ global 4-element array of float f}) 0:? 'outSS' ( smooth out structure{ global float f, global structure{ global float f} s}) +0:? 'aui' (layout( binding=0 offset=0) uniform atomic_uint) +0:? 'ui' ( global uint) +0:? 'anon@1' (layout( location=0 column_major shared) uniform block{layout( column_major shared) uniform int a}) +0:? 'anon@2' (layout( location=0 column_major shared) buffer block{layout( column_major shared) buffer int b}) 0:? 'gl_VertexID' ( gl_VertexId int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/atomic_uint.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/atomic_uint.frag.out index e0ba099..e2773f9 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/atomic_uint.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/atomic_uint.frag.out @@ -1,5 +1,4 @@ atomic_uint.frag -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:10: 'atomic_uint' : samplers and atomic_uints cannot be output parameters ERROR: 0:12: 'return' : type does not match, or is not convertible to, the function's return type ERROR: 0:18: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/badChars.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/badChars.frag.out index de9af0d..e3fec61 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/badChars.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/badChars.frag.out @@ -6,7 +6,7 @@ ERROR: 0:4: 'preprocessor evaluation' : bad expression ERROR: 0:4: '#if' : unexpected tokens following directive ERROR: 0:6: '€' : unexpected token ERROR: 0:7: 'string' : End of line in string -ERROR: 0:7: '' : syntax error +ERROR: 0:7: '' : syntax error, unexpected INT, expecting COMMA or SEMICOLON ERROR: 8 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/badMacroArgs.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/badMacroArgs.frag.out index 95937ce..5e6233f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/badMacroArgs.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/badMacroArgs.frag.out @@ -1,5 +1,4 @@ badMacroArgs.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:4: 'macro expansion' : Too few args in Macro m ERROR: 0:4: '' : compilation terminated ERROR: 2 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/comment.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/comment.frag.out index 57f2a1d..b1a00ff 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/comment.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/comment.frag.out @@ -1,5 +1,4 @@ comment.frag -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. WARNING: 0:10: 'line continuation' : used at end of comment; the following line is still part of the comment WARNING: 0:12: 'line continuation' : used at end of comment; the following line is still part of the comment diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/constFold.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/constFold.frag.out index 8c01468..33cfcba 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/constFold.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/constFold.frag.out @@ -1,5 +1,4 @@ constFold.frag -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:109: '[' : index out of range '-1' ERROR: 0:110: '[' : vector index out of range '4' ERROR: 0:111: '[' : index out of range '-2' @@ -179,7 +178,7 @@ ERROR: node is still EOpNull! 0:83 Constant: 0:83 2147483647 (const int) 0:84 Constant: -0:84 inf +0:84 +1.#INF 0:88 Constant: 0:88 2 (const uint) 0:88 3 (const uint) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppBad.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppBad.vert.out index d808e72..1a2286a 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppBad.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppBad.vert.out @@ -2,10 +2,9 @@ cppBad.vert ERROR: 0:2: 'preprocessor evaluation' : bad expression ERROR: 0:2: '#if' : unexpected tokens following directive ERROR: 0:5: 'string' : End of line in string -ERROR: 0:5: 'macro expansion' : expected '(' following n ERROR: 0:5: '""' : string literals not supported -ERROR: 0:5: '' : syntax error -ERROR: 6 compilation errors. No code generated. +ERROR: 0:5: '' : syntax error, unexpected INT, expecting COMMA or SEMICOLON +ERROR: 5 compilation errors. No code generated. Shader version: 100 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppIndent.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppIndent.vert.out index e6ff046..05eb244 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppIndent.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppIndent.vert.out @@ -1,6 +1,6 @@ cppIndent.vert ERROR: 0:61: 'macro expansion' : Too few args in Macro FUNC -ERROR: 0:61: '' : syntax error +ERROR: 0:61: '' : syntax error, unexpected COMMA ERROR: 2 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppSimple.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppSimple.vert.out index 0696c74..edb0c33 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppSimple.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/cppSimple.vert.out @@ -1,5 +1,4 @@ cppSimple.vert -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:77: '#error' : good1 ERROR: 0:81: '#error' : good2 ERROR: 0:85: '#error' : good3 @@ -76,10 +75,8 @@ ERROR: 12:20051: '#error' : good evaluation 1 ERROR: 12:20055: '#error' : good evaluation 2 ERROR: 12:9000: 'preprocessor evaluation' : expected ')' ERROR: 12:9002: '#if' : unexpected tokens following directive -ERROR: 12:9014: 'macro expansion' : expected '(' following FOOOM ERROR: 12:9014: 'FOOOM' : undeclared identifier ERROR: 12:9014: '=' : cannot convert from ' temp float' to ' global int' -ERROR: 12:9015: 'macro expansion' : expected '(' following FOOOM ERROR: 12:9016: 'preprocessor evaluation' : can't evaluate expression ERROR: 12:9016: 'preprocessor evaluation' : bad expression ERROR: 12:9500: 'preprocessor evaluation' : bad expression @@ -91,6 +88,8 @@ ERROR: 12:9504: '#if' : unexpected tokens following directive ERROR: 12:9506: '#error' : \ 377 ERROR: 12:9507: '#error' : \ 376 ERROR: 12:9508: '#error' : \ 377 +ERROR: 12:9602: 'defined' : cannot use in preprocessor expression when expanded from macros +ERROR: 12:9603: '#error' : DEF_DEFINED then ERROR: 12:10002: '' : missing #endif ERROR: 88 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/dce.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/dce.frag.out index 63d194c..6b02eb1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/dce.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/dce.frag.out @@ -1,6 +1,4 @@ dce.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - Shader version: 400 0:? Sequence 0:5 Sequence diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/functionSemantics.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/functionSemantics.frag.out index 6c5ebdc..d04e6e7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/functionSemantics.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/functionSemantics.frag.out @@ -1,5 +1,4 @@ functionSemantics.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:74: 'return' : cannot convert return value to function return type WARNING: 0:74: 'return' : type conversion on return values was not explicitly allowed until version 420 ERROR: 1 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.esversion.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.esversion.vert.out index 8e4b3b8..782865a 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.esversion.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.esversion.vert.out @@ -1,6 +1,5 @@ glspv.esversion.vert ERROR: #version: ES shaders for OpenGL SPIR-V are not supported -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 1 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.frag.out index daa1dc1..4939807 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.frag.out @@ -1,9 +1,13 @@ glspv.frag ERROR: 0:4: '#error' : GL_SPIRV is set ( correct , not an error ) ERROR: 0:6: '#error' : GL_SPIR is 100 -ERROR: 0:14: 'input_attachment_index' : only allowed when using GLSL for Vulkan -ERROR: 0:14: '' : syntax error -ERROR: 4 compilation errors. No code generated. +ERROR: 0:21: 'noise1' : no matching overloaded function found +ERROR: 0:22: 'noise2' : no matching overloaded function found +ERROR: 0:23: 'noise3' : no matching overloaded function found +ERROR: 0:24: 'noise4' : no matching overloaded function found +ERROR: 0:27: 'input_attachment_index' : only allowed when using GLSL for Vulkan +ERROR: 0:27: '' : syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON +ERROR: 8 compilation errors. No code generated. SPIR-V is not generated for failed compile or link diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.version.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.version.frag.out index 3e8e8c4..ba0d2b0 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.version.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.version.frag.out @@ -2,7 +2,7 @@ glspv.version.frag ERROR: #version: compilation for SPIR-V does not support the compatibility profile // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 6 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.vert.out index 5f6d9bb..f2fe53b 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/glspv.vert.out @@ -1,5 +1,4 @@ glspv.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:3: 'push_constant' : only allowed when using GLSL for Vulkan ERROR: 0:6: 'descriptor set' : only allowed when using GLSL for Vulkan ERROR: 0:8: 'shared' : not allowed when generating SPIR-V @@ -7,7 +6,7 @@ ERROR: 0:9: 'packed' : not allowed when generating SPIR-V ERROR: 0:13: 'gl_VertexIndex' : undeclared identifier ERROR: 0:14: 'gl_InstanceIndex' : undeclared identifier ERROR: 0:17: 'gl_DepthRangeParameters' : undeclared identifier -ERROR: 0:20: '' : syntax error +ERROR: 0:20: '' : syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON ERROR: 8 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.amend.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.amend.frag.out index 388d346..95d51ba 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.amend.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.amend.frag.out @@ -160,7 +160,7 @@ gl_FragCoord origin is upper left 0:? 'm' ( global 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 57 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.flatten.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.flatten.frag.out index 7385cea..36e7980 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.flatten.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.flatten.frag.out @@ -1,4 +1,5 @@ hlsl.array.flatten.frag +WARNING: AST will form illegal SPIR-V; need to transform to legalize Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence @@ -147,7 +148,7 @@ gl_FragCoord origin is upper left 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color}) 0:31 Sequence 0:31 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) 0:31 color: direct index for structure ( temp 4-component vector of float) 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color}) 0:31 Constant: @@ -167,7 +168,7 @@ gl_FragCoord origin is upper left 0:? 'g_samp_explicit[2]' (layout( binding=7) uniform sampler) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 3X3 matrix of float g_mats, layout( binding=10) uniform 4-element array of 3X3 matrix of float g_mats_explicit, uniform 4-element array of float g_floats}) 0:? 'not_flattened_a' ( global 5-element array of int) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -321,7 +322,7 @@ gl_FragCoord origin is upper left 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color}) 0:31 Sequence 0:31 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) 0:31 color: direct index for structure ( temp 4-component vector of float) 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color}) 0:31 Constant: @@ -341,17 +342,17 @@ gl_FragCoord origin is upper left 0:? 'g_samp_explicit[2]' (layout( binding=7) uniform sampler) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 3X3 matrix of float g_mats, layout( binding=10) uniform 4-element array of 3X3 matrix of float g_mats_explicit, uniform 4-element array of float g_floats}) 0:? 'not_flattened_a' ( global 5-element array of int) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 137 +// Generated by (magic number): 80003 +// Id's are bound by 143 Capability Shader Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 128 + EntryPoint Fragment 4 "main" 134 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -366,60 +367,62 @@ gl_FragCoord origin is upper left Name 34 "not_flattened_a" Name 42 "g_tex[1]" Name 45 "g_samp[1]" - Name 61 "local_sampler_array" - Name 63 "g_samp[0]" - Name 68 "g_samp[2]" - Name 71 "local_texture_array" - Name 72 "g_tex[0]" - Name 77 "g_tex[2]" - Name 83 "local_float_array" - Name 89 "$Global" - MemberName 89($Global) 0 "g_mats" - MemberName 89($Global) 1 "g_mats_explicit" - MemberName 89($Global) 2 "g_floats" - Name 91 "" - Name 105 "aggShadow" - Name 112 "aggShadow" - Name 123 "ps_output" - Name 124 "param" - Name 128 "color" - Name 131 "g_tex_explicit[0]" - Name 132 "g_tex_explicit[1]" - Name 133 "g_tex_explicit[2]" - Name 134 "g_samp_explicit[0]" - Name 135 "g_samp_explicit[1]" - Name 136 "g_samp_explicit[2]" + Name 63 "local_sampler_array" + Name 65 "g_samp[0]" + Name 70 "g_samp[2]" + Name 73 "local_texture_array" + Name 74 "g_tex[0]" + Name 79 "g_tex[2]" + Name 85 "local_float_array" + Name 91 "$Global" + MemberName 91($Global) 0 "g_mats" + MemberName 91($Global) 1 "g_mats_explicit" + MemberName 91($Global) 2 "g_floats" + Name 93 "" + Name 107 "aggShadow" + Name 114 "aggShadow" + Name 121 "param" + Name 123 "param" + Name 129 "ps_output" + Name 130 "param" + Name 134 "ps_output.color" + Name 137 "g_tex_explicit[0]" + Name 138 "g_tex_explicit[1]" + Name 139 "g_tex_explicit[2]" + Name 140 "g_samp_explicit[0]" + Name 141 "g_samp_explicit[1]" + Name 142 "g_samp_explicit[2]" Decorate 42(g_tex[1]) DescriptorSet 0 Decorate 45(g_samp[1]) DescriptorSet 0 - Decorate 63(g_samp[0]) DescriptorSet 0 - Decorate 68(g_samp[2]) DescriptorSet 0 - Decorate 72(g_tex[0]) DescriptorSet 0 - Decorate 77(g_tex[2]) DescriptorSet 0 - Decorate 86 ArrayStride 48 - Decorate 87 ArrayStride 48 - Decorate 88 ArrayStride 16 - MemberDecorate 89($Global) 0 RowMajor - MemberDecorate 89($Global) 0 Offset 0 - MemberDecorate 89($Global) 0 MatrixStride 16 - MemberDecorate 89($Global) 1 RowMajor - MemberDecorate 89($Global) 1 Offset 192 - MemberDecorate 89($Global) 1 MatrixStride 16 - MemberDecorate 89($Global) 2 Offset 384 - Decorate 89($Global) Block - Decorate 91 DescriptorSet 0 - Decorate 128(color) Location 0 - Decorate 131(g_tex_explicit[0]) DescriptorSet 0 - Decorate 131(g_tex_explicit[0]) Binding 1 - Decorate 132(g_tex_explicit[1]) DescriptorSet 0 - Decorate 132(g_tex_explicit[1]) Binding 2 - Decorate 133(g_tex_explicit[2]) DescriptorSet 0 - Decorate 133(g_tex_explicit[2]) Binding 3 - Decorate 134(g_samp_explicit[0]) DescriptorSet 0 - Decorate 134(g_samp_explicit[0]) Binding 5 - Decorate 135(g_samp_explicit[1]) DescriptorSet 0 - Decorate 135(g_samp_explicit[1]) Binding 6 - Decorate 136(g_samp_explicit[2]) DescriptorSet 0 - Decorate 136(g_samp_explicit[2]) Binding 7 + Decorate 65(g_samp[0]) DescriptorSet 0 + Decorate 70(g_samp[2]) DescriptorSet 0 + Decorate 74(g_tex[0]) DescriptorSet 0 + Decorate 79(g_tex[2]) DescriptorSet 0 + Decorate 88 ArrayStride 48 + Decorate 89 ArrayStride 48 + Decorate 90 ArrayStride 16 + MemberDecorate 91($Global) 0 RowMajor + MemberDecorate 91($Global) 0 Offset 0 + MemberDecorate 91($Global) 0 MatrixStride 16 + MemberDecorate 91($Global) 1 RowMajor + MemberDecorate 91($Global) 1 Offset 192 + MemberDecorate 91($Global) 1 MatrixStride 16 + MemberDecorate 91($Global) 2 Offset 384 + Decorate 91($Global) Block + Decorate 93 DescriptorSet 0 + Decorate 134(ps_output.color) Location 0 + Decorate 137(g_tex_explicit[0]) DescriptorSet 0 + Decorate 137(g_tex_explicit[0]) Binding 1 + Decorate 138(g_tex_explicit[1]) DescriptorSet 0 + Decorate 138(g_tex_explicit[1]) Binding 2 + Decorate 139(g_tex_explicit[2]) DescriptorSet 0 + Decorate 139(g_tex_explicit[2]) Binding 3 + Decorate 140(g_samp_explicit[0]) DescriptorSet 0 + Decorate 140(g_samp_explicit[0]) Binding 5 + Decorate 141(g_samp_explicit[1]) DescriptorSet 0 + Decorate 141(g_samp_explicit[1]) Binding 6 + Decorate 142(g_samp_explicit[2]) DescriptorSet 0 + Decorate 142(g_samp_explicit[2]) Binding 7 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -429,10 +432,10 @@ gl_FragCoord origin is upper left 12: TypeInt 32 0 13: 12(int) Constant 3 14: TypeArray 11 13 - 15: TypePointer UniformConstant 14 + 15: TypePointer Function 14 16: TypeSampler 17: TypeArray 16 13 - 18: TypePointer UniformConstant 17 + 18: TypePointer Function 17 19: TypeFunction 7(fvec4) 15(ptr) 18(ptr) 24(PS_OUTPUT): TypeStruct 7(fvec4) 25: TypePointer Function 24(PS_OUTPUT) @@ -454,48 +457,46 @@ gl_FragCoord origin is upper left 45(g_samp[1]): 44(ptr) Variable UniformConstant 47: TypeSampledImage 11 49: 6(float) Constant 1045220557 -61(local_sampler_array): 18(ptr) Variable UniformConstant - 62: 30(int) Constant 0 - 63(g_samp[0]): 44(ptr) Variable UniformConstant - 68(g_samp[2]): 44(ptr) Variable UniformConstant -71(local_texture_array): 15(ptr) Variable UniformConstant - 72(g_tex[0]): 41(ptr) Variable UniformConstant - 77(g_tex[2]): 41(ptr) Variable UniformConstant - 80: 12(int) Constant 4 - 81: TypeArray 6(float) 80 - 82: TypePointer Function 81 - 84: TypeVector 6(float) 3 - 85: TypeMatrix 84(fvec3) 3 - 86: TypeArray 85 80 - 87: TypeArray 85 80 - 88: TypeArray 6(float) 80 - 89($Global): TypeStruct 86 87 88 - 90: TypePointer Uniform 89($Global) - 91: 90(ptr) Variable Uniform - 92: TypePointer Uniform 88 - 96: TypePointer Function 6(float) - 105(aggShadow): 15(ptr) Variable UniformConstant - 112(aggShadow): 18(ptr) Variable UniformConstant - 121: TypePointer Function 7(fvec4) - 127: TypePointer Output 7(fvec4) - 128(color): 127(ptr) Variable Output -131(g_tex_explicit[0]): 41(ptr) Variable UniformConstant -132(g_tex_explicit[1]): 41(ptr) Variable UniformConstant -133(g_tex_explicit[2]): 41(ptr) Variable UniformConstant -134(g_samp_explicit[0]): 44(ptr) Variable UniformConstant -135(g_samp_explicit[1]): 44(ptr) Variable UniformConstant -136(g_samp_explicit[2]): 44(ptr) Variable UniformConstant + 53: TypePointer Function 11 + 56: TypePointer Function 16 + 64: 30(int) Constant 0 + 65(g_samp[0]): 44(ptr) Variable UniformConstant + 70(g_samp[2]): 44(ptr) Variable UniformConstant + 74(g_tex[0]): 41(ptr) Variable UniformConstant + 79(g_tex[2]): 41(ptr) Variable UniformConstant + 82: 12(int) Constant 4 + 83: TypeArray 6(float) 82 + 84: TypePointer Function 83 + 86: TypeVector 6(float) 3 + 87: TypeMatrix 86(fvec3) 3 + 88: TypeArray 87 82 + 89: TypeArray 87 82 + 90: TypeArray 6(float) 82 + 91($Global): TypeStruct 88 89 90 + 92: TypePointer Uniform 91($Global) + 93: 92(ptr) Variable Uniform + 94: TypePointer Uniform 90 + 98: TypePointer Function 6(float) + 127: TypePointer Function 7(fvec4) + 133: TypePointer Output 7(fvec4) +134(ps_output.color): 133(ptr) Variable Output +137(g_tex_explicit[0]): 41(ptr) Variable UniformConstant +138(g_tex_explicit[1]): 41(ptr) Variable UniformConstant +139(g_tex_explicit[2]): 41(ptr) Variable UniformConstant +140(g_samp_explicit[0]): 44(ptr) Variable UniformConstant +141(g_samp_explicit[1]): 44(ptr) Variable UniformConstant +142(g_samp_explicit[2]): 44(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label - 123(ps_output): 25(ptr) Variable Function - 124(param): 25(ptr) Variable Function + 129(ps_output): 25(ptr) Variable Function + 130(param): 25(ptr) Variable Function Store 34(not_flattened_a) 40 - 125: 2 FunctionCall 28(@main(struct-PS_OUTPUT-vf41;) 124(param) - 126:24(PS_OUTPUT) Load 124(param) - Store 123(ps_output) 126 - 129: 121(ptr) AccessChain 123(ps_output) 62 - 130: 7(fvec4) Load 129 - Store 128(color) 130 + 131: 2 FunctionCall 28(@main(struct-PS_OUTPUT-vf41;) 130(param) + 132:24(PS_OUTPUT) Load 130(param) + Store 129(ps_output) 132 + 135: 127(ptr) AccessChain 129(ps_output) 64 + 136: 7(fvec4) Load 135 + Store 134(ps_output.color) 136 Return FunctionEnd 9(TestFn1(): 7(fvec4) Function None 8 @@ -510,72 +511,82 @@ gl_FragCoord origin is upper left 20(l_tex): 15(ptr) FunctionParameter 21(l_samp): 18(ptr) FunctionParameter 23: Label - 53: 41(ptr) AccessChain 20(l_tex) 36 - 54: 11 Load 53 - 55: 44(ptr) AccessChain 21(l_samp) 36 - 56: 16 Load 55 - 57: 47 SampledImage 54 56 - 58: 7(fvec4) ImageSampleImplicitLod 57 49 - ReturnValue 58 + 54: 53(ptr) AccessChain 20(l_tex) 36 + 55: 11 Load 54 + 57: 56(ptr) AccessChain 21(l_samp) 36 + 58: 16 Load 57 + 59: 47 SampledImage 55 58 + 60: 7(fvec4) ImageSampleImplicitLod 59 49 + ReturnValue 60 FunctionEnd 28(@main(struct-PS_OUTPUT-vf41;): 2 Function None 26 27(ps_output): 25(ptr) FunctionParameter 29: Label -83(local_float_array): 82(ptr) Variable Function - 64: 16 Load 63(g_samp[0]) - 65: 44(ptr) AccessChain 61(local_sampler_array) 62 - Store 65 64 - 66: 16 Load 45(g_samp[1]) - 67: 44(ptr) AccessChain 61(local_sampler_array) 35 +63(local_sampler_array): 18(ptr) Variable Function +73(local_texture_array): 15(ptr) Variable Function +85(local_float_array): 84(ptr) Variable Function + 107(aggShadow): 15(ptr) Variable Function + 114(aggShadow): 18(ptr) Variable Function + 121(param): 15(ptr) Variable Function + 123(param): 18(ptr) Variable Function + 66: 16 Load 65(g_samp[0]) + 67: 56(ptr) AccessChain 63(local_sampler_array) 64 Store 67 66 - 69: 16 Load 68(g_samp[2]) - 70: 44(ptr) AccessChain 61(local_sampler_array) 36 - Store 70 69 - 73: 11 Load 72(g_tex[0]) - 74: 41(ptr) AccessChain 71(local_texture_array) 62 - Store 74 73 - 75: 11 Load 42(g_tex[1]) - 76: 41(ptr) AccessChain 71(local_texture_array) 35 + 68: 16 Load 45(g_samp[1]) + 69: 56(ptr) AccessChain 63(local_sampler_array) 35 + Store 69 68 + 71: 16 Load 70(g_samp[2]) + 72: 56(ptr) AccessChain 63(local_sampler_array) 36 + Store 72 71 + 75: 11 Load 74(g_tex[0]) + 76: 53(ptr) AccessChain 73(local_texture_array) 64 Store 76 75 - 78: 11 Load 77(g_tex[2]) - 79: 41(ptr) AccessChain 71(local_texture_array) 36 - Store 79 78 - 93: 92(ptr) AccessChain 91 36 - 94: 88 Load 93 - 95: 6(float) CompositeExtract 94 0 - 97: 96(ptr) AccessChain 83(local_float_array) 62 - Store 97 95 - 98: 6(float) CompositeExtract 94 1 - 99: 96(ptr) AccessChain 83(local_float_array) 35 - Store 99 98 - 100: 6(float) CompositeExtract 94 2 - 101: 96(ptr) AccessChain 83(local_float_array) 36 + 77: 11 Load 42(g_tex[1]) + 78: 53(ptr) AccessChain 73(local_texture_array) 35 + Store 78 77 + 80: 11 Load 79(g_tex[2]) + 81: 53(ptr) AccessChain 73(local_texture_array) 36 + Store 81 80 + 95: 94(ptr) AccessChain 93 36 + 96: 90 Load 95 + 97: 6(float) CompositeExtract 96 0 + 99: 98(ptr) AccessChain 85(local_float_array) 64 + Store 99 97 + 100: 6(float) CompositeExtract 96 1 + 101: 98(ptr) AccessChain 85(local_float_array) 35 Store 101 100 - 102: 6(float) CompositeExtract 94 3 - 103: 96(ptr) AccessChain 83(local_float_array) 37 + 102: 6(float) CompositeExtract 96 2 + 103: 98(ptr) AccessChain 85(local_float_array) 36 Store 103 102 - 104: 7(fvec4) FunctionCall 9(TestFn1() - 106: 11 Load 72(g_tex[0]) - 107: 41(ptr) AccessChain 105(aggShadow) 62 - Store 107 106 - 108: 11 Load 42(g_tex[1]) - 109: 41(ptr) AccessChain 105(aggShadow) 35 + 104: 6(float) CompositeExtract 96 3 + 105: 98(ptr) AccessChain 85(local_float_array) 37 + Store 105 104 + 106: 7(fvec4) FunctionCall 9(TestFn1() + 108: 11 Load 74(g_tex[0]) + 109: 53(ptr) AccessChain 107(aggShadow) 64 Store 109 108 - 110: 11 Load 77(g_tex[2]) - 111: 41(ptr) AccessChain 105(aggShadow) 36 + 110: 11 Load 42(g_tex[1]) + 111: 53(ptr) AccessChain 107(aggShadow) 35 Store 111 110 - 113: 16 Load 63(g_samp[0]) - 114: 44(ptr) AccessChain 112(aggShadow) 62 - Store 114 113 - 115: 16 Load 45(g_samp[1]) - 116: 44(ptr) AccessChain 112(aggShadow) 35 + 112: 11 Load 79(g_tex[2]) + 113: 53(ptr) AccessChain 107(aggShadow) 36 + Store 113 112 + 115: 16 Load 65(g_samp[0]) + 116: 56(ptr) AccessChain 114(aggShadow) 64 Store 116 115 - 117: 16 Load 68(g_samp[2]) - 118: 44(ptr) AccessChain 112(aggShadow) 36 + 117: 16 Load 45(g_samp[1]) + 118: 56(ptr) AccessChain 114(aggShadow) 35 Store 118 117 - 119: 7(fvec4) FunctionCall 22(TestFn2(t11[3];p1[3];) 105(aggShadow) 112(aggShadow) - 120: 7(fvec4) FAdd 104 119 - 122: 121(ptr) AccessChain 27(ps_output) 62 - Store 122 120 + 119: 16 Load 70(g_samp[2]) + 120: 56(ptr) AccessChain 114(aggShadow) 36 + Store 120 119 + 122: 14 Load 107(aggShadow) + Store 121(param) 122 + 124: 17 Load 114(aggShadow) + Store 123(param) 124 + 125: 7(fvec4) FunctionCall 22(TestFn2(t11[3];p1[3];) 121(param) 123(param) + 126: 7(fvec4) FAdd 106 125 + 128: 127(ptr) AccessChain 27(ps_output) 64 + Store 128 126 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.frag.out index c0c5a13..ccf8c69 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.frag.out @@ -2,74 +2,144 @@ hlsl.array.frag Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:8 Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) -0:8 Function Parameters: -0:8 'i' ( in int) -0:8 'input' ( in 3-element array of 4-component vector of float) +0:7 Sequence +0:7 move second child to first child ( temp 4-component vector of float) +0:7 'C' ( global 4-component vector of float) +0:? Constant: +0:? 1.000000 +0:? 2.000000 +0:? 3.000000 +0:? 4.000000 +0:11 Sequence +0:11 move second child to first child ( temp 2-element array of 4-component vector of float) +0:11 'c2' ( global 2-element array of 4-component vector of float) +0:11 Construct vec4 ( temp 2-element array of 4-component vector of float) +0:11 'C' ( global 4-component vector of float) +0:? Constant: +0:? 1.000000 +0:? 2.000000 +0:? 3.000000 +0:? 4.000000 +0:14 Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) +0:14 Function Parameters: +0:14 'i' ( in int) +0:14 'input' ( in 3-element array of 4-component vector of float) 0:? Sequence -0:10 Branch: Return with expression -0:10 add ( temp 4-component vector of float) -0:10 add ( temp 4-component vector of float) -0:10 add ( temp 4-component vector of float) -0:10 add ( temp 4-component vector of float) -0:10 add ( temp 4-component vector of float) -0:10 add ( temp 4-component vector of float) -0:10 direct index ( temp 4-component vector of float) -0:10 a: direct index for structure ( uniform 4-element array of 4-component vector of float) -0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) -0:10 Constant: -0:10 0 (const uint) -0:10 Constant: -0:10 1 (const int) -0:10 indirect index ( temp 4-component vector of float) -0:10 a: direct index for structure ( uniform 4-element array of 4-component vector of float) -0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) -0:10 Constant: -0:10 0 (const uint) -0:10 'i' ( in int) -0:10 direct index ( temp 4-component vector of float) -0:10 'input' ( in 3-element array of 4-component vector of float) -0:10 Constant: -0:10 2 (const int) -0:10 indirect index ( temp 4-component vector of float) -0:10 'input' ( in 3-element array of 4-component vector of float) -0:10 'i' ( in int) -0:10 direct index ( temp 4-component vector of float) -0:10 'b' ( temp 10-element array of 4-component vector of float) -0:10 Constant: -0:10 5 (const int) -0:10 indirect index ( temp 4-component vector of float) -0:10 'b' ( temp 10-element array of 4-component vector of float) -0:10 'i' ( in int) -0:10 indirect index ( temp 4-component vector of float) -0:10 m: direct index for structure ( temp 7-element array of 4-component vector of float) -0:10 indirect index ( temp structure{ temp 7-element array of 4-component vector of float m}) -0:10 s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m}) -0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) -0:10 Constant: -0:10 1 (const uint) -0:10 'i' ( in int) -0:10 Constant: -0:10 0 (const int) -0:10 'i' ( in int) -0:8 Function Definition: PixelShaderFunction( ( temp void) -0:8 Function Parameters: +0:15 Sequence +0:15 move second child to first child ( temp 10-element array of 4-component vector of float) +0:15 'b' ( temp 10-element array of 4-component vector of float) +0:15 Construct vec4 ( temp 10-element array of 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:16 Sequence +0:16 move second child to first child ( temp 4-component vector of float) +0:16 'tmp' ( temp 4-component vector of float) +0:16 add ( temp 4-component vector of float) +0:16 add ( temp 4-component vector of float) +0:16 add ( temp 4-component vector of float) +0:16 add ( temp 4-component vector of float) +0:16 'C' ( global 4-component vector of float) +0:16 direct index ( temp 4-component vector of float) +0:16 a1: direct index for structure ( uniform 1-element array of 4-component vector of float) +0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:16 Constant: +0:16 2 (const uint) +0:16 Constant: +0:16 0 (const int) +0:16 Constant: +0:16 1.000000 +0:16 2.000000 +0:16 3.000000 +0:16 4.000000 +0:16 indirect index ( temp 4-component vector of float) +0:16 a2: direct index for structure ( uniform 2-element array of 4-component vector of float) +0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:16 Constant: +0:16 3 (const uint) +0:16 'i' ( in int) +0:16 indirect index ( temp 4-component vector of float) +0:16 'c2' ( global 2-element array of 4-component vector of float) +0:16 'i' ( in int) +0:17 Branch: Return with expression +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 direct index ( temp 4-component vector of float) +0:17 a: direct index for structure ( uniform 4-element array of 4-component vector of float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:17 Constant: +0:17 0 (const uint) +0:17 Constant: +0:17 1 (const int) +0:17 indirect index ( temp 4-component vector of float) +0:17 a: direct index for structure ( uniform 4-element array of 4-component vector of float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:17 Constant: +0:17 0 (const uint) +0:17 'i' ( in int) +0:17 direct index ( temp 4-component vector of float) +0:17 'input' ( in 3-element array of 4-component vector of float) +0:17 Constant: +0:17 2 (const int) +0:17 indirect index ( temp 4-component vector of float) +0:17 'input' ( in 3-element array of 4-component vector of float) +0:17 'i' ( in int) +0:17 direct index ( temp 4-component vector of float) +0:17 'b' ( temp 10-element array of 4-component vector of float) +0:17 Constant: +0:17 5 (const int) +0:17 indirect index ( temp 4-component vector of float) +0:17 'b' ( temp 10-element array of 4-component vector of float) +0:17 'i' ( in int) +0:17 indirect index ( temp 4-component vector of float) +0:17 m: direct index for structure ( temp 7-element array of 4-component vector of float) +0:17 indirect index ( temp structure{ temp 7-element array of 4-component vector of float m}) +0:17 s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m}) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:17 Constant: +0:17 1 (const uint) +0:17 'i' ( in int) +0:17 Constant: +0:17 0 (const int) +0:17 'i' ( in int) +0:17 'tmp' ( temp 4-component vector of float) +0:14 Function Definition: PixelShaderFunction( ( temp void) +0:14 Function Parameters: 0:? Sequence -0:8 move second child to first child ( temp int) +0:14 move second child to first child ( temp int) 0:? 'i' ( temp int) -0:? 'i' (layout( location=0) in int) -0:8 move second child to first child ( temp 3-element array of 4-component vector of float) +0:? 'i' (layout( location=0) flat in int) +0:14 move second child to first child ( temp 3-element array of 4-component vector of float) 0:? 'input' ( temp 3-element array of 4-component vector of float) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) -0:8 move second child to first child ( temp 4-component vector of float) +0:14 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:8 Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) +0:14 Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) 0:? 'i' ( temp int) 0:? 'input' ( temp 3-element array of 4-component vector of float) 0:? Linker Objects -0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) +0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:? 'C' ( global 4-component vector of float) +0:? 'c1' ( const 1-element array of 4-component vector of float) +0:? 1.000000 +0:? 2.000000 +0:? 3.000000 +0:? 4.000000 +0:? 'c2' ( global 2-element array of 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) @@ -79,115 +149,195 @@ Linked fragment stage: Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:8 Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) -0:8 Function Parameters: -0:8 'i' ( in int) -0:8 'input' ( in 3-element array of 4-component vector of float) +0:7 Sequence +0:7 move second child to first child ( temp 4-component vector of float) +0:7 'C' ( global 4-component vector of float) +0:? Constant: +0:? 1.000000 +0:? 2.000000 +0:? 3.000000 +0:? 4.000000 +0:11 Sequence +0:11 move second child to first child ( temp 2-element array of 4-component vector of float) +0:11 'c2' ( global 2-element array of 4-component vector of float) +0:11 Construct vec4 ( temp 2-element array of 4-component vector of float) +0:11 'C' ( global 4-component vector of float) +0:? Constant: +0:? 1.000000 +0:? 2.000000 +0:? 3.000000 +0:? 4.000000 +0:14 Function Definition: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) +0:14 Function Parameters: +0:14 'i' ( in int) +0:14 'input' ( in 3-element array of 4-component vector of float) 0:? Sequence -0:10 Branch: Return with expression -0:10 add ( temp 4-component vector of float) -0:10 add ( temp 4-component vector of float) -0:10 add ( temp 4-component vector of float) -0:10 add ( temp 4-component vector of float) -0:10 add ( temp 4-component vector of float) -0:10 add ( temp 4-component vector of float) -0:10 direct index ( temp 4-component vector of float) -0:10 a: direct index for structure ( uniform 4-element array of 4-component vector of float) -0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) -0:10 Constant: -0:10 0 (const uint) -0:10 Constant: -0:10 1 (const int) -0:10 indirect index ( temp 4-component vector of float) -0:10 a: direct index for structure ( uniform 4-element array of 4-component vector of float) -0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) -0:10 Constant: -0:10 0 (const uint) -0:10 'i' ( in int) -0:10 direct index ( temp 4-component vector of float) -0:10 'input' ( in 3-element array of 4-component vector of float) -0:10 Constant: -0:10 2 (const int) -0:10 indirect index ( temp 4-component vector of float) -0:10 'input' ( in 3-element array of 4-component vector of float) -0:10 'i' ( in int) -0:10 direct index ( temp 4-component vector of float) -0:10 'b' ( temp 10-element array of 4-component vector of float) -0:10 Constant: -0:10 5 (const int) -0:10 indirect index ( temp 4-component vector of float) -0:10 'b' ( temp 10-element array of 4-component vector of float) -0:10 'i' ( in int) -0:10 indirect index ( temp 4-component vector of float) -0:10 m: direct index for structure ( temp 7-element array of 4-component vector of float) -0:10 indirect index ( temp structure{ temp 7-element array of 4-component vector of float m}) -0:10 s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m}) -0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) -0:10 Constant: -0:10 1 (const uint) -0:10 'i' ( in int) -0:10 Constant: -0:10 0 (const int) -0:10 'i' ( in int) -0:8 Function Definition: PixelShaderFunction( ( temp void) -0:8 Function Parameters: +0:15 Sequence +0:15 move second child to first child ( temp 10-element array of 4-component vector of float) +0:15 'b' ( temp 10-element array of 4-component vector of float) +0:15 Construct vec4 ( temp 10-element array of 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:15 'C' ( global 4-component vector of float) +0:16 Sequence +0:16 move second child to first child ( temp 4-component vector of float) +0:16 'tmp' ( temp 4-component vector of float) +0:16 add ( temp 4-component vector of float) +0:16 add ( temp 4-component vector of float) +0:16 add ( temp 4-component vector of float) +0:16 add ( temp 4-component vector of float) +0:16 'C' ( global 4-component vector of float) +0:16 direct index ( temp 4-component vector of float) +0:16 a1: direct index for structure ( uniform 1-element array of 4-component vector of float) +0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:16 Constant: +0:16 2 (const uint) +0:16 Constant: +0:16 0 (const int) +0:16 Constant: +0:16 1.000000 +0:16 2.000000 +0:16 3.000000 +0:16 4.000000 +0:16 indirect index ( temp 4-component vector of float) +0:16 a2: direct index for structure ( uniform 2-element array of 4-component vector of float) +0:16 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:16 Constant: +0:16 3 (const uint) +0:16 'i' ( in int) +0:16 indirect index ( temp 4-component vector of float) +0:16 'c2' ( global 2-element array of 4-component vector of float) +0:16 'i' ( in int) +0:17 Branch: Return with expression +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 add ( temp 4-component vector of float) +0:17 direct index ( temp 4-component vector of float) +0:17 a: direct index for structure ( uniform 4-element array of 4-component vector of float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:17 Constant: +0:17 0 (const uint) +0:17 Constant: +0:17 1 (const int) +0:17 indirect index ( temp 4-component vector of float) +0:17 a: direct index for structure ( uniform 4-element array of 4-component vector of float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:17 Constant: +0:17 0 (const uint) +0:17 'i' ( in int) +0:17 direct index ( temp 4-component vector of float) +0:17 'input' ( in 3-element array of 4-component vector of float) +0:17 Constant: +0:17 2 (const int) +0:17 indirect index ( temp 4-component vector of float) +0:17 'input' ( in 3-element array of 4-component vector of float) +0:17 'i' ( in int) +0:17 direct index ( temp 4-component vector of float) +0:17 'b' ( temp 10-element array of 4-component vector of float) +0:17 Constant: +0:17 5 (const int) +0:17 indirect index ( temp 4-component vector of float) +0:17 'b' ( temp 10-element array of 4-component vector of float) +0:17 'i' ( in int) +0:17 indirect index ( temp 4-component vector of float) +0:17 m: direct index for structure ( temp 7-element array of 4-component vector of float) +0:17 indirect index ( temp structure{ temp 7-element array of 4-component vector of float m}) +0:17 s: direct index for structure ( uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m}) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:17 Constant: +0:17 1 (const uint) +0:17 'i' ( in int) +0:17 Constant: +0:17 0 (const int) +0:17 'i' ( in int) +0:17 'tmp' ( temp 4-component vector of float) +0:14 Function Definition: PixelShaderFunction( ( temp void) +0:14 Function Parameters: 0:? Sequence -0:8 move second child to first child ( temp int) +0:14 move second child to first child ( temp int) 0:? 'i' ( temp int) -0:? 'i' (layout( location=0) in int) -0:8 move second child to first child ( temp 3-element array of 4-component vector of float) +0:? 'i' (layout( location=0) flat in int) +0:14 move second child to first child ( temp 3-element array of 4-component vector of float) 0:? 'input' ( temp 3-element array of 4-component vector of float) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) -0:8 move second child to first child ( temp 4-component vector of float) +0:14 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:8 Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) +0:14 Function Call: @PixelShaderFunction(i1;vf4[3]; ( temp 4-component vector of float) 0:? 'i' ( temp int) 0:? 'input' ( temp 3-element array of 4-component vector of float) 0:? Linker Objects -0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s}) +0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 4-component vector of float a, uniform 11-element array of structure{ temp 7-element array of 4-component vector of float m} s, uniform 1-element array of 4-component vector of float a1, uniform 2-element array of 4-component vector of float a2}) +0:? 'C' ( global 4-component vector of float) +0:? 'c1' ( const 1-element array of 4-component vector of float) +0:? 1.000000 +0:? 2.000000 +0:? 3.000000 +0:? 4.000000 +0:? 'c2' ( global 2-element array of 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 81 +// Generated by (magic number): 80003 +// Id's are bound by 126 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "PixelShaderFunction" 68 72 75 + EntryPoint Fragment 4 "PixelShaderFunction" 112 116 119 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "PixelShaderFunction" Name 17 "@PixelShaderFunction(i1;vf4[3];" Name 15 "i" Name 16 "input" - Name 23 "" - MemberName 23 0 "m" - Name 26 "$Global" - MemberName 26($Global) 0 "a" - MemberName 26($Global) 1 "s" - Name 28 "" - Name 50 "b" - Name 66 "i" - Name 68 "i" - Name 70 "input" - Name 72 "input" - Name 75 "@entryPointOutput" - Name 76 "param" - Name 78 "param" - Decorate 20 ArrayStride 16 - Decorate 22 ArrayStride 16 - MemberDecorate 23 0 Offset 0 - Decorate 25 ArrayStride 112 - MemberDecorate 26($Global) 0 Offset 0 - MemberDecorate 26($Global) 1 Offset 64 - Decorate 26($Global) Block - Decorate 28 DescriptorSet 0 - Decorate 68(i) Location 0 - Decorate 72(input) Location 1 - Decorate 75(@entryPointOutput) Location 0 + Name 20 "C" + Name 29 "c2" + Name 35 "b" + Name 48 "tmp" + Name 54 "" + MemberName 54 0 "m" + Name 60 "$Global" + MemberName 60($Global) 0 "a" + MemberName 60($Global) 1 "s" + MemberName 60($Global) 2 "a1" + MemberName 60($Global) 3 "a2" + Name 62 "" + Name 110 "i" + Name 112 "i" + Name 114 "input" + Name 116 "input" + Name 119 "@entryPointOutput" + Name 120 "param" + Name 122 "param" + Decorate 51 ArrayStride 16 + Decorate 53 ArrayStride 16 + MemberDecorate 54 0 Offset 0 + Decorate 56 ArrayStride 112 + Decorate 58 ArrayStride 16 + Decorate 59 ArrayStride 16 + MemberDecorate 60($Global) 0 Offset 0 + MemberDecorate 60($Global) 1 Offset 64 + MemberDecorate 60($Global) 2 Offset 1296 + MemberDecorate 60($Global) 3 Offset 1312 + Decorate 60($Global) Block + Decorate 62 DescriptorSet 0 + Decorate 112(i) Flat + Decorate 112(i) Location 0 + Decorate 116(input) Location 1 + Decorate 119(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -199,78 +349,127 @@ gl_FragCoord origin is upper left 12: TypeArray 9(fvec4) 11 13: TypePointer Function 12 14: TypeFunction 9(fvec4) 7(ptr) 13(ptr) - 19: 10(int) Constant 4 - 20: TypeArray 9(fvec4) 19 - 21: 10(int) Constant 7 - 22: TypeArray 9(fvec4) 21 - 23: TypeStruct 22 - 24: 10(int) Constant 11 - 25: TypeArray 23(struct) 24 - 26($Global): TypeStruct 20 25 - 27: TypePointer Uniform 26($Global) - 28: 27(ptr) Variable Uniform - 29: 6(int) Constant 0 - 30: 6(int) Constant 1 - 31: TypePointer Uniform 9(fvec4) - 38: 6(int) Constant 2 - 39: TypePointer Function 9(fvec4) - 47: 10(int) Constant 10 - 48: TypeArray 9(fvec4) 47 - 49: TypePointer Function 48 - 51: 6(int) Constant 5 - 67: TypePointer Input 6(int) - 68(i): 67(ptr) Variable Input - 71: TypePointer Input 12 - 72(input): 71(ptr) Variable Input - 74: TypePointer Output 9(fvec4) -75(@entryPointOutput): 74(ptr) Variable Output + 19: TypePointer Private 9(fvec4) + 20(C): 19(ptr) Variable Private + 21: 8(float) Constant 1065353216 + 22: 8(float) Constant 1073741824 + 23: 8(float) Constant 1077936128 + 24: 8(float) Constant 1082130432 + 25: 9(fvec4) ConstantComposite 21 22 23 24 + 26: 10(int) Constant 2 + 27: TypeArray 9(fvec4) 26 + 28: TypePointer Private 27 + 29(c2): 28(ptr) Variable Private + 32: 10(int) Constant 10 + 33: TypeArray 9(fvec4) 32 + 34: TypePointer Function 33 + 47: TypePointer Function 9(fvec4) + 50: 10(int) Constant 4 + 51: TypeArray 9(fvec4) 50 + 52: 10(int) Constant 7 + 53: TypeArray 9(fvec4) 52 + 54: TypeStruct 53 + 55: 10(int) Constant 11 + 56: TypeArray 54(struct) 55 + 57: 10(int) Constant 1 + 58: TypeArray 9(fvec4) 57 + 59: TypeArray 9(fvec4) 26 + 60($Global): TypeStruct 51 56 58 59 + 61: TypePointer Uniform 60($Global) + 62: 61(ptr) Variable Uniform + 63: 6(int) Constant 2 + 64: 6(int) Constant 0 + 65: TypePointer Uniform 9(fvec4) + 70: 6(int) Constant 3 + 79: 6(int) Constant 1 + 93: 6(int) Constant 5 + 111: TypePointer Input 6(int) + 112(i): 111(ptr) Variable Input + 115: TypePointer Input 12 + 116(input): 115(ptr) Variable Input + 118: TypePointer Output 9(fvec4) +119(@entryPointOutput): 118(ptr) Variable Output + 125: 58 ConstantComposite 25 4(PixelShaderFunction): 2 Function None 3 5: Label - 66(i): 7(ptr) Variable Function - 70(input): 13(ptr) Variable Function - 76(param): 7(ptr) Variable Function - 78(param): 13(ptr) Variable Function - 69: 6(int) Load 68(i) - Store 66(i) 69 - 73: 12 Load 72(input) - Store 70(input) 73 - 77: 6(int) Load 66(i) - Store 76(param) 77 - 79: 12 Load 70(input) - Store 78(param) 79 - 80: 9(fvec4) FunctionCall 17(@PixelShaderFunction(i1;vf4[3];) 76(param) 78(param) - Store 75(@entryPointOutput) 80 + 110(i): 7(ptr) Variable Function + 114(input): 13(ptr) Variable Function + 120(param): 7(ptr) Variable Function + 122(param): 13(ptr) Variable Function + Store 20(C) 25 + 30: 9(fvec4) Load 20(C) + 31: 27 CompositeConstruct 30 25 + Store 29(c2) 31 + 113: 6(int) Load 112(i) + Store 110(i) 113 + 117: 12 Load 116(input) + Store 114(input) 117 + 121: 6(int) Load 110(i) + Store 120(param) 121 + 123: 12 Load 114(input) + Store 122(param) 123 + 124: 9(fvec4) FunctionCall 17(@PixelShaderFunction(i1;vf4[3];) 120(param) 122(param) + Store 119(@entryPointOutput) 124 Return FunctionEnd 17(@PixelShaderFunction(i1;vf4[3];): 9(fvec4) Function None 14 15(i): 7(ptr) FunctionParameter 16(input): 13(ptr) FunctionParameter 18: Label - 50(b): 49(ptr) Variable Function - 32: 31(ptr) AccessChain 28 29 30 - 33: 9(fvec4) Load 32 - 34: 6(int) Load 15(i) - 35: 31(ptr) AccessChain 28 29 34 - 36: 9(fvec4) Load 35 - 37: 9(fvec4) FAdd 33 36 - 40: 39(ptr) AccessChain 16(input) 38 - 41: 9(fvec4) Load 40 - 42: 9(fvec4) FAdd 37 41 - 43: 6(int) Load 15(i) - 44: 39(ptr) AccessChain 16(input) 43 - 45: 9(fvec4) Load 44 - 46: 9(fvec4) FAdd 42 45 - 52: 39(ptr) AccessChain 50(b) 51 - 53: 9(fvec4) Load 52 - 54: 9(fvec4) FAdd 46 53 - 55: 6(int) Load 15(i) - 56: 39(ptr) AccessChain 50(b) 55 - 57: 9(fvec4) Load 56 - 58: 9(fvec4) FAdd 54 57 - 59: 6(int) Load 15(i) - 60: 6(int) Load 15(i) - 61: 31(ptr) AccessChain 28 30 59 29 60 - 62: 9(fvec4) Load 61 - 63: 9(fvec4) FAdd 58 62 - ReturnValue 63 + 35(b): 34(ptr) Variable Function + 48(tmp): 47(ptr) Variable Function + 36: 9(fvec4) Load 20(C) + 37: 9(fvec4) Load 20(C) + 38: 9(fvec4) Load 20(C) + 39: 9(fvec4) Load 20(C) + 40: 9(fvec4) Load 20(C) + 41: 9(fvec4) Load 20(C) + 42: 9(fvec4) Load 20(C) + 43: 9(fvec4) Load 20(C) + 44: 9(fvec4) Load 20(C) + 45: 9(fvec4) Load 20(C) + 46: 33 CompositeConstruct 36 37 38 39 40 41 42 43 44 45 + Store 35(b) 46 + 49: 9(fvec4) Load 20(C) + 66: 65(ptr) AccessChain 62 63 64 + 67: 9(fvec4) Load 66 + 68: 9(fvec4) FAdd 49 67 + 69: 9(fvec4) FAdd 68 25 + 71: 6(int) Load 15(i) + 72: 65(ptr) AccessChain 62 70 71 + 73: 9(fvec4) Load 72 + 74: 9(fvec4) FAdd 69 73 + 75: 6(int) Load 15(i) + 76: 19(ptr) AccessChain 29(c2) 75 + 77: 9(fvec4) Load 76 + 78: 9(fvec4) FAdd 74 77 + Store 48(tmp) 78 + 80: 65(ptr) AccessChain 62 64 79 + 81: 9(fvec4) Load 80 + 82: 6(int) Load 15(i) + 83: 65(ptr) AccessChain 62 64 82 + 84: 9(fvec4) Load 83 + 85: 9(fvec4) FAdd 81 84 + 86: 47(ptr) AccessChain 16(input) 63 + 87: 9(fvec4) Load 86 + 88: 9(fvec4) FAdd 85 87 + 89: 6(int) Load 15(i) + 90: 47(ptr) AccessChain 16(input) 89 + 91: 9(fvec4) Load 90 + 92: 9(fvec4) FAdd 88 91 + 94: 47(ptr) AccessChain 35(b) 93 + 95: 9(fvec4) Load 94 + 96: 9(fvec4) FAdd 92 95 + 97: 6(int) Load 15(i) + 98: 47(ptr) AccessChain 35(b) 97 + 99: 9(fvec4) Load 98 + 100: 9(fvec4) FAdd 96 99 + 101: 6(int) Load 15(i) + 102: 6(int) Load 15(i) + 103: 65(ptr) AccessChain 62 79 101 64 102 + 104: 9(fvec4) Load 103 + 105: 9(fvec4) FAdd 100 104 + 106: 9(fvec4) Load 48(tmp) + 107: 9(fvec4) FAdd 105 106 + ReturnValue 107 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.implicit-size.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.implicit-size.frag.out index e4854db..a81edc7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.implicit-size.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.implicit-size.frag.out @@ -163,7 +163,7 @@ gl_FragCoord origin is upper left 0:? 'g_mystruct' ( global 2-element array of structure{ temp int i, temp float f}) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 72 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.multidim.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.multidim.frag.out index 72fa2ec..a82fe2d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.multidim.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.array.multidim.frag.out @@ -55,14 +55,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:10 Sequence 0:10 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:10 Color: direct index for structure ( temp 4-component vector of float) 0:10 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:10 Constant: 0:10 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 5-element array of 4-element array of 3-element array of float float_array}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -124,17 +124,17 @@ gl_FragCoord origin is upper left 0:? Sequence 0:10 Sequence 0:10 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:10 Color: direct index for structure ( temp 4-component vector of float) 0:10 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:10 Constant: 0:10 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 5-element array of 4-element array of 3-element array of float float_array}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 57 Capability Shader @@ -153,14 +153,14 @@ gl_FragCoord origin is upper left Name 29 "" Name 40 "float4_array_2" Name 46 "psout" - Name 54 "Color" + Name 54 "@entryPointOutput.Color" Decorate 22 ArrayStride 16 Decorate 24 ArrayStride 48 Decorate 26 ArrayStride 192 MemberDecorate 27($Global) 0 Offset 0 Decorate 27($Global) Block Decorate 29 DescriptorSet 0 - Decorate 54(Color) Location 0 + Decorate 54(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -193,12 +193,12 @@ gl_FragCoord origin is upper left 41: TypePointer Function 14 45: TypePointer Function 8(PS_OUTPUT) 53: TypePointer Output 7(fvec4) - 54(Color): 53(ptr) Variable Output +54(@entryPointOutput.Color): 53(ptr) Variable Output 4(main): 2 Function None 3 5: Label 55:8(PS_OUTPUT) FunctionCall 10(@main() 56: 7(fvec4) CompositeExtract 55 0 - Store 54(Color) 56 + Store 54(@entryPointOutput.Color) 56 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.assoc.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.assoc.frag.out index dcefa9c..b5b38f5 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.assoc.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.assoc.frag.out @@ -132,7 +132,7 @@ gl_FragCoord origin is upper left 0:? 'a5' (layout( location=4) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 58 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.attribute.expression.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.attribute.expression.comp.out index ed50b9c..8084f90 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.attribute.expression.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.attribute.expression.comp.out @@ -10,7 +10,7 @@ local_size = (4, 6, 8) 0:11 'x' ( temp int) 0:11 Constant: 0:11 0 (const int) -0:11 Loop with condition tested first +0:11 Loop with condition tested first: Unroll 0:11 Loop Condition 0:11 Compare Less Than ( temp bool) 0:11 'x' ( temp int) @@ -53,7 +53,7 @@ local_size = (4, 6, 8) 0:11 'x' ( temp int) 0:11 Constant: 0:11 0 (const int) -0:11 Loop with condition tested first +0:11 Loop with condition tested first: Unroll 0:11 Loop Condition 0:11 Compare Less Than ( temp bool) 0:11 'x' ( temp int) @@ -82,7 +82,7 @@ local_size = (4, 6, 8) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 39 Capability Shader @@ -132,7 +132,7 @@ local_size = (4, 6, 8) Store 13(x) 14 Branch 15 15: Label - LoopMerge 17 18 None + LoopMerge 17 18 Unroll Branch 19 19: Label 20: 11(int) Load 13(x) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.attribute.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.attribute.frag.out index ccd7693..619da20 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.attribute.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.attribute.frag.out @@ -6,7 +6,7 @@ gl_FragCoord origin is upper left 0:2 Function Parameters: 0:2 'input' ( in 4-component vector of float) 0:? Sequence -0:11 Test condition and select ( temp void) +0:11 Test condition and select ( temp void): DontFlatten 0:11 Condition 0:11 Constant: 0:11 false (const bool) @@ -33,7 +33,7 @@ gl_FragCoord origin is upper left 0:2 Function Parameters: 0:2 'input' ( in 4-component vector of float) 0:? Sequence -0:11 Test condition and select ( temp void) +0:11 Test condition and select ( temp void): DontFlatten 0:11 Condition 0:11 Constant: 0:11 false (const bool) @@ -50,7 +50,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 24 Capability Shader @@ -90,7 +90,7 @@ gl_FragCoord origin is upper left 11(@PixelShaderFunction(vf4;): 2 Function None 9 10(input): 8(ptr) FunctionParameter 12: Label - SelectionMerge 16 None + SelectionMerge 16 DontFlatten BranchConditional 14 15 16 15: Label Branch 16 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.basic.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.basic.comp.out index 9842506..610c238 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.basic.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.basic.comp.out @@ -60,7 +60,7 @@ local_size = (1, 1, 1) 0:? 'gti' ( in int LocalInvocationID) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 35 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.basic.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.basic.geom.out index 64239c5..a2cf7f1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.basic.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.basic.geom.out @@ -42,14 +42,34 @@ output primitive = line_strip 0:20 Constant: 0:20 0 (const int) 0:22 Sequence -0:22 move second child to first child ( temp structure{ temp float myfloat, temp int something}) -0:22 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something}) -0:22 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:22 Sequence +0:22 move second child to first child ( temp float) +0:? 'OutputStream.myfloat' (layout( location=0) out float) +0:22 myfloat: direct index for structure ( temp float) +0:22 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:22 Constant: +0:22 0 (const int) +0:22 move second child to first child ( temp int) +0:? 'OutputStream.something' (layout( location=1) out int) +0:22 something: direct index for structure ( temp int) +0:22 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:22 Constant: +0:22 1 (const int) 0:22 EmitVertex ( temp void) 0:23 Sequence -0:23 move second child to first child ( temp structure{ temp float myfloat, temp int something}) -0:23 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something}) -0:23 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:23 Sequence +0:23 move second child to first child ( temp float) +0:? 'OutputStream.myfloat' (layout( location=0) out float) +0:23 myfloat: direct index for structure ( temp float) +0:23 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:23 Constant: +0:23 0 (const int) +0:23 move second child to first child ( temp int) +0:? 'OutputStream.something' (layout( location=1) out int) +0:23 something: direct index for structure ( temp int) +0:23 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:23 Constant: +0:23 1 (const int) 0:23 EmitVertex ( temp void) 0:24 EndPrimitive ( temp void) 0:16 Function Definition: main( ( temp void) @@ -68,7 +88,8 @@ output primitive = line_strip 0:? Linker Objects 0:? 'VertexID' (layout( location=0) in 3-element array of uint) 0:? 'test' (layout( location=1) in 3-element array of uint) -0:? 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something}) +0:? 'OutputStream.myfloat' (layout( location=0) out float) +0:? 'OutputStream.something' (layout( location=1) out int) Linked geometry stage: @@ -117,14 +138,34 @@ output primitive = line_strip 0:20 Constant: 0:20 0 (const int) 0:22 Sequence -0:22 move second child to first child ( temp structure{ temp float myfloat, temp int something}) -0:22 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something}) -0:22 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:22 Sequence +0:22 move second child to first child ( temp float) +0:? 'OutputStream.myfloat' (layout( location=0) out float) +0:22 myfloat: direct index for structure ( temp float) +0:22 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:22 Constant: +0:22 0 (const int) +0:22 move second child to first child ( temp int) +0:? 'OutputStream.something' (layout( location=1) out int) +0:22 something: direct index for structure ( temp int) +0:22 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:22 Constant: +0:22 1 (const int) 0:22 EmitVertex ( temp void) 0:23 Sequence -0:23 move second child to first child ( temp structure{ temp float myfloat, temp int something}) -0:23 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something}) -0:23 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:23 Sequence +0:23 move second child to first child ( temp float) +0:? 'OutputStream.myfloat' (layout( location=0) out float) +0:23 myfloat: direct index for structure ( temp float) +0:23 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:23 Constant: +0:23 0 (const int) +0:23 move second child to first child ( temp int) +0:? 'OutputStream.something' (layout( location=1) out int) +0:23 something: direct index for structure ( temp int) +0:23 'Vert' ( temp structure{ temp float myfloat, temp int something}) +0:23 Constant: +0:23 1 (const int) 0:23 EmitVertex ( temp void) 0:24 EndPrimitive ( temp void) 0:16 Function Definition: main( ( temp void) @@ -143,16 +184,17 @@ output primitive = line_strip 0:? Linker Objects 0:? 'VertexID' (layout( location=0) in 3-element array of uint) 0:? 'test' (layout( location=1) in 3-element array of uint) -0:? 'OutputStream' (layout( location=0) out structure{ temp float myfloat, temp int something}) +0:? 'OutputStream.myfloat' (layout( location=0) out float) +0:? 'OutputStream.something' (layout( location=1) out int) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 60 +// Generated by (magic number): 80003 +// Id's are bound by 68 Capability Geometry 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 4 "main" 42 47 50 + EntryPoint Geometry 4 "main" 42 46 55 58 ExecutionMode 4 Triangles ExecutionMode 4 Invocations 1 ExecutionMode 4 OutputLineStrip @@ -167,18 +209,20 @@ output primitive = line_strip Name 16 "test" Name 17 "OutputStream" Name 20 "Vert" - Name 42 "OutputStream" - Name 45 "VertexID" - Name 47 "VertexID" - Name 49 "test" - Name 50 "test" - Name 52 "OutputStream" - Name 53 "param" - Name 55 "param" - Name 57 "param" - Decorate 42(OutputStream) Location 0 - Decorate 47(VertexID) Location 0 - Decorate 50(test) Location 1 + Name 42 "OutputStream.myfloat" + Name 46 "OutputStream.something" + Name 53 "VertexID" + Name 55 "VertexID" + Name 57 "test" + Name 58 "test" + Name 60 "OutputStream" + Name 61 "param" + Name 63 "param" + Name 65 "param" + Decorate 42(OutputStream.myfloat) Location 0 + Decorate 46(OutputStream.something) Location 1 + Decorate 55(VertexID) Location 0 + Decorate 58(test) Location 1 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -196,30 +240,32 @@ output primitive = line_strip 29: 11(int) Constant 2 34: TypePointer Function 10(float) 39: TypePointer Function 11(int) - 41: TypePointer Output 12(PSInput) -42(OutputStream): 41(ptr) Variable Output - 46: TypePointer Input 8 - 47(VertexID): 46(ptr) Variable Input - 50(test): 46(ptr) Variable Input + 41: TypePointer Output 10(float) +42(OutputStream.myfloat): 41(ptr) Variable Output + 45: TypePointer Output 11(int) +46(OutputStream.something): 45(ptr) Variable Output + 54: TypePointer Input 8 + 55(VertexID): 54(ptr) Variable Input + 58(test): 54(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 45(VertexID): 9(ptr) Variable Function - 49(test): 9(ptr) Variable Function -52(OutputStream): 13(ptr) Variable Function - 53(param): 9(ptr) Variable Function - 55(param): 9(ptr) Variable Function - 57(param): 13(ptr) Variable Function - 48: 8 Load 47(VertexID) - Store 45(VertexID) 48 - 51: 8 Load 50(test) - Store 49(test) 51 - 54: 8 Load 45(VertexID) - Store 53(param) 54 - 56: 8 Load 49(test) - Store 55(param) 56 - 58: 2 FunctionCall 18(@main(u1[3];u1[3];struct-PSInput-f1-i11;) 53(param) 55(param) 57(param) - 59: 12(PSInput) Load 57(param) - Store 52(OutputStream) 59 + 53(VertexID): 9(ptr) Variable Function + 57(test): 9(ptr) Variable Function +60(OutputStream): 13(ptr) Variable Function + 61(param): 9(ptr) Variable Function + 63(param): 9(ptr) Variable Function + 65(param): 13(ptr) Variable Function + 56: 8 Load 55(VertexID) + Store 53(VertexID) 56 + 59: 8 Load 58(test) + Store 57(test) 59 + 62: 8 Load 53(VertexID) + Store 61(param) 62 + 64: 8 Load 57(test) + Store 63(param) 64 + 66: 2 FunctionCall 18(@main(u1[3];u1[3];struct-PSInput-f1-i11;) 61(param) 63(param) 65(param) + 67: 12(PSInput) Load 65(param) + Store 60(OutputStream) 67 Return FunctionEnd 18(@main(u1[3];u1[3];struct-PSInput-f1-i11;): 2 Function None 14 @@ -244,11 +290,19 @@ output primitive = line_strip 38: 11(int) Bitcast 37 40: 39(ptr) AccessChain 20(Vert) 25 Store 40 38 - 43: 12(PSInput) Load 20(Vert) - Store 42(OutputStream) 43 + 43: 34(ptr) AccessChain 20(Vert) 21 + 44: 10(float) Load 43 + Store 42(OutputStream.myfloat) 44 + 47: 39(ptr) AccessChain 20(Vert) 25 + 48: 11(int) Load 47 + Store 46(OutputStream.something) 48 EmitVertex - 44: 12(PSInput) Load 20(Vert) - Store 42(OutputStream) 44 + 49: 34(ptr) AccessChain 20(Vert) 21 + 50: 10(float) Load 49 + Store 42(OutputStream.myfloat) 50 + 51: 39(ptr) AccessChain 20(Vert) 25 + 52: 11(int) Load 51 + Store 46(OutputStream.something) 52 EmitVertex EndPrimitive Return diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out index 623480c..40ad65a 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.buffer.frag.out @@ -2,49 +2,73 @@ hlsl.buffer.frag Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:30 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) +0:30 Function Definition: foo( ( temp float) 0:30 Function Parameters: -0:30 'input' ( in 4-component vector of float) 0:? Sequence 0:31 Branch: Return with expression -0:31 add ( temp 4-component vector of float) -0:31 add ( temp 4-component vector of float) -0:31 add ( temp 4-component vector of float) -0:31 add ( temp 4-component vector of float) -0:31 'input' ( in 4-component vector of float) -0:31 v1: direct index for structure (layout( row_major std140) uniform 4-component vector of float) -0:31 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1}) -0:31 Constant: -0:31 0 (const uint) -0:31 v2: direct index for structure (layout( row_major std430) buffer 4-component vector of float) -0:31 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2}) -0:31 Constant: -0:31 0 (const uint) -0:31 v3: direct index for structure (layout( row_major std140) uniform 4-component vector of float) -0:31 'anon@2' (layout( set=10 binding=2 row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3}) -0:31 Constant: -0:31 0 (const uint) -0:31 v4: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) -0:31 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4}) -0:31 Constant: -0:31 0 (const uint) -0:30 Function Definition: PixelShaderFunction( ( temp void) -0:30 Function Parameters: +0:31 Constant: +0:31 1.000000 +0:43 Function Definition: @PixelShaderFunction(vf4; ( temp structure{ temp 4-component vector of float a}) +0:43 Function Parameters: +0:43 'input' ( in 4-component vector of float) 0:? Sequence -0:30 move second child to first child ( temp 4-component vector of float) +0:45 move second child to first child ( temp 4-component vector of float) +0:45 a: direct index for structure ( temp 4-component vector of float) +0:45 'ret' ( temp structure{ temp 4-component vector of float a}) +0:45 Constant: +0:45 0 (const int) +0:45 add ( temp 4-component vector of float) +0:45 v24: direct index for structure (layout( row_major std140) uniform 4-component vector of float) +0:45 'anon@4' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v24}) +0:45 Constant: +0:45 0 (const uint) +0:45 vector-scale ( temp 4-component vector of float) +0:45 add ( temp 4-component vector of float) +0:45 add ( temp 4-component vector of float) +0:45 add ( temp 4-component vector of float) +0:45 add ( temp 4-component vector of float) +0:45 'input' ( in 4-component vector of float) +0:45 v1: direct index for structure (layout( row_major std140) uniform 4-component vector of float) +0:45 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1}) +0:45 Constant: +0:45 0 (const uint) +0:45 v2: direct index for structure (layout( row_major std430) buffer 4-component vector of float) +0:45 'anon@1' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer 4-component vector of float v2}) +0:45 Constant: +0:45 0 (const uint) +0:45 v3: direct index for structure (layout( row_major std140 offset=0) uniform 4-component vector of float) +0:45 'anon@2' (layout( row_major std140) uniform block{layout( row_major std140 offset=0) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3}) +0:45 Constant: +0:45 0 (const uint) +0:45 v4: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) +0:45 'anon@3' (layout( binding=8 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430 offset=128) buffer float f7, layout( row_major std430 offset=112) buffer 3X4 matrix of float m1, layout( column_major std430 offset=176) buffer 3X4 matrix of float m2, layout( row_major std430 offset=240) buffer 3X4 matrix of float m3, layout( row_major std430 offset=304) buffer 3X4 matrix of float m4}) +0:45 Constant: +0:45 0 (const uint) +0:45 Function Call: foo( ( temp float) +0:46 Branch: Return with expression +0:46 'ret' ( temp structure{ temp 4-component vector of float a}) +0:43 Function Definition: PixelShaderFunction( ( temp void) +0:43 Function Parameters: +0:? Sequence +0:43 move second child to first child ( temp 4-component vector of float) 0:? 'input' ( temp 4-component vector of float) -0:? 'input' (layout( location=0) in 4-component vector of float) -0:30 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:30 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) -0:? 'input' ( temp 4-component vector of float) +0:? 'input' ( in 4-component vector of float FragCoord) +0:43 Sequence +0:43 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.a' (layout( location=0) out 4-component vector of float) +0:43 a: direct index for structure ( temp 4-component vector of float) +0:43 Function Call: @PixelShaderFunction(vf4; ( temp structure{ temp 4-component vector of float a}) +0:? 'input' ( temp 4-component vector of float) +0:43 Constant: +0:43 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1}) -0:? 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2}) -0:? 'anon@2' (layout( set=10 binding=2 row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3}) -0:? 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4}) -0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'input' (layout( location=0) in 4-component vector of float) +0:? 'anon@1' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer 4-component vector of float v2}) +0:? 'anon@2' (layout( row_major std140) uniform block{layout( row_major std140 offset=0) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3}) +0:? 'anon@3' (layout( binding=8 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430 offset=128) buffer float f7, layout( row_major std430 offset=112) buffer 3X4 matrix of float m1, layout( column_major std430 offset=176) buffer 3X4 matrix of float m2, layout( row_major std430 offset=240) buffer 3X4 matrix of float m3, layout( row_major std430 offset=304) buffer 3X4 matrix of float m4}) +0:? 'anon@4' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v24}) +0:? '@entryPointOutput.a' (layout( location=0) out 4-component vector of float) +0:? 'input' ( in 4-component vector of float FragCoord) Linked fragment stage: @@ -53,180 +77,247 @@ Linked fragment stage: Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:30 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) +0:30 Function Definition: foo( ( temp float) 0:30 Function Parameters: -0:30 'input' ( in 4-component vector of float) 0:? Sequence 0:31 Branch: Return with expression -0:31 add ( temp 4-component vector of float) -0:31 add ( temp 4-component vector of float) -0:31 add ( temp 4-component vector of float) -0:31 add ( temp 4-component vector of float) -0:31 'input' ( in 4-component vector of float) -0:31 v1: direct index for structure (layout( row_major std140) uniform 4-component vector of float) -0:31 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1}) -0:31 Constant: -0:31 0 (const uint) -0:31 v2: direct index for structure (layout( row_major std430) buffer 4-component vector of float) -0:31 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2}) -0:31 Constant: -0:31 0 (const uint) -0:31 v3: direct index for structure (layout( row_major std140) uniform 4-component vector of float) -0:31 'anon@2' (layout( set=10 binding=2 row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3}) -0:31 Constant: -0:31 0 (const uint) -0:31 v4: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) -0:31 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4}) -0:31 Constant: -0:31 0 (const uint) -0:30 Function Definition: PixelShaderFunction( ( temp void) -0:30 Function Parameters: +0:31 Constant: +0:31 1.000000 +0:43 Function Definition: @PixelShaderFunction(vf4; ( temp structure{ temp 4-component vector of float a}) +0:43 Function Parameters: +0:43 'input' ( in 4-component vector of float) 0:? Sequence -0:30 move second child to first child ( temp 4-component vector of float) +0:45 move second child to first child ( temp 4-component vector of float) +0:45 a: direct index for structure ( temp 4-component vector of float) +0:45 'ret' ( temp structure{ temp 4-component vector of float a}) +0:45 Constant: +0:45 0 (const int) +0:45 add ( temp 4-component vector of float) +0:45 v24: direct index for structure (layout( row_major std140) uniform 4-component vector of float) +0:45 'anon@4' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v24}) +0:45 Constant: +0:45 0 (const uint) +0:45 vector-scale ( temp 4-component vector of float) +0:45 add ( temp 4-component vector of float) +0:45 add ( temp 4-component vector of float) +0:45 add ( temp 4-component vector of float) +0:45 add ( temp 4-component vector of float) +0:45 'input' ( in 4-component vector of float) +0:45 v1: direct index for structure (layout( row_major std140) uniform 4-component vector of float) +0:45 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1}) +0:45 Constant: +0:45 0 (const uint) +0:45 v2: direct index for structure (layout( row_major std430) buffer 4-component vector of float) +0:45 'anon@1' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer 4-component vector of float v2}) +0:45 Constant: +0:45 0 (const uint) +0:45 v3: direct index for structure (layout( row_major std140 offset=0) uniform 4-component vector of float) +0:45 'anon@2' (layout( row_major std140) uniform block{layout( row_major std140 offset=0) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3}) +0:45 Constant: +0:45 0 (const uint) +0:45 v4: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) +0:45 'anon@3' (layout( binding=8 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430 offset=128) buffer float f7, layout( row_major std430 offset=112) buffer 3X4 matrix of float m1, layout( column_major std430 offset=176) buffer 3X4 matrix of float m2, layout( row_major std430 offset=240) buffer 3X4 matrix of float m3, layout( row_major std430 offset=304) buffer 3X4 matrix of float m4}) +0:45 Constant: +0:45 0 (const uint) +0:45 Function Call: foo( ( temp float) +0:46 Branch: Return with expression +0:46 'ret' ( temp structure{ temp 4-component vector of float a}) +0:43 Function Definition: PixelShaderFunction( ( temp void) +0:43 Function Parameters: +0:? Sequence +0:43 move second child to first child ( temp 4-component vector of float) 0:? 'input' ( temp 4-component vector of float) -0:? 'input' (layout( location=0) in 4-component vector of float) -0:30 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:30 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) -0:? 'input' ( temp 4-component vector of float) +0:? 'input' ( in 4-component vector of float FragCoord) +0:43 Sequence +0:43 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.a' (layout( location=0) out 4-component vector of float) +0:43 a: direct index for structure ( temp 4-component vector of float) +0:43 Function Call: @PixelShaderFunction(vf4; ( temp structure{ temp 4-component vector of float a}) +0:? 'input' ( temp 4-component vector of float) +0:43 Constant: +0:43 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v1}) -0:? 'anon@1' (layout( row_major std430) buffer block{layout( row_major std430) buffer 4-component vector of float v2}) -0:? 'anon@2' (layout( set=10 binding=2 row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3}) -0:? 'anon@3' (layout( binding=8 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430) buffer float f7, layout( row_major std430) buffer 3X4 matrix of float m1, layout( column_major std430) buffer 3X4 matrix of float m2, layout( row_major std430) buffer 3X4 matrix of float m3, layout( row_major std430) buffer 3X4 matrix of float m4}) -0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'input' (layout( location=0) in 4-component vector of float) +0:? 'anon@1' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer 4-component vector of float v2}) +0:? 'anon@2' (layout( row_major std140) uniform block{layout( row_major std140 offset=0) uniform 4-component vector of float v3, layout( row_major std140 offset=20) uniform int i3}) +0:? 'anon@3' (layout( binding=8 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v4, layout( row_major std430 offset=48) buffer int i4, layout( row_major std430 offset=60) buffer float f1, layout( row_major std430 offset=64) buffer float f3, layout( row_major std430 offset=68) buffer float f4, layout( row_major std430 offset=72) buffer float f5, layout( row_major std430) buffer float f6, layout( row_major std430 offset=128) buffer float f7, layout( row_major std430 offset=112) buffer 3X4 matrix of float m1, layout( column_major std430 offset=176) buffer 3X4 matrix of float m2, layout( row_major std430 offset=240) buffer 3X4 matrix of float m3, layout( row_major std430 offset=304) buffer 3X4 matrix of float m4}) +0:? 'anon@4' (layout( row_major std140) uniform block{layout( row_major std140) uniform 4-component vector of float v24}) +0:? '@entryPointOutput.a' (layout( location=0) out 4-component vector of float) +0:? 'input' ( in 4-component vector of float FragCoord) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 53 +// Generated by (magic number): 80003 +// Id's are bound by 73 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "PixelShaderFunction" 46 49 + EntryPoint Fragment 4 "PixelShaderFunction" 65 68 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "PixelShaderFunction" - Name 11 "@PixelShaderFunction(vf4;" - Name 10 "input" - Name 14 "" - MemberName 14 0 "v1" - Name 16 "" - Name 23 "" - MemberName 23 0 "v2" - Name 25 "" - Name 29 "cbufName" - MemberName 29(cbufName) 0 "v3" - MemberName 29(cbufName) 1 "i3" - Name 31 "" - Name 36 "tbufName" - MemberName 36(tbufName) 0 "v4" - MemberName 36(tbufName) 1 "i4" - MemberName 36(tbufName) 2 "f1" - MemberName 36(tbufName) 3 "f3" - MemberName 36(tbufName) 4 "f4" - MemberName 36(tbufName) 5 "f5" - MemberName 36(tbufName) 6 "f6" - MemberName 36(tbufName) 7 "f7" - MemberName 36(tbufName) 8 "m1" - MemberName 36(tbufName) 9 "m2" - MemberName 36(tbufName) 10 "m3" - MemberName 36(tbufName) 11 "m4" - Name 38 "" - Name 44 "input" - Name 46 "input" - Name 49 "@entryPointOutput" - Name 50 "param" - MemberDecorate 14 0 Offset 0 - Decorate 14 Block - Decorate 16 DescriptorSet 0 - MemberDecorate 23 0 Offset 0 - Decorate 23 BufferBlock - Decorate 25 DescriptorSet 0 - MemberDecorate 29(cbufName) 0 Offset 0 - MemberDecorate 29(cbufName) 1 Offset 20 - Decorate 29(cbufName) Block - Decorate 31 DescriptorSet 10 - Decorate 31 Binding 2 - MemberDecorate 36(tbufName) 0 Offset 16 - MemberDecorate 36(tbufName) 1 Offset 48 - MemberDecorate 36(tbufName) 2 Offset 60 - MemberDecorate 36(tbufName) 3 Offset 64 - MemberDecorate 36(tbufName) 4 Offset 68 - MemberDecorate 36(tbufName) 5 Offset 72 - MemberDecorate 36(tbufName) 6 Offset 76 - MemberDecorate 36(tbufName) 7 Offset 80 - MemberDecorate 36(tbufName) 8 RowMajor - MemberDecorate 36(tbufName) 8 Offset 96 - MemberDecorate 36(tbufName) 8 MatrixStride 16 - MemberDecorate 36(tbufName) 9 ColMajor - MemberDecorate 36(tbufName) 9 Offset 160 - MemberDecorate 36(tbufName) 9 MatrixStride 16 - MemberDecorate 36(tbufName) 10 RowMajor - MemberDecorate 36(tbufName) 10 Offset 208 - MemberDecorate 36(tbufName) 10 MatrixStride 16 - MemberDecorate 36(tbufName) 11 RowMajor - MemberDecorate 36(tbufName) 11 Offset 272 - MemberDecorate 36(tbufName) 11 MatrixStride 16 - Decorate 36(tbufName) BufferBlock - Decorate 38 DescriptorSet 0 - Decorate 38 Binding 8 - Decorate 46(input) Location 0 - Decorate 49(@entryPointOutput) Location 0 + Name 8 "foo(" + Name 12 "id" + MemberName 12(id) 0 "a" + Name 15 "@PixelShaderFunction(vf4;" + Name 14 "input" + Name 21 "ret" + Name 24 "cbufName2" + MemberName 24(cbufName2) 0 "v24" + Name 26 "" + Name 31 "buf1" + MemberName 31(buf1) 0 "v1" + Name 33 "" + Name 37 "buf2" + MemberName 37(buf2) 0 "v2" + Name 39 "" + Name 43 "cbufName" + MemberName 43(cbufName) 0 "v3" + MemberName 43(cbufName) 1 "i3" + Name 45 "" + Name 50 "tbufName" + MemberName 50(tbufName) 0 "v4" + MemberName 50(tbufName) 1 "i4" + MemberName 50(tbufName) 2 "f1" + MemberName 50(tbufName) 3 "f3" + MemberName 50(tbufName) 4 "f4" + MemberName 50(tbufName) 5 "f5" + MemberName 50(tbufName) 6 "f6" + MemberName 50(tbufName) 7 "f7" + MemberName 50(tbufName) 8 "m1" + MemberName 50(tbufName) 9 "m2" + MemberName 50(tbufName) 10 "m3" + MemberName 50(tbufName) 11 "m4" + Name 52 "" + Name 63 "input" + Name 65 "input" + Name 68 "@entryPointOutput.a" + Name 69 "param" + MemberDecorate 24(cbufName2) 0 Offset 0 + Decorate 24(cbufName2) Block + Decorate 26 DescriptorSet 0 + MemberDecorate 31(buf1) 0 Offset 0 + Decorate 31(buf1) Block + Decorate 33 DescriptorSet 0 + MemberDecorate 37(buf2) 0 NonWritable + MemberDecorate 37(buf2) 0 Offset 0 + Decorate 37(buf2) BufferBlock + Decorate 39 DescriptorSet 0 + MemberDecorate 43(cbufName) 0 Offset 0 + MemberDecorate 43(cbufName) 1 Offset 20 + Decorate 43(cbufName) Block + Decorate 45 DescriptorSet 0 + MemberDecorate 50(tbufName) 0 NonWritable + MemberDecorate 50(tbufName) 0 Offset 16 + MemberDecorate 50(tbufName) 1 NonWritable + MemberDecorate 50(tbufName) 1 Offset 48 + MemberDecorate 50(tbufName) 2 NonWritable + MemberDecorate 50(tbufName) 2 Offset 60 + MemberDecorate 50(tbufName) 3 NonWritable + MemberDecorate 50(tbufName) 3 Offset 64 + MemberDecorate 50(tbufName) 4 NonWritable + MemberDecorate 50(tbufName) 4 Offset 68 + MemberDecorate 50(tbufName) 5 NonWritable + MemberDecorate 50(tbufName) 5 Offset 72 + MemberDecorate 50(tbufName) 6 NonWritable + MemberDecorate 50(tbufName) 6 Offset 76 + MemberDecorate 50(tbufName) 7 NonWritable + MemberDecorate 50(tbufName) 7 Offset 128 + MemberDecorate 50(tbufName) 8 RowMajor + MemberDecorate 50(tbufName) 8 NonWritable + MemberDecorate 50(tbufName) 8 Offset 112 + MemberDecorate 50(tbufName) 8 MatrixStride 16 + MemberDecorate 50(tbufName) 9 ColMajor + MemberDecorate 50(tbufName) 9 NonWritable + MemberDecorate 50(tbufName) 9 Offset 176 + MemberDecorate 50(tbufName) 9 MatrixStride 16 + MemberDecorate 50(tbufName) 10 RowMajor + MemberDecorate 50(tbufName) 10 NonWritable + MemberDecorate 50(tbufName) 10 Offset 240 + MemberDecorate 50(tbufName) 10 MatrixStride 16 + MemberDecorate 50(tbufName) 11 RowMajor + MemberDecorate 50(tbufName) 11 NonWritable + MemberDecorate 50(tbufName) 11 Offset 304 + MemberDecorate 50(tbufName) 11 MatrixStride 16 + Decorate 50(tbufName) BufferBlock + Decorate 52 DescriptorSet 0 + Decorate 52 Binding 8 + Decorate 65(input) BuiltIn FragCoord + Decorate 68(@entryPointOutput.a) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 - 7: TypeVector 6(float) 4 - 8: TypePointer Function 7(fvec4) - 9: TypeFunction 7(fvec4) 8(ptr) - 14: TypeStruct 7(fvec4) - 15: TypePointer Uniform 14(struct) - 16: 15(ptr) Variable Uniform - 17: TypeInt 32 1 - 18: 17(int) Constant 0 - 19: TypePointer Uniform 7(fvec4) - 23: TypeStruct 7(fvec4) - 24: TypePointer Uniform 23(struct) - 25: 24(ptr) Variable Uniform - 29(cbufName): TypeStruct 7(fvec4) 17(int) - 30: TypePointer Uniform 29(cbufName) - 31: 30(ptr) Variable Uniform - 35: TypeMatrix 7(fvec4) 3 - 36(tbufName): TypeStruct 7(fvec4) 17(int) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 35 35 35 35 - 37: TypePointer Uniform 36(tbufName) - 38: 37(ptr) Variable Uniform - 45: TypePointer Input 7(fvec4) - 46(input): 45(ptr) Variable Input - 48: TypePointer Output 7(fvec4) -49(@entryPointOutput): 48(ptr) Variable Output + 7: TypeFunction 6(float) + 10: TypeVector 6(float) 4 + 11: TypePointer Function 10(fvec4) + 12(id): TypeStruct 10(fvec4) + 13: TypeFunction 12(id) 11(ptr) + 17: 6(float) Constant 1065353216 + 20: TypePointer Function 12(id) + 22: TypeInt 32 1 + 23: 22(int) Constant 0 + 24(cbufName2): TypeStruct 10(fvec4) + 25: TypePointer Uniform 24(cbufName2) + 26: 25(ptr) Variable Uniform + 27: TypePointer Uniform 10(fvec4) + 31(buf1): TypeStruct 10(fvec4) + 32: TypePointer Uniform 31(buf1) + 33: 32(ptr) Variable Uniform + 37(buf2): TypeStruct 10(fvec4) + 38: TypePointer Uniform 37(buf2) + 39: 38(ptr) Variable Uniform + 43(cbufName): TypeStruct 10(fvec4) 22(int) + 44: TypePointer Uniform 43(cbufName) + 45: 44(ptr) Variable Uniform + 49: TypeMatrix 10(fvec4) 3 + 50(tbufName): TypeStruct 10(fvec4) 22(int) 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 49 49 49 49 + 51: TypePointer Uniform 50(tbufName) + 52: 51(ptr) Variable Uniform + 64: TypePointer Input 10(fvec4) + 65(input): 64(ptr) Variable Input + 67: TypePointer Output 10(fvec4) +68(@entryPointOutput.a): 67(ptr) Variable Output 4(PixelShaderFunction): 2 Function None 3 5: Label - 44(input): 8(ptr) Variable Function - 50(param): 8(ptr) Variable Function - 47: 7(fvec4) Load 46(input) - Store 44(input) 47 - 51: 7(fvec4) Load 44(input) - Store 50(param) 51 - 52: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 50(param) - Store 49(@entryPointOutput) 52 + 63(input): 11(ptr) Variable Function + 69(param): 11(ptr) Variable Function + 66: 10(fvec4) Load 65(input) + Store 63(input) 66 + 70: 10(fvec4) Load 63(input) + Store 69(param) 70 + 71: 12(id) FunctionCall 15(@PixelShaderFunction(vf4;) 69(param) + 72: 10(fvec4) CompositeExtract 71 0 + Store 68(@entryPointOutput.a) 72 Return FunctionEnd -11(@PixelShaderFunction(vf4;): 7(fvec4) Function None 9 - 10(input): 8(ptr) FunctionParameter - 12: Label - 13: 7(fvec4) Load 10(input) - 20: 19(ptr) AccessChain 16 18 - 21: 7(fvec4) Load 20 - 22: 7(fvec4) FAdd 13 21 - 26: 19(ptr) AccessChain 25 18 - 27: 7(fvec4) Load 26 - 28: 7(fvec4) FAdd 22 27 - 32: 19(ptr) AccessChain 31 18 - 33: 7(fvec4) Load 32 - 34: 7(fvec4) FAdd 28 33 - 39: 19(ptr) AccessChain 38 18 - 40: 7(fvec4) Load 39 - 41: 7(fvec4) FAdd 34 40 - ReturnValue 41 + 8(foo(): 6(float) Function None 7 + 9: Label + ReturnValue 17 + FunctionEnd +15(@PixelShaderFunction(vf4;): 12(id) Function None 13 + 14(input): 11(ptr) FunctionParameter + 16: Label + 21(ret): 20(ptr) Variable Function + 28: 27(ptr) AccessChain 26 23 + 29: 10(fvec4) Load 28 + 30: 10(fvec4) Load 14(input) + 34: 27(ptr) AccessChain 33 23 + 35: 10(fvec4) Load 34 + 36: 10(fvec4) FAdd 30 35 + 40: 27(ptr) AccessChain 39 23 + 41: 10(fvec4) Load 40 + 42: 10(fvec4) FAdd 36 41 + 46: 27(ptr) AccessChain 45 23 + 47: 10(fvec4) Load 46 + 48: 10(fvec4) FAdd 42 47 + 53: 27(ptr) AccessChain 52 23 + 54: 10(fvec4) Load 53 + 55: 10(fvec4) FAdd 48 54 + 56: 6(float) FunctionCall 8(foo() + 57: 10(fvec4) VectorTimesScalar 55 56 + 58: 10(fvec4) FAdd 29 57 + 59: 11(ptr) AccessChain 21(ret) 23 + Store 59 58 + 60: 12(id) Load 21(ret) + ReturnValue 60 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.calculatelod.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.calculatelod.dx10.frag.out index 535905c..a9a15d9 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.calculatelod.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.calculatelod.dx10.frag.out @@ -149,13 +149,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -172,8 +172,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -329,13 +329,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -352,11 +352,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 148 Capability Shader @@ -394,8 +394,8 @@ gl_FragCoord origin is upper left Name 115 "g_tTexcdu4a" Name 127 "psout" Name 137 "flattenTemp" - Name 140 "Color" - Name 144 "Depth" + Name 140 "@entryPointOutput.Color" + Name 144 "@entryPointOutput.Depth" Name 147 "g_tTex1df4" Decorate 16(g_tTex1df4a) DescriptorSet 0 Decorate 16(g_tTex1df4a) Binding 1 @@ -409,8 +409,8 @@ gl_FragCoord origin is upper left Decorate 92(g_tTexcdf4a) DescriptorSet 0 Decorate 104(g_tTexcdi4a) DescriptorSet 0 Decorate 115(g_tTexcdu4a) DescriptorSet 0 - Decorate 140(Color) Location 0 - Decorate 144(Depth) BuiltIn FragDepth + Decorate 140(@entryPointOutput.Color) Location 0 + Decorate 144(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 147(g_tTex1df4) DescriptorSet 0 Decorate 147(g_tTex1df4) Binding 0 2: TypeVoid @@ -485,9 +485,9 @@ gl_FragCoord origin is upper left 130: TypePointer Function 7(fvec4) 132: 27(int) Constant 1 139: TypePointer Output 7(fvec4) - 140(Color): 139(ptr) Variable Output +140(@entryPointOutput.Color): 139(ptr) Variable Output 143: TypePointer Output 6(float) - 144(Depth): 143(ptr) Variable Output +144(@entryPointOutput.Depth): 143(ptr) Variable Output 147(g_tTex1df4): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -496,10 +496,10 @@ gl_FragCoord origin is upper left Store 137(flattenTemp) 138 141: 130(ptr) AccessChain 137(flattenTemp) 28 142: 7(fvec4) Load 141 - Store 140(Color) 142 + Store 140(@entryPointOutput.Color) 142 145: 12(ptr) AccessChain 137(flattenTemp) 132 146: 6(float) Load 145 - Store 144(Depth) 146 + Store 144(@entryPointOutput.Depth) 146 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out index f19f5d0..f85d9b5 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out @@ -161,13 +161,13 @@ ERROR: node is still EOpNull! 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -184,8 +184,8 @@ ERROR: node is still EOpNull! 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -341,13 +341,13 @@ ERROR: node is still EOpNull! 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -364,7 +364,7 @@ ERROR: node is still EOpNull! 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) SPIR-V is not generated for failed compile or link diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.cast.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.cast.frag.out index 854c94e..b267ef9 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.cast.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.cast.frag.out @@ -72,7 +72,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 39 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.comparison.vec.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.comparison.vec.frag.out index dd363c6..c6b4829 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.comparison.vec.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.comparison.vec.frag.out @@ -119,14 +119,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:30 Sequence 0:30 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:30 Color: direct index for structure ( temp 4-component vector of float) 0:30 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:30 Constant: 0:30 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float uf4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -252,17 +252,17 @@ gl_FragCoord origin is upper left 0:? Sequence 0:30 Sequence 0:30 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:30 Color: direct index for structure ( temp 4-component vector of float) 0:30 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:30 Constant: 0:30 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float uf4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 96 Capability Shader @@ -292,11 +292,11 @@ gl_FragCoord origin is upper left Name 71 "r22" Name 76 "r23" Name 82 "psout" - Name 90 "Color" + Name 90 "@entryPointOutput.Color" Name 93 "$Global" MemberName 93($Global) 0 "uf4" Name 95 "" - Decorate 90(Color) Location 0 + Decorate 90(@entryPointOutput.Color) Location 0 MemberDecorate 93($Global) 0 Offset 0 Decorate 93($Global) Block Decorate 95 DescriptorSet 0 @@ -318,7 +318,7 @@ gl_FragCoord origin is upper left 83: TypeInt 32 1 84: 83(int) Constant 0 89: TypePointer Output 7(fvec4) - 90(Color): 89(ptr) Variable Output +90(@entryPointOutput.Color): 89(ptr) Variable Output 93($Global): TypeStruct 7(fvec4) 94: TypePointer Uniform 93($Global) 95: 94(ptr) Variable Uniform @@ -326,7 +326,7 @@ gl_FragCoord origin is upper left 5: Label 91:13(PS_OUTPUT) FunctionCall 15(@main() 92: 7(fvec4) CompositeExtract 91 0 - Store 90(Color) 92 + Store 90(@entryPointOutput.Color) 92 Return FunctionEnd 11(Bug1(vf4;): 2 Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.conditional.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.conditional.frag.out index 4028cad..a68951d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.conditional.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.conditional.frag.out @@ -2,122 +2,259 @@ hlsl.conditional.frag Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:2 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) -0:2 Function Parameters: -0:2 'input' ( in 4-component vector of float) +0:8 Function Definition: vectorCond( ( temp 4-component vector of float) +0:8 Function Parameters: 0:? Sequence -0:3 Sequence -0:3 move second child to first child ( temp int) -0:3 'a' ( temp int) -0:3 Constant: -0:3 5 (const int) -0:4 Sequence -0:4 move second child to first child ( temp int) -0:4 'b' ( temp int) -0:4 Constant: -0:4 6 (const int) -0:5 Sequence -0:5 move second child to first child ( temp int) -0:5 'c' ( temp int) -0:5 Constant: -0:5 7 (const int) -0:6 Sequence -0:6 move second child to first child ( temp int) -0:6 'd' ( temp int) -0:6 Constant: -0:6 7 (const int) -0:7 Sequence -0:7 move second child to first child ( temp 4-component vector of float) -0:7 'ret' ( temp 4-component vector of float) -0:9 add ( temp 4-component vector of float) -0:8 add ( temp 4-component vector of float) -0:7 add ( temp 4-component vector of float) -0:7 vector-scale ( temp 4-component vector of float) -0:7 Convert int to float ( temp float) -0:7 'a' ( temp int) -0:7 'input' ( in 4-component vector of float) -0:8 vector-scale ( temp 4-component vector of float) -0:8 Convert int to float ( temp float) -0:8 'b' ( temp int) -0:8 'input' ( in 4-component vector of float) -0:9 vector-scale ( temp 4-component vector of float) -0:9 Convert int to float ( temp float) -0:9 'c' ( temp int) -0:9 'input' ( in 4-component vector of float) -0:10 vector-scale ( temp 4-component vector of float) -0:10 Convert int to float ( temp float) -0:10 'd' ( temp int) -0:10 'input' ( in 4-component vector of float) -0:12 Comma ( temp int) -0:12 move second child to first child ( temp int) -0:12 'e' ( temp int) -0:12 move second child to first child ( temp int) -0:12 'a' ( temp int) -0:12 Test condition and select ( temp int) -0:12 Condition -0:12 Convert int to bool ( temp bool) -0:12 'b' ( temp int) -0:12 true case -0:12 move second child to first child ( temp int) -0:12 'c' ( temp int) -0:12 'd' ( temp int) -0:12 false case +0:12 Branch: Return with expression +0:11 add ( temp 4-component vector of float) +0:10 add ( temp 4-component vector of float) +0:9 add ( temp 4-component vector of float) +0:9 mix ( temp 4-component vector of float) +0:9 f4: direct index for structure ( uniform 4-component vector of float) +0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:9 Constant: +0:9 2 (const uint) +0:9 t4: direct index for structure ( uniform 4-component vector of float) +0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:9 Constant: +0:9 1 (const uint) +0:9 Convert float to bool ( temp 4-component vector of bool) +0:9 c4: direct index for structure ( uniform 4-component vector of float) +0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:9 Constant: +0:9 0 (const uint) +0:10 mix ( temp 4-component vector of float) +0:10 Construct vec4 ( temp 4-component vector of float) +0:10 f: direct index for structure ( uniform float) +0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:10 Constant: +0:10 4 (const uint) +0:10 Construct vec4 ( temp 4-component vector of float) +0:10 t: direct index for structure ( uniform float) +0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:10 Constant: +0:10 3 (const uint) +0:10 Convert float to bool ( temp 4-component vector of bool) +0:10 c4: direct index for structure ( uniform 4-component vector of float) +0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:10 Constant: +0:10 0 (const uint) +0:11 mix ( temp 4-component vector of float) +0:11 f4: direct index for structure ( uniform 4-component vector of float) +0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:11 Constant: +0:11 2 (const uint) +0:11 t4: direct index for structure ( uniform 4-component vector of float) +0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:11 Constant: +0:11 1 (const uint) +0:11 Compare Less Than ( temp 4-component vector of bool) +0:11 t4: direct index for structure ( uniform 4-component vector of float) +0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:11 Constant: +0:11 1 (const uint) +0:11 f4: direct index for structure ( uniform 4-component vector of float) +0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:11 Constant: +0:11 2 (const uint) +0:12 mix ( temp 4-component vector of float) +0:12 f4: direct index for structure ( uniform 4-component vector of float) +0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:12 Constant: -0:12 10 (const int) -0:12 move second child to first child ( temp int) -0:12 'b' ( temp int) -0:12 Test condition and select ( temp int) -0:12 Condition -0:12 Convert int to bool ( temp bool) -0:12 'a' ( temp int) -0:12 true case -0:12 move second child to first child ( temp int) -0:12 'd' ( temp int) -0:12 'c' ( temp int) -0:12 false case -0:12 Constant: -0:12 11 (const int) -0:14 move second child to first child ( temp 4-component vector of float) -0:14 'f' ( temp 4-component vector of float) -0:14 Test condition and select ( temp 4-component vector of float) -0:14 Condition -0:14 Compare Less Than ( temp bool) -0:14 direct index ( temp float) -0:14 'ret' ( temp 4-component vector of float) -0:14 Constant: -0:14 0 (const int) -0:14 direct index ( temp float) -0:14 'input' ( in 4-component vector of float) -0:14 Constant: -0:14 1 (const int) -0:14 true case -0:14 vector-scale ( temp 4-component vector of float) -0:14 Convert int to float ( temp float) -0:14 'c' ( temp int) -0:14 'input' ( in 4-component vector of float) -0:14 false case -0:14 vector-scale ( temp 4-component vector of float) -0:14 Convert int to float ( temp float) -0:14 'd' ( temp int) -0:14 'input' ( in 4-component vector of float) -0:15 Branch: Return with expression -0:15 add ( temp 4-component vector of float) -0:15 vector-scale ( temp 4-component vector of float) -0:15 Convert int to float ( temp float) -0:15 'e' ( temp int) -0:15 'ret' ( temp 4-component vector of float) -0:15 'f' ( temp 4-component vector of float) -0:2 Function Definition: PixelShaderFunction( ( temp void) -0:2 Function Parameters: +0:12 2 (const uint) +0:12 Construct vec4 ( temp 4-component vector of float) +0:12 t: direct index for structure ( uniform float) +0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:12 Constant: +0:12 3 (const uint) +0:12 Convert float to bool ( temp 4-component vector of bool) +0:12 c4: direct index for structure ( uniform 4-component vector of float) +0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:12 Constant: +0:12 0 (const uint) +0:16 Function Definition: scalarCond( ( temp 4-component vector of float) +0:16 Function Parameters: 0:? Sequence -0:2 move second child to first child ( temp 4-component vector of float) +0:17 Sequence +0:17 move second child to first child ( temp 4-component vector of float) +0:17 'ret' ( temp 4-component vector of float) +0:17 Test condition and select ( temp 4-component vector of float) +0:17 Condition +0:17 Compare Not Equal ( temp bool) +0:17 t: direct index for structure ( uniform float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:17 Constant: +0:17 3 (const uint) +0:17 f: direct index for structure ( uniform float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:17 Constant: +0:17 4 (const uint) +0:17 true case +0:17 vector-scale ( temp 4-component vector of float) +0:17 t: direct index for structure ( uniform float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:17 Constant: +0:17 3 (const uint) +0:17 f4: direct index for structure ( uniform 4-component vector of float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:17 Constant: +0:17 2 (const uint) +0:17 false case +0:17 Constant: +0:17 1.000000 +0:17 1.000000 +0:17 1.000000 +0:17 1.000000 +0:18 Branch: Return with expression +0:18 'ret' ( temp 4-component vector of float) +0:22 Function Definition: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:22 Function Parameters: +0:22 'cnd' ( in 2-component vector of bool) +0:22 'src0' ( in 2-component vector of float) +0:22 'src1' ( in 2-component vector of float) +0:? Sequence +0:23 Branch: Return with expression +0:23 mix ( temp 2-component vector of float) +0:23 'src1' ( in 2-component vector of float) +0:23 'src0' ( in 2-component vector of float) +0:23 'cnd' ( in 2-component vector of bool) +0:27 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) +0:27 Function Parameters: +0:27 'input' ( in 4-component vector of float) +0:? Sequence +0:28 Sequence +0:28 move second child to first child ( temp int) +0:28 'a' ( temp int) +0:28 Constant: +0:28 5 (const int) +0:29 Sequence +0:29 move second child to first child ( temp int) +0:29 'b' ( temp int) +0:29 Constant: +0:29 6 (const int) +0:30 Sequence +0:30 move second child to first child ( temp int) +0:30 'c' ( temp int) +0:30 Constant: +0:30 7 (const int) +0:31 Sequence +0:31 move second child to first child ( temp int) +0:31 'd' ( temp int) +0:31 Constant: +0:31 7 (const int) +0:32 Sequence +0:32 move second child to first child ( temp 4-component vector of float) +0:32 'ret' ( temp 4-component vector of float) +0:34 add ( temp 4-component vector of float) +0:33 add ( temp 4-component vector of float) +0:32 add ( temp 4-component vector of float) +0:32 vector-scale ( temp 4-component vector of float) +0:32 Convert int to float ( temp float) +0:32 'a' ( temp int) +0:32 'input' ( in 4-component vector of float) +0:33 vector-scale ( temp 4-component vector of float) +0:33 Convert int to float ( temp float) +0:33 'b' ( temp int) +0:33 'input' ( in 4-component vector of float) +0:34 vector-scale ( temp 4-component vector of float) +0:34 Convert int to float ( temp float) +0:34 'c' ( temp int) +0:34 'input' ( in 4-component vector of float) +0:35 vector-scale ( temp 4-component vector of float) +0:35 Convert int to float ( temp float) +0:35 'd' ( temp int) +0:35 'input' ( in 4-component vector of float) +0:37 Comma ( temp int) +0:37 move second child to first child ( temp int) +0:37 'e' ( temp int) +0:37 move second child to first child ( temp int) +0:37 'a' ( temp int) +0:37 Test condition and select ( temp int) +0:37 Condition +0:37 Convert int to bool ( temp bool) +0:37 'b' ( temp int) +0:37 true case +0:37 move second child to first child ( temp int) +0:37 'c' ( temp int) +0:37 'd' ( temp int) +0:37 false case +0:37 Constant: +0:37 10 (const int) +0:37 move second child to first child ( temp int) +0:37 'b' ( temp int) +0:37 Test condition and select ( temp int) +0:37 Condition +0:37 Convert int to bool ( temp bool) +0:37 'a' ( temp int) +0:37 true case +0:37 move second child to first child ( temp int) +0:37 'd' ( temp int) +0:37 'c' ( temp int) +0:37 false case +0:37 Constant: +0:37 11 (const int) +0:39 move second child to first child ( temp 4-component vector of float) +0:39 'f' ( temp 4-component vector of float) +0:39 Test condition and select ( temp 4-component vector of float) +0:39 Condition +0:39 Compare Less Than ( temp bool) +0:39 direct index ( temp float) +0:39 'ret' ( temp 4-component vector of float) +0:39 Constant: +0:39 0 (const int) +0:39 direct index ( temp float) +0:39 'input' ( in 4-component vector of float) +0:39 Constant: +0:39 1 (const int) +0:39 true case +0:39 vector-scale ( temp 4-component vector of float) +0:39 Convert int to float ( temp float) +0:39 'c' ( temp int) +0:39 'input' ( in 4-component vector of float) +0:39 false case +0:39 vector-scale ( temp 4-component vector of float) +0:39 Convert int to float ( temp float) +0:39 'd' ( temp int) +0:39 'input' ( in 4-component vector of float) +0:41 Branch: Return with expression +0:40 add ( temp 4-component vector of float) +0:40 add ( temp 4-component vector of float) +0:40 add ( temp 4-component vector of float) +0:40 add ( temp 4-component vector of float) +0:40 vector-scale ( temp 4-component vector of float) +0:40 Convert int to float ( temp float) +0:40 'e' ( temp int) +0:40 'ret' ( temp 4-component vector of float) +0:40 'f' ( temp 4-component vector of float) +0:40 Function Call: vectorCond( ( temp 4-component vector of float) +0:40 Function Call: scalarCond( ( temp 4-component vector of float) +0:? Construct vec4 ( temp 4-component vector of float) +0:41 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:? Constant: +0:? true (const bool) +0:? false (const bool) +0:? Constant: +0:? 1.000000 +0:? 2.000000 +0:? Constant: +0:? 3.000000 +0:? 4.000000 +0:41 Constant: +0:41 10.000000 +0:41 Constant: +0:41 10.000000 +0:27 Function Definition: PixelShaderFunction( ( temp void) +0:27 Function Parameters: +0:? Sequence +0:27 move second child to first child ( temp 4-component vector of float) 0:? 'input' ( temp 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) -0:2 move second child to first child ( temp 4-component vector of float) +0:27 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:2 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) +0:27 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) 0:? 'input' ( temp 4-component vector of float) 0:? Linker Objects +0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) @@ -128,282 +265,571 @@ Linked fragment stage: Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:2 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) -0:2 Function Parameters: -0:2 'input' ( in 4-component vector of float) +0:8 Function Definition: vectorCond( ( temp 4-component vector of float) +0:8 Function Parameters: 0:? Sequence -0:3 Sequence -0:3 move second child to first child ( temp int) -0:3 'a' ( temp int) -0:3 Constant: -0:3 5 (const int) -0:4 Sequence -0:4 move second child to first child ( temp int) -0:4 'b' ( temp int) -0:4 Constant: -0:4 6 (const int) -0:5 Sequence -0:5 move second child to first child ( temp int) -0:5 'c' ( temp int) -0:5 Constant: -0:5 7 (const int) -0:6 Sequence -0:6 move second child to first child ( temp int) -0:6 'd' ( temp int) -0:6 Constant: -0:6 7 (const int) -0:7 Sequence -0:7 move second child to first child ( temp 4-component vector of float) -0:7 'ret' ( temp 4-component vector of float) -0:9 add ( temp 4-component vector of float) -0:8 add ( temp 4-component vector of float) -0:7 add ( temp 4-component vector of float) -0:7 vector-scale ( temp 4-component vector of float) -0:7 Convert int to float ( temp float) -0:7 'a' ( temp int) -0:7 'input' ( in 4-component vector of float) -0:8 vector-scale ( temp 4-component vector of float) -0:8 Convert int to float ( temp float) -0:8 'b' ( temp int) -0:8 'input' ( in 4-component vector of float) -0:9 vector-scale ( temp 4-component vector of float) -0:9 Convert int to float ( temp float) -0:9 'c' ( temp int) -0:9 'input' ( in 4-component vector of float) -0:10 vector-scale ( temp 4-component vector of float) -0:10 Convert int to float ( temp float) -0:10 'd' ( temp int) -0:10 'input' ( in 4-component vector of float) -0:12 Comma ( temp int) -0:12 move second child to first child ( temp int) -0:12 'e' ( temp int) -0:12 move second child to first child ( temp int) -0:12 'a' ( temp int) -0:12 Test condition and select ( temp int) -0:12 Condition -0:12 Convert int to bool ( temp bool) -0:12 'b' ( temp int) -0:12 true case -0:12 move second child to first child ( temp int) -0:12 'c' ( temp int) -0:12 'd' ( temp int) -0:12 false case +0:12 Branch: Return with expression +0:11 add ( temp 4-component vector of float) +0:10 add ( temp 4-component vector of float) +0:9 add ( temp 4-component vector of float) +0:9 mix ( temp 4-component vector of float) +0:9 f4: direct index for structure ( uniform 4-component vector of float) +0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:9 Constant: +0:9 2 (const uint) +0:9 t4: direct index for structure ( uniform 4-component vector of float) +0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:9 Constant: +0:9 1 (const uint) +0:9 Convert float to bool ( temp 4-component vector of bool) +0:9 c4: direct index for structure ( uniform 4-component vector of float) +0:9 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:9 Constant: +0:9 0 (const uint) +0:10 mix ( temp 4-component vector of float) +0:10 Construct vec4 ( temp 4-component vector of float) +0:10 f: direct index for structure ( uniform float) +0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:10 Constant: +0:10 4 (const uint) +0:10 Construct vec4 ( temp 4-component vector of float) +0:10 t: direct index for structure ( uniform float) +0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:10 Constant: +0:10 3 (const uint) +0:10 Convert float to bool ( temp 4-component vector of bool) +0:10 c4: direct index for structure ( uniform 4-component vector of float) +0:10 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:10 Constant: +0:10 0 (const uint) +0:11 mix ( temp 4-component vector of float) +0:11 f4: direct index for structure ( uniform 4-component vector of float) +0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:11 Constant: +0:11 2 (const uint) +0:11 t4: direct index for structure ( uniform 4-component vector of float) +0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:11 Constant: +0:11 1 (const uint) +0:11 Compare Less Than ( temp 4-component vector of bool) +0:11 t4: direct index for structure ( uniform 4-component vector of float) +0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:11 Constant: +0:11 1 (const uint) +0:11 f4: direct index for structure ( uniform 4-component vector of float) +0:11 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:11 Constant: +0:11 2 (const uint) +0:12 mix ( temp 4-component vector of float) +0:12 f4: direct index for structure ( uniform 4-component vector of float) +0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:12 Constant: -0:12 10 (const int) -0:12 move second child to first child ( temp int) -0:12 'b' ( temp int) -0:12 Test condition and select ( temp int) -0:12 Condition -0:12 Convert int to bool ( temp bool) -0:12 'a' ( temp int) -0:12 true case -0:12 move second child to first child ( temp int) -0:12 'd' ( temp int) -0:12 'c' ( temp int) -0:12 false case -0:12 Constant: -0:12 11 (const int) -0:14 move second child to first child ( temp 4-component vector of float) -0:14 'f' ( temp 4-component vector of float) -0:14 Test condition and select ( temp 4-component vector of float) -0:14 Condition -0:14 Compare Less Than ( temp bool) -0:14 direct index ( temp float) -0:14 'ret' ( temp 4-component vector of float) -0:14 Constant: -0:14 0 (const int) -0:14 direct index ( temp float) -0:14 'input' ( in 4-component vector of float) -0:14 Constant: -0:14 1 (const int) -0:14 true case -0:14 vector-scale ( temp 4-component vector of float) -0:14 Convert int to float ( temp float) -0:14 'c' ( temp int) -0:14 'input' ( in 4-component vector of float) -0:14 false case -0:14 vector-scale ( temp 4-component vector of float) -0:14 Convert int to float ( temp float) -0:14 'd' ( temp int) -0:14 'input' ( in 4-component vector of float) -0:15 Branch: Return with expression -0:15 add ( temp 4-component vector of float) -0:15 vector-scale ( temp 4-component vector of float) -0:15 Convert int to float ( temp float) -0:15 'e' ( temp int) -0:15 'ret' ( temp 4-component vector of float) -0:15 'f' ( temp 4-component vector of float) -0:2 Function Definition: PixelShaderFunction( ( temp void) -0:2 Function Parameters: +0:12 2 (const uint) +0:12 Construct vec4 ( temp 4-component vector of float) +0:12 t: direct index for structure ( uniform float) +0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:12 Constant: +0:12 3 (const uint) +0:12 Convert float to bool ( temp 4-component vector of bool) +0:12 c4: direct index for structure ( uniform 4-component vector of float) +0:12 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:12 Constant: +0:12 0 (const uint) +0:16 Function Definition: scalarCond( ( temp 4-component vector of float) +0:16 Function Parameters: 0:? Sequence -0:2 move second child to first child ( temp 4-component vector of float) +0:17 Sequence +0:17 move second child to first child ( temp 4-component vector of float) +0:17 'ret' ( temp 4-component vector of float) +0:17 Test condition and select ( temp 4-component vector of float) +0:17 Condition +0:17 Compare Not Equal ( temp bool) +0:17 t: direct index for structure ( uniform float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:17 Constant: +0:17 3 (const uint) +0:17 f: direct index for structure ( uniform float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:17 Constant: +0:17 4 (const uint) +0:17 true case +0:17 vector-scale ( temp 4-component vector of float) +0:17 t: direct index for structure ( uniform float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:17 Constant: +0:17 3 (const uint) +0:17 f4: direct index for structure ( uniform 4-component vector of float) +0:17 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) +0:17 Constant: +0:17 2 (const uint) +0:17 false case +0:17 Constant: +0:17 1.000000 +0:17 1.000000 +0:17 1.000000 +0:17 1.000000 +0:18 Branch: Return with expression +0:18 'ret' ( temp 4-component vector of float) +0:22 Function Definition: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:22 Function Parameters: +0:22 'cnd' ( in 2-component vector of bool) +0:22 'src0' ( in 2-component vector of float) +0:22 'src1' ( in 2-component vector of float) +0:? Sequence +0:23 Branch: Return with expression +0:23 mix ( temp 2-component vector of float) +0:23 'src1' ( in 2-component vector of float) +0:23 'src0' ( in 2-component vector of float) +0:23 'cnd' ( in 2-component vector of bool) +0:27 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) +0:27 Function Parameters: +0:27 'input' ( in 4-component vector of float) +0:? Sequence +0:28 Sequence +0:28 move second child to first child ( temp int) +0:28 'a' ( temp int) +0:28 Constant: +0:28 5 (const int) +0:29 Sequence +0:29 move second child to first child ( temp int) +0:29 'b' ( temp int) +0:29 Constant: +0:29 6 (const int) +0:30 Sequence +0:30 move second child to first child ( temp int) +0:30 'c' ( temp int) +0:30 Constant: +0:30 7 (const int) +0:31 Sequence +0:31 move second child to first child ( temp int) +0:31 'd' ( temp int) +0:31 Constant: +0:31 7 (const int) +0:32 Sequence +0:32 move second child to first child ( temp 4-component vector of float) +0:32 'ret' ( temp 4-component vector of float) +0:34 add ( temp 4-component vector of float) +0:33 add ( temp 4-component vector of float) +0:32 add ( temp 4-component vector of float) +0:32 vector-scale ( temp 4-component vector of float) +0:32 Convert int to float ( temp float) +0:32 'a' ( temp int) +0:32 'input' ( in 4-component vector of float) +0:33 vector-scale ( temp 4-component vector of float) +0:33 Convert int to float ( temp float) +0:33 'b' ( temp int) +0:33 'input' ( in 4-component vector of float) +0:34 vector-scale ( temp 4-component vector of float) +0:34 Convert int to float ( temp float) +0:34 'c' ( temp int) +0:34 'input' ( in 4-component vector of float) +0:35 vector-scale ( temp 4-component vector of float) +0:35 Convert int to float ( temp float) +0:35 'd' ( temp int) +0:35 'input' ( in 4-component vector of float) +0:37 Comma ( temp int) +0:37 move second child to first child ( temp int) +0:37 'e' ( temp int) +0:37 move second child to first child ( temp int) +0:37 'a' ( temp int) +0:37 Test condition and select ( temp int) +0:37 Condition +0:37 Convert int to bool ( temp bool) +0:37 'b' ( temp int) +0:37 true case +0:37 move second child to first child ( temp int) +0:37 'c' ( temp int) +0:37 'd' ( temp int) +0:37 false case +0:37 Constant: +0:37 10 (const int) +0:37 move second child to first child ( temp int) +0:37 'b' ( temp int) +0:37 Test condition and select ( temp int) +0:37 Condition +0:37 Convert int to bool ( temp bool) +0:37 'a' ( temp int) +0:37 true case +0:37 move second child to first child ( temp int) +0:37 'd' ( temp int) +0:37 'c' ( temp int) +0:37 false case +0:37 Constant: +0:37 11 (const int) +0:39 move second child to first child ( temp 4-component vector of float) +0:39 'f' ( temp 4-component vector of float) +0:39 Test condition and select ( temp 4-component vector of float) +0:39 Condition +0:39 Compare Less Than ( temp bool) +0:39 direct index ( temp float) +0:39 'ret' ( temp 4-component vector of float) +0:39 Constant: +0:39 0 (const int) +0:39 direct index ( temp float) +0:39 'input' ( in 4-component vector of float) +0:39 Constant: +0:39 1 (const int) +0:39 true case +0:39 vector-scale ( temp 4-component vector of float) +0:39 Convert int to float ( temp float) +0:39 'c' ( temp int) +0:39 'input' ( in 4-component vector of float) +0:39 false case +0:39 vector-scale ( temp 4-component vector of float) +0:39 Convert int to float ( temp float) +0:39 'd' ( temp int) +0:39 'input' ( in 4-component vector of float) +0:41 Branch: Return with expression +0:40 add ( temp 4-component vector of float) +0:40 add ( temp 4-component vector of float) +0:40 add ( temp 4-component vector of float) +0:40 add ( temp 4-component vector of float) +0:40 vector-scale ( temp 4-component vector of float) +0:40 Convert int to float ( temp float) +0:40 'e' ( temp int) +0:40 'ret' ( temp 4-component vector of float) +0:40 'f' ( temp 4-component vector of float) +0:40 Function Call: vectorCond( ( temp 4-component vector of float) +0:40 Function Call: scalarCond( ( temp 4-component vector of float) +0:? Construct vec4 ( temp 4-component vector of float) +0:41 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:? Constant: +0:? true (const bool) +0:? false (const bool) +0:? Constant: +0:? 1.000000 +0:? 2.000000 +0:? Constant: +0:? 3.000000 +0:? 4.000000 +0:41 Constant: +0:41 10.000000 +0:41 Constant: +0:41 10.000000 +0:27 Function Definition: PixelShaderFunction( ( temp void) +0:27 Function Parameters: +0:? Sequence +0:27 move second child to first child ( temp 4-component vector of float) 0:? 'input' ( temp 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) -0:2 move second child to first child ( temp 4-component vector of float) +0:27 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:2 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) +0:27 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) 0:? 'input' ( temp 4-component vector of float) 0:? Linker Objects +0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float c4, uniform 4-component vector of float t4, uniform 4-component vector of float f4, uniform float t, uniform float f}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 102 +// Generated by (magic number): 80003 +// Id's are bound by 220 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "PixelShaderFunction" 95 98 + EntryPoint Fragment 4 "PixelShaderFunction" 213 216 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "PixelShaderFunction" - Name 11 "@PixelShaderFunction(vf4;" - Name 10 "input" - Name 15 "a" - Name 17 "b" - Name 19 "c" - Name 21 "d" - Name 22 "ret" - Name 42 "e" - Name 64 "f" - Name 93 "input" - Name 95 "input" - Name 98 "@entryPointOutput" - Name 99 "param" - Decorate 95(input) Location 0 - Decorate 98(@entryPointOutput) Location 0 + Name 9 "vectorCond(" + Name 11 "scalarCond(" + Name 22 "fbSelect(vb2;vf2;vf2;" + Name 19 "cnd" + Name 20 "src0" + Name 21 "src1" + Name 27 "@PixelShaderFunction(vf4;" + Name 26 "input" + Name 29 "$Global" + MemberName 29($Global) 0 "c4" + MemberName 29($Global) 1 "t4" + MemberName 29($Global) 2 "f4" + MemberName 29($Global) 3 "t" + MemberName 29($Global) 4 "f" + Name 31 "" + Name 85 "ret" + Name 113 "a" + Name 115 "b" + Name 117 "c" + Name 119 "d" + Name 120 "ret" + Name 140 "e" + Name 161 "f" + Name 200 "param" + Name 201 "param" + Name 202 "param" + Name 211 "input" + Name 213 "input" + Name 216 "@entryPointOutput" + Name 217 "param" + MemberDecorate 29($Global) 0 Offset 0 + MemberDecorate 29($Global) 1 Offset 16 + MemberDecorate 29($Global) 2 Offset 32 + MemberDecorate 29($Global) 3 Offset 48 + MemberDecorate 29($Global) 4 Offset 52 + Decorate 29($Global) Block + Decorate 31 DescriptorSet 0 + Decorate 213(input) Location 0 + Decorate 216(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 - 8: TypePointer Function 7(fvec4) - 9: TypeFunction 7(fvec4) 8(ptr) - 13: TypeInt 32 1 - 14: TypePointer Function 13(int) - 16: 13(int) Constant 5 - 18: 13(int) Constant 6 - 20: 13(int) Constant 7 - 45: TypeBool - 46: TypeInt 32 0 - 47: 46(int) Constant 0 - 53: 13(int) Constant 10 - 62: 13(int) Constant 11 - 66: TypePointer Function 6(float) - 69: 46(int) Constant 1 - 94: TypePointer Input 7(fvec4) - 95(input): 94(ptr) Variable Input - 97: TypePointer Output 7(fvec4) -98(@entryPointOutput): 97(ptr) Variable Output + 8: TypeFunction 7(fvec4) + 13: TypeBool + 14: TypeVector 13(bool) 2 + 15: TypePointer Function 14(bvec2) + 16: TypeVector 6(float) 2 + 17: TypePointer Function 16(fvec2) + 18: TypeFunction 16(fvec2) 15(ptr) 17(ptr) 17(ptr) + 24: TypePointer Function 7(fvec4) + 25: TypeFunction 7(fvec4) 24(ptr) + 29($Global): TypeStruct 7(fvec4) 7(fvec4) 7(fvec4) 6(float) 6(float) + 30: TypePointer Uniform 29($Global) + 31: 30(ptr) Variable Uniform + 32: TypeInt 32 1 + 33: 32(int) Constant 2 + 34: TypePointer Uniform 7(fvec4) + 37: 32(int) Constant 1 + 40: 32(int) Constant 0 + 43: TypeVector 13(bool) 4 + 44: 6(float) Constant 0 + 45: 7(fvec4) ConstantComposite 44 44 44 44 + 48: 32(int) Constant 4 + 49: TypePointer Uniform 6(float) + 53: 32(int) Constant 3 + 100: 6(float) Constant 1065353216 + 101: 7(fvec4) ConstantComposite 100 100 100 100 + 112: TypePointer Function 32(int) + 114: 32(int) Constant 5 + 116: 32(int) Constant 6 + 118: 32(int) Constant 7 + 143: TypeInt 32 0 + 144: 143(int) Constant 0 + 150: 32(int) Constant 10 + 159: 32(int) Constant 11 + 163: TypePointer Function 6(float) + 166: 143(int) Constant 1 + 192: 13(bool) ConstantTrue + 193: 13(bool) ConstantFalse + 194: 14(bvec2) ConstantComposite 192 193 + 195: 6(float) Constant 1073741824 + 196: 16(fvec2) ConstantComposite 100 195 + 197: 6(float) Constant 1077936128 + 198: 6(float) Constant 1082130432 + 199: 16(fvec2) ConstantComposite 197 198 + 204: 6(float) Constant 1092616192 + 212: TypePointer Input 7(fvec4) + 213(input): 212(ptr) Variable Input + 215: TypePointer Output 7(fvec4) +216(@entryPointOutput): 215(ptr) Variable Output 4(PixelShaderFunction): 2 Function None 3 5: Label - 93(input): 8(ptr) Variable Function - 99(param): 8(ptr) Variable Function - 96: 7(fvec4) Load 95(input) - Store 93(input) 96 - 100: 7(fvec4) Load 93(input) - Store 99(param) 100 - 101: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 99(param) - Store 98(@entryPointOutput) 101 + 211(input): 24(ptr) Variable Function + 217(param): 24(ptr) Variable Function + 214: 7(fvec4) Load 213(input) + Store 211(input) 214 + 218: 7(fvec4) Load 211(input) + Store 217(param) 218 + 219: 7(fvec4) FunctionCall 27(@PixelShaderFunction(vf4;) 217(param) + Store 216(@entryPointOutput) 219 Return FunctionEnd -11(@PixelShaderFunction(vf4;): 7(fvec4) Function None 9 - 10(input): 8(ptr) FunctionParameter - 12: Label - 15(a): 14(ptr) Variable Function - 17(b): 14(ptr) Variable Function - 19(c): 14(ptr) Variable Function - 21(d): 14(ptr) Variable Function - 22(ret): 8(ptr) Variable Function - 42(e): 14(ptr) Variable Function - 43: 14(ptr) Variable Function - 55: 14(ptr) Variable Function - 64(f): 8(ptr) Variable Function - 65: 8(ptr) Variable Function - Store 15(a) 16 - Store 17(b) 18 - Store 19(c) 20 - Store 21(d) 20 - 23: 13(int) Load 15(a) - 24: 6(float) ConvertSToF 23 - 25: 7(fvec4) Load 10(input) - 26: 7(fvec4) VectorTimesScalar 25 24 - 27: 13(int) Load 17(b) - 28: 6(float) ConvertSToF 27 - 29: 7(fvec4) Load 10(input) - 30: 7(fvec4) VectorTimesScalar 29 28 - 31: 7(fvec4) FAdd 26 30 - 32: 13(int) Load 19(c) - 33: 6(float) ConvertSToF 32 - 34: 7(fvec4) Load 10(input) - 35: 7(fvec4) VectorTimesScalar 34 33 - 36: 7(fvec4) FAdd 31 35 - 37: 13(int) Load 21(d) - 38: 6(float) ConvertSToF 37 - 39: 7(fvec4) Load 10(input) - 40: 7(fvec4) VectorTimesScalar 39 38 - 41: 7(fvec4) FAdd 36 40 - Store 22(ret) 41 - 44: 13(int) Load 17(b) - 48: 45(bool) INotEqual 44 47 - SelectionMerge 50 None - BranchConditional 48 49 52 - 49: Label - 51: 13(int) Load 21(d) - Store 19(c) 51 - Store 43 51 - Branch 50 - 52: Label - Store 43 53 - Branch 50 - 50: Label - 54: 13(int) Load 43 - Store 15(a) 54 - Store 42(e) 54 - 56: 13(int) Load 15(a) - 57: 45(bool) INotEqual 56 47 - SelectionMerge 59 None - BranchConditional 57 58 61 - 58: Label - 60: 13(int) Load 19(c) - Store 21(d) 60 - Store 55 60 - Branch 59 - 61: Label - Store 55 62 - Branch 59 - 59: Label - 63: 13(int) Load 55 - Store 17(b) 63 - 67: 66(ptr) AccessChain 22(ret) 47 - 68: 6(float) Load 67 - 70: 66(ptr) AccessChain 10(input) 69 - 71: 6(float) Load 70 - 72: 45(bool) FOrdLessThan 68 71 - SelectionMerge 74 None - BranchConditional 72 73 79 - 73: Label - 75: 13(int) Load 19(c) - 76: 6(float) ConvertSToF 75 - 77: 7(fvec4) Load 10(input) - 78: 7(fvec4) VectorTimesScalar 77 76 - Store 65 78 - Branch 74 - 79: Label - 80: 13(int) Load 21(d) - 81: 6(float) ConvertSToF 80 - 82: 7(fvec4) Load 10(input) - 83: 7(fvec4) VectorTimesScalar 82 81 - Store 65 83 - Branch 74 - 74: Label - 84: 7(fvec4) Load 65 - Store 64(f) 84 - 85: 13(int) Load 42(e) - 86: 6(float) ConvertSToF 85 - 87: 7(fvec4) Load 22(ret) - 88: 7(fvec4) VectorTimesScalar 87 86 - 89: 7(fvec4) Load 64(f) - 90: 7(fvec4) FAdd 88 89 - ReturnValue 90 + 9(vectorCond(): 7(fvec4) Function None 8 + 10: Label + 35: 34(ptr) AccessChain 31 33 + 36: 7(fvec4) Load 35 + 38: 34(ptr) AccessChain 31 37 + 39: 7(fvec4) Load 38 + 41: 34(ptr) AccessChain 31 40 + 42: 7(fvec4) Load 41 + 46: 43(bvec4) FOrdNotEqual 42 45 + 47: 7(fvec4) Select 46 39 36 + 50: 49(ptr) AccessChain 31 48 + 51: 6(float) Load 50 + 52: 7(fvec4) CompositeConstruct 51 51 51 51 + 54: 49(ptr) AccessChain 31 53 + 55: 6(float) Load 54 + 56: 7(fvec4) CompositeConstruct 55 55 55 55 + 57: 34(ptr) AccessChain 31 40 + 58: 7(fvec4) Load 57 + 59: 43(bvec4) FOrdNotEqual 58 45 + 60: 7(fvec4) Select 59 56 52 + 61: 7(fvec4) FAdd 47 60 + 62: 34(ptr) AccessChain 31 33 + 63: 7(fvec4) Load 62 + 64: 34(ptr) AccessChain 31 37 + 65: 7(fvec4) Load 64 + 66: 34(ptr) AccessChain 31 37 + 67: 7(fvec4) Load 66 + 68: 34(ptr) AccessChain 31 33 + 69: 7(fvec4) Load 68 + 70: 43(bvec4) FOrdLessThan 67 69 + 71: 7(fvec4) Select 70 65 63 + 72: 7(fvec4) FAdd 61 71 + 73: 34(ptr) AccessChain 31 33 + 74: 7(fvec4) Load 73 + 75: 49(ptr) AccessChain 31 53 + 76: 6(float) Load 75 + 77: 7(fvec4) CompositeConstruct 76 76 76 76 + 78: 34(ptr) AccessChain 31 40 + 79: 7(fvec4) Load 78 + 80: 43(bvec4) FOrdNotEqual 79 45 + 81: 7(fvec4) Select 80 77 74 + 82: 7(fvec4) FAdd 72 81 + ReturnValue 82 + FunctionEnd + 11(scalarCond(): 7(fvec4) Function None 8 + 12: Label + 85(ret): 24(ptr) Variable Function + 86: 24(ptr) Variable Function + 87: 49(ptr) AccessChain 31 53 + 88: 6(float) Load 87 + 89: 49(ptr) AccessChain 31 48 + 90: 6(float) Load 89 + 91: 13(bool) FOrdNotEqual 88 90 + SelectionMerge 93 None + BranchConditional 91 92 99 + 92: Label + 94: 49(ptr) AccessChain 31 53 + 95: 6(float) Load 94 + 96: 34(ptr) AccessChain 31 33 + 97: 7(fvec4) Load 96 + 98: 7(fvec4) VectorTimesScalar 97 95 + Store 86 98 + Branch 93 + 99: Label + Store 86 101 + Branch 93 + 93: Label + 102: 7(fvec4) Load 86 + Store 85(ret) 102 + 103: 7(fvec4) Load 85(ret) + ReturnValue 103 + FunctionEnd +22(fbSelect(vb2;vf2;vf2;): 16(fvec2) Function None 18 + 19(cnd): 15(ptr) FunctionParameter + 20(src0): 17(ptr) FunctionParameter + 21(src1): 17(ptr) FunctionParameter + 23: Label + 106: 16(fvec2) Load 21(src1) + 107: 16(fvec2) Load 20(src0) + 108: 14(bvec2) Load 19(cnd) + 109: 16(fvec2) Select 108 107 106 + ReturnValue 109 + FunctionEnd +27(@PixelShaderFunction(vf4;): 7(fvec4) Function None 25 + 26(input): 24(ptr) FunctionParameter + 28: Label + 113(a): 112(ptr) Variable Function + 115(b): 112(ptr) Variable Function + 117(c): 112(ptr) Variable Function + 119(d): 112(ptr) Variable Function + 120(ret): 24(ptr) Variable Function + 140(e): 112(ptr) Variable Function + 141: 112(ptr) Variable Function + 152: 112(ptr) Variable Function + 161(f): 24(ptr) Variable Function + 162: 24(ptr) Variable Function + 200(param): 15(ptr) Variable Function + 201(param): 17(ptr) Variable Function + 202(param): 17(ptr) Variable Function + Store 113(a) 114 + Store 115(b) 116 + Store 117(c) 118 + Store 119(d) 118 + 121: 32(int) Load 113(a) + 122: 6(float) ConvertSToF 121 + 123: 7(fvec4) Load 26(input) + 124: 7(fvec4) VectorTimesScalar 123 122 + 125: 32(int) Load 115(b) + 126: 6(float) ConvertSToF 125 + 127: 7(fvec4) Load 26(input) + 128: 7(fvec4) VectorTimesScalar 127 126 + 129: 7(fvec4) FAdd 124 128 + 130: 32(int) Load 117(c) + 131: 6(float) ConvertSToF 130 + 132: 7(fvec4) Load 26(input) + 133: 7(fvec4) VectorTimesScalar 132 131 + 134: 7(fvec4) FAdd 129 133 + 135: 32(int) Load 119(d) + 136: 6(float) ConvertSToF 135 + 137: 7(fvec4) Load 26(input) + 138: 7(fvec4) VectorTimesScalar 137 136 + 139: 7(fvec4) FAdd 134 138 + Store 120(ret) 139 + 142: 32(int) Load 115(b) + 145: 13(bool) INotEqual 142 144 + SelectionMerge 147 None + BranchConditional 145 146 149 + 146: Label + 148: 32(int) Load 119(d) + Store 117(c) 148 + Store 141 148 + Branch 147 + 149: Label + Store 141 150 + Branch 147 + 147: Label + 151: 32(int) Load 141 + Store 113(a) 151 + Store 140(e) 151 + 153: 32(int) Load 113(a) + 154: 13(bool) INotEqual 153 144 + SelectionMerge 156 None + BranchConditional 154 155 158 + 155: Label + 157: 32(int) Load 117(c) + Store 119(d) 157 + Store 152 157 + Branch 156 + 158: Label + Store 152 159 + Branch 156 + 156: Label + 160: 32(int) Load 152 + Store 115(b) 160 + 164: 163(ptr) AccessChain 120(ret) 144 + 165: 6(float) Load 164 + 167: 163(ptr) AccessChain 26(input) 166 + 168: 6(float) Load 167 + 169: 13(bool) FOrdLessThan 165 168 + SelectionMerge 171 None + BranchConditional 169 170 176 + 170: Label + 172: 32(int) Load 117(c) + 173: 6(float) ConvertSToF 172 + 174: 7(fvec4) Load 26(input) + 175: 7(fvec4) VectorTimesScalar 174 173 + Store 162 175 + Branch 171 + 176: Label + 177: 32(int) Load 119(d) + 178: 6(float) ConvertSToF 177 + 179: 7(fvec4) Load 26(input) + 180: 7(fvec4) VectorTimesScalar 179 178 + Store 162 180 + Branch 171 + 171: Label + 181: 7(fvec4) Load 162 + Store 161(f) 181 + 182: 32(int) Load 140(e) + 183: 6(float) ConvertSToF 182 + 184: 7(fvec4) Load 120(ret) + 185: 7(fvec4) VectorTimesScalar 184 183 + 186: 7(fvec4) Load 161(f) + 187: 7(fvec4) FAdd 185 186 + 188: 7(fvec4) FunctionCall 9(vectorCond() + 189: 7(fvec4) FAdd 187 188 + 190: 7(fvec4) FunctionCall 11(scalarCond() + 191: 7(fvec4) FAdd 189 190 + Store 200(param) 194 + Store 201(param) 196 + Store 202(param) 199 + 203: 16(fvec2) FunctionCall 22(fbSelect(vb2;vf2;vf2;) 200(param) 201(param) 202(param) + 205: 6(float) CompositeExtract 203 0 + 206: 6(float) CompositeExtract 203 1 + 207: 7(fvec4) CompositeConstruct 205 206 204 204 + 208: 7(fvec4) FAdd 191 207 + ReturnValue 208 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.constructexpr.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.constructexpr.frag.out index 90c667a..e657b51 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.constructexpr.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.constructexpr.frag.out @@ -41,13 +41,13 @@ gl_FragCoord origin is upper left 0:? Sequence 0:4 Sequence 0:4 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:4 color: direct index for structure ( temp 4-component vector of float) 0:4 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:4 Constant: 0:4 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -95,16 +95,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:4 Sequence 0:4 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:4 color: direct index for structure ( temp 4-component vector of float) 0:4 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:4 Constant: 0:4 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 40 Capability Shader @@ -118,8 +118,8 @@ gl_FragCoord origin is upper left MemberName 8(PS_OUTPUT) 0 "color" Name 10 "@main(" Name 27 "ps_output" - Name 37 "color" - Decorate 37(color) Location 0 + Name 37 "@entryPointOutput.color" + Decorate 37(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -146,12 +146,12 @@ gl_FragCoord origin is upper left 30: 7(fvec4) ConstantComposite 29 29 29 29 31: TypePointer Function 7(fvec4) 36: TypePointer Output 7(fvec4) - 37(color): 36(ptr) Variable Output +37(@entryPointOutput.color): 36(ptr) Variable Output 4(main): 2 Function None 3 5: Label 38:8(PS_OUTPUT) FunctionCall 10(@main() 39: 7(fvec4) CompositeExtract 38 0 - Store 37(color) 39 + Store 37(@entryPointOutput.color) 39 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out index 3d493f7..f1f9cc6 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out @@ -1,6 +1,6 @@ hlsl.deadFunctionMissingBody.vert // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 18 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.depthGreater.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.depthGreater.frag.out index f1bbb5b..fe398d5 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.depthGreater.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.depthGreater.frag.out @@ -50,7 +50,7 @@ using depth_greater 0:? 'depth' ( out float FragDepth) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 20 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.depthLess.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.depthLess.frag.out index 7a3e926..a22768f 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.depthLess.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.depthLess.frag.out @@ -42,7 +42,7 @@ using depth_less 0:? '@entryPointOutput' ( out float FragDepth) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 16 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.discard.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.discard.frag.out index 508ac5a..f24b496 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.discard.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.discard.frag.out @@ -108,7 +108,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 50 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.doLoop.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.doLoop.frag.out index b427965..ce2ad42 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.doLoop.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.doLoop.frag.out @@ -2,42 +2,72 @@ hlsl.doLoop.frag Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:2 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) +0:2 Function Definition: @PixelShaderFunction(f1; ( temp 4-component vector of float) 0:2 Function Parameters: -0:2 'input' ( in 4-component vector of float) +0:2 'input' ( in float) 0:? Sequence -0:3 Loop with condition not tested first +0:3 Loop with condition not tested first: Unroll 0:3 Loop Condition 0:3 Constant: 0:3 false (const bool) 0:3 No loop body -0:4 Loop with condition not tested first +0:4 Loop with condition not tested first: Unroll 0:4 Loop Condition 0:4 Constant: 0:4 false (const bool) 0:4 No loop body 0:5 Loop with condition not tested first 0:5 Loop Condition -0:5 all ( temp bool) -0:5 Equal ( temp 4-component vector of bool) -0:5 'input' ( in 4-component vector of float) -0:5 'input' ( in 4-component vector of float) +0:5 Compare Greater Than ( temp bool) +0:5 'input' ( in float) +0:5 Constant: +0:5 2.000000 0:5 Loop Body -0:5 Branch: Return with expression -0:5 'input' ( in 4-component vector of float) +0:? Sequence +0:5 Branch: Return with expression +0:5 Construct vec4 ( temp 4-component vector of float) +0:5 'input' ( in float) +0:6 Loop with condition not tested first +0:6 Loop Condition +0:6 Compare Less Than ( temp bool) +0:6 'input' ( in float) +0:6 Constant: +0:6 10.000000 +0:6 Loop Body +0:6 Pre-Increment ( temp float) +0:6 'input' ( in float) +0:7 Loop with condition not tested first +0:7 Loop Condition +0:7 Compare Less Than ( temp bool) +0:7 Pre-Increment ( temp float) +0:7 'input' ( in float) +0:7 Constant: +0:7 10.000000 +0:7 Loop Body +0:7 Loop with condition tested first +0:7 Loop Condition +0:7 Compare Less Than ( temp bool) +0:7 Pre-Increment ( temp float) +0:7 'input' ( in float) +0:7 Constant: +0:7 10.000000 +0:7 No loop body +0:8 Branch: Return with expression +0:8 Construct vec4 ( temp 4-component vector of float) +0:8 'input' ( in float) 0:2 Function Definition: PixelShaderFunction( ( temp void) 0:2 Function Parameters: 0:? Sequence -0:2 move second child to first child ( temp 4-component vector of float) -0:? 'input' ( temp 4-component vector of float) -0:? 'input' (layout( location=0) in 4-component vector of float) +0:2 move second child to first child ( temp float) +0:? 'input' ( temp float) +0:? 'input' (layout( location=0) in float) 0:2 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:2 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) -0:? 'input' ( temp 4-component vector of float) +0:2 Function Call: @PixelShaderFunction(f1; ( temp 4-component vector of float) +0:? 'input' ( temp float) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'input' (layout( location=0) in 4-component vector of float) +0:? 'input' (layout( location=0) in float) Linked fragment stage: @@ -46,93 +76,125 @@ Linked fragment stage: Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:2 Function Definition: @PixelShaderFunction(vf4; ( temp 4-component vector of float) +0:2 Function Definition: @PixelShaderFunction(f1; ( temp 4-component vector of float) 0:2 Function Parameters: -0:2 'input' ( in 4-component vector of float) +0:2 'input' ( in float) 0:? Sequence -0:3 Loop with condition not tested first +0:3 Loop with condition not tested first: Unroll 0:3 Loop Condition 0:3 Constant: 0:3 false (const bool) 0:3 No loop body -0:4 Loop with condition not tested first +0:4 Loop with condition not tested first: Unroll 0:4 Loop Condition 0:4 Constant: 0:4 false (const bool) 0:4 No loop body 0:5 Loop with condition not tested first 0:5 Loop Condition -0:5 all ( temp bool) -0:5 Equal ( temp 4-component vector of bool) -0:5 'input' ( in 4-component vector of float) -0:5 'input' ( in 4-component vector of float) +0:5 Compare Greater Than ( temp bool) +0:5 'input' ( in float) +0:5 Constant: +0:5 2.000000 0:5 Loop Body -0:5 Branch: Return with expression -0:5 'input' ( in 4-component vector of float) +0:? Sequence +0:5 Branch: Return with expression +0:5 Construct vec4 ( temp 4-component vector of float) +0:5 'input' ( in float) +0:6 Loop with condition not tested first +0:6 Loop Condition +0:6 Compare Less Than ( temp bool) +0:6 'input' ( in float) +0:6 Constant: +0:6 10.000000 +0:6 Loop Body +0:6 Pre-Increment ( temp float) +0:6 'input' ( in float) +0:7 Loop with condition not tested first +0:7 Loop Condition +0:7 Compare Less Than ( temp bool) +0:7 Pre-Increment ( temp float) +0:7 'input' ( in float) +0:7 Constant: +0:7 10.000000 +0:7 Loop Body +0:7 Loop with condition tested first +0:7 Loop Condition +0:7 Compare Less Than ( temp bool) +0:7 Pre-Increment ( temp float) +0:7 'input' ( in float) +0:7 Constant: +0:7 10.000000 +0:7 No loop body +0:8 Branch: Return with expression +0:8 Construct vec4 ( temp 4-component vector of float) +0:8 'input' ( in float) 0:2 Function Definition: PixelShaderFunction( ( temp void) 0:2 Function Parameters: 0:? Sequence -0:2 move second child to first child ( temp 4-component vector of float) -0:? 'input' ( temp 4-component vector of float) -0:? 'input' (layout( location=0) in 4-component vector of float) +0:2 move second child to first child ( temp float) +0:? 'input' ( temp float) +0:? 'input' (layout( location=0) in float) 0:2 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:2 Function Call: @PixelShaderFunction(vf4; ( temp 4-component vector of float) -0:? 'input' ( temp 4-component vector of float) +0:2 Function Call: @PixelShaderFunction(f1; ( temp 4-component vector of float) +0:? 'input' ( temp float) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'input' (layout( location=0) in 4-component vector of float) +0:? 'input' (layout( location=0) in float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 44 +// Generated by (magic number): 80003 +// Id's are bound by 71 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "PixelShaderFunction" 37 40 + EntryPoint Fragment 4 "PixelShaderFunction" 64 67 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "PixelShaderFunction" - Name 11 "@PixelShaderFunction(vf4;" + Name 11 "@PixelShaderFunction(f1;" Name 10 "input" - Name 35 "input" - Name 37 "input" - Name 40 "@entryPointOutput" - Name 41 "param" - Decorate 37(input) Location 0 - Decorate 40(@entryPointOutput) Location 0 + Name 62 "input" + Name 64 "input" + Name 67 "@entryPointOutput" + Name 68 "param" + Decorate 64(input) Location 0 + Decorate 67(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 - 7: TypeVector 6(float) 4 - 8: TypePointer Function 7(fvec4) - 9: TypeFunction 7(fvec4) 8(ptr) + 7: TypePointer Function 6(float) + 8: TypeVector 6(float) 4 + 9: TypeFunction 8(fvec4) 7(ptr) 17: TypeBool 18: 17(bool) ConstantFalse - 31: TypeVector 17(bool) 4 - 36: TypePointer Input 7(fvec4) - 37(input): 36(ptr) Variable Input - 39: TypePointer Output 7(fvec4) -40(@entryPointOutput): 39(ptr) Variable Output + 31: 6(float) Constant 1073741824 + 38: 6(float) Constant 1065353216 + 41: 6(float) Constant 1092616192 + 63: TypePointer Input 6(float) + 64(input): 63(ptr) Variable Input + 66: TypePointer Output 8(fvec4) +67(@entryPointOutput): 66(ptr) Variable Output 4(PixelShaderFunction): 2 Function None 3 5: Label - 35(input): 8(ptr) Variable Function - 41(param): 8(ptr) Variable Function - 38: 7(fvec4) Load 37(input) - Store 35(input) 38 - 42: 7(fvec4) Load 35(input) - Store 41(param) 42 - 43: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 41(param) - Store 40(@entryPointOutput) 43 + 62(input): 7(ptr) Variable Function + 68(param): 7(ptr) Variable Function + 65: 6(float) Load 64(input) + Store 62(input) 65 + 69: 6(float) Load 62(input) + Store 68(param) 69 + 70: 8(fvec4) FunctionCall 11(@PixelShaderFunction(f1;) 68(param) + Store 67(@entryPointOutput) 70 Return FunctionEnd -11(@PixelShaderFunction(vf4;): 7(fvec4) Function None 9 - 10(input): 8(ptr) FunctionParameter +11(@PixelShaderFunction(f1;): 8(fvec4) Function None 9 + 10(input): 7(ptr) FunctionParameter 12: Label Branch 13 13: Label - LoopMerge 15 16 None + LoopMerge 15 16 Unroll Branch 14 14: Label Branch 16 @@ -141,7 +203,7 @@ gl_FragCoord origin is upper left 15: Label Branch 19 19: Label - LoopMerge 21 22 None + LoopMerge 21 22 Unroll Branch 20 20: Label Branch 22 @@ -153,15 +215,57 @@ gl_FragCoord origin is upper left LoopMerge 25 26 None Branch 24 24: Label - 27: 7(fvec4) Load 10(input) - ReturnValue 27 + 27: 6(float) Load 10(input) + 28: 8(fvec4) CompositeConstruct 27 27 27 27 + ReturnValue 28 26: Label - 29: 7(fvec4) Load 10(input) - 30: 7(fvec4) Load 10(input) - 32: 31(bvec4) FOrdEqual 29 30 - 33: 17(bool) All 32 - BranchConditional 33 23 25 + 30: 6(float) Load 10(input) + 32: 17(bool) FOrdGreaterThan 30 31 + BranchConditional 32 23 25 25: Label - 34: 7(fvec4) Undef - ReturnValue 34 + Branch 33 + 33: Label + LoopMerge 35 36 None + Branch 34 + 34: Label + 37: 6(float) Load 10(input) + 39: 6(float) FAdd 37 38 + Store 10(input) 39 + Branch 36 + 36: Label + 40: 6(float) Load 10(input) + 42: 17(bool) FOrdLessThan 40 41 + BranchConditional 42 33 35 + 35: Label + Branch 43 + 43: Label + LoopMerge 45 46 None + Branch 44 + 44: Label + Branch 47 + 47: Label + LoopMerge 49 50 None + Branch 51 + 51: Label + 52: 6(float) Load 10(input) + 53: 6(float) FAdd 52 38 + Store 10(input) 53 + 54: 17(bool) FOrdLessThan 53 41 + BranchConditional 54 48 49 + 48: Label + Branch 50 + 50: Label + Branch 47 + 49: Label + Branch 46 + 46: Label + 55: 6(float) Load 10(input) + 56: 6(float) FAdd 55 38 + Store 10(input) 56 + 57: 17(bool) FOrdLessThan 56 41 + BranchConditional 57 43 45 + 45: Label + 58: 6(float) Load 10(input) + 59: 8(fvec4) CompositeConstruct 58 58 58 58 + ReturnValue 59 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.frag.out index 7d11393..4a61d1d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.frag.out @@ -11,16 +11,16 @@ gl_FragCoord origin is upper left 0:10 Function Definition: main( ( temp void) 0:10 Function Parameters: 0:? Sequence -0:10 move second child to first child ( temp structure{}) -0:? 'i' ( temp structure{}) -0:? 'i' (layout( location=0) in structure{}) +0:10 Sequence +0:10 move second child to first child ( temp structure{}) +0:? 'i' ( temp structure{}) +0:? 'i' ( in structure{}) 0:10 Sequence 0:10 move second child to first child ( temp structure{}) 0:? '@entryPointOutput' ( out structure{}) 0:10 Function Call: @main(struct-ps_in1; ( temp structure{}) 0:? 'i' ( temp structure{}) 0:? Linker Objects -0:? 'i' (layout( location=0) in structure{}) Linked fragment stage: @@ -38,25 +38,25 @@ gl_FragCoord origin is upper left 0:10 Function Definition: main( ( temp void) 0:10 Function Parameters: 0:? Sequence -0:10 move second child to first child ( temp structure{}) -0:? 'i' ( temp structure{}) -0:? 'i' (layout( location=0) in structure{}) +0:10 Sequence +0:10 move second child to first child ( temp structure{}) +0:? 'i' ( temp structure{}) +0:? 'i' ( in structure{}) 0:10 Sequence 0:10 move second child to first child ( temp structure{}) 0:? '@entryPointOutput' ( out structure{}) 0:10 Function Call: @main(struct-ps_in1; ( temp structure{}) 0:? 'i' ( temp structure{}) 0:? Linker Objects -0:? 'i' (layout( location=0) in structure{}) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 27 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 20 23 + EntryPoint Fragment 4 "main" ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -69,7 +69,6 @@ gl_FragCoord origin is upper left Name 20 "i" Name 23 "@entryPointOutput" Name 24 "param" - Decorate 20(i) Location 0 2: TypeVoid 3: TypeFunction 2 6(ps_in): TypeStruct diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.vert.out index 64446bd..c901c19 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.emptystructreturn.vert.out @@ -14,12 +14,12 @@ Shader version: 500 0:10 move second child to first child ( temp structure{}) 0:? 'i' ( temp structure{}) 0:? 'i' ( in structure{}) -0:10 move second child to first child ( temp structure{}) -0:? '@entryPointOutput' (layout( location=0) out structure{}) -0:10 Function Call: @main(struct-vs_in1; ( temp structure{}) -0:? 'i' ( temp structure{}) +0:10 Sequence +0:10 move second child to first child ( temp structure{}) +0:? '@entryPointOutput' ( out structure{}) +0:10 Function Call: @main(struct-vs_in1; ( temp structure{}) +0:? 'i' ( temp structure{}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{}) Linked vertex stage: @@ -40,21 +40,21 @@ Shader version: 500 0:10 move second child to first child ( temp structure{}) 0:? 'i' ( temp structure{}) 0:? 'i' ( in structure{}) -0:10 move second child to first child ( temp structure{}) -0:? '@entryPointOutput' (layout( location=0) out structure{}) -0:10 Function Call: @main(struct-vs_in1; ( temp structure{}) -0:? 'i' ( temp structure{}) +0:10 Sequence +0:10 move second child to first child ( temp structure{}) +0:? '@entryPointOutput' ( out structure{}) +0:10 Function Call: @main(struct-vs_in1; ( temp structure{}) +0:? 'i' ( temp structure{}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{}) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 27 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 20 23 + EntryPoint Vertex 4 "main" Source HLSL 500 Name 4 "main" Name 6 "vs_in" @@ -66,7 +66,6 @@ Shader version: 500 Name 20 "i" Name 23 "@entryPointOutput" Name 24 "param" - Decorate 23(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6(vs_in): TypeStruct diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry-in.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry-in.frag.out index 81441cb..063804d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry-in.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry-in.frag.out @@ -57,33 +57,28 @@ gl_FragCoord origin is upper left 0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2}) 0:13 Constant: 0:13 0 (const int) -0:13 v: direct index for structure ( temp 2-component vector of float) -0:13 'i' (layout( location=0) in structure{ temp 2-component vector of float v, temp 2-component vector of int i2}) -0:13 Constant: -0:13 0 (const int) +0:? 'i.v' (layout( location=0) in 2-component vector of float) 0:13 move second child to first child ( temp 4-component vector of float) 0:13 fragCoord: direct index for structure ( temp 4-component vector of float) 0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2}) 0:13 Constant: 0:13 1 (const int) -0:? 'i_fragCoord' ( in 4-component vector of float FragCoord) +0:? 'i.fragCoord' ( in 4-component vector of float FragCoord) 0:13 move second child to first child ( temp 2-component vector of int) 0:13 i2: direct index for structure ( temp 2-component vector of int) 0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2}) 0:13 Constant: 0:13 2 (const int) -0:13 i2: direct index for structure ( temp 2-component vector of int) -0:13 'i' (layout( location=0) in structure{ temp 2-component vector of float v, temp 2-component vector of int i2}) -0:13 Constant: -0:13 1 (const int) +0:? 'i.i2' (layout( location=1) flat in 2-component vector of int) 0:13 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:13 Function Call: @PixelShaderFunction(struct-InParam-vf2-vf4-vi21; ( temp 4-component vector of float) 0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2}) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'i' (layout( location=0) in structure{ temp 2-component vector of float v, temp 2-component vector of int i2}) -0:? 'i_fragCoord' ( in 4-component vector of float FragCoord) +0:? 'i.fragCoord' ( in 4-component vector of float FragCoord) +0:? 'i.v' (layout( location=0) in 2-component vector of float) +0:? 'i.i2' (layout( location=1) flat in 2-component vector of int) Linked fragment stage: @@ -147,42 +142,37 @@ gl_FragCoord origin is upper left 0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2}) 0:13 Constant: 0:13 0 (const int) -0:13 v: direct index for structure ( temp 2-component vector of float) -0:13 'i' (layout( location=0) in structure{ temp 2-component vector of float v, temp 2-component vector of int i2}) -0:13 Constant: -0:13 0 (const int) +0:? 'i.v' (layout( location=0) in 2-component vector of float) 0:13 move second child to first child ( temp 4-component vector of float) 0:13 fragCoord: direct index for structure ( temp 4-component vector of float) 0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2}) 0:13 Constant: 0:13 1 (const int) -0:? 'i_fragCoord' ( in 4-component vector of float FragCoord) +0:? 'i.fragCoord' ( in 4-component vector of float FragCoord) 0:13 move second child to first child ( temp 2-component vector of int) 0:13 i2: direct index for structure ( temp 2-component vector of int) 0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2}) 0:13 Constant: 0:13 2 (const int) -0:13 i2: direct index for structure ( temp 2-component vector of int) -0:13 'i' (layout( location=0) in structure{ temp 2-component vector of float v, temp 2-component vector of int i2}) -0:13 Constant: -0:13 1 (const int) +0:? 'i.i2' (layout( location=1) flat in 2-component vector of int) 0:13 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:13 Function Call: @PixelShaderFunction(struct-InParam-vf2-vf4-vi21; ( temp 4-component vector of float) 0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2}) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'i' (layout( location=0) in structure{ temp 2-component vector of float v, temp 2-component vector of int i2}) -0:? 'i_fragCoord' ( in 4-component vector of float FragCoord) +0:? 'i.fragCoord' ( in 4-component vector of float FragCoord) +0:? 'i.v' (layout( location=0) in 2-component vector of float) +0:? 'i.i2' (layout( location=1) flat in 2-component vector of int) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 77 +// Generated by (magic number): 80003 +// Id's are bound by 74 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "PixelShaderFunction" 56 63 73 + EntryPoint Fragment 4 "PixelShaderFunction" 55 60 65 70 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "PixelShaderFunction" @@ -200,16 +190,16 @@ gl_FragCoord origin is upper left Name 40 "ret2" Name 41 "param" Name 53 "i" - Name 54 "InParam" - MemberName 54(InParam) 0 "v" - MemberName 54(InParam) 1 "i2" - Name 56 "i" - Name 63 "i_fragCoord" - Name 73 "@entryPointOutput" - Name 74 "param" - Decorate 56(i) Location 0 - Decorate 63(i_fragCoord) BuiltIn FragCoord - Decorate 73(@entryPointOutput) Location 0 + Name 55 "i.v" + Name 60 "i.fragCoord" + Name 65 "i.i2" + Name 70 "@entryPointOutput" + Name 71 "param" + Decorate 55(i.v) Location 0 + Decorate 60(i.fragCoord) BuiltIn FragCoord + Decorate 65(i.i2) Flat + Decorate 65(i.i2) Location 1 + Decorate 70(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -228,37 +218,34 @@ gl_FragCoord origin is upper left 27: 9(int) Constant 1 28: 22(int) Constant 0 44: TypePointer Function 8(fvec4) - 54(InParam): TypeStruct 7(fvec2) 10(ivec2) - 55: TypePointer Input 54(InParam) - 56(i): 55(ptr) Variable Input - 57: TypePointer Input 7(fvec2) - 60: TypePointer Function 7(fvec2) - 62: TypePointer Input 8(fvec4) - 63(i_fragCoord): 62(ptr) Variable Input - 66: 9(int) Constant 2 - 67: TypePointer Input 10(ivec2) - 70: TypePointer Function 10(ivec2) - 72: TypePointer Output 8(fvec4) -73(@entryPointOutput): 72(ptr) Variable Output + 54: TypePointer Input 7(fvec2) + 55(i.v): 54(ptr) Variable Input + 57: TypePointer Function 7(fvec2) + 59: TypePointer Input 8(fvec4) + 60(i.fragCoord): 59(ptr) Variable Input + 63: 9(int) Constant 2 + 64: TypePointer Input 10(ivec2) + 65(i.i2): 64(ptr) Variable Input + 67: TypePointer Function 10(ivec2) + 69: TypePointer Output 8(fvec4) +70(@entryPointOutput): 69(ptr) Variable Output 4(PixelShaderFunction): 2 Function None 3 5: Label 53(i): 12(ptr) Variable Function - 74(param): 12(ptr) Variable Function - 58: 57(ptr) AccessChain 56(i) 21 - 59: 7(fvec2) Load 58 - 61: 60(ptr) AccessChain 53(i) 21 - Store 61 59 - 64: 8(fvec4) Load 63(i_fragCoord) - 65: 44(ptr) AccessChain 53(i) 27 - Store 65 64 - 68: 67(ptr) AccessChain 56(i) 27 - 69: 10(ivec2) Load 68 - 71: 70(ptr) AccessChain 53(i) 66 - Store 71 69 - 75: 11(InParam) Load 53(i) - Store 74(param) 75 - 76: 8(fvec4) FunctionCall 19(@PixelShaderFunction(struct-InParam-vf2-vf4-vi21;) 74(param) - Store 73(@entryPointOutput) 76 + 71(param): 12(ptr) Variable Function + 56: 7(fvec2) Load 55(i.v) + 58: 57(ptr) AccessChain 53(i) 21 + Store 58 56 + 61: 8(fvec4) Load 60(i.fragCoord) + 62: 44(ptr) AccessChain 53(i) 27 + Store 62 61 + 66: 10(ivec2) Load 65(i.i2) + 68: 67(ptr) AccessChain 53(i) 63 + Store 68 66 + 72: 11(InParam) Load 53(i) + Store 71(param) 72 + 73: 8(fvec4) FunctionCall 19(@PixelShaderFunction(struct-InParam-vf2-vf4-vi21;) 71(param) + Store 70(@entryPointOutput) 73 Return FunctionEnd 15(fun(struct-InParam-vf2-vf4-vi21;): 6(float) Function None 13 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry-out.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry-out.frag.out index 1324112..7d7bb6f 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry-out.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry-out.frag.out @@ -86,26 +86,26 @@ gl_FragCoord origin is upper left 0:? 'out1' ( temp 4-component vector of float) 0:13 Sequence 0:13 move second child to first child ( temp 2-component vector of float) -0:? 'v' (layout( location=2) out 2-component vector of float) +0:? 'out2.v' (layout( location=2) out 2-component vector of float) 0:13 v: direct index for structure ( temp 2-component vector of float) 0:? 'out2' ( temp structure{ temp 2-component vector of float v, temp 2-component vector of int i}) 0:13 Constant: 0:13 0 (const int) 0:13 move second child to first child ( temp 2-component vector of int) -0:? 'i' (layout( location=3) out 2-component vector of int) +0:? 'out2.i' (layout( location=3) out 2-component vector of int) 0:13 i: direct index for structure ( temp 2-component vector of int) 0:? 'out2' ( temp structure{ temp 2-component vector of float v, temp 2-component vector of int i}) 0:13 Constant: 0:13 1 (const int) 0:13 Sequence 0:13 move second child to first child ( temp 2-component vector of float) -0:? 'v' (layout( location=4) out 2-component vector of float) +0:? 'out3.v' (layout( location=4) out 2-component vector of float) 0:13 v: direct index for structure ( temp 2-component vector of float) 0:? 'out3' ( temp structure{ temp 2-component vector of float v, temp 2-component vector of int i}) 0:13 Constant: 0:13 0 (const int) 0:13 move second child to first child ( temp 2-component vector of int) -0:? 'i' (layout( location=5) out 2-component vector of int) +0:? 'out3.i' (layout( location=5) out 2-component vector of int) 0:13 i: direct index for structure ( temp 2-component vector of int) 0:? 'out3' ( temp structure{ temp 2-component vector of float v, temp 2-component vector of int i}) 0:13 Constant: @@ -114,10 +114,10 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) 0:? 'out1' (layout( location=1) out 4-component vector of float) -0:? 'v' (layout( location=2) out 2-component vector of float) -0:? 'i' (layout( location=3) out 2-component vector of int) -0:? 'v' (layout( location=4) out 2-component vector of float) -0:? 'i' (layout( location=5) out 2-component vector of int) +0:? 'out2.v' (layout( location=2) out 2-component vector of float) +0:? 'out2.i' (layout( location=3) out 2-component vector of int) +0:? 'out3.v' (layout( location=4) out 2-component vector of float) +0:? 'out3.i' (layout( location=5) out 2-component vector of int) Linked fragment stage: @@ -210,26 +210,26 @@ gl_FragCoord origin is upper left 0:? 'out1' ( temp 4-component vector of float) 0:13 Sequence 0:13 move second child to first child ( temp 2-component vector of float) -0:? 'v' (layout( location=2) out 2-component vector of float) +0:? 'out2.v' (layout( location=2) out 2-component vector of float) 0:13 v: direct index for structure ( temp 2-component vector of float) 0:? 'out2' ( temp structure{ temp 2-component vector of float v, temp 2-component vector of int i}) 0:13 Constant: 0:13 0 (const int) 0:13 move second child to first child ( temp 2-component vector of int) -0:? 'i' (layout( location=3) out 2-component vector of int) +0:? 'out2.i' (layout( location=3) out 2-component vector of int) 0:13 i: direct index for structure ( temp 2-component vector of int) 0:? 'out2' ( temp structure{ temp 2-component vector of float v, temp 2-component vector of int i}) 0:13 Constant: 0:13 1 (const int) 0:13 Sequence 0:13 move second child to first child ( temp 2-component vector of float) -0:? 'v' (layout( location=4) out 2-component vector of float) +0:? 'out3.v' (layout( location=4) out 2-component vector of float) 0:13 v: direct index for structure ( temp 2-component vector of float) 0:? 'out3' ( temp structure{ temp 2-component vector of float v, temp 2-component vector of int i}) 0:13 Constant: 0:13 0 (const int) 0:13 move second child to first child ( temp 2-component vector of int) -0:? 'i' (layout( location=5) out 2-component vector of int) +0:? 'out3.i' (layout( location=5) out 2-component vector of int) 0:13 i: direct index for structure ( temp 2-component vector of int) 0:? 'out3' ( temp structure{ temp 2-component vector of float v, temp 2-component vector of int i}) 0:13 Constant: @@ -238,13 +238,13 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) 0:? 'out1' (layout( location=1) out 4-component vector of float) -0:? 'v' (layout( location=2) out 2-component vector of float) -0:? 'i' (layout( location=3) out 2-component vector of int) -0:? 'v' (layout( location=4) out 2-component vector of float) -0:? 'i' (layout( location=5) out 2-component vector of int) +0:? 'out2.v' (layout( location=2) out 2-component vector of float) +0:? 'out2.i' (layout( location=3) out 2-component vector of int) +0:? 'out3.v' (layout( location=4) out 2-component vector of float) +0:? 'out3.i' (layout( location=5) out 2-component vector of int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 89 Capability Shader @@ -277,17 +277,17 @@ gl_FragCoord origin is upper left Name 67 "param" Name 68 "param" Name 73 "out1" - Name 76 "v" - Name 80 "i" - Name 83 "v" - Name 86 "i" + Name 76 "out2.v" + Name 80 "out2.i" + Name 83 "out3.v" + Name 86 "out3.i" Decorate 57(input) Location 0 Decorate 60(@entryPointOutput) Location 0 Decorate 73(out1) Location 1 - Decorate 76(v) Location 2 - Decorate 80(i) Location 3 - Decorate 83(v) Location 4 - Decorate 86(i) Location 5 + Decorate 76(out2.v) Location 2 + Decorate 80(out2.i) Location 3 + Decorate 83(out3.v) Location 4 + Decorate 86(out3.i) Location 5 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -322,11 +322,11 @@ gl_FragCoord origin is upper left 60(@entryPointOutput): 59(ptr) Variable Output 73(out1): 59(ptr) Variable Output 75: TypePointer Output 7(fvec2) - 76(v): 75(ptr) Variable Output + 76(out2.v): 75(ptr) Variable Output 79: TypePointer Output 9(ivec2) - 80(i): 79(ptr) Variable Output - 83(v): 75(ptr) Variable Output - 86(i): 79(ptr) Variable Output + 80(out2.i): 79(ptr) Variable Output + 83(out3.v): 75(ptr) Variable Output + 86(out3.i): 79(ptr) Variable Output 4(PixelShaderFunction): 2 Function None 3 5: Label 55(input): 17(ptr) Variable Function @@ -353,16 +353,16 @@ gl_FragCoord origin is upper left Store 73(out1) 74 77: 28(ptr) AccessChain 62(out2) 25 78: 7(fvec2) Load 77 - Store 76(v) 78 + Store 76(out2.v) 78 81: 33(ptr) AccessChain 62(out2) 30 82: 9(ivec2) Load 81 - Store 80(i) 82 + Store 80(out2.i) 82 84: 28(ptr) AccessChain 63(out3) 25 85: 7(fvec2) Load 84 - Store 83(v) 85 + Store 83(out3.v) 85 87: 33(ptr) AccessChain 63(out3) 30 88: 9(ivec2) Load 87 - Store 86(i) 88 + Store 86(out3.i) 88 Return FunctionEnd 14(fun(struct-OutParam-vf2-vi21;): 2 Function None 12 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry.rename.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry.rename.frag.out index c6a4335..9a555dd 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry.rename.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.entry.rename.frag.out @@ -24,14 +24,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:11 Sequence 0:11 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:11 Color: direct index for structure ( temp 4-component vector of float) 0:11 Function Call: @main_in_spv( ( temp structure{ temp 4-component vector of float Color}) 0:11 Constant: 0:11 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int also_not_the_entry_point}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -62,17 +62,17 @@ gl_FragCoord origin is upper left 0:? Sequence 0:11 Sequence 0:11 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:11 Color: direct index for structure ( temp 4-component vector of float) 0:11 Function Call: @main_in_spv( ( temp structure{ temp 4-component vector of float Color}) 0:11 Constant: 0:11 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int also_not_the_entry_point}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 32 Capability Shader @@ -87,11 +87,11 @@ gl_FragCoord origin is upper left MemberName 10(PS_OUTPUT) 0 "Color" Name 12 "@main_in_spv(" Name 15 "psout" - Name 26 "Color" + Name 26 "@entryPointOutput.Color" Name 29 "$Global" MemberName 29($Global) 0 "also_not_the_entry_point" Name 31 "" - Decorate 26(Color) Location 0 + Decorate 26(@entryPointOutput.Color) Location 0 MemberDecorate 29($Global) 0 Offset 0 Decorate 29($Global) Block Decorate 31 DescriptorSet 0 @@ -108,7 +108,7 @@ gl_FragCoord origin is upper left 19: 9(fvec4) ConstantComposite 18 18 18 18 20: TypePointer Function 9(fvec4) 25: TypePointer Output 9(fvec4) - 26(Color): 25(ptr) Variable Output +26(@entryPointOutput.Color): 25(ptr) Variable Output 29($Global): TypeStruct 16(int) 30: TypePointer Uniform 29($Global) 31: 30(ptr) Variable Uniform @@ -116,7 +116,7 @@ gl_FragCoord origin is upper left 5: Label 27:10(PS_OUTPUT) FunctionCall 12(@main_in_spv() 28: 9(fvec4) CompositeExtract 27 0 - Store 26(Color) 28 + Store 26(@entryPointOutput.Color) 28 Return FunctionEnd 6(not_the_entry_point(): 2 Function None 3 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.flatten.return.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.flatten.return.frag.out index ee2c3f0..2ff5eeb 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.flatten.return.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.flatten.return.frag.out @@ -27,34 +27,34 @@ gl_FragCoord origin is upper left 0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 Function Call: @main( ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:16 color: direct index for structure ( temp 4-component vector of float) 0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 Constant: 0:16 0 (const int) 0:16 move second child to first child ( temp float) -0:? 'other_struct_member1' (layout( location=1) out float) +0:? '@entryPointOutput.other_struct_member1' (layout( location=1) out float) 0:16 other_struct_member1: direct index for structure ( temp float) 0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 Constant: 0:16 1 (const int) 0:16 move second child to first child ( temp float) -0:? 'other_struct_member2' (layout( location=2) out float) +0:? '@entryPointOutput.other_struct_member2' (layout( location=2) out float) 0:16 other_struct_member2: direct index for structure ( temp float) 0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 Constant: 0:16 2 (const int) 0:16 move second child to first child ( temp float) -0:? 'other_struct_member3' (layout( location=3) out float) +0:? '@entryPointOutput.other_struct_member3' (layout( location=3) out float) 0:16 other_struct_member3: direct index for structure ( temp float) 0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 Constant: 0:16 3 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) -0:? 'other_struct_member1' (layout( location=1) out float) -0:? 'other_struct_member2' (layout( location=2) out float) -0:? 'other_struct_member3' (layout( location=3) out float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.other_struct_member1' (layout( location=1) out float) +0:? '@entryPointOutput.other_struct_member2' (layout( location=2) out float) +0:? '@entryPointOutput.other_struct_member3' (layout( location=3) out float) Linked fragment stage: @@ -88,37 +88,37 @@ gl_FragCoord origin is upper left 0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 Function Call: @main( ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:16 color: direct index for structure ( temp 4-component vector of float) 0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 Constant: 0:16 0 (const int) 0:16 move second child to first child ( temp float) -0:? 'other_struct_member1' (layout( location=1) out float) +0:? '@entryPointOutput.other_struct_member1' (layout( location=1) out float) 0:16 other_struct_member1: direct index for structure ( temp float) 0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 Constant: 0:16 1 (const int) 0:16 move second child to first child ( temp float) -0:? 'other_struct_member2' (layout( location=2) out float) +0:? '@entryPointOutput.other_struct_member2' (layout( location=2) out float) 0:16 other_struct_member2: direct index for structure ( temp float) 0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 Constant: 0:16 2 (const int) 0:16 move second child to first child ( temp float) -0:? 'other_struct_member3' (layout( location=3) out float) +0:? '@entryPointOutput.other_struct_member3' (layout( location=3) out float) 0:16 other_struct_member3: direct index for structure ( temp float) 0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float color, temp float other_struct_member1, temp float other_struct_member2, temp float other_struct_member3}) 0:16 Constant: 0:16 3 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) -0:? 'other_struct_member1' (layout( location=1) out float) -0:? 'other_struct_member2' (layout( location=2) out float) -0:? 'other_struct_member3' (layout( location=3) out float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.other_struct_member1' (layout( location=1) out float) +0:? '@entryPointOutput.other_struct_member2' (layout( location=2) out float) +0:? '@entryPointOutput.other_struct_member3' (layout( location=3) out float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 49 Capability Shader @@ -136,14 +136,14 @@ gl_FragCoord origin is upper left Name 10 "Func1(" Name 12 "@main(" Name 26 "flattenTemp" - Name 29 "color" - Name 36 "other_struct_member1" - Name 41 "other_struct_member2" - Name 45 "other_struct_member3" - Decorate 29(color) Location 0 - Decorate 36(other_struct_member1) Location 1 - Decorate 41(other_struct_member2) Location 2 - Decorate 45(other_struct_member3) Location 3 + Name 29 "@entryPointOutput.color" + Name 36 "@entryPointOutput.other_struct_member1" + Name 41 "@entryPointOutput.other_struct_member2" + Name 45 "@entryPointOutput.other_struct_member3" + Decorate 29(@entryPointOutput.color) Location 0 + Decorate 36(@entryPointOutput.other_struct_member1) Location 1 + Decorate 41(@entryPointOutput.other_struct_member2) Location 2 + Decorate 45(@entryPointOutput.other_struct_member3) Location 3 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -158,17 +158,17 @@ gl_FragCoord origin is upper left 19:8(PS_OUTPUT) ConstantComposite 15 16 17 18 25: TypePointer Function 8(PS_OUTPUT) 28: TypePointer Output 7(fvec4) - 29(color): 28(ptr) Variable Output +29(@entryPointOutput.color): 28(ptr) Variable Output 30: TypeInt 32 1 31: 30(int) Constant 0 32: TypePointer Function 7(fvec4) 35: TypePointer Output 6(float) -36(other_struct_member1): 35(ptr) Variable Output +36(@entryPointOutput.other_struct_member1): 35(ptr) Variable Output 37: 30(int) Constant 1 38: TypePointer Function 6(float) -41(other_struct_member2): 35(ptr) Variable Output +41(@entryPointOutput.other_struct_member2): 35(ptr) Variable Output 42: 30(int) Constant 2 -45(other_struct_member3): 35(ptr) Variable Output +45(@entryPointOutput.other_struct_member3): 35(ptr) Variable Output 46: 30(int) Constant 3 4(main): 2 Function None 3 5: Label @@ -177,16 +177,16 @@ gl_FragCoord origin is upper left Store 26(flattenTemp) 27 33: 32(ptr) AccessChain 26(flattenTemp) 31 34: 7(fvec4) Load 33 - Store 29(color) 34 + Store 29(@entryPointOutput.color) 34 39: 38(ptr) AccessChain 26(flattenTemp) 37 40: 6(float) Load 39 - Store 36(other_struct_member1) 40 + Store 36(@entryPointOutput.other_struct_member1) 40 43: 38(ptr) AccessChain 26(flattenTemp) 42 44: 6(float) Load 43 - Store 41(other_struct_member2) 44 + Store 41(@entryPointOutput.other_struct_member2) 44 47: 38(ptr) AccessChain 26(flattenTemp) 46 48: 6(float) Load 47 - Store 45(other_struct_member3) 48 + Store 45(@entryPointOutput.other_struct_member3) 48 Return FunctionEnd 10(Func1():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float1.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float1.frag.out index 21b1c19..56e1aa9 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float1.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float1.frag.out @@ -65,7 +65,7 @@ gl_FragCoord origin is upper left 0:? 'scalar' ( global float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 27 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float4.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float4.frag.out index 4da2a16..c457cd3 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float4.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.float4.frag.out @@ -42,7 +42,7 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor, uniform bool ff1, layout( offset=20) uniform float ff2, layout( binding=0 offset=32) uniform 4-component vector of float ff3, layout( binding=1 offset=48) uniform 4-component vector of float ff4}) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 26 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.forLoop.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.forLoop.frag.out index de1f1c0..f945f98 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.forLoop.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.forLoop.frag.out @@ -17,7 +17,7 @@ gl_FragCoord origin is upper left 0:4 No loop condition 0:4 No loop body 0:? Sequence -0:5 Loop with condition tested first +0:5 Loop with condition tested first: Unroll 0:5 Loop Condition 0:5 any ( temp bool) 0:5 NotEqual ( temp 4-component vector of bool) @@ -110,6 +110,80 @@ gl_FragCoord origin is upper left 0:11 'ii' ( temp int) 0:12 Pre-Decrement ( temp float) 0:12 'ii' ( temp float) +0:13 Sequence +0:13 move second child to first child ( temp int) +0:13 'first' ( temp int) +0:13 Constant: +0:13 0 (const int) +0:13 move second child to first child ( temp int) +0:13 'second' ( temp int) +0:13 Constant: +0:13 1 (const int) +0:13 Loop with condition tested first +0:13 No loop condition +0:13 Loop Body +0:13 add ( temp int) +0:13 'first' ( temp int) +0:13 'second' ( temp int) +0:14 Sequence +0:14 move second child to first child ( temp int) +0:14 'i' ( temp int) +0:14 Constant: +0:14 0 (const int) +0:14 move second child to first child ( temp int) +0:14 'count' ( temp int) +0:14 Convert float to int ( temp int) +0:14 'ii' ( temp float) +0:14 Loop with condition tested first +0:14 Loop Condition +0:14 Compare Less Than ( temp bool) +0:14 'i' ( temp int) +0:14 'count' ( temp int) +0:14 No loop body +0:14 Loop Terminal Expression +0:14 Post-Increment ( temp int) +0:14 'i' ( temp int) +0:15 Sequence +0:15 move second child to first child ( temp float) +0:15 'first' ( temp float) +0:15 Constant: +0:15 0.000000 +0:15 Loop with condition tested first +0:15 Loop Condition +0:15 Compare Less Than ( temp bool) +0:15 'first' ( temp float) +0:15 direct index ( temp float) +0:15 'second' ( temp 2-element array of float) +0:15 Constant: +0:15 0 (const int) +0:15 Loop Body +0:15 add ( temp float) +0:15 add ( temp float) +0:15 'first' ( temp float) +0:15 direct index ( temp float) +0:15 'second' ( temp 2-element array of float) +0:15 Constant: +0:15 1 (const int) +0:15 'third' ( temp float) +0:15 Loop Terminal Expression +0:15 Pre-Increment ( temp float) +0:15 direct index ( temp float) +0:15 'second' ( temp 2-element array of float) +0:15 Constant: +0:15 1 (const int) +0:? Sequence +0:16 Comma ( temp float) +0:16 Comma ( temp float) +0:16 Pre-Decrement ( temp float) +0:16 'ii' ( temp float) +0:16 Pre-Decrement ( temp float) +0:16 'ii' ( temp float) +0:16 Pre-Decrement ( temp float) +0:16 'ii' ( temp float) +0:16 Loop with condition tested first +0:16 No loop condition +0:16 Loop Body +0:16 'ii' ( temp float) 0:2 Function Definition: PixelShaderFunction( ( temp void) 0:2 Function Parameters: 0:? Sequence @@ -146,7 +220,7 @@ gl_FragCoord origin is upper left 0:4 No loop condition 0:4 No loop body 0:? Sequence -0:5 Loop with condition tested first +0:5 Loop with condition tested first: Unroll 0:5 Loop Condition 0:5 any ( temp bool) 0:5 NotEqual ( temp 4-component vector of bool) @@ -239,6 +313,80 @@ gl_FragCoord origin is upper left 0:11 'ii' ( temp int) 0:12 Pre-Decrement ( temp float) 0:12 'ii' ( temp float) +0:13 Sequence +0:13 move second child to first child ( temp int) +0:13 'first' ( temp int) +0:13 Constant: +0:13 0 (const int) +0:13 move second child to first child ( temp int) +0:13 'second' ( temp int) +0:13 Constant: +0:13 1 (const int) +0:13 Loop with condition tested first +0:13 No loop condition +0:13 Loop Body +0:13 add ( temp int) +0:13 'first' ( temp int) +0:13 'second' ( temp int) +0:14 Sequence +0:14 move second child to first child ( temp int) +0:14 'i' ( temp int) +0:14 Constant: +0:14 0 (const int) +0:14 move second child to first child ( temp int) +0:14 'count' ( temp int) +0:14 Convert float to int ( temp int) +0:14 'ii' ( temp float) +0:14 Loop with condition tested first +0:14 Loop Condition +0:14 Compare Less Than ( temp bool) +0:14 'i' ( temp int) +0:14 'count' ( temp int) +0:14 No loop body +0:14 Loop Terminal Expression +0:14 Post-Increment ( temp int) +0:14 'i' ( temp int) +0:15 Sequence +0:15 move second child to first child ( temp float) +0:15 'first' ( temp float) +0:15 Constant: +0:15 0.000000 +0:15 Loop with condition tested first +0:15 Loop Condition +0:15 Compare Less Than ( temp bool) +0:15 'first' ( temp float) +0:15 direct index ( temp float) +0:15 'second' ( temp 2-element array of float) +0:15 Constant: +0:15 0 (const int) +0:15 Loop Body +0:15 add ( temp float) +0:15 add ( temp float) +0:15 'first' ( temp float) +0:15 direct index ( temp float) +0:15 'second' ( temp 2-element array of float) +0:15 Constant: +0:15 1 (const int) +0:15 'third' ( temp float) +0:15 Loop Terminal Expression +0:15 Pre-Increment ( temp float) +0:15 direct index ( temp float) +0:15 'second' ( temp 2-element array of float) +0:15 Constant: +0:15 1 (const int) +0:? Sequence +0:16 Comma ( temp float) +0:16 Comma ( temp float) +0:16 Pre-Decrement ( temp float) +0:16 'ii' ( temp float) +0:16 Pre-Decrement ( temp float) +0:16 'ii' ( temp float) +0:16 Pre-Decrement ( temp float) +0:16 'ii' ( temp float) +0:16 Loop with condition tested first +0:16 No loop condition +0:16 Loop Body +0:16 'ii' ( temp float) 0:2 Function Definition: PixelShaderFunction( ( temp void) 0:2 Function Parameters: 0:? Sequence @@ -254,13 +402,13 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 124 +// Generated by (magic number): 80003 +// Id's are bound by 183 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "PixelShaderFunction" 117 120 + EntryPoint Fragment 4 "PixelShaderFunction" 176 179 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "PixelShaderFunction" @@ -268,12 +416,19 @@ gl_FragCoord origin is upper left Name 10 "input" Name 92 "ii" Name 111 "ii" - Name 115 "input" - Name 117 "input" - Name 120 "@entryPointOutput" - Name 121 "param" - Decorate 117(input) Location 0 - Decorate 120(@entryPointOutput) Location 0 + Name 114 "first" + Name 116 "second" + Name 124 "i" + Name 125 "count" + Name 138 "first" + Name 149 "second" + Name 157 "third" + Name 174 "input" + Name 176 "input" + Name 179 "@entryPointOutput" + Name 180 "param" + Decorate 176(input) Location 0 + Decorate 179(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -293,20 +448,25 @@ gl_FragCoord origin is upper left 100: 90(int) Constant 3 103: 90(int) Constant 2 109: 90(int) Constant 1 - 116: TypePointer Input 7(fvec4) - 117(input): 116(ptr) Variable Input - 119: TypePointer Output 7(fvec4) -120(@entryPointOutput): 119(ptr) Variable Output + 115: 90(int) Constant 0 + 139: 6(float) Constant 0 + 146: 71(int) Constant 2 + 147: TypeArray 6(float) 146 + 148: TypePointer Function 147 + 175: TypePointer Input 7(fvec4) + 176(input): 175(ptr) Variable Input + 178: TypePointer Output 7(fvec4) +179(@entryPointOutput): 178(ptr) Variable Output 4(PixelShaderFunction): 2 Function None 3 5: Label - 115(input): 8(ptr) Variable Function - 121(param): 8(ptr) Variable Function - 118: 7(fvec4) Load 117(input) - Store 115(input) 118 - 122: 7(fvec4) Load 115(input) - Store 121(param) 122 - 123: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 121(param) - Store 120(@entryPointOutput) 123 + 174(input): 8(ptr) Variable Function + 180(param): 8(ptr) Variable Function + 177: 7(fvec4) Load 176(input) + Store 174(input) 177 + 181: 7(fvec4) Load 174(input) + Store 180(param) 181 + 182: 7(fvec4) FunctionCall 11(@PixelShaderFunction(vf4;) 180(param) + Store 179(@entryPointOutput) 182 Return FunctionEnd 11(@PixelShaderFunction(vf4;): 7(fvec4) Function None 9 @@ -314,6 +474,13 @@ gl_FragCoord origin is upper left 12: Label 92(ii): 91(ptr) Variable Function 111(ii): 73(ptr) Variable Function + 114(first): 91(ptr) Variable Function + 116(second): 91(ptr) Variable Function + 124(i): 91(ptr) Variable Function + 125(count): 91(ptr) Variable Function + 138(first): 73(ptr) Variable Function + 149(second): 148(ptr) Variable Function + 157(third): 73(ptr) Variable Function Branch 13 13: Label LoopMerge 15 16 None @@ -338,7 +505,7 @@ gl_FragCoord origin is upper left 23: Label Branch 25 25: Label - LoopMerge 27 28 None + LoopMerge 27 28 Unroll Branch 29 29: Label 30: 7(fvec4) Load 10(input) @@ -454,6 +621,85 @@ gl_FragCoord origin is upper left 112: 6(float) Load 111(ii) 113: 6(float) FSub 112 18 Store 111(ii) 113 - 114: 7(fvec4) Undef - ReturnValue 114 + Store 114(first) 115 + Store 116(second) 109 + Branch 117 + 117: Label + LoopMerge 119 120 None + Branch 118 + 118: Label + 121: 90(int) Load 114(first) + 122: 90(int) Load 116(second) + 123: 90(int) IAdd 121 122 + Branch 120 + 120: Label + Branch 117 + 119: Label + Store 124(i) 115 + 126: 6(float) Load 111(ii) + 127: 90(int) ConvertFToS 126 + Store 125(count) 127 + Branch 128 + 128: Label + LoopMerge 130 131 None + Branch 132 + 132: Label + 133: 90(int) Load 124(i) + 134: 90(int) Load 125(count) + 135: 32(bool) SLessThan 133 134 + BranchConditional 135 129 130 + 129: Label + Branch 131 + 131: Label + 136: 90(int) Load 124(i) + 137: 90(int) IAdd 136 109 + Store 124(i) 137 + Branch 128 + 130: Label + Store 138(first) 139 + Branch 140 + 140: Label + LoopMerge 142 143 None + Branch 144 + 144: Label + 145: 6(float) Load 138(first) + 150: 73(ptr) AccessChain 149(second) 115 + 151: 6(float) Load 150 + 152: 32(bool) FOrdLessThan 145 151 + BranchConditional 152 141 142 + 141: Label + 153: 6(float) Load 138(first) + 154: 73(ptr) AccessChain 149(second) 109 + 155: 6(float) Load 154 + 156: 6(float) FAdd 153 155 + 158: 6(float) Load 157(third) + 159: 6(float) FAdd 156 158 + Branch 143 + 143: Label + 160: 73(ptr) AccessChain 149(second) 109 + 161: 6(float) Load 160 + 162: 6(float) FAdd 161 18 + Store 160 162 + Branch 140 + 142: Label + 163: 6(float) Load 111(ii) + 164: 6(float) FSub 163 18 + Store 111(ii) 164 + 165: 6(float) Load 111(ii) + 166: 6(float) FSub 165 18 + Store 111(ii) 166 + 167: 6(float) Load 111(ii) + 168: 6(float) FSub 167 18 + Store 111(ii) 168 + Branch 169 + 169: Label + LoopMerge 171 172 None + Branch 170 + 170: Label + Branch 172 + 172: Label + Branch 169 + 171: Label + 173: 7(fvec4) Undef + ReturnValue 173 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.array.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.array.dx10.frag.out index 5f9a1ca..725f309 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.array.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.array.dx10.frag.out @@ -101,13 +101,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -124,8 +124,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -233,13 +233,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -256,11 +256,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 124 Capability Shader @@ -291,8 +291,8 @@ gl_FragCoord origin is upper left Name 84 "g_tTexcdu4a" Name 95 "psout" Name 104 "flattenTemp" - Name 107 "Color" - Name 111 "Depth" + Name 107 "@entryPointOutput.Color" + Name 111 "@entryPointOutput.Depth" Name 116 "g_tTex1df4a" Name 117 "g_tTex1df4" Name 120 "g_tTex1di4a" @@ -305,8 +305,8 @@ gl_FragCoord origin is upper left Decorate 64(g_tTexcdf4a) DescriptorSet 0 Decorate 74(g_tTexcdi4a) DescriptorSet 0 Decorate 84(g_tTexcdu4a) DescriptorSet 0 - Decorate 107(Color) Location 0 - Decorate 111(Depth) BuiltIn FragDepth + Decorate 107(@entryPointOutput.Color) Location 0 + Decorate 111(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 116(g_tTex1df4a) DescriptorSet 0 Decorate 116(g_tTex1df4a) Binding 1 Decorate 117(g_tTex1df4) DescriptorSet 0 @@ -376,9 +376,9 @@ gl_FragCoord origin is upper left 98: 29(int) Constant 1 99: TypePointer Function 6(float) 106: TypePointer Output 7(fvec4) - 107(Color): 106(ptr) Variable Output +107(@entryPointOutput.Color): 106(ptr) Variable Output 110: TypePointer Output 6(float) - 111(Depth): 110(ptr) Variable Output +111(@entryPointOutput.Depth): 110(ptr) Variable Output 114: TypeImage 6(float) 1D array sampled format:Unknown 115: TypePointer UniformConstant 114 116(g_tTex1df4a): 115(ptr) Variable UniformConstant @@ -396,10 +396,10 @@ gl_FragCoord origin is upper left Store 104(flattenTemp) 105 108: 12(ptr) AccessChain 104(flattenTemp) 30 109: 7(fvec4) Load 108 - Store 107(Color) 109 + Store 107(@entryPointOutput.Color) 109 112: 99(ptr) AccessChain 104(flattenTemp) 98 113: 6(float) Load 112 - Store 111(Depth) 113 + Store 111(@entryPointOutput.Depth) 113 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.basic.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.basic.dx10.frag.out index c011f56..bebaf90 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.basic.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.basic.dx10.frag.out @@ -95,13 +95,13 @@ gl_FragCoord origin is upper left 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:29 Color: direct index for structure ( temp 4-component vector of float) 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Constant: 0:29 0 (const int) 0:29 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:29 Depth: direct index for structure ( temp float) 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Constant: @@ -122,8 +122,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -225,13 +225,13 @@ gl_FragCoord origin is upper left 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:29 Color: direct index for structure ( temp 4-component vector of float) 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Constant: 0:29 0 (const int) 0:29 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:29 Depth: direct index for structure ( temp float) 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Constant: @@ -252,11 +252,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 135 Capability Shader @@ -286,8 +286,8 @@ gl_FragCoord origin is upper left Name 84 "g_tTexcdu4" Name 95 "psout" Name 105 "flattenTemp" - Name 108 "Color" - Name 112 "Depth" + Name 108 "@entryPointOutput.Color" + Name 112 "@entryPointOutput.Depth" Name 115 "g_sSamp2d" Name 118 "g_tTex1df4a" Name 119 "g_tTex1df4" @@ -304,8 +304,8 @@ gl_FragCoord origin is upper left Decorate 63(g_tTexcdf4) DescriptorSet 0 Decorate 74(g_tTexcdi4) DescriptorSet 0 Decorate 84(g_tTexcdu4) DescriptorSet 0 - Decorate 108(Color) Location 0 - Decorate 112(Depth) BuiltIn FragDepth + Decorate 108(@entryPointOutput.Color) Location 0 + Decorate 112(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 115(g_sSamp2d) DescriptorSet 0 Decorate 118(g_tTex1df4a) DescriptorSet 0 Decorate 118(g_tTex1df4a) Binding 1 @@ -380,9 +380,9 @@ gl_FragCoord origin is upper left 99: 28(int) Constant 1 100: TypePointer Function 6(float) 107: TypePointer Output 7(fvec4) - 108(Color): 107(ptr) Variable Output +108(@entryPointOutput.Color): 107(ptr) Variable Output 111: TypePointer Output 6(float) - 112(Depth): 111(ptr) Variable Output +112(@entryPointOutput.Depth): 111(ptr) Variable Output 115(g_sSamp2d): 19(ptr) Variable UniformConstant 116: TypeImage 6(float) 1D sampled format:Unknown 117: TypePointer UniformConstant 116 @@ -410,10 +410,10 @@ gl_FragCoord origin is upper left Store 105(flattenTemp) 106 109: 12(ptr) AccessChain 105(flattenTemp) 29 110: 7(fvec4) Load 109 - Store 108(Color) 110 + Store 108(@entryPointOutput.Color) 110 113: 100(ptr) AccessChain 105(flattenTemp) 99 114: 6(float) Load 113 - Store 112(Depth) 114 + Store 112(@entryPointOutput.Depth) 114 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.basic.dx10.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.basic.dx10.vert.out index 46fb13c..34cf794 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.basic.dx10.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.basic.dx10.vert.out @@ -84,7 +84,7 @@ Shader version: 500 0:? Sequence 0:28 Sequence 0:28 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:28 Pos: direct index for structure ( temp 4-component vector of float) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) 0:28 Constant: @@ -105,7 +105,7 @@ Shader version: 500 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? '@entryPointOutput' (layout( location=0) out structure{}) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) Linked vertex stage: @@ -196,7 +196,7 @@ Shader version: 500 0:? Sequence 0:28 Sequence 0:28 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:28 Pos: direct index for structure ( temp 4-component vector of float) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) 0:28 Constant: @@ -217,17 +217,17 @@ Shader version: 500 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? '@entryPointOutput' (layout( location=0) out structure{}) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 129 +// Generated by (magic number): 80003 +// Id's are bound by 126 Capability Shader Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 103 128 + EntryPoint Vertex 4 "main" 103 Source HLSL 500 Name 4 "main" Name 8 "VS_OUTPUT" @@ -247,7 +247,7 @@ Shader version: 500 Name 81 "txval42" Name 84 "g_tTexcdu4" Name 95 "vsout" - Name 103 "@entryPointOutput_Pos" + Name 103 "@entryPointOutput.Pos" Name 106 "g_sSamp2d" Name 109 "g_tTex1df4a" Name 110 "g_tTex1df4" @@ -256,8 +256,6 @@ Shader version: 500 Name 119 "g_tTex3df4" Name 122 "g_tTex3di4" Name 125 "g_tTex3du4" - Name 126 "VS_OUTPUT" - Name 128 "@entryPointOutput" Decorate 16(g_tTex2df4) DescriptorSet 0 Decorate 20(g_sSamp) DescriptorSet 0 Decorate 20(g_sSamp) Binding 0 @@ -266,7 +264,7 @@ Shader version: 500 Decorate 63(g_tTexcdf4) DescriptorSet 0 Decorate 74(g_tTexcdi4) DescriptorSet 0 Decorate 84(g_tTexcdu4) DescriptorSet 0 - Decorate 103(@entryPointOutput_Pos) BuiltIn Position + Decorate 103(@entryPointOutput.Pos) BuiltIn Position Decorate 106(g_sSamp2d) DescriptorSet 0 Decorate 109(g_tTex1df4a) DescriptorSet 0 Decorate 109(g_tTex1df4a) Binding 1 @@ -277,7 +275,6 @@ Shader version: 500 Decorate 119(g_tTex3df4) DescriptorSet 0 Decorate 122(g_tTex3di4) DescriptorSet 0 Decorate 125(g_tTex3du4) DescriptorSet 0 - Decorate 128(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -340,7 +337,7 @@ Shader version: 500 96: 6(float) Constant 0 97: 7(fvec4) ConstantComposite 96 96 96 96 102: TypePointer Output 7(fvec4) -103(@entryPointOutput_Pos): 102(ptr) Variable Output +103(@entryPointOutput.Pos): 102(ptr) Variable Output 106(g_sSamp2d): 19(ptr) Variable UniformConstant 107: TypeImage 6(float) 1D sampled format:Unknown 108: TypePointer UniformConstant 107 @@ -361,14 +358,11 @@ Shader version: 500 123: TypeImage 45(int) 3D sampled format:Unknown 124: TypePointer UniformConstant 123 125(g_tTex3du4): 124(ptr) Variable UniformConstant - 126(VS_OUTPUT): TypeStruct - 127: TypePointer Output 126(VS_OUTPUT) -128(@entryPointOutput): 127(ptr) Variable Output 4(main): 2 Function None 3 5: Label 104:8(VS_OUTPUT) FunctionCall 10(@main() 105: 7(fvec4) CompositeExtract 104 0 - Store 103(@entryPointOutput_Pos) 105 + Store 103(@entryPointOutput.Pos) 105 Return FunctionEnd 10(@main():8(VS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.offset.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.offset.dx10.frag.out index 8ed1c07..7073777 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.offset.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.offset.dx10.frag.out @@ -71,13 +71,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -97,8 +97,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -176,13 +176,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -202,11 +202,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 114 Capability Shader @@ -230,8 +230,8 @@ gl_FragCoord origin is upper left Name 55 "g_tTex2du4" Name 67 "psout" Name 76 "flattenTemp" - Name 79 "Color" - Name 83 "Depth" + Name 79 "@entryPointOutput.Color" + Name 83 "@entryPointOutput.Depth" Name 88 "g_tTex1df4a" Name 89 "g_tTex1df4" Name 92 "g_tTex1di4" @@ -247,8 +247,8 @@ gl_FragCoord origin is upper left Decorate 20(g_sSamp) Binding 0 Decorate 39(g_tTex2di4) DescriptorSet 0 Decorate 55(g_tTex2du4) DescriptorSet 0 - Decorate 79(Color) Location 0 - Decorate 83(Depth) BuiltIn FragDepth + Decorate 79(@entryPointOutput.Color) Location 0 + Decorate 83(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 88(g_tTex1df4a) DescriptorSet 0 Decorate 88(g_tTex1df4a) Binding 1 Decorate 89(g_tTex1df4) DescriptorSet 0 @@ -311,9 +311,9 @@ gl_FragCoord origin is upper left 69: 7(fvec4) ConstantComposite 68 68 68 68 71: TypePointer Function 6(float) 78: TypePointer Output 7(fvec4) - 79(Color): 78(ptr) Variable Output +79(@entryPointOutput.Color): 78(ptr) Variable Output 82: TypePointer Output 6(float) - 83(Depth): 82(ptr) Variable Output +83(@entryPointOutput.Depth): 82(ptr) Variable Output 86: TypeImage 6(float) 1D sampled format:Unknown 87: TypePointer UniformConstant 86 88(g_tTex1df4a): 87(ptr) Variable UniformConstant @@ -349,10 +349,10 @@ gl_FragCoord origin is upper left Store 76(flattenTemp) 77 80: 12(ptr) AccessChain 76(flattenTemp) 31 81: 7(fvec4) Load 80 - Store 79(Color) 81 + Store 79(@entryPointOutput.Color) 81 84: 71(ptr) AccessChain 76(flattenTemp) 30 85: 6(float) Load 84 - Store 83(Depth) 85 + Store 83(@entryPointOutput.Depth) 85 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out index 73ecae0..599f68f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out @@ -74,13 +74,13 @@ gl_FragCoord origin is upper left 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:20 Color: direct index for structure ( temp 4-component vector of float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: 0:20 0 (const int) 0:20 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:20 Depth: direct index for structure ( temp float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: @@ -94,8 +94,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2df4' ( uniform texture2DArray) 0:? 'g_tTex2di4' ( uniform itexture2DArray) 0:? 'g_tTex2du4' ( uniform utexture2DArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -176,13 +176,13 @@ gl_FragCoord origin is upper left 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:20 Color: direct index for structure ( temp 4-component vector of float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: 0:20 0 (const int) 0:20 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:20 Depth: direct index for structure ( temp float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: @@ -196,11 +196,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2df4' ( uniform texture2DArray) 0:? 'g_tTex2di4' ( uniform itexture2DArray) 0:? 'g_tTex2du4' ( uniform utexture2DArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 97 Capability Shader @@ -224,8 +224,8 @@ gl_FragCoord origin is upper left Name 55 "g_tTex2du4" Name 68 "psout" Name 77 "flattenTemp" - Name 80 "Color" - Name 84 "Depth" + Name 80 "@entryPointOutput.Color" + Name 84 "@entryPointOutput.Depth" Name 89 "g_tTex1df4a" Name 90 "g_tTex1df4" Name 93 "g_tTex1di4" @@ -235,8 +235,8 @@ gl_FragCoord origin is upper left Decorate 20(g_sSamp) Binding 0 Decorate 40(g_tTex2di4) DescriptorSet 0 Decorate 55(g_tTex2du4) DescriptorSet 0 - Decorate 80(Color) Location 0 - Decorate 84(Depth) BuiltIn FragDepth + Decorate 80(@entryPointOutput.Color) Location 0 + Decorate 84(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 89(g_tTex1df4a) DescriptorSet 0 Decorate 89(g_tTex1df4a) Binding 1 Decorate 90(g_tTex1df4) DescriptorSet 0 @@ -294,9 +294,9 @@ gl_FragCoord origin is upper left 70: 7(fvec4) ConstantComposite 69 69 69 69 72: TypePointer Function 6(float) 79: TypePointer Output 7(fvec4) - 80(Color): 79(ptr) Variable Output +80(@entryPointOutput.Color): 79(ptr) Variable Output 83: TypePointer Output 6(float) - 84(Depth): 83(ptr) Variable Output +84(@entryPointOutput.Depth): 83(ptr) Variable Output 87: TypeImage 6(float) 1D array sampled format:Unknown 88: TypePointer UniformConstant 87 89(g_tTex1df4a): 88(ptr) Variable UniformConstant @@ -314,10 +314,10 @@ gl_FragCoord origin is upper left Store 77(flattenTemp) 78 81: 12(ptr) AccessChain 77(flattenTemp) 32 82: 7(fvec4) Load 81 - Store 80(Color) 82 + Store 80(@entryPointOutput.Color) 82 85: 72(ptr) AccessChain 77(flattenTemp) 31 86: 6(float) Load 85 - Store 84(Depth) 86 + Store 84(@entryPointOutput.Depth) 86 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out index 675e178..41e2ed4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out @@ -344,13 +344,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -368,8 +368,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -720,13 +720,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -744,11 +744,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 255 Capability Shader @@ -803,8 +803,8 @@ gl_FragCoord origin is upper left Name 218 "txval72" Name 226 "psout" Name 235 "flattenTemp" - Name 238 "Color" - Name 242 "Depth" + Name 238 "@entryPointOutput.Color" + Name 242 "@entryPointOutput.Depth" Name 245 "g_sSamp2d" Name 248 "g_tTex1df4a" Name 251 "g_tTex1di4a" @@ -823,8 +823,8 @@ gl_FragCoord origin is upper left Decorate 131(g_tTexcdf4a) DescriptorSet 0 Decorate 143(g_tTexcdi4a) DescriptorSet 0 Decorate 154(g_tTexcdu4a) DescriptorSet 0 - Decorate 238(Color) Location 0 - Decorate 242(Depth) BuiltIn FragDepth + Decorate 238(@entryPointOutput.Color) Location 0 + Decorate 242(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 245(g_sSamp2d) DescriptorSet 0 Decorate 248(g_tTex1df4a) DescriptorSet 0 Decorate 248(g_tTex1df4a) Binding 0 @@ -886,9 +886,9 @@ gl_FragCoord origin is upper left 228: 7(fvec4) ConstantComposite 227 227 227 227 230: TypePointer Function 6(float) 237: TypePointer Output 7(fvec4) - 238(Color): 237(ptr) Variable Output +238(@entryPointOutput.Color): 237(ptr) Variable Output 241: TypePointer Output 6(float) - 242(Depth): 241(ptr) Variable Output +242(@entryPointOutput.Depth): 241(ptr) Variable Output 245(g_sSamp2d): 19(ptr) Variable UniformConstant 246: TypeImage 6(float) 1D array sampled format:Unknown 247: TypePointer UniformConstant 246 @@ -906,10 +906,10 @@ gl_FragCoord origin is upper left Store 235(flattenTemp) 236 239: 12(ptr) AccessChain 235(flattenTemp) 34 240: 7(fvec4) Load 239 - Store 238(Color) 240 + Store 238(@entryPointOutput.Color) 240 243: 230(ptr) AccessChain 235(flattenTemp) 69 244: 6(float) Load 243 - Store 242(Depth) 244 + Store 242(@entryPointOutput.Depth) 244 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out index 4d5da52..5de8d7a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out @@ -344,13 +344,13 @@ gl_FragCoord origin is upper left 0:34 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:34 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:34 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:34 Color: direct index for structure ( temp 4-component vector of float) 0:34 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:34 Constant: 0:34 0 (const int) 0:34 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:34 Depth: direct index for structure ( temp float) 0:34 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:34 Constant: @@ -372,8 +372,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -724,13 +724,13 @@ gl_FragCoord origin is upper left 0:34 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:34 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:34 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:34 Color: direct index for structure ( temp 4-component vector of float) 0:34 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:34 Constant: 0:34 0 (const int) 0:34 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:34 Depth: direct index for structure ( temp float) 0:34 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:34 Constant: @@ -752,11 +752,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 265 Capability Shader @@ -810,8 +810,8 @@ gl_FragCoord origin is upper left Name 218 "txval72" Name 226 "psout" Name 235 "flattenTemp" - Name 238 "Color" - Name 242 "Depth" + Name 238 "@entryPointOutput.Color" + Name 242 "@entryPointOutput.Depth" Name 245 "g_sSamp2d" Name 248 "g_tTex1df4a" Name 249 "g_tTex1df4" @@ -834,8 +834,8 @@ gl_FragCoord origin is upper left Decorate 131(g_tTexcdf4) DescriptorSet 0 Decorate 143(g_tTexcdi4) DescriptorSet 0 Decorate 154(g_tTexcdu4) DescriptorSet 0 - Decorate 238(Color) Location 0 - Decorate 242(Depth) BuiltIn FragDepth + Decorate 238(@entryPointOutput.Color) Location 0 + Decorate 242(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 245(g_sSamp2d) DescriptorSet 0 Decorate 248(g_tTex1df4a) DescriptorSet 0 Decorate 248(g_tTex1df4a) Binding 1 @@ -902,9 +902,9 @@ gl_FragCoord origin is upper left 228: 7(fvec4) ConstantComposite 227 227 227 227 230: TypePointer Function 6(float) 237: TypePointer Output 7(fvec4) - 238(Color): 237(ptr) Variable Output +238(@entryPointOutput.Color): 237(ptr) Variable Output 241: TypePointer Output 6(float) - 242(Depth): 241(ptr) Variable Output +242(@entryPointOutput.Depth): 241(ptr) Variable Output 245(g_sSamp2d): 19(ptr) Variable UniformConstant 246: TypeImage 6(float) 1D sampled format:Unknown 247: TypePointer UniformConstant 246 @@ -932,10 +932,10 @@ gl_FragCoord origin is upper left Store 235(flattenTemp) 236 239: 12(ptr) AccessChain 235(flattenTemp) 34 240: 7(fvec4) Load 239 - Store 238(Color) 240 + Store 238(@entryPointOutput.Color) 240 243: 230(ptr) AccessChain 235(flattenTemp) 30 244: 6(float) Load 243 - Store 242(Depth) 244 + Store 242(@entryPointOutput.Depth) 244 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out index a4fd588..21653f6 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out @@ -596,13 +596,13 @@ gl_FragCoord origin is upper left 0:39 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:39 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:39 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:39 Color: direct index for structure ( temp 4-component vector of float) 0:39 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:39 Constant: 0:39 0 (const int) 0:39 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:39 Depth: direct index for structure ( temp float) 0:39 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:39 Constant: @@ -624,8 +624,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -1228,13 +1228,13 @@ gl_FragCoord origin is upper left 0:39 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:39 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:39 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:39 Color: direct index for structure ( temp 4-component vector of float) 0:39 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:39 Constant: 0:39 0 (const int) 0:39 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:39 Depth: direct index for structure ( temp float) 0:39 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:39 Constant: @@ -1256,11 +1256,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 399 Capability Shader @@ -1316,8 +1316,8 @@ gl_FragCoord origin is upper left Name 334 "txval324" Name 351 "psout" Name 360 "flattenTemp" - Name 363 "Color" - Name 367 "Depth" + Name 363 "@entryPointOutput.Color" + Name 367 "@entryPointOutput.Depth" Name 370 "g_sSamp2d" Name 373 "g_tTex1df4a" Name 374 "g_tTex1df4" @@ -1344,8 +1344,8 @@ gl_FragCoord origin is upper left Decorate 32 DescriptorSet 0 Decorate 47(g_tTex2di4) DescriptorSet 0 Decorate 63(g_tTex2du4) DescriptorSet 0 - Decorate 363(Color) Location 0 - Decorate 367(Depth) BuiltIn FragDepth + Decorate 363(@entryPointOutput.Color) Location 0 + Decorate 367(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 370(g_sSamp2d) DescriptorSet 0 Decorate 373(g_tTex1df4a) DescriptorSet 0 Decorate 373(g_tTex1df4a) Binding 1 @@ -1408,9 +1408,9 @@ gl_FragCoord origin is upper left 353: 7(fvec4) ConstantComposite 352 352 352 352 355: TypePointer Function 6(float) 362: TypePointer Output 7(fvec4) - 363(Color): 362(ptr) Variable Output +363(@entryPointOutput.Color): 362(ptr) Variable Output 366: TypePointer Output 6(float) - 367(Depth): 366(ptr) Variable Output +367(@entryPointOutput.Depth): 366(ptr) Variable Output 370(g_sSamp2d): 19(ptr) Variable UniformConstant 371: TypeImage 6(float) 1D sampled format:Unknown 372: TypePointer UniformConstant 371 @@ -1447,10 +1447,10 @@ gl_FragCoord origin is upper left Store 360(flattenTemp) 361 364: 12(ptr) AccessChain 360(flattenTemp) 41 365: 7(fvec4) Load 364 - Store 363(Color) 365 + Store 363(@entryPointOutput.Color) 365 368: 355(ptr) AccessChain 360(flattenTemp) 33 369: 6(float) Load 368 - Store 367(Depth) 369 + Store 367(@entryPointOutput.Depth) 369 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out index 23d26cc..3739787 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out @@ -596,13 +596,13 @@ gl_FragCoord origin is upper left 0:33 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:33 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:33 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:33 Color: direct index for structure ( temp 4-component vector of float) 0:33 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:33 Constant: 0:33 0 (const int) 0:33 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:33 Depth: direct index for structure ( temp float) 0:33 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:33 Constant: @@ -620,8 +620,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -1224,13 +1224,13 @@ gl_FragCoord origin is upper left 0:33 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:33 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:33 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:33 Color: direct index for structure ( temp 4-component vector of float) 0:33 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:33 Constant: 0:33 0 (const int) 0:33 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:33 Depth: direct index for structure ( temp float) 0:33 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:33 Constant: @@ -1248,11 +1248,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 389 Capability Shader @@ -1309,8 +1309,8 @@ gl_FragCoord origin is upper left Name 334 "txval324" Name 351 "psout" Name 360 "flattenTemp" - Name 363 "Color" - Name 367 "Depth" + Name 363 "@entryPointOutput.Color" + Name 367 "@entryPointOutput.Depth" Name 370 "g_sSamp2d" Name 373 "g_tTex1df4a" Name 376 "g_tTex1di4a" @@ -1333,8 +1333,8 @@ gl_FragCoord origin is upper left Decorate 32 DescriptorSet 0 Decorate 47(g_tTex2di4a) DescriptorSet 0 Decorate 63(g_tTex2du4a) DescriptorSet 0 - Decorate 363(Color) Location 0 - Decorate 367(Depth) BuiltIn FragDepth + Decorate 363(@entryPointOutput.Color) Location 0 + Decorate 367(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 370(g_sSamp2d) DescriptorSet 0 Decorate 373(g_tTex1df4a) DescriptorSet 0 Decorate 373(g_tTex1df4a) Binding 0 @@ -1392,9 +1392,9 @@ gl_FragCoord origin is upper left 353: 7(fvec4) ConstantComposite 352 352 352 352 355: TypePointer Function 6(float) 362: TypePointer Output 7(fvec4) - 363(Color): 362(ptr) Variable Output +363(@entryPointOutput.Color): 362(ptr) Variable Output 366: TypePointer Output 6(float) - 367(Depth): 366(ptr) Variable Output +367(@entryPointOutput.Depth): 366(ptr) Variable Output 370(g_sSamp2d): 19(ptr) Variable UniformConstant 371: TypeImage 6(float) 1D array sampled format:Unknown 372: TypePointer UniformConstant 371 @@ -1421,10 +1421,10 @@ gl_FragCoord origin is upper left Store 360(flattenTemp) 361 364: 12(ptr) AccessChain 360(flattenTemp) 41 365: 7(fvec4) Load 364 - Store 363(Color) 365 + Store 363(@entryPointOutput.Color) 365 368: 355(ptr) AccessChain 360(flattenTemp) 131 369: 6(float) Load 368 - Store 367(Depth) 369 + Store 367(@entryPointOutput.Depth) 369 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out index 52fcdb2..3351a99 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out @@ -10,7 +10,7 @@ gl_FragCoord origin is upper left 0:45 'txval001' ( temp 4-component vector of float) 0:45 textureGatherOffset ( temp 4-component vector of float) 0:45 Construct combined texture-sampler ( temp sampler2DShadow) -0:45 'g_tTex2df4' ( uniform texture2D) +0:45 'g_tTex2df4' ( uniform texture2DShadow) 0:45 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:45 c2: direct index for structure ( uniform 2-component vector of float) 0:45 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -26,7 +26,7 @@ gl_FragCoord origin is upper left 0:46 'txval011' ( temp 4-component vector of int) 0:46 textureGatherOffset ( temp 4-component vector of int) 0:46 Construct combined texture-sampler ( temp isampler2DShadow) -0:46 'g_tTex2di4' ( uniform itexture2D) +0:46 'g_tTex2di4' ( uniform itexture2DShadow) 0:46 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:46 c2: direct index for structure ( uniform 2-component vector of float) 0:46 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -42,7 +42,7 @@ gl_FragCoord origin is upper left 0:47 'txval021' ( temp 4-component vector of uint) 0:47 textureGatherOffset ( temp 4-component vector of uint) 0:47 Construct combined texture-sampler ( temp usampler2DShadow) -0:47 'g_tTex2du4' ( uniform utexture2D) +0:47 'g_tTex2du4' ( uniform utexture2DShadow) 0:47 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:47 c2: direct index for structure ( uniform 2-component vector of float) 0:47 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -58,7 +58,7 @@ gl_FragCoord origin is upper left 0:49 'txval004' ( temp 4-component vector of float) 0:49 textureGatherOffsets ( temp 4-component vector of float) 0:49 Construct combined texture-sampler ( temp sampler2DShadow) -0:49 'g_tTex2df4' ( uniform texture2D) +0:49 'g_tTex2df4' ( uniform texture2DShadow) 0:49 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:49 c2: direct index for structure ( uniform 2-component vector of float) 0:49 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -80,7 +80,7 @@ gl_FragCoord origin is upper left 0:50 'txval014' ( temp 4-component vector of int) 0:50 textureGatherOffsets ( temp 4-component vector of int) 0:50 Construct combined texture-sampler ( temp isampler2DShadow) -0:50 'g_tTex2di4' ( uniform itexture2D) +0:50 'g_tTex2di4' ( uniform itexture2DShadow) 0:50 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:50 c2: direct index for structure ( uniform 2-component vector of float) 0:50 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -102,7 +102,7 @@ gl_FragCoord origin is upper left 0:51 'txval024' ( temp 4-component vector of uint) 0:51 textureGatherOffsets ( temp 4-component vector of uint) 0:51 Construct combined texture-sampler ( temp usampler2DShadow) -0:51 'g_tTex2du4' ( uniform utexture2D) +0:51 'g_tTex2du4' ( uniform utexture2DShadow) 0:51 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:51 c2: direct index for structure ( uniform 2-component vector of float) 0:51 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -119,25 +119,73 @@ gl_FragCoord origin is upper left 0:51 1 (const int) 0:51 1 (const int) 0:51 1 (const int) -0:114 move second child to first child ( temp 4-component vector of float) -0:114 Color: direct index for structure ( temp 4-component vector of float) -0:114 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:114 Constant: -0:114 0 (const int) -0:114 Constant: -0:114 1.000000 -0:114 1.000000 -0:114 1.000000 -0:114 1.000000 -0:115 move second child to first child ( temp float) -0:115 Depth: direct index for structure ( temp float) -0:115 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:115 Constant: -0:115 1 (const int) -0:115 Constant: -0:115 1.000000 -0:117 Branch: Return with expression -0:117 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:53 Sequence +0:53 move second child to first child ( temp 4-component vector of float) +0:53 'txval401' ( temp 4-component vector of float) +0:53 textureGatherOffset ( temp 4-component vector of float) +0:53 Construct combined texture-sampler ( temp sampler2DShadow) +0:53 'g_tTex2df4' ( uniform texture2DShadow) +0:53 'g_sSampCmp' (layout( binding=0) uniform sampler) +0:53 c2: direct index for structure ( uniform 2-component vector of float) +0:53 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) +0:53 Constant: +0:53 1 (const uint) +0:53 Constant: +0:53 0.750000 +0:? Constant: +0:? 1 (const int) +0:? 0 (const int) +0:54 Sequence +0:54 move second child to first child ( temp 4-component vector of int) +0:54 'txval411' ( temp 4-component vector of int) +0:54 textureGatherOffset ( temp 4-component vector of int) +0:54 Construct combined texture-sampler ( temp isampler2DShadow) +0:54 'g_tTex2di4' ( uniform itexture2DShadow) +0:54 'g_sSampCmp' (layout( binding=0) uniform sampler) +0:54 c2: direct index for structure ( uniform 2-component vector of float) +0:54 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) +0:54 Constant: +0:54 1 (const uint) +0:54 Constant: +0:54 0.750000 +0:? Constant: +0:? 1 (const int) +0:? -1 (const int) +0:55 Sequence +0:55 move second child to first child ( temp 4-component vector of uint) +0:55 'txval421' ( temp 4-component vector of uint) +0:55 textureGatherOffset ( temp 4-component vector of uint) +0:55 Construct combined texture-sampler ( temp usampler2DShadow) +0:55 'g_tTex2du4' ( uniform utexture2DShadow) +0:55 'g_sSampCmp' (layout( binding=0) uniform sampler) +0:55 c2: direct index for structure ( uniform 2-component vector of float) +0:55 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) +0:55 Constant: +0:55 1 (const uint) +0:55 Constant: +0:55 0.750000 +0:? Constant: +0:? 1 (const int) +0:? 1 (const int) +0:110 move second child to first child ( temp 4-component vector of float) +0:110 Color: direct index for structure ( temp 4-component vector of float) +0:110 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:110 Constant: +0:110 0 (const int) +0:110 Constant: +0:110 1.000000 +0:110 1.000000 +0:110 1.000000 +0:110 1.000000 +0:111 move second child to first child ( temp float) +0:111 Depth: direct index for structure ( temp float) +0:111 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:111 Constant: +0:111 1 (const int) +0:111 Constant: +0:111 1.000000 +0:113 Branch: Return with expression +0:113 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Definition: main( ( temp void) 0:38 Function Parameters: 0:? Sequence @@ -146,13 +194,13 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: @@ -163,9 +211,9 @@ gl_FragCoord origin is upper left 0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) 0:? 'g_tTex1di4' ( uniform itexture1D) 0:? 'g_tTex1du4' ( uniform utexture1D) -0:? 'g_tTex2df4' ( uniform texture2D) -0:? 'g_tTex2di4' ( uniform itexture2D) -0:? 'g_tTex2du4' ( uniform utexture2D) +0:? 'g_tTex2df4' ( uniform texture2DShadow) +0:? 'g_tTex2di4' ( uniform itexture2DShadow) +0:? 'g_tTex2du4' ( uniform utexture2DShadow) 0:? 'g_tTex3df4' ( uniform texture3D) 0:? 'g_tTex3di4' ( uniform itexture3D) 0:? 'g_tTex3du4' ( uniform utexture3D) @@ -173,8 +221,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -191,7 +239,7 @@ gl_FragCoord origin is upper left 0:45 'txval001' ( temp 4-component vector of float) 0:45 textureGatherOffset ( temp 4-component vector of float) 0:45 Construct combined texture-sampler ( temp sampler2DShadow) -0:45 'g_tTex2df4' ( uniform texture2D) +0:45 'g_tTex2df4' ( uniform texture2DShadow) 0:45 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:45 c2: direct index for structure ( uniform 2-component vector of float) 0:45 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -207,7 +255,7 @@ gl_FragCoord origin is upper left 0:46 'txval011' ( temp 4-component vector of int) 0:46 textureGatherOffset ( temp 4-component vector of int) 0:46 Construct combined texture-sampler ( temp isampler2DShadow) -0:46 'g_tTex2di4' ( uniform itexture2D) +0:46 'g_tTex2di4' ( uniform itexture2DShadow) 0:46 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:46 c2: direct index for structure ( uniform 2-component vector of float) 0:46 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -223,7 +271,7 @@ gl_FragCoord origin is upper left 0:47 'txval021' ( temp 4-component vector of uint) 0:47 textureGatherOffset ( temp 4-component vector of uint) 0:47 Construct combined texture-sampler ( temp usampler2DShadow) -0:47 'g_tTex2du4' ( uniform utexture2D) +0:47 'g_tTex2du4' ( uniform utexture2DShadow) 0:47 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:47 c2: direct index for structure ( uniform 2-component vector of float) 0:47 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -239,7 +287,7 @@ gl_FragCoord origin is upper left 0:49 'txval004' ( temp 4-component vector of float) 0:49 textureGatherOffsets ( temp 4-component vector of float) 0:49 Construct combined texture-sampler ( temp sampler2DShadow) -0:49 'g_tTex2df4' ( uniform texture2D) +0:49 'g_tTex2df4' ( uniform texture2DShadow) 0:49 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:49 c2: direct index for structure ( uniform 2-component vector of float) 0:49 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -261,7 +309,7 @@ gl_FragCoord origin is upper left 0:50 'txval014' ( temp 4-component vector of int) 0:50 textureGatherOffsets ( temp 4-component vector of int) 0:50 Construct combined texture-sampler ( temp isampler2DShadow) -0:50 'g_tTex2di4' ( uniform itexture2D) +0:50 'g_tTex2di4' ( uniform itexture2DShadow) 0:50 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:50 c2: direct index for structure ( uniform 2-component vector of float) 0:50 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -283,7 +331,7 @@ gl_FragCoord origin is upper left 0:51 'txval024' ( temp 4-component vector of uint) 0:51 textureGatherOffsets ( temp 4-component vector of uint) 0:51 Construct combined texture-sampler ( temp usampler2DShadow) -0:51 'g_tTex2du4' ( uniform utexture2D) +0:51 'g_tTex2du4' ( uniform utexture2DShadow) 0:51 'g_sSampCmp' (layout( binding=0) uniform sampler) 0:51 c2: direct index for structure ( uniform 2-component vector of float) 0:51 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) @@ -300,25 +348,73 @@ gl_FragCoord origin is upper left 0:51 1 (const int) 0:51 1 (const int) 0:51 1 (const int) -0:114 move second child to first child ( temp 4-component vector of float) -0:114 Color: direct index for structure ( temp 4-component vector of float) -0:114 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:114 Constant: -0:114 0 (const int) -0:114 Constant: -0:114 1.000000 -0:114 1.000000 -0:114 1.000000 -0:114 1.000000 -0:115 move second child to first child ( temp float) -0:115 Depth: direct index for structure ( temp float) -0:115 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:115 Constant: -0:115 1 (const int) -0:115 Constant: -0:115 1.000000 -0:117 Branch: Return with expression -0:117 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:53 Sequence +0:53 move second child to first child ( temp 4-component vector of float) +0:53 'txval401' ( temp 4-component vector of float) +0:53 textureGatherOffset ( temp 4-component vector of float) +0:53 Construct combined texture-sampler ( temp sampler2DShadow) +0:53 'g_tTex2df4' ( uniform texture2DShadow) +0:53 'g_sSampCmp' (layout( binding=0) uniform sampler) +0:53 c2: direct index for structure ( uniform 2-component vector of float) +0:53 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) +0:53 Constant: +0:53 1 (const uint) +0:53 Constant: +0:53 0.750000 +0:? Constant: +0:? 1 (const int) +0:? 0 (const int) +0:54 Sequence +0:54 move second child to first child ( temp 4-component vector of int) +0:54 'txval411' ( temp 4-component vector of int) +0:54 textureGatherOffset ( temp 4-component vector of int) +0:54 Construct combined texture-sampler ( temp isampler2DShadow) +0:54 'g_tTex2di4' ( uniform itexture2DShadow) +0:54 'g_sSampCmp' (layout( binding=0) uniform sampler) +0:54 c2: direct index for structure ( uniform 2-component vector of float) +0:54 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) +0:54 Constant: +0:54 1 (const uint) +0:54 Constant: +0:54 0.750000 +0:? Constant: +0:? 1 (const int) +0:? -1 (const int) +0:55 Sequence +0:55 move second child to first child ( temp 4-component vector of uint) +0:55 'txval421' ( temp 4-component vector of uint) +0:55 textureGatherOffset ( temp 4-component vector of uint) +0:55 Construct combined texture-sampler ( temp usampler2DShadow) +0:55 'g_tTex2du4' ( uniform utexture2DShadow) +0:55 'g_sSampCmp' (layout( binding=0) uniform sampler) +0:55 c2: direct index for structure ( uniform 2-component vector of float) +0:55 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) +0:55 Constant: +0:55 1 (const uint) +0:55 Constant: +0:55 0.750000 +0:? Constant: +0:? 1 (const int) +0:? 1 (const int) +0:110 move second child to first child ( temp 4-component vector of float) +0:110 Color: direct index for structure ( temp 4-component vector of float) +0:110 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:110 Constant: +0:110 0 (const int) +0:110 Constant: +0:110 1.000000 +0:110 1.000000 +0:110 1.000000 +0:110 1.000000 +0:111 move second child to first child ( temp float) +0:111 Depth: direct index for structure ( temp float) +0:111 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:111 Constant: +0:111 1 (const int) +0:111 Constant: +0:111 1.000000 +0:113 Branch: Return with expression +0:113 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Definition: main( ( temp void) 0:38 Function Parameters: 0:? Sequence @@ -327,13 +423,13 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: @@ -344,9 +440,9 @@ gl_FragCoord origin is upper left 0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) 0:? 'g_tTex1di4' ( uniform itexture1D) 0:? 'g_tTex1du4' ( uniform utexture1D) -0:? 'g_tTex2df4' ( uniform texture2D) -0:? 'g_tTex2di4' ( uniform itexture2D) -0:? 'g_tTex2du4' ( uniform utexture2D) +0:? 'g_tTex2df4' ( uniform texture2DShadow) +0:? 'g_tTex2di4' ( uniform itexture2DShadow) +0:? 'g_tTex2du4' ( uniform utexture2DShadow) 0:? 'g_tTex3df4' ( uniform texture3D) 0:? 'g_tTex3di4' ( uniform itexture3D) 0:? 'g_tTex3du4' ( uniform utexture3D) @@ -354,18 +450,18 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform float c1, uniform 2-component vector of float c2, uniform 3-component vector of float c3, uniform 4-component vector of float c4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 146 +// Generated by (magic number): 80003 +// Id's are bound by 164 Capability Shader Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 111 115 + EntryPoint Fragment 4 "main" 129 133 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -376,58 +472,61 @@ gl_FragCoord origin is upper left Name 13 "txval001" Name 16 "g_tTex2df4" Name 20 "g_sSampCmp" - Name 27 "$Global" - MemberName 27($Global) 0 "c1" - MemberName 27($Global) 1 "c2" - MemberName 27($Global) 2 "c3" - MemberName 27($Global) 3 "c4" - Name 29 "" - Name 42 "txval011" - Name 45 "g_tTex2di4" - Name 59 "txval021" - Name 62 "g_tTex2du4" - Name 72 "txval004" - Name 82 "txval014" - Name 90 "txval024" - Name 99 "psout" - Name 108 "flattenTemp" - Name 111 "Color" - Name 115 "Depth" - Name 120 "g_tTex1df4a" - Name 121 "g_tTex1df4" - Name 124 "g_tTex1di4" - Name 127 "g_tTex1du4" - Name 130 "g_tTex3df4" - Name 133 "g_tTex3di4" - Name 136 "g_tTex3du4" - Name 139 "g_tTexcdf4" - Name 142 "g_tTexcdi4" - Name 145 "g_tTexcdu4" + Name 26 "$Global" + MemberName 26($Global) 0 "c1" + MemberName 26($Global) 1 "c2" + MemberName 26($Global) 2 "c3" + MemberName 26($Global) 3 "c4" + Name 28 "" + Name 41 "txval011" + Name 44 "g_tTex2di4" + Name 57 "txval021" + Name 60 "g_tTex2du4" + Name 69 "txval004" + Name 79 "txval014" + Name 87 "txval024" + Name 95 "txval401" + Name 102 "txval411" + Name 109 "txval421" + Name 117 "psout" + Name 126 "flattenTemp" + Name 129 "@entryPointOutput.Color" + Name 133 "@entryPointOutput.Depth" + Name 138 "g_tTex1df4a" + Name 139 "g_tTex1df4" + Name 142 "g_tTex1di4" + Name 145 "g_tTex1du4" + Name 148 "g_tTex3df4" + Name 151 "g_tTex3di4" + Name 154 "g_tTex3du4" + Name 157 "g_tTexcdf4" + Name 160 "g_tTexcdi4" + Name 163 "g_tTexcdu4" Decorate 16(g_tTex2df4) DescriptorSet 0 Decorate 20(g_sSampCmp) DescriptorSet 0 Decorate 20(g_sSampCmp) Binding 0 - MemberDecorate 27($Global) 0 Offset 0 - MemberDecorate 27($Global) 1 Offset 8 - MemberDecorate 27($Global) 2 Offset 16 - MemberDecorate 27($Global) 3 Offset 32 - Decorate 27($Global) Block - Decorate 29 DescriptorSet 0 - Decorate 45(g_tTex2di4) DescriptorSet 0 - Decorate 62(g_tTex2du4) DescriptorSet 0 - Decorate 111(Color) Location 0 - Decorate 115(Depth) BuiltIn FragDepth - Decorate 120(g_tTex1df4a) DescriptorSet 0 - Decorate 120(g_tTex1df4a) Binding 1 - Decorate 121(g_tTex1df4) DescriptorSet 0 - Decorate 121(g_tTex1df4) Binding 0 - Decorate 124(g_tTex1di4) DescriptorSet 0 - Decorate 127(g_tTex1du4) DescriptorSet 0 - Decorate 130(g_tTex3df4) DescriptorSet 0 - Decorate 133(g_tTex3di4) DescriptorSet 0 - Decorate 136(g_tTex3du4) DescriptorSet 0 - Decorate 139(g_tTexcdf4) DescriptorSet 0 - Decorate 142(g_tTexcdi4) DescriptorSet 0 - Decorate 145(g_tTexcdu4) DescriptorSet 0 + MemberDecorate 26($Global) 0 Offset 0 + MemberDecorate 26($Global) 1 Offset 8 + MemberDecorate 26($Global) 2 Offset 16 + MemberDecorate 26($Global) 3 Offset 32 + Decorate 26($Global) Block + Decorate 28 DescriptorSet 0 + Decorate 44(g_tTex2di4) DescriptorSet 0 + Decorate 60(g_tTex2du4) DescriptorSet 0 + Decorate 129(@entryPointOutput.Color) Location 0 + Decorate 133(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 138(g_tTex1df4a) DescriptorSet 0 + Decorate 138(g_tTex1df4a) Binding 1 + Decorate 139(g_tTex1df4) DescriptorSet 0 + Decorate 139(g_tTex1df4) Binding 0 + Decorate 142(g_tTex1di4) DescriptorSet 0 + Decorate 145(g_tTex1du4) DescriptorSet 0 + Decorate 148(g_tTex3df4) DescriptorSet 0 + Decorate 151(g_tTex3di4) DescriptorSet 0 + Decorate 154(g_tTex3du4) DescriptorSet 0 + Decorate 157(g_tTexcdf4) DescriptorSet 0 + Decorate 160(g_tTexcdi4) DescriptorSet 0 + Decorate 163(g_tTexcdu4) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -435,153 +534,174 @@ gl_FragCoord origin is upper left 8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float) 9: TypeFunction 8(PS_OUTPUT) 12: TypePointer Function 7(fvec4) - 14: TypeImage 6(float) 2D sampled format:Unknown + 14: TypeImage 6(float) 2D depth sampled format:Unknown 15: TypePointer UniformConstant 14 16(g_tTex2df4): 15(ptr) Variable UniformConstant 18: TypeSampler 19: TypePointer UniformConstant 18 20(g_sSampCmp): 19(ptr) Variable UniformConstant - 22: TypeImage 6(float) 2D depth sampled format:Unknown - 23: TypeSampledImage 22 - 25: TypeVector 6(float) 2 - 26: TypeVector 6(float) 3 - 27($Global): TypeStruct 6(float) 25(fvec2) 26(fvec3) 7(fvec4) - 28: TypePointer Uniform 27($Global) - 29: 28(ptr) Variable Uniform - 30: TypeInt 32 1 - 31: 30(int) Constant 1 - 32: TypePointer Uniform 25(fvec2) - 35: 6(float) Constant 1061158912 - 36: TypeVector 30(int) 2 - 37: 30(int) Constant 0 - 38: 36(ivec2) ConstantComposite 31 37 - 40: TypeVector 30(int) 4 - 41: TypePointer Function 40(ivec4) - 43: TypeImage 30(int) 2D sampled format:Unknown - 44: TypePointer UniformConstant 43 - 45(g_tTex2di4): 44(ptr) Variable UniformConstant - 48: TypeImage 30(int) 2D depth sampled format:Unknown - 49: TypeSampledImage 48 - 53: 30(int) Constant 4294967295 - 54: 36(ivec2) ConstantComposite 31 53 - 56: TypeInt 32 0 - 57: TypeVector 56(int) 4 - 58: TypePointer Function 57(ivec4) - 60: TypeImage 56(int) 2D sampled format:Unknown - 61: TypePointer UniformConstant 60 - 62(g_tTex2du4): 61(ptr) Variable UniformConstant - 65: TypeImage 56(int) 2D depth sampled format:Unknown - 66: TypeSampledImage 65 - 70: 36(ivec2) ConstantComposite 31 31 - 78: 56(int) Constant 4 - 79: TypeArray 36(ivec2) 78 - 80: 79 ConstantComposite 38 38 38 38 - 88: 79 ConstantComposite 54 54 54 54 - 96: 79 ConstantComposite 70 70 70 70 - 98: TypePointer Function 8(PS_OUTPUT) - 100: 6(float) Constant 1065353216 - 101: 7(fvec4) ConstantComposite 100 100 100 100 - 103: TypePointer Function 6(float) - 110: TypePointer Output 7(fvec4) - 111(Color): 110(ptr) Variable Output - 114: TypePointer Output 6(float) - 115(Depth): 114(ptr) Variable Output - 118: TypeImage 6(float) 1D sampled format:Unknown - 119: TypePointer UniformConstant 118 -120(g_tTex1df4a): 119(ptr) Variable UniformConstant - 121(g_tTex1df4): 119(ptr) Variable UniformConstant - 122: TypeImage 30(int) 1D sampled format:Unknown - 123: TypePointer UniformConstant 122 - 124(g_tTex1di4): 123(ptr) Variable UniformConstant - 125: TypeImage 56(int) 1D sampled format:Unknown - 126: TypePointer UniformConstant 125 - 127(g_tTex1du4): 126(ptr) Variable UniformConstant - 128: TypeImage 6(float) 3D sampled format:Unknown - 129: TypePointer UniformConstant 128 - 130(g_tTex3df4): 129(ptr) Variable UniformConstant - 131: TypeImage 30(int) 3D sampled format:Unknown - 132: TypePointer UniformConstant 131 - 133(g_tTex3di4): 132(ptr) Variable UniformConstant - 134: TypeImage 56(int) 3D sampled format:Unknown - 135: TypePointer UniformConstant 134 - 136(g_tTex3du4): 135(ptr) Variable UniformConstant - 137: TypeImage 6(float) Cube sampled format:Unknown - 138: TypePointer UniformConstant 137 - 139(g_tTexcdf4): 138(ptr) Variable UniformConstant - 140: TypeImage 30(int) Cube sampled format:Unknown + 22: TypeSampledImage 14 + 24: TypeVector 6(float) 2 + 25: TypeVector 6(float) 3 + 26($Global): TypeStruct 6(float) 24(fvec2) 25(fvec3) 7(fvec4) + 27: TypePointer Uniform 26($Global) + 28: 27(ptr) Variable Uniform + 29: TypeInt 32 1 + 30: 29(int) Constant 1 + 31: TypePointer Uniform 24(fvec2) + 34: 6(float) Constant 1061158912 + 35: TypeVector 29(int) 2 + 36: 29(int) Constant 0 + 37: 35(ivec2) ConstantComposite 30 36 + 39: TypeVector 29(int) 4 + 40: TypePointer Function 39(ivec4) + 42: TypeImage 29(int) 2D depth sampled format:Unknown + 43: TypePointer UniformConstant 42 + 44(g_tTex2di4): 43(ptr) Variable UniformConstant + 47: TypeSampledImage 42 + 51: 29(int) Constant 4294967295 + 52: 35(ivec2) ConstantComposite 30 51 + 54: TypeInt 32 0 + 55: TypeVector 54(int) 4 + 56: TypePointer Function 55(ivec4) + 58: TypeImage 54(int) 2D depth sampled format:Unknown + 59: TypePointer UniformConstant 58 + 60(g_tTex2du4): 59(ptr) Variable UniformConstant + 63: TypeSampledImage 58 + 67: 35(ivec2) ConstantComposite 30 30 + 75: 54(int) Constant 4 + 76: TypeArray 35(ivec2) 75 + 77: 76 ConstantComposite 37 37 37 37 + 85: 76 ConstantComposite 52 52 52 52 + 93: 76 ConstantComposite 67 67 67 67 + 116: TypePointer Function 8(PS_OUTPUT) + 118: 6(float) Constant 1065353216 + 119: 7(fvec4) ConstantComposite 118 118 118 118 + 121: TypePointer Function 6(float) + 128: TypePointer Output 7(fvec4) +129(@entryPointOutput.Color): 128(ptr) Variable Output + 132: TypePointer Output 6(float) +133(@entryPointOutput.Depth): 132(ptr) Variable Output + 136: TypeImage 6(float) 1D sampled format:Unknown + 137: TypePointer UniformConstant 136 +138(g_tTex1df4a): 137(ptr) Variable UniformConstant + 139(g_tTex1df4): 137(ptr) Variable UniformConstant + 140: TypeImage 29(int) 1D sampled format:Unknown 141: TypePointer UniformConstant 140 - 142(g_tTexcdi4): 141(ptr) Variable UniformConstant - 143: TypeImage 56(int) Cube sampled format:Unknown + 142(g_tTex1di4): 141(ptr) Variable UniformConstant + 143: TypeImage 54(int) 1D sampled format:Unknown 144: TypePointer UniformConstant 143 - 145(g_tTexcdu4): 144(ptr) Variable UniformConstant + 145(g_tTex1du4): 144(ptr) Variable UniformConstant + 146: TypeImage 6(float) 3D sampled format:Unknown + 147: TypePointer UniformConstant 146 + 148(g_tTex3df4): 147(ptr) Variable UniformConstant + 149: TypeImage 29(int) 3D sampled format:Unknown + 150: TypePointer UniformConstant 149 + 151(g_tTex3di4): 150(ptr) Variable UniformConstant + 152: TypeImage 54(int) 3D sampled format:Unknown + 153: TypePointer UniformConstant 152 + 154(g_tTex3du4): 153(ptr) Variable UniformConstant + 155: TypeImage 6(float) Cube sampled format:Unknown + 156: TypePointer UniformConstant 155 + 157(g_tTexcdf4): 156(ptr) Variable UniformConstant + 158: TypeImage 29(int) Cube sampled format:Unknown + 159: TypePointer UniformConstant 158 + 160(g_tTexcdi4): 159(ptr) Variable UniformConstant + 161: TypeImage 54(int) Cube sampled format:Unknown + 162: TypePointer UniformConstant 161 + 163(g_tTexcdu4): 162(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label -108(flattenTemp): 98(ptr) Variable Function - 109:8(PS_OUTPUT) FunctionCall 10(@main() - Store 108(flattenTemp) 109 - 112: 12(ptr) AccessChain 108(flattenTemp) 37 - 113: 7(fvec4) Load 112 - Store 111(Color) 113 - 116: 103(ptr) AccessChain 108(flattenTemp) 31 - 117: 6(float) Load 116 - Store 115(Depth) 117 +126(flattenTemp): 116(ptr) Variable Function + 127:8(PS_OUTPUT) FunctionCall 10(@main() + Store 126(flattenTemp) 127 + 130: 12(ptr) AccessChain 126(flattenTemp) 36 + 131: 7(fvec4) Load 130 + Store 129(@entryPointOutput.Color) 131 + 134: 121(ptr) AccessChain 126(flattenTemp) 30 + 135: 6(float) Load 134 + Store 133(@entryPointOutput.Depth) 135 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 11: Label 13(txval001): 12(ptr) Variable Function - 42(txval011): 41(ptr) Variable Function - 59(txval021): 58(ptr) Variable Function - 72(txval004): 12(ptr) Variable Function - 82(txval014): 41(ptr) Variable Function - 90(txval024): 58(ptr) Variable Function - 99(psout): 98(ptr) Variable Function + 41(txval011): 40(ptr) Variable Function + 57(txval021): 56(ptr) Variable Function + 69(txval004): 12(ptr) Variable Function + 79(txval014): 40(ptr) Variable Function + 87(txval024): 56(ptr) Variable Function + 95(txval401): 12(ptr) Variable Function + 102(txval411): 40(ptr) Variable Function + 109(txval421): 56(ptr) Variable Function + 117(psout): 116(ptr) Variable Function 17: 14 Load 16(g_tTex2df4) 21: 18 Load 20(g_sSampCmp) - 24: 23 SampledImage 17 21 - 33: 32(ptr) AccessChain 29 31 - 34: 25(fvec2) Load 33 - 39: 7(fvec4) ImageDrefGather 24 34 35 ConstOffset 38 - Store 13(txval001) 39 - 46: 43 Load 45(g_tTex2di4) - 47: 18 Load 20(g_sSampCmp) - 50: 49 SampledImage 46 47 - 51: 32(ptr) AccessChain 29 31 - 52: 25(fvec2) Load 51 - 55: 40(ivec4) ImageDrefGather 50 52 35 ConstOffset 54 - Store 42(txval011) 55 - 63: 60 Load 62(g_tTex2du4) - 64: 18 Load 20(g_sSampCmp) - 67: 66 SampledImage 63 64 - 68: 32(ptr) AccessChain 29 31 - 69: 25(fvec2) Load 68 - 71: 57(ivec4) ImageDrefGather 67 69 35 ConstOffset 70 - Store 59(txval021) 71 - 73: 14 Load 16(g_tTex2df4) - 74: 18 Load 20(g_sSampCmp) - 75: 23 SampledImage 73 74 - 76: 32(ptr) AccessChain 29 31 - 77: 25(fvec2) Load 76 - 81: 7(fvec4) ImageDrefGather 75 77 35 ConstOffsets 80 - Store 72(txval004) 81 - 83: 43 Load 45(g_tTex2di4) - 84: 18 Load 20(g_sSampCmp) - 85: 49 SampledImage 83 84 - 86: 32(ptr) AccessChain 29 31 - 87: 25(fvec2) Load 86 - 89: 40(ivec4) ImageDrefGather 85 87 35 ConstOffsets 88 - Store 82(txval014) 89 - 91: 60 Load 62(g_tTex2du4) - 92: 18 Load 20(g_sSampCmp) - 93: 66 SampledImage 91 92 - 94: 32(ptr) AccessChain 29 31 - 95: 25(fvec2) Load 94 - 97: 57(ivec4) ImageDrefGather 93 95 35 ConstOffsets 96 - Store 90(txval024) 97 - 102: 12(ptr) AccessChain 99(psout) 37 - Store 102 101 - 104: 103(ptr) AccessChain 99(psout) 31 - Store 104 100 - 105:8(PS_OUTPUT) Load 99(psout) - ReturnValue 105 + 23: 22 SampledImage 17 21 + 32: 31(ptr) AccessChain 28 30 + 33: 24(fvec2) Load 32 + 38: 7(fvec4) ImageDrefGather 23 33 34 ConstOffset 37 + Store 13(txval001) 38 + 45: 42 Load 44(g_tTex2di4) + 46: 18 Load 20(g_sSampCmp) + 48: 47 SampledImage 45 46 + 49: 31(ptr) AccessChain 28 30 + 50: 24(fvec2) Load 49 + 53: 39(ivec4) ImageDrefGather 48 50 34 ConstOffset 52 + Store 41(txval011) 53 + 61: 58 Load 60(g_tTex2du4) + 62: 18 Load 20(g_sSampCmp) + 64: 63 SampledImage 61 62 + 65: 31(ptr) AccessChain 28 30 + 66: 24(fvec2) Load 65 + 68: 55(ivec4) ImageDrefGather 64 66 34 ConstOffset 67 + Store 57(txval021) 68 + 70: 14 Load 16(g_tTex2df4) + 71: 18 Load 20(g_sSampCmp) + 72: 22 SampledImage 70 71 + 73: 31(ptr) AccessChain 28 30 + 74: 24(fvec2) Load 73 + 78: 7(fvec4) ImageDrefGather 72 74 34 ConstOffsets 77 + Store 69(txval004) 78 + 80: 42 Load 44(g_tTex2di4) + 81: 18 Load 20(g_sSampCmp) + 82: 47 SampledImage 80 81 + 83: 31(ptr) AccessChain 28 30 + 84: 24(fvec2) Load 83 + 86: 39(ivec4) ImageDrefGather 82 84 34 ConstOffsets 85 + Store 79(txval014) 86 + 88: 58 Load 60(g_tTex2du4) + 89: 18 Load 20(g_sSampCmp) + 90: 63 SampledImage 88 89 + 91: 31(ptr) AccessChain 28 30 + 92: 24(fvec2) Load 91 + 94: 55(ivec4) ImageDrefGather 90 92 34 ConstOffsets 93 + Store 87(txval024) 94 + 96: 14 Load 16(g_tTex2df4) + 97: 18 Load 20(g_sSampCmp) + 98: 22 SampledImage 96 97 + 99: 31(ptr) AccessChain 28 30 + 100: 24(fvec2) Load 99 + 101: 7(fvec4) ImageDrefGather 98 100 34 ConstOffset 37 + Store 95(txval401) 101 + 103: 42 Load 44(g_tTex2di4) + 104: 18 Load 20(g_sSampCmp) + 105: 47 SampledImage 103 104 + 106: 31(ptr) AccessChain 28 30 + 107: 24(fvec2) Load 106 + 108: 39(ivec4) ImageDrefGather 105 107 34 ConstOffset 52 + Store 102(txval411) 108 + 110: 58 Load 60(g_tTex2du4) + 111: 18 Load 20(g_sSampCmp) + 112: 63 SampledImage 110 111 + 113: 31(ptr) AccessChain 28 30 + 114: 24(fvec2) Load 113 + 115: 55(ivec4) ImageDrefGather 112 114 34 ConstOffset 67 + Store 109(txval421) 115 + 120: 12(ptr) AccessChain 117(psout) 36 + Store 120 119 + 122: 121(ptr) AccessChain 117(psout) 30 + Store 122 118 + 123:8(PS_OUTPUT) Load 117(psout) + ReturnValue 123 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.dx10.frag.out index c3986d7..7b5da68 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.dx10.frag.out @@ -1112,13 +1112,13 @@ gl_FragCoord origin is upper left 0:46 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:46 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:46 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:46 Color: direct index for structure ( temp 4-component vector of float) 0:46 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:46 Constant: 0:46 0 (const int) 0:46 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:46 Depth: direct index for structure ( temp float) 0:46 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:46 Constant: @@ -1152,8 +1152,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2dmsf4a' ( uniform texture2DMSArray) 0:? 'g_tTex2dmsi4a' ( uniform itexture2DMSArray) 0:? 'g_tTex2dmsu4a' ( uniform utexture2DMSArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -2272,13 +2272,13 @@ gl_FragCoord origin is upper left 0:46 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:46 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:46 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:46 Color: direct index for structure ( temp 4-component vector of float) 0:46 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:46 Constant: 0:46 0 (const int) 0:46 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:46 Depth: direct index for structure ( temp float) 0:46 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:46 Constant: @@ -2312,17 +2312,16 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2dmsf4a' ( uniform texture2DMSArray) 0:? 'g_tTex2dmsi4a' ( uniform itexture2DMSArray) 0:? 'g_tTex2dmsu4a' ( uniform utexture2DMSArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 550 Capability Shader Capability Sampled1D Capability SampledCubeArray - Capability ImageMSArray Capability ImageQuery 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 @@ -2417,8 +2416,8 @@ gl_FragCoord origin is upper left Name 514 "g_tTex2dmsu4a" Name 526 "psout" Name 537 "flattenTemp" - Name 540 "Color" - Name 544 "Depth" + Name 540 "@entryPointOutput.Color" + Name 544 "@entryPointOutput.Depth" Name 549 "g_sSamp" Decorate 17(g_tTex1df4) DescriptorSet 0 Decorate 17(g_tTex1df4) Binding 0 @@ -2448,8 +2447,8 @@ gl_FragCoord origin is upper left Decorate 486(g_tTex2dmsf4a) DescriptorSet 0 Decorate 500(g_tTex2dmsi4a) DescriptorSet 0 Decorate 514(g_tTex2dmsu4a) DescriptorSet 0 - Decorate 540(Color) Location 0 - Decorate 544(Depth) BuiltIn FragDepth + Decorate 540(@entryPointOutput.Color) Location 0 + Decorate 544(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 549(g_sSamp) DescriptorSet 0 Decorate 549(g_sSamp) Binding 0 2: TypeVoid @@ -2558,9 +2557,9 @@ gl_FragCoord origin is upper left 531: 19(int) Constant 1 532: TypePointer Function 6(float) 539: TypePointer Output 7(fvec4) - 540(Color): 539(ptr) Variable Output +540(@entryPointOutput.Color): 539(ptr) Variable Output 543: TypePointer Output 6(float) - 544(Depth): 543(ptr) Variable Output +544(@entryPointOutput.Depth): 543(ptr) Variable Output 547: TypeSampler 548: TypePointer UniformConstant 547 549(g_sSamp): 548(ptr) Variable UniformConstant @@ -2571,10 +2570,10 @@ gl_FragCoord origin is upper left Store 537(flattenTemp) 538 541: 529(ptr) AccessChain 537(flattenTemp) 20 542: 7(fvec4) Load 541 - Store 540(Color) 542 + Store 540(@entryPointOutput.Color) 542 545: 532(ptr) AccessChain 537(flattenTemp) 531 546: 6(float) Load 545 - Store 544(Depth) 546 + Store 544(@entryPointOutput.Depth) 546 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.dx10.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.dx10.vert.out index cb1eae6..e407bb0 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.dx10.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.dx10.vert.out @@ -45,7 +45,7 @@ Shader version: 500 0:? Sequence 0:11 Sequence 0:11 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:11 Pos: direct index for structure ( temp 4-component vector of float) 0:11 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) 0:11 Constant: @@ -53,7 +53,7 @@ Shader version: 500 0:? Linker Objects 0:? 'g_sSamp' (layout( binding=0) uniform sampler) 0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) -0:? '@entryPointOutput' (layout( location=0) out structure{}) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) Linked vertex stage: @@ -105,7 +105,7 @@ Shader version: 500 0:? Sequence 0:11 Sequence 0:11 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:11 Pos: direct index for structure ( temp 4-component vector of float) 0:11 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) 0:11 Constant: @@ -113,18 +113,18 @@ Shader version: 500 0:? Linker Objects 0:? 'g_sSamp' (layout( binding=0) uniform sampler) 0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) -0:? '@entryPointOutput' (layout( location=0) out structure{}) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 51 +// Generated by (magic number): 80003 +// Id's are bound by 48 Capability Shader Capability Sampled1D Capability ImageQuery 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 42 50 + EntryPoint Vertex 4 "main" 42 Source HLSL 500 Name 4 "main" Name 8 "VS_OUTPUT" @@ -136,16 +136,13 @@ Shader version: 500 Name 24 "sizeQueryTemp" Name 29 "NumberOfLevelsU" Name 33 "vsout" - Name 42 "@entryPointOutput_Pos" + Name 42 "@entryPointOutput.Pos" Name 47 "g_sSamp" - Name 48 "VS_OUTPUT" - Name 50 "@entryPointOutput" Decorate 17(g_tTex1df4) DescriptorSet 0 Decorate 17(g_tTex1df4) Binding 0 - Decorate 42(@entryPointOutput_Pos) BuiltIn Position + Decorate 42(@entryPointOutput.Pos) BuiltIn Position Decorate 47(g_sSamp) DescriptorSet 0 Decorate 47(g_sSamp) Binding 0 - Decorate 50(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -165,18 +162,15 @@ Shader version: 500 35: 7(fvec4) ConstantComposite 34 34 34 34 36: TypePointer Function 7(fvec4) 41: TypePointer Output 7(fvec4) -42(@entryPointOutput_Pos): 41(ptr) Variable Output +42(@entryPointOutput.Pos): 41(ptr) Variable Output 45: TypeSampler 46: TypePointer UniformConstant 45 47(g_sSamp): 46(ptr) Variable UniformConstant - 48(VS_OUTPUT): TypeStruct - 49: TypePointer Output 48(VS_OUTPUT) -50(@entryPointOutput): 49(ptr) Variable Output 4(main): 2 Function None 3 5: Label 43:8(VS_OUTPUT) FunctionCall 10(@main() 44: 7(fvec4) CompositeExtract 43 0 - Store 42(@entryPointOutput_Pos) 44 + Store 42(@entryPointOutput.Pos) 44 Return FunctionEnd 10(@main():8(VS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out index 67b2f8f..6f24423 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out @@ -320,13 +320,13 @@ gl_FragCoord origin is upper left 0:44 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:44 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:44 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:44 Color: direct index for structure ( temp 4-component vector of float) 0:44 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:44 Constant: 0:44 0 (const int) 0:44 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:44 Depth: direct index for structure ( temp float) 0:44 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:44 Constant: @@ -352,8 +352,8 @@ gl_FragCoord origin is upper left 0:? 'g_tBuffI' (layout( rgba32i) uniform iimageBuffer) 0:? 'g_tBuffU' (layout( rgba32ui) uniform uimageBuffer) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -680,13 +680,13 @@ gl_FragCoord origin is upper left 0:44 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:44 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:44 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:44 Color: direct index for structure ( temp 4-component vector of float) 0:44 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:44 Constant: 0:44 0 (const int) 0:44 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:44 Depth: direct index for structure ( temp float) 0:44 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:44 Constant: @@ -712,16 +712,16 @@ gl_FragCoord origin is upper left 0:? 'g_tBuffI' (layout( rgba32i) uniform iimageBuffer) 0:? 'g_tBuffU' (layout( rgba32ui) uniform uimageBuffer) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 232 Capability Shader - Capability Sampled1D - Capability SampledBuffer + Capability Image1D + Capability ImageBuffer Capability ImageQuery 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 @@ -775,8 +775,8 @@ gl_FragCoord origin is upper left Name 191 "g_tTex3du4" Name 201 "psout" Name 213 "flattenTemp" - Name 216 "Color" - Name 220 "Depth" + Name 216 "@entryPointOutput.Color" + Name 220 "@entryPointOutput.Depth" Name 225 "g_sSamp" Name 229 "$Global" MemberName 229($Global) 0 "c1" @@ -807,8 +807,8 @@ gl_FragCoord origin is upper left Decorate 166(g_tTex3df4) DescriptorSet 0 Decorate 179(g_tTex3di4) DescriptorSet 0 Decorate 191(g_tTex3du4) DescriptorSet 0 - Decorate 216(Color) Location 0 - Decorate 220(Depth) BuiltIn FragDepth + Decorate 216(@entryPointOutput.Color) Location 0 + Decorate 220(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 225(g_sSamp) DescriptorSet 0 Decorate 225(g_sSamp) Binding 0 MemberDecorate 229($Global) 0 Offset 0 @@ -899,9 +899,9 @@ gl_FragCoord origin is upper left 207: 23(int) Constant 1 208: TypePointer Function 6(float) 215: TypePointer Output 7(fvec4) - 216(Color): 215(ptr) Variable Output +216(@entryPointOutput.Color): 215(ptr) Variable Output 219: TypePointer Output 6(float) - 220(Depth): 219(ptr) Variable Output +220(@entryPointOutput.Depth): 219(ptr) Variable Output 223: TypeSampler 224: TypePointer UniformConstant 223 225(g_sSamp): 224(ptr) Variable UniformConstant @@ -918,10 +918,10 @@ gl_FragCoord origin is upper left Store 213(flattenTemp) 214 217: 205(ptr) AccessChain 213(flattenTemp) 202 218: 7(fvec4) Load 217 - Store 216(Color) 218 + Store 216(@entryPointOutput.Color) 218 221: 208(ptr) AccessChain 213(flattenTemp) 207 222: 6(float) Load 221 - Store 220(Depth) 222 + Store 220(@entryPointOutput.Depth) 222 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getsampleposition.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getsampleposition.dx10.frag.out index 4c86b75..b5070e3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getsampleposition.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.getsampleposition.dx10.frag.out @@ -1,31 +1,241 @@ hlsl.getsampleposition.dx10.frag -ERROR: 0:16: '' : unimplemented: GetSamplePosition -ERROR: 0:17: '' : unimplemented: GetSamplePosition -ERROR: 2 compilation errors. No code generated. - - Shader version: 500 gl_FragCoord origin is upper left -ERROR: node is still EOpNull! -0:13 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:? Sequence +0:13 Function Definition: @main(i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:13 Function Parameters: +0:13 'sample' ( in int) 0:? Sequence 0:16 Sequence 0:16 move second child to first child ( temp 2-component vector of float) 0:16 'r00' ( temp 2-component vector of float) -0:16 ERROR: Bad aggregation op - ( temp 2-component vector of float) -0:16 'g_tTex2dmsf4' ( uniform texture2DMS) -0:16 Constant: -0:16 1 (const int) +0:16 Sequence +0:16 move second child to first child ( temp uint) +0:16 '@sampleCount' ( temp uint) +0:16 imageQuerySamples ( temp uint) +0:16 'g_tTex2dmsf4' ( uniform texture2DMS) +0:16 Test condition and select ( temp 2-component vector of float) +0:16 Condition +0:16 Compare Equal ( temp bool) +0:16 '@sampleCount' ( temp uint) +0:16 Constant: +0:16 2 (const int) +0:16 true case +0:16 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.250000 +0:? 0.250000 +0:? -0.250000 +0:? -0.250000 +0:16 'sample' ( in int) +0:16 false case +0:16 Test condition and select ( temp 2-component vector of float) +0:16 Condition +0:16 Compare Equal ( temp bool) +0:16 '@sampleCount' ( temp uint) +0:16 Constant: +0:16 4 (const int) +0:16 true case +0:16 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? -0.125000 +0:? -0.375000 +0:? 0.375000 +0:? -0.125000 +0:? -0.375000 +0:? 0.125000 +0:? 0.125000 +0:? 0.375000 +0:16 'sample' ( in int) +0:16 false case +0:16 Test condition and select ( temp 2-component vector of float) +0:16 Condition +0:16 Compare Equal ( temp bool) +0:16 '@sampleCount' ( temp uint) +0:16 Constant: +0:16 8 (const int) +0:16 true case +0:16 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.062500 +0:? -0.187500 +0:? -0.062500 +0:? 0.187500 +0:? 0.312500 +0:? 0.062500 +0:? -0.187500 +0:? -0.312500 +0:? -0.312500 +0:? 0.312500 +0:? -0.437500 +0:? -0.062500 +0:? 0.187500 +0:? 0.437500 +0:? 0.437500 +0:? -0.437500 +0:16 'sample' ( in int) +0:16 false case +0:16 Test condition and select ( temp 2-component vector of float) +0:16 Condition +0:16 Compare Equal ( temp bool) +0:16 '@sampleCount' ( temp uint) +0:16 Constant: +0:16 16 (const int) +0:16 true case +0:16 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.062500 +0:? 0.062500 +0:? -0.062500 +0:? -0.187500 +0:? -0.187500 +0:? 0.125000 +0:? 0.250000 +0:? -0.062500 +0:? -0.312500 +0:? -0.125000 +0:? 0.125000 +0:? 0.312500 +0:? 0.312500 +0:? 0.187500 +0:? 0.187500 +0:? -0.312500 +0:? -0.125000 +0:? 0.375000 +0:? 0.000000 +0:? -0.437500 +0:? -0.250000 +0:? -0.375000 +0:? -0.375000 +0:? 0.250000 +0:? -0.500000 +0:? 0.000000 +0:? 0.437500 +0:? -0.250000 +0:? 0.375000 +0:? 0.437500 +0:? -0.437500 +0:? -0.500000 +0:16 'sample' ( in int) +0:16 false case +0:? Constant: +0:? 0.000000 +0:? 0.000000 0:17 Sequence 0:17 move second child to first child ( temp 2-component vector of float) 0:17 'r01' ( temp 2-component vector of float) -0:17 ERROR: Bad aggregation op - ( temp 2-component vector of float) -0:17 'g_tTex2dmsf4a' ( uniform texture2DMSArray) -0:17 Constant: -0:17 2 (const int) +0:17 Sequence +0:17 move second child to first child ( temp uint) +0:17 '@sampleCount' ( temp uint) +0:17 imageQuerySamples ( temp uint) +0:17 'g_tTex2dmsf4a' ( uniform texture2DMSArray) +0:17 Test condition and select ( temp 2-component vector of float) +0:17 Condition +0:17 Compare Equal ( temp bool) +0:17 '@sampleCount' ( temp uint) +0:17 Constant: +0:17 2 (const int) +0:17 true case +0:17 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.250000 +0:? 0.250000 +0:? -0.250000 +0:? -0.250000 +0:17 'sample' ( in int) +0:17 false case +0:17 Test condition and select ( temp 2-component vector of float) +0:17 Condition +0:17 Compare Equal ( temp bool) +0:17 '@sampleCount' ( temp uint) +0:17 Constant: +0:17 4 (const int) +0:17 true case +0:17 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? -0.125000 +0:? -0.375000 +0:? 0.375000 +0:? -0.125000 +0:? -0.375000 +0:? 0.125000 +0:? 0.125000 +0:? 0.375000 +0:17 'sample' ( in int) +0:17 false case +0:17 Test condition and select ( temp 2-component vector of float) +0:17 Condition +0:17 Compare Equal ( temp bool) +0:17 '@sampleCount' ( temp uint) +0:17 Constant: +0:17 8 (const int) +0:17 true case +0:17 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.062500 +0:? -0.187500 +0:? -0.062500 +0:? 0.187500 +0:? 0.312500 +0:? 0.062500 +0:? -0.187500 +0:? -0.312500 +0:? -0.312500 +0:? 0.312500 +0:? -0.437500 +0:? -0.062500 +0:? 0.187500 +0:? 0.437500 +0:? 0.437500 +0:? -0.437500 +0:17 'sample' ( in int) +0:17 false case +0:17 Test condition and select ( temp 2-component vector of float) +0:17 Condition +0:17 Compare Equal ( temp bool) +0:17 '@sampleCount' ( temp uint) +0:17 Constant: +0:17 16 (const int) +0:17 true case +0:17 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.062500 +0:? 0.062500 +0:? -0.062500 +0:? -0.187500 +0:? -0.187500 +0:? 0.125000 +0:? 0.250000 +0:? -0.062500 +0:? -0.312500 +0:? -0.125000 +0:? 0.125000 +0:? 0.312500 +0:? 0.312500 +0:? 0.187500 +0:? 0.187500 +0:? -0.312500 +0:? -0.125000 +0:? 0.375000 +0:? 0.000000 +0:? -0.437500 +0:? -0.250000 +0:? -0.375000 +0:? -0.375000 +0:? 0.250000 +0:? -0.500000 +0:? 0.000000 +0:? 0.437500 +0:? -0.250000 +0:? 0.375000 +0:? 0.437500 +0:? -0.437500 +0:? -0.500000 +0:17 'sample' ( in int) +0:17 false case +0:? Constant: +0:? 0.000000 +0:? 0.000000 0:19 move second child to first child ( temp 4-component vector of float) 0:19 Color: direct index for structure ( temp 4-component vector of float) 0:19 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) @@ -48,18 +258,22 @@ ERROR: node is still EOpNull! 0:13 Function Definition: main( ( temp void) 0:13 Function Parameters: 0:? Sequence +0:13 move second child to first child ( temp int) +0:? 'sample' ( temp int) +0:? 'sample' (layout( location=0) flat in int) 0:13 Sequence 0:13 move second child to first child ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:13 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:13 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:13 Function Call: @main(i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:? 'sample' ( temp int) 0:13 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:13 Color: direct index for structure ( temp 4-component vector of float) 0:13 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:13 Constant: 0:13 0 (const int) 0:13 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:13 Depth: direct index for structure ( temp float) 0:13 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:13 Constant: @@ -68,8 +282,9 @@ ERROR: node is still EOpNull! 0:? 'g_sSamp' (layout( binding=0) uniform sampler) 0:? 'g_tTex2dmsf4' ( uniform texture2DMS) 0:? 'g_tTex2dmsf4a' ( uniform texture2DMSArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) +0:? 'sample' (layout( location=0) flat in int) Linked fragment stage: @@ -77,26 +292,241 @@ Linked fragment stage: Shader version: 500 gl_FragCoord origin is upper left -ERROR: node is still EOpNull! -0:13 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:? Sequence +0:13 Function Definition: @main(i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:13 Function Parameters: +0:13 'sample' ( in int) 0:? Sequence 0:16 Sequence 0:16 move second child to first child ( temp 2-component vector of float) 0:16 'r00' ( temp 2-component vector of float) -0:16 ERROR: Bad aggregation op - ( temp 2-component vector of float) -0:16 'g_tTex2dmsf4' ( uniform texture2DMS) -0:16 Constant: -0:16 1 (const int) +0:16 Sequence +0:16 move second child to first child ( temp uint) +0:16 '@sampleCount' ( temp uint) +0:16 imageQuerySamples ( temp uint) +0:16 'g_tTex2dmsf4' ( uniform texture2DMS) +0:16 Test condition and select ( temp 2-component vector of float) +0:16 Condition +0:16 Compare Equal ( temp bool) +0:16 '@sampleCount' ( temp uint) +0:16 Constant: +0:16 2 (const int) +0:16 true case +0:16 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.250000 +0:? 0.250000 +0:? -0.250000 +0:? -0.250000 +0:16 'sample' ( in int) +0:16 false case +0:16 Test condition and select ( temp 2-component vector of float) +0:16 Condition +0:16 Compare Equal ( temp bool) +0:16 '@sampleCount' ( temp uint) +0:16 Constant: +0:16 4 (const int) +0:16 true case +0:16 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? -0.125000 +0:? -0.375000 +0:? 0.375000 +0:? -0.125000 +0:? -0.375000 +0:? 0.125000 +0:? 0.125000 +0:? 0.375000 +0:16 'sample' ( in int) +0:16 false case +0:16 Test condition and select ( temp 2-component vector of float) +0:16 Condition +0:16 Compare Equal ( temp bool) +0:16 '@sampleCount' ( temp uint) +0:16 Constant: +0:16 8 (const int) +0:16 true case +0:16 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.062500 +0:? -0.187500 +0:? -0.062500 +0:? 0.187500 +0:? 0.312500 +0:? 0.062500 +0:? -0.187500 +0:? -0.312500 +0:? -0.312500 +0:? 0.312500 +0:? -0.437500 +0:? -0.062500 +0:? 0.187500 +0:? 0.437500 +0:? 0.437500 +0:? -0.437500 +0:16 'sample' ( in int) +0:16 false case +0:16 Test condition and select ( temp 2-component vector of float) +0:16 Condition +0:16 Compare Equal ( temp bool) +0:16 '@sampleCount' ( temp uint) +0:16 Constant: +0:16 16 (const int) +0:16 true case +0:16 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.062500 +0:? 0.062500 +0:? -0.062500 +0:? -0.187500 +0:? -0.187500 +0:? 0.125000 +0:? 0.250000 +0:? -0.062500 +0:? -0.312500 +0:? -0.125000 +0:? 0.125000 +0:? 0.312500 +0:? 0.312500 +0:? 0.187500 +0:? 0.187500 +0:? -0.312500 +0:? -0.125000 +0:? 0.375000 +0:? 0.000000 +0:? -0.437500 +0:? -0.250000 +0:? -0.375000 +0:? -0.375000 +0:? 0.250000 +0:? -0.500000 +0:? 0.000000 +0:? 0.437500 +0:? -0.250000 +0:? 0.375000 +0:? 0.437500 +0:? -0.437500 +0:? -0.500000 +0:16 'sample' ( in int) +0:16 false case +0:? Constant: +0:? 0.000000 +0:? 0.000000 0:17 Sequence 0:17 move second child to first child ( temp 2-component vector of float) 0:17 'r01' ( temp 2-component vector of float) -0:17 ERROR: Bad aggregation op - ( temp 2-component vector of float) -0:17 'g_tTex2dmsf4a' ( uniform texture2DMSArray) -0:17 Constant: -0:17 2 (const int) +0:17 Sequence +0:17 move second child to first child ( temp uint) +0:17 '@sampleCount' ( temp uint) +0:17 imageQuerySamples ( temp uint) +0:17 'g_tTex2dmsf4a' ( uniform texture2DMSArray) +0:17 Test condition and select ( temp 2-component vector of float) +0:17 Condition +0:17 Compare Equal ( temp bool) +0:17 '@sampleCount' ( temp uint) +0:17 Constant: +0:17 2 (const int) +0:17 true case +0:17 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.250000 +0:? 0.250000 +0:? -0.250000 +0:? -0.250000 +0:17 'sample' ( in int) +0:17 false case +0:17 Test condition and select ( temp 2-component vector of float) +0:17 Condition +0:17 Compare Equal ( temp bool) +0:17 '@sampleCount' ( temp uint) +0:17 Constant: +0:17 4 (const int) +0:17 true case +0:17 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? -0.125000 +0:? -0.375000 +0:? 0.375000 +0:? -0.125000 +0:? -0.375000 +0:? 0.125000 +0:? 0.125000 +0:? 0.375000 +0:17 'sample' ( in int) +0:17 false case +0:17 Test condition and select ( temp 2-component vector of float) +0:17 Condition +0:17 Compare Equal ( temp bool) +0:17 '@sampleCount' ( temp uint) +0:17 Constant: +0:17 8 (const int) +0:17 true case +0:17 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.062500 +0:? -0.187500 +0:? -0.062500 +0:? 0.187500 +0:? 0.312500 +0:? 0.062500 +0:? -0.187500 +0:? -0.312500 +0:? -0.312500 +0:? 0.312500 +0:? -0.437500 +0:? -0.062500 +0:? 0.187500 +0:? 0.437500 +0:? 0.437500 +0:? -0.437500 +0:17 'sample' ( in int) +0:17 false case +0:17 Test condition and select ( temp 2-component vector of float) +0:17 Condition +0:17 Compare Equal ( temp bool) +0:17 '@sampleCount' ( temp uint) +0:17 Constant: +0:17 16 (const int) +0:17 true case +0:17 indirect index ( temp 2-component vector of float) +0:? Constant: +0:? 0.062500 +0:? 0.062500 +0:? -0.062500 +0:? -0.187500 +0:? -0.187500 +0:? 0.125000 +0:? 0.250000 +0:? -0.062500 +0:? -0.312500 +0:? -0.125000 +0:? 0.125000 +0:? 0.312500 +0:? 0.312500 +0:? 0.187500 +0:? 0.187500 +0:? -0.312500 +0:? -0.125000 +0:? 0.375000 +0:? 0.000000 +0:? -0.437500 +0:? -0.250000 +0:? -0.375000 +0:? -0.375000 +0:? 0.250000 +0:? -0.500000 +0:? 0.000000 +0:? 0.437500 +0:? -0.250000 +0:? 0.375000 +0:? 0.437500 +0:? -0.437500 +0:? -0.500000 +0:17 'sample' ( in int) +0:17 false case +0:? Constant: +0:? 0.000000 +0:? 0.000000 0:19 move second child to first child ( temp 4-component vector of float) 0:19 Color: direct index for structure ( temp 4-component vector of float) 0:19 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) @@ -119,18 +549,22 @@ ERROR: node is still EOpNull! 0:13 Function Definition: main( ( temp void) 0:13 Function Parameters: 0:? Sequence +0:13 move second child to first child ( temp int) +0:? 'sample' ( temp int) +0:? 'sample' (layout( location=0) flat in int) 0:13 Sequence 0:13 move second child to first child ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:13 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:13 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:13 Function Call: @main(i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:? 'sample' ( temp int) 0:13 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:13 Color: direct index for structure ( temp 4-component vector of float) 0:13 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:13 Constant: 0:13 0 (const int) 0:13 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:13 Depth: direct index for structure ( temp float) 0:13 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:13 Constant: @@ -139,7 +573,342 @@ ERROR: node is still EOpNull! 0:? 'g_sSamp' (layout( binding=0) uniform sampler) 0:? 'g_tTex2dmsf4' ( uniform texture2DMS) 0:? 'g_tTex2dmsf4a' ( uniform texture2DMSArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) +0:? 'sample' (layout( location=0) flat in int) -SPIR-V is not generated for failed compile or link +// Module Version 10000 +// Generated by (magic number): 80003 +// Id's are bound by 221 + + Capability Shader + Capability ImageQuery + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 204 211 215 + ExecutionMode 4 OriginUpperLeft + Source HLSL 500 + Name 4 "main" + Name 10 "PS_OUTPUT" + MemberName 10(PS_OUTPUT) 0 "Color" + MemberName 10(PS_OUTPUT) 1 "Depth" + Name 13 "@main(i1;" + Name 12 "sample" + Name 17 "r00" + Name 20 "@sampleCount" + Name 23 "g_tTex2dmsf4" + Name 42 "indexable" + Name 65 "indexable" + Name 96 "indexable" + Name 129 "indexable" + Name 138 "r01" + Name 139 "@sampleCount" + Name 142 "g_tTex2dmsf4a" + Name 151 "indexable" + Name 161 "indexable" + Name 171 "indexable" + Name 181 "indexable" + Name 190 "psout" + Name 202 "sample" + Name 204 "sample" + Name 206 "flattenTemp" + Name 207 "param" + Name 211 "@entryPointOutput.Color" + Name 215 "@entryPointOutput.Depth" + Name 220 "g_sSamp" + Decorate 23(g_tTex2dmsf4) DescriptorSet 0 + Decorate 142(g_tTex2dmsf4a) DescriptorSet 0 + Decorate 204(sample) Flat + Decorate 204(sample) Location 0 + Decorate 211(@entryPointOutput.Color) Location 0 + Decorate 215(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 220(g_sSamp) DescriptorSet 0 + Decorate 220(g_sSamp) Binding 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7: TypePointer Function 6(int) + 8: TypeFloat 32 + 9: TypeVector 8(float) 4 + 10(PS_OUTPUT): TypeStruct 9(fvec4) 8(float) + 11: TypeFunction 10(PS_OUTPUT) 7(ptr) + 15: TypeVector 8(float) 2 + 16: TypePointer Function 15(fvec2) + 18: TypeInt 32 0 + 19: TypePointer Function 18(int) + 21: TypeImage 8(float) 2D multi-sampled sampled format:Unknown + 22: TypePointer UniformConstant 21 +23(g_tTex2dmsf4): 22(ptr) Variable UniformConstant + 28: 6(int) Constant 2 + 29: TypeBool + 33: 18(int) Constant 2 + 34: TypeArray 15(fvec2) 33 + 35: 8(float) Constant 1048576000 + 36: 15(fvec2) ConstantComposite 35 35 + 37: 8(float) Constant 3196059648 + 38: 15(fvec2) ConstantComposite 37 37 + 39: 34 ConstantComposite 36 38 + 41: TypePointer Function 34 + 48: 6(int) Constant 4 + 52: 18(int) Constant 4 + 53: TypeArray 15(fvec2) 52 + 54: 8(float) Constant 3187671040 + 55: 8(float) Constant 3200253952 + 56: 15(fvec2) ConstantComposite 54 55 + 57: 8(float) Constant 1052770304 + 58: 15(fvec2) ConstantComposite 57 54 + 59: 8(float) Constant 1040187392 + 60: 15(fvec2) ConstantComposite 55 59 + 61: 15(fvec2) ConstantComposite 59 57 + 62: 53 ConstantComposite 56 58 60 61 + 64: TypePointer Function 53 + 71: 6(int) Constant 8 + 75: 18(int) Constant 8 + 76: TypeArray 15(fvec2) 75 + 77: 8(float) Constant 1031798784 + 78: 8(float) Constant 3191865344 + 79: 15(fvec2) ConstantComposite 77 78 + 80: 8(float) Constant 3179282432 + 81: 8(float) Constant 1044381696 + 82: 15(fvec2) ConstantComposite 80 81 + 83: 8(float) Constant 1050673152 + 84: 15(fvec2) ConstantComposite 83 77 + 85: 8(float) Constant 3198156800 + 86: 15(fvec2) ConstantComposite 78 85 + 87: 15(fvec2) ConstantComposite 85 83 + 88: 8(float) Constant 3202351104 + 89: 15(fvec2) ConstantComposite 88 80 + 90: 8(float) Constant 1054867456 + 91: 15(fvec2) ConstantComposite 81 90 + 92: 15(fvec2) ConstantComposite 90 88 + 93: 76 ConstantComposite 79 82 84 86 87 89 91 92 + 95: TypePointer Function 76 + 102: 6(int) Constant 16 + 106: 18(int) Constant 16 + 107: TypeArray 15(fvec2) 106 + 108: 15(fvec2) ConstantComposite 77 77 + 109: 15(fvec2) ConstantComposite 80 78 + 110: 15(fvec2) ConstantComposite 78 59 + 111: 15(fvec2) ConstantComposite 35 80 + 112: 15(fvec2) ConstantComposite 85 54 + 113: 15(fvec2) ConstantComposite 59 83 + 114: 15(fvec2) ConstantComposite 83 81 + 115: 15(fvec2) ConstantComposite 81 85 + 116: 15(fvec2) ConstantComposite 54 57 + 117: 8(float) Constant 0 + 118: 15(fvec2) ConstantComposite 117 88 + 119: 15(fvec2) ConstantComposite 37 55 + 120: 15(fvec2) ConstantComposite 55 35 + 121: 8(float) Constant 3204448256 + 122: 15(fvec2) ConstantComposite 121 117 + 123: 15(fvec2) ConstantComposite 90 37 + 124: 15(fvec2) ConstantComposite 57 90 + 125: 15(fvec2) ConstantComposite 88 121 + 126: 107 ConstantComposite 108 109 110 111 112 113 114 115 116 118 119 120 122 123 124 125 + 128: TypePointer Function 107 + 133: 15(fvec2) ConstantComposite 117 117 + 140: TypeImage 8(float) 2D array multi-sampled sampled format:Unknown + 141: TypePointer UniformConstant 140 +142(g_tTex2dmsf4a): 141(ptr) Variable UniformConstant + 189: TypePointer Function 10(PS_OUTPUT) + 191: 6(int) Constant 0 + 192: 8(float) Constant 1065353216 + 193: 9(fvec4) ConstantComposite 192 192 192 192 + 194: TypePointer Function 9(fvec4) + 196: 6(int) Constant 1 + 197: TypePointer Function 8(float) + 203: TypePointer Input 6(int) + 204(sample): 203(ptr) Variable Input + 210: TypePointer Output 9(fvec4) +211(@entryPointOutput.Color): 210(ptr) Variable Output + 214: TypePointer Output 8(float) +215(@entryPointOutput.Depth): 214(ptr) Variable Output + 218: TypeSampler + 219: TypePointer UniformConstant 218 + 220(g_sSamp): 219(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 202(sample): 7(ptr) Variable Function +206(flattenTemp): 189(ptr) Variable Function + 207(param): 7(ptr) Variable Function + 205: 6(int) Load 204(sample) + Store 202(sample) 205 + 208: 6(int) Load 202(sample) + Store 207(param) 208 + 209:10(PS_OUTPUT) FunctionCall 13(@main(i1;) 207(param) + Store 206(flattenTemp) 209 + 212: 194(ptr) AccessChain 206(flattenTemp) 191 + 213: 9(fvec4) Load 212 + Store 211(@entryPointOutput.Color) 213 + 216: 197(ptr) AccessChain 206(flattenTemp) 196 + 217: 8(float) Load 216 + Store 215(@entryPointOutput.Depth) 217 + Return + FunctionEnd + 13(@main(i1;):10(PS_OUTPUT) Function None 11 + 12(sample): 7(ptr) FunctionParameter + 14: Label + 17(r00): 16(ptr) Variable Function +20(@sampleCount): 19(ptr) Variable Function + 26: 16(ptr) Variable Function + 42(indexable): 41(ptr) Variable Function + 46: 16(ptr) Variable Function + 65(indexable): 64(ptr) Variable Function + 69: 16(ptr) Variable Function + 96(indexable): 95(ptr) Variable Function + 100: 16(ptr) Variable Function + 129(indexable): 128(ptr) Variable Function + 138(r01): 16(ptr) Variable Function +139(@sampleCount): 19(ptr) Variable Function + 145: 16(ptr) Variable Function + 151(indexable): 41(ptr) Variable Function + 155: 16(ptr) Variable Function + 161(indexable): 64(ptr) Variable Function + 165: 16(ptr) Variable Function + 171(indexable): 95(ptr) Variable Function + 175: 16(ptr) Variable Function + 181(indexable): 128(ptr) Variable Function + 190(psout): 189(ptr) Variable Function + 24: 21 Load 23(g_tTex2dmsf4) + 25: 18(int) ImageQuerySamples 24 + Store 20(@sampleCount) 25 + 27: 18(int) Load 20(@sampleCount) + 30: 29(bool) IEqual 27 28 + SelectionMerge 32 None + BranchConditional 30 31 45 + 31: Label + 40: 6(int) Load 12(sample) + Store 42(indexable) 39 + 43: 16(ptr) AccessChain 42(indexable) 40 + 44: 15(fvec2) Load 43 + Store 26 44 + Branch 32 + 45: Label + 47: 18(int) Load 20(@sampleCount) + 49: 29(bool) IEqual 47 48 + SelectionMerge 51 None + BranchConditional 49 50 68 + 50: Label + 63: 6(int) Load 12(sample) + Store 65(indexable) 62 + 66: 16(ptr) AccessChain 65(indexable) 63 + 67: 15(fvec2) Load 66 + Store 46 67 + Branch 51 + 68: Label + 70: 18(int) Load 20(@sampleCount) + 72: 29(bool) IEqual 70 71 + SelectionMerge 74 None + BranchConditional 72 73 99 + 73: Label + 94: 6(int) Load 12(sample) + Store 96(indexable) 93 + 97: 16(ptr) AccessChain 96(indexable) 94 + 98: 15(fvec2) Load 97 + Store 69 98 + Branch 74 + 99: Label + 101: 18(int) Load 20(@sampleCount) + 103: 29(bool) IEqual 101 102 + SelectionMerge 105 None + BranchConditional 103 104 132 + 104: Label + 127: 6(int) Load 12(sample) + Store 129(indexable) 126 + 130: 16(ptr) AccessChain 129(indexable) 127 + 131: 15(fvec2) Load 130 + Store 100 131 + Branch 105 + 132: Label + Store 100 133 + Branch 105 + 105: Label + 134: 15(fvec2) Load 100 + Store 69 134 + Branch 74 + 74: Label + 135: 15(fvec2) Load 69 + Store 46 135 + Branch 51 + 51: Label + 136: 15(fvec2) Load 46 + Store 26 136 + Branch 32 + 32: Label + 137: 15(fvec2) Load 26 + Store 17(r00) 137 + 143: 140 Load 142(g_tTex2dmsf4a) + 144: 18(int) ImageQuerySamples 143 + Store 139(@sampleCount) 144 + 146: 18(int) Load 139(@sampleCount) + 147: 29(bool) IEqual 146 28 + SelectionMerge 149 None + BranchConditional 147 148 154 + 148: Label + 150: 6(int) Load 12(sample) + Store 151(indexable) 39 + 152: 16(ptr) AccessChain 151(indexable) 150 + 153: 15(fvec2) Load 152 + Store 145 153 + Branch 149 + 154: Label + 156: 18(int) Load 139(@sampleCount) + 157: 29(bool) IEqual 156 48 + SelectionMerge 159 None + BranchConditional 157 158 164 + 158: Label + 160: 6(int) Load 12(sample) + Store 161(indexable) 62 + 162: 16(ptr) AccessChain 161(indexable) 160 + 163: 15(fvec2) Load 162 + Store 155 163 + Branch 159 + 164: Label + 166: 18(int) Load 139(@sampleCount) + 167: 29(bool) IEqual 166 71 + SelectionMerge 169 None + BranchConditional 167 168 174 + 168: Label + 170: 6(int) Load 12(sample) + Store 171(indexable) 93 + 172: 16(ptr) AccessChain 171(indexable) 170 + 173: 15(fvec2) Load 172 + Store 165 173 + Branch 169 + 174: Label + 176: 18(int) Load 139(@sampleCount) + 177: 29(bool) IEqual 176 102 + SelectionMerge 179 None + BranchConditional 177 178 184 + 178: Label + 180: 6(int) Load 12(sample) + Store 181(indexable) 126 + 182: 16(ptr) AccessChain 181(indexable) 180 + 183: 15(fvec2) Load 182 + Store 175 183 + Branch 179 + 184: Label + Store 175 133 + Branch 179 + 179: Label + 185: 15(fvec2) Load 175 + Store 165 185 + Branch 169 + 169: Label + 186: 15(fvec2) Load 165 + Store 155 186 + Branch 159 + 159: Label + 187: 15(fvec2) Load 155 + Store 145 187 + Branch 149 + 149: Label + 188: 15(fvec2) Load 145 + Store 138(r01) 188 + 195: 194(ptr) AccessChain 190(psout) 191 + Store 195 193 + 198: 197(ptr) AccessChain 190(psout) 196 + Store 198 192 + 199:10(PS_OUTPUT) Load 190(psout) + ReturnValue 199 + FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.1.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.1.tesc.out index 3e1ad58..f17f50f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.1.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.1.tesc.out @@ -32,7 +32,7 @@ vertex spacing = equal_spacing 0:? 'm_cpid' ( temp uint) 0:? 'm_cpid' ( in uint InvocationID) 0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index ( temp structure{ temp 3-component vector of float cpoint}) +0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) 0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'm_cpid' ( in uint InvocationID) 0:26 Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint}) @@ -54,7 +54,7 @@ vertex spacing = equal_spacing 0:? Sequence 0:? move second child to first child ( temp float) 0:? direct index ( patch out float TessLevelOuter) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) 0:? Constant: 0:? 0 (const int) 0:? direct index ( temp float) @@ -66,7 +66,7 @@ vertex spacing = equal_spacing 0:? 0 (const int) 0:? move second child to first child ( temp float) 0:? direct index ( patch out float TessLevelOuter) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) 0:? Constant: 0:? 1 (const int) 0:? direct index ( temp float) @@ -107,8 +107,7 @@ vertex spacing = equal_spacing 0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'm_cpid' ( in uint InvocationID) 0:? 'pid' ( in uint PrimitiveID) -0:? '@patchConstantOutput' (layout( location=1) patch out structure{}) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) Linked tessellation control stage: @@ -147,7 +146,7 @@ vertex spacing = equal_spacing 0:? 'm_cpid' ( temp uint) 0:? 'm_cpid' ( in uint InvocationID) 0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index ( temp structure{ temp 3-component vector of float cpoint}) +0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) 0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'm_cpid' ( in uint InvocationID) 0:26 Function Call: @main(struct-VS_OUT-vf31[4];u1; ( temp structure{ temp 3-component vector of float cpoint}) @@ -169,7 +168,7 @@ vertex spacing = equal_spacing 0:? Sequence 0:? move second child to first child ( temp float) 0:? direct index ( patch out float TessLevelOuter) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) 0:? Constant: 0:? 0 (const int) 0:? direct index ( temp float) @@ -181,7 +180,7 @@ vertex spacing = equal_spacing 0:? 0 (const int) 0:? move second child to first child ( temp float) 0:? direct index ( patch out float TessLevelOuter) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) 0:? Constant: 0:? 1 (const int) 0:? direct index ( temp float) @@ -222,17 +221,16 @@ vertex spacing = equal_spacing 0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'm_cpid' ( in uint InvocationID) 0:? 'pid' ( in uint PrimitiveID) -0:? '@patchConstantOutput' (layout( location=1) patch out structure{}) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 93 +// Generated by (magic number): 80003 +// Id's are bound by 89 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 40 44 48 66 72 92 + EntryPoint TessellationControl 4 "main" 40 44 48 65 71 ExecutionMode 4 OutputVertices 4 ExecutionMode 4 Isolines ExecutionMode 4 SpacingEqual @@ -257,21 +255,17 @@ vertex spacing = equal_spacing Name 48 "@entryPointOutput" Name 50 "param" Name 52 "param" - Name 65 "@patchConstantResult" - Name 66 "pid" - Name 67 "param" - Name 72 "@patchConstantOutput_edges" - Name 82 "output" - Name 90 "HS_CONSTANT_OUT" - Name 92 "@patchConstantOutput" + Name 64 "@patchConstantResult" + Name 65 "pid" + Name 66 "param" + Name 71 "@patchConstantOutput.edges" + Name 81 "output" Decorate 40(ip) Location 0 Decorate 44(m_cpid) BuiltIn InvocationId Decorate 48(@entryPointOutput) Location 0 - Decorate 66(pid) BuiltIn PrimitiveId - Decorate 72(@patchConstantOutput_edges) Patch - Decorate 72(@patchConstantOutput_edges) BuiltIn TessLevelOuter - Decorate 92(@patchConstantOutput) Patch - Decorate 92(@patchConstantOutput) Location 1 + Decorate 65(pid) BuiltIn PrimitiveId + Decorate 71(@patchConstantOutput.edges) Patch + Decorate 71(@patchConstantOutput.edges) BuiltIn TessLevelOuter 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -300,30 +294,26 @@ vertex spacing = equal_spacing 47: TypePointer Output 46 48(@entryPointOutput): 47(ptr) Variable Output 55: TypePointer Output 14(HS_OUT) - 57: 9(int) Constant 1 - 58: 9(int) Constant 0 - 60: TypeBool - 64: TypePointer Function 22(HS_CONSTANT_OUT) - 66(pid): 43(ptr) Variable Input - 70: TypeArray 6(float) 10 - 71: TypePointer Output 70 -72(@patchConstantOutput_edges): 71(ptr) Variable Output - 73: TypePointer Function 6(float) - 76: TypePointer Output 6(float) - 78: 29(int) Constant 1 - 83: 6(float) Constant 1073741824 - 85: 6(float) Constant 1090519040 -90(HS_CONSTANT_OUT): TypeStruct - 91: TypePointer Output 90(HS_CONSTANT_OUT) -92(@patchConstantOutput): 91(ptr) Variable Output + 57: 9(int) Constant 0 + 59: TypeBool + 63: TypePointer Function 22(HS_CONSTANT_OUT) + 65(pid): 43(ptr) Variable Input + 69: TypeArray 6(float) 10 + 70: TypePointer Output 69 +71(@patchConstantOutput.edges): 70(ptr) Variable Output + 72: TypePointer Function 6(float) + 75: TypePointer Output 6(float) + 77: 29(int) Constant 1 + 82: 6(float) Constant 1073741824 + 84: 6(float) Constant 1090519040 4(main): 2 Function None 3 5: Label 38(ip): 12(ptr) Variable Function 42(m_cpid): 13(ptr) Variable Function 50(param): 12(ptr) Variable Function 52(param): 13(ptr) Variable Function -65(@patchConstantResult): 64(ptr) Variable Function - 67(param): 13(ptr) Variable Function +64(@patchConstantResult): 63(ptr) Variable Function + 66(param): 13(ptr) Variable Function 41: 11 Load 40(ip) Store 38(ip) 41 45: 9(int) Load 44(m_cpid) @@ -336,26 +326,26 @@ vertex spacing = equal_spacing 54: 14(HS_OUT) FunctionCall 18(@main(struct-VS_OUT-vf31[4];u1;) 50(param) 52(param) 56: 55(ptr) AccessChain 48(@entryPointOutput) 49 Store 56 54 - ControlBarrier 20 57 58 - 59: 9(int) Load 44(m_cpid) - 61: 60(bool) IEqual 59 30 - SelectionMerge 63 None - BranchConditional 61 62 63 - 62: Label - 68: 9(int) Load 66(pid) - Store 67(param) 68 - 69:22(HS_CONSTANT_OUT) FunctionCall 25(PCF(u1;) 67(param) - Store 65(@patchConstantResult) 69 - 74: 73(ptr) AccessChain 65(@patchConstantResult) 30 30 - 75: 6(float) Load 74 - 77: 76(ptr) AccessChain 72(@patchConstantOutput_edges) 30 - Store 77 75 - 79: 73(ptr) AccessChain 65(@patchConstantResult) 30 78 - 80: 6(float) Load 79 - 81: 76(ptr) AccessChain 72(@patchConstantOutput_edges) 78 - Store 81 80 - Branch 63 - 63: Label + ControlBarrier 20 10 57 + 58: 9(int) Load 44(m_cpid) + 60: 59(bool) IEqual 58 30 + SelectionMerge 62 None + BranchConditional 60 61 62 + 61: Label + 67: 9(int) Load 65(pid) + Store 66(param) 67 + 68:22(HS_CONSTANT_OUT) FunctionCall 25(PCF(u1;) 66(param) + Store 64(@patchConstantResult) 68 + 73: 72(ptr) AccessChain 64(@patchConstantResult) 30 30 + 74: 6(float) Load 73 + 76: 75(ptr) AccessChain 71(@patchConstantOutput.edges) 30 + Store 76 74 + 78: 72(ptr) AccessChain 64(@patchConstantResult) 30 77 + 79: 6(float) Load 78 + 80: 75(ptr) AccessChain 71(@patchConstantOutput.edges) 77 + Store 80 79 + Branch 62 + 62: Label Return FunctionEnd 18(@main(struct-VS_OUT-vf31[4];u1;): 14(HS_OUT) Function None 15 @@ -373,11 +363,11 @@ vertex spacing = equal_spacing 25(PCF(u1;):22(HS_CONSTANT_OUT) Function None 23 24(pid): 13(ptr) FunctionParameter 26: Label - 82(output): 64(ptr) Variable Function - 84: 73(ptr) AccessChain 82(output) 30 30 - Store 84 83 - 86: 73(ptr) AccessChain 82(output) 30 78 - Store 86 85 - 87:22(HS_CONSTANT_OUT) Load 82(output) - ReturnValue 87 + 81(output): 63(ptr) Variable Function + 83: 72(ptr) AccessChain 81(output) 30 30 + Store 83 82 + 85: 72(ptr) AccessChain 81(output) 30 77 + Store 85 84 + 86:22(HS_CONSTANT_OUT) Load 81(output) + ReturnValue 86 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.2.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.2.tesc.out index d32da52..1db386f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.2.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.2.tesc.out @@ -28,7 +28,7 @@ vertex spacing = equal_spacing 0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) 0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index ( temp structure{ temp 3-component vector of float cpoint}) +0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) 0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'InvocationId' ( in uint InvocationID) 0:26 Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint}) @@ -50,7 +50,7 @@ vertex spacing = equal_spacing 0:? Sequence 0:? move second child to first child ( temp float) 0:? direct index ( patch out float TessLevelOuter) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) 0:? Constant: 0:? 0 (const int) 0:? direct index ( temp float) @@ -62,7 +62,7 @@ vertex spacing = equal_spacing 0:? 0 (const int) 0:? move second child to first child ( temp float) 0:? direct index ( patch out float TessLevelOuter) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) 0:? Constant: 0:? 1 (const int) 0:? direct index ( temp float) @@ -105,8 +105,7 @@ vertex spacing = equal_spacing 0:? 'InvocationId' ( in uint InvocationID) 0:? 'pid' ( in uint PrimitiveID) 0:? 'pos' ( in 4-component vector of float Position) -0:? '@patchConstantOutput' (layout( location=1) patch out structure{}) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) Linked tessellation control stage: @@ -141,7 +140,7 @@ vertex spacing = equal_spacing 0:? 'ip' ( temp 4-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'ip' (layout( location=0) in 4-element array of structure{ temp 3-component vector of float cpoint}) 0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index ( temp structure{ temp 3-component vector of float cpoint}) +0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) 0:? '@entryPointOutput' (layout( location=0) out 4-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'InvocationId' ( in uint InvocationID) 0:26 Function Call: @main(struct-VS_OUT-vf31[4]; ( temp structure{ temp 3-component vector of float cpoint}) @@ -163,7 +162,7 @@ vertex spacing = equal_spacing 0:? Sequence 0:? move second child to first child ( temp float) 0:? direct index ( patch out float TessLevelOuter) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) 0:? Constant: 0:? 0 (const int) 0:? direct index ( temp float) @@ -175,7 +174,7 @@ vertex spacing = equal_spacing 0:? 0 (const int) 0:? move second child to first child ( temp float) 0:? direct index ( patch out float TessLevelOuter) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) 0:? Constant: 0:? 1 (const int) 0:? direct index ( temp float) @@ -218,17 +217,16 @@ vertex spacing = equal_spacing 0:? 'InvocationId' ( in uint InvocationID) 0:? 'pid' ( in uint PrimitiveID) 0:? 'pos' ( in 4-component vector of float Position) -0:? '@patchConstantOutput' (layout( location=1) patch out structure{}) -0:? '@patchConstantOutput_edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 95 +// Generated by (magic number): 80003 +// Id's are bound by 91 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 42 46 48 64 66 74 94 + EntryPoint TessellationControl 4 "main" 42 46 48 63 65 73 ExecutionMode 4 OutputVertices 4 ExecutionMode 4 Isolines ExecutionMode 4 SpacingEqual @@ -251,24 +249,20 @@ vertex spacing = equal_spacing Name 46 "@entryPointOutput" Name 48 "InvocationId" Name 50 "param" - Name 63 "@patchConstantResult" - Name 64 "pid" - Name 66 "pos" - Name 67 "param" - Name 69 "param" - Name 74 "@patchConstantOutput_edges" - Name 84 "output" - Name 92 "HS_CONSTANT_OUT" - Name 94 "@patchConstantOutput" + Name 62 "@patchConstantResult" + Name 63 "pid" + Name 65 "pos" + Name 66 "param" + Name 68 "param" + Name 73 "@patchConstantOutput.edges" + Name 83 "output" Decorate 42(ip) Location 0 Decorate 46(@entryPointOutput) Location 0 Decorate 48(InvocationId) BuiltIn InvocationId - Decorate 64(pid) BuiltIn PrimitiveId - Decorate 66(pos) BuiltIn Position - Decorate 74(@patchConstantOutput_edges) Patch - Decorate 74(@patchConstantOutput_edges) BuiltIn TessLevelOuter - Decorate 94(@patchConstantOutput) Patch - Decorate 94(@patchConstantOutput) Location 1 + Decorate 63(pid) BuiltIn PrimitiveId + Decorate 65(pos) BuiltIn Position + Decorate 73(@patchConstantOutput.edges) Patch + Decorate 73(@patchConstantOutput.edges) BuiltIn TessLevelOuter 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -299,31 +293,27 @@ vertex spacing = equal_spacing 47: TypePointer Input 9(int) 48(InvocationId): 47(ptr) Variable Input 53: TypePointer Output 13(HS_OUT) - 55: 9(int) Constant 1 - 56: 9(int) Constant 0 - 58: TypeBool - 62: TypePointer Function 23(HS_CONSTANT_OUT) - 64(pid): 47(ptr) Variable Input - 65: TypePointer Input 19(fvec4) - 66(pos): 65(ptr) Variable Input - 72: TypeArray 6(float) 10 - 73: TypePointer Output 72 -74(@patchConstantOutput_edges): 73(ptr) Variable Output - 75: TypePointer Function 6(float) - 78: TypePointer Output 6(float) - 80: 31(int) Constant 1 - 85: 6(float) Constant 1073741824 - 87: 6(float) Constant 1090519040 -92(HS_CONSTANT_OUT): TypeStruct - 93: TypePointer Output 92(HS_CONSTANT_OUT) -94(@patchConstantOutput): 93(ptr) Variable Output + 55: 9(int) Constant 0 + 57: TypeBool + 61: TypePointer Function 23(HS_CONSTANT_OUT) + 63(pid): 47(ptr) Variable Input + 64: TypePointer Input 19(fvec4) + 65(pos): 64(ptr) Variable Input + 71: TypeArray 6(float) 10 + 72: TypePointer Output 71 +73(@patchConstantOutput.edges): 72(ptr) Variable Output + 74: TypePointer Function 6(float) + 77: TypePointer Output 6(float) + 79: 31(int) Constant 1 + 84: 6(float) Constant 1073741824 + 86: 6(float) Constant 1090519040 4(main): 2 Function None 3 5: Label 40(ip): 12(ptr) Variable Function 50(param): 12(ptr) Variable Function -63(@patchConstantResult): 62(ptr) Variable Function - 67(param): 18(ptr) Variable Function - 69(param): 20(ptr) Variable Function +62(@patchConstantResult): 61(ptr) Variable Function + 66(param): 18(ptr) Variable Function + 68(param): 20(ptr) Variable Function 43: 11 Load 42(ip) Store 40(ip) 43 49: 9(int) Load 48(InvocationId) @@ -332,28 +322,28 @@ vertex spacing = equal_spacing 52: 13(HS_OUT) FunctionCall 16(@main(struct-VS_OUT-vf31[4];) 50(param) 54: 53(ptr) AccessChain 46(@entryPointOutput) 49 Store 54 52 - ControlBarrier 21 55 56 - 57: 9(int) Load 48(InvocationId) - 59: 58(bool) IEqual 57 32 - SelectionMerge 61 None - BranchConditional 59 60 61 - 60: Label - 68: 9(int) Load 64(pid) - Store 67(param) 68 - 70: 19(fvec4) Load 66(pos) - Store 69(param) 70 - 71:23(HS_CONSTANT_OUT) FunctionCall 27(PCF(u1;vf4;) 67(param) 69(param) - Store 63(@patchConstantResult) 71 - 76: 75(ptr) AccessChain 63(@patchConstantResult) 32 32 - 77: 6(float) Load 76 - 79: 78(ptr) AccessChain 74(@patchConstantOutput_edges) 32 - Store 79 77 - 81: 75(ptr) AccessChain 63(@patchConstantResult) 32 80 - 82: 6(float) Load 81 - 83: 78(ptr) AccessChain 74(@patchConstantOutput_edges) 80 - Store 83 82 - Branch 61 - 61: Label + ControlBarrier 21 10 55 + 56: 9(int) Load 48(InvocationId) + 58: 57(bool) IEqual 56 32 + SelectionMerge 60 None + BranchConditional 58 59 60 + 59: Label + 67: 9(int) Load 63(pid) + Store 66(param) 67 + 69: 19(fvec4) Load 65(pos) + Store 68(param) 69 + 70:23(HS_CONSTANT_OUT) FunctionCall 27(PCF(u1;vf4;) 66(param) 68(param) + Store 62(@patchConstantResult) 70 + 75: 74(ptr) AccessChain 62(@patchConstantResult) 32 32 + 76: 6(float) Load 75 + 78: 77(ptr) AccessChain 73(@patchConstantOutput.edges) 32 + Store 78 76 + 80: 74(ptr) AccessChain 62(@patchConstantResult) 32 79 + 81: 6(float) Load 80 + 82: 77(ptr) AccessChain 73(@patchConstantOutput.edges) 79 + Store 82 81 + Branch 60 + 60: Label Return FunctionEnd 16(@main(struct-VS_OUT-vf31[4];): 13(HS_OUT) Function None 14 @@ -371,11 +361,11 @@ vertex spacing = equal_spacing 25(pid): 18(ptr) FunctionParameter 26(pos): 20(ptr) FunctionParameter 28: Label - 84(output): 62(ptr) Variable Function - 86: 75(ptr) AccessChain 84(output) 32 32 - Store 86 85 - 88: 75(ptr) AccessChain 84(output) 32 80 - Store 88 87 - 89:23(HS_CONSTANT_OUT) Load 84(output) - ReturnValue 89 + 83(output): 61(ptr) Variable Function + 85: 74(ptr) AccessChain 83(output) 32 32 + Store 85 84 + 87: 74(ptr) AccessChain 83(output) 32 79 + Store 87 86 + 88:23(HS_CONSTANT_OUT) Load 83(output) + ReturnValue 88 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.void.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.void.tesc.out index b6e417a..fa15194 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.void.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.hull.void.tesc.out @@ -2,6 +2,7 @@ hlsl.hull.void.tesc Shader version: 500 vertices = 3 vertex spacing = fractional_even_spacing +triangle order = ccw 0:? Sequence 0:26 Function Definition: @main(struct-VS_OUT-vf31[3]; ( temp structure{ temp 3-component vector of float cpoint}) 0:26 Function Parameters: @@ -28,7 +29,7 @@ vertex spacing = fractional_even_spacing 0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'ip' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float cpoint}) 0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index ( temp structure{ temp 3-component vector of float cpoint}) +0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) 0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'InvocationId' ( in uint InvocationID) 0:26 Function Call: @main(struct-VS_OUT-vf31[3]; ( temp structure{ temp 3-component vector of float cpoint}) @@ -57,6 +58,7 @@ Linked tessellation control stage: Shader version: 500 vertices = 3 vertex spacing = fractional_even_spacing +triangle order = ccw 0:? Sequence 0:26 Function Definition: @main(struct-VS_OUT-vf31[3]; ( temp structure{ temp 3-component vector of float cpoint}) 0:26 Function Parameters: @@ -83,7 +85,7 @@ vertex spacing = fractional_even_spacing 0:? 'ip' ( temp 3-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'ip' (layout( location=0) in 3-element array of structure{ temp 3-component vector of float cpoint}) 0:26 move second child to first child ( temp structure{ temp 3-component vector of float cpoint}) -0:26 indirect index ( temp structure{ temp 3-component vector of float cpoint}) +0:26 indirect index (layout( location=0) out structure{ temp 3-component vector of float cpoint}) 0:? '@entryPointOutput' (layout( location=0) out 3-element array of structure{ temp 3-component vector of float cpoint}) 0:? 'InvocationId' ( in uint InvocationID) 0:26 Function Call: @main(struct-VS_OUT-vf31[3]; ( temp structure{ temp 3-component vector of float cpoint}) @@ -106,7 +108,7 @@ vertex spacing = fractional_even_spacing 0:? 'InvocationId' ( in uint InvocationID) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 55 Capability Tessellation @@ -116,6 +118,7 @@ vertex spacing = fractional_even_spacing ExecutionMode 4 OutputVertices 3 ExecutionMode 4 Triangles ExecutionMode 4 SpacingFractionalEven + ExecutionMode 4 VertexOrderCcw Source HLSL 500 Name 4 "main" Name 8 "VS_OUT" @@ -158,7 +161,7 @@ vertex spacing = fractional_even_spacing 39(InvocationId): 38(ptr) Variable Input 44: TypePointer Output 13(HS_OUT) 46: 9(int) Constant 2 - 47: 9(int) Constant 1 + 47: 9(int) Constant 4 48: 9(int) Constant 0 50: TypeBool 4(main): 2 Function None 3 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.identifier.sample.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.identifier.sample.frag.out index a8870b1..9e1a506 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.identifier.sample.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.identifier.sample.frag.out @@ -86,7 +86,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 33 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.if.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.if.frag.out index 89e0bb1..750ae5e 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.if.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.if.frag.out @@ -42,7 +42,7 @@ gl_FragCoord origin is upper left 0:14 'input' ( in 4-component vector of float) 0:14 'input' ( in 4-component vector of float) 0:14 true case is null -0:19 Test condition and select ( temp void) +0:19 Test condition and select ( temp void): Flatten 0:19 Condition 0:19 all ( temp bool) 0:19 Equal ( temp 4-component vector of bool) @@ -152,7 +152,7 @@ gl_FragCoord origin is upper left 0:14 'input' ( in 4-component vector of float) 0:14 'input' ( in 4-component vector of float) 0:14 true case is null -0:19 Test condition and select ( temp void) +0:19 Test condition and select ( temp void): Flatten 0:19 Condition 0:19 all ( temp bool) 0:19 Equal ( temp 4-component vector of bool) @@ -216,7 +216,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 103 Capability Shader @@ -319,7 +319,7 @@ gl_FragCoord origin is upper left 48: 7(fvec4) Load 10(input) 49: 16(bvec4) FOrdEqual 47 48 50: 15(bool) All 49 - SelectionMerge 52 None + SelectionMerge 52 Flatten BranchConditional 50 51 52 51: Label 53: 7(fvec4) Load 10(input) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.init.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.init.frag.out index 119d0c5..33122ab 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.init.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.init.frag.out @@ -331,7 +331,7 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform float a, layout( row_major std140) uniform float b, layout( row_major std140) uniform float c}) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 110 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.init2.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.init2.frag.out index 45eca98..d476e60 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.init2.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.init2.frag.out @@ -168,13 +168,13 @@ gl_FragCoord origin is upper left 0:? Sequence 0:45 Sequence 0:45 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:45 color: direct index for structure ( temp 4-component vector of float) 0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:45 Constant: 0:45 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -349,16 +349,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:45 Sequence 0:45 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:45 color: direct index for structure ( temp 4-component vector of float) 0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:45 Constant: 0:45 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 112 Capability Shader @@ -392,8 +392,8 @@ gl_FragCoord origin is upper left MemberName 87(two) 1 "b" Name 89 "twoNonConst" Name 99 "ps_output" - Name 109 "color" - Decorate 109(color) Location 0 + Name 109 "@entryPointOutput.color" + Decorate 109(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 8: TypeFloat 32 @@ -445,12 +445,12 @@ gl_FragCoord origin is upper left 102: 9(fvec4) ConstantComposite 18 18 18 18 103: TypePointer Function 9(fvec4) 108: TypePointer Output 9(fvec4) - 109(color): 108(ptr) Variable Output +109(@entryPointOutput.color): 108(ptr) Variable Output 4(main): 2 Function None 3 5: Label 110:10(PS_OUTPUT) FunctionCall 12(@main() 111: 9(fvec4) CompositeExtract 110 0 - Store 109(color) 111 + Store 109(@entryPointOutput.color) 111 Return FunctionEnd 6(Test1(): 2 Function None 3 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.inoutquals.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.inoutquals.frag.out index d5cce21..c5529b7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.inoutquals.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.inoutquals.frag.out @@ -2,11 +2,12 @@ hlsl.inoutquals.frag Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:8 Function Definition: MyFunc(f1;f1;f1; ( temp void) +0:8 Function Definition: MyFunc(f1;f1;f1;f1; ( temp void) 0:8 Function Parameters: 0:8 'x' ( in float) 0:8 'y' ( out float) 0:8 'z' ( inout float) +0:8 'w' ( inout float) 0:? Sequence 0:9 move second child to first child ( temp float) 0:9 'y' ( out float) @@ -18,76 +19,84 @@ gl_FragCoord origin is upper left 0:11 'x' ( in float) 0:11 Constant: 0:11 -1.000000 -0:15 Function Definition: @main(vf4;i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 Function Parameters: -0:15 'inpos' ( in 4-component vector of float) -0:15 'sampleMask' ( out int) +0:12 multiply second child into first child ( temp float) +0:12 'w' ( inout float) +0:12 Constant: +0:12 1.000000 +0:16 Function Definition: @main(vf4;i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Function Parameters: +0:16 'inpos' ( in 4-component vector of float) +0:16 'sampleMask' ( out int) 0:? Sequence -0:18 Sequence -0:18 move second child to first child ( temp float) -0:18 'x' ( temp float) -0:18 Constant: -0:18 7.000000 -0:18 move second child to first child ( temp float) -0:18 'z' ( temp float) -0:18 Constant: -0:18 3.000000 -0:19 Function Call: MyFunc(f1;f1;f1; ( temp void) -0:19 'x' ( temp float) -0:19 'y' ( temp float) -0:19 'z' ( temp float) -0:21 move second child to first child ( temp 4-component vector of float) -0:21 Color: direct index for structure ( temp 4-component vector of float) -0:21 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:21 Constant: -0:21 0 (const int) -0:? Construct vec4 ( temp 4-component vector of float) -0:21 'x' ( temp float) -0:21 'y' ( temp float) -0:21 'z' ( temp float) -0:21 Constant: -0:21 1.000000 -0:22 move second child to first child ( temp float) -0:22 Depth: direct index for structure ( temp float) +0:19 Sequence +0:19 move second child to first child ( temp float) +0:19 'x' ( temp float) +0:19 Constant: +0:19 7.000000 +0:19 move second child to first child ( temp float) +0:19 'z' ( temp float) +0:19 Constant: +0:19 3.000000 +0:20 Function Call: MyFunc(f1;f1;f1;f1; ( temp void) +0:20 'x' ( temp float) +0:20 'y' ( temp float) +0:20 'z' ( temp float) +0:20 direct index ( temp float) +0:20 'inpos' ( in 4-component vector of float) +0:20 Constant: +0:20 3 (const int) +0:22 move second child to first child ( temp 4-component vector of float) +0:22 Color: direct index for structure ( temp 4-component vector of float) 0:22 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:22 Constant: -0:22 1 (const int) -0:22 direct index ( temp float) -0:22 'inpos' ( in 4-component vector of float) +0:22 0 (const int) +0:? Construct vec4 ( temp 4-component vector of float) +0:22 'x' ( temp float) +0:22 'y' ( temp float) +0:22 'z' ( temp float) 0:22 Constant: -0:22 3 (const int) -0:24 Branch: Return with expression -0:24 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 Function Definition: main( ( temp void) -0:15 Function Parameters: +0:22 1.000000 +0:23 move second child to first child ( temp float) +0:23 Depth: direct index for structure ( temp float) +0:23 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:23 Constant: +0:23 1 (const int) +0:23 direct index ( temp float) +0:23 'inpos' ( in 4-component vector of float) +0:23 Constant: +0:23 3 (const int) +0:25 Branch: Return with expression +0:25 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Function Definition: main( ( temp void) +0:16 Function Parameters: 0:? Sequence -0:15 move second child to first child ( temp 4-component vector of float) +0:16 move second child to first child ( temp 4-component vector of float) 0:? 'inpos' ( temp 4-component vector of float) 0:? 'inpos' ( noperspective in 4-component vector of float FragCoord) -0:15 Sequence -0:15 move second child to first child ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 Function Call: @main(vf4;i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Sequence +0:16 move second child to first child ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Function Call: @main(vf4;i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:? 'inpos' ( temp 4-component vector of float) 0:? 'sampleMask' ( temp int) -0:15 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:15 Color: direct index for structure ( temp 4-component vector of float) -0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 Constant: -0:15 0 (const int) -0:15 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) -0:15 Depth: direct index for structure ( temp float) -0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 Constant: -0:15 1 (const int) -0:15 move second child to first child ( temp int) +0:16 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) +0:16 Color: direct index for structure ( temp 4-component vector of float) +0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Constant: +0:16 0 (const int) +0:16 move second child to first child ( temp float) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:16 Depth: direct index for structure ( temp float) +0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Constant: +0:16 1 (const int) +0:16 move second child to first child ( temp int) 0:? 'sampleMask' ( out int SampleMaskIn) 0:? 'sampleMask' ( temp int) 0:? Linker Objects -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:? 'inpos' ( noperspective in 4-component vector of float FragCoord) 0:? 'sampleMask' ( out int SampleMaskIn) @@ -98,11 +107,12 @@ Linked fragment stage: Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:8 Function Definition: MyFunc(f1;f1;f1; ( temp void) +0:8 Function Definition: MyFunc(f1;f1;f1;f1; ( temp void) 0:8 Function Parameters: 0:8 'x' ( in float) 0:8 'y' ( out float) 0:8 'z' ( inout float) +0:8 'w' ( inout float) 0:? Sequence 0:9 move second child to first child ( temp float) 0:9 'y' ( out float) @@ -114,219 +124,239 @@ gl_FragCoord origin is upper left 0:11 'x' ( in float) 0:11 Constant: 0:11 -1.000000 -0:15 Function Definition: @main(vf4;i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 Function Parameters: -0:15 'inpos' ( in 4-component vector of float) -0:15 'sampleMask' ( out int) +0:12 multiply second child into first child ( temp float) +0:12 'w' ( inout float) +0:12 Constant: +0:12 1.000000 +0:16 Function Definition: @main(vf4;i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Function Parameters: +0:16 'inpos' ( in 4-component vector of float) +0:16 'sampleMask' ( out int) 0:? Sequence -0:18 Sequence -0:18 move second child to first child ( temp float) -0:18 'x' ( temp float) -0:18 Constant: -0:18 7.000000 -0:18 move second child to first child ( temp float) -0:18 'z' ( temp float) -0:18 Constant: -0:18 3.000000 -0:19 Function Call: MyFunc(f1;f1;f1; ( temp void) -0:19 'x' ( temp float) -0:19 'y' ( temp float) -0:19 'z' ( temp float) -0:21 move second child to first child ( temp 4-component vector of float) -0:21 Color: direct index for structure ( temp 4-component vector of float) -0:21 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:21 Constant: -0:21 0 (const int) -0:? Construct vec4 ( temp 4-component vector of float) -0:21 'x' ( temp float) -0:21 'y' ( temp float) -0:21 'z' ( temp float) -0:21 Constant: -0:21 1.000000 -0:22 move second child to first child ( temp float) -0:22 Depth: direct index for structure ( temp float) +0:19 Sequence +0:19 move second child to first child ( temp float) +0:19 'x' ( temp float) +0:19 Constant: +0:19 7.000000 +0:19 move second child to first child ( temp float) +0:19 'z' ( temp float) +0:19 Constant: +0:19 3.000000 +0:20 Function Call: MyFunc(f1;f1;f1;f1; ( temp void) +0:20 'x' ( temp float) +0:20 'y' ( temp float) +0:20 'z' ( temp float) +0:20 direct index ( temp float) +0:20 'inpos' ( in 4-component vector of float) +0:20 Constant: +0:20 3 (const int) +0:22 move second child to first child ( temp 4-component vector of float) +0:22 Color: direct index for structure ( temp 4-component vector of float) 0:22 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:22 Constant: -0:22 1 (const int) -0:22 direct index ( temp float) -0:22 'inpos' ( in 4-component vector of float) +0:22 0 (const int) +0:? Construct vec4 ( temp 4-component vector of float) +0:22 'x' ( temp float) +0:22 'y' ( temp float) +0:22 'z' ( temp float) 0:22 Constant: -0:22 3 (const int) -0:24 Branch: Return with expression -0:24 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 Function Definition: main( ( temp void) -0:15 Function Parameters: +0:22 1.000000 +0:23 move second child to first child ( temp float) +0:23 Depth: direct index for structure ( temp float) +0:23 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:23 Constant: +0:23 1 (const int) +0:23 direct index ( temp float) +0:23 'inpos' ( in 4-component vector of float) +0:23 Constant: +0:23 3 (const int) +0:25 Branch: Return with expression +0:25 'psout' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Function Definition: main( ( temp void) +0:16 Function Parameters: 0:? Sequence -0:15 move second child to first child ( temp 4-component vector of float) +0:16 move second child to first child ( temp 4-component vector of float) 0:? 'inpos' ( temp 4-component vector of float) 0:? 'inpos' ( noperspective in 4-component vector of float FragCoord) -0:15 Sequence -0:15 move second child to first child ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 Function Call: @main(vf4;i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Sequence +0:16 move second child to first child ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Function Call: @main(vf4;i1; ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:? 'inpos' ( temp 4-component vector of float) 0:? 'sampleMask' ( temp int) -0:15 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:15 Color: direct index for structure ( temp 4-component vector of float) -0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 Constant: -0:15 0 (const int) -0:15 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) -0:15 Depth: direct index for structure ( temp float) -0:15 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) -0:15 Constant: -0:15 1 (const int) -0:15 move second child to first child ( temp int) +0:16 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) +0:16 Color: direct index for structure ( temp 4-component vector of float) +0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Constant: +0:16 0 (const int) +0:16 move second child to first child ( temp float) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:16 Depth: direct index for structure ( temp float) +0:16 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) +0:16 Constant: +0:16 1 (const int) +0:16 move second child to first child ( temp int) 0:? 'sampleMask' ( out int SampleMaskIn) 0:? 'sampleMask' ( temp int) 0:? Linker Objects -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:? 'inpos' ( noperspective in 4-component vector of float FragCoord) 0:? 'sampleMask' ( out int SampleMaskIn) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 80 +// Generated by (magic number): 80003 +// Id's are bound by 88 Capability Shader - Capability SampleRateShading 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 60 70 74 78 + EntryPoint Fragment 4 "main" 68 78 82 86 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" - Name 12 "MyFunc(f1;f1;f1;" + Name 13 "MyFunc(f1;f1;f1;f1;" Name 9 "x" Name 10 "y" Name 11 "z" - Name 18 "PS_OUTPUT" - MemberName 18(PS_OUTPUT) 0 "Color" - MemberName 18(PS_OUTPUT) 1 "Depth" - Name 22 "@main(vf4;i1;" - Name 20 "inpos" - Name 21 "sampleMask" - Name 27 "x" - Name 29 "z" - Name 31 "y" - Name 32 "param" - Name 34 "param" - Name 35 "param" - Name 41 "psout" - Name 58 "inpos" - Name 60 "inpos" - Name 62 "flattenTemp" - Name 63 "sampleMask" - Name 64 "param" - Name 66 "param" - Name 70 "Color" - Name 74 "Depth" - Name 78 "sampleMask" - Decorate 60(inpos) NoPerspective - Decorate 60(inpos) BuiltIn FragCoord - Decorate 70(Color) Location 0 - Decorate 74(Depth) BuiltIn FragDepth - Decorate 78(sampleMask) BuiltIn SampleMask + Name 12 "w" + Name 19 "PS_OUTPUT" + MemberName 19(PS_OUTPUT) 0 "Color" + MemberName 19(PS_OUTPUT) 1 "Depth" + Name 23 "@main(vf4;i1;" + Name 21 "inpos" + Name 22 "sampleMask" + Name 31 "x" + Name 33 "z" + Name 35 "y" + Name 36 "param" + Name 38 "param" + Name 39 "param" + Name 41 "param" + Name 52 "psout" + Name 66 "inpos" + Name 68 "inpos" + Name 70 "flattenTemp" + Name 71 "sampleMask" + Name 72 "param" + Name 74 "param" + Name 78 "@entryPointOutput.Color" + Name 82 "@entryPointOutput.Depth" + Name 86 "sampleMask" + Decorate 68(inpos) NoPerspective + Decorate 68(inpos) BuiltIn FragCoord + Decorate 78(@entryPointOutput.Color) Location 0 + Decorate 82(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 86(sampleMask) BuiltIn SampleMask 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypePointer Function 6(float) - 8: TypeFunction 2 7(ptr) 7(ptr) 7(ptr) - 14: TypeVector 6(float) 4 - 15: TypePointer Function 14(fvec4) - 16: TypeInt 32 1 - 17: TypePointer Function 16(int) - 18(PS_OUTPUT): TypeStruct 14(fvec4) 6(float) - 19: TypeFunction 18(PS_OUTPUT) 15(ptr) 17(ptr) - 26: 6(float) Constant 3212836864 - 28: 6(float) Constant 1088421888 - 30: 6(float) Constant 1077936128 - 40: TypePointer Function 18(PS_OUTPUT) - 42: 16(int) Constant 0 - 46: 6(float) Constant 1065353216 - 49: 16(int) Constant 1 - 50: TypeInt 32 0 - 51: 50(int) Constant 3 - 59: TypePointer Input 14(fvec4) - 60(inpos): 59(ptr) Variable Input - 69: TypePointer Output 14(fvec4) - 70(Color): 69(ptr) Variable Output - 73: TypePointer Output 6(float) - 74(Depth): 73(ptr) Variable Output - 77: TypePointer Output 16(int) - 78(sampleMask): 77(ptr) Variable Output + 8: TypeFunction 2 7(ptr) 7(ptr) 7(ptr) 7(ptr) + 15: TypeVector 6(float) 4 + 16: TypePointer Function 15(fvec4) + 17: TypeInt 32 1 + 18: TypePointer Function 17(int) + 19(PS_OUTPUT): TypeStruct 15(fvec4) 6(float) + 20: TypeFunction 19(PS_OUTPUT) 16(ptr) 18(ptr) + 27: 6(float) Constant 3212836864 + 28: 6(float) Constant 1065353216 + 32: 6(float) Constant 1088421888 + 34: 6(float) Constant 1077936128 + 42: TypeInt 32 0 + 43: 42(int) Constant 3 + 51: TypePointer Function 19(PS_OUTPUT) + 53: 17(int) Constant 0 + 59: 17(int) Constant 1 + 67: TypePointer Input 15(fvec4) + 68(inpos): 67(ptr) Variable Input + 77: TypePointer Output 15(fvec4) +78(@entryPointOutput.Color): 77(ptr) Variable Output + 81: TypePointer Output 6(float) +82(@entryPointOutput.Depth): 81(ptr) Variable Output + 85: TypePointer Output 17(int) + 86(sampleMask): 85(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 58(inpos): 15(ptr) Variable Function - 62(flattenTemp): 40(ptr) Variable Function - 63(sampleMask): 17(ptr) Variable Function - 64(param): 15(ptr) Variable Function - 66(param): 17(ptr) Variable Function - 61: 14(fvec4) Load 60(inpos) - Store 58(inpos) 61 - 65: 14(fvec4) Load 58(inpos) - Store 64(param) 65 - 67:18(PS_OUTPUT) FunctionCall 22(@main(vf4;i1;) 64(param) 66(param) - 68: 16(int) Load 66(param) - Store 63(sampleMask) 68 - Store 62(flattenTemp) 67 - 71: 15(ptr) AccessChain 62(flattenTemp) 42 - 72: 14(fvec4) Load 71 - Store 70(Color) 72 - 75: 7(ptr) AccessChain 62(flattenTemp) 49 - 76: 6(float) Load 75 - Store 74(Depth) 76 - 79: 16(int) Load 63(sampleMask) - Store 78(sampleMask) 79 + 66(inpos): 16(ptr) Variable Function + 70(flattenTemp): 51(ptr) Variable Function + 71(sampleMask): 18(ptr) Variable Function + 72(param): 16(ptr) Variable Function + 74(param): 18(ptr) Variable Function + 69: 15(fvec4) Load 68(inpos) + Store 66(inpos) 69 + 73: 15(fvec4) Load 66(inpos) + Store 72(param) 73 + 75:19(PS_OUTPUT) FunctionCall 23(@main(vf4;i1;) 72(param) 74(param) + 76: 17(int) Load 74(param) + Store 71(sampleMask) 76 + Store 70(flattenTemp) 75 + 79: 16(ptr) AccessChain 70(flattenTemp) 53 + 80: 15(fvec4) Load 79 + Store 78(@entryPointOutput.Color) 80 + 83: 7(ptr) AccessChain 70(flattenTemp) 59 + 84: 6(float) Load 83 + Store 82(@entryPointOutput.Depth) 84 + 87: 17(int) Load 71(sampleMask) + Store 86(sampleMask) 87 Return FunctionEnd -12(MyFunc(f1;f1;f1;): 2 Function None 8 +13(MyFunc(f1;f1;f1;f1;): 2 Function None 8 9(x): 7(ptr) FunctionParameter 10(y): 7(ptr) FunctionParameter 11(z): 7(ptr) FunctionParameter - 13: Label - 24: 6(float) Load 9(x) - Store 10(y) 24 - 25: 6(float) Load 10(y) - Store 11(z) 25 - Store 9(x) 26 + 12(w): 7(ptr) FunctionParameter + 14: Label + 25: 6(float) Load 9(x) + Store 10(y) 25 + 26: 6(float) Load 10(y) + Store 11(z) 26 + Store 9(x) 27 + 29: 6(float) Load 12(w) + 30: 6(float) FMul 29 28 + Store 12(w) 30 Return FunctionEnd -22(@main(vf4;i1;):18(PS_OUTPUT) Function None 19 - 20(inpos): 15(ptr) FunctionParameter - 21(sampleMask): 17(ptr) FunctionParameter - 23: Label - 27(x): 7(ptr) Variable Function - 29(z): 7(ptr) Variable Function - 31(y): 7(ptr) Variable Function - 32(param): 7(ptr) Variable Function - 34(param): 7(ptr) Variable Function - 35(param): 7(ptr) Variable Function - 41(psout): 40(ptr) Variable Function - Store 27(x) 28 - Store 29(z) 30 - 33: 6(float) Load 27(x) - Store 32(param) 33 - 36: 6(float) Load 29(z) - Store 35(param) 36 - 37: 2 FunctionCall 12(MyFunc(f1;f1;f1;) 32(param) 34(param) 35(param) - 38: 6(float) Load 34(param) - Store 31(y) 38 - 39: 6(float) Load 35(param) - Store 29(z) 39 - 43: 6(float) Load 27(x) - 44: 6(float) Load 31(y) - 45: 6(float) Load 29(z) - 47: 14(fvec4) CompositeConstruct 43 44 45 46 - 48: 15(ptr) AccessChain 41(psout) 42 - Store 48 47 - 52: 7(ptr) AccessChain 20(inpos) 51 - 53: 6(float) Load 52 - 54: 7(ptr) AccessChain 41(psout) 49 - Store 54 53 - 55:18(PS_OUTPUT) Load 41(psout) - ReturnValue 55 +23(@main(vf4;i1;):19(PS_OUTPUT) Function None 20 + 21(inpos): 16(ptr) FunctionParameter + 22(sampleMask): 18(ptr) FunctionParameter + 24: Label + 31(x): 7(ptr) Variable Function + 33(z): 7(ptr) Variable Function + 35(y): 7(ptr) Variable Function + 36(param): 7(ptr) Variable Function + 38(param): 7(ptr) Variable Function + 39(param): 7(ptr) Variable Function + 41(param): 7(ptr) Variable Function + 52(psout): 51(ptr) Variable Function + Store 31(x) 32 + Store 33(z) 34 + 37: 6(float) Load 31(x) + Store 36(param) 37 + 40: 6(float) Load 33(z) + Store 39(param) 40 + 44: 7(ptr) AccessChain 21(inpos) 43 + 45: 6(float) Load 44 + Store 41(param) 45 + 46: 2 FunctionCall 13(MyFunc(f1;f1;f1;f1;) 36(param) 38(param) 39(param) 41(param) + 47: 6(float) Load 38(param) + Store 35(y) 47 + 48: 6(float) Load 39(param) + Store 33(z) 48 + 49: 6(float) Load 41(param) + 50: 7(ptr) AccessChain 21(inpos) 43 + Store 50 49 + 54: 6(float) Load 31(x) + 55: 6(float) Load 35(y) + 56: 6(float) Load 33(z) + 57: 15(fvec4) CompositeConstruct 54 55 56 28 + 58: 16(ptr) AccessChain 52(psout) 53 + Store 58 57 + 60: 7(ptr) AccessChain 21(inpos) 43 + 61: 6(float) Load 60 + 62: 7(ptr) AccessChain 52(psout) 59 + Store 62 61 + 63:19(PS_OUTPUT) Load 52(psout) + ReturnValue 63 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.barriers.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.barriers.comp.out index f7e3e22..0a9cb14 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.barriers.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.barriers.comp.out @@ -7,8 +7,8 @@ local_size = (1, 1, 1) 0:? Sequence 0:4 MemoryBarrier ( temp void) 0:5 AllMemoryBarrierWithGroupSync ( temp void) -0:6 GroupMemoryBarrier ( temp void) -0:7 GroupMemoryBarrierWithGroupSync ( temp void) +0:6 DeviceMemoryBarrier ( temp void) +0:7 DeviceMemoryBarrierWithGroupSync ( temp void) 0:8 WorkgroupMemoryBarrier ( temp void) 0:9 WorkgroupMemoryBarrierWithGroupSync ( temp void) 0:11 Branch: Return with expression @@ -35,8 +35,8 @@ local_size = (1, 1, 1) 0:? Sequence 0:4 MemoryBarrier ( temp void) 0:5 AllMemoryBarrierWithGroupSync ( temp void) -0:6 GroupMemoryBarrier ( temp void) -0:7 GroupMemoryBarrierWithGroupSync ( temp void) +0:6 DeviceMemoryBarrier ( temp void) +0:7 DeviceMemoryBarrierWithGroupSync ( temp void) 0:8 WorkgroupMemoryBarrier ( temp void) 0:9 WorkgroupMemoryBarrierWithGroupSync ( temp void) 0:11 Branch: Return with expression @@ -52,7 +52,7 @@ local_size = (1, 1, 1) 0:? '@entryPointOutput' (layout( location=0) out float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 22 Capability Shader @@ -71,10 +71,10 @@ local_size = (1, 1, 1) 7: TypeFunction 6(float) 10: TypeInt 32 0 11: 10(int) Constant 1 - 12: 10(int) Constant 4048 - 13: 10(int) Constant 512 - 14: 10(int) Constant 2 - 15: 10(int) Constant 256 + 12: 10(int) Constant 3400 + 13: 10(int) Constant 2 + 14: 10(int) Constant 2120 + 15: 10(int) Constant 264 16: 6(float) Constant 0 19: TypePointer Output 6(float) 20(@entryPointOutput): 19(ptr) Variable Output @@ -87,10 +87,10 @@ local_size = (1, 1, 1) 8(@ComputeShaderFunction(): 6(float) Function None 7 9: Label MemoryBarrier 11 12 - ControlBarrier 11 11 12 - MemoryBarrier 11 13 - ControlBarrier 11 11 13 - MemoryBarrier 14 15 - ControlBarrier 14 14 15 + ControlBarrier 13 11 12 + MemoryBarrier 11 14 + ControlBarrier 13 11 14 + MemoryBarrier 13 15 + ControlBarrier 13 13 15 ReturnValue 16 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.comp.out index bff1886..0ccddd2 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.comp.out @@ -11,7 +11,8 @@ local_size = (1, 1, 1) 0:17 'inU1' ( in uint) 0:? Sequence 0:21 all ( temp bool) -0:21 'inF0' ( in float) +0:21 Convert float to bool ( temp bool) +0:21 'inF0' ( in float) 0:24 AtomicAdd ( temp void) 0:24 'gs_ua' ( shared uint) 0:24 'gs_ub' ( shared uint) @@ -92,7 +93,8 @@ local_size = (1, 1, 1) 0:51 'inU1' ( in 2-component vector of uint) 0:? Sequence 0:55 all ( temp bool) -0:55 'inF0' ( in 2-component vector of float) +0:55 Convert float to bool ( temp 2-component vector of bool) +0:55 'inF0' ( in 2-component vector of float) 0:58 AtomicAdd ( temp void) 0:58 'gs_ua2' ( shared 2-component vector of uint) 0:58 'gs_ub2' ( shared 2-component vector of uint) @@ -165,7 +167,8 @@ local_size = (1, 1, 1) 0:78 'inU1' ( in 3-component vector of uint) 0:? Sequence 0:82 all ( temp bool) -0:82 'inF0' ( in 3-component vector of float) +0:82 Convert float to bool ( temp 3-component vector of bool) +0:82 'inF0' ( in 3-component vector of float) 0:85 AtomicAdd ( temp void) 0:85 'gs_ua3' ( shared 3-component vector of uint) 0:85 'gs_ub3' ( shared 3-component vector of uint) @@ -239,7 +242,8 @@ local_size = (1, 1, 1) 0:105 'inU1' ( in 4-component vector of uint) 0:? Sequence 0:109 all ( temp bool) -0:109 'inF0' ( in 4-component vector of float) +0:109 Convert float to bool ( temp 4-component vector of bool) +0:109 'inF0' ( in 4-component vector of float) 0:112 AtomicAdd ( temp void) 0:112 'gs_ua4' ( shared 4-component vector of uint) 0:112 'gs_ub4' ( shared 4-component vector of uint) @@ -367,7 +371,8 @@ local_size = (1, 1, 1) 0:17 'inU1' ( in uint) 0:? Sequence 0:21 all ( temp bool) -0:21 'inF0' ( in float) +0:21 Convert float to bool ( temp bool) +0:21 'inF0' ( in float) 0:24 AtomicAdd ( temp void) 0:24 'gs_ua' ( shared uint) 0:24 'gs_ub' ( shared uint) @@ -448,7 +453,8 @@ local_size = (1, 1, 1) 0:51 'inU1' ( in 2-component vector of uint) 0:? Sequence 0:55 all ( temp bool) -0:55 'inF0' ( in 2-component vector of float) +0:55 Convert float to bool ( temp 2-component vector of bool) +0:55 'inF0' ( in 2-component vector of float) 0:58 AtomicAdd ( temp void) 0:58 'gs_ua2' ( shared 2-component vector of uint) 0:58 'gs_ub2' ( shared 2-component vector of uint) @@ -521,7 +527,8 @@ local_size = (1, 1, 1) 0:78 'inU1' ( in 3-component vector of uint) 0:? Sequence 0:82 all ( temp bool) -0:82 'inF0' ( in 3-component vector of float) +0:82 Convert float to bool ( temp 3-component vector of bool) +0:82 'inF0' ( in 3-component vector of float) 0:85 AtomicAdd ( temp void) 0:85 'gs_ua3' ( shared 3-component vector of uint) 0:85 'gs_ub3' ( shared 3-component vector of uint) @@ -595,7 +602,8 @@ local_size = (1, 1, 1) 0:105 'inU1' ( in 4-component vector of uint) 0:? Sequence 0:109 all ( temp bool) -0:109 'inF0' ( in 4-component vector of float) +0:109 Convert float to bool ( temp 4-component vector of bool) +0:109 'inF0' ( in 4-component vector of float) 0:112 AtomicAdd ( temp void) 0:112 'gs_ua4' ( shared 4-component vector of uint) 0:112 'gs_ub4' ( shared 4-component vector of uint) @@ -708,13 +716,13 @@ local_size = (1, 1, 1) 0:? 'inU1' (layout( location=4) in 4-component vector of uint) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 255 +// Generated by (magic number): 80003 +// Id's are bound by 265 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint GLCompute 4 "ComputeShaderFunction" 227 230 233 237 240 243 + EntryPoint GLCompute 4 "ComputeShaderFunction" 237 240 243 247 250 253 ExecutionMode 4 LocalSize 1 1 1 Source HLSL 500 Name 4 "ComputeShaderFunction" @@ -746,44 +754,44 @@ local_size = (1, 1, 1) Name 55 "inF2" Name 56 "inU0" Name 57 "inU1" - Name 64 "gs_ua" - Name 65 "gs_ub" - Name 70 "out_u1" - Name 78 "gs_uc" - Name 107 "gs_ua2" - Name 108 "gs_ub2" - Name 111 "out_u2" - Name 119 "gs_uc2" - Name 148 "gs_ua3" - Name 149 "gs_ub3" - Name 152 "out_u3" - Name 160 "gs_uc3" - Name 188 "gs_ua4" - Name 189 "gs_ub4" - Name 192 "out_u4" - Name 200 "gs_uc4" - Name 225 "inF0" - Name 227 "inF0" - Name 229 "inF1" - Name 230 "inF1" - Name 232 "inF2" - Name 233 "inF2" - Name 235 "inU0" - Name 237 "inU0" - Name 239 "inU1" - Name 240 "inU1" - Name 243 "@entryPointOutput" - Name 244 "param" - Name 246 "param" - Name 248 "param" - Name 250 "param" - Name 252 "param" - Decorate 227(inF0) Location 0 - Decorate 230(inF1) Location 1 - Decorate 233(inF2) Location 2 - Decorate 237(inU0) Location 3 - Decorate 240(inU1) Location 4 - Decorate 243(@entryPointOutput) Location 0 + Name 66 "gs_ua" + Name 67 "gs_ub" + Name 72 "out_u1" + Name 80 "gs_uc" + Name 111 "gs_ua2" + Name 112 "gs_ub2" + Name 115 "out_u2" + Name 123 "gs_uc2" + Name 155 "gs_ua3" + Name 156 "gs_ub3" + Name 159 "out_u3" + Name 167 "gs_uc3" + Name 198 "gs_ua4" + Name 199 "gs_ub4" + Name 202 "out_u4" + Name 210 "gs_uc4" + Name 235 "inF0" + Name 237 "inF0" + Name 239 "inF1" + Name 240 "inF1" + Name 242 "inF2" + Name 243 "inF2" + Name 245 "inU0" + Name 247 "inU0" + Name 249 "inU1" + Name 250 "inU1" + Name 253 "@entryPointOutput" + Name 254 "param" + Name 256 "param" + Name 258 "param" + Name 260 "param" + Name 262 "param" + Decorate 237(inF0) Location 0 + Decorate 240(inF1) Location 1 + Decorate 243(inF2) Location 2 + Decorate 247(inU0) Location 3 + Decorate 250(inU1) Location 4 + Decorate 253(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -808,75 +816,81 @@ local_size = (1, 1, 1) 51: TypePointer Function 50(ivec4) 52: TypeFunction 48(fvec4) 49(ptr) 49(ptr) 49(ptr) 51(ptr) 51(ptr) 61: TypeBool - 63: TypePointer Workgroup 8(int) - 64(gs_ua): 63(ptr) Variable Workgroup - 65(gs_ub): 63(ptr) Variable Workgroup - 67: 8(int) Constant 1 - 68: 8(int) Constant 0 - 78(gs_uc): 63(ptr) Variable Workgroup - 99: 6(float) Constant 0 - 106: TypePointer Workgroup 26(ivec2) - 107(gs_ua2): 106(ptr) Variable Workgroup - 108(gs_ub2): 106(ptr) Variable Workgroup - 119(gs_uc2): 106(ptr) Variable Workgroup - 140: 6(float) Constant 1065353216 - 141: 6(float) Constant 1073741824 - 142: 24(fvec2) ConstantComposite 140 141 - 147: TypePointer Workgroup 38(ivec3) - 148(gs_ua3): 147(ptr) Variable Workgroup - 149(gs_ub3): 147(ptr) Variable Workgroup - 160(gs_uc3): 147(ptr) Variable Workgroup - 181: 6(float) Constant 1077936128 - 182: 36(fvec3) ConstantComposite 140 141 181 - 187: TypePointer Workgroup 50(ivec4) - 188(gs_ua4): 187(ptr) Variable Workgroup - 189(gs_ub4): 187(ptr) Variable Workgroup - 200(gs_uc4): 187(ptr) Variable Workgroup - 221: 6(float) Constant 1082130432 - 222: 48(fvec4) ConstantComposite 140 141 181 221 - 226: TypePointer Input 48(fvec4) - 227(inF0): 226(ptr) Variable Input - 230(inF1): 226(ptr) Variable Input - 233(inF2): 226(ptr) Variable Input - 236: TypePointer Input 50(ivec4) - 237(inU0): 236(ptr) Variable Input - 240(inU1): 236(ptr) Variable Input - 242: TypePointer Output 48(fvec4) -243(@entryPointOutput): 242(ptr) Variable Output + 62: 6(float) Constant 0 + 65: TypePointer Workgroup 8(int) + 66(gs_ua): 65(ptr) Variable Workgroup + 67(gs_ub): 65(ptr) Variable Workgroup + 69: 8(int) Constant 1 + 70: 8(int) Constant 0 + 80(gs_uc): 65(ptr) Variable Workgroup + 106: TypeVector 61(bool) 2 + 107: 24(fvec2) ConstantComposite 62 62 + 110: TypePointer Workgroup 26(ivec2) + 111(gs_ua2): 110(ptr) Variable Workgroup + 112(gs_ub2): 110(ptr) Variable Workgroup + 123(gs_uc2): 110(ptr) Variable Workgroup + 144: 6(float) Constant 1065353216 + 145: 6(float) Constant 1073741824 + 146: 24(fvec2) ConstantComposite 144 145 + 150: TypeVector 61(bool) 3 + 151: 36(fvec3) ConstantComposite 62 62 62 + 154: TypePointer Workgroup 38(ivec3) + 155(gs_ua3): 154(ptr) Variable Workgroup + 156(gs_ub3): 154(ptr) Variable Workgroup + 167(gs_uc3): 154(ptr) Variable Workgroup + 188: 6(float) Constant 1077936128 + 189: 36(fvec3) ConstantComposite 144 145 188 + 193: TypeVector 61(bool) 4 + 194: 48(fvec4) ConstantComposite 62 62 62 62 + 197: TypePointer Workgroup 50(ivec4) + 198(gs_ua4): 197(ptr) Variable Workgroup + 199(gs_ub4): 197(ptr) Variable Workgroup + 210(gs_uc4): 197(ptr) Variable Workgroup + 231: 6(float) Constant 1082130432 + 232: 48(fvec4) ConstantComposite 144 145 188 231 + 236: TypePointer Input 48(fvec4) + 237(inF0): 236(ptr) Variable Input + 240(inF1): 236(ptr) Variable Input + 243(inF2): 236(ptr) Variable Input + 246: TypePointer Input 50(ivec4) + 247(inU0): 246(ptr) Variable Input + 250(inU1): 246(ptr) Variable Input + 252: TypePointer Output 48(fvec4) +253(@entryPointOutput): 252(ptr) Variable Output 4(ComputeShaderFunction): 2 Function None 3 5: Label - 225(inF0): 49(ptr) Variable Function - 229(inF1): 49(ptr) Variable Function - 232(inF2): 49(ptr) Variable Function - 235(inU0): 51(ptr) Variable Function - 239(inU1): 51(ptr) Variable Function - 244(param): 49(ptr) Variable Function - 246(param): 49(ptr) Variable Function - 248(param): 49(ptr) Variable Function - 250(param): 51(ptr) Variable Function - 252(param): 51(ptr) Variable Function - 228: 48(fvec4) Load 227(inF0) - Store 225(inF0) 228 - 231: 48(fvec4) Load 230(inF1) - Store 229(inF1) 231 - 234: 48(fvec4) Load 233(inF2) - Store 232(inF2) 234 - 238: 50(ivec4) Load 237(inU0) - Store 235(inU0) 238 - 241: 50(ivec4) Load 240(inU1) - Store 239(inU1) 241 - 245: 48(fvec4) Load 225(inF0) - Store 244(param) 245 - 247: 48(fvec4) Load 229(inF1) - Store 246(param) 247 - 249: 48(fvec4) Load 232(inF2) - Store 248(param) 249 - 251: 50(ivec4) Load 235(inU0) - Store 250(param) 251 - 253: 50(ivec4) Load 239(inU1) - Store 252(param) 253 - 254: 48(fvec4) FunctionCall 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;) 244(param) 246(param) 248(param) 250(param) 252(param) - Store 243(@entryPointOutput) 254 + 235(inF0): 49(ptr) Variable Function + 239(inF1): 49(ptr) Variable Function + 242(inF2): 49(ptr) Variable Function + 245(inU0): 51(ptr) Variable Function + 249(inU1): 51(ptr) Variable Function + 254(param): 49(ptr) Variable Function + 256(param): 49(ptr) Variable Function + 258(param): 49(ptr) Variable Function + 260(param): 51(ptr) Variable Function + 262(param): 51(ptr) Variable Function + 238: 48(fvec4) Load 237(inF0) + Store 235(inF0) 238 + 241: 48(fvec4) Load 240(inF1) + Store 239(inF1) 241 + 244: 48(fvec4) Load 243(inF2) + Store 242(inF2) 244 + 248: 50(ivec4) Load 247(inU0) + Store 245(inU0) 248 + 251: 50(ivec4) Load 250(inU1) + Store 249(inU1) 251 + 255: 48(fvec4) Load 235(inF0) + Store 254(param) 255 + 257: 48(fvec4) Load 239(inF1) + Store 256(param) 257 + 259: 48(fvec4) Load 242(inF2) + Store 258(param) 259 + 261: 50(ivec4) Load 245(inU0) + Store 260(param) 261 + 263: 50(ivec4) Load 249(inU1) + Store 262(param) 263 + 264: 48(fvec4) FunctionCall 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;) 254(param) 256(param) 258(param) 260(param) 262(param) + Store 253(@entryPointOutput) 264 Return FunctionEnd 16(ComputeShaderFunctionS(f1;f1;f1;u1;u1;): 6(float) Function None 10 @@ -886,54 +900,55 @@ local_size = (1, 1, 1) 14(inU0): 9(ptr) FunctionParameter 15(inU1): 9(ptr) FunctionParameter 17: Label - 70(out_u1): 9(ptr) Variable Function + 72(out_u1): 9(ptr) Variable Function 60: 6(float) Load 11(inF0) - 62: 61(bool) All 60 - 66: 8(int) Load 65(gs_ub) - 69: 2 AtomicIAdd 64(gs_ua) 67 68 66 - 71: 8(int) Load 65(gs_ub) - 72: 8(int) AtomicIAdd 64(gs_ua) 67 68 71 - Store 70(out_u1) 72 - 73: 8(int) Load 65(gs_ub) - 74: 2 AtomicAnd 64(gs_ua) 67 68 73 - 75: 8(int) Load 65(gs_ub) - 76: 8(int) AtomicAnd 64(gs_ua) 67 68 75 - Store 70(out_u1) 76 - 77: 8(int) Load 65(gs_ub) - 79: 8(int) Load 78(gs_uc) - 80: 8(int) AtomicCompareExchange 64(gs_ua) 67 68 68 79 77 - Store 70(out_u1) 80 - 81: 8(int) Load 65(gs_ub) - 82: 8(int) AtomicExchange 64(gs_ua) 67 68 81 - Store 70(out_u1) 82 - 83: 8(int) Load 65(gs_ub) - 84: 2 AtomicSMax 64(gs_ua) 67 68 83 - 85: 8(int) Load 65(gs_ub) - 86: 8(int) AtomicUMax 64(gs_ua) 67 68 85 - Store 70(out_u1) 86 - 87: 8(int) Load 65(gs_ub) - 88: 2 AtomicSMin 64(gs_ua) 67 68 87 - 89: 8(int) Load 65(gs_ub) - 90: 8(int) AtomicUMin 64(gs_ua) 67 68 89 - Store 70(out_u1) 90 - 91: 8(int) Load 65(gs_ub) - 92: 2 AtomicOr 64(gs_ua) 67 68 91 - 93: 8(int) Load 65(gs_ub) - 94: 8(int) AtomicOr 64(gs_ua) 67 68 93 - Store 70(out_u1) 94 - 95: 8(int) Load 65(gs_ub) - 96: 2 AtomicXor 64(gs_ua) 67 68 95 - 97: 8(int) Load 65(gs_ub) - 98: 8(int) AtomicXor 64(gs_ua) 67 68 97 - Store 70(out_u1) 98 - ReturnValue 99 + 63: 61(bool) FOrdNotEqual 60 62 + 64: 61(bool) All 63 + 68: 8(int) Load 67(gs_ub) + 71: 2 AtomicIAdd 66(gs_ua) 69 70 68 + 73: 8(int) Load 67(gs_ub) + 74: 8(int) AtomicIAdd 66(gs_ua) 69 70 73 + Store 72(out_u1) 74 + 75: 8(int) Load 67(gs_ub) + 76: 2 AtomicAnd 66(gs_ua) 69 70 75 + 77: 8(int) Load 67(gs_ub) + 78: 8(int) AtomicAnd 66(gs_ua) 69 70 77 + Store 72(out_u1) 78 + 79: 8(int) Load 67(gs_ub) + 81: 8(int) Load 80(gs_uc) + 82: 8(int) AtomicCompareExchange 66(gs_ua) 69 70 70 81 79 + Store 72(out_u1) 82 + 83: 8(int) Load 67(gs_ub) + 84: 8(int) AtomicExchange 66(gs_ua) 69 70 83 + Store 72(out_u1) 84 + 85: 8(int) Load 67(gs_ub) + 86: 2 AtomicSMax 66(gs_ua) 69 70 85 + 87: 8(int) Load 67(gs_ub) + 88: 8(int) AtomicUMax 66(gs_ua) 69 70 87 + Store 72(out_u1) 88 + 89: 8(int) Load 67(gs_ub) + 90: 2 AtomicSMin 66(gs_ua) 69 70 89 + 91: 8(int) Load 67(gs_ub) + 92: 8(int) AtomicUMin 66(gs_ua) 69 70 91 + Store 72(out_u1) 92 + 93: 8(int) Load 67(gs_ub) + 94: 2 AtomicOr 66(gs_ua) 69 70 93 + 95: 8(int) Load 67(gs_ub) + 96: 8(int) AtomicOr 66(gs_ua) 69 70 95 + Store 72(out_u1) 96 + 97: 8(int) Load 67(gs_ub) + 98: 2 AtomicXor 66(gs_ua) 69 70 97 + 99: 8(int) Load 67(gs_ub) + 100: 8(int) AtomicXor 66(gs_ua) 69 70 99 + Store 72(out_u1) 100 + ReturnValue 62 FunctionEnd 22(ComputeShaderFunction1(vf1;vf1;vf1;): 6(float) Function None 18 19(inF0): 7(ptr) FunctionParameter 20(inF1): 7(ptr) FunctionParameter 21(inF2): 7(ptr) FunctionParameter 23: Label - ReturnValue 99 + ReturnValue 62 FunctionEnd 34(ComputeShaderFunction2(vf2;vf2;vf2;vu2;vu2;): 24(fvec2) Function None 28 29(inF0): 25(ptr) FunctionParameter @@ -942,47 +957,48 @@ local_size = (1, 1, 1) 32(inU0): 27(ptr) FunctionParameter 33(inU1): 27(ptr) FunctionParameter 35: Label - 111(out_u2): 27(ptr) Variable Function - 104: 24(fvec2) Load 29(inF0) - 105: 61(bool) All 104 - 109: 26(ivec2) Load 108(gs_ub2) - 110: 2 AtomicIAdd 107(gs_ua2) 67 68 109 - 112: 26(ivec2) Load 108(gs_ub2) - 113: 26(ivec2) AtomicIAdd 107(gs_ua2) 67 68 112 - Store 111(out_u2) 113 - 114: 26(ivec2) Load 108(gs_ub2) - 115: 2 AtomicAnd 107(gs_ua2) 67 68 114 - 116: 26(ivec2) Load 108(gs_ub2) - 117: 26(ivec2) AtomicAnd 107(gs_ua2) 67 68 116 - Store 111(out_u2) 117 - 118: 26(ivec2) Load 108(gs_ub2) - 120: 26(ivec2) Load 119(gs_uc2) - 121: 26(ivec2) AtomicCompareExchange 107(gs_ua2) 67 68 68 120 118 - Store 111(out_u2) 121 - 122: 26(ivec2) Load 108(gs_ub2) - 123: 26(ivec2) AtomicExchange 107(gs_ua2) 67 68 122 - Store 111(out_u2) 123 - 124: 26(ivec2) Load 108(gs_ub2) - 125: 2 AtomicSMax 107(gs_ua2) 67 68 124 - 126: 26(ivec2) Load 108(gs_ub2) - 127: 26(ivec2) AtomicUMax 107(gs_ua2) 67 68 126 - Store 111(out_u2) 127 - 128: 26(ivec2) Load 108(gs_ub2) - 129: 2 AtomicSMin 107(gs_ua2) 67 68 128 - 130: 26(ivec2) Load 108(gs_ub2) - 131: 26(ivec2) AtomicUMin 107(gs_ua2) 67 68 130 - Store 111(out_u2) 131 - 132: 26(ivec2) Load 108(gs_ub2) - 133: 2 AtomicOr 107(gs_ua2) 67 68 132 - 134: 26(ivec2) Load 108(gs_ub2) - 135: 26(ivec2) AtomicOr 107(gs_ua2) 67 68 134 - Store 111(out_u2) 135 - 136: 26(ivec2) Load 108(gs_ub2) - 137: 2 AtomicXor 107(gs_ua2) 67 68 136 - 138: 26(ivec2) Load 108(gs_ub2) - 139: 26(ivec2) AtomicXor 107(gs_ua2) 67 68 138 - Store 111(out_u2) 139 - ReturnValue 142 + 115(out_u2): 27(ptr) Variable Function + 105: 24(fvec2) Load 29(inF0) + 108: 106(bvec2) FOrdNotEqual 105 107 + 109: 61(bool) All 108 + 113: 26(ivec2) Load 112(gs_ub2) + 114: 2 AtomicIAdd 111(gs_ua2) 69 70 113 + 116: 26(ivec2) Load 112(gs_ub2) + 117: 26(ivec2) AtomicIAdd 111(gs_ua2) 69 70 116 + Store 115(out_u2) 117 + 118: 26(ivec2) Load 112(gs_ub2) + 119: 2 AtomicAnd 111(gs_ua2) 69 70 118 + 120: 26(ivec2) Load 112(gs_ub2) + 121: 26(ivec2) AtomicAnd 111(gs_ua2) 69 70 120 + Store 115(out_u2) 121 + 122: 26(ivec2) Load 112(gs_ub2) + 124: 26(ivec2) Load 123(gs_uc2) + 125: 26(ivec2) AtomicCompareExchange 111(gs_ua2) 69 70 70 124 122 + Store 115(out_u2) 125 + 126: 26(ivec2) Load 112(gs_ub2) + 127: 26(ivec2) AtomicExchange 111(gs_ua2) 69 70 126 + Store 115(out_u2) 127 + 128: 26(ivec2) Load 112(gs_ub2) + 129: 2 AtomicSMax 111(gs_ua2) 69 70 128 + 130: 26(ivec2) Load 112(gs_ub2) + 131: 26(ivec2) AtomicUMax 111(gs_ua2) 69 70 130 + Store 115(out_u2) 131 + 132: 26(ivec2) Load 112(gs_ub2) + 133: 2 AtomicSMin 111(gs_ua2) 69 70 132 + 134: 26(ivec2) Load 112(gs_ub2) + 135: 26(ivec2) AtomicUMin 111(gs_ua2) 69 70 134 + Store 115(out_u2) 135 + 136: 26(ivec2) Load 112(gs_ub2) + 137: 2 AtomicOr 111(gs_ua2) 69 70 136 + 138: 26(ivec2) Load 112(gs_ub2) + 139: 26(ivec2) AtomicOr 111(gs_ua2) 69 70 138 + Store 115(out_u2) 139 + 140: 26(ivec2) Load 112(gs_ub2) + 141: 2 AtomicXor 111(gs_ua2) 69 70 140 + 142: 26(ivec2) Load 112(gs_ub2) + 143: 26(ivec2) AtomicXor 111(gs_ua2) 69 70 142 + Store 115(out_u2) 143 + ReturnValue 146 FunctionEnd 46(ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3;): 36(fvec3) Function None 40 41(inF0): 37(ptr) FunctionParameter @@ -991,47 +1007,48 @@ local_size = (1, 1, 1) 44(inU0): 39(ptr) FunctionParameter 45(inU1): 39(ptr) FunctionParameter 47: Label - 152(out_u3): 39(ptr) Variable Function - 145: 36(fvec3) Load 41(inF0) - 146: 61(bool) All 145 - 150: 38(ivec3) Load 149(gs_ub3) - 151: 2 AtomicIAdd 148(gs_ua3) 67 68 150 - 153: 38(ivec3) Load 149(gs_ub3) - 154: 38(ivec3) AtomicIAdd 148(gs_ua3) 67 68 153 - Store 152(out_u3) 154 - 155: 38(ivec3) Load 149(gs_ub3) - 156: 2 AtomicAnd 148(gs_ua3) 67 68 155 - 157: 38(ivec3) Load 149(gs_ub3) - 158: 38(ivec3) AtomicAnd 148(gs_ua3) 67 68 157 - Store 152(out_u3) 158 - 159: 38(ivec3) Load 149(gs_ub3) - 161: 38(ivec3) Load 160(gs_uc3) - 162: 38(ivec3) AtomicCompareExchange 148(gs_ua3) 67 68 68 161 159 - Store 152(out_u3) 162 - 163: 38(ivec3) Load 149(gs_ub3) - 164: 38(ivec3) AtomicExchange 148(gs_ua3) 67 68 163 - Store 152(out_u3) 164 - 165: 38(ivec3) Load 149(gs_ub3) - 166: 2 AtomicSMax 148(gs_ua3) 67 68 165 - 167: 38(ivec3) Load 149(gs_ub3) - 168: 38(ivec3) AtomicUMax 148(gs_ua3) 67 68 167 - Store 152(out_u3) 168 - 169: 38(ivec3) Load 149(gs_ub3) - 170: 2 AtomicSMin 148(gs_ua3) 67 68 169 - 171: 38(ivec3) Load 149(gs_ub3) - 172: 38(ivec3) AtomicUMin 148(gs_ua3) 67 68 171 - Store 152(out_u3) 172 - 173: 38(ivec3) Load 149(gs_ub3) - 174: 2 AtomicOr 148(gs_ua3) 67 68 173 - 175: 38(ivec3) Load 149(gs_ub3) - 176: 38(ivec3) AtomicOr 148(gs_ua3) 67 68 175 - Store 152(out_u3) 176 - 177: 38(ivec3) Load 149(gs_ub3) - 178: 2 AtomicXor 148(gs_ua3) 67 68 177 - 179: 38(ivec3) Load 149(gs_ub3) - 180: 38(ivec3) AtomicXor 148(gs_ua3) 67 68 179 - Store 152(out_u3) 180 - ReturnValue 182 + 159(out_u3): 39(ptr) Variable Function + 149: 36(fvec3) Load 41(inF0) + 152: 150(bvec3) FOrdNotEqual 149 151 + 153: 61(bool) All 152 + 157: 38(ivec3) Load 156(gs_ub3) + 158: 2 AtomicIAdd 155(gs_ua3) 69 70 157 + 160: 38(ivec3) Load 156(gs_ub3) + 161: 38(ivec3) AtomicIAdd 155(gs_ua3) 69 70 160 + Store 159(out_u3) 161 + 162: 38(ivec3) Load 156(gs_ub3) + 163: 2 AtomicAnd 155(gs_ua3) 69 70 162 + 164: 38(ivec3) Load 156(gs_ub3) + 165: 38(ivec3) AtomicAnd 155(gs_ua3) 69 70 164 + Store 159(out_u3) 165 + 166: 38(ivec3) Load 156(gs_ub3) + 168: 38(ivec3) Load 167(gs_uc3) + 169: 38(ivec3) AtomicCompareExchange 155(gs_ua3) 69 70 70 168 166 + Store 159(out_u3) 169 + 170: 38(ivec3) Load 156(gs_ub3) + 171: 38(ivec3) AtomicExchange 155(gs_ua3) 69 70 170 + Store 159(out_u3) 171 + 172: 38(ivec3) Load 156(gs_ub3) + 173: 2 AtomicSMax 155(gs_ua3) 69 70 172 + 174: 38(ivec3) Load 156(gs_ub3) + 175: 38(ivec3) AtomicUMax 155(gs_ua3) 69 70 174 + Store 159(out_u3) 175 + 176: 38(ivec3) Load 156(gs_ub3) + 177: 2 AtomicSMin 155(gs_ua3) 69 70 176 + 178: 38(ivec3) Load 156(gs_ub3) + 179: 38(ivec3) AtomicUMin 155(gs_ua3) 69 70 178 + Store 159(out_u3) 179 + 180: 38(ivec3) Load 156(gs_ub3) + 181: 2 AtomicOr 155(gs_ua3) 69 70 180 + 182: 38(ivec3) Load 156(gs_ub3) + 183: 38(ivec3) AtomicOr 155(gs_ua3) 69 70 182 + Store 159(out_u3) 183 + 184: 38(ivec3) Load 156(gs_ub3) + 185: 2 AtomicXor 155(gs_ua3) 69 70 184 + 186: 38(ivec3) Load 156(gs_ub3) + 187: 38(ivec3) AtomicXor 155(gs_ua3) 69 70 186 + Store 159(out_u3) 187 + ReturnValue 189 FunctionEnd 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;): 48(fvec4) Function None 52 53(inF0): 49(ptr) FunctionParameter @@ -1040,45 +1057,46 @@ local_size = (1, 1, 1) 56(inU0): 51(ptr) FunctionParameter 57(inU1): 51(ptr) FunctionParameter 59: Label - 192(out_u4): 51(ptr) Variable Function - 185: 48(fvec4) Load 53(inF0) - 186: 61(bool) All 185 - 190: 50(ivec4) Load 189(gs_ub4) - 191: 2 AtomicIAdd 188(gs_ua4) 67 68 190 - 193: 50(ivec4) Load 189(gs_ub4) - 194: 50(ivec4) AtomicIAdd 188(gs_ua4) 67 68 193 - Store 192(out_u4) 194 - 195: 50(ivec4) Load 189(gs_ub4) - 196: 2 AtomicAnd 188(gs_ua4) 67 68 195 - 197: 50(ivec4) Load 189(gs_ub4) - 198: 50(ivec4) AtomicAnd 188(gs_ua4) 67 68 197 - Store 192(out_u4) 198 - 199: 50(ivec4) Load 189(gs_ub4) - 201: 50(ivec4) Load 200(gs_uc4) - 202: 50(ivec4) AtomicCompareExchange 188(gs_ua4) 67 68 68 201 199 - Store 192(out_u4) 202 - 203: 50(ivec4) Load 189(gs_ub4) - 204: 50(ivec4) AtomicExchange 188(gs_ua4) 67 68 203 - Store 192(out_u4) 204 - 205: 50(ivec4) Load 189(gs_ub4) - 206: 2 AtomicSMax 188(gs_ua4) 67 68 205 - 207: 50(ivec4) Load 189(gs_ub4) - 208: 50(ivec4) AtomicUMax 188(gs_ua4) 67 68 207 - Store 192(out_u4) 208 - 209: 50(ivec4) Load 189(gs_ub4) - 210: 2 AtomicSMin 188(gs_ua4) 67 68 209 - 211: 50(ivec4) Load 189(gs_ub4) - 212: 50(ivec4) AtomicUMin 188(gs_ua4) 67 68 211 - Store 192(out_u4) 212 - 213: 50(ivec4) Load 189(gs_ub4) - 214: 2 AtomicOr 188(gs_ua4) 67 68 213 - 215: 50(ivec4) Load 189(gs_ub4) - 216: 50(ivec4) AtomicOr 188(gs_ua4) 67 68 215 - Store 192(out_u4) 216 - 217: 50(ivec4) Load 189(gs_ub4) - 218: 2 AtomicXor 188(gs_ua4) 67 68 217 - 219: 50(ivec4) Load 189(gs_ub4) - 220: 50(ivec4) AtomicXor 188(gs_ua4) 67 68 219 - Store 192(out_u4) 220 - ReturnValue 222 + 202(out_u4): 51(ptr) Variable Function + 192: 48(fvec4) Load 53(inF0) + 195: 193(bvec4) FOrdNotEqual 192 194 + 196: 61(bool) All 195 + 200: 50(ivec4) Load 199(gs_ub4) + 201: 2 AtomicIAdd 198(gs_ua4) 69 70 200 + 203: 50(ivec4) Load 199(gs_ub4) + 204: 50(ivec4) AtomicIAdd 198(gs_ua4) 69 70 203 + Store 202(out_u4) 204 + 205: 50(ivec4) Load 199(gs_ub4) + 206: 2 AtomicAnd 198(gs_ua4) 69 70 205 + 207: 50(ivec4) Load 199(gs_ub4) + 208: 50(ivec4) AtomicAnd 198(gs_ua4) 69 70 207 + Store 202(out_u4) 208 + 209: 50(ivec4) Load 199(gs_ub4) + 211: 50(ivec4) Load 210(gs_uc4) + 212: 50(ivec4) AtomicCompareExchange 198(gs_ua4) 69 70 70 211 209 + Store 202(out_u4) 212 + 213: 50(ivec4) Load 199(gs_ub4) + 214: 50(ivec4) AtomicExchange 198(gs_ua4) 69 70 213 + Store 202(out_u4) 214 + 215: 50(ivec4) Load 199(gs_ub4) + 216: 2 AtomicSMax 198(gs_ua4) 69 70 215 + 217: 50(ivec4) Load 199(gs_ub4) + 218: 50(ivec4) AtomicUMax 198(gs_ua4) 69 70 217 + Store 202(out_u4) 218 + 219: 50(ivec4) Load 199(gs_ub4) + 220: 2 AtomicSMin 198(gs_ua4) 69 70 219 + 221: 50(ivec4) Load 199(gs_ub4) + 222: 50(ivec4) AtomicUMin 198(gs_ua4) 69 70 221 + Store 202(out_u4) 222 + 223: 50(ivec4) Load 199(gs_ub4) + 224: 2 AtomicOr 198(gs_ua4) 69 70 223 + 225: 50(ivec4) Load 199(gs_ub4) + 226: 50(ivec4) AtomicOr 198(gs_ua4) 69 70 225 + Store 202(out_u4) 226 + 227: 50(ivec4) Load 199(gs_ub4) + 228: 2 AtomicXor 198(gs_ua4) 69 70 227 + 229: 50(ivec4) Load 199(gs_ub4) + 230: 50(ivec4) AtomicXor 198(gs_ua4) 69 70 229 + Store 202(out_u4) 230 + ReturnValue 232 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out index 94b4ad7..20ee222 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out @@ -74,7 +74,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 29 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.double.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.double.frag.out index f08775a..500d1e1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.double.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.double.frag.out @@ -35,28 +35,28 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp double) 0:? 'inDV1a' ( temp double) -0:? 'inDV1a' (layout( location=0) in double) +0:? 'inDV1a' (layout( location=0) flat in double) 0:5 move second child to first child ( temp double) 0:? 'inDV1b' ( temp double) -0:? 'inDV1b' (layout( location=1) in double) +0:? 'inDV1b' (layout( location=1) flat in double) 0:5 move second child to first child ( temp double) 0:? 'inDV1c' ( temp double) -0:? 'inDV1c' (layout( location=2) in double) +0:? 'inDV1c' (layout( location=2) flat in double) 0:5 move second child to first child ( temp 2-component vector of double) 0:? 'inDV2' ( temp 2-component vector of double) -0:? 'inDV2' (layout( location=3) in 2-component vector of double) +0:? 'inDV2' (layout( location=3) flat in 2-component vector of double) 0:5 move second child to first child ( temp 3-component vector of double) 0:? 'inDV3' ( temp 3-component vector of double) -0:? 'inDV3' (layout( location=4) in 3-component vector of double) +0:? 'inDV3' (layout( location=4) flat in 3-component vector of double) 0:5 move second child to first child ( temp 4-component vector of double) 0:? 'inDV4' ( temp 4-component vector of double) -0:? 'inDV4' (layout( location=6) in 4-component vector of double) +0:? 'inDV4' (layout( location=6) flat in 4-component vector of double) 0:5 move second child to first child ( temp uint) 0:? 'inU1a' ( temp uint) -0:? 'inU1a' (layout( location=8) in uint) +0:? 'inU1a' (layout( location=8) flat in uint) 0:5 move second child to first child ( temp uint) 0:? 'inU1b' ( temp uint) -0:? 'inU1b' (layout( location=9) in uint) +0:? 'inU1b' (layout( location=9) flat in uint) 0:5 move second child to first child ( temp float) 0:? '@entryPointOutput' (layout( location=0) out float) 0:5 Function Call: @PixelShaderFunction(d1;d1;d1;vd2;vd3;vd4;u1;u1; ( temp float) @@ -70,14 +70,14 @@ gl_FragCoord origin is upper left 0:? 'inU1b' ( temp uint) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out float) -0:? 'inDV1a' (layout( location=0) in double) -0:? 'inDV1b' (layout( location=1) in double) -0:? 'inDV1c' (layout( location=2) in double) -0:? 'inDV2' (layout( location=3) in 2-component vector of double) -0:? 'inDV3' (layout( location=4) in 3-component vector of double) -0:? 'inDV4' (layout( location=6) in 4-component vector of double) -0:? 'inU1a' (layout( location=8) in uint) -0:? 'inU1b' (layout( location=9) in uint) +0:? 'inDV1a' (layout( location=0) flat in double) +0:? 'inDV1b' (layout( location=1) flat in double) +0:? 'inDV1c' (layout( location=2) flat in double) +0:? 'inDV2' (layout( location=3) flat in 2-component vector of double) +0:? 'inDV3' (layout( location=4) flat in 3-component vector of double) +0:? 'inDV4' (layout( location=6) flat in 4-component vector of double) +0:? 'inU1a' (layout( location=8) flat in uint) +0:? 'inU1b' (layout( location=9) flat in uint) Linked fragment stage: @@ -119,28 +119,28 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp double) 0:? 'inDV1a' ( temp double) -0:? 'inDV1a' (layout( location=0) in double) +0:? 'inDV1a' (layout( location=0) flat in double) 0:5 move second child to first child ( temp double) 0:? 'inDV1b' ( temp double) -0:? 'inDV1b' (layout( location=1) in double) +0:? 'inDV1b' (layout( location=1) flat in double) 0:5 move second child to first child ( temp double) 0:? 'inDV1c' ( temp double) -0:? 'inDV1c' (layout( location=2) in double) +0:? 'inDV1c' (layout( location=2) flat in double) 0:5 move second child to first child ( temp 2-component vector of double) 0:? 'inDV2' ( temp 2-component vector of double) -0:? 'inDV2' (layout( location=3) in 2-component vector of double) +0:? 'inDV2' (layout( location=3) flat in 2-component vector of double) 0:5 move second child to first child ( temp 3-component vector of double) 0:? 'inDV3' ( temp 3-component vector of double) -0:? 'inDV3' (layout( location=4) in 3-component vector of double) +0:? 'inDV3' (layout( location=4) flat in 3-component vector of double) 0:5 move second child to first child ( temp 4-component vector of double) 0:? 'inDV4' ( temp 4-component vector of double) -0:? 'inDV4' (layout( location=6) in 4-component vector of double) +0:? 'inDV4' (layout( location=6) flat in 4-component vector of double) 0:5 move second child to first child ( temp uint) 0:? 'inU1a' ( temp uint) -0:? 'inU1a' (layout( location=8) in uint) +0:? 'inU1a' (layout( location=8) flat in uint) 0:5 move second child to first child ( temp uint) 0:? 'inU1b' ( temp uint) -0:? 'inU1b' (layout( location=9) in uint) +0:? 'inU1b' (layout( location=9) flat in uint) 0:5 move second child to first child ( temp float) 0:? '@entryPointOutput' (layout( location=0) out float) 0:5 Function Call: @PixelShaderFunction(d1;d1;d1;vd2;vd3;vd4;u1;u1; ( temp float) @@ -154,17 +154,17 @@ gl_FragCoord origin is upper left 0:? 'inU1b' ( temp uint) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out float) -0:? 'inDV1a' (layout( location=0) in double) -0:? 'inDV1b' (layout( location=1) in double) -0:? 'inDV1c' (layout( location=2) in double) -0:? 'inDV2' (layout( location=3) in 2-component vector of double) -0:? 'inDV3' (layout( location=4) in 3-component vector of double) -0:? 'inDV4' (layout( location=6) in 4-component vector of double) -0:? 'inU1a' (layout( location=8) in uint) -0:? 'inU1b' (layout( location=9) in uint) +0:? 'inDV1a' (layout( location=0) flat in double) +0:? 'inDV1b' (layout( location=1) flat in double) +0:? 'inDV1c' (layout( location=2) flat in double) +0:? 'inDV2' (layout( location=3) flat in 2-component vector of double) +0:? 'inDV3' (layout( location=4) flat in 3-component vector of double) +0:? 'inDV4' (layout( location=6) flat in 4-component vector of double) +0:? 'inU1a' (layout( location=8) flat in uint) +0:? 'inU1b' (layout( location=9) flat in uint) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 90 Capability Shader @@ -211,13 +211,21 @@ gl_FragCoord origin is upper left Name 83 "param" Name 85 "param" Name 87 "param" + Decorate 44(inDV1a) Flat Decorate 44(inDV1a) Location 0 + Decorate 47(inDV1b) Flat Decorate 47(inDV1b) Location 1 + Decorate 50(inDV1c) Flat Decorate 50(inDV1c) Location 2 + Decorate 54(inDV2) Flat Decorate 54(inDV2) Location 3 + Decorate 58(inDV3) Flat Decorate 58(inDV3) Location 4 + Decorate 62(inDV4) Flat Decorate 62(inDV4) Location 6 + Decorate 66(inU1a) Flat Decorate 66(inU1a) Location 8 + Decorate 69(inU1b) Flat Decorate 69(inU1b) Location 9 Decorate 72(@entryPointOutput) Location 0 2: TypeVoid diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.evalfns.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.evalfns.frag.out index 90a4db5..addaa25 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.evalfns.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.evalfns.frag.out @@ -60,7 +60,7 @@ gl_FragCoord origin is upper left 0:? 'inF4' (layout( location=3) in 4-component vector of float) 0:3 move second child to first child ( temp 2-component vector of int) 0:? 'inI2' ( temp 2-component vector of int) -0:? 'inI2' (layout( location=4) in 2-component vector of int) +0:? 'inI2' (layout( location=4) flat in 2-component vector of int) 0:3 Function Call: @main(f1;vf2;vf3;vf4;vi2; ( temp void) 0:? 'inF1' ( temp float) 0:? 'inF2' ( temp 2-component vector of float) @@ -72,7 +72,7 @@ gl_FragCoord origin is upper left 0:? 'inF2' (layout( location=1) in 2-component vector of float) 0:? 'inF3' (layout( location=2) in 3-component vector of float) 0:? 'inF4' (layout( location=3) in 4-component vector of float) -0:? 'inI2' (layout( location=4) in 2-component vector of int) +0:? 'inI2' (layout( location=4) flat in 2-component vector of int) Linked fragment stage: @@ -139,7 +139,7 @@ gl_FragCoord origin is upper left 0:? 'inF4' (layout( location=3) in 4-component vector of float) 0:3 move second child to first child ( temp 2-component vector of int) 0:? 'inI2' ( temp 2-component vector of int) -0:? 'inI2' (layout( location=4) in 2-component vector of int) +0:? 'inI2' (layout( location=4) flat in 2-component vector of int) 0:3 Function Call: @main(f1;vf2;vf3;vf4;vi2; ( temp void) 0:? 'inF1' ( temp float) 0:? 'inF2' ( temp 2-component vector of float) @@ -151,10 +151,10 @@ gl_FragCoord origin is upper left 0:? 'inF2' (layout( location=1) in 2-component vector of float) 0:? 'inF3' (layout( location=2) in 3-component vector of float) 0:? 'inF4' (layout( location=3) in 4-component vector of float) -0:? 'inI2' (layout( location=4) in 2-component vector of int) +0:? 'inI2' (layout( location=4) flat in 2-component vector of int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 80 Capability Shader @@ -190,6 +190,7 @@ gl_FragCoord origin is upper left Decorate 55(inF2) Location 1 Decorate 59(inF3) Location 2 Decorate 63(inF4) Location 3 + Decorate 67(inI2) Flat Decorate 67(inI2) Location 4 2: TypeVoid 3: TypeFunction 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.f1632.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.f1632.frag.out index e828d96..72520bc 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.f1632.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.f1632.frag.out @@ -260,7 +260,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 103 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.f3216.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.f3216.frag.out index 3ff9ce7..b6d6587 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.f3216.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.f3216.frag.out @@ -270,7 +270,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 106 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.frag.out index 289592a..bac6fab 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.frag.out @@ -2,19 +2,20 @@ hlsl.intrinsics.frag Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:17 Function Definition: PixelShaderFunctionS(f1;f1;f1;u1;u1; ( temp float) +0:17 Function Definition: PixelShaderFunctionS(f1;f1;f1;u1;i1; ( temp float) 0:17 Function Parameters: 0:17 'inF0' ( in float) 0:17 'inF1' ( in float) 0:17 'inF2' ( in float) 0:17 'inU0' ( in uint) -0:17 'inU1' ( in uint) +0:17 'inU1' ( in int) 0:? Sequence 0:20 Sequence 0:20 move second child to first child ( temp bool) 0:20 'r000' ( temp bool) 0:20 all ( temp bool) -0:20 'inF0' ( in float) +0:20 Convert float to bool ( temp bool) +0:20 'inF0' ( in float) 0:21 Sequence 0:21 move second child to first child ( temp float) 0:21 'r001' ( temp float) @@ -29,7 +30,8 @@ gl_FragCoord origin is upper left 0:23 move second child to first child ( temp bool) 0:23 'r003' ( temp bool) 0:23 any ( temp bool) -0:23 'inF0' ( in float) +0:23 Convert float to bool ( temp bool) +0:23 'inF0' ( in float) 0:24 Sequence 0:24 move second child to first child ( temp float) 0:24 'r004' ( temp float) @@ -44,7 +46,7 @@ gl_FragCoord origin is upper left 0:26 move second child to first child ( temp uint) 0:26 'r006' ( temp uint) 0:26 floatBitsToUint ( temp uint) -0:26 'inF0' ( in float) +0:26 'inU1' ( in int) 0:27 Sequence 0:27 move second child to first child ( temp float) 0:27 'r007' ( temp float) @@ -81,2024 +83,2075 @@ gl_FragCoord origin is upper left 0:33 0.000000 0:33 true case 0:33 Branch: Kill -0:34 Sequence -0:34 move second child to first child ( temp float) -0:34 'r014' ( temp float) -0:34 cosine ( temp float) -0:34 'inF0' ( in float) +0:34 Test condition and select ( temp void) +0:34 Condition +0:34 Compare Less Than ( temp bool) +0:34 'r005' ( temp int) +0:34 Constant: +0:34 0 (const int) +0:34 true case +0:34 Branch: Kill 0:35 Sequence 0:35 move second child to first child ( temp float) -0:35 'r015' ( temp float) -0:35 hyp. cosine ( temp float) +0:35 'r014' ( temp float) +0:35 cosine ( temp float) 0:35 'inF0' ( in float) 0:36 Sequence -0:36 move second child to first child ( temp int) -0:36 'r016' ( temp int) -0:36 bitCount ( temp int) -0:36 Constant: -0:36 7 (const int) +0:36 move second child to first child ( temp float) +0:36 'r015' ( temp float) +0:36 hyp. cosine ( temp float) +0:36 'inF0' ( in float) 0:37 Sequence -0:37 move second child to first child ( temp float) -0:37 'r017' ( temp float) -0:37 dPdx ( temp float) -0:37 'inF0' ( in float) +0:37 move second child to first child ( temp int) +0:37 'r016' ( temp int) +0:37 bitCount ( temp int) +0:37 Constant: +0:37 7 (const int) 0:38 Sequence 0:38 move second child to first child ( temp float) -0:38 'r018' ( temp float) -0:38 dPdxCoarse ( temp float) +0:38 'r017' ( temp float) +0:38 dPdx ( temp float) 0:38 'inF0' ( in float) 0:39 Sequence 0:39 move second child to first child ( temp float) -0:39 'r019' ( temp float) -0:39 dPdxFine ( temp float) +0:39 'r018' ( temp float) +0:39 dPdxCoarse ( temp float) 0:39 'inF0' ( in float) 0:40 Sequence 0:40 move second child to first child ( temp float) -0:40 'r020' ( temp float) -0:40 dPdy ( temp float) +0:40 'r019' ( temp float) +0:40 dPdxFine ( temp float) 0:40 'inF0' ( in float) 0:41 Sequence 0:41 move second child to first child ( temp float) -0:41 'r021' ( temp float) -0:41 dPdyCoarse ( temp float) +0:41 'r020' ( temp float) +0:41 dPdy ( temp float) 0:41 'inF0' ( in float) 0:42 Sequence 0:42 move second child to first child ( temp float) -0:42 'r022' ( temp float) -0:42 dPdyFine ( temp float) +0:42 'r021' ( temp float) +0:42 dPdyCoarse ( temp float) 0:42 'inF0' ( in float) 0:43 Sequence 0:43 move second child to first child ( temp float) -0:43 'r023' ( temp float) -0:43 degrees ( temp float) +0:43 'r022' ( temp float) +0:43 dPdyFine ( temp float) 0:43 'inF0' ( in float) -0:47 Sequence -0:47 move second child to first child ( temp float) -0:47 'r027' ( temp float) -0:47 exp ( temp float) -0:47 'inF0' ( in float) +0:44 Sequence +0:44 move second child to first child ( temp float) +0:44 'r023' ( temp float) +0:44 degrees ( temp float) +0:44 'inF0' ( in float) 0:48 Sequence 0:48 move second child to first child ( temp float) -0:48 'r028' ( temp float) -0:48 exp2 ( temp float) +0:48 'r027' ( temp float) +0:48 exp ( temp float) 0:48 'inF0' ( in float) 0:49 Sequence -0:49 move second child to first child ( temp uint) -0:49 'r029' ( temp uint) -0:49 Convert int to uint ( temp uint) -0:49 findMSB ( temp int) -0:49 Constant: -0:49 7 (const int) +0:49 move second child to first child ( temp float) +0:49 'r028' ( temp float) +0:49 exp2 ( temp float) +0:49 'inF0' ( in float) 0:50 Sequence 0:50 move second child to first child ( temp uint) -0:50 'r030' ( temp uint) +0:50 'r029' ( temp uint) 0:50 Convert int to uint ( temp uint) -0:50 findLSB ( temp int) +0:50 findMSB ( temp int) 0:50 Constant: 0:50 7 (const int) 0:51 Sequence -0:51 move second child to first child ( temp float) -0:51 'r031' ( temp float) -0:51 Floor ( temp float) -0:51 'inF0' ( in float) -0:53 Sequence -0:53 move second child to first child ( temp float) -0:53 'r033' ( temp float) -0:53 mod ( temp float) -0:53 'inF0' ( in float) -0:53 'inF1' ( in float) +0:51 move second child to first child ( temp uint) +0:51 'r030' ( temp uint) +0:51 Convert int to uint ( temp uint) +0:51 findLSB ( temp int) +0:51 Constant: +0:51 7 (const int) +0:52 Sequence +0:52 move second child to first child ( temp float) +0:52 'r031' ( temp float) +0:52 Floor ( temp float) +0:52 'inF0' ( in float) 0:54 Sequence 0:54 move second child to first child ( temp float) -0:54 'r034' ( temp float) -0:54 Fraction ( temp float) +0:54 'r033' ( temp float) +0:54 mod ( temp float) 0:54 'inF0' ( in float) +0:54 'inF1' ( in float) 0:55 Sequence 0:55 move second child to first child ( temp float) -0:55 'r036' ( temp float) -0:55 fwidth ( temp float) +0:55 'r034' ( temp float) +0:55 Fraction ( temp float) 0:55 'inF0' ( in float) 0:56 Sequence -0:56 move second child to first child ( temp bool) -0:56 'r037' ( temp bool) -0:56 isinf ( temp bool) +0:56 move second child to first child ( temp float) +0:56 'r036' ( temp float) +0:56 fwidth ( temp float) 0:56 'inF0' ( in float) 0:57 Sequence 0:57 move second child to first child ( temp bool) -0:57 'r038' ( temp bool) -0:57 isnan ( temp bool) +0:57 'r037' ( temp bool) +0:57 isinf ( temp bool) 0:57 'inF0' ( in float) 0:58 Sequence -0:58 move second child to first child ( temp float) -0:58 'r039' ( temp float) -0:58 ldexp ( temp float) +0:58 move second child to first child ( temp bool) +0:58 'r038' ( temp bool) +0:58 isnan ( temp bool) 0:58 'inF0' ( in float) -0:58 'inF1' ( in float) 0:59 Sequence 0:59 move second child to first child ( temp float) -0:59 'r039a' ( temp float) -0:59 mix ( temp float) +0:59 'r039' ( temp float) +0:59 ldexp ( temp float) 0:59 'inF0' ( in float) 0:59 'inF1' ( in float) -0:59 'inF2' ( in float) 0:60 Sequence 0:60 move second child to first child ( temp float) -0:60 'r040' ( temp float) -0:60 log ( temp float) +0:60 'r039a' ( temp float) +0:60 mix ( temp float) 0:60 'inF0' ( in float) +0:60 'inF1' ( in float) +0:60 'inF2' ( in float) 0:61 Sequence 0:61 move second child to first child ( temp float) -0:61 'r041' ( temp float) -0:61 component-wise multiply ( temp float) -0:61 log2 ( temp float) -0:61 'inF0' ( in float) -0:61 Constant: -0:61 0.301030 +0:61 'r040' ( temp float) +0:61 log ( temp float) +0:61 'inF0' ( in float) 0:62 Sequence 0:62 move second child to first child ( temp float) -0:62 'r042' ( temp float) -0:62 log2 ( temp float) -0:62 'inF0' ( in float) +0:62 'r041' ( temp float) +0:62 component-wise multiply ( temp float) +0:62 log2 ( temp float) +0:62 'inF0' ( in float) +0:62 Constant: +0:62 0.301030 0:63 Sequence 0:63 move second child to first child ( temp float) -0:63 'r043' ( temp float) -0:63 max ( temp float) +0:63 'r042' ( temp float) +0:63 log2 ( temp float) 0:63 'inF0' ( in float) -0:63 'inF1' ( in float) 0:64 Sequence 0:64 move second child to first child ( temp float) -0:64 'r044' ( temp float) -0:64 min ( temp float) +0:64 'r043' ( temp float) +0:64 max ( temp float) 0:64 'inF0' ( in float) 0:64 'inF1' ( in float) 0:65 Sequence 0:65 move second child to first child ( temp float) -0:65 'r045' ( temp float) -0:65 pow ( temp float) +0:65 'r044' ( temp float) +0:65 min ( temp float) 0:65 'inF0' ( in float) 0:65 'inF1' ( in float) 0:66 Sequence 0:66 move second child to first child ( temp float) -0:66 'r046' ( temp float) -0:66 radians ( temp float) +0:66 'r045' ( temp float) +0:66 pow ( temp float) 0:66 'inF0' ( in float) +0:66 'inF1' ( in float) 0:67 Sequence 0:67 move second child to first child ( temp float) -0:67 'r047' ( temp float) -0:67 divide ( temp float) -0:67 Constant: -0:67 1.000000 +0:67 'r046' ( temp float) +0:67 radians ( temp float) 0:67 'inF0' ( in float) 0:68 Sequence -0:68 move second child to first child ( temp uint) -0:68 'r048' ( temp uint) -0:68 Convert int to uint ( temp uint) -0:68 bitFieldReverse ( temp int) -0:68 Constant: -0:68 2 (const int) +0:68 move second child to first child ( temp float) +0:68 'r047' ( temp float) +0:68 divide ( temp float) +0:68 Constant: +0:68 1.000000 +0:68 'inF0' ( in float) 0:69 Sequence -0:69 move second child to first child ( temp float) -0:69 'r049' ( temp float) -0:69 roundEven ( temp float) -0:69 'inF0' ( in float) +0:69 move second child to first child ( temp uint) +0:69 'r048' ( temp uint) +0:69 Convert int to uint ( temp uint) +0:69 bitFieldReverse ( temp int) +0:69 Constant: +0:69 2 (const int) 0:70 Sequence 0:70 move second child to first child ( temp float) -0:70 'r050' ( temp float) -0:70 inverse sqrt ( temp float) +0:70 'r049' ( temp float) +0:70 roundEven ( temp float) 0:70 'inF0' ( in float) 0:71 Sequence 0:71 move second child to first child ( temp float) -0:71 'r051' ( temp float) -0:71 clamp ( temp float) +0:71 'r050' ( temp float) +0:71 inverse sqrt ( temp float) 0:71 'inF0' ( in float) -0:71 Constant: -0:71 0.000000 -0:71 Constant: -0:71 1.000000 0:72 Sequence 0:72 move second child to first child ( temp float) -0:72 'r052' ( temp float) -0:72 Sign ( temp float) +0:72 'r051' ( temp float) +0:72 clamp ( temp float) 0:72 'inF0' ( in float) +0:72 Constant: +0:72 0.000000 +0:72 Constant: +0:72 1.000000 0:73 Sequence 0:73 move second child to first child ( temp float) -0:73 'r053' ( temp float) -0:73 sine ( temp float) +0:73 'r052' ( temp float) +0:73 Sign ( temp float) 0:73 'inF0' ( in float) 0:74 Sequence 0:74 move second child to first child ( temp float) -0:74 'inF1' ( in float) +0:74 'r053' ( temp float) 0:74 sine ( temp float) 0:74 'inF0' ( in float) -0:74 move second child to first child ( temp float) -0:74 'inF2' ( in float) -0:74 cosine ( temp float) -0:74 'inF0' ( in float) 0:75 Sequence 0:75 move second child to first child ( temp float) -0:75 'r055' ( temp float) -0:75 hyp. sine ( temp float) +0:75 'inF1' ( in float) +0:75 sine ( temp float) +0:75 'inF0' ( in float) +0:75 move second child to first child ( temp float) +0:75 'inF2' ( in float) +0:75 cosine ( temp float) 0:75 'inF0' ( in float) 0:76 Sequence 0:76 move second child to first child ( temp float) -0:76 'r056' ( temp float) -0:76 smoothstep ( temp float) +0:76 'r055' ( temp float) +0:76 hyp. sine ( temp float) 0:76 'inF0' ( in float) -0:76 'inF1' ( in float) -0:76 'inF2' ( in float) 0:77 Sequence 0:77 move second child to first child ( temp float) -0:77 'r057' ( temp float) -0:77 sqrt ( temp float) +0:77 'r056' ( temp float) +0:77 smoothstep ( temp float) 0:77 'inF0' ( in float) +0:77 'inF1' ( in float) +0:77 'inF2' ( in float) 0:78 Sequence 0:78 move second child to first child ( temp float) -0:78 'r058' ( temp float) -0:78 step ( temp float) +0:78 'r057' ( temp float) +0:78 sqrt ( temp float) 0:78 'inF0' ( in float) -0:78 'inF1' ( in float) 0:79 Sequence 0:79 move second child to first child ( temp float) -0:79 'r059' ( temp float) -0:79 tangent ( temp float) +0:79 'r058' ( temp float) +0:79 step ( temp float) 0:79 'inF0' ( in float) +0:79 'inF1' ( in float) 0:80 Sequence 0:80 move second child to first child ( temp float) -0:80 'r060' ( temp float) -0:80 hyp. tangent ( temp float) +0:80 'r059' ( temp float) +0:80 tangent ( temp float) 0:80 'inF0' ( in float) -0:82 Sequence -0:82 move second child to first child ( temp float) -0:82 'r061' ( temp float) -0:82 trunc ( temp float) -0:82 'inF0' ( in float) -0:84 Branch: Return with expression -0:84 Constant: -0:84 0.000000 -0:88 Function Definition: PixelShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) -0:88 Function Parameters: -0:88 'inF0' ( in 1-component vector of float) -0:88 'inF1' ( in 1-component vector of float) -0:88 'inF2' ( in 1-component vector of float) +0:81 Sequence +0:81 move second child to first child ( temp float) +0:81 'r060' ( temp float) +0:81 hyp. tangent ( temp float) +0:81 'inF0' ( in float) +0:83 Sequence +0:83 move second child to first child ( temp float) +0:83 'r061' ( temp float) +0:83 trunc ( temp float) +0:83 'inF0' ( in float) +0:85 Branch: Return with expression +0:85 Constant: +0:85 0.000000 +0:89 Function Definition: PixelShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) +0:89 Function Parameters: +0:89 'inF0' ( in 1-component vector of float) +0:89 'inF1' ( in 1-component vector of float) +0:89 'inF2' ( in 1-component vector of float) 0:? Sequence -0:90 Branch: Return with expression -0:90 Constant: -0:90 0.000000 -0:94 Function Definition: PixelShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) -0:94 Function Parameters: -0:94 'inF0' ( in 2-component vector of float) -0:94 'inF1' ( in 2-component vector of float) -0:94 'inF2' ( in 2-component vector of float) -0:94 'inU0' ( in 2-component vector of uint) -0:94 'inU1' ( in 2-component vector of uint) +0:91 Branch: Return with expression +0:91 Constant: +0:91 0.000000 +0:95 Function Definition: PixelShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) +0:95 Function Parameters: +0:95 'inF0' ( in 2-component vector of float) +0:95 'inF1' ( in 2-component vector of float) +0:95 'inF2' ( in 2-component vector of float) +0:95 'inU0' ( in 2-component vector of uint) +0:95 'inU1' ( in 2-component vector of uint) 0:? Sequence -0:97 Sequence -0:97 move second child to first child ( temp bool) -0:97 'r000' ( temp bool) -0:97 all ( temp bool) -0:97 'inF0' ( in 2-component vector of float) 0:98 Sequence -0:98 move second child to first child ( temp 2-component vector of float) -0:98 'r001' ( temp 2-component vector of float) -0:98 Absolute value ( temp 2-component vector of float) -0:98 'inF0' ( in 2-component vector of float) +0:98 move second child to first child ( temp bool) +0:98 'r000' ( temp bool) +0:98 all ( temp bool) +0:98 Convert float to bool ( temp 2-component vector of bool) +0:98 'inF0' ( in 2-component vector of float) 0:99 Sequence 0:99 move second child to first child ( temp 2-component vector of float) -0:99 'r002' ( temp 2-component vector of float) -0:99 arc cosine ( temp 2-component vector of float) +0:99 'r001' ( temp 2-component vector of float) +0:99 Absolute value ( temp 2-component vector of float) 0:99 'inF0' ( in 2-component vector of float) 0:100 Sequence -0:100 move second child to first child ( temp bool) -0:100 'r003' ( temp bool) -0:100 any ( temp bool) +0:100 move second child to first child ( temp 2-component vector of float) +0:100 'r002' ( temp 2-component vector of float) +0:100 arc cosine ( temp 2-component vector of float) 0:100 'inF0' ( in 2-component vector of float) 0:101 Sequence -0:101 move second child to first child ( temp 2-component vector of float) -0:101 'r004' ( temp 2-component vector of float) -0:101 arc sine ( temp 2-component vector of float) -0:101 'inF0' ( in 2-component vector of float) +0:101 move second child to first child ( temp bool) +0:101 'r003' ( temp bool) +0:101 any ( temp bool) +0:101 Convert float to bool ( temp 2-component vector of bool) +0:101 'inF0' ( in 2-component vector of float) 0:102 Sequence -0:102 move second child to first child ( temp 2-component vector of int) -0:102 'r005' ( temp 2-component vector of int) -0:102 floatBitsToInt ( temp 2-component vector of int) +0:102 move second child to first child ( temp 2-component vector of float) +0:102 'r004' ( temp 2-component vector of float) +0:102 arc sine ( temp 2-component vector of float) 0:102 'inF0' ( in 2-component vector of float) 0:103 Sequence -0:103 move second child to first child ( temp 2-component vector of uint) -0:103 'r006' ( temp 2-component vector of uint) -0:103 floatBitsToUint ( temp 2-component vector of uint) +0:103 move second child to first child ( temp 2-component vector of int) +0:103 'r005' ( temp 2-component vector of int) +0:103 floatBitsToInt ( temp 2-component vector of int) 0:103 'inF0' ( in 2-component vector of float) 0:104 Sequence -0:104 move second child to first child ( temp 2-component vector of float) -0:104 'r007' ( temp 2-component vector of float) -0:104 intBitsToFloat ( temp 2-component vector of float) -0:104 'inU0' ( in 2-component vector of uint) -0:106 Sequence -0:106 move second child to first child ( temp 2-component vector of float) -0:106 'r009' ( temp 2-component vector of float) -0:106 arc tangent ( temp 2-component vector of float) -0:106 'inF0' ( in 2-component vector of float) +0:104 move second child to first child ( temp 2-component vector of uint) +0:104 'r006' ( temp 2-component vector of uint) +0:104 floatBitsToUint ( temp 2-component vector of uint) +0:104 'inF0' ( in 2-component vector of float) +0:105 Sequence +0:105 move second child to first child ( temp 2-component vector of float) +0:105 'r007' ( temp 2-component vector of float) +0:105 intBitsToFloat ( temp 2-component vector of float) +0:105 'inU0' ( in 2-component vector of uint) 0:107 Sequence 0:107 move second child to first child ( temp 2-component vector of float) -0:107 'r010' ( temp 2-component vector of float) +0:107 'r009' ( temp 2-component vector of float) 0:107 arc tangent ( temp 2-component vector of float) 0:107 'inF0' ( in 2-component vector of float) -0:107 'inF1' ( in 2-component vector of float) 0:108 Sequence 0:108 move second child to first child ( temp 2-component vector of float) -0:108 'r011' ( temp 2-component vector of float) -0:108 Ceiling ( temp 2-component vector of float) +0:108 'r010' ( temp 2-component vector of float) +0:108 arc tangent ( temp 2-component vector of float) 0:108 'inF0' ( in 2-component vector of float) +0:108 'inF1' ( in 2-component vector of float) 0:109 Sequence 0:109 move second child to first child ( temp 2-component vector of float) -0:109 'r012' ( temp 2-component vector of float) -0:109 clamp ( temp 2-component vector of float) +0:109 'r011' ( temp 2-component vector of float) +0:109 Ceiling ( temp 2-component vector of float) 0:109 'inF0' ( in 2-component vector of float) -0:109 'inF1' ( in 2-component vector of float) -0:109 'inF2' ( in 2-component vector of float) -0:110 Test condition and select ( temp void) -0:110 Condition -0:110 any ( temp bool) -0:110 Compare Less Than ( temp 2-component vector of bool) +0:110 Sequence +0:110 move second child to first child ( temp 2-component vector of float) +0:110 'r012' ( temp 2-component vector of float) +0:110 clamp ( temp 2-component vector of float) 0:110 'inF0' ( in 2-component vector of float) -0:110 Constant: -0:110 0.000000 -0:110 0.000000 -0:110 true case -0:110 Branch: Kill -0:111 Sequence -0:111 move second child to first child ( temp 2-component vector of float) -0:111 'r013' ( temp 2-component vector of float) -0:111 cosine ( temp 2-component vector of float) +0:110 'inF1' ( in 2-component vector of float) +0:110 'inF2' ( in 2-component vector of float) +0:111 Test condition and select ( temp void) +0:111 Condition +0:111 any ( temp bool) +0:111 Compare Less Than ( temp 2-component vector of bool) 0:111 'inF0' ( in 2-component vector of float) -0:112 Sequence -0:112 move second child to first child ( temp 2-component vector of float) -0:112 'r015' ( temp 2-component vector of float) -0:112 hyp. cosine ( temp 2-component vector of float) -0:112 'inF0' ( in 2-component vector of float) +0:111 Constant: +0:111 0.000000 +0:111 0.000000 +0:111 true case +0:111 Branch: Kill +0:112 Test condition and select ( temp void) +0:112 Condition +0:112 any ( temp bool) +0:112 Compare Less Than ( temp 2-component vector of bool) +0:112 'inU0' ( in 2-component vector of uint) +0:112 Constant: +0:112 0.000000 +0:112 0.000000 +0:112 true case +0:112 Branch: Kill 0:113 Sequence -0:113 move second child to first child ( temp 2-component vector of int) -0:113 'r016' ( temp 2-component vector of int) +0:113 move second child to first child ( temp 2-component vector of float) +0:113 'r013' ( temp 2-component vector of float) +0:113 cosine ( temp 2-component vector of float) +0:113 'inF0' ( in 2-component vector of float) +0:114 Sequence +0:114 move second child to first child ( temp 2-component vector of float) +0:114 'r015' ( temp 2-component vector of float) +0:114 hyp. cosine ( temp 2-component vector of float) +0:114 'inF0' ( in 2-component vector of float) +0:115 Sequence +0:115 move second child to first child ( temp 2-component vector of int) +0:115 'r016' ( temp 2-component vector of int) 0:? bitCount ( temp 2-component vector of int) 0:? Constant: 0:? 7 (const int) 0:? 3 (const int) -0:114 Sequence -0:114 move second child to first child ( temp 2-component vector of float) -0:114 'r017' ( temp 2-component vector of float) -0:114 dPdx ( temp 2-component vector of float) -0:114 'inF0' ( in 2-component vector of float) -0:115 Sequence -0:115 move second child to first child ( temp 2-component vector of float) -0:115 'r018' ( temp 2-component vector of float) -0:115 dPdxCoarse ( temp 2-component vector of float) -0:115 'inF0' ( in 2-component vector of float) 0:116 Sequence 0:116 move second child to first child ( temp 2-component vector of float) -0:116 'r019' ( temp 2-component vector of float) -0:116 dPdxFine ( temp 2-component vector of float) +0:116 'r017' ( temp 2-component vector of float) +0:116 dPdx ( temp 2-component vector of float) 0:116 'inF0' ( in 2-component vector of float) 0:117 Sequence 0:117 move second child to first child ( temp 2-component vector of float) -0:117 'r020' ( temp 2-component vector of float) -0:117 dPdy ( temp 2-component vector of float) +0:117 'r018' ( temp 2-component vector of float) +0:117 dPdxCoarse ( temp 2-component vector of float) 0:117 'inF0' ( in 2-component vector of float) 0:118 Sequence 0:118 move second child to first child ( temp 2-component vector of float) -0:118 'r021' ( temp 2-component vector of float) -0:118 dPdyCoarse ( temp 2-component vector of float) +0:118 'r019' ( temp 2-component vector of float) +0:118 dPdxFine ( temp 2-component vector of float) 0:118 'inF0' ( in 2-component vector of float) 0:119 Sequence 0:119 move second child to first child ( temp 2-component vector of float) -0:119 'r022' ( temp 2-component vector of float) -0:119 dPdyFine ( temp 2-component vector of float) +0:119 'r020' ( temp 2-component vector of float) +0:119 dPdy ( temp 2-component vector of float) 0:119 'inF0' ( in 2-component vector of float) 0:120 Sequence 0:120 move second child to first child ( temp 2-component vector of float) -0:120 'r023' ( temp 2-component vector of float) -0:120 degrees ( temp 2-component vector of float) +0:120 'r021' ( temp 2-component vector of float) +0:120 dPdyCoarse ( temp 2-component vector of float) 0:120 'inF0' ( in 2-component vector of float) -0:124 Sequence -0:124 move second child to first child ( temp float) -0:124 'r026' ( temp float) -0:124 distance ( temp float) -0:124 'inF0' ( in 2-component vector of float) -0:124 'inF1' ( in 2-component vector of float) -0:125 Sequence -0:125 move second child to first child ( temp float) -0:125 'r027' ( temp float) -0:125 dot-product ( temp float) -0:125 'inF0' ( in 2-component vector of float) -0:125 'inF1' ( in 2-component vector of float) -0:129 Sequence -0:129 move second child to first child ( temp 2-component vector of float) -0:129 'r028' ( temp 2-component vector of float) -0:129 exp ( temp 2-component vector of float) -0:129 'inF0' ( in 2-component vector of float) -0:130 Sequence -0:130 move second child to first child ( temp 2-component vector of float) -0:130 'r029' ( temp 2-component vector of float) -0:130 exp2 ( temp 2-component vector of float) -0:130 'inF0' ( in 2-component vector of float) +0:121 Sequence +0:121 move second child to first child ( temp 2-component vector of float) +0:121 'r022' ( temp 2-component vector of float) +0:121 dPdyFine ( temp 2-component vector of float) +0:121 'inF0' ( in 2-component vector of float) +0:122 Sequence +0:122 move second child to first child ( temp 2-component vector of float) +0:122 'r023' ( temp 2-component vector of float) +0:122 degrees ( temp 2-component vector of float) +0:122 'inF0' ( in 2-component vector of float) +0:126 Sequence +0:126 move second child to first child ( temp float) +0:126 'r026' ( temp float) +0:126 distance ( temp float) +0:126 'inF0' ( in 2-component vector of float) +0:126 'inF1' ( in 2-component vector of float) +0:127 Sequence +0:127 move second child to first child ( temp float) +0:127 'r027' ( temp float) +0:127 dot-product ( temp float) +0:127 'inF0' ( in 2-component vector of float) +0:127 'inF1' ( in 2-component vector of float) 0:131 Sequence 0:131 move second child to first child ( temp 2-component vector of float) -0:131 'r030' ( temp 2-component vector of float) -0:131 face-forward ( temp 2-component vector of float) +0:131 'r028' ( temp 2-component vector of float) +0:131 exp ( temp 2-component vector of float) 0:131 'inF0' ( in 2-component vector of float) -0:131 'inF1' ( in 2-component vector of float) -0:131 'inF2' ( in 2-component vector of float) 0:132 Sequence -0:132 move second child to first child ( temp 2-component vector of uint) -0:132 'r031' ( temp 2-component vector of uint) +0:132 move second child to first child ( temp 2-component vector of float) +0:132 'r029' ( temp 2-component vector of float) +0:132 exp2 ( temp 2-component vector of float) +0:132 'inF0' ( in 2-component vector of float) +0:133 Sequence +0:133 move second child to first child ( temp 2-component vector of float) +0:133 'r030' ( temp 2-component vector of float) +0:133 face-forward ( temp 2-component vector of float) +0:133 'inF0' ( in 2-component vector of float) +0:133 'inF1' ( in 2-component vector of float) +0:133 'inF2' ( in 2-component vector of float) +0:134 Sequence +0:134 move second child to first child ( temp 2-component vector of uint) +0:134 'r031' ( temp 2-component vector of uint) 0:? findMSB ( temp 2-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 8 (const uint) -0:133 Sequence -0:133 move second child to first child ( temp 2-component vector of uint) -0:133 'r032' ( temp 2-component vector of uint) +0:135 Sequence +0:135 move second child to first child ( temp 2-component vector of uint) +0:135 'r032' ( temp 2-component vector of uint) 0:? findLSB ( temp 2-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 8 (const uint) -0:134 Sequence -0:134 move second child to first child ( temp 2-component vector of float) -0:134 'r033' ( temp 2-component vector of float) -0:134 Floor ( temp 2-component vector of float) -0:134 'inF0' ( in 2-component vector of float) 0:136 Sequence 0:136 move second child to first child ( temp 2-component vector of float) -0:136 'r035' ( temp 2-component vector of float) -0:136 mod ( temp 2-component vector of float) +0:136 'r033' ( temp 2-component vector of float) +0:136 Floor ( temp 2-component vector of float) 0:136 'inF0' ( in 2-component vector of float) -0:136 'inF1' ( in 2-component vector of float) -0:137 Sequence -0:137 move second child to first child ( temp 2-component vector of float) -0:137 'r036' ( temp 2-component vector of float) -0:137 Fraction ( temp 2-component vector of float) -0:137 'inF0' ( in 2-component vector of float) 0:138 Sequence 0:138 move second child to first child ( temp 2-component vector of float) -0:138 'r038' ( temp 2-component vector of float) -0:138 fwidth ( temp 2-component vector of float) +0:138 'r035' ( temp 2-component vector of float) +0:138 mod ( temp 2-component vector of float) 0:138 'inF0' ( in 2-component vector of float) +0:138 'inF1' ( in 2-component vector of float) 0:139 Sequence -0:139 move second child to first child ( temp 2-component vector of bool) -0:139 'r039' ( temp 2-component vector of bool) -0:139 isinf ( temp 2-component vector of bool) +0:139 move second child to first child ( temp 2-component vector of float) +0:139 'r036' ( temp 2-component vector of float) +0:139 Fraction ( temp 2-component vector of float) 0:139 'inF0' ( in 2-component vector of float) 0:140 Sequence -0:140 move second child to first child ( temp 2-component vector of bool) -0:140 'r040' ( temp 2-component vector of bool) -0:140 isnan ( temp 2-component vector of bool) +0:140 move second child to first child ( temp 2-component vector of float) +0:140 'r038' ( temp 2-component vector of float) +0:140 fwidth ( temp 2-component vector of float) 0:140 'inF0' ( in 2-component vector of float) 0:141 Sequence -0:141 move second child to first child ( temp 2-component vector of float) -0:141 'r041' ( temp 2-component vector of float) -0:141 ldexp ( temp 2-component vector of float) +0:141 move second child to first child ( temp 2-component vector of bool) +0:141 'r039' ( temp 2-component vector of bool) +0:141 isinf ( temp 2-component vector of bool) 0:141 'inF0' ( in 2-component vector of float) -0:141 'inF1' ( in 2-component vector of float) 0:142 Sequence -0:142 move second child to first child ( temp 2-component vector of float) -0:142 'r039a' ( temp 2-component vector of float) -0:142 mix ( temp 2-component vector of float) +0:142 move second child to first child ( temp 2-component vector of bool) +0:142 'r040' ( temp 2-component vector of bool) +0:142 isnan ( temp 2-component vector of bool) 0:142 'inF0' ( in 2-component vector of float) -0:142 'inF1' ( in 2-component vector of float) -0:142 'inF2' ( in 2-component vector of float) 0:143 Sequence -0:143 move second child to first child ( temp float) -0:143 'r042' ( temp float) -0:143 length ( temp float) +0:143 move second child to first child ( temp 2-component vector of float) +0:143 'r041' ( temp 2-component vector of float) +0:143 ldexp ( temp 2-component vector of float) 0:143 'inF0' ( in 2-component vector of float) +0:143 'inF1' ( in 2-component vector of float) 0:144 Sequence 0:144 move second child to first child ( temp 2-component vector of float) -0:144 'r043' ( temp 2-component vector of float) -0:144 log ( temp 2-component vector of float) +0:144 'r039a' ( temp 2-component vector of float) +0:144 mix ( temp 2-component vector of float) 0:144 'inF0' ( in 2-component vector of float) +0:144 'inF1' ( in 2-component vector of float) +0:144 'inF2' ( in 2-component vector of float) 0:145 Sequence -0:145 move second child to first child ( temp 2-component vector of float) -0:145 'r044' ( temp 2-component vector of float) -0:145 vector-scale ( temp 2-component vector of float) -0:145 log2 ( temp 2-component vector of float) -0:145 'inF0' ( in 2-component vector of float) -0:145 Constant: -0:145 0.301030 +0:145 move second child to first child ( temp float) +0:145 'r042' ( temp float) +0:145 length ( temp float) +0:145 'inF0' ( in 2-component vector of float) 0:146 Sequence 0:146 move second child to first child ( temp 2-component vector of float) -0:146 'r045' ( temp 2-component vector of float) -0:146 log2 ( temp 2-component vector of float) +0:146 'r043' ( temp 2-component vector of float) +0:146 log ( temp 2-component vector of float) 0:146 'inF0' ( in 2-component vector of float) 0:147 Sequence 0:147 move second child to first child ( temp 2-component vector of float) -0:147 'r046' ( temp 2-component vector of float) -0:147 max ( temp 2-component vector of float) -0:147 'inF0' ( in 2-component vector of float) -0:147 'inF1' ( in 2-component vector of float) +0:147 'r044' ( temp 2-component vector of float) +0:147 vector-scale ( temp 2-component vector of float) +0:147 log2 ( temp 2-component vector of float) +0:147 'inF0' ( in 2-component vector of float) +0:147 Constant: +0:147 0.301030 0:148 Sequence 0:148 move second child to first child ( temp 2-component vector of float) -0:148 'r047' ( temp 2-component vector of float) -0:148 min ( temp 2-component vector of float) +0:148 'r045' ( temp 2-component vector of float) +0:148 log2 ( temp 2-component vector of float) 0:148 'inF0' ( in 2-component vector of float) -0:148 'inF1' ( in 2-component vector of float) 0:149 Sequence 0:149 move second child to first child ( temp 2-component vector of float) -0:149 'r048' ( temp 2-component vector of float) -0:149 normalize ( temp 2-component vector of float) +0:149 'r046' ( temp 2-component vector of float) +0:149 max ( temp 2-component vector of float) 0:149 'inF0' ( in 2-component vector of float) +0:149 'inF1' ( in 2-component vector of float) 0:150 Sequence 0:150 move second child to first child ( temp 2-component vector of float) -0:150 'r049' ( temp 2-component vector of float) -0:150 pow ( temp 2-component vector of float) +0:150 'r047' ( temp 2-component vector of float) +0:150 min ( temp 2-component vector of float) 0:150 'inF0' ( in 2-component vector of float) 0:150 'inF1' ( in 2-component vector of float) 0:151 Sequence 0:151 move second child to first child ( temp 2-component vector of float) -0:151 'r050' ( temp 2-component vector of float) -0:151 radians ( temp 2-component vector of float) +0:151 'r048' ( temp 2-component vector of float) +0:151 normalize ( temp 2-component vector of float) 0:151 'inF0' ( in 2-component vector of float) 0:152 Sequence 0:152 move second child to first child ( temp 2-component vector of float) -0:152 'r051' ( temp 2-component vector of float) -0:152 divide ( temp 2-component vector of float) -0:152 Constant: -0:152 1.000000 +0:152 'r049' ( temp 2-component vector of float) +0:152 pow ( temp 2-component vector of float) 0:152 'inF0' ( in 2-component vector of float) +0:152 'inF1' ( in 2-component vector of float) 0:153 Sequence 0:153 move second child to first child ( temp 2-component vector of float) -0:153 'r052' ( temp 2-component vector of float) -0:153 reflect ( temp 2-component vector of float) +0:153 'r050' ( temp 2-component vector of float) +0:153 radians ( temp 2-component vector of float) 0:153 'inF0' ( in 2-component vector of float) -0:153 'inF1' ( in 2-component vector of float) 0:154 Sequence 0:154 move second child to first child ( temp 2-component vector of float) -0:154 'r053' ( temp 2-component vector of float) -0:154 refract ( temp 2-component vector of float) -0:154 'inF0' ( in 2-component vector of float) -0:154 'inF1' ( in 2-component vector of float) +0:154 'r051' ( temp 2-component vector of float) +0:154 divide ( temp 2-component vector of float) 0:154 Constant: -0:154 2.000000 +0:154 1.000000 +0:154 'inF0' ( in 2-component vector of float) 0:155 Sequence -0:155 move second child to first child ( temp 2-component vector of uint) -0:155 'r054' ( temp 2-component vector of uint) +0:155 move second child to first child ( temp 2-component vector of float) +0:155 'r052' ( temp 2-component vector of float) +0:155 reflect ( temp 2-component vector of float) +0:155 'inF0' ( in 2-component vector of float) +0:155 'inF1' ( in 2-component vector of float) +0:156 Sequence +0:156 move second child to first child ( temp 2-component vector of float) +0:156 'r053' ( temp 2-component vector of float) +0:156 refract ( temp 2-component vector of float) +0:156 'inF0' ( in 2-component vector of float) +0:156 'inF1' ( in 2-component vector of float) +0:156 Constant: +0:156 2.000000 +0:157 Sequence +0:157 move second child to first child ( temp 2-component vector of uint) +0:157 'r054' ( temp 2-component vector of uint) 0:? bitFieldReverse ( temp 2-component vector of uint) 0:? Constant: 0:? 1 (const uint) 0:? 2 (const uint) -0:156 Sequence -0:156 move second child to first child ( temp 2-component vector of float) -0:156 'r055' ( temp 2-component vector of float) -0:156 roundEven ( temp 2-component vector of float) -0:156 'inF0' ( in 2-component vector of float) -0:157 Sequence -0:157 move second child to first child ( temp 2-component vector of float) -0:157 'r056' ( temp 2-component vector of float) -0:157 inverse sqrt ( temp 2-component vector of float) -0:157 'inF0' ( in 2-component vector of float) 0:158 Sequence 0:158 move second child to first child ( temp 2-component vector of float) -0:158 'r057' ( temp 2-component vector of float) -0:158 clamp ( temp 2-component vector of float) +0:158 'r055' ( temp 2-component vector of float) +0:158 roundEven ( temp 2-component vector of float) 0:158 'inF0' ( in 2-component vector of float) -0:158 Constant: -0:158 0.000000 -0:158 Constant: -0:158 1.000000 0:159 Sequence 0:159 move second child to first child ( temp 2-component vector of float) -0:159 'r058' ( temp 2-component vector of float) -0:159 Sign ( temp 2-component vector of float) +0:159 'r056' ( temp 2-component vector of float) +0:159 inverse sqrt ( temp 2-component vector of float) 0:159 'inF0' ( in 2-component vector of float) 0:160 Sequence 0:160 move second child to first child ( temp 2-component vector of float) -0:160 'r059' ( temp 2-component vector of float) -0:160 sine ( temp 2-component vector of float) +0:160 'r057' ( temp 2-component vector of float) +0:160 clamp ( temp 2-component vector of float) 0:160 'inF0' ( in 2-component vector of float) +0:160 Constant: +0:160 0.000000 +0:160 Constant: +0:160 1.000000 0:161 Sequence 0:161 move second child to first child ( temp 2-component vector of float) -0:161 'inF1' ( in 2-component vector of float) -0:161 sine ( temp 2-component vector of float) -0:161 'inF0' ( in 2-component vector of float) -0:161 move second child to first child ( temp 2-component vector of float) -0:161 'inF2' ( in 2-component vector of float) -0:161 cosine ( temp 2-component vector of float) +0:161 'r058' ( temp 2-component vector of float) +0:161 Sign ( temp 2-component vector of float) 0:161 'inF0' ( in 2-component vector of float) 0:162 Sequence 0:162 move second child to first child ( temp 2-component vector of float) -0:162 'r060' ( temp 2-component vector of float) -0:162 hyp. sine ( temp 2-component vector of float) +0:162 'r059' ( temp 2-component vector of float) +0:162 sine ( temp 2-component vector of float) 0:162 'inF0' ( in 2-component vector of float) 0:163 Sequence 0:163 move second child to first child ( temp 2-component vector of float) -0:163 'r061' ( temp 2-component vector of float) -0:163 smoothstep ( temp 2-component vector of float) +0:163 'inF1' ( in 2-component vector of float) +0:163 sine ( temp 2-component vector of float) +0:163 'inF0' ( in 2-component vector of float) +0:163 move second child to first child ( temp 2-component vector of float) +0:163 'inF2' ( in 2-component vector of float) +0:163 cosine ( temp 2-component vector of float) 0:163 'inF0' ( in 2-component vector of float) -0:163 'inF1' ( in 2-component vector of float) -0:163 'inF2' ( in 2-component vector of float) 0:164 Sequence 0:164 move second child to first child ( temp 2-component vector of float) -0:164 'r062' ( temp 2-component vector of float) -0:164 sqrt ( temp 2-component vector of float) +0:164 'r060' ( temp 2-component vector of float) +0:164 hyp. sine ( temp 2-component vector of float) 0:164 'inF0' ( in 2-component vector of float) 0:165 Sequence 0:165 move second child to first child ( temp 2-component vector of float) -0:165 'r063' ( temp 2-component vector of float) -0:165 step ( temp 2-component vector of float) +0:165 'r061' ( temp 2-component vector of float) +0:165 smoothstep ( temp 2-component vector of float) 0:165 'inF0' ( in 2-component vector of float) 0:165 'inF1' ( in 2-component vector of float) +0:165 'inF2' ( in 2-component vector of float) 0:166 Sequence 0:166 move second child to first child ( temp 2-component vector of float) -0:166 'r064' ( temp 2-component vector of float) -0:166 tangent ( temp 2-component vector of float) +0:166 'r062' ( temp 2-component vector of float) +0:166 sqrt ( temp 2-component vector of float) 0:166 'inF0' ( in 2-component vector of float) 0:167 Sequence 0:167 move second child to first child ( temp 2-component vector of float) -0:167 'r065' ( temp 2-component vector of float) -0:167 hyp. tangent ( temp 2-component vector of float) +0:167 'r063' ( temp 2-component vector of float) +0:167 step ( temp 2-component vector of float) 0:167 'inF0' ( in 2-component vector of float) +0:167 'inF1' ( in 2-component vector of float) +0:168 Sequence +0:168 move second child to first child ( temp 2-component vector of float) +0:168 'r064' ( temp 2-component vector of float) +0:168 tangent ( temp 2-component vector of float) +0:168 'inF0' ( in 2-component vector of float) 0:169 Sequence 0:169 move second child to first child ( temp 2-component vector of float) -0:169 'r066' ( temp 2-component vector of float) -0:169 trunc ( temp 2-component vector of float) +0:169 'r065' ( temp 2-component vector of float) +0:169 hyp. tangent ( temp 2-component vector of float) 0:169 'inF0' ( in 2-component vector of float) -0:172 Branch: Return with expression +0:171 Sequence +0:171 move second child to first child ( temp 2-component vector of float) +0:171 'r066' ( temp 2-component vector of float) +0:171 trunc ( temp 2-component vector of float) +0:171 'inF0' ( in 2-component vector of float) +0:174 Branch: Return with expression 0:? Constant: 0:? 1.000000 0:? 2.000000 -0:176 Function Definition: PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) -0:176 Function Parameters: -0:176 'inF0' ( in 3-component vector of float) -0:176 'inF1' ( in 3-component vector of float) -0:176 'inF2' ( in 3-component vector of float) -0:176 'inU0' ( in 3-component vector of uint) -0:176 'inU1' ( in 3-component vector of uint) +0:178 Function Definition: PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) +0:178 Function Parameters: +0:178 'inF0' ( in 3-component vector of float) +0:178 'inF1' ( in 3-component vector of float) +0:178 'inF2' ( in 3-component vector of float) +0:178 'inU0' ( in 3-component vector of uint) +0:178 'inU1' ( in 3-component vector of uint) 0:? Sequence -0:179 Sequence -0:179 move second child to first child ( temp bool) -0:179 'r000' ( temp bool) -0:179 all ( temp bool) -0:179 'inF0' ( in 3-component vector of float) -0:180 Sequence -0:180 move second child to first child ( temp 3-component vector of float) -0:180 'r001' ( temp 3-component vector of float) -0:180 Absolute value ( temp 3-component vector of float) -0:180 'inF0' ( in 3-component vector of float) 0:181 Sequence -0:181 move second child to first child ( temp 3-component vector of float) -0:181 'r002' ( temp 3-component vector of float) -0:181 arc cosine ( temp 3-component vector of float) -0:181 'inF0' ( in 3-component vector of float) +0:181 move second child to first child ( temp bool) +0:181 'r000' ( temp bool) +0:181 all ( temp bool) +0:181 Convert float to bool ( temp 3-component vector of bool) +0:181 'inF0' ( in 3-component vector of float) 0:182 Sequence -0:182 move second child to first child ( temp bool) -0:182 'r003' ( temp bool) -0:182 any ( temp bool) +0:182 move second child to first child ( temp 3-component vector of float) +0:182 'r001' ( temp 3-component vector of float) +0:182 Absolute value ( temp 3-component vector of float) 0:182 'inF0' ( in 3-component vector of float) 0:183 Sequence 0:183 move second child to first child ( temp 3-component vector of float) -0:183 'r004' ( temp 3-component vector of float) -0:183 arc sine ( temp 3-component vector of float) +0:183 'r002' ( temp 3-component vector of float) +0:183 arc cosine ( temp 3-component vector of float) 0:183 'inF0' ( in 3-component vector of float) 0:184 Sequence -0:184 move second child to first child ( temp 3-component vector of int) -0:184 'r005' ( temp 3-component vector of int) -0:184 floatBitsToInt ( temp 3-component vector of int) -0:184 'inF0' ( in 3-component vector of float) +0:184 move second child to first child ( temp bool) +0:184 'r003' ( temp bool) +0:184 any ( temp bool) +0:184 Convert float to bool ( temp 3-component vector of bool) +0:184 'inF0' ( in 3-component vector of float) 0:185 Sequence -0:185 move second child to first child ( temp 3-component vector of uint) -0:185 'r006' ( temp 3-component vector of uint) -0:185 floatBitsToUint ( temp 3-component vector of uint) +0:185 move second child to first child ( temp 3-component vector of float) +0:185 'r004' ( temp 3-component vector of float) +0:185 arc sine ( temp 3-component vector of float) 0:185 'inF0' ( in 3-component vector of float) 0:186 Sequence -0:186 move second child to first child ( temp 3-component vector of float) -0:186 'r007' ( temp 3-component vector of float) -0:186 intBitsToFloat ( temp 3-component vector of float) -0:186 'inU0' ( in 3-component vector of uint) +0:186 move second child to first child ( temp 3-component vector of int) +0:186 'r005' ( temp 3-component vector of int) +0:186 floatBitsToInt ( temp 3-component vector of int) +0:186 'inF0' ( in 3-component vector of float) +0:187 Sequence +0:187 move second child to first child ( temp 3-component vector of uint) +0:187 'r006' ( temp 3-component vector of uint) +0:187 floatBitsToUint ( temp 3-component vector of uint) +0:187 'inF0' ( in 3-component vector of float) 0:188 Sequence 0:188 move second child to first child ( temp 3-component vector of float) -0:188 'r009' ( temp 3-component vector of float) -0:188 arc tangent ( temp 3-component vector of float) -0:188 'inF0' ( in 3-component vector of float) -0:189 Sequence -0:189 move second child to first child ( temp 3-component vector of float) -0:189 'r010' ( temp 3-component vector of float) -0:189 arc tangent ( temp 3-component vector of float) -0:189 'inF0' ( in 3-component vector of float) -0:189 'inF1' ( in 3-component vector of float) +0:188 'r007' ( temp 3-component vector of float) +0:188 intBitsToFloat ( temp 3-component vector of float) +0:188 'inU0' ( in 3-component vector of uint) 0:190 Sequence 0:190 move second child to first child ( temp 3-component vector of float) -0:190 'r011' ( temp 3-component vector of float) -0:190 Ceiling ( temp 3-component vector of float) +0:190 'r009' ( temp 3-component vector of float) +0:190 arc tangent ( temp 3-component vector of float) 0:190 'inF0' ( in 3-component vector of float) 0:191 Sequence 0:191 move second child to first child ( temp 3-component vector of float) -0:191 'r012' ( temp 3-component vector of float) -0:191 clamp ( temp 3-component vector of float) +0:191 'r010' ( temp 3-component vector of float) +0:191 arc tangent ( temp 3-component vector of float) 0:191 'inF0' ( in 3-component vector of float) 0:191 'inF1' ( in 3-component vector of float) -0:191 'inF2' ( in 3-component vector of float) -0:192 Test condition and select ( temp void) -0:192 Condition -0:192 any ( temp bool) -0:192 Compare Less Than ( temp 3-component vector of bool) +0:192 Sequence +0:192 move second child to first child ( temp 3-component vector of float) +0:192 'r011' ( temp 3-component vector of float) +0:192 Ceiling ( temp 3-component vector of float) 0:192 'inF0' ( in 3-component vector of float) -0:192 Constant: -0:192 0.000000 -0:192 0.000000 -0:192 0.000000 -0:192 true case -0:192 Branch: Kill 0:193 Sequence 0:193 move second child to first child ( temp 3-component vector of float) -0:193 'r013' ( temp 3-component vector of float) -0:193 cosine ( temp 3-component vector of float) +0:193 'r012' ( temp 3-component vector of float) +0:193 clamp ( temp 3-component vector of float) 0:193 'inF0' ( in 3-component vector of float) -0:194 Sequence -0:194 move second child to first child ( temp 3-component vector of float) -0:194 'r014' ( temp 3-component vector of float) -0:194 hyp. cosine ( temp 3-component vector of float) +0:193 'inF1' ( in 3-component vector of float) +0:193 'inF2' ( in 3-component vector of float) +0:194 Test condition and select ( temp void) +0:194 Condition +0:194 any ( temp bool) +0:194 Compare Less Than ( temp 3-component vector of bool) 0:194 'inF0' ( in 3-component vector of float) -0:195 Sequence -0:195 move second child to first child ( temp 3-component vector of uint) -0:195 'r015' ( temp 3-component vector of uint) +0:194 Constant: +0:194 0.000000 +0:194 0.000000 +0:194 0.000000 +0:194 true case +0:194 Branch: Kill +0:195 Test condition and select ( temp void) +0:195 Condition +0:195 any ( temp bool) +0:195 Compare Less Than ( temp 3-component vector of bool) +0:195 'inU0' ( in 3-component vector of uint) +0:195 Constant: +0:195 0.000000 +0:195 0.000000 +0:195 0.000000 +0:195 true case +0:195 Branch: Kill +0:196 Sequence +0:196 move second child to first child ( temp 3-component vector of float) +0:196 'r013' ( temp 3-component vector of float) +0:196 cosine ( temp 3-component vector of float) +0:196 'inF0' ( in 3-component vector of float) +0:197 Sequence +0:197 move second child to first child ( temp 3-component vector of float) +0:197 'r014' ( temp 3-component vector of float) +0:197 hyp. cosine ( temp 3-component vector of float) +0:197 'inF0' ( in 3-component vector of float) +0:198 Sequence +0:198 move second child to first child ( temp 3-component vector of uint) +0:198 'r015' ( temp 3-component vector of uint) 0:? bitCount ( temp 3-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 3 (const uint) 0:? 5 (const uint) -0:196 Sequence -0:196 move second child to first child ( temp 3-component vector of float) -0:196 'r016' ( temp 3-component vector of float) -0:196 cross-product ( temp 3-component vector of float) -0:196 'inF0' ( in 3-component vector of float) -0:196 'inF1' ( in 3-component vector of float) -0:197 Sequence -0:197 move second child to first child ( temp 3-component vector of float) -0:197 'r017' ( temp 3-component vector of float) -0:197 dPdx ( temp 3-component vector of float) -0:197 'inF0' ( in 3-component vector of float) -0:198 Sequence -0:198 move second child to first child ( temp 3-component vector of float) -0:198 'r018' ( temp 3-component vector of float) -0:198 dPdxCoarse ( temp 3-component vector of float) -0:198 'inF0' ( in 3-component vector of float) 0:199 Sequence 0:199 move second child to first child ( temp 3-component vector of float) -0:199 'r019' ( temp 3-component vector of float) -0:199 dPdxFine ( temp 3-component vector of float) +0:199 'r016' ( temp 3-component vector of float) +0:199 cross-product ( temp 3-component vector of float) 0:199 'inF0' ( in 3-component vector of float) +0:199 'inF1' ( in 3-component vector of float) 0:200 Sequence 0:200 move second child to first child ( temp 3-component vector of float) -0:200 'r020' ( temp 3-component vector of float) -0:200 dPdy ( temp 3-component vector of float) +0:200 'r017' ( temp 3-component vector of float) +0:200 dPdx ( temp 3-component vector of float) 0:200 'inF0' ( in 3-component vector of float) 0:201 Sequence 0:201 move second child to first child ( temp 3-component vector of float) -0:201 'r021' ( temp 3-component vector of float) -0:201 dPdyCoarse ( temp 3-component vector of float) +0:201 'r018' ( temp 3-component vector of float) +0:201 dPdxCoarse ( temp 3-component vector of float) 0:201 'inF0' ( in 3-component vector of float) 0:202 Sequence 0:202 move second child to first child ( temp 3-component vector of float) -0:202 'r022' ( temp 3-component vector of float) -0:202 dPdyFine ( temp 3-component vector of float) +0:202 'r019' ( temp 3-component vector of float) +0:202 dPdxFine ( temp 3-component vector of float) 0:202 'inF0' ( in 3-component vector of float) 0:203 Sequence 0:203 move second child to first child ( temp 3-component vector of float) -0:203 'r023' ( temp 3-component vector of float) -0:203 degrees ( temp 3-component vector of float) +0:203 'r020' ( temp 3-component vector of float) +0:203 dPdy ( temp 3-component vector of float) 0:203 'inF0' ( in 3-component vector of float) 0:204 Sequence -0:204 move second child to first child ( temp float) -0:204 'r024' ( temp float) -0:204 distance ( temp float) +0:204 move second child to first child ( temp 3-component vector of float) +0:204 'r021' ( temp 3-component vector of float) +0:204 dPdyCoarse ( temp 3-component vector of float) 0:204 'inF0' ( in 3-component vector of float) -0:204 'inF1' ( in 3-component vector of float) 0:205 Sequence -0:205 move second child to first child ( temp float) -0:205 'r025' ( temp float) -0:205 dot-product ( temp float) +0:205 move second child to first child ( temp 3-component vector of float) +0:205 'r022' ( temp 3-component vector of float) +0:205 dPdyFine ( temp 3-component vector of float) 0:205 'inF0' ( in 3-component vector of float) -0:205 'inF1' ( in 3-component vector of float) -0:209 Sequence -0:209 move second child to first child ( temp 3-component vector of float) -0:209 'r029' ( temp 3-component vector of float) -0:209 exp ( temp 3-component vector of float) -0:209 'inF0' ( in 3-component vector of float) -0:210 Sequence -0:210 move second child to first child ( temp 3-component vector of float) -0:210 'r030' ( temp 3-component vector of float) -0:210 exp2 ( temp 3-component vector of float) -0:210 'inF0' ( in 3-component vector of float) -0:211 Sequence -0:211 move second child to first child ( temp 3-component vector of float) -0:211 'r031' ( temp 3-component vector of float) -0:211 face-forward ( temp 3-component vector of float) -0:211 'inF0' ( in 3-component vector of float) -0:211 'inF1' ( in 3-component vector of float) -0:211 'inF2' ( in 3-component vector of float) +0:206 Sequence +0:206 move second child to first child ( temp 3-component vector of float) +0:206 'r023' ( temp 3-component vector of float) +0:206 degrees ( temp 3-component vector of float) +0:206 'inF0' ( in 3-component vector of float) +0:207 Sequence +0:207 move second child to first child ( temp float) +0:207 'r024' ( temp float) +0:207 distance ( temp float) +0:207 'inF0' ( in 3-component vector of float) +0:207 'inF1' ( in 3-component vector of float) +0:208 Sequence +0:208 move second child to first child ( temp float) +0:208 'r025' ( temp float) +0:208 dot-product ( temp float) +0:208 'inF0' ( in 3-component vector of float) +0:208 'inF1' ( in 3-component vector of float) 0:212 Sequence -0:212 move second child to first child ( temp 3-component vector of uint) -0:212 'r032' ( temp 3-component vector of uint) +0:212 move second child to first child ( temp 3-component vector of float) +0:212 'r029' ( temp 3-component vector of float) +0:212 exp ( temp 3-component vector of float) +0:212 'inF0' ( in 3-component vector of float) +0:213 Sequence +0:213 move second child to first child ( temp 3-component vector of float) +0:213 'r030' ( temp 3-component vector of float) +0:213 exp2 ( temp 3-component vector of float) +0:213 'inF0' ( in 3-component vector of float) +0:214 Sequence +0:214 move second child to first child ( temp 3-component vector of float) +0:214 'r031' ( temp 3-component vector of float) +0:214 face-forward ( temp 3-component vector of float) +0:214 'inF0' ( in 3-component vector of float) +0:214 'inF1' ( in 3-component vector of float) +0:214 'inF2' ( in 3-component vector of float) +0:215 Sequence +0:215 move second child to first child ( temp 3-component vector of uint) +0:215 'r032' ( temp 3-component vector of uint) 0:? findMSB ( temp 3-component vector of uint) 0:? Constant: 0:? 2 (const uint) 0:? 3 (const uint) 0:? 4 (const uint) -0:213 Sequence -0:213 move second child to first child ( temp 3-component vector of uint) -0:213 'r033' ( temp 3-component vector of uint) +0:216 Sequence +0:216 move second child to first child ( temp 3-component vector of uint) +0:216 'r033' ( temp 3-component vector of uint) 0:? findLSB ( temp 3-component vector of uint) 0:? Constant: 0:? 2 (const uint) 0:? 3 (const uint) 0:? 4 (const uint) -0:214 Sequence -0:214 move second child to first child ( temp 3-component vector of float) -0:214 'r034' ( temp 3-component vector of float) -0:214 Floor ( temp 3-component vector of float) -0:214 'inF0' ( in 3-component vector of float) -0:216 Sequence -0:216 move second child to first child ( temp 3-component vector of float) -0:216 'r036' ( temp 3-component vector of float) -0:216 mod ( temp 3-component vector of float) -0:216 'inF0' ( in 3-component vector of float) -0:216 'inF1' ( in 3-component vector of float) 0:217 Sequence 0:217 move second child to first child ( temp 3-component vector of float) -0:217 'r037' ( temp 3-component vector of float) -0:217 Fraction ( temp 3-component vector of float) +0:217 'r034' ( temp 3-component vector of float) +0:217 Floor ( temp 3-component vector of float) 0:217 'inF0' ( in 3-component vector of float) -0:218 Sequence -0:218 move second child to first child ( temp 3-component vector of float) -0:218 'r039' ( temp 3-component vector of float) -0:218 fwidth ( temp 3-component vector of float) -0:218 'inF0' ( in 3-component vector of float) 0:219 Sequence -0:219 move second child to first child ( temp 3-component vector of bool) -0:219 'r040' ( temp 3-component vector of bool) -0:219 isinf ( temp 3-component vector of bool) +0:219 move second child to first child ( temp 3-component vector of float) +0:219 'r036' ( temp 3-component vector of float) +0:219 mod ( temp 3-component vector of float) 0:219 'inF0' ( in 3-component vector of float) +0:219 'inF1' ( in 3-component vector of float) 0:220 Sequence -0:220 move second child to first child ( temp 3-component vector of bool) -0:220 'r041' ( temp 3-component vector of bool) -0:220 isnan ( temp 3-component vector of bool) +0:220 move second child to first child ( temp 3-component vector of float) +0:220 'r037' ( temp 3-component vector of float) +0:220 Fraction ( temp 3-component vector of float) 0:220 'inF0' ( in 3-component vector of float) 0:221 Sequence 0:221 move second child to first child ( temp 3-component vector of float) -0:221 'r042' ( temp 3-component vector of float) -0:221 ldexp ( temp 3-component vector of float) +0:221 'r039' ( temp 3-component vector of float) +0:221 fwidth ( temp 3-component vector of float) 0:221 'inF0' ( in 3-component vector of float) -0:221 'inF1' ( in 3-component vector of float) 0:222 Sequence -0:222 move second child to first child ( temp 3-component vector of float) -0:222 'r039a' ( temp 3-component vector of float) -0:222 mix ( temp 3-component vector of float) +0:222 move second child to first child ( temp 3-component vector of bool) +0:222 'r040' ( temp 3-component vector of bool) +0:222 isinf ( temp 3-component vector of bool) 0:222 'inF0' ( in 3-component vector of float) -0:222 'inF1' ( in 3-component vector of float) -0:222 'inF2' ( in 3-component vector of float) 0:223 Sequence -0:223 move second child to first child ( temp 3-component vector of float) -0:223 'r039b' ( temp 3-component vector of float) -0:223 mix ( temp 3-component vector of float) +0:223 move second child to first child ( temp 3-component vector of bool) +0:223 'r041' ( temp 3-component vector of bool) +0:223 isnan ( temp 3-component vector of bool) 0:223 'inF0' ( in 3-component vector of float) -0:223 'inF1' ( in 3-component vector of float) -0:223 Constant: -0:223 0.300000 0:224 Sequence -0:224 move second child to first child ( temp float) -0:224 'r043' ( temp float) -0:224 length ( temp float) +0:224 move second child to first child ( temp 3-component vector of float) +0:224 'r042' ( temp 3-component vector of float) +0:224 ldexp ( temp 3-component vector of float) 0:224 'inF0' ( in 3-component vector of float) +0:224 'inF1' ( in 3-component vector of float) 0:225 Sequence 0:225 move second child to first child ( temp 3-component vector of float) -0:225 'r044' ( temp 3-component vector of float) -0:225 log ( temp 3-component vector of float) +0:225 'r039a' ( temp 3-component vector of float) +0:225 mix ( temp 3-component vector of float) 0:225 'inF0' ( in 3-component vector of float) +0:225 'inF1' ( in 3-component vector of float) +0:225 'inF2' ( in 3-component vector of float) 0:226 Sequence 0:226 move second child to first child ( temp 3-component vector of float) -0:226 'r045' ( temp 3-component vector of float) -0:226 vector-scale ( temp 3-component vector of float) -0:226 log2 ( temp 3-component vector of float) -0:226 'inF0' ( in 3-component vector of float) +0:226 'r039b' ( temp 3-component vector of float) +0:226 mix ( temp 3-component vector of float) +0:226 'inF0' ( in 3-component vector of float) +0:226 'inF1' ( in 3-component vector of float) 0:226 Constant: -0:226 0.301030 +0:226 0.300000 0:227 Sequence -0:227 move second child to first child ( temp 3-component vector of float) -0:227 'r046' ( temp 3-component vector of float) -0:227 log2 ( temp 3-component vector of float) +0:227 move second child to first child ( temp float) +0:227 'r043' ( temp float) +0:227 length ( temp float) 0:227 'inF0' ( in 3-component vector of float) 0:228 Sequence 0:228 move second child to first child ( temp 3-component vector of float) -0:228 'r047' ( temp 3-component vector of float) -0:228 max ( temp 3-component vector of float) +0:228 'r044' ( temp 3-component vector of float) +0:228 log ( temp 3-component vector of float) 0:228 'inF0' ( in 3-component vector of float) -0:228 'inF1' ( in 3-component vector of float) 0:229 Sequence 0:229 move second child to first child ( temp 3-component vector of float) -0:229 'r048' ( temp 3-component vector of float) -0:229 min ( temp 3-component vector of float) -0:229 'inF0' ( in 3-component vector of float) -0:229 'inF1' ( in 3-component vector of float) +0:229 'r045' ( temp 3-component vector of float) +0:229 vector-scale ( temp 3-component vector of float) +0:229 log2 ( temp 3-component vector of float) +0:229 'inF0' ( in 3-component vector of float) +0:229 Constant: +0:229 0.301030 0:230 Sequence 0:230 move second child to first child ( temp 3-component vector of float) -0:230 'r049' ( temp 3-component vector of float) -0:230 normalize ( temp 3-component vector of float) +0:230 'r046' ( temp 3-component vector of float) +0:230 log2 ( temp 3-component vector of float) 0:230 'inF0' ( in 3-component vector of float) 0:231 Sequence 0:231 move second child to first child ( temp 3-component vector of float) -0:231 'r050' ( temp 3-component vector of float) -0:231 pow ( temp 3-component vector of float) +0:231 'r047' ( temp 3-component vector of float) +0:231 max ( temp 3-component vector of float) 0:231 'inF0' ( in 3-component vector of float) 0:231 'inF1' ( in 3-component vector of float) 0:232 Sequence 0:232 move second child to first child ( temp 3-component vector of float) -0:232 'r051' ( temp 3-component vector of float) -0:232 radians ( temp 3-component vector of float) +0:232 'r048' ( temp 3-component vector of float) +0:232 min ( temp 3-component vector of float) 0:232 'inF0' ( in 3-component vector of float) +0:232 'inF1' ( in 3-component vector of float) 0:233 Sequence 0:233 move second child to first child ( temp 3-component vector of float) -0:233 'r052' ( temp 3-component vector of float) -0:233 divide ( temp 3-component vector of float) -0:233 Constant: -0:233 1.000000 +0:233 'r049' ( temp 3-component vector of float) +0:233 normalize ( temp 3-component vector of float) 0:233 'inF0' ( in 3-component vector of float) 0:234 Sequence 0:234 move second child to first child ( temp 3-component vector of float) -0:234 'r053' ( temp 3-component vector of float) -0:234 reflect ( temp 3-component vector of float) +0:234 'r050' ( temp 3-component vector of float) +0:234 pow ( temp 3-component vector of float) 0:234 'inF0' ( in 3-component vector of float) 0:234 'inF1' ( in 3-component vector of float) 0:235 Sequence 0:235 move second child to first child ( temp 3-component vector of float) -0:235 'r054' ( temp 3-component vector of float) -0:235 refract ( temp 3-component vector of float) +0:235 'r051' ( temp 3-component vector of float) +0:235 radians ( temp 3-component vector of float) 0:235 'inF0' ( in 3-component vector of float) -0:235 'inF1' ( in 3-component vector of float) -0:235 Constant: -0:235 2.000000 0:236 Sequence -0:236 move second child to first child ( temp 3-component vector of uint) -0:236 'r055' ( temp 3-component vector of uint) +0:236 move second child to first child ( temp 3-component vector of float) +0:236 'r052' ( temp 3-component vector of float) +0:236 divide ( temp 3-component vector of float) +0:236 Constant: +0:236 1.000000 +0:236 'inF0' ( in 3-component vector of float) +0:237 Sequence +0:237 move second child to first child ( temp 3-component vector of float) +0:237 'r053' ( temp 3-component vector of float) +0:237 reflect ( temp 3-component vector of float) +0:237 'inF0' ( in 3-component vector of float) +0:237 'inF1' ( in 3-component vector of float) +0:238 Sequence +0:238 move second child to first child ( temp 3-component vector of float) +0:238 'r054' ( temp 3-component vector of float) +0:238 refract ( temp 3-component vector of float) +0:238 'inF0' ( in 3-component vector of float) +0:238 'inF1' ( in 3-component vector of float) +0:238 Constant: +0:238 2.000000 +0:239 Sequence +0:239 move second child to first child ( temp 3-component vector of uint) +0:239 'r055' ( temp 3-component vector of uint) 0:? bitFieldReverse ( temp 3-component vector of uint) 0:? Constant: 0:? 1 (const uint) 0:? 2 (const uint) 0:? 3 (const uint) -0:237 Sequence -0:237 move second child to first child ( temp 3-component vector of float) -0:237 'r056' ( temp 3-component vector of float) -0:237 roundEven ( temp 3-component vector of float) -0:237 'inF0' ( in 3-component vector of float) -0:238 Sequence -0:238 move second child to first child ( temp 3-component vector of float) -0:238 'r057' ( temp 3-component vector of float) -0:238 inverse sqrt ( temp 3-component vector of float) -0:238 'inF0' ( in 3-component vector of float) -0:239 Sequence -0:239 move second child to first child ( temp 3-component vector of float) -0:239 'r058' ( temp 3-component vector of float) -0:239 clamp ( temp 3-component vector of float) -0:239 'inF0' ( in 3-component vector of float) -0:239 Constant: -0:239 0.000000 -0:239 Constant: -0:239 1.000000 0:240 Sequence 0:240 move second child to first child ( temp 3-component vector of float) -0:240 'r059' ( temp 3-component vector of float) -0:240 Sign ( temp 3-component vector of float) +0:240 'r056' ( temp 3-component vector of float) +0:240 roundEven ( temp 3-component vector of float) 0:240 'inF0' ( in 3-component vector of float) 0:241 Sequence 0:241 move second child to first child ( temp 3-component vector of float) -0:241 'r060' ( temp 3-component vector of float) -0:241 sine ( temp 3-component vector of float) +0:241 'r057' ( temp 3-component vector of float) +0:241 inverse sqrt ( temp 3-component vector of float) 0:241 'inF0' ( in 3-component vector of float) 0:242 Sequence 0:242 move second child to first child ( temp 3-component vector of float) -0:242 'inF1' ( in 3-component vector of float) -0:242 sine ( temp 3-component vector of float) -0:242 'inF0' ( in 3-component vector of float) -0:242 move second child to first child ( temp 3-component vector of float) -0:242 'inF2' ( in 3-component vector of float) -0:242 cosine ( temp 3-component vector of float) +0:242 'r058' ( temp 3-component vector of float) +0:242 clamp ( temp 3-component vector of float) 0:242 'inF0' ( in 3-component vector of float) +0:242 Constant: +0:242 0.000000 +0:242 Constant: +0:242 1.000000 0:243 Sequence 0:243 move second child to first child ( temp 3-component vector of float) -0:243 'r061' ( temp 3-component vector of float) -0:243 hyp. sine ( temp 3-component vector of float) +0:243 'r059' ( temp 3-component vector of float) +0:243 Sign ( temp 3-component vector of float) 0:243 'inF0' ( in 3-component vector of float) 0:244 Sequence 0:244 move second child to first child ( temp 3-component vector of float) -0:244 'r062' ( temp 3-component vector of float) -0:244 smoothstep ( temp 3-component vector of float) +0:244 'r060' ( temp 3-component vector of float) +0:244 sine ( temp 3-component vector of float) 0:244 'inF0' ( in 3-component vector of float) -0:244 'inF1' ( in 3-component vector of float) -0:244 'inF2' ( in 3-component vector of float) 0:245 Sequence 0:245 move second child to first child ( temp 3-component vector of float) -0:245 'r063' ( temp 3-component vector of float) -0:245 sqrt ( temp 3-component vector of float) +0:245 'inF1' ( in 3-component vector of float) +0:245 sine ( temp 3-component vector of float) +0:245 'inF0' ( in 3-component vector of float) +0:245 move second child to first child ( temp 3-component vector of float) +0:245 'inF2' ( in 3-component vector of float) +0:245 cosine ( temp 3-component vector of float) 0:245 'inF0' ( in 3-component vector of float) 0:246 Sequence 0:246 move second child to first child ( temp 3-component vector of float) -0:246 'r064' ( temp 3-component vector of float) -0:246 step ( temp 3-component vector of float) +0:246 'r061' ( temp 3-component vector of float) +0:246 hyp. sine ( temp 3-component vector of float) 0:246 'inF0' ( in 3-component vector of float) -0:246 'inF1' ( in 3-component vector of float) 0:247 Sequence 0:247 move second child to first child ( temp 3-component vector of float) -0:247 'r065' ( temp 3-component vector of float) -0:247 tangent ( temp 3-component vector of float) +0:247 'r062' ( temp 3-component vector of float) +0:247 smoothstep ( temp 3-component vector of float) 0:247 'inF0' ( in 3-component vector of float) +0:247 'inF1' ( in 3-component vector of float) +0:247 'inF2' ( in 3-component vector of float) 0:248 Sequence 0:248 move second child to first child ( temp 3-component vector of float) -0:248 'r066' ( temp 3-component vector of float) -0:248 hyp. tangent ( temp 3-component vector of float) +0:248 'r063' ( temp 3-component vector of float) +0:248 sqrt ( temp 3-component vector of float) 0:248 'inF0' ( in 3-component vector of float) +0:249 Sequence +0:249 move second child to first child ( temp 3-component vector of float) +0:249 'r064' ( temp 3-component vector of float) +0:249 step ( temp 3-component vector of float) +0:249 'inF0' ( in 3-component vector of float) +0:249 'inF1' ( in 3-component vector of float) 0:250 Sequence 0:250 move second child to first child ( temp 3-component vector of float) -0:250 'r067' ( temp 3-component vector of float) -0:250 trunc ( temp 3-component vector of float) +0:250 'r065' ( temp 3-component vector of float) +0:250 tangent ( temp 3-component vector of float) 0:250 'inF0' ( in 3-component vector of float) -0:253 Branch: Return with expression +0:251 Sequence +0:251 move second child to first child ( temp 3-component vector of float) +0:251 'r066' ( temp 3-component vector of float) +0:251 hyp. tangent ( temp 3-component vector of float) +0:251 'inF0' ( in 3-component vector of float) +0:253 Sequence +0:253 move second child to first child ( temp 3-component vector of float) +0:253 'r067' ( temp 3-component vector of float) +0:253 trunc ( temp 3-component vector of float) +0:253 'inF0' ( in 3-component vector of float) +0:256 Branch: Return with expression 0:? Constant: 0:? 1.000000 0:? 2.000000 0:? 3.000000 -0:257 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) -0:257 Function Parameters: -0:257 'inF0' ( in 4-component vector of float) -0:257 'inF1' ( in 4-component vector of float) -0:257 'inF2' ( in 4-component vector of float) -0:257 'inU0' ( in 4-component vector of uint) -0:257 'inU1' ( in 4-component vector of uint) +0:260 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) +0:260 Function Parameters: +0:260 'inF0' ( in 4-component vector of float) +0:260 'inF1' ( in 4-component vector of float) +0:260 'inF2' ( in 4-component vector of float) +0:260 'inU0' ( in 4-component vector of uint) +0:260 'inU1' ( in 4-component vector of uint) 0:? Sequence -0:260 Sequence -0:260 move second child to first child ( temp bool) -0:260 'r000' ( temp bool) -0:260 all ( temp bool) -0:260 'inF0' ( in 4-component vector of float) -0:261 Sequence -0:261 move second child to first child ( temp 4-component vector of float) -0:261 'r001' ( temp 4-component vector of float) -0:261 Absolute value ( temp 4-component vector of float) -0:261 'inF0' ( in 4-component vector of float) -0:262 Sequence -0:262 move second child to first child ( temp 4-component vector of float) -0:262 'r002' ( temp 4-component vector of float) -0:262 arc cosine ( temp 4-component vector of float) -0:262 'inF0' ( in 4-component vector of float) 0:263 Sequence 0:263 move second child to first child ( temp bool) -0:263 'r003' ( temp bool) -0:263 any ( temp bool) -0:263 'inF0' ( in 4-component vector of float) +0:263 'r000' ( temp bool) +0:263 all ( temp bool) +0:263 Convert float to bool ( temp 4-component vector of bool) +0:263 'inF0' ( in 4-component vector of float) 0:264 Sequence 0:264 move second child to first child ( temp 4-component vector of float) -0:264 'r004' ( temp 4-component vector of float) -0:264 arc sine ( temp 4-component vector of float) +0:264 'r001' ( temp 4-component vector of float) +0:264 Absolute value ( temp 4-component vector of float) 0:264 'inF0' ( in 4-component vector of float) 0:265 Sequence -0:265 move second child to first child ( temp 4-component vector of int) -0:265 'r005' ( temp 4-component vector of int) -0:265 floatBitsToInt ( temp 4-component vector of int) +0:265 move second child to first child ( temp 4-component vector of float) +0:265 'r002' ( temp 4-component vector of float) +0:265 arc cosine ( temp 4-component vector of float) 0:265 'inF0' ( in 4-component vector of float) 0:266 Sequence -0:266 move second child to first child ( temp 4-component vector of uint) -0:266 'r006' ( temp 4-component vector of uint) -0:266 floatBitsToUint ( temp 4-component vector of uint) -0:266 'inF0' ( in 4-component vector of float) +0:266 move second child to first child ( temp bool) +0:266 'r003' ( temp bool) +0:266 any ( temp bool) +0:266 Convert float to bool ( temp 4-component vector of bool) +0:266 'inF0' ( in 4-component vector of float) 0:267 Sequence 0:267 move second child to first child ( temp 4-component vector of float) -0:267 'r007' ( temp 4-component vector of float) -0:267 intBitsToFloat ( temp 4-component vector of float) -0:267 'inU0' ( in 4-component vector of uint) +0:267 'r004' ( temp 4-component vector of float) +0:267 arc sine ( temp 4-component vector of float) +0:267 'inF0' ( in 4-component vector of float) +0:268 Sequence +0:268 move second child to first child ( temp 4-component vector of int) +0:268 'r005' ( temp 4-component vector of int) +0:268 floatBitsToInt ( temp 4-component vector of int) +0:268 'inF0' ( in 4-component vector of float) 0:269 Sequence -0:269 move second child to first child ( temp 4-component vector of float) -0:269 'r009' ( temp 4-component vector of float) -0:269 arc tangent ( temp 4-component vector of float) +0:269 move second child to first child ( temp 4-component vector of uint) +0:269 'r006' ( temp 4-component vector of uint) +0:269 floatBitsToUint ( temp 4-component vector of uint) 0:269 'inF0' ( in 4-component vector of float) 0:270 Sequence 0:270 move second child to first child ( temp 4-component vector of float) -0:270 'r010' ( temp 4-component vector of float) -0:270 arc tangent ( temp 4-component vector of float) -0:270 'inF0' ( in 4-component vector of float) -0:270 'inF1' ( in 4-component vector of float) -0:271 Sequence -0:271 move second child to first child ( temp 4-component vector of float) -0:271 'r011' ( temp 4-component vector of float) -0:271 Ceiling ( temp 4-component vector of float) -0:271 'inF0' ( in 4-component vector of float) +0:270 'r007' ( temp 4-component vector of float) +0:270 intBitsToFloat ( temp 4-component vector of float) +0:270 'inU0' ( in 4-component vector of uint) 0:272 Sequence 0:272 move second child to first child ( temp 4-component vector of float) -0:272 'r012' ( temp 4-component vector of float) -0:272 clamp ( temp 4-component vector of float) +0:272 'r009' ( temp 4-component vector of float) +0:272 arc tangent ( temp 4-component vector of float) 0:272 'inF0' ( in 4-component vector of float) -0:272 'inF1' ( in 4-component vector of float) -0:272 'inF2' ( in 4-component vector of float) -0:273 Test condition and select ( temp void) -0:273 Condition -0:273 any ( temp bool) -0:273 Compare Less Than ( temp 4-component vector of bool) +0:273 Sequence +0:273 move second child to first child ( temp 4-component vector of float) +0:273 'r010' ( temp 4-component vector of float) +0:273 arc tangent ( temp 4-component vector of float) 0:273 'inF0' ( in 4-component vector of float) -0:273 Constant: -0:273 0.000000 -0:273 0.000000 -0:273 0.000000 -0:273 0.000000 -0:273 true case -0:273 Branch: Kill +0:273 'inF1' ( in 4-component vector of float) 0:274 Sequence 0:274 move second child to first child ( temp 4-component vector of float) -0:274 'r013' ( temp 4-component vector of float) -0:274 cosine ( temp 4-component vector of float) +0:274 'r011' ( temp 4-component vector of float) +0:274 Ceiling ( temp 4-component vector of float) 0:274 'inF0' ( in 4-component vector of float) 0:275 Sequence 0:275 move second child to first child ( temp 4-component vector of float) -0:275 'r014' ( temp 4-component vector of float) -0:275 hyp. cosine ( temp 4-component vector of float) +0:275 'r012' ( temp 4-component vector of float) +0:275 clamp ( temp 4-component vector of float) 0:275 'inF0' ( in 4-component vector of float) -0:276 Sequence -0:276 move second child to first child ( temp 4-component vector of uint) -0:276 'r015' ( temp 4-component vector of uint) +0:275 'inF1' ( in 4-component vector of float) +0:275 'inF2' ( in 4-component vector of float) +0:276 Test condition and select ( temp void) +0:276 Condition +0:276 any ( temp bool) +0:276 Compare Less Than ( temp 4-component vector of bool) +0:276 'inF0' ( in 4-component vector of float) +0:276 Constant: +0:276 0.000000 +0:276 0.000000 +0:276 0.000000 +0:276 0.000000 +0:276 true case +0:276 Branch: Kill +0:277 Test condition and select ( temp void) +0:277 Condition +0:277 any ( temp bool) +0:277 Compare Less Than ( temp 4-component vector of bool) +0:277 'inU0' ( in 4-component vector of uint) +0:277 Constant: +0:277 0.000000 +0:277 0.000000 +0:277 0.000000 +0:277 0.000000 +0:277 true case +0:277 Branch: Kill +0:278 Sequence +0:278 move second child to first child ( temp 4-component vector of float) +0:278 'r013' ( temp 4-component vector of float) +0:278 cosine ( temp 4-component vector of float) +0:278 'inF0' ( in 4-component vector of float) +0:279 Sequence +0:279 move second child to first child ( temp 4-component vector of float) +0:279 'r014' ( temp 4-component vector of float) +0:279 hyp. cosine ( temp 4-component vector of float) +0:279 'inF0' ( in 4-component vector of float) +0:280 Sequence +0:280 move second child to first child ( temp 4-component vector of uint) +0:280 'r015' ( temp 4-component vector of uint) 0:? bitCount ( temp 4-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 3 (const uint) 0:? 5 (const uint) 0:? 2 (const uint) -0:277 Sequence -0:277 move second child to first child ( temp 4-component vector of float) -0:277 'r016' ( temp 4-component vector of float) -0:277 dPdx ( temp 4-component vector of float) -0:277 'inF0' ( in 4-component vector of float) -0:278 Sequence -0:278 move second child to first child ( temp 4-component vector of float) -0:278 'r017' ( temp 4-component vector of float) -0:278 dPdxCoarse ( temp 4-component vector of float) -0:278 'inF0' ( in 4-component vector of float) -0:279 Sequence -0:279 move second child to first child ( temp 4-component vector of float) -0:279 'r018' ( temp 4-component vector of float) -0:279 dPdxFine ( temp 4-component vector of float) -0:279 'inF0' ( in 4-component vector of float) -0:280 Sequence -0:280 move second child to first child ( temp 4-component vector of float) -0:280 'r019' ( temp 4-component vector of float) -0:280 dPdy ( temp 4-component vector of float) -0:280 'inF0' ( in 4-component vector of float) 0:281 Sequence 0:281 move second child to first child ( temp 4-component vector of float) -0:281 'r020' ( temp 4-component vector of float) -0:281 dPdyCoarse ( temp 4-component vector of float) +0:281 'r016' ( temp 4-component vector of float) +0:281 dPdx ( temp 4-component vector of float) 0:281 'inF0' ( in 4-component vector of float) 0:282 Sequence 0:282 move second child to first child ( temp 4-component vector of float) -0:282 'r021' ( temp 4-component vector of float) -0:282 dPdyFine ( temp 4-component vector of float) +0:282 'r017' ( temp 4-component vector of float) +0:282 dPdxCoarse ( temp 4-component vector of float) 0:282 'inF0' ( in 4-component vector of float) 0:283 Sequence 0:283 move second child to first child ( temp 4-component vector of float) -0:283 'r022' ( temp 4-component vector of float) -0:283 degrees ( temp 4-component vector of float) +0:283 'r018' ( temp 4-component vector of float) +0:283 dPdxFine ( temp 4-component vector of float) 0:283 'inF0' ( in 4-component vector of float) 0:284 Sequence -0:284 move second child to first child ( temp float) -0:284 'r023' ( temp float) -0:284 distance ( temp float) +0:284 move second child to first child ( temp 4-component vector of float) +0:284 'r019' ( temp 4-component vector of float) +0:284 dPdy ( temp 4-component vector of float) 0:284 'inF0' ( in 4-component vector of float) -0:284 'inF1' ( in 4-component vector of float) 0:285 Sequence -0:285 move second child to first child ( temp float) -0:285 'r024' ( temp float) -0:285 dot-product ( temp float) +0:285 move second child to first child ( temp 4-component vector of float) +0:285 'r020' ( temp 4-component vector of float) +0:285 dPdyCoarse ( temp 4-component vector of float) 0:285 'inF0' ( in 4-component vector of float) -0:285 'inF1' ( in 4-component vector of float) 0:286 Sequence 0:286 move second child to first child ( temp 4-component vector of float) -0:286 'r025' ( temp 4-component vector of float) -0:286 Construct vec4 ( temp 4-component vector of float) -0:286 Constant: -0:286 1.000000 -0:286 component-wise multiply ( temp float) -0:286 direct index ( temp float) -0:286 'inF0' ( in 4-component vector of float) -0:286 Constant: -0:286 1 (const int) -0:286 direct index ( temp float) -0:286 'inF1' ( in 4-component vector of float) -0:286 Constant: -0:286 1 (const int) -0:286 direct index ( temp float) -0:286 'inF0' ( in 4-component vector of float) -0:286 Constant: -0:286 2 (const int) -0:286 direct index ( temp float) -0:286 'inF1' ( in 4-component vector of float) -0:286 Constant: -0:286 3 (const int) +0:286 'r021' ( temp 4-component vector of float) +0:286 dPdyFine ( temp 4-component vector of float) +0:286 'inF0' ( in 4-component vector of float) +0:287 Sequence +0:287 move second child to first child ( temp 4-component vector of float) +0:287 'r022' ( temp 4-component vector of float) +0:287 degrees ( temp 4-component vector of float) +0:287 'inF0' ( in 4-component vector of float) +0:288 Sequence +0:288 move second child to first child ( temp float) +0:288 'r023' ( temp float) +0:288 distance ( temp float) +0:288 'inF0' ( in 4-component vector of float) +0:288 'inF1' ( in 4-component vector of float) +0:289 Sequence +0:289 move second child to first child ( temp float) +0:289 'r024' ( temp float) +0:289 dot-product ( temp float) +0:289 'inF0' ( in 4-component vector of float) +0:289 'inF1' ( in 4-component vector of float) 0:290 Sequence 0:290 move second child to first child ( temp 4-component vector of float) -0:290 'r029' ( temp 4-component vector of float) -0:290 exp ( temp 4-component vector of float) -0:290 'inF0' ( in 4-component vector of float) -0:291 Sequence -0:291 move second child to first child ( temp 4-component vector of float) -0:291 'r030' ( temp 4-component vector of float) -0:291 exp2 ( temp 4-component vector of float) -0:291 'inF0' ( in 4-component vector of float) -0:292 Sequence -0:292 move second child to first child ( temp 4-component vector of float) -0:292 'r031' ( temp 4-component vector of float) -0:292 face-forward ( temp 4-component vector of float) -0:292 'inF0' ( in 4-component vector of float) -0:292 'inF1' ( in 4-component vector of float) -0:292 'inF2' ( in 4-component vector of float) -0:293 Sequence -0:293 move second child to first child ( temp 4-component vector of uint) -0:293 'r032' ( temp 4-component vector of uint) +0:290 'r025' ( temp 4-component vector of float) +0:290 Construct vec4 ( temp 4-component vector of float) +0:290 Constant: +0:290 1.000000 +0:290 component-wise multiply ( temp float) +0:290 direct index ( temp float) +0:290 'inF0' ( in 4-component vector of float) +0:290 Constant: +0:290 1 (const int) +0:290 direct index ( temp float) +0:290 'inF1' ( in 4-component vector of float) +0:290 Constant: +0:290 1 (const int) +0:290 direct index ( temp float) +0:290 'inF0' ( in 4-component vector of float) +0:290 Constant: +0:290 2 (const int) +0:290 direct index ( temp float) +0:290 'inF1' ( in 4-component vector of float) +0:290 Constant: +0:290 3 (const int) +0:294 Sequence +0:294 move second child to first child ( temp 4-component vector of float) +0:294 'r029' ( temp 4-component vector of float) +0:294 exp ( temp 4-component vector of float) +0:294 'inF0' ( in 4-component vector of float) +0:295 Sequence +0:295 move second child to first child ( temp 4-component vector of float) +0:295 'r030' ( temp 4-component vector of float) +0:295 exp2 ( temp 4-component vector of float) +0:295 'inF0' ( in 4-component vector of float) +0:296 Sequence +0:296 move second child to first child ( temp 4-component vector of float) +0:296 'r031' ( temp 4-component vector of float) +0:296 face-forward ( temp 4-component vector of float) +0:296 'inF0' ( in 4-component vector of float) +0:296 'inF1' ( in 4-component vector of float) +0:296 'inF2' ( in 4-component vector of float) +0:297 Sequence +0:297 move second child to first child ( temp 4-component vector of uint) +0:297 'r032' ( temp 4-component vector of uint) 0:? findMSB ( temp 4-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 8 (const uint) 0:? 9 (const uint) 0:? 10 (const uint) -0:294 Sequence -0:294 move second child to first child ( temp 4-component vector of uint) -0:294 'r033' ( temp 4-component vector of uint) +0:298 Sequence +0:298 move second child to first child ( temp 4-component vector of uint) +0:298 'r033' ( temp 4-component vector of uint) 0:? findLSB ( temp 4-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 8 (const uint) 0:? 9 (const uint) 0:? 10 (const uint) -0:295 Sequence -0:295 move second child to first child ( temp 4-component vector of float) -0:295 'r034' ( temp 4-component vector of float) -0:295 Floor ( temp 4-component vector of float) -0:295 'inF0' ( in 4-component vector of float) -0:297 Sequence -0:297 move second child to first child ( temp 4-component vector of float) -0:297 'r036' ( temp 4-component vector of float) -0:297 mod ( temp 4-component vector of float) -0:297 'inF0' ( in 4-component vector of float) -0:297 'inF1' ( in 4-component vector of float) -0:298 Sequence -0:298 move second child to first child ( temp 4-component vector of float) -0:298 'r037' ( temp 4-component vector of float) -0:298 Fraction ( temp 4-component vector of float) -0:298 'inF0' ( in 4-component vector of float) 0:299 Sequence 0:299 move second child to first child ( temp 4-component vector of float) -0:299 'r039' ( temp 4-component vector of float) -0:299 fwidth ( temp 4-component vector of float) +0:299 'r034' ( temp 4-component vector of float) +0:299 Floor ( temp 4-component vector of float) 0:299 'inF0' ( in 4-component vector of float) -0:300 Sequence -0:300 move second child to first child ( temp 4-component vector of bool) -0:300 'r040' ( temp 4-component vector of bool) -0:300 isinf ( temp 4-component vector of bool) -0:300 'inF0' ( in 4-component vector of float) 0:301 Sequence -0:301 move second child to first child ( temp 4-component vector of bool) -0:301 'r041' ( temp 4-component vector of bool) -0:301 isnan ( temp 4-component vector of bool) +0:301 move second child to first child ( temp 4-component vector of float) +0:301 'r036' ( temp 4-component vector of float) +0:301 mod ( temp 4-component vector of float) 0:301 'inF0' ( in 4-component vector of float) +0:301 'inF1' ( in 4-component vector of float) 0:302 Sequence 0:302 move second child to first child ( temp 4-component vector of float) -0:302 'r042' ( temp 4-component vector of float) -0:302 ldexp ( temp 4-component vector of float) +0:302 'r037' ( temp 4-component vector of float) +0:302 Fraction ( temp 4-component vector of float) 0:302 'inF0' ( in 4-component vector of float) -0:302 'inF1' ( in 4-component vector of float) 0:303 Sequence 0:303 move second child to first child ( temp 4-component vector of float) -0:303 'r039a' ( temp 4-component vector of float) -0:303 mix ( temp 4-component vector of float) +0:303 'r039' ( temp 4-component vector of float) +0:303 fwidth ( temp 4-component vector of float) 0:303 'inF0' ( in 4-component vector of float) -0:303 'inF1' ( in 4-component vector of float) -0:303 'inF2' ( in 4-component vector of float) 0:304 Sequence -0:304 move second child to first child ( temp float) -0:304 'r043' ( temp float) -0:304 length ( temp float) +0:304 move second child to first child ( temp 4-component vector of bool) +0:304 'r040' ( temp 4-component vector of bool) +0:304 isinf ( temp 4-component vector of bool) 0:304 'inF0' ( in 4-component vector of float) 0:305 Sequence -0:305 move second child to first child ( temp 4-component vector of float) -0:305 'r044' ( temp 4-component vector of float) -0:305 log ( temp 4-component vector of float) +0:305 move second child to first child ( temp 4-component vector of bool) +0:305 'r041' ( temp 4-component vector of bool) +0:305 isnan ( temp 4-component vector of bool) 0:305 'inF0' ( in 4-component vector of float) 0:306 Sequence 0:306 move second child to first child ( temp 4-component vector of float) -0:306 'r045' ( temp 4-component vector of float) -0:306 vector-scale ( temp 4-component vector of float) -0:306 log2 ( temp 4-component vector of float) -0:306 'inF0' ( in 4-component vector of float) -0:306 Constant: -0:306 0.301030 +0:306 'r042' ( temp 4-component vector of float) +0:306 ldexp ( temp 4-component vector of float) +0:306 'inF0' ( in 4-component vector of float) +0:306 'inF1' ( in 4-component vector of float) 0:307 Sequence 0:307 move second child to first child ( temp 4-component vector of float) -0:307 'r046' ( temp 4-component vector of float) -0:307 log2 ( temp 4-component vector of float) +0:307 'r039a' ( temp 4-component vector of float) +0:307 mix ( temp 4-component vector of float) 0:307 'inF0' ( in 4-component vector of float) +0:307 'inF1' ( in 4-component vector of float) +0:307 'inF2' ( in 4-component vector of float) 0:308 Sequence -0:308 move second child to first child ( temp 4-component vector of float) -0:308 'r047' ( temp 4-component vector of float) -0:308 max ( temp 4-component vector of float) +0:308 move second child to first child ( temp float) +0:308 'r043' ( temp float) +0:308 length ( temp float) 0:308 'inF0' ( in 4-component vector of float) -0:308 'inF1' ( in 4-component vector of float) 0:309 Sequence 0:309 move second child to first child ( temp 4-component vector of float) -0:309 'r048' ( temp 4-component vector of float) -0:309 min ( temp 4-component vector of float) +0:309 'r044' ( temp 4-component vector of float) +0:309 log ( temp 4-component vector of float) 0:309 'inF0' ( in 4-component vector of float) -0:309 'inF1' ( in 4-component vector of float) 0:310 Sequence 0:310 move second child to first child ( temp 4-component vector of float) -0:310 'r049' ( temp 4-component vector of float) -0:310 normalize ( temp 4-component vector of float) -0:310 'inF0' ( in 4-component vector of float) +0:310 'r045' ( temp 4-component vector of float) +0:310 vector-scale ( temp 4-component vector of float) +0:310 log2 ( temp 4-component vector of float) +0:310 'inF0' ( in 4-component vector of float) +0:310 Constant: +0:310 0.301030 0:311 Sequence 0:311 move second child to first child ( temp 4-component vector of float) -0:311 'r050' ( temp 4-component vector of float) -0:311 pow ( temp 4-component vector of float) +0:311 'r046' ( temp 4-component vector of float) +0:311 log2 ( temp 4-component vector of float) 0:311 'inF0' ( in 4-component vector of float) -0:311 'inF1' ( in 4-component vector of float) 0:312 Sequence 0:312 move second child to first child ( temp 4-component vector of float) -0:312 'r051' ( temp 4-component vector of float) -0:312 radians ( temp 4-component vector of float) +0:312 'r047' ( temp 4-component vector of float) +0:312 max ( temp 4-component vector of float) 0:312 'inF0' ( in 4-component vector of float) +0:312 'inF1' ( in 4-component vector of float) 0:313 Sequence 0:313 move second child to first child ( temp 4-component vector of float) -0:313 'r052' ( temp 4-component vector of float) -0:313 divide ( temp 4-component vector of float) -0:313 Constant: -0:313 1.000000 +0:313 'r048' ( temp 4-component vector of float) +0:313 min ( temp 4-component vector of float) 0:313 'inF0' ( in 4-component vector of float) +0:313 'inF1' ( in 4-component vector of float) 0:314 Sequence 0:314 move second child to first child ( temp 4-component vector of float) -0:314 'r053' ( temp 4-component vector of float) -0:314 reflect ( temp 4-component vector of float) +0:314 'r049' ( temp 4-component vector of float) +0:314 normalize ( temp 4-component vector of float) 0:314 'inF0' ( in 4-component vector of float) -0:314 'inF1' ( in 4-component vector of float) 0:315 Sequence 0:315 move second child to first child ( temp 4-component vector of float) -0:315 'r054' ( temp 4-component vector of float) -0:315 refract ( temp 4-component vector of float) +0:315 'r050' ( temp 4-component vector of float) +0:315 pow ( temp 4-component vector of float) 0:315 'inF0' ( in 4-component vector of float) 0:315 'inF1' ( in 4-component vector of float) -0:315 Constant: -0:315 2.000000 0:316 Sequence -0:316 move second child to first child ( temp 4-component vector of uint) -0:316 'r055' ( temp 4-component vector of uint) +0:316 move second child to first child ( temp 4-component vector of float) +0:316 'r051' ( temp 4-component vector of float) +0:316 radians ( temp 4-component vector of float) +0:316 'inF0' ( in 4-component vector of float) +0:317 Sequence +0:317 move second child to first child ( temp 4-component vector of float) +0:317 'r052' ( temp 4-component vector of float) +0:317 divide ( temp 4-component vector of float) +0:317 Constant: +0:317 1.000000 +0:317 'inF0' ( in 4-component vector of float) +0:318 Sequence +0:318 move second child to first child ( temp 4-component vector of float) +0:318 'r053' ( temp 4-component vector of float) +0:318 reflect ( temp 4-component vector of float) +0:318 'inF0' ( in 4-component vector of float) +0:318 'inF1' ( in 4-component vector of float) +0:319 Sequence +0:319 move second child to first child ( temp 4-component vector of float) +0:319 'r054' ( temp 4-component vector of float) +0:319 refract ( temp 4-component vector of float) +0:319 'inF0' ( in 4-component vector of float) +0:319 'inF1' ( in 4-component vector of float) +0:319 Constant: +0:319 2.000000 +0:320 Sequence +0:320 move second child to first child ( temp 4-component vector of uint) +0:320 'r055' ( temp 4-component vector of uint) 0:? bitFieldReverse ( temp 4-component vector of uint) 0:? Constant: 0:? 1 (const uint) 0:? 2 (const uint) 0:? 3 (const uint) 0:? 4 (const uint) -0:317 Sequence -0:317 move second child to first child ( temp 4-component vector of float) -0:317 'r056' ( temp 4-component vector of float) -0:317 roundEven ( temp 4-component vector of float) -0:317 'inF0' ( in 4-component vector of float) -0:318 Sequence -0:318 move second child to first child ( temp 4-component vector of float) -0:318 'r057' ( temp 4-component vector of float) -0:318 inverse sqrt ( temp 4-component vector of float) -0:318 'inF0' ( in 4-component vector of float) -0:319 Sequence -0:319 move second child to first child ( temp 4-component vector of float) -0:319 'r058' ( temp 4-component vector of float) -0:319 clamp ( temp 4-component vector of float) -0:319 'inF0' ( in 4-component vector of float) -0:319 Constant: -0:319 0.000000 -0:319 Constant: -0:319 1.000000 -0:320 Sequence -0:320 move second child to first child ( temp 4-component vector of float) -0:320 'r059' ( temp 4-component vector of float) -0:320 Sign ( temp 4-component vector of float) -0:320 'inF0' ( in 4-component vector of float) 0:321 Sequence 0:321 move second child to first child ( temp 4-component vector of float) -0:321 'r060' ( temp 4-component vector of float) -0:321 sine ( temp 4-component vector of float) +0:321 'r056' ( temp 4-component vector of float) +0:321 roundEven ( temp 4-component vector of float) 0:321 'inF0' ( in 4-component vector of float) 0:322 Sequence 0:322 move second child to first child ( temp 4-component vector of float) -0:322 'inF1' ( in 4-component vector of float) -0:322 sine ( temp 4-component vector of float) -0:322 'inF0' ( in 4-component vector of float) -0:322 move second child to first child ( temp 4-component vector of float) -0:322 'inF2' ( in 4-component vector of float) -0:322 cosine ( temp 4-component vector of float) +0:322 'r057' ( temp 4-component vector of float) +0:322 inverse sqrt ( temp 4-component vector of float) 0:322 'inF0' ( in 4-component vector of float) 0:323 Sequence 0:323 move second child to first child ( temp 4-component vector of float) -0:323 'r061' ( temp 4-component vector of float) -0:323 hyp. sine ( temp 4-component vector of float) +0:323 'r058' ( temp 4-component vector of float) +0:323 clamp ( temp 4-component vector of float) 0:323 'inF0' ( in 4-component vector of float) +0:323 Constant: +0:323 0.000000 +0:323 Constant: +0:323 1.000000 0:324 Sequence 0:324 move second child to first child ( temp 4-component vector of float) -0:324 'r062' ( temp 4-component vector of float) -0:324 smoothstep ( temp 4-component vector of float) +0:324 'r059' ( temp 4-component vector of float) +0:324 Sign ( temp 4-component vector of float) 0:324 'inF0' ( in 4-component vector of float) -0:324 'inF1' ( in 4-component vector of float) -0:324 'inF2' ( in 4-component vector of float) 0:325 Sequence 0:325 move second child to first child ( temp 4-component vector of float) -0:325 'r063' ( temp 4-component vector of float) -0:325 sqrt ( temp 4-component vector of float) +0:325 'r060' ( temp 4-component vector of float) +0:325 sine ( temp 4-component vector of float) 0:325 'inF0' ( in 4-component vector of float) 0:326 Sequence 0:326 move second child to first child ( temp 4-component vector of float) -0:326 'r064' ( temp 4-component vector of float) -0:326 step ( temp 4-component vector of float) +0:326 'inF1' ( in 4-component vector of float) +0:326 sine ( temp 4-component vector of float) +0:326 'inF0' ( in 4-component vector of float) +0:326 move second child to first child ( temp 4-component vector of float) +0:326 'inF2' ( in 4-component vector of float) +0:326 cosine ( temp 4-component vector of float) 0:326 'inF0' ( in 4-component vector of float) -0:326 'inF1' ( in 4-component vector of float) 0:327 Sequence 0:327 move second child to first child ( temp 4-component vector of float) -0:327 'r065' ( temp 4-component vector of float) -0:327 tangent ( temp 4-component vector of float) +0:327 'r061' ( temp 4-component vector of float) +0:327 hyp. sine ( temp 4-component vector of float) 0:327 'inF0' ( in 4-component vector of float) 0:328 Sequence 0:328 move second child to first child ( temp 4-component vector of float) -0:328 'r066' ( temp 4-component vector of float) -0:328 hyp. tangent ( temp 4-component vector of float) +0:328 'r062' ( temp 4-component vector of float) +0:328 smoothstep ( temp 4-component vector of float) 0:328 'inF0' ( in 4-component vector of float) +0:328 'inF1' ( in 4-component vector of float) +0:328 'inF2' ( in 4-component vector of float) +0:329 Sequence +0:329 move second child to first child ( temp 4-component vector of float) +0:329 'r063' ( temp 4-component vector of float) +0:329 sqrt ( temp 4-component vector of float) +0:329 'inF0' ( in 4-component vector of float) 0:330 Sequence 0:330 move second child to first child ( temp 4-component vector of float) -0:330 'r067' ( temp 4-component vector of float) -0:330 trunc ( temp 4-component vector of float) +0:330 'r064' ( temp 4-component vector of float) +0:330 step ( temp 4-component vector of float) 0:330 'inF0' ( in 4-component vector of float) -0:333 Branch: Return with expression +0:330 'inF1' ( in 4-component vector of float) +0:331 Sequence +0:331 move second child to first child ( temp 4-component vector of float) +0:331 'r065' ( temp 4-component vector of float) +0:331 tangent ( temp 4-component vector of float) +0:331 'inF0' ( in 4-component vector of float) +0:332 Sequence +0:332 move second child to first child ( temp 4-component vector of float) +0:332 'r066' ( temp 4-component vector of float) +0:332 hyp. tangent ( temp 4-component vector of float) +0:332 'inF0' ( in 4-component vector of float) +0:334 Sequence +0:334 move second child to first child ( temp 4-component vector of float) +0:334 'r067' ( temp 4-component vector of float) +0:334 trunc ( temp 4-component vector of float) +0:334 'inF0' ( in 4-component vector of float) +0:337 Branch: Return with expression 0:? Constant: 0:? 1.000000 0:? 2.000000 0:? 3.000000 0:? 4.000000 -0:396 Function Definition: PixelShaderFunction2x2(mf22;mf22;mf22; ( temp 2X2 matrix of float) -0:396 Function Parameters: -0:396 'inF0' ( in 2X2 matrix of float) -0:396 'inF1' ( in 2X2 matrix of float) -0:396 'inF2' ( in 2X2 matrix of float) +0:400 Function Definition: PixelShaderFunction2x2(mf22;mf22;mf22; ( temp 2X2 matrix of float) +0:400 Function Parameters: +0:400 'inF0' ( in 2X2 matrix of float) +0:400 'inF1' ( in 2X2 matrix of float) +0:400 'inF2' ( in 2X2 matrix of float) 0:? Sequence -0:398 Sequence -0:398 move second child to first child ( temp bool) -0:398 'r000' ( temp bool) -0:398 all ( temp bool) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r001' ( temp 2X2 matrix of float) -0:398 Absolute value ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 arc cosine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp bool) -0:398 'r003' ( temp bool) -0:398 any ( temp bool) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r004' ( temp 2X2 matrix of float) -0:398 arc sine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r005' ( temp 2X2 matrix of float) -0:398 arc tangent ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r006' ( temp 2X2 matrix of float) -0:398 arc tangent ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r007' ( temp 2X2 matrix of float) -0:398 Ceiling ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Test condition and select ( temp void) -0:398 Condition -0:398 any ( temp bool) -0:398 Compare Less Than ( temp 2X2 matrix of bool) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Constant: -0:398 0.000000 -0:398 0.000000 -0:398 0.000000 -0:398 0.000000 -0:398 true case -0:398 Branch: Kill -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r008' ( temp 2X2 matrix of float) -0:398 clamp ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 'inF2' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r009' ( temp 2X2 matrix of float) -0:398 cosine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r010' ( temp 2X2 matrix of float) -0:398 hyp. cosine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r011' ( temp 2X2 matrix of float) -0:398 dPdx ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r012' ( temp 2X2 matrix of float) -0:398 dPdxCoarse ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r013' ( temp 2X2 matrix of float) -0:398 dPdxFine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r014' ( temp 2X2 matrix of float) -0:398 dPdy ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r015' ( temp 2X2 matrix of float) -0:398 dPdyCoarse ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r016' ( temp 2X2 matrix of float) -0:398 dPdyFine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r017' ( temp 2X2 matrix of float) -0:398 degrees ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp float) -0:398 'r018' ( temp float) -0:398 determinant ( temp float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r019' ( temp 2X2 matrix of float) -0:398 exp ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'R020' ( temp 2X2 matrix of float) -0:398 exp2 ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r021' ( temp 2X2 matrix of float) -0:398 Floor ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r022' ( temp 2X2 matrix of float) -0:398 mod ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r023' ( temp 2X2 matrix of float) -0:398 Fraction ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r025' ( temp 2X2 matrix of float) -0:398 fwidth ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r026' ( temp 2X2 matrix of float) -0:398 ldexp ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r026a' ( temp 2X2 matrix of float) -0:398 mix ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 'inF2' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r027' ( temp 2X2 matrix of float) -0:398 log ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r028' ( temp 2X2 matrix of float) -0:398 matrix-scale ( temp 2X2 matrix of float) -0:398 log2 ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Constant: -0:398 0.301030 -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r029' ( temp 2X2 matrix of float) -0:398 log2 ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r030' ( temp 2X2 matrix of float) -0:398 max ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r031' ( temp 2X2 matrix of float) -0:398 min ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r032' ( temp 2X2 matrix of float) -0:398 pow ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r033' ( temp 2X2 matrix of float) -0:398 radians ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r034' ( temp 2X2 matrix of float) -0:398 roundEven ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r035' ( temp 2X2 matrix of float) -0:398 inverse sqrt ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r036' ( temp 2X2 matrix of float) -0:398 clamp ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Constant: -0:398 0.000000 -0:398 Constant: -0:398 1.000000 -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r037' ( temp 2X2 matrix of float) -0:398 Sign ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r038' ( temp 2X2 matrix of float) -0:398 sine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 sine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'inF2' ( in 2X2 matrix of float) -0:398 cosine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r039' ( temp 2X2 matrix of float) -0:398 hyp. sine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r049' ( temp 2X2 matrix of float) -0:398 smoothstep ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 'inF2' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r041' ( temp 2X2 matrix of float) -0:398 sqrt ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r042' ( temp 2X2 matrix of float) -0:398 step ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r043' ( temp 2X2 matrix of float) -0:398 tangent ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r044' ( temp 2X2 matrix of float) -0:398 hyp. tangent ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 transpose ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r046' ( temp 2X2 matrix of float) -0:398 trunc ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:401 Branch: Return with expression +0:402 Sequence +0:402 move second child to first child ( temp bool) +0:402 'r000' ( temp bool) +0:402 all ( temp bool) +0:402 Convert float to bool ( temp 2X2 matrix of bool) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r001' ( temp 2X2 matrix of float) +0:402 Absolute value ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 arc cosine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp bool) +0:402 'r003' ( temp bool) +0:402 any ( temp bool) +0:402 Convert float to bool ( temp 2X2 matrix of bool) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r004' ( temp 2X2 matrix of float) +0:402 arc sine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r005' ( temp 2X2 matrix of float) +0:402 arc tangent ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r006' ( temp 2X2 matrix of float) +0:402 arc tangent ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r007' ( temp 2X2 matrix of float) +0:402 Ceiling ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Test condition and select ( temp void) +0:402 Condition +0:402 any ( temp bool) +0:402 Compare Less Than ( temp 2X2 matrix of bool) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Constant: +0:402 0.000000 +0:402 0.000000 +0:402 0.000000 +0:402 0.000000 +0:402 true case +0:402 Branch: Kill +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r008' ( temp 2X2 matrix of float) +0:402 clamp ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 'inF2' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r009' ( temp 2X2 matrix of float) +0:402 cosine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r010' ( temp 2X2 matrix of float) +0:402 hyp. cosine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r011' ( temp 2X2 matrix of float) +0:402 dPdx ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r012' ( temp 2X2 matrix of float) +0:402 dPdxCoarse ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r013' ( temp 2X2 matrix of float) +0:402 dPdxFine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r014' ( temp 2X2 matrix of float) +0:402 dPdy ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r015' ( temp 2X2 matrix of float) +0:402 dPdyCoarse ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r016' ( temp 2X2 matrix of float) +0:402 dPdyFine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r017' ( temp 2X2 matrix of float) +0:402 degrees ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp float) +0:402 'r018' ( temp float) +0:402 determinant ( temp float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r019' ( temp 2X2 matrix of float) +0:402 exp ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'R020' ( temp 2X2 matrix of float) +0:402 exp2 ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r021' ( temp 2X2 matrix of float) +0:402 Floor ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r022' ( temp 2X2 matrix of float) +0:402 mod ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r023' ( temp 2X2 matrix of float) +0:402 Fraction ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r025' ( temp 2X2 matrix of float) +0:402 fwidth ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r026' ( temp 2X2 matrix of float) +0:402 ldexp ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r026a' ( temp 2X2 matrix of float) +0:402 mix ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 'inF2' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r027' ( temp 2X2 matrix of float) +0:402 log ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r028' ( temp 2X2 matrix of float) +0:402 matrix-scale ( temp 2X2 matrix of float) +0:402 log2 ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Constant: +0:402 0.301030 +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r029' ( temp 2X2 matrix of float) +0:402 log2 ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r030' ( temp 2X2 matrix of float) +0:402 max ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r031' ( temp 2X2 matrix of float) +0:402 min ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r032' ( temp 2X2 matrix of float) +0:402 pow ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r033' ( temp 2X2 matrix of float) +0:402 radians ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r034' ( temp 2X2 matrix of float) +0:402 roundEven ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r035' ( temp 2X2 matrix of float) +0:402 inverse sqrt ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r036' ( temp 2X2 matrix of float) +0:402 clamp ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Constant: +0:402 0.000000 +0:402 Constant: +0:402 1.000000 +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r037' ( temp 2X2 matrix of float) +0:402 Sign ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r038' ( temp 2X2 matrix of float) +0:402 sine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 sine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'inF2' ( in 2X2 matrix of float) +0:402 cosine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r039' ( temp 2X2 matrix of float) +0:402 hyp. sine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r049' ( temp 2X2 matrix of float) +0:402 smoothstep ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 'inF2' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r041' ( temp 2X2 matrix of float) +0:402 sqrt ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r042' ( temp 2X2 matrix of float) +0:402 step ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r043' ( temp 2X2 matrix of float) +0:402 tangent ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r044' ( temp 2X2 matrix of float) +0:402 hyp. tangent ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 transpose ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r046' ( temp 2X2 matrix of float) +0:402 trunc ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:405 Branch: Return with expression 0:? Constant: 0:? 2.000000 0:? 2.000000 0:? 2.000000 0:? 2.000000 -0:405 Function Definition: PixelShaderFunction3x3(mf33;mf33;mf33; ( temp 3X3 matrix of float) -0:405 Function Parameters: -0:405 'inF0' ( in 3X3 matrix of float) -0:405 'inF1' ( in 3X3 matrix of float) -0:405 'inF2' ( in 3X3 matrix of float) +0:409 Function Definition: PixelShaderFunction3x3(mf33;mf33;mf33; ( temp 3X3 matrix of float) +0:409 Function Parameters: +0:409 'inF0' ( in 3X3 matrix of float) +0:409 'inF1' ( in 3X3 matrix of float) +0:409 'inF2' ( in 3X3 matrix of float) 0:? Sequence -0:407 Sequence -0:407 move second child to first child ( temp bool) -0:407 'r000' ( temp bool) -0:407 all ( temp bool) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r001' ( temp 3X3 matrix of float) -0:407 Absolute value ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 arc cosine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp bool) -0:407 'r003' ( temp bool) -0:407 any ( temp bool) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r004' ( temp 3X3 matrix of float) -0:407 arc sine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r005' ( temp 3X3 matrix of float) -0:407 arc tangent ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r006' ( temp 3X3 matrix of float) -0:407 arc tangent ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r007' ( temp 3X3 matrix of float) -0:407 Ceiling ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Test condition and select ( temp void) -0:407 Condition -0:407 any ( temp bool) -0:407 Compare Less Than ( temp 3X3 matrix of bool) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Constant: -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 true case -0:407 Branch: Kill -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r008' ( temp 3X3 matrix of float) -0:407 clamp ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 'inF2' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r009' ( temp 3X3 matrix of float) -0:407 cosine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r010' ( temp 3X3 matrix of float) -0:407 hyp. cosine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r011' ( temp 3X3 matrix of float) -0:407 dPdx ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r012' ( temp 3X3 matrix of float) -0:407 dPdxCoarse ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r013' ( temp 3X3 matrix of float) -0:407 dPdxFine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r014' ( temp 3X3 matrix of float) -0:407 dPdy ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r015' ( temp 3X3 matrix of float) -0:407 dPdyCoarse ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r016' ( temp 3X3 matrix of float) -0:407 dPdyFine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r017' ( temp 3X3 matrix of float) -0:407 degrees ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp float) -0:407 'r018' ( temp float) -0:407 determinant ( temp float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r019' ( temp 3X3 matrix of float) -0:407 exp ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'R020' ( temp 3X3 matrix of float) -0:407 exp2 ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r021' ( temp 3X3 matrix of float) -0:407 Floor ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r022' ( temp 3X3 matrix of float) -0:407 mod ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r023' ( temp 3X3 matrix of float) -0:407 Fraction ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r025' ( temp 3X3 matrix of float) -0:407 fwidth ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r026' ( temp 3X3 matrix of float) -0:407 ldexp ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r026a' ( temp 3X3 matrix of float) -0:407 mix ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 'inF2' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r027' ( temp 3X3 matrix of float) -0:407 log ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r028' ( temp 3X3 matrix of float) -0:407 matrix-scale ( temp 3X3 matrix of float) -0:407 log2 ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Constant: -0:407 0.301030 -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r029' ( temp 3X3 matrix of float) -0:407 log2 ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r030' ( temp 3X3 matrix of float) -0:407 max ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r031' ( temp 3X3 matrix of float) -0:407 min ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r032' ( temp 3X3 matrix of float) -0:407 pow ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r033' ( temp 3X3 matrix of float) -0:407 radians ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r034' ( temp 3X3 matrix of float) -0:407 roundEven ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r035' ( temp 3X3 matrix of float) -0:407 inverse sqrt ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r036' ( temp 3X3 matrix of float) -0:407 clamp ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Constant: -0:407 0.000000 -0:407 Constant: -0:407 1.000000 -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r037' ( temp 3X3 matrix of float) -0:407 Sign ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r038' ( temp 3X3 matrix of float) -0:407 sine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 sine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'inF2' ( in 3X3 matrix of float) -0:407 cosine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r039' ( temp 3X3 matrix of float) -0:407 hyp. sine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r049' ( temp 3X3 matrix of float) -0:407 smoothstep ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 'inF2' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r041' ( temp 3X3 matrix of float) -0:407 sqrt ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r042' ( temp 3X3 matrix of float) -0:407 step ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r043' ( temp 3X3 matrix of float) -0:407 tangent ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r044' ( temp 3X3 matrix of float) -0:407 hyp. tangent ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 transpose ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r046' ( temp 3X3 matrix of float) -0:407 trunc ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:410 Branch: Return with expression +0:411 Sequence +0:411 move second child to first child ( temp bool) +0:411 'r000' ( temp bool) +0:411 all ( temp bool) +0:411 Convert float to bool ( temp 3X3 matrix of bool) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r001' ( temp 3X3 matrix of float) +0:411 Absolute value ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 arc cosine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp bool) +0:411 'r003' ( temp bool) +0:411 any ( temp bool) +0:411 Convert float to bool ( temp 3X3 matrix of bool) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r004' ( temp 3X3 matrix of float) +0:411 arc sine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r005' ( temp 3X3 matrix of float) +0:411 arc tangent ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r006' ( temp 3X3 matrix of float) +0:411 arc tangent ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r007' ( temp 3X3 matrix of float) +0:411 Ceiling ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Test condition and select ( temp void) +0:411 Condition +0:411 any ( temp bool) +0:411 Compare Less Than ( temp 3X3 matrix of bool) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Constant: +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 true case +0:411 Branch: Kill +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r008' ( temp 3X3 matrix of float) +0:411 clamp ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 'inF2' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r009' ( temp 3X3 matrix of float) +0:411 cosine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r010' ( temp 3X3 matrix of float) +0:411 hyp. cosine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r011' ( temp 3X3 matrix of float) +0:411 dPdx ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r012' ( temp 3X3 matrix of float) +0:411 dPdxCoarse ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r013' ( temp 3X3 matrix of float) +0:411 dPdxFine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r014' ( temp 3X3 matrix of float) +0:411 dPdy ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r015' ( temp 3X3 matrix of float) +0:411 dPdyCoarse ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r016' ( temp 3X3 matrix of float) +0:411 dPdyFine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r017' ( temp 3X3 matrix of float) +0:411 degrees ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp float) +0:411 'r018' ( temp float) +0:411 determinant ( temp float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r019' ( temp 3X3 matrix of float) +0:411 exp ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'R020' ( temp 3X3 matrix of float) +0:411 exp2 ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r021' ( temp 3X3 matrix of float) +0:411 Floor ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r022' ( temp 3X3 matrix of float) +0:411 mod ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r023' ( temp 3X3 matrix of float) +0:411 Fraction ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r025' ( temp 3X3 matrix of float) +0:411 fwidth ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r026' ( temp 3X3 matrix of float) +0:411 ldexp ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r026a' ( temp 3X3 matrix of float) +0:411 mix ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 'inF2' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r027' ( temp 3X3 matrix of float) +0:411 log ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r028' ( temp 3X3 matrix of float) +0:411 matrix-scale ( temp 3X3 matrix of float) +0:411 log2 ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Constant: +0:411 0.301030 +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r029' ( temp 3X3 matrix of float) +0:411 log2 ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r030' ( temp 3X3 matrix of float) +0:411 max ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r031' ( temp 3X3 matrix of float) +0:411 min ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r032' ( temp 3X3 matrix of float) +0:411 pow ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r033' ( temp 3X3 matrix of float) +0:411 radians ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r034' ( temp 3X3 matrix of float) +0:411 roundEven ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r035' ( temp 3X3 matrix of float) +0:411 inverse sqrt ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r036' ( temp 3X3 matrix of float) +0:411 clamp ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Constant: +0:411 0.000000 +0:411 Constant: +0:411 1.000000 +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r037' ( temp 3X3 matrix of float) +0:411 Sign ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r038' ( temp 3X3 matrix of float) +0:411 sine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 sine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'inF2' ( in 3X3 matrix of float) +0:411 cosine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r039' ( temp 3X3 matrix of float) +0:411 hyp. sine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r049' ( temp 3X3 matrix of float) +0:411 smoothstep ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 'inF2' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r041' ( temp 3X3 matrix of float) +0:411 sqrt ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r042' ( temp 3X3 matrix of float) +0:411 step ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r043' ( temp 3X3 matrix of float) +0:411 tangent ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r044' ( temp 3X3 matrix of float) +0:411 hyp. tangent ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 transpose ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r046' ( temp 3X3 matrix of float) +0:411 trunc ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:414 Branch: Return with expression 0:? Constant: 0:? 3.000000 0:? 3.000000 @@ -2109,295 +2162,297 @@ gl_FragCoord origin is upper left 0:? 3.000000 0:? 3.000000 0:? 3.000000 -0:414 Function Definition: PixelShaderFunction4x4(mf44;mf44;mf44; ( temp 4X4 matrix of float) -0:414 Function Parameters: -0:414 'inF0' ( in 4X4 matrix of float) -0:414 'inF1' ( in 4X4 matrix of float) -0:414 'inF2' ( in 4X4 matrix of float) +0:418 Function Definition: PixelShaderFunction4x4(mf44;mf44;mf44; ( temp 4X4 matrix of float) +0:418 Function Parameters: +0:418 'inF0' ( in 4X4 matrix of float) +0:418 'inF1' ( in 4X4 matrix of float) +0:418 'inF2' ( in 4X4 matrix of float) 0:? Sequence -0:416 Sequence -0:416 move second child to first child ( temp bool) -0:416 'r000' ( temp bool) -0:416 all ( temp bool) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r001' ( temp 4X4 matrix of float) -0:416 Absolute value ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 arc cosine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp bool) -0:416 'r003' ( temp bool) -0:416 any ( temp bool) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r004' ( temp 4X4 matrix of float) -0:416 arc sine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r005' ( temp 4X4 matrix of float) -0:416 arc tangent ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r006' ( temp 4X4 matrix of float) -0:416 arc tangent ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r007' ( temp 4X4 matrix of float) -0:416 Ceiling ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Test condition and select ( temp void) -0:416 Condition -0:416 any ( temp bool) -0:416 Compare Less Than ( temp 4X4 matrix of bool) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Constant: -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 true case -0:416 Branch: Kill -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r008' ( temp 4X4 matrix of float) -0:416 clamp ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 'inF2' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r009' ( temp 4X4 matrix of float) -0:416 cosine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r010' ( temp 4X4 matrix of float) -0:416 hyp. cosine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r011' ( temp 4X4 matrix of float) -0:416 dPdx ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r012' ( temp 4X4 matrix of float) -0:416 dPdxCoarse ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r013' ( temp 4X4 matrix of float) -0:416 dPdxFine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r014' ( temp 4X4 matrix of float) -0:416 dPdy ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r015' ( temp 4X4 matrix of float) -0:416 dPdyCoarse ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r016' ( temp 4X4 matrix of float) -0:416 dPdyFine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r017' ( temp 4X4 matrix of float) -0:416 degrees ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp float) -0:416 'r018' ( temp float) -0:416 determinant ( temp float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r019' ( temp 4X4 matrix of float) -0:416 exp ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'R020' ( temp 4X4 matrix of float) -0:416 exp2 ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r021' ( temp 4X4 matrix of float) -0:416 Floor ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r022' ( temp 4X4 matrix of float) -0:416 mod ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r023' ( temp 4X4 matrix of float) -0:416 Fraction ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r025' ( temp 4X4 matrix of float) -0:416 fwidth ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r026' ( temp 4X4 matrix of float) -0:416 ldexp ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r026a' ( temp 4X4 matrix of float) -0:416 mix ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 'inF2' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r027' ( temp 4X4 matrix of float) -0:416 log ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r028' ( temp 4X4 matrix of float) -0:416 matrix-scale ( temp 4X4 matrix of float) -0:416 log2 ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Constant: -0:416 0.301030 -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r029' ( temp 4X4 matrix of float) -0:416 log2 ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r030' ( temp 4X4 matrix of float) -0:416 max ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r031' ( temp 4X4 matrix of float) -0:416 min ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r032' ( temp 4X4 matrix of float) -0:416 pow ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r033' ( temp 4X4 matrix of float) -0:416 radians ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r034' ( temp 4X4 matrix of float) -0:416 roundEven ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r035' ( temp 4X4 matrix of float) -0:416 inverse sqrt ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r036' ( temp 4X4 matrix of float) -0:416 clamp ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Constant: -0:416 0.000000 -0:416 Constant: -0:416 1.000000 -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r037' ( temp 4X4 matrix of float) -0:416 Sign ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r038' ( temp 4X4 matrix of float) -0:416 sine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 sine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'inF2' ( in 4X4 matrix of float) -0:416 cosine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r039' ( temp 4X4 matrix of float) -0:416 hyp. sine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r049' ( temp 4X4 matrix of float) -0:416 smoothstep ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 'inF2' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r041' ( temp 4X4 matrix of float) -0:416 sqrt ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r042' ( temp 4X4 matrix of float) -0:416 step ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r043' ( temp 4X4 matrix of float) -0:416 tangent ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r044' ( temp 4X4 matrix of float) -0:416 hyp. tangent ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 transpose ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r046' ( temp 4X4 matrix of float) -0:416 trunc ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:419 Branch: Return with expression +0:420 Sequence +0:420 move second child to first child ( temp bool) +0:420 'r000' ( temp bool) +0:420 all ( temp bool) +0:420 Convert float to bool ( temp 4X4 matrix of bool) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r001' ( temp 4X4 matrix of float) +0:420 Absolute value ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 arc cosine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp bool) +0:420 'r003' ( temp bool) +0:420 any ( temp bool) +0:420 Convert float to bool ( temp 4X4 matrix of bool) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r004' ( temp 4X4 matrix of float) +0:420 arc sine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r005' ( temp 4X4 matrix of float) +0:420 arc tangent ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r006' ( temp 4X4 matrix of float) +0:420 arc tangent ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r007' ( temp 4X4 matrix of float) +0:420 Ceiling ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Test condition and select ( temp void) +0:420 Condition +0:420 any ( temp bool) +0:420 Compare Less Than ( temp 4X4 matrix of bool) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Constant: +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 true case +0:420 Branch: Kill +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r008' ( temp 4X4 matrix of float) +0:420 clamp ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 'inF2' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r009' ( temp 4X4 matrix of float) +0:420 cosine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r010' ( temp 4X4 matrix of float) +0:420 hyp. cosine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r011' ( temp 4X4 matrix of float) +0:420 dPdx ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r012' ( temp 4X4 matrix of float) +0:420 dPdxCoarse ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r013' ( temp 4X4 matrix of float) +0:420 dPdxFine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r014' ( temp 4X4 matrix of float) +0:420 dPdy ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r015' ( temp 4X4 matrix of float) +0:420 dPdyCoarse ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r016' ( temp 4X4 matrix of float) +0:420 dPdyFine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r017' ( temp 4X4 matrix of float) +0:420 degrees ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp float) +0:420 'r018' ( temp float) +0:420 determinant ( temp float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r019' ( temp 4X4 matrix of float) +0:420 exp ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'R020' ( temp 4X4 matrix of float) +0:420 exp2 ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r021' ( temp 4X4 matrix of float) +0:420 Floor ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r022' ( temp 4X4 matrix of float) +0:420 mod ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r023' ( temp 4X4 matrix of float) +0:420 Fraction ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r025' ( temp 4X4 matrix of float) +0:420 fwidth ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r026' ( temp 4X4 matrix of float) +0:420 ldexp ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r026a' ( temp 4X4 matrix of float) +0:420 mix ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 'inF2' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r027' ( temp 4X4 matrix of float) +0:420 log ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r028' ( temp 4X4 matrix of float) +0:420 matrix-scale ( temp 4X4 matrix of float) +0:420 log2 ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Constant: +0:420 0.301030 +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r029' ( temp 4X4 matrix of float) +0:420 log2 ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r030' ( temp 4X4 matrix of float) +0:420 max ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r031' ( temp 4X4 matrix of float) +0:420 min ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r032' ( temp 4X4 matrix of float) +0:420 pow ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r033' ( temp 4X4 matrix of float) +0:420 radians ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r034' ( temp 4X4 matrix of float) +0:420 roundEven ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r035' ( temp 4X4 matrix of float) +0:420 inverse sqrt ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r036' ( temp 4X4 matrix of float) +0:420 clamp ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Constant: +0:420 0.000000 +0:420 Constant: +0:420 1.000000 +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r037' ( temp 4X4 matrix of float) +0:420 Sign ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r038' ( temp 4X4 matrix of float) +0:420 sine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 sine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'inF2' ( in 4X4 matrix of float) +0:420 cosine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r039' ( temp 4X4 matrix of float) +0:420 hyp. sine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r049' ( temp 4X4 matrix of float) +0:420 smoothstep ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 'inF2' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r041' ( temp 4X4 matrix of float) +0:420 sqrt ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r042' ( temp 4X4 matrix of float) +0:420 step ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r043' ( temp 4X4 matrix of float) +0:420 tangent ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r044' ( temp 4X4 matrix of float) +0:420 hyp. tangent ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 transpose ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r046' ( temp 4X4 matrix of float) +0:420 trunc ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:423 Branch: Return with expression 0:? Constant: 0:? 4.000000 0:? 4.000000 @@ -2415,334 +2470,334 @@ gl_FragCoord origin is upper left 0:? 4.000000 0:? 4.000000 0:? 4.000000 -0:437 Function Definition: TestGenMul2(f1;f1;vf2;vf2;mf22;mf22; ( temp void) -0:437 Function Parameters: -0:437 'inF0' ( in float) -0:437 'inF1' ( in float) -0:437 'inFV0' ( in 2-component vector of float) -0:437 'inFV1' ( in 2-component vector of float) -0:437 'inFM0' ( in 2X2 matrix of float) -0:437 'inFM1' ( in 2X2 matrix of float) +0:441 Function Definition: TestGenMul2(f1;f1;vf2;vf2;mf22;mf22; ( temp void) +0:441 Function Parameters: +0:441 'inF0' ( in float) +0:441 'inF1' ( in float) +0:441 'inFV0' ( in 2-component vector of float) +0:441 'inFV1' ( in 2-component vector of float) +0:441 'inFM0' ( in 2X2 matrix of float) +0:441 'inFM1' ( in 2X2 matrix of float) 0:? Sequence -0:438 Sequence -0:438 move second child to first child ( temp float) -0:438 'r0' ( temp float) -0:438 component-wise multiply ( temp float) -0:438 'inF1' ( in float) -0:438 'inF0' ( in float) -0:438 Sequence -0:438 move second child to first child ( temp 2-component vector of float) -0:438 'r1' ( temp 2-component vector of float) -0:438 vector-scale ( temp 2-component vector of float) -0:438 'inF0' ( in float) -0:438 'inFV0' ( in 2-component vector of float) -0:438 Sequence -0:438 move second child to first child ( temp 2-component vector of float) -0:438 'r2' ( temp 2-component vector of float) -0:438 vector-scale ( temp 2-component vector of float) -0:438 'inFV0' ( in 2-component vector of float) -0:438 'inF0' ( in float) -0:438 Sequence -0:438 move second child to first child ( temp float) -0:438 'r3' ( temp float) -0:438 dot-product ( temp float) -0:438 'inFV0' ( in 2-component vector of float) -0:438 'inFV1' ( in 2-component vector of float) -0:438 Sequence -0:438 move second child to first child ( temp 2-component vector of float) -0:438 'r4' ( temp 2-component vector of float) -0:438 vector-times-matrix ( temp 2-component vector of float) -0:438 'inFV0' ( in 2-component vector of float) -0:438 'inFM0' ( in 2X2 matrix of float) -0:438 Sequence -0:438 move second child to first child ( temp 2-component vector of float) -0:438 'r5' ( temp 2-component vector of float) -0:438 matrix-times-vector ( temp 2-component vector of float) -0:438 'inFM0' ( in 2X2 matrix of float) -0:438 'inFV0' ( in 2-component vector of float) -0:438 Sequence -0:438 move second child to first child ( temp 2X2 matrix of float) -0:438 'r6' ( temp 2X2 matrix of float) -0:438 matrix-scale ( temp 2X2 matrix of float) -0:438 'inF0' ( in float) -0:438 'inFM0' ( in 2X2 matrix of float) -0:438 Sequence -0:438 move second child to first child ( temp 2X2 matrix of float) -0:438 'r7' ( temp 2X2 matrix of float) -0:438 matrix-scale ( temp 2X2 matrix of float) -0:438 'inFM0' ( in 2X2 matrix of float) -0:438 'inF0' ( in float) -0:438 Sequence -0:438 move second child to first child ( temp 2X2 matrix of float) -0:438 'r8' ( temp 2X2 matrix of float) -0:438 matrix-multiply ( temp 2X2 matrix of float) -0:438 'inFM1' ( in 2X2 matrix of float) -0:438 'inFM0' ( in 2X2 matrix of float) -0:444 Function Definition: TestGenMul3(f1;f1;vf3;vf3;mf33;mf33; ( temp void) -0:444 Function Parameters: -0:444 'inF0' ( in float) -0:444 'inF1' ( in float) -0:444 'inFV0' ( in 3-component vector of float) -0:444 'inFV1' ( in 3-component vector of float) -0:444 'inFM0' ( in 3X3 matrix of float) -0:444 'inFM1' ( in 3X3 matrix of float) +0:442 Sequence +0:442 move second child to first child ( temp float) +0:442 'r0' ( temp float) +0:442 component-wise multiply ( temp float) +0:442 'inF1' ( in float) +0:442 'inF0' ( in float) +0:442 Sequence +0:442 move second child to first child ( temp 2-component vector of float) +0:442 'r1' ( temp 2-component vector of float) +0:442 vector-scale ( temp 2-component vector of float) +0:442 'inF0' ( in float) +0:442 'inFV0' ( in 2-component vector of float) +0:442 Sequence +0:442 move second child to first child ( temp 2-component vector of float) +0:442 'r2' ( temp 2-component vector of float) +0:442 vector-scale ( temp 2-component vector of float) +0:442 'inFV0' ( in 2-component vector of float) +0:442 'inF0' ( in float) +0:442 Sequence +0:442 move second child to first child ( temp float) +0:442 'r3' ( temp float) +0:442 dot-product ( temp float) +0:442 'inFV0' ( in 2-component vector of float) +0:442 'inFV1' ( in 2-component vector of float) +0:442 Sequence +0:442 move second child to first child ( temp 2-component vector of float) +0:442 'r4' ( temp 2-component vector of float) +0:442 vector-times-matrix ( temp 2-component vector of float) +0:442 'inFV0' ( in 2-component vector of float) +0:442 'inFM0' ( in 2X2 matrix of float) +0:442 Sequence +0:442 move second child to first child ( temp 2-component vector of float) +0:442 'r5' ( temp 2-component vector of float) +0:442 matrix-times-vector ( temp 2-component vector of float) +0:442 'inFM0' ( in 2X2 matrix of float) +0:442 'inFV0' ( in 2-component vector of float) +0:442 Sequence +0:442 move second child to first child ( temp 2X2 matrix of float) +0:442 'r6' ( temp 2X2 matrix of float) +0:442 matrix-scale ( temp 2X2 matrix of float) +0:442 'inF0' ( in float) +0:442 'inFM0' ( in 2X2 matrix of float) +0:442 Sequence +0:442 move second child to first child ( temp 2X2 matrix of float) +0:442 'r7' ( temp 2X2 matrix of float) +0:442 matrix-scale ( temp 2X2 matrix of float) +0:442 'inFM0' ( in 2X2 matrix of float) +0:442 'inF0' ( in float) +0:442 Sequence +0:442 move second child to first child ( temp 2X2 matrix of float) +0:442 'r8' ( temp 2X2 matrix of float) +0:442 matrix-multiply ( temp 2X2 matrix of float) +0:442 'inFM1' ( in 2X2 matrix of float) +0:442 'inFM0' ( in 2X2 matrix of float) +0:448 Function Definition: TestGenMul3(f1;f1;vf3;vf3;mf33;mf33; ( temp void) +0:448 Function Parameters: +0:448 'inF0' ( in float) +0:448 'inF1' ( in float) +0:448 'inFV0' ( in 3-component vector of float) +0:448 'inFV1' ( in 3-component vector of float) +0:448 'inFM0' ( in 3X3 matrix of float) +0:448 'inFM1' ( in 3X3 matrix of float) 0:? Sequence -0:445 Sequence -0:445 move second child to first child ( temp float) -0:445 'r0' ( temp float) -0:445 component-wise multiply ( temp float) -0:445 'inF1' ( in float) -0:445 'inF0' ( in float) -0:445 Sequence -0:445 move second child to first child ( temp 3-component vector of float) -0:445 'r1' ( temp 3-component vector of float) -0:445 vector-scale ( temp 3-component vector of float) -0:445 'inF0' ( in float) -0:445 'inFV0' ( in 3-component vector of float) -0:445 Sequence -0:445 move second child to first child ( temp 3-component vector of float) -0:445 'r2' ( temp 3-component vector of float) -0:445 vector-scale ( temp 3-component vector of float) -0:445 'inFV0' ( in 3-component vector of float) -0:445 'inF0' ( in float) -0:445 Sequence -0:445 move second child to first child ( temp float) -0:445 'r3' ( temp float) -0:445 dot-product ( temp float) -0:445 'inFV0' ( in 3-component vector of float) -0:445 'inFV1' ( in 3-component vector of float) -0:445 Sequence -0:445 move second child to first child ( temp 3-component vector of float) -0:445 'r4' ( temp 3-component vector of float) -0:445 vector-times-matrix ( temp 3-component vector of float) -0:445 'inFV0' ( in 3-component vector of float) -0:445 'inFM0' ( in 3X3 matrix of float) -0:445 Sequence -0:445 move second child to first child ( temp 3-component vector of float) -0:445 'r5' ( temp 3-component vector of float) -0:445 matrix-times-vector ( temp 3-component vector of float) -0:445 'inFM0' ( in 3X3 matrix of float) -0:445 'inFV0' ( in 3-component vector of float) -0:445 Sequence -0:445 move second child to first child ( temp 3X3 matrix of float) -0:445 'r6' ( temp 3X3 matrix of float) -0:445 matrix-scale ( temp 3X3 matrix of float) -0:445 'inF0' ( in float) -0:445 'inFM0' ( in 3X3 matrix of float) -0:445 Sequence -0:445 move second child to first child ( temp 3X3 matrix of float) -0:445 'r7' ( temp 3X3 matrix of float) -0:445 matrix-scale ( temp 3X3 matrix of float) -0:445 'inFM0' ( in 3X3 matrix of float) -0:445 'inF0' ( in float) -0:445 Sequence -0:445 move second child to first child ( temp 3X3 matrix of float) -0:445 'r8' ( temp 3X3 matrix of float) -0:445 matrix-multiply ( temp 3X3 matrix of float) -0:445 'inFM1' ( in 3X3 matrix of float) -0:445 'inFM0' ( in 3X3 matrix of float) -0:451 Function Definition: TestGenMul4(f1;f1;vf4;vf4;mf44;mf44; ( temp void) -0:451 Function Parameters: -0:451 'inF0' ( in float) -0:451 'inF1' ( in float) -0:451 'inFV0' ( in 4-component vector of float) -0:451 'inFV1' ( in 4-component vector of float) -0:451 'inFM0' ( in 4X4 matrix of float) -0:451 'inFM1' ( in 4X4 matrix of float) +0:449 Sequence +0:449 move second child to first child ( temp float) +0:449 'r0' ( temp float) +0:449 component-wise multiply ( temp float) +0:449 'inF1' ( in float) +0:449 'inF0' ( in float) +0:449 Sequence +0:449 move second child to first child ( temp 3-component vector of float) +0:449 'r1' ( temp 3-component vector of float) +0:449 vector-scale ( temp 3-component vector of float) +0:449 'inF0' ( in float) +0:449 'inFV0' ( in 3-component vector of float) +0:449 Sequence +0:449 move second child to first child ( temp 3-component vector of float) +0:449 'r2' ( temp 3-component vector of float) +0:449 vector-scale ( temp 3-component vector of float) +0:449 'inFV0' ( in 3-component vector of float) +0:449 'inF0' ( in float) +0:449 Sequence +0:449 move second child to first child ( temp float) +0:449 'r3' ( temp float) +0:449 dot-product ( temp float) +0:449 'inFV0' ( in 3-component vector of float) +0:449 'inFV1' ( in 3-component vector of float) +0:449 Sequence +0:449 move second child to first child ( temp 3-component vector of float) +0:449 'r4' ( temp 3-component vector of float) +0:449 vector-times-matrix ( temp 3-component vector of float) +0:449 'inFV0' ( in 3-component vector of float) +0:449 'inFM0' ( in 3X3 matrix of float) +0:449 Sequence +0:449 move second child to first child ( temp 3-component vector of float) +0:449 'r5' ( temp 3-component vector of float) +0:449 matrix-times-vector ( temp 3-component vector of float) +0:449 'inFM0' ( in 3X3 matrix of float) +0:449 'inFV0' ( in 3-component vector of float) +0:449 Sequence +0:449 move second child to first child ( temp 3X3 matrix of float) +0:449 'r6' ( temp 3X3 matrix of float) +0:449 matrix-scale ( temp 3X3 matrix of float) +0:449 'inF0' ( in float) +0:449 'inFM0' ( in 3X3 matrix of float) +0:449 Sequence +0:449 move second child to first child ( temp 3X3 matrix of float) +0:449 'r7' ( temp 3X3 matrix of float) +0:449 matrix-scale ( temp 3X3 matrix of float) +0:449 'inFM0' ( in 3X3 matrix of float) +0:449 'inF0' ( in float) +0:449 Sequence +0:449 move second child to first child ( temp 3X3 matrix of float) +0:449 'r8' ( temp 3X3 matrix of float) +0:449 matrix-multiply ( temp 3X3 matrix of float) +0:449 'inFM1' ( in 3X3 matrix of float) +0:449 'inFM0' ( in 3X3 matrix of float) +0:455 Function Definition: TestGenMul4(f1;f1;vf4;vf4;mf44;mf44; ( temp void) +0:455 Function Parameters: +0:455 'inF0' ( in float) +0:455 'inF1' ( in float) +0:455 'inFV0' ( in 4-component vector of float) +0:455 'inFV1' ( in 4-component vector of float) +0:455 'inFM0' ( in 4X4 matrix of float) +0:455 'inFM1' ( in 4X4 matrix of float) 0:? Sequence -0:452 Sequence -0:452 move second child to first child ( temp float) -0:452 'r0' ( temp float) -0:452 component-wise multiply ( temp float) -0:452 'inF1' ( in float) -0:452 'inF0' ( in float) -0:452 Sequence -0:452 move second child to first child ( temp 4-component vector of float) -0:452 'r1' ( temp 4-component vector of float) -0:452 vector-scale ( temp 4-component vector of float) -0:452 'inF0' ( in float) -0:452 'inFV0' ( in 4-component vector of float) -0:452 Sequence -0:452 move second child to first child ( temp 4-component vector of float) -0:452 'r2' ( temp 4-component vector of float) -0:452 vector-scale ( temp 4-component vector of float) -0:452 'inFV0' ( in 4-component vector of float) -0:452 'inF0' ( in float) -0:452 Sequence -0:452 move second child to first child ( temp float) -0:452 'r3' ( temp float) -0:452 dot-product ( temp float) -0:452 'inFV0' ( in 4-component vector of float) -0:452 'inFV1' ( in 4-component vector of float) -0:452 Sequence -0:452 move second child to first child ( temp 4-component vector of float) -0:452 'r4' ( temp 4-component vector of float) -0:452 vector-times-matrix ( temp 4-component vector of float) -0:452 'inFV0' ( in 4-component vector of float) -0:452 'inFM0' ( in 4X4 matrix of float) -0:452 Sequence -0:452 move second child to first child ( temp 4-component vector of float) -0:452 'r5' ( temp 4-component vector of float) -0:452 matrix-times-vector ( temp 4-component vector of float) -0:452 'inFM0' ( in 4X4 matrix of float) -0:452 'inFV0' ( in 4-component vector of float) -0:452 Sequence -0:452 move second child to first child ( temp 4X4 matrix of float) -0:452 'r6' ( temp 4X4 matrix of float) -0:452 matrix-scale ( temp 4X4 matrix of float) -0:452 'inF0' ( in float) -0:452 'inFM0' ( in 4X4 matrix of float) -0:452 Sequence -0:452 move second child to first child ( temp 4X4 matrix of float) -0:452 'r7' ( temp 4X4 matrix of float) -0:452 matrix-scale ( temp 4X4 matrix of float) -0:452 'inFM0' ( in 4X4 matrix of float) -0:452 'inF0' ( in float) -0:452 Sequence -0:452 move second child to first child ( temp 4X4 matrix of float) -0:452 'r8' ( temp 4X4 matrix of float) -0:452 matrix-multiply ( temp 4X4 matrix of float) -0:452 'inFM1' ( in 4X4 matrix of float) -0:452 'inFM0' ( in 4X4 matrix of float) -0:461 Function Definition: TestGenMulNxM(f1;f1;vf2;vf3;mf23;mf32;mf33;mf34;mf24; ( temp void) -0:461 Function Parameters: -0:461 'inF0' ( in float) -0:461 'inF1' ( in float) -0:461 'inFV2' ( in 2-component vector of float) -0:461 'inFV3' ( in 3-component vector of float) -0:461 'inFM2x3' ( in 2X3 matrix of float) -0:461 'inFM3x2' ( in 3X2 matrix of float) -0:461 'inFM3x3' ( in 3X3 matrix of float) -0:461 'inFM3x4' ( in 3X4 matrix of float) -0:461 'inFM2x4' ( in 2X4 matrix of float) +0:456 Sequence +0:456 move second child to first child ( temp float) +0:456 'r0' ( temp float) +0:456 component-wise multiply ( temp float) +0:456 'inF1' ( in float) +0:456 'inF0' ( in float) +0:456 Sequence +0:456 move second child to first child ( temp 4-component vector of float) +0:456 'r1' ( temp 4-component vector of float) +0:456 vector-scale ( temp 4-component vector of float) +0:456 'inF0' ( in float) +0:456 'inFV0' ( in 4-component vector of float) +0:456 Sequence +0:456 move second child to first child ( temp 4-component vector of float) +0:456 'r2' ( temp 4-component vector of float) +0:456 vector-scale ( temp 4-component vector of float) +0:456 'inFV0' ( in 4-component vector of float) +0:456 'inF0' ( in float) +0:456 Sequence +0:456 move second child to first child ( temp float) +0:456 'r3' ( temp float) +0:456 dot-product ( temp float) +0:456 'inFV0' ( in 4-component vector of float) +0:456 'inFV1' ( in 4-component vector of float) +0:456 Sequence +0:456 move second child to first child ( temp 4-component vector of float) +0:456 'r4' ( temp 4-component vector of float) +0:456 vector-times-matrix ( temp 4-component vector of float) +0:456 'inFV0' ( in 4-component vector of float) +0:456 'inFM0' ( in 4X4 matrix of float) +0:456 Sequence +0:456 move second child to first child ( temp 4-component vector of float) +0:456 'r5' ( temp 4-component vector of float) +0:456 matrix-times-vector ( temp 4-component vector of float) +0:456 'inFM0' ( in 4X4 matrix of float) +0:456 'inFV0' ( in 4-component vector of float) +0:456 Sequence +0:456 move second child to first child ( temp 4X4 matrix of float) +0:456 'r6' ( temp 4X4 matrix of float) +0:456 matrix-scale ( temp 4X4 matrix of float) +0:456 'inF0' ( in float) +0:456 'inFM0' ( in 4X4 matrix of float) +0:456 Sequence +0:456 move second child to first child ( temp 4X4 matrix of float) +0:456 'r7' ( temp 4X4 matrix of float) +0:456 matrix-scale ( temp 4X4 matrix of float) +0:456 'inFM0' ( in 4X4 matrix of float) +0:456 'inF0' ( in float) +0:456 Sequence +0:456 move second child to first child ( temp 4X4 matrix of float) +0:456 'r8' ( temp 4X4 matrix of float) +0:456 matrix-multiply ( temp 4X4 matrix of float) +0:456 'inFM1' ( in 4X4 matrix of float) +0:456 'inFM0' ( in 4X4 matrix of float) +0:465 Function Definition: TestGenMulNxM(f1;f1;vf2;vf3;mf23;mf32;mf33;mf34;mf24; ( temp void) +0:465 Function Parameters: +0:465 'inF0' ( in float) +0:465 'inF1' ( in float) +0:465 'inFV2' ( in 2-component vector of float) +0:465 'inFV3' ( in 3-component vector of float) +0:465 'inFM2x3' ( in 2X3 matrix of float) +0:465 'inFM3x2' ( in 3X2 matrix of float) +0:465 'inFM3x3' ( in 3X3 matrix of float) +0:465 'inFM3x4' ( in 3X4 matrix of float) +0:465 'inFM2x4' ( in 2X4 matrix of float) 0:? Sequence -0:462 Sequence -0:462 move second child to first child ( temp float) -0:462 'r00' ( temp float) -0:462 component-wise multiply ( temp float) -0:462 'inF1' ( in float) -0:462 'inF0' ( in float) -0:463 Sequence -0:463 move second child to first child ( temp 2-component vector of float) -0:463 'r01' ( temp 2-component vector of float) -0:463 vector-scale ( temp 2-component vector of float) -0:463 'inF0' ( in float) -0:463 'inFV2' ( in 2-component vector of float) -0:464 Sequence -0:464 move second child to first child ( temp 3-component vector of float) -0:464 'r02' ( temp 3-component vector of float) -0:464 vector-scale ( temp 3-component vector of float) -0:464 'inF0' ( in float) -0:464 'inFV3' ( in 3-component vector of float) -0:465 Sequence -0:465 move second child to first child ( temp 2-component vector of float) -0:465 'r03' ( temp 2-component vector of float) -0:465 vector-scale ( temp 2-component vector of float) -0:465 'inFV2' ( in 2-component vector of float) -0:465 'inF0' ( in float) 0:466 Sequence -0:466 move second child to first child ( temp 3-component vector of float) -0:466 'r04' ( temp 3-component vector of float) -0:466 vector-scale ( temp 3-component vector of float) -0:466 'inFV3' ( in 3-component vector of float) +0:466 move second child to first child ( temp float) +0:466 'r00' ( temp float) +0:466 component-wise multiply ( temp float) +0:466 'inF1' ( in float) 0:466 'inF0' ( in float) 0:467 Sequence -0:467 move second child to first child ( temp float) -0:467 'r05' ( temp float) -0:467 dot-product ( temp float) -0:467 'inFV2' ( in 2-component vector of float) +0:467 move second child to first child ( temp 2-component vector of float) +0:467 'r01' ( temp 2-component vector of float) +0:467 vector-scale ( temp 2-component vector of float) +0:467 'inF0' ( in float) 0:467 'inFV2' ( in 2-component vector of float) 0:468 Sequence -0:468 move second child to first child ( temp float) -0:468 'r06' ( temp float) -0:468 dot-product ( temp float) -0:468 'inFV3' ( in 3-component vector of float) +0:468 move second child to first child ( temp 3-component vector of float) +0:468 'r02' ( temp 3-component vector of float) +0:468 vector-scale ( temp 3-component vector of float) +0:468 'inF0' ( in float) 0:468 'inFV3' ( in 3-component vector of float) 0:469 Sequence -0:469 move second child to first child ( temp 3-component vector of float) -0:469 'r07' ( temp 3-component vector of float) -0:469 matrix-times-vector ( temp 3-component vector of float) -0:469 'inFM2x3' ( in 2X3 matrix of float) +0:469 move second child to first child ( temp 2-component vector of float) +0:469 'r03' ( temp 2-component vector of float) +0:469 vector-scale ( temp 2-component vector of float) 0:469 'inFV2' ( in 2-component vector of float) +0:469 'inF0' ( in float) 0:470 Sequence -0:470 move second child to first child ( temp 2-component vector of float) -0:470 'r08' ( temp 2-component vector of float) -0:470 matrix-times-vector ( temp 2-component vector of float) -0:470 'inFM3x2' ( in 3X2 matrix of float) +0:470 move second child to first child ( temp 3-component vector of float) +0:470 'r04' ( temp 3-component vector of float) +0:470 vector-scale ( temp 3-component vector of float) 0:470 'inFV3' ( in 3-component vector of float) +0:470 'inF0' ( in float) 0:471 Sequence -0:471 move second child to first child ( temp 2-component vector of float) -0:471 'r09' ( temp 2-component vector of float) -0:471 vector-times-matrix ( temp 2-component vector of float) -0:471 'inFV3' ( in 3-component vector of float) -0:471 'inFM2x3' ( in 2X3 matrix of float) +0:471 move second child to first child ( temp float) +0:471 'r05' ( temp float) +0:471 dot-product ( temp float) +0:471 'inFV2' ( in 2-component vector of float) +0:471 'inFV2' ( in 2-component vector of float) 0:472 Sequence -0:472 move second child to first child ( temp 3-component vector of float) -0:472 'r10' ( temp 3-component vector of float) -0:472 vector-times-matrix ( temp 3-component vector of float) -0:472 'inFV2' ( in 2-component vector of float) -0:472 'inFM3x2' ( in 3X2 matrix of float) +0:472 move second child to first child ( temp float) +0:472 'r06' ( temp float) +0:472 dot-product ( temp float) +0:472 'inFV3' ( in 3-component vector of float) +0:472 'inFV3' ( in 3-component vector of float) 0:473 Sequence -0:473 move second child to first child ( temp 2X3 matrix of float) -0:473 'r11' ( temp 2X3 matrix of float) -0:473 matrix-scale ( temp 2X3 matrix of float) -0:473 'inF0' ( in float) +0:473 move second child to first child ( temp 3-component vector of float) +0:473 'r07' ( temp 3-component vector of float) +0:473 matrix-times-vector ( temp 3-component vector of float) 0:473 'inFM2x3' ( in 2X3 matrix of float) +0:473 'inFV2' ( in 2-component vector of float) 0:474 Sequence -0:474 move second child to first child ( temp 3X2 matrix of float) -0:474 'r12' ( temp 3X2 matrix of float) -0:474 matrix-scale ( temp 3X2 matrix of float) -0:474 'inF0' ( in float) +0:474 move second child to first child ( temp 2-component vector of float) +0:474 'r08' ( temp 2-component vector of float) +0:474 matrix-times-vector ( temp 2-component vector of float) 0:474 'inFM3x2' ( in 3X2 matrix of float) +0:474 'inFV3' ( in 3-component vector of float) 0:475 Sequence -0:475 move second child to first child ( temp 2X2 matrix of float) -0:475 'r13' ( temp 2X2 matrix of float) -0:475 matrix-multiply ( temp 2X2 matrix of float) -0:475 'inFM3x2' ( in 3X2 matrix of float) +0:475 move second child to first child ( temp 2-component vector of float) +0:475 'r09' ( temp 2-component vector of float) +0:475 vector-times-matrix ( temp 2-component vector of float) +0:475 'inFV3' ( in 3-component vector of float) 0:475 'inFM2x3' ( in 2X3 matrix of float) 0:476 Sequence -0:476 move second child to first child ( temp 2X3 matrix of float) -0:476 'r14' ( temp 2X3 matrix of float) -0:476 matrix-multiply ( temp 2X3 matrix of float) -0:476 'inFM3x3' ( in 3X3 matrix of float) -0:476 'inFM2x3' ( in 2X3 matrix of float) +0:476 move second child to first child ( temp 3-component vector of float) +0:476 'r10' ( temp 3-component vector of float) +0:476 vector-times-matrix ( temp 3-component vector of float) +0:476 'inFV2' ( in 2-component vector of float) +0:476 'inFM3x2' ( in 3X2 matrix of float) 0:477 Sequence -0:477 move second child to first child ( temp 2X4 matrix of float) -0:477 'r15' ( temp 2X4 matrix of float) -0:477 matrix-multiply ( temp 2X4 matrix of float) -0:477 'inFM3x4' ( in 3X4 matrix of float) +0:477 move second child to first child ( temp 2X3 matrix of float) +0:477 'r11' ( temp 2X3 matrix of float) +0:477 matrix-scale ( temp 2X3 matrix of float) +0:477 'inF0' ( in float) 0:477 'inFM2x3' ( in 2X3 matrix of float) 0:478 Sequence -0:478 move second child to first child ( temp 3X4 matrix of float) -0:478 'r16' ( temp 3X4 matrix of float) -0:478 matrix-multiply ( temp 3X4 matrix of float) -0:478 'inFM2x4' ( in 2X4 matrix of float) +0:478 move second child to first child ( temp 3X2 matrix of float) +0:478 'r12' ( temp 3X2 matrix of float) +0:478 matrix-scale ( temp 3X2 matrix of float) +0:478 'inF0' ( in float) 0:478 'inFM3x2' ( in 3X2 matrix of float) -0:484 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) -0:484 Function Parameters: +0:479 Sequence +0:479 move second child to first child ( temp 2X2 matrix of float) +0:479 'r13' ( temp 2X2 matrix of float) +0:479 matrix-multiply ( temp 2X2 matrix of float) +0:479 'inFM3x2' ( in 3X2 matrix of float) +0:479 'inFM2x3' ( in 2X3 matrix of float) +0:480 Sequence +0:480 move second child to first child ( temp 2X3 matrix of float) +0:480 'r14' ( temp 2X3 matrix of float) +0:480 matrix-multiply ( temp 2X3 matrix of float) +0:480 'inFM3x3' ( in 3X3 matrix of float) +0:480 'inFM2x3' ( in 2X3 matrix of float) +0:481 Sequence +0:481 move second child to first child ( temp 2X4 matrix of float) +0:481 'r15' ( temp 2X4 matrix of float) +0:481 matrix-multiply ( temp 2X4 matrix of float) +0:481 'inFM3x4' ( in 3X4 matrix of float) +0:481 'inFM2x3' ( in 2X3 matrix of float) +0:482 Sequence +0:482 move second child to first child ( temp 3X4 matrix of float) +0:482 'r16' ( temp 3X4 matrix of float) +0:482 matrix-multiply ( temp 3X4 matrix of float) +0:482 'inFM2x4' ( in 2X4 matrix of float) +0:482 'inFM3x2' ( in 3X2 matrix of float) +0:488 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:488 Function Parameters: 0:? Sequence -0:486 move second child to first child ( temp 4-component vector of float) -0:486 color: direct index for structure ( temp 4-component vector of float) -0:486 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:486 Constant: -0:486 0 (const int) -0:486 Constant: -0:486 1.000000 -0:486 1.000000 -0:486 1.000000 -0:486 1.000000 -0:487 Branch: Return with expression -0:487 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:484 Function Definition: main( ( temp void) -0:484 Function Parameters: +0:490 move second child to first child ( temp 4-component vector of float) +0:490 color: direct index for structure ( temp 4-component vector of float) +0:490 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:490 Constant: +0:490 0 (const int) +0:490 Constant: +0:490 1.000000 +0:490 1.000000 +0:490 1.000000 +0:490 1.000000 +0:491 Branch: Return with expression +0:491 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:488 Function Definition: main( ( temp void) +0:488 Function Parameters: 0:? Sequence -0:484 Sequence -0:484 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) -0:484 color: direct index for structure ( temp 4-component vector of float) -0:484 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) -0:484 Constant: -0:484 0 (const int) +0:488 Sequence +0:488 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) +0:488 color: direct index for structure ( temp 4-component vector of float) +0:488 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:488 Constant: +0:488 0 (const int) 0:? Linker Objects 0:? 'gs_ua' ( shared uint) 0:? 'gs_ub' ( shared uint) @@ -2756,7 +2811,7 @@ gl_FragCoord origin is upper left 0:? 'gs_ua4' ( shared 4-component vector of uint) 0:? 'gs_ub4' ( shared 4-component vector of uint) 0:? 'gs_uc4' ( shared 4-component vector of uint) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -2765,19 +2820,20 @@ Linked fragment stage: Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:17 Function Definition: PixelShaderFunctionS(f1;f1;f1;u1;u1; ( temp float) +0:17 Function Definition: PixelShaderFunctionS(f1;f1;f1;u1;i1; ( temp float) 0:17 Function Parameters: 0:17 'inF0' ( in float) 0:17 'inF1' ( in float) 0:17 'inF2' ( in float) 0:17 'inU0' ( in uint) -0:17 'inU1' ( in uint) +0:17 'inU1' ( in int) 0:? Sequence 0:20 Sequence 0:20 move second child to first child ( temp bool) 0:20 'r000' ( temp bool) 0:20 all ( temp bool) -0:20 'inF0' ( in float) +0:20 Convert float to bool ( temp bool) +0:20 'inF0' ( in float) 0:21 Sequence 0:21 move second child to first child ( temp float) 0:21 'r001' ( temp float) @@ -2792,7 +2848,8 @@ gl_FragCoord origin is upper left 0:23 move second child to first child ( temp bool) 0:23 'r003' ( temp bool) 0:23 any ( temp bool) -0:23 'inF0' ( in float) +0:23 Convert float to bool ( temp bool) +0:23 'inF0' ( in float) 0:24 Sequence 0:24 move second child to first child ( temp float) 0:24 'r004' ( temp float) @@ -2807,7 +2864,7 @@ gl_FragCoord origin is upper left 0:26 move second child to first child ( temp uint) 0:26 'r006' ( temp uint) 0:26 floatBitsToUint ( temp uint) -0:26 'inF0' ( in float) +0:26 'inU1' ( in int) 0:27 Sequence 0:27 move second child to first child ( temp float) 0:27 'r007' ( temp float) @@ -2844,2024 +2901,2075 @@ gl_FragCoord origin is upper left 0:33 0.000000 0:33 true case 0:33 Branch: Kill -0:34 Sequence -0:34 move second child to first child ( temp float) -0:34 'r014' ( temp float) -0:34 cosine ( temp float) -0:34 'inF0' ( in float) +0:34 Test condition and select ( temp void) +0:34 Condition +0:34 Compare Less Than ( temp bool) +0:34 'r005' ( temp int) +0:34 Constant: +0:34 0 (const int) +0:34 true case +0:34 Branch: Kill 0:35 Sequence 0:35 move second child to first child ( temp float) -0:35 'r015' ( temp float) -0:35 hyp. cosine ( temp float) +0:35 'r014' ( temp float) +0:35 cosine ( temp float) 0:35 'inF0' ( in float) 0:36 Sequence -0:36 move second child to first child ( temp int) -0:36 'r016' ( temp int) -0:36 bitCount ( temp int) -0:36 Constant: -0:36 7 (const int) +0:36 move second child to first child ( temp float) +0:36 'r015' ( temp float) +0:36 hyp. cosine ( temp float) +0:36 'inF0' ( in float) 0:37 Sequence -0:37 move second child to first child ( temp float) -0:37 'r017' ( temp float) -0:37 dPdx ( temp float) -0:37 'inF0' ( in float) +0:37 move second child to first child ( temp int) +0:37 'r016' ( temp int) +0:37 bitCount ( temp int) +0:37 Constant: +0:37 7 (const int) 0:38 Sequence 0:38 move second child to first child ( temp float) -0:38 'r018' ( temp float) -0:38 dPdxCoarse ( temp float) +0:38 'r017' ( temp float) +0:38 dPdx ( temp float) 0:38 'inF0' ( in float) 0:39 Sequence 0:39 move second child to first child ( temp float) -0:39 'r019' ( temp float) -0:39 dPdxFine ( temp float) +0:39 'r018' ( temp float) +0:39 dPdxCoarse ( temp float) 0:39 'inF0' ( in float) 0:40 Sequence 0:40 move second child to first child ( temp float) -0:40 'r020' ( temp float) -0:40 dPdy ( temp float) +0:40 'r019' ( temp float) +0:40 dPdxFine ( temp float) 0:40 'inF0' ( in float) 0:41 Sequence 0:41 move second child to first child ( temp float) -0:41 'r021' ( temp float) -0:41 dPdyCoarse ( temp float) +0:41 'r020' ( temp float) +0:41 dPdy ( temp float) 0:41 'inF0' ( in float) 0:42 Sequence 0:42 move second child to first child ( temp float) -0:42 'r022' ( temp float) -0:42 dPdyFine ( temp float) +0:42 'r021' ( temp float) +0:42 dPdyCoarse ( temp float) 0:42 'inF0' ( in float) 0:43 Sequence 0:43 move second child to first child ( temp float) -0:43 'r023' ( temp float) -0:43 degrees ( temp float) +0:43 'r022' ( temp float) +0:43 dPdyFine ( temp float) 0:43 'inF0' ( in float) -0:47 Sequence -0:47 move second child to first child ( temp float) -0:47 'r027' ( temp float) -0:47 exp ( temp float) -0:47 'inF0' ( in float) +0:44 Sequence +0:44 move second child to first child ( temp float) +0:44 'r023' ( temp float) +0:44 degrees ( temp float) +0:44 'inF0' ( in float) 0:48 Sequence 0:48 move second child to first child ( temp float) -0:48 'r028' ( temp float) -0:48 exp2 ( temp float) +0:48 'r027' ( temp float) +0:48 exp ( temp float) 0:48 'inF0' ( in float) 0:49 Sequence -0:49 move second child to first child ( temp uint) -0:49 'r029' ( temp uint) -0:49 Convert int to uint ( temp uint) -0:49 findMSB ( temp int) -0:49 Constant: -0:49 7 (const int) +0:49 move second child to first child ( temp float) +0:49 'r028' ( temp float) +0:49 exp2 ( temp float) +0:49 'inF0' ( in float) 0:50 Sequence 0:50 move second child to first child ( temp uint) -0:50 'r030' ( temp uint) +0:50 'r029' ( temp uint) 0:50 Convert int to uint ( temp uint) -0:50 findLSB ( temp int) +0:50 findMSB ( temp int) 0:50 Constant: 0:50 7 (const int) 0:51 Sequence -0:51 move second child to first child ( temp float) -0:51 'r031' ( temp float) -0:51 Floor ( temp float) -0:51 'inF0' ( in float) -0:53 Sequence -0:53 move second child to first child ( temp float) -0:53 'r033' ( temp float) -0:53 mod ( temp float) -0:53 'inF0' ( in float) -0:53 'inF1' ( in float) +0:51 move second child to first child ( temp uint) +0:51 'r030' ( temp uint) +0:51 Convert int to uint ( temp uint) +0:51 findLSB ( temp int) +0:51 Constant: +0:51 7 (const int) +0:52 Sequence +0:52 move second child to first child ( temp float) +0:52 'r031' ( temp float) +0:52 Floor ( temp float) +0:52 'inF0' ( in float) 0:54 Sequence 0:54 move second child to first child ( temp float) -0:54 'r034' ( temp float) -0:54 Fraction ( temp float) +0:54 'r033' ( temp float) +0:54 mod ( temp float) 0:54 'inF0' ( in float) +0:54 'inF1' ( in float) 0:55 Sequence 0:55 move second child to first child ( temp float) -0:55 'r036' ( temp float) -0:55 fwidth ( temp float) +0:55 'r034' ( temp float) +0:55 Fraction ( temp float) 0:55 'inF0' ( in float) 0:56 Sequence -0:56 move second child to first child ( temp bool) -0:56 'r037' ( temp bool) -0:56 isinf ( temp bool) +0:56 move second child to first child ( temp float) +0:56 'r036' ( temp float) +0:56 fwidth ( temp float) 0:56 'inF0' ( in float) 0:57 Sequence 0:57 move second child to first child ( temp bool) -0:57 'r038' ( temp bool) -0:57 isnan ( temp bool) +0:57 'r037' ( temp bool) +0:57 isinf ( temp bool) 0:57 'inF0' ( in float) 0:58 Sequence -0:58 move second child to first child ( temp float) -0:58 'r039' ( temp float) -0:58 ldexp ( temp float) +0:58 move second child to first child ( temp bool) +0:58 'r038' ( temp bool) +0:58 isnan ( temp bool) 0:58 'inF0' ( in float) -0:58 'inF1' ( in float) 0:59 Sequence 0:59 move second child to first child ( temp float) -0:59 'r039a' ( temp float) -0:59 mix ( temp float) +0:59 'r039' ( temp float) +0:59 ldexp ( temp float) 0:59 'inF0' ( in float) 0:59 'inF1' ( in float) -0:59 'inF2' ( in float) 0:60 Sequence 0:60 move second child to first child ( temp float) -0:60 'r040' ( temp float) -0:60 log ( temp float) +0:60 'r039a' ( temp float) +0:60 mix ( temp float) 0:60 'inF0' ( in float) +0:60 'inF1' ( in float) +0:60 'inF2' ( in float) 0:61 Sequence 0:61 move second child to first child ( temp float) -0:61 'r041' ( temp float) -0:61 component-wise multiply ( temp float) -0:61 log2 ( temp float) -0:61 'inF0' ( in float) -0:61 Constant: -0:61 0.301030 +0:61 'r040' ( temp float) +0:61 log ( temp float) +0:61 'inF0' ( in float) 0:62 Sequence 0:62 move second child to first child ( temp float) -0:62 'r042' ( temp float) -0:62 log2 ( temp float) -0:62 'inF0' ( in float) +0:62 'r041' ( temp float) +0:62 component-wise multiply ( temp float) +0:62 log2 ( temp float) +0:62 'inF0' ( in float) +0:62 Constant: +0:62 0.301030 0:63 Sequence 0:63 move second child to first child ( temp float) -0:63 'r043' ( temp float) -0:63 max ( temp float) +0:63 'r042' ( temp float) +0:63 log2 ( temp float) 0:63 'inF0' ( in float) -0:63 'inF1' ( in float) 0:64 Sequence 0:64 move second child to first child ( temp float) -0:64 'r044' ( temp float) -0:64 min ( temp float) +0:64 'r043' ( temp float) +0:64 max ( temp float) 0:64 'inF0' ( in float) 0:64 'inF1' ( in float) 0:65 Sequence 0:65 move second child to first child ( temp float) -0:65 'r045' ( temp float) -0:65 pow ( temp float) +0:65 'r044' ( temp float) +0:65 min ( temp float) 0:65 'inF0' ( in float) 0:65 'inF1' ( in float) 0:66 Sequence 0:66 move second child to first child ( temp float) -0:66 'r046' ( temp float) -0:66 radians ( temp float) +0:66 'r045' ( temp float) +0:66 pow ( temp float) 0:66 'inF0' ( in float) +0:66 'inF1' ( in float) 0:67 Sequence 0:67 move second child to first child ( temp float) -0:67 'r047' ( temp float) -0:67 divide ( temp float) -0:67 Constant: -0:67 1.000000 +0:67 'r046' ( temp float) +0:67 radians ( temp float) 0:67 'inF0' ( in float) 0:68 Sequence -0:68 move second child to first child ( temp uint) -0:68 'r048' ( temp uint) -0:68 Convert int to uint ( temp uint) -0:68 bitFieldReverse ( temp int) -0:68 Constant: -0:68 2 (const int) +0:68 move second child to first child ( temp float) +0:68 'r047' ( temp float) +0:68 divide ( temp float) +0:68 Constant: +0:68 1.000000 +0:68 'inF0' ( in float) 0:69 Sequence -0:69 move second child to first child ( temp float) -0:69 'r049' ( temp float) -0:69 roundEven ( temp float) -0:69 'inF0' ( in float) +0:69 move second child to first child ( temp uint) +0:69 'r048' ( temp uint) +0:69 Convert int to uint ( temp uint) +0:69 bitFieldReverse ( temp int) +0:69 Constant: +0:69 2 (const int) 0:70 Sequence 0:70 move second child to first child ( temp float) -0:70 'r050' ( temp float) -0:70 inverse sqrt ( temp float) +0:70 'r049' ( temp float) +0:70 roundEven ( temp float) 0:70 'inF0' ( in float) 0:71 Sequence 0:71 move second child to first child ( temp float) -0:71 'r051' ( temp float) -0:71 clamp ( temp float) +0:71 'r050' ( temp float) +0:71 inverse sqrt ( temp float) 0:71 'inF0' ( in float) -0:71 Constant: -0:71 0.000000 -0:71 Constant: -0:71 1.000000 0:72 Sequence 0:72 move second child to first child ( temp float) -0:72 'r052' ( temp float) -0:72 Sign ( temp float) +0:72 'r051' ( temp float) +0:72 clamp ( temp float) 0:72 'inF0' ( in float) +0:72 Constant: +0:72 0.000000 +0:72 Constant: +0:72 1.000000 0:73 Sequence 0:73 move second child to first child ( temp float) -0:73 'r053' ( temp float) -0:73 sine ( temp float) +0:73 'r052' ( temp float) +0:73 Sign ( temp float) 0:73 'inF0' ( in float) 0:74 Sequence 0:74 move second child to first child ( temp float) -0:74 'inF1' ( in float) +0:74 'r053' ( temp float) 0:74 sine ( temp float) 0:74 'inF0' ( in float) -0:74 move second child to first child ( temp float) -0:74 'inF2' ( in float) -0:74 cosine ( temp float) -0:74 'inF0' ( in float) 0:75 Sequence 0:75 move second child to first child ( temp float) -0:75 'r055' ( temp float) -0:75 hyp. sine ( temp float) +0:75 'inF1' ( in float) +0:75 sine ( temp float) +0:75 'inF0' ( in float) +0:75 move second child to first child ( temp float) +0:75 'inF2' ( in float) +0:75 cosine ( temp float) 0:75 'inF0' ( in float) 0:76 Sequence 0:76 move second child to first child ( temp float) -0:76 'r056' ( temp float) -0:76 smoothstep ( temp float) +0:76 'r055' ( temp float) +0:76 hyp. sine ( temp float) 0:76 'inF0' ( in float) -0:76 'inF1' ( in float) -0:76 'inF2' ( in float) 0:77 Sequence 0:77 move second child to first child ( temp float) -0:77 'r057' ( temp float) -0:77 sqrt ( temp float) +0:77 'r056' ( temp float) +0:77 smoothstep ( temp float) 0:77 'inF0' ( in float) +0:77 'inF1' ( in float) +0:77 'inF2' ( in float) 0:78 Sequence 0:78 move second child to first child ( temp float) -0:78 'r058' ( temp float) -0:78 step ( temp float) +0:78 'r057' ( temp float) +0:78 sqrt ( temp float) 0:78 'inF0' ( in float) -0:78 'inF1' ( in float) 0:79 Sequence 0:79 move second child to first child ( temp float) -0:79 'r059' ( temp float) -0:79 tangent ( temp float) +0:79 'r058' ( temp float) +0:79 step ( temp float) 0:79 'inF0' ( in float) +0:79 'inF1' ( in float) 0:80 Sequence 0:80 move second child to first child ( temp float) -0:80 'r060' ( temp float) -0:80 hyp. tangent ( temp float) +0:80 'r059' ( temp float) +0:80 tangent ( temp float) 0:80 'inF0' ( in float) -0:82 Sequence -0:82 move second child to first child ( temp float) -0:82 'r061' ( temp float) -0:82 trunc ( temp float) -0:82 'inF0' ( in float) -0:84 Branch: Return with expression -0:84 Constant: -0:84 0.000000 -0:88 Function Definition: PixelShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) -0:88 Function Parameters: -0:88 'inF0' ( in 1-component vector of float) -0:88 'inF1' ( in 1-component vector of float) -0:88 'inF2' ( in 1-component vector of float) +0:81 Sequence +0:81 move second child to first child ( temp float) +0:81 'r060' ( temp float) +0:81 hyp. tangent ( temp float) +0:81 'inF0' ( in float) +0:83 Sequence +0:83 move second child to first child ( temp float) +0:83 'r061' ( temp float) +0:83 trunc ( temp float) +0:83 'inF0' ( in float) +0:85 Branch: Return with expression +0:85 Constant: +0:85 0.000000 +0:89 Function Definition: PixelShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) +0:89 Function Parameters: +0:89 'inF0' ( in 1-component vector of float) +0:89 'inF1' ( in 1-component vector of float) +0:89 'inF2' ( in 1-component vector of float) 0:? Sequence -0:90 Branch: Return with expression -0:90 Constant: -0:90 0.000000 -0:94 Function Definition: PixelShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) -0:94 Function Parameters: -0:94 'inF0' ( in 2-component vector of float) -0:94 'inF1' ( in 2-component vector of float) -0:94 'inF2' ( in 2-component vector of float) -0:94 'inU0' ( in 2-component vector of uint) -0:94 'inU1' ( in 2-component vector of uint) +0:91 Branch: Return with expression +0:91 Constant: +0:91 0.000000 +0:95 Function Definition: PixelShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) +0:95 Function Parameters: +0:95 'inF0' ( in 2-component vector of float) +0:95 'inF1' ( in 2-component vector of float) +0:95 'inF2' ( in 2-component vector of float) +0:95 'inU0' ( in 2-component vector of uint) +0:95 'inU1' ( in 2-component vector of uint) 0:? Sequence -0:97 Sequence -0:97 move second child to first child ( temp bool) -0:97 'r000' ( temp bool) -0:97 all ( temp bool) -0:97 'inF0' ( in 2-component vector of float) 0:98 Sequence -0:98 move second child to first child ( temp 2-component vector of float) -0:98 'r001' ( temp 2-component vector of float) -0:98 Absolute value ( temp 2-component vector of float) -0:98 'inF0' ( in 2-component vector of float) +0:98 move second child to first child ( temp bool) +0:98 'r000' ( temp bool) +0:98 all ( temp bool) +0:98 Convert float to bool ( temp 2-component vector of bool) +0:98 'inF0' ( in 2-component vector of float) 0:99 Sequence 0:99 move second child to first child ( temp 2-component vector of float) -0:99 'r002' ( temp 2-component vector of float) -0:99 arc cosine ( temp 2-component vector of float) +0:99 'r001' ( temp 2-component vector of float) +0:99 Absolute value ( temp 2-component vector of float) 0:99 'inF0' ( in 2-component vector of float) 0:100 Sequence -0:100 move second child to first child ( temp bool) -0:100 'r003' ( temp bool) -0:100 any ( temp bool) +0:100 move second child to first child ( temp 2-component vector of float) +0:100 'r002' ( temp 2-component vector of float) +0:100 arc cosine ( temp 2-component vector of float) 0:100 'inF0' ( in 2-component vector of float) 0:101 Sequence -0:101 move second child to first child ( temp 2-component vector of float) -0:101 'r004' ( temp 2-component vector of float) -0:101 arc sine ( temp 2-component vector of float) -0:101 'inF0' ( in 2-component vector of float) +0:101 move second child to first child ( temp bool) +0:101 'r003' ( temp bool) +0:101 any ( temp bool) +0:101 Convert float to bool ( temp 2-component vector of bool) +0:101 'inF0' ( in 2-component vector of float) 0:102 Sequence -0:102 move second child to first child ( temp 2-component vector of int) -0:102 'r005' ( temp 2-component vector of int) -0:102 floatBitsToInt ( temp 2-component vector of int) +0:102 move second child to first child ( temp 2-component vector of float) +0:102 'r004' ( temp 2-component vector of float) +0:102 arc sine ( temp 2-component vector of float) 0:102 'inF0' ( in 2-component vector of float) 0:103 Sequence -0:103 move second child to first child ( temp 2-component vector of uint) -0:103 'r006' ( temp 2-component vector of uint) -0:103 floatBitsToUint ( temp 2-component vector of uint) +0:103 move second child to first child ( temp 2-component vector of int) +0:103 'r005' ( temp 2-component vector of int) +0:103 floatBitsToInt ( temp 2-component vector of int) 0:103 'inF0' ( in 2-component vector of float) 0:104 Sequence -0:104 move second child to first child ( temp 2-component vector of float) -0:104 'r007' ( temp 2-component vector of float) -0:104 intBitsToFloat ( temp 2-component vector of float) -0:104 'inU0' ( in 2-component vector of uint) -0:106 Sequence -0:106 move second child to first child ( temp 2-component vector of float) -0:106 'r009' ( temp 2-component vector of float) -0:106 arc tangent ( temp 2-component vector of float) -0:106 'inF0' ( in 2-component vector of float) +0:104 move second child to first child ( temp 2-component vector of uint) +0:104 'r006' ( temp 2-component vector of uint) +0:104 floatBitsToUint ( temp 2-component vector of uint) +0:104 'inF0' ( in 2-component vector of float) +0:105 Sequence +0:105 move second child to first child ( temp 2-component vector of float) +0:105 'r007' ( temp 2-component vector of float) +0:105 intBitsToFloat ( temp 2-component vector of float) +0:105 'inU0' ( in 2-component vector of uint) 0:107 Sequence 0:107 move second child to first child ( temp 2-component vector of float) -0:107 'r010' ( temp 2-component vector of float) +0:107 'r009' ( temp 2-component vector of float) 0:107 arc tangent ( temp 2-component vector of float) 0:107 'inF0' ( in 2-component vector of float) -0:107 'inF1' ( in 2-component vector of float) 0:108 Sequence 0:108 move second child to first child ( temp 2-component vector of float) -0:108 'r011' ( temp 2-component vector of float) -0:108 Ceiling ( temp 2-component vector of float) +0:108 'r010' ( temp 2-component vector of float) +0:108 arc tangent ( temp 2-component vector of float) 0:108 'inF0' ( in 2-component vector of float) +0:108 'inF1' ( in 2-component vector of float) 0:109 Sequence 0:109 move second child to first child ( temp 2-component vector of float) -0:109 'r012' ( temp 2-component vector of float) -0:109 clamp ( temp 2-component vector of float) +0:109 'r011' ( temp 2-component vector of float) +0:109 Ceiling ( temp 2-component vector of float) 0:109 'inF0' ( in 2-component vector of float) -0:109 'inF1' ( in 2-component vector of float) -0:109 'inF2' ( in 2-component vector of float) -0:110 Test condition and select ( temp void) -0:110 Condition -0:110 any ( temp bool) -0:110 Compare Less Than ( temp 2-component vector of bool) +0:110 Sequence +0:110 move second child to first child ( temp 2-component vector of float) +0:110 'r012' ( temp 2-component vector of float) +0:110 clamp ( temp 2-component vector of float) 0:110 'inF0' ( in 2-component vector of float) -0:110 Constant: -0:110 0.000000 -0:110 0.000000 -0:110 true case -0:110 Branch: Kill -0:111 Sequence -0:111 move second child to first child ( temp 2-component vector of float) -0:111 'r013' ( temp 2-component vector of float) -0:111 cosine ( temp 2-component vector of float) +0:110 'inF1' ( in 2-component vector of float) +0:110 'inF2' ( in 2-component vector of float) +0:111 Test condition and select ( temp void) +0:111 Condition +0:111 any ( temp bool) +0:111 Compare Less Than ( temp 2-component vector of bool) 0:111 'inF0' ( in 2-component vector of float) -0:112 Sequence -0:112 move second child to first child ( temp 2-component vector of float) -0:112 'r015' ( temp 2-component vector of float) -0:112 hyp. cosine ( temp 2-component vector of float) -0:112 'inF0' ( in 2-component vector of float) +0:111 Constant: +0:111 0.000000 +0:111 0.000000 +0:111 true case +0:111 Branch: Kill +0:112 Test condition and select ( temp void) +0:112 Condition +0:112 any ( temp bool) +0:112 Compare Less Than ( temp 2-component vector of bool) +0:112 'inU0' ( in 2-component vector of uint) +0:112 Constant: +0:112 0.000000 +0:112 0.000000 +0:112 true case +0:112 Branch: Kill 0:113 Sequence -0:113 move second child to first child ( temp 2-component vector of int) -0:113 'r016' ( temp 2-component vector of int) +0:113 move second child to first child ( temp 2-component vector of float) +0:113 'r013' ( temp 2-component vector of float) +0:113 cosine ( temp 2-component vector of float) +0:113 'inF0' ( in 2-component vector of float) +0:114 Sequence +0:114 move second child to first child ( temp 2-component vector of float) +0:114 'r015' ( temp 2-component vector of float) +0:114 hyp. cosine ( temp 2-component vector of float) +0:114 'inF0' ( in 2-component vector of float) +0:115 Sequence +0:115 move second child to first child ( temp 2-component vector of int) +0:115 'r016' ( temp 2-component vector of int) 0:? bitCount ( temp 2-component vector of int) 0:? Constant: 0:? 7 (const int) 0:? 3 (const int) -0:114 Sequence -0:114 move second child to first child ( temp 2-component vector of float) -0:114 'r017' ( temp 2-component vector of float) -0:114 dPdx ( temp 2-component vector of float) -0:114 'inF0' ( in 2-component vector of float) -0:115 Sequence -0:115 move second child to first child ( temp 2-component vector of float) -0:115 'r018' ( temp 2-component vector of float) -0:115 dPdxCoarse ( temp 2-component vector of float) -0:115 'inF0' ( in 2-component vector of float) 0:116 Sequence 0:116 move second child to first child ( temp 2-component vector of float) -0:116 'r019' ( temp 2-component vector of float) -0:116 dPdxFine ( temp 2-component vector of float) +0:116 'r017' ( temp 2-component vector of float) +0:116 dPdx ( temp 2-component vector of float) 0:116 'inF0' ( in 2-component vector of float) 0:117 Sequence 0:117 move second child to first child ( temp 2-component vector of float) -0:117 'r020' ( temp 2-component vector of float) -0:117 dPdy ( temp 2-component vector of float) +0:117 'r018' ( temp 2-component vector of float) +0:117 dPdxCoarse ( temp 2-component vector of float) 0:117 'inF0' ( in 2-component vector of float) 0:118 Sequence 0:118 move second child to first child ( temp 2-component vector of float) -0:118 'r021' ( temp 2-component vector of float) -0:118 dPdyCoarse ( temp 2-component vector of float) +0:118 'r019' ( temp 2-component vector of float) +0:118 dPdxFine ( temp 2-component vector of float) 0:118 'inF0' ( in 2-component vector of float) 0:119 Sequence 0:119 move second child to first child ( temp 2-component vector of float) -0:119 'r022' ( temp 2-component vector of float) -0:119 dPdyFine ( temp 2-component vector of float) +0:119 'r020' ( temp 2-component vector of float) +0:119 dPdy ( temp 2-component vector of float) 0:119 'inF0' ( in 2-component vector of float) 0:120 Sequence 0:120 move second child to first child ( temp 2-component vector of float) -0:120 'r023' ( temp 2-component vector of float) -0:120 degrees ( temp 2-component vector of float) +0:120 'r021' ( temp 2-component vector of float) +0:120 dPdyCoarse ( temp 2-component vector of float) 0:120 'inF0' ( in 2-component vector of float) -0:124 Sequence -0:124 move second child to first child ( temp float) -0:124 'r026' ( temp float) -0:124 distance ( temp float) -0:124 'inF0' ( in 2-component vector of float) -0:124 'inF1' ( in 2-component vector of float) -0:125 Sequence -0:125 move second child to first child ( temp float) -0:125 'r027' ( temp float) -0:125 dot-product ( temp float) -0:125 'inF0' ( in 2-component vector of float) -0:125 'inF1' ( in 2-component vector of float) -0:129 Sequence -0:129 move second child to first child ( temp 2-component vector of float) -0:129 'r028' ( temp 2-component vector of float) -0:129 exp ( temp 2-component vector of float) -0:129 'inF0' ( in 2-component vector of float) -0:130 Sequence -0:130 move second child to first child ( temp 2-component vector of float) -0:130 'r029' ( temp 2-component vector of float) -0:130 exp2 ( temp 2-component vector of float) -0:130 'inF0' ( in 2-component vector of float) +0:121 Sequence +0:121 move second child to first child ( temp 2-component vector of float) +0:121 'r022' ( temp 2-component vector of float) +0:121 dPdyFine ( temp 2-component vector of float) +0:121 'inF0' ( in 2-component vector of float) +0:122 Sequence +0:122 move second child to first child ( temp 2-component vector of float) +0:122 'r023' ( temp 2-component vector of float) +0:122 degrees ( temp 2-component vector of float) +0:122 'inF0' ( in 2-component vector of float) +0:126 Sequence +0:126 move second child to first child ( temp float) +0:126 'r026' ( temp float) +0:126 distance ( temp float) +0:126 'inF0' ( in 2-component vector of float) +0:126 'inF1' ( in 2-component vector of float) +0:127 Sequence +0:127 move second child to first child ( temp float) +0:127 'r027' ( temp float) +0:127 dot-product ( temp float) +0:127 'inF0' ( in 2-component vector of float) +0:127 'inF1' ( in 2-component vector of float) 0:131 Sequence 0:131 move second child to first child ( temp 2-component vector of float) -0:131 'r030' ( temp 2-component vector of float) -0:131 face-forward ( temp 2-component vector of float) +0:131 'r028' ( temp 2-component vector of float) +0:131 exp ( temp 2-component vector of float) 0:131 'inF0' ( in 2-component vector of float) -0:131 'inF1' ( in 2-component vector of float) -0:131 'inF2' ( in 2-component vector of float) 0:132 Sequence -0:132 move second child to first child ( temp 2-component vector of uint) -0:132 'r031' ( temp 2-component vector of uint) +0:132 move second child to first child ( temp 2-component vector of float) +0:132 'r029' ( temp 2-component vector of float) +0:132 exp2 ( temp 2-component vector of float) +0:132 'inF0' ( in 2-component vector of float) +0:133 Sequence +0:133 move second child to first child ( temp 2-component vector of float) +0:133 'r030' ( temp 2-component vector of float) +0:133 face-forward ( temp 2-component vector of float) +0:133 'inF0' ( in 2-component vector of float) +0:133 'inF1' ( in 2-component vector of float) +0:133 'inF2' ( in 2-component vector of float) +0:134 Sequence +0:134 move second child to first child ( temp 2-component vector of uint) +0:134 'r031' ( temp 2-component vector of uint) 0:? findMSB ( temp 2-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 8 (const uint) -0:133 Sequence -0:133 move second child to first child ( temp 2-component vector of uint) -0:133 'r032' ( temp 2-component vector of uint) +0:135 Sequence +0:135 move second child to first child ( temp 2-component vector of uint) +0:135 'r032' ( temp 2-component vector of uint) 0:? findLSB ( temp 2-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 8 (const uint) -0:134 Sequence -0:134 move second child to first child ( temp 2-component vector of float) -0:134 'r033' ( temp 2-component vector of float) -0:134 Floor ( temp 2-component vector of float) -0:134 'inF0' ( in 2-component vector of float) 0:136 Sequence 0:136 move second child to first child ( temp 2-component vector of float) -0:136 'r035' ( temp 2-component vector of float) -0:136 mod ( temp 2-component vector of float) +0:136 'r033' ( temp 2-component vector of float) +0:136 Floor ( temp 2-component vector of float) 0:136 'inF0' ( in 2-component vector of float) -0:136 'inF1' ( in 2-component vector of float) -0:137 Sequence -0:137 move second child to first child ( temp 2-component vector of float) -0:137 'r036' ( temp 2-component vector of float) -0:137 Fraction ( temp 2-component vector of float) -0:137 'inF0' ( in 2-component vector of float) 0:138 Sequence 0:138 move second child to first child ( temp 2-component vector of float) -0:138 'r038' ( temp 2-component vector of float) -0:138 fwidth ( temp 2-component vector of float) +0:138 'r035' ( temp 2-component vector of float) +0:138 mod ( temp 2-component vector of float) 0:138 'inF0' ( in 2-component vector of float) +0:138 'inF1' ( in 2-component vector of float) 0:139 Sequence -0:139 move second child to first child ( temp 2-component vector of bool) -0:139 'r039' ( temp 2-component vector of bool) -0:139 isinf ( temp 2-component vector of bool) +0:139 move second child to first child ( temp 2-component vector of float) +0:139 'r036' ( temp 2-component vector of float) +0:139 Fraction ( temp 2-component vector of float) 0:139 'inF0' ( in 2-component vector of float) 0:140 Sequence -0:140 move second child to first child ( temp 2-component vector of bool) -0:140 'r040' ( temp 2-component vector of bool) -0:140 isnan ( temp 2-component vector of bool) +0:140 move second child to first child ( temp 2-component vector of float) +0:140 'r038' ( temp 2-component vector of float) +0:140 fwidth ( temp 2-component vector of float) 0:140 'inF0' ( in 2-component vector of float) 0:141 Sequence -0:141 move second child to first child ( temp 2-component vector of float) -0:141 'r041' ( temp 2-component vector of float) -0:141 ldexp ( temp 2-component vector of float) +0:141 move second child to first child ( temp 2-component vector of bool) +0:141 'r039' ( temp 2-component vector of bool) +0:141 isinf ( temp 2-component vector of bool) 0:141 'inF0' ( in 2-component vector of float) -0:141 'inF1' ( in 2-component vector of float) 0:142 Sequence -0:142 move second child to first child ( temp 2-component vector of float) -0:142 'r039a' ( temp 2-component vector of float) -0:142 mix ( temp 2-component vector of float) +0:142 move second child to first child ( temp 2-component vector of bool) +0:142 'r040' ( temp 2-component vector of bool) +0:142 isnan ( temp 2-component vector of bool) 0:142 'inF0' ( in 2-component vector of float) -0:142 'inF1' ( in 2-component vector of float) -0:142 'inF2' ( in 2-component vector of float) 0:143 Sequence -0:143 move second child to first child ( temp float) -0:143 'r042' ( temp float) -0:143 length ( temp float) +0:143 move second child to first child ( temp 2-component vector of float) +0:143 'r041' ( temp 2-component vector of float) +0:143 ldexp ( temp 2-component vector of float) 0:143 'inF0' ( in 2-component vector of float) +0:143 'inF1' ( in 2-component vector of float) 0:144 Sequence 0:144 move second child to first child ( temp 2-component vector of float) -0:144 'r043' ( temp 2-component vector of float) -0:144 log ( temp 2-component vector of float) +0:144 'r039a' ( temp 2-component vector of float) +0:144 mix ( temp 2-component vector of float) 0:144 'inF0' ( in 2-component vector of float) +0:144 'inF1' ( in 2-component vector of float) +0:144 'inF2' ( in 2-component vector of float) 0:145 Sequence -0:145 move second child to first child ( temp 2-component vector of float) -0:145 'r044' ( temp 2-component vector of float) -0:145 vector-scale ( temp 2-component vector of float) -0:145 log2 ( temp 2-component vector of float) -0:145 'inF0' ( in 2-component vector of float) -0:145 Constant: -0:145 0.301030 +0:145 move second child to first child ( temp float) +0:145 'r042' ( temp float) +0:145 length ( temp float) +0:145 'inF0' ( in 2-component vector of float) 0:146 Sequence 0:146 move second child to first child ( temp 2-component vector of float) -0:146 'r045' ( temp 2-component vector of float) -0:146 log2 ( temp 2-component vector of float) +0:146 'r043' ( temp 2-component vector of float) +0:146 log ( temp 2-component vector of float) 0:146 'inF0' ( in 2-component vector of float) 0:147 Sequence 0:147 move second child to first child ( temp 2-component vector of float) -0:147 'r046' ( temp 2-component vector of float) -0:147 max ( temp 2-component vector of float) -0:147 'inF0' ( in 2-component vector of float) -0:147 'inF1' ( in 2-component vector of float) +0:147 'r044' ( temp 2-component vector of float) +0:147 vector-scale ( temp 2-component vector of float) +0:147 log2 ( temp 2-component vector of float) +0:147 'inF0' ( in 2-component vector of float) +0:147 Constant: +0:147 0.301030 0:148 Sequence 0:148 move second child to first child ( temp 2-component vector of float) -0:148 'r047' ( temp 2-component vector of float) -0:148 min ( temp 2-component vector of float) +0:148 'r045' ( temp 2-component vector of float) +0:148 log2 ( temp 2-component vector of float) 0:148 'inF0' ( in 2-component vector of float) -0:148 'inF1' ( in 2-component vector of float) 0:149 Sequence 0:149 move second child to first child ( temp 2-component vector of float) -0:149 'r048' ( temp 2-component vector of float) -0:149 normalize ( temp 2-component vector of float) +0:149 'r046' ( temp 2-component vector of float) +0:149 max ( temp 2-component vector of float) 0:149 'inF0' ( in 2-component vector of float) +0:149 'inF1' ( in 2-component vector of float) 0:150 Sequence 0:150 move second child to first child ( temp 2-component vector of float) -0:150 'r049' ( temp 2-component vector of float) -0:150 pow ( temp 2-component vector of float) +0:150 'r047' ( temp 2-component vector of float) +0:150 min ( temp 2-component vector of float) 0:150 'inF0' ( in 2-component vector of float) 0:150 'inF1' ( in 2-component vector of float) 0:151 Sequence 0:151 move second child to first child ( temp 2-component vector of float) -0:151 'r050' ( temp 2-component vector of float) -0:151 radians ( temp 2-component vector of float) +0:151 'r048' ( temp 2-component vector of float) +0:151 normalize ( temp 2-component vector of float) 0:151 'inF0' ( in 2-component vector of float) 0:152 Sequence 0:152 move second child to first child ( temp 2-component vector of float) -0:152 'r051' ( temp 2-component vector of float) -0:152 divide ( temp 2-component vector of float) -0:152 Constant: -0:152 1.000000 +0:152 'r049' ( temp 2-component vector of float) +0:152 pow ( temp 2-component vector of float) 0:152 'inF0' ( in 2-component vector of float) +0:152 'inF1' ( in 2-component vector of float) 0:153 Sequence 0:153 move second child to first child ( temp 2-component vector of float) -0:153 'r052' ( temp 2-component vector of float) -0:153 reflect ( temp 2-component vector of float) +0:153 'r050' ( temp 2-component vector of float) +0:153 radians ( temp 2-component vector of float) 0:153 'inF0' ( in 2-component vector of float) -0:153 'inF1' ( in 2-component vector of float) 0:154 Sequence 0:154 move second child to first child ( temp 2-component vector of float) -0:154 'r053' ( temp 2-component vector of float) -0:154 refract ( temp 2-component vector of float) -0:154 'inF0' ( in 2-component vector of float) -0:154 'inF1' ( in 2-component vector of float) +0:154 'r051' ( temp 2-component vector of float) +0:154 divide ( temp 2-component vector of float) 0:154 Constant: -0:154 2.000000 +0:154 1.000000 +0:154 'inF0' ( in 2-component vector of float) 0:155 Sequence -0:155 move second child to first child ( temp 2-component vector of uint) -0:155 'r054' ( temp 2-component vector of uint) +0:155 move second child to first child ( temp 2-component vector of float) +0:155 'r052' ( temp 2-component vector of float) +0:155 reflect ( temp 2-component vector of float) +0:155 'inF0' ( in 2-component vector of float) +0:155 'inF1' ( in 2-component vector of float) +0:156 Sequence +0:156 move second child to first child ( temp 2-component vector of float) +0:156 'r053' ( temp 2-component vector of float) +0:156 refract ( temp 2-component vector of float) +0:156 'inF0' ( in 2-component vector of float) +0:156 'inF1' ( in 2-component vector of float) +0:156 Constant: +0:156 2.000000 +0:157 Sequence +0:157 move second child to first child ( temp 2-component vector of uint) +0:157 'r054' ( temp 2-component vector of uint) 0:? bitFieldReverse ( temp 2-component vector of uint) 0:? Constant: 0:? 1 (const uint) 0:? 2 (const uint) -0:156 Sequence -0:156 move second child to first child ( temp 2-component vector of float) -0:156 'r055' ( temp 2-component vector of float) -0:156 roundEven ( temp 2-component vector of float) -0:156 'inF0' ( in 2-component vector of float) -0:157 Sequence -0:157 move second child to first child ( temp 2-component vector of float) -0:157 'r056' ( temp 2-component vector of float) -0:157 inverse sqrt ( temp 2-component vector of float) -0:157 'inF0' ( in 2-component vector of float) 0:158 Sequence 0:158 move second child to first child ( temp 2-component vector of float) -0:158 'r057' ( temp 2-component vector of float) -0:158 clamp ( temp 2-component vector of float) +0:158 'r055' ( temp 2-component vector of float) +0:158 roundEven ( temp 2-component vector of float) 0:158 'inF0' ( in 2-component vector of float) -0:158 Constant: -0:158 0.000000 -0:158 Constant: -0:158 1.000000 0:159 Sequence 0:159 move second child to first child ( temp 2-component vector of float) -0:159 'r058' ( temp 2-component vector of float) -0:159 Sign ( temp 2-component vector of float) +0:159 'r056' ( temp 2-component vector of float) +0:159 inverse sqrt ( temp 2-component vector of float) 0:159 'inF0' ( in 2-component vector of float) 0:160 Sequence 0:160 move second child to first child ( temp 2-component vector of float) -0:160 'r059' ( temp 2-component vector of float) -0:160 sine ( temp 2-component vector of float) +0:160 'r057' ( temp 2-component vector of float) +0:160 clamp ( temp 2-component vector of float) 0:160 'inF0' ( in 2-component vector of float) +0:160 Constant: +0:160 0.000000 +0:160 Constant: +0:160 1.000000 0:161 Sequence 0:161 move second child to first child ( temp 2-component vector of float) -0:161 'inF1' ( in 2-component vector of float) -0:161 sine ( temp 2-component vector of float) -0:161 'inF0' ( in 2-component vector of float) -0:161 move second child to first child ( temp 2-component vector of float) -0:161 'inF2' ( in 2-component vector of float) -0:161 cosine ( temp 2-component vector of float) +0:161 'r058' ( temp 2-component vector of float) +0:161 Sign ( temp 2-component vector of float) 0:161 'inF0' ( in 2-component vector of float) 0:162 Sequence 0:162 move second child to first child ( temp 2-component vector of float) -0:162 'r060' ( temp 2-component vector of float) -0:162 hyp. sine ( temp 2-component vector of float) +0:162 'r059' ( temp 2-component vector of float) +0:162 sine ( temp 2-component vector of float) 0:162 'inF0' ( in 2-component vector of float) 0:163 Sequence 0:163 move second child to first child ( temp 2-component vector of float) -0:163 'r061' ( temp 2-component vector of float) -0:163 smoothstep ( temp 2-component vector of float) +0:163 'inF1' ( in 2-component vector of float) +0:163 sine ( temp 2-component vector of float) +0:163 'inF0' ( in 2-component vector of float) +0:163 move second child to first child ( temp 2-component vector of float) +0:163 'inF2' ( in 2-component vector of float) +0:163 cosine ( temp 2-component vector of float) 0:163 'inF0' ( in 2-component vector of float) -0:163 'inF1' ( in 2-component vector of float) -0:163 'inF2' ( in 2-component vector of float) 0:164 Sequence 0:164 move second child to first child ( temp 2-component vector of float) -0:164 'r062' ( temp 2-component vector of float) -0:164 sqrt ( temp 2-component vector of float) +0:164 'r060' ( temp 2-component vector of float) +0:164 hyp. sine ( temp 2-component vector of float) 0:164 'inF0' ( in 2-component vector of float) 0:165 Sequence 0:165 move second child to first child ( temp 2-component vector of float) -0:165 'r063' ( temp 2-component vector of float) -0:165 step ( temp 2-component vector of float) +0:165 'r061' ( temp 2-component vector of float) +0:165 smoothstep ( temp 2-component vector of float) 0:165 'inF0' ( in 2-component vector of float) 0:165 'inF1' ( in 2-component vector of float) +0:165 'inF2' ( in 2-component vector of float) 0:166 Sequence 0:166 move second child to first child ( temp 2-component vector of float) -0:166 'r064' ( temp 2-component vector of float) -0:166 tangent ( temp 2-component vector of float) +0:166 'r062' ( temp 2-component vector of float) +0:166 sqrt ( temp 2-component vector of float) 0:166 'inF0' ( in 2-component vector of float) 0:167 Sequence 0:167 move second child to first child ( temp 2-component vector of float) -0:167 'r065' ( temp 2-component vector of float) -0:167 hyp. tangent ( temp 2-component vector of float) +0:167 'r063' ( temp 2-component vector of float) +0:167 step ( temp 2-component vector of float) 0:167 'inF0' ( in 2-component vector of float) +0:167 'inF1' ( in 2-component vector of float) +0:168 Sequence +0:168 move second child to first child ( temp 2-component vector of float) +0:168 'r064' ( temp 2-component vector of float) +0:168 tangent ( temp 2-component vector of float) +0:168 'inF0' ( in 2-component vector of float) 0:169 Sequence 0:169 move second child to first child ( temp 2-component vector of float) -0:169 'r066' ( temp 2-component vector of float) -0:169 trunc ( temp 2-component vector of float) +0:169 'r065' ( temp 2-component vector of float) +0:169 hyp. tangent ( temp 2-component vector of float) 0:169 'inF0' ( in 2-component vector of float) -0:172 Branch: Return with expression +0:171 Sequence +0:171 move second child to first child ( temp 2-component vector of float) +0:171 'r066' ( temp 2-component vector of float) +0:171 trunc ( temp 2-component vector of float) +0:171 'inF0' ( in 2-component vector of float) +0:174 Branch: Return with expression 0:? Constant: 0:? 1.000000 0:? 2.000000 -0:176 Function Definition: PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) -0:176 Function Parameters: -0:176 'inF0' ( in 3-component vector of float) -0:176 'inF1' ( in 3-component vector of float) -0:176 'inF2' ( in 3-component vector of float) -0:176 'inU0' ( in 3-component vector of uint) -0:176 'inU1' ( in 3-component vector of uint) +0:178 Function Definition: PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) +0:178 Function Parameters: +0:178 'inF0' ( in 3-component vector of float) +0:178 'inF1' ( in 3-component vector of float) +0:178 'inF2' ( in 3-component vector of float) +0:178 'inU0' ( in 3-component vector of uint) +0:178 'inU1' ( in 3-component vector of uint) 0:? Sequence -0:179 Sequence -0:179 move second child to first child ( temp bool) -0:179 'r000' ( temp bool) -0:179 all ( temp bool) -0:179 'inF0' ( in 3-component vector of float) -0:180 Sequence -0:180 move second child to first child ( temp 3-component vector of float) -0:180 'r001' ( temp 3-component vector of float) -0:180 Absolute value ( temp 3-component vector of float) -0:180 'inF0' ( in 3-component vector of float) 0:181 Sequence -0:181 move second child to first child ( temp 3-component vector of float) -0:181 'r002' ( temp 3-component vector of float) -0:181 arc cosine ( temp 3-component vector of float) -0:181 'inF0' ( in 3-component vector of float) +0:181 move second child to first child ( temp bool) +0:181 'r000' ( temp bool) +0:181 all ( temp bool) +0:181 Convert float to bool ( temp 3-component vector of bool) +0:181 'inF0' ( in 3-component vector of float) 0:182 Sequence -0:182 move second child to first child ( temp bool) -0:182 'r003' ( temp bool) -0:182 any ( temp bool) +0:182 move second child to first child ( temp 3-component vector of float) +0:182 'r001' ( temp 3-component vector of float) +0:182 Absolute value ( temp 3-component vector of float) 0:182 'inF0' ( in 3-component vector of float) 0:183 Sequence 0:183 move second child to first child ( temp 3-component vector of float) -0:183 'r004' ( temp 3-component vector of float) -0:183 arc sine ( temp 3-component vector of float) +0:183 'r002' ( temp 3-component vector of float) +0:183 arc cosine ( temp 3-component vector of float) 0:183 'inF0' ( in 3-component vector of float) 0:184 Sequence -0:184 move second child to first child ( temp 3-component vector of int) -0:184 'r005' ( temp 3-component vector of int) -0:184 floatBitsToInt ( temp 3-component vector of int) -0:184 'inF0' ( in 3-component vector of float) +0:184 move second child to first child ( temp bool) +0:184 'r003' ( temp bool) +0:184 any ( temp bool) +0:184 Convert float to bool ( temp 3-component vector of bool) +0:184 'inF0' ( in 3-component vector of float) 0:185 Sequence -0:185 move second child to first child ( temp 3-component vector of uint) -0:185 'r006' ( temp 3-component vector of uint) -0:185 floatBitsToUint ( temp 3-component vector of uint) +0:185 move second child to first child ( temp 3-component vector of float) +0:185 'r004' ( temp 3-component vector of float) +0:185 arc sine ( temp 3-component vector of float) 0:185 'inF0' ( in 3-component vector of float) 0:186 Sequence -0:186 move second child to first child ( temp 3-component vector of float) -0:186 'r007' ( temp 3-component vector of float) -0:186 intBitsToFloat ( temp 3-component vector of float) -0:186 'inU0' ( in 3-component vector of uint) +0:186 move second child to first child ( temp 3-component vector of int) +0:186 'r005' ( temp 3-component vector of int) +0:186 floatBitsToInt ( temp 3-component vector of int) +0:186 'inF0' ( in 3-component vector of float) +0:187 Sequence +0:187 move second child to first child ( temp 3-component vector of uint) +0:187 'r006' ( temp 3-component vector of uint) +0:187 floatBitsToUint ( temp 3-component vector of uint) +0:187 'inF0' ( in 3-component vector of float) 0:188 Sequence 0:188 move second child to first child ( temp 3-component vector of float) -0:188 'r009' ( temp 3-component vector of float) -0:188 arc tangent ( temp 3-component vector of float) -0:188 'inF0' ( in 3-component vector of float) -0:189 Sequence -0:189 move second child to first child ( temp 3-component vector of float) -0:189 'r010' ( temp 3-component vector of float) -0:189 arc tangent ( temp 3-component vector of float) -0:189 'inF0' ( in 3-component vector of float) -0:189 'inF1' ( in 3-component vector of float) +0:188 'r007' ( temp 3-component vector of float) +0:188 intBitsToFloat ( temp 3-component vector of float) +0:188 'inU0' ( in 3-component vector of uint) 0:190 Sequence 0:190 move second child to first child ( temp 3-component vector of float) -0:190 'r011' ( temp 3-component vector of float) -0:190 Ceiling ( temp 3-component vector of float) +0:190 'r009' ( temp 3-component vector of float) +0:190 arc tangent ( temp 3-component vector of float) 0:190 'inF0' ( in 3-component vector of float) 0:191 Sequence 0:191 move second child to first child ( temp 3-component vector of float) -0:191 'r012' ( temp 3-component vector of float) -0:191 clamp ( temp 3-component vector of float) +0:191 'r010' ( temp 3-component vector of float) +0:191 arc tangent ( temp 3-component vector of float) 0:191 'inF0' ( in 3-component vector of float) 0:191 'inF1' ( in 3-component vector of float) -0:191 'inF2' ( in 3-component vector of float) -0:192 Test condition and select ( temp void) -0:192 Condition -0:192 any ( temp bool) -0:192 Compare Less Than ( temp 3-component vector of bool) +0:192 Sequence +0:192 move second child to first child ( temp 3-component vector of float) +0:192 'r011' ( temp 3-component vector of float) +0:192 Ceiling ( temp 3-component vector of float) 0:192 'inF0' ( in 3-component vector of float) -0:192 Constant: -0:192 0.000000 -0:192 0.000000 -0:192 0.000000 -0:192 true case -0:192 Branch: Kill 0:193 Sequence 0:193 move second child to first child ( temp 3-component vector of float) -0:193 'r013' ( temp 3-component vector of float) -0:193 cosine ( temp 3-component vector of float) +0:193 'r012' ( temp 3-component vector of float) +0:193 clamp ( temp 3-component vector of float) 0:193 'inF0' ( in 3-component vector of float) -0:194 Sequence -0:194 move second child to first child ( temp 3-component vector of float) -0:194 'r014' ( temp 3-component vector of float) -0:194 hyp. cosine ( temp 3-component vector of float) +0:193 'inF1' ( in 3-component vector of float) +0:193 'inF2' ( in 3-component vector of float) +0:194 Test condition and select ( temp void) +0:194 Condition +0:194 any ( temp bool) +0:194 Compare Less Than ( temp 3-component vector of bool) 0:194 'inF0' ( in 3-component vector of float) -0:195 Sequence -0:195 move second child to first child ( temp 3-component vector of uint) -0:195 'r015' ( temp 3-component vector of uint) +0:194 Constant: +0:194 0.000000 +0:194 0.000000 +0:194 0.000000 +0:194 true case +0:194 Branch: Kill +0:195 Test condition and select ( temp void) +0:195 Condition +0:195 any ( temp bool) +0:195 Compare Less Than ( temp 3-component vector of bool) +0:195 'inU0' ( in 3-component vector of uint) +0:195 Constant: +0:195 0.000000 +0:195 0.000000 +0:195 0.000000 +0:195 true case +0:195 Branch: Kill +0:196 Sequence +0:196 move second child to first child ( temp 3-component vector of float) +0:196 'r013' ( temp 3-component vector of float) +0:196 cosine ( temp 3-component vector of float) +0:196 'inF0' ( in 3-component vector of float) +0:197 Sequence +0:197 move second child to first child ( temp 3-component vector of float) +0:197 'r014' ( temp 3-component vector of float) +0:197 hyp. cosine ( temp 3-component vector of float) +0:197 'inF0' ( in 3-component vector of float) +0:198 Sequence +0:198 move second child to first child ( temp 3-component vector of uint) +0:198 'r015' ( temp 3-component vector of uint) 0:? bitCount ( temp 3-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 3 (const uint) 0:? 5 (const uint) -0:196 Sequence -0:196 move second child to first child ( temp 3-component vector of float) -0:196 'r016' ( temp 3-component vector of float) -0:196 cross-product ( temp 3-component vector of float) -0:196 'inF0' ( in 3-component vector of float) -0:196 'inF1' ( in 3-component vector of float) -0:197 Sequence -0:197 move second child to first child ( temp 3-component vector of float) -0:197 'r017' ( temp 3-component vector of float) -0:197 dPdx ( temp 3-component vector of float) -0:197 'inF0' ( in 3-component vector of float) -0:198 Sequence -0:198 move second child to first child ( temp 3-component vector of float) -0:198 'r018' ( temp 3-component vector of float) -0:198 dPdxCoarse ( temp 3-component vector of float) -0:198 'inF0' ( in 3-component vector of float) 0:199 Sequence 0:199 move second child to first child ( temp 3-component vector of float) -0:199 'r019' ( temp 3-component vector of float) -0:199 dPdxFine ( temp 3-component vector of float) +0:199 'r016' ( temp 3-component vector of float) +0:199 cross-product ( temp 3-component vector of float) 0:199 'inF0' ( in 3-component vector of float) +0:199 'inF1' ( in 3-component vector of float) 0:200 Sequence 0:200 move second child to first child ( temp 3-component vector of float) -0:200 'r020' ( temp 3-component vector of float) -0:200 dPdy ( temp 3-component vector of float) +0:200 'r017' ( temp 3-component vector of float) +0:200 dPdx ( temp 3-component vector of float) 0:200 'inF0' ( in 3-component vector of float) 0:201 Sequence 0:201 move second child to first child ( temp 3-component vector of float) -0:201 'r021' ( temp 3-component vector of float) -0:201 dPdyCoarse ( temp 3-component vector of float) +0:201 'r018' ( temp 3-component vector of float) +0:201 dPdxCoarse ( temp 3-component vector of float) 0:201 'inF0' ( in 3-component vector of float) 0:202 Sequence 0:202 move second child to first child ( temp 3-component vector of float) -0:202 'r022' ( temp 3-component vector of float) -0:202 dPdyFine ( temp 3-component vector of float) +0:202 'r019' ( temp 3-component vector of float) +0:202 dPdxFine ( temp 3-component vector of float) 0:202 'inF0' ( in 3-component vector of float) 0:203 Sequence 0:203 move second child to first child ( temp 3-component vector of float) -0:203 'r023' ( temp 3-component vector of float) -0:203 degrees ( temp 3-component vector of float) +0:203 'r020' ( temp 3-component vector of float) +0:203 dPdy ( temp 3-component vector of float) 0:203 'inF0' ( in 3-component vector of float) 0:204 Sequence -0:204 move second child to first child ( temp float) -0:204 'r024' ( temp float) -0:204 distance ( temp float) +0:204 move second child to first child ( temp 3-component vector of float) +0:204 'r021' ( temp 3-component vector of float) +0:204 dPdyCoarse ( temp 3-component vector of float) 0:204 'inF0' ( in 3-component vector of float) -0:204 'inF1' ( in 3-component vector of float) 0:205 Sequence -0:205 move second child to first child ( temp float) -0:205 'r025' ( temp float) -0:205 dot-product ( temp float) +0:205 move second child to first child ( temp 3-component vector of float) +0:205 'r022' ( temp 3-component vector of float) +0:205 dPdyFine ( temp 3-component vector of float) 0:205 'inF0' ( in 3-component vector of float) -0:205 'inF1' ( in 3-component vector of float) -0:209 Sequence -0:209 move second child to first child ( temp 3-component vector of float) -0:209 'r029' ( temp 3-component vector of float) -0:209 exp ( temp 3-component vector of float) -0:209 'inF0' ( in 3-component vector of float) -0:210 Sequence -0:210 move second child to first child ( temp 3-component vector of float) -0:210 'r030' ( temp 3-component vector of float) -0:210 exp2 ( temp 3-component vector of float) -0:210 'inF0' ( in 3-component vector of float) -0:211 Sequence -0:211 move second child to first child ( temp 3-component vector of float) -0:211 'r031' ( temp 3-component vector of float) -0:211 face-forward ( temp 3-component vector of float) -0:211 'inF0' ( in 3-component vector of float) -0:211 'inF1' ( in 3-component vector of float) -0:211 'inF2' ( in 3-component vector of float) +0:206 Sequence +0:206 move second child to first child ( temp 3-component vector of float) +0:206 'r023' ( temp 3-component vector of float) +0:206 degrees ( temp 3-component vector of float) +0:206 'inF0' ( in 3-component vector of float) +0:207 Sequence +0:207 move second child to first child ( temp float) +0:207 'r024' ( temp float) +0:207 distance ( temp float) +0:207 'inF0' ( in 3-component vector of float) +0:207 'inF1' ( in 3-component vector of float) +0:208 Sequence +0:208 move second child to first child ( temp float) +0:208 'r025' ( temp float) +0:208 dot-product ( temp float) +0:208 'inF0' ( in 3-component vector of float) +0:208 'inF1' ( in 3-component vector of float) 0:212 Sequence -0:212 move second child to first child ( temp 3-component vector of uint) -0:212 'r032' ( temp 3-component vector of uint) +0:212 move second child to first child ( temp 3-component vector of float) +0:212 'r029' ( temp 3-component vector of float) +0:212 exp ( temp 3-component vector of float) +0:212 'inF0' ( in 3-component vector of float) +0:213 Sequence +0:213 move second child to first child ( temp 3-component vector of float) +0:213 'r030' ( temp 3-component vector of float) +0:213 exp2 ( temp 3-component vector of float) +0:213 'inF0' ( in 3-component vector of float) +0:214 Sequence +0:214 move second child to first child ( temp 3-component vector of float) +0:214 'r031' ( temp 3-component vector of float) +0:214 face-forward ( temp 3-component vector of float) +0:214 'inF0' ( in 3-component vector of float) +0:214 'inF1' ( in 3-component vector of float) +0:214 'inF2' ( in 3-component vector of float) +0:215 Sequence +0:215 move second child to first child ( temp 3-component vector of uint) +0:215 'r032' ( temp 3-component vector of uint) 0:? findMSB ( temp 3-component vector of uint) 0:? Constant: 0:? 2 (const uint) 0:? 3 (const uint) 0:? 4 (const uint) -0:213 Sequence -0:213 move second child to first child ( temp 3-component vector of uint) -0:213 'r033' ( temp 3-component vector of uint) +0:216 Sequence +0:216 move second child to first child ( temp 3-component vector of uint) +0:216 'r033' ( temp 3-component vector of uint) 0:? findLSB ( temp 3-component vector of uint) 0:? Constant: 0:? 2 (const uint) 0:? 3 (const uint) 0:? 4 (const uint) -0:214 Sequence -0:214 move second child to first child ( temp 3-component vector of float) -0:214 'r034' ( temp 3-component vector of float) -0:214 Floor ( temp 3-component vector of float) -0:214 'inF0' ( in 3-component vector of float) -0:216 Sequence -0:216 move second child to first child ( temp 3-component vector of float) -0:216 'r036' ( temp 3-component vector of float) -0:216 mod ( temp 3-component vector of float) -0:216 'inF0' ( in 3-component vector of float) -0:216 'inF1' ( in 3-component vector of float) 0:217 Sequence 0:217 move second child to first child ( temp 3-component vector of float) -0:217 'r037' ( temp 3-component vector of float) -0:217 Fraction ( temp 3-component vector of float) +0:217 'r034' ( temp 3-component vector of float) +0:217 Floor ( temp 3-component vector of float) 0:217 'inF0' ( in 3-component vector of float) -0:218 Sequence -0:218 move second child to first child ( temp 3-component vector of float) -0:218 'r039' ( temp 3-component vector of float) -0:218 fwidth ( temp 3-component vector of float) -0:218 'inF0' ( in 3-component vector of float) 0:219 Sequence -0:219 move second child to first child ( temp 3-component vector of bool) -0:219 'r040' ( temp 3-component vector of bool) -0:219 isinf ( temp 3-component vector of bool) +0:219 move second child to first child ( temp 3-component vector of float) +0:219 'r036' ( temp 3-component vector of float) +0:219 mod ( temp 3-component vector of float) 0:219 'inF0' ( in 3-component vector of float) +0:219 'inF1' ( in 3-component vector of float) 0:220 Sequence -0:220 move second child to first child ( temp 3-component vector of bool) -0:220 'r041' ( temp 3-component vector of bool) -0:220 isnan ( temp 3-component vector of bool) +0:220 move second child to first child ( temp 3-component vector of float) +0:220 'r037' ( temp 3-component vector of float) +0:220 Fraction ( temp 3-component vector of float) 0:220 'inF0' ( in 3-component vector of float) 0:221 Sequence 0:221 move second child to first child ( temp 3-component vector of float) -0:221 'r042' ( temp 3-component vector of float) -0:221 ldexp ( temp 3-component vector of float) +0:221 'r039' ( temp 3-component vector of float) +0:221 fwidth ( temp 3-component vector of float) 0:221 'inF0' ( in 3-component vector of float) -0:221 'inF1' ( in 3-component vector of float) 0:222 Sequence -0:222 move second child to first child ( temp 3-component vector of float) -0:222 'r039a' ( temp 3-component vector of float) -0:222 mix ( temp 3-component vector of float) +0:222 move second child to first child ( temp 3-component vector of bool) +0:222 'r040' ( temp 3-component vector of bool) +0:222 isinf ( temp 3-component vector of bool) 0:222 'inF0' ( in 3-component vector of float) -0:222 'inF1' ( in 3-component vector of float) -0:222 'inF2' ( in 3-component vector of float) 0:223 Sequence -0:223 move second child to first child ( temp 3-component vector of float) -0:223 'r039b' ( temp 3-component vector of float) -0:223 mix ( temp 3-component vector of float) +0:223 move second child to first child ( temp 3-component vector of bool) +0:223 'r041' ( temp 3-component vector of bool) +0:223 isnan ( temp 3-component vector of bool) 0:223 'inF0' ( in 3-component vector of float) -0:223 'inF1' ( in 3-component vector of float) -0:223 Constant: -0:223 0.300000 0:224 Sequence -0:224 move second child to first child ( temp float) -0:224 'r043' ( temp float) -0:224 length ( temp float) +0:224 move second child to first child ( temp 3-component vector of float) +0:224 'r042' ( temp 3-component vector of float) +0:224 ldexp ( temp 3-component vector of float) 0:224 'inF0' ( in 3-component vector of float) +0:224 'inF1' ( in 3-component vector of float) 0:225 Sequence 0:225 move second child to first child ( temp 3-component vector of float) -0:225 'r044' ( temp 3-component vector of float) -0:225 log ( temp 3-component vector of float) +0:225 'r039a' ( temp 3-component vector of float) +0:225 mix ( temp 3-component vector of float) 0:225 'inF0' ( in 3-component vector of float) +0:225 'inF1' ( in 3-component vector of float) +0:225 'inF2' ( in 3-component vector of float) 0:226 Sequence 0:226 move second child to first child ( temp 3-component vector of float) -0:226 'r045' ( temp 3-component vector of float) -0:226 vector-scale ( temp 3-component vector of float) -0:226 log2 ( temp 3-component vector of float) -0:226 'inF0' ( in 3-component vector of float) +0:226 'r039b' ( temp 3-component vector of float) +0:226 mix ( temp 3-component vector of float) +0:226 'inF0' ( in 3-component vector of float) +0:226 'inF1' ( in 3-component vector of float) 0:226 Constant: -0:226 0.301030 +0:226 0.300000 0:227 Sequence -0:227 move second child to first child ( temp 3-component vector of float) -0:227 'r046' ( temp 3-component vector of float) -0:227 log2 ( temp 3-component vector of float) +0:227 move second child to first child ( temp float) +0:227 'r043' ( temp float) +0:227 length ( temp float) 0:227 'inF0' ( in 3-component vector of float) 0:228 Sequence 0:228 move second child to first child ( temp 3-component vector of float) -0:228 'r047' ( temp 3-component vector of float) -0:228 max ( temp 3-component vector of float) +0:228 'r044' ( temp 3-component vector of float) +0:228 log ( temp 3-component vector of float) 0:228 'inF0' ( in 3-component vector of float) -0:228 'inF1' ( in 3-component vector of float) 0:229 Sequence 0:229 move second child to first child ( temp 3-component vector of float) -0:229 'r048' ( temp 3-component vector of float) -0:229 min ( temp 3-component vector of float) -0:229 'inF0' ( in 3-component vector of float) -0:229 'inF1' ( in 3-component vector of float) +0:229 'r045' ( temp 3-component vector of float) +0:229 vector-scale ( temp 3-component vector of float) +0:229 log2 ( temp 3-component vector of float) +0:229 'inF0' ( in 3-component vector of float) +0:229 Constant: +0:229 0.301030 0:230 Sequence 0:230 move second child to first child ( temp 3-component vector of float) -0:230 'r049' ( temp 3-component vector of float) -0:230 normalize ( temp 3-component vector of float) +0:230 'r046' ( temp 3-component vector of float) +0:230 log2 ( temp 3-component vector of float) 0:230 'inF0' ( in 3-component vector of float) 0:231 Sequence 0:231 move second child to first child ( temp 3-component vector of float) -0:231 'r050' ( temp 3-component vector of float) -0:231 pow ( temp 3-component vector of float) +0:231 'r047' ( temp 3-component vector of float) +0:231 max ( temp 3-component vector of float) 0:231 'inF0' ( in 3-component vector of float) 0:231 'inF1' ( in 3-component vector of float) 0:232 Sequence 0:232 move second child to first child ( temp 3-component vector of float) -0:232 'r051' ( temp 3-component vector of float) -0:232 radians ( temp 3-component vector of float) +0:232 'r048' ( temp 3-component vector of float) +0:232 min ( temp 3-component vector of float) 0:232 'inF0' ( in 3-component vector of float) +0:232 'inF1' ( in 3-component vector of float) 0:233 Sequence 0:233 move second child to first child ( temp 3-component vector of float) -0:233 'r052' ( temp 3-component vector of float) -0:233 divide ( temp 3-component vector of float) -0:233 Constant: -0:233 1.000000 +0:233 'r049' ( temp 3-component vector of float) +0:233 normalize ( temp 3-component vector of float) 0:233 'inF0' ( in 3-component vector of float) 0:234 Sequence 0:234 move second child to first child ( temp 3-component vector of float) -0:234 'r053' ( temp 3-component vector of float) -0:234 reflect ( temp 3-component vector of float) +0:234 'r050' ( temp 3-component vector of float) +0:234 pow ( temp 3-component vector of float) 0:234 'inF0' ( in 3-component vector of float) 0:234 'inF1' ( in 3-component vector of float) 0:235 Sequence 0:235 move second child to first child ( temp 3-component vector of float) -0:235 'r054' ( temp 3-component vector of float) -0:235 refract ( temp 3-component vector of float) +0:235 'r051' ( temp 3-component vector of float) +0:235 radians ( temp 3-component vector of float) 0:235 'inF0' ( in 3-component vector of float) -0:235 'inF1' ( in 3-component vector of float) -0:235 Constant: -0:235 2.000000 0:236 Sequence -0:236 move second child to first child ( temp 3-component vector of uint) -0:236 'r055' ( temp 3-component vector of uint) +0:236 move second child to first child ( temp 3-component vector of float) +0:236 'r052' ( temp 3-component vector of float) +0:236 divide ( temp 3-component vector of float) +0:236 Constant: +0:236 1.000000 +0:236 'inF0' ( in 3-component vector of float) +0:237 Sequence +0:237 move second child to first child ( temp 3-component vector of float) +0:237 'r053' ( temp 3-component vector of float) +0:237 reflect ( temp 3-component vector of float) +0:237 'inF0' ( in 3-component vector of float) +0:237 'inF1' ( in 3-component vector of float) +0:238 Sequence +0:238 move second child to first child ( temp 3-component vector of float) +0:238 'r054' ( temp 3-component vector of float) +0:238 refract ( temp 3-component vector of float) +0:238 'inF0' ( in 3-component vector of float) +0:238 'inF1' ( in 3-component vector of float) +0:238 Constant: +0:238 2.000000 +0:239 Sequence +0:239 move second child to first child ( temp 3-component vector of uint) +0:239 'r055' ( temp 3-component vector of uint) 0:? bitFieldReverse ( temp 3-component vector of uint) 0:? Constant: 0:? 1 (const uint) 0:? 2 (const uint) 0:? 3 (const uint) -0:237 Sequence -0:237 move second child to first child ( temp 3-component vector of float) -0:237 'r056' ( temp 3-component vector of float) -0:237 roundEven ( temp 3-component vector of float) -0:237 'inF0' ( in 3-component vector of float) -0:238 Sequence -0:238 move second child to first child ( temp 3-component vector of float) -0:238 'r057' ( temp 3-component vector of float) -0:238 inverse sqrt ( temp 3-component vector of float) -0:238 'inF0' ( in 3-component vector of float) -0:239 Sequence -0:239 move second child to first child ( temp 3-component vector of float) -0:239 'r058' ( temp 3-component vector of float) -0:239 clamp ( temp 3-component vector of float) -0:239 'inF0' ( in 3-component vector of float) -0:239 Constant: -0:239 0.000000 -0:239 Constant: -0:239 1.000000 0:240 Sequence 0:240 move second child to first child ( temp 3-component vector of float) -0:240 'r059' ( temp 3-component vector of float) -0:240 Sign ( temp 3-component vector of float) +0:240 'r056' ( temp 3-component vector of float) +0:240 roundEven ( temp 3-component vector of float) 0:240 'inF0' ( in 3-component vector of float) 0:241 Sequence 0:241 move second child to first child ( temp 3-component vector of float) -0:241 'r060' ( temp 3-component vector of float) -0:241 sine ( temp 3-component vector of float) +0:241 'r057' ( temp 3-component vector of float) +0:241 inverse sqrt ( temp 3-component vector of float) 0:241 'inF0' ( in 3-component vector of float) 0:242 Sequence 0:242 move second child to first child ( temp 3-component vector of float) -0:242 'inF1' ( in 3-component vector of float) -0:242 sine ( temp 3-component vector of float) -0:242 'inF0' ( in 3-component vector of float) -0:242 move second child to first child ( temp 3-component vector of float) -0:242 'inF2' ( in 3-component vector of float) -0:242 cosine ( temp 3-component vector of float) +0:242 'r058' ( temp 3-component vector of float) +0:242 clamp ( temp 3-component vector of float) 0:242 'inF0' ( in 3-component vector of float) +0:242 Constant: +0:242 0.000000 +0:242 Constant: +0:242 1.000000 0:243 Sequence 0:243 move second child to first child ( temp 3-component vector of float) -0:243 'r061' ( temp 3-component vector of float) -0:243 hyp. sine ( temp 3-component vector of float) +0:243 'r059' ( temp 3-component vector of float) +0:243 Sign ( temp 3-component vector of float) 0:243 'inF0' ( in 3-component vector of float) 0:244 Sequence 0:244 move second child to first child ( temp 3-component vector of float) -0:244 'r062' ( temp 3-component vector of float) -0:244 smoothstep ( temp 3-component vector of float) +0:244 'r060' ( temp 3-component vector of float) +0:244 sine ( temp 3-component vector of float) 0:244 'inF0' ( in 3-component vector of float) -0:244 'inF1' ( in 3-component vector of float) -0:244 'inF2' ( in 3-component vector of float) 0:245 Sequence 0:245 move second child to first child ( temp 3-component vector of float) -0:245 'r063' ( temp 3-component vector of float) -0:245 sqrt ( temp 3-component vector of float) +0:245 'inF1' ( in 3-component vector of float) +0:245 sine ( temp 3-component vector of float) +0:245 'inF0' ( in 3-component vector of float) +0:245 move second child to first child ( temp 3-component vector of float) +0:245 'inF2' ( in 3-component vector of float) +0:245 cosine ( temp 3-component vector of float) 0:245 'inF0' ( in 3-component vector of float) 0:246 Sequence 0:246 move second child to first child ( temp 3-component vector of float) -0:246 'r064' ( temp 3-component vector of float) -0:246 step ( temp 3-component vector of float) +0:246 'r061' ( temp 3-component vector of float) +0:246 hyp. sine ( temp 3-component vector of float) 0:246 'inF0' ( in 3-component vector of float) -0:246 'inF1' ( in 3-component vector of float) 0:247 Sequence 0:247 move second child to first child ( temp 3-component vector of float) -0:247 'r065' ( temp 3-component vector of float) -0:247 tangent ( temp 3-component vector of float) +0:247 'r062' ( temp 3-component vector of float) +0:247 smoothstep ( temp 3-component vector of float) 0:247 'inF0' ( in 3-component vector of float) +0:247 'inF1' ( in 3-component vector of float) +0:247 'inF2' ( in 3-component vector of float) 0:248 Sequence 0:248 move second child to first child ( temp 3-component vector of float) -0:248 'r066' ( temp 3-component vector of float) -0:248 hyp. tangent ( temp 3-component vector of float) +0:248 'r063' ( temp 3-component vector of float) +0:248 sqrt ( temp 3-component vector of float) 0:248 'inF0' ( in 3-component vector of float) +0:249 Sequence +0:249 move second child to first child ( temp 3-component vector of float) +0:249 'r064' ( temp 3-component vector of float) +0:249 step ( temp 3-component vector of float) +0:249 'inF0' ( in 3-component vector of float) +0:249 'inF1' ( in 3-component vector of float) 0:250 Sequence 0:250 move second child to first child ( temp 3-component vector of float) -0:250 'r067' ( temp 3-component vector of float) -0:250 trunc ( temp 3-component vector of float) +0:250 'r065' ( temp 3-component vector of float) +0:250 tangent ( temp 3-component vector of float) 0:250 'inF0' ( in 3-component vector of float) -0:253 Branch: Return with expression +0:251 Sequence +0:251 move second child to first child ( temp 3-component vector of float) +0:251 'r066' ( temp 3-component vector of float) +0:251 hyp. tangent ( temp 3-component vector of float) +0:251 'inF0' ( in 3-component vector of float) +0:253 Sequence +0:253 move second child to first child ( temp 3-component vector of float) +0:253 'r067' ( temp 3-component vector of float) +0:253 trunc ( temp 3-component vector of float) +0:253 'inF0' ( in 3-component vector of float) +0:256 Branch: Return with expression 0:? Constant: 0:? 1.000000 0:? 2.000000 0:? 3.000000 -0:257 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) -0:257 Function Parameters: -0:257 'inF0' ( in 4-component vector of float) -0:257 'inF1' ( in 4-component vector of float) -0:257 'inF2' ( in 4-component vector of float) -0:257 'inU0' ( in 4-component vector of uint) -0:257 'inU1' ( in 4-component vector of uint) +0:260 Function Definition: PixelShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) +0:260 Function Parameters: +0:260 'inF0' ( in 4-component vector of float) +0:260 'inF1' ( in 4-component vector of float) +0:260 'inF2' ( in 4-component vector of float) +0:260 'inU0' ( in 4-component vector of uint) +0:260 'inU1' ( in 4-component vector of uint) 0:? Sequence -0:260 Sequence -0:260 move second child to first child ( temp bool) -0:260 'r000' ( temp bool) -0:260 all ( temp bool) -0:260 'inF0' ( in 4-component vector of float) -0:261 Sequence -0:261 move second child to first child ( temp 4-component vector of float) -0:261 'r001' ( temp 4-component vector of float) -0:261 Absolute value ( temp 4-component vector of float) -0:261 'inF0' ( in 4-component vector of float) -0:262 Sequence -0:262 move second child to first child ( temp 4-component vector of float) -0:262 'r002' ( temp 4-component vector of float) -0:262 arc cosine ( temp 4-component vector of float) -0:262 'inF0' ( in 4-component vector of float) 0:263 Sequence 0:263 move second child to first child ( temp bool) -0:263 'r003' ( temp bool) -0:263 any ( temp bool) -0:263 'inF0' ( in 4-component vector of float) +0:263 'r000' ( temp bool) +0:263 all ( temp bool) +0:263 Convert float to bool ( temp 4-component vector of bool) +0:263 'inF0' ( in 4-component vector of float) 0:264 Sequence 0:264 move second child to first child ( temp 4-component vector of float) -0:264 'r004' ( temp 4-component vector of float) -0:264 arc sine ( temp 4-component vector of float) +0:264 'r001' ( temp 4-component vector of float) +0:264 Absolute value ( temp 4-component vector of float) 0:264 'inF0' ( in 4-component vector of float) 0:265 Sequence -0:265 move second child to first child ( temp 4-component vector of int) -0:265 'r005' ( temp 4-component vector of int) -0:265 floatBitsToInt ( temp 4-component vector of int) +0:265 move second child to first child ( temp 4-component vector of float) +0:265 'r002' ( temp 4-component vector of float) +0:265 arc cosine ( temp 4-component vector of float) 0:265 'inF0' ( in 4-component vector of float) 0:266 Sequence -0:266 move second child to first child ( temp 4-component vector of uint) -0:266 'r006' ( temp 4-component vector of uint) -0:266 floatBitsToUint ( temp 4-component vector of uint) -0:266 'inF0' ( in 4-component vector of float) +0:266 move second child to first child ( temp bool) +0:266 'r003' ( temp bool) +0:266 any ( temp bool) +0:266 Convert float to bool ( temp 4-component vector of bool) +0:266 'inF0' ( in 4-component vector of float) 0:267 Sequence 0:267 move second child to first child ( temp 4-component vector of float) -0:267 'r007' ( temp 4-component vector of float) -0:267 intBitsToFloat ( temp 4-component vector of float) -0:267 'inU0' ( in 4-component vector of uint) +0:267 'r004' ( temp 4-component vector of float) +0:267 arc sine ( temp 4-component vector of float) +0:267 'inF0' ( in 4-component vector of float) +0:268 Sequence +0:268 move second child to first child ( temp 4-component vector of int) +0:268 'r005' ( temp 4-component vector of int) +0:268 floatBitsToInt ( temp 4-component vector of int) +0:268 'inF0' ( in 4-component vector of float) 0:269 Sequence -0:269 move second child to first child ( temp 4-component vector of float) -0:269 'r009' ( temp 4-component vector of float) -0:269 arc tangent ( temp 4-component vector of float) +0:269 move second child to first child ( temp 4-component vector of uint) +0:269 'r006' ( temp 4-component vector of uint) +0:269 floatBitsToUint ( temp 4-component vector of uint) 0:269 'inF0' ( in 4-component vector of float) 0:270 Sequence 0:270 move second child to first child ( temp 4-component vector of float) -0:270 'r010' ( temp 4-component vector of float) -0:270 arc tangent ( temp 4-component vector of float) -0:270 'inF0' ( in 4-component vector of float) -0:270 'inF1' ( in 4-component vector of float) -0:271 Sequence -0:271 move second child to first child ( temp 4-component vector of float) -0:271 'r011' ( temp 4-component vector of float) -0:271 Ceiling ( temp 4-component vector of float) -0:271 'inF0' ( in 4-component vector of float) +0:270 'r007' ( temp 4-component vector of float) +0:270 intBitsToFloat ( temp 4-component vector of float) +0:270 'inU0' ( in 4-component vector of uint) 0:272 Sequence 0:272 move second child to first child ( temp 4-component vector of float) -0:272 'r012' ( temp 4-component vector of float) -0:272 clamp ( temp 4-component vector of float) +0:272 'r009' ( temp 4-component vector of float) +0:272 arc tangent ( temp 4-component vector of float) 0:272 'inF0' ( in 4-component vector of float) -0:272 'inF1' ( in 4-component vector of float) -0:272 'inF2' ( in 4-component vector of float) -0:273 Test condition and select ( temp void) -0:273 Condition -0:273 any ( temp bool) -0:273 Compare Less Than ( temp 4-component vector of bool) +0:273 Sequence +0:273 move second child to first child ( temp 4-component vector of float) +0:273 'r010' ( temp 4-component vector of float) +0:273 arc tangent ( temp 4-component vector of float) 0:273 'inF0' ( in 4-component vector of float) -0:273 Constant: -0:273 0.000000 -0:273 0.000000 -0:273 0.000000 -0:273 0.000000 -0:273 true case -0:273 Branch: Kill +0:273 'inF1' ( in 4-component vector of float) 0:274 Sequence 0:274 move second child to first child ( temp 4-component vector of float) -0:274 'r013' ( temp 4-component vector of float) -0:274 cosine ( temp 4-component vector of float) +0:274 'r011' ( temp 4-component vector of float) +0:274 Ceiling ( temp 4-component vector of float) 0:274 'inF0' ( in 4-component vector of float) 0:275 Sequence 0:275 move second child to first child ( temp 4-component vector of float) -0:275 'r014' ( temp 4-component vector of float) -0:275 hyp. cosine ( temp 4-component vector of float) +0:275 'r012' ( temp 4-component vector of float) +0:275 clamp ( temp 4-component vector of float) 0:275 'inF0' ( in 4-component vector of float) -0:276 Sequence -0:276 move second child to first child ( temp 4-component vector of uint) -0:276 'r015' ( temp 4-component vector of uint) +0:275 'inF1' ( in 4-component vector of float) +0:275 'inF2' ( in 4-component vector of float) +0:276 Test condition and select ( temp void) +0:276 Condition +0:276 any ( temp bool) +0:276 Compare Less Than ( temp 4-component vector of bool) +0:276 'inF0' ( in 4-component vector of float) +0:276 Constant: +0:276 0.000000 +0:276 0.000000 +0:276 0.000000 +0:276 0.000000 +0:276 true case +0:276 Branch: Kill +0:277 Test condition and select ( temp void) +0:277 Condition +0:277 any ( temp bool) +0:277 Compare Less Than ( temp 4-component vector of bool) +0:277 'inU0' ( in 4-component vector of uint) +0:277 Constant: +0:277 0.000000 +0:277 0.000000 +0:277 0.000000 +0:277 0.000000 +0:277 true case +0:277 Branch: Kill +0:278 Sequence +0:278 move second child to first child ( temp 4-component vector of float) +0:278 'r013' ( temp 4-component vector of float) +0:278 cosine ( temp 4-component vector of float) +0:278 'inF0' ( in 4-component vector of float) +0:279 Sequence +0:279 move second child to first child ( temp 4-component vector of float) +0:279 'r014' ( temp 4-component vector of float) +0:279 hyp. cosine ( temp 4-component vector of float) +0:279 'inF0' ( in 4-component vector of float) +0:280 Sequence +0:280 move second child to first child ( temp 4-component vector of uint) +0:280 'r015' ( temp 4-component vector of uint) 0:? bitCount ( temp 4-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 3 (const uint) 0:? 5 (const uint) 0:? 2 (const uint) -0:277 Sequence -0:277 move second child to first child ( temp 4-component vector of float) -0:277 'r016' ( temp 4-component vector of float) -0:277 dPdx ( temp 4-component vector of float) -0:277 'inF0' ( in 4-component vector of float) -0:278 Sequence -0:278 move second child to first child ( temp 4-component vector of float) -0:278 'r017' ( temp 4-component vector of float) -0:278 dPdxCoarse ( temp 4-component vector of float) -0:278 'inF0' ( in 4-component vector of float) -0:279 Sequence -0:279 move second child to first child ( temp 4-component vector of float) -0:279 'r018' ( temp 4-component vector of float) -0:279 dPdxFine ( temp 4-component vector of float) -0:279 'inF0' ( in 4-component vector of float) -0:280 Sequence -0:280 move second child to first child ( temp 4-component vector of float) -0:280 'r019' ( temp 4-component vector of float) -0:280 dPdy ( temp 4-component vector of float) -0:280 'inF0' ( in 4-component vector of float) 0:281 Sequence 0:281 move second child to first child ( temp 4-component vector of float) -0:281 'r020' ( temp 4-component vector of float) -0:281 dPdyCoarse ( temp 4-component vector of float) +0:281 'r016' ( temp 4-component vector of float) +0:281 dPdx ( temp 4-component vector of float) 0:281 'inF0' ( in 4-component vector of float) 0:282 Sequence 0:282 move second child to first child ( temp 4-component vector of float) -0:282 'r021' ( temp 4-component vector of float) -0:282 dPdyFine ( temp 4-component vector of float) +0:282 'r017' ( temp 4-component vector of float) +0:282 dPdxCoarse ( temp 4-component vector of float) 0:282 'inF0' ( in 4-component vector of float) 0:283 Sequence 0:283 move second child to first child ( temp 4-component vector of float) -0:283 'r022' ( temp 4-component vector of float) -0:283 degrees ( temp 4-component vector of float) +0:283 'r018' ( temp 4-component vector of float) +0:283 dPdxFine ( temp 4-component vector of float) 0:283 'inF0' ( in 4-component vector of float) 0:284 Sequence -0:284 move second child to first child ( temp float) -0:284 'r023' ( temp float) -0:284 distance ( temp float) +0:284 move second child to first child ( temp 4-component vector of float) +0:284 'r019' ( temp 4-component vector of float) +0:284 dPdy ( temp 4-component vector of float) 0:284 'inF0' ( in 4-component vector of float) -0:284 'inF1' ( in 4-component vector of float) 0:285 Sequence -0:285 move second child to first child ( temp float) -0:285 'r024' ( temp float) -0:285 dot-product ( temp float) +0:285 move second child to first child ( temp 4-component vector of float) +0:285 'r020' ( temp 4-component vector of float) +0:285 dPdyCoarse ( temp 4-component vector of float) 0:285 'inF0' ( in 4-component vector of float) -0:285 'inF1' ( in 4-component vector of float) 0:286 Sequence 0:286 move second child to first child ( temp 4-component vector of float) -0:286 'r025' ( temp 4-component vector of float) -0:286 Construct vec4 ( temp 4-component vector of float) -0:286 Constant: -0:286 1.000000 -0:286 component-wise multiply ( temp float) -0:286 direct index ( temp float) -0:286 'inF0' ( in 4-component vector of float) -0:286 Constant: -0:286 1 (const int) -0:286 direct index ( temp float) -0:286 'inF1' ( in 4-component vector of float) -0:286 Constant: -0:286 1 (const int) -0:286 direct index ( temp float) -0:286 'inF0' ( in 4-component vector of float) -0:286 Constant: -0:286 2 (const int) -0:286 direct index ( temp float) -0:286 'inF1' ( in 4-component vector of float) -0:286 Constant: -0:286 3 (const int) +0:286 'r021' ( temp 4-component vector of float) +0:286 dPdyFine ( temp 4-component vector of float) +0:286 'inF0' ( in 4-component vector of float) +0:287 Sequence +0:287 move second child to first child ( temp 4-component vector of float) +0:287 'r022' ( temp 4-component vector of float) +0:287 degrees ( temp 4-component vector of float) +0:287 'inF0' ( in 4-component vector of float) +0:288 Sequence +0:288 move second child to first child ( temp float) +0:288 'r023' ( temp float) +0:288 distance ( temp float) +0:288 'inF0' ( in 4-component vector of float) +0:288 'inF1' ( in 4-component vector of float) +0:289 Sequence +0:289 move second child to first child ( temp float) +0:289 'r024' ( temp float) +0:289 dot-product ( temp float) +0:289 'inF0' ( in 4-component vector of float) +0:289 'inF1' ( in 4-component vector of float) 0:290 Sequence 0:290 move second child to first child ( temp 4-component vector of float) -0:290 'r029' ( temp 4-component vector of float) -0:290 exp ( temp 4-component vector of float) -0:290 'inF0' ( in 4-component vector of float) -0:291 Sequence -0:291 move second child to first child ( temp 4-component vector of float) -0:291 'r030' ( temp 4-component vector of float) -0:291 exp2 ( temp 4-component vector of float) -0:291 'inF0' ( in 4-component vector of float) -0:292 Sequence -0:292 move second child to first child ( temp 4-component vector of float) -0:292 'r031' ( temp 4-component vector of float) -0:292 face-forward ( temp 4-component vector of float) -0:292 'inF0' ( in 4-component vector of float) -0:292 'inF1' ( in 4-component vector of float) -0:292 'inF2' ( in 4-component vector of float) -0:293 Sequence -0:293 move second child to first child ( temp 4-component vector of uint) -0:293 'r032' ( temp 4-component vector of uint) +0:290 'r025' ( temp 4-component vector of float) +0:290 Construct vec4 ( temp 4-component vector of float) +0:290 Constant: +0:290 1.000000 +0:290 component-wise multiply ( temp float) +0:290 direct index ( temp float) +0:290 'inF0' ( in 4-component vector of float) +0:290 Constant: +0:290 1 (const int) +0:290 direct index ( temp float) +0:290 'inF1' ( in 4-component vector of float) +0:290 Constant: +0:290 1 (const int) +0:290 direct index ( temp float) +0:290 'inF0' ( in 4-component vector of float) +0:290 Constant: +0:290 2 (const int) +0:290 direct index ( temp float) +0:290 'inF1' ( in 4-component vector of float) +0:290 Constant: +0:290 3 (const int) +0:294 Sequence +0:294 move second child to first child ( temp 4-component vector of float) +0:294 'r029' ( temp 4-component vector of float) +0:294 exp ( temp 4-component vector of float) +0:294 'inF0' ( in 4-component vector of float) +0:295 Sequence +0:295 move second child to first child ( temp 4-component vector of float) +0:295 'r030' ( temp 4-component vector of float) +0:295 exp2 ( temp 4-component vector of float) +0:295 'inF0' ( in 4-component vector of float) +0:296 Sequence +0:296 move second child to first child ( temp 4-component vector of float) +0:296 'r031' ( temp 4-component vector of float) +0:296 face-forward ( temp 4-component vector of float) +0:296 'inF0' ( in 4-component vector of float) +0:296 'inF1' ( in 4-component vector of float) +0:296 'inF2' ( in 4-component vector of float) +0:297 Sequence +0:297 move second child to first child ( temp 4-component vector of uint) +0:297 'r032' ( temp 4-component vector of uint) 0:? findMSB ( temp 4-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 8 (const uint) 0:? 9 (const uint) 0:? 10 (const uint) -0:294 Sequence -0:294 move second child to first child ( temp 4-component vector of uint) -0:294 'r033' ( temp 4-component vector of uint) +0:298 Sequence +0:298 move second child to first child ( temp 4-component vector of uint) +0:298 'r033' ( temp 4-component vector of uint) 0:? findLSB ( temp 4-component vector of uint) 0:? Constant: 0:? 7 (const uint) 0:? 8 (const uint) 0:? 9 (const uint) 0:? 10 (const uint) -0:295 Sequence -0:295 move second child to first child ( temp 4-component vector of float) -0:295 'r034' ( temp 4-component vector of float) -0:295 Floor ( temp 4-component vector of float) -0:295 'inF0' ( in 4-component vector of float) -0:297 Sequence -0:297 move second child to first child ( temp 4-component vector of float) -0:297 'r036' ( temp 4-component vector of float) -0:297 mod ( temp 4-component vector of float) -0:297 'inF0' ( in 4-component vector of float) -0:297 'inF1' ( in 4-component vector of float) -0:298 Sequence -0:298 move second child to first child ( temp 4-component vector of float) -0:298 'r037' ( temp 4-component vector of float) -0:298 Fraction ( temp 4-component vector of float) -0:298 'inF0' ( in 4-component vector of float) 0:299 Sequence 0:299 move second child to first child ( temp 4-component vector of float) -0:299 'r039' ( temp 4-component vector of float) -0:299 fwidth ( temp 4-component vector of float) +0:299 'r034' ( temp 4-component vector of float) +0:299 Floor ( temp 4-component vector of float) 0:299 'inF0' ( in 4-component vector of float) -0:300 Sequence -0:300 move second child to first child ( temp 4-component vector of bool) -0:300 'r040' ( temp 4-component vector of bool) -0:300 isinf ( temp 4-component vector of bool) -0:300 'inF0' ( in 4-component vector of float) 0:301 Sequence -0:301 move second child to first child ( temp 4-component vector of bool) -0:301 'r041' ( temp 4-component vector of bool) -0:301 isnan ( temp 4-component vector of bool) +0:301 move second child to first child ( temp 4-component vector of float) +0:301 'r036' ( temp 4-component vector of float) +0:301 mod ( temp 4-component vector of float) 0:301 'inF0' ( in 4-component vector of float) +0:301 'inF1' ( in 4-component vector of float) 0:302 Sequence 0:302 move second child to first child ( temp 4-component vector of float) -0:302 'r042' ( temp 4-component vector of float) -0:302 ldexp ( temp 4-component vector of float) +0:302 'r037' ( temp 4-component vector of float) +0:302 Fraction ( temp 4-component vector of float) 0:302 'inF0' ( in 4-component vector of float) -0:302 'inF1' ( in 4-component vector of float) 0:303 Sequence 0:303 move second child to first child ( temp 4-component vector of float) -0:303 'r039a' ( temp 4-component vector of float) -0:303 mix ( temp 4-component vector of float) +0:303 'r039' ( temp 4-component vector of float) +0:303 fwidth ( temp 4-component vector of float) 0:303 'inF0' ( in 4-component vector of float) -0:303 'inF1' ( in 4-component vector of float) -0:303 'inF2' ( in 4-component vector of float) 0:304 Sequence -0:304 move second child to first child ( temp float) -0:304 'r043' ( temp float) -0:304 length ( temp float) +0:304 move second child to first child ( temp 4-component vector of bool) +0:304 'r040' ( temp 4-component vector of bool) +0:304 isinf ( temp 4-component vector of bool) 0:304 'inF0' ( in 4-component vector of float) 0:305 Sequence -0:305 move second child to first child ( temp 4-component vector of float) -0:305 'r044' ( temp 4-component vector of float) -0:305 log ( temp 4-component vector of float) +0:305 move second child to first child ( temp 4-component vector of bool) +0:305 'r041' ( temp 4-component vector of bool) +0:305 isnan ( temp 4-component vector of bool) 0:305 'inF0' ( in 4-component vector of float) 0:306 Sequence 0:306 move second child to first child ( temp 4-component vector of float) -0:306 'r045' ( temp 4-component vector of float) -0:306 vector-scale ( temp 4-component vector of float) -0:306 log2 ( temp 4-component vector of float) -0:306 'inF0' ( in 4-component vector of float) -0:306 Constant: -0:306 0.301030 +0:306 'r042' ( temp 4-component vector of float) +0:306 ldexp ( temp 4-component vector of float) +0:306 'inF0' ( in 4-component vector of float) +0:306 'inF1' ( in 4-component vector of float) 0:307 Sequence 0:307 move second child to first child ( temp 4-component vector of float) -0:307 'r046' ( temp 4-component vector of float) -0:307 log2 ( temp 4-component vector of float) +0:307 'r039a' ( temp 4-component vector of float) +0:307 mix ( temp 4-component vector of float) 0:307 'inF0' ( in 4-component vector of float) +0:307 'inF1' ( in 4-component vector of float) +0:307 'inF2' ( in 4-component vector of float) 0:308 Sequence -0:308 move second child to first child ( temp 4-component vector of float) -0:308 'r047' ( temp 4-component vector of float) -0:308 max ( temp 4-component vector of float) +0:308 move second child to first child ( temp float) +0:308 'r043' ( temp float) +0:308 length ( temp float) 0:308 'inF0' ( in 4-component vector of float) -0:308 'inF1' ( in 4-component vector of float) 0:309 Sequence 0:309 move second child to first child ( temp 4-component vector of float) -0:309 'r048' ( temp 4-component vector of float) -0:309 min ( temp 4-component vector of float) +0:309 'r044' ( temp 4-component vector of float) +0:309 log ( temp 4-component vector of float) 0:309 'inF0' ( in 4-component vector of float) -0:309 'inF1' ( in 4-component vector of float) 0:310 Sequence 0:310 move second child to first child ( temp 4-component vector of float) -0:310 'r049' ( temp 4-component vector of float) -0:310 normalize ( temp 4-component vector of float) -0:310 'inF0' ( in 4-component vector of float) +0:310 'r045' ( temp 4-component vector of float) +0:310 vector-scale ( temp 4-component vector of float) +0:310 log2 ( temp 4-component vector of float) +0:310 'inF0' ( in 4-component vector of float) +0:310 Constant: +0:310 0.301030 0:311 Sequence 0:311 move second child to first child ( temp 4-component vector of float) -0:311 'r050' ( temp 4-component vector of float) -0:311 pow ( temp 4-component vector of float) +0:311 'r046' ( temp 4-component vector of float) +0:311 log2 ( temp 4-component vector of float) 0:311 'inF0' ( in 4-component vector of float) -0:311 'inF1' ( in 4-component vector of float) 0:312 Sequence 0:312 move second child to first child ( temp 4-component vector of float) -0:312 'r051' ( temp 4-component vector of float) -0:312 radians ( temp 4-component vector of float) +0:312 'r047' ( temp 4-component vector of float) +0:312 max ( temp 4-component vector of float) 0:312 'inF0' ( in 4-component vector of float) +0:312 'inF1' ( in 4-component vector of float) 0:313 Sequence 0:313 move second child to first child ( temp 4-component vector of float) -0:313 'r052' ( temp 4-component vector of float) -0:313 divide ( temp 4-component vector of float) -0:313 Constant: -0:313 1.000000 +0:313 'r048' ( temp 4-component vector of float) +0:313 min ( temp 4-component vector of float) 0:313 'inF0' ( in 4-component vector of float) +0:313 'inF1' ( in 4-component vector of float) 0:314 Sequence 0:314 move second child to first child ( temp 4-component vector of float) -0:314 'r053' ( temp 4-component vector of float) -0:314 reflect ( temp 4-component vector of float) +0:314 'r049' ( temp 4-component vector of float) +0:314 normalize ( temp 4-component vector of float) 0:314 'inF0' ( in 4-component vector of float) -0:314 'inF1' ( in 4-component vector of float) 0:315 Sequence 0:315 move second child to first child ( temp 4-component vector of float) -0:315 'r054' ( temp 4-component vector of float) -0:315 refract ( temp 4-component vector of float) +0:315 'r050' ( temp 4-component vector of float) +0:315 pow ( temp 4-component vector of float) 0:315 'inF0' ( in 4-component vector of float) 0:315 'inF1' ( in 4-component vector of float) -0:315 Constant: -0:315 2.000000 0:316 Sequence -0:316 move second child to first child ( temp 4-component vector of uint) -0:316 'r055' ( temp 4-component vector of uint) +0:316 move second child to first child ( temp 4-component vector of float) +0:316 'r051' ( temp 4-component vector of float) +0:316 radians ( temp 4-component vector of float) +0:316 'inF0' ( in 4-component vector of float) +0:317 Sequence +0:317 move second child to first child ( temp 4-component vector of float) +0:317 'r052' ( temp 4-component vector of float) +0:317 divide ( temp 4-component vector of float) +0:317 Constant: +0:317 1.000000 +0:317 'inF0' ( in 4-component vector of float) +0:318 Sequence +0:318 move second child to first child ( temp 4-component vector of float) +0:318 'r053' ( temp 4-component vector of float) +0:318 reflect ( temp 4-component vector of float) +0:318 'inF0' ( in 4-component vector of float) +0:318 'inF1' ( in 4-component vector of float) +0:319 Sequence +0:319 move second child to first child ( temp 4-component vector of float) +0:319 'r054' ( temp 4-component vector of float) +0:319 refract ( temp 4-component vector of float) +0:319 'inF0' ( in 4-component vector of float) +0:319 'inF1' ( in 4-component vector of float) +0:319 Constant: +0:319 2.000000 +0:320 Sequence +0:320 move second child to first child ( temp 4-component vector of uint) +0:320 'r055' ( temp 4-component vector of uint) 0:? bitFieldReverse ( temp 4-component vector of uint) 0:? Constant: 0:? 1 (const uint) 0:? 2 (const uint) 0:? 3 (const uint) 0:? 4 (const uint) -0:317 Sequence -0:317 move second child to first child ( temp 4-component vector of float) -0:317 'r056' ( temp 4-component vector of float) -0:317 roundEven ( temp 4-component vector of float) -0:317 'inF0' ( in 4-component vector of float) -0:318 Sequence -0:318 move second child to first child ( temp 4-component vector of float) -0:318 'r057' ( temp 4-component vector of float) -0:318 inverse sqrt ( temp 4-component vector of float) -0:318 'inF0' ( in 4-component vector of float) -0:319 Sequence -0:319 move second child to first child ( temp 4-component vector of float) -0:319 'r058' ( temp 4-component vector of float) -0:319 clamp ( temp 4-component vector of float) -0:319 'inF0' ( in 4-component vector of float) -0:319 Constant: -0:319 0.000000 -0:319 Constant: -0:319 1.000000 -0:320 Sequence -0:320 move second child to first child ( temp 4-component vector of float) -0:320 'r059' ( temp 4-component vector of float) -0:320 Sign ( temp 4-component vector of float) -0:320 'inF0' ( in 4-component vector of float) 0:321 Sequence 0:321 move second child to first child ( temp 4-component vector of float) -0:321 'r060' ( temp 4-component vector of float) -0:321 sine ( temp 4-component vector of float) +0:321 'r056' ( temp 4-component vector of float) +0:321 roundEven ( temp 4-component vector of float) 0:321 'inF0' ( in 4-component vector of float) 0:322 Sequence 0:322 move second child to first child ( temp 4-component vector of float) -0:322 'inF1' ( in 4-component vector of float) -0:322 sine ( temp 4-component vector of float) -0:322 'inF0' ( in 4-component vector of float) -0:322 move second child to first child ( temp 4-component vector of float) -0:322 'inF2' ( in 4-component vector of float) -0:322 cosine ( temp 4-component vector of float) +0:322 'r057' ( temp 4-component vector of float) +0:322 inverse sqrt ( temp 4-component vector of float) 0:322 'inF0' ( in 4-component vector of float) 0:323 Sequence 0:323 move second child to first child ( temp 4-component vector of float) -0:323 'r061' ( temp 4-component vector of float) -0:323 hyp. sine ( temp 4-component vector of float) +0:323 'r058' ( temp 4-component vector of float) +0:323 clamp ( temp 4-component vector of float) 0:323 'inF0' ( in 4-component vector of float) +0:323 Constant: +0:323 0.000000 +0:323 Constant: +0:323 1.000000 0:324 Sequence 0:324 move second child to first child ( temp 4-component vector of float) -0:324 'r062' ( temp 4-component vector of float) -0:324 smoothstep ( temp 4-component vector of float) +0:324 'r059' ( temp 4-component vector of float) +0:324 Sign ( temp 4-component vector of float) 0:324 'inF0' ( in 4-component vector of float) -0:324 'inF1' ( in 4-component vector of float) -0:324 'inF2' ( in 4-component vector of float) 0:325 Sequence 0:325 move second child to first child ( temp 4-component vector of float) -0:325 'r063' ( temp 4-component vector of float) -0:325 sqrt ( temp 4-component vector of float) +0:325 'r060' ( temp 4-component vector of float) +0:325 sine ( temp 4-component vector of float) 0:325 'inF0' ( in 4-component vector of float) 0:326 Sequence 0:326 move second child to first child ( temp 4-component vector of float) -0:326 'r064' ( temp 4-component vector of float) -0:326 step ( temp 4-component vector of float) +0:326 'inF1' ( in 4-component vector of float) +0:326 sine ( temp 4-component vector of float) +0:326 'inF0' ( in 4-component vector of float) +0:326 move second child to first child ( temp 4-component vector of float) +0:326 'inF2' ( in 4-component vector of float) +0:326 cosine ( temp 4-component vector of float) 0:326 'inF0' ( in 4-component vector of float) -0:326 'inF1' ( in 4-component vector of float) 0:327 Sequence 0:327 move second child to first child ( temp 4-component vector of float) -0:327 'r065' ( temp 4-component vector of float) -0:327 tangent ( temp 4-component vector of float) +0:327 'r061' ( temp 4-component vector of float) +0:327 hyp. sine ( temp 4-component vector of float) 0:327 'inF0' ( in 4-component vector of float) 0:328 Sequence 0:328 move second child to first child ( temp 4-component vector of float) -0:328 'r066' ( temp 4-component vector of float) -0:328 hyp. tangent ( temp 4-component vector of float) +0:328 'r062' ( temp 4-component vector of float) +0:328 smoothstep ( temp 4-component vector of float) 0:328 'inF0' ( in 4-component vector of float) +0:328 'inF1' ( in 4-component vector of float) +0:328 'inF2' ( in 4-component vector of float) +0:329 Sequence +0:329 move second child to first child ( temp 4-component vector of float) +0:329 'r063' ( temp 4-component vector of float) +0:329 sqrt ( temp 4-component vector of float) +0:329 'inF0' ( in 4-component vector of float) 0:330 Sequence 0:330 move second child to first child ( temp 4-component vector of float) -0:330 'r067' ( temp 4-component vector of float) -0:330 trunc ( temp 4-component vector of float) +0:330 'r064' ( temp 4-component vector of float) +0:330 step ( temp 4-component vector of float) 0:330 'inF0' ( in 4-component vector of float) -0:333 Branch: Return with expression +0:330 'inF1' ( in 4-component vector of float) +0:331 Sequence +0:331 move second child to first child ( temp 4-component vector of float) +0:331 'r065' ( temp 4-component vector of float) +0:331 tangent ( temp 4-component vector of float) +0:331 'inF0' ( in 4-component vector of float) +0:332 Sequence +0:332 move second child to first child ( temp 4-component vector of float) +0:332 'r066' ( temp 4-component vector of float) +0:332 hyp. tangent ( temp 4-component vector of float) +0:332 'inF0' ( in 4-component vector of float) +0:334 Sequence +0:334 move second child to first child ( temp 4-component vector of float) +0:334 'r067' ( temp 4-component vector of float) +0:334 trunc ( temp 4-component vector of float) +0:334 'inF0' ( in 4-component vector of float) +0:337 Branch: Return with expression 0:? Constant: 0:? 1.000000 0:? 2.000000 0:? 3.000000 0:? 4.000000 -0:396 Function Definition: PixelShaderFunction2x2(mf22;mf22;mf22; ( temp 2X2 matrix of float) -0:396 Function Parameters: -0:396 'inF0' ( in 2X2 matrix of float) -0:396 'inF1' ( in 2X2 matrix of float) -0:396 'inF2' ( in 2X2 matrix of float) +0:400 Function Definition: PixelShaderFunction2x2(mf22;mf22;mf22; ( temp 2X2 matrix of float) +0:400 Function Parameters: +0:400 'inF0' ( in 2X2 matrix of float) +0:400 'inF1' ( in 2X2 matrix of float) +0:400 'inF2' ( in 2X2 matrix of float) 0:? Sequence -0:398 Sequence -0:398 move second child to first child ( temp bool) -0:398 'r000' ( temp bool) -0:398 all ( temp bool) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r001' ( temp 2X2 matrix of float) -0:398 Absolute value ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 arc cosine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp bool) -0:398 'r003' ( temp bool) -0:398 any ( temp bool) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r004' ( temp 2X2 matrix of float) -0:398 arc sine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r005' ( temp 2X2 matrix of float) -0:398 arc tangent ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r006' ( temp 2X2 matrix of float) -0:398 arc tangent ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r007' ( temp 2X2 matrix of float) -0:398 Ceiling ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Test condition and select ( temp void) -0:398 Condition -0:398 any ( temp bool) -0:398 Compare Less Than ( temp 2X2 matrix of bool) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Constant: -0:398 0.000000 -0:398 0.000000 -0:398 0.000000 -0:398 0.000000 -0:398 true case -0:398 Branch: Kill -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r008' ( temp 2X2 matrix of float) -0:398 clamp ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 'inF2' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r009' ( temp 2X2 matrix of float) -0:398 cosine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r010' ( temp 2X2 matrix of float) -0:398 hyp. cosine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r011' ( temp 2X2 matrix of float) -0:398 dPdx ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r012' ( temp 2X2 matrix of float) -0:398 dPdxCoarse ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r013' ( temp 2X2 matrix of float) -0:398 dPdxFine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r014' ( temp 2X2 matrix of float) -0:398 dPdy ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r015' ( temp 2X2 matrix of float) -0:398 dPdyCoarse ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r016' ( temp 2X2 matrix of float) -0:398 dPdyFine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r017' ( temp 2X2 matrix of float) -0:398 degrees ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp float) -0:398 'r018' ( temp float) -0:398 determinant ( temp float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r019' ( temp 2X2 matrix of float) -0:398 exp ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'R020' ( temp 2X2 matrix of float) -0:398 exp2 ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r021' ( temp 2X2 matrix of float) -0:398 Floor ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r022' ( temp 2X2 matrix of float) -0:398 mod ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r023' ( temp 2X2 matrix of float) -0:398 Fraction ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r025' ( temp 2X2 matrix of float) -0:398 fwidth ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r026' ( temp 2X2 matrix of float) -0:398 ldexp ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r026a' ( temp 2X2 matrix of float) -0:398 mix ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 'inF2' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r027' ( temp 2X2 matrix of float) -0:398 log ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r028' ( temp 2X2 matrix of float) -0:398 matrix-scale ( temp 2X2 matrix of float) -0:398 log2 ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Constant: -0:398 0.301030 -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r029' ( temp 2X2 matrix of float) -0:398 log2 ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r030' ( temp 2X2 matrix of float) -0:398 max ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r031' ( temp 2X2 matrix of float) -0:398 min ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r032' ( temp 2X2 matrix of float) -0:398 pow ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r033' ( temp 2X2 matrix of float) -0:398 radians ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r034' ( temp 2X2 matrix of float) -0:398 roundEven ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r035' ( temp 2X2 matrix of float) -0:398 inverse sqrt ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r036' ( temp 2X2 matrix of float) -0:398 clamp ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Constant: -0:398 0.000000 -0:398 Constant: -0:398 1.000000 -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r037' ( temp 2X2 matrix of float) -0:398 Sign ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r038' ( temp 2X2 matrix of float) -0:398 sine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 sine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'inF2' ( in 2X2 matrix of float) -0:398 cosine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r039' ( temp 2X2 matrix of float) -0:398 hyp. sine ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r049' ( temp 2X2 matrix of float) -0:398 smoothstep ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 'inF2' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r041' ( temp 2X2 matrix of float) -0:398 sqrt ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r042' ( temp 2X2 matrix of float) -0:398 step ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 'inF1' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r043' ( temp 2X2 matrix of float) -0:398 tangent ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r044' ( temp 2X2 matrix of float) -0:398 hyp. tangent ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 transpose ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:398 Sequence -0:398 move second child to first child ( temp 2X2 matrix of float) -0:398 'r046' ( temp 2X2 matrix of float) -0:398 trunc ( temp 2X2 matrix of float) -0:398 'inF0' ( in 2X2 matrix of float) -0:401 Branch: Return with expression +0:402 Sequence +0:402 move second child to first child ( temp bool) +0:402 'r000' ( temp bool) +0:402 all ( temp bool) +0:402 Convert float to bool ( temp 2X2 matrix of bool) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r001' ( temp 2X2 matrix of float) +0:402 Absolute value ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 arc cosine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp bool) +0:402 'r003' ( temp bool) +0:402 any ( temp bool) +0:402 Convert float to bool ( temp 2X2 matrix of bool) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r004' ( temp 2X2 matrix of float) +0:402 arc sine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r005' ( temp 2X2 matrix of float) +0:402 arc tangent ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r006' ( temp 2X2 matrix of float) +0:402 arc tangent ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r007' ( temp 2X2 matrix of float) +0:402 Ceiling ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Test condition and select ( temp void) +0:402 Condition +0:402 any ( temp bool) +0:402 Compare Less Than ( temp 2X2 matrix of bool) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Constant: +0:402 0.000000 +0:402 0.000000 +0:402 0.000000 +0:402 0.000000 +0:402 true case +0:402 Branch: Kill +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r008' ( temp 2X2 matrix of float) +0:402 clamp ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 'inF2' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r009' ( temp 2X2 matrix of float) +0:402 cosine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r010' ( temp 2X2 matrix of float) +0:402 hyp. cosine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r011' ( temp 2X2 matrix of float) +0:402 dPdx ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r012' ( temp 2X2 matrix of float) +0:402 dPdxCoarse ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r013' ( temp 2X2 matrix of float) +0:402 dPdxFine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r014' ( temp 2X2 matrix of float) +0:402 dPdy ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r015' ( temp 2X2 matrix of float) +0:402 dPdyCoarse ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r016' ( temp 2X2 matrix of float) +0:402 dPdyFine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r017' ( temp 2X2 matrix of float) +0:402 degrees ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp float) +0:402 'r018' ( temp float) +0:402 determinant ( temp float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r019' ( temp 2X2 matrix of float) +0:402 exp ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'R020' ( temp 2X2 matrix of float) +0:402 exp2 ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r021' ( temp 2X2 matrix of float) +0:402 Floor ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r022' ( temp 2X2 matrix of float) +0:402 mod ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r023' ( temp 2X2 matrix of float) +0:402 Fraction ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r025' ( temp 2X2 matrix of float) +0:402 fwidth ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r026' ( temp 2X2 matrix of float) +0:402 ldexp ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r026a' ( temp 2X2 matrix of float) +0:402 mix ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 'inF2' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r027' ( temp 2X2 matrix of float) +0:402 log ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r028' ( temp 2X2 matrix of float) +0:402 matrix-scale ( temp 2X2 matrix of float) +0:402 log2 ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Constant: +0:402 0.301030 +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r029' ( temp 2X2 matrix of float) +0:402 log2 ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r030' ( temp 2X2 matrix of float) +0:402 max ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r031' ( temp 2X2 matrix of float) +0:402 min ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r032' ( temp 2X2 matrix of float) +0:402 pow ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r033' ( temp 2X2 matrix of float) +0:402 radians ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r034' ( temp 2X2 matrix of float) +0:402 roundEven ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r035' ( temp 2X2 matrix of float) +0:402 inverse sqrt ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r036' ( temp 2X2 matrix of float) +0:402 clamp ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Constant: +0:402 0.000000 +0:402 Constant: +0:402 1.000000 +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r037' ( temp 2X2 matrix of float) +0:402 Sign ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r038' ( temp 2X2 matrix of float) +0:402 sine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 sine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'inF2' ( in 2X2 matrix of float) +0:402 cosine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r039' ( temp 2X2 matrix of float) +0:402 hyp. sine ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r049' ( temp 2X2 matrix of float) +0:402 smoothstep ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 'inF2' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r041' ( temp 2X2 matrix of float) +0:402 sqrt ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r042' ( temp 2X2 matrix of float) +0:402 step ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 'inF1' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r043' ( temp 2X2 matrix of float) +0:402 tangent ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r044' ( temp 2X2 matrix of float) +0:402 hyp. tangent ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 transpose ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:402 Sequence +0:402 move second child to first child ( temp 2X2 matrix of float) +0:402 'r046' ( temp 2X2 matrix of float) +0:402 trunc ( temp 2X2 matrix of float) +0:402 'inF0' ( in 2X2 matrix of float) +0:405 Branch: Return with expression 0:? Constant: 0:? 2.000000 0:? 2.000000 0:? 2.000000 0:? 2.000000 -0:405 Function Definition: PixelShaderFunction3x3(mf33;mf33;mf33; ( temp 3X3 matrix of float) -0:405 Function Parameters: -0:405 'inF0' ( in 3X3 matrix of float) -0:405 'inF1' ( in 3X3 matrix of float) -0:405 'inF2' ( in 3X3 matrix of float) +0:409 Function Definition: PixelShaderFunction3x3(mf33;mf33;mf33; ( temp 3X3 matrix of float) +0:409 Function Parameters: +0:409 'inF0' ( in 3X3 matrix of float) +0:409 'inF1' ( in 3X3 matrix of float) +0:409 'inF2' ( in 3X3 matrix of float) 0:? Sequence -0:407 Sequence -0:407 move second child to first child ( temp bool) -0:407 'r000' ( temp bool) -0:407 all ( temp bool) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r001' ( temp 3X3 matrix of float) -0:407 Absolute value ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 arc cosine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp bool) -0:407 'r003' ( temp bool) -0:407 any ( temp bool) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r004' ( temp 3X3 matrix of float) -0:407 arc sine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r005' ( temp 3X3 matrix of float) -0:407 arc tangent ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r006' ( temp 3X3 matrix of float) -0:407 arc tangent ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r007' ( temp 3X3 matrix of float) -0:407 Ceiling ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Test condition and select ( temp void) -0:407 Condition -0:407 any ( temp bool) -0:407 Compare Less Than ( temp 3X3 matrix of bool) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Constant: -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 0.000000 -0:407 true case -0:407 Branch: Kill -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r008' ( temp 3X3 matrix of float) -0:407 clamp ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 'inF2' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r009' ( temp 3X3 matrix of float) -0:407 cosine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r010' ( temp 3X3 matrix of float) -0:407 hyp. cosine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r011' ( temp 3X3 matrix of float) -0:407 dPdx ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r012' ( temp 3X3 matrix of float) -0:407 dPdxCoarse ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r013' ( temp 3X3 matrix of float) -0:407 dPdxFine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r014' ( temp 3X3 matrix of float) -0:407 dPdy ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r015' ( temp 3X3 matrix of float) -0:407 dPdyCoarse ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r016' ( temp 3X3 matrix of float) -0:407 dPdyFine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r017' ( temp 3X3 matrix of float) -0:407 degrees ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp float) -0:407 'r018' ( temp float) -0:407 determinant ( temp float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r019' ( temp 3X3 matrix of float) -0:407 exp ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'R020' ( temp 3X3 matrix of float) -0:407 exp2 ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r021' ( temp 3X3 matrix of float) -0:407 Floor ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r022' ( temp 3X3 matrix of float) -0:407 mod ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r023' ( temp 3X3 matrix of float) -0:407 Fraction ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r025' ( temp 3X3 matrix of float) -0:407 fwidth ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r026' ( temp 3X3 matrix of float) -0:407 ldexp ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r026a' ( temp 3X3 matrix of float) -0:407 mix ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 'inF2' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r027' ( temp 3X3 matrix of float) -0:407 log ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r028' ( temp 3X3 matrix of float) -0:407 matrix-scale ( temp 3X3 matrix of float) -0:407 log2 ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Constant: -0:407 0.301030 -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r029' ( temp 3X3 matrix of float) -0:407 log2 ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r030' ( temp 3X3 matrix of float) -0:407 max ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r031' ( temp 3X3 matrix of float) -0:407 min ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r032' ( temp 3X3 matrix of float) -0:407 pow ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r033' ( temp 3X3 matrix of float) -0:407 radians ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r034' ( temp 3X3 matrix of float) -0:407 roundEven ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r035' ( temp 3X3 matrix of float) -0:407 inverse sqrt ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r036' ( temp 3X3 matrix of float) -0:407 clamp ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Constant: -0:407 0.000000 -0:407 Constant: -0:407 1.000000 -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r037' ( temp 3X3 matrix of float) -0:407 Sign ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r038' ( temp 3X3 matrix of float) -0:407 sine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 sine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'inF2' ( in 3X3 matrix of float) -0:407 cosine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r039' ( temp 3X3 matrix of float) -0:407 hyp. sine ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r049' ( temp 3X3 matrix of float) -0:407 smoothstep ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 'inF2' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r041' ( temp 3X3 matrix of float) -0:407 sqrt ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r042' ( temp 3X3 matrix of float) -0:407 step ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 'inF1' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r043' ( temp 3X3 matrix of float) -0:407 tangent ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r044' ( temp 3X3 matrix of float) -0:407 hyp. tangent ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 transpose ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:407 Sequence -0:407 move second child to first child ( temp 3X3 matrix of float) -0:407 'r046' ( temp 3X3 matrix of float) -0:407 trunc ( temp 3X3 matrix of float) -0:407 'inF0' ( in 3X3 matrix of float) -0:410 Branch: Return with expression +0:411 Sequence +0:411 move second child to first child ( temp bool) +0:411 'r000' ( temp bool) +0:411 all ( temp bool) +0:411 Convert float to bool ( temp 3X3 matrix of bool) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r001' ( temp 3X3 matrix of float) +0:411 Absolute value ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 arc cosine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp bool) +0:411 'r003' ( temp bool) +0:411 any ( temp bool) +0:411 Convert float to bool ( temp 3X3 matrix of bool) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r004' ( temp 3X3 matrix of float) +0:411 arc sine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r005' ( temp 3X3 matrix of float) +0:411 arc tangent ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r006' ( temp 3X3 matrix of float) +0:411 arc tangent ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r007' ( temp 3X3 matrix of float) +0:411 Ceiling ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Test condition and select ( temp void) +0:411 Condition +0:411 any ( temp bool) +0:411 Compare Less Than ( temp 3X3 matrix of bool) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Constant: +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 0.000000 +0:411 true case +0:411 Branch: Kill +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r008' ( temp 3X3 matrix of float) +0:411 clamp ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 'inF2' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r009' ( temp 3X3 matrix of float) +0:411 cosine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r010' ( temp 3X3 matrix of float) +0:411 hyp. cosine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r011' ( temp 3X3 matrix of float) +0:411 dPdx ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r012' ( temp 3X3 matrix of float) +0:411 dPdxCoarse ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r013' ( temp 3X3 matrix of float) +0:411 dPdxFine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r014' ( temp 3X3 matrix of float) +0:411 dPdy ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r015' ( temp 3X3 matrix of float) +0:411 dPdyCoarse ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r016' ( temp 3X3 matrix of float) +0:411 dPdyFine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r017' ( temp 3X3 matrix of float) +0:411 degrees ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp float) +0:411 'r018' ( temp float) +0:411 determinant ( temp float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r019' ( temp 3X3 matrix of float) +0:411 exp ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'R020' ( temp 3X3 matrix of float) +0:411 exp2 ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r021' ( temp 3X3 matrix of float) +0:411 Floor ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r022' ( temp 3X3 matrix of float) +0:411 mod ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r023' ( temp 3X3 matrix of float) +0:411 Fraction ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r025' ( temp 3X3 matrix of float) +0:411 fwidth ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r026' ( temp 3X3 matrix of float) +0:411 ldexp ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r026a' ( temp 3X3 matrix of float) +0:411 mix ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 'inF2' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r027' ( temp 3X3 matrix of float) +0:411 log ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r028' ( temp 3X3 matrix of float) +0:411 matrix-scale ( temp 3X3 matrix of float) +0:411 log2 ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Constant: +0:411 0.301030 +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r029' ( temp 3X3 matrix of float) +0:411 log2 ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r030' ( temp 3X3 matrix of float) +0:411 max ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r031' ( temp 3X3 matrix of float) +0:411 min ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r032' ( temp 3X3 matrix of float) +0:411 pow ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r033' ( temp 3X3 matrix of float) +0:411 radians ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r034' ( temp 3X3 matrix of float) +0:411 roundEven ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r035' ( temp 3X3 matrix of float) +0:411 inverse sqrt ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r036' ( temp 3X3 matrix of float) +0:411 clamp ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Constant: +0:411 0.000000 +0:411 Constant: +0:411 1.000000 +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r037' ( temp 3X3 matrix of float) +0:411 Sign ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r038' ( temp 3X3 matrix of float) +0:411 sine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 sine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'inF2' ( in 3X3 matrix of float) +0:411 cosine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r039' ( temp 3X3 matrix of float) +0:411 hyp. sine ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r049' ( temp 3X3 matrix of float) +0:411 smoothstep ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 'inF2' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r041' ( temp 3X3 matrix of float) +0:411 sqrt ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r042' ( temp 3X3 matrix of float) +0:411 step ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 'inF1' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r043' ( temp 3X3 matrix of float) +0:411 tangent ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r044' ( temp 3X3 matrix of float) +0:411 hyp. tangent ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 transpose ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:411 Sequence +0:411 move second child to first child ( temp 3X3 matrix of float) +0:411 'r046' ( temp 3X3 matrix of float) +0:411 trunc ( temp 3X3 matrix of float) +0:411 'inF0' ( in 3X3 matrix of float) +0:414 Branch: Return with expression 0:? Constant: 0:? 3.000000 0:? 3.000000 @@ -4872,295 +4980,297 @@ gl_FragCoord origin is upper left 0:? 3.000000 0:? 3.000000 0:? 3.000000 -0:414 Function Definition: PixelShaderFunction4x4(mf44;mf44;mf44; ( temp 4X4 matrix of float) -0:414 Function Parameters: -0:414 'inF0' ( in 4X4 matrix of float) -0:414 'inF1' ( in 4X4 matrix of float) -0:414 'inF2' ( in 4X4 matrix of float) +0:418 Function Definition: PixelShaderFunction4x4(mf44;mf44;mf44; ( temp 4X4 matrix of float) +0:418 Function Parameters: +0:418 'inF0' ( in 4X4 matrix of float) +0:418 'inF1' ( in 4X4 matrix of float) +0:418 'inF2' ( in 4X4 matrix of float) 0:? Sequence -0:416 Sequence -0:416 move second child to first child ( temp bool) -0:416 'r000' ( temp bool) -0:416 all ( temp bool) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r001' ( temp 4X4 matrix of float) -0:416 Absolute value ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 arc cosine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp bool) -0:416 'r003' ( temp bool) -0:416 any ( temp bool) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r004' ( temp 4X4 matrix of float) -0:416 arc sine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r005' ( temp 4X4 matrix of float) -0:416 arc tangent ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r006' ( temp 4X4 matrix of float) -0:416 arc tangent ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r007' ( temp 4X4 matrix of float) -0:416 Ceiling ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Test condition and select ( temp void) -0:416 Condition -0:416 any ( temp bool) -0:416 Compare Less Than ( temp 4X4 matrix of bool) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Constant: -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 0.000000 -0:416 true case -0:416 Branch: Kill -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r008' ( temp 4X4 matrix of float) -0:416 clamp ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 'inF2' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r009' ( temp 4X4 matrix of float) -0:416 cosine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r010' ( temp 4X4 matrix of float) -0:416 hyp. cosine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r011' ( temp 4X4 matrix of float) -0:416 dPdx ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r012' ( temp 4X4 matrix of float) -0:416 dPdxCoarse ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r013' ( temp 4X4 matrix of float) -0:416 dPdxFine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r014' ( temp 4X4 matrix of float) -0:416 dPdy ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r015' ( temp 4X4 matrix of float) -0:416 dPdyCoarse ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r016' ( temp 4X4 matrix of float) -0:416 dPdyFine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r017' ( temp 4X4 matrix of float) -0:416 degrees ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp float) -0:416 'r018' ( temp float) -0:416 determinant ( temp float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r019' ( temp 4X4 matrix of float) -0:416 exp ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'R020' ( temp 4X4 matrix of float) -0:416 exp2 ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r021' ( temp 4X4 matrix of float) -0:416 Floor ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r022' ( temp 4X4 matrix of float) -0:416 mod ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r023' ( temp 4X4 matrix of float) -0:416 Fraction ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r025' ( temp 4X4 matrix of float) -0:416 fwidth ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r026' ( temp 4X4 matrix of float) -0:416 ldexp ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r026a' ( temp 4X4 matrix of float) -0:416 mix ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 'inF2' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r027' ( temp 4X4 matrix of float) -0:416 log ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r028' ( temp 4X4 matrix of float) -0:416 matrix-scale ( temp 4X4 matrix of float) -0:416 log2 ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Constant: -0:416 0.301030 -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r029' ( temp 4X4 matrix of float) -0:416 log2 ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r030' ( temp 4X4 matrix of float) -0:416 max ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r031' ( temp 4X4 matrix of float) -0:416 min ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r032' ( temp 4X4 matrix of float) -0:416 pow ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r033' ( temp 4X4 matrix of float) -0:416 radians ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r034' ( temp 4X4 matrix of float) -0:416 roundEven ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r035' ( temp 4X4 matrix of float) -0:416 inverse sqrt ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r036' ( temp 4X4 matrix of float) -0:416 clamp ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Constant: -0:416 0.000000 -0:416 Constant: -0:416 1.000000 -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r037' ( temp 4X4 matrix of float) -0:416 Sign ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r038' ( temp 4X4 matrix of float) -0:416 sine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 sine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'inF2' ( in 4X4 matrix of float) -0:416 cosine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r039' ( temp 4X4 matrix of float) -0:416 hyp. sine ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r049' ( temp 4X4 matrix of float) -0:416 smoothstep ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 'inF2' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r041' ( temp 4X4 matrix of float) -0:416 sqrt ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r042' ( temp 4X4 matrix of float) -0:416 step ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 'inF1' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r043' ( temp 4X4 matrix of float) -0:416 tangent ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r044' ( temp 4X4 matrix of float) -0:416 hyp. tangent ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 transpose ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:416 Sequence -0:416 move second child to first child ( temp 4X4 matrix of float) -0:416 'r046' ( temp 4X4 matrix of float) -0:416 trunc ( temp 4X4 matrix of float) -0:416 'inF0' ( in 4X4 matrix of float) -0:419 Branch: Return with expression +0:420 Sequence +0:420 move second child to first child ( temp bool) +0:420 'r000' ( temp bool) +0:420 all ( temp bool) +0:420 Convert float to bool ( temp 4X4 matrix of bool) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r001' ( temp 4X4 matrix of float) +0:420 Absolute value ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 arc cosine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp bool) +0:420 'r003' ( temp bool) +0:420 any ( temp bool) +0:420 Convert float to bool ( temp 4X4 matrix of bool) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r004' ( temp 4X4 matrix of float) +0:420 arc sine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r005' ( temp 4X4 matrix of float) +0:420 arc tangent ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r006' ( temp 4X4 matrix of float) +0:420 arc tangent ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r007' ( temp 4X4 matrix of float) +0:420 Ceiling ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Test condition and select ( temp void) +0:420 Condition +0:420 any ( temp bool) +0:420 Compare Less Than ( temp 4X4 matrix of bool) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Constant: +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 0.000000 +0:420 true case +0:420 Branch: Kill +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r008' ( temp 4X4 matrix of float) +0:420 clamp ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 'inF2' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r009' ( temp 4X4 matrix of float) +0:420 cosine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r010' ( temp 4X4 matrix of float) +0:420 hyp. cosine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r011' ( temp 4X4 matrix of float) +0:420 dPdx ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r012' ( temp 4X4 matrix of float) +0:420 dPdxCoarse ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r013' ( temp 4X4 matrix of float) +0:420 dPdxFine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r014' ( temp 4X4 matrix of float) +0:420 dPdy ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r015' ( temp 4X4 matrix of float) +0:420 dPdyCoarse ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r016' ( temp 4X4 matrix of float) +0:420 dPdyFine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r017' ( temp 4X4 matrix of float) +0:420 degrees ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp float) +0:420 'r018' ( temp float) +0:420 determinant ( temp float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r019' ( temp 4X4 matrix of float) +0:420 exp ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'R020' ( temp 4X4 matrix of float) +0:420 exp2 ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r021' ( temp 4X4 matrix of float) +0:420 Floor ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r022' ( temp 4X4 matrix of float) +0:420 mod ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r023' ( temp 4X4 matrix of float) +0:420 Fraction ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r025' ( temp 4X4 matrix of float) +0:420 fwidth ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r026' ( temp 4X4 matrix of float) +0:420 ldexp ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r026a' ( temp 4X4 matrix of float) +0:420 mix ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 'inF2' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r027' ( temp 4X4 matrix of float) +0:420 log ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r028' ( temp 4X4 matrix of float) +0:420 matrix-scale ( temp 4X4 matrix of float) +0:420 log2 ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Constant: +0:420 0.301030 +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r029' ( temp 4X4 matrix of float) +0:420 log2 ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r030' ( temp 4X4 matrix of float) +0:420 max ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r031' ( temp 4X4 matrix of float) +0:420 min ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r032' ( temp 4X4 matrix of float) +0:420 pow ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r033' ( temp 4X4 matrix of float) +0:420 radians ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r034' ( temp 4X4 matrix of float) +0:420 roundEven ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r035' ( temp 4X4 matrix of float) +0:420 inverse sqrt ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r036' ( temp 4X4 matrix of float) +0:420 clamp ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Constant: +0:420 0.000000 +0:420 Constant: +0:420 1.000000 +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r037' ( temp 4X4 matrix of float) +0:420 Sign ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r038' ( temp 4X4 matrix of float) +0:420 sine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 sine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'inF2' ( in 4X4 matrix of float) +0:420 cosine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r039' ( temp 4X4 matrix of float) +0:420 hyp. sine ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r049' ( temp 4X4 matrix of float) +0:420 smoothstep ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 'inF2' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r041' ( temp 4X4 matrix of float) +0:420 sqrt ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r042' ( temp 4X4 matrix of float) +0:420 step ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 'inF1' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r043' ( temp 4X4 matrix of float) +0:420 tangent ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r044' ( temp 4X4 matrix of float) +0:420 hyp. tangent ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 transpose ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:420 Sequence +0:420 move second child to first child ( temp 4X4 matrix of float) +0:420 'r046' ( temp 4X4 matrix of float) +0:420 trunc ( temp 4X4 matrix of float) +0:420 'inF0' ( in 4X4 matrix of float) +0:423 Branch: Return with expression 0:? Constant: 0:? 4.000000 0:? 4.000000 @@ -5178,334 +5288,334 @@ gl_FragCoord origin is upper left 0:? 4.000000 0:? 4.000000 0:? 4.000000 -0:437 Function Definition: TestGenMul2(f1;f1;vf2;vf2;mf22;mf22; ( temp void) -0:437 Function Parameters: -0:437 'inF0' ( in float) -0:437 'inF1' ( in float) -0:437 'inFV0' ( in 2-component vector of float) -0:437 'inFV1' ( in 2-component vector of float) -0:437 'inFM0' ( in 2X2 matrix of float) -0:437 'inFM1' ( in 2X2 matrix of float) +0:441 Function Definition: TestGenMul2(f1;f1;vf2;vf2;mf22;mf22; ( temp void) +0:441 Function Parameters: +0:441 'inF0' ( in float) +0:441 'inF1' ( in float) +0:441 'inFV0' ( in 2-component vector of float) +0:441 'inFV1' ( in 2-component vector of float) +0:441 'inFM0' ( in 2X2 matrix of float) +0:441 'inFM1' ( in 2X2 matrix of float) 0:? Sequence -0:438 Sequence -0:438 move second child to first child ( temp float) -0:438 'r0' ( temp float) -0:438 component-wise multiply ( temp float) -0:438 'inF1' ( in float) -0:438 'inF0' ( in float) -0:438 Sequence -0:438 move second child to first child ( temp 2-component vector of float) -0:438 'r1' ( temp 2-component vector of float) -0:438 vector-scale ( temp 2-component vector of float) -0:438 'inF0' ( in float) -0:438 'inFV0' ( in 2-component vector of float) -0:438 Sequence -0:438 move second child to first child ( temp 2-component vector of float) -0:438 'r2' ( temp 2-component vector of float) -0:438 vector-scale ( temp 2-component vector of float) -0:438 'inFV0' ( in 2-component vector of float) -0:438 'inF0' ( in float) -0:438 Sequence -0:438 move second child to first child ( temp float) -0:438 'r3' ( temp float) -0:438 dot-product ( temp float) -0:438 'inFV0' ( in 2-component vector of float) -0:438 'inFV1' ( in 2-component vector of float) -0:438 Sequence -0:438 move second child to first child ( temp 2-component vector of float) -0:438 'r4' ( temp 2-component vector of float) -0:438 vector-times-matrix ( temp 2-component vector of float) -0:438 'inFV0' ( in 2-component vector of float) -0:438 'inFM0' ( in 2X2 matrix of float) -0:438 Sequence -0:438 move second child to first child ( temp 2-component vector of float) -0:438 'r5' ( temp 2-component vector of float) -0:438 matrix-times-vector ( temp 2-component vector of float) -0:438 'inFM0' ( in 2X2 matrix of float) -0:438 'inFV0' ( in 2-component vector of float) -0:438 Sequence -0:438 move second child to first child ( temp 2X2 matrix of float) -0:438 'r6' ( temp 2X2 matrix of float) -0:438 matrix-scale ( temp 2X2 matrix of float) -0:438 'inF0' ( in float) -0:438 'inFM0' ( in 2X2 matrix of float) -0:438 Sequence -0:438 move second child to first child ( temp 2X2 matrix of float) -0:438 'r7' ( temp 2X2 matrix of float) -0:438 matrix-scale ( temp 2X2 matrix of float) -0:438 'inFM0' ( in 2X2 matrix of float) -0:438 'inF0' ( in float) -0:438 Sequence -0:438 move second child to first child ( temp 2X2 matrix of float) -0:438 'r8' ( temp 2X2 matrix of float) -0:438 matrix-multiply ( temp 2X2 matrix of float) -0:438 'inFM1' ( in 2X2 matrix of float) -0:438 'inFM0' ( in 2X2 matrix of float) -0:444 Function Definition: TestGenMul3(f1;f1;vf3;vf3;mf33;mf33; ( temp void) -0:444 Function Parameters: -0:444 'inF0' ( in float) -0:444 'inF1' ( in float) -0:444 'inFV0' ( in 3-component vector of float) -0:444 'inFV1' ( in 3-component vector of float) -0:444 'inFM0' ( in 3X3 matrix of float) -0:444 'inFM1' ( in 3X3 matrix of float) +0:442 Sequence +0:442 move second child to first child ( temp float) +0:442 'r0' ( temp float) +0:442 component-wise multiply ( temp float) +0:442 'inF1' ( in float) +0:442 'inF0' ( in float) +0:442 Sequence +0:442 move second child to first child ( temp 2-component vector of float) +0:442 'r1' ( temp 2-component vector of float) +0:442 vector-scale ( temp 2-component vector of float) +0:442 'inF0' ( in float) +0:442 'inFV0' ( in 2-component vector of float) +0:442 Sequence +0:442 move second child to first child ( temp 2-component vector of float) +0:442 'r2' ( temp 2-component vector of float) +0:442 vector-scale ( temp 2-component vector of float) +0:442 'inFV0' ( in 2-component vector of float) +0:442 'inF0' ( in float) +0:442 Sequence +0:442 move second child to first child ( temp float) +0:442 'r3' ( temp float) +0:442 dot-product ( temp float) +0:442 'inFV0' ( in 2-component vector of float) +0:442 'inFV1' ( in 2-component vector of float) +0:442 Sequence +0:442 move second child to first child ( temp 2-component vector of float) +0:442 'r4' ( temp 2-component vector of float) +0:442 vector-times-matrix ( temp 2-component vector of float) +0:442 'inFV0' ( in 2-component vector of float) +0:442 'inFM0' ( in 2X2 matrix of float) +0:442 Sequence +0:442 move second child to first child ( temp 2-component vector of float) +0:442 'r5' ( temp 2-component vector of float) +0:442 matrix-times-vector ( temp 2-component vector of float) +0:442 'inFM0' ( in 2X2 matrix of float) +0:442 'inFV0' ( in 2-component vector of float) +0:442 Sequence +0:442 move second child to first child ( temp 2X2 matrix of float) +0:442 'r6' ( temp 2X2 matrix of float) +0:442 matrix-scale ( temp 2X2 matrix of float) +0:442 'inF0' ( in float) +0:442 'inFM0' ( in 2X2 matrix of float) +0:442 Sequence +0:442 move second child to first child ( temp 2X2 matrix of float) +0:442 'r7' ( temp 2X2 matrix of float) +0:442 matrix-scale ( temp 2X2 matrix of float) +0:442 'inFM0' ( in 2X2 matrix of float) +0:442 'inF0' ( in float) +0:442 Sequence +0:442 move second child to first child ( temp 2X2 matrix of float) +0:442 'r8' ( temp 2X2 matrix of float) +0:442 matrix-multiply ( temp 2X2 matrix of float) +0:442 'inFM1' ( in 2X2 matrix of float) +0:442 'inFM0' ( in 2X2 matrix of float) +0:448 Function Definition: TestGenMul3(f1;f1;vf3;vf3;mf33;mf33; ( temp void) +0:448 Function Parameters: +0:448 'inF0' ( in float) +0:448 'inF1' ( in float) +0:448 'inFV0' ( in 3-component vector of float) +0:448 'inFV1' ( in 3-component vector of float) +0:448 'inFM0' ( in 3X3 matrix of float) +0:448 'inFM1' ( in 3X3 matrix of float) 0:? Sequence -0:445 Sequence -0:445 move second child to first child ( temp float) -0:445 'r0' ( temp float) -0:445 component-wise multiply ( temp float) -0:445 'inF1' ( in float) -0:445 'inF0' ( in float) -0:445 Sequence -0:445 move second child to first child ( temp 3-component vector of float) -0:445 'r1' ( temp 3-component vector of float) -0:445 vector-scale ( temp 3-component vector of float) -0:445 'inF0' ( in float) -0:445 'inFV0' ( in 3-component vector of float) -0:445 Sequence -0:445 move second child to first child ( temp 3-component vector of float) -0:445 'r2' ( temp 3-component vector of float) -0:445 vector-scale ( temp 3-component vector of float) -0:445 'inFV0' ( in 3-component vector of float) -0:445 'inF0' ( in float) -0:445 Sequence -0:445 move second child to first child ( temp float) -0:445 'r3' ( temp float) -0:445 dot-product ( temp float) -0:445 'inFV0' ( in 3-component vector of float) -0:445 'inFV1' ( in 3-component vector of float) -0:445 Sequence -0:445 move second child to first child ( temp 3-component vector of float) -0:445 'r4' ( temp 3-component vector of float) -0:445 vector-times-matrix ( temp 3-component vector of float) -0:445 'inFV0' ( in 3-component vector of float) -0:445 'inFM0' ( in 3X3 matrix of float) -0:445 Sequence -0:445 move second child to first child ( temp 3-component vector of float) -0:445 'r5' ( temp 3-component vector of float) -0:445 matrix-times-vector ( temp 3-component vector of float) -0:445 'inFM0' ( in 3X3 matrix of float) -0:445 'inFV0' ( in 3-component vector of float) -0:445 Sequence -0:445 move second child to first child ( temp 3X3 matrix of float) -0:445 'r6' ( temp 3X3 matrix of float) -0:445 matrix-scale ( temp 3X3 matrix of float) -0:445 'inF0' ( in float) -0:445 'inFM0' ( in 3X3 matrix of float) -0:445 Sequence -0:445 move second child to first child ( temp 3X3 matrix of float) -0:445 'r7' ( temp 3X3 matrix of float) -0:445 matrix-scale ( temp 3X3 matrix of float) -0:445 'inFM0' ( in 3X3 matrix of float) -0:445 'inF0' ( in float) -0:445 Sequence -0:445 move second child to first child ( temp 3X3 matrix of float) -0:445 'r8' ( temp 3X3 matrix of float) -0:445 matrix-multiply ( temp 3X3 matrix of float) -0:445 'inFM1' ( in 3X3 matrix of float) -0:445 'inFM0' ( in 3X3 matrix of float) -0:451 Function Definition: TestGenMul4(f1;f1;vf4;vf4;mf44;mf44; ( temp void) -0:451 Function Parameters: -0:451 'inF0' ( in float) -0:451 'inF1' ( in float) -0:451 'inFV0' ( in 4-component vector of float) -0:451 'inFV1' ( in 4-component vector of float) -0:451 'inFM0' ( in 4X4 matrix of float) -0:451 'inFM1' ( in 4X4 matrix of float) +0:449 Sequence +0:449 move second child to first child ( temp float) +0:449 'r0' ( temp float) +0:449 component-wise multiply ( temp float) +0:449 'inF1' ( in float) +0:449 'inF0' ( in float) +0:449 Sequence +0:449 move second child to first child ( temp 3-component vector of float) +0:449 'r1' ( temp 3-component vector of float) +0:449 vector-scale ( temp 3-component vector of float) +0:449 'inF0' ( in float) +0:449 'inFV0' ( in 3-component vector of float) +0:449 Sequence +0:449 move second child to first child ( temp 3-component vector of float) +0:449 'r2' ( temp 3-component vector of float) +0:449 vector-scale ( temp 3-component vector of float) +0:449 'inFV0' ( in 3-component vector of float) +0:449 'inF0' ( in float) +0:449 Sequence +0:449 move second child to first child ( temp float) +0:449 'r3' ( temp float) +0:449 dot-product ( temp float) +0:449 'inFV0' ( in 3-component vector of float) +0:449 'inFV1' ( in 3-component vector of float) +0:449 Sequence +0:449 move second child to first child ( temp 3-component vector of float) +0:449 'r4' ( temp 3-component vector of float) +0:449 vector-times-matrix ( temp 3-component vector of float) +0:449 'inFV0' ( in 3-component vector of float) +0:449 'inFM0' ( in 3X3 matrix of float) +0:449 Sequence +0:449 move second child to first child ( temp 3-component vector of float) +0:449 'r5' ( temp 3-component vector of float) +0:449 matrix-times-vector ( temp 3-component vector of float) +0:449 'inFM0' ( in 3X3 matrix of float) +0:449 'inFV0' ( in 3-component vector of float) +0:449 Sequence +0:449 move second child to first child ( temp 3X3 matrix of float) +0:449 'r6' ( temp 3X3 matrix of float) +0:449 matrix-scale ( temp 3X3 matrix of float) +0:449 'inF0' ( in float) +0:449 'inFM0' ( in 3X3 matrix of float) +0:449 Sequence +0:449 move second child to first child ( temp 3X3 matrix of float) +0:449 'r7' ( temp 3X3 matrix of float) +0:449 matrix-scale ( temp 3X3 matrix of float) +0:449 'inFM0' ( in 3X3 matrix of float) +0:449 'inF0' ( in float) +0:449 Sequence +0:449 move second child to first child ( temp 3X3 matrix of float) +0:449 'r8' ( temp 3X3 matrix of float) +0:449 matrix-multiply ( temp 3X3 matrix of float) +0:449 'inFM1' ( in 3X3 matrix of float) +0:449 'inFM0' ( in 3X3 matrix of float) +0:455 Function Definition: TestGenMul4(f1;f1;vf4;vf4;mf44;mf44; ( temp void) +0:455 Function Parameters: +0:455 'inF0' ( in float) +0:455 'inF1' ( in float) +0:455 'inFV0' ( in 4-component vector of float) +0:455 'inFV1' ( in 4-component vector of float) +0:455 'inFM0' ( in 4X4 matrix of float) +0:455 'inFM1' ( in 4X4 matrix of float) 0:? Sequence -0:452 Sequence -0:452 move second child to first child ( temp float) -0:452 'r0' ( temp float) -0:452 component-wise multiply ( temp float) -0:452 'inF1' ( in float) -0:452 'inF0' ( in float) -0:452 Sequence -0:452 move second child to first child ( temp 4-component vector of float) -0:452 'r1' ( temp 4-component vector of float) -0:452 vector-scale ( temp 4-component vector of float) -0:452 'inF0' ( in float) -0:452 'inFV0' ( in 4-component vector of float) -0:452 Sequence -0:452 move second child to first child ( temp 4-component vector of float) -0:452 'r2' ( temp 4-component vector of float) -0:452 vector-scale ( temp 4-component vector of float) -0:452 'inFV0' ( in 4-component vector of float) -0:452 'inF0' ( in float) -0:452 Sequence -0:452 move second child to first child ( temp float) -0:452 'r3' ( temp float) -0:452 dot-product ( temp float) -0:452 'inFV0' ( in 4-component vector of float) -0:452 'inFV1' ( in 4-component vector of float) -0:452 Sequence -0:452 move second child to first child ( temp 4-component vector of float) -0:452 'r4' ( temp 4-component vector of float) -0:452 vector-times-matrix ( temp 4-component vector of float) -0:452 'inFV0' ( in 4-component vector of float) -0:452 'inFM0' ( in 4X4 matrix of float) -0:452 Sequence -0:452 move second child to first child ( temp 4-component vector of float) -0:452 'r5' ( temp 4-component vector of float) -0:452 matrix-times-vector ( temp 4-component vector of float) -0:452 'inFM0' ( in 4X4 matrix of float) -0:452 'inFV0' ( in 4-component vector of float) -0:452 Sequence -0:452 move second child to first child ( temp 4X4 matrix of float) -0:452 'r6' ( temp 4X4 matrix of float) -0:452 matrix-scale ( temp 4X4 matrix of float) -0:452 'inF0' ( in float) -0:452 'inFM0' ( in 4X4 matrix of float) -0:452 Sequence -0:452 move second child to first child ( temp 4X4 matrix of float) -0:452 'r7' ( temp 4X4 matrix of float) -0:452 matrix-scale ( temp 4X4 matrix of float) -0:452 'inFM0' ( in 4X4 matrix of float) -0:452 'inF0' ( in float) -0:452 Sequence -0:452 move second child to first child ( temp 4X4 matrix of float) -0:452 'r8' ( temp 4X4 matrix of float) -0:452 matrix-multiply ( temp 4X4 matrix of float) -0:452 'inFM1' ( in 4X4 matrix of float) -0:452 'inFM0' ( in 4X4 matrix of float) -0:461 Function Definition: TestGenMulNxM(f1;f1;vf2;vf3;mf23;mf32;mf33;mf34;mf24; ( temp void) -0:461 Function Parameters: -0:461 'inF0' ( in float) -0:461 'inF1' ( in float) -0:461 'inFV2' ( in 2-component vector of float) -0:461 'inFV3' ( in 3-component vector of float) -0:461 'inFM2x3' ( in 2X3 matrix of float) -0:461 'inFM3x2' ( in 3X2 matrix of float) -0:461 'inFM3x3' ( in 3X3 matrix of float) -0:461 'inFM3x4' ( in 3X4 matrix of float) -0:461 'inFM2x4' ( in 2X4 matrix of float) +0:456 Sequence +0:456 move second child to first child ( temp float) +0:456 'r0' ( temp float) +0:456 component-wise multiply ( temp float) +0:456 'inF1' ( in float) +0:456 'inF0' ( in float) +0:456 Sequence +0:456 move second child to first child ( temp 4-component vector of float) +0:456 'r1' ( temp 4-component vector of float) +0:456 vector-scale ( temp 4-component vector of float) +0:456 'inF0' ( in float) +0:456 'inFV0' ( in 4-component vector of float) +0:456 Sequence +0:456 move second child to first child ( temp 4-component vector of float) +0:456 'r2' ( temp 4-component vector of float) +0:456 vector-scale ( temp 4-component vector of float) +0:456 'inFV0' ( in 4-component vector of float) +0:456 'inF0' ( in float) +0:456 Sequence +0:456 move second child to first child ( temp float) +0:456 'r3' ( temp float) +0:456 dot-product ( temp float) +0:456 'inFV0' ( in 4-component vector of float) +0:456 'inFV1' ( in 4-component vector of float) +0:456 Sequence +0:456 move second child to first child ( temp 4-component vector of float) +0:456 'r4' ( temp 4-component vector of float) +0:456 vector-times-matrix ( temp 4-component vector of float) +0:456 'inFV0' ( in 4-component vector of float) +0:456 'inFM0' ( in 4X4 matrix of float) +0:456 Sequence +0:456 move second child to first child ( temp 4-component vector of float) +0:456 'r5' ( temp 4-component vector of float) +0:456 matrix-times-vector ( temp 4-component vector of float) +0:456 'inFM0' ( in 4X4 matrix of float) +0:456 'inFV0' ( in 4-component vector of float) +0:456 Sequence +0:456 move second child to first child ( temp 4X4 matrix of float) +0:456 'r6' ( temp 4X4 matrix of float) +0:456 matrix-scale ( temp 4X4 matrix of float) +0:456 'inF0' ( in float) +0:456 'inFM0' ( in 4X4 matrix of float) +0:456 Sequence +0:456 move second child to first child ( temp 4X4 matrix of float) +0:456 'r7' ( temp 4X4 matrix of float) +0:456 matrix-scale ( temp 4X4 matrix of float) +0:456 'inFM0' ( in 4X4 matrix of float) +0:456 'inF0' ( in float) +0:456 Sequence +0:456 move second child to first child ( temp 4X4 matrix of float) +0:456 'r8' ( temp 4X4 matrix of float) +0:456 matrix-multiply ( temp 4X4 matrix of float) +0:456 'inFM1' ( in 4X4 matrix of float) +0:456 'inFM0' ( in 4X4 matrix of float) +0:465 Function Definition: TestGenMulNxM(f1;f1;vf2;vf3;mf23;mf32;mf33;mf34;mf24; ( temp void) +0:465 Function Parameters: +0:465 'inF0' ( in float) +0:465 'inF1' ( in float) +0:465 'inFV2' ( in 2-component vector of float) +0:465 'inFV3' ( in 3-component vector of float) +0:465 'inFM2x3' ( in 2X3 matrix of float) +0:465 'inFM3x2' ( in 3X2 matrix of float) +0:465 'inFM3x3' ( in 3X3 matrix of float) +0:465 'inFM3x4' ( in 3X4 matrix of float) +0:465 'inFM2x4' ( in 2X4 matrix of float) 0:? Sequence -0:462 Sequence -0:462 move second child to first child ( temp float) -0:462 'r00' ( temp float) -0:462 component-wise multiply ( temp float) -0:462 'inF1' ( in float) -0:462 'inF0' ( in float) -0:463 Sequence -0:463 move second child to first child ( temp 2-component vector of float) -0:463 'r01' ( temp 2-component vector of float) -0:463 vector-scale ( temp 2-component vector of float) -0:463 'inF0' ( in float) -0:463 'inFV2' ( in 2-component vector of float) -0:464 Sequence -0:464 move second child to first child ( temp 3-component vector of float) -0:464 'r02' ( temp 3-component vector of float) -0:464 vector-scale ( temp 3-component vector of float) -0:464 'inF0' ( in float) -0:464 'inFV3' ( in 3-component vector of float) -0:465 Sequence -0:465 move second child to first child ( temp 2-component vector of float) -0:465 'r03' ( temp 2-component vector of float) -0:465 vector-scale ( temp 2-component vector of float) -0:465 'inFV2' ( in 2-component vector of float) -0:465 'inF0' ( in float) 0:466 Sequence -0:466 move second child to first child ( temp 3-component vector of float) -0:466 'r04' ( temp 3-component vector of float) -0:466 vector-scale ( temp 3-component vector of float) -0:466 'inFV3' ( in 3-component vector of float) +0:466 move second child to first child ( temp float) +0:466 'r00' ( temp float) +0:466 component-wise multiply ( temp float) +0:466 'inF1' ( in float) 0:466 'inF0' ( in float) 0:467 Sequence -0:467 move second child to first child ( temp float) -0:467 'r05' ( temp float) -0:467 dot-product ( temp float) -0:467 'inFV2' ( in 2-component vector of float) +0:467 move second child to first child ( temp 2-component vector of float) +0:467 'r01' ( temp 2-component vector of float) +0:467 vector-scale ( temp 2-component vector of float) +0:467 'inF0' ( in float) 0:467 'inFV2' ( in 2-component vector of float) 0:468 Sequence -0:468 move second child to first child ( temp float) -0:468 'r06' ( temp float) -0:468 dot-product ( temp float) -0:468 'inFV3' ( in 3-component vector of float) +0:468 move second child to first child ( temp 3-component vector of float) +0:468 'r02' ( temp 3-component vector of float) +0:468 vector-scale ( temp 3-component vector of float) +0:468 'inF0' ( in float) 0:468 'inFV3' ( in 3-component vector of float) 0:469 Sequence -0:469 move second child to first child ( temp 3-component vector of float) -0:469 'r07' ( temp 3-component vector of float) -0:469 matrix-times-vector ( temp 3-component vector of float) -0:469 'inFM2x3' ( in 2X3 matrix of float) +0:469 move second child to first child ( temp 2-component vector of float) +0:469 'r03' ( temp 2-component vector of float) +0:469 vector-scale ( temp 2-component vector of float) 0:469 'inFV2' ( in 2-component vector of float) +0:469 'inF0' ( in float) 0:470 Sequence -0:470 move second child to first child ( temp 2-component vector of float) -0:470 'r08' ( temp 2-component vector of float) -0:470 matrix-times-vector ( temp 2-component vector of float) -0:470 'inFM3x2' ( in 3X2 matrix of float) +0:470 move second child to first child ( temp 3-component vector of float) +0:470 'r04' ( temp 3-component vector of float) +0:470 vector-scale ( temp 3-component vector of float) 0:470 'inFV3' ( in 3-component vector of float) +0:470 'inF0' ( in float) 0:471 Sequence -0:471 move second child to first child ( temp 2-component vector of float) -0:471 'r09' ( temp 2-component vector of float) -0:471 vector-times-matrix ( temp 2-component vector of float) -0:471 'inFV3' ( in 3-component vector of float) -0:471 'inFM2x3' ( in 2X3 matrix of float) +0:471 move second child to first child ( temp float) +0:471 'r05' ( temp float) +0:471 dot-product ( temp float) +0:471 'inFV2' ( in 2-component vector of float) +0:471 'inFV2' ( in 2-component vector of float) 0:472 Sequence -0:472 move second child to first child ( temp 3-component vector of float) -0:472 'r10' ( temp 3-component vector of float) -0:472 vector-times-matrix ( temp 3-component vector of float) -0:472 'inFV2' ( in 2-component vector of float) -0:472 'inFM3x2' ( in 3X2 matrix of float) +0:472 move second child to first child ( temp float) +0:472 'r06' ( temp float) +0:472 dot-product ( temp float) +0:472 'inFV3' ( in 3-component vector of float) +0:472 'inFV3' ( in 3-component vector of float) 0:473 Sequence -0:473 move second child to first child ( temp 2X3 matrix of float) -0:473 'r11' ( temp 2X3 matrix of float) -0:473 matrix-scale ( temp 2X3 matrix of float) -0:473 'inF0' ( in float) +0:473 move second child to first child ( temp 3-component vector of float) +0:473 'r07' ( temp 3-component vector of float) +0:473 matrix-times-vector ( temp 3-component vector of float) 0:473 'inFM2x3' ( in 2X3 matrix of float) +0:473 'inFV2' ( in 2-component vector of float) 0:474 Sequence -0:474 move second child to first child ( temp 3X2 matrix of float) -0:474 'r12' ( temp 3X2 matrix of float) -0:474 matrix-scale ( temp 3X2 matrix of float) -0:474 'inF0' ( in float) +0:474 move second child to first child ( temp 2-component vector of float) +0:474 'r08' ( temp 2-component vector of float) +0:474 matrix-times-vector ( temp 2-component vector of float) 0:474 'inFM3x2' ( in 3X2 matrix of float) +0:474 'inFV3' ( in 3-component vector of float) 0:475 Sequence -0:475 move second child to first child ( temp 2X2 matrix of float) -0:475 'r13' ( temp 2X2 matrix of float) -0:475 matrix-multiply ( temp 2X2 matrix of float) -0:475 'inFM3x2' ( in 3X2 matrix of float) +0:475 move second child to first child ( temp 2-component vector of float) +0:475 'r09' ( temp 2-component vector of float) +0:475 vector-times-matrix ( temp 2-component vector of float) +0:475 'inFV3' ( in 3-component vector of float) 0:475 'inFM2x3' ( in 2X3 matrix of float) 0:476 Sequence -0:476 move second child to first child ( temp 2X3 matrix of float) -0:476 'r14' ( temp 2X3 matrix of float) -0:476 matrix-multiply ( temp 2X3 matrix of float) -0:476 'inFM3x3' ( in 3X3 matrix of float) -0:476 'inFM2x3' ( in 2X3 matrix of float) +0:476 move second child to first child ( temp 3-component vector of float) +0:476 'r10' ( temp 3-component vector of float) +0:476 vector-times-matrix ( temp 3-component vector of float) +0:476 'inFV2' ( in 2-component vector of float) +0:476 'inFM3x2' ( in 3X2 matrix of float) 0:477 Sequence -0:477 move second child to first child ( temp 2X4 matrix of float) -0:477 'r15' ( temp 2X4 matrix of float) -0:477 matrix-multiply ( temp 2X4 matrix of float) -0:477 'inFM3x4' ( in 3X4 matrix of float) +0:477 move second child to first child ( temp 2X3 matrix of float) +0:477 'r11' ( temp 2X3 matrix of float) +0:477 matrix-scale ( temp 2X3 matrix of float) +0:477 'inF0' ( in float) 0:477 'inFM2x3' ( in 2X3 matrix of float) 0:478 Sequence -0:478 move second child to first child ( temp 3X4 matrix of float) -0:478 'r16' ( temp 3X4 matrix of float) -0:478 matrix-multiply ( temp 3X4 matrix of float) -0:478 'inFM2x4' ( in 2X4 matrix of float) +0:478 move second child to first child ( temp 3X2 matrix of float) +0:478 'r12' ( temp 3X2 matrix of float) +0:478 matrix-scale ( temp 3X2 matrix of float) +0:478 'inF0' ( in float) 0:478 'inFM3x2' ( in 3X2 matrix of float) -0:484 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) -0:484 Function Parameters: +0:479 Sequence +0:479 move second child to first child ( temp 2X2 matrix of float) +0:479 'r13' ( temp 2X2 matrix of float) +0:479 matrix-multiply ( temp 2X2 matrix of float) +0:479 'inFM3x2' ( in 3X2 matrix of float) +0:479 'inFM2x3' ( in 2X3 matrix of float) +0:480 Sequence +0:480 move second child to first child ( temp 2X3 matrix of float) +0:480 'r14' ( temp 2X3 matrix of float) +0:480 matrix-multiply ( temp 2X3 matrix of float) +0:480 'inFM3x3' ( in 3X3 matrix of float) +0:480 'inFM2x3' ( in 2X3 matrix of float) +0:481 Sequence +0:481 move second child to first child ( temp 2X4 matrix of float) +0:481 'r15' ( temp 2X4 matrix of float) +0:481 matrix-multiply ( temp 2X4 matrix of float) +0:481 'inFM3x4' ( in 3X4 matrix of float) +0:481 'inFM2x3' ( in 2X3 matrix of float) +0:482 Sequence +0:482 move second child to first child ( temp 3X4 matrix of float) +0:482 'r16' ( temp 3X4 matrix of float) +0:482 matrix-multiply ( temp 3X4 matrix of float) +0:482 'inFM2x4' ( in 2X4 matrix of float) +0:482 'inFM3x2' ( in 3X2 matrix of float) +0:488 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:488 Function Parameters: 0:? Sequence -0:486 move second child to first child ( temp 4-component vector of float) -0:486 color: direct index for structure ( temp 4-component vector of float) -0:486 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:486 Constant: -0:486 0 (const int) -0:486 Constant: -0:486 1.000000 -0:486 1.000000 -0:486 1.000000 -0:486 1.000000 -0:487 Branch: Return with expression -0:487 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:484 Function Definition: main( ( temp void) -0:484 Function Parameters: +0:490 move second child to first child ( temp 4-component vector of float) +0:490 color: direct index for structure ( temp 4-component vector of float) +0:490 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:490 Constant: +0:490 0 (const int) +0:490 Constant: +0:490 1.000000 +0:490 1.000000 +0:490 1.000000 +0:490 1.000000 +0:491 Branch: Return with expression +0:491 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:488 Function Definition: main( ( temp void) +0:488 Function Parameters: 0:? Sequence -0:484 Sequence -0:484 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) -0:484 color: direct index for structure ( temp 4-component vector of float) -0:484 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) -0:484 Constant: -0:484 0 (const int) +0:488 Sequence +0:488 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) +0:488 color: direct index for structure ( temp 4-component vector of float) +0:488 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:488 Constant: +0:488 0 (const int) 0:? Linker Objects 0:? 'gs_ua' ( shared uint) 0:? 'gs_ub' ( shared uint) @@ -5519,2781 +5629,2830 @@ gl_FragCoord origin is upper left 0:? 'gs_ua4' ( shared 4-component vector of uint) 0:? 'gs_ub4' ( shared 4-component vector of uint) 0:? 'gs_uc4' ( shared 4-component vector of uint) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 1791 +// Generated by (magic number): 80003 +// Id's are bound by 1832 Capability Shader Capability DerivativeControl 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 1772 + EntryPoint Fragment 4 "main" 1813 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" - Name 16 "PixelShaderFunctionS(f1;f1;f1;u1;u1;" - Name 11 "inF0" - Name 12 "inF1" - Name 13 "inF2" - Name 14 "inU0" - Name 15 "inU1" - Name 22 "PixelShaderFunction1(vf1;vf1;vf1;" - Name 19 "inF0" - Name 20 "inF1" - Name 21 "inF2" - Name 34 "PixelShaderFunction2(vf2;vf2;vf2;vu2;vu2;" - Name 29 "inF0" - Name 30 "inF1" - Name 31 "inF2" - Name 32 "inU0" - Name 33 "inU1" - Name 46 "PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3;" - Name 41 "inF0" - Name 42 "inF1" - Name 43 "inF2" - Name 44 "inU0" - Name 45 "inU1" - Name 58 "PixelShaderFunction(vf4;vf4;vf4;vu4;vu4;" - Name 53 "inF0" - Name 54 "inF1" - Name 55 "inF2" - Name 56 "inU0" - Name 57 "inU1" - Name 66 "PixelShaderFunction2x2(mf22;mf22;mf22;" - Name 63 "inF0" - Name 64 "inF1" - Name 65 "inF2" - Name 74 "PixelShaderFunction3x3(mf33;mf33;mf33;" - Name 71 "inF0" - Name 72 "inF1" - Name 73 "inF2" - Name 82 "PixelShaderFunction4x4(mf44;mf44;mf44;" - Name 79 "inF0" - Name 80 "inF1" - Name 81 "inF2" - Name 91 "TestGenMul2(f1;f1;vf2;vf2;mf22;mf22;" - Name 85 "inF0" - Name 86 "inF1" - Name 87 "inFV0" - Name 88 "inFV1" - Name 89 "inFM0" - Name 90 "inFM1" - Name 100 "TestGenMul3(f1;f1;vf3;vf3;mf33;mf33;" - Name 94 "inF0" - Name 95 "inF1" - Name 96 "inFV0" - Name 97 "inFV1" - Name 98 "inFM0" - Name 99 "inFM1" - Name 109 "TestGenMul4(f1;f1;vf4;vf4;mf44;mf44;" - Name 103 "inF0" - Name 104 "inF1" - Name 105 "inFV0" - Name 106 "inFV1" - Name 107 "inFM0" - Name 108 "inFM1" - Name 129 "TestGenMulNxM(f1;f1;vf2;vf3;mf23;mf32;mf33;mf34;mf24;" - Name 120 "inF0" - Name 121 "inF1" - Name 122 "inFV2" - Name 123 "inFV3" - Name 124 "inFM2x3" - Name 125 "inFM3x2" - Name 126 "inFM3x3" - Name 127 "inFM3x4" - Name 128 "inFM2x4" - Name 131 "PS_OUTPUT" - MemberName 131(PS_OUTPUT) 0 "color" - Name 133 "@main(" - Name 137 "r000" - Name 140 "r001" - Name 143 "r002" - Name 146 "r003" - Name 149 "r004" - Name 154 "r005" - Name 157 "r006" - Name 160 "r007" - Name 163 "r009" - Name 166 "r010" - Name 170 "r011" - Name 173 "r012" - Name 184 "r014" - Name 187 "r015" - Name 190 "r016" - Name 193 "r017" - Name 196 "r018" - Name 199 "r019" - Name 202 "r020" - Name 205 "r021" - Name 208 "r022" - Name 211 "r023" - Name 214 "r027" - Name 217 "r028" - Name 220 "r029" - Name 223 "r030" - Name 226 "r031" - Name 229 "r033" - Name 233 "r034" - Name 236 "r036" - Name 239 "r037" - Name 242 "r038" - Name 245 "r039" - Name 249 "r039a" - Name 254 "r040" - Name 257 "r041" - Name 262 "r042" - Name 265 "r043" - Name 269 "r044" - Name 273 "r045" - Name 277 "r046" - Name 280 "r047" - Name 284 "r048" - Name 288 "r049" - Name 291 "r050" - Name 294 "r051" - Name 297 "r052" - Name 300 "r053" - Name 307 "r055" - Name 310 "r056" - Name 315 "r057" - Name 318 "r058" - Name 322 "r059" - Name 325 "r060" - Name 328 "r061" - Name 335 "r000" - Name 338 "r001" - Name 341 "r002" - Name 344 "r003" - Name 347 "r004" - Name 352 "r005" - Name 355 "r006" - Name 358 "r007" - Name 361 "r009" - Name 364 "r010" - Name 368 "r011" - Name 371 "r012" - Name 384 "r013" - Name 387 "r015" - Name 390 "r016" - Name 394 "r017" - Name 397 "r018" - Name 400 "r019" - Name 403 "r020" - Name 406 "r021" - Name 409 "r022" - Name 412 "r023" - Name 415 "r026" - Name 419 "r027" - Name 423 "r028" - Name 426 "r029" - Name 429 "r030" - Name 434 "r031" - Name 439 "r032" - Name 441 "r033" - Name 444 "r035" - Name 448 "r036" - Name 451 "r038" - Name 455 "r039" - Name 458 "r040" - Name 461 "r041" - Name 465 "r039a" - Name 470 "r042" - Name 473 "r043" - Name 476 "r044" - Name 480 "r045" - Name 483 "r046" - Name 487 "r047" - Name 491 "r048" - Name 494 "r049" - Name 498 "r050" - Name 501 "r051" - Name 505 "r052" - Name 509 "r053" - Name 514 "r054" - Name 519 "r055" - Name 522 "r056" - Name 525 "r057" - Name 530 "r058" - Name 533 "r059" - Name 540 "r060" - Name 543 "r061" - Name 548 "r062" - Name 551 "r063" - Name 555 "r064" - Name 558 "r065" - Name 561 "r066" - Name 567 "r000" - Name 570 "r001" - Name 573 "r002" - Name 576 "r003" - Name 579 "r004" - Name 584 "r005" - Name 587 "r006" - Name 590 "r007" - Name 593 "r009" - Name 596 "r010" - Name 600 "r011" - Name 603 "r012" - Name 616 "r013" - Name 619 "r014" - Name 622 "r015" - Name 627 "r016" - Name 631 "r017" - Name 634 "r018" - Name 637 "r019" - Name 640 "r020" - Name 643 "r021" - Name 646 "r022" - Name 649 "r023" - Name 652 "r024" - Name 656 "r025" - Name 660 "r029" - Name 663 "r030" - Name 666 "r031" - Name 671 "r032" - Name 675 "r033" - Name 677 "r034" - Name 680 "r036" - Name 684 "r037" - Name 687 "r039" - Name 691 "r040" - Name 694 "r041" - Name 697 "r042" - Name 701 "r039a" - Name 706 "r039b" - Name 712 "r043" - Name 715 "r044" - Name 718 "r045" - Name 722 "r046" - Name 725 "r047" - Name 729 "r048" - Name 733 "r049" - Name 736 "r050" - Name 740 "r051" - Name 743 "r052" - Name 747 "r053" - Name 751 "r054" - Name 755 "r055" - Name 758 "r056" - Name 761 "r057" - Name 764 "r058" - Name 769 "r059" - Name 772 "r060" - Name 779 "r061" - Name 782 "r062" - Name 787 "r063" - Name 790 "r064" - Name 794 "r065" - Name 797 "r066" - Name 800 "r067" - Name 807 "r000" - Name 810 "r001" - Name 813 "r002" - Name 816 "r003" - Name 819 "r004" - Name 824 "r005" - Name 827 "r006" - Name 830 "r007" - Name 833 "r009" - Name 836 "r010" - Name 840 "r011" - Name 843 "r012" - Name 856 "r013" - Name 859 "r014" - Name 862 "r015" - Name 865 "r016" - Name 868 "r017" - Name 871 "r018" - Name 874 "r019" - Name 877 "r020" - Name 880 "r021" - Name 883 "r022" - Name 886 "r023" - Name 890 "r024" - Name 894 "r025" - Name 905 "r029" - Name 908 "r030" - Name 911 "r031" - Name 916 "r032" - Name 921 "r033" - Name 923 "r034" - Name 926 "r036" - Name 930 "r037" - Name 933 "r039" - Name 937 "r040" - Name 940 "r041" - Name 943 "r042" - Name 947 "r039a" - Name 952 "r043" - Name 955 "r044" - Name 958 "r045" - Name 962 "r046" - Name 965 "r047" - Name 969 "r048" - Name 973 "r049" - Name 976 "r050" - Name 980 "r051" - Name 983 "r052" - Name 987 "r053" - Name 991 "r054" - Name 995 "r055" - Name 998 "r056" - Name 1001 "r057" - Name 1004 "r058" - Name 1009 "r059" - Name 1012 "r060" - Name 1019 "r061" - Name 1022 "r062" - Name 1027 "r063" - Name 1030 "r064" - Name 1034 "r065" - Name 1037 "r066" - Name 1040 "r067" - Name 1047 "r000" - Name 1050 "r001" - Name 1055 "r003" - Name 1058 "r004" - Name 1061 "r005" - Name 1064 "r006" - Name 1068 "r007" - Name 1079 "r008" - Name 1084 "r009" - Name 1087 "r010" - Name 1090 "r011" - Name 1093 "r012" - Name 1096 "r013" - Name 1099 "r014" - Name 1102 "r015" - Name 1105 "r016" - Name 1108 "r017" - Name 1111 "r018" - Name 1114 "r019" - Name 1117 "R020" - Name 1120 "r021" - Name 1123 "r022" - Name 1133 "r023" - Name 1136 "r025" - Name 1139 "r026" - Name 1143 "r026a" - Name 1148 "r027" - Name 1151 "r028" - Name 1155 "r029" - Name 1158 "r030" - Name 1162 "r031" - Name 1166 "r032" - Name 1170 "r033" - Name 1173 "r034" - Name 1176 "r035" - Name 1179 "r036" - Name 1184 "r037" - Name 1187 "r038" - Name 1194 "r039" - Name 1197 "r049" - Name 1202 "r041" - Name 1205 "r042" - Name 1209 "r043" - Name 1212 "r044" - Name 1217 "r046" - Name 1224 "r000" - Name 1227 "r001" - Name 1232 "r003" - Name 1235 "r004" - Name 1238 "r005" - Name 1241 "r006" - Name 1245 "r007" - Name 1256 "r008" - Name 1261 "r009" - Name 1264 "r010" - Name 1267 "r011" - Name 1270 "r012" - Name 1273 "r013" - Name 1276 "r014" - Name 1279 "r015" - Name 1282 "r016" - Name 1285 "r017" - Name 1288 "r018" - Name 1291 "r019" - Name 1294 "R020" - Name 1297 "r021" - Name 1300 "r022" - Name 1313 "r023" - Name 1316 "r025" - Name 1319 "r026" - Name 1323 "r026a" - Name 1328 "r027" - Name 1331 "r028" - Name 1335 "r029" - Name 1338 "r030" - Name 1342 "r031" - Name 1346 "r032" - Name 1350 "r033" - Name 1353 "r034" - Name 1356 "r035" - Name 1359 "r036" - Name 1364 "r037" - Name 1367 "r038" - Name 1374 "r039" - Name 1377 "r049" - Name 1382 "r041" - Name 1385 "r042" - Name 1389 "r043" - Name 1392 "r044" - Name 1397 "r046" - Name 1404 "r000" - Name 1407 "r001" - Name 1412 "r003" - Name 1415 "r004" - Name 1418 "r005" - Name 1421 "r006" - Name 1425 "r007" - Name 1436 "r008" - Name 1441 "r009" - Name 1444 "r010" - Name 1447 "r011" - Name 1450 "r012" - Name 1453 "r013" - Name 1456 "r014" - Name 1459 "r015" - Name 1462 "r016" - Name 1465 "r017" - Name 1468 "r018" - Name 1471 "r019" - Name 1474 "R020" - Name 1477 "r021" - Name 1480 "r022" - Name 1496 "r023" - Name 1499 "r025" - Name 1502 "r026" - Name 1506 "r026a" - Name 1511 "r027" - Name 1514 "r028" - Name 1518 "r029" - Name 1521 "r030" - Name 1525 "r031" - Name 1529 "r032" - Name 1533 "r033" - Name 1536 "r034" - Name 1539 "r035" - Name 1542 "r036" - Name 1547 "r037" - Name 1550 "r038" - Name 1557 "r039" - Name 1560 "r049" - Name 1565 "r041" - Name 1568 "r042" - Name 1572 "r043" - Name 1575 "r044" - Name 1580 "r046" - Name 1587 "r0" - Name 1591 "r1" - Name 1595 "r2" - Name 1599 "r3" - Name 1603 "r4" - Name 1607 "r5" - Name 1611 "r6" - Name 1615 "r7" - Name 1619 "r8" - Name 1623 "r0" - Name 1627 "r1" - Name 1631 "r2" - Name 1635 "r3" - Name 1639 "r4" - Name 1643 "r5" - Name 1647 "r6" - Name 1651 "r7" - Name 1655 "r8" - Name 1659 "r0" - Name 1663 "r1" - Name 1667 "r2" - Name 1671 "r3" - Name 1675 "r4" - Name 1679 "r5" - Name 1683 "r6" - Name 1687 "r7" - Name 1691 "r8" - Name 1695 "r00" - Name 1699 "r01" - Name 1703 "r02" - Name 1707 "r03" - Name 1711 "r04" - Name 1715 "r05" - Name 1719 "r06" - Name 1723 "r07" - Name 1727 "r08" - Name 1731 "r09" - Name 1735 "r10" - Name 1739 "r11" - Name 1743 "r12" - Name 1747 "r13" - Name 1751 "r14" - Name 1755 "r15" - Name 1759 "r16" - Name 1764 "ps_output" - Name 1772 "color" - Name 1776 "gs_ua" - Name 1777 "gs_ub" - Name 1778 "gs_uc" - Name 1780 "gs_ua2" - Name 1781 "gs_ub2" - Name 1782 "gs_uc2" - Name 1784 "gs_ua3" - Name 1785 "gs_ub3" - Name 1786 "gs_uc3" - Name 1788 "gs_ua4" - Name 1789 "gs_ub4" - Name 1790 "gs_uc4" - Decorate 1772(color) Location 0 + Name 18 "PixelShaderFunctionS(f1;f1;f1;u1;i1;" + Name 13 "inF0" + Name 14 "inF1" + Name 15 "inF2" + Name 16 "inU0" + Name 17 "inU1" + Name 24 "PixelShaderFunction1(vf1;vf1;vf1;" + Name 21 "inF0" + Name 22 "inF1" + Name 23 "inF2" + Name 36 "PixelShaderFunction2(vf2;vf2;vf2;vu2;vu2;" + Name 31 "inF0" + Name 32 "inF1" + Name 33 "inF2" + Name 34 "inU0" + Name 35 "inU1" + Name 48 "PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3;" + Name 43 "inF0" + Name 44 "inF1" + Name 45 "inF2" + Name 46 "inU0" + Name 47 "inU1" + Name 60 "PixelShaderFunction(vf4;vf4;vf4;vu4;vu4;" + Name 55 "inF0" + Name 56 "inF1" + Name 57 "inF2" + Name 58 "inU0" + Name 59 "inU1" + Name 68 "PixelShaderFunction2x2(mf22;mf22;mf22;" + Name 65 "inF0" + Name 66 "inF1" + Name 67 "inF2" + Name 76 "PixelShaderFunction3x3(mf33;mf33;mf33;" + Name 73 "inF0" + Name 74 "inF1" + Name 75 "inF2" + Name 84 "PixelShaderFunction4x4(mf44;mf44;mf44;" + Name 81 "inF0" + Name 82 "inF1" + Name 83 "inF2" + Name 93 "TestGenMul2(f1;f1;vf2;vf2;mf22;mf22;" + Name 87 "inF0" + Name 88 "inF1" + Name 89 "inFV0" + Name 90 "inFV1" + Name 91 "inFM0" + Name 92 "inFM1" + Name 102 "TestGenMul3(f1;f1;vf3;vf3;mf33;mf33;" + Name 96 "inF0" + Name 97 "inF1" + Name 98 "inFV0" + Name 99 "inFV1" + Name 100 "inFM0" + Name 101 "inFM1" + Name 111 "TestGenMul4(f1;f1;vf4;vf4;mf44;mf44;" + Name 105 "inF0" + Name 106 "inF1" + Name 107 "inFV0" + Name 108 "inFV1" + Name 109 "inFM0" + Name 110 "inFM1" + Name 131 "TestGenMulNxM(f1;f1;vf2;vf3;mf23;mf32;mf33;mf34;mf24;" + Name 122 "inF0" + Name 123 "inF1" + Name 124 "inFV2" + Name 125 "inFV3" + Name 126 "inFM2x3" + Name 127 "inFM3x2" + Name 128 "inFM3x3" + Name 129 "inFM3x4" + Name 130 "inFM2x4" + Name 133 "PS_OUTPUT" + MemberName 133(PS_OUTPUT) 0 "color" + Name 135 "@main(" + Name 139 "r000" + Name 144 "r001" + Name 147 "r002" + Name 150 "r003" + Name 154 "r004" + Name 157 "r005" + Name 160 "r006" + Name 163 "r007" + Name 166 "r009" + Name 169 "r010" + Name 173 "r011" + Name 176 "r012" + Name 192 "r014" + Name 195 "r015" + Name 198 "r016" + Name 201 "r017" + Name 204 "r018" + Name 207 "r019" + Name 210 "r020" + Name 213 "r021" + Name 216 "r022" + Name 219 "r023" + Name 222 "r027" + Name 225 "r028" + Name 228 "r029" + Name 231 "r030" + Name 234 "r031" + Name 237 "r033" + Name 241 "r034" + Name 244 "r036" + Name 247 "r037" + Name 250 "r038" + Name 253 "r039" + Name 257 "r039a" + Name 262 "r040" + Name 265 "r041" + Name 270 "r042" + Name 273 "r043" + Name 277 "r044" + Name 281 "r045" + Name 285 "r046" + Name 288 "r047" + Name 292 "r048" + Name 296 "r049" + Name 299 "r050" + Name 302 "r051" + Name 305 "r052" + Name 308 "r053" + Name 315 "r055" + Name 318 "r056" + Name 323 "r057" + Name 326 "r058" + Name 330 "r059" + Name 333 "r060" + Name 336 "r061" + Name 343 "r000" + Name 349 "r001" + Name 352 "r002" + Name 355 "r003" + Name 359 "r004" + Name 364 "r005" + Name 367 "r006" + Name 370 "r007" + Name 373 "r009" + Name 376 "r010" + Name 380 "r011" + Name 383 "r012" + Name 402 "r013" + Name 405 "r015" + Name 408 "r016" + Name 412 "r017" + Name 415 "r018" + Name 418 "r019" + Name 421 "r020" + Name 424 "r021" + Name 427 "r022" + Name 430 "r023" + Name 433 "r026" + Name 437 "r027" + Name 441 "r028" + Name 444 "r029" + Name 447 "r030" + Name 452 "r031" + Name 457 "r032" + Name 459 "r033" + Name 462 "r035" + Name 466 "r036" + Name 469 "r038" + Name 473 "r039" + Name 476 "r040" + Name 479 "r041" + Name 483 "r039a" + Name 488 "r042" + Name 491 "r043" + Name 494 "r044" + Name 498 "r045" + Name 501 "r046" + Name 505 "r047" + Name 509 "r048" + Name 512 "r049" + Name 516 "r050" + Name 519 "r051" + Name 523 "r052" + Name 527 "r053" + Name 532 "r054" + Name 537 "r055" + Name 540 "r056" + Name 543 "r057" + Name 548 "r058" + Name 551 "r059" + Name 558 "r060" + Name 561 "r061" + Name 566 "r062" + Name 569 "r063" + Name 573 "r064" + Name 576 "r065" + Name 579 "r066" + Name 585 "r000" + Name 591 "r001" + Name 594 "r002" + Name 597 "r003" + Name 601 "r004" + Name 606 "r005" + Name 609 "r006" + Name 612 "r007" + Name 615 "r009" + Name 618 "r010" + Name 622 "r011" + Name 625 "r012" + Name 643 "r013" + Name 646 "r014" + Name 649 "r015" + Name 654 "r016" + Name 658 "r017" + Name 661 "r018" + Name 664 "r019" + Name 667 "r020" + Name 670 "r021" + Name 673 "r022" + Name 676 "r023" + Name 679 "r024" + Name 683 "r025" + Name 687 "r029" + Name 690 "r030" + Name 693 "r031" + Name 698 "r032" + Name 702 "r033" + Name 704 "r034" + Name 707 "r036" + Name 711 "r037" + Name 714 "r039" + Name 718 "r040" + Name 721 "r041" + Name 724 "r042" + Name 728 "r039a" + Name 733 "r039b" + Name 739 "r043" + Name 742 "r044" + Name 745 "r045" + Name 749 "r046" + Name 752 "r047" + Name 756 "r048" + Name 760 "r049" + Name 763 "r050" + Name 767 "r051" + Name 770 "r052" + Name 774 "r053" + Name 778 "r054" + Name 782 "r055" + Name 785 "r056" + Name 788 "r057" + Name 791 "r058" + Name 796 "r059" + Name 799 "r060" + Name 806 "r061" + Name 809 "r062" + Name 814 "r063" + Name 817 "r064" + Name 821 "r065" + Name 824 "r066" + Name 827 "r067" + Name 834 "r000" + Name 840 "r001" + Name 843 "r002" + Name 846 "r003" + Name 850 "r004" + Name 855 "r005" + Name 858 "r006" + Name 861 "r007" + Name 864 "r009" + Name 867 "r010" + Name 871 "r011" + Name 874 "r012" + Name 892 "r013" + Name 895 "r014" + Name 898 "r015" + Name 901 "r016" + Name 904 "r017" + Name 907 "r018" + Name 910 "r019" + Name 913 "r020" + Name 916 "r021" + Name 919 "r022" + Name 922 "r023" + Name 926 "r024" + Name 930 "r025" + Name 941 "r029" + Name 944 "r030" + Name 947 "r031" + Name 952 "r032" + Name 957 "r033" + Name 959 "r034" + Name 962 "r036" + Name 966 "r037" + Name 969 "r039" + Name 973 "r040" + Name 976 "r041" + Name 979 "r042" + Name 983 "r039a" + Name 988 "r043" + Name 991 "r044" + Name 994 "r045" + Name 998 "r046" + Name 1001 "r047" + Name 1005 "r048" + Name 1009 "r049" + Name 1012 "r050" + Name 1016 "r051" + Name 1019 "r052" + Name 1023 "r053" + Name 1027 "r054" + Name 1031 "r055" + Name 1034 "r056" + Name 1037 "r057" + Name 1040 "r058" + Name 1045 "r059" + Name 1048 "r060" + Name 1055 "r061" + Name 1058 "r062" + Name 1063 "r063" + Name 1066 "r064" + Name 1070 "r065" + Name 1073 "r066" + Name 1076 "r067" + Name 1083 "r000" + Name 1088 "r001" + Name 1093 "r003" + Name 1097 "r004" + Name 1100 "r005" + Name 1103 "r006" + Name 1107 "r007" + Name 1117 "r008" + Name 1122 "r009" + Name 1125 "r010" + Name 1128 "r011" + Name 1131 "r012" + Name 1134 "r013" + Name 1137 "r014" + Name 1140 "r015" + Name 1143 "r016" + Name 1146 "r017" + Name 1149 "r018" + Name 1152 "r019" + Name 1155 "R020" + Name 1158 "r021" + Name 1161 "r022" + Name 1171 "r023" + Name 1174 "r025" + Name 1177 "r026" + Name 1181 "r026a" + Name 1186 "r027" + Name 1189 "r028" + Name 1193 "r029" + Name 1196 "r030" + Name 1200 "r031" + Name 1204 "r032" + Name 1208 "r033" + Name 1211 "r034" + Name 1214 "r035" + Name 1217 "r036" + Name 1222 "r037" + Name 1225 "r038" + Name 1232 "r039" + Name 1235 "r049" + Name 1240 "r041" + Name 1243 "r042" + Name 1247 "r043" + Name 1250 "r044" + Name 1255 "r046" + Name 1262 "r000" + Name 1267 "r001" + Name 1272 "r003" + Name 1276 "r004" + Name 1279 "r005" + Name 1282 "r006" + Name 1286 "r007" + Name 1296 "r008" + Name 1301 "r009" + Name 1304 "r010" + Name 1307 "r011" + Name 1310 "r012" + Name 1313 "r013" + Name 1316 "r014" + Name 1319 "r015" + Name 1322 "r016" + Name 1325 "r017" + Name 1328 "r018" + Name 1331 "r019" + Name 1334 "R020" + Name 1337 "r021" + Name 1340 "r022" + Name 1353 "r023" + Name 1356 "r025" + Name 1359 "r026" + Name 1363 "r026a" + Name 1368 "r027" + Name 1371 "r028" + Name 1375 "r029" + Name 1378 "r030" + Name 1382 "r031" + Name 1386 "r032" + Name 1390 "r033" + Name 1393 "r034" + Name 1396 "r035" + Name 1399 "r036" + Name 1404 "r037" + Name 1407 "r038" + Name 1414 "r039" + Name 1417 "r049" + Name 1422 "r041" + Name 1425 "r042" + Name 1429 "r043" + Name 1432 "r044" + Name 1437 "r046" + Name 1444 "r000" + Name 1449 "r001" + Name 1454 "r003" + Name 1458 "r004" + Name 1461 "r005" + Name 1464 "r006" + Name 1468 "r007" + Name 1478 "r008" + Name 1483 "r009" + Name 1486 "r010" + Name 1489 "r011" + Name 1492 "r012" + Name 1495 "r013" + Name 1498 "r014" + Name 1501 "r015" + Name 1504 "r016" + Name 1507 "r017" + Name 1510 "r018" + Name 1513 "r019" + Name 1516 "R020" + Name 1519 "r021" + Name 1522 "r022" + Name 1538 "r023" + Name 1541 "r025" + Name 1544 "r026" + Name 1548 "r026a" + Name 1553 "r027" + Name 1556 "r028" + Name 1560 "r029" + Name 1563 "r030" + Name 1567 "r031" + Name 1571 "r032" + Name 1575 "r033" + Name 1578 "r034" + Name 1581 "r035" + Name 1584 "r036" + Name 1589 "r037" + Name 1592 "r038" + Name 1599 "r039" + Name 1602 "r049" + Name 1607 "r041" + Name 1610 "r042" + Name 1614 "r043" + Name 1617 "r044" + Name 1622 "r046" + Name 1629 "r0" + Name 1633 "r1" + Name 1637 "r2" + Name 1641 "r3" + Name 1645 "r4" + Name 1649 "r5" + Name 1653 "r6" + Name 1657 "r7" + Name 1661 "r8" + Name 1665 "r0" + Name 1669 "r1" + Name 1673 "r2" + Name 1677 "r3" + Name 1681 "r4" + Name 1685 "r5" + Name 1689 "r6" + Name 1693 "r7" + Name 1697 "r8" + Name 1701 "r0" + Name 1705 "r1" + Name 1709 "r2" + Name 1713 "r3" + Name 1717 "r4" + Name 1721 "r5" + Name 1725 "r6" + Name 1729 "r7" + Name 1733 "r8" + Name 1737 "r00" + Name 1741 "r01" + Name 1745 "r02" + Name 1749 "r03" + Name 1753 "r04" + Name 1757 "r05" + Name 1761 "r06" + Name 1765 "r07" + Name 1769 "r08" + Name 1773 "r09" + Name 1777 "r10" + Name 1781 "r11" + Name 1785 "r12" + Name 1789 "r13" + Name 1793 "r14" + Name 1797 "r15" + Name 1801 "r16" + Name 1806 "ps_output" + Name 1813 "@entryPointOutput.color" + Name 1817 "gs_ua" + Name 1818 "gs_ub" + Name 1819 "gs_uc" + Name 1821 "gs_ua2" + Name 1822 "gs_ub2" + Name 1823 "gs_uc2" + Name 1825 "gs_ua3" + Name 1826 "gs_ub3" + Name 1827 "gs_uc3" + Name 1829 "gs_ua4" + Name 1830 "gs_ub4" + Name 1831 "gs_uc4" + Decorate 1813(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypePointer Function 6(float) 8: TypeInt 32 0 9: TypePointer Function 8(int) - 10: TypeFunction 6(float) 7(ptr) 7(ptr) 7(ptr) 9(ptr) 9(ptr) - 18: TypeFunction 6(float) 7(ptr) 7(ptr) 7(ptr) - 24: TypeVector 6(float) 2 - 25: TypePointer Function 24(fvec2) - 26: TypeVector 8(int) 2 - 27: TypePointer Function 26(ivec2) - 28: TypeFunction 24(fvec2) 25(ptr) 25(ptr) 25(ptr) 27(ptr) 27(ptr) - 36: TypeVector 6(float) 3 - 37: TypePointer Function 36(fvec3) - 38: TypeVector 8(int) 3 - 39: TypePointer Function 38(ivec3) - 40: TypeFunction 36(fvec3) 37(ptr) 37(ptr) 37(ptr) 39(ptr) 39(ptr) - 48: TypeVector 6(float) 4 - 49: TypePointer Function 48(fvec4) - 50: TypeVector 8(int) 4 - 51: TypePointer Function 50(ivec4) - 52: TypeFunction 48(fvec4) 49(ptr) 49(ptr) 49(ptr) 51(ptr) 51(ptr) - 60: TypeMatrix 24(fvec2) 2 - 61: TypePointer Function 60 - 62: TypeFunction 60 61(ptr) 61(ptr) 61(ptr) - 68: TypeMatrix 36(fvec3) 3 - 69: TypePointer Function 68 - 70: TypeFunction 68 69(ptr) 69(ptr) 69(ptr) - 76: TypeMatrix 48(fvec4) 4 - 77: TypePointer Function 76 - 78: TypeFunction 76 77(ptr) 77(ptr) 77(ptr) - 84: TypeFunction 2 7(ptr) 7(ptr) 25(ptr) 25(ptr) 61(ptr) 61(ptr) - 93: TypeFunction 2 7(ptr) 7(ptr) 37(ptr) 37(ptr) 69(ptr) 69(ptr) - 102: TypeFunction 2 7(ptr) 7(ptr) 49(ptr) 49(ptr) 77(ptr) 77(ptr) - 111: TypeMatrix 36(fvec3) 2 - 112: TypePointer Function 111 - 113: TypeMatrix 24(fvec2) 3 + 10: TypeInt 32 1 + 11: TypePointer Function 10(int) + 12: TypeFunction 6(float) 7(ptr) 7(ptr) 7(ptr) 9(ptr) 11(ptr) + 20: TypeFunction 6(float) 7(ptr) 7(ptr) 7(ptr) + 26: TypeVector 6(float) 2 + 27: TypePointer Function 26(fvec2) + 28: TypeVector 8(int) 2 + 29: TypePointer Function 28(ivec2) + 30: TypeFunction 26(fvec2) 27(ptr) 27(ptr) 27(ptr) 29(ptr) 29(ptr) + 38: TypeVector 6(float) 3 + 39: TypePointer Function 38(fvec3) + 40: TypeVector 8(int) 3 + 41: TypePointer Function 40(ivec3) + 42: TypeFunction 38(fvec3) 39(ptr) 39(ptr) 39(ptr) 41(ptr) 41(ptr) + 50: TypeVector 6(float) 4 + 51: TypePointer Function 50(fvec4) + 52: TypeVector 8(int) 4 + 53: TypePointer Function 52(ivec4) + 54: TypeFunction 50(fvec4) 51(ptr) 51(ptr) 51(ptr) 53(ptr) 53(ptr) + 62: TypeMatrix 26(fvec2) 2 + 63: TypePointer Function 62 + 64: TypeFunction 62 63(ptr) 63(ptr) 63(ptr) + 70: TypeMatrix 38(fvec3) 3 + 71: TypePointer Function 70 + 72: TypeFunction 70 71(ptr) 71(ptr) 71(ptr) + 78: TypeMatrix 50(fvec4) 4 + 79: TypePointer Function 78 + 80: TypeFunction 78 79(ptr) 79(ptr) 79(ptr) + 86: TypeFunction 2 7(ptr) 7(ptr) 27(ptr) 27(ptr) 63(ptr) 63(ptr) + 95: TypeFunction 2 7(ptr) 7(ptr) 39(ptr) 39(ptr) 71(ptr) 71(ptr) + 104: TypeFunction 2 7(ptr) 7(ptr) 51(ptr) 51(ptr) 79(ptr) 79(ptr) + 113: TypeMatrix 38(fvec3) 2 114: TypePointer Function 113 - 115: TypeMatrix 48(fvec4) 3 + 115: TypeMatrix 26(fvec2) 3 116: TypePointer Function 115 - 117: TypeMatrix 48(fvec4) 2 + 117: TypeMatrix 50(fvec4) 3 118: TypePointer Function 117 - 119: TypeFunction 2 7(ptr) 7(ptr) 25(ptr) 37(ptr) 112(ptr) 114(ptr) 69(ptr) 116(ptr) 118(ptr) - 131(PS_OUTPUT): TypeStruct 48(fvec4) - 132: TypeFunction 131(PS_OUTPUT) - 135: TypeBool - 136: TypePointer Function 135(bool) - 152: TypeInt 32 1 - 153: TypePointer Function 152(int) - 179: 6(float) Constant 0 - 191: 152(int) Constant 7 - 260: 6(float) Constant 1050288283 - 281: 6(float) Constant 1065353216 - 285: 152(int) Constant 2 - 350: TypeVector 152(int) 2 - 351: TypePointer Function 350(ivec2) - 377: 24(fvec2) ConstantComposite 179 179 - 378: TypeVector 135(bool) 2 - 391: 152(int) Constant 3 - 392: 350(ivec2) ConstantComposite 191 391 - 435: 8(int) Constant 7 - 436: 8(int) Constant 8 - 437: 26(ivec2) ConstantComposite 435 436 - 454: TypePointer Function 378(bvec2) - 512: 6(float) Constant 1073741824 - 515: 8(int) Constant 1 - 516: 8(int) Constant 2 - 517: 26(ivec2) ConstantComposite 515 516 - 564: 24(fvec2) ConstantComposite 281 512 - 582: TypeVector 152(int) 3 - 583: TypePointer Function 582(ivec3) - 609: 36(fvec3) ConstantComposite 179 179 179 - 610: TypeVector 135(bool) 3 - 623: 8(int) Constant 3 - 624: 8(int) Constant 5 - 625: 38(ivec3) ConstantComposite 435 623 624 - 672: 8(int) Constant 4 - 673: 38(ivec3) ConstantComposite 516 623 672 - 690: TypePointer Function 610(bvec3) - 709: 6(float) Constant 1050253722 - 756: 38(ivec3) ConstantComposite 515 516 623 - 803: 6(float) Constant 1077936128 - 804: 36(fvec3) ConstantComposite 281 512 803 - 822: TypeVector 152(int) 4 - 823: TypePointer Function 822(ivec4) - 849: 48(fvec4) ConstantComposite 179 179 179 179 - 850: TypeVector 135(bool) 4 - 863: 50(ivec4) ConstantComposite 435 623 624 516 - 917: 8(int) Constant 9 - 918: 8(int) Constant 10 - 919: 50(ivec4) ConstantComposite 435 436 917 918 - 936: TypePointer Function 850(bvec4) - 996: 50(ivec4) ConstantComposite 515 516 623 672 - 1043: 6(float) Constant 1082130432 - 1044: 48(fvec4) ConstantComposite 281 512 803 1043 - 1072: 60 ConstantComposite 377 377 - 1073: TypeMatrix 378(bvec2) 2 - 1220: 24(fvec2) ConstantComposite 512 512 - 1221: 60 ConstantComposite 1220 1220 - 1249: 68 ConstantComposite 609 609 609 - 1250: TypeMatrix 610(bvec3) 3 - 1400: 36(fvec3) ConstantComposite 803 803 803 - 1401: 68 ConstantComposite 1400 1400 1400 - 1429: 76 ConstantComposite 849 849 849 849 - 1430: TypeMatrix 850(bvec4) 4 - 1583: 48(fvec4) ConstantComposite 1043 1043 1043 1043 - 1584: 76 ConstantComposite 1583 1583 1583 1583 - 1763: TypePointer Function 131(PS_OUTPUT) - 1765: 152(int) Constant 0 - 1766: 48(fvec4) ConstantComposite 281 281 281 281 - 1771: TypePointer Output 48(fvec4) - 1772(color): 1771(ptr) Variable Output - 1775: TypePointer Workgroup 8(int) - 1776(gs_ua): 1775(ptr) Variable Workgroup - 1777(gs_ub): 1775(ptr) Variable Workgroup - 1778(gs_uc): 1775(ptr) Variable Workgroup - 1779: TypePointer Workgroup 26(ivec2) - 1780(gs_ua2): 1779(ptr) Variable Workgroup - 1781(gs_ub2): 1779(ptr) Variable Workgroup - 1782(gs_uc2): 1779(ptr) Variable Workgroup - 1783: TypePointer Workgroup 38(ivec3) - 1784(gs_ua3): 1783(ptr) Variable Workgroup - 1785(gs_ub3): 1783(ptr) Variable Workgroup - 1786(gs_uc3): 1783(ptr) Variable Workgroup - 1787: TypePointer Workgroup 50(ivec4) - 1788(gs_ua4): 1787(ptr) Variable Workgroup - 1789(gs_ub4): 1787(ptr) Variable Workgroup - 1790(gs_uc4): 1787(ptr) Variable Workgroup + 119: TypeMatrix 50(fvec4) 2 + 120: TypePointer Function 119 + 121: TypeFunction 2 7(ptr) 7(ptr) 27(ptr) 39(ptr) 114(ptr) 116(ptr) 71(ptr) 118(ptr) 120(ptr) + 133(PS_OUTPUT): TypeStruct 50(fvec4) + 134: TypeFunction 133(PS_OUTPUT) + 137: TypeBool + 138: TypePointer Function 137(bool) + 141: 6(float) Constant 0 + 187: 10(int) Constant 0 + 199: 10(int) Constant 7 + 268: 6(float) Constant 1050288283 + 289: 6(float) Constant 1065353216 + 293: 10(int) Constant 2 + 345: TypeVector 137(bool) 2 + 346: 26(fvec2) ConstantComposite 141 141 + 362: TypeVector 10(int) 2 + 363: TypePointer Function 362(ivec2) + 395: 8(int) Constant 0 + 396: 28(ivec2) ConstantComposite 395 395 + 409: 10(int) Constant 3 + 410: 362(ivec2) ConstantComposite 199 409 + 453: 8(int) Constant 7 + 454: 8(int) Constant 8 + 455: 28(ivec2) ConstantComposite 453 454 + 472: TypePointer Function 345(bvec2) + 530: 6(float) Constant 1073741824 + 533: 8(int) Constant 1 + 534: 8(int) Constant 2 + 535: 28(ivec2) ConstantComposite 533 534 + 582: 26(fvec2) ConstantComposite 289 530 + 587: TypeVector 137(bool) 3 + 588: 38(fvec3) ConstantComposite 141 141 141 + 604: TypeVector 10(int) 3 + 605: TypePointer Function 604(ivec3) + 637: 40(ivec3) ConstantComposite 395 395 395 + 650: 8(int) Constant 3 + 651: 8(int) Constant 5 + 652: 40(ivec3) ConstantComposite 453 650 651 + 699: 8(int) Constant 4 + 700: 40(ivec3) ConstantComposite 534 650 699 + 717: TypePointer Function 587(bvec3) + 736: 6(float) Constant 1050253722 + 783: 40(ivec3) ConstantComposite 533 534 650 + 830: 6(float) Constant 1077936128 + 831: 38(fvec3) ConstantComposite 289 530 830 + 836: TypeVector 137(bool) 4 + 837: 50(fvec4) ConstantComposite 141 141 141 141 + 853: TypeVector 10(int) 4 + 854: TypePointer Function 853(ivec4) + 886: 52(ivec4) ConstantComposite 395 395 395 395 + 899: 52(ivec4) ConstantComposite 453 650 651 534 + 953: 8(int) Constant 9 + 954: 8(int) Constant 10 + 955: 52(ivec4) ConstantComposite 453 454 953 954 + 972: TypePointer Function 836(bvec4) + 1032: 52(ivec4) ConstantComposite 533 534 650 699 + 1079: 6(float) Constant 1082130432 + 1080: 50(fvec4) ConstantComposite 289 530 830 1079 + 1085: TypeMatrix 345(bvec2) 2 + 1111: 62 ConstantComposite 346 346 + 1258: 26(fvec2) ConstantComposite 530 530 + 1259: 62 ConstantComposite 1258 1258 + 1264: TypeMatrix 587(bvec3) 3 + 1290: 70 ConstantComposite 588 588 588 + 1440: 38(fvec3) ConstantComposite 830 830 830 + 1441: 70 ConstantComposite 1440 1440 1440 + 1446: TypeMatrix 836(bvec4) 4 + 1472: 78 ConstantComposite 837 837 837 837 + 1625: 50(fvec4) ConstantComposite 1079 1079 1079 1079 + 1626: 78 ConstantComposite 1625 1625 1625 1625 + 1805: TypePointer Function 133(PS_OUTPUT) + 1807: 50(fvec4) ConstantComposite 289 289 289 289 + 1812: TypePointer Output 50(fvec4) +1813(@entryPointOutput.color): 1812(ptr) Variable Output + 1816: TypePointer Workgroup 8(int) + 1817(gs_ua): 1816(ptr) Variable Workgroup + 1818(gs_ub): 1816(ptr) Variable Workgroup + 1819(gs_uc): 1816(ptr) Variable Workgroup + 1820: TypePointer Workgroup 28(ivec2) + 1821(gs_ua2): 1820(ptr) Variable Workgroup + 1822(gs_ub2): 1820(ptr) Variable Workgroup + 1823(gs_uc2): 1820(ptr) Variable Workgroup + 1824: TypePointer Workgroup 40(ivec3) + 1825(gs_ua3): 1824(ptr) Variable Workgroup + 1826(gs_ub3): 1824(ptr) Variable Workgroup + 1827(gs_uc3): 1824(ptr) Variable Workgroup + 1828: TypePointer Workgroup 52(ivec4) + 1829(gs_ua4): 1828(ptr) Variable Workgroup + 1830(gs_ub4): 1828(ptr) Variable Workgroup + 1831(gs_uc4): 1828(ptr) Variable Workgroup 4(main): 2 Function None 3 5: Label - 1773:131(PS_OUTPUT) FunctionCall 133(@main() - 1774: 48(fvec4) CompositeExtract 1773 0 - Store 1772(color) 1774 + 1814:133(PS_OUTPUT) FunctionCall 135(@main() + 1815: 50(fvec4) CompositeExtract 1814 0 + Store 1813(@entryPointOutput.color) 1815 Return FunctionEnd -16(PixelShaderFunctionS(f1;f1;f1;u1;u1;): 6(float) Function None 10 - 11(inF0): 7(ptr) FunctionParameter - 12(inF1): 7(ptr) FunctionParameter - 13(inF2): 7(ptr) FunctionParameter - 14(inU0): 9(ptr) FunctionParameter - 15(inU1): 9(ptr) FunctionParameter - 17: Label - 137(r000): 136(ptr) Variable Function - 140(r001): 7(ptr) Variable Function - 143(r002): 7(ptr) Variable Function - 146(r003): 136(ptr) Variable Function - 149(r004): 7(ptr) Variable Function - 154(r005): 153(ptr) Variable Function - 157(r006): 9(ptr) Variable Function - 160(r007): 7(ptr) Variable Function - 163(r009): 7(ptr) Variable Function - 166(r010): 7(ptr) Variable Function - 170(r011): 7(ptr) Variable Function - 173(r012): 7(ptr) Variable Function - 184(r014): 7(ptr) Variable Function - 187(r015): 7(ptr) Variable Function - 190(r016): 153(ptr) Variable Function - 193(r017): 7(ptr) Variable Function - 196(r018): 7(ptr) Variable Function - 199(r019): 7(ptr) Variable Function - 202(r020): 7(ptr) Variable Function - 205(r021): 7(ptr) Variable Function - 208(r022): 7(ptr) Variable Function - 211(r023): 7(ptr) Variable Function - 214(r027): 7(ptr) Variable Function - 217(r028): 7(ptr) Variable Function - 220(r029): 9(ptr) Variable Function - 223(r030): 9(ptr) Variable Function - 226(r031): 7(ptr) Variable Function - 229(r033): 7(ptr) Variable Function - 233(r034): 7(ptr) Variable Function - 236(r036): 7(ptr) Variable Function - 239(r037): 136(ptr) Variable Function - 242(r038): 136(ptr) Variable Function - 245(r039): 7(ptr) Variable Function - 249(r039a): 7(ptr) Variable Function - 254(r040): 7(ptr) Variable Function - 257(r041): 7(ptr) Variable Function - 262(r042): 7(ptr) Variable Function - 265(r043): 7(ptr) Variable Function - 269(r044): 7(ptr) Variable Function - 273(r045): 7(ptr) Variable Function - 277(r046): 7(ptr) Variable Function - 280(r047): 7(ptr) Variable Function - 284(r048): 9(ptr) Variable Function - 288(r049): 7(ptr) Variable Function - 291(r050): 7(ptr) Variable Function - 294(r051): 7(ptr) Variable Function - 297(r052): 7(ptr) Variable Function - 300(r053): 7(ptr) Variable Function - 307(r055): 7(ptr) Variable Function - 310(r056): 7(ptr) Variable Function - 315(r057): 7(ptr) Variable Function - 318(r058): 7(ptr) Variable Function - 322(r059): 7(ptr) Variable Function - 325(r060): 7(ptr) Variable Function - 328(r061): 7(ptr) Variable Function - 138: 6(float) Load 11(inF0) - 139: 135(bool) All 138 - Store 137(r000) 139 - 141: 6(float) Load 11(inF0) - 142: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 141 - Store 140(r001) 142 - 144: 6(float) Load 11(inF0) - 145: 6(float) ExtInst 1(GLSL.std.450) 17(Acos) 144 - Store 143(r002) 145 - 147: 6(float) Load 11(inF0) - 148: 135(bool) Any 147 - Store 146(r003) 148 - 150: 6(float) Load 11(inF0) - 151: 6(float) ExtInst 1(GLSL.std.450) 16(Asin) 150 - Store 149(r004) 151 - 155: 6(float) Load 11(inF0) - 156: 152(int) Bitcast 155 - Store 154(r005) 156 - 158: 6(float) Load 11(inF0) - 159: 8(int) Bitcast 158 - Store 157(r006) 159 - 161: 8(int) Load 14(inU0) - 162: 6(float) Bitcast 161 - Store 160(r007) 162 - 164: 6(float) Load 11(inF0) - 165: 6(float) ExtInst 1(GLSL.std.450) 18(Atan) 164 - Store 163(r009) 165 - 167: 6(float) Load 11(inF0) - 168: 6(float) Load 12(inF1) - 169: 6(float) ExtInst 1(GLSL.std.450) 25(Atan2) 167 168 - Store 166(r010) 169 - 171: 6(float) Load 11(inF0) - 172: 6(float) ExtInst 1(GLSL.std.450) 9(Ceil) 171 - Store 170(r011) 172 - 174: 6(float) Load 11(inF0) - 175: 6(float) Load 12(inF1) - 176: 6(float) Load 13(inF2) - 177: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 174 175 176 - Store 173(r012) 177 - 178: 6(float) Load 11(inF0) - 180: 135(bool) FOrdLessThan 178 179 - SelectionMerge 182 None - BranchConditional 180 181 182 - 181: Label +18(PixelShaderFunctionS(f1;f1;f1;u1;i1;): 6(float) Function None 12 + 13(inF0): 7(ptr) FunctionParameter + 14(inF1): 7(ptr) FunctionParameter + 15(inF2): 7(ptr) FunctionParameter + 16(inU0): 9(ptr) FunctionParameter + 17(inU1): 11(ptr) FunctionParameter + 19: Label + 139(r000): 138(ptr) Variable Function + 144(r001): 7(ptr) Variable Function + 147(r002): 7(ptr) Variable Function + 150(r003): 138(ptr) Variable Function + 154(r004): 7(ptr) Variable Function + 157(r005): 11(ptr) Variable Function + 160(r006): 9(ptr) Variable Function + 163(r007): 7(ptr) Variable Function + 166(r009): 7(ptr) Variable Function + 169(r010): 7(ptr) Variable Function + 173(r011): 7(ptr) Variable Function + 176(r012): 7(ptr) Variable Function + 192(r014): 7(ptr) Variable Function + 195(r015): 7(ptr) Variable Function + 198(r016): 11(ptr) Variable Function + 201(r017): 7(ptr) Variable Function + 204(r018): 7(ptr) Variable Function + 207(r019): 7(ptr) Variable Function + 210(r020): 7(ptr) Variable Function + 213(r021): 7(ptr) Variable Function + 216(r022): 7(ptr) Variable Function + 219(r023): 7(ptr) Variable Function + 222(r027): 7(ptr) Variable Function + 225(r028): 7(ptr) Variable Function + 228(r029): 9(ptr) Variable Function + 231(r030): 9(ptr) Variable Function + 234(r031): 7(ptr) Variable Function + 237(r033): 7(ptr) Variable Function + 241(r034): 7(ptr) Variable Function + 244(r036): 7(ptr) Variable Function + 247(r037): 138(ptr) Variable Function + 250(r038): 138(ptr) Variable Function + 253(r039): 7(ptr) Variable Function + 257(r039a): 7(ptr) Variable Function + 262(r040): 7(ptr) Variable Function + 265(r041): 7(ptr) Variable Function + 270(r042): 7(ptr) Variable Function + 273(r043): 7(ptr) Variable Function + 277(r044): 7(ptr) Variable Function + 281(r045): 7(ptr) Variable Function + 285(r046): 7(ptr) Variable Function + 288(r047): 7(ptr) Variable Function + 292(r048): 9(ptr) Variable Function + 296(r049): 7(ptr) Variable Function + 299(r050): 7(ptr) Variable Function + 302(r051): 7(ptr) Variable Function + 305(r052): 7(ptr) Variable Function + 308(r053): 7(ptr) Variable Function + 315(r055): 7(ptr) Variable Function + 318(r056): 7(ptr) Variable Function + 323(r057): 7(ptr) Variable Function + 326(r058): 7(ptr) Variable Function + 330(r059): 7(ptr) Variable Function + 333(r060): 7(ptr) Variable Function + 336(r061): 7(ptr) Variable Function + 140: 6(float) Load 13(inF0) + 142: 137(bool) FOrdNotEqual 140 141 + 143: 137(bool) All 142 + Store 139(r000) 143 + 145: 6(float) Load 13(inF0) + 146: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 145 + Store 144(r001) 146 + 148: 6(float) Load 13(inF0) + 149: 6(float) ExtInst 1(GLSL.std.450) 17(Acos) 148 + Store 147(r002) 149 + 151: 6(float) Load 13(inF0) + 152: 137(bool) FOrdNotEqual 151 141 + 153: 137(bool) Any 152 + Store 150(r003) 153 + 155: 6(float) Load 13(inF0) + 156: 6(float) ExtInst 1(GLSL.std.450) 16(Asin) 155 + Store 154(r004) 156 + 158: 6(float) Load 13(inF0) + 159: 10(int) Bitcast 158 + Store 157(r005) 159 + 161: 10(int) Load 17(inU1) + 162: 8(int) Bitcast 161 + Store 160(r006) 162 + 164: 8(int) Load 16(inU0) + 165: 6(float) Bitcast 164 + Store 163(r007) 165 + 167: 6(float) Load 13(inF0) + 168: 6(float) ExtInst 1(GLSL.std.450) 18(Atan) 167 + Store 166(r009) 168 + 170: 6(float) Load 13(inF0) + 171: 6(float) Load 14(inF1) + 172: 6(float) ExtInst 1(GLSL.std.450) 25(Atan2) 170 171 + Store 169(r010) 172 + 174: 6(float) Load 13(inF0) + 175: 6(float) ExtInst 1(GLSL.std.450) 9(Ceil) 174 + Store 173(r011) 175 + 177: 6(float) Load 13(inF0) + 178: 6(float) Load 14(inF1) + 179: 6(float) Load 15(inF2) + 180: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 177 178 179 + Store 176(r012) 180 + 181: 6(float) Load 13(inF0) + 182: 137(bool) FOrdLessThan 181 141 + SelectionMerge 184 None + BranchConditional 182 183 184 + 183: Label Kill - 182: Label - 185: 6(float) Load 11(inF0) - 186: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 185 - Store 184(r014) 186 - 188: 6(float) Load 11(inF0) - 189: 6(float) ExtInst 1(GLSL.std.450) 20(Cosh) 188 - Store 187(r015) 189 - 192: 152(int) BitCount 191 - Store 190(r016) 192 - 194: 6(float) Load 11(inF0) - 195: 6(float) DPdx 194 - Store 193(r017) 195 - 197: 6(float) Load 11(inF0) - 198: 6(float) DPdxCoarse 197 - Store 196(r018) 198 - 200: 6(float) Load 11(inF0) - 201: 6(float) DPdxFine 200 - Store 199(r019) 201 - 203: 6(float) Load 11(inF0) - 204: 6(float) DPdy 203 - Store 202(r020) 204 - 206: 6(float) Load 11(inF0) - 207: 6(float) DPdyCoarse 206 - Store 205(r021) 207 - 209: 6(float) Load 11(inF0) - 210: 6(float) DPdyFine 209 - Store 208(r022) 210 - 212: 6(float) Load 11(inF0) - 213: 6(float) ExtInst 1(GLSL.std.450) 12(Degrees) 212 - Store 211(r023) 213 - 215: 6(float) Load 11(inF0) - 216: 6(float) ExtInst 1(GLSL.std.450) 27(Exp) 215 - Store 214(r027) 216 - 218: 6(float) Load 11(inF0) - 219: 6(float) ExtInst 1(GLSL.std.450) 29(Exp2) 218 - Store 217(r028) 219 - 221: 152(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 191 - 222: 8(int) Bitcast 221 - Store 220(r029) 222 - 224: 152(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 191 - 225: 8(int) Bitcast 224 - Store 223(r030) 225 - 227: 6(float) Load 11(inF0) - 228: 6(float) ExtInst 1(GLSL.std.450) 8(Floor) 227 - Store 226(r031) 228 - 230: 6(float) Load 11(inF0) - 231: 6(float) Load 12(inF1) - 232: 6(float) FMod 230 231 - Store 229(r033) 232 - 234: 6(float) Load 11(inF0) - 235: 6(float) ExtInst 1(GLSL.std.450) 10(Fract) 234 - Store 233(r034) 235 - 237: 6(float) Load 11(inF0) - 238: 6(float) Fwidth 237 - Store 236(r036) 238 - 240: 6(float) Load 11(inF0) - 241: 135(bool) IsInf 240 - Store 239(r037) 241 - 243: 6(float) Load 11(inF0) - 244: 135(bool) IsNan 243 - Store 242(r038) 244 - 246: 6(float) Load 11(inF0) - 247: 6(float) Load 12(inF1) - 248: 6(float) ExtInst 1(GLSL.std.450) 53(Ldexp) 246 247 - Store 245(r039) 248 - 250: 6(float) Load 11(inF0) - 251: 6(float) Load 12(inF1) - 252: 6(float) Load 13(inF2) - 253: 6(float) ExtInst 1(GLSL.std.450) 46(FMix) 250 251 252 - Store 249(r039a) 253 - 255: 6(float) Load 11(inF0) - 256: 6(float) ExtInst 1(GLSL.std.450) 28(Log) 255 - Store 254(r040) 256 - 258: 6(float) Load 11(inF0) - 259: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 258 - 261: 6(float) FMul 259 260 - Store 257(r041) 261 - 263: 6(float) Load 11(inF0) - 264: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 263 - Store 262(r042) 264 - 266: 6(float) Load 11(inF0) - 267: 6(float) Load 12(inF1) - 268: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 266 267 - Store 265(r043) 268 - 270: 6(float) Load 11(inF0) - 271: 6(float) Load 12(inF1) - 272: 6(float) ExtInst 1(GLSL.std.450) 37(FMin) 270 271 - Store 269(r044) 272 - 274: 6(float) Load 11(inF0) - 275: 6(float) Load 12(inF1) - 276: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 274 275 - Store 273(r045) 276 - 278: 6(float) Load 11(inF0) - 279: 6(float) ExtInst 1(GLSL.std.450) 11(Radians) 278 - Store 277(r046) 279 - 282: 6(float) Load 11(inF0) - 283: 6(float) FDiv 281 282 - Store 280(r047) 283 - 286: 152(int) BitReverse 285 - 287: 8(int) Bitcast 286 - Store 284(r048) 287 - 289: 6(float) Load 11(inF0) - 290: 6(float) ExtInst 1(GLSL.std.450) 2(RoundEven) 289 - Store 288(r049) 290 - 292: 6(float) Load 11(inF0) - 293: 6(float) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 292 - Store 291(r050) 293 - 295: 6(float) Load 11(inF0) - 296: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 295 179 281 - Store 294(r051) 296 - 298: 6(float) Load 11(inF0) - 299: 6(float) ExtInst 1(GLSL.std.450) 6(FSign) 298 - Store 297(r052) 299 - 301: 6(float) Load 11(inF0) - 302: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 301 - Store 300(r053) 302 - 303: 6(float) Load 11(inF0) - 304: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 303 - Store 12(inF1) 304 - 305: 6(float) Load 11(inF0) - 306: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 305 - Store 13(inF2) 306 - 308: 6(float) Load 11(inF0) - 309: 6(float) ExtInst 1(GLSL.std.450) 19(Sinh) 308 - Store 307(r055) 309 - 311: 6(float) Load 11(inF0) - 312: 6(float) Load 12(inF1) - 313: 6(float) Load 13(inF2) - 314: 6(float) ExtInst 1(GLSL.std.450) 49(SmoothStep) 311 312 313 - Store 310(r056) 314 - 316: 6(float) Load 11(inF0) - 317: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 316 - Store 315(r057) 317 - 319: 6(float) Load 11(inF0) - 320: 6(float) Load 12(inF1) - 321: 6(float) ExtInst 1(GLSL.std.450) 48(Step) 319 320 - Store 318(r058) 321 - 323: 6(float) Load 11(inF0) - 324: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 323 - Store 322(r059) 324 - 326: 6(float) Load 11(inF0) - 327: 6(float) ExtInst 1(GLSL.std.450) 21(Tanh) 326 - Store 325(r060) 327 - 329: 6(float) Load 11(inF0) - 330: 6(float) ExtInst 1(GLSL.std.450) 3(Trunc) 329 - Store 328(r061) 330 - ReturnValue 179 - FunctionEnd -22(PixelShaderFunction1(vf1;vf1;vf1;): 6(float) Function None 18 - 19(inF0): 7(ptr) FunctionParameter - 20(inF1): 7(ptr) FunctionParameter - 21(inF2): 7(ptr) FunctionParameter - 23: Label - ReturnValue 179 - FunctionEnd -34(PixelShaderFunction2(vf2;vf2;vf2;vu2;vu2;): 24(fvec2) Function None 28 - 29(inF0): 25(ptr) FunctionParameter - 30(inF1): 25(ptr) FunctionParameter - 31(inF2): 25(ptr) FunctionParameter - 32(inU0): 27(ptr) FunctionParameter - 33(inU1): 27(ptr) FunctionParameter - 35: Label - 335(r000): 136(ptr) Variable Function - 338(r001): 25(ptr) Variable Function - 341(r002): 25(ptr) Variable Function - 344(r003): 136(ptr) Variable Function - 347(r004): 25(ptr) Variable Function - 352(r005): 351(ptr) Variable Function - 355(r006): 27(ptr) Variable Function - 358(r007): 25(ptr) Variable Function - 361(r009): 25(ptr) Variable Function - 364(r010): 25(ptr) Variable Function - 368(r011): 25(ptr) Variable Function - 371(r012): 25(ptr) Variable Function - 384(r013): 25(ptr) Variable Function - 387(r015): 25(ptr) Variable Function - 390(r016): 351(ptr) Variable Function - 394(r017): 25(ptr) Variable Function - 397(r018): 25(ptr) Variable Function - 400(r019): 25(ptr) Variable Function - 403(r020): 25(ptr) Variable Function - 406(r021): 25(ptr) Variable Function - 409(r022): 25(ptr) Variable Function - 412(r023): 25(ptr) Variable Function - 415(r026): 7(ptr) Variable Function - 419(r027): 7(ptr) Variable Function - 423(r028): 25(ptr) Variable Function - 426(r029): 25(ptr) Variable Function - 429(r030): 25(ptr) Variable Function - 434(r031): 27(ptr) Variable Function - 439(r032): 27(ptr) Variable Function - 441(r033): 25(ptr) Variable Function - 444(r035): 25(ptr) Variable Function - 448(r036): 25(ptr) Variable Function - 451(r038): 25(ptr) Variable Function - 455(r039): 454(ptr) Variable Function - 458(r040): 454(ptr) Variable Function - 461(r041): 25(ptr) Variable Function - 465(r039a): 25(ptr) Variable Function - 470(r042): 7(ptr) Variable Function - 473(r043): 25(ptr) Variable Function - 476(r044): 25(ptr) Variable Function - 480(r045): 25(ptr) Variable Function - 483(r046): 25(ptr) Variable Function - 487(r047): 25(ptr) Variable Function - 491(r048): 25(ptr) Variable Function - 494(r049): 25(ptr) Variable Function - 498(r050): 25(ptr) Variable Function - 501(r051): 25(ptr) Variable Function - 505(r052): 25(ptr) Variable Function - 509(r053): 25(ptr) Variable Function - 514(r054): 27(ptr) Variable Function - 519(r055): 25(ptr) Variable Function - 522(r056): 25(ptr) Variable Function - 525(r057): 25(ptr) Variable Function - 530(r058): 25(ptr) Variable Function - 533(r059): 25(ptr) Variable Function - 540(r060): 25(ptr) Variable Function - 543(r061): 25(ptr) Variable Function - 548(r062): 25(ptr) Variable Function - 551(r063): 25(ptr) Variable Function - 555(r064): 25(ptr) Variable Function - 558(r065): 25(ptr) Variable Function - 561(r066): 25(ptr) Variable Function - 336: 24(fvec2) Load 29(inF0) - 337: 135(bool) All 336 - Store 335(r000) 337 - 339: 24(fvec2) Load 29(inF0) - 340: 24(fvec2) ExtInst 1(GLSL.std.450) 4(FAbs) 339 - Store 338(r001) 340 - 342: 24(fvec2) Load 29(inF0) - 343: 24(fvec2) ExtInst 1(GLSL.std.450) 17(Acos) 342 - Store 341(r002) 343 - 345: 24(fvec2) Load 29(inF0) - 346: 135(bool) Any 345 - Store 344(r003) 346 - 348: 24(fvec2) Load 29(inF0) - 349: 24(fvec2) ExtInst 1(GLSL.std.450) 16(Asin) 348 - Store 347(r004) 349 - 353: 24(fvec2) Load 29(inF0) - 354: 350(ivec2) Bitcast 353 - Store 352(r005) 354 - 356: 24(fvec2) Load 29(inF0) - 357: 26(ivec2) Bitcast 356 - Store 355(r006) 357 - 359: 26(ivec2) Load 32(inU0) - 360: 24(fvec2) Bitcast 359 - Store 358(r007) 360 - 362: 24(fvec2) Load 29(inF0) - 363: 24(fvec2) ExtInst 1(GLSL.std.450) 18(Atan) 362 - Store 361(r009) 363 - 365: 24(fvec2) Load 29(inF0) - 366: 24(fvec2) Load 30(inF1) - 367: 24(fvec2) ExtInst 1(GLSL.std.450) 25(Atan2) 365 366 - Store 364(r010) 367 - 369: 24(fvec2) Load 29(inF0) - 370: 24(fvec2) ExtInst 1(GLSL.std.450) 9(Ceil) 369 - Store 368(r011) 370 - 372: 24(fvec2) Load 29(inF0) - 373: 24(fvec2) Load 30(inF1) - 374: 24(fvec2) Load 31(inF2) - 375: 24(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 372 373 374 - Store 371(r012) 375 - 376: 24(fvec2) Load 29(inF0) - 379: 378(bvec2) FOrdLessThan 376 377 - 380: 135(bool) Any 379 - SelectionMerge 382 None - BranchConditional 380 381 382 - 381: Label + 184: Label + 186: 10(int) Load 157(r005) + 188: 137(bool) SLessThan 186 187 + SelectionMerge 190 None + BranchConditional 188 189 190 + 189: Label Kill - 382: Label - 385: 24(fvec2) Load 29(inF0) - 386: 24(fvec2) ExtInst 1(GLSL.std.450) 14(Cos) 385 - Store 384(r013) 386 - 388: 24(fvec2) Load 29(inF0) - 389: 24(fvec2) ExtInst 1(GLSL.std.450) 20(Cosh) 388 - Store 387(r015) 389 - 393: 350(ivec2) BitCount 392 - Store 390(r016) 393 - 395: 24(fvec2) Load 29(inF0) - 396: 24(fvec2) DPdx 395 - Store 394(r017) 396 - 398: 24(fvec2) Load 29(inF0) - 399: 24(fvec2) DPdxCoarse 398 - Store 397(r018) 399 - 401: 24(fvec2) Load 29(inF0) - 402: 24(fvec2) DPdxFine 401 - Store 400(r019) 402 - 404: 24(fvec2) Load 29(inF0) - 405: 24(fvec2) DPdy 404 - Store 403(r020) 405 - 407: 24(fvec2) Load 29(inF0) - 408: 24(fvec2) DPdyCoarse 407 - Store 406(r021) 408 - 410: 24(fvec2) Load 29(inF0) - 411: 24(fvec2) DPdyFine 410 - Store 409(r022) 411 - 413: 24(fvec2) Load 29(inF0) - 414: 24(fvec2) ExtInst 1(GLSL.std.450) 12(Degrees) 413 - Store 412(r023) 414 - 416: 24(fvec2) Load 29(inF0) - 417: 24(fvec2) Load 30(inF1) - 418: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 416 417 - Store 415(r026) 418 - 420: 24(fvec2) Load 29(inF0) - 421: 24(fvec2) Load 30(inF1) - 422: 6(float) Dot 420 421 - Store 419(r027) 422 - 424: 24(fvec2) Load 29(inF0) - 425: 24(fvec2) ExtInst 1(GLSL.std.450) 27(Exp) 424 - Store 423(r028) 425 - 427: 24(fvec2) Load 29(inF0) - 428: 24(fvec2) ExtInst 1(GLSL.std.450) 29(Exp2) 427 - Store 426(r029) 428 - 430: 24(fvec2) Load 29(inF0) - 431: 24(fvec2) Load 30(inF1) - 432: 24(fvec2) Load 31(inF2) - 433: 24(fvec2) ExtInst 1(GLSL.std.450) 70(FaceForward) 430 431 432 - Store 429(r030) 433 - 438: 26(ivec2) ExtInst 1(GLSL.std.450) 75(FindUMsb) 437 - Store 434(r031) 438 - 440: 26(ivec2) ExtInst 1(GLSL.std.450) 73(FindILsb) 437 - Store 439(r032) 440 - 442: 24(fvec2) Load 29(inF0) - 443: 24(fvec2) ExtInst 1(GLSL.std.450) 8(Floor) 442 - Store 441(r033) 443 - 445: 24(fvec2) Load 29(inF0) - 446: 24(fvec2) Load 30(inF1) - 447: 24(fvec2) FMod 445 446 - Store 444(r035) 447 - 449: 24(fvec2) Load 29(inF0) - 450: 24(fvec2) ExtInst 1(GLSL.std.450) 10(Fract) 449 - Store 448(r036) 450 - 452: 24(fvec2) Load 29(inF0) - 453: 24(fvec2) Fwidth 452 - Store 451(r038) 453 - 456: 24(fvec2) Load 29(inF0) - 457: 378(bvec2) IsInf 456 - Store 455(r039) 457 - 459: 24(fvec2) Load 29(inF0) - 460: 378(bvec2) IsNan 459 - Store 458(r040) 460 - 462: 24(fvec2) Load 29(inF0) - 463: 24(fvec2) Load 30(inF1) - 464: 24(fvec2) ExtInst 1(GLSL.std.450) 53(Ldexp) 462 463 - Store 461(r041) 464 - 466: 24(fvec2) Load 29(inF0) - 467: 24(fvec2) Load 30(inF1) - 468: 24(fvec2) Load 31(inF2) - 469: 24(fvec2) ExtInst 1(GLSL.std.450) 46(FMix) 466 467 468 - Store 465(r039a) 469 - 471: 24(fvec2) Load 29(inF0) - 472: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 471 - Store 470(r042) 472 - 474: 24(fvec2) Load 29(inF0) - 475: 24(fvec2) ExtInst 1(GLSL.std.450) 28(Log) 474 - Store 473(r043) 475 - 477: 24(fvec2) Load 29(inF0) - 478: 24(fvec2) ExtInst 1(GLSL.std.450) 30(Log2) 477 - 479: 24(fvec2) VectorTimesScalar 478 260 - Store 476(r044) 479 - 481: 24(fvec2) Load 29(inF0) - 482: 24(fvec2) ExtInst 1(GLSL.std.450) 30(Log2) 481 - Store 480(r045) 482 - 484: 24(fvec2) Load 29(inF0) - 485: 24(fvec2) Load 30(inF1) - 486: 24(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 484 485 - Store 483(r046) 486 - 488: 24(fvec2) Load 29(inF0) - 489: 24(fvec2) Load 30(inF1) - 490: 24(fvec2) ExtInst 1(GLSL.std.450) 37(FMin) 488 489 - Store 487(r047) 490 - 492: 24(fvec2) Load 29(inF0) - 493: 24(fvec2) ExtInst 1(GLSL.std.450) 69(Normalize) 492 - Store 491(r048) 493 - 495: 24(fvec2) Load 29(inF0) - 496: 24(fvec2) Load 30(inF1) - 497: 24(fvec2) ExtInst 1(GLSL.std.450) 26(Pow) 495 496 - Store 494(r049) 497 - 499: 24(fvec2) Load 29(inF0) - 500: 24(fvec2) ExtInst 1(GLSL.std.450) 11(Radians) 499 - Store 498(r050) 500 - 502: 24(fvec2) Load 29(inF0) - 503: 24(fvec2) CompositeConstruct 281 281 - 504: 24(fvec2) FDiv 503 502 - Store 501(r051) 504 - 506: 24(fvec2) Load 29(inF0) - 507: 24(fvec2) Load 30(inF1) - 508: 24(fvec2) ExtInst 1(GLSL.std.450) 71(Reflect) 506 507 - Store 505(r052) 508 - 510: 24(fvec2) Load 29(inF0) - 511: 24(fvec2) Load 30(inF1) - 513: 24(fvec2) ExtInst 1(GLSL.std.450) 72(Refract) 510 511 512 - Store 509(r053) 513 - 518: 26(ivec2) BitReverse 517 - Store 514(r054) 518 - 520: 24(fvec2) Load 29(inF0) - 521: 24(fvec2) ExtInst 1(GLSL.std.450) 2(RoundEven) 520 - Store 519(r055) 521 - 523: 24(fvec2) Load 29(inF0) - 524: 24(fvec2) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 523 - Store 522(r056) 524 - 526: 24(fvec2) Load 29(inF0) - 527: 24(fvec2) CompositeConstruct 179 179 - 528: 24(fvec2) CompositeConstruct 281 281 - 529: 24(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 526 527 528 - Store 525(r057) 529 - 531: 24(fvec2) Load 29(inF0) - 532: 24(fvec2) ExtInst 1(GLSL.std.450) 6(FSign) 531 - Store 530(r058) 532 - 534: 24(fvec2) Load 29(inF0) - 535: 24(fvec2) ExtInst 1(GLSL.std.450) 13(Sin) 534 - Store 533(r059) 535 - 536: 24(fvec2) Load 29(inF0) - 537: 24(fvec2) ExtInst 1(GLSL.std.450) 13(Sin) 536 - Store 30(inF1) 537 - 538: 24(fvec2) Load 29(inF0) - 539: 24(fvec2) ExtInst 1(GLSL.std.450) 14(Cos) 538 - Store 31(inF2) 539 - 541: 24(fvec2) Load 29(inF0) - 542: 24(fvec2) ExtInst 1(GLSL.std.450) 19(Sinh) 541 - Store 540(r060) 542 - 544: 24(fvec2) Load 29(inF0) - 545: 24(fvec2) Load 30(inF1) - 546: 24(fvec2) Load 31(inF2) - 547: 24(fvec2) ExtInst 1(GLSL.std.450) 49(SmoothStep) 544 545 546 - Store 543(r061) 547 - 549: 24(fvec2) Load 29(inF0) - 550: 24(fvec2) ExtInst 1(GLSL.std.450) 31(Sqrt) 549 - Store 548(r062) 550 - 552: 24(fvec2) Load 29(inF0) - 553: 24(fvec2) Load 30(inF1) - 554: 24(fvec2) ExtInst 1(GLSL.std.450) 48(Step) 552 553 - Store 551(r063) 554 - 556: 24(fvec2) Load 29(inF0) - 557: 24(fvec2) ExtInst 1(GLSL.std.450) 15(Tan) 556 - Store 555(r064) 557 - 559: 24(fvec2) Load 29(inF0) - 560: 24(fvec2) ExtInst 1(GLSL.std.450) 21(Tanh) 559 - Store 558(r065) 560 - 562: 24(fvec2) Load 29(inF0) - 563: 24(fvec2) ExtInst 1(GLSL.std.450) 3(Trunc) 562 - Store 561(r066) 563 - ReturnValue 564 + 190: Label + 193: 6(float) Load 13(inF0) + 194: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 193 + Store 192(r014) 194 + 196: 6(float) Load 13(inF0) + 197: 6(float) ExtInst 1(GLSL.std.450) 20(Cosh) 196 + Store 195(r015) 197 + 200: 10(int) BitCount 199 + Store 198(r016) 200 + 202: 6(float) Load 13(inF0) + 203: 6(float) DPdx 202 + Store 201(r017) 203 + 205: 6(float) Load 13(inF0) + 206: 6(float) DPdxCoarse 205 + Store 204(r018) 206 + 208: 6(float) Load 13(inF0) + 209: 6(float) DPdxFine 208 + Store 207(r019) 209 + 211: 6(float) Load 13(inF0) + 212: 6(float) DPdy 211 + Store 210(r020) 212 + 214: 6(float) Load 13(inF0) + 215: 6(float) DPdyCoarse 214 + Store 213(r021) 215 + 217: 6(float) Load 13(inF0) + 218: 6(float) DPdyFine 217 + Store 216(r022) 218 + 220: 6(float) Load 13(inF0) + 221: 6(float) ExtInst 1(GLSL.std.450) 12(Degrees) 220 + Store 219(r023) 221 + 223: 6(float) Load 13(inF0) + 224: 6(float) ExtInst 1(GLSL.std.450) 27(Exp) 223 + Store 222(r027) 224 + 226: 6(float) Load 13(inF0) + 227: 6(float) ExtInst 1(GLSL.std.450) 29(Exp2) 226 + Store 225(r028) 227 + 229: 10(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 199 + 230: 8(int) Bitcast 229 + Store 228(r029) 230 + 232: 10(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 199 + 233: 8(int) Bitcast 232 + Store 231(r030) 233 + 235: 6(float) Load 13(inF0) + 236: 6(float) ExtInst 1(GLSL.std.450) 8(Floor) 235 + Store 234(r031) 236 + 238: 6(float) Load 13(inF0) + 239: 6(float) Load 14(inF1) + 240: 6(float) FMod 238 239 + Store 237(r033) 240 + 242: 6(float) Load 13(inF0) + 243: 6(float) ExtInst 1(GLSL.std.450) 10(Fract) 242 + Store 241(r034) 243 + 245: 6(float) Load 13(inF0) + 246: 6(float) Fwidth 245 + Store 244(r036) 246 + 248: 6(float) Load 13(inF0) + 249: 137(bool) IsInf 248 + Store 247(r037) 249 + 251: 6(float) Load 13(inF0) + 252: 137(bool) IsNan 251 + Store 250(r038) 252 + 254: 6(float) Load 13(inF0) + 255: 6(float) Load 14(inF1) + 256: 6(float) ExtInst 1(GLSL.std.450) 53(Ldexp) 254 255 + Store 253(r039) 256 + 258: 6(float) Load 13(inF0) + 259: 6(float) Load 14(inF1) + 260: 6(float) Load 15(inF2) + 261: 6(float) ExtInst 1(GLSL.std.450) 46(FMix) 258 259 260 + Store 257(r039a) 261 + 263: 6(float) Load 13(inF0) + 264: 6(float) ExtInst 1(GLSL.std.450) 28(Log) 263 + Store 262(r040) 264 + 266: 6(float) Load 13(inF0) + 267: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 266 + 269: 6(float) FMul 267 268 + Store 265(r041) 269 + 271: 6(float) Load 13(inF0) + 272: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 271 + Store 270(r042) 272 + 274: 6(float) Load 13(inF0) + 275: 6(float) Load 14(inF1) + 276: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 274 275 + Store 273(r043) 276 + 278: 6(float) Load 13(inF0) + 279: 6(float) Load 14(inF1) + 280: 6(float) ExtInst 1(GLSL.std.450) 37(FMin) 278 279 + Store 277(r044) 280 + 282: 6(float) Load 13(inF0) + 283: 6(float) Load 14(inF1) + 284: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 282 283 + Store 281(r045) 284 + 286: 6(float) Load 13(inF0) + 287: 6(float) ExtInst 1(GLSL.std.450) 11(Radians) 286 + Store 285(r046) 287 + 290: 6(float) Load 13(inF0) + 291: 6(float) FDiv 289 290 + Store 288(r047) 291 + 294: 10(int) BitReverse 293 + 295: 8(int) Bitcast 294 + Store 292(r048) 295 + 297: 6(float) Load 13(inF0) + 298: 6(float) ExtInst 1(GLSL.std.450) 2(RoundEven) 297 + Store 296(r049) 298 + 300: 6(float) Load 13(inF0) + 301: 6(float) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 300 + Store 299(r050) 301 + 303: 6(float) Load 13(inF0) + 304: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 303 141 289 + Store 302(r051) 304 + 306: 6(float) Load 13(inF0) + 307: 6(float) ExtInst 1(GLSL.std.450) 6(FSign) 306 + Store 305(r052) 307 + 309: 6(float) Load 13(inF0) + 310: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 309 + Store 308(r053) 310 + 311: 6(float) Load 13(inF0) + 312: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 311 + Store 14(inF1) 312 + 313: 6(float) Load 13(inF0) + 314: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 313 + Store 15(inF2) 314 + 316: 6(float) Load 13(inF0) + 317: 6(float) ExtInst 1(GLSL.std.450) 19(Sinh) 316 + Store 315(r055) 317 + 319: 6(float) Load 13(inF0) + 320: 6(float) Load 14(inF1) + 321: 6(float) Load 15(inF2) + 322: 6(float) ExtInst 1(GLSL.std.450) 49(SmoothStep) 319 320 321 + Store 318(r056) 322 + 324: 6(float) Load 13(inF0) + 325: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 324 + Store 323(r057) 325 + 327: 6(float) Load 13(inF0) + 328: 6(float) Load 14(inF1) + 329: 6(float) ExtInst 1(GLSL.std.450) 48(Step) 327 328 + Store 326(r058) 329 + 331: 6(float) Load 13(inF0) + 332: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 331 + Store 330(r059) 332 + 334: 6(float) Load 13(inF0) + 335: 6(float) ExtInst 1(GLSL.std.450) 21(Tanh) 334 + Store 333(r060) 335 + 337: 6(float) Load 13(inF0) + 338: 6(float) ExtInst 1(GLSL.std.450) 3(Trunc) 337 + Store 336(r061) 338 + ReturnValue 141 FunctionEnd -46(PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3;): 36(fvec3) Function None 40 - 41(inF0): 37(ptr) FunctionParameter - 42(inF1): 37(ptr) FunctionParameter - 43(inF2): 37(ptr) FunctionParameter - 44(inU0): 39(ptr) FunctionParameter - 45(inU1): 39(ptr) FunctionParameter - 47: Label - 567(r000): 136(ptr) Variable Function - 570(r001): 37(ptr) Variable Function - 573(r002): 37(ptr) Variable Function - 576(r003): 136(ptr) Variable Function - 579(r004): 37(ptr) Variable Function - 584(r005): 583(ptr) Variable Function - 587(r006): 39(ptr) Variable Function - 590(r007): 37(ptr) Variable Function - 593(r009): 37(ptr) Variable Function - 596(r010): 37(ptr) Variable Function - 600(r011): 37(ptr) Variable Function - 603(r012): 37(ptr) Variable Function - 616(r013): 37(ptr) Variable Function - 619(r014): 37(ptr) Variable Function - 622(r015): 39(ptr) Variable Function - 627(r016): 37(ptr) Variable Function - 631(r017): 37(ptr) Variable Function - 634(r018): 37(ptr) Variable Function - 637(r019): 37(ptr) Variable Function - 640(r020): 37(ptr) Variable Function - 643(r021): 37(ptr) Variable Function - 646(r022): 37(ptr) Variable Function - 649(r023): 37(ptr) Variable Function - 652(r024): 7(ptr) Variable Function - 656(r025): 7(ptr) Variable Function - 660(r029): 37(ptr) Variable Function - 663(r030): 37(ptr) Variable Function - 666(r031): 37(ptr) Variable Function - 671(r032): 39(ptr) Variable Function - 675(r033): 39(ptr) Variable Function - 677(r034): 37(ptr) Variable Function - 680(r036): 37(ptr) Variable Function - 684(r037): 37(ptr) Variable Function - 687(r039): 37(ptr) Variable Function - 691(r040): 690(ptr) Variable Function - 694(r041): 690(ptr) Variable Function - 697(r042): 37(ptr) Variable Function - 701(r039a): 37(ptr) Variable Function - 706(r039b): 37(ptr) Variable Function - 712(r043): 7(ptr) Variable Function - 715(r044): 37(ptr) Variable Function - 718(r045): 37(ptr) Variable Function - 722(r046): 37(ptr) Variable Function - 725(r047): 37(ptr) Variable Function - 729(r048): 37(ptr) Variable Function - 733(r049): 37(ptr) Variable Function - 736(r050): 37(ptr) Variable Function - 740(r051): 37(ptr) Variable Function - 743(r052): 37(ptr) Variable Function - 747(r053): 37(ptr) Variable Function - 751(r054): 37(ptr) Variable Function - 755(r055): 39(ptr) Variable Function - 758(r056): 37(ptr) Variable Function - 761(r057): 37(ptr) Variable Function - 764(r058): 37(ptr) Variable Function - 769(r059): 37(ptr) Variable Function - 772(r060): 37(ptr) Variable Function - 779(r061): 37(ptr) Variable Function - 782(r062): 37(ptr) Variable Function - 787(r063): 37(ptr) Variable Function - 790(r064): 37(ptr) Variable Function - 794(r065): 37(ptr) Variable Function - 797(r066): 37(ptr) Variable Function - 800(r067): 37(ptr) Variable Function - 568: 36(fvec3) Load 41(inF0) - 569: 135(bool) All 568 - Store 567(r000) 569 - 571: 36(fvec3) Load 41(inF0) - 572: 36(fvec3) ExtInst 1(GLSL.std.450) 4(FAbs) 571 - Store 570(r001) 572 - 574: 36(fvec3) Load 41(inF0) - 575: 36(fvec3) ExtInst 1(GLSL.std.450) 17(Acos) 574 - Store 573(r002) 575 - 577: 36(fvec3) Load 41(inF0) - 578: 135(bool) Any 577 - Store 576(r003) 578 - 580: 36(fvec3) Load 41(inF0) - 581: 36(fvec3) ExtInst 1(GLSL.std.450) 16(Asin) 580 - Store 579(r004) 581 - 585: 36(fvec3) Load 41(inF0) - 586: 582(ivec3) Bitcast 585 - Store 584(r005) 586 - 588: 36(fvec3) Load 41(inF0) - 589: 38(ivec3) Bitcast 588 - Store 587(r006) 589 - 591: 38(ivec3) Load 44(inU0) - 592: 36(fvec3) Bitcast 591 - Store 590(r007) 592 - 594: 36(fvec3) Load 41(inF0) - 595: 36(fvec3) ExtInst 1(GLSL.std.450) 18(Atan) 594 - Store 593(r009) 595 - 597: 36(fvec3) Load 41(inF0) - 598: 36(fvec3) Load 42(inF1) - 599: 36(fvec3) ExtInst 1(GLSL.std.450) 25(Atan2) 597 598 - Store 596(r010) 599 - 601: 36(fvec3) Load 41(inF0) - 602: 36(fvec3) ExtInst 1(GLSL.std.450) 9(Ceil) 601 - Store 600(r011) 602 - 604: 36(fvec3) Load 41(inF0) - 605: 36(fvec3) Load 42(inF1) - 606: 36(fvec3) Load 43(inF2) - 607: 36(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 604 605 606 - Store 603(r012) 607 - 608: 36(fvec3) Load 41(inF0) - 611: 610(bvec3) FOrdLessThan 608 609 - 612: 135(bool) Any 611 - SelectionMerge 614 None - BranchConditional 612 613 614 - 613: Label +24(PixelShaderFunction1(vf1;vf1;vf1;): 6(float) Function None 20 + 21(inF0): 7(ptr) FunctionParameter + 22(inF1): 7(ptr) FunctionParameter + 23(inF2): 7(ptr) FunctionParameter + 25: Label + ReturnValue 141 + FunctionEnd +36(PixelShaderFunction2(vf2;vf2;vf2;vu2;vu2;): 26(fvec2) Function None 30 + 31(inF0): 27(ptr) FunctionParameter + 32(inF1): 27(ptr) FunctionParameter + 33(inF2): 27(ptr) FunctionParameter + 34(inU0): 29(ptr) FunctionParameter + 35(inU1): 29(ptr) FunctionParameter + 37: Label + 343(r000): 138(ptr) Variable Function + 349(r001): 27(ptr) Variable Function + 352(r002): 27(ptr) Variable Function + 355(r003): 138(ptr) Variable Function + 359(r004): 27(ptr) Variable Function + 364(r005): 363(ptr) Variable Function + 367(r006): 29(ptr) Variable Function + 370(r007): 27(ptr) Variable Function + 373(r009): 27(ptr) Variable Function + 376(r010): 27(ptr) Variable Function + 380(r011): 27(ptr) Variable Function + 383(r012): 27(ptr) Variable Function + 402(r013): 27(ptr) Variable Function + 405(r015): 27(ptr) Variable Function + 408(r016): 363(ptr) Variable Function + 412(r017): 27(ptr) Variable Function + 415(r018): 27(ptr) Variable Function + 418(r019): 27(ptr) Variable Function + 421(r020): 27(ptr) Variable Function + 424(r021): 27(ptr) Variable Function + 427(r022): 27(ptr) Variable Function + 430(r023): 27(ptr) Variable Function + 433(r026): 7(ptr) Variable Function + 437(r027): 7(ptr) Variable Function + 441(r028): 27(ptr) Variable Function + 444(r029): 27(ptr) Variable Function + 447(r030): 27(ptr) Variable Function + 452(r031): 29(ptr) Variable Function + 457(r032): 29(ptr) Variable Function + 459(r033): 27(ptr) Variable Function + 462(r035): 27(ptr) Variable Function + 466(r036): 27(ptr) Variable Function + 469(r038): 27(ptr) Variable Function + 473(r039): 472(ptr) Variable Function + 476(r040): 472(ptr) Variable Function + 479(r041): 27(ptr) Variable Function + 483(r039a): 27(ptr) Variable Function + 488(r042): 7(ptr) Variable Function + 491(r043): 27(ptr) Variable Function + 494(r044): 27(ptr) Variable Function + 498(r045): 27(ptr) Variable Function + 501(r046): 27(ptr) Variable Function + 505(r047): 27(ptr) Variable Function + 509(r048): 27(ptr) Variable Function + 512(r049): 27(ptr) Variable Function + 516(r050): 27(ptr) Variable Function + 519(r051): 27(ptr) Variable Function + 523(r052): 27(ptr) Variable Function + 527(r053): 27(ptr) Variable Function + 532(r054): 29(ptr) Variable Function + 537(r055): 27(ptr) Variable Function + 540(r056): 27(ptr) Variable Function + 543(r057): 27(ptr) Variable Function + 548(r058): 27(ptr) Variable Function + 551(r059): 27(ptr) Variable Function + 558(r060): 27(ptr) Variable Function + 561(r061): 27(ptr) Variable Function + 566(r062): 27(ptr) Variable Function + 569(r063): 27(ptr) Variable Function + 573(r064): 27(ptr) Variable Function + 576(r065): 27(ptr) Variable Function + 579(r066): 27(ptr) Variable Function + 344: 26(fvec2) Load 31(inF0) + 347: 345(bvec2) FOrdNotEqual 344 346 + 348: 137(bool) All 347 + Store 343(r000) 348 + 350: 26(fvec2) Load 31(inF0) + 351: 26(fvec2) ExtInst 1(GLSL.std.450) 4(FAbs) 350 + Store 349(r001) 351 + 353: 26(fvec2) Load 31(inF0) + 354: 26(fvec2) ExtInst 1(GLSL.std.450) 17(Acos) 353 + Store 352(r002) 354 + 356: 26(fvec2) Load 31(inF0) + 357: 345(bvec2) FOrdNotEqual 356 346 + 358: 137(bool) Any 357 + Store 355(r003) 358 + 360: 26(fvec2) Load 31(inF0) + 361: 26(fvec2) ExtInst 1(GLSL.std.450) 16(Asin) 360 + Store 359(r004) 361 + 365: 26(fvec2) Load 31(inF0) + 366: 362(ivec2) Bitcast 365 + Store 364(r005) 366 + 368: 26(fvec2) Load 31(inF0) + 369: 28(ivec2) Bitcast 368 + Store 367(r006) 369 + 371: 28(ivec2) Load 34(inU0) + 372: 26(fvec2) Bitcast 371 + Store 370(r007) 372 + 374: 26(fvec2) Load 31(inF0) + 375: 26(fvec2) ExtInst 1(GLSL.std.450) 18(Atan) 374 + Store 373(r009) 375 + 377: 26(fvec2) Load 31(inF0) + 378: 26(fvec2) Load 32(inF1) + 379: 26(fvec2) ExtInst 1(GLSL.std.450) 25(Atan2) 377 378 + Store 376(r010) 379 + 381: 26(fvec2) Load 31(inF0) + 382: 26(fvec2) ExtInst 1(GLSL.std.450) 9(Ceil) 381 + Store 380(r011) 382 + 384: 26(fvec2) Load 31(inF0) + 385: 26(fvec2) Load 32(inF1) + 386: 26(fvec2) Load 33(inF2) + 387: 26(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 384 385 386 + Store 383(r012) 387 + 388: 26(fvec2) Load 31(inF0) + 389: 345(bvec2) FOrdLessThan 388 346 + 390: 137(bool) Any 389 + SelectionMerge 392 None + BranchConditional 390 391 392 + 391: Label Kill - 614: Label - 617: 36(fvec3) Load 41(inF0) - 618: 36(fvec3) ExtInst 1(GLSL.std.450) 14(Cos) 617 - Store 616(r013) 618 - 620: 36(fvec3) Load 41(inF0) - 621: 36(fvec3) ExtInst 1(GLSL.std.450) 20(Cosh) 620 - Store 619(r014) 621 - 626: 38(ivec3) BitCount 625 - Store 622(r015) 626 - 628: 36(fvec3) Load 41(inF0) - 629: 36(fvec3) Load 42(inF1) - 630: 36(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 628 629 - Store 627(r016) 630 - 632: 36(fvec3) Load 41(inF0) - 633: 36(fvec3) DPdx 632 - Store 631(r017) 633 - 635: 36(fvec3) Load 41(inF0) - 636: 36(fvec3) DPdxCoarse 635 - Store 634(r018) 636 - 638: 36(fvec3) Load 41(inF0) - 639: 36(fvec3) DPdxFine 638 - Store 637(r019) 639 - 641: 36(fvec3) Load 41(inF0) - 642: 36(fvec3) DPdy 641 - Store 640(r020) 642 - 644: 36(fvec3) Load 41(inF0) - 645: 36(fvec3) DPdyCoarse 644 - Store 643(r021) 645 - 647: 36(fvec3) Load 41(inF0) - 648: 36(fvec3) DPdyFine 647 - Store 646(r022) 648 - 650: 36(fvec3) Load 41(inF0) - 651: 36(fvec3) ExtInst 1(GLSL.std.450) 12(Degrees) 650 - Store 649(r023) 651 - 653: 36(fvec3) Load 41(inF0) - 654: 36(fvec3) Load 42(inF1) - 655: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 653 654 - Store 652(r024) 655 - 657: 36(fvec3) Load 41(inF0) - 658: 36(fvec3) Load 42(inF1) - 659: 6(float) Dot 657 658 - Store 656(r025) 659 - 661: 36(fvec3) Load 41(inF0) - 662: 36(fvec3) ExtInst 1(GLSL.std.450) 27(Exp) 661 - Store 660(r029) 662 - 664: 36(fvec3) Load 41(inF0) - 665: 36(fvec3) ExtInst 1(GLSL.std.450) 29(Exp2) 664 - Store 663(r030) 665 - 667: 36(fvec3) Load 41(inF0) - 668: 36(fvec3) Load 42(inF1) - 669: 36(fvec3) Load 43(inF2) - 670: 36(fvec3) ExtInst 1(GLSL.std.450) 70(FaceForward) 667 668 669 - Store 666(r031) 670 - 674: 38(ivec3) ExtInst 1(GLSL.std.450) 75(FindUMsb) 673 - Store 671(r032) 674 - 676: 38(ivec3) ExtInst 1(GLSL.std.450) 73(FindILsb) 673 - Store 675(r033) 676 - 678: 36(fvec3) Load 41(inF0) - 679: 36(fvec3) ExtInst 1(GLSL.std.450) 8(Floor) 678 - Store 677(r034) 679 - 681: 36(fvec3) Load 41(inF0) - 682: 36(fvec3) Load 42(inF1) - 683: 36(fvec3) FMod 681 682 - Store 680(r036) 683 - 685: 36(fvec3) Load 41(inF0) - 686: 36(fvec3) ExtInst 1(GLSL.std.450) 10(Fract) 685 - Store 684(r037) 686 - 688: 36(fvec3) Load 41(inF0) - 689: 36(fvec3) Fwidth 688 - Store 687(r039) 689 - 692: 36(fvec3) Load 41(inF0) - 693: 610(bvec3) IsInf 692 - Store 691(r040) 693 - 695: 36(fvec3) Load 41(inF0) - 696: 610(bvec3) IsNan 695 - Store 694(r041) 696 - 698: 36(fvec3) Load 41(inF0) - 699: 36(fvec3) Load 42(inF1) - 700: 36(fvec3) ExtInst 1(GLSL.std.450) 53(Ldexp) 698 699 - Store 697(r042) 700 - 702: 36(fvec3) Load 41(inF0) - 703: 36(fvec3) Load 42(inF1) - 704: 36(fvec3) Load 43(inF2) - 705: 36(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 702 703 704 - Store 701(r039a) 705 - 707: 36(fvec3) Load 41(inF0) - 708: 36(fvec3) Load 42(inF1) - 710: 36(fvec3) CompositeConstruct 709 709 709 - 711: 36(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 707 708 710 - Store 706(r039b) 711 - 713: 36(fvec3) Load 41(inF0) - 714: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 713 - Store 712(r043) 714 - 716: 36(fvec3) Load 41(inF0) - 717: 36(fvec3) ExtInst 1(GLSL.std.450) 28(Log) 716 - Store 715(r044) 717 - 719: 36(fvec3) Load 41(inF0) - 720: 36(fvec3) ExtInst 1(GLSL.std.450) 30(Log2) 719 - 721: 36(fvec3) VectorTimesScalar 720 260 - Store 718(r045) 721 - 723: 36(fvec3) Load 41(inF0) - 724: 36(fvec3) ExtInst 1(GLSL.std.450) 30(Log2) 723 - Store 722(r046) 724 - 726: 36(fvec3) Load 41(inF0) - 727: 36(fvec3) Load 42(inF1) - 728: 36(fvec3) ExtInst 1(GLSL.std.450) 40(FMax) 726 727 - Store 725(r047) 728 - 730: 36(fvec3) Load 41(inF0) - 731: 36(fvec3) Load 42(inF1) - 732: 36(fvec3) ExtInst 1(GLSL.std.450) 37(FMin) 730 731 - Store 729(r048) 732 - 734: 36(fvec3) Load 41(inF0) - 735: 36(fvec3) ExtInst 1(GLSL.std.450) 69(Normalize) 734 - Store 733(r049) 735 - 737: 36(fvec3) Load 41(inF0) - 738: 36(fvec3) Load 42(inF1) - 739: 36(fvec3) ExtInst 1(GLSL.std.450) 26(Pow) 737 738 - Store 736(r050) 739 - 741: 36(fvec3) Load 41(inF0) - 742: 36(fvec3) ExtInst 1(GLSL.std.450) 11(Radians) 741 - Store 740(r051) 742 - 744: 36(fvec3) Load 41(inF0) - 745: 36(fvec3) CompositeConstruct 281 281 281 - 746: 36(fvec3) FDiv 745 744 - Store 743(r052) 746 - 748: 36(fvec3) Load 41(inF0) - 749: 36(fvec3) Load 42(inF1) - 750: 36(fvec3) ExtInst 1(GLSL.std.450) 71(Reflect) 748 749 - Store 747(r053) 750 - 752: 36(fvec3) Load 41(inF0) - 753: 36(fvec3) Load 42(inF1) - 754: 36(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 752 753 512 - Store 751(r054) 754 - 757: 38(ivec3) BitReverse 756 - Store 755(r055) 757 - 759: 36(fvec3) Load 41(inF0) - 760: 36(fvec3) ExtInst 1(GLSL.std.450) 2(RoundEven) 759 - Store 758(r056) 760 - 762: 36(fvec3) Load 41(inF0) - 763: 36(fvec3) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 762 - Store 761(r057) 763 - 765: 36(fvec3) Load 41(inF0) - 766: 36(fvec3) CompositeConstruct 179 179 179 - 767: 36(fvec3) CompositeConstruct 281 281 281 - 768: 36(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 765 766 767 - Store 764(r058) 768 - 770: 36(fvec3) Load 41(inF0) - 771: 36(fvec3) ExtInst 1(GLSL.std.450) 6(FSign) 770 - Store 769(r059) 771 - 773: 36(fvec3) Load 41(inF0) - 774: 36(fvec3) ExtInst 1(GLSL.std.450) 13(Sin) 773 - Store 772(r060) 774 - 775: 36(fvec3) Load 41(inF0) - 776: 36(fvec3) ExtInst 1(GLSL.std.450) 13(Sin) 775 - Store 42(inF1) 776 - 777: 36(fvec3) Load 41(inF0) - 778: 36(fvec3) ExtInst 1(GLSL.std.450) 14(Cos) 777 - Store 43(inF2) 778 - 780: 36(fvec3) Load 41(inF0) - 781: 36(fvec3) ExtInst 1(GLSL.std.450) 19(Sinh) 780 - Store 779(r061) 781 - 783: 36(fvec3) Load 41(inF0) - 784: 36(fvec3) Load 42(inF1) - 785: 36(fvec3) Load 43(inF2) - 786: 36(fvec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 783 784 785 - Store 782(r062) 786 - 788: 36(fvec3) Load 41(inF0) - 789: 36(fvec3) ExtInst 1(GLSL.std.450) 31(Sqrt) 788 - Store 787(r063) 789 - 791: 36(fvec3) Load 41(inF0) - 792: 36(fvec3) Load 42(inF1) - 793: 36(fvec3) ExtInst 1(GLSL.std.450) 48(Step) 791 792 - Store 790(r064) 793 - 795: 36(fvec3) Load 41(inF0) - 796: 36(fvec3) ExtInst 1(GLSL.std.450) 15(Tan) 795 - Store 794(r065) 796 - 798: 36(fvec3) Load 41(inF0) - 799: 36(fvec3) ExtInst 1(GLSL.std.450) 21(Tanh) 798 - Store 797(r066) 799 - 801: 36(fvec3) Load 41(inF0) - 802: 36(fvec3) ExtInst 1(GLSL.std.450) 3(Trunc) 801 - Store 800(r067) 802 - ReturnValue 804 - FunctionEnd -58(PixelShaderFunction(vf4;vf4;vf4;vu4;vu4;): 48(fvec4) Function None 52 - 53(inF0): 49(ptr) FunctionParameter - 54(inF1): 49(ptr) FunctionParameter - 55(inF2): 49(ptr) FunctionParameter - 56(inU0): 51(ptr) FunctionParameter - 57(inU1): 51(ptr) FunctionParameter - 59: Label - 807(r000): 136(ptr) Variable Function - 810(r001): 49(ptr) Variable Function - 813(r002): 49(ptr) Variable Function - 816(r003): 136(ptr) Variable Function - 819(r004): 49(ptr) Variable Function - 824(r005): 823(ptr) Variable Function - 827(r006): 51(ptr) Variable Function - 830(r007): 49(ptr) Variable Function - 833(r009): 49(ptr) Variable Function - 836(r010): 49(ptr) Variable Function - 840(r011): 49(ptr) Variable Function - 843(r012): 49(ptr) Variable Function - 856(r013): 49(ptr) Variable Function - 859(r014): 49(ptr) Variable Function - 862(r015): 51(ptr) Variable Function - 865(r016): 49(ptr) Variable Function - 868(r017): 49(ptr) Variable Function - 871(r018): 49(ptr) Variable Function - 874(r019): 49(ptr) Variable Function - 877(r020): 49(ptr) Variable Function - 880(r021): 49(ptr) Variable Function - 883(r022): 49(ptr) Variable Function - 886(r023): 7(ptr) Variable Function - 890(r024): 7(ptr) Variable Function - 894(r025): 49(ptr) Variable Function - 905(r029): 49(ptr) Variable Function - 908(r030): 49(ptr) Variable Function - 911(r031): 49(ptr) Variable Function - 916(r032): 51(ptr) Variable Function - 921(r033): 51(ptr) Variable Function - 923(r034): 49(ptr) Variable Function - 926(r036): 49(ptr) Variable Function - 930(r037): 49(ptr) Variable Function - 933(r039): 49(ptr) Variable Function - 937(r040): 936(ptr) Variable Function - 940(r041): 936(ptr) Variable Function - 943(r042): 49(ptr) Variable Function - 947(r039a): 49(ptr) Variable Function - 952(r043): 7(ptr) Variable Function - 955(r044): 49(ptr) Variable Function - 958(r045): 49(ptr) Variable Function - 962(r046): 49(ptr) Variable Function - 965(r047): 49(ptr) Variable Function - 969(r048): 49(ptr) Variable Function - 973(r049): 49(ptr) Variable Function - 976(r050): 49(ptr) Variable Function - 980(r051): 49(ptr) Variable Function - 983(r052): 49(ptr) Variable Function - 987(r053): 49(ptr) Variable Function - 991(r054): 49(ptr) Variable Function - 995(r055): 51(ptr) Variable Function - 998(r056): 49(ptr) Variable Function - 1001(r057): 49(ptr) Variable Function - 1004(r058): 49(ptr) Variable Function - 1009(r059): 49(ptr) Variable Function - 1012(r060): 49(ptr) Variable Function - 1019(r061): 49(ptr) Variable Function - 1022(r062): 49(ptr) Variable Function - 1027(r063): 49(ptr) Variable Function - 1030(r064): 49(ptr) Variable Function - 1034(r065): 49(ptr) Variable Function - 1037(r066): 49(ptr) Variable Function - 1040(r067): 49(ptr) Variable Function - 808: 48(fvec4) Load 53(inF0) - 809: 135(bool) All 808 - Store 807(r000) 809 - 811: 48(fvec4) Load 53(inF0) - 812: 48(fvec4) ExtInst 1(GLSL.std.450) 4(FAbs) 811 - Store 810(r001) 812 - 814: 48(fvec4) Load 53(inF0) - 815: 48(fvec4) ExtInst 1(GLSL.std.450) 17(Acos) 814 - Store 813(r002) 815 - 817: 48(fvec4) Load 53(inF0) - 818: 135(bool) Any 817 - Store 816(r003) 818 - 820: 48(fvec4) Load 53(inF0) - 821: 48(fvec4) ExtInst 1(GLSL.std.450) 16(Asin) 820 - Store 819(r004) 821 - 825: 48(fvec4) Load 53(inF0) - 826: 822(ivec4) Bitcast 825 - Store 824(r005) 826 - 828: 48(fvec4) Load 53(inF0) - 829: 50(ivec4) Bitcast 828 - Store 827(r006) 829 - 831: 50(ivec4) Load 56(inU0) - 832: 48(fvec4) Bitcast 831 - Store 830(r007) 832 - 834: 48(fvec4) Load 53(inF0) - 835: 48(fvec4) ExtInst 1(GLSL.std.450) 18(Atan) 834 - Store 833(r009) 835 - 837: 48(fvec4) Load 53(inF0) - 838: 48(fvec4) Load 54(inF1) - 839: 48(fvec4) ExtInst 1(GLSL.std.450) 25(Atan2) 837 838 - Store 836(r010) 839 - 841: 48(fvec4) Load 53(inF0) - 842: 48(fvec4) ExtInst 1(GLSL.std.450) 9(Ceil) 841 - Store 840(r011) 842 - 844: 48(fvec4) Load 53(inF0) - 845: 48(fvec4) Load 54(inF1) - 846: 48(fvec4) Load 55(inF2) - 847: 48(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 844 845 846 - Store 843(r012) 847 - 848: 48(fvec4) Load 53(inF0) - 851: 850(bvec4) FOrdLessThan 848 849 - 852: 135(bool) Any 851 - SelectionMerge 854 None - BranchConditional 852 853 854 - 853: Label + 392: Label + 394: 28(ivec2) Load 34(inU0) + 397: 345(bvec2) ULessThan 394 396 + 398: 137(bool) Any 397 + SelectionMerge 400 None + BranchConditional 398 399 400 + 399: Label Kill - 854: Label - 857: 48(fvec4) Load 53(inF0) - 858: 48(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 857 - Store 856(r013) 858 - 860: 48(fvec4) Load 53(inF0) - 861: 48(fvec4) ExtInst 1(GLSL.std.450) 20(Cosh) 860 - Store 859(r014) 861 - 864: 50(ivec4) BitCount 863 - Store 862(r015) 864 - 866: 48(fvec4) Load 53(inF0) - 867: 48(fvec4) DPdx 866 - Store 865(r016) 867 - 869: 48(fvec4) Load 53(inF0) - 870: 48(fvec4) DPdxCoarse 869 - Store 868(r017) 870 - 872: 48(fvec4) Load 53(inF0) - 873: 48(fvec4) DPdxFine 872 - Store 871(r018) 873 - 875: 48(fvec4) Load 53(inF0) - 876: 48(fvec4) DPdy 875 - Store 874(r019) 876 - 878: 48(fvec4) Load 53(inF0) - 879: 48(fvec4) DPdyCoarse 878 - Store 877(r020) 879 - 881: 48(fvec4) Load 53(inF0) - 882: 48(fvec4) DPdyFine 881 - Store 880(r021) 882 - 884: 48(fvec4) Load 53(inF0) - 885: 48(fvec4) ExtInst 1(GLSL.std.450) 12(Degrees) 884 - Store 883(r022) 885 - 887: 48(fvec4) Load 53(inF0) - 888: 48(fvec4) Load 54(inF1) - 889: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 887 888 - Store 886(r023) 889 - 891: 48(fvec4) Load 53(inF0) - 892: 48(fvec4) Load 54(inF1) - 893: 6(float) Dot 891 892 - Store 890(r024) 893 - 895: 7(ptr) AccessChain 53(inF0) 515 - 896: 6(float) Load 895 - 897: 7(ptr) AccessChain 54(inF1) 515 - 898: 6(float) Load 897 - 899: 6(float) FMul 896 898 - 900: 7(ptr) AccessChain 53(inF0) 516 - 901: 6(float) Load 900 - 902: 7(ptr) AccessChain 54(inF1) 623 - 903: 6(float) Load 902 - 904: 48(fvec4) CompositeConstruct 281 899 901 903 - Store 894(r025) 904 - 906: 48(fvec4) Load 53(inF0) - 907: 48(fvec4) ExtInst 1(GLSL.std.450) 27(Exp) 906 - Store 905(r029) 907 - 909: 48(fvec4) Load 53(inF0) - 910: 48(fvec4) ExtInst 1(GLSL.std.450) 29(Exp2) 909 - Store 908(r030) 910 - 912: 48(fvec4) Load 53(inF0) - 913: 48(fvec4) Load 54(inF1) - 914: 48(fvec4) Load 55(inF2) - 915: 48(fvec4) ExtInst 1(GLSL.std.450) 70(FaceForward) 912 913 914 - Store 911(r031) 915 - 920: 50(ivec4) ExtInst 1(GLSL.std.450) 75(FindUMsb) 919 - Store 916(r032) 920 - 922: 50(ivec4) ExtInst 1(GLSL.std.450) 73(FindILsb) 919 - Store 921(r033) 922 - 924: 48(fvec4) Load 53(inF0) - 925: 48(fvec4) ExtInst 1(GLSL.std.450) 8(Floor) 924 - Store 923(r034) 925 - 927: 48(fvec4) Load 53(inF0) - 928: 48(fvec4) Load 54(inF1) - 929: 48(fvec4) FMod 927 928 - Store 926(r036) 929 - 931: 48(fvec4) Load 53(inF0) - 932: 48(fvec4) ExtInst 1(GLSL.std.450) 10(Fract) 931 - Store 930(r037) 932 - 934: 48(fvec4) Load 53(inF0) - 935: 48(fvec4) Fwidth 934 - Store 933(r039) 935 - 938: 48(fvec4) Load 53(inF0) - 939: 850(bvec4) IsInf 938 - Store 937(r040) 939 - 941: 48(fvec4) Load 53(inF0) - 942: 850(bvec4) IsNan 941 - Store 940(r041) 942 - 944: 48(fvec4) Load 53(inF0) - 945: 48(fvec4) Load 54(inF1) - 946: 48(fvec4) ExtInst 1(GLSL.std.450) 53(Ldexp) 944 945 - Store 943(r042) 946 - 948: 48(fvec4) Load 53(inF0) - 949: 48(fvec4) Load 54(inF1) - 950: 48(fvec4) Load 55(inF2) - 951: 48(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 948 949 950 - Store 947(r039a) 951 - 953: 48(fvec4) Load 53(inF0) - 954: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 953 - Store 952(r043) 954 - 956: 48(fvec4) Load 53(inF0) - 957: 48(fvec4) ExtInst 1(GLSL.std.450) 28(Log) 956 - Store 955(r044) 957 - 959: 48(fvec4) Load 53(inF0) - 960: 48(fvec4) ExtInst 1(GLSL.std.450) 30(Log2) 959 - 961: 48(fvec4) VectorTimesScalar 960 260 - Store 958(r045) 961 - 963: 48(fvec4) Load 53(inF0) - 964: 48(fvec4) ExtInst 1(GLSL.std.450) 30(Log2) 963 - Store 962(r046) 964 - 966: 48(fvec4) Load 53(inF0) - 967: 48(fvec4) Load 54(inF1) - 968: 48(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 966 967 - Store 965(r047) 968 - 970: 48(fvec4) Load 53(inF0) - 971: 48(fvec4) Load 54(inF1) - 972: 48(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 970 971 - Store 969(r048) 972 - 974: 48(fvec4) Load 53(inF0) - 975: 48(fvec4) ExtInst 1(GLSL.std.450) 69(Normalize) 974 - Store 973(r049) 975 - 977: 48(fvec4) Load 53(inF0) - 978: 48(fvec4) Load 54(inF1) - 979: 48(fvec4) ExtInst 1(GLSL.std.450) 26(Pow) 977 978 - Store 976(r050) 979 - 981: 48(fvec4) Load 53(inF0) - 982: 48(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 981 - Store 980(r051) 982 - 984: 48(fvec4) Load 53(inF0) - 985: 48(fvec4) CompositeConstruct 281 281 281 281 - 986: 48(fvec4) FDiv 985 984 - Store 983(r052) 986 - 988: 48(fvec4) Load 53(inF0) - 989: 48(fvec4) Load 54(inF1) - 990: 48(fvec4) ExtInst 1(GLSL.std.450) 71(Reflect) 988 989 - Store 987(r053) 990 - 992: 48(fvec4) Load 53(inF0) - 993: 48(fvec4) Load 54(inF1) - 994: 48(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 992 993 512 - Store 991(r054) 994 - 997: 50(ivec4) BitReverse 996 - Store 995(r055) 997 - 999: 48(fvec4) Load 53(inF0) - 1000: 48(fvec4) ExtInst 1(GLSL.std.450) 2(RoundEven) 999 - Store 998(r056) 1000 - 1002: 48(fvec4) Load 53(inF0) - 1003: 48(fvec4) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 1002 - Store 1001(r057) 1003 - 1005: 48(fvec4) Load 53(inF0) - 1006: 48(fvec4) CompositeConstruct 179 179 179 179 - 1007: 48(fvec4) CompositeConstruct 281 281 281 281 - 1008: 48(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 1005 1006 1007 - Store 1004(r058) 1008 - 1010: 48(fvec4) Load 53(inF0) - 1011: 48(fvec4) ExtInst 1(GLSL.std.450) 6(FSign) 1010 - Store 1009(r059) 1011 - 1013: 48(fvec4) Load 53(inF0) - 1014: 48(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 1013 - Store 1012(r060) 1014 - 1015: 48(fvec4) Load 53(inF0) - 1016: 48(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 1015 - Store 54(inF1) 1016 - 1017: 48(fvec4) Load 53(inF0) - 1018: 48(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 1017 - Store 55(inF2) 1018 - 1020: 48(fvec4) Load 53(inF0) - 1021: 48(fvec4) ExtInst 1(GLSL.std.450) 19(Sinh) 1020 - Store 1019(r061) 1021 - 1023: 48(fvec4) Load 53(inF0) - 1024: 48(fvec4) Load 54(inF1) - 1025: 48(fvec4) Load 55(inF2) - 1026: 48(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 1023 1024 1025 - Store 1022(r062) 1026 - 1028: 48(fvec4) Load 53(inF0) - 1029: 48(fvec4) ExtInst 1(GLSL.std.450) 31(Sqrt) 1028 - Store 1027(r063) 1029 - 1031: 48(fvec4) Load 53(inF0) - 1032: 48(fvec4) Load 54(inF1) - 1033: 48(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 1031 1032 - Store 1030(r064) 1033 - 1035: 48(fvec4) Load 53(inF0) - 1036: 48(fvec4) ExtInst 1(GLSL.std.450) 15(Tan) 1035 - Store 1034(r065) 1036 - 1038: 48(fvec4) Load 53(inF0) - 1039: 48(fvec4) ExtInst 1(GLSL.std.450) 21(Tanh) 1038 - Store 1037(r066) 1039 - 1041: 48(fvec4) Load 53(inF0) - 1042: 48(fvec4) ExtInst 1(GLSL.std.450) 3(Trunc) 1041 - Store 1040(r067) 1042 - ReturnValue 1044 + 400: Label + 403: 26(fvec2) Load 31(inF0) + 404: 26(fvec2) ExtInst 1(GLSL.std.450) 14(Cos) 403 + Store 402(r013) 404 + 406: 26(fvec2) Load 31(inF0) + 407: 26(fvec2) ExtInst 1(GLSL.std.450) 20(Cosh) 406 + Store 405(r015) 407 + 411: 362(ivec2) BitCount 410 + Store 408(r016) 411 + 413: 26(fvec2) Load 31(inF0) + 414: 26(fvec2) DPdx 413 + Store 412(r017) 414 + 416: 26(fvec2) Load 31(inF0) + 417: 26(fvec2) DPdxCoarse 416 + Store 415(r018) 417 + 419: 26(fvec2) Load 31(inF0) + 420: 26(fvec2) DPdxFine 419 + Store 418(r019) 420 + 422: 26(fvec2) Load 31(inF0) + 423: 26(fvec2) DPdy 422 + Store 421(r020) 423 + 425: 26(fvec2) Load 31(inF0) + 426: 26(fvec2) DPdyCoarse 425 + Store 424(r021) 426 + 428: 26(fvec2) Load 31(inF0) + 429: 26(fvec2) DPdyFine 428 + Store 427(r022) 429 + 431: 26(fvec2) Load 31(inF0) + 432: 26(fvec2) ExtInst 1(GLSL.std.450) 12(Degrees) 431 + Store 430(r023) 432 + 434: 26(fvec2) Load 31(inF0) + 435: 26(fvec2) Load 32(inF1) + 436: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 434 435 + Store 433(r026) 436 + 438: 26(fvec2) Load 31(inF0) + 439: 26(fvec2) Load 32(inF1) + 440: 6(float) Dot 438 439 + Store 437(r027) 440 + 442: 26(fvec2) Load 31(inF0) + 443: 26(fvec2) ExtInst 1(GLSL.std.450) 27(Exp) 442 + Store 441(r028) 443 + 445: 26(fvec2) Load 31(inF0) + 446: 26(fvec2) ExtInst 1(GLSL.std.450) 29(Exp2) 445 + Store 444(r029) 446 + 448: 26(fvec2) Load 31(inF0) + 449: 26(fvec2) Load 32(inF1) + 450: 26(fvec2) Load 33(inF2) + 451: 26(fvec2) ExtInst 1(GLSL.std.450) 70(FaceForward) 448 449 450 + Store 447(r030) 451 + 456: 28(ivec2) ExtInst 1(GLSL.std.450) 75(FindUMsb) 455 + Store 452(r031) 456 + 458: 28(ivec2) ExtInst 1(GLSL.std.450) 73(FindILsb) 455 + Store 457(r032) 458 + 460: 26(fvec2) Load 31(inF0) + 461: 26(fvec2) ExtInst 1(GLSL.std.450) 8(Floor) 460 + Store 459(r033) 461 + 463: 26(fvec2) Load 31(inF0) + 464: 26(fvec2) Load 32(inF1) + 465: 26(fvec2) FMod 463 464 + Store 462(r035) 465 + 467: 26(fvec2) Load 31(inF0) + 468: 26(fvec2) ExtInst 1(GLSL.std.450) 10(Fract) 467 + Store 466(r036) 468 + 470: 26(fvec2) Load 31(inF0) + 471: 26(fvec2) Fwidth 470 + Store 469(r038) 471 + 474: 26(fvec2) Load 31(inF0) + 475: 345(bvec2) IsInf 474 + Store 473(r039) 475 + 477: 26(fvec2) Load 31(inF0) + 478: 345(bvec2) IsNan 477 + Store 476(r040) 478 + 480: 26(fvec2) Load 31(inF0) + 481: 26(fvec2) Load 32(inF1) + 482: 26(fvec2) ExtInst 1(GLSL.std.450) 53(Ldexp) 480 481 + Store 479(r041) 482 + 484: 26(fvec2) Load 31(inF0) + 485: 26(fvec2) Load 32(inF1) + 486: 26(fvec2) Load 33(inF2) + 487: 26(fvec2) ExtInst 1(GLSL.std.450) 46(FMix) 484 485 486 + Store 483(r039a) 487 + 489: 26(fvec2) Load 31(inF0) + 490: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 489 + Store 488(r042) 490 + 492: 26(fvec2) Load 31(inF0) + 493: 26(fvec2) ExtInst 1(GLSL.std.450) 28(Log) 492 + Store 491(r043) 493 + 495: 26(fvec2) Load 31(inF0) + 496: 26(fvec2) ExtInst 1(GLSL.std.450) 30(Log2) 495 + 497: 26(fvec2) VectorTimesScalar 496 268 + Store 494(r044) 497 + 499: 26(fvec2) Load 31(inF0) + 500: 26(fvec2) ExtInst 1(GLSL.std.450) 30(Log2) 499 + Store 498(r045) 500 + 502: 26(fvec2) Load 31(inF0) + 503: 26(fvec2) Load 32(inF1) + 504: 26(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 502 503 + Store 501(r046) 504 + 506: 26(fvec2) Load 31(inF0) + 507: 26(fvec2) Load 32(inF1) + 508: 26(fvec2) ExtInst 1(GLSL.std.450) 37(FMin) 506 507 + Store 505(r047) 508 + 510: 26(fvec2) Load 31(inF0) + 511: 26(fvec2) ExtInst 1(GLSL.std.450) 69(Normalize) 510 + Store 509(r048) 511 + 513: 26(fvec2) Load 31(inF0) + 514: 26(fvec2) Load 32(inF1) + 515: 26(fvec2) ExtInst 1(GLSL.std.450) 26(Pow) 513 514 + Store 512(r049) 515 + 517: 26(fvec2) Load 31(inF0) + 518: 26(fvec2) ExtInst 1(GLSL.std.450) 11(Radians) 517 + Store 516(r050) 518 + 520: 26(fvec2) Load 31(inF0) + 521: 26(fvec2) CompositeConstruct 289 289 + 522: 26(fvec2) FDiv 521 520 + Store 519(r051) 522 + 524: 26(fvec2) Load 31(inF0) + 525: 26(fvec2) Load 32(inF1) + 526: 26(fvec2) ExtInst 1(GLSL.std.450) 71(Reflect) 524 525 + Store 523(r052) 526 + 528: 26(fvec2) Load 31(inF0) + 529: 26(fvec2) Load 32(inF1) + 531: 26(fvec2) ExtInst 1(GLSL.std.450) 72(Refract) 528 529 530 + Store 527(r053) 531 + 536: 28(ivec2) BitReverse 535 + Store 532(r054) 536 + 538: 26(fvec2) Load 31(inF0) + 539: 26(fvec2) ExtInst 1(GLSL.std.450) 2(RoundEven) 538 + Store 537(r055) 539 + 541: 26(fvec2) Load 31(inF0) + 542: 26(fvec2) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 541 + Store 540(r056) 542 + 544: 26(fvec2) Load 31(inF0) + 545: 26(fvec2) CompositeConstruct 141 141 + 546: 26(fvec2) CompositeConstruct 289 289 + 547: 26(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 544 545 546 + Store 543(r057) 547 + 549: 26(fvec2) Load 31(inF0) + 550: 26(fvec2) ExtInst 1(GLSL.std.450) 6(FSign) 549 + Store 548(r058) 550 + 552: 26(fvec2) Load 31(inF0) + 553: 26(fvec2) ExtInst 1(GLSL.std.450) 13(Sin) 552 + Store 551(r059) 553 + 554: 26(fvec2) Load 31(inF0) + 555: 26(fvec2) ExtInst 1(GLSL.std.450) 13(Sin) 554 + Store 32(inF1) 555 + 556: 26(fvec2) Load 31(inF0) + 557: 26(fvec2) ExtInst 1(GLSL.std.450) 14(Cos) 556 + Store 33(inF2) 557 + 559: 26(fvec2) Load 31(inF0) + 560: 26(fvec2) ExtInst 1(GLSL.std.450) 19(Sinh) 559 + Store 558(r060) 560 + 562: 26(fvec2) Load 31(inF0) + 563: 26(fvec2) Load 32(inF1) + 564: 26(fvec2) Load 33(inF2) + 565: 26(fvec2) ExtInst 1(GLSL.std.450) 49(SmoothStep) 562 563 564 + Store 561(r061) 565 + 567: 26(fvec2) Load 31(inF0) + 568: 26(fvec2) ExtInst 1(GLSL.std.450) 31(Sqrt) 567 + Store 566(r062) 568 + 570: 26(fvec2) Load 31(inF0) + 571: 26(fvec2) Load 32(inF1) + 572: 26(fvec2) ExtInst 1(GLSL.std.450) 48(Step) 570 571 + Store 569(r063) 572 + 574: 26(fvec2) Load 31(inF0) + 575: 26(fvec2) ExtInst 1(GLSL.std.450) 15(Tan) 574 + Store 573(r064) 575 + 577: 26(fvec2) Load 31(inF0) + 578: 26(fvec2) ExtInst 1(GLSL.std.450) 21(Tanh) 577 + Store 576(r065) 578 + 580: 26(fvec2) Load 31(inF0) + 581: 26(fvec2) ExtInst 1(GLSL.std.450) 3(Trunc) 580 + Store 579(r066) 581 + ReturnValue 582 FunctionEnd -66(PixelShaderFunction2x2(mf22;mf22;mf22;): 60 Function None 62 - 63(inF0): 61(ptr) FunctionParameter - 64(inF1): 61(ptr) FunctionParameter - 65(inF2): 61(ptr) FunctionParameter - 67: Label - 1047(r000): 136(ptr) Variable Function - 1050(r001): 61(ptr) Variable Function - 1055(r003): 136(ptr) Variable Function - 1058(r004): 61(ptr) Variable Function - 1061(r005): 61(ptr) Variable Function - 1064(r006): 61(ptr) Variable Function - 1068(r007): 61(ptr) Variable Function - 1079(r008): 61(ptr) Variable Function - 1084(r009): 61(ptr) Variable Function - 1087(r010): 61(ptr) Variable Function - 1090(r011): 61(ptr) Variable Function - 1093(r012): 61(ptr) Variable Function - 1096(r013): 61(ptr) Variable Function - 1099(r014): 61(ptr) Variable Function - 1102(r015): 61(ptr) Variable Function - 1105(r016): 61(ptr) Variable Function - 1108(r017): 61(ptr) Variable Function - 1111(r018): 7(ptr) Variable Function - 1114(r019): 61(ptr) Variable Function - 1117(R020): 61(ptr) Variable Function - 1120(r021): 61(ptr) Variable Function - 1123(r022): 61(ptr) Variable Function - 1133(r023): 61(ptr) Variable Function - 1136(r025): 61(ptr) Variable Function - 1139(r026): 61(ptr) Variable Function - 1143(r026a): 61(ptr) Variable Function - 1148(r027): 61(ptr) Variable Function - 1151(r028): 61(ptr) Variable Function - 1155(r029): 61(ptr) Variable Function - 1158(r030): 61(ptr) Variable Function - 1162(r031): 61(ptr) Variable Function - 1166(r032): 61(ptr) Variable Function - 1170(r033): 61(ptr) Variable Function - 1173(r034): 61(ptr) Variable Function - 1176(r035): 61(ptr) Variable Function - 1179(r036): 61(ptr) Variable Function - 1184(r037): 61(ptr) Variable Function - 1187(r038): 61(ptr) Variable Function - 1194(r039): 61(ptr) Variable Function - 1197(r049): 61(ptr) Variable Function - 1202(r041): 61(ptr) Variable Function - 1205(r042): 61(ptr) Variable Function - 1209(r043): 61(ptr) Variable Function - 1212(r044): 61(ptr) Variable Function - 1217(r046): 61(ptr) Variable Function - 1048: 60 Load 63(inF0) - 1049: 135(bool) All 1048 - Store 1047(r000) 1049 - 1051: 60 Load 63(inF0) - 1052: 60 ExtInst 1(GLSL.std.450) 4(FAbs) 1051 - Store 1050(r001) 1052 - 1053: 60 Load 63(inF0) - 1054: 60 ExtInst 1(GLSL.std.450) 17(Acos) 1053 - 1056: 60 Load 63(inF0) - 1057: 135(bool) Any 1056 - Store 1055(r003) 1057 - 1059: 60 Load 63(inF0) - 1060: 60 ExtInst 1(GLSL.std.450) 16(Asin) 1059 - Store 1058(r004) 1060 - 1062: 60 Load 63(inF0) - 1063: 60 ExtInst 1(GLSL.std.450) 18(Atan) 1062 - Store 1061(r005) 1063 - 1065: 60 Load 63(inF0) - 1066: 60 Load 64(inF1) - 1067: 60 ExtInst 1(GLSL.std.450) 25(Atan2) 1065 1066 - Store 1064(r006) 1067 - 1069: 60 Load 63(inF0) - 1070: 60 ExtInst 1(GLSL.std.450) 9(Ceil) 1069 - Store 1068(r007) 1070 - 1071: 60 Load 63(inF0) - 1074: 1073 FOrdLessThan 1071 1072 - 1075: 135(bool) Any 1074 - SelectionMerge 1077 None - BranchConditional 1075 1076 1077 - 1076: Label +48(PixelShaderFunction3(vf3;vf3;vf3;vu3;vu3;): 38(fvec3) Function None 42 + 43(inF0): 39(ptr) FunctionParameter + 44(inF1): 39(ptr) FunctionParameter + 45(inF2): 39(ptr) FunctionParameter + 46(inU0): 41(ptr) FunctionParameter + 47(inU1): 41(ptr) FunctionParameter + 49: Label + 585(r000): 138(ptr) Variable Function + 591(r001): 39(ptr) Variable Function + 594(r002): 39(ptr) Variable Function + 597(r003): 138(ptr) Variable Function + 601(r004): 39(ptr) Variable Function + 606(r005): 605(ptr) Variable Function + 609(r006): 41(ptr) Variable Function + 612(r007): 39(ptr) Variable Function + 615(r009): 39(ptr) Variable Function + 618(r010): 39(ptr) Variable Function + 622(r011): 39(ptr) Variable Function + 625(r012): 39(ptr) Variable Function + 643(r013): 39(ptr) Variable Function + 646(r014): 39(ptr) Variable Function + 649(r015): 41(ptr) Variable Function + 654(r016): 39(ptr) Variable Function + 658(r017): 39(ptr) Variable Function + 661(r018): 39(ptr) Variable Function + 664(r019): 39(ptr) Variable Function + 667(r020): 39(ptr) Variable Function + 670(r021): 39(ptr) Variable Function + 673(r022): 39(ptr) Variable Function + 676(r023): 39(ptr) Variable Function + 679(r024): 7(ptr) Variable Function + 683(r025): 7(ptr) Variable Function + 687(r029): 39(ptr) Variable Function + 690(r030): 39(ptr) Variable Function + 693(r031): 39(ptr) Variable Function + 698(r032): 41(ptr) Variable Function + 702(r033): 41(ptr) Variable Function + 704(r034): 39(ptr) Variable Function + 707(r036): 39(ptr) Variable Function + 711(r037): 39(ptr) Variable Function + 714(r039): 39(ptr) Variable Function + 718(r040): 717(ptr) Variable Function + 721(r041): 717(ptr) Variable Function + 724(r042): 39(ptr) Variable Function + 728(r039a): 39(ptr) Variable Function + 733(r039b): 39(ptr) Variable Function + 739(r043): 7(ptr) Variable Function + 742(r044): 39(ptr) Variable Function + 745(r045): 39(ptr) Variable Function + 749(r046): 39(ptr) Variable Function + 752(r047): 39(ptr) Variable Function + 756(r048): 39(ptr) Variable Function + 760(r049): 39(ptr) Variable Function + 763(r050): 39(ptr) Variable Function + 767(r051): 39(ptr) Variable Function + 770(r052): 39(ptr) Variable Function + 774(r053): 39(ptr) Variable Function + 778(r054): 39(ptr) Variable Function + 782(r055): 41(ptr) Variable Function + 785(r056): 39(ptr) Variable Function + 788(r057): 39(ptr) Variable Function + 791(r058): 39(ptr) Variable Function + 796(r059): 39(ptr) Variable Function + 799(r060): 39(ptr) Variable Function + 806(r061): 39(ptr) Variable Function + 809(r062): 39(ptr) Variable Function + 814(r063): 39(ptr) Variable Function + 817(r064): 39(ptr) Variable Function + 821(r065): 39(ptr) Variable Function + 824(r066): 39(ptr) Variable Function + 827(r067): 39(ptr) Variable Function + 586: 38(fvec3) Load 43(inF0) + 589: 587(bvec3) FOrdNotEqual 586 588 + 590: 137(bool) All 589 + Store 585(r000) 590 + 592: 38(fvec3) Load 43(inF0) + 593: 38(fvec3) ExtInst 1(GLSL.std.450) 4(FAbs) 592 + Store 591(r001) 593 + 595: 38(fvec3) Load 43(inF0) + 596: 38(fvec3) ExtInst 1(GLSL.std.450) 17(Acos) 595 + Store 594(r002) 596 + 598: 38(fvec3) Load 43(inF0) + 599: 587(bvec3) FOrdNotEqual 598 588 + 600: 137(bool) Any 599 + Store 597(r003) 600 + 602: 38(fvec3) Load 43(inF0) + 603: 38(fvec3) ExtInst 1(GLSL.std.450) 16(Asin) 602 + Store 601(r004) 603 + 607: 38(fvec3) Load 43(inF0) + 608: 604(ivec3) Bitcast 607 + Store 606(r005) 608 + 610: 38(fvec3) Load 43(inF0) + 611: 40(ivec3) Bitcast 610 + Store 609(r006) 611 + 613: 40(ivec3) Load 46(inU0) + 614: 38(fvec3) Bitcast 613 + Store 612(r007) 614 + 616: 38(fvec3) Load 43(inF0) + 617: 38(fvec3) ExtInst 1(GLSL.std.450) 18(Atan) 616 + Store 615(r009) 617 + 619: 38(fvec3) Load 43(inF0) + 620: 38(fvec3) Load 44(inF1) + 621: 38(fvec3) ExtInst 1(GLSL.std.450) 25(Atan2) 619 620 + Store 618(r010) 621 + 623: 38(fvec3) Load 43(inF0) + 624: 38(fvec3) ExtInst 1(GLSL.std.450) 9(Ceil) 623 + Store 622(r011) 624 + 626: 38(fvec3) Load 43(inF0) + 627: 38(fvec3) Load 44(inF1) + 628: 38(fvec3) Load 45(inF2) + 629: 38(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 626 627 628 + Store 625(r012) 629 + 630: 38(fvec3) Load 43(inF0) + 631: 587(bvec3) FOrdLessThan 630 588 + 632: 137(bool) Any 631 + SelectionMerge 634 None + BranchConditional 632 633 634 + 633: Label Kill - 1077: Label - 1080: 60 Load 63(inF0) - 1081: 60 Load 64(inF1) - 1082: 60 Load 65(inF2) - 1083: 60 ExtInst 1(GLSL.std.450) 43(FClamp) 1080 1081 1082 - Store 1079(r008) 1083 - 1085: 60 Load 63(inF0) - 1086: 60 ExtInst 1(GLSL.std.450) 14(Cos) 1085 - Store 1084(r009) 1086 - 1088: 60 Load 63(inF0) - 1089: 60 ExtInst 1(GLSL.std.450) 20(Cosh) 1088 - Store 1087(r010) 1089 - 1091: 60 Load 63(inF0) - 1092: 60 DPdx 1091 - Store 1090(r011) 1092 - 1094: 60 Load 63(inF0) - 1095: 60 DPdxCoarse 1094 - Store 1093(r012) 1095 - 1097: 60 Load 63(inF0) - 1098: 60 DPdxFine 1097 - Store 1096(r013) 1098 - 1100: 60 Load 63(inF0) - 1101: 60 DPdy 1100 - Store 1099(r014) 1101 - 1103: 60 Load 63(inF0) - 1104: 60 DPdyCoarse 1103 - Store 1102(r015) 1104 - 1106: 60 Load 63(inF0) - 1107: 60 DPdyFine 1106 - Store 1105(r016) 1107 - 1109: 60 Load 63(inF0) - 1110: 60 ExtInst 1(GLSL.std.450) 12(Degrees) 1109 - Store 1108(r017) 1110 - 1112: 60 Load 63(inF0) - 1113: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 1112 - Store 1111(r018) 1113 - 1115: 60 Load 63(inF0) - 1116: 60 ExtInst 1(GLSL.std.450) 27(Exp) 1115 - Store 1114(r019) 1116 - 1118: 60 Load 63(inF0) - 1119: 60 ExtInst 1(GLSL.std.450) 29(Exp2) 1118 - Store 1117(R020) 1119 - 1121: 60 Load 63(inF0) - 1122: 60 ExtInst 1(GLSL.std.450) 8(Floor) 1121 - Store 1120(r021) 1122 - 1124: 60 Load 63(inF0) - 1125: 60 Load 64(inF1) - 1126: 24(fvec2) CompositeExtract 1124 0 - 1127: 24(fvec2) CompositeExtract 1125 0 - 1128: 24(fvec2) FMod 1126 1127 - 1129: 24(fvec2) CompositeExtract 1124 1 - 1130: 24(fvec2) CompositeExtract 1125 1 - 1131: 24(fvec2) FMod 1129 1130 - 1132: 60 CompositeConstruct 1128 1131 - Store 1123(r022) 1132 - 1134: 60 Load 63(inF0) - 1135: 60 ExtInst 1(GLSL.std.450) 10(Fract) 1134 - Store 1133(r023) 1135 - 1137: 60 Load 63(inF0) - 1138: 60 Fwidth 1137 - Store 1136(r025) 1138 - 1140: 60 Load 63(inF0) - 1141: 60 Load 64(inF1) - 1142: 60 ExtInst 1(GLSL.std.450) 53(Ldexp) 1140 1141 - Store 1139(r026) 1142 - 1144: 60 Load 63(inF0) - 1145: 60 Load 64(inF1) - 1146: 60 Load 65(inF2) - 1147: 60 ExtInst 1(GLSL.std.450) 46(FMix) 1144 1145 1146 - Store 1143(r026a) 1147 - 1149: 60 Load 63(inF0) - 1150: 60 ExtInst 1(GLSL.std.450) 28(Log) 1149 - Store 1148(r027) 1150 - 1152: 60 Load 63(inF0) - 1153: 60 ExtInst 1(GLSL.std.450) 30(Log2) 1152 - 1154: 60 MatrixTimesScalar 1153 260 - Store 1151(r028) 1154 - 1156: 60 Load 63(inF0) - 1157: 60 ExtInst 1(GLSL.std.450) 30(Log2) 1156 - Store 1155(r029) 1157 - 1159: 60 Load 63(inF0) - 1160: 60 Load 64(inF1) - 1161: 60 ExtInst 1(GLSL.std.450) 40(FMax) 1159 1160 - Store 1158(r030) 1161 - 1163: 60 Load 63(inF0) - 1164: 60 Load 64(inF1) - 1165: 60 ExtInst 1(GLSL.std.450) 37(FMin) 1163 1164 - Store 1162(r031) 1165 - 1167: 60 Load 63(inF0) - 1168: 60 Load 64(inF1) - 1169: 60 ExtInst 1(GLSL.std.450) 26(Pow) 1167 1168 - Store 1166(r032) 1169 - 1171: 60 Load 63(inF0) - 1172: 60 ExtInst 1(GLSL.std.450) 11(Radians) 1171 - Store 1170(r033) 1172 - 1174: 60 Load 63(inF0) - 1175: 60 ExtInst 1(GLSL.std.450) 2(RoundEven) 1174 - Store 1173(r034) 1175 - 1177: 60 Load 63(inF0) - 1178: 60 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 1177 - Store 1176(r035) 1178 - 1180: 60 Load 63(inF0) - 1181: 24(fvec2) CompositeConstruct 179 179 - 1182: 24(fvec2) CompositeConstruct 281 281 - 1183: 60 ExtInst 1(GLSL.std.450) 43(FClamp) 1180 1181 1182 - Store 1179(r036) 1183 - 1185: 60 Load 63(inF0) - 1186: 60 ExtInst 1(GLSL.std.450) 6(FSign) 1185 - Store 1184(r037) 1186 - 1188: 60 Load 63(inF0) - 1189: 60 ExtInst 1(GLSL.std.450) 13(Sin) 1188 - Store 1187(r038) 1189 - 1190: 60 Load 63(inF0) - 1191: 60 ExtInst 1(GLSL.std.450) 13(Sin) 1190 - Store 64(inF1) 1191 - 1192: 60 Load 63(inF0) - 1193: 60 ExtInst 1(GLSL.std.450) 14(Cos) 1192 - Store 65(inF2) 1193 - 1195: 60 Load 63(inF0) - 1196: 60 ExtInst 1(GLSL.std.450) 19(Sinh) 1195 - Store 1194(r039) 1196 - 1198: 60 Load 63(inF0) - 1199: 60 Load 64(inF1) - 1200: 60 Load 65(inF2) - 1201: 60 ExtInst 1(GLSL.std.450) 49(SmoothStep) 1198 1199 1200 - Store 1197(r049) 1201 - 1203: 60 Load 63(inF0) - 1204: 60 ExtInst 1(GLSL.std.450) 31(Sqrt) 1203 - Store 1202(r041) 1204 - 1206: 60 Load 63(inF0) - 1207: 60 Load 64(inF1) - 1208: 60 ExtInst 1(GLSL.std.450) 48(Step) 1206 1207 - Store 1205(r042) 1208 - 1210: 60 Load 63(inF0) - 1211: 60 ExtInst 1(GLSL.std.450) 15(Tan) 1210 - Store 1209(r043) 1211 - 1213: 60 Load 63(inF0) - 1214: 60 ExtInst 1(GLSL.std.450) 21(Tanh) 1213 - Store 1212(r044) 1214 - 1215: 60 Load 63(inF0) - 1216: 60 Transpose 1215 - 1218: 60 Load 63(inF0) - 1219: 60 ExtInst 1(GLSL.std.450) 3(Trunc) 1218 - Store 1217(r046) 1219 - ReturnValue 1221 - FunctionEnd -74(PixelShaderFunction3x3(mf33;mf33;mf33;): 68 Function None 70 - 71(inF0): 69(ptr) FunctionParameter - 72(inF1): 69(ptr) FunctionParameter - 73(inF2): 69(ptr) FunctionParameter - 75: Label - 1224(r000): 136(ptr) Variable Function - 1227(r001): 69(ptr) Variable Function - 1232(r003): 136(ptr) Variable Function - 1235(r004): 69(ptr) Variable Function - 1238(r005): 69(ptr) Variable Function - 1241(r006): 69(ptr) Variable Function - 1245(r007): 69(ptr) Variable Function - 1256(r008): 69(ptr) Variable Function - 1261(r009): 69(ptr) Variable Function - 1264(r010): 69(ptr) Variable Function - 1267(r011): 69(ptr) Variable Function - 1270(r012): 69(ptr) Variable Function - 1273(r013): 69(ptr) Variable Function - 1276(r014): 69(ptr) Variable Function - 1279(r015): 69(ptr) Variable Function - 1282(r016): 69(ptr) Variable Function - 1285(r017): 69(ptr) Variable Function - 1288(r018): 7(ptr) Variable Function - 1291(r019): 69(ptr) Variable Function - 1294(R020): 69(ptr) Variable Function - 1297(r021): 69(ptr) Variable Function - 1300(r022): 69(ptr) Variable Function - 1313(r023): 69(ptr) Variable Function - 1316(r025): 69(ptr) Variable Function - 1319(r026): 69(ptr) Variable Function - 1323(r026a): 69(ptr) Variable Function - 1328(r027): 69(ptr) Variable Function - 1331(r028): 69(ptr) Variable Function - 1335(r029): 69(ptr) Variable Function - 1338(r030): 69(ptr) Variable Function - 1342(r031): 69(ptr) Variable Function - 1346(r032): 69(ptr) Variable Function - 1350(r033): 69(ptr) Variable Function - 1353(r034): 69(ptr) Variable Function - 1356(r035): 69(ptr) Variable Function - 1359(r036): 69(ptr) Variable Function - 1364(r037): 69(ptr) Variable Function - 1367(r038): 69(ptr) Variable Function - 1374(r039): 69(ptr) Variable Function - 1377(r049): 69(ptr) Variable Function - 1382(r041): 69(ptr) Variable Function - 1385(r042): 69(ptr) Variable Function - 1389(r043): 69(ptr) Variable Function - 1392(r044): 69(ptr) Variable Function - 1397(r046): 69(ptr) Variable Function - 1225: 68 Load 71(inF0) - 1226: 135(bool) All 1225 - Store 1224(r000) 1226 - 1228: 68 Load 71(inF0) - 1229: 68 ExtInst 1(GLSL.std.450) 4(FAbs) 1228 - Store 1227(r001) 1229 - 1230: 68 Load 71(inF0) - 1231: 68 ExtInst 1(GLSL.std.450) 17(Acos) 1230 - 1233: 68 Load 71(inF0) - 1234: 135(bool) Any 1233 - Store 1232(r003) 1234 - 1236: 68 Load 71(inF0) - 1237: 68 ExtInst 1(GLSL.std.450) 16(Asin) 1236 - Store 1235(r004) 1237 - 1239: 68 Load 71(inF0) - 1240: 68 ExtInst 1(GLSL.std.450) 18(Atan) 1239 - Store 1238(r005) 1240 - 1242: 68 Load 71(inF0) - 1243: 68 Load 72(inF1) - 1244: 68 ExtInst 1(GLSL.std.450) 25(Atan2) 1242 1243 - Store 1241(r006) 1244 - 1246: 68 Load 71(inF0) - 1247: 68 ExtInst 1(GLSL.std.450) 9(Ceil) 1246 - Store 1245(r007) 1247 - 1248: 68 Load 71(inF0) - 1251: 1250 FOrdLessThan 1248 1249 - 1252: 135(bool) Any 1251 - SelectionMerge 1254 None - BranchConditional 1252 1253 1254 - 1253: Label + 634: Label + 636: 40(ivec3) Load 46(inU0) + 638: 587(bvec3) ULessThan 636 637 + 639: 137(bool) Any 638 + SelectionMerge 641 None + BranchConditional 639 640 641 + 640: Label Kill - 1254: Label - 1257: 68 Load 71(inF0) - 1258: 68 Load 72(inF1) - 1259: 68 Load 73(inF2) - 1260: 68 ExtInst 1(GLSL.std.450) 43(FClamp) 1257 1258 1259 - Store 1256(r008) 1260 - 1262: 68 Load 71(inF0) - 1263: 68 ExtInst 1(GLSL.std.450) 14(Cos) 1262 - Store 1261(r009) 1263 - 1265: 68 Load 71(inF0) - 1266: 68 ExtInst 1(GLSL.std.450) 20(Cosh) 1265 - Store 1264(r010) 1266 - 1268: 68 Load 71(inF0) - 1269: 68 DPdx 1268 - Store 1267(r011) 1269 - 1271: 68 Load 71(inF0) - 1272: 68 DPdxCoarse 1271 - Store 1270(r012) 1272 - 1274: 68 Load 71(inF0) - 1275: 68 DPdxFine 1274 - Store 1273(r013) 1275 - 1277: 68 Load 71(inF0) - 1278: 68 DPdy 1277 - Store 1276(r014) 1278 - 1280: 68 Load 71(inF0) - 1281: 68 DPdyCoarse 1280 - Store 1279(r015) 1281 - 1283: 68 Load 71(inF0) - 1284: 68 DPdyFine 1283 - Store 1282(r016) 1284 - 1286: 68 Load 71(inF0) - 1287: 68 ExtInst 1(GLSL.std.450) 12(Degrees) 1286 - Store 1285(r017) 1287 - 1289: 68 Load 71(inF0) - 1290: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 1289 - Store 1288(r018) 1290 - 1292: 68 Load 71(inF0) - 1293: 68 ExtInst 1(GLSL.std.450) 27(Exp) 1292 - Store 1291(r019) 1293 - 1295: 68 Load 71(inF0) - 1296: 68 ExtInst 1(GLSL.std.450) 29(Exp2) 1295 - Store 1294(R020) 1296 - 1298: 68 Load 71(inF0) - 1299: 68 ExtInst 1(GLSL.std.450) 8(Floor) 1298 - Store 1297(r021) 1299 - 1301: 68 Load 71(inF0) - 1302: 68 Load 72(inF1) - 1303: 36(fvec3) CompositeExtract 1301 0 - 1304: 36(fvec3) CompositeExtract 1302 0 - 1305: 36(fvec3) FMod 1303 1304 - 1306: 36(fvec3) CompositeExtract 1301 1 - 1307: 36(fvec3) CompositeExtract 1302 1 - 1308: 36(fvec3) FMod 1306 1307 - 1309: 36(fvec3) CompositeExtract 1301 2 - 1310: 36(fvec3) CompositeExtract 1302 2 - 1311: 36(fvec3) FMod 1309 1310 - 1312: 68 CompositeConstruct 1305 1308 1311 - Store 1300(r022) 1312 - 1314: 68 Load 71(inF0) - 1315: 68 ExtInst 1(GLSL.std.450) 10(Fract) 1314 - Store 1313(r023) 1315 - 1317: 68 Load 71(inF0) - 1318: 68 Fwidth 1317 - Store 1316(r025) 1318 - 1320: 68 Load 71(inF0) - 1321: 68 Load 72(inF1) - 1322: 68 ExtInst 1(GLSL.std.450) 53(Ldexp) 1320 1321 - Store 1319(r026) 1322 - 1324: 68 Load 71(inF0) - 1325: 68 Load 72(inF1) - 1326: 68 Load 73(inF2) - 1327: 68 ExtInst 1(GLSL.std.450) 46(FMix) 1324 1325 1326 - Store 1323(r026a) 1327 - 1329: 68 Load 71(inF0) - 1330: 68 ExtInst 1(GLSL.std.450) 28(Log) 1329 - Store 1328(r027) 1330 - 1332: 68 Load 71(inF0) - 1333: 68 ExtInst 1(GLSL.std.450) 30(Log2) 1332 - 1334: 68 MatrixTimesScalar 1333 260 - Store 1331(r028) 1334 - 1336: 68 Load 71(inF0) - 1337: 68 ExtInst 1(GLSL.std.450) 30(Log2) 1336 - Store 1335(r029) 1337 - 1339: 68 Load 71(inF0) - 1340: 68 Load 72(inF1) - 1341: 68 ExtInst 1(GLSL.std.450) 40(FMax) 1339 1340 - Store 1338(r030) 1341 - 1343: 68 Load 71(inF0) - 1344: 68 Load 72(inF1) - 1345: 68 ExtInst 1(GLSL.std.450) 37(FMin) 1343 1344 - Store 1342(r031) 1345 - 1347: 68 Load 71(inF0) - 1348: 68 Load 72(inF1) - 1349: 68 ExtInst 1(GLSL.std.450) 26(Pow) 1347 1348 - Store 1346(r032) 1349 - 1351: 68 Load 71(inF0) - 1352: 68 ExtInst 1(GLSL.std.450) 11(Radians) 1351 - Store 1350(r033) 1352 - 1354: 68 Load 71(inF0) - 1355: 68 ExtInst 1(GLSL.std.450) 2(RoundEven) 1354 - Store 1353(r034) 1355 - 1357: 68 Load 71(inF0) - 1358: 68 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 1357 - Store 1356(r035) 1358 - 1360: 68 Load 71(inF0) - 1361: 36(fvec3) CompositeConstruct 179 179 179 - 1362: 36(fvec3) CompositeConstruct 281 281 281 - 1363: 68 ExtInst 1(GLSL.std.450) 43(FClamp) 1360 1361 1362 - Store 1359(r036) 1363 - 1365: 68 Load 71(inF0) - 1366: 68 ExtInst 1(GLSL.std.450) 6(FSign) 1365 - Store 1364(r037) 1366 - 1368: 68 Load 71(inF0) - 1369: 68 ExtInst 1(GLSL.std.450) 13(Sin) 1368 - Store 1367(r038) 1369 - 1370: 68 Load 71(inF0) - 1371: 68 ExtInst 1(GLSL.std.450) 13(Sin) 1370 - Store 72(inF1) 1371 - 1372: 68 Load 71(inF0) - 1373: 68 ExtInst 1(GLSL.std.450) 14(Cos) 1372 - Store 73(inF2) 1373 - 1375: 68 Load 71(inF0) - 1376: 68 ExtInst 1(GLSL.std.450) 19(Sinh) 1375 - Store 1374(r039) 1376 - 1378: 68 Load 71(inF0) - 1379: 68 Load 72(inF1) - 1380: 68 Load 73(inF2) - 1381: 68 ExtInst 1(GLSL.std.450) 49(SmoothStep) 1378 1379 1380 - Store 1377(r049) 1381 - 1383: 68 Load 71(inF0) - 1384: 68 ExtInst 1(GLSL.std.450) 31(Sqrt) 1383 - Store 1382(r041) 1384 - 1386: 68 Load 71(inF0) - 1387: 68 Load 72(inF1) - 1388: 68 ExtInst 1(GLSL.std.450) 48(Step) 1386 1387 - Store 1385(r042) 1388 - 1390: 68 Load 71(inF0) - 1391: 68 ExtInst 1(GLSL.std.450) 15(Tan) 1390 - Store 1389(r043) 1391 - 1393: 68 Load 71(inF0) - 1394: 68 ExtInst 1(GLSL.std.450) 21(Tanh) 1393 - Store 1392(r044) 1394 - 1395: 68 Load 71(inF0) - 1396: 68 Transpose 1395 - 1398: 68 Load 71(inF0) - 1399: 68 ExtInst 1(GLSL.std.450) 3(Trunc) 1398 - Store 1397(r046) 1399 - ReturnValue 1401 + 641: Label + 644: 38(fvec3) Load 43(inF0) + 645: 38(fvec3) ExtInst 1(GLSL.std.450) 14(Cos) 644 + Store 643(r013) 645 + 647: 38(fvec3) Load 43(inF0) + 648: 38(fvec3) ExtInst 1(GLSL.std.450) 20(Cosh) 647 + Store 646(r014) 648 + 653: 40(ivec3) BitCount 652 + Store 649(r015) 653 + 655: 38(fvec3) Load 43(inF0) + 656: 38(fvec3) Load 44(inF1) + 657: 38(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 655 656 + Store 654(r016) 657 + 659: 38(fvec3) Load 43(inF0) + 660: 38(fvec3) DPdx 659 + Store 658(r017) 660 + 662: 38(fvec3) Load 43(inF0) + 663: 38(fvec3) DPdxCoarse 662 + Store 661(r018) 663 + 665: 38(fvec3) Load 43(inF0) + 666: 38(fvec3) DPdxFine 665 + Store 664(r019) 666 + 668: 38(fvec3) Load 43(inF0) + 669: 38(fvec3) DPdy 668 + Store 667(r020) 669 + 671: 38(fvec3) Load 43(inF0) + 672: 38(fvec3) DPdyCoarse 671 + Store 670(r021) 672 + 674: 38(fvec3) Load 43(inF0) + 675: 38(fvec3) DPdyFine 674 + Store 673(r022) 675 + 677: 38(fvec3) Load 43(inF0) + 678: 38(fvec3) ExtInst 1(GLSL.std.450) 12(Degrees) 677 + Store 676(r023) 678 + 680: 38(fvec3) Load 43(inF0) + 681: 38(fvec3) Load 44(inF1) + 682: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 680 681 + Store 679(r024) 682 + 684: 38(fvec3) Load 43(inF0) + 685: 38(fvec3) Load 44(inF1) + 686: 6(float) Dot 684 685 + Store 683(r025) 686 + 688: 38(fvec3) Load 43(inF0) + 689: 38(fvec3) ExtInst 1(GLSL.std.450) 27(Exp) 688 + Store 687(r029) 689 + 691: 38(fvec3) Load 43(inF0) + 692: 38(fvec3) ExtInst 1(GLSL.std.450) 29(Exp2) 691 + Store 690(r030) 692 + 694: 38(fvec3) Load 43(inF0) + 695: 38(fvec3) Load 44(inF1) + 696: 38(fvec3) Load 45(inF2) + 697: 38(fvec3) ExtInst 1(GLSL.std.450) 70(FaceForward) 694 695 696 + Store 693(r031) 697 + 701: 40(ivec3) ExtInst 1(GLSL.std.450) 75(FindUMsb) 700 + Store 698(r032) 701 + 703: 40(ivec3) ExtInst 1(GLSL.std.450) 73(FindILsb) 700 + Store 702(r033) 703 + 705: 38(fvec3) Load 43(inF0) + 706: 38(fvec3) ExtInst 1(GLSL.std.450) 8(Floor) 705 + Store 704(r034) 706 + 708: 38(fvec3) Load 43(inF0) + 709: 38(fvec3) Load 44(inF1) + 710: 38(fvec3) FMod 708 709 + Store 707(r036) 710 + 712: 38(fvec3) Load 43(inF0) + 713: 38(fvec3) ExtInst 1(GLSL.std.450) 10(Fract) 712 + Store 711(r037) 713 + 715: 38(fvec3) Load 43(inF0) + 716: 38(fvec3) Fwidth 715 + Store 714(r039) 716 + 719: 38(fvec3) Load 43(inF0) + 720: 587(bvec3) IsInf 719 + Store 718(r040) 720 + 722: 38(fvec3) Load 43(inF0) + 723: 587(bvec3) IsNan 722 + Store 721(r041) 723 + 725: 38(fvec3) Load 43(inF0) + 726: 38(fvec3) Load 44(inF1) + 727: 38(fvec3) ExtInst 1(GLSL.std.450) 53(Ldexp) 725 726 + Store 724(r042) 727 + 729: 38(fvec3) Load 43(inF0) + 730: 38(fvec3) Load 44(inF1) + 731: 38(fvec3) Load 45(inF2) + 732: 38(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 729 730 731 + Store 728(r039a) 732 + 734: 38(fvec3) Load 43(inF0) + 735: 38(fvec3) Load 44(inF1) + 737: 38(fvec3) CompositeConstruct 736 736 736 + 738: 38(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 734 735 737 + Store 733(r039b) 738 + 740: 38(fvec3) Load 43(inF0) + 741: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 740 + Store 739(r043) 741 + 743: 38(fvec3) Load 43(inF0) + 744: 38(fvec3) ExtInst 1(GLSL.std.450) 28(Log) 743 + Store 742(r044) 744 + 746: 38(fvec3) Load 43(inF0) + 747: 38(fvec3) ExtInst 1(GLSL.std.450) 30(Log2) 746 + 748: 38(fvec3) VectorTimesScalar 747 268 + Store 745(r045) 748 + 750: 38(fvec3) Load 43(inF0) + 751: 38(fvec3) ExtInst 1(GLSL.std.450) 30(Log2) 750 + Store 749(r046) 751 + 753: 38(fvec3) Load 43(inF0) + 754: 38(fvec3) Load 44(inF1) + 755: 38(fvec3) ExtInst 1(GLSL.std.450) 40(FMax) 753 754 + Store 752(r047) 755 + 757: 38(fvec3) Load 43(inF0) + 758: 38(fvec3) Load 44(inF1) + 759: 38(fvec3) ExtInst 1(GLSL.std.450) 37(FMin) 757 758 + Store 756(r048) 759 + 761: 38(fvec3) Load 43(inF0) + 762: 38(fvec3) ExtInst 1(GLSL.std.450) 69(Normalize) 761 + Store 760(r049) 762 + 764: 38(fvec3) Load 43(inF0) + 765: 38(fvec3) Load 44(inF1) + 766: 38(fvec3) ExtInst 1(GLSL.std.450) 26(Pow) 764 765 + Store 763(r050) 766 + 768: 38(fvec3) Load 43(inF0) + 769: 38(fvec3) ExtInst 1(GLSL.std.450) 11(Radians) 768 + Store 767(r051) 769 + 771: 38(fvec3) Load 43(inF0) + 772: 38(fvec3) CompositeConstruct 289 289 289 + 773: 38(fvec3) FDiv 772 771 + Store 770(r052) 773 + 775: 38(fvec3) Load 43(inF0) + 776: 38(fvec3) Load 44(inF1) + 777: 38(fvec3) ExtInst 1(GLSL.std.450) 71(Reflect) 775 776 + Store 774(r053) 777 + 779: 38(fvec3) Load 43(inF0) + 780: 38(fvec3) Load 44(inF1) + 781: 38(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 779 780 530 + Store 778(r054) 781 + 784: 40(ivec3) BitReverse 783 + Store 782(r055) 784 + 786: 38(fvec3) Load 43(inF0) + 787: 38(fvec3) ExtInst 1(GLSL.std.450) 2(RoundEven) 786 + Store 785(r056) 787 + 789: 38(fvec3) Load 43(inF0) + 790: 38(fvec3) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 789 + Store 788(r057) 790 + 792: 38(fvec3) Load 43(inF0) + 793: 38(fvec3) CompositeConstruct 141 141 141 + 794: 38(fvec3) CompositeConstruct 289 289 289 + 795: 38(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 792 793 794 + Store 791(r058) 795 + 797: 38(fvec3) Load 43(inF0) + 798: 38(fvec3) ExtInst 1(GLSL.std.450) 6(FSign) 797 + Store 796(r059) 798 + 800: 38(fvec3) Load 43(inF0) + 801: 38(fvec3) ExtInst 1(GLSL.std.450) 13(Sin) 800 + Store 799(r060) 801 + 802: 38(fvec3) Load 43(inF0) + 803: 38(fvec3) ExtInst 1(GLSL.std.450) 13(Sin) 802 + Store 44(inF1) 803 + 804: 38(fvec3) Load 43(inF0) + 805: 38(fvec3) ExtInst 1(GLSL.std.450) 14(Cos) 804 + Store 45(inF2) 805 + 807: 38(fvec3) Load 43(inF0) + 808: 38(fvec3) ExtInst 1(GLSL.std.450) 19(Sinh) 807 + Store 806(r061) 808 + 810: 38(fvec3) Load 43(inF0) + 811: 38(fvec3) Load 44(inF1) + 812: 38(fvec3) Load 45(inF2) + 813: 38(fvec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 810 811 812 + Store 809(r062) 813 + 815: 38(fvec3) Load 43(inF0) + 816: 38(fvec3) ExtInst 1(GLSL.std.450) 31(Sqrt) 815 + Store 814(r063) 816 + 818: 38(fvec3) Load 43(inF0) + 819: 38(fvec3) Load 44(inF1) + 820: 38(fvec3) ExtInst 1(GLSL.std.450) 48(Step) 818 819 + Store 817(r064) 820 + 822: 38(fvec3) Load 43(inF0) + 823: 38(fvec3) ExtInst 1(GLSL.std.450) 15(Tan) 822 + Store 821(r065) 823 + 825: 38(fvec3) Load 43(inF0) + 826: 38(fvec3) ExtInst 1(GLSL.std.450) 21(Tanh) 825 + Store 824(r066) 826 + 828: 38(fvec3) Load 43(inF0) + 829: 38(fvec3) ExtInst 1(GLSL.std.450) 3(Trunc) 828 + Store 827(r067) 829 + ReturnValue 831 FunctionEnd -82(PixelShaderFunction4x4(mf44;mf44;mf44;): 76 Function None 78 - 79(inF0): 77(ptr) FunctionParameter - 80(inF1): 77(ptr) FunctionParameter - 81(inF2): 77(ptr) FunctionParameter - 83: Label - 1404(r000): 136(ptr) Variable Function - 1407(r001): 77(ptr) Variable Function - 1412(r003): 136(ptr) Variable Function - 1415(r004): 77(ptr) Variable Function - 1418(r005): 77(ptr) Variable Function - 1421(r006): 77(ptr) Variable Function - 1425(r007): 77(ptr) Variable Function - 1436(r008): 77(ptr) Variable Function - 1441(r009): 77(ptr) Variable Function - 1444(r010): 77(ptr) Variable Function - 1447(r011): 77(ptr) Variable Function - 1450(r012): 77(ptr) Variable Function - 1453(r013): 77(ptr) Variable Function - 1456(r014): 77(ptr) Variable Function - 1459(r015): 77(ptr) Variable Function - 1462(r016): 77(ptr) Variable Function - 1465(r017): 77(ptr) Variable Function - 1468(r018): 7(ptr) Variable Function - 1471(r019): 77(ptr) Variable Function - 1474(R020): 77(ptr) Variable Function - 1477(r021): 77(ptr) Variable Function - 1480(r022): 77(ptr) Variable Function - 1496(r023): 77(ptr) Variable Function - 1499(r025): 77(ptr) Variable Function - 1502(r026): 77(ptr) Variable Function - 1506(r026a): 77(ptr) Variable Function - 1511(r027): 77(ptr) Variable Function - 1514(r028): 77(ptr) Variable Function - 1518(r029): 77(ptr) Variable Function - 1521(r030): 77(ptr) Variable Function - 1525(r031): 77(ptr) Variable Function - 1529(r032): 77(ptr) Variable Function - 1533(r033): 77(ptr) Variable Function - 1536(r034): 77(ptr) Variable Function - 1539(r035): 77(ptr) Variable Function - 1542(r036): 77(ptr) Variable Function - 1547(r037): 77(ptr) Variable Function - 1550(r038): 77(ptr) Variable Function - 1557(r039): 77(ptr) Variable Function - 1560(r049): 77(ptr) Variable Function - 1565(r041): 77(ptr) Variable Function - 1568(r042): 77(ptr) Variable Function - 1572(r043): 77(ptr) Variable Function - 1575(r044): 77(ptr) Variable Function - 1580(r046): 77(ptr) Variable Function - 1405: 76 Load 79(inF0) - 1406: 135(bool) All 1405 - Store 1404(r000) 1406 - 1408: 76 Load 79(inF0) - 1409: 76 ExtInst 1(GLSL.std.450) 4(FAbs) 1408 - Store 1407(r001) 1409 - 1410: 76 Load 79(inF0) - 1411: 76 ExtInst 1(GLSL.std.450) 17(Acos) 1410 - 1413: 76 Load 79(inF0) - 1414: 135(bool) Any 1413 - Store 1412(r003) 1414 - 1416: 76 Load 79(inF0) - 1417: 76 ExtInst 1(GLSL.std.450) 16(Asin) 1416 - Store 1415(r004) 1417 - 1419: 76 Load 79(inF0) - 1420: 76 ExtInst 1(GLSL.std.450) 18(Atan) 1419 - Store 1418(r005) 1420 - 1422: 76 Load 79(inF0) - 1423: 76 Load 80(inF1) - 1424: 76 ExtInst 1(GLSL.std.450) 25(Atan2) 1422 1423 - Store 1421(r006) 1424 - 1426: 76 Load 79(inF0) - 1427: 76 ExtInst 1(GLSL.std.450) 9(Ceil) 1426 - Store 1425(r007) 1427 - 1428: 76 Load 79(inF0) - 1431: 1430 FOrdLessThan 1428 1429 - 1432: 135(bool) Any 1431 - SelectionMerge 1434 None - BranchConditional 1432 1433 1434 - 1433: Label +60(PixelShaderFunction(vf4;vf4;vf4;vu4;vu4;): 50(fvec4) Function None 54 + 55(inF0): 51(ptr) FunctionParameter + 56(inF1): 51(ptr) FunctionParameter + 57(inF2): 51(ptr) FunctionParameter + 58(inU0): 53(ptr) FunctionParameter + 59(inU1): 53(ptr) FunctionParameter + 61: Label + 834(r000): 138(ptr) Variable Function + 840(r001): 51(ptr) Variable Function + 843(r002): 51(ptr) Variable Function + 846(r003): 138(ptr) Variable Function + 850(r004): 51(ptr) Variable Function + 855(r005): 854(ptr) Variable Function + 858(r006): 53(ptr) Variable Function + 861(r007): 51(ptr) Variable Function + 864(r009): 51(ptr) Variable Function + 867(r010): 51(ptr) Variable Function + 871(r011): 51(ptr) Variable Function + 874(r012): 51(ptr) Variable Function + 892(r013): 51(ptr) Variable Function + 895(r014): 51(ptr) Variable Function + 898(r015): 53(ptr) Variable Function + 901(r016): 51(ptr) Variable Function + 904(r017): 51(ptr) Variable Function + 907(r018): 51(ptr) Variable Function + 910(r019): 51(ptr) Variable Function + 913(r020): 51(ptr) Variable Function + 916(r021): 51(ptr) Variable Function + 919(r022): 51(ptr) Variable Function + 922(r023): 7(ptr) Variable Function + 926(r024): 7(ptr) Variable Function + 930(r025): 51(ptr) Variable Function + 941(r029): 51(ptr) Variable Function + 944(r030): 51(ptr) Variable Function + 947(r031): 51(ptr) Variable Function + 952(r032): 53(ptr) Variable Function + 957(r033): 53(ptr) Variable Function + 959(r034): 51(ptr) Variable Function + 962(r036): 51(ptr) Variable Function + 966(r037): 51(ptr) Variable Function + 969(r039): 51(ptr) Variable Function + 973(r040): 972(ptr) Variable Function + 976(r041): 972(ptr) Variable Function + 979(r042): 51(ptr) Variable Function + 983(r039a): 51(ptr) Variable Function + 988(r043): 7(ptr) Variable Function + 991(r044): 51(ptr) Variable Function + 994(r045): 51(ptr) Variable Function + 998(r046): 51(ptr) Variable Function + 1001(r047): 51(ptr) Variable Function + 1005(r048): 51(ptr) Variable Function + 1009(r049): 51(ptr) Variable Function + 1012(r050): 51(ptr) Variable Function + 1016(r051): 51(ptr) Variable Function + 1019(r052): 51(ptr) Variable Function + 1023(r053): 51(ptr) Variable Function + 1027(r054): 51(ptr) Variable Function + 1031(r055): 53(ptr) Variable Function + 1034(r056): 51(ptr) Variable Function + 1037(r057): 51(ptr) Variable Function + 1040(r058): 51(ptr) Variable Function + 1045(r059): 51(ptr) Variable Function + 1048(r060): 51(ptr) Variable Function + 1055(r061): 51(ptr) Variable Function + 1058(r062): 51(ptr) Variable Function + 1063(r063): 51(ptr) Variable Function + 1066(r064): 51(ptr) Variable Function + 1070(r065): 51(ptr) Variable Function + 1073(r066): 51(ptr) Variable Function + 1076(r067): 51(ptr) Variable Function + 835: 50(fvec4) Load 55(inF0) + 838: 836(bvec4) FOrdNotEqual 835 837 + 839: 137(bool) All 838 + Store 834(r000) 839 + 841: 50(fvec4) Load 55(inF0) + 842: 50(fvec4) ExtInst 1(GLSL.std.450) 4(FAbs) 841 + Store 840(r001) 842 + 844: 50(fvec4) Load 55(inF0) + 845: 50(fvec4) ExtInst 1(GLSL.std.450) 17(Acos) 844 + Store 843(r002) 845 + 847: 50(fvec4) Load 55(inF0) + 848: 836(bvec4) FOrdNotEqual 847 837 + 849: 137(bool) Any 848 + Store 846(r003) 849 + 851: 50(fvec4) Load 55(inF0) + 852: 50(fvec4) ExtInst 1(GLSL.std.450) 16(Asin) 851 + Store 850(r004) 852 + 856: 50(fvec4) Load 55(inF0) + 857: 853(ivec4) Bitcast 856 + Store 855(r005) 857 + 859: 50(fvec4) Load 55(inF0) + 860: 52(ivec4) Bitcast 859 + Store 858(r006) 860 + 862: 52(ivec4) Load 58(inU0) + 863: 50(fvec4) Bitcast 862 + Store 861(r007) 863 + 865: 50(fvec4) Load 55(inF0) + 866: 50(fvec4) ExtInst 1(GLSL.std.450) 18(Atan) 865 + Store 864(r009) 866 + 868: 50(fvec4) Load 55(inF0) + 869: 50(fvec4) Load 56(inF1) + 870: 50(fvec4) ExtInst 1(GLSL.std.450) 25(Atan2) 868 869 + Store 867(r010) 870 + 872: 50(fvec4) Load 55(inF0) + 873: 50(fvec4) ExtInst 1(GLSL.std.450) 9(Ceil) 872 + Store 871(r011) 873 + 875: 50(fvec4) Load 55(inF0) + 876: 50(fvec4) Load 56(inF1) + 877: 50(fvec4) Load 57(inF2) + 878: 50(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 875 876 877 + Store 874(r012) 878 + 879: 50(fvec4) Load 55(inF0) + 880: 836(bvec4) FOrdLessThan 879 837 + 881: 137(bool) Any 880 + SelectionMerge 883 None + BranchConditional 881 882 883 + 882: Label Kill - 1434: Label - 1437: 76 Load 79(inF0) - 1438: 76 Load 80(inF1) - 1439: 76 Load 81(inF2) - 1440: 76 ExtInst 1(GLSL.std.450) 43(FClamp) 1437 1438 1439 - Store 1436(r008) 1440 - 1442: 76 Load 79(inF0) - 1443: 76 ExtInst 1(GLSL.std.450) 14(Cos) 1442 - Store 1441(r009) 1443 - 1445: 76 Load 79(inF0) - 1446: 76 ExtInst 1(GLSL.std.450) 20(Cosh) 1445 - Store 1444(r010) 1446 - 1448: 76 Load 79(inF0) - 1449: 76 DPdx 1448 - Store 1447(r011) 1449 - 1451: 76 Load 79(inF0) - 1452: 76 DPdxCoarse 1451 - Store 1450(r012) 1452 - 1454: 76 Load 79(inF0) - 1455: 76 DPdxFine 1454 - Store 1453(r013) 1455 - 1457: 76 Load 79(inF0) - 1458: 76 DPdy 1457 - Store 1456(r014) 1458 - 1460: 76 Load 79(inF0) - 1461: 76 DPdyCoarse 1460 - Store 1459(r015) 1461 - 1463: 76 Load 79(inF0) - 1464: 76 DPdyFine 1463 - Store 1462(r016) 1464 - 1466: 76 Load 79(inF0) - 1467: 76 ExtInst 1(GLSL.std.450) 12(Degrees) 1466 - Store 1465(r017) 1467 - 1469: 76 Load 79(inF0) - 1470: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 1469 - Store 1468(r018) 1470 - 1472: 76 Load 79(inF0) - 1473: 76 ExtInst 1(GLSL.std.450) 27(Exp) 1472 - Store 1471(r019) 1473 - 1475: 76 Load 79(inF0) - 1476: 76 ExtInst 1(GLSL.std.450) 29(Exp2) 1475 - Store 1474(R020) 1476 - 1478: 76 Load 79(inF0) - 1479: 76 ExtInst 1(GLSL.std.450) 8(Floor) 1478 - Store 1477(r021) 1479 - 1481: 76 Load 79(inF0) - 1482: 76 Load 80(inF1) - 1483: 48(fvec4) CompositeExtract 1481 0 - 1484: 48(fvec4) CompositeExtract 1482 0 - 1485: 48(fvec4) FMod 1483 1484 - 1486: 48(fvec4) CompositeExtract 1481 1 - 1487: 48(fvec4) CompositeExtract 1482 1 - 1488: 48(fvec4) FMod 1486 1487 - 1489: 48(fvec4) CompositeExtract 1481 2 - 1490: 48(fvec4) CompositeExtract 1482 2 - 1491: 48(fvec4) FMod 1489 1490 - 1492: 48(fvec4) CompositeExtract 1481 3 - 1493: 48(fvec4) CompositeExtract 1482 3 - 1494: 48(fvec4) FMod 1492 1493 - 1495: 76 CompositeConstruct 1485 1488 1491 1494 - Store 1480(r022) 1495 - 1497: 76 Load 79(inF0) - 1498: 76 ExtInst 1(GLSL.std.450) 10(Fract) 1497 - Store 1496(r023) 1498 - 1500: 76 Load 79(inF0) - 1501: 76 Fwidth 1500 - Store 1499(r025) 1501 - 1503: 76 Load 79(inF0) - 1504: 76 Load 80(inF1) - 1505: 76 ExtInst 1(GLSL.std.450) 53(Ldexp) 1503 1504 - Store 1502(r026) 1505 - 1507: 76 Load 79(inF0) - 1508: 76 Load 80(inF1) - 1509: 76 Load 81(inF2) - 1510: 76 ExtInst 1(GLSL.std.450) 46(FMix) 1507 1508 1509 - Store 1506(r026a) 1510 - 1512: 76 Load 79(inF0) - 1513: 76 ExtInst 1(GLSL.std.450) 28(Log) 1512 - Store 1511(r027) 1513 - 1515: 76 Load 79(inF0) - 1516: 76 ExtInst 1(GLSL.std.450) 30(Log2) 1515 - 1517: 76 MatrixTimesScalar 1516 260 - Store 1514(r028) 1517 - 1519: 76 Load 79(inF0) - 1520: 76 ExtInst 1(GLSL.std.450) 30(Log2) 1519 - Store 1518(r029) 1520 - 1522: 76 Load 79(inF0) - 1523: 76 Load 80(inF1) - 1524: 76 ExtInst 1(GLSL.std.450) 40(FMax) 1522 1523 - Store 1521(r030) 1524 - 1526: 76 Load 79(inF0) - 1527: 76 Load 80(inF1) - 1528: 76 ExtInst 1(GLSL.std.450) 37(FMin) 1526 1527 - Store 1525(r031) 1528 - 1530: 76 Load 79(inF0) - 1531: 76 Load 80(inF1) - 1532: 76 ExtInst 1(GLSL.std.450) 26(Pow) 1530 1531 - Store 1529(r032) 1532 - 1534: 76 Load 79(inF0) - 1535: 76 ExtInst 1(GLSL.std.450) 11(Radians) 1534 - Store 1533(r033) 1535 - 1537: 76 Load 79(inF0) - 1538: 76 ExtInst 1(GLSL.std.450) 2(RoundEven) 1537 - Store 1536(r034) 1538 - 1540: 76 Load 79(inF0) - 1541: 76 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 1540 - Store 1539(r035) 1541 - 1543: 76 Load 79(inF0) - 1544: 48(fvec4) CompositeConstruct 179 179 179 179 - 1545: 48(fvec4) CompositeConstruct 281 281 281 281 - 1546: 76 ExtInst 1(GLSL.std.450) 43(FClamp) 1543 1544 1545 - Store 1542(r036) 1546 - 1548: 76 Load 79(inF0) - 1549: 76 ExtInst 1(GLSL.std.450) 6(FSign) 1548 - Store 1547(r037) 1549 - 1551: 76 Load 79(inF0) - 1552: 76 ExtInst 1(GLSL.std.450) 13(Sin) 1551 - Store 1550(r038) 1552 - 1553: 76 Load 79(inF0) - 1554: 76 ExtInst 1(GLSL.std.450) 13(Sin) 1553 - Store 80(inF1) 1554 - 1555: 76 Load 79(inF0) - 1556: 76 ExtInst 1(GLSL.std.450) 14(Cos) 1555 - Store 81(inF2) 1556 - 1558: 76 Load 79(inF0) - 1559: 76 ExtInst 1(GLSL.std.450) 19(Sinh) 1558 - Store 1557(r039) 1559 - 1561: 76 Load 79(inF0) - 1562: 76 Load 80(inF1) - 1563: 76 Load 81(inF2) - 1564: 76 ExtInst 1(GLSL.std.450) 49(SmoothStep) 1561 1562 1563 - Store 1560(r049) 1564 - 1566: 76 Load 79(inF0) - 1567: 76 ExtInst 1(GLSL.std.450) 31(Sqrt) 1566 - Store 1565(r041) 1567 - 1569: 76 Load 79(inF0) - 1570: 76 Load 80(inF1) - 1571: 76 ExtInst 1(GLSL.std.450) 48(Step) 1569 1570 - Store 1568(r042) 1571 - 1573: 76 Load 79(inF0) - 1574: 76 ExtInst 1(GLSL.std.450) 15(Tan) 1573 - Store 1572(r043) 1574 - 1576: 76 Load 79(inF0) - 1577: 76 ExtInst 1(GLSL.std.450) 21(Tanh) 1576 - Store 1575(r044) 1577 - 1578: 76 Load 79(inF0) - 1579: 76 Transpose 1578 - 1581: 76 Load 79(inF0) - 1582: 76 ExtInst 1(GLSL.std.450) 3(Trunc) 1581 - Store 1580(r046) 1582 - ReturnValue 1584 + 883: Label + 885: 52(ivec4) Load 58(inU0) + 887: 836(bvec4) ULessThan 885 886 + 888: 137(bool) Any 887 + SelectionMerge 890 None + BranchConditional 888 889 890 + 889: Label + Kill + 890: Label + 893: 50(fvec4) Load 55(inF0) + 894: 50(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 893 + Store 892(r013) 894 + 896: 50(fvec4) Load 55(inF0) + 897: 50(fvec4) ExtInst 1(GLSL.std.450) 20(Cosh) 896 + Store 895(r014) 897 + 900: 52(ivec4) BitCount 899 + Store 898(r015) 900 + 902: 50(fvec4) Load 55(inF0) + 903: 50(fvec4) DPdx 902 + Store 901(r016) 903 + 905: 50(fvec4) Load 55(inF0) + 906: 50(fvec4) DPdxCoarse 905 + Store 904(r017) 906 + 908: 50(fvec4) Load 55(inF0) + 909: 50(fvec4) DPdxFine 908 + Store 907(r018) 909 + 911: 50(fvec4) Load 55(inF0) + 912: 50(fvec4) DPdy 911 + Store 910(r019) 912 + 914: 50(fvec4) Load 55(inF0) + 915: 50(fvec4) DPdyCoarse 914 + Store 913(r020) 915 + 917: 50(fvec4) Load 55(inF0) + 918: 50(fvec4) DPdyFine 917 + Store 916(r021) 918 + 920: 50(fvec4) Load 55(inF0) + 921: 50(fvec4) ExtInst 1(GLSL.std.450) 12(Degrees) 920 + Store 919(r022) 921 + 923: 50(fvec4) Load 55(inF0) + 924: 50(fvec4) Load 56(inF1) + 925: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 923 924 + Store 922(r023) 925 + 927: 50(fvec4) Load 55(inF0) + 928: 50(fvec4) Load 56(inF1) + 929: 6(float) Dot 927 928 + Store 926(r024) 929 + 931: 7(ptr) AccessChain 55(inF0) 533 + 932: 6(float) Load 931 + 933: 7(ptr) AccessChain 56(inF1) 533 + 934: 6(float) Load 933 + 935: 6(float) FMul 932 934 + 936: 7(ptr) AccessChain 55(inF0) 534 + 937: 6(float) Load 936 + 938: 7(ptr) AccessChain 56(inF1) 650 + 939: 6(float) Load 938 + 940: 50(fvec4) CompositeConstruct 289 935 937 939 + Store 930(r025) 940 + 942: 50(fvec4) Load 55(inF0) + 943: 50(fvec4) ExtInst 1(GLSL.std.450) 27(Exp) 942 + Store 941(r029) 943 + 945: 50(fvec4) Load 55(inF0) + 946: 50(fvec4) ExtInst 1(GLSL.std.450) 29(Exp2) 945 + Store 944(r030) 946 + 948: 50(fvec4) Load 55(inF0) + 949: 50(fvec4) Load 56(inF1) + 950: 50(fvec4) Load 57(inF2) + 951: 50(fvec4) ExtInst 1(GLSL.std.450) 70(FaceForward) 948 949 950 + Store 947(r031) 951 + 956: 52(ivec4) ExtInst 1(GLSL.std.450) 75(FindUMsb) 955 + Store 952(r032) 956 + 958: 52(ivec4) ExtInst 1(GLSL.std.450) 73(FindILsb) 955 + Store 957(r033) 958 + 960: 50(fvec4) Load 55(inF0) + 961: 50(fvec4) ExtInst 1(GLSL.std.450) 8(Floor) 960 + Store 959(r034) 961 + 963: 50(fvec4) Load 55(inF0) + 964: 50(fvec4) Load 56(inF1) + 965: 50(fvec4) FMod 963 964 + Store 962(r036) 965 + 967: 50(fvec4) Load 55(inF0) + 968: 50(fvec4) ExtInst 1(GLSL.std.450) 10(Fract) 967 + Store 966(r037) 968 + 970: 50(fvec4) Load 55(inF0) + 971: 50(fvec4) Fwidth 970 + Store 969(r039) 971 + 974: 50(fvec4) Load 55(inF0) + 975: 836(bvec4) IsInf 974 + Store 973(r040) 975 + 977: 50(fvec4) Load 55(inF0) + 978: 836(bvec4) IsNan 977 + Store 976(r041) 978 + 980: 50(fvec4) Load 55(inF0) + 981: 50(fvec4) Load 56(inF1) + 982: 50(fvec4) ExtInst 1(GLSL.std.450) 53(Ldexp) 980 981 + Store 979(r042) 982 + 984: 50(fvec4) Load 55(inF0) + 985: 50(fvec4) Load 56(inF1) + 986: 50(fvec4) Load 57(inF2) + 987: 50(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 984 985 986 + Store 983(r039a) 987 + 989: 50(fvec4) Load 55(inF0) + 990: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 989 + Store 988(r043) 990 + 992: 50(fvec4) Load 55(inF0) + 993: 50(fvec4) ExtInst 1(GLSL.std.450) 28(Log) 992 + Store 991(r044) 993 + 995: 50(fvec4) Load 55(inF0) + 996: 50(fvec4) ExtInst 1(GLSL.std.450) 30(Log2) 995 + 997: 50(fvec4) VectorTimesScalar 996 268 + Store 994(r045) 997 + 999: 50(fvec4) Load 55(inF0) + 1000: 50(fvec4) ExtInst 1(GLSL.std.450) 30(Log2) 999 + Store 998(r046) 1000 + 1002: 50(fvec4) Load 55(inF0) + 1003: 50(fvec4) Load 56(inF1) + 1004: 50(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 1002 1003 + Store 1001(r047) 1004 + 1006: 50(fvec4) Load 55(inF0) + 1007: 50(fvec4) Load 56(inF1) + 1008: 50(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 1006 1007 + Store 1005(r048) 1008 + 1010: 50(fvec4) Load 55(inF0) + 1011: 50(fvec4) ExtInst 1(GLSL.std.450) 69(Normalize) 1010 + Store 1009(r049) 1011 + 1013: 50(fvec4) Load 55(inF0) + 1014: 50(fvec4) Load 56(inF1) + 1015: 50(fvec4) ExtInst 1(GLSL.std.450) 26(Pow) 1013 1014 + Store 1012(r050) 1015 + 1017: 50(fvec4) Load 55(inF0) + 1018: 50(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 1017 + Store 1016(r051) 1018 + 1020: 50(fvec4) Load 55(inF0) + 1021: 50(fvec4) CompositeConstruct 289 289 289 289 + 1022: 50(fvec4) FDiv 1021 1020 + Store 1019(r052) 1022 + 1024: 50(fvec4) Load 55(inF0) + 1025: 50(fvec4) Load 56(inF1) + 1026: 50(fvec4) ExtInst 1(GLSL.std.450) 71(Reflect) 1024 1025 + Store 1023(r053) 1026 + 1028: 50(fvec4) Load 55(inF0) + 1029: 50(fvec4) Load 56(inF1) + 1030: 50(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 1028 1029 530 + Store 1027(r054) 1030 + 1033: 52(ivec4) BitReverse 1032 + Store 1031(r055) 1033 + 1035: 50(fvec4) Load 55(inF0) + 1036: 50(fvec4) ExtInst 1(GLSL.std.450) 2(RoundEven) 1035 + Store 1034(r056) 1036 + 1038: 50(fvec4) Load 55(inF0) + 1039: 50(fvec4) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 1038 + Store 1037(r057) 1039 + 1041: 50(fvec4) Load 55(inF0) + 1042: 50(fvec4) CompositeConstruct 141 141 141 141 + 1043: 50(fvec4) CompositeConstruct 289 289 289 289 + 1044: 50(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 1041 1042 1043 + Store 1040(r058) 1044 + 1046: 50(fvec4) Load 55(inF0) + 1047: 50(fvec4) ExtInst 1(GLSL.std.450) 6(FSign) 1046 + Store 1045(r059) 1047 + 1049: 50(fvec4) Load 55(inF0) + 1050: 50(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 1049 + Store 1048(r060) 1050 + 1051: 50(fvec4) Load 55(inF0) + 1052: 50(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 1051 + Store 56(inF1) 1052 + 1053: 50(fvec4) Load 55(inF0) + 1054: 50(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 1053 + Store 57(inF2) 1054 + 1056: 50(fvec4) Load 55(inF0) + 1057: 50(fvec4) ExtInst 1(GLSL.std.450) 19(Sinh) 1056 + Store 1055(r061) 1057 + 1059: 50(fvec4) Load 55(inF0) + 1060: 50(fvec4) Load 56(inF1) + 1061: 50(fvec4) Load 57(inF2) + 1062: 50(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 1059 1060 1061 + Store 1058(r062) 1062 + 1064: 50(fvec4) Load 55(inF0) + 1065: 50(fvec4) ExtInst 1(GLSL.std.450) 31(Sqrt) 1064 + Store 1063(r063) 1065 + 1067: 50(fvec4) Load 55(inF0) + 1068: 50(fvec4) Load 56(inF1) + 1069: 50(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 1067 1068 + Store 1066(r064) 1069 + 1071: 50(fvec4) Load 55(inF0) + 1072: 50(fvec4) ExtInst 1(GLSL.std.450) 15(Tan) 1071 + Store 1070(r065) 1072 + 1074: 50(fvec4) Load 55(inF0) + 1075: 50(fvec4) ExtInst 1(GLSL.std.450) 21(Tanh) 1074 + Store 1073(r066) 1075 + 1077: 50(fvec4) Load 55(inF0) + 1078: 50(fvec4) ExtInst 1(GLSL.std.450) 3(Trunc) 1077 + Store 1076(r067) 1078 + ReturnValue 1080 FunctionEnd -91(TestGenMul2(f1;f1;vf2;vf2;mf22;mf22;): 2 Function None 84 - 85(inF0): 7(ptr) FunctionParameter - 86(inF1): 7(ptr) FunctionParameter - 87(inFV0): 25(ptr) FunctionParameter - 88(inFV1): 25(ptr) FunctionParameter - 89(inFM0): 61(ptr) FunctionParameter - 90(inFM1): 61(ptr) FunctionParameter - 92: Label - 1587(r0): 7(ptr) Variable Function - 1591(r1): 25(ptr) Variable Function - 1595(r2): 25(ptr) Variable Function - 1599(r3): 7(ptr) Variable Function - 1603(r4): 25(ptr) Variable Function - 1607(r5): 25(ptr) Variable Function - 1611(r6): 61(ptr) Variable Function - 1615(r7): 61(ptr) Variable Function - 1619(r8): 61(ptr) Variable Function - 1588: 6(float) Load 86(inF1) - 1589: 6(float) Load 85(inF0) - 1590: 6(float) FMul 1588 1589 - Store 1587(r0) 1590 - 1592: 6(float) Load 85(inF0) - 1593: 24(fvec2) Load 87(inFV0) - 1594: 24(fvec2) VectorTimesScalar 1593 1592 - Store 1591(r1) 1594 - 1596: 24(fvec2) Load 87(inFV0) - 1597: 6(float) Load 85(inF0) - 1598: 24(fvec2) VectorTimesScalar 1596 1597 - Store 1595(r2) 1598 - 1600: 24(fvec2) Load 87(inFV0) - 1601: 24(fvec2) Load 88(inFV1) - 1602: 6(float) Dot 1600 1601 - Store 1599(r3) 1602 - 1604: 24(fvec2) Load 87(inFV0) - 1605: 60 Load 89(inFM0) - 1606: 24(fvec2) VectorTimesMatrix 1604 1605 - Store 1603(r4) 1606 - 1608: 60 Load 89(inFM0) - 1609: 24(fvec2) Load 87(inFV0) - 1610: 24(fvec2) MatrixTimesVector 1608 1609 - Store 1607(r5) 1610 - 1612: 6(float) Load 85(inF0) - 1613: 60 Load 89(inFM0) - 1614: 60 MatrixTimesScalar 1613 1612 - Store 1611(r6) 1614 - 1616: 60 Load 89(inFM0) - 1617: 6(float) Load 85(inF0) - 1618: 60 MatrixTimesScalar 1616 1617 - Store 1615(r7) 1618 - 1620: 60 Load 90(inFM1) - 1621: 60 Load 89(inFM0) - 1622: 60 MatrixTimesMatrix 1620 1621 - Store 1619(r8) 1622 +68(PixelShaderFunction2x2(mf22;mf22;mf22;): 62 Function None 64 + 65(inF0): 63(ptr) FunctionParameter + 66(inF1): 63(ptr) FunctionParameter + 67(inF2): 63(ptr) FunctionParameter + 69: Label + 1083(r000): 138(ptr) Variable Function + 1088(r001): 63(ptr) Variable Function + 1093(r003): 138(ptr) Variable Function + 1097(r004): 63(ptr) Variable Function + 1100(r005): 63(ptr) Variable Function + 1103(r006): 63(ptr) Variable Function + 1107(r007): 63(ptr) Variable Function + 1117(r008): 63(ptr) Variable Function + 1122(r009): 63(ptr) Variable Function + 1125(r010): 63(ptr) Variable Function + 1128(r011): 63(ptr) Variable Function + 1131(r012): 63(ptr) Variable Function + 1134(r013): 63(ptr) Variable Function + 1137(r014): 63(ptr) Variable Function + 1140(r015): 63(ptr) Variable Function + 1143(r016): 63(ptr) Variable Function + 1146(r017): 63(ptr) Variable Function + 1149(r018): 7(ptr) Variable Function + 1152(r019): 63(ptr) Variable Function + 1155(R020): 63(ptr) Variable Function + 1158(r021): 63(ptr) Variable Function + 1161(r022): 63(ptr) Variable Function + 1171(r023): 63(ptr) Variable Function + 1174(r025): 63(ptr) Variable Function + 1177(r026): 63(ptr) Variable Function + 1181(r026a): 63(ptr) Variable Function + 1186(r027): 63(ptr) Variable Function + 1189(r028): 63(ptr) Variable Function + 1193(r029): 63(ptr) Variable Function + 1196(r030): 63(ptr) Variable Function + 1200(r031): 63(ptr) Variable Function + 1204(r032): 63(ptr) Variable Function + 1208(r033): 63(ptr) Variable Function + 1211(r034): 63(ptr) Variable Function + 1214(r035): 63(ptr) Variable Function + 1217(r036): 63(ptr) Variable Function + 1222(r037): 63(ptr) Variable Function + 1225(r038): 63(ptr) Variable Function + 1232(r039): 63(ptr) Variable Function + 1235(r049): 63(ptr) Variable Function + 1240(r041): 63(ptr) Variable Function + 1243(r042): 63(ptr) Variable Function + 1247(r043): 63(ptr) Variable Function + 1250(r044): 63(ptr) Variable Function + 1255(r046): 63(ptr) Variable Function + 1084: 62 Load 65(inF0) + 1086: 1085 FOrdNotEqual 1084 141 + 1087: 137(bool) All 1086 + Store 1083(r000) 1087 + 1089: 62 Load 65(inF0) + 1090: 62 ExtInst 1(GLSL.std.450) 4(FAbs) 1089 + Store 1088(r001) 1090 + 1091: 62 Load 65(inF0) + 1092: 62 ExtInst 1(GLSL.std.450) 17(Acos) 1091 + 1094: 62 Load 65(inF0) + 1095: 1085 FOrdNotEqual 1094 141 + 1096: 137(bool) Any 1095 + Store 1093(r003) 1096 + 1098: 62 Load 65(inF0) + 1099: 62 ExtInst 1(GLSL.std.450) 16(Asin) 1098 + Store 1097(r004) 1099 + 1101: 62 Load 65(inF0) + 1102: 62 ExtInst 1(GLSL.std.450) 18(Atan) 1101 + Store 1100(r005) 1102 + 1104: 62 Load 65(inF0) + 1105: 62 Load 66(inF1) + 1106: 62 ExtInst 1(GLSL.std.450) 25(Atan2) 1104 1105 + Store 1103(r006) 1106 + 1108: 62 Load 65(inF0) + 1109: 62 ExtInst 1(GLSL.std.450) 9(Ceil) 1108 + Store 1107(r007) 1109 + 1110: 62 Load 65(inF0) + 1112: 1085 FOrdLessThan 1110 1111 + 1113: 137(bool) Any 1112 + SelectionMerge 1115 None + BranchConditional 1113 1114 1115 + 1114: Label + Kill + 1115: Label + 1118: 62 Load 65(inF0) + 1119: 62 Load 66(inF1) + 1120: 62 Load 67(inF2) + 1121: 62 ExtInst 1(GLSL.std.450) 43(FClamp) 1118 1119 1120 + Store 1117(r008) 1121 + 1123: 62 Load 65(inF0) + 1124: 62 ExtInst 1(GLSL.std.450) 14(Cos) 1123 + Store 1122(r009) 1124 + 1126: 62 Load 65(inF0) + 1127: 62 ExtInst 1(GLSL.std.450) 20(Cosh) 1126 + Store 1125(r010) 1127 + 1129: 62 Load 65(inF0) + 1130: 62 DPdx 1129 + Store 1128(r011) 1130 + 1132: 62 Load 65(inF0) + 1133: 62 DPdxCoarse 1132 + Store 1131(r012) 1133 + 1135: 62 Load 65(inF0) + 1136: 62 DPdxFine 1135 + Store 1134(r013) 1136 + 1138: 62 Load 65(inF0) + 1139: 62 DPdy 1138 + Store 1137(r014) 1139 + 1141: 62 Load 65(inF0) + 1142: 62 DPdyCoarse 1141 + Store 1140(r015) 1142 + 1144: 62 Load 65(inF0) + 1145: 62 DPdyFine 1144 + Store 1143(r016) 1145 + 1147: 62 Load 65(inF0) + 1148: 62 ExtInst 1(GLSL.std.450) 12(Degrees) 1147 + Store 1146(r017) 1148 + 1150: 62 Load 65(inF0) + 1151: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 1150 + Store 1149(r018) 1151 + 1153: 62 Load 65(inF0) + 1154: 62 ExtInst 1(GLSL.std.450) 27(Exp) 1153 + Store 1152(r019) 1154 + 1156: 62 Load 65(inF0) + 1157: 62 ExtInst 1(GLSL.std.450) 29(Exp2) 1156 + Store 1155(R020) 1157 + 1159: 62 Load 65(inF0) + 1160: 62 ExtInst 1(GLSL.std.450) 8(Floor) 1159 + Store 1158(r021) 1160 + 1162: 62 Load 65(inF0) + 1163: 62 Load 66(inF1) + 1164: 26(fvec2) CompositeExtract 1162 0 + 1165: 26(fvec2) CompositeExtract 1163 0 + 1166: 26(fvec2) FMod 1164 1165 + 1167: 26(fvec2) CompositeExtract 1162 1 + 1168: 26(fvec2) CompositeExtract 1163 1 + 1169: 26(fvec2) FMod 1167 1168 + 1170: 62 CompositeConstruct 1166 1169 + Store 1161(r022) 1170 + 1172: 62 Load 65(inF0) + 1173: 62 ExtInst 1(GLSL.std.450) 10(Fract) 1172 + Store 1171(r023) 1173 + 1175: 62 Load 65(inF0) + 1176: 62 Fwidth 1175 + Store 1174(r025) 1176 + 1178: 62 Load 65(inF0) + 1179: 62 Load 66(inF1) + 1180: 62 ExtInst 1(GLSL.std.450) 53(Ldexp) 1178 1179 + Store 1177(r026) 1180 + 1182: 62 Load 65(inF0) + 1183: 62 Load 66(inF1) + 1184: 62 Load 67(inF2) + 1185: 62 ExtInst 1(GLSL.std.450) 46(FMix) 1182 1183 1184 + Store 1181(r026a) 1185 + 1187: 62 Load 65(inF0) + 1188: 62 ExtInst 1(GLSL.std.450) 28(Log) 1187 + Store 1186(r027) 1188 + 1190: 62 Load 65(inF0) + 1191: 62 ExtInst 1(GLSL.std.450) 30(Log2) 1190 + 1192: 62 MatrixTimesScalar 1191 268 + Store 1189(r028) 1192 + 1194: 62 Load 65(inF0) + 1195: 62 ExtInst 1(GLSL.std.450) 30(Log2) 1194 + Store 1193(r029) 1195 + 1197: 62 Load 65(inF0) + 1198: 62 Load 66(inF1) + 1199: 62 ExtInst 1(GLSL.std.450) 40(FMax) 1197 1198 + Store 1196(r030) 1199 + 1201: 62 Load 65(inF0) + 1202: 62 Load 66(inF1) + 1203: 62 ExtInst 1(GLSL.std.450) 37(FMin) 1201 1202 + Store 1200(r031) 1203 + 1205: 62 Load 65(inF0) + 1206: 62 Load 66(inF1) + 1207: 62 ExtInst 1(GLSL.std.450) 26(Pow) 1205 1206 + Store 1204(r032) 1207 + 1209: 62 Load 65(inF0) + 1210: 62 ExtInst 1(GLSL.std.450) 11(Radians) 1209 + Store 1208(r033) 1210 + 1212: 62 Load 65(inF0) + 1213: 62 ExtInst 1(GLSL.std.450) 2(RoundEven) 1212 + Store 1211(r034) 1213 + 1215: 62 Load 65(inF0) + 1216: 62 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 1215 + Store 1214(r035) 1216 + 1218: 62 Load 65(inF0) + 1219: 26(fvec2) CompositeConstruct 141 141 + 1220: 26(fvec2) CompositeConstruct 289 289 + 1221: 62 ExtInst 1(GLSL.std.450) 43(FClamp) 1218 1219 1220 + Store 1217(r036) 1221 + 1223: 62 Load 65(inF0) + 1224: 62 ExtInst 1(GLSL.std.450) 6(FSign) 1223 + Store 1222(r037) 1224 + 1226: 62 Load 65(inF0) + 1227: 62 ExtInst 1(GLSL.std.450) 13(Sin) 1226 + Store 1225(r038) 1227 + 1228: 62 Load 65(inF0) + 1229: 62 ExtInst 1(GLSL.std.450) 13(Sin) 1228 + Store 66(inF1) 1229 + 1230: 62 Load 65(inF0) + 1231: 62 ExtInst 1(GLSL.std.450) 14(Cos) 1230 + Store 67(inF2) 1231 + 1233: 62 Load 65(inF0) + 1234: 62 ExtInst 1(GLSL.std.450) 19(Sinh) 1233 + Store 1232(r039) 1234 + 1236: 62 Load 65(inF0) + 1237: 62 Load 66(inF1) + 1238: 62 Load 67(inF2) + 1239: 62 ExtInst 1(GLSL.std.450) 49(SmoothStep) 1236 1237 1238 + Store 1235(r049) 1239 + 1241: 62 Load 65(inF0) + 1242: 62 ExtInst 1(GLSL.std.450) 31(Sqrt) 1241 + Store 1240(r041) 1242 + 1244: 62 Load 65(inF0) + 1245: 62 Load 66(inF1) + 1246: 62 ExtInst 1(GLSL.std.450) 48(Step) 1244 1245 + Store 1243(r042) 1246 + 1248: 62 Load 65(inF0) + 1249: 62 ExtInst 1(GLSL.std.450) 15(Tan) 1248 + Store 1247(r043) 1249 + 1251: 62 Load 65(inF0) + 1252: 62 ExtInst 1(GLSL.std.450) 21(Tanh) 1251 + Store 1250(r044) 1252 + 1253: 62 Load 65(inF0) + 1254: 62 Transpose 1253 + 1256: 62 Load 65(inF0) + 1257: 62 ExtInst 1(GLSL.std.450) 3(Trunc) 1256 + Store 1255(r046) 1257 + ReturnValue 1259 + FunctionEnd +76(PixelShaderFunction3x3(mf33;mf33;mf33;): 70 Function None 72 + 73(inF0): 71(ptr) FunctionParameter + 74(inF1): 71(ptr) FunctionParameter + 75(inF2): 71(ptr) FunctionParameter + 77: Label + 1262(r000): 138(ptr) Variable Function + 1267(r001): 71(ptr) Variable Function + 1272(r003): 138(ptr) Variable Function + 1276(r004): 71(ptr) Variable Function + 1279(r005): 71(ptr) Variable Function + 1282(r006): 71(ptr) Variable Function + 1286(r007): 71(ptr) Variable Function + 1296(r008): 71(ptr) Variable Function + 1301(r009): 71(ptr) Variable Function + 1304(r010): 71(ptr) Variable Function + 1307(r011): 71(ptr) Variable Function + 1310(r012): 71(ptr) Variable Function + 1313(r013): 71(ptr) Variable Function + 1316(r014): 71(ptr) Variable Function + 1319(r015): 71(ptr) Variable Function + 1322(r016): 71(ptr) Variable Function + 1325(r017): 71(ptr) Variable Function + 1328(r018): 7(ptr) Variable Function + 1331(r019): 71(ptr) Variable Function + 1334(R020): 71(ptr) Variable Function + 1337(r021): 71(ptr) Variable Function + 1340(r022): 71(ptr) Variable Function + 1353(r023): 71(ptr) Variable Function + 1356(r025): 71(ptr) Variable Function + 1359(r026): 71(ptr) Variable Function + 1363(r026a): 71(ptr) Variable Function + 1368(r027): 71(ptr) Variable Function + 1371(r028): 71(ptr) Variable Function + 1375(r029): 71(ptr) Variable Function + 1378(r030): 71(ptr) Variable Function + 1382(r031): 71(ptr) Variable Function + 1386(r032): 71(ptr) Variable Function + 1390(r033): 71(ptr) Variable Function + 1393(r034): 71(ptr) Variable Function + 1396(r035): 71(ptr) Variable Function + 1399(r036): 71(ptr) Variable Function + 1404(r037): 71(ptr) Variable Function + 1407(r038): 71(ptr) Variable Function + 1414(r039): 71(ptr) Variable Function + 1417(r049): 71(ptr) Variable Function + 1422(r041): 71(ptr) Variable Function + 1425(r042): 71(ptr) Variable Function + 1429(r043): 71(ptr) Variable Function + 1432(r044): 71(ptr) Variable Function + 1437(r046): 71(ptr) Variable Function + 1263: 70 Load 73(inF0) + 1265: 1264 FOrdNotEqual 1263 141 + 1266: 137(bool) All 1265 + Store 1262(r000) 1266 + 1268: 70 Load 73(inF0) + 1269: 70 ExtInst 1(GLSL.std.450) 4(FAbs) 1268 + Store 1267(r001) 1269 + 1270: 70 Load 73(inF0) + 1271: 70 ExtInst 1(GLSL.std.450) 17(Acos) 1270 + 1273: 70 Load 73(inF0) + 1274: 1264 FOrdNotEqual 1273 141 + 1275: 137(bool) Any 1274 + Store 1272(r003) 1275 + 1277: 70 Load 73(inF0) + 1278: 70 ExtInst 1(GLSL.std.450) 16(Asin) 1277 + Store 1276(r004) 1278 + 1280: 70 Load 73(inF0) + 1281: 70 ExtInst 1(GLSL.std.450) 18(Atan) 1280 + Store 1279(r005) 1281 + 1283: 70 Load 73(inF0) + 1284: 70 Load 74(inF1) + 1285: 70 ExtInst 1(GLSL.std.450) 25(Atan2) 1283 1284 + Store 1282(r006) 1285 + 1287: 70 Load 73(inF0) + 1288: 70 ExtInst 1(GLSL.std.450) 9(Ceil) 1287 + Store 1286(r007) 1288 + 1289: 70 Load 73(inF0) + 1291: 1264 FOrdLessThan 1289 1290 + 1292: 137(bool) Any 1291 + SelectionMerge 1294 None + BranchConditional 1292 1293 1294 + 1293: Label + Kill + 1294: Label + 1297: 70 Load 73(inF0) + 1298: 70 Load 74(inF1) + 1299: 70 Load 75(inF2) + 1300: 70 ExtInst 1(GLSL.std.450) 43(FClamp) 1297 1298 1299 + Store 1296(r008) 1300 + 1302: 70 Load 73(inF0) + 1303: 70 ExtInst 1(GLSL.std.450) 14(Cos) 1302 + Store 1301(r009) 1303 + 1305: 70 Load 73(inF0) + 1306: 70 ExtInst 1(GLSL.std.450) 20(Cosh) 1305 + Store 1304(r010) 1306 + 1308: 70 Load 73(inF0) + 1309: 70 DPdx 1308 + Store 1307(r011) 1309 + 1311: 70 Load 73(inF0) + 1312: 70 DPdxCoarse 1311 + Store 1310(r012) 1312 + 1314: 70 Load 73(inF0) + 1315: 70 DPdxFine 1314 + Store 1313(r013) 1315 + 1317: 70 Load 73(inF0) + 1318: 70 DPdy 1317 + Store 1316(r014) 1318 + 1320: 70 Load 73(inF0) + 1321: 70 DPdyCoarse 1320 + Store 1319(r015) 1321 + 1323: 70 Load 73(inF0) + 1324: 70 DPdyFine 1323 + Store 1322(r016) 1324 + 1326: 70 Load 73(inF0) + 1327: 70 ExtInst 1(GLSL.std.450) 12(Degrees) 1326 + Store 1325(r017) 1327 + 1329: 70 Load 73(inF0) + 1330: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 1329 + Store 1328(r018) 1330 + 1332: 70 Load 73(inF0) + 1333: 70 ExtInst 1(GLSL.std.450) 27(Exp) 1332 + Store 1331(r019) 1333 + 1335: 70 Load 73(inF0) + 1336: 70 ExtInst 1(GLSL.std.450) 29(Exp2) 1335 + Store 1334(R020) 1336 + 1338: 70 Load 73(inF0) + 1339: 70 ExtInst 1(GLSL.std.450) 8(Floor) 1338 + Store 1337(r021) 1339 + 1341: 70 Load 73(inF0) + 1342: 70 Load 74(inF1) + 1343: 38(fvec3) CompositeExtract 1341 0 + 1344: 38(fvec3) CompositeExtract 1342 0 + 1345: 38(fvec3) FMod 1343 1344 + 1346: 38(fvec3) CompositeExtract 1341 1 + 1347: 38(fvec3) CompositeExtract 1342 1 + 1348: 38(fvec3) FMod 1346 1347 + 1349: 38(fvec3) CompositeExtract 1341 2 + 1350: 38(fvec3) CompositeExtract 1342 2 + 1351: 38(fvec3) FMod 1349 1350 + 1352: 70 CompositeConstruct 1345 1348 1351 + Store 1340(r022) 1352 + 1354: 70 Load 73(inF0) + 1355: 70 ExtInst 1(GLSL.std.450) 10(Fract) 1354 + Store 1353(r023) 1355 + 1357: 70 Load 73(inF0) + 1358: 70 Fwidth 1357 + Store 1356(r025) 1358 + 1360: 70 Load 73(inF0) + 1361: 70 Load 74(inF1) + 1362: 70 ExtInst 1(GLSL.std.450) 53(Ldexp) 1360 1361 + Store 1359(r026) 1362 + 1364: 70 Load 73(inF0) + 1365: 70 Load 74(inF1) + 1366: 70 Load 75(inF2) + 1367: 70 ExtInst 1(GLSL.std.450) 46(FMix) 1364 1365 1366 + Store 1363(r026a) 1367 + 1369: 70 Load 73(inF0) + 1370: 70 ExtInst 1(GLSL.std.450) 28(Log) 1369 + Store 1368(r027) 1370 + 1372: 70 Load 73(inF0) + 1373: 70 ExtInst 1(GLSL.std.450) 30(Log2) 1372 + 1374: 70 MatrixTimesScalar 1373 268 + Store 1371(r028) 1374 + 1376: 70 Load 73(inF0) + 1377: 70 ExtInst 1(GLSL.std.450) 30(Log2) 1376 + Store 1375(r029) 1377 + 1379: 70 Load 73(inF0) + 1380: 70 Load 74(inF1) + 1381: 70 ExtInst 1(GLSL.std.450) 40(FMax) 1379 1380 + Store 1378(r030) 1381 + 1383: 70 Load 73(inF0) + 1384: 70 Load 74(inF1) + 1385: 70 ExtInst 1(GLSL.std.450) 37(FMin) 1383 1384 + Store 1382(r031) 1385 + 1387: 70 Load 73(inF0) + 1388: 70 Load 74(inF1) + 1389: 70 ExtInst 1(GLSL.std.450) 26(Pow) 1387 1388 + Store 1386(r032) 1389 + 1391: 70 Load 73(inF0) + 1392: 70 ExtInst 1(GLSL.std.450) 11(Radians) 1391 + Store 1390(r033) 1392 + 1394: 70 Load 73(inF0) + 1395: 70 ExtInst 1(GLSL.std.450) 2(RoundEven) 1394 + Store 1393(r034) 1395 + 1397: 70 Load 73(inF0) + 1398: 70 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 1397 + Store 1396(r035) 1398 + 1400: 70 Load 73(inF0) + 1401: 38(fvec3) CompositeConstruct 141 141 141 + 1402: 38(fvec3) CompositeConstruct 289 289 289 + 1403: 70 ExtInst 1(GLSL.std.450) 43(FClamp) 1400 1401 1402 + Store 1399(r036) 1403 + 1405: 70 Load 73(inF0) + 1406: 70 ExtInst 1(GLSL.std.450) 6(FSign) 1405 + Store 1404(r037) 1406 + 1408: 70 Load 73(inF0) + 1409: 70 ExtInst 1(GLSL.std.450) 13(Sin) 1408 + Store 1407(r038) 1409 + 1410: 70 Load 73(inF0) + 1411: 70 ExtInst 1(GLSL.std.450) 13(Sin) 1410 + Store 74(inF1) 1411 + 1412: 70 Load 73(inF0) + 1413: 70 ExtInst 1(GLSL.std.450) 14(Cos) 1412 + Store 75(inF2) 1413 + 1415: 70 Load 73(inF0) + 1416: 70 ExtInst 1(GLSL.std.450) 19(Sinh) 1415 + Store 1414(r039) 1416 + 1418: 70 Load 73(inF0) + 1419: 70 Load 74(inF1) + 1420: 70 Load 75(inF2) + 1421: 70 ExtInst 1(GLSL.std.450) 49(SmoothStep) 1418 1419 1420 + Store 1417(r049) 1421 + 1423: 70 Load 73(inF0) + 1424: 70 ExtInst 1(GLSL.std.450) 31(Sqrt) 1423 + Store 1422(r041) 1424 + 1426: 70 Load 73(inF0) + 1427: 70 Load 74(inF1) + 1428: 70 ExtInst 1(GLSL.std.450) 48(Step) 1426 1427 + Store 1425(r042) 1428 + 1430: 70 Load 73(inF0) + 1431: 70 ExtInst 1(GLSL.std.450) 15(Tan) 1430 + Store 1429(r043) 1431 + 1433: 70 Load 73(inF0) + 1434: 70 ExtInst 1(GLSL.std.450) 21(Tanh) 1433 + Store 1432(r044) 1434 + 1435: 70 Load 73(inF0) + 1436: 70 Transpose 1435 + 1438: 70 Load 73(inF0) + 1439: 70 ExtInst 1(GLSL.std.450) 3(Trunc) 1438 + Store 1437(r046) 1439 + ReturnValue 1441 + FunctionEnd +84(PixelShaderFunction4x4(mf44;mf44;mf44;): 78 Function None 80 + 81(inF0): 79(ptr) FunctionParameter + 82(inF1): 79(ptr) FunctionParameter + 83(inF2): 79(ptr) FunctionParameter + 85: Label + 1444(r000): 138(ptr) Variable Function + 1449(r001): 79(ptr) Variable Function + 1454(r003): 138(ptr) Variable Function + 1458(r004): 79(ptr) Variable Function + 1461(r005): 79(ptr) Variable Function + 1464(r006): 79(ptr) Variable Function + 1468(r007): 79(ptr) Variable Function + 1478(r008): 79(ptr) Variable Function + 1483(r009): 79(ptr) Variable Function + 1486(r010): 79(ptr) Variable Function + 1489(r011): 79(ptr) Variable Function + 1492(r012): 79(ptr) Variable Function + 1495(r013): 79(ptr) Variable Function + 1498(r014): 79(ptr) Variable Function + 1501(r015): 79(ptr) Variable Function + 1504(r016): 79(ptr) Variable Function + 1507(r017): 79(ptr) Variable Function + 1510(r018): 7(ptr) Variable Function + 1513(r019): 79(ptr) Variable Function + 1516(R020): 79(ptr) Variable Function + 1519(r021): 79(ptr) Variable Function + 1522(r022): 79(ptr) Variable Function + 1538(r023): 79(ptr) Variable Function + 1541(r025): 79(ptr) Variable Function + 1544(r026): 79(ptr) Variable Function + 1548(r026a): 79(ptr) Variable Function + 1553(r027): 79(ptr) Variable Function + 1556(r028): 79(ptr) Variable Function + 1560(r029): 79(ptr) Variable Function + 1563(r030): 79(ptr) Variable Function + 1567(r031): 79(ptr) Variable Function + 1571(r032): 79(ptr) Variable Function + 1575(r033): 79(ptr) Variable Function + 1578(r034): 79(ptr) Variable Function + 1581(r035): 79(ptr) Variable Function + 1584(r036): 79(ptr) Variable Function + 1589(r037): 79(ptr) Variable Function + 1592(r038): 79(ptr) Variable Function + 1599(r039): 79(ptr) Variable Function + 1602(r049): 79(ptr) Variable Function + 1607(r041): 79(ptr) Variable Function + 1610(r042): 79(ptr) Variable Function + 1614(r043): 79(ptr) Variable Function + 1617(r044): 79(ptr) Variable Function + 1622(r046): 79(ptr) Variable Function + 1445: 78 Load 81(inF0) + 1447: 1446 FOrdNotEqual 1445 141 + 1448: 137(bool) All 1447 + Store 1444(r000) 1448 + 1450: 78 Load 81(inF0) + 1451: 78 ExtInst 1(GLSL.std.450) 4(FAbs) 1450 + Store 1449(r001) 1451 + 1452: 78 Load 81(inF0) + 1453: 78 ExtInst 1(GLSL.std.450) 17(Acos) 1452 + 1455: 78 Load 81(inF0) + 1456: 1446 FOrdNotEqual 1455 141 + 1457: 137(bool) Any 1456 + Store 1454(r003) 1457 + 1459: 78 Load 81(inF0) + 1460: 78 ExtInst 1(GLSL.std.450) 16(Asin) 1459 + Store 1458(r004) 1460 + 1462: 78 Load 81(inF0) + 1463: 78 ExtInst 1(GLSL.std.450) 18(Atan) 1462 + Store 1461(r005) 1463 + 1465: 78 Load 81(inF0) + 1466: 78 Load 82(inF1) + 1467: 78 ExtInst 1(GLSL.std.450) 25(Atan2) 1465 1466 + Store 1464(r006) 1467 + 1469: 78 Load 81(inF0) + 1470: 78 ExtInst 1(GLSL.std.450) 9(Ceil) 1469 + Store 1468(r007) 1470 + 1471: 78 Load 81(inF0) + 1473: 1446 FOrdLessThan 1471 1472 + 1474: 137(bool) Any 1473 + SelectionMerge 1476 None + BranchConditional 1474 1475 1476 + 1475: Label + Kill + 1476: Label + 1479: 78 Load 81(inF0) + 1480: 78 Load 82(inF1) + 1481: 78 Load 83(inF2) + 1482: 78 ExtInst 1(GLSL.std.450) 43(FClamp) 1479 1480 1481 + Store 1478(r008) 1482 + 1484: 78 Load 81(inF0) + 1485: 78 ExtInst 1(GLSL.std.450) 14(Cos) 1484 + Store 1483(r009) 1485 + 1487: 78 Load 81(inF0) + 1488: 78 ExtInst 1(GLSL.std.450) 20(Cosh) 1487 + Store 1486(r010) 1488 + 1490: 78 Load 81(inF0) + 1491: 78 DPdx 1490 + Store 1489(r011) 1491 + 1493: 78 Load 81(inF0) + 1494: 78 DPdxCoarse 1493 + Store 1492(r012) 1494 + 1496: 78 Load 81(inF0) + 1497: 78 DPdxFine 1496 + Store 1495(r013) 1497 + 1499: 78 Load 81(inF0) + 1500: 78 DPdy 1499 + Store 1498(r014) 1500 + 1502: 78 Load 81(inF0) + 1503: 78 DPdyCoarse 1502 + Store 1501(r015) 1503 + 1505: 78 Load 81(inF0) + 1506: 78 DPdyFine 1505 + Store 1504(r016) 1506 + 1508: 78 Load 81(inF0) + 1509: 78 ExtInst 1(GLSL.std.450) 12(Degrees) 1508 + Store 1507(r017) 1509 + 1511: 78 Load 81(inF0) + 1512: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 1511 + Store 1510(r018) 1512 + 1514: 78 Load 81(inF0) + 1515: 78 ExtInst 1(GLSL.std.450) 27(Exp) 1514 + Store 1513(r019) 1515 + 1517: 78 Load 81(inF0) + 1518: 78 ExtInst 1(GLSL.std.450) 29(Exp2) 1517 + Store 1516(R020) 1518 + 1520: 78 Load 81(inF0) + 1521: 78 ExtInst 1(GLSL.std.450) 8(Floor) 1520 + Store 1519(r021) 1521 + 1523: 78 Load 81(inF0) + 1524: 78 Load 82(inF1) + 1525: 50(fvec4) CompositeExtract 1523 0 + 1526: 50(fvec4) CompositeExtract 1524 0 + 1527: 50(fvec4) FMod 1525 1526 + 1528: 50(fvec4) CompositeExtract 1523 1 + 1529: 50(fvec4) CompositeExtract 1524 1 + 1530: 50(fvec4) FMod 1528 1529 + 1531: 50(fvec4) CompositeExtract 1523 2 + 1532: 50(fvec4) CompositeExtract 1524 2 + 1533: 50(fvec4) FMod 1531 1532 + 1534: 50(fvec4) CompositeExtract 1523 3 + 1535: 50(fvec4) CompositeExtract 1524 3 + 1536: 50(fvec4) FMod 1534 1535 + 1537: 78 CompositeConstruct 1527 1530 1533 1536 + Store 1522(r022) 1537 + 1539: 78 Load 81(inF0) + 1540: 78 ExtInst 1(GLSL.std.450) 10(Fract) 1539 + Store 1538(r023) 1540 + 1542: 78 Load 81(inF0) + 1543: 78 Fwidth 1542 + Store 1541(r025) 1543 + 1545: 78 Load 81(inF0) + 1546: 78 Load 82(inF1) + 1547: 78 ExtInst 1(GLSL.std.450) 53(Ldexp) 1545 1546 + Store 1544(r026) 1547 + 1549: 78 Load 81(inF0) + 1550: 78 Load 82(inF1) + 1551: 78 Load 83(inF2) + 1552: 78 ExtInst 1(GLSL.std.450) 46(FMix) 1549 1550 1551 + Store 1548(r026a) 1552 + 1554: 78 Load 81(inF0) + 1555: 78 ExtInst 1(GLSL.std.450) 28(Log) 1554 + Store 1553(r027) 1555 + 1557: 78 Load 81(inF0) + 1558: 78 ExtInst 1(GLSL.std.450) 30(Log2) 1557 + 1559: 78 MatrixTimesScalar 1558 268 + Store 1556(r028) 1559 + 1561: 78 Load 81(inF0) + 1562: 78 ExtInst 1(GLSL.std.450) 30(Log2) 1561 + Store 1560(r029) 1562 + 1564: 78 Load 81(inF0) + 1565: 78 Load 82(inF1) + 1566: 78 ExtInst 1(GLSL.std.450) 40(FMax) 1564 1565 + Store 1563(r030) 1566 + 1568: 78 Load 81(inF0) + 1569: 78 Load 82(inF1) + 1570: 78 ExtInst 1(GLSL.std.450) 37(FMin) 1568 1569 + Store 1567(r031) 1570 + 1572: 78 Load 81(inF0) + 1573: 78 Load 82(inF1) + 1574: 78 ExtInst 1(GLSL.std.450) 26(Pow) 1572 1573 + Store 1571(r032) 1574 + 1576: 78 Load 81(inF0) + 1577: 78 ExtInst 1(GLSL.std.450) 11(Radians) 1576 + Store 1575(r033) 1577 + 1579: 78 Load 81(inF0) + 1580: 78 ExtInst 1(GLSL.std.450) 2(RoundEven) 1579 + Store 1578(r034) 1580 + 1582: 78 Load 81(inF0) + 1583: 78 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 1582 + Store 1581(r035) 1583 + 1585: 78 Load 81(inF0) + 1586: 50(fvec4) CompositeConstruct 141 141 141 141 + 1587: 50(fvec4) CompositeConstruct 289 289 289 289 + 1588: 78 ExtInst 1(GLSL.std.450) 43(FClamp) 1585 1586 1587 + Store 1584(r036) 1588 + 1590: 78 Load 81(inF0) + 1591: 78 ExtInst 1(GLSL.std.450) 6(FSign) 1590 + Store 1589(r037) 1591 + 1593: 78 Load 81(inF0) + 1594: 78 ExtInst 1(GLSL.std.450) 13(Sin) 1593 + Store 1592(r038) 1594 + 1595: 78 Load 81(inF0) + 1596: 78 ExtInst 1(GLSL.std.450) 13(Sin) 1595 + Store 82(inF1) 1596 + 1597: 78 Load 81(inF0) + 1598: 78 ExtInst 1(GLSL.std.450) 14(Cos) 1597 + Store 83(inF2) 1598 + 1600: 78 Load 81(inF0) + 1601: 78 ExtInst 1(GLSL.std.450) 19(Sinh) 1600 + Store 1599(r039) 1601 + 1603: 78 Load 81(inF0) + 1604: 78 Load 82(inF1) + 1605: 78 Load 83(inF2) + 1606: 78 ExtInst 1(GLSL.std.450) 49(SmoothStep) 1603 1604 1605 + Store 1602(r049) 1606 + 1608: 78 Load 81(inF0) + 1609: 78 ExtInst 1(GLSL.std.450) 31(Sqrt) 1608 + Store 1607(r041) 1609 + 1611: 78 Load 81(inF0) + 1612: 78 Load 82(inF1) + 1613: 78 ExtInst 1(GLSL.std.450) 48(Step) 1611 1612 + Store 1610(r042) 1613 + 1615: 78 Load 81(inF0) + 1616: 78 ExtInst 1(GLSL.std.450) 15(Tan) 1615 + Store 1614(r043) 1616 + 1618: 78 Load 81(inF0) + 1619: 78 ExtInst 1(GLSL.std.450) 21(Tanh) 1618 + Store 1617(r044) 1619 + 1620: 78 Load 81(inF0) + 1621: 78 Transpose 1620 + 1623: 78 Load 81(inF0) + 1624: 78 ExtInst 1(GLSL.std.450) 3(Trunc) 1623 + Store 1622(r046) 1624 + ReturnValue 1626 + FunctionEnd +93(TestGenMul2(f1;f1;vf2;vf2;mf22;mf22;): 2 Function None 86 + 87(inF0): 7(ptr) FunctionParameter + 88(inF1): 7(ptr) FunctionParameter + 89(inFV0): 27(ptr) FunctionParameter + 90(inFV1): 27(ptr) FunctionParameter + 91(inFM0): 63(ptr) FunctionParameter + 92(inFM1): 63(ptr) FunctionParameter + 94: Label + 1629(r0): 7(ptr) Variable Function + 1633(r1): 27(ptr) Variable Function + 1637(r2): 27(ptr) Variable Function + 1641(r3): 7(ptr) Variable Function + 1645(r4): 27(ptr) Variable Function + 1649(r5): 27(ptr) Variable Function + 1653(r6): 63(ptr) Variable Function + 1657(r7): 63(ptr) Variable Function + 1661(r8): 63(ptr) Variable Function + 1630: 6(float) Load 88(inF1) + 1631: 6(float) Load 87(inF0) + 1632: 6(float) FMul 1630 1631 + Store 1629(r0) 1632 + 1634: 6(float) Load 87(inF0) + 1635: 26(fvec2) Load 89(inFV0) + 1636: 26(fvec2) VectorTimesScalar 1635 1634 + Store 1633(r1) 1636 + 1638: 26(fvec2) Load 89(inFV0) + 1639: 6(float) Load 87(inF0) + 1640: 26(fvec2) VectorTimesScalar 1638 1639 + Store 1637(r2) 1640 + 1642: 26(fvec2) Load 89(inFV0) + 1643: 26(fvec2) Load 90(inFV1) + 1644: 6(float) Dot 1642 1643 + Store 1641(r3) 1644 + 1646: 26(fvec2) Load 89(inFV0) + 1647: 62 Load 91(inFM0) + 1648: 26(fvec2) VectorTimesMatrix 1646 1647 + Store 1645(r4) 1648 + 1650: 62 Load 91(inFM0) + 1651: 26(fvec2) Load 89(inFV0) + 1652: 26(fvec2) MatrixTimesVector 1650 1651 + Store 1649(r5) 1652 + 1654: 6(float) Load 87(inF0) + 1655: 62 Load 91(inFM0) + 1656: 62 MatrixTimesScalar 1655 1654 + Store 1653(r6) 1656 + 1658: 62 Load 91(inFM0) + 1659: 6(float) Load 87(inF0) + 1660: 62 MatrixTimesScalar 1658 1659 + Store 1657(r7) 1660 + 1662: 62 Load 92(inFM1) + 1663: 62 Load 91(inFM0) + 1664: 62 MatrixTimesMatrix 1662 1663 + Store 1661(r8) 1664 Return FunctionEnd -100(TestGenMul3(f1;f1;vf3;vf3;mf33;mf33;): 2 Function None 93 - 94(inF0): 7(ptr) FunctionParameter - 95(inF1): 7(ptr) FunctionParameter - 96(inFV0): 37(ptr) FunctionParameter - 97(inFV1): 37(ptr) FunctionParameter - 98(inFM0): 69(ptr) FunctionParameter - 99(inFM1): 69(ptr) FunctionParameter - 101: Label - 1623(r0): 7(ptr) Variable Function - 1627(r1): 37(ptr) Variable Function - 1631(r2): 37(ptr) Variable Function - 1635(r3): 7(ptr) Variable Function - 1639(r4): 37(ptr) Variable Function - 1643(r5): 37(ptr) Variable Function - 1647(r6): 69(ptr) Variable Function - 1651(r7): 69(ptr) Variable Function - 1655(r8): 69(ptr) Variable Function - 1624: 6(float) Load 95(inF1) - 1625: 6(float) Load 94(inF0) - 1626: 6(float) FMul 1624 1625 - Store 1623(r0) 1626 - 1628: 6(float) Load 94(inF0) - 1629: 36(fvec3) Load 96(inFV0) - 1630: 36(fvec3) VectorTimesScalar 1629 1628 - Store 1627(r1) 1630 - 1632: 36(fvec3) Load 96(inFV0) - 1633: 6(float) Load 94(inF0) - 1634: 36(fvec3) VectorTimesScalar 1632 1633 - Store 1631(r2) 1634 - 1636: 36(fvec3) Load 96(inFV0) - 1637: 36(fvec3) Load 97(inFV1) - 1638: 6(float) Dot 1636 1637 - Store 1635(r3) 1638 - 1640: 36(fvec3) Load 96(inFV0) - 1641: 68 Load 98(inFM0) - 1642: 36(fvec3) VectorTimesMatrix 1640 1641 - Store 1639(r4) 1642 - 1644: 68 Load 98(inFM0) - 1645: 36(fvec3) Load 96(inFV0) - 1646: 36(fvec3) MatrixTimesVector 1644 1645 - Store 1643(r5) 1646 - 1648: 6(float) Load 94(inF0) - 1649: 68 Load 98(inFM0) - 1650: 68 MatrixTimesScalar 1649 1648 - Store 1647(r6) 1650 - 1652: 68 Load 98(inFM0) - 1653: 6(float) Load 94(inF0) - 1654: 68 MatrixTimesScalar 1652 1653 - Store 1651(r7) 1654 - 1656: 68 Load 99(inFM1) - 1657: 68 Load 98(inFM0) - 1658: 68 MatrixTimesMatrix 1656 1657 - Store 1655(r8) 1658 +102(TestGenMul3(f1;f1;vf3;vf3;mf33;mf33;): 2 Function None 95 + 96(inF0): 7(ptr) FunctionParameter + 97(inF1): 7(ptr) FunctionParameter + 98(inFV0): 39(ptr) FunctionParameter + 99(inFV1): 39(ptr) FunctionParameter + 100(inFM0): 71(ptr) FunctionParameter + 101(inFM1): 71(ptr) FunctionParameter + 103: Label + 1665(r0): 7(ptr) Variable Function + 1669(r1): 39(ptr) Variable Function + 1673(r2): 39(ptr) Variable Function + 1677(r3): 7(ptr) Variable Function + 1681(r4): 39(ptr) Variable Function + 1685(r5): 39(ptr) Variable Function + 1689(r6): 71(ptr) Variable Function + 1693(r7): 71(ptr) Variable Function + 1697(r8): 71(ptr) Variable Function + 1666: 6(float) Load 97(inF1) + 1667: 6(float) Load 96(inF0) + 1668: 6(float) FMul 1666 1667 + Store 1665(r0) 1668 + 1670: 6(float) Load 96(inF0) + 1671: 38(fvec3) Load 98(inFV0) + 1672: 38(fvec3) VectorTimesScalar 1671 1670 + Store 1669(r1) 1672 + 1674: 38(fvec3) Load 98(inFV0) + 1675: 6(float) Load 96(inF0) + 1676: 38(fvec3) VectorTimesScalar 1674 1675 + Store 1673(r2) 1676 + 1678: 38(fvec3) Load 98(inFV0) + 1679: 38(fvec3) Load 99(inFV1) + 1680: 6(float) Dot 1678 1679 + Store 1677(r3) 1680 + 1682: 38(fvec3) Load 98(inFV0) + 1683: 70 Load 100(inFM0) + 1684: 38(fvec3) VectorTimesMatrix 1682 1683 + Store 1681(r4) 1684 + 1686: 70 Load 100(inFM0) + 1687: 38(fvec3) Load 98(inFV0) + 1688: 38(fvec3) MatrixTimesVector 1686 1687 + Store 1685(r5) 1688 + 1690: 6(float) Load 96(inF0) + 1691: 70 Load 100(inFM0) + 1692: 70 MatrixTimesScalar 1691 1690 + Store 1689(r6) 1692 + 1694: 70 Load 100(inFM0) + 1695: 6(float) Load 96(inF0) + 1696: 70 MatrixTimesScalar 1694 1695 + Store 1693(r7) 1696 + 1698: 70 Load 101(inFM1) + 1699: 70 Load 100(inFM0) + 1700: 70 MatrixTimesMatrix 1698 1699 + Store 1697(r8) 1700 Return FunctionEnd -109(TestGenMul4(f1;f1;vf4;vf4;mf44;mf44;): 2 Function None 102 - 103(inF0): 7(ptr) FunctionParameter - 104(inF1): 7(ptr) FunctionParameter - 105(inFV0): 49(ptr) FunctionParameter - 106(inFV1): 49(ptr) FunctionParameter - 107(inFM0): 77(ptr) FunctionParameter - 108(inFM1): 77(ptr) FunctionParameter - 110: Label - 1659(r0): 7(ptr) Variable Function - 1663(r1): 49(ptr) Variable Function - 1667(r2): 49(ptr) Variable Function - 1671(r3): 7(ptr) Variable Function - 1675(r4): 49(ptr) Variable Function - 1679(r5): 49(ptr) Variable Function - 1683(r6): 77(ptr) Variable Function - 1687(r7): 77(ptr) Variable Function - 1691(r8): 77(ptr) Variable Function - 1660: 6(float) Load 104(inF1) - 1661: 6(float) Load 103(inF0) - 1662: 6(float) FMul 1660 1661 - Store 1659(r0) 1662 - 1664: 6(float) Load 103(inF0) - 1665: 48(fvec4) Load 105(inFV0) - 1666: 48(fvec4) VectorTimesScalar 1665 1664 - Store 1663(r1) 1666 - 1668: 48(fvec4) Load 105(inFV0) - 1669: 6(float) Load 103(inF0) - 1670: 48(fvec4) VectorTimesScalar 1668 1669 - Store 1667(r2) 1670 - 1672: 48(fvec4) Load 105(inFV0) - 1673: 48(fvec4) Load 106(inFV1) - 1674: 6(float) Dot 1672 1673 - Store 1671(r3) 1674 - 1676: 48(fvec4) Load 105(inFV0) - 1677: 76 Load 107(inFM0) - 1678: 48(fvec4) VectorTimesMatrix 1676 1677 - Store 1675(r4) 1678 - 1680: 76 Load 107(inFM0) - 1681: 48(fvec4) Load 105(inFV0) - 1682: 48(fvec4) MatrixTimesVector 1680 1681 - Store 1679(r5) 1682 - 1684: 6(float) Load 103(inF0) - 1685: 76 Load 107(inFM0) - 1686: 76 MatrixTimesScalar 1685 1684 - Store 1683(r6) 1686 - 1688: 76 Load 107(inFM0) - 1689: 6(float) Load 103(inF0) - 1690: 76 MatrixTimesScalar 1688 1689 - Store 1687(r7) 1690 - 1692: 76 Load 108(inFM1) - 1693: 76 Load 107(inFM0) - 1694: 76 MatrixTimesMatrix 1692 1693 - Store 1691(r8) 1694 +111(TestGenMul4(f1;f1;vf4;vf4;mf44;mf44;): 2 Function None 104 + 105(inF0): 7(ptr) FunctionParameter + 106(inF1): 7(ptr) FunctionParameter + 107(inFV0): 51(ptr) FunctionParameter + 108(inFV1): 51(ptr) FunctionParameter + 109(inFM0): 79(ptr) FunctionParameter + 110(inFM1): 79(ptr) FunctionParameter + 112: Label + 1701(r0): 7(ptr) Variable Function + 1705(r1): 51(ptr) Variable Function + 1709(r2): 51(ptr) Variable Function + 1713(r3): 7(ptr) Variable Function + 1717(r4): 51(ptr) Variable Function + 1721(r5): 51(ptr) Variable Function + 1725(r6): 79(ptr) Variable Function + 1729(r7): 79(ptr) Variable Function + 1733(r8): 79(ptr) Variable Function + 1702: 6(float) Load 106(inF1) + 1703: 6(float) Load 105(inF0) + 1704: 6(float) FMul 1702 1703 + Store 1701(r0) 1704 + 1706: 6(float) Load 105(inF0) + 1707: 50(fvec4) Load 107(inFV0) + 1708: 50(fvec4) VectorTimesScalar 1707 1706 + Store 1705(r1) 1708 + 1710: 50(fvec4) Load 107(inFV0) + 1711: 6(float) Load 105(inF0) + 1712: 50(fvec4) VectorTimesScalar 1710 1711 + Store 1709(r2) 1712 + 1714: 50(fvec4) Load 107(inFV0) + 1715: 50(fvec4) Load 108(inFV1) + 1716: 6(float) Dot 1714 1715 + Store 1713(r3) 1716 + 1718: 50(fvec4) Load 107(inFV0) + 1719: 78 Load 109(inFM0) + 1720: 50(fvec4) VectorTimesMatrix 1718 1719 + Store 1717(r4) 1720 + 1722: 78 Load 109(inFM0) + 1723: 50(fvec4) Load 107(inFV0) + 1724: 50(fvec4) MatrixTimesVector 1722 1723 + Store 1721(r5) 1724 + 1726: 6(float) Load 105(inF0) + 1727: 78 Load 109(inFM0) + 1728: 78 MatrixTimesScalar 1727 1726 + Store 1725(r6) 1728 + 1730: 78 Load 109(inFM0) + 1731: 6(float) Load 105(inF0) + 1732: 78 MatrixTimesScalar 1730 1731 + Store 1729(r7) 1732 + 1734: 78 Load 110(inFM1) + 1735: 78 Load 109(inFM0) + 1736: 78 MatrixTimesMatrix 1734 1735 + Store 1733(r8) 1736 Return FunctionEnd -129(TestGenMulNxM(f1;f1;vf2;vf3;mf23;mf32;mf33;mf34;mf24;): 2 Function None 119 - 120(inF0): 7(ptr) FunctionParameter - 121(inF1): 7(ptr) FunctionParameter - 122(inFV2): 25(ptr) FunctionParameter - 123(inFV3): 37(ptr) FunctionParameter - 124(inFM2x3): 112(ptr) FunctionParameter - 125(inFM3x2): 114(ptr) FunctionParameter - 126(inFM3x3): 69(ptr) FunctionParameter - 127(inFM3x4): 116(ptr) FunctionParameter - 128(inFM2x4): 118(ptr) FunctionParameter - 130: Label - 1695(r00): 7(ptr) Variable Function - 1699(r01): 25(ptr) Variable Function - 1703(r02): 37(ptr) Variable Function - 1707(r03): 25(ptr) Variable Function - 1711(r04): 37(ptr) Variable Function - 1715(r05): 7(ptr) Variable Function - 1719(r06): 7(ptr) Variable Function - 1723(r07): 37(ptr) Variable Function - 1727(r08): 25(ptr) Variable Function - 1731(r09): 25(ptr) Variable Function - 1735(r10): 37(ptr) Variable Function - 1739(r11): 112(ptr) Variable Function - 1743(r12): 114(ptr) Variable Function - 1747(r13): 61(ptr) Variable Function - 1751(r14): 112(ptr) Variable Function - 1755(r15): 118(ptr) Variable Function - 1759(r16): 116(ptr) Variable Function - 1696: 6(float) Load 121(inF1) - 1697: 6(float) Load 120(inF0) - 1698: 6(float) FMul 1696 1697 - Store 1695(r00) 1698 - 1700: 6(float) Load 120(inF0) - 1701: 24(fvec2) Load 122(inFV2) - 1702: 24(fvec2) VectorTimesScalar 1701 1700 - Store 1699(r01) 1702 - 1704: 6(float) Load 120(inF0) - 1705: 36(fvec3) Load 123(inFV3) - 1706: 36(fvec3) VectorTimesScalar 1705 1704 - Store 1703(r02) 1706 - 1708: 24(fvec2) Load 122(inFV2) - 1709: 6(float) Load 120(inF0) - 1710: 24(fvec2) VectorTimesScalar 1708 1709 - Store 1707(r03) 1710 - 1712: 36(fvec3) Load 123(inFV3) - 1713: 6(float) Load 120(inF0) - 1714: 36(fvec3) VectorTimesScalar 1712 1713 - Store 1711(r04) 1714 - 1716: 24(fvec2) Load 122(inFV2) - 1717: 24(fvec2) Load 122(inFV2) - 1718: 6(float) Dot 1716 1717 - Store 1715(r05) 1718 - 1720: 36(fvec3) Load 123(inFV3) - 1721: 36(fvec3) Load 123(inFV3) - 1722: 6(float) Dot 1720 1721 - Store 1719(r06) 1722 - 1724: 111 Load 124(inFM2x3) - 1725: 24(fvec2) Load 122(inFV2) - 1726: 36(fvec3) MatrixTimesVector 1724 1725 - Store 1723(r07) 1726 - 1728: 113 Load 125(inFM3x2) - 1729: 36(fvec3) Load 123(inFV3) - 1730: 24(fvec2) MatrixTimesVector 1728 1729 - Store 1727(r08) 1730 - 1732: 36(fvec3) Load 123(inFV3) - 1733: 111 Load 124(inFM2x3) - 1734: 24(fvec2) VectorTimesMatrix 1732 1733 - Store 1731(r09) 1734 - 1736: 24(fvec2) Load 122(inFV2) - 1737: 113 Load 125(inFM3x2) - 1738: 36(fvec3) VectorTimesMatrix 1736 1737 - Store 1735(r10) 1738 - 1740: 6(float) Load 120(inF0) - 1741: 111 Load 124(inFM2x3) - 1742: 111 MatrixTimesScalar 1741 1740 - Store 1739(r11) 1742 - 1744: 6(float) Load 120(inF0) - 1745: 113 Load 125(inFM3x2) - 1746: 113 MatrixTimesScalar 1745 1744 - Store 1743(r12) 1746 - 1748: 113 Load 125(inFM3x2) - 1749: 111 Load 124(inFM2x3) - 1750: 60 MatrixTimesMatrix 1748 1749 - Store 1747(r13) 1750 - 1752: 68 Load 126(inFM3x3) - 1753: 111 Load 124(inFM2x3) - 1754: 111 MatrixTimesMatrix 1752 1753 - Store 1751(r14) 1754 - 1756: 115 Load 127(inFM3x4) - 1757: 111 Load 124(inFM2x3) - 1758: 117 MatrixTimesMatrix 1756 1757 - Store 1755(r15) 1758 - 1760: 117 Load 128(inFM2x4) - 1761: 113 Load 125(inFM3x2) - 1762: 115 MatrixTimesMatrix 1760 1761 - Store 1759(r16) 1762 +131(TestGenMulNxM(f1;f1;vf2;vf3;mf23;mf32;mf33;mf34;mf24;): 2 Function None 121 + 122(inF0): 7(ptr) FunctionParameter + 123(inF1): 7(ptr) FunctionParameter + 124(inFV2): 27(ptr) FunctionParameter + 125(inFV3): 39(ptr) FunctionParameter + 126(inFM2x3): 114(ptr) FunctionParameter + 127(inFM3x2): 116(ptr) FunctionParameter + 128(inFM3x3): 71(ptr) FunctionParameter + 129(inFM3x4): 118(ptr) FunctionParameter + 130(inFM2x4): 120(ptr) FunctionParameter + 132: Label + 1737(r00): 7(ptr) Variable Function + 1741(r01): 27(ptr) Variable Function + 1745(r02): 39(ptr) Variable Function + 1749(r03): 27(ptr) Variable Function + 1753(r04): 39(ptr) Variable Function + 1757(r05): 7(ptr) Variable Function + 1761(r06): 7(ptr) Variable Function + 1765(r07): 39(ptr) Variable Function + 1769(r08): 27(ptr) Variable Function + 1773(r09): 27(ptr) Variable Function + 1777(r10): 39(ptr) Variable Function + 1781(r11): 114(ptr) Variable Function + 1785(r12): 116(ptr) Variable Function + 1789(r13): 63(ptr) Variable Function + 1793(r14): 114(ptr) Variable Function + 1797(r15): 120(ptr) Variable Function + 1801(r16): 118(ptr) Variable Function + 1738: 6(float) Load 123(inF1) + 1739: 6(float) Load 122(inF0) + 1740: 6(float) FMul 1738 1739 + Store 1737(r00) 1740 + 1742: 6(float) Load 122(inF0) + 1743: 26(fvec2) Load 124(inFV2) + 1744: 26(fvec2) VectorTimesScalar 1743 1742 + Store 1741(r01) 1744 + 1746: 6(float) Load 122(inF0) + 1747: 38(fvec3) Load 125(inFV3) + 1748: 38(fvec3) VectorTimesScalar 1747 1746 + Store 1745(r02) 1748 + 1750: 26(fvec2) Load 124(inFV2) + 1751: 6(float) Load 122(inF0) + 1752: 26(fvec2) VectorTimesScalar 1750 1751 + Store 1749(r03) 1752 + 1754: 38(fvec3) Load 125(inFV3) + 1755: 6(float) Load 122(inF0) + 1756: 38(fvec3) VectorTimesScalar 1754 1755 + Store 1753(r04) 1756 + 1758: 26(fvec2) Load 124(inFV2) + 1759: 26(fvec2) Load 124(inFV2) + 1760: 6(float) Dot 1758 1759 + Store 1757(r05) 1760 + 1762: 38(fvec3) Load 125(inFV3) + 1763: 38(fvec3) Load 125(inFV3) + 1764: 6(float) Dot 1762 1763 + Store 1761(r06) 1764 + 1766: 113 Load 126(inFM2x3) + 1767: 26(fvec2) Load 124(inFV2) + 1768: 38(fvec3) MatrixTimesVector 1766 1767 + Store 1765(r07) 1768 + 1770: 115 Load 127(inFM3x2) + 1771: 38(fvec3) Load 125(inFV3) + 1772: 26(fvec2) MatrixTimesVector 1770 1771 + Store 1769(r08) 1772 + 1774: 38(fvec3) Load 125(inFV3) + 1775: 113 Load 126(inFM2x3) + 1776: 26(fvec2) VectorTimesMatrix 1774 1775 + Store 1773(r09) 1776 + 1778: 26(fvec2) Load 124(inFV2) + 1779: 115 Load 127(inFM3x2) + 1780: 38(fvec3) VectorTimesMatrix 1778 1779 + Store 1777(r10) 1780 + 1782: 6(float) Load 122(inF0) + 1783: 113 Load 126(inFM2x3) + 1784: 113 MatrixTimesScalar 1783 1782 + Store 1781(r11) 1784 + 1786: 6(float) Load 122(inF0) + 1787: 115 Load 127(inFM3x2) + 1788: 115 MatrixTimesScalar 1787 1786 + Store 1785(r12) 1788 + 1790: 115 Load 127(inFM3x2) + 1791: 113 Load 126(inFM2x3) + 1792: 62 MatrixTimesMatrix 1790 1791 + Store 1789(r13) 1792 + 1794: 70 Load 128(inFM3x3) + 1795: 113 Load 126(inFM2x3) + 1796: 113 MatrixTimesMatrix 1794 1795 + Store 1793(r14) 1796 + 1798: 117 Load 129(inFM3x4) + 1799: 113 Load 126(inFM2x3) + 1800: 119 MatrixTimesMatrix 1798 1799 + Store 1797(r15) 1800 + 1802: 119 Load 130(inFM2x4) + 1803: 115 Load 127(inFM3x2) + 1804: 117 MatrixTimesMatrix 1802 1803 + Store 1801(r16) 1804 Return FunctionEnd - 133(@main():131(PS_OUTPUT) Function None 132 - 134: Label - 1764(ps_output): 1763(ptr) Variable Function - 1767: 49(ptr) AccessChain 1764(ps_output) 1765 - Store 1767 1766 - 1768:131(PS_OUTPUT) Load 1764(ps_output) - ReturnValue 1768 + 135(@main():133(PS_OUTPUT) Function None 134 + 136: Label + 1806(ps_output): 1805(ptr) Variable Function + 1808: 51(ptr) AccessChain 1806(ps_output) 187 + Store 1808 1807 + 1809:133(PS_OUTPUT) Load 1806(ps_output) + ReturnValue 1809 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.lit.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.lit.frag.out index 61024f4..c2c7e85 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.lit.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.lit.frag.out @@ -118,7 +118,7 @@ gl_FragCoord origin is upper left 0:? 'm' (layout( location=2) in float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 52 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.comp.out index 176cf23..a1a61d8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.comp.out @@ -180,7 +180,7 @@ local_size = (1, 1, 1) 0:? 'inI0' (layout( location=3) in 4-component vector of int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 99 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.frag.out index 591ad13..980cc96 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.frag.out @@ -1,10 +1,10 @@ hlsl.intrinsics.negative.frag -ERROR: 0:10: 'determinant' : no matching overloaded function found +ERROR: 0:10: 'determinant' : ambiguous best function under implicit type conversion ERROR: 0:25: 'normalize' : ambiguous best function under implicit type conversion ERROR: 0:26: 'reflect' : ambiguous best function under implicit type conversion ERROR: 0:27: 'refract' : ambiguous best function under implicit type conversion ERROR: 0:28: 'refract' : no matching overloaded function found -ERROR: 0:30: 'transpose' : no matching overloaded function found +ERROR: 0:30: 'transpose' : ambiguous best function under implicit type conversion ERROR: 0:39: 'GetRenderTargetSamplePosition' : no matching overloaded function found ERROR: 0:46: 'asdouble' : double2 conversion not implemented ERROR: 0:47: 'CheckAccessFullyMapped' : no matching overloaded function found @@ -104,8 +104,9 @@ ERROR: node is still EOpNull! 0:9 0 (const int) 0:9 Constant: 0:9 3 (const int) -0:10 Constant: -0:10 0.000000 +0:10 determinant ( temp float) +ERROR: node is still EOpNull! +0:10 'inF0' ( in float) 0:12 direct index ( temp float) 0:12 unpackHalf2x16 ( temp 2-component vector of float) 0:12 Convert float to uint ( temp uint) @@ -150,8 +151,9 @@ ERROR: node is still EOpNull! 0:29 bitFieldReverse ( temp uint) 0:29 Convert float to uint ( temp uint) 0:29 'inF0' ( in float) -0:30 Constant: -0:30 0.000000 +0:30 transpose ( temp 1X1 matrix of float) +ERROR: node is still EOpNull! +0:30 'inF0' ( in float) 0:32 Branch: Return with expression 0:32 Constant: 0:32 0.000000 @@ -372,7 +374,7 @@ ERROR: node is still EOpNull! 0:? 'inF2' (layout( location=2) in 4-component vector of float) 0:80 move second child to first child ( temp 4-component vector of int) 0:? 'inI0' ( temp 4-component vector of int) -0:? 'inI0' (layout( location=3) in 4-component vector of int) +0:? 'inI0' (layout( location=3) flat in 4-component vector of int) 0:80 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:80 Function Call: @PixelShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float) @@ -516,7 +518,7 @@ ERROR: node is still EOpNull! 0:? 'inF0' (layout( location=0) in 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) 0:? 'inF2' (layout( location=2) in 4-component vector of float) -0:? 'inI0' (layout( location=3) in 4-component vector of int) +0:? 'inI0' (layout( location=3) flat in 4-component vector of int) Linked fragment stage: @@ -565,8 +567,9 @@ ERROR: node is still EOpNull! 0:9 0 (const int) 0:9 Constant: 0:9 3 (const int) -0:10 Constant: -0:10 0.000000 +0:10 determinant ( temp float) +ERROR: node is still EOpNull! +0:10 'inF0' ( in float) 0:12 direct index ( temp float) 0:12 unpackHalf2x16 ( temp 2-component vector of float) 0:12 Convert float to uint ( temp uint) @@ -611,8 +614,9 @@ ERROR: node is still EOpNull! 0:29 bitFieldReverse ( temp uint) 0:29 Convert float to uint ( temp uint) 0:29 'inF0' ( in float) -0:30 Constant: -0:30 0.000000 +0:30 transpose ( temp 1X1 matrix of float) +ERROR: node is still EOpNull! +0:30 'inF0' ( in float) 0:32 Branch: Return with expression 0:32 Constant: 0:32 0.000000 @@ -833,7 +837,7 @@ ERROR: node is still EOpNull! 0:? 'inF2' (layout( location=2) in 4-component vector of float) 0:80 move second child to first child ( temp 4-component vector of int) 0:? 'inI0' ( temp 4-component vector of int) -0:? 'inI0' (layout( location=3) in 4-component vector of int) +0:? 'inI0' (layout( location=3) flat in 4-component vector of int) 0:80 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:80 Function Call: @PixelShaderFunction(vf4;vf4;vf4;vi4; ( temp 4-component vector of float) @@ -977,6 +981,6 @@ ERROR: node is still EOpNull! 0:? 'inF0' (layout( location=0) in 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) 0:? 'inF2' (layout( location=2) in 4-component vector of float) -0:? 'inI0' (layout( location=3) in 4-component vector of int) +0:? 'inI0' (layout( location=3) flat in 4-component vector of int) SPIR-V is not generated for failed compile or link diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.vert.out index aabcda8..f1dc1c3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.negative.vert.out @@ -308,7 +308,7 @@ Shader version: 500 0:? 'inI0' (layout( location=3) in 4-component vector of int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 155 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.down.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.down.frag.out index d67b2e8..a3748c3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.down.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.down.frag.out @@ -40,14 +40,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:15 Sequence 0:15 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:15 color: direct index for structure ( temp 4-component vector of float) 0:15 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:15 Constant: 0:15 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int i, uniform uint u, uniform float f, uniform bool b, uniform 2-component vector of int i2, uniform 2-component vector of uint u2, uniform 2-component vector of float f2, uniform 2-component vector of bool b2}) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -94,17 +94,17 @@ gl_FragCoord origin is upper left 0:? Sequence 0:15 Sequence 0:15 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:15 color: direct index for structure ( temp 4-component vector of float) 0:15 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:15 Constant: 0:15 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int i, uniform uint u, uniform float f, uniform bool b, uniform 2-component vector of int i2, uniform 2-component vector of uint u2, uniform 2-component vector of float f2, uniform 2-component vector of bool b2}) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 50 Capability Shader @@ -130,7 +130,7 @@ gl_FragCoord origin is upper left Name 21 "" Name 29 "r01" Name 37 "ps_output" - Name 47 "color" + Name 47 "@entryPointOutput.color" MemberDecorate 19($Global) 0 Offset 0 MemberDecorate 19($Global) 1 Offset 4 MemberDecorate 19($Global) 2 Offset 8 @@ -141,7 +141,7 @@ gl_FragCoord origin is upper left MemberDecorate 19($Global) 7 Offset 40 Decorate 19($Global) Block Decorate 21 DescriptorSet 0 - Decorate 47(color) Location 0 + Decorate 47(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -168,12 +168,12 @@ gl_FragCoord origin is upper left 40: 7(fvec4) ConstantComposite 39 39 39 39 41: TypePointer Function 7(fvec4) 46: TypePointer Output 7(fvec4) - 47(color): 46(ptr) Variable Output +47(@entryPointOutput.color): 46(ptr) Variable Output 4(main): 2 Function None 3 5: Label 48:8(PS_OUTPUT) FunctionCall 10(@main() 49: 7(fvec4) CompositeExtract 48 0 - Store 47(color) 49 + Store 47(@entryPointOutput.color) 49 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.frag.out index b62d30d..e66da7e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.frag.out @@ -430,7 +430,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:20 Sequence 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:20 color: direct index for structure ( temp 4-component vector of float) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:20 Constant: @@ -439,7 +439,7 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int i, uniform uint u, uniform float f, uniform bool b, uniform 2-component vector of int i2, uniform 2-component vector of uint u2, uniform 2-component vector of float f2, uniform 2-component vector of bool b2, uniform uint upos, uniform float fpos}) 0:? 'g_tTexbfs' (layout( r32f) uniform textureBuffer) 0:? 'g_tTex1df4' ( uniform texture1D) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -876,7 +876,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:20 Sequence 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:20 color: direct index for structure ( temp 4-component vector of float) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:20 Constant: @@ -885,10 +885,10 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int i, uniform uint u, uniform float f, uniform bool b, uniform 2-component vector of int i2, uniform 2-component vector of uint u2, uniform 2-component vector of float f2, uniform 2-component vector of bool b2, uniform uint upos, uniform float fpos}) 0:? 'g_tTexbfs' (layout( r32f) uniform textureBuffer) 0:? 'g_tTex1df4' ( uniform texture1D) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 322 Capability Shader @@ -951,7 +951,7 @@ gl_FragCoord origin is upper left Name 297 "NumberOfLevelsI" Name 301 "sizeQueryTemp" Name 310 "ps_output" - Name 319 "color" + Name 319 "@entryPointOutput.color" MemberDecorate 19($Global) 0 Offset 0 MemberDecorate 19($Global) 1 Offset 4 MemberDecorate 19($Global) 2 Offset 8 @@ -966,7 +966,7 @@ gl_FragCoord origin is upper left Decorate 21 DescriptorSet 0 Decorate 258(g_tTexbfs) DescriptorSet 0 Decorate 277(g_tTex1df4) DescriptorSet 0 - Decorate 319(color) Location 0 + Decorate 319(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -1025,12 +1025,12 @@ gl_FragCoord origin is upper left 309: TypePointer Function 8(PS_OUTPUT) 313: TypePointer Function 7(fvec4) 318: TypePointer Output 7(fvec4) - 319(color): 318(ptr) Variable Output +319(@entryPointOutput.color): 318(ptr) Variable Output 4(main): 2 Function None 3 5: Label 320:8(PS_OUTPUT) FunctionCall 10(@main() 321: 7(fvec4) CompositeExtract 320 0 - Store 319(color) 321 + Store 319(@entryPointOutput.color) 321 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out index 87b425f..ff3e0cf 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out @@ -88,7 +88,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:20 Sequence 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:20 color: direct index for structure ( temp 4-component vector of float) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:20 Constant: @@ -97,7 +97,7 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int i, uniform uint u, uniform float f, uniform bool b, uniform 2-component vector of int i2, uniform 2-component vector of uint u2, uniform 2-component vector of float f2, uniform 2-component vector of bool b2, uniform uint upos, uniform float fpos}) 0:? 'g_tTexbfs' (layout( r32f) uniform textureBuffer) 0:? 'g_tTex1df4' ( uniform texture1D) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -192,7 +192,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:20 Sequence 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:20 color: direct index for structure ( temp 4-component vector of float) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:20 Constant: @@ -201,10 +201,10 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int i, uniform uint u, uniform float f, uniform bool b, uniform 2-component vector of int i2, uniform 2-component vector of uint u2, uniform 2-component vector of float f2, uniform 2-component vector of bool b2, uniform uint upos, uniform float fpos}) 0:? 'g_tTexbfs' (layout( r32f) uniform textureBuffer) 0:? 'g_tTex1df4' ( uniform texture1D) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 80 Capability Shader @@ -242,7 +242,7 @@ gl_FragCoord origin is upper left Name 53 "NumberOfLevelsI" Name 57 "sizeQueryTemp" Name 66 "ps_output" - Name 74 "color" + Name 74 "@entryPointOutput.color" Name 79 "g_tTexbfs" MemberDecorate 17($Global) 0 Offset 0 MemberDecorate 17($Global) 1 Offset 4 @@ -257,7 +257,7 @@ gl_FragCoord origin is upper left Decorate 17($Global) Block Decorate 19 DescriptorSet 0 Decorate 31(g_tTex1df4) DescriptorSet 0 - Decorate 74(color) Location 0 + Decorate 74(@entryPointOutput.color) Location 0 Decorate 79(g_tTexbfs) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 @@ -288,7 +288,7 @@ gl_FragCoord origin is upper left 67: 7(fvec4) ConstantComposite 24 24 24 24 68: TypePointer Function 7(fvec4) 73: TypePointer Output 7(fvec4) - 74(color): 73(ptr) Variable Output +74(@entryPointOutput.color): 73(ptr) Variable Output 77: TypeImage 6(float) Buffer sampled format:R32f 78: TypePointer UniformConstant 77 79(g_tTexbfs): 78(ptr) Variable UniformConstant @@ -296,7 +296,7 @@ gl_FragCoord origin is upper left 5: Label 75:8(PS_OUTPUT) FunctionCall 10(@main() 76: 7(fvec4) CompositeExtract 75 0 - Store 74(color) 76 + Store 74(@entryPointOutput.color) 76 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.vert.out index 82bb18e..eccf03d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.intrinsics.vert.out @@ -10,13 +10,15 @@ Shader version: 500 0:2 'inU1' ( in uint) 0:? Sequence 0:3 all ( temp bool) -0:3 'inF0' ( in float) +0:3 Convert float to bool ( temp bool) +0:3 'inF0' ( in float) 0:4 Absolute value ( temp float) 0:4 'inF0' ( in float) 0:5 arc cosine ( temp float) 0:5 'inF0' ( in float) 0:6 any ( temp bool) -0:6 'inF0' ( in float) +0:6 Convert float to bool ( temp bool) +0:6 'inF0' ( in float) 0:7 arc sine ( temp float) 0:7 'inF0' ( in float) 0:8 floatBitsToInt ( temp int) @@ -157,13 +159,15 @@ Shader version: 500 0:69 'inU1' ( in 2-component vector of uint) 0:? Sequence 0:70 all ( temp bool) -0:70 'inF0' ( in 2-component vector of float) +0:70 Convert float to bool ( temp 2-component vector of bool) +0:70 'inF0' ( in 2-component vector of float) 0:71 Absolute value ( temp 2-component vector of float) 0:71 'inF0' ( in 2-component vector of float) 0:72 arc cosine ( temp 2-component vector of float) 0:72 'inF0' ( in 2-component vector of float) 0:73 any ( temp bool) -0:73 'inF0' ( in 2-component vector of float) +0:73 Convert float to bool ( temp 2-component vector of bool) +0:73 'inF0' ( in 2-component vector of float) 0:74 arc sine ( temp 2-component vector of float) 0:74 'inF0' ( in 2-component vector of float) 0:75 floatBitsToInt ( temp 2-component vector of int) @@ -320,13 +324,15 @@ Shader version: 500 0:138 'inU1' ( in 3-component vector of uint) 0:? Sequence 0:139 all ( temp bool) -0:139 'inF0' ( in 3-component vector of float) +0:139 Convert float to bool ( temp 3-component vector of bool) +0:139 'inF0' ( in 3-component vector of float) 0:140 Absolute value ( temp 3-component vector of float) 0:140 'inF0' ( in 3-component vector of float) 0:141 arc cosine ( temp 3-component vector of float) 0:141 'inF0' ( in 3-component vector of float) 0:142 any ( temp bool) -0:142 'inF0' ( in 3-component vector of float) +0:142 Convert float to bool ( temp 3-component vector of bool) +0:142 'inF0' ( in 3-component vector of float) 0:143 arc sine ( temp 3-component vector of float) 0:143 'inF0' ( in 3-component vector of float) 0:144 floatBitsToInt ( temp 3-component vector of int) @@ -489,13 +495,15 @@ Shader version: 500 0:208 'inU1' ( in 4-component vector of uint) 0:? Sequence 0:209 all ( temp bool) -0:209 'inF0' ( in 4-component vector of float) +0:209 Convert float to bool ( temp 4-component vector of bool) +0:209 'inF0' ( in 4-component vector of float) 0:210 Absolute value ( temp 4-component vector of float) 0:210 'inF0' ( in 4-component vector of float) 0:211 arc cosine ( temp 4-component vector of float) 0:211 'inF0' ( in 4-component vector of float) 0:212 any ( temp bool) -0:212 'inF0' ( in 4-component vector of float) +0:212 Convert float to bool ( temp 4-component vector of bool) +0:212 'inF0' ( in 4-component vector of float) 0:213 arc sine ( temp 4-component vector of float) 0:213 'inF0' ( in 4-component vector of float) 0:214 floatBitsToInt ( temp 4-component vector of int) @@ -676,13 +684,15 @@ Shader version: 500 0:331 'inF2' ( in 2X2 matrix of float) 0:? Sequence 0:333 all ( temp bool) -0:333 'inF0' ( in 2X2 matrix of float) +0:333 Convert float to bool ( temp 2X2 matrix of bool) +0:333 'inF0' ( in 2X2 matrix of float) 0:333 Absolute value ( temp 2X2 matrix of float) 0:333 'inF0' ( in 2X2 matrix of float) 0:333 arc cosine ( temp 2X2 matrix of float) 0:333 'inF0' ( in 2X2 matrix of float) 0:333 any ( temp bool) -0:333 'inF0' ( in 2X2 matrix of float) +0:333 Convert float to bool ( temp 2X2 matrix of bool) +0:333 'inF0' ( in 2X2 matrix of float) 0:333 arc sine ( temp 2X2 matrix of float) 0:333 'inF0' ( in 2X2 matrix of float) 0:333 arc tangent ( temp 2X2 matrix of float) @@ -803,13 +813,15 @@ Shader version: 500 0:340 'inF2' ( in 3X3 matrix of float) 0:? Sequence 0:342 all ( temp bool) -0:342 'inF0' ( in 3X3 matrix of float) +0:342 Convert float to bool ( temp 3X3 matrix of bool) +0:342 'inF0' ( in 3X3 matrix of float) 0:342 Absolute value ( temp 3X3 matrix of float) 0:342 'inF0' ( in 3X3 matrix of float) 0:342 arc cosine ( temp 3X3 matrix of float) 0:342 'inF0' ( in 3X3 matrix of float) 0:342 any ( temp bool) -0:342 'inF0' ( in 3X3 matrix of float) +0:342 Convert float to bool ( temp 3X3 matrix of bool) +0:342 'inF0' ( in 3X3 matrix of float) 0:342 arc sine ( temp 3X3 matrix of float) 0:342 'inF0' ( in 3X3 matrix of float) 0:342 arc tangent ( temp 3X3 matrix of float) @@ -935,13 +947,15 @@ Shader version: 500 0:349 'inF2' ( in 4X4 matrix of float) 0:? Sequence 0:351 all ( temp bool) -0:351 'inF0' ( in 4X4 matrix of float) +0:351 Convert float to bool ( temp 4X4 matrix of bool) +0:351 'inF0' ( in 4X4 matrix of float) 0:351 Absolute value ( temp 4X4 matrix of float) 0:351 'inF0' ( in 4X4 matrix of float) 0:351 arc cosine ( temp 4X4 matrix of float) 0:351 'inF0' ( in 4X4 matrix of float) 0:351 any ( temp bool) -0:351 'inF0' ( in 4X4 matrix of float) +0:351 Convert float to bool ( temp 4X4 matrix of bool) +0:351 'inF0' ( in 4X4 matrix of float) 0:351 arc sine ( temp 4X4 matrix of float) 0:351 'inF0' ( in 4X4 matrix of float) 0:351 arc tangent ( temp 4X4 matrix of float) @@ -1388,13 +1402,15 @@ Shader version: 500 0:2 'inU1' ( in uint) 0:? Sequence 0:3 all ( temp bool) -0:3 'inF0' ( in float) +0:3 Convert float to bool ( temp bool) +0:3 'inF0' ( in float) 0:4 Absolute value ( temp float) 0:4 'inF0' ( in float) 0:5 arc cosine ( temp float) 0:5 'inF0' ( in float) 0:6 any ( temp bool) -0:6 'inF0' ( in float) +0:6 Convert float to bool ( temp bool) +0:6 'inF0' ( in float) 0:7 arc sine ( temp float) 0:7 'inF0' ( in float) 0:8 floatBitsToInt ( temp int) @@ -1535,13 +1551,15 @@ Shader version: 500 0:69 'inU1' ( in 2-component vector of uint) 0:? Sequence 0:70 all ( temp bool) -0:70 'inF0' ( in 2-component vector of float) +0:70 Convert float to bool ( temp 2-component vector of bool) +0:70 'inF0' ( in 2-component vector of float) 0:71 Absolute value ( temp 2-component vector of float) 0:71 'inF0' ( in 2-component vector of float) 0:72 arc cosine ( temp 2-component vector of float) 0:72 'inF0' ( in 2-component vector of float) 0:73 any ( temp bool) -0:73 'inF0' ( in 2-component vector of float) +0:73 Convert float to bool ( temp 2-component vector of bool) +0:73 'inF0' ( in 2-component vector of float) 0:74 arc sine ( temp 2-component vector of float) 0:74 'inF0' ( in 2-component vector of float) 0:75 floatBitsToInt ( temp 2-component vector of int) @@ -1698,13 +1716,15 @@ Shader version: 500 0:138 'inU1' ( in 3-component vector of uint) 0:? Sequence 0:139 all ( temp bool) -0:139 'inF0' ( in 3-component vector of float) +0:139 Convert float to bool ( temp 3-component vector of bool) +0:139 'inF0' ( in 3-component vector of float) 0:140 Absolute value ( temp 3-component vector of float) 0:140 'inF0' ( in 3-component vector of float) 0:141 arc cosine ( temp 3-component vector of float) 0:141 'inF0' ( in 3-component vector of float) 0:142 any ( temp bool) -0:142 'inF0' ( in 3-component vector of float) +0:142 Convert float to bool ( temp 3-component vector of bool) +0:142 'inF0' ( in 3-component vector of float) 0:143 arc sine ( temp 3-component vector of float) 0:143 'inF0' ( in 3-component vector of float) 0:144 floatBitsToInt ( temp 3-component vector of int) @@ -1867,13 +1887,15 @@ Shader version: 500 0:208 'inU1' ( in 4-component vector of uint) 0:? Sequence 0:209 all ( temp bool) -0:209 'inF0' ( in 4-component vector of float) +0:209 Convert float to bool ( temp 4-component vector of bool) +0:209 'inF0' ( in 4-component vector of float) 0:210 Absolute value ( temp 4-component vector of float) 0:210 'inF0' ( in 4-component vector of float) 0:211 arc cosine ( temp 4-component vector of float) 0:211 'inF0' ( in 4-component vector of float) 0:212 any ( temp bool) -0:212 'inF0' ( in 4-component vector of float) +0:212 Convert float to bool ( temp 4-component vector of bool) +0:212 'inF0' ( in 4-component vector of float) 0:213 arc sine ( temp 4-component vector of float) 0:213 'inF0' ( in 4-component vector of float) 0:214 floatBitsToInt ( temp 4-component vector of int) @@ -2054,13 +2076,15 @@ Shader version: 500 0:331 'inF2' ( in 2X2 matrix of float) 0:? Sequence 0:333 all ( temp bool) -0:333 'inF0' ( in 2X2 matrix of float) +0:333 Convert float to bool ( temp 2X2 matrix of bool) +0:333 'inF0' ( in 2X2 matrix of float) 0:333 Absolute value ( temp 2X2 matrix of float) 0:333 'inF0' ( in 2X2 matrix of float) 0:333 arc cosine ( temp 2X2 matrix of float) 0:333 'inF0' ( in 2X2 matrix of float) 0:333 any ( temp bool) -0:333 'inF0' ( in 2X2 matrix of float) +0:333 Convert float to bool ( temp 2X2 matrix of bool) +0:333 'inF0' ( in 2X2 matrix of float) 0:333 arc sine ( temp 2X2 matrix of float) 0:333 'inF0' ( in 2X2 matrix of float) 0:333 arc tangent ( temp 2X2 matrix of float) @@ -2181,13 +2205,15 @@ Shader version: 500 0:340 'inF2' ( in 3X3 matrix of float) 0:? Sequence 0:342 all ( temp bool) -0:342 'inF0' ( in 3X3 matrix of float) +0:342 Convert float to bool ( temp 3X3 matrix of bool) +0:342 'inF0' ( in 3X3 matrix of float) 0:342 Absolute value ( temp 3X3 matrix of float) 0:342 'inF0' ( in 3X3 matrix of float) 0:342 arc cosine ( temp 3X3 matrix of float) 0:342 'inF0' ( in 3X3 matrix of float) 0:342 any ( temp bool) -0:342 'inF0' ( in 3X3 matrix of float) +0:342 Convert float to bool ( temp 3X3 matrix of bool) +0:342 'inF0' ( in 3X3 matrix of float) 0:342 arc sine ( temp 3X3 matrix of float) 0:342 'inF0' ( in 3X3 matrix of float) 0:342 arc tangent ( temp 3X3 matrix of float) @@ -2313,13 +2339,15 @@ Shader version: 500 0:349 'inF2' ( in 4X4 matrix of float) 0:? Sequence 0:351 all ( temp bool) -0:351 'inF0' ( in 4X4 matrix of float) +0:351 Convert float to bool ( temp 4X4 matrix of bool) +0:351 'inF0' ( in 4X4 matrix of float) 0:351 Absolute value ( temp 4X4 matrix of float) 0:351 'inF0' ( in 4X4 matrix of float) 0:351 arc cosine ( temp 4X4 matrix of float) 0:351 'inF0' ( in 4X4 matrix of float) 0:351 any ( temp bool) -0:351 'inF0' ( in 4X4 matrix of float) +0:351 Convert float to bool ( temp 4X4 matrix of bool) +0:351 'inF0' ( in 4X4 matrix of float) 0:351 arc sine ( temp 4X4 matrix of float) 0:351 'inF0' ( in 4X4 matrix of float) 0:351 arc tangent ( temp 4X4 matrix of float) @@ -2751,8 +2779,8 @@ Shader version: 500 0:? Linker Objects // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 1205 +// Generated by (magic number): 80003 +// Id's are bound by 1225 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -2831,50 +2859,50 @@ Shader version: 500 Name 126 "inFM3x3" Name 127 "inFM3x4" Name 128 "inFM2x4" - Name 1029 "r0" - Name 1033 "r1" - Name 1037 "r2" - Name 1041 "r3" - Name 1045 "r4" - Name 1049 "r5" - Name 1053 "r6" - Name 1057 "r7" - Name 1061 "r8" - Name 1065 "r0" - Name 1069 "r1" - Name 1073 "r2" - Name 1077 "r3" - Name 1081 "r4" - Name 1085 "r5" - Name 1089 "r6" - Name 1093 "r7" - Name 1097 "r8" - Name 1101 "r0" - Name 1105 "r1" - Name 1109 "r2" - Name 1113 "r3" - Name 1117 "r4" - Name 1121 "r5" - Name 1125 "r6" - Name 1129 "r7" - Name 1133 "r8" - Name 1137 "r00" - Name 1141 "r01" - Name 1145 "r02" - Name 1149 "r03" - Name 1153 "r04" - Name 1157 "r05" - Name 1161 "r06" - Name 1165 "r07" - Name 1169 "r08" - Name 1173 "r09" - Name 1177 "r10" - Name 1181 "r11" - Name 1185 "r12" - Name 1189 "r13" - Name 1193 "r14" - Name 1197 "r15" - Name 1201 "r16" + Name 1049 "r0" + Name 1053 "r1" + Name 1057 "r2" + Name 1061 "r3" + Name 1065 "r4" + Name 1069 "r5" + Name 1073 "r6" + Name 1077 "r7" + Name 1081 "r8" + Name 1085 "r0" + Name 1089 "r1" + Name 1093 "r2" + Name 1097 "r3" + Name 1101 "r4" + Name 1105 "r5" + Name 1109 "r6" + Name 1113 "r7" + Name 1117 "r8" + Name 1121 "r0" + Name 1125 "r1" + Name 1129 "r2" + Name 1133 "r3" + Name 1137 "r4" + Name 1141 "r5" + Name 1145 "r6" + Name 1149 "r7" + Name 1153 "r8" + Name 1157 "r00" + Name 1161 "r01" + Name 1165 "r02" + Name 1169 "r03" + Name 1173 "r04" + Name 1177 "r05" + Name 1181 "r06" + Name 1185 "r07" + Name 1189 "r08" + Name 1193 "r09" + Name 1197 "r10" + Name 1201 "r11" + Name 1205 "r12" + Name 1209 "r13" + Name 1213 "r14" + Name 1217 "r15" + Name 1221 "r16" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -2920,43 +2948,49 @@ Shader version: 500 118: TypePointer Function 117 119: TypeFunction 2 7(ptr) 7(ptr) 25(ptr) 37(ptr) 112(ptr) 114(ptr) 69(ptr) 116(ptr) 118(ptr) 132: TypeBool - 143: TypeInt 32 1 - 164: 143(int) Constant 7 - 196: 6(float) Constant 1050288283 - 211: 143(int) Constant 2 - 218: 6(float) Constant 0 - 219: 6(float) Constant 1065353216 - 261: TypeVector 143(int) 2 - 282: 143(int) Constant 3 - 283: 261(ivec2) ConstantComposite 164 282 - 311: TypeVector 132(bool) 2 - 349: 6(float) Constant 1073741824 - 351: 143(int) Constant 1 - 352: 261(ivec2) ConstantComposite 351 211 - 387: 24(fvec2) ConstantComposite 219 349 - 401: TypeVector 143(int) 3 - 422: 143(int) Constant 5 - 423: 401(ivec3) ConstantComposite 164 282 422 - 454: TypeVector 132(bool) 3 - 493: 401(ivec3) ConstantComposite 351 211 282 - 528: 6(float) Constant 1077936128 - 529: 36(fvec3) ConstantComposite 219 349 528 - 543: TypeVector 143(int) 4 - 564: 543(ivec4) ConstantComposite 164 282 422 211 - 574: 8(int) Constant 1 - 580: 8(int) Constant 2 - 583: 8(int) Constant 3 - 605: TypeVector 132(bool) 4 - 644: 143(int) Constant 4 - 645: 543(ivec4) ConstantComposite 351 211 282 644 - 680: 6(float) Constant 1082130432 - 681: 48(fvec4) ConstantComposite 219 349 528 680 - 792: 24(fvec2) ConstantComposite 349 349 - 793: 60 ConstantComposite 792 792 - 907: 36(fvec3) ConstantComposite 528 528 528 - 908: 68 ConstantComposite 907 907 907 - 1025: 48(fvec4) ConstantComposite 680 680 680 680 - 1026: 76 ConstantComposite 1025 1025 1025 1025 + 133: 6(float) Constant 0 + 146: TypeInt 32 1 + 167: 146(int) Constant 7 + 199: 6(float) Constant 1050288283 + 214: 146(int) Constant 2 + 221: 6(float) Constant 1065353216 + 253: TypeVector 132(bool) 2 + 254: 24(fvec2) ConstantComposite 133 133 + 267: TypeVector 146(int) 2 + 288: 146(int) Constant 3 + 289: 267(ivec2) ConstantComposite 167 288 + 354: 6(float) Constant 1073741824 + 356: 146(int) Constant 1 + 357: 267(ivec2) ConstantComposite 356 214 + 392: 24(fvec2) ConstantComposite 221 354 + 396: TypeVector 132(bool) 3 + 397: 36(fvec3) ConstantComposite 133 133 133 + 410: TypeVector 146(int) 3 + 431: 146(int) Constant 5 + 432: 410(ivec3) ConstantComposite 167 288 431 + 501: 410(ivec3) ConstantComposite 356 214 288 + 536: 6(float) Constant 1077936128 + 537: 36(fvec3) ConstantComposite 221 354 536 + 541: TypeVector 132(bool) 4 + 542: 48(fvec4) ConstantComposite 133 133 133 133 + 555: TypeVector 146(int) 4 + 576: 555(ivec4) ConstantComposite 167 288 431 214 + 586: 8(int) Constant 1 + 592: 8(int) Constant 2 + 595: 8(int) Constant 3 + 655: 146(int) Constant 4 + 656: 555(ivec4) ConstantComposite 356 214 288 655 + 691: 6(float) Constant 1082130432 + 692: 48(fvec4) ConstantComposite 221 354 536 691 + 696: TypeMatrix 253(bvec2) 2 + 806: 24(fvec2) ConstantComposite 354 354 + 807: 60 ConstantComposite 806 806 + 811: TypeMatrix 396(bvec3) 3 + 924: 36(fvec3) ConstantComposite 536 536 536 + 925: 68 ConstantComposite 924 924 924 + 929: TypeMatrix 541(bvec4) 4 + 1045: 48(fvec4) ConstantComposite 691 691 691 691 + 1046: 76 ConstantComposite 1045 1045 1045 1045 4(VertexShaderFunction): 2 Function None 3 5: Label Return @@ -2969,123 +3003,125 @@ Shader version: 500 15(inU1): 9(ptr) FunctionParameter 17: Label 131: 6(float) Load 11(inF0) - 133: 132(bool) All 131 - 134: 6(float) Load 11(inF0) - 135: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 134 + 134: 132(bool) FOrdNotEqual 131 133 + 135: 132(bool) All 134 136: 6(float) Load 11(inF0) - 137: 6(float) ExtInst 1(GLSL.std.450) 17(Acos) 136 + 137: 6(float) ExtInst 1(GLSL.std.450) 4(FAbs) 136 138: 6(float) Load 11(inF0) - 139: 132(bool) Any 138 + 139: 6(float) ExtInst 1(GLSL.std.450) 17(Acos) 138 140: 6(float) Load 11(inF0) - 141: 6(float) ExtInst 1(GLSL.std.450) 16(Asin) 140 - 142: 6(float) Load 11(inF0) - 144: 143(int) Bitcast 142 + 141: 132(bool) FOrdNotEqual 140 133 + 142: 132(bool) Any 141 + 143: 6(float) Load 11(inF0) + 144: 6(float) ExtInst 1(GLSL.std.450) 16(Asin) 143 145: 6(float) Load 11(inF0) - 146: 8(int) Bitcast 145 - 147: 8(int) Load 14(inU0) - 148: 6(float) Bitcast 147 - 149: 6(float) Load 11(inF0) - 150: 6(float) ExtInst 1(GLSL.std.450) 18(Atan) 149 - 151: 6(float) Load 11(inF0) - 152: 6(float) Load 12(inF1) - 153: 6(float) ExtInst 1(GLSL.std.450) 25(Atan2) 151 152 + 147: 146(int) Bitcast 145 + 148: 6(float) Load 11(inF0) + 149: 8(int) Bitcast 148 + 150: 8(int) Load 14(inU0) + 151: 6(float) Bitcast 150 + 152: 6(float) Load 11(inF0) + 153: 6(float) ExtInst 1(GLSL.std.450) 18(Atan) 152 154: 6(float) Load 11(inF0) - 155: 6(float) ExtInst 1(GLSL.std.450) 9(Ceil) 154 - 156: 6(float) Load 11(inF0) - 157: 6(float) Load 12(inF1) - 158: 6(float) Load 13(inF2) - 159: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 156 157 158 - 160: 6(float) Load 11(inF0) - 161: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 160 - 162: 6(float) Load 11(inF0) - 163: 6(float) ExtInst 1(GLSL.std.450) 20(Cosh) 162 - 165: 143(int) BitCount 164 - 166: 6(float) Load 11(inF0) - 167: 6(float) ExtInst 1(GLSL.std.450) 12(Degrees) 166 - 168: 6(float) Load 11(inF0) - 169: 6(float) ExtInst 1(GLSL.std.450) 27(Exp) 168 - 170: 6(float) Load 11(inF0) - 171: 6(float) ExtInst 1(GLSL.std.450) 29(Exp2) 170 - 172: 143(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 164 - 173: 143(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 164 - 174: 6(float) Load 11(inF0) - 175: 6(float) ExtInst 1(GLSL.std.450) 8(Floor) 174 - 176: 6(float) Load 11(inF0) - 177: 6(float) Load 12(inF1) - 178: 6(float) FMod 176 177 + 155: 6(float) Load 12(inF1) + 156: 6(float) ExtInst 1(GLSL.std.450) 25(Atan2) 154 155 + 157: 6(float) Load 11(inF0) + 158: 6(float) ExtInst 1(GLSL.std.450) 9(Ceil) 157 + 159: 6(float) Load 11(inF0) + 160: 6(float) Load 12(inF1) + 161: 6(float) Load 13(inF2) + 162: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 159 160 161 + 163: 6(float) Load 11(inF0) + 164: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 163 + 165: 6(float) Load 11(inF0) + 166: 6(float) ExtInst 1(GLSL.std.450) 20(Cosh) 165 + 168: 146(int) BitCount 167 + 169: 6(float) Load 11(inF0) + 170: 6(float) ExtInst 1(GLSL.std.450) 12(Degrees) 169 + 171: 6(float) Load 11(inF0) + 172: 6(float) ExtInst 1(GLSL.std.450) 27(Exp) 171 + 173: 6(float) Load 11(inF0) + 174: 6(float) ExtInst 1(GLSL.std.450) 29(Exp2) 173 + 175: 146(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 167 + 176: 146(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 167 + 177: 6(float) Load 11(inF0) + 178: 6(float) ExtInst 1(GLSL.std.450) 8(Floor) 177 179: 6(float) Load 11(inF0) - 180: 6(float) ExtInst 1(GLSL.std.450) 10(Fract) 179 - 181: 6(float) Load 11(inF0) - 182: 132(bool) IsInf 181 - 183: 6(float) Load 11(inF0) - 184: 132(bool) IsNan 183 - 185: 6(float) Load 11(inF0) - 186: 6(float) Load 12(inF1) - 187: 6(float) ExtInst 1(GLSL.std.450) 53(Ldexp) 185 186 + 180: 6(float) Load 12(inF1) + 181: 6(float) FMod 179 180 + 182: 6(float) Load 11(inF0) + 183: 6(float) ExtInst 1(GLSL.std.450) 10(Fract) 182 + 184: 6(float) Load 11(inF0) + 185: 132(bool) IsInf 184 + 186: 6(float) Load 11(inF0) + 187: 132(bool) IsNan 186 188: 6(float) Load 11(inF0) 189: 6(float) Load 12(inF1) - 190: 6(float) Load 13(inF2) - 191: 6(float) ExtInst 1(GLSL.std.450) 46(FMix) 188 189 190 - 192: 6(float) Load 11(inF0) - 193: 6(float) ExtInst 1(GLSL.std.450) 28(Log) 192 - 194: 6(float) Load 11(inF0) - 195: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 194 - 197: 6(float) FMul 195 196 - 198: 6(float) Load 11(inF0) - 199: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 198 - 200: 6(float) Load 11(inF0) - 201: 6(float) Load 12(inF1) - 202: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 200 201 + 190: 6(float) ExtInst 1(GLSL.std.450) 53(Ldexp) 188 189 + 191: 6(float) Load 11(inF0) + 192: 6(float) Load 12(inF1) + 193: 6(float) Load 13(inF2) + 194: 6(float) ExtInst 1(GLSL.std.450) 46(FMix) 191 192 193 + 195: 6(float) Load 11(inF0) + 196: 6(float) ExtInst 1(GLSL.std.450) 28(Log) 195 + 197: 6(float) Load 11(inF0) + 198: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 197 + 200: 6(float) FMul 198 199 + 201: 6(float) Load 11(inF0) + 202: 6(float) ExtInst 1(GLSL.std.450) 30(Log2) 201 203: 6(float) Load 11(inF0) 204: 6(float) Load 12(inF1) - 205: 6(float) ExtInst 1(GLSL.std.450) 37(FMin) 203 204 + 205: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 203 204 206: 6(float) Load 11(inF0) 207: 6(float) Load 12(inF1) - 208: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 206 207 + 208: 6(float) ExtInst 1(GLSL.std.450) 37(FMin) 206 207 209: 6(float) Load 11(inF0) - 210: 6(float) ExtInst 1(GLSL.std.450) 11(Radians) 209 - 212: 143(int) BitReverse 211 - 213: 6(float) Load 11(inF0) - 214: 6(float) ExtInst 1(GLSL.std.450) 2(RoundEven) 213 - 215: 6(float) Load 11(inF0) - 216: 6(float) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 215 - 217: 6(float) Load 11(inF0) - 220: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 217 218 219 - 221: 6(float) Load 11(inF0) - 222: 6(float) ExtInst 1(GLSL.std.450) 6(FSign) 221 + 210: 6(float) Load 12(inF1) + 211: 6(float) ExtInst 1(GLSL.std.450) 26(Pow) 209 210 + 212: 6(float) Load 11(inF0) + 213: 6(float) ExtInst 1(GLSL.std.450) 11(Radians) 212 + 215: 146(int) BitReverse 214 + 216: 6(float) Load 11(inF0) + 217: 6(float) ExtInst 1(GLSL.std.450) 2(RoundEven) 216 + 218: 6(float) Load 11(inF0) + 219: 6(float) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 218 + 220: 6(float) Load 11(inF0) + 222: 6(float) ExtInst 1(GLSL.std.450) 43(FClamp) 220 133 221 223: 6(float) Load 11(inF0) - 224: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 223 + 224: 6(float) ExtInst 1(GLSL.std.450) 6(FSign) 223 225: 6(float) Load 11(inF0) 226: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 225 - Store 12(inF1) 226 227: 6(float) Load 11(inF0) - 228: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 227 - Store 13(inF2) 228 + 228: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 227 + Store 12(inF1) 228 229: 6(float) Load 11(inF0) - 230: 6(float) ExtInst 1(GLSL.std.450) 19(Sinh) 229 + 230: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 229 + Store 13(inF2) 230 231: 6(float) Load 11(inF0) - 232: 6(float) Load 12(inF1) - 233: 6(float) Load 13(inF2) - 234: 6(float) ExtInst 1(GLSL.std.450) 49(SmoothStep) 231 232 233 - 235: 6(float) Load 11(inF0) - 236: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 235 + 232: 6(float) ExtInst 1(GLSL.std.450) 19(Sinh) 231 + 233: 6(float) Load 11(inF0) + 234: 6(float) Load 12(inF1) + 235: 6(float) Load 13(inF2) + 236: 6(float) ExtInst 1(GLSL.std.450) 49(SmoothStep) 233 234 235 237: 6(float) Load 11(inF0) - 238: 6(float) Load 12(inF1) - 239: 6(float) ExtInst 1(GLSL.std.450) 48(Step) 237 238 - 240: 6(float) Load 11(inF0) - 241: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 240 + 238: 6(float) ExtInst 1(GLSL.std.450) 31(Sqrt) 237 + 239: 6(float) Load 11(inF0) + 240: 6(float) Load 12(inF1) + 241: 6(float) ExtInst 1(GLSL.std.450) 48(Step) 239 240 242: 6(float) Load 11(inF0) - 243: 6(float) ExtInst 1(GLSL.std.450) 21(Tanh) 242 + 243: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 242 244: 6(float) Load 11(inF0) - 245: 6(float) ExtInst 1(GLSL.std.450) 3(Trunc) 244 - ReturnValue 218 + 245: 6(float) ExtInst 1(GLSL.std.450) 21(Tanh) 244 + 246: 6(float) Load 11(inF0) + 247: 6(float) ExtInst 1(GLSL.std.450) 3(Trunc) 246 + ReturnValue 133 FunctionEnd 22(VertexShaderFunction1(vf1;vf1;vf1;): 6(float) Function None 18 19(inF0): 7(ptr) FunctionParameter 20(inF1): 7(ptr) FunctionParameter 21(inF2): 7(ptr) FunctionParameter 23: Label - ReturnValue 218 + ReturnValue 133 FunctionEnd 34(VertexShaderFunction2(vf2;vf2;vf2;vu2;vu2;): 24(fvec2) Function None 28 29(inF0): 25(ptr) FunctionParameter @@ -3094,139 +3130,141 @@ Shader version: 500 32(inU0): 27(ptr) FunctionParameter 33(inU1): 27(ptr) FunctionParameter 35: Label - 250: 24(fvec2) Load 29(inF0) - 251: 132(bool) All 250 252: 24(fvec2) Load 29(inF0) - 253: 24(fvec2) ExtInst 1(GLSL.std.450) 4(FAbs) 252 - 254: 24(fvec2) Load 29(inF0) - 255: 24(fvec2) ExtInst 1(GLSL.std.450) 17(Acos) 254 - 256: 24(fvec2) Load 29(inF0) - 257: 132(bool) Any 256 - 258: 24(fvec2) Load 29(inF0) - 259: 24(fvec2) ExtInst 1(GLSL.std.450) 16(Asin) 258 - 260: 24(fvec2) Load 29(inF0) - 262: 261(ivec2) Bitcast 260 - 263: 24(fvec2) Load 29(inF0) - 264: 26(ivec2) Bitcast 263 - 265: 26(ivec2) Load 32(inU0) - 266: 24(fvec2) Bitcast 265 - 267: 24(fvec2) Load 29(inF0) - 268: 24(fvec2) ExtInst 1(GLSL.std.450) 18(Atan) 267 + 255: 253(bvec2) FOrdNotEqual 252 254 + 256: 132(bool) All 255 + 257: 24(fvec2) Load 29(inF0) + 258: 24(fvec2) ExtInst 1(GLSL.std.450) 4(FAbs) 257 + 259: 24(fvec2) Load 29(inF0) + 260: 24(fvec2) ExtInst 1(GLSL.std.450) 17(Acos) 259 + 261: 24(fvec2) Load 29(inF0) + 262: 253(bvec2) FOrdNotEqual 261 254 + 263: 132(bool) Any 262 + 264: 24(fvec2) Load 29(inF0) + 265: 24(fvec2) ExtInst 1(GLSL.std.450) 16(Asin) 264 + 266: 24(fvec2) Load 29(inF0) + 268: 267(ivec2) Bitcast 266 269: 24(fvec2) Load 29(inF0) - 270: 24(fvec2) Load 30(inF1) - 271: 24(fvec2) ExtInst 1(GLSL.std.450) 25(Atan2) 269 270 - 272: 24(fvec2) Load 29(inF0) - 273: 24(fvec2) ExtInst 1(GLSL.std.450) 9(Ceil) 272 - 274: 24(fvec2) Load 29(inF0) - 275: 24(fvec2) Load 30(inF1) - 276: 24(fvec2) Load 31(inF2) - 277: 24(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 274 275 276 + 270: 26(ivec2) Bitcast 269 + 271: 26(ivec2) Load 32(inU0) + 272: 24(fvec2) Bitcast 271 + 273: 24(fvec2) Load 29(inF0) + 274: 24(fvec2) ExtInst 1(GLSL.std.450) 18(Atan) 273 + 275: 24(fvec2) Load 29(inF0) + 276: 24(fvec2) Load 30(inF1) + 277: 24(fvec2) ExtInst 1(GLSL.std.450) 25(Atan2) 275 276 278: 24(fvec2) Load 29(inF0) - 279: 24(fvec2) ExtInst 1(GLSL.std.450) 14(Cos) 278 + 279: 24(fvec2) ExtInst 1(GLSL.std.450) 9(Ceil) 278 280: 24(fvec2) Load 29(inF0) - 281: 24(fvec2) ExtInst 1(GLSL.std.450) 20(Cosh) 280 - 284: 261(ivec2) BitCount 283 - 285: 24(fvec2) Load 29(inF0) - 286: 24(fvec2) ExtInst 1(GLSL.std.450) 12(Degrees) 285 - 287: 24(fvec2) Load 29(inF0) - 288: 24(fvec2) Load 30(inF1) - 289: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 287 288 - 290: 24(fvec2) Load 29(inF0) - 291: 24(fvec2) Load 30(inF1) - 292: 6(float) Dot 290 291 + 281: 24(fvec2) Load 30(inF1) + 282: 24(fvec2) Load 31(inF2) + 283: 24(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 280 281 282 + 284: 24(fvec2) Load 29(inF0) + 285: 24(fvec2) ExtInst 1(GLSL.std.450) 14(Cos) 284 + 286: 24(fvec2) Load 29(inF0) + 287: 24(fvec2) ExtInst 1(GLSL.std.450) 20(Cosh) 286 + 290: 267(ivec2) BitCount 289 + 291: 24(fvec2) Load 29(inF0) + 292: 24(fvec2) ExtInst 1(GLSL.std.450) 12(Degrees) 291 293: 24(fvec2) Load 29(inF0) - 294: 24(fvec2) ExtInst 1(GLSL.std.450) 27(Exp) 293 - 295: 24(fvec2) Load 29(inF0) - 296: 24(fvec2) ExtInst 1(GLSL.std.450) 29(Exp2) 295 - 297: 24(fvec2) Load 29(inF0) - 298: 24(fvec2) Load 30(inF1) - 299: 24(fvec2) Load 31(inF2) - 300: 24(fvec2) ExtInst 1(GLSL.std.450) 70(FaceForward) 297 298 299 - 301: 143(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 164 - 302: 143(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 164 + 294: 24(fvec2) Load 30(inF1) + 295: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 293 294 + 296: 24(fvec2) Load 29(inF0) + 297: 24(fvec2) Load 30(inF1) + 298: 6(float) Dot 296 297 + 299: 24(fvec2) Load 29(inF0) + 300: 24(fvec2) ExtInst 1(GLSL.std.450) 27(Exp) 299 + 301: 24(fvec2) Load 29(inF0) + 302: 24(fvec2) ExtInst 1(GLSL.std.450) 29(Exp2) 301 303: 24(fvec2) Load 29(inF0) - 304: 24(fvec2) ExtInst 1(GLSL.std.450) 8(Floor) 303 - 305: 24(fvec2) Load 29(inF0) - 306: 24(fvec2) Load 30(inF1) - 307: 24(fvec2) FMod 305 306 - 308: 24(fvec2) Load 29(inF0) - 309: 24(fvec2) ExtInst 1(GLSL.std.450) 10(Fract) 308 - 310: 24(fvec2) Load 29(inF0) - 312: 311(bvec2) IsInf 310 - 313: 24(fvec2) Load 29(inF0) - 314: 311(bvec2) IsNan 313 - 315: 24(fvec2) Load 29(inF0) - 316: 24(fvec2) Load 30(inF1) - 317: 24(fvec2) ExtInst 1(GLSL.std.450) 53(Ldexp) 315 316 + 304: 24(fvec2) Load 30(inF1) + 305: 24(fvec2) Load 31(inF2) + 306: 24(fvec2) ExtInst 1(GLSL.std.450) 70(FaceForward) 303 304 305 + 307: 146(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 167 + 308: 146(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 167 + 309: 24(fvec2) Load 29(inF0) + 310: 24(fvec2) ExtInst 1(GLSL.std.450) 8(Floor) 309 + 311: 24(fvec2) Load 29(inF0) + 312: 24(fvec2) Load 30(inF1) + 313: 24(fvec2) FMod 311 312 + 314: 24(fvec2) Load 29(inF0) + 315: 24(fvec2) ExtInst 1(GLSL.std.450) 10(Fract) 314 + 316: 24(fvec2) Load 29(inF0) + 317: 253(bvec2) IsInf 316 318: 24(fvec2) Load 29(inF0) - 319: 24(fvec2) Load 30(inF1) - 320: 24(fvec2) Load 31(inF2) - 321: 24(fvec2) ExtInst 1(GLSL.std.450) 46(FMix) 318 319 320 - 322: 24(fvec2) Load 29(inF0) - 323: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 322 - 324: 24(fvec2) Load 29(inF0) - 325: 24(fvec2) ExtInst 1(GLSL.std.450) 28(Log) 324 - 326: 24(fvec2) Load 29(inF0) - 327: 24(fvec2) ExtInst 1(GLSL.std.450) 30(Log2) 326 - 328: 24(fvec2) VectorTimesScalar 327 196 + 319: 253(bvec2) IsNan 318 + 320: 24(fvec2) Load 29(inF0) + 321: 24(fvec2) Load 30(inF1) + 322: 24(fvec2) ExtInst 1(GLSL.std.450) 53(Ldexp) 320 321 + 323: 24(fvec2) Load 29(inF0) + 324: 24(fvec2) Load 30(inF1) + 325: 24(fvec2) Load 31(inF2) + 326: 24(fvec2) ExtInst 1(GLSL.std.450) 46(FMix) 323 324 325 + 327: 24(fvec2) Load 29(inF0) + 328: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 327 329: 24(fvec2) Load 29(inF0) - 330: 24(fvec2) ExtInst 1(GLSL.std.450) 30(Log2) 329 + 330: 24(fvec2) ExtInst 1(GLSL.std.450) 28(Log) 329 331: 24(fvec2) Load 29(inF0) - 332: 24(fvec2) Load 30(inF1) - 333: 24(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 331 332 + 332: 24(fvec2) ExtInst 1(GLSL.std.450) 30(Log2) 331 + 333: 24(fvec2) VectorTimesScalar 332 199 334: 24(fvec2) Load 29(inF0) - 335: 24(fvec2) Load 30(inF1) - 336: 24(fvec2) ExtInst 1(GLSL.std.450) 37(FMin) 334 335 - 337: 24(fvec2) Load 29(inF0) - 338: 24(fvec2) ExtInst 1(GLSL.std.450) 69(Normalize) 337 + 335: 24(fvec2) ExtInst 1(GLSL.std.450) 30(Log2) 334 + 336: 24(fvec2) Load 29(inF0) + 337: 24(fvec2) Load 30(inF1) + 338: 24(fvec2) ExtInst 1(GLSL.std.450) 40(FMax) 336 337 339: 24(fvec2) Load 29(inF0) 340: 24(fvec2) Load 30(inF1) - 341: 24(fvec2) ExtInst 1(GLSL.std.450) 26(Pow) 339 340 + 341: 24(fvec2) ExtInst 1(GLSL.std.450) 37(FMin) 339 340 342: 24(fvec2) Load 29(inF0) - 343: 24(fvec2) ExtInst 1(GLSL.std.450) 11(Radians) 342 + 343: 24(fvec2) ExtInst 1(GLSL.std.450) 69(Normalize) 342 344: 24(fvec2) Load 29(inF0) 345: 24(fvec2) Load 30(inF1) - 346: 24(fvec2) ExtInst 1(GLSL.std.450) 71(Reflect) 344 345 + 346: 24(fvec2) ExtInst 1(GLSL.std.450) 26(Pow) 344 345 347: 24(fvec2) Load 29(inF0) - 348: 24(fvec2) Load 30(inF1) - 350: 24(fvec2) ExtInst 1(GLSL.std.450) 72(Refract) 347 348 349 - 353: 261(ivec2) BitReverse 352 - 354: 24(fvec2) Load 29(inF0) - 355: 24(fvec2) ExtInst 1(GLSL.std.450) 2(RoundEven) 354 - 356: 24(fvec2) Load 29(inF0) - 357: 24(fvec2) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 356 - 358: 24(fvec2) Load 29(inF0) - 359: 24(fvec2) CompositeConstruct 218 218 - 360: 24(fvec2) CompositeConstruct 219 219 - 361: 24(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 358 359 360 - 362: 24(fvec2) Load 29(inF0) - 363: 24(fvec2) ExtInst 1(GLSL.std.450) 6(FSign) 362 - 364: 24(fvec2) Load 29(inF0) - 365: 24(fvec2) ExtInst 1(GLSL.std.450) 13(Sin) 364 - 366: 24(fvec2) Load 29(inF0) - 367: 24(fvec2) ExtInst 1(GLSL.std.450) 13(Sin) 366 - Store 30(inF1) 367 - 368: 24(fvec2) Load 29(inF0) - 369: 24(fvec2) ExtInst 1(GLSL.std.450) 14(Cos) 368 - Store 31(inF2) 369 - 370: 24(fvec2) Load 29(inF0) - 371: 24(fvec2) ExtInst 1(GLSL.std.450) 19(Sinh) 370 - 372: 24(fvec2) Load 29(inF0) - 373: 24(fvec2) Load 30(inF1) - 374: 24(fvec2) Load 31(inF2) - 375: 24(fvec2) ExtInst 1(GLSL.std.450) 49(SmoothStep) 372 373 374 - 376: 24(fvec2) Load 29(inF0) - 377: 24(fvec2) ExtInst 1(GLSL.std.450) 31(Sqrt) 376 - 378: 24(fvec2) Load 29(inF0) - 379: 24(fvec2) Load 30(inF1) - 380: 24(fvec2) ExtInst 1(GLSL.std.450) 48(Step) 378 379 + 348: 24(fvec2) ExtInst 1(GLSL.std.450) 11(Radians) 347 + 349: 24(fvec2) Load 29(inF0) + 350: 24(fvec2) Load 30(inF1) + 351: 24(fvec2) ExtInst 1(GLSL.std.450) 71(Reflect) 349 350 + 352: 24(fvec2) Load 29(inF0) + 353: 24(fvec2) Load 30(inF1) + 355: 24(fvec2) ExtInst 1(GLSL.std.450) 72(Refract) 352 353 354 + 358: 267(ivec2) BitReverse 357 + 359: 24(fvec2) Load 29(inF0) + 360: 24(fvec2) ExtInst 1(GLSL.std.450) 2(RoundEven) 359 + 361: 24(fvec2) Load 29(inF0) + 362: 24(fvec2) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 361 + 363: 24(fvec2) Load 29(inF0) + 364: 24(fvec2) CompositeConstruct 133 133 + 365: 24(fvec2) CompositeConstruct 221 221 + 366: 24(fvec2) ExtInst 1(GLSL.std.450) 43(FClamp) 363 364 365 + 367: 24(fvec2) Load 29(inF0) + 368: 24(fvec2) ExtInst 1(GLSL.std.450) 6(FSign) 367 + 369: 24(fvec2) Load 29(inF0) + 370: 24(fvec2) ExtInst 1(GLSL.std.450) 13(Sin) 369 + 371: 24(fvec2) Load 29(inF0) + 372: 24(fvec2) ExtInst 1(GLSL.std.450) 13(Sin) 371 + Store 30(inF1) 372 + 373: 24(fvec2) Load 29(inF0) + 374: 24(fvec2) ExtInst 1(GLSL.std.450) 14(Cos) 373 + Store 31(inF2) 374 + 375: 24(fvec2) Load 29(inF0) + 376: 24(fvec2) ExtInst 1(GLSL.std.450) 19(Sinh) 375 + 377: 24(fvec2) Load 29(inF0) + 378: 24(fvec2) Load 30(inF1) + 379: 24(fvec2) Load 31(inF2) + 380: 24(fvec2) ExtInst 1(GLSL.std.450) 49(SmoothStep) 377 378 379 381: 24(fvec2) Load 29(inF0) - 382: 24(fvec2) ExtInst 1(GLSL.std.450) 15(Tan) 381 + 382: 24(fvec2) ExtInst 1(GLSL.std.450) 31(Sqrt) 381 383: 24(fvec2) Load 29(inF0) - 384: 24(fvec2) ExtInst 1(GLSL.std.450) 21(Tanh) 383 - 385: 24(fvec2) Load 29(inF0) - 386: 24(fvec2) ExtInst 1(GLSL.std.450) 3(Trunc) 385 - ReturnValue 387 + 384: 24(fvec2) Load 30(inF1) + 385: 24(fvec2) ExtInst 1(GLSL.std.450) 48(Step) 383 384 + 386: 24(fvec2) Load 29(inF0) + 387: 24(fvec2) ExtInst 1(GLSL.std.450) 15(Tan) 386 + 388: 24(fvec2) Load 29(inF0) + 389: 24(fvec2) ExtInst 1(GLSL.std.450) 21(Tanh) 388 + 390: 24(fvec2) Load 29(inF0) + 391: 24(fvec2) ExtInst 1(GLSL.std.450) 3(Trunc) 390 + ReturnValue 392 FunctionEnd 46(VertexShaderFunction3(vf3;vf3;vf3;vu3;vu3;): 36(fvec3) Function None 40 41(inF0): 37(ptr) FunctionParameter @@ -3235,142 +3273,144 @@ Shader version: 500 44(inU0): 39(ptr) FunctionParameter 45(inU1): 39(ptr) FunctionParameter 47: Label - 390: 36(fvec3) Load 41(inF0) - 391: 132(bool) All 390 - 392: 36(fvec3) Load 41(inF0) - 393: 36(fvec3) ExtInst 1(GLSL.std.450) 4(FAbs) 392 - 394: 36(fvec3) Load 41(inF0) - 395: 36(fvec3) ExtInst 1(GLSL.std.450) 17(Acos) 394 - 396: 36(fvec3) Load 41(inF0) - 397: 132(bool) Any 396 - 398: 36(fvec3) Load 41(inF0) - 399: 36(fvec3) ExtInst 1(GLSL.std.450) 16(Asin) 398 + 395: 36(fvec3) Load 41(inF0) + 398: 396(bvec3) FOrdNotEqual 395 397 + 399: 132(bool) All 398 400: 36(fvec3) Load 41(inF0) - 402: 401(ivec3) Bitcast 400 - 403: 36(fvec3) Load 41(inF0) - 404: 38(ivec3) Bitcast 403 - 405: 38(ivec3) Load 44(inU0) - 406: 36(fvec3) Bitcast 405 + 401: 36(fvec3) ExtInst 1(GLSL.std.450) 4(FAbs) 400 + 402: 36(fvec3) Load 41(inF0) + 403: 36(fvec3) ExtInst 1(GLSL.std.450) 17(Acos) 402 + 404: 36(fvec3) Load 41(inF0) + 405: 396(bvec3) FOrdNotEqual 404 397 + 406: 132(bool) Any 405 407: 36(fvec3) Load 41(inF0) - 408: 36(fvec3) ExtInst 1(GLSL.std.450) 18(Atan) 407 + 408: 36(fvec3) ExtInst 1(GLSL.std.450) 16(Asin) 407 409: 36(fvec3) Load 41(inF0) - 410: 36(fvec3) Load 42(inF1) - 411: 36(fvec3) ExtInst 1(GLSL.std.450) 25(Atan2) 409 410 + 411: 410(ivec3) Bitcast 409 412: 36(fvec3) Load 41(inF0) - 413: 36(fvec3) ExtInst 1(GLSL.std.450) 9(Ceil) 412 - 414: 36(fvec3) Load 41(inF0) - 415: 36(fvec3) Load 42(inF1) - 416: 36(fvec3) Load 43(inF2) - 417: 36(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 414 415 416 + 413: 38(ivec3) Bitcast 412 + 414: 38(ivec3) Load 44(inU0) + 415: 36(fvec3) Bitcast 414 + 416: 36(fvec3) Load 41(inF0) + 417: 36(fvec3) ExtInst 1(GLSL.std.450) 18(Atan) 416 418: 36(fvec3) Load 41(inF0) - 419: 36(fvec3) ExtInst 1(GLSL.std.450) 14(Cos) 418 - 420: 36(fvec3) Load 41(inF0) - 421: 36(fvec3) ExtInst 1(GLSL.std.450) 20(Cosh) 420 - 424: 401(ivec3) BitCount 423 - 425: 36(fvec3) Load 41(inF0) - 426: 36(fvec3) Load 42(inF1) - 427: 36(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 425 426 - 428: 36(fvec3) Load 41(inF0) - 429: 36(fvec3) ExtInst 1(GLSL.std.450) 12(Degrees) 428 - 430: 36(fvec3) Load 41(inF0) - 431: 36(fvec3) Load 42(inF1) - 432: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 430 431 - 433: 36(fvec3) Load 41(inF0) - 434: 36(fvec3) Load 42(inF1) - 435: 6(float) Dot 433 434 - 436: 36(fvec3) Load 41(inF0) - 437: 36(fvec3) ExtInst 1(GLSL.std.450) 27(Exp) 436 - 438: 36(fvec3) Load 41(inF0) - 439: 36(fvec3) ExtInst 1(GLSL.std.450) 29(Exp2) 438 - 440: 36(fvec3) Load 41(inF0) - 441: 36(fvec3) Load 42(inF1) - 442: 36(fvec3) Load 43(inF2) - 443: 36(fvec3) ExtInst 1(GLSL.std.450) 70(FaceForward) 440 441 442 - 444: 143(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 164 - 445: 143(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 164 - 446: 36(fvec3) Load 41(inF0) - 447: 36(fvec3) ExtInst 1(GLSL.std.450) 8(Floor) 446 - 448: 36(fvec3) Load 41(inF0) - 449: 36(fvec3) Load 42(inF1) - 450: 36(fvec3) FMod 448 449 - 451: 36(fvec3) Load 41(inF0) - 452: 36(fvec3) ExtInst 1(GLSL.std.450) 10(Fract) 451 - 453: 36(fvec3) Load 41(inF0) - 455: 454(bvec3) IsInf 453 - 456: 36(fvec3) Load 41(inF0) - 457: 454(bvec3) IsNan 456 - 458: 36(fvec3) Load 41(inF0) - 459: 36(fvec3) Load 42(inF1) - 460: 36(fvec3) ExtInst 1(GLSL.std.450) 53(Ldexp) 458 459 - 461: 36(fvec3) Load 41(inF0) - 462: 36(fvec3) Load 42(inF1) - 463: 36(fvec3) Load 43(inF2) - 464: 36(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 461 462 463 - 465: 36(fvec3) Load 41(inF0) - 466: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 465 - 467: 36(fvec3) Load 41(inF0) - 468: 36(fvec3) ExtInst 1(GLSL.std.450) 28(Log) 467 + 419: 36(fvec3) Load 42(inF1) + 420: 36(fvec3) ExtInst 1(GLSL.std.450) 25(Atan2) 418 419 + 421: 36(fvec3) Load 41(inF0) + 422: 36(fvec3) ExtInst 1(GLSL.std.450) 9(Ceil) 421 + 423: 36(fvec3) Load 41(inF0) + 424: 36(fvec3) Load 42(inF1) + 425: 36(fvec3) Load 43(inF2) + 426: 36(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 423 424 425 + 427: 36(fvec3) Load 41(inF0) + 428: 36(fvec3) ExtInst 1(GLSL.std.450) 14(Cos) 427 + 429: 36(fvec3) Load 41(inF0) + 430: 36(fvec3) ExtInst 1(GLSL.std.450) 20(Cosh) 429 + 433: 410(ivec3) BitCount 432 + 434: 36(fvec3) Load 41(inF0) + 435: 36(fvec3) Load 42(inF1) + 436: 36(fvec3) ExtInst 1(GLSL.std.450) 68(Cross) 434 435 + 437: 36(fvec3) Load 41(inF0) + 438: 36(fvec3) ExtInst 1(GLSL.std.450) 12(Degrees) 437 + 439: 36(fvec3) Load 41(inF0) + 440: 36(fvec3) Load 42(inF1) + 441: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 439 440 + 442: 36(fvec3) Load 41(inF0) + 443: 36(fvec3) Load 42(inF1) + 444: 6(float) Dot 442 443 + 445: 36(fvec3) Load 41(inF0) + 446: 36(fvec3) ExtInst 1(GLSL.std.450) 27(Exp) 445 + 447: 36(fvec3) Load 41(inF0) + 448: 36(fvec3) ExtInst 1(GLSL.std.450) 29(Exp2) 447 + 449: 36(fvec3) Load 41(inF0) + 450: 36(fvec3) Load 42(inF1) + 451: 36(fvec3) Load 43(inF2) + 452: 36(fvec3) ExtInst 1(GLSL.std.450) 70(FaceForward) 449 450 451 + 453: 146(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 167 + 454: 146(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 167 + 455: 36(fvec3) Load 41(inF0) + 456: 36(fvec3) ExtInst 1(GLSL.std.450) 8(Floor) 455 + 457: 36(fvec3) Load 41(inF0) + 458: 36(fvec3) Load 42(inF1) + 459: 36(fvec3) FMod 457 458 + 460: 36(fvec3) Load 41(inF0) + 461: 36(fvec3) ExtInst 1(GLSL.std.450) 10(Fract) 460 + 462: 36(fvec3) Load 41(inF0) + 463: 396(bvec3) IsInf 462 + 464: 36(fvec3) Load 41(inF0) + 465: 396(bvec3) IsNan 464 + 466: 36(fvec3) Load 41(inF0) + 467: 36(fvec3) Load 42(inF1) + 468: 36(fvec3) ExtInst 1(GLSL.std.450) 53(Ldexp) 466 467 469: 36(fvec3) Load 41(inF0) - 470: 36(fvec3) ExtInst 1(GLSL.std.450) 30(Log2) 469 - 471: 36(fvec3) VectorTimesScalar 470 196 - 472: 36(fvec3) Load 41(inF0) - 473: 36(fvec3) ExtInst 1(GLSL.std.450) 30(Log2) 472 - 474: 36(fvec3) Load 41(inF0) - 475: 36(fvec3) Load 42(inF1) - 476: 36(fvec3) ExtInst 1(GLSL.std.450) 40(FMax) 474 475 + 470: 36(fvec3) Load 42(inF1) + 471: 36(fvec3) Load 43(inF2) + 472: 36(fvec3) ExtInst 1(GLSL.std.450) 46(FMix) 469 470 471 + 473: 36(fvec3) Load 41(inF0) + 474: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 473 + 475: 36(fvec3) Load 41(inF0) + 476: 36(fvec3) ExtInst 1(GLSL.std.450) 28(Log) 475 477: 36(fvec3) Load 41(inF0) - 478: 36(fvec3) Load 42(inF1) - 479: 36(fvec3) ExtInst 1(GLSL.std.450) 37(FMin) 477 478 + 478: 36(fvec3) ExtInst 1(GLSL.std.450) 30(Log2) 477 + 479: 36(fvec3) VectorTimesScalar 478 199 480: 36(fvec3) Load 41(inF0) - 481: 36(fvec3) ExtInst 1(GLSL.std.450) 69(Normalize) 480 + 481: 36(fvec3) ExtInst 1(GLSL.std.450) 30(Log2) 480 482: 36(fvec3) Load 41(inF0) 483: 36(fvec3) Load 42(inF1) - 484: 36(fvec3) ExtInst 1(GLSL.std.450) 26(Pow) 482 483 + 484: 36(fvec3) ExtInst 1(GLSL.std.450) 40(FMax) 482 483 485: 36(fvec3) Load 41(inF0) - 486: 36(fvec3) ExtInst 1(GLSL.std.450) 11(Radians) 485 - 487: 36(fvec3) Load 41(inF0) - 488: 36(fvec3) Load 42(inF1) - 489: 36(fvec3) ExtInst 1(GLSL.std.450) 71(Reflect) 487 488 + 486: 36(fvec3) Load 42(inF1) + 487: 36(fvec3) ExtInst 1(GLSL.std.450) 37(FMin) 485 486 + 488: 36(fvec3) Load 41(inF0) + 489: 36(fvec3) ExtInst 1(GLSL.std.450) 69(Normalize) 488 490: 36(fvec3) Load 41(inF0) 491: 36(fvec3) Load 42(inF1) - 492: 36(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 490 491 349 - 494: 401(ivec3) BitReverse 493 + 492: 36(fvec3) ExtInst 1(GLSL.std.450) 26(Pow) 490 491 + 493: 36(fvec3) Load 41(inF0) + 494: 36(fvec3) ExtInst 1(GLSL.std.450) 11(Radians) 493 495: 36(fvec3) Load 41(inF0) - 496: 36(fvec3) ExtInst 1(GLSL.std.450) 2(RoundEven) 495 - 497: 36(fvec3) Load 41(inF0) - 498: 36(fvec3) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 497 - 499: 36(fvec3) Load 41(inF0) - 500: 36(fvec3) CompositeConstruct 218 218 218 - 501: 36(fvec3) CompositeConstruct 219 219 219 - 502: 36(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 499 500 501 + 496: 36(fvec3) Load 42(inF1) + 497: 36(fvec3) ExtInst 1(GLSL.std.450) 71(Reflect) 495 496 + 498: 36(fvec3) Load 41(inF0) + 499: 36(fvec3) Load 42(inF1) + 500: 36(fvec3) ExtInst 1(GLSL.std.450) 72(Refract) 498 499 354 + 502: 410(ivec3) BitReverse 501 503: 36(fvec3) Load 41(inF0) - 504: 36(fvec3) ExtInst 1(GLSL.std.450) 6(FSign) 503 + 504: 36(fvec3) ExtInst 1(GLSL.std.450) 2(RoundEven) 503 505: 36(fvec3) Load 41(inF0) - 506: 36(fvec3) ExtInst 1(GLSL.std.450) 13(Sin) 505 + 506: 36(fvec3) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 505 507: 36(fvec3) Load 41(inF0) - 508: 36(fvec3) ExtInst 1(GLSL.std.450) 13(Sin) 507 - Store 42(inF1) 508 - 509: 36(fvec3) Load 41(inF0) - 510: 36(fvec3) ExtInst 1(GLSL.std.450) 14(Cos) 509 - Store 43(inF2) 510 + 508: 36(fvec3) CompositeConstruct 133 133 133 + 509: 36(fvec3) CompositeConstruct 221 221 221 + 510: 36(fvec3) ExtInst 1(GLSL.std.450) 43(FClamp) 507 508 509 511: 36(fvec3) Load 41(inF0) - 512: 36(fvec3) ExtInst 1(GLSL.std.450) 19(Sinh) 511 + 512: 36(fvec3) ExtInst 1(GLSL.std.450) 6(FSign) 511 513: 36(fvec3) Load 41(inF0) - 514: 36(fvec3) Load 42(inF1) - 515: 36(fvec3) Load 43(inF2) - 516: 36(fvec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 513 514 515 + 514: 36(fvec3) ExtInst 1(GLSL.std.450) 13(Sin) 513 + 515: 36(fvec3) Load 41(inF0) + 516: 36(fvec3) ExtInst 1(GLSL.std.450) 13(Sin) 515 + Store 42(inF1) 516 517: 36(fvec3) Load 41(inF0) - 518: 36(fvec3) ExtInst 1(GLSL.std.450) 31(Sqrt) 517 + 518: 36(fvec3) ExtInst 1(GLSL.std.450) 14(Cos) 517 + Store 43(inF2) 518 519: 36(fvec3) Load 41(inF0) - 520: 36(fvec3) Load 42(inF1) - 521: 36(fvec3) ExtInst 1(GLSL.std.450) 48(Step) 519 520 - 522: 36(fvec3) Load 41(inF0) - 523: 36(fvec3) ExtInst 1(GLSL.std.450) 15(Tan) 522 - 524: 36(fvec3) Load 41(inF0) - 525: 36(fvec3) ExtInst 1(GLSL.std.450) 21(Tanh) 524 - 526: 36(fvec3) Load 41(inF0) - 527: 36(fvec3) ExtInst 1(GLSL.std.450) 3(Trunc) 526 - ReturnValue 529 + 520: 36(fvec3) ExtInst 1(GLSL.std.450) 19(Sinh) 519 + 521: 36(fvec3) Load 41(inF0) + 522: 36(fvec3) Load 42(inF1) + 523: 36(fvec3) Load 43(inF2) + 524: 36(fvec3) ExtInst 1(GLSL.std.450) 49(SmoothStep) 521 522 523 + 525: 36(fvec3) Load 41(inF0) + 526: 36(fvec3) ExtInst 1(GLSL.std.450) 31(Sqrt) 525 + 527: 36(fvec3) Load 41(inF0) + 528: 36(fvec3) Load 42(inF1) + 529: 36(fvec3) ExtInst 1(GLSL.std.450) 48(Step) 527 528 + 530: 36(fvec3) Load 41(inF0) + 531: 36(fvec3) ExtInst 1(GLSL.std.450) 15(Tan) 530 + 532: 36(fvec3) Load 41(inF0) + 533: 36(fvec3) ExtInst 1(GLSL.std.450) 21(Tanh) 532 + 534: 36(fvec3) Load 41(inF0) + 535: 36(fvec3) ExtInst 1(GLSL.std.450) 3(Trunc) 534 + ReturnValue 537 FunctionEnd 58(VertexShaderFunction4(vf4;vf4;vf4;vu4;vu4;): 48(fvec4) Function None 52 53(inF0): 49(ptr) FunctionParameter @@ -3379,509 +3419,517 @@ Shader version: 500 56(inU0): 51(ptr) FunctionParameter 57(inU1): 51(ptr) FunctionParameter 59: Label - 532: 48(fvec4) Load 53(inF0) - 533: 132(bool) All 532 - 534: 48(fvec4) Load 53(inF0) - 535: 48(fvec4) ExtInst 1(GLSL.std.450) 4(FAbs) 534 - 536: 48(fvec4) Load 53(inF0) - 537: 48(fvec4) ExtInst 1(GLSL.std.450) 17(Acos) 536 - 538: 48(fvec4) Load 53(inF0) - 539: 132(bool) Any 538 540: 48(fvec4) Load 53(inF0) - 541: 48(fvec4) ExtInst 1(GLSL.std.450) 16(Asin) 540 - 542: 48(fvec4) Load 53(inF0) - 544: 543(ivec4) Bitcast 542 + 543: 541(bvec4) FOrdNotEqual 540 542 + 544: 132(bool) All 543 545: 48(fvec4) Load 53(inF0) - 546: 50(ivec4) Bitcast 545 - 547: 50(ivec4) Load 56(inU0) - 548: 48(fvec4) Bitcast 547 + 546: 48(fvec4) ExtInst 1(GLSL.std.450) 4(FAbs) 545 + 547: 48(fvec4) Load 53(inF0) + 548: 48(fvec4) ExtInst 1(GLSL.std.450) 17(Acos) 547 549: 48(fvec4) Load 53(inF0) - 550: 48(fvec4) ExtInst 1(GLSL.std.450) 18(Atan) 549 - 551: 48(fvec4) Load 53(inF0) - 552: 48(fvec4) Load 54(inF1) - 553: 48(fvec4) ExtInst 1(GLSL.std.450) 25(Atan2) 551 552 + 550: 541(bvec4) FOrdNotEqual 549 542 + 551: 132(bool) Any 550 + 552: 48(fvec4) Load 53(inF0) + 553: 48(fvec4) ExtInst 1(GLSL.std.450) 16(Asin) 552 554: 48(fvec4) Load 53(inF0) - 555: 48(fvec4) ExtInst 1(GLSL.std.450) 9(Ceil) 554 - 556: 48(fvec4) Load 53(inF0) - 557: 48(fvec4) Load 54(inF1) - 558: 48(fvec4) Load 55(inF2) - 559: 48(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 556 557 558 - 560: 48(fvec4) Load 53(inF0) - 561: 48(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 560 - 562: 48(fvec4) Load 53(inF0) - 563: 48(fvec4) ExtInst 1(GLSL.std.450) 20(Cosh) 562 - 565: 543(ivec4) BitCount 564 + 556: 555(ivec4) Bitcast 554 + 557: 48(fvec4) Load 53(inF0) + 558: 50(ivec4) Bitcast 557 + 559: 50(ivec4) Load 56(inU0) + 560: 48(fvec4) Bitcast 559 + 561: 48(fvec4) Load 53(inF0) + 562: 48(fvec4) ExtInst 1(GLSL.std.450) 18(Atan) 561 + 563: 48(fvec4) Load 53(inF0) + 564: 48(fvec4) Load 54(inF1) + 565: 48(fvec4) ExtInst 1(GLSL.std.450) 25(Atan2) 563 564 566: 48(fvec4) Load 53(inF0) - 567: 48(fvec4) ExtInst 1(GLSL.std.450) 12(Degrees) 566 + 567: 48(fvec4) ExtInst 1(GLSL.std.450) 9(Ceil) 566 568: 48(fvec4) Load 53(inF0) 569: 48(fvec4) Load 54(inF1) - 570: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 568 569 - 571: 48(fvec4) Load 53(inF0) - 572: 48(fvec4) Load 54(inF1) - 573: 6(float) Dot 571 572 - 575: 7(ptr) AccessChain 53(inF0) 574 - 576: 6(float) Load 575 - 577: 7(ptr) AccessChain 54(inF1) 574 - 578: 6(float) Load 577 - 579: 6(float) FMul 576 578 - 581: 7(ptr) AccessChain 53(inF0) 580 - 582: 6(float) Load 581 - 584: 7(ptr) AccessChain 54(inF1) 583 - 585: 6(float) Load 584 - 586: 48(fvec4) CompositeConstruct 219 579 582 585 - 587: 48(fvec4) Load 53(inF0) - 588: 48(fvec4) ExtInst 1(GLSL.std.450) 27(Exp) 587 - 589: 48(fvec4) Load 53(inF0) - 590: 48(fvec4) ExtInst 1(GLSL.std.450) 29(Exp2) 589 - 591: 48(fvec4) Load 53(inF0) - 592: 48(fvec4) Load 54(inF1) - 593: 48(fvec4) Load 55(inF2) - 594: 48(fvec4) ExtInst 1(GLSL.std.450) 70(FaceForward) 591 592 593 - 595: 143(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 164 - 596: 143(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 164 - 597: 48(fvec4) Load 53(inF0) - 598: 48(fvec4) ExtInst 1(GLSL.std.450) 8(Floor) 597 + 570: 48(fvec4) Load 55(inF2) + 571: 48(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 568 569 570 + 572: 48(fvec4) Load 53(inF0) + 573: 48(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 572 + 574: 48(fvec4) Load 53(inF0) + 575: 48(fvec4) ExtInst 1(GLSL.std.450) 20(Cosh) 574 + 577: 555(ivec4) BitCount 576 + 578: 48(fvec4) Load 53(inF0) + 579: 48(fvec4) ExtInst 1(GLSL.std.450) 12(Degrees) 578 + 580: 48(fvec4) Load 53(inF0) + 581: 48(fvec4) Load 54(inF1) + 582: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 580 581 + 583: 48(fvec4) Load 53(inF0) + 584: 48(fvec4) Load 54(inF1) + 585: 6(float) Dot 583 584 + 587: 7(ptr) AccessChain 53(inF0) 586 + 588: 6(float) Load 587 + 589: 7(ptr) AccessChain 54(inF1) 586 + 590: 6(float) Load 589 + 591: 6(float) FMul 588 590 + 593: 7(ptr) AccessChain 53(inF0) 592 + 594: 6(float) Load 593 + 596: 7(ptr) AccessChain 54(inF1) 595 + 597: 6(float) Load 596 + 598: 48(fvec4) CompositeConstruct 221 591 594 597 599: 48(fvec4) Load 53(inF0) - 600: 48(fvec4) Load 54(inF1) - 601: 48(fvec4) FMod 599 600 - 602: 48(fvec4) Load 53(inF0) - 603: 48(fvec4) ExtInst 1(GLSL.std.450) 10(Fract) 602 - 604: 48(fvec4) Load 53(inF0) - 606: 605(bvec4) IsInf 604 - 607: 48(fvec4) Load 53(inF0) - 608: 605(bvec4) IsNan 607 + 600: 48(fvec4) ExtInst 1(GLSL.std.450) 27(Exp) 599 + 601: 48(fvec4) Load 53(inF0) + 602: 48(fvec4) ExtInst 1(GLSL.std.450) 29(Exp2) 601 + 603: 48(fvec4) Load 53(inF0) + 604: 48(fvec4) Load 54(inF1) + 605: 48(fvec4) Load 55(inF2) + 606: 48(fvec4) ExtInst 1(GLSL.std.450) 70(FaceForward) 603 604 605 + 607: 146(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 167 + 608: 146(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 167 609: 48(fvec4) Load 53(inF0) - 610: 48(fvec4) Load 54(inF1) - 611: 48(fvec4) ExtInst 1(GLSL.std.450) 53(Ldexp) 609 610 - 612: 48(fvec4) Load 53(inF0) - 613: 48(fvec4) Load 54(inF1) - 614: 48(fvec4) Load 55(inF2) - 615: 48(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 612 613 614 + 610: 48(fvec4) ExtInst 1(GLSL.std.450) 8(Floor) 609 + 611: 48(fvec4) Load 53(inF0) + 612: 48(fvec4) Load 54(inF1) + 613: 48(fvec4) FMod 611 612 + 614: 48(fvec4) Load 53(inF0) + 615: 48(fvec4) ExtInst 1(GLSL.std.450) 10(Fract) 614 616: 48(fvec4) Load 53(inF0) - 617: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 616 + 617: 541(bvec4) IsInf 616 618: 48(fvec4) Load 53(inF0) - 619: 48(fvec4) ExtInst 1(GLSL.std.450) 28(Log) 618 + 619: 541(bvec4) IsNan 618 620: 48(fvec4) Load 53(inF0) - 621: 48(fvec4) ExtInst 1(GLSL.std.450) 30(Log2) 620 - 622: 48(fvec4) VectorTimesScalar 621 196 + 621: 48(fvec4) Load 54(inF1) + 622: 48(fvec4) ExtInst 1(GLSL.std.450) 53(Ldexp) 620 621 623: 48(fvec4) Load 53(inF0) - 624: 48(fvec4) ExtInst 1(GLSL.std.450) 30(Log2) 623 - 625: 48(fvec4) Load 53(inF0) - 626: 48(fvec4) Load 54(inF1) - 627: 48(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 625 626 - 628: 48(fvec4) Load 53(inF0) - 629: 48(fvec4) Load 54(inF1) - 630: 48(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 628 629 + 624: 48(fvec4) Load 54(inF1) + 625: 48(fvec4) Load 55(inF2) + 626: 48(fvec4) ExtInst 1(GLSL.std.450) 46(FMix) 623 624 625 + 627: 48(fvec4) Load 53(inF0) + 628: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 627 + 629: 48(fvec4) Load 53(inF0) + 630: 48(fvec4) ExtInst 1(GLSL.std.450) 28(Log) 629 631: 48(fvec4) Load 53(inF0) - 632: 48(fvec4) ExtInst 1(GLSL.std.450) 69(Normalize) 631 - 633: 48(fvec4) Load 53(inF0) - 634: 48(fvec4) Load 54(inF1) - 635: 48(fvec4) ExtInst 1(GLSL.std.450) 26(Pow) 633 634 + 632: 48(fvec4) ExtInst 1(GLSL.std.450) 30(Log2) 631 + 633: 48(fvec4) VectorTimesScalar 632 199 + 634: 48(fvec4) Load 53(inF0) + 635: 48(fvec4) ExtInst 1(GLSL.std.450) 30(Log2) 634 636: 48(fvec4) Load 53(inF0) - 637: 48(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 636 - 638: 48(fvec4) Load 53(inF0) - 639: 48(fvec4) Load 54(inF1) - 640: 48(fvec4) ExtInst 1(GLSL.std.450) 71(Reflect) 638 639 - 641: 48(fvec4) Load 53(inF0) - 642: 48(fvec4) Load 54(inF1) - 643: 48(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 641 642 349 - 646: 543(ivec4) BitReverse 645 + 637: 48(fvec4) Load 54(inF1) + 638: 48(fvec4) ExtInst 1(GLSL.std.450) 40(FMax) 636 637 + 639: 48(fvec4) Load 53(inF0) + 640: 48(fvec4) Load 54(inF1) + 641: 48(fvec4) ExtInst 1(GLSL.std.450) 37(FMin) 639 640 + 642: 48(fvec4) Load 53(inF0) + 643: 48(fvec4) ExtInst 1(GLSL.std.450) 69(Normalize) 642 + 644: 48(fvec4) Load 53(inF0) + 645: 48(fvec4) Load 54(inF1) + 646: 48(fvec4) ExtInst 1(GLSL.std.450) 26(Pow) 644 645 647: 48(fvec4) Load 53(inF0) - 648: 48(fvec4) ExtInst 1(GLSL.std.450) 2(RoundEven) 647 + 648: 48(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 647 649: 48(fvec4) Load 53(inF0) - 650: 48(fvec4) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 649 - 651: 48(fvec4) Load 53(inF0) - 652: 48(fvec4) CompositeConstruct 218 218 218 218 - 653: 48(fvec4) CompositeConstruct 219 219 219 219 - 654: 48(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 651 652 653 - 655: 48(fvec4) Load 53(inF0) - 656: 48(fvec4) ExtInst 1(GLSL.std.450) 6(FSign) 655 - 657: 48(fvec4) Load 53(inF0) - 658: 48(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 657 - 659: 48(fvec4) Load 53(inF0) - 660: 48(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 659 - Store 54(inF1) 660 - 661: 48(fvec4) Load 53(inF0) - 662: 48(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 661 - Store 55(inF2) 662 - 663: 48(fvec4) Load 53(inF0) - 664: 48(fvec4) ExtInst 1(GLSL.std.450) 19(Sinh) 663 - 665: 48(fvec4) Load 53(inF0) - 666: 48(fvec4) Load 54(inF1) - 667: 48(fvec4) Load 55(inF2) - 668: 48(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 665 666 667 - 669: 48(fvec4) Load 53(inF0) - 670: 48(fvec4) ExtInst 1(GLSL.std.450) 31(Sqrt) 669 - 671: 48(fvec4) Load 53(inF0) - 672: 48(fvec4) Load 54(inF1) - 673: 48(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 671 672 + 650: 48(fvec4) Load 54(inF1) + 651: 48(fvec4) ExtInst 1(GLSL.std.450) 71(Reflect) 649 650 + 652: 48(fvec4) Load 53(inF0) + 653: 48(fvec4) Load 54(inF1) + 654: 48(fvec4) ExtInst 1(GLSL.std.450) 72(Refract) 652 653 354 + 657: 555(ivec4) BitReverse 656 + 658: 48(fvec4) Load 53(inF0) + 659: 48(fvec4) ExtInst 1(GLSL.std.450) 2(RoundEven) 658 + 660: 48(fvec4) Load 53(inF0) + 661: 48(fvec4) ExtInst 1(GLSL.std.450) 32(InverseSqrt) 660 + 662: 48(fvec4) Load 53(inF0) + 663: 48(fvec4) CompositeConstruct 133 133 133 133 + 664: 48(fvec4) CompositeConstruct 221 221 221 221 + 665: 48(fvec4) ExtInst 1(GLSL.std.450) 43(FClamp) 662 663 664 + 666: 48(fvec4) Load 53(inF0) + 667: 48(fvec4) ExtInst 1(GLSL.std.450) 6(FSign) 666 + 668: 48(fvec4) Load 53(inF0) + 669: 48(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 668 + 670: 48(fvec4) Load 53(inF0) + 671: 48(fvec4) ExtInst 1(GLSL.std.450) 13(Sin) 670 + Store 54(inF1) 671 + 672: 48(fvec4) Load 53(inF0) + 673: 48(fvec4) ExtInst 1(GLSL.std.450) 14(Cos) 672 + Store 55(inF2) 673 674: 48(fvec4) Load 53(inF0) - 675: 48(fvec4) ExtInst 1(GLSL.std.450) 15(Tan) 674 + 675: 48(fvec4) ExtInst 1(GLSL.std.450) 19(Sinh) 674 676: 48(fvec4) Load 53(inF0) - 677: 48(fvec4) ExtInst 1(GLSL.std.450) 21(Tanh) 676 - 678: 48(fvec4) Load 53(inF0) - 679: 48(fvec4) ExtInst 1(GLSL.std.450) 3(Trunc) 678 - ReturnValue 681 + 677: 48(fvec4) Load 54(inF1) + 678: 48(fvec4) Load 55(inF2) + 679: 48(fvec4) ExtInst 1(GLSL.std.450) 49(SmoothStep) 676 677 678 + 680: 48(fvec4) Load 53(inF0) + 681: 48(fvec4) ExtInst 1(GLSL.std.450) 31(Sqrt) 680 + 682: 48(fvec4) Load 53(inF0) + 683: 48(fvec4) Load 54(inF1) + 684: 48(fvec4) ExtInst 1(GLSL.std.450) 48(Step) 682 683 + 685: 48(fvec4) Load 53(inF0) + 686: 48(fvec4) ExtInst 1(GLSL.std.450) 15(Tan) 685 + 687: 48(fvec4) Load 53(inF0) + 688: 48(fvec4) ExtInst 1(GLSL.std.450) 21(Tanh) 687 + 689: 48(fvec4) Load 53(inF0) + 690: 48(fvec4) ExtInst 1(GLSL.std.450) 3(Trunc) 689 + ReturnValue 692 FunctionEnd 66(VertexShaderFunction2x2(mf22;mf22;mf22;): 60 Function None 62 63(inF0): 61(ptr) FunctionParameter 64(inF1): 61(ptr) FunctionParameter 65(inF2): 61(ptr) FunctionParameter 67: Label - 684: 60 Load 63(inF0) - 685: 132(bool) All 684 - 686: 60 Load 63(inF0) - 687: 60 ExtInst 1(GLSL.std.450) 4(FAbs) 686 - 688: 60 Load 63(inF0) - 689: 60 ExtInst 1(GLSL.std.450) 17(Acos) 688 - 690: 60 Load 63(inF0) - 691: 132(bool) Any 690 - 692: 60 Load 63(inF0) - 693: 60 ExtInst 1(GLSL.std.450) 16(Asin) 692 - 694: 60 Load 63(inF0) - 695: 60 ExtInst 1(GLSL.std.450) 18(Atan) 694 - 696: 60 Load 63(inF0) - 697: 60 Load 64(inF1) - 698: 60 ExtInst 1(GLSL.std.450) 25(Atan2) 696 697 + 695: 60 Load 63(inF0) + 697: 696 FOrdNotEqual 695 133 + 698: 132(bool) All 697 699: 60 Load 63(inF0) - 700: 60 ExtInst 1(GLSL.std.450) 9(Ceil) 699 + 700: 60 ExtInst 1(GLSL.std.450) 4(FAbs) 699 701: 60 Load 63(inF0) - 702: 60 Load 64(inF1) - 703: 60 Load 65(inF2) - 704: 60 ExtInst 1(GLSL.std.450) 43(FClamp) 701 702 703 - 705: 60 Load 63(inF0) - 706: 60 ExtInst 1(GLSL.std.450) 14(Cos) 705 - 707: 60 Load 63(inF0) - 708: 60 ExtInst 1(GLSL.std.450) 20(Cosh) 707 - 709: 60 Load 63(inF0) - 710: 60 ExtInst 1(GLSL.std.450) 12(Degrees) 709 - 711: 60 Load 63(inF0) - 712: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 711 + 702: 60 ExtInst 1(GLSL.std.450) 17(Acos) 701 + 703: 60 Load 63(inF0) + 704: 696 FOrdNotEqual 703 133 + 705: 132(bool) Any 704 + 706: 60 Load 63(inF0) + 707: 60 ExtInst 1(GLSL.std.450) 16(Asin) 706 + 708: 60 Load 63(inF0) + 709: 60 ExtInst 1(GLSL.std.450) 18(Atan) 708 + 710: 60 Load 63(inF0) + 711: 60 Load 64(inF1) + 712: 60 ExtInst 1(GLSL.std.450) 25(Atan2) 710 711 713: 60 Load 63(inF0) - 714: 60 ExtInst 1(GLSL.std.450) 27(Exp) 713 + 714: 60 ExtInst 1(GLSL.std.450) 9(Ceil) 713 715: 60 Load 63(inF0) - 716: 60 ExtInst 1(GLSL.std.450) 29(Exp2) 715 - 717: 143(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 164 - 718: 143(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 164 + 716: 60 Load 64(inF1) + 717: 60 Load 65(inF2) + 718: 60 ExtInst 1(GLSL.std.450) 43(FClamp) 715 716 717 719: 60 Load 63(inF0) - 720: 60 ExtInst 1(GLSL.std.450) 8(Floor) 719 + 720: 60 ExtInst 1(GLSL.std.450) 14(Cos) 719 721: 60 Load 63(inF0) - 722: 60 Load 64(inF1) - 723: 24(fvec2) CompositeExtract 721 0 - 724: 24(fvec2) CompositeExtract 722 0 - 725: 24(fvec2) FMod 723 724 - 726: 24(fvec2) CompositeExtract 721 1 - 727: 24(fvec2) CompositeExtract 722 1 - 728: 24(fvec2) FMod 726 727 - 729: 60 CompositeConstruct 725 728 - 730: 60 Load 63(inF0) - 731: 60 ExtInst 1(GLSL.std.450) 10(Fract) 730 - 732: 60 Load 63(inF0) - 733: 60 Load 64(inF1) - 734: 60 ExtInst 1(GLSL.std.450) 53(Ldexp) 732 733 + 722: 60 ExtInst 1(GLSL.std.450) 20(Cosh) 721 + 723: 60 Load 63(inF0) + 724: 60 ExtInst 1(GLSL.std.450) 12(Degrees) 723 + 725: 60 Load 63(inF0) + 726: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 725 + 727: 60 Load 63(inF0) + 728: 60 ExtInst 1(GLSL.std.450) 27(Exp) 727 + 729: 60 Load 63(inF0) + 730: 60 ExtInst 1(GLSL.std.450) 29(Exp2) 729 + 731: 146(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 167 + 732: 146(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 167 + 733: 60 Load 63(inF0) + 734: 60 ExtInst 1(GLSL.std.450) 8(Floor) 733 735: 60 Load 63(inF0) 736: 60 Load 64(inF1) - 737: 60 Load 65(inF2) - 738: 60 ExtInst 1(GLSL.std.450) 46(FMix) 735 736 737 - 739: 60 Load 63(inF0) - 740: 60 ExtInst 1(GLSL.std.450) 28(Log) 739 - 741: 60 Load 63(inF0) - 742: 60 ExtInst 1(GLSL.std.450) 30(Log2) 741 - 743: 60 MatrixTimesScalar 742 196 + 737: 24(fvec2) CompositeExtract 735 0 + 738: 24(fvec2) CompositeExtract 736 0 + 739: 24(fvec2) FMod 737 738 + 740: 24(fvec2) CompositeExtract 735 1 + 741: 24(fvec2) CompositeExtract 736 1 + 742: 24(fvec2) FMod 740 741 + 743: 60 CompositeConstruct 739 742 744: 60 Load 63(inF0) - 745: 60 ExtInst 1(GLSL.std.450) 30(Log2) 744 + 745: 60 ExtInst 1(GLSL.std.450) 10(Fract) 744 746: 60 Load 63(inF0) 747: 60 Load 64(inF1) - 748: 60 ExtInst 1(GLSL.std.450) 40(FMax) 746 747 + 748: 60 ExtInst 1(GLSL.std.450) 53(Ldexp) 746 747 749: 60 Load 63(inF0) 750: 60 Load 64(inF1) - 751: 60 ExtInst 1(GLSL.std.450) 37(FMin) 749 750 - 752: 60 Load 63(inF0) - 753: 60 Load 64(inF1) - 754: 60 ExtInst 1(GLSL.std.450) 26(Pow) 752 753 + 751: 60 Load 65(inF2) + 752: 60 ExtInst 1(GLSL.std.450) 46(FMix) 749 750 751 + 753: 60 Load 63(inF0) + 754: 60 ExtInst 1(GLSL.std.450) 28(Log) 753 755: 60 Load 63(inF0) - 756: 60 ExtInst 1(GLSL.std.450) 11(Radians) 755 - 757: 60 Load 63(inF0) - 758: 60 ExtInst 1(GLSL.std.450) 2(RoundEven) 757 - 759: 60 Load 63(inF0) - 760: 60 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 759 - 761: 60 Load 63(inF0) - 762: 24(fvec2) CompositeConstruct 218 218 - 763: 24(fvec2) CompositeConstruct 219 219 - 764: 60 ExtInst 1(GLSL.std.450) 43(FClamp) 761 762 763 - 765: 60 Load 63(inF0) - 766: 60 ExtInst 1(GLSL.std.450) 6(FSign) 765 - 767: 60 Load 63(inF0) - 768: 60 ExtInst 1(GLSL.std.450) 13(Sin) 767 + 756: 60 ExtInst 1(GLSL.std.450) 30(Log2) 755 + 757: 60 MatrixTimesScalar 756 199 + 758: 60 Load 63(inF0) + 759: 60 ExtInst 1(GLSL.std.450) 30(Log2) 758 + 760: 60 Load 63(inF0) + 761: 60 Load 64(inF1) + 762: 60 ExtInst 1(GLSL.std.450) 40(FMax) 760 761 + 763: 60 Load 63(inF0) + 764: 60 Load 64(inF1) + 765: 60 ExtInst 1(GLSL.std.450) 37(FMin) 763 764 + 766: 60 Load 63(inF0) + 767: 60 Load 64(inF1) + 768: 60 ExtInst 1(GLSL.std.450) 26(Pow) 766 767 769: 60 Load 63(inF0) - 770: 60 ExtInst 1(GLSL.std.450) 13(Sin) 769 - Store 64(inF1) 770 + 770: 60 ExtInst 1(GLSL.std.450) 11(Radians) 769 771: 60 Load 63(inF0) - 772: 60 ExtInst 1(GLSL.std.450) 14(Cos) 771 - Store 65(inF2) 772 + 772: 60 ExtInst 1(GLSL.std.450) 2(RoundEven) 771 773: 60 Load 63(inF0) - 774: 60 ExtInst 1(GLSL.std.450) 19(Sinh) 773 + 774: 60 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 773 775: 60 Load 63(inF0) - 776: 60 Load 64(inF1) - 777: 60 Load 65(inF2) - 778: 60 ExtInst 1(GLSL.std.450) 49(SmoothStep) 775 776 777 + 776: 24(fvec2) CompositeConstruct 133 133 + 777: 24(fvec2) CompositeConstruct 221 221 + 778: 60 ExtInst 1(GLSL.std.450) 43(FClamp) 775 776 777 779: 60 Load 63(inF0) - 780: 60 ExtInst 1(GLSL.std.450) 31(Sqrt) 779 + 780: 60 ExtInst 1(GLSL.std.450) 6(FSign) 779 781: 60 Load 63(inF0) - 782: 60 Load 64(inF1) - 783: 60 ExtInst 1(GLSL.std.450) 48(Step) 781 782 - 784: 60 Load 63(inF0) - 785: 60 ExtInst 1(GLSL.std.450) 15(Tan) 784 - 786: 60 Load 63(inF0) - 787: 60 ExtInst 1(GLSL.std.450) 21(Tanh) 786 - 788: 60 Load 63(inF0) - 789: 60 Transpose 788 - 790: 60 Load 63(inF0) - 791: 60 ExtInst 1(GLSL.std.450) 3(Trunc) 790 - ReturnValue 793 + 782: 60 ExtInst 1(GLSL.std.450) 13(Sin) 781 + 783: 60 Load 63(inF0) + 784: 60 ExtInst 1(GLSL.std.450) 13(Sin) 783 + Store 64(inF1) 784 + 785: 60 Load 63(inF0) + 786: 60 ExtInst 1(GLSL.std.450) 14(Cos) 785 + Store 65(inF2) 786 + 787: 60 Load 63(inF0) + 788: 60 ExtInst 1(GLSL.std.450) 19(Sinh) 787 + 789: 60 Load 63(inF0) + 790: 60 Load 64(inF1) + 791: 60 Load 65(inF2) + 792: 60 ExtInst 1(GLSL.std.450) 49(SmoothStep) 789 790 791 + 793: 60 Load 63(inF0) + 794: 60 ExtInst 1(GLSL.std.450) 31(Sqrt) 793 + 795: 60 Load 63(inF0) + 796: 60 Load 64(inF1) + 797: 60 ExtInst 1(GLSL.std.450) 48(Step) 795 796 + 798: 60 Load 63(inF0) + 799: 60 ExtInst 1(GLSL.std.450) 15(Tan) 798 + 800: 60 Load 63(inF0) + 801: 60 ExtInst 1(GLSL.std.450) 21(Tanh) 800 + 802: 60 Load 63(inF0) + 803: 60 Transpose 802 + 804: 60 Load 63(inF0) + 805: 60 ExtInst 1(GLSL.std.450) 3(Trunc) 804 + ReturnValue 807 FunctionEnd 74(VertexShaderFunction3x3(mf33;mf33;mf33;): 68 Function None 70 71(inF0): 69(ptr) FunctionParameter 72(inF1): 69(ptr) FunctionParameter 73(inF2): 69(ptr) FunctionParameter 75: Label - 796: 68 Load 71(inF0) - 797: 132(bool) All 796 - 798: 68 Load 71(inF0) - 799: 68 ExtInst 1(GLSL.std.450) 4(FAbs) 798 - 800: 68 Load 71(inF0) - 801: 68 ExtInst 1(GLSL.std.450) 17(Acos) 800 - 802: 68 Load 71(inF0) - 803: 132(bool) Any 802 - 804: 68 Load 71(inF0) - 805: 68 ExtInst 1(GLSL.std.450) 16(Asin) 804 - 806: 68 Load 71(inF0) - 807: 68 ExtInst 1(GLSL.std.450) 18(Atan) 806 - 808: 68 Load 71(inF0) - 809: 68 Load 72(inF1) - 810: 68 ExtInst 1(GLSL.std.450) 25(Atan2) 808 809 - 811: 68 Load 71(inF0) - 812: 68 ExtInst 1(GLSL.std.450) 9(Ceil) 811 - 813: 68 Load 71(inF0) - 814: 68 Load 72(inF1) - 815: 68 Load 73(inF2) - 816: 68 ExtInst 1(GLSL.std.450) 43(FClamp) 813 814 815 - 817: 68 Load 71(inF0) - 818: 68 ExtInst 1(GLSL.std.450) 14(Cos) 817 - 819: 68 Load 71(inF0) - 820: 68 ExtInst 1(GLSL.std.450) 20(Cosh) 819 + 810: 68 Load 71(inF0) + 812: 811 FOrdNotEqual 810 133 + 813: 132(bool) All 812 + 814: 68 Load 71(inF0) + 815: 68 ExtInst 1(GLSL.std.450) 4(FAbs) 814 + 816: 68 Load 71(inF0) + 817: 68 ExtInst 1(GLSL.std.450) 17(Acos) 816 + 818: 68 Load 71(inF0) + 819: 811 FOrdNotEqual 818 133 + 820: 132(bool) Any 819 821: 68 Load 71(inF0) - 822: 68 ExtInst 1(GLSL.std.450) 12(Degrees) 821 + 822: 68 ExtInst 1(GLSL.std.450) 16(Asin) 821 823: 68 Load 71(inF0) - 824: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 823 + 824: 68 ExtInst 1(GLSL.std.450) 18(Atan) 823 825: 68 Load 71(inF0) - 826: 68 ExtInst 1(GLSL.std.450) 27(Exp) 825 - 827: 68 Load 71(inF0) - 828: 68 ExtInst 1(GLSL.std.450) 29(Exp2) 827 - 829: 143(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 164 - 830: 143(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 164 - 831: 68 Load 71(inF0) - 832: 68 ExtInst 1(GLSL.std.450) 8(Floor) 831 - 833: 68 Load 71(inF0) - 834: 68 Load 72(inF1) - 835: 36(fvec3) CompositeExtract 833 0 - 836: 36(fvec3) CompositeExtract 834 0 - 837: 36(fvec3) FMod 835 836 - 838: 36(fvec3) CompositeExtract 833 1 - 839: 36(fvec3) CompositeExtract 834 1 - 840: 36(fvec3) FMod 838 839 - 841: 36(fvec3) CompositeExtract 833 2 - 842: 36(fvec3) CompositeExtract 834 2 - 843: 36(fvec3) FMod 841 842 - 844: 68 CompositeConstruct 837 840 843 - 845: 68 Load 71(inF0) - 846: 68 ExtInst 1(GLSL.std.450) 10(Fract) 845 - 847: 68 Load 71(inF0) - 848: 68 Load 72(inF1) - 849: 68 ExtInst 1(GLSL.std.450) 53(Ldexp) 847 848 + 826: 68 Load 72(inF1) + 827: 68 ExtInst 1(GLSL.std.450) 25(Atan2) 825 826 + 828: 68 Load 71(inF0) + 829: 68 ExtInst 1(GLSL.std.450) 9(Ceil) 828 + 830: 68 Load 71(inF0) + 831: 68 Load 72(inF1) + 832: 68 Load 73(inF2) + 833: 68 ExtInst 1(GLSL.std.450) 43(FClamp) 830 831 832 + 834: 68 Load 71(inF0) + 835: 68 ExtInst 1(GLSL.std.450) 14(Cos) 834 + 836: 68 Load 71(inF0) + 837: 68 ExtInst 1(GLSL.std.450) 20(Cosh) 836 + 838: 68 Load 71(inF0) + 839: 68 ExtInst 1(GLSL.std.450) 12(Degrees) 838 + 840: 68 Load 71(inF0) + 841: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 840 + 842: 68 Load 71(inF0) + 843: 68 ExtInst 1(GLSL.std.450) 27(Exp) 842 + 844: 68 Load 71(inF0) + 845: 68 ExtInst 1(GLSL.std.450) 29(Exp2) 844 + 846: 146(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 167 + 847: 146(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 167 + 848: 68 Load 71(inF0) + 849: 68 ExtInst 1(GLSL.std.450) 8(Floor) 848 850: 68 Load 71(inF0) 851: 68 Load 72(inF1) - 852: 68 Load 73(inF2) - 853: 68 ExtInst 1(GLSL.std.450) 46(FMix) 850 851 852 - 854: 68 Load 71(inF0) - 855: 68 ExtInst 1(GLSL.std.450) 28(Log) 854 - 856: 68 Load 71(inF0) - 857: 68 ExtInst 1(GLSL.std.450) 30(Log2) 856 - 858: 68 MatrixTimesScalar 857 196 - 859: 68 Load 71(inF0) - 860: 68 ExtInst 1(GLSL.std.450) 30(Log2) 859 - 861: 68 Load 71(inF0) - 862: 68 Load 72(inF1) - 863: 68 ExtInst 1(GLSL.std.450) 40(FMax) 861 862 + 852: 36(fvec3) CompositeExtract 850 0 + 853: 36(fvec3) CompositeExtract 851 0 + 854: 36(fvec3) FMod 852 853 + 855: 36(fvec3) CompositeExtract 850 1 + 856: 36(fvec3) CompositeExtract 851 1 + 857: 36(fvec3) FMod 855 856 + 858: 36(fvec3) CompositeExtract 850 2 + 859: 36(fvec3) CompositeExtract 851 2 + 860: 36(fvec3) FMod 858 859 + 861: 68 CompositeConstruct 854 857 860 + 862: 68 Load 71(inF0) + 863: 68 ExtInst 1(GLSL.std.450) 10(Fract) 862 864: 68 Load 71(inF0) 865: 68 Load 72(inF1) - 866: 68 ExtInst 1(GLSL.std.450) 37(FMin) 864 865 + 866: 68 ExtInst 1(GLSL.std.450) 53(Ldexp) 864 865 867: 68 Load 71(inF0) 868: 68 Load 72(inF1) - 869: 68 ExtInst 1(GLSL.std.450) 26(Pow) 867 868 - 870: 68 Load 71(inF0) - 871: 68 ExtInst 1(GLSL.std.450) 11(Radians) 870 - 872: 68 Load 71(inF0) - 873: 68 ExtInst 1(GLSL.std.450) 2(RoundEven) 872 - 874: 68 Load 71(inF0) - 875: 68 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 874 + 869: 68 Load 73(inF2) + 870: 68 ExtInst 1(GLSL.std.450) 46(FMix) 867 868 869 + 871: 68 Load 71(inF0) + 872: 68 ExtInst 1(GLSL.std.450) 28(Log) 871 + 873: 68 Load 71(inF0) + 874: 68 ExtInst 1(GLSL.std.450) 30(Log2) 873 + 875: 68 MatrixTimesScalar 874 199 876: 68 Load 71(inF0) - 877: 36(fvec3) CompositeConstruct 218 218 218 - 878: 36(fvec3) CompositeConstruct 219 219 219 - 879: 68 ExtInst 1(GLSL.std.450) 43(FClamp) 876 877 878 - 880: 68 Load 71(inF0) - 881: 68 ExtInst 1(GLSL.std.450) 6(FSign) 880 - 882: 68 Load 71(inF0) - 883: 68 ExtInst 1(GLSL.std.450) 13(Sin) 882 + 877: 68 ExtInst 1(GLSL.std.450) 30(Log2) 876 + 878: 68 Load 71(inF0) + 879: 68 Load 72(inF1) + 880: 68 ExtInst 1(GLSL.std.450) 40(FMax) 878 879 + 881: 68 Load 71(inF0) + 882: 68 Load 72(inF1) + 883: 68 ExtInst 1(GLSL.std.450) 37(FMin) 881 882 884: 68 Load 71(inF0) - 885: 68 ExtInst 1(GLSL.std.450) 13(Sin) 884 - Store 72(inF1) 885 - 886: 68 Load 71(inF0) - 887: 68 ExtInst 1(GLSL.std.450) 14(Cos) 886 - Store 73(inF2) 887 - 888: 68 Load 71(inF0) - 889: 68 ExtInst 1(GLSL.std.450) 19(Sinh) 888 - 890: 68 Load 71(inF0) - 891: 68 Load 72(inF1) - 892: 68 Load 73(inF2) - 893: 68 ExtInst 1(GLSL.std.450) 49(SmoothStep) 890 891 892 - 894: 68 Load 71(inF0) - 895: 68 ExtInst 1(GLSL.std.450) 31(Sqrt) 894 - 896: 68 Load 71(inF0) - 897: 68 Load 72(inF1) - 898: 68 ExtInst 1(GLSL.std.450) 48(Step) 896 897 + 885: 68 Load 72(inF1) + 886: 68 ExtInst 1(GLSL.std.450) 26(Pow) 884 885 + 887: 68 Load 71(inF0) + 888: 68 ExtInst 1(GLSL.std.450) 11(Radians) 887 + 889: 68 Load 71(inF0) + 890: 68 ExtInst 1(GLSL.std.450) 2(RoundEven) 889 + 891: 68 Load 71(inF0) + 892: 68 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 891 + 893: 68 Load 71(inF0) + 894: 36(fvec3) CompositeConstruct 133 133 133 + 895: 36(fvec3) CompositeConstruct 221 221 221 + 896: 68 ExtInst 1(GLSL.std.450) 43(FClamp) 893 894 895 + 897: 68 Load 71(inF0) + 898: 68 ExtInst 1(GLSL.std.450) 6(FSign) 897 899: 68 Load 71(inF0) - 900: 68 ExtInst 1(GLSL.std.450) 15(Tan) 899 + 900: 68 ExtInst 1(GLSL.std.450) 13(Sin) 899 901: 68 Load 71(inF0) - 902: 68 ExtInst 1(GLSL.std.450) 21(Tanh) 901 + 902: 68 ExtInst 1(GLSL.std.450) 13(Sin) 901 + Store 72(inF1) 902 903: 68 Load 71(inF0) - 904: 68 Transpose 903 + 904: 68 ExtInst 1(GLSL.std.450) 14(Cos) 903 + Store 73(inF2) 904 905: 68 Load 71(inF0) - 906: 68 ExtInst 1(GLSL.std.450) 3(Trunc) 905 - ReturnValue 908 + 906: 68 ExtInst 1(GLSL.std.450) 19(Sinh) 905 + 907: 68 Load 71(inF0) + 908: 68 Load 72(inF1) + 909: 68 Load 73(inF2) + 910: 68 ExtInst 1(GLSL.std.450) 49(SmoothStep) 907 908 909 + 911: 68 Load 71(inF0) + 912: 68 ExtInst 1(GLSL.std.450) 31(Sqrt) 911 + 913: 68 Load 71(inF0) + 914: 68 Load 72(inF1) + 915: 68 ExtInst 1(GLSL.std.450) 48(Step) 913 914 + 916: 68 Load 71(inF0) + 917: 68 ExtInst 1(GLSL.std.450) 15(Tan) 916 + 918: 68 Load 71(inF0) + 919: 68 ExtInst 1(GLSL.std.450) 21(Tanh) 918 + 920: 68 Load 71(inF0) + 921: 68 Transpose 920 + 922: 68 Load 71(inF0) + 923: 68 ExtInst 1(GLSL.std.450) 3(Trunc) 922 + ReturnValue 925 FunctionEnd 82(VertexShaderFunction4x4(mf44;mf44;mf44;): 76 Function None 78 79(inF0): 77(ptr) FunctionParameter 80(inF1): 77(ptr) FunctionParameter 81(inF2): 77(ptr) FunctionParameter 83: Label - 911: 76 Load 79(inF0) - 912: 132(bool) All 911 - 913: 76 Load 79(inF0) - 914: 76 ExtInst 1(GLSL.std.450) 4(FAbs) 913 - 915: 76 Load 79(inF0) - 916: 76 ExtInst 1(GLSL.std.450) 17(Acos) 915 - 917: 76 Load 79(inF0) - 918: 132(bool) Any 917 - 919: 76 Load 79(inF0) - 920: 76 ExtInst 1(GLSL.std.450) 16(Asin) 919 - 921: 76 Load 79(inF0) - 922: 76 ExtInst 1(GLSL.std.450) 18(Atan) 921 - 923: 76 Load 79(inF0) - 924: 76 Load 80(inF1) - 925: 76 ExtInst 1(GLSL.std.450) 25(Atan2) 923 924 - 926: 76 Load 79(inF0) - 927: 76 ExtInst 1(GLSL.std.450) 9(Ceil) 926 928: 76 Load 79(inF0) - 929: 76 Load 80(inF1) - 930: 76 Load 81(inF2) - 931: 76 ExtInst 1(GLSL.std.450) 43(FClamp) 928 929 930 + 930: 929 FOrdNotEqual 928 133 + 931: 132(bool) All 930 932: 76 Load 79(inF0) - 933: 76 ExtInst 1(GLSL.std.450) 14(Cos) 932 + 933: 76 ExtInst 1(GLSL.std.450) 4(FAbs) 932 934: 76 Load 79(inF0) - 935: 76 ExtInst 1(GLSL.std.450) 20(Cosh) 934 + 935: 76 ExtInst 1(GLSL.std.450) 17(Acos) 934 936: 76 Load 79(inF0) - 937: 76 ExtInst 1(GLSL.std.450) 12(Degrees) 936 - 938: 76 Load 79(inF0) - 939: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 938 - 940: 76 Load 79(inF0) - 941: 76 ExtInst 1(GLSL.std.450) 27(Exp) 940 - 942: 76 Load 79(inF0) - 943: 76 ExtInst 1(GLSL.std.450) 29(Exp2) 942 - 944: 143(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 164 - 945: 143(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 164 + 937: 929 FOrdNotEqual 936 133 + 938: 132(bool) Any 937 + 939: 76 Load 79(inF0) + 940: 76 ExtInst 1(GLSL.std.450) 16(Asin) 939 + 941: 76 Load 79(inF0) + 942: 76 ExtInst 1(GLSL.std.450) 18(Atan) 941 + 943: 76 Load 79(inF0) + 944: 76 Load 80(inF1) + 945: 76 ExtInst 1(GLSL.std.450) 25(Atan2) 943 944 946: 76 Load 79(inF0) - 947: 76 ExtInst 1(GLSL.std.450) 8(Floor) 946 + 947: 76 ExtInst 1(GLSL.std.450) 9(Ceil) 946 948: 76 Load 79(inF0) 949: 76 Load 80(inF1) - 950: 48(fvec4) CompositeExtract 948 0 - 951: 48(fvec4) CompositeExtract 949 0 - 952: 48(fvec4) FMod 950 951 - 953: 48(fvec4) CompositeExtract 948 1 - 954: 48(fvec4) CompositeExtract 949 1 - 955: 48(fvec4) FMod 953 954 - 956: 48(fvec4) CompositeExtract 948 2 - 957: 48(fvec4) CompositeExtract 949 2 - 958: 48(fvec4) FMod 956 957 - 959: 48(fvec4) CompositeExtract 948 3 - 960: 48(fvec4) CompositeExtract 949 3 - 961: 48(fvec4) FMod 959 960 - 962: 76 CompositeConstruct 952 955 958 961 - 963: 76 Load 79(inF0) - 964: 76 ExtInst 1(GLSL.std.450) 10(Fract) 963 - 965: 76 Load 79(inF0) - 966: 76 Load 80(inF1) - 967: 76 ExtInst 1(GLSL.std.450) 53(Ldexp) 965 966 + 950: 76 Load 81(inF2) + 951: 76 ExtInst 1(GLSL.std.450) 43(FClamp) 948 949 950 + 952: 76 Load 79(inF0) + 953: 76 ExtInst 1(GLSL.std.450) 14(Cos) 952 + 954: 76 Load 79(inF0) + 955: 76 ExtInst 1(GLSL.std.450) 20(Cosh) 954 + 956: 76 Load 79(inF0) + 957: 76 ExtInst 1(GLSL.std.450) 12(Degrees) 956 + 958: 76 Load 79(inF0) + 959: 6(float) ExtInst 1(GLSL.std.450) 33(Determinant) 958 + 960: 76 Load 79(inF0) + 961: 76 ExtInst 1(GLSL.std.450) 27(Exp) 960 + 962: 76 Load 79(inF0) + 963: 76 ExtInst 1(GLSL.std.450) 29(Exp2) 962 + 964: 146(int) ExtInst 1(GLSL.std.450) 74(FindSMsb) 167 + 965: 146(int) ExtInst 1(GLSL.std.450) 73(FindILsb) 167 + 966: 76 Load 79(inF0) + 967: 76 ExtInst 1(GLSL.std.450) 8(Floor) 966 968: 76 Load 79(inF0) 969: 76 Load 80(inF1) - 970: 76 Load 81(inF2) - 971: 76 ExtInst 1(GLSL.std.450) 46(FMix) 968 969 970 - 972: 76 Load 79(inF0) - 973: 76 ExtInst 1(GLSL.std.450) 28(Log) 972 - 974: 76 Load 79(inF0) - 975: 76 ExtInst 1(GLSL.std.450) 30(Log2) 974 - 976: 76 MatrixTimesScalar 975 196 - 977: 76 Load 79(inF0) - 978: 76 ExtInst 1(GLSL.std.450) 30(Log2) 977 - 979: 76 Load 79(inF0) - 980: 76 Load 80(inF1) - 981: 76 ExtInst 1(GLSL.std.450) 40(FMax) 979 980 - 982: 76 Load 79(inF0) - 983: 76 Load 80(inF1) - 984: 76 ExtInst 1(GLSL.std.450) 37(FMin) 982 983 + 970: 48(fvec4) CompositeExtract 968 0 + 971: 48(fvec4) CompositeExtract 969 0 + 972: 48(fvec4) FMod 970 971 + 973: 48(fvec4) CompositeExtract 968 1 + 974: 48(fvec4) CompositeExtract 969 1 + 975: 48(fvec4) FMod 973 974 + 976: 48(fvec4) CompositeExtract 968 2 + 977: 48(fvec4) CompositeExtract 969 2 + 978: 48(fvec4) FMod 976 977 + 979: 48(fvec4) CompositeExtract 968 3 + 980: 48(fvec4) CompositeExtract 969 3 + 981: 48(fvec4) FMod 979 980 + 982: 76 CompositeConstruct 972 975 978 981 + 983: 76 Load 79(inF0) + 984: 76 ExtInst 1(GLSL.std.450) 10(Fract) 983 985: 76 Load 79(inF0) 986: 76 Load 80(inF1) - 987: 76 ExtInst 1(GLSL.std.450) 26(Pow) 985 986 + 987: 76 ExtInst 1(GLSL.std.450) 53(Ldexp) 985 986 988: 76 Load 79(inF0) - 989: 76 ExtInst 1(GLSL.std.450) 11(Radians) 988 - 990: 76 Load 79(inF0) - 991: 76 ExtInst 1(GLSL.std.450) 2(RoundEven) 990 + 989: 76 Load 80(inF1) + 990: 76 Load 81(inF2) + 991: 76 ExtInst 1(GLSL.std.450) 46(FMix) 988 989 990 992: 76 Load 79(inF0) - 993: 76 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 992 + 993: 76 ExtInst 1(GLSL.std.450) 28(Log) 992 994: 76 Load 79(inF0) - 995: 48(fvec4) CompositeConstruct 218 218 218 218 - 996: 48(fvec4) CompositeConstruct 219 219 219 219 - 997: 76 ExtInst 1(GLSL.std.450) 43(FClamp) 994 995 996 - 998: 76 Load 79(inF0) - 999: 76 ExtInst 1(GLSL.std.450) 6(FSign) 998 - 1000: 76 Load 79(inF0) - 1001: 76 ExtInst 1(GLSL.std.450) 13(Sin) 1000 + 995: 76 ExtInst 1(GLSL.std.450) 30(Log2) 994 + 996: 76 MatrixTimesScalar 995 199 + 997: 76 Load 79(inF0) + 998: 76 ExtInst 1(GLSL.std.450) 30(Log2) 997 + 999: 76 Load 79(inF0) + 1000: 76 Load 80(inF1) + 1001: 76 ExtInst 1(GLSL.std.450) 40(FMax) 999 1000 1002: 76 Load 79(inF0) - 1003: 76 ExtInst 1(GLSL.std.450) 13(Sin) 1002 - Store 80(inF1) 1003 - 1004: 76 Load 79(inF0) - 1005: 76 ExtInst 1(GLSL.std.450) 14(Cos) 1004 - Store 81(inF2) 1005 - 1006: 76 Load 79(inF0) - 1007: 76 ExtInst 1(GLSL.std.450) 19(Sinh) 1006 + 1003: 76 Load 80(inF1) + 1004: 76 ExtInst 1(GLSL.std.450) 37(FMin) 1002 1003 + 1005: 76 Load 79(inF0) + 1006: 76 Load 80(inF1) + 1007: 76 ExtInst 1(GLSL.std.450) 26(Pow) 1005 1006 1008: 76 Load 79(inF0) - 1009: 76 Load 80(inF1) - 1010: 76 Load 81(inF2) - 1011: 76 ExtInst 1(GLSL.std.450) 49(SmoothStep) 1008 1009 1010 + 1009: 76 ExtInst 1(GLSL.std.450) 11(Radians) 1008 + 1010: 76 Load 79(inF0) + 1011: 76 ExtInst 1(GLSL.std.450) 2(RoundEven) 1010 1012: 76 Load 79(inF0) - 1013: 76 ExtInst 1(GLSL.std.450) 31(Sqrt) 1012 + 1013: 76 ExtInst 1(GLSL.std.450) 32(InverseSqrt) 1012 1014: 76 Load 79(inF0) - 1015: 76 Load 80(inF1) - 1016: 76 ExtInst 1(GLSL.std.450) 48(Step) 1014 1015 - 1017: 76 Load 79(inF0) - 1018: 76 ExtInst 1(GLSL.std.450) 15(Tan) 1017 - 1019: 76 Load 79(inF0) - 1020: 76 ExtInst 1(GLSL.std.450) 21(Tanh) 1019 - 1021: 76 Load 79(inF0) - 1022: 76 Transpose 1021 - 1023: 76 Load 79(inF0) - 1024: 76 ExtInst 1(GLSL.std.450) 3(Trunc) 1023 - ReturnValue 1026 + 1015: 48(fvec4) CompositeConstruct 133 133 133 133 + 1016: 48(fvec4) CompositeConstruct 221 221 221 221 + 1017: 76 ExtInst 1(GLSL.std.450) 43(FClamp) 1014 1015 1016 + 1018: 76 Load 79(inF0) + 1019: 76 ExtInst 1(GLSL.std.450) 6(FSign) 1018 + 1020: 76 Load 79(inF0) + 1021: 76 ExtInst 1(GLSL.std.450) 13(Sin) 1020 + 1022: 76 Load 79(inF0) + 1023: 76 ExtInst 1(GLSL.std.450) 13(Sin) 1022 + Store 80(inF1) 1023 + 1024: 76 Load 79(inF0) + 1025: 76 ExtInst 1(GLSL.std.450) 14(Cos) 1024 + Store 81(inF2) 1025 + 1026: 76 Load 79(inF0) + 1027: 76 ExtInst 1(GLSL.std.450) 19(Sinh) 1026 + 1028: 76 Load 79(inF0) + 1029: 76 Load 80(inF1) + 1030: 76 Load 81(inF2) + 1031: 76 ExtInst 1(GLSL.std.450) 49(SmoothStep) 1028 1029 1030 + 1032: 76 Load 79(inF0) + 1033: 76 ExtInst 1(GLSL.std.450) 31(Sqrt) 1032 + 1034: 76 Load 79(inF0) + 1035: 76 Load 80(inF1) + 1036: 76 ExtInst 1(GLSL.std.450) 48(Step) 1034 1035 + 1037: 76 Load 79(inF0) + 1038: 76 ExtInst 1(GLSL.std.450) 15(Tan) 1037 + 1039: 76 Load 79(inF0) + 1040: 76 ExtInst 1(GLSL.std.450) 21(Tanh) 1039 + 1041: 76 Load 79(inF0) + 1042: 76 Transpose 1041 + 1043: 76 Load 79(inF0) + 1044: 76 ExtInst 1(GLSL.std.450) 3(Trunc) 1043 + ReturnValue 1046 FunctionEnd 91(TestGenMul2(f1;f1;vf2;vf2;mf22;mf22;): 2 Function None 84 85(inF0): 7(ptr) FunctionParameter @@ -3891,51 +3939,51 @@ Shader version: 500 89(inFM0): 61(ptr) FunctionParameter 90(inFM1): 61(ptr) FunctionParameter 92: Label - 1029(r0): 7(ptr) Variable Function - 1033(r1): 25(ptr) Variable Function - 1037(r2): 25(ptr) Variable Function - 1041(r3): 7(ptr) Variable Function - 1045(r4): 25(ptr) Variable Function - 1049(r5): 25(ptr) Variable Function - 1053(r6): 61(ptr) Variable Function - 1057(r7): 61(ptr) Variable Function - 1061(r8): 61(ptr) Variable Function - 1030: 6(float) Load 86(inF1) - 1031: 6(float) Load 85(inF0) - 1032: 6(float) FMul 1030 1031 - Store 1029(r0) 1032 - 1034: 6(float) Load 85(inF0) - 1035: 24(fvec2) Load 87(inFV0) - 1036: 24(fvec2) VectorTimesScalar 1035 1034 - Store 1033(r1) 1036 - 1038: 24(fvec2) Load 87(inFV0) - 1039: 6(float) Load 85(inF0) - 1040: 24(fvec2) VectorTimesScalar 1038 1039 - Store 1037(r2) 1040 - 1042: 24(fvec2) Load 87(inFV0) - 1043: 24(fvec2) Load 88(inFV1) - 1044: 6(float) Dot 1042 1043 - Store 1041(r3) 1044 - 1046: 24(fvec2) Load 87(inFV0) - 1047: 60 Load 89(inFM0) - 1048: 24(fvec2) VectorTimesMatrix 1046 1047 - Store 1045(r4) 1048 - 1050: 60 Load 89(inFM0) - 1051: 24(fvec2) Load 87(inFV0) - 1052: 24(fvec2) MatrixTimesVector 1050 1051 - Store 1049(r5) 1052 + 1049(r0): 7(ptr) Variable Function + 1053(r1): 25(ptr) Variable Function + 1057(r2): 25(ptr) Variable Function + 1061(r3): 7(ptr) Variable Function + 1065(r4): 25(ptr) Variable Function + 1069(r5): 25(ptr) Variable Function + 1073(r6): 61(ptr) Variable Function + 1077(r7): 61(ptr) Variable Function + 1081(r8): 61(ptr) Variable Function + 1050: 6(float) Load 86(inF1) + 1051: 6(float) Load 85(inF0) + 1052: 6(float) FMul 1050 1051 + Store 1049(r0) 1052 1054: 6(float) Load 85(inF0) - 1055: 60 Load 89(inFM0) - 1056: 60 MatrixTimesScalar 1055 1054 - Store 1053(r6) 1056 - 1058: 60 Load 89(inFM0) + 1055: 24(fvec2) Load 87(inFV0) + 1056: 24(fvec2) VectorTimesScalar 1055 1054 + Store 1053(r1) 1056 + 1058: 24(fvec2) Load 87(inFV0) 1059: 6(float) Load 85(inF0) - 1060: 60 MatrixTimesScalar 1058 1059 - Store 1057(r7) 1060 - 1062: 60 Load 90(inFM1) - 1063: 60 Load 89(inFM0) - 1064: 60 MatrixTimesMatrix 1062 1063 - Store 1061(r8) 1064 + 1060: 24(fvec2) VectorTimesScalar 1058 1059 + Store 1057(r2) 1060 + 1062: 24(fvec2) Load 87(inFV0) + 1063: 24(fvec2) Load 88(inFV1) + 1064: 6(float) Dot 1062 1063 + Store 1061(r3) 1064 + 1066: 24(fvec2) Load 87(inFV0) + 1067: 60 Load 89(inFM0) + 1068: 24(fvec2) VectorTimesMatrix 1066 1067 + Store 1065(r4) 1068 + 1070: 60 Load 89(inFM0) + 1071: 24(fvec2) Load 87(inFV0) + 1072: 24(fvec2) MatrixTimesVector 1070 1071 + Store 1069(r5) 1072 + 1074: 6(float) Load 85(inF0) + 1075: 60 Load 89(inFM0) + 1076: 60 MatrixTimesScalar 1075 1074 + Store 1073(r6) 1076 + 1078: 60 Load 89(inFM0) + 1079: 6(float) Load 85(inF0) + 1080: 60 MatrixTimesScalar 1078 1079 + Store 1077(r7) 1080 + 1082: 60 Load 90(inFM1) + 1083: 60 Load 89(inFM0) + 1084: 60 MatrixTimesMatrix 1082 1083 + Store 1081(r8) 1084 Return FunctionEnd 100(TestGenMul3(f1;f1;vf3;vf3;mf33;mf33;): 2 Function None 93 @@ -3946,51 +3994,51 @@ Shader version: 500 98(inFM0): 69(ptr) FunctionParameter 99(inFM1): 69(ptr) FunctionParameter 101: Label - 1065(r0): 7(ptr) Variable Function - 1069(r1): 37(ptr) Variable Function - 1073(r2): 37(ptr) Variable Function - 1077(r3): 7(ptr) Variable Function - 1081(r4): 37(ptr) Variable Function - 1085(r5): 37(ptr) Variable Function - 1089(r6): 69(ptr) Variable Function - 1093(r7): 69(ptr) Variable Function - 1097(r8): 69(ptr) Variable Function - 1066: 6(float) Load 95(inF1) - 1067: 6(float) Load 94(inF0) - 1068: 6(float) FMul 1066 1067 - Store 1065(r0) 1068 - 1070: 6(float) Load 94(inF0) - 1071: 36(fvec3) Load 96(inFV0) - 1072: 36(fvec3) VectorTimesScalar 1071 1070 - Store 1069(r1) 1072 - 1074: 36(fvec3) Load 96(inFV0) - 1075: 6(float) Load 94(inF0) - 1076: 36(fvec3) VectorTimesScalar 1074 1075 - Store 1073(r2) 1076 - 1078: 36(fvec3) Load 96(inFV0) - 1079: 36(fvec3) Load 97(inFV1) - 1080: 6(float) Dot 1078 1079 - Store 1077(r3) 1080 - 1082: 36(fvec3) Load 96(inFV0) - 1083: 68 Load 98(inFM0) - 1084: 36(fvec3) VectorTimesMatrix 1082 1083 - Store 1081(r4) 1084 - 1086: 68 Load 98(inFM0) - 1087: 36(fvec3) Load 96(inFV0) - 1088: 36(fvec3) MatrixTimesVector 1086 1087 - Store 1085(r5) 1088 + 1085(r0): 7(ptr) Variable Function + 1089(r1): 37(ptr) Variable Function + 1093(r2): 37(ptr) Variable Function + 1097(r3): 7(ptr) Variable Function + 1101(r4): 37(ptr) Variable Function + 1105(r5): 37(ptr) Variable Function + 1109(r6): 69(ptr) Variable Function + 1113(r7): 69(ptr) Variable Function + 1117(r8): 69(ptr) Variable Function + 1086: 6(float) Load 95(inF1) + 1087: 6(float) Load 94(inF0) + 1088: 6(float) FMul 1086 1087 + Store 1085(r0) 1088 1090: 6(float) Load 94(inF0) - 1091: 68 Load 98(inFM0) - 1092: 68 MatrixTimesScalar 1091 1090 - Store 1089(r6) 1092 - 1094: 68 Load 98(inFM0) + 1091: 36(fvec3) Load 96(inFV0) + 1092: 36(fvec3) VectorTimesScalar 1091 1090 + Store 1089(r1) 1092 + 1094: 36(fvec3) Load 96(inFV0) 1095: 6(float) Load 94(inF0) - 1096: 68 MatrixTimesScalar 1094 1095 - Store 1093(r7) 1096 - 1098: 68 Load 99(inFM1) - 1099: 68 Load 98(inFM0) - 1100: 68 MatrixTimesMatrix 1098 1099 - Store 1097(r8) 1100 + 1096: 36(fvec3) VectorTimesScalar 1094 1095 + Store 1093(r2) 1096 + 1098: 36(fvec3) Load 96(inFV0) + 1099: 36(fvec3) Load 97(inFV1) + 1100: 6(float) Dot 1098 1099 + Store 1097(r3) 1100 + 1102: 36(fvec3) Load 96(inFV0) + 1103: 68 Load 98(inFM0) + 1104: 36(fvec3) VectorTimesMatrix 1102 1103 + Store 1101(r4) 1104 + 1106: 68 Load 98(inFM0) + 1107: 36(fvec3) Load 96(inFV0) + 1108: 36(fvec3) MatrixTimesVector 1106 1107 + Store 1105(r5) 1108 + 1110: 6(float) Load 94(inF0) + 1111: 68 Load 98(inFM0) + 1112: 68 MatrixTimesScalar 1111 1110 + Store 1109(r6) 1112 + 1114: 68 Load 98(inFM0) + 1115: 6(float) Load 94(inF0) + 1116: 68 MatrixTimesScalar 1114 1115 + Store 1113(r7) 1116 + 1118: 68 Load 99(inFM1) + 1119: 68 Load 98(inFM0) + 1120: 68 MatrixTimesMatrix 1118 1119 + Store 1117(r8) 1120 Return FunctionEnd 109(TestGenMul4(f1;f1;vf4;vf4;mf44;mf44;): 2 Function None 102 @@ -4001,51 +4049,51 @@ Shader version: 500 107(inFM0): 77(ptr) FunctionParameter 108(inFM1): 77(ptr) FunctionParameter 110: Label - 1101(r0): 7(ptr) Variable Function - 1105(r1): 49(ptr) Variable Function - 1109(r2): 49(ptr) Variable Function - 1113(r3): 7(ptr) Variable Function - 1117(r4): 49(ptr) Variable Function - 1121(r5): 49(ptr) Variable Function - 1125(r6): 77(ptr) Variable Function - 1129(r7): 77(ptr) Variable Function - 1133(r8): 77(ptr) Variable Function - 1102: 6(float) Load 104(inF1) - 1103: 6(float) Load 103(inF0) - 1104: 6(float) FMul 1102 1103 - Store 1101(r0) 1104 - 1106: 6(float) Load 103(inF0) - 1107: 48(fvec4) Load 105(inFV0) - 1108: 48(fvec4) VectorTimesScalar 1107 1106 - Store 1105(r1) 1108 - 1110: 48(fvec4) Load 105(inFV0) - 1111: 6(float) Load 103(inF0) - 1112: 48(fvec4) VectorTimesScalar 1110 1111 - Store 1109(r2) 1112 - 1114: 48(fvec4) Load 105(inFV0) - 1115: 48(fvec4) Load 106(inFV1) - 1116: 6(float) Dot 1114 1115 - Store 1113(r3) 1116 - 1118: 48(fvec4) Load 105(inFV0) - 1119: 76 Load 107(inFM0) - 1120: 48(fvec4) VectorTimesMatrix 1118 1119 - Store 1117(r4) 1120 - 1122: 76 Load 107(inFM0) - 1123: 48(fvec4) Load 105(inFV0) - 1124: 48(fvec4) MatrixTimesVector 1122 1123 - Store 1121(r5) 1124 + 1121(r0): 7(ptr) Variable Function + 1125(r1): 49(ptr) Variable Function + 1129(r2): 49(ptr) Variable Function + 1133(r3): 7(ptr) Variable Function + 1137(r4): 49(ptr) Variable Function + 1141(r5): 49(ptr) Variable Function + 1145(r6): 77(ptr) Variable Function + 1149(r7): 77(ptr) Variable Function + 1153(r8): 77(ptr) Variable Function + 1122: 6(float) Load 104(inF1) + 1123: 6(float) Load 103(inF0) + 1124: 6(float) FMul 1122 1123 + Store 1121(r0) 1124 1126: 6(float) Load 103(inF0) - 1127: 76 Load 107(inFM0) - 1128: 76 MatrixTimesScalar 1127 1126 - Store 1125(r6) 1128 - 1130: 76 Load 107(inFM0) + 1127: 48(fvec4) Load 105(inFV0) + 1128: 48(fvec4) VectorTimesScalar 1127 1126 + Store 1125(r1) 1128 + 1130: 48(fvec4) Load 105(inFV0) 1131: 6(float) Load 103(inF0) - 1132: 76 MatrixTimesScalar 1130 1131 - Store 1129(r7) 1132 - 1134: 76 Load 108(inFM1) - 1135: 76 Load 107(inFM0) - 1136: 76 MatrixTimesMatrix 1134 1135 - Store 1133(r8) 1136 + 1132: 48(fvec4) VectorTimesScalar 1130 1131 + Store 1129(r2) 1132 + 1134: 48(fvec4) Load 105(inFV0) + 1135: 48(fvec4) Load 106(inFV1) + 1136: 6(float) Dot 1134 1135 + Store 1133(r3) 1136 + 1138: 48(fvec4) Load 105(inFV0) + 1139: 76 Load 107(inFM0) + 1140: 48(fvec4) VectorTimesMatrix 1138 1139 + Store 1137(r4) 1140 + 1142: 76 Load 107(inFM0) + 1143: 48(fvec4) Load 105(inFV0) + 1144: 48(fvec4) MatrixTimesVector 1142 1143 + Store 1141(r5) 1144 + 1146: 6(float) Load 103(inF0) + 1147: 76 Load 107(inFM0) + 1148: 76 MatrixTimesScalar 1147 1146 + Store 1145(r6) 1148 + 1150: 76 Load 107(inFM0) + 1151: 6(float) Load 103(inF0) + 1152: 76 MatrixTimesScalar 1150 1151 + Store 1149(r7) 1152 + 1154: 76 Load 108(inFM1) + 1155: 76 Load 107(inFM0) + 1156: 76 MatrixTimesMatrix 1154 1155 + Store 1153(r8) 1156 Return FunctionEnd 129(TestGenMulNxM(f1;f1;vf2;vf3;mf23;mf32;mf33;mf34;mf24;): 2 Function None 119 @@ -4059,90 +4107,90 @@ Shader version: 500 127(inFM3x4): 116(ptr) FunctionParameter 128(inFM2x4): 118(ptr) FunctionParameter 130: Label - 1137(r00): 7(ptr) Variable Function - 1141(r01): 25(ptr) Variable Function - 1145(r02): 37(ptr) Variable Function - 1149(r03): 25(ptr) Variable Function - 1153(r04): 37(ptr) Variable Function - 1157(r05): 7(ptr) Variable Function - 1161(r06): 7(ptr) Variable Function - 1165(r07): 37(ptr) Variable Function - 1169(r08): 25(ptr) Variable Function - 1173(r09): 25(ptr) Variable Function - 1177(r10): 37(ptr) Variable Function - 1181(r11): 112(ptr) Variable Function - 1185(r12): 114(ptr) Variable Function - 1189(r13): 61(ptr) Variable Function - 1193(r14): 112(ptr) Variable Function - 1197(r15): 118(ptr) Variable Function - 1201(r16): 116(ptr) Variable Function - 1138: 6(float) Load 121(inF1) - 1139: 6(float) Load 120(inF0) - 1140: 6(float) FMul 1138 1139 - Store 1137(r00) 1140 - 1142: 6(float) Load 120(inF0) - 1143: 24(fvec2) Load 122(inFV2) - 1144: 24(fvec2) VectorTimesScalar 1143 1142 - Store 1141(r01) 1144 - 1146: 6(float) Load 120(inF0) - 1147: 36(fvec3) Load 123(inFV3) - 1148: 36(fvec3) VectorTimesScalar 1147 1146 - Store 1145(r02) 1148 - 1150: 24(fvec2) Load 122(inFV2) - 1151: 6(float) Load 120(inF0) - 1152: 24(fvec2) VectorTimesScalar 1150 1151 - Store 1149(r03) 1152 - 1154: 36(fvec3) Load 123(inFV3) - 1155: 6(float) Load 120(inF0) - 1156: 36(fvec3) VectorTimesScalar 1154 1155 - Store 1153(r04) 1156 - 1158: 24(fvec2) Load 122(inFV2) - 1159: 24(fvec2) Load 122(inFV2) - 1160: 6(float) Dot 1158 1159 - Store 1157(r05) 1160 - 1162: 36(fvec3) Load 123(inFV3) - 1163: 36(fvec3) Load 123(inFV3) - 1164: 6(float) Dot 1162 1163 - Store 1161(r06) 1164 - 1166: 111 Load 124(inFM2x3) - 1167: 24(fvec2) Load 122(inFV2) - 1168: 36(fvec3) MatrixTimesVector 1166 1167 - Store 1165(r07) 1168 - 1170: 113 Load 125(inFM3x2) - 1171: 36(fvec3) Load 123(inFV3) - 1172: 24(fvec2) MatrixTimesVector 1170 1171 - Store 1169(r08) 1172 + 1157(r00): 7(ptr) Variable Function + 1161(r01): 25(ptr) Variable Function + 1165(r02): 37(ptr) Variable Function + 1169(r03): 25(ptr) Variable Function + 1173(r04): 37(ptr) Variable Function + 1177(r05): 7(ptr) Variable Function + 1181(r06): 7(ptr) Variable Function + 1185(r07): 37(ptr) Variable Function + 1189(r08): 25(ptr) Variable Function + 1193(r09): 25(ptr) Variable Function + 1197(r10): 37(ptr) Variable Function + 1201(r11): 112(ptr) Variable Function + 1205(r12): 114(ptr) Variable Function + 1209(r13): 61(ptr) Variable Function + 1213(r14): 112(ptr) Variable Function + 1217(r15): 118(ptr) Variable Function + 1221(r16): 116(ptr) Variable Function + 1158: 6(float) Load 121(inF1) + 1159: 6(float) Load 120(inF0) + 1160: 6(float) FMul 1158 1159 + Store 1157(r00) 1160 + 1162: 6(float) Load 120(inF0) + 1163: 24(fvec2) Load 122(inFV2) + 1164: 24(fvec2) VectorTimesScalar 1163 1162 + Store 1161(r01) 1164 + 1166: 6(float) Load 120(inF0) + 1167: 36(fvec3) Load 123(inFV3) + 1168: 36(fvec3) VectorTimesScalar 1167 1166 + Store 1165(r02) 1168 + 1170: 24(fvec2) Load 122(inFV2) + 1171: 6(float) Load 120(inF0) + 1172: 24(fvec2) VectorTimesScalar 1170 1171 + Store 1169(r03) 1172 1174: 36(fvec3) Load 123(inFV3) - 1175: 111 Load 124(inFM2x3) - 1176: 24(fvec2) VectorTimesMatrix 1174 1175 - Store 1173(r09) 1176 + 1175: 6(float) Load 120(inF0) + 1176: 36(fvec3) VectorTimesScalar 1174 1175 + Store 1173(r04) 1176 1178: 24(fvec2) Load 122(inFV2) - 1179: 113 Load 125(inFM3x2) - 1180: 36(fvec3) VectorTimesMatrix 1178 1179 - Store 1177(r10) 1180 - 1182: 6(float) Load 120(inF0) - 1183: 111 Load 124(inFM2x3) - 1184: 111 MatrixTimesScalar 1183 1182 - Store 1181(r11) 1184 - 1186: 6(float) Load 120(inF0) - 1187: 113 Load 125(inFM3x2) - 1188: 113 MatrixTimesScalar 1187 1186 - Store 1185(r12) 1188 + 1179: 24(fvec2) Load 122(inFV2) + 1180: 6(float) Dot 1178 1179 + Store 1177(r05) 1180 + 1182: 36(fvec3) Load 123(inFV3) + 1183: 36(fvec3) Load 123(inFV3) + 1184: 6(float) Dot 1182 1183 + Store 1181(r06) 1184 + 1186: 111 Load 124(inFM2x3) + 1187: 24(fvec2) Load 122(inFV2) + 1188: 36(fvec3) MatrixTimesVector 1186 1187 + Store 1185(r07) 1188 1190: 113 Load 125(inFM3x2) - 1191: 111 Load 124(inFM2x3) - 1192: 60 MatrixTimesMatrix 1190 1191 - Store 1189(r13) 1192 - 1194: 68 Load 126(inFM3x3) + 1191: 36(fvec3) Load 123(inFV3) + 1192: 24(fvec2) MatrixTimesVector 1190 1191 + Store 1189(r08) 1192 + 1194: 36(fvec3) Load 123(inFV3) 1195: 111 Load 124(inFM2x3) - 1196: 111 MatrixTimesMatrix 1194 1195 - Store 1193(r14) 1196 - 1198: 115 Load 127(inFM3x4) - 1199: 111 Load 124(inFM2x3) - 1200: 117 MatrixTimesMatrix 1198 1199 - Store 1197(r15) 1200 - 1202: 117 Load 128(inFM2x4) - 1203: 113 Load 125(inFM3x2) - 1204: 115 MatrixTimesMatrix 1202 1203 - Store 1201(r16) 1204 + 1196: 24(fvec2) VectorTimesMatrix 1194 1195 + Store 1193(r09) 1196 + 1198: 24(fvec2) Load 122(inFV2) + 1199: 113 Load 125(inFM3x2) + 1200: 36(fvec3) VectorTimesMatrix 1198 1199 + Store 1197(r10) 1200 + 1202: 6(float) Load 120(inF0) + 1203: 111 Load 124(inFM2x3) + 1204: 111 MatrixTimesScalar 1203 1202 + Store 1201(r11) 1204 + 1206: 6(float) Load 120(inF0) + 1207: 113 Load 125(inFM3x2) + 1208: 113 MatrixTimesScalar 1207 1206 + Store 1205(r12) 1208 + 1210: 113 Load 125(inFM3x2) + 1211: 111 Load 124(inFM2x3) + 1212: 60 MatrixTimesMatrix 1210 1211 + Store 1209(r13) 1212 + 1214: 68 Load 126(inFM3x3) + 1215: 111 Load 124(inFM2x3) + 1216: 111 MatrixTimesMatrix 1214 1215 + Store 1213(r14) 1216 + 1218: 115 Load 127(inFM3x4) + 1219: 111 Load 124(inFM2x3) + 1220: 117 MatrixTimesMatrix 1218 1219 + Store 1217(r15) 1220 + 1222: 117 Load 128(inFM2x4) + 1223: 113 Load 125(inFM3x2) + 1224: 115 MatrixTimesMatrix 1222 1223 + Store 1221(r16) 1224 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.layout.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.layout.frag.out index b8a96cf..7ceb5e7 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.layout.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.layout.frag.out @@ -6,29 +6,39 @@ gl_FragCoord origin is upper left 0:16 Function Parameters: 0:16 'input' ( in 4-component vector of float) 0:? Sequence -0:17 Branch: Return with expression -0:17 add ( temp 4-component vector of float) -0:17 add ( temp 4-component vector of float) -0:17 add ( temp 4-component vector of float) -0:17 'input' ( in 4-component vector of float) -0:17 v1: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) -0:17 'anon@0' (layout( set=3 binding=5 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1}) -0:17 Constant: -0:17 0 (const uint) -0:17 v5: direct index for structure (layout( row_major std430 offset=0) buffer 4-component vector of float) -0:17 'anon@1' (layout( row_major std430 push_constant) buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5}) -0:17 Constant: -0:17 0 (const uint) -0:17 v1PostLayout: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) -0:17 'anon@2' (layout( set=4 binding=7 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout}) -0:17 Constant: -0:17 0 (const uint) +0:17 Sequence +0:17 move second child to first child ( temp 4-component vector of float) +0:17 'layout' ( temp 4-component vector of float) +0:17 Constant: +0:17 2.000000 +0:17 2.000000 +0:17 2.000000 +0:17 2.000000 +0:18 Branch: Return with expression +0:18 add ( temp 4-component vector of float) +0:18 add ( temp 4-component vector of float) +0:18 add ( temp 4-component vector of float) +0:18 'input' ( in 4-component vector of float) +0:18 v1: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) +0:18 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1}) +0:18 Constant: +0:18 0 (const uint) +0:18 v5: direct index for structure (layout( row_major std430 offset=0) buffer 4-component vector of float) +0:18 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5}) +0:18 Constant: +0:18 0 (const uint) +0:18 component-wise multiply ( temp 4-component vector of float) +0:18 v1PostLayout: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) +0:18 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout}) +0:18 Constant: +0:18 0 (const uint) +0:18 'layout' ( temp 4-component vector of float) 0:? Linker Objects -0:? 'anon@0' (layout( set=3 binding=5 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1}) -0:? 'anon@1' (layout( row_major std430 push_constant) buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5}) +0:? 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1}) +0:? 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5}) 0:? 'specConst' ( specialization-constant const int) 0:? 10 (const int) -0:? 'anon@2' (layout( set=4 binding=7 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout}) +0:? 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout}) Linked fragment stage: @@ -42,33 +52,43 @@ gl_FragCoord origin is upper left 0:16 Function Parameters: 0:16 'input' ( in 4-component vector of float) 0:? Sequence -0:17 Branch: Return with expression -0:17 add ( temp 4-component vector of float) -0:17 add ( temp 4-component vector of float) -0:17 add ( temp 4-component vector of float) -0:17 'input' ( in 4-component vector of float) -0:17 v1: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) -0:17 'anon@0' (layout( set=3 binding=5 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1}) -0:17 Constant: -0:17 0 (const uint) -0:17 v5: direct index for structure (layout( row_major std430 offset=0) buffer 4-component vector of float) -0:17 'anon@1' (layout( row_major std430 push_constant) buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5}) -0:17 Constant: -0:17 0 (const uint) -0:17 v1PostLayout: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) -0:17 'anon@2' (layout( set=4 binding=7 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout}) -0:17 Constant: -0:17 0 (const uint) +0:17 Sequence +0:17 move second child to first child ( temp 4-component vector of float) +0:17 'layout' ( temp 4-component vector of float) +0:17 Constant: +0:17 2.000000 +0:17 2.000000 +0:17 2.000000 +0:17 2.000000 +0:18 Branch: Return with expression +0:18 add ( temp 4-component vector of float) +0:18 add ( temp 4-component vector of float) +0:18 add ( temp 4-component vector of float) +0:18 'input' ( in 4-component vector of float) +0:18 v1: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) +0:18 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1}) +0:18 Constant: +0:18 0 (const uint) +0:18 v5: direct index for structure (layout( row_major std430 offset=0) buffer 4-component vector of float) +0:18 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5}) +0:18 Constant: +0:18 0 (const uint) +0:18 component-wise multiply ( temp 4-component vector of float) +0:18 v1PostLayout: direct index for structure (layout( row_major std430 offset=16) buffer 4-component vector of float) +0:18 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout}) +0:18 Constant: +0:18 0 (const uint) +0:18 'layout' ( temp 4-component vector of float) 0:? Linker Objects -0:? 'anon@0' (layout( set=3 binding=5 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1}) -0:? 'anon@1' (layout( row_major std430 push_constant) buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5}) +0:? 'anon@0' (layout( set=3 binding=5 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1}) +0:? 'anon@1' (layout( row_major std430 push_constant) readonly buffer block{layout( row_major std430 offset=0) buffer 4-component vector of float v5}) 0:? 'specConst' ( specialization-constant const int) 0:? 10 (const int) -0:? 'anon@2' (layout( set=4 binding=7 row_major std430) buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout}) +0:? 'anon@2' (layout( set=4 binding=7 row_major std430) readonly buffer block{layout( row_major std430 offset=16) buffer 4-component vector of float v1PostLayout}) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 39 +// Generated by (magic number): 80003 +// Id's are bound by 44 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -79,47 +99,53 @@ gl_FragCoord origin is upper left Name 4 "main" Name 11 "PixelShaderFunction(vf4;" Name 10 "input" - Name 14 "tbufName" - MemberName 14(tbufName) 0 "v1" - Name 16 "" - Name 23 "tbufName2" - MemberName 23(tbufName2) 0 "v5" - Name 25 "" - Name 30 "tbufName2" - MemberName 30(tbufName2) 0 "v1PostLayout" - Name 32 "" - Name 38 "specConst" - MemberDecorate 14(tbufName) 0 Offset 16 - Decorate 14(tbufName) BufferBlock - Decorate 16 DescriptorSet 3 - Decorate 16 Binding 5 - MemberDecorate 23(tbufName2) 0 Offset 0 - Decorate 23(tbufName2) BufferBlock - MemberDecorate 30(tbufName2) 0 Offset 16 - Decorate 30(tbufName2) BufferBlock - Decorate 32 DescriptorSet 4 - Decorate 32 Binding 7 - Decorate 38(specConst) SpecId 17 + Name 13 "layout" + Name 17 "tbufName" + MemberName 17(tbufName) 0 "v1" + Name 19 "" + Name 26 "tbufName2" + MemberName 26(tbufName2) 0 "v5" + Name 28 "" + Name 33 "tbufName2" + MemberName 33(tbufName2) 0 "v1PostLayout" + Name 35 "" + Name 43 "specConst" + MemberDecorate 17(tbufName) 0 NonWritable + MemberDecorate 17(tbufName) 0 Offset 16 + Decorate 17(tbufName) BufferBlock + Decorate 19 DescriptorSet 3 + Decorate 19 Binding 5 + MemberDecorate 26(tbufName2) 0 NonWritable + MemberDecorate 26(tbufName2) 0 Offset 0 + Decorate 26(tbufName2) BufferBlock + MemberDecorate 33(tbufName2) 0 NonWritable + MemberDecorate 33(tbufName2) 0 Offset 16 + Decorate 33(tbufName2) BufferBlock + Decorate 35 DescriptorSet 4 + Decorate 35 Binding 7 + Decorate 43(specConst) SpecId 17 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 8: TypePointer Function 7(fvec4) 9: TypeFunction 7(fvec4) 8(ptr) - 14(tbufName): TypeStruct 7(fvec4) - 15: TypePointer Uniform 14(tbufName) - 16: 15(ptr) Variable Uniform - 17: TypeInt 32 1 - 18: 17(int) Constant 0 - 19: TypePointer Uniform 7(fvec4) - 23(tbufName2): TypeStruct 7(fvec4) - 24: TypePointer PushConstant 23(tbufName2) - 25: 24(ptr) Variable PushConstant - 26: TypePointer PushConstant 7(fvec4) - 30(tbufName2): TypeStruct 7(fvec4) - 31: TypePointer Uniform 30(tbufName2) - 32: 31(ptr) Variable Uniform - 38(specConst): 17(int) SpecConstant 10 + 14: 6(float) Constant 1073741824 + 15: 7(fvec4) ConstantComposite 14 14 14 14 + 17(tbufName): TypeStruct 7(fvec4) + 18: TypePointer Uniform 17(tbufName) + 19: 18(ptr) Variable Uniform + 20: TypeInt 32 1 + 21: 20(int) Constant 0 + 22: TypePointer Uniform 7(fvec4) + 26(tbufName2): TypeStruct 7(fvec4) + 27: TypePointer PushConstant 26(tbufName2) + 28: 27(ptr) Variable PushConstant + 29: TypePointer PushConstant 7(fvec4) + 33(tbufName2): TypeStruct 7(fvec4) + 34: TypePointer Uniform 33(tbufName2) + 35: 34(ptr) Variable Uniform + 43(specConst): 20(int) SpecConstant 10 4(main): 2 Function None 3 5: Label Return @@ -127,15 +153,19 @@ gl_FragCoord origin is upper left 11(PixelShaderFunction(vf4;): 7(fvec4) Function None 9 10(input): 8(ptr) FunctionParameter 12: Label - 13: 7(fvec4) Load 10(input) - 20: 19(ptr) AccessChain 16 18 - 21: 7(fvec4) Load 20 - 22: 7(fvec4) FAdd 13 21 - 27: 26(ptr) AccessChain 25 18 - 28: 7(fvec4) Load 27 - 29: 7(fvec4) FAdd 22 28 - 33: 19(ptr) AccessChain 32 18 - 34: 7(fvec4) Load 33 - 35: 7(fvec4) FAdd 29 34 - ReturnValue 35 + 13(layout): 8(ptr) Variable Function + Store 13(layout) 15 + 16: 7(fvec4) Load 10(input) + 23: 22(ptr) AccessChain 19 21 + 24: 7(fvec4) Load 23 + 25: 7(fvec4) FAdd 16 24 + 30: 29(ptr) AccessChain 28 21 + 31: 7(fvec4) Load 30 + 32: 7(fvec4) FAdd 25 31 + 36: 22(ptr) AccessChain 35 21 + 37: 7(fvec4) Load 36 + 38: 7(fvec4) Load 13(layout) + 39: 7(fvec4) FMul 37 38 + 40: 7(fvec4) FAdd 32 39 + ReturnValue 40 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.2dms.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.2dms.dx10.frag.out index 251d56e..f7749a9 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.2dms.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.2dms.dx10.frag.out @@ -152,13 +152,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -172,8 +172,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2dmsi4a' ( uniform itexture2DMSArray) 0:? 'g_tTex2dmsu4a' ( uniform utexture2DMSArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -332,13 +332,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -352,16 +352,15 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2dmsi4a' ( uniform itexture2DMSArray) 0:? 'g_tTex2dmsu4a' ( uniform utexture2DMSArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 130 Capability Shader Capability ImageGatherExtended - Capability ImageMSArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 120 124 @@ -390,8 +389,8 @@ gl_FragCoord origin is upper left Name 82 "g_tTex2dmsu4a" Name 106 "psout" Name 117 "flattenTemp" - Name 120 "Color" - Name 124 "Depth" + Name 120 "@entryPointOutput.Color" + Name 124 "@entryPointOutput.Depth" Name 129 "g_sSamp" Decorate 14(g_tTex2dmsf4) DescriptorSet 0 MemberDecorate 20($Global) 0 Offset 0 @@ -409,8 +408,8 @@ gl_FragCoord origin is upper left Decorate 66(g_tTex2dmsf4a) DescriptorSet 0 Decorate 75(g_tTex2dmsi4a) DescriptorSet 0 Decorate 82(g_tTex2dmsu4a) DescriptorSet 0 - Decorate 120(Color) Location 0 - Decorate 124(Depth) BuiltIn FragDepth + Decorate 120(@entryPointOutput.Color) Location 0 + Decorate 124(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 129(g_sSamp) DescriptorSet 0 Decorate 129(g_sSamp) Binding 0 2: TypeVoid @@ -459,9 +458,9 @@ gl_FragCoord origin is upper left 110: TypePointer Function 7(fvec4) 112: TypePointer Function 6(float) 119: TypePointer Output 7(fvec4) - 120(Color): 119(ptr) Variable Output +120(@entryPointOutput.Color): 119(ptr) Variable Output 123: TypePointer Output 6(float) - 124(Depth): 123(ptr) Variable Output +124(@entryPointOutput.Depth): 123(ptr) Variable Output 127: TypeSampler 128: TypePointer UniformConstant 127 129(g_sSamp): 128(ptr) Variable UniformConstant @@ -472,10 +471,10 @@ gl_FragCoord origin is upper left Store 117(flattenTemp) 118 121: 110(ptr) AccessChain 117(flattenTemp) 107 122: 7(fvec4) Load 121 - Store 120(Color) 122 + Store 120(@entryPointOutput.Color) 122 125: 112(ptr) AccessChain 117(flattenTemp) 23 126: 6(float) Load 125 - Store 124(Depth) 126 + Store 124(@entryPointOutput.Depth) 126 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.array.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.array.dx10.frag.out index 78e2b2c..e420242 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.array.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.array.dx10.frag.out @@ -152,13 +152,13 @@ gl_FragCoord origin is upper left 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:48 Color: direct index for structure ( temp 4-component vector of float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: 0:48 0 (const int) 0:48 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:48 Depth: direct index for structure ( temp float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: @@ -187,8 +187,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -347,13 +347,13 @@ gl_FragCoord origin is upper left 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:48 Color: direct index for structure ( temp 4-component vector of float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: 0:48 0 (const int) 0:48 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:48 Depth: direct index for structure ( temp float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: @@ -382,11 +382,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 159 Capability Shader @@ -420,8 +420,8 @@ gl_FragCoord origin is upper left Name 80 "g_tTex2du4a" Name 89 "psout" Name 101 "flattenTemp" - Name 104 "Color" - Name 108 "Depth" + Name 104 "@entryPointOutput.Color" + Name 108 "@entryPointOutput.Depth" Name 113 "g_sSamp" Name 116 "g_tTex1df4" Name 119 "g_tTex1di4" @@ -454,8 +454,8 @@ gl_FragCoord origin is upper left Decorate 57(g_tTex2df4a) DescriptorSet 0 Decorate 70(g_tTex2di4a) DescriptorSet 0 Decorate 80(g_tTex2du4a) DescriptorSet 0 - Decorate 104(Color) Location 0 - Decorate 108(Depth) BuiltIn FragDepth + Decorate 104(@entryPointOutput.Color) Location 0 + Decorate 108(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 113(g_sSamp) DescriptorSet 0 Decorate 113(g_sSamp) Binding 0 Decorate 116(g_tTex1df4) DescriptorSet 0 @@ -522,9 +522,9 @@ gl_FragCoord origin is upper left 95: 16(int) Constant 1 96: TypePointer Function 6(float) 103: TypePointer Output 7(fvec4) - 104(Color): 103(ptr) Variable Output +104(@entryPointOutput.Color): 103(ptr) Variable Output 107: TypePointer Output 6(float) - 108(Depth): 107(ptr) Variable Output +108(@entryPointOutput.Depth): 107(ptr) Variable Output 111: TypeSampler 112: TypePointer UniformConstant 111 113(g_sSamp): 112(ptr) Variable UniformConstant @@ -580,10 +580,10 @@ gl_FragCoord origin is upper left Store 101(flattenTemp) 102 105: 93(ptr) AccessChain 101(flattenTemp) 90 106: 7(fvec4) Load 105 - Store 104(Color) 106 + Store 104(@entryPointOutput.Color) 106 109: 96(ptr) AccessChain 101(flattenTemp) 95 110: 6(float) Load 109 - Store 108(Depth) 110 + Store 108(@entryPointOutput.Depth) 110 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.basic.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.basic.dx10.frag.out index 0da4048..4a76062 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.basic.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.basic.dx10.frag.out @@ -203,13 +203,13 @@ gl_FragCoord origin is upper left 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:48 Color: direct index for structure ( temp 4-component vector of float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: 0:48 0 (const int) 0:48 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:48 Depth: direct index for structure ( temp float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: @@ -238,8 +238,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -449,13 +449,13 @@ gl_FragCoord origin is upper left 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:48 Color: direct index for structure ( temp 4-component vector of float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: 0:48 0 (const int) 0:48 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:48 Depth: direct index for structure ( temp float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: @@ -484,11 +484,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 179 Capability Shader @@ -525,8 +525,8 @@ gl_FragCoord origin is upper left Name 110 "g_tTex3du4" Name 119 "psout" Name 130 "flattenTemp" - Name 133 "Color" - Name 137 "Depth" + Name 133 "@entryPointOutput.Color" + Name 137 "@entryPointOutput.Depth" Name 142 "g_sSamp" Name 145 "g_tTexcdf4" Name 148 "g_tTexcdi4" @@ -560,8 +560,8 @@ gl_FragCoord origin is upper left Decorate 87(g_tTex3df4) DescriptorSet 0 Decorate 100(g_tTex3di4) DescriptorSet 0 Decorate 110(g_tTex3du4) DescriptorSet 0 - Decorate 133(Color) Location 0 - Decorate 137(Depth) BuiltIn FragDepth + Decorate 133(@entryPointOutput.Color) Location 0 + Decorate 137(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 142(g_sSamp) DescriptorSet 0 Decorate 142(g_sSamp) Binding 0 Decorate 145(g_tTexcdf4) DescriptorSet 0 @@ -635,9 +635,9 @@ gl_FragCoord origin is upper left 123: TypePointer Function 7(fvec4) 125: TypePointer Function 6(float) 132: TypePointer Output 7(fvec4) - 133(Color): 132(ptr) Variable Output +133(@entryPointOutput.Color): 132(ptr) Variable Output 136: TypePointer Output 6(float) - 137(Depth): 136(ptr) Variable Output +137(@entryPointOutput.Depth): 136(ptr) Variable Output 140: TypeSampler 141: TypePointer UniformConstant 140 142(g_sSamp): 141(ptr) Variable UniformConstant @@ -684,10 +684,10 @@ gl_FragCoord origin is upper left Store 130(flattenTemp) 131 134: 123(ptr) AccessChain 130(flattenTemp) 120 135: 7(fvec4) Load 134 - Store 133(Color) 135 + Store 133(@entryPointOutput.Color) 135 138: 125(ptr) AccessChain 130(flattenTemp) 23 139: 6(float) Load 138 - Store 137(Depth) 139 + Store 137(@entryPointOutput.Depth) 139 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.basic.dx10.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.basic.dx10.vert.out index c3b7dc2..a3beaf4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.basic.dx10.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.basic.dx10.vert.out @@ -192,7 +192,7 @@ Shader version: 500 0:? Sequence 0:47 Sequence 0:47 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:47 Pos: direct index for structure ( temp 4-component vector of float) 0:47 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) 0:47 Constant: @@ -221,7 +221,7 @@ Shader version: 500 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? '@entryPointOutput' (layout( location=0) out structure{}) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) Linked vertex stage: @@ -420,7 +420,7 @@ Shader version: 500 0:? Sequence 0:47 Sequence 0:47 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:47 Pos: direct index for structure ( temp 4-component vector of float) 0:47 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) 0:47 Constant: @@ -449,18 +449,18 @@ Shader version: 500 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? '@entryPointOutput' (layout( location=0) out structure{}) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 174 +// Generated by (magic number): 80003 +// Id's are bound by 171 Capability Shader Capability Sampled1D Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 129 173 + EntryPoint Vertex 4 "main" 129 Source HLSL 500 Name 4 "main" Name 8 "VS_OUTPUT" @@ -486,7 +486,7 @@ Shader version: 500 Name 100 "g_tTex3di4" Name 110 "g_tTex3du4" Name 119 "vsout" - Name 129 "@entryPointOutput_Pos" + Name 129 "@entryPointOutput.Pos" Name 134 "g_sSamp" Name 137 "g_tTexcdf4" Name 140 "g_tTexcdi4" @@ -500,8 +500,6 @@ Shader version: 500 Name 164 "g_tTexcdf4a" Name 167 "g_tTexcdi4a" Name 170 "g_tTexcdu4a" - Name 171 "VS_OUTPUT" - Name 173 "@entryPointOutput" Decorate 14(g_tTex1df4) DescriptorSet 0 Decorate 14(g_tTex1df4) Binding 0 MemberDecorate 20($Global) 0 Offset 0 @@ -522,7 +520,7 @@ Shader version: 500 Decorate 87(g_tTex3df4) DescriptorSet 0 Decorate 100(g_tTex3di4) DescriptorSet 0 Decorate 110(g_tTex3du4) DescriptorSet 0 - Decorate 129(@entryPointOutput_Pos) BuiltIn Position + Decorate 129(@entryPointOutput.Pos) BuiltIn Position Decorate 134(g_sSamp) DescriptorSet 0 Decorate 134(g_sSamp) Binding 0 Decorate 137(g_tTexcdf4) DescriptorSet 0 @@ -537,7 +535,6 @@ Shader version: 500 Decorate 164(g_tTexcdf4a) DescriptorSet 0 Decorate 167(g_tTexcdi4a) DescriptorSet 0 Decorate 170(g_tTexcdu4a) DescriptorSet 0 - Decorate 173(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -596,7 +593,7 @@ Shader version: 500 122: 7(fvec4) ConstantComposite 121 121 121 121 123: TypePointer Function 7(fvec4) 128: TypePointer Output 7(fvec4) -129(@entryPointOutput_Pos): 128(ptr) Variable Output +129(@entryPointOutput.Pos): 128(ptr) Variable Output 132: TypeSampler 133: TypePointer UniformConstant 132 134(g_sSamp): 133(ptr) Variable UniformConstant @@ -636,14 +633,11 @@ Shader version: 500 168: TypeImage 24(int) Cube array sampled format:Unknown 169: TypePointer UniformConstant 168 170(g_tTexcdu4a): 169(ptr) Variable UniformConstant - 171(VS_OUTPUT): TypeStruct - 172: TypePointer Output 171(VS_OUTPUT) -173(@entryPointOutput): 172(ptr) Variable Output 4(main): 2 Function None 3 5: Label 130:8(VS_OUTPUT) FunctionCall 10(@main() 131: 7(fvec4) CompositeExtract 130 0 - Store 129(@entryPointOutput_Pos) 131 + Store 129(@entryPointOutput.Pos) 131 Return FunctionEnd 10(@main():8(VS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.buffer.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.buffer.dx10.frag.out index e68e5f9..4cb5f95 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.buffer.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.buffer.dx10.frag.out @@ -59,13 +59,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -76,8 +76,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexbi4' (layout( rgba32i) uniform itextureBuffer) 0:? 'g_tTexbu4' (layout( rgba32ui) uniform utextureBuffer) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -143,13 +143,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -160,11 +160,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexbi4' (layout( rgba32i) uniform itextureBuffer) 0:? 'g_tTexbu4' (layout( rgba32ui) uniform utextureBuffer) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 72 Capability Shader @@ -197,8 +197,8 @@ gl_FragCoord origin is upper left Name 45 "g_tTexbu4" Name 51 "psout" Name 61 "flattenTemp" - Name 64 "Color" - Name 68 "Depth" + Name 64 "@entryPointOutput.Color" + Name 68 "@entryPointOutput.Depth" Name 71 "g_tTexbf4_test" Decorate 16(g_tTexbf4) DescriptorSet 0 MemberDecorate 22($Global) 0 Offset 0 @@ -213,8 +213,8 @@ gl_FragCoord origin is upper left Decorate 24 DescriptorSet 0 Decorate 34(g_tTexbi4) DescriptorSet 0 Decorate 45(g_tTexbu4) DescriptorSet 0 - Decorate 64(Color) Location 0 - Decorate 68(Depth) BuiltIn FragDepth + Decorate 64(@entryPointOutput.Color) Location 0 + Decorate 68(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 71(g_tTexbf4_test) DescriptorSet 0 Decorate 71(g_tTexbf4_test) Binding 0 2: TypeVoid @@ -252,9 +252,9 @@ gl_FragCoord origin is upper left 55: 18(int) Constant 1 56: TypePointer Function 6(float) 63: TypePointer Output 7(fvec4) - 64(Color): 63(ptr) Variable Output +64(@entryPointOutput.Color): 63(ptr) Variable Output 67: TypePointer Output 6(float) - 68(Depth): 67(ptr) Variable Output +68(@entryPointOutput.Depth): 67(ptr) Variable Output 71(g_tTexbf4_test): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -263,10 +263,10 @@ gl_FragCoord origin is upper left Store 61(flattenTemp) 62 65: 12(ptr) AccessChain 61(flattenTemp) 25 66: 7(fvec4) Load 65 - Store 64(Color) 66 + Store 64(@entryPointOutput.Color) 66 69: 56(ptr) AccessChain 61(flattenTemp) 55 70: 6(float) Load 69 - Store 68(Depth) 70 + Store 68(@entryPointOutput.Depth) 70 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out index ff686a3..309778a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out @@ -62,13 +62,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -79,8 +79,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexbis' (layout( r32i) uniform itextureBuffer) 0:? 'g_tTexbus' (layout( r32ui) uniform utextureBuffer) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -149,13 +149,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -166,11 +166,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexbis' (layout( r32i) uniform itextureBuffer) 0:? 'g_tTexbus' (layout( r32ui) uniform utextureBuffer) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 75 Capability Shader @@ -203,8 +203,8 @@ gl_FragCoord origin is upper left Name 46 "g_tTexbus" Name 54 "psout" Name 64 "flattenTemp" - Name 67 "Color" - Name 71 "Depth" + Name 67 "@entryPointOutput.Color" + Name 71 "@entryPointOutput.Depth" Name 74 "g_tTexbfs_test" Decorate 16(g_tTexbfs) DescriptorSet 0 MemberDecorate 22($Global) 0 Offset 0 @@ -219,8 +219,8 @@ gl_FragCoord origin is upper left Decorate 24 DescriptorSet 0 Decorate 35(g_tTexbis) DescriptorSet 0 Decorate 46(g_tTexbus) DescriptorSet 0 - Decorate 67(Color) Location 0 - Decorate 71(Depth) BuiltIn FragDepth + Decorate 67(@entryPointOutput.Color) Location 0 + Decorate 71(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 74(g_tTexbfs_test) DescriptorSet 0 Decorate 74(g_tTexbfs_test) Binding 0 2: TypeVoid @@ -258,9 +258,9 @@ gl_FragCoord origin is upper left 57: TypePointer Function 7(fvec4) 59: 18(int) Constant 1 66: TypePointer Output 7(fvec4) - 67(Color): 66(ptr) Variable Output +67(@entryPointOutput.Color): 66(ptr) Variable Output 70: TypePointer Output 6(float) - 71(Depth): 70(ptr) Variable Output +71(@entryPointOutput.Depth): 70(ptr) Variable Output 74(g_tTexbfs_test): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -269,10 +269,10 @@ gl_FragCoord origin is upper left Store 64(flattenTemp) 65 68: 57(ptr) AccessChain 64(flattenTemp) 25 69: 7(fvec4) Load 68 - Store 67(Color) 69 + Store 67(@entryPointOutput.Color) 69 72: 12(ptr) AccessChain 64(flattenTemp) 59 73: 6(float) Load 72 - Store 71(Depth) 73 + Store 71(@entryPointOutput.Depth) 73 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.offset.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.offset.dx10.frag.out index 473db61..23e704c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.offset.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.offset.dx10.frag.out @@ -239,13 +239,13 @@ gl_FragCoord origin is upper left 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:48 Color: direct index for structure ( temp 4-component vector of float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: 0:48 0 (const int) 0:48 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:48 Depth: direct index for structure ( temp float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: @@ -274,8 +274,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -521,13 +521,13 @@ gl_FragCoord origin is upper left 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:48 Color: direct index for structure ( temp 4-component vector of float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: 0:48 0 (const int) 0:48 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:48 Depth: direct index for structure ( temp float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: @@ -556,11 +556,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 201 Capability Shader @@ -598,8 +598,8 @@ gl_FragCoord origin is upper left Name 130 "g_tTex3du4" Name 141 "psout" Name 152 "flattenTemp" - Name 155 "Color" - Name 159 "Depth" + Name 155 "@entryPointOutput.Color" + Name 159 "@entryPointOutput.Depth" Name 164 "g_sSamp" Name 167 "g_tTexcdf4" Name 170 "g_tTexcdi4" @@ -633,8 +633,8 @@ gl_FragCoord origin is upper left Decorate 102(g_tTex3df4) DescriptorSet 0 Decorate 118(g_tTex3di4) DescriptorSet 0 Decorate 130(g_tTex3du4) DescriptorSet 0 - Decorate 155(Color) Location 0 - Decorate 159(Depth) BuiltIn FragDepth + Decorate 155(@entryPointOutput.Color) Location 0 + Decorate 159(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 164(g_sSamp) DescriptorSet 0 Decorate 164(g_sSamp) Binding 0 Decorate 167(g_tTexcdf4) DescriptorSet 0 @@ -712,9 +712,9 @@ gl_FragCoord origin is upper left 145: TypePointer Function 7(fvec4) 147: TypePointer Function 6(float) 154: TypePointer Output 7(fvec4) - 155(Color): 154(ptr) Variable Output +155(@entryPointOutput.Color): 154(ptr) Variable Output 158: TypePointer Output 6(float) - 159(Depth): 158(ptr) Variable Output +159(@entryPointOutput.Depth): 158(ptr) Variable Output 162: TypeSampler 163: TypePointer UniformConstant 162 164(g_sSamp): 163(ptr) Variable UniformConstant @@ -761,10 +761,10 @@ gl_FragCoord origin is upper left Store 152(flattenTemp) 153 156: 145(ptr) AccessChain 152(flattenTemp) 142 157: 7(fvec4) Load 156 - Store 155(Color) 157 + Store 155(@entryPointOutput.Color) 157 160: 147(ptr) AccessChain 152(flattenTemp) 23 161: 6(float) Load 160 - Store 159(Depth) 161 + Store 159(@entryPointOutput.Depth) 161 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out index 4b6a09f..1c77797 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out @@ -176,13 +176,13 @@ gl_FragCoord origin is upper left 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:48 Color: direct index for structure ( temp 4-component vector of float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: 0:48 0 (const int) 0:48 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:48 Depth: direct index for structure ( temp float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: @@ -211,8 +211,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -395,13 +395,13 @@ gl_FragCoord origin is upper left 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:48 Color: direct index for structure ( temp 4-component vector of float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: 0:48 0 (const int) 0:48 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:48 Depth: direct index for structure ( temp float) 0:48 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:48 Constant: @@ -430,11 +430,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 174 Capability Shader @@ -469,8 +469,8 @@ gl_FragCoord origin is upper left Name 93 "g_tTex2du4a" Name 104 "psout" Name 116 "flattenTemp" - Name 119 "Color" - Name 123 "Depth" + Name 119 "@entryPointOutput.Color" + Name 123 "@entryPointOutput.Depth" Name 128 "g_sSamp" Name 131 "g_tTex1df4" Name 134 "g_tTex1di4" @@ -503,8 +503,8 @@ gl_FragCoord origin is upper left Decorate 64(g_tTex2df4a) DescriptorSet 0 Decorate 81(g_tTex2di4a) DescriptorSet 0 Decorate 93(g_tTex2du4a) DescriptorSet 0 - Decorate 119(Color) Location 0 - Decorate 123(Depth) BuiltIn FragDepth + Decorate 119(@entryPointOutput.Color) Location 0 + Decorate 123(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 128(g_sSamp) DescriptorSet 0 Decorate 128(g_sSamp) Binding 0 Decorate 131(g_tTex1df4) DescriptorSet 0 @@ -574,9 +574,9 @@ gl_FragCoord origin is upper left 110: 16(int) Constant 1 111: TypePointer Function 6(float) 118: TypePointer Output 7(fvec4) - 119(Color): 118(ptr) Variable Output +119(@entryPointOutput.Color): 118(ptr) Variable Output 122: TypePointer Output 6(float) - 123(Depth): 122(ptr) Variable Output +123(@entryPointOutput.Depth): 122(ptr) Variable Output 126: TypeSampler 127: TypePointer UniformConstant 126 128(g_sSamp): 127(ptr) Variable UniformConstant @@ -632,10 +632,10 @@ gl_FragCoord origin is upper left Store 116(flattenTemp) 117 120: 108(ptr) AccessChain 116(flattenTemp) 105 121: 7(fvec4) Load 120 - Store 119(Color) 121 + Store 119(@entryPointOutput.Color) 121 124: 111(ptr) AccessChain 116(flattenTemp) 110 125: 6(float) Load 124 - Store 123(Depth) 125 + Store 123(@entryPointOutput.Depth) 125 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out index 3e748cc..dfaaaba 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out @@ -40,7 +40,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:22 Sequence 0:22 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:22 Color: direct index for structure ( temp 4-component vector of float) 0:22 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:22 Constant: @@ -50,7 +50,7 @@ gl_FragCoord origin is upper left 0:? 'g_tBuffI' (layout( rgba32i) uniform iimageBuffer) 0:? 'g_tBuffU' (layout( rgba32ui) uniform uimageBuffer) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -97,7 +97,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:22 Sequence 0:22 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:22 Color: direct index for structure ( temp 4-component vector of float) 0:22 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:22 Constant: @@ -107,14 +107,14 @@ gl_FragCoord origin is upper left 0:? 'g_tBuffI' (layout( rgba32i) uniform iimageBuffer) 0:? 'g_tBuffU' (layout( rgba32ui) uniform uimageBuffer) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 57 Capability Shader - Capability SampledBuffer + Capability ImageBuffer 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 54 @@ -138,7 +138,7 @@ gl_FragCoord origin is upper left Name 31 "g_tBuffU" Name 39 "g_tBuffI" Name 45 "psout" - Name 54 "Color" + Name 54 "@entryPointOutput.Color" Decorate 14(g_tBuffF) DescriptorSet 0 MemberDecorate 20($Global) 0 Offset 0 MemberDecorate 20($Global) 1 Offset 8 @@ -152,7 +152,7 @@ gl_FragCoord origin is upper left Decorate 22 DescriptorSet 0 Decorate 31(g_tBuffU) DescriptorSet 0 Decorate 39(g_tBuffI) DescriptorSet 0 - Decorate 54(Color) Location 0 + Decorate 54(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -184,12 +184,12 @@ gl_FragCoord origin is upper left 47: 7(fvec4) ConstantComposite 46 46 46 46 48: TypePointer Function 7(fvec4) 53: TypePointer Output 7(fvec4) - 54(Color): 53(ptr) Variable Output +54(@entryPointOutput.Color): 53(ptr) Variable Output 4(main): 2 Function None 3 5: Label 55:8(PS_OUTPUT) FunctionCall 10(@main() 56: 7(fvec4) CompositeExtract 55 0 - Store 54(Color) 56 + Store 54(@entryPointOutput.Color) 56 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out index 884ed8f..9bd7e95 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out @@ -68,13 +68,13 @@ gl_FragCoord origin is upper left 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:40 Color: direct index for structure ( temp 4-component vector of float) 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Constant: 0:40 0 (const int) 0:40 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:40 Depth: direct index for structure ( temp float) 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Constant: @@ -97,8 +97,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray) 0:? 'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -173,13 +173,13 @@ gl_FragCoord origin is upper left 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:40 Color: direct index for structure ( temp 4-component vector of float) 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Constant: 0:40 0 (const int) 0:40 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:40 Depth: direct index for structure ( temp float) 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Constant: @@ -202,15 +202,15 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray) 0:? 'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 119 Capability Shader - Capability Sampled1D + Capability Image1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 82 86 @@ -239,8 +239,8 @@ gl_FragCoord origin is upper left Name 62 "g_tTex2du4a" Name 68 "psout" Name 79 "flattenTemp" - Name 82 "Color" - Name 86 "Depth" + Name 82 "@entryPointOutput.Color" + Name 86 "@entryPointOutput.Depth" Name 91 "g_sSamp" Name 94 "g_tTex1df4" Name 97 "g_tTex1di4" @@ -267,8 +267,8 @@ gl_FragCoord origin is upper left Decorate 46(g_tTex2df4a) DescriptorSet 0 Decorate 55(g_tTex2di4a) DescriptorSet 0 Decorate 62(g_tTex2du4a) DescriptorSet 0 - Decorate 82(Color) Location 0 - Decorate 86(Depth) BuiltIn FragDepth + Decorate 82(@entryPointOutput.Color) Location 0 + Decorate 86(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 91(g_sSamp) DescriptorSet 0 Decorate 91(g_sSamp) Binding 0 Decorate 94(g_tTex1df4) DescriptorSet 0 @@ -325,9 +325,9 @@ gl_FragCoord origin is upper left 72: TypePointer Function 7(fvec4) 74: TypePointer Function 6(float) 81: TypePointer Output 7(fvec4) - 82(Color): 81(ptr) Variable Output +82(@entryPointOutput.Color): 81(ptr) Variable Output 85: TypePointer Output 6(float) - 86(Depth): 85(ptr) Variable Output +86(@entryPointOutput.Depth): 85(ptr) Variable Output 89: TypeSampler 90: TypePointer UniformConstant 89 91(g_sSamp): 90(ptr) Variable UniformConstant @@ -365,10 +365,10 @@ gl_FragCoord origin is upper left Store 79(flattenTemp) 80 83: 72(ptr) AccessChain 79(flattenTemp) 69 84: 7(fvec4) Load 83 - Store 82(Color) 84 + Store 82(@entryPointOutput.Color) 84 87: 74(ptr) AccessChain 79(flattenTemp) 23 88: 6(float) Load 87 - Store 86(Depth) 88 + Store 86(@entryPointOutput.Depth) 88 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out index 3061867..045683e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out @@ -86,13 +86,13 @@ gl_FragCoord origin is upper left 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:40 Color: direct index for structure ( temp 4-component vector of float) 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Constant: 0:40 0 (const int) 0:40 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:40 Depth: direct index for structure ( temp float) 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Constant: @@ -115,8 +115,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray) 0:? 'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -209,13 +209,13 @@ gl_FragCoord origin is upper left 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:40 Color: direct index for structure ( temp 4-component vector of float) 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Constant: 0:40 0 (const int) 0:40 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:40 Depth: direct index for structure ( temp float) 0:40 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:40 Constant: @@ -238,15 +238,15 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray) 0:? 'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 132 Capability Shader - Capability Sampled1D + Capability Image1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 104 108 @@ -278,8 +278,8 @@ gl_FragCoord origin is upper left Name 85 "g_tTex3du4" Name 91 "psout" Name 101 "flattenTemp" - Name 104 "Color" - Name 108 "Depth" + Name 104 "@entryPointOutput.Color" + Name 108 "@entryPointOutput.Depth" Name 113 "g_sSamp" Name 116 "g_tTex1df4a" Name 119 "g_tTex1di4a" @@ -307,8 +307,8 @@ gl_FragCoord origin is upper left Decorate 69(g_tTex3df4) DescriptorSet 0 Decorate 78(g_tTex3di4) DescriptorSet 0 Decorate 85(g_tTex3du4) DescriptorSet 0 - Decorate 104(Color) Location 0 - Decorate 108(Depth) BuiltIn FragDepth + Decorate 104(@entryPointOutput.Color) Location 0 + Decorate 108(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 113(g_sSamp) DescriptorSet 0 Decorate 113(g_sSamp) Binding 0 Decorate 116(g_tTex1df4a) DescriptorSet 0 @@ -371,9 +371,9 @@ gl_FragCoord origin is upper left 94: TypePointer Function 7(fvec4) 96: TypePointer Function 6(float) 103: TypePointer Output 7(fvec4) - 104(Color): 103(ptr) Variable Output +104(@entryPointOutput.Color): 103(ptr) Variable Output 107: TypePointer Output 6(float) - 108(Depth): 107(ptr) Variable Output +108(@entryPointOutput.Depth): 107(ptr) Variable Output 111: TypeSampler 112: TypePointer UniformConstant 111 113(g_sSamp): 112(ptr) Variable UniformConstant @@ -402,10 +402,10 @@ gl_FragCoord origin is upper left Store 101(flattenTemp) 102 105: 94(ptr) AccessChain 101(flattenTemp) 23 106: 7(fvec4) Load 105 - Store 104(Color) 106 + Store 104(@entryPointOutput.Color) 106 109: 96(ptr) AccessChain 101(flattenTemp) 48 110: 6(float) Load 109 - Store 108(Depth) 110 + Store 108(@entryPointOutput.Depth) 110 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.binary.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.binary.frag.out index 587e3d5..8425f45 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.binary.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.binary.frag.out @@ -52,14 +52,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 Sequence 0:12 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:12 Color: direct index for structure ( temp 4-component vector of float) 0:12 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:12 Constant: 0:12 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int ival, uniform 4-component vector of int ival4, uniform float fval, uniform 4-component vector of float fval4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -118,117 +118,106 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 Sequence 0:12 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:12 Color: direct index for structure ( temp 4-component vector of float) 0:12 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:12 Constant: 0:12 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int ival, uniform 4-component vector of int ival4, uniform float fval, uniform 4-component vector of float fval4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 62 +// Generated by (magic number): 80003 +// Id's are bound by 57 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 59 + EntryPoint Fragment 4 "main" 54 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" Name 8 "PS_OUTPUT" MemberName 8(PS_OUTPUT) 0 "Color" Name 10 "@main(" - Name 15 "$Global" - MemberName 15($Global) 0 "ival" - MemberName 15($Global) 1 "ival4" - MemberName 15($Global) 2 "fval" - MemberName 15($Global) 3 "fval4" - Name 17 "" - Name 50 "psout" - Name 59 "Color" - MemberDecorate 15($Global) 0 Offset 0 - MemberDecorate 15($Global) 1 Offset 16 - MemberDecorate 15($Global) 2 Offset 32 - MemberDecorate 15($Global) 3 Offset 48 - Decorate 15($Global) Block - Decorate 17 DescriptorSet 0 - Decorate 59(Color) Location 0 + Name 14 "$Global" + MemberName 14($Global) 0 "ival" + MemberName 14($Global) 1 "ival4" + MemberName 14($Global) 2 "fval" + MemberName 14($Global) 3 "fval4" + Name 16 "" + Name 45 "psout" + Name 54 "@entryPointOutput.Color" + MemberDecorate 14($Global) 0 Offset 0 + MemberDecorate 14($Global) 1 Offset 16 + MemberDecorate 14($Global) 2 Offset 32 + MemberDecorate 14($Global) 3 Offset 48 + Decorate 14($Global) Block + Decorate 16 DescriptorSet 0 + Decorate 54(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 8(PS_OUTPUT): TypeStruct 7(fvec4) 9: TypeFunction 8(PS_OUTPUT) - 12: TypeBool - 13: TypeInt 32 1 - 14: TypeVector 13(int) 4 - 15($Global): TypeStruct 13(int) 14(ivec4) 6(float) 7(fvec4) - 16: TypePointer Uniform 15($Global) - 17: 16(ptr) Variable Uniform - 18: 13(int) Constant 0 - 19: TypePointer Uniform 13(int) + 12: TypeInt 32 1 + 13: TypeVector 12(int) 4 + 14($Global): TypeStruct 12(int) 13(ivec4) 6(float) 7(fvec4) + 15: TypePointer Uniform 14($Global) + 16: 15(ptr) Variable Uniform + 17: 12(int) Constant 0 + 18: TypePointer Uniform 12(int) + 21: TypeBool 22: TypeInt 32 0 23: 22(int) Constant 0 - 27: 13(int) Constant 2 - 28: TypePointer Uniform 6(float) - 49: TypePointer Function 8(PS_OUTPUT) - 51: 6(float) Constant 1065353216 - 52: 7(fvec4) ConstantComposite 51 51 51 51 - 53: TypePointer Function 7(fvec4) - 58: TypePointer Output 7(fvec4) - 59(Color): 58(ptr) Variable Output + 25: 12(int) Constant 2 + 26: TypePointer Uniform 6(float) + 44: TypePointer Function 8(PS_OUTPUT) + 46: 6(float) Constant 1065353216 + 47: 7(fvec4) ConstantComposite 46 46 46 46 + 48: TypePointer Function 7(fvec4) + 53: TypePointer Output 7(fvec4) +54(@entryPointOutput.Color): 53(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 60:8(PS_OUTPUT) FunctionCall 10(@main() - 61: 7(fvec4) CompositeExtract 60 0 - Store 59(Color) 61 + 55:8(PS_OUTPUT) FunctionCall 10(@main() + 56: 7(fvec4) CompositeExtract 55 0 + Store 54(@entryPointOutput.Color) 56 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 11: Label - 50(psout): 49(ptr) Variable Function - 20: 19(ptr) AccessChain 17 18 - 21: 13(int) Load 20 - 24: 12(bool) INotEqual 21 23 - SelectionMerge 26 None - BranchConditional 24 25 26 - 25: Label - 29: 28(ptr) AccessChain 17 27 - 30: 6(float) Load 29 - 31: 13(int) ConvertFToS 30 - 32: 12(bool) INotEqual 31 23 - Branch 26 - 26: Label - 33: 12(bool) Phi 24 11 32 25 - SelectionMerge 35 None - BranchConditional 33 34 35 - 34: Label - Branch 35 - 35: Label - 36: 19(ptr) AccessChain 17 18 - 37: 13(int) Load 36 - 38: 12(bool) INotEqual 37 23 - 39: 12(bool) LogicalNot 38 - SelectionMerge 41 None - BranchConditional 39 40 41 - 40: Label - 42: 28(ptr) AccessChain 17 27 - 43: 6(float) Load 42 - 44: 13(int) ConvertFToS 43 - 45: 12(bool) INotEqual 44 23 - Branch 41 - 41: Label - 46: 12(bool) Phi 38 35 45 40 - SelectionMerge 48 None - BranchConditional 46 47 48 - 47: Label - Branch 48 - 48: Label - 54: 53(ptr) AccessChain 50(psout) 18 - Store 54 52 - 55:8(PS_OUTPUT) Load 50(psout) - ReturnValue 55 + 45(psout): 44(ptr) Variable Function + 19: 18(ptr) AccessChain 16 17 + 20: 12(int) Load 19 + 24: 21(bool) INotEqual 20 23 + 27: 26(ptr) AccessChain 16 25 + 28: 6(float) Load 27 + 29: 12(int) ConvertFToS 28 + 30: 21(bool) INotEqual 29 23 + 31: 21(bool) LogicalAnd 24 30 + SelectionMerge 33 None + BranchConditional 31 32 33 + 32: Label + Branch 33 + 33: Label + 34: 18(ptr) AccessChain 16 17 + 35: 12(int) Load 34 + 36: 21(bool) INotEqual 35 23 + 37: 26(ptr) AccessChain 16 25 + 38: 6(float) Load 37 + 39: 12(int) ConvertFToS 38 + 40: 21(bool) INotEqual 39 23 + 41: 21(bool) LogicalOr 36 40 + SelectionMerge 43 None + BranchConditional 41 42 43 + 42: Label + Branch 43 + 43: Label + 49: 48(ptr) AccessChain 45(psout) 17 + Store 49 47 + 50:8(PS_OUTPUT) Load 45(psout) + ReturnValue 50 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.binary.vec.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.binary.vec.frag.out index a03890c..8b63fe8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.binary.vec.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.binary.vec.frag.out @@ -115,14 +115,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:10 Sequence 0:10 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:10 Color: direct index for structure ( temp 4-component vector of float) 0:10 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:10 Constant: 0:10 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -244,23 +244,23 @@ gl_FragCoord origin is upper left 0:? Sequence 0:10 Sequence 0:10 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:10 Color: direct index for structure ( temp 4-component vector of float) 0:10 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:10 Constant: 0:10 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of bool b4a, uniform 4-component vector of bool b4b, uniform bool b1a, uniform bool b1b}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 120 +// Generated by (magic number): 80003 +// Id's are bound by 115 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 117 + EntryPoint Fragment 4 "main" 112 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -279,16 +279,16 @@ gl_FragCoord origin is upper left Name 47 "r10" Name 58 "r11" Name 67 "r20" - Name 79 "r21" - Name 92 "psout" - Name 117 "Color" + Name 77 "r21" + Name 87 "psout" + Name 112 "@entryPointOutput.Color" MemberDecorate 18($Global) 0 Offset 0 MemberDecorate 18($Global) 1 Offset 16 MemberDecorate 18($Global) 2 Offset 32 MemberDecorate 18($Global) 3 Offset 36 Decorate 18($Global) Block Decorate 20 DescriptorSet 0 - Decorate 117(Color) Location 0 + Decorate 112(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -311,20 +311,20 @@ gl_FragCoord origin is upper left 34: 21(int) Constant 1 48: 21(int) Constant 2 49: TypePointer Uniform 16(int) - 73: 21(int) Constant 3 - 91: TypePointer Function 8(PS_OUTPUT) - 106: 6(float) Constant 0 - 107: 6(float) Constant 1065353216 - 108: 7(fvec4) ConstantComposite 106 106 106 106 - 109: 7(fvec4) ConstantComposite 107 107 107 107 - 111: TypePointer Function 7(fvec4) - 116: TypePointer Output 7(fvec4) - 117(Color): 116(ptr) Variable Output + 71: 21(int) Constant 3 + 86: TypePointer Function 8(PS_OUTPUT) + 101: 6(float) Constant 0 + 102: 6(float) Constant 1065353216 + 103: 7(fvec4) ConstantComposite 101 101 101 101 + 104: 7(fvec4) ConstantComposite 102 102 102 102 + 106: TypePointer Function 7(fvec4) + 111: TypePointer Output 7(fvec4) +112(@entryPointOutput.Color): 111(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 118:8(PS_OUTPUT) FunctionCall 10(@main() - 119: 7(fvec4) CompositeExtract 118 0 - Store 117(Color) 119 + 113:8(PS_OUTPUT) FunctionCall 10(@main() + 114: 7(fvec4) CompositeExtract 113 0 + Store 112(@entryPointOutput.Color) 114 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 @@ -335,8 +335,8 @@ gl_FragCoord origin is upper left 47(r10): 14(ptr) Variable Function 58(r11): 14(ptr) Variable Function 67(r20): 14(ptr) Variable Function - 79(r21): 14(ptr) Variable Function - 92(psout): 91(ptr) Variable Function + 77(r21): 14(ptr) Variable Function + 87(psout): 86(ptr) Variable Function 24: 23(ptr) AccessChain 20 22 25: 17(ivec4) Load 24 28: 13(bvec4) INotEqual 25 27 @@ -379,48 +379,37 @@ gl_FragCoord origin is upper left 68: 23(ptr) AccessChain 20 22 69: 17(ivec4) Load 68 70: 13(bvec4) INotEqual 69 27 - SelectionMerge 72 None - BranchConditional 70 71 72 - 71: Label - 74: 49(ptr) AccessChain 20 73 - 75: 16(int) Load 74 - 76: 12(bool) INotEqual 75 26 - 77: 13(bvec4) CompositeConstruct 76 76 76 76 - Branch 72 - 72: Label - 78: 12(bool) Phi 70 11 77 71 - Store 67(r20) 78 - 80: 23(ptr) AccessChain 20 22 - 81: 17(ivec4) Load 80 - 82: 13(bvec4) INotEqual 81 27 - 83: 12(bool) LogicalNot 82 - SelectionMerge 85 None - BranchConditional 83 84 85 - 84: Label - 86: 49(ptr) AccessChain 20 73 - 87: 16(int) Load 86 - 88: 12(bool) INotEqual 87 26 - 89: 13(bvec4) CompositeConstruct 88 88 88 88 - Branch 85 - 85: Label - 90: 12(bool) Phi 82 72 89 84 - Store 79(r21) 90 - 93: 13(bvec4) Load 15(r00) - 94: 13(bvec4) Load 30(r01) - 95: 13(bvec4) LogicalOr 93 94 - 96: 13(bvec4) Load 39(r02) - 97: 13(bvec4) LogicalOr 95 96 - 98: 13(bvec4) Load 47(r10) - 99: 13(bvec4) LogicalOr 97 98 - 100: 13(bvec4) Load 58(r11) - 101: 13(bvec4) LogicalOr 99 100 - 102: 13(bvec4) Load 67(r20) - 103: 13(bvec4) LogicalOr 101 102 - 104: 13(bvec4) Load 79(r21) - 105: 13(bvec4) LogicalOr 103 104 - 110: 7(fvec4) Select 105 109 108 - 112: 111(ptr) AccessChain 92(psout) 22 - Store 112 110 - 113:8(PS_OUTPUT) Load 92(psout) - ReturnValue 113 + 72: 49(ptr) AccessChain 20 71 + 73: 16(int) Load 72 + 74: 12(bool) INotEqual 73 26 + 75: 13(bvec4) CompositeConstruct 74 74 74 74 + 76: 13(bvec4) LogicalAnd 70 75 + Store 67(r20) 76 + 78: 23(ptr) AccessChain 20 22 + 79: 17(ivec4) Load 78 + 80: 13(bvec4) INotEqual 79 27 + 81: 49(ptr) AccessChain 20 71 + 82: 16(int) Load 81 + 83: 12(bool) INotEqual 82 26 + 84: 13(bvec4) CompositeConstruct 83 83 83 83 + 85: 13(bvec4) LogicalOr 80 84 + Store 77(r21) 85 + 88: 13(bvec4) Load 15(r00) + 89: 13(bvec4) Load 30(r01) + 90: 13(bvec4) LogicalOr 88 89 + 91: 13(bvec4) Load 39(r02) + 92: 13(bvec4) LogicalOr 90 91 + 93: 13(bvec4) Load 47(r10) + 94: 13(bvec4) LogicalOr 92 93 + 95: 13(bvec4) Load 58(r11) + 96: 13(bvec4) LogicalOr 94 95 + 97: 13(bvec4) Load 67(r20) + 98: 13(bvec4) LogicalOr 96 97 + 99: 13(bvec4) Load 77(r21) + 100: 13(bvec4) LogicalOr 98 99 + 105: 7(fvec4) Select 100 104 103 + 107: 106(ptr) AccessChain 87(psout) 22 + Store 107 105 + 108:8(PS_OUTPUT) Load 87(psout) + ReturnValue 108 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.unary.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.unary.frag.out index 7121d92..ab62b5d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.unary.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.logical.unary.frag.out @@ -80,14 +80,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 Sequence 0:12 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:12 Color: direct index for structure ( temp 4-component vector of float) 0:12 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:12 Constant: 0:12 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int ival, uniform 4-component vector of int ival4, uniform float fval, uniform 4-component vector of float fval4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -174,17 +174,17 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 Sequence 0:12 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:12 Color: direct index for structure ( temp 4-component vector of float) 0:12 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:12 Constant: 0:12 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int ival, uniform 4-component vector of int ival4, uniform float fval, uniform 4-component vector of float fval4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 84 Capability Shader @@ -204,14 +204,14 @@ gl_FragCoord origin is upper left MemberName 14($Global) 3 "fval4" Name 16 "" Name 72 "psout" - Name 81 "Color" + Name 81 "@entryPointOutput.Color" MemberDecorate 14($Global) 0 Offset 0 MemberDecorate 14($Global) 1 Offset 16 MemberDecorate 14($Global) 2 Offset 32 MemberDecorate 14($Global) 3 Offset 48 Decorate 14($Global) Block Decorate 16 DescriptorSet 0 - Decorate 81(Color) Location 0 + Decorate 81(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -244,12 +244,12 @@ gl_FragCoord origin is upper left 74: 7(fvec4) ConstantComposite 73 73 73 73 75: TypePointer Function 7(fvec4) 80: TypePointer Output 7(fvec4) - 81(Color): 80(ptr) Variable Output +81(@entryPointOutput.Color): 80(ptr) Variable Output 4(main): 2 Function None 3 5: Label 82:8(PS_OUTPUT) FunctionCall 10(@main() 83: 7(fvec4) CompositeExtract 82 0 - Store 81(Color) 83 + Store 81(@entryPointOutput.Color) 83 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matNx1.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matNx1.frag.out index 0360db4..c429034 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matNx1.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matNx1.frag.out @@ -65,13 +65,13 @@ gl_FragCoord origin is upper left 0:? Sequence 0:27 Sequence 0:27 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:27 color: direct index for structure ( temp 4-component vector of float) 0:27 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:27 Constant: 0:27 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -143,16 +143,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:27 Sequence 0:27 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:27 color: direct index for structure ( temp 4-component vector of float) 0:27 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:27 Constant: 0:27 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 77 Capability Shader @@ -182,8 +182,8 @@ gl_FragCoord origin is upper left Name 58 "r13" Name 59 "f1x4" Name 63 "ps_output" - Name 74 "color" - Decorate 74(color) Location 0 + Name 74 "@entryPointOutput.color" + Decorate 74(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 8: TypeFloat 32 @@ -214,12 +214,12 @@ gl_FragCoord origin is upper left 67: 9(fvec4) ConstantComposite 66 66 66 66 68: TypePointer Function 9(fvec4) 73: TypePointer Output 9(fvec4) - 74(color): 73(ptr) Variable Output +74(@entryPointOutput.color): 73(ptr) Variable Output 4(main): 2 Function None 3 5: Label 75:10(PS_OUTPUT) FunctionCall 12(@main() 76: 9(fvec4) CompositeExtract 75 0 - Store 74(color) 76 + Store 74(@entryPointOutput.color) 76 Return FunctionEnd 6(TestMatNx1(): 2 Function None 3 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.bool.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.bool.frag.out index 3f261a3..0844ae3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.bool.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.bool.frag.out @@ -105,13 +105,13 @@ gl_FragCoord origin is upper left 0:? Sequence 0:49 Sequence 0:49 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:49 color: direct index for structure ( temp 4-component vector of float) 0:49 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:49 Constant: 0:49 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -223,16 +223,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:49 Sequence 0:49 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:49 color: direct index for structure ( temp 4-component vector of float) 0:49 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:49 Constant: 0:49 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 130 Capability Shader @@ -279,8 +279,8 @@ gl_FragCoord origin is upper left Name 111 "r33" Name 112 "b4x4" Name 116 "ps_output" - Name 127 "color" - Decorate 127(color) Location 0 + Name 127 "@entryPointOutput.color" + Decorate 127(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 8: TypeFloat 32 @@ -331,12 +331,12 @@ gl_FragCoord origin is upper left 120: 9(fvec4) ConstantComposite 119 119 119 119 121: TypePointer Function 9(fvec4) 126: TypePointer Output 9(fvec4) - 127(color): 126(ptr) Variable Output +127(@entryPointOutput.color): 126(ptr) Variable Output 4(main): 2 Function None 3 5: Label 128:10(PS_OUTPUT) FunctionCall 12(@main() 129: 9(fvec4) CompositeExtract 128 0 - Store 127(color) 129 + Store 127(@entryPointOutput.color) 129 Return FunctionEnd 6(TestBoolMatTypes(): 2 Function None 3 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.frag.out index d76d55c..062b16a 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.frag.out @@ -31,7 +31,7 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 1-component vector of float f1, uniform 1X1 matrix of float fmat11, uniform 4X1 matrix of float fmat41, uniform 1X2 matrix of float fmat12, uniform 2X3 matrix of double dmat23, uniform 4X4 matrix of int int44}) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 30 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.int.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.int.frag.out index 602f068..7275ef0 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.int.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matType.int.frag.out @@ -188,13 +188,13 @@ gl_FragCoord origin is upper left 0:? Sequence 0:93 Sequence 0:93 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:93 color: direct index for structure ( temp 4-component vector of float) 0:93 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:93 Constant: 0:93 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -389,16 +389,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:93 Sequence 0:93 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:93 color: direct index for structure ( temp 4-component vector of float) 0:93 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:93 Constant: 0:93 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 232 Capability Shader @@ -478,8 +478,8 @@ gl_FragCoord origin is upper left Name 214 "r33" Name 215 "u4x4" Name 219 "ps_output" - Name 229 "color" - Decorate 229(color) Location 0 + Name 229 "@entryPointOutput.color" + Decorate 229(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 10: TypeFloat 32 @@ -566,12 +566,12 @@ gl_FragCoord origin is upper left 222: 11(fvec4) ConstantComposite 221 221 221 221 223: TypePointer Function 11(fvec4) 228: TypePointer Output 11(fvec4) - 229(color): 228(ptr) Variable Output +229(@entryPointOutput.color): 228(ptr) Variable Output 4(main): 2 Function None 3 5: Label 230:12(PS_OUTPUT) FunctionCall 14(@main() 231: 11(fvec4) CompositeExtract 230 0 - Store 229(color) 231 + Store 229(@entryPointOutput.color) 231 Return FunctionEnd 6(TestIntMatTypes(): 2 Function None 3 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matrixSwizzle.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matrixSwizzle.vert.out index 7e792b4..9bc00bb 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matrixSwizzle.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matrixSwizzle.vert.out @@ -677,7 +677,7 @@ Shader version: 500 Missing functionality: matrix swizzle // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 118 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matrixindex.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matrixindex.frag.out index 9741c5d..9a3f3f0 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matrixindex.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.matrixindex.frag.out @@ -124,14 +124,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:10 Sequence 0:10 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:10 Color: direct index for structure ( temp 4-component vector of float) 0:10 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:10 Constant: 0:10 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int idx, uniform 3X2 matrix of float um}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -262,17 +262,17 @@ gl_FragCoord origin is upper left 0:? Sequence 0:10 Sequence 0:10 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:10 Color: direct index for structure ( temp 4-component vector of float) 0:10 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:10 Constant: 0:10 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int idx, uniform 3X2 matrix of float um}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 83 Capability Shader @@ -308,14 +308,14 @@ gl_FragCoord origin is upper left Name 60 "indexable" Name 63 "r0c" Name 71 "psout" - Name 80 "Color" + Name 80 "@entryPointOutput.Color" MemberDecorate 52($Global) 0 Offset 0 MemberDecorate 52($Global) 1 RowMajor MemberDecorate 52($Global) 1 Offset 16 MemberDecorate 52($Global) 1 MatrixStride 16 Decorate 52($Global) Block Decorate 54 DescriptorSet 0 - Decorate 80(Color) Location 0 + Decorate 80(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -357,12 +357,12 @@ gl_FragCoord origin is upper left 70: TypePointer Function 8(PS_OUTPUT) 74: TypePointer Function 7(fvec4) 79: TypePointer Output 7(fvec4) - 80(Color): 79(ptr) Variable Output +80(@entryPointOutput.Color): 79(ptr) Variable Output 4(main): 2 Function None 3 5: Label 81:8(PS_OUTPUT) FunctionCall 10(@main() 82: 7(fvec4) CompositeExtract 81 0 - Store 80(Color) 82 + Store 80(@entryPointOutput.Color) 82 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.max.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.max.frag.out index 2c74d72..acade7c 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.max.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.max.frag.out @@ -66,7 +66,7 @@ gl_FragCoord origin is upper left 0:? 'input2' (layout( location=1) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 33 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.mintypes.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.mintypes.frag.out index 1cbd477..4554de5 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.mintypes.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.mintypes.frag.out @@ -37,14 +37,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:9 Sequence 0:9 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:9 Color: direct index for structure ( temp 4-component vector of float) 0:9 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:9 Constant: 0:9 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform mediump float b1a, uniform mediump float b1b}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -88,17 +88,17 @@ gl_FragCoord origin is upper left 0:? Sequence 0:9 Sequence 0:9 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:9 Color: direct index for structure ( temp 4-component vector of float) 0:9 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:9 Constant: 0:9 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform mediump float b1a, uniform mediump float b1b}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 70 Capability Shader @@ -122,7 +122,7 @@ gl_FragCoord origin is upper left Name 46 "mu16_2" Name 49 "mu16" Name 54 "psout" - Name 64 "Color" + Name 64 "@entryPointOutput.Color" Name 67 "$Global" MemberName 67($Global) 0 "b1a" MemberName 67($Global) 1 "b1b" @@ -157,7 +157,7 @@ gl_FragCoord origin is upper left Decorate 50 RelaxedPrecision Decorate 51 RelaxedPrecision Decorate 52 RelaxedPrecision - Decorate 64(Color) Location 0 + Decorate 64(@entryPointOutput.Color) Location 0 MemberDecorate 67($Global) 0 RelaxedPrecision MemberDecorate 67($Global) 0 Offset 0 MemberDecorate 67($Global) 1 RelaxedPrecision @@ -187,7 +187,7 @@ gl_FragCoord origin is upper left 57: 7(fvec4) ConstantComposite 56 56 56 56 58: TypePointer Function 7(fvec4) 63: TypePointer Output 7(fvec4) - 64(Color): 63(ptr) Variable Output +64(@entryPointOutput.Color): 63(ptr) Variable Output 67($Global): TypeStruct 6(float) 6(float) 68: TypePointer Uniform 67($Global) 69: 68(ptr) Variable Uniform @@ -195,7 +195,7 @@ gl_FragCoord origin is upper left 5: Label 65:8(PS_OUTPUT) FunctionCall 10(@main() 66: 7(fvec4) CompositeExtract 65 0 - Store 64(Color) 66 + Store 64(@entryPointOutput.Color) 66 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.multiEntry.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.multiEntry.vert.out index 8a309da..5c56f33 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.multiEntry.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.multiEntry.vert.out @@ -70,7 +70,7 @@ Shader version: 500 0:? 'Index' ( in uint VertexIndex) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 41 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.multiReturn.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.multiReturn.frag.out index 1569b42..dc978cc 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.multiReturn.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.multiReturn.frag.out @@ -48,7 +48,7 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{ temp float f, temp 3-component vector of float v, temp 3X3 matrix of float m} s}) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 42 Capability Shader @@ -72,9 +72,9 @@ gl_FragCoord origin is upper left MemberName 16(bufName) 0 "s" Name 18 "" MemberDecorate 15(S) 0 Offset 0 - MemberDecorate 15(S) 1 Offset 16 + MemberDecorate 15(S) 1 Offset 4 MemberDecorate 15(S) 2 RowMajor - MemberDecorate 15(S) 2 Offset 32 + MemberDecorate 15(S) 2 Offset 16 MemberDecorate 15(S) 2 MatrixStride 16 MemberDecorate 16(bufName) 0 Offset 0 Decorate 16(bufName) Block diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.nonstaticMemberFunction.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.nonstaticMemberFunction.frag.out index 27326c6..e8a8008 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.nonstaticMemberFunction.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.nonstaticMemberFunction.frag.out @@ -268,7 +268,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 111 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.numericsuffixes.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.numericsuffixes.frag.out index ee25cb3..a75a7e1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.numericsuffixes.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.numericsuffixes.frag.out @@ -85,13 +85,13 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 Sequence 0:5 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:5 color: direct index for structure ( temp 4-component vector of float) 0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:5 Constant: 0:5 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -183,16 +183,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 Sequence 0:5 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:5 color: direct index for structure ( temp 4-component vector of float) 0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:5 Constant: 0:5 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 54 Capability Shader @@ -219,8 +219,8 @@ gl_FragCoord origin is upper left Name 36 "r11" Name 38 "r12" Name 40 "ps_output" - Name 51 "color" - Decorate 51(color) Location 0 + Name 51 "@entryPointOutput.color" + Decorate 51(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -245,12 +245,12 @@ gl_FragCoord origin is upper left 41: 24(int) Constant 0 45: TypePointer Function 7(fvec4) 50: TypePointer Output 7(fvec4) - 51(color): 50(ptr) Variable Output +51(@entryPointOutput.color): 50(ptr) Variable Output 4(main): 2 Function None 3 5: Label 52:8(PS_OUTPUT) FunctionCall 10(@main() 53: 7(fvec4) CompositeExtract 52 0 - Store 51(color) 53 + Store 51(@entryPointOutput.color) 53 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.numthreads.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.numthreads.comp.out index fc1345f..d92b860 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.numthreads.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.numthreads.comp.out @@ -1,20 +1,20 @@ hlsl.numthreads.comp Shader version: 500 -local_size = (4, 4, 2) +local_size = (1, 4, 8) 0:? Sequence 0:4 Function Definition: main(vu3; ( temp void) 0:4 Function Parameters: 0:4 'tid' ( in 3-component vector of uint) -0:9 Function Definition: @main_aux1(vu3; ( temp void) +0:9 Function Definition: @main_aux2(vu3; ( temp void) 0:9 Function Parameters: 0:9 'tid' ( in 3-component vector of uint) -0:9 Function Definition: main_aux1( ( temp void) +0:9 Function Definition: main_aux2( ( temp void) 0:9 Function Parameters: 0:? Sequence 0:9 move second child to first child ( temp 3-component vector of uint) 0:? 'tid' ( temp 3-component vector of uint) 0:? 'tid' ( in 3-component vector of uint GlobalInvocationID) -0:9 Function Call: @main_aux1(vu3; ( temp void) +0:9 Function Call: @main_aux2(vu3; ( temp void) 0:? 'tid' ( temp 3-component vector of uint) 0:? Linker Objects 0:? 'tid' ( in 3-component vector of uint GlobalInvocationID) @@ -24,39 +24,39 @@ Linked compute stage: Shader version: 500 -local_size = (4, 4, 2) +local_size = (1, 4, 8) 0:? Sequence 0:4 Function Definition: main(vu3; ( temp void) 0:4 Function Parameters: 0:4 'tid' ( in 3-component vector of uint) -0:9 Function Definition: @main_aux1(vu3; ( temp void) +0:9 Function Definition: @main_aux2(vu3; ( temp void) 0:9 Function Parameters: 0:9 'tid' ( in 3-component vector of uint) -0:9 Function Definition: main_aux1( ( temp void) +0:9 Function Definition: main_aux2( ( temp void) 0:9 Function Parameters: 0:? Sequence 0:9 move second child to first child ( temp 3-component vector of uint) 0:? 'tid' ( temp 3-component vector of uint) 0:? 'tid' ( in 3-component vector of uint GlobalInvocationID) -0:9 Function Call: @main_aux1(vu3; ( temp void) +0:9 Function Call: @main_aux2(vu3; ( temp void) 0:? 'tid' ( temp 3-component vector of uint) 0:? Linker Objects 0:? 'tid' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 23 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint GLCompute 4 "main_aux1" 18 - ExecutionMode 4 LocalSize 4 4 2 + EntryPoint GLCompute 4 "main_aux2" 18 + ExecutionMode 4 LocalSize 1 4 8 Source HLSL 500 - Name 4 "main_aux1" + Name 4 "main_aux2" Name 11 "main(vu3;" Name 10 "tid" - Name 14 "@main_aux1(vu3;" + Name 14 "@main_aux2(vu3;" Name 13 "tid" Name 16 "tid" Name 18 "tid" @@ -70,7 +70,7 @@ local_size = (4, 4, 2) 9: TypeFunction 2 8(ptr) 17: TypePointer Input 7(ivec3) 18(tid): 17(ptr) Variable Input - 4(main_aux1): 2 Function None 3 + 4(main_aux2): 2 Function None 3 5: Label 16(tid): 8(ptr) Variable Function 20(param): 8(ptr) Variable Function @@ -78,7 +78,7 @@ local_size = (4, 4, 2) Store 16(tid) 19 21: 7(ivec3) Load 16(tid) Store 20(param) 21 - 22: 2 FunctionCall 14(@main_aux1(vu3;) 20(param) + 22: 2 FunctionCall 14(@main_aux2(vu3;) 20(param) Return FunctionEnd 11(main(vu3;): 2 Function None 9 @@ -86,7 +86,7 @@ local_size = (4, 4, 2) 12: Label Return FunctionEnd -14(@main_aux1(vu3;): 2 Function None 9 +14(@main_aux2(vu3;): 2 Function None 9 13(tid): 8(ptr) FunctionParameter 15: Label Return diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.overload.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.overload.frag.out index b390526..079166c 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.overload.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.overload.frag.out @@ -734,7 +734,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 520 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.params.default.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.params.default.frag.out index 3643c23..bc2f57d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.params.default.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.params.default.frag.out @@ -376,7 +376,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 178 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.partialInit.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.partialInit.frag.out index b326799..3b449fe 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.partialInit.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.partialInit.frag.out @@ -157,25 +157,25 @@ gl_FragCoord origin is upper left 0:18 Function Call: @PixelShaderFunction(vf4; ( temp structure{ temp int a, temp float b, temp bool c, temp 4-component vector of float v}) 0:? 'input' ( temp 4-component vector of float) 0:18 move second child to first child ( temp int) -0:? 'a' (layout( location=0) out int) +0:? '@entryPointOutput.a' (layout( location=0) out int) 0:18 a: direct index for structure ( temp int) 0:18 'flattenTemp' ( temp structure{ temp int a, temp float b, temp bool c, temp 4-component vector of float v}) 0:18 Constant: 0:18 0 (const int) 0:18 move second child to first child ( temp float) -0:? 'b' (layout( location=1) out float) +0:? '@entryPointOutput.b' (layout( location=1) out float) 0:18 b: direct index for structure ( temp float) 0:18 'flattenTemp' ( temp structure{ temp int a, temp float b, temp bool c, temp 4-component vector of float v}) 0:18 Constant: 0:18 1 (const int) 0:18 move second child to first child ( temp bool) -0:? 'c' (layout( location=2) out bool) +0:? '@entryPointOutput.c' (layout( location=2) out bool) 0:18 c: direct index for structure ( temp bool) 0:18 'flattenTemp' ( temp structure{ temp int a, temp float b, temp bool c, temp 4-component vector of float v}) 0:18 Constant: 0:18 2 (const int) 0:18 move second child to first child ( temp 4-component vector of float) -0:? 'v' (layout( location=3) out 4-component vector of float) +0:? '@entryPointOutput.v' (layout( location=3) out 4-component vector of float) 0:18 v: direct index for structure ( temp 4-component vector of float) 0:18 'flattenTemp' ( temp structure{ temp int a, temp float b, temp bool c, temp 4-component vector of float v}) 0:18 Constant: @@ -183,10 +183,10 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'gv' ( global 4-component vector of float) 0:? 'gfa' ( global 3-element array of float) -0:? 'a' (layout( location=0) out int) -0:? 'b' (layout( location=1) out float) -0:? 'c' (layout( location=2) out bool) -0:? 'v' (layout( location=3) out 4-component vector of float) +0:? '@entryPointOutput.a' (layout( location=0) out int) +0:? '@entryPointOutput.b' (layout( location=1) out float) +0:? '@entryPointOutput.c' (layout( location=2) out bool) +0:? '@entryPointOutput.v' (layout( location=3) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) 0:? 'cgf2a' ( const 3-element array of 2-component vector of float) 0:? 0.000000 @@ -357,25 +357,25 @@ gl_FragCoord origin is upper left 0:18 Function Call: @PixelShaderFunction(vf4; ( temp structure{ temp int a, temp float b, temp bool c, temp 4-component vector of float v}) 0:? 'input' ( temp 4-component vector of float) 0:18 move second child to first child ( temp int) -0:? 'a' (layout( location=0) out int) +0:? '@entryPointOutput.a' (layout( location=0) out int) 0:18 a: direct index for structure ( temp int) 0:18 'flattenTemp' ( temp structure{ temp int a, temp float b, temp bool c, temp 4-component vector of float v}) 0:18 Constant: 0:18 0 (const int) 0:18 move second child to first child ( temp float) -0:? 'b' (layout( location=1) out float) +0:? '@entryPointOutput.b' (layout( location=1) out float) 0:18 b: direct index for structure ( temp float) 0:18 'flattenTemp' ( temp structure{ temp int a, temp float b, temp bool c, temp 4-component vector of float v}) 0:18 Constant: 0:18 1 (const int) 0:18 move second child to first child ( temp bool) -0:? 'c' (layout( location=2) out bool) +0:? '@entryPointOutput.c' (layout( location=2) out bool) 0:18 c: direct index for structure ( temp bool) 0:18 'flattenTemp' ( temp structure{ temp int a, temp float b, temp bool c, temp 4-component vector of float v}) 0:18 Constant: 0:18 2 (const int) 0:18 move second child to first child ( temp 4-component vector of float) -0:? 'v' (layout( location=3) out 4-component vector of float) +0:? '@entryPointOutput.v' (layout( location=3) out 4-component vector of float) 0:18 v: direct index for structure ( temp 4-component vector of float) 0:18 'flattenTemp' ( temp structure{ temp int a, temp float b, temp bool c, temp 4-component vector of float v}) 0:18 Constant: @@ -383,10 +383,10 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'gv' ( global 4-component vector of float) 0:? 'gfa' ( global 3-element array of float) -0:? 'a' (layout( location=0) out int) -0:? 'b' (layout( location=1) out float) -0:? 'c' (layout( location=2) out bool) -0:? 'v' (layout( location=3) out 4-component vector of float) +0:? '@entryPointOutput.a' (layout( location=0) out int) +0:? '@entryPointOutput.b' (layout( location=1) out float) +0:? '@entryPointOutput.c' (layout( location=2) out bool) +0:? '@entryPointOutput.v' (layout( location=3) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) 0:? 'cgf2a' ( const 3-element array of 2-component vector of float) 0:? 0.000000 @@ -399,7 +399,7 @@ gl_FragCoord origin is upper left 0:? 0 (const int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 104 Capability Shader @@ -433,15 +433,15 @@ gl_FragCoord origin is upper left Name 80 "input" Name 82 "flattenTemp" Name 83 "param" - Name 87 "a" - Name 91 "b" - Name 95 "c" - Name 99 "v" + Name 87 "@entryPointOutput.a" + Name 91 "@entryPointOutput.b" + Name 95 "@entryPointOutput.c" + Name 99 "@entryPointOutput.v" Decorate 80(input) Location 0 - Decorate 87(a) Location 0 - Decorate 91(b) Location 1 - Decorate 95(c) Location 2 - Decorate 99(v) Location 3 + Decorate 87(@entryPointOutput.a) Location 0 + Decorate 91(@entryPointOutput.b) Location 1 + Decorate 95(@entryPointOutput.c) Location 2 + Decorate 99(@entryPointOutput.v) Location 3 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -492,13 +492,13 @@ gl_FragCoord origin is upper left 79: TypePointer Input 7(fvec4) 80(input): 79(ptr) Variable Input 86: TypePointer Output 9(int) - 87(a): 86(ptr) Variable Output +87(@entryPointOutput.a): 86(ptr) Variable Output 90: TypePointer Output 6(float) - 91(b): 90(ptr) Variable Output +91(@entryPointOutput.b): 90(ptr) Variable Output 94: TypePointer Output 10(bool) - 95(c): 94(ptr) Variable Output +95(@entryPointOutput.c): 94(ptr) Variable Output 98: TypePointer Output 7(fvec4) - 99(v): 98(ptr) Variable Output +99(@entryPointOutput.v): 98(ptr) Variable Output 102: TypeArray 57(fvec2) 22 103: 102 ConstantComposite 62 62 62 4(PixelShaderFunction): 2 Function None 3 @@ -516,16 +516,16 @@ gl_FragCoord origin is upper left Store 82(flattenTemp) 85 88: 64(ptr) AccessChain 82(flattenTemp) 42 89: 9(int) Load 88 - Store 87(a) 89 + Store 87(@entryPointOutput.a) 89 92: 68(ptr) AccessChain 82(flattenTemp) 66 93: 6(float) Load 92 - Store 91(b) 93 + Store 91(@entryPointOutput.b) 93 96: 45(ptr) AccessChain 82(flattenTemp) 35 97: 10(bool) Load 96 - Store 95(c) 97 + Store 95(@entryPointOutput.c) 97 100: 8(ptr) AccessChain 82(flattenTemp) 29 101: 7(fvec4) Load 100 - Store 99(v) 101 + Store 99(@entryPointOutput.v) 101 Return FunctionEnd 14(@PixelShaderFunction(vf4;): 11(outs) Function None 12 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.pp.line.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.pp.line.frag.out index 727fdd0..01caf96 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.pp.line.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.pp.line.frag.out @@ -41,20 +41,20 @@ gl_FragCoord origin is upper left 0:4 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:4 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:4 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:4 Color: direct index for structure ( temp 4-component vector of float) 0:4 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:4 Constant: 0:4 0 (const int) 0:4 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:4 Depth: direct index for structure ( temp float) 0:4 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:4 Constant: 0:4 1 (const int) 0:? Linker Objects -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -102,23 +102,23 @@ gl_FragCoord origin is upper left 0:4 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:4 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:4 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:4 Color: direct index for structure ( temp 4-component vector of float) 0:4 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:4 Constant: 0:4 0 (const int) 0:4 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:4 Depth: direct index for structure ( temp float) 0:4 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:4 Constant: 0:4 1 (const int) 0:? Linker Objects -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 42 Capability Shader @@ -135,10 +135,10 @@ gl_FragCoord origin is upper left Name 14 "thisLineIs" Name 17 "psout" Name 32 "flattenTemp" - Name 35 "Color" - Name 39 "Depth" - Decorate 35(Color) Location 0 - Decorate 39(Depth) BuiltIn FragDepth + Name 35 "@entryPointOutput.Color" + Name 39 "@entryPointOutput.Depth" + Decorate 35(@entryPointOutput.Color) Location 0 + Decorate 39(@entryPointOutput.Depth) BuiltIn FragDepth 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -156,9 +156,9 @@ gl_FragCoord origin is upper left 26: 12(int) Constant 1 27: TypePointer Function 6(float) 34: TypePointer Output 7(fvec4) - 35(Color): 34(ptr) Variable Output +35(@entryPointOutput.Color): 34(ptr) Variable Output 38: TypePointer Output 6(float) - 39(Depth): 38(ptr) Variable Output +39(@entryPointOutput.Depth): 38(ptr) Variable Output 4(main): 2 Function None 3 5: Label 32(flattenTemp): 16(ptr) Variable Function @@ -166,10 +166,10 @@ gl_FragCoord origin is upper left Store 32(flattenTemp) 33 36: 24(ptr) AccessChain 32(flattenTemp) 18 37: 7(fvec4) Load 36 - Store 35(Color) 37 + Store 35(@entryPointOutput.Color) 37 40: 27(ptr) AccessChain 32(flattenTemp) 26 41: 6(float) Load 40 - Store 39(Depth) 41 + Store 39(@entryPointOutput.Depth) 41 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precedence.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precedence.frag.out index a46c6fb..f227e8b 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precedence.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precedence.frag.out @@ -148,7 +148,7 @@ gl_FragCoord origin is upper left 0:? 'a4' (layout( location=3) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 65 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precedence2.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precedence2.frag.out index 31e76c3..7a04408 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precedence2.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precedence2.frag.out @@ -30,16 +30,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:7 move second child to first child ( temp int) 0:? 'a1' ( temp int) -0:? 'a1' (layout( location=0) in int) +0:? 'a1' (layout( location=0) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a2' ( temp int) -0:? 'a2' (layout( location=1) in int) +0:? 'a2' (layout( location=1) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a3' ( temp int) -0:? 'a3' (layout( location=2) in int) +0:? 'a3' (layout( location=2) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a4' ( temp int) -0:? 'a4' (layout( location=3) in int) +0:? 'a4' (layout( location=3) flat in int) 0:7 move second child to first child ( temp int) 0:? '@entryPointOutput' (layout( location=0) out int) 0:7 Function Call: @PixelShaderFunction(i1;i1;i1;i1; ( temp int) @@ -49,10 +49,10 @@ gl_FragCoord origin is upper left 0:? 'a4' ( temp int) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out int) -0:? 'a1' (layout( location=0) in int) -0:? 'a2' (layout( location=1) in int) -0:? 'a3' (layout( location=2) in int) -0:? 'a4' (layout( location=3) in int) +0:? 'a1' (layout( location=0) flat in int) +0:? 'a2' (layout( location=1) flat in int) +0:? 'a3' (layout( location=2) flat in int) +0:? 'a4' (layout( location=3) flat in int) Linked fragment stage: @@ -89,16 +89,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:7 move second child to first child ( temp int) 0:? 'a1' ( temp int) -0:? 'a1' (layout( location=0) in int) +0:? 'a1' (layout( location=0) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a2' ( temp int) -0:? 'a2' (layout( location=1) in int) +0:? 'a2' (layout( location=1) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a3' ( temp int) -0:? 'a3' (layout( location=2) in int) +0:? 'a3' (layout( location=2) flat in int) 0:7 move second child to first child ( temp int) 0:? 'a4' ( temp int) -0:? 'a4' (layout( location=3) in int) +0:? 'a4' (layout( location=3) flat in int) 0:7 move second child to first child ( temp int) 0:? '@entryPointOutput' (layout( location=0) out int) 0:7 Function Call: @PixelShaderFunction(i1;i1;i1;i1; ( temp int) @@ -108,13 +108,13 @@ gl_FragCoord origin is upper left 0:? 'a4' ( temp int) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out int) -0:? 'a1' (layout( location=0) in int) -0:? 'a2' (layout( location=1) in int) -0:? 'a3' (layout( location=2) in int) -0:? 'a4' (layout( location=3) in int) +0:? 'a1' (layout( location=0) flat in int) +0:? 'a2' (layout( location=1) flat in int) +0:? 'a3' (layout( location=2) flat in int) +0:? 'a4' (layout( location=3) flat in int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 56 Capability Shader @@ -142,9 +142,13 @@ gl_FragCoord origin is upper left Name 49 "param" Name 51 "param" Name 53 "param" + Decorate 34(a1) Flat Decorate 34(a1) Location 0 + Decorate 37(a2) Flat Decorate 37(a2) Location 1 + Decorate 40(a3) Flat Decorate 40(a3) Location 2 + Decorate 43(a4) Flat Decorate 43(a4) Location 3 Decorate 46(@entryPointOutput) Location 0 2: TypeVoid diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precise.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precise.frag.out index 442f6c2..956fc0f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precise.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.precise.frag.out @@ -26,14 +26,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:9 Sequence 0:9 move second child to first child ( noContraction temp 4-component vector of float) -0:? 'color' (layout( location=0) noContraction out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) noContraction out 4-component vector of float) 0:9 color: direct index for structure ( noContraction temp 4-component vector of float) 0:9 Function Call: @main( ( temp structure{ noContraction temp 4-component vector of float color}) 0:9 Constant: 0:9 0 (const int) 0:? Linker Objects 0:? 'precisefloat' ( noContraction global float) -0:? 'color' (layout( location=0) noContraction out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) noContraction out 4-component vector of float) Linked fragment stage: @@ -66,17 +66,17 @@ gl_FragCoord origin is upper left 0:? Sequence 0:9 Sequence 0:9 move second child to first child ( noContraction temp 4-component vector of float) -0:? 'color' (layout( location=0) noContraction out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) noContraction out 4-component vector of float) 0:9 color: direct index for structure ( noContraction temp 4-component vector of float) 0:9 Function Call: @main( ( temp structure{ noContraction temp 4-component vector of float color}) 0:9 Constant: 0:9 0 (const int) 0:? Linker Objects 0:? 'precisefloat' ( noContraction global float) -0:? 'color' (layout( location=0) noContraction out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) noContraction out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 37 Capability Shader @@ -93,9 +93,9 @@ gl_FragCoord origin is upper left MemberName 16(PS_OUTPUT) 0 "color" Name 18 "@main(" Name 21 "ps_output" - Name 32 "color" + Name 32 "@entryPointOutput.color" Name 36 "precisefloat" - Decorate 32(color) Location 0 + Decorate 32(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -113,14 +113,14 @@ gl_FragCoord origin is upper left 25: 15(fvec4) ConstantComposite 24 24 24 24 26: TypePointer Function 15(fvec4) 31: TypePointer Output 15(fvec4) - 32(color): 31(ptr) Variable Output +32(@entryPointOutput.color): 31(ptr) Variable Output 35: TypePointer Private 6(float) 36(precisefloat): 35(ptr) Variable Private 4(main): 2 Function None 3 5: Label 33:16(PS_OUTPUT) FunctionCall 18(@main() 34: 15(fvec4) CompositeExtract 33 0 - Store 32(color) 34 + Store 32(@entryPointOutput.color) 34 Return FunctionEnd 13(MyFunction(f1;vf3;): 2 Function None 10 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.atomic.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.atomic.frag.out index b31ac61..2be0226 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.atomic.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.atomic.frag.out @@ -64,11 +64,11 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 36 Capability Shader - Capability SampledBuffer + Capability ImageBuffer 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 34 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.binary.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.binary.frag.out index 09c1f93..81ac024 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.binary.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.binary.frag.out @@ -74,14 +74,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:14 Sequence 0:14 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:14 Color: direct index for structure ( temp 4-component vector of float) 0:14 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:14 Constant: 0:14 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform bool bval, uniform 4-component vector of bool bval4, uniform int ival, uniform 4-component vector of int ival4, uniform float fval, uniform 4-component vector of float fval4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -162,17 +162,17 @@ gl_FragCoord origin is upper left 0:? Sequence 0:14 Sequence 0:14 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:14 Color: direct index for structure ( temp 4-component vector of float) 0:14 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:14 Constant: 0:14 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform bool bval, uniform 4-component vector of bool bval4, uniform int ival, uniform 4-component vector of int ival4, uniform float fval, uniform 4-component vector of float fval4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 83 Capability Shader @@ -195,7 +195,7 @@ gl_FragCoord origin is upper left Name 18 "" Name 66 "l_int" Name 73 "psout" - Name 80 "Color" + Name 80 "@entryPointOutput.Color" MemberDecorate 16($Global) 0 Offset 0 MemberDecorate 16($Global) 1 Offset 16 MemberDecorate 16($Global) 2 Offset 32 @@ -204,7 +204,7 @@ gl_FragCoord origin is upper left MemberDecorate 16($Global) 5 Offset 80 Decorate 16($Global) Block Decorate 18 DescriptorSet 0 - Decorate 80(Color) Location 0 + Decorate 80(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -242,12 +242,12 @@ gl_FragCoord origin is upper left 72: TypePointer Function 8(PS_OUTPUT) 74: TypePointer Function 7(fvec4) 79: TypePointer Output 7(fvec4) - 80(Color): 79(ptr) Variable Output +80(@entryPointOutput.Color): 79(ptr) Variable Output 4(main): 2 Function None 3 5: Label 81:8(PS_OUTPUT) FunctionCall 10(@main() 82: 7(fvec4) CompositeExtract 81 0 - Store 80(Color) 82 + Store 80(@entryPointOutput.Color) 82 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.vec1.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.vec1.frag.out index b0536bd..c971ff3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.vec1.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promote.vec1.frag.out @@ -80,7 +80,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 31 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promotions.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promotions.frag.out index e1953e0..5b529e9 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promotions.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.promotions.frag.out @@ -779,14 +779,14 @@ gl_FragCoord origin is upper left 0:? Sequence 0:52 Sequence 0:52 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:52 Color: direct index for structure ( temp 4-component vector of float) 0:52 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:52 Constant: 0:52 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 3-component vector of int i3, uniform 3-component vector of bool b3, uniform 3-component vector of float f3, uniform 3-component vector of uint u3, uniform 3-component vector of double d3, uniform int is, uniform bool bs, uniform float fs, uniform uint us, uniform double ds}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -1572,17 +1572,17 @@ gl_FragCoord origin is upper left 0:? Sequence 0:52 Sequence 0:52 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:52 Color: direct index for structure ( temp 4-component vector of float) 0:52 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:52 Constant: 0:52 0 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 3-component vector of int i3, uniform 3-component vector of bool b3, uniform 3-component vector of float f3, uniform 3-component vector of uint u3, uniform 3-component vector of double d3, uniform int is, uniform bool bs, uniform float fs, uniform uint us, uniform double ds}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 596 Capability Shader @@ -1682,7 +1682,7 @@ gl_FragCoord origin is upper left Name 576 "c2" Name 578 "outval" Name 586 "psout" - Name 593 "Color" + Name 593 "@entryPointOutput.Color" MemberDecorate 111($Global) 0 Offset 0 MemberDecorate 111($Global) 1 Offset 16 MemberDecorate 111($Global) 2 Offset 32 @@ -1695,7 +1695,7 @@ gl_FragCoord origin is upper left MemberDecorate 111($Global) 9 Offset 104 Decorate 111($Global) Block Decorate 113 DescriptorSet 0 - Decorate 593(Color) Location 0 + Decorate 593(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -1766,12 +1766,12 @@ gl_FragCoord origin is upper left 579: 6(float) Constant 1080452710 585: TypePointer Function 107(PS_OUTPUT) 592: TypePointer Output 106(fvec4) - 593(Color): 592(ptr) Variable Output +593(@entryPointOutput.Color): 592(ptr) Variable Output 4(main): 2 Function None 3 5: Label 594:107(PS_OUTPUT) FunctionCall 109(@main() 595: 106(fvec4) CompositeExtract 594 0 - Store 593(Color) 595 + Store 593(@entryPointOutput.Color) 595 Return FunctionEnd 11(Fn_F3(vf3;): 2 Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.reflection.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.reflection.vert.out index 8ecfde6..5f7a033 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.reflection.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.reflection.vert.out @@ -2,26 +2,19 @@ hlsl.reflection.vert Uniform reflection: anonMember3: offset 80, type 8b52, size 1, index 0, binding -1 s.a: offset 0, type 1404, size 1, index 1, binding -1 -ablock.scalar: offset 12, type 1404, size 1, index 2, binding -1 m23: offset 16, type 8b67, size 1, index 0, binding -1 scalarAfterm23: offset 48, type 1404, size 1, index 0, binding -1 -c_m23: offset 16, type 8b67, size 1, index 3, binding -1 -c_scalarAfterm23: offset 48, type 1404, size 1, index 3, binding -1 +c_m23: offset 16, type 8b67, size 1, index 2, binding -1 +c_scalarAfterm23: offset 48, type 1404, size 1, index 2, binding -1 scalarBeforeArray: offset 96, type 1404, size 1, index 0, binding -1 floatArray: offset 112, type 1406, size 5, index 0, binding -1 scalarAfterArray: offset 192, type 1404, size 1, index 0, binding -1 -ablock.memfloat2: offset 48, type 8b50, size 1, index 2, binding -1 -ablock.memf1: offset 56, type 1406, size 1, index 2, binding -1 -ablock.memf2: offset 60, type 8b56, size 1, index 2, binding -1 -ablock.memf3: offset 64, type 1404, size 1, index 2, binding -1 -ablock.memfloat2a: offset 72, type 8b50, size 1, index 2, binding -1 -ablock.m22: offset 80, type 8b5a, size 7, index 2, binding -1 +m22: offset 208, type 8b5a, size 9, index 0, binding -1 dm22: offset 32, type 8b5a, size 4, index 1, binding -1 -m22: offset 208, type 8b5a, size 3, index 0, binding -1 -nest.foo.n1.a: offset 0, type 1406, size 1, index 4, binding -1 -nest.foo.n2.b: offset 16, type 1406, size 1, index 4, binding -1 -nest.foo.n2.c: offset 20, type 1406, size 1, index 4, binding -1 -nest.foo.n2.d: offset 24, type 1406, size 1, index 4, binding -1 +foo.n1.a: offset 0, type 1406, size 1, index 3, binding -1 +foo.n2.b: offset 16, type 1406, size 1, index 3, binding -1 +foo.n2.c: offset 20, type 1406, size 1, index 3, binding -1 +foo.n2.d: offset 24, type 1406, size 1, index 3, binding -1 deepA.d2.d1[2].va: offset 376, type 8b50, size 2, index 1, binding -1 deepB.d2.d1.va: offset 984, type 8b50, size 2, index 1, binding -1 deepB.d2.d1[0].va: offset 984, type 8b50, size 2, index 1, binding -1 @@ -61,19 +54,18 @@ deepD[1].d2.d1[2].b: offset 2480, type 8b56, size 1, index 1, binding -1 deepD[1].d2.d1[3].va: offset 2480, type 8b50, size 3, index 1, binding -1 deepD[1].d2.d1[3].b: offset 2480, type 8b56, size 1, index 1, binding -1 deepD[1].v3: offset 2480, type 8b54, size 1, index 1, binding -1 -arrBl.foo: offset 0, type 1406, size 1, index 5, binding -1 -arrBl2.foo: offset 0, type 1406, size 1, index 6, binding -1 +foo1: offset 0, type 1406, size 1, index 4, binding -1 +foo2: offset 0, type 1406, size 1, index 5, binding -1 anonMember1: offset 0, type 8b51, size 1, index 0, binding -1 uf1: offset 16, type 1406, size 1, index 1, binding -1 Uniform block reflection: nameless: offset -1, type ffffffff, size 496, index -1, binding -1 $Global: offset -1, type ffffffff, size 3088, index -1, binding -1 -ablock: offset -1, type ffffffff, size 304, index -1, binding -1 c_nameless: offset -1, type ffffffff, size 96, index -1, binding -1 -nest: offset -1, type ffffffff, size 32, index -1, binding -1 -arrBl: offset -1, type ffffffff, size 4, index -1, binding -1 -arrBl2: offset -1, type ffffffff, size 4, index -1, binding -1 +nested: offset -1, type ffffffff, size 32, index -1, binding -1 +abl: offset -1, type ffffffff, size 4, index -1, binding -1 +abl2: offset -1, type ffffffff, size 4, index -1, binding -1 Vertex attribute reflection: attributeFloat: offset 0, type 1406, size 0, index 0, binding -1 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.atomics.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.atomics.frag.out index 08369c0..1311d23 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.atomics.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.atomics.frag.out @@ -1942,7 +1942,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:45 Sequence 0:45 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:45 Color: direct index for structure ( temp 4-component vector of float) 0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:45 Constant: @@ -1968,7 +1968,7 @@ gl_FragCoord origin is upper left 0:? 'g_tBuffI' (layout( r32i) uniform iimageBuffer) 0:? 'g_tBuffU' (layout( r32ui) uniform uimageBuffer) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform uint u1, uniform 2-component vector of uint u2, uniform 3-component vector of uint u3, uniform uint u1b, uniform uint u1c, uniform int i1, uniform 2-component vector of int i2, uniform 3-component vector of int i3, uniform int i1b, uniform int i1c}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -3917,7 +3917,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:45 Sequence 0:45 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:45 Color: direct index for structure ( temp 4-component vector of float) 0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:45 Constant: @@ -3943,15 +3943,15 @@ gl_FragCoord origin is upper left 0:? 'g_tBuffI' (layout( r32i) uniform iimageBuffer) 0:? 'g_tBuffU' (layout( r32ui) uniform uimageBuffer) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform uint u1, uniform 2-component vector of uint u2, uniform 3-component vector of uint u3, uniform uint u1b, uniform uint u1c, uniform int i1, uniform 2-component vector of int i2, uniform 3-component vector of int i3, uniform int i1b, uniform int i1c}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 1147 Capability Shader - Capability Sampled1D - Capability SampledBuffer + Capability Image1D + Capability ImageBuffer 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 1117 @@ -3986,7 +3986,7 @@ gl_FragCoord origin is upper left Name 931 "g_tBuffI" Name 1020 "g_tBuffU" Name 1108 "psout" - Name 1117 "Color" + Name 1117 "@entryPointOutput.Color" Name 1122 "g_sSamp" Name 1125 "g_tTex1df1" Name 1128 "g_tTex2df1" @@ -4018,7 +4018,7 @@ gl_FragCoord origin is upper left Decorate 670(g_tTex1du1a) DescriptorSet 0 Decorate 931(g_tBuffI) DescriptorSet 0 Decorate 1020(g_tBuffU) DescriptorSet 0 - Decorate 1117(Color) Location 0 + Decorate 1117(@entryPointOutput.Color) Location 0 Decorate 1122(g_sSamp) DescriptorSet 0 Decorate 1125(g_tTex1df1) DescriptorSet 0 Decorate 1128(g_tTex2df1) DescriptorSet 0 @@ -4100,7 +4100,7 @@ gl_FragCoord origin is upper left 1110: 7(fvec4) ConstantComposite 1109 1109 1109 1109 1111: TypePointer Function 7(fvec4) 1116: TypePointer Output 7(fvec4) - 1117(Color): 1116(ptr) Variable Output +1117(@entryPointOutput.Color): 1116(ptr) Variable Output 1120: TypeSampler 1121: TypePointer UniformConstant 1120 1122(g_sSamp): 1121(ptr) Variable UniformConstant @@ -4132,7 +4132,7 @@ gl_FragCoord origin is upper left 5: Label 1118:8(PS_OUTPUT) FunctionCall 10(@main() 1119: 7(fvec4) CompositeExtract 1118 0 - Store 1117(Color) 1119 + Store 1117(@entryPointOutput.Color) 1119 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.bracket.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.bracket.frag.out index 55264de..e4640a5 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.bracket.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.bracket.frag.out @@ -844,7 +844,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:53 Sequence 0:53 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:53 Color: direct index for structure ( temp 4-component vector of float) 0:53 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:53 Constant: @@ -867,7 +867,7 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray) 0:? 'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4, uniform 4-component vector of float uf4, uniform 4-component vector of int ui4, uniform 4-component vector of uint uu4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -1718,7 +1718,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:53 Sequence 0:53 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:53 Color: direct index for structure ( temp 4-component vector of float) 0:53 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:53 Constant: @@ -1741,14 +1741,14 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di4a' (layout( rgba32i) uniform iimage2DArray) 0:? 'g_tTex2du4a' (layout( rgba32ui) uniform uimage2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4, uniform 4-component vector of float uf4, uniform 4-component vector of int ui4, uniform 4-component vector of uint uu4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 607 Capability Shader - Capability Sampled1D + Capability Image1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 583 @@ -1872,7 +1872,7 @@ gl_FragCoord origin is upper left Name 561 "storeTempPost" Name 569 "storeTemp" Name 576 "psout" - Name 583 "Color" + Name 583 "@entryPointOutput.Color" Name 588 "g_sSamp" Name 591 "g_tTex1df4a" Name 594 "g_tTex1di4a" @@ -1903,7 +1903,7 @@ gl_FragCoord origin is upper left Decorate 131(g_tTex3df4) DescriptorSet 0 Decorate 141(g_tTex3di4) DescriptorSet 0 Decorate 149(g_tTex3du4) DescriptorSet 0 - Decorate 583(Color) Location 0 + Decorate 583(@entryPointOutput.Color) Location 0 Decorate 588(g_sSamp) DescriptorSet 0 Decorate 588(g_sSamp) Binding 0 Decorate 591(g_tTex1df4a) DescriptorSet 0 @@ -2005,7 +2005,7 @@ gl_FragCoord origin is upper left 575: TypePointer Function 42(PS_OUTPUT) 577: 21(fvec4) ConstantComposite 408 408 408 408 582: TypePointer Output 21(fvec4) - 583(Color): 582(ptr) Variable Output +583(@entryPointOutput.Color): 582(ptr) Variable Output 586: TypeSampler 587: TypePointer UniformConstant 586 588(g_sSamp): 587(ptr) Variable UniformConstant @@ -2031,7 +2031,7 @@ gl_FragCoord origin is upper left 5: Label 584:42(PS_OUTPUT) FunctionCall 44(@main() 585: 21(fvec4) CompositeExtract 584 0 - Store 583(Color) 585 + Store 583(@entryPointOutput.Color) 585 Return FunctionEnd 11(Fn1(vi4;): 7(ivec4) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.register.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.register.frag.out index 525c6aa..f563c32 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.register.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.register.frag.out @@ -36,7 +36,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:11 Sequence 0:11 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:11 Color: direct index for structure ( temp 4-component vector of float) 0:11 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:11 Constant: @@ -44,7 +44,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'g_tTex1df1' (layout( binding=2 r32f) uniform image1D) 0:? 'g_tBuf1du1' (layout( binding=3 r32ui) uniform uimageBuffer) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -87,7 +87,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:11 Sequence 0:11 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:11 Color: direct index for structure ( temp 4-component vector of float) 0:11 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:11 Constant: @@ -95,15 +95,15 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'g_tTex1df1' (layout( binding=2 r32f) uniform image1D) 0:? 'g_tBuf1du1' (layout( binding=3 r32ui) uniform uimageBuffer) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 42 Capability Shader - Capability Sampled1D - Capability SampledBuffer + Capability Image1D + Capability ImageBuffer 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 39 @@ -118,12 +118,12 @@ gl_FragCoord origin is upper left Name 23 "r01" Name 26 "g_tBuf1du1" Name 30 "psout" - Name 39 "Color" + Name 39 "@entryPointOutput.Color" Decorate 16(g_tTex1df1) DescriptorSet 0 Decorate 16(g_tTex1df1) Binding 2 Decorate 26(g_tBuf1du1) DescriptorSet 0 Decorate 26(g_tBuf1du1) Binding 3 - Decorate 39(Color) Location 0 + Decorate 39(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -146,12 +146,12 @@ gl_FragCoord origin is upper left 32: 7(fvec4) ConstantComposite 31 31 31 31 33: TypePointer Function 7(fvec4) 38: TypePointer Output 7(fvec4) - 39(Color): 38(ptr) Variable Output +39(@entryPointOutput.Color): 38(ptr) Variable Output 4(main): 2 Function None 3 5: Label 40:8(PS_OUTPUT) FunctionCall 10(@main() 41: 7(fvec4) CompositeExtract 40 0 - Store 39(Color) 41 + Store 39(@entryPointOutput.Color) 41 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.scalar.bracket.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.scalar.bracket.frag.out index e0e88d1..8e7ab9d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.scalar.bracket.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.scalar.bracket.frag.out @@ -817,7 +817,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:53 Sequence 0:53 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:53 Color: direct index for structure ( temp 4-component vector of float) 0:53 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:53 Constant: @@ -840,7 +840,7 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di1a' (layout( r32i) uniform iimage2DArray) 0:? 'g_tTex2du1a' (layout( r32ui) uniform uimage2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4, uniform float uf1, uniform int ui1, uniform uint uu1}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -1664,7 +1664,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:53 Sequence 0:53 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:53 Color: direct index for structure ( temp 4-component vector of float) 0:53 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:53 Constant: @@ -1687,14 +1687,14 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di1a' (layout( r32i) uniform iimage2DArray) 0:? 'g_tTex2du1a' (layout( r32ui) uniform uimage2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4, uniform float uf1, uniform int ui1, uniform uint uu1}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 571 Capability Shader - Capability Sampled1D + Capability Image1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 547 @@ -1818,7 +1818,7 @@ gl_FragCoord origin is upper left Name 524 "storeTempPost" Name 531 "storeTemp" Name 539 "psout" - Name 547 "Color" + Name 547 "@entryPointOutput.Color" Name 552 "g_sSamp" Name 555 "g_tTex1df1a" Name 558 "g_tTex1di1a" @@ -1848,7 +1848,7 @@ gl_FragCoord origin is upper left Decorate 125(g_tTex3df1) DescriptorSet 0 Decorate 135(g_tTex3di1) DescriptorSet 0 Decorate 143(g_tTex3du1) DescriptorSet 0 - Decorate 547(Color) Location 0 + Decorate 547(@entryPointOutput.Color) Location 0 Decorate 552(g_sSamp) DescriptorSet 0 Decorate 552(g_sSamp) Binding 0 Decorate 555(g_tTex1df1a) DescriptorSet 0 @@ -1934,7 +1934,7 @@ gl_FragCoord origin is upper left 540: 39(fvec4) ConstantComposite 382 382 382 382 541: TypePointer Function 39(fvec4) 546: TypePointer Output 39(fvec4) - 547(Color): 546(ptr) Variable Output +547(@entryPointOutput.Color): 546(ptr) Variable Output 550: TypeSampler 551: TypePointer UniformConstant 550 552(g_sSamp): 551(ptr) Variable UniformConstant @@ -1960,7 +1960,7 @@ gl_FragCoord origin is upper left 5: Label 548:40(PS_OUTPUT) FunctionCall 42(@main() 549: 39(fvec4) CompositeExtract 548 0 - Store 547(Color) 549 + Store 547(@entryPointOutput.Color) 549 Return FunctionEnd 10(Fn1(i1;): 6(int) Function None 8 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.swizzle.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.swizzle.frag.out index 60a6b99..3f6b163 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.swizzle.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.swizzle.frag.out @@ -202,11 +202,11 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 63 Capability Shader - Capability SampledBuffer + Capability ImageBuffer 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 58 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.vec2.bracket.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.vec2.bracket.frag.out index afcc52a..6100899 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.vec2.bracket.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.rw.vec2.bracket.frag.out @@ -826,7 +826,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:53 Sequence 0:53 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:53 Color: direct index for structure ( temp 4-component vector of float) 0:53 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:53 Constant: @@ -849,7 +849,7 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di2a' (layout( rg32i) uniform iimage2DArray) 0:? 'g_tTex2du2a' (layout( rg32ui) uniform uimage2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4, uniform 2-component vector of float uf2, uniform 2-component vector of int ui2, uniform 2-component vector of uint uu2}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -1682,7 +1682,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:53 Sequence 0:53 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:53 Color: direct index for structure ( temp 4-component vector of float) 0:53 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:53 Constant: @@ -1705,14 +1705,14 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di2a' (layout( rg32i) uniform iimage2DArray) 0:? 'g_tTex2du2a' (layout( rg32ui) uniform uimage2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4, uniform 2-component vector of float uf2, uniform 2-component vector of int ui2, uniform 2-component vector of uint uu2}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 605 Capability Shader - Capability Sampled1D + Capability Image1D Capability StorageImageExtendedFormats 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 @@ -1837,7 +1837,7 @@ gl_FragCoord origin is upper left Name 557 "storeTempPost" Name 565 "storeTemp" Name 573 "psout" - Name 581 "Color" + Name 581 "@entryPointOutput.Color" Name 586 "g_sSamp" Name 589 "g_tTex1df2a" Name 592 "g_tTex1di2a" @@ -1867,7 +1867,7 @@ gl_FragCoord origin is upper left Decorate 130(g_tTex3df2) DescriptorSet 0 Decorate 140(g_tTex3di2) DescriptorSet 0 Decorate 148(g_tTex3du2) DescriptorSet 0 - Decorate 581(Color) Location 0 + Decorate 581(@entryPointOutput.Color) Location 0 Decorate 586(g_sSamp) DescriptorSet 0 Decorate 586(g_sSamp) Binding 0 Decorate 589(g_tTex1df2a) DescriptorSet 0 @@ -1967,7 +1967,7 @@ gl_FragCoord origin is upper left 574: 42(fvec4) ConstantComposite 404 404 404 404 575: TypePointer Function 42(fvec4) 580: TypePointer Output 42(fvec4) - 581(Color): 580(ptr) Variable Output +581(@entryPointOutput.Color): 580(ptr) Variable Output 584: TypeSampler 585: TypePointer UniformConstant 584 586(g_sSamp): 585(ptr) Variable UniformConstant @@ -1993,7 +1993,7 @@ gl_FragCoord origin is upper left 5: Label 582:43(PS_OUTPUT) FunctionCall 45(@main() 583: 42(fvec4) CompositeExtract 582 0 - Store 581(Color) 583 + Store 581(@entryPointOutput.Color) 583 Return FunctionEnd 11(Fn1(vi2;): 7(ivec2) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.array.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.array.dx10.frag.out index 1ac123e..68f5e3c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.array.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.array.dx10.frag.out @@ -131,13 +131,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -154,8 +154,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCubeArray) 0:? 'g_tTexcdi4' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -293,13 +293,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -316,11 +316,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCubeArray) 0:? 'g_tTexcdi4' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 146 Capability Shader @@ -357,8 +357,8 @@ gl_FragCoord origin is upper left Name 114 "g_tTexcdu4" Name 125 "psout" Name 135 "flattenTemp" - Name 138 "Color" - Name 142 "Depth" + Name 138 "@entryPointOutput.Color" + Name 142 "@entryPointOutput.Depth" Name 145 "g_tTex1df4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 @@ -372,8 +372,8 @@ gl_FragCoord origin is upper left Decorate 94(g_tTexcdf4) DescriptorSet 0 Decorate 104(g_tTexcdi4) DescriptorSet 0 Decorate 114(g_tTexcdu4) DescriptorSet 0 - Decorate 138(Color) Location 0 - Decorate 142(Depth) BuiltIn FragDepth + Decorate 138(@entryPointOutput.Color) Location 0 + Decorate 142(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 145(g_tTex1df4a) DescriptorSet 0 Decorate 145(g_tTex1df4a) Binding 1 2: TypeVoid @@ -455,9 +455,9 @@ gl_FragCoord origin is upper left 129: 29(int) Constant 1 130: TypePointer Function 6(float) 137: TypePointer Output 7(fvec4) - 138(Color): 137(ptr) Variable Output +138(@entryPointOutput.Color): 137(ptr) Variable Output 141: TypePointer Output 6(float) - 142(Depth): 141(ptr) Variable Output +142(@entryPointOutput.Depth): 141(ptr) Variable Output 145(g_tTex1df4a): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -466,10 +466,10 @@ gl_FragCoord origin is upper left Store 135(flattenTemp) 136 139: 12(ptr) AccessChain 135(flattenTemp) 126 140: 7(fvec4) Load 139 - Store 138(Color) 140 + Store 138(@entryPointOutput.Color) 140 143: 130(ptr) AccessChain 135(flattenTemp) 129 144: 6(float) Load 143 - Store 142(Depth) 144 + Store 142(@entryPointOutput.Depth) 144 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.basic.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.basic.dx10.frag.out index 61abf2a..88a35b4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.basic.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.basic.dx10.frag.out @@ -241,13 +241,13 @@ gl_FragCoord origin is upper left 0:53 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:53 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:53 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:53 Color: direct index for structure ( temp 4-component vector of float) 0:53 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:53 Constant: 0:53 0 (const int) 0:53 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:53 Depth: direct index for structure ( temp float) 0:53 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:53 Constant: @@ -269,8 +269,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -516,13 +516,13 @@ gl_FragCoord origin is upper left 0:53 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:53 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:53 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:53 Color: direct index for structure ( temp 4-component vector of float) 0:53 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:53 Constant: 0:53 0 (const int) 0:53 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:53 Depth: direct index for structure ( temp float) 0:53 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:53 Constant: @@ -544,11 +544,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 198 Capability Shader @@ -604,8 +604,8 @@ gl_FragCoord origin is upper left Name 169 "g_tTexcdu4" Name 176 "psout" Name 185 "flattenTemp" - Name 188 "Color" - Name 192 "Depth" + Name 188 "@entryPointOutput.Color" + Name 192 "@entryPointOutput.Depth" Name 195 "g_sSamp2d" Name 196 "g_sSamp2D_b" Name 197 "g_tTex1df4a" @@ -624,8 +624,8 @@ gl_FragCoord origin is upper left Decorate 151(g_tTexcdf4) DescriptorSet 0 Decorate 160(g_tTexcdi4) DescriptorSet 0 Decorate 169(g_tTexcdu4) DescriptorSet 0 - Decorate 188(Color) Location 0 - Decorate 192(Depth) BuiltIn FragDepth + Decorate 188(@entryPointOutput.Color) Location 0 + Decorate 192(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 195(g_sSamp2d) DescriptorSet 0 Decorate 196(g_sSamp2D_b) DescriptorSet 0 Decorate 197(g_tTex1df4a) DescriptorSet 0 @@ -731,9 +731,9 @@ gl_FragCoord origin is upper left 178: 7(fvec4) ConstantComposite 177 177 177 177 180: TypePointer Function 6(float) 187: TypePointer Output 7(fvec4) - 188(Color): 187(ptr) Variable Output +188(@entryPointOutput.Color): 187(ptr) Variable Output 191: TypePointer Output 6(float) - 192(Depth): 191(ptr) Variable Output +192(@entryPointOutput.Depth): 191(ptr) Variable Output 195(g_sSamp2d): 48(ptr) Variable UniformConstant 196(g_sSamp2D_b): 48(ptr) Variable UniformConstant 197(g_tTex1df4a): 44(ptr) Variable UniformConstant @@ -744,10 +744,10 @@ gl_FragCoord origin is upper left Store 185(flattenTemp) 186 189: 41(ptr) AccessChain 185(flattenTemp) 29 190: 7(fvec4) Load 189 - Store 188(Color) 190 + Store 188(@entryPointOutput.Color) 190 193: 180(ptr) AccessChain 185(flattenTemp) 16 194: 6(float) Load 193 - Store 192(Depth) 194 + Store 192(@entryPointOutput.Depth) 194 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.offset.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.offset.dx10.frag.out index f6bfb8d..de7128b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.offset.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.offset.dx10.frag.out @@ -149,13 +149,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -175,8 +175,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -332,13 +332,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -358,11 +358,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 161 Capability Shader @@ -398,8 +398,8 @@ gl_FragCoord origin is upper left Name 120 "g_tTex3du4" Name 132 "psout" Name 141 "flattenTemp" - Name 144 "Color" - Name 148 "Depth" + Name 144 "@entryPointOutput.Color" + Name 148 "@entryPointOutput.Depth" Name 151 "g_tTex1df4a" Name 154 "g_tTexcdf4" Name 157 "g_tTexcdi4" @@ -416,8 +416,8 @@ gl_FragCoord origin is upper left Decorate 96(g_tTex3df4) DescriptorSet 0 Decorate 109(g_tTex3di4) DescriptorSet 0 Decorate 120(g_tTex3du4) DescriptorSet 0 - Decorate 144(Color) Location 0 - Decorate 148(Depth) BuiltIn FragDepth + Decorate 144(@entryPointOutput.Color) Location 0 + Decorate 148(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 151(g_tTex1df4a) DescriptorSet 0 Decorate 151(g_tTex1df4a) Binding 1 Decorate 154(g_tTexcdf4) DescriptorSet 0 @@ -508,9 +508,9 @@ gl_FragCoord origin is upper left 134: 7(fvec4) ConstantComposite 133 133 133 133 136: TypePointer Function 6(float) 143: TypePointer Output 7(fvec4) - 144(Color): 143(ptr) Variable Output +144(@entryPointOutput.Color): 143(ptr) Variable Output 147: TypePointer Output 6(float) - 148(Depth): 147(ptr) Variable Output +148(@entryPointOutput.Depth): 147(ptr) Variable Output 151(g_tTex1df4a): 15(ptr) Variable UniformConstant 152: TypeImage 6(float) Cube sampled format:Unknown 153: TypePointer UniformConstant 152 @@ -528,10 +528,10 @@ gl_FragCoord origin is upper left Store 141(flattenTemp) 142 145: 12(ptr) AccessChain 141(flattenTemp) 64 146: 7(fvec4) Load 145 - Store 144(Color) 146 + Store 144(@entryPointOutput.Color) 146 149: 136(ptr) AccessChain 141(flattenTemp) 26 150: 6(float) Load 149 - Store 148(Depth) 150 + Store 148(@entryPointOutput.Depth) 150 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out index c08ec5c..8956c15 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out @@ -110,13 +110,13 @@ gl_FragCoord origin is upper left 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:20 Color: direct index for structure ( temp 4-component vector of float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: 0:20 0 (const int) 0:20 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:20 Depth: direct index for structure ( temp float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: @@ -130,8 +130,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2df4' ( uniform texture2DArray) 0:? 'g_tTex2di4' ( uniform itexture2DArray) 0:? 'g_tTex2du4' ( uniform utexture2DArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -248,13 +248,13 @@ gl_FragCoord origin is upper left 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:20 Color: direct index for structure ( temp 4-component vector of float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: 0:20 0 (const int) 0:20 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:20 Depth: direct index for structure ( temp float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: @@ -268,11 +268,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2df4' ( uniform texture2DArray) 0:? 'g_tTex2di4' ( uniform itexture2DArray) 0:? 'g_tTex2du4' ( uniform utexture2DArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 118 Capability Shader @@ -302,8 +302,8 @@ gl_FragCoord origin is upper left Name 87 "g_tTex2du4" Name 98 "psout" Name 107 "flattenTemp" - Name 110 "Color" - Name 114 "Depth" + Name 110 "@entryPointOutput.Color" + Name 114 "@entryPointOutput.Depth" Name 117 "g_tTex1df4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 @@ -314,8 +314,8 @@ gl_FragCoord origin is upper left Decorate 63(g_tTex2df4) DescriptorSet 0 Decorate 76(g_tTex2di4) DescriptorSet 0 Decorate 87(g_tTex2du4) DescriptorSet 0 - Decorate 110(Color) Location 0 - Decorate 114(Depth) BuiltIn FragDepth + Decorate 110(@entryPointOutput.Color) Location 0 + Decorate 114(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 117(g_tTex1df4a) DescriptorSet 0 Decorate 117(g_tTex1df4a) Binding 1 2: TypeVoid @@ -384,9 +384,9 @@ gl_FragCoord origin is upper left 100: 7(fvec4) ConstantComposite 99 99 99 99 102: TypePointer Function 6(float) 109: TypePointer Output 7(fvec4) - 110(Color): 109(ptr) Variable Output +110(@entryPointOutput.Color): 109(ptr) Variable Output 113: TypePointer Output 6(float) - 114(Depth): 113(ptr) Variable Output +114(@entryPointOutput.Depth): 113(ptr) Variable Output 117(g_tTex1df4a): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -395,10 +395,10 @@ gl_FragCoord origin is upper left Store 107(flattenTemp) 108 111: 12(ptr) AccessChain 107(flattenTemp) 29 112: 7(fvec4) Load 111 - Store 110(Color) 112 + Store 110(@entryPointOutput.Color) 112 115: 102(ptr) AccessChain 107(flattenTemp) 43 116: 6(float) Load 115 - Store 114(Depth) 116 + Store 114(@entryPointOutput.Depth) 116 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out index 2829c02..55d87a3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out @@ -61,7 +61,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:14 Sequence 0:14 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:14 Color: direct index for structure ( temp 4-component vector of float) 0:14 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:14 Constant: @@ -72,7 +72,7 @@ gl_FragCoord origin is upper left 0:? 'g_tTex1df2' ( uniform texture1D) 0:? 'g_tTex1df3' ( uniform texture1D) 0:? 'g_tTex1df4' ( uniform texture1D) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -140,7 +140,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:14 Sequence 0:14 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:14 Color: direct index for structure ( temp 4-component vector of float) 0:14 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:14 Constant: @@ -151,10 +151,10 @@ gl_FragCoord origin is upper left 0:? 'g_tTex1df2' ( uniform texture1D) 0:? 'g_tTex1df3' ( uniform texture1D) 0:? 'g_tTex1df4' ( uniform texture1D) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 72 Capability Shader @@ -178,14 +178,14 @@ gl_FragCoord origin is upper left Name 52 "txval13" Name 53 "g_tTex1df4" Name 59 "psout" - Name 69 "Color" + Name 69 "@entryPointOutput.Color" Decorate 16(g_tTex1df1) DescriptorSet 0 Decorate 20(g_sSamp) DescriptorSet 0 Decorate 20(g_sSamp) Binding 0 Decorate 30(g_tTex1df2) DescriptorSet 0 Decorate 42(g_tTex1df3) DescriptorSet 0 Decorate 53(g_tTex1df4) DescriptorSet 0 - Decorate 69(Color) Location 0 + Decorate 69(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -216,12 +216,12 @@ gl_FragCoord origin is upper left 62: 6(float) Constant 1065353216 63: 7(fvec4) ConstantComposite 62 62 62 62 68: TypePointer Output 7(fvec4) - 69(Color): 68(ptr) Variable Output +69(@entryPointOutput.Color): 68(ptr) Variable Output 4(main): 2 Function None 3 5: Label 70:8(PS_OUTPUT) FunctionCall 10(@main() 71: 7(fvec4) CompositeExtract 70 0 - Store 69(Color) 71 + Store 69(@entryPointOutput.Color) 71 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.array.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.array.dx10.frag.out index afed0a4..a3acb1e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.array.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.array.dx10.frag.out @@ -149,13 +149,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -172,8 +172,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCubeArray) 0:? 'g_tTexcdi4' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -329,13 +329,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -352,11 +352,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCubeArray) 0:? 'g_tTexcdi4' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 146 Capability Shader @@ -393,8 +393,8 @@ gl_FragCoord origin is upper left Name 114 "g_tTexcdu4" Name 125 "psout" Name 135 "flattenTemp" - Name 138 "Color" - Name 142 "Depth" + Name 138 "@entryPointOutput.Color" + Name 142 "@entryPointOutput.Depth" Name 145 "g_tTex1df4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 @@ -408,8 +408,8 @@ gl_FragCoord origin is upper left Decorate 94(g_tTexcdf4) DescriptorSet 0 Decorate 104(g_tTexcdi4) DescriptorSet 0 Decorate 114(g_tTexcdu4) DescriptorSet 0 - Decorate 138(Color) Location 0 - Decorate 142(Depth) BuiltIn FragDepth + Decorate 138(@entryPointOutput.Color) Location 0 + Decorate 142(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 145(g_tTex1df4a) DescriptorSet 0 Decorate 145(g_tTex1df4a) Binding 1 2: TypeVoid @@ -491,9 +491,9 @@ gl_FragCoord origin is upper left 129: 30(int) Constant 1 130: TypePointer Function 6(float) 137: TypePointer Output 7(fvec4) - 138(Color): 137(ptr) Variable Output +138(@entryPointOutput.Color): 137(ptr) Variable Output 141: TypePointer Output 6(float) - 142(Depth): 141(ptr) Variable Output +142(@entryPointOutput.Depth): 141(ptr) Variable Output 145(g_tTex1df4a): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -502,10 +502,10 @@ gl_FragCoord origin is upper left Store 135(flattenTemp) 136 139: 12(ptr) AccessChain 135(flattenTemp) 126 140: 7(fvec4) Load 139 - Store 138(Color) 140 + Store 138(@entryPointOutput.Color) 140 143: 130(ptr) AccessChain 135(flattenTemp) 129 144: 6(float) Load 143 - Store 142(Depth) 144 + Store 142(@entryPointOutput.Depth) 144 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out index cff271f..615c6da 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out @@ -179,13 +179,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -205,8 +205,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -392,13 +392,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -418,11 +418,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 170 Capability Shader @@ -464,8 +464,8 @@ gl_FragCoord origin is upper left Name 141 "g_tTexcdu4" Name 148 "psout" Name 159 "flattenTemp" - Name 162 "Color" - Name 166 "Depth" + Name 162 "@entryPointOutput.Color" + Name 166 "@entryPointOutput.Depth" Name 169 "g_tTex1df4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 @@ -482,8 +482,8 @@ gl_FragCoord origin is upper left Decorate 123(g_tTexcdf4) DescriptorSet 0 Decorate 132(g_tTexcdi4) DescriptorSet 0 Decorate 141(g_tTexcdu4) DescriptorSet 0 - Decorate 162(Color) Location 0 - Decorate 166(Depth) BuiltIn FragDepth + Decorate 162(@entryPointOutput.Color) Location 0 + Decorate 166(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 169(g_tTex1df4a) DescriptorSet 0 Decorate 169(g_tTex1df4a) Binding 1 2: TypeVoid @@ -574,9 +574,9 @@ gl_FragCoord origin is upper left 153: 27(int) Constant 1 154: TypePointer Function 6(float) 161: TypePointer Output 7(fvec4) - 162(Color): 161(ptr) Variable Output +162(@entryPointOutput.Color): 161(ptr) Variable Output 165: TypePointer Output 6(float) - 166(Depth): 165(ptr) Variable Output +166(@entryPointOutput.Depth): 165(ptr) Variable Output 169(g_tTex1df4a): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -585,10 +585,10 @@ gl_FragCoord origin is upper left Store 159(flattenTemp) 160 163: 12(ptr) AccessChain 159(flattenTemp) 149 164: 7(fvec4) Load 163 - Store 162(Color) 164 + Store 162(@entryPointOutput.Color) 164 167: 154(ptr) AccessChain 159(flattenTemp) 153 168: 6(float) Load 167 - Store 166(Depth) 168 + Store 166(@entryPointOutput.Depth) 168 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out index b05d1d7..000c84a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out @@ -167,13 +167,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -193,8 +193,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -368,13 +368,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -394,11 +394,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 161 Capability Shader @@ -434,8 +434,8 @@ gl_FragCoord origin is upper left Name 120 "g_tTex3du4" Name 132 "psout" Name 141 "flattenTemp" - Name 144 "Color" - Name 148 "Depth" + Name 144 "@entryPointOutput.Color" + Name 148 "@entryPointOutput.Depth" Name 151 "g_tTex1df4a" Name 154 "g_tTexcdf4" Name 157 "g_tTexcdi4" @@ -452,8 +452,8 @@ gl_FragCoord origin is upper left Decorate 96(g_tTex3df4) DescriptorSet 0 Decorate 109(g_tTex3di4) DescriptorSet 0 Decorate 120(g_tTex3du4) DescriptorSet 0 - Decorate 144(Color) Location 0 - Decorate 148(Depth) BuiltIn FragDepth + Decorate 144(@entryPointOutput.Color) Location 0 + Decorate 148(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 151(g_tTex1df4a) DescriptorSet 0 Decorate 151(g_tTex1df4a) Binding 1 Decorate 154(g_tTexcdf4) DescriptorSet 0 @@ -544,9 +544,9 @@ gl_FragCoord origin is upper left 134: 7(fvec4) ConstantComposite 133 133 133 133 136: TypePointer Function 6(float) 143: TypePointer Output 7(fvec4) - 144(Color): 143(ptr) Variable Output +144(@entryPointOutput.Color): 143(ptr) Variable Output 147: TypePointer Output 6(float) - 148(Depth): 147(ptr) Variable Output +148(@entryPointOutput.Depth): 147(ptr) Variable Output 151(g_tTex1df4a): 15(ptr) Variable UniformConstant 152: TypeImage 6(float) Cube sampled format:Unknown 153: TypePointer UniformConstant 152 @@ -564,10 +564,10 @@ gl_FragCoord origin is upper left Store 141(flattenTemp) 142 145: 12(ptr) AccessChain 141(flattenTemp) 65 146: 7(fvec4) Load 145 - Store 144(Color) 146 + Store 144(@entryPointOutput.Color) 146 149: 136(ptr) AccessChain 141(flattenTemp) 27 150: 6(float) Load 149 - Store 148(Depth) 150 + Store 148(@entryPointOutput.Depth) 150 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out index e718743..67cc41f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out @@ -122,13 +122,13 @@ gl_FragCoord origin is upper left 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:20 Color: direct index for structure ( temp 4-component vector of float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: 0:20 0 (const int) 0:20 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:20 Depth: direct index for structure ( temp float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: @@ -142,8 +142,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2df4' ( uniform texture2DArray) 0:? 'g_tTex2di4' ( uniform itexture2DArray) 0:? 'g_tTex2du4' ( uniform utexture2DArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -272,13 +272,13 @@ gl_FragCoord origin is upper left 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:20 Color: direct index for structure ( temp 4-component vector of float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: 0:20 0 (const int) 0:20 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:20 Depth: direct index for structure ( temp float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: @@ -292,11 +292,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2df4' ( uniform texture2DArray) 0:? 'g_tTex2di4' ( uniform itexture2DArray) 0:? 'g_tTex2du4' ( uniform utexture2DArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 118 Capability Shader @@ -326,8 +326,8 @@ gl_FragCoord origin is upper left Name 87 "g_tTex2du4" Name 98 "psout" Name 107 "flattenTemp" - Name 110 "Color" - Name 114 "Depth" + Name 110 "@entryPointOutput.Color" + Name 114 "@entryPointOutput.Depth" Name 117 "g_tTex1df4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 @@ -338,8 +338,8 @@ gl_FragCoord origin is upper left Decorate 64(g_tTex2df4) DescriptorSet 0 Decorate 77(g_tTex2di4) DescriptorSet 0 Decorate 87(g_tTex2du4) DescriptorSet 0 - Decorate 110(Color) Location 0 - Decorate 114(Depth) BuiltIn FragDepth + Decorate 110(@entryPointOutput.Color) Location 0 + Decorate 114(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 117(g_tTex1df4a) DescriptorSet 0 Decorate 117(g_tTex1df4a) Binding 1 2: TypeVoid @@ -408,9 +408,9 @@ gl_FragCoord origin is upper left 100: 7(fvec4) ConstantComposite 99 99 99 99 102: TypePointer Function 6(float) 109: TypePointer Output 7(fvec4) - 110(Color): 109(ptr) Variable Output +110(@entryPointOutput.Color): 109(ptr) Variable Output 113: TypePointer Output 6(float) - 114(Depth): 113(ptr) Variable Output +114(@entryPointOutput.Depth): 113(ptr) Variable Output 117(g_tTex1df4a): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -419,10 +419,10 @@ gl_FragCoord origin is upper left Store 107(flattenTemp) 108 111: 12(ptr) AccessChain 107(flattenTemp) 30 112: 7(fvec4) Load 111 - Store 110(Color) 112 + Store 110(@entryPointOutput.Color) 112 115: 102(ptr) AccessChain 107(flattenTemp) 44 116: 6(float) Load 115 - Store 114(Depth) 116 + Store 114(@entryPointOutput.Depth) 116 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out index 1ddff1a..33df30c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out @@ -10,7 +10,7 @@ gl_FragCoord origin is upper left 0:42 'r10' ( temp float) 0:42 texture ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DArrayShadow) -0:42 'g_tTex1df4a' ( uniform texture1DArray) +0:42 'g_tTex1df4a' ( uniform texture1DArrayShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -23,7 +23,7 @@ gl_FragCoord origin is upper left 0:43 'r12' ( temp float) 0:43 texture ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DArrayShadow) -0:43 'g_tTex1di4a' ( uniform itexture1DArray) +0:43 'g_tTex1di4a' ( uniform itexture1DArrayShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -36,7 +36,7 @@ gl_FragCoord origin is upper left 0:44 'r14' ( temp float) 0:44 texture ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DArrayShadow) -0:44 'g_tTex1du4a' ( uniform utexture1DArray) +0:44 'g_tTex1du4a' ( uniform utexture1DArrayShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -49,7 +49,7 @@ gl_FragCoord origin is upper left 0:47 'r30' ( temp float) 0:47 texture ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DArrayShadow) -0:47 'g_tTex2df4a' ( uniform texture2DArray) +0:47 'g_tTex2df4a' ( uniform texture2DArrayShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -63,7 +63,7 @@ gl_FragCoord origin is upper left 0:48 'r32' ( temp float) 0:48 texture ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DArrayShadow) -0:48 'g_tTex2di4a' ( uniform itexture2DArray) +0:48 'g_tTex2di4a' ( uniform itexture2DArrayShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -77,7 +77,7 @@ gl_FragCoord origin is upper left 0:49 'r34' ( temp float) 0:49 texture ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DArrayShadow) -0:49 'g_tTex2du4a' ( uniform utexture2DArray) +0:49 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -91,7 +91,7 @@ gl_FragCoord origin is upper left 0:52 'r60' ( temp float) 0:52 texture ( temp float) 0:52 Construct combined texture-sampler ( temp samplerCubeArrayShadow) -0:52 'g_tTexcdf4a' ( uniform textureCubeArray) +0:52 'g_tTexcdf4a' ( uniform textureCubeArrayShadow) 0:52 'g_sSamp' (layout( binding=0) uniform sampler) 0:52 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -106,7 +106,7 @@ gl_FragCoord origin is upper left 0:53 'r62' ( temp float) 0:53 texture ( temp float) 0:53 Construct combined texture-sampler ( temp isamplerCubeArrayShadow) -0:53 'g_tTexcdi4a' ( uniform itextureCubeArray) +0:53 'g_tTexcdi4a' ( uniform itextureCubeArrayShadow) 0:53 'g_sSamp' (layout( binding=0) uniform sampler) 0:53 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -121,7 +121,7 @@ gl_FragCoord origin is upper left 0:54 'r64' ( temp float) 0:54 texture ( temp float) 0:54 Construct combined texture-sampler ( temp usamplerCubeArrayShadow) -0:54 'g_tTexcdu4a' ( uniform utextureCubeArray) +0:54 'g_tTexcdu4a' ( uniform utextureCubeArrayShadow) 0:54 'g_sSamp' (layout( binding=0) uniform sampler) 0:54 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -158,13 +158,13 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: @@ -183,17 +183,17 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'g_tTex1df4a' ( uniform texture1DArray) -0:? 'g_tTex1di4a' ( uniform itexture1DArray) -0:? 'g_tTex1du4a' ( uniform utexture1DArray) -0:? 'g_tTex2df4a' ( uniform texture2DArray) -0:? 'g_tTex2di4a' ( uniform itexture2DArray) -0:? 'g_tTex2du4a' ( uniform utexture2DArray) -0:? 'g_tTexcdf4a' ( uniform textureCubeArray) -0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) -0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? 'g_tTex1df4a' ( uniform texture1DArrayShadow) +0:? 'g_tTex1di4a' ( uniform itexture1DArrayShadow) +0:? 'g_tTex1du4a' ( uniform utexture1DArrayShadow) +0:? 'g_tTex2df4a' ( uniform texture2DArrayShadow) +0:? 'g_tTex2di4a' ( uniform itexture2DArrayShadow) +0:? 'g_tTex2du4a' ( uniform utexture2DArrayShadow) +0:? 'g_tTexcdf4a' ( uniform textureCubeArrayShadow) +0:? 'g_tTexcdi4a' ( uniform itextureCubeArrayShadow) +0:? 'g_tTexcdu4a' ( uniform utextureCubeArrayShadow) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -210,7 +210,7 @@ gl_FragCoord origin is upper left 0:42 'r10' ( temp float) 0:42 texture ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DArrayShadow) -0:42 'g_tTex1df4a' ( uniform texture1DArray) +0:42 'g_tTex1df4a' ( uniform texture1DArrayShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -223,7 +223,7 @@ gl_FragCoord origin is upper left 0:43 'r12' ( temp float) 0:43 texture ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DArrayShadow) -0:43 'g_tTex1di4a' ( uniform itexture1DArray) +0:43 'g_tTex1di4a' ( uniform itexture1DArrayShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -236,7 +236,7 @@ gl_FragCoord origin is upper left 0:44 'r14' ( temp float) 0:44 texture ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DArrayShadow) -0:44 'g_tTex1du4a' ( uniform utexture1DArray) +0:44 'g_tTex1du4a' ( uniform utexture1DArrayShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -249,7 +249,7 @@ gl_FragCoord origin is upper left 0:47 'r30' ( temp float) 0:47 texture ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DArrayShadow) -0:47 'g_tTex2df4a' ( uniform texture2DArray) +0:47 'g_tTex2df4a' ( uniform texture2DArrayShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -263,7 +263,7 @@ gl_FragCoord origin is upper left 0:48 'r32' ( temp float) 0:48 texture ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DArrayShadow) -0:48 'g_tTex2di4a' ( uniform itexture2DArray) +0:48 'g_tTex2di4a' ( uniform itexture2DArrayShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -277,7 +277,7 @@ gl_FragCoord origin is upper left 0:49 'r34' ( temp float) 0:49 texture ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DArrayShadow) -0:49 'g_tTex2du4a' ( uniform utexture2DArray) +0:49 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -291,7 +291,7 @@ gl_FragCoord origin is upper left 0:52 'r60' ( temp float) 0:52 texture ( temp float) 0:52 Construct combined texture-sampler ( temp samplerCubeArrayShadow) -0:52 'g_tTexcdf4a' ( uniform textureCubeArray) +0:52 'g_tTexcdf4a' ( uniform textureCubeArrayShadow) 0:52 'g_sSamp' (layout( binding=0) uniform sampler) 0:52 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -306,7 +306,7 @@ gl_FragCoord origin is upper left 0:53 'r62' ( temp float) 0:53 texture ( temp float) 0:53 Construct combined texture-sampler ( temp isamplerCubeArrayShadow) -0:53 'g_tTexcdi4a' ( uniform itextureCubeArray) +0:53 'g_tTexcdi4a' ( uniform itextureCubeArrayShadow) 0:53 'g_sSamp' (layout( binding=0) uniform sampler) 0:53 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -321,7 +321,7 @@ gl_FragCoord origin is upper left 0:54 'r64' ( temp float) 0:54 texture ( temp float) 0:54 Construct combined texture-sampler ( temp usamplerCubeArrayShadow) -0:54 'g_tTexcdu4a' ( uniform utextureCubeArray) +0:54 'g_tTexcdu4a' ( uniform utextureCubeArrayShadow) 0:54 'g_sSamp' (layout( binding=0) uniform sampler) 0:54 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -358,13 +358,13 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: @@ -383,28 +383,28 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'g_tTex1df4a' ( uniform texture1DArray) -0:? 'g_tTex1di4a' ( uniform itexture1DArray) -0:? 'g_tTex1du4a' ( uniform utexture1DArray) -0:? 'g_tTex2df4a' ( uniform texture2DArray) -0:? 'g_tTex2di4a' ( uniform itexture2DArray) -0:? 'g_tTex2du4a' ( uniform utexture2DArray) -0:? 'g_tTexcdf4a' ( uniform textureCubeArray) -0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) -0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? 'g_tTex1df4a' ( uniform texture1DArrayShadow) +0:? 'g_tTex1di4a' ( uniform itexture1DArrayShadow) +0:? 'g_tTex1du4a' ( uniform utexture1DArrayShadow) +0:? 'g_tTex2df4a' ( uniform texture2DArrayShadow) +0:? 'g_tTex2di4a' ( uniform itexture2DArrayShadow) +0:? 'g_tTex2du4a' ( uniform utexture2DArrayShadow) +0:? 'g_tTexcdf4a' ( uniform textureCubeArrayShadow) +0:? 'g_tTexcdi4a' ( uniform itextureCubeArrayShadow) +0:? 'g_tTexcdu4a' ( uniform utextureCubeArrayShadow) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 218 +// Generated by (magic number): 80003 +// Id's are bound by 209 Capability Shader Capability Sampled1D Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 175 179 + EntryPoint Fragment 4 "main" 166 170 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -415,64 +415,64 @@ gl_FragCoord origin is upper left Name 13 "r10" Name 16 "g_tTex1df4a" Name 20 "g_sSamp" - Name 36 "r12" - Name 40 "g_tTex1di4a" - Name 51 "r14" - Name 55 "g_tTex1du4a" - Name 66 "r30" - Name 69 "g_tTex2df4a" - Name 83 "r32" - Name 86 "g_tTex2di4a" - Name 98 "r34" - Name 101 "g_tTex2du4a" - Name 113 "r60" - Name 116 "g_tTexcdf4a" - Name 130 "r62" - Name 133 "g_tTexcdi4a" - Name 145 "r64" - Name 148 "g_tTexcdu4a" - Name 161 "psout" - Name 172 "flattenTemp" - Name 175 "Color" - Name 179 "Depth" - Name 184 "g_tTex1df4" - Name 187 "g_tTex1di4" - Name 190 "g_tTex1du4" - Name 193 "g_tTex2df4" - Name 196 "g_tTex2di4" - Name 199 "g_tTex2du4" - Name 202 "g_tTex3df4" - Name 205 "g_tTex3di4" - Name 208 "g_tTex3du4" - Name 211 "g_tTexcdf4" - Name 214 "g_tTexcdi4" - Name 217 "g_tTexcdu4" + Name 35 "r12" + Name 39 "g_tTex1di4a" + Name 49 "r14" + Name 53 "g_tTex1du4a" + Name 63 "r30" + Name 66 "g_tTex2df4a" + Name 79 "r32" + Name 82 "g_tTex2di4a" + Name 93 "r34" + Name 96 "g_tTex2du4a" + Name 107 "r60" + Name 110 "g_tTexcdf4a" + Name 123 "r62" + Name 126 "g_tTexcdi4a" + Name 137 "r64" + Name 140 "g_tTexcdu4a" + Name 152 "psout" + Name 163 "flattenTemp" + Name 166 "@entryPointOutput.Color" + Name 170 "@entryPointOutput.Depth" + Name 175 "g_tTex1df4" + Name 178 "g_tTex1di4" + Name 181 "g_tTex1du4" + Name 184 "g_tTex2df4" + Name 187 "g_tTex2di4" + Name 190 "g_tTex2du4" + Name 193 "g_tTex3df4" + Name 196 "g_tTex3di4" + Name 199 "g_tTex3du4" + Name 202 "g_tTexcdf4" + Name 205 "g_tTexcdi4" + Name 208 "g_tTexcdu4" Decorate 16(g_tTex1df4a) DescriptorSet 0 Decorate 20(g_sSamp) DescriptorSet 0 Decorate 20(g_sSamp) Binding 0 - Decorate 40(g_tTex1di4a) DescriptorSet 0 - Decorate 55(g_tTex1du4a) DescriptorSet 0 - Decorate 69(g_tTex2df4a) DescriptorSet 0 - Decorate 86(g_tTex2di4a) DescriptorSet 0 - Decorate 101(g_tTex2du4a) DescriptorSet 0 - Decorate 116(g_tTexcdf4a) DescriptorSet 0 - Decorate 133(g_tTexcdi4a) DescriptorSet 0 - Decorate 148(g_tTexcdu4a) DescriptorSet 0 - Decorate 175(Color) Location 0 - Decorate 179(Depth) BuiltIn FragDepth - Decorate 184(g_tTex1df4) DescriptorSet 0 - Decorate 184(g_tTex1df4) Binding 0 - Decorate 187(g_tTex1di4) DescriptorSet 0 - Decorate 190(g_tTex1du4) DescriptorSet 0 - Decorate 193(g_tTex2df4) DescriptorSet 0 - Decorate 196(g_tTex2di4) DescriptorSet 0 - Decorate 199(g_tTex2du4) DescriptorSet 0 - Decorate 202(g_tTex3df4) DescriptorSet 0 - Decorate 205(g_tTex3di4) DescriptorSet 0 - Decorate 208(g_tTex3du4) DescriptorSet 0 - Decorate 211(g_tTexcdf4) DescriptorSet 0 - Decorate 214(g_tTexcdi4) DescriptorSet 0 - Decorate 217(g_tTexcdu4) DescriptorSet 0 + Decorate 39(g_tTex1di4a) DescriptorSet 0 + Decorate 53(g_tTex1du4a) DescriptorSet 0 + Decorate 66(g_tTex2df4a) DescriptorSet 0 + Decorate 82(g_tTex2di4a) DescriptorSet 0 + Decorate 96(g_tTex2du4a) DescriptorSet 0 + Decorate 110(g_tTexcdf4a) DescriptorSet 0 + Decorate 126(g_tTexcdi4a) DescriptorSet 0 + Decorate 140(g_tTexcdu4a) DescriptorSet 0 + Decorate 166(@entryPointOutput.Color) Location 0 + Decorate 170(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 175(g_tTex1df4) DescriptorSet 0 + Decorate 175(g_tTex1df4) Binding 0 + Decorate 178(g_tTex1di4) DescriptorSet 0 + Decorate 181(g_tTex1du4) DescriptorSet 0 + Decorate 184(g_tTex2df4) DescriptorSet 0 + Decorate 187(g_tTex2di4) DescriptorSet 0 + Decorate 190(g_tTex2du4) DescriptorSet 0 + Decorate 193(g_tTex3df4) DescriptorSet 0 + Decorate 196(g_tTex3di4) DescriptorSet 0 + Decorate 199(g_tTex3du4) DescriptorSet 0 + Decorate 202(g_tTexcdf4) DescriptorSet 0 + Decorate 205(g_tTexcdi4) DescriptorSet 0 + Decorate 208(g_tTexcdu4) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -480,228 +480,219 @@ gl_FragCoord origin is upper left 8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float) 9: TypeFunction 8(PS_OUTPUT) 12: TypePointer Function 6(float) - 14: TypeImage 6(float) 1D array sampled format:Unknown + 14: TypeImage 6(float) 1D depth array sampled format:Unknown 15: TypePointer UniformConstant 14 16(g_tTex1df4a): 15(ptr) Variable UniformConstant 18: TypeSampler 19: TypePointer UniformConstant 18 20(g_sSamp): 19(ptr) Variable UniformConstant - 22: TypeImage 6(float) 1D depth array sampled format:Unknown - 23: TypeSampledImage 22 - 25: TypeVector 6(float) 2 - 26: 6(float) Constant 1036831949 - 27: 6(float) Constant 1045220557 - 28: 25(fvec2) ConstantComposite 26 27 - 29: 6(float) Constant 1061158912 - 30: TypeVector 6(float) 3 - 37: TypeInt 32 1 - 38: TypeImage 37(int) 1D array sampled format:Unknown - 39: TypePointer UniformConstant 38 - 40(g_tTex1di4a): 39(ptr) Variable UniformConstant - 43: TypeImage 37(int) 1D depth array sampled format:Unknown - 44: TypeSampledImage 43 - 52: TypeInt 32 0 - 53: TypeImage 52(int) 1D array sampled format:Unknown - 54: TypePointer UniformConstant 53 - 55(g_tTex1du4a): 54(ptr) Variable UniformConstant - 58: TypeImage 52(int) 1D depth array sampled format:Unknown - 59: TypeSampledImage 58 - 67: TypeImage 6(float) 2D array sampled format:Unknown - 68: TypePointer UniformConstant 67 - 69(g_tTex2df4a): 68(ptr) Variable UniformConstant - 72: TypeImage 6(float) 2D depth array sampled format:Unknown - 73: TypeSampledImage 72 - 75: 6(float) Constant 1050253722 - 76: 30(fvec3) ConstantComposite 26 27 75 - 84: TypeImage 37(int) 2D array sampled format:Unknown - 85: TypePointer UniformConstant 84 - 86(g_tTex2di4a): 85(ptr) Variable UniformConstant - 89: TypeImage 37(int) 2D depth array sampled format:Unknown - 90: TypeSampledImage 89 - 99: TypeImage 52(int) 2D array sampled format:Unknown - 100: TypePointer UniformConstant 99 -101(g_tTex2du4a): 100(ptr) Variable UniformConstant - 104: TypeImage 52(int) 2D depth array sampled format:Unknown - 105: TypeSampledImage 104 - 114: TypeImage 6(float) Cube array sampled format:Unknown - 115: TypePointer UniformConstant 114 -116(g_tTexcdf4a): 115(ptr) Variable UniformConstant - 119: TypeImage 6(float) Cube depth array sampled format:Unknown - 120: TypeSampledImage 119 - 122: 6(float) Constant 1053609165 - 123: 7(fvec4) ConstantComposite 26 27 75 122 - 131: TypeImage 37(int) Cube array sampled format:Unknown - 132: TypePointer UniformConstant 131 -133(g_tTexcdi4a): 132(ptr) Variable UniformConstant - 136: TypeImage 37(int) Cube depth array sampled format:Unknown - 137: TypeSampledImage 136 - 146: TypeImage 52(int) Cube array sampled format:Unknown - 147: TypePointer UniformConstant 146 -148(g_tTexcdu4a): 147(ptr) Variable UniformConstant - 151: TypeImage 52(int) Cube depth array sampled format:Unknown - 152: TypeSampledImage 151 - 160: TypePointer Function 8(PS_OUTPUT) - 162: 37(int) Constant 0 - 163: 6(float) Constant 1065353216 - 164: 7(fvec4) ConstantComposite 163 163 163 163 - 165: TypePointer Function 7(fvec4) - 167: 37(int) Constant 1 - 174: TypePointer Output 7(fvec4) - 175(Color): 174(ptr) Variable Output - 178: TypePointer Output 6(float) - 179(Depth): 178(ptr) Variable Output - 182: TypeImage 6(float) 1D sampled format:Unknown + 22: TypeSampledImage 14 + 24: TypeVector 6(float) 2 + 25: 6(float) Constant 1036831949 + 26: 6(float) Constant 1045220557 + 27: 24(fvec2) ConstantComposite 25 26 + 28: 6(float) Constant 1061158912 + 29: TypeVector 6(float) 3 + 36: TypeInt 32 1 + 37: TypeImage 36(int) 1D depth array sampled format:Unknown + 38: TypePointer UniformConstant 37 + 39(g_tTex1di4a): 38(ptr) Variable UniformConstant + 42: TypeSampledImage 37 + 50: TypeInt 32 0 + 51: TypeImage 50(int) 1D depth array sampled format:Unknown + 52: TypePointer UniformConstant 51 + 53(g_tTex1du4a): 52(ptr) Variable UniformConstant + 56: TypeSampledImage 51 + 64: TypeImage 6(float) 2D depth array sampled format:Unknown + 65: TypePointer UniformConstant 64 + 66(g_tTex2df4a): 65(ptr) Variable UniformConstant + 69: TypeSampledImage 64 + 71: 6(float) Constant 1050253722 + 72: 29(fvec3) ConstantComposite 25 26 71 + 80: TypeImage 36(int) 2D depth array sampled format:Unknown + 81: TypePointer UniformConstant 80 + 82(g_tTex2di4a): 81(ptr) Variable UniformConstant + 85: TypeSampledImage 80 + 94: TypeImage 50(int) 2D depth array sampled format:Unknown + 95: TypePointer UniformConstant 94 + 96(g_tTex2du4a): 95(ptr) Variable UniformConstant + 99: TypeSampledImage 94 + 108: TypeImage 6(float) Cube depth array sampled format:Unknown + 109: TypePointer UniformConstant 108 +110(g_tTexcdf4a): 109(ptr) Variable UniformConstant + 113: TypeSampledImage 108 + 115: 6(float) Constant 1053609165 + 116: 7(fvec4) ConstantComposite 25 26 71 115 + 124: TypeImage 36(int) Cube depth array sampled format:Unknown + 125: TypePointer UniformConstant 124 +126(g_tTexcdi4a): 125(ptr) Variable UniformConstant + 129: TypeSampledImage 124 + 138: TypeImage 50(int) Cube depth array sampled format:Unknown + 139: TypePointer UniformConstant 138 +140(g_tTexcdu4a): 139(ptr) Variable UniformConstant + 143: TypeSampledImage 138 + 151: TypePointer Function 8(PS_OUTPUT) + 153: 36(int) Constant 0 + 154: 6(float) Constant 1065353216 + 155: 7(fvec4) ConstantComposite 154 154 154 154 + 156: TypePointer Function 7(fvec4) + 158: 36(int) Constant 1 + 165: TypePointer Output 7(fvec4) +166(@entryPointOutput.Color): 165(ptr) Variable Output + 169: TypePointer Output 6(float) +170(@entryPointOutput.Depth): 169(ptr) Variable Output + 173: TypeImage 6(float) 1D sampled format:Unknown + 174: TypePointer UniformConstant 173 + 175(g_tTex1df4): 174(ptr) Variable UniformConstant + 176: TypeImage 36(int) 1D sampled format:Unknown + 177: TypePointer UniformConstant 176 + 178(g_tTex1di4): 177(ptr) Variable UniformConstant + 179: TypeImage 50(int) 1D sampled format:Unknown + 180: TypePointer UniformConstant 179 + 181(g_tTex1du4): 180(ptr) Variable UniformConstant + 182: TypeImage 6(float) 2D sampled format:Unknown 183: TypePointer UniformConstant 182 - 184(g_tTex1df4): 183(ptr) Variable UniformConstant - 185: TypeImage 37(int) 1D sampled format:Unknown + 184(g_tTex2df4): 183(ptr) Variable UniformConstant + 185: TypeImage 36(int) 2D sampled format:Unknown 186: TypePointer UniformConstant 185 - 187(g_tTex1di4): 186(ptr) Variable UniformConstant - 188: TypeImage 52(int) 1D sampled format:Unknown + 187(g_tTex2di4): 186(ptr) Variable UniformConstant + 188: TypeImage 50(int) 2D sampled format:Unknown 189: TypePointer UniformConstant 188 - 190(g_tTex1du4): 189(ptr) Variable UniformConstant - 191: TypeImage 6(float) 2D sampled format:Unknown + 190(g_tTex2du4): 189(ptr) Variable UniformConstant + 191: TypeImage 6(float) 3D sampled format:Unknown 192: TypePointer UniformConstant 191 - 193(g_tTex2df4): 192(ptr) Variable UniformConstant - 194: TypeImage 37(int) 2D sampled format:Unknown + 193(g_tTex3df4): 192(ptr) Variable UniformConstant + 194: TypeImage 36(int) 3D sampled format:Unknown 195: TypePointer UniformConstant 194 - 196(g_tTex2di4): 195(ptr) Variable UniformConstant - 197: TypeImage 52(int) 2D sampled format:Unknown + 196(g_tTex3di4): 195(ptr) Variable UniformConstant + 197: TypeImage 50(int) 3D sampled format:Unknown 198: TypePointer UniformConstant 197 - 199(g_tTex2du4): 198(ptr) Variable UniformConstant - 200: TypeImage 6(float) 3D sampled format:Unknown + 199(g_tTex3du4): 198(ptr) Variable UniformConstant + 200: TypeImage 6(float) Cube sampled format:Unknown 201: TypePointer UniformConstant 200 - 202(g_tTex3df4): 201(ptr) Variable UniformConstant - 203: TypeImage 37(int) 3D sampled format:Unknown + 202(g_tTexcdf4): 201(ptr) Variable UniformConstant + 203: TypeImage 36(int) Cube sampled format:Unknown 204: TypePointer UniformConstant 203 - 205(g_tTex3di4): 204(ptr) Variable UniformConstant - 206: TypeImage 52(int) 3D sampled format:Unknown + 205(g_tTexcdi4): 204(ptr) Variable UniformConstant + 206: TypeImage 50(int) Cube sampled format:Unknown 207: TypePointer UniformConstant 206 - 208(g_tTex3du4): 207(ptr) Variable UniformConstant - 209: TypeImage 6(float) Cube sampled format:Unknown - 210: TypePointer UniformConstant 209 - 211(g_tTexcdf4): 210(ptr) Variable UniformConstant - 212: TypeImage 37(int) Cube sampled format:Unknown - 213: TypePointer UniformConstant 212 - 214(g_tTexcdi4): 213(ptr) Variable UniformConstant - 215: TypeImage 52(int) Cube sampled format:Unknown - 216: TypePointer UniformConstant 215 - 217(g_tTexcdu4): 216(ptr) Variable UniformConstant + 208(g_tTexcdu4): 207(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label -172(flattenTemp): 160(ptr) Variable Function - 173:8(PS_OUTPUT) FunctionCall 10(@main() - Store 172(flattenTemp) 173 - 176: 165(ptr) AccessChain 172(flattenTemp) 162 - 177: 7(fvec4) Load 176 - Store 175(Color) 177 - 180: 12(ptr) AccessChain 172(flattenTemp) 167 - 181: 6(float) Load 180 - Store 179(Depth) 181 +163(flattenTemp): 151(ptr) Variable Function + 164:8(PS_OUTPUT) FunctionCall 10(@main() + Store 163(flattenTemp) 164 + 167: 156(ptr) AccessChain 163(flattenTemp) 153 + 168: 7(fvec4) Load 167 + Store 166(@entryPointOutput.Color) 168 + 171: 12(ptr) AccessChain 163(flattenTemp) 158 + 172: 6(float) Load 171 + Store 170(@entryPointOutput.Depth) 172 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 11: Label 13(r10): 12(ptr) Variable Function - 36(r12): 12(ptr) Variable Function - 51(r14): 12(ptr) Variable Function - 66(r30): 12(ptr) Variable Function - 83(r32): 12(ptr) Variable Function - 98(r34): 12(ptr) Variable Function - 113(r60): 12(ptr) Variable Function - 130(r62): 12(ptr) Variable Function - 145(r64): 12(ptr) Variable Function - 161(psout): 160(ptr) Variable Function + 35(r12): 12(ptr) Variable Function + 49(r14): 12(ptr) Variable Function + 63(r30): 12(ptr) Variable Function + 79(r32): 12(ptr) Variable Function + 93(r34): 12(ptr) Variable Function + 107(r60): 12(ptr) Variable Function + 123(r62): 12(ptr) Variable Function + 137(r64): 12(ptr) Variable Function + 152(psout): 151(ptr) Variable Function 17: 14 Load 16(g_tTex1df4a) 21: 18 Load 20(g_sSamp) - 24: 23 SampledImage 17 21 - 31: 6(float) CompositeExtract 28 0 - 32: 6(float) CompositeExtract 28 1 - 33: 30(fvec3) CompositeConstruct 31 32 29 - 34: 6(float) CompositeExtract 33 2 - 35: 6(float) ImageSampleDrefImplicitLod 24 33 34 - Store 13(r10) 35 - 41: 38 Load 40(g_tTex1di4a) - 42: 18 Load 20(g_sSamp) - 45: 44 SampledImage 41 42 - 46: 6(float) CompositeExtract 28 0 - 47: 6(float) CompositeExtract 28 1 - 48: 30(fvec3) CompositeConstruct 46 47 29 - 49: 6(float) CompositeExtract 48 2 - 50: 6(float) ImageSampleDrefImplicitLod 45 48 49 - Store 36(r12) 50 - 56: 53 Load 55(g_tTex1du4a) - 57: 18 Load 20(g_sSamp) - 60: 59 SampledImage 56 57 - 61: 6(float) CompositeExtract 28 0 - 62: 6(float) CompositeExtract 28 1 - 63: 30(fvec3) CompositeConstruct 61 62 29 - 64: 6(float) CompositeExtract 63 2 - 65: 6(float) ImageSampleDrefImplicitLod 60 63 64 - Store 51(r14) 65 - 70: 67 Load 69(g_tTex2df4a) - 71: 18 Load 20(g_sSamp) - 74: 73 SampledImage 70 71 - 77: 6(float) CompositeExtract 76 0 - 78: 6(float) CompositeExtract 76 1 - 79: 6(float) CompositeExtract 76 2 - 80: 7(fvec4) CompositeConstruct 77 78 79 29 - 81: 6(float) CompositeExtract 80 3 - 82: 6(float) ImageSampleDrefImplicitLod 74 80 81 - Store 66(r30) 82 - 87: 84 Load 86(g_tTex2di4a) - 88: 18 Load 20(g_sSamp) - 91: 90 SampledImage 87 88 - 92: 6(float) CompositeExtract 76 0 - 93: 6(float) CompositeExtract 76 1 - 94: 6(float) CompositeExtract 76 2 - 95: 7(fvec4) CompositeConstruct 92 93 94 29 - 96: 6(float) CompositeExtract 95 3 - 97: 6(float) ImageSampleDrefImplicitLod 91 95 96 - Store 83(r32) 97 - 102: 99 Load 101(g_tTex2du4a) - 103: 18 Load 20(g_sSamp) - 106: 105 SampledImage 102 103 - 107: 6(float) CompositeExtract 76 0 - 108: 6(float) CompositeExtract 76 1 - 109: 6(float) CompositeExtract 76 2 - 110: 7(fvec4) CompositeConstruct 107 108 109 29 - 111: 6(float) CompositeExtract 110 3 - 112: 6(float) ImageSampleDrefImplicitLod 106 110 111 - Store 98(r34) 112 - 117: 114 Load 116(g_tTexcdf4a) - 118: 18 Load 20(g_sSamp) - 121: 120 SampledImage 117 118 - 124: 6(float) CompositeExtract 123 0 - 125: 6(float) CompositeExtract 123 1 - 126: 6(float) CompositeExtract 123 2 - 127: 6(float) CompositeExtract 123 3 - 128: 7(fvec4) CompositeConstruct 124 125 126 127 - 129: 6(float) ImageSampleDrefImplicitLod 121 128 29 - Store 113(r60) 129 - 134: 131 Load 133(g_tTexcdi4a) - 135: 18 Load 20(g_sSamp) - 138: 137 SampledImage 134 135 - 139: 6(float) CompositeExtract 123 0 - 140: 6(float) CompositeExtract 123 1 - 141: 6(float) CompositeExtract 123 2 - 142: 6(float) CompositeExtract 123 3 - 143: 7(fvec4) CompositeConstruct 139 140 141 142 - 144: 6(float) ImageSampleDrefImplicitLod 138 143 29 - Store 130(r62) 144 - 149: 146 Load 148(g_tTexcdu4a) - 150: 18 Load 20(g_sSamp) - 153: 152 SampledImage 149 150 - 154: 6(float) CompositeExtract 123 0 - 155: 6(float) CompositeExtract 123 1 - 156: 6(float) CompositeExtract 123 2 - 157: 6(float) CompositeExtract 123 3 - 158: 7(fvec4) CompositeConstruct 154 155 156 157 - 159: 6(float) ImageSampleDrefImplicitLod 153 158 29 - Store 145(r64) 159 - 166: 165(ptr) AccessChain 161(psout) 162 - Store 166 164 - 168: 12(ptr) AccessChain 161(psout) 167 - Store 168 163 - 169:8(PS_OUTPUT) Load 161(psout) - ReturnValue 169 + 23: 22 SampledImage 17 21 + 30: 6(float) CompositeExtract 27 0 + 31: 6(float) CompositeExtract 27 1 + 32: 29(fvec3) CompositeConstruct 30 31 28 + 33: 6(float) CompositeExtract 32 2 + 34: 6(float) ImageSampleDrefImplicitLod 23 32 33 + Store 13(r10) 34 + 40: 37 Load 39(g_tTex1di4a) + 41: 18 Load 20(g_sSamp) + 43: 42 SampledImage 40 41 + 44: 6(float) CompositeExtract 27 0 + 45: 6(float) CompositeExtract 27 1 + 46: 29(fvec3) CompositeConstruct 44 45 28 + 47: 6(float) CompositeExtract 46 2 + 48: 6(float) ImageSampleDrefImplicitLod 43 46 47 + Store 35(r12) 48 + 54: 51 Load 53(g_tTex1du4a) + 55: 18 Load 20(g_sSamp) + 57: 56 SampledImage 54 55 + 58: 6(float) CompositeExtract 27 0 + 59: 6(float) CompositeExtract 27 1 + 60: 29(fvec3) CompositeConstruct 58 59 28 + 61: 6(float) CompositeExtract 60 2 + 62: 6(float) ImageSampleDrefImplicitLod 57 60 61 + Store 49(r14) 62 + 67: 64 Load 66(g_tTex2df4a) + 68: 18 Load 20(g_sSamp) + 70: 69 SampledImage 67 68 + 73: 6(float) CompositeExtract 72 0 + 74: 6(float) CompositeExtract 72 1 + 75: 6(float) CompositeExtract 72 2 + 76: 7(fvec4) CompositeConstruct 73 74 75 28 + 77: 6(float) CompositeExtract 76 3 + 78: 6(float) ImageSampleDrefImplicitLod 70 76 77 + Store 63(r30) 78 + 83: 80 Load 82(g_tTex2di4a) + 84: 18 Load 20(g_sSamp) + 86: 85 SampledImage 83 84 + 87: 6(float) CompositeExtract 72 0 + 88: 6(float) CompositeExtract 72 1 + 89: 6(float) CompositeExtract 72 2 + 90: 7(fvec4) CompositeConstruct 87 88 89 28 + 91: 6(float) CompositeExtract 90 3 + 92: 6(float) ImageSampleDrefImplicitLod 86 90 91 + Store 79(r32) 92 + 97: 94 Load 96(g_tTex2du4a) + 98: 18 Load 20(g_sSamp) + 100: 99 SampledImage 97 98 + 101: 6(float) CompositeExtract 72 0 + 102: 6(float) CompositeExtract 72 1 + 103: 6(float) CompositeExtract 72 2 + 104: 7(fvec4) CompositeConstruct 101 102 103 28 + 105: 6(float) CompositeExtract 104 3 + 106: 6(float) ImageSampleDrefImplicitLod 100 104 105 + Store 93(r34) 106 + 111: 108 Load 110(g_tTexcdf4a) + 112: 18 Load 20(g_sSamp) + 114: 113 SampledImage 111 112 + 117: 6(float) CompositeExtract 116 0 + 118: 6(float) CompositeExtract 116 1 + 119: 6(float) CompositeExtract 116 2 + 120: 6(float) CompositeExtract 116 3 + 121: 7(fvec4) CompositeConstruct 117 118 119 120 + 122: 6(float) ImageSampleDrefImplicitLod 114 121 28 + Store 107(r60) 122 + 127: 124 Load 126(g_tTexcdi4a) + 128: 18 Load 20(g_sSamp) + 130: 129 SampledImage 127 128 + 131: 6(float) CompositeExtract 116 0 + 132: 6(float) CompositeExtract 116 1 + 133: 6(float) CompositeExtract 116 2 + 134: 6(float) CompositeExtract 116 3 + 135: 7(fvec4) CompositeConstruct 131 132 133 134 + 136: 6(float) ImageSampleDrefImplicitLod 130 135 28 + Store 123(r62) 136 + 141: 138 Load 140(g_tTexcdu4a) + 142: 18 Load 20(g_sSamp) + 144: 143 SampledImage 141 142 + 145: 6(float) CompositeExtract 116 0 + 146: 6(float) CompositeExtract 116 1 + 147: 6(float) CompositeExtract 116 2 + 148: 6(float) CompositeExtract 116 3 + 149: 7(fvec4) CompositeConstruct 145 146 147 148 + 150: 6(float) ImageSampleDrefImplicitLod 144 149 28 + Store 137(r64) 150 + 157: 156(ptr) AccessChain 152(psout) 153 + Store 157 155 + 159: 12(ptr) AccessChain 152(psout) 158 + Store 159 154 + 160:8(PS_OUTPUT) Load 152(psout) + ReturnValue 160 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out index 373423a..0daeb65 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out @@ -10,7 +10,7 @@ gl_FragCoord origin is upper left 0:42 'r00' ( temp float) 0:42 texture ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DShadow) -0:42 'g_tTex1df4' (layout( binding=0) uniform texture1D) +0:42 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec2 ( temp 2-component vector of float) 0:42 Constant: @@ -22,7 +22,7 @@ gl_FragCoord origin is upper left 0:43 'r02' ( temp float) 0:43 texture ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DShadow) -0:43 'g_tTex1di4' ( uniform itexture1D) +0:43 'g_tTex1di4' ( uniform itexture1DShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec2 ( temp 2-component vector of float) 0:43 Constant: @@ -34,7 +34,7 @@ gl_FragCoord origin is upper left 0:44 'r04' ( temp float) 0:44 texture ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DShadow) -0:44 'g_tTex1du4' ( uniform utexture1D) +0:44 'g_tTex1du4' ( uniform utexture1DShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec2 ( temp 2-component vector of float) 0:44 Constant: @@ -46,7 +46,7 @@ gl_FragCoord origin is upper left 0:47 'r20' ( temp float) 0:47 texture ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DShadow) -0:47 'g_tTex2df4' ( uniform texture2D) +0:47 'g_tTex2df4' ( uniform texture2DShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -59,7 +59,7 @@ gl_FragCoord origin is upper left 0:48 'r22' ( temp float) 0:48 texture ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DShadow) -0:48 'g_tTex2di4' ( uniform itexture2D) +0:48 'g_tTex2di4' ( uniform itexture2DShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -72,7 +72,7 @@ gl_FragCoord origin is upper left 0:49 'r24' ( temp float) 0:49 texture ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DShadow) -0:49 'g_tTex2du4' ( uniform utexture2D) +0:49 'g_tTex2du4' ( uniform utexture2DShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -85,7 +85,7 @@ gl_FragCoord origin is upper left 0:53 'r50' ( temp float) 0:53 texture ( temp float) 0:53 Construct combined texture-sampler ( temp samplerCubeShadow) -0:53 'g_tTexcdf4' ( uniform textureCube) +0:53 'g_tTexcdf4' ( uniform textureCubeShadow) 0:53 'g_sSamp' (layout( binding=0) uniform sampler) 0:53 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -99,7 +99,7 @@ gl_FragCoord origin is upper left 0:54 'r52' ( temp float) 0:54 texture ( temp float) 0:54 Construct combined texture-sampler ( temp isamplerCubeShadow) -0:54 'g_tTexcdi4' ( uniform itextureCube) +0:54 'g_tTexcdi4' ( uniform itextureCubeShadow) 0:54 'g_sSamp' (layout( binding=0) uniform sampler) 0:54 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -113,7 +113,7 @@ gl_FragCoord origin is upper left 0:55 'r54' ( temp float) 0:55 texture ( temp float) 0:55 Construct combined texture-sampler ( temp usamplerCubeShadow) -0:55 'g_tTexcdu4' ( uniform utextureCube) +0:55 'g_tTexcdu4' ( uniform utextureCubeShadow) 0:55 'g_sSamp' (layout( binding=0) uniform sampler) 0:55 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -149,31 +149,31 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 1 (const int) 0:? Linker Objects 0:? 'g_sSamp' (layout( binding=0) uniform sampler) -0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) -0:? 'g_tTex1di4' ( uniform itexture1D) -0:? 'g_tTex1du4' ( uniform utexture1D) -0:? 'g_tTex2df4' ( uniform texture2D) -0:? 'g_tTex2di4' ( uniform itexture2D) -0:? 'g_tTex2du4' ( uniform utexture2D) +0:? 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) +0:? 'g_tTex1di4' ( uniform itexture1DShadow) +0:? 'g_tTex1du4' ( uniform utexture1DShadow) +0:? 'g_tTex2df4' ( uniform texture2DShadow) +0:? 'g_tTex2di4' ( uniform itexture2DShadow) +0:? 'g_tTex2du4' ( uniform utexture2DShadow) 0:? 'g_tTex3df4' ( uniform texture3D) 0:? 'g_tTex3di4' ( uniform itexture3D) 0:? 'g_tTex3du4' ( uniform utexture3D) -0:? 'g_tTexcdf4' ( uniform textureCube) -0:? 'g_tTexcdi4' ( uniform itextureCube) -0:? 'g_tTexcdu4' ( uniform utextureCube) +0:? 'g_tTexcdf4' ( uniform textureCubeShadow) +0:? 'g_tTexcdi4' ( uniform itextureCubeShadow) +0:? 'g_tTexcdu4' ( uniform utextureCubeShadow) 0:? 'g_tTex1df4a' ( uniform texture1DArray) 0:? 'g_tTex1di4a' ( uniform itexture1DArray) 0:? 'g_tTex1du4a' ( uniform utexture1DArray) @@ -183,8 +183,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -201,7 +201,7 @@ gl_FragCoord origin is upper left 0:42 'r00' ( temp float) 0:42 texture ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DShadow) -0:42 'g_tTex1df4' (layout( binding=0) uniform texture1D) +0:42 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec2 ( temp 2-component vector of float) 0:42 Constant: @@ -213,7 +213,7 @@ gl_FragCoord origin is upper left 0:43 'r02' ( temp float) 0:43 texture ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DShadow) -0:43 'g_tTex1di4' ( uniform itexture1D) +0:43 'g_tTex1di4' ( uniform itexture1DShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec2 ( temp 2-component vector of float) 0:43 Constant: @@ -225,7 +225,7 @@ gl_FragCoord origin is upper left 0:44 'r04' ( temp float) 0:44 texture ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DShadow) -0:44 'g_tTex1du4' ( uniform utexture1D) +0:44 'g_tTex1du4' ( uniform utexture1DShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec2 ( temp 2-component vector of float) 0:44 Constant: @@ -237,7 +237,7 @@ gl_FragCoord origin is upper left 0:47 'r20' ( temp float) 0:47 texture ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DShadow) -0:47 'g_tTex2df4' ( uniform texture2D) +0:47 'g_tTex2df4' ( uniform texture2DShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -250,7 +250,7 @@ gl_FragCoord origin is upper left 0:48 'r22' ( temp float) 0:48 texture ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DShadow) -0:48 'g_tTex2di4' ( uniform itexture2D) +0:48 'g_tTex2di4' ( uniform itexture2DShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -263,7 +263,7 @@ gl_FragCoord origin is upper left 0:49 'r24' ( temp float) 0:49 texture ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DShadow) -0:49 'g_tTex2du4' ( uniform utexture2D) +0:49 'g_tTex2du4' ( uniform utexture2DShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -276,7 +276,7 @@ gl_FragCoord origin is upper left 0:53 'r50' ( temp float) 0:53 texture ( temp float) 0:53 Construct combined texture-sampler ( temp samplerCubeShadow) -0:53 'g_tTexcdf4' ( uniform textureCube) +0:53 'g_tTexcdf4' ( uniform textureCubeShadow) 0:53 'g_sSamp' (layout( binding=0) uniform sampler) 0:53 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -290,7 +290,7 @@ gl_FragCoord origin is upper left 0:54 'r52' ( temp float) 0:54 texture ( temp float) 0:54 Construct combined texture-sampler ( temp isamplerCubeShadow) -0:54 'g_tTexcdi4' ( uniform itextureCube) +0:54 'g_tTexcdi4' ( uniform itextureCubeShadow) 0:54 'g_sSamp' (layout( binding=0) uniform sampler) 0:54 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -304,7 +304,7 @@ gl_FragCoord origin is upper left 0:55 'r54' ( temp float) 0:55 texture ( temp float) 0:55 Construct combined texture-sampler ( temp usamplerCubeShadow) -0:55 'g_tTexcdu4' ( uniform utextureCube) +0:55 'g_tTexcdu4' ( uniform utextureCubeShadow) 0:55 'g_sSamp' (layout( binding=0) uniform sampler) 0:55 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -340,31 +340,31 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 1 (const int) 0:? Linker Objects 0:? 'g_sSamp' (layout( binding=0) uniform sampler) -0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) -0:? 'g_tTex1di4' ( uniform itexture1D) -0:? 'g_tTex1du4' ( uniform utexture1D) -0:? 'g_tTex2df4' ( uniform texture2D) -0:? 'g_tTex2di4' ( uniform itexture2D) -0:? 'g_tTex2du4' ( uniform utexture2D) +0:? 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) +0:? 'g_tTex1di4' ( uniform itexture1DShadow) +0:? 'g_tTex1du4' ( uniform utexture1DShadow) +0:? 'g_tTex2df4' ( uniform texture2DShadow) +0:? 'g_tTex2di4' ( uniform itexture2DShadow) +0:? 'g_tTex2du4' ( uniform utexture2DShadow) 0:? 'g_tTex3df4' ( uniform texture3D) 0:? 'g_tTex3di4' ( uniform itexture3D) 0:? 'g_tTex3du4' ( uniform utexture3D) -0:? 'g_tTexcdf4' ( uniform textureCube) -0:? 'g_tTexcdi4' ( uniform itextureCube) -0:? 'g_tTexcdu4' ( uniform utextureCube) +0:? 'g_tTexcdf4' ( uniform textureCubeShadow) +0:? 'g_tTexcdi4' ( uniform itextureCubeShadow) +0:? 'g_tTexcdu4' ( uniform utextureCubeShadow) 0:? 'g_tTex1df4a' ( uniform texture1DArray) 0:? 'g_tTex1di4a' ( uniform itexture1DArray) 0:? 'g_tTex1du4a' ( uniform utexture1DArray) @@ -374,19 +374,19 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 207 +// Generated by (magic number): 80003 +// Id's are bound by 198 Capability Shader Capability Sampled1D Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 164 168 + EntryPoint Fragment 4 "main" 155 159 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -397,64 +397,64 @@ gl_FragCoord origin is upper left Name 13 "r00" Name 16 "g_tTex1df4" Name 20 "g_sSamp" - Name 31 "r02" - Name 35 "g_tTex1di4" - Name 44 "r04" - Name 48 "g_tTex1du4" - Name 57 "r20" - Name 60 "g_tTex2df4" - Name 74 "r22" - Name 77 "g_tTex2di4" - Name 88 "r24" - Name 91 "g_tTex2du4" - Name 102 "r50" - Name 105 "g_tTexcdf4" - Name 119 "r52" - Name 122 "g_tTexcdi4" - Name 134 "r54" - Name 137 "g_tTexcdu4" - Name 150 "psout" - Name 161 "flattenTemp" - Name 164 "Color" - Name 168 "Depth" - Name 173 "g_tTex3df4" - Name 176 "g_tTex3di4" - Name 179 "g_tTex3du4" - Name 182 "g_tTex1df4a" - Name 185 "g_tTex1di4a" - Name 188 "g_tTex1du4a" - Name 191 "g_tTex2df4a" - Name 194 "g_tTex2di4a" - Name 197 "g_tTex2du4a" - Name 200 "g_tTexcdf4a" - Name 203 "g_tTexcdi4a" - Name 206 "g_tTexcdu4a" + Name 30 "r02" + Name 34 "g_tTex1di4" + Name 42 "r04" + Name 46 "g_tTex1du4" + Name 54 "r20" + Name 57 "g_tTex2df4" + Name 70 "r22" + Name 73 "g_tTex2di4" + Name 83 "r24" + Name 86 "g_tTex2du4" + Name 96 "r50" + Name 99 "g_tTexcdf4" + Name 112 "r52" + Name 115 "g_tTexcdi4" + Name 126 "r54" + Name 129 "g_tTexcdu4" + Name 141 "psout" + Name 152 "flattenTemp" + Name 155 "@entryPointOutput.Color" + Name 159 "@entryPointOutput.Depth" + Name 164 "g_tTex3df4" + Name 167 "g_tTex3di4" + Name 170 "g_tTex3du4" + Name 173 "g_tTex1df4a" + Name 176 "g_tTex1di4a" + Name 179 "g_tTex1du4a" + Name 182 "g_tTex2df4a" + Name 185 "g_tTex2di4a" + Name 188 "g_tTex2du4a" + Name 191 "g_tTexcdf4a" + Name 194 "g_tTexcdi4a" + Name 197 "g_tTexcdu4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 Decorate 20(g_sSamp) DescriptorSet 0 Decorate 20(g_sSamp) Binding 0 - Decorate 35(g_tTex1di4) DescriptorSet 0 - Decorate 48(g_tTex1du4) DescriptorSet 0 - Decorate 60(g_tTex2df4) DescriptorSet 0 - Decorate 77(g_tTex2di4) DescriptorSet 0 - Decorate 91(g_tTex2du4) DescriptorSet 0 - Decorate 105(g_tTexcdf4) DescriptorSet 0 - Decorate 122(g_tTexcdi4) DescriptorSet 0 - Decorate 137(g_tTexcdu4) DescriptorSet 0 - Decorate 164(Color) Location 0 - Decorate 168(Depth) BuiltIn FragDepth - Decorate 173(g_tTex3df4) DescriptorSet 0 - Decorate 176(g_tTex3di4) DescriptorSet 0 - Decorate 179(g_tTex3du4) DescriptorSet 0 - Decorate 182(g_tTex1df4a) DescriptorSet 0 - Decorate 185(g_tTex1di4a) DescriptorSet 0 - Decorate 188(g_tTex1du4a) DescriptorSet 0 - Decorate 191(g_tTex2df4a) DescriptorSet 0 - Decorate 194(g_tTex2di4a) DescriptorSet 0 - Decorate 197(g_tTex2du4a) DescriptorSet 0 - Decorate 200(g_tTexcdf4a) DescriptorSet 0 - Decorate 203(g_tTexcdi4a) DescriptorSet 0 - Decorate 206(g_tTexcdu4a) DescriptorSet 0 + Decorate 34(g_tTex1di4) DescriptorSet 0 + Decorate 46(g_tTex1du4) DescriptorSet 0 + Decorate 57(g_tTex2df4) DescriptorSet 0 + Decorate 73(g_tTex2di4) DescriptorSet 0 + Decorate 86(g_tTex2du4) DescriptorSet 0 + Decorate 99(g_tTexcdf4) DescriptorSet 0 + Decorate 115(g_tTexcdi4) DescriptorSet 0 + Decorate 129(g_tTexcdu4) DescriptorSet 0 + Decorate 155(@entryPointOutput.Color) Location 0 + Decorate 159(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 164(g_tTex3df4) DescriptorSet 0 + Decorate 167(g_tTex3di4) DescriptorSet 0 + Decorate 170(g_tTex3du4) DescriptorSet 0 + Decorate 173(g_tTex1df4a) DescriptorSet 0 + Decorate 176(g_tTex1di4a) DescriptorSet 0 + Decorate 179(g_tTex1du4a) DescriptorSet 0 + Decorate 182(g_tTex2df4a) DescriptorSet 0 + Decorate 185(g_tTex2di4a) DescriptorSet 0 + Decorate 188(g_tTex2du4a) DescriptorSet 0 + Decorate 191(g_tTexcdf4a) DescriptorSet 0 + Decorate 194(g_tTexcdi4a) DescriptorSet 0 + Decorate 197(g_tTexcdu4a) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -462,217 +462,208 @@ gl_FragCoord origin is upper left 8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float) 9: TypeFunction 8(PS_OUTPUT) 12: TypePointer Function 6(float) - 14: TypeImage 6(float) 1D sampled format:Unknown + 14: TypeImage 6(float) 1D depth sampled format:Unknown 15: TypePointer UniformConstant 14 16(g_tTex1df4): 15(ptr) Variable UniformConstant 18: TypeSampler 19: TypePointer UniformConstant 18 20(g_sSamp): 19(ptr) Variable UniformConstant - 22: TypeImage 6(float) 1D depth sampled format:Unknown - 23: TypeSampledImage 22 - 25: 6(float) Constant 1036831949 - 26: 6(float) Constant 1061158912 - 27: TypeVector 6(float) 2 - 32: TypeInt 32 1 - 33: TypeImage 32(int) 1D sampled format:Unknown - 34: TypePointer UniformConstant 33 - 35(g_tTex1di4): 34(ptr) Variable UniformConstant - 38: TypeImage 32(int) 1D depth sampled format:Unknown - 39: TypeSampledImage 38 - 45: TypeInt 32 0 - 46: TypeImage 45(int) 1D sampled format:Unknown - 47: TypePointer UniformConstant 46 - 48(g_tTex1du4): 47(ptr) Variable UniformConstant - 51: TypeImage 45(int) 1D depth sampled format:Unknown - 52: TypeSampledImage 51 - 58: TypeImage 6(float) 2D sampled format:Unknown - 59: TypePointer UniformConstant 58 - 60(g_tTex2df4): 59(ptr) Variable UniformConstant - 63: TypeImage 6(float) 2D depth sampled format:Unknown - 64: TypeSampledImage 63 - 66: 6(float) Constant 1045220557 - 67: 27(fvec2) ConstantComposite 25 66 - 68: TypeVector 6(float) 3 - 75: TypeImage 32(int) 2D sampled format:Unknown - 76: TypePointer UniformConstant 75 - 77(g_tTex2di4): 76(ptr) Variable UniformConstant - 80: TypeImage 32(int) 2D depth sampled format:Unknown - 81: TypeSampledImage 80 - 89: TypeImage 45(int) 2D sampled format:Unknown - 90: TypePointer UniformConstant 89 - 91(g_tTex2du4): 90(ptr) Variable UniformConstant - 94: TypeImage 45(int) 2D depth sampled format:Unknown - 95: TypeSampledImage 94 - 103: TypeImage 6(float) Cube sampled format:Unknown - 104: TypePointer UniformConstant 103 - 105(g_tTexcdf4): 104(ptr) Variable UniformConstant - 108: TypeImage 6(float) Cube depth sampled format:Unknown - 109: TypeSampledImage 108 - 111: 6(float) Constant 1050253722 - 112: 68(fvec3) ConstantComposite 25 66 111 - 120: TypeImage 32(int) Cube sampled format:Unknown - 121: TypePointer UniformConstant 120 - 122(g_tTexcdi4): 121(ptr) Variable UniformConstant - 125: TypeImage 32(int) Cube depth sampled format:Unknown - 126: TypeSampledImage 125 - 135: TypeImage 45(int) Cube sampled format:Unknown - 136: TypePointer UniformConstant 135 - 137(g_tTexcdu4): 136(ptr) Variable UniformConstant - 140: TypeImage 45(int) Cube depth sampled format:Unknown - 141: TypeSampledImage 140 - 149: TypePointer Function 8(PS_OUTPUT) - 151: 32(int) Constant 0 - 152: 6(float) Constant 1065353216 - 153: 7(fvec4) ConstantComposite 152 152 152 152 - 154: TypePointer Function 7(fvec4) - 156: 32(int) Constant 1 - 163: TypePointer Output 7(fvec4) - 164(Color): 163(ptr) Variable Output - 167: TypePointer Output 6(float) - 168(Depth): 167(ptr) Variable Output - 171: TypeImage 6(float) 3D sampled format:Unknown + 22: TypeSampledImage 14 + 24: 6(float) Constant 1036831949 + 25: 6(float) Constant 1061158912 + 26: TypeVector 6(float) 2 + 31: TypeInt 32 1 + 32: TypeImage 31(int) 1D depth sampled format:Unknown + 33: TypePointer UniformConstant 32 + 34(g_tTex1di4): 33(ptr) Variable UniformConstant + 37: TypeSampledImage 32 + 43: TypeInt 32 0 + 44: TypeImage 43(int) 1D depth sampled format:Unknown + 45: TypePointer UniformConstant 44 + 46(g_tTex1du4): 45(ptr) Variable UniformConstant + 49: TypeSampledImage 44 + 55: TypeImage 6(float) 2D depth sampled format:Unknown + 56: TypePointer UniformConstant 55 + 57(g_tTex2df4): 56(ptr) Variable UniformConstant + 60: TypeSampledImage 55 + 62: 6(float) Constant 1045220557 + 63: 26(fvec2) ConstantComposite 24 62 + 64: TypeVector 6(float) 3 + 71: TypeImage 31(int) 2D depth sampled format:Unknown + 72: TypePointer UniformConstant 71 + 73(g_tTex2di4): 72(ptr) Variable UniformConstant + 76: TypeSampledImage 71 + 84: TypeImage 43(int) 2D depth sampled format:Unknown + 85: TypePointer UniformConstant 84 + 86(g_tTex2du4): 85(ptr) Variable UniformConstant + 89: TypeSampledImage 84 + 97: TypeImage 6(float) Cube depth sampled format:Unknown + 98: TypePointer UniformConstant 97 + 99(g_tTexcdf4): 98(ptr) Variable UniformConstant + 102: TypeSampledImage 97 + 104: 6(float) Constant 1050253722 + 105: 64(fvec3) ConstantComposite 24 62 104 + 113: TypeImage 31(int) Cube depth sampled format:Unknown + 114: TypePointer UniformConstant 113 + 115(g_tTexcdi4): 114(ptr) Variable UniformConstant + 118: TypeSampledImage 113 + 127: TypeImage 43(int) Cube depth sampled format:Unknown + 128: TypePointer UniformConstant 127 + 129(g_tTexcdu4): 128(ptr) Variable UniformConstant + 132: TypeSampledImage 127 + 140: TypePointer Function 8(PS_OUTPUT) + 142: 31(int) Constant 0 + 143: 6(float) Constant 1065353216 + 144: 7(fvec4) ConstantComposite 143 143 143 143 + 145: TypePointer Function 7(fvec4) + 147: 31(int) Constant 1 + 154: TypePointer Output 7(fvec4) +155(@entryPointOutput.Color): 154(ptr) Variable Output + 158: TypePointer Output 6(float) +159(@entryPointOutput.Depth): 158(ptr) Variable Output + 162: TypeImage 6(float) 3D sampled format:Unknown + 163: TypePointer UniformConstant 162 + 164(g_tTex3df4): 163(ptr) Variable UniformConstant + 165: TypeImage 31(int) 3D sampled format:Unknown + 166: TypePointer UniformConstant 165 + 167(g_tTex3di4): 166(ptr) Variable UniformConstant + 168: TypeImage 43(int) 3D sampled format:Unknown + 169: TypePointer UniformConstant 168 + 170(g_tTex3du4): 169(ptr) Variable UniformConstant + 171: TypeImage 6(float) 1D array sampled format:Unknown 172: TypePointer UniformConstant 171 - 173(g_tTex3df4): 172(ptr) Variable UniformConstant - 174: TypeImage 32(int) 3D sampled format:Unknown +173(g_tTex1df4a): 172(ptr) Variable UniformConstant + 174: TypeImage 31(int) 1D array sampled format:Unknown 175: TypePointer UniformConstant 174 - 176(g_tTex3di4): 175(ptr) Variable UniformConstant - 177: TypeImage 45(int) 3D sampled format:Unknown +176(g_tTex1di4a): 175(ptr) Variable UniformConstant + 177: TypeImage 43(int) 1D array sampled format:Unknown 178: TypePointer UniformConstant 177 - 179(g_tTex3du4): 178(ptr) Variable UniformConstant - 180: TypeImage 6(float) 1D array sampled format:Unknown +179(g_tTex1du4a): 178(ptr) Variable UniformConstant + 180: TypeImage 6(float) 2D array sampled format:Unknown 181: TypePointer UniformConstant 180 -182(g_tTex1df4a): 181(ptr) Variable UniformConstant - 183: TypeImage 32(int) 1D array sampled format:Unknown +182(g_tTex2df4a): 181(ptr) Variable UniformConstant + 183: TypeImage 31(int) 2D array sampled format:Unknown 184: TypePointer UniformConstant 183 -185(g_tTex1di4a): 184(ptr) Variable UniformConstant - 186: TypeImage 45(int) 1D array sampled format:Unknown +185(g_tTex2di4a): 184(ptr) Variable UniformConstant + 186: TypeImage 43(int) 2D array sampled format:Unknown 187: TypePointer UniformConstant 186 -188(g_tTex1du4a): 187(ptr) Variable UniformConstant - 189: TypeImage 6(float) 2D array sampled format:Unknown +188(g_tTex2du4a): 187(ptr) Variable UniformConstant + 189: TypeImage 6(float) Cube array sampled format:Unknown 190: TypePointer UniformConstant 189 -191(g_tTex2df4a): 190(ptr) Variable UniformConstant - 192: TypeImage 32(int) 2D array sampled format:Unknown +191(g_tTexcdf4a): 190(ptr) Variable UniformConstant + 192: TypeImage 31(int) Cube array sampled format:Unknown 193: TypePointer UniformConstant 192 -194(g_tTex2di4a): 193(ptr) Variable UniformConstant - 195: TypeImage 45(int) 2D array sampled format:Unknown +194(g_tTexcdi4a): 193(ptr) Variable UniformConstant + 195: TypeImage 43(int) Cube array sampled format:Unknown 196: TypePointer UniformConstant 195 -197(g_tTex2du4a): 196(ptr) Variable UniformConstant - 198: TypeImage 6(float) Cube array sampled format:Unknown - 199: TypePointer UniformConstant 198 -200(g_tTexcdf4a): 199(ptr) Variable UniformConstant - 201: TypeImage 32(int) Cube array sampled format:Unknown - 202: TypePointer UniformConstant 201 -203(g_tTexcdi4a): 202(ptr) Variable UniformConstant - 204: TypeImage 45(int) Cube array sampled format:Unknown - 205: TypePointer UniformConstant 204 -206(g_tTexcdu4a): 205(ptr) Variable UniformConstant +197(g_tTexcdu4a): 196(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label -161(flattenTemp): 149(ptr) Variable Function - 162:8(PS_OUTPUT) FunctionCall 10(@main() - Store 161(flattenTemp) 162 - 165: 154(ptr) AccessChain 161(flattenTemp) 151 - 166: 7(fvec4) Load 165 - Store 164(Color) 166 - 169: 12(ptr) AccessChain 161(flattenTemp) 156 - 170: 6(float) Load 169 - Store 168(Depth) 170 +152(flattenTemp): 140(ptr) Variable Function + 153:8(PS_OUTPUT) FunctionCall 10(@main() + Store 152(flattenTemp) 153 + 156: 145(ptr) AccessChain 152(flattenTemp) 142 + 157: 7(fvec4) Load 156 + Store 155(@entryPointOutput.Color) 157 + 160: 12(ptr) AccessChain 152(flattenTemp) 147 + 161: 6(float) Load 160 + Store 159(@entryPointOutput.Depth) 161 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 11: Label 13(r00): 12(ptr) Variable Function - 31(r02): 12(ptr) Variable Function - 44(r04): 12(ptr) Variable Function - 57(r20): 12(ptr) Variable Function - 74(r22): 12(ptr) Variable Function - 88(r24): 12(ptr) Variable Function - 102(r50): 12(ptr) Variable Function - 119(r52): 12(ptr) Variable Function - 134(r54): 12(ptr) Variable Function - 150(psout): 149(ptr) Variable Function + 30(r02): 12(ptr) Variable Function + 42(r04): 12(ptr) Variable Function + 54(r20): 12(ptr) Variable Function + 70(r22): 12(ptr) Variable Function + 83(r24): 12(ptr) Variable Function + 96(r50): 12(ptr) Variable Function + 112(r52): 12(ptr) Variable Function + 126(r54): 12(ptr) Variable Function + 141(psout): 140(ptr) Variable Function 17: 14 Load 16(g_tTex1df4) 21: 18 Load 20(g_sSamp) - 24: 23 SampledImage 17 21 - 28: 27(fvec2) CompositeConstruct 25 26 - 29: 6(float) CompositeExtract 28 1 - 30: 6(float) ImageSampleDrefImplicitLod 24 28 29 - Store 13(r00) 30 - 36: 33 Load 35(g_tTex1di4) - 37: 18 Load 20(g_sSamp) - 40: 39 SampledImage 36 37 - 41: 27(fvec2) CompositeConstruct 25 26 - 42: 6(float) CompositeExtract 41 1 - 43: 6(float) ImageSampleDrefImplicitLod 40 41 42 - Store 31(r02) 43 - 49: 46 Load 48(g_tTex1du4) - 50: 18 Load 20(g_sSamp) - 53: 52 SampledImage 49 50 - 54: 27(fvec2) CompositeConstruct 25 26 - 55: 6(float) CompositeExtract 54 1 - 56: 6(float) ImageSampleDrefImplicitLod 53 54 55 - Store 44(r04) 56 - 61: 58 Load 60(g_tTex2df4) - 62: 18 Load 20(g_sSamp) - 65: 64 SampledImage 61 62 - 69: 6(float) CompositeExtract 67 0 - 70: 6(float) CompositeExtract 67 1 - 71: 68(fvec3) CompositeConstruct 69 70 26 - 72: 6(float) CompositeExtract 71 2 - 73: 6(float) ImageSampleDrefImplicitLod 65 71 72 - Store 57(r20) 73 - 78: 75 Load 77(g_tTex2di4) - 79: 18 Load 20(g_sSamp) - 82: 81 SampledImage 78 79 - 83: 6(float) CompositeExtract 67 0 - 84: 6(float) CompositeExtract 67 1 - 85: 68(fvec3) CompositeConstruct 83 84 26 - 86: 6(float) CompositeExtract 85 2 - 87: 6(float) ImageSampleDrefImplicitLod 82 85 86 - Store 74(r22) 87 - 92: 89 Load 91(g_tTex2du4) - 93: 18 Load 20(g_sSamp) - 96: 95 SampledImage 92 93 - 97: 6(float) CompositeExtract 67 0 - 98: 6(float) CompositeExtract 67 1 - 99: 68(fvec3) CompositeConstruct 97 98 26 - 100: 6(float) CompositeExtract 99 2 - 101: 6(float) ImageSampleDrefImplicitLod 96 99 100 - Store 88(r24) 101 - 106: 103 Load 105(g_tTexcdf4) - 107: 18 Load 20(g_sSamp) - 110: 109 SampledImage 106 107 - 113: 6(float) CompositeExtract 112 0 - 114: 6(float) CompositeExtract 112 1 - 115: 6(float) CompositeExtract 112 2 - 116: 7(fvec4) CompositeConstruct 113 114 115 26 - 117: 6(float) CompositeExtract 116 3 - 118: 6(float) ImageSampleDrefImplicitLod 110 116 117 - Store 102(r50) 118 - 123: 120 Load 122(g_tTexcdi4) - 124: 18 Load 20(g_sSamp) - 127: 126 SampledImage 123 124 - 128: 6(float) CompositeExtract 112 0 - 129: 6(float) CompositeExtract 112 1 - 130: 6(float) CompositeExtract 112 2 - 131: 7(fvec4) CompositeConstruct 128 129 130 26 - 132: 6(float) CompositeExtract 131 3 - 133: 6(float) ImageSampleDrefImplicitLod 127 131 132 - Store 119(r52) 133 - 138: 135 Load 137(g_tTexcdu4) - 139: 18 Load 20(g_sSamp) - 142: 141 SampledImage 138 139 - 143: 6(float) CompositeExtract 112 0 - 144: 6(float) CompositeExtract 112 1 - 145: 6(float) CompositeExtract 112 2 - 146: 7(fvec4) CompositeConstruct 143 144 145 26 - 147: 6(float) CompositeExtract 146 3 - 148: 6(float) ImageSampleDrefImplicitLod 142 146 147 - Store 134(r54) 148 - 155: 154(ptr) AccessChain 150(psout) 151 - Store 155 153 - 157: 12(ptr) AccessChain 150(psout) 156 - Store 157 152 - 158:8(PS_OUTPUT) Load 150(psout) - ReturnValue 158 + 23: 22 SampledImage 17 21 + 27: 26(fvec2) CompositeConstruct 24 25 + 28: 6(float) CompositeExtract 27 1 + 29: 6(float) ImageSampleDrefImplicitLod 23 27 28 + Store 13(r00) 29 + 35: 32 Load 34(g_tTex1di4) + 36: 18 Load 20(g_sSamp) + 38: 37 SampledImage 35 36 + 39: 26(fvec2) CompositeConstruct 24 25 + 40: 6(float) CompositeExtract 39 1 + 41: 6(float) ImageSampleDrefImplicitLod 38 39 40 + Store 30(r02) 41 + 47: 44 Load 46(g_tTex1du4) + 48: 18 Load 20(g_sSamp) + 50: 49 SampledImage 47 48 + 51: 26(fvec2) CompositeConstruct 24 25 + 52: 6(float) CompositeExtract 51 1 + 53: 6(float) ImageSampleDrefImplicitLod 50 51 52 + Store 42(r04) 53 + 58: 55 Load 57(g_tTex2df4) + 59: 18 Load 20(g_sSamp) + 61: 60 SampledImage 58 59 + 65: 6(float) CompositeExtract 63 0 + 66: 6(float) CompositeExtract 63 1 + 67: 64(fvec3) CompositeConstruct 65 66 25 + 68: 6(float) CompositeExtract 67 2 + 69: 6(float) ImageSampleDrefImplicitLod 61 67 68 + Store 54(r20) 69 + 74: 71 Load 73(g_tTex2di4) + 75: 18 Load 20(g_sSamp) + 77: 76 SampledImage 74 75 + 78: 6(float) CompositeExtract 63 0 + 79: 6(float) CompositeExtract 63 1 + 80: 64(fvec3) CompositeConstruct 78 79 25 + 81: 6(float) CompositeExtract 80 2 + 82: 6(float) ImageSampleDrefImplicitLod 77 80 81 + Store 70(r22) 82 + 87: 84 Load 86(g_tTex2du4) + 88: 18 Load 20(g_sSamp) + 90: 89 SampledImage 87 88 + 91: 6(float) CompositeExtract 63 0 + 92: 6(float) CompositeExtract 63 1 + 93: 64(fvec3) CompositeConstruct 91 92 25 + 94: 6(float) CompositeExtract 93 2 + 95: 6(float) ImageSampleDrefImplicitLod 90 93 94 + Store 83(r24) 95 + 100: 97 Load 99(g_tTexcdf4) + 101: 18 Load 20(g_sSamp) + 103: 102 SampledImage 100 101 + 106: 6(float) CompositeExtract 105 0 + 107: 6(float) CompositeExtract 105 1 + 108: 6(float) CompositeExtract 105 2 + 109: 7(fvec4) CompositeConstruct 106 107 108 25 + 110: 6(float) CompositeExtract 109 3 + 111: 6(float) ImageSampleDrefImplicitLod 103 109 110 + Store 96(r50) 111 + 116: 113 Load 115(g_tTexcdi4) + 117: 18 Load 20(g_sSamp) + 119: 118 SampledImage 116 117 + 120: 6(float) CompositeExtract 105 0 + 121: 6(float) CompositeExtract 105 1 + 122: 6(float) CompositeExtract 105 2 + 123: 7(fvec4) CompositeConstruct 120 121 122 25 + 124: 6(float) CompositeExtract 123 3 + 125: 6(float) ImageSampleDrefImplicitLod 119 123 124 + Store 112(r52) 125 + 130: 127 Load 129(g_tTexcdu4) + 131: 18 Load 20(g_sSamp) + 133: 132 SampledImage 130 131 + 134: 6(float) CompositeExtract 105 0 + 135: 6(float) CompositeExtract 105 1 + 136: 6(float) CompositeExtract 105 2 + 137: 7(fvec4) CompositeConstruct 134 135 136 25 + 138: 6(float) CompositeExtract 137 3 + 139: 6(float) ImageSampleDrefImplicitLod 133 137 138 + Store 126(r54) 139 + 146: 145(ptr) AccessChain 141(psout) 142 + Store 146 144 + 148: 12(ptr) AccessChain 141(psout) 147 + Store 148 143 + 149:8(PS_OUTPUT) Load 141(psout) + ReturnValue 149 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out index 290c8b4..ed20ddc 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out @@ -10,7 +10,7 @@ gl_FragCoord origin is upper left 0:42 'r01' ( temp float) 0:42 textureOffset ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DShadow) -0:42 'g_tTex1df4' (layout( binding=0) uniform texture1D) +0:42 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec2 ( temp 2-component vector of float) 0:42 Constant: @@ -24,7 +24,7 @@ gl_FragCoord origin is upper left 0:43 'r03' ( temp float) 0:43 textureOffset ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DShadow) -0:43 'g_tTex1di4' ( uniform itexture1D) +0:43 'g_tTex1di4' ( uniform itexture1DShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec2 ( temp 2-component vector of float) 0:43 Constant: @@ -38,7 +38,7 @@ gl_FragCoord origin is upper left 0:44 'r05' ( temp float) 0:44 textureOffset ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DShadow) -0:44 'g_tTex1du4' ( uniform utexture1D) +0:44 'g_tTex1du4' ( uniform utexture1DShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec2 ( temp 2-component vector of float) 0:44 Constant: @@ -52,7 +52,7 @@ gl_FragCoord origin is upper left 0:47 'r21' ( temp float) 0:47 textureOffset ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DShadow) -0:47 'g_tTex2df4' ( uniform texture2D) +0:47 'g_tTex2df4' ( uniform texture2DShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -68,7 +68,7 @@ gl_FragCoord origin is upper left 0:48 'r23' ( temp float) 0:48 textureOffset ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DShadow) -0:48 'g_tTex2di4' ( uniform itexture2D) +0:48 'g_tTex2di4' ( uniform itexture2DShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -84,7 +84,7 @@ gl_FragCoord origin is upper left 0:49 'r25' ( temp float) 0:49 textureOffset ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DShadow) -0:49 'g_tTex2du4' ( uniform utexture2D) +0:49 'g_tTex2du4' ( uniform utexture2DShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -122,25 +122,25 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 1 (const int) 0:? Linker Objects 0:? 'g_sSamp' (layout( binding=0) uniform sampler) -0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) -0:? 'g_tTex1di4' ( uniform itexture1D) -0:? 'g_tTex1du4' ( uniform utexture1D) -0:? 'g_tTex2df4' ( uniform texture2D) -0:? 'g_tTex2di4' ( uniform itexture2D) -0:? 'g_tTex2du4' ( uniform utexture2D) +0:? 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) +0:? 'g_tTex1di4' ( uniform itexture1DShadow) +0:? 'g_tTex1du4' ( uniform utexture1DShadow) +0:? 'g_tTex2df4' ( uniform texture2DShadow) +0:? 'g_tTex2di4' ( uniform itexture2DShadow) +0:? 'g_tTex2du4' ( uniform utexture2DShadow) 0:? 'g_tTex3df4' ( uniform texture3D) 0:? 'g_tTex3di4' ( uniform itexture3D) 0:? 'g_tTex3du4' ( uniform utexture3D) @@ -156,8 +156,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -174,7 +174,7 @@ gl_FragCoord origin is upper left 0:42 'r01' ( temp float) 0:42 textureOffset ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DShadow) -0:42 'g_tTex1df4' (layout( binding=0) uniform texture1D) +0:42 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec2 ( temp 2-component vector of float) 0:42 Constant: @@ -188,7 +188,7 @@ gl_FragCoord origin is upper left 0:43 'r03' ( temp float) 0:43 textureOffset ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DShadow) -0:43 'g_tTex1di4' ( uniform itexture1D) +0:43 'g_tTex1di4' ( uniform itexture1DShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec2 ( temp 2-component vector of float) 0:43 Constant: @@ -202,7 +202,7 @@ gl_FragCoord origin is upper left 0:44 'r05' ( temp float) 0:44 textureOffset ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DShadow) -0:44 'g_tTex1du4' ( uniform utexture1D) +0:44 'g_tTex1du4' ( uniform utexture1DShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec2 ( temp 2-component vector of float) 0:44 Constant: @@ -216,7 +216,7 @@ gl_FragCoord origin is upper left 0:47 'r21' ( temp float) 0:47 textureOffset ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DShadow) -0:47 'g_tTex2df4' ( uniform texture2D) +0:47 'g_tTex2df4' ( uniform texture2DShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -232,7 +232,7 @@ gl_FragCoord origin is upper left 0:48 'r23' ( temp float) 0:48 textureOffset ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DShadow) -0:48 'g_tTex2di4' ( uniform itexture2D) +0:48 'g_tTex2di4' ( uniform itexture2DShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -248,7 +248,7 @@ gl_FragCoord origin is upper left 0:49 'r25' ( temp float) 0:49 textureOffset ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DShadow) -0:49 'g_tTex2du4' ( uniform utexture2D) +0:49 'g_tTex2du4' ( uniform utexture2DShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -286,25 +286,25 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 1 (const int) 0:? Linker Objects 0:? 'g_sSamp' (layout( binding=0) uniform sampler) -0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) -0:? 'g_tTex1di4' ( uniform itexture1D) -0:? 'g_tTex1du4' ( uniform utexture1D) -0:? 'g_tTex2df4' ( uniform texture2D) -0:? 'g_tTex2di4' ( uniform itexture2D) -0:? 'g_tTex2du4' ( uniform utexture2D) +0:? 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) +0:? 'g_tTex1di4' ( uniform itexture1DShadow) +0:? 'g_tTex1du4' ( uniform utexture1DShadow) +0:? 'g_tTex2df4' ( uniform texture2DShadow) +0:? 'g_tTex2di4' ( uniform itexture2DShadow) +0:? 'g_tTex2du4' ( uniform utexture2DShadow) 0:? 'g_tTex3df4' ( uniform texture3D) 0:? 'g_tTex3di4' ( uniform itexture3D) 0:? 'g_tTex3du4' ( uniform utexture3D) @@ -320,19 +320,19 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 173 +// Generated by (magic number): 80003 +// Id's are bound by 167 Capability Shader Capability Sampled1D Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 121 125 + EntryPoint Fragment 4 "main" 115 119 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -343,61 +343,61 @@ gl_FragCoord origin is upper left Name 13 "r01" Name 16 "g_tTex1df4" Name 20 "g_sSamp" - Name 33 "r03" - Name 36 "g_tTex1di4" - Name 45 "r05" - Name 49 "g_tTex1du4" - Name 58 "r21" - Name 61 "g_tTex2df4" - Name 78 "r23" - Name 81 "g_tTex2di4" - Name 92 "r25" - Name 95 "g_tTex2du4" - Name 107 "psout" - Name 118 "flattenTemp" - Name 121 "Color" - Name 125 "Depth" - Name 130 "g_tTex3df4" - Name 133 "g_tTex3di4" - Name 136 "g_tTex3du4" - Name 139 "g_tTexcdf4" - Name 142 "g_tTexcdi4" - Name 145 "g_tTexcdu4" - Name 148 "g_tTex1df4a" - Name 151 "g_tTex1di4a" - Name 154 "g_tTex1du4a" - Name 157 "g_tTex2df4a" - Name 160 "g_tTex2di4a" - Name 163 "g_tTex2du4a" - Name 166 "g_tTexcdf4a" - Name 169 "g_tTexcdi4a" - Name 172 "g_tTexcdu4a" + Name 32 "r03" + Name 35 "g_tTex1di4" + Name 43 "r05" + Name 47 "g_tTex1du4" + Name 55 "r21" + Name 58 "g_tTex2df4" + Name 74 "r23" + Name 77 "g_tTex2di4" + Name 87 "r25" + Name 90 "g_tTex2du4" + Name 101 "psout" + Name 112 "flattenTemp" + Name 115 "@entryPointOutput.Color" + Name 119 "@entryPointOutput.Depth" + Name 124 "g_tTex3df4" + Name 127 "g_tTex3di4" + Name 130 "g_tTex3du4" + Name 133 "g_tTexcdf4" + Name 136 "g_tTexcdi4" + Name 139 "g_tTexcdu4" + Name 142 "g_tTex1df4a" + Name 145 "g_tTex1di4a" + Name 148 "g_tTex1du4a" + Name 151 "g_tTex2df4a" + Name 154 "g_tTex2di4a" + Name 157 "g_tTex2du4a" + Name 160 "g_tTexcdf4a" + Name 163 "g_tTexcdi4a" + Name 166 "g_tTexcdu4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 Decorate 20(g_sSamp) DescriptorSet 0 Decorate 20(g_sSamp) Binding 0 - Decorate 36(g_tTex1di4) DescriptorSet 0 - Decorate 49(g_tTex1du4) DescriptorSet 0 - Decorate 61(g_tTex2df4) DescriptorSet 0 - Decorate 81(g_tTex2di4) DescriptorSet 0 - Decorate 95(g_tTex2du4) DescriptorSet 0 - Decorate 121(Color) Location 0 - Decorate 125(Depth) BuiltIn FragDepth - Decorate 130(g_tTex3df4) DescriptorSet 0 - Decorate 133(g_tTex3di4) DescriptorSet 0 - Decorate 136(g_tTex3du4) DescriptorSet 0 - Decorate 139(g_tTexcdf4) DescriptorSet 0 - Decorate 142(g_tTexcdi4) DescriptorSet 0 - Decorate 145(g_tTexcdu4) DescriptorSet 0 - Decorate 148(g_tTex1df4a) DescriptorSet 0 - Decorate 151(g_tTex1di4a) DescriptorSet 0 - Decorate 154(g_tTex1du4a) DescriptorSet 0 - Decorate 157(g_tTex2df4a) DescriptorSet 0 - Decorate 160(g_tTex2di4a) DescriptorSet 0 - Decorate 163(g_tTex2du4a) DescriptorSet 0 - Decorate 166(g_tTexcdf4a) DescriptorSet 0 - Decorate 169(g_tTexcdi4a) DescriptorSet 0 - Decorate 172(g_tTexcdu4a) DescriptorSet 0 + Decorate 35(g_tTex1di4) DescriptorSet 0 + Decorate 47(g_tTex1du4) DescriptorSet 0 + Decorate 58(g_tTex2df4) DescriptorSet 0 + Decorate 77(g_tTex2di4) DescriptorSet 0 + Decorate 90(g_tTex2du4) DescriptorSet 0 + Decorate 115(@entryPointOutput.Color) Location 0 + Decorate 119(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 124(g_tTex3df4) DescriptorSet 0 + Decorate 127(g_tTex3di4) DescriptorSet 0 + Decorate 130(g_tTex3du4) DescriptorSet 0 + Decorate 133(g_tTexcdf4) DescriptorSet 0 + Decorate 136(g_tTexcdi4) DescriptorSet 0 + Decorate 139(g_tTexcdu4) DescriptorSet 0 + Decorate 142(g_tTex1df4a) DescriptorSet 0 + Decorate 145(g_tTex1di4a) DescriptorSet 0 + Decorate 148(g_tTex1du4a) DescriptorSet 0 + Decorate 151(g_tTex2df4a) DescriptorSet 0 + Decorate 154(g_tTex2di4a) DescriptorSet 0 + Decorate 157(g_tTex2du4a) DescriptorSet 0 + Decorate 160(g_tTexcdf4a) DescriptorSet 0 + Decorate 163(g_tTexcdi4a) DescriptorSet 0 + Decorate 166(g_tTexcdu4a) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -405,180 +405,174 @@ gl_FragCoord origin is upper left 8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float) 9: TypeFunction 8(PS_OUTPUT) 12: TypePointer Function 6(float) - 14: TypeImage 6(float) 1D sampled format:Unknown + 14: TypeImage 6(float) 1D depth sampled format:Unknown 15: TypePointer UniformConstant 14 16(g_tTex1df4): 15(ptr) Variable UniformConstant 18: TypeSampler 19: TypePointer UniformConstant 18 20(g_sSamp): 19(ptr) Variable UniformConstant - 22: TypeImage 6(float) 1D depth sampled format:Unknown - 23: TypeSampledImage 22 - 25: 6(float) Constant 1036831949 - 26: 6(float) Constant 1061158912 - 27: TypeVector 6(float) 2 - 29: TypeInt 32 1 - 30: 29(int) Constant 2 - 34: TypeImage 29(int) 1D sampled format:Unknown - 35: TypePointer UniformConstant 34 - 36(g_tTex1di4): 35(ptr) Variable UniformConstant - 39: TypeImage 29(int) 1D depth sampled format:Unknown - 40: TypeSampledImage 39 - 46: TypeInt 32 0 - 47: TypeImage 46(int) 1D sampled format:Unknown - 48: TypePointer UniformConstant 47 - 49(g_tTex1du4): 48(ptr) Variable UniformConstant - 52: TypeImage 46(int) 1D depth sampled format:Unknown - 53: TypeSampledImage 52 - 59: TypeImage 6(float) 2D sampled format:Unknown - 60: TypePointer UniformConstant 59 - 61(g_tTex2df4): 60(ptr) Variable UniformConstant - 64: TypeImage 6(float) 2D depth sampled format:Unknown - 65: TypeSampledImage 64 - 67: 6(float) Constant 1045220557 - 68: 27(fvec2) ConstantComposite 25 67 - 69: TypeVector 6(float) 3 - 73: TypeVector 29(int) 2 - 74: 29(int) Constant 3 - 75: 73(ivec2) ConstantComposite 30 74 - 79: TypeImage 29(int) 2D sampled format:Unknown - 80: TypePointer UniformConstant 79 - 81(g_tTex2di4): 80(ptr) Variable UniformConstant - 84: TypeImage 29(int) 2D depth sampled format:Unknown - 85: TypeSampledImage 84 - 93: TypeImage 46(int) 2D sampled format:Unknown - 94: TypePointer UniformConstant 93 - 95(g_tTex2du4): 94(ptr) Variable UniformConstant - 98: TypeImage 46(int) 2D depth sampled format:Unknown - 99: TypeSampledImage 98 - 106: TypePointer Function 8(PS_OUTPUT) - 108: 29(int) Constant 0 - 109: 6(float) Constant 1065353216 - 110: 7(fvec4) ConstantComposite 109 109 109 109 - 111: TypePointer Function 7(fvec4) - 113: 29(int) Constant 1 - 120: TypePointer Output 7(fvec4) - 121(Color): 120(ptr) Variable Output - 124: TypePointer Output 6(float) - 125(Depth): 124(ptr) Variable Output - 128: TypeImage 6(float) 3D sampled format:Unknown + 22: TypeSampledImage 14 + 24: 6(float) Constant 1036831949 + 25: 6(float) Constant 1061158912 + 26: TypeVector 6(float) 2 + 28: TypeInt 32 1 + 29: 28(int) Constant 2 + 33: TypeImage 28(int) 1D depth sampled format:Unknown + 34: TypePointer UniformConstant 33 + 35(g_tTex1di4): 34(ptr) Variable UniformConstant + 38: TypeSampledImage 33 + 44: TypeInt 32 0 + 45: TypeImage 44(int) 1D depth sampled format:Unknown + 46: TypePointer UniformConstant 45 + 47(g_tTex1du4): 46(ptr) Variable UniformConstant + 50: TypeSampledImage 45 + 56: TypeImage 6(float) 2D depth sampled format:Unknown + 57: TypePointer UniformConstant 56 + 58(g_tTex2df4): 57(ptr) Variable UniformConstant + 61: TypeSampledImage 56 + 63: 6(float) Constant 1045220557 + 64: 26(fvec2) ConstantComposite 24 63 + 65: TypeVector 6(float) 3 + 69: TypeVector 28(int) 2 + 70: 28(int) Constant 3 + 71: 69(ivec2) ConstantComposite 29 70 + 75: TypeImage 28(int) 2D depth sampled format:Unknown + 76: TypePointer UniformConstant 75 + 77(g_tTex2di4): 76(ptr) Variable UniformConstant + 80: TypeSampledImage 75 + 88: TypeImage 44(int) 2D depth sampled format:Unknown + 89: TypePointer UniformConstant 88 + 90(g_tTex2du4): 89(ptr) Variable UniformConstant + 93: TypeSampledImage 88 + 100: TypePointer Function 8(PS_OUTPUT) + 102: 28(int) Constant 0 + 103: 6(float) Constant 1065353216 + 104: 7(fvec4) ConstantComposite 103 103 103 103 + 105: TypePointer Function 7(fvec4) + 107: 28(int) Constant 1 + 114: TypePointer Output 7(fvec4) +115(@entryPointOutput.Color): 114(ptr) Variable Output + 118: TypePointer Output 6(float) +119(@entryPointOutput.Depth): 118(ptr) Variable Output + 122: TypeImage 6(float) 3D sampled format:Unknown + 123: TypePointer UniformConstant 122 + 124(g_tTex3df4): 123(ptr) Variable UniformConstant + 125: TypeImage 28(int) 3D sampled format:Unknown + 126: TypePointer UniformConstant 125 + 127(g_tTex3di4): 126(ptr) Variable UniformConstant + 128: TypeImage 44(int) 3D sampled format:Unknown 129: TypePointer UniformConstant 128 - 130(g_tTex3df4): 129(ptr) Variable UniformConstant - 131: TypeImage 29(int) 3D sampled format:Unknown + 130(g_tTex3du4): 129(ptr) Variable UniformConstant + 131: TypeImage 6(float) Cube sampled format:Unknown 132: TypePointer UniformConstant 131 - 133(g_tTex3di4): 132(ptr) Variable UniformConstant - 134: TypeImage 46(int) 3D sampled format:Unknown + 133(g_tTexcdf4): 132(ptr) Variable UniformConstant + 134: TypeImage 28(int) Cube sampled format:Unknown 135: TypePointer UniformConstant 134 - 136(g_tTex3du4): 135(ptr) Variable UniformConstant - 137: TypeImage 6(float) Cube sampled format:Unknown + 136(g_tTexcdi4): 135(ptr) Variable UniformConstant + 137: TypeImage 44(int) Cube sampled format:Unknown 138: TypePointer UniformConstant 137 - 139(g_tTexcdf4): 138(ptr) Variable UniformConstant - 140: TypeImage 29(int) Cube sampled format:Unknown + 139(g_tTexcdu4): 138(ptr) Variable UniformConstant + 140: TypeImage 6(float) 1D array sampled format:Unknown 141: TypePointer UniformConstant 140 - 142(g_tTexcdi4): 141(ptr) Variable UniformConstant - 143: TypeImage 46(int) Cube sampled format:Unknown +142(g_tTex1df4a): 141(ptr) Variable UniformConstant + 143: TypeImage 28(int) 1D array sampled format:Unknown 144: TypePointer UniformConstant 143 - 145(g_tTexcdu4): 144(ptr) Variable UniformConstant - 146: TypeImage 6(float) 1D array sampled format:Unknown +145(g_tTex1di4a): 144(ptr) Variable UniformConstant + 146: TypeImage 44(int) 1D array sampled format:Unknown 147: TypePointer UniformConstant 146 -148(g_tTex1df4a): 147(ptr) Variable UniformConstant - 149: TypeImage 29(int) 1D array sampled format:Unknown +148(g_tTex1du4a): 147(ptr) Variable UniformConstant + 149: TypeImage 6(float) 2D array sampled format:Unknown 150: TypePointer UniformConstant 149 -151(g_tTex1di4a): 150(ptr) Variable UniformConstant - 152: TypeImage 46(int) 1D array sampled format:Unknown +151(g_tTex2df4a): 150(ptr) Variable UniformConstant + 152: TypeImage 28(int) 2D array sampled format:Unknown 153: TypePointer UniformConstant 152 -154(g_tTex1du4a): 153(ptr) Variable UniformConstant - 155: TypeImage 6(float) 2D array sampled format:Unknown +154(g_tTex2di4a): 153(ptr) Variable UniformConstant + 155: TypeImage 44(int) 2D array sampled format:Unknown 156: TypePointer UniformConstant 155 -157(g_tTex2df4a): 156(ptr) Variable UniformConstant - 158: TypeImage 29(int) 2D array sampled format:Unknown +157(g_tTex2du4a): 156(ptr) Variable UniformConstant + 158: TypeImage 6(float) Cube array sampled format:Unknown 159: TypePointer UniformConstant 158 -160(g_tTex2di4a): 159(ptr) Variable UniformConstant - 161: TypeImage 46(int) 2D array sampled format:Unknown +160(g_tTexcdf4a): 159(ptr) Variable UniformConstant + 161: TypeImage 28(int) Cube array sampled format:Unknown 162: TypePointer UniformConstant 161 -163(g_tTex2du4a): 162(ptr) Variable UniformConstant - 164: TypeImage 6(float) Cube array sampled format:Unknown +163(g_tTexcdi4a): 162(ptr) Variable UniformConstant + 164: TypeImage 44(int) Cube array sampled format:Unknown 165: TypePointer UniformConstant 164 -166(g_tTexcdf4a): 165(ptr) Variable UniformConstant - 167: TypeImage 29(int) Cube array sampled format:Unknown - 168: TypePointer UniformConstant 167 -169(g_tTexcdi4a): 168(ptr) Variable UniformConstant - 170: TypeImage 46(int) Cube array sampled format:Unknown - 171: TypePointer UniformConstant 170 -172(g_tTexcdu4a): 171(ptr) Variable UniformConstant +166(g_tTexcdu4a): 165(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label -118(flattenTemp): 106(ptr) Variable Function - 119:8(PS_OUTPUT) FunctionCall 10(@main() - Store 118(flattenTemp) 119 - 122: 111(ptr) AccessChain 118(flattenTemp) 108 - 123: 7(fvec4) Load 122 - Store 121(Color) 123 - 126: 12(ptr) AccessChain 118(flattenTemp) 113 - 127: 6(float) Load 126 - Store 125(Depth) 127 +112(flattenTemp): 100(ptr) Variable Function + 113:8(PS_OUTPUT) FunctionCall 10(@main() + Store 112(flattenTemp) 113 + 116: 105(ptr) AccessChain 112(flattenTemp) 102 + 117: 7(fvec4) Load 116 + Store 115(@entryPointOutput.Color) 117 + 120: 12(ptr) AccessChain 112(flattenTemp) 107 + 121: 6(float) Load 120 + Store 119(@entryPointOutput.Depth) 121 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 11: Label 13(r01): 12(ptr) Variable Function - 33(r03): 12(ptr) Variable Function - 45(r05): 12(ptr) Variable Function - 58(r21): 12(ptr) Variable Function - 78(r23): 12(ptr) Variable Function - 92(r25): 12(ptr) Variable Function - 107(psout): 106(ptr) Variable Function + 32(r03): 12(ptr) Variable Function + 43(r05): 12(ptr) Variable Function + 55(r21): 12(ptr) Variable Function + 74(r23): 12(ptr) Variable Function + 87(r25): 12(ptr) Variable Function + 101(psout): 100(ptr) Variable Function 17: 14 Load 16(g_tTex1df4) 21: 18 Load 20(g_sSamp) - 24: 23 SampledImage 17 21 - 28: 27(fvec2) CompositeConstruct 25 26 - 31: 6(float) CompositeExtract 28 1 - 32: 6(float) ImageSampleDrefImplicitLod 24 28 31 ConstOffset 30 - Store 13(r01) 32 - 37: 34 Load 36(g_tTex1di4) - 38: 18 Load 20(g_sSamp) - 41: 40 SampledImage 37 38 - 42: 27(fvec2) CompositeConstruct 25 26 - 43: 6(float) CompositeExtract 42 1 - 44: 6(float) ImageSampleDrefImplicitLod 41 42 43 ConstOffset 30 - Store 33(r03) 44 - 50: 47 Load 49(g_tTex1du4) - 51: 18 Load 20(g_sSamp) - 54: 53 SampledImage 50 51 - 55: 27(fvec2) CompositeConstruct 25 26 - 56: 6(float) CompositeExtract 55 1 - 57: 6(float) ImageSampleDrefImplicitLod 54 55 56 ConstOffset 30 - Store 45(r05) 57 - 62: 59 Load 61(g_tTex2df4) - 63: 18 Load 20(g_sSamp) - 66: 65 SampledImage 62 63 - 70: 6(float) CompositeExtract 68 0 - 71: 6(float) CompositeExtract 68 1 - 72: 69(fvec3) CompositeConstruct 70 71 26 - 76: 6(float) CompositeExtract 72 2 - 77: 6(float) ImageSampleDrefImplicitLod 66 72 76 ConstOffset 75 - Store 58(r21) 77 - 82: 79 Load 81(g_tTex2di4) - 83: 18 Load 20(g_sSamp) - 86: 85 SampledImage 82 83 - 87: 6(float) CompositeExtract 68 0 - 88: 6(float) CompositeExtract 68 1 - 89: 69(fvec3) CompositeConstruct 87 88 26 - 90: 6(float) CompositeExtract 89 2 - 91: 6(float) ImageSampleDrefImplicitLod 86 89 90 ConstOffset 75 - Store 78(r23) 91 - 96: 93 Load 95(g_tTex2du4) - 97: 18 Load 20(g_sSamp) - 100: 99 SampledImage 96 97 - 101: 6(float) CompositeExtract 68 0 - 102: 6(float) CompositeExtract 68 1 - 103: 69(fvec3) CompositeConstruct 101 102 26 - 104: 6(float) CompositeExtract 103 2 - 105: 6(float) ImageSampleDrefImplicitLod 100 103 104 ConstOffset 75 - Store 92(r25) 105 - 112: 111(ptr) AccessChain 107(psout) 108 - Store 112 110 - 114: 12(ptr) AccessChain 107(psout) 113 - Store 114 109 - 115:8(PS_OUTPUT) Load 107(psout) - ReturnValue 115 + 23: 22 SampledImage 17 21 + 27: 26(fvec2) CompositeConstruct 24 25 + 30: 6(float) CompositeExtract 27 1 + 31: 6(float) ImageSampleDrefImplicitLod 23 27 30 ConstOffset 29 + Store 13(r01) 31 + 36: 33 Load 35(g_tTex1di4) + 37: 18 Load 20(g_sSamp) + 39: 38 SampledImage 36 37 + 40: 26(fvec2) CompositeConstruct 24 25 + 41: 6(float) CompositeExtract 40 1 + 42: 6(float) ImageSampleDrefImplicitLod 39 40 41 ConstOffset 29 + Store 32(r03) 42 + 48: 45 Load 47(g_tTex1du4) + 49: 18 Load 20(g_sSamp) + 51: 50 SampledImage 48 49 + 52: 26(fvec2) CompositeConstruct 24 25 + 53: 6(float) CompositeExtract 52 1 + 54: 6(float) ImageSampleDrefImplicitLod 51 52 53 ConstOffset 29 + Store 43(r05) 54 + 59: 56 Load 58(g_tTex2df4) + 60: 18 Load 20(g_sSamp) + 62: 61 SampledImage 59 60 + 66: 6(float) CompositeExtract 64 0 + 67: 6(float) CompositeExtract 64 1 + 68: 65(fvec3) CompositeConstruct 66 67 25 + 72: 6(float) CompositeExtract 68 2 + 73: 6(float) ImageSampleDrefImplicitLod 62 68 72 ConstOffset 71 + Store 55(r21) 73 + 78: 75 Load 77(g_tTex2di4) + 79: 18 Load 20(g_sSamp) + 81: 80 SampledImage 78 79 + 82: 6(float) CompositeExtract 64 0 + 83: 6(float) CompositeExtract 64 1 + 84: 65(fvec3) CompositeConstruct 82 83 25 + 85: 6(float) CompositeExtract 84 2 + 86: 6(float) ImageSampleDrefImplicitLod 81 84 85 ConstOffset 71 + Store 74(r23) 86 + 91: 88 Load 90(g_tTex2du4) + 92: 18 Load 20(g_sSamp) + 94: 93 SampledImage 91 92 + 95: 6(float) CompositeExtract 64 0 + 96: 6(float) CompositeExtract 64 1 + 97: 65(fvec3) CompositeConstruct 95 96 25 + 98: 6(float) CompositeExtract 97 2 + 99: 6(float) ImageSampleDrefImplicitLod 94 97 98 ConstOffset 71 + Store 87(r25) 99 + 106: 105(ptr) AccessChain 101(psout) 102 + Store 106 104 + 108: 12(ptr) AccessChain 101(psout) 107 + Store 108 103 + 109:8(PS_OUTPUT) Load 101(psout) + ReturnValue 109 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out index ed40102..812ef65 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out @@ -10,7 +10,7 @@ gl_FragCoord origin is upper left 0:42 'r11' ( temp float) 0:42 textureOffset ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DArrayShadow) -0:42 'g_tTex1df4a' ( uniform texture1DArray) +0:42 'g_tTex1df4a' ( uniform texture1DArrayShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -25,7 +25,7 @@ gl_FragCoord origin is upper left 0:43 'r13' ( temp float) 0:43 textureOffset ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DArrayShadow) -0:43 'g_tTex1di4a' ( uniform itexture1DArray) +0:43 'g_tTex1di4a' ( uniform itexture1DArrayShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -40,7 +40,7 @@ gl_FragCoord origin is upper left 0:44 'r15' ( temp float) 0:44 textureOffset ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DArrayShadow) -0:44 'g_tTex1du4a' ( uniform utexture1DArray) +0:44 'g_tTex1du4a' ( uniform utexture1DArrayShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -55,7 +55,7 @@ gl_FragCoord origin is upper left 0:47 'r31' ( temp float) 0:47 textureOffset ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DArrayShadow) -0:47 'g_tTex2df4a' ( uniform texture2DArray) +0:47 'g_tTex2df4a' ( uniform texture2DArrayShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -72,7 +72,7 @@ gl_FragCoord origin is upper left 0:48 'r33' ( temp float) 0:48 textureOffset ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DArrayShadow) -0:48 'g_tTex2di4a' ( uniform itexture2DArray) +0:48 'g_tTex2di4a' ( uniform itexture2DArrayShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -89,7 +89,7 @@ gl_FragCoord origin is upper left 0:49 'r35' ( temp float) 0:49 textureOffset ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DArrayShadow) -0:49 'g_tTex2du4a' ( uniform utexture2DArray) +0:49 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -128,13 +128,13 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: @@ -153,17 +153,17 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'g_tTex1df4a' ( uniform texture1DArray) -0:? 'g_tTex1di4a' ( uniform itexture1DArray) -0:? 'g_tTex1du4a' ( uniform utexture1DArray) -0:? 'g_tTex2df4a' ( uniform texture2DArray) -0:? 'g_tTex2di4a' ( uniform itexture2DArray) -0:? 'g_tTex2du4a' ( uniform utexture2DArray) +0:? 'g_tTex1df4a' ( uniform texture1DArrayShadow) +0:? 'g_tTex1di4a' ( uniform itexture1DArrayShadow) +0:? 'g_tTex1du4a' ( uniform utexture1DArrayShadow) +0:? 'g_tTex2df4a' ( uniform texture2DArrayShadow) +0:? 'g_tTex2di4a' ( uniform itexture2DArrayShadow) +0:? 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -180,7 +180,7 @@ gl_FragCoord origin is upper left 0:42 'r11' ( temp float) 0:42 textureOffset ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DArrayShadow) -0:42 'g_tTex1df4a' ( uniform texture1DArray) +0:42 'g_tTex1df4a' ( uniform texture1DArrayShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -195,7 +195,7 @@ gl_FragCoord origin is upper left 0:43 'r13' ( temp float) 0:43 textureOffset ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DArrayShadow) -0:43 'g_tTex1di4a' ( uniform itexture1DArray) +0:43 'g_tTex1di4a' ( uniform itexture1DArrayShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -210,7 +210,7 @@ gl_FragCoord origin is upper left 0:44 'r15' ( temp float) 0:44 textureOffset ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DArrayShadow) -0:44 'g_tTex1du4a' ( uniform utexture1DArray) +0:44 'g_tTex1du4a' ( uniform utexture1DArrayShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -225,7 +225,7 @@ gl_FragCoord origin is upper left 0:47 'r31' ( temp float) 0:47 textureOffset ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DArrayShadow) -0:47 'g_tTex2df4a' ( uniform texture2DArray) +0:47 'g_tTex2df4a' ( uniform texture2DArrayShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -242,7 +242,7 @@ gl_FragCoord origin is upper left 0:48 'r33' ( temp float) 0:48 textureOffset ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DArrayShadow) -0:48 'g_tTex2di4a' ( uniform itexture2DArray) +0:48 'g_tTex2di4a' ( uniform itexture2DArrayShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -259,7 +259,7 @@ gl_FragCoord origin is upper left 0:49 'r35' ( temp float) 0:49 textureOffset ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DArrayShadow) -0:49 'g_tTex2du4a' ( uniform utexture2DArray) +0:49 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -298,13 +298,13 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: @@ -323,28 +323,28 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'g_tTex1df4a' ( uniform texture1DArray) -0:? 'g_tTex1di4a' ( uniform itexture1DArray) -0:? 'g_tTex1du4a' ( uniform utexture1DArray) -0:? 'g_tTex2df4a' ( uniform texture2DArray) -0:? 'g_tTex2di4a' ( uniform itexture2DArray) -0:? 'g_tTex2du4a' ( uniform utexture2DArray) +0:? 'g_tTex1df4a' ( uniform texture1DArrayShadow) +0:? 'g_tTex1di4a' ( uniform itexture1DArrayShadow) +0:? 'g_tTex1du4a' ( uniform utexture1DArrayShadow) +0:? 'g_tTex2df4a' ( uniform texture2DArrayShadow) +0:? 'g_tTex2di4a' ( uniform itexture2DArrayShadow) +0:? 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 184 +// Generated by (magic number): 80003 +// Id's are bound by 178 Capability Shader Capability Sampled1D Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 132 136 + EntryPoint Fragment 4 "main" 126 130 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -355,61 +355,61 @@ gl_FragCoord origin is upper left Name 13 "r11" Name 16 "g_tTex1df4a" Name 20 "g_sSamp" - Name 38 "r13" - Name 41 "g_tTex1di4a" - Name 52 "r15" - Name 56 "g_tTex1du4a" - Name 67 "r31" - Name 70 "g_tTex2df4a" - Name 87 "r33" - Name 90 "g_tTex2di4a" - Name 102 "r35" - Name 105 "g_tTex2du4a" - Name 118 "psout" - Name 129 "flattenTemp" - Name 132 "Color" - Name 136 "Depth" - Name 141 "g_tTex1df4" - Name 144 "g_tTex1di4" - Name 147 "g_tTex1du4" - Name 150 "g_tTex2df4" - Name 153 "g_tTex2di4" - Name 156 "g_tTex2du4" - Name 159 "g_tTex3df4" - Name 162 "g_tTex3di4" - Name 165 "g_tTex3du4" - Name 168 "g_tTexcdf4" - Name 171 "g_tTexcdi4" - Name 174 "g_tTexcdu4" - Name 177 "g_tTexcdf4a" - Name 180 "g_tTexcdi4a" - Name 183 "g_tTexcdu4a" + Name 37 "r13" + Name 40 "g_tTex1di4a" + Name 50 "r15" + Name 54 "g_tTex1du4a" + Name 64 "r31" + Name 67 "g_tTex2df4a" + Name 83 "r33" + Name 86 "g_tTex2di4a" + Name 97 "r35" + Name 100 "g_tTex2du4a" + Name 112 "psout" + Name 123 "flattenTemp" + Name 126 "@entryPointOutput.Color" + Name 130 "@entryPointOutput.Depth" + Name 135 "g_tTex1df4" + Name 138 "g_tTex1di4" + Name 141 "g_tTex1du4" + Name 144 "g_tTex2df4" + Name 147 "g_tTex2di4" + Name 150 "g_tTex2du4" + Name 153 "g_tTex3df4" + Name 156 "g_tTex3di4" + Name 159 "g_tTex3du4" + Name 162 "g_tTexcdf4" + Name 165 "g_tTexcdi4" + Name 168 "g_tTexcdu4" + Name 171 "g_tTexcdf4a" + Name 174 "g_tTexcdi4a" + Name 177 "g_tTexcdu4a" Decorate 16(g_tTex1df4a) DescriptorSet 0 Decorate 20(g_sSamp) DescriptorSet 0 Decorate 20(g_sSamp) Binding 0 - Decorate 41(g_tTex1di4a) DescriptorSet 0 - Decorate 56(g_tTex1du4a) DescriptorSet 0 - Decorate 70(g_tTex2df4a) DescriptorSet 0 - Decorate 90(g_tTex2di4a) DescriptorSet 0 - Decorate 105(g_tTex2du4a) DescriptorSet 0 - Decorate 132(Color) Location 0 - Decorate 136(Depth) BuiltIn FragDepth - Decorate 141(g_tTex1df4) DescriptorSet 0 - Decorate 141(g_tTex1df4) Binding 0 - Decorate 144(g_tTex1di4) DescriptorSet 0 - Decorate 147(g_tTex1du4) DescriptorSet 0 - Decorate 150(g_tTex2df4) DescriptorSet 0 - Decorate 153(g_tTex2di4) DescriptorSet 0 - Decorate 156(g_tTex2du4) DescriptorSet 0 - Decorate 159(g_tTex3df4) DescriptorSet 0 - Decorate 162(g_tTex3di4) DescriptorSet 0 - Decorate 165(g_tTex3du4) DescriptorSet 0 - Decorate 168(g_tTexcdf4) DescriptorSet 0 - Decorate 171(g_tTexcdi4) DescriptorSet 0 - Decorate 174(g_tTexcdu4) DescriptorSet 0 - Decorate 177(g_tTexcdf4a) DescriptorSet 0 - Decorate 180(g_tTexcdi4a) DescriptorSet 0 - Decorate 183(g_tTexcdu4a) DescriptorSet 0 + Decorate 40(g_tTex1di4a) DescriptorSet 0 + Decorate 54(g_tTex1du4a) DescriptorSet 0 + Decorate 67(g_tTex2df4a) DescriptorSet 0 + Decorate 86(g_tTex2di4a) DescriptorSet 0 + Decorate 100(g_tTex2du4a) DescriptorSet 0 + Decorate 126(@entryPointOutput.Color) Location 0 + Decorate 130(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 135(g_tTex1df4) DescriptorSet 0 + Decorate 135(g_tTex1df4) Binding 0 + Decorate 138(g_tTex1di4) DescriptorSet 0 + Decorate 141(g_tTex1du4) DescriptorSet 0 + Decorate 144(g_tTex2df4) DescriptorSet 0 + Decorate 147(g_tTex2di4) DescriptorSet 0 + Decorate 150(g_tTex2du4) DescriptorSet 0 + Decorate 153(g_tTex3df4) DescriptorSet 0 + Decorate 156(g_tTex3di4) DescriptorSet 0 + Decorate 159(g_tTex3du4) DescriptorSet 0 + Decorate 162(g_tTexcdf4) DescriptorSet 0 + Decorate 165(g_tTexcdi4) DescriptorSet 0 + Decorate 168(g_tTexcdu4) DescriptorSet 0 + Decorate 171(g_tTexcdf4a) DescriptorSet 0 + Decorate 174(g_tTexcdi4a) DescriptorSet 0 + Decorate 177(g_tTexcdu4a) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -417,191 +417,185 @@ gl_FragCoord origin is upper left 8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float) 9: TypeFunction 8(PS_OUTPUT) 12: TypePointer Function 6(float) - 14: TypeImage 6(float) 1D array sampled format:Unknown + 14: TypeImage 6(float) 1D depth array sampled format:Unknown 15: TypePointer UniformConstant 14 16(g_tTex1df4a): 15(ptr) Variable UniformConstant 18: TypeSampler 19: TypePointer UniformConstant 18 20(g_sSamp): 19(ptr) Variable UniformConstant - 22: TypeImage 6(float) 1D depth array sampled format:Unknown - 23: TypeSampledImage 22 - 25: TypeVector 6(float) 2 - 26: 6(float) Constant 1036831949 - 27: 6(float) Constant 1045220557 - 28: 25(fvec2) ConstantComposite 26 27 - 29: 6(float) Constant 1061158912 - 30: TypeVector 6(float) 3 - 34: TypeInt 32 1 - 35: 34(int) Constant 2 - 39: TypeImage 34(int) 1D array sampled format:Unknown - 40: TypePointer UniformConstant 39 - 41(g_tTex1di4a): 40(ptr) Variable UniformConstant - 44: TypeImage 34(int) 1D depth array sampled format:Unknown - 45: TypeSampledImage 44 - 53: TypeInt 32 0 - 54: TypeImage 53(int) 1D array sampled format:Unknown - 55: TypePointer UniformConstant 54 - 56(g_tTex1du4a): 55(ptr) Variable UniformConstant - 59: TypeImage 53(int) 1D depth array sampled format:Unknown - 60: TypeSampledImage 59 - 68: TypeImage 6(float) 2D array sampled format:Unknown - 69: TypePointer UniformConstant 68 - 70(g_tTex2df4a): 69(ptr) Variable UniformConstant - 73: TypeImage 6(float) 2D depth array sampled format:Unknown - 74: TypeSampledImage 73 - 76: 6(float) Constant 1050253722 - 77: 30(fvec3) ConstantComposite 26 27 76 - 82: TypeVector 34(int) 2 - 83: 34(int) Constant 3 - 84: 82(ivec2) ConstantComposite 35 83 - 88: TypeImage 34(int) 2D array sampled format:Unknown - 89: TypePointer UniformConstant 88 - 90(g_tTex2di4a): 89(ptr) Variable UniformConstant - 93: TypeImage 34(int) 2D depth array sampled format:Unknown - 94: TypeSampledImage 93 - 103: TypeImage 53(int) 2D array sampled format:Unknown - 104: TypePointer UniformConstant 103 -105(g_tTex2du4a): 104(ptr) Variable UniformConstant - 108: TypeImage 53(int) 2D depth array sampled format:Unknown - 109: TypeSampledImage 108 - 117: TypePointer Function 8(PS_OUTPUT) - 119: 34(int) Constant 0 - 120: 6(float) Constant 1065353216 - 121: 7(fvec4) ConstantComposite 120 120 120 120 - 122: TypePointer Function 7(fvec4) - 124: 34(int) Constant 1 - 131: TypePointer Output 7(fvec4) - 132(Color): 131(ptr) Variable Output - 135: TypePointer Output 6(float) - 136(Depth): 135(ptr) Variable Output - 139: TypeImage 6(float) 1D sampled format:Unknown + 22: TypeSampledImage 14 + 24: TypeVector 6(float) 2 + 25: 6(float) Constant 1036831949 + 26: 6(float) Constant 1045220557 + 27: 24(fvec2) ConstantComposite 25 26 + 28: 6(float) Constant 1061158912 + 29: TypeVector 6(float) 3 + 33: TypeInt 32 1 + 34: 33(int) Constant 2 + 38: TypeImage 33(int) 1D depth array sampled format:Unknown + 39: TypePointer UniformConstant 38 + 40(g_tTex1di4a): 39(ptr) Variable UniformConstant + 43: TypeSampledImage 38 + 51: TypeInt 32 0 + 52: TypeImage 51(int) 1D depth array sampled format:Unknown + 53: TypePointer UniformConstant 52 + 54(g_tTex1du4a): 53(ptr) Variable UniformConstant + 57: TypeSampledImage 52 + 65: TypeImage 6(float) 2D depth array sampled format:Unknown + 66: TypePointer UniformConstant 65 + 67(g_tTex2df4a): 66(ptr) Variable UniformConstant + 70: TypeSampledImage 65 + 72: 6(float) Constant 1050253722 + 73: 29(fvec3) ConstantComposite 25 26 72 + 78: TypeVector 33(int) 2 + 79: 33(int) Constant 3 + 80: 78(ivec2) ConstantComposite 34 79 + 84: TypeImage 33(int) 2D depth array sampled format:Unknown + 85: TypePointer UniformConstant 84 + 86(g_tTex2di4a): 85(ptr) Variable UniformConstant + 89: TypeSampledImage 84 + 98: TypeImage 51(int) 2D depth array sampled format:Unknown + 99: TypePointer UniformConstant 98 +100(g_tTex2du4a): 99(ptr) Variable UniformConstant + 103: TypeSampledImage 98 + 111: TypePointer Function 8(PS_OUTPUT) + 113: 33(int) Constant 0 + 114: 6(float) Constant 1065353216 + 115: 7(fvec4) ConstantComposite 114 114 114 114 + 116: TypePointer Function 7(fvec4) + 118: 33(int) Constant 1 + 125: TypePointer Output 7(fvec4) +126(@entryPointOutput.Color): 125(ptr) Variable Output + 129: TypePointer Output 6(float) +130(@entryPointOutput.Depth): 129(ptr) Variable Output + 133: TypeImage 6(float) 1D sampled format:Unknown + 134: TypePointer UniformConstant 133 + 135(g_tTex1df4): 134(ptr) Variable UniformConstant + 136: TypeImage 33(int) 1D sampled format:Unknown + 137: TypePointer UniformConstant 136 + 138(g_tTex1di4): 137(ptr) Variable UniformConstant + 139: TypeImage 51(int) 1D sampled format:Unknown 140: TypePointer UniformConstant 139 - 141(g_tTex1df4): 140(ptr) Variable UniformConstant - 142: TypeImage 34(int) 1D sampled format:Unknown + 141(g_tTex1du4): 140(ptr) Variable UniformConstant + 142: TypeImage 6(float) 2D sampled format:Unknown 143: TypePointer UniformConstant 142 - 144(g_tTex1di4): 143(ptr) Variable UniformConstant - 145: TypeImage 53(int) 1D sampled format:Unknown + 144(g_tTex2df4): 143(ptr) Variable UniformConstant + 145: TypeImage 33(int) 2D sampled format:Unknown 146: TypePointer UniformConstant 145 - 147(g_tTex1du4): 146(ptr) Variable UniformConstant - 148: TypeImage 6(float) 2D sampled format:Unknown + 147(g_tTex2di4): 146(ptr) Variable UniformConstant + 148: TypeImage 51(int) 2D sampled format:Unknown 149: TypePointer UniformConstant 148 - 150(g_tTex2df4): 149(ptr) Variable UniformConstant - 151: TypeImage 34(int) 2D sampled format:Unknown + 150(g_tTex2du4): 149(ptr) Variable UniformConstant + 151: TypeImage 6(float) 3D sampled format:Unknown 152: TypePointer UniformConstant 151 - 153(g_tTex2di4): 152(ptr) Variable UniformConstant - 154: TypeImage 53(int) 2D sampled format:Unknown + 153(g_tTex3df4): 152(ptr) Variable UniformConstant + 154: TypeImage 33(int) 3D sampled format:Unknown 155: TypePointer UniformConstant 154 - 156(g_tTex2du4): 155(ptr) Variable UniformConstant - 157: TypeImage 6(float) 3D sampled format:Unknown + 156(g_tTex3di4): 155(ptr) Variable UniformConstant + 157: TypeImage 51(int) 3D sampled format:Unknown 158: TypePointer UniformConstant 157 - 159(g_tTex3df4): 158(ptr) Variable UniformConstant - 160: TypeImage 34(int) 3D sampled format:Unknown + 159(g_tTex3du4): 158(ptr) Variable UniformConstant + 160: TypeImage 6(float) Cube sampled format:Unknown 161: TypePointer UniformConstant 160 - 162(g_tTex3di4): 161(ptr) Variable UniformConstant - 163: TypeImage 53(int) 3D sampled format:Unknown + 162(g_tTexcdf4): 161(ptr) Variable UniformConstant + 163: TypeImage 33(int) Cube sampled format:Unknown 164: TypePointer UniformConstant 163 - 165(g_tTex3du4): 164(ptr) Variable UniformConstant - 166: TypeImage 6(float) Cube sampled format:Unknown + 165(g_tTexcdi4): 164(ptr) Variable UniformConstant + 166: TypeImage 51(int) Cube sampled format:Unknown 167: TypePointer UniformConstant 166 - 168(g_tTexcdf4): 167(ptr) Variable UniformConstant - 169: TypeImage 34(int) Cube sampled format:Unknown + 168(g_tTexcdu4): 167(ptr) Variable UniformConstant + 169: TypeImage 6(float) Cube array sampled format:Unknown 170: TypePointer UniformConstant 169 - 171(g_tTexcdi4): 170(ptr) Variable UniformConstant - 172: TypeImage 53(int) Cube sampled format:Unknown +171(g_tTexcdf4a): 170(ptr) Variable UniformConstant + 172: TypeImage 33(int) Cube array sampled format:Unknown 173: TypePointer UniformConstant 172 - 174(g_tTexcdu4): 173(ptr) Variable UniformConstant - 175: TypeImage 6(float) Cube array sampled format:Unknown +174(g_tTexcdi4a): 173(ptr) Variable UniformConstant + 175: TypeImage 51(int) Cube array sampled format:Unknown 176: TypePointer UniformConstant 175 -177(g_tTexcdf4a): 176(ptr) Variable UniformConstant - 178: TypeImage 34(int) Cube array sampled format:Unknown - 179: TypePointer UniformConstant 178 -180(g_tTexcdi4a): 179(ptr) Variable UniformConstant - 181: TypeImage 53(int) Cube array sampled format:Unknown - 182: TypePointer UniformConstant 181 -183(g_tTexcdu4a): 182(ptr) Variable UniformConstant +177(g_tTexcdu4a): 176(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label -129(flattenTemp): 117(ptr) Variable Function - 130:8(PS_OUTPUT) FunctionCall 10(@main() - Store 129(flattenTemp) 130 - 133: 122(ptr) AccessChain 129(flattenTemp) 119 - 134: 7(fvec4) Load 133 - Store 132(Color) 134 - 137: 12(ptr) AccessChain 129(flattenTemp) 124 - 138: 6(float) Load 137 - Store 136(Depth) 138 +123(flattenTemp): 111(ptr) Variable Function + 124:8(PS_OUTPUT) FunctionCall 10(@main() + Store 123(flattenTemp) 124 + 127: 116(ptr) AccessChain 123(flattenTemp) 113 + 128: 7(fvec4) Load 127 + Store 126(@entryPointOutput.Color) 128 + 131: 12(ptr) AccessChain 123(flattenTemp) 118 + 132: 6(float) Load 131 + Store 130(@entryPointOutput.Depth) 132 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 11: Label 13(r11): 12(ptr) Variable Function - 38(r13): 12(ptr) Variable Function - 52(r15): 12(ptr) Variable Function - 67(r31): 12(ptr) Variable Function - 87(r33): 12(ptr) Variable Function - 102(r35): 12(ptr) Variable Function - 118(psout): 117(ptr) Variable Function + 37(r13): 12(ptr) Variable Function + 50(r15): 12(ptr) Variable Function + 64(r31): 12(ptr) Variable Function + 83(r33): 12(ptr) Variable Function + 97(r35): 12(ptr) Variable Function + 112(psout): 111(ptr) Variable Function 17: 14 Load 16(g_tTex1df4a) 21: 18 Load 20(g_sSamp) - 24: 23 SampledImage 17 21 - 31: 6(float) CompositeExtract 28 0 - 32: 6(float) CompositeExtract 28 1 - 33: 30(fvec3) CompositeConstruct 31 32 29 - 36: 6(float) CompositeExtract 33 2 - 37: 6(float) ImageSampleDrefImplicitLod 24 33 36 ConstOffset 35 - Store 13(r11) 37 - 42: 39 Load 41(g_tTex1di4a) - 43: 18 Load 20(g_sSamp) - 46: 45 SampledImage 42 43 - 47: 6(float) CompositeExtract 28 0 - 48: 6(float) CompositeExtract 28 1 - 49: 30(fvec3) CompositeConstruct 47 48 29 - 50: 6(float) CompositeExtract 49 2 - 51: 6(float) ImageSampleDrefImplicitLod 46 49 50 ConstOffset 35 - Store 38(r13) 51 - 57: 54 Load 56(g_tTex1du4a) - 58: 18 Load 20(g_sSamp) - 61: 60 SampledImage 57 58 - 62: 6(float) CompositeExtract 28 0 - 63: 6(float) CompositeExtract 28 1 - 64: 30(fvec3) CompositeConstruct 62 63 29 - 65: 6(float) CompositeExtract 64 2 - 66: 6(float) ImageSampleDrefImplicitLod 61 64 65 ConstOffset 35 - Store 52(r15) 66 - 71: 68 Load 70(g_tTex2df4a) - 72: 18 Load 20(g_sSamp) - 75: 74 SampledImage 71 72 - 78: 6(float) CompositeExtract 77 0 - 79: 6(float) CompositeExtract 77 1 - 80: 6(float) CompositeExtract 77 2 - 81: 7(fvec4) CompositeConstruct 78 79 80 29 - 85: 6(float) CompositeExtract 81 3 - 86: 6(float) ImageSampleDrefImplicitLod 75 81 85 ConstOffset 84 - Store 67(r31) 86 - 91: 88 Load 90(g_tTex2di4a) - 92: 18 Load 20(g_sSamp) - 95: 94 SampledImage 91 92 - 96: 6(float) CompositeExtract 77 0 - 97: 6(float) CompositeExtract 77 1 - 98: 6(float) CompositeExtract 77 2 - 99: 7(fvec4) CompositeConstruct 96 97 98 29 - 100: 6(float) CompositeExtract 99 3 - 101: 6(float) ImageSampleDrefImplicitLod 95 99 100 ConstOffset 84 - Store 87(r33) 101 - 106: 103 Load 105(g_tTex2du4a) - 107: 18 Load 20(g_sSamp) - 110: 109 SampledImage 106 107 - 111: 6(float) CompositeExtract 77 0 - 112: 6(float) CompositeExtract 77 1 - 113: 6(float) CompositeExtract 77 2 - 114: 7(fvec4) CompositeConstruct 111 112 113 29 - 115: 6(float) CompositeExtract 114 3 - 116: 6(float) ImageSampleDrefImplicitLod 110 114 115 ConstOffset 84 - Store 102(r35) 116 - 123: 122(ptr) AccessChain 118(psout) 119 - Store 123 121 - 125: 12(ptr) AccessChain 118(psout) 124 - Store 125 120 - 126:8(PS_OUTPUT) Load 118(psout) - ReturnValue 126 + 23: 22 SampledImage 17 21 + 30: 6(float) CompositeExtract 27 0 + 31: 6(float) CompositeExtract 27 1 + 32: 29(fvec3) CompositeConstruct 30 31 28 + 35: 6(float) CompositeExtract 32 2 + 36: 6(float) ImageSampleDrefImplicitLod 23 32 35 ConstOffset 34 + Store 13(r11) 36 + 41: 38 Load 40(g_tTex1di4a) + 42: 18 Load 20(g_sSamp) + 44: 43 SampledImage 41 42 + 45: 6(float) CompositeExtract 27 0 + 46: 6(float) CompositeExtract 27 1 + 47: 29(fvec3) CompositeConstruct 45 46 28 + 48: 6(float) CompositeExtract 47 2 + 49: 6(float) ImageSampleDrefImplicitLod 44 47 48 ConstOffset 34 + Store 37(r13) 49 + 55: 52 Load 54(g_tTex1du4a) + 56: 18 Load 20(g_sSamp) + 58: 57 SampledImage 55 56 + 59: 6(float) CompositeExtract 27 0 + 60: 6(float) CompositeExtract 27 1 + 61: 29(fvec3) CompositeConstruct 59 60 28 + 62: 6(float) CompositeExtract 61 2 + 63: 6(float) ImageSampleDrefImplicitLod 58 61 62 ConstOffset 34 + Store 50(r15) 63 + 68: 65 Load 67(g_tTex2df4a) + 69: 18 Load 20(g_sSamp) + 71: 70 SampledImage 68 69 + 74: 6(float) CompositeExtract 73 0 + 75: 6(float) CompositeExtract 73 1 + 76: 6(float) CompositeExtract 73 2 + 77: 7(fvec4) CompositeConstruct 74 75 76 28 + 81: 6(float) CompositeExtract 77 3 + 82: 6(float) ImageSampleDrefImplicitLod 71 77 81 ConstOffset 80 + Store 64(r31) 82 + 87: 84 Load 86(g_tTex2di4a) + 88: 18 Load 20(g_sSamp) + 90: 89 SampledImage 87 88 + 91: 6(float) CompositeExtract 73 0 + 92: 6(float) CompositeExtract 73 1 + 93: 6(float) CompositeExtract 73 2 + 94: 7(fvec4) CompositeConstruct 91 92 93 28 + 95: 6(float) CompositeExtract 94 3 + 96: 6(float) ImageSampleDrefImplicitLod 90 94 95 ConstOffset 80 + Store 83(r33) 96 + 101: 98 Load 100(g_tTex2du4a) + 102: 18 Load 20(g_sSamp) + 104: 103 SampledImage 101 102 + 105: 6(float) CompositeExtract 73 0 + 106: 6(float) CompositeExtract 73 1 + 107: 6(float) CompositeExtract 73 2 + 108: 7(fvec4) CompositeConstruct 105 106 107 28 + 109: 6(float) CompositeExtract 108 3 + 110: 6(float) ImageSampleDrefImplicitLod 104 108 109 ConstOffset 80 + Store 97(r35) 110 + 117: 116(ptr) AccessChain 112(psout) 113 + Store 117 115 + 119: 12(ptr) AccessChain 112(psout) 118 + Store 119 114 + 120:8(PS_OUTPUT) Load 112(psout) + ReturnValue 120 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out index 875d593..b5a4d71 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out @@ -10,7 +10,7 @@ gl_FragCoord origin is upper left 0:42 'r10' ( temp float) 0:42 textureLod ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DArrayShadow) -0:42 'g_tTex1df4a' ( uniform texture1DArray) +0:42 'g_tTex1df4a' ( uniform texture1DArrayShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -25,7 +25,7 @@ gl_FragCoord origin is upper left 0:43 'r12' ( temp float) 0:43 textureLod ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DArrayShadow) -0:43 'g_tTex1di4a' ( uniform itexture1DArray) +0:43 'g_tTex1di4a' ( uniform itexture1DArrayShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -40,7 +40,7 @@ gl_FragCoord origin is upper left 0:44 'r14' ( temp float) 0:44 textureLod ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DArrayShadow) -0:44 'g_tTex1du4a' ( uniform utexture1DArray) +0:44 'g_tTex1du4a' ( uniform utexture1DArrayShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -55,7 +55,7 @@ gl_FragCoord origin is upper left 0:47 'r30' ( temp float) 0:47 textureLod ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DArrayShadow) -0:47 'g_tTex2df4a' ( uniform texture2DArray) +0:47 'g_tTex2df4a' ( uniform texture2DArrayShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -71,7 +71,7 @@ gl_FragCoord origin is upper left 0:48 'r32' ( temp float) 0:48 textureLod ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DArrayShadow) -0:48 'g_tTex2di4a' ( uniform itexture2DArray) +0:48 'g_tTex2di4a' ( uniform itexture2DArrayShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -87,7 +87,7 @@ gl_FragCoord origin is upper left 0:49 'r34' ( temp float) 0:49 textureLod ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DArrayShadow) -0:49 'g_tTex2du4a' ( uniform utexture2DArray) +0:49 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -103,7 +103,7 @@ gl_FragCoord origin is upper left 0:52 'r60' ( temp float) 0:52 textureLod ( temp float) 0:52 Construct combined texture-sampler ( temp samplerCubeArrayShadow) -0:52 'g_tTexcdf4a' ( uniform textureCubeArray) +0:52 'g_tTexcdf4a' ( uniform textureCubeArrayShadow) 0:52 'g_sSamp' (layout( binding=0) uniform sampler) 0:52 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -120,7 +120,7 @@ gl_FragCoord origin is upper left 0:53 'r62' ( temp float) 0:53 textureLod ( temp float) 0:53 Construct combined texture-sampler ( temp isamplerCubeArrayShadow) -0:53 'g_tTexcdi4a' ( uniform itextureCubeArray) +0:53 'g_tTexcdi4a' ( uniform itextureCubeArrayShadow) 0:53 'g_sSamp' (layout( binding=0) uniform sampler) 0:53 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -137,7 +137,7 @@ gl_FragCoord origin is upper left 0:54 'r64' ( temp float) 0:54 textureLod ( temp float) 0:54 Construct combined texture-sampler ( temp usamplerCubeArrayShadow) -0:54 'g_tTexcdu4a' ( uniform utextureCubeArray) +0:54 'g_tTexcdu4a' ( uniform utextureCubeArrayShadow) 0:54 'g_sSamp' (layout( binding=0) uniform sampler) 0:54 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -176,13 +176,13 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: @@ -201,17 +201,17 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'g_tTex1df4a' ( uniform texture1DArray) -0:? 'g_tTex1di4a' ( uniform itexture1DArray) -0:? 'g_tTex1du4a' ( uniform utexture1DArray) -0:? 'g_tTex2df4a' ( uniform texture2DArray) -0:? 'g_tTex2di4a' ( uniform itexture2DArray) -0:? 'g_tTex2du4a' ( uniform utexture2DArray) -0:? 'g_tTexcdf4a' ( uniform textureCubeArray) -0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) -0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? 'g_tTex1df4a' ( uniform texture1DArrayShadow) +0:? 'g_tTex1di4a' ( uniform itexture1DArrayShadow) +0:? 'g_tTex1du4a' ( uniform utexture1DArrayShadow) +0:? 'g_tTex2df4a' ( uniform texture2DArrayShadow) +0:? 'g_tTex2di4a' ( uniform itexture2DArrayShadow) +0:? 'g_tTex2du4a' ( uniform utexture2DArrayShadow) +0:? 'g_tTexcdf4a' ( uniform textureCubeArrayShadow) +0:? 'g_tTexcdi4a' ( uniform itextureCubeArrayShadow) +0:? 'g_tTexcdu4a' ( uniform utextureCubeArrayShadow) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -228,7 +228,7 @@ gl_FragCoord origin is upper left 0:42 'r10' ( temp float) 0:42 textureLod ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DArrayShadow) -0:42 'g_tTex1df4a' ( uniform texture1DArray) +0:42 'g_tTex1df4a' ( uniform texture1DArrayShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -243,7 +243,7 @@ gl_FragCoord origin is upper left 0:43 'r12' ( temp float) 0:43 textureLod ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DArrayShadow) -0:43 'g_tTex1di4a' ( uniform itexture1DArray) +0:43 'g_tTex1di4a' ( uniform itexture1DArrayShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -258,7 +258,7 @@ gl_FragCoord origin is upper left 0:44 'r14' ( temp float) 0:44 textureLod ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DArrayShadow) -0:44 'g_tTex1du4a' ( uniform utexture1DArray) +0:44 'g_tTex1du4a' ( uniform utexture1DArrayShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -273,7 +273,7 @@ gl_FragCoord origin is upper left 0:47 'r30' ( temp float) 0:47 textureLod ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DArrayShadow) -0:47 'g_tTex2df4a' ( uniform texture2DArray) +0:47 'g_tTex2df4a' ( uniform texture2DArrayShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -289,7 +289,7 @@ gl_FragCoord origin is upper left 0:48 'r32' ( temp float) 0:48 textureLod ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DArrayShadow) -0:48 'g_tTex2di4a' ( uniform itexture2DArray) +0:48 'g_tTex2di4a' ( uniform itexture2DArrayShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -305,7 +305,7 @@ gl_FragCoord origin is upper left 0:49 'r34' ( temp float) 0:49 textureLod ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DArrayShadow) -0:49 'g_tTex2du4a' ( uniform utexture2DArray) +0:49 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -321,7 +321,7 @@ gl_FragCoord origin is upper left 0:52 'r60' ( temp float) 0:52 textureLod ( temp float) 0:52 Construct combined texture-sampler ( temp samplerCubeArrayShadow) -0:52 'g_tTexcdf4a' ( uniform textureCubeArray) +0:52 'g_tTexcdf4a' ( uniform textureCubeArrayShadow) 0:52 'g_sSamp' (layout( binding=0) uniform sampler) 0:52 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -338,7 +338,7 @@ gl_FragCoord origin is upper left 0:53 'r62' ( temp float) 0:53 textureLod ( temp float) 0:53 Construct combined texture-sampler ( temp isamplerCubeArrayShadow) -0:53 'g_tTexcdi4a' ( uniform itextureCubeArray) +0:53 'g_tTexcdi4a' ( uniform itextureCubeArrayShadow) 0:53 'g_sSamp' (layout( binding=0) uniform sampler) 0:53 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -355,7 +355,7 @@ gl_FragCoord origin is upper left 0:54 'r64' ( temp float) 0:54 textureLod ( temp float) 0:54 Construct combined texture-sampler ( temp usamplerCubeArrayShadow) -0:54 'g_tTexcdu4a' ( uniform utextureCubeArray) +0:54 'g_tTexcdu4a' ( uniform utextureCubeArrayShadow) 0:54 'g_sSamp' (layout( binding=0) uniform sampler) 0:54 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -394,13 +394,13 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: @@ -419,28 +419,28 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'g_tTex1df4a' ( uniform texture1DArray) -0:? 'g_tTex1di4a' ( uniform itexture1DArray) -0:? 'g_tTex1du4a' ( uniform utexture1DArray) -0:? 'g_tTex2df4a' ( uniform texture2DArray) -0:? 'g_tTex2di4a' ( uniform itexture2DArray) -0:? 'g_tTex2du4a' ( uniform utexture2DArray) -0:? 'g_tTexcdf4a' ( uniform textureCubeArray) -0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) -0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? 'g_tTex1df4a' ( uniform texture1DArrayShadow) +0:? 'g_tTex1di4a' ( uniform itexture1DArrayShadow) +0:? 'g_tTex1du4a' ( uniform utexture1DArrayShadow) +0:? 'g_tTex2df4a' ( uniform texture2DArrayShadow) +0:? 'g_tTex2di4a' ( uniform itexture2DArrayShadow) +0:? 'g_tTex2du4a' ( uniform utexture2DArrayShadow) +0:? 'g_tTexcdf4a' ( uniform textureCubeArrayShadow) +0:? 'g_tTexcdi4a' ( uniform itextureCubeArrayShadow) +0:? 'g_tTexcdu4a' ( uniform utextureCubeArrayShadow) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 219 +// Generated by (magic number): 80003 +// Id's are bound by 210 Capability Shader Capability Sampled1D Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 176 180 + EntryPoint Fragment 4 "main" 167 171 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -451,64 +451,64 @@ gl_FragCoord origin is upper left Name 13 "r10" Name 16 "g_tTex1df4a" Name 20 "g_sSamp" - Name 37 "r12" - Name 41 "g_tTex1di4a" - Name 52 "r14" - Name 56 "g_tTex1du4a" - Name 67 "r30" - Name 70 "g_tTex2df4a" - Name 84 "r32" - Name 87 "g_tTex2di4a" - Name 99 "r34" - Name 102 "g_tTex2du4a" - Name 114 "r60" - Name 117 "g_tTexcdf4a" - Name 131 "r62" - Name 134 "g_tTexcdi4a" - Name 146 "r64" - Name 149 "g_tTexcdu4a" - Name 162 "psout" - Name 173 "flattenTemp" - Name 176 "Color" - Name 180 "Depth" - Name 185 "g_tTex1df4" - Name 188 "g_tTex1di4" - Name 191 "g_tTex1du4" - Name 194 "g_tTex2df4" - Name 197 "g_tTex2di4" - Name 200 "g_tTex2du4" - Name 203 "g_tTex3df4" - Name 206 "g_tTex3di4" - Name 209 "g_tTex3du4" - Name 212 "g_tTexcdf4" - Name 215 "g_tTexcdi4" - Name 218 "g_tTexcdu4" + Name 36 "r12" + Name 40 "g_tTex1di4a" + Name 50 "r14" + Name 54 "g_tTex1du4a" + Name 64 "r30" + Name 67 "g_tTex2df4a" + Name 80 "r32" + Name 83 "g_tTex2di4a" + Name 94 "r34" + Name 97 "g_tTex2du4a" + Name 108 "r60" + Name 111 "g_tTexcdf4a" + Name 124 "r62" + Name 127 "g_tTexcdi4a" + Name 138 "r64" + Name 141 "g_tTexcdu4a" + Name 153 "psout" + Name 164 "flattenTemp" + Name 167 "@entryPointOutput.Color" + Name 171 "@entryPointOutput.Depth" + Name 176 "g_tTex1df4" + Name 179 "g_tTex1di4" + Name 182 "g_tTex1du4" + Name 185 "g_tTex2df4" + Name 188 "g_tTex2di4" + Name 191 "g_tTex2du4" + Name 194 "g_tTex3df4" + Name 197 "g_tTex3di4" + Name 200 "g_tTex3du4" + Name 203 "g_tTexcdf4" + Name 206 "g_tTexcdi4" + Name 209 "g_tTexcdu4" Decorate 16(g_tTex1df4a) DescriptorSet 0 Decorate 20(g_sSamp) DescriptorSet 0 Decorate 20(g_sSamp) Binding 0 - Decorate 41(g_tTex1di4a) DescriptorSet 0 - Decorate 56(g_tTex1du4a) DescriptorSet 0 - Decorate 70(g_tTex2df4a) DescriptorSet 0 - Decorate 87(g_tTex2di4a) DescriptorSet 0 - Decorate 102(g_tTex2du4a) DescriptorSet 0 - Decorate 117(g_tTexcdf4a) DescriptorSet 0 - Decorate 134(g_tTexcdi4a) DescriptorSet 0 - Decorate 149(g_tTexcdu4a) DescriptorSet 0 - Decorate 176(Color) Location 0 - Decorate 180(Depth) BuiltIn FragDepth - Decorate 185(g_tTex1df4) DescriptorSet 0 - Decorate 185(g_tTex1df4) Binding 0 - Decorate 188(g_tTex1di4) DescriptorSet 0 - Decorate 191(g_tTex1du4) DescriptorSet 0 - Decorate 194(g_tTex2df4) DescriptorSet 0 - Decorate 197(g_tTex2di4) DescriptorSet 0 - Decorate 200(g_tTex2du4) DescriptorSet 0 - Decorate 203(g_tTex3df4) DescriptorSet 0 - Decorate 206(g_tTex3di4) DescriptorSet 0 - Decorate 209(g_tTex3du4) DescriptorSet 0 - Decorate 212(g_tTexcdf4) DescriptorSet 0 - Decorate 215(g_tTexcdi4) DescriptorSet 0 - Decorate 218(g_tTexcdu4) DescriptorSet 0 + Decorate 40(g_tTex1di4a) DescriptorSet 0 + Decorate 54(g_tTex1du4a) DescriptorSet 0 + Decorate 67(g_tTex2df4a) DescriptorSet 0 + Decorate 83(g_tTex2di4a) DescriptorSet 0 + Decorate 97(g_tTex2du4a) DescriptorSet 0 + Decorate 111(g_tTexcdf4a) DescriptorSet 0 + Decorate 127(g_tTexcdi4a) DescriptorSet 0 + Decorate 141(g_tTexcdu4a) DescriptorSet 0 + Decorate 167(@entryPointOutput.Color) Location 0 + Decorate 171(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 176(g_tTex1df4) DescriptorSet 0 + Decorate 176(g_tTex1df4) Binding 0 + Decorate 179(g_tTex1di4) DescriptorSet 0 + Decorate 182(g_tTex1du4) DescriptorSet 0 + Decorate 185(g_tTex2df4) DescriptorSet 0 + Decorate 188(g_tTex2di4) DescriptorSet 0 + Decorate 191(g_tTex2du4) DescriptorSet 0 + Decorate 194(g_tTex3df4) DescriptorSet 0 + Decorate 197(g_tTex3di4) DescriptorSet 0 + Decorate 200(g_tTex3du4) DescriptorSet 0 + Decorate 203(g_tTexcdf4) DescriptorSet 0 + Decorate 206(g_tTexcdi4) DescriptorSet 0 + Decorate 209(g_tTexcdu4) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -516,229 +516,220 @@ gl_FragCoord origin is upper left 8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float) 9: TypeFunction 8(PS_OUTPUT) 12: TypePointer Function 6(float) - 14: TypeImage 6(float) 1D array sampled format:Unknown + 14: TypeImage 6(float) 1D depth array sampled format:Unknown 15: TypePointer UniformConstant 14 16(g_tTex1df4a): 15(ptr) Variable UniformConstant 18: TypeSampler 19: TypePointer UniformConstant 18 20(g_sSamp): 19(ptr) Variable UniformConstant - 22: TypeImage 6(float) 1D depth array sampled format:Unknown - 23: TypeSampledImage 22 - 25: TypeVector 6(float) 2 - 26: 6(float) Constant 1036831949 - 27: 6(float) Constant 1045220557 - 28: 25(fvec2) ConstantComposite 26 27 - 29: 6(float) Constant 1061158912 - 30: TypeVector 6(float) 3 - 34: 6(float) Constant 0 - 38: TypeInt 32 1 - 39: TypeImage 38(int) 1D array sampled format:Unknown - 40: TypePointer UniformConstant 39 - 41(g_tTex1di4a): 40(ptr) Variable UniformConstant - 44: TypeImage 38(int) 1D depth array sampled format:Unknown - 45: TypeSampledImage 44 - 53: TypeInt 32 0 - 54: TypeImage 53(int) 1D array sampled format:Unknown - 55: TypePointer UniformConstant 54 - 56(g_tTex1du4a): 55(ptr) Variable UniformConstant - 59: TypeImage 53(int) 1D depth array sampled format:Unknown - 60: TypeSampledImage 59 - 68: TypeImage 6(float) 2D array sampled format:Unknown - 69: TypePointer UniformConstant 68 - 70(g_tTex2df4a): 69(ptr) Variable UniformConstant - 73: TypeImage 6(float) 2D depth array sampled format:Unknown - 74: TypeSampledImage 73 - 76: 6(float) Constant 1050253722 - 77: 30(fvec3) ConstantComposite 26 27 76 - 85: TypeImage 38(int) 2D array sampled format:Unknown - 86: TypePointer UniformConstant 85 - 87(g_tTex2di4a): 86(ptr) Variable UniformConstant - 90: TypeImage 38(int) 2D depth array sampled format:Unknown - 91: TypeSampledImage 90 - 100: TypeImage 53(int) 2D array sampled format:Unknown - 101: TypePointer UniformConstant 100 -102(g_tTex2du4a): 101(ptr) Variable UniformConstant - 105: TypeImage 53(int) 2D depth array sampled format:Unknown - 106: TypeSampledImage 105 - 115: TypeImage 6(float) Cube array sampled format:Unknown - 116: TypePointer UniformConstant 115 -117(g_tTexcdf4a): 116(ptr) Variable UniformConstant - 120: TypeImage 6(float) Cube depth array sampled format:Unknown - 121: TypeSampledImage 120 - 123: 6(float) Constant 1053609165 - 124: 7(fvec4) ConstantComposite 26 27 76 123 - 132: TypeImage 38(int) Cube array sampled format:Unknown - 133: TypePointer UniformConstant 132 -134(g_tTexcdi4a): 133(ptr) Variable UniformConstant - 137: TypeImage 38(int) Cube depth array sampled format:Unknown - 138: TypeSampledImage 137 - 147: TypeImage 53(int) Cube array sampled format:Unknown - 148: TypePointer UniformConstant 147 -149(g_tTexcdu4a): 148(ptr) Variable UniformConstant - 152: TypeImage 53(int) Cube depth array sampled format:Unknown - 153: TypeSampledImage 152 - 161: TypePointer Function 8(PS_OUTPUT) - 163: 38(int) Constant 0 - 164: 6(float) Constant 1065353216 - 165: 7(fvec4) ConstantComposite 164 164 164 164 - 166: TypePointer Function 7(fvec4) - 168: 38(int) Constant 1 - 175: TypePointer Output 7(fvec4) - 176(Color): 175(ptr) Variable Output - 179: TypePointer Output 6(float) - 180(Depth): 179(ptr) Variable Output - 183: TypeImage 6(float) 1D sampled format:Unknown + 22: TypeSampledImage 14 + 24: TypeVector 6(float) 2 + 25: 6(float) Constant 1036831949 + 26: 6(float) Constant 1045220557 + 27: 24(fvec2) ConstantComposite 25 26 + 28: 6(float) Constant 1061158912 + 29: TypeVector 6(float) 3 + 33: 6(float) Constant 0 + 37: TypeInt 32 1 + 38: TypeImage 37(int) 1D depth array sampled format:Unknown + 39: TypePointer UniformConstant 38 + 40(g_tTex1di4a): 39(ptr) Variable UniformConstant + 43: TypeSampledImage 38 + 51: TypeInt 32 0 + 52: TypeImage 51(int) 1D depth array sampled format:Unknown + 53: TypePointer UniformConstant 52 + 54(g_tTex1du4a): 53(ptr) Variable UniformConstant + 57: TypeSampledImage 52 + 65: TypeImage 6(float) 2D depth array sampled format:Unknown + 66: TypePointer UniformConstant 65 + 67(g_tTex2df4a): 66(ptr) Variable UniformConstant + 70: TypeSampledImage 65 + 72: 6(float) Constant 1050253722 + 73: 29(fvec3) ConstantComposite 25 26 72 + 81: TypeImage 37(int) 2D depth array sampled format:Unknown + 82: TypePointer UniformConstant 81 + 83(g_tTex2di4a): 82(ptr) Variable UniformConstant + 86: TypeSampledImage 81 + 95: TypeImage 51(int) 2D depth array sampled format:Unknown + 96: TypePointer UniformConstant 95 + 97(g_tTex2du4a): 96(ptr) Variable UniformConstant + 100: TypeSampledImage 95 + 109: TypeImage 6(float) Cube depth array sampled format:Unknown + 110: TypePointer UniformConstant 109 +111(g_tTexcdf4a): 110(ptr) Variable UniformConstant + 114: TypeSampledImage 109 + 116: 6(float) Constant 1053609165 + 117: 7(fvec4) ConstantComposite 25 26 72 116 + 125: TypeImage 37(int) Cube depth array sampled format:Unknown + 126: TypePointer UniformConstant 125 +127(g_tTexcdi4a): 126(ptr) Variable UniformConstant + 130: TypeSampledImage 125 + 139: TypeImage 51(int) Cube depth array sampled format:Unknown + 140: TypePointer UniformConstant 139 +141(g_tTexcdu4a): 140(ptr) Variable UniformConstant + 144: TypeSampledImage 139 + 152: TypePointer Function 8(PS_OUTPUT) + 154: 37(int) Constant 0 + 155: 6(float) Constant 1065353216 + 156: 7(fvec4) ConstantComposite 155 155 155 155 + 157: TypePointer Function 7(fvec4) + 159: 37(int) Constant 1 + 166: TypePointer Output 7(fvec4) +167(@entryPointOutput.Color): 166(ptr) Variable Output + 170: TypePointer Output 6(float) +171(@entryPointOutput.Depth): 170(ptr) Variable Output + 174: TypeImage 6(float) 1D sampled format:Unknown + 175: TypePointer UniformConstant 174 + 176(g_tTex1df4): 175(ptr) Variable UniformConstant + 177: TypeImage 37(int) 1D sampled format:Unknown + 178: TypePointer UniformConstant 177 + 179(g_tTex1di4): 178(ptr) Variable UniformConstant + 180: TypeImage 51(int) 1D sampled format:Unknown + 181: TypePointer UniformConstant 180 + 182(g_tTex1du4): 181(ptr) Variable UniformConstant + 183: TypeImage 6(float) 2D sampled format:Unknown 184: TypePointer UniformConstant 183 - 185(g_tTex1df4): 184(ptr) Variable UniformConstant - 186: TypeImage 38(int) 1D sampled format:Unknown + 185(g_tTex2df4): 184(ptr) Variable UniformConstant + 186: TypeImage 37(int) 2D sampled format:Unknown 187: TypePointer UniformConstant 186 - 188(g_tTex1di4): 187(ptr) Variable UniformConstant - 189: TypeImage 53(int) 1D sampled format:Unknown + 188(g_tTex2di4): 187(ptr) Variable UniformConstant + 189: TypeImage 51(int) 2D sampled format:Unknown 190: TypePointer UniformConstant 189 - 191(g_tTex1du4): 190(ptr) Variable UniformConstant - 192: TypeImage 6(float) 2D sampled format:Unknown + 191(g_tTex2du4): 190(ptr) Variable UniformConstant + 192: TypeImage 6(float) 3D sampled format:Unknown 193: TypePointer UniformConstant 192 - 194(g_tTex2df4): 193(ptr) Variable UniformConstant - 195: TypeImage 38(int) 2D sampled format:Unknown + 194(g_tTex3df4): 193(ptr) Variable UniformConstant + 195: TypeImage 37(int) 3D sampled format:Unknown 196: TypePointer UniformConstant 195 - 197(g_tTex2di4): 196(ptr) Variable UniformConstant - 198: TypeImage 53(int) 2D sampled format:Unknown + 197(g_tTex3di4): 196(ptr) Variable UniformConstant + 198: TypeImage 51(int) 3D sampled format:Unknown 199: TypePointer UniformConstant 198 - 200(g_tTex2du4): 199(ptr) Variable UniformConstant - 201: TypeImage 6(float) 3D sampled format:Unknown + 200(g_tTex3du4): 199(ptr) Variable UniformConstant + 201: TypeImage 6(float) Cube sampled format:Unknown 202: TypePointer UniformConstant 201 - 203(g_tTex3df4): 202(ptr) Variable UniformConstant - 204: TypeImage 38(int) 3D sampled format:Unknown + 203(g_tTexcdf4): 202(ptr) Variable UniformConstant + 204: TypeImage 37(int) Cube sampled format:Unknown 205: TypePointer UniformConstant 204 - 206(g_tTex3di4): 205(ptr) Variable UniformConstant - 207: TypeImage 53(int) 3D sampled format:Unknown + 206(g_tTexcdi4): 205(ptr) Variable UniformConstant + 207: TypeImage 51(int) Cube sampled format:Unknown 208: TypePointer UniformConstant 207 - 209(g_tTex3du4): 208(ptr) Variable UniformConstant - 210: TypeImage 6(float) Cube sampled format:Unknown - 211: TypePointer UniformConstant 210 - 212(g_tTexcdf4): 211(ptr) Variable UniformConstant - 213: TypeImage 38(int) Cube sampled format:Unknown - 214: TypePointer UniformConstant 213 - 215(g_tTexcdi4): 214(ptr) Variable UniformConstant - 216: TypeImage 53(int) Cube sampled format:Unknown - 217: TypePointer UniformConstant 216 - 218(g_tTexcdu4): 217(ptr) Variable UniformConstant + 209(g_tTexcdu4): 208(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label -173(flattenTemp): 161(ptr) Variable Function - 174:8(PS_OUTPUT) FunctionCall 10(@main() - Store 173(flattenTemp) 174 - 177: 166(ptr) AccessChain 173(flattenTemp) 163 - 178: 7(fvec4) Load 177 - Store 176(Color) 178 - 181: 12(ptr) AccessChain 173(flattenTemp) 168 - 182: 6(float) Load 181 - Store 180(Depth) 182 +164(flattenTemp): 152(ptr) Variable Function + 165:8(PS_OUTPUT) FunctionCall 10(@main() + Store 164(flattenTemp) 165 + 168: 157(ptr) AccessChain 164(flattenTemp) 154 + 169: 7(fvec4) Load 168 + Store 167(@entryPointOutput.Color) 169 + 172: 12(ptr) AccessChain 164(flattenTemp) 159 + 173: 6(float) Load 172 + Store 171(@entryPointOutput.Depth) 173 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 11: Label 13(r10): 12(ptr) Variable Function - 37(r12): 12(ptr) Variable Function - 52(r14): 12(ptr) Variable Function - 67(r30): 12(ptr) Variable Function - 84(r32): 12(ptr) Variable Function - 99(r34): 12(ptr) Variable Function - 114(r60): 12(ptr) Variable Function - 131(r62): 12(ptr) Variable Function - 146(r64): 12(ptr) Variable Function - 162(psout): 161(ptr) Variable Function + 36(r12): 12(ptr) Variable Function + 50(r14): 12(ptr) Variable Function + 64(r30): 12(ptr) Variable Function + 80(r32): 12(ptr) Variable Function + 94(r34): 12(ptr) Variable Function + 108(r60): 12(ptr) Variable Function + 124(r62): 12(ptr) Variable Function + 138(r64): 12(ptr) Variable Function + 153(psout): 152(ptr) Variable Function 17: 14 Load 16(g_tTex1df4a) 21: 18 Load 20(g_sSamp) - 24: 23 SampledImage 17 21 - 31: 6(float) CompositeExtract 28 0 - 32: 6(float) CompositeExtract 28 1 - 33: 30(fvec3) CompositeConstruct 31 32 29 - 35: 6(float) CompositeExtract 33 2 - 36: 6(float) ImageSampleDrefExplicitLod 24 33 35 Lod 34 - Store 13(r10) 36 - 42: 39 Load 41(g_tTex1di4a) - 43: 18 Load 20(g_sSamp) - 46: 45 SampledImage 42 43 - 47: 6(float) CompositeExtract 28 0 - 48: 6(float) CompositeExtract 28 1 - 49: 30(fvec3) CompositeConstruct 47 48 29 - 50: 6(float) CompositeExtract 49 2 - 51: 6(float) ImageSampleDrefExplicitLod 46 49 50 Lod 34 - Store 37(r12) 51 - 57: 54 Load 56(g_tTex1du4a) - 58: 18 Load 20(g_sSamp) - 61: 60 SampledImage 57 58 - 62: 6(float) CompositeExtract 28 0 - 63: 6(float) CompositeExtract 28 1 - 64: 30(fvec3) CompositeConstruct 62 63 29 - 65: 6(float) CompositeExtract 64 2 - 66: 6(float) ImageSampleDrefExplicitLod 61 64 65 Lod 34 - Store 52(r14) 66 - 71: 68 Load 70(g_tTex2df4a) - 72: 18 Load 20(g_sSamp) - 75: 74 SampledImage 71 72 - 78: 6(float) CompositeExtract 77 0 - 79: 6(float) CompositeExtract 77 1 - 80: 6(float) CompositeExtract 77 2 - 81: 7(fvec4) CompositeConstruct 78 79 80 29 - 82: 6(float) CompositeExtract 81 3 - 83: 6(float) ImageSampleDrefExplicitLod 75 81 82 Lod 34 - Store 67(r30) 83 - 88: 85 Load 87(g_tTex2di4a) - 89: 18 Load 20(g_sSamp) - 92: 91 SampledImage 88 89 - 93: 6(float) CompositeExtract 77 0 - 94: 6(float) CompositeExtract 77 1 - 95: 6(float) CompositeExtract 77 2 - 96: 7(fvec4) CompositeConstruct 93 94 95 29 - 97: 6(float) CompositeExtract 96 3 - 98: 6(float) ImageSampleDrefExplicitLod 92 96 97 Lod 34 - Store 84(r32) 98 - 103: 100 Load 102(g_tTex2du4a) - 104: 18 Load 20(g_sSamp) - 107: 106 SampledImage 103 104 - 108: 6(float) CompositeExtract 77 0 - 109: 6(float) CompositeExtract 77 1 - 110: 6(float) CompositeExtract 77 2 - 111: 7(fvec4) CompositeConstruct 108 109 110 29 - 112: 6(float) CompositeExtract 111 3 - 113: 6(float) ImageSampleDrefExplicitLod 107 111 112 Lod 34 - Store 99(r34) 113 - 118: 115 Load 117(g_tTexcdf4a) - 119: 18 Load 20(g_sSamp) - 122: 121 SampledImage 118 119 - 125: 6(float) CompositeExtract 124 0 - 126: 6(float) CompositeExtract 124 1 - 127: 6(float) CompositeExtract 124 2 - 128: 6(float) CompositeExtract 124 3 - 129: 7(fvec4) CompositeConstruct 125 126 127 128 - 130: 6(float) ImageSampleDrefExplicitLod 122 129 29 Lod 29 - Store 114(r60) 130 - 135: 132 Load 134(g_tTexcdi4a) - 136: 18 Load 20(g_sSamp) - 139: 138 SampledImage 135 136 - 140: 6(float) CompositeExtract 124 0 - 141: 6(float) CompositeExtract 124 1 - 142: 6(float) CompositeExtract 124 2 - 143: 6(float) CompositeExtract 124 3 - 144: 7(fvec4) CompositeConstruct 140 141 142 143 - 145: 6(float) ImageSampleDrefExplicitLod 139 144 29 Lod 29 - Store 131(r62) 145 - 150: 147 Load 149(g_tTexcdu4a) - 151: 18 Load 20(g_sSamp) - 154: 153 SampledImage 150 151 - 155: 6(float) CompositeExtract 124 0 - 156: 6(float) CompositeExtract 124 1 - 157: 6(float) CompositeExtract 124 2 - 158: 6(float) CompositeExtract 124 3 - 159: 7(fvec4) CompositeConstruct 155 156 157 158 - 160: 6(float) ImageSampleDrefExplicitLod 154 159 29 Lod 29 - Store 146(r64) 160 - 167: 166(ptr) AccessChain 162(psout) 163 - Store 167 165 - 169: 12(ptr) AccessChain 162(psout) 168 - Store 169 164 - 170:8(PS_OUTPUT) Load 162(psout) - ReturnValue 170 + 23: 22 SampledImage 17 21 + 30: 6(float) CompositeExtract 27 0 + 31: 6(float) CompositeExtract 27 1 + 32: 29(fvec3) CompositeConstruct 30 31 28 + 34: 6(float) CompositeExtract 32 2 + 35: 6(float) ImageSampleDrefExplicitLod 23 32 34 Lod 33 + Store 13(r10) 35 + 41: 38 Load 40(g_tTex1di4a) + 42: 18 Load 20(g_sSamp) + 44: 43 SampledImage 41 42 + 45: 6(float) CompositeExtract 27 0 + 46: 6(float) CompositeExtract 27 1 + 47: 29(fvec3) CompositeConstruct 45 46 28 + 48: 6(float) CompositeExtract 47 2 + 49: 6(float) ImageSampleDrefExplicitLod 44 47 48 Lod 33 + Store 36(r12) 49 + 55: 52 Load 54(g_tTex1du4a) + 56: 18 Load 20(g_sSamp) + 58: 57 SampledImage 55 56 + 59: 6(float) CompositeExtract 27 0 + 60: 6(float) CompositeExtract 27 1 + 61: 29(fvec3) CompositeConstruct 59 60 28 + 62: 6(float) CompositeExtract 61 2 + 63: 6(float) ImageSampleDrefExplicitLod 58 61 62 Lod 33 + Store 50(r14) 63 + 68: 65 Load 67(g_tTex2df4a) + 69: 18 Load 20(g_sSamp) + 71: 70 SampledImage 68 69 + 74: 6(float) CompositeExtract 73 0 + 75: 6(float) CompositeExtract 73 1 + 76: 6(float) CompositeExtract 73 2 + 77: 7(fvec4) CompositeConstruct 74 75 76 28 + 78: 6(float) CompositeExtract 77 3 + 79: 6(float) ImageSampleDrefExplicitLod 71 77 78 Lod 33 + Store 64(r30) 79 + 84: 81 Load 83(g_tTex2di4a) + 85: 18 Load 20(g_sSamp) + 87: 86 SampledImage 84 85 + 88: 6(float) CompositeExtract 73 0 + 89: 6(float) CompositeExtract 73 1 + 90: 6(float) CompositeExtract 73 2 + 91: 7(fvec4) CompositeConstruct 88 89 90 28 + 92: 6(float) CompositeExtract 91 3 + 93: 6(float) ImageSampleDrefExplicitLod 87 91 92 Lod 33 + Store 80(r32) 93 + 98: 95 Load 97(g_tTex2du4a) + 99: 18 Load 20(g_sSamp) + 101: 100 SampledImage 98 99 + 102: 6(float) CompositeExtract 73 0 + 103: 6(float) CompositeExtract 73 1 + 104: 6(float) CompositeExtract 73 2 + 105: 7(fvec4) CompositeConstruct 102 103 104 28 + 106: 6(float) CompositeExtract 105 3 + 107: 6(float) ImageSampleDrefExplicitLod 101 105 106 Lod 33 + Store 94(r34) 107 + 112: 109 Load 111(g_tTexcdf4a) + 113: 18 Load 20(g_sSamp) + 115: 114 SampledImage 112 113 + 118: 6(float) CompositeExtract 117 0 + 119: 6(float) CompositeExtract 117 1 + 120: 6(float) CompositeExtract 117 2 + 121: 6(float) CompositeExtract 117 3 + 122: 7(fvec4) CompositeConstruct 118 119 120 121 + 123: 6(float) ImageSampleDrefExplicitLod 115 122 28 Lod 33 + Store 108(r60) 123 + 128: 125 Load 127(g_tTexcdi4a) + 129: 18 Load 20(g_sSamp) + 131: 130 SampledImage 128 129 + 132: 6(float) CompositeExtract 117 0 + 133: 6(float) CompositeExtract 117 1 + 134: 6(float) CompositeExtract 117 2 + 135: 6(float) CompositeExtract 117 3 + 136: 7(fvec4) CompositeConstruct 132 133 134 135 + 137: 6(float) ImageSampleDrefExplicitLod 131 136 28 Lod 33 + Store 124(r62) 137 + 142: 139 Load 141(g_tTexcdu4a) + 143: 18 Load 20(g_sSamp) + 145: 144 SampledImage 142 143 + 146: 6(float) CompositeExtract 117 0 + 147: 6(float) CompositeExtract 117 1 + 148: 6(float) CompositeExtract 117 2 + 149: 6(float) CompositeExtract 117 3 + 150: 7(fvec4) CompositeConstruct 146 147 148 149 + 151: 6(float) ImageSampleDrefExplicitLod 145 150 28 Lod 33 + Store 138(r64) 151 + 158: 157(ptr) AccessChain 153(psout) 154 + Store 158 156 + 160: 12(ptr) AccessChain 153(psout) 159 + Store 160 155 + 161:8(PS_OUTPUT) Load 153(psout) + ReturnValue 161 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out index 9d2802d..fca4474 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out @@ -10,7 +10,7 @@ gl_FragCoord origin is upper left 0:42 'r00' ( temp float) 0:42 textureLod ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DShadow) -0:42 'g_tTex1df4' (layout( binding=0) uniform texture1D) +0:42 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec2 ( temp 2-component vector of float) 0:42 Constant: @@ -24,7 +24,7 @@ gl_FragCoord origin is upper left 0:43 'r02' ( temp float) 0:43 textureLod ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DShadow) -0:43 'g_tTex1di4' ( uniform itexture1D) +0:43 'g_tTex1di4' ( uniform itexture1DShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec2 ( temp 2-component vector of float) 0:43 Constant: @@ -38,7 +38,7 @@ gl_FragCoord origin is upper left 0:44 'r04' ( temp float) 0:44 textureLod ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DShadow) -0:44 'g_tTex1du4' ( uniform utexture1D) +0:44 'g_tTex1du4' ( uniform utexture1DShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec2 ( temp 2-component vector of float) 0:44 Constant: @@ -52,7 +52,7 @@ gl_FragCoord origin is upper left 0:47 'r20' ( temp float) 0:47 textureLod ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DShadow) -0:47 'g_tTex2df4' ( uniform texture2D) +0:47 'g_tTex2df4' ( uniform texture2DShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -67,7 +67,7 @@ gl_FragCoord origin is upper left 0:48 'r22' ( temp float) 0:48 textureLod ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DShadow) -0:48 'g_tTex2di4' ( uniform itexture2D) +0:48 'g_tTex2di4' ( uniform itexture2DShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -82,7 +82,7 @@ gl_FragCoord origin is upper left 0:49 'r24' ( temp float) 0:49 textureLod ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DShadow) -0:49 'g_tTex2du4' ( uniform utexture2D) +0:49 'g_tTex2du4' ( uniform utexture2DShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -97,7 +97,7 @@ gl_FragCoord origin is upper left 0:53 'r50' ( temp float) 0:53 textureLod ( temp float) 0:53 Construct combined texture-sampler ( temp samplerCubeShadow) -0:53 'g_tTexcdf4' ( uniform textureCube) +0:53 'g_tTexcdf4' ( uniform textureCubeShadow) 0:53 'g_sSamp' (layout( binding=0) uniform sampler) 0:53 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -113,7 +113,7 @@ gl_FragCoord origin is upper left 0:54 'r52' ( temp float) 0:54 textureLod ( temp float) 0:54 Construct combined texture-sampler ( temp isamplerCubeShadow) -0:54 'g_tTexcdi4' ( uniform itextureCube) +0:54 'g_tTexcdi4' ( uniform itextureCubeShadow) 0:54 'g_sSamp' (layout( binding=0) uniform sampler) 0:54 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -129,7 +129,7 @@ gl_FragCoord origin is upper left 0:55 'r54' ( temp float) 0:55 textureLod ( temp float) 0:55 Construct combined texture-sampler ( temp usamplerCubeShadow) -0:55 'g_tTexcdu4' ( uniform utextureCube) +0:55 'g_tTexcdu4' ( uniform utextureCubeShadow) 0:55 'g_sSamp' (layout( binding=0) uniform sampler) 0:55 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -167,31 +167,31 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 1 (const int) 0:? Linker Objects 0:? 'g_sSamp' (layout( binding=0) uniform sampler) -0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) -0:? 'g_tTex1di4' ( uniform itexture1D) -0:? 'g_tTex1du4' ( uniform utexture1D) -0:? 'g_tTex2df4' ( uniform texture2D) -0:? 'g_tTex2di4' ( uniform itexture2D) -0:? 'g_tTex2du4' ( uniform utexture2D) +0:? 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) +0:? 'g_tTex1di4' ( uniform itexture1DShadow) +0:? 'g_tTex1du4' ( uniform utexture1DShadow) +0:? 'g_tTex2df4' ( uniform texture2DShadow) +0:? 'g_tTex2di4' ( uniform itexture2DShadow) +0:? 'g_tTex2du4' ( uniform utexture2DShadow) 0:? 'g_tTex3df4' ( uniform texture3D) 0:? 'g_tTex3di4' ( uniform itexture3D) 0:? 'g_tTex3du4' ( uniform utexture3D) -0:? 'g_tTexcdf4' ( uniform textureCube) -0:? 'g_tTexcdi4' ( uniform itextureCube) -0:? 'g_tTexcdu4' ( uniform utextureCube) +0:? 'g_tTexcdf4' ( uniform textureCubeShadow) +0:? 'g_tTexcdi4' ( uniform itextureCubeShadow) +0:? 'g_tTexcdu4' ( uniform utextureCubeShadow) 0:? 'g_tTex1df4a' ( uniform texture1DArray) 0:? 'g_tTex1di4a' ( uniform itexture1DArray) 0:? 'g_tTex1du4a' ( uniform utexture1DArray) @@ -201,8 +201,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -219,7 +219,7 @@ gl_FragCoord origin is upper left 0:42 'r00' ( temp float) 0:42 textureLod ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DShadow) -0:42 'g_tTex1df4' (layout( binding=0) uniform texture1D) +0:42 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec2 ( temp 2-component vector of float) 0:42 Constant: @@ -233,7 +233,7 @@ gl_FragCoord origin is upper left 0:43 'r02' ( temp float) 0:43 textureLod ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DShadow) -0:43 'g_tTex1di4' ( uniform itexture1D) +0:43 'g_tTex1di4' ( uniform itexture1DShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec2 ( temp 2-component vector of float) 0:43 Constant: @@ -247,7 +247,7 @@ gl_FragCoord origin is upper left 0:44 'r04' ( temp float) 0:44 textureLod ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DShadow) -0:44 'g_tTex1du4' ( uniform utexture1D) +0:44 'g_tTex1du4' ( uniform utexture1DShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec2 ( temp 2-component vector of float) 0:44 Constant: @@ -261,7 +261,7 @@ gl_FragCoord origin is upper left 0:47 'r20' ( temp float) 0:47 textureLod ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DShadow) -0:47 'g_tTex2df4' ( uniform texture2D) +0:47 'g_tTex2df4' ( uniform texture2DShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -276,7 +276,7 @@ gl_FragCoord origin is upper left 0:48 'r22' ( temp float) 0:48 textureLod ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DShadow) -0:48 'g_tTex2di4' ( uniform itexture2D) +0:48 'g_tTex2di4' ( uniform itexture2DShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -291,7 +291,7 @@ gl_FragCoord origin is upper left 0:49 'r24' ( temp float) 0:49 textureLod ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DShadow) -0:49 'g_tTex2du4' ( uniform utexture2D) +0:49 'g_tTex2du4' ( uniform utexture2DShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -306,7 +306,7 @@ gl_FragCoord origin is upper left 0:53 'r50' ( temp float) 0:53 textureLod ( temp float) 0:53 Construct combined texture-sampler ( temp samplerCubeShadow) -0:53 'g_tTexcdf4' ( uniform textureCube) +0:53 'g_tTexcdf4' ( uniform textureCubeShadow) 0:53 'g_sSamp' (layout( binding=0) uniform sampler) 0:53 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -322,7 +322,7 @@ gl_FragCoord origin is upper left 0:54 'r52' ( temp float) 0:54 textureLod ( temp float) 0:54 Construct combined texture-sampler ( temp isamplerCubeShadow) -0:54 'g_tTexcdi4' ( uniform itextureCube) +0:54 'g_tTexcdi4' ( uniform itextureCubeShadow) 0:54 'g_sSamp' (layout( binding=0) uniform sampler) 0:54 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -338,7 +338,7 @@ gl_FragCoord origin is upper left 0:55 'r54' ( temp float) 0:55 textureLod ( temp float) 0:55 Construct combined texture-sampler ( temp usamplerCubeShadow) -0:55 'g_tTexcdu4' ( uniform utextureCube) +0:55 'g_tTexcdu4' ( uniform utextureCubeShadow) 0:55 'g_sSamp' (layout( binding=0) uniform sampler) 0:55 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -376,31 +376,31 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 1 (const int) 0:? Linker Objects 0:? 'g_sSamp' (layout( binding=0) uniform sampler) -0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) -0:? 'g_tTex1di4' ( uniform itexture1D) -0:? 'g_tTex1du4' ( uniform utexture1D) -0:? 'g_tTex2df4' ( uniform texture2D) -0:? 'g_tTex2di4' ( uniform itexture2D) -0:? 'g_tTex2du4' ( uniform utexture2D) +0:? 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) +0:? 'g_tTex1di4' ( uniform itexture1DShadow) +0:? 'g_tTex1du4' ( uniform utexture1DShadow) +0:? 'g_tTex2df4' ( uniform texture2DShadow) +0:? 'g_tTex2di4' ( uniform itexture2DShadow) +0:? 'g_tTex2du4' ( uniform utexture2DShadow) 0:? 'g_tTex3df4' ( uniform texture3D) 0:? 'g_tTex3di4' ( uniform itexture3D) 0:? 'g_tTex3du4' ( uniform utexture3D) -0:? 'g_tTexcdf4' ( uniform textureCube) -0:? 'g_tTexcdi4' ( uniform itextureCube) -0:? 'g_tTexcdu4' ( uniform utextureCube) +0:? 'g_tTexcdf4' ( uniform textureCubeShadow) +0:? 'g_tTexcdi4' ( uniform itextureCubeShadow) +0:? 'g_tTexcdu4' ( uniform utextureCubeShadow) 0:? 'g_tTex1df4a' ( uniform texture1DArray) 0:? 'g_tTex1di4a' ( uniform itexture1DArray) 0:? 'g_tTex1du4a' ( uniform utexture1DArray) @@ -410,19 +410,19 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 208 +// Generated by (magic number): 80003 +// Id's are bound by 199 Capability Shader Capability Sampled1D Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 165 169 + EntryPoint Fragment 4 "main" 156 160 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -433,64 +433,64 @@ gl_FragCoord origin is upper left Name 13 "r00" Name 16 "g_tTex1df4" Name 20 "g_sSamp" - Name 32 "r02" - Name 36 "g_tTex1di4" - Name 45 "r04" - Name 49 "g_tTex1du4" - Name 58 "r20" - Name 61 "g_tTex2df4" - Name 75 "r22" - Name 78 "g_tTex2di4" - Name 89 "r24" - Name 92 "g_tTex2du4" - Name 103 "r50" - Name 106 "g_tTexcdf4" - Name 120 "r52" - Name 123 "g_tTexcdi4" - Name 135 "r54" - Name 138 "g_tTexcdu4" - Name 151 "psout" - Name 162 "flattenTemp" - Name 165 "Color" - Name 169 "Depth" - Name 174 "g_tTex3df4" - Name 177 "g_tTex3di4" - Name 180 "g_tTex3du4" - Name 183 "g_tTex1df4a" - Name 186 "g_tTex1di4a" - Name 189 "g_tTex1du4a" - Name 192 "g_tTex2df4a" - Name 195 "g_tTex2di4a" - Name 198 "g_tTex2du4a" - Name 201 "g_tTexcdf4a" - Name 204 "g_tTexcdi4a" - Name 207 "g_tTexcdu4a" + Name 31 "r02" + Name 35 "g_tTex1di4" + Name 43 "r04" + Name 47 "g_tTex1du4" + Name 55 "r20" + Name 58 "g_tTex2df4" + Name 71 "r22" + Name 74 "g_tTex2di4" + Name 84 "r24" + Name 87 "g_tTex2du4" + Name 97 "r50" + Name 100 "g_tTexcdf4" + Name 113 "r52" + Name 116 "g_tTexcdi4" + Name 127 "r54" + Name 130 "g_tTexcdu4" + Name 142 "psout" + Name 153 "flattenTemp" + Name 156 "@entryPointOutput.Color" + Name 160 "@entryPointOutput.Depth" + Name 165 "g_tTex3df4" + Name 168 "g_tTex3di4" + Name 171 "g_tTex3du4" + Name 174 "g_tTex1df4a" + Name 177 "g_tTex1di4a" + Name 180 "g_tTex1du4a" + Name 183 "g_tTex2df4a" + Name 186 "g_tTex2di4a" + Name 189 "g_tTex2du4a" + Name 192 "g_tTexcdf4a" + Name 195 "g_tTexcdi4a" + Name 198 "g_tTexcdu4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 Decorate 20(g_sSamp) DescriptorSet 0 Decorate 20(g_sSamp) Binding 0 - Decorate 36(g_tTex1di4) DescriptorSet 0 - Decorate 49(g_tTex1du4) DescriptorSet 0 - Decorate 61(g_tTex2df4) DescriptorSet 0 - Decorate 78(g_tTex2di4) DescriptorSet 0 - Decorate 92(g_tTex2du4) DescriptorSet 0 - Decorate 106(g_tTexcdf4) DescriptorSet 0 - Decorate 123(g_tTexcdi4) DescriptorSet 0 - Decorate 138(g_tTexcdu4) DescriptorSet 0 - Decorate 165(Color) Location 0 - Decorate 169(Depth) BuiltIn FragDepth - Decorate 174(g_tTex3df4) DescriptorSet 0 - Decorate 177(g_tTex3di4) DescriptorSet 0 - Decorate 180(g_tTex3du4) DescriptorSet 0 - Decorate 183(g_tTex1df4a) DescriptorSet 0 - Decorate 186(g_tTex1di4a) DescriptorSet 0 - Decorate 189(g_tTex1du4a) DescriptorSet 0 - Decorate 192(g_tTex2df4a) DescriptorSet 0 - Decorate 195(g_tTex2di4a) DescriptorSet 0 - Decorate 198(g_tTex2du4a) DescriptorSet 0 - Decorate 201(g_tTexcdf4a) DescriptorSet 0 - Decorate 204(g_tTexcdi4a) DescriptorSet 0 - Decorate 207(g_tTexcdu4a) DescriptorSet 0 + Decorate 35(g_tTex1di4) DescriptorSet 0 + Decorate 47(g_tTex1du4) DescriptorSet 0 + Decorate 58(g_tTex2df4) DescriptorSet 0 + Decorate 74(g_tTex2di4) DescriptorSet 0 + Decorate 87(g_tTex2du4) DescriptorSet 0 + Decorate 100(g_tTexcdf4) DescriptorSet 0 + Decorate 116(g_tTexcdi4) DescriptorSet 0 + Decorate 130(g_tTexcdu4) DescriptorSet 0 + Decorate 156(@entryPointOutput.Color) Location 0 + Decorate 160(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 165(g_tTex3df4) DescriptorSet 0 + Decorate 168(g_tTex3di4) DescriptorSet 0 + Decorate 171(g_tTex3du4) DescriptorSet 0 + Decorate 174(g_tTex1df4a) DescriptorSet 0 + Decorate 177(g_tTex1di4a) DescriptorSet 0 + Decorate 180(g_tTex1du4a) DescriptorSet 0 + Decorate 183(g_tTex2df4a) DescriptorSet 0 + Decorate 186(g_tTex2di4a) DescriptorSet 0 + Decorate 189(g_tTex2du4a) DescriptorSet 0 + Decorate 192(g_tTexcdf4a) DescriptorSet 0 + Decorate 195(g_tTexcdi4a) DescriptorSet 0 + Decorate 198(g_tTexcdu4a) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -498,218 +498,209 @@ gl_FragCoord origin is upper left 8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float) 9: TypeFunction 8(PS_OUTPUT) 12: TypePointer Function 6(float) - 14: TypeImage 6(float) 1D sampled format:Unknown + 14: TypeImage 6(float) 1D depth sampled format:Unknown 15: TypePointer UniformConstant 14 16(g_tTex1df4): 15(ptr) Variable UniformConstant 18: TypeSampler 19: TypePointer UniformConstant 18 20(g_sSamp): 19(ptr) Variable UniformConstant - 22: TypeImage 6(float) 1D depth sampled format:Unknown - 23: TypeSampledImage 22 - 25: 6(float) Constant 1036831949 - 26: 6(float) Constant 1061158912 - 27: TypeVector 6(float) 2 - 29: 6(float) Constant 0 - 33: TypeInt 32 1 - 34: TypeImage 33(int) 1D sampled format:Unknown - 35: TypePointer UniformConstant 34 - 36(g_tTex1di4): 35(ptr) Variable UniformConstant - 39: TypeImage 33(int) 1D depth sampled format:Unknown - 40: TypeSampledImage 39 - 46: TypeInt 32 0 - 47: TypeImage 46(int) 1D sampled format:Unknown - 48: TypePointer UniformConstant 47 - 49(g_tTex1du4): 48(ptr) Variable UniformConstant - 52: TypeImage 46(int) 1D depth sampled format:Unknown - 53: TypeSampledImage 52 - 59: TypeImage 6(float) 2D sampled format:Unknown - 60: TypePointer UniformConstant 59 - 61(g_tTex2df4): 60(ptr) Variable UniformConstant - 64: TypeImage 6(float) 2D depth sampled format:Unknown - 65: TypeSampledImage 64 - 67: 6(float) Constant 1045220557 - 68: 27(fvec2) ConstantComposite 25 67 - 69: TypeVector 6(float) 3 - 76: TypeImage 33(int) 2D sampled format:Unknown - 77: TypePointer UniformConstant 76 - 78(g_tTex2di4): 77(ptr) Variable UniformConstant - 81: TypeImage 33(int) 2D depth sampled format:Unknown - 82: TypeSampledImage 81 - 90: TypeImage 46(int) 2D sampled format:Unknown - 91: TypePointer UniformConstant 90 - 92(g_tTex2du4): 91(ptr) Variable UniformConstant - 95: TypeImage 46(int) 2D depth sampled format:Unknown - 96: TypeSampledImage 95 - 104: TypeImage 6(float) Cube sampled format:Unknown - 105: TypePointer UniformConstant 104 - 106(g_tTexcdf4): 105(ptr) Variable UniformConstant - 109: TypeImage 6(float) Cube depth sampled format:Unknown - 110: TypeSampledImage 109 - 112: 6(float) Constant 1050253722 - 113: 69(fvec3) ConstantComposite 25 67 112 - 121: TypeImage 33(int) Cube sampled format:Unknown - 122: TypePointer UniformConstant 121 - 123(g_tTexcdi4): 122(ptr) Variable UniformConstant - 126: TypeImage 33(int) Cube depth sampled format:Unknown - 127: TypeSampledImage 126 - 136: TypeImage 46(int) Cube sampled format:Unknown - 137: TypePointer UniformConstant 136 - 138(g_tTexcdu4): 137(ptr) Variable UniformConstant - 141: TypeImage 46(int) Cube depth sampled format:Unknown - 142: TypeSampledImage 141 - 150: TypePointer Function 8(PS_OUTPUT) - 152: 33(int) Constant 0 - 153: 6(float) Constant 1065353216 - 154: 7(fvec4) ConstantComposite 153 153 153 153 - 155: TypePointer Function 7(fvec4) - 157: 33(int) Constant 1 - 164: TypePointer Output 7(fvec4) - 165(Color): 164(ptr) Variable Output - 168: TypePointer Output 6(float) - 169(Depth): 168(ptr) Variable Output - 172: TypeImage 6(float) 3D sampled format:Unknown + 22: TypeSampledImage 14 + 24: 6(float) Constant 1036831949 + 25: 6(float) Constant 1061158912 + 26: TypeVector 6(float) 2 + 28: 6(float) Constant 0 + 32: TypeInt 32 1 + 33: TypeImage 32(int) 1D depth sampled format:Unknown + 34: TypePointer UniformConstant 33 + 35(g_tTex1di4): 34(ptr) Variable UniformConstant + 38: TypeSampledImage 33 + 44: TypeInt 32 0 + 45: TypeImage 44(int) 1D depth sampled format:Unknown + 46: TypePointer UniformConstant 45 + 47(g_tTex1du4): 46(ptr) Variable UniformConstant + 50: TypeSampledImage 45 + 56: TypeImage 6(float) 2D depth sampled format:Unknown + 57: TypePointer UniformConstant 56 + 58(g_tTex2df4): 57(ptr) Variable UniformConstant + 61: TypeSampledImage 56 + 63: 6(float) Constant 1045220557 + 64: 26(fvec2) ConstantComposite 24 63 + 65: TypeVector 6(float) 3 + 72: TypeImage 32(int) 2D depth sampled format:Unknown + 73: TypePointer UniformConstant 72 + 74(g_tTex2di4): 73(ptr) Variable UniformConstant + 77: TypeSampledImage 72 + 85: TypeImage 44(int) 2D depth sampled format:Unknown + 86: TypePointer UniformConstant 85 + 87(g_tTex2du4): 86(ptr) Variable UniformConstant + 90: TypeSampledImage 85 + 98: TypeImage 6(float) Cube depth sampled format:Unknown + 99: TypePointer UniformConstant 98 + 100(g_tTexcdf4): 99(ptr) Variable UniformConstant + 103: TypeSampledImage 98 + 105: 6(float) Constant 1050253722 + 106: 65(fvec3) ConstantComposite 24 63 105 + 114: TypeImage 32(int) Cube depth sampled format:Unknown + 115: TypePointer UniformConstant 114 + 116(g_tTexcdi4): 115(ptr) Variable UniformConstant + 119: TypeSampledImage 114 + 128: TypeImage 44(int) Cube depth sampled format:Unknown + 129: TypePointer UniformConstant 128 + 130(g_tTexcdu4): 129(ptr) Variable UniformConstant + 133: TypeSampledImage 128 + 141: TypePointer Function 8(PS_OUTPUT) + 143: 32(int) Constant 0 + 144: 6(float) Constant 1065353216 + 145: 7(fvec4) ConstantComposite 144 144 144 144 + 146: TypePointer Function 7(fvec4) + 148: 32(int) Constant 1 + 155: TypePointer Output 7(fvec4) +156(@entryPointOutput.Color): 155(ptr) Variable Output + 159: TypePointer Output 6(float) +160(@entryPointOutput.Depth): 159(ptr) Variable Output + 163: TypeImage 6(float) 3D sampled format:Unknown + 164: TypePointer UniformConstant 163 + 165(g_tTex3df4): 164(ptr) Variable UniformConstant + 166: TypeImage 32(int) 3D sampled format:Unknown + 167: TypePointer UniformConstant 166 + 168(g_tTex3di4): 167(ptr) Variable UniformConstant + 169: TypeImage 44(int) 3D sampled format:Unknown + 170: TypePointer UniformConstant 169 + 171(g_tTex3du4): 170(ptr) Variable UniformConstant + 172: TypeImage 6(float) 1D array sampled format:Unknown 173: TypePointer UniformConstant 172 - 174(g_tTex3df4): 173(ptr) Variable UniformConstant - 175: TypeImage 33(int) 3D sampled format:Unknown +174(g_tTex1df4a): 173(ptr) Variable UniformConstant + 175: TypeImage 32(int) 1D array sampled format:Unknown 176: TypePointer UniformConstant 175 - 177(g_tTex3di4): 176(ptr) Variable UniformConstant - 178: TypeImage 46(int) 3D sampled format:Unknown +177(g_tTex1di4a): 176(ptr) Variable UniformConstant + 178: TypeImage 44(int) 1D array sampled format:Unknown 179: TypePointer UniformConstant 178 - 180(g_tTex3du4): 179(ptr) Variable UniformConstant - 181: TypeImage 6(float) 1D array sampled format:Unknown +180(g_tTex1du4a): 179(ptr) Variable UniformConstant + 181: TypeImage 6(float) 2D array sampled format:Unknown 182: TypePointer UniformConstant 181 -183(g_tTex1df4a): 182(ptr) Variable UniformConstant - 184: TypeImage 33(int) 1D array sampled format:Unknown +183(g_tTex2df4a): 182(ptr) Variable UniformConstant + 184: TypeImage 32(int) 2D array sampled format:Unknown 185: TypePointer UniformConstant 184 -186(g_tTex1di4a): 185(ptr) Variable UniformConstant - 187: TypeImage 46(int) 1D array sampled format:Unknown +186(g_tTex2di4a): 185(ptr) Variable UniformConstant + 187: TypeImage 44(int) 2D array sampled format:Unknown 188: TypePointer UniformConstant 187 -189(g_tTex1du4a): 188(ptr) Variable UniformConstant - 190: TypeImage 6(float) 2D array sampled format:Unknown +189(g_tTex2du4a): 188(ptr) Variable UniformConstant + 190: TypeImage 6(float) Cube array sampled format:Unknown 191: TypePointer UniformConstant 190 -192(g_tTex2df4a): 191(ptr) Variable UniformConstant - 193: TypeImage 33(int) 2D array sampled format:Unknown +192(g_tTexcdf4a): 191(ptr) Variable UniformConstant + 193: TypeImage 32(int) Cube array sampled format:Unknown 194: TypePointer UniformConstant 193 -195(g_tTex2di4a): 194(ptr) Variable UniformConstant - 196: TypeImage 46(int) 2D array sampled format:Unknown +195(g_tTexcdi4a): 194(ptr) Variable UniformConstant + 196: TypeImage 44(int) Cube array sampled format:Unknown 197: TypePointer UniformConstant 196 -198(g_tTex2du4a): 197(ptr) Variable UniformConstant - 199: TypeImage 6(float) Cube array sampled format:Unknown - 200: TypePointer UniformConstant 199 -201(g_tTexcdf4a): 200(ptr) Variable UniformConstant - 202: TypeImage 33(int) Cube array sampled format:Unknown - 203: TypePointer UniformConstant 202 -204(g_tTexcdi4a): 203(ptr) Variable UniformConstant - 205: TypeImage 46(int) Cube array sampled format:Unknown - 206: TypePointer UniformConstant 205 -207(g_tTexcdu4a): 206(ptr) Variable UniformConstant +198(g_tTexcdu4a): 197(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label -162(flattenTemp): 150(ptr) Variable Function - 163:8(PS_OUTPUT) FunctionCall 10(@main() - Store 162(flattenTemp) 163 - 166: 155(ptr) AccessChain 162(flattenTemp) 152 - 167: 7(fvec4) Load 166 - Store 165(Color) 167 - 170: 12(ptr) AccessChain 162(flattenTemp) 157 - 171: 6(float) Load 170 - Store 169(Depth) 171 +153(flattenTemp): 141(ptr) Variable Function + 154:8(PS_OUTPUT) FunctionCall 10(@main() + Store 153(flattenTemp) 154 + 157: 146(ptr) AccessChain 153(flattenTemp) 143 + 158: 7(fvec4) Load 157 + Store 156(@entryPointOutput.Color) 158 + 161: 12(ptr) AccessChain 153(flattenTemp) 148 + 162: 6(float) Load 161 + Store 160(@entryPointOutput.Depth) 162 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 11: Label 13(r00): 12(ptr) Variable Function - 32(r02): 12(ptr) Variable Function - 45(r04): 12(ptr) Variable Function - 58(r20): 12(ptr) Variable Function - 75(r22): 12(ptr) Variable Function - 89(r24): 12(ptr) Variable Function - 103(r50): 12(ptr) Variable Function - 120(r52): 12(ptr) Variable Function - 135(r54): 12(ptr) Variable Function - 151(psout): 150(ptr) Variable Function + 31(r02): 12(ptr) Variable Function + 43(r04): 12(ptr) Variable Function + 55(r20): 12(ptr) Variable Function + 71(r22): 12(ptr) Variable Function + 84(r24): 12(ptr) Variable Function + 97(r50): 12(ptr) Variable Function + 113(r52): 12(ptr) Variable Function + 127(r54): 12(ptr) Variable Function + 142(psout): 141(ptr) Variable Function 17: 14 Load 16(g_tTex1df4) 21: 18 Load 20(g_sSamp) - 24: 23 SampledImage 17 21 - 28: 27(fvec2) CompositeConstruct 25 26 - 30: 6(float) CompositeExtract 28 1 - 31: 6(float) ImageSampleDrefExplicitLod 24 28 30 Lod 29 - Store 13(r00) 31 - 37: 34 Load 36(g_tTex1di4) - 38: 18 Load 20(g_sSamp) - 41: 40 SampledImage 37 38 - 42: 27(fvec2) CompositeConstruct 25 26 - 43: 6(float) CompositeExtract 42 1 - 44: 6(float) ImageSampleDrefExplicitLod 41 42 43 Lod 29 - Store 32(r02) 44 - 50: 47 Load 49(g_tTex1du4) - 51: 18 Load 20(g_sSamp) - 54: 53 SampledImage 50 51 - 55: 27(fvec2) CompositeConstruct 25 26 - 56: 6(float) CompositeExtract 55 1 - 57: 6(float) ImageSampleDrefExplicitLod 54 55 56 Lod 29 - Store 45(r04) 57 - 62: 59 Load 61(g_tTex2df4) - 63: 18 Load 20(g_sSamp) - 66: 65 SampledImage 62 63 - 70: 6(float) CompositeExtract 68 0 - 71: 6(float) CompositeExtract 68 1 - 72: 69(fvec3) CompositeConstruct 70 71 26 - 73: 6(float) CompositeExtract 72 2 - 74: 6(float) ImageSampleDrefExplicitLod 66 72 73 Lod 29 - Store 58(r20) 74 - 79: 76 Load 78(g_tTex2di4) - 80: 18 Load 20(g_sSamp) - 83: 82 SampledImage 79 80 - 84: 6(float) CompositeExtract 68 0 - 85: 6(float) CompositeExtract 68 1 - 86: 69(fvec3) CompositeConstruct 84 85 26 - 87: 6(float) CompositeExtract 86 2 - 88: 6(float) ImageSampleDrefExplicitLod 83 86 87 Lod 29 - Store 75(r22) 88 - 93: 90 Load 92(g_tTex2du4) - 94: 18 Load 20(g_sSamp) - 97: 96 SampledImage 93 94 - 98: 6(float) CompositeExtract 68 0 - 99: 6(float) CompositeExtract 68 1 - 100: 69(fvec3) CompositeConstruct 98 99 26 - 101: 6(float) CompositeExtract 100 2 - 102: 6(float) ImageSampleDrefExplicitLod 97 100 101 Lod 29 - Store 89(r24) 102 - 107: 104 Load 106(g_tTexcdf4) - 108: 18 Load 20(g_sSamp) - 111: 110 SampledImage 107 108 - 114: 6(float) CompositeExtract 113 0 - 115: 6(float) CompositeExtract 113 1 - 116: 6(float) CompositeExtract 113 2 - 117: 7(fvec4) CompositeConstruct 114 115 116 26 - 118: 6(float) CompositeExtract 117 3 - 119: 6(float) ImageSampleDrefExplicitLod 111 117 118 Lod 29 - Store 103(r50) 119 - 124: 121 Load 123(g_tTexcdi4) - 125: 18 Load 20(g_sSamp) - 128: 127 SampledImage 124 125 - 129: 6(float) CompositeExtract 113 0 - 130: 6(float) CompositeExtract 113 1 - 131: 6(float) CompositeExtract 113 2 - 132: 7(fvec4) CompositeConstruct 129 130 131 26 - 133: 6(float) CompositeExtract 132 3 - 134: 6(float) ImageSampleDrefExplicitLod 128 132 133 Lod 29 - Store 120(r52) 134 - 139: 136 Load 138(g_tTexcdu4) - 140: 18 Load 20(g_sSamp) - 143: 142 SampledImage 139 140 - 144: 6(float) CompositeExtract 113 0 - 145: 6(float) CompositeExtract 113 1 - 146: 6(float) CompositeExtract 113 2 - 147: 7(fvec4) CompositeConstruct 144 145 146 26 - 148: 6(float) CompositeExtract 147 3 - 149: 6(float) ImageSampleDrefExplicitLod 143 147 148 Lod 29 - Store 135(r54) 149 - 156: 155(ptr) AccessChain 151(psout) 152 - Store 156 154 - 158: 12(ptr) AccessChain 151(psout) 157 - Store 158 153 - 159:8(PS_OUTPUT) Load 151(psout) - ReturnValue 159 + 23: 22 SampledImage 17 21 + 27: 26(fvec2) CompositeConstruct 24 25 + 29: 6(float) CompositeExtract 27 1 + 30: 6(float) ImageSampleDrefExplicitLod 23 27 29 Lod 28 + Store 13(r00) 30 + 36: 33 Load 35(g_tTex1di4) + 37: 18 Load 20(g_sSamp) + 39: 38 SampledImage 36 37 + 40: 26(fvec2) CompositeConstruct 24 25 + 41: 6(float) CompositeExtract 40 1 + 42: 6(float) ImageSampleDrefExplicitLod 39 40 41 Lod 28 + Store 31(r02) 42 + 48: 45 Load 47(g_tTex1du4) + 49: 18 Load 20(g_sSamp) + 51: 50 SampledImage 48 49 + 52: 26(fvec2) CompositeConstruct 24 25 + 53: 6(float) CompositeExtract 52 1 + 54: 6(float) ImageSampleDrefExplicitLod 51 52 53 Lod 28 + Store 43(r04) 54 + 59: 56 Load 58(g_tTex2df4) + 60: 18 Load 20(g_sSamp) + 62: 61 SampledImage 59 60 + 66: 6(float) CompositeExtract 64 0 + 67: 6(float) CompositeExtract 64 1 + 68: 65(fvec3) CompositeConstruct 66 67 25 + 69: 6(float) CompositeExtract 68 2 + 70: 6(float) ImageSampleDrefExplicitLod 62 68 69 Lod 28 + Store 55(r20) 70 + 75: 72 Load 74(g_tTex2di4) + 76: 18 Load 20(g_sSamp) + 78: 77 SampledImage 75 76 + 79: 6(float) CompositeExtract 64 0 + 80: 6(float) CompositeExtract 64 1 + 81: 65(fvec3) CompositeConstruct 79 80 25 + 82: 6(float) CompositeExtract 81 2 + 83: 6(float) ImageSampleDrefExplicitLod 78 81 82 Lod 28 + Store 71(r22) 83 + 88: 85 Load 87(g_tTex2du4) + 89: 18 Load 20(g_sSamp) + 91: 90 SampledImage 88 89 + 92: 6(float) CompositeExtract 64 0 + 93: 6(float) CompositeExtract 64 1 + 94: 65(fvec3) CompositeConstruct 92 93 25 + 95: 6(float) CompositeExtract 94 2 + 96: 6(float) ImageSampleDrefExplicitLod 91 94 95 Lod 28 + Store 84(r24) 96 + 101: 98 Load 100(g_tTexcdf4) + 102: 18 Load 20(g_sSamp) + 104: 103 SampledImage 101 102 + 107: 6(float) CompositeExtract 106 0 + 108: 6(float) CompositeExtract 106 1 + 109: 6(float) CompositeExtract 106 2 + 110: 7(fvec4) CompositeConstruct 107 108 109 25 + 111: 6(float) CompositeExtract 110 3 + 112: 6(float) ImageSampleDrefExplicitLod 104 110 111 Lod 28 + Store 97(r50) 112 + 117: 114 Load 116(g_tTexcdi4) + 118: 18 Load 20(g_sSamp) + 120: 119 SampledImage 117 118 + 121: 6(float) CompositeExtract 106 0 + 122: 6(float) CompositeExtract 106 1 + 123: 6(float) CompositeExtract 106 2 + 124: 7(fvec4) CompositeConstruct 121 122 123 25 + 125: 6(float) CompositeExtract 124 3 + 126: 6(float) ImageSampleDrefExplicitLod 120 124 125 Lod 28 + Store 113(r52) 126 + 131: 128 Load 130(g_tTexcdu4) + 132: 18 Load 20(g_sSamp) + 134: 133 SampledImage 131 132 + 135: 6(float) CompositeExtract 106 0 + 136: 6(float) CompositeExtract 106 1 + 137: 6(float) CompositeExtract 106 2 + 138: 7(fvec4) CompositeConstruct 135 136 137 25 + 139: 6(float) CompositeExtract 138 3 + 140: 6(float) ImageSampleDrefExplicitLod 134 138 139 Lod 28 + Store 127(r54) 140 + 147: 146(ptr) AccessChain 142(psout) 143 + Store 147 145 + 149: 12(ptr) AccessChain 142(psout) 148 + Store 149 144 + 150:8(PS_OUTPUT) Load 142(psout) + ReturnValue 150 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out index 2e30e7c..83b48cf 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out @@ -10,7 +10,7 @@ gl_FragCoord origin is upper left 0:42 'r01' ( temp float) 0:42 textureLodOffset ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DShadow) -0:42 'g_tTex1df4' (layout( binding=0) uniform texture1D) +0:42 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec2 ( temp 2-component vector of float) 0:42 Constant: @@ -26,7 +26,7 @@ gl_FragCoord origin is upper left 0:43 'r03' ( temp float) 0:43 textureLodOffset ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DShadow) -0:43 'g_tTex1di4' ( uniform itexture1D) +0:43 'g_tTex1di4' ( uniform itexture1DShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec2 ( temp 2-component vector of float) 0:43 Constant: @@ -42,7 +42,7 @@ gl_FragCoord origin is upper left 0:44 'r05' ( temp float) 0:44 textureLodOffset ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DShadow) -0:44 'g_tTex1du4' ( uniform utexture1D) +0:44 'g_tTex1du4' ( uniform utexture1DShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec2 ( temp 2-component vector of float) 0:44 Constant: @@ -58,7 +58,7 @@ gl_FragCoord origin is upper left 0:47 'r21' ( temp float) 0:47 textureLodOffset ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DShadow) -0:47 'g_tTex2df4' ( uniform texture2D) +0:47 'g_tTex2df4' ( uniform texture2DShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -76,7 +76,7 @@ gl_FragCoord origin is upper left 0:48 'r23' ( temp float) 0:48 textureLodOffset ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DShadow) -0:48 'g_tTex2di4' ( uniform itexture2D) +0:48 'g_tTex2di4' ( uniform itexture2DShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -94,7 +94,7 @@ gl_FragCoord origin is upper left 0:49 'r25' ( temp float) 0:49 textureLodOffset ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DShadow) -0:49 'g_tTex2du4' ( uniform utexture2D) +0:49 'g_tTex2du4' ( uniform utexture2DShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -134,25 +134,25 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 1 (const int) 0:? Linker Objects 0:? 'g_sSamp' (layout( binding=0) uniform sampler) -0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) -0:? 'g_tTex1di4' ( uniform itexture1D) -0:? 'g_tTex1du4' ( uniform utexture1D) -0:? 'g_tTex2df4' ( uniform texture2D) -0:? 'g_tTex2di4' ( uniform itexture2D) -0:? 'g_tTex2du4' ( uniform utexture2D) +0:? 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) +0:? 'g_tTex1di4' ( uniform itexture1DShadow) +0:? 'g_tTex1du4' ( uniform utexture1DShadow) +0:? 'g_tTex2df4' ( uniform texture2DShadow) +0:? 'g_tTex2di4' ( uniform itexture2DShadow) +0:? 'g_tTex2du4' ( uniform utexture2DShadow) 0:? 'g_tTex3df4' ( uniform texture3D) 0:? 'g_tTex3di4' ( uniform itexture3D) 0:? 'g_tTex3du4' ( uniform utexture3D) @@ -168,8 +168,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -186,7 +186,7 @@ gl_FragCoord origin is upper left 0:42 'r01' ( temp float) 0:42 textureLodOffset ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DShadow) -0:42 'g_tTex1df4' (layout( binding=0) uniform texture1D) +0:42 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec2 ( temp 2-component vector of float) 0:42 Constant: @@ -202,7 +202,7 @@ gl_FragCoord origin is upper left 0:43 'r03' ( temp float) 0:43 textureLodOffset ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DShadow) -0:43 'g_tTex1di4' ( uniform itexture1D) +0:43 'g_tTex1di4' ( uniform itexture1DShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec2 ( temp 2-component vector of float) 0:43 Constant: @@ -218,7 +218,7 @@ gl_FragCoord origin is upper left 0:44 'r05' ( temp float) 0:44 textureLodOffset ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DShadow) -0:44 'g_tTex1du4' ( uniform utexture1D) +0:44 'g_tTex1du4' ( uniform utexture1DShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec2 ( temp 2-component vector of float) 0:44 Constant: @@ -234,7 +234,7 @@ gl_FragCoord origin is upper left 0:47 'r21' ( temp float) 0:47 textureLodOffset ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DShadow) -0:47 'g_tTex2df4' ( uniform texture2D) +0:47 'g_tTex2df4' ( uniform texture2DShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -252,7 +252,7 @@ gl_FragCoord origin is upper left 0:48 'r23' ( temp float) 0:48 textureLodOffset ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DShadow) -0:48 'g_tTex2di4' ( uniform itexture2D) +0:48 'g_tTex2di4' ( uniform itexture2DShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -270,7 +270,7 @@ gl_FragCoord origin is upper left 0:49 'r25' ( temp float) 0:49 textureLodOffset ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DShadow) -0:49 'g_tTex2du4' ( uniform utexture2D) +0:49 'g_tTex2du4' ( uniform utexture2DShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -310,25 +310,25 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 1 (const int) 0:? Linker Objects 0:? 'g_sSamp' (layout( binding=0) uniform sampler) -0:? 'g_tTex1df4' (layout( binding=0) uniform texture1D) -0:? 'g_tTex1di4' ( uniform itexture1D) -0:? 'g_tTex1du4' ( uniform utexture1D) -0:? 'g_tTex2df4' ( uniform texture2D) -0:? 'g_tTex2di4' ( uniform itexture2D) -0:? 'g_tTex2du4' ( uniform utexture2D) +0:? 'g_tTex1df4' (layout( binding=0) uniform texture1DShadow) +0:? 'g_tTex1di4' ( uniform itexture1DShadow) +0:? 'g_tTex1du4' ( uniform utexture1DShadow) +0:? 'g_tTex2df4' ( uniform texture2DShadow) +0:? 'g_tTex2di4' ( uniform itexture2DShadow) +0:? 'g_tTex2du4' ( uniform utexture2DShadow) 0:? 'g_tTex3df4' ( uniform texture3D) 0:? 'g_tTex3di4' ( uniform itexture3D) 0:? 'g_tTex3du4' ( uniform utexture3D) @@ -344,19 +344,19 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 174 +// Generated by (magic number): 80003 +// Id's are bound by 168 Capability Shader Capability Sampled1D Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 122 126 + EntryPoint Fragment 4 "main" 116 120 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -367,61 +367,61 @@ gl_FragCoord origin is upper left Name 13 "r01" Name 16 "g_tTex1df4" Name 20 "g_sSamp" - Name 34 "r03" - Name 37 "g_tTex1di4" - Name 46 "r05" - Name 50 "g_tTex1du4" - Name 59 "r21" - Name 62 "g_tTex2df4" - Name 79 "r23" - Name 82 "g_tTex2di4" - Name 93 "r25" - Name 96 "g_tTex2du4" - Name 108 "psout" - Name 119 "flattenTemp" - Name 122 "Color" - Name 126 "Depth" - Name 131 "g_tTex3df4" - Name 134 "g_tTex3di4" - Name 137 "g_tTex3du4" - Name 140 "g_tTexcdf4" - Name 143 "g_tTexcdi4" - Name 146 "g_tTexcdu4" - Name 149 "g_tTex1df4a" - Name 152 "g_tTex1di4a" - Name 155 "g_tTex1du4a" - Name 158 "g_tTex2df4a" - Name 161 "g_tTex2di4a" - Name 164 "g_tTex2du4a" - Name 167 "g_tTexcdf4a" - Name 170 "g_tTexcdi4a" - Name 173 "g_tTexcdu4a" + Name 33 "r03" + Name 36 "g_tTex1di4" + Name 44 "r05" + Name 48 "g_tTex1du4" + Name 56 "r21" + Name 59 "g_tTex2df4" + Name 75 "r23" + Name 78 "g_tTex2di4" + Name 88 "r25" + Name 91 "g_tTex2du4" + Name 102 "psout" + Name 113 "flattenTemp" + Name 116 "@entryPointOutput.Color" + Name 120 "@entryPointOutput.Depth" + Name 125 "g_tTex3df4" + Name 128 "g_tTex3di4" + Name 131 "g_tTex3du4" + Name 134 "g_tTexcdf4" + Name 137 "g_tTexcdi4" + Name 140 "g_tTexcdu4" + Name 143 "g_tTex1df4a" + Name 146 "g_tTex1di4a" + Name 149 "g_tTex1du4a" + Name 152 "g_tTex2df4a" + Name 155 "g_tTex2di4a" + Name 158 "g_tTex2du4a" + Name 161 "g_tTexcdf4a" + Name 164 "g_tTexcdi4a" + Name 167 "g_tTexcdu4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 Decorate 20(g_sSamp) DescriptorSet 0 Decorate 20(g_sSamp) Binding 0 - Decorate 37(g_tTex1di4) DescriptorSet 0 - Decorate 50(g_tTex1du4) DescriptorSet 0 - Decorate 62(g_tTex2df4) DescriptorSet 0 - Decorate 82(g_tTex2di4) DescriptorSet 0 - Decorate 96(g_tTex2du4) DescriptorSet 0 - Decorate 122(Color) Location 0 - Decorate 126(Depth) BuiltIn FragDepth - Decorate 131(g_tTex3df4) DescriptorSet 0 - Decorate 134(g_tTex3di4) DescriptorSet 0 - Decorate 137(g_tTex3du4) DescriptorSet 0 - Decorate 140(g_tTexcdf4) DescriptorSet 0 - Decorate 143(g_tTexcdi4) DescriptorSet 0 - Decorate 146(g_tTexcdu4) DescriptorSet 0 - Decorate 149(g_tTex1df4a) DescriptorSet 0 - Decorate 152(g_tTex1di4a) DescriptorSet 0 - Decorate 155(g_tTex1du4a) DescriptorSet 0 - Decorate 158(g_tTex2df4a) DescriptorSet 0 - Decorate 161(g_tTex2di4a) DescriptorSet 0 - Decorate 164(g_tTex2du4a) DescriptorSet 0 - Decorate 167(g_tTexcdf4a) DescriptorSet 0 - Decorate 170(g_tTexcdi4a) DescriptorSet 0 - Decorate 173(g_tTexcdu4a) DescriptorSet 0 + Decorate 36(g_tTex1di4) DescriptorSet 0 + Decorate 48(g_tTex1du4) DescriptorSet 0 + Decorate 59(g_tTex2df4) DescriptorSet 0 + Decorate 78(g_tTex2di4) DescriptorSet 0 + Decorate 91(g_tTex2du4) DescriptorSet 0 + Decorate 116(@entryPointOutput.Color) Location 0 + Decorate 120(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 125(g_tTex3df4) DescriptorSet 0 + Decorate 128(g_tTex3di4) DescriptorSet 0 + Decorate 131(g_tTex3du4) DescriptorSet 0 + Decorate 134(g_tTexcdf4) DescriptorSet 0 + Decorate 137(g_tTexcdi4) DescriptorSet 0 + Decorate 140(g_tTexcdu4) DescriptorSet 0 + Decorate 143(g_tTex1df4a) DescriptorSet 0 + Decorate 146(g_tTex1di4a) DescriptorSet 0 + Decorate 149(g_tTex1du4a) DescriptorSet 0 + Decorate 152(g_tTex2df4a) DescriptorSet 0 + Decorate 155(g_tTex2di4a) DescriptorSet 0 + Decorate 158(g_tTex2du4a) DescriptorSet 0 + Decorate 161(g_tTexcdf4a) DescriptorSet 0 + Decorate 164(g_tTexcdi4a) DescriptorSet 0 + Decorate 167(g_tTexcdu4a) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -429,181 +429,175 @@ gl_FragCoord origin is upper left 8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float) 9: TypeFunction 8(PS_OUTPUT) 12: TypePointer Function 6(float) - 14: TypeImage 6(float) 1D sampled format:Unknown + 14: TypeImage 6(float) 1D depth sampled format:Unknown 15: TypePointer UniformConstant 14 16(g_tTex1df4): 15(ptr) Variable UniformConstant 18: TypeSampler 19: TypePointer UniformConstant 18 20(g_sSamp): 19(ptr) Variable UniformConstant - 22: TypeImage 6(float) 1D depth sampled format:Unknown - 23: TypeSampledImage 22 - 25: 6(float) Constant 1036831949 - 26: 6(float) Constant 1061158912 - 27: TypeVector 6(float) 2 - 29: 6(float) Constant 0 - 30: TypeInt 32 1 - 31: 30(int) Constant 2 - 35: TypeImage 30(int) 1D sampled format:Unknown - 36: TypePointer UniformConstant 35 - 37(g_tTex1di4): 36(ptr) Variable UniformConstant - 40: TypeImage 30(int) 1D depth sampled format:Unknown - 41: TypeSampledImage 40 - 47: TypeInt 32 0 - 48: TypeImage 47(int) 1D sampled format:Unknown - 49: TypePointer UniformConstant 48 - 50(g_tTex1du4): 49(ptr) Variable UniformConstant - 53: TypeImage 47(int) 1D depth sampled format:Unknown - 54: TypeSampledImage 53 - 60: TypeImage 6(float) 2D sampled format:Unknown - 61: TypePointer UniformConstant 60 - 62(g_tTex2df4): 61(ptr) Variable UniformConstant - 65: TypeImage 6(float) 2D depth sampled format:Unknown - 66: TypeSampledImage 65 - 68: 6(float) Constant 1045220557 - 69: 27(fvec2) ConstantComposite 25 68 - 70: TypeVector 6(float) 3 - 74: TypeVector 30(int) 2 - 75: 30(int) Constant 3 - 76: 74(ivec2) ConstantComposite 31 75 - 80: TypeImage 30(int) 2D sampled format:Unknown - 81: TypePointer UniformConstant 80 - 82(g_tTex2di4): 81(ptr) Variable UniformConstant - 85: TypeImage 30(int) 2D depth sampled format:Unknown - 86: TypeSampledImage 85 - 94: TypeImage 47(int) 2D sampled format:Unknown - 95: TypePointer UniformConstant 94 - 96(g_tTex2du4): 95(ptr) Variable UniformConstant - 99: TypeImage 47(int) 2D depth sampled format:Unknown - 100: TypeSampledImage 99 - 107: TypePointer Function 8(PS_OUTPUT) - 109: 30(int) Constant 0 - 110: 6(float) Constant 1065353216 - 111: 7(fvec4) ConstantComposite 110 110 110 110 - 112: TypePointer Function 7(fvec4) - 114: 30(int) Constant 1 - 121: TypePointer Output 7(fvec4) - 122(Color): 121(ptr) Variable Output - 125: TypePointer Output 6(float) - 126(Depth): 125(ptr) Variable Output - 129: TypeImage 6(float) 3D sampled format:Unknown + 22: TypeSampledImage 14 + 24: 6(float) Constant 1036831949 + 25: 6(float) Constant 1061158912 + 26: TypeVector 6(float) 2 + 28: 6(float) Constant 0 + 29: TypeInt 32 1 + 30: 29(int) Constant 2 + 34: TypeImage 29(int) 1D depth sampled format:Unknown + 35: TypePointer UniformConstant 34 + 36(g_tTex1di4): 35(ptr) Variable UniformConstant + 39: TypeSampledImage 34 + 45: TypeInt 32 0 + 46: TypeImage 45(int) 1D depth sampled format:Unknown + 47: TypePointer UniformConstant 46 + 48(g_tTex1du4): 47(ptr) Variable UniformConstant + 51: TypeSampledImage 46 + 57: TypeImage 6(float) 2D depth sampled format:Unknown + 58: TypePointer UniformConstant 57 + 59(g_tTex2df4): 58(ptr) Variable UniformConstant + 62: TypeSampledImage 57 + 64: 6(float) Constant 1045220557 + 65: 26(fvec2) ConstantComposite 24 64 + 66: TypeVector 6(float) 3 + 70: TypeVector 29(int) 2 + 71: 29(int) Constant 3 + 72: 70(ivec2) ConstantComposite 30 71 + 76: TypeImage 29(int) 2D depth sampled format:Unknown + 77: TypePointer UniformConstant 76 + 78(g_tTex2di4): 77(ptr) Variable UniformConstant + 81: TypeSampledImage 76 + 89: TypeImage 45(int) 2D depth sampled format:Unknown + 90: TypePointer UniformConstant 89 + 91(g_tTex2du4): 90(ptr) Variable UniformConstant + 94: TypeSampledImage 89 + 101: TypePointer Function 8(PS_OUTPUT) + 103: 29(int) Constant 0 + 104: 6(float) Constant 1065353216 + 105: 7(fvec4) ConstantComposite 104 104 104 104 + 106: TypePointer Function 7(fvec4) + 108: 29(int) Constant 1 + 115: TypePointer Output 7(fvec4) +116(@entryPointOutput.Color): 115(ptr) Variable Output + 119: TypePointer Output 6(float) +120(@entryPointOutput.Depth): 119(ptr) Variable Output + 123: TypeImage 6(float) 3D sampled format:Unknown + 124: TypePointer UniformConstant 123 + 125(g_tTex3df4): 124(ptr) Variable UniformConstant + 126: TypeImage 29(int) 3D sampled format:Unknown + 127: TypePointer UniformConstant 126 + 128(g_tTex3di4): 127(ptr) Variable UniformConstant + 129: TypeImage 45(int) 3D sampled format:Unknown 130: TypePointer UniformConstant 129 - 131(g_tTex3df4): 130(ptr) Variable UniformConstant - 132: TypeImage 30(int) 3D sampled format:Unknown + 131(g_tTex3du4): 130(ptr) Variable UniformConstant + 132: TypeImage 6(float) Cube sampled format:Unknown 133: TypePointer UniformConstant 132 - 134(g_tTex3di4): 133(ptr) Variable UniformConstant - 135: TypeImage 47(int) 3D sampled format:Unknown + 134(g_tTexcdf4): 133(ptr) Variable UniformConstant + 135: TypeImage 29(int) Cube sampled format:Unknown 136: TypePointer UniformConstant 135 - 137(g_tTex3du4): 136(ptr) Variable UniformConstant - 138: TypeImage 6(float) Cube sampled format:Unknown + 137(g_tTexcdi4): 136(ptr) Variable UniformConstant + 138: TypeImage 45(int) Cube sampled format:Unknown 139: TypePointer UniformConstant 138 - 140(g_tTexcdf4): 139(ptr) Variable UniformConstant - 141: TypeImage 30(int) Cube sampled format:Unknown + 140(g_tTexcdu4): 139(ptr) Variable UniformConstant + 141: TypeImage 6(float) 1D array sampled format:Unknown 142: TypePointer UniformConstant 141 - 143(g_tTexcdi4): 142(ptr) Variable UniformConstant - 144: TypeImage 47(int) Cube sampled format:Unknown +143(g_tTex1df4a): 142(ptr) Variable UniformConstant + 144: TypeImage 29(int) 1D array sampled format:Unknown 145: TypePointer UniformConstant 144 - 146(g_tTexcdu4): 145(ptr) Variable UniformConstant - 147: TypeImage 6(float) 1D array sampled format:Unknown +146(g_tTex1di4a): 145(ptr) Variable UniformConstant + 147: TypeImage 45(int) 1D array sampled format:Unknown 148: TypePointer UniformConstant 147 -149(g_tTex1df4a): 148(ptr) Variable UniformConstant - 150: TypeImage 30(int) 1D array sampled format:Unknown +149(g_tTex1du4a): 148(ptr) Variable UniformConstant + 150: TypeImage 6(float) 2D array sampled format:Unknown 151: TypePointer UniformConstant 150 -152(g_tTex1di4a): 151(ptr) Variable UniformConstant - 153: TypeImage 47(int) 1D array sampled format:Unknown +152(g_tTex2df4a): 151(ptr) Variable UniformConstant + 153: TypeImage 29(int) 2D array sampled format:Unknown 154: TypePointer UniformConstant 153 -155(g_tTex1du4a): 154(ptr) Variable UniformConstant - 156: TypeImage 6(float) 2D array sampled format:Unknown +155(g_tTex2di4a): 154(ptr) Variable UniformConstant + 156: TypeImage 45(int) 2D array sampled format:Unknown 157: TypePointer UniformConstant 156 -158(g_tTex2df4a): 157(ptr) Variable UniformConstant - 159: TypeImage 30(int) 2D array sampled format:Unknown +158(g_tTex2du4a): 157(ptr) Variable UniformConstant + 159: TypeImage 6(float) Cube array sampled format:Unknown 160: TypePointer UniformConstant 159 -161(g_tTex2di4a): 160(ptr) Variable UniformConstant - 162: TypeImage 47(int) 2D array sampled format:Unknown +161(g_tTexcdf4a): 160(ptr) Variable UniformConstant + 162: TypeImage 29(int) Cube array sampled format:Unknown 163: TypePointer UniformConstant 162 -164(g_tTex2du4a): 163(ptr) Variable UniformConstant - 165: TypeImage 6(float) Cube array sampled format:Unknown +164(g_tTexcdi4a): 163(ptr) Variable UniformConstant + 165: TypeImage 45(int) Cube array sampled format:Unknown 166: TypePointer UniformConstant 165 -167(g_tTexcdf4a): 166(ptr) Variable UniformConstant - 168: TypeImage 30(int) Cube array sampled format:Unknown - 169: TypePointer UniformConstant 168 -170(g_tTexcdi4a): 169(ptr) Variable UniformConstant - 171: TypeImage 47(int) Cube array sampled format:Unknown - 172: TypePointer UniformConstant 171 -173(g_tTexcdu4a): 172(ptr) Variable UniformConstant +167(g_tTexcdu4a): 166(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label -119(flattenTemp): 107(ptr) Variable Function - 120:8(PS_OUTPUT) FunctionCall 10(@main() - Store 119(flattenTemp) 120 - 123: 112(ptr) AccessChain 119(flattenTemp) 109 - 124: 7(fvec4) Load 123 - Store 122(Color) 124 - 127: 12(ptr) AccessChain 119(flattenTemp) 114 - 128: 6(float) Load 127 - Store 126(Depth) 128 +113(flattenTemp): 101(ptr) Variable Function + 114:8(PS_OUTPUT) FunctionCall 10(@main() + Store 113(flattenTemp) 114 + 117: 106(ptr) AccessChain 113(flattenTemp) 103 + 118: 7(fvec4) Load 117 + Store 116(@entryPointOutput.Color) 118 + 121: 12(ptr) AccessChain 113(flattenTemp) 108 + 122: 6(float) Load 121 + Store 120(@entryPointOutput.Depth) 122 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 11: Label 13(r01): 12(ptr) Variable Function - 34(r03): 12(ptr) Variable Function - 46(r05): 12(ptr) Variable Function - 59(r21): 12(ptr) Variable Function - 79(r23): 12(ptr) Variable Function - 93(r25): 12(ptr) Variable Function - 108(psout): 107(ptr) Variable Function + 33(r03): 12(ptr) Variable Function + 44(r05): 12(ptr) Variable Function + 56(r21): 12(ptr) Variable Function + 75(r23): 12(ptr) Variable Function + 88(r25): 12(ptr) Variable Function + 102(psout): 101(ptr) Variable Function 17: 14 Load 16(g_tTex1df4) 21: 18 Load 20(g_sSamp) - 24: 23 SampledImage 17 21 - 28: 27(fvec2) CompositeConstruct 25 26 - 32: 6(float) CompositeExtract 28 1 - 33: 6(float) ImageSampleDrefExplicitLod 24 28 32 Lod ConstOffset 29 31 - Store 13(r01) 33 - 38: 35 Load 37(g_tTex1di4) - 39: 18 Load 20(g_sSamp) - 42: 41 SampledImage 38 39 - 43: 27(fvec2) CompositeConstruct 25 26 - 44: 6(float) CompositeExtract 43 1 - 45: 6(float) ImageSampleDrefExplicitLod 42 43 44 Lod ConstOffset 29 31 - Store 34(r03) 45 - 51: 48 Load 50(g_tTex1du4) - 52: 18 Load 20(g_sSamp) - 55: 54 SampledImage 51 52 - 56: 27(fvec2) CompositeConstruct 25 26 - 57: 6(float) CompositeExtract 56 1 - 58: 6(float) ImageSampleDrefExplicitLod 55 56 57 Lod ConstOffset 29 31 - Store 46(r05) 58 - 63: 60 Load 62(g_tTex2df4) - 64: 18 Load 20(g_sSamp) - 67: 66 SampledImage 63 64 - 71: 6(float) CompositeExtract 69 0 - 72: 6(float) CompositeExtract 69 1 - 73: 70(fvec3) CompositeConstruct 71 72 26 - 77: 6(float) CompositeExtract 73 2 - 78: 6(float) ImageSampleDrefExplicitLod 67 73 77 Lod ConstOffset 29 76 - Store 59(r21) 78 - 83: 80 Load 82(g_tTex2di4) - 84: 18 Load 20(g_sSamp) - 87: 86 SampledImage 83 84 - 88: 6(float) CompositeExtract 69 0 - 89: 6(float) CompositeExtract 69 1 - 90: 70(fvec3) CompositeConstruct 88 89 26 - 91: 6(float) CompositeExtract 90 2 - 92: 6(float) ImageSampleDrefExplicitLod 87 90 91 Lod ConstOffset 29 76 - Store 79(r23) 92 - 97: 94 Load 96(g_tTex2du4) - 98: 18 Load 20(g_sSamp) - 101: 100 SampledImage 97 98 - 102: 6(float) CompositeExtract 69 0 - 103: 6(float) CompositeExtract 69 1 - 104: 70(fvec3) CompositeConstruct 102 103 26 - 105: 6(float) CompositeExtract 104 2 - 106: 6(float) ImageSampleDrefExplicitLod 101 104 105 Lod ConstOffset 29 76 - Store 93(r25) 106 - 113: 112(ptr) AccessChain 108(psout) 109 - Store 113 111 - 115: 12(ptr) AccessChain 108(psout) 114 - Store 115 110 - 116:8(PS_OUTPUT) Load 108(psout) - ReturnValue 116 + 23: 22 SampledImage 17 21 + 27: 26(fvec2) CompositeConstruct 24 25 + 31: 6(float) CompositeExtract 27 1 + 32: 6(float) ImageSampleDrefExplicitLod 23 27 31 Lod ConstOffset 28 30 + Store 13(r01) 32 + 37: 34 Load 36(g_tTex1di4) + 38: 18 Load 20(g_sSamp) + 40: 39 SampledImage 37 38 + 41: 26(fvec2) CompositeConstruct 24 25 + 42: 6(float) CompositeExtract 41 1 + 43: 6(float) ImageSampleDrefExplicitLod 40 41 42 Lod ConstOffset 28 30 + Store 33(r03) 43 + 49: 46 Load 48(g_tTex1du4) + 50: 18 Load 20(g_sSamp) + 52: 51 SampledImage 49 50 + 53: 26(fvec2) CompositeConstruct 24 25 + 54: 6(float) CompositeExtract 53 1 + 55: 6(float) ImageSampleDrefExplicitLod 52 53 54 Lod ConstOffset 28 30 + Store 44(r05) 55 + 60: 57 Load 59(g_tTex2df4) + 61: 18 Load 20(g_sSamp) + 63: 62 SampledImage 60 61 + 67: 6(float) CompositeExtract 65 0 + 68: 6(float) CompositeExtract 65 1 + 69: 66(fvec3) CompositeConstruct 67 68 25 + 73: 6(float) CompositeExtract 69 2 + 74: 6(float) ImageSampleDrefExplicitLod 63 69 73 Lod ConstOffset 28 72 + Store 56(r21) 74 + 79: 76 Load 78(g_tTex2di4) + 80: 18 Load 20(g_sSamp) + 82: 81 SampledImage 79 80 + 83: 6(float) CompositeExtract 65 0 + 84: 6(float) CompositeExtract 65 1 + 85: 66(fvec3) CompositeConstruct 83 84 25 + 86: 6(float) CompositeExtract 85 2 + 87: 6(float) ImageSampleDrefExplicitLod 82 85 86 Lod ConstOffset 28 72 + Store 75(r23) 87 + 92: 89 Load 91(g_tTex2du4) + 93: 18 Load 20(g_sSamp) + 95: 94 SampledImage 92 93 + 96: 6(float) CompositeExtract 65 0 + 97: 6(float) CompositeExtract 65 1 + 98: 66(fvec3) CompositeConstruct 96 97 25 + 99: 6(float) CompositeExtract 98 2 + 100: 6(float) ImageSampleDrefExplicitLod 95 98 99 Lod ConstOffset 28 72 + Store 88(r25) 100 + 107: 106(ptr) AccessChain 102(psout) 103 + Store 107 105 + 109: 12(ptr) AccessChain 102(psout) 108 + Store 109 104 + 110:8(PS_OUTPUT) Load 102(psout) + ReturnValue 110 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out index eda17f2..62fb50a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out @@ -10,7 +10,7 @@ gl_FragCoord origin is upper left 0:42 'r11' ( temp float) 0:42 textureLodOffset ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DArrayShadow) -0:42 'g_tTex1df4a' ( uniform texture1DArray) +0:42 'g_tTex1df4a' ( uniform texture1DArrayShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -27,7 +27,7 @@ gl_FragCoord origin is upper left 0:43 'r13' ( temp float) 0:43 textureLodOffset ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DArrayShadow) -0:43 'g_tTex1di4a' ( uniform itexture1DArray) +0:43 'g_tTex1di4a' ( uniform itexture1DArrayShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -44,7 +44,7 @@ gl_FragCoord origin is upper left 0:44 'r15' ( temp float) 0:44 textureLodOffset ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DArrayShadow) -0:44 'g_tTex1du4a' ( uniform utexture1DArray) +0:44 'g_tTex1du4a' ( uniform utexture1DArrayShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -61,7 +61,7 @@ gl_FragCoord origin is upper left 0:47 'r31' ( temp float) 0:47 textureLodOffset ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DArrayShadow) -0:47 'g_tTex2df4a' ( uniform texture2DArray) +0:47 'g_tTex2df4a' ( uniform texture2DArrayShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -80,7 +80,7 @@ gl_FragCoord origin is upper left 0:48 'r33' ( temp float) 0:48 textureLodOffset ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DArrayShadow) -0:48 'g_tTex2di4a' ( uniform itexture2DArray) +0:48 'g_tTex2di4a' ( uniform itexture2DArrayShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -99,7 +99,7 @@ gl_FragCoord origin is upper left 0:49 'r35' ( temp float) 0:49 textureLodOffset ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DArrayShadow) -0:49 'g_tTex2du4a' ( uniform utexture2DArray) +0:49 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -140,13 +140,13 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: @@ -165,17 +165,17 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'g_tTex1df4a' ( uniform texture1DArray) -0:? 'g_tTex1di4a' ( uniform itexture1DArray) -0:? 'g_tTex1du4a' ( uniform utexture1DArray) -0:? 'g_tTex2df4a' ( uniform texture2DArray) -0:? 'g_tTex2di4a' ( uniform itexture2DArray) -0:? 'g_tTex2du4a' ( uniform utexture2DArray) +0:? 'g_tTex1df4a' ( uniform texture1DArrayShadow) +0:? 'g_tTex1di4a' ( uniform itexture1DArrayShadow) +0:? 'g_tTex1du4a' ( uniform utexture1DArrayShadow) +0:? 'g_tTex2df4a' ( uniform texture2DArrayShadow) +0:? 'g_tTex2di4a' ( uniform itexture2DArrayShadow) +0:? 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -192,7 +192,7 @@ gl_FragCoord origin is upper left 0:42 'r11' ( temp float) 0:42 textureLodOffset ( temp float) 0:42 Construct combined texture-sampler ( temp sampler1DArrayShadow) -0:42 'g_tTex1df4a' ( uniform texture1DArray) +0:42 'g_tTex1df4a' ( uniform texture1DArrayShadow) 0:42 'g_sSamp' (layout( binding=0) uniform sampler) 0:42 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -209,7 +209,7 @@ gl_FragCoord origin is upper left 0:43 'r13' ( temp float) 0:43 textureLodOffset ( temp float) 0:43 Construct combined texture-sampler ( temp isampler1DArrayShadow) -0:43 'g_tTex1di4a' ( uniform itexture1DArray) +0:43 'g_tTex1di4a' ( uniform itexture1DArrayShadow) 0:43 'g_sSamp' (layout( binding=0) uniform sampler) 0:43 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -226,7 +226,7 @@ gl_FragCoord origin is upper left 0:44 'r15' ( temp float) 0:44 textureLodOffset ( temp float) 0:44 Construct combined texture-sampler ( temp usampler1DArrayShadow) -0:44 'g_tTex1du4a' ( uniform utexture1DArray) +0:44 'g_tTex1du4a' ( uniform utexture1DArrayShadow) 0:44 'g_sSamp' (layout( binding=0) uniform sampler) 0:44 Construct vec3 ( temp 3-component vector of float) 0:? Constant: @@ -243,7 +243,7 @@ gl_FragCoord origin is upper left 0:47 'r31' ( temp float) 0:47 textureLodOffset ( temp float) 0:47 Construct combined texture-sampler ( temp sampler2DArrayShadow) -0:47 'g_tTex2df4a' ( uniform texture2DArray) +0:47 'g_tTex2df4a' ( uniform texture2DArrayShadow) 0:47 'g_sSamp' (layout( binding=0) uniform sampler) 0:47 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -262,7 +262,7 @@ gl_FragCoord origin is upper left 0:48 'r33' ( temp float) 0:48 textureLodOffset ( temp float) 0:48 Construct combined texture-sampler ( temp isampler2DArrayShadow) -0:48 'g_tTex2di4a' ( uniform itexture2DArray) +0:48 'g_tTex2di4a' ( uniform itexture2DArrayShadow) 0:48 'g_sSamp' (layout( binding=0) uniform sampler) 0:48 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -281,7 +281,7 @@ gl_FragCoord origin is upper left 0:49 'r35' ( temp float) 0:49 textureLodOffset ( temp float) 0:49 Construct combined texture-sampler ( temp usampler2DArrayShadow) -0:49 'g_tTex2du4a' ( uniform utexture2DArray) +0:49 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:49 'g_sSamp' (layout( binding=0) uniform sampler) 0:49 Construct vec4 ( temp 4-component vector of float) 0:? Constant: @@ -322,13 +322,13 @@ gl_FragCoord origin is upper left 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:38 Color: direct index for structure ( temp 4-component vector of float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: 0:38 0 (const int) 0:38 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:38 Depth: direct index for structure ( temp float) 0:38 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:38 Constant: @@ -347,28 +347,28 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'g_tTex1df4a' ( uniform texture1DArray) -0:? 'g_tTex1di4a' ( uniform itexture1DArray) -0:? 'g_tTex1du4a' ( uniform utexture1DArray) -0:? 'g_tTex2df4a' ( uniform texture2DArray) -0:? 'g_tTex2di4a' ( uniform itexture2DArray) -0:? 'g_tTex2du4a' ( uniform utexture2DArray) +0:? 'g_tTex1df4a' ( uniform texture1DArrayShadow) +0:? 'g_tTex1di4a' ( uniform itexture1DArrayShadow) +0:? 'g_tTex1du4a' ( uniform utexture1DArrayShadow) +0:? 'g_tTex2df4a' ( uniform texture2DArrayShadow) +0:? 'g_tTex2di4a' ( uniform itexture2DArrayShadow) +0:? 'g_tTex2du4a' ( uniform utexture2DArrayShadow) 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 185 +// Generated by (magic number): 80003 +// Id's are bound by 179 Capability Shader Capability Sampled1D Capability SampledCubeArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 133 137 + EntryPoint Fragment 4 "main" 127 131 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -379,61 +379,61 @@ gl_FragCoord origin is upper left Name 13 "r11" Name 16 "g_tTex1df4a" Name 20 "g_sSamp" - Name 39 "r13" - Name 42 "g_tTex1di4a" - Name 53 "r15" - Name 57 "g_tTex1du4a" - Name 68 "r31" - Name 71 "g_tTex2df4a" - Name 88 "r33" - Name 91 "g_tTex2di4a" - Name 103 "r35" - Name 106 "g_tTex2du4a" - Name 119 "psout" - Name 130 "flattenTemp" - Name 133 "Color" - Name 137 "Depth" - Name 142 "g_tTex1df4" - Name 145 "g_tTex1di4" - Name 148 "g_tTex1du4" - Name 151 "g_tTex2df4" - Name 154 "g_tTex2di4" - Name 157 "g_tTex2du4" - Name 160 "g_tTex3df4" - Name 163 "g_tTex3di4" - Name 166 "g_tTex3du4" - Name 169 "g_tTexcdf4" - Name 172 "g_tTexcdi4" - Name 175 "g_tTexcdu4" - Name 178 "g_tTexcdf4a" - Name 181 "g_tTexcdi4a" - Name 184 "g_tTexcdu4a" + Name 38 "r13" + Name 41 "g_tTex1di4a" + Name 51 "r15" + Name 55 "g_tTex1du4a" + Name 65 "r31" + Name 68 "g_tTex2df4a" + Name 84 "r33" + Name 87 "g_tTex2di4a" + Name 98 "r35" + Name 101 "g_tTex2du4a" + Name 113 "psout" + Name 124 "flattenTemp" + Name 127 "@entryPointOutput.Color" + Name 131 "@entryPointOutput.Depth" + Name 136 "g_tTex1df4" + Name 139 "g_tTex1di4" + Name 142 "g_tTex1du4" + Name 145 "g_tTex2df4" + Name 148 "g_tTex2di4" + Name 151 "g_tTex2du4" + Name 154 "g_tTex3df4" + Name 157 "g_tTex3di4" + Name 160 "g_tTex3du4" + Name 163 "g_tTexcdf4" + Name 166 "g_tTexcdi4" + Name 169 "g_tTexcdu4" + Name 172 "g_tTexcdf4a" + Name 175 "g_tTexcdi4a" + Name 178 "g_tTexcdu4a" Decorate 16(g_tTex1df4a) DescriptorSet 0 Decorate 20(g_sSamp) DescriptorSet 0 Decorate 20(g_sSamp) Binding 0 - Decorate 42(g_tTex1di4a) DescriptorSet 0 - Decorate 57(g_tTex1du4a) DescriptorSet 0 - Decorate 71(g_tTex2df4a) DescriptorSet 0 - Decorate 91(g_tTex2di4a) DescriptorSet 0 - Decorate 106(g_tTex2du4a) DescriptorSet 0 - Decorate 133(Color) Location 0 - Decorate 137(Depth) BuiltIn FragDepth - Decorate 142(g_tTex1df4) DescriptorSet 0 - Decorate 142(g_tTex1df4) Binding 0 - Decorate 145(g_tTex1di4) DescriptorSet 0 - Decorate 148(g_tTex1du4) DescriptorSet 0 - Decorate 151(g_tTex2df4) DescriptorSet 0 - Decorate 154(g_tTex2di4) DescriptorSet 0 - Decorate 157(g_tTex2du4) DescriptorSet 0 - Decorate 160(g_tTex3df4) DescriptorSet 0 - Decorate 163(g_tTex3di4) DescriptorSet 0 - Decorate 166(g_tTex3du4) DescriptorSet 0 - Decorate 169(g_tTexcdf4) DescriptorSet 0 - Decorate 172(g_tTexcdi4) DescriptorSet 0 - Decorate 175(g_tTexcdu4) DescriptorSet 0 - Decorate 178(g_tTexcdf4a) DescriptorSet 0 - Decorate 181(g_tTexcdi4a) DescriptorSet 0 - Decorate 184(g_tTexcdu4a) DescriptorSet 0 + Decorate 41(g_tTex1di4a) DescriptorSet 0 + Decorate 55(g_tTex1du4a) DescriptorSet 0 + Decorate 68(g_tTex2df4a) DescriptorSet 0 + Decorate 87(g_tTex2di4a) DescriptorSet 0 + Decorate 101(g_tTex2du4a) DescriptorSet 0 + Decorate 127(@entryPointOutput.Color) Location 0 + Decorate 131(@entryPointOutput.Depth) BuiltIn FragDepth + Decorate 136(g_tTex1df4) DescriptorSet 0 + Decorate 136(g_tTex1df4) Binding 0 + Decorate 139(g_tTex1di4) DescriptorSet 0 + Decorate 142(g_tTex1du4) DescriptorSet 0 + Decorate 145(g_tTex2df4) DescriptorSet 0 + Decorate 148(g_tTex2di4) DescriptorSet 0 + Decorate 151(g_tTex2du4) DescriptorSet 0 + Decorate 154(g_tTex3df4) DescriptorSet 0 + Decorate 157(g_tTex3di4) DescriptorSet 0 + Decorate 160(g_tTex3du4) DescriptorSet 0 + Decorate 163(g_tTexcdf4) DescriptorSet 0 + Decorate 166(g_tTexcdi4) DescriptorSet 0 + Decorate 169(g_tTexcdu4) DescriptorSet 0 + Decorate 172(g_tTexcdf4a) DescriptorSet 0 + Decorate 175(g_tTexcdi4a) DescriptorSet 0 + Decorate 178(g_tTexcdu4a) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -441,192 +441,186 @@ gl_FragCoord origin is upper left 8(PS_OUTPUT): TypeStruct 7(fvec4) 6(float) 9: TypeFunction 8(PS_OUTPUT) 12: TypePointer Function 6(float) - 14: TypeImage 6(float) 1D array sampled format:Unknown + 14: TypeImage 6(float) 1D depth array sampled format:Unknown 15: TypePointer UniformConstant 14 16(g_tTex1df4a): 15(ptr) Variable UniformConstant 18: TypeSampler 19: TypePointer UniformConstant 18 20(g_sSamp): 19(ptr) Variable UniformConstant - 22: TypeImage 6(float) 1D depth array sampled format:Unknown - 23: TypeSampledImage 22 - 25: TypeVector 6(float) 2 - 26: 6(float) Constant 1036831949 - 27: 6(float) Constant 1045220557 - 28: 25(fvec2) ConstantComposite 26 27 - 29: 6(float) Constant 1061158912 - 30: TypeVector 6(float) 3 - 34: 6(float) Constant 0 - 35: TypeInt 32 1 - 36: 35(int) Constant 2 - 40: TypeImage 35(int) 1D array sampled format:Unknown - 41: TypePointer UniformConstant 40 - 42(g_tTex1di4a): 41(ptr) Variable UniformConstant - 45: TypeImage 35(int) 1D depth array sampled format:Unknown - 46: TypeSampledImage 45 - 54: TypeInt 32 0 - 55: TypeImage 54(int) 1D array sampled format:Unknown - 56: TypePointer UniformConstant 55 - 57(g_tTex1du4a): 56(ptr) Variable UniformConstant - 60: TypeImage 54(int) 1D depth array sampled format:Unknown - 61: TypeSampledImage 60 - 69: TypeImage 6(float) 2D array sampled format:Unknown - 70: TypePointer UniformConstant 69 - 71(g_tTex2df4a): 70(ptr) Variable UniformConstant - 74: TypeImage 6(float) 2D depth array sampled format:Unknown - 75: TypeSampledImage 74 - 77: 6(float) Constant 1050253722 - 78: 30(fvec3) ConstantComposite 26 27 77 - 83: TypeVector 35(int) 2 - 84: 35(int) Constant 3 - 85: 83(ivec2) ConstantComposite 36 84 - 89: TypeImage 35(int) 2D array sampled format:Unknown - 90: TypePointer UniformConstant 89 - 91(g_tTex2di4a): 90(ptr) Variable UniformConstant - 94: TypeImage 35(int) 2D depth array sampled format:Unknown - 95: TypeSampledImage 94 - 104: TypeImage 54(int) 2D array sampled format:Unknown - 105: TypePointer UniformConstant 104 -106(g_tTex2du4a): 105(ptr) Variable UniformConstant - 109: TypeImage 54(int) 2D depth array sampled format:Unknown - 110: TypeSampledImage 109 - 118: TypePointer Function 8(PS_OUTPUT) - 120: 35(int) Constant 0 - 121: 6(float) Constant 1065353216 - 122: 7(fvec4) ConstantComposite 121 121 121 121 - 123: TypePointer Function 7(fvec4) - 125: 35(int) Constant 1 - 132: TypePointer Output 7(fvec4) - 133(Color): 132(ptr) Variable Output - 136: TypePointer Output 6(float) - 137(Depth): 136(ptr) Variable Output - 140: TypeImage 6(float) 1D sampled format:Unknown + 22: TypeSampledImage 14 + 24: TypeVector 6(float) 2 + 25: 6(float) Constant 1036831949 + 26: 6(float) Constant 1045220557 + 27: 24(fvec2) ConstantComposite 25 26 + 28: 6(float) Constant 1061158912 + 29: TypeVector 6(float) 3 + 33: 6(float) Constant 0 + 34: TypeInt 32 1 + 35: 34(int) Constant 2 + 39: TypeImage 34(int) 1D depth array sampled format:Unknown + 40: TypePointer UniformConstant 39 + 41(g_tTex1di4a): 40(ptr) Variable UniformConstant + 44: TypeSampledImage 39 + 52: TypeInt 32 0 + 53: TypeImage 52(int) 1D depth array sampled format:Unknown + 54: TypePointer UniformConstant 53 + 55(g_tTex1du4a): 54(ptr) Variable UniformConstant + 58: TypeSampledImage 53 + 66: TypeImage 6(float) 2D depth array sampled format:Unknown + 67: TypePointer UniformConstant 66 + 68(g_tTex2df4a): 67(ptr) Variable UniformConstant + 71: TypeSampledImage 66 + 73: 6(float) Constant 1050253722 + 74: 29(fvec3) ConstantComposite 25 26 73 + 79: TypeVector 34(int) 2 + 80: 34(int) Constant 3 + 81: 79(ivec2) ConstantComposite 35 80 + 85: TypeImage 34(int) 2D depth array sampled format:Unknown + 86: TypePointer UniformConstant 85 + 87(g_tTex2di4a): 86(ptr) Variable UniformConstant + 90: TypeSampledImage 85 + 99: TypeImage 52(int) 2D depth array sampled format:Unknown + 100: TypePointer UniformConstant 99 +101(g_tTex2du4a): 100(ptr) Variable UniformConstant + 104: TypeSampledImage 99 + 112: TypePointer Function 8(PS_OUTPUT) + 114: 34(int) Constant 0 + 115: 6(float) Constant 1065353216 + 116: 7(fvec4) ConstantComposite 115 115 115 115 + 117: TypePointer Function 7(fvec4) + 119: 34(int) Constant 1 + 126: TypePointer Output 7(fvec4) +127(@entryPointOutput.Color): 126(ptr) Variable Output + 130: TypePointer Output 6(float) +131(@entryPointOutput.Depth): 130(ptr) Variable Output + 134: TypeImage 6(float) 1D sampled format:Unknown + 135: TypePointer UniformConstant 134 + 136(g_tTex1df4): 135(ptr) Variable UniformConstant + 137: TypeImage 34(int) 1D sampled format:Unknown + 138: TypePointer UniformConstant 137 + 139(g_tTex1di4): 138(ptr) Variable UniformConstant + 140: TypeImage 52(int) 1D sampled format:Unknown 141: TypePointer UniformConstant 140 - 142(g_tTex1df4): 141(ptr) Variable UniformConstant - 143: TypeImage 35(int) 1D sampled format:Unknown + 142(g_tTex1du4): 141(ptr) Variable UniformConstant + 143: TypeImage 6(float) 2D sampled format:Unknown 144: TypePointer UniformConstant 143 - 145(g_tTex1di4): 144(ptr) Variable UniformConstant - 146: TypeImage 54(int) 1D sampled format:Unknown + 145(g_tTex2df4): 144(ptr) Variable UniformConstant + 146: TypeImage 34(int) 2D sampled format:Unknown 147: TypePointer UniformConstant 146 - 148(g_tTex1du4): 147(ptr) Variable UniformConstant - 149: TypeImage 6(float) 2D sampled format:Unknown + 148(g_tTex2di4): 147(ptr) Variable UniformConstant + 149: TypeImage 52(int) 2D sampled format:Unknown 150: TypePointer UniformConstant 149 - 151(g_tTex2df4): 150(ptr) Variable UniformConstant - 152: TypeImage 35(int) 2D sampled format:Unknown + 151(g_tTex2du4): 150(ptr) Variable UniformConstant + 152: TypeImage 6(float) 3D sampled format:Unknown 153: TypePointer UniformConstant 152 - 154(g_tTex2di4): 153(ptr) Variable UniformConstant - 155: TypeImage 54(int) 2D sampled format:Unknown + 154(g_tTex3df4): 153(ptr) Variable UniformConstant + 155: TypeImage 34(int) 3D sampled format:Unknown 156: TypePointer UniformConstant 155 - 157(g_tTex2du4): 156(ptr) Variable UniformConstant - 158: TypeImage 6(float) 3D sampled format:Unknown + 157(g_tTex3di4): 156(ptr) Variable UniformConstant + 158: TypeImage 52(int) 3D sampled format:Unknown 159: TypePointer UniformConstant 158 - 160(g_tTex3df4): 159(ptr) Variable UniformConstant - 161: TypeImage 35(int) 3D sampled format:Unknown + 160(g_tTex3du4): 159(ptr) Variable UniformConstant + 161: TypeImage 6(float) Cube sampled format:Unknown 162: TypePointer UniformConstant 161 - 163(g_tTex3di4): 162(ptr) Variable UniformConstant - 164: TypeImage 54(int) 3D sampled format:Unknown + 163(g_tTexcdf4): 162(ptr) Variable UniformConstant + 164: TypeImage 34(int) Cube sampled format:Unknown 165: TypePointer UniformConstant 164 - 166(g_tTex3du4): 165(ptr) Variable UniformConstant - 167: TypeImage 6(float) Cube sampled format:Unknown + 166(g_tTexcdi4): 165(ptr) Variable UniformConstant + 167: TypeImage 52(int) Cube sampled format:Unknown 168: TypePointer UniformConstant 167 - 169(g_tTexcdf4): 168(ptr) Variable UniformConstant - 170: TypeImage 35(int) Cube sampled format:Unknown + 169(g_tTexcdu4): 168(ptr) Variable UniformConstant + 170: TypeImage 6(float) Cube array sampled format:Unknown 171: TypePointer UniformConstant 170 - 172(g_tTexcdi4): 171(ptr) Variable UniformConstant - 173: TypeImage 54(int) Cube sampled format:Unknown +172(g_tTexcdf4a): 171(ptr) Variable UniformConstant + 173: TypeImage 34(int) Cube array sampled format:Unknown 174: TypePointer UniformConstant 173 - 175(g_tTexcdu4): 174(ptr) Variable UniformConstant - 176: TypeImage 6(float) Cube array sampled format:Unknown +175(g_tTexcdi4a): 174(ptr) Variable UniformConstant + 176: TypeImage 52(int) Cube array sampled format:Unknown 177: TypePointer UniformConstant 176 -178(g_tTexcdf4a): 177(ptr) Variable UniformConstant - 179: TypeImage 35(int) Cube array sampled format:Unknown - 180: TypePointer UniformConstant 179 -181(g_tTexcdi4a): 180(ptr) Variable UniformConstant - 182: TypeImage 54(int) Cube array sampled format:Unknown - 183: TypePointer UniformConstant 182 -184(g_tTexcdu4a): 183(ptr) Variable UniformConstant +178(g_tTexcdu4a): 177(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label -130(flattenTemp): 118(ptr) Variable Function - 131:8(PS_OUTPUT) FunctionCall 10(@main() - Store 130(flattenTemp) 131 - 134: 123(ptr) AccessChain 130(flattenTemp) 120 - 135: 7(fvec4) Load 134 - Store 133(Color) 135 - 138: 12(ptr) AccessChain 130(flattenTemp) 125 - 139: 6(float) Load 138 - Store 137(Depth) 139 +124(flattenTemp): 112(ptr) Variable Function + 125:8(PS_OUTPUT) FunctionCall 10(@main() + Store 124(flattenTemp) 125 + 128: 117(ptr) AccessChain 124(flattenTemp) 114 + 129: 7(fvec4) Load 128 + Store 127(@entryPointOutput.Color) 129 + 132: 12(ptr) AccessChain 124(flattenTemp) 119 + 133: 6(float) Load 132 + Store 131(@entryPointOutput.Depth) 133 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 11: Label 13(r11): 12(ptr) Variable Function - 39(r13): 12(ptr) Variable Function - 53(r15): 12(ptr) Variable Function - 68(r31): 12(ptr) Variable Function - 88(r33): 12(ptr) Variable Function - 103(r35): 12(ptr) Variable Function - 119(psout): 118(ptr) Variable Function + 38(r13): 12(ptr) Variable Function + 51(r15): 12(ptr) Variable Function + 65(r31): 12(ptr) Variable Function + 84(r33): 12(ptr) Variable Function + 98(r35): 12(ptr) Variable Function + 113(psout): 112(ptr) Variable Function 17: 14 Load 16(g_tTex1df4a) 21: 18 Load 20(g_sSamp) - 24: 23 SampledImage 17 21 - 31: 6(float) CompositeExtract 28 0 - 32: 6(float) CompositeExtract 28 1 - 33: 30(fvec3) CompositeConstruct 31 32 29 - 37: 6(float) CompositeExtract 33 2 - 38: 6(float) ImageSampleDrefExplicitLod 24 33 37 Lod ConstOffset 34 36 - Store 13(r11) 38 - 43: 40 Load 42(g_tTex1di4a) - 44: 18 Load 20(g_sSamp) - 47: 46 SampledImage 43 44 - 48: 6(float) CompositeExtract 28 0 - 49: 6(float) CompositeExtract 28 1 - 50: 30(fvec3) CompositeConstruct 48 49 29 - 51: 6(float) CompositeExtract 50 2 - 52: 6(float) ImageSampleDrefExplicitLod 47 50 51 Lod ConstOffset 34 36 - Store 39(r13) 52 - 58: 55 Load 57(g_tTex1du4a) - 59: 18 Load 20(g_sSamp) - 62: 61 SampledImage 58 59 - 63: 6(float) CompositeExtract 28 0 - 64: 6(float) CompositeExtract 28 1 - 65: 30(fvec3) CompositeConstruct 63 64 29 - 66: 6(float) CompositeExtract 65 2 - 67: 6(float) ImageSampleDrefExplicitLod 62 65 66 Lod ConstOffset 34 36 - Store 53(r15) 67 - 72: 69 Load 71(g_tTex2df4a) - 73: 18 Load 20(g_sSamp) - 76: 75 SampledImage 72 73 - 79: 6(float) CompositeExtract 78 0 - 80: 6(float) CompositeExtract 78 1 - 81: 6(float) CompositeExtract 78 2 - 82: 7(fvec4) CompositeConstruct 79 80 81 29 - 86: 6(float) CompositeExtract 82 3 - 87: 6(float) ImageSampleDrefExplicitLod 76 82 86 Lod ConstOffset 34 85 - Store 68(r31) 87 - 92: 89 Load 91(g_tTex2di4a) - 93: 18 Load 20(g_sSamp) - 96: 95 SampledImage 92 93 - 97: 6(float) CompositeExtract 78 0 - 98: 6(float) CompositeExtract 78 1 - 99: 6(float) CompositeExtract 78 2 - 100: 7(fvec4) CompositeConstruct 97 98 99 29 - 101: 6(float) CompositeExtract 100 3 - 102: 6(float) ImageSampleDrefExplicitLod 96 100 101 Lod ConstOffset 34 85 - Store 88(r33) 102 - 107: 104 Load 106(g_tTex2du4a) - 108: 18 Load 20(g_sSamp) - 111: 110 SampledImage 107 108 - 112: 6(float) CompositeExtract 78 0 - 113: 6(float) CompositeExtract 78 1 - 114: 6(float) CompositeExtract 78 2 - 115: 7(fvec4) CompositeConstruct 112 113 114 29 - 116: 6(float) CompositeExtract 115 3 - 117: 6(float) ImageSampleDrefExplicitLod 111 115 116 Lod ConstOffset 34 85 - Store 103(r35) 117 - 124: 123(ptr) AccessChain 119(psout) 120 - Store 124 122 - 126: 12(ptr) AccessChain 119(psout) 125 - Store 126 121 - 127:8(PS_OUTPUT) Load 119(psout) - ReturnValue 127 + 23: 22 SampledImage 17 21 + 30: 6(float) CompositeExtract 27 0 + 31: 6(float) CompositeExtract 27 1 + 32: 29(fvec3) CompositeConstruct 30 31 28 + 36: 6(float) CompositeExtract 32 2 + 37: 6(float) ImageSampleDrefExplicitLod 23 32 36 Lod ConstOffset 33 35 + Store 13(r11) 37 + 42: 39 Load 41(g_tTex1di4a) + 43: 18 Load 20(g_sSamp) + 45: 44 SampledImage 42 43 + 46: 6(float) CompositeExtract 27 0 + 47: 6(float) CompositeExtract 27 1 + 48: 29(fvec3) CompositeConstruct 46 47 28 + 49: 6(float) CompositeExtract 48 2 + 50: 6(float) ImageSampleDrefExplicitLod 45 48 49 Lod ConstOffset 33 35 + Store 38(r13) 50 + 56: 53 Load 55(g_tTex1du4a) + 57: 18 Load 20(g_sSamp) + 59: 58 SampledImage 56 57 + 60: 6(float) CompositeExtract 27 0 + 61: 6(float) CompositeExtract 27 1 + 62: 29(fvec3) CompositeConstruct 60 61 28 + 63: 6(float) CompositeExtract 62 2 + 64: 6(float) ImageSampleDrefExplicitLod 59 62 63 Lod ConstOffset 33 35 + Store 51(r15) 64 + 69: 66 Load 68(g_tTex2df4a) + 70: 18 Load 20(g_sSamp) + 72: 71 SampledImage 69 70 + 75: 6(float) CompositeExtract 74 0 + 76: 6(float) CompositeExtract 74 1 + 77: 6(float) CompositeExtract 74 2 + 78: 7(fvec4) CompositeConstruct 75 76 77 28 + 82: 6(float) CompositeExtract 78 3 + 83: 6(float) ImageSampleDrefExplicitLod 72 78 82 Lod ConstOffset 33 81 + Store 65(r31) 83 + 88: 85 Load 87(g_tTex2di4a) + 89: 18 Load 20(g_sSamp) + 91: 90 SampledImage 88 89 + 92: 6(float) CompositeExtract 74 0 + 93: 6(float) CompositeExtract 74 1 + 94: 6(float) CompositeExtract 74 2 + 95: 7(fvec4) CompositeConstruct 92 93 94 28 + 96: 6(float) CompositeExtract 95 3 + 97: 6(float) ImageSampleDrefExplicitLod 91 95 96 Lod ConstOffset 33 81 + Store 84(r33) 97 + 102: 99 Load 101(g_tTex2du4a) + 103: 18 Load 20(g_sSamp) + 105: 104 SampledImage 102 103 + 106: 6(float) CompositeExtract 74 0 + 107: 6(float) CompositeExtract 74 1 + 108: 6(float) CompositeExtract 74 2 + 109: 7(fvec4) CompositeConstruct 106 107 108 28 + 110: 6(float) CompositeExtract 109 3 + 111: 6(float) ImageSampleDrefExplicitLod 105 109 110 Lod ConstOffset 33 81 + Store 98(r35) 111 + 118: 117(ptr) AccessChain 113(psout) 114 + Store 118 116 + 120: 12(ptr) AccessChain 113(psout) 119 + Store 120 115 + 121:8(PS_OUTPUT) Load 113(psout) + ReturnValue 121 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out index 03449f8..ec78a13 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out @@ -185,13 +185,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -208,8 +208,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCubeArray) 0:? 'g_tTexcdi4' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -401,13 +401,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -424,11 +424,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCubeArray) 0:? 'g_tTexcdi4' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 140 Capability Shader @@ -465,8 +465,8 @@ gl_FragCoord origin is upper left Name 111 "g_tTexcdu4" Name 118 "psout" Name 129 "flattenTemp" - Name 132 "Color" - Name 136 "Depth" + Name 132 "@entryPointOutput.Color" + Name 136 "@entryPointOutput.Depth" Name 139 "g_tTex1df4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 @@ -480,8 +480,8 @@ gl_FragCoord origin is upper left Decorate 89(g_tTexcdf4) DescriptorSet 0 Decorate 102(g_tTexcdi4) DescriptorSet 0 Decorate 111(g_tTexcdu4) DescriptorSet 0 - Decorate 132(Color) Location 0 - Decorate 136(Depth) BuiltIn FragDepth + Decorate 132(@entryPointOutput.Color) Location 0 + Decorate 136(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 139(g_tTex1df4a) DescriptorSet 0 Decorate 139(g_tTex1df4a) Binding 1 2: TypeVoid @@ -557,9 +557,9 @@ gl_FragCoord origin is upper left 123: 31(int) Constant 1 124: TypePointer Function 6(float) 131: TypePointer Output 7(fvec4) - 132(Color): 131(ptr) Variable Output +132(@entryPointOutput.Color): 131(ptr) Variable Output 135: TypePointer Output 6(float) - 136(Depth): 135(ptr) Variable Output +136(@entryPointOutput.Depth): 135(ptr) Variable Output 139(g_tTex1df4a): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -568,10 +568,10 @@ gl_FragCoord origin is upper left Store 129(flattenTemp) 130 133: 12(ptr) AccessChain 129(flattenTemp) 119 134: 7(fvec4) Load 133 - Store 132(Color) 134 + Store 132(@entryPointOutput.Color) 134 137: 124(ptr) AccessChain 129(flattenTemp) 123 138: 6(float) Load 137 - Store 136(Depth) 138 + Store 136(@entryPointOutput.Depth) 138 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out index 42a27bf..1d1ab50 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out @@ -233,13 +233,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -259,8 +259,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -500,13 +500,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -526,11 +526,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 175 Capability Shader @@ -572,8 +572,8 @@ gl_FragCoord origin is upper left Name 146 "g_tTexcdu4" Name 153 "psout" Name 164 "flattenTemp" - Name 167 "Color" - Name 171 "Depth" + Name 167 "@entryPointOutput.Color" + Name 171 "@entryPointOutput.Depth" Name 174 "g_tTex1df4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 @@ -590,8 +590,8 @@ gl_FragCoord origin is upper left Decorate 128(g_tTexcdf4) DescriptorSet 0 Decorate 137(g_tTexcdi4) DescriptorSet 0 Decorate 146(g_tTexcdu4) DescriptorSet 0 - Decorate 167(Color) Location 0 - Decorate 171(Depth) BuiltIn FragDepth + Decorate 167(@entryPointOutput.Color) Location 0 + Decorate 171(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 174(g_tTex1df4a) DescriptorSet 0 Decorate 174(g_tTex1df4a) Binding 1 2: TypeVoid @@ -687,9 +687,9 @@ gl_FragCoord origin is upper left 158: 28(int) Constant 1 159: TypePointer Function 6(float) 166: TypePointer Output 7(fvec4) - 167(Color): 166(ptr) Variable Output +167(@entryPointOutput.Color): 166(ptr) Variable Output 170: TypePointer Output 6(float) - 171(Depth): 170(ptr) Variable Output +171(@entryPointOutput.Depth): 170(ptr) Variable Output 174(g_tTex1df4a): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -698,10 +698,10 @@ gl_FragCoord origin is upper left Store 164(flattenTemp) 165 168: 12(ptr) AccessChain 164(flattenTemp) 154 169: 7(fvec4) Load 168 - Store 167(Color) 169 + Store 167(@entryPointOutput.Color) 169 172: 159(ptr) AccessChain 164(flattenTemp) 158 173: 6(float) Load 172 - Store 171(Depth) 173 + Store 171(@entryPointOutput.Depth) 173 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out index a93cbdf..feffb4a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out @@ -222,7 +222,7 @@ Shader version: 500 0:? Sequence 0:27 Sequence 0:27 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:27 Pos: direct index for structure ( temp 4-component vector of float) 0:27 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) 0:27 Constant: @@ -242,7 +242,7 @@ Shader version: 500 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? '@entryPointOutput' (layout( location=0) out structure{}) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) Linked vertex stage: @@ -471,7 +471,7 @@ Shader version: 500 0:? Sequence 0:27 Sequence 0:27 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:27 Pos: direct index for structure ( temp 4-component vector of float) 0:27 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) 0:27 Constant: @@ -491,17 +491,17 @@ Shader version: 500 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? '@entryPointOutput' (layout( location=0) out structure{}) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 169 +// Generated by (magic number): 80003 +// Id's are bound by 166 Capability Shader Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 162 168 + EntryPoint Vertex 4 "main" 162 Source HLSL 500 Name 4 "main" Name 8 "VS_OUTPUT" @@ -533,10 +533,8 @@ Shader version: 500 Name 143 "txval42" Name 146 "g_tTexcdu4" Name 153 "vsout" - Name 162 "@entryPointOutput_Pos" + Name 162 "@entryPointOutput.Pos" Name 165 "g_tTex1df4a" - Name 166 "VS_OUTPUT" - Name 168 "@entryPointOutput" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 Decorate 20(g_sSamp) DescriptorSet 0 @@ -552,10 +550,9 @@ Shader version: 500 Decorate 128(g_tTexcdf4) DescriptorSet 0 Decorate 137(g_tTexcdi4) DescriptorSet 0 Decorate 146(g_tTexcdu4) DescriptorSet 0 - Decorate 162(@entryPointOutput_Pos) BuiltIn Position + Decorate 162(@entryPointOutput.Pos) BuiltIn Position Decorate 165(g_tTex1df4a) DescriptorSet 0 Decorate 165(g_tTex1df4a) Binding 1 - Decorate 168(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -647,16 +644,13 @@ Shader version: 500 155: 6(float) Constant 0 156: 7(fvec4) ConstantComposite 155 155 155 155 161: TypePointer Output 7(fvec4) -162(@entryPointOutput_Pos): 161(ptr) Variable Output +162(@entryPointOutput.Pos): 161(ptr) Variable Output 165(g_tTex1df4a): 15(ptr) Variable UniformConstant - 166(VS_OUTPUT): TypeStruct - 167: TypePointer Output 166(VS_OUTPUT) -168(@entryPointOutput): 167(ptr) Variable Output 4(main): 2 Function None 3 5: Label 163:8(VS_OUTPUT) FunctionCall 10(@main() 164: 7(fvec4) CompositeExtract 163 0 - Store 162(@entryPointOutput_Pos) 164 + Store 162(@entryPointOutput.Pos) 164 Return FunctionEnd 10(@main():8(VS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out index 4b4e718..5ee5aa1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out @@ -203,13 +203,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -229,8 +229,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -440,13 +440,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -466,11 +466,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 166 Capability Shader @@ -506,8 +506,8 @@ gl_FragCoord origin is upper left Name 125 "g_tTex3du4" Name 137 "psout" Name 146 "flattenTemp" - Name 149 "Color" - Name 153 "Depth" + Name 149 "@entryPointOutput.Color" + Name 153 "@entryPointOutput.Depth" Name 156 "g_tTex1df4a" Name 159 "g_tTexcdf4" Name 162 "g_tTexcdi4" @@ -524,8 +524,8 @@ gl_FragCoord origin is upper left Decorate 99(g_tTex3df4) DescriptorSet 0 Decorate 114(g_tTex3di4) DescriptorSet 0 Decorate 125(g_tTex3du4) DescriptorSet 0 - Decorate 149(Color) Location 0 - Decorate 153(Depth) BuiltIn FragDepth + Decorate 149(@entryPointOutput.Color) Location 0 + Decorate 153(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 156(g_tTex1df4a) DescriptorSet 0 Decorate 156(g_tTex1df4a) Binding 1 Decorate 159(g_tTexcdf4) DescriptorSet 0 @@ -621,9 +621,9 @@ gl_FragCoord origin is upper left 139: 7(fvec4) ConstantComposite 138 138 138 138 141: TypePointer Function 6(float) 148: TypePointer Output 7(fvec4) - 149(Color): 148(ptr) Variable Output +149(@entryPointOutput.Color): 148(ptr) Variable Output 152: TypePointer Output 6(float) - 153(Depth): 152(ptr) Variable Output +153(@entryPointOutput.Depth): 152(ptr) Variable Output 156(g_tTex1df4a): 15(ptr) Variable UniformConstant 157: TypeImage 6(float) Cube sampled format:Unknown 158: TypePointer UniformConstant 157 @@ -641,10 +641,10 @@ gl_FragCoord origin is upper left Store 146(flattenTemp) 147 150: 12(ptr) AccessChain 146(flattenTemp) 67 151: 7(fvec4) Load 150 - Store 149(Color) 151 + Store 149(@entryPointOutput.Color) 151 154: 141(ptr) AccessChain 146(flattenTemp) 28 155: 6(float) Load 154 - Store 153(Depth) 155 + Store 153(@entryPointOutput.Depth) 155 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out index 1f714e6..167c247 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out @@ -140,13 +140,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -163,8 +163,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCubeArray) 0:? 'g_tTexcdi4' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -311,13 +311,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -334,11 +334,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCubeArray) 0:? 'g_tTexcdi4' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 120 Capability Shader @@ -369,8 +369,8 @@ gl_FragCoord origin is upper left Name 84 "g_tTex2du4" Name 91 "psout" Name 100 "flattenTemp" - Name 103 "Color" - Name 107 "Depth" + Name 103 "@entryPointOutput.Color" + Name 107 "@entryPointOutput.Depth" Name 110 "g_tTex1df4a" Name 113 "g_tTexcdf4" Name 116 "g_tTexcdi4" @@ -384,8 +384,8 @@ gl_FragCoord origin is upper left Decorate 59(g_tTex2df4) DescriptorSet 0 Decorate 75(g_tTex2di4) DescriptorSet 0 Decorate 84(g_tTex2du4) DescriptorSet 0 - Decorate 103(Color) Location 0 - Decorate 107(Depth) BuiltIn FragDepth + Decorate 103(@entryPointOutput.Color) Location 0 + Decorate 107(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 110(g_tTex1df4a) DescriptorSet 0 Decorate 110(g_tTex1df4a) Binding 1 Decorate 113(g_tTexcdf4) DescriptorSet 0 @@ -450,9 +450,9 @@ gl_FragCoord origin is upper left 93: 7(fvec4) ConstantComposite 92 92 92 92 95: TypePointer Function 6(float) 102: TypePointer Output 7(fvec4) - 103(Color): 102(ptr) Variable Output +103(@entryPointOutput.Color): 102(ptr) Variable Output 106: TypePointer Output 6(float) - 107(Depth): 106(ptr) Variable Output +107(@entryPointOutput.Depth): 106(ptr) Variable Output 110(g_tTex1df4a): 15(ptr) Variable UniformConstant 111: TypeImage 6(float) Cube array sampled format:Unknown 112: TypePointer UniformConstant 111 @@ -470,10 +470,10 @@ gl_FragCoord origin is upper left Store 100(flattenTemp) 101 104: 12(ptr) AccessChain 100(flattenTemp) 69 105: 7(fvec4) Load 104 - Store 103(Color) 105 + Store 103(@entryPointOutput.Color) 105 108: 95(ptr) AccessChain 100(flattenTemp) 31 109: 6(float) Load 108 - Store 107(Depth) 109 + Store 107(@entryPointOutput.Depth) 109 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out index 0a3e7fd..8caeabf 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out @@ -149,13 +149,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -172,8 +172,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -329,13 +329,13 @@ gl_FragCoord origin is upper left 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:24 Color: direct index for structure ( temp 4-component vector of float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:24 Depth: direct index for structure ( temp float) 0:24 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:24 Constant: @@ -352,11 +352,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4a' ( uniform textureCubeArray) 0:? 'g_tTexcdi4a' ( uniform itextureCubeArray) 0:? 'g_tTexcdu4a' ( uniform utextureCubeArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 147 Capability Shader @@ -393,8 +393,8 @@ gl_FragCoord origin is upper left Name 115 "g_tTexcdu4a" Name 126 "psout" Name 136 "flattenTemp" - Name 139 "Color" - Name 143 "Depth" + Name 139 "@entryPointOutput.Color" + Name 143 "@entryPointOutput.Depth" Name 146 "g_tTex1df4" Decorate 16(g_tTex1df4a) DescriptorSet 0 Decorate 16(g_tTex1df4a) Binding 1 @@ -408,8 +408,8 @@ gl_FragCoord origin is upper left Decorate 95(g_tTexcdf4a) DescriptorSet 0 Decorate 105(g_tTexcdi4a) DescriptorSet 0 Decorate 115(g_tTexcdu4a) DescriptorSet 0 - Decorate 139(Color) Location 0 - Decorate 143(Depth) BuiltIn FragDepth + Decorate 139(@entryPointOutput.Color) Location 0 + Decorate 143(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 146(g_tTex1df4) DescriptorSet 0 Decorate 146(g_tTex1df4) Binding 0 2: TypeVoid @@ -492,9 +492,9 @@ gl_FragCoord origin is upper left 130: 30(int) Constant 1 131: TypePointer Function 6(float) 138: TypePointer Output 7(fvec4) - 139(Color): 138(ptr) Variable Output +139(@entryPointOutput.Color): 138(ptr) Variable Output 142: TypePointer Output 6(float) - 143(Depth): 142(ptr) Variable Output +143(@entryPointOutput.Depth): 142(ptr) Variable Output 146(g_tTex1df4): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -503,10 +503,10 @@ gl_FragCoord origin is upper left Store 136(flattenTemp) 137 140: 12(ptr) AccessChain 136(flattenTemp) 127 141: 7(fvec4) Load 140 - Store 139(Color) 141 + Store 139(@entryPointOutput.Color) 141 144: 131(ptr) AccessChain 136(flattenTemp) 130 145: 6(float) Load 144 - Store 143(Depth) 145 + Store 143(@entryPointOutput.Depth) 145 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out index 6ff36be..1e66d6d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out @@ -179,13 +179,13 @@ gl_FragCoord origin is upper left 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:29 Color: direct index for structure ( temp 4-component vector of float) 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Constant: 0:29 0 (const int) 0:29 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:29 Depth: direct index for structure ( temp float) 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Constant: @@ -206,8 +206,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -393,13 +393,13 @@ gl_FragCoord origin is upper left 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:29 Color: direct index for structure ( temp 4-component vector of float) 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Constant: 0:29 0 (const int) 0:29 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:29 Depth: direct index for structure ( temp float) 0:29 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:29 Constant: @@ -420,11 +420,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 172 Capability Shader @@ -466,8 +466,8 @@ gl_FragCoord origin is upper left Name 142 "g_tTexcdu4" Name 149 "psout" Name 160 "flattenTemp" - Name 163 "Color" - Name 167 "Depth" + Name 163 "@entryPointOutput.Color" + Name 167 "@entryPointOutput.Depth" Name 170 "g_sSamp2d" Name 171 "g_tTex1df4a" Decorate 16(g_tTex1df4) DescriptorSet 0 @@ -485,8 +485,8 @@ gl_FragCoord origin is upper left Decorate 124(g_tTexcdf4) DescriptorSet 0 Decorate 133(g_tTexcdi4) DescriptorSet 0 Decorate 142(g_tTexcdu4) DescriptorSet 0 - Decorate 163(Color) Location 0 - Decorate 167(Depth) BuiltIn FragDepth + Decorate 163(@entryPointOutput.Color) Location 0 + Decorate 167(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 170(g_sSamp2d) DescriptorSet 0 Decorate 171(g_tTex1df4a) DescriptorSet 0 Decorate 171(g_tTex1df4a) Binding 1 @@ -579,9 +579,9 @@ gl_FragCoord origin is upper left 154: 27(int) Constant 1 155: TypePointer Function 6(float) 162: TypePointer Output 7(fvec4) - 163(Color): 162(ptr) Variable Output +163(@entryPointOutput.Color): 162(ptr) Variable Output 166: TypePointer Output 6(float) - 167(Depth): 166(ptr) Variable Output +167(@entryPointOutput.Depth): 166(ptr) Variable Output 170(g_sSamp2d): 19(ptr) Variable UniformConstant 171(g_tTex1df4a): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 @@ -591,10 +591,10 @@ gl_FragCoord origin is upper left Store 160(flattenTemp) 161 164: 12(ptr) AccessChain 160(flattenTemp) 150 165: 7(fvec4) Load 164 - Store 163(Color) 165 + Store 163(@entryPointOutput.Color) 165 168: 155(ptr) AccessChain 160(flattenTemp) 154 169: 6(float) Load 168 - Store 167(Depth) 169 + Store 167(@entryPointOutput.Depth) 169 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out index 5b2f950..c202784 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out @@ -168,7 +168,7 @@ Shader version: 500 0:? Sequence 0:27 Sequence 0:27 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:27 Pos: direct index for structure ( temp 4-component vector of float) 0:27 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) 0:27 Constant: @@ -188,7 +188,7 @@ Shader version: 500 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? '@entryPointOutput' (layout( location=0) out structure{}) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) Linked vertex stage: @@ -363,7 +363,7 @@ Shader version: 500 0:? Sequence 0:27 Sequence 0:27 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:27 Pos: direct index for structure ( temp 4-component vector of float) 0:27 Function Call: @main( ( temp structure{ temp 4-component vector of float Pos}) 0:27 Constant: @@ -383,17 +383,17 @@ Shader version: 500 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? '@entryPointOutput' (layout( location=0) out structure{}) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 165 +// Generated by (magic number): 80003 +// Id's are bound by 162 Capability Shader Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 158 164 + EntryPoint Vertex 4 "main" 158 Source HLSL 500 Name 4 "main" Name 8 "VS_OUTPUT" @@ -425,10 +425,8 @@ Shader version: 500 Name 139 "txval42" Name 142 "g_tTexcdu4" Name 149 "vsout" - Name 158 "@entryPointOutput_Pos" + Name 158 "@entryPointOutput.Pos" Name 161 "g_tTex1df4a" - Name 162 "VS_OUTPUT" - Name 164 "@entryPointOutput" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 Decorate 20(g_sSamp) DescriptorSet 0 @@ -444,10 +442,9 @@ Shader version: 500 Decorate 124(g_tTexcdf4) DescriptorSet 0 Decorate 133(g_tTexcdi4) DescriptorSet 0 Decorate 142(g_tTexcdu4) DescriptorSet 0 - Decorate 158(@entryPointOutput_Pos) BuiltIn Position + Decorate 158(@entryPointOutput.Pos) BuiltIn Position Decorate 161(g_tTex1df4a) DescriptorSet 0 Decorate 161(g_tTex1df4a) Binding 1 - Decorate 164(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -535,16 +532,13 @@ Shader version: 500 151: 6(float) Constant 0 152: 7(fvec4) ConstantComposite 151 151 151 151 157: TypePointer Output 7(fvec4) -158(@entryPointOutput_Pos): 157(ptr) Variable Output +158(@entryPointOutput.Pos): 157(ptr) Variable Output 161(g_tTex1df4a): 15(ptr) Variable UniformConstant - 162(VS_OUTPUT): TypeStruct - 163: TypePointer Output 162(VS_OUTPUT) -164(@entryPointOutput): 163(ptr) Variable Output 4(main): 2 Function None 3 5: Label 159:8(VS_OUTPUT) FunctionCall 10(@main() 160: 7(fvec4) CompositeExtract 159 0 - Store 158(@entryPointOutput_Pos) 160 + Store 158(@entryPointOutput.Pos) 160 Return FunctionEnd 10(@main():8(VS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out index 7311ae4..dcbe7bc 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out @@ -167,13 +167,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -193,8 +193,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -368,13 +368,13 @@ gl_FragCoord origin is upper left 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:28 Color: direct index for structure ( temp 4-component vector of float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: 0:28 0 (const int) 0:28 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:28 Depth: direct index for structure ( temp float) 0:28 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:28 Constant: @@ -394,11 +394,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTexcdf4' ( uniform textureCube) 0:? 'g_tTexcdi4' ( uniform itextureCube) 0:? 'g_tTexcdu4' ( uniform utextureCube) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 162 Capability Shader @@ -434,8 +434,8 @@ gl_FragCoord origin is upper left Name 121 "g_tTex3du4" Name 133 "psout" Name 142 "flattenTemp" - Name 145 "Color" - Name 149 "Depth" + Name 145 "@entryPointOutput.Color" + Name 149 "@entryPointOutput.Depth" Name 152 "g_tTex1df4a" Name 155 "g_tTexcdf4" Name 158 "g_tTexcdi4" @@ -452,8 +452,8 @@ gl_FragCoord origin is upper left Decorate 97(g_tTex3df4) DescriptorSet 0 Decorate 110(g_tTex3di4) DescriptorSet 0 Decorate 121(g_tTex3du4) DescriptorSet 0 - Decorate 145(Color) Location 0 - Decorate 149(Depth) BuiltIn FragDepth + Decorate 145(@entryPointOutput.Color) Location 0 + Decorate 149(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 152(g_tTex1df4a) DescriptorSet 0 Decorate 152(g_tTex1df4a) Binding 1 Decorate 155(g_tTexcdf4) DescriptorSet 0 @@ -545,9 +545,9 @@ gl_FragCoord origin is upper left 135: 7(fvec4) ConstantComposite 134 134 134 134 137: TypePointer Function 6(float) 144: TypePointer Output 7(fvec4) - 145(Color): 144(ptr) Variable Output +145(@entryPointOutput.Color): 144(ptr) Variable Output 148: TypePointer Output 6(float) - 149(Depth): 148(ptr) Variable Output +149(@entryPointOutput.Depth): 148(ptr) Variable Output 152(g_tTex1df4a): 15(ptr) Variable UniformConstant 153: TypeImage 6(float) Cube sampled format:Unknown 154: TypePointer UniformConstant 153 @@ -565,10 +565,10 @@ gl_FragCoord origin is upper left Store 142(flattenTemp) 143 146: 12(ptr) AccessChain 142(flattenTemp) 65 147: 7(fvec4) Load 146 - Store 145(Color) 147 + Store 145(@entryPointOutput.Color) 147 150: 137(ptr) AccessChain 142(flattenTemp) 27 151: 6(float) Load 150 - Store 149(Depth) 151 + Store 149(@entryPointOutput.Depth) 151 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out index 223bfaf..a7ec28a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out @@ -122,13 +122,13 @@ gl_FragCoord origin is upper left 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:20 Color: direct index for structure ( temp 4-component vector of float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: 0:20 0 (const int) 0:20 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:20 Depth: direct index for structure ( temp float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: @@ -142,8 +142,8 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2df4' ( uniform texture2DArray) 0:? 'g_tTex2di4' ( uniform itexture2DArray) 0:? 'g_tTex2du4' ( uniform utexture2DArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -272,13 +272,13 @@ gl_FragCoord origin is upper left 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Function Call: @main( ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:20 Color: direct index for structure ( temp 4-component vector of float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: 0:20 0 (const int) 0:20 move second child to first child ( temp float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) 0:20 Depth: direct index for structure ( temp float) 0:20 'flattenTemp' ( temp structure{ temp 4-component vector of float Color, temp float Depth}) 0:20 Constant: @@ -292,11 +292,11 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2df4' ( uniform texture2DArray) 0:? 'g_tTex2di4' ( uniform itexture2DArray) 0:? 'g_tTex2du4' ( uniform utexture2DArray) -0:? 'Color' (layout( location=0) out 4-component vector of float) -0:? 'Depth' ( out float FragDepth) +0:? '@entryPointOutput.Depth' ( out float FragDepth) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 119 Capability Shader @@ -326,8 +326,8 @@ gl_FragCoord origin is upper left Name 88 "g_tTex2du4" Name 99 "psout" Name 108 "flattenTemp" - Name 111 "Color" - Name 115 "Depth" + Name 111 "@entryPointOutput.Color" + Name 115 "@entryPointOutput.Depth" Name 118 "g_tTex1df4a" Decorate 16(g_tTex1df4) DescriptorSet 0 Decorate 16(g_tTex1df4) Binding 0 @@ -338,8 +338,8 @@ gl_FragCoord origin is upper left Decorate 64(g_tTex2df4) DescriptorSet 0 Decorate 77(g_tTex2di4) DescriptorSet 0 Decorate 88(g_tTex2du4) DescriptorSet 0 - Decorate 111(Color) Location 0 - Decorate 115(Depth) BuiltIn FragDepth + Decorate 111(@entryPointOutput.Color) Location 0 + Decorate 115(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 118(g_tTex1df4a) DescriptorSet 0 Decorate 118(g_tTex1df4a) Binding 1 2: TypeVoid @@ -409,9 +409,9 @@ gl_FragCoord origin is upper left 101: 7(fvec4) ConstantComposite 100 100 100 100 103: TypePointer Function 6(float) 110: TypePointer Output 7(fvec4) - 111(Color): 110(ptr) Variable Output +111(@entryPointOutput.Color): 110(ptr) Variable Output 114: TypePointer Output 6(float) - 115(Depth): 114(ptr) Variable Output +115(@entryPointOutput.Depth): 114(ptr) Variable Output 118(g_tTex1df4a): 15(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label @@ -420,10 +420,10 @@ gl_FragCoord origin is upper left Store 108(flattenTemp) 109 112: 12(ptr) AccessChain 108(flattenTemp) 30 113: 7(fvec4) Load 112 - Store 111(Color) 113 + Store 111(@entryPointOutput.Color) 113 116: 103(ptr) AccessChain 108(flattenTemp) 44 117: 6(float) Load 116 - Store 115(Depth) 117 + Store 115(@entryPointOutput.Depth) 117 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.scope.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.scope.frag.out index 32eeeef..92f461f 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.scope.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.scope.frag.out @@ -102,7 +102,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 49 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semantic.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semantic.geom.out index e5d67b9..3378d21 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semantic.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semantic.geom.out @@ -5,63 +5,75 @@ max_vertices = 4 input primitive = triangles output primitive = line_strip 0:? Sequence -0:12 Function Definition: @main(u1[3];struct-S-f1-f1-u1-u1-i11; ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Function Parameters: -0:12 'VertexID' ( in 3-element array of uint) -0:12 'OutputStream' ( out structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:13 Function Definition: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void) +0:13 Function Parameters: +0:13 'VertexID' ( in 3-element array of uint) +0:13 'OutputStream' ( out structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:? Sequence -0:14 Branch: Return with expression -0:14 's' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Function Definition: main( ( temp void) -0:12 Function Parameters: +0:15 Sequence +0:15 Sequence +0:15 move second child to first child ( temp float) +0:? 'OutputStream.clip0' ( out float Position) +0:15 clip0: direct index for structure ( temp float) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 0 (const int) +0:? Sequence +0:15 move second child to first child ( temp float) +0:15 direct index ( out float ClipDistance) +0:? 'OutputStream.clip0' ( out 1-element array of float ClipDistance) +0:15 Constant: +0:15 0 (const int) +0:15 clip0: direct index for structure ( temp float) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 1 (const int) +0:? Sequence +0:15 move second child to first child ( temp float) +0:15 direct index ( out float CullDistance) +0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance) +0:15 Constant: +0:15 0 (const int) +0:15 cull0: direct index for structure ( temp float) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 2 (const int) +0:15 move second child to first child ( temp uint) +0:? 'OutputStream.vpai' ( out uint ViewportIndex) +0:15 vpai: direct index for structure ( temp uint) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 3 (const int) +0:15 move second child to first child ( temp uint) +0:? 'OutputStream.rtai' ( out uint Layer) +0:15 rtai: direct index for structure ( temp uint) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 4 (const int) +0:15 move second child to first child ( temp int) +0:? 'OutputStream.ii' (layout( location=0) out int) +0:15 ii: direct index for structure ( temp int) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 5 (const int) +0:15 EmitVertex ( temp void) +0:13 Function Definition: main( ( temp void) +0:13 Function Parameters: 0:? Sequence -0:12 move second child to first child ( temp 3-element array of uint) +0:13 move second child to first child ( temp 3-element array of uint) 0:? 'VertexID' ( temp 3-element array of uint) 0:? 'VertexID' (layout( location=0) in 3-element array of uint) -0:12 Sequence -0:12 move second child to first child ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Function Call: @main(u1[3];struct-S-f1-f1-u1-u1-i11; ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:? 'VertexID' ( temp 3-element array of uint) -0:? 'OutputStream' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 move second child to first child ( temp float) -0:? 'OutputStream_clip0' ( out float ClipDistance) -0:12 clip0: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Constant: -0:12 0 (const int) -0:12 move second child to first child ( temp float) -0:? 'OutputStream_cull0' ( out float CullDistance) -0:12 cull0: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Constant: -0:12 1 (const int) -0:12 move second child to first child ( temp uint) -0:? 'OutputStream_vpai' ( out uint ViewportIndex) -0:12 vpai: direct index for structure ( temp uint) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Constant: -0:12 2 (const int) -0:12 move second child to first child ( temp uint) -0:? 'OutputStream_rtai' ( out uint Layer) -0:12 rtai: direct index for structure ( temp uint) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Constant: -0:12 3 (const int) -0:12 move second child to first child ( temp int) -0:12 ii: direct index for structure ( temp int) -0:12 '@entryPointOutput' (layout( location=0) out structure{ temp int ii}) -0:12 Constant: -0:12 0 (const int) -0:12 ii: direct index for structure ( temp int) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Constant: -0:12 4 (const int) +0:13 Function Call: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void) +0:? 'VertexID' ( temp 3-element array of uint) +0:? 'OutputStream' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{ temp int ii}) 0:? 'VertexID' (layout( location=0) in 3-element array of uint) -0:? 'OutputStream' (layout( location=1) out structure{ temp int ii}) -0:? 'OutputStream_vpai' ( out uint ViewportIndex) +0:? 'OutputStream.clip0' ( out float Position) +0:? 'OutputStream.vpai' ( out uint ViewportIndex) +0:? 'OutputStream.rtai' ( out uint Layer) +0:? 'OutputStream.ii' (layout( location=0) out int) +0:? 'OutputStream.clip0' ( out 1-element array of float ClipDistance) +0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance) Linked geometry stage: @@ -73,67 +85,79 @@ max_vertices = 4 input primitive = triangles output primitive = line_strip 0:? Sequence -0:12 Function Definition: @main(u1[3];struct-S-f1-f1-u1-u1-i11; ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Function Parameters: -0:12 'VertexID' ( in 3-element array of uint) -0:12 'OutputStream' ( out structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:13 Function Definition: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void) +0:13 Function Parameters: +0:13 'VertexID' ( in 3-element array of uint) +0:13 'OutputStream' ( out structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:? Sequence -0:14 Branch: Return with expression -0:14 's' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Function Definition: main( ( temp void) -0:12 Function Parameters: +0:15 Sequence +0:15 Sequence +0:15 move second child to first child ( temp float) +0:? 'OutputStream.clip0' ( out float Position) +0:15 clip0: direct index for structure ( temp float) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 0 (const int) +0:? Sequence +0:15 move second child to first child ( temp float) +0:15 direct index ( out float ClipDistance) +0:? 'OutputStream.clip0' ( out 1-element array of float ClipDistance) +0:15 Constant: +0:15 0 (const int) +0:15 clip0: direct index for structure ( temp float) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 1 (const int) +0:? Sequence +0:15 move second child to first child ( temp float) +0:15 direct index ( out float CullDistance) +0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance) +0:15 Constant: +0:15 0 (const int) +0:15 cull0: direct index for structure ( temp float) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 2 (const int) +0:15 move second child to first child ( temp uint) +0:? 'OutputStream.vpai' ( out uint ViewportIndex) +0:15 vpai: direct index for structure ( temp uint) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 3 (const int) +0:15 move second child to first child ( temp uint) +0:? 'OutputStream.rtai' ( out uint Layer) +0:15 rtai: direct index for structure ( temp uint) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 4 (const int) +0:15 move second child to first child ( temp int) +0:? 'OutputStream.ii' (layout( location=0) out int) +0:15 ii: direct index for structure ( temp int) +0:15 's' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) +0:15 Constant: +0:15 5 (const int) +0:15 EmitVertex ( temp void) +0:13 Function Definition: main( ( temp void) +0:13 Function Parameters: 0:? Sequence -0:12 move second child to first child ( temp 3-element array of uint) +0:13 move second child to first child ( temp 3-element array of uint) 0:? 'VertexID' ( temp 3-element array of uint) 0:? 'VertexID' (layout( location=0) in 3-element array of uint) -0:12 Sequence -0:12 move second child to first child ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Function Call: @main(u1[3];struct-S-f1-f1-u1-u1-i11; ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:? 'VertexID' ( temp 3-element array of uint) -0:? 'OutputStream' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 move second child to first child ( temp float) -0:? 'OutputStream_clip0' ( out float ClipDistance) -0:12 clip0: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Constant: -0:12 0 (const int) -0:12 move second child to first child ( temp float) -0:? 'OutputStream_cull0' ( out float CullDistance) -0:12 cull0: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Constant: -0:12 1 (const int) -0:12 move second child to first child ( temp uint) -0:? 'OutputStream_vpai' ( out uint ViewportIndex) -0:12 vpai: direct index for structure ( temp uint) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Constant: -0:12 2 (const int) -0:12 move second child to first child ( temp uint) -0:? 'OutputStream_rtai' ( out uint Layer) -0:12 rtai: direct index for structure ( temp uint) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Constant: -0:12 3 (const int) -0:12 move second child to first child ( temp int) -0:12 ii: direct index for structure ( temp int) -0:12 '@entryPointOutput' (layout( location=0) out structure{ temp int ii}) -0:12 Constant: -0:12 0 (const int) -0:12 ii: direct index for structure ( temp int) -0:12 'flattenTemp' ( temp structure{ temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) -0:12 Constant: -0:12 4 (const int) +0:13 Function Call: @main(u1[3];struct-S-f1-f1-f1-u1-u1-i11; ( temp void) +0:? 'VertexID' ( temp 3-element array of uint) +0:? 'OutputStream' ( temp structure{ temp float clip0, temp float clip0, temp float cull0, temp uint vpai, temp uint rtai, temp int ii}) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{ temp int ii}) 0:? 'VertexID' (layout( location=0) in 3-element array of uint) -0:? 'OutputStream' (layout( location=1) out structure{ temp int ii}) -0:? 'OutputStream_vpai' ( out uint ViewportIndex) +0:? 'OutputStream.clip0' ( out float Position) +0:? 'OutputStream.vpai' ( out uint ViewportIndex) +0:? 'OutputStream.rtai' ( out uint Layer) +0:? 'OutputStream.ii' (layout( location=0) out int) +0:? 'OutputStream.clip0' ( out 1-element array of float ClipDistance) +0:? 'OutputStream.cull0' ( out 1-element array of float CullDistance) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 66 +// Generated by (magic number): 80003 +// Id's are bound by 65 Capability Geometry Capability ClipDistance @@ -141,7 +165,7 @@ output primitive = line_strip Capability MultiViewport 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 4 "main" 25 35 40 45 50 56 65 + EntryPoint Geometry 4 "main" 20 29 34 40 45 50 57 ExecutionMode 4 Triangles ExecutionMode 4 Invocations 1 ExecutionMode 4 OutputLineStrip @@ -150,37 +174,33 @@ output primitive = line_strip Name 4 "main" Name 12 "S" MemberName 12(S) 0 "clip0" - MemberName 12(S) 1 "cull0" - MemberName 12(S) 2 "vpai" - MemberName 12(S) 3 "rtai" - MemberName 12(S) 4 "ii" - Name 17 "@main(u1[3];struct-S-f1-f1-u1-u1-i11;" + MemberName 12(S) 1 "clip0" + MemberName 12(S) 2 "cull0" + MemberName 12(S) 3 "vpai" + MemberName 12(S) 4 "rtai" + MemberName 12(S) 5 "ii" + Name 17 "@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;" Name 15 "VertexID" Name 16 "OutputStream" - Name 19 "s" - Name 23 "VertexID" - Name 25 "VertexID" - Name 27 "flattenTemp" - Name 28 "OutputStream" - Name 29 "param" - Name 31 "param" - Name 35 "OutputStream_clip0" - Name 40 "OutputStream_cull0" - Name 45 "OutputStream_vpai" - Name 50 "OutputStream_rtai" - Name 54 "S" - MemberName 54(S) 0 "ii" - Name 56 "@entryPointOutput" - Name 63 "S" - MemberName 63(S) 0 "ii" - Name 65 "OutputStream" - Decorate 25(VertexID) Location 0 - Decorate 35(OutputStream_clip0) BuiltIn ClipDistance - Decorate 40(OutputStream_cull0) BuiltIn CullDistance - Decorate 45(OutputStream_vpai) BuiltIn ViewportIndex - Decorate 50(OutputStream_rtai) BuiltIn Layer - Decorate 56(@entryPointOutput) Location 0 - Decorate 65(OutputStream) Location 1 + Name 20 "OutputStream.clip0" + Name 21 "s" + Name 29 "OutputStream.clip0" + Name 34 "OutputStream.cull0" + Name 40 "OutputStream.vpai" + Name 45 "OutputStream.rtai" + Name 50 "OutputStream.ii" + Name 55 "VertexID" + Name 57 "VertexID" + Name 59 "OutputStream" + Name 60 "param" + Name 62 "param" + Decorate 20(OutputStream.clip0) BuiltIn Position + Decorate 29(OutputStream.clip0) BuiltIn ClipDistance + Decorate 34(OutputStream.cull0) BuiltIn CullDistance + Decorate 40(OutputStream.vpai) BuiltIn ViewportIndex + Decorate 45(OutputStream.rtai) BuiltIn Layer + Decorate 50(OutputStream.ii) Location 0 + Decorate 57(VertexID) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -189,70 +209,72 @@ output primitive = line_strip 9: TypePointer Function 8 10: TypeFloat 32 11: TypeInt 32 1 - 12(S): TypeStruct 10(float) 10(float) 6(int) 6(int) 11(int) + 12(S): TypeStruct 10(float) 10(float) 10(float) 6(int) 6(int) 11(int) 13: TypePointer Function 12(S) - 14: TypeFunction 12(S) 9(ptr) 13(ptr) - 24: TypePointer Input 8 - 25(VertexID): 24(ptr) Variable Input - 34: TypePointer Output 10(float) -35(OutputStream_clip0): 34(ptr) Variable Output - 36: 11(int) Constant 0 - 37: TypePointer Function 10(float) -40(OutputStream_cull0): 34(ptr) Variable Output - 41: 11(int) Constant 1 - 44: TypePointer Output 6(int) -45(OutputStream_vpai): 44(ptr) Variable Output - 46: 11(int) Constant 2 - 47: TypePointer Function 6(int) -50(OutputStream_rtai): 44(ptr) Variable Output - 51: 11(int) Constant 3 - 54(S): TypeStruct 11(int) - 55: TypePointer Output 54(S) -56(@entryPointOutput): 55(ptr) Variable Output - 57: 11(int) Constant 4 - 58: TypePointer Function 11(int) - 61: TypePointer Output 11(int) - 63(S): TypeStruct 11(int) - 64: TypePointer Output 63(S) -65(OutputStream): 64(ptr) Variable Output + 14: TypeFunction 2 9(ptr) 13(ptr) + 19: TypePointer Output 10(float) +20(OutputStream.clip0): 19(ptr) Variable Output + 22: 11(int) Constant 0 + 23: TypePointer Function 10(float) + 26: 6(int) Constant 1 + 27: TypeArray 10(float) 26 + 28: TypePointer Output 27 +29(OutputStream.clip0): 28(ptr) Variable Output + 30: 11(int) Constant 1 +34(OutputStream.cull0): 28(ptr) Variable Output + 35: 11(int) Constant 2 + 39: TypePointer Output 6(int) +40(OutputStream.vpai): 39(ptr) Variable Output + 41: 11(int) Constant 3 + 42: TypePointer Function 6(int) +45(OutputStream.rtai): 39(ptr) Variable Output + 46: 11(int) Constant 4 + 49: TypePointer Output 11(int) +50(OutputStream.ii): 49(ptr) Variable Output + 51: 11(int) Constant 5 + 52: TypePointer Function 11(int) + 56: TypePointer Input 8 + 57(VertexID): 56(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 23(VertexID): 9(ptr) Variable Function - 27(flattenTemp): 13(ptr) Variable Function -28(OutputStream): 13(ptr) Variable Function - 29(param): 9(ptr) Variable Function - 31(param): 13(ptr) Variable Function - 26: 8 Load 25(VertexID) - Store 23(VertexID) 26 - 30: 8 Load 23(VertexID) - Store 29(param) 30 - 32: 12(S) FunctionCall 17(@main(u1[3];struct-S-f1-f1-u1-u1-i11;) 29(param) 31(param) - 33: 12(S) Load 31(param) - Store 28(OutputStream) 33 - Store 27(flattenTemp) 32 - 38: 37(ptr) AccessChain 27(flattenTemp) 36 - 39: 10(float) Load 38 - Store 35(OutputStream_clip0) 39 - 42: 37(ptr) AccessChain 27(flattenTemp) 41 - 43: 10(float) Load 42 - Store 40(OutputStream_cull0) 43 - 48: 47(ptr) AccessChain 27(flattenTemp) 46 - 49: 6(int) Load 48 - Store 45(OutputStream_vpai) 49 - 52: 47(ptr) AccessChain 27(flattenTemp) 51 - 53: 6(int) Load 52 - Store 50(OutputStream_rtai) 53 - 59: 58(ptr) AccessChain 27(flattenTemp) 57 - 60: 11(int) Load 59 - 62: 61(ptr) AccessChain 56(@entryPointOutput) 36 - Store 62 60 + 55(VertexID): 9(ptr) Variable Function +59(OutputStream): 13(ptr) Variable Function + 60(param): 9(ptr) Variable Function + 62(param): 13(ptr) Variable Function + 58: 8 Load 57(VertexID) + Store 55(VertexID) 58 + 61: 8 Load 55(VertexID) + Store 60(param) 61 + 63: 2 FunctionCall 17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;) 60(param) 62(param) + 64: 12(S) Load 62(param) + Store 59(OutputStream) 64 Return FunctionEnd -17(@main(u1[3];struct-S-f1-f1-u1-u1-i11;): 12(S) Function None 14 +17(@main(u1[3];struct-S-f1-f1-f1-u1-u1-i11;): 2 Function None 14 15(VertexID): 9(ptr) FunctionParameter 16(OutputStream): 13(ptr) FunctionParameter 18: Label - 19(s): 13(ptr) Variable Function - 20: 12(S) Load 19(s) - ReturnValue 20 + 21(s): 13(ptr) Variable Function + 24: 23(ptr) AccessChain 21(s) 22 + 25: 10(float) Load 24 + Store 20(OutputStream.clip0) 25 + 31: 23(ptr) AccessChain 21(s) 30 + 32: 10(float) Load 31 + 33: 19(ptr) AccessChain 29(OutputStream.clip0) 22 + Store 33 32 + 36: 23(ptr) AccessChain 21(s) 35 + 37: 10(float) Load 36 + 38: 19(ptr) AccessChain 34(OutputStream.cull0) 22 + Store 38 37 + 43: 42(ptr) AccessChain 21(s) 41 + 44: 6(int) Load 43 + Store 40(OutputStream.vpai) 44 + 47: 42(ptr) AccessChain 21(s) 46 + 48: 6(int) Load 47 + Store 45(OutputStream.rtai) 48 + 53: 52(ptr) AccessChain 21(s) 51 + 54: 11(int) Load 53 + Store 50(OutputStream.ii) 54 + EmitVertex + Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semantic.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semantic.vert.out index 3618fee..885c898 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semantic.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semantic.vert.out @@ -1,117 +1,106 @@ hlsl.semantic.vert Shader version: 500 0:? Sequence -0:12 Function Definition: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Function Parameters: -0:12 'ins' ( in structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) +0:10 Function Definition: @main(struct-S-f1-f1-f1-f1-i11; ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Function Parameters: +0:10 'ins' ( in structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) 0:? Sequence -0:14 Branch: Return with expression -0:14 's' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Function Definition: main( ( temp void) -0:12 Function Parameters: +0:12 Branch: Return with expression +0:12 's' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Function Definition: main( ( temp void) +0:10 Function Parameters: 0:? Sequence -0:12 Sequence -0:12 move second child to first child ( temp float) -0:12 clip: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 0 (const int) -0:? 'clip' (layout( location=0) in float) -0:12 move second child to first child ( temp float) -0:12 clip0: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 1 (const int) -0:? 'clip0' (layout( location=1) in float) -0:12 move second child to first child ( temp float) -0:12 clip7: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 2 (const int) -0:? 'clip7' (layout( location=2) in float) -0:12 move second child to first child ( temp float) -0:12 cull: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 3 (const int) -0:? 'cull' (layout( location=3) in float) -0:12 move second child to first child ( temp float) -0:12 cull2: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 4 (const int) -0:? 'cull2' (layout( location=4) in float) -0:12 move second child to first child ( temp float) -0:12 cull5: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 5 (const int) -0:? 'cull5' (layout( location=5) in float) -0:12 move second child to first child ( temp int) -0:12 ii: direct index for structure ( temp int) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 6 (const int) -0:? 'ii' ( in int InstanceIndex) -0:12 Sequence -0:12 move second child to first child ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Function Call: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_clip7' ( out float ClipDistance) -0:12 clip: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 0 (const int) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_clip7' ( out float ClipDistance) -0:12 clip0: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 1 (const int) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_clip7' ( out float ClipDistance) -0:12 clip7: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 2 (const int) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_cull5' ( out float CullDistance) -0:12 cull: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 3 (const int) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_cull5' ( out float CullDistance) -0:12 cull2: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 4 (const int) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_cull5' ( out float CullDistance) -0:12 cull5: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 5 (const int) -0:12 move second child to first child ( temp int) -0:12 ii: direct index for structure ( temp int) -0:12 '@entryPointOutput' (layout( location=0) out structure{ temp int ii}) -0:12 Constant: -0:12 0 (const int) -0:12 ii: direct index for structure ( temp int) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 6 (const int) +0:10 Sequence +0:10 move second child to first child ( temp float) +0:10 clip0: direct index for structure ( temp float) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 0 (const int) +0:? 'ins.clip0' (layout( location=0) in float) +0:10 move second child to first child ( temp float) +0:10 clip1: direct index for structure ( temp float) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 1 (const int) +0:? 'ins.clip1' (layout( location=1) in float) +0:10 move second child to first child ( temp float) +0:10 cull0: direct index for structure ( temp float) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 2 (const int) +0:? 'ins.cull0' (layout( location=0) in float) +0:10 move second child to first child ( temp float) +0:10 cull1: direct index for structure ( temp float) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 3 (const int) +0:? 'ins.cull1' (layout( location=1) in float) +0:10 move second child to first child ( temp int) +0:10 ii: direct index for structure ( temp int) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 4 (const int) +0:? 'ins.ii' ( in int InstanceIndex) +0:10 Sequence +0:10 move second child to first child ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Function Call: @main(struct-S-f1-f1-f1-f1-i11; ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:? Sequence +0:10 move second child to first child ( temp float) +0:10 direct index ( out float ClipDistance) +0:? '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance) +0:10 Constant: +0:10 0 (const int) +0:10 clip0: direct index for structure ( temp float) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 0 (const int) +0:? Sequence +0:10 move second child to first child ( temp float) +0:10 direct index ( out float ClipDistance) +0:? '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance) +0:10 Constant: +0:10 1 (const int) +0:10 clip1: direct index for structure ( temp float) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 1 (const int) +0:? Sequence +0:10 move second child to first child ( temp float) +0:10 direct index ( out float CullDistance) +0:? '@entryPointOutput.cull1' ( out 2-element array of float CullDistance) +0:10 Constant: +0:10 0 (const int) +0:10 cull0: direct index for structure ( temp float) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 2 (const int) +0:? Sequence +0:10 move second child to first child ( temp float) +0:10 direct index ( out float CullDistance) +0:? '@entryPointOutput.cull1' ( out 2-element array of float CullDistance) +0:10 Constant: +0:10 1 (const int) +0:10 cull1: direct index for structure ( temp float) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 3 (const int) +0:10 move second child to first child ( temp int) +0:? '@entryPointOutput.ii' (layout( location=0) out int) +0:10 ii: direct index for structure ( temp int) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 4 (const int) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{ temp int ii}) -0:? 'clip' (layout( location=0) in float) -0:? 'clip0' (layout( location=1) in float) -0:? 'clip7' (layout( location=2) in float) -0:? 'cull' (layout( location=3) in float) -0:? 'cull2' (layout( location=4) in float) -0:? 'cull5' (layout( location=5) in float) -0:? 'ii' ( in int InstanceIndex) +0:? '@entryPointOutput.ii' (layout( location=0) out int) +0:? 'ins.ii' ( in int InstanceIndex) +0:? 'ins.clip0' (layout( location=0) in float) +0:? 'ins.clip1' (layout( location=1) in float) +0:? 'ins.cull0' (layout( location=0) in float) +0:? 'ins.cull1' (layout( location=1) in float) +0:? '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance) +0:? '@entryPointOutput.cull1' ( out 2-element array of float CullDistance) Linked vertex stage: @@ -119,253 +108,223 @@ Linked vertex stage: Shader version: 500 0:? Sequence -0:12 Function Definition: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Function Parameters: -0:12 'ins' ( in structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) +0:10 Function Definition: @main(struct-S-f1-f1-f1-f1-i11; ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Function Parameters: +0:10 'ins' ( in structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) 0:? Sequence -0:14 Branch: Return with expression -0:14 's' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Function Definition: main( ( temp void) -0:12 Function Parameters: +0:12 Branch: Return with expression +0:12 's' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Function Definition: main( ( temp void) +0:10 Function Parameters: 0:? Sequence -0:12 Sequence -0:12 move second child to first child ( temp float) -0:12 clip: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 0 (const int) -0:? 'clip' (layout( location=0) in float) -0:12 move second child to first child ( temp float) -0:12 clip0: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 1 (const int) -0:? 'clip0' (layout( location=1) in float) -0:12 move second child to first child ( temp float) -0:12 clip7: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 2 (const int) -0:? 'clip7' (layout( location=2) in float) -0:12 move second child to first child ( temp float) -0:12 cull: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 3 (const int) -0:? 'cull' (layout( location=3) in float) -0:12 move second child to first child ( temp float) -0:12 cull2: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 4 (const int) -0:? 'cull2' (layout( location=4) in float) -0:12 move second child to first child ( temp float) -0:12 cull5: direct index for structure ( temp float) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 5 (const int) -0:? 'cull5' (layout( location=5) in float) -0:12 move second child to first child ( temp int) -0:12 ii: direct index for structure ( temp int) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 6 (const int) -0:? 'ii' ( in int InstanceIndex) -0:12 Sequence -0:12 move second child to first child ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Function Call: @main(struct-S-f1-f1-f1-f1-f1-f1-i11; ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:? 'ins' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_clip7' ( out float ClipDistance) -0:12 clip: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 0 (const int) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_clip7' ( out float ClipDistance) -0:12 clip0: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 1 (const int) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_clip7' ( out float ClipDistance) -0:12 clip7: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 2 (const int) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_cull5' ( out float CullDistance) -0:12 cull: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 3 (const int) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_cull5' ( out float CullDistance) -0:12 cull2: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 4 (const int) -0:12 move second child to first child ( temp float) -0:? '@entryPointOutput_cull5' ( out float CullDistance) -0:12 cull5: direct index for structure ( temp float) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 5 (const int) -0:12 move second child to first child ( temp int) -0:12 ii: direct index for structure ( temp int) -0:12 '@entryPointOutput' (layout( location=0) out structure{ temp int ii}) -0:12 Constant: -0:12 0 (const int) -0:12 ii: direct index for structure ( temp int) -0:12 'flattenTemp' ( temp structure{ temp float clip, temp float clip0, temp float clip7, temp float cull, temp float cull2, temp float cull5, temp int ii}) -0:12 Constant: -0:12 6 (const int) +0:10 Sequence +0:10 move second child to first child ( temp float) +0:10 clip0: direct index for structure ( temp float) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 0 (const int) +0:? 'ins.clip0' (layout( location=0) in float) +0:10 move second child to first child ( temp float) +0:10 clip1: direct index for structure ( temp float) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 1 (const int) +0:? 'ins.clip1' (layout( location=1) in float) +0:10 move second child to first child ( temp float) +0:10 cull0: direct index for structure ( temp float) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 2 (const int) +0:? 'ins.cull0' (layout( location=0) in float) +0:10 move second child to first child ( temp float) +0:10 cull1: direct index for structure ( temp float) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 3 (const int) +0:? 'ins.cull1' (layout( location=1) in float) +0:10 move second child to first child ( temp int) +0:10 ii: direct index for structure ( temp int) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 4 (const int) +0:? 'ins.ii' ( in int InstanceIndex) +0:10 Sequence +0:10 move second child to first child ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Function Call: @main(struct-S-f1-f1-f1-f1-i11; ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:? 'ins' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:? Sequence +0:10 move second child to first child ( temp float) +0:10 direct index ( out float ClipDistance) +0:? '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance) +0:10 Constant: +0:10 0 (const int) +0:10 clip0: direct index for structure ( temp float) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 0 (const int) +0:? Sequence +0:10 move second child to first child ( temp float) +0:10 direct index ( out float ClipDistance) +0:? '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance) +0:10 Constant: +0:10 1 (const int) +0:10 clip1: direct index for structure ( temp float) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 1 (const int) +0:? Sequence +0:10 move second child to first child ( temp float) +0:10 direct index ( out float CullDistance) +0:? '@entryPointOutput.cull1' ( out 2-element array of float CullDistance) +0:10 Constant: +0:10 0 (const int) +0:10 cull0: direct index for structure ( temp float) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 2 (const int) +0:? Sequence +0:10 move second child to first child ( temp float) +0:10 direct index ( out float CullDistance) +0:? '@entryPointOutput.cull1' ( out 2-element array of float CullDistance) +0:10 Constant: +0:10 1 (const int) +0:10 cull1: direct index for structure ( temp float) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 3 (const int) +0:10 move second child to first child ( temp int) +0:? '@entryPointOutput.ii' (layout( location=0) out int) +0:10 ii: direct index for structure ( temp int) +0:10 'flattenTemp' ( temp structure{ temp float clip0, temp float clip1, temp float cull0, temp float cull1, temp int ii}) +0:10 Constant: +0:10 4 (const int) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{ temp int ii}) -0:? 'clip' (layout( location=0) in float) -0:? 'clip0' (layout( location=1) in float) -0:? 'clip7' (layout( location=2) in float) -0:? 'cull' (layout( location=3) in float) -0:? 'cull2' (layout( location=4) in float) -0:? 'cull5' (layout( location=5) in float) -0:? 'ii' ( in int InstanceIndex) +0:? '@entryPointOutput.ii' (layout( location=0) out int) +0:? 'ins.ii' ( in int InstanceIndex) +0:? 'ins.clip0' (layout( location=0) in float) +0:? 'ins.clip1' (layout( location=1) in float) +0:? 'ins.cull0' (layout( location=0) in float) +0:? 'ins.cull1' (layout( location=1) in float) +0:? '@entryPointOutput.clip1' ( out 2-element array of float ClipDistance) +0:? '@entryPointOutput.cull1' ( out 2-element array of float CullDistance) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 77 +// Generated by (magic number): 80003 +// Id's are bound by 70 Capability Shader Capability ClipDistance Capability CullDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 21 26 30 34 38 42 47 56 63 72 + EntryPoint Vertex 4 "main" 21 26 30 34 39 51 59 67 Source HLSL 500 Name 4 "main" Name 8 "S" - MemberName 8(S) 0 "clip" - MemberName 8(S) 1 "clip0" - MemberName 8(S) 2 "clip7" - MemberName 8(S) 3 "cull" - MemberName 8(S) 4 "cull2" - MemberName 8(S) 5 "cull5" - MemberName 8(S) 6 "ii" - Name 12 "@main(struct-S-f1-f1-f1-f1-f1-f1-i11;" + MemberName 8(S) 0 "clip0" + MemberName 8(S) 1 "clip1" + MemberName 8(S) 2 "cull0" + MemberName 8(S) 3 "cull1" + MemberName 8(S) 4 "ii" + Name 12 "@main(struct-S-f1-f1-f1-f1-i11;" Name 11 "ins" Name 14 "s" Name 18 "ins" - Name 21 "clip" - Name 26 "clip0" - Name 30 "clip7" - Name 34 "cull" - Name 38 "cull2" - Name 42 "cull5" - Name 47 "ii" - Name 51 "flattenTemp" - Name 52 "param" - Name 56 "@entryPointOutput_clip7" - Name 63 "@entryPointOutput_cull5" - Name 70 "S" - MemberName 70(S) 0 "ii" - Name 72 "@entryPointOutput" - Decorate 21(clip) Location 0 - Decorate 26(clip0) Location 1 - Decorate 30(clip7) Location 2 - Decorate 34(cull) Location 3 - Decorate 38(cull2) Location 4 - Decorate 42(cull5) Location 5 - Decorate 47(ii) BuiltIn InstanceIndex - Decorate 56(@entryPointOutput_clip7) BuiltIn ClipDistance - Decorate 63(@entryPointOutput_cull5) BuiltIn CullDistance - Decorate 72(@entryPointOutput) Location 0 + Name 21 "ins.clip0" + Name 26 "ins.clip1" + Name 30 "ins.cull0" + Name 34 "ins.cull1" + Name 39 "ins.ii" + Name 43 "flattenTemp" + Name 44 "param" + Name 51 "@entryPointOutput.clip1" + Name 59 "@entryPointOutput.cull1" + Name 67 "@entryPointOutput.ii" + Decorate 21(ins.clip0) Location 0 + Decorate 26(ins.clip1) Location 1 + Decorate 30(ins.cull0) Location 0 + Decorate 34(ins.cull1) Location 1 + Decorate 39(ins.ii) BuiltIn InstanceIndex + Decorate 51(@entryPointOutput.clip1) BuiltIn ClipDistance + Decorate 59(@entryPointOutput.cull1) BuiltIn CullDistance + Decorate 67(@entryPointOutput.ii) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypeInt 32 1 - 8(S): TypeStruct 6(float) 6(float) 6(float) 6(float) 6(float) 6(float) 7(int) + 8(S): TypeStruct 6(float) 6(float) 6(float) 6(float) 7(int) 9: TypePointer Function 8(S) 10: TypeFunction 8(S) 9(ptr) 19: 7(int) Constant 0 20: TypePointer Input 6(float) - 21(clip): 20(ptr) Variable Input + 21(ins.clip0): 20(ptr) Variable Input 23: TypePointer Function 6(float) 25: 7(int) Constant 1 - 26(clip0): 20(ptr) Variable Input + 26(ins.clip1): 20(ptr) Variable Input 29: 7(int) Constant 2 - 30(clip7): 20(ptr) Variable Input + 30(ins.cull0): 20(ptr) Variable Input 33: 7(int) Constant 3 - 34(cull): 20(ptr) Variable Input + 34(ins.cull1): 20(ptr) Variable Input 37: 7(int) Constant 4 - 38(cull2): 20(ptr) Variable Input - 41: 7(int) Constant 5 - 42(cull5): 20(ptr) Variable Input - 45: 7(int) Constant 6 - 46: TypePointer Input 7(int) - 47(ii): 46(ptr) Variable Input - 49: TypePointer Function 7(int) - 55: TypePointer Output 6(float) -56(@entryPointOutput_clip7): 55(ptr) Variable Output -63(@entryPointOutput_cull5): 55(ptr) Variable Output - 70(S): TypeStruct 7(int) - 71: TypePointer Output 70(S) -72(@entryPointOutput): 71(ptr) Variable Output - 75: TypePointer Output 7(int) + 38: TypePointer Input 7(int) + 39(ins.ii): 38(ptr) Variable Input + 41: TypePointer Function 7(int) + 47: TypeInt 32 0 + 48: 47(int) Constant 2 + 49: TypeArray 6(float) 48 + 50: TypePointer Output 49 +51(@entryPointOutput.clip1): 50(ptr) Variable Output + 54: TypePointer Output 6(float) +59(@entryPointOutput.cull1): 50(ptr) Variable Output + 66: TypePointer Output 7(int) +67(@entryPointOutput.ii): 66(ptr) Variable Output 4(main): 2 Function None 3 5: Label 18(ins): 9(ptr) Variable Function - 51(flattenTemp): 9(ptr) Variable Function - 52(param): 9(ptr) Variable Function - 22: 6(float) Load 21(clip) + 43(flattenTemp): 9(ptr) Variable Function + 44(param): 9(ptr) Variable Function + 22: 6(float) Load 21(ins.clip0) 24: 23(ptr) AccessChain 18(ins) 19 Store 24 22 - 27: 6(float) Load 26(clip0) + 27: 6(float) Load 26(ins.clip1) 28: 23(ptr) AccessChain 18(ins) 25 Store 28 27 - 31: 6(float) Load 30(clip7) + 31: 6(float) Load 30(ins.cull0) 32: 23(ptr) AccessChain 18(ins) 29 Store 32 31 - 35: 6(float) Load 34(cull) + 35: 6(float) Load 34(ins.cull1) 36: 23(ptr) AccessChain 18(ins) 33 Store 36 35 - 39: 6(float) Load 38(cull2) - 40: 23(ptr) AccessChain 18(ins) 37 - Store 40 39 - 43: 6(float) Load 42(cull5) - 44: 23(ptr) AccessChain 18(ins) 41 - Store 44 43 - 48: 7(int) Load 47(ii) - 50: 49(ptr) AccessChain 18(ins) 45 - Store 50 48 - 53: 8(S) Load 18(ins) - Store 52(param) 53 - 54: 8(S) FunctionCall 12(@main(struct-S-f1-f1-f1-f1-f1-f1-i11;) 52(param) - Store 51(flattenTemp) 54 - 57: 23(ptr) AccessChain 51(flattenTemp) 19 - 58: 6(float) Load 57 - Store 56(@entryPointOutput_clip7) 58 - 59: 23(ptr) AccessChain 51(flattenTemp) 25 - 60: 6(float) Load 59 - Store 56(@entryPointOutput_clip7) 60 - 61: 23(ptr) AccessChain 51(flattenTemp) 29 - 62: 6(float) Load 61 - Store 56(@entryPointOutput_clip7) 62 - 64: 23(ptr) AccessChain 51(flattenTemp) 33 - 65: 6(float) Load 64 - Store 63(@entryPointOutput_cull5) 65 - 66: 23(ptr) AccessChain 51(flattenTemp) 37 - 67: 6(float) Load 66 - Store 63(@entryPointOutput_cull5) 67 - 68: 23(ptr) AccessChain 51(flattenTemp) 41 - 69: 6(float) Load 68 - Store 63(@entryPointOutput_cull5) 69 - 73: 49(ptr) AccessChain 51(flattenTemp) 45 - 74: 7(int) Load 73 - 76: 75(ptr) AccessChain 72(@entryPointOutput) 19 - Store 76 74 + 40: 7(int) Load 39(ins.ii) + 42: 41(ptr) AccessChain 18(ins) 37 + Store 42 40 + 45: 8(S) Load 18(ins) + Store 44(param) 45 + 46: 8(S) FunctionCall 12(@main(struct-S-f1-f1-f1-f1-i11;) 44(param) + Store 43(flattenTemp) 46 + 52: 23(ptr) AccessChain 43(flattenTemp) 19 + 53: 6(float) Load 52 + 55: 54(ptr) AccessChain 51(@entryPointOutput.clip1) 19 + Store 55 53 + 56: 23(ptr) AccessChain 43(flattenTemp) 25 + 57: 6(float) Load 56 + 58: 54(ptr) AccessChain 51(@entryPointOutput.clip1) 25 + Store 58 57 + 60: 23(ptr) AccessChain 43(flattenTemp) 29 + 61: 6(float) Load 60 + 62: 54(ptr) AccessChain 59(@entryPointOutput.cull1) 19 + Store 62 61 + 63: 23(ptr) AccessChain 43(flattenTemp) 33 + 64: 6(float) Load 63 + 65: 54(ptr) AccessChain 59(@entryPointOutput.cull1) 25 + Store 65 64 + 68: 41(ptr) AccessChain 43(flattenTemp) 37 + 69: 7(int) Load 68 + Store 67(@entryPointOutput.ii) 69 Return FunctionEnd -12(@main(struct-S-f1-f1-f1-f1-f1-f1-i11;): 8(S) Function None 10 +12(@main(struct-S-f1-f1-f1-f1-i11;): 8(S) Function None 10 11(ins): 9(ptr) FunctionParameter 13: Label 14(s): 9(ptr) Variable Function diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semicolons.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semicolons.frag.out index 2c26daa..1138daf 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semicolons.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.semicolons.frag.out @@ -26,13 +26,13 @@ gl_FragCoord origin is upper left 0:? Sequence 0:13 Sequence 0:13 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:13 color: direct index for structure ( temp 4-component vector of float) 0:13 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:13 Constant: 0:13 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -65,16 +65,16 @@ gl_FragCoord origin is upper left 0:? Sequence 0:13 Sequence 0:13 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) 0:13 color: direct index for structure ( temp 4-component vector of float) 0:13 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) 0:13 Constant: 0:13 0 (const int) 0:? Linker Objects -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 31 Capability Shader @@ -90,8 +90,8 @@ gl_FragCoord origin is upper left MemberName 12(PS_OUTPUT) 0 "color" Name 14 "@main(" Name 17 "ps_output" - Name 28 "color" - Decorate 28(color) Location 0 + Name 28 "@entryPointOutput.color" + Decorate 28(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 10: TypeFloat 32 @@ -105,12 +105,12 @@ gl_FragCoord origin is upper left 21: 11(fvec4) ConstantComposite 20 20 20 20 22: TypePointer Function 11(fvec4) 27: TypePointer Output 11(fvec4) - 28(color): 27(ptr) Variable Output +28(@entryPointOutput.color): 27(ptr) Variable Output 4(main): 2 Function None 3 5: Label 29:12(PS_OUTPUT) FunctionCall 14(@main() 30: 11(fvec4) CompositeExtract 29 0 - Store 28(color) 30 + Store 28(@entryPointOutput.color) 30 Return FunctionEnd 6(MyFunc(): 2 Function None 3 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.shapeConv.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.shapeConv.frag.out index 775549f..afcc1f6 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.shapeConv.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.shapeConv.frag.out @@ -95,21 +95,66 @@ gl_FragCoord origin is upper left 0:22 Construct vec4 ( temp 4-component vector of float) 0:22 'f' ( in float) 0:22 'v' ( temp 4-component vector of float) -0:26 Compare Equal ( temp bool) -0:26 'f1' ( temp 1-component vector of float) -0:26 Construct float ( temp 1-component vector of float) -0:26 'v' ( temp 4-component vector of float) -0:27 Compare Less Than ( temp bool) -0:27 Construct float ( temp 1-component vector of float) -0:27 'v' ( temp 4-component vector of float) -0:27 'f1' ( temp 1-component vector of float) +0:26 Equal ( temp 4-component vector of bool) +0:26 Construct vec4 ( temp 4-component vector of float) +0:26 'f1' ( temp 1-component vector of float) +0:26 'v' ( temp 4-component vector of float) +0:27 Compare Less Than ( temp 4-component vector of bool) +0:27 'v' ( temp 4-component vector of float) +0:27 Construct vec4 ( temp 4-component vector of float) +0:27 'f1' ( temp 1-component vector of float) 0:28 Construct float ( temp float) 0:28 'f1' ( temp 1-component vector of float) 0:29 Construct vec3 ( temp 3-component vector of float) 0:29 Construct float ( temp float) 0:29 'f1' ( temp 1-component vector of float) -0:31 Branch: Return with expression -0:31 'input' ( in 4-component vector of float) +0:36 right-shift ( temp 3-component vector of uint) +0:36 Construct uvec3 ( temp 3-component vector of uint) +0:36 'ui' ( temp uint) +0:36 'ui3' ( temp 3-component vector of uint) +0:37 right-shift ( temp 3-component vector of uint) +0:37 'ui3' ( temp 3-component vector of uint) +0:37 'ui' ( temp uint) +0:39 multiply second child into first child ( temp 4-component vector of float) +0:39 'v' ( temp 4-component vector of float) +0:39 'f1' ( temp 1-component vector of float) +0:40 multiply second child into first child ( temp 1-component vector of float) +0:40 'f1' ( temp 1-component vector of float) +0:40 Construct float ( temp 1-component vector of float) +0:40 'v' ( temp 4-component vector of float) +0:42 Sequence +0:42 move second child to first child ( temp 3-component vector of float) +0:42 'mixed' ( temp 3-component vector of float) +0:42 component-wise multiply ( temp 3-component vector of float) +0:42 'u' ( temp 3-component vector of float) +0:42 Construct vec3 ( temp 3-component vector of float) +0:42 'v' ( temp 4-component vector of float) +0:43 move second child to first child ( temp float) +0:43 'f' ( in float) +0:43 Construct float ( in float) +0:43 'u' ( temp 3-component vector of float) +0:44 move second child to first child ( temp 1-component vector of float) +0:44 'f1' ( temp 1-component vector of float) +0:44 Construct float ( temp 1-component vector of float) +0:44 'u' ( temp 3-component vector of float) +0:45 Sequence +0:45 move second child to first child ( temp float) +0:45 'sf' ( temp float) +0:45 Construct float ( temp float) +0:45 'v' ( temp 4-component vector of float) +0:46 Sequence +0:46 move second child to first child ( temp 1-component vector of float) +0:46 'sf1' ( temp 1-component vector of float) +0:46 Construct float ( temp 1-component vector of float) +0:46 'v' ( temp 4-component vector of float) +0:48 Branch: Return with expression +0:48 component-wise multiply ( temp 4-component vector of float) +0:48 'input' ( in 4-component vector of float) +0:48 Constant: +0:48 3.000000 +0:48 3.000000 +0:48 3.000000 +0:48 3.000000 0:? Linker Objects @@ -213,26 +258,71 @@ gl_FragCoord origin is upper left 0:22 Construct vec4 ( temp 4-component vector of float) 0:22 'f' ( in float) 0:22 'v' ( temp 4-component vector of float) -0:26 Compare Equal ( temp bool) -0:26 'f1' ( temp 1-component vector of float) -0:26 Construct float ( temp 1-component vector of float) -0:26 'v' ( temp 4-component vector of float) -0:27 Compare Less Than ( temp bool) -0:27 Construct float ( temp 1-component vector of float) -0:27 'v' ( temp 4-component vector of float) -0:27 'f1' ( temp 1-component vector of float) +0:26 Equal ( temp 4-component vector of bool) +0:26 Construct vec4 ( temp 4-component vector of float) +0:26 'f1' ( temp 1-component vector of float) +0:26 'v' ( temp 4-component vector of float) +0:27 Compare Less Than ( temp 4-component vector of bool) +0:27 'v' ( temp 4-component vector of float) +0:27 Construct vec4 ( temp 4-component vector of float) +0:27 'f1' ( temp 1-component vector of float) 0:28 Construct float ( temp float) 0:28 'f1' ( temp 1-component vector of float) 0:29 Construct vec3 ( temp 3-component vector of float) 0:29 Construct float ( temp float) 0:29 'f1' ( temp 1-component vector of float) -0:31 Branch: Return with expression -0:31 'input' ( in 4-component vector of float) +0:36 right-shift ( temp 3-component vector of uint) +0:36 Construct uvec3 ( temp 3-component vector of uint) +0:36 'ui' ( temp uint) +0:36 'ui3' ( temp 3-component vector of uint) +0:37 right-shift ( temp 3-component vector of uint) +0:37 'ui3' ( temp 3-component vector of uint) +0:37 'ui' ( temp uint) +0:39 multiply second child into first child ( temp 4-component vector of float) +0:39 'v' ( temp 4-component vector of float) +0:39 'f1' ( temp 1-component vector of float) +0:40 multiply second child into first child ( temp 1-component vector of float) +0:40 'f1' ( temp 1-component vector of float) +0:40 Construct float ( temp 1-component vector of float) +0:40 'v' ( temp 4-component vector of float) +0:42 Sequence +0:42 move second child to first child ( temp 3-component vector of float) +0:42 'mixed' ( temp 3-component vector of float) +0:42 component-wise multiply ( temp 3-component vector of float) +0:42 'u' ( temp 3-component vector of float) +0:42 Construct vec3 ( temp 3-component vector of float) +0:42 'v' ( temp 4-component vector of float) +0:43 move second child to first child ( temp float) +0:43 'f' ( in float) +0:43 Construct float ( in float) +0:43 'u' ( temp 3-component vector of float) +0:44 move second child to first child ( temp 1-component vector of float) +0:44 'f1' ( temp 1-component vector of float) +0:44 Construct float ( temp 1-component vector of float) +0:44 'u' ( temp 3-component vector of float) +0:45 Sequence +0:45 move second child to first child ( temp float) +0:45 'sf' ( temp float) +0:45 Construct float ( temp float) +0:45 'v' ( temp 4-component vector of float) +0:46 Sequence +0:46 move second child to first child ( temp 1-component vector of float) +0:46 'sf1' ( temp 1-component vector of float) +0:46 Construct float ( temp 1-component vector of float) +0:46 'v' ( temp 4-component vector of float) +0:48 Branch: Return with expression +0:48 component-wise multiply ( temp 4-component vector of float) +0:48 'input' ( in 4-component vector of float) +0:48 Constant: +0:48 3.000000 +0:48 3.000000 +0:48 3.000000 +0:48 3.000000 0:? Linker Objects // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 85 +// Generated by (magic number): 80003 +// Id's are bound by 127 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -251,6 +341,11 @@ gl_FragCoord origin is upper left Name 34 "MyVal" Name 37 "foo" Name 70 "f1" + Name 83 "ui" + Name 88 "ui3" + Name 103 "mixed" + Name 115 "sf" + Name 118 "sf1" 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -282,6 +377,11 @@ gl_FragCoord origin is upper left 56: TypeInt 32 0 57: 56(int) Constant 0 62: TypeVector 41(bool) 4 + 82: TypePointer Function 56(int) + 85: TypeVector 56(int) 3 + 87: TypePointer Function 85(ivec3) + 122: 6(float) Constant 1077936128 + 123: 7(fvec4) ConstantComposite 122 122 122 122 4(main): 2 Function None 3 5: Label Return @@ -297,6 +397,11 @@ gl_FragCoord origin is upper left 34(MyVal): 23(ptr) Variable Function 37(foo): 23(ptr) Variable Function 70(f1): 9(ptr) Variable Function + 83(ui): 82(ptr) Variable Function + 88(ui3): 87(ptr) Variable Function + 103(mixed): 23(ptr) Variable Function + 115(sf): 9(ptr) Variable Function + 118(sf1): 9(ptr) Variable Function Store 15(v) 17 Store 15(v) 19 20: 6(float) Load 12(f) @@ -332,16 +437,55 @@ gl_FragCoord origin is upper left 68: 62(bvec4) FOrdNotEqual 66 67 69: 41(bool) Any 68 71: 6(float) Load 70(f1) - 72: 7(fvec4) Load 15(v) - 73: 6(float) CompositeExtract 72 0 - 74: 41(bool) FOrdEqual 71 73 + 72: 7(fvec4) CompositeConstruct 71 71 71 71 + 73: 7(fvec4) Load 15(v) + 74: 62(bvec4) FOrdEqual 72 73 75: 7(fvec4) Load 15(v) - 76: 6(float) CompositeExtract 75 0 - 77: 6(float) Load 70(f1) - 78: 41(bool) FOrdLessThan 76 77 + 76: 6(float) Load 70(f1) + 77: 7(fvec4) CompositeConstruct 76 76 76 76 + 78: 62(bvec4) FOrdLessThan 75 77 79: 6(float) Load 70(f1) 80: 6(float) Load 70(f1) 81: 22(fvec3) CompositeConstruct 80 80 80 - 82: 7(fvec4) Load 11(input) - ReturnValue 82 + 84: 56(int) Load 83(ui) + 86: 85(ivec3) CompositeConstruct 84 84 84 + 89: 85(ivec3) Load 88(ui3) + 90: 85(ivec3) ShiftRightLogical 86 89 + 91: 85(ivec3) Load 88(ui3) + 92: 56(int) Load 83(ui) + 93: 85(ivec3) CompositeConstruct 92 92 92 + 94: 85(ivec3) ShiftRightLogical 91 93 + 95: 6(float) Load 70(f1) + 96: 7(fvec4) Load 15(v) + 97: 7(fvec4) CompositeConstruct 95 95 95 95 + 98: 7(fvec4) FMul 96 97 + Store 15(v) 98 + 99: 7(fvec4) Load 15(v) + 100: 6(float) CompositeExtract 99 0 + 101: 6(float) Load 70(f1) + 102: 6(float) FMul 101 100 + Store 70(f1) 102 + 104: 22(fvec3) Load 24(u) + 105: 7(fvec4) Load 15(v) + 106: 6(float) CompositeExtract 105 0 + 107: 6(float) CompositeExtract 105 1 + 108: 6(float) CompositeExtract 105 2 + 109: 22(fvec3) CompositeConstruct 106 107 108 + 110: 22(fvec3) FMul 104 109 + Store 103(mixed) 110 + 111: 22(fvec3) Load 24(u) + 112: 6(float) CompositeExtract 111 0 + Store 12(f) 112 + 113: 22(fvec3) Load 24(u) + 114: 6(float) CompositeExtract 113 0 + Store 70(f1) 114 + 116: 7(fvec4) Load 15(v) + 117: 6(float) CompositeExtract 116 0 + Store 115(sf) 117 + 119: 7(fvec4) Load 15(v) + 120: 6(float) CompositeExtract 119 0 + Store 118(sf1) 120 + 121: 7(fvec4) Load 11(input) + 124: 7(fvec4) FMul 121 123 + ReturnValue 124 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.shapeConvRet.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.shapeConvRet.frag.out index e9dba22..3a9e644 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.shapeConvRet.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.shapeConvRet.frag.out @@ -68,7 +68,7 @@ gl_FragCoord origin is upper left 0:? 'f' (layout( location=0) in float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 35 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sin.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sin.frag.out index 37baab0..cfbfd9c 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sin.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.sin.frag.out @@ -52,7 +52,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 26 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.staticMemberFunction.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.staticMemberFunction.frag.out index e313cbc..aa14f5f 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.staticMemberFunction.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.staticMemberFunction.frag.out @@ -118,7 +118,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 54 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.string.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.string.frag.out index 1c6c542..31dbc04 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.string.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.string.frag.out @@ -50,7 +50,7 @@ gl_FragCoord origin is upper left 0:? 'f' (layout( location=0) in float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 24 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.stringtoken.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.stringtoken.frag.out index 045b8fe..9a1fa81 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.stringtoken.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.stringtoken.frag.out @@ -22,7 +22,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:16 Sequence 0:16 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:16 Color: direct index for structure ( temp 4-component vector of float) 0:16 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:16 Constant: @@ -30,7 +30,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'TestTexture' ( uniform texture2D) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float TestUF}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -59,7 +59,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:16 Sequence 0:16 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:16 Color: direct index for structure ( temp 4-component vector of float) 0:16 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:16 Constant: @@ -67,10 +67,10 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'TestTexture' ( uniform texture2D) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float TestUF}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 34 Capability Shader @@ -84,12 +84,12 @@ gl_FragCoord origin is upper left MemberName 8(PS_OUTPUT) 0 "Color" Name 10 "@main(" Name 13 "psout" - Name 25 "Color" + Name 25 "@entryPointOutput.Color" Name 30 "TestTexture" Name 31 "$Global" MemberName 31($Global) 0 "TestUF" Name 33 "" - Decorate 25(Color) Location 0 + Decorate 25(@entryPointOutput.Color) Location 0 Decorate 30(TestTexture) DescriptorSet 0 MemberDecorate 31($Global) 0 Offset 0 Decorate 31($Global) Block @@ -108,7 +108,7 @@ gl_FragCoord origin is upper left 18: 7(fvec4) ConstantComposite 16 16 16 17 19: TypePointer Function 7(fvec4) 24: TypePointer Output 7(fvec4) - 25(Color): 24(ptr) Variable Output +25(@entryPointOutput.Color): 24(ptr) Variable Output 28: TypeImage 6(float) 2D sampled format:Unknown 29: TypePointer UniformConstant 28 30(TestTexture): 29(ptr) Variable UniformConstant @@ -119,7 +119,7 @@ gl_FragCoord origin is upper left 5: Label 26:8(PS_OUTPUT) FunctionCall 10(@main() 27: 7(fvec4) CompositeExtract 26 0 - Store 25(Color) 27 + Store 25(@entryPointOutput.Color) 27 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.frag.out index 6798bae..8ca14cc 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.frag.out @@ -43,70 +43,49 @@ gl_FragCoord origin is upper left 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 0 (const int) -0:40 a: direct index for structure ( smooth temp 4-component vector of float) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 0 (const int) +0:? 's.a' (layout( location=1) smooth in 4-component vector of float) 0:40 move second child to first child ( temp bool) 0:40 b: direct index for structure ( temp bool) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 1 (const int) -0:40 b: direct index for structure ( flat temp bool) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 1 (const int) +0:? 's.b' (layout( location=2) flat in bool) 0:40 move second child to first child ( temp 1-component vector of float) 0:40 c: direct index for structure ( temp 1-component vector of float) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 2 (const int) -0:40 c: direct index for structure ( centroid noperspective temp 1-component vector of float) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 2 (const int) +0:? 's.c' (layout( location=3) centroid noperspective in 1-component vector of float) 0:40 move second child to first child ( temp 2-component vector of float) 0:40 d: direct index for structure ( temp 2-component vector of float) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 3 (const int) -0:40 d: direct index for structure ( centroid sample temp 2-component vector of float) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 3 (const int) +0:? 's.d' (layout( location=4) centroid sample in 2-component vector of float) 0:40 move second child to first child ( temp bool) 0:40 ff1: direct index for structure ( temp bool) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 4 (const int) -0:? 's_ff1' ( in bool Face) +0:? 's.ff1' ( flat in bool Face) 0:40 move second child to first child ( temp bool) 0:40 ff2: direct index for structure ( temp bool) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 5 (const int) -0:40 ff2: direct index for structure ( temp bool) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 4 (const int) +0:? 's.ff2' (layout( location=5) flat in bool) 0:40 move second child to first child ( temp bool) 0:40 ff3: direct index for structure ( temp bool) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 6 (const int) -0:40 ff3: direct index for structure ( temp bool) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 5 (const int) +0:? 's.ff3' (layout( location=6) flat in bool) 0:40 move second child to first child ( temp 4-component vector of float) 0:40 ff4: direct index for structure ( temp 4-component vector of float) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 7 (const int) -0:40 ff4: direct index for structure ( temp 4-component vector of float) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 6 (const int) +0:? 's.ff4' (layout( location=7) in 4-component vector of float) 0:40 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:40 Function Call: @PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41; ( temp 4-component vector of float) @@ -117,8 +96,14 @@ gl_FragCoord origin is upper left 0:? 's2' ( global structure{ temp 4-component vector of float i}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) -0:? 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:? 's_ff1' ( in bool Face) +0:? 's.ff1' ( flat in bool Face) +0:? 's.a' (layout( location=1) smooth in 4-component vector of float) +0:? 's.b' (layout( location=2) flat in bool) +0:? 's.c' (layout( location=3) centroid noperspective in 1-component vector of float) +0:? 's.d' (layout( location=4) centroid sample in 2-component vector of float) +0:? 's.ff2' (layout( location=5) flat in bool) +0:? 's.ff3' (layout( location=6) flat in bool) +0:? 's.ff4' (layout( location=7) in 4-component vector of float) Linked fragment stage: @@ -164,70 +149,49 @@ gl_FragCoord origin is upper left 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 0 (const int) -0:40 a: direct index for structure ( smooth temp 4-component vector of float) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 0 (const int) +0:? 's.a' (layout( location=1) smooth in 4-component vector of float) 0:40 move second child to first child ( temp bool) 0:40 b: direct index for structure ( temp bool) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 1 (const int) -0:40 b: direct index for structure ( flat temp bool) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 1 (const int) +0:? 's.b' (layout( location=2) flat in bool) 0:40 move second child to first child ( temp 1-component vector of float) 0:40 c: direct index for structure ( temp 1-component vector of float) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 2 (const int) -0:40 c: direct index for structure ( centroid noperspective temp 1-component vector of float) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 2 (const int) +0:? 's.c' (layout( location=3) centroid noperspective in 1-component vector of float) 0:40 move second child to first child ( temp 2-component vector of float) 0:40 d: direct index for structure ( temp 2-component vector of float) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 3 (const int) -0:40 d: direct index for structure ( centroid sample temp 2-component vector of float) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 3 (const int) +0:? 's.d' (layout( location=4) centroid sample in 2-component vector of float) 0:40 move second child to first child ( temp bool) 0:40 ff1: direct index for structure ( temp bool) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 4 (const int) -0:? 's_ff1' ( in bool Face) +0:? 's.ff1' ( flat in bool Face) 0:40 move second child to first child ( temp bool) 0:40 ff2: direct index for structure ( temp bool) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 5 (const int) -0:40 ff2: direct index for structure ( temp bool) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 4 (const int) +0:? 's.ff2' (layout( location=5) flat in bool) 0:40 move second child to first child ( temp bool) 0:40 ff3: direct index for structure ( temp bool) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 6 (const int) -0:40 ff3: direct index for structure ( temp bool) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 5 (const int) +0:? 's.ff3' (layout( location=6) flat in bool) 0:40 move second child to first child ( temp 4-component vector of float) 0:40 ff4: direct index for structure ( temp 4-component vector of float) 0:? 's' ( temp structure{ temp 4-component vector of float a, temp bool b, temp 1-component vector of float c, temp 2-component vector of float d, temp bool ff1, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) 0:40 Constant: 0:40 7 (const int) -0:40 ff4: direct index for structure ( temp 4-component vector of float) -0:40 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:40 Constant: -0:40 6 (const int) +0:? 's.ff4' (layout( location=7) in 4-component vector of float) 0:40 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:40 Function Call: @PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41; ( temp 4-component vector of float) @@ -238,17 +202,23 @@ gl_FragCoord origin is upper left 0:? 's2' ( global structure{ temp 4-component vector of float i}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) -0:? 's' (layout( location=1) in structure{ smooth temp 4-component vector of float a, flat temp bool b, centroid noperspective temp 1-component vector of float c, centroid sample temp 2-component vector of float d, temp bool ff2, temp bool ff3, temp 4-component vector of float ff4}) -0:? 's_ff1' ( in bool Face) +0:? 's.ff1' ( flat in bool Face) +0:? 's.a' (layout( location=1) smooth in 4-component vector of float) +0:? 's.b' (layout( location=2) flat in bool) +0:? 's.c' (layout( location=3) centroid noperspective in 1-component vector of float) +0:? 's.d' (layout( location=4) centroid sample in 2-component vector of float) +0:? 's.ff2' (layout( location=5) flat in bool) +0:? 's.ff3' (layout( location=6) flat in bool) +0:? 's.ff4' (layout( location=7) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 105 +// Generated by (magic number): 80003 +// Id's are bound by 102 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "PixelShaderFunction" 51 56 79 94 + EntryPoint Fragment 4 "PixelShaderFunction" 51 54 59 65 71 76 80 84 87 91 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "PixelShaderFunction" @@ -278,46 +248,53 @@ gl_FragCoord origin is upper left Name 49 "input" Name 51 "input" Name 53 "s" - Name 54 "IN_S" - MemberName 54(IN_S) 0 "a" - MemberName 54(IN_S) 1 "b" - MemberName 54(IN_S) 2 "c" - MemberName 54(IN_S) 3 "d" - MemberName 54(IN_S) 4 "ff2" - MemberName 54(IN_S) 5 "ff3" - MemberName 54(IN_S) 6 "ff4" - Name 56 "s" - Name 79 "s_ff1" - Name 94 "@entryPointOutput" - Name 95 "param" - Name 97 "param" - Name 101 "myS" - MemberName 101(myS) 0 "b" - MemberName 101(myS) 1 "c" - MemberName 101(myS) 2 "a" - MemberName 101(myS) 3 "d" - Name 102 "$Global" - MemberName 102($Global) 0 "s1" - MemberName 102($Global) 1 "ff5" - MemberName 102($Global) 2 "ff6" - Name 104 "" + Name 54 "s.a" + Name 59 "s.b" + Name 65 "s.c" + Name 71 "s.d" + Name 76 "s.ff1" + Name 80 "s.ff2" + Name 84 "s.ff3" + Name 87 "s.ff4" + Name 91 "@entryPointOutput" + Name 92 "param" + Name 94 "param" + Name 98 "myS" + MemberName 98(myS) 0 "b" + MemberName 98(myS) 1 "c" + MemberName 98(myS) 2 "a" + MemberName 98(myS) 3 "d" + Name 99 "$Global" + MemberName 99($Global) 0 "s1" + MemberName 99($Global) 1 "ff5" + MemberName 99($Global) 2 "ff6" + Name 101 "" Decorate 51(input) Location 0 - MemberDecorate 54(IN_S) 1 Flat - MemberDecorate 54(IN_S) 2 NoPerspective - MemberDecorate 54(IN_S) 2 Centroid - MemberDecorate 54(IN_S) 3 Centroid - Decorate 56(s) Location 1 - Decorate 79(s_ff1) BuiltIn FrontFacing - Decorate 94(@entryPointOutput) Location 0 - MemberDecorate 101(myS) 0 Offset 0 - MemberDecorate 101(myS) 1 Offset 4 - MemberDecorate 101(myS) 2 Offset 16 - MemberDecorate 101(myS) 3 Offset 32 - MemberDecorate 102($Global) 0 Offset 0 - MemberDecorate 102($Global) 1 Offset 1620 - MemberDecorate 102($Global) 2 Offset 1636 - Decorate 102($Global) Block - Decorate 104 DescriptorSet 0 + Decorate 54(s.a) Location 1 + Decorate 59(s.b) Flat + Decorate 59(s.b) Location 2 + Decorate 65(s.c) NoPerspective + Decorate 65(s.c) Centroid + Decorate 65(s.c) Location 3 + Decorate 71(s.d) Centroid + Decorate 71(s.d) Location 4 + Decorate 76(s.ff1) Flat + Decorate 76(s.ff1) BuiltIn FrontFacing + Decorate 80(s.ff2) Flat + Decorate 80(s.ff2) Location 5 + Decorate 84(s.ff3) Flat + Decorate 84(s.ff3) Location 6 + Decorate 87(s.ff4) Location 7 + Decorate 91(@entryPointOutput) Location 0 + MemberDecorate 98(myS) 0 Offset 0 + MemberDecorate 98(myS) 1 Offset 4 + MemberDecorate 98(myS) 2 Offset 16 + MemberDecorate 98(myS) 3 Offset 32 + MemberDecorate 99($Global) 0 Offset 0 + MemberDecorate 99($Global) 1 Offset 1620 + MemberDecorate 99($Global) 2 Offset 1636 + Decorate 99($Global) Block + Decorate 101 DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -344,74 +321,71 @@ gl_FragCoord origin is upper left 42: TypePointer Function 41(containEmpty) 50: TypePointer Input 7(fvec4) 51(input): 50(ptr) Variable Input - 54(IN_S): TypeStruct 7(fvec4) 9(bool) 6(float) 10(fvec2) 9(bool) 9(bool) 7(fvec4) - 55: TypePointer Input 54(IN_S) - 56(s): 55(ptr) Variable Input - 60: 31(int) Constant 1 - 61: TypePointer Input 9(bool) - 64: TypePointer Function 9(bool) - 66: 31(int) Constant 2 - 67: TypePointer Input 6(float) - 70: TypePointer Function 6(float) - 72: 31(int) Constant 3 - 73: TypePointer Input 10(fvec2) - 76: TypePointer Function 10(fvec2) - 78: 31(int) Constant 4 - 79(s_ff1): 61(ptr) Variable Input - 82: 31(int) Constant 5 - 86: 31(int) Constant 6 - 93: TypePointer Output 7(fvec4) -94(@entryPointOutput): 93(ptr) Variable Output - 100: TypeInt 32 0 - 101(myS): TypeStruct 100(int) 100(int) 7(fvec4) 7(fvec4) - 102($Global): TypeStruct 101(myS) 6(float) 6(float) - 103: TypePointer Uniform 102($Global) - 104: 103(ptr) Variable Uniform + 54(s.a): 50(ptr) Variable Input + 57: 31(int) Constant 1 + 58: TypePointer Input 9(bool) + 59(s.b): 58(ptr) Variable Input + 61: TypePointer Function 9(bool) + 63: 31(int) Constant 2 + 64: TypePointer Input 6(float) + 65(s.c): 64(ptr) Variable Input + 67: TypePointer Function 6(float) + 69: 31(int) Constant 3 + 70: TypePointer Input 10(fvec2) + 71(s.d): 70(ptr) Variable Input + 73: TypePointer Function 10(fvec2) + 75: 31(int) Constant 4 + 76(s.ff1): 58(ptr) Variable Input + 79: 31(int) Constant 5 + 80(s.ff2): 58(ptr) Variable Input + 83: 31(int) Constant 6 + 84(s.ff3): 58(ptr) Variable Input + 87(s.ff4): 50(ptr) Variable Input + 90: TypePointer Output 7(fvec4) +91(@entryPointOutput): 90(ptr) Variable Output + 97: TypeInt 32 0 + 98(myS): TypeStruct 97(int) 97(int) 7(fvec4) 7(fvec4) + 99($Global): TypeStruct 98(myS) 6(float) 6(float) + 100: TypePointer Uniform 99($Global) + 101: 100(ptr) Variable Uniform 4(PixelShaderFunction): 2 Function None 3 5: Label 49(input): 8(ptr) Variable Function 53(s): 12(ptr) Variable Function - 95(param): 8(ptr) Variable Function - 97(param): 12(ptr) Variable Function + 92(param): 8(ptr) Variable Function + 94(param): 12(ptr) Variable Function 52: 7(fvec4) Load 51(input) Store 49(input) 52 - 57: 50(ptr) AccessChain 56(s) 32 - 58: 7(fvec4) Load 57 - 59: 8(ptr) AccessChain 53(s) 32 - Store 59 58 - 62: 61(ptr) AccessChain 56(s) 60 - 63: 9(bool) Load 62 - 65: 64(ptr) AccessChain 53(s) 60 - Store 65 63 - 68: 67(ptr) AccessChain 56(s) 66 - 69: 6(float) Load 68 - 71: 70(ptr) AccessChain 53(s) 66 - Store 71 69 - 74: 73(ptr) AccessChain 56(s) 72 - 75: 10(fvec2) Load 74 - 77: 76(ptr) AccessChain 53(s) 72 - Store 77 75 - 80: 9(bool) Load 79(s_ff1) - 81: 64(ptr) AccessChain 53(s) 78 - Store 81 80 - 83: 61(ptr) AccessChain 56(s) 78 - 84: 9(bool) Load 83 - 85: 64(ptr) AccessChain 53(s) 82 - Store 85 84 - 87: 61(ptr) AccessChain 56(s) 82 - 88: 9(bool) Load 87 - 89: 64(ptr) AccessChain 53(s) 86 + 55: 7(fvec4) Load 54(s.a) + 56: 8(ptr) AccessChain 53(s) 32 + Store 56 55 + 60: 9(bool) Load 59(s.b) + 62: 61(ptr) AccessChain 53(s) 57 + Store 62 60 + 66: 6(float) Load 65(s.c) + 68: 67(ptr) AccessChain 53(s) 63 + Store 68 66 + 72: 10(fvec2) Load 71(s.d) + 74: 73(ptr) AccessChain 53(s) 69 + Store 74 72 + 77: 9(bool) Load 76(s.ff1) + 78: 61(ptr) AccessChain 53(s) 75 + Store 78 77 + 81: 9(bool) Load 80(s.ff2) + 82: 61(ptr) AccessChain 53(s) 79 + Store 82 81 + 85: 9(bool) Load 84(s.ff3) + 86: 61(ptr) AccessChain 53(s) 83 + Store 86 85 + 88: 7(fvec4) Load 87(s.ff4) + 89: 8(ptr) AccessChain 53(s) 33 Store 89 88 - 90: 50(ptr) AccessChain 56(s) 86 - 91: 7(fvec4) Load 90 - 92: 8(ptr) AccessChain 53(s) 33 - Store 92 91 - 96: 7(fvec4) Load 49(input) - Store 95(param) 96 - 98: 11(IN_S) Load 53(s) - Store 97(param) 98 - 99: 7(fvec4) FunctionCall 16(@PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41;) 95(param) 97(param) - Store 94(@entryPointOutput) 99 + 93: 7(fvec4) Load 49(input) + Store 92(param) 93 + 95: 11(IN_S) Load 53(s) + Store 94(param) 95 + 96: 7(fvec4) FunctionCall 16(@PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41;) 92(param) 94(param) + Store 91(@entryPointOutput) 96 Return FunctionEnd 16(@PixelShaderFunction(vf4;struct-IN_S-vf4-b1-vf1-vf2-b1-b1-b1-vf41;): 7(fvec4) Function None 13 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split-1.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split-1.vert.out index db40682..c0f3a53 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split-1.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split-1.vert.out @@ -46,19 +46,19 @@ Shader version: 500 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:17 Constant: 0:17 0 (const int) -0:? 'x0_in' (layout( location=0) in int) +0:? 'vsin.x0_in' (layout( location=0) in int) 0:17 move second child to first child ( temp 4-component vector of float) 0:17 Pos_in: direct index for structure ( temp 4-component vector of float) 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:17 Constant: 0:17 1 (const int) -0:? 'Pos_in' (layout( location=1) in 4-component vector of float) +0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) 0:17 move second child to first child ( temp int) 0:17 x1_in: direct index for structure ( temp int) 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:17 Constant: 0:17 2 (const int) -0:? 'x1_in' (layout( location=2) in int) +0:? 'vsin.x1_in' (layout( location=2) in int) 0:17 move second child to first child ( temp 4-component vector of float) 0:? 'Pos_loose' ( temp 4-component vector of float) 0:? 'Pos_loose' (layout( location=3) in 4-component vector of float) @@ -69,34 +69,30 @@ Shader version: 500 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:? 'Pos_loose' ( temp 4-component vector of float) 0:17 move second child to first child ( temp int) -0:17 x0_out: direct index for structure ( temp int) -0:17 '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:17 Constant: -0:17 0 (const int) +0:? '@entryPointOutput.x0_out' (layout( location=0) out int) 0:17 x0_out: direct index for structure ( temp int) 0:17 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:17 Constant: 0:17 0 (const int) 0:17 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos_out' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) 0:17 Pos_out: direct index for structure ( temp 4-component vector of float) 0:17 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:17 Constant: 0:17 1 (const int) 0:17 move second child to first child ( temp int) -0:17 x1_out: direct index for structure ( temp int) -0:17 '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:17 Constant: -0:17 1 (const int) +0:? '@entryPointOutput.x1_out' (layout( location=1) out int) 0:17 x1_out: direct index for structure ( temp int) 0:17 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:17 Constant: 0:17 2 (const int) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:? 'x0_in' (layout( location=0) in int) -0:? 'Pos_in' (layout( location=1) in 4-component vector of float) -0:? 'x1_in' (layout( location=2) in int) +0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) +0:? '@entryPointOutput.x0_out' (layout( location=0) out int) +0:? '@entryPointOutput.x1_out' (layout( location=1) out int) +0:? 'vsin.x0_in' (layout( location=0) in int) +0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) +0:? 'vsin.x1_in' (layout( location=2) in int) 0:? 'Pos_loose' (layout( location=3) in 4-component vector of float) @@ -150,19 +146,19 @@ Shader version: 500 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:17 Constant: 0:17 0 (const int) -0:? 'x0_in' (layout( location=0) in int) +0:? 'vsin.x0_in' (layout( location=0) in int) 0:17 move second child to first child ( temp 4-component vector of float) 0:17 Pos_in: direct index for structure ( temp 4-component vector of float) 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:17 Constant: 0:17 1 (const int) -0:? 'Pos_in' (layout( location=1) in 4-component vector of float) +0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) 0:17 move second child to first child ( temp int) 0:17 x1_in: direct index for structure ( temp int) 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:17 Constant: 0:17 2 (const int) -0:? 'x1_in' (layout( location=2) in int) +0:? 'vsin.x1_in' (layout( location=2) in int) 0:17 move second child to first child ( temp 4-component vector of float) 0:? 'Pos_loose' ( temp 4-component vector of float) 0:? 'Pos_loose' (layout( location=3) in 4-component vector of float) @@ -173,44 +169,40 @@ Shader version: 500 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:? 'Pos_loose' ( temp 4-component vector of float) 0:17 move second child to first child ( temp int) -0:17 x0_out: direct index for structure ( temp int) -0:17 '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:17 Constant: -0:17 0 (const int) +0:? '@entryPointOutput.x0_out' (layout( location=0) out int) 0:17 x0_out: direct index for structure ( temp int) 0:17 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:17 Constant: 0:17 0 (const int) 0:17 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos_out' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) 0:17 Pos_out: direct index for structure ( temp 4-component vector of float) 0:17 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:17 Constant: 0:17 1 (const int) 0:17 move second child to first child ( temp int) -0:17 x1_out: direct index for structure ( temp int) -0:17 '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:17 Constant: -0:17 1 (const int) +0:? '@entryPointOutput.x1_out' (layout( location=1) out int) 0:17 x1_out: direct index for structure ( temp int) 0:17 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:17 Constant: 0:17 2 (const int) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:? 'x0_in' (layout( location=0) in int) -0:? 'Pos_in' (layout( location=1) in 4-component vector of float) -0:? 'x1_in' (layout( location=2) in int) +0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) +0:? '@entryPointOutput.x0_out' (layout( location=0) out int) +0:? '@entryPointOutput.x1_out' (layout( location=1) out int) +0:? 'vsin.x0_in' (layout( location=0) in int) +0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) +0:? 'vsin.x1_in' (layout( location=2) in int) 0:? 'Pos_loose' (layout( location=3) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 73 +// Generated by (magic number): 80003 +// Id's are bound by 70 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 40 44 47 51 61 67 + EntryPoint Vertex 4 "main" 40 44 47 51 60 64 67 Source HLSL 500 Name 4 "main" Name 9 "VS_INPUT" @@ -226,25 +218,24 @@ Shader version: 500 Name 15 "Pos_loose" Name 19 "vsout" Name 38 "vsin" - Name 40 "x0_in" - Name 44 "Pos_in" - Name 47 "x1_in" + Name 40 "vsin.x0_in" + Name 44 "vsin.Pos_in" + Name 47 "vsin.x1_in" Name 50 "Pos_loose" Name 51 "Pos_loose" Name 53 "flattenTemp" Name 54 "param" Name 56 "param" - Name 59 "VS_OUTPUT" - MemberName 59(VS_OUTPUT) 0 "x0_out" - MemberName 59(VS_OUTPUT) 1 "x1_out" - Name 61 "@entryPointOutput" - Name 67 "@entryPointOutput_Pos_out" - Decorate 40(x0_in) Location 0 - Decorate 44(Pos_in) Location 1 - Decorate 47(x1_in) Location 2 + Name 60 "@entryPointOutput.x0_out" + Name 64 "@entryPointOutput.Pos_out" + Name 67 "@entryPointOutput.x1_out" + Decorate 40(vsin.x0_in) Location 0 + Decorate 44(vsin.Pos_in) Location 1 + Decorate 47(vsin.x1_in) Location 2 Decorate 51(Pos_loose) Location 3 - Decorate 61(@entryPointOutput) Location 0 - Decorate 67(@entryPointOutput_Pos_out) BuiltIn Position + Decorate 60(@entryPointOutput.x0_out) Location 0 + Decorate 64(@entryPointOutput.Pos_out) BuiltIn Position + Decorate 67(@entryPointOutput.x1_out) Location 1 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -261,17 +252,16 @@ Shader version: 500 25: 6(int) Constant 1 31: 6(int) Constant 2 39: TypePointer Input 6(int) - 40(x0_in): 39(ptr) Variable Input + 40(vsin.x0_in): 39(ptr) Variable Input 43: TypePointer Input 8(fvec4) - 44(Pos_in): 43(ptr) Variable Input - 47(x1_in): 39(ptr) Variable Input + 44(vsin.Pos_in): 43(ptr) Variable Input + 47(vsin.x1_in): 39(ptr) Variable Input 51(Pos_loose): 43(ptr) Variable Input - 59(VS_OUTPUT): TypeStruct 6(int) 6(int) - 60: TypePointer Output 59(VS_OUTPUT) -61(@entryPointOutput): 60(ptr) Variable Output - 64: TypePointer Output 6(int) - 66: TypePointer Output 8(fvec4) -67(@entryPointOutput_Pos_out): 66(ptr) Variable Output + 59: TypePointer Output 6(int) +60(@entryPointOutput.x0_out): 59(ptr) Variable Output + 63: TypePointer Output 8(fvec4) +64(@entryPointOutput.Pos_out): 63(ptr) Variable Output +67(@entryPointOutput.x1_out): 59(ptr) Variable Output 4(main): 2 Function None 3 5: Label 38(vsin): 10(ptr) Variable Function @@ -279,13 +269,13 @@ Shader version: 500 53(flattenTemp): 18(ptr) Variable Function 54(param): 10(ptr) Variable Function 56(param): 11(ptr) Variable Function - 41: 6(int) Load 40(x0_in) + 41: 6(int) Load 40(vsin.x0_in) 42: 21(ptr) AccessChain 38(vsin) 20 Store 42 41 - 45: 8(fvec4) Load 44(Pos_in) + 45: 8(fvec4) Load 44(vsin.Pos_in) 46: 11(ptr) AccessChain 38(vsin) 25 Store 46 45 - 48: 6(int) Load 47(x1_in) + 48: 6(int) Load 47(vsin.x1_in) 49: 21(ptr) AccessChain 38(vsin) 31 Store 49 48 52: 8(fvec4) Load 51(Pos_loose) @@ -296,17 +286,15 @@ Shader version: 500 Store 56(param) 57 58:12(VS_OUTPUT) FunctionCall 16(@main(struct-VS_INPUT-i1-vf4-i11;vf4;) 54(param) 56(param) Store 53(flattenTemp) 58 - 62: 21(ptr) AccessChain 53(flattenTemp) 20 - 63: 6(int) Load 62 - 65: 64(ptr) AccessChain 61(@entryPointOutput) 20 - Store 65 63 - 68: 11(ptr) AccessChain 53(flattenTemp) 25 - 69: 8(fvec4) Load 68 - Store 67(@entryPointOutput_Pos_out) 69 - 70: 21(ptr) AccessChain 53(flattenTemp) 31 - 71: 6(int) Load 70 - 72: 64(ptr) AccessChain 61(@entryPointOutput) 25 - Store 72 71 + 61: 21(ptr) AccessChain 53(flattenTemp) 20 + 62: 6(int) Load 61 + Store 60(@entryPointOutput.x0_out) 62 + 65: 11(ptr) AccessChain 53(flattenTemp) 25 + 66: 8(fvec4) Load 65 + Store 64(@entryPointOutput.Pos_out) 66 + 68: 21(ptr) AccessChain 53(flattenTemp) 31 + 69: 6(int) Load 68 + Store 67(@entryPointOutput.x1_out) 69 Return FunctionEnd 16(@main(struct-VS_INPUT-i1-vf4-i11;vf4;):12(VS_OUTPUT) Function None 13 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.array.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.array.geom.out index 5c36e2b..b70ccb6 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.array.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.array.geom.out @@ -72,7 +72,10 @@ output primitive = triangle_strip 0:? 'OutputStream' ( temp structure{ temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID}) 0:? Linker Objects 0:? 'v' (layout( location=0) in 1-element array of uint) -0:? 'OutputStream' (layout( location=0) out structure{ temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID}) +0:? 'OutputStream.Pos' ( out 4-component vector of float Position) +0:? 'OutputStream.TexCoord' (layout( location=0) out 2-component vector of float) +0:? 'OutputStream.TerrainPos' (layout( location=1) out 3-component vector of float) +0:? 'OutputStream.VertexID' (layout( location=2) out uint) Linked geometry stage: @@ -151,16 +154,19 @@ output primitive = triangle_strip 0:? 'OutputStream' ( temp structure{ temp 4-component vector of float Pos, temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID}) 0:? Linker Objects 0:? 'v' (layout( location=0) in 1-element array of uint) -0:? 'OutputStream' (layout( location=0) out structure{ temp 2-component vector of float TexCoord, temp 3-component vector of float TerrainPos, temp uint VertexID}) +0:? 'OutputStream.Pos' ( out 4-component vector of float Position) +0:? 'OutputStream.TexCoord' (layout( location=0) out 2-component vector of float) +0:? 'OutputStream.TerrainPos' (layout( location=1) out 3-component vector of float) +0:? 'OutputStream.VertexID' (layout( location=2) out uint) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 77 +// Generated by (magic number): 80003 +// Id's are bound by 82 Capability Geometry 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 4 "main" 66 76 + EntryPoint Geometry 4 "main" 66 75 77 79 81 ExecutionMode 4 InputPoints ExecutionMode 4 Invocations 1 ExecutionMode 4 OutputTriangleStrip @@ -184,13 +190,15 @@ output primitive = triangle_strip Name 68 "OutputStream" Name 69 "param" Name 71 "param" - Name 74 "PSInput" - MemberName 74(PSInput) 0 "TexCoord" - MemberName 74(PSInput) 1 "TerrainPos" - MemberName 74(PSInput) 2 "VertexID" - Name 76 "OutputStream" + Name 75 "OutputStream.Pos" + Name 77 "OutputStream.TexCoord" + Name 79 "OutputStream.TerrainPos" + Name 81 "OutputStream.VertexID" Decorate 66(v) Location 0 - Decorate 76(OutputStream) Location 0 + Decorate 75(OutputStream.Pos) BuiltIn Position + Decorate 77(OutputStream.TexCoord) Location 0 + Decorate 79(OutputStream.TerrainPos) Location 1 + Decorate 81(OutputStream.VertexID) Location 2 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -223,9 +231,14 @@ output primitive = triangle_strip 60: 28(int) Constant 1 65: TypePointer Input 8 66(v): 65(ptr) Variable Input - 74(PSInput): TypeStruct 12(fvec2) 13(fvec3) 6(int) - 75: TypePointer Output 74(PSInput) -76(OutputStream): 75(ptr) Variable Output + 74: TypePointer Output 11(fvec4) +75(OutputStream.Pos): 74(ptr) Variable Output + 76: TypePointer Output 12(fvec2) +77(OutputStream.TexCoord): 76(ptr) Variable Output + 78: TypePointer Output 13(fvec3) +79(OutputStream.TerrainPos): 78(ptr) Variable Output + 80: TypePointer Output 6(int) +81(OutputStream.VertexID): 80(ptr) Variable Output 4(main): 2 Function None 3 5: Label 64(v): 9(ptr) Variable Function diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.assign.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.assign.frag.out index 2228a8a..013ee1b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.assign.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.assign.frag.out @@ -11,16 +11,19 @@ gl_FragCoord origin is upper left 0:9 'input' ( in 3-element array of structure{ temp float f, temp 4-component vector of float pos}) 0:9 'a' ( temp 3-element array of structure{ temp float f, temp 4-component vector of float pos}) 0:11 Branch: Return with expression -0:11 Constant: -0:11 1.000000 -0:11 1.000000 -0:11 1.000000 +0:11 pos: direct index for structure ( temp 4-component vector of float) +0:11 direct index ( temp structure{ temp float f, temp 4-component vector of float pos}) +0:11 'a' ( temp 3-element array of structure{ temp float f, temp 4-component vector of float pos}) +0:11 Constant: +0:11 1 (const int) +0:11 Constant: +0:11 1 (const int) 0:7 Function Definition: main( ( temp void) 0:7 Function Parameters: 0:? Sequence 0:7 move second child to first child ( temp int) 0:? 'i' ( temp int) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:7 Sequence 0:7 move second child to first child ( temp float) 0:7 f: direct index for structure ( temp float) @@ -30,13 +33,7 @@ gl_FragCoord origin is upper left 0:7 0 (const int) 0:7 Constant: 0:7 0 (const int) -0:7 f: direct index for structure ( temp float) -0:7 direct index (layout( location=1) in structure{ temp float f}) -0:7 'input' (layout( location=1) in 3-element array of structure{ temp float f}) -0:7 Constant: -0:7 0 (const int) -0:7 Constant: -0:7 0 (const int) +0:? 'input[0].f' (layout( location=1) in float) 0:7 move second child to first child ( temp 4-component vector of float) 0:7 pos: direct index for structure ( temp 4-component vector of float) 0:7 direct index ( temp structure{ temp float f, temp 4-component vector of float pos}) @@ -46,7 +43,7 @@ gl_FragCoord origin is upper left 0:7 Constant: 0:7 1 (const int) 0:7 direct index ( in 4-component vector of float FragCoord) -0:? 'input_pos' ( in 3-element array of 4-component vector of float FragCoord) +0:? 'input.pos' ( in 3-element array of 4-component vector of float FragCoord) 0:7 Constant: 0:7 0 (const int) 0:7 move second child to first child ( temp float) @@ -57,13 +54,7 @@ gl_FragCoord origin is upper left 0:7 1 (const int) 0:7 Constant: 0:7 0 (const int) -0:7 f: direct index for structure ( temp float) -0:7 direct index (layout( location=1) in structure{ temp float f}) -0:7 'input' (layout( location=1) in 3-element array of structure{ temp float f}) -0:7 Constant: -0:7 1 (const int) -0:7 Constant: -0:7 0 (const int) +0:? 'input[1].f' (layout( location=2) in float) 0:7 move second child to first child ( temp 4-component vector of float) 0:7 pos: direct index for structure ( temp 4-component vector of float) 0:7 direct index ( temp structure{ temp float f, temp 4-component vector of float pos}) @@ -73,7 +64,7 @@ gl_FragCoord origin is upper left 0:7 Constant: 0:7 1 (const int) 0:7 direct index ( in 4-component vector of float FragCoord) -0:? 'input_pos' ( in 3-element array of 4-component vector of float FragCoord) +0:? 'input.pos' ( in 3-element array of 4-component vector of float FragCoord) 0:7 Constant: 0:7 1 (const int) 0:7 move second child to first child ( temp float) @@ -84,13 +75,7 @@ gl_FragCoord origin is upper left 0:7 2 (const int) 0:7 Constant: 0:7 0 (const int) -0:7 f: direct index for structure ( temp float) -0:7 direct index (layout( location=1) in structure{ temp float f}) -0:7 'input' (layout( location=1) in 3-element array of structure{ temp float f}) -0:7 Constant: -0:7 2 (const int) -0:7 Constant: -0:7 0 (const int) +0:? 'input[2].f' (layout( location=3) in float) 0:7 move second child to first child ( temp 4-component vector of float) 0:7 pos: direct index for structure ( temp 4-component vector of float) 0:7 direct index ( temp structure{ temp float f, temp 4-component vector of float pos}) @@ -100,7 +85,7 @@ gl_FragCoord origin is upper left 0:7 Constant: 0:7 1 (const int) 0:7 direct index ( in 4-component vector of float FragCoord) -0:? 'input_pos' ( in 3-element array of 4-component vector of float FragCoord) +0:? 'input.pos' ( in 3-element array of 4-component vector of float FragCoord) 0:7 Constant: 0:7 2 (const int) 0:7 move second child to first child ( temp 4-component vector of float) @@ -110,9 +95,11 @@ gl_FragCoord origin is upper left 0:? 'input' ( temp 3-element array of structure{ temp float f, temp 4-component vector of float pos}) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'i' (layout( location=0) in int) -0:? 'input' (layout( location=1) in 3-element array of structure{ temp float f}) -0:? 'input_pos' ( in 3-element array of 4-component vector of float FragCoord) +0:? 'i' (layout( location=0) flat in int) +0:? 'input.pos' ( in 3-element array of 4-component vector of float FragCoord) +0:? 'input[0].f' (layout( location=1) in float) +0:? 'input[1].f' (layout( location=2) in float) +0:? 'input[2].f' (layout( location=3) in float) Linked fragment stage: @@ -130,16 +117,19 @@ gl_FragCoord origin is upper left 0:9 'input' ( in 3-element array of structure{ temp float f, temp 4-component vector of float pos}) 0:9 'a' ( temp 3-element array of structure{ temp float f, temp 4-component vector of float pos}) 0:11 Branch: Return with expression -0:11 Constant: -0:11 1.000000 -0:11 1.000000 -0:11 1.000000 +0:11 pos: direct index for structure ( temp 4-component vector of float) +0:11 direct index ( temp structure{ temp float f, temp 4-component vector of float pos}) +0:11 'a' ( temp 3-element array of structure{ temp float f, temp 4-component vector of float pos}) +0:11 Constant: +0:11 1 (const int) +0:11 Constant: +0:11 1 (const int) 0:7 Function Definition: main( ( temp void) 0:7 Function Parameters: 0:? Sequence 0:7 move second child to first child ( temp int) 0:? 'i' ( temp int) -0:? 'i' (layout( location=0) in int) +0:? 'i' (layout( location=0) flat in int) 0:7 Sequence 0:7 move second child to first child ( temp float) 0:7 f: direct index for structure ( temp float) @@ -149,13 +139,7 @@ gl_FragCoord origin is upper left 0:7 0 (const int) 0:7 Constant: 0:7 0 (const int) -0:7 f: direct index for structure ( temp float) -0:7 direct index (layout( location=1) in structure{ temp float f}) -0:7 'input' (layout( location=1) in 3-element array of structure{ temp float f}) -0:7 Constant: -0:7 0 (const int) -0:7 Constant: -0:7 0 (const int) +0:? 'input[0].f' (layout( location=1) in float) 0:7 move second child to first child ( temp 4-component vector of float) 0:7 pos: direct index for structure ( temp 4-component vector of float) 0:7 direct index ( temp structure{ temp float f, temp 4-component vector of float pos}) @@ -165,7 +149,7 @@ gl_FragCoord origin is upper left 0:7 Constant: 0:7 1 (const int) 0:7 direct index ( in 4-component vector of float FragCoord) -0:? 'input_pos' ( in 3-element array of 4-component vector of float FragCoord) +0:? 'input.pos' ( in 3-element array of 4-component vector of float FragCoord) 0:7 Constant: 0:7 0 (const int) 0:7 move second child to first child ( temp float) @@ -176,13 +160,7 @@ gl_FragCoord origin is upper left 0:7 1 (const int) 0:7 Constant: 0:7 0 (const int) -0:7 f: direct index for structure ( temp float) -0:7 direct index (layout( location=1) in structure{ temp float f}) -0:7 'input' (layout( location=1) in 3-element array of structure{ temp float f}) -0:7 Constant: -0:7 1 (const int) -0:7 Constant: -0:7 0 (const int) +0:? 'input[1].f' (layout( location=2) in float) 0:7 move second child to first child ( temp 4-component vector of float) 0:7 pos: direct index for structure ( temp 4-component vector of float) 0:7 direct index ( temp structure{ temp float f, temp 4-component vector of float pos}) @@ -192,7 +170,7 @@ gl_FragCoord origin is upper left 0:7 Constant: 0:7 1 (const int) 0:7 direct index ( in 4-component vector of float FragCoord) -0:? 'input_pos' ( in 3-element array of 4-component vector of float FragCoord) +0:? 'input.pos' ( in 3-element array of 4-component vector of float FragCoord) 0:7 Constant: 0:7 1 (const int) 0:7 move second child to first child ( temp float) @@ -203,13 +181,7 @@ gl_FragCoord origin is upper left 0:7 2 (const int) 0:7 Constant: 0:7 0 (const int) -0:7 f: direct index for structure ( temp float) -0:7 direct index (layout( location=1) in structure{ temp float f}) -0:7 'input' (layout( location=1) in 3-element array of structure{ temp float f}) -0:7 Constant: -0:7 2 (const int) -0:7 Constant: -0:7 0 (const int) +0:? 'input[2].f' (layout( location=3) in float) 0:7 move second child to first child ( temp 4-component vector of float) 0:7 pos: direct index for structure ( temp 4-component vector of float) 0:7 direct index ( temp structure{ temp float f, temp 4-component vector of float pos}) @@ -219,7 +191,7 @@ gl_FragCoord origin is upper left 0:7 Constant: 0:7 1 (const int) 0:7 direct index ( in 4-component vector of float FragCoord) -0:? 'input_pos' ( in 3-element array of 4-component vector of float FragCoord) +0:? 'input.pos' ( in 3-element array of 4-component vector of float FragCoord) 0:7 Constant: 0:7 2 (const int) 0:7 move second child to first child ( temp 4-component vector of float) @@ -229,18 +201,20 @@ gl_FragCoord origin is upper left 0:? 'input' ( temp 3-element array of structure{ temp float f, temp 4-component vector of float pos}) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'i' (layout( location=0) in int) -0:? 'input' (layout( location=1) in 3-element array of structure{ temp float f}) -0:? 'input_pos' ( in 3-element array of 4-component vector of float FragCoord) +0:? 'i' (layout( location=0) flat in int) +0:? 'input.pos' ( in 3-element array of 4-component vector of float FragCoord) +0:? 'input[0].f' (layout( location=1) in float) +0:? 'input[1].f' (layout( location=2) in float) +0:? 'input[2].f' (layout( location=3) in float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 73 +// Generated by (magic number): 80003 +// Id's are bound by 66 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 32 39 48 67 + EntryPoint Fragment 4 "main" 30 35 41 46 53 60 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -251,20 +225,23 @@ gl_FragCoord origin is upper left Name 16 "i" Name 17 "input" Name 20 "a" + Name 28 "i" Name 30 "i" - Name 32 "i" - Name 34 "input" - Name 36 "S" - MemberName 36(S) 0 "f" - Name 39 "input" - Name 48 "input_pos" - Name 67 "@entryPointOutput" - Name 68 "param" - Name 70 "param" - Decorate 32(i) Location 0 - Decorate 39(input) Location 1 - Decorate 48(input_pos) BuiltIn FragCoord - Decorate 67(@entryPointOutput) Location 0 + Name 32 "input" + Name 35 "input[0].f" + Name 41 "input.pos" + Name 46 "input[1].f" + Name 53 "input[2].f" + Name 60 "@entryPointOutput" + Name 61 "param" + Name 63 "param" + Decorate 30(i) Flat + Decorate 30(i) Location 0 + Decorate 35(input[0].f) Location 1 + Decorate 41(input.pos) BuiltIn FragCoord + Decorate 46(input[1].f) Location 2 + Decorate 53(input[2].f) Location 3 + Decorate 60(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -277,65 +254,58 @@ gl_FragCoord origin is upper left 13: TypeArray 10(S) 12 14: TypePointer Function 13 15: TypeFunction 9(fvec4) 7(ptr) 14(ptr) - 22: TypeVector 8(float) 3 - 23: 8(float) Constant 1065353216 - 24: 22(fvec3) ConstantComposite 23 23 23 - 25: TypePointer Function 9(fvec4) - 31: TypePointer Input 6(int) - 32(i): 31(ptr) Variable Input - 35: 6(int) Constant 0 - 36(S): TypeStruct 8(float) - 37: TypeArray 36(S) 12 - 38: TypePointer Input 37 - 39(input): 38(ptr) Variable Input - 40: TypePointer Input 8(float) - 43: TypePointer Function 8(float) - 45: 6(int) Constant 1 - 46: TypeArray 9(fvec4) 12 - 47: TypePointer Input 46 - 48(input_pos): 47(ptr) Variable Input - 49: TypePointer Input 9(fvec4) - 59: 6(int) Constant 2 - 66: TypePointer Output 9(fvec4) -67(@entryPointOutput): 66(ptr) Variable Output + 22: 6(int) Constant 1 + 23: TypePointer Function 9(fvec4) + 29: TypePointer Input 6(int) + 30(i): 29(ptr) Variable Input + 33: 6(int) Constant 0 + 34: TypePointer Input 8(float) + 35(input[0].f): 34(ptr) Variable Input + 37: TypePointer Function 8(float) + 39: TypeArray 9(fvec4) 12 + 40: TypePointer Input 39 + 41(input.pos): 40(ptr) Variable Input + 42: TypePointer Input 9(fvec4) + 46(input[1].f): 34(ptr) Variable Input + 52: 6(int) Constant 2 + 53(input[2].f): 34(ptr) Variable Input + 59: TypePointer Output 9(fvec4) +60(@entryPointOutput): 59(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 30(i): 7(ptr) Variable Function - 34(input): 14(ptr) Variable Function - 68(param): 7(ptr) Variable Function - 70(param): 14(ptr) Variable Function - 33: 6(int) Load 32(i) - Store 30(i) 33 - 41: 40(ptr) AccessChain 39(input) 35 35 - 42: 8(float) Load 41 - 44: 43(ptr) AccessChain 34(input) 35 35 - Store 44 42 - 50: 49(ptr) AccessChain 48(input_pos) 35 - 51: 9(fvec4) Load 50 - 52: 25(ptr) AccessChain 34(input) 35 45 - Store 52 51 - 53: 40(ptr) AccessChain 39(input) 45 35 - 54: 8(float) Load 53 - 55: 43(ptr) AccessChain 34(input) 45 35 + 28(i): 7(ptr) Variable Function + 32(input): 14(ptr) Variable Function + 61(param): 7(ptr) Variable Function + 63(param): 14(ptr) Variable Function + 31: 6(int) Load 30(i) + Store 28(i) 31 + 36: 8(float) Load 35(input[0].f) + 38: 37(ptr) AccessChain 32(input) 33 33 + Store 38 36 + 43: 42(ptr) AccessChain 41(input.pos) 33 + 44: 9(fvec4) Load 43 + 45: 23(ptr) AccessChain 32(input) 33 22 + Store 45 44 + 47: 8(float) Load 46(input[1].f) + 48: 37(ptr) AccessChain 32(input) 22 33 + Store 48 47 + 49: 42(ptr) AccessChain 41(input.pos) 22 + 50: 9(fvec4) Load 49 + 51: 23(ptr) AccessChain 32(input) 22 22 + Store 51 50 + 54: 8(float) Load 53(input[2].f) + 55: 37(ptr) AccessChain 32(input) 52 33 Store 55 54 - 56: 49(ptr) AccessChain 48(input_pos) 45 + 56: 42(ptr) AccessChain 41(input.pos) 52 57: 9(fvec4) Load 56 - 58: 25(ptr) AccessChain 34(input) 45 45 + 58: 23(ptr) AccessChain 32(input) 52 22 Store 58 57 - 60: 40(ptr) AccessChain 39(input) 59 35 - 61: 8(float) Load 60 - 62: 43(ptr) AccessChain 34(input) 59 35 - Store 62 61 - 63: 49(ptr) AccessChain 48(input_pos) 59 - 64: 9(fvec4) Load 63 - 65: 25(ptr) AccessChain 34(input) 59 45 - Store 65 64 - 69: 6(int) Load 30(i) - Store 68(param) 69 - 71: 13 Load 34(input) - Store 70(param) 71 - 72: 9(fvec4) FunctionCall 18(@main(i1;struct-S-f1-vf41[3];) 68(param) 70(param) - Store 67(@entryPointOutput) 72 + 62: 6(int) Load 28(i) + Store 61(param) 62 + 64: 13 Load 32(input) + Store 63(param) 64 + 65: 9(fvec4) FunctionCall 18(@main(i1;struct-S-f1-vf41[3];) 61(param) 63(param) + Store 60(@entryPointOutput) 65 Return FunctionEnd 18(@main(i1;struct-S-f1-vf41[3];): 9(fvec4) Function None 15 @@ -343,10 +313,9 @@ gl_FragCoord origin is upper left 17(input): 14(ptr) FunctionParameter 19: Label 20(a): 14(ptr) Variable Function - 26: 25(ptr) Variable Function 21: 13 Load 20(a) Store 17(input) 21 - Store 26 24 - 27: 9(fvec4) Load 26 - ReturnValue 27 + 24: 23(ptr) AccessChain 20(a) 22 22 + 25: 9(fvec4) Load 24 + ReturnValue 25 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.call.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.call.vert.out index 647f9b4..de5b7df 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.call.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.call.vert.out @@ -60,53 +60,49 @@ Shader version: 500 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:22 Constant: 0:22 0 (const int) -0:? 'x0_in' (layout( location=0) in int) +0:? 'vsin.x0_in' (layout( location=0) in int) 0:22 move second child to first child ( temp 4-component vector of float) 0:22 Pos_in: direct index for structure ( temp 4-component vector of float) 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:22 Constant: 0:22 1 (const int) -0:? 'Pos_in' (layout( location=1) in 4-component vector of float) +0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) 0:22 move second child to first child ( temp int) 0:22 x1_in: direct index for structure ( temp int) 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:22 Constant: 0:22 2 (const int) -0:? 'x1_in' (layout( location=2) in int) +0:? 'vsin.x1_in' (layout( location=2) in int) 0:22 Sequence 0:22 move second child to first child ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 Function Call: @main(struct-VS_INPUT-i1-vf4-i11; ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:22 move second child to first child ( temp int) -0:22 x0_out: direct index for structure ( temp int) -0:22 '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:22 Constant: -0:22 0 (const int) +0:? '@entryPointOutput.x0_out' (layout( location=0) out int) 0:22 x0_out: direct index for structure ( temp int) 0:22 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 Constant: 0:22 0 (const int) 0:22 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos_out' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) 0:22 Pos_out: direct index for structure ( temp 4-component vector of float) 0:22 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 Constant: 0:22 1 (const int) 0:22 move second child to first child ( temp int) -0:22 x1_out: direct index for structure ( temp int) -0:22 '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:22 Constant: -0:22 1 (const int) +0:? '@entryPointOutput.x1_out' (layout( location=1) out int) 0:22 x1_out: direct index for structure ( temp int) 0:22 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 Constant: 0:22 2 (const int) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:? 'x0_in' (layout( location=0) in int) -0:? 'Pos_in' (layout( location=1) in 4-component vector of float) -0:? 'x1_in' (layout( location=2) in int) +0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) +0:? '@entryPointOutput.x0_out' (layout( location=0) out int) +0:? '@entryPointOutput.x1_out' (layout( location=1) out int) +0:? 'vsin.x0_in' (layout( location=0) in int) +0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) +0:? 'vsin.x1_in' (layout( location=2) in int) Linked vertex stage: @@ -173,62 +169,58 @@ Shader version: 500 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:22 Constant: 0:22 0 (const int) -0:? 'x0_in' (layout( location=0) in int) +0:? 'vsin.x0_in' (layout( location=0) in int) 0:22 move second child to first child ( temp 4-component vector of float) 0:22 Pos_in: direct index for structure ( temp 4-component vector of float) 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:22 Constant: 0:22 1 (const int) -0:? 'Pos_in' (layout( location=1) in 4-component vector of float) +0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) 0:22 move second child to first child ( temp int) 0:22 x1_in: direct index for structure ( temp int) 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:22 Constant: 0:22 2 (const int) -0:? 'x1_in' (layout( location=2) in int) +0:? 'vsin.x1_in' (layout( location=2) in int) 0:22 Sequence 0:22 move second child to first child ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 Function Call: @main(struct-VS_INPUT-i1-vf4-i11; ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:? 'vsin' ( temp structure{ temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in}) 0:22 move second child to first child ( temp int) -0:22 x0_out: direct index for structure ( temp int) -0:22 '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:22 Constant: -0:22 0 (const int) +0:? '@entryPointOutput.x0_out' (layout( location=0) out int) 0:22 x0_out: direct index for structure ( temp int) 0:22 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 Constant: 0:22 0 (const int) 0:22 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos_out' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) 0:22 Pos_out: direct index for structure ( temp 4-component vector of float) 0:22 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 Constant: 0:22 1 (const int) 0:22 move second child to first child ( temp int) -0:22 x1_out: direct index for structure ( temp int) -0:22 '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:22 Constant: -0:22 1 (const int) +0:? '@entryPointOutput.x1_out' (layout( location=1) out int) 0:22 x1_out: direct index for structure ( temp int) 0:22 'flattenTemp' ( temp structure{ temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out}) 0:22 Constant: 0:22 2 (const int) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{ temp int x0_out, temp int x1_out}) -0:? 'x0_in' (layout( location=0) in int) -0:? 'Pos_in' (layout( location=1) in 4-component vector of float) -0:? 'x1_in' (layout( location=2) in int) +0:? '@entryPointOutput.Pos_out' ( out 4-component vector of float Position) +0:? '@entryPointOutput.x0_out' (layout( location=0) out int) +0:? '@entryPointOutput.x1_out' (layout( location=1) out int) +0:? 'vsin.x0_in' (layout( location=0) in int) +0:? 'vsin.Pos_in' (layout( location=1) in 4-component vector of float) +0:? 'vsin.x1_in' (layout( location=2) in int) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 80 +// Generated by (magic number): 80003 +// Id's are bound by 77 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 52 56 59 68 74 + EntryPoint Vertex 4 "main" 52 56 59 67 71 74 Source HLSL 500 Name 4 "main" Name 9 "VS_INPUT" @@ -248,21 +240,20 @@ Shader version: 500 Name 42 "param" Name 44 "param" Name 50 "vsin" - Name 52 "x0_in" - Name 56 "Pos_in" - Name 59 "x1_in" + Name 52 "vsin.x0_in" + Name 56 "vsin.Pos_in" + Name 59 "vsin.x1_in" Name 62 "flattenTemp" Name 63 "param" - Name 66 "VS_OUTPUT" - MemberName 66(VS_OUTPUT) 0 "x0_out" - MemberName 66(VS_OUTPUT) 1 "x1_out" - Name 68 "@entryPointOutput" - Name 74 "@entryPointOutput_Pos_out" - Decorate 52(x0_in) Location 0 - Decorate 56(Pos_in) Location 1 - Decorate 59(x1_in) Location 2 - Decorate 68(@entryPointOutput) Location 0 - Decorate 74(@entryPointOutput_Pos_out) BuiltIn Position + Name 67 "@entryPointOutput.x0_out" + Name 71 "@entryPointOutput.Pos_out" + Name 74 "@entryPointOutput.x1_out" + Decorate 52(vsin.x0_in) Location 0 + Decorate 56(vsin.Pos_in) Location 1 + Decorate 59(vsin.x1_in) Location 2 + Decorate 67(@entryPointOutput.x0_out) Location 0 + Decorate 71(@entryPointOutput.Pos_out) BuiltIn Position + Decorate 74(@entryPointOutput.x1_out) Location 1 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -280,45 +271,42 @@ Shader version: 500 31: TypePointer Function 6(int) 38: 6(int) Constant 2 51: TypePointer Input 6(int) - 52(x0_in): 51(ptr) Variable Input + 52(vsin.x0_in): 51(ptr) Variable Input 55: TypePointer Input 8(fvec4) - 56(Pos_in): 55(ptr) Variable Input - 59(x1_in): 51(ptr) Variable Input - 66(VS_OUTPUT): TypeStruct 6(int) 6(int) - 67: TypePointer Output 66(VS_OUTPUT) -68(@entryPointOutput): 67(ptr) Variable Output - 71: TypePointer Output 6(int) - 73: TypePointer Output 8(fvec4) -74(@entryPointOutput_Pos_out): 73(ptr) Variable Output + 56(vsin.Pos_in): 55(ptr) Variable Input + 59(vsin.x1_in): 51(ptr) Variable Input + 66: TypePointer Output 6(int) +67(@entryPointOutput.x0_out): 66(ptr) Variable Output + 70: TypePointer Output 8(fvec4) +71(@entryPointOutput.Pos_out): 70(ptr) Variable Output +74(@entryPointOutput.x1_out): 66(ptr) Variable Output 4(main): 2 Function None 3 5: Label 50(vsin): 10(ptr) Variable Function 62(flattenTemp): 12(ptr) Variable Function 63(param): 10(ptr) Variable Function - 53: 6(int) Load 52(x0_in) + 53: 6(int) Load 52(vsin.x0_in) 54: 31(ptr) AccessChain 50(vsin) 30 Store 54 53 - 57: 8(fvec4) Load 56(Pos_in) + 57: 8(fvec4) Load 56(vsin.Pos_in) 58: 23(ptr) AccessChain 50(vsin) 22 Store 58 57 - 60: 6(int) Load 59(x1_in) + 60: 6(int) Load 59(vsin.x1_in) 61: 31(ptr) AccessChain 50(vsin) 38 Store 61 60 64: 9(VS_INPUT) Load 50(vsin) Store 63(param) 64 65:11(VS_OUTPUT) FunctionCall 20(@main(struct-VS_INPUT-i1-vf4-i11;) 63(param) Store 62(flattenTemp) 65 - 69: 31(ptr) AccessChain 62(flattenTemp) 30 - 70: 6(int) Load 69 - 72: 71(ptr) AccessChain 68(@entryPointOutput) 30 - Store 72 70 - 75: 23(ptr) AccessChain 62(flattenTemp) 22 - 76: 8(fvec4) Load 75 - Store 74(@entryPointOutput_Pos_out) 76 - 77: 31(ptr) AccessChain 62(flattenTemp) 38 - 78: 6(int) Load 77 - 79: 71(ptr) AccessChain 68(@entryPointOutput) 22 - Store 79 78 + 68: 31(ptr) AccessChain 62(flattenTemp) 30 + 69: 6(int) Load 68 + Store 67(@entryPointOutput.x0_out) 69 + 72: 23(ptr) AccessChain 62(flattenTemp) 22 + 73: 8(fvec4) Load 72 + Store 71(@entryPointOutput.Pos_out) 73 + 75: 31(ptr) AccessChain 62(flattenTemp) 38 + 76: 6(int) Load 75 + Store 74(@entryPointOutput.x1_out) 76 Return FunctionEnd 16(Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;): 2 Function None 13 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.nested.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.nested.geom.out index 2f010f5..7ec508f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.nested.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.nested.geom.out @@ -34,42 +34,96 @@ output primitive = triangle_strip 0:? Constant: 0:? 5.000000 0:? 6.000000 -0:30 Sequence -0:30 Sequence -0:30 move second child to first child ( temp 4-component vector of float) -0:? 'ts_psIn_pos' ( out 4-component vector of float Position) -0:30 pos: direct index for structure ( temp 4-component vector of float) -0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) -0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) -0:30 Constant: -0:30 0 (const int) -0:30 Constant: -0:30 0 (const int) -0:30 move second child to first child ( temp 2-component vector of float) -0:30 tc: direct index for structure ( temp 2-component vector of float) -0:30 psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc}) -0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) -0:30 Constant: -0:30 0 (const int) -0:30 Constant: -0:30 0 (const int) -0:30 tc: direct index for structure ( temp 2-component vector of float) -0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) -0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) -0:30 Constant: -0:30 0 (const int) -0:30 Constant: -0:30 1 (const int) -0:30 move second child to first child ( temp structure{ temp 2-element array of float m0_array, temp int m1}) -0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) -0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) -0:30 Constant: -0:30 1 (const int) +0:29 move second child to first child ( temp float) +0:29 direct index ( temp float) +0:29 m0_array: direct index for structure ( temp 2-element array of float) +0:29 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) +0:29 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:29 Constant: +0:29 1 (const int) +0:29 Constant: +0:29 0 (const int) +0:29 Constant: +0:29 0 (const int) +0:29 Constant: +0:29 2.300000 +0:30 move second child to first child ( temp float) +0:30 direct index ( temp float) +0:30 m0_array: direct index for structure ( temp 2-element array of float) 0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) 0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:30 Constant: 0:30 1 (const int) -0:30 EmitVertex ( temp void) +0:30 Constant: +0:30 0 (const int) +0:30 Constant: +0:30 1 (const int) +0:30 Constant: +0:30 2.300000 +0:31 move second child to first child ( temp int) +0:31 m1: direct index for structure ( temp int) +0:31 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) +0:31 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:31 Constant: +0:31 1 (const int) +0:31 Constant: +0:31 1 (const int) +0:31 Constant: +0:31 2 (const int) +0:33 Sequence +0:33 Sequence +0:33 move second child to first child ( temp 4-component vector of float) +0:? 'ts.pos' ( out 4-component vector of float Position) +0:33 pos: direct index for structure ( temp 4-component vector of float) +0:33 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) +0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:33 Constant: +0:33 0 (const int) +0:33 Constant: +0:33 0 (const int) +0:33 move second child to first child ( temp 2-component vector of float) +0:? 'ts.psIn.tc' (layout( location=0) out 2-component vector of float) +0:33 tc: direct index for structure ( temp 2-component vector of float) +0:33 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) +0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:33 Constant: +0:33 0 (const int) +0:33 Constant: +0:33 1 (const int) +0:33 move second child to first child ( temp float) +0:? 'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float) +0:33 direct index ( temp float) +0:33 m0_array: direct index for structure ( temp 2-element array of float) +0:33 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) +0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:33 Constant: +0:33 1 (const int) +0:33 Constant: +0:33 0 (const int) +0:33 Constant: +0:33 0 (const int) +0:33 move second child to first child ( temp float) +0:? 'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float) +0:33 direct index ( temp float) +0:33 m0_array: direct index for structure ( temp 2-element array of float) +0:33 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) +0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:33 Constant: +0:33 1 (const int) +0:33 Constant: +0:33 0 (const int) +0:33 Constant: +0:33 1 (const int) +0:33 move second child to first child ( temp int) +0:? 'ts.contains_no_builtin_io.m1' (layout( location=3) out int) +0:33 m1: direct index for structure ( temp int) +0:33 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) +0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:33 Constant: +0:33 1 (const int) +0:33 Constant: +0:33 1 (const int) +0:33 EmitVertex ( temp void) 0:24 Function Definition: main( ( temp void) 0:24 Function Parameters: 0:? Sequence @@ -83,7 +137,7 @@ output primitive = triangle_strip 0:24 Constant: 0:24 0 (const int) 0:24 direct index ( in 4-component vector of float Position) -0:? 'tin_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp 2-component vector of float) @@ -110,7 +164,7 @@ output primitive = triangle_strip 0:24 Constant: 0:24 0 (const int) 0:24 direct index ( in 4-component vector of float Position) -0:? 'tin_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position) 0:24 Constant: 0:24 1 (const int) 0:24 move second child to first child ( temp 2-component vector of float) @@ -137,7 +191,7 @@ output primitive = triangle_strip 0:24 Constant: 0:24 0 (const int) 0:24 direct index ( in 4-component vector of float Position) -0:? 'tin_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position) 0:24 Constant: 0:24 2 (const int) 0:24 move second child to first child ( temp 2-component vector of float) @@ -159,8 +213,13 @@ output primitive = triangle_strip 0:? 'tin' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) 0:? 'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:? Linker Objects +0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position) 0:? 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) -0:? 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:? 'ts.pos' ( out 4-component vector of float Position) +0:? 'ts.psIn.tc' (layout( location=0) out 2-component vector of float) +0:? 'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float) +0:? 'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float) +0:? 'ts.contains_no_builtin_io.m1' (layout( location=3) out int) Linked geometry stage: @@ -201,42 +260,96 @@ output primitive = triangle_strip 0:? Constant: 0:? 5.000000 0:? 6.000000 -0:30 Sequence -0:30 Sequence -0:30 move second child to first child ( temp 4-component vector of float) -0:? 'ts_psIn_pos' ( out 4-component vector of float Position) -0:30 pos: direct index for structure ( temp 4-component vector of float) -0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) -0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) -0:30 Constant: -0:30 0 (const int) -0:30 Constant: -0:30 0 (const int) -0:30 move second child to first child ( temp 2-component vector of float) -0:30 tc: direct index for structure ( temp 2-component vector of float) -0:30 psIn: direct index for structure ( temp structure{ temp 2-component vector of float tc}) -0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) -0:30 Constant: -0:30 0 (const int) -0:30 Constant: -0:30 0 (const int) -0:30 tc: direct index for structure ( temp 2-component vector of float) -0:30 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) -0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) -0:30 Constant: -0:30 0 (const int) -0:30 Constant: -0:30 1 (const int) -0:30 move second child to first child ( temp structure{ temp 2-element array of float m0_array, temp int m1}) -0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) -0:30 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) -0:30 Constant: -0:30 1 (const int) +0:29 move second child to first child ( temp float) +0:29 direct index ( temp float) +0:29 m0_array: direct index for structure ( temp 2-element array of float) +0:29 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) +0:29 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:29 Constant: +0:29 1 (const int) +0:29 Constant: +0:29 0 (const int) +0:29 Constant: +0:29 0 (const int) +0:29 Constant: +0:29 2.300000 +0:30 move second child to first child ( temp float) +0:30 direct index ( temp float) +0:30 m0_array: direct index for structure ( temp 2-element array of float) 0:30 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) 0:30 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:30 Constant: 0:30 1 (const int) -0:30 EmitVertex ( temp void) +0:30 Constant: +0:30 0 (const int) +0:30 Constant: +0:30 1 (const int) +0:30 Constant: +0:30 2.300000 +0:31 move second child to first child ( temp int) +0:31 m1: direct index for structure ( temp int) +0:31 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) +0:31 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:31 Constant: +0:31 1 (const int) +0:31 Constant: +0:31 1 (const int) +0:31 Constant: +0:31 2 (const int) +0:33 Sequence +0:33 Sequence +0:33 move second child to first child ( temp 4-component vector of float) +0:? 'ts.pos' ( out 4-component vector of float Position) +0:33 pos: direct index for structure ( temp 4-component vector of float) +0:33 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) +0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:33 Constant: +0:33 0 (const int) +0:33 Constant: +0:33 0 (const int) +0:33 move second child to first child ( temp 2-component vector of float) +0:? 'ts.psIn.tc' (layout( location=0) out 2-component vector of float) +0:33 tc: direct index for structure ( temp 2-component vector of float) +0:33 psIn: direct index for structure ( temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) +0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:33 Constant: +0:33 0 (const int) +0:33 Constant: +0:33 1 (const int) +0:33 move second child to first child ( temp float) +0:? 'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float) +0:33 direct index ( temp float) +0:33 m0_array: direct index for structure ( temp 2-element array of float) +0:33 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) +0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:33 Constant: +0:33 1 (const int) +0:33 Constant: +0:33 0 (const int) +0:33 Constant: +0:33 0 (const int) +0:33 move second child to first child ( temp float) +0:? 'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float) +0:33 direct index ( temp float) +0:33 m0_array: direct index for structure ( temp 2-element array of float) +0:33 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) +0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:33 Constant: +0:33 1 (const int) +0:33 Constant: +0:33 0 (const int) +0:33 Constant: +0:33 1 (const int) +0:33 move second child to first child ( temp int) +0:? 'ts.contains_no_builtin_io.m1' (layout( location=3) out int) +0:33 m1: direct index for structure ( temp int) +0:33 contains_no_builtin_io: direct index for structure ( temp structure{ temp 2-element array of float m0_array, temp int m1}) +0:33 'o' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:33 Constant: +0:33 1 (const int) +0:33 Constant: +0:33 1 (const int) +0:33 EmitVertex ( temp void) 0:24 Function Definition: main( ( temp void) 0:24 Function Parameters: 0:? Sequence @@ -250,7 +363,7 @@ output primitive = triangle_strip 0:24 Constant: 0:24 0 (const int) 0:24 direct index ( in 4-component vector of float Position) -0:? 'tin_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position) 0:24 Constant: 0:24 0 (const int) 0:24 move second child to first child ( temp 2-component vector of float) @@ -277,7 +390,7 @@ output primitive = triangle_strip 0:24 Constant: 0:24 0 (const int) 0:24 direct index ( in 4-component vector of float Position) -0:? 'tin_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position) 0:24 Constant: 0:24 1 (const int) 0:24 move second child to first child ( temp 2-component vector of float) @@ -304,7 +417,7 @@ output primitive = triangle_strip 0:24 Constant: 0:24 0 (const int) 0:24 direct index ( in 4-component vector of float Position) -0:? 'tin_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position) 0:24 Constant: 0:24 2 (const int) 0:24 move second child to first child ( temp 2-component vector of float) @@ -326,17 +439,22 @@ output primitive = triangle_strip 0:? 'tin' ( temp 3-element array of structure{ temp 4-component vector of float pos, temp 2-component vector of float tc}) 0:? 'ts' ( temp structure{ temp structure{ temp 4-component vector of float pos, temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) 0:? Linker Objects +0:? 'tin.pos' ( in 3-element array of 4-component vector of float Position) 0:? 'tin' (layout( location=0) in 3-element array of structure{ temp 2-component vector of float tc}) -0:? 'ts' (layout( location=0) out structure{ temp structure{ temp 2-component vector of float tc} psIn, temp structure{ temp 2-element array of float m0_array, temp int m1} contains_no_builtin_io}) +0:? 'ts.pos' ( out 4-component vector of float Position) +0:? 'ts.psIn.tc' (layout( location=0) out 2-component vector of float) +0:? 'ts.contains_no_builtin_io.m0_array[0]' (layout( location=1) out float) +0:? 'ts.contains_no_builtin_io.m0_array[1]' (layout( location=2) out float) +0:? 'ts.contains_no_builtin_io.m1' (layout( location=3) out int) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 99 +// Generated by (magic number): 80003 +// Id's are bound by 100 Capability Geometry 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 4 "main" 41 48 67 75 + EntryPoint Geometry 4 "main" 48 52 56 59 63 69 77 ExecutionMode 4 Triangles ExecutionMode 4 Invocations 1 ExecutionMode 4 OutputTriangleStrip @@ -356,28 +474,26 @@ output primitive = triangle_strip Name 21 "tin" Name 22 "ts" Name 25 "o" - Name 41 "ts_psIn_pos" - Name 44 "PS_IN" - MemberName 44(PS_IN) 0 "tc" - Name 45 "STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO" - MemberName 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 0 "m0_array" - MemberName 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) 1 "m1" - Name 46 "GS_OUT" - MemberName 46(GS_OUT) 0 "psIn" - MemberName 46(GS_OUT) 1 "contains_no_builtin_io" - Name 48 "ts" - Name 64 "tin" - Name 67 "tin_pos" - Name 72 "PS_IN" - MemberName 72(PS_IN) 0 "tc" - Name 75 "tin" - Name 93 "ts" - Name 94 "param" - Name 96 "param" - Decorate 41(ts_psIn_pos) BuiltIn Position - Decorate 48(ts) Location 0 - Decorate 67(tin_pos) BuiltIn Position - Decorate 75(tin) Location 0 + Name 48 "ts.pos" + Name 52 "ts.psIn.tc" + Name 56 "ts.contains_no_builtin_io.m0_array[0]" + Name 59 "ts.contains_no_builtin_io.m0_array[1]" + Name 63 "ts.contains_no_builtin_io.m1" + Name 66 "tin" + Name 69 "tin.pos" + Name 74 "PS_IN" + MemberName 74(PS_IN) 0 "tc" + Name 77 "tin" + Name 94 "ts" + Name 95 "param" + Name 97 "param" + Decorate 48(ts.pos) BuiltIn Position + Decorate 52(ts.psIn.tc) Location 0 + Decorate 56(ts.contains_no_builtin_io.m0_array[0]) Location 1 + Decorate 59(ts.contains_no_builtin_io.m0_array[1]) Location 2 + Decorate 63(ts.contains_no_builtin_io.m1) Location 3 + Decorate 69(tin.pos) BuiltIn Position + Decorate 77(tin) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -407,63 +523,63 @@ output primitive = triangle_strip 36: 6(float) Constant 1086324736 37: 8(fvec2) ConstantComposite 35 36 38: TypePointer Function 8(fvec2) - 40: TypePointer Output 7(fvec4) - 41(ts_psIn_pos): 40(ptr) Variable Output - 44(PS_IN): TypeStruct 8(fvec2) -45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO): TypeStruct 15 16(int) - 46(GS_OUT): TypeStruct 44(PS_IN) 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) - 47: TypePointer Output 46(GS_OUT) - 48(ts): 47(ptr) Variable Output + 40: 6(float) Constant 1075000115 + 41: TypePointer Function 6(float) + 44: 16(int) Constant 2 + 45: TypePointer Function 16(int) + 47: TypePointer Output 7(fvec4) + 48(ts.pos): 47(ptr) Variable Output 51: TypePointer Output 8(fvec2) - 53: TypePointer Function 17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) - 56: TypePointer Output 45(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) - 59: TypePointer Output 15 + 52(ts.psIn.tc): 51(ptr) Variable Output + 55: TypePointer Output 6(float) +56(ts.contains_no_builtin_io.m0_array[0]): 55(ptr) Variable Output +59(ts.contains_no_builtin_io.m0_array[1]): 55(ptr) Variable Output 62: TypePointer Output 16(int) - 65: TypeArray 7(fvec4) 11 - 66: TypePointer Input 65 - 67(tin_pos): 66(ptr) Variable Input - 68: TypePointer Input 7(fvec4) - 72(PS_IN): TypeStruct 8(fvec2) - 73: TypeArray 72(PS_IN) 11 - 74: TypePointer Input 73 - 75(tin): 74(ptr) Variable Input - 76: TypePointer Input 8(fvec2) - 86: 16(int) Constant 2 +63(ts.contains_no_builtin_io.m1): 62(ptr) Variable Output + 67: TypeArray 7(fvec4) 11 + 68: TypePointer Input 67 + 69(tin.pos): 68(ptr) Variable Input + 70: TypePointer Input 7(fvec4) + 74(PS_IN): TypeStruct 8(fvec2) + 75: TypeArray 74(PS_IN) 11 + 76: TypePointer Input 75 + 77(tin): 76(ptr) Variable Input + 78: TypePointer Input 8(fvec2) 4(main): 2 Function None 3 5: Label - 64(tin): 13(ptr) Variable Function - 93(ts): 19(ptr) Variable Function - 94(param): 13(ptr) Variable Function - 96(param): 19(ptr) Variable Function - 69: 68(ptr) AccessChain 67(tin_pos) 26 - 70: 7(fvec4) Load 69 - 71: 32(ptr) AccessChain 64(tin) 26 26 - Store 71 70 - 77: 76(ptr) AccessChain 75(tin) 26 26 - 78: 8(fvec2) Load 77 - 79: 38(ptr) AccessChain 64(tin) 26 34 - Store 79 78 - 80: 68(ptr) AccessChain 67(tin_pos) 34 - 81: 7(fvec4) Load 80 - 82: 32(ptr) AccessChain 64(tin) 34 26 - Store 82 81 - 83: 76(ptr) AccessChain 75(tin) 34 26 - 84: 8(fvec2) Load 83 - 85: 38(ptr) AccessChain 64(tin) 34 34 - Store 85 84 - 87: 68(ptr) AccessChain 67(tin_pos) 86 - 88: 7(fvec4) Load 87 - 89: 32(ptr) AccessChain 64(tin) 86 26 - Store 89 88 - 90: 76(ptr) AccessChain 75(tin) 86 26 - 91: 8(fvec2) Load 90 - 92: 38(ptr) AccessChain 64(tin) 86 34 - Store 92 91 - 95: 12 Load 64(tin) - Store 94(param) 95 - 97: 2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 94(param) 96(param) - 98: 18(GS_OUT) Load 96(param) - Store 93(ts) 98 + 66(tin): 13(ptr) Variable Function + 94(ts): 19(ptr) Variable Function + 95(param): 13(ptr) Variable Function + 97(param): 19(ptr) Variable Function + 71: 70(ptr) AccessChain 69(tin.pos) 26 + 72: 7(fvec4) Load 71 + 73: 32(ptr) AccessChain 66(tin) 26 26 + Store 73 72 + 79: 78(ptr) AccessChain 77(tin) 26 26 + 80: 8(fvec2) Load 79 + 81: 38(ptr) AccessChain 66(tin) 26 34 + Store 81 80 + 82: 70(ptr) AccessChain 69(tin.pos) 34 + 83: 7(fvec4) Load 82 + 84: 32(ptr) AccessChain 66(tin) 34 26 + Store 84 83 + 85: 78(ptr) AccessChain 77(tin) 34 26 + 86: 8(fvec2) Load 85 + 87: 38(ptr) AccessChain 66(tin) 34 34 + Store 87 86 + 88: 70(ptr) AccessChain 69(tin.pos) 44 + 89: 7(fvec4) Load 88 + 90: 32(ptr) AccessChain 66(tin) 44 26 + Store 90 89 + 91: 78(ptr) AccessChain 77(tin) 44 26 + 92: 8(fvec2) Load 91 + 93: 38(ptr) AccessChain 66(tin) 44 34 + Store 93 92 + 96: 12 Load 66(tin) + Store 95(param) 96 + 98: 2 FunctionCall 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;) 95(param) 97(param) + 99: 18(GS_OUT) Load 97(param) + Store 94(ts) 99 Return FunctionEnd 23(@main(struct-PS_IN-vf4-vf21[3];struct-GS_OUT-struct-PS_IN-vf4-vf21-struct-STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO-f1[2]-i111;): 2 Function None 20 @@ -475,22 +591,27 @@ output primitive = triangle_strip Store 33 31 39: 38(ptr) AccessChain 25(o) 26 34 Store 39 37 - 42: 32(ptr) AccessChain 25(o) 26 26 - 43: 7(fvec4) Load 42 - Store 41(ts_psIn_pos) 43 - 49: 38(ptr) AccessChain 25(o) 26 34 - 50: 8(fvec2) Load 49 - 52: 51(ptr) AccessChain 48(ts) 26 26 - Store 52 50 - 54: 53(ptr) AccessChain 25(o) 34 - 55:17(STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO) Load 54 - 57: 56(ptr) AccessChain 48(ts) 34 - 58: 15 CompositeExtract 55 0 - 60: 59(ptr) AccessChain 57 26 - Store 60 58 - 61: 16(int) CompositeExtract 55 1 - 63: 62(ptr) AccessChain 57 34 - Store 63 61 + 42: 41(ptr) AccessChain 25(o) 34 26 26 + Store 42 40 + 43: 41(ptr) AccessChain 25(o) 34 26 34 + Store 43 40 + 46: 45(ptr) AccessChain 25(o) 34 34 + Store 46 44 + 49: 32(ptr) AccessChain 25(o) 26 26 + 50: 7(fvec4) Load 49 + Store 48(ts.pos) 50 + 53: 38(ptr) AccessChain 25(o) 26 34 + 54: 8(fvec2) Load 53 + Store 52(ts.psIn.tc) 54 + 57: 41(ptr) AccessChain 25(o) 34 26 26 + 58: 6(float) Load 57 + Store 56(ts.contains_no_builtin_io.m0_array[0]) 58 + 60: 41(ptr) AccessChain 25(o) 34 26 34 + 61: 6(float) Load 60 + Store 59(ts.contains_no_builtin_io.m0_array[1]) 61 + 64: 45(ptr) AccessChain 25(o) 34 34 + 65: 16(int) Load 64 + Store 63(ts.contains_no_builtin_io.m1) 65 EmitVertex Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.trivial.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.trivial.geom.out index c552675..79dd1d5 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.trivial.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.trivial.geom.out @@ -37,7 +37,7 @@ output primitive = triangle_strip 0:19 Sequence 0:19 Sequence 0:19 move second child to first child ( temp 4-component vector of float) -0:? 'ts_pos' ( out 4-component vector of float Position) +0:? 'ts.pos' ( out 4-component vector of float Position) 0:19 pos: direct index for structure ( temp 4-component vector of float) 0:19 'o' ( temp structure{ temp 4-component vector of float pos}) 0:19 Constant: @@ -59,7 +59,7 @@ output primitive = triangle_strip 0:14 Constant: 0:14 0 (const int) 0:14 direct index ( in 4-component vector of float Position) -0:? 'i_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'i.pos' ( in 3-element array of 4-component vector of float Position) 0:14 Constant: 0:14 0 (const int) 0:14 move second child to first child ( temp 4-component vector of float) @@ -71,7 +71,7 @@ output primitive = triangle_strip 0:14 Constant: 0:14 0 (const int) 0:14 direct index ( in 4-component vector of float Position) -0:? 'i_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'i.pos' ( in 3-element array of 4-component vector of float Position) 0:14 Constant: 0:14 1 (const int) 0:14 move second child to first child ( temp 4-component vector of float) @@ -83,15 +83,15 @@ output primitive = triangle_strip 0:14 Constant: 0:14 0 (const int) 0:14 direct index ( in 4-component vector of float Position) -0:? 'i_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'i.pos' ( in 3-element array of 4-component vector of float Position) 0:14 Constant: 0:14 2 (const int) 0:14 Function Call: @main(struct-PS_IN-vf41[3];struct-GS_OUT-vf41; ( temp void) 0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos}) 0:? 'ts' ( temp structure{ temp 4-component vector of float pos}) 0:? Linker Objects -0:? 'i' (layout( location=0) in 3-element array of structure{}) -0:? 'ts' (layout( location=0) out structure{}) +0:? 'i.pos' ( in 3-element array of 4-component vector of float Position) +0:? 'ts.pos' ( out 4-component vector of float Position) Linked geometry stage: @@ -135,7 +135,7 @@ output primitive = triangle_strip 0:19 Sequence 0:19 Sequence 0:19 move second child to first child ( temp 4-component vector of float) -0:? 'ts_pos' ( out 4-component vector of float Position) +0:? 'ts.pos' ( out 4-component vector of float Position) 0:19 pos: direct index for structure ( temp 4-component vector of float) 0:19 'o' ( temp structure{ temp 4-component vector of float pos}) 0:19 Constant: @@ -157,7 +157,7 @@ output primitive = triangle_strip 0:14 Constant: 0:14 0 (const int) 0:14 direct index ( in 4-component vector of float Position) -0:? 'i_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'i.pos' ( in 3-element array of 4-component vector of float Position) 0:14 Constant: 0:14 0 (const int) 0:14 move second child to first child ( temp 4-component vector of float) @@ -169,7 +169,7 @@ output primitive = triangle_strip 0:14 Constant: 0:14 0 (const int) 0:14 direct index ( in 4-component vector of float Position) -0:? 'i_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'i.pos' ( in 3-element array of 4-component vector of float Position) 0:14 Constant: 0:14 1 (const int) 0:14 move second child to first child ( temp 4-component vector of float) @@ -181,24 +181,24 @@ output primitive = triangle_strip 0:14 Constant: 0:14 0 (const int) 0:14 direct index ( in 4-component vector of float Position) -0:? 'i_pos' ( in 3-element array of 4-component vector of float Position) +0:? 'i.pos' ( in 3-element array of 4-component vector of float Position) 0:14 Constant: 0:14 2 (const int) 0:14 Function Call: @main(struct-PS_IN-vf41[3];struct-GS_OUT-vf41; ( temp void) 0:? 'i' ( temp 3-element array of structure{ temp 4-component vector of float pos}) 0:? 'ts' ( temp structure{ temp 4-component vector of float pos}) 0:? Linker Objects -0:? 'i' (layout( location=0) in 3-element array of structure{}) -0:? 'ts' (layout( location=0) out structure{}) +0:? 'i.pos' ( in 3-element array of 4-component vector of float Position) +0:? 'ts.pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 74 +// Generated by (magic number): 80003 +// Id's are bound by 67 Capability Geometry 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 4 "main" 40 49 70 73 + EntryPoint Geometry 4 "main" 40 49 ExecutionMode 4 Triangles ExecutionMode 4 Invocations 1 ExecutionMode 4 OutputTriangleStrip @@ -214,20 +214,14 @@ output primitive = triangle_strip Name 17 "ts" Name 22 "x" Name 33 "o" - Name 40 "ts_pos" + Name 40 "ts.pos" Name 46 "i" - Name 49 "i_pos" + Name 49 "i.pos" Name 61 "ts" Name 62 "param" Name 64 "param" - Name 67 "PS_IN" - Name 70 "i" - Name 71 "GS_OUT" - Name 73 "ts" - Decorate 40(ts_pos) BuiltIn Position - Decorate 49(i_pos) BuiltIn Position - Decorate 70(i) Location 0 - Decorate 73(ts) Location 0 + Decorate 40(ts.pos) BuiltIn Position + Decorate 49(i.pos) BuiltIn Position 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -247,35 +241,28 @@ output primitive = triangle_strip 31: TypeBool 35: TypePointer Function 7(fvec4) 39: TypePointer Output 7(fvec4) - 40(ts_pos): 39(ptr) Variable Output + 40(ts.pos): 39(ptr) Variable Output 44: 20(int) Constant 1 47: TypeArray 7(fvec4) 10 48: TypePointer Input 47 - 49(i_pos): 48(ptr) Variable Input + 49(i.pos): 48(ptr) Variable Input 50: TypePointer Input 7(fvec4) 57: 20(int) Constant 2 - 67(PS_IN): TypeStruct - 68: TypeArray 67(PS_IN) 10 - 69: TypePointer Input 68 - 70(i): 69(ptr) Variable Input - 71(GS_OUT): TypeStruct - 72: TypePointer Output 71(GS_OUT) - 73(ts): 72(ptr) Variable Output 4(main): 2 Function None 3 5: Label 46(i): 12(ptr) Variable Function 61(ts): 14(ptr) Variable Function 62(param): 12(ptr) Variable Function 64(param): 14(ptr) Variable Function - 51: 50(ptr) AccessChain 49(i_pos) 23 + 51: 50(ptr) AccessChain 49(i.pos) 23 52: 7(fvec4) Load 51 53: 35(ptr) AccessChain 46(i) 23 23 Store 53 52 - 54: 50(ptr) AccessChain 49(i_pos) 44 + 54: 50(ptr) AccessChain 49(i.pos) 44 55: 7(fvec4) Load 54 56: 35(ptr) AccessChain 46(i) 44 23 Store 56 55 - 58: 50(ptr) AccessChain 49(i_pos) 57 + 58: 50(ptr) AccessChain 49(i.pos) 57 59: 7(fvec4) Load 58 60: 35(ptr) AccessChain 46(i) 57 23 Store 60 59 @@ -309,7 +296,7 @@ output primitive = triangle_strip Store 38 37 41: 35(ptr) AccessChain 33(o) 23 42: 7(fvec4) Load 41 - Store 40(ts_pos) 42 + Store 40(ts.pos) 42 EmitVertex Branch 27 27: Label diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.trivial.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.trivial.vert.out index 05dcb26..0c98e6f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.trivial.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.struct.split.trivial.vert.out @@ -28,13 +28,13 @@ Shader version: 500 0:? 'vsin' ( temp structure{ temp 4-component vector of float Pos_in}) 0:16 Constant: 0:16 0 (const int) -0:? 'Pos_in' (layout( location=0) in 4-component vector of float) +0:? 'vsin.Pos_in' (layout( location=0) in 4-component vector of float) 0:16 move second child to first child ( temp 4-component vector of float) 0:? 'Pos_loose' ( temp 4-component vector of float) 0:? 'Pos_loose' (layout( location=1) in 4-component vector of float) 0:16 Sequence 0:16 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:16 Pos: direct index for structure ( temp 4-component vector of float) 0:16 Function Call: @main(struct-VS_INPUT-vf41;vf4; ( temp structure{ temp 4-component vector of float Pos}) 0:? 'vsin' ( temp structure{ temp 4-component vector of float Pos_in}) @@ -42,8 +42,8 @@ Shader version: 500 0:16 Constant: 0:16 0 (const int) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{}) -0:? 'Pos_in' (layout( location=0) in 4-component vector of float) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) +0:? 'vsin.Pos_in' (layout( location=0) in 4-component vector of float) 0:? 'Pos_loose' (layout( location=1) in 4-component vector of float) @@ -79,13 +79,13 @@ Shader version: 500 0:? 'vsin' ( temp structure{ temp 4-component vector of float Pos_in}) 0:16 Constant: 0:16 0 (const int) -0:? 'Pos_in' (layout( location=0) in 4-component vector of float) +0:? 'vsin.Pos_in' (layout( location=0) in 4-component vector of float) 0:16 move second child to first child ( temp 4-component vector of float) 0:? 'Pos_loose' ( temp 4-component vector of float) 0:? 'Pos_loose' (layout( location=1) in 4-component vector of float) 0:16 Sequence 0:16 move second child to first child ( temp 4-component vector of float) -0:? '@entryPointOutput_Pos' ( out 4-component vector of float Position) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) 0:16 Pos: direct index for structure ( temp 4-component vector of float) 0:16 Function Call: @main(struct-VS_INPUT-vf41;vf4; ( temp structure{ temp 4-component vector of float Pos}) 0:? 'vsin' ( temp structure{ temp 4-component vector of float Pos_in}) @@ -93,18 +93,18 @@ Shader version: 500 0:16 Constant: 0:16 0 (const int) 0:? Linker Objects -0:? '@entryPointOutput' (layout( location=0) out structure{}) -0:? 'Pos_in' (layout( location=0) in 4-component vector of float) +0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) +0:? 'vsin.Pos_in' (layout( location=0) in 4-component vector of float) 0:? 'Pos_loose' (layout( location=1) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 48 +// Generated by (magic number): 80003 +// Id's are bound by 45 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 31 35 38 47 + EntryPoint Vertex 4 "main" 31 35 38 Source HLSL 500 Name 4 "main" Name 8 "VS_INPUT" @@ -116,18 +116,15 @@ Shader version: 500 Name 14 "Pos_loose" Name 18 "vsout" Name 29 "vsin" - Name 31 "Pos_in" + Name 31 "vsin.Pos_in" Name 34 "Pos_loose" Name 35 "Pos_loose" - Name 38 "@entryPointOutput_Pos" + Name 38 "@entryPointOutput.Pos" Name 39 "param" Name 41 "param" - Name 45 "VS_OUTPUT" - Name 47 "@entryPointOutput" - Decorate 31(Pos_in) Location 0 + Decorate 31(vsin.Pos_in) Location 0 Decorate 35(Pos_loose) Location 1 - Decorate 38(@entryPointOutput_Pos) BuiltIn Position - Decorate 47(@entryPointOutput) Location 0 + Decorate 38(@entryPointOutput.Pos) BuiltIn Position 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -141,20 +138,17 @@ Shader version: 500 19: TypeInt 32 1 20: 19(int) Constant 0 30: TypePointer Input 7(fvec4) - 31(Pos_in): 30(ptr) Variable Input + 31(vsin.Pos_in): 30(ptr) Variable Input 35(Pos_loose): 30(ptr) Variable Input 37: TypePointer Output 7(fvec4) -38(@entryPointOutput_Pos): 37(ptr) Variable Output - 45(VS_OUTPUT): TypeStruct - 46: TypePointer Output 45(VS_OUTPUT) -47(@entryPointOutput): 46(ptr) Variable Output +38(@entryPointOutput.Pos): 37(ptr) Variable Output 4(main): 2 Function None 3 5: Label 29(vsin): 9(ptr) Variable Function 34(Pos_loose): 10(ptr) Variable Function 39(param): 9(ptr) Variable Function 41(param): 10(ptr) Variable Function - 32: 7(fvec4) Load 31(Pos_in) + 32: 7(fvec4) Load 31(vsin.Pos_in) 33: 10(ptr) AccessChain 29(vsin) 20 Store 33 32 36: 7(fvec4) Load 35(Pos_loose) @@ -165,7 +159,7 @@ Shader version: 500 Store 41(param) 42 43:11(VS_OUTPUT) FunctionCall 15(@main(struct-VS_INPUT-vf41;vf4;) 39(param) 41(param) 44: 7(fvec4) CompositeExtract 43 0 - Store 38(@entryPointOutput_Pos) 44 + Store 38(@entryPointOutput.Pos) 44 Return FunctionEnd 15(@main(struct-VS_INPUT-vf41;vf4;):11(VS_OUTPUT) Function None 12 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structIoFourWay.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structIoFourWay.frag.out index cb26bb0..6147703 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structIoFourWay.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structIoFourWay.frag.out @@ -12,46 +12,71 @@ using depth_greater 0:15 Function Definition: main( ( temp void) 0:15 Function Parameters: 0:? Sequence -0:15 move second child to first child ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) -0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) -0:? 't' (layout( location=0) in structure{ temp float f, centroid temp float g, temp float d, temp 4-component vector of float normal}) +0:15 Sequence +0:15 move second child to first child ( temp float) +0:15 f: direct index for structure ( temp float) +0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) +0:15 Constant: +0:15 0 (const int) +0:? 't.f' (layout( location=0) in float) +0:15 move second child to first child ( temp float) +0:15 g: direct index for structure ( temp float) +0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) +0:15 Constant: +0:15 1 (const int) +0:? 't.g' (layout( location=1) centroid in float) +0:15 move second child to first child ( temp float) +0:15 d: direct index for structure ( temp float) +0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) +0:15 Constant: +0:15 2 (const int) +0:? 't.d' (layout( location=2) in float) +0:15 move second child to first child ( temp 4-component vector of float) +0:15 normal: direct index for structure ( temp 4-component vector of float) +0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) +0:15 Constant: +0:15 3 (const int) +0:? 't.normal' (layout( location=3) in 4-component vector of float) 0:15 Sequence 0:15 move second child to first child ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 'flattenTemp' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 Function Call: @main(struct-T-f1-f1-f1-vf41; ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 move second child to first child ( temp float) -0:? 'f' (layout( location=0) out float) +0:? '@entryPointOutput.f' (layout( location=0) out float) 0:15 f: direct index for structure ( temp float) 0:15 'flattenTemp' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 Constant: 0:15 0 (const int) 0:15 move second child to first child ( temp float) -0:? 'g' (layout( location=1) out float) +0:? '@entryPointOutput.g' (layout( location=1) out float) 0:15 g: direct index for structure ( temp float) 0:15 'flattenTemp' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 Constant: 0:15 1 (const int) 0:15 move second child to first child ( temp float) -0:? 'd' ( out float FragDepth) +0:? '@entryPointOutput.d' ( out float FragDepth) 0:15 d: direct index for structure ( temp float) 0:15 'flattenTemp' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 Constant: 0:15 2 (const int) 0:15 move second child to first child ( temp 4-component vector of float) -0:? 'normal' (layout( location=2) out 4-component vector of float) +0:? '@entryPointOutput.normal' (layout( location=2) out 4-component vector of float) 0:15 normal: direct index for structure ( temp 4-component vector of float) 0:15 'flattenTemp' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 Constant: 0:15 3 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform structure{layout( offset=68) temp float f, temp float g, temp float d, temp 4-component vector of float normal} s}) -0:? 'anon@1' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal} t}) -0:? 'f' (layout( location=0) out float) -0:? 'g' (layout( location=1) out float) -0:? 'd' ( out float FragDepth) -0:? 'normal' (layout( location=2) out 4-component vector of float) -0:? 't' (layout( location=0) in structure{ temp float f, centroid temp float g, temp float d, temp 4-component vector of float normal}) +0:? 'anon@1' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{layout( offset=68) temp float f, temp float g, temp float d, temp 4-component vector of float normal} t}) +0:? '@entryPointOutput.d' ( out float FragDepth) +0:? '@entryPointOutput.f' (layout( location=0) out float) +0:? '@entryPointOutput.g' (layout( location=1) out float) +0:? '@entryPointOutput.normal' (layout( location=2) out 4-component vector of float) +0:? 't.f' (layout( location=0) in float) +0:? 't.g' (layout( location=1) centroid in float) +0:? 't.d' (layout( location=2) in float) +0:? 't.normal' (layout( location=3) in 4-component vector of float) Linked fragment stage: @@ -70,55 +95,80 @@ using depth_greater 0:15 Function Definition: main( ( temp void) 0:15 Function Parameters: 0:? Sequence -0:15 move second child to first child ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) -0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) -0:? 't' (layout( location=0) in structure{ temp float f, centroid temp float g, temp float d, temp 4-component vector of float normal}) +0:15 Sequence +0:15 move second child to first child ( temp float) +0:15 f: direct index for structure ( temp float) +0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) +0:15 Constant: +0:15 0 (const int) +0:? 't.f' (layout( location=0) in float) +0:15 move second child to first child ( temp float) +0:15 g: direct index for structure ( temp float) +0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) +0:15 Constant: +0:15 1 (const int) +0:? 't.g' (layout( location=1) centroid in float) +0:15 move second child to first child ( temp float) +0:15 d: direct index for structure ( temp float) +0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) +0:15 Constant: +0:15 2 (const int) +0:? 't.d' (layout( location=2) in float) +0:15 move second child to first child ( temp 4-component vector of float) +0:15 normal: direct index for structure ( temp 4-component vector of float) +0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) +0:15 Constant: +0:15 3 (const int) +0:? 't.normal' (layout( location=3) in 4-component vector of float) 0:15 Sequence 0:15 move second child to first child ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 'flattenTemp' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 Function Call: @main(struct-T-f1-f1-f1-vf41; ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:? 't' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 move second child to first child ( temp float) -0:? 'f' (layout( location=0) out float) +0:? '@entryPointOutput.f' (layout( location=0) out float) 0:15 f: direct index for structure ( temp float) 0:15 'flattenTemp' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 Constant: 0:15 0 (const int) 0:15 move second child to first child ( temp float) -0:? 'g' (layout( location=1) out float) +0:? '@entryPointOutput.g' (layout( location=1) out float) 0:15 g: direct index for structure ( temp float) 0:15 'flattenTemp' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 Constant: 0:15 1 (const int) 0:15 move second child to first child ( temp float) -0:? 'd' ( out float FragDepth) +0:? '@entryPointOutput.d' ( out float FragDepth) 0:15 d: direct index for structure ( temp float) 0:15 'flattenTemp' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 Constant: 0:15 2 (const int) 0:15 move second child to first child ( temp 4-component vector of float) -0:? 'normal' (layout( location=2) out 4-component vector of float) +0:? '@entryPointOutput.normal' (layout( location=2) out 4-component vector of float) 0:15 normal: direct index for structure ( temp 4-component vector of float) 0:15 'flattenTemp' ( temp structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal}) 0:15 Constant: 0:15 3 (const int) 0:? Linker Objects 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform structure{layout( offset=68) temp float f, temp float g, temp float d, temp 4-component vector of float normal} s}) -0:? 'anon@1' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal} t}) -0:? 'f' (layout( location=0) out float) -0:? 'g' (layout( location=1) out float) -0:? 'd' ( out float FragDepth) -0:? 'normal' (layout( location=2) out 4-component vector of float) -0:? 't' (layout( location=0) in structure{ temp float f, centroid temp float g, temp float d, temp 4-component vector of float normal}) +0:? 'anon@1' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{layout( offset=68) temp float f, temp float g, temp float d, temp 4-component vector of float normal} t}) +0:? '@entryPointOutput.d' ( out float FragDepth) +0:? '@entryPointOutput.f' (layout( location=0) out float) +0:? '@entryPointOutput.g' (layout( location=1) out float) +0:? '@entryPointOutput.normal' (layout( location=2) out 4-component vector of float) +0:? 't.f' (layout( location=0) in float) +0:? 't.g' (layout( location=1) centroid in float) +0:? 't.d' (layout( location=2) in float) +0:? 't.normal' (layout( location=3) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 64 +// Generated by (magic number): 80003 +// Id's are bound by 65 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 21 43 46 49 53 + EntryPoint Fragment 4 "main" 22 27 31 36 45 48 51 55 ExecutionMode 4 OriginUpperLeft ExecutionMode 4 DepthGreater Source HLSL 500 @@ -132,54 +182,46 @@ using depth_greater Name 11 "t" Name 14 "local" Name 18 "t" - Name 19 "T" - MemberName 19(T) 0 "f" - MemberName 19(T) 1 "g" - MemberName 19(T) 2 "d" - MemberName 19(T) 3 "normal" - Name 21 "t" - Name 38 "flattenTemp" - Name 39 "param" - Name 43 "f" - Name 46 "g" - Name 49 "d" - Name 53 "normal" - Name 56 "T" - MemberName 56(T) 0 "f" - MemberName 56(T) 1 "g" - MemberName 56(T) 2 "d" - MemberName 56(T) 3 "normal" - Name 57 "$Global" - MemberName 57($Global) 0 "s" - Name 59 "" - Name 60 "T" - MemberName 60(T) 0 "f" - MemberName 60(T) 1 "g" - MemberName 60(T) 2 "d" - MemberName 60(T) 3 "normal" - Name 61 "buff" - MemberName 61(buff) 0 "t" - Name 63 "" - MemberDecorate 19(T) 1 Centroid - Decorate 21(t) Location 0 - Decorate 43(f) Location 0 - Decorate 46(g) Location 1 - Decorate 49(d) BuiltIn FragDepth - Decorate 53(normal) Location 2 - MemberDecorate 56(T) 0 Offset 68 - MemberDecorate 56(T) 1 Offset 72 - MemberDecorate 56(T) 2 Offset 76 - MemberDecorate 56(T) 3 Offset 80 - MemberDecorate 57($Global) 0 Offset 0 - Decorate 57($Global) Block - Decorate 59 DescriptorSet 0 - MemberDecorate 60(T) 0 Offset 0 - MemberDecorate 60(T) 1 Offset 4 - MemberDecorate 60(T) 2 Offset 8 - MemberDecorate 60(T) 3 Offset 16 - MemberDecorate 61(buff) 0 Offset 96 - Decorate 61(buff) Block - Decorate 63 DescriptorSet 0 + Name 22 "t.f" + Name 27 "t.g" + Name 31 "t.d" + Name 36 "t.normal" + Name 40 "flattenTemp" + Name 41 "param" + Name 45 "@entryPointOutput.f" + Name 48 "@entryPointOutput.g" + Name 51 "@entryPointOutput.d" + Name 55 "@entryPointOutput.normal" + Name 58 "T" + MemberName 58(T) 0 "f" + MemberName 58(T) 1 "g" + MemberName 58(T) 2 "d" + MemberName 58(T) 3 "normal" + Name 59 "$Global" + MemberName 59($Global) 0 "s" + Name 61 "" + Name 62 "buff" + MemberName 62(buff) 0 "t" + Name 64 "" + Decorate 22(t.f) Location 0 + Decorate 27(t.g) Centroid + Decorate 27(t.g) Location 1 + Decorate 31(t.d) Location 2 + Decorate 36(t.normal) Location 3 + Decorate 45(@entryPointOutput.f) Location 0 + Decorate 48(@entryPointOutput.g) Location 1 + Decorate 51(@entryPointOutput.d) BuiltIn FragDepth + Decorate 55(@entryPointOutput.normal) Location 2 + MemberDecorate 58(T) 0 Offset 68 + MemberDecorate 58(T) 1 Offset 72 + MemberDecorate 58(T) 2 Offset 76 + MemberDecorate 58(T) 3 Offset 80 + MemberDecorate 59($Global) 0 Offset 0 + Decorate 59($Global) Block + Decorate 61 DescriptorSet 0 + MemberDecorate 62(buff) 0 Offset 96 + Decorate 62(buff) Block + Decorate 64 DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -187,64 +229,65 @@ using depth_greater 8(T): TypeStruct 6(float) 6(float) 6(float) 7(fvec4) 9: TypePointer Function 8(T) 10: TypeFunction 8(T) 9(ptr) - 19(T): TypeStruct 6(float) 6(float) 6(float) 7(fvec4) - 20: TypePointer Input 19(T) - 21(t): 20(ptr) Variable Input - 24: TypeInt 32 1 - 25: 24(int) Constant 0 - 26: TypePointer Function 6(float) - 29: 24(int) Constant 1 - 32: 24(int) Constant 2 - 35: 24(int) Constant 3 - 36: TypePointer Function 7(fvec4) - 42: TypePointer Output 6(float) - 43(f): 42(ptr) Variable Output - 46(g): 42(ptr) Variable Output - 49(d): 42(ptr) Variable Output - 52: TypePointer Output 7(fvec4) - 53(normal): 52(ptr) Variable Output - 56(T): TypeStruct 6(float) 6(float) 6(float) 7(fvec4) - 57($Global): TypeStruct 56(T) - 58: TypePointer Uniform 57($Global) - 59: 58(ptr) Variable Uniform - 60(T): TypeStruct 6(float) 6(float) 6(float) 7(fvec4) - 61(buff): TypeStruct 60(T) - 62: TypePointer Uniform 61(buff) - 63: 62(ptr) Variable Uniform + 19: TypeInt 32 1 + 20: 19(int) Constant 0 + 21: TypePointer Input 6(float) + 22(t.f): 21(ptr) Variable Input + 24: TypePointer Function 6(float) + 26: 19(int) Constant 1 + 27(t.g): 21(ptr) Variable Input + 30: 19(int) Constant 2 + 31(t.d): 21(ptr) Variable Input + 34: 19(int) Constant 3 + 35: TypePointer Input 7(fvec4) + 36(t.normal): 35(ptr) Variable Input + 38: TypePointer Function 7(fvec4) + 44: TypePointer Output 6(float) +45(@entryPointOutput.f): 44(ptr) Variable Output +48(@entryPointOutput.g): 44(ptr) Variable Output +51(@entryPointOutput.d): 44(ptr) Variable Output + 54: TypePointer Output 7(fvec4) +55(@entryPointOutput.normal): 54(ptr) Variable Output + 58(T): TypeStruct 6(float) 6(float) 6(float) 7(fvec4) + 59($Global): TypeStruct 58(T) + 60: TypePointer Uniform 59($Global) + 61: 60(ptr) Variable Uniform + 62(buff): TypeStruct 58(T) + 63: TypePointer Uniform 62(buff) + 64: 63(ptr) Variable Uniform 4(main): 2 Function None 3 5: Label 18(t): 9(ptr) Variable Function - 38(flattenTemp): 9(ptr) Variable Function - 39(param): 9(ptr) Variable Function - 22: 19(T) Load 21(t) - 23: 6(float) CompositeExtract 22 0 - 27: 26(ptr) AccessChain 18(t) 25 - Store 27 23 - 28: 6(float) CompositeExtract 22 1 - 30: 26(ptr) AccessChain 18(t) 29 - Store 30 28 - 31: 6(float) CompositeExtract 22 2 - 33: 26(ptr) AccessChain 18(t) 32 - Store 33 31 - 34: 7(fvec4) CompositeExtract 22 3 - 37: 36(ptr) AccessChain 18(t) 35 - Store 37 34 - 40: 8(T) Load 18(t) - Store 39(param) 40 - 41: 8(T) FunctionCall 12(@main(struct-T-f1-f1-f1-vf41;) 39(param) - Store 38(flattenTemp) 41 - 44: 26(ptr) AccessChain 38(flattenTemp) 25 - 45: 6(float) Load 44 - Store 43(f) 45 - 47: 26(ptr) AccessChain 38(flattenTemp) 29 - 48: 6(float) Load 47 - Store 46(g) 48 - 50: 26(ptr) AccessChain 38(flattenTemp) 32 - 51: 6(float) Load 50 - Store 49(d) 51 - 54: 36(ptr) AccessChain 38(flattenTemp) 35 - 55: 7(fvec4) Load 54 - Store 53(normal) 55 + 40(flattenTemp): 9(ptr) Variable Function + 41(param): 9(ptr) Variable Function + 23: 6(float) Load 22(t.f) + 25: 24(ptr) AccessChain 18(t) 20 + Store 25 23 + 28: 6(float) Load 27(t.g) + 29: 24(ptr) AccessChain 18(t) 26 + Store 29 28 + 32: 6(float) Load 31(t.d) + 33: 24(ptr) AccessChain 18(t) 30 + Store 33 32 + 37: 7(fvec4) Load 36(t.normal) + 39: 38(ptr) AccessChain 18(t) 34 + Store 39 37 + 42: 8(T) Load 18(t) + Store 41(param) 42 + 43: 8(T) FunctionCall 12(@main(struct-T-f1-f1-f1-vf41;) 41(param) + Store 40(flattenTemp) 43 + 46: 24(ptr) AccessChain 40(flattenTemp) 20 + 47: 6(float) Load 46 + Store 45(@entryPointOutput.f) 47 + 49: 24(ptr) AccessChain 40(flattenTemp) 26 + 50: 6(float) Load 49 + Store 48(@entryPointOutput.g) 50 + 52: 24(ptr) AccessChain 40(flattenTemp) 30 + 53: 6(float) Load 52 + Store 51(@entryPointOutput.d) 53 + 56: 38(ptr) AccessChain 40(flattenTemp) 34 + 57: 7(fvec4) Load 56 + Store 55(@entryPointOutput.normal) 57 Return FunctionEnd 12(@main(struct-T-f1-f1-f1-vf41;): 8(T) Function None 10 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structStructName.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structStructName.frag.out index 3b28805..3b18239 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structStructName.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structStructName.frag.out @@ -44,7 +44,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 22 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out index d70af80..d2e311a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.frag.out @@ -15,8 +15,8 @@ gl_FragCoord origin is upper left 0:25 add ( temp 4-component vector of float) 0:25 texture ( temp 4-component vector of float) 0:25 Construct combined texture-sampler ( temp sampler1D) -0:? 'tex' ( uniform texture1D) -0:? 'samp' ( uniform sampler) +0:? 'g_texdata.tex' ( uniform texture1D) +0:? 'g_texdata.samp' ( uniform sampler) 0:25 Constant: 0:25 0.500000 0:26 texture ( temp 4-component vector of float) @@ -27,8 +27,14 @@ gl_FragCoord origin is upper left 0:26 0.400000 0:27 texture ( temp 4-component vector of float) 0:27 Construct combined texture-sampler ( temp sampler1D) -0:? 'g_texdata_array2[1].tex[0]' ( uniform texture1D) -0:? 'g_texdata_array2[1].samp[0]' ( uniform sampler) +0:27 direct index ( temp texture1D) +0:? 'g_texdata_array2[1].tex' ( uniform 2-element array of texture1D) +0:27 Constant: +0:27 0 (const int) +0:27 direct index ( temp sampler) +0:? 'g_texdata_array2[1].samp' ( uniform 2-element array of sampler) +0:27 Constant: +0:27 0 (const int) 0:27 Constant: 0:27 0.300000 0:23 Function Definition: main( ( temp void) @@ -38,7 +44,7 @@ gl_FragCoord origin is upper left 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color}) 0:23 Sequence 0:23 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) 0:23 color: direct index for structure ( temp 4-component vector of float) 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color}) 0:23 Constant: @@ -46,19 +52,28 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'g_samp' ( uniform sampler) 0:? 'g_tex' ( uniform texture1D) -0:? 'g_texdata_array2[0].samp[0]' ( uniform sampler) -0:? 'g_texdata_array2[0].samp[1]' ( uniform sampler) -0:? 'g_texdata_array2[0].tex[0]' ( uniform texture1D) -0:? 'g_texdata_array2[0].tex[1]' ( uniform texture1D) -0:? 'g_texdata_array2[1].samp[0]' ( uniform sampler) -0:? 'g_texdata_array2[1].samp[1]' ( uniform sampler) -0:? 'g_texdata_array2[1].tex[0]' ( uniform texture1D) -0:? 'g_texdata_array2[1].tex[1]' ( uniform texture1D) -0:? 'g_texdata_array2[2].samp[0]' ( uniform sampler) -0:? 'g_texdata_array2[2].samp[1]' ( uniform sampler) -0:? 'g_texdata_array2[2].tex[0]' ( uniform texture1D) -0:? 'g_texdata_array2[2].tex[1]' ( uniform texture1D) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? 'g_texdata.samp' ( uniform sampler) +0:? 'g_texdata.tex' ( uniform texture1D) +0:? 'g_texdata.nonopaque_thing' ( uniform int) +0:? 'g_texdata_array[0].samp' ( uniform sampler) +0:? 'g_texdata_array[0].tex' ( uniform texture1D) +0:? 'g_texdata_array[0].nonopaque_thing' ( uniform int) +0:? 'g_texdata_array[1].samp' ( uniform sampler) +0:? 'g_texdata_array[1].tex' ( uniform texture1D) +0:? 'g_texdata_array[1].nonopaque_thing' ( uniform int) +0:? 'g_texdata_array[2].samp' ( uniform sampler) +0:? 'g_texdata_array[2].tex' ( uniform texture1D) +0:? 'g_texdata_array[2].nonopaque_thing' ( uniform int) +0:? 'g_texdata_array2[0].samp' ( uniform 2-element array of sampler) +0:? 'g_texdata_array2[0].tex' ( uniform 2-element array of texture1D) +0:? 'g_texdata_array2[0].nonopaque_thing' ( uniform int) +0:? 'g_texdata_array2[1].samp' ( uniform 2-element array of sampler) +0:? 'g_texdata_array2[1].tex' ( uniform 2-element array of texture1D) +0:? 'g_texdata_array2[1].nonopaque_thing' ( uniform int) +0:? 'g_texdata_array2[2].samp' ( uniform 2-element array of sampler) +0:? 'g_texdata_array2[2].tex' ( uniform 2-element array of texture1D) +0:? 'g_texdata_array2[2].nonopaque_thing' ( uniform int) +0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -80,8 +95,8 @@ gl_FragCoord origin is upper left 0:25 add ( temp 4-component vector of float) 0:25 texture ( temp 4-component vector of float) 0:25 Construct combined texture-sampler ( temp sampler1D) -0:? 'tex' ( uniform texture1D) -0:? 'samp' ( uniform sampler) +0:? 'g_texdata.tex' ( uniform texture1D) +0:? 'g_texdata.samp' ( uniform sampler) 0:25 Constant: 0:25 0.500000 0:26 texture ( temp 4-component vector of float) @@ -92,8 +107,14 @@ gl_FragCoord origin is upper left 0:26 0.400000 0:27 texture ( temp 4-component vector of float) 0:27 Construct combined texture-sampler ( temp sampler1D) -0:? 'g_texdata_array2[1].tex[0]' ( uniform texture1D) -0:? 'g_texdata_array2[1].samp[0]' ( uniform sampler) +0:27 direct index ( temp texture1D) +0:? 'g_texdata_array2[1].tex' ( uniform 2-element array of texture1D) +0:27 Constant: +0:27 0 (const int) +0:27 direct index ( temp sampler) +0:? 'g_texdata_array2[1].samp' ( uniform 2-element array of sampler) +0:27 Constant: +0:27 0 (const int) 0:27 Constant: 0:27 0.300000 0:23 Function Definition: main( ( temp void) @@ -103,7 +124,7 @@ gl_FragCoord origin is upper left 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color}) 0:23 Sequence 0:23 move second child to first child ( temp 4-component vector of float) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) 0:23 color: direct index for structure ( temp 4-component vector of float) 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color}) 0:23 Constant: @@ -111,29 +132,38 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'g_samp' ( uniform sampler) 0:? 'g_tex' ( uniform texture1D) -0:? 'g_texdata_array2[0].samp[0]' ( uniform sampler) -0:? 'g_texdata_array2[0].samp[1]' ( uniform sampler) -0:? 'g_texdata_array2[0].tex[0]' ( uniform texture1D) -0:? 'g_texdata_array2[0].tex[1]' ( uniform texture1D) -0:? 'g_texdata_array2[1].samp[0]' ( uniform sampler) -0:? 'g_texdata_array2[1].samp[1]' ( uniform sampler) -0:? 'g_texdata_array2[1].tex[0]' ( uniform texture1D) -0:? 'g_texdata_array2[1].tex[1]' ( uniform texture1D) -0:? 'g_texdata_array2[2].samp[0]' ( uniform sampler) -0:? 'g_texdata_array2[2].samp[1]' ( uniform sampler) -0:? 'g_texdata_array2[2].tex[0]' ( uniform texture1D) -0:? 'g_texdata_array2[2].tex[1]' ( uniform texture1D) -0:? 'color' (layout( location=0) out 4-component vector of float) +0:? 'g_texdata.samp' ( uniform sampler) +0:? 'g_texdata.tex' ( uniform texture1D) +0:? 'g_texdata.nonopaque_thing' ( uniform int) +0:? 'g_texdata_array[0].samp' ( uniform sampler) +0:? 'g_texdata_array[0].tex' ( uniform texture1D) +0:? 'g_texdata_array[0].nonopaque_thing' ( uniform int) +0:? 'g_texdata_array[1].samp' ( uniform sampler) +0:? 'g_texdata_array[1].tex' ( uniform texture1D) +0:? 'g_texdata_array[1].nonopaque_thing' ( uniform int) +0:? 'g_texdata_array[2].samp' ( uniform sampler) +0:? 'g_texdata_array[2].tex' ( uniform texture1D) +0:? 'g_texdata_array[2].nonopaque_thing' ( uniform int) +0:? 'g_texdata_array2[0].samp' ( uniform 2-element array of sampler) +0:? 'g_texdata_array2[0].tex' ( uniform 2-element array of texture1D) +0:? 'g_texdata_array2[0].nonopaque_thing' ( uniform int) +0:? 'g_texdata_array2[1].samp' ( uniform 2-element array of sampler) +0:? 'g_texdata_array2[1].tex' ( uniform 2-element array of texture1D) +0:? 'g_texdata_array2[1].nonopaque_thing' ( uniform int) +0:? 'g_texdata_array2[2].samp' ( uniform 2-element array of sampler) +0:? 'g_texdata_array2[2].tex' ( uniform 2-element array of texture1D) +0:? 'g_texdata_array2[2].nonopaque_thing' ( uniform int) +0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 66 +// Generated by (magic number): 80003 +// Id's are bound by 80 Capability Shader Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 51 + EntryPoint Fragment 4 "main" 59 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -141,46 +171,49 @@ gl_FragCoord origin is upper left MemberName 8(PS_OUTPUT) 0 "color" Name 12 "@main(struct-PS_OUTPUT-vf41;" Name 11 "ps_output" - Name 18 "tex" - Name 22 "samp" + Name 18 "g_texdata.tex" + Name 22 "g_texdata.samp" Name 28 "g_texdata_array[1].tex" Name 30 "g_texdata_array[1].samp" - Name 36 "g_texdata_array2[1].tex[0]" - Name 38 "g_texdata_array2[1].samp[0]" - Name 46 "ps_output" - Name 47 "param" - Name 51 "color" - Name 54 "g_samp" - Name 55 "g_tex" - Name 56 "g_texdata_array2[0].samp[0]" - Name 57 "g_texdata_array2[0].samp[1]" - Name 58 "g_texdata_array2[0].tex[0]" - Name 59 "g_texdata_array2[0].tex[1]" - Name 60 "g_texdata_array2[1].samp[1]" - Name 61 "g_texdata_array2[1].tex[1]" - Name 62 "g_texdata_array2[2].samp[0]" - Name 63 "g_texdata_array2[2].samp[1]" - Name 64 "g_texdata_array2[2].tex[0]" - Name 65 "g_texdata_array2[2].tex[1]" - Decorate 18(tex) DescriptorSet 0 - Decorate 22(samp) DescriptorSet 0 + Name 40 "g_texdata_array2[1].tex" + Name 45 "g_texdata_array2[1].samp" + Name 54 "ps_output" + Name 55 "param" + Name 59 "ps_output.color" + Name 62 "g_samp" + Name 63 "g_tex" + Name 65 "g_texdata.nonopaque_thing" + Name 66 "g_texdata_array[0].samp" + Name 67 "g_texdata_array[0].tex" + Name 68 "g_texdata_array[0].nonopaque_thing" + Name 69 "g_texdata_array[1].nonopaque_thing" + Name 70 "g_texdata_array[2].samp" + Name 71 "g_texdata_array[2].tex" + Name 72 "g_texdata_array[2].nonopaque_thing" + Name 73 "g_texdata_array2[0].samp" + Name 74 "g_texdata_array2[0].tex" + Name 75 "g_texdata_array2[0].nonopaque_thing" + Name 76 "g_texdata_array2[1].nonopaque_thing" + Name 77 "g_texdata_array2[2].samp" + Name 78 "g_texdata_array2[2].tex" + Name 79 "g_texdata_array2[2].nonopaque_thing" + Decorate 18(g_texdata.tex) DescriptorSet 0 + Decorate 22(g_texdata.samp) DescriptorSet 0 Decorate 28(g_texdata_array[1].tex) DescriptorSet 0 Decorate 30(g_texdata_array[1].samp) DescriptorSet 0 - Decorate 36(g_texdata_array2[1].tex[0]) DescriptorSet 0 - Decorate 38(g_texdata_array2[1].samp[0]) DescriptorSet 0 - Decorate 51(color) Location 0 - Decorate 54(g_samp) DescriptorSet 0 - Decorate 55(g_tex) DescriptorSet 0 - Decorate 56(g_texdata_array2[0].samp[0]) DescriptorSet 0 - Decorate 57(g_texdata_array2[0].samp[1]) DescriptorSet 0 - Decorate 58(g_texdata_array2[0].tex[0]) DescriptorSet 0 - Decorate 59(g_texdata_array2[0].tex[1]) DescriptorSet 0 - Decorate 60(g_texdata_array2[1].samp[1]) DescriptorSet 0 - Decorate 61(g_texdata_array2[1].tex[1]) DescriptorSet 0 - Decorate 62(g_texdata_array2[2].samp[0]) DescriptorSet 0 - Decorate 63(g_texdata_array2[2].samp[1]) DescriptorSet 0 - Decorate 64(g_texdata_array2[2].tex[0]) DescriptorSet 0 - Decorate 65(g_texdata_array2[2].tex[1]) DescriptorSet 0 + Decorate 40(g_texdata_array2[1].tex) DescriptorSet 0 + Decorate 45(g_texdata_array2[1].samp) DescriptorSet 0 + Decorate 59(ps_output.color) Location 0 + Decorate 62(g_samp) DescriptorSet 0 + Decorate 63(g_tex) DescriptorSet 0 + Decorate 66(g_texdata_array[0].samp) DescriptorSet 0 + Decorate 67(g_texdata_array[0].tex) DescriptorSet 0 + Decorate 70(g_texdata_array[2].samp) DescriptorSet 0 + Decorate 71(g_texdata_array[2].tex) DescriptorSet 0 + Decorate 73(g_texdata_array2[0].samp) DescriptorSet 0 + Decorate 74(g_texdata_array2[0].tex) DescriptorSet 0 + Decorate 77(g_texdata_array2[2].samp) DescriptorSet 0 + Decorate 78(g_texdata_array2[2].tex) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -192,50 +225,62 @@ gl_FragCoord origin is upper left 15: 14(int) Constant 0 16: TypeImage 6(float) 1D sampled format:Unknown 17: TypePointer UniformConstant 16 - 18(tex): 17(ptr) Variable UniformConstant +18(g_texdata.tex): 17(ptr) Variable UniformConstant 20: TypeSampler 21: TypePointer UniformConstant 20 - 22(samp): 21(ptr) Variable UniformConstant +22(g_texdata.samp): 21(ptr) Variable UniformConstant 24: TypeSampledImage 16 26: 6(float) Constant 1056964608 28(g_texdata_array[1].tex): 17(ptr) Variable UniformConstant 30(g_texdata_array[1].samp): 21(ptr) Variable UniformConstant 33: 6(float) Constant 1053609165 -36(g_texdata_array2[1].tex[0]): 17(ptr) Variable UniformConstant -38(g_texdata_array2[1].samp[0]): 21(ptr) Variable UniformConstant - 41: 6(float) Constant 1050253722 - 44: TypePointer Function 7(fvec4) - 50: TypePointer Output 7(fvec4) - 51(color): 50(ptr) Variable Output - 54(g_samp): 21(ptr) Variable UniformConstant - 55(g_tex): 17(ptr) Variable UniformConstant -56(g_texdata_array2[0].samp[0]): 21(ptr) Variable UniformConstant -57(g_texdata_array2[0].samp[1]): 21(ptr) Variable UniformConstant -58(g_texdata_array2[0].tex[0]): 17(ptr) Variable UniformConstant -59(g_texdata_array2[0].tex[1]): 17(ptr) Variable UniformConstant -60(g_texdata_array2[1].samp[1]): 21(ptr) Variable UniformConstant -61(g_texdata_array2[1].tex[1]): 17(ptr) Variable UniformConstant -62(g_texdata_array2[2].samp[0]): 21(ptr) Variable UniformConstant -63(g_texdata_array2[2].samp[1]): 21(ptr) Variable UniformConstant -64(g_texdata_array2[2].tex[0]): 17(ptr) Variable UniformConstant -65(g_texdata_array2[2].tex[1]): 17(ptr) Variable UniformConstant + 36: TypeInt 32 0 + 37: 36(int) Constant 2 + 38: TypeArray 16 37 + 39: TypePointer UniformConstant 38 +40(g_texdata_array2[1].tex): 39(ptr) Variable UniformConstant + 43: TypeArray 20 37 + 44: TypePointer UniformConstant 43 +45(g_texdata_array2[1].samp): 44(ptr) Variable UniformConstant + 49: 6(float) Constant 1050253722 + 52: TypePointer Function 7(fvec4) + 58: TypePointer Output 7(fvec4) +59(ps_output.color): 58(ptr) Variable Output + 62(g_samp): 21(ptr) Variable UniformConstant + 63(g_tex): 17(ptr) Variable UniformConstant + 64: TypePointer UniformConstant 14(int) +65(g_texdata.nonopaque_thing): 64(ptr) Variable UniformConstant +66(g_texdata_array[0].samp): 21(ptr) Variable UniformConstant +67(g_texdata_array[0].tex): 17(ptr) Variable UniformConstant +68(g_texdata_array[0].nonopaque_thing): 64(ptr) Variable UniformConstant +69(g_texdata_array[1].nonopaque_thing): 64(ptr) Variable UniformConstant +70(g_texdata_array[2].samp): 21(ptr) Variable UniformConstant +71(g_texdata_array[2].tex): 17(ptr) Variable UniformConstant +72(g_texdata_array[2].nonopaque_thing): 64(ptr) Variable UniformConstant +73(g_texdata_array2[0].samp): 44(ptr) Variable UniformConstant +74(g_texdata_array2[0].tex): 39(ptr) Variable UniformConstant +75(g_texdata_array2[0].nonopaque_thing): 64(ptr) Variable UniformConstant +76(g_texdata_array2[1].nonopaque_thing): 64(ptr) Variable UniformConstant +77(g_texdata_array2[2].samp): 44(ptr) Variable UniformConstant +78(g_texdata_array2[2].tex): 39(ptr) Variable UniformConstant +79(g_texdata_array2[2].nonopaque_thing): 64(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label - 46(ps_output): 9(ptr) Variable Function - 47(param): 9(ptr) Variable Function - 48: 2 FunctionCall 12(@main(struct-PS_OUTPUT-vf41;) 47(param) - 49:8(PS_OUTPUT) Load 47(param) - Store 46(ps_output) 49 - 52: 44(ptr) AccessChain 46(ps_output) 15 - 53: 7(fvec4) Load 52 - Store 51(color) 53 + 54(ps_output): 9(ptr) Variable Function + 55(param): 9(ptr) Variable Function + 56: 2 FunctionCall 12(@main(struct-PS_OUTPUT-vf41;) 55(param) + 57:8(PS_OUTPUT) Load 55(param) + Store 54(ps_output) 57 + 60: 52(ptr) AccessChain 54(ps_output) 15 + 61: 7(fvec4) Load 60 + Store 59(ps_output.color) 61 Return FunctionEnd 12(@main(struct-PS_OUTPUT-vf41;): 2 Function None 10 11(ps_output): 9(ptr) FunctionParameter 13: Label - 19: 16 Load 18(tex) - 23: 20 Load 22(samp) + 19: 16 Load 18(g_texdata.tex) + 23: 20 Load 22(g_texdata.samp) 25: 24 SampledImage 19 23 27: 7(fvec4) ImageSampleImplicitLod 25 26 29: 16 Load 28(g_texdata_array[1].tex) @@ -243,12 +288,14 @@ gl_FragCoord origin is upper left 32: 24 SampledImage 29 31 34: 7(fvec4) ImageSampleImplicitLod 32 33 35: 7(fvec4) FAdd 27 34 - 37: 16 Load 36(g_texdata_array2[1].tex[0]) - 39: 20 Load 38(g_texdata_array2[1].samp[0]) - 40: 24 SampledImage 37 39 - 42: 7(fvec4) ImageSampleImplicitLod 40 41 - 43: 7(fvec4) FAdd 35 42 - 45: 44(ptr) AccessChain 11(ps_output) 15 - Store 45 43 + 41: 17(ptr) AccessChain 40(g_texdata_array2[1].tex) 15 + 42: 16 Load 41 + 46: 21(ptr) AccessChain 45(g_texdata_array2[1].samp) 15 + 47: 20 Load 46 + 48: 24 SampledImage 42 47 + 50: 7(fvec4) ImageSampleImplicitLod 48 49 + 51: 7(fvec4) FAdd 35 50 + 53: 52(ptr) AccessChain 11(ps_output) 15 + Store 53 51 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.geom.out index 702f06e..67dcf99 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structarray.flatten.geom.out @@ -49,25 +49,19 @@ output primitive = triangle_strip 0:22 Sequence 0:22 Sequence 0:22 move second child to first child ( temp 4-component vector of float) -0:? 'outStream_position' ( out 4-component vector of float Position) +0:? 'outStream.position' ( out 4-component vector of float Position) 0:22 position: direct index for structure ( temp 4-component vector of float) 0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 Constant: 0:22 0 (const int) 0:22 move second child to first child ( temp 4-component vector of float) -0:22 color: direct index for structure ( temp 4-component vector of float) -0:22 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv}) -0:22 Constant: -0:22 0 (const int) +0:? 'outStream.color' (layout( location=0) out 4-component vector of float) 0:22 color: direct index for structure ( temp 4-component vector of float) 0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 Constant: 0:22 1 (const int) 0:22 move second child to first child ( temp 2-component vector of float) -0:22 uv: direct index for structure ( temp 2-component vector of float) -0:22 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv}) -0:22 Constant: -0:22 1 (const int) +0:? 'outStream.uv' (layout( location=1) out 2-component vector of float) 0:22 uv: direct index for structure ( temp 2-component vector of float) 0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 Constant: @@ -84,7 +78,9 @@ output primitive = triangle_strip 0:? 'outStream' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:? Linker Objects 0:? 'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) -0:? 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'outStream.position' ( out 4-component vector of float Position) +0:? 'outStream.color' (layout( location=0) out 4-component vector of float) +0:? 'outStream.uv' (layout( location=1) out 2-component vector of float) Linked geometry stage: @@ -140,25 +136,19 @@ output primitive = triangle_strip 0:22 Sequence 0:22 Sequence 0:22 move second child to first child ( temp 4-component vector of float) -0:? 'outStream_position' ( out 4-component vector of float Position) +0:? 'outStream.position' ( out 4-component vector of float Position) 0:22 position: direct index for structure ( temp 4-component vector of float) 0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 Constant: 0:22 0 (const int) 0:22 move second child to first child ( temp 4-component vector of float) -0:22 color: direct index for structure ( temp 4-component vector of float) -0:22 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv}) -0:22 Constant: -0:22 0 (const int) +0:? 'outStream.color' (layout( location=0) out 4-component vector of float) 0:22 color: direct index for structure ( temp 4-component vector of float) 0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 Constant: 0:22 1 (const int) 0:22 move second child to first child ( temp 2-component vector of float) -0:22 uv: direct index for structure ( temp 2-component vector of float) -0:22 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv}) -0:22 Constant: -0:22 1 (const int) +0:? 'outStream.uv' (layout( location=1) out 2-component vector of float) 0:22 uv: direct index for structure ( temp 2-component vector of float) 0:22 'vout' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:22 Constant: @@ -175,16 +165,18 @@ output primitive = triangle_strip 0:? 'outStream' ( temp structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) 0:? Linker Objects 0:? 'vin' (layout( location=0) in 2-element array of structure{ temp 4-component vector of float position, temp 4-component vector of float color, temp 2-component vector of float uv}) -0:? 'outStream' (layout( location=0) out structure{ temp 4-component vector of float color, temp 2-component vector of float uv}) +0:? 'outStream.position' ( out 4-component vector of float Position) +0:? 'outStream.color' (layout( location=0) out 4-component vector of float) +0:? 'outStream.uv' (layout( location=1) out 2-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 61 +// Generated by (magic number): 80003 +// Id's are bound by 58 Capability Geometry 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 4 "main" 38 43 53 + EntryPoint Geometry 4 "main" 38 41 45 50 ExecutionMode 4 InputLines ExecutionMode 4 Invocations 1 ExecutionMode 4 OutputTriangleStrip @@ -203,19 +195,18 @@ output primitive = triangle_strip Name 17 "vin" Name 18 "outStream" Name 21 "vout" - Name 38 "outStream_position" - Name 41 "PS_IN" - MemberName 41(PS_IN) 0 "color" - MemberName 41(PS_IN) 1 "uv" - Name 43 "outStream" - Name 51 "vin" - Name 53 "vin" - Name 55 "outStream" - Name 56 "param" - Name 58 "param" - Decorate 38(outStream_position) BuiltIn Position - Decorate 43(outStream) Location 0 - Decorate 53(vin) Location 0 + Name 38 "outStream.position" + Name 41 "outStream.color" + Name 45 "outStream.uv" + Name 48 "vin" + Name 50 "vin" + Name 52 "outStream" + Name 53 "param" + Name 55 "param" + Decorate 38(outStream.position) BuiltIn Position + Decorate 41(outStream.color) Location 0 + Decorate 45(outStream.uv) Location 1 + Decorate 50(vin) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -236,26 +227,25 @@ output primitive = triangle_strip 29: TypePointer Function 8(fvec2) 33: 22(int) Constant 0 37: TypePointer Output 7(fvec4) -38(outStream_position): 37(ptr) Variable Output - 41(PS_IN): TypeStruct 7(fvec4) 8(fvec2) - 42: TypePointer Output 41(PS_IN) - 43(outStream): 42(ptr) Variable Output - 49: TypePointer Output 8(fvec2) - 52: TypePointer Input 12 - 53(vin): 52(ptr) Variable Input +38(outStream.position): 37(ptr) Variable Output +41(outStream.color): 37(ptr) Variable Output + 44: TypePointer Output 8(fvec2) +45(outStream.uv): 44(ptr) Variable Output + 49: TypePointer Input 12 + 50(vin): 49(ptr) Variable Input 4(main): 2 Function None 3 5: Label - 51(vin): 13(ptr) Variable Function - 55(outStream): 15(ptr) Variable Function - 56(param): 13(ptr) Variable Function - 58(param): 15(ptr) Variable Function - 54: 12 Load 53(vin) - Store 51(vin) 54 - 57: 12 Load 51(vin) - Store 56(param) 57 - 59: 2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 56(param) 58(param) - 60: 14(PS_IN) Load 58(param) - Store 55(outStream) 60 + 48(vin): 13(ptr) Variable Function + 52(outStream): 15(ptr) Variable Function + 53(param): 13(ptr) Variable Function + 55(param): 15(ptr) Variable Function + 51: 12 Load 50(vin) + Store 48(vin) 51 + 54: 12 Load 48(vin) + Store 53(param) 54 + 56: 2 FunctionCall 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;) 53(param) 55(param) + 57: 14(PS_IN) Load 55(param) + Store 52(outStream) 57 Return FunctionEnd 19(@main(struct-VertexData-vf4-vf4-vf21[2];struct-PS_IN-vf4-vf4-vf21;): 2 Function None 16 @@ -277,15 +267,13 @@ output primitive = triangle_strip Store 36 35 39: 24(ptr) AccessChain 21(vout) 33 40: 7(fvec4) Load 39 - Store 38(outStream_position) 40 - 44: 24(ptr) AccessChain 21(vout) 23 - 45: 7(fvec4) Load 44 - 46: 37(ptr) AccessChain 43(outStream) 33 - Store 46 45 - 47: 29(ptr) AccessChain 21(vout) 28 - 48: 8(fvec2) Load 47 - 50: 49(ptr) AccessChain 43(outStream) 23 - Store 50 48 + Store 38(outStream.position) 40 + 42: 24(ptr) AccessChain 21(vout) 23 + 43: 7(fvec4) Load 42 + Store 41(outStream.color) 43 + 46: 29(ptr) AccessChain 21(vout) 28 + 47: 8(fvec2) Load 46 + Store 45(outStream.uv) 47 EmitVertex Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.atomics.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.atomics.frag.out index c3a3f87..188b797 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.atomics.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.atomics.frag.out @@ -224,7 +224,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -232,7 +232,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -463,7 +463,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -471,10 +471,10 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 87 Capability Shader @@ -498,6 +498,7 @@ gl_FragCoord origin is upper left MemberDecorate 15(sbuf) 0 Offset 0 Decorate 15(sbuf) BufferBlock Decorate 17(sbuf) DescriptorSet 0 + Decorate 80(pos) Flat Decorate 80(pos) Location 0 Decorate 83(@entryPointOutput) Location 0 2: TypeVoid diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.byte.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.byte.frag.out index 6541946..8994ed4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.byte.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.byte.frag.out @@ -41,13 +41,13 @@ gl_FragCoord origin is upper left 0:10 Constant: 0:10 2 (const int) 0:? Construct vec2 ( temp 2-component vector of uint) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: 0:10 0 (const uint) 0:10 'byteAddrTemp' ( temp int) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: @@ -73,13 +73,13 @@ gl_FragCoord origin is upper left 0:11 Constant: 0:11 2 (const int) 0:? Construct vec3 ( temp 3-component vector of uint) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: 0:11 0 (const uint) 0:11 'byteAddrTemp' ( temp int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -88,7 +88,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 1 (const int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -111,13 +111,13 @@ gl_FragCoord origin is upper left 0:12 Constant: 0:12 2 (const int) 0:? Construct vec4 ( temp 4-component vector of uint) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -126,7 +126,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -135,7 +135,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -149,7 +149,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -157,7 +157,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -205,13 +205,13 @@ gl_FragCoord origin is upper left 0:10 Constant: 0:10 2 (const int) 0:? Construct vec2 ( temp 2-component vector of uint) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: 0:10 0 (const uint) 0:10 'byteAddrTemp' ( temp int) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: @@ -237,13 +237,13 @@ gl_FragCoord origin is upper left 0:11 Constant: 0:11 2 (const int) 0:? Construct vec3 ( temp 3-component vector of uint) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: 0:11 0 (const uint) 0:11 'byteAddrTemp' ( temp int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -252,7 +252,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 1 (const int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -275,13 +275,13 @@ gl_FragCoord origin is upper left 0:12 Constant: 0:12 2 (const int) 0:? Construct vec4 ( temp 4-component vector of uint) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -290,7 +290,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -299,7 +299,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -313,7 +313,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -321,10 +321,10 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 114 Capability Shader @@ -352,6 +352,7 @@ gl_FragCoord origin is upper left MemberDecorate 16(sbuf) 0 Offset 0 Decorate 16(sbuf) BufferBlock Decorate 18(sbuf) DescriptorSet 0 + Decorate 107(pos) Flat Decorate 107(pos) Location 0 Decorate 110(@entryPointOutput) Location 0 2: TypeVoid diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.coherent.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.coherent.frag.out index fab95f7..e0ee89b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.coherent.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.coherent.frag.out @@ -74,7 +74,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -83,7 +83,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( row_major std430) coherent buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test} @data}) 0:? 'sbuf2' (layout( row_major std430) coherent buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -164,7 +164,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -173,10 +173,10 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( row_major std430) coherent buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test} @data}) 0:? 'sbuf2' (layout( row_major std430) coherent buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 78 Capability Shader @@ -208,15 +208,14 @@ gl_FragCoord origin is upper left MemberDecorate 15(sbuf2) 0 Offset 0 Decorate 15(sbuf2) BufferBlock Decorate 17(sbuf2) DescriptorSet 0 - MemberDecorate 28(sb_t) 0 Coherent MemberDecorate 28(sb_t) 0 Offset 0 - MemberDecorate 28(sb_t) 1 Coherent MemberDecorate 28(sb_t) 1 Offset 12 Decorate 29 ArrayStride 16 MemberDecorate 30(sbuf) 0 Coherent MemberDecorate 30(sbuf) 0 Offset 0 Decorate 30(sbuf) BufferBlock Decorate 32(sbuf) DescriptorSet 0 + Decorate 71(pos) Flat Decorate 71(pos) Location 0 Decorate 74(@entryPointOutput) Location 0 2: TypeVoid diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.fn.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.fn.frag.out index 762ea80..ab1344a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.fn.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.fn.frag.out @@ -17,6 +17,7 @@ gl_FragCoord origin is upper left 0:10 Function Definition: set(block--vu4[0]1;u1;vu4; ( temp void) 0:10 Function Parameters: 0:10 'sb' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of uint @data}) +0:10 'sb@count' ( buffer block{layout( row_major std430) buffer int @count}) 0:10 'bufferOffset' ( in uint) 0:10 'data' ( in 4-component vector of uint) 0:? Sequence @@ -34,6 +35,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:21 Function Call: set(block--vu4[0]1;u1;vu4; ( temp void) 0:21 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of uint @data}) +0:21 'sbuf2@count' ( buffer block{layout( row_major std430) buffer int @count}) 0:21 Constant: 0:21 2 (const uint) 0:21 Function Call: get(block--vu4[0]1;u1; ( temp 4-component vector of uint) @@ -51,7 +53,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:20 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:20 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:20 Function Call: @main(u1; ( temp 4-component vector of float) @@ -59,9 +61,10 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of uint @data}) 0:? 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of uint @data}) +0:? 'sbuf2@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count}) 0:? 'sbuf3' (layout( binding=12 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of 3-component vector of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -85,6 +88,7 @@ gl_FragCoord origin is upper left 0:10 Function Definition: set(block--vu4[0]1;u1;vu4; ( temp void) 0:10 Function Parameters: 0:10 'sb' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of uint @data}) +0:10 'sb@count' ( buffer block{layout( row_major std430) buffer int @count}) 0:10 'bufferOffset' ( in uint) 0:10 'data' ( in 4-component vector of uint) 0:? Sequence @@ -102,6 +106,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:21 Function Call: set(block--vu4[0]1;u1;vu4; ( temp void) 0:21 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of uint @data}) +0:21 'sbuf2@count' ( buffer block{layout( row_major std430) buffer int @count}) 0:21 Constant: 0:21 2 (const uint) 0:21 Function Call: get(block--vu4[0]1;u1; ( temp 4-component vector of uint) @@ -119,7 +124,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:20 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:20 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:20 Function Call: @main(u1; ( temp 4-component vector of float) @@ -127,18 +132,19 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of uint @data}) 0:? 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of 4-component vector of uint @data}) +0:? 'sbuf2@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count}) 0:? 'sbuf3' (layout( binding=12 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of 3-component vector of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 71 +// Generated by (magic number): 80003 +// Id's are bound by 78 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 59 62 + EntryPoint Fragment 4 "main" 63 66 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -149,42 +155,56 @@ gl_FragCoord origin is upper left Name 14 "bufferOffset" Name 18 "" MemberName 18 0 "@data" - Name 25 "set(block--vu4[0]1;u1;vu4;" - Name 22 "sb" - Name 23 "bufferOffset" - Name 24 "data" - Name 31 "@main(u1;" - Name 30 "pos" - Name 44 "sbuf2" - Name 46 "sbuf" - Name 48 "param" - Name 50 "param" - Name 51 "param" - Name 57 "pos" - Name 59 "pos" - Name 62 "@entryPointOutput" - Name 63 "param" - Name 68 "sbuf3" - MemberName 68(sbuf3) 0 "@data" - Name 70 "sbuf3" + Name 21 "" + MemberName 21 0 "@count" + Name 29 "set(block--vu4[0]1;u1;vu4;" + Name 25 "sb" + Name 26 "sb@count" + Name 27 "bufferOffset" + Name 28 "data" + Name 35 "@main(u1;" + Name 34 "pos" + Name 47 "sbuf2" + Name 48 "sbuf2@count" + Name 50 "sbuf" + Name 52 "param" + Name 54 "param" + Name 55 "param" + Name 61 "pos" + Name 63 "pos" + Name 66 "@entryPointOutput" + Name 67 "param" + Name 70 "sbuf2@count" + MemberName 70(sbuf2@count) 0 "@count" + Name 72 "sbuf2@count" + Name 75 "sbuf3" + MemberName 75(sbuf3) 0 "@data" + Name 77 "sbuf3" Decorate 8 ArrayStride 16 MemberDecorate 9 0 NonWritable MemberDecorate 9 0 Offset 0 Decorate 9 BufferBlock + Decorate 13(sb) NonWritable Decorate 17 ArrayStride 16 MemberDecorate 18 0 Offset 0 Decorate 18 BufferBlock - Decorate 44(sbuf2) DescriptorSet 0 - Decorate 46(sbuf) DescriptorSet 0 - Decorate 46(sbuf) Binding 10 - Decorate 59(pos) Location 0 - Decorate 62(@entryPointOutput) Location 0 - Decorate 67 ArrayStride 16 - MemberDecorate 68(sbuf3) 0 NonWritable - MemberDecorate 68(sbuf3) 0 Offset 0 - Decorate 68(sbuf3) BufferBlock - Decorate 70(sbuf3) DescriptorSet 0 - Decorate 70(sbuf3) Binding 12 + Decorate 21 BufferBlock + Decorate 47(sbuf2) DescriptorSet 0 + Decorate 48(sbuf2@count) DescriptorSet 0 + Decorate 50(sbuf) DescriptorSet 0 + Decorate 50(sbuf) Binding 10 + Decorate 63(pos) Flat + Decorate 63(pos) Location 0 + Decorate 66(@entryPointOutput) Location 0 + MemberDecorate 70(sbuf2@count) 0 Offset 0 + Decorate 70(sbuf2@count) BufferBlock + Decorate 72(sbuf2@count) DescriptorSet 0 + Decorate 74 ArrayStride 16 + MemberDecorate 75(sbuf3) 0 NonWritable + MemberDecorate 75(sbuf3) 0 Offset 0 + Decorate 75(sbuf3) BufferBlock + Decorate 77(sbuf3) DescriptorSet 0 + Decorate 77(sbuf3) Binding 12 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -197,71 +217,78 @@ gl_FragCoord origin is upper left 17: TypeRuntimeArray 7(ivec4) 18: TypeStruct 17 19: TypePointer Uniform 18(struct) - 20: TypePointer Function 7(ivec4) - 21: TypeFunction 2 19(ptr) 11(ptr) 20(ptr) - 27: TypeFloat 32 - 28: TypeVector 27(float) 4 - 29: TypeFunction 28(fvec4) 11(ptr) - 33: TypeInt 32 1 - 34: 33(int) Constant 0 - 36: TypePointer Uniform 7(ivec4) - 44(sbuf2): 19(ptr) Variable Uniform - 45: 6(int) Constant 2 - 46(sbuf): 10(ptr) Variable Uniform - 47: 6(int) Constant 3 - 53: 27(float) Constant 0 - 54: 28(fvec4) ConstantComposite 53 53 53 53 - 58: TypePointer Input 6(int) - 59(pos): 58(ptr) Variable Input - 61: TypePointer Output 28(fvec4) -62(@entryPointOutput): 61(ptr) Variable Output - 66: TypeVector 6(int) 3 - 67: TypeRuntimeArray 66(ivec3) - 68(sbuf3): TypeStruct 67 - 69: TypePointer Uniform 68(sbuf3) - 70(sbuf3): 69(ptr) Variable Uniform + 20: TypeInt 32 1 + 21: TypeStruct 20(int) + 22: TypePointer Uniform 21(struct) + 23: TypePointer Function 7(ivec4) + 24: TypeFunction 2 19(ptr) 22(ptr) 11(ptr) 23(ptr) + 31: TypeFloat 32 + 32: TypeVector 31(float) 4 + 33: TypeFunction 32(fvec4) 11(ptr) + 37: 20(int) Constant 0 + 39: TypePointer Uniform 7(ivec4) + 47(sbuf2): 19(ptr) Variable Uniform + 48(sbuf2@count): 22(ptr) Variable Uniform + 49: 6(int) Constant 2 + 50(sbuf): 10(ptr) Variable Uniform + 51: 6(int) Constant 3 + 57: 31(float) Constant 0 + 58: 32(fvec4) ConstantComposite 57 57 57 57 + 62: TypePointer Input 6(int) + 63(pos): 62(ptr) Variable Input + 65: TypePointer Output 32(fvec4) +66(@entryPointOutput): 65(ptr) Variable Output + 70(sbuf2@count): TypeStruct 20(int) + 71: TypePointer Uniform 70(sbuf2@count) + 72(sbuf2@count): 71(ptr) Variable Uniform + 73: TypeVector 6(int) 3 + 74: TypeRuntimeArray 73(ivec3) + 75(sbuf3): TypeStruct 74 + 76: TypePointer Uniform 75(sbuf3) + 77(sbuf3): 76(ptr) Variable Uniform 4(main): 2 Function None 3 5: Label - 57(pos): 11(ptr) Variable Function - 63(param): 11(ptr) Variable Function - 60: 6(int) Load 59(pos) - Store 57(pos) 60 - 64: 6(int) Load 57(pos) - Store 63(param) 64 - 65: 28(fvec4) FunctionCall 31(@main(u1;) 63(param) - Store 62(@entryPointOutput) 65 + 61(pos): 11(ptr) Variable Function + 67(param): 11(ptr) Variable Function + 64: 6(int) Load 63(pos) + Store 61(pos) 64 + 68: 6(int) Load 61(pos) + Store 67(param) 68 + 69: 32(fvec4) FunctionCall 35(@main(u1;) 67(param) + Store 66(@entryPointOutput) 69 Return FunctionEnd 15(get(block--vu4[0]1;u1;): 7(ivec4) Function None 12 13(sb): 10(ptr) FunctionParameter 14(bufferOffset): 11(ptr) FunctionParameter 16: Label - 35: 6(int) Load 14(bufferOffset) - 37: 36(ptr) AccessChain 13(sb) 34 35 - 38: 7(ivec4) Load 37 - ReturnValue 38 + 38: 6(int) Load 14(bufferOffset) + 40: 39(ptr) AccessChain 13(sb) 37 38 + 41: 7(ivec4) Load 40 + ReturnValue 41 FunctionEnd -25(set(block--vu4[0]1;u1;vu4;): 2 Function None 21 - 22(sb): 19(ptr) FunctionParameter -23(bufferOffset): 11(ptr) FunctionParameter - 24(data): 20(ptr) FunctionParameter - 26: Label - 41: 6(int) Load 23(bufferOffset) - 42: 7(ivec4) Load 24(data) - 43: 36(ptr) AccessChain 22(sb) 34 41 - Store 43 42 +29(set(block--vu4[0]1;u1;vu4;): 2 Function None 24 + 25(sb): 19(ptr) FunctionParameter + 26(sb@count): 22(ptr) FunctionParameter +27(bufferOffset): 11(ptr) FunctionParameter + 28(data): 23(ptr) FunctionParameter + 30: Label + 44: 6(int) Load 27(bufferOffset) + 45: 7(ivec4) Load 28(data) + 46: 39(ptr) AccessChain 25(sb) 37 44 + Store 46 45 Return FunctionEnd - 31(@main(u1;): 28(fvec4) Function None 29 - 30(pos): 11(ptr) FunctionParameter - 32: Label - 48(param): 11(ptr) Variable Function - 50(param): 11(ptr) Variable Function - 51(param): 20(ptr) Variable Function - Store 48(param) 47 - 49: 7(ivec4) FunctionCall 15(get(block--vu4[0]1;u1;) 46(sbuf) 48(param) - Store 50(param) 45 - Store 51(param) 49 - 52: 2 FunctionCall 25(set(block--vu4[0]1;u1;vu4;) 44(sbuf2) 50(param) 51(param) - ReturnValue 54 + 35(@main(u1;): 32(fvec4) Function None 33 + 34(pos): 11(ptr) FunctionParameter + 36: Label + 52(param): 11(ptr) Variable Function + 54(param): 11(ptr) Variable Function + 55(param): 23(ptr) Variable Function + Store 52(param) 51 + 53: 7(ivec4) FunctionCall 15(get(block--vu4[0]1;u1;) 50(sbuf) 52(param) + Store 54(param) 49 + Store 55(param) 53 + 56: 2 FunctionCall 29(set(block--vu4[0]1;u1;vu4;) 47(sbuf2) 48(sbuf2@count) 54(param) 55(param) + ReturnValue 58 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.frag.out index 634c1b8..dbc78c7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.frag.out @@ -80,7 +80,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -89,7 +89,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test, temp bool test2} @data}) 0:? 'sbuf2' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -176,7 +176,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -185,16 +185,16 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test, temp bool test2} @data}) 0:? 'sbuf2' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 94 +// Generated by (magic number): 80003 +// Id's are bound by 96 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 87 90 + EntryPoint Fragment 4 "main" 89 92 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -212,20 +212,17 @@ gl_FragCoord origin is upper left Name 21 "sbuf" MemberName 21(sbuf) 0 "@data" Name 23 "sbuf" - Name 40 "size" - Name 42 "stride" - Name 57 "sbuf2" - MemberName 57(sbuf2) 0 "@data" + Name 43 "size" + Name 45 "stride" Name 59 "sbuf2" - Name 85 "pos" + MemberName 59(sbuf2) 0 "@data" + Name 61 "sbuf2" Name 87 "pos" - Name 90 "@entryPointOutput" - Name 91 "param" - MemberDecorate 19(sb_t) 0 NonWritable + Name 89 "pos" + Name 92 "@entryPointOutput" + Name 93 "param" MemberDecorate 19(sb_t) 0 Offset 0 - MemberDecorate 19(sb_t) 1 NonWritable MemberDecorate 19(sb_t) 1 Offset 12 - MemberDecorate 19(sb_t) 2 NonWritable MemberDecorate 19(sb_t) 2 Offset 16 Decorate 20 ArrayStride 32 MemberDecorate 21(sbuf) 0 NonWritable @@ -233,13 +230,14 @@ gl_FragCoord origin is upper left Decorate 21(sbuf) BufferBlock Decorate 23(sbuf) DescriptorSet 0 Decorate 23(sbuf) Binding 10 - Decorate 56 ArrayStride 4 - MemberDecorate 57(sbuf2) 0 NonWritable - MemberDecorate 57(sbuf2) 0 Offset 0 - Decorate 57(sbuf2) BufferBlock - Decorate 59(sbuf2) DescriptorSet 0 - Decorate 87(pos) Location 0 - Decorate 90(@entryPointOutput) Location 0 + Decorate 58 ArrayStride 4 + MemberDecorate 59(sbuf2) 0 NonWritable + MemberDecorate 59(sbuf2) 0 Offset 0 + Decorate 59(sbuf2) BufferBlock + Decorate 61(sbuf2) DescriptorSet 0 + Decorate 89(pos) Flat + Decorate 89(pos) Location 0 + Decorate 92(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -261,41 +259,41 @@ gl_FragCoord origin is upper left 27: TypePointer Uniform 19(sb_t) 31: TypePointer Function 14(fvec3) 34: 24(int) Constant 1 - 35: TypePointer Function 15(bool) - 38: 24(int) Constant 2 - 43: 6(int) Constant 32 - 45: TypePointer Uniform 6(int) - 48: 6(int) Constant 0 - 53: TypePointer Uniform 14(fvec3) - 56: TypeRuntimeArray 8(float) - 57(sbuf2): TypeStruct 56 - 58: TypePointer Uniform 57(sbuf2) - 59(sbuf2): 58(ptr) Variable Uniform - 61: TypePointer Uniform 8(float) - 66: 8(float) Constant 0 - 73: TypePointer Function 8(float) - 86: TypePointer Input 6(int) - 87(pos): 86(ptr) Variable Input - 89: TypePointer Output 9(fvec4) -90(@entryPointOutput): 89(ptr) Variable Output + 35: 6(int) Constant 0 + 37: TypePointer Function 15(bool) + 40: 24(int) Constant 2 + 46: 6(int) Constant 32 + 48: TypePointer Uniform 6(int) + 55: TypePointer Uniform 14(fvec3) + 58: TypeRuntimeArray 8(float) + 59(sbuf2): TypeStruct 58 + 60: TypePointer Uniform 59(sbuf2) + 61(sbuf2): 60(ptr) Variable Uniform + 63: TypePointer Uniform 8(float) + 68: 8(float) Constant 0 + 75: TypePointer Function 8(float) + 88: TypePointer Input 6(int) + 89(pos): 88(ptr) Variable Input + 91: TypePointer Output 9(fvec4) +92(@entryPointOutput): 91(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 85(pos): 7(ptr) Variable Function - 91(param): 7(ptr) Variable Function - 88: 6(int) Load 87(pos) - Store 85(pos) 88 - 92: 6(int) Load 85(pos) - Store 91(param) 92 - 93: 9(fvec4) FunctionCall 12(@main(u1;) 91(param) - Store 90(@entryPointOutput) 93 + 87(pos): 7(ptr) Variable Function + 93(param): 7(ptr) Variable Function + 90: 6(int) Load 89(pos) + Store 87(pos) 90 + 94: 6(int) Load 87(pos) + Store 93(param) 94 + 95: 9(fvec4) FunctionCall 12(@main(u1;) 93(param) + Store 92(@entryPointOutput) 95 Return FunctionEnd 12(@main(u1;): 9(fvec4) Function None 10 11(pos): 7(ptr) FunctionParameter 13: Label 18(mydata): 17(ptr) Variable Function - 40(size): 7(ptr) Variable Function - 42(stride): 7(ptr) Variable Function + 43(size): 7(ptr) Variable Function + 45(stride): 7(ptr) Variable Function 26: 6(int) Load 11(pos) 28: 27(ptr) AccessChain 23(sbuf) 25 26 29: 19(sb_t) Load 28 @@ -303,46 +301,48 @@ gl_FragCoord origin is upper left 32: 31(ptr) AccessChain 18(mydata) 25 Store 32 30 33: 6(int) CompositeExtract 29 1 - 36: 35(ptr) AccessChain 18(mydata) 34 - Store 36 33 - 37: 6(int) CompositeExtract 29 2 - 39: 35(ptr) AccessChain 18(mydata) 38 - Store 39 37 - 41: 24(int) ArrayLength 23(sbuf) 0 - Store 40(size) 41 - Store 42(stride) 43 - 44: 6(int) Load 11(pos) - 46: 45(ptr) AccessChain 23(sbuf) 25 44 34 - 47: 6(int) Load 46 - 49: 15(bool) INotEqual 47 48 - SelectionMerge 51 None - BranchConditional 49 50 72 - 50: Label - 52: 6(int) Load 11(pos) - 54: 53(ptr) AccessChain 23(sbuf) 25 52 25 - 55: 14(fvec3) Load 54 - 60: 6(int) Load 11(pos) - 62: 61(ptr) AccessChain 59(sbuf2) 25 60 - 63: 8(float) Load 62 - 64: 14(fvec3) CompositeConstruct 63 63 63 - 65: 14(fvec3) FAdd 55 64 - 67: 8(float) CompositeExtract 65 0 - 68: 8(float) CompositeExtract 65 1 - 69: 8(float) CompositeExtract 65 2 - 70: 9(fvec4) CompositeConstruct 67 68 69 66 - ReturnValue 70 - 72: Label - 74: 73(ptr) AccessChain 18(mydata) 25 48 - 75: 8(float) Load 74 - 76: 6(int) Load 40(size) - 77: 8(float) ConvertUToF 76 - 78: 8(float) FAdd 75 77 - 79: 6(int) Load 42(stride) - 80: 8(float) ConvertUToF 79 - 81: 8(float) FAdd 78 80 - 82: 9(fvec4) CompositeConstruct 81 81 81 81 - ReturnValue 82 - 51: Label - 84: 9(fvec4) Undef - ReturnValue 84 + 36: 15(bool) INotEqual 33 35 + 38: 37(ptr) AccessChain 18(mydata) 34 + Store 38 36 + 39: 6(int) CompositeExtract 29 2 + 41: 15(bool) INotEqual 39 35 + 42: 37(ptr) AccessChain 18(mydata) 40 + Store 42 41 + 44: 24(int) ArrayLength 23(sbuf) 0 + Store 43(size) 44 + Store 45(stride) 46 + 47: 6(int) Load 11(pos) + 49: 48(ptr) AccessChain 23(sbuf) 25 47 34 + 50: 6(int) Load 49 + 51: 15(bool) INotEqual 50 35 + SelectionMerge 53 None + BranchConditional 51 52 74 + 52: Label + 54: 6(int) Load 11(pos) + 56: 55(ptr) AccessChain 23(sbuf) 25 54 25 + 57: 14(fvec3) Load 56 + 62: 6(int) Load 11(pos) + 64: 63(ptr) AccessChain 61(sbuf2) 25 62 + 65: 8(float) Load 64 + 66: 14(fvec3) CompositeConstruct 65 65 65 + 67: 14(fvec3) FAdd 57 66 + 69: 8(float) CompositeExtract 67 0 + 70: 8(float) CompositeExtract 67 1 + 71: 8(float) CompositeExtract 67 2 + 72: 9(fvec4) CompositeConstruct 69 70 71 68 + ReturnValue 72 + 74: Label + 76: 75(ptr) AccessChain 18(mydata) 25 35 + 77: 8(float) Load 76 + 78: 6(int) Load 43(size) + 79: 8(float) ConvertUToF 78 + 80: 8(float) FAdd 77 79 + 81: 6(int) Load 45(stride) + 82: 8(float) ConvertUToF 81 + 83: 8(float) FAdd 80 82 + 84: 9(fvec4) CompositeConstruct 83 83 83 83 + ReturnValue 84 + 53: Label + 86: 9(fvec4) Undef + ReturnValue 86 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.rw.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.rw.frag.out index b1bba58..6604313 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.rw.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.rw.frag.out @@ -74,7 +74,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -83,7 +83,7 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test} @data}) 0:? 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -164,7 +164,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:12 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:12 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:12 Function Call: @main(u1; ( temp 4-component vector of float) @@ -173,10 +173,10 @@ gl_FragCoord origin is upper left 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of structure{ temp 3-component vector of float color, temp bool test} @data}) 0:? 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of float @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 78 Capability Shader @@ -213,6 +213,7 @@ gl_FragCoord origin is upper left MemberDecorate 30(sbuf) 0 Offset 0 Decorate 30(sbuf) BufferBlock Decorate 32(sbuf) DescriptorSet 0 + Decorate 71(pos) Flat Decorate 71(pos) Location 0 Decorate 74(@entryPointOutput) Location 0 2: TypeVoid diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out index 14c2eb6..a5b8505 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out @@ -21,23 +21,22 @@ gl_FragCoord origin is upper left 0:9 'pos' ( in uint) 0:9 Constant: 0:9 2 (const int) -0:9 move second child to first child ( temp float) -0:9 indirect index ( temp float) +0:9 move second child to first child ( temp uint) +0:9 indirect index (layout( row_major std430) buffer uint) 0:9 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:9 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:9 Constant: 0:9 0 (const uint) 0:9 'byteAddrTemp' ( temp int) -0:9 Convert uint to float ( temp float) -0:9 indirect index (layout( row_major std430) buffer uint) -0:9 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) -0:9 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) -0:9 Constant: -0:9 0 (const uint) -0:9 right-shift ( temp int) -0:9 'pos' ( in uint) -0:9 Constant: -0:9 2 (const int) +0:9 indirect index (layout( row_major std430) buffer uint) +0:9 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) +0:9 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) +0:9 Constant: +0:9 0 (const uint) +0:9 right-shift ( temp int) +0:9 'pos' ( in uint) +0:9 Constant: +0:9 2 (const int) 0:? Sequence 0:10 move second child to first child ( temp int) 0:10 'byteAddrTemp' ( temp int) @@ -45,14 +44,14 @@ gl_FragCoord origin is upper left 0:10 'pos' ( in uint) 0:10 Constant: 0:10 2 (const int) -0:10 move second child to first child ( temp float) -0:10 indirect index ( temp float) +0:10 move second child to first child ( temp uint) +0:10 indirect index (layout( row_major std430) buffer uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: 0:10 0 (const uint) 0:10 'byteAddrTemp' ( temp int) -0:10 direct index ( temp float) +0:10 direct index ( temp uint) 0:? Sequence 0:10 move second child to first child ( temp int) 0:10 'byteAddrTemp' ( temp int) @@ -61,13 +60,13 @@ gl_FragCoord origin is upper left 0:10 Constant: 0:10 2 (const int) 0:? Construct vec2 ( temp 2-component vector of uint) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: 0:10 0 (const uint) 0:10 'byteAddrTemp' ( temp int) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: @@ -78,8 +77,8 @@ gl_FragCoord origin is upper left 0:10 1 (const int) 0:10 Constant: 0:10 0 (const int) -0:10 move second child to first child ( temp float) -0:10 indirect index ( temp float) +0:10 move second child to first child ( temp uint) +0:10 indirect index (layout( row_major std430) buffer uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: @@ -88,7 +87,7 @@ gl_FragCoord origin is upper left 0:10 'byteAddrTemp' ( temp int) 0:10 Constant: 0:10 1 (const int) -0:10 direct index ( temp float) +0:10 direct index ( temp uint) 0:? Sequence 0:10 move second child to first child ( temp int) 0:10 'byteAddrTemp' ( temp int) @@ -97,13 +96,13 @@ gl_FragCoord origin is upper left 0:10 Constant: 0:10 2 (const int) 0:? Construct vec2 ( temp 2-component vector of uint) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: 0:10 0 (const uint) 0:10 'byteAddrTemp' ( temp int) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: @@ -121,14 +120,14 @@ gl_FragCoord origin is upper left 0:11 'pos' ( in uint) 0:11 Constant: 0:11 2 (const int) -0:11 move second child to first child ( temp float) -0:11 indirect index ( temp float) +0:11 move second child to first child ( temp uint) +0:11 indirect index (layout( row_major std430) buffer uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: 0:11 0 (const uint) 0:11 'byteAddrTemp' ( temp int) -0:11 direct index ( temp float) +0:11 direct index ( temp uint) 0:? Sequence 0:11 move second child to first child ( temp int) 0:11 'byteAddrTemp' ( temp int) @@ -137,13 +136,13 @@ gl_FragCoord origin is upper left 0:11 Constant: 0:11 2 (const int) 0:? Construct vec3 ( temp 3-component vector of uint) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: 0:11 0 (const uint) 0:11 'byteAddrTemp' ( temp int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -152,7 +151,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 1 (const int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -163,8 +162,8 @@ gl_FragCoord origin is upper left 0:11 2 (const int) 0:11 Constant: 0:11 0 (const int) -0:11 move second child to first child ( temp float) -0:11 indirect index ( temp float) +0:11 move second child to first child ( temp uint) +0:11 indirect index (layout( row_major std430) buffer uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -173,7 +172,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 1 (const int) -0:11 direct index ( temp float) +0:11 direct index ( temp uint) 0:? Sequence 0:11 move second child to first child ( temp int) 0:11 'byteAddrTemp' ( temp int) @@ -182,13 +181,13 @@ gl_FragCoord origin is upper left 0:11 Constant: 0:11 2 (const int) 0:? Construct vec3 ( temp 3-component vector of uint) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: 0:11 0 (const uint) 0:11 'byteAddrTemp' ( temp int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -197,7 +196,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 1 (const int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -208,8 +207,8 @@ gl_FragCoord origin is upper left 0:11 2 (const int) 0:11 Constant: 0:11 1 (const int) -0:11 move second child to first child ( temp float) -0:11 indirect index ( temp float) +0:11 move second child to first child ( temp uint) +0:11 indirect index (layout( row_major std430) buffer uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -218,7 +217,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 2 (const int) -0:11 direct index ( temp float) +0:11 direct index ( temp uint) 0:? Sequence 0:11 move second child to first child ( temp int) 0:11 'byteAddrTemp' ( temp int) @@ -227,13 +226,13 @@ gl_FragCoord origin is upper left 0:11 Constant: 0:11 2 (const int) 0:? Construct vec3 ( temp 3-component vector of uint) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: 0:11 0 (const uint) 0:11 'byteAddrTemp' ( temp int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -242,7 +241,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 1 (const int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -260,14 +259,14 @@ gl_FragCoord origin is upper left 0:12 'pos' ( in uint) 0:12 Constant: 0:12 2 (const int) -0:12 move second child to first child ( temp float) -0:12 indirect index ( temp float) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 direct index ( temp float) +0:12 direct index ( temp uint) 0:? Sequence 0:12 move second child to first child ( temp int) 0:12 'byteAddrTemp' ( temp int) @@ -276,13 +275,13 @@ gl_FragCoord origin is upper left 0:12 Constant: 0:12 2 (const int) 0:? Construct vec4 ( temp 4-component vector of uint) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -291,7 +290,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -300,7 +299,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -311,8 +310,8 @@ gl_FragCoord origin is upper left 0:12 3 (const int) 0:12 Constant: 0:12 0 (const int) -0:12 move second child to first child ( temp float) -0:12 indirect index ( temp float) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -321,7 +320,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 direct index ( temp float) +0:12 direct index ( temp uint) 0:? Sequence 0:12 move second child to first child ( temp int) 0:12 'byteAddrTemp' ( temp int) @@ -330,13 +329,13 @@ gl_FragCoord origin is upper left 0:12 Constant: 0:12 2 (const int) 0:? Construct vec4 ( temp 4-component vector of uint) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -345,7 +344,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -354,7 +353,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -365,8 +364,8 @@ gl_FragCoord origin is upper left 0:12 3 (const int) 0:12 Constant: 0:12 1 (const int) -0:12 move second child to first child ( temp float) -0:12 indirect index ( temp float) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -375,7 +374,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 direct index ( temp float) +0:12 direct index ( temp uint) 0:? Sequence 0:12 move second child to first child ( temp int) 0:12 'byteAddrTemp' ( temp int) @@ -384,13 +383,13 @@ gl_FragCoord origin is upper left 0:12 Constant: 0:12 2 (const int) 0:? Construct vec4 ( temp 4-component vector of uint) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -399,7 +398,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -408,7 +407,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -419,8 +418,8 @@ gl_FragCoord origin is upper left 0:12 3 (const int) 0:12 Constant: 0:12 2 (const int) -0:12 move second child to first child ( temp float) -0:12 indirect index ( temp float) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -429,7 +428,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 3 (const int) -0:12 direct index ( temp float) +0:12 direct index ( temp uint) 0:? Sequence 0:12 move second child to first child ( temp int) 0:12 'byteAddrTemp' ( temp int) @@ -438,13 +437,13 @@ gl_FragCoord origin is upper left 0:12 Constant: 0:12 2 (const int) 0:? Construct vec4 ( temp 4-component vector of uint) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -453,7 +452,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -462,7 +461,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -490,7 +489,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -498,7 +497,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) Linked fragment stage: @@ -526,23 +525,22 @@ gl_FragCoord origin is upper left 0:9 'pos' ( in uint) 0:9 Constant: 0:9 2 (const int) -0:9 move second child to first child ( temp float) -0:9 indirect index ( temp float) +0:9 move second child to first child ( temp uint) +0:9 indirect index (layout( row_major std430) buffer uint) 0:9 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:9 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:9 Constant: 0:9 0 (const uint) 0:9 'byteAddrTemp' ( temp int) -0:9 Convert uint to float ( temp float) -0:9 indirect index (layout( row_major std430) buffer uint) -0:9 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) -0:9 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) -0:9 Constant: -0:9 0 (const uint) -0:9 right-shift ( temp int) -0:9 'pos' ( in uint) -0:9 Constant: -0:9 2 (const int) +0:9 indirect index (layout( row_major std430) buffer uint) +0:9 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) +0:9 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) +0:9 Constant: +0:9 0 (const uint) +0:9 right-shift ( temp int) +0:9 'pos' ( in uint) +0:9 Constant: +0:9 2 (const int) 0:? Sequence 0:10 move second child to first child ( temp int) 0:10 'byteAddrTemp' ( temp int) @@ -550,14 +548,14 @@ gl_FragCoord origin is upper left 0:10 'pos' ( in uint) 0:10 Constant: 0:10 2 (const int) -0:10 move second child to first child ( temp float) -0:10 indirect index ( temp float) +0:10 move second child to first child ( temp uint) +0:10 indirect index (layout( row_major std430) buffer uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: 0:10 0 (const uint) 0:10 'byteAddrTemp' ( temp int) -0:10 direct index ( temp float) +0:10 direct index ( temp uint) 0:? Sequence 0:10 move second child to first child ( temp int) 0:10 'byteAddrTemp' ( temp int) @@ -566,13 +564,13 @@ gl_FragCoord origin is upper left 0:10 Constant: 0:10 2 (const int) 0:? Construct vec2 ( temp 2-component vector of uint) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: 0:10 0 (const uint) 0:10 'byteAddrTemp' ( temp int) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: @@ -583,8 +581,8 @@ gl_FragCoord origin is upper left 0:10 1 (const int) 0:10 Constant: 0:10 0 (const int) -0:10 move second child to first child ( temp float) -0:10 indirect index ( temp float) +0:10 move second child to first child ( temp uint) +0:10 indirect index (layout( row_major std430) buffer uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: @@ -593,7 +591,7 @@ gl_FragCoord origin is upper left 0:10 'byteAddrTemp' ( temp int) 0:10 Constant: 0:10 1 (const int) -0:10 direct index ( temp float) +0:10 direct index ( temp uint) 0:? Sequence 0:10 move second child to first child ( temp int) 0:10 'byteAddrTemp' ( temp int) @@ -602,13 +600,13 @@ gl_FragCoord origin is upper left 0:10 Constant: 0:10 2 (const int) 0:? Construct vec2 ( temp 2-component vector of uint) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: 0:10 0 (const uint) 0:10 'byteAddrTemp' ( temp int) -0:10 indirect index ( temp float) +0:10 indirect index ( temp uint) 0:10 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:10 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:10 Constant: @@ -626,14 +624,14 @@ gl_FragCoord origin is upper left 0:11 'pos' ( in uint) 0:11 Constant: 0:11 2 (const int) -0:11 move second child to first child ( temp float) -0:11 indirect index ( temp float) +0:11 move second child to first child ( temp uint) +0:11 indirect index (layout( row_major std430) buffer uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: 0:11 0 (const uint) 0:11 'byteAddrTemp' ( temp int) -0:11 direct index ( temp float) +0:11 direct index ( temp uint) 0:? Sequence 0:11 move second child to first child ( temp int) 0:11 'byteAddrTemp' ( temp int) @@ -642,13 +640,13 @@ gl_FragCoord origin is upper left 0:11 Constant: 0:11 2 (const int) 0:? Construct vec3 ( temp 3-component vector of uint) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: 0:11 0 (const uint) 0:11 'byteAddrTemp' ( temp int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -657,7 +655,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 1 (const int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -668,8 +666,8 @@ gl_FragCoord origin is upper left 0:11 2 (const int) 0:11 Constant: 0:11 0 (const int) -0:11 move second child to first child ( temp float) -0:11 indirect index ( temp float) +0:11 move second child to first child ( temp uint) +0:11 indirect index (layout( row_major std430) buffer uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -678,7 +676,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 1 (const int) -0:11 direct index ( temp float) +0:11 direct index ( temp uint) 0:? Sequence 0:11 move second child to first child ( temp int) 0:11 'byteAddrTemp' ( temp int) @@ -687,13 +685,13 @@ gl_FragCoord origin is upper left 0:11 Constant: 0:11 2 (const int) 0:? Construct vec3 ( temp 3-component vector of uint) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: 0:11 0 (const uint) 0:11 'byteAddrTemp' ( temp int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -702,7 +700,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 1 (const int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -713,8 +711,8 @@ gl_FragCoord origin is upper left 0:11 2 (const int) 0:11 Constant: 0:11 1 (const int) -0:11 move second child to first child ( temp float) -0:11 indirect index ( temp float) +0:11 move second child to first child ( temp uint) +0:11 indirect index (layout( row_major std430) buffer uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -723,7 +721,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 2 (const int) -0:11 direct index ( temp float) +0:11 direct index ( temp uint) 0:? Sequence 0:11 move second child to first child ( temp int) 0:11 'byteAddrTemp' ( temp int) @@ -732,13 +730,13 @@ gl_FragCoord origin is upper left 0:11 Constant: 0:11 2 (const int) 0:? Construct vec3 ( temp 3-component vector of uint) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: 0:11 0 (const uint) 0:11 'byteAddrTemp' ( temp int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -747,7 +745,7 @@ gl_FragCoord origin is upper left 0:11 'byteAddrTemp' ( temp int) 0:11 Constant: 0:11 1 (const int) -0:11 indirect index ( temp float) +0:11 indirect index ( temp uint) 0:11 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:11 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:11 Constant: @@ -765,14 +763,14 @@ gl_FragCoord origin is upper left 0:12 'pos' ( in uint) 0:12 Constant: 0:12 2 (const int) -0:12 move second child to first child ( temp float) -0:12 indirect index ( temp float) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 direct index ( temp float) +0:12 direct index ( temp uint) 0:? Sequence 0:12 move second child to first child ( temp int) 0:12 'byteAddrTemp' ( temp int) @@ -781,13 +779,13 @@ gl_FragCoord origin is upper left 0:12 Constant: 0:12 2 (const int) 0:? Construct vec4 ( temp 4-component vector of uint) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -796,7 +794,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -805,7 +803,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -816,8 +814,8 @@ gl_FragCoord origin is upper left 0:12 3 (const int) 0:12 Constant: 0:12 0 (const int) -0:12 move second child to first child ( temp float) -0:12 indirect index ( temp float) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -826,7 +824,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 direct index ( temp float) +0:12 direct index ( temp uint) 0:? Sequence 0:12 move second child to first child ( temp int) 0:12 'byteAddrTemp' ( temp int) @@ -835,13 +833,13 @@ gl_FragCoord origin is upper left 0:12 Constant: 0:12 2 (const int) 0:? Construct vec4 ( temp 4-component vector of uint) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -850,7 +848,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -859,7 +857,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -870,8 +868,8 @@ gl_FragCoord origin is upper left 0:12 3 (const int) 0:12 Constant: 0:12 1 (const int) -0:12 move second child to first child ( temp float) -0:12 indirect index ( temp float) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -880,7 +878,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 direct index ( temp float) +0:12 direct index ( temp uint) 0:? Sequence 0:12 move second child to first child ( temp int) 0:12 'byteAddrTemp' ( temp int) @@ -889,13 +887,13 @@ gl_FragCoord origin is upper left 0:12 Constant: 0:12 2 (const int) 0:? Construct vec4 ( temp 4-component vector of uint) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -904,7 +902,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -913,7 +911,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -924,8 +922,8 @@ gl_FragCoord origin is upper left 0:12 3 (const int) 0:12 Constant: 0:12 2 (const int) -0:12 move second child to first child ( temp float) -0:12 indirect index ( temp float) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -934,7 +932,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 3 (const int) -0:12 direct index ( temp float) +0:12 direct index ( temp uint) 0:? Sequence 0:12 move second child to first child ( temp int) 0:12 'byteAddrTemp' ( temp int) @@ -943,13 +941,13 @@ gl_FragCoord origin is upper left 0:12 Constant: 0:12 2 (const int) 0:? Construct vec4 ( temp 4-component vector of uint) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: 0:12 0 (const uint) 0:12 'byteAddrTemp' ( temp int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -958,7 +956,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 1 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -967,7 +965,7 @@ gl_FragCoord origin is upper left 0:12 'byteAddrTemp' ( temp int) 0:12 Constant: 0:12 2 (const int) -0:12 indirect index ( temp float) +0:12 indirect index ( temp uint) 0:12 @data: direct index for structure (layout( row_major std430) buffer implicitly-sized array of uint) 0:12 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:12 Constant: @@ -995,7 +993,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:5 move second child to first child ( temp uint) 0:? 'pos' ( temp uint) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) 0:5 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:5 Function Call: @main(u1; ( temp 4-component vector of float) @@ -1003,16 +1001,16 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? 'sbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data}) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:? 'pos' (layout( location=0) in uint) +0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 240 +// Generated by (magic number): 80003 +// Id's are bound by 239 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 233 236 + EntryPoint Fragment 4 "main" 232 235 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -1023,22 +1021,23 @@ gl_FragCoord origin is upper left MemberName 16(sbuf) 0 "@data" Name 18 "sbuf" Name 22 "byteAddrTemp" - Name 35 "byteAddrTemp" - Name 39 "byteAddrTemp" - Name 70 "byteAddrTemp" - Name 74 "byteAddrTemp" - Name 129 "byteAddrTemp" - Name 133 "byteAddrTemp" - Name 231 "pos" - Name 233 "pos" - Name 236 "@entryPointOutput" - Name 237 "param" + Name 34 "byteAddrTemp" + Name 38 "byteAddrTemp" + Name 69 "byteAddrTemp" + Name 73 "byteAddrTemp" + Name 128 "byteAddrTemp" + Name 132 "byteAddrTemp" + Name 230 "pos" + Name 232 "pos" + Name 235 "@entryPointOutput" + Name 236 "param" Decorate 15 ArrayStride 4 MemberDecorate 16(sbuf) 0 Offset 0 Decorate 16(sbuf) BufferBlock Decorate 18(sbuf) DescriptorSet 0 - Decorate 233(pos) Location 0 - Decorate 236(@entryPointOutput) Location 0 + Decorate 232(pos) Flat + Decorate 232(pos) Location 0 + Decorate 235(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -1055,29 +1054,29 @@ gl_FragCoord origin is upper left 24: 19(int) Constant 2 26: 19(int) Constant 0 30: TypePointer Uniform 6(int) - 46: 19(int) Constant 1 - 50: TypeVector 6(int) 2 - 52: 6(int) Constant 0 - 67: 6(int) Constant 1 - 88: TypeVector 6(int) 3 - 126: 6(int) Constant 2 - 148: 19(int) Constant 3 - 152: TypeVector 6(int) 4 - 220: 6(int) Constant 3 - 232: TypePointer Input 6(int) - 233(pos): 232(ptr) Variable Input - 235: TypePointer Output 9(fvec4) -236(@entryPointOutput): 235(ptr) Variable Output + 45: 19(int) Constant 1 + 49: TypeVector 6(int) 2 + 51: 6(int) Constant 0 + 66: 6(int) Constant 1 + 87: TypeVector 6(int) 3 + 125: 6(int) Constant 2 + 147: 19(int) Constant 3 + 151: TypeVector 6(int) 4 + 219: 6(int) Constant 3 + 231: TypePointer Input 6(int) + 232(pos): 231(ptr) Variable Input + 234: TypePointer Output 9(fvec4) +235(@entryPointOutput): 234(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 231(pos): 7(ptr) Variable Function - 237(param): 7(ptr) Variable Function - 234: 6(int) Load 233(pos) - Store 231(pos) 234 - 238: 6(int) Load 231(pos) - Store 237(param) 238 - 239: 9(fvec4) FunctionCall 12(@main(u1;) 237(param) - Store 236(@entryPointOutput) 239 + 230(pos): 7(ptr) Variable Function + 236(param): 7(ptr) Variable Function + 233: 6(int) Load 232(pos) + Store 230(pos) 233 + 237: 6(int) Load 230(pos) + Store 236(param) 237 + 238: 9(fvec4) FunctionCall 12(@main(u1;) 236(param) + Store 235(@entryPointOutput) 238 Return FunctionEnd 12(@main(u1;): 9(fvec4) Function None 10 @@ -1085,12 +1084,12 @@ gl_FragCoord origin is upper left 13: Label 14(size): 7(ptr) Variable Function 22(byteAddrTemp): 21(ptr) Variable Function -35(byteAddrTemp): 21(ptr) Variable Function -39(byteAddrTemp): 21(ptr) Variable Function -70(byteAddrTemp): 21(ptr) Variable Function -74(byteAddrTemp): 21(ptr) Variable Function -129(byteAddrTemp): 21(ptr) Variable Function -133(byteAddrTemp): 21(ptr) Variable Function +34(byteAddrTemp): 21(ptr) Variable Function +38(byteAddrTemp): 21(ptr) Variable Function +69(byteAddrTemp): 21(ptr) Variable Function +73(byteAddrTemp): 21(ptr) Variable Function +128(byteAddrTemp): 21(ptr) Variable Function +132(byteAddrTemp): 21(ptr) Variable Function 20: 19(int) ArrayLength 18(sbuf) 0 Store 14(size) 20 23: 6(int) Load 11(pos) @@ -1101,208 +1100,207 @@ gl_FragCoord origin is upper left 29: 19(int) ShiftRightLogical 28 24 31: 30(ptr) AccessChain 18(sbuf) 26 29 32: 6(int) Load 31 - 33: 8(float) ConvertUToF 32 - 34: 30(ptr) AccessChain 18(sbuf) 26 27 - Store 34 33 - 36: 6(int) Load 11(pos) - 37: 19(int) ShiftRightLogical 36 24 - Store 35(byteAddrTemp) 37 - 38: 19(int) Load 35(byteAddrTemp) - 40: 6(int) Load 11(pos) - 41: 19(int) ShiftRightLogical 40 24 - Store 39(byteAddrTemp) 41 - 42: 19(int) Load 39(byteAddrTemp) - 43: 30(ptr) AccessChain 18(sbuf) 26 42 - 44: 6(int) Load 43 - 45: 19(int) Load 39(byteAddrTemp) - 47: 19(int) IAdd 45 46 - 48: 30(ptr) AccessChain 18(sbuf) 26 47 - 49: 6(int) Load 48 - 51: 50(ivec2) CompositeConstruct 44 49 - 53: 6(int) CompositeExtract 51 0 - 54: 30(ptr) AccessChain 18(sbuf) 26 38 - Store 54 53 - 55: 19(int) Load 35(byteAddrTemp) - 56: 19(int) IAdd 55 46 - 57: 6(int) Load 11(pos) - 58: 19(int) ShiftRightLogical 57 24 - Store 39(byteAddrTemp) 58 - 59: 19(int) Load 39(byteAddrTemp) - 60: 30(ptr) AccessChain 18(sbuf) 26 59 - 61: 6(int) Load 60 - 62: 19(int) Load 39(byteAddrTemp) - 63: 19(int) IAdd 62 46 - 64: 30(ptr) AccessChain 18(sbuf) 26 63 - 65: 6(int) Load 64 - 66: 50(ivec2) CompositeConstruct 61 65 - 68: 6(int) CompositeExtract 66 1 - 69: 30(ptr) AccessChain 18(sbuf) 26 56 - Store 69 68 - 71: 6(int) Load 11(pos) - 72: 19(int) ShiftRightLogical 71 24 - Store 70(byteAddrTemp) 72 - 73: 19(int) Load 70(byteAddrTemp) - 75: 6(int) Load 11(pos) - 76: 19(int) ShiftRightLogical 75 24 - Store 74(byteAddrTemp) 76 - 77: 19(int) Load 74(byteAddrTemp) - 78: 30(ptr) AccessChain 18(sbuf) 26 77 - 79: 6(int) Load 78 - 80: 19(int) Load 74(byteAddrTemp) - 81: 19(int) IAdd 80 46 - 82: 30(ptr) AccessChain 18(sbuf) 26 81 - 83: 6(int) Load 82 - 84: 19(int) Load 74(byteAddrTemp) - 85: 19(int) IAdd 84 24 - 86: 30(ptr) AccessChain 18(sbuf) 26 85 - 87: 6(int) Load 86 - 89: 88(ivec3) CompositeConstruct 79 83 87 - 90: 6(int) CompositeExtract 89 0 - 91: 30(ptr) AccessChain 18(sbuf) 26 73 - Store 91 90 - 92: 19(int) Load 70(byteAddrTemp) - 93: 19(int) IAdd 92 46 - 94: 6(int) Load 11(pos) - 95: 19(int) ShiftRightLogical 94 24 - Store 74(byteAddrTemp) 95 - 96: 19(int) Load 74(byteAddrTemp) - 97: 30(ptr) AccessChain 18(sbuf) 26 96 - 98: 6(int) Load 97 - 99: 19(int) Load 74(byteAddrTemp) - 100: 19(int) IAdd 99 46 - 101: 30(ptr) AccessChain 18(sbuf) 26 100 - 102: 6(int) Load 101 - 103: 19(int) Load 74(byteAddrTemp) - 104: 19(int) IAdd 103 24 - 105: 30(ptr) AccessChain 18(sbuf) 26 104 - 106: 6(int) Load 105 - 107: 88(ivec3) CompositeConstruct 98 102 106 - 108: 6(int) CompositeExtract 107 1 - 109: 30(ptr) AccessChain 18(sbuf) 26 93 - Store 109 108 - 110: 19(int) Load 70(byteAddrTemp) - 111: 19(int) IAdd 110 24 - 112: 6(int) Load 11(pos) - 113: 19(int) ShiftRightLogical 112 24 - Store 74(byteAddrTemp) 113 - 114: 19(int) Load 74(byteAddrTemp) - 115: 30(ptr) AccessChain 18(sbuf) 26 114 - 116: 6(int) Load 115 - 117: 19(int) Load 74(byteAddrTemp) - 118: 19(int) IAdd 117 46 - 119: 30(ptr) AccessChain 18(sbuf) 26 118 - 120: 6(int) Load 119 - 121: 19(int) Load 74(byteAddrTemp) - 122: 19(int) IAdd 121 24 - 123: 30(ptr) AccessChain 18(sbuf) 26 122 - 124: 6(int) Load 123 - 125: 88(ivec3) CompositeConstruct 116 120 124 - 127: 6(int) CompositeExtract 125 2 - 128: 30(ptr) AccessChain 18(sbuf) 26 111 - Store 128 127 - 130: 6(int) Load 11(pos) - 131: 19(int) ShiftRightLogical 130 24 - Store 129(byteAddrTemp) 131 - 132: 19(int) Load 129(byteAddrTemp) - 134: 6(int) Load 11(pos) - 135: 19(int) ShiftRightLogical 134 24 - Store 133(byteAddrTemp) 135 - 136: 19(int) Load 133(byteAddrTemp) - 137: 30(ptr) AccessChain 18(sbuf) 26 136 - 138: 6(int) Load 137 - 139: 19(int) Load 133(byteAddrTemp) - 140: 19(int) IAdd 139 46 - 141: 30(ptr) AccessChain 18(sbuf) 26 140 - 142: 6(int) Load 141 - 143: 19(int) Load 133(byteAddrTemp) - 144: 19(int) IAdd 143 24 - 145: 30(ptr) AccessChain 18(sbuf) 26 144 - 146: 6(int) Load 145 - 147: 19(int) Load 133(byteAddrTemp) - 149: 19(int) IAdd 147 148 - 150: 30(ptr) AccessChain 18(sbuf) 26 149 - 151: 6(int) Load 150 - 153: 152(ivec4) CompositeConstruct 138 142 146 151 - 154: 6(int) CompositeExtract 153 0 - 155: 30(ptr) AccessChain 18(sbuf) 26 132 - Store 155 154 - 156: 19(int) Load 129(byteAddrTemp) - 157: 19(int) IAdd 156 46 - 158: 6(int) Load 11(pos) - 159: 19(int) ShiftRightLogical 158 24 - Store 133(byteAddrTemp) 159 - 160: 19(int) Load 133(byteAddrTemp) - 161: 30(ptr) AccessChain 18(sbuf) 26 160 - 162: 6(int) Load 161 - 163: 19(int) Load 133(byteAddrTemp) - 164: 19(int) IAdd 163 46 - 165: 30(ptr) AccessChain 18(sbuf) 26 164 - 166: 6(int) Load 165 - 167: 19(int) Load 133(byteAddrTemp) - 168: 19(int) IAdd 167 24 - 169: 30(ptr) AccessChain 18(sbuf) 26 168 - 170: 6(int) Load 169 - 171: 19(int) Load 133(byteAddrTemp) - 172: 19(int) IAdd 171 148 - 173: 30(ptr) AccessChain 18(sbuf) 26 172 - 174: 6(int) Load 173 - 175: 152(ivec4) CompositeConstruct 162 166 170 174 - 176: 6(int) CompositeExtract 175 1 - 177: 30(ptr) AccessChain 18(sbuf) 26 157 - Store 177 176 - 178: 19(int) Load 129(byteAddrTemp) - 179: 19(int) IAdd 178 24 - 180: 6(int) Load 11(pos) - 181: 19(int) ShiftRightLogical 180 24 - Store 133(byteAddrTemp) 181 - 182: 19(int) Load 133(byteAddrTemp) - 183: 30(ptr) AccessChain 18(sbuf) 26 182 - 184: 6(int) Load 183 - 185: 19(int) Load 133(byteAddrTemp) - 186: 19(int) IAdd 185 46 - 187: 30(ptr) AccessChain 18(sbuf) 26 186 - 188: 6(int) Load 187 - 189: 19(int) Load 133(byteAddrTemp) - 190: 19(int) IAdd 189 24 - 191: 30(ptr) AccessChain 18(sbuf) 26 190 - 192: 6(int) Load 191 - 193: 19(int) Load 133(byteAddrTemp) - 194: 19(int) IAdd 193 148 - 195: 30(ptr) AccessChain 18(sbuf) 26 194 - 196: 6(int) Load 195 - 197: 152(ivec4) CompositeConstruct 184 188 192 196 - 198: 6(int) CompositeExtract 197 2 - 199: 30(ptr) AccessChain 18(sbuf) 26 179 - Store 199 198 - 200: 19(int) Load 129(byteAddrTemp) - 201: 19(int) IAdd 200 148 - 202: 6(int) Load 11(pos) - 203: 19(int) ShiftRightLogical 202 24 - Store 133(byteAddrTemp) 203 - 204: 19(int) Load 133(byteAddrTemp) - 205: 30(ptr) AccessChain 18(sbuf) 26 204 - 206: 6(int) Load 205 - 207: 19(int) Load 133(byteAddrTemp) - 208: 19(int) IAdd 207 46 - 209: 30(ptr) AccessChain 18(sbuf) 26 208 - 210: 6(int) Load 209 - 211: 19(int) Load 133(byteAddrTemp) - 212: 19(int) IAdd 211 24 - 213: 30(ptr) AccessChain 18(sbuf) 26 212 - 214: 6(int) Load 213 - 215: 19(int) Load 133(byteAddrTemp) - 216: 19(int) IAdd 215 148 - 217: 30(ptr) AccessChain 18(sbuf) 26 216 - 218: 6(int) Load 217 - 219: 152(ivec4) CompositeConstruct 206 210 214 218 - 221: 6(int) CompositeExtract 219 3 - 222: 30(ptr) AccessChain 18(sbuf) 26 201 - Store 222 221 - 223: 6(int) Load 11(pos) - 224: 19(int) ShiftRightLogical 223 24 - 225: 30(ptr) AccessChain 18(sbuf) 26 224 - 226: 6(int) Load 225 - 227: 8(float) ConvertUToF 226 - 228: 9(fvec4) CompositeConstruct 227 227 227 227 - ReturnValue 228 + 33: 30(ptr) AccessChain 18(sbuf) 26 27 + Store 33 32 + 35: 6(int) Load 11(pos) + 36: 19(int) ShiftRightLogical 35 24 + Store 34(byteAddrTemp) 36 + 37: 19(int) Load 34(byteAddrTemp) + 39: 6(int) Load 11(pos) + 40: 19(int) ShiftRightLogical 39 24 + Store 38(byteAddrTemp) 40 + 41: 19(int) Load 38(byteAddrTemp) + 42: 30(ptr) AccessChain 18(sbuf) 26 41 + 43: 6(int) Load 42 + 44: 19(int) Load 38(byteAddrTemp) + 46: 19(int) IAdd 44 45 + 47: 30(ptr) AccessChain 18(sbuf) 26 46 + 48: 6(int) Load 47 + 50: 49(ivec2) CompositeConstruct 43 48 + 52: 6(int) CompositeExtract 50 0 + 53: 30(ptr) AccessChain 18(sbuf) 26 37 + Store 53 52 + 54: 19(int) Load 34(byteAddrTemp) + 55: 19(int) IAdd 54 45 + 56: 6(int) Load 11(pos) + 57: 19(int) ShiftRightLogical 56 24 + Store 38(byteAddrTemp) 57 + 58: 19(int) Load 38(byteAddrTemp) + 59: 30(ptr) AccessChain 18(sbuf) 26 58 + 60: 6(int) Load 59 + 61: 19(int) Load 38(byteAddrTemp) + 62: 19(int) IAdd 61 45 + 63: 30(ptr) AccessChain 18(sbuf) 26 62 + 64: 6(int) Load 63 + 65: 49(ivec2) CompositeConstruct 60 64 + 67: 6(int) CompositeExtract 65 1 + 68: 30(ptr) AccessChain 18(sbuf) 26 55 + Store 68 67 + 70: 6(int) Load 11(pos) + 71: 19(int) ShiftRightLogical 70 24 + Store 69(byteAddrTemp) 71 + 72: 19(int) Load 69(byteAddrTemp) + 74: 6(int) Load 11(pos) + 75: 19(int) ShiftRightLogical 74 24 + Store 73(byteAddrTemp) 75 + 76: 19(int) Load 73(byteAddrTemp) + 77: 30(ptr) AccessChain 18(sbuf) 26 76 + 78: 6(int) Load 77 + 79: 19(int) Load 73(byteAddrTemp) + 80: 19(int) IAdd 79 45 + 81: 30(ptr) AccessChain 18(sbuf) 26 80 + 82: 6(int) Load 81 + 83: 19(int) Load 73(byteAddrTemp) + 84: 19(int) IAdd 83 24 + 85: 30(ptr) AccessChain 18(sbuf) 26 84 + 86: 6(int) Load 85 + 88: 87(ivec3) CompositeConstruct 78 82 86 + 89: 6(int) CompositeExtract 88 0 + 90: 30(ptr) AccessChain 18(sbuf) 26 72 + Store 90 89 + 91: 19(int) Load 69(byteAddrTemp) + 92: 19(int) IAdd 91 45 + 93: 6(int) Load 11(pos) + 94: 19(int) ShiftRightLogical 93 24 + Store 73(byteAddrTemp) 94 + 95: 19(int) Load 73(byteAddrTemp) + 96: 30(ptr) AccessChain 18(sbuf) 26 95 + 97: 6(int) Load 96 + 98: 19(int) Load 73(byteAddrTemp) + 99: 19(int) IAdd 98 45 + 100: 30(ptr) AccessChain 18(sbuf) 26 99 + 101: 6(int) Load 100 + 102: 19(int) Load 73(byteAddrTemp) + 103: 19(int) IAdd 102 24 + 104: 30(ptr) AccessChain 18(sbuf) 26 103 + 105: 6(int) Load 104 + 106: 87(ivec3) CompositeConstruct 97 101 105 + 107: 6(int) CompositeExtract 106 1 + 108: 30(ptr) AccessChain 18(sbuf) 26 92 + Store 108 107 + 109: 19(int) Load 69(byteAddrTemp) + 110: 19(int) IAdd 109 24 + 111: 6(int) Load 11(pos) + 112: 19(int) ShiftRightLogical 111 24 + Store 73(byteAddrTemp) 112 + 113: 19(int) Load 73(byteAddrTemp) + 114: 30(ptr) AccessChain 18(sbuf) 26 113 + 115: 6(int) Load 114 + 116: 19(int) Load 73(byteAddrTemp) + 117: 19(int) IAdd 116 45 + 118: 30(ptr) AccessChain 18(sbuf) 26 117 + 119: 6(int) Load 118 + 120: 19(int) Load 73(byteAddrTemp) + 121: 19(int) IAdd 120 24 + 122: 30(ptr) AccessChain 18(sbuf) 26 121 + 123: 6(int) Load 122 + 124: 87(ivec3) CompositeConstruct 115 119 123 + 126: 6(int) CompositeExtract 124 2 + 127: 30(ptr) AccessChain 18(sbuf) 26 110 + Store 127 126 + 129: 6(int) Load 11(pos) + 130: 19(int) ShiftRightLogical 129 24 + Store 128(byteAddrTemp) 130 + 131: 19(int) Load 128(byteAddrTemp) + 133: 6(int) Load 11(pos) + 134: 19(int) ShiftRightLogical 133 24 + Store 132(byteAddrTemp) 134 + 135: 19(int) Load 132(byteAddrTemp) + 136: 30(ptr) AccessChain 18(sbuf) 26 135 + 137: 6(int) Load 136 + 138: 19(int) Load 132(byteAddrTemp) + 139: 19(int) IAdd 138 45 + 140: 30(ptr) AccessChain 18(sbuf) 26 139 + 141: 6(int) Load 140 + 142: 19(int) Load 132(byteAddrTemp) + 143: 19(int) IAdd 142 24 + 144: 30(ptr) AccessChain 18(sbuf) 26 143 + 145: 6(int) Load 144 + 146: 19(int) Load 132(byteAddrTemp) + 148: 19(int) IAdd 146 147 + 149: 30(ptr) AccessChain 18(sbuf) 26 148 + 150: 6(int) Load 149 + 152: 151(ivec4) CompositeConstruct 137 141 145 150 + 153: 6(int) CompositeExtract 152 0 + 154: 30(ptr) AccessChain 18(sbuf) 26 131 + Store 154 153 + 155: 19(int) Load 128(byteAddrTemp) + 156: 19(int) IAdd 155 45 + 157: 6(int) Load 11(pos) + 158: 19(int) ShiftRightLogical 157 24 + Store 132(byteAddrTemp) 158 + 159: 19(int) Load 132(byteAddrTemp) + 160: 30(ptr) AccessChain 18(sbuf) 26 159 + 161: 6(int) Load 160 + 162: 19(int) Load 132(byteAddrTemp) + 163: 19(int) IAdd 162 45 + 164: 30(ptr) AccessChain 18(sbuf) 26 163 + 165: 6(int) Load 164 + 166: 19(int) Load 132(byteAddrTemp) + 167: 19(int) IAdd 166 24 + 168: 30(ptr) AccessChain 18(sbuf) 26 167 + 169: 6(int) Load 168 + 170: 19(int) Load 132(byteAddrTemp) + 171: 19(int) IAdd 170 147 + 172: 30(ptr) AccessChain 18(sbuf) 26 171 + 173: 6(int) Load 172 + 174: 151(ivec4) CompositeConstruct 161 165 169 173 + 175: 6(int) CompositeExtract 174 1 + 176: 30(ptr) AccessChain 18(sbuf) 26 156 + Store 176 175 + 177: 19(int) Load 128(byteAddrTemp) + 178: 19(int) IAdd 177 24 + 179: 6(int) Load 11(pos) + 180: 19(int) ShiftRightLogical 179 24 + Store 132(byteAddrTemp) 180 + 181: 19(int) Load 132(byteAddrTemp) + 182: 30(ptr) AccessChain 18(sbuf) 26 181 + 183: 6(int) Load 182 + 184: 19(int) Load 132(byteAddrTemp) + 185: 19(int) IAdd 184 45 + 186: 30(ptr) AccessChain 18(sbuf) 26 185 + 187: 6(int) Load 186 + 188: 19(int) Load 132(byteAddrTemp) + 189: 19(int) IAdd 188 24 + 190: 30(ptr) AccessChain 18(sbuf) 26 189 + 191: 6(int) Load 190 + 192: 19(int) Load 132(byteAddrTemp) + 193: 19(int) IAdd 192 147 + 194: 30(ptr) AccessChain 18(sbuf) 26 193 + 195: 6(int) Load 194 + 196: 151(ivec4) CompositeConstruct 183 187 191 195 + 197: 6(int) CompositeExtract 196 2 + 198: 30(ptr) AccessChain 18(sbuf) 26 178 + Store 198 197 + 199: 19(int) Load 128(byteAddrTemp) + 200: 19(int) IAdd 199 147 + 201: 6(int) Load 11(pos) + 202: 19(int) ShiftRightLogical 201 24 + Store 132(byteAddrTemp) 202 + 203: 19(int) Load 132(byteAddrTemp) + 204: 30(ptr) AccessChain 18(sbuf) 26 203 + 205: 6(int) Load 204 + 206: 19(int) Load 132(byteAddrTemp) + 207: 19(int) IAdd 206 45 + 208: 30(ptr) AccessChain 18(sbuf) 26 207 + 209: 6(int) Load 208 + 210: 19(int) Load 132(byteAddrTemp) + 211: 19(int) IAdd 210 24 + 212: 30(ptr) AccessChain 18(sbuf) 26 211 + 213: 6(int) Load 212 + 214: 19(int) Load 132(byteAddrTemp) + 215: 19(int) IAdd 214 147 + 216: 30(ptr) AccessChain 18(sbuf) 26 215 + 217: 6(int) Load 216 + 218: 151(ivec4) CompositeConstruct 205 209 213 217 + 220: 6(int) CompositeExtract 218 3 + 221: 30(ptr) AccessChain 18(sbuf) 26 200 + Store 221 220 + 222: 6(int) Load 11(pos) + 223: 19(int) ShiftRightLogical 222 24 + 224: 30(ptr) AccessChain 18(sbuf) 26 223 + 225: 6(int) Load 224 + 226: 8(float) ConvertUToF 225 + 227: 9(fvec4) CompositeConstruct 226 226 226 226 + ReturnValue 227 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structin.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structin.vert.out index 8378de2..e605ed3 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structin.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.structin.vert.out @@ -1,15 +1,15 @@ hlsl.structin.vert Shader version: 500 0:? Sequence -0:8 Function Definition: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 Function Definition: @main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Function Parameters: 0:8 'd' ( in 4-component vector of float) -0:8 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 'e' ( in 4-component vector of float) 0:? Sequence 0:11 move second child to first child ( temp 4-component vector of float) 0:11 b: direct index for structure ( temp 4-component vector of float) -0:11 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:11 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:11 Constant: 0:11 2 (const int) 0:11 add ( temp 4-component vector of float) @@ -18,31 +18,66 @@ Shader version: 500 0:11 add ( temp 4-component vector of float) 0:11 direct index ( temp 4-component vector of float) 0:11 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:11 Constant: 0:11 0 (const int) 0:11 Constant: 0:11 1 (const int) 0:11 direct index ( temp 4-component vector of float) 0:11 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:11 Constant: 0:11 0 (const int) 0:11 Constant: 0:11 0 (const int) 0:11 Construct vec4 ( temp 4-component vector of float) -0:11 Convert uint to float ( temp float) -0:11 direct index ( temp uint) -0:11 coord: direct index for structure ( temp 2-component vector of uint) -0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) -0:11 Constant: -0:11 1 (const int) +0:11 direct index ( temp float) +0:11 coord: direct index for structure ( temp 4-component vector of float) +0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:11 Constant: -0:11 0 (const int) +0:11 1 (const int) +0:11 Constant: +0:11 0 (const int) 0:11 'd' ( in 4-component vector of float) 0:11 'e' ( in 4-component vector of float) -0:13 Branch: Return with expression -0:13 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:12 move second child to first child ( temp 4-component vector of float) +0:12 coord: direct index for structure ( temp 4-component vector of float) +0:12 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:12 Constant: +0:12 1 (const int) +0:12 Constant: +0:12 1.000000 +0:12 1.000000 +0:12 1.000000 +0:12 1.000000 +0:13 move second child to first child ( temp 4-component vector of float) +0:13 direct index ( temp 4-component vector of float) +0:13 m: direct index for structure ( temp 2-element array of 4-component vector of float) +0:13 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:13 Constant: +0:13 0 (const int) +0:13 Constant: +0:13 0 (const int) +0:13 Constant: +0:13 2.000000 +0:13 2.000000 +0:13 2.000000 +0:13 2.000000 +0:14 move second child to first child ( temp 4-component vector of float) +0:14 direct index ( temp 4-component vector of float) +0:14 m: direct index for structure ( temp 2-element array of 4-component vector of float) +0:14 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:14 Constant: +0:14 0 (const int) +0:14 Constant: +0:14 1 (const int) +0:14 Constant: +0:14 3.000000 +0:14 3.000000 +0:14 3.000000 +0:14 3.000000 +0:16 Branch: Return with expression +0:16 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Function Definition: main( ( temp void) 0:8 Function Parameters: 0:? Sequence @@ -53,79 +88,83 @@ Shader version: 500 0:8 move second child to first child ( temp 4-component vector of float) 0:8 direct index ( temp 4-component vector of float) 0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: 0:8 0 (const int) 0:8 Constant: 0:8 0 (const int) -0:? 'm[0]' (layout( location=1) in 4-component vector of float) +0:? 'vi.m[0]' (layout( location=1) in 4-component vector of float) 0:8 move second child to first child ( temp 4-component vector of float) 0:8 direct index ( temp 4-component vector of float) 0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: 0:8 0 (const int) 0:8 Constant: 0:8 1 (const int) -0:? 'm[1]' (layout( location=2) in 4-component vector of float) -0:8 move second child to first child ( temp 2-component vector of uint) -0:8 coord: direct index for structure ( temp 2-component vector of uint) -0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? 'vi.m[1]' (layout( location=2) in 4-component vector of float) +0:8 move second child to first child ( temp 4-component vector of float) +0:8 coord: direct index for structure ( temp 4-component vector of float) +0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: 0:8 1 (const int) -0:? 'coord' (layout( location=3) in 2-component vector of uint) +0:? 'vi.coord' (layout( location=3) in 4-component vector of float) 0:8 move second child to first child ( temp 4-component vector of float) 0:8 b: direct index for structure ( temp 4-component vector of float) -0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: 0:8 2 (const int) -0:? 'b' (layout( location=4) in 4-component vector of float) +0:? 'vi.b' (layout( location=4) in 4-component vector of float) 0:8 move second child to first child ( temp 4-component vector of float) 0:? 'e' ( temp 4-component vector of float) 0:? 'e' (layout( location=5) in 4-component vector of float) 0:8 Sequence -0:8 move second child to first child ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) -0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) -0:8 Function Call: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 move second child to first child ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:8 Function Call: @main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:? 'd' ( temp 4-component vector of float) -0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:? 'e' ( temp 4-component vector of float) -0:8 move second child to first child ( temp 2-element array of 4-component vector of float) -0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float) +0:8 direct index ( temp 4-component vector of float) +0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) +0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:8 Constant: +0:8 0 (const int) 0:8 Constant: 0:8 0 (const int) -0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) -0:8 Constant: -0:8 0 (const int) -0:8 move second child to first child ( temp 2-component vector of uint) -0:8 coord: direct index for structure ( temp 2-component vector of uint) -0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) -0:8 Constant: -0:8 1 (const int) -0:8 coord: direct index for structure ( temp 2-component vector of uint) -0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float) +0:8 direct index ( temp 4-component vector of float) +0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) +0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:8 Constant: +0:8 0 (const int) 0:8 Constant: 0:8 1 (const int) 0:8 move second child to first child ( temp 4-component vector of float) -0:8 b: direct index for structure ( temp 4-component vector of float) -0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? '@entryPointOutput.coord' ( out 4-component vector of float Position) +0:8 coord: direct index for structure ( temp 4-component vector of float) +0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: -0:8 2 (const int) +0:8 1 (const int) +0:8 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float) 0:8 b: direct index for structure ( temp 4-component vector of float) -0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: 0:8 2 (const int) 0:? Linker Objects -0:? '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? '@entryPointOutput.coord' ( out 4-component vector of float Position) +0:? '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float) +0:? '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float) 0:? 'd' (layout( location=0) in 4-component vector of float) -0:? 'm[0]' (layout( location=1) in 4-component vector of float) -0:? 'm[1]' (layout( location=2) in 4-component vector of float) -0:? 'm[0]' (layout( location=1) in 4-component vector of float) -0:? 'm[1]' (layout( location=2) in 4-component vector of float) -0:? 'coord' (layout( location=3) in 2-component vector of uint) -0:? 'b' (layout( location=4) in 4-component vector of float) +0:? 'vi.m[0]' (layout( location=1) in 4-component vector of float) +0:? 'vi.m[1]' (layout( location=2) in 4-component vector of float) +0:? 'vi.coord' (layout( location=3) in 4-component vector of float) +0:? 'vi.b' (layout( location=4) in 4-component vector of float) 0:? 'e' (layout( location=5) in 4-component vector of float) @@ -134,15 +173,15 @@ Linked vertex stage: Shader version: 500 0:? Sequence -0:8 Function Definition: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 Function Definition: @main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Function Parameters: 0:8 'd' ( in 4-component vector of float) -0:8 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 'e' ( in 4-component vector of float) 0:? Sequence 0:11 move second child to first child ( temp 4-component vector of float) 0:11 b: direct index for structure ( temp 4-component vector of float) -0:11 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:11 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:11 Constant: 0:11 2 (const int) 0:11 add ( temp 4-component vector of float) @@ -151,31 +190,66 @@ Shader version: 500 0:11 add ( temp 4-component vector of float) 0:11 direct index ( temp 4-component vector of float) 0:11 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:11 Constant: 0:11 0 (const int) 0:11 Constant: 0:11 1 (const int) 0:11 direct index ( temp 4-component vector of float) 0:11 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:11 Constant: 0:11 0 (const int) 0:11 Constant: 0:11 0 (const int) 0:11 Construct vec4 ( temp 4-component vector of float) -0:11 Convert uint to float ( temp float) -0:11 direct index ( temp uint) -0:11 coord: direct index for structure ( temp 2-component vector of uint) -0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) -0:11 Constant: -0:11 1 (const int) +0:11 direct index ( temp float) +0:11 coord: direct index for structure ( temp 4-component vector of float) +0:11 'vi' ( in structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:11 Constant: -0:11 0 (const int) +0:11 1 (const int) +0:11 Constant: +0:11 0 (const int) 0:11 'd' ( in 4-component vector of float) 0:11 'e' ( in 4-component vector of float) -0:13 Branch: Return with expression -0:13 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:12 move second child to first child ( temp 4-component vector of float) +0:12 coord: direct index for structure ( temp 4-component vector of float) +0:12 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:12 Constant: +0:12 1 (const int) +0:12 Constant: +0:12 1.000000 +0:12 1.000000 +0:12 1.000000 +0:12 1.000000 +0:13 move second child to first child ( temp 4-component vector of float) +0:13 direct index ( temp 4-component vector of float) +0:13 m: direct index for structure ( temp 2-element array of 4-component vector of float) +0:13 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:13 Constant: +0:13 0 (const int) +0:13 Constant: +0:13 0 (const int) +0:13 Constant: +0:13 2.000000 +0:13 2.000000 +0:13 2.000000 +0:13 2.000000 +0:14 move second child to first child ( temp 4-component vector of float) +0:14 direct index ( temp 4-component vector of float) +0:14 m: direct index for structure ( temp 2-element array of 4-component vector of float) +0:14 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:14 Constant: +0:14 0 (const int) +0:14 Constant: +0:14 1 (const int) +0:14 Constant: +0:14 3.000000 +0:14 3.000000 +0:14 3.000000 +0:14 3.000000 +0:16 Branch: Return with expression +0:16 'local' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Function Definition: main( ( temp void) 0:8 Function Parameters: 0:? Sequence @@ -186,125 +260,131 @@ Shader version: 500 0:8 move second child to first child ( temp 4-component vector of float) 0:8 direct index ( temp 4-component vector of float) 0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: 0:8 0 (const int) 0:8 Constant: 0:8 0 (const int) -0:? 'm[0]' (layout( location=1) in 4-component vector of float) +0:? 'vi.m[0]' (layout( location=1) in 4-component vector of float) 0:8 move second child to first child ( temp 4-component vector of float) 0:8 direct index ( temp 4-component vector of float) 0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: 0:8 0 (const int) 0:8 Constant: 0:8 1 (const int) -0:? 'm[1]' (layout( location=2) in 4-component vector of float) -0:8 move second child to first child ( temp 2-component vector of uint) -0:8 coord: direct index for structure ( temp 2-component vector of uint) -0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? 'vi.m[1]' (layout( location=2) in 4-component vector of float) +0:8 move second child to first child ( temp 4-component vector of float) +0:8 coord: direct index for structure ( temp 4-component vector of float) +0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: 0:8 1 (const int) -0:? 'coord' (layout( location=3) in 2-component vector of uint) +0:? 'vi.coord' (layout( location=3) in 4-component vector of float) 0:8 move second child to first child ( temp 4-component vector of float) 0:8 b: direct index for structure ( temp 4-component vector of float) -0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: 0:8 2 (const int) -0:? 'b' (layout( location=4) in 4-component vector of float) +0:? 'vi.b' (layout( location=4) in 4-component vector of float) 0:8 move second child to first child ( temp 4-component vector of float) 0:? 'e' ( temp 4-component vector of float) 0:? 'e' (layout( location=5) in 4-component vector of float) 0:8 Sequence -0:8 move second child to first child ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) -0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) -0:8 Function Call: @main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 move second child to first child ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:8 Function Call: @main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4; ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:? 'd' ( temp 4-component vector of float) -0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? 'vi' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:? 'e' ( temp 4-component vector of float) -0:8 move second child to first child ( temp 2-element array of 4-component vector of float) -0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float) +0:8 direct index ( temp 4-component vector of float) +0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) +0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:8 Constant: +0:8 0 (const int) 0:8 Constant: 0:8 0 (const int) -0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) -0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) -0:8 Constant: -0:8 0 (const int) -0:8 move second child to first child ( temp 2-component vector of uint) -0:8 coord: direct index for structure ( temp 2-component vector of uint) -0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) -0:8 Constant: -0:8 1 (const int) -0:8 coord: direct index for structure ( temp 2-component vector of uint) -0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float) +0:8 direct index ( temp 4-component vector of float) +0:8 m: direct index for structure ( temp 2-element array of 4-component vector of float) +0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) +0:8 Constant: +0:8 0 (const int) 0:8 Constant: 0:8 1 (const int) 0:8 move second child to first child ( temp 4-component vector of float) -0:8 b: direct index for structure ( temp 4-component vector of float) -0:8 '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? '@entryPointOutput.coord' ( out 4-component vector of float Position) +0:8 coord: direct index for structure ( temp 4-component vector of float) +0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: -0:8 2 (const int) +0:8 1 (const int) +0:8 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float) 0:8 b: direct index for structure ( temp 4-component vector of float) -0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:8 'flattenTemp' ( temp structure{ temp 2-element array of 4-component vector of float m, temp 4-component vector of float coord, temp 4-component vector of float b}) 0:8 Constant: 0:8 2 (const int) 0:? Linker Objects -0:? '@entryPointOutput' ( out structure Position{ temp 2-element array of 4-component vector of float m, temp 2-component vector of uint coord, temp 4-component vector of float b}) +0:? '@entryPointOutput.coord' ( out 4-component vector of float Position) +0:? '@entryPointOutput.m[0]' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.m[1]' (layout( location=1) out 4-component vector of float) +0:? '@entryPointOutput.b' (layout( location=2) smooth out 4-component vector of float) 0:? 'd' (layout( location=0) in 4-component vector of float) -0:? 'm[0]' (layout( location=1) in 4-component vector of float) -0:? 'm[1]' (layout( location=2) in 4-component vector of float) -0:? 'm[0]' (layout( location=1) in 4-component vector of float) -0:? 'm[1]' (layout( location=2) in 4-component vector of float) -0:? 'coord' (layout( location=3) in 2-component vector of uint) -0:? 'b' (layout( location=4) in 4-component vector of float) +0:? 'vi.m[0]' (layout( location=1) in 4-component vector of float) +0:? 'vi.m[1]' (layout( location=2) in 4-component vector of float) +0:? 'vi.coord' (layout( location=3) in 4-component vector of float) +0:? 'vi.b' (layout( location=4) in 4-component vector of float) 0:? 'e' (layout( location=5) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 92 +// Generated by (magic number): 80003 +// Id's are bound by 94 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 48 51 54 58 62 66 78 + EntryPoint Vertex 4 "main" 55 58 61 64 67 71 82 85 88 91 Source HLSL 500 Name 4 "main" - Name 13 "VI" - MemberName 13(VI) 0 "m" - MemberName 13(VI) 1 "coord" - MemberName 13(VI) 2 "b" - Name 19 "@main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4;" - Name 16 "d" - Name 17 "vi" - Name 18 "e" - Name 21 "local" - Name 46 "d" - Name 48 "d" - Name 50 "vi" - Name 51 "m[0]" - Name 54 "m[1]" - Name 58 "coord" - Name 62 "b" - Name 65 "e" - Name 66 "e" - Name 68 "flattenTemp" - Name 69 "param" - Name 71 "param" - Name 73 "param" - Name 76 "VI" - MemberName 76(VI) 0 "m" - MemberName 76(VI) 1 "coord" - MemberName 76(VI) 2 "b" - Name 78 "@entryPointOutput" - Decorate 48(d) Location 0 - Decorate 51(m[0]) Location 1 - Decorate 54(m[1]) Location 2 - Decorate 58(coord) Location 3 - Decorate 62(b) Location 4 - Decorate 66(e) Location 5 - Decorate 78(@entryPointOutput) BuiltIn Position + Name 12 "VI" + MemberName 12(VI) 0 "m" + MemberName 12(VI) 1 "coord" + MemberName 12(VI) 2 "b" + Name 18 "@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;" + Name 15 "d" + Name 16 "vi" + Name 17 "e" + Name 20 "local" + Name 53 "d" + Name 55 "d" + Name 57 "vi" + Name 58 "vi.m[0]" + Name 61 "vi.m[1]" + Name 64 "vi.coord" + Name 67 "vi.b" + Name 70 "e" + Name 71 "e" + Name 73 "flattenTemp" + Name 74 "param" + Name 76 "param" + Name 78 "param" + Name 82 "@entryPointOutput.m[0]" + Name 85 "@entryPointOutput.m[1]" + Name 88 "@entryPointOutput.coord" + Name 91 "@entryPointOutput.b" + Decorate 55(d) Location 0 + Decorate 58(vi.m[0]) Location 1 + Decorate 61(vi.m[1]) Location 2 + Decorate 64(vi.coord) Location 3 + Decorate 67(vi.b) Location 4 + Decorate 71(e) Location 5 + Decorate 82(@entryPointOutput.m[0]) Location 0 + Decorate 85(@entryPointOutput.m[1]) Location 1 + Decorate 88(@entryPointOutput.coord) BuiltIn Position + Decorate 91(@entryPointOutput.b) Location 2 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -313,101 +393,107 @@ Shader version: 500 9: TypeInt 32 0 10: 9(int) Constant 2 11: TypeArray 7(fvec4) 10 - 12: TypeVector 9(int) 2 - 13(VI): TypeStruct 11 12(ivec2) 7(fvec4) - 14: TypePointer Function 13(VI) - 15: TypeFunction 13(VI) 8(ptr) 14(ptr) 8(ptr) - 22: TypeInt 32 1 - 23: 22(int) Constant 2 - 24: 22(int) Constant 0 - 25: 22(int) Constant 1 - 31: 9(int) Constant 0 - 32: TypePointer Function 9(int) - 47: TypePointer Input 7(fvec4) - 48(d): 47(ptr) Variable Input - 51(m[0]): 47(ptr) Variable Input - 54(m[1]): 47(ptr) Variable Input - 57: TypePointer Input 12(ivec2) - 58(coord): 57(ptr) Variable Input - 60: TypePointer Function 12(ivec2) - 62(b): 47(ptr) Variable Input - 66(e): 47(ptr) Variable Input - 76(VI): TypeStruct 11 12(ivec2) 7(fvec4) - 77: TypePointer Output 76(VI) -78(@entryPointOutput): 77(ptr) Variable Output - 79: TypePointer Function 11 - 82: TypePointer Output 11 - 86: TypePointer Output 12(ivec2) - 90: TypePointer Output 7(fvec4) + 12(VI): TypeStruct 11 7(fvec4) 7(fvec4) + 13: TypePointer Function 12(VI) + 14: TypeFunction 12(VI) 8(ptr) 13(ptr) 8(ptr) + 21: TypeInt 32 1 + 22: 21(int) Constant 2 + 23: 21(int) Constant 0 + 24: 21(int) Constant 1 + 30: 9(int) Constant 0 + 31: TypePointer Function 6(float) + 41: 6(float) Constant 1065353216 + 42: 7(fvec4) ConstantComposite 41 41 41 41 + 44: 6(float) Constant 1073741824 + 45: 7(fvec4) ConstantComposite 44 44 44 44 + 47: 6(float) Constant 1077936128 + 48: 7(fvec4) ConstantComposite 47 47 47 47 + 54: TypePointer Input 7(fvec4) + 55(d): 54(ptr) Variable Input + 58(vi.m[0]): 54(ptr) Variable Input + 61(vi.m[1]): 54(ptr) Variable Input + 64(vi.coord): 54(ptr) Variable Input + 67(vi.b): 54(ptr) Variable Input + 71(e): 54(ptr) Variable Input + 81: TypePointer Output 7(fvec4) +82(@entryPointOutput.m[0]): 81(ptr) Variable Output +85(@entryPointOutput.m[1]): 81(ptr) Variable Output +88(@entryPointOutput.coord): 81(ptr) Variable Output +91(@entryPointOutput.b): 81(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 46(d): 8(ptr) Variable Function - 50(vi): 14(ptr) Variable Function - 65(e): 8(ptr) Variable Function - 68(flattenTemp): 14(ptr) Variable Function - 69(param): 8(ptr) Variable Function - 71(param): 14(ptr) Variable Function - 73(param): 8(ptr) Variable Function - 49: 7(fvec4) Load 48(d) - Store 46(d) 49 - 52: 7(fvec4) Load 51(m[0]) - 53: 8(ptr) AccessChain 50(vi) 24 24 - Store 53 52 - 55: 7(fvec4) Load 54(m[1]) - 56: 8(ptr) AccessChain 50(vi) 24 25 - Store 56 55 - 59: 12(ivec2) Load 58(coord) - 61: 60(ptr) AccessChain 50(vi) 25 - Store 61 59 - 63: 7(fvec4) Load 62(b) - 64: 8(ptr) AccessChain 50(vi) 23 - Store 64 63 - 67: 7(fvec4) Load 66(e) - Store 65(e) 67 - 70: 7(fvec4) Load 46(d) - Store 69(param) 70 - 72: 13(VI) Load 50(vi) - Store 71(param) 72 - 74: 7(fvec4) Load 65(e) - Store 73(param) 74 - 75: 13(VI) FunctionCall 19(@main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4;) 69(param) 71(param) 73(param) - Store 68(flattenTemp) 75 - 80: 79(ptr) AccessChain 68(flattenTemp) 24 - 81: 11 Load 80 - 83: 82(ptr) AccessChain 78(@entryPointOutput) 24 - Store 83 81 - 84: 60(ptr) AccessChain 68(flattenTemp) 25 - 85: 12(ivec2) Load 84 - 87: 86(ptr) AccessChain 78(@entryPointOutput) 25 - Store 87 85 - 88: 8(ptr) AccessChain 68(flattenTemp) 23 - 89: 7(fvec4) Load 88 - 91: 90(ptr) AccessChain 78(@entryPointOutput) 23 - Store 91 89 + 53(d): 8(ptr) Variable Function + 57(vi): 13(ptr) Variable Function + 70(e): 8(ptr) Variable Function + 73(flattenTemp): 13(ptr) Variable Function + 74(param): 8(ptr) Variable Function + 76(param): 13(ptr) Variable Function + 78(param): 8(ptr) Variable Function + 56: 7(fvec4) Load 55(d) + Store 53(d) 56 + 59: 7(fvec4) Load 58(vi.m[0]) + 60: 8(ptr) AccessChain 57(vi) 23 23 + Store 60 59 + 62: 7(fvec4) Load 61(vi.m[1]) + 63: 8(ptr) AccessChain 57(vi) 23 24 + Store 63 62 + 65: 7(fvec4) Load 64(vi.coord) + 66: 8(ptr) AccessChain 57(vi) 24 + Store 66 65 + 68: 7(fvec4) Load 67(vi.b) + 69: 8(ptr) AccessChain 57(vi) 22 + Store 69 68 + 72: 7(fvec4) Load 71(e) + Store 70(e) 72 + 75: 7(fvec4) Load 53(d) + Store 74(param) 75 + 77: 12(VI) Load 57(vi) + Store 76(param) 77 + 79: 7(fvec4) Load 70(e) + Store 78(param) 79 + 80: 12(VI) FunctionCall 18(@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;) 74(param) 76(param) 78(param) + Store 73(flattenTemp) 80 + 83: 8(ptr) AccessChain 73(flattenTemp) 23 23 + 84: 7(fvec4) Load 83 + Store 82(@entryPointOutput.m[0]) 84 + 86: 8(ptr) AccessChain 73(flattenTemp) 23 24 + 87: 7(fvec4) Load 86 + Store 85(@entryPointOutput.m[1]) 87 + 89: 8(ptr) AccessChain 73(flattenTemp) 24 + 90: 7(fvec4) Load 89 + Store 88(@entryPointOutput.coord) 90 + 92: 8(ptr) AccessChain 73(flattenTemp) 22 + 93: 7(fvec4) Load 92 + Store 91(@entryPointOutput.b) 93 Return FunctionEnd -19(@main(vf4;struct-VI-vf4[2]-vu2-vf41;vf4;): 13(VI) Function None 15 - 16(d): 8(ptr) FunctionParameter - 17(vi): 14(ptr) FunctionParameter - 18(e): 8(ptr) FunctionParameter - 20: Label - 21(local): 14(ptr) Variable Function - 26: 8(ptr) AccessChain 17(vi) 24 25 - 27: 7(fvec4) Load 26 - 28: 8(ptr) AccessChain 17(vi) 24 24 - 29: 7(fvec4) Load 28 - 30: 7(fvec4) FAdd 27 29 - 33: 32(ptr) AccessChain 17(vi) 25 31 - 34: 9(int) Load 33 - 35: 6(float) ConvertUToF 34 - 36: 7(fvec4) CompositeConstruct 35 35 35 35 - 37: 7(fvec4) FAdd 30 36 - 38: 7(fvec4) Load 16(d) +18(@main(vf4;struct-VI-vf4[2]-vf4-vf41;vf4;): 12(VI) Function None 14 + 15(d): 8(ptr) FunctionParameter + 16(vi): 13(ptr) FunctionParameter + 17(e): 8(ptr) FunctionParameter + 19: Label + 20(local): 13(ptr) Variable Function + 25: 8(ptr) AccessChain 16(vi) 23 24 + 26: 7(fvec4) Load 25 + 27: 8(ptr) AccessChain 16(vi) 23 23 + 28: 7(fvec4) Load 27 + 29: 7(fvec4) FAdd 26 28 + 32: 31(ptr) AccessChain 16(vi) 24 30 + 33: 6(float) Load 32 + 34: 7(fvec4) CompositeConstruct 33 33 33 33 + 35: 7(fvec4) FAdd 29 34 + 36: 7(fvec4) Load 15(d) + 37: 7(fvec4) FAdd 35 36 + 38: 7(fvec4) Load 17(e) 39: 7(fvec4) FAdd 37 38 - 40: 7(fvec4) Load 18(e) - 41: 7(fvec4) FAdd 39 40 - 42: 8(ptr) AccessChain 21(local) 23 - Store 42 41 - 43: 13(VI) Load 21(local) - ReturnValue 43 + 40: 8(ptr) AccessChain 20(local) 22 + Store 40 39 + 43: 8(ptr) AccessChain 20(local) 24 + Store 43 42 + 46: 8(ptr) AccessChain 20(local) 23 23 + Store 46 45 + 49: 8(ptr) AccessChain 20(local) 23 24 + Store 49 48 + 50: 12(VI) Load 20(local) + ReturnValue 50 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.switch.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.switch.frag.out index c77da93..364c0e0 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.switch.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.switch.frag.out @@ -36,7 +36,7 @@ gl_FragCoord origin is upper left 0:17 Pre-Decrement ( temp 4-component vector of float) 0:17 'input' ( in 4-component vector of float) 0:18 Branch: Break -0:21 switch +0:21 switch: DontFlatten 0:21 condition 0:21 'c' ( in int) 0:21 body @@ -129,10 +129,10 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) 0:2 move second child to first child ( temp int) 0:? 'c' ( temp int) -0:? 'c' (layout( location=1) in int) +0:? 'c' (layout( location=1) flat in int) 0:2 move second child to first child ( temp int) 0:? 'd' ( temp int) -0:? 'd' (layout( location=2) in int) +0:? 'd' (layout( location=2) flat in int) 0:2 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:2 Function Call: @PixelShaderFunction(vf4;i1;i1; ( temp 4-component vector of float) @@ -142,8 +142,8 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) -0:? 'c' (layout( location=1) in int) -0:? 'd' (layout( location=2) in int) +0:? 'c' (layout( location=1) flat in int) +0:? 'd' (layout( location=2) flat in int) Linked fragment stage: @@ -186,7 +186,7 @@ gl_FragCoord origin is upper left 0:17 Pre-Decrement ( temp 4-component vector of float) 0:17 'input' ( in 4-component vector of float) 0:18 Branch: Break -0:21 switch +0:21 switch: DontFlatten 0:21 condition 0:21 'c' ( in int) 0:21 body @@ -279,10 +279,10 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) 0:2 move second child to first child ( temp int) 0:? 'c' ( temp int) -0:? 'c' (layout( location=1) in int) +0:? 'c' (layout( location=1) flat in int) 0:2 move second child to first child ( temp int) 0:? 'd' ( temp int) -0:? 'd' (layout( location=2) in int) +0:? 'd' (layout( location=2) flat in int) 0:2 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:2 Function Call: @PixelShaderFunction(vf4;i1;i1; ( temp 4-component vector of float) @@ -292,11 +292,11 @@ gl_FragCoord origin is upper left 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'input' (layout( location=0) in 4-component vector of float) -0:? 'c' (layout( location=1) in int) -0:? 'd' (layout( location=2) in int) +0:? 'c' (layout( location=1) flat in int) +0:? 'd' (layout( location=2) flat in int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 106 Capability Shader @@ -321,7 +321,9 @@ gl_FragCoord origin is upper left Name 101 "param" Name 103 "param" Decorate 88(input) Location 0 + Decorate 92(c) Flat Decorate 92(c) Location 1 + Decorate 95(d) Flat Decorate 95(d) Location 2 Decorate 98(@entryPointOutput) Location 0 2: TypeVoid @@ -397,7 +399,7 @@ gl_FragCoord origin is upper left Branch 25 25: Label 36: 9(int) Load 13(c) - SelectionMerge 40 None + SelectionMerge 40 DontFlatten Switch 36 39 case 1: 37 case 2: 38 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.swizzle.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.swizzle.frag.out index 59b432b..9caa7f3 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.swizzle.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.swizzle.frag.out @@ -77,7 +77,7 @@ gl_FragCoord origin is upper left 0:? 'AmbientColor' ( global 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 30 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.templatetypes.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.templatetypes.frag.out index 9d0cced..33b734d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.templatetypes.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.templatetypes.frag.out @@ -508,7 +508,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 153 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.this.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.this.frag.out index b35e267..7e0318a 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.this.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.this.frag.out @@ -240,7 +240,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 98 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.tx.bracket.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.tx.bracket.frag.out index 12d5f17..a07f326 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.tx.bracket.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.tx.bracket.frag.out @@ -183,7 +183,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:45 Sequence 0:45 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:45 Color: direct index for structure ( temp 4-component vector of float) 0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:45 Constant: @@ -206,7 +206,7 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di4a' ( uniform itexture2DArray) 0:? 'g_tTex2du4a' ( uniform utexture2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) Linked fragment stage: @@ -396,7 +396,7 @@ gl_FragCoord origin is upper left 0:? Sequence 0:45 Sequence 0:45 move second child to first child ( temp 4-component vector of float) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) 0:45 Color: direct index for structure ( temp 4-component vector of float) 0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float Color}) 0:45 Constant: @@ -419,10 +419,10 @@ gl_FragCoord origin is upper left 0:? 'g_tTex2di4a' ( uniform itexture2DArray) 0:? 'g_tTex2du4a' ( uniform utexture2DArray) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int c1, uniform 2-component vector of int c2, uniform 3-component vector of int c3, uniform 4-component vector of int c4, uniform int o1, uniform 2-component vector of int o2, uniform 3-component vector of int o3, uniform 4-component vector of int o4}) -0:? 'Color' (layout( location=0) out 4-component vector of float) +0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 188 Capability Shader @@ -475,7 +475,7 @@ gl_FragCoord origin is upper left Name 147 "param" Name 153 "param" Name 156 "psout" - Name 164 "Color" + Name 164 "@entryPointOutput.Color" Name 169 "g_sSamp" Name 172 "g_tTex1df4a" Name 175 "g_tTex1di4a" @@ -503,7 +503,7 @@ gl_FragCoord origin is upper left Decorate 114(g_tTex3df4) DescriptorSet 0 Decorate 124(g_tTex3di4) DescriptorSet 0 Decorate 132(g_tTex3du4) DescriptorSet 0 - Decorate 164(Color) Location 0 + Decorate 164(@entryPointOutput.Color) Location 0 Decorate 169(g_sSamp) DescriptorSet 0 Decorate 169(g_sSamp) Binding 0 Decorate 172(g_tTex1df4a) DescriptorSet 0 @@ -573,7 +573,7 @@ gl_FragCoord origin is upper left 157: 20(float) Constant 1065353216 158: 21(fvec4) ConstantComposite 157 157 157 157 163: TypePointer Output 21(fvec4) - 164(Color): 163(ptr) Variable Output +164(@entryPointOutput.Color): 163(ptr) Variable Output 167: TypeSampler 168: TypePointer UniformConstant 167 169(g_sSamp): 168(ptr) Variable UniformConstant @@ -599,7 +599,7 @@ gl_FragCoord origin is upper left 5: Label 165:30(PS_OUTPUT) FunctionCall 32(@main() 166: 21(fvec4) CompositeExtract 165 0 - Store 164(Color) 166 + Store 164(@entryPointOutput.Color) 166 Return FunctionEnd 11(Fn1(vi4;): 7(ivec4) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.half.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.half.frag.out index 889d79b..e19b311 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.half.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.half.frag.out @@ -6,42 +6,70 @@ gl_FragCoord origin is upper left 0:3 Function Parameters: 0:? Sequence 0:4 Sequence -0:4 move second child to first child ( temp mediump float) -0:4 'h0' ( temp mediump float) +0:4 move second child to first child ( temp float) +0:4 'h0' ( temp float) 0:4 Constant: 0:4 0.000000 0:5 Sequence -0:5 move second child to first child ( temp mediump 1-component vector of float) -0:5 'h1' ( temp mediump 1-component vector of float) +0:5 move second child to first child ( temp 1-component vector of float) +0:5 'h1' ( temp 1-component vector of float) 0:5 Constant: 0:5 1.000000 0:6 Sequence -0:6 move second child to first child ( temp mediump 2-component vector of float) -0:6 'h2' ( temp mediump 2-component vector of float) +0:6 move second child to first child ( temp 2-component vector of float) +0:6 'h2' ( temp 2-component vector of float) 0:6 Constant: 0:6 2.000000 0:6 2.000000 0:7 Sequence -0:7 move second child to first child ( temp mediump 3-component vector of float) -0:7 'h3' ( temp mediump 3-component vector of float) +0:7 move second child to first child ( temp 3-component vector of float) +0:7 'h3' ( temp 3-component vector of float) 0:7 Constant: 0:7 3.000000 0:7 3.000000 0:7 3.000000 0:8 Sequence -0:8 move second child to first child ( temp mediump 4-component vector of float) -0:8 'h4' ( temp mediump 4-component vector of float) +0:8 move second child to first child ( temp 4-component vector of float) +0:8 'h4' ( temp 4-component vector of float) 0:8 Constant: 0:8 4.000000 0:8 4.000000 0:8 4.000000 0:8 4.000000 -0:10 Branch: Return with expression -0:10 Constant: -0:10 0.000000 -0:10 0.000000 -0:10 0.000000 -0:10 0.000000 +0:15 Sequence +0:15 move second child to first child ( temp 2X2 matrix of float) +0:15 'h22' ( temp 2X2 matrix of float) +0:? Constant: +0:? 1.000000 +0:? 2.000000 +0:? 3.000000 +0:? 4.000000 +0:16 Sequence +0:16 move second child to first child ( temp 2X3 matrix of float) +0:16 'h23' ( temp 2X3 matrix of float) +0:16 Constant: +0:16 4.900000 +0:16 4.900000 +0:16 4.900000 +0:16 4.900000 +0:16 4.900000 +0:16 4.900000 +0:27 Branch: Return with expression +0:27 Construct vec4 ( temp 4-component vector of float) +0:27 add ( temp float) +0:27 add ( temp float) +0:27 direct index ( temp float) +0:27 direct index ( temp 3-component vector of float) +0:27 'h23' ( temp 2X3 matrix of float) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 0 (const int) +0:27 direct index ( temp float) +0:27 'h4' ( temp 4-component vector of float) +0:27 Constant: +0:27 1 (const int) +0:27 'h0' ( temp float) 0:3 Function Definition: main( ( temp void) 0:3 Function Parameters: 0:? Sequence @@ -62,42 +90,70 @@ gl_FragCoord origin is upper left 0:3 Function Parameters: 0:? Sequence 0:4 Sequence -0:4 move second child to first child ( temp mediump float) -0:4 'h0' ( temp mediump float) +0:4 move second child to first child ( temp float) +0:4 'h0' ( temp float) 0:4 Constant: 0:4 0.000000 0:5 Sequence -0:5 move second child to first child ( temp mediump 1-component vector of float) -0:5 'h1' ( temp mediump 1-component vector of float) +0:5 move second child to first child ( temp 1-component vector of float) +0:5 'h1' ( temp 1-component vector of float) 0:5 Constant: 0:5 1.000000 0:6 Sequence -0:6 move second child to first child ( temp mediump 2-component vector of float) -0:6 'h2' ( temp mediump 2-component vector of float) +0:6 move second child to first child ( temp 2-component vector of float) +0:6 'h2' ( temp 2-component vector of float) 0:6 Constant: 0:6 2.000000 0:6 2.000000 0:7 Sequence -0:7 move second child to first child ( temp mediump 3-component vector of float) -0:7 'h3' ( temp mediump 3-component vector of float) +0:7 move second child to first child ( temp 3-component vector of float) +0:7 'h3' ( temp 3-component vector of float) 0:7 Constant: 0:7 3.000000 0:7 3.000000 0:7 3.000000 0:8 Sequence -0:8 move second child to first child ( temp mediump 4-component vector of float) -0:8 'h4' ( temp mediump 4-component vector of float) +0:8 move second child to first child ( temp 4-component vector of float) +0:8 'h4' ( temp 4-component vector of float) 0:8 Constant: 0:8 4.000000 0:8 4.000000 0:8 4.000000 0:8 4.000000 -0:10 Branch: Return with expression -0:10 Constant: -0:10 0.000000 -0:10 0.000000 -0:10 0.000000 -0:10 0.000000 +0:15 Sequence +0:15 move second child to first child ( temp 2X2 matrix of float) +0:15 'h22' ( temp 2X2 matrix of float) +0:? Constant: +0:? 1.000000 +0:? 2.000000 +0:? 3.000000 +0:? 4.000000 +0:16 Sequence +0:16 move second child to first child ( temp 2X3 matrix of float) +0:16 'h23' ( temp 2X3 matrix of float) +0:16 Constant: +0:16 4.900000 +0:16 4.900000 +0:16 4.900000 +0:16 4.900000 +0:16 4.900000 +0:16 4.900000 +0:27 Branch: Return with expression +0:27 Construct vec4 ( temp 4-component vector of float) +0:27 add ( temp float) +0:27 add ( temp float) +0:27 direct index ( temp float) +0:27 direct index ( temp 3-component vector of float) +0:27 'h23' ( temp 2X3 matrix of float) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 0 (const int) +0:27 direct index ( temp float) +0:27 'h4' ( temp 4-component vector of float) +0:27 Constant: +0:27 1 (const int) +0:27 'h0' ( temp float) 0:3 Function Definition: main( ( temp void) 0:3 Function Parameters: 0:? Sequence @@ -108,13 +164,13 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 36 +// Generated by (magic number): 80003 +// Id's are bound by 60 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 34 + EntryPoint Fragment 4 "main" 58 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -124,13 +180,10 @@ gl_FragCoord origin is upper left Name 18 "h2" Name 23 "h3" Name 27 "h4" - Name 34 "@entryPointOutput" - Decorate 12(h0) RelaxedPrecision - Decorate 14(h1) RelaxedPrecision - Decorate 18(h2) RelaxedPrecision - Decorate 23(h3) RelaxedPrecision - Decorate 27(h4) RelaxedPrecision - Decorate 34(@entryPointOutput) Location 0 + Name 32 "h22" + Name 38 "h23" + Name 58 "@entryPointOutput" + Decorate 58(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -150,13 +203,27 @@ gl_FragCoord origin is upper left 26: TypePointer Function 7(fvec4) 28: 6(float) Constant 1082130432 29: 7(fvec4) ConstantComposite 28 28 28 28 - 30: 7(fvec4) ConstantComposite 13 13 13 13 - 33: TypePointer Output 7(fvec4) -34(@entryPointOutput): 33(ptr) Variable Output + 30: TypeMatrix 16(fvec2) 2 + 31: TypePointer Function 30 + 33: 16(fvec2) ConstantComposite 15 19 + 34: 16(fvec2) ConstantComposite 24 28 + 35: 30 ConstantComposite 33 34 + 36: TypeMatrix 21(fvec3) 2 + 37: TypePointer Function 36 + 39: 6(float) Constant 1084017869 + 40: 21(fvec3) ConstantComposite 39 39 39 + 41: 36 ConstantComposite 40 40 + 42: TypeInt 32 1 + 43: 42(int) Constant 0 + 44: TypeInt 32 0 + 45: 44(int) Constant 0 + 48: 44(int) Constant 1 + 57: TypePointer Output 7(fvec4) +58(@entryPointOutput): 57(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 35: 7(fvec4) FunctionCall 9(@main() - Store 34(@entryPointOutput) 35 + 59: 7(fvec4) FunctionCall 9(@main() + Store 58(@entryPointOutput) 59 Return FunctionEnd 9(@main(): 7(fvec4) Function None 8 @@ -166,10 +233,22 @@ gl_FragCoord origin is upper left 18(h2): 17(ptr) Variable Function 23(h3): 22(ptr) Variable Function 27(h4): 26(ptr) Variable Function + 32(h22): 31(ptr) Variable Function + 38(h23): 37(ptr) Variable Function Store 12(h0) 13 Store 14(h1) 15 Store 18(h2) 20 Store 23(h3) 25 Store 27(h4) 29 - ReturnValue 30 + Store 32(h22) 35 + Store 38(h23) 41 + 46: 11(ptr) AccessChain 38(h23) 43 45 + 47: 6(float) Load 46 + 49: 11(ptr) AccessChain 27(h4) 48 + 50: 6(float) Load 49 + 51: 6(float) FAdd 47 50 + 52: 6(float) Load 12(h0) + 53: 6(float) FAdd 51 52 + 54: 7(fvec4) CompositeConstruct 53 53 53 53 + ReturnValue 54 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.identifier.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.identifier.frag.out index 1977340..9e7861c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.identifier.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.type.identifier.frag.out @@ -50,8 +50,8 @@ gl_FragCoord origin is upper left 0:15 'min10float' ( temp mediump float) 0:15 'min16float' ( temp mediump float) 0:16 Sequence -0:16 move second child to first child ( temp mediump float) -0:16 'half' ( temp mediump float) +0:16 move second child to first child ( temp float) +0:16 'half' ( temp float) 0:16 Constant: 0:16 0.500000 0:? Sequence @@ -99,9 +99,28 @@ gl_FragCoord origin is upper left 0:25 'float' ( temp mediump float) 0:25 Function Call: fn(f1; ( temp mediump float) 0:25 'float' ( temp mediump float) -0:27 Branch: Return with expression -0:27 Construct vec4 ( temp 4-component vector of float) -0:27 'float' ( temp float) +0:28 move second child to first child ( temp float) +0:28 direct index ( temp float) +0:28 direct index ( temp 3-component vector of float) +0:28 'half2x3' ( temp 2X3 matrix of float) +0:28 Constant: +0:28 0 (const int) +0:28 Constant: +0:28 0 (const int) +0:28 component-wise multiply ( temp float) +0:28 'float' ( temp float) +0:28 'float' ( temp float) +0:30 Branch: Return with expression +0:30 Construct vec4 ( temp 4-component vector of float) +0:30 add ( temp float) +0:30 'float' ( temp float) +0:30 direct index ( temp float) +0:30 direct index ( temp 3-component vector of float) +0:30 'half2x3' ( temp 2X3 matrix of float) +0:30 Constant: +0:30 0 (const int) +0:30 Constant: +0:30 0 (const int) 0:9 Function Definition: main( ( temp void) 0:9 Function Parameters: 0:? Sequence @@ -166,8 +185,8 @@ gl_FragCoord origin is upper left 0:15 'min10float' ( temp mediump float) 0:15 'min16float' ( temp mediump float) 0:16 Sequence -0:16 move second child to first child ( temp mediump float) -0:16 'half' ( temp mediump float) +0:16 move second child to first child ( temp float) +0:16 'half' ( temp float) 0:16 Constant: 0:16 0.500000 0:? Sequence @@ -215,9 +234,28 @@ gl_FragCoord origin is upper left 0:25 'float' ( temp mediump float) 0:25 Function Call: fn(f1; ( temp mediump float) 0:25 'float' ( temp mediump float) -0:27 Branch: Return with expression -0:27 Construct vec4 ( temp 4-component vector of float) -0:27 'float' ( temp float) +0:28 move second child to first child ( temp float) +0:28 direct index ( temp float) +0:28 direct index ( temp 3-component vector of float) +0:28 'half2x3' ( temp 2X3 matrix of float) +0:28 Constant: +0:28 0 (const int) +0:28 Constant: +0:28 0 (const int) +0:28 component-wise multiply ( temp float) +0:28 'float' ( temp float) +0:28 'float' ( temp float) +0:30 Branch: Return with expression +0:30 Construct vec4 ( temp 4-component vector of float) +0:30 add ( temp float) +0:30 'float' ( temp float) +0:30 direct index ( temp float) +0:30 direct index ( temp 3-component vector of float) +0:30 'half2x3' ( temp 2X3 matrix of float) +0:30 Constant: +0:30 0 (const int) +0:30 Constant: +0:30 0 (const int) 0:9 Function Definition: main( ( temp void) 0:9 Function Parameters: 0:? Sequence @@ -228,13 +266,13 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 97 +// Generated by (magic number): 80003 +// Id's are bound by 109 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 95 + EntryPoint Fragment 4 "main" 107 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -252,13 +290,13 @@ gl_FragCoord origin is upper left MemberName 56(foo_t) 0 "float" Name 58 "float" Name 86 "param" - Name 95 "@entryPointOutput" + Name 93 "half2x3" + Name 107 "@entryPointOutput" Decorate 49(min16float) RelaxedPrecision Decorate 50 RelaxedPrecision Decorate 51 RelaxedPrecision Decorate 52(min10float) RelaxedPrecision Decorate 53 RelaxedPrecision - Decorate 54(half) RelaxedPrecision Decorate 64 RelaxedPrecision Decorate 65 RelaxedPrecision Decorate 66 RelaxedPrecision @@ -278,7 +316,7 @@ gl_FragCoord origin is upper left Decorate 87 RelaxedPrecision Decorate 88 RelaxedPrecision Decorate 89 RelaxedPrecision - Decorate 95(@entryPointOutput) Location 0 + Decorate 107(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -303,12 +341,16 @@ gl_FragCoord origin is upper left 56(foo_t): TypeStruct 6(float) 57: TypePointer Function 56(foo_t) 59: 6(float) Constant 1109917696 - 94: TypePointer Output 12(fvec4) -95(@entryPointOutput): 94(ptr) Variable Output + 90: TypeVector 6(float) 3 + 91: TypeMatrix 90(fvec3) 2 + 92: TypePointer Function 91 + 97: 22(int) Constant 0 + 106: TypePointer Output 12(fvec4) +107(@entryPointOutput): 106(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 96: 12(fvec4) FunctionCall 14(@main() - Store 95(@entryPointOutput) 96 + 108: 12(fvec4) FunctionCall 14(@main() + Store 107(@entryPointOutput) 108 Return FunctionEnd 10(fn(f1;): 6(float) Function None 8 @@ -329,6 +371,7 @@ gl_FragCoord origin is upper left 58(float): 57(ptr) Variable Function 75: 7(ptr) Variable Function 86(param): 7(ptr) Variable Function + 93(half2x3): 92(ptr) Variable Function Store 19(float) 20 27: 6(float) Load 19(float) 29: 21(bool) FOrdNotEqual 27 28 @@ -390,7 +433,15 @@ gl_FragCoord origin is upper left 88: 6(float) FunctionCall 10(fn(f1;) 86(param) 89: 6(float) FAdd 85 88 Store 19(float) 89 - 90: 6(float) Load 19(float) - 91: 12(fvec4) CompositeConstruct 90 90 90 90 - ReturnValue 91 + 94: 6(float) Load 19(float) + 95: 6(float) Load 19(float) + 96: 6(float) FMul 94 95 + 98: 7(ptr) AccessChain 93(half2x3) 40 97 + Store 98 96 + 99: 6(float) Load 19(float) + 100: 7(ptr) AccessChain 93(half2x3) 40 97 + 101: 6(float) Load 100 + 102: 6(float) FAdd 99 101 + 103: 12(fvec4) CompositeConstruct 102 102 102 102 + ReturnValue 103 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.typeGraphCopy.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.typeGraphCopy.vert.out index 217e7ec..81291dc 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.typeGraphCopy.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.typeGraphCopy.vert.out @@ -62,7 +62,7 @@ Shader version: 500 0:? '@entryPointOutput' (layout( location=0) out float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 28 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.typedef.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.typedef.frag.out index 1c1a351..0b5dc28 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.typedef.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.typedef.frag.out @@ -79,7 +79,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 34 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.void.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.void.frag.out index 1df35a6..60c58cb 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.void.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.void.frag.out @@ -54,7 +54,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 27 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.whileLoop.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.whileLoop.frag.out index cd47dc7..b8fe5e9 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.whileLoop.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/hlsl.whileLoop.frag.out @@ -21,7 +21,7 @@ gl_FragCoord origin is upper left 0:4 Constant: 0:4 false (const bool) 0:4 No loop body -0:5 Loop with condition tested first +0:5 Loop with condition tested first: Unroll 0:5 Loop Condition 0:5 Constant: 0:5 false (const bool) @@ -71,7 +71,7 @@ gl_FragCoord origin is upper left 0:4 Constant: 0:4 false (const bool) 0:4 No loop body -0:5 Loop with condition tested first +0:5 Loop with condition tested first: Unroll 0:5 Loop Condition 0:5 Constant: 0:5 false (const bool) @@ -96,7 +96,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 52 Capability Shader @@ -171,7 +171,7 @@ gl_FragCoord origin is upper left 28: Label Branch 32 32: Label - LoopMerge 34 35 None + LoopMerge 34 35 Unroll Branch 36 36: Label BranchConditional 31 33 34 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/lineContinuation.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/lineContinuation.vert.out index 9290415..3dd8206 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/lineContinuation.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/lineContinuation.vert.out @@ -19,7 +19,7 @@ ERROR: 0:112: '#if' : unexpected tokens following directive ERROR: 0:117: 'macro expansion' : End of line in macro substitution: FOOM ERROR: 0:118: 'preprocessor evaluation' : can't evaluate expression ERROR: 0:118: '#if' : unexpected tokens following directive -ERROR: 0:150: '' : syntax error +ERROR: 0:150: '' : syntax error, unexpected EQUAL ERROR: 19 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/link1.vk.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/link1.vk.frag.out index 436f5e2..26a26af 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/link1.vk.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/link1.vk.frag.out @@ -1,6 +1,4 @@ link1.vk.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - Shader version: 450 gl_FragCoord origin is upper left 0:? Sequence @@ -14,8 +12,6 @@ gl_FragCoord origin is upper left 0:? 'color' ( out highp 4-component vector of float) link2.vk.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - Shader version: 450 gl_FragCoord origin is upper left 0:? Sequence diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/missingBodies.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/missingBodies.vert.out index 7760c3f..3a9a99f 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/missingBodies.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/missingBodies.vert.out @@ -1,6 +1,4 @@ missingBodies.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - Shader version: 450 0:? Sequence 0:4 Function Definition: foo( ( global void) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/negativeArraySize.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/negativeArraySize.comp.out index abdd51e..0a5ba31 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/negativeArraySize.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/negativeArraySize.comp.out @@ -1,5 +1,4 @@ negativeArraySize.comp -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:9: '' : array size must be a positive integer ERROR: 1 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/newTexture.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/newTexture.frag.out index 3a1c7a2..52921e8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/newTexture.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/newTexture.frag.out @@ -1,6 +1,4 @@ newTexture.frag -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. - Shader version: 430 0:? Sequence 0:36 Function Definition: main( ( global void) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/nonVulkan.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/nonVulkan.frag.out index 236f5a8..2b8b6a0 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/nonVulkan.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/nonVulkan.frag.out @@ -1,5 +1,4 @@ nonVulkan.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:3: 'constant_id' : only allowed when generating SPIR-V ERROR: 0:4: 'input_attachment_index' : only allowed when using GLSL for Vulkan ERROR: 0:4: 'input_attachment_index' : can only be used with a subpass diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/numeral.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/numeral.frag.out index 22f4a94..a7343f9 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/numeral.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/numeral.frag.out @@ -1,5 +1,4 @@ numeral.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:14: '' : octal literal digit too large ERROR: 0:15: '' : octal literal digit too large ERROR: 0:16: '' : octal literal digit too large @@ -12,7 +11,9 @@ ERROR: 0:50: '' : hexadecimal literal too big ERROR: 0:88: '' : float literal needs a decimal point or exponent ERROR: 0:98: '' : numeric literal too big ERROR: 0:101: '' : numeric literal too big -ERROR: 12 compilation errors. No code generated. +ERROR: 0:104: '#' : preprocessor directive cannot be preceded by another token +ERROR: 0:104: '' : syntax error, unexpected $end, expecting COMMA or SEMICOLON +ERROR: 14 compilation errors. No code generated. Shader version: 400 @@ -84,12 +85,12 @@ ERROR: node is still EOpNull! 0:17 move second child to first child ( temp int) 0:17 'obig' ( temp int) 0:17 Constant: -0:17 995208915 (const int) +0:17 -1662398820 (const int) 0:18 Sequence 0:18 move second child to first child ( temp int) 0:18 'omax1' ( temp int) 0:18 Constant: -0:18 536870912 (const int) +0:18 0 (const int) 0:20 Sequence 0:20 move second child to first child ( temp uint) 0:20 'uo5' ( temp uint) @@ -224,7 +225,7 @@ ERROR: node is still EOpNull! 0:50 move second child to first child ( temp int) 0:50 'hbig' ( temp int) 0:50 Constant: -0:50 -1 (const int) +0:50 -15 (const int) 0:52 Sequence 0:52 move second child to first child ( temp float) 0:52 'f1' ( temp float) @@ -418,6 +419,7 @@ ERROR: node is still EOpNull! 0:? 'g4' ( global int) 0:? 'g5' ( global int) 0:? 'g6' ( global int) +0:? 'inf1' ( global float) Linked fragment stage: @@ -492,12 +494,12 @@ ERROR: node is still EOpNull! 0:17 move second child to first child ( temp int) 0:17 'obig' ( temp int) 0:17 Constant: -0:17 995208915 (const int) +0:17 -1662398820 (const int) 0:18 Sequence 0:18 move second child to first child ( temp int) 0:18 'omax1' ( temp int) 0:18 Constant: -0:18 536870912 (const int) +0:18 0 (const int) 0:20 Sequence 0:20 move second child to first child ( temp uint) 0:20 'uo5' ( temp uint) @@ -632,7 +634,7 @@ ERROR: node is still EOpNull! 0:50 move second child to first child ( temp int) 0:50 'hbig' ( temp int) 0:50 Constant: -0:50 -1 (const int) +0:50 -15 (const int) 0:52 Sequence 0:52 move second child to first child ( temp float) 0:52 'f1' ( temp float) @@ -826,4 +828,5 @@ ERROR: node is still EOpNull! 0:? 'g4' ( global int) 0:? 'g5' ( global int) 0:? 'g6' ( global int) +0:? 'inf1' ( global float) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/precise.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/precise.tesc.out index 7beff89..abe56f7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/precise.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/precise.tesc.out @@ -1,6 +1,4 @@ precise.tesc -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - Shader version: 450 Requested GL_EXT_gpu_shader5 Requested GL_EXT_shader_io_blocks diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/precise_struct_block.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/precise_struct_block.vert.out index 638bd1b..a239e95 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/precise_struct_block.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/precise_struct_block.vert.out @@ -1,6 +1,4 @@ precise_struct_block.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - Shader version: 450 0:? Sequence 0:11 Function Definition: struct_member( ( global float) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.edge_cases.vert.err b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.edge_cases.vert.err index 5f177e6..e69de29 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.edge_cases.vert.err +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.edge_cases.vert.err @@ -1,2 +0,0 @@ -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.errors.vert.err b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.errors.vert.err index cfde404..bc58895 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.errors.vert.err +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.errors.vert.err @@ -1,4 +1,3 @@ -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:9: '#error' : This should show up in pp output . ERROR: 0:14: '#' : invalid directive: def ERROR: 0:15: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile Y diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.extensions.vert.err b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.extensions.vert.err index 925cc0c..35db303 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.extensions.vert.err +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.extensions.vert.err @@ -1,3 +1,2 @@ -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. WARNING: 0:6: '#extension' : extension not supported: GL_EXT_shader_texture_image_samples diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.function_macro.vert.err b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.function_macro.vert.err index 5f177e6..e69de29 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.function_macro.vert.err +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.function_macro.vert.err @@ -1,2 +0,0 @@ -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.line.frag.err b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.line.frag.err index 5f177e6..e69de29 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.line.frag.err +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.line.frag.err @@ -1,2 +0,0 @@ -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.pragma.vert.err b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.pragma.vert.err index 5f177e6..e69de29 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.pragma.vert.err +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.pragma.vert.err @@ -1,2 +0,0 @@ -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.err b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.err index 5f177e6..e69de29 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.err +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.err @@ -1,2 +0,0 @@ -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.out index 8cbabda..56bfe01 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/preprocessor.simple.vert.out @@ -25,6 +25,6 @@ int main(){ == != & ^ | && ^^ || ? : += -= *= /= %= <<= >>= &= |= ^= - 1.2 2E10 5u - 5 lf + 1.2 2E10 5u - 5l f } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/reflection.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/reflection.vert.out index ba3e0e6..422c049 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/reflection.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/reflection.vert.out @@ -1,6 +1,4 @@ reflection.vert -Warning, version 440 is not yet complete; most version-specific features are present, but some are missing. - Uniform reflection: image_ui2D: offset -1, type 9063, size 1, index -1, binding -1 sampler_2D: offset -1, type 8b5e, size 1, index -1, binding -1 @@ -72,6 +70,10 @@ deepD[1].d2.d1[3].b: offset -1, type 8b56, size 1, index -1, binding -1 deepD[1].v3: offset -1, type 8b54, size 1, index -1, binding -1 abl.foo: offset 0, type 1406, size 1, index 7, binding -1 abl2.foo: offset 0, type 1406, size 1, index 11, binding -1 +buf1.runtimeArray: offset 4, type 1406, size 4, index 12, binding -1 +buf2.runtimeArray.c: offset 8, type 1406, size 1, index 13, binding -1 +buf3.runtimeArray: offset 4, type 1406, size 0, index 14, binding -1 +buf4.runtimeArray.c: offset 8, type 1406, size 1, index 15, binding -1 anonMember1: offset 0, type 8b51, size 1, index 0, binding -1 uf1: offset -1, type 1406, size 1, index -1, binding -1 uf2: offset -1, type 1406, size 1, index -1, binding -1 @@ -90,6 +92,10 @@ abl2[0]: offset -1, type ffffffff, size 4, index -1, binding -1 abl2[1]: offset -1, type ffffffff, size 4, index -1, binding -1 abl2[2]: offset -1, type ffffffff, size 4, index -1, binding -1 abl2[3]: offset -1, type ffffffff, size 4, index -1, binding -1 +buf1: offset -1, type ffffffff, size 4, index -1, binding -1 +buf2: offset -1, type ffffffff, size 4, index -1, binding -1 +buf3: offset -1, type ffffffff, size 4, index -1, binding -1 +buf4: offset -1, type ffffffff, size 4, index -1, binding -1 Vertex attribute reflection: attributeFloat: offset 0, type 1406, size 0, index 0, binding -1 @@ -97,4 +103,5 @@ attributeFloat2: offset 0, type 8b50, size 0, index 0, binding -1 attributeFloat3: offset 0, type 8b51, size 0, index 0, binding -1 attributeFloat4: offset 0, type 8b52, size 0, index 0, binding -1 attributeMat4: offset 0, type 8b5c, size 0, index 0, binding -1 +gl_InstanceID: offset 0, type 1404, size 0, index 0, binding -1 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.dcefunc.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.dcefunc.frag.out index c28d90a..abd8e98 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.dcefunc.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.dcefunc.frag.out @@ -1,8 +1,6 @@ remap.basic.dcefunc.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 22 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.everything.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.everything.frag.out index 357a8d2..b5a5ba7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.everything.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.everything.frag.out @@ -1,8 +1,6 @@ remap.basic.everything.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 24969 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.none.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.none.frag.out index 44f5747..90118b0 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.none.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.none.frag.out @@ -1,8 +1,6 @@ remap.basic.none.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 22 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.strip.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.strip.frag.out index ab1a003..e3e0b0c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.strip.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.basic.strip.frag.out @@ -1,8 +1,6 @@ remap.basic.strip.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 22 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out index 4fc2987..77ed4f3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out @@ -2,14 +2,14 @@ remap.hlsl.sample.basic.everything.frag WARNING: 0:4: 'immediate sampler state' : unimplemented // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 24878 Capability Shader Capability Sampled1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 5663 "main" 4656 4112 + EntryPoint Fragment 5663 "main" 4253 3709 ExecutionMode 5663 OriginUpperLeft Decorate 4727 DescriptorSet 0 Decorate 4727 Binding 0 @@ -26,8 +26,8 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented Decorate 3789 DescriptorSet 0 Decorate 3805 DescriptorSet 0 Decorate 3869 DescriptorSet 0 - Decorate 4656 Location 0 - Decorate 4112 BuiltIn FragDepth + Decorate 4253 Location 0 + Decorate 3709 BuiltIn FragDepth 8: TypeVoid 1282: TypeFunction 8 13: TypeFloat 32 @@ -127,9 +127,9 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented 1284: 29(fvec4) ConstantComposite 138 138 138 138 650: TypePointer Function 13(float) 667: TypePointer Output 29(fvec4) - 4656: 667(ptr) Variable Output + 4253: 667(ptr) Variable Output 651: TypePointer Output 13(float) - 4112: 651(ptr) Variable Output + 3709: 651(ptr) Variable Output 5663: 8 Function None 1282 24877: Label 4104: 1669(ptr) Variable Function @@ -137,10 +137,10 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented Store 4104 18803 13396: 666(ptr) AccessChain 4104 2571 7967: 29(fvec4) Load 13396 - Store 4656 7967 + Store 4253 7967 16622: 650(ptr) AccessChain 4104 2574 11539: 13(float) Load 16622 - Store 4112 11539 + Store 3709 11539 Return FunctionEnd 3317:1032(struct) Function None 319 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.none.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.none.frag.out index af309a1..459c19f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.none.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.none.frag.out @@ -2,7 +2,7 @@ remap.hlsl.sample.basic.none.frag WARNING: 0:4: 'immediate sampler state' : unimplemented // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 198 Capability Shader @@ -58,8 +58,8 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented Name 169 "g_tTexcdu4" Name 176 "psout" Name 185 "flattenTemp" - Name 188 "Color" - Name 192 "Depth" + Name 188 "@entryPointOutput.Color" + Name 192 "@entryPointOutput.Depth" Name 195 "g_sSamp2d" Name 196 "g_sSamp2D_b" Name 197 "g_tTex1df4a" @@ -78,8 +78,8 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented Decorate 151(g_tTexcdf4) DescriptorSet 0 Decorate 160(g_tTexcdi4) DescriptorSet 0 Decorate 169(g_tTexcdu4) DescriptorSet 0 - Decorate 188(Color) Location 0 - Decorate 192(Depth) BuiltIn FragDepth + Decorate 188(@entryPointOutput.Color) Location 0 + Decorate 192(@entryPointOutput.Depth) BuiltIn FragDepth Decorate 195(g_sSamp2d) DescriptorSet 0 Decorate 196(g_sSamp2D_b) DescriptorSet 0 Decorate 197(g_tTex1df4a) DescriptorSet 0 @@ -185,9 +185,9 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented 178: 7(fvec4) ConstantComposite 177 177 177 177 180: TypePointer Function 6(float) 187: TypePointer Output 7(fvec4) - 188(Color): 187(ptr) Variable Output +188(@entryPointOutput.Color): 187(ptr) Variable Output 191: TypePointer Output 6(float) - 192(Depth): 191(ptr) Variable Output +192(@entryPointOutput.Depth): 191(ptr) Variable Output 195(g_sSamp2d): 48(ptr) Variable UniformConstant 196(g_sSamp2D_b): 48(ptr) Variable UniformConstant 197(g_tTex1df4a): 44(ptr) Variable UniformConstant @@ -198,10 +198,10 @@ WARNING: 0:4: 'immediate sampler state' : unimplemented Store 185(flattenTemp) 186 189: 41(ptr) AccessChain 185(flattenTemp) 29 190: 7(fvec4) Load 189 - Store 188(Color) 190 + Store 188(@entryPointOutput.Color) 190 193: 180(ptr) AccessChain 185(flattenTemp) 16 194: 6(float) Load 193 - Store 192(Depth) 194 + Store 192(@entryPointOutput.Depth) 194 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.strip.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.strip.frag.out index d76bdd9..4c9e87e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.strip.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.sample.basic.strip.frag.out @@ -2,7 +2,7 @@ remap.hlsl.sample.basic.strip.frag WARNING: 0:4: 'immediate sampler state' : unimplemented // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 198 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.templatetypes.everything.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.templatetypes.everything.frag.out index 330aecd..e410ccf 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.templatetypes.everything.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.templatetypes.everything.frag.out @@ -1,6 +1,6 @@ remap.hlsl.templatetypes.everything.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 24954 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.templatetypes.none.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.templatetypes.none.frag.out index dd2917e..ef31f71 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.templatetypes.none.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.hlsl.templatetypes.none.frag.out @@ -1,6 +1,6 @@ remap.hlsl.templatetypes.none.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 160 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.if.everything.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.if.everything.frag.out index d20564c..c63002d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.if.everything.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.if.everything.frag.out @@ -1,8 +1,6 @@ remap.if.everything.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 22855 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.if.none.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.if.none.frag.out index 081d5cd..2bb50b6 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.if.none.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.if.none.frag.out @@ -1,8 +1,6 @@ remap.if.none.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 25 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1a.everything.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1a.everything.frag.out index 384b8e8..94e1f86 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1a.everything.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1a.everything.frag.out @@ -1,8 +1,6 @@ remap.similar_1a.everything.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 24916 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1a.none.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1a.none.frag.out index 910ef42..508b54d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1a.none.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1a.none.frag.out @@ -1,8 +1,6 @@ remap.similar_1a.none.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 86 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1b.everything.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1b.everything.frag.out index 0ce4544..4cd16b4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1b.everything.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1b.everything.frag.out @@ -1,8 +1,6 @@ remap.similar_1b.everything.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 24916 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1b.none.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1b.none.frag.out index ce79e00..e5ad330 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1b.none.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.similar_1b.none.frag.out @@ -1,8 +1,6 @@ remap.similar_1b.none.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 91 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.switch.everything.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.switch.everything.frag.out index e5a7ef7..d56bfce 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.switch.everything.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.switch.everything.frag.out @@ -1,10 +1,9 @@ remap.switch.everything.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. WARNING: 0:5: '' : all default precisions are highp; use precision statements to quiet warning, e.g.: "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 23990 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.switch.none.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.switch.none.frag.out index 68d075b..bb42c65 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.switch.none.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.switch.none.frag.out @@ -1,10 +1,9 @@ remap.switch.none.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. WARNING: 0:5: '' : all default precisions are highp; use precision statements to quiet warning, e.g.: "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 48 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.uniformarray.everything.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.uniformarray.everything.frag.out index ed906d5..521819d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.uniformarray.everything.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.uniformarray.everything.frag.out @@ -1,6 +1,6 @@ remap.uniformarray.everything.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 25030 Capability Shader @@ -8,6 +8,7 @@ remap.uniformarray.everything.frag MemoryModel Logical GLSL450 EntryPoint Fragment 5663 "main" 3608 4957 4339 5139 ExecutionMode 5663 OriginUpperLeft + Decorate 5139 Location 0 8: TypeVoid 1282: TypeFunction 8 13: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.uniformarray.none.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.uniformarray.none.frag.out index 526b9e4..1bc458e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.uniformarray.none.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/remap.uniformarray.none.frag.out @@ -1,6 +1,6 @@ remap.uniformarray.none.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 53 Capability Shader @@ -16,6 +16,7 @@ remap.uniformarray.none.frag Name 35 "alpha" Name 47 "gl_FragColor" Name 52 "texSampler2D" + Decorate 47(gl_FragColor) Location 0 Decorate 52(texSampler2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/specExamples.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/specExamples.frag.out index 939ea62..ba47b6c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/specExamples.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/specExamples.frag.out @@ -1,5 +1,4 @@ specExamples.frag -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:6: '=' : cannot convert from ' const uint' to ' global int' ERROR: 0:20: '' : numeric literal too big ERROR: 0:21: '' : hexadecimal literal too big diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/specExamples.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/specExamples.vert.out index f050477..71ce868 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/specExamples.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/specExamples.vert.out @@ -1,5 +1,4 @@ specExamples.vert -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:29: 'location' : can only apply to uniform, buffer, in, or out storage qualifiers ERROR: 0:31: 'triangles' : unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4) ERROR: 0:31: 'invocations' : there is no such layout identifier for this stage taking an assigned value diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.100ops.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.100ops.frag.out index efd8201..f886b43 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.100ops.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.100ops.frag.out @@ -1,8 +1,6 @@ spv.100ops.frag -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 49 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.130.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.130.frag.out index 19c6db0..43fa196 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.130.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.130.frag.out @@ -2,7 +2,7 @@ spv.130.frag WARNING: 0:31: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5 // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 205 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.140.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.140.frag.out index 324cc0c..15c69af 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.140.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.140.frag.out @@ -1,6 +1,6 @@ spv.140.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 96 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.150.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.150.geom.out index 1c98c70..98769f7 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.150.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.150.geom.out @@ -1,6 +1,6 @@ spv.150.geom // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 71 Capability Geometry diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.150.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.150.vert.out index 2843139..203a99d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.150.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.150.vert.out @@ -1,6 +1,6 @@ spv.150.vert // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 63 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300BuiltIns.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300BuiltIns.vert.out index 7dc949d..2f0f269 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300BuiltIns.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300BuiltIns.vert.out @@ -1,8 +1,6 @@ spv.300BuiltIns.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 42 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layout.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layout.frag.out index 7ce08d8..79797d7 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layout.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layout.frag.out @@ -1,8 +1,6 @@ spv.300layout.frag -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 37 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layout.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layout.vert.out index 69f66b6..4674d8c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layout.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layout.vert.out @@ -1,8 +1,6 @@ spv.300layout.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 163 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layoutp.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layoutp.vert.out index 5924137..1f1ae9f 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layoutp.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.300layoutp.vert.out @@ -1,8 +1,6 @@ spv.300layoutp.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 115 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.310.bitcast.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.310.bitcast.frag.out index 14e184a..4b34c9f 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.310.bitcast.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.310.bitcast.frag.out @@ -1,8 +1,6 @@ spv.310.bitcast.frag -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 153 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.310.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.310.comp.out index 4b47c7d..5ca40f8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.310.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.310.comp.out @@ -1,9 +1,7 @@ spv.310.comp -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 69 +// Generated by (magic number): 80003 +// Id's are bound by 71 Capability Shader Capability DeviceGroup @@ -15,17 +13,17 @@ Warning, version 310 is not yet complete; most version-specific features are pre Source ESSL 310 SourceExtension "GL_EXT_device_group" Name 4 "main" - Name 13 "outb" - MemberName 13(outb) 0 "f" - MemberName 13(outb) 1 "g" - MemberName 13(outb) 2 "h" - MemberName 13(outb) 3 "uns" - Name 15 "outbname" - Name 19 "s" - Name 24 "outbna" - MemberName 24(outbna) 0 "k" - MemberName 24(outbna) 1 "na" - Name 26 "outbnamena" + Name 12 "outb" + MemberName 12(outb) 0 "f" + MemberName 12(outb) 1 "g" + MemberName 12(outb) 2 "h" + MemberName 12(outb) 3 "uns" + Name 14 "outbname" + Name 18 "s" + Name 23 "outbna" + MemberName 23(outbna) 0 "k" + MemberName 23(outbna) 1 "na" + Name 25 "outbnamena" Name 42 "i" Name 48 "outs" MemberName 48(outs) 0 "s" @@ -33,17 +31,17 @@ Warning, version 310 is not yet complete; most version-specific features are pre Name 50 "outnames" Name 53 "gl_LocalInvocationID" Name 64 "gl_DeviceIndex" - Decorate 12 ArrayStride 16 - MemberDecorate 13(outb) 0 Offset 0 - MemberDecorate 13(outb) 1 Offset 4 - MemberDecorate 13(outb) 2 Offset 8 - MemberDecorate 13(outb) 3 Offset 16 - Decorate 13(outb) BufferBlock - Decorate 15(outbname) DescriptorSet 0 - MemberDecorate 24(outbna) 0 Offset 0 - MemberDecorate 24(outbna) 1 Offset 16 - Decorate 24(outbna) BufferBlock - Decorate 26(outbnamena) DescriptorSet 0 + Decorate 11 ArrayStride 16 + MemberDecorate 12(outb) 0 Offset 0 + MemberDecorate 12(outb) 1 Offset 4 + MemberDecorate 12(outb) 2 Offset 8 + MemberDecorate 12(outb) 3 Offset 16 + Decorate 12(outb) BufferBlock + Decorate 14(outbname) DescriptorSet 0 + MemberDecorate 23(outbna) 0 Offset 0 + MemberDecorate 23(outbna) 1 Offset 16 + Decorate 23(outbna) BufferBlock + Decorate 25(outbnamena) DescriptorSet 0 Decorate 47 ArrayStride 16 MemberDecorate 48(outs) 0 Offset 0 MemberDecorate 48(outs) 1 Offset 16 @@ -51,81 +49,85 @@ Warning, version 310 is not yet complete; most version-specific features are pre Decorate 50(outnames) DescriptorSet 0 Decorate 53(gl_LocalInvocationID) BuiltIn LocalInvocationId Decorate 64(gl_DeviceIndex) BuiltIn DeviceIndex - Decorate 68 BuiltIn WorkgroupSize + Decorate 70 BuiltIn WorkgroupSize 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 7: 6(int) Constant 2 - 8: 6(int) Constant 1 - 9: 6(int) Constant 0 - 10: TypeFloat 32 - 11: TypeVector 10(float) 3 - 12: TypeRuntimeArray 11(fvec3) - 13(outb): TypeStruct 10(float) 10(float) 10(float) 12 - 14: TypePointer Uniform 13(outb) - 15(outbname): 14(ptr) Variable Uniform - 16: TypeInt 32 1 - 17: 16(int) Constant 0 - 18: TypePointer Workgroup 10(float) - 19(s): 18(ptr) Variable Workgroup - 21: TypePointer Uniform 10(float) - 23: TypeVector 10(float) 4 - 24(outbna): TypeStruct 16(int) 23(fvec4) - 25: TypePointer Uniform 24(outbna) - 26(outbnamena): 25(ptr) Variable Uniform - 27: 16(int) Constant 1 - 30: TypePointer Uniform 23(fvec4) - 32: 16(int) Constant 3 - 33: 16(int) Constant 18 - 36: 16(int) Constant 17 - 37: 10(float) Constant 1077936128 - 38: 11(fvec3) ConstantComposite 37 37 37 - 39: TypePointer Uniform 11(fvec3) - 41: TypePointer Workgroup 16(int) + 8: 6(int) Constant 264 + 9: TypeFloat 32 + 10: TypeVector 9(float) 3 + 11: TypeRuntimeArray 10(fvec3) + 12(outb): TypeStruct 9(float) 9(float) 9(float) 11 + 13: TypePointer Uniform 12(outb) + 14(outbname): 13(ptr) Variable Uniform + 15: TypeInt 32 1 + 16: 15(int) Constant 0 + 17: TypePointer Workgroup 9(float) + 18(s): 17(ptr) Variable Workgroup + 20: TypePointer Uniform 9(float) + 22: TypeVector 9(float) 4 + 23(outbna): TypeStruct 15(int) 22(fvec4) + 24: TypePointer Uniform 23(outbna) + 25(outbnamena): 24(ptr) Variable Uniform + 26: 15(int) Constant 1 + 29: TypePointer Uniform 22(fvec4) + 31: 15(int) Constant 3 + 32: 15(int) Constant 18 + 33: 6(int) Constant 0 + 36: 15(int) Constant 17 + 37: 9(float) Constant 1077936128 + 38: 10(fvec3) ConstantComposite 37 37 37 + 39: TypePointer Uniform 10(fvec3) + 41: TypePointer Workgroup 15(int) 42(i): 41(ptr) Variable Workgroup - 47: TypeRuntimeArray 23(fvec4) - 48(outs): TypeStruct 16(int) 47 + 47: TypeRuntimeArray 22(fvec4) + 48(outs): TypeStruct 15(int) 47 49: TypePointer Uniform 48(outs) 50(outnames): 49(ptr) Variable Uniform 51: TypeVector 6(int) 3 52: TypePointer Input 51(ivec3) 53(gl_LocalInvocationID): 52(ptr) Variable Input 54: TypePointer Input 6(int) - 61: TypePointer Uniform 16(int) - 63: TypePointer Input 16(int) + 61: TypePointer Uniform 15(int) + 63: TypePointer Input 15(int) 64(gl_DeviceIndex): 63(ptr) Variable Input - 65: 6(int) Constant 16 - 66: 6(int) Constant 32 - 67: 6(int) Constant 4 - 68: 51(ivec3) ConstantComposite 65 66 67 + 65: 6(int) Constant 1 + 66: 6(int) Constant 3400 + 67: 6(int) Constant 16 + 68: 6(int) Constant 32 + 69: 6(int) Constant 4 + 70: 51(ivec3) ConstantComposite 67 68 69 4(main): 2 Function None 3 5: Label - ControlBarrier 7 8 9 - 20: 10(float) Load 19(s) - 22: 21(ptr) AccessChain 15(outbname) 17 - Store 22 20 - 28: 10(float) Load 19(s) - 29: 23(fvec4) CompositeConstruct 28 28 28 28 - 31: 30(ptr) AccessChain 26(outbnamena) 27 - Store 31 29 - 34: 21(ptr) AccessChain 15(outbname) 32 33 9 - 35: 10(float) Load 34 - Store 19(s) 35 - 40: 39(ptr) AccessChain 15(outbname) 32 36 + ControlBarrier 7 7 8 + 19: 9(float) Load 18(s) + 21: 20(ptr) AccessChain 14(outbname) 16 + Store 21 19 + 27: 9(float) Load 18(s) + 28: 22(fvec4) CompositeConstruct 27 27 27 27 + 30: 29(ptr) AccessChain 25(outbnamena) 26 + Store 30 28 + 34: 20(ptr) AccessChain 14(outbname) 31 32 33 + 35: 9(float) Load 34 + Store 18(s) 35 + 40: 39(ptr) AccessChain 14(outbname) 31 36 Store 40 38 - 43: 16(int) Load 42(i) - 44: 10(float) Load 19(s) - 45: 11(fvec3) CompositeConstruct 44 44 44 - 46: 39(ptr) AccessChain 15(outbname) 32 43 + 43: 15(int) Load 42(i) + 44: 9(float) Load 18(s) + 45: 10(fvec3) CompositeConstruct 44 44 44 + 46: 39(ptr) AccessChain 14(outbname) 31 43 Store 46 45 - 55: 54(ptr) AccessChain 53(gl_LocalInvocationID) 9 + 55: 54(ptr) AccessChain 53(gl_LocalInvocationID) 33 56: 6(int) Load 55 - 57: 10(float) Load 19(s) - 58: 23(fvec4) CompositeConstruct 57 57 57 57 - 59: 30(ptr) AccessChain 50(outnames) 27 56 + 57: 9(float) Load 18(s) + 58: 22(fvec4) CompositeConstruct 57 57 57 57 + 59: 29(ptr) AccessChain 50(outnames) 26 56 Store 59 58 - 60: 16(int) ArrayLength 15(outbname) 3 - 62: 61(ptr) AccessChain 50(outnames) 17 + 60: 15(int) ArrayLength 14(outbname) 3 + 62: 61(ptr) AccessChain 50(outnames) 16 Store 62 60 + MemoryBarrier 65 8 + MemoryBarrier 7 66 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.330.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.330.geom.out index 3e81dcb..5b211d0 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.330.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.330.geom.out @@ -1,6 +1,6 @@ spv.330.geom // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 32 Capability Geometry diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.frag.out index cb2de96..3f73f5b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.frag.out @@ -1,8 +1,6 @@ spv.400.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 1118 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.tesc.out index 68b142e..13c1ed4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.tesc.out @@ -1,16 +1,14 @@ spv.400.tesc -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 93 +// Generated by (magic number): 80003 +// Id's are bound by 92 Capability Tessellation Capability TessellationPointSize Capability ClipDistance 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 24 41 44 47 54 68 73 79 83 84 87 88 91 92 + EntryPoint TessellationControl 4 "main" 24 41 44 47 53 67 72 78 82 83 86 87 90 91 ExecutionMode 4 OutputVertices 4 Source GLSL 400 SourceExtension "GL_ARB_separate_shader_objects" @@ -34,17 +32,17 @@ Warning, version 400 is not yet complete; most version-specific features are pre MemberName 50(gl_PerVertex) 0 "gl_Position" MemberName 50(gl_PerVertex) 1 "gl_PointSize" MemberName 50(gl_PerVertex) 2 "gl_ClipDistance" - Name 54 "gl_out" - Name 68 "gl_TessLevelOuter" - Name 73 "gl_TessLevelInner" - Name 78 "outa" - Name 79 "patchOut" - Name 83 "inb" - Name 84 "ind" - Name 87 "ivla" - Name 88 "ivlb" - Name 91 "ovla" - Name 92 "ovlb" + Name 53 "gl_out" + Name 67 "gl_TessLevelOuter" + Name 72 "gl_TessLevelInner" + Name 77 "outa" + Name 78 "patchOut" + Name 82 "inb" + Name 83 "ind" + Name 86 "ivla" + Name 87 "ivlb" + Name 90 "ovla" + Name 91 "ovlb" MemberDecorate 20(gl_PerVertex) 0 BuiltIn Position MemberDecorate 20(gl_PerVertex) 1 BuiltIn PointSize MemberDecorate 20(gl_PerVertex) 2 BuiltIn ClipDistance @@ -56,20 +54,20 @@ Warning, version 400 is not yet complete; most version-specific features are pre MemberDecorate 50(gl_PerVertex) 1 BuiltIn PointSize MemberDecorate 50(gl_PerVertex) 2 BuiltIn ClipDistance Decorate 50(gl_PerVertex) Block - Decorate 68(gl_TessLevelOuter) Patch - Decorate 68(gl_TessLevelOuter) BuiltIn TessLevelOuter - Decorate 73(gl_TessLevelInner) Patch - Decorate 73(gl_TessLevelInner) BuiltIn TessLevelInner - Decorate 79(patchOut) Patch - Decorate 87(ivla) Location 3 - Decorate 88(ivlb) Location 4 - Decorate 91(ovla) Location 3 - Decorate 92(ovlb) Location 4 + Decorate 67(gl_TessLevelOuter) Patch + Decorate 67(gl_TessLevelOuter) BuiltIn TessLevelOuter + Decorate 72(gl_TessLevelInner) Patch + Decorate 72(gl_TessLevelInner) BuiltIn TessLevelInner + Decorate 78(patchOut) Patch + Decorate 86(ivla) Location 3 + Decorate 87(ivlb) Location 4 + Decorate 90(ovla) Location 3 + Decorate 91(ovlb) Location 4 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 7: 6(int) Constant 2 - 8: 6(int) Constant 1 + 8: 6(int) Constant 4 9: 6(int) Constant 0 10: TypeInt 32 1 11: TypePointer Function 10(int) @@ -96,37 +94,36 @@ Warning, version 400 is not yet complete; most version-specific features are pre 47(gl_InvocationID): 40(ptr) Variable Input 49: TypeArray 14(float) 7 50(gl_PerVertex): TypeStruct 15(fvec4) 14(float) 49 - 51: 6(int) Constant 4 - 52: TypeArray 50(gl_PerVertex) 51 - 53: TypePointer Output 52 - 54(gl_out): 53(ptr) Variable Output - 57: TypePointer Output 15(fvec4) - 61: TypePointer Output 14(float) - 66: TypeArray 14(float) 51 - 67: TypePointer Output 66 -68(gl_TessLevelOuter): 67(ptr) Variable Output - 69: 10(int) Constant 3 - 70: 14(float) Constant 1078774989 - 72: TypePointer Output 49 -73(gl_TessLevelInner): 72(ptr) Variable Output - 74: 14(float) Constant 1067869798 - 76: TypeArray 10(int) 51 - 77: TypePointer Private 76 - 78(outa): 77(ptr) Variable Private - 79(patchOut): 57(ptr) Variable Output - 80: TypeVector 14(float) 2 - 81: TypeArray 80(fvec2) 21 - 82: TypePointer Input 81 - 83(inb): 82(ptr) Variable Input - 84(ind): 82(ptr) Variable Input - 85: TypeArray 15(fvec4) 21 - 86: TypePointer Input 85 - 87(ivla): 86(ptr) Variable Input - 88(ivlb): 86(ptr) Variable Input - 89: TypeArray 15(fvec4) 51 - 90: TypePointer Output 89 - 91(ovla): 90(ptr) Variable Output - 92(ovlb): 90(ptr) Variable Output + 51: TypeArray 50(gl_PerVertex) 8 + 52: TypePointer Output 51 + 53(gl_out): 52(ptr) Variable Output + 56: TypePointer Output 15(fvec4) + 60: TypePointer Output 14(float) + 65: TypeArray 14(float) 8 + 66: TypePointer Output 65 +67(gl_TessLevelOuter): 66(ptr) Variable Output + 68: 10(int) Constant 3 + 69: 14(float) Constant 1078774989 + 71: TypePointer Output 49 +72(gl_TessLevelInner): 71(ptr) Variable Output + 73: 14(float) Constant 1067869798 + 75: TypeArray 10(int) 8 + 76: TypePointer Private 75 + 77(outa): 76(ptr) Variable Private + 78(patchOut): 56(ptr) Variable Output + 79: TypeVector 14(float) 2 + 80: TypeArray 79(fvec2) 21 + 81: TypePointer Input 80 + 82(inb): 81(ptr) Variable Input + 83(ind): 81(ptr) Variable Input + 84: TypeArray 15(fvec4) 21 + 85: TypePointer Input 84 + 86(ivla): 85(ptr) Variable Input + 87(ivlb): 85(ptr) Variable Input + 88: TypeArray 15(fvec4) 8 + 89: TypePointer Output 88 + 90(ovla): 89(ptr) Variable Output + 91(ovlb): 89(ptr) Variable Output 4(main): 2 Function None 3 5: Label 12(a): 11(ptr) Variable Function @@ -153,21 +150,21 @@ Warning, version 400 is not yet complete; most version-specific features are pre Store 43(pid) 45 48: 10(int) Load 47(gl_InvocationID) Store 46(iid) 48 - 55: 10(int) Load 47(gl_InvocationID) - 56: 15(fvec4) Load 17(p) - 58: 57(ptr) AccessChain 54(gl_out) 55 26 - Store 58 56 - 59: 10(int) Load 47(gl_InvocationID) - 60: 14(float) Load 31(ps) - 62: 61(ptr) AccessChain 54(gl_out) 59 25 - Store 62 60 - 63: 10(int) Load 47(gl_InvocationID) - 64: 14(float) Load 35(cd) - 65: 61(ptr) AccessChain 54(gl_out) 63 36 25 - Store 65 64 - 71: 61(ptr) AccessChain 68(gl_TessLevelOuter) 69 - Store 71 70 - 75: 61(ptr) AccessChain 73(gl_TessLevelInner) 25 - Store 75 74 + 54: 10(int) Load 47(gl_InvocationID) + 55: 15(fvec4) Load 17(p) + 57: 56(ptr) AccessChain 53(gl_out) 54 26 + Store 57 55 + 58: 10(int) Load 47(gl_InvocationID) + 59: 14(float) Load 31(ps) + 61: 60(ptr) AccessChain 53(gl_out) 58 25 + Store 61 59 + 62: 10(int) Load 47(gl_InvocationID) + 63: 14(float) Load 35(cd) + 64: 60(ptr) AccessChain 53(gl_out) 62 36 25 + Store 64 63 + 70: 60(ptr) AccessChain 67(gl_TessLevelOuter) 68 + Store 70 69 + 74: 60(ptr) AccessChain 72(gl_TessLevelInner) 25 + Store 74 73 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.tese.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.tese.out index 0c62bed..5a0c745 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.tese.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.400.tese.out @@ -1,8 +1,6 @@ spv.400.tese -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 96 Capability Tessellation diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.420.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.420.geom.out index 6413d5a..41a8427 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.420.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.420.geom.out @@ -1,8 +1,6 @@ spv.420.geom -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 72 Capability Geometry diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.430.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.430.frag.out index abe2a58..97c35e1 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.430.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.430.frag.out @@ -1,8 +1,6 @@ spv.430.frag -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 24 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.430.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.430.vert.out index 8ea95d1..07f5cd7 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.430.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.430.vert.out @@ -1,8 +1,6 @@ spv.430.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 66 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.geom.out index 85c6814..e3b58e7 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.geom.out @@ -1,15 +1,14 @@ spv.450.geom -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 26 +// Generated by (magic number): 80003 +// Id's are bound by 31 Capability Geometry Capability GeometryPointSize + Capability MultiViewport 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Geometry 4 "main" 13 20 + EntryPoint Geometry 4 "main" 13 20 27 29 ExecutionMode 4 Triangles ExecutionMode 4 Invocations 4 ExecutionMode 4 OutputLineStrip @@ -28,6 +27,8 @@ Warning, version 450 is not yet complete; most version-specific features are pre MemberName 16(gl_PerVertex) 2 "gl_ClipDistance" MemberName 16(gl_PerVertex) 3 "gl_CullDistance" Name 20 "gl_in" + Name 27 "gl_Layer" + Name 29 "gl_ViewportIndex" MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance @@ -38,6 +39,8 @@ Warning, version 450 is not yet complete; most version-specific features are pre MemberDecorate 16(gl_PerVertex) 2 BuiltIn ClipDistance MemberDecorate 16(gl_PerVertex) 3 BuiltIn CullDistance Decorate 16(gl_PerVertex) Block + Decorate 27(gl_Layer) BuiltIn Layer + Decorate 29(gl_ViewportIndex) BuiltIn ViewportIndex 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -57,11 +60,18 @@ Warning, version 450 is not yet complete; most version-specific features are pre 20(gl_in): 19(ptr) Variable Input 21: TypePointer Input 6(float) 24: TypePointer Output 6(float) + 26: TypePointer Output 14(int) + 27(gl_Layer): 26(ptr) Variable Output + 28: 14(int) Constant 2 +29(gl_ViewportIndex): 26(ptr) Variable Output + 30: 14(int) Constant 3 4(main): 2 Function None 3 5: Label 22: 21(ptr) AccessChain 20(gl_in) 15 15 23: 6(float) Load 22 25: 24(ptr) AccessChain 13 15 Store 25 23 + Store 27(gl_Layer) 28 + Store 29(gl_ViewportIndex) 30 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.noRedecl.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.noRedecl.tesc.out index e62aa38..20a6592 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.noRedecl.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.noRedecl.tesc.out @@ -1,8 +1,6 @@ spv.450.noRedecl.tesc -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 21 Capability Tessellation diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.tesc.out index a0bf3dd..a93b9cb 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.450.tesc.out @@ -1,79 +1,120 @@ spv.450.tesc -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 23 +// Generated by (magic number): 80003 +// Id's are bound by 45 Capability Tessellation 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 9 16 19 22 + EntryPoint TessellationControl 4 "main" 15 18 25 32 38 41 44 ExecutionMode 4 OutputVertices 4 Source GLSL 450 Name 4 "main" - Name 9 "patchOut" - Name 10 "S" - MemberName 10(S) 0 "sMem1" - MemberName 10(S) 1 "sMem2" - Name 11 "TheBlock" - MemberName 11(TheBlock) 0 "bMem1" - MemberName 11(TheBlock) 1 "bMem2" - MemberName 11(TheBlock) 2 "s" - Name 16 "tcBlock" - Name 17 "SingleBlock" - MemberName 17(SingleBlock) 0 "bMem1" - MemberName 17(SingleBlock) 1 "bMem2" - MemberName 17(SingleBlock) 2 "s" - Name 19 "singleBlock" - Name 20 "bn" - MemberName 20(bn) 0 "v1" - MemberName 20(bn) 1 "v2" - MemberName 20(bn) 2 "v3" - Name 22 "" - Decorate 9(patchOut) Patch - MemberDecorate 11(TheBlock) 0 Patch - MemberDecorate 11(TheBlock) 1 Patch - MemberDecorate 11(TheBlock) 2 Patch - Decorate 11(TheBlock) Block - Decorate 16(tcBlock) Location 12 - MemberDecorate 17(SingleBlock) 0 Patch - MemberDecorate 17(SingleBlock) 0 Location 2 - MemberDecorate 17(SingleBlock) 1 Patch - MemberDecorate 17(SingleBlock) 1 Location 3 - MemberDecorate 17(SingleBlock) 2 Patch - MemberDecorate 17(SingleBlock) 2 Location 4 - Decorate 17(SingleBlock) Block - Decorate 19(singleBlock) Location 2 - MemberDecorate 20(bn) 0 Patch - MemberDecorate 20(bn) 0 Location 20 - MemberDecorate 20(bn) 0 Component 0 - MemberDecorate 20(bn) 1 Patch - MemberDecorate 20(bn) 1 Location 24 - MemberDecorate 20(bn) 2 Patch - MemberDecorate 20(bn) 2 Location 25 - MemberDecorate 20(bn) 2 Component 0 - Decorate 20(bn) Block + Name 11 "gl_PerVertex" + MemberName 11(gl_PerVertex) 0 "gl_Position" + MemberName 11(gl_PerVertex) 1 "gl_PointSize" + MemberName 11(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 11(gl_PerVertex) 3 "gl_CullDistance" + Name 15 "gl_out" + Name 18 "gl_InvocationID" + Name 21 "gl_PerVertex" + MemberName 21(gl_PerVertex) 0 "gl_Position" + MemberName 21(gl_PerVertex) 1 "gl_PointSize" + MemberName 21(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 21(gl_PerVertex) 3 "gl_CullDistance" + Name 25 "gl_in" + Name 32 "patchOut" + Name 33 "S" + MemberName 33(S) 0 "sMem1" + MemberName 33(S) 1 "sMem2" + Name 34 "TheBlock" + MemberName 34(TheBlock) 0 "bMem1" + MemberName 34(TheBlock) 1 "bMem2" + MemberName 34(TheBlock) 2 "s" + Name 38 "tcBlock" + Name 39 "SingleBlock" + MemberName 39(SingleBlock) 0 "bMem1" + MemberName 39(SingleBlock) 1 "bMem2" + MemberName 39(SingleBlock) 2 "s" + Name 41 "singleBlock" + Name 42 "bn" + MemberName 42(bn) 0 "v1" + MemberName 42(bn) 1 "v2" + MemberName 42(bn) 2 "v3" + Name 44 "" + MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 11(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 11(gl_PerVertex) Block + Decorate 18(gl_InvocationID) BuiltIn InvocationId + MemberDecorate 21(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 21(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 21(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 21(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 21(gl_PerVertex) Block + Decorate 32(patchOut) Patch + Decorate 32(patchOut) Location 1 + MemberDecorate 34(TheBlock) 0 Patch + MemberDecorate 34(TheBlock) 1 Patch + MemberDecorate 34(TheBlock) 2 Patch + Decorate 34(TheBlock) Block + Decorate 38(tcBlock) Location 12 + MemberDecorate 39(SingleBlock) 0 Patch + MemberDecorate 39(SingleBlock) 1 Patch + MemberDecorate 39(SingleBlock) 2 Patch + Decorate 39(SingleBlock) Block + Decorate 41(singleBlock) Location 2 + MemberDecorate 42(bn) 0 Patch + MemberDecorate 42(bn) 0 Location 20 + MemberDecorate 42(bn) 1 Patch + MemberDecorate 42(bn) 1 Location 24 + MemberDecorate 42(bn) 2 Patch + MemberDecorate 42(bn) 2 Location 25 + Decorate 42(bn) Block 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 7: TypeVector 6(float) 4 - 8: TypePointer Output 7(fvec4) - 9(patchOut): 8(ptr) Variable Output - 10(S): TypeStruct 6(float) 6(float) - 11(TheBlock): TypeStruct 6(float) 6(float) 10(S) - 12: TypeInt 32 0 - 13: 12(int) Constant 2 - 14: TypeArray 11(TheBlock) 13 - 15: TypePointer Output 14 - 16(tcBlock): 15(ptr) Variable Output - 17(SingleBlock): TypeStruct 6(float) 6(float) 10(S) - 18: TypePointer Output 17(SingleBlock) - 19(singleBlock): 18(ptr) Variable Output - 20(bn): TypeStruct 7(fvec4) 7(fvec4) 7(fvec4) - 21: TypePointer Output 20(bn) - 22: 21(ptr) Variable Output + 8: TypeInt 32 0 + 9: 8(int) Constant 1 + 10: TypeArray 6(float) 9 +11(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10 10 + 12: 8(int) Constant 4 + 13: TypeArray 11(gl_PerVertex) 12 + 14: TypePointer Output 13 + 15(gl_out): 14(ptr) Variable Output + 16: TypeInt 32 1 + 17: TypePointer Input 16(int) +18(gl_InvocationID): 17(ptr) Variable Input + 20: 16(int) Constant 0 +21(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10 10 + 22: 8(int) Constant 32 + 23: TypeArray 21(gl_PerVertex) 22 + 24: TypePointer Input 23 + 25(gl_in): 24(ptr) Variable Input + 27: TypePointer Input 7(fvec4) + 30: TypePointer Output 7(fvec4) + 32(patchOut): 30(ptr) Variable Output + 33(S): TypeStruct 6(float) 6(float) + 34(TheBlock): TypeStruct 6(float) 6(float) 33(S) + 35: 8(int) Constant 2 + 36: TypeArray 34(TheBlock) 35 + 37: TypePointer Output 36 + 38(tcBlock): 37(ptr) Variable Output + 39(SingleBlock): TypeStruct 6(float) 6(float) 33(S) + 40: TypePointer Output 39(SingleBlock) + 41(singleBlock): 40(ptr) Variable Output + 42(bn): TypeStruct 7(fvec4) 7(fvec4) 7(fvec4) + 43: TypePointer Output 42(bn) + 44: 43(ptr) Variable Output 4(main): 2 Function None 3 5: Label + 19: 16(int) Load 18(gl_InvocationID) + 26: 16(int) Load 18(gl_InvocationID) + 28: 27(ptr) AccessChain 25(gl_in) 26 20 + 29: 7(fvec4) Load 28 + 31: 30(ptr) AccessChain 15(gl_out) 19 20 + Store 31 29 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out index 4eb7563..f44466c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.AofA.frag.out @@ -1,8 +1,6 @@ spv.AofA.frag -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 104 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.GeometryShaderPassthrough.geom.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.GeometryShaderPassthrough.geom.out index 05aeb97..0ddc910 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.GeometryShaderPassthrough.geom.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.GeometryShaderPassthrough.geom.out @@ -1,8 +1,6 @@ spv.GeometryShaderPassthrough.geom -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 15 Capability Geometry diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.Operations.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.Operations.frag.out index aeee253..9b3f09e 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.Operations.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.Operations.frag.out @@ -1,8 +1,6 @@ spv.Operations.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 532 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.accessChain.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.accessChain.frag.out index b319cfd..2f4bf3a 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.accessChain.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.accessChain.frag.out @@ -1,8 +1,6 @@ spv.accessChain.frag -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 206 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.aggOps.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.aggOps.frag.out index c3ceb9a..d7142c3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.aggOps.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.aggOps.frag.out @@ -1,10 +1,9 @@ spv.aggOps.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. WARNING: 0:4: '' : all default precisions are highp; use precision statements to quiet warning, e.g.: "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 215 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.always-discard.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.always-discard.frag.out index 652d45c..349748f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.always-discard.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.always-discard.frag.out @@ -1,6 +1,6 @@ spv.always-discard.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 84 Capability Shader @@ -18,6 +18,7 @@ spv.always-discard.frag Name 30 "y" Name 36 "radius" Name 59 "gl_FragColor" + Decorate 59(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.always-discard2.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.always-discard2.frag.out index 0bbb9ee..d1aff7e 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.always-discard2.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.always-discard2.frag.out @@ -1,6 +1,6 @@ spv.always-discard2.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 40 Capability Shader @@ -17,6 +17,7 @@ spv.always-discard2.frag Name 21 "tex_coord" Name 30 "y" Name 38 "gl_FragColor" + Decorate 38(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.atomic.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.atomic.comp.out index 97c7f6e..5df873d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.atomic.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.atomic.comp.out @@ -1,9 +1,7 @@ spv.atomic.comp -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 73 +// Generated by (magic number): 80003 +// Id's are bound by 74 Capability Shader Capability AtomicStorage @@ -19,29 +17,29 @@ Warning, version 450 is not yet complete; most version-specific features are pre Name 20 "counter" Name 23 "val" Name 27 "countArr" - Name 35 "origi" - Name 37 "atomi" - Name 40 "origu" - Name 42 "atomu" - Name 43 "value" - Name 60 "dataSSB" - MemberName 60(dataSSB) 0 "f" - MemberName 60(dataSSB) 1 "n_frames_rendered" - Name 62 "result" - Name 70 "arrX" - Name 71 "arrY" - Name 72 "arrZ" + Name 37 "origi" + Name 39 "atomi" + Name 42 "origu" + Name 44 "atomu" + Name 45 "value" + Name 62 "dataSSB" + MemberName 62(dataSSB) 0 "f" + MemberName 62(dataSSB) 1 "n_frames_rendered" + Name 64 "result" + Name 71 "arrX" + Name 72 "arrY" + Name 73 "arrZ" Decorate 20(counter) Offset 0 Decorate 20(counter) Binding 0 Decorate 27(countArr) Offset 4 Decorate 27(countArr) Binding 0 - MemberDecorate 60(dataSSB) 0 Restrict - MemberDecorate 60(dataSSB) 0 Offset 0 - MemberDecorate 60(dataSSB) 1 Restrict - MemberDecorate 60(dataSSB) 1 Offset 16 - Decorate 60(dataSSB) BufferBlock - Decorate 62(result) DescriptorSet 0 - Decorate 62(result) Binding 0 + MemberDecorate 62(dataSSB) 0 Restrict + MemberDecorate 62(dataSSB) 0 Offset 0 + MemberDecorate 62(dataSSB) 1 Restrict + MemberDecorate 62(dataSSB) 1 Offset 16 + Decorate 62(dataSSB) BufferBlock + Decorate 64(result) DescriptorSet 0 + Decorate 64(result) Binding 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -49,7 +47,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre 8: TypeFunction 6(int) 7(ptr) 14: 6(int) Constant 1 15: 6(int) Constant 0 - 19: 6(int) Constant 1024 + 19: 6(int) Constant 1032 20(counter): 7(ptr) Variable AtomicCounter 22: TypePointer Function 6(int) 24: 6(int) Constant 4 @@ -58,29 +56,29 @@ Warning, version 450 is not yet complete; most version-specific features are pre 27(countArr): 26(ptr) Variable AtomicCounter 28: TypeInt 32 1 29: 28(int) Constant 2 - 34: TypePointer Function 28(int) - 36: TypePointer Workgroup 28(int) - 37(atomi): 36(ptr) Variable Workgroup - 38: 28(int) Constant 3 - 41: TypePointer Workgroup 6(int) - 42(atomu): 41(ptr) Variable Workgroup - 43(value): 41(ptr) Variable Workgroup - 46: 6(int) Constant 7 - 51: 28(int) Constant 7 - 55: 6(int) Constant 10 - 58: TypeFloat 32 - 59: TypeVector 28(int) 4 - 60(dataSSB): TypeStruct 58(float) 59(ivec4) - 61: TypePointer Uniform 60(dataSSB) - 62(result): 61(ptr) Variable Uniform - 63: 28(int) Constant 1 - 64: 6(int) Constant 2 - 65: TypePointer Uniform 28(int) - 68: TypeArray 28(int) 14 - 69: TypePointer Private 68 - 70(arrX): 69(ptr) Variable Private - 71(arrY): 69(ptr) Variable Private - 72(arrZ): 69(ptr) Variable Private + 33: 28(int) Constant 1 + 36: TypePointer Function 28(int) + 38: TypePointer Workgroup 28(int) + 39(atomi): 38(ptr) Variable Workgroup + 40: 28(int) Constant 3 + 43: TypePointer Workgroup 6(int) + 44(atomu): 43(ptr) Variable Workgroup + 45(value): 43(ptr) Variable Workgroup + 48: 6(int) Constant 7 + 53: 28(int) Constant 7 + 57: 6(int) Constant 10 + 60: TypeFloat 32 + 61: TypeVector 28(int) 4 + 62(dataSSB): TypeStruct 60(float) 61(ivec4) + 63: TypePointer Uniform 62(dataSSB) + 64(result): 63(ptr) Variable Uniform + 65: 6(int) Constant 2 + 66: TypePointer Uniform 28(int) + 69: TypeArray 28(int) 14 + 70: TypePointer Private 69 + 71(arrX): 70(ptr) Variable Private + 72(arrY): 70(ptr) Variable Private + 73(arrZ): 70(ptr) Variable Private 4(main): 2 Function None 3 5: Label 23(val): 22(ptr) Variable Function @@ -90,7 +88,8 @@ Warning, version 450 is not yet complete; most version-specific features are pre 31: 6(int) AtomicLoad 30 14 15 Store 23(val) 31 32: 6(int) AtomicIDecrement 20(counter) 14 15 - 33: 6(int) AtomicIIncrement 20(counter) 14 15 + 34: 6(int) ISub 32 33 + 35: 6(int) AtomicIIncrement 20(counter) 14 15 Return FunctionEnd 10(func(au1;): 6(int) Function None 8 @@ -101,29 +100,29 @@ Warning, version 450 is not yet complete; most version-specific features are pre FunctionEnd 12(atoms(): 2 Function None 3 13: Label - 35(origi): 34(ptr) Variable Function - 40(origu): 22(ptr) Variable Function - 39: 28(int) AtomicIAdd 37(atomi) 14 15 38 - Store 35(origi) 39 - 44: 6(int) Load 43(value) - 45: 6(int) AtomicAnd 42(atomu) 14 15 44 - Store 40(origu) 45 - 47: 6(int) AtomicOr 42(atomu) 14 15 46 - Store 40(origu) 47 - 48: 6(int) AtomicXor 42(atomu) 14 15 46 - Store 40(origu) 48 - 49: 6(int) Load 43(value) - 50: 6(int) AtomicUMin 42(atomu) 14 15 49 - Store 40(origu) 50 - 52: 28(int) AtomicSMax 37(atomi) 14 15 51 - Store 35(origi) 52 - 53: 28(int) Load 35(origi) - 54: 28(int) AtomicExchange 37(atomi) 14 15 53 - Store 35(origi) 54 - 56: 6(int) Load 43(value) - 57: 6(int) AtomicCompareExchange 42(atomu) 14 15 15 56 55 - Store 40(origu) 57 - 66: 65(ptr) AccessChain 62(result) 63 64 - 67: 28(int) AtomicIAdd 66 14 15 63 + 37(origi): 36(ptr) Variable Function + 42(origu): 22(ptr) Variable Function + 41: 28(int) AtomicIAdd 39(atomi) 14 15 40 + Store 37(origi) 41 + 46: 6(int) Load 45(value) + 47: 6(int) AtomicAnd 44(atomu) 14 15 46 + Store 42(origu) 47 + 49: 6(int) AtomicOr 44(atomu) 14 15 48 + Store 42(origu) 49 + 50: 6(int) AtomicXor 44(atomu) 14 15 48 + Store 42(origu) 50 + 51: 6(int) Load 45(value) + 52: 6(int) AtomicUMin 44(atomu) 14 15 51 + Store 42(origu) 52 + 54: 28(int) AtomicSMax 39(atomi) 14 15 53 + Store 37(origi) 54 + 55: 28(int) Load 37(origi) + 56: 28(int) AtomicExchange 39(atomi) 14 15 55 + Store 37(origi) 56 + 58: 6(int) Load 45(value) + 59: 6(int) AtomicCompareExchange 44(atomu) 14 15 15 58 57 + Store 42(origu) 59 + 67: 66(ptr) AccessChain 64(result) 33 65 + 68: 28(int) AtomicIAdd 67 14 15 33 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.bitCast.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.bitCast.frag.out index 07dd729..e162745 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.bitCast.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.bitCast.frag.out @@ -1,8 +1,6 @@ spv.bitCast.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 172 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.bool.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.bool.vert.out index 1e87c42..a8c8603 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.bool.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.bool.vert.out @@ -1,8 +1,6 @@ spv.bool.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 46 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.boolInBlock.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.boolInBlock.frag.out index 2181f26..e099c72 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.boolInBlock.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.boolInBlock.frag.out @@ -1,8 +1,6 @@ spv.boolInBlock.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 107 Capability Shader @@ -52,9 +50,9 @@ Warning, version 450 is not yet complete; most version-specific features are pre 28: 27(int) Constant 0 29: 6(bool) ConstantFalse 30: 9(bvec2) ConstantComposite 29 29 - 31: 22(int) Constant 0 + 31: 22(int) Constant 1 32: 23(ivec2) ConstantComposite 31 31 - 33: 22(int) Constant 1 + 33: 22(int) Constant 0 34: 23(ivec2) ConstantComposite 33 33 36: TypePointer Uniform 23(ivec2) 38: TypeVector 22(int) 4 @@ -62,7 +60,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre 40: TypePointer Uniform 39(Uniform) 41: 40(ptr) Variable Uniform 42: TypePointer Uniform 38(ivec4) - 65: 38(ivec4) ConstantComposite 31 31 31 31 + 65: 38(ivec4) ConstantComposite 33 33 33 33 72: TypeFloat 32 73: TypeVector 72(float) 4 74: TypePointer Output 73(fvec4) @@ -73,22 +71,22 @@ Warning, version 450 is not yet complete; most version-specific features are pre 5: Label 62(param): 8(ptr) Variable Function 67(param): 10(ptr) Variable Function - 35: 23(ivec2) Select 30 34 32 + 35: 23(ivec2) Select 30 32 34 37: 36(ptr) AccessChain 26 28 Store 37 35 43: 42(ptr) AccessChain 41 28 44: 38(ivec4) Load 43 45: 22(int) CompositeExtract 44 2 - 46: 6(bool) INotEqual 45 31 + 46: 6(bool) INotEqual 45 33 SelectionMerge 48 None BranchConditional 46 47 48 47: Label 49: 42(ptr) AccessChain 41 28 50: 38(ivec4) Load 49 51: 22(int) CompositeExtract 50 0 - 52: 6(bool) INotEqual 51 31 + 52: 6(bool) INotEqual 51 33 53: 9(bvec2) CompositeConstruct 52 52 - 54: 23(ivec2) Select 53 34 32 + 54: 23(ivec2) Select 53 32 34 55: 36(ptr) AccessChain 26 28 Store 55 54 Branch 48 @@ -96,7 +94,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre 56: 36(ptr) AccessChain 26 28 57: 23(ivec2) Load 56 58: 22(int) CompositeExtract 57 0 - 59: 6(bool) INotEqual 58 31 + 59: 6(bool) INotEqual 58 33 SelectionMerge 61 None BranchConditional 59 60 61 60: Label @@ -106,7 +104,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre Store 62(param) 66 68: 2 FunctionCall 14(foo(vb4;vb2;) 62(param) 67(param) 69: 9(bvec2) Load 67(param) - 70: 23(ivec2) Select 69 34 32 + 70: 23(ivec2) Select 69 32 34 71: 36(ptr) AccessChain 26 28 Store 71 70 Branch 61 @@ -114,14 +112,14 @@ Warning, version 450 is not yet complete; most version-specific features are pre 76: 42(ptr) AccessChain 41 28 77: 38(ivec4) Load 76 78: 22(int) CompositeExtract 77 0 - 79: 6(bool) INotEqual 78 31 + 79: 6(bool) INotEqual 78 33 SelectionMerge 81 None BranchConditional 79 80 81 80: Label 82: 42(ptr) AccessChain 41 28 83: 38(ivec4) Load 82 84: 22(int) CompositeExtract 83 1 - 85: 6(bool) INotEqual 84 31 + 85: 6(bool) INotEqual 84 33 Branch 81 81: Label 86: 6(bool) Phi 79 61 85 80 @@ -131,7 +129,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre 91: 42(ptr) AccessChain 41 28 92: 38(ivec4) Load 91 93: 22(int) CompositeExtract 92 0 - 94: 6(bool) INotEqual 93 31 + 94: 6(bool) INotEqual 93 33 95: 6(bool) LogicalNot 94 SelectionMerge 97 None BranchConditional 95 96 97 @@ -139,7 +137,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre 98: 42(ptr) AccessChain 41 28 99: 38(ivec4) Load 98 100: 22(int) CompositeExtract 99 1 - 101: 6(bool) INotEqual 100 31 + 101: 6(bool) INotEqual 100 33 Branch 97 97: Label 102: 6(bool) Phi 94 81 101 96 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.branch-return.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.branch-return.vert.out index 9093135..96e07c8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.branch-return.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.branch-return.vert.out @@ -1,8 +1,6 @@ spv.branch-return.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 38 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.buffer.autoassign.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.buffer.autoassign.frag.out index 2a316ee..fe6af82 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.buffer.autoassign.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.buffer.autoassign.frag.out @@ -1,6 +1,6 @@ spv.buffer.autoassign.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 50 Capability Shader @@ -24,7 +24,7 @@ spv.buffer.autoassign.frag Name 34 "MyUB3" MemberName 34(MyUB3) 0 "g_d" Name 36 "" - Name 47 "Color" + Name 47 "@entryPointOutput.Color" MemberDecorate 16(MyUB1) 0 Offset 0 MemberDecorate 16(MyUB1) 1 Offset 4 Decorate 16(MyUB1) Block @@ -38,7 +38,7 @@ spv.buffer.autoassign.frag Decorate 34(MyUB3) Block Decorate 36 DescriptorSet 0 Decorate 36 Binding 16 - Decorate 47(Color) Location 0 + Decorate 47(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -62,12 +62,12 @@ spv.buffer.autoassign.frag 36: 35(ptr) Variable Uniform 41: TypePointer Function 7(fvec4) 46: TypePointer Output 7(fvec4) - 47(Color): 46(ptr) Variable Output +47(@entryPointOutput.Color): 46(ptr) Variable Output 4(main): 2 Function None 3 5: Label 48:8(PS_OUTPUT) FunctionCall 10(@main() 49: 7(fvec4) CompositeExtract 48 0 - Store 47(Color) 49 + Store 47(@entryPointOutput.Color) 49 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.conditionalDiscard.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.conditionalDiscard.frag.out index b3cb8e8..01c9932 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.conditionalDiscard.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.conditionalDiscard.frag.out @@ -1,8 +1,6 @@ spv.conditionalDiscard.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 36 Capability Shader @@ -17,6 +15,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre Name 17 "coord" Name 34 "gl_FragColor" Decorate 13(tex) DescriptorSet 0 + Decorate 34(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.conversion.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.conversion.frag.out index b38d84e..87956db 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.conversion.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.conversion.frag.out @@ -1,6 +1,6 @@ spv.conversion.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 455 Capability Shader @@ -51,6 +51,7 @@ spv.conversion.frag Name 454 "i_f4" Decorate 39(i_i) Flat Decorate 157(i_i4) Flat + Decorate 322(gl_FragColor) Location 0 Decorate 446(i_i2) Flat Decorate 448(i_i3) Flat 2: TypeVoid diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOut.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOut.frag.out index 9dbe5d1..e559c5d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOut.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOut.frag.out @@ -1,6 +1,6 @@ spv.dataOut.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 20 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOutIndirect.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOutIndirect.frag.out index 663092f..d532dbc 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOutIndirect.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOutIndirect.frag.out @@ -1,6 +1,6 @@ spv.dataOutIndirect.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 26 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOutIndirect.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOutIndirect.vert.out index 1523fab..7fe82c1 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOutIndirect.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.dataOutIndirect.vert.out @@ -2,7 +2,7 @@ spv.dataOutIndirect.vert WARNING: 0:3: attribute deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 38 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.deepRvalue.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.deepRvalue.frag.out index b8f4d06..ea63b17 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.deepRvalue.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.deepRvalue.frag.out @@ -1,6 +1,6 @@ spv.deepRvalue.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 152 Capability Shader @@ -28,6 +28,7 @@ spv.deepRvalue.frag Name 133 "t" Name 146 "gl_FragColor" Decorate 111(samp2D) DescriptorSet 0 + Decorate 146(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.depthOut.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.depthOut.frag.out index 247b2f3..f195d1d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.depthOut.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.depthOut.frag.out @@ -1,8 +1,6 @@ spv.depthOut.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 15 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.deviceGroup.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.deviceGroup.frag.out index 42e045b..ceab9d4 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.deviceGroup.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.deviceGroup.frag.out @@ -1,8 +1,6 @@ spv.deviceGroup.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 17 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.discard-dce.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.discard-dce.frag.out index 173ea26..be04de5 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.discard-dce.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.discard-dce.frag.out @@ -1,6 +1,6 @@ spv.discard-dce.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 84 Capability Shader @@ -18,6 +18,7 @@ spv.discard-dce.frag Name 30 "y" Name 36 "radius" Name 59 "gl_FragColor" + Decorate 59(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.do-simple.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.do-simple.vert.out index d6d4c28..5bad7fd 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.do-simple.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.do-simple.vert.out @@ -1,8 +1,6 @@ spv.do-simple.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 21 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.do-while-continue-break.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.do-while-continue-break.vert.out index d1d0c85..ec16134 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.do-while-continue-break.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.do-while-continue-break.vert.out @@ -1,8 +1,6 @@ spv.do-while-continue-break.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 43 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.doWhileLoop.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.doWhileLoop.frag.out index 9b8cee7..e365dbd 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.doWhileLoop.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.doWhileLoop.frag.out @@ -1,6 +1,6 @@ spv.doWhileLoop.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 34 Capability Shader @@ -15,6 +15,7 @@ spv.doWhileLoop.frag Name 17 "bigColor" Name 27 "d" Name 32 "gl_FragColor" + Decorate 32(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.double.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.double.comp.out index 3b1bdc8..1ba0599 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.double.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.double.comp.out @@ -1,8 +1,6 @@ spv.double.comp -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 60 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.drawParams.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.drawParams.vert.out index b75efe0..c3f41b8 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.drawParams.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.drawParams.vert.out @@ -1,8 +1,6 @@ spv.drawParams.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 29 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.earlyReturnDiscard.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.earlyReturnDiscard.frag.out index 41441b7..9f2f93f 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.earlyReturnDiscard.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.earlyReturnDiscard.frag.out @@ -1,6 +1,6 @@ spv.earlyReturnDiscard.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 110 Capability Shader @@ -24,6 +24,7 @@ spv.earlyReturnDiscard.frag Name 77 "b" Name 105 "gl_FragColor" Name 109 "threshhold3" + Decorate 105(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.float16.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.float16.frag.out index 78156e4..e89d823 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.float16.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.float16.frag.out @@ -1,8 +1,6 @@ spv.float16.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 534 Capability Shader @@ -11,7 +9,11 @@ Warning, version 450 is not yet complete; most version-specific features are pre Capability Int64 Capability DerivativeControl Capability InterpolationFunction + Capability StorageUniformBufferBlock16 + Capability StorageUniform16 + Capability StorageInputOutput16 Extension "SPV_AMD_gpu_shader_half_float" + Extension "SPV_KHR_16bit_storage" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 465 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.flowControl.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.flowControl.frag.out index 274cb74..c3c3ffc 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.flowControl.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.flowControl.frag.out @@ -1,6 +1,6 @@ spv.flowControl.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 39 Capability Shader @@ -19,6 +19,7 @@ spv.flowControl.frag Name 25 "bigColor" Name 30 "smallColor" Name 35 "gl_FragColor" + Decorate 35(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-complex-condition.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-complex-condition.vert.out index 939d082..ff52d19 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-complex-condition.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-complex-condition.vert.out @@ -1,8 +1,6 @@ spv.for-complex-condition.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 31 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-continue-break.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-continue-break.vert.out index 764001d..9282815 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-continue-break.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-continue-break.vert.out @@ -1,8 +1,6 @@ spv.for-continue-break.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 45 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-nobody.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-nobody.vert.out index 0ec3584..99f9150 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-nobody.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-nobody.vert.out @@ -1,8 +1,6 @@ spv.for-nobody.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 25 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-notest.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-notest.vert.out index c7346f9..c6c8d69 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-notest.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-notest.vert.out @@ -1,8 +1,6 @@ spv.for-notest.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 20 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-simple.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-simple.vert.out index 996b65a..2de4e78 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-simple.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.for-simple.vert.out @@ -1,8 +1,6 @@ spv.for-simple.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 24 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.forLoop.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.forLoop.frag.out index 628c791..a52d726 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.forLoop.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.forLoop.frag.out @@ -1,6 +1,6 @@ spv.forLoop.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 131 Capability Shader @@ -26,6 +26,7 @@ spv.forLoop.frag Name 104 "f" Name 117 "i" Decorate 24(Count) Flat + Decorate 36(gl_FragColor) Location 0 Decorate 53(v4) Flat 2: TypeVoid 3: TypeFunction 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.forwardFun.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.forwardFun.frag.out index 6575953..2a8948d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.forwardFun.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.forwardFun.frag.out @@ -1,6 +1,6 @@ spv.forwardFun.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 60 Capability Shader @@ -32,6 +32,7 @@ spv.forwardFun.frag Decorate 27(f) RelaxedPrecision Decorate 28 RelaxedPrecision Decorate 30(gl_FragColor) RelaxedPrecision + Decorate 30(gl_FragColor) Location 0 Decorate 31 RelaxedPrecision Decorate 32 RelaxedPrecision Decorate 33 RelaxedPrecision diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionCall.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionCall.frag.out index 69a525f..a5c58da 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionCall.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionCall.frag.out @@ -4,7 +4,7 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas WARNING: 0:5: varying deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 76 Capability Shader @@ -28,6 +28,7 @@ WARNING: 0:5: varying deprecated in version 130; may be removed in future releas Name 66 "g" Name 69 "gl_FragColor" Name 75 "bigColor" + Decorate 69(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out index 1dae381..e6a45e3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionNestedOpaque.vert.out @@ -1,8 +1,6 @@ spv.functionNestedOpaque.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 39 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionSemantics.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionSemantics.frag.out index 005a315..402a666 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionSemantics.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.functionSemantics.frag.out @@ -1,8 +1,6 @@ spv.functionSemantics.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 156 Capability Shader @@ -44,6 +42,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre Name 133 "param" Name 136 "arg" Name 152 "gl_FragColor" + Decorate 152(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glFragColor.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glFragColor.frag.out index febbdf4..4e89056 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glFragColor.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glFragColor.frag.out @@ -1,6 +1,6 @@ spv.glFragColor.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 12 Capability Shader @@ -11,6 +11,7 @@ spv.glFragColor.frag Source GLSL 330 Name 4 "main" Name 9 "gl_FragColor" + Decorate 9(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glsl.register.autoassign.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glsl.register.autoassign.frag.out index 11818f6..bb72dee 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glsl.register.autoassign.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glsl.register.autoassign.frag.out @@ -1,8 +1,6 @@ spv.glsl.register.autoassign.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 142 Capability Shader @@ -78,6 +76,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre Decorate 126(g_tTex_unused2) DescriptorSet 0 Decorate 126(g_tTex_unused2) Binding 12 Decorate 128(g_sSamp_unused2) DescriptorSet 0 + Decorate 137(FragColor) Location 0 Decorate 141(g_tTex_unused3) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glsl.register.noautoassign.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glsl.register.noautoassign.frag.out index 327ac04..d145b7b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glsl.register.noautoassign.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.glsl.register.noautoassign.frag.out @@ -1,8 +1,6 @@ spv.glsl.register.noautoassign.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 142 Capability Shader @@ -72,6 +70,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre Decorate 126(g_tTex_unused2) DescriptorSet 0 Decorate 126(g_tTex_unused2) Binding 12 Decorate 128(g_sSamp_unused2) DescriptorSet 0 + Decorate 137(FragColor) Location 0 Decorate 141(g_tTex_unused3) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.image.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.image.frag.out index b4f673b..668bbbe 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.image.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.image.frag.out @@ -1,15 +1,14 @@ spv.image.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 376 Capability Shader - Capability SampledRect - Capability Sampled1D - Capability SampledCubeArray - Capability SampledBuffer + Capability StorageImageMultisample + Capability ImageCubeArray + Capability ImageRect + Capability Image1D + Capability ImageBuffer Capability ImageMSArray Capability StorageImageExtendedFormats Capability ImageQuery diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.int64.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.int64.frag.out index df35fea..4353efe 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.int64.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.int64.frag.out @@ -1,8 +1,6 @@ spv.int64.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 480 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.intOps.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.intOps.vert.out index 93d2dfd..bd3db52 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.intOps.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.intOps.vert.out @@ -1,8 +1,6 @@ spv.intOps.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 268 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.interpOps.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.interpOps.frag.out index 88d8e53..fa693d2 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.interpOps.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.interpOps.frag.out @@ -1,8 +1,6 @@ spv.interpOps.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 100 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.layoutNested.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.layoutNested.vert.out index 0d0b28b..f989d1b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.layoutNested.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.layoutNested.vert.out @@ -1,8 +1,6 @@ spv.layoutNested.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 66 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.length.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.length.frag.out index 76f6ca6..0eaba5d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.length.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.length.frag.out @@ -1,6 +1,6 @@ spv.length.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 33 Capability Shader @@ -14,6 +14,7 @@ spv.length.frag Name 14 "v" Name 26 "gl_FragColor" Name 32 "u" + Decorate 26(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.localAggregates.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.localAggregates.frag.out index 7ffa874..3b45995 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.localAggregates.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.localAggregates.frag.out @@ -1,8 +1,6 @@ spv.localAggregates.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 136 Capability Shader @@ -42,6 +40,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre Name 135 "foo2" Decorate 15(foo3) Flat Decorate 90(condition) Flat + Decorate 108(gl_FragColor) Location 0 Decorate 128(samp2D) DescriptorSet 0 Decorate 134(foo) Flat Decorate 135(foo2) Flat diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.loops.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.loops.frag.out index 8b1b480..225cf3b 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.loops.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.loops.frag.out @@ -1,6 +1,6 @@ spv.loops.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 725 Capability Shader @@ -49,6 +49,7 @@ spv.loops.frag Name 687 "d18" Name 698 "d17" Decorate 157(Count) Flat + Decorate 615(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.loopsArtificial.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.loopsArtificial.frag.out index 707a78d..2869622 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.loopsArtificial.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.loopsArtificial.frag.out @@ -1,6 +1,6 @@ spv.loopsArtificial.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 158 Capability Shader @@ -30,6 +30,7 @@ spv.loopsArtificial.frag Name 153 "d2" Name 154 "d3" Name 157 "Count" + Decorate 140(gl_FragColor) Location 0 Decorate 157(Count) Flat 2: TypeVoid 3: TypeFunction 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matFun.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matFun.vert.out index 38d9d2c..7c9db1b 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matFun.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matFun.vert.out @@ -1,8 +1,6 @@ spv.matFun.vert -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 103 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matrix.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matrix.frag.out index c7077b9..27800a5 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matrix.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matrix.frag.out @@ -1,8 +1,6 @@ spv.matrix.frag -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 286 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matrix2.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matrix2.frag.out index 78facff..b525999 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matrix2.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.matrix2.frag.out @@ -1,6 +1,6 @@ spv.matrix2.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 221 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.memoryQualifier.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.memoryQualifier.frag.out index a990e47..a8d64c7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.memoryQualifier.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.memoryQualifier.frag.out @@ -1,13 +1,11 @@ spv.memoryQualifier.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 97 Capability Shader - Capability SampledRect - Capability Sampled1D + Capability ImageRect + Capability Image1D 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" @@ -46,9 +44,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre Decorate 44(iCube) DescriptorSet 0 Decorate 44(iCube) Binding 3 Decorate 44(iCube) NonReadable - MemberDecorate 49(Data) 0 Coherent MemberDecorate 49(Data) 0 Offset 0 - MemberDecorate 49(Data) 1 Coherent MemberDecorate 49(Data) 1 Offset 8 MemberDecorate 50(Buffer) 0 Coherent MemberDecorate 50(Buffer) 0 Volatile diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.merge-unreachable.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.merge-unreachable.frag.out index 58bbb06..9d7e6dd 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.merge-unreachable.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.merge-unreachable.frag.out @@ -1,8 +1,6 @@ spv.merge-unreachable.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 25 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiStruct.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiStruct.comp.out index f8c0eea..738691c 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiStruct.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiStruct.comp.out @@ -1,9 +1,7 @@ spv.multiStruct.comp -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 157 +// Generated by (magic number): 80003 +// Id's are bound by 161 Capability Shader 1: ExtInstImport "GLSL.std.450" @@ -22,31 +20,31 @@ Warning, version 450 is not yet complete; most version-specific features are pre Name 17 "SSBO0" MemberName 17(SSBO0) 0 "a" Name 19 "inBuf" - Name 37 "SSBO1" - MemberName 37(SSBO1) 0 "b" - Name 39 "outBuf" - Name 57 "MyStruct" - MemberName 57(MyStruct) 0 "foo" - MemberName 57(MyStruct) 1 "sb" - Name 58 "UBO" - MemberName 58(UBO) 0 "c" - Name 60 "uBuf" - Name 84 "Nested" - MemberName 84(Nested) 0 "f" - MemberName 84(Nested) 1 "S" - Name 86 "n" - Name 88 "Nested" - MemberName 88(Nested) 0 "f" - MemberName 88(Nested) 1 "S" - Name 89 "UBON" - MemberName 89(UBON) 0 "N1" - Name 91 "uBufN" - Name 122 "Nested" - MemberName 122(Nested) 0 "f" - MemberName 122(Nested) 1 "S" - Name 123 "SSBO1N" - MemberName 123(SSBO1N) 0 "N2" - Name 125 "outBufN" + Name 39 "SSBO1" + MemberName 39(SSBO1) 0 "b" + Name 41 "outBuf" + Name 58 "MyStruct" + MemberName 58(MyStruct) 0 "foo" + MemberName 58(MyStruct) 1 "sb" + Name 59 "UBO" + MemberName 59(UBO) 0 "c" + Name 61 "uBuf" + Name 86 "Nested" + MemberName 86(Nested) 0 "f" + MemberName 86(Nested) 1 "S" + Name 88 "n" + Name 90 "Nested" + MemberName 90(Nested) 0 "f" + MemberName 90(Nested) 1 "S" + Name 91 "UBON" + MemberName 91(UBON) 0 "N1" + Name 93 "uBufN" + Name 126 "Nested" + MemberName 126(Nested) 0 "f" + MemberName 126(Nested) 1 "S" + Name 127 "SSBO1N" + MemberName 127(SSBO1N) 0 "N2" + Name 129 "outBufN" Decorate 15 ArrayStride 8 MemberDecorate 16(MyStruct) 0 Offset 0 MemberDecorate 16(MyStruct) 1 Offset 16 @@ -54,31 +52,31 @@ Warning, version 450 is not yet complete; most version-specific features are pre Decorate 17(SSBO0) BufferBlock Decorate 19(inBuf) DescriptorSet 0 Decorate 19(inBuf) Binding 0 - MemberDecorate 37(SSBO1) 0 Offset 0 - Decorate 37(SSBO1) BufferBlock - Decorate 39(outBuf) DescriptorSet 0 - Decorate 39(outBuf) Binding 1 - Decorate 56 ArrayStride 16 - MemberDecorate 57(MyStruct) 0 Offset 0 - MemberDecorate 57(MyStruct) 1 Offset 32 - MemberDecorate 58(UBO) 0 Offset 0 - Decorate 58(UBO) Block - Decorate 60(uBuf) DescriptorSet 0 - Decorate 60(uBuf) Binding 2 - Decorate 87 ArrayStride 48 - MemberDecorate 88(Nested) 0 Offset 0 - MemberDecorate 88(Nested) 1 Offset 16 - MemberDecorate 89(UBON) 0 Offset 0 - Decorate 89(UBON) Block - Decorate 91(uBufN) DescriptorSet 0 - Decorate 91(uBufN) Binding 2 - Decorate 121 ArrayStride 24 - MemberDecorate 122(Nested) 0 Offset 0 - MemberDecorate 122(Nested) 1 Offset 8 - MemberDecorate 123(SSBO1N) 0 Offset 0 - Decorate 123(SSBO1N) BufferBlock - Decorate 125(outBufN) DescriptorSet 0 - Decorate 125(outBufN) Binding 1 + MemberDecorate 39(SSBO1) 0 Offset 0 + Decorate 39(SSBO1) BufferBlock + Decorate 41(outBuf) DescriptorSet 0 + Decorate 41(outBuf) Binding 1 + Decorate 57 ArrayStride 16 + MemberDecorate 58(MyStruct) 0 Offset 0 + MemberDecorate 58(MyStruct) 1 Offset 32 + MemberDecorate 59(UBO) 0 Offset 0 + Decorate 59(UBO) Block + Decorate 61(uBuf) DescriptorSet 0 + Decorate 61(uBuf) Binding 2 + Decorate 89 ArrayStride 48 + MemberDecorate 90(Nested) 0 Offset 0 + MemberDecorate 90(Nested) 1 Offset 16 + MemberDecorate 91(UBON) 0 Offset 0 + Decorate 91(UBON) Block + Decorate 93(uBufN) DescriptorSet 0 + Decorate 93(uBufN) Binding 2 + Decorate 125 ArrayStride 24 + MemberDecorate 126(Nested) 0 Offset 0 + MemberDecorate 126(Nested) 1 Offset 8 + MemberDecorate 127(SSBO1N) 0 Offset 0 + Decorate 127(SSBO1N) BufferBlock + Decorate 129(outBufN) DescriptorSet 0 + Decorate 129(outBufN) Binding 1 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -100,44 +98,44 @@ Warning, version 450 is not yet complete; most version-specific features are pre 26: TypePointer Function 10 29: TypePointer Function 7(fvec2) 32: 20(int) Constant 1 - 35: TypePointer Function 11(bool) - 37(SSBO1): TypeStruct 16(MyStruct) - 38: TypePointer Uniform 37(SSBO1) - 39(outBuf): 38(ptr) Variable Uniform - 43: TypePointer Uniform 15 - 46: TypePointer Uniform 7(fvec2) - 51: 8(int) Constant 0 - 52: 8(int) Constant 1 - 54: TypePointer Uniform 8(int) - 56: TypeArray 7(fvec2) 9 - 57(MyStruct): TypeStruct 56 8(int) - 58(UBO): TypeStruct 57(MyStruct) - 59: TypePointer Uniform 58(UBO) - 60(uBuf): 59(ptr) Variable Uniform - 61: TypePointer Uniform 57(MyStruct) - 83: TypeArray 12(MyStruct) 9 - 84(Nested): TypeStruct 6(float) 83 - 85: TypePointer Function 84(Nested) - 87: TypeArray 57(MyStruct) 9 - 88(Nested): TypeStruct 6(float) 87 - 89(UBON): TypeStruct 88(Nested) - 90: TypePointer Uniform 89(UBON) - 91(uBufN): 90(ptr) Variable Uniform - 92: TypePointer Uniform 88(Nested) - 96: TypePointer Function 6(float) - 99: TypePointer Function 83 - 121: TypeArray 16(MyStruct) 9 - 122(Nested): TypeStruct 6(float) 121 - 123(SSBO1N): TypeStruct 122(Nested) - 124: TypePointer Uniform 123(SSBO1N) - 125(outBufN): 124(ptr) Variable Uniform - 127: TypePointer Uniform 122(Nested) - 130: TypePointer Uniform 6(float) - 133: TypePointer Uniform 121 + 35: 8(int) Constant 0 + 37: TypePointer Function 11(bool) + 39(SSBO1): TypeStruct 16(MyStruct) + 40: TypePointer Uniform 39(SSBO1) + 41(outBuf): 40(ptr) Variable Uniform + 45: TypePointer Uniform 15 + 48: TypePointer Uniform 7(fvec2) + 53: 8(int) Constant 1 + 55: TypePointer Uniform 8(int) + 57: TypeArray 7(fvec2) 9 + 58(MyStruct): TypeStruct 57 8(int) + 59(UBO): TypeStruct 58(MyStruct) + 60: TypePointer Uniform 59(UBO) + 61(uBuf): 60(ptr) Variable Uniform + 62: TypePointer Uniform 58(MyStruct) + 85: TypeArray 12(MyStruct) 9 + 86(Nested): TypeStruct 6(float) 85 + 87: TypePointer Function 86(Nested) + 89: TypeArray 58(MyStruct) 9 + 90(Nested): TypeStruct 6(float) 89 + 91(UBON): TypeStruct 90(Nested) + 92: TypePointer Uniform 91(UBON) + 93(uBufN): 92(ptr) Variable Uniform + 94: TypePointer Uniform 90(Nested) + 98: TypePointer Function 6(float) + 101: TypePointer Function 85 + 125: TypeArray 16(MyStruct) 9 + 126(Nested): TypeStruct 6(float) 125 + 127(SSBO1N): TypeStruct 126(Nested) + 128: TypePointer Uniform 127(SSBO1N) + 129(outBufN): 128(ptr) Variable Uniform + 131: TypePointer Uniform 126(Nested) + 134: TypePointer Uniform 6(float) + 137: TypePointer Uniform 125 4(main): 2 Function None 3 5: Label 14(t): 13(ptr) Variable Function - 86(n): 85(ptr) Variable Function + 88(n): 87(ptr) Variable Function 23: 22(ptr) AccessChain 19(inBuf) 21 24:16(MyStruct) Load 23 25: 15 CompositeExtract 24 0 @@ -149,116 +147,120 @@ Warning, version 450 is not yet complete; most version-specific features are pre 33: 29(ptr) AccessChain 27 32 Store 33 31 34: 8(int) CompositeExtract 24 1 - 36: 35(ptr) AccessChain 14(t) 32 - Store 36 34 - 40:12(MyStruct) Load 14(t) - 41: 22(ptr) AccessChain 39(outBuf) 21 - 42: 10 CompositeExtract 40 0 - 44: 43(ptr) AccessChain 41 21 - 45: 7(fvec2) CompositeExtract 42 0 - 47: 46(ptr) AccessChain 44 21 - Store 47 45 - 48: 7(fvec2) CompositeExtract 42 1 - 49: 46(ptr) AccessChain 44 32 - Store 49 48 - 50: 11(bool) CompositeExtract 40 1 - 53: 8(int) Select 50 52 51 - 55: 54(ptr) AccessChain 41 32 - Store 55 53 - 62: 61(ptr) AccessChain 60(uBuf) 21 - 63:57(MyStruct) Load 62 - 64: 56 CompositeExtract 63 0 - 65: 26(ptr) AccessChain 14(t) 21 - 66: 7(fvec2) CompositeExtract 64 0 - 67: 29(ptr) AccessChain 65 21 - Store 67 66 - 68: 7(fvec2) CompositeExtract 64 1 - 69: 29(ptr) AccessChain 65 32 - Store 69 68 - 70: 8(int) CompositeExtract 63 1 - 71: 35(ptr) AccessChain 14(t) 32 - Store 71 70 - 72:12(MyStruct) Load 14(t) - 73: 22(ptr) AccessChain 39(outBuf) 21 - 74: 10 CompositeExtract 72 0 - 75: 43(ptr) AccessChain 73 21 - 76: 7(fvec2) CompositeExtract 74 0 - 77: 46(ptr) AccessChain 75 21 - Store 77 76 - 78: 7(fvec2) CompositeExtract 74 1 - 79: 46(ptr) AccessChain 75 32 + 36: 11(bool) INotEqual 34 35 + 38: 37(ptr) AccessChain 14(t) 32 + Store 38 36 + 42:12(MyStruct) Load 14(t) + 43: 22(ptr) AccessChain 41(outBuf) 21 + 44: 10 CompositeExtract 42 0 + 46: 45(ptr) AccessChain 43 21 + 47: 7(fvec2) CompositeExtract 44 0 + 49: 48(ptr) AccessChain 46 21 + Store 49 47 + 50: 7(fvec2) CompositeExtract 44 1 + 51: 48(ptr) AccessChain 46 32 + Store 51 50 + 52: 11(bool) CompositeExtract 42 1 + 54: 8(int) Select 52 53 35 + 56: 55(ptr) AccessChain 43 32 + Store 56 54 + 63: 62(ptr) AccessChain 61(uBuf) 21 + 64:58(MyStruct) Load 63 + 65: 57 CompositeExtract 64 0 + 66: 26(ptr) AccessChain 14(t) 21 + 67: 7(fvec2) CompositeExtract 65 0 + 68: 29(ptr) AccessChain 66 21 + Store 68 67 + 69: 7(fvec2) CompositeExtract 65 1 + 70: 29(ptr) AccessChain 66 32 + Store 70 69 + 71: 8(int) CompositeExtract 64 1 + 72: 11(bool) INotEqual 71 35 + 73: 37(ptr) AccessChain 14(t) 32 + Store 73 72 + 74:12(MyStruct) Load 14(t) + 75: 22(ptr) AccessChain 41(outBuf) 21 + 76: 10 CompositeExtract 74 0 + 77: 45(ptr) AccessChain 75 21 + 78: 7(fvec2) CompositeExtract 76 0 + 79: 48(ptr) AccessChain 77 21 Store 79 78 - 80: 11(bool) CompositeExtract 72 1 - 81: 8(int) Select 80 52 51 - 82: 54(ptr) AccessChain 73 32 - Store 82 81 - 93: 92(ptr) AccessChain 91(uBufN) 21 - 94: 88(Nested) Load 93 - 95: 6(float) CompositeExtract 94 0 - 97: 96(ptr) AccessChain 86(n) 21 - Store 97 95 - 98: 87 CompositeExtract 94 1 - 100: 99(ptr) AccessChain 86(n) 32 - 101:57(MyStruct) CompositeExtract 98 0 - 102: 13(ptr) AccessChain 100 21 - 103: 56 CompositeExtract 101 0 - 104: 26(ptr) AccessChain 102 21 - 105: 7(fvec2) CompositeExtract 103 0 - 106: 29(ptr) AccessChain 104 21 - Store 106 105 - 107: 7(fvec2) CompositeExtract 103 1 - 108: 29(ptr) AccessChain 104 32 + 80: 7(fvec2) CompositeExtract 76 1 + 81: 48(ptr) AccessChain 77 32 + Store 81 80 + 82: 11(bool) CompositeExtract 74 1 + 83: 8(int) Select 82 53 35 + 84: 55(ptr) AccessChain 75 32 + Store 84 83 + 95: 94(ptr) AccessChain 93(uBufN) 21 + 96: 90(Nested) Load 95 + 97: 6(float) CompositeExtract 96 0 + 99: 98(ptr) AccessChain 88(n) 21 + Store 99 97 + 100: 89 CompositeExtract 96 1 + 102: 101(ptr) AccessChain 88(n) 32 + 103:58(MyStruct) CompositeExtract 100 0 + 104: 13(ptr) AccessChain 102 21 + 105: 57 CompositeExtract 103 0 + 106: 26(ptr) AccessChain 104 21 + 107: 7(fvec2) CompositeExtract 105 0 + 108: 29(ptr) AccessChain 106 21 Store 108 107 - 109: 8(int) CompositeExtract 101 1 - 110: 35(ptr) AccessChain 102 32 + 109: 7(fvec2) CompositeExtract 105 1 + 110: 29(ptr) AccessChain 106 32 Store 110 109 - 111:57(MyStruct) CompositeExtract 98 1 - 112: 13(ptr) AccessChain 100 32 - 113: 56 CompositeExtract 111 0 - 114: 26(ptr) AccessChain 112 21 - 115: 7(fvec2) CompositeExtract 113 0 - 116: 29(ptr) AccessChain 114 21 - Store 116 115 - 117: 7(fvec2) CompositeExtract 113 1 - 118: 29(ptr) AccessChain 114 32 - Store 118 117 - 119: 8(int) CompositeExtract 111 1 - 120: 35(ptr) AccessChain 112 32 - Store 120 119 - 126: 84(Nested) Load 86(n) - 128: 127(ptr) AccessChain 125(outBufN) 21 - 129: 6(float) CompositeExtract 126 0 - 131: 130(ptr) AccessChain 128 21 - Store 131 129 - 132: 83 CompositeExtract 126 1 - 134: 133(ptr) AccessChain 128 32 - 135:12(MyStruct) CompositeExtract 132 0 - 136: 22(ptr) AccessChain 134 21 - 137: 10 CompositeExtract 135 0 - 138: 43(ptr) AccessChain 136 21 - 139: 7(fvec2) CompositeExtract 137 0 - 140: 46(ptr) AccessChain 138 21 - Store 140 139 - 141: 7(fvec2) CompositeExtract 137 1 - 142: 46(ptr) AccessChain 138 32 - Store 142 141 - 143: 11(bool) CompositeExtract 135 1 - 144: 8(int) Select 143 52 51 - 145: 54(ptr) AccessChain 136 32 - Store 145 144 - 146:12(MyStruct) CompositeExtract 132 1 - 147: 22(ptr) AccessChain 134 32 - 148: 10 CompositeExtract 146 0 - 149: 43(ptr) AccessChain 147 21 - 150: 7(fvec2) CompositeExtract 148 0 - 151: 46(ptr) AccessChain 149 21 - Store 151 150 - 152: 7(fvec2) CompositeExtract 148 1 - 153: 46(ptr) AccessChain 149 32 - Store 153 152 - 154: 11(bool) CompositeExtract 146 1 - 155: 8(int) Select 154 52 51 - 156: 54(ptr) AccessChain 147 32 - Store 156 155 + 111: 8(int) CompositeExtract 103 1 + 112: 11(bool) INotEqual 111 35 + 113: 37(ptr) AccessChain 104 32 + Store 113 112 + 114:58(MyStruct) CompositeExtract 100 1 + 115: 13(ptr) AccessChain 102 32 + 116: 57 CompositeExtract 114 0 + 117: 26(ptr) AccessChain 115 21 + 118: 7(fvec2) CompositeExtract 116 0 + 119: 29(ptr) AccessChain 117 21 + Store 119 118 + 120: 7(fvec2) CompositeExtract 116 1 + 121: 29(ptr) AccessChain 117 32 + Store 121 120 + 122: 8(int) CompositeExtract 114 1 + 123: 11(bool) INotEqual 122 35 + 124: 37(ptr) AccessChain 115 32 + Store 124 123 + 130: 86(Nested) Load 88(n) + 132: 131(ptr) AccessChain 129(outBufN) 21 + 133: 6(float) CompositeExtract 130 0 + 135: 134(ptr) AccessChain 132 21 + Store 135 133 + 136: 85 CompositeExtract 130 1 + 138: 137(ptr) AccessChain 132 32 + 139:12(MyStruct) CompositeExtract 136 0 + 140: 22(ptr) AccessChain 138 21 + 141: 10 CompositeExtract 139 0 + 142: 45(ptr) AccessChain 140 21 + 143: 7(fvec2) CompositeExtract 141 0 + 144: 48(ptr) AccessChain 142 21 + Store 144 143 + 145: 7(fvec2) CompositeExtract 141 1 + 146: 48(ptr) AccessChain 142 32 + Store 146 145 + 147: 11(bool) CompositeExtract 139 1 + 148: 8(int) Select 147 53 35 + 149: 55(ptr) AccessChain 140 32 + Store 149 148 + 150:12(MyStruct) CompositeExtract 136 1 + 151: 22(ptr) AccessChain 138 32 + 152: 10 CompositeExtract 150 0 + 153: 45(ptr) AccessChain 151 21 + 154: 7(fvec2) CompositeExtract 152 0 + 155: 48(ptr) AccessChain 153 21 + Store 155 154 + 156: 7(fvec2) CompositeExtract 152 1 + 157: 48(ptr) AccessChain 153 32 + Store 157 156 + 158: 11(bool) CompositeExtract 150 1 + 159: 8(int) Select 158 53 35 + 160: 55(ptr) AccessChain 151 32 + Store 160 159 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiStructFuncall.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiStructFuncall.frag.out index b9b0cb2..80d3408 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiStructFuncall.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiStructFuncall.frag.out @@ -1,8 +1,6 @@ spv.multiStructFuncall.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 63 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiView.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiView.frag.out index de2a549..73e922b 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiView.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiView.frag.out @@ -1,8 +1,6 @@ spv.multiView.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 17 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out index f93aa01..7c0b3b8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out @@ -1,8 +1,6 @@ spv.multiviewPerViewAttributes.tesc -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 37 Capability Tessellation diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.vert.out index 350944a..e4cab44 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.multiviewPerViewAttributes.vert.out @@ -1,8 +1,6 @@ spv.multiviewPerViewAttributes.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 29 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.newTexture.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.newTexture.frag.out index ea694ee..048370a 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.newTexture.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.newTexture.frag.out @@ -1,8 +1,6 @@ spv.newTexture.frag -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 284 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.noDeadDecorations.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.noDeadDecorations.vert.out index 41d2a43..9db4109 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.noDeadDecorations.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.noDeadDecorations.vert.out @@ -1,8 +1,6 @@ spv.noDeadDecorations.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 32 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.noWorkgroup.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.noWorkgroup.comp.out index 0f88436..e34a6b5 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.noWorkgroup.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.noWorkgroup.comp.out @@ -1,8 +1,6 @@ spv.noWorkgroup.comp -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 12 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.nonSquare.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.nonSquare.vert.out index 684d4f1..4c335ee 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.nonSquare.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.nonSquare.vert.out @@ -1,6 +1,6 @@ spv.nonSquare.vert // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 90 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.offsets.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.offsets.frag.out index ea4be8f..8fd894f 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.offsets.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.offsets.frag.out @@ -1,8 +1,6 @@ spv.offsets.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 15 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precise.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precise.tesc.out index 4bae395..bd1bf92 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precise.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precise.tesc.out @@ -1,8 +1,6 @@ spv.precise.tesc -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 72 Capability Tessellation diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precise.tese.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precise.tese.out index 4f1839c..ffdbc89 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precise.tese.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precise.tese.out @@ -1,8 +1,6 @@ spv.precise.tese -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 119 Capability Tessellation diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precision.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precision.frag.out index f49b356..710c639 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precision.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.precision.frag.out @@ -1,8 +1,6 @@ spv.precision.frag -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 127 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.prepost.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.prepost.frag.out index 410286c..56ee458 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.prepost.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.prepost.frag.out @@ -1,6 +1,6 @@ spv.prepost.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 94 Capability Shader @@ -20,6 +20,7 @@ spv.prepost.frag Name 66 "z" Name 73 "v" Name 90 "gl_FragColor" + Decorate 90(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.pushConstant.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.pushConstant.vert.out index bdefd63..591d693 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.pushConstant.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.pushConstant.vert.out @@ -1,8 +1,6 @@ spv.pushConstant.vert -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 35 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.pushConstantAnon.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.pushConstantAnon.vert.out index 9559815..14af803 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.pushConstantAnon.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.pushConstantAnon.vert.out @@ -1,8 +1,6 @@ spv.pushConstantAnon.vert -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 38 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.qualifiers.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.qualifiers.vert.out index 37f474c..fca304d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.qualifiers.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.qualifiers.vert.out @@ -1,8 +1,6 @@ spv.qualifiers.vert -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 21 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.queryL.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.queryL.frag.out index fbdcbc8..70e677b 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.queryL.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.queryL.frag.out @@ -1,8 +1,6 @@ spv.queryL.frag -Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 224 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.autoassign-2.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.autoassign-2.frag.out index f09a468..6bc173b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.autoassign-2.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.autoassign-2.frag.out @@ -1,6 +1,6 @@ spv.register.autoassign-2.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 47 Capability Shader @@ -19,14 +19,14 @@ spv.register.autoassign-2.frag Name 31 "g_tScene[1]" Name 39 "psout" Name 40 "param" - Name 44 "Color" + Name 44 "psout.Color" Decorate 18(g_tScene[0]) DescriptorSet 0 Decorate 18(g_tScene[0]) Binding 10 Decorate 22(g_tSamp) DescriptorSet 0 Decorate 22(g_tSamp) Binding 5 Decorate 31(g_tScene[1]) DescriptorSet 0 Decorate 31(g_tScene[1]) Binding 11 - Decorate 44(Color) Location 0 + Decorate 44(psout.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -50,7 +50,7 @@ spv.register.autoassign-2.frag 31(g_tScene[1]): 17(ptr) Variable UniformConstant 37: TypePointer Function 7(fvec4) 43: TypePointer Output 7(fvec4) - 44(Color): 43(ptr) Variable Output + 44(psout.Color): 43(ptr) Variable Output 4(main): 2 Function None 3 5: Label 39(psout): 9(ptr) Variable Function @@ -60,7 +60,7 @@ spv.register.autoassign-2.frag Store 39(psout) 42 45: 37(ptr) AccessChain 39(psout) 15 46: 7(fvec4) Load 45 - Store 44(Color) 46 + Store 44(psout.Color) 46 Return FunctionEnd 12(@main(struct-PS_OUTPUT-vf41;): 2 Function None 10 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.autoassign.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.autoassign.frag.out index 4874d90..cf4dad7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.autoassign.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.autoassign.frag.out @@ -1,6 +1,6 @@ spv.register.autoassign.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 155 Capability Shader @@ -42,7 +42,7 @@ spv.register.autoassign.frag Name 130 "g_tTex_unused2" Name 132 "g_sSamp_unused2" Name 141 "psout" - Name 151 "Color" + Name 151 "@entryPointOutput.Color" Name 154 "g_tTex_unused3" Decorate 21(g_tTex1) DescriptorSet 0 Decorate 21(g_tTex1) Binding 11 @@ -80,7 +80,7 @@ spv.register.autoassign.frag Decorate 130(g_tTex_unused2) DescriptorSet 0 Decorate 130(g_tTex_unused2) Binding 12 Decorate 132(g_sSamp_unused2) DescriptorSet 0 - Decorate 151(Color) Location 0 + Decorate 151(@entryPointOutput.Color) Location 0 Decorate 154(g_tTex_unused3) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 @@ -141,13 +141,13 @@ spv.register.autoassign.frag 140: TypePointer Function 15(PS_OUTPUT) 145: TypePointer Function 7(fvec4) 150: TypePointer Output 7(fvec4) - 151(Color): 150(ptr) Variable Output +151(@entryPointOutput.Color): 150(ptr) Variable Output 154(g_tTex_unused3): 20(ptr) Variable UniformConstant 4(main_ep): 2 Function None 3 5: Label 152:15(PS_OUTPUT) FunctionCall 17(@main_ep() 153: 7(fvec4) CompositeExtract 152 0 - Store 151(Color) 153 + Store 151(@entryPointOutput.Color) 153 Return FunctionEnd 9(Func1(): 7(fvec4) Function None 8 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.noautoassign.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.noautoassign.frag.out index 71c0b37..da53f58 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.noautoassign.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.register.noautoassign.frag.out @@ -1,6 +1,6 @@ spv.register.noautoassign.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 155 Capability Shader @@ -42,7 +42,7 @@ spv.register.noautoassign.frag Name 130 "g_tTex_unused2" Name 132 "g_sSamp_unused2" Name 141 "psout" - Name 151 "Color" + Name 151 "@entryPointOutput.Color" Name 154 "g_tTex_unused3" Decorate 21(g_tTex1) DescriptorSet 0 Decorate 21(g_tTex1) Binding 11 @@ -73,7 +73,7 @@ spv.register.noautoassign.frag Decorate 130(g_tTex_unused2) DescriptorSet 0 Decorate 130(g_tTex_unused2) Binding 12 Decorate 132(g_sSamp_unused2) DescriptorSet 0 - Decorate 151(Color) Location 0 + Decorate 151(@entryPointOutput.Color) Location 0 Decorate 154(g_tTex_unused3) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 @@ -134,13 +134,13 @@ spv.register.noautoassign.frag 140: TypePointer Function 15(PS_OUTPUT) 145: TypePointer Function 7(fvec4) 150: TypePointer Output 7(fvec4) - 151(Color): 150(ptr) Variable Output +151(@entryPointOutput.Color): 150(ptr) Variable Output 154(g_tTex_unused3): 20(ptr) Variable UniformConstant 4(main_ep): 2 Function None 3 5: Label 152:15(PS_OUTPUT) FunctionCall 17(@main_ep() 153: 7(fvec4) CompositeExtract 152 0 - Store 151(Color) 153 + Store 151(@entryPointOutput.Color) 153 Return FunctionEnd 9(Func1(): 7(fvec4) Function None 8 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.rw.autoassign.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.rw.autoassign.frag.out index 9069666..e234dc6 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.rw.autoassign.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.rw.autoassign.frag.out @@ -1,11 +1,11 @@ spv.rw.autoassign.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 42 Capability Shader - Capability Sampled1D - Capability SampledBuffer + Capability Image1D + Capability ImageBuffer 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 39 @@ -20,12 +20,12 @@ spv.rw.autoassign.frag Name 23 "r01" Name 26 "g_tBuf1du1" Name 30 "psout" - Name 39 "Color" + Name 39 "@entryPointOutput.Color" Decorate 16(g_tTex1df1) DescriptorSet 0 Decorate 16(g_tTex1df1) Binding 20 Decorate 26(g_tBuf1du1) DescriptorSet 0 Decorate 26(g_tBuf1du1) Binding 21 - Decorate 39(Color) Location 0 + Decorate 39(@entryPointOutput.Color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -48,12 +48,12 @@ spv.rw.autoassign.frag 32: 7(fvec4) ConstantComposite 31 31 31 31 33: TypePointer Function 7(fvec4) 38: TypePointer Output 7(fvec4) - 39(Color): 38(ptr) Variable Output +39(@entryPointOutput.Color): 38(ptr) Variable Output 4(main): 2 Function None 3 5: Label 40:8(PS_OUTPUT) FunctionCall 10(@main() 41: 7(fvec4) CompositeExtract 40 0 - Store 39(Color) 41 + Store 39(@entryPointOutput.Color) 41 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out index 6bae6bd..5ef0793 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out @@ -1,12 +1,9 @@ spv.sampleMaskOverrideCoverage.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 20 Capability Shader - Capability SampleRateShading Extension "SPV_NV_sample_mask_override_coverage" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.separate.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.separate.frag.out index c654117..3ef8013 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.separate.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.separate.frag.out @@ -1,8 +1,6 @@ spv.separate.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 319 Capability Shader @@ -10,7 +8,6 @@ Warning, version 400 is not yet complete; most version-specific features are pre Capability Sampled1D Capability SampledCubeArray Capability SampledBuffer - Capability ImageMSArray 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 34 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.set.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.set.vert.out index 38cb669..a5a8363 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.set.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.set.vert.out @@ -1,8 +1,6 @@ spv.set.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 22 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderBallot.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderBallot.comp.out index b8d5e3a..ec85d70 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderBallot.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderBallot.comp.out @@ -1,8 +1,6 @@ spv.shaderBallot.comp -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 298 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderBallotAMD.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderBallotAMD.comp.out index bb7f8c1..aca5ba6 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderBallotAMD.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderBallotAMD.comp.out @@ -1,8 +1,6 @@ spv.shaderBallotAMD.comp -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 1048 Capability Shader @@ -10,8 +8,11 @@ Warning, version 450 is not yet complete; most version-specific features are pre Capability Float64 Capability Int64 Capability Groups + Capability StorageUniformBufferBlock16 + Capability StorageUniform16 Extension "SPV_AMD_gpu_shader_half_float" Extension "SPV_AMD_shader_ballot" + Extension "SPV_KHR_16bit_storage" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint GLCompute 4 "main" diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderDrawParams.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderDrawParams.vert.out index 41ad78d..0fb27ad 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderDrawParams.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderDrawParams.vert.out @@ -1,8 +1,6 @@ spv.shaderDrawParams.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 53 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderGroupVote.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderGroupVote.comp.out index 0277149..2b7e13a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderGroupVote.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shaderGroupVote.comp.out @@ -1,8 +1,6 @@ spv.shaderGroupVote.comp -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 33 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shiftOps.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shiftOps.frag.out index 498c287..22bcaf3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shiftOps.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shiftOps.frag.out @@ -1,8 +1,6 @@ spv.shiftOps.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 38 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shortCircuit.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shortCircuit.frag.out index 7d5189a..9ba472a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shortCircuit.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.shortCircuit.frag.out @@ -1,8 +1,6 @@ spv.shortCircuit.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 147 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.simpleFunctionCall.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.simpleFunctionCall.frag.out index 2e6b671..0ee0f90 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.simpleFunctionCall.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.simpleFunctionCall.frag.out @@ -1,6 +1,6 @@ spv.simpleFunctionCall.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 19 Capability Shader @@ -13,6 +13,7 @@ spv.simpleFunctionCall.frag Name 9 "foo(" Name 12 "BaseColor" Name 17 "gl_FragColor" + Decorate 17(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.simpleMat.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.simpleMat.vert.out index 2cad631..b579906 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.simpleMat.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.simpleMat.vert.out @@ -2,7 +2,7 @@ spv.simpleMat.vert WARNING: 0:3: varying deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 39 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sparseTexture.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sparseTexture.frag.out index 431ef15..674f11c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sparseTexture.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sparseTexture.frag.out @@ -1,11 +1,10 @@ spv.sparseTexture.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 438 Capability Shader + Capability StorageImageMultisample Capability SampledRect Capability SparseResidency Capability SampledCubeArray diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sparseTextureClamp.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sparseTextureClamp.frag.out index 175dc35..e9e662f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sparseTextureClamp.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.sparseTextureClamp.frag.out @@ -1,8 +1,6 @@ spv.sparseTextureClamp.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 360 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConst.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConst.vert.out index 5e2020f..181d02a 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConst.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConst.vert.out @@ -1,8 +1,6 @@ spv.specConst.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 27 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstant.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstant.comp.out index 481ed68..4f4897b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstant.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstant.comp.out @@ -1,8 +1,6 @@ spv.specConstant.comp -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 27 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstant.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstant.vert.out index ea4e542..a8fc861 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstant.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstant.vert.out @@ -1,8 +1,6 @@ spv.specConstant.vert -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 81 Capability Shader @@ -13,7 +11,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre Source GLSL 400 Name 4 "main" Name 9 "arraySize" - Name 14 "foo(vf4[s1518];" + Name 14 "foo(vf4[s1506];" Name 13 "p" Name 17 "builtin_spec_constant(" Name 20 "color" @@ -104,10 +102,10 @@ Warning, version 400 is not yet complete; most version-specific features are pre Store 20(color) 46 48: 10 Load 22(ucol) Store 47(param) 48 - 49: 2 FunctionCall 14(foo(vf4[s1518];) 47(param) + 49: 2 FunctionCall 14(foo(vf4[s1506];) 47(param) Return FunctionEnd -14(foo(vf4[s1518];): 2 Function None 12 +14(foo(vf4[s1506];): 2 Function None 12 13(p): 11(ptr) FunctionParameter 15: Label 54: 24(ptr) AccessChain 53(dupUcol) 23 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstantComposite.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstantComposite.vert.out index 9079554..e3cd681 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstantComposite.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstantComposite.vert.out @@ -1,8 +1,6 @@ spv.specConstantComposite.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 43 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstantOperations.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstantOperations.vert.out index ab83e61..2615eab 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstantOperations.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.specConstantOperations.vert.out @@ -1,8 +1,6 @@ spv.specConstantOperations.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 162 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.ssbo.autoassign.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.ssbo.autoassign.frag.out index 7ec2a30..d5e37cb 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.ssbo.autoassign.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.ssbo.autoassign.frag.out @@ -1,12 +1,12 @@ spv.ssbo.autoassign.frag // Module Version 10000 -// Generated by (magic number): 80001 -// Id's are bound by 95 +// Generated by (magic number): 80003 +// Id's are bound by 99 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 88 91 + EntryPoint Fragment 4 "main" 92 95 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -23,16 +23,14 @@ spv.ssbo.autoassign.frag MemberName 26(TestCB) 0 "W" MemberName 26(TestCB) 1 "H" Name 28 "" - Name 55 "SB1" - MemberName 55(SB1) 0 "@data" Name 57 "SB1" - Name 86 "pos" - Name 88 "pos" - Name 91 "@entryPointOutput" - Name 92 "param" - MemberDecorate 14(BufType) 0 NonWritable + MemberName 57(SB1) 0 "@data" + Name 59 "SB1" + Name 90 "pos" + Name 92 "pos" + Name 95 "@entryPointOutput" + Name 96 "param" MemberDecorate 14(BufType) 0 Offset 0 - MemberDecorate 14(BufType) 1 NonWritable MemberDecorate 14(BufType) 1 Offset 16 Decorate 15 ArrayStride 32 MemberDecorate 16(SB0) 0 NonWritable @@ -45,13 +43,13 @@ spv.ssbo.autoassign.frag Decorate 26(TestCB) Block Decorate 28 DescriptorSet 0 Decorate 28 Binding 15 - Decorate 54 ArrayStride 32 - MemberDecorate 55(SB1) 0 Offset 0 - Decorate 55(SB1) BufferBlock - Decorate 57(SB1) DescriptorSet 0 - Decorate 57(SB1) Binding 31 - Decorate 88(pos) Location 0 - Decorate 91(@entryPointOutput) Location 0 + Decorate 56 ArrayStride 32 + MemberDecorate 57(SB1) 0 Offset 0 + Decorate 57(SB1) BufferBlock + Decorate 59(SB1) DescriptorSet 0 + Decorate 59(SB1) Binding 31 + Decorate 92(pos) Location 0 + Decorate 95(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -73,26 +71,26 @@ spv.ssbo.autoassign.frag 28: 27(ptr) Variable Uniform 29: TypePointer Uniform 21(int) 34: 21(int) Constant 0 - 38: TypePointer Uniform 7(fvec4) - 50: 19(int) Constant 1 - 54: TypeRuntimeArray 14(BufType) - 55(SB1): TypeStruct 54 - 56: TypePointer Uniform 55(SB1) - 57(SB1): 56(ptr) Variable Uniform - 87: TypePointer Input 7(fvec4) - 88(pos): 87(ptr) Variable Input - 90: TypePointer Output 7(fvec4) -91(@entryPointOutput): 90(ptr) Variable Output + 39: TypePointer Uniform 7(fvec4) + 52: 19(int) Constant 1 + 56: TypeRuntimeArray 14(BufType) + 57(SB1): TypeStruct 56 + 58: TypePointer Uniform 57(SB1) + 59(SB1): 58(ptr) Variable Uniform + 91: TypePointer Input 7(fvec4) + 92(pos): 91(ptr) Variable Input + 94: TypePointer Output 7(fvec4) +95(@entryPointOutput): 94(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 86(pos): 8(ptr) Variable Function - 92(param): 8(ptr) Variable Function - 89: 7(fvec4) Load 88(pos) - Store 86(pos) 89 - 93: 7(fvec4) Load 86(pos) - Store 92(param) 93 - 94: 7(fvec4) FunctionCall 11(@main(vf4;) 92(param) - Store 91(@entryPointOutput) 94 + 90(pos): 8(ptr) Variable Function + 96(param): 8(ptr) Variable Function + 93: 7(fvec4) Load 92(pos) + Store 90(pos) 93 + 97: 7(fvec4) Load 90(pos) + Store 96(param) 97 + 98: 7(fvec4) FunctionCall 11(@main(vf4;) 96(param) + Store 95(@entryPointOutput) 98 Return FunctionEnd 11(@main(vf4;): 7(fvec4) Function None 9 @@ -108,47 +106,51 @@ spv.ssbo.autoassign.frag 35: 23(ptr) AccessChain 10(pos) 34 36: 6(float) Load 35 37: 6(float) FAdd 33 36 - 39: 38(ptr) AccessChain 18(SB0) 20 37 20 - 40: 7(fvec4) Load 39 - 41: 23(ptr) AccessChain 10(pos) 22 - 42: 6(float) Load 41 - 43: 29(ptr) AccessChain 28 20 - 44: 21(int) Load 43 - 45: 6(float) ConvertUToF 44 - 46: 6(float) FMul 42 45 - 47: 23(ptr) AccessChain 10(pos) 34 - 48: 6(float) Load 47 - 49: 6(float) FAdd 46 48 - 51: 38(ptr) AccessChain 18(SB0) 20 49 50 - 52: 7(fvec4) Load 51 - 53: 7(fvec4) FAdd 40 52 - Store 13(vTmp) 53 - 58: 23(ptr) AccessChain 10(pos) 22 - 59: 6(float) Load 58 - 60: 29(ptr) AccessChain 28 20 - 61: 21(int) Load 60 - 62: 6(float) ConvertUToF 61 - 63: 6(float) FMul 59 62 - 64: 23(ptr) AccessChain 10(pos) 34 - 65: 6(float) Load 64 - 66: 6(float) FAdd 63 65 - 67: 38(ptr) AccessChain 57(SB1) 20 66 20 - 68: 7(fvec4) Load 67 - 69: 23(ptr) AccessChain 10(pos) 22 - 70: 6(float) Load 69 - 71: 29(ptr) AccessChain 28 20 - 72: 21(int) Load 71 - 73: 6(float) ConvertUToF 72 - 74: 6(float) FMul 70 73 - 75: 23(ptr) AccessChain 10(pos) 34 - 76: 6(float) Load 75 - 77: 6(float) FAdd 74 76 - 78: 38(ptr) AccessChain 57(SB1) 20 77 50 - 79: 7(fvec4) Load 78 - 80: 7(fvec4) FAdd 68 79 - 81: 7(fvec4) Load 13(vTmp) - 82: 7(fvec4) FAdd 81 80 - Store 13(vTmp) 82 - 83: 7(fvec4) Load 13(vTmp) - ReturnValue 83 + 38: 21(int) ConvertFToU 37 + 40: 39(ptr) AccessChain 18(SB0) 20 38 20 + 41: 7(fvec4) Load 40 + 42: 23(ptr) AccessChain 10(pos) 22 + 43: 6(float) Load 42 + 44: 29(ptr) AccessChain 28 20 + 45: 21(int) Load 44 + 46: 6(float) ConvertUToF 45 + 47: 6(float) FMul 43 46 + 48: 23(ptr) AccessChain 10(pos) 34 + 49: 6(float) Load 48 + 50: 6(float) FAdd 47 49 + 51: 21(int) ConvertFToU 50 + 53: 39(ptr) AccessChain 18(SB0) 20 51 52 + 54: 7(fvec4) Load 53 + 55: 7(fvec4) FAdd 41 54 + Store 13(vTmp) 55 + 60: 23(ptr) AccessChain 10(pos) 22 + 61: 6(float) Load 60 + 62: 29(ptr) AccessChain 28 20 + 63: 21(int) Load 62 + 64: 6(float) ConvertUToF 63 + 65: 6(float) FMul 61 64 + 66: 23(ptr) AccessChain 10(pos) 34 + 67: 6(float) Load 66 + 68: 6(float) FAdd 65 67 + 69: 21(int) ConvertFToU 68 + 70: 39(ptr) AccessChain 59(SB1) 20 69 20 + 71: 7(fvec4) Load 70 + 72: 23(ptr) AccessChain 10(pos) 22 + 73: 6(float) Load 72 + 74: 29(ptr) AccessChain 28 20 + 75: 21(int) Load 74 + 76: 6(float) ConvertUToF 75 + 77: 6(float) FMul 73 76 + 78: 23(ptr) AccessChain 10(pos) 34 + 79: 6(float) Load 78 + 80: 6(float) FAdd 77 79 + 81: 21(int) ConvertFToU 80 + 82: 39(ptr) AccessChain 59(SB1) 20 81 52 + 83: 7(fvec4) Load 82 + 84: 7(fvec4) FAdd 71 83 + 85: 7(fvec4) Load 13(vTmp) + 86: 7(fvec4) FAdd 85 84 + Store 13(vTmp) 86 + 87: 7(fvec4) Load 13(vTmp) + ReturnValue 87 FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.tesc.out index 8fd6dd5..b7dfa63 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.tesc.out @@ -1,85 +1,86 @@ spv.stereoViewRendering.tesc -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 38 + Capability Geometry Capability Tessellation + Capability ShaderViewportIndexLayerNV Capability ShaderViewportMaskNV Capability ShaderStereoViewNV + Extension "SPV_EXT_shader_viewport_index_layer" Extension "SPV_NV_stereo_view_rendering" Extension "SPV_NV_viewport_array2" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 16 18 32 + EntryPoint TessellationControl 4 "main" 16 18 31 37 ExecutionMode 4 OutputVertices 4 Source GLSL 450 SourceExtension "GL_NV_stereo_view_rendering" SourceExtension "GL_NV_viewport_array2" Name 4 "main" Name 12 "gl_PerVertex" - MemberName 12(gl_PerVertex) 0 "gl_Layer" - MemberName 12(gl_PerVertex) 1 "gl_SecondaryPositionNV" - MemberName 12(gl_PerVertex) 2 "gl_SecondaryViewportMaskNV" + MemberName 12(gl_PerVertex) 0 "gl_SecondaryPositionNV" + MemberName 12(gl_PerVertex) 1 "gl_SecondaryViewportMaskNV" Name 16 "gl_out" Name 18 "gl_InvocationID" - Name 28 "gl_PerVertex" - MemberName 28(gl_PerVertex) 0 "gl_Position" - MemberName 28(gl_PerVertex) 1 "gl_PointSize" - MemberName 28(gl_PerVertex) 2 "gl_ClipDistance" - MemberName 28(gl_PerVertex) 3 "gl_CullDistance" - MemberName 28(gl_PerVertex) 4 "gl_SecondaryPositionNV" - Name 32 "gl_in" - MemberDecorate 12(gl_PerVertex) 0 BuiltIn Layer - MemberDecorate 12(gl_PerVertex) 0 ViewportRelativeNV - MemberDecorate 12(gl_PerVertex) 0 SecondaryViewportRelativeNV 1 - MemberDecorate 12(gl_PerVertex) 1 BuiltIn SecondaryPositionNV - MemberDecorate 12(gl_PerVertex) 2 BuiltIn SecondaryViewportMaskNV + Name 27 "gl_PerVertex" + MemberName 27(gl_PerVertex) 0 "gl_Position" + MemberName 27(gl_PerVertex) 1 "gl_PointSize" + MemberName 27(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 27(gl_PerVertex) 3 "gl_CullDistance" + MemberName 27(gl_PerVertex) 4 "gl_SecondaryPositionNV" + Name 31 "gl_in" + Name 37 "gl_Layer" + MemberDecorate 12(gl_PerVertex) 0 BuiltIn SecondaryPositionNV + MemberDecorate 12(gl_PerVertex) 1 BuiltIn SecondaryViewportMaskNV Decorate 12(gl_PerVertex) Block Decorate 18(gl_InvocationID) BuiltIn InvocationId - MemberDecorate 28(gl_PerVertex) 0 BuiltIn Position - MemberDecorate 28(gl_PerVertex) 1 BuiltIn PointSize - MemberDecorate 28(gl_PerVertex) 2 BuiltIn ClipDistance - MemberDecorate 28(gl_PerVertex) 3 BuiltIn CullDistance - Decorate 28(gl_PerVertex) Block + MemberDecorate 27(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 27(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 27(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 27(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 27(gl_PerVertex) Block + Decorate 37(gl_Layer) BuiltIn Layer + Decorate 37(gl_Layer) ViewportRelativeNV + Decorate 37(gl_Layer) SecondaryViewportRelativeNV 1 2: TypeVoid 3: TypeFunction 2 - 6: TypeInt 32 1 - 7: TypeFloat 32 - 8: TypeVector 7(float) 4 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypeInt 32 1 9: TypeInt 32 0 10: 9(int) Constant 2 - 11: TypeArray 6(int) 10 -12(gl_PerVertex): TypeStruct 6(int) 8(fvec4) 11 + 11: TypeArray 8(int) 10 +12(gl_PerVertex): TypeStruct 7(fvec4) 11 13: 9(int) Constant 4 14: TypeArray 12(gl_PerVertex) 13 15: TypePointer Output 14 16(gl_out): 15(ptr) Variable Output - 17: TypePointer Input 6(int) + 17: TypePointer Input 8(int) 18(gl_InvocationID): 17(ptr) Variable Input - 20: 6(int) Constant 2 - 21: 6(int) Constant 0 - 22: 6(int) Constant 1 - 23: TypePointer Output 6(int) - 26: 9(int) Constant 1 - 27: TypeArray 7(float) 26 -28(gl_PerVertex): TypeStruct 8(fvec4) 7(float) 27 27 8(fvec4) - 29: 9(int) Constant 32 - 30: TypeArray 28(gl_PerVertex) 29 - 31: TypePointer Input 30 - 32(gl_in): 31(ptr) Variable Input - 33: TypePointer Input 8(fvec4) - 36: TypePointer Output 8(fvec4) + 20: 8(int) Constant 1 + 21: 8(int) Constant 0 + 22: TypePointer Output 8(int) + 25: 9(int) Constant 1 + 26: TypeArray 6(float) 25 +27(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 26 26 7(fvec4) + 28: 9(int) Constant 32 + 29: TypeArray 27(gl_PerVertex) 28 + 30: TypePointer Input 29 + 31(gl_in): 30(ptr) Variable Input + 32: TypePointer Input 7(fvec4) + 35: TypePointer Output 7(fvec4) + 37(gl_Layer): 22(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 19: 6(int) Load 18(gl_InvocationID) - 24: 23(ptr) AccessChain 16(gl_out) 19 20 21 - Store 24 22 - 25: 6(int) Load 18(gl_InvocationID) - 34: 33(ptr) AccessChain 32(gl_in) 22 21 - 35: 8(fvec4) Load 34 - 37: 36(ptr) AccessChain 16(gl_out) 25 22 - Store 37 35 + 19: 8(int) Load 18(gl_InvocationID) + 23: 22(ptr) AccessChain 16(gl_out) 19 20 21 + Store 23 20 + 24: 8(int) Load 18(gl_InvocationID) + 33: 32(ptr) AccessChain 31(gl_in) 20 21 + 34: 7(fvec4) Load 33 + 36: 35(ptr) AccessChain 16(gl_out) 24 21 + Store 36 34 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.vert.out index d6c6956..31c6e21 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.stereoViewRendering.vert.out @@ -1,8 +1,6 @@ spv.stereoViewRendering.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 27 Capability Shader @@ -10,6 +8,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre Capability ShaderViewportIndexLayerNV Capability ShaderViewportMaskNV Capability ShaderStereoViewNV + Extension "SPV_EXT_shader_viewport_index_layer" Extension "SPV_NV_stereo_view_rendering" Extension "SPV_NV_viewport_array2" 1: ExtInstImport "GLSL.std.450" diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structAssignment.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structAssignment.frag.out index eb796f7..b27d4f1 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structAssignment.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structAssignment.frag.out @@ -3,7 +3,7 @@ WARNING: 0:6: '' : all default precisions are highp; use precision statements to "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 50 Capability Shader @@ -36,6 +36,7 @@ WARNING: 0:6: '' : all default precisions are highp; use precision statements to MemberDecorate 9(lunarStruct2) 0 RelaxedPrecision MemberDecorate 10(lunarStruct3) 1 RelaxedPrecision Decorate 16 RelaxedPrecision + Decorate 31(gl_FragColor) Location 0 Decorate 40(samp2D) DescriptorSet 0 Decorate 44(coord) RelaxedPrecision Decorate 45 RelaxedPrecision diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structDeref.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structDeref.frag.out index e60159f..d1f4699 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structDeref.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structDeref.frag.out @@ -1,6 +1,6 @@ spv.structDeref.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 123 Capability Shader @@ -40,6 +40,7 @@ spv.structDeref.frag Name 99 "gl_FragColor" Name 116 "samp2D" Name 122 "foo2" + Decorate 99(gl_FragColor) Location 0 Decorate 116(samp2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structure.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structure.frag.out index f7cb2d2..3238b33 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structure.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.structure.frag.out @@ -1,6 +1,6 @@ spv.structure.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 60 Capability Shader @@ -24,6 +24,7 @@ spv.structure.frag Name 50 "samp2D" Name 54 "coord" Name 59 "foo" + Decorate 45(gl_FragColor) Location 0 Decorate 50(samp2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.subpass.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.subpass.frag.out index c242111..f89c795 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.subpass.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.subpass.frag.out @@ -1,8 +1,6 @@ spv.subpass.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 67 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.switch.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.switch.frag.out index 86acb6c..d9eec0d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.switch.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.switch.frag.out @@ -1,11 +1,10 @@ spv.switch.frag -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. WARNING: 0:121: 'switch' : last case/default label not followed by statements WARNING: 0:134: 'switch' : last case/default label not followed by statements WARNING: 0:139: 'switch' : last case/default label not followed by statements // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 269 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.swizzle.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.swizzle.frag.out index 46978f8..df7bcaf 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.swizzle.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.swizzle.frag.out @@ -1,6 +1,6 @@ spv.swizzle.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 108 Capability Shader @@ -24,6 +24,7 @@ spv.swizzle.frag Name 81 "c" Name 83 "rep" Name 107 "blend" + Decorate 69(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.swizzleInversion.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.swizzleInversion.frag.out index bf0699a..ada29a6 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.swizzleInversion.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.swizzleInversion.frag.out @@ -1,8 +1,6 @@ spv.swizzleInversion.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 46 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.test.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.test.frag.out index bf0135a..ea868f8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.test.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.test.frag.out @@ -1,8 +1,6 @@ spv.test.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 55 Capability Shader @@ -25,6 +23,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre Name 49 "blend" Decorate 16(texSampler2D) DescriptorSet 0 Decorate 33(texSampler3D) DescriptorSet 0 + Decorate 43(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.test.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.test.vert.out index 623d16b..54fb81f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.test.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.test.vert.out @@ -2,7 +2,7 @@ spv.test.vert WARNING: 0:5: attribute deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 24 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.texture.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.texture.frag.out index 467f254..1a601f7 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.texture.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.texture.frag.out @@ -4,7 +4,7 @@ WARNING: 0:11: varying deprecated in version 130; may be removed in future relea WARNING: 0:12: varying deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 305 Capability Shader @@ -45,6 +45,7 @@ WARNING: 0:12: varying deprecated in version 130; may be removed in future relea Decorate 130(texSamplerCube) DescriptorSet 0 Decorate 145(shadowSampler1D) DescriptorSet 0 Decorate 164(shadowSampler2D) DescriptorSet 0 + Decorate 291(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.texture.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.texture.vert.out index c361549..9f94f24 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.texture.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.texture.vert.out @@ -1,6 +1,6 @@ spv.texture.vert // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 150 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.types.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.types.frag.out index 9a2d8e3..704561a 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.types.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.types.frag.out @@ -1,6 +1,6 @@ spv.types.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 260 Capability Shader @@ -55,6 +55,7 @@ spv.types.frag Decorate 111(i_i3) Flat Decorate 118(u_i4) Flat Decorate 120(i_i4) Flat + Decorate 160(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeBool diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.uint.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.uint.frag.out index e9ba0ce..9e1ccb1 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.uint.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.uint.frag.out @@ -1,8 +1,6 @@ spv.uint.frag -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 213 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.uniformArray.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.uniformArray.frag.out index 447ad4f..f355e2c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.uniformArray.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.uniformArray.frag.out @@ -1,6 +1,6 @@ spv.uniformArray.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 53 Capability Shader @@ -16,6 +16,7 @@ spv.uniformArray.frag Name 35 "alpha" Name 47 "gl_FragColor" Name 52 "texSampler2D" + Decorate 47(gl_FragColor) Location 0 Decorate 52(texSampler2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.variableArrayIndex.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.variableArrayIndex.frag.out index b4d3fe0..fd93913 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.variableArrayIndex.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.variableArrayIndex.frag.out @@ -1,8 +1,6 @@ spv.variableArrayIndex.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 93 Capability Shader @@ -38,6 +36,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre Decorate 20(foo3) Flat Decorate 34(foo2) Flat Decorate 36(foo) Flat + Decorate 54(gl_FragColor) Location 0 Decorate 59(samp2D) DescriptorSet 0 2: TypeVoid 3: TypeFunction 2 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.varyingArray.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.varyingArray.frag.out index 58833ea..bc0979d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.varyingArray.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.varyingArray.frag.out @@ -1,6 +1,6 @@ spv.varyingArray.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 61 Capability Shader @@ -18,6 +18,7 @@ spv.varyingArray.frag Name 45 "gl_FragColor" Name 48 "foo" Decorate 13(texSampler2D) DescriptorSet 0 + Decorate 45(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.varyingArrayIndirect.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.varyingArrayIndirect.frag.out index 9c01840..f7d6943 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.varyingArrayIndirect.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.varyingArrayIndirect.frag.out @@ -1,6 +1,6 @@ spv.varyingArrayIndirect.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 70 Capability Shader @@ -22,6 +22,7 @@ spv.varyingArrayIndirect.frag Decorate 13(texSampler2D) DescriptorSet 0 Decorate 22(b) Flat Decorate 31(a) Flat + Decorate 56(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.viewportArray2.tesc.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.viewportArray2.tesc.out index fdfa2b8..806a04a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.viewportArray2.tesc.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.viewportArray2.tesc.out @@ -1,58 +1,58 @@ spv.viewportArray2.tesc -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 25 + Capability Geometry Capability Tessellation Capability MultiViewport Capability ShaderViewportIndexLayerNV Capability ShaderViewportMaskNV + Extension "SPV_EXT_shader_viewport_index_layer" Extension "SPV_NV_viewport_array2" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint TessellationControl 4 "main" 14 16 + EntryPoint TessellationControl 4 "main" 14 16 22 24 ExecutionMode 4 OutputVertices 4 Source GLSL 450 SourceExtension "GL_NV_viewport_array2" Name 4 "main" Name 10 "gl_PerVertex" - MemberName 10(gl_PerVertex) 0 "gl_ViewportIndex" - MemberName 10(gl_PerVertex) 1 "gl_Layer" - MemberName 10(gl_PerVertex) 2 "gl_ViewportMask" + MemberName 10(gl_PerVertex) 0 "gl_ViewportMask" Name 14 "gl_out" Name 16 "gl_InvocationID" - MemberDecorate 10(gl_PerVertex) 0 BuiltIn ViewportIndex - MemberDecorate 10(gl_PerVertex) 1 BuiltIn Layer - MemberDecorate 10(gl_PerVertex) 1 ViewportRelativeNV - MemberDecorate 10(gl_PerVertex) 2 BuiltIn ViewportMaskNV + Name 22 "gl_ViewportIndex" + Name 24 "gl_Layer" + MemberDecorate 10(gl_PerVertex) 0 BuiltIn ViewportMaskNV Decorate 10(gl_PerVertex) Block Decorate 16(gl_InvocationID) BuiltIn InvocationId + Decorate 22(gl_ViewportIndex) BuiltIn ViewportIndex + Decorate 24(gl_Layer) BuiltIn Layer + Decorate 24(gl_Layer) ViewportRelativeNV 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 7: TypeInt 32 0 8: 7(int) Constant 2 9: TypeArray 6(int) 8 -10(gl_PerVertex): TypeStruct 6(int) 6(int) 9 +10(gl_PerVertex): TypeStruct 9 11: 7(int) Constant 4 12: TypeArray 10(gl_PerVertex) 11 13: TypePointer Output 12 14(gl_out): 13(ptr) Variable Output 15: TypePointer Input 6(int) 16(gl_InvocationID): 15(ptr) Variable Input - 18: 6(int) Constant 2 - 19: 6(int) Constant 0 - 20: 6(int) Constant 1 - 21: TypePointer Output 6(int) + 18: 6(int) Constant 0 + 19: 6(int) Constant 1 + 20: TypePointer Output 6(int) +22(gl_ViewportIndex): 20(ptr) Variable Output + 23: 6(int) Constant 2 + 24(gl_Layer): 20(ptr) Variable Output 4(main): 2 Function None 3 5: Label 17: 6(int) Load 16(gl_InvocationID) - 22: 21(ptr) AccessChain 14(gl_out) 17 18 19 - Store 22 20 - 23: 6(int) Load 16(gl_InvocationID) - 24: 21(ptr) AccessChain 14(gl_out) 23 19 - Store 24 18 + 21: 20(ptr) AccessChain 14(gl_out) 17 18 18 + Store 21 19 + Store 22(gl_ViewportIndex) 23 Return FunctionEnd diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.viewportArray2.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.viewportArray2.vert.out index 766685f..d623704 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.viewportArray2.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.viewportArray2.vert.out @@ -1,8 +1,6 @@ spv.viewportArray2.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 19 Capability Shader @@ -10,6 +8,7 @@ Warning, version 450 is not yet complete; most version-specific features are pre Capability MultiViewport Capability ShaderViewportIndexLayerNV Capability ShaderViewportMaskNV + Extension "SPV_EXT_shader_viewport_index_layer" Extension "SPV_NV_viewport_array2" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.voidFunction.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.voidFunction.frag.out index 4434861..67acb33 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.voidFunction.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.voidFunction.frag.out @@ -1,8 +1,6 @@ spv.voidFunction.frag -Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 43 Capability Shader @@ -20,6 +18,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre Name 37 "gl_FragColor" Name 40 "BaseColor" Name 42 "d" + Decorate 37(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 10: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.while-continue-break.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.while-continue-break.vert.out index 73dc35c..0b4bf47 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.while-continue-break.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.while-continue-break.vert.out @@ -1,8 +1,6 @@ spv.while-continue-break.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 41 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.while-simple.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.while-simple.vert.out index 82121dd..c08d81c 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.while-simple.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.while-simple.vert.out @@ -1,8 +1,6 @@ spv.while-simple.vert -Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. - // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 22 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.whileLoop.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.whileLoop.frag.out index ce1e195..bd54136 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.whileLoop.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/spv.whileLoop.frag.out @@ -1,6 +1,6 @@ spv.whileLoop.frag // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 35 Capability Shader @@ -15,6 +15,7 @@ spv.whileLoop.frag Name 24 "d" Name 28 "bigColor" Name 33 "gl_FragColor" + Decorate 33(gl_FragColor) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/syntaxError.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/syntaxError.frag.out index cdda760..b6ebea3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/syntaxError.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/syntaxError.frag.out @@ -1,6 +1,6 @@ syntaxError.frag ERROR: 0:9: 'vec5' : undeclared identifier -ERROR: 0:9: '' : syntax error +ERROR: 0:9: '' : syntax error, unexpected IDENTIFIER, expecting COMMA or SEMICOLON ERROR: 2 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/tokenLength.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/tokenLength.vert.out index c473858..8c31da9 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/tokenLength.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/tokenLength.vert.out @@ -51,7 +51,7 @@ ERROR: node is still EOpNull! 0:13 move second child to first child ( temp highp int) 0:13 'OE' ( global highp int) 0:13 Constant: -0:13 1073741823 (const int) +0:13 -1 (const int) 0:14 Sequence 0:14 move second child to first child ( temp highp int) 0:14 'HE' ( global highp int) @@ -92,7 +92,7 @@ ERROR: node is still EOpNull! 0:34 move second child to first child ( temp highp int) 0:34 'superO' ( global highp int) 0:34 Constant: -0:34 1073741823 (const int) +0:34 -1 (const int) 0:35 Sequence 0:35 move second child to first child ( temp highp int) 0:35 'superI' ( global highp int) @@ -147,7 +147,7 @@ ERROR: node is still EOpNull! 0:13 move second child to first child ( temp highp int) 0:13 'OE' ( global highp int) 0:13 Constant: -0:13 1073741823 (const int) +0:13 -1 (const int) 0:14 Sequence 0:14 move second child to first child ( temp highp int) 0:14 'HE' ( global highp int) @@ -188,7 +188,7 @@ ERROR: node is still EOpNull! 0:34 move second child to first child ( temp highp int) 0:34 'superO' ( global highp int) 0:34 Constant: -0:34 1073741823 (const int) +0:34 -1 (const int) 0:35 Sequence 0:35 move second child to first child ( temp highp int) 0:35 'superI' ( global highp int) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/tokenPaste.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/tokenPaste.vert.out index acc2ced..b5ba9a5 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/tokenPaste.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/tokenPaste.vert.out @@ -1,5 +1,4 @@ tokenPaste.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:38: '##' : unexpected location ERROR: 0:40: '##' : unexpected location; end of replacement list ERROR: 0:49: '##' : combined tokens are too long diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/versionsClean.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/versionsClean.vert.out index cd9da12..eb2e07b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/versionsClean.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/versionsClean.vert.out @@ -1,6 +1,4 @@ versionsClean.vert -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. - Shader version: 420 0:? Sequence 0:40 Function Definition: main( ( global void) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/versionsErrors.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/versionsErrors.vert.out index 0d37136..f11e011 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/versionsErrors.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/versionsErrors.vert.out @@ -1,5 +1,4 @@ versionsErrors.vert -Warning, version 420 is not yet complete; most version-specific features are present, but some are missing. WARNING: 0:38: attribute deprecated in version 130; may be removed in future release ERROR: 0:38: 'attribute' : no longer supported in core profile; removed in version 420 ERROR: 0:45: 'discard' : not supported in this stage: vertex diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.ast.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.ast.vert.out index bfc38c0..a2f2ec9 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.ast.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.ast.vert.out @@ -1,6 +1,4 @@ vulkan.ast.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. - Shader version: 450 0:? Sequence 0:7 Function Definition: main( ( global void) @@ -260,7 +258,7 @@ Shader version: 450 0:? 2 (const int) // Module Version 10000 -// Generated by (magic number): 80001 +// Generated by (magic number): 80003 // Id's are bound by 50 Capability Shader diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.comp.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.comp.out index 5eb4c5b..e56dca4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.comp.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.comp.out @@ -1,5 +1,4 @@ vulkan.comp -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:5: 'local_size' : cannot change previously set size ERROR: 1 compilation errors. No code generated. diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.frag.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.frag.out index 27edff9..0440cf4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.frag.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.frag.out @@ -1,5 +1,4 @@ vulkan.frag -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:14: 'sampler2D' : sampler-constructor requires two arguments ERROR: 0:15: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type ERROR: 0:16: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type @@ -26,9 +25,9 @@ ERROR: 0:60: 'subpassLoadMS' : no matching overloaded function found ERROR: 0:61: 'subpassLoad' : no matching overloaded function found ERROR: 0:63: 'subpassLoadMS' : no matching overloaded function found ERROR: 0:66: 'subroutine' : not allowed when generating SPIR-V -ERROR: 0:66: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan +ERROR: 0:66: 'subroutine' : feature not yet implemented ERROR: 0:67: 'subroutine' : not allowed when generating SPIR-V -ERROR: 0:67: 'uniform' : no qualifiers allowed for function return +ERROR: 0:67: 'subroutine' : feature not yet implemented ERROR: 0:69: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan ERROR: 0:73: 'texture' : no matching overloaded function found ERROR: 0:74: 'imageStore' : no matching overloaded function found @@ -40,7 +39,11 @@ ERROR: 0:93: ',' : sampler constructor must appear at point of use ERROR: 0:94: ':' : wrong operand types: no operation ':' exists that takes a left-hand operand of type ' temp sampler2D' and a right operand of type ' temp sampler2D' (or there is no acceptable conversion) ERROR: 0:94: 'call argument' : sampler constructor must appear at point of use ERROR: 0:96: 'gl_NumSamples' : undeclared identifier -ERROR: 38 compilation errors. No code generated. +ERROR: 0:101: 'noise1' : no matching overloaded function found +ERROR: 0:102: 'noise2' : no matching overloaded function found +ERROR: 0:103: 'noise3' : no matching overloaded function found +ERROR: 0:104: 'noise4' : no matching overloaded function found +ERROR: 42 compilation errors. No code generated. ERROR: Linking fragment stage: Only one push_constant block is allowed per stage diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.vert.out b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.vert.out index 1e74417..0b2ea53 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.vert.out +++ b/3rdparty/bgfx/3rdparty/glslang/Test/baseResults/vulkan.vert.out @@ -1,5 +1,4 @@ vulkan.vert -Warning, version 450 is not yet complete; most version-specific features are present, but some are missing. ERROR: 0:3: 'subpass input' : not supported in this stage: vertex ERROR: 0:4: 'subpass input' : not supported in this stage: vertex ERROR: 0:5: 'subpass input' : not supported in this stage: vertex @@ -23,7 +22,11 @@ ERROR: 0:32: 'initializer' : can't use with types containing arrays sized with a ERROR: 0:34: '=' : can't use with types containing arrays sized with a specialization constant ERROR: 0:35: '==' : can't use with types containing arrays sized with a specialization constant ERROR: 0:39: 'set' : cannot be used with push_constant -ERROR: 23 compilation errors. No code generated. +ERROR: 0:49: '[]' : only outermost dimension of an array of arrays can be a specialization constant +ERROR: 0:50: '[]' : only outermost dimension of an array of arrays can be a specialization constant +ERROR: 0:51: '[]' : only outermost dimension of an array of arrays can be a specialization constant +ERROR: 0:54: '[]' : only outermost dimension of an array of arrays can be a specialization constant +ERROR: 27 compilation errors. No code generated. SPIR-V is not generated for failed compile or link diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/cppSimple.vert b/3rdparty/bgfx/3rdparty/glslang/Test/cppSimple.vert index 198203a..fdd1422 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/cppSimple.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/cppSimple.vert @@ -337,6 +337,16 @@ int aoeua = FOOOM; #error \ 376 #error \377 +// ERROR for macro expansion to yield 'defined' +#line 9600 +#define DEF_MAC +#define DEF_DEFINED defined +#if DEF_DEFINED DEF_MAC +#error DEF_DEFINED then +#else +#error DEF_DEFINED else +#endif + #line 10000 #if 1 #else diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/glspv.frag b/3rdparty/bgfx/3rdparty/glslang/Test/glspv.frag index cea8e13..86c9f6a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/glspv.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/glspv.frag @@ -1,4 +1,4 @@ -#version 330 +#version 450 #ifdef GL_SPIRV #error GL_SPIRV is set ( correct, not an error ) @@ -11,4 +11,17 @@ void main() { } +uniform float f; // ERROR, no location +layout(location = 2) uniform float g; +uniform sampler2D s1; +layout(location = 3) uniform sampler2D s2; + +void noise() +{ + noise1(vec4(1)); + noise2(4.0); + noise3(vec2(3)); + noise4(1); +} + layout(input_attachment_index = 1) uniform subpassInput sub; // ERROR, no inputs diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.array.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.array.frag index 1abba89..ff0004f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.array.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.array.frag @@ -4,8 +4,15 @@ struct { float4 m[7]; } s[11]; -float4 PixelShaderFunction(int i, float4 input[3]) : COLOR0 +static float4 C = float4(1,2,3,4); +float4 a1[1] = { float4(1,2,3,4) }; +float4 a2[2] = { float4(1,2,3,4), float4(5,2,3,4), }; +const float4 c1[1] = { float4(1,2,3,4) }; +static const float4 c2[2] = { C, float4(1,2,3,4), }; + +float4 PixelShaderFunction(int i : sem1, float4 input[3] : sem2) : SV_TARGET0 { - float4 b[10]; - return a[1] + a[i] + input[2] + input[i] + b[5] + b[i] + s[i].m[i]; -} \ No newline at end of file + float4 b[10] = { C, C, C, C, C, C, C, C, C, C }; + float4 tmp = C + a1[0] + c1[0] + a2[i] + c2[i]; + return a[1] + a[i] + input[2] + input[i] + b[5] + b[i] + s[i].m[i] + tmp; +} diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.buffer.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.buffer.frag index b93dcd3..73f42e8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.buffer.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.buffer.frag @@ -1,17 +1,17 @@ -cbuffer { +cbuffer buf1 { float4 v1; -}; +}; // extraneous ; -tbuffer { +tbuffer buf2 { float4 v2; -}; +}; // extraneous ; -cbuffer cbufName : register(b2, space10) { - float4 v3; - int i3 : packoffset(c1.y); -}; +cbuffer cbufName { + float4 v3 : packoffset(c0); + int i3 : packoffset(c1.y); +} -tbuffer tbufName : register(b8) { +tbuffer tbufName : register(t8) { float4 v4 : packoffset(c1); int i4 : packoffset(c3); float f1 : packoffset(c3.w); @@ -19,14 +19,29 @@ tbuffer tbufName : register(b8) { float f4 : packoffset(c4.y); float f5 : packoffset(c4.z); float f6 : packoffset(c); - float f7; - float3x4 m1; - row_major float3x4 m2; - column_major float3x4 m3; - float3x4 m4; + float f7 : packoffset(c8); + float3x4 m1 : packoffset(c7); + row_major float3x4 m2 : packoffset(c11); + column_major float3x4 m3 : packoffset(c15); + float3x4 m4 : packoffset(c19); +} + +float foo() // float looks like identifier, but can't be part of tbuffer +{ + return 1.0; +} + +struct id { + float4 a; }; -float4 PixelShaderFunction(float4 input) : COLOR0 -{ - return input + v1 + v2 + v3 + v4; +cbuffer cbufName2 { + float4 v24; +} + +id PixelShaderFunction(float4 input : SV_POSITION) : SV_TARGET0 // id looks like id for cbuffer name, but can't be +{ + id ret; + ret.a = v24 + (input + v1 + v2 + v3 + v4) * foo(); + return ret; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.conditional.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.conditional.frag index 128c593..91f75ee 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.conditional.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.conditional.frag @@ -1,3 +1,28 @@ +float4 c4; +float4 t4; +float4 f4; +float t; +float f; + +float4 vectorCond() +{ + return (c4 ? t4 : f4) + + (c4 ? t : f ) + + (t4 < f4 ? t4 : f4) + + (c4 ? t : f4); +} + +float4 scalarCond() +{ + float4 ret = t != f ? t * f4 : 1; + return ret; +} + +float2 fbSelect(bool2 cnd, float2 src0, float2 src1) +{ + return cnd ? src0 : src1; +} + float4 PixelShaderFunction(float4 input) : COLOR0 { int a = 1 < 2 ? 3 < 4 ? 5 : 6 : 7; @@ -12,5 +37,6 @@ float4 PixelShaderFunction(float4 input) : COLOR0 e = a = b ? c = d : 10, b = a ? d = c : 11; float4 f; f = ret.x < input.y ? c * input : d * input; - return e * ret + f; + return e * ret + f + vectorCond() + scalarCond() + + float4(fbSelect(bool2(true, false), float2(1.0, 2.0), float2(3.0, 4.0)), 10.0, 10.0); } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.doLoop.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.doLoop.frag index 251a8c1..0318dc8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.doLoop.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.doLoop.frag @@ -1,6 +1,9 @@ -float4 PixelShaderFunction(float4 input) : COLOR0 +float4 PixelShaderFunction(float input) : COLOR0 { [unroll] do {} while (false); [unroll] do {;} while (false); - do { return input; } while (all(input == input)); + do { return (float4)input; } while (input > 2.0); + do ++input; while (input < 10.0); + do while (++input < 10.0); while (++input < 10.0); // nest while inside do-while + return (float4)input; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.forLoop.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.forLoop.frag index 9378996..9cf60ee 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.forLoop.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.forLoop.frag @@ -5,9 +5,13 @@ float4 PixelShaderFunction(float4 input) : COLOR0 [unroll] for (; any(input != input); ) {} for (; any(input != input); ) { return -input; } for (--input; any(input != input); input += 2) { return -input; } - for (;;) if (input.x > 2.0) break; - for (;;) if (input.x > 2.0) continue; - float ii; - for (int ii = -1; ii < 3; ++ii) if (ii == 2) continue; - --ii; + for (;;) if (input.x > 2.0) break; + for (;;) if (input.x > 2.0) continue; + float ii; + for (int ii = -1; ii < 3; ++ii) if (ii == 2) continue; + --ii; + for (int first = 0, second = 1; ;) first + second; + for ( int i = 0, count = int(ii); i < count; i++ ); + for (float first = 0, second[2], third; first < second[0]; ++second[1]) first + second[1] + third; + for (--ii, --ii, --ii;;) ii; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.array.dx10.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.array.dx10.frag index 4ed7f4b..b6310ac 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.array.dx10.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.array.dx10.frag @@ -29,6 +29,10 @@ PS_OUTPUT main() // no 1D gathers + float4 txval80 = g_tTex2df4a . GatherCmp(g_sSampCmp, c3, .75); + int4 txval81 = g_tTex2di4a . GatherCmp(g_sSampCmp, c3, .75); + uint4 txval82 = g_tTex2du4a . GatherCmp(g_sSampCmp, c3, .75); + float4 txval00 = g_tTex2df4a . GatherCmpRed(g_sSampCmp, c3, .75); int4 txval01 = g_tTex2di4a . GatherCmpRed(g_sSampCmp, c3, .75); uint4 txval02 = g_tTex2du4a . GatherCmpRed(g_sSampCmp, c3, .75); diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.basic.dx10.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.basic.dx10.frag index 9dc1631..94ef576 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.basic.dx10.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.basic.dx10.frag @@ -51,6 +51,10 @@ PS_OUTPUT main() int4 txval31 = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75); uint4 txval32 = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75); + float4 txval80 = g_tTex2df4 . GatherCmp(g_sSampCmp, c2, 0.75); + int4 txval81 = g_tTex2di4 . GatherCmp(g_sSampCmp, c2, 0.75); + uint4 txval82 = g_tTex2du4 . GatherCmp(g_sSampCmp, c2, 0.75); + // no 3D gathers float4 txval40 = g_tTexcdf4 . GatherCmpRed(g_sSampCmp, c3, 0.75); @@ -69,6 +73,10 @@ PS_OUTPUT main() int4 txval71 = g_tTexcdi4 . GatherCmpAlpha(g_sSampCmp, c3, 0.75); uint4 txval72 = g_tTexcdu4 . GatherCmpAlpha(g_sSampCmp, c3, 0.75); + float4 txval90 = g_tTexcdf4 . GatherCmp(g_sSampCmp, c3, 0.75); + int4 txval91 = g_tTexcdi4 . GatherCmp(g_sSampCmp, c3, 0.75); + uint4 txval92 = g_tTexcdu4 . GatherCmp(g_sSampCmp, c3, 0.75); + psout.Color = 1.0; psout.Depth = 1.0; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.offset.dx10.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.offset.dx10.frag index 18e3a37..7287fe4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.offset.dx10.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.offset.dx10.frag @@ -50,13 +50,9 @@ PS_OUTPUT main() int4 txval014 = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,-1), int2(1,-1), int2(1,-1), int2(1,-1)); uint4 txval024 = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,1), int2(1,1), int2(1,1), int2(1,1)); - // float4 txval00s = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), status); - // int4 txval01s = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), status); - // uint4 txval02s = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), status); - - // float4 txval004s = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); - // int4 txval014s = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); - // uint4 txval024s = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); + float4 txval401 = g_tTex2df4 . GatherCmp(g_sSampCmp, c2, 0.75, int2(1,0)); + int4 txval411 = g_tTex2di4 . GatherCmp(g_sSampCmp, c2, 0.75, int2(1,-1)); + uint4 txval421 = g_tTex2du4 . GatherCmp(g_sSampCmp, c2, 0.75, int2(1,1)); // GatherCmpGreen not implemented pending OpImageDrefGather component input // float4 txval101 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0)); diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.offsetarray.dx10.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.offsetarray.dx10.frag index 11131bc..7f381bb 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.offsetarray.dx10.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.gathercmpRGBA.offsetarray.dx10.frag @@ -36,6 +36,10 @@ PS_OUTPUT main() // no 1D gathers + float4 txval401 = g_tTex2df4a . GatherCmp(g_sSampCmp, c3, 0.75, o2); + int4 txval411 = g_tTex2di4a . GatherCmp(g_sSampCmp, c3, 0.75, o2); + uint4 txval421 = g_tTex2du4a . GatherCmp(g_sSampCmp, c3, 0.75, o2); + float4 txval001 = g_tTex2df4a . GatherCmpRed(g_sSampCmp, c3, 0.75, o2); int4 txval011 = g_tTex2di4a . GatherCmpRed(g_sSampCmp, c3, 0.75, o2); uint4 txval021 = g_tTex2du4a . GatherCmpRed(g_sSampCmp, c3, 0.75, o2); diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.getsampleposition.dx10.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.getsampleposition.dx10.frag index a7a93b3..a1182fb 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.getsampleposition.dx10.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.getsampleposition.dx10.frag @@ -9,12 +9,12 @@ struct PS_OUTPUT float Depth : SV_Depth; }; -PS_OUTPUT main() +PS_OUTPUT main(int sample : SAMPLE) { PS_OUTPUT psout; - float2 r00 = g_tTex2dmsf4.GetSamplePosition(1); - float2 r01 = g_tTex2dmsf4a.GetSamplePosition(2); + float2 r00 = g_tTex2dmsf4.GetSamplePosition(sample); + float2 r01 = g_tTex2dmsf4a.GetSamplePosition(sample); psout.Color = 1.0; psout.Depth = 1.0; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.hull.void.tesc b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.hull.void.tesc index 971d613..c96ecb4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.hull.void.tesc +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.hull.void.tesc @@ -19,7 +19,7 @@ struct HS_OUT [domain("tri")] [partitioning("fractional_even")] -[outputtopology("line")] +[outputtopology("triangle_ccw")] [outputcontrolpoints(3)] [patchconstantfunc("PCF")] HS_OUT main(InputPatch ip) diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.inoutquals.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.inoutquals.frag index 9328dfb..6a124f8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.inoutquals.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.inoutquals.frag @@ -4,11 +4,12 @@ struct PS_OUTPUT float Depth : SV_Depth; }; -inline void MyFunc(in float x, out float y, inout float z) +inline void MyFunc(in float x, out float y, inout float z, in out float w) { y = x; z = y; x = -1; // no effect since x = in param + w *= 1; } PS_OUTPUT main(noperspective in float4 inpos : SV_Position, out int sampleMask : SV_Coverage) @@ -16,7 +17,7 @@ PS_OUTPUT main(noperspective in float4 inpos : SV_Position, out int sampleMask : PS_OUTPUT psout; float x = 7, y, z = 3; - MyFunc(x, y, z); + MyFunc(x, y, z, inpos.w); psout.Color = float4(x, y, z, 1); psout.Depth = inpos.w; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.intrinsics.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.intrinsics.frag index 029b156..41b5f54 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.intrinsics.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.intrinsics.frag @@ -13,7 +13,7 @@ groupshared uint4 gs_ua4; groupshared uint4 gs_ub4; groupshared uint4 gs_uc4; -float PixelShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint inU1) +float PixelShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, int inU1) { uint out_u1; @@ -23,7 +23,7 @@ float PixelShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint i bool r003 = any(inF0); float r004 = asin(inF0); int r005 = asint(inF0); - uint r006 = asuint(inF0); + uint r006 = asuint(inU1); float r007 = asfloat(inU0); // asdouble(inU0, inU1); // TODO: enable when HLSL parser used for intrinsics float r009 = atan(inF0); @@ -31,6 +31,7 @@ float PixelShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint i float r011 = ceil(inF0); float r012 = clamp(inF0, inF1, inF2); clip(inF0); + clip(r005); float r014 = cos(inF0); float r015 = cosh(inF0); int r016 = countbits(7); @@ -108,6 +109,7 @@ float2 PixelShaderFunction2(float2 inF0, float2 inF1, float2 inF2, uint2 inU0, u float2 r011 = ceil(inF0); float2 r012 = clamp(inF0, inF1, inF2); clip(inF0); + clip(inU0); float2 r013 = cos(inF0); float2 r015 = cosh(inF0); int2 r016 = countbits(int2(7,3)); @@ -190,6 +192,7 @@ float3 PixelShaderFunction3(float3 inF0, float3 inF1, float3 inF2, uint3 inU0, u float3 r011 = ceil(inF0); float3 r012 = clamp(inF0, inF1, inF2); clip(inF0); + clip(inU0); float3 r013 = cos(inF0); float3 r014 = cosh(inF0); uint3 r015 = countbits(uint3(7,3,5)); @@ -271,6 +274,7 @@ float4 PixelShaderFunction(float4 inF0, float4 inF1, float4 inF2, uint4 inU0, ui float4 r011 = ceil(inF0); float4 r012 = clamp(inF0, inF1, inF2); clip(inF0); + clip(inU0); float4 r013 = cos(inF0); float4 r014 = cosh(inF0); uint4 r015 = countbits(uint4(7,3,5,2)); diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.layout.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.layout.frag index 4c2f7ce..a4fa5af 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.layout.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.layout.frag @@ -14,5 +14,6 @@ tbuffer tbufName2 : layout(set=4,binding=7) { float4 PixelShaderFunction(float4 input) : COLOR0 { - return input + v1 + v5 + v1PostLayout; + float4 layout = 2.0; + return input + v1 + v5 + v1PostLayout * layout; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.numthreads.comp b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.numthreads.comp index fcc97f3..0871d3f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.numthreads.comp +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.numthreads.comp @@ -4,11 +4,8 @@ void main(uint3 tid : SV_DispatchThreadID ) { } -[numTHreaDs(4,4,2)] // case insensitive -void main_aux1(uint3 tid : SV_DispatchThreadID ) +[numthreads(1,4,8)] +void main_aux2(uint3 tid : SV_DispatchThreadID ) { } -[numthreads(1,4,8)] -void main_aux2(uint3 tid : SV_DispatchThreadID ); - diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.reflection.vert b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.reflection.vert index 21cc810..06207c7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.reflection.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.reflection.vert @@ -19,27 +19,10 @@ cbuffer c_nameless { float4 c_anonMember3; }; -cbuffer named { - float3 deadMember1; - int scalar; - float4 member2; - float4 member3; - float2 memfloat2; - float memf1; - bool memf2; - int memf3; - float2 memfloat2a; - float2x2 m22[7]; -} ablock; - cbuffer namelessdead { int a; }; -cbuffer namedDead { - int b; -} bblock; - struct N1 { float a; }; @@ -57,7 +40,7 @@ struct N3 { cbuffer nested { N3 foo; -} nest; +} struct TS { int a; @@ -89,16 +72,12 @@ struct deep3 { int3 v3; }; - - - uniform deep3 deepA[2], deepB[2], deepC[3], deepD[2]; const bool control = true; void deadFunction() { - float3 v3 = ablock.deadMember1; float4 v = anonDeadMember2; float f = ufDead4; } @@ -110,12 +89,12 @@ void liveFunction2() } tbuffer abl { - float foo; -} arrBl; + float foo1; +} tbuffer abl2 { - float foo; -} arrBl2; + float foo2; +} void flizv(in float attributeFloat, in float2 attributeFloat2, in float3 attributeFloat3, in float4 attributeFloat4, in float4x4 attributeMat4) { @@ -130,22 +109,16 @@ void flizv(in float attributeFloat, in float2 attributeFloat2, in float3 attribu liveFunction2(); f = anonMember3.z; f = s.a; - f = ablock.scalar; f = m23[1].y + scalarAfterm23; f = c_m23[1].y + c_scalarAfterm23; f += scalarBeforeArray; f += floatArray[2]; f += floatArray[4]; f += scalarAfterArray; - f += ablock.memfloat2.x; - f += ablock.memf1; - f += float(ablock.memf2); - f += ablock.memf3; - f += ablock.memfloat2a.y; - f += ablock.m22[i][1][0]; + f += m22[i][1][0]; f += dm22[3][0][1]; f += m22[2][1].y; - f += nest.foo.n1.a + nest.foo.n2.b + nest.foo.n2.c + nest.foo.n2.d; + f += foo.n1.a + foo.n2.b + foo.n2.c + foo.n2.d; f += deepA[i].d2.d1[2].va[1].x; f += deepB[1].d2.d1[i].va[1].x; f += deepB[i].d2.d1[i].va[1].x; @@ -154,8 +127,8 @@ void flizv(in float attributeFloat, in float2 attributeFloat2, in float3 attribu } else f = ufDead3; - f += arrBl.foo + arrBl.foo; - f += arrBl2.foo; + f += foo1 + foo2; + f += foo2; f += attributeFloat; f += attributeFloat2.x; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.semantic.geom b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.semantic.geom index c4d7aba..fc6a53a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.semantic.geom +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.semantic.geom @@ -1,4 +1,5 @@ struct S { + float clip0 : SV_Position; float clip0 : SV_ClipDistance0; float cull0 : SV_CullDistance0; uint vpai : SV_ViewportArrayIndex; @@ -7,9 +8,9 @@ struct S { }; [maxvertexcount(4)] -S main(triangle in uint VertexID[3] : VertexID, +void main(triangle in uint VertexID[3] : VertexID, inout LineStream OutputStream) { S s; - return s; + OutputStream.Append(s); } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.semantic.vert b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.semantic.vert index 16bba37..1845dc3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.semantic.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.semantic.vert @@ -1,10 +1,8 @@ struct S { - float clip : SV_ClipDistance; float clip0 : SV_ClipDistance0; - float clip7 : SV_ClipDistance7; - float cull : SV_CullDistance; - float cull2 : SV_CullDistance2; - float cull5 : SV_CullDistance5; + float clip1 : SV_ClipDistance1; + float cull0 : SV_CullDistance0; + float cull1 : SV_CullDistance1; int ii : SV_InstanceID; }; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.shapeConv.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.shapeConv.frag index adb170e..bc09d80 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.shapeConv.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.shapeConv.frag @@ -28,5 +28,22 @@ float4 PixelShaderFunction(float4 input, float f) : COLOR0 f1.x; f1.xxx; - return input; + const float4 f4 = 3.0; + + uint ui; + uint3 ui3; + + ui >> ui3; + ui3 >> ui; + + v *= f1; + f1 *= v; + + float3 mixed = u * v; + f = u; + f1 = u; + float sf = v; + float1 sf1 = v; + + return input * f4; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.struct.split.assign.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.struct.split.assign.frag index e7fe028..d9921f3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.struct.split.assign.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.struct.split.assign.frag @@ -8,5 +8,5 @@ float4 main(int i, S input[3]) : COLOR0 S a[3]; input = a; - return float3(1.0); + return a[1].pos; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.struct.split.nested.geom b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.struct.split.nested.geom index 03bf38f..8bcc5b9 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.struct.split.nested.geom +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.struct.split.nested.geom @@ -1,8 +1,8 @@ struct STRUCT_WITH_NO_BUILTIN_INTERSTAGE_IO { - float m0_array[2]; - int m1; + float m0_array[2] : mysemA; + int m1 : mysemB; }; struct PS_IN @@ -26,6 +26,9 @@ void main(triangle PS_IN tin[3], inout TriangleStream ts ) o.psIn.pos = float4(1,2,3,4); o.psIn.tc = float2(5,6); + o.contains_no_builtin_io.m0_array[0] = 2.3; + o.contains_no_builtin_io.m0_array[1] = 2.3; + o.contains_no_builtin_io.m1 = 2; ts.Append(o); } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structin.vert b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structin.vert index 43d0cfd..20a26dd 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structin.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.structin.vert @@ -1,14 +1,17 @@ struct VI { - float4 m[2]; - uint2 coord; - linear float4 b; + float4 m[2] : mysemA; + float4 coord : SV_POSITION; + linear float4 b : mysemB; }; -VI main(float4 d, VI vi, float4 e) : SV_POSITION +VI main(float4 d : mysem, VI vi, float4 e : mysem) { VI local; - local.b = vi.m[1] + vi.m[0] + float4(vi.coord.x) + d + e; + local.b = vi.m[1] + vi.m[0] + (float4)vi.coord.x + d + e; + local.coord = (float4)1; + local.m[0] = (float4)2; + local.m[1] = (float4)3; return local; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.switch.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.switch.frag index 88239c2..78ebfef 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.switch.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.switch.frag @@ -18,7 +18,7 @@ float4 PixelShaderFunction(float4 input, int c, int d) : COLOR0 break; } - switch (c) { + [branch] switch (c) { case 1: ++input; break; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.half.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.half.frag index f082039..a78afab 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.half.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.half.frag @@ -7,5 +7,22 @@ float4 main() : SV_Target0 half3 h3 = 3; half4 h4 = 4; - return 0.0; + half1x1 h11; + half1x2 h12; + half1x3 h13; + half1x4 h14; + half2x1 h21; + half2x2 h22 = half2x2(1,2,3,4); + half2x3 h23 = (half2x3)4.9; + half2x4 h24; + half3x1 h31; + half3x2 h32; + half3x3 h33; + half3x4 h34; + half4x1 h41; + half4x2 h42; + half4x3 h43; + half4x4 h44; + + return h23._11 + h4.y + h0; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.identifier.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.identifier.frag index 25ba457..4e53a82 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.identifier.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.type.identifier.frag @@ -24,5 +24,8 @@ float4 main() : SV_Target0 float = float + int + uint + min16float + min10float + (bool[0] ? int : float) + fn(float); - return float; + half2x3 half2x3; + half2x3._11 = (float) * float; + + return float + half2x3._11; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/numeral.frag b/3rdparty/bgfx/3rdparty/glslang/Test/numeral.frag index cc0862c..39814f4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/numeral.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/numeral.frag @@ -101,3 +101,6 @@ uint g3 = 4294967294u; int g4 = 4294967296; // ERROR, too big int g5 = 4294967295; int g6 = 4294967294; +float inf1 = -1.#INF; +float inf2 = 1.#INF; +float inf3 = +1.#INF; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/reflection.vert b/3rdparty/bgfx/3rdparty/glslang/Test/reflection.vert index be49822..7549f08 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/reflection.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/reflection.vert @@ -133,6 +133,26 @@ uniform abl2 { float foo; } arrBl2[4]; +buffer buf1 { + float scalar; + float runtimeArray[]; +} buf1i; + +buffer buf2 { + float scalar; + N2 runtimeArray[]; +} buf2i; + +buffer buf3 { + float scalar; + float runtimeArray[]; +} buf3i; + +buffer buf4 { + float scalar; + N2 runtimeArray[]; +} buf4i; + void main() { liveFunction1(image_ui2D, sampler_2D, sampler_2DMSArray); @@ -179,4 +199,8 @@ void main() f += attributeFloat3.x; f += attributeFloat4.x; f += attributeMat4[0][1]; + f += buf1i.runtimeArray[3]; + f += buf2i.runtimeArray[3].c; + f += buf3i.runtimeArray[gl_InstanceID]; + f += buf4i.runtimeArray[gl_InstanceID].c; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/runtests b/3rdparty/bgfx/3rdparty/glslang/Test/runtests index efc449d..af08a4d 100755 --- a/3rdparty/bgfx/3rdparty/glslang/Test/runtests +++ b/3rdparty/bgfx/3rdparty/glslang/Test/runtests @@ -3,6 +3,7 @@ TARGETDIR=localResults BASEDIR=baseResults EXE=../build/install/bin/glslangValidator +REMAPEXE=../build/install/bin/spirv-remap HASERROR=0 mkdir -p localResults @@ -31,11 +32,12 @@ diff -b $BASEDIR/badMacroArgs.frag.out $TARGETDIR/badMacroArgs.frag.out || HASER echo Running reflection... $EXE -l -q -C reflection.vert > $TARGETDIR/reflection.vert.out diff -b $BASEDIR/reflection.vert.out $TARGETDIR/reflection.vert.out || HASERROR=1 -$EXE -D -e flizv -l -q -C -V hlsl.reflection.vert > $TARGETDIR/hlsl.reflection.vert.out +$EXE -D -Od -e flizv -l -q -C -V -Od hlsl.reflection.vert > $TARGETDIR/hlsl.reflection.vert.out diff -b $BASEDIR/hlsl.reflection.vert.out $TARGETDIR/hlsl.reflection.vert.out || HASERROR=1 -$EXE -D -e main -l -q -C -V hlsl.reflection.binding.frag > $TARGETDIR/hlsl.reflection.binding.frag.out +$EXE -D -Od -e main -l -q -C -V -Od hlsl.reflection.binding.frag > $TARGETDIR/hlsl.reflection.binding.frag.out diff -b $BASEDIR/hlsl.reflection.binding.frag.out $TARGETDIR/hlsl.reflection.binding.frag.out || HASERROR=1 - +$EXE -D -Od -e main -l -q --hlsl-iomap --auto-map-bindings --stb 10 --sbb 20 --ssb 30 --suavb 40 --scb 50 -D -V -e main -Od hlsl.automap.frag > $TARGETDIR/hlsl.automap.frag.out +diff -b $BASEDIR/hlsl.automap.frag.out $TARGETDIR/hlsl.automap.frag.out || HASERROR=1 # # multi-threaded test @@ -44,19 +46,24 @@ echo Comparing single thread to multithread for all tests in current directory.. $EXE -i -C *.vert *.geom *.frag *.tes* *.comp > singleThread.out $EXE -i -C *.vert *.geom *.frag *.tes* *.comp -t > multiThread.out diff singleThread.out multiThread.out || HASERROR=1 +if [ $HASERROR -eq 0 ] +then + rm singleThread.out + rm multiThread.out +fi # # entry point renaming tests # echo Running entry-point renaming tests -$EXE -i -H -V -D -e main_in_spv --ku --source-entrypoint main hlsl.entry.rename.frag > $TARGETDIR/hlsl.entry.rename.frag.out +$EXE -i -H -V -D -Od -e main_in_spv --ku --source-entrypoint main -Od hlsl.entry.rename.frag > $TARGETDIR/hlsl.entry.rename.frag.out diff -b $BASEDIR/hlsl.entry.rename.frag.out $TARGETDIR/hlsl.entry.rename.frag.out || HASERROR=1 # # Testing ill-defined uncalled function # echo Running ill-defined uncalled function -$EXE -D -e main -H hlsl.deadFunctionMissingBody.vert > $TARGETDIR/hlsl.deadFunctionMissingBody.vert.out +$EXE -D -Od -e main -H -Od hlsl.deadFunctionMissingBody.vert > $TARGETDIR/hlsl.deadFunctionMissingBody.vert.out diff -b $BASEDIR/hlsl.deadFunctionMissingBody.vert.out $TARGETDIR/hlsl.deadFunctionMissingBody.vert.out || HASERROR=1 if [ $HASERROR -eq 0 ] @@ -81,9 +88,115 @@ $EXE -i --hlsl-offsets -H spv.hlslOffsets.vert > $TARGETDIR/spv.hlslOffsets.vert diff -b $BASEDIR/spv.hlslOffsets.vert.out $TARGETDIR/spv.hlslOffsets.vert.out || HASERROR=1 echo Running hlsl offsets -$EXE -i --hlsl-offsets -D -e main -H hlsl.hlslOffset.vert > $TARGETDIR/hlsl.hlslOffset.vert.out +$EXE -i --hlsl-offsets -D -Od -e main -H -Od hlsl.hlslOffset.vert > $TARGETDIR/hlsl.hlslOffset.vert.out diff -b $BASEDIR/hlsl.hlslOffset.vert.out $TARGETDIR/hlsl.hlslOffset.vert.out || HASERROR=1 +# +# Testing --resource-set-binding +# +echo Configuring HLSL descriptor set and binding number manually +$EXE -V -D -Od -e main -H -Od hlsl.multiDescriptorSet.frag --rsb frag t0 0 0 t1 1 0 s0 0 1 s1 1 1 b0 2 0 b1 2 1 b2 2 2 > $TARGETDIR/hlsl.multiDescriptorSet.frag.out +diff -b $BASEDIR/hlsl.multiDescriptorSet.frag.out $TARGETDIR/hlsl.multiDescriptorSet.frag.out || HASERROR=1 + +$EXE -V -D -Od -e main -H -Od hlsl.explicitDescriptorSet.frag --hlsl-iomap --amb --ssb 10 --stb 20 --rsb 4 > $TARGETDIR/hlsl.explicitDescriptorSet.frag.out +diff -b $BASEDIR/hlsl.explicitDescriptorSet.frag.out $TARGETDIR/hlsl.explicitDescriptorSet.frag.out || HASERROR=1 + +$EXE -V -D -Od -e main -H -Od hlsl.explicitDescriptorSet.frag --hlsl-iomap --amb --ssb 10 --stb 20 --rsb frag 3 > $TARGETDIR/hlsl.explicitDescriptorSet-2.frag.out +diff -b $BASEDIR/hlsl.explicitDescriptorSet-2.frag.out $TARGETDIR/hlsl.explicitDescriptorSet-2.frag.out || HASERROR=1 + +# +# Testing per-descriptor-set IO map shift +# +echo 'Testing per-descriptor-set IO map shift' +$EXE -e main --hlsl-iomap --ssb 10 1 15 2 --stb 20 --stb 25 2 --suavb 30 --suavb 40 2 --sub 50 6 -i -q -D -Od -V hlsl.shift.per-set.frag > $TARGETDIR/hlsl.shift.per-set.frag.out || HASERROR=1 +diff -b $BASEDIR/hlsl.shift.per-set.frag.out $TARGETDIR/hlsl.shift.per-set.frag.out || HASERROR=1 + +# +# Testing location error +# +echo Testing SPV no location +$EXE -V -C spv.noLocation.vert > $TARGETDIR/spv.noLocation.vert.out +diff -b $BASEDIR/spv.noLocation.vert.out $TARGETDIR/spv.noLocation.vert.out || HASERROR=1 +$EXE -G -H --aml spv.noBuiltInLoc.vert > $TARGETDIR/spv.noBuiltInLoc.vert.out +diff -b $BASEDIR/spv.noBuiltInLoc.vert.out $TARGETDIR/spv.noBuiltInLoc.vert.out || HASERROR=1 +$EXE -G spv.looseUniformNoLoc.vert > $TARGETDIR/spv.looseUniformNoLoc.vert.out +diff -b $BASEDIR/spv.looseUniformNoLoc.vert.out $TARGETDIR/spv.looseUniformNoLoc.vert.out || HASERROR=1 + +# +# Testing debug information +# +echo Testing SPV Debug Information +$EXE -g --relaxed-errors --suppress-warnings --aml --hlsl-offsets --nsf \ + -G -H spv.debugInfo.frag --rsb frag 3 > $TARGETDIR/spv.debugInfo.frag.out +diff -b $BASEDIR/spv.debugInfo.frag.out $TARGETDIR/spv.debugInfo.frag.out || HASERROR=1 +$EXE -g -D -Od -e newMain -g --amb --aml --fua --hlsl-iomap --nsf --sib 1 --ssb 2 --sbb 3 --stb 4 --suavb 5 --sub 6 \ + --sep origMain -H -Od spv.hlslDebugInfo.vert --rsb vert t0 0 0 > $TARGETDIR/spv.hlslDebugInfo.frag.out +diff -b $BASEDIR/spv.hlslDebugInfo.frag.out $TARGETDIR/spv.hlslDebugInfo.frag.out || HASERROR=1 + +# +# Testing Includer +# +echo Testing Includer +$EXE -D -Od -e main -H -Od ../Test/hlsl.include.vert > $TARGETDIR/hlsl.include.vert.out +diff -b $BASEDIR/hlsl.include.vert.out $TARGETDIR/hlsl.include.vert.out || HASERROR=1 +$EXE -D -Od -e main -H -Od hlsl.includeNegative.vert > $TARGETDIR/hlsl.includeNegative.vert.out +diff -b $BASEDIR/hlsl.includeNegative.vert.out $TARGETDIR/hlsl.includeNegative.vert.out || HASERROR=1 +$EXE -l -i include.vert > $TARGETDIR/include.vert.out +diff -b $BASEDIR/include.vert.out $TARGETDIR/include.vert.out || HASERROR=1 +$EXE -D -Od -e main -H -Od -Iinc1/path1 -Iinc1/path2 hlsl.dashI.vert > $TARGETDIR/hlsl.dashI.vert.out +diff -b $BASEDIR/hlsl.dashI.vert.out $TARGETDIR/hlsl.dashI.vert.out || HASERROR=1 + +# +# Testing -D and -U +# +echo "Testing -D and -U" +$EXE -DUNDEFED -UIN_SHADER -DFOO=200 -i -l -UUNDEFED -DMUL=FOO*2 glsl.-D-U.frag > $TARGETDIR/glsl.-D-U.frag.out +diff -b $BASEDIR/glsl.-D-U.frag.out $TARGETDIR/glsl.-D-U.frag.out || HASERROR=1 +$EXE -D -Od -e main -V -i -DUNDEFED -UIN_SHADER -DFOO=200 -UUNDEFED -Od hlsl.-D-U.frag > $TARGETDIR/hlsl.-D-U.frag.out +diff -b $BASEDIR/hlsl.-D-U.frag.out $TARGETDIR/hlsl.-D-U.frag.out || HASERROR=1 + +# +# Test --client and --target-env +# +echo "Testing --client and --target-env" +$EXE --client vulkan100 spv.targetVulkan.vert || HASERROR=1 +$EXE --client opengl100 spv.targetOpenGL.vert || HASERROR=1 +$EXE --target-env vulkan1.0 spv.targetVulkan.vert || HASERROR=1 +$EXE --target-env opengl spv.targetOpenGL.vert || HASERROR=1 +$EXE -V100 spv.targetVulkan.vert || HASERROR=1 +$EXE -G100 spv.targetOpenGL.vert || HASERROR=1 + +# +# Testing GLSL entry point rename +# +echo "Testing GLSL entry point rename" +$EXE -H -e foo --source-entrypoint main glsl.entryPointRename.vert > $TARGETDIR/glsl.entryPointRename.vert.out +diff -b $BASEDIR/glsl.entryPointRename.vert.out $TARGETDIR/glsl.entryPointRename.vert.out || HASERROR=1 +$EXE -H -e foo --source-entrypoint bar glsl.entryPointRename.vert > $TARGETDIR/glsl.entryPointRename.vert.bad.out +diff -b $BASEDIR/glsl.entryPointRename.vert.bad.out $TARGETDIR/glsl.entryPointRename.vert.bad.out || HASERROR=1 +$EXE -H -e foo --source-entrypoint main glsl.entryPointRename2.vert > $TARGETDIR/glsl.entryPointRename2.vert.out +diff -b $BASEDIR/glsl.entryPointRename2.vert.out $TARGETDIR/glsl.entryPointRename2.vert.out || HASERROR=1 + +# +# Testing remapper error handling +# +echo "Testing remapper error handling" +$REMAPEXE --do-everything -i remap.invalid-spirv-1.spv -o $TARGETDIR > $TARGETDIR/remap.invalid-spirv-1.out && HASERROR=1 +diff -b $BASEDIR/remap.invalid-spirv-1.out $TARGETDIR/remap.invalid-spirv-1.out || HASERROR=1 +$REMAPEXE --do-everything -i remap.invalid-spirv-2.spv -o $TARGETDIR > $TARGETDIR/remap.invalid-spirv-2.out && HASERROR=1 +diff -b $BASEDIR/remap.invalid-spirv-2.out $TARGETDIR/remap.invalid-spirv-2.out || HASERROR=1 + +# +# Testing position Y inversion +# +echo "Testing position Y inversion" +$EXE -H -e main -V -D -Od -H -i --iy hlsl.y-negate-1.vert > $TARGETDIR/hlsl.y-negate-1.vert.out +diff -b $BASEDIR/hlsl.y-negate-1.vert.out $TARGETDIR/hlsl.y-negate-1.vert.out || HASERROR=1 +$EXE -H -e main -V -D -Od -H -i --invert-y hlsl.y-negate-2.vert > $TARGETDIR/hlsl.y-negate-2.vert.out +diff -b $BASEDIR/hlsl.y-negate-2.vert.out $TARGETDIR/hlsl.y-negate-2.vert.out || HASERROR=1 +$EXE -H -e main -V -D -Od -H -i --invert-y hlsl.y-negate-3.vert > $TARGETDIR/hlsl.y-negate-3.vert.out +diff -b $BASEDIR/hlsl.y-negate-3.vert.out $TARGETDIR/hlsl.y-negate-3.vert.out || HASERROR=1 + # # Final checking # @@ -94,4 +207,6 @@ else echo Tests Failed. fi +rm -f comp.spv frag.spv geom.spv tesc.spv tese.spv vert.spv + exit $HASERROR diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/spv.310.comp b/3rdparty/bgfx/3rdparty/glslang/Test/spv.310.comp index 6cbb043..53117dd 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/spv.310.comp +++ b/3rdparty/bgfx/3rdparty/glslang/Test/spv.310.comp @@ -37,4 +37,6 @@ void main() outnames.va[gl_LocalInvocationID.x] = vec4(s); outnames.s = outbname.uns.length(); gl_DeviceIndex; + memoryBarrierShared(); + groupMemoryBarrier(); } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/spv.450.geom b/3rdparty/bgfx/3rdparty/glslang/Test/spv.450.geom index 8aefe50..3489a88 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/spv.450.geom +++ b/3rdparty/bgfx/3rdparty/glslang/Test/spv.450.geom @@ -9,4 +9,6 @@ layout(invocations = 4) in; void main() { gl_PointSize = gl_in[1].gl_PointSize; + gl_Layer = 2; + gl_ViewportIndex = 3; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/spv.450.tesc b/3rdparty/bgfx/3rdparty/glslang/Test/spv.450.tesc index c3719f9..47b9a40 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/spv.450.tesc +++ b/3rdparty/bgfx/3rdparty/glslang/Test/spv.450.tesc @@ -2,7 +2,7 @@ layout(vertices = 4) out; -patch out vec4 patchOut; +layout(location=1) patch out vec4 patchOut; struct S { float sMem1; // should not see a patch decoration @@ -17,6 +17,7 @@ layout(location = 12) patch out TheBlock { void main() { + gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position; } layout(location = 2) patch out SingleBlock { diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/spv.stereoViewRendering.tesc b/3rdparty/bgfx/3rdparty/glslang/Test/spv.stereoViewRendering.tesc index 62fc956..e8cfe00 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/spv.stereoViewRendering.tesc +++ b/3rdparty/bgfx/3rdparty/glslang/Test/spv.stereoViewRendering.tesc @@ -8,9 +8,10 @@ layout(vertices = 4) out; out gl_PerVertex { int gl_SecondaryViewportMaskNV[2]; vec4 gl_SecondaryPositionNV; - layout (viewport_relative, secondary_view_offset = 1) out highp int gl_Layer; } gl_out[4]; +layout (viewport_relative, secondary_view_offset = 1) out highp int gl_Layer; + void main() { gl_out[gl_InvocationID].gl_SecondaryViewportMaskNV[0] = 1; diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/spv.viewportArray2.tesc b/3rdparty/bgfx/3rdparty/glslang/Test/spv.viewportArray2.tesc index f629b43..7fc208a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/spv.viewportArray2.tesc +++ b/3rdparty/bgfx/3rdparty/glslang/Test/spv.viewportArray2.tesc @@ -5,12 +5,12 @@ layout(vertices = 4) out; out gl_PerVertex { int gl_ViewportMask[2]; - int gl_ViewportIndex; - layout (viewport_relative) out highp int gl_Layer; } gl_out[4]; +layout (viewport_relative) out highp int gl_Layer; + void main() { - gl_out[gl_InvocationID].gl_ViewportMask[0] = 1; - gl_out[gl_InvocationID].gl_ViewportIndex = 2; + gl_out[gl_InvocationID].gl_ViewportMask[0] = 1; + gl_ViewportIndex = 2; } diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/vulkan.frag b/3rdparty/bgfx/3rdparty/glslang/Test/vulkan.frag index 2b686eb..14c0c30 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/vulkan.frag +++ b/3rdparty/bgfx/3rdparty/glslang/Test/vulkan.frag @@ -43,7 +43,7 @@ layout(push_constant) buffer pcb { // ERROR, not on a buffer layout(push_constant) uniform float pcfloat; // ERROR 2X: not on a non-block, and non-opaque outside block layout(push_constant) uniform; // ERROR, needs an object - +layout(std430, push_constant) uniform pcb1 { int a; } pcb1inst; layout(push_constant) uniform pcb2 { int a; }; // Okay now to have no instance name @@ -95,3 +95,11 @@ void callUserTexture() gl_NumSamples; // ERROR, not for Vulkan } + +void noise() +{ + noise1(dv4); + noise2(4.0); + noise3(vec2(3)); + noise4(dv4); +} diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/vulkan.vert b/3rdparty/bgfx/3rdparty/glslang/Test/vulkan.vert index b234c75..e670e95 100644 --- a/3rdparty/bgfx/3rdparty/glslang/Test/vulkan.vert +++ b/3rdparty/bgfx/3rdparty/glslang/Test/vulkan.vert @@ -45,3 +45,19 @@ layout(set = 1, push_constant) uniform badpc { int a; } badpcI; // ERROR, no de #if VULKAN != 100 #error VULKAN should be 100 #endif + +float AofA0[2][arraySize]; // ERROR, only outer dimension +float AofA1[arraySize][arraySize]; // ERROR, only outer dimension +float AofA2[arraySize][2 + arraySize]; // ERROR, only outer dimension +float AofA3[arraySize][2]; + +out ban1 { // ERROR, only outer dimension + float f; +} bai1[2][arraySize]; + +out ban2 { + float f; +} bai2[arraySize][2]; + +layout(binding = 3000) uniform sampler2D s3000; +layout(binding = 3001) uniform b3001 { int a; }; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/glslang/CMakeLists.txt index dac8cb8..7a50ab6 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/CMakeLists.txt @@ -9,6 +9,7 @@ endif(WIN32) set(SOURCES MachineIndependent/glslang.y MachineIndependent/glslang_tab.cpp + MachineIndependent/attribute.cpp MachineIndependent/Constant.cpp MachineIndependent/iomapper.cpp MachineIndependent/InfoSink.cpp @@ -31,9 +32,7 @@ set(SOURCES MachineIndependent/preprocessor/Pp.cpp MachineIndependent/preprocessor/PpAtom.cpp MachineIndependent/preprocessor/PpContext.cpp - MachineIndependent/preprocessor/PpMemory.cpp MachineIndependent/preprocessor/PpScanner.cpp - MachineIndependent/preprocessor/PpSymbols.cpp MachineIndependent/preprocessor/PpTokens.cpp MachineIndependent/propagateNoContraction.cpp GenericCodeGen/CodeGen.cpp @@ -53,6 +52,7 @@ set(HEADERS Include/revision.h Include/ShHandle.h Include/Types.h + MachineIndependent/attribute.h MachineIndependent/glslang_tab.cpp.h MachineIndependent/gl_types.h MachineIndependent/Initialize.h @@ -82,9 +82,10 @@ set(HEADERS add_library(glslang STATIC ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${HEADERS}) set_property(TARGET glslang PROPERTY FOLDER glslang) +set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON) target_link_libraries(glslang OGLCompiler OSDependent) if(ENABLE_HLSL) - target_link_libraries(glslang HLSL) + target_link_libraries(glslang HLSL) endif() if(WIN32) @@ -95,10 +96,14 @@ if(WIN32) source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*") endif(WIN32) -install(TARGETS glslang - ARCHIVE DESTINATION lib) +if(ENABLE_GLSLANG_INSTALL) + install(TARGETS glslang + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif(ENABLE_GLSLANG_INSTALL) -foreach(file ${HEADERS}) - get_filename_component(dir ${file} DIRECTORY) - install(FILES ${file} DESTINATION include/glslang/${dir}) -endforeach() +if(ENABLE_GLSLANG_INSTALL) + foreach(file ${HEADERS}) + get_filename_component(dir ${file} DIRECTORY) + install(FILES ${file} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang/${dir}) + endforeach() +endif(ENABLE_GLSLANG_INSTALL) diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/BaseTypes.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/BaseTypes.h index a805a06..050c2c4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/BaseTypes.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/BaseTypes.h @@ -53,6 +53,10 @@ enum TBasicType { EbtUint, EbtInt64, EbtUint64, +#ifdef AMD_EXTENSIONS + EbtInt16, + EbtUint16, +#endif EbtBool, EbtAtomicUint, EbtSampler, @@ -189,10 +193,12 @@ enum TBuiltInVariable { EbvFragColor, EbvFragData, EbvFragDepth, + EbvFragStencilRef, EbvSampleId, EbvSamplePosition, EbvSampleMask, EbvHelperInvocation, + #ifdef AMD_EXTENSIONS EbvBaryCoordNoPersp, EbvBaryCoordNoPerspCentroid, @@ -212,17 +218,24 @@ enum TBuiltInVariable { EbvSecondaryViewportMaskNV, EbvPositionPerViewNV, EbvViewportMaskPerViewNV, + EbvFragFullyCoveredNV, #endif // HLSL built-ins that live only temporarily, until they get remapped // to one of the above. EbvFragDepthGreater, EbvFragDepthLesser, - EbvStencilRef, EbvGsOutputStream, EbvOutputPatch, EbvInputPatch, + // structbuffer types + EbvAppendConsume, // no need to differentiate append and consume + EbvRWStructuredBuffer, + EbvStructuredBuffer, + EbvByteAddressBuffer, + EbvRWByteAddressBuffer, + EbvLast }; @@ -318,10 +331,12 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvFragColor: return "FragColor"; case EbvFragData: return "FragData"; case EbvFragDepth: return "FragDepth"; + case EbvFragStencilRef: return "FragStencilRef"; case EbvSampleId: return "SampleId"; case EbvSamplePosition: return "SamplePosition"; case EbvSampleMask: return "SampleMaskIn"; case EbvHelperInvocation: return "HelperInvocation"; + #ifdef AMD_EXTENSIONS case EbvBaryCoordNoPersp: return "BaryCoordNoPersp"; case EbvBaryCoordNoPerspCentroid: return "BaryCoordNoPerspCentroid"; @@ -341,6 +356,7 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvSecondaryViewportMaskNV: return "SecondaryViewportMaskNV"; case EbvPositionPerViewNV: return "PositionPerViewNV"; case EbvViewportMaskPerViewNV: return "ViewportMaskPerViewNV"; + case EbvFragFullyCoveredNV: return "FragFullyCoveredNV"; #endif default: return "unknown built-in variable"; } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Common.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Common.h index 17c2bd9..d513ae8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Common.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Common.h @@ -63,7 +63,7 @@ std::string to_string(const T& val) { } #endif -#if defined(_MSC_VER) && _MSC_VER < 1700 +#if defined(_MSC_VER) && _MSC_VER < 1800 inline long long int strtoll (const char* str, char** endptr, int base) { return _strtoi64(str, endptr, base); @@ -78,6 +78,10 @@ inline long long int atoll (const char* str) } #endif +#if defined(_MSC_VER) +#define strdup _strdup +#endif + /* windows only pragma */ #ifdef _MSC_VER #pragma warning(disable : 4786) // Don't warn about too long identifiers @@ -151,7 +155,7 @@ inline TString* NewPoolTString(const char* s) return new(memory) TString(s); } -template inline T* NewPoolObject(T) +template inline T* NewPoolObject(T*) { return new(GetThreadPoolAllocator().allocate(sizeof(T))) T; } @@ -222,6 +226,7 @@ inline const TString String(const int i, const int /*base*/ = 10) struct TSourceLoc { void init() { name = nullptr; string = 0; line = 0; column = 0; } + void init(int stringNum) { init(); string = stringNum; } // Returns the name if it exists. Otherwise, returns the string number. std::string getStringNameOrNum(bool quoteStringName = true) const { @@ -235,7 +240,10 @@ struct TSourceLoc { int column; }; -typedef TMap TPragmaTable; +class TPragmaTable : public TMap { +public: + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) +}; const int MaxTokenLength = 1024; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/ConstantUnion.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/ConstantUnion.h index f66a7ff..58c6094 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/ConstantUnion.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/ConstantUnion.h @@ -37,6 +37,9 @@ #ifndef _CONSTANT_UNION_INCLUDED_ #define _CONSTANT_UNION_INCLUDED_ +#include "../Include/Common.h" +#include "../Include/BaseTypes.h" + namespace glslang { class TConstUnion { @@ -595,9 +598,6 @@ public: if (! unionArray || ! rhs.unionArray) return false; - if (! unionArray || ! rhs.unionArray) - return false; - return *unionArray == *rhs.unionArray; } bool operator!=(const TConstUnionArray& rhs) const { return ! operator==(rhs); } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/InitializeGlobals.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/InitializeGlobals.h index 4cf2dca..95d0a40 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/InitializeGlobals.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/InitializeGlobals.h @@ -37,10 +37,7 @@ namespace glslang { -void InitializeMemoryPools(); -void FreeGlobalPools(); bool InitializePoolIndex(); -void FreePoolIndex(); } // end namespace glslang diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/PoolAlloc.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/PoolAlloc.h index 69bacb1..0e237a6 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/PoolAlloc.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/PoolAlloc.h @@ -250,15 +250,8 @@ private: // different times. But a simple use is to have a global pop // with everyone using the same global allocator. // -typedef TPoolAllocator* PoolAllocatorPointer; extern TPoolAllocator& GetThreadPoolAllocator(); - -struct TThreadMemoryPools -{ - TPoolAllocator* threadPoolAllocator; -}; - -void SetThreadPoolAllocator(TPoolAllocator& poolAllocator); +void SetThreadPoolAllocator(TPoolAllocator* poolAllocator); // // This STL compatible allocator is intended to be used as the allocator diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/ShHandle.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/ShHandle.h index 64ba6d6..df07bd8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/ShHandle.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/ShHandle.h @@ -56,11 +56,14 @@ class TUniformMap; // class TShHandleBase { public: - TShHandleBase() { } - virtual ~TShHandleBase() { } + TShHandleBase() { pool = new glslang::TPoolAllocator; } + virtual ~TShHandleBase() { delete pool; } virtual TCompiler* getAsCompiler() { return 0; } virtual TLinker* getAsLinker() { return 0; } virtual TUniformMap* getAsUniformMap() { return 0; } + virtual glslang::TPoolAllocator* getPool() const { return pool; } +private: + glslang::TPoolAllocator* pool; }; // diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Types.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Types.h index 6f58a52..cc847b5 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Types.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/Types.h @@ -80,7 +80,19 @@ struct TSampler { // misnomer now; includes images, textures without sampler, bool combined : 1; // true means texture is combined with a sampler, false means texture with no sampler bool sampler : 1; // true means a pure sampler, other fields should be clear() bool external : 1; // GL_OES_EGL_image_external - unsigned int vectorSize : 3; // return vector size. TODO: support arbitrary types. + unsigned int vectorSize : 3; // vector return type size. + + // Some languages support structures as sample results. Storing the whole structure in the + // TSampler is too large, so there is an index to a separate table. + static const unsigned structReturnIndexBits = 4; // number of index bits to use. + static const unsigned structReturnSlots = (1<= EpqNone && p <= EpqHigh); + assert(!(isMatrix() && vectorSize != 0)); // prevent vectorSize != 0 on matrices } // for turning a TPublicType into a TType, using a shallow copy explicit TType(const TPublicType& p) : @@ -1308,6 +1339,7 @@ public: virtual TBasicType getBasicType() const { return basicType; } virtual const TSampler& getSampler() const { return sampler; } + virtual TSampler& getSampler() { return sampler; } virtual TQualifier& getQualifier() { return qualifier; } virtual const TQualifier& getQualifier() const { return qualifier; } @@ -1337,53 +1369,31 @@ public: #else virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble; } #endif - + virtual bool isIntegerDomain() const + { + switch (basicType) { + case EbtInt: + case EbtUint: + case EbtInt64: + case EbtUint64: +#ifdef AMD_EXTENSIONS + case EbtInt16: + case EbtUint16: +#endif + case EbtAtomicUint: + return true; + default: + break; + } + return false; + } virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint; } + virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; } // "Image" is a superset of "Subpass" virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); } virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); } - virtual bool isBuiltInInterstageIO(EShLanguage language) const - { - return isPerVertexAndBuiltIn(language) || isLooseAndBuiltIn(language); - } - - // Return true if this is an interstage IO builtin - virtual bool isPerVertexAndBuiltIn(EShLanguage language) const - { - if (language == EShLangFragment) - return false; - - // Any non-fragment stage - switch (getQualifier().builtIn) { - case EbvPosition: - case EbvPointSize: - case EbvClipDistance: - case EbvCullDistance: -#ifdef NV_EXTENSIONS - case EbvLayer: - case EbvViewportMaskNV: - case EbvSecondaryPositionNV: - case EbvSecondaryViewportMaskNV: - case EbvPositionPerViewNV: - case EbvViewportMaskPerViewNV: -#endif - return true; - default: - return false; - } - } - - // Return true if this is a loose builtin - virtual bool isLooseAndBuiltIn(EShLanguage language) const - { - if (getQualifier().builtIn == EbvNone) - return false; - - return !isPerVertexAndBuiltIn(language); - } - // return true if this type contains any subtype which satisfies the given predicate. template bool contains(P predicate) const @@ -1425,10 +1435,10 @@ public: return contains([](const TType* t) { return t->isOpaque(); } ); } - // Recursively checks if the type contains an interstage IO builtin - virtual bool containsBuiltInInterstageIO(EShLanguage language) const + // Recursively checks if the type contains a built-in variable + virtual bool containsBuiltIn() const { - return contains([language](const TType* t) { return t->isBuiltInInterstageIO(language); } ); + return contains([](const TType* t) { return t->isBuiltIn(); } ); } virtual bool containsNonOpaque() const @@ -1445,10 +1455,14 @@ public: case EbtUint: case EbtInt64: case EbtUint64: +#ifdef AMD_EXTENSIONS + case EbtInt16: + case EbtUint16: +#endif case EbtBool: - return true; + return true; default: - return false; + return false; } }; @@ -1457,7 +1471,7 @@ public: virtual bool containsSpecializationSize() const { - return contains([](const TType* t) { return t->isArray() && t->arraySizes->containsNode(); } ); + return contains([](const TType* t) { return t->isArray() && t->arraySizes->isOuterSpecialization(); } ); } // Array editing methods. Array descriptors can be shared across @@ -1528,6 +1542,10 @@ public: case EbtUint: return "uint"; case EbtInt64: return "int64_t"; case EbtUint64: return "uint64_t"; +#ifdef AMD_EXTENSIONS + case EbtInt16: return "int16_t"; + case EbtUint16: return "uint16_t"; +#endif case EbtBool: return "bool"; case EbtAtomicUint: return "atomic_uint"; case EbtSampler: return "sampler/image"; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/arrays.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/arrays.h index b6b5e47..1660a99 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/arrays.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/arrays.h @@ -264,6 +264,29 @@ struct TArraySizes { return false; } + bool clearInnerImplicit() + { + for (int d = 1; d < sizes.size(); ++d) { + if (sizes.getDimSize(d) == (unsigned)UnsizedArraySize) + setDimSize(d, 1); + } + + return false; + } + bool isInnerSpecialization() const + { + for (int d = 1; d < sizes.size(); ++d) { + if (sizes.getDimNode(d) != nullptr) + return true; + } + + return false; + } + bool isOuterSpecialization() + { + return sizes.getDimNode(0) != nullptr; + } + bool isImplicit() const { return getOuterSize() == UnsizedArraySize || isInnerImplicit(); } void addOuterSizes(const TArraySizes& s) { sizes.push_front(s.sizes); } void dereference() { sizes.pop_front(); } @@ -288,18 +311,6 @@ struct TArraySizes { return true; } - // Returns true if any of the dimensions of the array is sized with a node - // instead of a front-end compile-time constant. - bool containsNode() - { - for (int d = 0; d < sizes.size(); ++d) { - if (sizes.getDimNode(d) != nullptr) - return true; - } - - return false; - } - bool operator==(const TArraySizes& rhs) { return sizes == rhs.sizes; } bool operator!=(const TArraySizes& rhs) { return sizes != rhs.sizes; } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/intermediate.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/intermediate.h index 934994d..51ac45c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/intermediate.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/intermediate.h @@ -141,6 +141,42 @@ enum TOperator { EOpConvFloat16ToDouble, EOpConvFloat16ToInt64, EOpConvFloat16ToUint64, + + EOpConvBoolToInt16, + EOpConvIntToInt16, + EOpConvUintToInt16, + EOpConvFloatToInt16, + EOpConvDoubleToInt16, + EOpConvFloat16ToInt16, + EOpConvInt64ToInt16, + EOpConvUint64ToInt16, + EOpConvUint16ToInt16, + EOpConvInt16ToBool, + EOpConvInt16ToInt, + EOpConvInt16ToUint, + EOpConvInt16ToFloat, + EOpConvInt16ToDouble, + EOpConvInt16ToFloat16, + EOpConvInt16ToInt64, + EOpConvInt16ToUint64, + + EOpConvBoolToUint16, + EOpConvIntToUint16, + EOpConvUintToUint16, + EOpConvFloatToUint16, + EOpConvDoubleToUint16, + EOpConvFloat16ToUint16, + EOpConvInt64ToUint16, + EOpConvUint64ToUint16, + EOpConvInt16ToUint16, + EOpConvUint16ToBool, + EOpConvUint16ToInt, + EOpConvUint16ToUint, + EOpConvUint16ToFloat, + EOpConvUint16ToDouble, + EOpConvUint16ToFloat16, + EOpConvUint16ToInt64, + EOpConvUint16ToUint64, #endif // @@ -244,6 +280,12 @@ enum TOperator { EOpDoubleBitsToUint64, EOpInt64BitsToDouble, EOpUint64BitsToDouble, +#ifdef AMD_EXTENSIONS + EOpFloat16BitsToInt16, + EOpFloat16BitsToUint16, + EOpInt16BitsToFloat16, + EOpUint16BitsToFloat16, +#endif EOpPackSnorm2x16, EOpUnpackSnorm2x16, EOpPackUnorm2x16, @@ -263,6 +305,14 @@ enum TOperator { #ifdef AMD_EXTENSIONS EOpPackFloat2x16, EOpUnpackFloat2x16, + EOpPackInt2x16, + EOpUnpackInt2x16, + EOpPackUint2x16, + EOpUnpackUint2x16, + EOpPackInt4x16, + EOpUnpackInt4x16, + EOpPackUint4x16, + EOpUnpackUint4x16, #endif EOpLength, @@ -367,9 +417,18 @@ enum TOperator { EOpAtomicExchange, EOpAtomicCompSwap, - EOpAtomicCounterIncrement, - EOpAtomicCounterDecrement, + EOpAtomicCounterIncrement, // results in pre-increment value + EOpAtomicCounterDecrement, // results in post-decrement value EOpAtomicCounter, + EOpAtomicCounterAdd, + EOpAtomicCounterSubtract, + EOpAtomicCounterMin, + EOpAtomicCounterMax, + EOpAtomicCounterAnd, + EOpAtomicCounterOr, + EOpAtomicCounterXor, + EOpAtomicCounterExchange, + EOpAtomicCounterCompSwap, EOpAny, EOpAll, @@ -394,15 +453,27 @@ enum TOperator { EOpConstructUint, EOpConstructInt64, EOpConstructUint64, +#ifdef AMD_EXTENSIONS + EOpConstructInt16, + EOpConstructUint16, +#endif EOpConstructBool, EOpConstructFloat, EOpConstructDouble, +#ifdef AMD_EXTENSIONS + EOpConstructFloat16, +#endif EOpConstructVec2, EOpConstructVec3, EOpConstructVec4, EOpConstructDVec2, EOpConstructDVec3, EOpConstructDVec4, +#ifdef AMD_EXTENSIONS + EOpConstructF16Vec2, + EOpConstructF16Vec3, + EOpConstructF16Vec4, +#endif EOpConstructBVec2, EOpConstructBVec3, EOpConstructBVec4, @@ -418,6 +489,14 @@ enum TOperator { EOpConstructU64Vec2, EOpConstructU64Vec3, EOpConstructU64Vec4, +#ifdef AMD_EXTENSIONS + EOpConstructI16Vec2, + EOpConstructI16Vec3, + EOpConstructI16Vec4, + EOpConstructU16Vec2, + EOpConstructU16Vec3, + EOpConstructU16Vec4, +#endif EOpConstructMat2x2, EOpConstructMat2x3, EOpConstructMat2x4, @@ -436,11 +515,34 @@ enum TOperator { EOpConstructDMat4x2, EOpConstructDMat4x3, EOpConstructDMat4x4, + EOpConstructIMat2x2, + EOpConstructIMat2x3, + EOpConstructIMat2x4, + EOpConstructIMat3x2, + EOpConstructIMat3x3, + EOpConstructIMat3x4, + EOpConstructIMat4x2, + EOpConstructIMat4x3, + EOpConstructIMat4x4, + EOpConstructUMat2x2, + EOpConstructUMat2x3, + EOpConstructUMat2x4, + EOpConstructUMat3x2, + EOpConstructUMat3x3, + EOpConstructUMat3x4, + EOpConstructUMat4x2, + EOpConstructUMat4x3, + EOpConstructUMat4x4, + EOpConstructBMat2x2, + EOpConstructBMat2x3, + EOpConstructBMat2x4, + EOpConstructBMat3x2, + EOpConstructBMat3x3, + EOpConstructBMat3x4, + EOpConstructBMat4x2, + EOpConstructBMat4x3, + EOpConstructBMat4x4, #ifdef AMD_EXTENSIONS - EOpConstructFloat16, - EOpConstructF16Vec2, - EOpConstructF16Vec3, - EOpConstructF16Vec4, EOpConstructF16Mat2x2, EOpConstructF16Mat2x3, EOpConstructF16Mat2x4, @@ -491,6 +593,10 @@ enum TOperator { EOpImageQuerySamples, EOpImageLoad, EOpImageStore, +#ifdef AMD_EXTENSIONS + EOpImageLoadLod, + EOpImageStoreLod, +#endif EOpImageAtomicAdd, EOpImageAtomicMin, EOpImageAtomicMax, @@ -503,6 +609,9 @@ enum TOperator { EOpSubpassLoad, EOpSubpassLoadMS, EOpSparseImageLoad, +#ifdef AMD_EXTENSIONS + EOpSparseImageLoadLod, +#endif EOpImageGuardEnd, @@ -540,6 +649,13 @@ enum TOperator { EOpTextureOffsetClamp, EOpTextureGradClamp, EOpTextureGradOffsetClamp, +#ifdef AMD_EXTENSIONS + EOpTextureGatherLod, + EOpTextureGatherLodOffset, + EOpTextureGatherLodOffsets, + EOpFragmentMaskFetch, + EOpFragmentFetch, +#endif EOpSparseTextureGuardBegin, @@ -559,6 +675,11 @@ enum TOperator { EOpSparseTextureOffsetClamp, EOpSparseTextureGradClamp, EOpSparseTextureGradOffsetClamp, +#ifdef AMD_EXTENSIONS + EOpSparseTextureGatherLod, + EOpSparseTextureGatherLodOffset, + EOpSparseTextureGatherLodOffsets, +#endif EOpSparseTextureGuardEnd, EOpSamplingGuardEnd, @@ -601,7 +722,8 @@ enum TOperator { EOpInterlockedOr, // ... EOpInterlockedXor, // ... EOpAllMemoryBarrierWithGroupSync, // memory barriers without non-hlsl AST equivalents - EOpGroupMemoryBarrierWithGroupSync, // ... + EOpDeviceMemoryBarrier, // ... + EOpDeviceMemoryBarrierWithGroupSync, // ... EOpWorkgroupMemoryBarrier, // ... EOpWorkgroupMemoryBarrierWithGroupSync, // ... EOpEvaluateAttributeSnapped, // InterpolateAtOffset with int position on 16x16 grid @@ -633,6 +755,10 @@ enum TOperator { EOpMethodStore2, // ... EOpMethodStore3, // ... EOpMethodStore4, // ... + EOpMethodIncrementCounter, // ... + EOpMethodDecrementCounter, // ... + // EOpMethodAppend is defined for geo shaders below + EOpMethodConsume, // SM5 texture methods EOpMethodGatherRed, // These are covered under the above EOpMethodSample comment about @@ -665,6 +791,7 @@ class TIntermBranch; class TIntermTyped; class TIntermMethod; class TIntermSymbol; +class TIntermLoop; } // end namespace glslang @@ -692,6 +819,7 @@ public: virtual glslang::TIntermMethod* getAsMethodNode() { return 0; } virtual glslang::TIntermSymbol* getAsSymbolNode() { return 0; } virtual glslang::TIntermBranch* getAsBranchNode() { return 0; } + virtual glslang::TIntermLoop* getAsLoopNode() { return 0; } virtual const glslang::TIntermTyped* getAsTyped() const { return 0; } virtual const glslang::TIntermOperator* getAsOperator() const { return 0; } @@ -704,6 +832,7 @@ public: virtual const glslang::TIntermMethod* getAsMethodNode() const { return 0; } virtual const glslang::TIntermSymbol* getAsSymbolNode() const { return 0; } virtual const glslang::TIntermBranch* getAsBranchNode() const { return 0; } + virtual const glslang::TIntermLoop* getAsLoopNode() const { return 0; } virtual ~TIntermNode() { } protected: @@ -747,6 +876,8 @@ public: virtual bool isVector() const { return type.isVector(); } virtual bool isScalar() const { return type.isScalar(); } virtual bool isStruct() const { return type.isStruct(); } + virtual bool isFloatingDomain() const { return type.isFloatingDomain(); } + virtual bool isIntegerDomain() const { return type.isIntegerDomain(); } TString getCompleteString() const { return type.getCompleteString(); } protected: @@ -763,17 +894,37 @@ public: body(aBody), test(aTest), terminal(aTerminal), - first(testFirst) { } + first(testFirst), + unroll(false), + dontUnroll(false), + dependency(0) + { } + + virtual TIntermLoop* getAsLoopNode() { return this; } + virtual const TIntermLoop* getAsLoopNode() const { return this; } virtual void traverse(TIntermTraverser*); TIntermNode* getBody() const { return body; } TIntermTyped* getTest() const { return test; } TIntermTyped* getTerminal() const { return terminal; } bool testFirst() const { return first; } + + void setUnroll() { unroll = true; } + void setDontUnroll() { dontUnroll = true; } + bool getUnroll() const { return unroll; } + bool getDontUnroll() const { return dontUnroll; } + + static const unsigned int dependencyInfinite = 0xFFFFFFFF; + void setLoopDependency(int d) { dependency = d; } + int getLoopDependency() const { return dependency; } + protected: TIntermNode* body; // code to loop over TIntermTyped* test; // exit condition associated with loop, could be 0 for 'for' loops TIntermTyped* terminal; // exists for for-loops bool first; // true for while and for, not for do-while + bool unroll; // true if unroll requested + bool dontUnroll; // true if request to not unroll + unsigned int dependency; // loop dependency hint; 0 means not set or unknown }; // @@ -821,7 +972,11 @@ public: // per process threadPoolAllocator, then it causes increased memory usage per compile // it is essential to use "symbol = sym" to assign to symbol TIntermSymbol(int i, const TString& n, const TType& t) - : TIntermTyped(t), id(i), constSubtree(nullptr) + : TIntermTyped(t), id(i), +#ifdef ENABLE_HLSL + flattenSubset(-1), +#endif + constSubtree(nullptr) { name = n; } virtual int getId() const { return id; } virtual const TString& getName() const { return name; } @@ -832,9 +987,20 @@ public: const TConstUnionArray& getConstArray() const { return constArray; } void setConstSubtree(TIntermTyped* subtree) { constSubtree = subtree; } TIntermTyped* getConstSubtree() const { return constSubtree; } +#ifdef ENABLE_HLSL + void setFlattenSubset(int subset) { flattenSubset = subset; } + int getFlattenSubset() const { return flattenSubset; } // -1 means full object +#endif + + // This is meant for cases where a node has already been constructed, and + // later on, it becomes necessary to switch to a different symbol. + virtual void switchId(int newId) { id = newId; } protected: int id; // the unique id of the symbol this node represents +#ifdef ENABLE_HLSL + int flattenSubset; // how deeply the flattened object rooted at id has been dereferenced +#endif TString name; // the name of the symbol this node represents TConstUnionArray constArray; // if the symbol is a front-end compile-time constant, this is its value TIntermTyped* constSubtree; @@ -872,6 +1038,9 @@ struct TCrackedTextureOp { bool grad; bool subpass; bool lodClamp; +#ifdef AMD_EXTENSIONS + bool fragMask; +#endif }; // @@ -919,6 +1088,9 @@ public: cracked.grad = false; cracked.subpass = false; cracked.lodClamp = false; +#ifdef AMD_EXTENSIONS + cracked.fragMask = false; +#endif switch (op) { case EOpImageQuerySize: @@ -1027,6 +1199,38 @@ public: cracked.gather = true; cracked.offsets = true; break; +#ifdef AMD_EXTENSIONS + case EOpTextureGatherLod: + case EOpSparseTextureGatherLod: + cracked.gather = true; + cracked.lod = true; + break; + case EOpTextureGatherLodOffset: + case EOpSparseTextureGatherLodOffset: + cracked.gather = true; + cracked.offset = true; + cracked.lod = true; + break; + case EOpTextureGatherLodOffsets: + case EOpSparseTextureGatherLodOffsets: + cracked.gather = true; + cracked.offsets = true; + cracked.lod = true; + break; + case EOpImageLoadLod: + case EOpImageStoreLod: + case EOpSparseImageLoadLod: + cracked.lod = true; + break; + case EOpFragmentMaskFetch: + cracked.subpass = sampler.dim == EsdSubpass; + cracked.fragMask = true; + break; + case EOpFragmentFetch: + cracked.subpass = sampler.dim == EsdSubpass; + cracked.fragMask = true; + break; +#endif case EOpSubpassLoad: case EOpSubpassLoadMS: cracked.subpass = true; @@ -1086,14 +1290,14 @@ protected: }; typedef TVector TIntermSequence; -typedef TVector TQualifierList; +typedef TVector TQualifierList; // // Nodes that operate on an arbitrary sized set of children. // class TIntermAggregate : public TIntermOperator { public: - TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(0) { } - TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(0) { } + TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(nullptr) { } + TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(nullptr) { } ~TIntermAggregate() { delete pragmaTable; } virtual TIntermAggregate* getAsAggregate() { return this; } virtual const TIntermAggregate* getAsAggregate() const { return this; } @@ -1111,7 +1315,7 @@ public: void setDebug(bool d) { debug = d; } bool getOptimize() const { return optimize; } bool getDebug() const { return debug; } - void addToPragmaTable(const TPragmaTable& pTable); + void setPragmaTable(const TPragmaTable& pTable); const TPragmaTable& getPragmaTable() const { return *pragmaTable; } protected: TIntermAggregate(const TIntermAggregate&); // disallow copy constructor @@ -1131,19 +1335,29 @@ protected: class TIntermSelection : public TIntermTyped { public: TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB) : - TIntermTyped(EbtVoid), condition(cond), trueBlock(trueB), falseBlock(falseB) {} + TIntermTyped(EbtVoid), condition(cond), trueBlock(trueB), falseBlock(falseB), + flatten(false), dontFlatten(false) {} TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB, const TType& type) : - TIntermTyped(type), condition(cond), trueBlock(trueB), falseBlock(falseB) {} + TIntermTyped(type), condition(cond), trueBlock(trueB), falseBlock(falseB), + flatten(false), dontFlatten(false) {} virtual void traverse(TIntermTraverser*); virtual TIntermTyped* getCondition() const { return condition; } virtual TIntermNode* getTrueBlock() const { return trueBlock; } virtual TIntermNode* getFalseBlock() const { return falseBlock; } virtual TIntermSelection* getAsSelectionNode() { return this; } virtual const TIntermSelection* getAsSelectionNode() const { return this; } + + void setFlatten() { flatten = true; } + void setDontFlatten() { dontFlatten = true; } + bool getFlatten() const { return flatten; } + bool getDontFlatten() const { return dontFlatten; } + protected: TIntermTyped* condition; TIntermNode* trueBlock; TIntermNode* falseBlock; + bool flatten; // true if flatten requested + bool dontFlatten; // true if requested to not flatten }; // @@ -1154,15 +1368,24 @@ protected: // class TIntermSwitch : public TIntermNode { public: - TIntermSwitch(TIntermTyped* cond, TIntermAggregate* b) : condition(cond), body(b) { } + TIntermSwitch(TIntermTyped* cond, TIntermAggregate* b) : condition(cond), body(b), + flatten(false), dontFlatten(false) {} virtual void traverse(TIntermTraverser*); virtual TIntermNode* getCondition() const { return condition; } virtual TIntermAggregate* getBody() const { return body; } virtual TIntermSwitch* getAsSwitchNode() { return this; } virtual const TIntermSwitch* getAsSwitchNode() const { return this; } + + void setFlatten() { flatten = true; } + void setDontFlatten() { dontFlatten = true; } + bool getFlatten() const { return flatten; } + bool getDontFlatten() const { return dontFlatten; } + protected: TIntermTyped* condition; TIntermAggregate* body; + bool flatten; // true if flatten requested + bool dontFlatten; // true if requested to not flatten }; enum TVisit diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/revision.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/revision.h index 31b5fee..218f8b6 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Include/revision.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Include/revision.h @@ -2,5 +2,5 @@ // For the version, it uses the latest git tag followed by the number of commits. // For the date, it uses the current date (when then script is run). -#define GLSLANG_REVISION "Overload400-PrecQual.1985" -#define GLSLANG_DATE "07-Apr-2017" +#define GLSLANG_REVISION "Overload400-PrecQual.2000" +#define GLSLANG_DATE "12-Apr-2017" diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Constant.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Constant.cpp index fff8fd2..1b73d96 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Constant.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Constant.cpp @@ -38,6 +38,7 @@ #include #include #include +#include namespace { @@ -193,7 +194,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right case EbtUint: if (rightUnionArray[i] == 0) { - newConstArray[i].setUConst(0xFFFFFFFF); + newConstArray[i].setUConst(0xFFFFFFFFu); } else newConstArray[i].setUConst(leftUnionArray[i].getUConst() / rightUnionArray[i].getUConst()); break; @@ -213,6 +214,23 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right } else newConstArray[i].setU64Const(leftUnionArray[i].getU64Const() / rightUnionArray[i].getU64Const()); break; +#ifdef AMD_EXTENSIONS + case EbtInt16: + if (rightUnionArray[i] == 0) + newConstArray[i].setIConst(0x7FFF); + else if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == (int)0x8000) + newConstArray[i].setIConst(0x8000); + else + newConstArray[i].setIConst(leftUnionArray[i].getIConst() / rightUnionArray[i].getIConst()); + break; + + case EbtUint16: + if (rightUnionArray[i] == 0) { + newConstArray[i].setUConst(0xFFFFu); + } else + newConstArray[i].setUConst(leftUnionArray[i].getUConst() / rightUnionArray[i].getUConst()); + break; +#endif default: return 0; } @@ -246,8 +264,31 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right for (int i = 0; i < newComps; i++) { if (rightUnionArray[i] == 0) newConstArray[i] = leftUnionArray[i]; - else - newConstArray[i] = leftUnionArray[i] % rightUnionArray[i]; + else { + switch (getType().getBasicType()) { + case EbtInt: + if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == INT_MIN) { + newConstArray[i].setIConst(0); + break; + } else goto modulo_default; + + case EbtInt64: + if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) { + newConstArray[i].setI64Const(0); + break; + } else goto modulo_default; +#ifdef AMD_EXTENSIONS + case EbtInt16: + if (rightUnionArray[i].getIConst() == -1 && leftUnionArray[i].getIConst() == SHRT_MIN) { + newConstArray[i].setIConst(0); + break; + } else goto modulo_default; +#endif + default: + modulo_default: + newConstArray[i] = leftUnionArray[i] % rightUnionArray[i]; + } + } } break; @@ -457,10 +498,16 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EbtFloat16: #endif case EbtFloat: newConstArray[i].setDConst(-unionArray[i].getDConst()); break; +#ifdef AMD_EXTENSIONS + case EbtInt16: +#endif case EbtInt: newConstArray[i].setIConst(-unionArray[i].getIConst()); break; +#ifdef AMD_EXTENSIONS + case EbtUint16: +#endif case EbtUint: newConstArray[i].setUConst(static_cast(-static_cast(unionArray[i].getUConst()))); break; case EbtInt64: newConstArray[i].setI64Const(-unionArray[i].getI64Const()); break; - case EbtUint64: newConstArray[i].setU64Const(static_cast(-static_cast(unionArray[i].getU64Const()))); break; + case EbtUint64: newConstArray[i].setU64Const(static_cast(-static_cast(unionArray[i].getU64Const()))); break; default: return 0; } @@ -610,6 +657,14 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpUintBitsToFloat: case EOpDoubleBitsToInt64: case EOpDoubleBitsToUint64: + case EOpInt64BitsToDouble: + case EOpUint64BitsToDouble: +#ifdef AMD_EXTENSIONS + case EOpFloat16BitsToInt16: + case EOpFloat16BitsToUint16: + case EOpInt16BitsToFloat16: + case EOpUint16BitsToFloat16: +#endif default: return 0; @@ -702,6 +757,9 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) #endif children[0]->getAsTyped()->getBasicType() == EbtDouble; bool isSigned = children[0]->getAsTyped()->getBasicType() == EbtInt || +#ifdef AMD_EXTENSIONS + children[0]->getAsTyped()->getBasicType() == EbtInt16 || +#endif children[0]->getAsTyped()->getBasicType() == EbtInt64; bool isInt64 = children[0]->getAsTyped()->getBasicType() == EbtInt64 || children[0]->getAsTyped()->getBasicType() == EbtUint64; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp index 2c46e4f..dd1fc29 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Initialize.cpp @@ -1,7 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2012-2016 LunarG, Inc. -// Copyright (C) 2015-2016 Google, Inc. +// Copyright (C) 2015-2017 Google, Inc. // // All rights reserved. // @@ -85,8 +85,6 @@ TBuiltIns::TBuiltIns() prefixes[EbtFloat] = ""; prefixes[EbtInt] = "i"; prefixes[EbtUint] = "u"; - prefixes[EbtInt64] = "i64"; - prefixes[EbtUint64] = "u64"; postfixes[2] = "2"; postfixes[3] = "3"; postfixes[4] = "4"; @@ -925,6 +923,32 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } +#ifdef NV_EXTENSIONS + if (profile != EEsProfile && version >= 440) { + commonBuiltins.append( + "uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);" + " int64_t atomicMin(coherent volatile inout int64_t, int64_t);" + + "uint64_t atomicMax(coherent volatile inout uint64_t, uint64_t);" + " int64_t atomicMax(coherent volatile inout int64_t, int64_t);" + + "uint64_t atomicAnd(coherent volatile inout uint64_t, uint64_t);" + " int64_t atomicAnd(coherent volatile inout int64_t, int64_t);" + + "uint64_t atomicOr (coherent volatile inout uint64_t, uint64_t);" + " int64_t atomicOr (coherent volatile inout int64_t, int64_t);" + + "uint64_t atomicXor(coherent volatile inout uint64_t, uint64_t);" + " int64_t atomicXor(coherent volatile inout int64_t, int64_t);" + + " int64_t atomicAdd(coherent volatile inout int64_t, int64_t);" + " int64_t atomicExchange(coherent volatile inout int64_t, int64_t);" + " int64_t atomicCompSwap(coherent volatile inout int64_t, int64_t, int64_t);" + + "\n"); + } +#endif + if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 450)) { commonBuiltins.append( @@ -1326,15 +1350,33 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV if (profile == EEsProfile) { if (spvVersion.spv == 0) { + if (version < 300) { + commonBuiltins.append( + "vec4 texture2D(samplerExternalOES, vec2 coord);" // GL_OES_EGL_image_external + "vec4 texture2DProj(samplerExternalOES, vec3);" // GL_OES_EGL_image_external + "vec4 texture2DProj(samplerExternalOES, vec4);" // GL_OES_EGL_image_external + "\n"); + } else { + commonBuiltins.append( + "highp ivec2 textureSize(samplerExternalOES, int lod);" // GL_OES_EGL_image_external_essl3 + "vec4 texture(samplerExternalOES, vec2);" // GL_OES_EGL_image_external_essl3 + "vec4 texture(samplerExternalOES, vec2, float bias);" // GL_OES_EGL_image_external_essl3 + "vec4 textureProj(samplerExternalOES, vec3);" // GL_OES_EGL_image_external_essl3 + "vec4 textureProj(samplerExternalOES, vec3, float bias);" // GL_OES_EGL_image_external_essl3 + "vec4 textureProj(samplerExternalOES, vec4);" // GL_OES_EGL_image_external_essl3 + "vec4 textureProj(samplerExternalOES, vec4, float bias);" // GL_OES_EGL_image_external_essl3 + "vec4 texelFetch(samplerExternalOES, ivec2, int lod);" // GL_OES_EGL_image_external_essl3 + "\n"); + } commonBuiltins.append( - "vec4 texture2D(samplerExternalOES, vec2 coord);" // GL_OES_EGL_image_external, caught by keyword check - "vec4 texture2DProj(samplerExternalOES, vec3);" // GL_OES_EGL_image_external, caught by keyword check - "vec4 texture2DProj(samplerExternalOES, vec4);" // GL_OES_EGL_image_external, caught by keyword check "vec4 texture2DGradEXT(sampler2D, vec2, vec2, vec2);" // GL_EXT_shader_texture_lod "vec4 texture2DProjGradEXT(sampler2D, vec3, vec2, vec2);" // GL_EXT_shader_texture_lod "vec4 texture2DProjGradEXT(sampler2D, vec4, vec2, vec2);" // GL_EXT_shader_texture_lod "vec4 textureCubeGradEXT(samplerCube, vec3, vec3, vec3);" // GL_EXT_shader_texture_lod + "float shadow2DEXT(sampler2DShadow, vec3);" // GL_EXT_shadow_samplers + "float shadow2DProjEXT(sampler2DShadow, vec4);" // GL_EXT_shadow_samplers + "\n"); } } @@ -1342,7 +1384,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV // // Noise functions. // - if (profile != EEsProfile) { + if (spvVersion.spv == 0 && profile != EEsProfile) { commonBuiltins.append( "float noise1(float x);" "float noise1(vec2 x);" @@ -1374,9 +1416,23 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV if ((profile != EEsProfile && version >= 300) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( - "uint atomicCounterIncrement(atomic_uint x);" - "uint atomicCounterDecrement(atomic_uint x);" - "uint atomicCounter(atomic_uint x);" + "uint atomicCounterIncrement(atomic_uint);" + "uint atomicCounterDecrement(atomic_uint);" + "uint atomicCounter(atomic_uint);" + + "\n"); + } + if (profile != EEsProfile && version >= 460) { + commonBuiltins.append( + "uint atomicCounterAdd(atomic_uint, uint);" + "uint atomicCounterSubtract(atomic_uint, uint);" + "uint atomicCounterMin(atomic_uint, uint);" + "uint atomicCounterMax(atomic_uint, uint);" + "uint atomicCounterAnd(atomic_uint, uint);" + "uint atomicCounterOr(atomic_uint, uint);" + "uint atomicCounterXor(atomic_uint, uint);" + "uint atomicCounterExchange(atomic_uint, uint);" + "uint atomicCounterCompSwap(atomic_uint, uint, uint);" "\n"); } @@ -1561,7 +1617,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } - // GL_ARB_shader_group_vote + // GL_ARB_shader_group_vote if (profile != EEsProfile && version >= 430) { commonBuiltins.append( "bool anyInvocationARB(bool);" @@ -1571,6 +1627,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + if (profile != EEsProfile && version >= 460) { + commonBuiltins.append( + "bool anyInvocation(bool);" + "bool allInvocations(bool);" + "bool allInvocationsEqual(bool);" + + "\n"); + } + #ifdef AMD_EXTENSIONS // GL_AMD_shader_ballot if (profile != EEsProfile && version >= 450) { @@ -2259,7 +2324,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV if (profile != EEsProfile && version >= 450) { commonBuiltins.append( "float cubeFaceIndexAMD(vec3);" - "vec2 cubeFaceCoordAMD(vec3);" + "vec2 cubeFaceCoordAMD(vec3);" "uint64_t timeAMD();" "\n"); @@ -2612,6 +2677,180 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + + // GL_AMD_gpu_shader_int16 + if (profile != EEsProfile && version >= 450) { + commonBuiltins.append( + "int16_t abs(int16_t);" + "i16vec2 abs(i16vec2);" + "i16vec3 abs(i16vec3);" + "i16vec4 abs(i16vec4);" + + "int16_t sign(int16_t);" + "i16vec2 sign(i16vec2);" + "i16vec3 sign(i16vec3);" + "i16vec4 sign(i16vec4);" + + "int16_t min(int16_t, int16_t);" + "i16vec2 min(i16vec2, int16_t);" + "i16vec3 min(i16vec3, int16_t);" + "i16vec4 min(i16vec4, int16_t);" + "i16vec2 min(i16vec2, i16vec2);" + "i16vec3 min(i16vec3, i16vec3);" + "i16vec4 min(i16vec4, i16vec4);" + "uint16_t min(uint16_t, uint16_t);" + "u16vec2 min(u16vec2, uint16_t);" + "u16vec3 min(u16vec3, uint16_t);" + "u16vec4 min(u16vec4, uint16_t);" + "u16vec2 min(u16vec2, u16vec2);" + "u16vec3 min(u16vec3, u16vec3);" + "u16vec4 min(u16vec4, u16vec4);" + + "int16_t max(int16_t, int16_t);" + "i16vec2 max(i16vec2, int16_t);" + "i16vec3 max(i16vec3, int16_t);" + "i16vec4 max(i16vec4, int16_t);" + "i16vec2 max(i16vec2, i16vec2);" + "i16vec3 max(i16vec3, i16vec3);" + "i16vec4 max(i16vec4, i16vec4);" + "uint16_t max(uint16_t, uint16_t);" + "u16vec2 max(u16vec2, uint16_t);" + "u16vec3 max(u16vec3, uint16_t);" + "u16vec4 max(u16vec4, uint16_t);" + "u16vec2 max(u16vec2, u16vec2);" + "u16vec3 max(u16vec3, u16vec3);" + "u16vec4 max(u16vec4, u16vec4);" + + "int16_t clamp(int16_t, int16_t, int16_t);" + "i16vec2 clamp(i16vec2, int16_t, int16_t);" + "i16vec3 clamp(i16vec3, int16_t, int16_t);" + "i16vec4 clamp(i16vec4, int16_t, int16_t);" + "i16vec2 clamp(i16vec2, i16vec2, i16vec2);" + "i16vec3 clamp(i16vec3, i16vec3, i16vec3);" + "i16vec4 clamp(i16vec4, i16vec4, i16vec4);" + "uint16_t clamp(uint16_t, uint16_t, uint16_t);" + "u16vec2 clamp(u16vec2, uint16_t, uint16_t);" + "u16vec3 clamp(u16vec3, uint16_t, uint16_t);" + "u16vec4 clamp(u16vec4, uint16_t, uint16_t);" + "u16vec2 clamp(u16vec2, u16vec2, u16vec2);" + "u16vec3 clamp(u16vec3, u16vec3, u16vec3);" + "u16vec4 clamp(u16vec4, u16vec4, u16vec4);" + + "int16_t mix(int16_t, int16_t, bool);" + "i16vec2 mix(i16vec2, i16vec2, bvec2);" + "i16vec3 mix(i16vec3, i16vec3, bvec3);" + "i16vec4 mix(i16vec4, i16vec4, bvec4);" + "uint16_t mix(uint16_t, uint16_t, bool);" + "u16vec2 mix(u16vec2, u16vec2, bvec2);" + "u16vec3 mix(u16vec3, u16vec3, bvec3);" + "u16vec4 mix(u16vec4, u16vec4, bvec4);" + + "float16_t frexp(float16_t, out int16_t);" + "f16vec2 frexp(f16vec2, out i16vec2);" + "f16vec3 frexp(f16vec3, out i16vec3);" + "f16vec4 frexp(f16vec4, out i16vec4);" + + "float16_t ldexp(float16_t, int16_t);" + "f16vec2 ldexp(f16vec2, i16vec2);" + "f16vec3 ldexp(f16vec3, i16vec3);" + "f16vec4 ldexp(f16vec4, i16vec4);" + + "int16_t float16BitsToInt16(float16_t);" + "i16vec2 float16BitsToInt16(f16vec2);" + "i16vec3 float16BitsToInt16(f16vec3);" + "i16vec4 float16BitsToInt16(f16vec4);" + + "uint16_t float16BitsToUint16(float16_t);" + "u16vec2 float16BitsToUint16(f16vec2);" + "u16vec3 float16BitsToUint16(f16vec3);" + "u16vec4 float16BitsToUint16(f16vec4);" + + "float16_t int16BitsToFloat16(int16_t);" + "f16vec2 int16BitsToFloat16(i16vec2);" + "f16vec3 int16BitsToFloat16(i16vec3);" + "f16vec4 int16BitsToFloat16(i16vec4);" + + "float16_t uint16BitsToFloat16(uint16_t);" + "f16vec2 uint16BitsToFloat16(u16vec2);" + "f16vec3 uint16BitsToFloat16(u16vec3);" + "f16vec4 uint16BitsToFloat16(u16vec4);" + + "int packInt2x16(i16vec2);" + "uint packUint2x16(u16vec2);" + "int64_t packInt4x16(i16vec4);" + "uint64_t packUint4x16(u16vec4);" + "i16vec2 unpackInt2x16(int);" + "u16vec2 unpackUint2x16(uint);" + "i16vec4 unpackInt4x16(int64_t);" + "u16vec4 unpackUint4x16(uint64_t);" + + "bvec2 lessThan(i16vec2, i16vec2);" + "bvec3 lessThan(i16vec3, i16vec3);" + "bvec4 lessThan(i16vec4, i16vec4);" + "bvec2 lessThan(u16vec2, u16vec2);" + "bvec3 lessThan(u16vec3, u16vec3);" + "bvec4 lessThan(u16vec4, u16vec4);" + + "bvec2 lessThanEqual(i16vec2, i16vec2);" + "bvec3 lessThanEqual(i16vec3, i16vec3);" + "bvec4 lessThanEqual(i16vec4, i16vec4);" + "bvec2 lessThanEqual(u16vec2, u16vec2);" + "bvec3 lessThanEqual(u16vec3, u16vec3);" + "bvec4 lessThanEqual(u16vec4, u16vec4);" + + "bvec2 greaterThan(i16vec2, i16vec2);" + "bvec3 greaterThan(i16vec3, i16vec3);" + "bvec4 greaterThan(i16vec4, i16vec4);" + "bvec2 greaterThan(u16vec2, u16vec2);" + "bvec3 greaterThan(u16vec3, u16vec3);" + "bvec4 greaterThan(u16vec4, u16vec4);" + + "bvec2 greaterThanEqual(i16vec2, i16vec2);" + "bvec3 greaterThanEqual(i16vec3, i16vec3);" + "bvec4 greaterThanEqual(i16vec4, i16vec4);" + "bvec2 greaterThanEqual(u16vec2, u16vec2);" + "bvec3 greaterThanEqual(u16vec3, u16vec3);" + "bvec4 greaterThanEqual(u16vec4, u16vec4);" + + "bvec2 equal(i16vec2, i16vec2);" + "bvec3 equal(i16vec3, i16vec3);" + "bvec4 equal(i16vec4, i16vec4);" + "bvec2 equal(u16vec2, u16vec2);" + "bvec3 equal(u16vec3, u16vec3);" + "bvec4 equal(u16vec4, u16vec4);" + + "bvec2 notEqual(i16vec2, i16vec2);" + "bvec3 notEqual(i16vec3, i16vec3);" + "bvec4 notEqual(i16vec4, i16vec4);" + "bvec2 notEqual(u16vec2, u16vec2);" + "bvec3 notEqual(u16vec3, u16vec3);" + "bvec4 notEqual(u16vec4, u16vec4);" + + "\n"); + } + + // GL_AMD_shader_fragment_mask + if (profile != EEsProfile && version >= 450) { + commonBuiltins.append( + "uint fragmentMaskFetchAMD(sampler2DMS, ivec2);" + "uint fragmentMaskFetchAMD(isampler2DMS, ivec2);" + "uint fragmentMaskFetchAMD(usampler2DMS, ivec2);" + + "uint fragmentMaskFetchAMD(sampler2DMSArray, ivec3);" + "uint fragmentMaskFetchAMD(isampler2DMSArray, ivec3);" + "uint fragmentMaskFetchAMD(usampler2DMSArray, ivec3);" + + "vec4 fragmentFetchAMD(sampler2DMS, ivec2, uint);" + "ivec4 fragmentFetchAMD(isampler2DMS, ivec2, uint);" + "uvec4 fragmentFetchAMD(usampler2DMS, ivec2, uint);" + + "vec4 fragmentFetchAMD(sampler2DMSArray, ivec3, uint);" + "ivec4 fragmentFetchAMD(isampler2DMSArray, ivec3, uint);" + "uvec4 fragmentFetchAMD(usampler2DMSArray, ivec3, uint);" + + "\n"); + } + #endif //============================================================================ @@ -2951,6 +3190,20 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + + // GL_AMD_shader_fragment_mask + if (profile != EEsProfile && version >= 450 && spvVersion.vulkan >= 100) { + stageBuiltins[EShLangFragment].append( + "uint fragmentMaskFetchAMD(subpassInputMS);" + "uint fragmentMaskFetchAMD(isubpassInputMS);" + "uint fragmentMaskFetchAMD(usubpassInputMS);" + + "vec4 fragmentFetchAMD(subpassInputMS, uint);" + "ivec4 fragmentFetchAMD(isubpassInputMS, uint);" + "uvec4 fragmentFetchAMD(usubpassInputMS, uint);" + + "\n"); + } #endif //============================================================================ @@ -3250,12 +3503,23 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in int gl_DrawIDARB;" ); } + if (version >= 410) { + stageBuiltins[EShLangVertex].append( + "out int gl_ViewportIndex;" + "out int gl_Layer;" + ); + } + if (version >= 460) { + stageBuiltins[EShLangVertex].append( + "in int gl_BaseVertex;" + "in int gl_BaseInstance;" + "in int gl_DrawID;" + ); + } #ifdef NV_EXTENSIONS if (version >= 450) stageBuiltins[EShLangVertex].append( - "out int gl_ViewportIndex;" - "out int gl_Layer;" "out int gl_ViewportMask[];" // GL_NV_viewport_array2 "out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering "out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering @@ -3305,6 +3569,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + if (version >= 300 /* both ES and non-ES */) { + stageBuiltins[EShLangVertex].append( + "in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2 + "\n"); + } + //============================================================================ // @@ -3366,6 +3636,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "out int gl_PrimitiveID;" "out int gl_Layer;"); + if (version >= 150) + stageBuiltins[EShLangGeometry].append( + "out int gl_ViewportIndex;" + ); + if (profile == ECompatibilityProfile && version < 400) stageBuiltins[EShLangGeometry].append( "out vec4 gl_ClipVertex;" @@ -3375,11 +3650,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV stageBuiltins[EShLangGeometry].append( "in int gl_InvocationID;" ); - // GL_ARB_viewport_array - if (version >= 150) - stageBuiltins[EShLangGeometry].append( - "out int gl_ViewportIndex;" - ); #ifdef NV_EXTENSIONS if (version >= 450) @@ -3456,8 +3726,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV stageBuiltins[EShLangTessControl].append( "float gl_CullDistance[];" #ifdef NV_EXTENSIONS - "int gl_ViewportIndex;" - "int gl_Layer;" "int gl_ViewportMask[];" // GL_NV_viewport_array2 "vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering @@ -3471,6 +3739,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "patch out float gl_TessLevelOuter[4];" "patch out float gl_TessLevelInner[2];" "\n"); + + if (version >= 410) + stageBuiltins[EShLangTessControl].append( + "out int gl_ViewportIndex;" + "out int gl_Layer;" + "\n"); + } else { // Note: "in gl_PerVertex {...} gl_in[gl_MaxPatchVertices];" is declared in initialize() below, // as it depends on the resource sizing of gl_MaxPatchVertices. @@ -3542,11 +3817,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "};" "\n"); + if (version >= 410) + stageBuiltins[EShLangTessEvaluation].append( + "out int gl_ViewportIndex;" + "out int gl_Layer;" + "\n"); + #ifdef NV_EXTENSIONS if (version >= 450) stageBuiltins[EShLangTessEvaluation].append( - "out int gl_ViewportIndex;" - "out int gl_Layer;" "out int gl_ViewportMask[];" // GL_NV_viewport_array2 "out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering "out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering @@ -3601,6 +3880,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV stageBuiltins[EShLangFragment].append( "vec2 gl_PointCoord;" // needs qualifier fixed later ); + if (version >= 140) + stageBuiltins[EShLangFragment].append( + "out int gl_FragStencilRefARB;" + ); if (IncludeLegacy(version, profile, spvVersion) || (! ForwardCompatibility && version < 420)) stageBuiltins[EShLangFragment].append( "vec4 gl_FragColor;" // needs qualifier fixed later @@ -3680,6 +3963,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in vec3 gl_BaryCoordPullModelAMD;" ); #endif + +#ifdef NV_EXTENSIONS + if (version >= 430) + stageBuiltins[EShLangFragment].append( + "in bool gl_FragFullyCoveredNV;" + ); +#endif } else { // ES profile @@ -3749,6 +4039,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + if (version >= 300 /* both ES and non-ES */) { + stageBuiltins[EShLangFragment].append( + "flat in highp uint gl_ViewID_OVR;" // GL_OVR_multiview, GL_OVR_multiview2 + "\n"); + } + // printf("%s\n", commonBuiltins.c_str()); // printf("%s\n", stageBuiltins[EShLangFragment].c_str()); } @@ -3844,6 +4140,17 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c else { addSamplingFunctions(sampler, typeName, version, profile); addGatherFunctions(sampler, typeName, version, profile); + + if (spvVersion.vulkan > 0 && sampler.dim == EsdBuffer && sampler.isCombined()) { + // Vulkan wants a textureBuffer to allow texelFetch() -- + // a sampled image with no sampler. + // So, add sampling functions for both the + // samplerBuffer and textureBuffer types. + sampler.setTexture(sampler.type, sampler.dim, sampler.arrayed, sampler.shadow, + sampler.ms); + TString textureTypeName = sampler.getString(); + addSamplingFunctions(sampler, textureTypeName, version, profile); + } } } } @@ -3867,7 +4174,7 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c // // Add all the query functions for the given type. // -void TBuiltIns::addQueryFunctions(TSampler sampler, TString& typeName, int version, EProfile profile) +void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { if (sampler.image && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 430))) return; @@ -3944,7 +4251,7 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, TString& typeName, int versi // // Add all the image access functions for the given type. // -void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int version, EProfile profile) +void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { int dims = dimMap[sampler.dim]; // most things with an array add a dimension, except for cubemaps @@ -4029,6 +4336,43 @@ void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int versi } } } + +#ifdef AMD_EXTENSIONS + if (sampler.dim == EsdRect || sampler.dim == EsdBuffer || sampler.shadow || sampler.ms) + return; + + if (profile == EEsProfile || version < 450) + return; + + TString imageLodParams = typeName; + if (dims == 1) + imageLodParams.append(", int"); + else { + imageLodParams.append(", ivec"); + imageLodParams.append(postfixes[dims]); + } + imageLodParams.append(", int"); + + commonBuiltins.append(prefixes[sampler.type]); + commonBuiltins.append("vec4 imageLoadLodAMD(readonly volatile coherent "); + commonBuiltins.append(imageLodParams); + commonBuiltins.append(");\n"); + + commonBuiltins.append("void imageStoreLodAMD(writeonly volatile coherent "); + commonBuiltins.append(imageLodParams); + commonBuiltins.append(", "); + commonBuiltins.append(prefixes[sampler.type]); + commonBuiltins.append("vec4);\n"); + + if (sampler.dim != Esd1D) { + commonBuiltins.append("int sparseImageLoadLodAMD(readonly volatile coherent "); + commonBuiltins.append(imageLodParams); + commonBuiltins.append(", out "); + commonBuiltins.append(prefixes[sampler.type]); + commonBuiltins.append("vec4"); + commonBuiltins.append(");\n"); + } +#endif } // @@ -4037,7 +4381,7 @@ void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int versi // // Add all the subpass access functions for the given type. // -void TBuiltIns::addSubpassSampling(TSampler sampler, TString& typeName, int /*version*/, EProfile /*profile*/) +void TBuiltIns::addSubpassSampling(TSampler sampler, const TString& typeName, int /*version*/, EProfile /*profile*/) { stageBuiltins[EShLangFragment].append(prefixes[sampler.type]); stageBuiltins[EShLangFragment].append("vec4 subpassLoad"); @@ -4054,7 +4398,7 @@ void TBuiltIns::addSubpassSampling(TSampler sampler, TString& typeName, int /*ve // // Add all the texture lookup functions for the given type. // -void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int version, EProfile profile) +void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { // // texturing @@ -4284,7 +4628,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int ve // // Add all the texture gather functions for the given type. // -void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int version, EProfile profile) +void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { switch (sampler.dim) { case Esd2D: @@ -4339,6 +4683,7 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int vers default: break; } + if (sparse) s.append("ARB"); s.append("("); @@ -4378,6 +4723,116 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int vers } } } + +#ifdef AMD_EXTENSIONS + if (sampler.dim == EsdRect || sampler.shadow) + return; + + if (profile == EEsProfile || version < 450) + return; + + for (int bias = 0; bias < 2; ++bias) { // loop over presence of bias argument + + for (int lod = 0; lod < 2; ++lod) { // loop over presence of lod argument + + if ((lod && bias) || (lod == 0 && bias == 0)) + continue; + + for (int offset = 0; offset < 3; ++offset) { // loop over three forms of offset in the call name: none, Offset, and Offsets + + for (int comp = 0; comp < 2; ++comp) { // loop over presence of comp argument + + if (comp == 0 && bias) + continue; + + if (offset > 0 && sampler.dim == EsdCube) + continue; + + for (int sparse = 0; sparse <= 1; ++sparse) { // loop over "bool" sparse or not + if (sparse && (profile == EEsProfile || version < 450)) + continue; + + TString s; + + // return type + if (sparse) + s.append("int "); + else { + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } + + // name + if (sparse) + s.append("sparseTextureGather"); + else + s.append("textureGather"); + + if (lod) + s.append("Lod"); + + switch (offset) { + case 1: + s.append("Offset"); + break; + case 2: + s.append("Offsets"); + default: + break; + } + + if (lod) + s.append("AMD"); + else if (sparse) + s.append("ARB"); + + s.append("("); + + // sampler type argument + s.append(typeName); + + // P coordinate argument + s.append(",vec"); + int totalDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0); + s.append(postfixes[totalDims]); + + // lod argument + if (lod) + s.append(",float"); + + // offset argument + if (offset > 0) { + s.append(",ivec2"); + if (offset == 2) + s.append("[4]"); + } + + // texel out (for sparse texture) + if (sparse) { + s.append(",out "); + s.append(prefixes[sampler.type]); + s.append("vec4 "); + } + + // comp argument + if (comp) + s.append(",int"); + + // bias argument + if (bias) + s.append(",float"); + + s.append(");\n"); + if (bias) + stageBuiltins[EShLangFragment].append(s); + else + commonBuiltins.append(s); + } + } + } + } + } +#endif } // @@ -4926,16 +5381,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion switch(language) { case EShLangVertex: if (profile != EEsProfile) { - symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters); - symbolTable.setVariableExtensions("gl_BaseInstanceARB", 1, &E_GL_ARB_shader_draw_parameters); - symbolTable.setVariableExtensions("gl_DrawIDARB", 1, &E_GL_ARB_shader_draw_parameters); - - BuiltInVariable("gl_BaseVertexARB", EbvBaseVertex, symbolTable); - BuiltInVariable("gl_BaseInstanceARB", EbvBaseInstance, symbolTable); - BuiltInVariable("gl_DrawIDARB", EbvDrawId, symbolTable); - } - - if (profile != EEsProfile) { + if (version >= 440) { + symbolTable.setVariableExtensions("gl_BaseVertexARB", 1, &E_GL_ARB_shader_draw_parameters); + symbolTable.setVariableExtensions("gl_BaseInstanceARB", 1, &E_GL_ARB_shader_draw_parameters); + symbolTable.setVariableExtensions("gl_DrawIDARB", 1, &E_GL_ARB_shader_draw_parameters); + BuiltInVariable("gl_BaseVertexARB", EbvBaseVertex, symbolTable); + BuiltInVariable("gl_BaseInstanceARB", EbvBaseInstance, symbolTable); + BuiltInVariable("gl_DrawIDARB", EbvDrawId, symbolTable); + } + if (version >= 460) { + BuiltInVariable("gl_BaseVertex", EbvBaseVertex, symbolTable); + BuiltInVariable("gl_BaseInstance", EbvBaseInstance, symbolTable); + BuiltInVariable("gl_DrawID", EbvDrawId, symbolTable); + } symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupInvocationARB", 1, &E_GL_ARB_shader_ballot); symbolTable.setVariableExtensions("gl_SubGroupEqMaskARB", 1, &E_GL_ARB_shader_ballot); @@ -4959,9 +5417,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); - symbolTable.setFunctionExtensions("anyInvocationARB", 1, &E_GL_ARB_shader_group_vote); - symbolTable.setFunctionExtensions("allInvocationsARB", 1, &E_GL_ARB_shader_group_vote); - symbolTable.setFunctionExtensions("allInvocationsEqualARB", 1, &E_GL_ARB_shader_group_vote); + if (version >= 430) { + symbolTable.setFunctionExtensions("anyInvocationARB", 1, &E_GL_ARB_shader_group_vote); + symbolTable.setFunctionExtensions("allInvocationsARB", 1, &E_GL_ARB_shader_group_vote); + symbolTable.setFunctionExtensions("allInvocationsEqualARB", 1, &E_GL_ARB_shader_group_vote); + } } #ifdef AMD_EXTENSIONS @@ -5002,6 +5462,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("cubeFaceCoordAMD", 1, &E_GL_AMD_gcn_shader); symbolTable.setFunctionExtensions("timeAMD", 1, &E_GL_AMD_gcn_shader); } + + if (profile != EEsProfile) { + symbolTable.setFunctionExtensions("fragmentMaskFetchAMD", 1, &E_GL_AMD_shader_fragment_mask); + symbolTable.setFunctionExtensions("fragmentFetchAMD", 1, &E_GL_AMD_shader_fragment_mask); + } #endif // Compatibility variables, vertex only @@ -5026,13 +5491,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("texture2DGradEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("textureCubeGradEXT", 1, &E_GL_EXT_shader_texture_lod); - symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5); + if (version == 310) + symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5); } - if (version >= 310) + if (version == 310) symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5); } - if (profile == EEsProfile) { + if (profile == EEsProfile && version < 320) { symbolTable.setFunctionExtensions("imageAtomicAdd", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicMin", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicMax", 1, &E_GL_OES_shader_image_atomic); @@ -5053,12 +5519,24 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_InstanceIndex", EbvInstanceIndex, symbolTable); } + if (version >= 300 /* both ES and non-ES */) { + symbolTable.setVariableExtensions("gl_ViewID_OVR", Num_OVR_multiview_EXTs, OVR_multiview_EXTs); + BuiltInVariable("gl_ViewID_OVR", EbvViewIndex, symbolTable); + } + + if (profile == EEsProfile) { + symbolTable.setFunctionExtensions("shadow2DEXT", 1, &E_GL_EXT_shadow_samplers); + symbolTable.setFunctionExtensions("shadow2DProjEXT", 1, &E_GL_EXT_shadow_samplers); + } + // Fall through case EShLangTessControl: if (profile == EEsProfile && version >= 310) { - symbolTable.setVariableExtensions("gl_BoundingBoxOES", Num_AEP_primitive_bounding_box, AEP_primitive_bounding_box); BuiltInVariable("gl_BoundingBoxOES", EbvBoundingBox, symbolTable); + if (version < 320) + symbolTable.setVariableExtensions("gl_BoundingBoxOES", Num_AEP_primitive_bounding_box, + AEP_primitive_bounding_box); } // Fall through @@ -5092,6 +5570,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_Layer", Num_viewportEXTs, viewportEXTs); symbolTable.setVariableExtensions("gl_ViewportIndex", Num_viewportEXTs, viewportEXTs); } +#else + if (language != EShLangGeometry && version >= 410) { + symbolTable.setVariableExtensions("gl_Layer", 1, &E_GL_ARB_shader_viewport_layer_array); + symbolTable.setVariableExtensions("gl_ViewportIndex", 1, &E_GL_ARB_shader_viewport_layer_array); + } +#endif + +#ifdef NV_EXTENSIONS symbolTable.setVariableExtensions("gl_ViewportMask", 1, &E_GL_NV_viewport_array2); symbolTable.setVariableExtensions("gl_SecondaryPositionNV", 1, &E_GL_NV_stereo_view_rendering); symbolTable.setVariableExtensions("gl_SecondaryViewportMaskNV", 1, &E_GL_NV_stereo_view_rendering); @@ -5108,8 +5594,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_in", "gl_SecondaryPositionNV", EbvSecondaryPositionNV, symbolTable); BuiltInVariable("gl_in", "gl_PositionPerViewNV", EbvPositionPerViewNV, symbolTable); } - BuiltInVariable("gl_out", "gl_Layer", EbvLayer, symbolTable); - BuiltInVariable("gl_out", "gl_ViewportIndex", EbvViewportIndex, symbolTable); BuiltInVariable("gl_out", "gl_ViewportMask", EbvViewportMaskNV, symbolTable); BuiltInVariable("gl_out", "gl_SecondaryPositionNV", EbvSecondaryPositionNV, symbolTable); BuiltInVariable("gl_out", "gl_SecondaryViewportMaskNV", EbvSecondaryViewportMaskNV, symbolTable); @@ -5177,7 +5661,15 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion SpecialQualifier("gl_FrontFacing", EvqFace, EbvFace, symbolTable); SpecialQualifier("gl_FragCoord", EvqFragCoord, EbvFragCoord, symbolTable); SpecialQualifier("gl_PointCoord", EvqPointCoord, EbvPointCoord, symbolTable); - SpecialQualifier("gl_FragColor", EvqFragColor, EbvFragColor, symbolTable); + if (spvVersion.spv == 0) + SpecialQualifier("gl_FragColor", EvqFragColor, EbvFragColor, symbolTable); + else { + TSymbol* symbol = symbolTable.find("gl_FragColor"); + if (symbol) { + symbol->getWritableType().getQualifier().storage = EvqVaryingOut; + symbol->getWritableType().getQualifier().layoutLocation = 0; + } + } SpecialQualifier("gl_FragDepth", EvqFragDepth, EbvFragDepth, symbolTable); SpecialQualifier("gl_FragDepthEXT", EvqFragDepth, EbvFragDepth, symbolTable); SpecialQualifier("gl_HelperInvocation", EvqVaryingIn, EbvHelperInvocation, symbolTable); @@ -5186,13 +5678,18 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_CullDistance", EbvCullDistance, symbolTable); BuiltInVariable("gl_PrimitiveID", EbvPrimitiveId, symbolTable); + if (profile != EEsProfile && version >= 140) { + symbolTable.setVariableExtensions("gl_FragStencilRefARB", 1, &E_GL_ARB_shader_stencil_export); + BuiltInVariable("gl_FragStencilRefARB", EbvFragStencilRef, symbolTable); + } + if ((profile != EEsProfile && version >= 400) || (profile == EEsProfile && version >= 310)) { BuiltInVariable("gl_SampleID", EbvSampleId, symbolTable); BuiltInVariable("gl_SamplePosition", EbvSamplePosition, symbolTable); BuiltInVariable("gl_SampleMaskIn", EbvSampleMask, symbolTable); BuiltInVariable("gl_SampleMask", EbvSampleMask, symbolTable); - if (profile == EEsProfile) { + if (profile == EEsProfile && version < 320) { symbolTable.setVariableExtensions("gl_SampleID", 1, &E_GL_OES_sample_variables); symbolTable.setVariableExtensions("gl_SamplePosition", 1, &E_GL_OES_sample_variables); symbolTable.setVariableExtensions("gl_SampleMaskIn", 1, &E_GL_OES_sample_variables); @@ -5226,14 +5723,15 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("texture2DGradEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("texture2DProjGradEXT", 1, &E_GL_EXT_shader_texture_lod); symbolTable.setFunctionExtensions("textureCubeGradEXT", 1, &E_GL_EXT_shader_texture_lod); - symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5); + if (version < 320) + symbolTable.setFunctionExtensions("textureGatherOffsets", Num_AEP_gpu_shader5, AEP_gpu_shader5); } if (version == 100) { symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_OES_standard_derivatives); symbolTable.setFunctionExtensions("dFdy", 1, &E_GL_OES_standard_derivatives); symbolTable.setFunctionExtensions("fwidth", 1, &E_GL_OES_standard_derivatives); } - if (version >= 310) { + if (version == 310) { symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5); symbolTable.setFunctionExtensions("interpolateAtCentroid", 1, &E_GL_OES_shader_multisample_interpolation); symbolTable.setFunctionExtensions("interpolateAtSample", 1, &E_GL_OES_shader_multisample_interpolation); @@ -5348,16 +5846,40 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_BaryCoordSmoothSampleAMD", EbvBaryCoordSmoothSample, symbolTable); BuiltInVariable("gl_BaryCoordPullModelAMD", EbvBaryCoordPullModel, symbolTable); } + + // E_GL_AMD_texture_gather_bias_lod + if (profile != EEsProfile) { + symbolTable.setFunctionExtensions("textureGatherLodAMD", 1, &E_GL_AMD_texture_gather_bias_lod); + symbolTable.setFunctionExtensions("textureGatherLodOffsetAMD", 1, &E_GL_AMD_texture_gather_bias_lod); + symbolTable.setFunctionExtensions("textureGatherLodOffsetsAMD", 1, &E_GL_AMD_texture_gather_bias_lod); + symbolTable.setFunctionExtensions("sparseTextureGatherLodAMD", 1, &E_GL_AMD_texture_gather_bias_lod); + symbolTable.setFunctionExtensions("sparseTextureGatherLodOffsetAMD", 1, &E_GL_AMD_texture_gather_bias_lod); + symbolTable.setFunctionExtensions("sparseTextureGatherLodOffsetsAMD", 1, &E_GL_AMD_texture_gather_bias_lod); + } + + // E_GL_AMD_shader_image_load_store_lod + if (profile != EEsProfile) { + symbolTable.setFunctionExtensions("imageLoadLodAMD", 1, &E_GL_AMD_shader_image_load_store_lod); + symbolTable.setFunctionExtensions("imageStoreLodAMD", 1, &E_GL_AMD_shader_image_load_store_lod); + symbolTable.setFunctionExtensions("sparseImageLoadLodAMD", 1, &E_GL_AMD_shader_image_load_store_lod); + } +#endif + +#ifdef NV_EXTENSIONS + if (profile != EEsProfile && version >= 430) { + symbolTable.setVariableExtensions("gl_FragFullyCoveredNV", 1, &E_GL_NV_conservative_raster_underestimation); + BuiltInVariable("gl_FragFullyCoveredNV", EbvFragFullyCoveredNV, symbolTable); + } #endif symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth); - if (profile == EEsProfile) { + if (profile == EEsProfile && version < 320) { symbolTable.setVariableExtensions("gl_PrimitiveID", Num_AEP_geometry_shader, AEP_geometry_shader); symbolTable.setVariableExtensions("gl_Layer", Num_AEP_geometry_shader, AEP_geometry_shader); } - if (profile == EEsProfile) { + if (profile == EEsProfile && version < 320) { symbolTable.setFunctionExtensions("imageAtomicAdd", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicMin", 1, &E_GL_OES_shader_image_atomic); symbolTable.setFunctionExtensions("imageAtomicMax", 1, &E_GL_OES_shader_image_atomic); @@ -5372,6 +5894,15 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); symbolTable.setVariableExtensions("gl_ViewIndex", 1, &E_GL_EXT_multiview); BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); + if (version >= 300 /* both ES and non-ES */) { + symbolTable.setVariableExtensions("gl_ViewID_OVR", Num_OVR_multiview_EXTs, OVR_multiview_EXTs); + BuiltInVariable("gl_ViewID_OVR", EbvViewIndex, symbolTable); + } + + if (profile == EEsProfile) { + symbolTable.setFunctionExtensions("shadow2DEXT", 1, &E_GL_EXT_shadow_samplers); + symbolTable.setFunctionExtensions("shadow2DProjEXT", 1, &E_GL_EXT_shadow_samplers); + } break; case EShLangCompute: @@ -5499,6 +6030,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("doubleBitsToUint64", EOpDoubleBitsToUint64); symbolTable.relateToOperator("int64BitsToDouble", EOpInt64BitsToDouble); symbolTable.relateToOperator("uint64BitsToDouble", EOpUint64BitsToDouble); +#ifdef AMD_EXTENSIONS + symbolTable.relateToOperator("float16BitsToInt16", EOpFloat16BitsToInt16); + symbolTable.relateToOperator("float16BitsToUint16", EOpFloat16BitsToUint16); + symbolTable.relateToOperator("int16BitsToFloat16", EOpInt16BitsToFloat16); + symbolTable.relateToOperator("uint16BitsToFloat16", EOpUint16BitsToFloat16); +#endif symbolTable.relateToOperator("packSnorm2x16", EOpPackSnorm2x16); symbolTable.relateToOperator("unpackSnorm2x16", EOpUnpackSnorm2x16); @@ -5522,6 +6059,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("unpackUint2x32", EOpUnpackUint2x32); #ifdef AMD_EXTENSIONS + symbolTable.relateToOperator("packInt2x16", EOpPackInt2x16); + symbolTable.relateToOperator("unpackInt2x16", EOpUnpackInt2x16); + symbolTable.relateToOperator("packUint2x16", EOpPackUint2x16); + symbolTable.relateToOperator("unpackUint2x16", EOpUnpackUint2x16); + + symbolTable.relateToOperator("packInt4x16", EOpPackInt4x16); + symbolTable.relateToOperator("unpackInt4x16", EOpUnpackInt4x16); + symbolTable.relateToOperator("packUint4x16", EOpPackUint4x16); + symbolTable.relateToOperator("unpackUint4x16", EOpUnpackUint4x16); + symbolTable.relateToOperator("packFloat2x16", EOpPackFloat2x16); symbolTable.relateToOperator("unpackFloat2x16", EOpUnpackFloat2x16); #endif @@ -5557,6 +6104,18 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("atomicCounterDecrement", EOpAtomicCounterDecrement); symbolTable.relateToOperator("atomicCounter", EOpAtomicCounter); + if (profile != EEsProfile && version >= 460) { + symbolTable.relateToOperator("atomicCounterAdd", EOpAtomicCounterAdd); + symbolTable.relateToOperator("atomicCounterSubtract", EOpAtomicCounterSubtract); + symbolTable.relateToOperator("atomicCounterMin", EOpAtomicCounterMin); + symbolTable.relateToOperator("atomicCounterMax", EOpAtomicCounterMax); + symbolTable.relateToOperator("atomicCounterAnd", EOpAtomicCounterAnd); + symbolTable.relateToOperator("atomicCounterOr", EOpAtomicCounterOr); + symbolTable.relateToOperator("atomicCounterXor", EOpAtomicCounterXor); + symbolTable.relateToOperator("atomicCounterExchange", EOpAtomicCounterExchange); + symbolTable.relateToOperator("atomicCounterCompSwap", EOpAtomicCounterCompSwap); + } + symbolTable.relateToOperator("fma", EOpFma); symbolTable.relateToOperator("frexp", EOpFrexp); symbolTable.relateToOperator("ldexp", EOpLdexp); @@ -5699,10 +6258,16 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("readInvocationARB", EOpReadInvocation); symbolTable.relateToOperator("readFirstInvocationARB", EOpReadFirstInvocation); - symbolTable.relateToOperator("anyInvocationARB", EOpAnyInvocation); - symbolTable.relateToOperator("allInvocationsARB", EOpAllInvocations); - symbolTable.relateToOperator("allInvocationsEqualARB", EOpAllInvocationsEqual); - + if (version >= 430) { + symbolTable.relateToOperator("anyInvocationARB", EOpAnyInvocation); + symbolTable.relateToOperator("allInvocationsARB", EOpAllInvocations); + symbolTable.relateToOperator("allInvocationsEqualARB", EOpAllInvocationsEqual); + } + if (version >= 460) { + symbolTable.relateToOperator("anyInvocation", EOpAnyInvocation); + symbolTable.relateToOperator("allInvocations", EOpAllInvocations); + symbolTable.relateToOperator("allInvocationsEqual", EOpAllInvocationsEqual); + } #ifdef AMD_EXTENSIONS symbolTable.relateToOperator("minInvocationsAMD", EOpMinInvocations); symbolTable.relateToOperator("maxInvocationsAMD", EOpMaxInvocations); @@ -5734,8 +6299,26 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("cubeFaceIndexAMD", EOpCubeFaceIndex); symbolTable.relateToOperator("cubeFaceCoordAMD", EOpCubeFaceCoord); symbolTable.relateToOperator("timeAMD", EOpTime); + + symbolTable.relateToOperator("textureGatherLodAMD", EOpTextureGatherLod); + symbolTable.relateToOperator("textureGatherLodOffsetAMD", EOpTextureGatherLodOffset); + symbolTable.relateToOperator("textureGatherLodOffsetsAMD", EOpTextureGatherLodOffsets); + symbolTable.relateToOperator("sparseTextureGatherLodAMD", EOpSparseTextureGatherLod); + symbolTable.relateToOperator("sparseTextureGatherLodOffsetAMD", EOpSparseTextureGatherLodOffset); + symbolTable.relateToOperator("sparseTextureGatherLodOffsetsAMD", EOpSparseTextureGatherLodOffsets); + + symbolTable.relateToOperator("imageLoadLodAMD", EOpImageLoadLod); + symbolTable.relateToOperator("imageStoreLodAMD", EOpImageStoreLod); + symbolTable.relateToOperator("sparseImageLoadLodAMD", EOpSparseImageLoadLod); + + symbolTable.relateToOperator("fragmentMaskFetchAMD", EOpFragmentMaskFetch); + symbolTable.relateToOperator("fragmentFetchAMD", EOpFragmentFetch); #endif } + if (profile == EEsProfile) { + symbolTable.relateToOperator("shadow2DEXT", EOpTexture); + symbolTable.relateToOperator("shadow2DProjEXT", EOpTextureProj); + } } switch(language) { diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Initialize.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Initialize.h index 45b4395..6b54c4d 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Initialize.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Initialize.h @@ -94,11 +94,11 @@ public: protected: void add2ndGenerationSamplingImaging(int version, EProfile profile, const SpvVersion& spvVersion); - void addSubpassSampling(TSampler, TString& typeName, int version, EProfile profile); - void addQueryFunctions(TSampler, TString& typeName, int version, EProfile profile); - void addImageFunctions(TSampler, TString& typeName, int version, EProfile profile); - void addSamplingFunctions(TSampler, TString& typeName, int version, EProfile profile); - void addGatherFunctions(TSampler, TString& typeName, int version, EProfile profile); + void addSubpassSampling(TSampler, const TString& typeName, int version, EProfile profile); + void addQueryFunctions(TSampler, const TString& typeName, int version, EProfile profile); + void addImageFunctions(TSampler, const TString& typeName, int version, EProfile profile); + void addSamplingFunctions(TSampler, const TString& typeName, int version, EProfile profile); + void addGatherFunctions(TSampler, const TString& typeName, int version, EProfile profile); // Helpers for making textual representations of the permutations // of texturing/imaging functions. diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp index 85c0151..6cec765 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp @@ -130,8 +130,9 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn } // Convert the children's type shape to be compatible. - right = addShapeConversion(op, left->getType(), right); - left = addShapeConversion(op, right->getType(), left); + addBiShapeConversion(op, left, right); + if (left == nullptr || right == nullptr) + return nullptr; // // Need a new node holding things together. Make @@ -147,8 +148,8 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn // If they are both (non-specialization) constants, they must be folded. // (Unless it's the sequence (comma) operator, but that's handled in addComma().) // - TIntermConstantUnion *leftTempConstant = left->getAsConstantUnion(); - TIntermConstantUnion *rightTempConstant = right->getAsConstantUnion(); + TIntermConstantUnion *leftTempConstant = node->getLeft()->getAsConstantUnion(); + TIntermConstantUnion *rightTempConstant = node->getRight()->getAsConstantUnion(); if (leftTempConstant && rightTempConstant) { TIntermTyped* folded = leftTempConstant->fold(node->getOp(), rightTempConstant); if (folded) @@ -157,7 +158,7 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn // If can propagate spec-constantness and if the operation is an allowed // specialization-constant operation, make a spec-constant. - if (specConstantPropagates(*left, *right) && isSpecializationOperation(*node)) + if (specConstantPropagates(*node->getLeft(), *node->getRight()) && isSpecializationOperation(*node)) node->getWritableType().getQualifier().makeSpecConstant(); return node; @@ -238,7 +239,7 @@ TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TInterm return nullptr; // convert shape - right = addShapeConversion(op, left->getType(), right); + right = addUniShapeConversion(op, left->getType(), right); // build the node TIntermBinary* node = addBinaryNode(op, left, right, loc); @@ -307,6 +308,10 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo case EOpConstructUint: newType = EbtUint; break; case EOpConstructInt64: newType = EbtInt64; break; case EOpConstructUint64: newType = EbtUint64; break; +#ifdef AMD_EXTENSIONS + case EOpConstructInt16: newType = EbtInt16; break; + case EOpConstructUint16: newType = EbtUint16; break; +#endif case EOpConstructBool: newType = EbtBool; break; case EOpConstructFloat: newType = EbtFloat; break; case EOpConstructDouble: newType = EbtDouble; break; @@ -335,6 +340,10 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo case EOpConstructUint: case EOpConstructInt64: case EOpConstructUint64: +#ifdef AMD_EXTENSIONS + case EOpConstructInt16: + case EOpConstructUint16: +#endif case EOpConstructBool: case EOpConstructFloat: case EOpConstructDouble: @@ -527,6 +536,14 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpConstructUint64: promoteTo = EbtUint64; break; +#ifdef AMD_EXTENSIONS + case EOpConstructInt16: + promoteTo = EbtInt16; + break; + case EOpConstructUint16: + promoteTo = EbtUint16; + break; +#endif // // List all the binary ops that can implicitly convert one operand to the other's type; @@ -615,15 +632,26 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpRightShiftAssign: if ((type.getBasicType() == EbtInt || type.getBasicType() == EbtUint || +#ifdef AMD_EXTENSIONS + type.getBasicType() == EbtInt16 || + type.getBasicType() == EbtUint16 || +#endif type.getBasicType() == EbtInt64 || type.getBasicType() == EbtUint64) && (node->getType().getBasicType() == EbtInt || node->getType().getBasicType() == EbtUint || +#ifdef AMD_EXTENSIONS + node->getType().getBasicType() == EbtInt16 || + node->getType().getBasicType() == EbtUint16 || +#endif node->getType().getBasicType() == EbtInt64 || node->getType().getBasicType() == EbtUint64)) return node; - else + else if (source == EShSourceHlsl && node->getType().getBasicType() == EbtBool) { + promoteTo = type.getBasicType(); + break; + } else return nullptr; default: @@ -659,6 +687,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt #endif case EbtInt64: newOp = EOpConvInt64ToDouble; break; case EbtUint64: newOp = EOpConvUint64ToDouble; break; +#ifdef AMD_EXTENSIONS + case EbtInt16: newOp = EOpConvInt16ToDouble; break; + case EbtUint16: newOp = EOpConvUint16ToDouble; break; +#endif default: return nullptr; } @@ -674,6 +706,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt #endif case EbtInt64: newOp = EOpConvInt64ToFloat; break; case EbtUint64: newOp = EOpConvUint64ToFloat; break; +#ifdef AMD_EXTENSIONS + case EbtInt16: newOp = EOpConvInt16ToFloat; break; + case EbtUint16: newOp = EOpConvUint16ToFloat; break; +#endif default: return nullptr; } @@ -688,6 +724,8 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EbtDouble: newOp = EOpConvDoubleToFloat16; break; case EbtInt64: newOp = EOpConvInt64ToFloat16; break; case EbtUint64: newOp = EOpConvUint64ToFloat16; break; + case EbtInt16: newOp = EOpConvInt16ToFloat16; break; + case EbtUint16: newOp = EOpConvUint16ToFloat16; break; default: return nullptr; } @@ -704,6 +742,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt #endif case EbtInt64: newOp = EOpConvInt64ToBool; break; case EbtUint64: newOp = EOpConvUint64ToBool; break; +#ifdef AMD_EXTENSIONS + case EbtInt16: newOp = EOpConvInt16ToBool; break; + case EbtUint16: newOp = EOpConvUint16ToBool; break; +#endif default: return nullptr; } @@ -719,6 +761,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt #endif case EbtInt64: newOp = EOpConvInt64ToInt; break; case EbtUint64: newOp = EOpConvUint64ToInt; break; +#ifdef AMD_EXTENSIONS + case EbtInt16: newOp = EOpConvInt16ToInt; break; + case EbtUint16: newOp = EOpConvUint16ToInt; break; +#endif default: return nullptr; } @@ -734,6 +780,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt #endif case EbtInt64: newOp = EOpConvInt64ToUint; break; case EbtUint64: newOp = EOpConvUint64ToUint; break; +#ifdef AMD_EXTENSIONS + case EbtInt16: newOp = EOpConvInt16ToUint; break; + case EbtUint16: newOp = EOpConvUint16ToUint; break; +#endif default: return nullptr; } @@ -749,6 +799,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EbtFloat16: newOp = EOpConvFloat16ToInt64; break; #endif case EbtUint64: newOp = EOpConvUint64ToInt64; break; +#ifdef AMD_EXTENSIONS + case EbtInt16: newOp = EOpConvInt16ToInt64; break; + case EbtUint16: newOp = EOpConvUint16ToInt64; break; +#endif default: return nullptr; } @@ -764,10 +818,46 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EbtFloat16: newOp = EOpConvFloat16ToUint64; break; #endif case EbtInt64: newOp = EOpConvInt64ToUint64; break; +#ifdef AMD_EXTENSIONS + case EbtInt16: newOp = EOpConvInt16ToUint64; break; + case EbtUint16: newOp = EOpConvUint16ToUint64; break; +#endif default: return nullptr; } break; +#ifdef AMD_EXTENSIONS + case EbtInt16: + switch (node->getBasicType()) { + case EbtInt: newOp = EOpConvIntToInt16; break; + case EbtUint: newOp = EOpConvUintToInt16; break; + case EbtBool: newOp = EOpConvBoolToInt16; break; + case EbtFloat: newOp = EOpConvFloatToInt16; break; + case EbtDouble: newOp = EOpConvDoubleToInt16; break; + case EbtFloat16: newOp = EOpConvFloat16ToInt16; break; + case EbtInt64: newOp = EOpConvInt64ToInt16; break; + case EbtUint64: newOp = EOpConvUint64ToInt16; break; + case EbtUint16: newOp = EOpConvUint16ToInt16; break; + default: + return nullptr; + } + break; + case EbtUint16: + switch (node->getBasicType()) { + case EbtInt: newOp = EOpConvIntToUint16; break; + case EbtUint: newOp = EOpConvUintToUint16; break; + case EbtBool: newOp = EOpConvBoolToUint16; break; + case EbtFloat: newOp = EOpConvFloatToUint16; break; + case EbtDouble: newOp = EOpConvDoubleToUint16; break; + case EbtFloat16: newOp = EOpConvFloat16ToUint16; break; + case EbtInt64: newOp = EOpConvInt64ToUint16; break; + case EbtUint64: newOp = EOpConvUint64ToUint16; break; + case EbtInt16: newOp = EOpConvInt16ToUint16; break; + default: + return nullptr; + } + break; +#endif default: return nullptr; } @@ -785,7 +875,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt } // Convert the node's shape of type for the given type, as allowed by the -// operation involved: 'op'. +// operation involved: 'op'. This is for situations where there is only one +// direction to consider doing the shape conversion. +// +// This implements policy, it call addShapeConversion() for the mechanism. // // Generally, the AST represents allowed GLSL shapes, so this isn't needed // for GLSL. Bad shapes are caught in conversion or promotion. @@ -793,7 +886,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt // Return 'node' if no conversion was done. Promotion handles final shape // checking. // -TIntermTyped* TIntermediate::addShapeConversion(TOperator op, const TType& type, TIntermTyped* node) +TIntermTyped* TIntermediate::addUniShapeConversion(TOperator op, const TType& type, TIntermTyped* node) { // some source languages don't do this switch (source) { @@ -806,23 +899,142 @@ TIntermTyped* TIntermediate::addShapeConversion(TOperator op, const TType& type, // some operations don't do this switch (op) { + case EOpFunctionCall: + case EOpReturn: + break; + + case EOpMulAssign: + // want to support vector *= scalar native ops in AST and lower, not smear, similarly for + // matrix *= scalar, etc. + + case EOpAddAssign: + case EOpSubAssign: + case EOpDivAssign: + case EOpAndAssign: + case EOpInclusiveOrAssign: + case EOpExclusiveOrAssign: + case EOpRightShiftAssign: + case EOpLeftShiftAssign: + if (node->getVectorSize() == 1) + return node; + break; + case EOpAssign: + break; + + case EOpMix: + break; + + default: + return node; + } + + return addShapeConversion(type, node); +} + +// Convert the nodes' shapes to be compatible for the operation 'op'. +// +// This implements policy, it call addShapeConversion() for the mechanism. +// +// Generally, the AST represents allowed GLSL shapes, so this isn't needed +// for GLSL. Bad shapes are caught in conversion or promotion. +// +void TIntermediate::addBiShapeConversion(TOperator op, TIntermTyped*& lhsNode, TIntermTyped*& rhsNode) +{ + // some source languages don't do this + switch (source) { + case EShSourceHlsl: + break; + case EShSourceGlsl: + default: + return; + } + + // some operations don't do this + // 'break' will mean attempt bidirectional conversion + switch (op) { + case EOpMulAssign: + case EOpAssign: + case EOpAddAssign: + case EOpSubAssign: + case EOpDivAssign: + case EOpAndAssign: + case EOpInclusiveOrAssign: + case EOpExclusiveOrAssign: + case EOpRightShiftAssign: + case EOpLeftShiftAssign: + // switch to unidirectional conversion (the lhs can't change) + rhsNode = addUniShapeConversion(op, lhsNode->getType(), rhsNode); + return; + + case EOpAdd: + case EOpSub: + case EOpMul: + case EOpDiv: + // want to support vector * scalar native ops in AST and lower, not smear, similarly for + // matrix * vector, etc. + if (lhsNode->getVectorSize() == 1 || rhsNode->getVectorSize() == 1) + return; + break; + + case EOpRightShift: + case EOpLeftShift: + // can natively support the right operand being a scalar and the left a vector, + // but not the reverse + if (rhsNode->getVectorSize() == 1) + return; + break; + case EOpLessThan: case EOpGreaterThan: case EOpLessThanEqual: case EOpGreaterThanEqual: + case EOpEqual: case EOpNotEqual: - case EOpFunctionCall: - case EOpReturn: + case EOpLogicalAnd: case EOpLogicalOr: case EOpLogicalXor: + + case EOpAnd: + case EOpInclusiveOr: + case EOpExclusiveOr: + + case EOpMix: break; + default: - return node; + return; } + // Do bidirectional conversions + if (lhsNode->getType().isScalarOrVec1() || rhsNode->getType().isScalarOrVec1()) { + if (lhsNode->getType().isScalarOrVec1()) + lhsNode = addShapeConversion(rhsNode->getType(), lhsNode); + else + rhsNode = addShapeConversion(lhsNode->getType(), rhsNode); + } + lhsNode = addShapeConversion(rhsNode->getType(), lhsNode); + rhsNode = addShapeConversion(lhsNode->getType(), rhsNode); +} + +// Convert the node's shape of type for the given type. It's not necessarily +// an error if they are different and not converted, as some operations accept +// mixed types. Promotion will do final shape checking. +// +// If there is a chance of two nodes, with conversions possible in each direction, +// the policy for what to ask for must be in the caller; this will do what is asked. +// +// Return 'node' if no conversion was done. Promotion handles final shape +// checking. +// +TIntermTyped* TIntermediate::addShapeConversion(const TType& type, TIntermTyped* node) +{ + // no conversion needed + if (node->getType() == type) + return node; + // structures and arrays don't change shape, either to or from if (node->getType().isStruct() || node->getType().isArray() || type.isStruct() || type.isArray()) @@ -831,12 +1043,38 @@ TIntermTyped* TIntermediate::addShapeConversion(TOperator op, const TType& type, // The new node that handles the conversion TOperator constructorOp = mapTypeToConstructorOp(type); - // scalar -> smeared -> vector, or - // vec1 -> scalar, or - // bigger vector -> smaller vector or scalar - if ((type.isVector() && node->getType().isScalar()) || - (node->getType().isVector() && node->getVectorSize() == 1 && type.isScalar()) || - (node->getVectorSize() > type.getVectorSize() && type.isVector())) + // HLSL has custom semantics for scalar->mat shape conversions. + if (source == EShSourceHlsl) { + if (node->getType().isScalarOrVec1() && type.isMatrix()) { + + // HLSL semantics: the scalar (or vec1) is replicated to every component of the matrix. Left to its + // own devices, the constructor from a scalar would populate the diagonal. This forces replication + // to every matrix element. + + // Note that if the node is complex (e.g, a function call), we don't want to duplicate it here + // repeatedly, so we copy it to a temp, then use the temp. + const int matSize = type.getMatrixRows() * type.getMatrixCols(); + TIntermAggregate* rhsAggregate = new TIntermAggregate(); + + const bool isSimple = (node->getAsSymbolNode() != nullptr) || (node->getAsConstantUnion() != nullptr); + + if (!isSimple) { + assert(0); // TODO: use node replicator service when available. + } + + for (int x=0; xgetSequence().push_back(node); + + return setAggregateOperator(rhsAggregate, constructorOp, type, node->getLoc()); + } + } + + // scalar -> vector or vec1 -> vector or + // vector -> scalar or + // bigger vector -> smaller vector + if ((node->getType().isScalarOrVec1() && type.isVector()) || + (node->getType().isVector() && type.isScalar()) || + (node->isVector() && type.isVector() && node->getVectorSize() > type.getVectorSize())) return setAggregateOperator(makeAggregate(node), constructorOp, type, node->getLoc()); return node; @@ -894,6 +1132,10 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat case EbtUint: case EbtInt64: case EbtUint64: +#ifdef AMD_EXTENSIONS + case EbtInt16: + case EbtUint16: +#endif case EbtFloat: case EbtDouble: #ifdef AMD_EXTENSIONS @@ -907,6 +1149,10 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat switch (from) { case EbtInt: case EbtUint: +#ifdef AMD_EXTENSIONS + case EbtInt16: + case EbtUint16: +#endif case EbtFloat: #ifdef AMD_EXTENSIONS case EbtFloat16: @@ -922,6 +1168,10 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat case EbtInt: return version >= 400 || (source == EShSourceHlsl); case EbtUint: +#ifdef AMD_EXTENSIONS + case EbtInt16: + case EbtUint16: +#endif return true; case EbtBool: return (source == EShSourceHlsl); @@ -931,6 +1181,9 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat case EbtInt: switch (from) { case EbtInt: +#ifdef AMD_EXTENSIONS + case EbtInt16: +#endif return true; case EbtBool: return (source == EShSourceHlsl); @@ -943,6 +1196,10 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat case EbtUint: case EbtInt64: case EbtUint64: +#ifdef AMD_EXTENSIONS + case EbtInt16: + case EbtUint16: +#endif return true; default: return false; @@ -951,10 +1208,32 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat switch (from) { case EbtInt: case EbtInt64: +#ifdef AMD_EXTENSIONS + case EbtInt16: +#endif return true; default: return false; } +#ifdef AMD_EXTENSIONS + case EbtFloat16: + switch (from) { + case EbtInt16: + case EbtUint16: + case EbtFloat16: + return true; + default: + return false; + } + case EbtUint16: + switch (from) { + case EbtInt16: + case EbtUint16: + return true; + default: + return false; + } +#endif default: return false; } @@ -1094,21 +1373,79 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const break; #endif case EbtInt: - switch(type.getVectorSize()) { - case 1: op = EOpConstructInt; break; - case 2: op = EOpConstructIVec2; break; - case 3: op = EOpConstructIVec3; break; - case 4: op = EOpConstructIVec4; break; - default: break; // some compilers want this + if (type.getMatrixCols()) { + switch (type.getMatrixCols()) { + case 2: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructIMat2x2; break; + case 3: op = EOpConstructIMat2x3; break; + case 4: op = EOpConstructIMat2x4; break; + default: break; // some compilers want this + } + break; + case 3: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructIMat3x2; break; + case 3: op = EOpConstructIMat3x3; break; + case 4: op = EOpConstructIMat3x4; break; + default: break; // some compilers want this + } + break; + case 4: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructIMat4x2; break; + case 3: op = EOpConstructIMat4x3; break; + case 4: op = EOpConstructIMat4x4; break; + default: break; // some compilers want this + } + break; + } + } else { + switch(type.getVectorSize()) { + case 1: op = EOpConstructInt; break; + case 2: op = EOpConstructIVec2; break; + case 3: op = EOpConstructIVec3; break; + case 4: op = EOpConstructIVec4; break; + default: break; // some compilers want this + } } break; case EbtUint: - switch(type.getVectorSize()) { - case 1: op = EOpConstructUint; break; - case 2: op = EOpConstructUVec2; break; - case 3: op = EOpConstructUVec3; break; - case 4: op = EOpConstructUVec4; break; - default: break; // some compilers want this + if (type.getMatrixCols()) { + switch (type.getMatrixCols()) { + case 2: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructUMat2x2; break; + case 3: op = EOpConstructUMat2x3; break; + case 4: op = EOpConstructUMat2x4; break; + default: break; // some compilers want this + } + break; + case 3: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructUMat3x2; break; + case 3: op = EOpConstructUMat3x3; break; + case 4: op = EOpConstructUMat3x4; break; + default: break; // some compilers want this + } + break; + case 4: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructUMat4x2; break; + case 3: op = EOpConstructUMat4x3; break; + case 4: op = EOpConstructUMat4x4; break; + default: break; // some compilers want this + } + break; + } + } else { + switch(type.getVectorSize()) { + case 1: op = EOpConstructUint; break; + case 2: op = EOpConstructUVec2; break; + case 3: op = EOpConstructUVec3; break; + case 4: op = EOpConstructUVec4; break; + default: break; // some compilers want this + } } break; case EbtInt64: @@ -1129,15 +1466,64 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const default: break; // some compilers want this } break; - case EbtBool: +#ifdef AMD_EXTENSIONS + case EbtInt16: switch(type.getVectorSize()) { - case 1: op = EOpConstructBool; break; - case 2: op = EOpConstructBVec2; break; - case 3: op = EOpConstructBVec3; break; - case 4: op = EOpConstructBVec4; break; + case 1: op = EOpConstructInt16; break; + case 2: op = EOpConstructI16Vec2; break; + case 3: op = EOpConstructI16Vec3; break; + case 4: op = EOpConstructI16Vec4; break; default: break; // some compilers want this } break; + case EbtUint16: + switch(type.getVectorSize()) { + case 1: op = EOpConstructUint16; break; + case 2: op = EOpConstructU16Vec2; break; + case 3: op = EOpConstructU16Vec3; break; + case 4: op = EOpConstructU16Vec4; break; + default: break; // some compilers want this + } + break; +#endif + case EbtBool: + if (type.getMatrixCols()) { + switch (type.getMatrixCols()) { + case 2: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructBMat2x2; break; + case 3: op = EOpConstructBMat2x3; break; + case 4: op = EOpConstructBMat2x4; break; + default: break; // some compilers want this + } + break; + case 3: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructBMat3x2; break; + case 3: op = EOpConstructBMat3x3; break; + case 4: op = EOpConstructBMat3x4; break; + default: break; // some compilers want this + } + break; + case 4: + switch (type.getMatrixRows()) { + case 2: op = EOpConstructBMat4x2; break; + case 3: op = EOpConstructBMat4x3; break; + case 4: op = EOpConstructBMat4x4; break; + default: break; // some compilers want this + } + break; + } + } else { + switch(type.getVectorSize()) { + case 1: op = EOpConstructBool; break; + case 2: op = EOpConstructBVec2; break; + case 3: op = EOpConstructBVec3; break; + case 4: op = EOpConstructBVec4; break; + default: break; // some compilers want this + } + } + break; default: break; } @@ -1228,7 +1614,7 @@ TIntermAggregate* TIntermediate::makeAggregate(const TSourceLoc& loc) // // Returns the selection node created. // -TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, const TSourceLoc& loc) +TIntermSelection* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, const TSourceLoc& loc) { // // Don't prune the false path for compile-time constants; it's needed @@ -1271,14 +1657,16 @@ TIntermTyped* TIntermediate::addMethod(TIntermTyped* object, const TType& type, // // For "?:" test nodes. There are three children; a condition, // a true path, and a false path. The two paths are specified -// as separate parameters. +// as separate parameters. For vector 'cond', the true and false +// are not paths, but vectors to mix. // // Specialization constant operations include // - The ternary operator ( ? : ) // // Returns the selection node created, or nullptr if one could not be. // -TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc& loc) +TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, + const TSourceLoc& loc) { // If it's void, go to the if-then-else selection() if (trueBlock->getBasicType() == EbtVoid && falseBlock->getBasicType() == EbtVoid) { @@ -1300,14 +1688,39 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true return nullptr; } + // Handle a vector condition as a mix + if (!cond->getType().isScalarOrVec1()) { + TType targetVectorType(trueBlock->getType().getBasicType(), EvqTemporary, + cond->getType().getVectorSize()); + // smear true/false operands as needed + trueBlock = addUniShapeConversion(EOpMix, targetVectorType, trueBlock); + falseBlock = addUniShapeConversion(EOpMix, targetVectorType, falseBlock); + + // After conversion, types have to match. + if (falseBlock->getType() != trueBlock->getType()) + return nullptr; + + // make the mix operation + TIntermAggregate* mix = makeAggregate(loc); + mix = growAggregate(mix, falseBlock); + mix = growAggregate(mix, trueBlock); + mix = growAggregate(mix, cond); + mix->setType(targetVectorType); + mix->setOp(EOpMix); + + return mix; + } + + // Now have a scalar condition... + + // Convert true and false expressions to matching types + addBiShapeConversion(EOpMix, trueBlock, falseBlock); + // After conversion, types have to match. if (falseBlock->getType() != trueBlock->getType()) return nullptr; - // - // See if all the operands are constant, then fold it otherwise not. - // - + // Eliminate the selection when the condition is a scalar and all operands are constant. if (cond->getAsConstantUnion() && trueBlock->getAsConstantUnion() && falseBlock->getAsConstantUnion()) { if (cond->getAsConstantUnion()->getConstArray()[0].getBConst()) return trueBlock; @@ -1381,6 +1794,24 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned long long u64, co return addConstantUnion(unionArray, TType(EbtUint64, EvqConst), loc, literal); } +#ifdef AMD_EXTENSIONS +TIntermConstantUnion* TIntermediate::addConstantUnion(short i16, const TSourceLoc& loc, bool literal) const +{ + TConstUnionArray unionArray(1); + unionArray[0].setIConst(i16); + + return addConstantUnion(unionArray, TType(EbtInt16, EvqConst), loc, literal); +} + +TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned short u16, const TSourceLoc& loc, bool literal) const +{ + TConstUnionArray unionArray(1); + unionArray[0].setUConst(u16); + + return addConstantUnion(unionArray, TType(EbtUint16, EvqConst), loc, literal); +} +#endif + TIntermConstantUnion* TIntermediate::addConstantUnion(bool b, const TSourceLoc& loc, bool literal) const { TConstUnionArray unionArray(1); @@ -1478,7 +1909,8 @@ const TIntermTyped* TIntermediate::findLValueBase(const TIntermTyped* node, bool // // Create while and do-while loop nodes. // -TIntermLoop* TIntermediate::addLoop(TIntermNode* body, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, const TSourceLoc& loc) +TIntermLoop* TIntermediate::addLoop(TIntermNode* body, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, + const TSourceLoc& loc) { TIntermLoop* node = new TIntermLoop(body, test, terminal, testFirst); node->setLoc(loc); @@ -1489,13 +1921,19 @@ TIntermLoop* TIntermediate::addLoop(TIntermNode* body, TIntermTyped* test, TInte // // Create a for-loop sequence. // -TIntermAggregate* TIntermediate::addForLoop(TIntermNode* body, TIntermNode* initializer, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, const TSourceLoc& loc) +TIntermAggregate* TIntermediate::addForLoop(TIntermNode* body, TIntermNode* initializer, TIntermTyped* test, + TIntermTyped* terminal, bool testFirst, const TSourceLoc& loc, TIntermLoop*& node) { - TIntermLoop* node = new TIntermLoop(body, test, terminal, testFirst); + node = new TIntermLoop(body, test, terminal, testFirst); node->setLoc(loc); - // make a sequence of the initializer and statement - TIntermAggregate* loopSequence = makeAggregate(initializer, loc); + // make a sequence of the initializer and statement, but try to reuse the + // aggregate already created for whatever is in the initializer, if there is one + TIntermAggregate* loopSequence = (initializer == nullptr || + initializer->getAsAggregate() == nullptr) ? makeAggregate(initializer, loc) + : initializer->getAsAggregate(); + if (loopSequence != nullptr && loopSequence->getOp() == EOpSequence) + loopSequence->setOp(EOpNull); loopSequence = growAggregate(loopSequence, node); loopSequence->setOperator(EOpSequence); @@ -1535,6 +1973,14 @@ bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/) // Propagate 'noContraction' label in backward from 'precise' variables. glslang::PropagateNoContraction(*this); + switch (textureSamplerTransformMode) { + case EShTexSampTransKeep: + break; + case EShTexSampTransUpgradeTextureRemoveSampler: + performTextureUpgradeAndSamplerRemovalTransformation(root); + break; + } + return true; } @@ -1725,6 +2171,30 @@ bool TIntermediate::isSpecializationOperation(const TIntermOperator& node) const case EOpConvUintToInt64: case EOpConvUint64ToInt: case EOpConvIntToUint64: +#ifdef AMD_EXTENSIONS + case EOpConvInt16ToBool: + case EOpConvBoolToInt16: + case EOpConvInt16ToInt: + case EOpConvIntToInt16: + case EOpConvInt16ToUint: + case EOpConvUintToInt16: + case EOpConvInt16ToInt64: + case EOpConvInt64ToInt16: + case EOpConvInt16ToUint64: + case EOpConvUint64ToInt16: + case EOpConvUint16ToBool: + case EOpConvBoolToUint16: + case EOpConvUint16ToInt: + case EOpConvIntToUint16: + case EOpConvUint16ToUint: + case EOpConvUintToUint16: + case EOpConvUint16ToInt64: + case EOpConvInt64ToUint16: + case EOpConvUint16ToUint64: + case EOpConvUint64ToUint16: + case EOpConvInt16ToUint16: + case EOpConvUint16ToInt16: +#endif // unary operations case EOpNegative: @@ -1853,6 +2323,10 @@ bool TIntermediate::promoteUnary(TIntermUnary& node) case EOpBitwiseNot: if (operand->getBasicType() != EbtInt && operand->getBasicType() != EbtUint && +#ifdef AMD_EXTENSIONS + operand->getBasicType() != EbtInt16 && + operand->getBasicType() != EbtUint16 && +#endif operand->getBasicType() != EbtInt64 && operand->getBasicType() != EbtUint64) @@ -1867,6 +2341,10 @@ bool TIntermediate::promoteUnary(TIntermUnary& node) operand->getBasicType() != EbtUint && operand->getBasicType() != EbtInt64 && operand->getBasicType() != EbtUint64 && +#ifdef AMD_EXTENSIONS + operand->getBasicType() != EbtInt16 && + operand->getBasicType() != EbtUint16 && +#endif operand->getBasicType() != EbtFloat && #ifdef AMD_EXTENSIONS operand->getBasicType() != EbtFloat16 && @@ -1967,6 +2445,47 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) // We now have only scalars, vectors, and matrices to worry about. // + // HLSL implicitly promotes bool -> int for numeric operations. + // (Implicit conversions to make the operands match each other's types were already done.) + if (getSource() == EShSourceHlsl && + (left->getBasicType() == EbtBool || right->getBasicType() == EbtBool)) { + switch (op) { + case EOpLessThan: + case EOpGreaterThan: + case EOpLessThanEqual: + case EOpGreaterThanEqual: + + case EOpRightShift: + case EOpLeftShift: + + case EOpMod: + + case EOpAnd: + case EOpInclusiveOr: + case EOpExclusiveOr: + + case EOpAdd: + case EOpSub: + case EOpDiv: + case EOpMul: + left = addConversion(op, TType(EbtInt, EvqTemporary, left->getVectorSize()), left); + right = addConversion(op, TType(EbtInt, EvqTemporary, right->getVectorSize()), right); + if (left == nullptr || right == nullptr) + return false; + node.setLeft(left); + node.setRight(right); + + // Update the original base assumption on result type.. + node.setType(left->getType()); + node.getWritableType().getQualifier().clear(); + + break; + + default: + break; + } + } + // Do general type checks against individual operands (comparing left and right is coming up, checking mixed shapes after that) switch (op) { case EOpLessThan: @@ -2037,8 +2556,14 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) // Check for integer-only operands. if ((left->getBasicType() != EbtInt && left->getBasicType() != EbtUint && - left->getBasicType() != EbtInt64 && left->getBasicType() != EbtUint64) || +#ifdef AMD_EXTENSIONS + left->getBasicType() != EbtInt16 && left->getBasicType() != EbtUint16 && +#endif + left->getBasicType() != EbtInt64 && left->getBasicType() != EbtUint64) || (right->getBasicType() != EbtInt && right->getBasicType() != EbtUint && +#ifdef AMD_EXTENSIONS + right->getBasicType() != EbtInt16 && right->getBasicType() != EbtUint16 && +#endif right->getBasicType() != EbtInt64 && right->getBasicType() != EbtUint64)) return false; if (left->isMatrix() || right->isMatrix()) @@ -2079,8 +2604,6 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) case EOpLogicalXor: return left->getType() == right->getType(); - // no shifts: they can mix types (scalar int can shift a vector uint, etc.) - case EOpMod: case EOpModAssign: @@ -2094,6 +2617,7 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) case EOpAdd: case EOpSub: case EOpDiv: + case EOpAddAssign: case EOpSubAssign: case EOpDivAssign: @@ -2118,7 +2642,7 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) return true; // Finish handling the case, for all ops, where there are two vectors of different sizes - if (left->isVector() && right->isVector() && left->getVectorSize() != right->getVectorSize()) + if (left->isVector() && right->isVector() && left->getVectorSize() != right->getVectorSize() && right->getVectorSize() > 1) return false; // @@ -2651,10 +3175,10 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC node->getLoc()); } -void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable) +void TIntermAggregate::setPragmaTable(const TPragmaTable& pTable) { - assert(!pragmaTable); - pragmaTable = new TPragmaTable(); + assert(pragmaTable == nullptr); + pragmaTable = new TPragmaTable; *pragmaTable = pTable; } @@ -2667,4 +3191,56 @@ bool TIntermediate::specConstantPropagates(const TIntermTyped& node1, const TInt (node2.getType().getQualifier().isSpecConstant() && node1.getType().getQualifier().isConstant()); } +struct TextureUpgradeAndSamplerRemovalTransform : public TIntermTraverser { + void visitSymbol(TIntermSymbol* symbol) override { + if (symbol->getBasicType() == EbtSampler && symbol->getType().getSampler().isTexture()) { + symbol->getWritableType().getSampler().combined = true; + } + } + bool visitAggregate(TVisit, TIntermAggregate* ag) override { + using namespace std; + TIntermSequence& seq = ag->getSequence(); + // remove pure sampler variables + TIntermSequence::iterator newEnd = remove_if(seq.begin(), seq.end(), [](TIntermNode* node) { + TIntermSymbol* symbol = node->getAsSymbolNode(); + if (!symbol) + return false; + + return (symbol->getBasicType() == EbtSampler && symbol->getType().getSampler().isPureSampler()); + }); + seq.erase(newEnd, seq.end()); + // replace constructors with sampler/textures + for_each(seq.begin(), seq.end(), [](TIntermNode*& node) { + TIntermAggregate *constructor = node->getAsAggregate(); + if (constructor && constructor->getOp() == EOpConstructTextureSampler) { + if (!constructor->getSequence().empty()) + node = constructor->getSequence()[0]; + } + }); + return true; + } +}; + +void TIntermediate::performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root) +{ + TextureUpgradeAndSamplerRemovalTransform transform; + root->traverse(&transform); +} + +const char* TIntermediate::getResourceName(TResourceType res) +{ + switch (res) { + case EResSampler: return "shift-sampler-binding"; + case EResTexture: return "shift-texture-binding"; + case EResImage: return "shift-image-binding"; + case EResUbo: return "shift-UBO-binding"; + case EResSsbo: return "shift-ssbo-binding"; + case EResUav: return "shift-uav-binding"; + default: + assert(0); // internal error: should only be called with valid resource types. + return nullptr; + } +} + + } // end namespace glslang diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/LiveTraverser.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/LiveTraverser.h index 029c24a..7333bc9 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/LiveTraverser.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/LiveTraverser.h @@ -33,6 +33,8 @@ // POSSIBILITY OF SUCH DAMAGE. // +#pragma once + #include "../Include/Common.h" #include "reflection.h" #include "localintermediate.h" diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp index 44fc0b4..bbc3cac 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp @@ -234,6 +234,31 @@ void TParseContextBase::trackLinkage(TSymbol& symbol) linkageSymbols.push_back(&symbol); } +// Ensure index is in bounds, correct if necessary. +// Give an error if not. +void TParseContextBase::checkIndex(const TSourceLoc& loc, const TType& type, int& index) +{ + if (index < 0) { + error(loc, "", "[", "index out of range '%d'", index); + index = 0; + } else if (type.isArray()) { + if (type.isExplicitlySizedArray() && index >= type.getOuterArraySize()) { + error(loc, "", "[", "array index out of range '%d'", index); + index = type.getOuterArraySize() - 1; + } + } else if (type.isVector()) { + if (index >= type.getVectorSize()) { + error(loc, "", "[", "vector index out of range '%d'", index); + index = type.getVectorSize() - 1; + } + } else if (type.isMatrix()) { + if (index >= type.getMatrixCols()) { + error(loc, "", "[", "matrix index out of range '%d'", index); + index = type.getMatrixCols() - 1; + } + } +} + // Make a shared symbol have a non-shared version that can be edited by the current // compile, such that editing its type will not change the shared version and will // effect all nodes already sharing it (non-shallow type), @@ -544,6 +569,10 @@ void TParseContextBase::growGlobalUniformBlock(const TSourceLoc& loc, TType& mem firstNewMember = 0; } + // Update with binding and set + globalUniformBlock->getWritableType().getQualifier().layoutBinding = globalUniformBinding; + globalUniformBlock->getWritableType().getQualifier().layoutSet = globalUniformSet; + // Add the requested member as a member to the global block. TType* type = new TType; type->shallowCopy(memberType); diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp index bc43986..eddbb2b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp @@ -49,10 +49,12 @@ namespace glslang { TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, bool parsingBuiltins, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, - TInfoSink& infoSink, bool forwardCompatible, EShMessages messages) : - TParseContextBase(symbolTable, interm, parsingBuiltins, version, profile, spvVersion, language, infoSink, forwardCompatible, messages), - contextPragma(true, false), loopNestingLevel(0), structNestingLevel(0), controlFlowNestingLevel(0), statementNestingLevel(0), - inMain(false), postMainReturn(false), currentFunctionType(nullptr), blockName(nullptr), + TInfoSink& infoSink, bool forwardCompatible, EShMessages messages, + const TString* entryPoint) : + TParseContextBase(symbolTable, interm, parsingBuiltins, version, profile, spvVersion, language, + infoSink, forwardCompatible, messages, entryPoint), + inMain(false), + blockName(nullptr), limits(resources.limits), atomicUintOffsets(nullptr), anyIndexLimits(false) { @@ -87,6 +89,9 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b if (language == EShLangGeometry) globalOutputDefaults.layoutStream = 0; + + if (entryPoint != nullptr && entryPoint->size() > 0 && *entryPoint != "main") + infoSink.info.message(EPrefixError, "Source entry point must be \"main\""); } TParseContext::~TParseContext() @@ -121,11 +126,6 @@ void TParseContext::setPrecisionDefaults() sampler.set(EbtFloat, Esd2D); sampler.external = true; defaultSamplerPrecision[computeSamplerTypeIndex(sampler)] = EpqLow; - } else { - // Non-ES profile - // All default to highp. - for (int type = 0; type < maxSamplerIndex; ++type) - defaultSamplerPrecision[type] = EpqHigh; } // If we are parsing built-in computational variables/functions, it is meaningful to record @@ -141,6 +141,13 @@ void TParseContext::setPrecisionDefaults() defaultPrecision[EbtUint] = EpqHigh; defaultPrecision[EbtFloat] = EpqHigh; } + + if (profile != EEsProfile) { + // Non-ES profile + // All sampler precisions default to highp. + for (int type = 0; type < maxSamplerIndex; ++type) + defaultSamplerPrecision[type] = EpqHigh; + } } defaultPrecision[EbtSampler] = EpqLow; @@ -255,6 +262,10 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector& error(loc, "\")\" expected to end 'debug' pragma", "#pragma", ""); return; } + } else if (spvVersion.spv > 0 && tokens[0].compare("use_storage_buffer") == 0) { + if (tokens.size() != 1) + error(loc, "extra tokens", "#pragma", ""); + intermediate.setUseStorageBuffer(); } } @@ -378,7 +389,8 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn if (base->getQualifier().storage == EvqBuffer) requireProfile(base->getLoc(), ~EEsProfile, "variable indexing buffer block array"); else if (base->getQualifier().storage == EvqUniform) - profileRequires(base->getLoc(), EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "variable indexing uniform block array"); + profileRequires(base->getLoc(), EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, + "variable indexing uniform block array"); else { // input/output blocks either don't exist or can be variable indexed } @@ -387,7 +399,7 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn else if (base->getBasicType() == EbtSampler && version >= 130) { const char* explanation = "variable indexing sampler array"; requireProfile(base->getLoc(), EEsProfile | ECoreProfile | ECompatibilityProfile, explanation); - profileRequires(base->getLoc(), EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, explanation); + profileRequires(base->getLoc(), EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, explanation); profileRequires(base->getLoc(), ECoreProfile | ECompatibilityProfile, 400, nullptr, explanation); } @@ -419,29 +431,6 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn return result; } -void TParseContext::checkIndex(const TSourceLoc& loc, const TType& type, int& index) -{ - if (index < 0) { - error(loc, "", "[", "index out of range '%d'", index); - index = 0; - } else if (type.isArray()) { - if (type.isExplicitlySizedArray() && index >= type.getOuterArraySize()) { - error(loc, "", "[", "array index out of range '%d'", index); - index = type.getOuterArraySize() - 1; - } - } else if (type.isVector()) { - if (index >= type.getVectorSize()) { - error(loc, "", "[", "vector index out of range '%d'", index); - index = type.getVectorSize() - 1; - } - } else if (type.isMatrix()) { - if (index >= type.getMatrixCols()) { - error(loc, "", "[", "matrix index out of range '%d'", index); - index = type.getMatrixCols() - 1; - } - } -} - // for ES 2.0 (version 100) limitations for almost all index operations except vertex-shader uniforms void TParseContext::handleIndexLimits(const TSourceLoc& /*loc*/, TIntermTyped* base, TIntermTyped* index) { @@ -676,7 +665,8 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm // leaving swizzles and struct/block dereferences. TIntermTyped* result = base; - if (base->isVector() || base->isScalar()) { + if ((base->isVector() || base->isScalar()) && + (base->isFloatingDomain() || base->isIntegerDomain() || base->getBasicType() == EbtBool)) { if (base->isScalar()) { const char* dotFeature = "scalar swizzle"; requireProfile(loc, ~EEsProfile, dotFeature); @@ -786,7 +776,7 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct if (prevDec->isPrototyped() && prototype) profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function"); if (prevDec->getType() != function.getType()) - error(loc, "overloaded functions must have the same return type", function.getType().getBasicTypeString().c_str(), ""); + error(loc, "overloaded functions must have the same return type", function.getName().c_str(), ""); for (int i = 0; i < prevDec->getParamCount(); ++i) { if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage) error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1); @@ -908,7 +898,7 @@ TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc, loopNestingLevel = 0; statementNestingLevel = 0; controlFlowNestingLevel = 0; - postMainReturn = false; + postEntryPointReturn = false; return paramNodes; } @@ -1138,7 +1128,13 @@ void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction operationPrecision = std::max(operationPrecision, function[arg].type->getQualifier().precision); } // compute the result precision +#ifdef AMD_EXTENSIONS + if (agg->isSampling() || + agg->getOp() == EOpImageLoad || agg->getOp() == EOpImageStore || + agg->getOp() == EOpImageLoadLod || agg->getOp() == EOpImageStoreLod) +#else if (agg->isSampling() || agg->getOp() == EOpImageLoad || agg->getOp() == EOpImageStore) +#endif resultPrecision = sequence[0]->getAsTyped()->getQualifier().precision; else if (function.getType().getBasicType() != EbtBool) resultPrecision = function.getType().getQualifier().precision == EpqNone ? @@ -1189,7 +1185,7 @@ void TParseContext::checkLocation(const TSourceLoc& loc, TOperator op) error(loc, "tessellation control barrier() cannot be placed within flow control", "", ""); if (! inMain) error(loc, "tessellation control barrier() must be in main()", "", ""); - else if (postMainReturn) + else if (postEntryPointReturn) error(loc, "tessellation control barrier() cannot be placed after a return from main()", "", ""); } break; @@ -1381,8 +1377,9 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan unaryArg = callNode.getAsUnaryNode()->getOperand(); arg0 = unaryArg; } - const TIntermSequence& aggArgs = *argp; // only valid when unaryArg is nullptr + TString featureString; + const char* feature = nullptr; switch (callNode.getOp()) { case EOpTextureGather: case EOpTextureGatherOffset: @@ -1391,8 +1388,9 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan // Figure out which variants are allowed by what extensions, // and what arguments must be constant for which situations. - TString featureString = fnCandidate.getName() + "(...)"; - const char* feature = featureString.c_str(); + featureString = fnCandidate.getName(); + featureString += "(...)"; + feature = featureString.c_str(); profileRequires(loc, EEsProfile, 310, nullptr, feature); int compArg = -1; // track which argument, if any, is the constant component argument switch (callNode.getOp()) { @@ -1412,8 +1410,9 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_texture_gather, feature); else profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature); - if (! aggArgs[fnCandidate[0].type->getSampler().shadow ? 3 : 2]->getAsConstantUnion()) - profileRequires(loc, EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "non-constant offset argument"); + if (! (*argp)[fnCandidate[0].type->getSampler().shadow ? 3 : 2]->getAsConstantUnion()) + profileRequires(loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, + "non-constant offset argument"); if (! fnCandidate[0].type->getSampler().shadow) compArg = 3; break; @@ -1422,7 +1421,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan if (! fnCandidate[0].type->getSampler().shadow) compArg = 3; // check for constant offsets - if (! aggArgs[fnCandidate[0].type->getSampler().shadow ? 3 : 2]->getAsConstantUnion()) + if (! (*argp)[fnCandidate[0].type->getSampler().shadow ? 3 : 2]->getAsConstantUnion()) error(loc, "must be a compile-time constant:", feature, "offsets argument"); break; default: @@ -1430,17 +1429,66 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } if (compArg > 0 && compArg < fnCandidate.getParamCount()) { - if (aggArgs[compArg]->getAsConstantUnion()) { - int value = aggArgs[compArg]->getAsConstantUnion()->getConstArray()[0].getIConst(); + if ((*argp)[compArg]->getAsConstantUnion()) { + int value = (*argp)[compArg]->getAsConstantUnion()->getConstArray()[0].getIConst(); if (value < 0 || value > 3) error(loc, "must be 0, 1, 2, or 3:", feature, "component argument"); } else error(loc, "must be a compile-time constant:", feature, "component argument"); } +#ifdef AMD_EXTENSIONS + bool bias = false; + if (callNode.getOp() == EOpTextureGather) + bias = fnCandidate.getParamCount() > 3; + else if (callNode.getOp() == EOpTextureGatherOffset || + callNode.getOp() == EOpTextureGatherOffsets) + bias = fnCandidate.getParamCount() > 4; + + if (bias) { + featureString = fnCandidate.getName(); + featureString += "with bias argument"; + feature = featureString.c_str(); + profileRequires(loc, ~EEsProfile, 450, nullptr, feature); + requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature); + } +#endif + break; } +#ifdef AMD_EXTENSIONS + case EOpSparseTextureGather: + case EOpSparseTextureGatherOffset: + case EOpSparseTextureGatherOffsets: + { + bool bias = false; + if (callNode.getOp() == EOpSparseTextureGather) + bias = fnCandidate.getParamCount() > 4; + else if (callNode.getOp() == EOpSparseTextureGatherOffset || + callNode.getOp() == EOpSparseTextureGatherOffsets) + bias = fnCandidate.getParamCount() > 5; + + if (bias) { + featureString = fnCandidate.getName(); + featureString += "with bias argument"; + feature = featureString.c_str(); + profileRequires(loc, ~EEsProfile, 450, nullptr, feature); + requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature); + } + + break; + } + + case EOpSparseTextureGatherLod: + case EOpSparseTextureGatherLodOffset: + case EOpSparseTextureGatherLodOffsets: + { + requireExtensions(loc, 1, &E_GL_ARB_sparse_texture2, fnCandidate.getName().c_str()); + break; + } +#endif + case EOpTextureOffset: case EOpTextureFetchOffset: case EOpTextureProjOffset: @@ -1466,12 +1514,12 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } if (arg > 0) { - if (! aggArgs[arg]->getAsConstantUnion()) + if (! (*argp)[arg]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "texel offset", ""); else { - const TType& type = aggArgs[arg]->getAsTyped()->getType(); + const TType& type = (*argp)[arg]->getAsTyped()->getType(); for (int c = 0; c < type.getVectorSize(); ++c) { - int offset = aggArgs[arg]->getAsConstantUnion()->getConstArray()[c].getIConst(); + int offset = (*argp)[arg]->getAsConstantUnion()->getConstArray()[c].getIConst(); if (offset > resources.maxProgramTexelOffset || offset < resources.minProgramTexelOffset) error(loc, "value is out of range:", "texel offset", "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]"); } @@ -1511,6 +1559,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan break; } +#ifdef NV_EXTENSIONS + case EOpAtomicAdd: + case EOpAtomicMin: + case EOpAtomicMax: + case EOpAtomicAnd: + case EOpAtomicOr: + case EOpAtomicXor: + case EOpAtomicExchange: + case EOpAtomicCompSwap: + { + if (arg0->getType().getBasicType() == EbtInt64 || arg0->getType().getBasicType() == EbtUint64) + requireExtensions(loc, 1, &E_GL_NV_shader_atomic_int64, fnCandidate.getName().c_str()); + + break; + } +#endif + case EOpInterpolateAtCentroid: case EOpInterpolateAtSample: case EOpInterpolateAtOffset: @@ -1580,7 +1645,8 @@ void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fn profileRequires(loc, ~EEsProfile, 400, E_GL_ARB_gpu_shader5, feature); int offsetArg = fnCandidate[0].type->getSampler().shadow ? 3 : 2; if (! callNode.getSequence()[offsetArg]->getAsConstantUnion()) - profileRequires(loc, EEsProfile, 0, Num_AEP_gpu_shader5, AEP_gpu_shader5, "non-constant offset argument"); + profileRequires(loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, + "non-constant offset argument"); if (! fnCandidate[0].type->getSampler().shadow) compArg = 3; } else if (fnCandidate.getName().compare("textureGatherOffsets") == 0) { @@ -2098,6 +2164,17 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructDMat4x2: case EOpConstructDMat4x3: case EOpConstructDMat4x4: +#ifdef AMD_EXTENSIONS + case EOpConstructF16Mat2x2: + case EOpConstructF16Mat2x3: + case EOpConstructF16Mat2x4: + case EOpConstructF16Mat3x2: + case EOpConstructF16Mat3x3: + case EOpConstructF16Mat3x4: + case EOpConstructF16Mat4x2: + case EOpConstructF16Mat4x3: + case EOpConstructF16Mat4x4: +#endif constructingMatrix = true; break; default: @@ -2158,6 +2235,10 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructUint: case EOpConstructInt64: case EOpConstructUint64: +#ifdef AMD_EXTENSIONS + case EOpConstructInt16: + case EOpConstructUint16: +#endif case EOpConstructBool: case EOpConstructBVec2: case EOpConstructBVec3: @@ -2174,6 +2255,14 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructU64Vec2: case EOpConstructU64Vec3: case EOpConstructU64Vec4: +#ifdef AMD_EXTENSIONS + case EOpConstructI16Vec2: + case EOpConstructI16Vec3: + case EOpConstructI16Vec4: + case EOpConstructU16Vec2: + case EOpConstructU16Vec3: + case EOpConstructU16Vec4: +#endif // This was the list of valid ones, if they aren't converting from float // and aren't making an array. makeSpecConst = ! floatArgument && ! type.isArray(); @@ -2374,6 +2463,16 @@ void TParseContext::boolCheck(const TSourceLoc& loc, const TPublicType& pType) void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const TString& identifier, TIntermTyped* /*initializer*/) { + // Check that the appropriate extension is enabled if external sampler is used. + // There are two extensions. The correct one must be used based on GLSL version. + if (type.getBasicType() == EbtSampler && type.getSampler().external) { + if (version < 300) { + requireExtensions(loc, 1, &E_GL_OES_EGL_image_external, "samplerExternalOES"); + } else { + requireExtensions(loc, 1, &E_GL_OES_EGL_image_external_essl3, "samplerExternalOES"); + } + } + if (type.getQualifier().storage == EvqUniform) return; @@ -2398,16 +2497,22 @@ void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, co error(loc, "atomic_uints can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); } -void TParseContext::transparentCheck(const TSourceLoc& loc, const TType& type, const TString& /*identifier*/) +void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) { if (parsingBuiltins) return; - // Vulkan doesn't allow transparent uniforms outside of blocks - if (spvVersion.vulkan == 0 || type.getQualifier().storage != EvqUniform) + if (type.getQualifier().storage != EvqUniform) return; - if (type.containsNonOpaque()) - vulkanRemoved(loc, "non-opaque uniforms outside a block"); + + if (type.containsNonOpaque()) { + // Vulkan doesn't allow transparent uniforms outside of blocks + if (spvVersion.vulkan > 0) + vulkanRemoved(loc, "non-opaque uniforms outside a block"); + // OpenGL wants locations on these (unless they are getting automapped) + if (spvVersion.openGl > 0 && !type.getQualifier().hasLocation() && !intermediate.getAutoMapLocations()) + error(loc, "non-opaque uniform variables need a layout(location=L)", identifier.c_str(), ""); + } } // @@ -2460,12 +2565,15 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali // now, knowing it is a shader in/out, do all the in/out semantic checks - if (publicType.basicType == EbtBool) { + if (publicType.basicType == EbtBool && !parsingBuiltins) { error(loc, "cannot be bool", GetStorageQualifierString(qualifier.storage), ""); return; } if (publicType.basicType == EbtInt || publicType.basicType == EbtUint || +#ifdef AMD_EXTENSIONS + publicType.basicType == EbtInt16 || publicType.basicType == EbtUint16 || +#endif publicType.basicType == EbtInt64 || publicType.basicType == EbtUint64 || publicType.basicType == EbtDouble) profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output"); @@ -2476,6 +2584,9 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali if (!qualifier.flat) { #endif if (publicType.basicType == EbtInt || publicType.basicType == EbtUint || +#ifdef AMD_EXTENSIONS + publicType.basicType == EbtInt16 || publicType.basicType == EbtUint16 || +#endif publicType.basicType == EbtInt64 || publicType.basicType == EbtUint64 || publicType.basicType == EbtDouble || (publicType.userDef && (publicType.userDef->containsBasicType(EbtInt) || @@ -2896,7 +3007,7 @@ void TParseContext::structArrayCheck(const TSourceLoc& /*loc*/, const TType& typ } } -void TParseContext::arrayUnsizedCheck(const TSourceLoc& loc, const TQualifier& qualifier, const TArraySizes* arraySizes, bool initializer, bool lastMember) +void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qualifier, TArraySizes* arraySizes, bool initializer, bool lastMember) { assert(arraySizes); @@ -2908,9 +3019,14 @@ void TParseContext::arrayUnsizedCheck(const TSourceLoc& loc, const TQualifier& q if (initializer) return; - // No environment lets any non-outer-dimension that's to be implicitly sized - if (arraySizes->isInnerImplicit()) + // No environment allows any non-outer-dimension to be implicitly sized + if (arraySizes->isInnerImplicit()) { error(loc, "only outermost dimension of an array of arrays can be implicitly sized", "[]", ""); + arraySizes->clearInnerImplicit(); + } + + if (arraySizes->isInnerSpecialization()) + error(loc, "only outermost dimension of an array of arrays can be a specialization constant", "[]", ""); // desktop always allows outer-dimension-unsized variable arrays, if (profile != EEsProfile) @@ -2927,19 +3043,22 @@ void TParseContext::arrayUnsizedCheck(const TSourceLoc& loc, const TQualifier& q switch (language) { case EShLangGeometry: if (qualifier.storage == EvqVaryingIn) - if (extensionsTurnedOn(Num_AEP_geometry_shader, AEP_geometry_shader)) + if ((profile == EEsProfile && version >= 320) || + extensionsTurnedOn(Num_AEP_geometry_shader, AEP_geometry_shader)) return; break; case EShLangTessControl: if ( qualifier.storage == EvqVaryingIn || (qualifier.storage == EvqVaryingOut && ! qualifier.patch)) - if (extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) + if ((profile == EEsProfile && version >= 320) || + extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) return; break; case EShLangTessEvaluation: if ((qualifier.storage == EvqVaryingIn && ! qualifier.patch) || qualifier.storage == EvqVaryingOut) - if (extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) + if ((profile == EEsProfile && version >= 320) || + extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) return; break; default: @@ -2984,7 +3103,7 @@ void TParseContext::arrayDimCheck(const TSourceLoc& loc, const TType* type, cons // void TParseContext::arrayDimMerge(TType& type, const TArraySizes* sizes) { - if (sizes) + if (sizes != nullptr) type.addArrayOuterSizes(*sizes); } @@ -3178,7 +3297,8 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS return nullptr; bool nonEsRedecls = (profile != EEsProfile && (version >= 130 || identifier == "gl_TexCoord")); - bool esRedecls = (profile == EEsProfile && extensionsTurnedOn(Num_AEP_shader_io_blocks, AEP_shader_io_blocks)); + bool esRedecls = (profile == EEsProfile && + (version >= 320 || extensionsTurnedOn(Num_AEP_shader_io_blocks, AEP_shader_io_blocks))); if (! esRedecls && ! nonEsRedecls) return nullptr; @@ -3317,7 +3437,7 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newTypeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes) { const char* feature = "built-in block redeclaration"; - profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature); + profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature); profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature); if (blockName != "gl_PerVertex" && blockName != "gl_PerFragment") { @@ -3363,17 +3483,25 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT return; } + // Fix XFB stuff up, it applies to the order of the redeclaration, not + // the order of the original members. + if (currentBlockQualifier.storage == EvqVaryingOut && globalOutputDefaults.hasXfbBuffer()) { + if (!currentBlockQualifier.hasXfbBuffer()) + currentBlockQualifier.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer; + fixBlockXfbOffsets(currentBlockQualifier, newTypeList); + } + // Edit and error check the container against the redeclaration // - remove unused members // - ensure remaining qualifiers/types match + TType& type = block->getWritableType(); #ifdef NV_EXTENSIONS // if gl_PerVertex is redeclared for the purpose of passing through "gl_Position" - // for passthrough purpose, the redclared block should have the same qualifers as + // for passthrough purpose, the redeclared block should have the same qualifers as // the current one - if (currentBlockQualifier.layoutPassthrough) - { + if (currentBlockQualifier.layoutPassthrough) { type.getQualifier().layoutPassthrough = currentBlockQualifier.layoutPassthrough; type.getQualifier().storage = currentBlockQualifier.storage; type.getQualifier().layoutStream = currentBlockQualifier.layoutStream; @@ -3414,10 +3542,13 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT arrayLimitCheck(loc, member->type->getFieldName(), newType.getOuterArraySize()); if (newType.getQualifier().isMemory()) error(memberLoc, "cannot add memory qualifier to redeclared block member", member->type->getFieldName().c_str(), ""); - if (newType.getQualifier().hasLayout()) - error(memberLoc, "cannot add layout to redeclared block member", member->type->getFieldName().c_str(), ""); + if (newType.getQualifier().hasNonXfbLayout()) + error(memberLoc, "cannot add non-XFB layout to redeclared block member", member->type->getFieldName().c_str(), ""); if (newType.getQualifier().patch) error(memberLoc, "cannot add patch to redeclared block member", member->type->getFieldName().c_str(), ""); + if (newType.getQualifier().hasXfbBuffer() && + newType.getQualifier().layoutXfbBuffer != currentBlockQualifier.layoutXfbBuffer) + error(memberLoc, "member cannot contradict block (or what block inherited from global)", "xfb_buffer", ""); oldType.getQualifier().centroid = newType.getQualifier().centroid; oldType.getQualifier().sample = newType.getQualifier().sample; oldType.getQualifier().invariant = newType.getQualifier().invariant; @@ -3425,18 +3556,21 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT oldType.getQualifier().smooth = newType.getQualifier().smooth; oldType.getQualifier().flat = newType.getQualifier().flat; oldType.getQualifier().nopersp = newType.getQualifier().nopersp; - -#ifdef NV_EXTENSIONS - if (member->type->getFieldName() == "gl_Layer") { - if (!newType.getQualifier().layoutViewportRelative && newType.getQualifier().layoutSecondaryViewportRelativeOffset == -2048) - error(loc, "redeclaration only allowed for viewport_relative or secondary_view_offset layout", "redeclaration", member->type->getFieldName().c_str()); - oldType.getQualifier().layoutViewportRelative = newType.getQualifier().layoutViewportRelative; - oldType.getQualifier().layoutSecondaryViewportRelativeOffset = newType.getQualifier().layoutSecondaryViewportRelativeOffset; + oldType.getQualifier().layoutXfbOffset = newType.getQualifier().layoutXfbOffset; + oldType.getQualifier().layoutXfbBuffer = newType.getQualifier().layoutXfbBuffer; + oldType.getQualifier().layoutXfbStride = newType.getQualifier().layoutXfbStride; + if (oldType.getQualifier().layoutXfbOffset != TQualifier::layoutXfbBufferEnd) { + // if any member as an xfb_offset, then the block's xfb_buffer inherents current xfb_buffer, + // and for xfb processing, the member needs it as well, along with xfb_stride + type.getQualifier().layoutXfbBuffer = currentBlockQualifier.layoutXfbBuffer; + oldType.getQualifier().layoutXfbBuffer = currentBlockQualifier.layoutXfbBuffer; } -#endif if (oldType.isImplicitlySizedArray() && newType.isExplicitlySizedArray()) oldType.changeOuterArraySize(newType.getOuterArraySize()); + // check and process the member's type, which will include managing xfb information + layoutTypeCheck(loc, oldType); + // go to next member ++member; } else { @@ -3931,6 +4065,14 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi publicType.shaderQualifiers.earlyFragmentTests = true; return; } + if (id == "post_depth_coverage") { + requireExtensions(loc, Num_post_depth_coverageEXTs, post_depth_coverageEXTs, "post depth coverage"); + if (extensionTurnedOn(E_GL_ARB_post_depth_coverage)) { + publicType.shaderQualifiers.earlyFragmentTests = true; + } + publicType.shaderQualifiers.postDepthCoverage = true; + return; + } for (TLayoutDepth depth = (TLayoutDepth)(EldNone + 1); depth < EldCount; depth = (TLayoutDepth)(depth+1)) { if (id == TQualifier::getLayoutDepthString(depth)) { requireProfile(loc, ECoreProfile | ECompatibilityProfile, "depth layout qualifier"); @@ -3943,7 +4085,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi bool found = false; for (TBlendEquationShift be = (TBlendEquationShift)0; be < EBlendCount; be = (TBlendEquationShift)(be + 1)) { if (id == TQualifier::getBlendEquationString(be)) { - requireExtensions(loc, 1, &E_GL_KHR_blend_equation_advanced, "blend equation"); + profileRequires(loc, EEsProfile, 320, E_GL_KHR_blend_equation_advanced, "blend equation"); + profileRequires(loc, ~EEsProfile, 0, E_GL_KHR_blend_equation_advanced, "blend equation"); intermediate.addBlendEquation(be); publicType.shaderQualifiers.blendEquation = true; found = true; @@ -4122,6 +4265,11 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi } return; } + if (id == "num_views") { + requireExtensions(loc, Num_OVR_multiview_EXTs, OVR_multiview_EXTs, "num_views"); + publicType.shaderQualifiers.numViews = value; + return; + } #if NV_EXTENSIONS if (language == EShLangVertex || @@ -4198,6 +4346,10 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi if (id.compare(0, 11, "local_size_") == 0) { profileRequires(loc, EEsProfile, 310, 0, "gl_WorkGroupSize"); profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize"); + if (id.size() == 12 && value == 0) { + error(loc, "must be at least 1", id.c_str(), ""); + return; + } if (id == "local_size_x") { publicType.shaderQualifiers.localSize[0] = value; return; @@ -4248,7 +4400,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi // This is also true for overriding layout-qualifier-names, where one // overrides the other (e.g., row_major vs. column_major); only the last // occurrence has any effect." -// void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifier& src, bool inheritOnly) { if (src.hasMatrix()) @@ -4330,6 +4481,25 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb } } + // user-variable location check, which are required for SPIR-V in/out: + // - variables have it directly, + // - blocks have it on each member (already enforced), so check first one + if (spvVersion.spv > 0 && !parsingBuiltins && qualifier.builtIn == EbvNone && + !qualifier.hasLocation() && !intermediate.getAutoMapLocations()) { + + switch (qualifier.storage) { + case EvqVaryingIn: + case EvqVaryingOut: + if (type.getBasicType() != EbtBlock || + (!(*type.getStruct())[0].type->getQualifier().hasLocation() && + (*type.getStruct())[0].type->getQualifier().builtIn == EbvNone)) + error(loc, "SPIR-V requires location for user input/output", "location", ""); + break; + default: + break; + } + } + // Check packing and matrix if (qualifier.hasUniformLayout()) { switch (qualifier.storage) { @@ -4357,6 +4527,22 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb } } +// "For some blocks declared as arrays, the location can only be applied at the block level: +// When a block is declared as an array where additional locations are needed for each member +// for each block array element, it is a compile-time error to specify locations on the block +// members. That is, when locations would be under specified by applying them on block members, +// they are not allowed on block members. For arrayed interfaces (those generally having an +// extra level of arrayness due to interface expansion), the outer array is stripped before +// applying this rule." +void TParseContext::layoutMemberLocationArrayCheck(const TSourceLoc& loc, bool memberWithLocation, TArraySizes* arraySizes) +{ + if (memberWithLocation && arraySizes != nullptr) { + if (arraySizes->getNumDims() > (currentBlockQualifier.isArrayedIo(language) ? 1 : 0)) + error(loc, "cannot use in a block array where new locations are needed for each block element", + "location", ""); + } +} + // Do layout error checking with respect to a type. void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) { @@ -4397,6 +4583,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) break; case EvqUniform: case EvqBuffer: + if (type.getBasicType() == EbtBlock) + error(loc, "cannot apply to uniform or buffer block", "location", ""); break; default: error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", ""); @@ -4457,7 +4645,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) } else lastBinding += type.getCumulativeArraySize(); } - if (lastBinding >= resources.maxCombinedTextureImageUnits) + if (spvVersion.vulkan == 0 && lastBinding >= resources.maxCombinedTextureImageUnits) error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : ""); } if (type.getBasicType() == EbtAtomicUint) { @@ -4502,7 +4690,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) } } } else if (type.isImage() && ! qualifier.writeonly) { - const char *explanation = "image variables declared 'writeonly' without a format layout qualifier"; + const char *explanation = "image variables not declared 'writeonly' and without a format layout qualifier"; requireProfile(loc, ECoreProfile | ECompatibilityProfile, explanation); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shader_image_load_formatted, explanation); } @@ -4531,6 +4719,10 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) case EbtUint: case EbtInt64: case EbtUint64: +#ifdef AMD_EXTENSIONS + case EbtInt16: + case EbtUint16: +#endif case EbtBool: case EbtFloat: case EbtDouble: @@ -4622,11 +4814,11 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier error(loc, "requires uniform or buffer storage qualifier", "binding", ""); } if (qualifier.hasStream()) { - if (qualifier.storage != EvqVaryingOut) + if (!qualifier.isPipeOutput()) error(loc, "can only be used on an output", "stream", ""); } if (qualifier.hasXfb()) { - if (qualifier.storage != EvqVaryingOut) + if (!qualifier.isPipeOutput()) error(loc, "can only be used on an output", "xfb layout qualifier", ""); } if (qualifier.hasUniformLayout()) { @@ -4652,8 +4844,24 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua if (shaderQualifiers.geometry != ElgNone) error(loc, message, TQualifier::getGeometryString(shaderQualifiers.geometry), ""); + if (shaderQualifiers.spacing != EvsNone) + error(loc, message, TQualifier::getVertexSpacingString(shaderQualifiers.spacing), ""); + if (shaderQualifiers.order != EvoNone) + error(loc, message, TQualifier::getVertexOrderString(shaderQualifiers.order), ""); + if (shaderQualifiers.pointMode) + error(loc, message, "point_mode", ""); if (shaderQualifiers.invocations != TQualifier::layoutNotSet) error(loc, message, "invocations", ""); + if (shaderQualifiers.earlyFragmentTests) + error(loc, message, "early_fragment_tests", ""); + if (shaderQualifiers.postDepthCoverage) + error(loc, message, "post_depth_coverage", ""); + for (int i = 0; i < 3; ++i) { + if (shaderQualifiers.localSize[i] > 1) + error(loc, message, "local_size", ""); + if (shaderQualifiers.localSizeSpecId[i] != TQualifier::layoutNotSet) + error(loc, message, "local_size id", ""); + } if (shaderQualifiers.vertices != TQualifier::layoutNotSet) { if (language == EShLangGeometry) error(loc, message, "max_vertices", ""); @@ -4662,15 +4870,10 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua else assert(0); } - for (int i = 0; i < 3; ++i) { - if (shaderQualifiers.localSize[i] > 1) - error(loc, message, "local_size", ""); - if (shaderQualifiers.localSizeSpecId[i] != TQualifier::layoutNotSet) - error(loc, message, "local_size id", ""); - } if (shaderQualifiers.blendEquation) error(loc, message, "blend equation", ""); - // TBD: correctness: are any of these missing? pixelCenterInteger, originUpperLeft, spacing, order, pointmode, earlyfragment, depth + if (shaderQualifiers.numViews != TQualifier::layoutNotSet) + error(loc, message, "num_views", ""); } // Correct and/or advance an object's offset layout qualifier. @@ -4691,15 +4894,11 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol) // Check for overlap int numOffsets = 4; if (symbol.getType().isArray()) { - if (symbol.getType().isExplicitlySizedArray()) + if (symbol.getType().isExplicitlySizedArray() && ! symbol.getType().getArraySizes()->isInnerImplicit()) numOffsets *= symbol.getType().getCumulativeArraySize(); else { - // TODO: functionality: implicitly-sized atomic_uint arrays. - // We don't know the full size until later. This might - // be a specification problem, will report to Khronos. For the - // cases that is not true, the rest of the checking would need - // to be done at link time instead of compile time. - warn(loc, "implicitly sized atomic_uint array treated as having one element for tracking the default offset", "atomic_uint", ""); + // "It is a compile-time error to declare an unsized array of atomic_uint." + error(loc, "array must be explicitly sized", "atomic_uint", ""); } } int repeated = intermediate.addUsedOffsets(qualifier.layoutBinding, offset, numOffsets); @@ -4962,7 +5161,7 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden samplerCheck(loc, type, identifier, initializer); atomicUintCheck(loc, type, identifier); - transparentCheck(loc, type, identifier); + transparentOpaqueCheck(loc, type, identifier); if (identifier != "gl_FragCoord" && (publicType.shaderQualifiers.originUpperLeft || publicType.shaderQualifiers.pixelCenterInteger)) error(loc, "can only apply origin_upper_left and pixel_center_origin to gl_FragCoord", "layout qualifier", ""); @@ -4985,7 +5184,7 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden arrayDimMerge(type, arraySizes); // Check that implicit sizing is only where allowed. - arrayUnsizedCheck(loc, type.getQualifier(), &type.getArraySizes(), initializer != nullptr, false); + arraySizesCheck(loc, type.getQualifier(), &type.getArraySizes(), initializer != nullptr, false); if (! arrayQualifierError(loc, type.getQualifier()) && ! arrayError(loc, type)) declareArray(loc, identifier, type, symbol); @@ -5018,6 +5217,8 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden // look for errors in layout qualifier use layoutObjectCheck(loc, *symbol); + + // fix up fixOffset(loc, *symbol); return initNode; @@ -5302,6 +5503,9 @@ TIntermTyped* TParseContext::convertInitializerList(const TSourceLoc& loc, const // Test for the correctness of the parameters passed to various constructor functions // and also convert them to the right data type, if allowed and required. // +// 'node' is what to construct from. +// 'type' is what type to construct. +// // Returns nullptr for an error or the constructed node (aggregate or typed) for no error. // TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode* node, const TType& type) @@ -5331,7 +5535,7 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode* bool singleArg; if (aggrNode) { - if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1) + if (aggrNode->getOp() != EOpNull) singleArg = true; else singleArg = false; @@ -5479,6 +5683,22 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T basicOp = EOpConstructUint64; break; +#ifdef AMD_EXTENSIONS + case EOpConstructI16Vec2: + case EOpConstructI16Vec3: + case EOpConstructI16Vec4: + case EOpConstructInt16: + basicOp = EOpConstructInt16; + break; + + case EOpConstructU16Vec2: + case EOpConstructU16Vec3: + case EOpConstructU16Vec4: + case EOpConstructUint16: + basicOp = EOpConstructUint16; + break; +#endif + case EOpConstructBVec2: case EOpConstructBVec3: case EOpConstructBVec4: @@ -5535,7 +5755,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con blockStageIoCheck(loc, currentBlockQualifier); blockQualifierCheck(loc, currentBlockQualifier, instanceName != nullptr); if (arraySizes) { - arrayUnsizedCheck(loc, currentBlockQualifier, arraySizes, false, false); + arraySizesCheck(loc, currentBlockQualifier, arraySizes, false, false); arrayDimCheck(loc, arraySizes, 0); if (arraySizes->getNumDims() > 1) requireProfile(loc, ~EEsProfile, "array-of-array of block"); @@ -5553,7 +5773,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary())) error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), ""); if (memberType.isArray()) - arrayUnsizedCheck(memberLoc, currentBlockQualifier, &memberType.getArraySizes(), false, member == typeList.size() - 1); + arraySizesCheck(memberLoc, currentBlockQualifier, &memberType.getArraySizes(), false, member == typeList.size() - 1); if (memberQualifier.hasOffset()) { if (spvVersion.spv == 0) { requireProfile(memberLoc, ~EEsProfile, "offset on block member"); @@ -5635,7 +5855,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con case EvqVaryingOut: requireProfile(memberLoc, ECoreProfile | ECompatibilityProfile | EEsProfile, feature); profileRequires(memberLoc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, feature); - profileRequires(memberLoc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature); + profileRequires(memberLoc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature); memberWithLocation = true; break; default: @@ -5657,6 +5877,8 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con memberQualifier = newMemberQualification; } + layoutMemberLocationArrayCheck(loc, memberWithLocation, arraySizes); + // Process the members fixBlockLocations(loc, currentBlockQualifier, typeList, memberWithLocation, memberWithoutLocation); fixBlockXfbOffsets(currentBlockQualifier, typeList); @@ -5724,6 +5946,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con // Check for general layout qualifier errors layoutObjectCheck(loc, variable); + // fix up if (isIoResizeArray(blockType)) { ioArraySymbolResizeList.push_back(&variable); checkIoArraysConsistency(loc, true); @@ -5756,14 +5979,14 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q // "Compute shaders do not permit user-defined input variables..." requireStage(loc, (EShLanguageMask)(EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask|EShLangFragmentMask), "input block"); if (language == EShLangFragment) - profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block"); + profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block"); break; case EvqVaryingOut: profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "output block"); requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask), "output block"); // ES 310 can have a block before shader_io is turned on, so skip this test for built-ins if (language == EShLangVertex && ! parsingBuiltins) - profileRequires(loc, EEsProfile, 0, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block"); + profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block"); break; default: error(loc, "only uniform, buffer, in, or out blocks are supported", blockName->c_str(), ""); @@ -5838,7 +6061,7 @@ void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifi if (nextLocation >= (int)TQualifier::layoutLocationEnd) error(memberLoc, "location is too large", "location", ""); memberQualifier.layoutLocation = nextLocation; - memberQualifier.layoutComponent = 0; + memberQualifier.layoutComponent = TQualifier::layoutComponentEnd; } nextLocation = memberQualifier.layoutLocation + intermediate.computeTypeLocationSize(*typeList[member].type); } @@ -6129,6 +6352,12 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con else error(loc, "can only apply to 'in'", "early_fragment_tests", ""); } + if (publicType.shaderQualifiers.postDepthCoverage) { + if (publicType.qualifier.storage == EvqVaryingIn) + intermediate.setPostDepthCoverage(); + else + error(loc, "can only apply to 'in'", "post_coverage_coverage", ""); + } if (publicType.shaderQualifiers.blendEquation) { if (publicType.qualifier.storage != EvqVaryingOut) error(loc, "can only apply to 'out'", "blend equation", ""); diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.h index dc9dc6a..b8b083c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ParseHelper.h @@ -44,13 +44,15 @@ #ifndef _PARSER_HELPER_INCLUDED_ #define _PARSER_HELPER_INCLUDED_ +#include +#include + #include "parseVersions.h" #include "../Include/ShHandle.h" #include "SymbolTable.h" #include "localintermediate.h" #include "Scan.h" -#include -#include +#include "attribute.h" namespace glslang { @@ -74,12 +76,23 @@ class TParseContextBase : public TParseVersions { public: TParseContextBase(TSymbolTable& symbolTable, TIntermediate& interm, bool parsingBuiltins, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, - TInfoSink& infoSink, bool forwardCompatible, EShMessages messages) + TInfoSink& infoSink, bool forwardCompatible, EShMessages messages, + const TString* entryPoint = nullptr) : TParseVersions(interm, version, profile, spvVersion, language, infoSink, forwardCompatible, messages), + scopeMangler("::"), symbolTable(symbolTable), + statementNestingLevel(0), loopNestingLevel(0), structNestingLevel(0), controlFlowNestingLevel(0), + postEntryPointReturn(false), + contextPragma(true, false), parsingBuiltins(parsingBuiltins), scanContext(nullptr), ppContext(nullptr), - globalUniformBlock(nullptr) - { } + limits(resources.limits), + globalUniformBlock(nullptr), + globalUniformBinding(TQualifier::layoutBindingEnd), + globalUniformSet(TQualifier::layoutSetEnd) + { + if (entryPoint != nullptr) + sourceEntryPointName = *entryPoint; + } virtual ~TParseContextBase() { } virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken, @@ -93,6 +106,8 @@ public: virtual void setLimits(const TBuiltInResource&) = 0; + void checkIndex(const TSourceLoc&, const TType&, int& index); + EShLanguage getLanguage() const { return language; } void setScanContext(TScanContext* c) { scanContext = c; } TScanContext* getScanContext() const { return scanContext; } @@ -133,15 +148,39 @@ public: extensionCallback(line, extension, behavior); } - TSymbolTable& symbolTable; // symbol table that goes with the current language, version, and profile - // Manage the global uniform block (default uniforms in GLSL, $Global in HLSL) virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr); + // Potentially rename shader entry point function + void renameShaderFunction(TString*& name) const + { + // Replace the entry point name given in the shader with the real entry point name, + // if there is a substitution. + if (name != nullptr && *name == sourceEntryPointName && intermediate.getEntryPointName().size() > 0) + name = NewPoolTString(intermediate.getEntryPointName().c_str()); + } + virtual bool lValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*); virtual void rValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*); - const char* const scopeMangler = "::"; + const char* const scopeMangler; + + // Basic parsing state, easily accessible to the grammar + + TSymbolTable& symbolTable; // symbol table that goes with the current language, version, and profile + int statementNestingLevel; // 0 if outside all flow control or compound statements + int loopNestingLevel; // 0 if outside all loops + int structNestingLevel; // 0 if outside blocks and structures + int controlFlowNestingLevel; // 0 if outside all flow control + const TType* currentFunctionType; // the return type of the function that's currently being parsed + bool functionReturnsValue; // true if a non-void function has a return + // if inside a function, true if the function is the entry point and this is after a return statement + bool postEntryPointReturn; + // case, node, case, case, node, ...; ensure only one node between cases; stack of them for nesting + TList switchSequenceStack; + // the statementNestingLevel the current switch statement is at, which must match the level of its case statements + TList switchLevel; + struct TPragma contextPragma; protected: TParseContextBase(TParseContextBase&); @@ -151,6 +190,9 @@ protected: TVector linkageSymbols; // these need to be transferred to 'linkage', after all editing is done TScanContext* scanContext; TPpContext* ppContext; + TBuiltInResource resources; + TLimits& limits; + TString sourceEntryPointName; // These, if set, will be called when a line, pragma ... is preprocessed. // They will be called with any parameters to the original directive. @@ -170,8 +212,10 @@ protected: TSwizzleSelectors&); // Manage the global uniform block (default uniforms in GLSL, $Global in HLSL) - TVariable* globalUniformBlock; // the actual block, inserted into the symbol table - int firstNewMember; // the index of the first member not yet inserted into the symbol table + TVariable* globalUniformBlock; // the actual block, inserted into the symbol table + unsigned int globalUniformBinding; // the block's binding number + unsigned int globalUniformSet; // the block's set number + int firstNewMember; // the index of the first member not yet inserted into the symbol table // override this to set the language-specific name virtual const char* getGlobalUniformBlockName() const { return ""; } virtual void setUniformBlockDefaults(TType&) const { } @@ -227,7 +271,8 @@ protected: class TParseContext : public TParseContextBase { public: TParseContext(TSymbolTable&, TIntermediate&, bool parsingBuiltins, int version, EProfile, const SpvVersion& spvVersion, EShLanguage, TInfoSink&, - bool forwardCompatible = false, EShMessages messages = EShMsgDefault); + bool forwardCompatible = false, EShMessages messages = EShMsgDefault, + const TString* entryPoint = nullptr); virtual ~TParseContext(); bool obeyPrecisionQualifiers() const { return precisionManager.respectingPrecisionQualifiers(); }; @@ -246,7 +291,6 @@ public: void handlePragma(const TSourceLoc&, const TVector&) override; TIntermTyped* handleVariable(const TSourceLoc&, TSymbol* symbol, const TString* string); TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); - void checkIndex(const TSourceLoc&, const TType&, int& index); void handleIndexLimits(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); void makeEditable(TSymbol*&) override; @@ -296,7 +340,7 @@ public: bool arrayError(const TSourceLoc&, const TType&); void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&); void structArrayCheck(const TSourceLoc&, const TType& structure); - void arrayUnsizedCheck(const TSourceLoc&, const TQualifier&, const TArraySizes*, bool initializer, bool lastMember); + void arraySizesCheck(const TSourceLoc&, const TQualifier&, TArraySizes*, bool initializer, bool lastMember); void arrayOfArrayVersionCheck(const TSourceLoc&); void arrayDimCheck(const TSourceLoc&, const TArraySizes* sizes1, const TArraySizes* sizes2); void arrayDimCheck(const TSourceLoc&, const TType*, const TArraySizes*); @@ -306,7 +350,7 @@ public: void boolCheck(const TSourceLoc&, const TPublicType&); void samplerCheck(const TSourceLoc&, const TType&, const TString& identifier, TIntermTyped* initializer); void atomicUintCheck(const TSourceLoc&, const TType&, const TString& identifier); - void transparentCheck(const TSourceLoc&, const TType&, const TString& identifier); + void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier); void globalQualifierFixCheck(const TSourceLoc&, TQualifier&); void globalQualifierTypeCheck(const TSourceLoc&, const TQualifier&, const TPublicType&); bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType); @@ -338,6 +382,7 @@ public: void setLayoutQualifier(const TSourceLoc&, TPublicType&, TString&, const TIntermTyped*); void mergeObjectLayoutQualifiers(TQualifier& dest, const TQualifier& src, bool inheritOnly); void layoutObjectCheck(const TSourceLoc&, const TSymbol&); + void layoutMemberLocationArrayCheck(const TSourceLoc&, bool memberWithLocation, TArraySizes* arraySizes); void layoutTypeCheck(const TSourceLoc&, const TType&); void layoutQualifierCheck(const TSourceLoc&, const TQualifier&); void checkNoShaderLayouts(const TSourceLoc&, const TShaderQualifiers&); @@ -366,6 +411,17 @@ public: TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body); void updateImplicitArraySize(const TSourceLoc&, TIntermNode*, int index); + TAttributeType attributeFromName(const TString& name) const; + TAttributes* makeAttributes(const TString& identifier) const; + TAttributes* makeAttributes(const TString& identifier, TIntermNode* node) const; + TAttributes* mergeAttributes(TAttributes*, TAttributes*) const; + + // Determine selection control from attributes + void handleSelectionAttributes(const TAttributes& attributes, TIntermNode*); + void handleSwitchAttributes(const TAttributes& attributes, TIntermNode*); + + // Determine loop control from attributes + void handleLoopAttributes(const TAttributes& attributes, TIntermNode*); protected: void nonInitConstCheck(const TSourceLoc&, TString& identifier, TType& type); @@ -383,17 +439,7 @@ public: // // Current state of parsing - struct TPragma contextPragma; - int loopNestingLevel; // 0 if outside all loops - int structNestingLevel; // 0 if outside blocks and structures - int controlFlowNestingLevel; // 0 if outside all flow control - int statementNestingLevel; // 0 if outside all flow control or compound statements - TList switchSequenceStack; // case, node, case, case, node, ...; ensure only one node between cases; stack of them for nesting - TList switchLevel; // the statementNestingLevel the current switch statement is at, which must match the level of its case statements bool inMain; // if inside a function, true if the function is main - bool postMainReturn; // if inside a function, true if the function is main and this is after a return statement - const TType* currentFunctionType; // the return type of the function that's currently being parsed - bool functionReturnsValue; // true if a non-void function has a return const TString* blockName; TQualifier currentBlockQualifier; TPrecisionQualifier defaultPrecision[EbtNumTypes]; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/PoolAlloc.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/PoolAlloc.cpp index 4007c38..84c40f4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/PoolAlloc.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/PoolAlloc.cpp @@ -40,35 +40,22 @@ namespace glslang { +// Process-wide TLS index OS_TLSIndex PoolIndex; -void InitializeMemoryPools() +// Return the thread-specific current pool. +TPoolAllocator& GetThreadPoolAllocator() { - TThreadMemoryPools* pools = static_cast(OS_GetTLSValue(PoolIndex)); - if (pools) - return; - - TPoolAllocator *threadPoolAllocator = new TPoolAllocator(); - - TThreadMemoryPools* threadData = new TThreadMemoryPools(); - - threadData->threadPoolAllocator = threadPoolAllocator; - - OS_SetTLSValue(PoolIndex, threadData); + return *static_cast(OS_GetTLSValue(PoolIndex)); } -void FreeGlobalPools() +// Set the thread-specific current pool. +void SetThreadPoolAllocator(TPoolAllocator* poolAllocator) { - // Release the allocated memory for this thread. - TThreadMemoryPools* globalPools = static_cast(OS_GetTLSValue(PoolIndex)); - if (! globalPools) - return; - - GetThreadPoolAllocator().popAll(); - delete &GetThreadPoolAllocator(); - delete globalPools; + OS_SetTLSValue(PoolIndex, poolAllocator); } +// Process-wide set up of the TLS pool storage. bool InitializePoolIndex() { // Allocate a TLS index. @@ -78,26 +65,6 @@ bool InitializePoolIndex() return true; } -void FreePoolIndex() -{ - // Release the TLS index. - OS_FreeTLSIndex(PoolIndex); -} - -TPoolAllocator& GetThreadPoolAllocator() -{ - TThreadMemoryPools* threadData = static_cast(OS_GetTLSValue(PoolIndex)); - - return *threadData->threadPoolAllocator; -} - -void SetThreadPoolAllocator(TPoolAllocator& poolAllocator) -{ - TThreadMemoryPools* threadData = static_cast(OS_GetTLSValue(PoolIndex)); - - threadData->threadPoolAllocator = &poolAllocator; -} - // // Implement the functionality of the TPoolAllocator class, which // is documented in PoolAlloc.h. @@ -234,13 +201,16 @@ void TPoolAllocator::pop() currentPageOffset = stack.back().offset; while (inUseList != page) { - // invoke destructor to free allocation list - inUseList->~tHeader(); - tHeader* nextInUse = inUseList->nextPage; - if (inUseList->pageCount > 1) + size_t pageCount = inUseList->pageCount; + + // This technically ends the lifetime of the header as C++ object, + // but we will still control the memory and reuse it. + inUseList->~tHeader(); // currently, just a debug allocation checker + + if (pageCount > 1) { delete [] reinterpret_cast(inUseList); - else { + } else { inUseList->nextPage = freeList; freeList = inUseList; } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/RemoveTree.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/RemoveTree.h index 507307e..1ed0156 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/RemoveTree.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/RemoveTree.h @@ -32,6 +32,8 @@ // POSSIBILITY OF SUCH DAMAGE. // +#pragma once + namespace glslang { void RemoveAllTreeNodes(TIntermNode*); diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Scan.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Scan.cpp index f61439f..8e4bc80 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Scan.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Scan.cpp @@ -45,6 +45,7 @@ #include "../Include/Types.h" #include "SymbolTable.h" #include "ParseHelper.h" +#include "attribute.h" #include "glslang_tab.cpp.h" #include "ScanContext.h" #include "Scan.h" @@ -464,6 +465,15 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["u64vec4"] = U64VEC4; #ifdef AMD_EXTENSIONS + (*KeywordMap)["int16_t"] = INT16_T; + (*KeywordMap)["uint16_t"] = UINT16_T; + (*KeywordMap)["i16vec2"] = I16VEC2; + (*KeywordMap)["i16vec3"] = I16VEC3; + (*KeywordMap)["i16vec4"] = I16VEC4; + (*KeywordMap)["u16vec2"] = U16VEC2; + (*KeywordMap)["u16vec3"] = U16VEC3; + (*KeywordMap)["u16vec4"] = U16VEC4; + (*KeywordMap)["float16_t"] = FLOAT16_T; (*KeywordMap)["f16vec2"] = F16VEC2; (*KeywordMap)["f16vec3"] = F16VEC3; @@ -709,6 +719,10 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT; case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT; case PpAtomConstUint64: parserToken->sType.lex.i64 = ppToken.i64val; return UINT64CONSTANT; +#ifdef AMD_EXTENSIONS + case PpAtomConstInt16: parserToken->sType.lex.i = ppToken.ival; return INT16CONSTANT; + case PpAtomConstUint16: parserToken->sType.lex.i = ppToken.ival; return UINT16CONSTANT; +#endif case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT; case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT; #ifdef AMD_EXTENSIONS @@ -828,7 +842,8 @@ int TScanContext::tokenizeIdentifier() case VOLATILE: if (parseContext.profile == EEsProfile && parseContext.version >= 310) return keyword; - if (! parseContext.symbolTable.atBuiltInLevel() && (parseContext.profile == EEsProfile || (parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) + if (! parseContext.symbolTable.atBuiltInLevel() && (parseContext.profile == EEsProfile || + (parseContext.version < 420 && ! parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store)))) reservedWord(); return keyword; @@ -851,14 +866,17 @@ int TScanContext::tokenizeIdentifier() case PATCH: if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.profile == EEsProfile && parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) || + (parseContext.profile == EEsProfile && + (parseContext.version >= 320 || + parseContext.extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader))) || (parseContext.profile != EEsProfile && parseContext.extensionTurnedOn(E_GL_ARB_tessellation_shader))) return keyword; return es30ReservedFromGLSL(400); case SAMPLE: - if (parseContext.extensionsTurnedOn(1, &E_GL_OES_shader_multisample_interpolation)) + if ((parseContext.profile == EEsProfile && parseContext.version >= 320) || + parseContext.extensionsTurnedOn(1, &E_GL_OES_shader_multisample_interpolation)) return keyword; return es30ReservedFromGLSL(400); @@ -912,7 +930,8 @@ int TScanContext::tokenizeIdentifier() case IIMAGEBUFFER: case UIMAGEBUFFER: afterType = true; - if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) + if ((parseContext.profile == EEsProfile && parseContext.version >= 320) || + parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return firstGenerationImage(false); @@ -935,7 +954,8 @@ int TScanContext::tokenizeIdentifier() case IIMAGECUBEARRAY: case UIMAGECUBEARRAY: afterType = true; - if (parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) + if ((parseContext.profile == EEsProfile && parseContext.version >= 320) || + parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) return keyword; return secondGenerationImage(); @@ -967,12 +987,27 @@ int TScanContext::tokenizeIdentifier() case U64VEC4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64) && - parseContext.profile != EEsProfile && parseContext.version >= 450)) + (parseContext.profile != EEsProfile && parseContext.version >= 450 && + parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64))) return keyword; return identifierOrType(); #ifdef AMD_EXTENSIONS + case INT16_T: + case UINT16_T: + case I16VEC2: + case I16VEC3: + case I16VEC4: + case U16VEC2: + case U16VEC3: + case U16VEC4: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + (parseContext.profile != EEsProfile && parseContext.version >= 450 && + parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16))) + return keyword; + return identifierOrType(); + case FLOAT16_T: case F16VEC2: case F16VEC3: @@ -991,8 +1026,8 @@ int TScanContext::tokenizeIdentifier() case F16MAT4X4: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) && - parseContext.profile != EEsProfile && parseContext.version >= 450)) + (parseContext.profile != EEsProfile && parseContext.version >= 450 && + parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float))) return keyword; return identifierOrType(); #endif @@ -1002,7 +1037,8 @@ int TScanContext::tokenizeIdentifier() case ISAMPLERCUBEARRAY: case USAMPLERCUBEARRAY: afterType = true; - if (parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) + if ((parseContext.profile == EEsProfile && parseContext.version >= 320) || + parseContext.extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) return keyword; if (parseContext.profile == EEsProfile || (parseContext.version < 400 && ! parseContext.extensionTurnedOn(E_GL_ARB_texture_cube_map_array))) reservedWord(); @@ -1041,14 +1077,16 @@ int TScanContext::tokenizeIdentifier() case SAMPLERBUFFER: afterType = true; - if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) + if ((parseContext.profile == EEsProfile && parseContext.version >= 320) || + parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return es30ReservedFromGLSL(130); case ISAMPLERBUFFER: case USAMPLERBUFFER: afterType = true; - if (parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) + if ((parseContext.profile == EEsProfile && parseContext.version >= 320) || + parseContext.extensionsTurnedOn(Num_AEP_texture_buffer, AEP_texture_buffer)) return keyword; return es30ReservedFromGLSL(140); @@ -1064,7 +1102,8 @@ int TScanContext::tokenizeIdentifier() case ISAMPLER2DMSARRAY: case USAMPLER2DMSARRAY: afterType = true; - if (parseContext.extensionsTurnedOn(1, &E_GL_OES_texture_storage_multisample_2d_array)) + if ((parseContext.profile == EEsProfile && parseContext.version >= 320) || + parseContext.extensionsTurnedOn(1, &E_GL_OES_texture_storage_multisample_2d_array)) return keyword; return es30ReservedFromGLSL(150); @@ -1078,15 +1117,17 @@ int TScanContext::tokenizeIdentifier() case SAMPLER3D: afterType = true; if (parseContext.profile == EEsProfile && parseContext.version < 300) { - if (! parseContext.extensionTurnedOn(E_GL_OES_texture_3D)) + if (!parseContext.extensionTurnedOn(E_GL_OES_texture_3D)) reservedWord(); } return keyword; case SAMPLER2DSHADOW: afterType = true; - if (parseContext.profile == EEsProfile && parseContext.version < 300) - reservedWord(); + if (parseContext.profile == EEsProfile && parseContext.version < 300) { + if (!parseContext.extensionTurnedOn(E_GL_EXT_shadow_samplers)) + reservedWord(); + } return keyword; case SAMPLER2DRECT: @@ -1113,7 +1154,9 @@ int TScanContext::tokenizeIdentifier() case SAMPLEREXTERNALOES: afterType = true; - if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_OES_EGL_image_external)) + if (parseContext.symbolTable.atBuiltInLevel() || + parseContext.extensionTurnedOn(E_GL_OES_EGL_image_external) || + parseContext.extensionTurnedOn(E_GL_OES_EGL_image_external_essl3)) return keyword; return identifierOrType(); @@ -1198,7 +1241,8 @@ int TScanContext::tokenizeIdentifier() return keyword; case PRECISE: - if ((parseContext.profile == EEsProfile && parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5)) || + if ((parseContext.profile == EEsProfile && + (parseContext.version >= 320 || parseContext.extensionsTurnedOn(Num_AEP_gpu_shader5, AEP_gpu_shader5))) || (parseContext.profile != EEsProfile && parseContext.version >= 400)) return keyword; if (parseContext.profile == EEsProfile && parseContext.version == 310) { @@ -1361,7 +1405,8 @@ int TScanContext::dMat() int TScanContext::firstGenerationImage(bool inEs310) { if (parseContext.symbolTable.atBuiltInLevel() || - (parseContext.profile != EEsProfile && (parseContext.version >= 420 || parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))) || + (parseContext.profile != EEsProfile && (parseContext.version >= 420 || + parseContext.extensionTurnedOn(E_GL_ARB_shader_image_load_store))) || (inEs310 && parseContext.profile == EEsProfile && parseContext.version >= 310)) return keyword; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Scan.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Scan.h index 9b8f2d4..2c26c2e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Scan.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Scan.h @@ -51,25 +51,24 @@ const int EndOfInput = -1; // class TInputScanner { public: - TInputScanner(int n, const char* const s[], size_t L[], const char* const* names = nullptr, int b = 0, int f = 0, bool single = false) : + TInputScanner(int n, const char* const s[], size_t L[], const char* const* names = nullptr, + int b = 0, int f = 0, bool single = false) : numSources(n), - sources(reinterpret_cast(s)), // up to this point, common usage is "char*", but now we need positive 8-bit characters - lengths(L), currentSource(0), currentChar(0), stringBias(b), finale(f), singleLogical(single), endOfFileReached(false) + // up to this point, common usage is "char*", but now we need positive 8-bit characters + sources(reinterpret_cast(s)), + lengths(L), currentSource(0), currentChar(0), stringBias(b), finale(f), singleLogical(single), + endOfFileReached(false) { loc = new TSourceLoc[numSources]; for (int i = 0; i < numSources; ++i) { - loc[i].init(); + loc[i].init(i - stringBias); } if (names != nullptr) { for (int i = 0; i < numSources; ++i) loc[i].name = names[i]; } - loc[currentSource].string = -stringBias; loc[currentSource].line = 1; - loc[currentSource].column = 0; - logicalSourceLoc.string = 0; - logicalSourceLoc.line = 1; - logicalSourceLoc.column = 0; + logicalSourceLoc.init(1); logicalSourceLoc.name = loc[0].name; } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ScanContext.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ScanContext.h index 1d86348..608ae06 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ScanContext.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ScanContext.h @@ -38,6 +38,8 @@ // sits between the preprocessor scanner and parser. // +#pragma once + #include "ParseHelper.h" namespace glslang { diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp index 14f2bde..c92d023 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp @@ -1,7 +1,7 @@ // // Copyright (C) 2002-2005 3Dlabs Inc. Ltd. // Copyright (C) 2013-2016 LunarG, Inc. -// Copyright (C) 2015-2016 Google, Inc. +// Copyright (C) 2015-2017 Google, Inc. // // All rights reserved. // @@ -69,6 +69,10 @@ namespace { // anonymous namespace for file-local functions and symbols +// Total number of successful initializers of glslang: a refcount +// Shared global; access should be protected by a global mutex/critical section. +int NumberOfClients = 0; + using namespace glslang; // Create a language specific version of parseables. @@ -91,18 +95,16 @@ TParseContextBase* CreateParseContext(TSymbolTable& symbolTable, TIntermediate& int version, EProfile profile, EShSource source, EShLanguage language, TInfoSink& infoSink, SpvVersion spvVersion, bool forwardCompatible, EShMessages messages, - bool parsingBuiltIns, const std::string sourceEntryPointName = "") + bool parsingBuiltIns, std::string sourceEntryPointName = "") { -#ifndef ENABLE_HLSL - (void)sourceEntryPointName; // Unused argument. -#endif - switch (source) { - case EShSourceGlsl: - intermediate.setEntryPointName("main"); + case EShSourceGlsl: { + if (sourceEntryPointName.size() == 0) + intermediate.setEntryPointName("main"); + TString entryPoint = sourceEntryPointName.c_str(); return new TParseContext(symbolTable, intermediate, parsingBuiltIns, version, profile, spvVersion, - language, infoSink, forwardCompatible, messages); - + language, infoSink, forwardCompatible, messages, &entryPoint); + } #ifdef ENABLE_HLSL case EShSourceHlsl: return new HlslParseContext(symbolTable, intermediate, parsingBuiltIns, version, profile, spvVersion, @@ -116,7 +118,7 @@ TParseContextBase* CreateParseContext(TSymbolTable& symbolTable, TIntermediate& // Local mapping functions for making arrays of symbol tables.... -const int VersionCount = 15; // index range in MapVersionToIndex +const int VersionCount = 17; // index range in MapVersionToIndex int MapVersionToIndex(int version) { @@ -138,7 +140,10 @@ int MapVersionToIndex(int version) case 440: index = 12; break; case 310: index = 13; break; case 450: index = 14; break; - default: break; + case 500: index = 0; break; // HLSL + case 320: index = 15; break; + case 460: index = 16; break; + default: assert(0); break; } assert(index < VersionCount); @@ -216,7 +221,7 @@ enum EPrecisionClass { TSymbolTable* CommonSymbolTable[VersionCount][SpvVersionCount][ProfileCount][SourceCount][EPcCount] = {}; TSymbolTable* SharedSymbolTables[VersionCount][SpvVersionCount][ProfileCount][SourceCount][EShLangCount] = {}; -TPoolAllocator* PerProcessGPA = 0; +TPoolAllocator* PerProcessGPA = nullptr; // // Parse and add to the given symbol table the content of the given shader string. @@ -360,7 +365,7 @@ bool AddContextSpecificSymbols(const TBuiltInResource* resources, TInfoSink& inf // pool allocator intact, so: // - Switch to a new pool for parsing the built-ins // - Do the parsing, which builds the symbol table, using the new pool -// - Switch to the process-global pool to save a copy the resulting symbol table +// - Switch to the process-global pool to save a copy of the resulting symbol table // - Free up the new pool used to parse the built-ins // - Switch back to the original thread's pool // @@ -387,8 +392,8 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp // Switch to a new pool TPoolAllocator& previousAllocator = GetThreadPoolAllocator(); - TPoolAllocator* builtInPoolAllocator = new TPoolAllocator(); - SetThreadPoolAllocator(*builtInPoolAllocator); + TPoolAllocator* builtInPoolAllocator = new TPoolAllocator; + SetThreadPoolAllocator(builtInPoolAllocator); // Dynamically allocate the local symbol tables so we can control when they are deallocated WRT when the pool is popped. TSymbolTable* commonTable[EPcCount]; @@ -402,7 +407,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp InitializeSymbolTables(infoSink, commonTable, stageTables, version, profile, spvVersion, source); // Switch to the process-global pool - SetThreadPoolAllocator(*PerProcessGPA); + SetThreadPoolAllocator(PerProcessGPA); // Copy the local symbol tables from the new pool to the global tables using the process-global pool for (int precClass = 0; precClass < EPcCount; ++precClass) { @@ -429,7 +434,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp delete stageTables[stage]; delete builtInPoolAllocator; - SetThreadPoolAllocator(previousAllocator); + SetThreadPoolAllocator(&previousAllocator); glslang::ReleaseGlobalLock(); } @@ -447,7 +452,7 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo return correct; } - // Get a good version... + // Get a version... if (version == 0) { version = defaultVersion; // infoSink.info.message(EPrefixWarning, "#version: statement missing; use #version on first line of shader"); @@ -455,9 +460,9 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo // Get a good profile... if (profile == ENoProfile) { - if (version == 300 || version == 310) { + if (version == 300 || version == 310 || version == 320) { correct = false; - infoSink.info.message(EPrefixError, "#version: versions 300 and 310 require specifying the 'es' profile"); + infoSink.info.message(EPrefixError, "#version: versions 300, 310, and 320 require specifying the 'es' profile"); profile = EEsProfile; } else if (version == 100) profile = EEsProfile; @@ -474,16 +479,16 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo profile = EEsProfile; else profile = ENoProfile; - } else if (version == 300 || version == 310) { + } else if (version == 300 || version == 310 || version == 320) { if (profile != EEsProfile) { correct = false; - infoSink.info.message(EPrefixError, "#version: versions 300 and 310 support only the es profile"); + infoSink.info.message(EPrefixError, "#version: versions 300, 310, and 320 support only the es profile"); } profile = EEsProfile; } else { if (profile == EEsProfile) { correct = false; - infoSink.info.message(EPrefixError, "#version: only version 300 and 310 support the es profile"); + infoSink.info.message(EPrefixError, "#version: only version 300, 310, and 320 support the es profile"); if (version >= FirstProfileVersion) profile = ECoreProfile; else @@ -493,6 +498,42 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo } } + // Fix version... + switch (version) { + // ES versions + case 100: break; + case 300: break; + case 310: break; + case 320: break; + + // desktop versions + case 110: break; + case 120: break; + case 130: break; + case 140: break; + case 150: break; + case 330: break; + case 400: break; + case 410: break; + case 420: break; + case 430: break; + case 440: break; + case 450: break; + case 460: break; + + // unknown version + default: + correct = false; + infoSink.info.message(EPrefixError, "version not supported"); + if (profile == EEsProfile) + version = 310; + else { + version = 450; + profile = ECoreProfile; + } + break; + } + // Correct for stage type... switch (stage) { case EShLangGeometry: @@ -566,44 +607,92 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo } } - // A meta check on the condition of the compiler itself... - switch (version) { - - // ES versions - case 100: - case 300: - // versions are complete - break; - - // Desktop versions - case 110: - case 120: - case 130: - case 140: - case 150: - case 330: - // versions are complete - break; - - case 310: - case 400: - case 410: - case 420: - case 430: - case 440: - case 450: - infoSink.info << "Warning, version " << version << " is not yet complete; most version-specific features are present, but some are missing.\n"; - break; - - default: - infoSink.info << "Warning, version " << version << " is unknown.\n"; - break; - - } - return correct; } +// There are multiple paths in for setting environment stuff. +// TEnvironment takes precedence, for what it sets, so sort all this out. +// Ideally, the internal code could be made to use TEnvironment, but for +// now, translate it to the historically used parameters. +void TranslateEnvironment(const TEnvironment* environment, EShMessages& messages, EShSource& source, + EShLanguage& stage, SpvVersion& spvVersion) +{ + // Set up environmental defaults, first ignoring 'environment'. + if (messages & EShMsgSpvRules) + spvVersion.spv = 0x00010000; + if (messages & EShMsgVulkanRules) { + spvVersion.vulkan = 100; + spvVersion.vulkanGlsl = 100; + } else if (spvVersion.spv != 0) + spvVersion.openGl = 100; + + // Now, override, based on any content set in 'environment'. + // 'environment' must be cleared to ESh*None settings when items + // are not being set. + if (environment != nullptr) { + // input language + if (environment->input.languageFamily != EShSourceNone) { + stage = environment->input.stage; + switch (environment->input.dialect) { + case EShClientNone: + break; + case EShClientVulkan: + spvVersion.vulkanGlsl = environment->input.dialectVersion; + break; + case EShClientOpenGL: + spvVersion.openGl = environment->input.dialectVersion; + break; + } + switch (environment->input.languageFamily) { + case EShSourceNone: + break; + case EShSourceGlsl: + source = EShSourceGlsl; + messages = static_cast(messages & ~EShMsgReadHlsl); + break; + case EShSourceHlsl: + source = EShSourceHlsl; + messages = static_cast(messages | EShMsgReadHlsl); + break; + } + } + + // client + switch (environment->client.client) { + case EShClientVulkan: + spvVersion.vulkan = environment->client.version; + break; + default: + break; + } + + // generated code + switch (environment->target.language) { + case EshTargetSpv: + spvVersion.spv = environment->target.version; + break; + default: + break; + } + } +} + +// Most processes are recorded when set in the intermediate representation, +// These are the few that are not. +void RecordProcesses(TIntermediate& intermediate, EShMessages messages, const std::string& sourceEntryPointName) +{ + if ((messages & EShMsgRelaxedErrors) != 0) + intermediate.addProcess("relaxed-errors"); + if ((messages & EShMsgSuppressWarnings) != 0) + intermediate.addProcess("suppress-warnings"); + if ((messages & EShMsgKeepUncalled) != 0) + intermediate.addProcess("keep-uncalled"); + if (sourceEntryPointName.size() > 0) { + intermediate.addProcess("source-entrypoint"); + intermediate.addProcessArgument(sourceEntryPointName); + } +} + // This is the common setup and cleanup code for PreprocessDeferred and // CompileDeferred. // It takes any callable with a signature of @@ -623,7 +712,7 @@ bool ProcessDeferred( const char* customPreamble, const EShOptimizationLevel optLevel, const TBuiltInResource* resources, - int defaultVersion, // use 100 for ES environment, 110 for desktop; this is the GLSL version, not SPIR-V or Vulkan + int defaultVersion, // use 100 for ES environment, 110 for desktop; this is the GLSL version, not SPIR-V or Vulkan EProfile defaultProfile, // set version/profile to defaultVersion/defaultProfile regardless of the #version // directive in the source code @@ -634,12 +723,9 @@ bool ProcessDeferred( ProcessingContext& processingContext, bool requireNonempty, TShader::Includer& includer, - const std::string sourceEntryPointName = "" - ) + const std::string sourceEntryPointName = "", + const TEnvironment* environment = nullptr) // optional way of fully setting all versions, overriding the above { - if (! InitThread()) - return false; - // This must be undone (.pop()) by the caller, after it finishes consuming the created tree. GetThreadPoolAllocator().push(); @@ -663,7 +749,7 @@ bool ProcessDeferred( const char** names = new const char*[numTotal]; for (int s = 0; s < numStrings; ++s) { strings[s + numPre] = shaderStrings[s]; - if (inputLengths == 0 || inputLengths[s] < 0) + if (inputLengths == nullptr || inputLengths[s] < 0) lengths[s + numPre] = strlen(shaderStrings[s]); else lengths[s + numPre] = inputLengths[s]; @@ -676,16 +762,25 @@ bool ProcessDeferred( names[s + numPre] = nullptr; } + // Get all the stages, languages, clients, and other environment + // stuff sorted out. + EShSource source = (messages & EShMsgReadHlsl) != 0 ? EShSourceHlsl : EShSourceGlsl; + SpvVersion spvVersion; + EShLanguage stage = compiler->getLanguage(); + TranslateEnvironment(environment, messages, source, stage, spvVersion); + // First, without using the preprocessor or parser, find the #version, so we know what // symbol tables, processing rules, etc. to set up. This does not need the extra strings - // outlined above, just the user shader. - glslang::TInputScanner userInput(numStrings, &strings[numPre], &lengths[numPre]); // no preamble + // outlined above, just the user shader, after the system and user preambles. + glslang::TInputScanner userInput(numStrings, &strings[numPre], &lengths[numPre]); int version = 0; EProfile profile = ENoProfile; bool versionNotFirstToken = false; - bool versionNotFirst = (messages & EShMsgReadHlsl) ? true : userInput.scanVersion(version, profile, versionNotFirstToken); + bool versionNotFirst = (source == EShSourceHlsl) + ? true + : userInput.scanVersion(version, profile, versionNotFirstToken); bool versionNotFound = version == 0; - if (forceDefaultVersionAndProfile && (messages & EShMsgReadHlsl) == 0) { + if (forceDefaultVersionAndProfile && source == EShSourceGlsl) { if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound && (version != defaultVersion || profile != defaultProfile)) { compiler->infoSink.info << "Warning, (version, profile) forced to be (" @@ -702,15 +797,9 @@ bool ProcessDeferred( version = defaultVersion; profile = defaultProfile; } - SpvVersion spvVersion; - if (messages & EShMsgSpvRules) - spvVersion.spv = 0x00010000; // TODO: eventually have this come from the outside - EShSource source = (messages & EShMsgReadHlsl) ? EShSourceHlsl : EShSourceGlsl; - if (messages & EShMsgVulkanRules) - spvVersion.vulkan = 100; // TODO: eventually have this come from the outside - else if (spvVersion.spv != 0) - spvVersion.openGl = 100; // TODO: eventually have this come from the outside - bool goodVersion = DeduceVersionProfile(compiler->infoSink, compiler->getLanguage(), versionNotFirst, defaultVersion, source, version, profile, spvVersion); + + bool goodVersion = DeduceVersionProfile(compiler->infoSink, stage, + versionNotFirst, defaultVersion, source, version, profile, spvVersion); bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst)); bool warnVersionNotFirst = false; if (! versionWillBeError && versionNotFirstToken) { @@ -724,17 +813,23 @@ bool ProcessDeferred( intermediate.setVersion(version); intermediate.setProfile(profile); intermediate.setSpv(spvVersion); + RecordProcesses(intermediate, messages, sourceEntryPointName); if (spvVersion.vulkan >= 100) intermediate.setOriginUpperLeft(); - if (messages & EShMsgHlslOffsets) // source-language independent + if ((messages & EShMsgHlslOffsets) || source == EShSourceHlsl) intermediate.setHlslOffsets(); + if (messages & EShMsgDebugInfo) { + intermediate.setSourceFile(names[numPre]); + for (int s = 0; s < numStrings; ++s) + intermediate.addSourceText(strings[numPre + s]); + } SetupBuiltinSymbolTable(version, profile, spvVersion, source); TSymbolTable* cachedTable = SharedSymbolTables[MapVersionToIndex(version)] [MapSpvVersionToIndex(spvVersion)] [MapProfileToIndex(profile)] [MapSourceToIndex(source)] - [compiler->getLanguage()]; + [stage]; // Dynamically allocate the symbol table so we can control when it is deallocated WRT the pool. TSymbolTable* symbolTableMemory = new TSymbolTable; @@ -745,7 +840,7 @@ bool ProcessDeferred( // Add built-in symbols that are potentially context dependent; // they get popped again further down. if (! AddContextSpecificSymbols(resources, compiler->infoSink, symbolTable, version, profile, spvVersion, - compiler->getLanguage(), source)) + stage, source)) return false; // @@ -753,14 +848,14 @@ bool ProcessDeferred( // TParseContextBase* parseContext = CreateParseContext(symbolTable, intermediate, version, profile, source, - compiler->getLanguage(), compiler->infoSink, + stage, compiler->infoSink, spvVersion, forwardCompatible, messages, false, sourceEntryPointName); - TPpContext ppContext(*parseContext, names[numPre]? names[numPre]: "", includer); + TPpContext ppContext(*parseContext, names[numPre] ? names[numPre] : "", includer); // only GLSL (bison triggered, really) needs an externally set scan context glslang::TScanContext scanContext(*parseContext); - if ((messages & EShMsgReadHlsl) == 0) + if (source == EShSourceGlsl) parseContext->setScanContext(&scanContext); parseContext->setPpContext(&ppContext); @@ -1079,14 +1174,15 @@ bool CompileDeferred( EShMessages messages, // warnings/errors/AST; things to print out TIntermediate& intermediate,// returned tree, etc. TShader::Includer& includer, - const std::string sourceEntryPointName = "") + const std::string sourceEntryPointName = "", + TEnvironment* environment = nullptr) { DoFullParse parser; return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames, preamble, optLevel, resources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, forwardCompatible, messages, intermediate, parser, - true, includer, sourceEntryPointName); + true, includer, sourceEntryPointName, environment); } } // end anonymous namespace for local functions @@ -1101,7 +1197,11 @@ int ShInitialize() if (! InitProcess()) return 0; - if (! PerProcessGPA) + glslang::GetGlobalLock(); + ++NumberOfClients; + glslang::ReleaseGlobalLock(); + + if (PerProcessGPA == nullptr) PerProcessGPA = new TPoolAllocator(); glslang::TScanContext::fillInKeywordMap(); @@ -1167,6 +1267,14 @@ void ShDestruct(ShHandle handle) // int __fastcall ShFinalize() { + glslang::GetGlobalLock(); + --NumberOfClients; + assert(NumberOfClients >= 0); + bool finalize = NumberOfClients == 0; + glslang::ReleaseGlobalLock(); + if (! finalize) + return 1; + for (int version = 0; version < VersionCount; ++version) { for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) { for (int p = 0; p < ProfileCount; ++p) { @@ -1193,10 +1301,9 @@ int __fastcall ShFinalize() } } - if (PerProcessGPA) { - PerProcessGPA->popAll(); + if (PerProcessGPA != nullptr) { delete PerProcessGPA; - PerProcessGPA = 0; + PerProcessGPA = nullptr; } glslang::TScanContext::deleteKeywordMap(); @@ -1237,6 +1344,8 @@ int ShCompile( if (compiler == 0) return 0; + SetThreadPoolAllocator(compiler->getPool()); + compiler->infoSink.info.erase(); compiler->infoSink.debug.erase(); @@ -1294,6 +1403,8 @@ int ShLinkExt( TShHandleBase* base = reinterpret_cast(linkHandle); TLinker* linker = static_cast(base->getAsLinker()); + SetThreadPoolAllocator(linker->getPool()); + if (linker == 0) return 0; @@ -1328,9 +1439,6 @@ void ShSetEncryptionMethod(ShHandle handle) // const char* ShGetInfoLog(const ShHandle handle) { - if (!InitThread()) - return 0; - if (handle == 0) return 0; @@ -1354,9 +1462,6 @@ const char* ShGetInfoLog(const ShHandle handle) // const void* ShGetExecutable(const ShHandle handle) { - if (!InitThread()) - return 0; - if (handle == 0) return 0; @@ -1379,9 +1484,6 @@ const void* ShGetExecutable(const ShHandle handle) // int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* table) { - if (!InitThread()) - return 0; - if (handle == 0) return 0; @@ -1401,9 +1503,6 @@ int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* t // int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* table) { - if (!InitThread()) - return 0; - if (handle == 0) return 0; @@ -1422,9 +1521,6 @@ int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* tab // int ShExcludeAttributes(const ShHandle handle, int *attributes, int count) { - if (!InitThread()) - return 0; - if (handle == 0) return 0; @@ -1446,9 +1542,6 @@ int ShExcludeAttributes(const ShHandle handle, int *attributes, int count) // int ShGetUniformLocation(const ShHandle handle, const char* name) { - if (!InitThread()) - return 0; - if (handle == 0) return -1; @@ -1477,12 +1570,12 @@ namespace glslang { const char* GetEsslVersionString() { - return "OpenGL ES GLSL 3.00 glslang LunarG Khronos." GLSLANG_REVISION " " GLSLANG_DATE; + return "OpenGL ES GLSL 3.20 glslang Khronos." GLSLANG_REVISION " " GLSLANG_DATE; } const char* GetGlslVersionString() { - return "4.20 glslang LunarG Khronos." GLSLANG_REVISION " " GLSLANG_DATE; + return "4.60 glslang Khronos." GLSLANG_REVISION " " GLSLANG_DATE; } int GetKhronosToolId() @@ -1507,11 +1600,18 @@ public: }; TShader::TShader(EShLanguage s) - : pool(0), stage(s), lengths(nullptr), stringNames(nullptr), preamble("") + : stage(s), lengths(nullptr), stringNames(nullptr), preamble("") { + pool = new TPoolAllocator; infoSink = new TInfoSink; compiler = new TDeferredCompiler(stage, *infoSink); intermediate = new TIntermediate(s); + + // clear environment (avoid constructors in them for use in a C interface) + environment.input.languageFamily = EShSourceNone; + environment.input.dialect = EShClientNone; + environment.client.client = EShClientNone; + environment.target.language = EShTargetNone; } TShader::~TShader() @@ -1555,14 +1655,47 @@ void TShader::setSourceEntryPoint(const char* name) sourceEntryPointName = name; } -void TShader::setShiftSamplerBinding(unsigned int base) { intermediate->setShiftSamplerBinding(base); } -void TShader::setShiftTextureBinding(unsigned int base) { intermediate->setShiftTextureBinding(base); } -void TShader::setShiftImageBinding(unsigned int base) { intermediate->setShiftImageBinding(base); } -void TShader::setShiftUboBinding(unsigned int base) { intermediate->setShiftUboBinding(base); } -void TShader::setShiftSsboBinding(unsigned int base) { intermediate->setShiftSsboBinding(base); } +void TShader::addProcesses(const std::vector& p) +{ + intermediate->addProcesses(p); +} + +// Set binding base for given resource type +void TShader::setShiftBinding(TResourceType res, unsigned int base) { + intermediate->setShiftBinding(res, base); +} + +// Set binding base for given resource type for a given binding set. +void TShader::setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set) { + intermediate->setShiftBindingForSet(res, base, set); +} + +// Set binding base for sampler types +void TShader::setShiftSamplerBinding(unsigned int base) { setShiftBinding(EResSampler, base); } +// Set binding base for texture types (SRV) +void TShader::setShiftTextureBinding(unsigned int base) { setShiftBinding(EResTexture, base); } +// Set binding base for image types +void TShader::setShiftImageBinding(unsigned int base) { setShiftBinding(EResImage, base); } +// Set binding base for uniform buffer objects (CBV) +void TShader::setShiftUboBinding(unsigned int base) { setShiftBinding(EResUbo, base); } +// Synonym for setShiftUboBinding, to match HLSL language. +void TShader::setShiftCbufferBinding(unsigned int base) { setShiftBinding(EResUbo, base); } +// Set binding base for UAV (unordered access view) +void TShader::setShiftUavBinding(unsigned int base) { setShiftBinding(EResUav, base); } +// Set binding base for SSBOs +void TShader::setShiftSsboBinding(unsigned int base) { setShiftBinding(EResSsbo, base); } +// Enables binding automapping using TIoMapper void TShader::setAutoMapBindings(bool map) { intermediate->setAutoMapBindings(map); } +// Enables position.Y output negation in vertex shader +void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); } +// Fragile: currently within one stage: simple auto-assignment of location +void TShader::setAutoMapLocations(bool map) { intermediate->setAutoMapLocations(map); } +// See comment above TDefaultHlslIoMapper in iomapper.cpp: +void TShader::setHlslIoMapping(bool hlslIoMap) { intermediate->setHlslIoMapping(hlslIoMap); } void TShader::setFlattenUniformArrays(bool flatten) { intermediate->setFlattenUniformArrays(flatten); } void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); } +void TShader::setResourceSetBinding(const std::vector& base) { intermediate->setResourceSetBinding(base); } +void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); } // // Turn the shader strings into a parse tree in the TIntermediate. @@ -1574,21 +1707,16 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion { if (! InitThread()) return false; + SetThreadPoolAllocator(pool); - pool = new TPoolAllocator(); - SetThreadPoolAllocator(*pool); if (! preamble) preamble = ""; return CompileDeferred(compiler, strings, numStrings, lengths, stringNames, preamble, EShOptNone, builtInResources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, - forwardCompatible, messages, *intermediate, includer, sourceEntryPointName); -} - -bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion, bool forwardCompatible, EShMessages messages) -{ - return parse(builtInResources, defaultVersion, ENoProfile, false, forwardCompatible, messages); + forwardCompatible, messages, *intermediate, includer, sourceEntryPointName, + &environment); } // Fill in a string with the result of preprocessing ShaderStrings @@ -1602,9 +1730,8 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources, { if (! InitThread()) return false; + SetThreadPoolAllocator(pool); - pool = new TPoolAllocator(); - SetThreadPoolAllocator(*pool); if (! preamble) preamble = ""; @@ -1624,8 +1751,9 @@ const char* TShader::getInfoDebugLog() return infoSink->debug.c_str(); } -TProgram::TProgram() : pool(0), reflection(0), ioMapper(nullptr), linked(false) +TProgram::TProgram() : reflection(0), ioMapper(nullptr), linked(false) { + pool = new TPoolAllocator; infoSink = new TInfoSink; for (int s = 0; s < EShLangCount; ++s) { intermediate[s] = 0; @@ -1660,8 +1788,7 @@ bool TProgram::link(EShMessages messages) bool error = false; - pool = new TPoolAllocator(); - SetThreadPoolAllocator(*pool); + SetThreadPoolAllocator(pool); for (int s = 0; s < EShLangCount; ++s) { if (! linkStage((EShLanguage)s, messages)) @@ -1777,7 +1904,9 @@ const char* TProgram::getUniformName(int index) const { return reflection const char* TProgram::getUniformBlockName(int index) const { return reflection->getUniformBlock(index).name.c_str(); } int TProgram::getUniformBlockSize(int index) const { return reflection->getUniformBlock(index).size; } int TProgram::getUniformIndex(const char* name) const { return reflection->getIndex(name); } +int TProgram::getUniformBinding(int index) const { return reflection->getUniform(index).getBinding(); } int TProgram::getUniformBlockIndex(int index) const { return reflection->getUniform(index).index; } +int TProgram::getUniformBlockCounterIndex(int index) const { return reflection->getUniformBlock(index).counterIndex; } int TProgram::getUniformType(int index) const { return reflection->getUniform(index).glDefineType; } int TProgram::getUniformBufferOffset(int index) const { return reflection->getUniform(index).offset; } int TProgram::getUniformArraySize(int index) const { return reflection->getUniform(index).size; } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp index 790b76b..233033e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp @@ -67,6 +67,10 @@ void TType::buildMangledName(TString& mangledName) const case EbtUint: mangledName += 'u'; break; case EbtInt64: mangledName += "i64"; break; case EbtUint64: mangledName += "u64"; break; +#ifdef AMD_EXTENSIONS + case EbtInt16: mangledName += "i16"; break; + case EbtUint16: mangledName += "u16"; break; +#endif case EbtBool: mangledName += 'b'; break; case EbtAtomicUint: mangledName += "au"; break; case EbtSampler: @@ -99,6 +103,23 @@ void TType::buildMangledName(TString& mangledName) const case EsdSubpass: mangledName += "P"; break; default: break; // some compilers want this } + + if (sampler.hasReturnStruct()) { + // Name mangle for sampler return struct uses struct table index. + mangledName += "-tx-struct"; + + char text[16]; // plenty enough space for the small integers. + snprintf(text, sizeof(text), "%d-", sampler.structReturnIndex); + mangledName += text; + } else { + switch (sampler.getVectorSize()) { + case 1: mangledName += "1"; break; + case 2: mangledName += "2"; break; + case 3: mangledName += "3"; break; + case 4: break; // default to prior name mangle behavior + } + } + if (sampler.ms) mangledName += "M"; break; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.h index 8dc154c..f928b7a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/SymbolTable.h @@ -198,7 +198,6 @@ struct TParameter { TString *name; TType* type; TIntermTyped* defaultValue; - TBuiltInVariable declaredBuiltIn; void copyParam(const TParameter& param) { if (param.name) @@ -207,8 +206,8 @@ struct TParameter { name = 0; type = param.type->clone(); defaultValue = param.defaultValue; - declaredBuiltIn = param.declaredBuiltIn; } + TBuiltInVariable getDeclaredBuiltIn() const { return type->getQualifier().declaredBuiltIn; } }; // @@ -241,7 +240,6 @@ public: virtual void addParameter(TParameter& p) { assert(writable); - p.declaredBuiltIn = p.type->getQualifier().builtIn; parameters.push_back(p); p.type->appendMangledName(mangledName); @@ -264,6 +262,12 @@ public: mangledName.insert(0, prefix); } + virtual void removePrefix(const TString& prefix) + { + assert(mangledName.compare(0, prefix.size(), prefix) == 0); + mangledName.erase(0, prefix.size()); + } + virtual const TString& getMangledName() const override { return mangledName; } virtual const TType& getType() const override { return returnType; } virtual TBuiltInVariable getDeclaredBuiltInType() const { return declaredBuiltIn; } @@ -688,19 +692,27 @@ public: // Normal find of a symbol, that can optionally say whether the symbol was found // at a built-in level or the current top-scope level. - TSymbol* find(const TString& name, bool* builtIn = 0, bool *currentScope = 0) + TSymbol* find(const TString& name, bool* builtIn = 0, bool* currentScope = 0, int* thisDepthP = 0) { int level = currentLevel(); TSymbol* symbol; + int thisDepth = 0; do { + if (table[level]->isThisLevel()) + ++thisDepth; symbol = table[level]->find(name); --level; - } while (symbol == 0 && level >= 0); + } while (symbol == nullptr && level >= 0); level++; if (builtIn) *builtIn = isBuiltInLevel(level); if (currentScope) *currentScope = isGlobalLevel(currentLevel()) || level == currentLevel(); // consider shared levels as "current scope" WRT user globals + if (thisDepthP != nullptr) { + if (! table[level]->isThisLevel()) + thisDepth = 0; + *thisDepthP = thisDepth; + } return symbol; } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp index 528333f..99e763b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.cpp @@ -154,8 +154,9 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_OES_standard_derivatives] = EBhDisable; extensionBehavior[E_GL_EXT_frag_depth] = EBhDisable; extensionBehavior[E_GL_OES_EGL_image_external] = EBhDisable; + extensionBehavior[E_GL_OES_EGL_image_external_essl3] = EBhDisable; extensionBehavior[E_GL_EXT_shader_texture_lod] = EBhDisable; - + extensionBehavior[E_GL_EXT_shadow_samplers] = EBhDisable; extensionBehavior[E_GL_ARB_texture_rectangle] = EBhDisable; extensionBehavior[E_GL_3DL_array_objects] = EBhDisable; extensionBehavior[E_GL_ARB_shading_language_420pack] = EBhDisable; @@ -179,10 +180,15 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_ARB_shader_ballot] = EBhDisable; extensionBehavior[E_GL_ARB_sparse_texture2] = EBhDisable; extensionBehavior[E_GL_ARB_sparse_texture_clamp] = EBhDisable; + extensionBehavior[E_GL_ARB_shader_stencil_export] = EBhDisable; // extensionBehavior[E_GL_ARB_cull_distance] = EBhDisable; // present for 4.5, but need extension control over block members + extensionBehavior[E_GL_ARB_post_depth_coverage] = EBhDisable; + extensionBehavior[E_GL_ARB_shader_viewport_layer_array] = EBhDisable; extensionBehavior[E_GL_EXT_shader_non_constant_global_initializers] = EBhDisable; - extensionBehavior[E_GL_EXT_shader_image_load_formatted] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_image_load_formatted] = EBhDisable; + extensionBehavior[E_GL_EXT_post_depth_coverage] = EBhDisable; + extensionBehavior[E_GL_EXT_control_flow_attributes] = EBhDisable; // #line and #include extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable; @@ -194,15 +200,20 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_AMD_shader_explicit_vertex_parameter] = EBhDisable; extensionBehavior[E_GL_AMD_gcn_shader] = EBhDisable; extensionBehavior[E_GL_AMD_gpu_shader_half_float] = EBhDisable; + extensionBehavior[E_GL_AMD_texture_gather_bias_lod] = EBhDisable; + extensionBehavior[E_GL_AMD_gpu_shader_int16] = EBhDisable; + extensionBehavior[E_GL_AMD_shader_image_load_store_lod] = EBhDisable; + extensionBehavior[E_GL_AMD_shader_fragment_mask] = EBhDisable; #endif #ifdef NV_EXTENSIONS extensionBehavior[E_GL_NV_sample_mask_override_coverage] = EBhDisable; extensionBehavior[E_SPV_NV_geometry_shader_passthrough] = EBhDisable; - extensionBehavior[E_GL_ARB_shader_viewport_layer_array] = EBhDisable; extensionBehavior[E_GL_NV_viewport_array2] = EBhDisable; extensionBehavior[E_GL_NV_stereo_view_rendering] = EBhDisable; extensionBehavior[E_GL_NVX_multiview_per_view_attributes] = EBhDisable; + extensionBehavior[E_GL_NV_shader_atomic_int64] = EBhDisable; + extensionBehavior[E_GL_NV_conservative_raster_underestimation] = EBhDisable; #endif // AEP @@ -236,6 +247,10 @@ void TParseVersions::initializeExtensionBehavior() // EXT extensions extensionBehavior[E_GL_EXT_device_group] = EBhDisable; extensionBehavior[E_GL_EXT_multiview] = EBhDisable; + + // OVR extensions + extensionBehavior[E_GL_OVR_multiview] = EBhDisable; + extensionBehavior[E_GL_OVR_multiview2] = EBhDisable; } // Get code that is not part of a shared symbol table, is specific to this shader, @@ -250,7 +265,9 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_OES_standard_derivatives 1\n" "#define GL_EXT_frag_depth 1\n" "#define GL_OES_EGL_image_external 1\n" + "#define GL_OES_EGL_image_external_essl3 1\n" "#define GL_EXT_shader_texture_lod 1\n" + "#define GL_EXT_shadow_samplers 1\n" // AEP "#define GL_ANDROID_extension_pack_es31a 1\n" @@ -306,9 +323,13 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_ARB_shader_ballot 1\n" "#define GL_ARB_sparse_texture2 1\n" "#define GL_ARB_sparse_texture_clamp 1\n" + "#define GL_ARB_shader_stencil_export 1\n" // "#define GL_ARB_cull_distance 1\n" // present for 4.5, but need extension control over block members + "#define GL_ARB_post_depth_coverage 1\n" "#define GL_EXT_shader_non_constant_global_initializers 1\n" "#define GL_EXT_shader_image_load_formatted 1\n" + "#define GL_EXT_post_depth_coverage 1\n" + "#define GL_EXT_control_flow_attributes 1\n" #ifdef AMD_EXTENSIONS "#define GL_AMD_shader_ballot 1\n" @@ -316,12 +337,18 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_AMD_shader_explicit_vertex_parameter 1\n" "#define GL_AMD_gcn_shader 1\n" "#define GL_AMD_gpu_shader_half_float 1\n" + "#define GL_AMD_texture_gather_bias_lod 1\n" + "#define GL_AMD_gpu_shader_int16 1\n" + "#define GL_AMD_shader_image_load_store_lod 1\n" + "#define GL_AMD_shader_fragment_mask 1\n" #endif #ifdef NV_EXTENSIONS "#define GL_NV_sample_mask_override_coverage 1\n" "#define GL_NV_geometry_shader_passthrough 1\n" "#define GL_NV_viewport_array2 1\n" + "#define GL_NV_shader_atomic_int64 1\n" + "#define GL_NV_conservative_raster_underestimation 1\n" #endif ; @@ -336,12 +363,19 @@ void TParseVersions::getPreamble(std::string& preamble) if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { - preamble += + preamble += "#define GL_EXT_device_group 1\n" "#define GL_EXT_multiview 1\n" ; } + if (version >= 300 /* both ES and non-ES */) { + preamble += + "#define GL_OVR_multiview 1\n" + "#define GL_OVR_multiview2 1\n" + ; + } + // #line and #include preamble += "#define GL_GOOGLE_cpp_style_line_directive 1\n" @@ -351,9 +385,9 @@ void TParseVersions::getPreamble(std::string& preamble) // #define VULKAN XXXX const int numberBufSize = 12; char numberBuf[numberBufSize]; - if (spvVersion.vulkan > 0) { + if (spvVersion.vulkanGlsl > 0) { preamble += "#define VULKAN "; - snprintf(numberBuf, numberBufSize, "%d", spvVersion.vulkan); + snprintf(numberBuf, numberBufSize, "%d", spvVersion.vulkanGlsl); preamble += numberBuf; preamble += "\n"; } @@ -498,6 +532,11 @@ void TParseVersions::requireNotRemoved(const TSourceLoc& loc, int profileMask, i } } +void TParseVersions::unimplemented(const TSourceLoc& loc, const char* featureDesc) +{ + error(loc, "feature not yet implemented", featureDesc, ""); +} + // Returns true if at least one of the extensions in the extensions parameter is requested. Otherwise, returns false. // Warns appropriately if the requested behavior of an extension is "warn". bool TParseVersions::checkExtensionsRequested(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc) @@ -533,7 +572,8 @@ bool TParseVersions::checkExtensionsRequested(const TSourceLoc& loc, int numExte // void TParseVersions::requireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc) { - if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) return; + if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) + return; // If we get this far, give errors explaining what extensions are needed if (numExtensions == 1) @@ -551,7 +591,8 @@ void TParseVersions::requireExtensions(const TSourceLoc& loc, int numExtensions, // void TParseVersions::ppRequireExtensions(const TSourceLoc& loc, int numExtensions, const char* const extensions[], const char* featureDesc) { - if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) return; + if (checkExtensionsRequested(loc, numExtensions, extensions, featureDesc)) + return; // If we get this far, give errors explaining what extensions are needed if (numExtensions == 1) @@ -589,7 +630,8 @@ bool TParseVersions::extensionTurnedOn(const char* const extension) bool TParseVersions::extensionsTurnedOn(int numExtensions, const char* const extensions[]) { for (int i = 0; i < numExtensions; ++i) { - if (extensionTurnedOn(extensions[i])) return true; + if (extensionTurnedOn(extensions[i])) + return true; } return false; } @@ -703,10 +745,21 @@ void TParseVersions::doubleCheck(const TSourceLoc& loc, const char* op) } #ifdef AMD_EXTENSIONS -// Call for any operation needing float16 data-type support. +// Call for any operation needing GLSL 16-bit integer data-type support. +void TParseVersions::int16Check(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (! builtIn) { + requireExtensions(loc, 1, &E_GL_AMD_gpu_shader_int16, "shader int16"); + requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); + profileRequires(loc, ECoreProfile, 450, nullptr, op); + profileRequires(loc, ECompatibilityProfile, 450, nullptr, op); + } +} + +// Call for any operation needing GLSL float16 data-type support. void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool builtIn) { - if (!builtIn) { + if (! builtIn) { requireExtensions(loc, 1, &E_GL_AMD_gpu_shader_half_float, "shader half float"); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); profileRequires(loc, ECoreProfile, 450, nullptr, op); diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.h index 7f5d33d..c444270 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/Versions.h @@ -72,14 +72,19 @@ inline const char* ProfileName(EProfile profile) } // -// SPIR-V has versions for multiple things; tie them together. -// 0 means a target or rule set is not enabled. +// What source rules, validation rules, target language, etc. are needed +// desired for SPIR-V? +// +// 0 means a target or rule set is not enabled (ignore rules from that entity). +// Non-0 means to apply semantic rules arising from that version of its rule set. +// The union of all requested rule sets will be applied. // struct SpvVersion { - SpvVersion() : spv(0), vulkan(0), openGl(0) {} - unsigned int spv; // the version of the targeted SPIR-V, as defined by SPIR-V in word 1 of the SPIR-V binary header - int vulkan; // the version of semantics for Vulkan; e.g., for GLSL from KHR_vulkan_glsl "#define VULKAN" - int openGl; // the version of semantics for OpenGL; e.g., for GLSL from KHR_vulkan_glsl "#define GL_SPIRV" + SpvVersion() : spv(0), vulkanGlsl(0), vulkan(0), openGl(0) {} + unsigned int spv; // the version of SPIR-V to target, as defined by "word 1" of the SPIR-V binary header + int vulkanGlsl; // the version of GLSL semantics for Vulkan, from GL_KHR_vulkan_glsl, for "#define VULKAN XXX" + int vulkan; // the version of Vulkan, for which SPIR-V execution environment rules to use (100 means 1.0) + int openGl; // the version of GLSL semantics for OpenGL, from GL_ARB_gl_spirv, for "#define GL_SPIRV XXX" }; // @@ -102,7 +107,9 @@ const char* const E_GL_OES_texture_3D = "GL_OES_texture_3D"; const char* const E_GL_OES_standard_derivatives = "GL_OES_standard_derivatives"; const char* const E_GL_EXT_frag_depth = "GL_EXT_frag_depth"; const char* const E_GL_OES_EGL_image_external = "GL_OES_EGL_image_external"; +const char* const E_GL_OES_EGL_image_external_essl3 = "GL_OES_EGL_image_external_essl3"; const char* const E_GL_EXT_shader_texture_lod = "GL_EXT_shader_texture_lod"; +const char* const E_GL_EXT_shadow_samplers = "GL_EXT_shadow_samplers"; const char* const E_GL_ARB_texture_rectangle = "GL_ARB_texture_rectangle"; const char* const E_GL_3DL_array_objects = "GL_3DL_array_objects"; @@ -127,7 +134,10 @@ const char* const E_GL_ARB_gpu_shader_int64 = "GL_ARB_gpu_shader_int const char* const E_GL_ARB_shader_ballot = "GL_ARB_shader_ballot"; const char* const E_GL_ARB_sparse_texture2 = "GL_ARB_sparse_texture2"; const char* const E_GL_ARB_sparse_texture_clamp = "GL_ARB_sparse_texture_clamp"; +const char* const E_GL_ARB_shader_stencil_export = "GL_ARB_shader_stencil_export"; // const char* const E_GL_ARB_cull_distance = "GL_ARB_cull_distance"; // present for 4.5, but need extension control over block members +const char* const E_GL_ARB_post_depth_coverage = "GL_ARB_post_depth_coverage"; +const char* const E_GL_ARB_shader_viewport_layer_array = "GL_ARB_shader_viewport_layer_array"; const char* const E_GL_EXT_shader_non_constant_global_initializers = "GL_EXT_shader_non_constant_global_initializers"; const char* const E_GL_EXT_shader_image_load_formatted = "GL_EXT_shader_image_load_formatted"; @@ -135,6 +145,20 @@ const char* const E_GL_EXT_shader_image_load_formatted = "GL_EXT_shader_image_lo // EXT extensions const char* const E_GL_EXT_device_group = "GL_EXT_device_group"; const char* const E_GL_EXT_multiview = "GL_EXT_multiview"; +const char* const E_GL_EXT_post_depth_coverage = "GL_EXT_post_depth_coverage"; +const char* const E_GL_EXT_control_flow_attributes = "GL_EXT_control_flow_attributes"; + +// Arrays of extensions for the above viewportEXTs duplications + +const char* const post_depth_coverageEXTs[] = { E_GL_ARB_post_depth_coverage, E_GL_EXT_post_depth_coverage }; +const int Num_post_depth_coverageEXTs = sizeof(post_depth_coverageEXTs) / sizeof(post_depth_coverageEXTs[0]); + +// OVR extensions +const char* const E_GL_OVR_multiview = "GL_OVR_multiview"; +const char* const E_GL_OVR_multiview2 = "GL_OVR_multiview2"; + +const char* const OVR_multiview_EXTs[] = { E_GL_OVR_multiview, E_GL_OVR_multiview2 }; +const int Num_OVR_multiview_EXTs = sizeof(OVR_multiview_EXTs) / sizeof(OVR_multiview_EXTs[0]); // #line and #include const char* const E_GL_GOOGLE_cpp_style_line_directive = "GL_GOOGLE_cpp_style_line_directive"; @@ -146,15 +170,21 @@ const char* const E_GL_AMD_shader_trinary_minmax = "GL_AMD_shader const char* const E_GL_AMD_shader_explicit_vertex_parameter = "GL_AMD_shader_explicit_vertex_parameter"; const char* const E_GL_AMD_gcn_shader = "GL_AMD_gcn_shader"; const char* const E_GL_AMD_gpu_shader_half_float = "GL_AMD_gpu_shader_half_float"; +const char* const E_GL_AMD_texture_gather_bias_lod = "GL_AMD_texture_gather_bias_lod"; +const char* const E_GL_AMD_gpu_shader_int16 = "GL_AMD_gpu_shader_int16"; +const char* const E_GL_AMD_shader_image_load_store_lod = "GL_AMD_shader_image_load_store_lod"; +const char* const E_GL_AMD_shader_fragment_mask = "GL_AMD_shader_fragment_mask"; #endif + #ifdef NV_EXTENSIONS const char* const E_GL_NV_sample_mask_override_coverage = "GL_NV_sample_mask_override_coverage"; const char* const E_SPV_NV_geometry_shader_passthrough = "GL_NV_geometry_shader_passthrough"; -const char* const E_GL_ARB_shader_viewport_layer_array = "GL_ARB_shader_viewport_layer_array"; const char* const E_GL_NV_viewport_array2 = "GL_NV_viewport_array2"; const char* const E_GL_NV_stereo_view_rendering = "GL_NV_stereo_view_rendering"; const char* const E_GL_NVX_multiview_per_view_attributes = "GL_NVX_multiview_per_view_attributes"; +const char* const E_GL_NV_shader_atomic_int64 = "GL_NV_shader_atomic_int64"; +const char* const E_GL_NV_conservative_raster_underestimation = "GL_NV_conservative_raster_underestimation"; // Arrays of extensions for the above viewportEXTs duplications diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/attribute.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/attribute.cpp new file mode 100644 index 0000000..acc17e9 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/attribute.cpp @@ -0,0 +1,257 @@ +// +// Copyright (C) 2017 LunarG, Inc. +// Copyright (C) 2018 Google, Inc. +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of Google, Inc., nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + +#include "attribute.h" +#include "../Include/intermediate.h" +#include "ParseHelper.h" + +namespace glslang { + +// extract integers out of attribute arguments stored in attribute aggregate +bool TAttributeArgs::getInt(int& value, int argNum) const +{ + const TConstUnion* intConst = getConstUnion(EbtInt, argNum); + + if (intConst == nullptr) + return false; + + value = intConst->getIConst(); + return true; +} + +// extract strings out of attribute arguments stored in attribute aggregate. +// convert to lower case if converToLower is true (for case-insensitive compare convenience) +bool TAttributeArgs::getString(TString& value, int argNum, bool convertToLower) const +{ + const TConstUnion* stringConst = getConstUnion(EbtString, argNum); + + if (stringConst == nullptr) + return false; + + value = *stringConst->getSConst(); + + // Convenience. + if (convertToLower) + std::transform(value.begin(), value.end(), value.begin(), ::tolower); + + return true; +} + +// How many arguments were supplied? +int TAttributeArgs::size() const +{ + return args == nullptr ? 0 : (int)args->getSequence().size(); +} + +// Helper to get attribute const union. Returns nullptr on failure. +const TConstUnion* TAttributeArgs::getConstUnion(TBasicType basicType, int argNum) const +{ + if (args == nullptr) + return nullptr; + + if (argNum >= args->getSequence().size()) + return nullptr; + + const TConstUnion* constVal = &args->getSequence()[argNum]->getAsConstantUnion()->getConstArray()[0]; + if (constVal == nullptr || constVal->getType() != basicType) + return nullptr; + + return constVal; +} + +// Implementation of TParseContext parts of attributes +TAttributeType TParseContext::attributeFromName(const TString& name) const +{ + if (name == "branch" || name == "dont_flatten") + return EatBranch; + else if (name == "flatten") + return EatFlatten; + else if (name == "unroll") + return EatUnroll; + else if (name == "loop" || name == "dont_unroll") + return EatLoop; + else if (name == "dependency_infinite") + return EatDependencyInfinite; + else if (name == "dependency_length") + return EatDependencyLength; + else + return EatNone; +} + +// Make an initial leaf for the grammar from a no-argument attribute +TAttributes* TParseContext::makeAttributes(const TString& identifier) const +{ + TAttributes *attributes = nullptr; + attributes = NewPoolObject(attributes); + TAttributeArgs args = { attributeFromName(identifier), nullptr }; + attributes->push_back(args); + return attributes; +} + +// Make an initial leaf for the grammar from a one-argument attribute +TAttributes* TParseContext::makeAttributes(const TString& identifier, TIntermNode* node) const +{ + TAttributes *attributes = nullptr; + attributes = NewPoolObject(attributes); + + // for now, node is always a simple single expression, but other code expects + // a list, so make it so + TIntermAggregate* agg = intermediate.makeAggregate(node); + TAttributeArgs args = { attributeFromName(identifier), agg }; + attributes->push_back(args); + return attributes; +} + +// Merge two sets of attributes into a single set. +// The second argument is destructively consumed. +TAttributes* TParseContext::mergeAttributes(TAttributes* attr1, TAttributes* attr2) const +{ + attr1->splice(attr1->end(), *attr2); + return attr1; +} + +// +// Selection attributes +// +void TParseContext::handleSelectionAttributes(const TAttributes& attributes, TIntermNode* node) +{ + TIntermSelection* selection = node->getAsSelectionNode(); + if (selection == nullptr) + return; + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + if (it->size() > 0) { + warn(node->getLoc(), "attribute with arguments not recognized, skipping", "", ""); + continue; + } + + switch (it->name) { + case EatFlatten: + selection->setFlatten(); + break; + case EatBranch: + selection->setDontFlatten(); + break; + default: + warn(node->getLoc(), "attribute does not apply to a selection", "", ""); + break; + } + } +} + +// +// Switch attributes +// +void TParseContext::handleSwitchAttributes(const TAttributes& attributes, TIntermNode* node) +{ + TIntermSwitch* selection = node->getAsSwitchNode(); + if (selection == nullptr) + return; + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + if (it->size() > 0) { + warn(node->getLoc(), "attribute with arguments not recognized, skipping", "", ""); + continue; + } + + switch (it->name) { + case EatFlatten: + selection->setFlatten(); + break; + case EatBranch: + selection->setDontFlatten(); + break; + default: + warn(node->getLoc(), "attribute does not apply to a switch", "", ""); + break; + } + } +} + +// +// Loop attributes +// +void TParseContext::handleLoopAttributes(const TAttributes& attributes, TIntermNode* node) +{ + TIntermLoop* loop = node->getAsLoopNode(); + if (loop == nullptr) { + // the actual loop might be part of a sequence + TIntermAggregate* agg = node->getAsAggregate(); + if (agg == nullptr) + return; + for (auto it = agg->getSequence().begin(); it != agg->getSequence().end(); ++it) { + loop = (*it)->getAsLoopNode(); + if (loop != nullptr) + break; + } + if (loop == nullptr) + return; + } + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + if (it->name != EatDependencyLength && it->size() > 0) { + warn(node->getLoc(), "attribute with arguments not recognized, skipping", "", ""); + continue; + } + + int value; + switch (it->name) { + case EatUnroll: + loop->setUnroll(); + break; + case EatLoop: + loop->setDontUnroll(); + break; + case EatDependencyInfinite: + loop->setLoopDependency(TIntermLoop::dependencyInfinite); + break; + case EatDependencyLength: + if (it->size() == 1 && it->getInt(value)) { + if (value <= 0) + error(node->getLoc(), "must be positive", "dependency_length", ""); + loop->setLoopDependency(value); + } else + warn(node->getLoc(), "expected a single integer argument", "dependency_length", ""); + break; + default: + warn(node->getLoc(), "attribute does not apply to a loop", "", ""); + break; + } + } +} + + +} // end namespace glslang diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/attribute.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/attribute.h new file mode 100644 index 0000000..8d0c5bc --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/attribute.h @@ -0,0 +1,102 @@ +// +// Copyright (C) 2017 LunarG, Inc. +// Copyright (C) 2018 Google, Inc. +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + +#ifndef _ATTRIBUTE_INCLUDED_ +#define _ATTRIBUTE_INCLUDED_ + +#include "../Include/Common.h" +#include "../Include/ConstantUnion.h" + +namespace glslang { + + enum TAttributeType { + EatNone, + EatAllow_uav_condition, + EatBranch, + EatCall, + EatDomain, + EatEarlyDepthStencil, + EatFastOpt, + EatFlatten, + EatForceCase, + EatInstance, + EatMaxTessFactor, + EatNumThreads, + EatMaxVertexCount, + EatOutputControlPoints, + EatOutputTopology, + EatPartitioning, + EatPatchConstantFunc, + EatPatchSize, + EatUnroll, + EatLoop, + EatBinding, + EatGlobalBinding, + EatLocation, + EatInputAttachment, + EatBuiltIn, + EatPushConstant, + EatConstantId, + EatDependencyInfinite, + EatDependencyLength + }; + + class TIntermAggregate; + + struct TAttributeArgs { + TAttributeType name; + const TIntermAggregate* args; + + // Obtain attribute as integer + // Return false if it cannot be obtained + bool getInt(int& value, int argNum = 0) const; + + // Obtain attribute as string, with optional to-lower transform + // Return false if it cannot be obtained + bool getString(TString& value, int argNum = 0, bool convertToLower = true) const; + + // How many arguments were provided to the attribute? + int size() const; + + protected: + const TConstUnion* getConstUnion(TBasicType basicType, int argNum) const; + }; + + typedef TList TAttributes; + +} // end namespace glslang + +#endif // _ATTRIBUTE_INCLUDED_ diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/gl_types.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/gl_types.h index d7cb31f..ae00ae5 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/gl_types.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/gl_types.h @@ -21,6 +21,8 @@ ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ +#pragma once + #define GL_FLOAT 0x1406 #define GL_FLOAT_VEC2 0x8B50 #define GL_FLOAT_VEC3 0x8B51 diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang.y b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang.y index f2512b8..85be8f4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang.y +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang.y @@ -58,11 +58,14 @@ Jutta Degener, 1995 #include "SymbolTable.h" #include "ParseHelper.h" #include "../Public/ShaderLang.h" +#include "attribute.h" using namespace glslang; %} +%define parse.error verbose + %union { struct { glslang::TSourceLoc loc; @@ -84,6 +87,7 @@ using namespace glslang; TIntermNode* intermNode; glslang::TIntermNodePair nodePair; glslang::TIntermTyped* intermTypedNode; + glslang::TAttributes* attributes; }; union { glslang::TPublicType type; @@ -119,7 +123,7 @@ extern int yylex(YYSTYPE*, TParseContext&); %expect 1 // One shift reduce conflict because of if | else %token ATTRIBUTE VARYING -%token CONST BOOL FLOAT DOUBLE INT UINT INT64_T UINT64_T FLOAT16_T +%token CONST BOOL FLOAT DOUBLE INT UINT INT64_T UINT64_T INT16_T UINT16_T FLOAT16_T %token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT SUBROUTINE %token BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 I64VEC2 I64VEC3 I64VEC4 UVEC2 UVEC3 UVEC4 U64VEC2 U64VEC3 U64VEC4 VEC2 VEC3 VEC4 %token MAT2 MAT3 MAT4 CENTROID IN OUT INOUT @@ -127,6 +131,7 @@ extern int yylex(YYSTYPE*, TParseContext&); %token COHERENT VOLATILE RESTRICT READONLY WRITEONLY %token DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4 %token F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4 +%token I16VEC2 I16VEC3 I16VEC4 U16VEC2 U16VEC3 U16VEC4 %token NOPERSPECTIVE FLAT SMOOTH LAYOUT __EXPLICITINTERPAMD %token MAT2X2 MAT2X3 MAT2X4 @@ -186,7 +191,7 @@ extern int yylex(YYSTYPE*, TParseContext&); %token STRUCT VOID WHILE %token IDENTIFIER TYPE_NAME -%token FLOATCONSTANT DOUBLECONSTANT INTCONSTANT UINTCONSTANT INT64CONSTANT UINT64CONSTANT BOOLCONSTANT FLOAT16CONSTANT +%token FLOATCONSTANT DOUBLECONSTANT INTCONSTANT UINTCONSTANT INT64CONSTANT UINT64CONSTANT INT16CONSTANT UINT16CONSTANT BOOLCONSTANT FLOAT16CONSTANT %token LEFT_OP RIGHT_OP %token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP %token AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN @@ -215,12 +220,12 @@ extern int yylex(YYSTYPE*, TParseContext&); %type translation_unit function_definition %type statement simple_statement %type statement_list switch_statement_list compound_statement -%type declaration_statement selection_statement expression_statement -%type switch_statement case_label +%type declaration_statement selection_statement selection_statement_nonattributed expression_statement +%type switch_statement switch_statement_nonattributed case_label %type declaration external_declaration %type for_init_statement compound_statement_no_new_scope %type selection_rest_statement for_rest_statement -%type iteration_statement jump_statement statement_no_new_scope statement_scoped +%type iteration_statement iteration_statement_nonattributed jump_statement statement_no_new_scope statement_scoped %type single_declaration init_declarator_list %type parameter_declaration parameter_declarator parameter_type_specifier @@ -243,6 +248,8 @@ extern int yylex(YYSTYPE*, TParseContext&); %type identifier_list +%type attribute attribute_list single_attribute + %start translation_unit %% @@ -271,6 +278,18 @@ primary_expression parseContext.int64Check($1.loc, "64-bit unsigned integer literal"); $$ = parseContext.intermediate.addConstantUnion($1.u64, $1.loc, true); } + | INT16CONSTANT { +#ifdef AMD_EXTENSIONS + parseContext.int16Check($1.loc, "16-bit integer literal"); + $$ = parseContext.intermediate.addConstantUnion((short)$1.i, $1.loc, true); +#endif + } + | UINT16CONSTANT { +#ifdef AMD_EXTENSIONS + parseContext.int16Check($1.loc, "16-bit unsigned integer literal"); + $$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true); +#endif + } | FLOATCONSTANT { $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); } @@ -845,6 +864,11 @@ function_header // Add the function as a prototype after parsing it (we do not support recursion) TFunction *function; TType type($1); + + // Potentially rename shader entry point function. No-op most of the time. + parseContext.renameShaderFunction($2.string); + + // Make the function function = new TFunction($2.string, type); $$ = function; } @@ -878,9 +902,9 @@ parameter_declarator parseContext.arraySizeRequiredCheck($3.loc, *$3.arraySizes); parseContext.reservedErrorCheck($2.loc, *$2.string); - $1.arraySizes = $3.arraySizes; - TParameter param = { $2.string, new TType($1)}; + parseContext.arrayDimMerge(*param.type, $3.arraySizes); + $$.loc = $2.loc; $$.param = param; } @@ -1229,6 +1253,7 @@ storage_qualifier $$.qualifier.storage = EvqBuffer; } | SHARED { + parseContext.globalCheck($1.loc, "shared"); parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared"); parseContext.requireStage($1.loc, EShLangCompute, "shared"); @@ -1258,25 +1283,25 @@ storage_qualifier | SUBROUTINE { parseContext.spvRemoved($1.loc, "subroutine"); parseContext.globalCheck($1.loc, "subroutine"); + parseContext.unimplemented($1.loc, "subroutine"); $$.init($1.loc); - $$.qualifier.storage = EvqUniform; } | SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN { parseContext.spvRemoved($1.loc, "subroutine"); parseContext.globalCheck($1.loc, "subroutine"); + parseContext.unimplemented($1.loc, "subroutine"); $$.init($1.loc); - $$.qualifier.storage = EvqUniform; - // TODO: 4.0 semantics: subroutines - // 1) make sure each identifier is a type declared earlier with SUBROUTINE - // 2) save all of the identifiers for future comparison with the declared function } ; type_name_list - : TYPE_NAME { - // TODO: 4.0 functionality: subroutine type to list + : IDENTIFIER { + // TODO } - | type_name_list COMMA TYPE_NAME { + | type_name_list COMMA IDENTIFIER { + // TODO: 4.0 semantics: subroutines + // 1) make sure each identifier is a type declared earlier with SUBROUTINE + // 2) save all of the identifiers for future comparison with the declared function } ; @@ -1360,6 +1385,20 @@ type_specifier_nonarray $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtUint64; } + | INT16_T { +#ifdef AMD_EXTENSIONS + parseContext.int16Check($1.loc, "16-bit integer", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt16; +#endif + } + | UINT16_T { +#ifdef AMD_EXTENSIONS + parseContext.int16Check($1.loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint16; +#endif + } | BOOL { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtBool; @@ -1469,6 +1508,30 @@ type_specifier_nonarray $$.basicType = EbtInt64; $$.setVector(4); } + | I16VEC2 { +#ifdef AMD_EXTENSIONS + parseContext.int16Check($1.loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt16; + $$.setVector(2); +#endif + } + | I16VEC3 { +#ifdef AMD_EXTENSIONS + parseContext.int16Check($1.loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt16; + $$.setVector(3); +#endif + } + | I16VEC4 { +#ifdef AMD_EXTENSIONS + parseContext.int16Check($1.loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtInt16; + $$.setVector(4); +#endif + } | UVEC2 { parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); @@ -1505,6 +1568,30 @@ type_specifier_nonarray $$.basicType = EbtUint64; $$.setVector(4); } + | U16VEC2 { +#ifdef AMD_EXTENSIONS + parseContext.int16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint16; + $$.setVector(2); +#endif + } + | U16VEC3 { +#ifdef AMD_EXTENSIONS + parseContext.int16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint16; + $$.setVector(3); +#endif + } + | U16VEC4 { +#ifdef AMD_EXTENSIONS + parseContext.int16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtUint16; + $$.setVector(4); +#endif + } | MAT2 { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat; @@ -2590,6 +2677,15 @@ expression_statement ; selection_statement + : selection_statement_nonattributed { + $$ = $1; + } + | attribute selection_statement_nonattributed { + parseContext.handleSelectionAttributes(*$1, $2); + $$ = $2; + } + +selection_statement_nonattributed : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement { parseContext.boolCheck($1.loc, $3); $$ = parseContext.intermediate.addSelection($3, $5, $1.loc); @@ -2626,6 +2722,15 @@ condition ; switch_statement + : switch_statement_nonattributed { + $$ = $1; + } + | attribute switch_statement_nonattributed { + parseContext.handleSwitchAttributes(*$1, $2); + $$ = $2; + } + +switch_statement_nonattributed : SWITCH LEFT_PAREN expression RIGHT_PAREN { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; @@ -2679,6 +2784,15 @@ case_label ; iteration_statement + : iteration_statement_nonattributed { + $$ = $1; + } + | attribute iteration_statement_nonattributed { + parseContext.handleLoopAttributes(*$1, $2); + $$ = $2; + } + +iteration_statement_nonattributed : WHILE LEFT_PAREN { if (! parseContext.limits.whileLoops) parseContext.error($1.loc, "while loops not available", "limitation", ""); @@ -2775,7 +2889,7 @@ jump_statement if (parseContext.currentFunctionType->getBasicType() != EbtVoid) parseContext.error($1.loc, "non-void function must return a value", "return", ""); if (parseContext.inMain) - parseContext.postMainReturn = true; + parseContext.postEntryPointReturn = true; } | RETURN expression SEMICOLON { $$ = parseContext.handleReturnValue($1.loc, $2); @@ -2794,8 +2908,10 @@ translation_unit parseContext.intermediate.setTreeRoot($$); } | translation_unit external_declaration { - $$ = parseContext.intermediate.growAggregate($1, $2); - parseContext.intermediate.setTreeRoot($$); + if ($2 != nullptr) { + $$ = parseContext.intermediate.growAggregate($1, $2); + parseContext.intermediate.setTreeRoot($$); + } } ; @@ -2806,6 +2922,11 @@ external_declaration | declaration { $$ = $1; } + | SEMICOLON { + parseContext.requireProfile($1.loc, ~EEsProfile, "extraneous semicolon"); + parseContext.profileRequires($1.loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); + $$ = nullptr; + } ; function_definition @@ -2826,8 +2947,30 @@ function_definition // information. This information can be queried from the parse tree $$->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize); $$->getAsAggregate()->setDebug(parseContext.contextPragma.debug); - $$->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable); + $$->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable); } ; +attribute + : LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET { + $$ = $3; + parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_control_flow_attributes, "attribute"); + } + +attribute_list + : single_attribute { + $$ = $1; + } + | attribute_list COMMA single_attribute { + $$ = parseContext.mergeAttributes($1, $3); + } + +single_attribute + : IDENTIFIER { + $$ = parseContext.makeAttributes(*$1.string); + } + | IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN { + $$ = parseContext.makeAttributes(*$1.string, $3); + } + %% diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp index 3507c04..6e372d5 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7" +#define YYBISON_VERSION "3.0" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -62,8 +62,7 @@ /* Copy the first part of user declarations. */ -/* Line 371 of yacc.c */ -#line 41 "glslang.y" +#line 41 "MachineIndependent/glslang.y" /* yacc.c:339 */ /* Based on: @@ -84,12 +83,12 @@ Jutta Degener, 1995 #include "SymbolTable.h" #include "ParseHelper.h" #include "../Public/ShaderLang.h" +#include "attribute.h" using namespace glslang; -/* Line 371 of yacc.c */ -#line 93 "glslang_tab.cpp" +#line 92 "MachineIndependent/glslang_tab.cpp" /* yacc.c:339 */ # ifndef YY_NULL # if defined __cplusplus && 201103L <= __cplusplus @@ -104,14 +103,14 @@ using namespace glslang; # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else -# define YYERROR_VERBOSE 0 +# define YYERROR_VERBOSE 1 #endif /* In a future release of Bison, this section will be replaced by #include "glslang_tab.cpp.h". */ -#ifndef YY_YY_GLSLANG_TAB_CPP_H_INCLUDED -# define YY_YY_GLSLANG_TAB_CPP_H_INCLUDED -/* Enabling traces. */ +#ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED +# define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 1 #endif @@ -119,306 +118,315 @@ using namespace glslang; extern int yydebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ATTRIBUTE = 258, - VARYING = 259, - CONST = 260, - BOOL = 261, - FLOAT = 262, - DOUBLE = 263, - INT = 264, - UINT = 265, - INT64_T = 266, - UINT64_T = 267, - FLOAT16_T = 268, - BREAK = 269, - CONTINUE = 270, - DO = 271, - ELSE = 272, - FOR = 273, - IF = 274, - DISCARD = 275, - RETURN = 276, - SWITCH = 277, - CASE = 278, - DEFAULT = 279, - SUBROUTINE = 280, - BVEC2 = 281, - BVEC3 = 282, - BVEC4 = 283, - IVEC2 = 284, - IVEC3 = 285, - IVEC4 = 286, - I64VEC2 = 287, - I64VEC3 = 288, - I64VEC4 = 289, - UVEC2 = 290, - UVEC3 = 291, - UVEC4 = 292, - U64VEC2 = 293, - U64VEC3 = 294, - U64VEC4 = 295, - VEC2 = 296, - VEC3 = 297, - VEC4 = 298, - MAT2 = 299, - MAT3 = 300, - MAT4 = 301, - CENTROID = 302, - IN = 303, - OUT = 304, - INOUT = 305, - UNIFORM = 306, - PATCH = 307, - SAMPLE = 308, - BUFFER = 309, - SHARED = 310, - COHERENT = 311, - VOLATILE = 312, - RESTRICT = 313, - READONLY = 314, - WRITEONLY = 315, - DVEC2 = 316, - DVEC3 = 317, - DVEC4 = 318, - DMAT2 = 319, - DMAT3 = 320, - DMAT4 = 321, - F16VEC2 = 322, - F16VEC3 = 323, - F16VEC4 = 324, - F16MAT2 = 325, - F16MAT3 = 326, - F16MAT4 = 327, - NOPERSPECTIVE = 328, - FLAT = 329, - SMOOTH = 330, - LAYOUT = 331, - __EXPLICITINTERPAMD = 332, - MAT2X2 = 333, - MAT2X3 = 334, - MAT2X4 = 335, - MAT3X2 = 336, - MAT3X3 = 337, - MAT3X4 = 338, - MAT4X2 = 339, - MAT4X3 = 340, - MAT4X4 = 341, - DMAT2X2 = 342, - DMAT2X3 = 343, - DMAT2X4 = 344, - DMAT3X2 = 345, - DMAT3X3 = 346, - DMAT3X4 = 347, - DMAT4X2 = 348, - DMAT4X3 = 349, - DMAT4X4 = 350, - F16MAT2X2 = 351, - F16MAT2X3 = 352, - F16MAT2X4 = 353, - F16MAT3X2 = 354, - F16MAT3X3 = 355, - F16MAT3X4 = 356, - F16MAT4X2 = 357, - F16MAT4X3 = 358, - F16MAT4X4 = 359, - ATOMIC_UINT = 360, - SAMPLER1D = 361, - SAMPLER2D = 362, - SAMPLER3D = 363, - SAMPLERCUBE = 364, - SAMPLER1DSHADOW = 365, - SAMPLER2DSHADOW = 366, - SAMPLERCUBESHADOW = 367, - SAMPLER1DARRAY = 368, - SAMPLER2DARRAY = 369, - SAMPLER1DARRAYSHADOW = 370, - SAMPLER2DARRAYSHADOW = 371, - ISAMPLER1D = 372, - ISAMPLER2D = 373, - ISAMPLER3D = 374, - ISAMPLERCUBE = 375, - ISAMPLER1DARRAY = 376, - ISAMPLER2DARRAY = 377, - USAMPLER1D = 378, - USAMPLER2D = 379, - USAMPLER3D = 380, - USAMPLERCUBE = 381, - USAMPLER1DARRAY = 382, - USAMPLER2DARRAY = 383, - SAMPLER2DRECT = 384, - SAMPLER2DRECTSHADOW = 385, - ISAMPLER2DRECT = 386, - USAMPLER2DRECT = 387, - SAMPLERBUFFER = 388, - ISAMPLERBUFFER = 389, - USAMPLERBUFFER = 390, - SAMPLERCUBEARRAY = 391, - SAMPLERCUBEARRAYSHADOW = 392, - ISAMPLERCUBEARRAY = 393, - USAMPLERCUBEARRAY = 394, - SAMPLER2DMS = 395, - ISAMPLER2DMS = 396, - USAMPLER2DMS = 397, - SAMPLER2DMSARRAY = 398, - ISAMPLER2DMSARRAY = 399, - USAMPLER2DMSARRAY = 400, - SAMPLEREXTERNALOES = 401, - SAMPLER = 402, - SAMPLERSHADOW = 403, - TEXTURE1D = 404, - TEXTURE2D = 405, - TEXTURE3D = 406, - TEXTURECUBE = 407, - TEXTURE1DARRAY = 408, - TEXTURE2DARRAY = 409, - ITEXTURE1D = 410, - ITEXTURE2D = 411, - ITEXTURE3D = 412, - ITEXTURECUBE = 413, - ITEXTURE1DARRAY = 414, - ITEXTURE2DARRAY = 415, - UTEXTURE1D = 416, - UTEXTURE2D = 417, - UTEXTURE3D = 418, - UTEXTURECUBE = 419, - UTEXTURE1DARRAY = 420, - UTEXTURE2DARRAY = 421, - TEXTURE2DRECT = 422, - ITEXTURE2DRECT = 423, - UTEXTURE2DRECT = 424, - TEXTUREBUFFER = 425, - ITEXTUREBUFFER = 426, - UTEXTUREBUFFER = 427, - TEXTURECUBEARRAY = 428, - ITEXTURECUBEARRAY = 429, - UTEXTURECUBEARRAY = 430, - TEXTURE2DMS = 431, - ITEXTURE2DMS = 432, - UTEXTURE2DMS = 433, - TEXTURE2DMSARRAY = 434, - ITEXTURE2DMSARRAY = 435, - UTEXTURE2DMSARRAY = 436, - SUBPASSINPUT = 437, - SUBPASSINPUTMS = 438, - ISUBPASSINPUT = 439, - ISUBPASSINPUTMS = 440, - USUBPASSINPUT = 441, - USUBPASSINPUTMS = 442, - IMAGE1D = 443, - IIMAGE1D = 444, - UIMAGE1D = 445, - IMAGE2D = 446, - IIMAGE2D = 447, - UIMAGE2D = 448, - IMAGE3D = 449, - IIMAGE3D = 450, - UIMAGE3D = 451, - IMAGE2DRECT = 452, - IIMAGE2DRECT = 453, - UIMAGE2DRECT = 454, - IMAGECUBE = 455, - IIMAGECUBE = 456, - UIMAGECUBE = 457, - IMAGEBUFFER = 458, - IIMAGEBUFFER = 459, - UIMAGEBUFFER = 460, - IMAGE1DARRAY = 461, - IIMAGE1DARRAY = 462, - UIMAGE1DARRAY = 463, - IMAGE2DARRAY = 464, - IIMAGE2DARRAY = 465, - UIMAGE2DARRAY = 466, - IMAGECUBEARRAY = 467, - IIMAGECUBEARRAY = 468, - UIMAGECUBEARRAY = 469, - IMAGE2DMS = 470, - IIMAGE2DMS = 471, - UIMAGE2DMS = 472, - IMAGE2DMSARRAY = 473, - IIMAGE2DMSARRAY = 474, - UIMAGE2DMSARRAY = 475, - STRUCT = 476, - VOID = 477, - WHILE = 478, - IDENTIFIER = 479, - TYPE_NAME = 480, - FLOATCONSTANT = 481, - DOUBLECONSTANT = 482, - INTCONSTANT = 483, - UINTCONSTANT = 484, - INT64CONSTANT = 485, - UINT64CONSTANT = 486, - BOOLCONSTANT = 487, - FLOAT16CONSTANT = 488, - LEFT_OP = 489, - RIGHT_OP = 490, - INC_OP = 491, - DEC_OP = 492, - LE_OP = 493, - GE_OP = 494, - EQ_OP = 495, - NE_OP = 496, - AND_OP = 497, - OR_OP = 498, - XOR_OP = 499, - MUL_ASSIGN = 500, - DIV_ASSIGN = 501, - ADD_ASSIGN = 502, - MOD_ASSIGN = 503, - LEFT_ASSIGN = 504, - RIGHT_ASSIGN = 505, - AND_ASSIGN = 506, - XOR_ASSIGN = 507, - OR_ASSIGN = 508, - SUB_ASSIGN = 509, - LEFT_PAREN = 510, - RIGHT_PAREN = 511, - LEFT_BRACKET = 512, - RIGHT_BRACKET = 513, - LEFT_BRACE = 514, - RIGHT_BRACE = 515, - DOT = 516, - COMMA = 517, - COLON = 518, - EQUAL = 519, - SEMICOLON = 520, - BANG = 521, - DASH = 522, - TILDE = 523, - PLUS = 524, - STAR = 525, - SLASH = 526, - PERCENT = 527, - LEFT_ANGLE = 528, - RIGHT_ANGLE = 529, - VERTICAL_BAR = 530, - CARET = 531, - AMPERSAND = 532, - QUESTION = 533, - INVARIANT = 534, - PRECISE = 535, - HIGH_PRECISION = 536, - MEDIUM_PRECISION = 537, - LOW_PRECISION = 538, - PRECISION = 539, - PACKED = 540, - RESOURCE = 541, - SUPERP = 542 - }; + enum yytokentype + { + ATTRIBUTE = 258, + VARYING = 259, + CONST = 260, + BOOL = 261, + FLOAT = 262, + DOUBLE = 263, + INT = 264, + UINT = 265, + INT64_T = 266, + UINT64_T = 267, + INT16_T = 268, + UINT16_T = 269, + FLOAT16_T = 270, + BREAK = 271, + CONTINUE = 272, + DO = 273, + ELSE = 274, + FOR = 275, + IF = 276, + DISCARD = 277, + RETURN = 278, + SWITCH = 279, + CASE = 280, + DEFAULT = 281, + SUBROUTINE = 282, + BVEC2 = 283, + BVEC3 = 284, + BVEC4 = 285, + IVEC2 = 286, + IVEC3 = 287, + IVEC4 = 288, + I64VEC2 = 289, + I64VEC3 = 290, + I64VEC4 = 291, + UVEC2 = 292, + UVEC3 = 293, + UVEC4 = 294, + U64VEC2 = 295, + U64VEC3 = 296, + U64VEC4 = 297, + VEC2 = 298, + VEC3 = 299, + VEC4 = 300, + MAT2 = 301, + MAT3 = 302, + MAT4 = 303, + CENTROID = 304, + IN = 305, + OUT = 306, + INOUT = 307, + UNIFORM = 308, + PATCH = 309, + SAMPLE = 310, + BUFFER = 311, + SHARED = 312, + COHERENT = 313, + VOLATILE = 314, + RESTRICT = 315, + READONLY = 316, + WRITEONLY = 317, + DVEC2 = 318, + DVEC3 = 319, + DVEC4 = 320, + DMAT2 = 321, + DMAT3 = 322, + DMAT4 = 323, + F16VEC2 = 324, + F16VEC3 = 325, + F16VEC4 = 326, + F16MAT2 = 327, + F16MAT3 = 328, + F16MAT4 = 329, + I16VEC2 = 330, + I16VEC3 = 331, + I16VEC4 = 332, + U16VEC2 = 333, + U16VEC3 = 334, + U16VEC4 = 335, + NOPERSPECTIVE = 336, + FLAT = 337, + SMOOTH = 338, + LAYOUT = 339, + __EXPLICITINTERPAMD = 340, + MAT2X2 = 341, + MAT2X3 = 342, + MAT2X4 = 343, + MAT3X2 = 344, + MAT3X3 = 345, + MAT3X4 = 346, + MAT4X2 = 347, + MAT4X3 = 348, + MAT4X4 = 349, + DMAT2X2 = 350, + DMAT2X3 = 351, + DMAT2X4 = 352, + DMAT3X2 = 353, + DMAT3X3 = 354, + DMAT3X4 = 355, + DMAT4X2 = 356, + DMAT4X3 = 357, + DMAT4X4 = 358, + F16MAT2X2 = 359, + F16MAT2X3 = 360, + F16MAT2X4 = 361, + F16MAT3X2 = 362, + F16MAT3X3 = 363, + F16MAT3X4 = 364, + F16MAT4X2 = 365, + F16MAT4X3 = 366, + F16MAT4X4 = 367, + ATOMIC_UINT = 368, + SAMPLER1D = 369, + SAMPLER2D = 370, + SAMPLER3D = 371, + SAMPLERCUBE = 372, + SAMPLER1DSHADOW = 373, + SAMPLER2DSHADOW = 374, + SAMPLERCUBESHADOW = 375, + SAMPLER1DARRAY = 376, + SAMPLER2DARRAY = 377, + SAMPLER1DARRAYSHADOW = 378, + SAMPLER2DARRAYSHADOW = 379, + ISAMPLER1D = 380, + ISAMPLER2D = 381, + ISAMPLER3D = 382, + ISAMPLERCUBE = 383, + ISAMPLER1DARRAY = 384, + ISAMPLER2DARRAY = 385, + USAMPLER1D = 386, + USAMPLER2D = 387, + USAMPLER3D = 388, + USAMPLERCUBE = 389, + USAMPLER1DARRAY = 390, + USAMPLER2DARRAY = 391, + SAMPLER2DRECT = 392, + SAMPLER2DRECTSHADOW = 393, + ISAMPLER2DRECT = 394, + USAMPLER2DRECT = 395, + SAMPLERBUFFER = 396, + ISAMPLERBUFFER = 397, + USAMPLERBUFFER = 398, + SAMPLERCUBEARRAY = 399, + SAMPLERCUBEARRAYSHADOW = 400, + ISAMPLERCUBEARRAY = 401, + USAMPLERCUBEARRAY = 402, + SAMPLER2DMS = 403, + ISAMPLER2DMS = 404, + USAMPLER2DMS = 405, + SAMPLER2DMSARRAY = 406, + ISAMPLER2DMSARRAY = 407, + USAMPLER2DMSARRAY = 408, + SAMPLEREXTERNALOES = 409, + SAMPLER = 410, + SAMPLERSHADOW = 411, + TEXTURE1D = 412, + TEXTURE2D = 413, + TEXTURE3D = 414, + TEXTURECUBE = 415, + TEXTURE1DARRAY = 416, + TEXTURE2DARRAY = 417, + ITEXTURE1D = 418, + ITEXTURE2D = 419, + ITEXTURE3D = 420, + ITEXTURECUBE = 421, + ITEXTURE1DARRAY = 422, + ITEXTURE2DARRAY = 423, + UTEXTURE1D = 424, + UTEXTURE2D = 425, + UTEXTURE3D = 426, + UTEXTURECUBE = 427, + UTEXTURE1DARRAY = 428, + UTEXTURE2DARRAY = 429, + TEXTURE2DRECT = 430, + ITEXTURE2DRECT = 431, + UTEXTURE2DRECT = 432, + TEXTUREBUFFER = 433, + ITEXTUREBUFFER = 434, + UTEXTUREBUFFER = 435, + TEXTURECUBEARRAY = 436, + ITEXTURECUBEARRAY = 437, + UTEXTURECUBEARRAY = 438, + TEXTURE2DMS = 439, + ITEXTURE2DMS = 440, + UTEXTURE2DMS = 441, + TEXTURE2DMSARRAY = 442, + ITEXTURE2DMSARRAY = 443, + UTEXTURE2DMSARRAY = 444, + SUBPASSINPUT = 445, + SUBPASSINPUTMS = 446, + ISUBPASSINPUT = 447, + ISUBPASSINPUTMS = 448, + USUBPASSINPUT = 449, + USUBPASSINPUTMS = 450, + IMAGE1D = 451, + IIMAGE1D = 452, + UIMAGE1D = 453, + IMAGE2D = 454, + IIMAGE2D = 455, + UIMAGE2D = 456, + IMAGE3D = 457, + IIMAGE3D = 458, + UIMAGE3D = 459, + IMAGE2DRECT = 460, + IIMAGE2DRECT = 461, + UIMAGE2DRECT = 462, + IMAGECUBE = 463, + IIMAGECUBE = 464, + UIMAGECUBE = 465, + IMAGEBUFFER = 466, + IIMAGEBUFFER = 467, + UIMAGEBUFFER = 468, + IMAGE1DARRAY = 469, + IIMAGE1DARRAY = 470, + UIMAGE1DARRAY = 471, + IMAGE2DARRAY = 472, + IIMAGE2DARRAY = 473, + UIMAGE2DARRAY = 474, + IMAGECUBEARRAY = 475, + IIMAGECUBEARRAY = 476, + UIMAGECUBEARRAY = 477, + IMAGE2DMS = 478, + IIMAGE2DMS = 479, + UIMAGE2DMS = 480, + IMAGE2DMSARRAY = 481, + IIMAGE2DMSARRAY = 482, + UIMAGE2DMSARRAY = 483, + STRUCT = 484, + VOID = 485, + WHILE = 486, + IDENTIFIER = 487, + TYPE_NAME = 488, + FLOATCONSTANT = 489, + DOUBLECONSTANT = 490, + INTCONSTANT = 491, + UINTCONSTANT = 492, + INT64CONSTANT = 493, + UINT64CONSTANT = 494, + INT16CONSTANT = 495, + UINT16CONSTANT = 496, + BOOLCONSTANT = 497, + FLOAT16CONSTANT = 498, + LEFT_OP = 499, + RIGHT_OP = 500, + INC_OP = 501, + DEC_OP = 502, + LE_OP = 503, + GE_OP = 504, + EQ_OP = 505, + NE_OP = 506, + AND_OP = 507, + OR_OP = 508, + XOR_OP = 509, + MUL_ASSIGN = 510, + DIV_ASSIGN = 511, + ADD_ASSIGN = 512, + MOD_ASSIGN = 513, + LEFT_ASSIGN = 514, + RIGHT_ASSIGN = 515, + AND_ASSIGN = 516, + XOR_ASSIGN = 517, + OR_ASSIGN = 518, + SUB_ASSIGN = 519, + LEFT_PAREN = 520, + RIGHT_PAREN = 521, + LEFT_BRACKET = 522, + RIGHT_BRACKET = 523, + LEFT_BRACE = 524, + RIGHT_BRACE = 525, + DOT = 526, + COMMA = 527, + COLON = 528, + EQUAL = 529, + SEMICOLON = 530, + BANG = 531, + DASH = 532, + TILDE = 533, + PLUS = 534, + STAR = 535, + SLASH = 536, + PERCENT = 537, + LEFT_ANGLE = 538, + RIGHT_ANGLE = 539, + VERTICAL_BAR = 540, + CARET = 541, + AMPERSAND = 542, + QUESTION = 543, + INVARIANT = 544, + PRECISE = 545, + HIGH_PRECISION = 546, + MEDIUM_PRECISION = 547, + LOW_PRECISION = 548, + PRECISION = 549, + PACKED = 550, + RESOURCE = 551, + SUPERP = 552 + }; #endif - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { -/* Line 387 of yacc.c */ -#line 66 "glslang.y" +#line 69 "MachineIndependent/glslang.y" /* yacc.c:355 */ struct { glslang::TSourceLoc loc; @@ -440,6 +448,7 @@ typedef union YYSTYPE TIntermNode* intermNode; glslang::TIntermNodePair nodePair; glslang::TIntermTyped* intermTypedNode; + glslang::TAttributes* attributes; }; union { glslang::TPublicType type; @@ -452,35 +461,20 @@ typedef union YYSTYPE }; } interm; - -/* Line 387 of yacc.c */ -#line 458 "glslang_tab.cpp" -} YYSTYPE; +#line 465 "MachineIndependent/glslang_tab.cpp" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (glslang::TParseContext* pParseContext); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ -#endif /* !YY_YY_GLSLANG_TAB_CPP_H_INCLUDED */ +int yyparse (glslang::TParseContext* pParseContext); + +#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ /* Copy the second part of user declarations. */ -/* Line 390 of yacc.c */ -#line 100 "glslang.y" +#line 104 "MachineIndependent/glslang.y" /* yacc.c:358 */ /* windows only pragma */ @@ -496,8 +490,7 @@ int yyparse (); extern int yylex(YYSTYPE*, TParseContext&); -/* Line 390 of yacc.c */ -#line 501 "glslang_tab.cpp" +#line 494 "MachineIndependent/glslang_tab.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -511,11 +504,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -535,8 +525,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -558,6 +547,14 @@ typedef short int yytype_int16; # endif #endif +#ifndef __attribute__ +/* This feature is available in gcc versions 2.5 and later. */ +# if (! defined __GNUC__ || __GNUC__ < 2 \ + || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) +# define __attribute__(Spec) /* empty */ +# endif +#endif + /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) @@ -565,23 +562,25 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + #if ! defined yyoverflow || YYERROR_VERBOSE @@ -600,8 +599,7 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -613,8 +611,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -630,7 +628,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -638,15 +636,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -656,7 +652,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -681,16 +677,16 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif @@ -709,33 +705,35 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 265 +#define YYFINAL 274 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 6373 +#define YYLAST 6633 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 288 +#define YYNTOKENS 298 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 100 +#define YYNNTS 106 /* YYNRULES -- Number of rules. */ -#define YYNRULES 439 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 571 +#define YYNRULES 461 +/* YYNSTATES -- Number of states. */ +#define YYNSTATES 601 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 542 +#define YYMAXUTOK 552 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint16 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -792,259 +790,99 @@ static const yytype_uint16 yytranslate[] = 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287 + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297 }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, - 19, 21, 23, 27, 29, 34, 36, 40, 43, 46, - 48, 50, 52, 55, 58, 61, 63, 66, 70, 73, - 75, 77, 79, 82, 85, 88, 90, 92, 94, 96, - 98, 102, 106, 110, 112, 116, 120, 122, 126, 130, - 132, 136, 140, 144, 148, 150, 154, 158, 160, 164, - 166, 170, 172, 176, 178, 182, 184, 188, 190, 194, - 196, 197, 204, 206, 210, 212, 214, 216, 218, 220, - 222, 224, 226, 228, 230, 232, 234, 238, 240, 243, - 246, 251, 254, 258, 263, 266, 270, 275, 276, 283, - 286, 290, 293, 295, 297, 300, 304, 308, 311, 315, - 318, 320, 323, 325, 327, 329, 333, 338, 345, 351, - 353, 356, 360, 366, 371, 373, 376, 378, 380, 382, - 384, 386, 391, 393, 397, 399, 403, 405, 407, 409, - 412, 414, 416, 418, 420, 422, 424, 426, 428, 430, - 432, 434, 436, 438, 440, 442, 444, 446, 448, 450, - 452, 454, 456, 458, 460, 465, 467, 471, 473, 476, - 479, 483, 487, 492, 494, 496, 498, 500, 502, 504, - 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, - 526, 528, 530, 532, 534, 536, 538, 540, 542, 544, - 546, 548, 550, 552, 554, 556, 558, 560, 562, 564, - 566, 568, 570, 572, 574, 576, 578, 580, 582, 584, - 586, 588, 590, 592, 594, 596, 598, 600, 602, 604, - 606, 608, 610, 612, 614, 616, 618, 620, 622, 624, - 626, 628, 630, 632, 634, 636, 638, 640, 642, 644, - 646, 648, 650, 652, 654, 656, 658, 660, 662, 664, - 666, 668, 670, 672, 674, 676, 678, 680, 682, 684, - 686, 688, 690, 692, 694, 696, 698, 700, 702, 704, - 706, 708, 710, 712, 714, 716, 718, 720, 722, 724, - 726, 728, 730, 732, 734, 736, 738, 740, 742, 744, - 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, - 766, 768, 770, 772, 774, 776, 778, 780, 782, 784, - 786, 788, 790, 792, 794, 796, 798, 800, 802, 804, - 806, 808, 810, 812, 814, 816, 818, 820, 822, 824, - 826, 828, 830, 832, 834, 836, 838, 840, 842, 844, - 846, 848, 850, 852, 854, 856, 858, 860, 862, 864, - 866, 868, 870, 872, 873, 880, 881, 887, 889, 892, - 896, 901, 903, 907, 909, 912, 914, 918, 923, 925, - 929, 931, 933, 935, 937, 939, 941, 943, 945, 947, - 949, 952, 953, 954, 960, 962, 964, 965, 968, 969, - 972, 975, 979, 981, 984, 986, 989, 995, 999, 1001, - 1003, 1008, 1009, 1018, 1019, 1021, 1025, 1028, 1029, 1036, - 1037, 1046, 1047, 1055, 1057, 1059, 1061, 1062, 1065, 1069, - 1072, 1075, 1078, 1082, 1085, 1087, 1090, 1092, 1094, 1095 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = -{ - 384, 0, -1, 224, -1, 289, -1, 228, -1, 229, - -1, 230, -1, 231, -1, 226, -1, 227, -1, 233, - -1, 232, -1, 255, 317, 256, -1, 290, -1, 291, - 257, 292, 258, -1, 293, -1, 291, 261, 224, -1, - 291, 236, -1, 291, 237, -1, 317, -1, 294, -1, - 295, -1, 297, 256, -1, 296, 256, -1, 298, 222, - -1, 298, -1, 298, 315, -1, 297, 262, 315, -1, - 299, 255, -1, 343, -1, 291, -1, 291, -1, 236, - 300, -1, 237, 300, -1, 301, 300, -1, 269, -1, - 267, -1, 266, -1, 268, -1, 300, -1, 302, 270, - 300, -1, 302, 271, 300, -1, 302, 272, 300, -1, - 302, -1, 303, 269, 302, -1, 303, 267, 302, -1, - 303, -1, 304, 234, 303, -1, 304, 235, 303, -1, - 304, -1, 305, 273, 304, -1, 305, 274, 304, -1, - 305, 238, 304, -1, 305, 239, 304, -1, 305, -1, - 306, 240, 305, -1, 306, 241, 305, -1, 306, -1, - 307, 277, 306, -1, 307, -1, 308, 276, 307, -1, - 308, -1, 309, 275, 308, -1, 309, -1, 310, 242, - 309, -1, 310, -1, 311, 244, 310, -1, 311, -1, - 312, 243, 311, -1, 312, -1, -1, 312, 278, 314, - 317, 263, 315, -1, 313, -1, 300, 316, 315, -1, - 264, -1, 245, -1, 246, -1, 248, -1, 247, -1, - 254, -1, 249, -1, 250, -1, 251, -1, 252, -1, - 253, -1, 315, -1, 317, 262, 315, -1, 313, -1, - 323, 265, -1, 330, 265, -1, 284, 346, 343, 265, - -1, 320, 265, -1, 320, 224, 265, -1, 320, 224, - 344, 265, -1, 339, 265, -1, 339, 224, 265, -1, - 339, 224, 322, 265, -1, -1, 339, 224, 259, 321, - 350, 260, -1, 262, 224, -1, 322, 262, 224, -1, - 324, 256, -1, 326, -1, 325, -1, 326, 328, -1, - 325, 262, 328, -1, 332, 224, 255, -1, 343, 224, - -1, 343, 224, 344, -1, 339, 327, -1, 327, -1, - 339, 329, -1, 329, -1, 343, -1, 331, -1, 330, - 262, 224, -1, 330, 262, 224, 344, -1, 330, 262, - 224, 344, 264, 354, -1, 330, 262, 224, 264, 354, - -1, 332, -1, 332, 224, -1, 332, 224, 344, -1, - 332, 224, 344, 264, 354, -1, 332, 224, 264, 354, - -1, 343, -1, 339, 343, -1, 279, -1, 75, -1, - 74, -1, 73, -1, 77, -1, 76, 255, 336, 256, - -1, 337, -1, 336, 262, 337, -1, 224, -1, 224, - 264, 318, -1, 55, -1, 280, -1, 340, -1, 339, - 340, -1, 341, -1, 335, -1, 346, -1, 334, -1, - 333, -1, 338, -1, 5, -1, 3, -1, 4, -1, - 50, -1, 48, -1, 49, -1, 47, -1, 52, -1, - 53, -1, 51, -1, 54, -1, 55, -1, 56, -1, - 57, -1, 58, -1, 59, -1, 60, -1, 25, -1, - 25, 255, 342, 256, -1, 225, -1, 342, 262, 225, - -1, 345, -1, 345, 344, -1, 257, 258, -1, 257, - 313, 258, -1, 344, 257, 258, -1, 344, 257, 313, - 258, -1, 222, -1, 7, -1, 8, -1, 13, -1, - 9, -1, 10, -1, 11, -1, 12, -1, 6, -1, - 41, -1, 42, -1, 43, -1, 61, -1, 62, -1, - 63, -1, 67, -1, 68, -1, 69, -1, 26, -1, - 27, -1, 28, -1, 29, -1, 30, -1, 31, -1, - 32, -1, 33, -1, 34, -1, 35, -1, 36, -1, - 37, -1, 38, -1, 39, -1, 40, -1, 44, -1, - 45, -1, 46, -1, 78, -1, 79, -1, 80, -1, - 81, -1, 82, -1, 83, -1, 84, -1, 85, -1, - 86, -1, 64, -1, 65, -1, 66, -1, 87, -1, - 88, -1, 89, -1, 90, -1, 91, -1, 92, -1, - 93, -1, 94, -1, 95, -1, 70, -1, 71, -1, - 72, -1, 96, -1, 97, -1, 98, -1, 99, -1, - 100, -1, 101, -1, 102, -1, 103, -1, 104, -1, - 105, -1, 106, -1, 107, -1, 108, -1, 109, -1, - 110, -1, 111, -1, 112, -1, 113, -1, 114, -1, - 115, -1, 116, -1, 136, -1, 137, -1, 117, -1, - 118, -1, 119, -1, 120, -1, 121, -1, 122, -1, - 138, -1, 123, -1, 124, -1, 125, -1, 126, -1, - 127, -1, 128, -1, 139, -1, 129, -1, 130, -1, - 131, -1, 132, -1, 133, -1, 134, -1, 135, -1, - 140, -1, 141, -1, 142, -1, 143, -1, 144, -1, - 145, -1, 147, -1, 148, -1, 149, -1, 150, -1, - 151, -1, 152, -1, 153, -1, 154, -1, 173, -1, - 155, -1, 156, -1, 157, -1, 158, -1, 159, -1, - 160, -1, 174, -1, 161, -1, 162, -1, 163, -1, - 164, -1, 165, -1, 166, -1, 175, -1, 167, -1, - 168, -1, 169, -1, 170, -1, 171, -1, 172, -1, - 176, -1, 177, -1, 178, -1, 179, -1, 180, -1, - 181, -1, 188, -1, 189, -1, 190, -1, 191, -1, - 192, -1, 193, -1, 194, -1, 195, -1, 196, -1, - 197, -1, 198, -1, 199, -1, 200, -1, 201, -1, - 202, -1, 203, -1, 204, -1, 205, -1, 206, -1, - 207, -1, 208, -1, 209, -1, 210, -1, 211, -1, - 212, -1, 213, -1, 214, -1, 215, -1, 216, -1, - 217, -1, 218, -1, 219, -1, 220, -1, 146, -1, - 182, -1, 183, -1, 184, -1, 185, -1, 186, -1, - 187, -1, 347, -1, 225, -1, 281, -1, 282, -1, - 283, -1, -1, 221, 224, 259, 348, 350, 260, -1, - -1, 221, 259, 349, 350, 260, -1, 351, -1, 350, - 351, -1, 343, 352, 265, -1, 339, 343, 352, 265, - -1, 353, -1, 352, 262, 353, -1, 224, -1, 224, - 344, -1, 315, -1, 259, 355, 260, -1, 259, 355, - 262, 260, -1, 354, -1, 355, 262, 354, -1, 319, - -1, 359, -1, 358, -1, 356, -1, 368, -1, 369, - -1, 372, -1, 375, -1, 376, -1, 383, -1, 259, - 260, -1, -1, -1, 259, 360, 367, 361, 260, -1, - 366, -1, 358, -1, -1, 364, 359, -1, -1, 365, - 358, -1, 259, 260, -1, 259, 367, 260, -1, 357, - -1, 367, 357, -1, 265, -1, 317, 265, -1, 19, - 255, 317, 256, 370, -1, 363, 17, 363, -1, 363, - -1, 317, -1, 332, 224, 264, 354, -1, -1, 22, - 255, 317, 256, 373, 259, 374, 260, -1, -1, 367, - -1, 23, 317, 263, -1, 24, 263, -1, -1, 223, - 255, 377, 371, 256, 362, -1, -1, 16, 378, 357, - 223, 255, 317, 256, 265, -1, -1, 18, 255, 379, - 380, 382, 256, 362, -1, 368, -1, 356, -1, 371, - -1, -1, 381, 265, -1, 381, 265, 317, -1, 15, - 265, -1, 14, 265, -1, 21, 265, -1, 21, 317, - 265, -1, 20, 265, -1, 385, -1, 384, 385, -1, - 386, -1, 319, -1, -1, 323, 387, 366, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 250, 250, 256, 259, 262, 266, 270, 274, 277, - 281, 287, 290, 298, 301, 304, 307, 310, 315, 323, - 330, 337, 343, 347, 354, 357, 363, 370, 380, 388, - 393, 423, 429, 433, 437, 457, 458, 459, 460, 466, - 467, 472, 477, 486, 487, 492, 500, 501, 507, 516, - 517, 522, 527, 532, 540, 541, 549, 560, 561, 570, - 571, 580, 581, 590, 591, 599, 600, 608, 609, 617, - 618, 618, 636, 637, 652, 656, 660, 664, 669, 673, - 677, 681, 685, 689, 693, 700, 703, 714, 721, 726, - 731, 739, 743, 747, 751, 756, 761, 770, 770, 781, - 785, 792, 799, 802, 809, 817, 837, 855, 870, 893, - 904, 914, 924, 934, 943, 946, 950, 954, 959, 967, - 972, 977, 982, 987, 996, 1007, 1034, 1043, 1050, 1057, - 1064, 1076, 1082, 1085, 1092, 1096, 1100, 1108, 1117, 1120, - 1131, 1134, 1137, 1141, 1145, 1149, 1156, 1160, 1172, 1186, - 1191, 1197, 1203, 1210, 1216, 1221, 1226, 1231, 1238, 1242, - 1246, 1250, 1254, 1258, 1264, 1276, 1279, 1284, 1288, 1297, - 1302, 1310, 1314, 1324, 1328, 1332, 1337, 1344, 1348, 1353, - 1358, 1363, 1367, 1372, 1377, 1382, 1388, 1394, 1400, 1408, - 1416, 1424, 1429, 1434, 1439, 1444, 1449, 1454, 1460, 1466, - 1472, 1478, 1484, 1490, 1496, 1502, 1508, 1513, 1518, 1523, - 1528, 1533, 1538, 1543, 1548, 1553, 1558, 1563, 1568, 1574, - 1580, 1586, 1592, 1598, 1604, 1610, 1616, 1622, 1628, 1634, - 1640, 1648, 1656, 1664, 1672, 1680, 1688, 1696, 1704, 1712, - 1720, 1728, 1736, 1741, 1746, 1751, 1756, 1761, 1766, 1771, - 1776, 1781, 1786, 1791, 1796, 1801, 1806, 1811, 1816, 1821, - 1826, 1831, 1836, 1841, 1846, 1851, 1856, 1861, 1866, 1871, - 1876, 1881, 1886, 1891, 1896, 1901, 1906, 1911, 1916, 1921, - 1926, 1931, 1936, 1941, 1946, 1951, 1956, 1961, 1966, 1971, - 1976, 1981, 1986, 1991, 1996, 2001, 2006, 2011, 2016, 2021, - 2026, 2031, 2036, 2041, 2046, 2051, 2056, 2061, 2066, 2071, - 2076, 2081, 2086, 2091, 2096, 2101, 2106, 2111, 2116, 2121, - 2126, 2131, 2136, 2141, 2146, 2151, 2156, 2161, 2166, 2171, - 2176, 2181, 2186, 2191, 2196, 2201, 2206, 2211, 2216, 2221, - 2226, 2231, 2236, 2241, 2246, 2251, 2256, 2261, 2266, 2271, - 2276, 2281, 2287, 2293, 2299, 2305, 2311, 2317, 2323, 2328, - 2344, 2349, 2354, 2362, 2362, 2373, 2373, 2383, 2386, 2399, - 2417, 2441, 2445, 2451, 2456, 2467, 2470, 2476, 2485, 2488, - 2494, 2498, 2499, 2505, 2506, 2507, 2508, 2509, 2510, 2511, - 2515, 2516, 2520, 2516, 2532, 2533, 2537, 2537, 2544, 2544, - 2558, 2561, 2569, 2577, 2588, 2589, 2593, 2600, 2604, 2612, - 2616, 2629, 2629, 2649, 2652, 2658, 2670, 2682, 2682, 2697, - 2697, 2713, 2713, 2734, 2737, 2743, 2746, 2752, 2756, 2763, - 2768, 2773, 2780, 2783, 2792, 2796, 2803, 2806, 2812, 2812 + 0, 257, 257, 263, 266, 269, 273, 277, 281, 287, + 293, 296, 300, 306, 309, 317, 320, 323, 326, 329, + 334, 342, 349, 356, 362, 366, 373, 376, 382, 389, + 399, 407, 412, 442, 448, 452, 456, 476, 477, 478, + 479, 485, 486, 491, 496, 505, 506, 511, 519, 520, + 526, 535, 536, 541, 546, 551, 559, 560, 568, 579, + 580, 589, 590, 599, 600, 609, 610, 618, 619, 627, + 628, 636, 637, 637, 655, 656, 671, 675, 679, 683, + 688, 692, 696, 700, 704, 708, 712, 719, 722, 733, + 740, 745, 750, 758, 762, 766, 770, 775, 780, 789, + 789, 800, 804, 811, 818, 821, 828, 836, 856, 879, + 894, 917, 928, 938, 948, 958, 967, 970, 974, 978, + 983, 991, 996, 1001, 1006, 1011, 1020, 1031, 1058, 1067, + 1074, 1081, 1088, 1100, 1106, 1109, 1116, 1120, 1124, 1132, + 1141, 1144, 1155, 1158, 1161, 1165, 1169, 1173, 1180, 1184, + 1196, 1210, 1215, 1221, 1227, 1234, 1240, 1245, 1250, 1255, + 1263, 1267, 1271, 1275, 1279, 1283, 1289, 1298, 1301, 1309, + 1313, 1322, 1327, 1335, 1339, 1349, 1353, 1357, 1362, 1369, + 1373, 1378, 1383, 1388, 1395, 1402, 1406, 1411, 1416, 1421, + 1427, 1433, 1439, 1447, 1455, 1463, 1468, 1473, 1478, 1483, + 1488, 1493, 1499, 1505, 1511, 1519, 1527, 1535, 1541, 1547, + 1553, 1559, 1565, 1571, 1579, 1587, 1595, 1600, 1605, 1610, + 1615, 1620, 1625, 1630, 1635, 1640, 1645, 1650, 1655, 1661, + 1667, 1673, 1679, 1685, 1691, 1697, 1703, 1709, 1715, 1721, + 1727, 1735, 1743, 1751, 1759, 1767, 1775, 1783, 1791, 1799, + 1807, 1815, 1823, 1828, 1833, 1838, 1843, 1848, 1853, 1858, + 1863, 1868, 1873, 1878, 1883, 1888, 1893, 1898, 1903, 1908, + 1913, 1918, 1923, 1928, 1933, 1938, 1943, 1948, 1953, 1958, + 1963, 1968, 1973, 1978, 1983, 1988, 1993, 1998, 2003, 2008, + 2013, 2018, 2023, 2028, 2033, 2038, 2043, 2048, 2053, 2058, + 2063, 2068, 2073, 2078, 2083, 2088, 2093, 2098, 2103, 2108, + 2113, 2118, 2123, 2128, 2133, 2138, 2143, 2148, 2153, 2158, + 2163, 2168, 2173, 2178, 2183, 2188, 2193, 2198, 2203, 2208, + 2213, 2218, 2223, 2228, 2233, 2238, 2243, 2248, 2253, 2258, + 2263, 2268, 2273, 2278, 2283, 2288, 2293, 2298, 2303, 2308, + 2313, 2318, 2323, 2328, 2333, 2338, 2343, 2348, 2353, 2358, + 2363, 2368, 2374, 2380, 2386, 2392, 2398, 2404, 2410, 2415, + 2431, 2436, 2441, 2449, 2449, 2460, 2460, 2470, 2473, 2486, + 2504, 2528, 2532, 2538, 2543, 2554, 2557, 2563, 2572, 2575, + 2581, 2585, 2586, 2592, 2593, 2594, 2595, 2596, 2597, 2598, + 2602, 2603, 2607, 2603, 2619, 2620, 2624, 2624, 2631, 2631, + 2645, 2648, 2656, 2664, 2675, 2676, 2680, 2683, 2689, 2696, + 2700, 2708, 2712, 2725, 2728, 2734, 2734, 2754, 2757, 2763, + 2775, 2787, 2790, 2796, 2796, 2811, 2811, 2827, 2827, 2848, + 2851, 2857, 2860, 2866, 2870, 2877, 2882, 2887, 2894, 2897, + 2906, 2910, 2919, 2922, 2925, 2933, 2933, 2955, 2961, 2964, + 2969, 2972 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +#if YYDEBUG || YYERROR_VERBOSE || 1 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "ATTRIBUTE", "VARYING", "CONST", "BOOL", - "FLOAT", "DOUBLE", "INT", "UINT", "INT64_T", "UINT64_T", "FLOAT16_T", - "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", - "SWITCH", "CASE", "DEFAULT", "SUBROUTINE", "BVEC2", "BVEC3", "BVEC4", - "IVEC2", "IVEC3", "IVEC4", "I64VEC2", "I64VEC3", "I64VEC4", "UVEC2", - "UVEC3", "UVEC4", "U64VEC2", "U64VEC3", "U64VEC4", "VEC2", "VEC3", - "VEC4", "MAT2", "MAT3", "MAT4", "CENTROID", "IN", "OUT", "INOUT", - "UNIFORM", "PATCH", "SAMPLE", "BUFFER", "SHARED", "COHERENT", "VOLATILE", - "RESTRICT", "READONLY", "WRITEONLY", "DVEC2", "DVEC3", "DVEC4", "DMAT2", - "DMAT3", "DMAT4", "F16VEC2", "F16VEC3", "F16VEC4", "F16MAT2", "F16MAT3", - "F16MAT4", "NOPERSPECTIVE", "FLAT", "SMOOTH", "LAYOUT", - "__EXPLICITINTERPAMD", "MAT2X2", "MAT2X3", "MAT2X4", "MAT3X2", "MAT3X3", - "MAT3X4", "MAT4X2", "MAT4X3", "MAT4X4", "DMAT2X2", "DMAT2X3", "DMAT2X4", - "DMAT3X2", "DMAT3X3", "DMAT3X4", "DMAT4X2", "DMAT4X3", "DMAT4X4", - "F16MAT2X2", "F16MAT2X3", "F16MAT2X4", "F16MAT3X2", "F16MAT3X3", - "F16MAT3X4", "F16MAT4X2", "F16MAT4X3", "F16MAT4X4", "ATOMIC_UINT", - "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE", "SAMPLER1DSHADOW", - "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", "SAMPLER1DARRAY", - "SAMPLER2DARRAY", "SAMPLER1DARRAYSHADOW", "SAMPLER2DARRAYSHADOW", - "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D", "ISAMPLERCUBE", - "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D", "USAMPLER2D", - "USAMPLER3D", "USAMPLERCUBE", "USAMPLER1DARRAY", "USAMPLER2DARRAY", - "SAMPLER2DRECT", "SAMPLER2DRECTSHADOW", "ISAMPLER2DRECT", - "USAMPLER2DRECT", "SAMPLERBUFFER", "ISAMPLERBUFFER", "USAMPLERBUFFER", - "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", - "USAMPLERCUBEARRAY", "SAMPLER2DMS", "ISAMPLER2DMS", "USAMPLER2DMS", - "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", "USAMPLER2DMSARRAY", - "SAMPLEREXTERNALOES", "SAMPLER", "SAMPLERSHADOW", "TEXTURE1D", - "TEXTURE2D", "TEXTURE3D", "TEXTURECUBE", "TEXTURE1DARRAY", + "FLOAT", "DOUBLE", "INT", "UINT", "INT64_T", "UINT64_T", "INT16_T", + "UINT16_T", "FLOAT16_T", "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", + "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "SUBROUTINE", "BVEC2", + "BVEC3", "BVEC4", "IVEC2", "IVEC3", "IVEC4", "I64VEC2", "I64VEC3", + "I64VEC4", "UVEC2", "UVEC3", "UVEC4", "U64VEC2", "U64VEC3", "U64VEC4", + "VEC2", "VEC3", "VEC4", "MAT2", "MAT3", "MAT4", "CENTROID", "IN", "OUT", + "INOUT", "UNIFORM", "PATCH", "SAMPLE", "BUFFER", "SHARED", "COHERENT", + "VOLATILE", "RESTRICT", "READONLY", "WRITEONLY", "DVEC2", "DVEC3", + "DVEC4", "DMAT2", "DMAT3", "DMAT4", "F16VEC2", "F16VEC3", "F16VEC4", + "F16MAT2", "F16MAT3", "F16MAT4", "I16VEC2", "I16VEC3", "I16VEC4", + "U16VEC2", "U16VEC3", "U16VEC4", "NOPERSPECTIVE", "FLAT", "SMOOTH", + "LAYOUT", "__EXPLICITINTERPAMD", "MAT2X2", "MAT2X3", "MAT2X4", "MAT3X2", + "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3", "MAT4X4", "DMAT2X2", "DMAT2X3", + "DMAT2X4", "DMAT3X2", "DMAT3X3", "DMAT3X4", "DMAT4X2", "DMAT4X3", + "DMAT4X4", "F16MAT2X2", "F16MAT2X3", "F16MAT2X4", "F16MAT3X2", + "F16MAT3X3", "F16MAT3X4", "F16MAT4X2", "F16MAT4X3", "F16MAT4X4", + "ATOMIC_UINT", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE", + "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", + "SAMPLER1DARRAY", "SAMPLER2DARRAY", "SAMPLER1DARRAYSHADOW", + "SAMPLER2DARRAYSHADOW", "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D", + "ISAMPLERCUBE", "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D", + "USAMPLER2D", "USAMPLER3D", "USAMPLERCUBE", "USAMPLER1DARRAY", + "USAMPLER2DARRAY", "SAMPLER2DRECT", "SAMPLER2DRECTSHADOW", + "ISAMPLER2DRECT", "USAMPLER2DRECT", "SAMPLERBUFFER", "ISAMPLERBUFFER", + "USAMPLERBUFFER", "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW", + "ISAMPLERCUBEARRAY", "USAMPLERCUBEARRAY", "SAMPLER2DMS", "ISAMPLER2DMS", + "USAMPLER2DMS", "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", + "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", "SAMPLER", "SAMPLERSHADOW", + "TEXTURE1D", "TEXTURE2D", "TEXTURE3D", "TEXTURECUBE", "TEXTURE1DARRAY", "TEXTURE2DARRAY", "ITEXTURE1D", "ITEXTURE2D", "ITEXTURE3D", "ITEXTURECUBE", "ITEXTURE1DARRAY", "ITEXTURE2DARRAY", "UTEXTURE1D", "UTEXTURE2D", "UTEXTURE3D", "UTEXTURECUBE", "UTEXTURE1DARRAY", @@ -1063,20 +901,20 @@ static const char *const yytname[] = "UIMAGE2DMS", "IMAGE2DMSARRAY", "IIMAGE2DMSARRAY", "UIMAGE2DMSARRAY", "STRUCT", "VOID", "WHILE", "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "DOUBLECONSTANT", "INTCONSTANT", "UINTCONSTANT", "INT64CONSTANT", - "UINT64CONSTANT", "BOOLCONSTANT", "FLOAT16CONSTANT", "LEFT_OP", - "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", - "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", - "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", - "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", - "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", - "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", - "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", - "AMPERSAND", "QUESTION", "INVARIANT", "PRECISE", "HIGH_PRECISION", - "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", - "SUPERP", "$accept", "variable_identifier", "primary_expression", - "postfix_expression", "integer_expression", "function_call", - "function_call_or_method", "function_call_generic", - "function_call_header_no_parameters", + "UINT64CONSTANT", "INT16CONSTANT", "UINT16CONSTANT", "BOOLCONSTANT", + "FLOAT16CONSTANT", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", + "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", + "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", + "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", + "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", + "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", + "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", + "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", "QUESTION", + "INVARIANT", "PRECISE", "HIGH_PRECISION", "MEDIUM_PRECISION", + "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", "SUPERP", "$accept", + "variable_identifier", "primary_expression", "postfix_expression", + "integer_expression", "function_call", "function_call_or_method", + "function_call_generic", "function_call_header_no_parameters", "function_call_header_with_parameters", "function_call_header", "function_identifier", "unary_expression", "unary_operator", "multiplicative_expression", "additive_expression", "shift_expression", @@ -1102,17 +940,20 @@ static const char *const yytname[] = "statement_no_new_scope", "statement_scoped", "$@7", "$@8", "compound_statement_no_new_scope", "statement_list", "expression_statement", "selection_statement", - "selection_rest_statement", "condition", "switch_statement", "$@9", - "switch_statement_list", "case_label", "iteration_statement", "$@10", - "$@11", "$@12", "for_init_statement", "conditionopt", - "for_rest_statement", "jump_statement", "translation_unit", - "external_declaration", "function_definition", "$@13", YY_NULL + "selection_statement_nonattributed", "selection_rest_statement", + "condition", "switch_statement", "switch_statement_nonattributed", "$@9", + "switch_statement_list", "case_label", "iteration_statement", + "iteration_statement_nonattributed", "$@10", "$@11", "$@12", + "for_init_statement", "conditionopt", "for_rest_statement", + "jump_statement", "translation_unit", "external_declaration", + "function_definition", "$@13", "attribute", "attribute_list", + "single_attribute", YY_NULL }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -1143,80 +984,1668 @@ static const yytype_uint16 yytoknum[] = 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, - 535, 536, 537, 538, 539, 540, 541, 542 + 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, + 545, 546, 547, 548, 549, 550, 551, 552 }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = +#define YYPACT_NINF -542 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-542))) + +#define YYTABLE_NINF -407 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = { - 0, 288, 289, 290, 290, 290, 290, 290, 290, 290, - 290, 290, 290, 291, 291, 291, 291, 291, 291, 292, - 293, 294, 295, 295, 296, 296, 297, 297, 298, 299, - 299, 300, 300, 300, 300, 301, 301, 301, 301, 302, - 302, 302, 302, 303, 303, 303, 304, 304, 304, 305, - 305, 305, 305, 305, 306, 306, 306, 307, 307, 308, - 308, 309, 309, 310, 310, 311, 311, 312, 312, 313, - 314, 313, 315, 315, 316, 316, 316, 316, 316, 316, - 316, 316, 316, 316, 316, 317, 317, 318, 319, 319, - 319, 319, 319, 319, 319, 319, 319, 321, 320, 322, - 322, 323, 324, 324, 325, 325, 326, 327, 327, 328, - 328, 328, 328, 329, 330, 330, 330, 330, 330, 331, - 331, 331, 331, 331, 332, 332, 333, 334, 334, 334, - 334, 335, 336, 336, 337, 337, 337, 338, 339, 339, - 340, 340, 340, 340, 340, 340, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, - 341, 341, 341, 341, 341, 342, 342, 343, 343, 344, - 344, 344, 344, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, - 346, 346, 346, 348, 347, 349, 347, 350, 350, 351, - 351, 352, 352, 353, 353, 354, 354, 354, 355, 355, - 356, 357, 357, 358, 358, 358, 358, 358, 358, 358, - 359, 360, 361, 359, 362, 362, 364, 363, 365, 363, - 366, 366, 367, 367, 368, 368, 369, 370, 370, 371, - 371, 373, 372, 374, 374, 375, 375, 377, 376, 378, - 376, 379, 376, 380, 380, 381, 381, 382, 382, 383, - 383, 383, 383, 383, 384, 384, 385, 385, 387, 386 + 2638, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -204, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -186, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -542, -542, -214, -542, -542, -542, + -542, -542, -542, -542, -542, -149, -542, -216, -237, -177, + -174, 4279, -210, -542, -119, -542, -542, -542, -542, 3202, + -542, -542, -542, -141, -542, -542, 594, -542, -542, -93, + -45, -85, -542, 6400, -233, -542, -542, -79, -542, 4279, + -542, -542, -542, 4279, -54, -41, -542, -180, -176, -542, + -542, -542, 4784, -73, -542, -542, -542, -175, -542, -78, + -165, -542, -542, 4279, -80, -542, -224, 886, -542, -542, + -542, -542, -141, -221, -542, 5058, -184, -542, -34, -542, + -172, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, 5880, 5880, 5880, -542, -542, -542, -542, -542, + -542, -542, -207, -542, -542, -542, -67, -164, 6140, -65, + -542, 5880, -133, -102, -197, -227, -120, -86, -84, -82, + -48, -49, -236, -61, -542, 5332, -542, -24, 5880, -542, + -45, 4279, 4279, -23, 3475, -542, -542, -542, -64, -63, + -542, -55, -52, -60, 5606, -51, 5880, -57, -46, -44, + -43, -542, -542, -188, -542, -542, -155, -542, -237, -40, + -542, -542, -542, -542, 1178, -542, -542, -542, -542, -542, + -542, -542, -542, -542, -11, -73, 5058, -179, 5058, -542, + -542, 5058, 4279, -542, -10, -542, -542, -542, -161, -542, + -542, 5880, -8, -542, -542, 5880, -38, -542, -542, -542, + 5880, 5880, 5880, 5880, 5880, 5880, 5880, 5880, 5880, 5880, + 5880, 5880, 5880, 5880, 5880, 5880, 5880, 5880, 5880, -542, + -542, -542, -47, -542, -542, -542, -542, 3743, -23, -141, + -148, -542, -542, -542, -542, -542, 1470, -542, 5880, -542, + -542, -135, 5880, -127, -542, -542, -6, -542, 1470, -542, + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + 5880, 5880, -542, -542, -542, -542, -542, -542, -542, 5058, + -542, -91, -542, 4011, -542, -542, -39, -42, -542, -542, + -542, -542, -542, -133, -133, -102, -102, -197, -197, -197, + -197, -227, -227, -120, -86, -84, -82, -48, -49, 5880, + -542, -542, -134, -73, -23, -542, 2, 2346, -156, -542, + -154, -542, 2911, -31, -245, -542, 1470, -542, -542, -542, + -542, 4510, -542, -542, -122, -542, -542, -30, -542, -542, + 2911, -33, -542, -42, 9, 4279, -28, 5880, -26, -6, + -27, -542, -542, 5880, 5880, -542, -35, -22, 226, -21, + 2054, -542, -18, -19, 1762, -9, -542, -542, -542, -542, + -151, 5880, 1762, -33, -542, -542, 1470, 5058, -542, -542, + -542, -542, -17, -42, -542, -542, 1470, -14, -542, -542, + -542 }; -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint16 yydefact[] = +{ + 0, 149, 150, 148, 185, 176, 177, 179, 180, 181, + 182, 183, 184, 178, 165, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 207, 208, 209, 210, 211, 212, + 186, 187, 188, 216, 217, 218, 154, 152, 153, 151, + 157, 155, 156, 158, 159, 160, 161, 162, 163, 164, + 189, 190, 191, 228, 229, 230, 192, 193, 194, 240, + 241, 242, 204, 205, 206, 213, 214, 215, 131, 130, + 129, 0, 132, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 266, 267, 268, 269, 270, 271, 273, 274, + 275, 276, 277, 278, 280, 281, 282, 283, 284, 285, + 286, 264, 265, 272, 279, 287, 288, 289, 290, 291, + 292, 361, 293, 294, 295, 296, 297, 298, 299, 300, + 302, 303, 304, 305, 306, 307, 309, 310, 311, 312, + 313, 314, 316, 317, 318, 319, 320, 321, 301, 308, + 315, 322, 323, 324, 325, 326, 327, 362, 363, 364, + 365, 366, 367, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 0, 175, 369, 454, + 128, 139, 370, 371, 372, 0, 453, 0, 455, 0, + 105, 104, 0, 116, 121, 146, 145, 143, 147, 0, + 140, 142, 126, 169, 144, 368, 0, 450, 452, 0, + 0, 0, 375, 0, 0, 93, 90, 0, 103, 0, + 112, 106, 114, 0, 115, 0, 91, 122, 0, 96, + 141, 127, 0, 170, 1, 451, 167, 0, 138, 136, + 0, 134, 373, 0, 0, 94, 0, 0, 456, 107, + 111, 113, 109, 117, 108, 0, 123, 99, 0, 97, + 0, 2, 10, 11, 4, 5, 6, 7, 8, 9, + 13, 12, 0, 0, 0, 171, 39, 38, 40, 37, + 3, 15, 33, 17, 22, 23, 0, 0, 27, 0, + 41, 0, 45, 48, 51, 56, 59, 61, 63, 65, + 67, 69, 71, 0, 31, 0, 166, 0, 0, 133, + 0, 0, 0, 0, 0, 377, 92, 95, 0, 0, + 435, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 401, 410, 414, 41, 74, 87, 0, 390, 0, 126, + 393, 412, 392, 391, 0, 394, 395, 416, 396, 423, + 397, 398, 431, 399, 0, 110, 0, 118, 0, 385, + 125, 0, 0, 101, 0, 98, 34, 35, 0, 19, + 20, 0, 0, 25, 24, 0, 175, 28, 30, 36, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, + 172, 173, 0, 168, 89, 137, 135, 0, 0, 383, + 0, 381, 376, 378, 446, 445, 0, 437, 0, 449, + 447, 0, 0, 0, 430, 433, 0, 400, 0, 77, + 78, 80, 79, 82, 83, 84, 85, 86, 81, 76, + 0, 0, 415, 411, 413, 417, 424, 432, 120, 0, + 388, 0, 124, 0, 102, 14, 0, 21, 18, 29, + 42, 43, 44, 47, 46, 49, 50, 54, 55, 52, + 53, 57, 58, 60, 62, 64, 66, 68, 70, 0, + 174, 374, 0, 384, 0, 379, 0, 0, 0, 448, + 0, 429, 0, 460, 0, 458, 402, 75, 88, 119, + 386, 0, 100, 16, 0, 380, 382, 0, 440, 439, + 442, 408, 425, 421, 0, 0, 0, 0, 0, 0, + 0, 387, 389, 0, 0, 441, 0, 0, 420, 0, + 0, 418, 0, 0, 0, 0, 457, 459, 403, 73, + 0, 443, 0, 408, 407, 409, 427, 0, 405, 434, + 404, 461, 0, 444, 438, 419, 428, 0, 422, 436, + 426 +}; + + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -542, -542, -542, -542, -542, -542, -542, -542, -542, -542, + -542, -542, -268, -542, -241, -240, -294, -239, -173, -187, + -170, -169, -171, -168, -542, -267, -542, -292, -542, -282, + -296, 6, -542, -542, -542, 8, -542, -542, -542, -1, + 10, 11, -542, -542, -513, -542, -542, -542, -542, -77, + -542, -229, -238, -542, -542, 0, -243, -542, 47, -542, + -542, -542, -336, -319, -167, -249, -370, -542, -251, -364, + -541, -291, -542, -542, -305, -304, -542, -542, 23, -454, + -242, -542, -110, -542, -264, -542, -106, -542, -542, -542, + -542, -103, -542, -542, -542, -542, -542, -542, -542, -542, + 46, -542, -542, -542, -542, -266 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 320, 321, 322, 496, 323, 324, 325, 326, 327, + 328, 329, 373, 331, 332, 333, 334, 335, 336, 337, + 338, 339, 340, 341, 342, 374, 519, 375, 480, 376, + 445, 377, 227, 402, 300, 378, 229, 230, 231, 260, + 261, 262, 232, 233, 234, 235, 236, 237, 280, 281, + 238, 239, 240, 241, 277, 344, 273, 243, 244, 245, + 351, 283, 354, 355, 450, 451, 400, 491, 380, 381, + 382, 383, 468, 560, 589, 568, 569, 570, 590, 384, + 385, 386, 387, 571, 556, 388, 389, 572, 597, 390, + 391, 392, 532, 456, 527, 550, 566, 567, 393, 246, + 247, 248, 257, 394, 534, 535 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ +static const yytype_int16 yytable[] = +{ + 242, 270, 263, 399, 330, 343, 226, 360, 228, 361, + 362, 286, 278, 365, 536, 447, 254, 438, 251, 554, + 484, 427, 428, 558, 296, 270, 488, 559, 490, 585, + 263, 492, 408, 588, 272, 453, 417, 554, 256, 409, + 410, 588, 285, 345, 406, 407, 272, 425, 426, 395, + 397, 357, 439, 396, 352, 252, 429, 430, -32, 255, + 411, 249, 265, 419, 412, 266, 493, 469, 470, 471, + 472, 473, 474, 475, 476, 477, 478, 330, 442, 250, + 330, 444, 461, 345, 463, 294, 479, 272, 345, 258, + 401, 346, 526, 297, 295, 489, 298, 347, 259, 299, + 404, 349, 414, 405, 399, 495, 399, 350, 415, 399, + 551, 481, 552, 267, 270, 592, 481, 481, 481, 539, + 482, 481, 352, 499, 524, 352, 272, 525, 453, 497, + 431, 432, 596, 507, 508, 509, 510, 481, 524, 276, + 529, 545, 222, 223, 224, 481, 531, 420, 421, 422, + 481, 563, 500, 501, 502, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 562, 484, 352, 453, 423, 528, 424, 292, 540, + 530, 541, 503, 504, 282, 505, 506, 279, 537, 538, + 287, 293, 511, 512, 345, 356, 348, 399, 403, 413, + 418, 433, 434, 435, 436, 437, 523, 440, 443, 449, + 457, 454, 455, 458, 462, 459, 464, 598, 352, 465, + 368, 520, 494, 466, 498, -31, 533, 467, -26, 543, + 481, 264, 484, 547, 557, 564, -406, 544, 574, 271, + 581, 573, 576, 578, 582, 583, 242, 514, 370, 399, + 553, 586, 226, 284, 228, 587, 600, 591, 599, 264, + 513, 575, 290, 264, 352, 515, 517, 516, 553, 289, + 518, 579, 253, 446, 291, 546, 548, 594, 584, 595, + 288, 522, 580, 353, 485, 549, 565, 379, 486, 330, + 444, 487, 275, 577, 0, 399, 0, 0, 0, 593, + 0, 0, 0, 555, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 270, 0, 0, + 0, 555, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 353, 448, 0, 353, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 379, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 353, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 353, 0, 0, + 0, 0, 0, 0, 0, 0, 379, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 379, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 353, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 379, 0, 0, + 0, 0, 379, 0, 0, 0, 379, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 379, 0, 0, 0, 0, 271, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 379, 0, 0, 0, 379, 0, 0, 0, 0, 0, + 0, 0, 379, 0, 0, 0, 379, 0, 0, 0, + 0, 0, 0, 0, 274, 0, 379, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 0, 0, 218, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 219, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 220, 221, 222, 223, 224, 225, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 358, 359, 360, 0, 361, 362, 363, 364, + 365, 366, 367, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 368, 301, 218, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 0, 0, 312, 313, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 314, 0, 369, 0, 370, 371, 0, 0, 0, + 0, 372, 316, 317, 318, 319, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 220, 221, 222, 223, 224, + 225, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 358, 359, 360, 0, 361, 362, + 363, 364, 365, 366, 367, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 368, + 301, 218, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 0, 0, 312, 313, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 314, 0, 369, 0, 370, 483, 0, + 0, 0, 0, 372, 316, 317, 318, 319, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 220, 221, 222, + 223, 224, 225, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 358, 359, 360, 0, + 361, 362, 363, 364, 365, 366, 367, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 368, 301, 218, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 0, 0, 312, 313, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 314, 0, 369, 0, 370, + 0, 0, 0, 0, 0, 372, 316, 317, 318, 319, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 220, + 221, 222, 223, 224, 225, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 358, 359, + 360, 0, 361, 362, 363, 364, 365, 366, 367, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 368, 301, 218, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 0, 0, 312, 313, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 314, 0, 369, + 0, 287, 0, 0, 0, 0, 0, 372, 316, 317, + 318, 319, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 220, 221, 222, 223, 224, 225, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 358, 359, 360, 0, 361, 362, 363, 364, 365, 366, + 367, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 368, 301, 218, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 0, 0, + 312, 313, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 314, + 0, 369, 0, 0, 0, 0, 0, 0, 0, 372, + 316, 317, 318, 319, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 220, 221, 222, 223, 224, 225, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 0, 301, 218, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 0, 0, 312, 313, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 314, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 372, 316, 317, 318, 319, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 220, 221, 222, 223, 224, + 225, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 0, + 0, 218, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 219, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 220, 221, 222, + 223, 224, 225, 0, 0, 0, 0, 0, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 0, 301, 218, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 0, 0, 312, 313, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 314, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 316, 317, 318, + 319, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 220, 221, 222, 223, 224, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 0, 268, 218, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 269, 1, 2, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 220, 221, 222, 223, 224, 0, 0, 0, 0, + 0, 0, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 0, 0, 218, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 452, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, + 0, 0, 0, 0, 220, 221, 222, 223, 224, 0, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 0, 0, 218, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 521, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 0, 0, 0, + 0, 0, 220, 221, 222, 223, 224, 0, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 0, 0, 218, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 542, 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 0, 0, 0, 0, 0, + 220, 221, 222, 223, 224, 0, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 0, 0, 218, 0, 0, 0, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 220, 221, + 222, 223, 224, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 0, 0, 0, 0, 0, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 0, 301, 218, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 0, 0, 312, 313, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 314, 0, 0, 0, 398, + 561, 0, 0, 0, 0, 0, 316, 317, 318, 319, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 0, 0, 0, 0, 0, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 0, 301, 218, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 0, 0, + 312, 313, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 314, + 0, 0, 315, 0, 0, 0, 0, 0, 0, 0, + 316, 317, 318, 319, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 0, + 0, 0, 0, 0, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 0, + 301, 218, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 0, 0, 312, 313, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 314, 0, 0, 0, 398, 0, 0, + 0, 0, 0, 0, 316, 317, 318, 319, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 0, 0, 0, 0, 0, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 0, 301, 218, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 0, 0, 312, 313, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 314, 0, 0, + 441, 0, 0, 0, 0, 0, 0, 0, 316, 317, + 318, 319, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 0, 0, 0, + 0, 0, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 0, 301, 218, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 0, 0, 312, 313, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 314, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 460, 316, 317, 318, 319, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 0, 0, 0, 0, 0, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 0, 301, 218, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 0, 0, 312, 313, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 314, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 316, 317, 318, 319, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 0, 0, 0, 0, 0, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 416, 0, 301, 218, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 0, 0, 312, 313, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 314, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 316, 317, 318, 319, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 0, 0, 0, 0, 0, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 0, 0, 218 +}; + +static const yytype_int16 yycheck[] = +{ + 0, 239, 231, 295, 272, 272, 0, 18, 0, 20, + 21, 254, 57, 24, 468, 351, 232, 253, 232, 532, + 384, 248, 249, 268, 267, 263, 396, 272, 398, 570, + 259, 401, 314, 574, 267, 354, 328, 550, 275, 246, + 247, 582, 275, 267, 312, 313, 267, 244, 245, 292, + 293, 275, 288, 274, 283, 269, 283, 284, 265, 275, + 267, 265, 272, 331, 271, 275, 402, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 345, 345, 265, + 348, 348, 364, 267, 366, 265, 274, 267, 267, 266, + 274, 266, 456, 269, 274, 274, 272, 272, 272, 275, + 272, 266, 266, 275, 396, 266, 398, 272, 272, 401, + 266, 272, 266, 232, 352, 266, 272, 272, 272, 489, + 275, 272, 351, 415, 272, 354, 267, 275, 447, 411, + 250, 251, 586, 427, 428, 429, 430, 272, 272, 232, + 275, 275, 291, 292, 293, 272, 273, 280, 281, 282, + 272, 273, 420, 421, 422, 423, 424, 425, 426, 427, + 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, + 438, 541, 536, 402, 493, 277, 458, 279, 232, 270, + 462, 272, 423, 424, 269, 425, 426, 232, 480, 481, + 269, 232, 431, 432, 267, 275, 274, 489, 232, 266, + 265, 287, 286, 285, 252, 254, 449, 268, 232, 232, + 265, 275, 275, 265, 265, 275, 273, 587, 447, 265, + 231, 268, 232, 267, 232, 265, 232, 270, 266, 268, + 272, 231, 596, 231, 265, 265, 269, 519, 266, 239, + 275, 232, 268, 270, 266, 19, 246, 434, 269, 541, + 532, 269, 246, 253, 246, 274, 270, 266, 275, 259, + 433, 557, 263, 263, 493, 435, 437, 436, 550, 259, + 438, 563, 225, 350, 263, 524, 527, 582, 569, 583, + 257, 448, 564, 283, 394, 527, 550, 287, 394, 557, + 557, 394, 246, 559, -1, 587, -1, -1, -1, 581, + -1, -1, -1, 532, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 555, -1, -1, + -1, 550, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 351, 352, -1, 354, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 384, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 402, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 447, -1, -1, + -1, -1, -1, -1, -1, -1, 456, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 468, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 493, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 527, -1, -1, + -1, -1, 532, -1, -1, -1, 536, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 550, -1, -1, -1, -1, 555, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 570, -1, -1, -1, 574, -1, -1, -1, -1, -1, + -1, -1, 582, -1, -1, -1, 586, -1, -1, -1, + -1, -1, -1, -1, 0, -1, 596, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, -1, -1, 233, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 275, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 289, 290, 291, 292, 293, 294, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, -1, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + -1, -1, 246, 247, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 265, -1, 267, -1, 269, 270, -1, -1, -1, + -1, 275, 276, 277, 278, 279, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 289, 290, 291, 292, 293, + 294, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, -1, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, -1, -1, 246, 247, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 265, -1, 267, -1, 269, 270, -1, + -1, -1, -1, 275, 276, 277, 278, 279, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 289, 290, 291, + 292, 293, 294, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, -1, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, -1, -1, 246, 247, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 265, -1, 267, -1, 269, + -1, -1, -1, -1, -1, 275, 276, 277, 278, 279, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 289, + 290, 291, 292, 293, 294, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, -1, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, -1, -1, 246, 247, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 265, -1, 267, + -1, 269, -1, -1, -1, -1, -1, 275, 276, 277, + 278, 279, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 289, 290, 291, 292, 293, 294, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, -1, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, -1, -1, + 246, 247, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 265, + -1, 267, -1, -1, -1, -1, -1, -1, -1, 275, + 276, 277, 278, 279, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 289, 290, 291, 292, 293, 294, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, -1, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + -1, -1, 246, 247, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 265, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 275, 276, 277, 278, 279, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 289, 290, 291, 292, 293, + 294, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, -1, + -1, 233, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 275, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 289, 290, 291, + 292, 293, 294, -1, -1, -1, -1, -1, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, -1, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 242, 243, -1, -1, 246, 247, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 265, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 276, 277, 278, + 279, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 289, 290, 291, 292, 293, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, -1, 232, 233, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 275, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 289, 290, 291, 292, 293, -1, -1, -1, -1, + -1, -1, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, -1, -1, 233, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 270, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, -1, + -1, -1, -1, -1, 289, 290, 291, 292, 293, -1, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, -1, -1, 233, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 270, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, -1, -1, -1, + -1, -1, 289, 290, 291, 292, 293, -1, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, + 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, + 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, -1, -1, 233, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 270, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, + 289, 290, 291, 292, 293, -1, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, + -1, -1, 233, -1, -1, -1, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 289, 290, + 291, 292, 293, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, -1, -1, -1, -1, -1, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, -1, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, -1, -1, 246, 247, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 265, -1, -1, -1, 269, + 270, -1, -1, -1, -1, -1, 276, 277, 278, 279, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, -1, -1, -1, -1, -1, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, -1, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, -1, -1, + 246, 247, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 265, + -1, -1, 268, -1, -1, -1, -1, -1, -1, -1, + 276, 277, 278, 279, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, -1, + -1, -1, -1, -1, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, -1, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, -1, -1, 246, 247, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 265, -1, -1, -1, 269, -1, -1, + -1, -1, -1, -1, 276, 277, 278, 279, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, -1, -1, -1, -1, -1, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, -1, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, -1, -1, 246, 247, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 265, -1, -1, + 268, -1, -1, -1, -1, -1, -1, -1, 276, 277, + 278, 279, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, -1, -1, -1, + -1, -1, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, -1, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + -1, -1, 246, 247, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 265, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 275, 276, 277, 278, 279, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, -1, -1, -1, -1, -1, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, -1, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, -1, -1, 246, 247, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 265, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 276, 277, 278, 279, + -1, -1, -1, -1, -1, -1, -1, -1, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, -1, -1, -1, -1, -1, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, -1, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, -1, -1, 246, 247, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 265, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 276, 277, 278, 279, + -1, -1, -1, -1, -1, -1, -1, -1, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, -1, -1, -1, -1, -1, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, -1, -1, 233 +}; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint16 yystos[] = +{ + 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 226, 227, 228, 229, 230, 233, 275, + 289, 290, 291, 292, 293, 294, 329, 330, 333, 334, + 335, 336, 340, 341, 342, 343, 344, 345, 348, 349, + 350, 351, 353, 355, 356, 357, 397, 398, 399, 265, + 265, 232, 269, 356, 232, 275, 275, 400, 266, 272, + 337, 338, 339, 349, 353, 272, 275, 232, 232, 275, + 350, 353, 267, 354, 0, 398, 232, 352, 57, 232, + 346, 347, 269, 359, 353, 275, 354, 269, 376, 338, + 337, 339, 232, 232, 265, 274, 354, 269, 272, 275, + 332, 232, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 246, 247, 265, 268, 276, 277, 278, 279, + 299, 300, 301, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, 323, 353, 267, 266, 272, 274, 266, + 272, 358, 349, 353, 360, 361, 275, 275, 16, 17, + 18, 20, 21, 22, 23, 24, 25, 26, 231, 267, + 269, 270, 275, 310, 323, 325, 327, 329, 333, 353, + 366, 367, 368, 369, 377, 378, 379, 380, 383, 384, + 387, 388, 389, 396, 401, 354, 274, 354, 269, 325, + 364, 274, 331, 232, 272, 275, 310, 310, 327, 246, + 247, 267, 271, 266, 266, 272, 230, 325, 265, 310, + 280, 281, 282, 277, 279, 244, 245, 248, 249, 283, + 284, 250, 251, 287, 286, 285, 252, 254, 253, 288, + 268, 268, 323, 232, 323, 328, 347, 360, 353, 232, + 362, 363, 270, 361, 275, 275, 391, 265, 265, 275, + 275, 327, 265, 327, 273, 265, 267, 270, 370, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 274, + 326, 272, 275, 270, 367, 380, 384, 389, 364, 274, + 364, 365, 364, 360, 232, 266, 302, 327, 232, 325, + 310, 310, 310, 312, 312, 313, 313, 314, 314, 314, + 314, 315, 315, 316, 317, 318, 319, 320, 321, 324, + 268, 270, 362, 354, 272, 275, 367, 392, 327, 275, + 327, 273, 390, 232, 402, 403, 377, 325, 325, 364, + 270, 272, 270, 268, 327, 275, 363, 231, 366, 378, + 393, 266, 266, 327, 342, 349, 382, 265, 268, 272, + 371, 270, 364, 273, 265, 382, 394, 395, 373, 374, + 375, 381, 385, 232, 266, 328, 268, 403, 270, 325, + 327, 275, 266, 19, 369, 368, 269, 274, 368, 372, + 376, 266, 266, 327, 372, 373, 377, 386, 364, 275, + 270 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint16 yyr1[] = +{ + 0, 298, 299, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, 301, 301, 301, 301, 301, + 301, 302, 303, 304, 305, 305, 306, 306, 307, 307, + 308, 309, 309, 310, 310, 310, 310, 311, 311, 311, + 311, 312, 312, 312, 312, 313, 313, 313, 314, 314, + 314, 315, 315, 315, 315, 315, 316, 316, 316, 317, + 317, 318, 318, 319, 319, 320, 320, 321, 321, 322, + 322, 323, 324, 323, 325, 325, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 327, 327, 328, + 329, 329, 329, 329, 329, 329, 329, 329, 329, 331, + 330, 332, 332, 333, 334, 334, 335, 335, 336, 337, + 337, 338, 338, 338, 338, 339, 340, 340, 340, 340, + 340, 341, 341, 341, 341, 341, 342, 342, 343, 344, + 344, 344, 344, 345, 346, 346, 347, 347, 347, 348, + 349, 349, 350, 350, 350, 350, 350, 350, 351, 351, + 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, + 351, 351, 351, 351, 351, 351, 351, 352, 352, 353, + 353, 354, 354, 354, 354, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, + 356, 356, 356, 358, 357, 359, 357, 360, 360, 361, + 361, 362, 362, 363, 363, 364, 364, 364, 365, 365, + 366, 367, 367, 368, 368, 368, 368, 368, 368, 368, + 369, 370, 371, 369, 372, 372, 374, 373, 375, 373, + 376, 376, 377, 377, 378, 378, 379, 379, 380, 381, + 381, 382, 382, 383, 383, 385, 384, 386, 386, 387, + 387, 388, 388, 390, 389, 391, 389, 392, 389, 393, + 393, 394, 394, 395, 395, 396, 396, 396, 396, 396, + 397, 397, 398, 398, 398, 400, 399, 401, 402, 402, + 403, 403 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 1, 4, 1, 3, 2, 2, 1, - 1, 1, 2, 2, 2, 1, 2, 3, 2, 1, - 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, - 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, - 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, + 1, 1, 1, 1, 3, 1, 4, 1, 3, 2, + 2, 1, 1, 1, 2, 2, 2, 1, 2, 3, + 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, + 1, 1, 3, 3, 3, 1, 3, 3, 1, 3, + 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, - 0, 6, 1, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 2, 2, - 4, 2, 3, 4, 2, 3, 4, 0, 6, 2, - 3, 2, 1, 1, 2, 3, 3, 2, 3, 2, - 1, 2, 1, 1, 1, 3, 4, 6, 5, 1, - 2, 3, 5, 4, 1, 2, 1, 1, 1, 1, - 1, 4, 1, 3, 1, 3, 1, 1, 1, 2, + 3, 1, 0, 6, 1, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 2, 2, 4, 2, 3, 4, 2, 3, 4, 0, + 6, 2, 3, 2, 1, 1, 2, 3, 3, 2, + 3, 2, 1, 2, 1, 1, 1, 3, 4, 6, + 5, 1, 2, 3, 5, 4, 1, 2, 1, 1, + 1, 1, 1, 4, 1, 3, 1, 3, 1, 1, + 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 4, 1, 3, 1, + 2, 2, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 4, 1, 3, 1, 2, 2, - 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -1239,1554 +2668,24 @@ static const yytype_uint8 yyr2[] = 4, 1, 3, 1, 2, 1, 3, 4, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 5, 1, 1, 0, 2, 0, 2, - 2, 3, 1, 2, 1, 2, 5, 3, 1, 1, - 4, 0, 8, 0, 1, 3, 2, 0, 6, 0, - 8, 0, 7, 1, 1, 1, 0, 2, 3, 2, - 2, 2, 3, 2, 1, 2, 1, 1, 0, 3 + 2, 3, 1, 2, 1, 2, 1, 2, 5, 3, + 1, 1, 4, 1, 2, 0, 8, 0, 1, 3, + 2, 1, 2, 0, 6, 0, 8, 0, 7, 1, + 1, 1, 0, 2, 3, 2, 2, 2, 3, 2, + 1, 2, 1, 1, 1, 0, 3, 5, 1, 3, + 1, 4 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint16 yydefact[] = -{ - 0, 147, 148, 146, 181, 174, 175, 177, 178, 179, - 180, 176, 163, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 182, 183, - 184, 206, 207, 208, 152, 150, 151, 149, 155, 153, - 154, 156, 157, 158, 159, 160, 161, 162, 185, 186, - 187, 218, 219, 220, 188, 189, 190, 230, 231, 232, - 129, 128, 127, 0, 130, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 253, 256, 257, 258, 259, 260, 261, - 263, 264, 265, 266, 267, 268, 270, 271, 272, 273, - 274, 275, 276, 254, 255, 262, 269, 277, 278, 279, - 280, 281, 282, 351, 283, 284, 285, 286, 287, 288, - 289, 290, 292, 293, 294, 295, 296, 297, 299, 300, - 301, 302, 303, 304, 306, 307, 308, 309, 310, 311, - 291, 298, 305, 312, 313, 314, 315, 316, 317, 352, - 353, 354, 355, 356, 357, 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, - 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, - 343, 344, 345, 346, 347, 348, 349, 350, 0, 173, - 359, 126, 137, 360, 361, 362, 0, 437, 0, 438, - 0, 103, 102, 0, 114, 119, 144, 143, 141, 145, - 0, 138, 140, 124, 167, 142, 358, 0, 434, 436, - 0, 0, 0, 365, 0, 0, 91, 88, 0, 101, - 0, 110, 104, 112, 0, 113, 0, 89, 120, 0, - 94, 139, 125, 0, 168, 1, 435, 165, 0, 136, - 134, 0, 132, 363, 0, 0, 92, 0, 0, 439, - 105, 109, 111, 107, 115, 106, 0, 121, 97, 0, - 95, 0, 2, 8, 9, 4, 5, 6, 7, 11, - 10, 0, 0, 0, 169, 37, 36, 38, 35, 3, - 13, 31, 15, 20, 21, 0, 0, 25, 0, 39, - 0, 43, 46, 49, 54, 57, 59, 61, 63, 65, - 67, 69, 0, 29, 0, 164, 0, 0, 131, 0, - 0, 0, 0, 0, 367, 90, 93, 0, 0, 419, - 0, 0, 0, 0, 0, 0, 0, 0, 391, 400, - 404, 39, 72, 85, 0, 380, 0, 124, 383, 402, - 382, 381, 0, 384, 385, 386, 387, 388, 389, 108, - 0, 116, 0, 375, 123, 0, 0, 99, 0, 96, - 32, 33, 0, 17, 18, 0, 0, 23, 22, 0, - 173, 26, 28, 34, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 70, 170, 171, 0, 166, 87, 135, - 133, 0, 0, 373, 0, 371, 366, 368, 430, 429, - 0, 421, 0, 433, 431, 0, 0, 0, 416, 417, - 390, 0, 75, 76, 78, 77, 80, 81, 82, 83, - 84, 79, 74, 0, 0, 405, 401, 403, 118, 0, - 378, 0, 122, 0, 100, 12, 0, 19, 16, 27, - 40, 41, 42, 45, 44, 47, 48, 52, 53, 50, - 51, 55, 56, 58, 60, 62, 64, 66, 68, 0, - 172, 364, 0, 374, 0, 369, 0, 0, 0, 432, - 0, 415, 0, 392, 73, 86, 117, 376, 0, 98, - 14, 0, 370, 372, 0, 424, 423, 426, 398, 411, - 409, 0, 0, 0, 0, 377, 379, 0, 0, 425, - 0, 0, 408, 0, 0, 406, 0, 0, 0, 393, - 71, 0, 427, 0, 398, 397, 399, 413, 0, 395, - 418, 394, 0, 428, 422, 407, 414, 0, 410, 420, - 412 -}; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 309, 310, 311, 476, 312, 313, 314, 315, 316, - 317, 318, 361, 320, 321, 322, 323, 324, 325, 326, - 327, 328, 329, 330, 331, 362, 499, 363, 463, 364, - 429, 365, 218, 386, 291, 366, 220, 221, 222, 251, - 252, 253, 223, 224, 225, 226, 227, 228, 271, 272, - 229, 230, 231, 232, 268, 333, 264, 234, 235, 236, - 340, 274, 343, 344, 434, 435, 384, 471, 368, 369, - 370, 371, 451, 534, 560, 542, 543, 544, 561, 372, - 373, 374, 545, 533, 375, 546, 567, 376, 377, 512, - 440, 507, 527, 540, 541, 378, 237, 238, 239, 248 -}; +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -512 -static const yytype_int16 yypact[] = -{ - 2538, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -235, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -201, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, -512, -203, -512, - -512, -512, -512, -512, -512, -512, -153, -512, -210, -220, - -152, -189, 4119, -160, -512, -128, -512, -512, -512, -512, - 3079, -512, -512, -512, -122, -512, -512, 564, -512, -512, - -72, -46, -105, -512, 6148, -216, -512, -512, -102, -512, - 4119, -512, -512, -512, 4119, -68, -66, -512, -225, -187, - -512, -512, -512, 4606, -98, -512, -512, -512, -179, -512, - -104, -172, -512, -512, 4119, -101, -512, -186, 846, -512, - -512, -512, -512, -122, -233, -512, 4870, -217, -512, -63, - -512, -151, -512, -512, -512, -512, -512, -512, -512, -512, - -512, 5648, 5648, 5648, -512, -512, -512, -512, -512, -512, - -512, -209, -512, -512, -512, -94, -170, 5898, -92, -512, - 5648, -139, -133, -109, -223, -103, -111, -108, -106, -71, - -74, -218, -86, -512, 5134, -512, -52, 5648, -512, -46, - 4119, 4119, -50, 3342, -512, -512, -512, -90, -89, -512, - -78, -76, -85, 5398, -70, 5648, -80, -69, -64, -512, - -512, -184, -512, -512, -150, -512, -220, -67, -512, -512, - -512, -512, 1128, -512, -512, -512, -512, -512, -512, -98, - 4870, -183, 4870, -512, -512, 4870, 4119, -512, -40, -512, - -512, -512, -169, -512, -512, 5648, -35, -512, -512, 5648, - -65, -512, -512, -512, 5648, 5648, 5648, 5648, 5648, 5648, - 5648, 5648, 5648, 5648, 5648, 5648, 5648, 5648, 5648, 5648, - 5648, 5648, 5648, -512, -512, -512, -61, -512, -512, -512, - -512, 3601, -50, -122, -144, -512, -512, -512, -512, -512, - 1410, -512, 5648, -512, -512, -142, 5648, -123, -512, -512, - -512, 1410, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -512, 5648, 5648, -512, -512, -512, -512, 4870, - -512, -226, -512, 3860, -512, -512, -60, -62, -512, -512, - -512, -512, -512, -139, -139, -133, -133, -109, -109, -109, - -109, -223, -223, -103, -111, -108, -106, -71, -74, 5648, - -512, -512, -138, -98, -50, -512, -33, 2256, -168, -512, - -167, -512, 2798, 1410, -512, -512, -512, -512, 4342, -512, - -512, -121, -512, -512, -56, -512, -512, 2798, -58, -512, - -62, -32, 4119, -49, -51, -512, -512, 5648, 5648, -512, - -57, -45, 177, -55, 1974, -512, -47, -44, 1692, -512, - -512, -165, 5648, 1692, -58, -512, -512, 1410, 4870, -512, - -512, -512, -48, -62, -512, -512, 1410, -42, -512, -512, - -512 -}; +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -512, -512, -512, -512, -512, -512, -512, -512, -512, -512, - -512, -512, -96, -512, -263, -262, -304, -264, -204, -199, - -205, -197, -206, -196, -512, -252, -512, -282, -512, -296, - -512, 3, -512, -512, -512, 6, -512, -512, -512, -29, - -23, -26, -512, -512, -489, -512, -512, -512, -512, -118, - -512, -221, -228, -512, -512, 0, -240, -512, 13, -512, - -512, -512, -328, -330, -200, -271, -363, -512, -273, -364, - -511, -308, -512, -512, -314, -309, -512, -512, -2, -441, - -260, -512, -512, -279, -512, -512, -512, -512, -512, -512, - -512, -512, -512, -512, -512, -512, -512, 12, -512, -512 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -397 -static const yytype_int16 yytable[] = -{ - 233, 254, 261, 217, 383, 277, 219, 392, 467, 269, - 513, 332, 431, 437, 245, 411, 412, 468, 287, 470, - 240, 242, 472, 531, 263, 422, 261, 393, 394, 254, - 285, 380, 263, 556, 517, 401, 518, 559, 531, 286, - 334, 263, 559, 379, 381, 247, -30, 385, 395, 276, - 413, 414, 396, 341, 241, 246, 243, 445, 473, 447, - 423, 452, 453, 454, 455, 456, 457, 458, 459, 460, - 461, 334, 288, 250, 334, 289, 506, 335, 290, 346, - 462, 469, 426, 336, 338, 428, 398, 475, 528, 529, - 339, 562, 399, 464, 464, 464, 258, 464, 383, 477, - 383, 437, 256, 383, 249, 257, 516, 487, 488, 489, - 490, 388, 464, 261, 389, 465, 566, 479, 504, 341, - 464, 505, 341, 509, 504, 409, 410, 522, 213, 214, - 215, 404, 405, 406, 407, 263, 408, 415, 416, 464, - 511, 464, 537, 437, 483, 484, 508, 485, 486, 467, - 510, 491, 492, 267, 273, 536, 283, 278, 284, 334, - 337, 387, 397, 402, 345, 341, 417, 319, 418, 419, - 421, 420, 424, 427, 433, 438, 439, 441, 270, 442, - 443, 514, 515, 448, 474, 446, 449, 383, -29, 478, - 524, -24, 547, 503, 554, 568, 450, 500, 520, 538, - 464, -396, 467, 521, 358, 390, 391, 548, 552, 549, - 341, 553, 557, 493, 495, 497, 530, 569, 570, 494, - 558, 430, 255, 496, 403, 281, 498, 280, 282, 244, - 262, 530, 502, 523, 525, 555, 383, 233, 319, 564, - 217, 319, 551, 219, 275, 565, 279, 526, 539, 266, - 255, 0, 341, 0, 255, 550, 563, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 342, 0, 383, 0, 367, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 532, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 261, 0, 532, 0, 480, 481, - 482, 319, 319, 319, 319, 319, 319, 319, 319, 319, - 319, 319, 319, 319, 319, 319, 319, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 342, 432, 0, 342, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 367, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 342, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, - 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 367, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 342, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 367, 0, 0, - 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 367, 0, 0, - 0, 0, 262, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 367, 0, 0, 0, 367, 0, - 0, 0, 0, 367, 0, 0, 0, 367, 0, 0, - 0, 0, 0, 0, 265, 0, 367, 1, 2, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 0, 0, 210, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 211, 212, 213, 214, 215, 216, 1, - 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 347, 348, 349, 0, 350, 351, 352, 353, 354, 355, - 356, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 357, - 292, 210, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 303, 0, 0, 0, 358, 359, 0, 0, 0, - 0, 360, 305, 306, 307, 308, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 211, 212, 213, 214, 215, - 216, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 347, 348, 349, 0, 350, 351, 352, 353, - 354, 355, 356, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 357, 292, 210, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 303, 0, 0, 0, 358, 466, 0, - 0, 0, 0, 360, 305, 306, 307, 308, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 211, 212, 213, - 214, 215, 216, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 347, 348, 349, 0, 350, 351, - 352, 353, 354, 355, 356, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 357, 292, 210, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 301, 302, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 303, 0, 0, 0, 358, - 0, 0, 0, 0, 0, 360, 305, 306, 307, 308, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 211, - 212, 213, 214, 215, 216, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 347, 348, 349, 0, - 350, 351, 352, 353, 354, 355, 356, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 357, 292, 210, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 301, 302, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, - 0, 278, 0, 0, 0, 0, 0, 360, 305, 306, - 307, 308, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 211, 212, 213, 214, 215, 216, 1, 2, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 347, 348, - 349, 0, 350, 351, 352, 353, 354, 355, 356, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 357, 292, 210, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, - 305, 306, 307, 308, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 211, 212, 213, 214, 215, 216, 1, - 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 0, - 292, 210, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 303, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 360, 305, 306, 307, 308, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 211, 212, 213, 214, 215, - 216, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 0, 0, 210, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 0, 0, 0, 0, 0, 211, 212, 213, - 214, 215, 216, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 0, 292, 210, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 303, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 305, 306, 307, 308, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 211, 212, 213, - 214, 215, 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 0, 259, 210, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 260, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 0, 0, 211, 212, - 213, 214, 215, 0, 0, 0, 0, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 0, 0, 210, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 436, 0, 1, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, - 0, 211, 212, 213, 214, 215, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 0, 0, 210, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 501, 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, - 211, 212, 213, 214, 215, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 0, 0, 210, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 519, 0, 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 0, 0, 0, 0, 0, 0, 211, - 212, 213, 214, 215, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 0, 0, 210, 0, 0, 0, 4, 5, - 6, 7, 8, 9, 10, 11, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 211, 212, - 213, 214, 215, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 0, 0, 0, 0, 0, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 0, 292, 210, 293, 294, - 295, 296, 297, 298, 299, 300, 0, 0, 301, 302, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, - 0, 382, 535, 0, 0, 0, 0, 0, 305, 306, - 307, 308, 4, 5, 6, 7, 8, 9, 10, 11, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 0, - 0, 0, 0, 0, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 0, - 292, 210, 293, 294, 295, 296, 297, 298, 299, 300, - 0, 0, 301, 302, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 303, 0, 0, 304, 0, 0, 0, 0, 0, - 0, 0, 305, 306, 307, 308, 4, 5, 6, 7, - 8, 9, 10, 11, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 0, 0, 0, 0, 0, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 0, 292, 210, 293, 294, 295, 296, - 297, 298, 299, 300, 0, 0, 301, 302, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 303, 0, 0, 0, 382, - 0, 0, 0, 0, 0, 0, 305, 306, 307, 308, - 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 0, 0, 0, - 0, 0, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 0, 292, 210, - 293, 294, 295, 296, 297, 298, 299, 300, 0, 0, - 301, 302, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, - 0, 0, 425, 0, 0, 0, 0, 0, 0, 0, - 305, 306, 307, 308, 4, 5, 6, 7, 8, 9, - 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 0, 0, 0, 0, 0, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 0, 292, 210, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 303, 4, 5, 6, 7, 8, 9, - 10, 11, 0, 444, 305, 306, 307, 308, 0, 0, - 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 0, 0, 0, 0, 0, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 0, 292, 210, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 303, 4, 5, 6, 7, 8, 9, - 10, 11, 0, 0, 305, 306, 307, 308, 0, 0, - 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 0, 0, 0, 0, 0, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 400, 0, 292, 210, 293, 294, 295, 296, 297, 298, - 299, 300, 0, 0, 301, 302, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 303, 4, 5, 6, 7, 8, 9, - 10, 11, 0, 0, 305, 306, 307, 308, 0, 0, - 0, 0, 0, 0, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 0, 0, 0, 0, 0, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 0, 0, 210 -}; - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-512))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - -static const yytype_int16 yycheck[] = -{ - 0, 222, 230, 0, 286, 245, 0, 303, 372, 55, - 451, 263, 340, 343, 224, 238, 239, 380, 258, 382, - 255, 224, 385, 512, 257, 243, 254, 236, 237, 250, - 255, 264, 257, 544, 260, 317, 262, 548, 527, 264, - 257, 257, 553, 283, 284, 265, 255, 264, 257, 265, - 273, 274, 261, 274, 255, 265, 259, 353, 386, 355, - 278, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 257, 259, 262, 257, 262, 440, 256, 265, 265, - 264, 264, 334, 262, 256, 337, 256, 256, 256, 256, - 262, 256, 262, 262, 262, 262, 224, 262, 380, 395, - 382, 431, 262, 385, 256, 265, 469, 411, 412, 413, - 414, 262, 262, 341, 265, 265, 557, 399, 262, 340, - 262, 265, 343, 265, 262, 234, 235, 265, 281, 282, - 283, 270, 271, 272, 267, 257, 269, 240, 241, 262, - 263, 262, 263, 473, 407, 408, 442, 409, 410, 513, - 446, 415, 416, 225, 259, 518, 224, 259, 224, 257, - 264, 224, 256, 255, 265, 386, 277, 263, 276, 275, - 244, 242, 258, 225, 224, 265, 265, 255, 224, 255, - 265, 463, 464, 263, 224, 255, 255, 469, 255, 224, - 223, 256, 224, 433, 17, 558, 260, 258, 258, 255, - 262, 259, 566, 499, 259, 301, 302, 256, 265, 260, - 431, 256, 259, 417, 419, 421, 512, 265, 260, 418, - 264, 339, 222, 420, 320, 254, 422, 250, 254, 216, - 230, 527, 432, 504, 507, 543, 518, 237, 334, 553, - 237, 337, 538, 237, 244, 554, 248, 507, 527, 237, - 250, -1, 473, -1, 254, 537, 552, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 274, -1, 558, -1, 278, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 512, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 532, -1, 527, -1, 404, 405, - 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, - 416, 417, 418, 419, 420, 421, 422, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 340, 341, -1, 343, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 372, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 386, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 431, -1, -1, -1, -1, -1, -1, -1, -1, - 440, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 451, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 473, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 507, -1, -1, - -1, -1, 512, 513, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 527, -1, -1, - -1, -1, 532, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 544, -1, -1, -1, 548, -1, - -1, -1, -1, 553, -1, -1, -1, 557, -1, -1, - -1, -1, -1, -1, 0, -1, 566, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, -1, -1, 225, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 279, 280, 281, 282, 283, 284, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 255, -1, -1, -1, 259, 260, -1, -1, -1, - -1, 265, 266, 267, 268, 269, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 279, 280, 281, 282, 283, - 284, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 255, -1, -1, -1, 259, 260, -1, - -1, -1, -1, 265, 266, 267, 268, 269, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 279, 280, 281, - 282, 283, 284, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, -1, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, -1, -1, 236, 237, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 255, -1, -1, -1, 259, - -1, -1, -1, -1, -1, 265, 266, 267, 268, 269, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 279, - 280, 281, 282, 283, 284, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, -1, -1, 236, 237, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 255, -1, -1, - -1, 259, -1, -1, -1, -1, -1, 265, 266, 267, - 268, 269, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 279, 280, 281, 282, 283, 284, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, -1, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 230, 231, 232, 233, -1, -1, - 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 255, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 265, - 266, 267, 268, 269, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 279, 280, 281, 282, 283, 284, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, -1, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 255, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 265, 266, 267, 268, 269, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 279, 280, 281, 282, 283, - 284, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, -1, -1, 225, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, -1, -1, -1, -1, -1, 279, 280, 281, - 282, 283, 284, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, -1, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 255, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 266, 267, 268, 269, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 279, 280, 281, - 282, 283, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, -1, 224, 225, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 265, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, -1, -1, 279, 280, - 281, 282, 283, -1, -1, -1, -1, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, -1, -1, 225, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 260, -1, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, -1, -1, -1, -1, -1, - -1, 279, 280, 281, 282, 283, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, -1, -1, 225, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 260, -1, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, - 279, 280, 281, 282, 283, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, -1, -1, 225, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 260, -1, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, -1, -1, -1, -1, -1, -1, 279, - 280, 281, 282, 283, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, -1, -1, 225, -1, -1, -1, 6, 7, - 8, 9, 10, 11, 12, 13, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 279, 280, - 281, 282, 283, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, -1, -1, -1, -1, -1, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, -1, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, -1, -1, 236, 237, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 255, -1, -1, - -1, 259, 260, -1, -1, -1, -1, -1, 266, 267, - 268, 269, 6, 7, 8, 9, 10, 11, 12, 13, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, -1, - -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, -1, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - -1, -1, 236, 237, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 255, -1, -1, 258, -1, -1, -1, -1, -1, - -1, -1, 266, 267, 268, 269, 6, 7, 8, 9, - 10, 11, 12, 13, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, -1, -1, -1, -1, -1, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, -1, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, -1, -1, 236, 237, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 255, -1, -1, -1, 259, - -1, -1, -1, -1, -1, -1, 266, 267, 268, 269, - 6, 7, 8, 9, 10, 11, 12, 13, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, -1, -1, -1, - -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, -1, 224, 225, - 226, 227, 228, 229, 230, 231, 232, 233, -1, -1, - 236, 237, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 255, - -1, -1, 258, -1, -1, -1, -1, -1, -1, -1, - 266, 267, 268, 269, 6, 7, 8, 9, 10, 11, - 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, -1, -1, -1, -1, -1, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, -1, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 255, 6, 7, 8, 9, 10, 11, - 12, 13, -1, 265, 266, 267, 268, 269, -1, -1, - -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, -1, -1, -1, -1, -1, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, -1, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 255, 6, 7, 8, 9, 10, 11, - 12, 13, -1, -1, 266, 267, 268, 269, -1, -1, - -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, -1, -1, -1, -1, -1, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, -1, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, -1, -1, 236, 237, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 255, 6, 7, 8, 9, 10, 11, - 12, 13, -1, -1, 266, 267, 268, 269, -1, -1, - -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, -1, -1, -1, -1, -1, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, -1, -1, 225 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint16 yystos[] = -{ - 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 225, 279, 280, 281, 282, 283, 284, 319, 320, 323, - 324, 325, 326, 330, 331, 332, 333, 334, 335, 338, - 339, 340, 341, 343, 345, 346, 347, 384, 385, 386, - 255, 255, 224, 259, 346, 224, 265, 265, 387, 256, - 262, 327, 328, 329, 339, 343, 262, 265, 224, 224, - 265, 340, 343, 257, 344, 0, 385, 225, 342, 55, - 224, 336, 337, 259, 349, 343, 265, 344, 259, 366, - 328, 327, 329, 224, 224, 255, 264, 344, 259, 262, - 265, 322, 224, 226, 227, 228, 229, 230, 231, 232, - 233, 236, 237, 255, 258, 266, 267, 268, 269, 289, - 290, 291, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 343, 257, 256, 262, 264, 256, 262, - 348, 339, 343, 350, 351, 265, 265, 14, 15, 16, - 18, 19, 20, 21, 22, 23, 24, 223, 259, 260, - 265, 300, 313, 315, 317, 319, 323, 343, 356, 357, - 358, 359, 367, 368, 369, 372, 375, 376, 383, 344, - 264, 344, 259, 315, 354, 264, 321, 224, 262, 265, - 300, 300, 317, 236, 237, 257, 261, 256, 256, 262, - 222, 315, 255, 300, 270, 271, 272, 267, 269, 234, - 235, 238, 239, 273, 274, 240, 241, 277, 276, 275, - 242, 244, 243, 278, 258, 258, 313, 225, 313, 318, - 337, 350, 343, 224, 352, 353, 260, 351, 265, 265, - 378, 255, 255, 265, 265, 317, 255, 317, 263, 255, - 260, 360, 245, 246, 247, 248, 249, 250, 251, 252, - 253, 254, 264, 316, 262, 265, 260, 357, 354, 264, - 354, 355, 354, 350, 224, 256, 292, 317, 224, 315, - 300, 300, 300, 302, 302, 303, 303, 304, 304, 304, - 304, 305, 305, 306, 307, 308, 309, 310, 311, 314, - 258, 260, 352, 344, 262, 265, 357, 379, 317, 265, - 317, 263, 377, 367, 315, 315, 354, 260, 262, 260, - 258, 317, 265, 353, 223, 356, 368, 380, 256, 256, - 317, 332, 339, 371, 361, 260, 354, 263, 255, 371, - 381, 382, 363, 364, 365, 370, 373, 224, 256, 260, - 315, 317, 265, 256, 17, 359, 358, 259, 264, 358, - 362, 366, 256, 317, 362, 363, 367, 374, 354, 265, - 260 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) @@ -2803,27 +2702,15 @@ do \ else \ { \ yyerror (pParseContext, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, parseContext) -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -2833,58 +2720,47 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, pParseContext); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, pParseContext); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, pParseContext) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - glslang::TParseContext* pParseContext; -#endif { FILE *yyo = yyoutput; YYUSE (yyo); + YYUSE (pParseContext); if (!yyvaluep) return; - YYUSE (pParseContext); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -2892,23 +2768,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, pParseContext) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, pParseContext) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - glslang::TParseContext* pParseContext; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, pParseContext); YYFPRINTF (yyoutput, ")"); @@ -2919,16 +2783,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, pParseContext) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -2939,50 +2795,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule, glslang::TParseContext* pParseContext) -#else -static void -yy_reduce_print (yyvsp, yyrule, pParseContext) - YYSTYPE *yyvsp; - int yyrule; - glslang::TParseContext* pParseContext; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, glslang::TParseContext* pParseContext) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , pParseContext); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , pParseContext); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule, pParseContext); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, pParseContext); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -2996,7 +2844,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -3019,15 +2867,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -3043,16 +2884,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -3082,27 +2915,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -3137,10 +2970,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -3257,33 +3086,18 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, glslang::TParseContext* pParseContext) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, pParseContext) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - glslang::TParseContext* pParseContext; -#endif { YYUSE (yyvaluep); YYUSE (pParseContext); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -3293,56 +3107,18 @@ yydestruct (yymsg, yytype, yyvaluep, pParseContext) | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (glslang::TParseContext* pParseContext) -#else -int -yyparse (pParseContext) - glslang::TParseContext* pParseContext; -#endif -#endif { /* The lookahead symbol. */ int yychar; -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else +/* The semantic value of the lookahead symbol. */ /* Default value used for initialization, for pacifying older GCCs or non-GCC compilers. */ -static YYSTYPE yyval_default; -# define YY_INITIAL_VALUE(Value) = Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Number of syntax errors so far. */ int yynerrs; @@ -3352,8 +3128,8 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -3421,23 +3197,23 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -3445,22 +3221,22 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -3469,10 +3245,10 @@ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -3501,7 +3277,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (&yylval, parseContext); } if (yychar <= YYEOF) @@ -3566,7 +3342,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -3580,259 +3356,280 @@ yyreduce: switch (yyn) { case 2: -/* Line 1792 of yacc.c */ -#line 250 "glslang.y" +#line 257 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[(1) - (1)].lex).loc, (yyvsp[(1) - (1)].lex).symbol, (yyvsp[(1) - (1)].lex).string); + (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string); } +#line 3364 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 3: -/* Line 1792 of yacc.c */ -#line 256 "glslang.y" +#line 263 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3372 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 4: -/* Line 1792 of yacc.c */ -#line 259 "glslang.y" +#line 266 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).i, (yyvsp[(1) - (1)].lex).loc, true); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } +#line 3380 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 5: -/* Line 1792 of yacc.c */ -#line 262 "glslang.y" +#line 269 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).u, (yyvsp[(1) - (1)].lex).loc, true); + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } +#line 3389 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 6: -/* Line 1792 of yacc.c */ -#line 266 "glslang.y" +#line 273 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit integer literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).i64, (yyvsp[(1) - (1)].lex).loc, true); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true); } +#line 3398 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 7: -/* Line 1792 of yacc.c */ -#line 270 "glslang.y" +#line 277 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit unsigned integer literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).u64, (yyvsp[(1) - (1)].lex).loc, true); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true); } +#line 3407 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 8: -/* Line 1792 of yacc.c */ -#line 274 "glslang.y" +#line 281 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).d, EbtFloat, (yyvsp[(1) - (1)].lex).loc, true); +#ifdef AMD_EXTENSIONS + parseContext.int16Check((yyvsp[0].lex).loc, "16-bit integer literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((short)(yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); +#endif } +#line 3418 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 9: -/* Line 1792 of yacc.c */ -#line 277 "glslang.y" +#line 287 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).d, EbtDouble, (yyvsp[(1) - (1)].lex).loc, true); +#ifdef AMD_EXTENSIONS + parseContext.int16Check((yyvsp[0].lex).loc, "16-bit unsigned integer literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((unsigned short)(yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); +#endif } +#line 3429 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 10: -/* Line 1792 of yacc.c */ -#line 281 "glslang.y" +#line 293 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float literal"); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).d, EbtFloat16, (yyvsp[(1) - (1)].lex).loc, true); -#endif + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } +#line 3437 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 11: -/* Line 1792 of yacc.c */ -#line 287 "glslang.y" +#line 296 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[(1) - (1)].lex).b, (yyvsp[(1) - (1)].lex).loc, true); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true); } +#line 3446 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 12: -/* Line 1792 of yacc.c */ -#line 290 "glslang.y" +#line 300 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode); - if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) - (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[0].lex).loc, "half float literal"); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat16, (yyvsp[0].lex).loc, true); +#endif } +#line 3457 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 13: -/* Line 1792 of yacc.c */ -#line 298 "glslang.y" +#line 306 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } +#line 3465 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 14: -/* Line 1792 of yacc.c */ -#line 301 "glslang.y" +#line 309 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[(2) - (4)].lex).loc, (yyvsp[(1) - (4)].interm.intermTypedNode), (yyvsp[(3) - (4)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); + if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) + (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } +#line 3475 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 15: -/* Line 1792 of yacc.c */ -#line 304 "glslang.y" +#line 317 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3483 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 16: -/* Line 1792 of yacc.c */ -#line 307 "glslang.y" +#line 320 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[(3) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode), *(yyvsp[(3) - (3)].lex).string); + (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode)); } +#line 3491 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 17: -/* Line 1792 of yacc.c */ -#line 310 "glslang.y" +#line 323 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.variableCheck((yyvsp[(1) - (2)].interm.intermTypedNode)); - parseContext.lValueErrorCheck((yyvsp[(2) - (2)].lex).loc, "++", (yyvsp[(1) - (2)].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(2) - (2)].lex).loc, "++", EOpPostIncrement, (yyvsp[(1) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3499 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 18: -/* Line 1792 of yacc.c */ -#line 315 "glslang.y" +#line 326 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.variableCheck((yyvsp[(1) - (2)].interm.intermTypedNode)); - parseContext.lValueErrorCheck((yyvsp[(2) - (2)].lex).loc, "--", (yyvsp[(1) - (2)].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(2) - (2)].lex).loc, "--", EOpPostDecrement, (yyvsp[(1) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string); } +#line 3507 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 19: -/* Line 1792 of yacc.c */ -#line 323 "glslang.y" +#line 329 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.integerCheck((yyvsp[(1) - (1)].interm.intermTypedNode), "[]"); - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); + parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode)); } +#line 3517 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 20: -/* Line 1792 of yacc.c */ -#line 330 "glslang.y" +#line 334 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[(1) - (1)].interm).loc, (yyvsp[(1) - (1)].interm).function, (yyvsp[(1) - (1)].interm).intermNode); - delete (yyvsp[(1) - (1)].interm).function; + parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); + parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode)); } +#line 3527 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 21: -/* Line 1792 of yacc.c */ -#line 337 "glslang.y" +#line 342 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (1)].interm); + parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]"); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3536 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 22: -/* Line 1792 of yacc.c */ -#line 343 "glslang.y" +#line 349 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (2)].interm); - (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; + (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode); + delete (yyvsp[0].interm).function; } +#line 3545 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 23: -/* Line 1792 of yacc.c */ -#line 347 "glslang.y" +#line 356 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (2)].interm); - (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; + (yyval.interm) = (yyvsp[0].interm); } +#line 3553 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 24: -/* Line 1792 of yacc.c */ -#line 354 "glslang.y" +#line 362 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (2)].interm); + (yyval.interm) = (yyvsp[-1].interm); + (yyval.interm).loc = (yyvsp[0].lex).loc; } +#line 3562 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 25: -/* Line 1792 of yacc.c */ -#line 357 "glslang.y" +#line 366 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (1)].interm); + (yyval.interm) = (yyvsp[-1].interm); + (yyval.interm).loc = (yyvsp[0].lex).loc; } +#line 3571 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 26: -/* Line 1792 of yacc.c */ -#line 363 "glslang.y" +#line 373 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - TParameter param = { 0, new TType }; - param.type->shallowCopy((yyvsp[(2) - (2)].interm.intermTypedNode)->getType()); - (yyvsp[(1) - (2)].interm).function->addParameter(param); - (yyval.interm).function = (yyvsp[(1) - (2)].interm).function; - (yyval.interm).intermNode = (yyvsp[(2) - (2)].interm.intermTypedNode); + (yyval.interm) = (yyvsp[-1].interm); } +#line 3579 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 27: -/* Line 1792 of yacc.c */ -#line 370 "glslang.y" +#line 376 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - TParameter param = { 0, new TType }; - param.type->shallowCopy((yyvsp[(3) - (3)].interm.intermTypedNode)->getType()); - (yyvsp[(1) - (3)].interm).function->addParameter(param); - (yyval.interm).function = (yyvsp[(1) - (3)].interm).function; - (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).loc); + (yyval.interm) = (yyvsp[0].interm); } +#line 3587 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 28: -/* Line 1792 of yacc.c */ -#line 380 "glslang.y" +#line 382 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (2)].interm); + TParameter param = { 0, new TType }; + param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); + (yyvsp[-1].interm).function->addParameter(param); + (yyval.interm).function = (yyvsp[-1].interm).function; + (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); } +#line 3599 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 29: -/* Line 1792 of yacc.c */ -#line 388 "glslang.y" +#line 389 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // Constructor - (yyval.interm).intermNode = 0; - (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[(1) - (1)].interm.type).loc, (yyvsp[(1) - (1)].interm.type)); + TParameter param = { 0, new TType }; + param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); + (yyvsp[-2].interm).function->addParameter(param); + (yyval.interm).function = (yyvsp[-2].interm).function; + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); } +#line 3611 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 30: -/* Line 1792 of yacc.c */ -#line 393 "glslang.y" +#line 399 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm) = (yyvsp[-1].interm); + } +#line 3619 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 31: +#line 407 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + // Constructor + (yyval.interm).intermNode = 0; + (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); + } +#line 3629 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 32: +#line 412 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // // Should be a method or subroutine call, but we haven't recognized the arguments yet. @@ -3840,18 +3637,18 @@ yyreduce: (yyval.interm).function = 0; (yyval.interm).intermNode = 0; - TIntermMethod* method = (yyvsp[(1) - (1)].interm.intermTypedNode)->getAsMethodNode(); + TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode(); if (method) { (yyval.interm).function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength); (yyval.interm).intermNode = method->getObject(); } else { - TIntermSymbol* symbol = (yyvsp[(1) - (1)].interm.intermTypedNode)->getAsSymbolNode(); + TIntermSymbol* symbol = (yyvsp[0].interm.intermTypedNode)->getAsSymbolNode(); if (symbol) { parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName()); TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid)); (yyval.interm).function = function; } else - parseContext.error((yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc(), "function call, method, or subroutine call expected", "", ""); + parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "function call, method, or subroutine call expected", "", ""); } if ((yyval.interm).function == 0) { @@ -3860,3916 +3657,4058 @@ yyreduce: (yyval.interm).function = new TFunction(&empty, TType(EbtVoid), EOpNull); } } - break; - - case 31: -/* Line 1792 of yacc.c */ -#line 423 "glslang.y" - { - parseContext.variableCheck((yyvsp[(1) - (1)].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); - if (TIntermMethod* method = (yyvsp[(1) - (1)].interm.intermTypedNode)->getAsMethodNode()) - parseContext.error((yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); - } - break; - - case 32: -/* Line 1792 of yacc.c */ -#line 429 "glslang.y" - { - parseContext.lValueErrorCheck((yyvsp[(1) - (2)].lex).loc, "++", (yyvsp[(2) - (2)].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(1) - (2)].lex).loc, "++", EOpPreIncrement, (yyvsp[(2) - (2)].interm.intermTypedNode)); - } +#line 3661 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 33: -/* Line 1792 of yacc.c */ -#line 433 "glslang.y" +#line 442 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.lValueErrorCheck((yyvsp[(1) - (2)].lex).loc, "--", (yyvsp[(2) - (2)].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(1) - (2)].lex).loc, "--", EOpPreDecrement, (yyvsp[(2) - (2)].interm.intermTypedNode)); + parseContext.variableCheck((yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode()) + parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); } +#line 3672 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 34: -/* Line 1792 of yacc.c */ -#line 437 "glslang.y" +#line 448 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (2)].interm).op != EOpNull) { + parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode)); + } +#line 3681 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 35: +#line 452 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode)); + } +#line 3690 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 36: +#line 456 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + if ((yyvsp[-1].interm).op != EOpNull) { char errorOp[2] = {0, 0}; - switch((yyvsp[(1) - (2)].interm).op) { + switch((yyvsp[-1].interm).op) { case EOpNegative: errorOp[0] = '-'; break; case EOpLogicalNot: errorOp[0] = '!'; break; case EOpBitwiseNot: errorOp[0] = '~'; break; default: break; // some compilers want this } - (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[(1) - (2)].interm).loc, errorOp, (yyvsp[(1) - (2)].interm).op, (yyvsp[(2) - (2)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].interm).loc, errorOp, (yyvsp[-1].interm).op, (yyvsp[0].interm.intermTypedNode)); } else { - (yyval.interm.intermTypedNode) = (yyvsp[(2) - (2)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } } - break; - - case 35: -/* Line 1792 of yacc.c */ -#line 457 "glslang.y" - { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpNull; } - break; - - case 36: -/* Line 1792 of yacc.c */ -#line 458 "glslang.y" - { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpNegative; } +#line 3711 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 37: -/* Line 1792 of yacc.c */ -#line 459 "glslang.y" - { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpLogicalNot; } +#line 476 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; } +#line 3717 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 38: -/* Line 1792 of yacc.c */ -#line 460 "glslang.y" - { (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpBitwiseNot; - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise not"); } +#line 477 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; } +#line 3723 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 39: -/* Line 1792 of yacc.c */ -#line 466 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 478 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; } +#line 3729 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 40: -/* Line 1792 of yacc.c */ -#line 467 "glslang.y" - { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "*", EOpMul, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); - } +#line 479 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot; + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); } +#line 3736 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 41: -/* Line 1792 of yacc.c */ -#line 472 "glslang.y" - { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "/", EOpDiv, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); - } +#line 485 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3742 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 42: -/* Line 1792 of yacc.c */ -#line 477 "glslang.y" +#line 486 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "%"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "%", EOpMod, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } +#line 3752 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 43: -/* Line 1792 of yacc.c */ -#line 486 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 491 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 3762 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 44: -/* Line 1792 of yacc.c */ -#line 487 "glslang.y" +#line 496 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "+", EOpAdd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } +#line 3773 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 45: -/* Line 1792 of yacc.c */ -#line 492 "glslang.y" - { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "-", EOpSub, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); - } +#line 505 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3779 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 46: -/* Line 1792 of yacc.c */ -#line 500 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 506 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 3789 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 47: -/* Line 1792 of yacc.c */ -#line 501 "glslang.y" +#line 511 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bit shift left"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "<<", EOpLeftShift, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } +#line 3799 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 48: -/* Line 1792 of yacc.c */ -#line 507 "glslang.y" - { - parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bit shift right"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, ">>", EOpRightShift, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); - } +#line 519 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3805 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 49: -/* Line 1792 of yacc.c */ -#line 516 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 520 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 3816 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 50: -/* Line 1792 of yacc.c */ -#line 517 "glslang.y" +#line 526 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "<", EOpLessThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } +#line 3827 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 51: -/* Line 1792 of yacc.c */ -#line 522 "glslang.y" - { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, ">", EOpGreaterThan, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); - } +#line 535 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3833 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 52: -/* Line 1792 of yacc.c */ -#line 527 "glslang.y" +#line 536 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "<=", EOpLessThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } +#line 3843 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 53: -/* Line 1792 of yacc.c */ -#line 532 "glslang.y" +#line 541 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } +#line 3853 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 54: -/* Line 1792 of yacc.c */ -#line 540 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 546 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 3863 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 55: -/* Line 1792 of yacc.c */ -#line 541 "glslang.y" +#line 551 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.arrayObjectCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "array comparison"); - parseContext.opaqueCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "=="); - parseContext.specializationCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "=="); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "==", EOpEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } +#line 3873 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 56: -/* Line 1792 of yacc.c */ -#line 549 "glslang.y" - { - parseContext.arrayObjectCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "array comparison"); - parseContext.opaqueCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "!="); - parseContext.specializationCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "!="); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "!=", EOpNotEqual, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); - if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); - } +#line 559 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3879 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 57: -/* Line 1792 of yacc.c */ -#line 560 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 560 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); + parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); + parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "==", EOpEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); + } +#line 3892 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 58: -/* Line 1792 of yacc.c */ -#line 561 "glslang.y" +#line 568 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bitwise and"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "&", EOpAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); + parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); + parseContext.specializationCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "!=", EOpNotEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } +#line 3905 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 59: -/* Line 1792 of yacc.c */ -#line 570 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 579 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3911 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 60: -/* Line 1792 of yacc.c */ -#line 571 "glslang.y" +#line 580 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bitwise exclusive or"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "^", EOpExclusiveOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } +#line 3922 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 61: -/* Line 1792 of yacc.c */ -#line 580 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 589 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3928 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 62: -/* Line 1792 of yacc.c */ -#line 581 "glslang.y" +#line 590 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(2) - (3)].lex).loc, "bitwise inclusive or"); - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "|", EOpInclusiveOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } +#line 3939 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 63: -/* Line 1792 of yacc.c */ -#line 590 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 599 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3945 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 64: -/* Line 1792 of yacc.c */ -#line 591 "glslang.y" +#line 600 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "&&", EOpLogicalAnd, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or"); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } +#line 3956 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 65: -/* Line 1792 of yacc.c */ -#line 599 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 609 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3962 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 66: -/* Line 1792 of yacc.c */ -#line 600 "glslang.y" +#line 610 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "^^", EOpLogicalXor, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } +#line 3972 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 67: -/* Line 1792 of yacc.c */ -#line 608 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 618 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3978 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 68: -/* Line 1792 of yacc.c */ -#line 609 "glslang.y" +#line 619 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[(2) - (3)].lex).loc, "||", EOpLogicalOr, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) - (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[(2) - (3)].lex).loc); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } +#line 3988 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 69: -/* Line 1792 of yacc.c */ -#line 617 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 627 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 3994 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 70: -/* Line 1792 of yacc.c */ -#line 618 "glslang.y" +#line 628 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - ++parseContext.controlFlowNestingLevel; + (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + if ((yyval.interm.intermTypedNode) == 0) + (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } +#line 4004 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 71: -/* Line 1792 of yacc.c */ -#line 621 "glslang.y" - { - --parseContext.controlFlowNestingLevel; - parseContext.boolCheck((yyvsp[(2) - (6)].lex).loc, (yyvsp[(1) - (6)].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[(2) - (6)].lex).loc, "?", (yyvsp[(1) - (6)].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[(5) - (6)].lex).loc, ":", (yyvsp[(4) - (6)].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[(5) - (6)].lex).loc, ":", (yyvsp[(6) - (6)].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addSelection((yyvsp[(1) - (6)].interm.intermTypedNode), (yyvsp[(4) - (6)].interm.intermTypedNode), (yyvsp[(6) - (6)].interm.intermTypedNode), (yyvsp[(2) - (6)].lex).loc); - if ((yyval.interm.intermTypedNode) == 0) { - parseContext.binaryOpError((yyvsp[(2) - (6)].lex).loc, ":", (yyvsp[(4) - (6)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(6) - (6)].interm.intermTypedNode)->getCompleteString()); - (yyval.interm.intermTypedNode) = (yyvsp[(6) - (6)].interm.intermTypedNode); - } - } +#line 636 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4010 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 72: -/* Line 1792 of yacc.c */ -#line 636 "glslang.y" - { (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); } +#line 637 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + ++parseContext.controlFlowNestingLevel; + } +#line 4018 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 73: -/* Line 1792 of yacc.c */ -#line 637 "glslang.y" +#line 640 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.arrayObjectCheck((yyvsp[(2) - (3)].interm).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "array assignment"); - parseContext.opaqueCheck((yyvsp[(2) - (3)].interm).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "="); - parseContext.specializationCheck((yyvsp[(2) - (3)].interm).loc, (yyvsp[(1) - (3)].interm.intermTypedNode)->getType(), "="); - parseContext.lValueErrorCheck((yyvsp[(2) - (3)].interm).loc, "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)); - parseContext.rValueErrorCheck((yyvsp[(2) - (3)].interm).loc, "assign", (yyvsp[(3) - (3)].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addAssign((yyvsp[(2) - (3)].interm).op, (yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].interm).loc); + --parseContext.controlFlowNestingLevel; + parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[-4].lex).loc, "?", (yyvsp[-5].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[-1].lex).loc, ":", (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addSelection((yyvsp[-5].interm.intermTypedNode), (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-4].lex).loc); if ((yyval.interm.intermTypedNode) == 0) { - parseContext.assignError((yyvsp[(2) - (3)].interm).loc, "assign", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (3)].interm.intermTypedNode); + parseContext.binaryOpError((yyvsp[-4].lex).loc, ":", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } +#line 4035 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 74: -/* Line 1792 of yacc.c */ -#line 652 "glslang.y" - { - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; - (yyval.interm).op = EOpAssign; - } +#line 655 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4041 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 75: -/* Line 1792 of yacc.c */ -#line 656 "glslang.y" +#line 656 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; - (yyval.interm).op = EOpMulAssign; + parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment"); + parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); + parseContext.specializationCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); + parseContext.lValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)); + parseContext.rValueErrorCheck((yyvsp[-1].interm).loc, "assign", (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addAssign((yyvsp[-1].interm).op, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].interm).loc); + if ((yyval.interm.intermTypedNode) == 0) { + parseContext.assignError((yyvsp[-1].interm).loc, "assign", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } } +#line 4058 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 76: -/* Line 1792 of yacc.c */ -#line 660 "glslang.y" +#line 671 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; - (yyval.interm).op = EOpDivAssign; + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpAssign; } +#line 4067 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 77: -/* Line 1792 of yacc.c */ -#line 664 "glslang.y" +#line 675 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "%="); - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; - (yyval.interm).op = EOpModAssign; + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpMulAssign; } +#line 4076 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 78: -/* Line 1792 of yacc.c */ -#line 669 "glslang.y" +#line 679 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; - (yyval.interm).op = EOpAddAssign; + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpDivAssign; } +#line 4085 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 79: -/* Line 1792 of yacc.c */ -#line 673 "glslang.y" +#line 683 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; - (yyval.interm).op = EOpSubAssign; + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%="); + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpModAssign; } +#line 4095 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 80: -/* Line 1792 of yacc.c */ -#line 677 "glslang.y" +#line 688 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bit-shift left assign"); - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpAddAssign; } +#line 4104 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 81: -/* Line 1792 of yacc.c */ -#line 681 "glslang.y" +#line 692 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bit-shift right assign"); - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpRightShiftAssign; + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).op = EOpSubAssign; } +#line 4113 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 82: -/* Line 1792 of yacc.c */ -#line 685 "glslang.y" +#line 696 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise-and assign"); - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpAndAssign; + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign"); + (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; } +#line 4122 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 83: -/* Line 1792 of yacc.c */ -#line 689 "glslang.y" +#line 700 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise-xor assign"); - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign"); + (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign; } +#line 4131 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 84: -/* Line 1792 of yacc.c */ -#line 693 "glslang.y" +#line 704 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "bitwise-or assign"); - (yyval.interm).loc = (yyvsp[(1) - (1)].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign"); + (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign; } +#line 4140 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 85: -/* Line 1792 of yacc.c */ -#line 700 "glslang.y" +#line 708 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign"); + (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; } +#line 4149 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 86: -/* Line 1792 of yacc.c */ -#line 703 "glslang.y" +#line 712 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.samplerConstructorLocationCheck((yyvsp[(2) - (3)].lex).loc, ",", (yyvsp[(3) - (3)].interm.intermTypedNode)); - (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode), (yyvsp[(2) - (3)].lex).loc); - if ((yyval.interm.intermTypedNode) == 0) { - parseContext.binaryOpError((yyvsp[(2) - (3)].lex).loc, ",", (yyvsp[(1) - (3)].interm.intermTypedNode)->getCompleteString(), (yyvsp[(3) - (3)].interm.intermTypedNode)->getCompleteString()); - (yyval.interm.intermTypedNode) = (yyvsp[(3) - (3)].interm.intermTypedNode); - } + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign"); + (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; } +#line 4158 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 87: -/* Line 1792 of yacc.c */ -#line 714 "glslang.y" +#line 719 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.constantValueCheck((yyvsp[(1) - (1)].interm.intermTypedNode), ""); - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4166 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 88: -/* Line 1792 of yacc.c */ -#line 721 "glslang.y" +#line 722 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.handleFunctionDeclarator((yyvsp[(1) - (2)].interm).loc, *(yyvsp[(1) - (2)].interm).function, true /* prototype */); - (yyval.interm.intermNode) = 0; - // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature + parseContext.samplerConstructorLocationCheck((yyvsp[-1].lex).loc, ",", (yyvsp[0].interm.intermTypedNode)); + (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); + if ((yyval.interm.intermTypedNode) == 0) { + parseContext.binaryOpError((yyvsp[-1].lex).loc, ",", (yyvsp[-2].interm.intermTypedNode)->getCompleteString(), (yyvsp[0].interm.intermTypedNode)->getCompleteString()); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + } } +#line 4179 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 89: -/* Line 1792 of yacc.c */ -#line 726 "glslang.y" +#line 733 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (2)].interm).intermNode && (yyvsp[(1) - (2)].interm).intermNode->getAsAggregate()) - (yyvsp[(1) - (2)].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); - (yyval.interm.intermNode) = (yyvsp[(1) - (2)].interm).intermNode; + parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), ""); + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } +#line 4188 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 90: -/* Line 1792 of yacc.c */ -#line 731 "glslang.y" +#line 740 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.profileRequires((yyvsp[(1) - (4)].lex).loc, ENoProfile, 130, 0, "precision statement"); - - // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope - parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); - parseContext.setDefaultPrecision((yyvsp[(1) - (4)].lex).loc, (yyvsp[(3) - (4)].interm.type), (yyvsp[(2) - (4)].interm.type).qualifier.precision); + parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); (yyval.interm.intermNode) = 0; + // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } +#line 4198 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 91: -/* Line 1792 of yacc.c */ -#line 739 "glslang.y" +#line 745 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.declareBlock((yyvsp[(1) - (2)].interm).loc, *(yyvsp[(1) - (2)].interm).typeList); - (yyval.interm.intermNode) = 0; + if ((yyvsp[-1].interm).intermNode && (yyvsp[-1].interm).intermNode->getAsAggregate()) + (yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); + (yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode; } +#line 4208 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 92: -/* Line 1792 of yacc.c */ -#line 743 "glslang.y" +#line 750 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.declareBlock((yyvsp[(1) - (3)].interm).loc, *(yyvsp[(1) - (3)].interm).typeList, (yyvsp[(2) - (3)].lex).string); + parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement"); + + // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope + parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); + parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision); (yyval.interm.intermNode) = 0; } +#line 4221 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 93: -/* Line 1792 of yacc.c */ -#line 747 "glslang.y" +#line 758 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.declareBlock((yyvsp[(1) - (4)].interm).loc, *(yyvsp[(1) - (4)].interm).typeList, (yyvsp[(2) - (4)].lex).string, (yyvsp[(3) - (4)].interm).arraySizes); + parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList); (yyval.interm.intermNode) = 0; } +#line 4230 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 94: -/* Line 1792 of yacc.c */ -#line 751 "glslang.y" +#line 762 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalQualifierFixCheck((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier); - parseContext.updateStandaloneQualifierDefaults((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type)); + parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string); (yyval.interm.intermNode) = 0; } +#line 4239 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 95: -/* Line 1792 of yacc.c */ -#line 756 "glslang.y" +#line 766 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.checkNoShaderLayouts((yyvsp[(1) - (3)].interm.type).loc, (yyvsp[(1) - (3)].interm.type).shaderQualifiers); - parseContext.addQualifierToExisting((yyvsp[(1) - (3)].interm.type).loc, (yyvsp[(1) - (3)].interm.type).qualifier, *(yyvsp[(2) - (3)].lex).string); + parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes); (yyval.interm.intermNode) = 0; } +#line 4248 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 96: -/* Line 1792 of yacc.c */ -#line 761 "glslang.y" +#line 770 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.checkNoShaderLayouts((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).shaderQualifiers); - (yyvsp[(3) - (4)].interm.identifierList)->push_back((yyvsp[(2) - (4)].lex).string); - parseContext.addQualifierToExisting((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).qualifier, *(yyvsp[(3) - (4)].interm.identifierList)); + parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); + parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type)); (yyval.interm.intermNode) = 0; } +#line 4258 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 97: -/* Line 1792 of yacc.c */ -#line 770 "glslang.y" - { parseContext.nestedBlockCheck((yyvsp[(1) - (3)].interm.type).loc); } +#line 775 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers); + parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string); + (yyval.interm.intermNode) = 0; + } +#line 4268 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 98: -/* Line 1792 of yacc.c */ -#line 770 "glslang.y" +#line 780 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - --parseContext.structNestingLevel; - parseContext.blockName = (yyvsp[(2) - (6)].lex).string; - parseContext.globalQualifierFixCheck((yyvsp[(1) - (6)].interm.type).loc, (yyvsp[(1) - (6)].interm.type).qualifier); - parseContext.checkNoShaderLayouts((yyvsp[(1) - (6)].interm.type).loc, (yyvsp[(1) - (6)].interm.type).shaderQualifiers); - parseContext.currentBlockQualifier = (yyvsp[(1) - (6)].interm.type).qualifier; - (yyval.interm).loc = (yyvsp[(1) - (6)].interm.type).loc; - (yyval.interm).typeList = (yyvsp[(5) - (6)].interm.typeList); + parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); + (yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string); + parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList)); + (yyval.interm.intermNode) = 0; } +#line 4279 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 99: -/* Line 1792 of yacc.c */ -#line 781 "glslang.y" - { - (yyval.interm.identifierList) = new TIdentifierList; - (yyval.interm.identifierList)->push_back((yyvsp[(2) - (2)].lex).string); - } +#line 789 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); } +#line 4285 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 100: -/* Line 1792 of yacc.c */ -#line 785 "glslang.y" +#line 789 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.identifierList) = (yyvsp[(1) - (3)].interm.identifierList); - (yyval.interm.identifierList)->push_back((yyvsp[(3) - (3)].lex).string); + --parseContext.structNestingLevel; + parseContext.blockName = (yyvsp[-4].lex).string; + parseContext.globalQualifierFixCheck((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).qualifier); + parseContext.checkNoShaderLayouts((yyvsp[-5].interm.type).loc, (yyvsp[-5].interm.type).shaderQualifiers); + parseContext.currentBlockQualifier = (yyvsp[-5].interm.type).qualifier; + (yyval.interm).loc = (yyvsp[-5].interm.type).loc; + (yyval.interm).typeList = (yyvsp[-1].interm.typeList); } +#line 4299 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 101: -/* Line 1792 of yacc.c */ -#line 792 "glslang.y" +#line 800 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).function = (yyvsp[(1) - (2)].interm.function); - (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; + (yyval.interm.identifierList) = new TIdentifierList; + (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } +#line 4308 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 102: -/* Line 1792 of yacc.c */ -#line 799 "glslang.y" +#line 804 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); + (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList); + (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } +#line 4317 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 103: -/* Line 1792 of yacc.c */ -#line 802 "glslang.y" +#line 811 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.function) = (yyvsp[(1) - (1)].interm.function); + (yyval.interm).function = (yyvsp[-1].interm.function); + (yyval.interm).loc = (yyvsp[0].lex).loc; } +#line 4326 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 104: -/* Line 1792 of yacc.c */ -#line 809 "glslang.y" +#line 818 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // Add the parameter - (yyval.interm.function) = (yyvsp[(1) - (2)].interm.function); - if ((yyvsp[(2) - (2)].interm).param.type->getBasicType() != EbtVoid) - (yyvsp[(1) - (2)].interm.function)->addParameter((yyvsp[(2) - (2)].interm).param); - else - delete (yyvsp[(2) - (2)].interm).param.type; + (yyval.interm.function) = (yyvsp[0].interm.function); } +#line 4334 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 105: -/* Line 1792 of yacc.c */ -#line 817 "glslang.y" +#line 821 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.function) = (yyvsp[0].interm.function); + } +#line 4342 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 106: +#line 828 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + // Add the parameter + (yyval.interm.function) = (yyvsp[-1].interm.function); + if ((yyvsp[0].interm).param.type->getBasicType() != EbtVoid) + (yyvsp[-1].interm.function)->addParameter((yyvsp[0].interm).param); + else + delete (yyvsp[0].interm).param.type; + } +#line 4355 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 107: +#line 836 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // // Only first parameter of one-parameter functions can be void // The check for named parameters not being void is done in parameter_declarator // - if ((yyvsp[(3) - (3)].interm).param.type->getBasicType() == EbtVoid) { + if ((yyvsp[0].interm).param.type->getBasicType() == EbtVoid) { // // This parameter > first is void // - parseContext.error((yyvsp[(2) - (3)].lex).loc, "cannot be an argument type except for '(void)'", "void", ""); - delete (yyvsp[(3) - (3)].interm).param.type; + parseContext.error((yyvsp[-1].lex).loc, "cannot be an argument type except for '(void)'", "void", ""); + delete (yyvsp[0].interm).param.type; } else { // Add the parameter - (yyval.interm.function) = (yyvsp[(1) - (3)].interm.function); - (yyvsp[(1) - (3)].interm.function)->addParameter((yyvsp[(3) - (3)].interm).param); + (yyval.interm.function) = (yyvsp[-2].interm.function); + (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); } } - break; - - case 106: -/* Line 1792 of yacc.c */ -#line 837 "glslang.y" - { - if ((yyvsp[(1) - (3)].interm.type).qualifier.storage != EvqGlobal && (yyvsp[(1) - (3)].interm.type).qualifier.storage != EvqTemporary) { - parseContext.error((yyvsp[(2) - (3)].lex).loc, "no qualifiers allowed for function return", - GetStorageQualifierString((yyvsp[(1) - (3)].interm.type).qualifier.storage), ""); - } - if ((yyvsp[(1) - (3)].interm.type).arraySizes) - parseContext.arraySizeRequiredCheck((yyvsp[(1) - (3)].interm.type).loc, *(yyvsp[(1) - (3)].interm.type).arraySizes); - - // Add the function as a prototype after parsing it (we do not support recursion) - TFunction *function; - TType type((yyvsp[(1) - (3)].interm.type)); - function = new TFunction((yyvsp[(2) - (3)].lex).string, type); - (yyval.interm.function) = function; - } - break; - - case 107: -/* Line 1792 of yacc.c */ -#line 855 "glslang.y" - { - if ((yyvsp[(1) - (2)].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[(1) - (2)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[(1) - (2)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck((yyvsp[(1) - (2)].interm.type).loc, *(yyvsp[(1) - (2)].interm.type).arraySizes); - } - if ((yyvsp[(1) - (2)].interm.type).basicType == EbtVoid) { - parseContext.error((yyvsp[(2) - (2)].lex).loc, "illegal use of type 'void'", (yyvsp[(2) - (2)].lex).string->c_str(), ""); - } - parseContext.reservedErrorCheck((yyvsp[(2) - (2)].lex).loc, *(yyvsp[(2) - (2)].lex).string); - - TParameter param = {(yyvsp[(2) - (2)].lex).string, new TType((yyvsp[(1) - (2)].interm.type))}; - (yyval.interm).loc = (yyvsp[(2) - (2)].lex).loc; - (yyval.interm).param = param; - } +#line 4377 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 108: -/* Line 1792 of yacc.c */ -#line 870 "glslang.y" +#line 856 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - if ((yyvsp[(1) - (3)].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck((yyvsp[(1) - (3)].interm.type).loc, *(yyvsp[(1) - (3)].interm.type).arraySizes); + if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) { + parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return", + GetStorageQualifierString((yyvsp[-2].interm.type).qualifier.storage), ""); } - parseContext.arrayDimCheck((yyvsp[(2) - (3)].lex).loc, (yyvsp[(1) - (3)].interm.type).arraySizes, (yyvsp[(3) - (3)].interm).arraySizes); + if ((yyvsp[-2].interm.type).arraySizes) + parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); - parseContext.arraySizeRequiredCheck((yyvsp[(3) - (3)].interm).loc, *(yyvsp[(3) - (3)].interm).arraySizes); - parseContext.reservedErrorCheck((yyvsp[(2) - (3)].lex).loc, *(yyvsp[(2) - (3)].lex).string); + // Add the function as a prototype after parsing it (we do not support recursion) + TFunction *function; + TType type((yyvsp[-2].interm.type)); - (yyvsp[(1) - (3)].interm.type).arraySizes = (yyvsp[(3) - (3)].interm).arraySizes; + // Potentially rename shader entry point function. No-op most of the time. + parseContext.renameShaderFunction((yyvsp[-1].lex).string); - TParameter param = { (yyvsp[(2) - (3)].lex).string, new TType((yyvsp[(1) - (3)].interm.type))}; - (yyval.interm).loc = (yyvsp[(2) - (3)].lex).loc; - (yyval.interm).param = param; + // Make the function + function = new TFunction((yyvsp[-1].lex).string, type); + (yyval.interm.function) = function; } +#line 4401 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 109: -/* Line 1792 of yacc.c */ -#line 893 "glslang.y" +#line 879 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(2) - (2)].interm); - if ((yyvsp[(1) - (2)].interm.type).qualifier.precision != EpqNone) - (yyval.interm).param.type->getQualifier().precision = (yyvsp[(1) - (2)].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); - - parseContext.checkNoShaderLayouts((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).shaderQualifiers); - parseContext.parameterTypeCheck((yyvsp[(2) - (2)].interm).loc, (yyvsp[(1) - (2)].interm.type).qualifier.storage, *(yyval.interm).param.type); - parseContext.paramCheckFix((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier, *(yyval.interm).param.type); + if ((yyvsp[-1].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[-1].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + parseContext.arraySizeRequiredCheck((yyvsp[-1].interm.type).loc, *(yyvsp[-1].interm.type).arraySizes); + } + if ((yyvsp[-1].interm.type).basicType == EbtVoid) { + parseContext.error((yyvsp[0].lex).loc, "illegal use of type 'void'", (yyvsp[0].lex).string->c_str(), ""); + } + parseContext.reservedErrorCheck((yyvsp[0].lex).loc, *(yyvsp[0].lex).string); + TParameter param = {(yyvsp[0].lex).string, new TType((yyvsp[-1].interm.type))}; + (yyval.interm).loc = (yyvsp[0].lex).loc; + (yyval.interm).param = param; } +#line 4421 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 110: -/* Line 1792 of yacc.c */ -#line 904 "glslang.y" +#line 894 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (1)].interm); + if ((yyvsp[-2].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); + } + parseContext.arrayDimCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.type).arraySizes, (yyvsp[0].interm).arraySizes); - parseContext.parameterTypeCheck((yyvsp[(1) - (1)].interm).loc, EvqIn, *(yyvsp[(1) - (1)].interm).param.type); - parseContext.paramCheckFix((yyvsp[(1) - (1)].interm).loc, EvqTemporary, *(yyval.interm).param.type); - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.arraySizeRequiredCheck((yyvsp[0].interm).loc, *(yyvsp[0].interm).arraySizes); + parseContext.reservedErrorCheck((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string); + + TParameter param = { (yyvsp[-1].lex).string, new TType((yyvsp[-2].interm.type))}; + parseContext.arrayDimMerge(*param.type, (yyvsp[0].interm).arraySizes); + + (yyval.interm).loc = (yyvsp[-1].lex).loc; + (yyval.interm).param = param; } +#line 4443 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 111: -/* Line 1792 of yacc.c */ -#line 914 "glslang.y" +#line 917 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(2) - (2)].interm); - if ((yyvsp[(1) - (2)].interm.type).qualifier.precision != EpqNone) - (yyval.interm).param.type->getQualifier().precision = (yyvsp[(1) - (2)].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyvsp[(1) - (2)].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + (yyval.interm) = (yyvsp[0].interm); + if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) + (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + + parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); + parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); + parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); - parseContext.checkNoShaderLayouts((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).shaderQualifiers); - parseContext.parameterTypeCheck((yyvsp[(2) - (2)].interm).loc, (yyvsp[(1) - (2)].interm.type).qualifier.storage, *(yyval.interm).param.type); - parseContext.paramCheckFix((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier, *(yyval.interm).param.type); } +#line 4459 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 112: -/* Line 1792 of yacc.c */ -#line 924 "glslang.y" +#line 928 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (1)].interm); + (yyval.interm) = (yyvsp[0].interm); - parseContext.parameterTypeCheck((yyvsp[(1) - (1)].interm).loc, EvqIn, *(yyvsp[(1) - (1)].interm).param.type); - parseContext.paramCheckFix((yyvsp[(1) - (1)].interm).loc, EvqTemporary, *(yyval.interm).param.type); + parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); + parseContext.paramCheckFix((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } +#line 4471 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 113: -/* Line 1792 of yacc.c */ -#line 934 "glslang.y" +#line 938 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - TParameter param = { 0, new TType((yyvsp[(1) - (1)].interm.type)) }; - (yyval.interm).param = param; - if ((yyvsp[(1) - (1)].interm.type).arraySizes) - parseContext.arraySizeRequiredCheck((yyvsp[(1) - (1)].interm.type).loc, *(yyvsp[(1) - (1)].interm.type).arraySizes); + (yyval.interm) = (yyvsp[0].interm); + if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) + (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; + parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + + parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); + parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); + parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } +#line 4486 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 114: -/* Line 1792 of yacc.c */ -#line 943 "glslang.y" +#line 948 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (1)].interm); + (yyval.interm) = (yyvsp[0].interm); + + parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); + parseContext.paramCheckFix((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); } +#line 4498 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 115: -/* Line 1792 of yacc.c */ -#line 946 "glslang.y" +#line 958 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (3)].interm); - parseContext.declareVariable((yyvsp[(3) - (3)].lex).loc, *(yyvsp[(3) - (3)].lex).string, (yyvsp[(1) - (3)].interm).type); + TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; + (yyval.interm).param = param; + if ((yyvsp[0].interm.type).arraySizes) + parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes); } +#line 4509 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 116: -/* Line 1792 of yacc.c */ -#line 950 "glslang.y" +#line 967 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (4)].interm); - parseContext.declareVariable((yyvsp[(3) - (4)].lex).loc, *(yyvsp[(3) - (4)].lex).string, (yyvsp[(1) - (4)].interm).type, (yyvsp[(4) - (4)].interm).arraySizes); + (yyval.interm) = (yyvsp[0].interm); } +#line 4517 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 117: -/* Line 1792 of yacc.c */ -#line 954 "glslang.y" +#line 970 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[(1) - (6)].interm).type; - TIntermNode* initNode = parseContext.declareVariable((yyvsp[(3) - (6)].lex).loc, *(yyvsp[(3) - (6)].lex).string, (yyvsp[(1) - (6)].interm).type, (yyvsp[(4) - (6)].interm).arraySizes, (yyvsp[(6) - (6)].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[(1) - (6)].interm).intermNode, initNode, (yyvsp[(5) - (6)].lex).loc); + (yyval.interm) = (yyvsp[-2].interm); + parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type); } +#line 4526 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 118: -/* Line 1792 of yacc.c */ -#line 959 "glslang.y" +#line 974 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[(1) - (5)].interm).type; - TIntermNode* initNode = parseContext.declareVariable((yyvsp[(3) - (5)].lex).loc, *(yyvsp[(3) - (5)].lex).string, (yyvsp[(1) - (5)].interm).type, 0, (yyvsp[(5) - (5)].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[(1) - (5)].interm).intermNode, initNode, (yyvsp[(4) - (5)].lex).loc); + (yyval.interm) = (yyvsp[-3].interm); + parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes); } +#line 4535 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 119: -/* Line 1792 of yacc.c */ -#line 967 "glslang.y" +#line 978 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[(1) - (1)].interm.type); - (yyval.interm).intermNode = 0; - parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); + (yyval.interm).type = (yyvsp[-5].interm).type; + TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } +#line 4545 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 120: -/* Line 1792 of yacc.c */ -#line 972 "glslang.y" +#line 983 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[(1) - (2)].interm.type); - (yyval.interm).intermNode = 0; - parseContext.declareVariable((yyvsp[(2) - (2)].lex).loc, *(yyvsp[(2) - (2)].lex).string, (yyvsp[(1) - (2)].interm.type)); + (yyval.interm).type = (yyvsp[-4].interm).type; + TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } +#line 4555 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 121: -/* Line 1792 of yacc.c */ -#line 977 "glslang.y" +#line 991 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[(1) - (3)].interm.type); + (yyval.interm).type = (yyvsp[0].interm.type); (yyval.interm).intermNode = 0; - parseContext.declareVariable((yyvsp[(2) - (3)].lex).loc, *(yyvsp[(2) - (3)].lex).string, (yyvsp[(1) - (3)].interm.type), (yyvsp[(3) - (3)].interm).arraySizes); + parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); } +#line 4565 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 122: -/* Line 1792 of yacc.c */ -#line 982 "glslang.y" +#line 996 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[(1) - (5)].interm.type); - TIntermNode* initNode = parseContext.declareVariable((yyvsp[(2) - (5)].lex).loc, *(yyvsp[(2) - (5)].lex).string, (yyvsp[(1) - (5)].interm.type), (yyvsp[(3) - (5)].interm).arraySizes, (yyvsp[(5) - (5)].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[(4) - (5)].lex).loc); + (yyval.interm).type = (yyvsp[-1].interm.type); + (yyval.interm).intermNode = 0; + parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type)); } +#line 4575 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 123: -/* Line 1792 of yacc.c */ -#line 987 "glslang.y" +#line 1001 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).type = (yyvsp[(1) - (4)].interm.type); - TIntermNode* initNode = parseContext.declareVariable((yyvsp[(2) - (4)].lex).loc, *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), 0, (yyvsp[(4) - (4)].interm.intermTypedNode)); - (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[(3) - (4)].lex).loc); + (yyval.interm).type = (yyvsp[-2].interm.type); + (yyval.interm).intermNode = 0; + parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes); } +#line 4585 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 124: -/* Line 1792 of yacc.c */ -#line 996 "glslang.y" +#line 1006 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + (yyval.interm).type = (yyvsp[-4].interm.type); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); + } +#line 4595 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - parseContext.globalQualifierTypeCheck((yyvsp[(1) - (1)].interm.type).loc, (yyvsp[(1) - (1)].interm.type).qualifier, (yyval.interm.type)); - if ((yyvsp[(1) - (1)].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[(1) - (1)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[(1) - (1)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + case 125: +#line 1011 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm).type = (yyvsp[-3].interm.type); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); + (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); + } +#line 4605 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 126: +#line 1020 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type) = (yyvsp[0].interm.type); + + parseContext.globalQualifierTypeCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyval.interm.type)); + if ((yyvsp[0].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier); } +#line 4621 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 125: -/* Line 1792 of yacc.c */ -#line 1007 "glslang.y" + case 127: +#line 1031 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalQualifierFixCheck((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier); - parseContext.globalQualifierTypeCheck((yyvsp[(1) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier, (yyvsp[(2) - (2)].interm.type)); + parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); + parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type)); - if ((yyvsp[(2) - (2)].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[(2) - (2)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[(2) - (2)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + if ((yyvsp[0].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } - if ((yyvsp[(2) - (2)].interm.type).arraySizes && parseContext.arrayQualifierError((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).qualifier)) - (yyvsp[(2) - (2)].interm.type).arraySizes = 0; + if ((yyvsp[0].interm.type).arraySizes && parseContext.arrayQualifierError((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).qualifier)) + (yyvsp[0].interm.type).arraySizes = 0; - parseContext.checkNoShaderLayouts((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(1) - (2)].interm.type).shaderQualifiers); - (yyvsp[(2) - (2)].interm.type).shaderQualifiers.merge((yyvsp[(1) - (2)].interm.type).shaderQualifiers); - parseContext.mergeQualifiers((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(2) - (2)].interm.type).qualifier, (yyvsp[(1) - (2)].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[(2) - (2)].interm.type).loc, (yyvsp[(2) - (2)].interm.type).basicType, (yyvsp[(2) - (2)].interm.type).qualifier); + parseContext.checkNoShaderLayouts((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); + (yyvsp[0].interm.type).shaderQualifiers.merge((yyvsp[-1].interm.type).shaderQualifiers); + parseContext.mergeQualifiers((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyvsp[-1].interm.type).qualifier, true); + parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier); - (yyval.interm.type) = (yyvsp[(2) - (2)].interm.type); + (yyval.interm.type) = (yyvsp[0].interm.type); if (! (yyval.interm.type).qualifier.isInterpolation() && ((parseContext.language == EShLangVertex && (yyval.interm.type).qualifier.storage == EvqVaryingOut) || (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) (yyval.interm.type).qualifier.smooth = true; } - break; - - case 126: -/* Line 1792 of yacc.c */ -#line 1034 "glslang.y" - { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "invariant"); - parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.invariant = true; - } - break; - - case 127: -/* Line 1792 of yacc.c */ -#line 1043 "glslang.y" - { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "smooth"); - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "smooth"); - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, 0, "smooth"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.smooth = true; - } +#line 4650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 128: -/* Line 1792 of yacc.c */ -#line 1050 "glslang.y" +#line 1058 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "flat"); - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "flat"); - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, 0, "flat"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.flat = true; + parseContext.globalCheck((yyvsp[0].lex).loc, "invariant"); + parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.invariant = true; } +#line 4661 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 129: -/* Line 1792 of yacc.c */ -#line 1057 "glslang.y" +#line 1067 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "noperspective"); - parseContext.requireProfile((yyvsp[(1) - (1)].lex).loc, ~EEsProfile, "noperspective"); - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "noperspective"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.nopersp = true; + parseContext.globalCheck((yyvsp[0].lex).loc, "smooth"); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "smooth"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.smooth = true; } +#line 4673 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 130: -/* Line 1792 of yacc.c */ -#line 1064 "glslang.y" +#line 1074 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "__explicitInterpAMD"); - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.explicitInterp = true; -#endif + parseContext.globalCheck((yyvsp[0].lex).loc, "flat"); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "flat"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.flat = true; } +#line 4685 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 131: -/* Line 1792 of yacc.c */ -#line 1076 "glslang.y" +#line 1081 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[(3) - (4)].interm.type); + parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective"); + parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "noperspective"); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "noperspective"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.nopersp = true; } +#line 4697 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 132: -/* Line 1792 of yacc.c */ -#line 1082 "glslang.y" +#line 1088 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); +#ifdef AMD_EXTENSIONS + parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD"); + parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); + parseContext.profileRequires((yyvsp[0].lex).loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.explicitInterp = true; +#endif } +#line 4711 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 133: -/* Line 1792 of yacc.c */ -#line 1085 "glslang.y" +#line 1100 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[(1) - (3)].interm.type); - (yyval.interm.type).shaderQualifiers.merge((yyvsp[(3) - (3)].interm.type).shaderQualifiers); - parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[(3) - (3)].interm.type).qualifier, false); + (yyval.interm.type) = (yyvsp[-1].interm.type); } +#line 4719 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 134: -/* Line 1792 of yacc.c */ -#line 1092 "glslang.y" +#line 1106 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - parseContext.setLayoutQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type), *(yyvsp[(1) - (1)].lex).string); + (yyval.interm.type) = (yyvsp[0].interm.type); } +#line 4727 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 135: -/* Line 1792 of yacc.c */ -#line 1096 "glslang.y" +#line 1109 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (3)].lex).loc); - parseContext.setLayoutQualifier((yyvsp[(1) - (3)].lex).loc, (yyval.interm.type), *(yyvsp[(1) - (3)].lex).string, (yyvsp[(3) - (3)].interm.intermTypedNode)); + (yyval.interm.type) = (yyvsp[-2].interm.type); + (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); + parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); } +#line 4737 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 136: -/* Line 1792 of yacc.c */ -#line 1100 "glslang.y" - { // because "shared" is both an identifier and a keyword - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - TString strShared("shared"); - parseContext.setLayoutQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type), strShared); +#line 1116 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc); + parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string); } +#line 4746 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 137: -/* Line 1792 of yacc.c */ -#line 1108 "glslang.y" +#line 1120 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.noContraction = true; + (yyval.interm.type).init((yyvsp[-2].lex).loc); + parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode)); } +#line 4755 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 138: -/* Line 1792 of yacc.c */ -#line 1117 "glslang.y" - { - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); +#line 1124 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { // because "shared" is both an identifier and a keyword + (yyval.interm.type).init((yyvsp[0].lex).loc); + TString strShared("shared"); + parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared); } +#line 4765 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 139: -/* Line 1792 of yacc.c */ -#line 1120 "glslang.y" +#line 1132 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[(1) - (2)].interm.type); - if ((yyval.interm.type).basicType == EbtVoid) - (yyval.interm.type).basicType = (yyvsp[(2) - (2)].interm.type).basicType; - - (yyval.interm.type).shaderQualifiers.merge((yyvsp[(2) - (2)].interm.type).shaderQualifiers); - parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[(2) - (2)].interm.type).qualifier, false); + parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.noContraction = true; } +#line 4776 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 140: -/* Line 1792 of yacc.c */ -#line 1131 "glslang.y" +#line 1141 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + (yyval.interm.type) = (yyvsp[0].interm.type); } +#line 4784 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 141: -/* Line 1792 of yacc.c */ -#line 1134 "glslang.y" +#line 1144 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + (yyval.interm.type) = (yyvsp[-1].interm.type); + if ((yyval.interm.type).basicType == EbtVoid) + (yyval.interm.type).basicType = (yyvsp[0].interm.type).basicType; + + (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); + parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); } +#line 4797 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 142: -/* Line 1792 of yacc.c */ -#line 1137 "glslang.y" +#line 1155 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.checkPrecisionQualifier((yyvsp[(1) - (1)].interm.type).loc, (yyvsp[(1) - (1)].interm.type).qualifier.precision); - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + (yyval.interm.type) = (yyvsp[0].interm.type); } +#line 4805 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 143: -/* Line 1792 of yacc.c */ -#line 1141 "glslang.y" +#line 1158 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // allow inheritance of storage qualifier from block declaration - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + (yyval.interm.type) = (yyvsp[0].interm.type); } +#line 4813 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 144: -/* Line 1792 of yacc.c */ -#line 1145 "glslang.y" +#line 1161 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - // allow inheritance of storage qualifier from block declaration - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); + (yyval.interm.type) = (yyvsp[0].interm.type); } +#line 4822 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 145: -/* Line 1792 of yacc.c */ -#line 1149 "glslang.y" +#line 1165 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // allow inheritance of storage qualifier from block declaration - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + (yyval.interm.type) = (yyvsp[0].interm.type); } +#line 4831 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 146: -/* Line 1792 of yacc.c */ -#line 1156 "glslang.y" +#line 1169 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant + // allow inheritance of storage qualifier from block declaration + (yyval.interm.type) = (yyvsp[0].interm.type); } +#line 4840 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 147: -/* Line 1792 of yacc.c */ -#line 1160 "glslang.y" +#line 1173 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangVertex, "attribute"); - parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 130, "attribute"); - parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, "attribute"); - parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 420, "attribute"); - parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, "attribute"); - - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "attribute"); - - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.storage = EvqVaryingIn; + // allow inheritance of storage qualifier from block declaration + (yyval.interm.type) = (yyvsp[0].interm.type); } +#line 4849 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 148: -/* Line 1792 of yacc.c */ -#line 1172 "glslang.y" +#line 1180 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, "varying"); - parseContext.checkDeprecated((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 130, "varying"); - parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, ECoreProfile, 420, "varying"); - parseContext.requireNotRemoved((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, "varying"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant + } +#line 4858 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "varying"); + case 149: +#line 1184 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute"); + parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute"); + parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "attribute"); + parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "attribute"); + parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "attribute"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); + parseContext.globalCheck((yyvsp[0].lex).loc, "attribute"); + + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqVaryingIn; + } +#line 4875 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 150: +#line 1196 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying"); + parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying"); + parseContext.requireNotRemoved((yyvsp[0].lex).loc, ECoreProfile, 420, "varying"); + parseContext.requireNotRemoved((yyvsp[0].lex).loc, EEsProfile, 300, "varying"); + + parseContext.globalCheck((yyvsp[0].lex).loc, "varying"); + + (yyval.interm.type).init((yyvsp[0].lex).loc); if (parseContext.language == EShLangVertex) (yyval.interm.type).qualifier.storage = EvqVaryingOut; else (yyval.interm.type).qualifier.storage = EvqVaryingIn; } - break; - - case 149: -/* Line 1792 of yacc.c */ -#line 1186 "glslang.y" - { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "inout"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.storage = EvqInOut; - } - break; - - case 150: -/* Line 1792 of yacc.c */ -#line 1191 "glslang.y" - { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "in"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later - (yyval.interm.type).qualifier.storage = EvqIn; - } +#line 4894 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 151: -/* Line 1792 of yacc.c */ -#line 1197 "glslang.y" +#line 1210 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "out"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later - (yyval.interm.type).qualifier.storage = EvqOut; + parseContext.globalCheck((yyvsp[0].lex).loc, "inout"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqInOut; } +#line 4904 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 152: -/* Line 1792 of yacc.c */ -#line 1203 "glslang.y" +#line 1215 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 120, 0, "centroid"); - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 300, 0, "centroid"); - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "centroid"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.centroid = true; + parseContext.globalCheck((yyvsp[0].lex).loc, "in"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later + (yyval.interm.type).qualifier.storage = EvqIn; } +#line 4915 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 153: -/* Line 1792 of yacc.c */ -#line 1210 "glslang.y" +#line 1221 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "patch"); - parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.patch = true; + parseContext.globalCheck((yyvsp[0].lex).loc, "out"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later + (yyval.interm.type).qualifier.storage = EvqOut; } +#line 4926 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 154: -/* Line 1792 of yacc.c */ -#line 1216 "glslang.y" +#line 1227 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "sample"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.sample = true; + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid"); + parseContext.globalCheck((yyvsp[0].lex).loc, "centroid"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.centroid = true; } +#line 4938 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 155: -/* Line 1792 of yacc.c */ -#line 1221 "glslang.y" +#line 1234 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "uniform"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.storage = EvqUniform; + parseContext.globalCheck((yyvsp[0].lex).loc, "patch"); + parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.patch = true; } +#line 4949 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 156: -/* Line 1792 of yacc.c */ -#line 1226 "glslang.y" +#line 1240 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "buffer"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.storage = EvqBuffer; + parseContext.globalCheck((yyvsp[0].lex).loc, "sample"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.sample = true; } +#line 4959 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 157: -/* Line 1792 of yacc.c */ -#line 1231 "glslang.y" +#line 1245 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, EEsProfile, 310, 0, "shared"); - parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangCompute, "shared"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.storage = EvqShared; + parseContext.globalCheck((yyvsp[0].lex).loc, "uniform"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqUniform; } +#line 4969 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 158: -/* Line 1792 of yacc.c */ -#line 1238 "glslang.y" +#line 1250 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.coherent = true; + parseContext.globalCheck((yyvsp[0].lex).loc, "buffer"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqBuffer; } +#line 4979 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 159: -/* Line 1792 of yacc.c */ -#line 1242 "glslang.y" +#line 1255 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.volatil = true; + parseContext.globalCheck((yyvsp[0].lex).loc, "shared"); + parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); + parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 310, 0, "shared"); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangCompute, "shared"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqShared; } +#line 4992 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 160: -/* Line 1792 of yacc.c */ -#line 1246 "glslang.y" +#line 1263 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.restrict = true; + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.coherent = true; } +#line 5001 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 161: -/* Line 1792 of yacc.c */ -#line 1250 "glslang.y" +#line 1267 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.readonly = true; + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.volatil = true; } +#line 5010 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 162: -/* Line 1792 of yacc.c */ -#line 1254 "glslang.y" +#line 1271 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.writeonly = true; + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.restrict = true; } +#line 5019 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 163: -/* Line 1792 of yacc.c */ -#line 1258 "glslang.y" +#line 1275 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.spvRemoved((yyvsp[(1) - (1)].lex).loc, "subroutine"); - parseContext.globalCheck((yyvsp[(1) - (1)].lex).loc, "subroutine"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc); - (yyval.interm.type).qualifier.storage = EvqUniform; + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.readonly = true; } +#line 5028 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 164: -/* Line 1792 of yacc.c */ -#line 1264 "glslang.y" +#line 1279 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.writeonly = true; + } +#line 5037 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 165: +#line 1283 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine"); + parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine"); + parseContext.unimplemented((yyvsp[0].lex).loc, "subroutine"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + } +#line 5048 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 166: +#line 1289 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine"); + parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine"); + parseContext.unimplemented((yyvsp[-3].lex).loc, "subroutine"); + (yyval.interm.type).init((yyvsp[-3].lex).loc); + } +#line 5059 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 167: +#line 1298 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + // TODO + } +#line 5067 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 168: +#line 1301 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.spvRemoved((yyvsp[(1) - (4)].lex).loc, "subroutine"); - parseContext.globalCheck((yyvsp[(1) - (4)].lex).loc, "subroutine"); - (yyval.interm.type).init((yyvsp[(1) - (4)].lex).loc); - (yyval.interm.type).qualifier.storage = EvqUniform; // TODO: 4.0 semantics: subroutines // 1) make sure each identifier is a type declared earlier with SUBROUTINE // 2) save all of the identifiers for future comparison with the declared function } - break; - - case 165: -/* Line 1792 of yacc.c */ -#line 1276 "glslang.y" - { - // TODO: 4.0 functionality: subroutine type to list - } - break; - - case 166: -/* Line 1792 of yacc.c */ -#line 1279 "glslang.y" - { - } - break; - - case 167: -/* Line 1792 of yacc.c */ -#line 1284 "glslang.y" - { - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); - (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); - } - break; - - case 168: -/* Line 1792 of yacc.c */ -#line 1288 "glslang.y" - { - parseContext.arrayDimCheck((yyvsp[(2) - (2)].interm).loc, (yyvsp[(2) - (2)].interm).arraySizes, 0); - (yyval.interm.type) = (yyvsp[(1) - (2)].interm.type); - (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); - (yyval.interm.type).arraySizes = (yyvsp[(2) - (2)].interm).arraySizes; - } +#line 5077 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 169: -/* Line 1792 of yacc.c */ -#line 1297 "glslang.y" +#line 1309 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[(1) - (2)].lex).loc; - (yyval.interm).arraySizes = new TArraySizes; - (yyval.interm).arraySizes->addInnerSize(); + (yyval.interm.type) = (yyvsp[0].interm.type); + (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); } +#line 5086 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 170: -/* Line 1792 of yacc.c */ -#line 1302 "glslang.y" +#line 1313 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm).loc = (yyvsp[(1) - (3)].lex).loc; - (yyval.interm).arraySizes = new TArraySizes; - - TArraySize size; - parseContext.arraySizeCheck((yyvsp[(2) - (3)].interm.intermTypedNode)->getLoc(), (yyvsp[(2) - (3)].interm.intermTypedNode), size); - (yyval.interm).arraySizes->addInnerSize(size); + parseContext.arrayDimCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes, 0); + (yyval.interm.type) = (yyvsp[-1].interm.type); + (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); + (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes; } +#line 5097 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 171: -/* Line 1792 of yacc.c */ -#line 1310 "glslang.y" +#line 1322 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (3)].interm); + (yyval.interm).loc = (yyvsp[-1].lex).loc; + (yyval.interm).arraySizes = new TArraySizes; (yyval.interm).arraySizes->addInnerSize(); } +#line 5107 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 172: -/* Line 1792 of yacc.c */ -#line 1314 "glslang.y" +#line 1327 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm) = (yyvsp[(1) - (4)].interm); + (yyval.interm).loc = (yyvsp[-2].lex).loc; + (yyval.interm).arraySizes = new TArraySizes; TArraySize size; - parseContext.arraySizeCheck((yyvsp[(3) - (4)].interm.intermTypedNode)->getLoc(), (yyvsp[(3) - (4)].interm.intermTypedNode), size); + parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size); (yyval.interm).arraySizes->addInnerSize(size); } +#line 5120 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 173: -/* Line 1792 of yacc.c */ -#line 1324 "glslang.y" +#line 1335 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtVoid; + (yyval.interm) = (yyvsp[-2].interm); + (yyval.interm).arraySizes->addInnerSize(); } +#line 5129 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 174: -/* Line 1792 of yacc.c */ -#line 1328 "glslang.y" +#line 1339 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; + (yyval.interm) = (yyvsp[-3].interm); + + TArraySize size; + parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size); + (yyval.interm).arraySizes->addInnerSize(size); } +#line 5141 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 175: -/* Line 1792 of yacc.c */ -#line 1332 "glslang.y" +#line 1349 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtVoid; } +#line 5150 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 176: -/* Line 1792 of yacc.c */ -#line 1337 "glslang.y" +#line 1353 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; -#endif + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; } +#line 5159 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 177: -/* Line 1792 of yacc.c */ -#line 1344 "glslang.y" +#line 1357 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt; + parseContext.doubleCheck((yyvsp[0].lex).loc, "double"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; } +#line 5169 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 178: -/* Line 1792 of yacc.c */ -#line 1348 "glslang.y" +#line 1362 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint; +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[0].lex).loc, "half float", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; +#endif } +#line 5181 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 179: -/* Line 1792 of yacc.c */ -#line 1353 "glslang.y" +#line 1369 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt64; + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; } +#line 5190 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 180: -/* Line 1792 of yacc.c */ -#line 1358 "glslang.y" +#line 1373 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; } +#line 5200 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 181: -/* Line 1792 of yacc.c */ -#line 1363 "glslang.y" +#line 1378 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt64; } +#line 5210 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 182: -/* Line 1792 of yacc.c */ -#line 1367 "glslang.y" +#line 1383 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setVector(2); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; } +#line 5220 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 183: -/* Line 1792 of yacc.c */ -#line 1372 "glslang.y" +#line 1388 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setVector(3); +#ifdef AMD_EXTENSIONS + parseContext.int16Check((yyvsp[0].lex).loc, "16-bit integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt16; +#endif } +#line 5232 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 184: -/* Line 1792 of yacc.c */ -#line 1377 "glslang.y" +#line 1395 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setVector(4); +#ifdef AMD_EXTENSIONS + parseContext.int16Check((yyvsp[0].lex).loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint16; +#endif } +#line 5244 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 185: -/* Line 1792 of yacc.c */ -#line 1382 "glslang.y" +#line 1402 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double vector"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setVector(2); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; } +#line 5253 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 186: -/* Line 1792 of yacc.c */ -#line 1388 "glslang.y" +#line 1406 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double vector"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setVector(3); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(2); } +#line 5263 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 187: -/* Line 1792 of yacc.c */ -#line 1394 "glslang.y" +#line 1411 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double vector"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setVector(4); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(3); } +#line 5273 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 188: -/* Line 1792 of yacc.c */ -#line 1400 "glslang.y" +#line 1416 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setVector(2); -#endif + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setVector(4); } +#line 5283 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 189: -/* Line 1792 of yacc.c */ -#line 1408 "glslang.y" +#line 1421 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setVector(3); -#endif + parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(2); } +#line 5294 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 190: -/* Line 1792 of yacc.c */ -#line 1416 "glslang.y" +#line 1427 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { -#ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat16; - (yyval.interm.type).setVector(4); -#endif + parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(3); } +#line 5305 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 191: -/* Line 1792 of yacc.c */ -#line 1424 "glslang.y" +#line 1433 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; - (yyval.interm.type).setVector(2); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setVector(4); } +#line 5316 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 192: -/* Line 1792 of yacc.c */ -#line 1429 "glslang.y" +#line 1439 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; - (yyval.interm.type).setVector(3); +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setVector(2); +#endif } +#line 5329 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 193: -/* Line 1792 of yacc.c */ -#line 1434 "glslang.y" +#line 1447 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtBool; - (yyval.interm.type).setVector(4); +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setVector(3); +#endif } +#line 5342 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 194: -/* Line 1792 of yacc.c */ -#line 1439 "glslang.y" +#line 1455 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt; - (yyval.interm.type).setVector(2); +#ifdef AMD_EXTENSIONS + parseContext.float16Check((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat16; + (yyval.interm.type).setVector(4); +#endif } +#line 5355 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 195: -/* Line 1792 of yacc.c */ -#line 1444 "glslang.y" +#line 1463 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt; - (yyval.interm.type).setVector(3); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(2); } +#line 5365 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 196: -/* Line 1792 of yacc.c */ -#line 1449 "glslang.y" +#line 1468 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt; - (yyval.interm.type).setVector(4); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(3); } +#line 5375 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 197: -/* Line 1792 of yacc.c */ -#line 1454 "glslang.y" +#line 1473 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt64; - (yyval.interm.type).setVector(2); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtBool; + (yyval.interm.type).setVector(4); } +#line 5385 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 198: -/* Line 1792 of yacc.c */ -#line 1460 "glslang.y" +#line 1478 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt64; - (yyval.interm.type).setVector(3); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(2); } +#line 5395 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 199: -/* Line 1792 of yacc.c */ -#line 1466 "glslang.y" +#line 1483 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtInt64; - (yyval.interm.type).setVector(4); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(3); } +#line 5405 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 200: -/* Line 1792 of yacc.c */ -#line 1472 "glslang.y" +#line 1488 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer vector"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint; - (yyval.interm.type).setVector(2); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt; + (yyval.interm.type).setVector(4); } +#line 5415 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 201: -/* Line 1792 of yacc.c */ -#line 1478 "glslang.y" +#line 1493 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer vector"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint; - (yyval.interm.type).setVector(3); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt64; + (yyval.interm.type).setVector(2); } +#line 5426 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 202: -/* Line 1792 of yacc.c */ -#line 1484 "glslang.y" +#line 1499 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.fullIntegerCheck((yyvsp[(1) - (1)].lex).loc, "unsigned integer vector"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint; - (yyval.interm.type).setVector(4); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt64; + (yyval.interm.type).setVector(3); } +#line 5437 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 203: -/* Line 1792 of yacc.c */ -#line 1490 "glslang.y" +#line 1505 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; - (yyval.interm.type).setVector(2); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt64; + (yyval.interm.type).setVector(4); } +#line 5448 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 204: -/* Line 1792 of yacc.c */ -#line 1496 "glslang.y" +#line 1511 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; - (yyval.interm.type).setVector(3); +#ifdef AMD_EXTENSIONS + parseContext.int16Check((yyvsp[0].lex).loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt16; + (yyval.interm.type).setVector(2); +#endif } +#line 5461 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 205: -/* Line 1792 of yacc.c */ -#line 1502 "glslang.y" +#line 1519 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.int64Check((yyvsp[(1) - (1)].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtUint64; - (yyval.interm.type).setVector(4); +#ifdef AMD_EXTENSIONS + parseContext.int16Check((yyvsp[0].lex).loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt16; + (yyval.interm.type).setVector(3); +#endif } +#line 5474 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 206: -/* Line 1792 of yacc.c */ -#line 1508 "glslang.y" +#line 1527 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(2, 2); +#ifdef AMD_EXTENSIONS + parseContext.int16Check((yyvsp[0].lex).loc, "16-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtInt16; + (yyval.interm.type).setVector(4); +#endif } +#line 5487 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 207: -/* Line 1792 of yacc.c */ -#line 1513 "glslang.y" +#line 1535 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(3, 3); + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(2); } +#line 5498 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 208: -/* Line 1792 of yacc.c */ -#line 1518 "glslang.y" +#line 1541 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(4, 4); + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(3); } +#line 5509 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 209: -/* Line 1792 of yacc.c */ -#line 1523 "glslang.y" +#line 1547 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(2, 2); + parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint; + (yyval.interm.type).setVector(4); } +#line 5520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 210: -/* Line 1792 of yacc.c */ -#line 1528 "glslang.y" +#line 1553 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(2, 3); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; + (yyval.interm.type).setVector(2); } +#line 5531 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 211: -/* Line 1792 of yacc.c */ -#line 1533 "glslang.y" +#line 1559 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(2, 4); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; + (yyval.interm.type).setVector(3); } +#line 5542 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 212: -/* Line 1792 of yacc.c */ -#line 1538 "glslang.y" +#line 1565 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(3, 2); + parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint64; + (yyval.interm.type).setVector(4); } +#line 5553 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 213: -/* Line 1792 of yacc.c */ -#line 1543 "glslang.y" +#line 1571 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(3, 3); +#ifdef AMD_EXTENSIONS + parseContext.int16Check((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint16; + (yyval.interm.type).setVector(2); +#endif } +#line 5566 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 214: -/* Line 1792 of yacc.c */ -#line 1548 "glslang.y" +#line 1579 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(3, 4); +#ifdef AMD_EXTENSIONS + parseContext.int16Check((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint16; + (yyval.interm.type).setVector(3); +#endif } +#line 5579 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 215: -/* Line 1792 of yacc.c */ -#line 1553 "glslang.y" +#line 1587 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(4, 2); +#ifdef AMD_EXTENSIONS + parseContext.int16Check((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtUint16; + (yyval.interm.type).setVector(4); +#endif } +#line 5592 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 216: -/* Line 1792 of yacc.c */ -#line 1558 "glslang.y" +#line 1595 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(4, 3); + (yyval.interm.type).setMatrix(2, 2); } +#line 5602 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 217: -/* Line 1792 of yacc.c */ -#line 1563 "glslang.y" +#line 1600 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).setMatrix(4, 4); + (yyval.interm.type).setMatrix(3, 3); } +#line 5612 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 218: -/* Line 1792 of yacc.c */ -#line 1568 "glslang.y" +#line 1605 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 2); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 4); } +#line 5622 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 219: -/* Line 1792 of yacc.c */ -#line 1574 "glslang.y" +#line 1610 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 3); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 2); } +#line 5632 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 220: -/* Line 1792 of yacc.c */ -#line 1580 "glslang.y" +#line 1615 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 4); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 3); } +#line 5642 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 221: -/* Line 1792 of yacc.c */ -#line 1586 "glslang.y" +#line 1620 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 2); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(2, 4); } +#line 5652 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 222: -/* Line 1792 of yacc.c */ -#line 1592 "glslang.y" +#line 1625 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 3); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 2); } +#line 5662 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 223: -/* Line 1792 of yacc.c */ -#line 1598 "glslang.y" +#line 1630 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(2, 4); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 3); } +#line 5672 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 224: -/* Line 1792 of yacc.c */ -#line 1604 "glslang.y" +#line 1635 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 2); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(3, 4); } +#line 5682 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 225: -/* Line 1792 of yacc.c */ -#line 1610 "glslang.y" +#line 1640 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 3); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 2); } +#line 5692 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 226: -/* Line 1792 of yacc.c */ -#line 1616 "glslang.y" +#line 1645 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(3, 4); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 3); } +#line 5702 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 227: -/* Line 1792 of yacc.c */ -#line 1622 "glslang.y" +#line 1650 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 2); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtFloat; + (yyval.interm.type).setMatrix(4, 4); } +#line 5712 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 228: -/* Line 1792 of yacc.c */ -#line 1628 "glslang.y" +#line 1655 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 3); + (yyval.interm.type).setMatrix(2, 2); } +#line 5723 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 229: -/* Line 1792 of yacc.c */ -#line 1634 "glslang.y" +#line 1661 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.doubleCheck((yyvsp[(1) - (1)].lex).loc, "double matrix"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; - (yyval.interm.type).setMatrix(4, 4); + (yyval.interm.type).setMatrix(3, 3); } +#line 5734 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 230: -/* Line 1792 of yacc.c */ -#line 1640 "glslang.y" +#line 1667 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 4); + } +#line 5745 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 231: +#line 1673 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 2); + } +#line 5756 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 232: +#line 1679 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 3); + } +#line 5767 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 233: +#line 1685 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(2, 4); + } +#line 5778 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 234: +#line 1691 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 2); + } +#line 5789 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 235: +#line 1697 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 3); + } +#line 5800 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 236: +#line 1703 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(3, 4); + } +#line 5811 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 237: +#line 1709 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 2); + } +#line 5822 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 238: +#line 1715 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 3); + } +#line 5833 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 239: +#line 1721 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.doubleCheck((yyvsp[0].lex).loc, "double matrix"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtDouble; + (yyval.interm.type).setMatrix(4, 4); + } +#line 5844 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 240: +#line 1727 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 2); #endif } +#line 5857 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 231: -/* Line 1792 of yacc.c */ -#line 1648 "glslang.y" + case 241: +#line 1735 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 3); #endif } +#line 5870 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 232: -/* Line 1792 of yacc.c */ -#line 1656 "glslang.y" + case 242: +#line 1743 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 4); #endif } +#line 5883 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 233: -/* Line 1792 of yacc.c */ -#line 1664 "glslang.y" + case 243: +#line 1751 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 2); #endif } +#line 5896 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 234: -/* Line 1792 of yacc.c */ -#line 1672 "glslang.y" + case 244: +#line 1759 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 3); #endif } +#line 5909 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 235: -/* Line 1792 of yacc.c */ -#line 1680 "glslang.y" + case 245: +#line 1767 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 4); #endif } +#line 5922 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 236: -/* Line 1792 of yacc.c */ -#line 1688 "glslang.y" + case 246: +#line 1775 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 2); #endif } +#line 5935 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 237: -/* Line 1792 of yacc.c */ -#line 1696 "glslang.y" + case 247: +#line 1783 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 3); #endif } +#line 5948 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 238: -/* Line 1792 of yacc.c */ -#line 1704 "glslang.y" + case 248: +#line 1791 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 4); #endif } +#line 5961 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 239: -/* Line 1792 of yacc.c */ -#line 1712 "glslang.y" + case 249: +#line 1799 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 2); #endif } +#line 5974 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 240: -/* Line 1792 of yacc.c */ -#line 1720 "glslang.y" + case 250: +#line 1807 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 3); #endif } +#line 5987 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 241: -/* Line 1792 of yacc.c */ -#line 1728 "glslang.y" + case 251: +#line 1815 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { #ifdef AMD_EXTENSIONS - parseContext.float16Check((yyvsp[(1) - (1)].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 4); #endif } - break; - - case 242: -/* Line 1792 of yacc.c */ -#line 1736 "glslang.y" - { - parseContext.vulkanRemoved((yyvsp[(1) - (1)].lex).loc, "atomic counter types"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtAtomicUint; - } - break; - - case 243: -/* Line 1792 of yacc.c */ -#line 1741 "glslang.y" - { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd1D); - } - break; - - case 244: -/* Line 1792 of yacc.c */ -#line 1746 "glslang.y" - { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D); - } - break; - - case 245: -/* Line 1792 of yacc.c */ -#line 1751 "glslang.y" - { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd3D); - } - break; - - case 246: -/* Line 1792 of yacc.c */ -#line 1756 "glslang.y" - { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdCube); - } - break; - - case 247: -/* Line 1792 of yacc.c */ -#line 1761 "glslang.y" - { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true); - } - break; - - case 248: -/* Line 1792 of yacc.c */ -#line 1766 "glslang.y" - { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true); - } - break; - - case 249: -/* Line 1792 of yacc.c */ -#line 1771 "glslang.y" - { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true); - } - break; - - case 250: -/* Line 1792 of yacc.c */ -#line 1776 "glslang.y" - { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true); - } - break; - - case 251: -/* Line 1792 of yacc.c */ -#line 1781 "glslang.y" - { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true); - } +#line 6000 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 252: -/* Line 1792 of yacc.c */ -#line 1786 "glslang.y" +#line 1823 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true); + parseContext.vulkanRemoved((yyvsp[0].lex).loc, "atomic counter types"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtAtomicUint; } +#line 6010 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 253: -/* Line 1792 of yacc.c */ -#line 1791 "glslang.y" +#line 1828 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true); + (yyval.interm.type).sampler.set(EbtFloat, Esd1D); } +#line 6020 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 254: -/* Line 1792 of yacc.c */ -#line 1796 "glslang.y" +#line 1833 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true); + (yyval.interm.type).sampler.set(EbtFloat, Esd2D); } +#line 6030 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 255: -/* Line 1792 of yacc.c */ -#line 1801 "glslang.y" +#line 1838 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true); + (yyval.interm.type).sampler.set(EbtFloat, Esd3D); } +#line 6040 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 256: -/* Line 1792 of yacc.c */ -#line 1806 "glslang.y" +#line 1843 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd1D); + (yyval.interm.type).sampler.set(EbtFloat, EsdCube); } +#line 6050 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 257: -/* Line 1792 of yacc.c */ -#line 1811 "glslang.y" +#line 1848 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd2D); + (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true); } +#line 6060 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 258: -/* Line 1792 of yacc.c */ -#line 1816 "glslang.y" +#line 1853 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd3D); + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true); } +#line 6070 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 259: -/* Line 1792 of yacc.c */ -#line 1821 "glslang.y" +#line 1858 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, EsdCube); + (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true); } +#line 6080 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 260: -/* Line 1792 of yacc.c */ -#line 1826 "glslang.y" +#line 1863 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd1D, true); + (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true); } +#line 6090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 261: -/* Line 1792 of yacc.c */ -#line 1831 "glslang.y" +#line 1868 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd2D, true); + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true); } +#line 6100 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 262: -/* Line 1792 of yacc.c */ -#line 1836 "glslang.y" +#line 1873 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, EsdCube, true); + (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true); } +#line 6110 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 263: -/* Line 1792 of yacc.c */ -#line 1841 "glslang.y" +#line 1878 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd1D); + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true); } +#line 6120 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 264: -/* Line 1792 of yacc.c */ -#line 1846 "glslang.y" +#line 1883 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd2D); + (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true); } +#line 6130 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 265: -/* Line 1792 of yacc.c */ -#line 1851 "glslang.y" +#line 1888 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd3D); + (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true); } +#line 6140 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 266: -/* Line 1792 of yacc.c */ -#line 1856 "glslang.y" +#line 1893 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, EsdCube); + (yyval.interm.type).sampler.set(EbtInt, Esd1D); } +#line 6150 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 267: -/* Line 1792 of yacc.c */ -#line 1861 "glslang.y" +#line 1898 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd1D, true); + (yyval.interm.type).sampler.set(EbtInt, Esd2D); } +#line 6160 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 268: -/* Line 1792 of yacc.c */ -#line 1866 "glslang.y" +#line 1903 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd2D, true); + (yyval.interm.type).sampler.set(EbtInt, Esd3D); } +#line 6170 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 269: -/* Line 1792 of yacc.c */ -#line 1871 "glslang.y" +#line 1908 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, EsdCube, true); + (yyval.interm.type).sampler.set(EbtInt, EsdCube); } +#line 6180 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 270: -/* Line 1792 of yacc.c */ -#line 1876 "glslang.y" +#line 1913 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdRect); + (yyval.interm.type).sampler.set(EbtInt, Esd1D, true); } +#line 6190 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 271: -/* Line 1792 of yacc.c */ -#line 1881 "glslang.y" +#line 1918 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true); + (yyval.interm.type).sampler.set(EbtInt, Esd2D, true); } +#line 6200 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 272: -/* Line 1792 of yacc.c */ -#line 1886 "glslang.y" +#line 1923 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, EsdRect); + (yyval.interm.type).sampler.set(EbtInt, EsdCube, true); } +#line 6210 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 273: -/* Line 1792 of yacc.c */ -#line 1891 "glslang.y" +#line 1928 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, EsdRect); + (yyval.interm.type).sampler.set(EbtUint, Esd1D); } +#line 6220 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 274: -/* Line 1792 of yacc.c */ -#line 1896 "glslang.y" +#line 1933 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer); + (yyval.interm.type).sampler.set(EbtUint, Esd2D); } +#line 6230 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 275: -/* Line 1792 of yacc.c */ -#line 1901 "glslang.y" +#line 1938 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); + (yyval.interm.type).sampler.set(EbtUint, Esd3D); } +#line 6240 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 276: -/* Line 1792 of yacc.c */ -#line 1906 "glslang.y" +#line 1943 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); + (yyval.interm.type).sampler.set(EbtUint, EsdCube); } +#line 6250 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 277: -/* Line 1792 of yacc.c */ -#line 1911 "glslang.y" +#line 1948 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true); + (yyval.interm.type).sampler.set(EbtUint, Esd1D, true); } +#line 6260 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 278: -/* Line 1792 of yacc.c */ -#line 1916 "glslang.y" +#line 1953 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true); + (yyval.interm.type).sampler.set(EbtUint, Esd2D, true); } +#line 6270 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 279: -/* Line 1792 of yacc.c */ -#line 1921 "glslang.y" +#line 1958 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true); + (yyval.interm.type).sampler.set(EbtUint, EsdCube, true); } +#line 6280 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 280: -/* Line 1792 of yacc.c */ -#line 1926 "glslang.y" +#line 1963 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true); + (yyval.interm.type).sampler.set(EbtFloat, EsdRect); } +#line 6290 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 281: -/* Line 1792 of yacc.c */ -#line 1931 "glslang.y" +#line 1968 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true); + (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true); } +#line 6300 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 282: -/* Line 1792 of yacc.c */ -#line 1936 "glslang.y" +#line 1973 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true); + (yyval.interm.type).sampler.set(EbtInt, EsdRect); } +#line 6310 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 283: -/* Line 1792 of yacc.c */ -#line 1941 "glslang.y" +#line 1978 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setPureSampler(false); + (yyval.interm.type).sampler.set(EbtUint, EsdRect); } +#line 6320 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 284: -/* Line 1792 of yacc.c */ -#line 1946 "glslang.y" +#line 1983 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setPureSampler(true); + (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer); } +#line 6330 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 285: -/* Line 1792 of yacc.c */ -#line 1951 "glslang.y" +#line 1988 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D); + (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); } +#line 6340 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 286: -/* Line 1792 of yacc.c */ -#line 1956 "glslang.y" +#line 1993 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D); + (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); } +#line 6350 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 287: -/* Line 1792 of yacc.c */ -#line 1961 "glslang.y" +#line 1998 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D); + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true); } +#line 6360 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 288: -/* Line 1792 of yacc.c */ -#line 1966 "glslang.y" +#line 2003 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube); + (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true); } +#line 6370 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 289: -/* Line 1792 of yacc.c */ -#line 1971 "glslang.y" +#line 2008 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true); + (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true); } +#line 6380 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 290: -/* Line 1792 of yacc.c */ -#line 1976 "glslang.y" +#line 2013 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true); + (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true); } +#line 6390 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 291: -/* Line 1792 of yacc.c */ -#line 1981 "glslang.y" +#line 2018 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true); + (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true); } +#line 6400 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 292: -/* Line 1792 of yacc.c */ -#line 1986 "glslang.y" +#line 2023 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D); + (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true); } +#line 6410 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 293: -/* Line 1792 of yacc.c */ -#line 1991 "glslang.y" +#line 2028 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D); + (yyval.interm.type).sampler.setPureSampler(false); } +#line 6420 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 294: -/* Line 1792 of yacc.c */ -#line 1996 "glslang.y" +#line 2033 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D); + (yyval.interm.type).sampler.setPureSampler(true); } +#line 6430 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 295: -/* Line 1792 of yacc.c */ -#line 2001 "glslang.y" +#line 2038 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D); } +#line 6440 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 296: -/* Line 1792 of yacc.c */ -#line 2006 "glslang.y" +#line 2043 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D); } +#line 6450 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 297: -/* Line 1792 of yacc.c */ -#line 2011 "glslang.y" +#line 2048 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D); } +#line 6460 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 298: -/* Line 1792 of yacc.c */ -#line 2016 "glslang.y" +#line 2053 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true); + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube); } +#line 6470 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 299: -/* Line 1792 of yacc.c */ -#line 2021 "glslang.y" +#line 2058 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true); } +#line 6480 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 300: -/* Line 1792 of yacc.c */ -#line 2026 "glslang.y" +#line 2063 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true); } +#line 6490 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 301: -/* Line 1792 of yacc.c */ -#line 2031 "glslang.y" +#line 2068 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D); + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true); } +#line 6500 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 302: -/* Line 1792 of yacc.c */ -#line 2036 "glslang.y" +#line 2073 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D); } +#line 6510 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 303: -/* Line 1792 of yacc.c */ -#line 2041 "glslang.y" +#line 2078 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D); } +#line 6520 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 304: -/* Line 1792 of yacc.c */ -#line 2046 "glslang.y" +#line 2083 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D); } +#line 6530 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 305: -/* Line 1792 of yacc.c */ -#line 2051 "glslang.y" +#line 2088 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true); + (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube); } +#line 6540 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 306: -/* Line 1792 of yacc.c */ -#line 2056 "glslang.y" +#line 2093 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true); } +#line 6550 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 307: -/* Line 1792 of yacc.c */ -#line 2061 "glslang.y" +#line 2098 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true); } +#line 6560 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 308: -/* Line 1792 of yacc.c */ -#line 2066 "glslang.y" +#line 2103 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); + (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true); } +#line 6570 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 309: -/* Line 1792 of yacc.c */ -#line 2071 "glslang.y" +#line 2108 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D); } +#line 6580 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 310: -/* Line 1792 of yacc.c */ -#line 2076 "glslang.y" +#line 2113 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D); } +#line 6590 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 311: -/* Line 1792 of yacc.c */ -#line 2081 "glslang.y" +#line 2118 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D); } +#line 6600 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 312: -/* Line 1792 of yacc.c */ -#line 2086 "glslang.y" +#line 2123 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true); + (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube); } +#line 6610 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 313: -/* Line 1792 of yacc.c */ -#line 2091 "glslang.y" +#line 2128 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true); } +#line 6620 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 314: -/* Line 1792 of yacc.c */ -#line 2096 "glslang.y" +#line 2133 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true); } +#line 6630 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 315: -/* Line 1792 of yacc.c */ -#line 2101 "glslang.y" +#line 2138 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true); + (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true); } +#line 6640 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 316: -/* Line 1792 of yacc.c */ -#line 2106 "glslang.y" +#line 2143 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true); + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect); } +#line 6650 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 317: -/* Line 1792 of yacc.c */ -#line 2111 "glslang.y" +#line 2148 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true); + (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); } +#line 6660 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 318: -/* Line 1792 of yacc.c */ -#line 2116 "glslang.y" +#line 2153 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D); + (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); } +#line 6670 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 319: -/* Line 1792 of yacc.c */ -#line 2121 "glslang.y" +#line 2158 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); + (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer); } +#line 6680 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 320: -/* Line 1792 of yacc.c */ -#line 2126 "glslang.y" +#line 2163 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); + (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); } +#line 6690 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 321: -/* Line 1792 of yacc.c */ -#line 2131 "glslang.y" +#line 2168 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D); + (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); } +#line 6700 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 322: -/* Line 1792 of yacc.c */ -#line 2136 "glslang.y" +#line 2173 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true); } +#line 6710 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 323: -/* Line 1792 of yacc.c */ -#line 2141 "glslang.y" +#line 2178 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true); } +#line 6720 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 324: -/* Line 1792 of yacc.c */ -#line 2146 "glslang.y" +#line 2183 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true); } +#line 6730 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 325: -/* Line 1792 of yacc.c */ -#line 2151 "glslang.y" +#line 2188 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); + (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true); } +#line 6740 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 326: -/* Line 1792 of yacc.c */ -#line 2156 "glslang.y" +#line 2193 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); + (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true); } +#line 6750 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 327: -/* Line 1792 of yacc.c */ -#line 2161 "glslang.y" +#line 2198 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect); + (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true); } +#line 6760 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 328: -/* Line 1792 of yacc.c */ -#line 2166 "glslang.y" +#line 2203 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D); } +#line 6770 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 329: -/* Line 1792 of yacc.c */ -#line 2171 "glslang.y" +#line 2208 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); + (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); } +#line 6780 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 330: -/* Line 1792 of yacc.c */ -#line 2176 "glslang.y" +#line 2213 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube); + (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); } +#line 6790 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 331: -/* Line 1792 of yacc.c */ -#line 2181 "glslang.y" +#line 2218 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D); } +#line 6800 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 332: -/* Line 1792 of yacc.c */ -#line 2186 "glslang.y" +#line 2223 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); } +#line 6810 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 333: -/* Line 1792 of yacc.c */ -#line 2191 "glslang.y" +#line 2228 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer); + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); } +#line 6820 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 334: -/* Line 1792 of yacc.c */ -#line 2196 "glslang.y" +#line 2233 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D); } +#line 6830 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 335: -/* Line 1792 of yacc.c */ -#line 2201 "glslang.y" +#line 2238 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); + (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); } +#line 6840 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 336: -/* Line 1792 of yacc.c */ -#line 2206 "glslang.y" +#line 2243 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true); + (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); } +#line 6850 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 337: -/* Line 1792 of yacc.c */ -#line 2211 "glslang.y" +#line 2248 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true); + (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect); } +#line 6860 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 338: -/* Line 1792 of yacc.c */ -#line 2216 "glslang.y" +#line 2253 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true); + (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); } +#line 6870 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 339: -/* Line 1792 of yacc.c */ -#line 2221 "glslang.y" +#line 2258 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true); + (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); } +#line 6880 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 340: -/* Line 1792 of yacc.c */ -#line 2226 "glslang.y" +#line 2263 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true); + (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube); } +#line 6890 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 341: -/* Line 1792 of yacc.c */ -#line 2231 "glslang.y" +#line 2268 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true); + (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); } +#line 6900 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 342: -/* Line 1792 of yacc.c */ -#line 2236 "glslang.y" +#line 2273 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true); + (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); } +#line 6910 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 343: -/* Line 1792 of yacc.c */ -#line 2241 "glslang.y" +#line 2278 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true); + (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer); } +#line 6920 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 344: -/* Line 1792 of yacc.c */ -#line 2246 "glslang.y" +#line 2283 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true); + (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); } +#line 6930 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 345: -/* Line 1792 of yacc.c */ -#line 2251 "glslang.y" +#line 2288 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true); + (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); } +#line 6940 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 346: -/* Line 1792 of yacc.c */ -#line 2256 "glslang.y" +#line 2293 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true); } +#line 6950 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 347: -/* Line 1792 of yacc.c */ -#line 2261 "glslang.y" +#line 2298 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true); + (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true); } +#line 6960 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 348: -/* Line 1792 of yacc.c */ -#line 2266 "glslang.y" +#line 2303 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true); + (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true); } +#line 6970 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 349: -/* Line 1792 of yacc.c */ -#line 2271 "glslang.y" +#line 2308 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true); + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true); } +#line 6980 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 350: -/* Line 1792 of yacc.c */ -#line 2276 "glslang.y" +#line 2313 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; - (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true); + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true); } +#line 6990 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 351: -/* Line 1792 of yacc.c */ -#line 2281 "glslang.y" +#line 2318 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true); + } +#line 7000 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 352: +#line 2323 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true); + } +#line 7010 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 353: +#line 2328 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true); + } +#line 7020 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 354: +#line 2333 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true); + } +#line 7030 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 355: +#line 2338 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true); + } +#line 7040 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 356: +#line 2343 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true); + } +#line 7050 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 357: +#line 2348 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true); + } +#line 7060 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 358: +#line 2353 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true); + } +#line 7070 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 359: +#line 2358 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true); + } +#line 7080 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 360: +#line 2363 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true); + } +#line 7090 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 361: +#line 2368 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // GL_OES_EGL_image_external - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); (yyval.interm.type).sampler.external = true; } +#line 7101 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 352: -/* Line 1792 of yacc.c */ -#line 2287 "glslang.y" + case 362: +#line 2374 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat); } +#line 7112 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 353: -/* Line 1792 of yacc.c */ -#line 2293 "glslang.y" + case 363: +#line 2380 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat, true); } +#line 7123 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 354: -/* Line 1792 of yacc.c */ -#line 2299 "glslang.y" + case 364: +#line 2386 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt); } +#line 7134 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 355: -/* Line 1792 of yacc.c */ -#line 2305 "glslang.y" + case 365: +#line 2392 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt, true); } +#line 7145 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 356: -/* Line 1792 of yacc.c */ -#line 2311 "glslang.y" + case 366: +#line 2398 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint); } +#line 7156 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 357: -/* Line 1792 of yacc.c */ -#line 2317 "glslang.y" + case 367: +#line 2404 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.requireStage((yyvsp[(1) - (1)].lex).loc, EShLangFragment, "subpass input"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint, true); } +#line 7167 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 358: -/* Line 1792 of yacc.c */ -#line 2323 "glslang.y" + case 368: +#line 2410 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.type) = (yyvsp[(1) - (1)].interm.type); + (yyval.interm.type) = (yyvsp[0].interm.type); (yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type)); } +#line 7177 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 359: -/* Line 1792 of yacc.c */ -#line 2328 "glslang.y" + case 369: +#line 2415 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // // This is for user defined type names. The lexical phase looked up the // type. // - if (const TVariable* variable = ((yyvsp[(1) - (1)].lex).symbol)->getAsVariable()) { + if (const TVariable* variable = ((yyvsp[0].lex).symbol)->getAsVariable()) { const TType& structure = variable->getType(); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtStruct; (yyval.interm.type).userDef = &structure; } else - parseContext.error((yyvsp[(1) - (1)].lex).loc, "expected type name", (yyvsp[(1) - (1)].lex).string->c_str(), ""); - } - break; - - case 360: -/* Line 1792 of yacc.c */ -#line 2344 "glslang.y" - { - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "highp precision qualifier"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type).qualifier, EpqHigh); - } - break; - - case 361: -/* Line 1792 of yacc.c */ -#line 2349 "glslang.y" - { - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type).qualifier, EpqMedium); - } - break; - - case 362: -/* Line 1792 of yacc.c */ -#line 2354 "glslang.y" - { - parseContext.profileRequires((yyvsp[(1) - (1)].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier"); - (yyval.interm.type).init((yyvsp[(1) - (1)].lex).loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier((yyvsp[(1) - (1)].lex).loc, (yyval.interm.type).qualifier, EpqLow); - } - break; - - case 363: -/* Line 1792 of yacc.c */ -#line 2362 "glslang.y" - { parseContext.nestedStructCheck((yyvsp[(1) - (3)].lex).loc); } - break; - - case 364: -/* Line 1792 of yacc.c */ -#line 2362 "glslang.y" - { - TType* structure = new TType((yyvsp[(5) - (6)].interm.typeList), *(yyvsp[(2) - (6)].lex).string); - parseContext.structArrayCheck((yyvsp[(2) - (6)].lex).loc, *structure); - TVariable* userTypeDef = new TVariable((yyvsp[(2) - (6)].lex).string, *structure, true); - if (! parseContext.symbolTable.insert(*userTypeDef)) - parseContext.error((yyvsp[(2) - (6)].lex).loc, "redefinition", (yyvsp[(2) - (6)].lex).string->c_str(), "struct"); - (yyval.interm.type).init((yyvsp[(1) - (6)].lex).loc); - (yyval.interm.type).basicType = EbtStruct; - (yyval.interm.type).userDef = structure; - --parseContext.structNestingLevel; - } - break; - - case 365: -/* Line 1792 of yacc.c */ -#line 2373 "glslang.y" - { parseContext.nestedStructCheck((yyvsp[(1) - (2)].lex).loc); } - break; - - case 366: -/* Line 1792 of yacc.c */ -#line 2373 "glslang.y" - { - TType* structure = new TType((yyvsp[(4) - (5)].interm.typeList), TString("")); - (yyval.interm.type).init((yyvsp[(1) - (5)].lex).loc); - (yyval.interm.type).basicType = EbtStruct; - (yyval.interm.type).userDef = structure; - --parseContext.structNestingLevel; - } - break; - - case 367: -/* Line 1792 of yacc.c */ -#line 2383 "glslang.y" - { - (yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList); - } - break; - - case 368: -/* Line 1792 of yacc.c */ -#line 2386 "glslang.y" - { - (yyval.interm.typeList) = (yyvsp[(1) - (2)].interm.typeList); - for (unsigned int i = 0; i < (yyvsp[(2) - (2)].interm.typeList)->size(); ++i) { - for (unsigned int j = 0; j < (yyval.interm.typeList)->size(); ++j) { - if ((*(yyval.interm.typeList))[j].type->getFieldName() == (*(yyvsp[(2) - (2)].interm.typeList))[i].type->getFieldName()) - parseContext.error((*(yyvsp[(2) - (2)].interm.typeList))[i].loc, "duplicate member name:", "", (*(yyvsp[(2) - (2)].interm.typeList))[i].type->getFieldName().c_str()); - } - (yyval.interm.typeList)->push_back((*(yyvsp[(2) - (2)].interm.typeList))[i]); - } - } - break; - - case 369: -/* Line 1792 of yacc.c */ -#line 2399 "glslang.y" - { - if ((yyvsp[(1) - (3)].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[(1) - (3)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); - if (parseContext.profile == EEsProfile) - parseContext.arraySizeRequiredCheck((yyvsp[(1) - (3)].interm.type).loc, *(yyvsp[(1) - (3)].interm.type).arraySizes); - } - - (yyval.interm.typeList) = (yyvsp[(2) - (3)].interm.typeList); - - parseContext.voidErrorCheck((yyvsp[(1) - (3)].interm.type).loc, (*(yyvsp[(2) - (3)].interm.typeList))[0].type->getFieldName(), (yyvsp[(1) - (3)].interm.type).basicType); - parseContext.precisionQualifierCheck((yyvsp[(1) - (3)].interm.type).loc, (yyvsp[(1) - (3)].interm.type).basicType, (yyvsp[(1) - (3)].interm.type).qualifier); - - for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { - parseContext.arrayDimCheck((yyvsp[(1) - (3)].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[(1) - (3)].interm.type).arraySizes); - (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[(1) - (3)].interm.type)); - } + parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), ""); } +#line 7195 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 370: -/* Line 1792 of yacc.c */ -#line 2417 "glslang.y" +#line 2431 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.globalQualifierFixCheck((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).qualifier); - if ((yyvsp[(2) - (4)].interm.type).arraySizes) { - parseContext.profileRequires((yyvsp[(2) - (4)].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires((yyvsp[(2) - (4)].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); - if (parseContext.profile == EEsProfile) - parseContext.arraySizeRequiredCheck((yyvsp[(2) - (4)].interm.type).loc, *(yyvsp[(2) - (4)].interm.type).arraySizes); - } - - (yyval.interm.typeList) = (yyvsp[(3) - (4)].interm.typeList); - - parseContext.checkNoShaderLayouts((yyvsp[(1) - (4)].interm.type).loc, (yyvsp[(1) - (4)].interm.type).shaderQualifiers); - parseContext.voidErrorCheck((yyvsp[(2) - (4)].interm.type).loc, (*(yyvsp[(3) - (4)].interm.typeList))[0].type->getFieldName(), (yyvsp[(2) - (4)].interm.type).basicType); - parseContext.mergeQualifiers((yyvsp[(2) - (4)].interm.type).loc, (yyvsp[(2) - (4)].interm.type).qualifier, (yyvsp[(1) - (4)].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[(2) - (4)].interm.type).loc, (yyvsp[(2) - (4)].interm.type).basicType, (yyvsp[(2) - (4)].interm.type).qualifier); - - for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { - parseContext.arrayDimCheck((yyvsp[(1) - (4)].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[(2) - (4)].interm.type).arraySizes); - (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[(2) - (4)].interm.type)); - } + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "highp precision qualifier"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqHigh); } +#line 7205 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 371: -/* Line 1792 of yacc.c */ -#line 2441 "glslang.y" +#line 2436 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.typeList) = new TTypeList; - (yyval.interm.typeList)->push_back((yyvsp[(1) - (1)].interm.typeLine)); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqMedium); } +#line 7215 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 372: -/* Line 1792 of yacc.c */ -#line 2445 "glslang.y" +#line 2441 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine)); + parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqLow); } +#line 7225 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 373: -/* Line 1792 of yacc.c */ -#line 2451 "glslang.y" - { - (yyval.interm.typeLine).type = new TType(EbtVoid); - (yyval.interm.typeLine).loc = (yyvsp[(1) - (1)].lex).loc; - (yyval.interm.typeLine).type->setFieldName(*(yyvsp[(1) - (1)].lex).string); - } +#line 2449 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); } +#line 7231 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 374: -/* Line 1792 of yacc.c */ -#line 2456 "glslang.y" +#line 2449 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.arrayDimCheck((yyvsp[(1) - (2)].lex).loc, (yyvsp[(2) - (2)].interm).arraySizes, 0); - - (yyval.interm.typeLine).type = new TType(EbtVoid); - (yyval.interm.typeLine).loc = (yyvsp[(1) - (2)].lex).loc; - (yyval.interm.typeLine).type->setFieldName(*(yyvsp[(1) - (2)].lex).string); - (yyval.interm.typeLine).type->newArraySizes(*(yyvsp[(2) - (2)].interm).arraySizes); + TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string); + parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure); + TVariable* userTypeDef = new TVariable((yyvsp[-4].lex).string, *structure, true); + if (! parseContext.symbolTable.insert(*userTypeDef)) + parseContext.error((yyvsp[-4].lex).loc, "redefinition", (yyvsp[-4].lex).string->c_str(), "struct"); + (yyval.interm.type).init((yyvsp[-5].lex).loc); + (yyval.interm.type).basicType = EbtStruct; + (yyval.interm.type).userDef = structure; + --parseContext.structNestingLevel; } +#line 7247 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 375: -/* Line 1792 of yacc.c */ -#line 2467 "glslang.y" - { - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); - } +#line 2460 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); } +#line 7253 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 376: -/* Line 1792 of yacc.c */ -#line 2470 "glslang.y" +#line 2460 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - const char* initFeature = "{ } style initializers"; - parseContext.requireProfile((yyvsp[(1) - (3)].lex).loc, ~EEsProfile, initFeature); - parseContext.profileRequires((yyvsp[(1) - (3)].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); - (yyval.interm.intermTypedNode) = (yyvsp[(2) - (3)].interm.intermTypedNode); + TType* structure = new TType((yyvsp[-1].interm.typeList), TString("")); + (yyval.interm.type).init((yyvsp[-4].lex).loc); + (yyval.interm.type).basicType = EbtStruct; + (yyval.interm.type).userDef = structure; + --parseContext.structNestingLevel; } +#line 7265 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 377: -/* Line 1792 of yacc.c */ -#line 2476 "glslang.y" +#line 2470 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - const char* initFeature = "{ } style initializers"; - parseContext.requireProfile((yyvsp[(1) - (4)].lex).loc, ~EEsProfile, initFeature); - parseContext.profileRequires((yyvsp[(1) - (4)].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); - (yyval.interm.intermTypedNode) = (yyvsp[(2) - (4)].interm.intermTypedNode); + (yyval.interm.typeList) = (yyvsp[0].interm.typeList); } +#line 7273 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 378: -/* Line 1792 of yacc.c */ -#line 2485 "glslang.y" +#line 2473 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[(1) - (1)].interm.intermTypedNode), (yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc()); + (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); + for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) { + for (unsigned int j = 0; j < (yyval.interm.typeList)->size(); ++j) { + if ((*(yyval.interm.typeList))[j].type->getFieldName() == (*(yyvsp[0].interm.typeList))[i].type->getFieldName()) + parseContext.error((*(yyvsp[0].interm.typeList))[i].loc, "duplicate member name:", "", (*(yyvsp[0].interm.typeList))[i].type->getFieldName().c_str()); + } + (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]); + } } +#line 7288 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 379: -/* Line 1792 of yacc.c */ -#line 2488 "glslang.y" +#line 2486 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (3)].interm.intermTypedNode), (yyvsp[(3) - (3)].interm.intermTypedNode)); + if ((yyvsp[-2].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + if (parseContext.profile == EEsProfile) + parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); + } + + (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); + + parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); + parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier); + + for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { + parseContext.arrayDimCheck((yyvsp[-2].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[-2].interm.type).arraySizes); + (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[-2].interm.type)); + } } +#line 7311 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 380: -/* Line 1792 of yacc.c */ -#line 2494 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } +#line 2504 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.globalQualifierFixCheck((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier); + if ((yyvsp[-2].interm.type).arraySizes) { + parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); + parseContext.profileRequires((yyvsp[-2].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); + if (parseContext.profile == EEsProfile) + parseContext.arraySizeRequiredCheck((yyvsp[-2].interm.type).loc, *(yyvsp[-2].interm.type).arraySizes); + } + + (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); + + parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); + parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); + parseContext.mergeQualifiers((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, (yyvsp[-3].interm.type).qualifier, true); + parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier); + + for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { + parseContext.arrayDimCheck((yyvsp[-3].interm.type).loc, (*(yyval.interm.typeList))[i].type, (yyvsp[-2].interm.type).arraySizes); + (*(yyval.interm.typeList))[i].type->mergeType((yyvsp[-2].interm.type)); + } + } +#line 7337 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 381: -/* Line 1792 of yacc.c */ -#line 2498 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } +#line 2528 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.typeList) = new TTypeList; + (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); + } +#line 7346 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 382: -/* Line 1792 of yacc.c */ -#line 2499 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } +#line 2532 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); + } +#line 7354 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 383: -/* Line 1792 of yacc.c */ -#line 2505 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } +#line 2538 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.typeLine).type = new TType(EbtVoid); + (yyval.interm.typeLine).loc = (yyvsp[0].lex).loc; + (yyval.interm.typeLine).type->setFieldName(*(yyvsp[0].lex).string); + } +#line 7364 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 384: -/* Line 1792 of yacc.c */ -#line 2506 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } +#line 2543 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.arrayDimCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes, 0); + + (yyval.interm.typeLine).type = new TType(EbtVoid); + (yyval.interm.typeLine).loc = (yyvsp[-1].lex).loc; + (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string); + (yyval.interm.typeLine).type->newArraySizes(*(yyvsp[0].interm).arraySizes); + } +#line 7377 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 385: -/* Line 1792 of yacc.c */ -#line 2507 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } +#line 2554 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + } +#line 7385 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 386: -/* Line 1792 of yacc.c */ -#line 2508 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } +#line 2557 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + const char* initFeature = "{ } style initializers"; + parseContext.requireProfile((yyvsp[-2].lex).loc, ~EEsProfile, initFeature); + parseContext.profileRequires((yyvsp[-2].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); + (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); + } +#line 7396 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 387: -/* Line 1792 of yacc.c */ -#line 2509 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } +#line 2563 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + const char* initFeature = "{ } style initializers"; + parseContext.requireProfile((yyvsp[-3].lex).loc, ~EEsProfile, initFeature); + parseContext.profileRequires((yyvsp[-3].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); + (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); + } +#line 7407 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 388: -/* Line 1792 of yacc.c */ -#line 2510 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } +#line 2572 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc()); + } +#line 7415 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 389: -/* Line 1792 of yacc.c */ -#line 2511 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } +#line 2575 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); + } +#line 7423 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 390: -/* Line 1792 of yacc.c */ -#line 2515 "glslang.y" - { (yyval.interm.intermNode) = 0; } +#line 2581 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7429 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 391: -/* Line 1792 of yacc.c */ -#line 2516 "glslang.y" - { - parseContext.symbolTable.push(); - ++parseContext.statementNestingLevel; - } +#line 2585 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7435 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 392: -/* Line 1792 of yacc.c */ -#line 2520 "glslang.y" +#line 2586 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7441 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 393: +#line 2592 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7447 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 394: +#line 2593 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7453 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 395: +#line 2594 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7459 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 396: +#line 2595 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7465 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 397: +#line 2596 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7471 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 398: +#line 2597 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7477 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 399: +#line 2598 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7483 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 400: +#line 2602 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = 0; } +#line 7489 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 401: +#line 2603 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.symbolTable.push(); + ++parseContext.statementNestingLevel; + } +#line 7498 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 402: +#line 2607 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; } +#line 7507 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 393: -/* Line 1792 of yacc.c */ -#line 2524 "glslang.y" + case 403: +#line 2611 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - if ((yyvsp[(3) - (5)].interm.intermNode) && (yyvsp[(3) - (5)].interm.intermNode)->getAsAggregate()) - (yyvsp[(3) - (5)].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); - (yyval.interm.intermNode) = (yyvsp[(3) - (5)].interm.intermNode); + if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate()) + (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); + (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode); } +#line 7517 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 394: -/* Line 1792 of yacc.c */ -#line 2532 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + case 404: +#line 2619 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7523 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 395: -/* Line 1792 of yacc.c */ -#line 2533 "glslang.y" - { (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); } + case 405: +#line 2620 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7529 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 396: -/* Line 1792 of yacc.c */ -#line 2537 "glslang.y" + case 406: +#line 2624 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { ++parseContext.controlFlowNestingLevel; } +#line 7537 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 397: -/* Line 1792 of yacc.c */ -#line 2540 "glslang.y" + case 407: +#line 2627 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { --parseContext.controlFlowNestingLevel; - (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7546 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 398: -/* Line 1792 of yacc.c */ -#line 2544 "glslang.y" + case 408: +#line 2631 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } +#line 7556 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 399: -/* Line 1792 of yacc.c */ -#line 2549 "glslang.y" + case 409: +#line 2636 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; - (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); - } - break; - - case 400: -/* Line 1792 of yacc.c */ -#line 2558 "glslang.y" - { - (yyval.interm.intermNode) = 0; - } - break; - - case 401: -/* Line 1792 of yacc.c */ -#line 2561 "glslang.y" - { - if ((yyvsp[(2) - (3)].interm.intermNode) && (yyvsp[(2) - (3)].interm.intermNode)->getAsAggregate()) - (yyvsp[(2) - (3)].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); - (yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermNode); - } - break; - - case 402: -/* Line 1792 of yacc.c */ -#line 2569 "glslang.y" - { - (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode)); - if ((yyvsp[(1) - (1)].interm.intermNode) && (yyvsp[(1) - (1)].interm.intermNode)->getAsBranchNode() && ((yyvsp[(1) - (1)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || - (yyvsp[(1) - (1)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence(0, (yyvsp[(1) - (1)].interm.intermNode)); - (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case - } - } - break; - - case 403: -/* Line 1792 of yacc.c */ -#line 2577 "glslang.y" - { - if ((yyvsp[(2) - (2)].interm.intermNode) && (yyvsp[(2) - (2)].interm.intermNode)->getAsBranchNode() && ((yyvsp[(2) - (2)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || - (yyvsp[(2) - (2)].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence((yyvsp[(1) - (2)].interm.intermNode) ? (yyvsp[(1) - (2)].interm.intermNode)->getAsAggregate() : 0, (yyvsp[(2) - (2)].interm.intermNode)); - (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case - } else - (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode)); - } - break; - - case 404: -/* Line 1792 of yacc.c */ -#line 2588 "glslang.y" - { (yyval.interm.intermNode) = 0; } - break; - - case 405: -/* Line 1792 of yacc.c */ -#line 2589 "glslang.y" - { (yyval.interm.intermNode) = static_cast((yyvsp[(1) - (2)].interm.intermTypedNode)); } - break; - - case 406: -/* Line 1792 of yacc.c */ -#line 2593 "glslang.y" - { - parseContext.boolCheck((yyvsp[(1) - (5)].lex).loc, (yyvsp[(3) - (5)].interm.intermTypedNode)); - (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[(3) - (5)].interm.intermTypedNode), (yyvsp[(5) - (5)].interm.nodePair), (yyvsp[(1) - (5)].lex).loc); - } - break; - - case 407: -/* Line 1792 of yacc.c */ -#line 2600 "glslang.y" - { - (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode); - (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermNode); - } - break; - - case 408: -/* Line 1792 of yacc.c */ -#line 2604 "glslang.y" - { - (yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode); - (yyval.interm.nodePair).node2 = 0; - } - break; - - case 409: -/* Line 1792 of yacc.c */ -#line 2612 "glslang.y" - { - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); - parseContext.boolCheck((yyvsp[(1) - (1)].interm.intermTypedNode)->getLoc(), (yyvsp[(1) - (1)].interm.intermTypedNode)); + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7567 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 410: -/* Line 1792 of yacc.c */ -#line 2616 "glslang.y" +#line 2645 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - parseContext.boolCheck((yyvsp[(2) - (4)].lex).loc, (yyvsp[(1) - (4)].interm.type)); + (yyval.interm.intermNode) = 0; + } +#line 7575 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; - TType type((yyvsp[(1) - (4)].interm.type)); - TIntermNode* initNode = parseContext.declareVariable((yyvsp[(2) - (4)].lex).loc, *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), 0, (yyvsp[(4) - (4)].interm.intermTypedNode)); + case 411: +#line 2648 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate()) + (yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); + (yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode); + } +#line 7585 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 412: +#line 2656 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); + if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || + (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { + parseContext.wrapupSwitchSubsequence(0, (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case + } + } +#line 7598 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 413: +#line 2664 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || + (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { + parseContext.wrapupSwitchSubsequence((yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0, (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case + } else + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); + } +#line 7611 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 414: +#line 2675 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = 0; } +#line 7617 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 415: +#line 2676 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { (yyval.interm.intermNode) = static_cast((yyvsp[-1].interm.intermTypedNode)); } +#line 7623 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 416: +#line 2680 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 7631 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 417: +#line 2683 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.handleSelectionAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 7640 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 418: +#line 2689 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-2].interm.intermTypedNode)); + (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yyvsp[-4].lex).loc); + } +#line 7649 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 419: +#line 2696 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); + (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); + } +#line 7658 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 420: +#line 2700 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); + (yyval.interm.nodePair).node2 = 0; + } +#line 7667 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 421: +#line 2708 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)); + } +#line 7676 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 422: +#line 2712 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type)); + + TType type((yyvsp[-3].interm.type)); + TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); if (initNode) (yyval.interm.intermTypedNode) = initNode->getAsTyped(); else (yyval.interm.intermTypedNode) = 0; } +#line 7691 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 411: -/* Line 1792 of yacc.c */ -#line 2629 "glslang.y" + case 423: +#line 2725 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 7699 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 424: +#line 2728 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.handleSwitchAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 7708 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 425: +#line 2734 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; @@ -7778,13 +7717,13 @@ yyreduce: parseContext.switchLevel.push_back(parseContext.statementNestingLevel); parseContext.symbolTable.push(); } +#line 7721 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 412: -/* Line 1792 of yacc.c */ -#line 2637 "glslang.y" + case 426: +#line 2742 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[(1) - (8)].lex).loc, (yyvsp[(3) - (8)].interm.intermTypedNode), (yyvsp[(7) - (8)].interm.intermNode) ? (yyvsp[(7) - (8)].interm.intermNode)->getAsAggregate() : 0); + (yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[-7].lex).loc, (yyvsp[-5].interm.intermTypedNode), (yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0); delete parseContext.switchSequenceStack.back(); parseContext.switchSequenceStack.pop_back(); parseContext.switchLevel.pop_back(); @@ -7792,299 +7731,369 @@ yyreduce: --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } +#line 7735 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 413: -/* Line 1792 of yacc.c */ -#line 2649 "glslang.y" + case 427: +#line 2754 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = 0; } +#line 7743 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 414: -/* Line 1792 of yacc.c */ -#line 2652 "glslang.y" + case 428: +#line 2757 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { - (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } +#line 7751 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 415: -/* Line 1792 of yacc.c */ -#line 2658 "glslang.y" + case 429: +#line 2763 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) - parseContext.error((yyvsp[(1) - (3)].lex).loc, "cannot appear outside switch statement", "case", ""); + parseContext.error((yyvsp[-2].lex).loc, "cannot appear outside switch statement", "case", ""); else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) - parseContext.error((yyvsp[(1) - (3)].lex).loc, "cannot be nested inside control flow", "case", ""); + parseContext.error((yyvsp[-2].lex).loc, "cannot be nested inside control flow", "case", ""); else { - parseContext.constantValueCheck((yyvsp[(2) - (3)].interm.intermTypedNode), "case"); - parseContext.integerCheck((yyvsp[(2) - (3)].interm.intermTypedNode), "case"); - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[(2) - (3)].interm.intermTypedNode), (yyvsp[(1) - (3)].lex).loc); + parseContext.constantValueCheck((yyvsp[-1].interm.intermTypedNode), "case"); + parseContext.integerCheck((yyvsp[-1].interm.intermTypedNode), "case"); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc); } } +#line 7768 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 416: -/* Line 1792 of yacc.c */ -#line 2670 "glslang.y" + case 430: +#line 2775 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) - parseContext.error((yyvsp[(1) - (2)].lex).loc, "cannot appear outside switch statement", "default", ""); + parseContext.error((yyvsp[-1].lex).loc, "cannot appear outside switch statement", "default", ""); else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) - parseContext.error((yyvsp[(1) - (2)].lex).loc, "cannot be nested inside control flow", "default", ""); + parseContext.error((yyvsp[-1].lex).loc, "cannot be nested inside control flow", "default", ""); else - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[(1) - (2)].lex).loc); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc); } +#line 7782 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 417: -/* Line 1792 of yacc.c */ -#line 2682 "glslang.y" + case 431: +#line 2787 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 7790 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 432: +#line 2790 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.handleLoopAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 7799 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 433: +#line 2796 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if (! parseContext.limits.whileLoops) - parseContext.error((yyvsp[(1) - (2)].lex).loc, "while loops not available", "limitation", ""); + parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", ""); parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } +#line 7812 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 418: -/* Line 1792 of yacc.c */ -#line 2690 "glslang.y" + case 434: +#line 2804 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[(6) - (6)].interm.intermNode), (yyvsp[(4) - (6)].interm.intermTypedNode), 0, true, (yyvsp[(1) - (6)].lex).loc); + (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, true, (yyvsp[-5].lex).loc); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } +#line 7824 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 419: -/* Line 1792 of yacc.c */ -#line 2697 "glslang.y" + case 435: +#line 2811 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } +#line 7834 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 420: -/* Line 1792 of yacc.c */ -#line 2702 "glslang.y" + case 436: +#line 2816 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { if (! parseContext.limits.whileLoops) - parseContext.error((yyvsp[(1) - (8)].lex).loc, "do-while loops not available", "limitation", ""); + parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", ""); - parseContext.boolCheck((yyvsp[(8) - (8)].lex).loc, (yyvsp[(6) - (8)].interm.intermTypedNode)); + parseContext.boolCheck((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode)); - (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[(3) - (8)].interm.intermNode), (yyvsp[(6) - (8)].interm.intermTypedNode), 0, false, (yyvsp[(4) - (8)].lex).loc); + (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[-5].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, false, (yyvsp[-4].lex).loc); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } +#line 7850 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 421: -/* Line 1792 of yacc.c */ -#line 2713 "glslang.y" + case 437: +#line 2827 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } +#line 7861 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; - case 422: -/* Line 1792 of yacc.c */ -#line 2719 "glslang.y" + case 438: +#line 2833 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[(4) - (7)].interm.intermNode), (yyvsp[(2) - (7)].lex).loc); - TIntermLoop* forLoop = parseContext.intermediate.addLoop((yyvsp[(7) - (7)].interm.intermNode), reinterpret_cast((yyvsp[(5) - (7)].interm.nodePair).node1), reinterpret_cast((yyvsp[(5) - (7)].interm.nodePair).node2), true, (yyvsp[(1) - (7)].lex).loc); + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc); + TIntermLoop* forLoop = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), reinterpret_cast((yyvsp[-2].interm.nodePair).node1), reinterpret_cast((yyvsp[-2].interm.nodePair).node2), true, (yyvsp[-6].lex).loc); if (! parseContext.limits.nonInductiveForLoops) - parseContext.inductiveLoopCheck((yyvsp[(1) - (7)].lex).loc, (yyvsp[(4) - (7)].interm.intermNode), forLoop); - (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyval.interm.intermNode), forLoop, (yyvsp[(1) - (7)].lex).loc); + parseContext.inductiveLoopCheck((yyvsp[-6].lex).loc, (yyvsp[-3].interm.intermNode), forLoop); + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyval.interm.intermNode), forLoop, (yyvsp[-6].lex).loc); (yyval.interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); --parseContext.loopNestingLevel; --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } - break; - - case 423: -/* Line 1792 of yacc.c */ -#line 2734 "glslang.y" - { - (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); - } - break; - - case 424: -/* Line 1792 of yacc.c */ -#line 2737 "glslang.y" - { - (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); - } - break; - - case 425: -/* Line 1792 of yacc.c */ -#line 2743 "glslang.y" - { - (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); - } - break; - - case 426: -/* Line 1792 of yacc.c */ -#line 2746 "glslang.y" - { - (yyval.interm.intermTypedNode) = 0; - } - break; - - case 427: -/* Line 1792 of yacc.c */ -#line 2752 "glslang.y" - { - (yyval.interm.nodePair).node1 = (yyvsp[(1) - (2)].interm.intermTypedNode); - (yyval.interm.nodePair).node2 = 0; - } - break; - - case 428: -/* Line 1792 of yacc.c */ -#line 2756 "glslang.y" - { - (yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermTypedNode); - (yyval.interm.nodePair).node2 = (yyvsp[(3) - (3)].interm.intermTypedNode); - } - break; - - case 429: -/* Line 1792 of yacc.c */ -#line 2763 "glslang.y" - { - if (parseContext.loopNestingLevel <= 0) - parseContext.error((yyvsp[(1) - (2)].lex).loc, "continue statement only allowed in loops", "", ""); - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[(1) - (2)].lex).loc); - } - break; - - case 430: -/* Line 1792 of yacc.c */ -#line 2768 "glslang.y" - { - if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) - parseContext.error((yyvsp[(1) - (2)].lex).loc, "break statement only allowed in switch and loops", "", ""); - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[(1) - (2)].lex).loc); - } - break; - - case 431: -/* Line 1792 of yacc.c */ -#line 2773 "glslang.y" - { - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[(1) - (2)].lex).loc); - if (parseContext.currentFunctionType->getBasicType() != EbtVoid) - parseContext.error((yyvsp[(1) - (2)].lex).loc, "non-void function must return a value", "return", ""); - if (parseContext.inMain) - parseContext.postMainReturn = true; - } - break; - - case 432: -/* Line 1792 of yacc.c */ -#line 2780 "glslang.y" - { - (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[(1) - (3)].lex).loc, (yyvsp[(2) - (3)].interm.intermTypedNode)); - } - break; - - case 433: -/* Line 1792 of yacc.c */ -#line 2783 "glslang.y" - { - parseContext.requireStage((yyvsp[(1) - (2)].lex).loc, EShLangFragment, "discard"); - (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[(1) - (2)].lex).loc); - } - break; - - case 434: -/* Line 1792 of yacc.c */ -#line 2792 "glslang.y" - { - (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); - parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); - } - break; - - case 435: -/* Line 1792 of yacc.c */ -#line 2796 "glslang.y" - { - (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermNode), (yyvsp[(2) - (2)].interm.intermNode)); - parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); - } - break; - - case 436: -/* Line 1792 of yacc.c */ -#line 2803 "glslang.y" - { - (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); - } - break; - - case 437: -/* Line 1792 of yacc.c */ -#line 2806 "glslang.y" - { - (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); - } - break; - - case 438: -/* Line 1792 of yacc.c */ -#line 2812 "glslang.y" - { - (yyvsp[(1) - (1)].interm).function = parseContext.handleFunctionDeclarator((yyvsp[(1) - (1)].interm).loc, *(yyvsp[(1) - (1)].interm).function, false /* not prototype */); - (yyvsp[(1) - (1)].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[(1) - (1)].interm).loc, *(yyvsp[(1) - (1)].interm).function); - } +#line 7878 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; case 439: -/* Line 1792 of yacc.c */ -#line 2816 "glslang.y" +#line 2848 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 7886 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 440: +#line 2851 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 7894 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 441: +#line 2857 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); + } +#line 7902 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 442: +#line 2860 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermTypedNode) = 0; + } +#line 7910 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 443: +#line 2866 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); + (yyval.interm.nodePair).node2 = 0; + } +#line 7919 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 444: +#line 2870 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); + (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); + } +#line 7928 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 445: +#line 2877 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + if (parseContext.loopNestingLevel <= 0) + parseContext.error((yyvsp[-1].lex).loc, "continue statement only allowed in loops", "", ""); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[-1].lex).loc); + } +#line 7938 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 446: +#line 2882 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) + parseContext.error((yyvsp[-1].lex).loc, "break statement only allowed in switch and loops", "", ""); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[-1].lex).loc); + } +#line 7948 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 447: +#line 2887 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc); + if (parseContext.currentFunctionType->getBasicType() != EbtVoid) + parseContext.error((yyvsp[-1].lex).loc, "non-void function must return a value", "return", ""); + if (parseContext.inMain) + parseContext.postEntryPointReturn = true; + } +#line 7960 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 448: +#line 2894 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode)); + } +#line 7968 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 449: +#line 2897 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard"); + (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc); + } +#line 7977 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 450: +#line 2906 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); + } +#line 7986 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 451: +#line 2910 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + if ((yyvsp[0].interm.intermNode) != nullptr) { + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); + parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); + } + } +#line 7997 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 452: +#line 2919 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 8005 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 453: +#line 2922 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); + } +#line 8013 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 454: +#line 2925 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "extraneous semicolon"); + parseContext.profileRequires((yyvsp[0].lex).loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); + (yyval.interm.intermNode) = nullptr; + } +#line 8023 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 455: +#line 2933 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyvsp[0].interm).function = parseContext.handleFunctionDeclarator((yyvsp[0].interm).loc, *(yyvsp[0].interm).function, false /* not prototype */); + (yyvsp[0].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[0].interm).loc, *(yyvsp[0].interm).function); + } +#line 8032 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 456: +#line 2937 "MachineIndependent/glslang.y" /* yacc.c:1646 */ { // May be best done as post process phase on intermediate code if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) - parseContext.error((yyvsp[(1) - (3)].interm).loc, "function does not return a value:", "", (yyvsp[(1) - (3)].interm).function->getName().c_str()); + parseContext.error((yyvsp[-2].interm).loc, "function does not return a value:", "", (yyvsp[-2].interm).function->getName().c_str()); parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, (yyvsp[(3) - (3)].interm.intermNode)); - parseContext.intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yyvsp[(1) - (3)].interm).function->getType(), (yyvsp[(1) - (3)].interm).loc); - (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[(1) - (3)].interm).function->getMangledName().c_str()); + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermNode)); + parseContext.intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yyvsp[-2].interm).function->getType(), (yyvsp[-2].interm).loc); + (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[-2].interm).function->getMangledName().c_str()); // store the pragma information for debug and optimize and other vendor specific // information. This information can be queried from the parse tree (yyval.interm.intermNode)->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize); (yyval.interm.intermNode)->getAsAggregate()->setDebug(parseContext.contextPragma.debug); - (yyval.interm.intermNode)->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable); + (yyval.interm.intermNode)->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable); } +#line 8052 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 457: +#line 2955 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.attributes) = (yyvsp[-2].interm.attributes); + parseContext.requireExtensions((yyvsp[-4].lex).loc, 1, &E_GL_EXT_control_flow_attributes, "attribute"); + } +#line 8061 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 458: +#line 2961 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.attributes) = (yyvsp[0].interm.attributes); + } +#line 8069 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 459: +#line 2964 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes)); + } +#line 8077 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 460: +#line 2969 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string); + } +#line 8085 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ + break; + + case 461: +#line 2972 "MachineIndependent/glslang.y" /* yacc.c:1646 */ + { + (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode)); + } +#line 8093 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ break; -/* Line 1792 of yacc.c */ -#line 8088 "glslang_tab.cpp" +#line 8097 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -8106,7 +8115,7 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -8121,9 +8130,9 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -8174,20 +8183,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, pParseContext); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, pParseContext); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -8206,7 +8215,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -8219,29 +8228,29 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp, pParseContext); + yystos[yystate], yyvsp, pParseContext); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -8292,14 +8301,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, pParseContext); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, pParseContext); + yystos[*yyssp], yyvsp, pParseContext); YYPOPSTACK (1); } #ifndef yyoverflow @@ -8310,11 +8319,7 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - -/* Line 2055 of yacc.c */ -#line 2833 "glslang.y" +#line 2976 "MachineIndependent/glslang.y" /* yacc.c:1906 */ diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h index b6d2799..f3fc428 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7. */ +/* A Bison parser, made by GNU Bison 3.0. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,13 +26,13 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -#ifndef YY_YY_GLSLANG_TAB_CPP_H_INCLUDED -# define YY_YY_GLSLANG_TAB_CPP_H_INCLUDED -/* Enabling traces. */ +#ifndef YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED +# define YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 1 #endif @@ -40,306 +40,315 @@ extern int yydebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ATTRIBUTE = 258, - VARYING = 259, - CONST = 260, - BOOL = 261, - FLOAT = 262, - DOUBLE = 263, - INT = 264, - UINT = 265, - INT64_T = 266, - UINT64_T = 267, - FLOAT16_T = 268, - BREAK = 269, - CONTINUE = 270, - DO = 271, - ELSE = 272, - FOR = 273, - IF = 274, - DISCARD = 275, - RETURN = 276, - SWITCH = 277, - CASE = 278, - DEFAULT = 279, - SUBROUTINE = 280, - BVEC2 = 281, - BVEC3 = 282, - BVEC4 = 283, - IVEC2 = 284, - IVEC3 = 285, - IVEC4 = 286, - I64VEC2 = 287, - I64VEC3 = 288, - I64VEC4 = 289, - UVEC2 = 290, - UVEC3 = 291, - UVEC4 = 292, - U64VEC2 = 293, - U64VEC3 = 294, - U64VEC4 = 295, - VEC2 = 296, - VEC3 = 297, - VEC4 = 298, - MAT2 = 299, - MAT3 = 300, - MAT4 = 301, - CENTROID = 302, - IN = 303, - OUT = 304, - INOUT = 305, - UNIFORM = 306, - PATCH = 307, - SAMPLE = 308, - BUFFER = 309, - SHARED = 310, - COHERENT = 311, - VOLATILE = 312, - RESTRICT = 313, - READONLY = 314, - WRITEONLY = 315, - DVEC2 = 316, - DVEC3 = 317, - DVEC4 = 318, - DMAT2 = 319, - DMAT3 = 320, - DMAT4 = 321, - F16VEC2 = 322, - F16VEC3 = 323, - F16VEC4 = 324, - F16MAT2 = 325, - F16MAT3 = 326, - F16MAT4 = 327, - NOPERSPECTIVE = 328, - FLAT = 329, - SMOOTH = 330, - LAYOUT = 331, - __EXPLICITINTERPAMD = 332, - MAT2X2 = 333, - MAT2X3 = 334, - MAT2X4 = 335, - MAT3X2 = 336, - MAT3X3 = 337, - MAT3X4 = 338, - MAT4X2 = 339, - MAT4X3 = 340, - MAT4X4 = 341, - DMAT2X2 = 342, - DMAT2X3 = 343, - DMAT2X4 = 344, - DMAT3X2 = 345, - DMAT3X3 = 346, - DMAT3X4 = 347, - DMAT4X2 = 348, - DMAT4X3 = 349, - DMAT4X4 = 350, - F16MAT2X2 = 351, - F16MAT2X3 = 352, - F16MAT2X4 = 353, - F16MAT3X2 = 354, - F16MAT3X3 = 355, - F16MAT3X4 = 356, - F16MAT4X2 = 357, - F16MAT4X3 = 358, - F16MAT4X4 = 359, - ATOMIC_UINT = 360, - SAMPLER1D = 361, - SAMPLER2D = 362, - SAMPLER3D = 363, - SAMPLERCUBE = 364, - SAMPLER1DSHADOW = 365, - SAMPLER2DSHADOW = 366, - SAMPLERCUBESHADOW = 367, - SAMPLER1DARRAY = 368, - SAMPLER2DARRAY = 369, - SAMPLER1DARRAYSHADOW = 370, - SAMPLER2DARRAYSHADOW = 371, - ISAMPLER1D = 372, - ISAMPLER2D = 373, - ISAMPLER3D = 374, - ISAMPLERCUBE = 375, - ISAMPLER1DARRAY = 376, - ISAMPLER2DARRAY = 377, - USAMPLER1D = 378, - USAMPLER2D = 379, - USAMPLER3D = 380, - USAMPLERCUBE = 381, - USAMPLER1DARRAY = 382, - USAMPLER2DARRAY = 383, - SAMPLER2DRECT = 384, - SAMPLER2DRECTSHADOW = 385, - ISAMPLER2DRECT = 386, - USAMPLER2DRECT = 387, - SAMPLERBUFFER = 388, - ISAMPLERBUFFER = 389, - USAMPLERBUFFER = 390, - SAMPLERCUBEARRAY = 391, - SAMPLERCUBEARRAYSHADOW = 392, - ISAMPLERCUBEARRAY = 393, - USAMPLERCUBEARRAY = 394, - SAMPLER2DMS = 395, - ISAMPLER2DMS = 396, - USAMPLER2DMS = 397, - SAMPLER2DMSARRAY = 398, - ISAMPLER2DMSARRAY = 399, - USAMPLER2DMSARRAY = 400, - SAMPLEREXTERNALOES = 401, - SAMPLER = 402, - SAMPLERSHADOW = 403, - TEXTURE1D = 404, - TEXTURE2D = 405, - TEXTURE3D = 406, - TEXTURECUBE = 407, - TEXTURE1DARRAY = 408, - TEXTURE2DARRAY = 409, - ITEXTURE1D = 410, - ITEXTURE2D = 411, - ITEXTURE3D = 412, - ITEXTURECUBE = 413, - ITEXTURE1DARRAY = 414, - ITEXTURE2DARRAY = 415, - UTEXTURE1D = 416, - UTEXTURE2D = 417, - UTEXTURE3D = 418, - UTEXTURECUBE = 419, - UTEXTURE1DARRAY = 420, - UTEXTURE2DARRAY = 421, - TEXTURE2DRECT = 422, - ITEXTURE2DRECT = 423, - UTEXTURE2DRECT = 424, - TEXTUREBUFFER = 425, - ITEXTUREBUFFER = 426, - UTEXTUREBUFFER = 427, - TEXTURECUBEARRAY = 428, - ITEXTURECUBEARRAY = 429, - UTEXTURECUBEARRAY = 430, - TEXTURE2DMS = 431, - ITEXTURE2DMS = 432, - UTEXTURE2DMS = 433, - TEXTURE2DMSARRAY = 434, - ITEXTURE2DMSARRAY = 435, - UTEXTURE2DMSARRAY = 436, - SUBPASSINPUT = 437, - SUBPASSINPUTMS = 438, - ISUBPASSINPUT = 439, - ISUBPASSINPUTMS = 440, - USUBPASSINPUT = 441, - USUBPASSINPUTMS = 442, - IMAGE1D = 443, - IIMAGE1D = 444, - UIMAGE1D = 445, - IMAGE2D = 446, - IIMAGE2D = 447, - UIMAGE2D = 448, - IMAGE3D = 449, - IIMAGE3D = 450, - UIMAGE3D = 451, - IMAGE2DRECT = 452, - IIMAGE2DRECT = 453, - UIMAGE2DRECT = 454, - IMAGECUBE = 455, - IIMAGECUBE = 456, - UIMAGECUBE = 457, - IMAGEBUFFER = 458, - IIMAGEBUFFER = 459, - UIMAGEBUFFER = 460, - IMAGE1DARRAY = 461, - IIMAGE1DARRAY = 462, - UIMAGE1DARRAY = 463, - IMAGE2DARRAY = 464, - IIMAGE2DARRAY = 465, - UIMAGE2DARRAY = 466, - IMAGECUBEARRAY = 467, - IIMAGECUBEARRAY = 468, - UIMAGECUBEARRAY = 469, - IMAGE2DMS = 470, - IIMAGE2DMS = 471, - UIMAGE2DMS = 472, - IMAGE2DMSARRAY = 473, - IIMAGE2DMSARRAY = 474, - UIMAGE2DMSARRAY = 475, - STRUCT = 476, - VOID = 477, - WHILE = 478, - IDENTIFIER = 479, - TYPE_NAME = 480, - FLOATCONSTANT = 481, - DOUBLECONSTANT = 482, - INTCONSTANT = 483, - UINTCONSTANT = 484, - INT64CONSTANT = 485, - UINT64CONSTANT = 486, - BOOLCONSTANT = 487, - FLOAT16CONSTANT = 488, - LEFT_OP = 489, - RIGHT_OP = 490, - INC_OP = 491, - DEC_OP = 492, - LE_OP = 493, - GE_OP = 494, - EQ_OP = 495, - NE_OP = 496, - AND_OP = 497, - OR_OP = 498, - XOR_OP = 499, - MUL_ASSIGN = 500, - DIV_ASSIGN = 501, - ADD_ASSIGN = 502, - MOD_ASSIGN = 503, - LEFT_ASSIGN = 504, - RIGHT_ASSIGN = 505, - AND_ASSIGN = 506, - XOR_ASSIGN = 507, - OR_ASSIGN = 508, - SUB_ASSIGN = 509, - LEFT_PAREN = 510, - RIGHT_PAREN = 511, - LEFT_BRACKET = 512, - RIGHT_BRACKET = 513, - LEFT_BRACE = 514, - RIGHT_BRACE = 515, - DOT = 516, - COMMA = 517, - COLON = 518, - EQUAL = 519, - SEMICOLON = 520, - BANG = 521, - DASH = 522, - TILDE = 523, - PLUS = 524, - STAR = 525, - SLASH = 526, - PERCENT = 527, - LEFT_ANGLE = 528, - RIGHT_ANGLE = 529, - VERTICAL_BAR = 530, - CARET = 531, - AMPERSAND = 532, - QUESTION = 533, - INVARIANT = 534, - PRECISE = 535, - HIGH_PRECISION = 536, - MEDIUM_PRECISION = 537, - LOW_PRECISION = 538, - PRECISION = 539, - PACKED = 540, - RESOURCE = 541, - SUPERP = 542 - }; + enum yytokentype + { + ATTRIBUTE = 258, + VARYING = 259, + CONST = 260, + BOOL = 261, + FLOAT = 262, + DOUBLE = 263, + INT = 264, + UINT = 265, + INT64_T = 266, + UINT64_T = 267, + INT16_T = 268, + UINT16_T = 269, + FLOAT16_T = 270, + BREAK = 271, + CONTINUE = 272, + DO = 273, + ELSE = 274, + FOR = 275, + IF = 276, + DISCARD = 277, + RETURN = 278, + SWITCH = 279, + CASE = 280, + DEFAULT = 281, + SUBROUTINE = 282, + BVEC2 = 283, + BVEC3 = 284, + BVEC4 = 285, + IVEC2 = 286, + IVEC3 = 287, + IVEC4 = 288, + I64VEC2 = 289, + I64VEC3 = 290, + I64VEC4 = 291, + UVEC2 = 292, + UVEC3 = 293, + UVEC4 = 294, + U64VEC2 = 295, + U64VEC3 = 296, + U64VEC4 = 297, + VEC2 = 298, + VEC3 = 299, + VEC4 = 300, + MAT2 = 301, + MAT3 = 302, + MAT4 = 303, + CENTROID = 304, + IN = 305, + OUT = 306, + INOUT = 307, + UNIFORM = 308, + PATCH = 309, + SAMPLE = 310, + BUFFER = 311, + SHARED = 312, + COHERENT = 313, + VOLATILE = 314, + RESTRICT = 315, + READONLY = 316, + WRITEONLY = 317, + DVEC2 = 318, + DVEC3 = 319, + DVEC4 = 320, + DMAT2 = 321, + DMAT3 = 322, + DMAT4 = 323, + F16VEC2 = 324, + F16VEC3 = 325, + F16VEC4 = 326, + F16MAT2 = 327, + F16MAT3 = 328, + F16MAT4 = 329, + I16VEC2 = 330, + I16VEC3 = 331, + I16VEC4 = 332, + U16VEC2 = 333, + U16VEC3 = 334, + U16VEC4 = 335, + NOPERSPECTIVE = 336, + FLAT = 337, + SMOOTH = 338, + LAYOUT = 339, + __EXPLICITINTERPAMD = 340, + MAT2X2 = 341, + MAT2X3 = 342, + MAT2X4 = 343, + MAT3X2 = 344, + MAT3X3 = 345, + MAT3X4 = 346, + MAT4X2 = 347, + MAT4X3 = 348, + MAT4X4 = 349, + DMAT2X2 = 350, + DMAT2X3 = 351, + DMAT2X4 = 352, + DMAT3X2 = 353, + DMAT3X3 = 354, + DMAT3X4 = 355, + DMAT4X2 = 356, + DMAT4X3 = 357, + DMAT4X4 = 358, + F16MAT2X2 = 359, + F16MAT2X3 = 360, + F16MAT2X4 = 361, + F16MAT3X2 = 362, + F16MAT3X3 = 363, + F16MAT3X4 = 364, + F16MAT4X2 = 365, + F16MAT4X3 = 366, + F16MAT4X4 = 367, + ATOMIC_UINT = 368, + SAMPLER1D = 369, + SAMPLER2D = 370, + SAMPLER3D = 371, + SAMPLERCUBE = 372, + SAMPLER1DSHADOW = 373, + SAMPLER2DSHADOW = 374, + SAMPLERCUBESHADOW = 375, + SAMPLER1DARRAY = 376, + SAMPLER2DARRAY = 377, + SAMPLER1DARRAYSHADOW = 378, + SAMPLER2DARRAYSHADOW = 379, + ISAMPLER1D = 380, + ISAMPLER2D = 381, + ISAMPLER3D = 382, + ISAMPLERCUBE = 383, + ISAMPLER1DARRAY = 384, + ISAMPLER2DARRAY = 385, + USAMPLER1D = 386, + USAMPLER2D = 387, + USAMPLER3D = 388, + USAMPLERCUBE = 389, + USAMPLER1DARRAY = 390, + USAMPLER2DARRAY = 391, + SAMPLER2DRECT = 392, + SAMPLER2DRECTSHADOW = 393, + ISAMPLER2DRECT = 394, + USAMPLER2DRECT = 395, + SAMPLERBUFFER = 396, + ISAMPLERBUFFER = 397, + USAMPLERBUFFER = 398, + SAMPLERCUBEARRAY = 399, + SAMPLERCUBEARRAYSHADOW = 400, + ISAMPLERCUBEARRAY = 401, + USAMPLERCUBEARRAY = 402, + SAMPLER2DMS = 403, + ISAMPLER2DMS = 404, + USAMPLER2DMS = 405, + SAMPLER2DMSARRAY = 406, + ISAMPLER2DMSARRAY = 407, + USAMPLER2DMSARRAY = 408, + SAMPLEREXTERNALOES = 409, + SAMPLER = 410, + SAMPLERSHADOW = 411, + TEXTURE1D = 412, + TEXTURE2D = 413, + TEXTURE3D = 414, + TEXTURECUBE = 415, + TEXTURE1DARRAY = 416, + TEXTURE2DARRAY = 417, + ITEXTURE1D = 418, + ITEXTURE2D = 419, + ITEXTURE3D = 420, + ITEXTURECUBE = 421, + ITEXTURE1DARRAY = 422, + ITEXTURE2DARRAY = 423, + UTEXTURE1D = 424, + UTEXTURE2D = 425, + UTEXTURE3D = 426, + UTEXTURECUBE = 427, + UTEXTURE1DARRAY = 428, + UTEXTURE2DARRAY = 429, + TEXTURE2DRECT = 430, + ITEXTURE2DRECT = 431, + UTEXTURE2DRECT = 432, + TEXTUREBUFFER = 433, + ITEXTUREBUFFER = 434, + UTEXTUREBUFFER = 435, + TEXTURECUBEARRAY = 436, + ITEXTURECUBEARRAY = 437, + UTEXTURECUBEARRAY = 438, + TEXTURE2DMS = 439, + ITEXTURE2DMS = 440, + UTEXTURE2DMS = 441, + TEXTURE2DMSARRAY = 442, + ITEXTURE2DMSARRAY = 443, + UTEXTURE2DMSARRAY = 444, + SUBPASSINPUT = 445, + SUBPASSINPUTMS = 446, + ISUBPASSINPUT = 447, + ISUBPASSINPUTMS = 448, + USUBPASSINPUT = 449, + USUBPASSINPUTMS = 450, + IMAGE1D = 451, + IIMAGE1D = 452, + UIMAGE1D = 453, + IMAGE2D = 454, + IIMAGE2D = 455, + UIMAGE2D = 456, + IMAGE3D = 457, + IIMAGE3D = 458, + UIMAGE3D = 459, + IMAGE2DRECT = 460, + IIMAGE2DRECT = 461, + UIMAGE2DRECT = 462, + IMAGECUBE = 463, + IIMAGECUBE = 464, + UIMAGECUBE = 465, + IMAGEBUFFER = 466, + IIMAGEBUFFER = 467, + UIMAGEBUFFER = 468, + IMAGE1DARRAY = 469, + IIMAGE1DARRAY = 470, + UIMAGE1DARRAY = 471, + IMAGE2DARRAY = 472, + IIMAGE2DARRAY = 473, + UIMAGE2DARRAY = 474, + IMAGECUBEARRAY = 475, + IIMAGECUBEARRAY = 476, + UIMAGECUBEARRAY = 477, + IMAGE2DMS = 478, + IIMAGE2DMS = 479, + UIMAGE2DMS = 480, + IMAGE2DMSARRAY = 481, + IIMAGE2DMSARRAY = 482, + UIMAGE2DMSARRAY = 483, + STRUCT = 484, + VOID = 485, + WHILE = 486, + IDENTIFIER = 487, + TYPE_NAME = 488, + FLOATCONSTANT = 489, + DOUBLECONSTANT = 490, + INTCONSTANT = 491, + UINTCONSTANT = 492, + INT64CONSTANT = 493, + UINT64CONSTANT = 494, + INT16CONSTANT = 495, + UINT16CONSTANT = 496, + BOOLCONSTANT = 497, + FLOAT16CONSTANT = 498, + LEFT_OP = 499, + RIGHT_OP = 500, + INC_OP = 501, + DEC_OP = 502, + LE_OP = 503, + GE_OP = 504, + EQ_OP = 505, + NE_OP = 506, + AND_OP = 507, + OR_OP = 508, + XOR_OP = 509, + MUL_ASSIGN = 510, + DIV_ASSIGN = 511, + ADD_ASSIGN = 512, + MOD_ASSIGN = 513, + LEFT_ASSIGN = 514, + RIGHT_ASSIGN = 515, + AND_ASSIGN = 516, + XOR_ASSIGN = 517, + OR_ASSIGN = 518, + SUB_ASSIGN = 519, + LEFT_PAREN = 520, + RIGHT_PAREN = 521, + LEFT_BRACKET = 522, + RIGHT_BRACKET = 523, + LEFT_BRACE = 524, + RIGHT_BRACE = 525, + DOT = 526, + COMMA = 527, + COLON = 528, + EQUAL = 529, + SEMICOLON = 530, + BANG = 531, + DASH = 532, + TILDE = 533, + PLUS = 534, + STAR = 535, + SLASH = 536, + PERCENT = 537, + LEFT_ANGLE = 538, + RIGHT_ANGLE = 539, + VERTICAL_BAR = 540, + CARET = 541, + AMPERSAND = 542, + QUESTION = 543, + INVARIANT = 544, + PRECISE = 545, + HIGH_PRECISION = 546, + MEDIUM_PRECISION = 547, + LOW_PRECISION = 548, + PRECISION = 549, + PACKED = 550, + RESOURCE = 551, + SUPERP = 552 + }; #endif - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { -/* Line 2058 of yacc.c */ -#line 66 "glslang.y" +#line 69 "MachineIndependent/glslang.y" /* yacc.c:1909 */ struct { glslang::TSourceLoc loc; @@ -361,6 +370,7 @@ typedef union YYSTYPE TIntermNode* intermNode; glslang::TIntermNodePair nodePair; glslang::TIntermTyped* intermTypedNode; + glslang::TAttributes* attributes; }; union { glslang::TPublicType type; @@ -373,28 +383,14 @@ typedef union YYSTYPE }; } interm; - -/* Line 2058 of yacc.c */ -#line 379 "glslang_tab.cpp.h" -} YYSTYPE; +#line 387 "MachineIndependent/glslang_tab.cpp.h" /* yacc.c:1909 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (glslang::TParseContext* pParseContext); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ -#endif /* !YY_YY_GLSLANG_TAB_CPP_H_INCLUDED */ +int yyparse (glslang::TParseContext* pParseContext); + +#endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/intermOut.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/intermOut.cpp index c0c60c5..4c01284 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/intermOut.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/intermOut.cpp @@ -45,11 +45,31 @@ namespace { -bool is_positive_infinity(double x) { +bool IsInfinity(double x) { #ifdef _MSC_VER - return _fpclass(x) == _FPCLASS_PINF; + switch (_fpclass(x)) { + case _FPCLASS_NINF: + case _FPCLASS_PINF: + return true; + default: + return false; + } #else - return std::isinf(x) && (x >= 0); + return std::isinf(x); +#endif +} + +bool IsNan(double x) { +#ifdef _MSC_VER + switch (_fpclass(x)) { + case _FPCLASS_SNAN: + case _FPCLASS_QNAN: + return true; + default: + return false; + } +#else + return std::isnan(x); #endif } @@ -176,6 +196,7 @@ bool TOutputTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node) case EOpLogicalOr: out.debug << "logical-or"; break; case EOpLogicalXor: out.debug << "logical-xor"; break; case EOpLogicalAnd: out.debug << "logical-and"; break; + default: out.debug << ""; } @@ -288,6 +309,13 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpDoubleBitsToUint64: out.debug << "doubleBitsToUint64"; break; case EOpInt64BitsToDouble: out.debug << "int64BitsToDouble"; break; case EOpUint64BitsToDouble: out.debug << "uint64BitsToDouble"; break; +#ifdef AMD_EXTENSIONS + case EOpFloat16BitsToInt16: out.debug << "float16BitsToInt16"; break; + case EOpFloat16BitsToUint16: out.debug << "float16BitsToUint16"; break; + case EOpInt16BitsToFloat16: out.debug << "int16BitsToFloat16"; break; + case EOpUint16BitsToFloat16: out.debug << "uint16BitsToFloat16"; break; +#endif + case EOpPackSnorm2x16: out.debug << "packSnorm2x16"; break; case EOpUnpackSnorm2x16:out.debug << "unpackSnorm2x16"; break; case EOpPackUnorm2x16: out.debug << "packUnorm2x16"; break; @@ -308,6 +336,16 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpUnpackUint2x32: out.debug << "unpackUint2x32"; break; #ifdef AMD_EXTENSIONS + case EOpPackInt2x16: out.debug << "packInt2x16"; break; + case EOpUnpackInt2x16: out.debug << "unpackInt2x16"; break; + case EOpPackUint2x16: out.debug << "packUint2x16"; break; + case EOpUnpackUint2x16: out.debug << "unpackUint2x16"; break; + + case EOpPackInt4x16: out.debug << "packInt4x16"; break; + case EOpUnpackInt4x16: out.debug << "unpackInt4x16"; break; + case EOpPackUint4x16: out.debug << "packUint4x16"; break; + case EOpUnpackUint4x16: out.debug << "unpackUint4x16"; break; + case EOpPackFloat2x16: out.debug << "packFloat2x16"; break; case EOpUnpackFloat2x16: out.debug << "unpackFloat2x16"; break; #endif @@ -370,6 +408,8 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpRcp: out.debug << "rcp"; break; case EOpSaturate: out.debug << "saturate"; break; + case EOpSparseTexelsResident: out.debug << "sparseTexelsResident"; break; + #ifdef AMD_EXTENSIONS case EOpMinInvocations: out.debug << "minInvocations"; break; case EOpMaxInvocations: out.debug << "maxInvocations"; break; @@ -392,10 +432,13 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpMaxInvocationsExclusiveScanNonUniform: out.debug << "maxInvocationsExclusiveScanNonUniform"; break; case EOpAddInvocationsExclusiveScanNonUniform: out.debug << "addInvocationsExclusiveScanNonUniform"; break; - case EOpMbcnt: out.debug << "mbcnt"; break; + case EOpMbcnt: out.debug << "mbcnt"; break; - case EOpCubeFaceIndex: out.debug << "cubeFaceIndex"; break; - case EOpCubeFaceCoord: out.debug << "cubeFaceCoord"; break; + case EOpCubeFaceIndex: out.debug << "cubeFaceIndex"; break; + case EOpCubeFaceCoord: out.debug << "cubeFaceCoord"; break; + + case EOpFragmentMaskFetch: out.debug << "fragmentMaskFetchAMD"; break; + case EOpFragmentFetch: out.debug << "fragmentFetchAMD"; break; case EOpConvBoolToFloat16: out.debug << "Convert bool to float16"; break; case EOpConvIntToFloat16: out.debug << "Convert int to float16"; break; @@ -411,8 +454,47 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpConvFloat16ToDouble: out.debug << "Convert float16 to double"; break; case EOpConvFloat16ToInt64: out.debug << "Convert float16 to int64"; break; case EOpConvFloat16ToUint64: out.debug << "Convert float16 to uint64"; break; + + case EOpConvBoolToInt16: out.debug << "Convert bool to int16"; break; + case EOpConvIntToInt16: out.debug << "Convert int to int16"; break; + case EOpConvUintToInt16: out.debug << "Convert uint to int16"; break; + case EOpConvFloatToInt16: out.debug << "Convert float to int16"; break; + case EOpConvDoubleToInt16: out.debug << "Convert double to int16"; break; + case EOpConvFloat16ToInt16: out.debug << "Convert float16 to int16"; break; + case EOpConvInt64ToInt16: out.debug << "Convert int64 to int16"; break; + case EOpConvUint64ToInt16: out.debug << "Convert uint64 to int16"; break; + case EOpConvUint16ToInt16: out.debug << "Convert uint16 to int16"; break; + case EOpConvInt16ToBool: out.debug << "Convert int16 to bool"; break; + case EOpConvInt16ToInt: out.debug << "Convert int16 to int"; break; + case EOpConvInt16ToUint: out.debug << "Convert int16 to uint"; break; + case EOpConvInt16ToFloat: out.debug << "Convert int16 to float"; break; + case EOpConvInt16ToDouble: out.debug << "Convert int16 to double"; break; + case EOpConvInt16ToFloat16: out.debug << "Convert int16 to float16"; break; + case EOpConvInt16ToInt64: out.debug << "Convert int16 to int64"; break; + case EOpConvInt16ToUint64: out.debug << "Convert int16 to uint64"; break; + + case EOpConvBoolToUint16: out.debug << "Convert bool to uint16"; break; + case EOpConvIntToUint16: out.debug << "Convert int to uint16"; break; + case EOpConvUintToUint16: out.debug << "Convert uint to uint16"; break; + case EOpConvFloatToUint16: out.debug << "Convert float to uint16"; break; + case EOpConvDoubleToUint16: out.debug << "Convert double to uint16"; break; + case EOpConvFloat16ToUint16: out.debug << "Convert float16 to uint16"; break; + case EOpConvInt64ToUint16: out.debug << "Convert int64 to uint16"; break; + case EOpConvUint64ToUint16: out.debug << "Convert uint64 to uint16"; break; + case EOpConvInt16ToUint16: out.debug << "Convert int16 to uint16"; break; + case EOpConvUint16ToBool: out.debug << "Convert uint16 to bool"; break; + case EOpConvUint16ToInt: out.debug << "Convert uint16 to int"; break; + case EOpConvUint16ToUint: out.debug << "Convert uint16 to uint"; break; + case EOpConvUint16ToFloat: out.debug << "Convert uint16 to float"; break; + case EOpConvUint16ToDouble: out.debug << "Convert uint16 to double"; break; + case EOpConvUint16ToFloat16: out.debug << "Convert uint16 to float16"; break; + case EOpConvUint16ToInt64: out.debug << "Convert uint16 to int64"; break; + case EOpConvUint16ToUint64: out.debug << "Convert uint16 to uint64"; break; #endif + case EOpSubpassLoad: out.debug << "subpassLoad"; break; + case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; + default: out.debug.message(EPrefixError, "Bad unary op"); } @@ -444,9 +526,13 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructFloat: out.debug << "Construct float"; break; case EOpConstructDouble:out.debug << "Construct double"; break; + case EOpConstructVec2: out.debug << "Construct vec2"; break; case EOpConstructVec3: out.debug << "Construct vec3"; break; case EOpConstructVec4: out.debug << "Construct vec4"; break; + case EOpConstructDVec2: out.debug << "Construct dvec2"; break; + case EOpConstructDVec3: out.debug << "Construct dvec3"; break; + case EOpConstructDVec4: out.debug << "Construct dvec4"; break; case EOpConstructBool: out.debug << "Construct bool"; break; case EOpConstructBVec2: out.debug << "Construct bvec2"; break; case EOpConstructBVec3: out.debug << "Construct bvec3"; break; @@ -467,6 +553,16 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructU64Vec2: out.debug << "Construct u64vec2"; break; case EOpConstructU64Vec3: out.debug << "Construct u64vec3"; break; case EOpConstructU64Vec4: out.debug << "Construct u64vec4"; break; +#ifdef AMD_EXTENSIONS + case EOpConstructInt16: out.debug << "Construct int16_t"; break; + case EOpConstructI16Vec2: out.debug << "Construct i16vec2"; break; + case EOpConstructI16Vec3: out.debug << "Construct i16vec3"; break; + case EOpConstructI16Vec4: out.debug << "Construct i16vec4"; break; + case EOpConstructUint16: out.debug << "Construct uint16_t"; break; + case EOpConstructU16Vec2: out.debug << "Construct u16vec2"; break; + case EOpConstructU16Vec3: out.debug << "Construct u16vec3"; break; + case EOpConstructU16Vec4: out.debug << "Construct u16vec4"; break; +#endif case EOpConstructMat2x2: out.debug << "Construct mat2"; break; case EOpConstructMat2x3: out.debug << "Construct mat2x3"; break; case EOpConstructMat2x4: out.debug << "Construct mat2x4"; break; @@ -485,6 +581,33 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructDMat4x2: out.debug << "Construct dmat4x2"; break; case EOpConstructDMat4x3: out.debug << "Construct dmat4x3"; break; case EOpConstructDMat4x4: out.debug << "Construct dmat4"; break; + case EOpConstructIMat2x2: out.debug << "Construct imat2"; break; + case EOpConstructIMat2x3: out.debug << "Construct imat2x3"; break; + case EOpConstructIMat2x4: out.debug << "Construct imat2x4"; break; + case EOpConstructIMat3x2: out.debug << "Construct imat3x2"; break; + case EOpConstructIMat3x3: out.debug << "Construct imat3"; break; + case EOpConstructIMat3x4: out.debug << "Construct imat3x4"; break; + case EOpConstructIMat4x2: out.debug << "Construct imat4x2"; break; + case EOpConstructIMat4x3: out.debug << "Construct imat4x3"; break; + case EOpConstructIMat4x4: out.debug << "Construct imat4"; break; + case EOpConstructUMat2x2: out.debug << "Construct umat2"; break; + case EOpConstructUMat2x3: out.debug << "Construct umat2x3"; break; + case EOpConstructUMat2x4: out.debug << "Construct umat2x4"; break; + case EOpConstructUMat3x2: out.debug << "Construct umat3x2"; break; + case EOpConstructUMat3x3: out.debug << "Construct umat3"; break; + case EOpConstructUMat3x4: out.debug << "Construct umat3x4"; break; + case EOpConstructUMat4x2: out.debug << "Construct umat4x2"; break; + case EOpConstructUMat4x3: out.debug << "Construct umat4x3"; break; + case EOpConstructUMat4x4: out.debug << "Construct umat4"; break; + case EOpConstructBMat2x2: out.debug << "Construct bmat2"; break; + case EOpConstructBMat2x3: out.debug << "Construct bmat2x3"; break; + case EOpConstructBMat2x4: out.debug << "Construct bmat2x4"; break; + case EOpConstructBMat3x2: out.debug << "Construct bmat3x2"; break; + case EOpConstructBMat3x3: out.debug << "Construct bmat3"; break; + case EOpConstructBMat3x4: out.debug << "Construct bmat3x4"; break; + case EOpConstructBMat4x2: out.debug << "Construct bmat4x2"; break; + case EOpConstructBMat4x3: out.debug << "Construct bmat4x3"; break; + case EOpConstructBMat4x4: out.debug << "Construct bmat4"; break; #ifdef AMD_EXTENSIONS case EOpConstructFloat16: out.debug << "Construct float16_t"; break; case EOpConstructF16Vec2: out.debug << "Construct f16vec2"; break; @@ -566,6 +689,16 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpAtomicExchange: out.debug << "AtomicExchange"; break; case EOpAtomicCompSwap: out.debug << "AtomicCompSwap"; break; + case EOpAtomicCounterAdd: out.debug << "AtomicCounterAdd"; break; + case EOpAtomicCounterSubtract: out.debug << "AtomicCounterSubtract"; break; + case EOpAtomicCounterMin: out.debug << "AtomicCounterMin"; break; + case EOpAtomicCounterMax: out.debug << "AtomicCounterMax"; break; + case EOpAtomicCounterAnd: out.debug << "AtomicCounterAnd"; break; + case EOpAtomicCounterOr: out.debug << "AtomicCounterOr"; break; + case EOpAtomicCounterXor: out.debug << "AtomicCounterXor"; break; + case EOpAtomicCounterExchange: out.debug << "AtomicCounterExchange"; break; + case EOpAtomicCounterCompSwap: out.debug << "AtomicCounterCompSwap"; break; + case EOpImageQuerySize: out.debug << "imageQuerySize"; break; case EOpImageQuerySamples: out.debug << "imageQuerySamples"; break; case EOpImageLoad: out.debug << "imageLoad"; break; @@ -578,6 +711,10 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpImageAtomicXor: out.debug << "imageAtomicXor"; break; case EOpImageAtomicExchange: out.debug << "imageAtomicExchange"; break; case EOpImageAtomicCompSwap: out.debug << "imageAtomicCompSwap"; break; +#ifdef AMD_EXTENSIONS + case EOpImageLoadLod: out.debug << "imageLoadLod"; break; + case EOpImageStoreLod: out.debug << "imageStoreLod"; break; +#endif case EOpTextureQuerySize: out.debug << "textureSize"; break; case EOpTextureQueryLod: out.debug << "textureQueryLod"; break; @@ -600,6 +737,38 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpTextureGather: out.debug << "textureGather"; break; case EOpTextureGatherOffset: out.debug << "textureGatherOffset"; break; case EOpTextureGatherOffsets: out.debug << "textureGatherOffsets"; break; + case EOpTextureClamp: out.debug << "textureClamp"; break; + case EOpTextureOffsetClamp: out.debug << "textureOffsetClamp"; break; + case EOpTextureGradClamp: out.debug << "textureGradClamp"; break; + case EOpTextureGradOffsetClamp: out.debug << "textureGradOffsetClamp"; break; +#ifdef AMD_EXTENSIONS + case EOpTextureGatherLod: out.debug << "textureGatherLod"; break; + case EOpTextureGatherLodOffset: out.debug << "textureGatherLodOffset"; break; + case EOpTextureGatherLodOffsets: out.debug << "textureGatherLodOffsets"; break; +#endif + + case EOpSparseTexture: out.debug << "sparseTexture"; break; + case EOpSparseTextureOffset: out.debug << "sparseTextureOffset"; break; + case EOpSparseTextureLod: out.debug << "sparseTextureLod"; break; + case EOpSparseTextureLodOffset: out.debug << "sparseTextureLodOffset"; break; + case EOpSparseTextureFetch: out.debug << "sparseTexelFetch"; break; + case EOpSparseTextureFetchOffset: out.debug << "sparseTexelFetchOffset"; break; + case EOpSparseTextureGrad: out.debug << "sparseTextureGrad"; break; + case EOpSparseTextureGradOffset: out.debug << "sparseTextureGradOffset"; break; + case EOpSparseTextureGather: out.debug << "sparseTextureGather"; break; + case EOpSparseTextureGatherOffset: out.debug << "sparseTextureGatherOffset"; break; + case EOpSparseTextureGatherOffsets: out.debug << "sparseTextureGatherOffsets"; break; + case EOpSparseImageLoad: out.debug << "sparseImageLoad"; break; + case EOpSparseTextureClamp: out.debug << "sparseTextureClamp"; break; + case EOpSparseTextureOffsetClamp: out.debug << "sparseTextureOffsetClamp"; break; + case EOpSparseTextureGradClamp: out.debug << "sparseTextureGradClamp"; break; + case EOpSparseTextureGradOffsetClamp: out.debug << "sparseTextureGradOffsetClam"; break; +#ifdef AMD_EXTENSIONS + case EOpSparseTextureGatherLod: out.debug << "sparseTextureGatherLod"; break; + case EOpSparseTextureGatherLodOffset: out.debug << "sparseTextureGatherLodOffset"; break; + case EOpSparseTextureGatherLodOffsets: out.debug << "sparseTextureGatherLodOffsets"; break; + case EOpSparseImageLoadLod: out.debug << "sparseImageLoadLod"; break; +#endif case EOpAddCarry: out.debug << "addCarry"; break; case EOpSubBorrow: out.debug << "subBorrow"; break; @@ -622,10 +791,14 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpGenMul: out.debug << "mul"; break; case EOpAllMemoryBarrierWithGroupSync: out.debug << "AllMemoryBarrierWithGroupSync"; break; - case EOpGroupMemoryBarrierWithGroupSync: out.debug << "GroupMemoryBarrierWithGroupSync"; break; + case EOpDeviceMemoryBarrier: out.debug << "DeviceMemoryBarrier"; break; + case EOpDeviceMemoryBarrierWithGroupSync: out.debug << "DeviceMemoryBarrierWithGroupSync"; break; case EOpWorkgroupMemoryBarrier: out.debug << "WorkgroupMemoryBarrier"; break; case EOpWorkgroupMemoryBarrierWithGroupSync: out.debug << "WorkgroupMemoryBarrierWithGroupSync"; break; + case EOpSubpassLoad: out.debug << "subpassLoad"; break; + case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; + default: out.debug.message(EPrefixError, "Bad aggregation op"); } @@ -644,7 +817,13 @@ bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node OutputTreeText(out, node, depth); out.debug << "Test condition and select"; - out.debug << " (" << node->getCompleteString() << ")\n"; + out.debug << " (" << node->getCompleteString() << ")"; + + if (node->getFlatten()) + out.debug << ": Flatten"; + if (node->getDontFlatten()) + out.debug << ": DontFlatten"; + out.debug << "\n"; ++depth; @@ -694,11 +873,14 @@ static void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const #endif { const double value = constUnion[i].getDConst(); - // Print infinity in a portable way, for test stability. - // Other cases may be needed in the future: negative infinity, - // and NaNs. - if (is_positive_infinity(value)) - out.debug << "inf\n"; + // Print infinities and NaNs in a portable way. + if (IsInfinity(value)) { + if (value < 0) + out.debug << "-1.#INF\n"; + else + out.debug << "+1.#INF\n"; + } else if (IsNan(value)) + out.debug << "1.#IND\n"; else { const int maxSize = 300; char buf[maxSize]; @@ -744,6 +926,26 @@ static void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const out.debug << buf << "\n"; } break; +#ifdef AMD_EXTENSIONS + case EbtInt16: + { + const int maxSize = 300; + char buf[maxSize]; + snprintf(buf, maxSize, "%d (%s)", constUnion[i].getIConst(), "const int16_t"); + + out.debug << buf << "\n"; + } + break; + case EbtUint16: + { + const int maxSize = 300; + char buf[maxSize]; + snprintf(buf, maxSize, "%u (%s)", constUnion[i].getUConst(), "const uint16_t"); + + out.debug << buf << "\n"; + } + break; +#endif default: out.info.message(EPrefixInternalError, "Unknown constant", node->getLoc()); break; @@ -783,7 +985,17 @@ bool TOutputTraverser::visitLoop(TVisit /* visit */, TIntermLoop* node) out.debug << "Loop with condition "; if (! node->testFirst()) out.debug << "not "; - out.debug << "tested first\n"; + out.debug << "tested first"; + + if (node->getUnroll()) + out.debug << ": Unroll"; + if (node->getDontUnroll()) + out.debug << ": DontUnroll"; + if (node->getLoopDependency()) { + out.debug << ": Dependency "; + out.debug << node->getLoopDependency(); + } + out.debug << "\n"; ++depth; @@ -844,7 +1056,13 @@ bool TOutputTraverser::visitSwitch(TVisit /* visit */, TIntermSwitch* node) TInfoSink& out = infoSink; OutputTreeText(out, node, depth); - out.debug << "switch\n"; + out.debug << "switch"; + + if (node->getFlatten()) + out.debug << ": Flatten"; + if (node->getDontFlatten()) + out.debug << ": DontFlatten"; + out.debug << "\n"; OutputTreeText(out, node, depth); out.debug << "condition\n"; @@ -915,6 +1133,8 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree) infoSink.debug << "gl_FragCoord origin is upper left\n"; if (earlyFragmentTests) infoSink.debug << "using early_fragment_tests\n"; + if (postDepthCoverage) + infoSink.debug << "using post_depth_coverage\n"; if (depthLayout != EldNone) infoSink.debug << "using " << TQualifier::getLayoutDepthString(depthLayout) << "\n"; if (blendEquations != 0) { diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp index 9a6613e..a7d9d91 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp @@ -1,5 +1,5 @@ // -// Copyright (C) 2016 LunarG, Inc. +// Copyright (C) 2016-2017 LunarG, Inc. // // All rights reserved. // @@ -201,11 +201,45 @@ public: const TVarLiveMap& uniformList; }; +struct TNotifyUniformAdaptor +{ + EShLanguage stage; + TIoMapResolver& resolver; + inline TNotifyUniformAdaptor(EShLanguage s, TIoMapResolver& r) + : stage(s) + , resolver(r) + { + } + inline void operator()(TVarEntryInfo& ent) + { + resolver.notifyBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live); + } +private: + TNotifyUniformAdaptor& operator=(TNotifyUniformAdaptor&); +}; + +struct TNotifyInOutAdaptor +{ + EShLanguage stage; + TIoMapResolver& resolver; + inline TNotifyInOutAdaptor(EShLanguage s, TIoMapResolver& r) + : stage(s) + , resolver(r) + { + } + inline void operator()(TVarEntryInfo& ent) + { + resolver.notifyInOut(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live); + } +private: + TNotifyInOutAdaptor& operator=(TNotifyInOutAdaptor&); +}; + struct TResolverUniformAdaptor { TResolverUniformAdaptor(EShLanguage s, TIoMapResolver& r, TInfoSink& i, bool& e, TIntermediate& interm) - : resolver(r) - , stage(s) + : stage(s) + , resolver(r) , infoSink(i) , error(e) , intermediate(interm) @@ -219,10 +253,14 @@ struct TResolverUniformAdaptor ent.newBinding = -1; ent.newSet = -1; ent.newIndex = -1; - const bool isValid = resolver.validateBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live); + const bool isValid = resolver.validateBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), + ent.live); if (isValid) { - ent.newBinding = resolver.resolveBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live); + ent.newBinding = resolver.resolveBinding(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), + ent.live); ent.newSet = resolver.resolveSet(stage, ent.symbol->getName().c_str(), ent.symbol->getType(), ent.live); + ent.newLocation = resolver.resolveUniformLocation(stage, ent.symbol->getName().c_str(), + ent.symbol->getType(), ent.live); if (ent.newBinding != -1) { if (ent.newBinding >= int(TQualifier::layoutBindingEnd)) { @@ -260,8 +298,8 @@ private: struct TResolverInOutAdaptor { TResolverInOutAdaptor(EShLanguage s, TIoMapResolver& r, TInfoSink& i, bool& e, TIntermediate& interm) - : resolver(r) - , stage(s) + : stage(s) + , resolver(r) , infoSink(i) , error(e) , intermediate(interm) @@ -310,21 +348,24 @@ private: TResolverInOutAdaptor& operator=(TResolverInOutAdaptor&); }; -/* - * Basic implementation of glslang::TIoMapResolver that replaces the - * previous offset behavior. - * It does the same, uses the offsets for the corresponding uniform - * types. Also respects the EOptionAutoMapBindings flag and binds - * them if needed. - */ -struct TDefaultIoResolver : public glslang::TIoMapResolver +// Base class for shared TIoMapResolver services, used by several derivations. +struct TDefaultIoResolverBase : public glslang::TIoMapResolver { - int baseSamplerBinding; - int baseTextureBinding; - int baseImageBinding; - int baseUboBinding; - int baseSsboBinding; - bool doAutoMapping; + TDefaultIoResolverBase(const TIntermediate &intermediate) : + intermediate(intermediate), + nextUniformLocation(0) + { } + + int getBaseBinding(TResourceType res, unsigned int set) const { + return selectBaseBinding(intermediate.getShiftBinding(res), + intermediate.getShiftBindingForSet(res, set)); + } + + const std::vector& getResourceSetBinding() const { return intermediate.getResourceSetBinding(); } + + bool doAutoBindingMapping() const { return intermediate.getAutoMapBindings(); } + bool doAutoLocationMapping() const { return intermediate.getAutoMapLocations(); } + typedef std::vector TSlotSet; typedef std::unordered_map TSlotSetMap; TSlotSetMap slots; @@ -343,7 +384,12 @@ struct TDefaultIoResolver : public glslang::TIoMapResolver int reserveSlot(int set, int slot) { TSlotSet::iterator at = findSlot(set, slot); - slots[set].insert(at, slot); + + // tolerate aliasing, by not double-recording aliases + // (policy about appropriateness of the alias is higher up) + if (at == slots[set].end() || *at != slot) + slots[set].insert(at, slot); + return slot; } @@ -360,98 +406,72 @@ struct TDefaultIoResolver : public glslang::TIoMapResolver return reserveSlot(set, base); } - bool validateBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool /*is_live*/) override - { - if (type.getQualifier().hasBinding()) { - int set; - if (type.getQualifier().hasSet()) - set = type.getQualifier().layoutSet; - else - set = 0; + virtual bool validateBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool /*is_live*/) override = 0; - if (type.getBasicType() == glslang::EbtSampler) { - const glslang::TSampler& sampler = type.getSampler(); - if (sampler.isPureSampler()) - return checkEmpty(set, baseSamplerBinding + type.getQualifier().layoutBinding); - - if (sampler.isTexture()) - return checkEmpty(set, baseTextureBinding + type.getQualifier().layoutBinding); - } - - if (type.getQualifier().storage == EvqUniform) - return checkEmpty(set, baseUboBinding + type.getQualifier().layoutBinding); - - if (type.getQualifier().storage == EvqBuffer) - return checkEmpty(set, baseSsboBinding + type.getQualifier().layoutBinding); - } - return true; - } - - int resolveBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool is_live) override - { - int set; - if (type.getQualifier().hasSet()) - set = type.getQualifier().layoutSet; - else - set = 0; - - if (type.getQualifier().hasBinding()) { - if (type.getBasicType() == glslang::EbtSampler) { - const glslang::TSampler& sampler = type.getSampler(); - if (sampler.isImage()) - return reserveSlot(set, baseImageBinding + type.getQualifier().layoutBinding); - - if (sampler.isPureSampler()) - return reserveSlot(set, baseSamplerBinding + type.getQualifier().layoutBinding); - - if (sampler.isTexture()) - return reserveSlot(set, baseTextureBinding + type.getQualifier().layoutBinding); - } - - if (type.getQualifier().storage == EvqUniform) - return reserveSlot(set, baseUboBinding + type.getQualifier().layoutBinding); - - if (type.getQualifier().storage == EvqBuffer) - return reserveSlot(set, baseSsboBinding + type.getQualifier().layoutBinding); - } else if (is_live && doAutoMapping) { - // find free slot, the caller did make sure it passes all vars with binding - // first and now all are passed that do not have a binding and needs one - if (type.getBasicType() == glslang::EbtSampler) { - const glslang::TSampler& sampler = type.getSampler(); - if (sampler.isImage()) - return getFreeSlot(set, baseImageBinding); - - if (sampler.isPureSampler()) - return getFreeSlot(set, baseSamplerBinding); - - if (sampler.isTexture()) - return getFreeSlot(set, baseTextureBinding); - } - - if (type.getQualifier().storage == EvqUniform) - return getFreeSlot(set, baseUboBinding); - - if (type.getQualifier().storage == EvqBuffer) - return getFreeSlot(set, baseSsboBinding); - } - - return -1; - } + virtual int resolveBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool is_live) override = 0; int resolveSet(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool /*is_live*/) override { if (type.getQualifier().hasSet()) return type.getQualifier().layoutSet; + + // If a command line or API option requested a single descriptor set, use that (if not overrided by spaceN) + if (getResourceSetBinding().size() == 1) + return atoi(getResourceSetBinding()[0].c_str()); + return 0; } + int resolveUniformLocation(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool /*is_live*/) override + { + // kick out of not doing this + if (!doAutoLocationMapping()) + return -1; + // no locations added if already present, a built-in variable, a block, or an opaque + if (type.getQualifier().hasLocation() || type.isBuiltIn() || + type.getBasicType() == EbtBlock || type.containsOpaque()) + return -1; + + // no locations on blocks of built-in variables + if (type.isStruct()) { + if (type.getStruct()->size() < 1) + return -1; + if ((*type.getStruct())[0].type->isBuiltIn()) + return -1; + } + + return nextUniformLocation++; + } bool validateInOut(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override { return true; } - int resolveInOutLocation(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override + int resolveInOutLocation(EShLanguage /*stage*/, const char* /*name*/, const TType& type, bool /*is_live*/) override { - return -1; + // kick out of not doing this + if (!doAutoLocationMapping()) + return -1; + + // no locations added if already present, or a built-in variable + if (type.getQualifier().hasLocation() || type.isBuiltIn()) + return -1; + + // no locations on blocks of built-in variables + if (type.isStruct()) { + if (type.getStruct()->size() < 1) + return -1; + if ((*type.getStruct())[0].type->isBuiltIn()) + return -1; + } + + // Placeholder. + // TODO: It would be nice to flesh this out using + // intermediate->computeTypeLocationSize(type), or functions that call it like + // intermediate->addUsedLocation() + // These in turn would want the intermediate, which is not available here, but + // is available in many places, and a lot of copying from it could be saved if + // it were just available. + return 0; } int resolveInOutComponent(EShLanguage /*stage*/, const char* /*name*/, const TType& /*type*/, bool /*is_live*/) override { @@ -461,22 +481,237 @@ struct TDefaultIoResolver : public glslang::TIoMapResolver { return -1; } + + void notifyBinding(EShLanguage, const char* /*name*/, const TType&, bool /*is_live*/) override {} + void notifyInOut(EShLanguage, const char* /*name*/, const TType&, bool /*is_live*/) override {} + void endNotifications(EShLanguage) override {} + void beginNotifications(EShLanguage) override {} + void beginResolve(EShLanguage) override {} + void endResolve(EShLanguage) override {} + +protected: + const TIntermediate &intermediate; + int nextUniformLocation; + + // Return descriptor set specific base if there is one, and the generic base otherwise. + int selectBaseBinding(int base, int descriptorSetBase) const { + return descriptorSetBase != -1 ? descriptorSetBase : base; + } + + static int getLayoutSet(const glslang::TType& type) { + if (type.getQualifier().hasSet()) + return type.getQualifier().layoutSet; + else + return 0; + } + + static bool isSamplerType(const glslang::TType& type) { + return type.getBasicType() == glslang::EbtSampler && type.getSampler().isPureSampler(); + } + + static bool isTextureType(const glslang::TType& type) { + return (type.getBasicType() == glslang::EbtSampler && + (type.getSampler().isTexture() || type.getSampler().isSubpass())); + } + + static bool isUboType(const glslang::TType& type) { + return type.getQualifier().storage == EvqUniform; + } }; +/* + * Basic implementation of glslang::TIoMapResolver that replaces the + * previous offset behavior. + * It does the same, uses the offsets for the corresponding uniform + * types. Also respects the EOptionAutoMapBindings flag and binds + * them if needed. + */ +/* + * Default resolver + */ +struct TDefaultIoResolver : public TDefaultIoResolverBase +{ + TDefaultIoResolver(const TIntermediate &intermediate) : TDefaultIoResolverBase(intermediate) { } + + bool validateBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& /*type*/, bool /*is_live*/) override + { + return true; + } + + int resolveBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool is_live) override + { + const int set = getLayoutSet(type); + + if (type.getQualifier().hasBinding()) { + if (isImageType(type)) + return reserveSlot(set, getBaseBinding(EResImage, set) + type.getQualifier().layoutBinding); + + if (isTextureType(type)) + return reserveSlot(set, getBaseBinding(EResTexture, set) + type.getQualifier().layoutBinding); + + if (isSsboType(type)) + return reserveSlot(set, getBaseBinding(EResSsbo, set) + type.getQualifier().layoutBinding); + + if (isSamplerType(type)) + return reserveSlot(set, getBaseBinding(EResSampler, set) + type.getQualifier().layoutBinding); + + if (isUboType(type)) + return reserveSlot(set, getBaseBinding(EResUbo, set) + type.getQualifier().layoutBinding); + } else if (is_live && doAutoBindingMapping()) { + // find free slot, the caller did make sure it passes all vars with binding + // first and now all are passed that do not have a binding and needs one + + if (isImageType(type)) + return getFreeSlot(set, getBaseBinding(EResImage, set)); + + if (isTextureType(type)) + return getFreeSlot(set, getBaseBinding(EResTexture, set)); + + if (isSsboType(type)) + return getFreeSlot(set, getBaseBinding(EResSsbo, set)); + + if (isSamplerType(type)) + return getFreeSlot(set, getBaseBinding(EResSampler, set)); + + if (isUboType(type)) + return getFreeSlot(set, getBaseBinding(EResUbo, set)); + } + + return -1; + } + +protected: + static bool isImageType(const glslang::TType& type) { + return type.getBasicType() == glslang::EbtSampler && type.getSampler().isImage(); + } + + static bool isSsboType(const glslang::TType& type) { + return type.getQualifier().storage == EvqBuffer; + } +}; + +/******************************************************************************** +The following IO resolver maps types in HLSL register space, as follows: + +t – for shader resource views (SRV) + TEXTURE1D + TEXTURE1DARRAY + TEXTURE2D + TEXTURE2DARRAY + TEXTURE3D + TEXTURECUBE + TEXTURECUBEARRAY + TEXTURE2DMS + TEXTURE2DMSARRAY + STRUCTUREDBUFFER + BYTEADDRESSBUFFER + BUFFER + TBUFFER + +s – for samplers + SAMPLER + SAMPLER1D + SAMPLER2D + SAMPLER3D + SAMPLERCUBE + SAMPLERSTATE + SAMPLERCOMPARISONSTATE + +u – for unordered access views (UAV) + RWBYTEADDRESSBUFFER + RWSTRUCTUREDBUFFER + APPENDSTRUCTUREDBUFFER + CONSUMESTRUCTUREDBUFFER + RWBUFFER + RWTEXTURE1D + RWTEXTURE1DARRAY + RWTEXTURE2D + RWTEXTURE2DARRAY + RWTEXTURE3D + +b – for constant buffer views (CBV) + CBUFFER + CONSTANTBUFFER + ********************************************************************************/ +struct TDefaultHlslIoResolver : public TDefaultIoResolverBase +{ + TDefaultHlslIoResolver(const TIntermediate &intermediate) : TDefaultIoResolverBase(intermediate) { } + + bool validateBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& /*type*/, bool /*is_live*/) override + { + return true; + } + + int resolveBinding(EShLanguage /*stage*/, const char* /*name*/, const glslang::TType& type, bool is_live) override + { + const int set = getLayoutSet(type); + + if (type.getQualifier().hasBinding()) { + if (isUavType(type)) + return reserveSlot(set, getBaseBinding(EResUav, set) + type.getQualifier().layoutBinding); + + if (isSrvType(type)) + return reserveSlot(set, getBaseBinding(EResTexture, set) + type.getQualifier().layoutBinding); + + if (isSamplerType(type)) + return reserveSlot(set, getBaseBinding(EResSampler, set) + type.getQualifier().layoutBinding); + + if (isUboType(type)) + return reserveSlot(set, getBaseBinding(EResUbo, set) + type.getQualifier().layoutBinding); + } else if (is_live && doAutoBindingMapping()) { + // find free slot, the caller did make sure it passes all vars with binding + // first and now all are passed that do not have a binding and needs one + + if (isUavType(type)) + return getFreeSlot(set, getBaseBinding(EResUav, set)); + + if (isSrvType(type)) + return getFreeSlot(set, getBaseBinding(EResTexture, set)); + + if (isSamplerType(type)) + return getFreeSlot(set, getBaseBinding(EResSampler, set)); + + if (isUboType(type)) + return getFreeSlot(set, getBaseBinding(EResUbo, set)); + } + + return -1; + } + +protected: + // Return true if this is a SRV (shader resource view) type: + static bool isSrvType(const glslang::TType& type) { + return isTextureType(type) || type.getQualifier().storage == EvqBuffer; + } + + // Return true if this is a UAV (unordered access view) type: + static bool isUavType(const glslang::TType& type) { + if (type.getQualifier().readonly) + return false; + + return (type.getBasicType() == glslang::EbtSampler && type.getSampler().isImage()) || + (type.getQualifier().storage == EvqBuffer); + } +}; + + // Map I/O variables to provided offsets, and make bindings for // unbound but live variables. // // Returns false if the input is too malformed to do this. bool TIoMapper::addStage(EShLanguage stage, TIntermediate &intermediate, TInfoSink &infoSink, TIoMapResolver *resolver) { - // Trivial return if there is nothing to do. - if (intermediate.getShiftSamplerBinding() == 0 && - intermediate.getShiftTextureBinding() == 0 && - intermediate.getShiftImageBinding() == 0 && - intermediate.getShiftUboBinding() == 0 && - intermediate.getShiftSsboBinding() == 0 && - intermediate.getAutoMapBindings() == false && - resolver == nullptr) + bool somethingToDo = !intermediate.getResourceSetBinding().empty() || + intermediate.getAutoMapBindings() || + intermediate.getAutoMapLocations(); + + for (int res = 0; res < EResCount; ++res) { + somethingToDo = somethingToDo || + (intermediate.getShiftBinding(TResourceType(res)) != 0) || + intermediate.hasShiftBindingForSet(TResourceType(res)); + } + + if (!somethingToDo && resolver == nullptr) return true; if (intermediate.getNumEntryPoints() != 1 || intermediate.isRecursive()) @@ -487,16 +722,15 @@ bool TIoMapper::addStage(EShLanguage stage, TIntermediate &intermediate, TInfoSi return false; // if no resolver is provided, use the default resolver with the given shifts and auto map settings - TDefaultIoResolver defaultResolver; - if (resolver == nullptr) { - defaultResolver.baseSamplerBinding = intermediate.getShiftSamplerBinding(); - defaultResolver.baseTextureBinding = intermediate.getShiftTextureBinding(); - defaultResolver.baseImageBinding = intermediate.getShiftImageBinding(); - defaultResolver.baseUboBinding = intermediate.getShiftUboBinding(); - defaultResolver.baseSsboBinding = intermediate.getShiftSsboBinding(); - defaultResolver.doAutoMapping = intermediate.getAutoMapBindings(); + TDefaultIoResolver defaultResolver(intermediate); + TDefaultHlslIoResolver defaultHlslResolver(intermediate); - resolver = &defaultResolver; + if (resolver == nullptr) { + // TODO: use a passed in IO mapper for this + if (intermediate.usingHlslIoMapping()) + resolver = &defaultHlslResolver; + else + resolver = &defaultResolver; } TVarLiveMap inVarMap, outVarMap, uniformVarMap; @@ -516,11 +750,20 @@ bool TIoMapper::addStage(EShLanguage stage, TIntermediate &intermediate, TInfoSi std::sort(uniformVarMap.begin(), uniformVarMap.end(), TVarEntryInfo::TOrderByPriority()); bool hadError = false; + TNotifyInOutAdaptor inOutNotify(stage, *resolver); + TNotifyUniformAdaptor uniformNotify(stage, *resolver); TResolverUniformAdaptor uniformResolve(stage, *resolver, infoSink, hadError, intermediate); TResolverInOutAdaptor inOutResolve(stage, *resolver, infoSink, hadError, intermediate); + resolver->beginNotifications(stage); + std::for_each(inVarMap.begin(), inVarMap.end(), inOutNotify); + std::for_each(outVarMap.begin(), outVarMap.end(), inOutNotify); + std::for_each(uniformVarMap.begin(), uniformVarMap.end(), uniformNotify); + resolver->endNotifications(stage); + resolver->beginResolve(stage); std::for_each(inVarMap.begin(), inVarMap.end(), inOutResolve); std::for_each(outVarMap.begin(), outVarMap.end(), inOutResolve); std::for_each(uniformVarMap.begin(), uniformVarMap.end(), uniformResolve); + resolver->endResolve(stage); if (!hadError) { // sort by id again, so we can use lower bound to find entries diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp index 4bb2951..9ca1557 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp @@ -101,6 +101,9 @@ void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit) if (! earlyFragmentTests) earlyFragmentTests = unit.earlyFragmentTests; + if (!postDepthCoverage) + postDepthCoverage = unit.postDepthCoverage; + if (depthLayout == EldNone) depthLayout = unit.depthLayout; else if (depthLayout != unit.depthLayout) @@ -459,9 +462,9 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) error(infoSink, "At least one shader must specify an output layout(vertices=...)"); break; case EShLangTessEvaluation: - if (inputPrimitive == ElgNone) - error(infoSink, "At least one shader must specify an input layout primitive"); if (source == EShSourceGlsl) { + if (inputPrimitive == ElgNone) + error(infoSink, "At least one shader must specify an input layout primitive"); if (vertexSpacing == EvsNone) vertexSpacing = EvsEqual; if (vertexOrder == EvoNone) @@ -485,6 +488,11 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) error(infoSink, "At least one shader must specify a layout(max_vertices = value)"); break; case EShLangFragment: + // for GL_ARB_post_depth_coverage, EarlyFragmentTest is set automatically in + // ParseHelper.cpp. So if we reach here, this must be GL_EXT_post_depth_coverage + // requiring explicit early_fragment_tests + if (getPostDepthCoverage() && !getEarlyFragmentTests()) + error(infoSink, "post_depth_coverage requires early_fragment_tests"); break; case EShLangCompute: break; @@ -860,7 +868,7 @@ int TIntermediate::checkLocationRange(int set, const TIoRange& range, const TTyp return -1; // no collision } -// Accumulate locations used for inputs, outputs, and uniforms, and check for collisions +// Accumulate bindings and offsets, and check for collisions // as the accumulation is done. // // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. @@ -1057,6 +1065,8 @@ int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size) case EbtUint64: case EbtDouble: size = 8; return 8; #ifdef AMD_EXTENSIONS + case EbtInt16: + case EbtUint16: case EbtFloat16: size = 2; return 2; #endif default: size = 4; return 4; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h index 2cd912b..b0ef5fd 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h @@ -42,6 +42,7 @@ #include #include +#include class TInfoSink; @@ -150,6 +151,54 @@ struct TXfbBuffer { bool containsDouble; }; +// Track a set of strings describing how the module was processed. +// Using the form: +// process arg0 arg1 arg2 ... +// process arg0 arg1 arg2 ... +// where everything is textual, and there can be zero or more arguments +class TProcesses { +public: + TProcesses() {} + ~TProcesses() {} + + void addProcess(const char* process) + { + processes.push_back(process); + } + void addProcess(const std::string& process) + { + processes.push_back(process); + } + void addArgument(int arg) + { + processes.back().append(" "); + std::string argString = std::to_string(arg); + processes.back().append(argString); + } + void addArgument(const char* arg) + { + processes.back().append(" "); + processes.back().append(arg); + } + void addArgument(const std::string& arg) + { + processes.back().append(" "); + processes.back().append(arg); + } + void addIfNonZero(const char* process, int value) + { + if (value != 0) { + addProcess(process); + addArgument(value); + } + } + + const std::vector& getProcesses() const { return processes; } + +private: + std::vector processes; +}; + class TSymbolTable; class TSymbol; class TVariable; @@ -160,25 +209,29 @@ class TVariable; class TIntermediate { public: explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) : + implicitThisName("@this"), language(l), source(EShSourceNone), profile(p), version(v), treeRoot(0), numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false), - invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), inputPrimitive(ElgNone), outputPrimitive(ElgNone), + invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), + inputPrimitive(ElgNone), outputPrimitive(ElgNone), pixelCenterInteger(false), originUpperLeft(false), - vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false), depthLayout(EldNone), depthReplacing(false), blendEquations(0), - xfbMode(false), multiStream(false), + vertexSpacing(EvsNone), vertexOrder(EvoNone), pointMode(false), earlyFragmentTests(false), + postDepthCoverage(false), depthLayout(EldNone), depthReplacing(false), + blendEquations(0), xfbMode(false), multiStream(false), #ifdef NV_EXTENSIONS layoutOverrideCoverage(false), geoPassthroughEXT(false), #endif - shiftSamplerBinding(0), - shiftTextureBinding(0), - shiftImageBinding(0), - shiftUboBinding(0), - shiftSsboBinding(0), autoMapBindings(false), + autoMapLocations(false), + invertY(false), flattenUniformArrays(false), useUnknownFormat(false), - hlslOffsets(false) + hlslOffsets(false), + useStorageBuffer(false), + hlslIoMapping(false), + textureSamplerTransformMode(EShTexSampTransKeep), + needToLegalize(false) { localSize[0] = 1; localSize[1] = 1; @@ -187,6 +240,8 @@ public: localSizeSpecId[1] = TQualifier::layoutNotSet; localSizeSpecId[2] = TQualifier::layoutNotSet; xfbBuffers.resize(TQualifier::layoutXfbBufferEnd); + + shiftBinding.fill(0); } void setLimits(const TBuiltInResource& r) { resources = r; } @@ -196,35 +251,140 @@ public: void setSource(EShSource s) { source = s; } EShSource getSource() const { return source; } - void setEntryPointName(const char* ep) { entryPointName = ep; } + void setEntryPointName(const char* ep) + { + entryPointName = ep; + processes.addProcess("entry-point"); + processes.addArgument(entryPointName); + } void setEntryPointMangledName(const char* ep) { entryPointMangledName = ep; } const std::string& getEntryPointName() const { return entryPointName; } const std::string& getEntryPointMangledName() const { return entryPointMangledName; } - void setShiftSamplerBinding(unsigned int shift) { shiftSamplerBinding = shift; } - unsigned int getShiftSamplerBinding() const { return shiftSamplerBinding; } - void setShiftTextureBinding(unsigned int shift) { shiftTextureBinding = shift; } - unsigned int getShiftTextureBinding() const { return shiftTextureBinding; } - void setShiftImageBinding(unsigned int shift) { shiftImageBinding = shift; } - unsigned int getShiftImageBinding() const { return shiftImageBinding; } - void setShiftUboBinding(unsigned int shift) { shiftUboBinding = shift; } - unsigned int getShiftUboBinding() const { return shiftUboBinding; } - void setShiftSsboBinding(unsigned int shift) { shiftSsboBinding = shift; } - unsigned int getShiftSsboBinding() const { return shiftSsboBinding; } - void setAutoMapBindings(bool map) { autoMapBindings = map; } - bool getAutoMapBindings() const { return autoMapBindings; } - void setFlattenUniformArrays(bool flatten) { flattenUniformArrays = flatten; } - bool getFlattenUniformArrays() const { return flattenUniformArrays; } - void setNoStorageFormat(bool b) { useUnknownFormat = b; } - bool getNoStorageFormat() const { return useUnknownFormat; } - void setHlslOffsets() { hlslOffsets = true; } + void setShiftBinding(TResourceType res, unsigned int shift) + { + shiftBinding[res] = shift; + + const char* name = getResourceName(res); + if (name != nullptr) + processes.addIfNonZero(name, shift); + } + + unsigned int getShiftBinding(TResourceType res) const { return shiftBinding[res]; } + + void setShiftBindingForSet(TResourceType res, unsigned int shift, unsigned int set) + { + if (shift == 0) // ignore if there's no shift: it's a no-op. + return; + + shiftBindingForSet[res][set] = shift; + + const char* name = getResourceName(res); + if (name != nullptr) { + processes.addProcess(name); + processes.addArgument(shift); + processes.addArgument(set); + } + } + + int getShiftBindingForSet(TResourceType res, unsigned int set) const + { + const auto shift = shiftBindingForSet[res].find(set); + return shift == shiftBindingForSet[res].end() ? -1 : shift->second; + } + bool hasShiftBindingForSet(TResourceType res) const { return !shiftBindingForSet[res].empty(); } + + void setResourceSetBinding(const std::vector& shift) + { + resourceSetBinding = shift; + if (shift.size() > 0) { + processes.addProcess("resource-set-binding"); + for (int s = 0; s < (int)shift.size(); ++s) + processes.addArgument(shift[s]); + } + } + const std::vector& getResourceSetBinding() const { return resourceSetBinding; } + void setAutoMapBindings(bool map) + { + autoMapBindings = map; + if (autoMapBindings) + processes.addProcess("auto-map-bindings"); + } + bool getAutoMapBindings() const { return autoMapBindings; } + void setAutoMapLocations(bool map) + { + autoMapLocations = map; + if (autoMapLocations) + processes.addProcess("auto-map-locations"); + } + bool getAutoMapLocations() const { return autoMapLocations; } + void setInvertY(bool invert) + { + invertY = invert; + if (invertY) + processes.addProcess("invert-y"); + } + bool getInvertY() const { return invertY; } + + void setFlattenUniformArrays(bool flatten) + { + flattenUniformArrays = flatten; + if (flattenUniformArrays) + processes.addProcess("flatten-uniform-arrays"); + } + bool getFlattenUniformArrays() const { return flattenUniformArrays; } + void setNoStorageFormat(bool b) + { + useUnknownFormat = b; + if (useUnknownFormat) + processes.addProcess("no-storage-format"); + } + bool getNoStorageFormat() const { return useUnknownFormat; } + void setHlslOffsets() + { + hlslOffsets = true; + if (hlslOffsets) + processes.addProcess("hlsl-offsets"); + } bool usingHlslOFfsets() const { return hlslOffsets; } + void setUseStorageBuffer() + { + useStorageBuffer = true; + processes.addProcess("use-storage-buffer"); + } + bool usingStorageBuffer() const { return useStorageBuffer; } + void setHlslIoMapping(bool b) + { + hlslIoMapping = b; + if (hlslIoMapping) + processes.addProcess("hlsl-iomap"); + } + bool usingHlslIoMapping() { return hlslIoMapping; } + + void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { textureSamplerTransformMode = mode; } void setVersion(int v) { version = v; } int getVersion() const { return version; } void setProfile(EProfile p) { profile = p; } EProfile getProfile() const { return profile; } - void setSpv(const SpvVersion& s) { spvVersion = s; } + void setSpv(const SpvVersion& s) + { + spvVersion = s; + + // client processes + if (spvVersion.vulkan > 0) + processes.addProcess("client vulkan100"); + if (spvVersion.openGl > 0) + processes.addProcess("client opengl100"); + + // target-environment processes + if (spvVersion.vulkan == 100) + processes.addProcess("target-env vulkan1.0"); + else if (spvVersion.vulkan > 0) + processes.addProcess("target-env vulkanUnknown"); + if (spvVersion.openGl > 0) + processes.addProcess("target-env opengl"); + } const SpvVersion& getSpv() const { return spvVersion; } EShLanguage getStage() const { return language; } void addRequestedExtension(const char* extension) { requestedExtensions.insert(extension); } @@ -243,7 +403,9 @@ public: TIntermSymbol* addSymbol(const TType&, const TSourceLoc&); TIntermSymbol* addSymbol(const TIntermSymbol&); TIntermTyped* addConversion(TOperator, const TType&, TIntermTyped*) const; - TIntermTyped* addShapeConversion(TOperator, const TType&, TIntermTyped*); + TIntermTyped* addUniShapeConversion(TOperator, const TType&, TIntermTyped*); + void addBiShapeConversion(TOperator, TIntermTyped*& lhsNode, TIntermTyped*& rhsNode); + TIntermTyped* addShapeConversion(const TType&, TIntermTyped*); TIntermTyped* addBinaryMath(TOperator, TIntermTyped* left, TIntermTyped* right, TSourceLoc); TIntermTyped* addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc); TIntermTyped* addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, TSourceLoc); @@ -258,7 +420,7 @@ public: TIntermAggregate* makeAggregate(const TSourceLoc&); TIntermTyped* setAggregateOperator(TIntermNode*, TOperator, const TType& type, TSourceLoc); bool areAllChildConst(TIntermAggregate* aggrNode); - TIntermTyped* addSelection(TIntermTyped* cond, TIntermNodePair code, const TSourceLoc&); + TIntermSelection* addSelection(TIntermTyped* cond, TIntermNodePair code, const TSourceLoc&); TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc&); TIntermTyped* addComma(TIntermTyped* left, TIntermTyped* right, const TSourceLoc&); TIntermTyped* addMethod(TIntermTyped*, const TType&, const TString*, const TSourceLoc&); @@ -267,13 +429,19 @@ public: TIntermConstantUnion* addConstantUnion(unsigned int, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(long long, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(unsigned long long, const TSourceLoc&, bool literal = false) const; +#ifdef AMD_EXTENSIONS + TIntermConstantUnion* addConstantUnion(short, const TSourceLoc&, bool literal = false) const; + TIntermConstantUnion* addConstantUnion(unsigned short, const TSourceLoc&, bool literal = false) const; + +#endif TIntermConstantUnion* addConstantUnion(bool, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(double, TBasicType, const TSourceLoc&, bool literal = false) const; TIntermConstantUnion* addConstantUnion(const TString*, const TSourceLoc&, bool literal = false) const; TIntermTyped* promoteConstantUnion(TBasicType, TIntermConstantUnion*) const; bool parseConstTree(TIntermNode*, TConstUnionArray, TOperator, const TType&, bool singleConstantParam = false); TIntermLoop* addLoop(TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, const TSourceLoc&); - TIntermAggregate* addForLoop(TIntermNode*, TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, const TSourceLoc&); + TIntermAggregate* addForLoop(TIntermNode*, TIntermNode*, TIntermTyped*, TIntermTyped*, bool testFirst, + const TSourceLoc&, TIntermLoop*&); TIntermBranch* addBranch(TOperator, const TSourceLoc&); TIntermBranch* addBranch(TOperator, TIntermTyped*, const TSourceLoc&); template TIntermTyped* addSwizzle(TSwizzleSelectors&, const TSourceLoc&); @@ -380,6 +548,8 @@ public: bool getPixelCenterInteger() const { return pixelCenterInteger; } void setEarlyFragmentTests() { earlyFragmentTests = true; } bool getEarlyFragmentTests() const { return earlyFragmentTests; } + void setPostDepthCoverage() { postDepthCoverage = true; } + bool getPostDepthCoverage() const { return postDepthCoverage; } bool setDepth(TLayoutDepth d) { if (depthLayout != EldNone) @@ -414,6 +584,7 @@ public: xfbBuffers[buffer].stride = stride; return true; } + unsigned getXfbStride(int buffer) const { return xfbBuffers[buffer].stride; } int addXfbBufferOffset(const TType&); unsigned int computeTypeXfbSize(const TType&, bool& containsDouble) const; static int getBaseAlignmentScalar(const TType&, int& size); @@ -433,7 +604,22 @@ public: return semanticNameSet.insert(name).first->c_str(); } - const char* const implicitThisName = "@this"; + void setSourceFile(const char* file) { sourceFile = file; } + const std::string& getSourceFile() const { return sourceFile; } + void addSourceText(const char* text) { sourceText = sourceText + text; } + const std::string& getSourceText() const { return sourceText; } + void addProcesses(const std::vector& p) { + for (int i = 0; i < (int)p.size(); ++i) + processes.addProcess(p[i]); + } + void addProcess(const std::string& process) { processes.addProcess(process); } + void addProcessArgument(const std::string& arg) { processes.addArgument(arg); } + const std::vector& getProcesses() const { return processes.getProcesses(); } + + void setNeedsLegalization() { needToLegalize = true; } + bool needsLegalization() const { return needToLegalize; } + + const char* const implicitThisName; protected: TIntermSymbol* addSymbol(int Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&); @@ -456,6 +642,8 @@ protected: void pushSelector(TIntermSequence&, const TVectorSelector&, const TSourceLoc&); void pushSelector(TIntermSequence&, const TMatrixSelector&, const TSourceLoc&); bool specConstantPropagates(const TIntermTyped&, const TIntermTyped&); + void performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root); + static const char* getResourceName(TResourceType); const EShLanguage language; // stage, known at construction time EShSource source; // source language, known a bit later @@ -484,6 +672,7 @@ protected: int localSize[3]; int localSizeSpecId[3]; bool earlyFragmentTests; + bool postDepthCoverage; TLayoutDepth depthLayout; bool depthReplacing; int blendEquations; // an 'or'ing of masks of shifts of TBlendEquationShift @@ -495,15 +684,21 @@ protected: bool geoPassthroughEXT; #endif - unsigned int shiftSamplerBinding; - unsigned int shiftTextureBinding; - unsigned int shiftImageBinding; - unsigned int shiftUboBinding; - unsigned int shiftSsboBinding; + // Base shift values + std::array shiftBinding; + + // Per-descriptor-set shift values + std::array, EResCount> shiftBindingForSet; + + std::vector resourceSetBinding; bool autoMapBindings; + bool autoMapLocations; + bool invertY; bool flattenUniformArrays; bool useUnknownFormat; bool hlslOffsets; + bool useStorageBuffer; + bool hlslIoMapping; typedef std::list TGraph; TGraph callGraph; @@ -515,6 +710,17 @@ protected: std::unordered_set usedConstantId; // specialization constant ids used std::set semanticNameSet; + EShTextureSamplerTransformMode textureSamplerTransformMode; + + // source code of shader, useful as part of debug information + std::string sourceFile; + std::string sourceText; + + // for OpModuleProcessed, or equivalent + TProcesses processes; + + bool needToLegalize; + private: void operator=(TIntermediate&); // prevent assignments }; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/parseConst.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/parseConst.cpp index 22b5551..1a8e6d9 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/parseConst.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/parseConst.cpp @@ -76,12 +76,6 @@ bool TConstTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node) return false; } - if (node->getSequence().size() == 0) { - error = true; - - return false; - } - bool flag = node->getSequence().size() == 1 && node->getSequence()[0]->getAsTyped()->getAsConstantUnion(); if (flag) { singleConstantParam = true; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h index 0c85f8a..5f26b43 100755 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/parseVersions.h @@ -68,6 +68,7 @@ public: virtual void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc); virtual void checkDeprecated(const TSourceLoc&, int queryProfiles, int depVersion, const char* featureDesc); virtual void requireNotRemoved(const TSourceLoc&, int queryProfiles, int removedVersion, const char* featureDesc); + virtual void unimplemented(const TSourceLoc&, const char* featureDesc); virtual void requireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc); virtual void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], const char* featureDesc); virtual TExtensionBehavior getExtensionBehavior(const char*); @@ -77,6 +78,7 @@ public: virtual void fullIntegerCheck(const TSourceLoc&, const char* op); virtual void doubleCheck(const TSourceLoc&, const char* op); #ifdef AMD_EXTENSIONS + virtual void int16Check(const TSourceLoc& loc, const char* op, bool builtIn = false); virtual void float16Check(const TSourceLoc&, const char* op, bool builtIn = false); #endif virtual void int64Check(const TSourceLoc&, const char* op, bool builtIn = false); diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp index 590290b..3ae711c 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp @@ -76,12 +76,15 @@ TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \****************************************************************************/ +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #include #include #include #include +#include #include "PpContext.h" #include "PpTokens.h" @@ -239,15 +242,20 @@ int TPpContext::CPPelse(int matchelse, TPpToken* ppToken) int nextAtom = atomStrings.getAtom(ppToken->name); if (nextAtom == PpAtomIf || nextAtom == PpAtomIfdef || nextAtom == PpAtomIfndef) { depth++; - ifdepth++; - elsetracker++; + if (ifdepth >= maxIfNesting || elsetracker >= maxIfNesting) { + parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#if/#ifdef/#ifndef", ""); + return EndOfInput; + } else { + ifdepth++; + elsetracker++; + } } else if (nextAtom == PpAtomEndif) { token = extraTokenCheck(nextAtom, ppToken, scanToken(ppToken)); elseSeen[elsetracker] = false; --elsetracker; if (depth == 0) { // found the #endif we are looking for - if (ifdepth) + if (ifdepth > 0) --ifdepth; break; } @@ -264,7 +272,7 @@ int TPpContext::CPPelse(int matchelse, TPpToken* ppToken) parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); /* we decrement ifdepth here, because CPPif will increment * it and we really want to leave it alone */ - if (ifdepth) { + if (ifdepth > 0) { --ifdepth; elseSeen[elsetracker] = false; --elsetracker; @@ -343,8 +351,8 @@ namespace { int op_add(int a, int b) { return a + b; } int op_sub(int a, int b) { return a - b; } int op_mul(int a, int b) { return a * b; } - int op_div(int a, int b) { return a / b; } - int op_mod(int a, int b) { return a % b; } + int op_div(int a, int b) { return a == INT_MIN && b == -1 ? 0 : a / b; } + int op_mod(int a, int b) { return a == INT_MIN && b == -1 ? 0 : a % b; } int op_pos(int a) { return a; } int op_neg(int a) { return -a; } int op_cmpl(int a) { return ~a; } @@ -391,6 +399,14 @@ int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, boo TSourceLoc loc = ppToken->loc; // because we sometimes read the newline before reporting the error if (token == PpAtomIdentifier) { if (strcmp("defined", ppToken->name) == 0) { + if (! parseContext.isReadingHLSL() && isMacroInput()) { + if (parseContext.relaxedErrors()) + parseContext.ppWarn(ppToken->loc, "nonportable when expanded from macros for preprocessor expression", + "defined", ""); + else + parseContext.ppError(ppToken->loc, "cannot use in preprocessor expression when expanded from macros", + "defined", ""); + } bool needclose = 0; token = scanToken(ppToken); if (token == '(') { @@ -526,11 +542,12 @@ int TPpContext::evalToToken(int token, bool shortCircuit, int& res, bool& err, T int TPpContext::CPPif(TPpToken* ppToken) { int token = scanToken(ppToken); - elsetracker++; - ifdepth++; - if (ifdepth > maxIfNesting) { + if (ifdepth >= maxIfNesting || elsetracker >= maxIfNesting) { parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#if", ""); - return 0; + return EndOfInput; + } else { + elsetracker++; + ifdepth++; } int res = 0; bool err = false; @@ -546,11 +563,14 @@ int TPpContext::CPPif(TPpToken* ppToken) int TPpContext::CPPifdef(int defined, TPpToken* ppToken) { int token = scanToken(ppToken); - if (++ifdepth > maxIfNesting) { + if (ifdepth > maxIfNesting || elsetracker > maxIfNesting) { parseContext.ppError(ppToken->loc, "maximum nesting depth exceeded", "#ifdef", ""); - return 0; + return EndOfInput; + } else { + elsetracker++; + ifdepth++; } - elsetracker++; + if (token != PpAtomIdentifier) { if (defined) parseContext.ppError(ppToken->loc, "must be followed by macro name", "#ifdef", ""); @@ -611,14 +631,14 @@ int TPpContext::CPPinclude(TPpToken* ppToken) TShader::Includer::IncludeResult* res = nullptr; if (startWithLocalSearch) res = includer.includeLocal(filename.c_str(), currentSourceFile.c_str(), includeStack.size() + 1); - if (! res || res->headerName.empty()) { + if (res == nullptr || res->headerName.empty()) { includer.releaseInclude(res); res = includer.includeSystem(filename.c_str(), currentSourceFile.c_str(), includeStack.size() + 1); } // Process the results - if (res && !res->headerName.empty()) { - if (res->headerData && res->headerLength) { + if (res != nullptr && !res->headerName.empty()) { + if (res->headerData != nullptr && res->headerLength > 0) { // path for processing one or more tokens from an included header, hand off 'res' const bool forNextLine = parseContext.lineDirectiveShouldSetNextLine(); std::ostringstream prologue; @@ -636,8 +656,8 @@ int TPpContext::CPPinclude(TPpToken* ppToken) } else { // error path, clean up std::string message = - res ? std::string(res->headerData, res->headerLength) - : std::string("Could not process include directive"); + res != nullptr ? std::string(res->headerData, res->headerLength) + : std::string("Could not process include directive"); parseContext.ppError(directiveLoc, message.c_str(), "#include", "for header name: %s", filename.c_str()); includer.releaseInclude(res); } @@ -714,6 +734,7 @@ int TPpContext::CPPerror(TPpToken* ppToken) if (token == PpAtomConstInt || token == PpAtomConstUint || token == PpAtomConstInt64 || token == PpAtomConstUint64 || #ifdef AMD_EXTENSIONS + token == PpAtomConstInt16 || token == PpAtomConstUint16 || token == PpAtomConstFloat16 || #endif token == PpAtomConstFloat || token == PpAtomConstDouble) { @@ -748,6 +769,10 @@ int TPpContext::CPPpragma(TPpToken* ppToken) case PpAtomConstUint: case PpAtomConstInt64: case PpAtomConstUint64: +#ifdef AMD_EXTENSIONS + case PpAtomConstInt16: + case PpAtomConstUint16: +#endif case PpAtomConstFloat: case PpAtomConstDouble: #ifdef AMD_EXTENSIONS @@ -776,8 +801,12 @@ int TPpContext::CPPversion(TPpToken* ppToken) { int token = scanToken(ppToken); - if (errorOnVersion || versionSeen) - parseContext.ppError(ppToken->loc, "must occur first in shader", "#version", ""); + if (errorOnVersion || versionSeen) { + if (parseContext.isReadingHLSL()) + parseContext.ppError(ppToken->loc, "invalid preprocessor command", "#version", ""); + else + parseContext.ppError(ppToken->loc, "must occur first in shader", "#version", ""); + } versionSeen = true; if (token == '\n') { @@ -867,16 +896,16 @@ int TPpContext::readCPPline(TPpToken* ppToken) token = CPPdefine(ppToken); break; case PpAtomElse: - if (elsetracker[elseSeen]) + if (elseSeen[elsetracker]) parseContext.ppError(ppToken->loc, "#else after #else", "#else", ""); - elsetracker[elseSeen] = true; - if (! ifdepth) + elseSeen[elsetracker] = true; + if (ifdepth == 0) parseContext.ppError(ppToken->loc, "mismatched statements", "#else", ""); token = extraTokenCheck(PpAtomElse, ppToken, scanToken(ppToken)); token = CPPelse(0, ppToken); break; case PpAtomElif: - if (! ifdepth) + if (ifdepth == 0) parseContext.ppError(ppToken->loc, "mismatched statements", "#elif", ""); if (elseSeen[elsetracker]) parseContext.ppError(ppToken->loc, "#elif after #else", "#elif", ""); @@ -887,7 +916,7 @@ int TPpContext::readCPPline(TPpToken* ppToken) token = CPPelse(0, ppToken); break; case PpAtomEndif: - if (! ifdepth) + if (ifdepth == 0) parseContext.ppError(ppToken->loc, "mismatched statements", "#endif", ""); else { elseSeen[elsetracker] = false; @@ -1049,6 +1078,10 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken) pasting = true; } + // HLSL does expand macros before concatenation + if (pasting && pp->parseContext.isReadingHLSL()) + pasting = false; + // TODO: preprocessor: properly handle whitespace (or lack of it) between tokens when expanding if (token == PpAtomIdentifier) { int i; @@ -1124,7 +1157,6 @@ int TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, bool newLineOka } MacroSymbol* macro = macroAtom == 0 ? nullptr : lookupMacroDef(macroAtom); - int token; int depth = 0; // no recursive expansions @@ -1146,13 +1178,12 @@ int TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, bool newLineOka TSourceLoc loc = ppToken->loc; // in case we go to the next line before discovering the error in->mac = macro; if (macro->args.size() > 0 || macro->emptyArgs) { - token = scanToken(ppToken); + int token = scanToken(ppToken); if (newLineOkay) { while (token == '\n') token = scanToken(ppToken); } if (token != '(') { - parseContext.ppError(loc, "expected '(' following", "macro expansion", atomStrings.getString(macroAtom)); UngetToken(token, ppToken); delete in; return 0; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp index 52df3b0..06c2333 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp @@ -76,7 +76,9 @@ TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \****************************************************************************/ +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #include #include diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h index f1c41ab..854bbba 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.h @@ -92,7 +92,7 @@ namespace glslang { class TPpToken { public: - TPpToken() : space(false), ival(0), dval(0.0), i64val(0) + TPpToken() : space(false), i64val(0) { loc.init(); name[0] = 0; @@ -108,10 +108,14 @@ public: bool operator!=(const TPpToken& right) { return ! operator==(right); } TSourceLoc loc; - bool space; // true if a space (for white space or a removed comment) should also be recognized, in front of the token returned - int ival; - double dval; - long long i64val; + bool space; // true if a space (for white space or a removed comment) should also be recognized, in front of the token returned + + union { + int ival; + double dval; + long long i64val; + }; + char name[MaxTokenLength + 1]; }; @@ -196,6 +200,7 @@ public: virtual void ungetch() = 0; virtual bool peekPasting() { return false; } // true when about to see ## virtual bool endOfReplacementList() { return false; } // true when at the end of a macro replacement list (RHS of #define) + virtual bool isMacroInput() { return false; } // Will be called when we start reading tokens from this instance virtual void notifyActivated() {} @@ -302,8 +307,9 @@ protected: void ungetChar() { inputStack.back()->ungetch(); } bool peekPasting() { return !inputStack.empty() && inputStack.back()->peekPasting(); } bool endOfReplacementList() { return inputStack.empty() || inputStack.back()->endOfReplacementList(); } + bool isMacroInput() { return inputStack.size() > 0 && inputStack.back()->isMacroInput(); } - static const int maxIfNesting = 64; + static const int maxIfNesting = 65; int ifdepth; // current #if-#else-#endif nesting in the cpp.c file (pre-processor) bool elseSeen[maxIfNesting]; // Keep a track of whether an else has been seen at a particular depth @@ -325,6 +331,7 @@ protected: virtual void ungetch() override { assert(0); } bool peekPasting() override { return prepaste; } bool endOfReplacementList() override { return mac->body.atEnd(); } + bool isMacroInput() override { return true; } MacroSymbol *mac; TVector args; @@ -584,6 +591,7 @@ protected: int ScanFromString(char* s); void missingEndifCheck(); int lFloatConst(int len, int ch, TPpToken* ppToken); + int characterLiteral(TPpToken* ppToken); void push_include(TShader::Includer::IncludeResult* result) { diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp deleted file mode 100644 index e30db7f..0000000 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -// Copyright (C) 2013 LunarG, Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ - -namespace glslang { - -} // end namespace glslang diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp index dd16269..ccb3930 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp @@ -76,7 +76,9 @@ TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \****************************************************************************/ +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #include #include @@ -101,17 +103,6 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) { bool HasDecimalOrExponent = false; int isDouble = 0; - bool generateFloat16 = false; - bool acceptFloat16 = parseContext.intermediate.getSource() == EShSourceHlsl; - bool isFloat16 = false; - bool requireHF = false; -#ifdef AMD_EXTENSIONS - if (parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float)) { - acceptFloat16 = true; - generateFloat16 = true; - requireHF = true; - } -#endif const auto saveName = [&](int ch) { if (len <= MaxTokenLength) @@ -124,6 +115,35 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) HasDecimalOrExponent = true; saveName(ch); ch = getChar(); + + // 1.#INF or -1.#INF + if (parseContext.intermediate.getSource() == EShSourceHlsl && ch == '#') { + if ((len < 2) || + (len == 2 && ppToken->name[0] != '1') || + (len == 3 && ppToken->name[1] != '1' && !(ppToken->name[0] == '-' || ppToken->name[0] == '+')) || + (len > 3)) + parseContext.ppError(ppToken->loc, "unexpected use of", "#", ""); + else { + // we have 1.# or -1.# or +1.#, check for 'INF' + if ((ch = getChar()) != 'I' || + (ch = getChar()) != 'N' || + (ch = getChar()) != 'F') + parseContext.ppError(ppToken->loc, "expected 'INF'", "#", ""); + else { + // we have [+-].#INF, and we are targeting IEEE 754, so wrap it up: + saveName('I'); + saveName('N'); + saveName('F'); + ppToken->name[len] = '\0'; + if (ppToken->name[0] == '-') + ppToken->i64val = 0xfff0000000000000; // -Infinity + else + ppToken->i64val = 0x7ff0000000000000; // +Infinity + return PpAtomConstFloat; + } + } + } + while (ch >= '0' && ch <= '9') { saveName(ch); ch = getChar(); @@ -151,7 +171,7 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) } // Suffix: - + bool isFloat16 = false; if (ch == 'l' || ch == 'L') { parseContext.doubleCheck(ppToken->loc, "double floating-point suffix"); if (! HasDecimalOrExponent) @@ -165,14 +185,14 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) saveName(ch2); isDouble = 1; } - } else if (acceptFloat16 && (ch == 'h' || ch == 'H')) { + } else if (ch == 'h' || ch == 'H') { #ifdef AMD_EXTENSIONS - if (generateFloat16) + if (parseContext.intermediate.getSource() == EShSourceGlsl) parseContext.float16Check(ppToken->loc, "half floating-point suffix"); #endif if (!HasDecimalOrExponent) parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); - if (requireHF) { + if (parseContext.intermediate.getSource() == EShSourceGlsl) { int ch2 = getChar(); if (ch2 != 'f' && ch2 != 'F') { ungetChar(); @@ -180,11 +200,11 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) } else { saveName(ch); saveName(ch2); - isFloat16 = generateFloat16; + isFloat16 = true; } } else { saveName(ch); - isFloat16 = generateFloat16; + isFloat16 = false; } } else if (ch == 'f' || ch == 'F') { parseContext.profileRequires(ppToken->loc, EEsProfile, 300, nullptr, "floating-point suffix"); @@ -216,6 +236,82 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) return PpAtomConstFloat; } +// Recognize a character literal. +// +// The first ' has already been accepted, read the rest, through the closing '. +// +// Always returns PpAtomConstInt. +// +int TPpContext::characterLiteral(TPpToken* ppToken) +{ + ppToken->name[0] = 0; + ppToken->ival = 0; + + if (parseContext.intermediate.getSource() != EShSourceHlsl) { + // illegal, except in macro definition, for which case we report the character + return '\''; + } + + int ch = getChar(); + switch (ch) { + case '\'': + // As empty sequence: '' + parseContext.ppError(ppToken->loc, "unexpected", "\'", ""); + return PpAtomConstInt; + case '\\': + // As escape sequence: '\XXX' + switch (ch = getChar()) { + case 'a': + ppToken->ival = 7; + break; + case 'b': + ppToken->ival = 8; + break; + case 't': + ppToken->ival = 9; + break; + case 'n': + ppToken->ival = 10; + break; + case 'v': + ppToken->ival = 11; + break; + case 'f': + ppToken->ival = 12; + break; + case 'r': + ppToken->ival = 13; + break; + case 'x': + case '0': + parseContext.ppError(ppToken->loc, "octal and hex sequences not supported", "\\", ""); + break; + default: + // This catches '\'', '\"', '\?', etc. + // Also, things like '\C' mean the same thing as 'C' + // (after the above cases are filtered out). + ppToken->ival = ch; + break; + } + break; + default: + ppToken->ival = ch; + break; + } + ppToken->name[0] = (char)ppToken->ival; + ppToken->name[1] = '\0'; + ch = getChar(); + if (ch != '\'') { + parseContext.ppError(ppToken->loc, "expected", "\'", ""); + // Look ahead for a closing ' + do { + ch = getChar(); + } while (ch != '\'' && ch != EndOfInput && ch != '\n'); + } + + return PpAtomConstInt; +} + // // Scanner used to tokenize source stream. // @@ -226,16 +322,10 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) int ch = 0; int ii = 0; unsigned long long ival = 0; - bool enableInt64 = pp->parseContext.version >= 450 && pp->parseContext.extensionTurnedOn(E_GL_ARB_gpu_shader_int64); - bool acceptHalf = pp->parseContext.intermediate.getSource() == EShSourceHlsl; -#ifdef AMD_EXTENSIONS - if (pp->parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float)) - acceptHalf = true; -#endif const auto floatingPointChar = [&](int ch) { return ch == '.' || ch == 'e' || ch == 'E' || ch == 'f' || ch == 'F' || - (acceptHalf && (ch == 'h' || ch == 'H')); }; + ch == 'h' || ch == 'H'; }; ppToken->ival = 0; ppToken->i64val = 0; @@ -299,6 +389,9 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) bool isUnsigned = false; bool isInt64 = false; +#ifdef AMD_EXTENSIONS + bool isInt16 = false; +#endif ppToken->name[len++] = (char)ch; ch = getch(); if ((ch >= '0' && ch <= '9') || @@ -307,7 +400,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ival = 0; do { - if (ival <= 0x0fffffff || (enableInt64 && ival <= 0x0fffffffffffffffull)) { + if (len < MaxTokenLength && ival <= 0x0fffffffffffffffull) { ppToken->name[len++] = (char)ch; if (ch >= '0' && ch <= '9') { ii = ch - '0'; @@ -320,7 +413,10 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ival = (ival << 4) | ii; } else { if (! AlreadyComplained) { - pp->parseContext.ppError(ppToken->loc, "hexadecimal literal too big", "", ""); + if(len < MaxTokenLength) + pp->parseContext.ppError(ppToken->loc, "hexadecimal literal too big", "", ""); + else + pp->parseContext.ppError(ppToken->loc, "hexadecimal literal too long", "", ""); AlreadyComplained = 1; } ival = 0xffffffffffffffffull; @@ -337,28 +433,60 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len++] = (char)ch; isUnsigned = true; - if (enableInt64) { - int nextCh = getch(); - if ((ch == 'u' && nextCh == 'l') || (ch == 'U' && nextCh == 'L')) { - if (len < MaxTokenLength) - ppToken->name[len++] = (char)nextCh; - isInt64 = true; - } else - ungetch(); - } - } - else if (enableInt64 && (ch == 'l' || ch == 'L')) { + int nextCh = getch(); + if (nextCh == 'l' || nextCh == 'L') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt64 = true; + } else + ungetch(); + +#ifdef AMD_EXTENSIONS + nextCh = getch(); + if ((nextCh == 's' || nextCh == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt16 = true; + } else + ungetch(); +#endif + } else if (ch == 'l' || ch == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt64 = true; +#ifdef AMD_EXTENSIONS + } else if ((ch == 's' || ch == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)ch; + isInt16 = true; +#endif } else ungetch(); ppToken->name[len] = '\0'; - if (isInt64) { + if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "64-bit hexadecimal literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, E_GL_ARB_gpu_shader_int64, + "64-bit hexadecimal literal"); ppToken->i64val = ival; return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; +#ifdef AMD_EXTENSIONS + } else if (isInt16) { + if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "16-bit hexadecimal literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, E_GL_AMD_gpu_shader_int16, + "16-bit hexadecimal literal"); + } + ppToken->ival = (int)ival; + return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; +#endif } else { + if (ival > 0xffffffffu && !AlreadyComplained) + pp->parseContext.ppError(ppToken->loc, "hexadecimal literal too big", "", ""); ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; } @@ -367,6 +495,9 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) bool isUnsigned = false; bool isInt64 = false; +#ifdef AMD_EXTENSIONS + bool isInt16 = false; +#endif bool octalOverflow = false; bool nonOctal = false; ival = 0; @@ -379,7 +510,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) pp->parseContext.ppError(ppToken->loc, "numeric literal too long", "", ""); AlreadyComplained = 1; } - if (ival <= 0x1fffffff || (enableInt64 && ival <= 0x1fffffffffffffffull)) { + if (ival <= 0x1fffffffffffffffull) { ii = ch - '0'; ival = (ival << 3) | ii; } else @@ -412,30 +543,63 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len++] = (char)ch; isUnsigned = true; - if (enableInt64) { - int nextCh = getch(); - if ((ch == 'u' && nextCh == 'l') || (ch == 'U' && nextCh == 'L')) { - if (len < MaxTokenLength) - ppToken->name[len++] = (char)nextCh; - isInt64 = true; - } else - ungetch(); - } - } - else if (enableInt64 && (ch == 'l' || ch == 'L')) { + int nextCh = getch(); + if (nextCh == 'l' || nextCh == 'L') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt64 = true; + } else + ungetch(); + +#ifdef AMD_EXTENSIONS + nextCh = getch(); + if ((nextCh == 's' || nextCh == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt16 = true; + } else + ungetch(); +#endif + } else if (ch == 'l' || ch == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt64 = true; +#ifdef AMD_EXTENSIONS + } else if ((ch == 's' || ch == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)ch; + isInt16 = true; +#endif } else ungetch(); ppToken->name[len] = '\0'; + if (!isInt64 && ival > 0xffffffffu) + octalOverflow = true; + if (octalOverflow) pp->parseContext.ppError(ppToken->loc, "octal literal too big", "", ""); - if (isInt64) { + if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "64-bit octal literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, E_GL_ARB_gpu_shader_int64, + "64-bit octal literal"); ppToken->i64val = ival; return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; +#ifdef AMD_EXTENSIONS + } else if (isInt16) { + if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "16-bit octal literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, E_GL_AMD_gpu_shader_int16, + "16-bit octal literal"); + } + ppToken->ival = (int)ival; + return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; +#endif } else { ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; @@ -462,24 +626,43 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) int numericLen = len; bool isUnsigned = false; bool isInt64 = false; +#ifdef AMD_EXTENSIONS + bool isInt16 = false; +#endif if (ch == 'u' || ch == 'U') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isUnsigned = true; - if (enableInt64) { - int nextCh = getch(); - if ((ch == 'u' && nextCh == 'l') || (ch == 'U' && nextCh == 'L')) { - if (len < MaxTokenLength) - ppToken->name[len++] = (char)nextCh; - isInt64 = true; - } else - ungetch(); - } - } else if (enableInt64 && (ch == 'l' || ch == 'L')) { + int nextCh = getch(); + if (nextCh == 'l' || nextCh == 'L') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt64 = true; + } else + ungetch(); + +#ifdef AMD_EXTENSIONS + nextCh = getch(); + if ((nextCh == 's' || nextCh == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt16 = true; + } else + ungetch(); +#endif + } else if (ch == 'l' || ch == 'L') { if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt64 = true; +#ifdef AMD_EXTENSIONS + } else if ((ch == 's' || ch == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)ch; + isInt16 = true; +#endif } else ungetch(); @@ -489,10 +672,22 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) const unsigned remainderMaxInt = 0xFFFFFFFFu - 10 * oneTenthMaxInt; const unsigned long long oneTenthMaxInt64 = 0xFFFFFFFFFFFFFFFFull / 10; const unsigned long long remainderMaxInt64 = 0xFFFFFFFFFFFFFFFFull - 10 * oneTenthMaxInt64; +#ifdef AMD_EXTENSIONS + const unsigned short oneTenthMaxInt16 = 0xFFFFu / 10; + const unsigned short remainderMaxInt16 = 0xFFFFu - 10 * oneTenthMaxInt16; +#endif for (int i = 0; i < numericLen; i++) { ch = ppToken->name[i] - '0'; - if ((enableInt64 == false && ((ival > oneTenthMaxInt) || (ival == oneTenthMaxInt && (unsigned)ch > remainderMaxInt))) || - (enableInt64 && ((ival > oneTenthMaxInt64) || (ival == oneTenthMaxInt64 && (unsigned long long)ch > remainderMaxInt64)))) { + bool overflow = false; + if (isInt64) + overflow = (ival > oneTenthMaxInt64 || (ival == oneTenthMaxInt64 && (unsigned long long)ch > remainderMaxInt64)); +#ifdef AMD_EXTENSIONS + else if (isInt16) + overflow = (ival > oneTenthMaxInt16 || (ival == oneTenthMaxInt16 && (unsigned short)ch > remainderMaxInt16)); +#endif + else + overflow = (ival > oneTenthMaxInt || (ival == oneTenthMaxInt && (unsigned)ch > remainderMaxInt)); + if (overflow) { pp->parseContext.ppError(ppToken->loc, "numeric literal too big", "", ""); ival = 0xFFFFFFFFFFFFFFFFull; break; @@ -500,9 +695,24 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ival = ival * 10 + ch; } - if (isInt64) { + if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "64-bit literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, E_GL_ARB_gpu_shader_int64, + "64-bit literal"); ppToken->i64val = ival; return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; +#ifdef AMD_EXTENSIONS + } else if (isInt16) { + if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "16-bit literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, E_GL_AMD_gpu_shader_int16, + "16-bit literal"); + } + ppToken->ival = (int)ival; + return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; +#endif } else { ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; @@ -672,6 +882,8 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) return '/'; } break; + case '\'': + return pp->characterLiteral(ppToken); case '"': // TODO: If this gets enhanced to handle escape sequences, or // anything that is different than what #include needs, then @@ -750,6 +962,10 @@ int TPpContext::tokenize(TPpToken& ppToken) case PpAtomConstFloat: case PpAtomConstInt64: case PpAtomConstUint64: +#ifdef AMD_EXTENSIONS + case PpAtomConstInt16: + case PpAtomConstUint16: +#endif case PpAtomConstDouble: #ifdef AMD_EXTENSIONS case PpAtomConstFloat16: diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp deleted file mode 100644 index 700d82e..0000000 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -// Copyright (C) 2013 LunarG, Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// -/****************************************************************************\ -Copyright (c) 2002, NVIDIA Corporation. - -NVIDIA Corporation("NVIDIA") supplies this software to you in -consideration of your agreement to the following terms, and your use, -installation, modification or redistribution of this NVIDIA software -constitutes acceptance of these terms. If you do not agree with these -terms, please do not use, install, modify or redistribute this NVIDIA -software. - -In consideration of your agreement to abide by the following terms, and -subject to these terms, NVIDIA grants you a personal, non-exclusive -license, under NVIDIA's copyrights in this original NVIDIA software (the -"NVIDIA Software"), to use, reproduce, modify and redistribute the -NVIDIA Software, with or without modifications, in source and/or binary -forms; provided that if you redistribute the NVIDIA Software, you must -retain the copyright notice of NVIDIA, this notice and the following -text and disclaimers in all such redistributions of the NVIDIA Software. -Neither the name, trademarks, service marks nor logos of NVIDIA -Corporation may be used to endorse or promote products derived from the -NVIDIA Software without specific prior written permission from NVIDIA. -Except as expressly stated in this notice, no other rights or licenses -express or implied, are granted by NVIDIA herein, including but not -limited to any patent rights that may be infringed by your derivative -works or by other works in which the NVIDIA Software may be -incorporated. No hardware is licensed hereunder. - -THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER -PRODUCTS. - -IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, -INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY -OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE -NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF -NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -\****************************************************************************/ diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp index 7fa06a5..bc145e2 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp @@ -80,8 +80,10 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // For recording and playing back the stream of tokens in a macro definition. // -#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif +#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) #define snprintf sprintf_s #endif @@ -139,6 +141,10 @@ void TPpContext::TokenStream::putToken(int token, TPpToken* ppToken) case PpAtomConstUint: case PpAtomConstInt64: case PpAtomConstUint64: +#ifdef AMD_EXTENSIONS + case PpAtomConstInt16: + case PpAtomConstUint16: +#endif case PpAtomConstFloat: case PpAtomConstDouble: #ifdef AMD_EXTENSIONS @@ -188,6 +194,10 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken case PpAtomConstUint: case PpAtomConstInt64: case PpAtomConstUint64: +#ifdef AMD_EXTENSIONS + case PpAtomConstInt16: + case PpAtomConstUint16: +#endif len = 0; ch = getSubtoken(); while (ch != 0 && ch != EndOfInput) { @@ -215,6 +225,9 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken ppToken->dval = atof(ppToken->name); break; case PpAtomConstInt: +#ifdef AMD_EXTENSIONS + case PpAtomConstInt16: +#endif if (len > 0 && ppToken->name[0] == '0') { if (len > 1 && (ppToken->name[1] == 'x' || ppToken->name[1] == 'X')) ppToken->ival = (int)strtol(ppToken->name, 0, 16); @@ -224,6 +237,9 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken ppToken->ival = atoi(ppToken->name); break; case PpAtomConstUint: +#ifdef AMD_EXTENSIONS + case PpAtomConstUint16: +#endif if (len > 0 && ppToken->name[0] == '0') { if (len > 1 && (ppToken->name[1] == 'x' || ppToken->name[1] == 'X')) ppToken->ival = (int)strtoul(ppToken->name, 0, 16); diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h index ee442d6..d56df57 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h @@ -127,6 +127,10 @@ enum EFixedAtoms { PpAtomConstUint, PpAtomConstInt64, PpAtomConstUint64, +#ifdef AMD_EXTENSIONS + PpAtomConstInt16, + PpAtomConstUint16, +#endif PpAtomConstFloat, PpAtomConstDouble, PpAtomConstFloat16, diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/propagateNoContraction.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/propagateNoContraction.h index 3412c85..8521ad7 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/propagateNoContraction.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/propagateNoContraction.h @@ -37,6 +37,8 @@ // propagate 'noContraction' qualifier. // +#pragma once + #include "../Include/intermediate.h" namespace glslang { diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.cpp index f3f28f0..50fb602 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.cpp @@ -131,8 +131,11 @@ public: for (int m = 0; m <= index; ++m) { // modify just the children's view of matrix layout, if there is one for this member TLayoutMatrix subMatrixLayout = memberList[m].type->getQualifier().layoutMatrix; - int memberAlignment = intermediate.getBaseAlignment(*memberList[m].type, memberSize, dummyStride, type.getQualifier().layoutPacking == ElpStd140, - subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor : type.getQualifier().layoutMatrix == ElmRowMajor); + int memberAlignment = intermediate.getBaseAlignment(*memberList[m].type, memberSize, dummyStride, + type.getQualifier().layoutPacking == ElpStd140, + subMatrixLayout != ElmNone + ? subMatrixLayout == ElmRowMajor + : type.getQualifier().layoutMatrix == ElmRowMajor); RoundToPow2(offset, memberAlignment); if (m < index) offset += memberSize; @@ -151,7 +154,8 @@ public: int lastMemberSize; int dummyStride; - intermediate.getBaseAlignment(*memberList[lastIndex].type, lastMemberSize, dummyStride, blockType.getQualifier().layoutPacking == ElpStd140, + intermediate.getBaseAlignment(*memberList[lastIndex].type, lastMemberSize, dummyStride, + blockType.getQualifier().layoutPacking == ElpStd140, blockType.getQualifier().layoutMatrix == ElmRowMajor); return lastOffset + lastMemberSize; @@ -167,7 +171,7 @@ public: void blowUpActiveAggregate(const TType& baseType, const TString& baseName, const TList& derefs, TList::const_iterator deref, int offset, int blockIndex, int arraySize) { - // process the part of the derefence chain that was explicit in the shader + // process the part of the dereference chain that was explicit in the shader TString name = baseName; const TType* terminalType = &baseType; for (; deref != derefs.end(); ++deref) { @@ -177,7 +181,7 @@ public: switch (visitNode->getOp()) { case EOpIndexIndirect: // Visit all the indices of this array, and for each one add on the remaining dereferencing - for (int i = 0; i < visitNode->getLeft()->getType().getOuterArraySize(); ++i) { + for (int i = 0; i < std::max(visitNode->getLeft()->getType().getOuterArraySize(), 1); ++i) { TString newBaseName = name; if (baseType.getBasicType() != EbtBlock) newBaseName.append(TString("[") + String(i) + "]"); @@ -212,7 +216,7 @@ public: if (terminalType->isArray()) { // Visit all the indices of this array, and for each one, // fully explode the remaining aggregate to dereference - for (int i = 0; i < terminalType->getOuterArraySize(); ++i) { + for (int i = 0; i < std::max(terminalType->getOuterArraySize(), 1); ++i) { TString newBaseName = name; newBaseName.append(TString("[") + String(i) + "]"); TType derefType(*terminalType, 0); @@ -235,7 +239,7 @@ public: } // Finally, add a full string to the reflection database, and update the array size if necessary. - // If the derefenced entity to record is an array, compute the size and update the maximum size. + // If the dereferenced entity to record is an array, compute the size and update the maximum size. // there might not be a final array dereference, it could have been copied as an array object if (arraySize == 0) @@ -244,7 +248,8 @@ public: TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name); if (it == reflection.nameToIndex.end()) { reflection.nameToIndex[name] = (int)reflection.indexToUniform.size(); - reflection.indexToUniform.push_back(TObjectReflection(name, *terminalType, offset, mapToGlType(*terminalType), + reflection.indexToUniform.push_back(TObjectReflection(name, *terminalType, offset, + mapToGlType(*terminalType), arraySize, blockIndex)); } else if (arraySize > 1) { int& reflectedArraySize = reflection.indexToUniform[it->second].size; @@ -417,7 +422,8 @@ public: case Esd2D: switch ((int)sampler.ms) { case false: return sampler.arrayed ? GL_INT_SAMPLER_2D_ARRAY : GL_INT_SAMPLER_2D; - case true: return sampler.arrayed ? GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY : GL_INT_SAMPLER_2D_MULTISAMPLE; + case true: return sampler.arrayed ? GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY + : GL_INT_SAMPLER_2D_MULTISAMPLE; } case Esd3D: return GL_INT_SAMPLER_3D; @@ -435,7 +441,8 @@ public: case Esd2D: switch ((int)sampler.ms) { case false: return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_2D_ARRAY : GL_UNSIGNED_INT_SAMPLER_2D; - case true: return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY : GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE; + case true: return sampler.arrayed ? GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY + : GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE; } case Esd3D: return GL_UNSIGNED_INT_SAMPLER_3D; @@ -495,7 +502,8 @@ public: case Esd2D: switch ((int)sampler.ms) { case false: return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_2D_ARRAY : GL_UNSIGNED_INT_IMAGE_2D; - case true: return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY : GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE; + case true: return sampler.arrayed ? GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY + : GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE; } case Esd3D: return GL_UNSIGNED_INT_IMAGE_3D; @@ -707,12 +715,27 @@ void TReflection::buildAttributeReflection(EShLanguage stage, const TIntermediat } } +// build counter block index associations for buffers +void TReflection::buildCounterIndices() +{ + // search for ones that have counters + for (int i = 0; i < int(indexToUniformBlock.size()); ++i) { + const TString counterName(indexToUniformBlock[i].name + "@count"); + const int index = getIndex(counterName); + + if (index >= 0) + indexToUniformBlock[i].counterIndex = index; + } +} + // Merge live symbols from 'intermediate' into the existing reflection database. // // Returns false if the input is too malformed to do this. bool TReflection::addStage(EShLanguage stage, const TIntermediate& intermediate) { - if (intermediate.getNumEntryPoints() != 1 || intermediate.isRecursive()) + if (intermediate.getTreeRoot() == nullptr || + intermediate.getNumEntryPoints() != 1 || + intermediate.isRecursive()) return false; buildAttributeReflection(stage, intermediate); @@ -729,6 +752,8 @@ bool TReflection::addStage(EShLanguage stage, const TIntermediate& intermediate) function->traverse(&it); } + buildCounterIndices(); + return true; } diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.h b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.h index c80d3ea..fedfbe8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/reflection.h @@ -57,30 +57,35 @@ class TObjectReflection { public: TObjectReflection(const TString& pName, const TType& pType, int pOffset, int pGLDefineType, int pSize, int pIndex) : name(pName), offset(pOffset), - glDefineType(pGLDefineType), size(pSize), index(pIndex), type(pType.clone()) { } - - void dump() const { - printf("%s: offset %d, type %x, size %d, index %d, binding %d\n", - name.c_str(), offset, glDefineType, size, index, getBinding() ); - } + glDefineType(pGLDefineType), size(pSize), index(pIndex), counterIndex(-1), type(pType.clone()) { } const TType* const getType() const { return type; } + int getBinding() const + { + if (type == nullptr || !type->getQualifier().hasBinding()) + return -1; + return type->getQualifier().layoutBinding; + } + void dump() const + { + printf("%s: offset %d, type %x, size %d, index %d, binding %d", + name.c_str(), offset, glDefineType, size, index, getBinding() ); + + if (counterIndex != -1) + printf(", counter %d", counterIndex); + + printf("\n"); + } + static TObjectReflection badReflection() { return TObjectReflection(); } TString name; int offset; int glDefineType; int size; // data size in bytes for a block, array size for a (non-block) object that's an array int index; - - static TObjectReflection badReflection() { return TObjectReflection(); } + int counterIndex; protected: - int getBinding() const { - if (type == nullptr || type->getQualifier().layoutBinding == TQualifier::layoutBindingEnd) - return -1; - return type->getQualifier().layoutBinding; - } - TObjectReflection() : offset(-1), glDefineType(-1), size(-1), index(-1), type(nullptr) { } const TType* type; @@ -140,6 +145,9 @@ public: return it->second; } + // see getIndex(const char*) + int getIndex(const TString& name) const { return getIndex(name.c_str()); } + // Thread local size unsigned getLocalSize(int dim) const { return dim <= 2 ? localSize[dim] : 0; } @@ -148,6 +156,7 @@ public: protected: friend class glslang::TReflectionTraverser; + void buildCounterIndices(); void buildAttributeReflection(EShLanguage, const TIntermediate&); // Need a TString hash: typedef std::unordered_map TNameToIndex; diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Unix/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Unix/CMakeLists.txt index 174cc91..1bf49e1 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Unix/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Unix/CMakeLists.txt @@ -1,5 +1,8 @@ add_library(OSDependent STATIC ossource.cpp ../osinclude.h) set_property(TARGET OSDependent PROPERTY FOLDER glslang) +set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) -install(TARGETS OSDependent - ARCHIVE DESTINATION lib) +if(ENABLE_GLSLANG_INSTALL) + install(TARGETS OSDependent + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif(ENABLE_GLSLANG_INSTALL) diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Unix/ossource.cpp b/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Unix/ossource.cpp index 24b77e1..f59bbce 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Unix/ossource.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Unix/ossource.cpp @@ -43,6 +43,9 @@ #include #include #include +#include +#include +#include namespace glslang { @@ -184,8 +187,18 @@ void ReleaseGlobalLock() pthread_mutex_unlock(&gMutex); } +// #define DUMP_COUNTERS + void OS_DumpMemoryCounters() { +#ifdef DUMP_COUNTERS + struct rusage usage; + + if (getrusage(RUSAGE_SELF, &usage) == 0) + printf("Working set size: %ld\n", usage.ru_maxrss * 1024); +#else + printf("Recompile with DUMP_COUNTERS defined to see counters.\n"); +#endif } } // end namespace glslang diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Windows/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Windows/CMakeLists.txt index 399760c..f257418 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Windows/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/OSDependent/Windows/CMakeLists.txt @@ -2,16 +2,19 @@ set(SOURCES ossource.cpp ../osinclude.h) add_library(OSDependent STATIC ${SOURCES}) set_property(TARGET OSDependent PROPERTY FOLDER glslang) +set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) # MinGW GCC complains about function pointer casts to void*. # Turn that off with -fpermissive. if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") - target_compile_options(OSDependent PRIVATE -fpermissive) + target_compile_options(OSDependent PRIVATE -fpermissive) endif() if(WIN32) source_group("Source" FILES ${SOURCES}) endif(WIN32) -install(TARGETS OSDependent - ARCHIVE DESTINATION lib) +if(ENABLE_GLSLANG_INSTALL) + install(TARGETS OSDependent + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif(ENABLE_GLSLANG_INSTALL) diff --git a/3rdparty/bgfx/3rdparty/glslang/glslang/Public/ShaderLang.h b/3rdparty/bgfx/3rdparty/glslang/glslang/Public/ShaderLang.h index 7ea9446..484906e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/glslang/Public/ShaderLang.h +++ b/3rdparty/bgfx/3rdparty/glslang/glslang/Public/ShaderLang.h @@ -40,6 +40,7 @@ #include "../MachineIndependent/Versions.h" #include +#include #ifdef _WIN32 #define C_DECL __cdecl @@ -67,15 +68,14 @@ #endif // -// Driver must call this first, once, before doing any other -// compiler/linker operations. +// Call before doing any other compiler/linker operations. // // (Call once per process, not once per thread.) // SH_IMPORT_EXPORT int ShInitialize(); // -// Driver should call this at process shutdown. +// Call this at process shutdown to clean up memory. // SH_IMPORT_EXPORT int __fastcall ShFinalize(); @@ -109,7 +109,45 @@ typedef enum { EShSourceNone, EShSourceGlsl, EShSourceHlsl, -} EShSource; // if EShLanguage were EShStage, this could be EShLanguage instead +} EShSource; // if EShLanguage were EShStage, this could be EShLanguage instead + +typedef enum { + EShClientNone, + EShClientVulkan, + EShClientOpenGL, +} EShClient; + +typedef enum { + EShTargetNone, + EShTargetSpv, // preferred spelling + EshTargetSpv = EShTargetSpv, // legacy spelling +} EShTargetLanguage; + +struct TInputLanguage { + EShSource languageFamily; // redundant information with other input, this one overrides when not EShSourceNone + EShLanguage stage; // redundant information with other input, this one overrides when not EShSourceNone + EShClient dialect; + int dialectVersion; // version of client's language definition, not the client (when not EShClientNone) +}; + +struct TClient { + EShClient client; + int version; // version of client itself (not the client's input dialect) +}; + +struct TTarget { + EShTargetLanguage language; + unsigned int version; // the version to target, if SPIR-V, defined by "word 1" of the SPIR-V binary header +}; + +// All source/client/target versions and settings. +// Can override previous methods of setting, when items are set here. +// Expected to grow, as more are added, rather than growing parameter lists. +struct TEnvironment { + TInputLanguage input; // definition of the input language + TClient client; // what client is the overall compilation being done for? + TTarget target; // what to generate +}; const char* StageName(EShLanguage); @@ -133,6 +171,14 @@ typedef enum { EShOptFull, // Optimizations that will take more time } EShOptimizationLevel; +// +// Texture and Sampler transformation mode. +// +typedef enum { + EShTexSampTransKeep, // keep textures and samplers as is (default) + EShTexSampTransUpgradeTextureRemoveSampler, // change texture w/o embeded sampler into sampled texture and throw away all samplers +} EShTextureSamplerTransformMode; + // // Message choices for what errors and warnings are given. // @@ -148,6 +194,7 @@ enum EShMessages { EShMsgCascadingErrors = (1 << 7), // get cascading errors; risks error-recovery issues, instead of an early exit EShMsgKeepUncalled = (1 << 8), // for testing, don't eliminate uncalled functions EShMsgHlslOffsets = (1 << 9), // allow block offsets to follow HLSL rules instead of GLSL rules + EShMsgDebugInfo = (1 << 10), // save debug information }; // @@ -243,7 +290,7 @@ SH_IMPORT_EXPORT int ShGetUniformLocation(const ShHandle uniformMap, const char* // Deferred-Lowering C++ Interface // ----------------------------------- // -// Below is a new alternate C++ interface that might potentially replace the above +// Below is a new alternate C++ interface, which deprecates the above // opaque handle-based interface. // // The below is further designed to handle multiple compilation units per stage, where @@ -277,11 +324,26 @@ bool InitializeProcess(); // Call once per process to tear down everything void FinalizeProcess(); -// Make one TShader per shader that you will link into a program. Then provide -// the shader through setStrings() or setStringsWithLengths(), then call parse(), -// then query the info logs. -// Optionally use setPreamble() to set a special shader string that will be -// processed before all others but won't affect the validity of #version. +// Resource type for IO resolver +enum TResourceType { + EResSampler, + EResTexture, + EResImage, + EResUbo, + EResSsbo, + EResUav, + EResCount +}; + +// Make one TShader per shader that you will link into a program. Then +// - provide the shader through setStrings() or setStringsWithLengths() +// - optionally call setEnv*(), see below for more detail +// - optionally use setPreamble() to set a special shader string that will be +// processed before all others but won't affect the validity of #version +// - call parse(): source language and target environment must be selected +// either by correct setting of EShMessages sent to parse(), or by +// explicitly calling setEnv*() +// - query the info logs // // N.B.: Does not yet support having the same TShader instance being linked into // multiple programs. @@ -299,14 +361,48 @@ public: void setPreamble(const char* s) { preamble = s; } void setEntryPoint(const char* entryPoint); void setSourceEntryPoint(const char* sourceEntryPointName); - void setShiftSamplerBinding(unsigned int base); - void setShiftTextureBinding(unsigned int base); - void setShiftImageBinding(unsigned int base); - void setShiftUboBinding(unsigned int base); - void setShiftSsboBinding(unsigned int base); + void addProcesses(const std::vector&); + + // IO resolver binding data: see comments in ShaderLang.cpp + void setShiftBinding(TResourceType res, unsigned int base); + void setShiftSamplerBinding(unsigned int base); // DEPRECATED: use setShiftBinding + void setShiftTextureBinding(unsigned int base); // DEPRECATED: use setShiftBinding + void setShiftImageBinding(unsigned int base); // DEPRECATED: use setShiftBinding + void setShiftUboBinding(unsigned int base); // DEPRECATED: use setShiftBinding + void setShiftUavBinding(unsigned int base); // DEPRECATED: use setShiftBinding + void setShiftCbufferBinding(unsigned int base); // synonym for setShiftUboBinding + void setShiftSsboBinding(unsigned int base); // DEPRECATED: use setShiftBinding + void setShiftBindingForSet(TResourceType res, unsigned int base, unsigned int set); + void setResourceSetBinding(const std::vector& base); void setAutoMapBindings(bool map); + void setAutoMapLocations(bool map); + void setInvertY(bool invert); + void setHlslIoMapping(bool hlslIoMap); void setFlattenUniformArrays(bool flatten); void setNoStorageFormat(bool useUnknownFormat); + void setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode); + + // For setting up the environment (cleared to nothingness in the constructor). + // These must be called so that parsing is done for the right source language and + // target environment, either indirectly through TranslateEnvironment() based on + // EShMessages et. al., or directly by the user. + void setEnvInput(EShSource lang, EShLanguage envStage, EShClient client, int version) + { + environment.input.languageFamily = lang; + environment.input.stage = envStage; + environment.input.dialect = client; + environment.input.dialectVersion = version; + } + void setEnvClient(EShClient client, int version) + { + environment.client.client = client; + environment.client.version = version; + } + void setEnvTarget(EShTargetLanguage lang, unsigned int version) + { + environment.target.language = lang; + environment.target.version = version; + } // Interface to #include handlers. // @@ -391,6 +487,9 @@ public: virtual void releaseInclude(IncludeResult*) override { } }; + bool parse(const TBuiltInResource*, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, + bool forwardCompatible, EShMessages, Includer&); + bool parse(const TBuiltInResource* res, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages messages) { @@ -398,12 +497,18 @@ public: return parse(res, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, forwardCompatible, messages, includer); } - bool parse(const TBuiltInResource*, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, - bool forwardCompatible, EShMessages, Includer&); - // Equivalent to parse() without a default profile and without forcing defaults. - // Provided for backwards compatibility. - bool parse(const TBuiltInResource*, int defaultVersion, bool forwardCompatible, EShMessages); + bool parse(const TBuiltInResource* builtInResources, int defaultVersion, bool forwardCompatible, EShMessages messages) + { + return parse(builtInResources, defaultVersion, ENoProfile, false, forwardCompatible, messages); + } + + bool parse(const TBuiltInResource* builtInResources, int defaultVersion, bool forwardCompatible, EShMessages messages, + Includer& includer) + { + return parse(builtInResources, defaultVersion, ENoProfile, false, forwardCompatible, messages, includer); + } + bool preprocess(const TBuiltInResource* builtInResources, int defaultVersion, EProfile defaultProfile, bool forceDefaultVersionAndProfile, bool forwardCompatible, EShMessages message, std::string* outputString, @@ -411,8 +516,8 @@ public: const char* getInfoLog(); const char* getInfoDebugLog(); - EShLanguage getStage() const { return stage; } + TIntermediate* getIntermediate() const { return intermediate; } protected: TPoolAllocator* pool; @@ -438,6 +543,8 @@ protected: // a function in the source string can be renamed FROM this TO the name given in setEntryPoint. std::string sourceEntryPointName; + TEnvironment environment; + friend class TProgram; private: @@ -449,9 +556,10 @@ class TIoMapper; // Allows to customize the binding layout after linking. // All used uniform variables will invoke at least validateBinding. -// If validateBinding returned true then the other resolveBinding -// and resolveSet are invoked to resolve the binding and descriptor -// set index respectively. +// If validateBinding returned true then the other resolveBinding, +// resolveSet, and resolveLocation are invoked to resolve the binding +// and descriptor set index respectively. +// // Invocations happen in a particular order: // 1) all shader inputs // 2) all shader outputs @@ -460,6 +568,13 @@ class TIoMapper; // 5) all uniforms with set but no binding defined // 6) all uniforms with no binding and no set defined // +// mapIO will use this resolver in two phases. The first +// phase is a notification phase, calling the corresponging +// notifiy callbacks, this phase ends with a call to endNotifications. +// Phase two starts directly after the call to endNotifications +// and calls all other callbacks to validate and to get the +// bindings, sets, locations, component and color indices. +// // NOTE: that still limit checks are applied to bindings and sets // and may result in an error. class TIoMapResolver @@ -476,6 +591,9 @@ public: // Should return a value >= 0 if the current set should be overridden. // Return -1 if the current set (including no set) should be kept. virtual int resolveSet(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0; + // Should return a value >= 0 if the current location should be overridden. + // Return -1 if the current location (including no location) should be kept. + virtual int resolveUniformLocation(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0; // Should return true if the resulting/current setup would be okay. // Basic idea is to do aliasing checks and reject invalid semantic names. virtual bool validateInOut(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0; @@ -488,6 +606,18 @@ public: // Should return a value >= 0 if the current color index should be overridden. // Return -1 if the current color index (including no index) should be kept. virtual int resolveInOutIndex(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0; + // Notification of a uniform variable + virtual void notifyBinding(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0; + // Notification of a in or out variable + virtual void notifyInOut(EShLanguage stage, const char* name, const TType& type, bool is_live) = 0; + // Called by mapIO when it has finished the notify pass + virtual void endNotifications(EShLanguage stage) = 0; + // Called by mapIO when it starts its notify pass for the given stage + virtual void beginNotifications(EShLanguage stage) = 0; + // Called by mipIO when it starts its resolve pass for the given stage + virtual void beginResolve(EShLanguage stage) = 0; + // Called by mapIO when it has finished the resolve pass + virtual void endResolve(EShLanguage stage) = 0; }; // Make one TProgram per set of shaders that will get linked together. Add all @@ -517,7 +647,9 @@ public: const char* getUniformBlockName(int blockIndex) const; // can be used for glGetActiveUniformBlockName() int getUniformBlockSize(int blockIndex) const; // can be used for glGetActiveUniformBlockiv(UNIFORM_BLOCK_DATA_SIZE) int getUniformIndex(const char* name) const; // can be used for glGetUniformIndices() + int getUniformBinding(int index) const; // returns the binding number int getUniformBlockIndex(int index) const; // can be used for glGetActiveUniformsiv(GL_UNIFORM_BLOCK_INDEX) + int getUniformBlockCounterIndex(int index) const; // returns block index of associated counter. int getUniformType(int index) const; // can be used for glGetActiveUniformsiv(GL_UNIFORM_TYPE) int getUniformBufferOffset(int index) const; // can be used for glGetActiveUniformsiv(GL_UNIFORM_OFFSET) int getUniformArraySize(int index) const; // can be used for glGetActiveUniformsiv(GL_UNIFORM_SIZE) diff --git a/3rdparty/bgfx/3rdparty/glslang/gtests/AST.FromFile.cpp b/3rdparty/bgfx/3rdparty/glslang/gtests/AST.FromFile.cpp index d8a5ef9..5f6de4f 100644 --- a/3rdparty/bgfx/3rdparty/glslang/gtests/AST.FromFile.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/gtests/AST.FromFile.cpp @@ -62,6 +62,7 @@ INSTANTIATE_TEST_CASE_P( "versionsErrors.frag", "versionsErrors.vert", "100.frag", + "100samplerExternal.frag", "120.vert", "120.frag", "130.vert", @@ -77,10 +78,13 @@ INSTANTIATE_TEST_CASE_P( "matrixError.vert", "cppSimple.vert", "cppIndent.vert", + "cppIntMinOverNegativeOne.frag", "cppNest.vert", "cppBad.vert", "cppBad2.vert", "cppComplexExpr.vert", + "cppDeepNest.frag", + "cppPassMacroName.frag", "badChars.frag", "pointCoord.frag", "array.frag", @@ -93,6 +97,7 @@ INSTANTIATE_TEST_CASE_P( "300layout.frag", "300operations.frag", "300block.frag", + "300samplerExternal.frag", "310.comp", "310.vert", "310.geom", @@ -101,10 +106,17 @@ INSTANTIATE_TEST_CASE_P( "310.tese", "310implicitSizeArrayError.vert", "310AofA.vert", + "320.comp", + "320.vert", + "320.geom", + "320.frag", + "320.tesc", + "320.tese", "330.frag", "330comp.frag", "constErrors.frag", "constFold.frag", + "constFoldIntMin.frag", "errors.frag", "forwardRef.frag", "uint.frag", @@ -136,6 +148,7 @@ INSTANTIATE_TEST_CASE_P( "430.vert", "430.comp", "430AofA.frag", + "435.vert", "440.vert", "440.frag", "450.vert", @@ -144,8 +157,11 @@ INSTANTIATE_TEST_CASE_P( "450.tese", "450.frag", "450.comp", + "460.frag", + "460.vert", "dce.frag", "atomic_uint.frag", + "implicitInnerAtomicUint.frag", "aggOps.frag", "always-discard.frag", "always-discard2.frag", @@ -170,12 +186,14 @@ INSTANTIATE_TEST_CASE_P( "matrix2.frag", "newTexture.frag", "Operations.frag", + "overlongLiteral.frag", "prepost.frag", "simpleFunctionCall.frag", "structAssignment.frag", "structDeref.frag", "structure.frag", "swizzle.frag", + "invalidSwizzle.vert", "syntaxError.frag", "test.frag", "texture.frag", diff --git a/3rdparty/bgfx/3rdparty/glslang/gtests/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/gtests/CMakeLists.txt index c383ca0..15b73f4 100644 --- a/3rdparty/bgfx/3rdparty/glslang/gtests/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/gtests/CMakeLists.txt @@ -1,55 +1,59 @@ -if (TARGET gmock) - message(STATUS "Google Mock found - building tests") +if(BUILD_TESTING) + if(TARGET gmock) + message(STATUS "Google Mock found - building tests") - set(TEST_SOURCES - # Framework related source files - ${CMAKE_CURRENT_SOURCE_DIR}/Initializer.h - ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Settings.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Settings.h - ${CMAKE_CURRENT_SOURCE_DIR}/TestFixture.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/TestFixture.h + set(TEST_SOURCES + # Framework related source files + ${CMAKE_CURRENT_SOURCE_DIR}/Initializer.h + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Settings.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Settings.h + ${CMAKE_CURRENT_SOURCE_DIR}/TestFixture.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/TestFixture.h - # Test related source files - ${CMAKE_CURRENT_SOURCE_DIR}/AST.FromFile.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/BuiltInResource.FromFile.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Config.FromFile.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/HexFloat.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Hlsl.FromFile.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.Vk.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Pp.FromFile.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp - # -- Remapper tests - ${CMAKE_CURRENT_SOURCE_DIR}/Remap.FromFile.cpp - ) + # Test related source files + ${CMAKE_CURRENT_SOURCE_DIR}/AST.FromFile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/BuiltInResource.FromFile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Config.FromFile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/HexFloat.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Hlsl.FromFile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Link.FromFile.Vk.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Pp.FromFile.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Spv.FromFile.cpp - add_executable(glslangtests ${TEST_SOURCES}) - set_property(TARGET glslangtests PROPERTY FOLDER tests) - glslang_set_link_args(glslangtests) - install(TARGETS glslangtests - RUNTIME DESTINATION bin) + # -- Remapper tests + ${CMAKE_CURRENT_SOURCE_DIR}/Remap.FromFile.cpp) - set(GLSLANG_TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Test") - # Supply a default test root directory, so that manual testing - # doesn't have to specify the --test-root option in the normal - # case that you want to use the tests from the same source tree. - target_compile_definitions(glslangtests - PRIVATE GLSLANG_TEST_DIRECTORY="${GLSLANG_TEST_DIRECTORY}") - target_include_directories(glslangtests PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${PROJECT_SOURCE_DIR} - ${gmock_SOURCE_DIR}/include - ${gtest_SOURCE_DIR}/include) + add_executable(glslangtests ${TEST_SOURCES}) + set_property(TARGET glslangtests PROPERTY FOLDER tests) + glslang_set_link_args(glslangtests) + if(ENABLE_GLSLANG_INSTALL) + install(TARGETS glslangtests + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif(ENABLE_GLSLANG_INSTALL) - set(LIBRARIES - SPVRemapper glslang OSDependent OGLCompiler glslang - SPIRV glslang-default-resource-limits) - if(ENABLE_HLSL) - set(LIBRARIES ${LIBRARIES} HLSL) - endif(ENABLE_HLSL) - target_link_libraries(glslangtests PRIVATE ${LIBRARIES} gmock) + set(GLSLANG_TEST_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../Test") + # Supply a default test root directory, so that manual testing + # doesn't have to specify the --test-root option in the normal + # case that you want to use the tests from the same source tree. + target_compile_definitions(glslangtests + PRIVATE GLSLANG_TEST_DIRECTORY="${GLSLANG_TEST_DIRECTORY}") + target_include_directories(glslangtests PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${PROJECT_SOURCE_DIR} + ${gmock_SOURCE_DIR}/include + ${gtest_SOURCE_DIR}/include) - add_test(NAME glslang-gtests - COMMAND glslangtests --test-root "${GLSLANG_TEST_DIRECTORY}") + set(LIBRARIES + SPVRemapper glslang OSDependent OGLCompiler glslang + SPIRV glslang-default-resource-limits) + if(ENABLE_HLSL) + set(LIBRARIES ${LIBRARIES} HLSL) + endif(ENABLE_HLSL) + target_link_libraries(glslangtests PRIVATE ${LIBRARIES} gmock) + + add_test(NAME glslang-gtests + COMMAND glslangtests --test-root "${GLSLANG_TEST_DIRECTORY}") + endif() endif() diff --git a/3rdparty/bgfx/3rdparty/glslang/gtests/Hlsl.FromFile.cpp b/3rdparty/bgfx/3rdparty/glslang/gtests/Hlsl.FromFile.cpp index 6bbc16b..42d3061 100644 --- a/3rdparty/bgfx/3rdparty/glslang/gtests/Hlsl.FromFile.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/gtests/Hlsl.FromFile.cpp @@ -59,9 +59,10 @@ std::string FileNameAsCustomTestSuffix( using HlslCompileTest = GlslangTest<::testing::TestWithParam>; using HlslCompileAndFlattenTest = GlslangTest<::testing::TestWithParam>; +using HlslLegalizeTest = GlslangTest<::testing::TestWithParam>; -// Compiling HLSL to SPIR-V under Vulkan semantics. Expected to successfully -// generate both AST and SPIR-V. +// Compiling HLSL to pre-legalized SPIR-V under Vulkan semantics. Expected +// to successfully generate both AST and SPIR-V. TEST_P(HlslCompileTest, FromFile) { loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName, @@ -76,38 +77,87 @@ TEST_P(HlslCompileAndFlattenTest, FromFile) Target::BothASTAndSpv, GetParam().entryPoint); } +// Compiling HLSL to legal SPIR-V under Vulkan semantics. Expected to +// successfully generate SPIR-V. +TEST_P(HlslLegalizeTest, FromFile) +{ + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName, + Source::HLSL, Semantics::Vulkan, + Target::Spv, GetParam().entryPoint, + "/baseLegalResults/", false); +} + // clang-format off INSTANTIATE_TEST_CASE_P( ToSpirv, HlslCompileTest, ::testing::ValuesIn(std::vector{ {"hlsl.amend.frag", "f1"}, + {"hlsl.aliasOpaque.frag", "main"}, {"hlsl.array.frag", "PixelShaderFunction"}, {"hlsl.array.implicit-size.frag", "PixelShaderFunction"}, {"hlsl.array.multidim.frag", "main"}, {"hlsl.assoc.frag", "PixelShaderFunction"}, {"hlsl.attribute.frag", "PixelShaderFunction"}, {"hlsl.attribute.expression.comp", "main"}, + {"hlsl.attributeC11.frag", "main"}, + {"hlsl.attributeGlobalBuffer.frag", "main"}, {"hlsl.basic.comp", "main"}, {"hlsl.basic.geom", "main"}, + {"hlsl.boolConv.vert", "main"}, {"hlsl.buffer.frag", "PixelShaderFunction"}, {"hlsl.calculatelod.dx10.frag", "main"}, {"hlsl.calculatelodunclamped.dx10.frag", "main"}, {"hlsl.cast.frag", "PixelShaderFunction"}, + {"hlsl.cbuffer-identifier.vert", "main"}, + {"hlsl.charLit.vert", "main"}, {"hlsl.clip.frag", "main"}, + {"hlsl.clipdistance-1.frag", "main"}, + {"hlsl.clipdistance-1.geom", "main"}, + {"hlsl.clipdistance-1.vert", "main"}, + {"hlsl.clipdistance-2.frag", "main"}, + {"hlsl.clipdistance-2.geom", "main"}, + {"hlsl.clipdistance-2.vert", "main"}, + {"hlsl.clipdistance-3.frag", "main"}, + {"hlsl.clipdistance-3.geom", "main"}, + {"hlsl.clipdistance-3.vert", "main"}, + {"hlsl.clipdistance-4.frag", "main"}, + {"hlsl.clipdistance-4.geom", "main"}, + {"hlsl.clipdistance-4.vert", "main"}, + {"hlsl.clipdistance-5.frag", "main"}, + {"hlsl.clipdistance-5.vert", "main"}, + {"hlsl.clipdistance-6.frag", "main"}, + {"hlsl.clipdistance-6.vert", "main"}, + {"hlsl.clipdistance-7.frag", "main"}, + {"hlsl.clipdistance-7.vert", "main"}, + {"hlsl.clipdistance-8.frag", "main"}, + {"hlsl.clipdistance-8.vert", "main"}, + {"hlsl.clipdistance-9.frag", "main"}, + {"hlsl.clipdistance-9.vert", "main"}, + {"hlsl.color.hull.tesc", "main"}, {"hlsl.comparison.vec.frag", "main"}, {"hlsl.conditional.frag", "PixelShaderFunction"}, + {"hlsl.constantbuffer.frag", "main"}, + {"hlsl.constructArray.vert", "main"}, {"hlsl.constructexpr.frag", "main"}, + {"hlsl.constructimat.frag", "main"}, {"hlsl.depthGreater.frag", "PixelShaderFunction"}, {"hlsl.depthLess.frag", "PixelShaderFunction"}, {"hlsl.discard.frag", "PixelShaderFunction"}, {"hlsl.doLoop.frag", "PixelShaderFunction"}, {"hlsl.emptystructreturn.frag", "main"}, {"hlsl.emptystructreturn.vert", "main"}, + {"hlsl.emptystruct.init.vert", "main"}, {"hlsl.entry-in.frag", "PixelShaderFunction"}, {"hlsl.entry-out.frag", "PixelShaderFunction"}, + {"hlsl.fraggeom.frag", "main"}, {"hlsl.float1.frag", "PixelShaderFunction"}, {"hlsl.float4.frag", "PixelShaderFunction"}, {"hlsl.flatten.return.frag", "main"}, + {"hlsl.flattenOpaque.frag", "main"}, + {"hlsl.flattenOpaqueInit.vert", "main"}, + {"hlsl.flattenOpaqueInitMix.vert", "main"}, + {"hlsl.flattenSubset.frag", "main"}, + {"hlsl.flattenSubset2.frag", "main"}, {"hlsl.forLoop.frag", "PixelShaderFunction"}, {"hlsl.gather.array.dx10.frag", "main"}, {"hlsl.gather.basic.dx10.frag", "main"}, @@ -123,17 +173,24 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.getdimensions.rw.dx10.frag", "main"}, {"hlsl.getdimensions.dx10.vert", "main"}, {"hlsl.getsampleposition.dx10.frag", "main"}, + {"hlsl.global-const-init.frag", "main"}, + {"hlsl.gs-hs-mix.tesc", "HSMain"}, {"hlsl.domain.1.tese", "main"}, {"hlsl.domain.2.tese", "main"}, {"hlsl.domain.3.tese", "main"}, + {"hlsl.function.frag", "main"}, {"hlsl.hull.1.tesc", "main"}, {"hlsl.hull.2.tesc", "main"}, + {"hlsl.hull.3.tesc", "main"}, + {"hlsl.hull.4.tesc", "main"}, + {"hlsl.hull.5.tesc", "main"}, {"hlsl.hull.void.tesc", "main"}, {"hlsl.hull.ctrlpt-1.tesc", "main"}, {"hlsl.hull.ctrlpt-2.tesc", "main"}, {"hlsl.identifier.sample.frag", "main"}, {"hlsl.if.frag", "PixelShaderFunction"}, {"hlsl.implicitBool.frag", "main"}, + {"hlsl.inf.vert", "main"}, {"hlsl.inoutquals.frag", "main"}, {"hlsl.init.frag", "ShaderFunction"}, {"hlsl.init2.frag", "main"}, @@ -155,6 +212,7 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.intrinsics.promote.down.frag", "main"}, {"hlsl.intrinsics.promote.outputs.frag", "main"}, {"hlsl.layout.frag", "main"}, + {"hlsl.layoutOverride.vert", "main"}, {"hlsl.load.2dms.dx10.frag", "main"}, {"hlsl.load.array.dx10.frag", "main"}, {"hlsl.load.basic.dx10.frag", "main"}, @@ -166,25 +224,39 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.load.rwtexture.array.dx10.frag", "main"}, {"hlsl.load.offset.dx10.frag", "main"}, {"hlsl.load.offsetarray.dx10.frag", "main"}, + {"hlsl.localStructuredBuffer.comp", "main"}, {"hlsl.logical.binary.frag", "main"}, {"hlsl.logical.binary.vec.frag", "main"}, {"hlsl.logicalConvert.frag", "main"}, {"hlsl.logical.unary.frag", "main"}, + {"hlsl.loopattr.frag", "main"}, + {"hlsl.matpack-pragma.frag", "main"}, + {"hlsl.mip.operator.frag", "main"}, + {"hlsl.mip.negative.frag", "main"}, + {"hlsl.mip.negative2.frag", "main"}, {"hlsl.namespace.frag", "main"}, {"hlsl.nonint-index.frag", "main"}, {"hlsl.matNx1.frag", "main"}, + {"hlsl.matpack-1.frag", "main"}, {"hlsl.matrixSwizzle.vert", "ShaderFunction"}, + {"hlsl.memberFunCall.frag", "main"}, {"hlsl.mintypes.frag", "main"}, + {"hlsl.mul-truncate.frag", "main"}, {"hlsl.multiEntry.vert", "RealEntrypoint"}, {"hlsl.multiReturn.frag", "main"}, {"hlsl.matrixindex.frag", "main"}, {"hlsl.nonstaticMemberFunction.frag", "main"}, {"hlsl.numericsuffixes.frag", "main"}, - {"hlsl.numthreads.comp", "main_aux1"}, + {"hlsl.numthreads.comp", "main_aux2"}, {"hlsl.overload.frag", "PixelShaderFunction"}, + {"hlsl.opaque-type-bug.frag", "main"}, {"hlsl.params.default.frag", "main"}, {"hlsl.params.default.negative.frag", "main"}, {"hlsl.partialInit.frag", "PixelShaderFunction"}, + {"hlsl.partialFlattenLocal.vert", "main"}, + {"hlsl.PointSize.geom", "main"}, + {"hlsl.PointSize.vert", "main"}, + {"hlsl.pp.vert", "main"}, {"hlsl.pp.line.frag", "main"}, {"hlsl.precise.frag", "main"}, {"hlsl.promote.atomic.frag", "main"}, @@ -207,8 +279,11 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.samplebias.offsetarray.dx10.frag", "main"}, {"hlsl.samplecmp.array.dx10.frag", "main"}, {"hlsl.samplecmp.basic.dx10.frag", "main"}, + {"hlsl.samplecmp.dualmode.frag", "main"}, {"hlsl.samplecmp.offset.dx10.frag", "main"}, {"hlsl.samplecmp.offsetarray.dx10.frag", "main"}, + {"hlsl.samplecmp.negative.frag", "main"}, + {"hlsl.samplecmp.negative2.frag", "main"}, {"hlsl.samplecmplevelzero.array.dx10.frag", "main"}, {"hlsl.samplecmplevelzero.basic.dx10.frag", "main"}, {"hlsl.samplecmplevelzero.offset.dx10.frag", "main"}, @@ -229,7 +304,9 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.semicolons.frag", "main"}, {"hlsl.shapeConv.frag", "main"}, {"hlsl.shapeConvRet.frag", "main"}, + {"hlsl.snorm.uav.comp", "main"}, {"hlsl.staticMemberFunction.frag", "main"}, + {"hlsl.store.rwbyteaddressbuffer.type.comp", "main"}, {"hlsl.stringtoken.frag", "main"}, {"hlsl.string.frag", "main"}, {"hlsl.struct.split-1.vert", "main"}, @@ -242,15 +319,25 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.structarray.flatten.frag", "main"}, {"hlsl.structarray.flatten.geom", "main"}, {"hlsl.structbuffer.frag", "main"}, + {"hlsl.structbuffer.append.frag", "main"}, + {"hlsl.structbuffer.append.fn.frag", "main"}, {"hlsl.structbuffer.atomics.frag", "main"}, {"hlsl.structbuffer.byte.frag", "main"}, {"hlsl.structbuffer.coherent.frag", "main"}, + {"hlsl.structbuffer.floatidx.comp", "main"}, + {"hlsl.structbuffer.incdec.frag", "main"}, {"hlsl.structbuffer.fn.frag", "main"}, + {"hlsl.structbuffer.fn2.comp", "main"}, {"hlsl.structbuffer.rw.frag", "main"}, {"hlsl.structbuffer.rwbyte.frag", "main"}, {"hlsl.structin.vert", "main"}, {"hlsl.structIoFourWay.frag", "main"}, {"hlsl.structStructName.frag", "main"}, + {"hlsl.subpass.frag", "main"}, + {"hlsl.synthesizeInput.frag", "main"}, + {"hlsl.texturebuffer.frag", "main"}, + {"hlsl.texture.struct.frag", "main"}, + {"hlsl.texture.subvec4.frag", "main"}, {"hlsl.this.frag", "main"}, {"hlsl.intrinsics.vert", "VertexShaderFunction"}, {"hlsl.intrinsic.frexp.vert", "VertexShaderFunction"}, @@ -258,23 +345,30 @@ INSTANTIATE_TEST_CASE_P( {"hlsl.matType.bool.frag", "main"}, {"hlsl.matType.int.frag", "main"}, {"hlsl.max.frag", "PixelShaderFunction"}, + {"hlsl.preprocessor.frag", "main"}, {"hlsl.precedence.frag", "PixelShaderFunction"}, {"hlsl.precedence2.frag", "PixelShaderFunction"}, + {"hlsl.scalar2matrix.frag", "main"}, {"hlsl.semantic.geom", "main"}, {"hlsl.semantic.vert", "main"}, + {"hlsl.semantic-1.vert", "main"}, {"hlsl.scope.frag", "PixelShaderFunction"}, {"hlsl.sin.frag", "PixelShaderFunction"}, {"hlsl.struct.frag", "PixelShaderFunction"}, {"hlsl.switch.frag", "PixelShaderFunction"}, {"hlsl.swizzle.frag", "PixelShaderFunction"}, + {"hlsl.target.frag", "main"}, + {"hlsl.targetStruct1.frag", "main"}, + {"hlsl.targetStruct2.frag", "main"}, {"hlsl.templatetypes.frag", "PixelShaderFunction"}, {"hlsl.tx.bracket.frag", "main"}, + {"hlsl.tx.overload.frag", "main"}, {"hlsl.type.half.frag", "main"}, {"hlsl.type.identifier.frag", "main"}, {"hlsl.typeGraphCopy.vert", "main"}, {"hlsl.typedef.frag", "PixelShaderFunction"}, {"hlsl.whileLoop.frag", "PixelShaderFunction"}, - {"hlsl.void.frag", "PixelShaderFunction"}, + {"hlsl.void.frag", "PixelShaderFunction"} }), FileNameAsCustomTestSuffix ); @@ -285,10 +379,30 @@ INSTANTIATE_TEST_CASE_P( ToSpirv, HlslCompileAndFlattenTest, ::testing::ValuesIn(std::vector{ {"hlsl.array.flatten.frag", "main"}, + {"hlsl.partialFlattenMixed.vert", "main"}, }), FileNameAsCustomTestSuffix ); - // clang-format on + +#ifdef ENABLE_OPT +// clang-format off +INSTANTIATE_TEST_CASE_P( + ToSpirv, HlslLegalizeTest, + ::testing::ValuesIn(std::vector{ + {"hlsl.aliasOpaque.frag", "main"}, + {"hlsl.flattenOpaque.frag", "main"}, + {"hlsl.flattenOpaqueInit.vert", "main"}, + {"hlsl.flattenOpaqueInitMix.vert", "main"}, + {"hlsl.flattenSubset.frag", "main"}, + {"hlsl.flattenSubset2.frag", "main"}, + {"hlsl.partialFlattenLocal.vert", "main"}, + {"hlsl.partialFlattenMixed.vert", "main"} + }), + FileNameAsCustomTestSuffix +); +// clang-format on +#endif + } // anonymous namespace } // namespace glslangtest diff --git a/3rdparty/bgfx/3rdparty/glslang/gtests/Link.FromFile.Vk.cpp b/3rdparty/bgfx/3rdparty/glslang/gtests/Link.FromFile.Vk.cpp index 6ce1fe9..6e1969a 100644 --- a/3rdparty/bgfx/3rdparty/glslang/gtests/Link.FromFile.Vk.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/gtests/Link.FromFile.Vk.cpp @@ -60,6 +60,7 @@ TEST_P(LinkTestVulkan, FromFile) shaders.emplace_back( new glslang::TShader(GetShaderStage(GetSuffix(fileNames[i])))); auto* shader = shaders.back().get(); + shader->setAutoMapLocations(true); compile(shader, contents, "", controls); result.shaderResults.push_back( {fileNames[i], shader->getInfoLog(), shader->getInfoDebugLog()}); diff --git a/3rdparty/bgfx/3rdparty/glslang/gtests/Remap.FromFile.cpp b/3rdparty/bgfx/3rdparty/glslang/gtests/Remap.FromFile.cpp index 9f25a6f..50bce8e 100644 --- a/3rdparty/bgfx/3rdparty/glslang/gtests/Remap.FromFile.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/gtests/Remap.FromFile.cpp @@ -89,6 +89,7 @@ INSTANTIATE_TEST_CASE_P( { "remap.basic.everything.frag", "main", Source::GLSL, spv::spirvbin_t::DO_EVERYTHING }, { "remap.basic.dcefunc.frag", "main", Source::GLSL, spv::spirvbin_t::DCE_FUNCS }, { "remap.basic.strip.frag", "main", Source::GLSL, spv::spirvbin_t::STRIP }, + { "remap.specconst.comp", "main", Source::GLSL, spv::spirvbin_t::DO_EVERYTHING }, { "remap.switch.none.frag", "main", Source::GLSL, spv::spirvbin_t::NONE }, { "remap.switch.everything.frag", "main", Source::GLSL, spv::spirvbin_t::DO_EVERYTHING }, { "remap.literal64.none.spv", "main", Source::GLSL, spv::spirvbin_t::NONE }, diff --git a/3rdparty/bgfx/3rdparty/glslang/gtests/Spv.FromFile.cpp b/3rdparty/bgfx/3rdparty/glslang/gtests/Spv.FromFile.cpp index a8d4b01..c11f5b8 100644 --- a/3rdparty/bgfx/3rdparty/glslang/gtests/Spv.FromFile.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/gtests/Spv.FromFile.cpp @@ -75,6 +75,7 @@ using CompileVulkanToSpirvTestAMD = GlslangTest<::testing::TestWithParam>; #endif +using CompileUpgradeTextureToSampledTextureAndDropSamplersTest = GlslangTest<::testing::TestWithParam>; // Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully // generate SPIR-V. @@ -172,6 +173,15 @@ TEST_P(CompileVulkanToSpirvTestNV, FromFile) } #endif +TEST_P(CompileUpgradeTextureToSampledTextureAndDropSamplersTest, FromFile) +{ + loadCompileUpgradeTextureToSampledTextureAndDropSamplersAndCheck(GlobalTestSettings.testRoot, + GetParam(), + Source::GLSL, + Semantics::Vulkan, + Target::Spv); +} + // clang-format off INSTANTIATE_TEST_CASE_P( Glsl, CompileVulkanToSpirvTest, @@ -179,6 +189,7 @@ INSTANTIATE_TEST_CASE_P( // Test looping constructs. // No tests yet for making sure break and continue from a nested loop // goes to the innermost target. + "spv.barrier.vert", "spv.do-simple.vert", "spv.do-while-continue-break.vert", "spv.for-complex-condition.vert", @@ -216,11 +227,15 @@ INSTANTIATE_TEST_CASE_P( "spv.aggOps.frag", "spv.always-discard.frag", "spv.always-discard2.frag", + "spv.arbPostDepthCoverage.frag", + "spv.arbPostDepthCoverage_Error.frag", "spv.bitCast.frag", "spv.bool.vert", "spv.boolInBlock.frag", "spv.branch-return.vert", + "spv.builtInXFB.vert", "spv.conditionalDiscard.frag", + "spv.controlFlowAttributes.frag", "spv.conversion.frag", "spv.dataOut.frag", "spv.dataOutIndirect.frag", @@ -232,9 +247,12 @@ INSTANTIATE_TEST_CASE_P( "spv.drawParams.vert", "spv.doWhileLoop.frag", "spv.earlyReturnDiscard.frag", + "spv.extPostDepthCoverage.frag", + "spv.extPostDepthCoverage_Error.frag", "spv.flowControl.frag", "spv.forLoop.frag", "spv.forwardFun.frag", + "spv.fullyCovered.frag", "spv.functionCall.frag", "spv.functionNestedOpaque.vert", "spv.functionSemantics.frag", @@ -261,13 +279,19 @@ INSTANTIATE_TEST_CASE_P( "spv.noWorkgroup.comp", "spv.offsets.frag", "spv.Operations.frag", + "spv.paramMemory.frag", "spv.precision.frag", + "spv.precisionNonESSamp.frag", "spv.prepost.frag", "spv.qualifiers.vert", + "spv.sample.frag", + "spv.sampleId.frag", + "spv.samplePosition.frag", "spv.sampleMaskOverrideCoverage.frag", "spv.shaderBallot.comp", "spv.shaderDrawParams.vert", "spv.shaderGroupVote.comp", + "spv.shaderStencilExport.frag", "spv.shiftOps.frag", "spv.simpleFunctionCall.frag", "spv.simpleMat.vert", @@ -283,6 +307,7 @@ INSTANTIATE_TEST_CASE_P( "spv.test.vert", "spv.texture.frag", "spv.texture.vert", + "spv.textureBuffer.vert", "spv.image.frag", "spv.types.frag", "spv.uint.frag", @@ -303,8 +328,12 @@ INSTANTIATE_TEST_CASE_P( "spv.specConstant.comp", "spv.specConstantComposite.vert", "spv.specConstantOperations.vert", + "spv.storageBuffer.vert", "spv.precise.tese", "spv.precise.tesc", + "spv.xfb.vert", + "spv.xfb2.vert", + "spv.xfb3.vert", })), FileNameAsCustomTestSuffix ); @@ -316,10 +345,12 @@ INSTANTIATE_TEST_CASE_P( { "spv.register.autoassign.frag", "main_ep", 5, 10, 0, 20, 30, true, false }, { "spv.register.noautoassign.frag", "main_ep", 5, 10, 0, 15, 30, false, false }, { "spv.register.autoassign-2.frag", "main", 5, 10, 0, 15, 30, true, true }, + { "spv.register.subpass.frag", "main", 0, 20, 0, 0, 0, true, true }, { "spv.buffer.autoassign.frag", "main", 5, 10, 0, 15, 30, true, true }, { "spv.ssbo.autoassign.frag", "main", 5, 10, 0, 15, 30, true, true }, + { "spv.ssboAlias.frag", "main", 0, 0, 0, 0, 83, true, false }, { "spv.rw.autoassign.frag", "main", 5, 10, 20, 15, 30, true, true }, - { "spv.register.autoassign.rangetest.frag", "main", + { "spv.register.autoassign.rangetest.frag", "main", glslang::TQualifier::layoutBindingEnd-2, glslang::TQualifier::layoutBindingEnd+5, 20, 30, true, false }, @@ -341,9 +372,13 @@ INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P( Glsl, CompileOpenGLToSpirvTest, ::testing::ValuesIn(std::vector({ + "spv.460.frag", + "spv.460.vert", + "spv.460.comp", "spv.atomic.comp", "spv.glFragColor.frag", "spv.specConst.vert", + "spv.OVR_multiview.vert", })), FileNameAsCustomTestSuffix ); @@ -383,7 +418,11 @@ INSTANTIATE_TEST_CASE_P( Glsl, CompileVulkanToSpirvTestAMD, ::testing::ValuesIn(std::vector({ "spv.float16.frag", - "spv.shaderBallotAMD.comp" + "spv.imageLoadStoreLod.frag", + "spv.int16.frag", + "spv.shaderBallotAMD.comp", + "spv.shaderFragMaskAMD.frag", + "spv.textureGatherBiasLod.frag", })), FileNameAsCustomTestSuffix ); @@ -401,10 +440,19 @@ INSTANTIATE_TEST_CASE_P( "spv.stereoViewRendering.tesc", "spv.multiviewPerViewAttributes.vert", "spv.multiviewPerViewAttributes.tesc", + "spv.atomicInt64.comp", })), FileNameAsCustomTestSuffix ); #endif + +INSTANTIATE_TEST_CASE_P( + Glsl, CompileUpgradeTextureToSampledTextureAndDropSamplersTest, + ::testing::ValuesIn(std::vector({ + "spv.texture.sampler.transform.frag", + })), + FileNameAsCustomTestSuffix +); // clang-format on } // anonymous namespace diff --git a/3rdparty/bgfx/3rdparty/glslang/gtests/TestFixture.h b/3rdparty/bgfx/3rdparty/glslang/gtests/TestFixture.h index 38ec54c..2dac99b 100644 --- a/3rdparty/bgfx/3rdparty/glslang/gtests/TestFixture.h +++ b/3rdparty/bgfx/3rdparty/glslang/gtests/TestFixture.h @@ -197,11 +197,15 @@ public: GlslangResult compileAndLink( const std::string shaderName, const std::string& code, const std::string& entryPointName, EShMessages controls, - bool flattenUniformArrays = false) + bool flattenUniformArrays = false, + EShTextureSamplerTransformMode texSampTransMode = EShTexSampTransKeep, + bool disableOptimizer = true) { const EShLanguage kind = GetShaderStage(GetSuffix(shaderName)); glslang::TShader shader(kind); + shader.setAutoMapLocations(true); + shader.setTextureSamplerTransformMode(texSampTransMode); shader.setFlattenUniformArrays(flattenUniformArrays); bool success = compile(&shader, code, entryPointName, controls); @@ -214,8 +218,10 @@ public: if (success && (controls & EShMsgSpvRules)) { std::vector spirv_binary; + glslang::SpvOptions options; + options.disableOptimizer = disableOptimizer; glslang::GlslangToSpv(*program.getIntermediate(kind), - spirv_binary, &logger); + spirv_binary, &logger, &options); std::ostringstream disassembly_stream; spv::Parameterize(); @@ -254,6 +260,7 @@ public: shader.setShiftUboBinding(baseUboBinding); shader.setShiftSsboBinding(baseSsboBinding); shader.setAutoMapBindings(autoMapBindings); + shader.setAutoMapLocations(true); shader.setFlattenUniformArrays(flattenUniformArrays); bool success = compile(&shader, code, entryPointName, controls); @@ -295,6 +302,8 @@ public: const EShLanguage kind = GetShaderStage(GetSuffix(shaderName)); glslang::TShader shader(kind); + shader.setAutoMapLocations(true); + bool success = compile(&shader, code, entryPointName, controls); glslang::TProgram program; @@ -375,18 +384,20 @@ public: Source source, Semantics semantics, Target target, - const std::string& entryPointName="") + const std::string& entryPointName="", + const std::string& baseDir="/baseResults/", + const bool disableOptimizer = true) { const std::string inputFname = testDir + "/" + testName; const std::string expectedOutputFname = - testDir + "/baseResults/" + testName + ".out"; + testDir + baseDir + testName + ".out"; std::string input, expectedOutput; tryLoadFile(inputFname, "input", &input); tryLoadFile(expectedOutputFname, "expected output", &expectedOutput); const EShMessages controls = DeriveOptions(source, semantics, target); - GlslangResult result = compileAndLink(testName, input, entryPointName, controls); + GlslangResult result = compileAndLink(testName, input, entryPointName, controls, false, EShTexSampTransKeep, disableOptimizer); // Generate the hybrid output in the way of glslangValidator. std::ostringstream stream; @@ -566,6 +577,31 @@ public: expectedErrorFname); } + void loadCompileUpgradeTextureToSampledTextureAndDropSamplersAndCheck(const std::string& testDir, + const std::string& testName, + Source source, + Semantics semantics, + Target target, + const std::string& entryPointName = "") + { + const std::string inputFname = testDir + "/" + testName; + const std::string expectedOutputFname = testDir + "/baseResults/" + testName + ".out"; + std::string input, expectedOutput; + + tryLoadFile(inputFname, "input", &input); + tryLoadFile(expectedOutputFname, "expected output", &expectedOutput); + + const EShMessages controls = DeriveOptions(source, semantics, target); + GlslangResult result = compileAndLink(testName, input, entryPointName, controls, false, EShTexSampTransUpgradeTextureRemoveSampler); + + // Generate the hybrid output in the way of glslangValidator. + std::ostringstream stream; + outputResultToStream(&stream, result, controls); + + checkEqAndUpdateIfRequested(expectedOutput, stream.str(), + expectedOutputFname); + } + private: const int defaultVersion; const EProfile defaultProfile; diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/CMakeLists.txt b/3rdparty/bgfx/3rdparty/glslang/hlsl/CMakeLists.txt index ec5f1a5..98dfad7 100755 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/CMakeLists.txt +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/CMakeLists.txt @@ -7,7 +7,7 @@ set(SOURCES hlslGrammar.cpp hlslParseables.cpp) - set(HEADERS +set(HEADERS hlslAttributes.h hlslParseHelper.h hlslTokens.h @@ -19,10 +19,13 @@ set(SOURCES add_library(HLSL STATIC ${SOURCES} ${HEADERS}) set_property(TARGET HLSL PROPERTY FOLDER hlsl) +set_property(TARGET HLSL PROPERTY POSITION_INDEPENDENT_CODE ON) if(WIN32) source_group("Source" FILES ${SOURCES} ${HEADERS}) endif(WIN32) -install(TARGETS HLSL - ARCHIVE DESTINATION lib) +if(ENABLE_GLSLANG_INSTALL) + install(TARGETS HLSL + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif(ENABLE_GLSLANG_INSTALL) diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslAttributes.cpp b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslAttributes.cpp index df37046..261cec3 100644 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslAttributes.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslAttributes.cpp @@ -34,77 +34,73 @@ // #include "hlslAttributes.h" -#include -#include +#include "hlslParseHelper.h" namespace glslang { // Map the given string to an attribute enum from TAttributeType, // or EatNone if invalid. - TAttributeType TAttributeMap::attributeFromName(const TString& name) + TAttributeType HlslParseContext::attributeFromName(const TString& nameSpace, const TString& name) const { - // These are case insensitive. - TString lowername(name); - std::transform(lowername.begin(), lowername.end(), lowername.begin(), ::tolower); + // handle names within a namespace - if (lowername == "allow_uav_condition") + if (nameSpace == "vk") { + if (name == "input_attachment_index") + return EatInputAttachment; + else if (name == "location") + return EatLocation; + else if (name == "binding") + return EatBinding; + else if (name == "global_cbuffer_binding") + return EatGlobalBinding; + else if (name == "builtin") + return EatBuiltIn; + else if (name == "constant_id") + return EatConstantId; + else if (name == "push_constant") + return EatPushConstant; + } else if (nameSpace.size() > 0) + return EatNone; + + // handle names with no namespace + + if (name == "allow_uav_condition") return EatAllow_uav_condition; - else if (lowername == "branch") + else if (name == "branch") return EatBranch; - else if (lowername == "call") + else if (name == "call") return EatCall; - else if (lowername == "domain") + else if (name == "domain") return EatDomain; - else if (lowername == "earlydepthstencil") + else if (name == "earlydepthstencil") return EatEarlyDepthStencil; - else if (lowername == "fastopt") + else if (name == "fastopt") return EatFastOpt; - else if (lowername == "flatten") + else if (name == "flatten") return EatFlatten; - else if (lowername == "forcecase") + else if (name == "forcecase") return EatForceCase; - else if (lowername == "instance") + else if (name == "instance") return EatInstance; - else if (lowername == "maxtessfactor") + else if (name == "maxtessfactor") return EatMaxTessFactor; - else if (lowername == "maxvertexcount") + else if (name == "maxvertexcount") return EatMaxVertexCount; - else if (lowername == "numthreads") + else if (name == "numthreads") return EatNumThreads; - else if (lowername == "outputcontrolpoints") + else if (name == "outputcontrolpoints") return EatOutputControlPoints; - else if (lowername == "outputtopology") + else if (name == "outputtopology") return EatOutputTopology; - else if (lowername == "partitioning") + else if (name == "partitioning") return EatPartitioning; - else if (lowername == "patchconstantfunc") + else if (name == "patchconstantfunc") return EatPatchConstantFunc; - else if (lowername == "unroll") + else if (name == "unroll") return EatUnroll; + else if (name == "loop") + return EatLoop; else return EatNone; } - // Look up entry, inserting if it's not there, and if name is a valid attribute name - // as known by attributeFromName. - TAttributeType TAttributeMap::setAttribute(const TString* name, TIntermAggregate* value) - { - if (name == nullptr) - return EatNone; - - const TAttributeType attr = attributeFromName(*name); - - if (attr != EatNone) - attributes[attr] = value; - - return attr; - } - - // Look up entry (const version), and return aggregate node. This cannot change the map. - const TIntermAggregate* TAttributeMap::operator[](TAttributeType attr) const - { - const auto entry = attributes.find(attr); - - return (entry == attributes.end()) ? nullptr : entry->second; - } - } // end namespace glslang diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslAttributes.h b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslAttributes.h index ad44d2a..b1cc037 100644 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslAttributes.h +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslAttributes.h @@ -38,71 +38,22 @@ #include #include + +#include "../glslang/MachineIndependent/attribute.h" +#include "../glslang/MachineIndependent/SymbolTable.h" #include "hlslScanContext.h" -#include "../glslang/Include/Common.h" namespace glslang { - enum TAttributeType { - EatNone, - EatAllow_uav_condition, - EatBranch, - EatCall, - EatDomain, - EatEarlyDepthStencil, - EatFastOpt, - EatFlatten, - EatForceCase, - EatInstance, - EatMaxTessFactor, - EatNumThreads, - EatMaxVertexCount, - EatOutputControlPoints, - EatOutputTopology, - EatPartitioning, - EatPatchConstantFunc, - EatPatchSize, - EatUnroll, - }; -} - -namespace std { - // Allow use of TAttributeType enum in hash_map without calling code having to cast. - template <> struct hash { - std::size_t operator()(glslang::TAttributeType attr) const { - return std::hash()(int(attr)); - } - }; -} // end namespace std - -namespace glslang { - class TIntermAggregate; - - class TAttributeMap { - public: - // Search for and potentially add the attribute into the map. Return the - // attribute type enum for it, if found, else EatNone. - TAttributeType setAttribute(const TString* name, TIntermAggregate* value); - - // Const lookup: search for (but do not modify) the attribute in the map. - const TIntermAggregate* operator[](TAttributeType) const; - - protected: - // Find an attribute enum given its name. - static TAttributeType attributeFromName(const TString&); - - std::unordered_map attributes; - }; class TFunctionDeclarator { public: TFunctionDeclarator() : function(nullptr), body(nullptr) { } TSourceLoc loc; TFunction* function; - TAttributeMap attributes; + TAttributes attributes; TVector* body; }; } // end namespace glslang - #endif // HLSLATTRIBUTES_H_ diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.cpp b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.cpp index b8932ce..57e34d1 100755 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.cpp @@ -107,26 +107,14 @@ bool HlslGrammar::acceptIdentifier(HlslToken& idToken) // valid identifier, nor is "linear". This code special cases the known instances of this, so // e.g, "int sample;" or "float float;" is accepted. Other cases can be added here if needed. - TString* idString = nullptr; - switch (peek()) { - case EHTokSample: idString = NewPoolTString("sample"); break; - case EHTokHalf: idString = NewPoolTString("half"); break; - case EHTokBool: idString = NewPoolTString("bool"); break; - case EHTokFloat: idString = NewPoolTString("float"); break; - case EHTokDouble: idString = NewPoolTString("double"); break; - case EHTokInt: idString = NewPoolTString("int"); break; - case EHTokUint: idString = NewPoolTString("uint"); break; - case EHTokMin16float: idString = NewPoolTString("min16float"); break; - case EHTokMin10float: idString = NewPoolTString("min10float"); break; - case EHTokMin16int: idString = NewPoolTString("min16int"); break; - case EHTokMin12int: idString = NewPoolTString("min12int"); break; - default: + const char* idString = getTypeString(peek()); + if (idString == nullptr) return false; - } - token.string = idString; + token.string = NewPoolTString(idString); token.tokenClass = EHTokIdentifier; - idToken = token; + idToken = token; + typeIdentifiers = true; advanceToken(); @@ -307,12 +295,16 @@ bool HlslGrammar::acceptSamplerDeclarationDX9(TType& /*type*/) } // declaration +// : attributes attributed_declaration +// | NAMESPACE IDENTIFIER LEFT_BRACE declaration_list RIGHT_BRACE +// +// attributed_declaration // : sampler_declaration_dx9 post_decls SEMICOLON -// | fully_specified_type declarator_list SEMICOLON +// | fully_specified_type // for cbuffer/tbuffer +// | fully_specified_type declarator_list SEMICOLON // for non cbuffer/tbuffer // | fully_specified_type identifier function_parameters post_decls compound_statement // function definition // | fully_specified_type identifier sampler_state post_decls compound_statement // sampler definition // | typedef declaration -// | NAMESPACE IDENTIFIER LEFT_BRACE declaration_list RIGHT_BRACE // // declarator_list // : declarator COMMA declarator COMMA declarator... // zero or more declarators @@ -382,20 +374,31 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) // if (acceptSamplerDeclarationDX9(declaredType)) // return true; + bool forbidDeclarators = (peekTokenClass(EHTokCBuffer) || peekTokenClass(EHTokTBuffer)); // fully_specified_type - if (! acceptFullySpecifiedType(declaredType, nodeList)) + if (! acceptFullySpecifiedType(declaredType, nodeList, declarator.attributes, forbidDeclarators)) return false; - // identifier + // cbuffer and tbuffer end with the closing '}'. + // No semicolon is included. + if (forbidDeclarators) + return true; + + // declarator_list + // : declarator + // : identifier HlslToken idToken; TIntermAggregate* initializers = nullptr; while (acceptIdentifier(idToken)) { - const TString *fullName = idToken.string; + TString *fullName = idToken.string; if (parseContext.symbolTable.atGlobalLevel()) parseContext.getFullNamespaceName(fullName); if (peekTokenClass(EHTokLeftParen)) { // looks like function parameters + // merge in the attributes into the return type + parseContext.transferTypeAttributes(token.loc, declarator.attributes, declaredType, true); + // Potentially rename shader entry point function. No-op most of the time. parseContext.renameShaderFunction(fullName); @@ -423,7 +426,13 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) parseContext.handleFunctionDeclarator(declarator.loc, *declarator.function, true); } } else { - // A variable declaration. Fix the storage qualifier if it's a global. + // A variable declaration. + + // merge in the attributes, the first time around, into the shared type + if (! declarator_list) + parseContext.transferTypeAttributes(token.loc, declarator.attributes, declaredType); + + // Fix the storage qualifier if it's a global. if (declaredType.getQualifier().storage == EvqTemporary && parseContext.symbolTable.atGlobalLevel()) declaredType.getQualifier().storage = EvqUniform; @@ -475,9 +484,13 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) if (variableType.getBasicType() != EbtString && parseContext.getAnnotationNestingLevel() == 0) { if (typedefDecl) parseContext.declareTypedef(idToken.loc, *fullName, variableType); - else if (variableType.getBasicType() == EbtBlock) - parseContext.declareBlock(idToken.loc, variableType, fullName); - else { + else if (variableType.getBasicType() == EbtBlock) { + if (expressionNode) + parseContext.error(idToken.loc, "buffer aliasing not yet supported", "block initializer", ""); + parseContext.declareBlock(idToken.loc, variableType, fullName, + variableType.isArray() ? &variableType.getArraySizes() : nullptr); + parseContext.declareStructBufferCounter(idToken.loc, variableType, *fullName); + } else { if (variableType.getQualifier().storage == EvqUniform && ! variableType.containsOpaque()) { // this isn't really an individual variable, but a member of the $Global buffer parseContext.growGlobalUniformBlock(idToken.loc, variableType, *fullName); @@ -493,11 +506,10 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) } } - if (acceptTokenClass(EHTokComma)) { + // COMMA + if (acceptTokenClass(EHTokComma)) declarator_list = true; - continue; - } - }; + } // The top-level initializer node is a sequence. if (initializers != nullptr) @@ -515,12 +527,13 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) // was actually an assignment such as "float = 4", where "float" is an identifier. // We put the token back to let further parsing happen for cases where that may // happen. This errors on the side of caution, and mostly triggers the error. - - if (peek() == EHTokAssign || peek() == EHTokLeftBracket || peek() == EHTokDot || peek() == EHTokComma) + if (peek() == EHTokAssign || peek() == EHTokLeftBracket || peek() == EHTokDot || peek() == EHTokComma) { recedeToken(); - else + return false; + } else { expected(";"); - return false; + return false; + } } return true; @@ -532,12 +545,16 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList) bool HlslGrammar::acceptControlDeclaration(TIntermNode*& node) { node = nullptr; + TAttributes attributes; // fully_specified_type TType type; - if (! acceptFullySpecifiedType(type)) + if (! acceptFullySpecifiedType(type, attributes)) return false; + if (attributes.size() > 0) + parseContext.warn(token.loc, "attributes don't apply to control declaration", "", ""); + // filter out type casts if (peekTokenClass(EHTokLeftParen)) { recedeToken(); @@ -573,12 +590,12 @@ bool HlslGrammar::acceptControlDeclaration(TIntermNode*& node) // : type_specifier // | type_qualifier type_specifier // -bool HlslGrammar::acceptFullySpecifiedType(TType& type) +bool HlslGrammar::acceptFullySpecifiedType(TType& type, const TAttributes& attributes) { TIntermNode* nodeList = nullptr; - return acceptFullySpecifiedType(type, nodeList); + return acceptFullySpecifiedType(type, nodeList, attributes); } -bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList) +bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList, const TAttributes& attributes, bool forbidDeclarators) { // type_qualifier TQualifier qualifier; @@ -597,11 +614,18 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList) return false; } + if (type.getBasicType() == EbtBlock) { // the type was a block, which set some parts of the qualifier parseContext.mergeQualifiers(type.getQualifier(), qualifier); + + // merge in the attributes + parseContext.transferTypeAttributes(token.loc, attributes, type); + // further, it can create an anonymous instance of the block - if (peekTokenClass(EHTokSemicolon)) + // (cbuffer and tbuffer don't consume the next identifier, and + // should set forbidDeclarators) + if (forbidDeclarators || peek() != EHTokIdentifier) parseContext.declareBlock(loc, type); } else { // Some qualifiers are set when parsing the type. Merge those with @@ -617,10 +641,10 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList) qualifier.readonly = type.getQualifier().readonly; } - if (type.getQualifier().builtIn != EbvNone) + if (type.isBuiltIn()) qualifier.builtIn = type.getQualifier().builtIn; - type.getQualifier() = qualifier; + type.getQualifier() = qualifier; } return true; @@ -681,10 +705,10 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier) qualifier.noContraction = true; break; case EHTokIn: - qualifier.storage = EvqIn; + qualifier.storage = (qualifier.storage == EvqOut) ? EvqInOut : EvqIn; break; case EHTokOut: - qualifier.storage = EvqOut; + qualifier.storage = (qualifier.storage == EvqIn) ? EvqInOut : EvqOut; break; case EHTokInOut: qualifier.storage = EvqInOut; @@ -1084,6 +1108,69 @@ bool HlslGrammar::acceptAnnotations(TQualifier&) return true; } +// subpass input type +// : SUBPASSINPUT +// | SUBPASSINPUT VECTOR LEFT_ANGLE template_type RIGHT_ANGLE +// | SUBPASSINPUTMS +// | SUBPASSINPUTMS VECTOR LEFT_ANGLE template_type RIGHT_ANGLE +bool HlslGrammar::acceptSubpassInputType(TType& type) +{ + // read subpass type + const EHlslTokenClass subpassInputType = peek(); + + bool multisample; + + switch (subpassInputType) { + case EHTokSubpassInput: multisample = false; break; + case EHTokSubpassInputMS: multisample = true; break; + default: + return false; // not a subpass input declaration + } + + advanceToken(); // consume the sampler type keyword + + TType subpassType(EbtFloat, EvqUniform, 4); // default type is float4 + + if (acceptTokenClass(EHTokLeftAngle)) { + if (! acceptType(subpassType)) { + expected("scalar or vector type"); + return false; + } + + const TBasicType basicRetType = subpassType.getBasicType() ; + + switch (basicRetType) { + case EbtFloat: + case EbtUint: + case EbtInt: + case EbtStruct: + break; + default: + unimplemented("basic type in subpass input"); + return false; + } + + if (! acceptTokenClass(EHTokRightAngle)) { + expected("right angle bracket"); + return false; + } + } + + const TBasicType subpassBasicType = subpassType.isStruct() ? (*subpassType.getStruct())[0].type->getBasicType() + : subpassType.getBasicType(); + + TSampler sampler; + sampler.setSubpass(subpassBasicType, multisample); + + // Remember the declared return type. Function returns false on error. + if (!parseContext.setTextureReturnType(sampler, subpassType, token.loc)) + return false; + + type.shallowCopy(TType(sampler, EvqUniform)); + + return true; +} + // sampler_type // : SAMPLER // | SAMPLER1D @@ -1190,7 +1277,13 @@ bool HlslGrammar::acceptTextureType(TType& type) const TBasicType basicRetType = txType.getBasicType() ; - if (basicRetType != EbtFloat && basicRetType != EbtUint && basicRetType != EbtInt) { + switch (basicRetType) { + case EbtFloat: + case EbtUint: + case EbtInt: + case EbtStruct: + break; + default: unimplemented("basic type in texture"); return false; } @@ -1207,8 +1300,8 @@ bool HlslGrammar::acceptTextureType(TType& type) return false; } - if (!txType.isScalar() && !txType.isVector()) { - expected("scalar or vector type"); + if (!txType.isScalar() && !txType.isVector() && !txType.isStruct()) { + expected("scalar, vector, or struct type"); return false; } @@ -1245,20 +1338,24 @@ bool HlslGrammar::acceptTextureType(TType& type) if (image || dim == EsdBuffer) format = parseContext.getLayoutFromTxType(token.loc, txType); + const TBasicType txBasicType = txType.isStruct() ? (*txType.getStruct())[0].type->getBasicType() + : txType.getBasicType(); + // Non-image Buffers are combined if (dim == EsdBuffer && !image) { sampler.set(txType.getBasicType(), dim, array); } else { // DX10 textures are separated. TODO: DX9. if (image) { - sampler.setImage(txType.getBasicType(), dim, array, shadow, ms); + sampler.setImage(txBasicType, dim, array, shadow, ms); } else { - sampler.setTexture(txType.getBasicType(), dim, array, shadow, ms); + sampler.setTexture(txBasicType, dim, array, shadow, ms); } } - // Remember the declared vector size. - sampler.vectorSize = txType.getVectorSize(); + // Remember the declared return type. Function returns false on error. + if (!parseContext.setTextureReturnType(sampler, txType, token.loc)) + return false; // Force uncombined, if necessary if (!combined) @@ -1289,6 +1386,35 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) static const TBasicType min12int_bt = EbtInt; static const TBasicType min16uint_bt = EbtUint; + // Some types might have turned into identifiers. Take the hit for checking + // when this has happened. + if (typeIdentifiers) { + const char* identifierString = getTypeString(peek()); + if (identifierString != nullptr) { + TString name = identifierString; + // if it's an identifier, it's not a type + if (parseContext.symbolTable.find(name) != nullptr) + return false; + } + } + + bool isUnorm = false; + bool isSnorm = false; + + // Accept snorm and unorm. Presently, this is ignored, save for an error check below. + switch (peek()) { + case EHTokUnorm: + isUnorm = true; + advanceToken(); // eat the token + break; + case EHTokSNorm: + isSnorm = true; + advanceToken(); // eat the token + break; + default: + break; + } + switch (peek()) { case EHTokVector: return acceptVectorTemplateType(type); @@ -1331,6 +1457,11 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) return acceptSamplerType(type); break; + case EHTokSubpassInput: // fall through + case EHTokSubpassInputMS: // ... + return acceptSubpassInputType(type); + break; + case EHTokBuffer: // fall through case EHTokTexture1d: // ... case EHTokTexture1darray: // ... @@ -1359,6 +1490,13 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) return acceptStructBufferType(type); break; + case EHTokTextureBuffer: + return acceptTextureBufferType(type); + break; + + case EHTokConstantBuffer: + return acceptConstantBufferType(type); + case EHTokClass: case EHTokStruct: case EHTokCBuffer: @@ -1470,20 +1608,20 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) break; case EHTokHalf: - new(&type) TType(half_bt, EvqTemporary, EpqMedium); + new(&type) TType(half_bt, EvqTemporary); break; case EHTokHalf1: - new(&type) TType(half_bt, EvqTemporary, EpqMedium); + new(&type) TType(half_bt, EvqTemporary); type.makeVector(); break; case EHTokHalf2: - new(&type) TType(half_bt, EvqTemporary, EpqMedium, 2); + new(&type) TType(half_bt, EvqTemporary, 2); break; case EHTokHalf3: - new(&type) TType(half_bt, EvqTemporary, EpqMedium, 3); + new(&type) TType(half_bt, EvqTemporary, 3); break; case EHTokHalf4: - new(&type) TType(half_bt, EvqTemporary, EpqMedium, 4); + new(&type) TType(half_bt, EvqTemporary, 4); break; case EHTokMin16float: @@ -1767,6 +1905,55 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) new(&type) TType(EbtFloat, EvqTemporary, 0, 4, 4); break; + case EHTokHalf1x1: + new(&type) TType(half_bt, EvqTemporary, 0, 1, 1); + break; + case EHTokHalf1x2: + new(&type) TType(half_bt, EvqTemporary, 0, 1, 2); + break; + case EHTokHalf1x3: + new(&type) TType(half_bt, EvqTemporary, 0, 1, 3); + break; + case EHTokHalf1x4: + new(&type) TType(half_bt, EvqTemporary, 0, 1, 4); + break; + case EHTokHalf2x1: + new(&type) TType(half_bt, EvqTemporary, 0, 2, 1); + break; + case EHTokHalf2x2: + new(&type) TType(half_bt, EvqTemporary, 0, 2, 2); + break; + case EHTokHalf2x3: + new(&type) TType(half_bt, EvqTemporary, 0, 2, 3); + break; + case EHTokHalf2x4: + new(&type) TType(half_bt, EvqTemporary, 0, 2, 4); + break; + case EHTokHalf3x1: + new(&type) TType(half_bt, EvqTemporary, 0, 3, 1); + break; + case EHTokHalf3x2: + new(&type) TType(half_bt, EvqTemporary, 0, 3, 2); + break; + case EHTokHalf3x3: + new(&type) TType(half_bt, EvqTemporary, 0, 3, 3); + break; + case EHTokHalf3x4: + new(&type) TType(half_bt, EvqTemporary, 0, 3, 4); + break; + case EHTokHalf4x1: + new(&type) TType(half_bt, EvqTemporary, 0, 4, 1); + break; + case EHTokHalf4x2: + new(&type) TType(half_bt, EvqTemporary, 0, 4, 2); + break; + case EHTokHalf4x3: + new(&type) TType(half_bt, EvqTemporary, 0, 4, 3); + break; + case EHTokHalf4x4: + new(&type) TType(half_bt, EvqTemporary, 0, 4, 4); + break; + case EHTokDouble1x1: new(&type) TType(EbtDouble, EvqTemporary, 0, 1, 1); break; @@ -1822,6 +2009,11 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) advanceToken(); + if ((isUnorm || isSnorm) && !type.isFloatingDomain()) { + parseContext.error(token.loc, "unorm and snorm only valid in floating point domain", "", ""); + return false; + } + return true; } @@ -1841,22 +2033,34 @@ bool HlslGrammar::acceptStruct(TType& type, TIntermNode*& nodeList) // This storage qualifier will tell us whether it's an AST // block type or just a generic structure type. TStorageQualifier storageQualifier = EvqTemporary; + bool readonly = false; - // CBUFFER - if (acceptTokenClass(EHTokCBuffer)) + if (acceptTokenClass(EHTokCBuffer)) { + // CBUFFER storageQualifier = EvqUniform; - // TBUFFER - else if (acceptTokenClass(EHTokTBuffer)) + } else if (acceptTokenClass(EHTokTBuffer)) { + // TBUFFER storageQualifier = EvqBuffer; - // CLASS - // STRUCT - else if (! acceptTokenClass(EHTokClass) && ! acceptTokenClass(EHTokStruct)) + readonly = true; + } else if (! acceptTokenClass(EHTokClass) && ! acceptTokenClass(EHTokStruct)) { + // Neither CLASS nor STRUCT return false; + } - // IDENTIFIER + // Now known to be one of CBUFFER, TBUFFER, CLASS, or STRUCT + + + // IDENTIFIER. It might also be a keyword which can double as an identifier. + // For example: 'cbuffer ConstantBuffer' or 'struct ConstantBuffer' is legal. + // 'cbuffer int' is also legal, and 'struct int' appears rejected only because + // it attempts to redefine the 'int' type. + const char* idString = getTypeString(peek()); TString structName = ""; - if (peekTokenClass(EHTokIdentifier)) { - structName = *token.string; + if (peekTokenClass(EHTokIdentifier) || idString != nullptr) { + if (idString != nullptr) + structName = *idString; + else + structName = *token.string; advanceToken(); } @@ -1903,6 +2107,7 @@ bool HlslGrammar::acceptStruct(TType& type, TIntermNode*& nodeList) new(&type) TType(typeList, structName); else { postDeclQualifier.storage = storageQualifier; + postDeclQualifier.readonly = readonly; new(&type) TType(typeList, structName, postDeclQualifier); // sets EbtBlock } @@ -1920,7 +2125,7 @@ bool HlslGrammar::acceptStruct(TType& type, TIntermNode*& nodeList) // All member functions get parsed inside the class/struct namespace and with the // class/struct members in a symbol-table level. parseContext.pushNamespace(structName); - parseContext.pushThisScope(type); + parseContext.pushThisScope(type, functionDeclarators); bool deferredSuccess = true; for (int b = 0; b < (int)functionDeclarators.size() && deferredSuccess; ++b) { // parse body @@ -1935,6 +2140,84 @@ bool HlslGrammar::acceptStruct(TType& type, TIntermNode*& nodeList) return deferredSuccess; } +// constantbuffer +// : CONSTANTBUFFER LEFT_ANGLE type RIGHT_ANGLE +bool HlslGrammar::acceptConstantBufferType(TType& type) +{ + if (! acceptTokenClass(EHTokConstantBuffer)) + return false; + + if (! acceptTokenClass(EHTokLeftAngle)) { + expected("left angle bracket"); + return false; + } + + TType templateType; + if (! acceptType(templateType)) { + expected("type"); + return false; + } + + if (! acceptTokenClass(EHTokRightAngle)) { + expected("right angle bracket"); + return false; + } + + TQualifier postDeclQualifier; + postDeclQualifier.clear(); + postDeclQualifier.storage = EvqUniform; + + if (templateType.isStruct()) { + // Make a block from the type parsed as the template argument + TTypeList* typeList = templateType.getWritableStruct(); + new(&type) TType(typeList, "", postDeclQualifier); // sets EbtBlock + + type.getQualifier().storage = EvqUniform; + + return true; + } else { + parseContext.error(token.loc, "non-structure type in ConstantBuffer", "", ""); + return false; + } +} + +// texture_buffer +// : TEXTUREBUFFER LEFT_ANGLE type RIGHT_ANGLE +bool HlslGrammar::acceptTextureBufferType(TType& type) +{ + if (! acceptTokenClass(EHTokTextureBuffer)) + return false; + + if (! acceptTokenClass(EHTokLeftAngle)) { + expected("left angle bracket"); + return false; + } + + TType templateType; + if (! acceptType(templateType)) { + expected("type"); + return false; + } + + if (! acceptTokenClass(EHTokRightAngle)) { + expected("right angle bracket"); + return false; + } + + templateType.getQualifier().storage = EvqBuffer; + templateType.getQualifier().readonly = true; + + TType blockType(templateType.getWritableStruct(), "", templateType.getQualifier()); + + blockType.getQualifier().storage = EvqBuffer; + blockType.getQualifier().readonly = true; + + type.shallowCopy(blockType); + + return true; +} + + // struct_buffer // : APPENDSTRUCTUREDBUFFER // | BYTEADDRESSBUFFER @@ -1951,24 +2234,29 @@ bool HlslGrammar::acceptStructBufferType(TType& type) bool readonly = false; TStorageQualifier storage = EvqBuffer; + TBuiltInVariable builtinType = EbvNone; switch (structBuffType) { case EHTokAppendStructuredBuffer: - unimplemented("AppendStructuredBuffer"); - return false; + builtinType = EbvAppendConsume; + break; case EHTokByteAddressBuffer: hasTemplateType = false; readonly = true; + builtinType = EbvByteAddressBuffer; break; case EHTokConsumeStructuredBuffer: - unimplemented("ConsumeStructuredBuffer"); - return false; + builtinType = EbvAppendConsume; + break; case EHTokRWByteAddressBuffer: hasTemplateType = false; + builtinType = EbvRWByteAddressBuffer; break; case EHTokRWStructuredBuffer: + builtinType = EbvRWStructuredBuffer; break; case EHTokStructuredBuffer: + builtinType = EbvStructuredBuffer; readonly = true; break; default: @@ -2010,8 +2298,6 @@ bool HlslGrammar::acceptStructBufferType(TType& type) // field name is canonical for all structbuffers templateType->setFieldName("@data"); - // Create block type. TODO: hidden internal uint member when needed - TTypeList* blockStruct = new TTypeList; TTypeLoc member = { templateType, token.loc }; blockStruct->push_back(member); @@ -2021,6 +2307,7 @@ bool HlslGrammar::acceptStructBufferType(TType& type) blockType.getQualifier().storage = storage; blockType.getQualifier().readonly = readonly; + blockType.getQualifier().builtIn = builtinType; // We may have created an equivalent type before, in which case we should use its // deep structure. @@ -2035,8 +2322,8 @@ bool HlslGrammar::acceptStructBufferType(TType& type) // : struct_declaration SEMI_COLON struct_declaration SEMI_COLON ... // // struct_declaration -// : fully_specified_type struct_declarator COMMA struct_declarator ... -// | fully_specified_type IDENTIFIER function_parameters post_decls compound_statement // member-function definition +// : attributes fully_specified_type struct_declarator COMMA struct_declarator ... +// | attributes fully_specified_type IDENTIFIER function_parameters post_decls compound_statement // member-function definition // // struct_declarator // : IDENTIFIER post_decls @@ -2055,15 +2342,22 @@ bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList, TIntermNode* break; // struct_declaration - + + // attributes + TAttributes attributes; + acceptAttributes(attributes); + bool declarator_list = false; // fully_specified_type TType memberType; - if (! acceptFullySpecifiedType(memberType, nodeList)) { + if (! acceptFullySpecifiedType(memberType, nodeList, attributes)) { expected("member type"); return false; } + + // merge in the attributes + parseContext.transferTypeAttributes(token.loc, attributes, memberType); // struct_declarator COMMA struct_declarator ... bool functionDefinitionAccepted = false; @@ -2140,12 +2434,12 @@ bool HlslGrammar::acceptStructDeclarationList(TTypeList*& typeList, TIntermNode* // // Expects type to have EvqGlobal for a static member and // EvqTemporary for non-static member. -bool HlslGrammar::acceptMemberFunctionDefinition(TIntermNode*& nodeList, const TType& type, const TString& memberName, +bool HlslGrammar::acceptMemberFunctionDefinition(TIntermNode*& nodeList, const TType& type, TString& memberName, TFunctionDeclarator& declarator) { bool accepted = false; - const TString* functionName = &memberName; + TString* functionName = &memberName; parseContext.getFullNamespaceName(functionName); declarator.function = new TFunction(functionName, type); if (type.getQualifier().storage == EvqTemporary) @@ -2230,6 +2524,9 @@ bool HlslGrammar::acceptDefaultParameterDeclaration(const TType& type, TIntermTy node = parseContext.handleFunctionCall(token.loc, constructor, node); } + if (node == nullptr) + return false; + // If this is simply a constant, we can use it directly. if (node->getAsConstantUnion()) return true; @@ -2248,16 +2545,26 @@ bool HlslGrammar::acceptDefaultParameterDeclaration(const TType& type, TIntermTy } // parameter_declaration +// : attributes attributed_declaration +// +// attributed_declaration // : fully_specified_type post_decls [ = default_parameter_declaration ] // | fully_specified_type identifier array_specifier post_decls [ = default_parameter_declaration ] // bool HlslGrammar::acceptParameterDeclaration(TFunction& function) { + // attributes + TAttributes attributes; + acceptAttributes(attributes); + // fully_specified_type TType* type = new TType; - if (! acceptFullySpecifiedType(*type)) + if (! acceptFullySpecifiedType(*type, attributes)) return false; + // merge in the attributes + parseContext.transferTypeAttributes(token.loc, attributes, *type); + // identifier HlslToken idToken; acceptIdentifier(idToken); @@ -2347,6 +2654,8 @@ bool HlslGrammar::acceptFunctionBody(TFunctionDeclarator& declarator, TIntermNod // bool HlslGrammar::acceptParenExpression(TIntermTyped*& expression) { + expression = nullptr; + // LEFT_PAREN if (! acceptTokenClass(EHTokLeftParen)) expected("("); @@ -2440,8 +2749,19 @@ bool HlslGrammar::acceptInitializer(TIntermTyped*& node) expected("assignment expression in initializer list"); return false; } + + const bool firstNode = (node == nullptr); + node = intermediate.growAggregate(node, expr, loc); + // If every sub-node in the list has qualifier EvqConst, the returned node becomes + // EvqConst. Otherwise, it becomes EvqTemporary. That doesn't happen with e.g. + // EvqIn or EvqPosition, since the collection isn't EvqPosition if all the members are. + if (firstNode && expr->getQualifier().storage == EvqConst) + node->getQualifier().storage = EvqConst; + else if (expr->getQualifier().storage != EvqConst) + node->getQualifier().storage = EvqTemporary; + // COMMA if (acceptTokenClass(EHTokComma)) { if (acceptTokenClass(EHTokRightBrace)) // allow trailing comma @@ -2532,10 +2852,12 @@ bool HlslGrammar::acceptConditionalExpression(TIntermTyped*& node) if (! acceptTokenClass(EHTokQuestion)) return true; - node = parseContext.convertConditionalExpression(token.loc, node); + node = parseContext.convertConditionalExpression(token.loc, node, false); if (node == nullptr) return false; + ++parseContext.controlFlowNestingLevel; // this only needs to work right if no errors + TIntermTyped* trueNode = nullptr; if (! acceptExpression(trueNode)) { expected("expression after ?"); @@ -2554,6 +2876,8 @@ bool HlslGrammar::acceptConditionalExpression(TIntermTyped*& node) return false; } + --parseContext.controlFlowNestingLevel; + node = intermediate.addSelection(node, trueNode, falseNode, loc); return true; @@ -2621,9 +2945,14 @@ bool HlslGrammar::acceptUnaryExpression(TIntermTyped*& node) if (acceptTokenClass(EHTokLeftParen)) { TType castType; if (acceptType(castType)) { + // recognize any array_specifier as part of the type + TArraySizes* arraySizes = nullptr; + acceptArraySpecifier(arraySizes); + if (arraySizes != nullptr) + castType.newArraySizes(*arraySizes); + TSourceLoc loc = token.loc; if (acceptTokenClass(EHTokRightParen)) { // We've matched "(type)" now, get the expression to cast - TSourceLoc loc = token.loc; if (! acceptUnaryExpression(node)) return false; @@ -2637,12 +2966,17 @@ bool HlslGrammar::acceptUnaryExpression(TIntermTyped*& node) parseContext.handleFunctionArgument(constructorFunction, arguments, node); node = parseContext.handleFunctionCall(loc, constructorFunction, arguments); - return true; + return node != nullptr; } else { // This could be a parenthesized constructor, ala (int(3)), and we just accepted // the '(int' part. We must back up twice. recedeToken(); recedeToken(); + + // Note, there are no array constructors like + // (float[2](...)) + if (arraySizes != nullptr) + parseContext.error(loc, "parenthesized array constructor not allowed", "([]())", "", ""); } } else { // This isn't a type cast, but it still started "(", so if it is a @@ -2732,6 +3066,8 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node) } if (! peekTokenClass(EHTokLeftParen)) { node = parseContext.handleVariable(idToken.loc, fullName); + if (node == nullptr) + return false; } else if (acceptFunctionCall(idToken.loc, *fullName, node, nullptr)) { // function_call (nothing else to do yet) } else { @@ -2743,23 +3079,6 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node) return false; } - // This is to guarantee we do this no matter how we get out of the stack frame. - // This way there's no bug if an early return forgets to do it. - struct tFinalize { - tFinalize(HlslParseContext& p) : parseContext(p) { } - ~tFinalize() { parseContext.finalizeFlattening(); } - HlslParseContext& parseContext; - private: - const tFinalize& operator=(const tFinalize&) { return *this; } - tFinalize(const tFinalize& f) : parseContext(f.parseContext) { } - } finalize(parseContext); - - // Initialize the flattening accumulation data, so we can track data across multiple bracket or - // dot operators. This can also be nested, e.g, for [], so we have to track each nesting - // level: hence the init and finalize. Even though in practice these must be - // constants, they are parsed no matter what. - parseContext.initFlattening(); - // Something was found, chain as many postfix operations as exist. do { TSourceLoc loc = token.loc; @@ -2859,7 +3178,7 @@ bool HlslGrammar::acceptConstructor(TIntermTyped*& node) // hook it up node = parseContext.handleFunctionCall(arguments->getLoc(), constructorFunction, arguments); - return true; + return node != nullptr; } return false; @@ -2907,7 +3226,7 @@ bool HlslGrammar::acceptFunctionCall(const TSourceLoc& loc, TString& name, TInte // call node = parseContext.handleFunctionCall(loc, function, arguments); - return true; + return node != nullptr; } // arguments @@ -2922,11 +3241,16 @@ bool HlslGrammar::acceptArguments(TFunction* function, TIntermTyped*& arguments) if (! acceptTokenClass(EHTokLeftParen)) return false; + // RIGHT_PAREN + if (acceptTokenClass(EHTokRightParen)) + return true; + + // must now be at least one expression... do { // expression TIntermTyped* arg; if (! acceptAssignmentExpression(arg)) - break; + return false; // hook it up parseContext.handleFunctionArgument(function, arguments, arg); @@ -2976,6 +3300,37 @@ bool HlslGrammar::acceptLiteral(TIntermTyped*& node) return true; } +// simple_statement +// : SEMICOLON +// | declaration_statement +// | expression SEMICOLON +// +bool HlslGrammar::acceptSimpleStatement(TIntermNode*& statement) +{ + // SEMICOLON + if (acceptTokenClass(EHTokSemicolon)) + return true; + + // declaration + if (acceptDeclaration(statement)) + return true; + + // expression + TIntermTyped* node; + if (acceptExpression(node)) + statement = node; + else + return false; + + // SEMICOLON (following an expression) + if (acceptTokenClass(EHTokSemicolon)) + return true; + else { + expected(";"); + return false; + } +} + // compound_statement // : LEFT_CURLY statement statement ... RIGHT_CURLY // @@ -3033,12 +3388,11 @@ bool HlslGrammar::acceptScopedCompoundStatement(TIntermNode*& statement) // // attributed_statement // : compound_statement -// | SEMICOLON -// | expression SEMICOLON -// | declaration_statement +// | simple_statement // | selection_statement // | switch_statement // | case_label +// | default_label // | iteration_statement // | jump_statement // @@ -3047,7 +3401,7 @@ bool HlslGrammar::acceptStatement(TIntermNode*& statement) statement = nullptr; // attributes - TAttributeMap attributes; + TAttributes attributes; acceptAttributes(attributes); // attributed_statement @@ -3056,15 +3410,15 @@ bool HlslGrammar::acceptStatement(TIntermNode*& statement) return acceptScopedCompoundStatement(statement); case EHTokIf: - return acceptSelectionStatement(statement); + return acceptSelectionStatement(statement, attributes); case EHTokSwitch: - return acceptSwitchStatement(statement); + return acceptSwitchStatement(statement, attributes); case EHTokFor: case EHTokDo: case EHTokWhile: - return acceptIterationStatement(statement); + return acceptIterationStatement(statement, attributes); case EHTokContinue: case EHTokBreak: @@ -3077,40 +3431,28 @@ bool HlslGrammar::acceptStatement(TIntermNode*& statement) case EHTokDefault: return acceptDefaultLabel(statement); - case EHTokSemicolon: - return acceptTokenClass(EHTokSemicolon); - case EHTokRightBrace: // Performance: not strictly necessary, but stops a bunch of hunting early, // and is how sequences of statements end. return false; default: - { - // declaration - if (acceptDeclaration(statement)) - return true; - - // expression - TIntermTyped* node; - if (acceptExpression(node)) - statement = node; - else - return false; - - // SEMICOLON (following an expression) - if (! acceptTokenClass(EHTokSemicolon)) { - expected(";"); - return false; - } - } + return acceptSimpleStatement(statement); } return true; } // attributes -// : list of zero or more of: LEFT_BRACKET attribute RIGHT_BRACKET +// : [zero or more:] bracketed-attribute +// +// bracketed-attribute: +// : LEFT_BRACKET scoped-attribute RIGHT_BRACKET +// : LEFT_BRACKET LEFT_BRACKET scoped-attribute RIGHT_BRACKET RIGHT_BRACKET +// +// scoped-attribute: +// : attribute +// | namespace COLON COLON attribute // // attribute: // : UNROLL @@ -3131,24 +3473,39 @@ bool HlslGrammar::acceptStatement(TIntermNode*& statement) // | PATCHCONSTANTFUNC // | NUMTHREADS LEFT_PAREN x_size, y_size,z z_size RIGHT_PAREN // -void HlslGrammar::acceptAttributes(TAttributeMap& attributes) +void HlslGrammar::acceptAttributes(TAttributes& attributes) { // For now, accept the [ XXX(X) ] syntax, but drop all but // numthreads, which is used to set the CS local size. // TODO: subset to correct set? Pass on? do { - HlslToken idToken; + HlslToken attributeToken; // LEFT_BRACKET? if (! acceptTokenClass(EHTokLeftBracket)) return; + // another LEFT_BRACKET? + bool doubleBrackets = false; + if (acceptTokenClass(EHTokLeftBracket)) + doubleBrackets = true; - // attribute - if (acceptIdentifier(idToken)) { - // 'idToken.string' is the attribute - } else if (! peekTokenClass(EHTokRightBracket)) { - expected("identifier"); - advanceToken(); + // attribute? (could be namespace; will adjust later) + if (!acceptIdentifier(attributeToken)) { + if (!peekTokenClass(EHTokRightBracket)) { + expected("namespace or attribute identifier"); + advanceToken(); + } + } + + TString nameSpace; + if (acceptTokenClass(EHTokColonColon)) { + // namespace COLON COLON + nameSpace = *attributeToken.string; + // attribute + if (!acceptIdentifier(attributeToken)) { + expected("attribute identifier"); + return; + } } TIntermAggregate* expressions = nullptr; @@ -3181,10 +3538,22 @@ void HlslGrammar::acceptAttributes(TAttributeMap& attributes) expected("]"); return; } + // another RIGHT_BRACKET? + if (doubleBrackets && !acceptTokenClass(EHTokRightBracket)) { + expected("]]"); + return; + } - // Add any values we found into the attribute map. This accepts - // (and ignores) values not mapping to a known TAttributeType; - attributes.setAttribute(idToken.string, expressions); + // Add any values we found into the attribute map. + if (attributeToken.string != nullptr) { + TAttributeType attributeType = parseContext.attributeFromName(nameSpace, *attributeToken.string); + if (attributeType == EatNone) + parseContext.warn(attributeToken.loc, "unrecognized attribute", attributeToken.string->c_str(), ""); + else { + TAttributeArgs attributeArgs = { attributeType, expressions }; + attributes.push_back(attributeArgs); + } + } } while (true); } @@ -3192,7 +3561,7 @@ void HlslGrammar::acceptAttributes(TAttributeMap& attributes) // : IF LEFT_PAREN expression RIGHT_PAREN statement // : IF LEFT_PAREN expression RIGHT_PAREN statement ELSE statement // -bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement) +bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement, const TAttributes& attributes) { TSourceLoc loc = token.loc; @@ -3215,6 +3584,8 @@ bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement) // create the child statements TIntermNodePair thenElse = { nullptr, nullptr }; + ++parseContext.controlFlowNestingLevel; // this only needs to work right if no errors + // then statement if (! acceptScopedStatement(thenElse.node1)) { expected("then statement"); @@ -3232,7 +3603,10 @@ bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement) // Put the pieces together statement = intermediate.addSelection(condition, thenElse, loc); + parseContext.handleSelectionAttributes(loc, statement->getAsSelectionNode(), attributes); + parseContext.popScope(); + --parseContext.controlFlowNestingLevel; return true; } @@ -3240,10 +3614,11 @@ bool HlslGrammar::acceptSelectionStatement(TIntermNode*& statement) // switch_statement // : SWITCH LEFT_PAREN expression RIGHT_PAREN compound_statement // -bool HlslGrammar::acceptSwitchStatement(TIntermNode*& statement) +bool HlslGrammar::acceptSwitchStatement(TIntermNode*& statement, const TAttributes& attributes) { // SWITCH TSourceLoc loc = token.loc; + if (! acceptTokenClass(EHTokSwitch)) return false; @@ -3257,9 +3632,14 @@ bool HlslGrammar::acceptSwitchStatement(TIntermNode*& statement) // compound_statement parseContext.pushSwitchSequence(new TIntermSequence); + + ++parseContext.controlFlowNestingLevel; bool statementOkay = acceptCompoundStatement(statement); + --parseContext.controlFlowNestingLevel; + if (statementOkay) - statement = parseContext.addSwitch(loc, switchExpression, statement ? statement->getAsAggregate() : nullptr); + statement = parseContext.addSwitch(loc, switchExpression, statement ? statement->getAsAggregate() : nullptr, + attributes); parseContext.popSwitchSequence(); parseContext.popScope(); @@ -3273,7 +3653,7 @@ bool HlslGrammar::acceptSwitchStatement(TIntermNode*& statement) // | FOR LEFT_PAREN for_init_statement for_rest_statement RIGHT_PAREN statement // // Non-speculative, only call if it needs to be found; WHILE or DO or FOR already seen. -bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) +bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement, const TAttributes& attributes) { TSourceLoc loc = token.loc; TIntermTyped* condition = nullptr; @@ -3284,12 +3664,14 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) // WHILE or DO or FOR advanceToken(); + TIntermLoop* loopNode = nullptr; switch (loop) { case EHTokWhile: // so that something declared in the condition is scoped to the lifetime // of the while sub-statement - parseContext.pushScope(); + parseContext.pushScope(); // this only needs to work right if no errors parseContext.nestLooping(); + ++parseContext.controlFlowNestingLevel; // LEFT_PAREN condition RIGHT_PAREN if (! acceptParenExpression(condition)) @@ -3306,26 +3688,22 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) parseContext.unnestLooping(); parseContext.popScope(); + --parseContext.controlFlowNestingLevel; - statement = intermediate.addLoop(statement, condition, nullptr, true, loc); - - return true; + loopNode = intermediate.addLoop(statement, condition, nullptr, true, loc); + statement = loopNode; + break; case EHTokDo: - parseContext.nestLooping(); - - if (! acceptTokenClass(EHTokLeftBrace)) - expected("{"); + parseContext.nestLooping(); // this only needs to work right if no errors + ++parseContext.controlFlowNestingLevel; // statement - if (! peekTokenClass(EHTokRightBrace) && ! acceptScopedStatement(statement)) { + if (! acceptScopedStatement(statement)) { expected("do sub-statement"); return false; } - if (! acceptTokenClass(EHTokRightBrace)) - expected("}"); - // WHILE if (! acceptTokenClass(EHTokWhile)) { expected("while"); @@ -3333,7 +3711,6 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) } // LEFT_PAREN condition RIGHT_PAREN - TIntermTyped* condition; if (! acceptParenExpression(condition)) return false; condition = parseContext.convertConditionalExpression(loc, condition); @@ -3344,10 +3721,11 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) expected(";"); parseContext.unnestLooping(); + --parseContext.controlFlowNestingLevel; - statement = intermediate.addLoop(statement, condition, 0, false, loc); - - return true; + loopNode = intermediate.addLoop(statement, condition, 0, false, loc); + statement = loopNode; + break; case EHTokFor: { @@ -3361,16 +3739,11 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) // initializer TIntermNode* initNode = nullptr; - if (! acceptControlDeclaration(initNode)) { - TIntermTyped* initExpr = nullptr; - acceptExpression(initExpr); - initNode = initExpr; - } - // SEMI_COLON - if (! acceptTokenClass(EHTokSemicolon)) - expected(";"); + if (! acceptSimpleStatement(initNode)) + expected("for-loop initializer statement"); - parseContext.nestLooping(); + parseContext.nestLooping(); // this only needs to work right if no errors + ++parseContext.controlFlowNestingLevel; // condition SEMI_COLON acceptExpression(condition); @@ -3394,17 +3767,21 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement) return false; } - statement = intermediate.addForLoop(statement, initNode, condition, iterator, true, loc); + statement = intermediate.addForLoop(statement, initNode, condition, iterator, true, loc, loopNode); parseContext.popScope(); parseContext.unnestLooping(); + --parseContext.controlFlowNestingLevel; - return true; + break; } default: return false; } + + parseContext.handleLoopAttributes(loc, loopNode, attributes); + return true; } // jump_statement @@ -3432,9 +3809,17 @@ bool HlslGrammar::acceptJumpStatement(TIntermNode*& statement) switch (jump) { case EHTokContinue: statement = intermediate.addBranch(EOpContinue, token.loc); + if (parseContext.loopNestingLevel == 0) { + expected("loop"); + return false; + } break; case EHTokBreak: statement = intermediate.addBranch(EOpBreak, token.loc); + if (parseContext.loopNestingLevel == 0 && parseContext.switchSequenceStack.size() == 0) { + expected("loop or switch"); + return false; + } break; case EHTokDiscard: statement = intermediate.addBranch(EOpKill, token.loc); @@ -3695,4 +4080,42 @@ bool HlslGrammar::captureBlockTokens(TVector& tokens) return true; } +// Return a string for just the types that can also be declared as an identifier. +const char* HlslGrammar::getTypeString(EHlslTokenClass tokenClass) const +{ + switch (tokenClass) { + case EHTokSample: return "sample"; + case EHTokHalf: return "half"; + case EHTokHalf1x1: return "half1x1"; + case EHTokHalf1x2: return "half1x2"; + case EHTokHalf1x3: return "half1x3"; + case EHTokHalf1x4: return "half1x4"; + case EHTokHalf2x1: return "half2x1"; + case EHTokHalf2x2: return "half2x2"; + case EHTokHalf2x3: return "half2x3"; + case EHTokHalf2x4: return "half2x4"; + case EHTokHalf3x1: return "half3x1"; + case EHTokHalf3x2: return "half3x2"; + case EHTokHalf3x3: return "half3x3"; + case EHTokHalf3x4: return "half3x4"; + case EHTokHalf4x1: return "half4x1"; + case EHTokHalf4x2: return "half4x2"; + case EHTokHalf4x3: return "half4x3"; + case EHTokHalf4x4: return "half4x4"; + case EHTokBool: return "bool"; + case EHTokFloat: return "float"; + case EHTokDouble: return "double"; + case EHTokInt: return "int"; + case EHTokUint: return "uint"; + case EHTokMin16float: return "min16float"; + case EHTokMin10float: return "min10float"; + case EHTokMin16int: return "min16int"; + case EHTokMin12int: return "min12int"; + case EHTokConstantBuffer: return "ConstantBuffer"; + case EHTokLayout: return "layout"; + default: + return nullptr; + } +} + } // end namespace glslang diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.h b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.h index 6d8ed8f..046f795 100755 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.h +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.h @@ -43,7 +43,6 @@ namespace glslang { - class TAttributeMap; class TFunctionDeclarator; // Should just be the grammar aspect of HLSL. @@ -52,7 +51,8 @@ namespace glslang { class HlslGrammar : public HlslTokenStream { public: HlslGrammar(HlslScanContext& scanner, HlslParseContext& parseContext) - : HlslTokenStream(scanner), parseContext(parseContext), intermediate(parseContext.intermediate) { } + : HlslTokenStream(scanner), parseContext(parseContext), intermediate(parseContext.intermediate), + typeIdentifiers(false) { } virtual ~HlslGrammar() { } bool parse(); @@ -70,8 +70,8 @@ namespace glslang { bool acceptControlDeclaration(TIntermNode*& node); bool acceptSamplerDeclarationDX9(TType&); bool acceptSamplerState(); - bool acceptFullySpecifiedType(TType&); - bool acceptFullySpecifiedType(TType&, TIntermNode*& nodeList); + bool acceptFullySpecifiedType(TType&, const TAttributes&); + bool acceptFullySpecifiedType(TType&, TIntermNode*& nodeList, const TAttributes&, bool forbidDeclarators = false); bool acceptQualifier(TQualifier&); bool acceptLayoutQualifierList(TQualifier&); bool acceptType(TType&); @@ -86,10 +86,13 @@ namespace glslang { bool acceptAnnotations(TQualifier&); bool acceptSamplerType(TType&); bool acceptTextureType(TType&); + bool acceptSubpassInputType(TType&); bool acceptStructBufferType(TType&); + bool acceptTextureBufferType(TType&); + bool acceptConstantBufferType(TType&); bool acceptStruct(TType&, TIntermNode*& nodeList); bool acceptStructDeclarationList(TTypeList*&, TIntermNode*& nodeList, TVector&); - bool acceptMemberFunctionDefinition(TIntermNode*& nodeList, const TType&, const TString& memberName, + bool acceptMemberFunctionDefinition(TIntermNode*& nodeList, const TType&, TString& memberName, TFunctionDeclarator&); bool acceptFunctionParameters(TFunction&); bool acceptParameterDeclaration(TFunction&); @@ -107,15 +110,16 @@ namespace glslang { bool acceptFunctionCall(const TSourceLoc&, TString& name, TIntermTyped*&, TIntermTyped* objectBase); bool acceptArguments(TFunction*, TIntermTyped*&); bool acceptLiteral(TIntermTyped*&); + bool acceptSimpleStatement(TIntermNode*&); bool acceptCompoundStatement(TIntermNode*&); - bool acceptStatement(TIntermNode*&); bool acceptScopedStatement(TIntermNode*&); bool acceptScopedCompoundStatement(TIntermNode*&); + bool acceptStatement(TIntermNode*&); bool acceptNestedStatement(TIntermNode*&); - void acceptAttributes(TAttributeMap&); - bool acceptSelectionStatement(TIntermNode*&); - bool acceptSwitchStatement(TIntermNode*&); - bool acceptIterationStatement(TIntermNode*&); + void acceptAttributes(TAttributes&); + bool acceptSelectionStatement(TIntermNode*&, const TAttributes&); + bool acceptSwitchStatement(TIntermNode*&, const TAttributes&); + bool acceptIterationStatement(TIntermNode*&, const TAttributes&); bool acceptJumpStatement(TIntermNode*&); bool acceptCaseLabel(TIntermNode*&); bool acceptDefaultLabel(TIntermNode*&); @@ -124,9 +128,11 @@ namespace glslang { bool acceptDefaultParameterDeclaration(const TType&, TIntermTyped*&); bool captureBlockTokens(TVector& tokens); + const char* getTypeString(EHlslTokenClass tokenClass) const; HlslParseContext& parseContext; // state of parsing and helper functions for building the intermediate TIntermediate& intermediate; // the final product, the intermediate representation, includes the AST + bool typeIdentifiers; // shader uses some types as identifiers }; } // end namespace glslang diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.cpp b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.cpp index 745ee40..6602ba2 100755 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.cpp @@ -1,6 +1,6 @@ // -// Copyright (C) 2016 Google, Inc. -// Copyright (C) 2016 LunarG, Inc. +// Copyright (C) 2017 Google, Inc. +// Copyright (C) 2017 LunarG, Inc. // // All rights reserved. // @@ -53,22 +53,22 @@ namespace glslang { HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& interm, bool parsingBuiltins, - int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink, + int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, + TInfoSink& infoSink, const TString sourceEntryPointName, bool forwardCompatible, EShMessages messages) : - TParseContextBase(symbolTable, interm, parsingBuiltins, version, profile, spvVersion, language, infoSink, forwardCompatible, messages), - contextPragma(true, false), - loopNestingLevel(0), annotationNestingLevel(0), structNestingLevel(0), controlFlowNestingLevel(0), - postEntryPointReturn(false), - limits(resources.limits), - builtInIoIndex(nullptr), - builtInIoBase(nullptr), + TParseContextBase(symbolTable, interm, parsingBuiltins, version, profile, spvVersion, language, infoSink, + forwardCompatible, messages, &sourceEntryPointName), + annotationNestingLevel(0), + inputPatch(nullptr), nextInLocation(0), nextOutLocation(0), - sourceEntryPointName(sourceEntryPointName), entryPointFunction(nullptr), entryPointFunctionBody(nullptr), gsStreamOutput(nullptr), - inputPatch(nullptr) + clipDistanceInput(nullptr), + cullDistanceInput(nullptr), + clipDistanceOutput(nullptr), + cullDistanceOutput(nullptr) { globalUniformDefaults.clear(); globalUniformDefaults.layoutMatrix = ElmRowMajor; @@ -81,6 +81,11 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int globalInputDefaults.clear(); globalOutputDefaults.clear(); + clipSemanticNSizeIn.fill(0); + cullSemanticNSizeIn.fill(0); + clipSemanticNSizeOut.fill(0); + cullSemanticNSizeOut.fill(0); + // "Shaders in the transform // feedback capturing mode have an initial global default of // layout(xfb_buffer = 0) out;" @@ -131,7 +136,8 @@ bool HlslParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner& // Print a message formated such that if you click on the message it will take you right to // the line through most UIs. const glslang::TSourceLoc& sourceLoc = input.getSourceLoc(); - infoSink.info << sourceLoc.name << "(" << sourceLoc.line << "): error at column " << sourceLoc.column << ", HLSL parsing failed.\n"; + infoSink.info << sourceLoc.name << "(" << sourceLoc.line << "): error at column " << sourceLoc.column + << ", HLSL parsing failed.\n"; ++numErrors; return false; } @@ -147,7 +153,7 @@ bool HlslParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner& // bool HlslParseContext::shouldConvertLValue(const TIntermNode* node) const { - if (node == nullptr) + if (node == nullptr || node->getAsTyped() == nullptr) return false; const TIntermAggregate* lhsAsAggregate = node->getAsAggregate(); @@ -157,14 +163,14 @@ bool HlslParseContext::shouldConvertLValue(const TIntermNode* node) const if (lhsAsBinary != nullptr && (lhsAsBinary->getOp() == EOpVectorSwizzle || lhsAsBinary->getOp() == EOpIndexDirect)) lhsAsAggregate = lhsAsBinary->getLeft()->getAsAggregate(); - if (lhsAsAggregate != nullptr && lhsAsAggregate->getOp() == EOpImageLoad) return true; return false; } -void HlslParseContext::growGlobalUniformBlock(const TSourceLoc& loc, TType& memberType, const TString& memberName, TTypeList* newTypeList) +void HlslParseContext::growGlobalUniformBlock(const TSourceLoc& loc, TType& memberType, const TString& memberName, + TTypeList* newTypeList) { newTypeList = nullptr; correctUniform(memberType.getQualifier()); @@ -181,7 +187,14 @@ void HlslParseContext::growGlobalUniformBlock(const TSourceLoc& loc, TType& memb // TLayoutFormat HlslParseContext::getLayoutFromTxType(const TSourceLoc& loc, const TType& txType) { + if (txType.isStruct()) { + // TODO: implement. + error(loc, "unimplemented: structure type in image or buffer", "", ""); + return ElfNone; + } + const int components = txType.getVectorSize(); + const TBasicType txBasicType = txType.getBasicType(); const auto selectFormat = [this,&components](TLayoutFormat v1, TLayoutFormat v2, TLayoutFormat v4) -> TLayoutFormat { if (intermediate.getNoStorageFormat()) @@ -191,7 +204,7 @@ TLayoutFormat HlslParseContext::getLayoutFromTxType(const TSourceLoc& loc, const components == 2 ? v2 : v4; }; - switch (txType.getBasicType()) { + switch (txBasicType) { case EbtFloat: return selectFormat(ElfR32f, ElfRg32f, ElfRgba32f); case EbtInt: return selectFormat(ElfR32i, ElfRg32i, ElfRgba32i); case EbtUint: return selectFormat(ElfR32ui, ElfRg32ui, ElfRgba32ui); @@ -221,6 +234,13 @@ bool HlslParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, T } } + // We tolerate samplers as l-values, even though they are nominally + // illegal, because we expect a later optimization to eliminate them. + if (node->getType().getBasicType() == EbtSampler) { + intermediate.setNeedsLegalization(); + return false; + } + // Let the base class check errors return TParseContextBase::lValueErrorCheck(loc, op, node); } @@ -233,7 +253,7 @@ bool HlslParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, T // // Most things are passed through unmodified, except for error checking. // -TIntermTyped* HlslParseContext::handleLvalue(const TSourceLoc& loc, const char* op, TIntermTyped* node) +TIntermTyped* HlslParseContext::handleLvalue(const TSourceLoc& loc, const char* op, TIntermTyped*& node) { if (node == nullptr) return nullptr; @@ -358,7 +378,8 @@ TIntermTyped* HlslParseContext::handleLvalue(const TSourceLoc& loc, const char* const TSampler& texSampler = object->getType().getSampler(); - const TType objDerefType(texSampler.type, EvqTemporary, texSampler.vectorSize); + TType objDerefType; + getTextureReturnType(texSampler, objDerefType); if (nodeAsBinary) { TIntermTyped* rhs = nodeAsBinary->getRight(); @@ -385,12 +406,13 @@ TIntermTyped* HlslParseContext::handleLvalue(const TSourceLoc& loc, const char* // fall through... case EOpAssign: { - // Since this is an lvalue, we'll convert an image load to a sequence like this (to still provide the value): + // Since this is an lvalue, we'll convert an image load to a sequence like this + // (to still provide the value): // OpSequence // OpImageStore(object, lhs, rhs) // rhs - // But if it's not a simple symbol RHS (say, a fn call), we don't want to duplicate the RHS, so we'll convert - // instead to this: + // But if it's not a simple symbol RHS (say, a fn call), we don't want to duplicate the RHS, + // so we'll convert instead to this: // OpSequence // rhsTmp = rhs // OpImageStore(object, coord, rhsTmp) @@ -507,6 +529,28 @@ void HlslParseContext::handlePragma(const TSourceLoc& loc, const TVector lowerTokens = tokens; + + for (auto it = lowerTokens.begin(); it != lowerTokens.end(); ++it) + std::transform(it->begin(), it->end(), it->begin(), ::tolower); + + // Handle pack_matrix + if (tokens.size() == 4 && lowerTokens[0] == "pack_matrix" && tokens[1] == "(" && tokens[3] == ")") { + // Note that HLSL semantic order is Mrc, not Mcr like SPIR-V, so we reverse the sense. + // Row major becomes column major and vice versa. + + if (lowerTokens[2] == "row_major") { + globalUniformDefaults.layoutMatrix = globalBufferDefaults.layoutMatrix = ElmColumnMajor; + } else if (lowerTokens[2] == "column_major") { + globalUniformDefaults.layoutMatrix = globalBufferDefaults.layoutMatrix = ElmRowMajor; + } else { + // unknown majorness strings are treated as (HLSL column major)==(SPIR-V row major) + warn(loc, "unknown pack_matrix pragma value", tokens[2].c_str(), ""); + globalUniformDefaults.layoutMatrix = globalBufferDefaults.layoutMatrix = ElmRowMajor; + } + } } // @@ -649,7 +693,7 @@ TIntermTyped* HlslParseContext::handleVariable(const TSourceLoc& loc, const TStr } // Recovery, if it wasn't found or was not a variable. - if (! variable) { + if (variable == nullptr) { error(loc, "unknown variable", string->c_str(), ""); variable = new TVariable(string, TType(EbtVoid)); } @@ -677,19 +721,33 @@ TIntermTyped* HlslParseContext::handleBracketOperator(const TSourceLoc& loc, TIn if (base->getType().getBasicType() == EbtSampler && !base->isArray()) { const TSampler& sampler = base->getType().getSampler(); if (sampler.isImage() || sampler.isTexture()) { - TIntermAggregate* load = new TIntermAggregate(sampler.isImage() ? EOpImageLoad : EOpTextureFetch); + if (! mipsOperatorMipArg.empty() && mipsOperatorMipArg.back().mipLevel == nullptr) { + // The first operator[] to a .mips[] sequence is the mip level. We'll remember it. + mipsOperatorMipArg.back().mipLevel = index; + return base; // next [] index is to the same base. + } else { + TIntermAggregate* load = new TIntermAggregate(sampler.isImage() ? EOpImageLoad : EOpTextureFetch); - load->setType(TType(sampler.type, EvqTemporary, sampler.vectorSize)); - load->setLoc(loc); - load->getSequence().push_back(base); - load->getSequence().push_back(index); + TType sampReturnType; + getTextureReturnType(sampler, sampReturnType); - // Textures need a MIP. First indirection is always to mip 0. If there's another, we'll add it - // later. - if (sampler.isTexture()) - load->getSequence().push_back(intermediate.addConstantUnion(0, loc, true)); + load->setType(sampReturnType); + load->setLoc(loc); + load->getSequence().push_back(base); + load->getSequence().push_back(index); - return load; + // Textures need a MIP. If we saw one go by, use it. Otherwise, use zero. + if (sampler.isTexture()) { + if (! mipsOperatorMipArg.empty()) { + load->getSequence().push_back(mipsOperatorMipArg.back().mipLevel); + mipsOperatorMipArg.pop_back(); + } else { + load->getSequence().push_back(intermediate.addConstantUnion(0, loc, true)); + } + } + + return load; + } } } @@ -712,58 +770,70 @@ TIntermTyped* HlslParseContext::handleBracketOperator(const TSourceLoc& loc, TIn return nullptr; } +// +// Cast index value to a uint if it isn't already (for operator[], load indexes, etc) +TIntermTyped* HlslParseContext::makeIntegerIndex(TIntermTyped* index) +{ + const TBasicType indexBasicType = index->getType().getBasicType(); + const int vecSize = index->getType().getVectorSize(); + + // We can use int types directly as the index + if (indexBasicType == EbtInt || indexBasicType == EbtUint || + indexBasicType == EbtInt64 || indexBasicType == EbtUint64) + return index; + + // Cast index to unsigned integer if it isn't one. + return intermediate.addConversion(EOpConstructUint, TType(EbtUint, EvqTemporary, vecSize), index); +} + // // Handle seeing a base[index] dereference in the grammar. // TIntermTyped* HlslParseContext::handleBracketDereference(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index) { + index = makeIntegerIndex(index); + + if (index == nullptr) { + error(loc, " unknown index type ", "", ""); + return nullptr; + } + TIntermTyped* result = handleBracketOperator(loc, base, index); if (result != nullptr) return result; // it was handled as an operator[] - const TBasicType indexBasicType = index->getType().getBasicType(); - - // Cast index to unsigned integer if it isn't one. - if (indexBasicType != EbtInt && indexBasicType != EbtUint && - indexBasicType != EbtInt64 && indexBasicType != EbtUint64) - index = intermediate.addConversion(EOpConstructUint, TType(EbtUint), index); - - if (index == nullptr) { - error(loc, " unknown undex type ", "", ""); - return nullptr; - } - bool flattened = false; int indexValue = 0; - if (index->getQualifier().storage == EvqConst) { + if (index->getQualifier().isFrontEndConstant()) indexValue = index->getAsConstantUnion()->getConstArray()[0].getIConst(); - checkIndex(loc, base->getType(), indexValue); - } variableCheck(base); if (! base->isArray() && ! base->isMatrix() && ! base->isVector()) { if (base->getAsSymbolNode()) - error(loc, " left of '[' is not of type array, matrix, or vector ", base->getAsSymbolNode()->getName().c_str(), ""); + error(loc, " left of '[' is not of type array, matrix, or vector ", + base->getAsSymbolNode()->getName().c_str(), ""); else error(loc, " left of '[' is not of type array, matrix, or vector ", "expression", ""); - } else if (base->getType().getQualifier().storage == EvqConst && index->getQualifier().storage == EvqConst) + } else if (base->getType().getQualifier().storage == EvqConst && index->getQualifier().storage == EvqConst) { + // both base and index are front-end constants + checkIndex(loc, base->getType(), indexValue); return intermediate.foldDereference(base, indexValue, loc); - else { + } else { // at least one of base and index is variable... - if (base->getAsSymbolNode() && (wasFlattened(base) || shouldFlattenUniform(base->getType()))) { + if (base->getAsSymbolNode() && wasFlattened(base)) { if (index->getQualifier().storage != EvqConst) error(loc, "Invalid variable index to flattened array", base->getAsSymbolNode()->getName().c_str(), ""); result = flattenAccess(base, indexValue); flattened = (result != base); } else { - splitAccessArray(loc, base, index); - - if (index->getQualifier().storage == EvqConst) { + if (index->getQualifier().isFrontEndConstant()) { if (base->getType().isImplicitlySizedArray()) updateImplicitArraySize(loc, base, indexValue); + else + checkIndex(loc, base->getType(), indexValue); result = intermediate.addIndex(EOpIndexDirect, base, index, loc); } else { result = intermediate.addIndex(EOpIndexIndirect, base, index, loc); @@ -792,23 +862,20 @@ TIntermTyped* HlslParseContext::handleBracketDereference(const TSourceLoc& loc, return result; } -void HlslParseContext::checkIndex(const TSourceLoc& /*loc*/, const TType& /*type*/, int& /*index*/) -{ - // HLSL todo: any rules for index fixups? -} - // Handle seeing a binary node with a math operation. -TIntermTyped* HlslParseContext::handleBinaryMath(const TSourceLoc& loc, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right) +TIntermTyped* HlslParseContext::handleBinaryMath(const TSourceLoc& loc, const char* str, TOperator op, + TIntermTyped* left, TIntermTyped* right) { TIntermTyped* result = intermediate.addBinaryMath(op, left, right, loc); - if (! result) + if (result == nullptr) binaryOpError(loc, str, left->getCompleteString(), right->getCompleteString()); return result; } // Handle seeing a unary node with a math operation. -TIntermTyped* HlslParseContext::handleUnaryMath(const TSourceLoc& loc, const char* str, TOperator op, TIntermTyped* childNode) +TIntermTyped* HlslParseContext::handleUnaryMath(const TSourceLoc& loc, const char* str, TOperator op, + TIntermTyped* childNode) { TIntermTyped* result = intermediate.addUnaryMath(op, childNode, loc); @@ -842,7 +909,11 @@ bool HlslParseContext::isStructBufferMethod(const TString& name) const name == "InterlockedMax" || name == "InterlockedMin" || name == "InterlockedOr" || - name == "InterlockedXor"; + name == "InterlockedXor" || + name == "IncrementCounter" || + name == "DecrementCounter" || + name == "Append" || + name == "Consume"; } // @@ -859,7 +930,23 @@ TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TInt } TIntermTyped* result = base; - if (base->isVector() || base->isScalar()) { + + if (base->getType().getBasicType() == EbtSampler) { + // Handle .mips[mipid][pos] operation on textures + const TSampler& sampler = base->getType().getSampler(); + if (sampler.isTexture() && field == "mips") { + // Push a null to signify that we expect a mip level under operator[] next. + mipsOperatorMipArg.push_back(tMipsOperatorData(loc, nullptr)); + // Keep 'result' pointing to 'base', since we expect an operator[] to go by next. + } else { + if (field == "mips") + error(loc, "unexpected texture type for .mips[][] operator:", + base->getType().getCompleteString().c_str(), ""); + else + error(loc, "unexpected operator on texture type:", field.c_str(), + base->getType().getCompleteString().c_str()); + } + } else if (base->isVector() || base->isScalar()) { TSwizzleSelectors selectors; parseSwizzleSelector(loc, field, base->getVectorSize(), selectors); @@ -891,7 +978,8 @@ TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TInt } else { TIntermTyped* index = intermediate.addSwizzle(selectors, loc); result = intermediate.addIndex(EOpVectorSwizzle, base, index, loc); - result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, selectors.size())); + result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, + selectors.size())); } } } else if (base->isMatrix()) { @@ -905,10 +993,14 @@ TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TInt result = intermediate.foldDereference(base, selectors[0].coord1, loc); result = intermediate.foldDereference(result, selectors[0].coord2, loc); } else { - result = intermediate.addIndex(EOpIndexDirect, base, intermediate.addConstantUnion(selectors[0].coord1, loc), loc); + result = intermediate.addIndex(EOpIndexDirect, base, + intermediate.addConstantUnion(selectors[0].coord1, loc), + loc); TType dereferencedCol(base->getType(), 0); result->setType(dereferencedCol); - result = intermediate.addIndex(EOpIndexDirect, result, intermediate.addConstantUnion(selectors[0].coord2, loc), loc); + result = intermediate.addIndex(EOpIndexDirect, result, + intermediate.addConstantUnion(selectors[0].coord2, loc), + loc); TType dereferenced(dereferencedCol, 0); result->setType(dereferenced); } @@ -919,7 +1011,8 @@ TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TInt if (base->getType().getQualifier().isFrontEndConstant()) result = intermediate.foldDereference(base, column, loc); else { - result = intermediate.addIndex(EOpIndexDirect, base, intermediate.addConstantUnion(column, loc), loc); + result = intermediate.addIndex(EOpIndexDirect, base, intermediate.addConstantUnion(column, loc), + loc); TType dereferenced(base->getType(), 0); result->setType(dereferenced); } @@ -927,7 +1020,8 @@ TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TInt // general case, not a column, not a single component TIntermTyped* index = intermediate.addSwizzle(selectors, loc); result = intermediate.addIndex(EOpMatrixSwizzle, base, index, loc); - result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, selectors.size())); + result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, + selectors.size())); } } } else if (base->getBasicType() == EbtStruct || base->getBasicType() == EbtBlock) { @@ -941,21 +1035,15 @@ TIntermTyped* HlslParseContext::handleDotDereference(const TSourceLoc& loc, TInt } } if (fieldFound) { - if (base->getAsSymbolNode() && (wasFlattened(base) || shouldFlattenUniform(base->getType()))) { + if (base->getAsSymbolNode() && wasFlattened(base)) { result = flattenAccess(base, member); } else { - // Update the base and member to access if this was a split structure. - result = splitAccessStruct(loc, base, member); - fields = base->getType().getStruct(); - - if (result == nullptr) { - if (base->getType().getQualifier().storage == EvqConst) - result = intermediate.foldDereference(base, member, loc); - else { - TIntermTyped* index = intermediate.addConstantUnion(member, loc); - result = intermediate.addIndex(EOpIndexDirectStruct, base, index, loc); - result->setType(*(*fields)[member].type); - } + if (base->getType().getQualifier().storage == EvqConst) + result = intermediate.foldDereference(base, member, loc); + else { + TIntermTyped* index = intermediate.addConstantUnion(member, loc); + result = intermediate.addIndex(EOpIndexDirectStruct, base, index, loc); + result->setType(*(*fields)[member].type); } } } else @@ -990,111 +1078,107 @@ bool HlslParseContext::isBuiltInMethod(const TSourceLoc&, TIntermTyped* base, co return false; } -// Split the type of the given node into two structs: -// 1. interstage IO -// 2. everything else -// IO members are put into the ioStruct. The type is modified to remove them. -void HlslParseContext::split(TIntermTyped* node) +// Independently establish a built-in that is a member of a structure. +// 'arraySizes' are what's desired for the independent built-in, whatever +// the higher-level source/expression of them was. +void HlslParseContext::splitBuiltIn(const TString& baseName, const TType& memberType, const TArraySizes* arraySizes, + const TQualifier& outerQualifier) { - if (node == nullptr) - return; + // Because of arrays of structs, we might be asked more than once, + // but the arraySizes passed in should have captured the whole thing + // the first time. + // However, clip/cull rely on multiple updates. + if (!isClipOrCullDistance(memberType)) + if (splitBuiltIns.find(tInterstageIoData(memberType.getQualifier().builtIn, outerQualifier.storage)) != + splitBuiltIns.end()) + return; - TIntermSymbol* symNode = node->getAsSymbolNode(); + TVariable* ioVar = makeInternalVariable(baseName + "." + memberType.getFieldName(), memberType); - if (symNode == nullptr) - return; + if (arraySizes != nullptr && !memberType.isArray()) + ioVar->getWritableType().newArraySizes(*arraySizes); - // Create a new variable: - TType& splitType = split(*symNode->getType().clone(), symNode->getName()); + splitBuiltIns[tInterstageIoData(memberType.getQualifier().builtIn, outerQualifier.storage)] = ioVar; + if (!isClipOrCullDistance(ioVar->getType())) + trackLinkage(*ioVar); - splitIoVars[symNode->getId()] = makeInternalVariable(symNode->getName(), splitType); + // Merge qualifier from the user structure + mergeQualifiers(ioVar->getWritableType().getQualifier(), outerQualifier); + + // Fix the builtin type if needed (e.g, some types require fixed array sizes, no matter how the + // shader declared them). This is done after mergeQualifiers(), in case fixBuiltInIoType looks + // at the qualifier to determine e.g, in or out qualifications. + fixBuiltInIoType(ioVar->getWritableType()); + + // But, not location, we're losing that + ioVar->getWritableType().getQualifier().layoutLocation = TQualifier::layoutLocationEnd; } -// Split the type of the given variable into two structs: +// Split a type into +// 1. a struct of non-I/O members +// 2. a collection of independent I/O variables void HlslParseContext::split(const TVariable& variable) { - const TType& type = variable.getType(); - - TString name = variable.getName(); - // Create a new variable: - TType& splitType = split(*type.clone(), name); - - splitIoVars[variable.getUniqueId()] = makeInternalVariable(variable.getName(), splitType); + const TType& clonedType = *variable.getType().clone(); + const TType& splitType = split(clonedType, variable.getName(), clonedType.getQualifier()); + splitNonIoVars[variable.getUniqueId()] = makeInternalVariable(variable.getName(), splitType); } -// Recursive implementation of split(const TVariable& variable). +// Recursive implementation of split(). // Returns reference to the modified type. -TType& HlslParseContext::split(TType& type, TString name, const TType* outerStructType) +const TType& HlslParseContext::split(const TType& type, const TString& name, const TQualifier& outerQualifier) { - const TArraySizes* arraySizes = nullptr; - - // At the outer-most scope, remember the struct type so we can examine its storage class - // at deeper levels. - if (outerStructType == nullptr) - outerStructType = &type; - - if (type.isArray()) - arraySizes = &type.getArraySizes(); - - // We can ignore arrayness: it's uninvolved. if (type.isStruct()) { TTypeList* userStructure = type.getWritableStruct(); - - // Get iterator to (now at end) set of builtin interstage IO members - const auto firstIo = std::stable_partition(userStructure->begin(), userStructure->end(), - [this](const TTypeLoc& t) {return !t.type->isBuiltInInterstageIO(language);}); - - // Move those to the builtin IO. However, we also propagate arrayness (just one level is handled - // now) to this variable. - for (auto ioType = firstIo; ioType != userStructure->end(); ++ioType) { - const TType& memberType = *ioType->type; - TVariable* ioVar = makeInternalVariable(name + (name.empty() ? "" : "_") + memberType.getFieldName(), memberType); - - if (arraySizes) - ioVar->getWritableType().newArraySizes(*arraySizes); - - fixBuiltInIoType(ioVar->getWritableType()); - - interstageBuiltInIo[tInterstageIoData(memberType, *outerStructType)] = ioVar; - - // Merge qualifier from the user structure - mergeQualifiers(ioVar->getWritableType().getQualifier(), outerStructType->getQualifier()); + for (auto ioType = userStructure->begin(); ioType != userStructure->end(); ) { + if (ioType->type->isBuiltIn()) { + // move out the built-in + splitBuiltIn(name, *ioType->type, type.getArraySizes(), outerQualifier); + ioType = userStructure->erase(ioType); + } else { + split(*ioType->type, name + "." + ioType->type->getFieldName(), outerQualifier); + ++ioType; + } } - - // Erase the IO vars from the user structure. - userStructure->erase(firstIo, userStructure->end()); - - // Recurse further into the members. - for (unsigned int i = 0; i < userStructure->size(); ++i) - split(*(*userStructure)[i].type, - name + (name.empty() ? "" : "_") + (*userStructure)[i].type->getFieldName(), - outerStructType); } return type; } -// Is this a uniform array which should be flattened? -bool HlslParseContext::shouldFlattenUniform(const TType& type) const +// Is this an aggregate that should be flattened? +// Can be applied to intermediate levels of type in a hierarchy. +// Some things like flattening uniform arrays are only about the top level +// of the aggregate, triggered on 'topLevel'. +bool HlslParseContext::shouldFlatten(const TType& type, TStorageQualifier qualifier, bool topLevel) const { - const TStorageQualifier qualifier = type.getQualifier().storage; - - return qualifier == EvqUniform && - ((type.isArray() && intermediate.getFlattenUniformArrays()) || type.isStruct()) && - type.containsOpaque(); + switch (qualifier) { + case EvqVaryingIn: + case EvqVaryingOut: + return type.isStruct() || type.isArray(); + case EvqUniform: + return (type.isArray() && intermediate.getFlattenUniformArrays() && topLevel) || + (type.isStruct() && type.containsOpaque()); + default: + return false; + }; } // Top level variable flattening: construct data -void HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable) +void HlslParseContext::flatten(const TVariable& variable, bool linkage) { const TType& type = variable.getType(); + // If it's a standalone built-in, there is nothing to flatten + if (type.isBuiltIn() && !type.isStruct()) + return; + auto entry = flattenMap.insert(std::make_pair(variable.getUniqueId(), - TFlattenData(type.getQualifier().layoutBinding))); + TFlattenData(type.getQualifier().layoutBinding, + type.getQualifier().layoutLocation))); // the item is a map pair, so first->second is the TFlattenData itself. - flatten(loc, variable, type, entry.first->second, ""); + flatten(variable, type, entry.first->second, variable.getName(), linkage, type.getQualifier(), nullptr); } // Recursively flatten the given variable at the provided type, building the flattenData as we go. @@ -1124,15 +1208,17 @@ void HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable) // // so the 4th flattened member in traversal order is ours. // -int HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable, const TType& type, - TFlattenData& flattenData, TString name) +int HlslParseContext::flatten(const TVariable& variable, const TType& type, + TFlattenData& flattenData, TString name, bool linkage, + const TQualifier& outerQualifier, + const TArraySizes* builtInArraySizes) { // If something is an arrayed struct, the array flattener will recursively call flatten() // to then flatten the struct, so this is an "if else": we don't do both. if (type.isArray()) - return flattenArray(loc, variable, type, flattenData, name); + return flattenArray(variable, type, flattenData, name, linkage, outerQualifier); else if (type.isStruct()) - return flattenStruct(loc, variable, type, flattenData, name); + return flattenStruct(variable, type, flattenData, name, linkage, outerQualifier, builtInArraySizes); else { assert(0); // should never happen return -1; @@ -1141,11 +1227,12 @@ int HlslParseContext::flatten(const TSourceLoc& loc, const TVariable& variable, // Add a single flattened member to the flattened data being tracked for the composite // Returns true for the final flattening level. -int HlslParseContext::addFlattenedMember(const TSourceLoc& loc, - const TVariable& variable, const TType& type, TFlattenData& flattenData, - const TString& memberName, bool track) +int HlslParseContext::addFlattenedMember(const TVariable& variable, const TType& type, TFlattenData& flattenData, + const TString& memberName, bool linkage, + const TQualifier& outerQualifier, + const TArraySizes* builtInArraySizes) { - if (isFinalFlattening(type)) { + if (!shouldFlatten(type, outerQualifier.storage, false)) { // This is as far as we flatten. Insert the variable. TVariable* memberVariable = makeInternalVariable(memberName, type); mergeQualifiers(memberVariable->getWritableType().getQualifier(), variable.getType().getQualifier()); @@ -1153,16 +1240,28 @@ int HlslParseContext::addFlattenedMember(const TSourceLoc& loc, if (flattenData.nextBinding != TQualifier::layoutBindingEnd) memberVariable->getWritableType().getQualifier().layoutBinding = flattenData.nextBinding++; + if (memberVariable->getType().isBuiltIn()) { + // inherited locations are nonsensical for built-ins (TODO: what if semantic had a number) + memberVariable->getWritableType().getQualifier().layoutLocation = TQualifier::layoutLocationEnd; + } else { + // inherited locations must be auto bumped, not replicated + if (flattenData.nextLocation != TQualifier::layoutLocationEnd) { + memberVariable->getWritableType().getQualifier().layoutLocation = flattenData.nextLocation; + flattenData.nextLocation += intermediate.computeTypeLocationSize(memberVariable->getType()); + nextOutLocation = std::max(nextOutLocation, flattenData.nextLocation); + } + } + flattenData.offsets.push_back(static_cast(flattenData.members.size())); flattenData.members.push_back(memberVariable); - if (track) + if (linkage) trackLinkage(*memberVariable); - return static_cast(flattenData.offsets.size())-1; // location of the member reference + return static_cast(flattenData.offsets.size()) - 1; // location of the member reference } else { // Further recursion required - return flatten(loc, variable, type, flattenData, memberName); + return flatten(variable, type, flattenData, memberName, linkage, outerQualifier, builtInArraySizes); } } @@ -1170,8 +1269,10 @@ int HlslParseContext::addFlattenedMember(const TSourceLoc& loc, // equivalent set of individual variables. // // Assumes shouldFlatten() or equivalent was called first. -int HlslParseContext::flattenStruct(const TSourceLoc& loc, const TVariable& variable, const TType& type, - TFlattenData& flattenData, TString name) +int HlslParseContext::flattenStruct(const TVariable& variable, const TType& type, + TFlattenData& flattenData, TString name, bool linkage, + const TQualifier& outerQualifier, + const TArraySizes* builtInArraySizes) { assert(type.isStruct()); @@ -1179,15 +1280,22 @@ int HlslParseContext::flattenStruct(const TSourceLoc& loc, const TVariable& vari // Reserve space for this tree level. int start = static_cast(flattenData.offsets.size()); - int pos = start; + int pos = start; flattenData.offsets.resize(int(pos + members.size()), -1); for (int member = 0; member < (int)members.size(); ++member) { TType& dereferencedType = *members[member].type; - const TString memberName = name + (name.empty() ? "" : ".") + dereferencedType.getFieldName(); - - const int mpos = addFlattenedMember(loc, variable, dereferencedType, flattenData, memberName, false); - flattenData.offsets[pos++] = mpos; + if (dereferencedType.isBuiltIn()) + splitBuiltIn(variable.getName(), dereferencedType, builtInArraySizes, outerQualifier); + else { + const int mpos = addFlattenedMember(variable, dereferencedType, flattenData, + name + "." + dereferencedType.getFieldName(), + linkage, outerQualifier, + builtInArraySizes == nullptr && dereferencedType.isArray() + ? &dereferencedType.getArraySizes() + : builtInArraySizes); + flattenData.offsets[pos++] = mpos; + } } return start; @@ -1197,13 +1305,11 @@ int HlslParseContext::flattenStruct(const TSourceLoc& loc, const TVariable& vari // equivalent set of individual variables. // // Assumes shouldFlatten() or equivalent was called first. -int HlslParseContext::flattenArray(const TSourceLoc& loc, const TVariable& variable, const TType& type, - TFlattenData& flattenData, TString name) +int HlslParseContext::flattenArray(const TVariable& variable, const TType& type, + TFlattenData& flattenData, TString name, bool linkage, + const TQualifier& outerQualifier) { - assert(type.isArray()); - - if (type.isImplicitlySizedArray()) - error(loc, "cannot flatten implicitly sized array", variable.getName().c_str(), ""); + assert(type.isArray() && !type.isImplicitlySizedArray()); const int size = type.getOuterArraySize(); const TType dereferencedType(type, 0); @@ -1219,8 +1325,9 @@ int HlslParseContext::flattenArray(const TSourceLoc& loc, const TVariable& varia for (int element=0; element < size; ++element) { char elementNumBuf[20]; // sufficient for MAXINT snprintf(elementNumBuf, sizeof(elementNumBuf)-1, "[%d]", element); - const int mpos = addFlattenedMember(loc, variable, dereferencedType, flattenData, - name + elementNumBuf, true); + const int mpos = addFlattenedMember(variable, dereferencedType, flattenData, + name + elementNumBuf, linkage, outerQualifier, + type.getArraySizes()); flattenData.offsets[pos++] = mpos; } @@ -1232,165 +1339,123 @@ int HlslParseContext::flattenArray(const TSourceLoc& loc, const TVariable& varia bool HlslParseContext::wasFlattened(const TIntermTyped* node) const { return node != nullptr && node->getAsSymbolNode() != nullptr && - wasFlattened(node->getAsSymbolNode()->getId()); + wasFlattened(node->getAsSymbolNode()->getId()); } // Return true if we have split this structure bool HlslParseContext::wasSplit(const TIntermTyped* node) const { return node != nullptr && node->getAsSymbolNode() != nullptr && - wasSplit(node->getAsSymbolNode()->getId()); + wasSplit(node->getAsSymbolNode()->getId()); } // Turn an access into an aggregate that was flattened to instead be // an access to the individual variable the member was flattened to. -// Assumes shouldFlatten() or equivalent was called first. +// Assumes wasFlattened() or equivalent was called first. TIntermTyped* HlslParseContext::flattenAccess(TIntermTyped* base, int member) { const TType dereferencedType(base->getType(), member); // dereferenced type - const TIntermSymbol& symbolNode = *base->getAsSymbolNode(); + TIntermTyped* flattened = flattenAccess(symbolNode.getId(), member, base->getQualifier().storage, + dereferencedType, symbolNode.getFlattenSubset()); - const auto flattenData = flattenMap.find(symbolNode.getId()); + return flattened ? flattened : base; +} +TIntermTyped* HlslParseContext::flattenAccess(int uniqueId, int member, TStorageQualifier outerStorage, + const TType& dereferencedType, int subset) +{ + const auto flattenData = flattenMap.find(uniqueId); if (flattenData == flattenMap.end()) - return base; + return nullptr; // Calculate new cumulative offset from the packed tree - flattenOffset.back() = flattenData->second.offsets[flattenOffset.back() + member]; + int newSubset = flattenData->second.offsets[subset >= 0 ? subset + member : member]; - if (isFinalFlattening(dereferencedType)) { + TIntermSymbol* subsetSymbol; + if (!shouldFlatten(dereferencedType, outerStorage, false)) { // Finished flattening: create symbol for variable - member = flattenData->second.offsets[flattenOffset.back()]; + member = flattenData->second.offsets[newSubset]; const TVariable* memberVariable = flattenData->second.members[member]; - return intermediate.addSymbol(*memberVariable); + subsetSymbol = intermediate.addSymbol(*memberVariable); + subsetSymbol->setFlattenSubset(-1); } else { + // If this is not the final flattening, accumulate the position and return // an object of the partially dereferenced type. - return new TIntermSymbol(symbolNode.getId(), "flattenShadow", dereferencedType); + subsetSymbol = new TIntermSymbol(uniqueId, "flattenShadow", dereferencedType); + subsetSymbol->setFlattenSubset(newSubset); } + + return subsetSymbol; } +// For finding where the first leaf is in a subtree of a multi-level aggregate +// that is just getting a subset assigned. Follows the same logic as flattenAccess, +// but logically going down the "left-most" tree branch each step of the way. +// +// Returns the offset into the first leaf of the subset. +int HlslParseContext::findSubtreeOffset(const TIntermNode& node) const +{ + const TIntermSymbol* sym = node.getAsSymbolNode(); + if (sym == nullptr) + return 0; + if (!sym->isArray() && !sym->isStruct()) + return 0; + int subset = sym->getFlattenSubset(); + if (subset == -1) + return 0; + + // Getting this far means a partial aggregate is identified by the flatten subset. + // Find the first leaf of the subset. + + const auto flattenData = flattenMap.find(sym->getId()); + if (flattenData == flattenMap.end()) + return 0; + + return findSubtreeOffset(sym->getType(), subset, flattenData->second.offsets); + + do { + subset = flattenData->second.offsets[subset]; + } while (true); +} +// Recursively do the desent +int HlslParseContext::findSubtreeOffset(const TType& type, int subset, const TVector& offsets) const +{ + if (!type.isArray() && !type.isStruct()) + return offsets[subset]; + TType derefType(type, 0); + return findSubtreeOffset(derefType, offsets[subset], offsets); +}; + // Find and return the split IO TVariable for id, or nullptr if none. -TVariable* HlslParseContext::getSplitIoVar(int id) const +TVariable* HlslParseContext::getSplitNonIoVar(int id) const { - const auto splitIoVar = splitIoVars.find(id); - - if (splitIoVar == splitIoVars.end()) + const auto splitNonIoVar = splitNonIoVars.find(id); + if (splitNonIoVar == splitNonIoVars.end()) return nullptr; - return splitIoVar->second; + return splitNonIoVar->second; } -// Find and return the split IO TVariable for variable, or nullptr if none. -TVariable* HlslParseContext::getSplitIoVar(const TVariable* var) const -{ - if (var == nullptr) - return nullptr; - - return getSplitIoVar(var->getUniqueId()); -} - -// Find and return the split IO TVariable for symbol in this node, or nullptr if none. -TVariable* HlslParseContext::getSplitIoVar(const TIntermTyped* node) const -{ - if (node == nullptr) - return nullptr; - - const TIntermSymbol* symbolNode = node->getAsSymbolNode(); - - if (symbolNode == nullptr) - return nullptr; - - return getSplitIoVar(symbolNode->getId()); -} - -// Remember the index used to dereference into this structure, in case it has to be moved to a -// split-off builtin IO member. -void HlslParseContext::splitAccessArray(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index) -{ - const TVariable* splitIoVar = getSplitIoVar(base); - - // Not a split structure - if (splitIoVar == nullptr) - return; - - if (builtInIoBase) { - error(loc, "only one array dimension supported for builtIn IO variable", "", ""); - return; - } - - builtInIoBase = base; - builtInIoIndex = index; -} - -// Turn an access into an struct that was split to instead be an -// access to either the modified structure, or a direct reference to -// one of the split member variables. -TIntermTyped* HlslParseContext::splitAccessStruct(const TSourceLoc& loc, TIntermTyped*& base, int& member) -{ - // nothing to do - if (base == nullptr) - return nullptr; - - // We have a pending bracket reference to an outer struct that we may want to move to an inner member. - if (builtInIoBase) - base = builtInIoBase; - - const TVariable* splitIoVar = getSplitIoVar(base); - - if (splitIoVar == nullptr) - return nullptr; - - const TTypeList& members = *base->getType().getStruct(); - - const TType& memberType = *members[member].type; - - if (memberType.isBuiltInInterstageIO(language)) { - // It's one of the interstage IO variables we split off. - TIntermTyped* builtIn = intermediate.addSymbol(*interstageBuiltInIo[tInterstageIoData(memberType, base->getType())], loc); - - // If there's an array reference to an outer split struct, we re-apply it here. - if (builtInIoIndex != nullptr) { - if (builtInIoIndex->getQualifier().storage == EvqConst) - builtIn = intermediate.addIndex(EOpIndexDirect, builtIn, builtInIoIndex, loc); - else - builtIn = intermediate.addIndex(EOpIndexIndirect, builtIn, builtInIoIndex, loc); - - builtIn->setType(memberType); - - builtInIoIndex = nullptr; - builtInIoBase = nullptr; - } - - return builtIn; - } else { - // It's not an IO variable. Find the equivalent index into the new variable. - base = intermediate.addSymbol(*splitIoVar, loc); - - int newMember = 0; - for (int m=0; misBuiltInInterstageIO(language)) - ++newMember; - - member = newMember; - - return nullptr; - } -} - -// Pass through to base class after remembering builtin mappings. +// Pass through to base class after remembering built-in mappings. void HlslParseContext::trackLinkage(TSymbol& symbol) { TBuiltInVariable biType = symbol.getType().getQualifier().builtIn; if (biType != EbvNone) - builtInLinkageSymbols[biType] = symbol.clone(); + builtInTessLinkageSymbols[biType] = symbol.clone(); TParseContextBase::trackLinkage(symbol); } +// Returns true if the built-in is a clip or cull distance variable. +bool HlslParseContext::isClipOrCullDistance(TBuiltInVariable builtIn) +{ + return builtIn == EbvClipDistance || builtIn == EbvCullDistance; +} + // Some types require fixed array sizes in SPIR-V, but can be scalars or // arrays of sizes SPIR-V doesn't allow. For example, tessellation factors. // This creates the right size. A conversion is performed when the internal @@ -1403,9 +1468,7 @@ void HlslParseContext::fixBuiltInIoType(TType& type) switch (type.getQualifier().builtIn) { case EbvTessLevelOuter: requiredArraySize = 4; break; case EbvTessLevelInner: requiredArraySize = 2; break; - case EbvClipDistance: // TODO: ... - case EbvCullDistance: // TODO: ... - return; + case EbvTessCoord: { // tesscoord is always a vec3 for the IO variable, no matter the shader's @@ -1418,16 +1481,28 @@ void HlslParseContext::fixBuiltInIoType(TType& type) break; } default: + if (isClipOrCullDistance(type)) { + const int loc = type.getQualifier().layoutLocation; + + if (type.getQualifier().builtIn == EbvClipDistance) { + if (type.getQualifier().storage == EvqVaryingIn) + clipSemanticNSizeIn[loc] = type.getVectorSize(); + else + clipSemanticNSizeOut[loc] = type.getVectorSize(); + } else { + if (type.getQualifier().storage == EvqVaryingIn) + cullSemanticNSizeIn[loc] = type.getVectorSize(); + else + cullSemanticNSizeOut[loc] = type.getVectorSize(); + } + } + return; } // Alter or set array size as needed. if (requiredArraySize > 0) { - if (type.isArray()) { - // Already an array. Fix the size. - type.changeOuterArraySize(requiredArraySize); - } else { - // it wasn't an array, but needs to be. + if (!type.isArray() || type.getOuterArraySize() != requiredArraySize) { TArraySizes arraySizes; arraySizes.addInnerSize(requiredArraySize); type.newArraySizes(arraySizes); @@ -1436,35 +1511,36 @@ void HlslParseContext::fixBuiltInIoType(TType& type) } // Variables that correspond to the user-interface in and out of a stage -// (not the built-in interface) are assigned locations and -// registered as a linkage node (part of the stage's external interface). -// +// (not the built-in interface) are +// - assigned locations +// - registered as a linkage node (part of the stage's external interface). // Assumes it is called in the order in which locations should be assigned. -void HlslParseContext::assignLocations(TVariable& variable) +void HlslParseContext::assignToInterface(TVariable& variable) { const auto assignLocation = [&](TVariable& variable) { - const TType& type = variable.getType(); - const TQualifier& qualifier = type.getQualifier(); - if (qualifier.storage == EvqVaryingIn || qualifier.storage == EvqVaryingOut) { - if (qualifier.builtIn == EbvNone) { - // Strip off the outer array dimension for those having an extra one. - int size; - if (type.isArray() && qualifier.isArrayedIo(language)) { - TType elementType(type, 0); - size = intermediate.computeTypeLocationSize(elementType); - } else - size = intermediate.computeTypeLocationSize(type); + TType& type = variable.getWritableType(); + if (!type.isStruct() || type.getStruct()->size() > 0) { + TQualifier& qualifier = type.getQualifier(); + if (qualifier.storage == EvqVaryingIn || qualifier.storage == EvqVaryingOut) { + if (qualifier.builtIn == EbvNone && !qualifier.hasLocation()) { + // Strip off the outer array dimension for those having an extra one. + int size; + if (type.isArray() && qualifier.isArrayedIo(language)) { + TType elementType(type, 0); + size = intermediate.computeTypeLocationSize(elementType); + } else + size = intermediate.computeTypeLocationSize(type); - if (qualifier.storage == EvqVaryingIn) { - variable.getWritableType().getQualifier().layoutLocation = nextInLocation; - nextInLocation += size; - } else { - variable.getWritableType().getQualifier().layoutLocation = nextOutLocation; - nextOutLocation += size; + if (qualifier.storage == EvqVaryingIn) { + variable.getWritableType().getQualifier().layoutLocation = nextInLocation; + nextInLocation += size; + } else { + variable.getWritableType().getQualifier().layoutLocation = nextOutLocation; + nextOutLocation += size; + } } + trackLinkage(variable); } - - trackLinkage(variable); } }; @@ -1473,7 +1549,7 @@ void HlslParseContext::assignLocations(TVariable& variable) for (auto member = memberList.begin(); member != memberList.end(); ++member) assignLocation(**member); } else if (wasSplit(variable.getUniqueId())) { - TVariable* splitIoVar = getSplitIoVar(&variable); + TVariable* splitIoVar = getSplitNonIoVar(variable.getUniqueId()); assignLocation(*splitIoVar); } else { assignLocation(variable); @@ -1514,30 +1590,27 @@ void HlslParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunction error(loc, "function name is redeclaration of existing name", function.getName().c_str(), ""); } -// Add interstage IO variables to the linkage in canonical order. -void HlslParseContext::addInterstageIoToLinkage() +// For struct buffers with counters, we must pass the counter buffer as hidden parameter. +// This adds the hidden parameter to the parameter list in 'paramNodes' if needed. +// Otherwise, it's a no-op +void HlslParseContext::addStructBufferHiddenCounterParam(const TSourceLoc& loc, TParameter& param, + TIntermAggregate*& paramNodes) { - TSourceLoc loc; - loc.init(); + if (! hasStructBuffCounter(*param.type)) + return; - std::vector io; - io.reserve(interstageBuiltInIo.size()); + const TString counterBlockName(getStructBuffCounterName(*param.name)); - for (auto ioVar = interstageBuiltInIo.begin(); ioVar != interstageBuiltInIo.end(); ++ioVar) - io.push_back(ioVar->first); + TType counterType; + counterBufferType(loc, counterType); + TVariable *variable = makeInternalVariable(counterBlockName, counterType); - // Our canonical order is the TBuiltInVariable numeric order. - std::sort(io.begin(), io.end()); + if (! symbolTable.insert(*variable)) + error(loc, "redefinition", variable->getName().c_str(), ""); - // We have to (potentially) track two IO blocks, one in, one out. E.g, a GS may have a - // PerVertex block in both directions, possibly with different members. - for (int idx = 0; idx < int(io.size()); ++idx) { - TVariable* var = interstageBuiltInIo[io[idx]]; - - // Add the loose interstage IO to the linkage - if (var->getType().isLooseAndBuiltIn(language)) - trackLinkage(*var); - } + paramNodes = intermediate.growAggregate(paramNodes, + intermediate.addSymbol(*variable, loc), + loc); } // @@ -1547,13 +1620,14 @@ void HlslParseContext::addInterstageIoToLinkage() // Returns an aggregate of parameter-symbol nodes. // TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& loc, TFunction& function, - const TAttributeMap& attributes, TIntermNode*& entryPointTree) + const TAttributes& attributes, + TIntermNode*& entryPointTree) { currentCaller = function.getMangledName(); TSymbol* symbol = symbolTable.find(function.getMangledName()); TFunction* prevDec = symbol ? symbol->getAsFunction() : nullptr; - if (! prevDec) + if (prevDec == nullptr) error(loc, "can't find function", function.getName().c_str(), ""); // Note: 'prevDec' could be 'function' if this is the first time we've seen function // as it would have just been put in the symbol table. Otherwise, we're looking up @@ -1601,13 +1675,33 @@ TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& l symbolTable.makeInternalVariable(*variable); pushImplicitThis(variable); } + // Insert the parameters with name in the symbol table. if (! symbolTable.insert(*variable)) error(loc, "redefinition", variable->getName().c_str(), ""); - // Add the parameter to the AST - paramNodes = intermediate.growAggregate(paramNodes, - intermediate.addSymbol(*variable, loc), - loc); + + // Add parameters to the AST list. + if (shouldFlatten(variable->getType(), variable->getType().getQualifier().storage, true)) { + // Expand the AST parameter nodes (but not the name mangling or symbol table view) + // for structures that need to be flattened. + flatten(*variable, false); + const TTypeList* structure = variable->getType().getStruct(); + for (int mem = 0; mem < (int)structure->size(); ++mem) { + paramNodes = intermediate.growAggregate(paramNodes, + flattenAccess(variable->getUniqueId(), mem, + variable->getType().getQualifier().storage, + *(*structure)[mem].type), + loc); + } + } else { + // Add the parameter to the AST + paramNodes = intermediate.growAggregate(paramNodes, + intermediate.addSymbol(*variable, loc), + loc); + } + + // Add hidden AST parameter for struct buffer counters, if needed. + addStructBufferHiddenCounterParam(loc, param, paramNodes); } else paramNodes = intermediate.growAggregate(paramNodes, intermediate.addSymbol(*param.type, loc), loc); } @@ -1622,142 +1716,217 @@ TIntermAggregate* HlslParseContext::handleFunctionDefinition(const TSourceLoc& l return paramNodes; } - // Handle all [attrib] attribute for the shader entry point -void HlslParseContext::handleEntryPointAttributes(const TSourceLoc& loc, const TAttributeMap& attributes) +void HlslParseContext::handleEntryPointAttributes(const TSourceLoc& loc, const TAttributes& attributes) { - // Handle entry-point function attributes - const TIntermAggregate* numThreads = attributes[EatNumThreads]; - if (numThreads != nullptr) { - const TIntermSequence& sequence = numThreads->getSequence(); - - for (int lid = 0; lid < int(sequence.size()); ++lid) - intermediate.setLocalSize(lid, sequence[lid]->getAsConstantUnion()->getConstArray()[0].getIConst()); - } - - // MaxVertexCount - const TIntermAggregate* maxVertexCount = attributes[EatMaxVertexCount]; - if (maxVertexCount != nullptr) { - if (! intermediate.setVertices(maxVertexCount->getSequence()[0]->getAsConstantUnion()->getConstArray()[0].getIConst())) { - error(loc, "cannot change previously set maxvertexcount attribute", "", ""); + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + switch (it->name) { + case EatNumThreads: + { + const TIntermSequence& sequence = it->args->getSequence(); + for (int lid = 0; lid < int(sequence.size()); ++lid) + intermediate.setLocalSize(lid, sequence[lid]->getAsConstantUnion()->getConstArray()[0].getIConst()); + break; } - } + case EatMaxVertexCount: + { + int maxVertexCount; - // Handle [patchconstantfunction("...")] - const TIntermAggregate* pcfAttr = attributes[EatPatchConstantFunc]; - if (pcfAttr != nullptr) { - const TConstUnion& pcfName = pcfAttr->getSequence()[0]->getAsConstantUnion()->getConstArray()[0]; - - if (pcfName.getType() != EbtString) { - error(loc, "invalid patch constant function", "", ""); - } else { - patchConstantFunctionName = *pcfName.getSConst(); + if (! it->getInt(maxVertexCount)) { + error(loc, "invalid maxvertexcount", "", ""); + } else { + if (! intermediate.setVertices(maxVertexCount)) + error(loc, "cannot change previously set maxvertexcount attribute", "", ""); + } + break; } - } - - // Handle [domain("...")] - const TIntermAggregate* domainAttr = attributes[EatDomain]; - if (domainAttr != nullptr) { - const TConstUnion& domainType = domainAttr->getSequence()[0]->getAsConstantUnion()->getConstArray()[0]; - if (domainType.getType() != EbtString) { - error(loc, "invalid domain", "", ""); - } else { - TString domainStr = *domainType.getSConst(); - std::transform(domainStr.begin(), domainStr.end(), domainStr.begin(), ::tolower); - - TLayoutGeometry domain = ElgNone; - - if (domainStr == "tri") { - domain = ElgTriangles; - } else if (domainStr == "quad") { - domain = ElgQuads; - } else if (domainStr == "isoline") { - domain = ElgIsolines; + case EatPatchConstantFunc: + { + TString pcfName; + if (! it->getString(pcfName, 0, false)) { + error(loc, "invalid patch constant function", "", ""); } else { - error(loc, "unsupported domain type", domainStr.c_str(), ""); - } - - if (language == EShLangTessEvaluation) { - if (! intermediate.setInputPrimitive(domain)) - error(loc, "cannot change previously set domain", TQualifier::getGeometryString(domain), ""); - } else { - if (! intermediate.setOutputPrimitive(domain)) - error(loc, "cannot change previously set domain", TQualifier::getGeometryString(domain), ""); + patchConstantFunctionName = pcfName; } + break; } - } - - // Handle [outputtoplogy("...")] - const TIntermAggregate* topologyAttr = attributes[EatOutputTopology]; - if (topologyAttr != nullptr) { - const TConstUnion& topoType = topologyAttr->getSequence()[0]->getAsConstantUnion()->getConstArray()[0]; - if (topoType.getType() != EbtString) { - error(loc, "invalid outputtoplogy", "", ""); - } else { - TString topologyStr = *topoType.getSConst(); - std::transform(topologyStr.begin(), topologyStr.end(), topologyStr.begin(), ::tolower); - - TVertexOrder topology = EvoNone; - - if (topologyStr == "point") { - topology = EvoNone; - } else if (topologyStr == "line") { - topology = EvoNone; - } else if (topologyStr == "triangle_cw") { - topology = EvoCw; - } else if (topologyStr == "triangle_ccw") { - topology = EvoCcw; + case EatDomain: + { + // Handle [domain("...")] + TString domainStr; + if (! it->getString(domainStr)) { + error(loc, "invalid domain", "", ""); } else { - error(loc, "unsupported outputtoplogy type", topologyStr.c_str(), ""); - } + TLayoutGeometry domain = ElgNone; - if (topology != EvoNone) { - if (! intermediate.setVertexOrder(topology)) { - error(loc, "cannot change previously set outputtopology", TQualifier::getVertexOrderString(topology), ""); + if (domainStr == "tri") { + domain = ElgTriangles; + } else if (domainStr == "quad") { + domain = ElgQuads; + } else if (domainStr == "isoline") { + domain = ElgIsolines; + } else { + error(loc, "unsupported domain type", domainStr.c_str(), ""); + } + + if (language == EShLangTessEvaluation) { + if (! intermediate.setInputPrimitive(domain)) + error(loc, "cannot change previously set domain", TQualifier::getGeometryString(domain), ""); + } else { + if (! intermediate.setOutputPrimitive(domain)) + error(loc, "cannot change previously set domain", TQualifier::getGeometryString(domain), ""); } } + break; } - } - - // Handle [partitioning("...")] - const TIntermAggregate* partitionAttr = attributes[EatPartitioning]; - if (partitionAttr != nullptr) { - const TConstUnion& partType = partitionAttr->getSequence()[0]->getAsConstantUnion()->getConstArray()[0]; - if (partType.getType() != EbtString) { - error(loc, "invalid partitioning", "", ""); - } else { - TString partitionStr = *partType.getSConst(); - std::transform(partitionStr.begin(), partitionStr.end(), partitionStr.begin(), ::tolower); - - TVertexSpacing partitioning = EvsNone; - - if (partitionStr == "integer") { - partitioning = EvsEqual; - } else if (partitionStr == "fractional_even") { - partitioning = EvsFractionalEven; - } else if (partitionStr == "fractional_odd") { - partitioning = EvsFractionalOdd; - //} else if (partition == "pow2") { // TODO: currently nothing to map this to. + case EatOutputTopology: + { + // Handle [outputtopology("...")] + TString topologyStr; + if (! it->getString(topologyStr)) { + error(loc, "invalid outputtopology", "", ""); } else { - error(loc, "unsupported partitioning type", partitionStr.c_str(), ""); - } + TVertexOrder vertexOrder = EvoNone; + TLayoutGeometry primitive = ElgNone; - if (! intermediate.setVertexSpacing(partitioning)) - error(loc, "cannot change previously set partitioning", TQualifier::getVertexSpacingString(partitioning), ""); + if (topologyStr == "point") { + intermediate.setPointMode(); + } else if (topologyStr == "line") { + primitive = ElgIsolines; + } else if (topologyStr == "triangle_cw") { + vertexOrder = EvoCw; + primitive = ElgTriangles; + } else if (topologyStr == "triangle_ccw") { + vertexOrder = EvoCcw; + primitive = ElgTriangles; + } else { + error(loc, "unsupported outputtopology type", topologyStr.c_str(), ""); + } + + if (vertexOrder != EvoNone) { + if (! intermediate.setVertexOrder(vertexOrder)) { + error(loc, "cannot change previously set outputtopology", + TQualifier::getVertexOrderString(vertexOrder), ""); + } + } + if (primitive != ElgNone) + intermediate.setOutputPrimitive(primitive); + } + break; + } + case EatPartitioning: + { + // Handle [partitioning("...")] + TString partitionStr; + if (! it->getString(partitionStr)) { + error(loc, "invalid partitioning", "", ""); + } else { + TVertexSpacing partitioning = EvsNone; + + if (partitionStr == "integer") { + partitioning = EvsEqual; + } else if (partitionStr == "fractional_even") { + partitioning = EvsFractionalEven; + } else if (partitionStr == "fractional_odd") { + partitioning = EvsFractionalOdd; + //} else if (partition == "pow2") { // TODO: currently nothing to map this to. + } else { + error(loc, "unsupported partitioning type", partitionStr.c_str(), ""); + } + + if (! intermediate.setVertexSpacing(partitioning)) + error(loc, "cannot change previously set partitioning", + TQualifier::getVertexSpacingString(partitioning), ""); + } + break; + } + case EatOutputControlPoints: + { + // Handle [outputcontrolpoints("...")] + int ctrlPoints; + if (! it->getInt(ctrlPoints)) { + error(loc, "invalid outputcontrolpoints", "", ""); + } else { + if (! intermediate.setVertices(ctrlPoints)) { + error(loc, "cannot change previously set outputcontrolpoints attribute", "", ""); + } + } + break; + } + case EatBuiltIn: + case EatLocation: + // tolerate these because of dual use of entrypoint and type attributes + break; + default: + warn(loc, "attribute does not apply to entry point", "", ""); + break; } } +} - // Handle [outputcontrolpoints("...")] - const TIntermAggregate* outputControlPoints = attributes[EatOutputControlPoints]; - if (outputControlPoints != nullptr) { - const TConstUnion& ctrlPointConst = outputControlPoints->getSequence()[0]->getAsConstantUnion()->getConstArray()[0]; - if (ctrlPointConst.getType() != EbtInt) { - error(loc, "invalid outputcontrolpoints", "", ""); - } else { - const int ctrlPoints = ctrlPointConst.getIConst(); - if (! intermediate.setVertices(ctrlPoints)) { - error(loc, "cannot change previously set outputcontrolpoints attribute", "", ""); +// Update the given type with any type-like attribute information in the +// attributes. +void HlslParseContext::transferTypeAttributes(const TSourceLoc& loc, const TAttributes& attributes, TType& type, + bool allowEntry) +{ + if (attributes.size() == 0) + return; + + int value; + TString builtInString; + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + switch (it->name) { + case EatLocation: + // location + if (it->getInt(value)) + type.getQualifier().layoutLocation = value; + break; + case EatBinding: + // binding + if (it->getInt(value)) { + type.getQualifier().layoutBinding = value; + type.getQualifier().layoutSet = 0; } + // set + if (it->getInt(value, 1)) + type.getQualifier().layoutSet = value; + break; + case EatGlobalBinding: + // global cbuffer binding + if (it->getInt(value)) + globalUniformBinding = value; + // global cbuffer binding + if (it->getInt(value, 1)) + globalUniformSet = value; + break; + case EatInputAttachment: + // input attachment + if (it->getInt(value)) + type.getQualifier().layoutAttachment = value; + break; + case EatBuiltIn: + // PointSize built-in + if (it->getString(builtInString, 0, false)) { + if (builtInString == "PointSize") + type.getQualifier().builtIn = EbvPointSize; + } + break; + case EatPushConstant: + // push_constant + type.getQualifier().layoutPushConstant = true; + break; + case EatConstantId: + // specialization constant + if (it->getInt(value)) { + TSourceLoc loc; + loc.init(); + setSpecConstantId(loc, type.getQualifier(), value); + } + break; + default: + if (! allowEntry) + warn(loc, "attribute does not apply to a type", "", ""); + break; } } } @@ -1783,23 +1952,26 @@ void HlslParseContext::handleEntryPointAttributes(const TSourceLoc& loc, const T // ret = @shaderEntryPoint(args...); // oargs = args...; // } +// retType @shaderEntryPoint(args...) +// { body } // // The symbol table will still map the original entry point name to the -// the modified function and it's new name: +// the modified function and its new name: // // symbol table: shaderEntryPoint -> @shaderEntryPoint // // Returns nullptr if no entry-point tree was built, otherwise, returns // a subtree that creates the entry point. // -TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunction& userFunction, const TAttributeMap& attributes) +TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunction& userFunction, + const TAttributes& attributes) { // Return true if this is a tessellation patch constant function input to a domain shader. const auto isDsPcfInput = [this](const TType& type) { return language == EShLangTessEvaluation && type.contains([](const TType* t) { return t->getQualifier().builtIn == EbvTessLevelOuter || - t->getQualifier().builtIn == EbvTessLevelInner; + t->getQualifier().builtIn == EbvTessLevelInner; }); }; @@ -1825,22 +1997,26 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct // Further this return/in/out transform by flattening, splitting, and assigning locations const auto makeVariableInOut = [&](TVariable& variable) { if (variable.getType().isStruct()) { - const TStorageQualifier qualifier = variable.getType().getQualifier().storage; - // struct inputs to the vertex stage and outputs from the fragment stage must be flattened - if ((language == EShLangVertex && qualifier == EvqVaryingIn) || - (language == EShLangFragment && qualifier == EvqVaryingOut)) - flatten(loc, variable); - // Mixture of IO and non-IO must be split - else if (variable.getType().containsBuiltInInterstageIO(language)) - split(variable); + if (variable.getType().getQualifier().isArrayedIo(language)) { + if (variable.getType().containsBuiltIn()) + split(variable); + } else if (shouldFlatten(variable.getType(), EvqVaryingIn /* not assigned yet, but close enough */, true)) + flatten(variable, false /* don't track linkage here, it will be tracked in assignToInterface() */); } + // TODO: flatten arrays too + // TODO: flatten everything in I/O + // TODO: replace all split with flatten, make all paths can create flattened I/O, then split code can be removed - assignLocations(variable); + // For clip and cull distance, multiple output variables potentially get merged + // into one in assignClipCullDistance. That code in assignClipCullDistance + // handles the interface logic, so we avoid it here in that case. + if (!isClipOrCullDistance(variable.getType())) + assignToInterface(variable); }; - if (entryPointOutput) + if (entryPointOutput != nullptr) makeVariableInOut(*entryPointOutput); for (auto it = inputs.begin(); it != inputs.end(); ++it) - if (!isDsPcfInput((*it)->getType())) // skip domain shader PCF input (see comment below) + if (!isDsPcfInput((*it)->getType())) // wait until the end for PCF input (see comment below) makeVariableInOut(*(*it)); for (auto it = outputs.begin(); it != outputs.end(); ++it) makeVariableInOut(*(*it)); @@ -1852,7 +2028,7 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct // however, so this ensures the linkage is built in the correct order regardless of argument order. if (language == EShLangTessEvaluation) { for (auto it = inputs.begin(); it != inputs.end(); ++it) - if (isDsPcfInput((*it)->getType())) // skip domain shader PCF input (see comment below) + if (isDsPcfInput((*it)->getType())) makeVariableInOut(*(*it)); } @@ -1881,11 +2057,13 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct for (int i = 0; i < userFunction.getParamCount(); i++) { TParameter& param = userFunction[i]; argVars.push_back(makeInternalVariable(*param.name, *param.type)); - argVars.back()->getWritableType().getQualifier().makeTemporary(); - TIntermSymbol* arg = intermediate.addSymbol(*argVars.back()); + // Track the input patch, which is the only non-builtin supported by hull shader PCF. + if (param.getDeclaredBuiltIn() == EbvInputPatch) + inputPatch = argVars.back(); + TIntermSymbol* arg = intermediate.addSymbol(*argVars.back()); handleFunctionArgument(&callee, callingArgs, arg); if (param.type->getQualifier().isParamInput()) { intermediate.growAggregate(synthBody, handleAssign(loc, EOpAssign, arg, @@ -1907,7 +2085,7 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct // an array element as indexed by invocation ID, which we might have to make up. // This is required to match SPIR-V semantics. if (language == EShLangTessControl) { - TIntermSymbol* invocationIdSym = findLinkageSymbol(EbvInvocationId); + TIntermSymbol* invocationIdSym = findTessLinkageSymbol(EbvInvocationId); // If there is no user declared invocation ID, we must make one. if (invocationIdSym == nullptr) { @@ -1925,13 +2103,15 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct TIntermTyped* element = intermediate.addIndex(EOpIndexIndirect, intermediate.addSymbol(*entryPointOutput), invocationIdSym, loc); - element->setType(callReturn->getType()); + + // Set the type of the array element being dereferenced + const TType derefElementType(entryPointOutput->getType(), 0); + element->setType(derefElementType); returnAssign = handleAssign(loc, EOpAssign, element, callReturn); } else { returnAssign = handleAssign(loc, EOpAssign, intermediate.addSymbol(*entryPointOutput), callReturn); } - intermediate.growAggregate(synthBody, returnAssign); } else intermediate.growAggregate(synthBody, callReturn); @@ -1943,7 +2123,7 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct // GS outputs are via emit, so we do not copy them here. if (param.type->getQualifier().isParamOutput()) { - if (param.declaredBuiltIn == EbvGsOutputStream) { + if (param.getDeclaredBuiltIn() == EbvGsOutputStream) { // GS output stream does not assign outputs here: it's the Append() method // which writes to the output, probably multiple times separated by Emit. // We merely remember the output to use, here. @@ -1969,7 +2149,8 @@ TIntermNode* HlslParseContext::transformEntryPoint(const TSourceLoc& loc, TFunct return synthFunctionDef; } -void HlslParseContext::handleFunctionBody(const TSourceLoc& loc, TFunction& function, TIntermNode* functionBody, TIntermNode*& node) +void HlslParseContext::handleFunctionBody(const TSourceLoc& loc, TFunction& function, TIntermNode* functionBody, + TIntermNode*& node) { node = intermediate.growAggregate(node, functionBody); intermediate.setAggregateOperator(node, EOpFunction, function.getType(), loc); @@ -1989,12 +2170,63 @@ void HlslParseContext::handleFunctionBody(const TSourceLoc& loc, TFunction& func void HlslParseContext::remapEntryPointIO(TFunction& function, TVariable*& returnValue, TVector& inputs, TVector& outputs) { + // We might have in input structure type with no decorations that caused it + // to look like an input type, yet it has (e.g.) interpolation types that + // must be modified that turn it into an input type. + // Hence, a missing ioTypeMap for 'input' might need to be synthesized. + const auto synthesizeEditedInput = [this](TType& type) { + // True if a type needs to be 'flat' + const auto needsFlat = [](const TType& type) { + return type.containsBasicType(EbtInt) || + type.containsBasicType(EbtUint) || + type.containsBasicType(EbtInt64) || + type.containsBasicType(EbtUint64) || + type.containsBasicType(EbtBool) || + type.containsBasicType(EbtDouble); + }; + + if (language == EShLangFragment && needsFlat(type)) { + if (type.isStruct()) { + TTypeList* finalList = nullptr; + auto it = ioTypeMap.find(type.getStruct()); + if (it == ioTypeMap.end() || it->second.input == nullptr) { + // Getting here means we have no input struct, but we need one. + auto list = new TTypeList; + for (auto member = type.getStruct()->begin(); member != type.getStruct()->end(); ++member) { + TType* newType = new TType; + newType->shallowCopy(*member->type); + TTypeLoc typeLoc = { newType, member->loc }; + list->push_back(typeLoc); + } + // install the new input type + if (it == ioTypeMap.end()) { + tIoKinds newLists = { list, nullptr, nullptr }; + ioTypeMap[type.getStruct()] = newLists; + } else + it->second.input = list; + finalList = list; + } else + finalList = it->second.input; + // edit for 'flat' + for (auto member = finalList->begin(); member != finalList->end(); ++member) { + if (needsFlat(*member->type)) { + member->type->getQualifier().clearInterpolation(); + member->type->getQualifier().flat = true; + } + } + } else { + type.getQualifier().clearInterpolation(); + type.getQualifier().flat = true; + } + } + }; + // Do the actual work to make a type be a shader input or output variable, // and clear the original to be non-IO (for use as a normal function parameter/return). const auto makeIoVariable = [this](const char* name, TType& type, TStorageQualifier storage) -> TVariable* { TVariable* ioVariable = makeInternalVariable(name, type); clearUniformInputOutput(type.getQualifier()); - if (type.getStruct() != nullptr) { + if (type.isStruct()) { auto newLists = ioTypeMap.find(ioVariable->getType().getStruct()); if (newLists != ioTypeMap.end()) { if (storage == EvqVaryingIn && newLists->second.input) @@ -2047,11 +2279,9 @@ void HlslParseContext::remapEntryPointIO(TFunction& function, TVariable*& return for (int i = 0; i < function.getParamCount(); i++) { TType& paramType = *function[i].type; if (paramType.getQualifier().isParamInput()) { + synthesizeEditedInput(paramType); TVariable* argAsGlobal = makeIoVariable(function[i].name->c_str(), paramType, EvqVaryingIn); inputs.push_back(argAsGlobal); - - if (function[i].declaredBuiltIn == EbvInputPatch) - inputPatch = argAsGlobal; } if (paramType.getQualifier().isParamOutput()) { TVariable* argAsGlobal = makeIoVariable(function[i].name->c_str(), paramType, EvqVaryingOut); @@ -2087,8 +2317,8 @@ TIntermNode* HlslParseContext::handleReturnValue(const TSourceLoc& loc, TIntermT } else if (*currentFunctionType != value->getType()) { value = intermediate.addConversion(EOpReturn, *currentFunctionType, value); if (value && *currentFunctionType != value->getType()) - value = intermediate.addShapeConversion(EOpReturn, *currentFunctionType, value); - if (value == nullptr) { + value = intermediate.addUniShapeConversion(EOpReturn, *currentFunctionType, value); + if (value == nullptr || *currentFunctionType != value->getType()) { error(loc, "type does not match, or is not convertible to, the function's return type", "return", ""); return value; } @@ -2110,30 +2340,356 @@ void HlslParseContext::handleFunctionArgument(TFunction* function, arguments = newArg; } +// Position may require special handling: we can optionally invert Y. +// See: https://github.com/KhronosGroup/glslang/issues/1173 +// https://github.com/KhronosGroup/glslang/issues/494 +TIntermTyped* HlslParseContext::assignPosition(const TSourceLoc& loc, TOperator op, + TIntermTyped* left, TIntermTyped* right) +{ + // If we are not asked for Y inversion, use a plain old assign. + if (!intermediate.getInvertY()) + return intermediate.addAssign(op, left, right, loc); + + // If we get here, we should invert Y. + TIntermAggregate* assignList = nullptr; + + // If this is a complex rvalue, we don't want to dereference it many times. Create a temporary. + TVariable* rhsTempVar = nullptr; + rhsTempVar = makeInternalVariable("@position", right->getType()); + rhsTempVar->getWritableType().getQualifier().makeTemporary(); + + { + TIntermTyped* rhsTempSym = intermediate.addSymbol(*rhsTempVar, loc); + assignList = intermediate.growAggregate(assignList, + intermediate.addAssign(EOpAssign, rhsTempSym, right, loc), loc); + } + + // pos.y = -pos.y + { + const int Y = 1; + + TIntermTyped* tempSymL = intermediate.addSymbol(*rhsTempVar, loc); + TIntermTyped* tempSymR = intermediate.addSymbol(*rhsTempVar, loc); + TIntermTyped* index = intermediate.addConstantUnion(Y, loc); + + TIntermTyped* lhsElement = intermediate.addIndex(EOpIndexDirect, tempSymL, index, loc); + TIntermTyped* rhsElement = intermediate.addIndex(EOpIndexDirect, tempSymR, index, loc); + + const TType derefType(right->getType(), 0); + + lhsElement->setType(derefType); + rhsElement->setType(derefType); + + TIntermTyped* yNeg = intermediate.addUnaryMath(EOpNegative, rhsElement, loc); + + assignList = intermediate.growAggregate(assignList, intermediate.addAssign(EOpAssign, lhsElement, yNeg, loc)); + } + + // Assign the rhs temp (now with Y inversion) to the final output + { + TIntermTyped* rhsTempSym = intermediate.addSymbol(*rhsTempVar, loc); + assignList = intermediate.growAggregate(assignList, intermediate.addAssign(op, left, rhsTempSym, loc)); + } + + assert(assignList != nullptr); + assignList->setOperator(EOpSequence); + + return assignList; +} + +// Clip and cull distance require special handling due to a semantic mismatch. In HLSL, +// these can be float scalar, float vector, or arrays of float scalar or float vector. +// In SPIR-V, they are arrays of scalar floats in all cases. We must copy individual components +// (e.g, both x and y components of a float2) out into the destination float array. +// +// The values are assigned to sequential members of the output array. The inner dimension +// is vector components. The outer dimension is array elements. +TIntermAggregate* HlslParseContext::assignClipCullDistance(const TSourceLoc& loc, TOperator op, int semanticId, + TIntermTyped* left, TIntermTyped* right) +{ + switch (language) { + case EShLangFragment: + case EShLangVertex: + case EShLangGeometry: + break; + default: + error(loc, "unimplemented: clip/cull not currently implemented for this stage", "", ""); + return nullptr; + } + + TVariable** clipCullVar = nullptr; + + // Figure out if we are assigning to, or from, clip or cull distance. + const bool isOutput = isClipOrCullDistance(left->getType()); + + // This is the rvalue or lvalue holding the clip or cull distance. + TIntermTyped* clipCullNode = isOutput ? left : right; + // This is the value going into or out of the clip or cull distance. + TIntermTyped* internalNode = isOutput ? right : left; + + const TBuiltInVariable builtInType = clipCullNode->getQualifier().builtIn; + + decltype(clipSemanticNSizeIn)* semanticNSize = nullptr; + + // Refer to either the clip or the cull distance, depending on semantic. + switch (builtInType) { + case EbvClipDistance: + clipCullVar = isOutput ? &clipDistanceOutput : &clipDistanceInput; + semanticNSize = isOutput ? &clipSemanticNSizeOut : &clipSemanticNSizeIn; + break; + case EbvCullDistance: + clipCullVar = isOutput ? &cullDistanceOutput : &cullDistanceInput; + semanticNSize = isOutput ? &cullSemanticNSizeOut : &cullSemanticNSizeIn; + break; + + // called invalidly: we expected a clip or a cull distance. + // static compile time problem: should not happen. + default: assert(0); return nullptr; + } + + // This is the offset in the destination array of a given semantic's data + std::array semanticOffset; + + // Calculate offset of variable of semantic N in destination array + int arrayLoc = 0; + int vecItems = 0; + + for (int x = 0; x < maxClipCullRegs; ++x) { + // See if we overflowed the vec4 packing + if ((vecItems + (*semanticNSize)[x]) > 4) { + arrayLoc = (arrayLoc + 3) & (~0x3); // round up to next multiple of 4 + vecItems = 0; + } + + semanticOffset[x] = arrayLoc; + vecItems += (*semanticNSize)[x]; + arrayLoc += (*semanticNSize)[x]; + } + + + // It can have up to 2 array dimensions (in the case of geometry shader inputs) + const TArraySizes* const internalArraySizes = internalNode->getType().getArraySizes(); + const int internalArrayDims = internalNode->getType().isArray() ? internalArraySizes->getNumDims() : 0; + // vector sizes: + const int internalVectorSize = internalNode->getType().getVectorSize(); + // array sizes, or 1 if it's not an array: + const int internalInnerArraySize = (internalArrayDims > 0 ? internalArraySizes->getDimSize(internalArrayDims-1) : 1); + const int internalOuterArraySize = (internalArrayDims > 1 ? internalArraySizes->getDimSize(0) : 1); + + // The created type may be an array of arrays, e.g, for geometry shader inputs. + const bool isImplicitlyArrayed = (language == EShLangGeometry && !isOutput); + + // If we haven't created the output already, create it now. + if (*clipCullVar == nullptr) { + // ClipDistance and CullDistance are handled specially in the entry point input/output copy + // algorithm, because they may need to be unpacked from components of vectors (or a scalar) + // into a float array, or vice versa. Here, we make the array the right size and type, + // which depends on the incoming data, which has several potential dimensions: + // * Semantic ID + // * vector size + // * array size + // Of those, semantic ID and array size cannot appear simultaneously. + // + // Also to note: for implicitly arrayed forms (e.g, geometry shader inputs), we need to create two + // array dimensions. The shader's declaration may have one or two array dimensions. One is always + // the geometry's dimension. + + const bool useInnerSize = internalArrayDims > 1 || !isImplicitlyArrayed; + + const int requiredInnerArraySize = arrayLoc * (useInnerSize ? internalInnerArraySize : 1); + const int requiredOuterArraySize = (internalArrayDims > 0) ? internalArraySizes->getDimSize(0) : 1; + + TType clipCullType(EbtFloat, clipCullNode->getType().getQualifier().storage, 1); + clipCullType.getQualifier() = clipCullNode->getType().getQualifier(); + + // Create required array dimension + TArraySizes arraySizes; + if (isImplicitlyArrayed) + arraySizes.addInnerSize(requiredOuterArraySize); + arraySizes.addInnerSize(requiredInnerArraySize); + clipCullType.newArraySizes(arraySizes); + + // Obtain symbol name: we'll use that for the symbol we introduce. + TIntermSymbol* sym = clipCullNode->getAsSymbolNode(); + assert(sym != nullptr); + + // We are moving the semantic ID from the layout location, so it is no longer needed or + // desired there. + clipCullType.getQualifier().layoutLocation = TQualifier::layoutLocationEnd; + + // Create variable and track its linkage + *clipCullVar = makeInternalVariable(sym->getName().c_str(), clipCullType); + + trackLinkage(**clipCullVar); + } + + // Create symbol for the clip or cull variable. + TIntermSymbol* clipCullSym = intermediate.addSymbol(**clipCullVar); + + // vector sizes: + const int clipCullVectorSize = clipCullSym->getType().getVectorSize(); + + // array sizes, or 1 if it's not an array: + const TArraySizes* const clipCullArraySizes = clipCullSym->getType().getArraySizes(); + const int clipCullOuterArraySize = isImplicitlyArrayed ? clipCullArraySizes->getDimSize(0) : 1; + const int clipCullInnerArraySize = clipCullArraySizes->getDimSize(isImplicitlyArrayed ? 1 : 0); + + // clipCullSym has got to be an array of scalar floats, per SPIR-V semantics. + // fixBuiltInIoType() should have handled that upstream. + assert(clipCullSym->getType().isArray()); + assert(clipCullSym->getType().getVectorSize() == 1); + assert(clipCullSym->getType().getBasicType() == EbtFloat); + + // We may be creating multiple sub-assignments. This is an aggregate to hold them. + // TODO: it would be possible to be clever sometimes and avoid the sequence node if not needed. + TIntermAggregate* assignList = nullptr; + + // Holds individual component assignments as we make them. + TIntermTyped* clipCullAssign = nullptr; + + // If the types are homomorphic, use a simple assign. No need to mess about with + // individual components. + if (clipCullSym->getType().isArray() == internalNode->getType().isArray() && + clipCullInnerArraySize == internalInnerArraySize && + clipCullOuterArraySize == internalOuterArraySize && + clipCullVectorSize == internalVectorSize) { + + if (isOutput) + clipCullAssign = intermediate.addAssign(op, clipCullSym, internalNode, loc); + else + clipCullAssign = intermediate.addAssign(op, internalNode, clipCullSym, loc); + + assignList = intermediate.growAggregate(assignList, clipCullAssign); + assignList->setOperator(EOpSequence); + + return assignList; + } + + // We are going to copy each component of the internal (per array element if indicated) to sequential + // array elements of the clipCullSym. This tracks the lhs element we're writing to as we go along. + // We may be starting in the middle - e.g, for a non-zero semantic ID calculated above. + int clipCullInnerArrayPos = semanticOffset[semanticId]; + int clipCullOuterArrayPos = 0; + + // Lambda to add an index to a node, set the type of the result, and return the new node. + const auto addIndex = [this, &loc](TIntermTyped* node, int pos) -> TIntermTyped* { + const TType derefType(node->getType(), 0); + node = intermediate.addIndex(EOpIndexDirect, node, intermediate.addConstantUnion(pos, loc), loc); + node->setType(derefType); + return node; + }; + + // Loop through every component of every element of the internal, and copy to or from the matching external. + for (int internalOuterArrayPos = 0; internalOuterArrayPos < internalOuterArraySize; ++internalOuterArrayPos) { + for (int internalInnerArrayPos = 0; internalInnerArrayPos < internalInnerArraySize; ++internalInnerArrayPos) { + for (int internalComponent = 0; internalComponent < internalVectorSize; ++internalComponent) { + // clip/cull array member to read from / write to: + TIntermTyped* clipCullMember = clipCullSym; + + // If implicitly arrayed, there is an outer array dimension involved + if (isImplicitlyArrayed) + clipCullMember = addIndex(clipCullMember, clipCullOuterArrayPos); + + // Index into proper array position for clip cull member + clipCullMember = addIndex(clipCullMember, clipCullInnerArrayPos++); + + // if needed, start over with next outer array slice. + if (isImplicitlyArrayed && clipCullInnerArrayPos >= clipCullInnerArraySize) { + clipCullInnerArrayPos = semanticOffset[semanticId]; + ++clipCullOuterArrayPos; + } + + // internal member to read from / write to: + TIntermTyped* internalMember = internalNode; + + // If internal node has outer array dimension, index appropriately. + if (internalArrayDims > 1) + internalMember = addIndex(internalMember, internalOuterArrayPos); + + // If internal node has inner array dimension, index appropriately. + if (internalArrayDims > 0) + internalMember = addIndex(internalMember, internalInnerArrayPos); + + // If internal node is a vector, extract the component of interest. + if (internalNode->getType().isVector()) + internalMember = addIndex(internalMember, internalComponent); + + // Create an assignment: output from internal to clip cull, or input from clip cull to internal. + if (isOutput) + clipCullAssign = intermediate.addAssign(op, clipCullMember, internalMember, loc); + else + clipCullAssign = intermediate.addAssign(op, internalMember, clipCullMember, loc); + + // Track assignment in the sequence. + assignList = intermediate.growAggregate(assignList, clipCullAssign); + } + } + } + + assert(assignList != nullptr); + assignList->setOperator(EOpSequence); + + return assignList; +} + // Some simple source assignments need to be flattened to a sequence // of AST assignments. Catch these and flatten, otherwise, pass through // to intermediate.addAssign(). // // Also, assignment to matrix swizzles requires multiple component assignments, // intercept those as well. -TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op, TIntermTyped* left, TIntermTyped* right) +TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op, TIntermTyped* left, + TIntermTyped* right) { if (left == nullptr || right == nullptr) return nullptr; + // writing to opaques will require fixing transforms + if (left->getType().containsOpaque()) + intermediate.setNeedsLegalization(); + if (left->getAsOperator() && left->getAsOperator()->getOp() == EOpMatrixSwizzle) return handleAssignToMatrixSwizzle(loc, op, left, right); - const bool isSplitLeft = wasSplit(left); - const bool isSplitRight = wasSplit(right); + // Return true if the given node is an index operation into a split variable. + const auto indexesSplit = [this](const TIntermTyped* node) -> bool { + const TIntermBinary* binaryNode = node->getAsBinaryNode(); + + if (binaryNode == nullptr) + return false; + + return (binaryNode->getOp() == EOpIndexDirect || binaryNode->getOp() == EOpIndexIndirect) && + wasSplit(binaryNode->getLeft()); + }; + + // Return true if this stage assigns clip position with potentially inverted Y + const auto assignsClipPos = [this](const TIntermTyped* node) -> bool { + return node->getType().getQualifier().builtIn == EbvPosition && + (language == EShLangVertex || language == EShLangGeometry || language == EShLangTessEvaluation); + }; + + const bool isSplitLeft = wasSplit(left) || indexesSplit(left); + const bool isSplitRight = wasSplit(right) || indexesSplit(right); const bool isFlattenLeft = wasFlattened(left); const bool isFlattenRight = wasFlattened(right); - // OK to do a single assign if both are split, or both are unsplit. But if one is and the other - // isn't, we fall back to a member-wise copy. - if (! isFlattenLeft && ! isFlattenRight && !isSplitLeft && !isSplitRight) + // OK to do a single assign if neither side is split or flattened. Otherwise, + // fall through to a member-wise copy. + if (!isFlattenLeft && !isFlattenRight && !isSplitLeft && !isSplitRight) { + // Clip and cull distance requires more processing. See comment above assignClipCullDistance. + if (isClipOrCullDistance(left->getType()) || isClipOrCullDistance(right->getType())) { + const bool isOutput = isClipOrCullDistance(left->getType()); + + const int semanticId = (isOutput ? left : right)->getType().getQualifier().layoutLocation; + return assignClipCullDistance(loc, op, semanticId, left, right); + } else if (assignsClipPos(left)) { + // Position can require special handling: see comment above assignPosition + return assignPosition(loc, op, left, right); + } + return intermediate.addAssign(op, left, right, loc); + } TIntermAggregate* assignList = nullptr; const TVector* leftVariables = nullptr; @@ -2141,7 +2697,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op // A temporary to store the right node's value, so we don't keep indirecting into it // if it's not a simple symbol. - TVariable* rhsTempVar = nullptr; + TVariable* rhsTempVar = nullptr; // If the RHS is a simple symbol node, we'll copy it for each member. TIntermSymbol* cloneSymNode = nullptr; @@ -2178,55 +2734,76 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op TIntermTyped* noFlattenRHS = intermediate.addSymbol(*rhsTempVar, loc); // Add this to the aggregate being built. - assignList = intermediate.growAggregate(assignList, intermediate.addAssign(op, noFlattenRHS, right, loc), loc); + assignList = intermediate.growAggregate(assignList, + intermediate.addAssign(op, noFlattenRHS, right, loc), loc); } } } - int memberIdx = 0; - - // When dealing with split arrayed structures of builtins, the arrayness is moved to the extracted builtin + // When dealing with split arrayed structures of built-ins, the arrayness is moved to the extracted built-in // variables, which is awkward when copying between split and unsplit structures. This variable tracks // array indirections so they can be percolated from outer structs to inner variables. std::vector arrayElement; - // We track the outer-most aggregate, so that we can use its storage class later. - const TIntermTyped* outerLeft = left; - const TIntermTyped* outerRight = right; + TStorageQualifier leftStorage = left->getType().getQualifier().storage; + TStorageQualifier rightStorage = right->getType().getQualifier().storage; + + int leftOffset = findSubtreeOffset(*left); + int rightOffset = findSubtreeOffset(*right); + + const auto getMember = [&](bool isLeft, const TType& type, int member, TIntermTyped* splitNode, int splitMember, + bool flattened) + -> TIntermTyped * { + const bool split = isLeft ? isSplitLeft : isSplitRight; - const auto getMember = [&](bool isLeft, TIntermTyped* node, int member, TIntermTyped* splitNode, int splitMember) -> TIntermTyped * { TIntermTyped* subTree; + const TType derefType(type, member); + const TVariable* builtInVar = nullptr; + if ((flattened || split) && derefType.isBuiltIn()) { + auto splitPair = splitBuiltIns.find(HlslParseContext::tInterstageIoData( + derefType.getQualifier().builtIn, + isLeft ? leftStorage : rightStorage)); + if (splitPair != splitBuiltIns.end()) + builtInVar = splitPair->second; + } + if (builtInVar != nullptr) { + // copy from interstage IO built-in if needed + subTree = intermediate.addSymbol(*builtInVar); - const bool flattened = isLeft ? isFlattenLeft : isFlattenRight; - const bool split = isLeft ? isSplitLeft : isSplitRight; - const TIntermTyped* outer = isLeft ? outerLeft : outerRight; - const TVector& flatVariables = isLeft ? *leftVariables : *rightVariables; + if (subTree->getType().isArray()) { + // Arrayness of builtIn symbols isn't handled by the normal recursion: + // it's been extracted and moved to the built-in. + if (!arrayElement.empty()) { + const TType splitDerefType(subTree->getType(), arrayElement.back()); + subTree = intermediate.addIndex(EOpIndexDirect, subTree, + intermediate.addConstantUnion(arrayElement.back(), loc), loc); + subTree->setType(splitDerefType); + } else if (splitNode->getAsOperator() != nullptr && (splitNode->getAsOperator()->getOp() == EOpIndexIndirect)) { + // This might also be a stage with arrayed outputs, in which case there's an index + // operation we should transfer to the output builtin. - // Index operator if it's an aggregate, else EOpNull - const TOperator op = node->getType().isArray() ? EOpIndexDirect : - node->getType().isStruct() ? EOpIndexDirectStruct : EOpNull; - - const TType derefType(node->getType(), member); - - if (split && derefType.isBuiltInInterstageIO(language)) { - // copy from interstage IO builtin if needed - subTree = intermediate.addSymbol(*interstageBuiltInIo.find(HlslParseContext::tInterstageIoData(derefType, outer->getType()))->second); - - // Arrayness of builtIn symbols isn't handled by the normal recursion: it's been extracted and moved to the builtin. - if (subTree->getType().isArray() && !arrayElement.empty()) { - const TType splitDerefType(subTree->getType(), arrayElement.back()); - subTree = intermediate.addIndex(EOpIndexDirect, subTree, intermediate.addConstantUnion(arrayElement.back(), loc), loc); - subTree->setType(splitDerefType); + const TType splitDerefType(subTree->getType(), 0); + subTree = intermediate.addIndex(splitNode->getAsOperator()->getOp(), subTree, + splitNode->getAsBinaryNode()->getRight(), loc); + subTree->setType(splitDerefType); + } } - } else if (flattened && isFinalFlattening(derefType)) { - subTree = intermediate.addSymbol(*flatVariables[memberIdx++]); + } else if (flattened && !shouldFlatten(derefType, isLeft ? leftStorage : rightStorage, false)) { + if (isLeft) + subTree = intermediate.addSymbol(*(*leftVariables)[leftOffset++]); + else + subTree = intermediate.addSymbol(*(*rightVariables)[rightOffset++]); } else { - if (op == EOpNull) { + // Index operator if it's an aggregate, else EOpNull + const TOperator accessOp = type.isArray() ? EOpIndexDirect + : type.isStruct() ? EOpIndexDirectStruct + : EOpNull; + if (accessOp == EOpNull) { subTree = splitNode; } else { + subTree = intermediate.addIndex(accessOp, splitNode, intermediate.addConstantUnion(splitMember, loc), + loc); const TType splitDerefType(splitNode->getType(), splitMember); - - subTree = intermediate.addIndex(op, splitNode, intermediate.addConstantUnion(splitMember, loc), loc); subTree->setType(splitDerefType); } } @@ -2236,40 +2813,55 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op // Use the proper RHS node: a new symbol from a TVariable, copy // of an TIntermSymbol node, or sometimes the right node directly. - right = rhsTempVar ? intermediate.addSymbol(*rhsTempVar, loc) : - cloneSymNode ? intermediate.addSymbol(*cloneSymNode) : + right = rhsTempVar != nullptr ? intermediate.addSymbol(*rhsTempVar, loc) : + cloneSymNode != nullptr ? intermediate.addSymbol(*cloneSymNode) : right; // Cannot use auto here, because this is recursive, and auto can't work out the type without seeing the // whole thing. So, we'll resort to an explicit type via std::function. - const std::function - traverse = [&](TIntermTyped* left, TIntermTyped* right, TIntermTyped* splitLeft, TIntermTyped* splitRight) -> void { + const std::function + traverse = [&](TIntermTyped* left, TIntermTyped* right, TIntermTyped* splitLeft, TIntermTyped* splitRight, + bool topLevel) -> void { // If we get here, we are assigning to or from a whole array or struct that must be // flattened, so have to do member-by-member assignment: - if (left->getType().isArray() || right->getType().isArray()) { - const int elementsL = left->getType().isArray() ? left->getType().getOuterArraySize() : 1; + bool shouldFlattenSubsetLeft = isFlattenLeft && shouldFlatten(left->getType(), leftStorage, topLevel); + bool shouldFlattenSubsetRight = isFlattenRight && shouldFlatten(right->getType(), rightStorage, topLevel); + + if ((left->getType().isArray() || right->getType().isArray()) && + (shouldFlattenSubsetLeft || isSplitLeft || + shouldFlattenSubsetRight || isSplitRight)) { + const int elementsL = left->getType().isArray() ? left->getType().getOuterArraySize() : 1; const int elementsR = right->getType().isArray() ? right->getType().getOuterArraySize() : 1; - // The arrays may not be the same size, e.g, if the size has been forced for EbvTessLevelInner or Outer. + // The arrays might not be the same size, + // e.g., if the size has been forced for EbvTessLevelInner/Outer. const int elementsToCopy = std::min(elementsL, elementsR); // array case - for (int element=0; element < elementsToCopy; ++element) { + for (int element = 0; element < elementsToCopy; ++element) { arrayElement.push_back(element); // Add a new AST symbol node if we have a temp variable holding a complex RHS. - TIntermTyped* subLeft = getMember(true, left, element, left, element); - TIntermTyped* subRight = getMember(false, right, element, right, element); + TIntermTyped* subLeft = getMember(true, left->getType(), element, left, element, + shouldFlattenSubsetLeft); + TIntermTyped* subRight = getMember(false, right->getType(), element, right, element, + shouldFlattenSubsetRight); - TIntermTyped* subSplitLeft = isSplitLeft ? getMember(true, left, element, splitLeft, element) : subLeft; - TIntermTyped* subSplitRight = isSplitRight ? getMember(false, right, element, splitRight, element) : subRight; + TIntermTyped* subSplitLeft = isSplitLeft ? getMember(true, left->getType(), element, splitLeft, + element, shouldFlattenSubsetLeft) + : subLeft; + TIntermTyped* subSplitRight = isSplitRight ? getMember(false, right->getType(), element, splitRight, + element, shouldFlattenSubsetRight) + : subRight; - traverse(subLeft, subRight, subSplitLeft, subSplitRight); + traverse(subLeft, subRight, subSplitLeft, subSplitRight, false); arrayElement.pop_back(); } - } else if (left->getType().isStruct()) { + } else if (left->getType().isStruct() && (shouldFlattenSubsetLeft || isSplitLeft || + shouldFlattenSubsetRight || isSplitRight)) { // struct case const auto& membersL = *left->getType().getStruct(); const auto& membersR = *right->getType().getStruct(); @@ -2287,27 +2879,57 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op const TType& typeL = *membersL[member].type; const TType& typeR = *membersR[member].type; - TIntermTyped* subLeft = getMember(true, left, member, left, member); - TIntermTyped* subRight = getMember(false, right, member, right, member); + TIntermTyped* subLeft = getMember(true, left->getType(), member, left, member, + shouldFlattenSubsetLeft); + TIntermTyped* subRight = getMember(false, right->getType(), member, right, member, + shouldFlattenSubsetRight); // If there is no splitting, use the same values to avoid inefficiency. - TIntermTyped* subSplitLeft = isSplitLeft ? getMember(true, left, member, splitLeft, memberL) : subLeft; - TIntermTyped* subSplitRight = isSplitRight ? getMember(false, right, member, splitRight, memberR) : subRight; + TIntermTyped* subSplitLeft = isSplitLeft ? getMember(true, left->getType(), member, splitLeft, + memberL, shouldFlattenSubsetLeft) + : subLeft; + TIntermTyped* subSplitRight = isSplitRight ? getMember(false, right->getType(), member, splitRight, + memberR, shouldFlattenSubsetRight) + : subRight; - // If this is the final flattening (no nested types below to flatten) we'll copy the member, else - // recurse into the type hierarchy. However, if splitting the struct, that means we can copy a whole - // subtree here IFF it does not itself contain any interstage built-in IO variables, so we only have to - // recurse into it if there's something for splitting to do. That can save a lot of AST verbosity for - // a bunch of memberwise copies. - if ((!isFlattenLeft && !isFlattenRight && - !typeL.containsBuiltInInterstageIO(language) && !typeR.containsBuiltInInterstageIO(language))) { - assignList = intermediate.growAggregate(assignList, intermediate.addAssign(op, subSplitLeft, subSplitRight, loc), loc); + if (isClipOrCullDistance(subSplitLeft->getType()) || isClipOrCullDistance(subSplitRight->getType())) { + // Clip and cull distance built-in assignment is complex in its own right, and is handled in + // a separate function dedicated to that task. See comment above assignClipCullDistance; + + const bool isOutput = isClipOrCullDistance(subSplitLeft->getType()); + + // Since all clip/cull semantics boil down to the same built-in type, we need to get the + // semantic ID from the dereferenced type's layout location, to avoid an N-1 mapping. + const TType derefType((isOutput ? left : right)->getType(), member); + const int semanticId = derefType.getQualifier().layoutLocation; + + TIntermAggregate* clipCullAssign = assignClipCullDistance(loc, op, semanticId, + subSplitLeft, subSplitRight); + + assignList = intermediate.growAggregate(assignList, clipCullAssign, loc); + } else if (assignsClipPos(subSplitLeft)) { + // Position can require special handling: see comment above assignPosition + TIntermTyped* positionAssign = assignPosition(loc, op, subSplitLeft, subSplitRight); + assignList = intermediate.growAggregate(assignList, positionAssign, loc); + } else if (!shouldFlattenSubsetLeft && !shouldFlattenSubsetRight && + !typeL.containsBuiltIn() && !typeR.containsBuiltIn()) { + // If this is the final flattening (no nested types below to flatten) + // we'll copy the member, else recurse into the type hierarchy. + // However, if splitting the struct, that means we can copy a whole + // subtree here IFF it does not itself contain any interstage built-in + // IO variables, so we only have to recurse into it if there's something + // for splitting to do. That can save a lot of AST verbosity for + // a bunch of memberwise copies. + + assignList = intermediate.growAggregate(assignList, + intermediate.addAssign(op, subSplitLeft, subSplitRight, loc), + loc); } else { - traverse(subLeft, subRight, subSplitLeft, subSplitRight); + traverse(subLeft, subRight, subSplitLeft, subSplitRight, false); } - memberL += (typeL.isBuiltInInterstageIO(language) ? 0 : 1); - memberR += (typeR.isBuiltInInterstageIO(language) ? 0 : 1); + memberL += (typeL.isBuiltIn() ? 0 : 1); + memberR += (typeR.isBuiltIn() ? 0 : 1); } } else { // Member copy @@ -2320,15 +2942,32 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op TIntermTyped* splitRight = right; // If either left or right was a split structure, we must read or write it, but still have to - // parallel-recurse through the unsplit structure to identify the builtin IO vars. - if (isSplitLeft) - splitLeft = intermediate.addSymbol(*getSplitIoVar(left), loc); + // parallel-recurse through the unsplit structure to identify the built-in IO vars. + // The left can be either a symbol, or an index into a symbol (e.g, array reference) + if (isSplitLeft) { + if (indexesSplit(left)) { + // Index case: Refer to the indexed symbol, if the left is an index operator. + const TIntermSymbol* symNode = left->getAsBinaryNode()->getLeft()->getAsSymbolNode(); + + TIntermTyped* splitLeftNonIo = intermediate.addSymbol(*getSplitNonIoVar(symNode->getId()), loc); + + splitLeft = intermediate.addIndex(left->getAsBinaryNode()->getOp(), splitLeftNonIo, + left->getAsBinaryNode()->getRight(), loc); + + const TType derefType(splitLeftNonIo->getType(), 0); + splitLeft->setType(derefType); + } else { + // Symbol case: otherwise, if not indexed, we have the symbol directly. + const TIntermSymbol* symNode = left->getAsSymbolNode(); + splitLeft = intermediate.addSymbol(*getSplitNonIoVar(symNode->getId()), loc); + } + } if (isSplitRight) - splitRight = intermediate.addSymbol(*getSplitIoVar(right), loc); + splitRight = intermediate.addSymbol(*getSplitNonIoVar(right->getAsSymbolNode()->getId()), loc); // This makes the whole assignment, recursing through subtypes as needed. - traverse(left, right, splitLeft, splitRight); + traverse(left, right, splitLeft, splitRight, true); assert(assignList != nullptr); assignList->setOperator(EOpSequence); @@ -2339,7 +2978,8 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op // An assignment to matrix swizzle must be decomposed into individual assignments. // These must be selected component-wise from the RHS and stored component-wise // into the LHS. -TIntermTyped* HlslParseContext::handleAssignToMatrixSwizzle(const TSourceLoc& loc, TOperator op, TIntermTyped* left, TIntermTyped* right) +TIntermTyped* HlslParseContext::handleAssignToMatrixSwizzle(const TSourceLoc& loc, TOperator op, TIntermTyped* left, + TIntermTyped* right) { assert(left->getAsOperator() && left->getAsOperator()->getOp() == EOpMatrixSwizzle); @@ -2421,7 +3061,8 @@ TOperator HlslParseContext::mapAtomicOp(const TSourceLoc& loc, TOperator op, boo // // Create a combined sampler/texture from separate sampler and texture. // -TIntermAggregate* HlslParseContext::handleSamplerTextureCombine(const TSourceLoc& loc, TIntermTyped* argTex, TIntermTyped* argSampler) +TIntermAggregate* HlslParseContext::handleSamplerTextureCombine(const TSourceLoc& loc, TIntermTyped* argTex, + TIntermTyped* argSampler) { TIntermAggregate* txcombine = new TIntermAggregate(EOpConstructTextureSampler); @@ -2430,7 +3071,66 @@ TIntermAggregate* HlslParseContext::handleSamplerTextureCombine(const TSourceLoc TSampler samplerType = argTex->getType().getSampler(); samplerType.combined = true; - samplerType.shadow = argSampler->getType().getSampler().shadow; + + // TODO: + // This block exists until the spec no longer requires shadow modes on texture objects. + // It can be deleted after that, along with the shadowTextureVariant member. + { + const bool shadowMode = argSampler->getType().getSampler().shadow; + + TIntermSymbol* texSymbol = argTex->getAsSymbolNode(); + + if (texSymbol == nullptr) + texSymbol = argTex->getAsBinaryNode()->getLeft()->getAsSymbolNode(); + + if (texSymbol == nullptr) { + error(loc, "unable to find texture symbol", "", ""); + return nullptr; + } + + // This forces the texture's shadow state to be the sampler's + // shadow state. This depends on downstream optimization to + // DCE one variant in [shadow, nonshadow] if both are present, + // or the SPIR-V module would be invalid. + int newId = texSymbol->getId(); + + // Check to see if this texture has been given a shadow mode already. + // If so, look up the one we already have. + const auto textureShadowEntry = textureShadowVariant.find(texSymbol->getId()); + + if (textureShadowEntry != textureShadowVariant.end()) + newId = textureShadowEntry->second->get(shadowMode); + else + textureShadowVariant[texSymbol->getId()] = new tShadowTextureSymbols; + + // Sometimes we have to create another symbol (if this texture has been seen before, + // and we haven't created the form for this shadow mode). + if (newId == -1) { + TType texType; + texType.shallowCopy(argTex->getType()); + texType.getSampler().shadow = shadowMode; // set appropriate shadow mode. + globalQualifierFix(loc, texType.getQualifier()); + + TVariable* newTexture = makeInternalVariable(texSymbol->getName(), texType); + + trackLinkage(*newTexture); + + newId = newTexture->getUniqueId(); + } + + assert(newId != -1); + + if (textureShadowVariant.find(newId) == textureShadowVariant.end()) + textureShadowVariant[newId] = textureShadowVariant[texSymbol->getId()]; + + textureShadowVariant[newId]->set(shadowMode, newId); + + // Remember this shadow mode in the texture and the merged type. + argTex->getWritableType().getSampler().shadow = shadowMode; + samplerType.shadow = shadowMode; + + texSymbol->switchId(newId); + } txcombine->setType(TType(samplerType, EvqTemporary)); txcombine->setLoc(loc); @@ -2438,24 +3138,127 @@ TIntermAggregate* HlslParseContext::handleSamplerTextureCombine(const TSourceLoc return txcombine; } +// Return true if this a buffer type that has an associated counter buffer. +bool HlslParseContext::hasStructBuffCounter(const TType& type) const +{ + switch (type.getQualifier().declaredBuiltIn) { + case EbvAppendConsume: // fall through... + case EbvRWStructuredBuffer: // ... + return true; + default: + return false; // the other structuredbuffer types do not have a counter. + } +} + +void HlslParseContext::counterBufferType(const TSourceLoc& loc, TType& type) +{ + // Counter type + TType* counterType = new TType(EbtInt, EvqBuffer); + counterType->setFieldName("@count"); + + TTypeList* blockStruct = new TTypeList; + TTypeLoc member = { counterType, loc }; + blockStruct->push_back(member); + + TType blockType(blockStruct, "", counterType->getQualifier()); + blockType.getQualifier().storage = EvqBuffer; + + type.shallowCopy(blockType); + shareStructBufferType(type); +} + +// knowledge of how to construct block name, in one place instead of N places. +TString HlslParseContext::getStructBuffCounterName(const TString& blockName) const +{ + return blockName + "@count"; +} + +// declare counter for a structured buffer type +void HlslParseContext::declareStructBufferCounter(const TSourceLoc& loc, const TType& bufferType, const TString& name) +{ + // Bail out if not a struct buffer + if (! isStructBufferType(bufferType)) + return; + + if (! hasStructBuffCounter(bufferType)) + return; + + TType blockType; + counterBufferType(loc, blockType); + + TString* blockName = new TString(getStructBuffCounterName(name)); + + // Counter buffer does not have its own counter buffer. TODO: there should be a better way to track this. + structBufferCounter[*blockName] = false; + + shareStructBufferType(blockType); + declareBlock(loc, blockType, blockName); +} + +// return the counter that goes with a given structuredbuffer +TIntermTyped* HlslParseContext::getStructBufferCounter(const TSourceLoc& loc, TIntermTyped* buffer) +{ + // Bail out if not a struct buffer + if (buffer == nullptr || ! isStructBufferType(buffer->getType())) + return nullptr; + + const TString counterBlockName(getStructBuffCounterName(buffer->getAsSymbolNode()->getName())); + + // Mark the counter as being used + structBufferCounter[counterBlockName] = true; + + TIntermTyped* counterVar = handleVariable(loc, &counterBlockName); // find the block structure + TIntermTyped* index = intermediate.addConstantUnion(0, loc); // index to counter inside block struct + + TIntermTyped* counterMember = intermediate.addIndex(EOpIndexDirectStruct, counterVar, index, loc); + counterMember->setType(TType(EbtInt)); + return counterMember; +} + + // // Decompose structure buffer methods into AST // void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TIntermTyped*& node, TIntermNode* arguments) { - if (!node || !node->getAsOperator()) + if (node == nullptr || node->getAsOperator() == nullptr || arguments == nullptr) return; const TOperator op = node->getAsOperator()->getOp(); - TIntermAggregate* argAggregate = arguments ? arguments->getAsAggregate() : nullptr; - if (argAggregate == nullptr) - return; - - if (argAggregate->getSequence().empty()) - return; + TIntermAggregate* argAggregate = arguments->getAsAggregate(); // Buffer is the object upon which method is called, so always arg 0 - TIntermTyped* bufferObj = argAggregate->getSequence()[0]->getAsTyped(); + TIntermTyped* bufferObj = nullptr; + + // The parameters can be an aggregate, or just a the object as a symbol if there are no fn params. + if (argAggregate) { + if (argAggregate->getSequence().empty()) + return; + bufferObj = argAggregate->getSequence()[0]->getAsTyped(); + } else { + bufferObj = arguments->getAsSymbolNode(); + } + + if (bufferObj == nullptr || bufferObj->getAsSymbolNode() == nullptr) + return; + + // Some methods require a hidden internal counter, obtained via getStructBufferCounter(). + // This lambda adds something to it and returns the old value. + const auto incDecCounter = [&](int incval) -> TIntermTyped* { + TIntermTyped* incrementValue = intermediate.addConstantUnion(incval, loc, true); + TIntermTyped* counter = getStructBufferCounter(loc, bufferObj); // obtain the counter member + + if (counter == nullptr) + return nullptr; + + TIntermAggregate* counterIncrement = new TIntermAggregate(EOpAtomicAdd); + counterIncrement->setType(TType(EbtUint, EvqTemporary)); + counterIncrement->setLoc(loc); + counterIncrement->getSequence().push_back(counter); + counterIncrement->getSequence().push_back(incrementValue); + + return counterIncrement; + }; // Index to obtain the runtime sized array out of the buffer. TIntermTyped* argArray = indexStructBufferContent(loc, bufferObj); @@ -2465,13 +3268,21 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte switch (op) { case EOpMethodLoad: { - TIntermTyped* argIndex = argAggregate->getSequence()[1]->getAsTyped(); // index + TIntermTyped* argIndex = makeIntegerIndex(argAggregate->getSequence()[1]->getAsTyped()); // index + + const TType& bufferType = bufferObj->getType(); + + const TBuiltInVariable builtInType = bufferType.getQualifier().declaredBuiltIn; // Byte address buffers index in bytes (only multiples of 4 permitted... not so much a byte address // buffer then, but that's what it calls itself. - const bool isByteAddressBuffer = (argArray->getBasicType() == EbtUint); + const bool isByteAddressBuffer = (builtInType == EbvByteAddressBuffer || + builtInType == EbvRWByteAddressBuffer); + + if (isByteAddressBuffer) - argIndex = intermediate.addBinaryNode(EOpRightShift, argIndex, intermediate.addConstantUnion(2, loc, true), + argIndex = intermediate.addBinaryNode(EOpRightShift, argIndex, + intermediate.addConstantUnion(2, loc, true), loc, TType(EbtInt)); // Index into the array to find the item being loaded. @@ -2489,7 +3300,7 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte case EOpMethodLoad3: case EOpMethodLoad4: { - TIntermTyped* argIndex = argAggregate->getSequence()[1]->getAsTyped(); // index + TIntermTyped* argIndex = makeIntegerIndex(argAggregate->getSequence()[1]->getAsTyped()); // index TOperator constructOp = EOpNull; int size = 0; @@ -2506,7 +3317,8 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte // First, we'll store the address in a variable to avoid multiple shifts // (we must convert the byte address to an item address) TIntermTyped* byteAddrIdx = intermediate.addBinaryNode(EOpRightShift, argIndex, - intermediate.addConstantUnion(2, loc, true), loc, TType(EbtInt)); + intermediate.addConstantUnion(2, loc, true), + loc, TType(EbtInt)); TVariable* byteAddrSym = makeInternalVariable("byteAddrTemp", TType(EbtInt, EvqTemporary)); TIntermTyped* byteAddrIdxVar = intermediate.addSymbol(*byteAddrSym, loc); @@ -2522,12 +3334,20 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte // add index offset if (idx != 0) - offsetIdx = intermediate.addBinaryNode(EOpAdd, offsetIdx, intermediate.addConstantUnion(idx, loc, true), + offsetIdx = intermediate.addBinaryNode(EOpAdd, offsetIdx, + intermediate.addConstantUnion(idx, loc, true), loc, TType(EbtInt)); - const TOperator idxOp = (offsetIdx->getQualifier().storage == EvqConst) ? EOpIndexDirect : EOpIndexIndirect; + const TOperator idxOp = (offsetIdx->getQualifier().storage == EvqConst) ? EOpIndexDirect + : EOpIndexIndirect; - vec = intermediate.growAggregate(vec, intermediate.addIndex(idxOp, argArray, offsetIdx, loc)); + TIntermTyped* indexVal = intermediate.addIndex(idxOp, argArray, offsetIdx, loc); + + TType derefType(argArray->getType(), 0); + derefType.getQualifier().makeTemporary(); + indexVal->setType(derefType); + + vec = intermediate.growAggregate(vec, indexVal); } vec->setType(TType(argArray->getBasicType(), EvqTemporary, size)); @@ -2547,12 +3367,12 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte case EOpMethodStore3: case EOpMethodStore4: { - TIntermTyped* argIndex = argAggregate->getSequence()[1]->getAsTyped(); // address + TIntermTyped* argIndex = makeIntegerIndex(argAggregate->getSequence()[1]->getAsTyped()); // index TIntermTyped* argValue = argAggregate->getSequence()[2]->getAsTyped(); // value // Index into the array to find the item being loaded. // Byte address buffers index in bytes (only multiples of 4 permitted... not so much a byte address - // buffer then, but that's what it calls itself. + // buffer then, but that's what it calls itself). int size = 0; @@ -2584,11 +3404,21 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte if (idx != 0) offsetIdx = intermediate.addBinaryNode(EOpAdd, offsetIdx, idxConst, loc, TType(EbtInt)); - const TOperator idxOp = (offsetIdx->getQualifier().storage == EvqConst) ? EOpIndexDirect : EOpIndexIndirect; + const TOperator idxOp = (offsetIdx->getQualifier().storage == EvqConst) ? EOpIndexDirect + : EOpIndexIndirect; TIntermTyped* lValue = intermediate.addIndex(idxOp, argArray, offsetIdx, loc); - TIntermTyped* rValue = (size == 1) ? argValue : - intermediate.addIndex(EOpIndexDirect, argValue, idxConst, loc); + const TType derefType(argArray->getType(), 0); + lValue->setType(derefType); + + TIntermTyped* rValue; + if (size == 1) { + rValue = argValue; + } else { + rValue = intermediate.addIndex(EOpIndexDirect, argValue, idxConst, loc); + const TType indexType(argValue->getType(), 0); + rValue->setType(indexType); + } TIntermTyped* assign = intermediate.addAssign(EOpAssign, lValue, rValue, loc); @@ -2617,7 +3447,8 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte body = intermediate.growAggregate(body, assign, loc); } else { const int length = argArray->getType().getOuterArraySize(); - TIntermTyped* assign = intermediate.addAssign(EOpAssign, argNumItems, intermediate.addConstantUnion(length, loc, true), loc); + TIntermTyped* assign = intermediate.addAssign(EOpAssign, argNumItems, + intermediate.addConstantUnion(length, loc, true), loc); body = intermediate.growAggregate(body, assign, loc); } @@ -2628,7 +3459,8 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte intermediate.getBaseAlignment(argArray->getType(), size, stride, false, argArray->getType().getQualifier().layoutMatrix == ElmRowMajor); - TIntermTyped* assign = intermediate.addAssign(EOpAssign, argStride, intermediate.addConstantUnion(stride, loc, true), loc); + TIntermTyped* assign = intermediate.addAssign(EOpAssign, argStride, + intermediate.addConstantUnion(stride, loc, true), loc); body = intermediate.growAggregate(body, assign); } @@ -2654,7 +3486,7 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte TIntermSequence& sequence = argAggregate->getSequence(); - TIntermTyped* argIndex = sequence[1]->getAsTyped(); // index + TIntermTyped* argIndex = makeIntegerIndex(sequence[1]->getAsTyped()); // index argIndex = intermediate.addBinaryNode(EOpRightShift, argIndex, intermediate.addConstantUnion(2, loc, true), loc, TType(EbtInt)); @@ -2670,46 +3502,241 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte } break; + case EOpMethodIncrementCounter: + { + node = incDecCounter(1); + break; + } + + case EOpMethodDecrementCounter: + { + TIntermTyped* preIncValue = incDecCounter(-1); // result is original value + node = intermediate.addBinaryNode(EOpAdd, preIncValue, intermediate.addConstantUnion(-1, loc, true), loc, + preIncValue->getType()); + break; + } + + case EOpMethodAppend: + { + TIntermTyped* oldCounter = incDecCounter(1); + + TIntermTyped* lValue = intermediate.addIndex(EOpIndexIndirect, argArray, oldCounter, loc); + TIntermTyped* rValue = argAggregate->getSequence()[1]->getAsTyped(); + + const TType derefType(argArray->getType(), 0); + lValue->setType(derefType); + + node = intermediate.addAssign(EOpAssign, lValue, rValue, loc); + + break; + } + + case EOpMethodConsume: + { + TIntermTyped* oldCounter = incDecCounter(-1); + + TIntermTyped* newCounter = intermediate.addBinaryNode(EOpAdd, oldCounter, + intermediate.addConstantUnion(-1, loc, true), loc, + oldCounter->getType()); + + node = intermediate.addIndex(EOpIndexIndirect, argArray, newCounter, loc); + + const TType derefType(argArray->getType(), 0); + node->setType(derefType); + + break; + } + default: break; // most pass through unchanged } } + +// Create array of standard sample positions for given sample count. +// TODO: remove when a real method to query sample pos exists in SPIR-V. +TIntermConstantUnion* HlslParseContext::getSamplePosArray(int count) +{ + struct tSamplePos { float x, y; }; + + static const tSamplePos pos1[] = { + { 0.0/16.0, 0.0/16.0 }, + }; + + // standard sample positions for 2, 4, 8, and 16 samples. + static const tSamplePos pos2[] = { + { 4.0/16.0, 4.0/16.0 }, {-4.0/16.0, -4.0/16.0 }, + }; + + static const tSamplePos pos4[] = { + {-2.0/16.0, -6.0/16.0 }, { 6.0/16.0, -2.0/16.0 }, {-6.0/16.0, 2.0/16.0 }, { 2.0/16.0, 6.0/16.0 }, + }; + + static const tSamplePos pos8[] = { + { 1.0/16.0, -3.0/16.0 }, {-1.0/16.0, 3.0/16.0 }, { 5.0/16.0, 1.0/16.0 }, {-3.0/16.0, -5.0/16.0 }, + {-5.0/16.0, 5.0/16.0 }, {-7.0/16.0, -1.0/16.0 }, { 3.0/16.0, 7.0/16.0 }, { 7.0/16.0, -7.0/16.0 }, + }; + + static const tSamplePos pos16[] = { + { 1.0/16.0, 1.0/16.0 }, {-1.0/16.0, -3.0/16.0 }, {-3.0/16.0, 2.0/16.0 }, { 4.0/16.0, -1.0/16.0 }, + {-5.0/16.0, -2.0/16.0 }, { 2.0/16.0, 5.0/16.0 }, { 5.0/16.0, 3.0/16.0 }, { 3.0/16.0, -5.0/16.0 }, + {-2.0/16.0, 6.0/16.0 }, { 0.0/16.0, -7.0/16.0 }, {-4.0/16.0, -6.0/16.0 }, {-6.0/16.0, 4.0/16.0 }, + {-8.0/16.0, 0.0/16.0 }, { 7.0/16.0, -4.0/16.0 }, { 6.0/16.0, 7.0/16.0 }, {-7.0/16.0, -8.0/16.0 }, + }; + + const tSamplePos* sampleLoc = nullptr; + int numSamples = count; + + switch (count) { + case 2: sampleLoc = pos2; break; + case 4: sampleLoc = pos4; break; + case 8: sampleLoc = pos8; break; + case 16: sampleLoc = pos16; break; + default: + sampleLoc = pos1; + numSamples = 1; + } + + TConstUnionArray* values = new TConstUnionArray(numSamples*2); + for (int pos=0; posgetAsOperator()) + if (node == nullptr || !node->getAsOperator()) return; - const auto clampReturn = [&loc, &node, this](TIntermTyped* result, const TSampler& sampler) -> TIntermTyped* { - // Sampler return must always be a vec4, but we can construct a shorter vector + // Sampler return must always be a vec4, but we can construct a shorter vector or a structure from it. + const auto convertReturn = [&loc, &node, this](TIntermTyped* result, const TSampler& sampler) -> TIntermTyped* { result->setType(TType(node->getType().getBasicType(), EvqTemporary, node->getVectorSize())); - if (sampler.vectorSize < (unsigned)node->getVectorSize()) { - // Too many components. Construct shorter vector from it. - const TType clampedType(result->getType().getBasicType(), EvqTemporary, sampler.vectorSize); + TIntermTyped* convertedResult = nullptr; + + TType retType; + getTextureReturnType(sampler, retType); - const TOperator op = intermediate.mapTypeToConstructorOp(clampedType); + if (retType.isStruct()) { + // For type convenience, conversionAggregate points to the convertedResult (we know it's an aggregate here) + TIntermAggregate* conversionAggregate = new TIntermAggregate; + convertedResult = conversionAggregate; - result = constructBuiltIn(clampedType, op, result, loc, false); + // Convert vector output to return structure. We will need a temp symbol to copy the results to. + TVariable* structVar = makeInternalVariable("@sampleStructTemp", retType); + + // We also need a temp symbol to hold the result of the texture. We don't want to re-fetch the + // sample each time we'll index into the result, so we'll copy to this, and index into the copy. + TVariable* sampleShadow = makeInternalVariable("@sampleResultShadow", result->getType()); + + // Initial copy from texture to our sample result shadow. + TIntermTyped* shadowCopy = intermediate.addAssign(EOpAssign, intermediate.addSymbol(*sampleShadow, loc), + result, loc); + + conversionAggregate->getSequence().push_back(shadowCopy); + + unsigned vec4Pos = 0; + + for (unsigned m = 0; m < unsigned(retType.getStruct()->size()); ++m) { + const TType memberType(retType, m); // dereferenced type of the member we're about to assign. + + // Check for bad struct members. This should have been caught upstream. Complain, because + // wwe don't know what to do with it. This algorithm could be generalized to handle + // other things, e.g, sub-structures, but HLSL doesn't allow them. + if (!memberType.isVector() && !memberType.isScalar()) { + error(loc, "expected: scalar or vector type in texture structure", "", ""); + return nullptr; + } + + // Index into the struct variable to find the member to assign. + TIntermTyped* structMember = intermediate.addIndex(EOpIndexDirectStruct, + intermediate.addSymbol(*structVar, loc), + intermediate.addConstantUnion(m, loc), loc); + + structMember->setType(memberType); + + // Assign each component of (possible) vector in struct member. + for (int component = 0; component < memberType.getVectorSize(); ++component) { + TIntermTyped* vec4Member = intermediate.addIndex(EOpIndexDirect, + intermediate.addSymbol(*sampleShadow, loc), + intermediate.addConstantUnion(vec4Pos++, loc), loc); + vec4Member->setType(TType(memberType.getBasicType(), EvqTemporary, 1)); + + TIntermTyped* memberAssign = nullptr; + + if (memberType.isVector()) { + // Vector member: we need to create an access chain to the vector component. + + TIntermTyped* structVecComponent = intermediate.addIndex(EOpIndexDirect, structMember, + intermediate.addConstantUnion(component, loc), loc); + + memberAssign = intermediate.addAssign(EOpAssign, structVecComponent, vec4Member, loc); + } else { + // Scalar member: we can assign to it directly. + memberAssign = intermediate.addAssign(EOpAssign, structMember, vec4Member, loc); + } + + + conversionAggregate->getSequence().push_back(memberAssign); + } + } + + // Add completed variable so the expression results in the whole struct value we just built. + conversionAggregate->getSequence().push_back(intermediate.addSymbol(*structVar, loc)); + + // Make it a sequence. + intermediate.setAggregateOperator(conversionAggregate, EOpSequence, retType, loc); + } else { + // vector clamp the output if template vector type is smaller than sample result. + if (retType.getVectorSize() < node->getVectorSize()) { + // Too many components. Construct shorter vector from it. + const TOperator op = intermediate.mapTypeToConstructorOp(retType); + + convertedResult = constructBuiltIn(retType, op, result, loc, false); + } else { + // Enough components. Use directly. + convertedResult = result; + } } - result->setLoc(loc); - return result; + convertedResult->setLoc(loc); + return convertedResult; }; const TOperator op = node->getAsOperator()->getOp(); const TIntermAggregate* argAggregate = arguments ? arguments->getAsAggregate() : nullptr; - // Bail out if not a sampler method + // Bail out if not a sampler method. + // Note though this is odd to do before checking the op, because the op + // could be something that takes the arguments, and the function in question + // takes the result of the op. So, this is not the final word. if (arguments != nullptr) { - if ((argAggregate != nullptr && argAggregate->getSequence()[0]->getAsTyped()->getBasicType() != EbtSampler)) - return; - - if (argAggregate == nullptr && arguments->getAsTyped()->getBasicType() != EbtSampler) - return; + if (argAggregate == nullptr) { + if (arguments->getAsTyped()->getBasicType() != EbtSampler) + return; + } else { + if (argAggregate->getSequence().size() == 0 || + argAggregate->getSequence()[0]->getAsTyped()->getBasicType() != EbtSampler) + return; + } } switch (op) { @@ -2757,7 +3784,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType tex->getSequence().push_back(constructCoord); // coordinate tex->getSequence().push_back(bias); // bias - node = clampReturn(tex, sampler); + node = convertReturn(tex, sampler); break; } @@ -2797,7 +3824,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType if (argOffset != nullptr) txsample->getSequence().push_back(argOffset); - node = clampReturn(txsample, sampler); + node = convertReturn(txsample, sampler); break; } @@ -2830,7 +3857,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType if (argOffset != nullptr) txsample->getSequence().push_back(argOffset); - node = clampReturn(txsample, sampler); + node = convertReturn(txsample, sampler); break; } @@ -2975,6 +4002,18 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType TIntermTyped* argCmpVal = argAggregate->getSequence()[3]->getAsTyped(); TIntermTyped* argOffset = nullptr; + // Sampler argument should be a sampler. + if (argSamp->getType().getBasicType() != EbtSampler) { + error(loc, "expected: sampler type", "", ""); + return; + } + + // Sampler should be a SamplerComparisonState + if (! argSamp->getType().getSampler().isShadow()) { + error(loc, "expected: SamplerComparisonState", "", ""); + return; + } + // optional offset value if (argAggregate->getSequence().size() > 4) argOffset = argAggregate->getSequence()[4]->getAsTyped(); @@ -3094,7 +4133,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType txfetch->getSequence().push_back(argOffset); } - node = clampReturn(txfetch, sampler); + node = convertReturn(txfetch, sampler); break; } @@ -3125,7 +4164,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType if (argOffset != nullptr) txsample->getSequence().push_back(argOffset); - node = clampReturn(txsample, sampler); + node = convertReturn(txsample, sampler); break; } @@ -3212,6 +4251,18 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType bool hasOffset1 = false; bool hasOffset4 = false; + // Sampler argument should be a sampler. + if (argSamp->getType().getBasicType() != EbtSampler) { + error(loc, "expected: sampler type", "", ""); + return; + } + + // Cmp forms require SamplerComparisonState + if (cmpValues > 0 && ! argSamp->getType().getSampler().isShadow()) { + error(loc, "expected: SamplerComparisonState", "", ""); + return; + } + // Only 2D forms can have offsets. Discover if we have 0, 1 or 4 offsets. if (dim == Esd2D) { hasOffset1 = (argSize == (4+cmpValues) || argSize == (5+cmpValues)); @@ -3317,10 +4368,90 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType case EOpMethodGetSamplePosition: { - error(loc, "unimplemented: GetSamplePosition", "", ""); + // TODO: this entire decomposition exists because there is not yet a way to query + // the sample position directly through SPIR-V. Instead, we return fixed sample + // positions for common cases. *** If the sample positions are set differently, + // this will be wrong. *** + + TIntermTyped* argTex = argAggregate->getSequence()[0]->getAsTyped(); + TIntermTyped* argSampIdx = argAggregate->getSequence()[1]->getAsTyped(); + + TIntermAggregate* samplesQuery = new TIntermAggregate(EOpImageQuerySamples); + samplesQuery->getSequence().push_back(argTex); + samplesQuery->setType(TType(EbtUint, EvqTemporary, 1)); + samplesQuery->setLoc(loc); + + TIntermAggregate* compoundStatement = nullptr; + + TVariable* outSampleCount = makeInternalVariable("@sampleCount", TType(EbtUint)); + outSampleCount->getWritableType().getQualifier().makeTemporary(); + TIntermTyped* compAssign = intermediate.addAssign(EOpAssign, intermediate.addSymbol(*outSampleCount, loc), + samplesQuery, loc); + compoundStatement = intermediate.growAggregate(compoundStatement, compAssign); + + TIntermTyped* idxtest[4]; + + // Create tests against 2, 4, 8, and 16 sample values + int count = 0; + for (int val = 2; val <= 16; val *= 2) + idxtest[count++] = + intermediate.addBinaryNode(EOpEqual, + intermediate.addSymbol(*outSampleCount, loc), + intermediate.addConstantUnion(val, loc), + loc, TType(EbtBool)); + + const TOperator idxOp = (argSampIdx->getQualifier().storage == EvqConst) ? EOpIndexDirect : EOpIndexIndirect; + + // Create index ops into position arrays given sample index. + // TODO: should it be clamped? + TIntermTyped* index[4]; + count = 0; + for (int val = 2; val <= 16; val *= 2) { + index[count] = intermediate.addIndex(idxOp, getSamplePosArray(val), argSampIdx, loc); + index[count++]->setType(TType(EbtFloat, EvqTemporary, 2)); + } + + // Create expression as: + // (sampleCount == 2) ? pos2[idx] : + // (sampleCount == 4) ? pos4[idx] : + // (sampleCount == 8) ? pos8[idx] : + // (sampleCount == 16) ? pos16[idx] : float2(0,0); + TIntermTyped* test = + intermediate.addSelection(idxtest[0], index[0], + intermediate.addSelection(idxtest[1], index[1], + intermediate.addSelection(idxtest[2], index[2], + intermediate.addSelection(idxtest[3], index[3], + getSamplePosArray(1), loc), loc), loc), loc); + + compoundStatement = intermediate.growAggregate(compoundStatement, test); + compoundStatement->setOperator(EOpSequence); + compoundStatement->setLoc(loc); + compoundStatement->setType(TType(EbtFloat, EvqTemporary, 2)); + + node = compoundStatement; + break; } + case EOpSubpassLoad: + { + const TIntermTyped* argSubpass = + argAggregate ? argAggregate->getSequence()[0]->getAsTyped() : + arguments->getAsTyped(); + + const TSampler& sampler = argSubpass->getType().getSampler(); + + // subpass load: the multisample form is overloaded. Here, we convert that to + // the EOpSubpassLoadMS opcode. + if (argAggregate != nullptr && argAggregate->getSequence().size() > 1) + node->getAsOperator()->setOp(EOpSubpassLoadMS); + + node = convertReturn(node, sampler); + + break; + } + + default: break; // most pass through unchanged } @@ -3331,7 +4462,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType // void HlslParseContext::decomposeGeometryMethods(const TSourceLoc& loc, TIntermTyped*& node, TIntermNode* arguments) { - if (!node || !node->getAsOperator()) + if (node == nullptr || !node->getAsOperator()) return; const TOperator op = node->getAsOperator()->getOp(); @@ -3340,6 +4471,12 @@ void HlslParseContext::decomposeGeometryMethods(const TSourceLoc& loc, TIntermTy switch (op) { case EOpMethodAppend: if (argAggregate) { + // Don't emit these for non-GS stage, since we won't have the gsStreamOutput symbol. + if (language != EShLangGeometry) { + node = nullptr; + return; + } + TIntermAggregate* sequence = nullptr; TIntermAggregate* emit = new TIntermAggregate(EOpEmitVertex); @@ -3369,6 +4506,12 @@ void HlslParseContext::decomposeGeometryMethods(const TSourceLoc& loc, TIntermTy case EOpMethodRestartStrip: { + // Don't emit these for non-GS stage, since we won't have the gsStreamOutput symbol. + if (language != EShLangGeometry) { + node = nullptr; + return; + } + TIntermAggregate* cut = new TIntermAggregate(EOpEndPrimitive); cut->setLoc(loc); cut->setType(TType(EbtVoid)); @@ -3447,6 +4590,28 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*& break; } + case EOpAny: // fall through + case EOpAll: + { + TIntermTyped* typedArg = arguments->getAsTyped(); + + // HLSL allows float/etc types here, and the SPIR-V opcode requires a bool. + // We'll convert here. Note that for efficiency, we could add a smarter + // decomposition for some type cases, e.g, maybe by decomposing a dot product. + if (typedArg->getType().getBasicType() != EbtBool) { + const TType boolType(EbtBool, EvqTemporary, + typedArg->getVectorSize(), + typedArg->getMatrixCols(), + typedArg->getMatrixRows(), + typedArg->isVector()); + + typedArg = intermediate.addConversion(EOpConstructBool, boolType, typedArg); + node->getAsUnaryNode()->setOperand(typedArg); + } + + break; + } + case EOpSaturate: { // saturate(a) -> clamp(a,0,1) @@ -3516,14 +4681,21 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*& std::max(arg0->getType().getMatrixRows(), 1); TConstUnion zero; - zero.setDConst(0.0); + if (arg0->getType().isIntegerDomain()) + zero.setDConst(0); + else + zero.setDConst(0.0); TConstUnionArray zeros(constComponentCount, zero); less->getSequence().push_back(intermediate.addConstantUnion(zeros, arg0->getType(), loc, true)); compareNode = intermediate.addBuiltInFunctionCall(loc, EOpAny, true, less, TType(EbtBool)); } else { - TIntermTyped* zero = intermediate.addConstantUnion(0, type0, loc, true); + TIntermTyped* zero; + if (arg0->getType().isIntegerDomain()) + zero = intermediate.addConstantUnion(0, loc, true); + else + zero = intermediate.addConstantUnion(0.0, type0, loc, true); compareNode = handleBinaryMath(loc, "clip", EOpLessThan, arg0, zero); } @@ -3907,25 +5079,28 @@ void HlslParseContext::decomposeIntrinsic(const TSourceLoc& loc, TIntermTyped*& TIntermAggregate* compoundStatement = intermediate.makeAggregate(tmpArgAssign, loc); + const TType boolType(EbtBool, EvqTemporary, arg0->getVectorSize(), arg0->getMatrixCols(), + arg0->getMatrixRows()); + TIntermTyped* isnan = handleUnaryMath(loc, "isnan", EOpIsNan, intermediate.addSymbol(*tempArg, loc)); - isnan->setType(TType(EbtBool)); + isnan->setType(boolType); TIntermTyped* notnan = handleUnaryMath(loc, "!", EOpLogicalNot, isnan); - notnan->setType(TType(EbtBool)); + notnan->setType(boolType); TIntermTyped* isinf = handleUnaryMath(loc, "isinf", EOpIsInf, intermediate.addSymbol(*tempArg, loc)); - isinf->setType(TType(EbtBool)); + isinf->setType(boolType); TIntermTyped* notinf = handleUnaryMath(loc, "!", EOpLogicalNot, isinf); - notinf->setType(TType(EbtBool)); + notinf->setType(boolType); TIntermTyped* andNode = handleBinaryMath(loc, "and", EOpLogicalAnd, notnan, notinf); - andNode->setType(TType(EbtBool)); + andNode->setType(boolType); compoundStatement = intermediate.growAggregate(compoundStatement, andNode); compoundStatement->setOperator(EOpSequence); compoundStatement->setLoc(loc); - compoundStatement->setType(TType(EbtVoid)); + compoundStatement->setType(boolType); node = compoundStatement; @@ -3963,8 +5138,10 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct // It's a constructor, of type 'type'. // result = handleConstructor(loc, arguments, type); - if (result == nullptr) + if (result == nullptr) { error(loc, "cannot construct with these arguments", type.getCompleteString().c_str(), ""); + return nullptr; + } } } else { // @@ -3972,14 +5149,31 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct // const TFunction* fnCandidate = nullptr; bool builtIn = false; + int thisDepth = 0; + + // For mat mul, the situation is unusual: we have to compare vector sizes to mat row or col sizes, + // and clamp the opposite arg. Since that's complex, we farm it off to a separate method. + // It doesn't naturally fall out of processing an argument at a time in isolation. + if (function->getName() == "mul") + addGenMulArgumentConversion(loc, *function, arguments); + + TIntermAggregate* aggregate = arguments ? arguments->getAsAggregate() : nullptr; // TODO: this needs improvement: there's no way at present to look up a signature in // the symbol table for an arbitrary type. This is a temporary hack until that ability exists. // It will have false positives, since it doesn't check arg counts or types. - if (arguments && arguments->getAsAggregate()) { - const TIntermSequence& sequence = arguments->getAsAggregate()->getSequence(); + if (arguments) { + // Check if first argument is struct buffer type. It may be an aggregate or a symbol, so we + // look for either case. - if (!sequence.empty() && isStructBufferType(sequence[0]->getAsTyped()->getType())) { + TIntermTyped* arg0 = nullptr; + + if (aggregate && aggregate->getSequence().size() > 0) + arg0 = aggregate->getSequence()[0]->getAsTyped(); + else if (arguments->getAsSymbolNode()) + arg0 = arguments->getAsSymbolNode(); + + if (arg0 != nullptr && isStructBufferType(arg0->getType())) { static const int methodPrefixSize = sizeof(BUILTIN_PREFIX)-1; if (function->getName().length() > methodPrefixSize && @@ -3994,7 +5188,7 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct } if (fnCandidate == nullptr) - fnCandidate = findFunction(loc, *function, builtIn, arguments); + fnCandidate = findFunction(loc, *function, builtIn, thisDepth, arguments); if (fnCandidate) { // This is a declared function that might map to @@ -4004,16 +5198,39 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct // Error check for a function requiring specific extensions present. if (builtIn && fnCandidate->getNumExtensions()) - requireExtensions(loc, fnCandidate->getNumExtensions(), fnCandidate->getExtensions(), fnCandidate->getName().c_str()); + requireExtensions(loc, fnCandidate->getNumExtensions(), fnCandidate->getExtensions(), + fnCandidate->getName().c_str()); - // Convert 'in' arguments + // turn an implicit member-function resolution into an explicit call + TString callerName; + if (thisDepth == 0) + callerName = fnCandidate->getMangledName(); + else { + // get the explicit (full) name of the function + callerName = currentTypePrefix[currentTypePrefix.size() - thisDepth]; + callerName += fnCandidate->getMangledName(); + // insert the implicit calling argument + pushFrontArguments(intermediate.addSymbol(*getImplicitThis(thisDepth)), arguments); + } + + // Convert 'in' arguments, so that types match. + // However, skip those that need expansion, that is covered next. if (arguments) addInputArgumentConversions(*fnCandidate, arguments); + // Expand arguments. Some arguments must physically expand to a different set + // than what the shader declared and passes. + if (arguments && !builtIn) + expandArguments(loc, *fnCandidate, arguments); + + // Expansion may have changed the form of arguments + aggregate = arguments ? arguments->getAsAggregate() : nullptr; + op = fnCandidate->getBuiltInOp(); if (builtIn && op != EOpNull) { // A function call mapped to a built-in operation. - result = intermediate.addBuiltInFunctionCall(loc, op, fnCandidate->getParamCount() == 1, arguments, fnCandidate->getType()); + result = intermediate.addBuiltInFunctionCall(loc, op, fnCandidate->getParamCount() == 1, arguments, + fnCandidate->getType()); if (result == nullptr) { error(arguments->getLoc(), " wrong operand type", "Internal Error", "built in unary operator function. Type: %s", @@ -4026,14 +5243,14 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct // It could still be a built-in function, but only if PureOperatorBuiltins == false. result = intermediate.setAggregateOperator(arguments, EOpFunctionCall, fnCandidate->getType(), loc); TIntermAggregate* call = result->getAsAggregate(); - call->setName(fnCandidate->getMangledName()); + call->setName(callerName); // this is how we know whether the given function is a built-in function or a user-defined function // if builtIn == false, it's a userDefined -> could be an overloaded built-in function also // if builtIn == true, it's definitely a built-in function with EOpNull if (! builtIn) { call->setUserDefined(); - intermediate.addToCallGraph(infoSink, currentCaller, fnCandidate->getMangledName()); + intermediate.addToCallGraph(infoSink, currentCaller, callerName); } } @@ -4046,50 +5263,160 @@ TIntermTyped* HlslParseContext::handleFunctionCall(const TSourceLoc& loc, TFunct decomposeSampleMethods(loc, result, arguments); // HLSL->AST sample method decompositions decomposeGeometryMethods(loc, result, arguments); // HLSL->AST geometry method decompositions + // Create the qualifier list, carried in the AST for the call. + // Because some arguments expand to multiple arguments, the qualifier list will + // be longer than the formal parameter list. + if (result == fnNode && result->getAsAggregate()) { + TQualifierList& qualifierList = result->getAsAggregate()->getQualifierList(); + for (int i = 0; i < fnCandidate->getParamCount(); ++i) { + TStorageQualifier qual = (*fnCandidate)[i].type->getQualifier().storage; + if (hasStructBuffCounter(*(*fnCandidate)[i].type)) { + // add buffer and counter buffer argument qualifier + qualifierList.push_back(qual); + qualifierList.push_back(qual); + } else if (shouldFlatten(*(*fnCandidate)[i].type, (*fnCandidate)[i].type->getQualifier().storage, + true)) { + // add structure member expansion + for (int memb = 0; memb < (int)(*fnCandidate)[i].type->getStruct()->size(); ++memb) + qualifierList.push_back(qual); + } else { + // Normal 1:1 case + qualifierList.push_back(qual); + } + } + } + // Convert 'out' arguments. If it was a constant folded built-in, it won't be an aggregate anymore. // Built-ins with a single argument aren't called with an aggregate, but they also don't have an output. // Also, build the qualifier list for user function calls, which are always called with an aggregate. // We don't do this is if there has been a decomposition, which will have added its own conversions // for output parameters. - if (result == fnNode && result->getAsAggregate()) { - TQualifierList& qualifierList = result->getAsAggregate()->getQualifierList(); - for (int i = 0; i < fnCandidate->getParamCount(); ++i) { - TStorageQualifier qual = (*fnCandidate)[i].type->getQualifier().storage; - qualifierList.push_back(qual); - } + if (result == fnNode && result->getAsAggregate()) result = addOutputArgumentConversions(*fnCandidate, *result->getAsOperator()); - } } } // generic error recovery - // TODO: simplification: localize all the error recoveries that look like this, and taking type into account to reduce cascades + // TODO: simplification: localize all the error recoveries that look like this, and taking type into account to + // reduce cascades if (result == nullptr) result = intermediate.addConstantUnion(0.0, EbtFloat, loc); return result; } +// An initial argument list is difficult: it can be null, or a single node, +// or an aggregate if more than one argument. Add one to the front, maintaining +// this lack of uniformity. +void HlslParseContext::pushFrontArguments(TIntermTyped* front, TIntermTyped*& arguments) +{ + if (arguments == nullptr) + arguments = front; + else if (arguments->getAsAggregate() != nullptr) + arguments->getAsAggregate()->getSequence().insert(arguments->getAsAggregate()->getSequence().begin(), front); + else + arguments = intermediate.growAggregate(front, arguments); +} + +// +// HLSL allows mismatched dimensions on vec*mat, mat*vec, vec*vec, and mat*mat. This is a +// situation not well suited to resolution in intrinsic selection, but we can do so here, since we +// can look at both arguments insert explicit shape changes if required. +// +void HlslParseContext::addGenMulArgumentConversion(const TSourceLoc& loc, TFunction& call, TIntermTyped*& args) +{ + TIntermAggregate* argAggregate = args ? args->getAsAggregate() : nullptr; + + if (argAggregate == nullptr || argAggregate->getSequence().size() != 2) { + // It really ought to have two arguments. + error(loc, "expected: mul arguments", "", ""); + return; + } + + TIntermTyped* arg0 = argAggregate->getSequence()[0]->getAsTyped(); + TIntermTyped* arg1 = argAggregate->getSequence()[1]->getAsTyped(); + + if (arg0->isVector() && arg1->isVector()) { + // For: + // vec * vec: it's handled during intrinsic selection, so while we could do it here, + // we can also ignore it, which is easier. + } else if (arg0->isVector() && arg1->isMatrix()) { + // vec * mat: we clamp the vec if the mat col is smaller, else clamp the mat col. + if (arg0->getVectorSize() < arg1->getMatrixCols()) { + // vec is smaller, so truncate larger mat dimension + const TType truncType(arg1->getBasicType(), arg1->getQualifier().storage, arg1->getQualifier().precision, + 0, arg0->getVectorSize(), arg1->getMatrixRows()); + arg1 = addConstructor(loc, arg1, truncType); + } else if (arg0->getVectorSize() > arg1->getMatrixCols()) { + // vec is larger, so truncate vec to mat size + const TType truncType(arg0->getBasicType(), arg0->getQualifier().storage, arg0->getQualifier().precision, + arg1->getMatrixCols()); + arg0 = addConstructor(loc, arg0, truncType); + } + } else if (arg0->isMatrix() && arg1->isVector()) { + // mat * vec: we clamp the vec if the mat col is smaller, else clamp the mat col. + if (arg1->getVectorSize() < arg0->getMatrixRows()) { + // vec is smaller, so truncate larger mat dimension + const TType truncType(arg0->getBasicType(), arg0->getQualifier().storage, arg0->getQualifier().precision, + 0, arg0->getMatrixCols(), arg1->getVectorSize()); + arg0 = addConstructor(loc, arg0, truncType); + } else if (arg1->getVectorSize() > arg0->getMatrixRows()) { + // vec is larger, so truncate vec to mat size + const TType truncType(arg1->getBasicType(), arg1->getQualifier().storage, arg1->getQualifier().precision, + arg0->getMatrixRows()); + arg1 = addConstructor(loc, arg1, truncType); + } + } else if (arg0->isMatrix() && arg1->isMatrix()) { + // mat * mat: we clamp the smaller inner dimension to match the other matrix size. + // Remember, HLSL Mrc = GLSL/SPIRV Mcr. + if (arg0->getMatrixRows() > arg1->getMatrixCols()) { + const TType truncType(arg0->getBasicType(), arg0->getQualifier().storage, arg0->getQualifier().precision, + 0, arg0->getMatrixCols(), arg1->getMatrixCols()); + arg0 = addConstructor(loc, arg0, truncType); + } else if (arg0->getMatrixRows() < arg1->getMatrixCols()) { + const TType truncType(arg1->getBasicType(), arg1->getQualifier().storage, arg1->getQualifier().precision, + 0, arg0->getMatrixRows(), arg1->getMatrixRows()); + arg1 = addConstructor(loc, arg1, truncType); + } + } else { + // It's something with scalars: we'll just leave it alone. Function selection will handle it + // downstream. + } + + // Warn if we altered one of the arguments + if (arg0 != argAggregate->getSequence()[0] || arg1 != argAggregate->getSequence()[1]) + warn(loc, "mul() matrix size mismatch", "", ""); + + // Put arguments back. (They might be unchanged, in which case this is harmless). + argAggregate->getSequence()[0] = arg0; + argAggregate->getSequence()[1] = arg1; + + call[0].type = &arg0->getWritableType(); + call[1].type = &arg1->getWritableType(); +} + // // Add any needed implicit conversions for function-call arguments to input parameters. // void HlslParseContext::addInputArgumentConversions(const TFunction& function, TIntermTyped*& arguments) { TIntermAggregate* aggregate = arguments->getAsAggregate(); - const auto setArg = [&](int argNum, TIntermTyped* arg) { + + // Replace a single argument with a single argument. + const auto setArg = [&](int paramNum, TIntermTyped* arg) { if (function.getParamCount() == 1) arguments = arg; else { - if (aggregate) - aggregate->getSequence()[argNum] = arg; - else + if (aggregate == nullptr) arguments = arg; + else + aggregate->getSequence()[paramNum] = arg; } }; // Process each argument's conversion - for (int i = 0; i < function.getParamCount(); ++i) { - if (! function[i].type->getQualifier().isParamInput()) + for (int param = 0; param < function.getParamCount(); ++param) { + if (! function[param].type->getQualifier().isParamInput()) continue; // At this early point there is a slight ambiguity between whether an aggregate 'arguments' @@ -4097,42 +5424,119 @@ void HlslParseContext::addInputArgumentConversions(const TFunction& function, TI // means take 'arguments' itself as the one argument. TIntermTyped* arg = function.getParamCount() == 1 ? arguments->getAsTyped() - : (aggregate ? aggregate->getSequence()[i]->getAsTyped() : arguments->getAsTyped()); - if (*function[i].type != arg->getType()) { + : (aggregate ? + aggregate->getSequence()[param]->getAsTyped() : + arguments->getAsTyped()); + if (*function[param].type != arg->getType()) { // In-qualified arguments just need an extra node added above the argument to // convert to the correct type. - TIntermTyped* convArg = intermediate.addConversion(EOpFunctionCall, *function[i].type, arg); + TIntermTyped* convArg = intermediate.addConversion(EOpFunctionCall, *function[param].type, arg); if (convArg != nullptr) - convArg = intermediate.addShapeConversion(EOpFunctionCall, *function[i].type, convArg); + convArg = intermediate.addUniShapeConversion(EOpFunctionCall, *function[param].type, convArg); if (convArg != nullptr) - setArg(i, convArg); + setArg(param, convArg); else - error(arg->getLoc(), "cannot convert input argument, argument", "", "%d", i); + error(arg->getLoc(), "cannot convert input argument, argument", "", "%d", param); } else { - if (wasFlattened(arg) || wasSplit(arg)) { - // Will make a two-level subtree. - // The deepest will copy member-by-member to build the structure to pass. - // The level above that will be a two-operand EOpComma sequence that follows the copy by the - // object itself. - TVariable* internalAggregate = makeInternalVariable("aggShadow", *function[i].type); - internalAggregate->getWritableType().getQualifier().makeTemporary(); - TIntermSymbol* internalSymbolNode = new TIntermSymbol(internalAggregate->getUniqueId(), - internalAggregate->getName(), - internalAggregate->getType()); - internalSymbolNode->setLoc(arg->getLoc()); - // This makes the deepest level, the member-wise copy - TIntermAggregate* assignAgg = handleAssign(arg->getLoc(), EOpAssign, internalSymbolNode, arg)->getAsAggregate(); + if (wasFlattened(arg)) { + // If both formal and calling arg are to be flattened, leave that to argument + // expansion, not conversion. + if (!shouldFlatten(*function[param].type, function[param].type->getQualifier().storage, true)) { + // Will make a two-level subtree. + // The deepest will copy member-by-member to build the structure to pass. + // The level above that will be a two-operand EOpComma sequence that follows the copy by the + // object itself. + TVariable* internalAggregate = makeInternalVariable("aggShadow", *function[param].type); + internalAggregate->getWritableType().getQualifier().makeTemporary(); + TIntermSymbol* internalSymbolNode = new TIntermSymbol(internalAggregate->getUniqueId(), + internalAggregate->getName(), + internalAggregate->getType()); + internalSymbolNode->setLoc(arg->getLoc()); + // This makes the deepest level, the member-wise copy + TIntermAggregate* assignAgg = handleAssign(arg->getLoc(), EOpAssign, + internalSymbolNode, arg)->getAsAggregate(); - // Now, pair that with the resulting aggregate. - assignAgg = intermediate.growAggregate(assignAgg, internalSymbolNode, arg->getLoc()); - assignAgg->setOperator(EOpComma); - assignAgg->setType(internalAggregate->getType()); - setArg(i, assignAgg); + // Now, pair that with the resulting aggregate. + assignAgg = intermediate.growAggregate(assignAgg, internalSymbolNode, arg->getLoc()); + assignAgg->setOperator(EOpComma); + assignAgg->setType(internalAggregate->getType()); + setArg(param, assignAgg); + } } } } } +// +// Add any needed implicit expansion of calling arguments from what the shader listed to what's +// internally needed for the AST (given the constraints downstream). +// +void HlslParseContext::expandArguments(const TSourceLoc& loc, const TFunction& function, TIntermTyped*& arguments) +{ + TIntermAggregate* aggregate = arguments->getAsAggregate(); + int functionParamNumberOffset = 0; + + // Replace a single argument with a single argument. + const auto setArg = [&](int paramNum, TIntermTyped* arg) { + if (function.getParamCount() + functionParamNumberOffset == 1) + arguments = arg; + else { + if (aggregate == nullptr) + arguments = arg; + else + aggregate->getSequence()[paramNum] = arg; + } + }; + + // Replace a single argument with a list of arguments + const auto setArgList = [&](int paramNum, const TVector& args) { + if (args.size() == 1) + setArg(paramNum, args.front()); + else if (args.size() > 1) { + if (function.getParamCount() + functionParamNumberOffset == 1) { + arguments = intermediate.makeAggregate(args.front()); + std::for_each(args.begin() + 1, args.end(), + [&](TIntermTyped* arg) { + arguments = intermediate.growAggregate(arguments, arg); + }); + } else { + auto it = aggregate->getSequence().erase(aggregate->getSequence().begin() + paramNum); + aggregate->getSequence().insert(it, args.begin(), args.end()); + } + functionParamNumberOffset += (int)(args.size() - 1); + } + }; + + // Process each argument's conversion + for (int param = 0; param < function.getParamCount(); ++param) { + // At this early point there is a slight ambiguity between whether an aggregate 'arguments' + // is the single argument itself or its children are the arguments. Only one argument + // means take 'arguments' itself as the one argument. + TIntermTyped* arg = function.getParamCount() == 1 + ? arguments->getAsTyped() + : (aggregate ? + aggregate->getSequence()[param + functionParamNumberOffset]->getAsTyped() : + arguments->getAsTyped()); + + if (wasFlattened(arg) && shouldFlatten(*function[param].type, function[param].type->getQualifier().storage, true)) { + // Need to pass the structure members instead of the structure. + TVector memberArgs; + for (int memb = 0; memb < (int)arg->getType().getStruct()->size(); ++memb) + memberArgs.push_back(flattenAccess(arg, memb)); + setArgList(param + functionParamNumberOffset, memberArgs); + } + } + + // TODO: if we need both hidden counter args (below) and struct expansion (above) + // the two algorithms need to be merged: Each assumes the list starts out 1:1 between + // parameters and arguments. + + // If any argument is a pass-by-reference struct buffer with an associated counter + // buffer, we have to add another hidden parameter for that counter. + if (aggregate) + addStructBuffArguments(loc, aggregate); +} + // // Add any needed implicit output conversions for function-call arguments. This // can require a new tree topology, complicated further by whether the function @@ -4204,7 +5608,8 @@ TIntermTyped* HlslParseContext::addOutputArgumentConversions(const TFunction& fu TIntermSymbol* tempArgNode = intermediate.addSymbol(*tempArg, loc); // This makes the deepest level, the member-wise copy - TIntermTyped* tempAssign = handleAssign(arguments[i]->getLoc(), EOpAssign, arguments[i]->getAsTyped(), tempArgNode); + TIntermTyped* tempAssign = handleAssign(arguments[i]->getLoc(), EOpAssign, arguments[i]->getAsTyped(), + tempArgNode); tempAssign = handleLvalue(arguments[i]->getLoc(), "assign", tempAssign); conversionTree = intermediate.growAggregate(conversionTree, tempAssign, arguments[i]->getLoc()); @@ -4225,6 +5630,55 @@ TIntermTyped* HlslParseContext::addOutputArgumentConversions(const TFunction& fu return conversionTree; } +// +// Add any needed "hidden" counter buffer arguments for function calls. +// +// Modifies the 'aggregate' argument if needed. Otherwise, is no-op. +// +void HlslParseContext::addStructBuffArguments(const TSourceLoc& loc, TIntermAggregate*& aggregate) +{ + // See if there are any SB types with counters. + const bool hasStructBuffArg = + std::any_of(aggregate->getSequence().begin(), + aggregate->getSequence().end(), + [this](const TIntermNode* node) { + return (node->getAsTyped() != nullptr) && hasStructBuffCounter(node->getAsTyped()->getType()); + }); + + // Nothing to do, if we didn't find one. + if (! hasStructBuffArg) + return; + + TIntermSequence argsWithCounterBuffers; + + for (int param = 0; param < int(aggregate->getSequence().size()); ++param) { + argsWithCounterBuffers.push_back(aggregate->getSequence()[param]); + + if (hasStructBuffCounter(aggregate->getSequence()[param]->getAsTyped()->getType())) { + const TIntermSymbol* blockSym = aggregate->getSequence()[param]->getAsSymbolNode(); + if (blockSym != nullptr) { + TType counterType; + counterBufferType(loc, counterType); + + const TString counterBlockName(getStructBuffCounterName(blockSym->getName())); + + TVariable* variable = makeInternalVariable(counterBlockName, counterType); + + // Mark this buffer as requiring a counter block. TODO: there should be a better + // way to track it. + structBufferCounter[counterBlockName] = true; + + TIntermSymbol* sym = intermediate.addSymbol(*variable, loc); + argsWithCounterBuffers.push_back(sym); + } + } + } + + // Swap with the temp list we've built up. + aggregate->getSequence().swap(argsWithCounterBuffers); +} + + // // Do additional checking of built-in function calls that is not caught // by normal semantic checks on argument type, extension tagging, etc. @@ -4265,7 +5719,8 @@ void HlslParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fn case EOpTextureGather: // More than two arguments needs gpu_shader5, and rectangular or shadow needs gpu_shader5, // otherwise, need GL_ARB_texture_gather. - if (fnCandidate.getParamCount() > 2 || fnCandidate[0].type->getSampler().dim == EsdRect || fnCandidate[0].type->getSampler().shadow) { + if (fnCandidate.getParamCount() > 2 || fnCandidate[0].type->getSampler().dim == EsdRect || + fnCandidate[0].type->getSampler().shadow) { if (! fnCandidate[0].type->getSampler().shadow) compArg = 2; } @@ -4320,14 +5775,15 @@ void HlslParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fn } if (arg > 0) { - if (! aggArgs[arg]->getAsConstantUnion()) + if (aggArgs[arg]->getAsConstantUnion() == nullptr) error(loc, "argument must be compile-time constant", "texel offset", ""); else { const TType& type = aggArgs[arg]->getAsTyped()->getType(); for (int c = 0; c < type.getVectorSize(); ++c) { int offset = aggArgs[arg]->getAsConstantUnion()->getConstArray()[c].getIConst(); if (offset > resources.maxProgramTexelOffset || offset < resources.minProgramTexelOffset) - error(loc, "value is out of range:", "texel offset", "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]"); + error(loc, "value is out of range:", "texel offset", + "[gl_MinProgramTexelOffset, gl_MaxProgramTexelOffset]"); } } } @@ -4363,7 +5819,8 @@ void HlslParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fn // desktop 4.4 and later: swizzles may be used const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true); if (base == nullptr || base->getType().getQualifier().storage != EvqVaryingIn) - error(loc, "first argument must be an interpolant, or interpolant-array element", fnCandidate.getName().c_str(), ""); + error(loc, "first argument must be an interpolant, or interpolant-array element", + fnCandidate.getName().c_str(), ""); } break; @@ -4397,16 +5854,49 @@ TFunction* HlslParseContext::makeConstructorCall(const TSourceLoc& loc, const TT // Handle seeing a "COLON semantic" at the end of a type declaration, // by updating the type according to the semantic. // -void HlslParseContext::handleSemantic(TSourceLoc loc, TQualifier& qualifier, TBuiltInVariable builtIn, const TString& upperCase) +void HlslParseContext::handleSemantic(TSourceLoc loc, TQualifier& qualifier, TBuiltInVariable builtIn, + const TString& upperCase) { - // adjust for stage in/out + // Parse and return semantic number. If limit is 0, it will be ignored. Otherwise, if the parsed + // semantic number is >= limit, errorMsg is issued and 0 is returned. + // TODO: it would be nicer if limit and errorMsg had default parameters, but some compilers don't yet + // accept those in lambda functions. + const auto getSemanticNumber = [this, loc](const TString& semantic, unsigned int limit, const char* errorMsg) -> unsigned int { + size_t pos = semantic.find_last_not_of("0123456789"); + if (pos == std::string::npos) + return 0u; + + unsigned int semanticNum = (unsigned int)atoi(semantic.c_str() + pos + 1); + + if (limit != 0 && semanticNum >= limit) { + error(loc, errorMsg, semantic.c_str(), ""); + return 0u; + } + + return semanticNum; + }; switch(builtIn) { + case EbvNone: + // Get location numbers from fragment outputs, instead of + // auto-assigning them. + if (language == EShLangFragment && upperCase.compare(0, 9, "SV_TARGET") == 0) { + qualifier.layoutLocation = getSemanticNumber(upperCase, 0, nullptr); + nextOutLocation = std::max(nextOutLocation, qualifier.layoutLocation + 1u); + } else if (upperCase.compare(0, 15, "SV_CLIPDISTANCE") == 0) { + builtIn = EbvClipDistance; + qualifier.layoutLocation = getSemanticNumber(upperCase, maxClipCullRegs, "invalid clip semantic"); + } else if (upperCase.compare(0, 15, "SV_CULLDISTANCE") == 0) { + builtIn = EbvCullDistance; + qualifier.layoutLocation = getSemanticNumber(upperCase, maxClipCullRegs, "invalid cull semantic"); + } + break; case EbvPosition: + // adjust for stage in/out if (language == EShLangFragment) builtIn = EbvFragCoord; break; - case EbvStencilRef: + case EbvFragStencilRef: error(loc, "unimplemented; need ARB_shader_stencil_export", "SV_STENCILREF", ""); break; case EbvTessLevelInner: @@ -4417,7 +5907,8 @@ void HlslParseContext::handleSemantic(TSourceLoc loc, TQualifier& qualifier, TBu break; } - qualifier.builtIn = builtIn; + if (qualifier.builtIn == EbvNone) + qualifier.builtIn = builtIn; qualifier.semanticName = intermediate.addSemanticName(upperCase); } @@ -4489,13 +5980,30 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi } // TODO: learn what all these really mean and how they interact with regNumber and subComponent + const std::vector& resourceInfo = intermediate.getResourceSetBinding(); switch (std::tolower(desc[0])) { case 'b': case 't': case 'c': case 's': case 'u': - qualifier.layoutBinding = regNumber + subComponent; + // if nothing else has set the binding, do so now + // (other mechanisms override this one) + if (!qualifier.hasBinding()) + qualifier.layoutBinding = regNumber + subComponent; + + // This handles per-register layout sets numbers. For the global mode which sets + // every symbol to the same value, see setLinkageLayoutSets(). + if ((resourceInfo.size() % 3) == 0) { + // Apply per-symbol resource set and binding. + for (auto it = resourceInfo.cbegin(); it != resourceInfo.cend(); it = it + 3) { + if (strcmp(desc.c_str(), it[0].c_str()) == 0) { + qualifier.layoutSet = atoi(it[1].c_str()); + qualifier.layoutBinding = atoi(it[2].c_str()) + subComponent; + break; + } + } + } break; default: warn(loc, "ignoring unrecognized register type", "register", "%c", desc[0]); @@ -4516,7 +6024,9 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi return true; }; - if (spaceDesc) { + // if nothing else has set the set, do so now + // (other mechanisms override this one) + if (spaceDesc && !qualifier.hasSet()) { if (! crackSpace()) { error(loc, "expected spaceN", "register", ""); return; @@ -4527,14 +6037,16 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi // Convert to a scalar boolean, or if not allowed by HLSL semantics, // report an error and return nullptr. -TIntermTyped* HlslParseContext::convertConditionalExpression(const TSourceLoc& loc, TIntermTyped* condition) +TIntermTyped* HlslParseContext::convertConditionalExpression(const TSourceLoc& loc, TIntermTyped* condition, + bool mustBeScalar) { - if (!condition->getType().isScalarOrVec1()) { + if (mustBeScalar && !condition->getType().isScalarOrVec1()) { error(loc, "requires a scalar", "conditional expression", ""); return nullptr; } - return intermediate.addConversion(EOpConstructBool, TType(EbtBool), condition); + return intermediate.addConversion(EOpConstructBool, TType(EbtBool, EvqTemporary, condition->getVectorSize()), + condition); } // @@ -4663,6 +6175,33 @@ bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node case EOpConstructDMat4x2: case EOpConstructDMat4x3: case EOpConstructDMat4x4: + case EOpConstructIMat2x2: + case EOpConstructIMat2x3: + case EOpConstructIMat2x4: + case EOpConstructIMat3x2: + case EOpConstructIMat3x3: + case EOpConstructIMat3x4: + case EOpConstructIMat4x2: + case EOpConstructIMat4x3: + case EOpConstructIMat4x4: + case EOpConstructUMat2x2: + case EOpConstructUMat2x3: + case EOpConstructUMat2x4: + case EOpConstructUMat3x2: + case EOpConstructUMat3x3: + case EOpConstructUMat3x4: + case EOpConstructUMat4x2: + case EOpConstructUMat4x3: + case EOpConstructUMat4x4: + case EOpConstructBMat2x2: + case EOpConstructBMat2x3: + case EOpConstructBMat2x4: + case EOpConstructBMat3x2: + case EOpConstructBMat3x3: + case EOpConstructBMat3x4: + case EOpConstructBMat4x2: + case EOpConstructBMat4x3: + case EOpConstructBMat4x4: constructingMatrix = true; break; default: @@ -4719,7 +6258,8 @@ bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node if (type.isImplicitlySizedArray()) { // auto adapt the constructor type to the number of arguments type.changeOuterArraySize(function.getParamCount()); - } else if (type.getOuterArraySize() != function.getParamCount()) { + } else if (type.getOuterArraySize() != function.getParamCount() && + type.computeNumComponents() > size) { error(loc, "array constructor needs one argument per array element", "constructor", ""); return true; } @@ -4731,7 +6271,8 @@ bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node TArraySizes& arraySizes = type.getArraySizes(); // At least the dimensionalities have to match. - if (! function[0].type->isArray() || arraySizes.getNumDims() != function[0].type->getArraySizes().getNumDims() + 1) { + if (! function[0].type->isArray() || + arraySizes.getNumDims() != function[0].type->getArraySizes().getNumDims() + 1) { error(loc, "array constructor argument not correct type to construct array element", "constructor", ""); return true; } @@ -4748,6 +6289,12 @@ bool HlslParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node } } + // Some array -> array type casts are okay + if (arrayArg && function.getParamCount() == 1 && op != EOpConstructStruct && type.isArray() && + !type.isArrayOfArrays() && !function[0].type->isArrayOfArrays() && + type.getVectorSize() >= 1 && function[0].type->getVectorSize() >= 1) + return false; + if (arrayArg && op != EOpConstructStruct && ! type.isArrayOfArrays()) { error(loc, "constructing non-array constituent from array argument", "constructor", ""); return true; @@ -4849,7 +6396,8 @@ bool HlslParseContext::constructorTextureSamplerError(const TSourceLoc& loc, con return true; } if (function.getType().getSampler().shadow != function[1].type->getSampler().shadow) { - error(loc, "sampler-constructor second argument presence of shadow must match constructor presence of shadow", token, ""); + error(loc, "sampler-constructor second argument presence of shadow must match constructor presence of shadow", + token, ""); return true; } @@ -4939,7 +6487,8 @@ int HlslParseContext::computeSamplerTypeIndex(TSampler& sampler) int shadowIndex = sampler.shadow ? 1 : 0; int externalIndex = sampler.external ? 1 : 0; - return EsdNumDims * (EbtNumTypes * (2 * (2 * arrayIndex + shadowIndex) + externalIndex) + sampler.type) + sampler.dim; + return EsdNumDims * + (EbtNumTypes * (2 * (2 * arrayIndex + shadowIndex) + externalIndex) + sampler.type) + sampler.dim; } // @@ -5015,9 +6564,10 @@ void HlslParseContext::arrayDimMerge(TType& type, const TArraySizes* sizes) // Do all the semantic checking for declaring or redeclaring an array, with and // without a size, and make the right changes to the symbol table. // -void HlslParseContext::declareArray(const TSourceLoc& loc, const TString& identifier, const TType& type, TSymbol*& symbol, bool track) +void HlslParseContext::declareArray(const TSourceLoc& loc, const TString& identifier, const TType& type, + TSymbol*& symbol, bool track) { - if (! symbol) { + if (symbol == nullptr) { bool currentScope; symbol = symbolTable.find(identifier, nullptr, ¤tScope); @@ -5048,7 +6598,7 @@ void HlslParseContext::declareArray(const TSourceLoc& loc, const TString& identi // Process a redeclaration. // - if (! symbol) { + if (symbol == nullptr) { error(loc, "array variable name expected", identifier.c_str(), ""); return; } @@ -5057,7 +6607,8 @@ void HlslParseContext::declareArray(const TSourceLoc& loc, const TString& identi TType& existingType = symbol->getWritableType(); if (existingType.isExplicitlySizedArray()) { - // be more lenient for input arrays to geometry shaders and tessellation control outputs, where the redeclaration is the same size + // be more lenient for input arrays to geometry shaders and tessellation control outputs, + // where the redeclaration is the same size return; } @@ -5113,7 +6664,8 @@ void HlslParseContext::updateImplicitArraySize(const TSourceLoc& loc, TIntermNod // // Enforce non-initializer type/qualifier rules. // -void HlslParseContext::fixConstInit(const TSourceLoc& loc, const TString& identifier, TType& type, TIntermTyped*& initializer) +void HlslParseContext::fixConstInit(const TSourceLoc& loc, const TString& identifier, TType& type, + TIntermTyped*& initializer) { // // Make the qualifier make sense, given that there is an initializer. @@ -5147,126 +6699,6 @@ TSymbol* HlslParseContext::redeclareBuiltinVariable(const TSourceLoc& /*loc*/, c return nullptr; } -// -// Either redeclare the requested block, or give an error message why it can't be done. -// -// TODO: functionality: explicitly sizing members of redeclared blocks is not giving them an explicit size -void HlslParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newTypeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes) -{ - // Redeclaring a built-in block... - - // Blocks with instance names are easy to find, lookup the instance name, - // Anonymous blocks need to be found via a member. - bool builtIn; - TSymbol* block; - if (instanceName) - block = symbolTable.find(*instanceName, &builtIn); - else - block = symbolTable.find(newTypeList.front().type->getFieldName(), &builtIn); - - // If the block was not found, this must be a version/profile/stage - // that doesn't have it, or the instance name is wrong. - const char* errorName = instanceName ? instanceName->c_str() : newTypeList.front().type->getFieldName().c_str(); - if (! block) { - error(loc, "no declaration found for redeclaration", errorName, ""); - return; - } - // Built-in blocks cannot be redeclared more than once, which if happened, - // we'd be finding the already redeclared one here, rather than the built in. - if (! builtIn) { - error(loc, "can only redeclare a built-in block once, and before any use", blockName.c_str(), ""); - return; - } - - // Copy the block to make a writable version, to insert into the block table after editing. - block = symbolTable.copyUpDeferredInsert(block); - - if (block->getType().getBasicType() != EbtBlock) { - error(loc, "cannot redeclare a non block as a block", errorName, ""); - return; - } - - // Edit and error check the container against the redeclaration - // - remove unused members - // - ensure remaining qualifiers/types match - TType& type = block->getWritableType(); - TTypeList::iterator member = type.getWritableStruct()->begin(); - size_t numOriginalMembersFound = 0; - while (member != type.getStruct()->end()) { - // look for match - bool found = false; - TTypeList::const_iterator newMember; - TSourceLoc memberLoc; - memberLoc.init(); - for (newMember = newTypeList.begin(); newMember != newTypeList.end(); ++newMember) { - if (member->type->getFieldName() == newMember->type->getFieldName()) { - found = true; - memberLoc = newMember->loc; - break; - } - } - - if (found) { - ++numOriginalMembersFound; - // - ensure match between redeclared members' types - // - check for things that can't be changed - // - update things that can be changed - TType& oldType = *member->type; - const TType& newType = *newMember->type; - if (! newType.sameElementType(oldType)) - error(memberLoc, "cannot redeclare block member with a different type", member->type->getFieldName().c_str(), ""); - if (oldType.isArray() != newType.isArray()) - error(memberLoc, "cannot change arrayness of redeclared block member", member->type->getFieldName().c_str(), ""); - else if (! oldType.sameArrayness(newType) && oldType.isExplicitlySizedArray()) - error(memberLoc, "cannot change array size of redeclared block member", member->type->getFieldName().c_str(), ""); - if (newType.getQualifier().isMemory()) - error(memberLoc, "cannot add memory qualifier to redeclared block member", member->type->getFieldName().c_str(), ""); - if (newType.getQualifier().hasLayout()) - error(memberLoc, "cannot add layout to redeclared block member", member->type->getFieldName().c_str(), ""); - if (newType.getQualifier().patch) - error(memberLoc, "cannot add patch to redeclared block member", member->type->getFieldName().c_str(), ""); - oldType.getQualifier().centroid = newType.getQualifier().centroid; - oldType.getQualifier().sample = newType.getQualifier().sample; - oldType.getQualifier().invariant = newType.getQualifier().invariant; - oldType.getQualifier().noContraction = newType.getQualifier().noContraction; - oldType.getQualifier().smooth = newType.getQualifier().smooth; - oldType.getQualifier().flat = newType.getQualifier().flat; - oldType.getQualifier().nopersp = newType.getQualifier().nopersp; - - // go to next member - ++member; - } else { - // For missing members of anonymous blocks that have been redeclared, - // hide the original (shared) declaration. - // Instance-named blocks can just have the member removed. - if (instanceName) - member = type.getWritableStruct()->erase(member); - else { - member->type->hideMember(); - ++member; - } - } - } - - if (numOriginalMembersFound < newTypeList.size()) - error(loc, "block redeclaration has extra members", blockName.c_str(), ""); - if (type.isArray() != (arraySizes != nullptr)) - error(loc, "cannot change arrayness of redeclared block", blockName.c_str(), ""); - else if (type.isArray()) { - if (type.isExplicitlySizedArray() && arraySizes->getOuterSize() == UnsizedArraySize) - error(loc, "block already declared with size, can't redeclare as implicitly-sized", blockName.c_str(), ""); - else if (type.isExplicitlySizedArray() && type.getArraySizes() != *arraySizes) - error(loc, "cannot change array size of redeclared block", blockName.c_str(), ""); - else if (type.isImplicitlySizedArray() && arraySizes->getOuterSize() != UnsizedArraySize) - type.changeOuterArraySize(arraySizes->getOuterSize()); - } - - symbolTable.insert(*block); - - // Save it in the AST for linker use. - trackLinkage(*block); -} - // // Generate index to the array element in a structure buffer (SSBO) // @@ -5363,6 +6795,7 @@ void HlslParseContext::paramFix(TType& type) type.getQualifier().storage = EvqConstReadOnly; break; case EvqGlobal: + case EvqUniform: case EvqTemporary: type.getQualifier().storage = EvqIn; break; @@ -5375,6 +6808,7 @@ void HlslParseContext::paramFix(TType& type) bufferQualifier.storage = type.getQualifier().storage; bufferQualifier.readonly = type.getQualifier().readonly; bufferQualifier.coherent = type.getQualifier().coherent; + bufferQualifier.declaredBuiltIn = type.getQualifier().declaredBuiltIn; type.getQualifier() = bufferQualifier; break; } @@ -5551,7 +6985,8 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua // Put the id's layout qualifier value into the public type, for qualifiers having a number set. // This is before we know any type information for error checking. -void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qualifier, TString& id, const TIntermTyped* node) +void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qualifier, TString& id, + const TIntermTyped* node) { const char* feature = "layout-id value"; // const char* nonLiteralFeature = "non-literal layout-id value"; @@ -5609,7 +7044,8 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua // "It is a compile-time error to specify an *xfb_buffer* that is greater than // the implementation-dependent constant gl_MaxTransformFeedbackBuffers." if (value >= resources.maxTransformFeedbackBuffers) - error(loc, "buffer is too large:", id.c_str(), "gl_MaxTransformFeedbackBuffers is %d", resources.maxTransformFeedbackBuffers); + error(loc, "buffer is too large:", id.c_str(), "gl_MaxTransformFeedbackBuffers is %d", + resources.maxTransformFeedbackBuffers); if (value >= (int)TQualifier::layoutXfbBufferEnd) error(loc, "buffer is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbBufferEnd - 1); else @@ -5625,7 +7061,8 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua // "The resulting stride (implicit or explicit), when divided by 4, must be less than or equal to the // implementation-dependent constant gl_MaxTransformFeedbackInterleavedComponents." if (value > 4 * resources.maxTransformFeedbackInterleavedComponents) - error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d", resources.maxTransformFeedbackInterleavedComponents); + error(loc, "1/4 stride is too large:", id.c_str(), "gl_MaxTransformFeedbackInterleavedComponents is %d", + resources.maxTransformFeedbackInterleavedComponents); else if (value >= (int)TQualifier::layoutXfbStrideEnd) error(loc, "stride is too large:", id.c_str(), "internal max is %d", TQualifier::layoutXfbStrideEnd - 1); if (value < (int)TQualifier::layoutXfbStrideEnd) @@ -5643,15 +7080,7 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua return; } if (id == "constant_id") { - requireSpv(loc, "constant_id"); - if (value >= (int)TQualifier::layoutSpecConstantIdEnd) { - error(loc, "specialization-constant id is too large", id.c_str(), ""); - } else { - qualifier.layoutSpecConstantId = value; - qualifier.specConstant = true; - if (! intermediate.addUsedConstantId(value)) - error(loc, "specialization-constant id already used", id.c_str(), ""); - } + setSpecConstantId(loc, qualifier, value); return; } @@ -5746,6 +7175,19 @@ void HlslParseContext::setLayoutQualifier(const TSourceLoc& loc, TQualifier& qua error(loc, "there is no such layout identifier for this stage taking an assigned value", id.c_str(), ""); } +void HlslParseContext::setSpecConstantId(const TSourceLoc& loc, TQualifier& qualifier, int value) +{ + if (value >= (int)TQualifier::layoutSpecConstantIdEnd) { + error(loc, "specialization-constant id is too large", "constant_id", ""); + } else { + qualifier.layoutSpecConstantId = value; + qualifier.specConstant = true; + if (! intermediate.addUsedConstantId(value)) + error(loc, "specialization-constant id already used", "constant_id", ""); + } + return; +} + // Merge any layout qualifier information from src into dst, leaving everything else in dst alone // // "More than one layout qualifier may appear in a single declaration. @@ -5810,6 +7252,7 @@ void HlslParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQuali } } + // // Look up a function name in the symbol table, and make sure it is a function. // @@ -5819,18 +7262,17 @@ void HlslParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQuali // // Return the function symbol if found, otherwise nullptr. // -const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction& call, bool& builtIn, +const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction& call, bool& builtIn, int& thisDepth, TIntermTyped*& args) { - // const TFunction* function = nullptr; - if (symbolTable.isFunctionNameVariable(call.getName())) { error(loc, "can't use function syntax on variable", call.getName().c_str(), ""); return nullptr; } // first, look for an exact match - TSymbol* symbol = symbolTable.find(call.getMangledName(), &builtIn); + bool dummyScope; + TSymbol* symbol = symbolTable.find(call.getMangledName(), &builtIn, &dummyScope, &thisDepth); if (symbol) return symbol->getAsFunction(); @@ -5840,11 +7282,14 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction TVector candidateList; symbolTable.findFunctionNameList(call.getMangledName(), candidateList, builtIn); - // These builtin ops can accept any type, so we bypass the argument selection + // These built-in ops can accept any type, so we bypass the argument selection if (candidateList.size() == 1 && builtIn && (candidateList[0]->getBuiltInOp() == EOpMethodAppend || - candidateList[0]->getBuiltInOp() == EOpMethodRestartStrip)) { - + candidateList[0]->getBuiltInOp() == EOpMethodRestartStrip || + candidateList[0]->getBuiltInOp() == EOpMethodIncrementCounter || + candidateList[0]->getBuiltInOp() == EOpMethodDecrementCounter || + candidateList[0]->getBuiltInOp() == EOpMethodAppend || + candidateList[0]->getBuiltInOp() == EOpMethodConsume)) { return candidateList[0]; } @@ -5924,6 +7369,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction // shapes have to be convertible if ((from.isScalarOrVec1() && to.isScalarOrVec1()) || (from.isScalarOrVec1() && to.isVector()) || + (from.isScalarOrVec1() && to.isMatrix()) || (from.isVector() && to.isVector() && from.getVectorSize() >= to.getVectorSize())) return true; @@ -6014,7 +7460,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction return nullptr; } - // For builtins, we can convert across the arguments. This will happen in several steps: + // For built-ins, we can convert across the arguments. This will happen in several steps: // Step 1: If there's an exact match, use it. // Step 2a: Otherwise, get the operator from the best match and promote arguments: // Step 2b: reconstruct the TFunction based on the new arg types @@ -6189,6 +7635,11 @@ void HlslParseContext::declareStruct(const TSourceLoc& loc, TString& structName, } if (newLists.uniform) { newMember(newUniformMember); + + // inherit default matrix layout (changeable via #pragma pack_matrix), if none given. + if (member->type->isMatrix() && member->type->getQualifier().layoutMatrix == ElmNone) + newUniformMember.type->getQualifier().layoutMatrix = globalUniformDefaults.layoutMatrix; + correctUniform(newUniformMember.type->getQualifier()); newLists.uniform->push_back(newUniformMember); } @@ -6233,11 +7684,27 @@ TSymbol* HlslParseContext::lookupUserType(const TString& typeName, TType& type) // 'parseType' is the type part of the declaration (to the left) // 'arraySizes' is the arrayness tagged on the identifier (to the right) // -TIntermNode* HlslParseContext::declareVariable(const TSourceLoc& loc, const TString& identifier, TType& type, TIntermTyped* initializer) +TIntermNode* HlslParseContext::declareVariable(const TSourceLoc& loc, const TString& identifier, TType& type, + TIntermTyped* initializer) { if (voidErrorCheck(loc, identifier, type.getBasicType())) return nullptr; + // Global consts with initializers that are non-const act like EvqGlobal in HLSL. + // This test is implicitly recursive, because initializers propagate constness + // up the aggregate node tree during creation. E.g, for: + // { { 1, 2 }, { 3, 4 } } + // the initializer list is marked EvqConst at the top node, and remains so here. However: + // { 1, { myvar, 2 }, 3 } + // is not a const intializer, and still becomes EvqGlobal here. + + const bool nonConstInitializer = (initializer != nullptr && initializer->getQualifier().storage != EvqConst); + + if (type.getQualifier().storage == EvqConst && symbolTable.atGlobalLevel() && nonConstInitializer) { + // Force to global + type.getQualifier().storage = EvqGlobal; + } + // make const and initialization consistent fixConstInit(loc, identifier, type, initializer); @@ -6246,7 +7713,7 @@ TIntermNode* HlslParseContext::declareVariable(const TSourceLoc& loc, const TStr inheritGlobalDefaults(type.getQualifier()); - const bool flattenVar = shouldFlattenUniform(type); + const bool flattenVar = shouldFlatten(type, type.getQualifier().storage, true); // correct IO in the type switch (type.getQualifier().storage) { @@ -6274,33 +7741,28 @@ TIntermNode* HlslParseContext::declareVariable(const TSourceLoc& loc, const TStr declareArray(loc, identifier, type, symbol, !flattenVar); } else { // non-array case - if (! symbol) + if (symbol == nullptr) symbol = declareNonArray(loc, identifier, type, !flattenVar); else if (type != symbol->getType()) error(loc, "cannot change the type of", "redeclaration", symbol->getName().c_str()); } - if (flattenVar) - flatten(loc, *symbol->getAsVariable()); + if (symbol == nullptr) + return nullptr; - if (! symbol) + if (flattenVar) + flatten(*symbol->getAsVariable(), symbolTable.atGlobalLevel()); + + if (initializer == nullptr) return nullptr; // Deal with initializer - TIntermNode* initNode = nullptr; - if (symbol && initializer) { - if (flattenVar) - error(loc, "flattened array with initializer list unsupported", identifier.c_str(), ""); - - TVariable* variable = symbol->getAsVariable(); - if (! variable) { - error(loc, "initializer requires a variable, not a member", identifier.c_str(), ""); - return nullptr; - } - initNode = executeInitializer(loc, initializer, variable); + TVariable* variable = symbol->getAsVariable(); + if (variable == nullptr) { + error(loc, "initializer requires a variable, not a member", identifier.c_str(), ""); + return nullptr; } - - return initNode; + return executeInitializer(loc, initializer, variable); } // Pick up global defaults from the provide global defaults into dst. @@ -6330,7 +7792,8 @@ TVariable* HlslParseContext::makeInternalVariable(const char* name, const TType& } // Make a symbol node holding a new internal temporary variable. -TIntermSymbol* HlslParseContext::makeInternalVariableNode(const TSourceLoc& loc, const char* name, const TType& type) const +TIntermSymbol* HlslParseContext::makeInternalVariableNode(const TSourceLoc& loc, const char* name, + const TType& type) const { TVariable* tmpVar = makeInternalVariable(name, type); tmpVar->getWritableType().getQualifier().makeTemporary(); @@ -6344,7 +7807,8 @@ TIntermSymbol* HlslParseContext::makeInternalVariableNode(const TSourceLoc& loc, // // Return the successfully declared variable. // -TVariable* HlslParseContext::declareNonArray(const TSourceLoc& loc, const TString& identifier, const TType& type, bool track) +TVariable* HlslParseContext::declareNonArray(const TSourceLoc& loc, const TString& identifier, const TType& type, + bool track) { // make a new variable TVariable* variable = new TVariable(&identifier, type); @@ -6389,7 +7853,7 @@ TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TInterm skeletalType.getQualifier().makeTemporary(); if (initializer->getAsAggregate() && initializer->getAsAggregate()->getOp() == EOpNull) initializer = convertInitializerList(loc, skeletalType, initializer, nullptr); - if (! initializer) { + if (initializer == nullptr) { // error recovery; don't leave const without constant values if (qualifier == EvqConst) variable->getWritableType().getQualifier().storage = EvqTemporary; @@ -6418,11 +7882,6 @@ TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TInterm variable->getWritableType().getQualifier().storage = EvqTemporary; return nullptr; } - if (qualifier == EvqConst && symbolTable.atGlobalLevel() && initializer->getType().getQualifier().storage != EvqConst) { - error(loc, "global const initializers must be constant", "=", "'%s'", variable->getType().getCompleteString().c_str()); - variable->getWritableType().getQualifier().storage = EvqTemporary; - return nullptr; - } // Const variables require a constant initializer if (qualifier == EvqConst) { @@ -6436,7 +7895,10 @@ TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TInterm // Compile-time tagging of the variable with its constant value... initializer = intermediate.addConversion(EOpAssign, variable->getType(), initializer); - if (! initializer || ! initializer->getAsConstantUnion() || variable->getType() != initializer->getType()) { + if (initializer != nullptr && variable->getType() != initializer->getType()) + initializer = intermediate.addUniShapeConversion(EOpAssign, variable->getType(), initializer); + if (initializer == nullptr || !initializer->getAsConstantUnion() || + variable->getType() != initializer->getType()) { error(loc, "non-matching or non-convertible constant type for const initializer", variable->getType().getStorageQualifierString(), ""); variable->getWritableType().getQualifier().storage = EvqTemporary; @@ -6449,9 +7911,8 @@ TIntermNode* HlslParseContext::executeInitializer(const TSourceLoc& loc, TInterm specializationCheck(loc, initializer->getType(), "initializer"); TIntermSymbol* intermSymbol = intermediate.addSymbol(*variable, loc); TIntermNode* initNode = handleAssign(loc, EOpAssign, intermSymbol, initializer); - if (! initNode) + if (initNode == nullptr) assignError(loc, "=", intermSymbol->getCompleteString(), initializer->getCompleteString()); - return initNode; } @@ -6479,7 +7940,7 @@ TIntermTyped* HlslParseContext::convertInitializerList(const TSourceLoc& loc, co // see if we have bottomed out in the tree within the initializer-list part TIntermAggregate* initList = initializer->getAsAggregate(); - if (! initList || initList->getOp() != EOpNull) { + if (initList == nullptr || initList->getOp() != EOpNull) { // We don't have a list, but if it's a scalar and the 'type' is a // composite, we need to lengthen below to make it useful. // Otherwise, this is an already formed object to initialize with. @@ -6522,13 +7983,22 @@ TIntermTyped* HlslParseContext::convertInitializerList(const TSourceLoc& loc, co // recursively process each element TType elementType(arrayType, 0); // dereferenced type for (int i = 0; i < arrayType.getOuterArraySize(); ++i) { - initList->getSequence()[i] = convertInitializerList(loc, elementType, initList->getSequence()[i]->getAsTyped(), scalarInit); + initList->getSequence()[i] = convertInitializerList(loc, elementType, + initList->getSequence()[i]->getAsTyped(), scalarInit); if (initList->getSequence()[i] == nullptr) return nullptr; } return addConstructor(loc, initList, arrayType); } else if (type.isStruct()) { + // do we have implicit assignments to opaques? + for (size_t i = initList->getSequence().size(); i < type.getStruct()->size(); ++i) { + if ((*type.getStruct())[i].type->containsOpaque()) { + error(loc, "cannot implicitly initialize opaque members", "initializer list", ""); + return nullptr; + } + } + // lengthen list to be long enough lengthenList(loc, initList->getSequence(), static_cast(type.getStruct()->size()), scalarInit); @@ -6537,7 +8007,8 @@ TIntermTyped* HlslParseContext::convertInitializerList(const TSourceLoc& loc, co return nullptr; } for (size_t i = 0; i < type.getStruct()->size(); ++i) { - initList->getSequence()[i] = convertInitializerList(loc, *(*type.getStruct())[i].type, initList->getSequence()[i]->getAsTyped(), scalarInit); + initList->getSequence()[i] = convertInitializerList(loc, *(*type.getStruct())[i].type, + initList->getSequence()[i]->getAsTyped(), scalarInit); if (initList->getSequence()[i] == nullptr) return nullptr; } @@ -6556,7 +8027,8 @@ TIntermTyped* HlslParseContext::convertInitializerList(const TSourceLoc& loc, co } TType vectorType(type, 0); // dereferenced type for (int i = 0; i < type.getMatrixCols(); ++i) { - initList->getSequence()[i] = convertInitializerList(loc, vectorType, initList->getSequence()[i]->getAsTyped(), scalarInit); + initList->getSequence()[i] = convertInitializerList(loc, vectorType, + initList->getSequence()[i]->getAsTyped(), scalarInit); if (initList->getSequence()[i] == nullptr) return nullptr; } @@ -6567,7 +8039,8 @@ TIntermTyped* HlslParseContext::convertInitializerList(const TSourceLoc& loc, co // error check; we're at bottom, so work is finished below if (type.getVectorSize() != (int)initList->getSequence().size()) { - error(loc, "wrong vector size (or rows in a matrix column):", "initializer list", type.getCompleteString().c_str()); + error(loc, "wrong vector size (or rows in a matrix column):", "initializer list", + type.getCompleteString().c_str()); return nullptr; } } else if (type.isScalar()) { @@ -6648,6 +8121,10 @@ TIntermTyped* HlslParseContext::handleConstructor(const TSourceLoc& loc, TInterm // Add a constructor, either from the grammar, or other programmatic reasons. // +// 'node' is what to construct from. +// 'type' is what type to construct. +// +// Returns the constructed object. // Return nullptr if it can't be done. // TIntermTyped* HlslParseContext::addConstructor(const TSourceLoc& loc, TIntermTyped* node, const TType& type) @@ -6672,8 +8149,8 @@ TIntermTyped* HlslParseContext::addConstructor(const TSourceLoc& loc, TIntermTyp elementType.shallowCopy(type); bool singleArg; - if (aggrNode) { - if (aggrNode->getOp() != EOpNull || aggrNode->getSequence().size() == 1) + if (aggrNode != nullptr) { + if (aggrNode->getOp() != EOpNull) singleArg = true; else singleArg = false; @@ -6682,14 +8159,27 @@ TIntermTyped* HlslParseContext::addConstructor(const TSourceLoc& loc, TIntermTyp TIntermTyped *newNode; if (singleArg) { + // Handle array -> array conversion + // Constructing an array of one type from an array of another type is allowed, + // assuming there are enough components available (semantic-checked earlier). + if (type.isArray() && node->isArray()) + newNode = convertArray(node, type); + // If structure constructor or array constructor is being called - // for only one parameter inside the structure, we need to call constructAggregate function once. - if (type.isArray()) + // for only one parameter inside the aggregate, we need to call constructAggregate function once. + else if (type.isArray()) newNode = constructAggregate(node, elementType, 1, node->getLoc()); else if (op == EOpConstructStruct) newNode = constructAggregate(node, *(*memberTypes).type, 1, node->getLoc()); - else + else { + // shape conversion for matrix constructor from scalar. HLSL semantics are: scalar + // is replicated into every element of the matrix (not just the diagnonal), so + // that is handled specially here. + if (type.isMatrix() && node->getType().isScalarOrVec1()) + node = intermediate.addShapeConversion(type, node); + newNode = constructBuiltIn(type, op, node, node->getLoc(), false); + } if (newNode && (type.isArray() || op == EOpConstructStruct)) newNode = intermediate.setAggregateOperator(newNode, EOpConstructStruct, type, loc); @@ -6700,7 +8190,7 @@ TIntermTyped* HlslParseContext::addConstructor(const TSourceLoc& loc, TIntermTyp // // Handle list of arguments. // - TIntermSequence &sequenceVector = aggrNode->getSequence(); // Stores the information about the parameter to the constructor + TIntermSequence& sequenceVector = aggrNode->getSequence(); // Stores the information about the parameter to the constructor // if the structure constructor contains more than one parameter, then construct // each parameter @@ -6737,7 +8227,8 @@ TIntermTyped* HlslParseContext::addConstructor(const TSourceLoc& loc, TIntermTyp // // Returns nullptr for an error or the constructed node. // -TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op, TIntermTyped* node, const TSourceLoc& loc, bool subset) +TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op, TIntermTyped* node, + const TSourceLoc& loc, bool subset) { TIntermTyped* newNode; TOperator basicOp; @@ -6781,6 +8272,15 @@ TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op case EOpConstructIVec2: case EOpConstructIVec3: case EOpConstructIVec4: + case EOpConstructIMat2x2: + case EOpConstructIMat2x3: + case EOpConstructIMat2x4: + case EOpConstructIMat3x2: + case EOpConstructIMat3x3: + case EOpConstructIMat3x4: + case EOpConstructIMat4x2: + case EOpConstructIMat4x3: + case EOpConstructIMat4x4: case EOpConstructInt: basicOp = EOpConstructInt; break; @@ -6788,6 +8288,15 @@ TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op case EOpConstructUVec2: case EOpConstructUVec3: case EOpConstructUVec4: + case EOpConstructUMat2x2: + case EOpConstructUMat2x3: + case EOpConstructUMat2x4: + case EOpConstructUMat3x2: + case EOpConstructUMat3x3: + case EOpConstructUMat3x4: + case EOpConstructUMat4x2: + case EOpConstructUMat4x3: + case EOpConstructUMat4x4: case EOpConstructUint: basicOp = EOpConstructUint; break; @@ -6795,6 +8304,15 @@ TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op case EOpConstructBVec2: case EOpConstructBVec3: case EOpConstructBVec4: + case EOpConstructBMat2x2: + case EOpConstructBMat2x3: + case EOpConstructBMat2x4: + case EOpConstructBMat3x2: + case EOpConstructBMat3x3: + case EOpConstructBMat3x4: + case EOpConstructBMat4x2: + case EOpConstructBMat4x3: + case EOpConstructBMat4x4: case EOpConstructBool: basicOp = EOpConstructBool; break; @@ -6822,15 +8340,88 @@ TIntermTyped* HlslParseContext::constructBuiltIn(const TType& type, TOperator op return intermediate.setAggregateOperator(newNode, op, type, loc); } +// Convert the array in node to the requested type, which is also an array. +// Returns nullptr on failure, otherwise returns aggregate holding the list of +// elements needed to construct the array. +TIntermTyped* HlslParseContext::convertArray(TIntermTyped* node, const TType& type) +{ + assert(node->isArray() && type.isArray()); + if (node->getType().computeNumComponents() < type.computeNumComponents()) + return nullptr; + + // TODO: write an argument replicator, for the case the argument should not be + // executed multiple times, yet multiple copies are needed. + + TIntermTyped* constructee = node->getAsTyped(); + // track where we are in consuming the argument + int constructeeElement = 0; + int constructeeComponent = 0; + + // bump up to the next component to consume + const auto getNextComponent = [&]() { + TIntermTyped* component; + component = handleBracketDereference(node->getLoc(), constructee, + intermediate.addConstantUnion(constructeeElement, node->getLoc())); + if (component->isVector()) + component = handleBracketDereference(node->getLoc(), component, + intermediate.addConstantUnion(constructeeComponent, node->getLoc())); + // bump component pointer up + ++constructeeComponent; + if (constructeeComponent == constructee->getVectorSize()) { + constructeeComponent = 0; + ++constructeeElement; + } + return component; + }; + + // make one subnode per constructed array element + TIntermAggregate* constructor = nullptr; + TType derefType(type, 0); + TType speculativeComponentType(derefType, 0); + TType* componentType = derefType.isVector() ? &speculativeComponentType : &derefType; + TOperator componentOp = intermediate.mapTypeToConstructorOp(*componentType); + TType crossType(node->getBasicType(), EvqTemporary, type.getVectorSize()); + for (int e = 0; e < type.getOuterArraySize(); ++e) { + // construct an element + TIntermTyped* elementArg; + if (type.getVectorSize() == constructee->getVectorSize()) { + // same element shape + elementArg = handleBracketDereference(node->getLoc(), constructee, + intermediate.addConstantUnion(e, node->getLoc())); + } else { + // mismatched element shapes + if (type.getVectorSize() == 1) + elementArg = getNextComponent(); + else { + // make a vector + TIntermAggregate* elementConstructee = nullptr; + for (int c = 0; c < type.getVectorSize(); ++c) + elementConstructee = intermediate.growAggregate(elementConstructee, getNextComponent()); + elementArg = addConstructor(node->getLoc(), elementConstructee, crossType); + } + } + // convert basic types + elementArg = intermediate.addConversion(componentOp, derefType, elementArg); + if (elementArg == nullptr) + return nullptr; + // combine with top-level constructor + constructor = intermediate.growAggregate(constructor, elementArg); + } + + return constructor; +} + // This function tests for the type of the parameters to the structure or array constructor. Raises // an error message if the expected type does not match the parameter passed to the constructor. // // Returns nullptr for an error or the input node itself if the expected and the given parameter types match. // -TIntermTyped* HlslParseContext::constructAggregate(TIntermNode* node, const TType& type, int paramCount, const TSourceLoc& loc) +TIntermTyped* HlslParseContext::constructAggregate(TIntermNode* node, const TType& type, int paramCount, + const TSourceLoc& loc) { + // Handle cases that map more 1:1 between constructor arguments and constructed. TIntermTyped* converted = intermediate.addConversion(EOpConstructStruct, type, node->getAsTyped()); - if (! converted || converted->getType() != type) { + if (converted == nullptr || converted->getType() != type) { error(loc, "", "constructor", "cannot convert parameter %d from '%s' to '%s'", paramCount, node->getAsTyped()->getType().getCompleteString().c_str(), type.getCompleteString().c_str()); @@ -6880,17 +8471,17 @@ void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TS case EvqBuffer: correctUniform(type.getQualifier()); if (it != ioTypeMap.end() && it->second.uniform) - type.setStruct(it->second.uniform); + memberType.setStruct(it->second.uniform); break; case EvqVaryingIn: correctInput(type.getQualifier()); if (it != ioTypeMap.end() && it->second.input) - type.setStruct(it->second.input); + memberType.setStruct(it->second.input); break; case EvqVaryingOut: correctOutput(type.getQualifier()); if (it != ioTypeMap.end() && it->second.output) - type.setStruct(it->second.output); + memberType.setStruct(it->second.output); break; default: break; @@ -6898,13 +8489,6 @@ void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TS } } - // This might be a redeclaration of a built-in block. If so, redeclareBuiltinBlock() will - // do all the rest. - // if (! symbolTable.atBuiltInLevel() && builtInName(*blockName)) { - // redeclareBuiltinBlock(loc, typeList, *blockName, instanceName, arraySizes); - // return; - //} - // Make default block qualification, and adjust the member qualifications TQualifier defaultQualification; @@ -6983,21 +8567,23 @@ void HlslParseContext::declareBlock(const TSourceLoc& loc, TType& type, const TS // Add the variable, as anonymous or named instanceName. // Make an anonymous variable if no name was provided. - if (! instanceName) + if (instanceName == nullptr) instanceName = NewPoolTString(""); TVariable& variable = *new TVariable(instanceName, blockType); if (! symbolTable.insert(variable)) { if (*instanceName == "") - error(loc, "nameless block contains a member that already has a name at global scope", "" /* blockName->c_str() */, ""); + error(loc, "nameless block contains a member that already has a name at global scope", + "" /* blockName->c_str() */, ""); else error(loc, "block instance name redefinition", variable.getName().c_str(), ""); return; } - // Save it in the AST for linker use. - trackLinkage(variable); + // Save it in the AST for linker use. + if (symbolTable.atGlobalLevel()) + trackLinkage(variable); } // @@ -7037,7 +8623,8 @@ void HlslParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qual memberQualifier.layoutLocation = nextLocation; memberQualifier.layoutComponent = 0; } - nextLocation = memberQualifier.layoutLocation + intermediate.computeTypeLocationSize(*typeList[member].type); + nextLocation = memberQualifier.layoutLocation + + intermediate.computeTypeLocationSize(*typeList[member].type); } } } @@ -7100,8 +8687,9 @@ void HlslParseContext::fixBlockUniformOffsets(const TQualifier& qualifier, TType int dummyStride; int memberAlignment = intermediate.getBaseAlignment(*typeList[member].type, memberSize, dummyStride, qualifier.layoutPacking == ElpStd140, - subMatrixLayout != ElmNone ? subMatrixLayout == ElmRowMajor - : qualifier.layoutMatrix == ElmRowMajor); + subMatrixLayout != ElmNone + ? subMatrixLayout == ElmRowMajor + : qualifier.layoutMatrix == ElmRowMajor); if (memberQualifier.hasOffset()) { // "The specified offset must be a multiple // of the base alignment of the type of the block member it qualifies, or a compile-time error results." @@ -7133,7 +8721,7 @@ void HlslParseContext::fixBlockUniformOffsets(const TQualifier& qualifier, TType void HlslParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qualifier, const TString& identifier) { TSymbol* symbol = symbolTable.find(identifier); - if (! symbol) { + if (symbol == nullptr) { error(loc, "identifier not previously declared", identifier.c_str(), ""); return; } @@ -7209,6 +8797,11 @@ bool HlslParseContext::handleInputGeometry(const TSourceLoc& loc, const TLayoutG // bool HlslParseContext::handleOutputGeometry(const TSourceLoc& loc, const TLayoutGeometry& geometry) { + // If this is not a geometry shader, ignore. It might be a mixed shader including several stages. + // Since that's an OK situation, return true for success. + if (language != EShLangGeometry) + return true; + switch (geometry) { case ElgPoints: case ElgLineStrip: @@ -7226,6 +8819,78 @@ bool HlslParseContext::handleOutputGeometry(const TSourceLoc& loc, const TLayout return true; } +// +// Selection attributes +// +void HlslParseContext::handleSelectionAttributes(const TSourceLoc& loc, TIntermSelection* selection, + const TAttributes& attributes) +{ + if (selection == nullptr) + return; + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + switch (it->name) { + case EatFlatten: + selection->setFlatten(); + break; + case EatBranch: + selection->setDontFlatten(); + break; + default: + warn(loc, "attribute does not apply to a selection", "", ""); + break; + } + } +} + +// +// Switch attributes +// +void HlslParseContext::handleSwitchAttributes(const TSourceLoc& loc, TIntermSwitch* selection, + const TAttributes& attributes) +{ + if (selection == nullptr) + return; + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + switch (it->name) { + case EatFlatten: + selection->setFlatten(); + break; + case EatBranch: + selection->setDontFlatten(); + break; + default: + warn(loc, "attribute does not apply to a switch", "", ""); + break; + } + } +} + +// +// Loop attributes +// +void HlslParseContext::handleLoopAttributes(const TSourceLoc& loc, TIntermLoop* loop, + const TAttributes& attributes) +{ + if (loop == nullptr) + return; + + for (auto it = attributes.begin(); it != attributes.end(); ++it) { + switch (it->name) { + case EatUnroll: + loop->setUnroll(); + break; + case EatLoop: + loop->setDontUnroll(); + break; + default: + warn(loc, "attribute does not apply to a loop", "", ""); + break; + } + } +} + // // Updating default qualifier for the case of a declaration with just a qualifier, // no type, block, or identifier. @@ -7252,12 +8917,14 @@ void HlslParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, case ElgIsolines: break; default: - error(loc, "cannot apply to input", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), ""); + error(loc, "cannot apply to input", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), + ""); } } else if (publicType.qualifier.storage == EvqVaryingOut) { handleOutputGeometry(loc, publicType.shaderQualifiers.geometry); } else - error(loc, "cannot apply to:", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), GetStorageQualifierString(publicType.qualifier.storage)); + error(loc, "cannot apply to:", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), + GetStorageQualifierString(publicType.qualifier.storage)); } if (publicType.shaderQualifiers.spacing != EvsNone) intermediate.setVertexSpacing(publicType.shaderQualifiers.spacing); @@ -7315,7 +8982,8 @@ void HlslParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, globalOutputDefaults.layoutXfbBuffer = qualifier.layoutXfbBuffer; if (globalOutputDefaults.hasXfbBuffer() && qualifier.hasXfbStride()) { if (! intermediate.setXfbBufferStride(globalOutputDefaults.layoutXfbBuffer, qualifier.layoutXfbStride)) - error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer); + error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", + qualifier.layoutXfbBuffer); } break; default: @@ -7364,7 +9032,8 @@ void HlslParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TIn // Turn the top-level node sequence built up of wrapupSwitchSubsequence // into a switch node. // -TIntermNode* HlslParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* expression, TIntermAggregate* lastStatements) +TIntermNode* HlslParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* expression, + TIntermAggregate* lastStatements, const TAttributes& attributes) { wrapupSwitchSubsequence(lastStatements, nullptr); @@ -7391,17 +9060,30 @@ TIntermNode* HlslParseContext::addSwitch(const TSourceLoc& loc, TIntermTyped* ex TIntermSwitch* switchNode = new TIntermSwitch(expression, body); switchNode->setLoc(loc); + handleSwitchAttributes(loc, switchNode, attributes); return switchNode; } // Make a new symbol-table level that is made out of the members of a structure. // This should be done as an anonymous struct (name is "") so that the symbol table -// finds the members with on explicit reference to a 'this' variable. -void HlslParseContext::pushThisScope(const TType& thisStruct) +// finds the members with no explicit reference to a 'this' variable. +void HlslParseContext::pushThisScope(const TType& thisStruct, const TVector& functionDeclarators) { + // member variables TVariable& thisVariable = *new TVariable(NewPoolTString(""), thisStruct); symbolTable.pushThis(thisVariable); + + // member functions + for (auto it = functionDeclarators.begin(); it != functionDeclarators.end(); ++it) { + // member should have a prefix matching currentTypePrefix.back() + // but, symbol lookup within the class scope will just use the + // unprefixed name. Hence, there are two: one fully prefixed and + // one with no prefix. + TFunction& member = *it->function->clone(); + member.removePrefix(currentTypePrefix.back()); + symbolTable.insert(member); + } } // Track levels of class/struct/namespace nesting with a prefix string using @@ -7416,11 +9098,10 @@ void HlslParseContext::pushNamespace(const TString& typeName) { // make new type prefix TString newPrefix; - if (currentTypePrefix.size() > 0) { + if (currentTypePrefix.size() > 0) newPrefix = currentTypePrefix.back(); - newPrefix.append(scopeMangler); - } newPrefix.append(typeName); + newPrefix.append(scopeMangler); currentTypePrefix.push_back(newPrefix); } @@ -7432,13 +9113,12 @@ void HlslParseContext::popNamespace() // Use the class/struct nesting string to create a global name for // a member of a class/struct. -void HlslParseContext::getFullNamespaceName(const TString*& name) const +void HlslParseContext::getFullNamespaceName(TString*& name) const { if (currentTypePrefix.size() == 0) return; TString* fullName = NewPoolTString(currentTypePrefix.back().c_str()); - fullName->append(scopeMangler); fullName->append(*name); name = fullName; } @@ -7449,15 +9129,6 @@ void HlslParseContext::addScopeMangler(TString& name) name.append(scopeMangler); } -// Potentially rename shader entry point function -void HlslParseContext::renameShaderFunction(const TString*& name) const -{ - // Replace the entry point name given in the shader with the real entry point name, - // if there is a substitution. - if (name != nullptr && *name == sourceEntryPointName) - name = NewPoolTString(intermediate.getEntryPointName().c_str()); -} - // Return true if this has uniform-interface like decorations. bool HlslParseContext::hasUniform(const TQualifier& qualifier) const { @@ -7511,7 +9182,7 @@ bool HlslParseContext::isInputBuiltIn(const TQualifier& qualifier) const case EbvVertexIndex: return language == EShLangVertex; case EbvPrimitiveId: - return language == EShLangGeometry || language == EShLangFragment; + return language == EShLangGeometry || language == EShLangFragment || language == EShLangTessControl; case EbvTessLevelInner: case EbvTessLevelOuter: return language == EShLangTessEvaluation; @@ -7557,9 +9228,9 @@ bool HlslParseContext::isOutputBuiltIn(const TQualifier& qualifier) const return language == EShLangFragment; case EbvLayer: case EbvViewportIndex: - return language == EShLangGeometry; + return language == EShLangGeometry || language == EShLangVertex; case EbvPrimitiveId: - return language == EShLangGeometry || language == EShLangTessControl || language == EShLangTessEvaluation; + return language == EShLangGeometry; case EbvTessLevelInner: case EbvTessLevelOuter: return language == EShLangTessControl; @@ -7642,6 +9313,9 @@ void HlslParseContext::correctOutput(TQualifier& qualifier) // Make the IO decorations etc. be appropriate only for uniform type interfaces. void HlslParseContext::correctUniform(TQualifier& qualifier) { + if (qualifier.declaredBuiltIn == EbvNone) + qualifier.declaredBuiltIn = qualifier.builtIn; + qualifier.builtIn = EbvNone; qualifier.clearInterstage(); qualifier.clearInterstageLayout(); @@ -7655,29 +9329,128 @@ void HlslParseContext::clearUniformInputOutput(TQualifier& qualifier) } -// Return a symbol for the linkage variable of the given TBuiltInVariable type -TIntermSymbol* HlslParseContext::findLinkageSymbol(TBuiltInVariable biType) const +// Set texture return type. Returns success (not all types are valid). +bool HlslParseContext::setTextureReturnType(TSampler& sampler, const TType& retType, const TSourceLoc& loc) { - const auto it = builtInLinkageSymbols.find(biType); - if (it == builtInLinkageSymbols.end()) // if it wasn't declared by the user, return nullptr + // Seed the output with an invalid index. We will set it to a valid one if we can. + sampler.structReturnIndex = TSampler::noReturnStruct; + + // Arrays aren't supported. + if (retType.isArray()) { + error(loc, "Arrays not supported in texture template types", "", ""); + return false; + } + + // If return type is a vector, remember the vector size in the sampler, and return. + if (retType.isVector() || retType.isScalar()) { + sampler.vectorSize = retType.getVectorSize(); + return true; + } + + // If it wasn't a vector, it must be a struct meeting certain requirements. The requirements + // are checked below: just check for struct-ness here. + if (!retType.isStruct()) { + error(loc, "Invalid texture template type", "", ""); + return false; + } + + // TODO: Subpass doesn't handle struct returns, due to some oddities with fn overloading. + if (sampler.isSubpass()) { + error(loc, "Unimplemented: structure template type in subpass input", "", ""); + return false; + } + + TTypeList* members = retType.getWritableStruct(); + + // Check for too many or not enough structure members. + if (members->size() > 4 || members->size() == 0) { + error(loc, "Invalid member count in texture template structure", "", ""); + return false; + } + + // Error checking: We must have <= 4 total components, all of the same basic type. + unsigned totalComponents = 0; + for (unsigned m = 0; m < members->size(); ++m) { + // Check for bad member types + if (!(*members)[m].type->isScalar() && !(*members)[m].type->isVector()) { + error(loc, "Invalid texture template struct member type", "", ""); + return false; + } + + const unsigned memberVectorSize = (*members)[m].type->getVectorSize(); + totalComponents += memberVectorSize; + + // too many total member components + if (totalComponents > 4) { + error(loc, "Too many components in texture template structure type", "", ""); + return false; + } + + // All members must be of a common basic type + if ((*members)[m].type->getBasicType() != (*members)[0].type->getBasicType()) { + error(loc, "Texture template structure members must same basic type", "", ""); + return false; + } + } + + // If the structure in the return type already exists in the table, we'll use it. Otherwise, we'll make + // a new entry. This is a linear search, but it hardly ever happens, and the list cannot be very large. + for (unsigned int idx = 0; idx < textureReturnStruct.size(); ++idx) { + if (textureReturnStruct[idx] == members) { + sampler.structReturnIndex = idx; + return true; + } + } + + // It wasn't found as an existing entry. See if we have room for a new one. + if (textureReturnStruct.size() >= TSampler::structReturnSlots) { + error(loc, "Texture template struct return slots exceeded", "", ""); + return false; + } + + // Insert it in the vector that tracks struct return types. + sampler.structReturnIndex = unsigned(textureReturnStruct.size()); + textureReturnStruct.push_back(members); + + // Success! + return true; +} + +// Return the sampler return type in retType. +void HlslParseContext::getTextureReturnType(const TSampler& sampler, TType& retType) const +{ + if (sampler.hasReturnStruct()) { + assert(textureReturnStruct.size() >= sampler.structReturnIndex); + + // We land here if the texture return is a structure. + TTypeList* blockStruct = textureReturnStruct[sampler.structReturnIndex]; + + const TType resultType(blockStruct, ""); + retType.shallowCopy(resultType); + } else { + // We land here if the texture return is a vector or scalar. + const TType resultType(sampler.type, EvqTemporary, sampler.getVectorSize()); + retType.shallowCopy(resultType); + } +} + + +// Return a symbol for the tessellation linkage variable of the given TBuiltInVariable type +TIntermSymbol* HlslParseContext::findTessLinkageSymbol(TBuiltInVariable biType) const +{ + const auto it = builtInTessLinkageSymbols.find(biType); + if (it == builtInTessLinkageSymbols.end()) // if it wasn't declared by the user, return nullptr return nullptr; return intermediate.addSymbol(*it->second->getAsVariable()); } -// Add patch constant function invocation -void HlslParseContext::addPatchConstantInvocation() +// Find the patch constant function (issues error, returns nullptr if not found) +const TFunction* HlslParseContext::findPatchConstantFunction(const TSourceLoc& loc) { - TSourceLoc loc; - loc.init(); - - // If there's no patch constant function, or we're not a HS, do nothing. - if (patchConstantFunctionName.empty() || language != EShLangTessControl) - return; - if (symbolTable.isFunctionNameVariable(patchConstantFunctionName)) { error(loc, "can't use variable in patch constant function", patchConstantFunctionName.c_str(), ""); - return; + return nullptr; } const TString mangledName = patchConstantFunctionName + "("; @@ -7691,7 +9464,7 @@ void HlslParseContext::addPatchConstantInvocation() // allow any disambiguation of overloads. if (candidateList.empty()) { error(loc, "patch constant function not found", patchConstantFunctionName.c_str(), ""); - return; + return nullptr; } // Based on directed experiments, it appears that if there are overloaded patchconstantfunctions, @@ -7699,10 +9472,23 @@ void HlslParseContext::addPatchConstantInvocation() // out if there is more than one candidate. if (candidateList.size() > 1) { error(loc, "ambiguous patch constant function", patchConstantFunctionName.c_str(), ""); - return; + return nullptr; } - // Look for builtin variables in a function's parameter list. + return candidateList[0]; +} + +// Finalization step: Add patch constant function invocation +void HlslParseContext::addPatchConstantInvocation() +{ + TSourceLoc loc; + loc.init(); + + // If there's no patch constant function, or we're not a HS, do nothing. + if (patchConstantFunctionName.empty() || language != EShLangTessControl) + return; + + // Look for built-in variables in a function's parameter list. const auto findBuiltIns = [&](const TFunction& function, std::set& builtIns) { for (int p=0; pgetQualifier().storage; @@ -7710,15 +9496,14 @@ void HlslParseContext::addPatchConstantInvocation() if (storage == EvqConstReadOnly) // treated identically to input storage = EvqIn; - if (function[p].declaredBuiltIn != EbvNone) - builtIns.insert(HlslParseContext::tInterstageIoData(function[p].declaredBuiltIn, storage)); + if (function[p].getDeclaredBuiltIn() != EbvNone) + builtIns.insert(HlslParseContext::tInterstageIoData(function[p].getDeclaredBuiltIn(), storage)); else builtIns.insert(HlslParseContext::tInterstageIoData(function[p].type->getQualifier().builtIn, storage)); } }; - - // If we synthesize a builtin interface variable, we must add it to the linkage. + // If we synthesize a built-in interface variable, we must add it to the linkage. const auto addToLinkage = [&](const TType& type, const TString* name, TIntermSymbol** symbolNode) { if (name == nullptr) { error(loc, "unable to locate patch function parameter name", "", ""); @@ -7739,9 +9524,9 @@ void HlslParseContext::addPatchConstantInvocation() } }; - const auto isOutputPatch = [this](TFunction& patchConstantFunction, int param) { + const auto isOutputPatch = [](TFunction& patchConstantFunction, int param) { const TType& type = *patchConstantFunction[param].type; - const TBuiltInVariable biType = patchConstantFunction[param].declaredBuiltIn; + const TBuiltInVariable biType = patchConstantFunction[param].getDeclaredBuiltIn(); return type.isArray() && !type.isRuntimeSizedArray() && biType == EbvOutputPatch; }; @@ -7749,11 +9534,11 @@ void HlslParseContext::addPatchConstantInvocation() // We will perform these steps. Each is in a scoped block for separation: they could // become separate functions to make addPatchConstantInvocation shorter. // - // 1. Union the interfaces, and create builtins for anything present in the PCF and - // declared as a builtin variable that isn't present in the entry point's signature. + // 1. Union the interfaces, and create built-ins for anything present in the PCF and + // declared as a built-in variable that isn't present in the entry point's signature. // - // 2. Synthesizes a call to the patchconstfunction using builtin variables from either main, - // or the ones we created. Matching is based on builtin type. We may use synthesized + // 2. Synthesizes a call to the patchconstfunction using built-in variables from either main, + // or the ones we created. Matching is based on built-in type. We may use synthesized // variables from (1) above. // // 2B: Synthesize per control point invocations of wrapped entry point if the PCF requires them. @@ -7767,9 +9552,15 @@ void HlslParseContext::addPatchConstantInvocation() // // 5/5B. Call the PCF inside an if test for (invocation id == 0). - TFunction& patchConstantFunction = const_cast(*candidateList[0]); + TFunction* patchConstantFunctionPtr = const_cast(findPatchConstantFunction(loc)); + + if (patchConstantFunctionPtr == nullptr) + return; + + TFunction& patchConstantFunction = *patchConstantFunctionPtr; + const int pcfParamCount = patchConstantFunction.getParamCount(); - TIntermSymbol* invocationIdSym = findLinkageSymbol(EbvInvocationId); + TIntermSymbol* invocationIdSym = findTessLinkageSymbol(EbvInvocationId); TIntermSequence& epBodySeq = entryPointFunctionBody->getAsAggregate()->getSequence(); int outPatchParam = -1; // -1 means there isn't one. @@ -7777,8 +9568,8 @@ void HlslParseContext::addPatchConstantInvocation() // ================ Step 1A: Union Interfaces ================ // Our patch constant function. { - std::set pcfBuiltIns; // patch constant function builtins - std::set epfBuiltIns; // entry point function builtins + std::set pcfBuiltIns; // patch constant function built-ins + std::set epfBuiltIns; // entry point function built-ins assert(entryPointFunction); assert(entryPointFunctionBody); @@ -7786,7 +9577,7 @@ void HlslParseContext::addPatchConstantInvocation() findBuiltIns(patchConstantFunction, pcfBuiltIns); findBuiltIns(*entryPointFunction, epfBuiltIns); - // Find the set of builtins in the PCF that are not present in the entry point. + // Find the set of built-ins in the PCF that are not present in the entry point. std::set notInEntryPoint; notInEntryPoint = pcfBuiltIns; @@ -7797,7 +9588,7 @@ void HlslParseContext::addPatchConstantInvocation() // Now we'll add those to the entry and to the linkage. for (int p=0; pgetQualifier().storage; // Track whether there is an output patch param @@ -7816,10 +9607,10 @@ void HlslParseContext::addPatchConstantInvocation() if (storage == EvqConstReadOnly) // treated identically to input storage = EvqIn; - // Presently, the only non-builtin we support is InputPatch, which is treated as - // a pseudo-builtin. + // Presently, the only non-built-in we support is InputPatch, which is treated as + // a pseudo-built-in. if (biType == EbvInputPatch) { - builtInLinkageSymbols[biType] = inputPatch; + builtInTessLinkageSymbols[biType] = inputPatch; } else if (biType == EbvOutputPatch) { // Nothing... } else { @@ -7848,10 +9639,9 @@ void HlslParseContext::addPatchConstantInvocation() // ================ Step 1B: Argument synthesis ================ // Create pcfArguments for synthesis of patchconstantfunction invocation - // TODO: handle struct or array inputs { for (int p=0; psecond.output); - // Substitute the top level type's builtin type + // Substitute the top level type's built-in type if (patchConstantFunction.getDeclaredBuiltInType() != EbvNone) outType.getQualifier().builtIn = patchConstantFunction.getDeclaredBuiltInType(); @@ -7992,10 +9787,10 @@ void HlslParseContext::addPatchConstantInvocation() TVariable* pcfOutput = makeInternalVariable("@patchConstantOutput", outType); pcfOutput->getWritableType().getQualifier().storage = EvqVaryingOut; - if (pcfOutput->getType().containsBuiltInInterstageIO(language)) + if (pcfOutput->getType().containsBuiltIn()) split(*pcfOutput); - assignLocations(*pcfOutput); + assignToInterface(*pcfOutput); TIntermSymbol* pcfOutputSym = intermediate.addSymbol(*pcfOutput, loc); @@ -8006,7 +9801,8 @@ void HlslParseContext::addPatchConstantInvocation() TIntermSymbol* pcfResultVar = intermediate.addSymbol(*pcfCallResult, loc); TIntermNode* pcfResultAssign = handleAssign(loc, EOpAssign, pcfResultVar, pcfCall); - TIntermNode* pcfResultToOut = handleAssign(loc, EOpAssign, pcfOutputSym, intermediate.addSymbol(*pcfCallResult, loc)); + TIntermNode* pcfResultToOut = handleAssign(loc, EOpAssign, pcfOutputSym, + intermediate.addSymbol(*pcfCallResult, loc)); pcfCallSequence = intermediate.growAggregate(pcfCallSequence, pcfResultAssign); pcfCallSequence = intermediate.growAggregate(pcfCallSequence, pcfResultToOut); @@ -8034,11 +9830,56 @@ void HlslParseContext::addPatchConstantInvocation() epBodySeq.insert(epBodySeq.end(), invocationIdTest); } +// Finalization step: remove unused buffer blocks from linkage (we don't know until the +// shader is entirely compiled) +void HlslParseContext::removeUnusedStructBufferCounters() +{ + const auto endIt = std::remove_if(linkageSymbols.begin(), linkageSymbols.end(), + [this](const TSymbol* sym) { + const auto sbcIt = structBufferCounter.find(sym->getName()); + return sbcIt != structBufferCounter.end() && !sbcIt->second; + }); + + linkageSymbols.erase(endIt, linkageSymbols.end()); +} + +// Finalization step: patch texture shadow modes to match samplers they were combined with +void HlslParseContext::fixTextureShadowModes() +{ + for (auto symbol = linkageSymbols.begin(); symbol != linkageSymbols.end(); ++symbol) { + TSampler& sampler = (*symbol)->getWritableType().getSampler(); + + if (sampler.isTexture()) { + const auto shadowMode = textureShadowVariant.find((*symbol)->getUniqueId()); + if (shadowMode != textureShadowVariant.end()) { + + if (shadowMode->second->overloaded()) + // Texture needs legalization if it's been seen with both shadow and non-shadow modes. + intermediate.setNeedsLegalization(); + + sampler.shadow = shadowMode->second->isShadowId((*symbol)->getUniqueId()); + } + } + } +} + // post-processing void HlslParseContext::finish() { + // Error check: There was a dangling .mips operator. These are not nested constructs in the grammar, so + // cannot be detected there. This is not strictly needed in a non-validating parser; it's just helpful. + if (! mipsOperatorMipArg.empty()) { + error(mipsOperatorMipArg.back().loc, "unterminated mips operator:", "", ""); + } + + removeUnusedStructBufferCounters(); addPatchConstantInvocation(); - addInterstageIoToLinkage(); + fixTextureShadowModes(); + + // Communicate out (esp. for command line) that we formed AST that will make + // illegal AST SPIR-V and it needs transforms to legalize it. + if (intermediate.needsLegalization()) + infoSink.info << "WARNING: AST will form illegal SPIR-V; need to transform to legalize"; TParseContextBase::finish(); } diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.h b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.h index 14c9809..d85bdfa 100755 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.h +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseHelper.h @@ -38,10 +38,13 @@ #include "../glslang/MachineIndependent/parseVersions.h" #include "../glslang/MachineIndependent/ParseHelper.h" +#include "../glslang/MachineIndependent/attribute.h" + +#include namespace glslang { -class TAttributeMap; // forward declare +class TFunctionDeclarator; class HlslParseContext : public TParseContextBase { public: @@ -70,17 +73,17 @@ public: TIntermTyped* handleVariable(const TSourceLoc&, const TString* string); TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); TIntermTyped* handleBracketOperator(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); - void checkIndex(const TSourceLoc&, const TType&, int& index); TIntermTyped* handleBinaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right); TIntermTyped* handleUnaryMath(const TSourceLoc&, const char* str, TOperator op, TIntermTyped* childNode); TIntermTyped* handleDotDereference(const TSourceLoc&, TIntermTyped* base, const TString& field); bool isBuiltInMethod(const TSourceLoc&, TIntermTyped* base, const TString& field); - void assignLocations(TVariable& variable); + void assignToInterface(TVariable& variable); void handleFunctionDeclarator(const TSourceLoc&, TFunction& function, bool prototype); - TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&, const TAttributeMap&, TIntermNode*& entryPointTree); - TIntermNode* transformEntryPoint(const TSourceLoc&, TFunction&, const TAttributeMap&); - void handleEntryPointAttributes(const TSourceLoc&, const TAttributeMap&); + TIntermAggregate* handleFunctionDefinition(const TSourceLoc&, TFunction&, const TAttributes&, TIntermNode*& entryPointTree); + TIntermNode* transformEntryPoint(const TSourceLoc&, TFunction&, const TAttributes&); + void handleEntryPointAttributes(const TSourceLoc&, const TAttributes&); + void transferTypeAttributes(const TSourceLoc&, const TAttributes&, TType&, bool allowEntry = false); void handleFunctionBody(const TSourceLoc&, TFunction&, TIntermNode* functionBody, TIntermNode*& node); void remapEntryPointIO(TFunction& function, TVariable*& returnValue, TVector& inputs, TVector& outputs); void remapNonEntryPointIO(TFunction& function); @@ -89,11 +92,15 @@ public: TIntermTyped* handleAssign(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right); TIntermTyped* handleAssignToMatrixSwizzle(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right); TIntermTyped* handleFunctionCall(const TSourceLoc&, TFunction*, TIntermTyped*); + TIntermAggregate* assignClipCullDistance(const TSourceLoc&, TOperator, int semanticId, TIntermTyped* left, TIntermTyped* right); + TIntermTyped* assignPosition(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right); void decomposeIntrinsic(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); void decomposeSampleMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); void decomposeStructBufferMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); void decomposeGeometryMethods(const TSourceLoc&, TIntermTyped*& node, TIntermNode* arguments); + void pushFrontArguments(TIntermTyped* front, TIntermTyped*& arguments); void addInputArgumentConversions(const TFunction&, TIntermTyped*&); + void expandArguments(const TSourceLoc&, const TFunction&, TIntermTyped*&); TIntermTyped* addOutputArgumentConversions(const TFunction&, TIntermOperator&); void builtInOpCheck(const TSourceLoc&, const TFunction&, TIntermOperator&); TFunction* makeConstructorCall(const TSourceLoc&, const TType&); @@ -102,7 +109,7 @@ public: const glslang::TString* component); void handleRegister(const TSourceLoc&, TQualifier&, const glslang::TString* profile, const glslang::TString& desc, int subComponent, const glslang::TString*); - TIntermTyped* convertConditionalExpression(const TSourceLoc&, TIntermTyped*); + TIntermTyped* convertConditionalExpression(const TSourceLoc&, TIntermTyped*, bool mustBeScalar = true); TIntermAggregate* handleSamplerTextureCombine(const TSourceLoc& loc, TIntermTyped* argTex, TIntermTyped* argSampler); bool parseMatrixSwizzleSelector(const TSourceLoc&, const TString&, int cols, int rows, TSwizzleSelectors&); @@ -126,16 +133,17 @@ public: void mergeQualifiers(TQualifier& dst, const TQualifier& src); int computeSamplerTypeIndex(TSampler&); TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&); - void redeclareBuiltinBlock(const TSourceLoc&, TTypeList& typeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes); void paramFix(TType& type); void specializationCheck(const TSourceLoc&, const TType&, const char* op); void setLayoutQualifier(const TSourceLoc&, TQualifier&, TString&); void setLayoutQualifier(const TSourceLoc&, TQualifier&, TString&, const TIntermTyped*); + void setSpecConstantId(const TSourceLoc&, TQualifier&, int value); void mergeObjectLayoutQualifiers(TQualifier& dest, const TQualifier& src, bool inheritOnly); void checkNoShaderLayouts(const TSourceLoc&, const TShaderQualifiers&); - const TFunction* findFunction(const TSourceLoc& loc, TFunction& call, bool& builtIn, TIntermTyped*& args); + const TFunction* findFunction(const TSourceLoc& loc, TFunction& call, bool& builtIn, int& thisDepth, TIntermTyped*& args); + void addGenMulArgumentConversion(const TSourceLoc& loc, TFunction& call, TIntermTyped*& args); void declareTypedef(const TSourceLoc&, const TString& identifier, const TType&); void declareStruct(const TSourceLoc&, TString& structName, TType&); TSymbol* lookupUserType(const TString&, TType&); @@ -143,9 +151,11 @@ public: void lengthenList(const TSourceLoc&, TIntermSequence& list, int size, TIntermTyped* scalarInit); TIntermTyped* handleConstructor(const TSourceLoc&, TIntermTyped*, const TType&); TIntermTyped* addConstructor(const TSourceLoc&, TIntermTyped*, const TType&); + TIntermTyped* convertArray(TIntermTyped*, const TType&); TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&); TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset); void declareBlock(const TSourceLoc&, TType&, const TString* instanceName = 0, TArraySizes* arraySizes = 0); + void declareStructBufferCounter(const TSourceLoc& loc, const TType& bufferType, const TString& name); void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation); void fixBlockXfbOffsets(TQualifier&, TTypeList&); void fixBlockUniformOffsets(const TQualifier&, TTypeList&); @@ -153,7 +163,7 @@ public: void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&); void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&); void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode); - TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body); + TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body, const TAttributes&); void updateImplicitArraySize(const TSourceLoc&, TIntermNode*, int index); @@ -165,7 +175,7 @@ public: void pushScope() { symbolTable.push(); } void popScope() { symbolTable.pop(0); } - void pushThisScope(const TType&); + void pushThisScope(const TType&, const TVector&); void popThisScope() { symbolTable.pop(0); } void pushImplicitThis(TVariable* thisParameter) { implicitThisStack.push_back(thisParameter); } @@ -174,16 +184,17 @@ public: void pushNamespace(const TString& name); void popNamespace(); - void getFullNamespaceName(const TString*&) const; + void getFullNamespaceName(TString*&) const; void addScopeMangler(TString&); void pushSwitchSequence(TIntermSequence* sequence) { switchSequenceStack.push_back(sequence); } void popSwitchSequence() { switchSequenceStack.pop_back(); } - virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, TTypeList* typeList = nullptr) override; + virtual void growGlobalUniformBlock(const TSourceLoc&, TType&, const TString& memberName, + TTypeList* typeList = nullptr) override; // Apply L-value conversions. E.g, turning a write to a RWTexture into an ImageStore. - TIntermTyped* handleLvalue(const TSourceLoc&, const char* op, TIntermTyped* node); + TIntermTyped* handleLvalue(const TSourceLoc&, const char* op, TIntermTyped*& node); bool lValueErrorCheck(const TSourceLoc&, const char* op, TIntermTyped*) override; TLayoutFormat getLayoutFromTxType(const TSourceLoc&, const TType&); @@ -191,24 +202,34 @@ public: bool handleOutputGeometry(const TSourceLoc&, const TLayoutGeometry& geometry); bool handleInputGeometry(const TSourceLoc&, const TLayoutGeometry& geometry); - // Potentially rename shader entry point function - void renameShaderFunction(const TString*& name) const; + // Determine selection control from attributes + void handleSelectionAttributes(const TSourceLoc& loc, TIntermSelection*, const TAttributes& attributes); + void handleSwitchAttributes(const TSourceLoc& loc, TIntermSwitch*, const TAttributes& attributes); - // Reset data for incrementally built referencing of flattened composite structures - void initFlattening() { flattenLevel.push_back(0); flattenOffset.push_back(0); } - void finalizeFlattening() { flattenLevel.pop_back(); flattenOffset.pop_back(); } + // Determine loop control from attributes + void handleLoopAttributes(const TSourceLoc& loc, TIntermLoop*, const TAttributes& attributes); // Share struct buffer deep types void shareStructBufferType(TType&); + // Set texture return type of the given sampler. Returns success (not all types are valid). + bool setTextureReturnType(TSampler& sampler, const TType& retType, const TSourceLoc& loc); + + // Obtain the sampler return type of the given sampler in retType. + void getTextureReturnType(const TSampler& sampler, TType& retType) const; + + TAttributeType attributeFromName(const TString& nameSpace, const TString& name) const; + protected: struct TFlattenData { - TFlattenData() : nextBinding(TQualifier::layoutBindingEnd) { } - TFlattenData(int nb) : nextBinding(nb) { } + TFlattenData() : nextBinding(TQualifier::layoutBindingEnd), + nextLocation(TQualifier::layoutLocationEnd) { } + TFlattenData(int nb, int nl) : nextBinding(nb), nextLocation(nl) { } TVector members; // individual flattened variables - TVector offsets; // offset to next tree level - int nextBinding; // next binding to use. + TVector offsets; // offset to next tree level + unsigned int nextBinding; // next binding to use. + unsigned int nextLocation; // next location to use }; void fixConstInit(const TSourceLoc&, const TString& identifier, TType& type, TIntermTyped*& initializer); @@ -230,32 +251,35 @@ protected: // Array and struct flattening TIntermTyped* flattenAccess(TIntermTyped* base, int member); - bool shouldFlattenUniform(const TType&) const; + TIntermTyped* flattenAccess(int uniqueId, int member, TStorageQualifier outerStorage, const TType&, int subset = -1); + int findSubtreeOffset(const TIntermNode&) const; + int findSubtreeOffset(const TType&, int subset, const TVector& offsets) const; + bool shouldFlatten(const TType&, TStorageQualifier, bool topLevel) const; bool wasFlattened(const TIntermTyped* node) const; bool wasFlattened(int id) const { return flattenMap.find(id) != flattenMap.end(); } - int addFlattenedMember(const TSourceLoc& loc, const TVariable&, const TType&, TFlattenData&, const TString& name, bool track); - bool isFinalFlattening(const TType& type) const { return !(type.isStruct() || type.isArray()); } + int addFlattenedMember(const TVariable&, const TType&, TFlattenData&, const TString& name, bool linkage, + const TQualifier& outerQualifier, const TArraySizes* builtInArraySizes); - // Structure splitting (splits interstage builtin types into its own struct) - TIntermTyped* splitAccessStruct(const TSourceLoc& loc, TIntermTyped*& base, int& member); - void splitAccessArray(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index); - TType& split(TType& type, TString name, const TType* outerStructType = nullptr); - void split(TIntermTyped*); + // Structure splitting (splits interstage built-in types into its own struct) void split(const TVariable&); + void splitBuiltIn(const TString& baseName, const TType& memberType, const TArraySizes*, const TQualifier&); + const TType& split(const TType& type, const TString& name, const TQualifier&); bool wasSplit(const TIntermTyped* node) const; - bool wasSplit(int id) const { return splitIoVars.find(id) != splitIoVars.end(); } - TVariable* getSplitIoVar(const TIntermTyped* node) const; - TVariable* getSplitIoVar(const TVariable* var) const; - TVariable* getSplitIoVar(int id) const; - void addInterstageIoToLinkage(); + bool wasSplit(int id) const { return splitNonIoVars.find(id) != splitNonIoVars.end(); } + TVariable* getSplitNonIoVar(int id) const; void addPatchConstantInvocation(); + void fixTextureShadowModes(); + TIntermTyped* makeIntegerIndex(TIntermTyped*); void fixBuiltInIoType(TType&); - void flatten(const TSourceLoc& loc, const TVariable& variable); - int flatten(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name); - int flattenStruct(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name); - int flattenArray(const TSourceLoc& loc, const TVariable& variable, const TType&, TFlattenData&, TString name); + void flatten(const TVariable& variable, bool linkage); + int flatten(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage, + const TQualifier& outerQualifier, const TArraySizes* builtInArraySizes); + int flattenStruct(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage, + const TQualifier& outerQualifier, const TArraySizes* builtInArraySizes); + int flattenArray(const TVariable& variable, const TType&, TFlattenData&, TString name, bool linkage, + const TQualifier& outerQualifier); bool hasUniform(const TQualifier& qualifier) const; void clearUniform(TQualifier& qualifier); @@ -270,36 +294,48 @@ protected: // Test method names bool isStructBufferMethod(const TString& name) const; + void counterBufferType(const TSourceLoc& loc, TType& type); + + // Return standard sample position array + TIntermConstantUnion* getSamplePosArray(int count); TType* getStructBufferContentType(const TType& type) const; bool isStructBufferType(const TType& type) const { return getStructBufferContentType(type) != nullptr; } TIntermTyped* indexStructBufferContent(const TSourceLoc& loc, TIntermTyped* buffer) const; + TIntermTyped* getStructBufferCounter(const TSourceLoc& loc, TIntermTyped* buffer); + TString getStructBuffCounterName(const TString&) const; + void addStructBuffArguments(const TSourceLoc& loc, TIntermAggregate*&); + void addStructBufferHiddenCounterParam(const TSourceLoc& loc, TParameter&, TIntermAggregate*&); // Return true if this type is a reference. This is not currently a type method in case that's // a language specific answer. bool isReference(const TType& type) const { return isStructBufferType(type); } - // Pass through to base class after remembering builtin mappings. + // Return true if this a buffer type that has an associated counter buffer. + bool hasStructBuffCounter(const TType&) const; + + // Finalization step: remove unused buffer blocks from linkage (we don't know until the + // shader is entirely compiled) + void removeUnusedStructBufferCounters(); + + static bool isClipOrCullDistance(TBuiltInVariable); + static bool isClipOrCullDistance(const TQualifier& qual) { return isClipOrCullDistance(qual.builtIn); } + static bool isClipOrCullDistance(const TType& type) { return isClipOrCullDistance(type.getQualifier()); } + + // Find the patch constant function (issues error, returns nullptr if not found) + const TFunction* findPatchConstantFunction(const TSourceLoc& loc); + + // Pass through to base class after remembering built-in mappings. using TParseContextBase::trackLinkage; void trackLinkage(TSymbol& variable) override; void finish() override; // post-processing // Linkage symbol helpers - TIntermSymbol* findLinkageSymbol(TBuiltInVariable biType) const; + TIntermSymbol* findTessLinkageSymbol(TBuiltInVariable biType) const; // Current state of parsing - struct TPragma contextPragma; - int loopNestingLevel; // 0 if outside all loops int annotationNestingLevel; // 0 if outside all annotations - int structNestingLevel; // 0 if outside blocks and structures - int controlFlowNestingLevel; // 0 if outside all flow control - TList switchSequenceStack; // case, node, case, case, node, ...; ensure only one node between cases; stack of them for nesting - bool postEntryPointReturn; // if inside a function, true if the function is the entry point and this is after a return statement - const TType* currentFunctionType; // the return type of the function that's currently being parsed - bool functionReturnsValue; // true if a non-void function has a return - TBuiltInResource resources; - TLimits& limits; HlslParseContext(HlslParseContext&); HlslParseContext& operator=(HlslParseContext&); @@ -348,8 +384,6 @@ protected: TVector ioArraySymbolResizeList; TMap flattenMap; - TVector flattenLevel; // nested postfix operator level for flattening - TVector flattenOffset; // cumulative offset for flattening // IO-type map. Maps a pure symbol-table form of a structure-member list into // each of the (up to) three kinds of IO, as each as different allowed decorations, @@ -362,22 +396,24 @@ protected: TMap ioTypeMap; // Structure splitting data: - TMap splitIoVars; // variables with the builtin interstage IO removed, indexed by unique ID. + TMap splitNonIoVars; // variables with the built-in interstage IO removed, indexed by unique ID. // Structuredbuffer shared types. Typically there are only a few. TVector structBufferTypes; - // The builtin interstage IO map considers e.g, EvqPosition on input and output separately, so that we + // This tracks texture sample user structure return types. Only a limited number are supported, as + // may fit in TSampler::structReturnIndex. + TVector textureReturnStruct; + + TMap structBufferCounter; + + // The built-in interstage IO map considers e.g, EvqPosition on input and output separately, so that we // can build the linkage correctly if position appears on both sides. Otherwise, multiple positions // are considered identical. struct tInterstageIoData { tInterstageIoData(TBuiltInVariable bi, TStorageQualifier q) : builtIn(bi), storage(q) { } - tInterstageIoData(const TType& memberType, const TType& storageType) : - builtIn(memberType.getQualifier().builtIn), - storage(storageType.getQualifier().storage) { } - TBuiltInVariable builtIn; TStorageQualifier storage; @@ -387,32 +423,72 @@ protected: } }; - TMap interstageBuiltInIo; // individual builtin interstage IO vars, indexed by builtin type. - TVariable* inputPatch; - - // We have to move array references to structs containing builtin interstage IO to the split variables. - // This is only handled for one level. This stores the index, because we'll need it in the future, since - // unlike normal array references, here the index happens before we discover what it applies to. - TIntermTyped* builtInIoIndex; - TIntermTyped* builtInIoBase; + TMap splitBuiltIns; // split built-ins, indexed by built-in type. + TVariable* inputPatch; // input patch is special for PCF: it's the only non-builtin PCF input, + // and is handled as a pseudo-builtin. unsigned int nextInLocation; unsigned int nextOutLocation; - TString sourceEntryPointName; TFunction* entryPointFunction; TIntermNode* entryPointFunctionBody; TString patchConstantFunctionName; // hull shader patch constant function name, from function level attribute. - TMap builtInLinkageSymbols; // used for tessellation, finding declared builtins + TMap builtInTessLinkageSymbols; // used for tessellation, finding declared built-ins TVector currentTypePrefix; // current scoping prefix for nested structures TVector implicitThisStack; // currently active 'this' variables for nested structures TVariable* gsStreamOutput; // geometry shader stream outputs, for emit (Append method) + + TVariable* clipDistanceOutput; // synthesized clip distance out variable (shader might have >1) + TVariable* cullDistanceOutput; // synthesized cull distance out variable (shader might have >1) + TVariable* clipDistanceInput; // synthesized clip distance in variable (shader might have >1) + TVariable* cullDistanceInput; // synthesized cull distance in variable (shader might have >1) + + static const int maxClipCullRegs = 2; + std::array clipSemanticNSizeIn; // vector, indexed by clip semantic ID + std::array cullSemanticNSizeIn; // vector, indexed by cull semantic ID + std::array clipSemanticNSizeOut; // vector, indexed by clip semantic ID + std::array cullSemanticNSizeOut; // vector, indexed by cull semantic ID + + // This tracks the first (mip level) argument to the .mips[][] operator. Since this can be nested as + // in tx.mips[tx.mips[0][1].x][2], we need a stack. We also track the TSourceLoc for error reporting + // purposes. + struct tMipsOperatorData { + tMipsOperatorData(TSourceLoc l, TIntermTyped* m) : loc(l), mipLevel(m) { } + TSourceLoc loc; + TIntermTyped* mipLevel; + }; + + TVector mipsOperatorMipArg; + + // A texture object may be used with shadow and non-shadow samplers, but both may not be + // alive post-DCE in the same shader. We do not know at compilation time which are alive: that's + // only known post-DCE. If a texture is used both ways, we create two textures, and + // leave the elimiation of one to the optimizer. This maps the shader variant to + // the shadow variant. + // + // This can be removed if and when the texture shadow code in + // HlslParseContext::handleSamplerTextureCombine is removed. + struct tShadowTextureSymbols { + tShadowTextureSymbols() { symId.fill(-1); } + + void set(bool shadow, int id) { symId[int(shadow)] = id; } + int get(bool shadow) const { return symId[int(shadow)]; } + + // True if this texture has been seen with both shadow and non-shadow modes + bool overloaded() const { return symId[0] != -1 && symId[1] != -1; } + bool isShadowId(int id) const { return symId[1] == id; } + + private: + std::array symId; + }; + + TMap textureShadowVariant; }; -// This is the prefix we use for builtin methods to avoid namespace collisions with +// This is the prefix we use for built-in methods to avoid namespace collisions with // global scope user functions. // TODO: this would be better as a nonparseable character, but that would // require changing the scanner. diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseables.cpp b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseables.cpp index c77b541..a049391 100755 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseables.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslParseables.cpp @@ -68,14 +68,21 @@ const char* BaseTypeName(const char argOrder, const char* scalarName, const char } } -bool IsSamplerType(const char argType) { return argType == 'S' || argType == 's'; } -bool IsArrayed(const char argOrder) { return argOrder == '@' || argOrder == '&' || argOrder == '#'; } -bool IsTextureMS(const char argOrder) { return argOrder == '$' || argOrder == '&'; } -bool IsBuffer(const char argOrder) { return argOrder == '*' || argOrder == '~'; } -bool IsImage(const char argOrder) { return argOrder == '!' || argOrder == '#' || argOrder == '~'; } +// arg order queries +bool IsSamplerType(const char argType) { return argType == 'S' || argType == 's'; } +bool IsArrayed(const char argOrder) { return argOrder == '@' || argOrder == '&' || argOrder == '#'; } +bool IsTextureNonMS(const char argOrder) { return argOrder == '%'; } +bool IsSubpassInput(const char argOrder) { return argOrder == '[' || argOrder == ']'; } +bool IsArrayedTexture(const char argOrder) { return argOrder == '@'; } +bool IsTextureMS(const char argOrder) { return argOrder == '$' || argOrder == '&'; } +bool IsMS(const char argOrder) { return IsTextureMS(argOrder) || argOrder == ']'; } +bool IsBuffer(const char argOrder) { return argOrder == '*' || argOrder == '~'; } +bool IsImage(const char argOrder) { return argOrder == '!' || argOrder == '#' || argOrder == '~'; } + bool IsTextureType(const char argOrder) { - return argOrder == '%' || argOrder == '@' || IsTextureMS(argOrder) || IsBuffer(argOrder) | IsImage(argOrder); + return IsTextureNonMS(argOrder) || IsArrayedTexture(argOrder) || + IsTextureMS(argOrder) || IsBuffer(argOrder) || IsImage(argOrder); } // Reject certain combinations that are illegal sample methods. For example, @@ -111,7 +118,8 @@ bool IsIllegalSample(const glslang::TString& name, const char* argOrder, int dim name == "GatherAlpha"); const bool isGatherCmp = - (name == "GatherCmpRed" || + (name == "GatherCmp" || + name == "GatherCmpRed" || name == "GatherCmpGreen" || name == "GatherCmpBlue" || name == "GatherCmpAlpha"); @@ -221,15 +229,16 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons const bool isTexture = IsTextureType(argOrder[0]); const bool isArrayed = IsArrayed(argOrder[0]); const bool isSampler = IsSamplerType(argType[0]); - const bool isMS = IsTextureMS(argOrder[0]); + const bool isMS = IsMS(argOrder[0]); const bool isBuffer = IsBuffer(argOrder[0]); const bool isImage = IsImage(argOrder[0]); + const bool isSubpass = IsSubpassInput(argOrder[0]); char type = *argType; if (isTranspose) { // Take transpose of matrix dimensions std::swap(dim0, dim1); - } else if (isTexture) { + } else if (isTexture || isSubpass) { if (type == 'F') // map base type to texture of that type. type = 'T'; // e.g, int -> itexture, uint -> utexture, etc. else if (type == 'I') @@ -254,16 +263,23 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons case 'S': s += "sampler"; break; case 's': s += "SamplerComparisonState"; break; case 'T': s += ((isBuffer && isImage) ? "RWBuffer" : + isSubpass ? "SubpassInput" : isBuffer ? "Buffer" : isImage ? "RWTexture" : "Texture"); break; case 'i': s += ((isBuffer && isImage) ? "RWBuffer" : + isSubpass ? "SubpassInput" : isBuffer ? "Buffer" : isImage ? "RWTexture" : "Texture"); break; case 'u': s += ((isBuffer && isImage) ? "RWBuffer" : + isSubpass ? "SubpassInput" : isBuffer ? "Buffer" : isImage ? "RWTexture" : "Texture"); break; default: s += "UNKNOWN_TYPE"; break; } + + if (isSubpass && isMS) + s += "MS"; + } else { switch (type) { case '-': s += "void"; break; @@ -281,6 +297,7 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons s += type; s += ((isImage && isBuffer) ? "imageBuffer" : + isSubpass ? "subpassInput" : isImage ? "image" : isBuffer ? "samplerBuffer" : "texture"); @@ -295,6 +312,9 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons if (fixedVecSize != 0) dim0 = dim1 = fixedVecSize; + const char dim0Char = ('0' + char(dim0)); + const char dim1Char = ('0' + char(dim1)); + // Add sampler dimensions if (isSampler || isTexture) { if ((order == 'V' || isTexture) && !isBuffer) { @@ -319,12 +339,12 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons case '-': break; // no dimensions for voids case 'S': break; // no dimensions on scalars case 'V': - s += ('0' + char(dim0)); + s += dim0Char; break; case 'M': - s += ('0' + char(dim0)); + s += dim0Char; s += 'x'; - s += ('0' + char(dim1)); + s += dim1Char; break; default: break; @@ -338,9 +358,9 @@ glslang::TString& AppendTypeName(glslang::TString& s, const char* argOrder, cons // For HLSL, append return type for texture types if (UseHlslTypes) { switch (type) { - case 'i': s += ""; break; - case 'u': s += ""; break; - case 'T': s += ""; break; + case 'i': s += "S", "FIU,s,F,,I,U", EShLangAll, true }, + { "GatherCmp", /* O-4 */ "V4", nullptr, "%@,S,V,S,V,,,", "FIU,s,F,,I,,,", EShLangAll, true }, + { "GatherCmp", /* O-4, status */"V4", nullptr, "%@,S,V,S,V,,V,S","FIU,s,F,,I,,,,U",EShLangAll, true }, + { "GatherCmpRed", /*!O*/ "V4", nullptr, "%@,S,V,S", "FIU,s,F,", EShLangAll, true }, { "GatherCmpRed", /* O*/ "V4", nullptr, "%@,S,V,S,V", "FIU,s,F,,I", EShLangAll, true }, { "GatherCmpRed", /* O, status*/ "V4", nullptr, "%@,S,V,S,V,>S", "FIU,s,F,,I,U", EShLangAll, true }, @@ -871,6 +898,13 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c { "InterlockedMin", nullptr, nullptr, "-", "-", EShLangAll, true }, { "InterlockedOr", nullptr, nullptr, "-", "-", EShLangAll, true }, { "InterlockedXor", nullptr, nullptr, "-", "-", EShLangAll, true }, + { "IncrementCounter", nullptr, nullptr, "-", "-", EShLangAll, true }, + { "DecrementCounter", nullptr, nullptr, "-", "-", EShLangAll, true }, + { "Consume", nullptr, nullptr, "-", "-", EShLangAll, true }, + + // Methods for subpass input objects + { "SubpassLoad", "V4", nullptr, "[", "FIU", EShLangPS, true }, + { "SubpassLoad", "V4", nullptr, "],S", "FIU,I", EShLangPS, true }, // Mark end of list, since we want to avoid a range-based for, as some compilers don't handle it yet. { nullptr, nullptr, nullptr, nullptr, nullptr, 0, false }, @@ -1053,8 +1087,8 @@ void TBuiltInParseablesHlsl::identifyBuiltIns(int /*version*/, EProfile /*profil symbolTable.relateToOperator("ddy_fine", EOpDPdyFine); symbolTable.relateToOperator("degrees", EOpDegrees); symbolTable.relateToOperator("determinant", EOpDeterminant); - symbolTable.relateToOperator("DeviceMemoryBarrier", EOpGroupMemoryBarrier); - symbolTable.relateToOperator("DeviceMemoryBarrierWithGroupSync", EOpGroupMemoryBarrierWithGroupSync); // ... + symbolTable.relateToOperator("DeviceMemoryBarrier", EOpDeviceMemoryBarrier); + symbolTable.relateToOperator("DeviceMemoryBarrierWithGroupSync", EOpDeviceMemoryBarrierWithGroupSync); symbolTable.relateToOperator("distance", EOpDistance); symbolTable.relateToOperator("dot", EOpDot); symbolTable.relateToOperator("dst", EOpDst); @@ -1180,6 +1214,10 @@ void TBuiltInParseablesHlsl::identifyBuiltIns(int /*version*/, EProfile /*profil symbolTable.relateToOperator(BUILTIN_PREFIX "Store2", EOpMethodStore2); symbolTable.relateToOperator(BUILTIN_PREFIX "Store3", EOpMethodStore3); symbolTable.relateToOperator(BUILTIN_PREFIX "Store4", EOpMethodStore4); + symbolTable.relateToOperator(BUILTIN_PREFIX "IncrementCounter", EOpMethodIncrementCounter); + symbolTable.relateToOperator(BUILTIN_PREFIX "DecrementCounter", EOpMethodDecrementCounter); + // Append is also a GS method: we don't add it twice + symbolTable.relateToOperator(BUILTIN_PREFIX "Consume", EOpMethodConsume); symbolTable.relateToOperator(BUILTIN_PREFIX "InterlockedAdd", EOpInterlockedAdd); symbolTable.relateToOperator(BUILTIN_PREFIX "InterlockedAnd", EOpInterlockedAnd); @@ -1196,6 +1234,7 @@ void TBuiltInParseablesHlsl::identifyBuiltIns(int /*version*/, EProfile /*profil symbolTable.relateToOperator(BUILTIN_PREFIX "GatherGreen", EOpMethodGatherGreen); symbolTable.relateToOperator(BUILTIN_PREFIX "GatherBlue", EOpMethodGatherBlue); symbolTable.relateToOperator(BUILTIN_PREFIX "GatherAlpha", EOpMethodGatherAlpha); + symbolTable.relateToOperator(BUILTIN_PREFIX "GatherCmp", EOpMethodGatherCmpRed); // alias symbolTable.relateToOperator(BUILTIN_PREFIX "GatherCmpRed", EOpMethodGatherCmpRed); symbolTable.relateToOperator(BUILTIN_PREFIX "GatherCmpGreen", EOpMethodGatherCmpGreen); symbolTable.relateToOperator(BUILTIN_PREFIX "GatherCmpBlue", EOpMethodGatherCmpBlue); @@ -1204,6 +1243,10 @@ void TBuiltInParseablesHlsl::identifyBuiltIns(int /*version*/, EProfile /*profil // GS methods symbolTable.relateToOperator(BUILTIN_PREFIX "Append", EOpMethodAppend); symbolTable.relateToOperator(BUILTIN_PREFIX "RestartStrip", EOpMethodRestartStrip); + + // Subpass input methods + symbolTable.relateToOperator(BUILTIN_PREFIX "SubpassLoad", EOpSubpassLoad); + symbolTable.relateToOperator(BUILTIN_PREFIX "SubpassLoadMS", EOpSubpassLoadMS); } // diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslScanContext.cpp b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslScanContext.cpp index 55304a0..650918b 100755 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslScanContext.cpp +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslScanContext.cpp @@ -279,6 +279,22 @@ void HlslScanContext::fillInKeywordMap() (*KeywordMap)["float4x2"] = EHTokFloat4x2; (*KeywordMap)["float4x3"] = EHTokFloat4x3; (*KeywordMap)["float4x4"] = EHTokFloat4x4; + (*KeywordMap)["half1x1"] = EHTokHalf1x1; + (*KeywordMap)["half1x2"] = EHTokHalf1x2; + (*KeywordMap)["half1x3"] = EHTokHalf1x3; + (*KeywordMap)["half1x4"] = EHTokHalf1x4; + (*KeywordMap)["half2x1"] = EHTokHalf2x1; + (*KeywordMap)["half2x2"] = EHTokHalf2x2; + (*KeywordMap)["half2x3"] = EHTokHalf2x3; + (*KeywordMap)["half2x4"] = EHTokHalf2x4; + (*KeywordMap)["half3x1"] = EHTokHalf3x1; + (*KeywordMap)["half3x2"] = EHTokHalf3x2; + (*KeywordMap)["half3x3"] = EHTokHalf3x3; + (*KeywordMap)["half3x4"] = EHTokHalf3x4; + (*KeywordMap)["half4x1"] = EHTokHalf4x1; + (*KeywordMap)["half4x2"] = EHTokHalf4x2; + (*KeywordMap)["half4x3"] = EHTokHalf4x3; + (*KeywordMap)["half4x4"] = EHTokHalf4x4; (*KeywordMap)["double1x1"] = EHTokDouble1x1; (*KeywordMap)["double1x2"] = EHTokDouble1x2; (*KeywordMap)["double1x3"] = EHTokDouble1x3; @@ -320,6 +336,8 @@ void HlslScanContext::fillInKeywordMap() (*KeywordMap)["RWTexture2DArray"] = EHTokRWTexture2darray; (*KeywordMap)["RWTexture3D"] = EHTokRWTexture3d; (*KeywordMap)["RWBuffer"] = EHTokRWBuffer; + (*KeywordMap)["SubpassInput"] = EHTokSubpassInput; + (*KeywordMap)["SubpassInputMS"] = EHTokSubpassInputMS; (*KeywordMap)["AppendStructuredBuffer"] = EHTokAppendStructuredBuffer; (*KeywordMap)["ByteAddressBuffer"] = EHTokByteAddressBuffer; @@ -327,10 +345,12 @@ void HlslScanContext::fillInKeywordMap() (*KeywordMap)["RWByteAddressBuffer"] = EHTokRWByteAddressBuffer; (*KeywordMap)["RWStructuredBuffer"] = EHTokRWStructuredBuffer; (*KeywordMap)["StructuredBuffer"] = EHTokStructuredBuffer; + (*KeywordMap)["TextureBuffer"] = EHTokTextureBuffer; (*KeywordMap)["class"] = EHTokClass; (*KeywordMap)["struct"] = EHTokStruct; (*KeywordMap)["cbuffer"] = EHTokCBuffer; + (*KeywordMap)["ConstantBuffer"] = EHTokConstantBuffer; (*KeywordMap)["tbuffer"] = EHTokTBuffer; (*KeywordMap)["typedef"] = EHTokTypedef; (*KeywordMap)["this"] = EHTokThis; @@ -403,32 +423,6 @@ void HlslScanContext::fillInKeywordMap() } (*SemanticMap)["SV_POSITION"] = EbvPosition; - (*SemanticMap)["SV_CLIPDISTANCE"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE0"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE1"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE2"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE3"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE4"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE5"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE6"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE7"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE8"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE9"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE10"] = EbvClipDistance; - (*SemanticMap)["SV_CLIPDISTANCE11"] = EbvClipDistance; - (*SemanticMap)["SV_CULLDISTANCE"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE0"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE1"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE2"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE3"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE4"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE5"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE6"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE7"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE8"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE9"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE10"] = EbvCullDistance; - (*SemanticMap)["SV_CULLDISTANCE11"] = EbvCullDistance; (*SemanticMap)["SV_VERTEXID"] = EbvVertexIndex; (*SemanticMap)["SV_VIEWPORTARRAYINDEX"] = EbvViewportIndex; (*SemanticMap)["SV_TESSFACTOR"] = EbvTessLevelOuter; @@ -449,7 +443,7 @@ void HlslScanContext::fillInKeywordMap() (*SemanticMap)["SV_COVERAGE"] = EbvSampleMask; (*SemanticMap)["SV_DEPTHGREATEREQUAL"] = EbvFragDepthGreater; (*SemanticMap)["SV_DEPTHLESSEQUAL"] = EbvFragDepthLesser; - (*SemanticMap)["SV_STENCILREF"] = EbvStencilRef; + (*SemanticMap)["SV_STENCILREF"] = EbvFragStencilRef; } void HlslScanContext::deleteKeywordMap() @@ -571,10 +565,15 @@ EHlslTokenClass HlslScanContext::tokenizeClass(HlslToken& token) case EndOfInput: return EHTokNone; default: - char buf[2]; - buf[0] = (char)token; - buf[1] = 0; - parseContext.error(loc, "unexpected token", buf, ""); + if (token < PpAtomMaxSingle) { + char buf[2]; + buf[0] = (char)token; + buf[1] = 0; + parseContext.error(loc, "unexpected token", buf, ""); + } else if (tokenText[0] != 0) + parseContext.error(loc, "unexpected token", tokenText, ""); + else + parseContext.error(loc, "unexpected token", "", ""); break; } } while (true); @@ -772,6 +771,22 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier() case EHTokFloat4x2: case EHTokFloat4x3: case EHTokFloat4x4: + case EHTokHalf1x1: + case EHTokHalf1x2: + case EHTokHalf1x3: + case EHTokHalf1x4: + case EHTokHalf2x1: + case EHTokHalf2x2: + case EHTokHalf2x3: + case EHTokHalf2x4: + case EHTokHalf3x1: + case EHTokHalf3x2: + case EHTokHalf3x3: + case EHTokHalf3x4: + case EHTokHalf4x1: + case EHTokHalf4x2: + case EHTokHalf4x3: + case EHTokHalf4x4: case EHTokDouble1x1: case EHTokDouble1x2: case EHTokDouble1x3: @@ -820,6 +835,9 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier() case EHTokRWByteAddressBuffer: case EHTokRWStructuredBuffer: case EHTokStructuredBuffer: + case EHTokTextureBuffer: + case EHTokSubpassInput: + case EHTokSubpassInputMS: return keyword; // variable, user type, ... @@ -827,6 +845,7 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier() case EHTokStruct: case EHTokTypedef: case EHTokCBuffer: + case EHTokConstantBuffer: case EHTokTBuffer: case EHTokThis: case EHTokNamespace: diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslTokens.h b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslTokens.h index cba0b96..98450c9 100755 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslTokens.h +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslTokens.h @@ -216,6 +216,22 @@ enum EHlslTokenClass { EHTokFloat4x2, EHTokFloat4x3, EHTokFloat4x4, + EHTokHalf1x1, + EHTokHalf1x2, + EHTokHalf1x3, + EHTokHalf1x4, + EHTokHalf2x1, + EHTokHalf2x2, + EHTokHalf2x3, + EHTokHalf2x4, + EHTokHalf3x1, + EHTokHalf3x2, + EHTokHalf3x3, + EHTokHalf3x4, + EHTokHalf4x1, + EHTokHalf4x2, + EHTokHalf4x3, + EHTokHalf4x4, EHTokDouble1x1, EHTokDouble1x2, EHTokDouble1x3, @@ -257,6 +273,8 @@ enum EHlslTokenClass { EHTokRWTexture2darray, EHTokRWTexture3d, EHTokRWBuffer, + EHTokSubpassInput, + EHTokSubpassInputMS, // Structure buffer variants EHTokAppendStructuredBuffer, @@ -265,6 +283,7 @@ enum EHlslTokenClass { EHTokRWByteAddressBuffer, EHTokRWStructuredBuffer, EHTokStructuredBuffer, + EHTokTextureBuffer, // variable, user type, ... EHTokIdentifier, @@ -275,6 +294,7 @@ enum EHlslTokenClass { EHTokTypedef, EHTokThis, EHTokNamespace, + EHTokConstantBuffer, // constant EHTokFloatConstant, diff --git a/3rdparty/bgfx/3rdparty/glslang/known_good.json b/3rdparty/bgfx/3rdparty/glslang/known_good.json new file mode 100644 index 0000000..49cad46 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/known_good.json @@ -0,0 +1,18 @@ +{ + "commits" : [ + { + "name" : "spirv-tools", + "site" : "github", + "subrepo" : "KhronosGroup/SPIRV-Tools", + "subdir" : "External/spirv-tools", + "commit" : "eb0c73dad6102fc0d4f03c62fe910348bae43a11" + }, + { + "name" : "spirv-tools/external/spirv-headers", + "site" : "github", + "subrepo" : "KhronosGroup/SPIRV-Headers", + "subdir" : "External/spirv-tools/external/spirv-headers", + "commit" : "061097878467b8e040fbf153a837d844ef9f9f96" + } + ] +} diff --git a/3rdparty/bgfx/3rdparty/glslang/update_glslang_sources.py b/3rdparty/bgfx/3rdparty/glslang/update_glslang_sources.py new file mode 100755 index 0000000..331a301 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/update_glslang_sources.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python + +# Copyright 2017 The Glslang Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Get source files for Glslang and its dependencies from public repositories. +""" + +from __future__ import print_function + +import argparse +import json +import distutils.dir_util +import os.path +import subprocess +import sys + +KNOWN_GOOD_FILE = 'known_good.json' + +# Maps a site name to its hostname. +SITE_TO_HOST = { 'github' : 'github.com' } + +VERBOSE = True + + +def command_output(cmd, directory, fail_ok=False): + """Runs a command in a directory and returns its standard output stream. + + Captures the standard error stream. + + Raises a RuntimeError if the command fails to launch or otherwise fails. + """ + if VERBOSE: + print('In {d}: {cmd}'.format(d=directory, cmd=cmd)) + p = subprocess.Popen(cmd, + cwd=directory, + stdout=subprocess.PIPE) + (stdout, _) = p.communicate() + if p.returncode != 0 and not fail_ok: + raise RuntimeError('Failed to run {} in {}'.format(cmd, directory)) + if VERBOSE: + print(stdout) + return stdout + + +def command_retval(cmd, directory): + """Runs a command in a directory and returns its return value. + + Captures the standard error stream. + """ + p = subprocess.Popen(cmd, + cwd=directory, + stdout=subprocess.PIPE) + (stdout, _) = p.communicate() + return p.returncode + + +class GoodCommit(object): + """Represents a good commit for a repository.""" + + def __init__(self, json): + """Initializes this good commit object. + + Args: + 'json': A fully populated JSON object describing the commit. + """ + self._json = json + self.name = json['name'] + self.site = json['site'] + self.subrepo = json['subrepo'] + self.subdir = json['subdir'] if ('subdir' in json) else '.' + self.commit = json['commit'] + + def GetUrl(self, style='https'): + """Returns the URL for the repository.""" + host = SITE_TO_HOST[self.site] + sep = '/' if (style is 'https') else ':' + return '{style}://{host}{sep}{subrepo}'.format( + style=style, + host=host, + sep=sep, + subrepo=self.subrepo) + + def AddRemote(self): + """Add the remote 'known-good' if it does not exist.""" + print('Ignore "fatal" errors for missing known-good remote:') + if command_retval(['git', 'remote', 'show', 'known-good'], self.subdir) != 0: + command_output(['git', 'remote', 'add', 'known-good', self.GetUrl()], self.subdir) + + def HasCommit(self): + """Check if the repository contains the known-good commit.""" + return 0 == subprocess.call(['git', 'rev-parse', '--verify', '--quiet', + self.commit + "^{commit}"], + cwd=self.subdir) + + def Clone(self): + distutils.dir_util.mkpath(self.subdir) + command_output(['git', 'clone', self.GetUrl(), '.'], self.subdir) + + def Fetch(self): + command_output(['git', 'fetch', 'known-good'], self.subdir) + + def Checkout(self): + if not os.path.exists(os.path.join(self.subdir,'.git')): + self.Clone() + self.AddRemote() + if not self.HasCommit(): + self.Fetch() + command_output(['git', 'checkout', self.commit], self.subdir) + + +def GetGoodCommits(): + """Returns the latest list of GoodCommit objects.""" + with open(KNOWN_GOOD_FILE) as known_good: + return [GoodCommit(c) for c in json.loads(known_good.read())['commits']] + + +def main(): + parser = argparse.ArgumentParser(description='Get Glslang source dependencies at a known-good commit') + parser.add_argument('--dir', dest='dir', default='.', + help="Set target directory for Glslang source root. Default is \'.\'.") + + args = parser.parse_args() + + commits = GetGoodCommits() + + distutils.dir_util.mkpath(args.dir) + print('Change directory to {d}'.format(d=args.dir)) + os.chdir(args.dir) + + # Create the subdirectories in sorted order so that parent git repositories + # are created first. + for c in sorted(commits, key=lambda x: x.subdir): + print('Get {n}\n'.format(n=c.name)) + c.Checkout() + sys.exit(0) + + +if __name__ == '__main__': + main() diff --git a/3rdparty/bgfx/3rdparty/iqa/LICENSE b/3rdparty/bgfx/3rdparty/iqa/LICENSE deleted file mode 100644 index ff67944..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2011, Tom Distler (http://tdistler.com) - * All rights reserved. - * - * The BSD License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * - Neither the name of the tdistler.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ diff --git a/3rdparty/bgfx/3rdparty/iqa/README.txt b/3rdparty/bgfx/3rdparty/iqa/README.txt deleted file mode 100644 index 2028d46..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/README.txt +++ /dev/null @@ -1,36 +0,0 @@ -Doxygen documentation can be found at: http://tdistler.com/iqa - -BUILD: - - All build artifacts end up in build/, where is - 'debug' or 'release'. - - Windows: - - Open iqa.sln, select 'Debug' or 'Release', and build. The output is a - static library 'iqa.lib'. - - To run the tests under the debugger, first right-click the 'test' project, - select Properties -> Configuration Properties -> Debugging and set - 'Working Directory' to '$(OutDir)'. Then start the application. - - Linux: - - Change directories into the root of the IQA branch you want to build. - - Type `make` for a debug build, or `make RELEASE=1` for a release build. - The output is a static library 'libiqa.a'. - - Type `make test` (or `make test RELEASE=1`) to build the unit tests. - - Type `make clean` (or `make clean RELEASE=1`) to delete all build - artifacts. - - To run the tests, `cd` to the build/ directory and type - `./test`. - - -USE: - - - Include 'iqa.h' in your source file. - - Call iqa_* methods. - - Link against the IQA library. - - -HELP & SUPPORT: - - Further help can be found at: https://sourceforge.net/projects/iqa/support - diff --git a/3rdparty/bgfx/3rdparty/iqa/include/convolve.h b/3rdparty/bgfx/3rdparty/iqa/include/convolve.h deleted file mode 100644 index a5e2e71..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/include/convolve.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2011, Tom Distler (http://tdistler.com) - * All rights reserved. - * - * The BSD License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * - Neither the name of the tdistler.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _CONVOLVE_H_ -#define _CONVOLVE_H_ - -typedef float (*_iqa_get_pixel)(const float *img, int w, int h, int x, int y, float bnd_const); - -/** Out-of-bounds array values are a mirrored reflection of the border values*/ -float KBND_SYMMETRIC(const float *img, int w, int h, int x, int y, float bnd_const); -/** Out-of-bounds array values are set to the nearest border value */ -float KBND_REPLICATE(const float *img, int w, int h, int x, int y, float bnd_const); -/** Out-of-bounds array values are set to 'bnd_const' */ -float KBND_CONSTANT(const float *img, int w, int h, int x, int y, float bnd_const); - - -/** Defines a convolution kernel */ -struct _kernel { - float *kernel; /**< Pointer to the kernel values */ - int w; /**< The kernel width */ - int h; /**< The kernel height */ - int normalized; /**< 1 if the kernel values add up to 1. 0 otherwise */ - _iqa_get_pixel bnd_opt; /**< Defines how out-of-bounds image values are handled */ - float bnd_const; /**< If 'bnd_opt' is KBND_CONSTANT, this specifies the out-of-bounds value */ -}; - -/** - * @brief Applies the specified kernel to the image. - * The kernel will be applied to all areas where it fits completely within - * the image. The resulting image will be smaller by half the kernel width - * and height (w - kw/2 and h - kh/2). - * - * @param img Image to modify - * @param w Image width - * @param h Image height - * @param k The kernel to apply - * @param result Buffer to hold the resulting image ((w-kw)*(h-kh), where kw - * and kh are the kernel width and height). If 0, the result - * will be written to the original image buffer. - * @param rw Optional. The width of the resulting image will be stored here. - * @param rh Optional. The height of the resulting image will be stored here. - */ -void _iqa_convolve(float *img, int w, int h, const struct _kernel *k, float *result, int *rw, int *rh); - -/** - * The same as _iqa_convolve() except the kernel is applied to the entire image. - * In other words, the kernel is applied to all areas where the top-left corner - * of the kernel is in the image. Out-of-bound pixel value (off the right and - * bottom edges) are chosen based on the 'bnd_opt' and 'bnd_const' members of - * the kernel structure. The resulting array is the same size as the input - * image. - * - * @param img Image to modify - * @param w Image width - * @param h Image height - * @param k The kernel to apply - * @param result Buffer to hold the resulting image ((w-kw)*(h-kh), where kw - * and kh are the kernel width and height). If 0, the result - * will be written to the original image buffer. - * @return 0 if successful. Non-zero otherwise. - */ -int _iqa_img_filter(float *img, int w, int h, const struct _kernel *k, float *result); - -/** - * Returns the filtered version of the specified pixel. If no kernel is given, - * the raw pixel value is returned. - * - * @param img Source image - * @param w Image width - * @param h Image height - * @param x The x location of the pixel to filter - * @param y The y location of the pixel to filter - * @param k Optional. The convolution kernel to apply to the pixel. - * @param kscale The scale of the kernel (for normalization). 1 for normalized - * kernels. Required if 'k' is not null. - * @return The filtered pixel value. - */ -float _iqa_filter_pixel(const float *img, int w, int h, int x, int y, const struct _kernel *k, const float kscale); - - -#endif /*_CONVOLVE_H_*/ diff --git a/3rdparty/bgfx/3rdparty/iqa/include/decimate.h b/3rdparty/bgfx/3rdparty/iqa/include/decimate.h deleted file mode 100644 index 40f1a8c..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/include/decimate.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2011, Tom Distler (http://tdistler.com) - * All rights reserved. - * - * The BSD License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * - Neither the name of the tdistler.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _DECIMATE_H_ -#define _DECIMATE_H_ - -#include "convolve.h" - -/** - * @brief Downsamples (decimates) an image. - * - * @param img Image to modify - * @param w Image width - * @param h Image height - * @param factor Decimation factor - * @param k The kernel to apply (e.g. low-pass filter). Can be 0. - * @param result Buffer to hold the resulting image (w/factor*h/factor). If 0, - * the result will be written to the original image buffer. - * @param rw Optional. The width of the resulting image will be stored here. - * @param rh Optional. The height of the resulting image will be stored here. - * @return 0 on success. - */ -int _iqa_decimate(float *img, int w, int h, int factor, const struct _kernel *k, float *result, int *rw, int *rh); - -#endif /*_DECIMATE_H_*/ diff --git a/3rdparty/bgfx/3rdparty/iqa/include/iqa.h b/3rdparty/bgfx/3rdparty/iqa/include/iqa.h deleted file mode 100644 index 408675e..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/include/iqa.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2011, Tom Distler (http://tdistler.com) - * All rights reserved. - * - * The BSD License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * - Neither the name of the tdistler.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _IQA_H_ -#define _IQA_H_ - -#include "iqa_os.h" - -/** - * Allows fine-grain control of the SSIM algorithm. - */ -struct iqa_ssim_args { - float alpha; /**< luminance exponent */ - float beta; /**< contrast exponent */ - float gamma; /**< structure exponent */ - int L; /**< dynamic range (2^8 - 1)*/ - float K1; /**< stabilization constant 1 */ - float K2; /**< stabilization constant 2 */ - int f; /**< scale factor. 0=default scaling, 1=no scaling */ -}; - -/** - * Allows fine-grain control of the MS-SSIM algorithm. - */ -struct iqa_ms_ssim_args { - int wang; /**< 1=original algorithm by Wang, et al. 0=MS-SSIM* by Rouse/Hemami (default). */ - int gaussian; /**< 1=11x11 Gaussian window (default). 0=8x8 linear window. */ - int scales; /**< Number of scaled images to use. Default is 5. */ - const float *alphas; /**< Pointer to array of alpha values for each scale. Required if 'scales' isn't 5. */ - const float *betas; /**< Pointer to array of beta values for each scale. Required if 'scales' isn't 5. */ - const float *gammas; /**< Pointer to array of gamma values for each scale. Required if 'scales' isn't 5. */ -}; - -/** - * Calculates the Mean Squared Error between 2 equal-sized 8-bit images. - * @note The images must have the same width, height, and stride. - * @param ref Original reference image - * @param cmp Distorted image - * @param w Width of the images - * @param h Height of the images - * @param stride The length (in bytes) of each horizontal line in the image. - * This may be different from the image width. - * @return The MSE. - */ -float iqa_mse(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride); - -/** - * Calculates the Peak Signal-to-Noise-Ratio between 2 equal-sized 8-bit - * images. - * @note The images must have the same width, height, and stride. - * @param ref Original reference image - * @param cmp Distorted image - * @param w Width of the images - * @param h Height of the images - * @param stride The length (in bytes) of each horizontal line in the image. - * This may be different from the image width. - * @return The PSNR. - */ -float iqa_psnr(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride); - -/** - * Calculates the Structural SIMilarity between 2 equal-sized 8-bit images. - * - * See https://ece.uwaterloo.ca/~z70wang/publications/ssim.html - * @note The images must have the same width, height, and stride. - * @param ref Original reference image - * @param cmp Distorted image - * @param w Width of the images - * @param h Height of the images - * @param stride The length (in bytes) of each horizontal line in the image. - * This may be different from the image width. - * @param gaussian 0 = 8x8 square window, 1 = 11x11 circular-symmetric Gaussian - * weighting. - * @param args Optional SSIM arguments for fine control of the algorithm. 0 for - * defaults. Defaults are a=b=g=1.0, L=255, K1=0.01, K2=0.03 - * @return The mean SSIM over the entire image (MSSIM), or INFINITY if error. - */ -float iqa_ssim(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride, - int gaussian, const struct iqa_ssim_args *args); - -/** - * Calculates the Multi-Scale Structural SIMilarity between 2 equal-sized 8-bit - * images. The default algorithm is MS-SSIM* proposed by Rouse/Hemami 2008. - * - * See https://ece.uwaterloo.ca/~z70wang/publications/msssim.pdf and - * http://foulard.ece.cornell.edu/publications/dmr_hvei2008_paper.pdf - * - * @note 1. The images must have the same width, height, and stride. - * @note 2. The minimum image width or height is 2^(scales-1) * filter, where 'filter' is 11 - * if a Gaussian window is being used, or 9 otherwise. - * @param ref Original reference image - * @param cmp Distorted image - * @param w Width of the images. - * @param h Height of the images. - * @param stride The length (in bytes) of each horizontal line in the image. - * This may be different from the image width. - * @param args Optional MS-SSIM arguments for fine control of the algorithm. 0 - * for defaults. Defaults are wang=0, scales=5, gaussian=1. - * @return The mean MS-SSIM over the entire image, or INFINITY if error. - */ -float iqa_ms_ssim(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride, - const struct iqa_ms_ssim_args *args); - -#endif /*_IQA_H_*/ diff --git a/3rdparty/bgfx/3rdparty/iqa/include/iqa_os.h b/3rdparty/bgfx/3rdparty/iqa/include/iqa_os.h deleted file mode 100644 index 52e0be0..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/include/iqa_os.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2011, Tom Distler (http://tdistler.com) - * All rights reserved. - * - * The BSD License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * - Neither the name of the tdistler.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _OS_H_ -#define _OS_H_ - -/* Microsoft tends to implement features early, but they have a high legacy - * cost because they won't break existing implementations. As such, certain - * features we take for granted on other platforms (like C99) aren't fully - * implemented. This file is meant to rectify that. - */ - -#ifdef WIN32 - -#include -#include - -#define IQA_INLINE __inline - -#ifndef INFINITY - #define INFINITY (float)HUGE_VAL /**< Defined in C99 (Windows is C89) */ -#endif /*INFINITY*/ - -#ifndef NAN - static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff}; - #define NAN (*(const float *) __nan) /**< Defined in C99 (Windows is C99) */ -#endif - -#define IQA_EXPORT __declspec(dllexport) - -#else /* !Windows */ - -#define IQA_INLINE inline -#define IQA_EXPORT - -#endif - -#endif /* _OS_H_ */ diff --git a/3rdparty/bgfx/3rdparty/iqa/include/math_utils.h b/3rdparty/bgfx/3rdparty/iqa/include/math_utils.h deleted file mode 100644 index 674b354..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/include/math_utils.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2011, Tom Distler (http://tdistler.com) - * All rights reserved. - * - * The BSD License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * - Neither the name of the tdistler.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _MATH_UTILS_H_ -#define _MATH_UTILS_H_ - -#include "iqa_os.h" -#include - -/** - * Rounds a float to the nearest integer. - */ -IQA_EXPORT int _round(float a); - -IQA_EXPORT int _max(int x, int y); - -IQA_EXPORT int _min(int x, int y); - - -/** - * Compares 2 floats to the specified digit of precision. - * @return 0 if equal, 1 otherwise. - */ -IQA_EXPORT int _cmp_float(float a, float b, int digits); - - -/** - * Compares 2 matrices with the specified precision. 'b' is assumed to be the - * same size as 'a' or smaller. - * @return 0 if equal, 1 otherwise - */ -IQA_EXPORT int _matrix_cmp(const float *a, const float *b, int w, int h, int digits); - -#endif /*_MATH_UTILS_H_*/ diff --git a/3rdparty/bgfx/3rdparty/iqa/include/ssim.h b/3rdparty/bgfx/3rdparty/iqa/include/ssim.h deleted file mode 100644 index 5653afe..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/include/ssim.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2011, Tom Distler (http://tdistler.com) - * All rights reserved. - * - * The BSD License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * - Neither the name of the tdistler.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _SSIM_H_ -#define _SSIM_H_ - -#include "convolve.h" - -/* - * Circular-symmetric Gaussian weighting. - * h(x,y) = hg(x,y)/SUM(SUM(hg)) , for normalization to 1.0 - * hg(x,y) = e^( -0.5*( (x^2+y^2)/sigma^2 ) ) , where sigma was 1.5 - */ -#define GAUSSIAN_LEN 11 -static const float g_gaussian_window[GAUSSIAN_LEN][GAUSSIAN_LEN] = { - {0.000001f, 0.000008f, 0.000037f, 0.000112f, 0.000219f, 0.000274f, 0.000219f, 0.000112f, 0.000037f, 0.000008f, 0.000001f}, - {0.000008f, 0.000058f, 0.000274f, 0.000831f, 0.001619f, 0.002021f, 0.001619f, 0.000831f, 0.000274f, 0.000058f, 0.000008f}, - {0.000037f, 0.000274f, 0.001296f, 0.003937f, 0.007668f, 0.009577f, 0.007668f, 0.003937f, 0.001296f, 0.000274f, 0.000037f}, - {0.000112f, 0.000831f, 0.003937f, 0.011960f, 0.023294f, 0.029091f, 0.023294f, 0.011960f, 0.003937f, 0.000831f, 0.000112f}, - {0.000219f, 0.001619f, 0.007668f, 0.023294f, 0.045371f, 0.056662f, 0.045371f, 0.023294f, 0.007668f, 0.001619f, 0.000219f}, - {0.000274f, 0.002021f, 0.009577f, 0.029091f, 0.056662f, 0.070762f, 0.056662f, 0.029091f, 0.009577f, 0.002021f, 0.000274f}, - {0.000219f, 0.001619f, 0.007668f, 0.023294f, 0.045371f, 0.056662f, 0.045371f, 0.023294f, 0.007668f, 0.001619f, 0.000219f}, - {0.000112f, 0.000831f, 0.003937f, 0.011960f, 0.023294f, 0.029091f, 0.023294f, 0.011960f, 0.003937f, 0.000831f, 0.000112f}, - {0.000037f, 0.000274f, 0.001296f, 0.003937f, 0.007668f, 0.009577f, 0.007668f, 0.003937f, 0.001296f, 0.000274f, 0.000037f}, - {0.000008f, 0.000058f, 0.000274f, 0.000831f, 0.001619f, 0.002021f, 0.001619f, 0.000831f, 0.000274f, 0.000058f, 0.000008f}, - {0.000001f, 0.000008f, 0.000037f, 0.000112f, 0.000219f, 0.000274f, 0.000219f, 0.000112f, 0.000037f, 0.000008f, 0.000001f}, -}; - -/* - * Equal weight square window. - * Each pixel is equally weighted (1/64) so that SUM(x) = 1.0 - */ -#define SQUARE_LEN 8 -static const float g_square_window[SQUARE_LEN][SQUARE_LEN] = { - {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f}, - {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f}, - {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f}, - {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f}, - {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f}, - {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f}, - {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f}, - {0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f, 0.015625f}, -}; - -/* Holds intermediate SSIM values for map-reduce operation. */ -struct _ssim_int { - double l; - double c; - double s; -}; - -/* Defines the pointers to the map-reduce functions. */ -typedef int (*_map)(const struct _ssim_int *, void *); -typedef float (*_reduce)(int, int, void *); - -/* Arguments for map-reduce. The 'context' is user-defined. */ -struct _map_reduce { - _map map; - _reduce reduce; - void *context; -}; - -/** - * Private method that calculates the SSIM value on a pre-processed image. - * - * The input images must have stride==width. This method does not scale. - * - * @note Image buffers are modified. - * - * Map-reduce is used for doing the final SSIM calculation. The map function is - * called for every pixel, and the reduce is called at the end. The context is - * caller-defined and *not* modified by this method. - * - * @param ref Original reference image - * @param cmp Distorted image - * @param w Width of the images - * @param h Height of the images - * @param k The kernel used as the window function - * @param mr Optional map-reduce functions to use to calculate SSIM. Required - * if 'args' is not null. Ignored if 'args' is null. - * @param args Optional SSIM arguments for fine control of the algorithm. 0 for defaults. - * Defaults are a=b=g=1.0, L=255, K1=0.01, K2=0.03 - * @return The mean SSIM over the entire image (MSSIM), or INFINITY if error. - */ -float _iqa_ssim(float *ref, float *cmp, int w, int h, const struct _kernel *k, const struct _map_reduce *mr, const struct iqa_ssim_args *args); - -#endif /* _SSIM_H_ */ diff --git a/3rdparty/bgfx/3rdparty/iqa/source/convolve.c b/3rdparty/bgfx/3rdparty/iqa/source/convolve.c deleted file mode 100644 index c915907..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/source/convolve.c +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 2011, Tom Distler (http://tdistler.com) - * All rights reserved. - * - * The BSD License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * - Neither the name of the tdistler.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "convolve.h" -#include - -float KBND_SYMMETRIC(const float *img, int w, int h, int x, int y, float bnd_const) -{ - (void)bnd_const; - if (x<0) x=-1-x; - else if (x>=w) x=(w-(x-w))-1; - if (y<0) y=-1-y; - else if (y>=h) y=(h-(y-h))-1; - return img[y*w + x]; -} - -float KBND_REPLICATE(const float *img, int w, int h, int x, int y, float bnd_const) -{ - (void)bnd_const; - if (x<0) x=0; - if (x>=w) x=w-1; - if (y<0) y=0; - if (y>=h) y=h-1; - return img[y*w + x]; -} - -float KBND_CONSTANT(const float *img, int w, int h, int x, int y, float bnd_const) -{ - if (x<0) x=0; - if (y<0) y=0; - if (x>=w || y>=h) - return bnd_const; - return img[y*w + x]; -} - -static float _calc_scale(const struct _kernel *k) -{ - int ii,k_len; - double sum=0.0; - - if (k->normalized) - return 1.0f; - else { - k_len = k->w * k->h; - for (ii=0; iikernel[ii]; - if (sum != 0.0) - return (float)(1.0 / sum); - return 1.0f; - } -} - -void _iqa_convolve(float *img, int w, int h, const struct _kernel *k, float *result, int *rw, int *rh) -{ - int x,y,kx,ky,u,v; - int uc = k->w/2; - int vc = k->h/2; - int kw_even = (k->w&1)?0:1; - int kh_even = (k->h&1)?0:1; - int dst_w = w - k->w + 1; - int dst_h = h - k->h + 1; - int img_offset,k_offset; - double sum; - float scale, *dst=result; - - if (!dst) - dst = img; /* Convolve in-place */ - - /* Kernel is applied to all positions where the kernel is fully contained - * in the image */ - scale = _calc_scale(k); - for (y=0; y < dst_h; ++y) { - for (x=0; x < dst_w; ++x) { - sum = 0.0; - k_offset = 0; - ky = y+vc; - kx = x+uc; - for (v=-vc; v <= vc-kh_even; ++v) { - img_offset = (ky+v)*w + kx; - for (u=-uc; u <= uc-kw_even; ++u, ++k_offset) { - sum += img[img_offset+u] * k->kernel[k_offset]; - } - } - dst[y*dst_w + x] = (float)(sum * scale); - } - } - - if (rw) *rw = dst_w; - if (rh) *rh = dst_h; -} - -int _iqa_img_filter(float *img, int w, int h, const struct _kernel *k, float *result) -{ - int x,y; - int img_offset; - float scale, *dst=result; - - if (!k || !k->bnd_opt) - return 1; - - if (!dst) { - dst = (float*)malloc(w*h*sizeof(float)); - if (!dst) - return 2; - } - - scale = _calc_scale(k); - - /* Kernel is applied to all positions where top-left corner is in the image */ - for (y=0; y < h; ++y) { - for (x=0; x < w; ++x) { - dst[y*w + x] = _iqa_filter_pixel(img, w, h, x, y, k, scale); - } - } - - /* If no result buffer given, copy results to image buffer */ - if (!result) { - for (y=0; yw/2; - vc = k->h/2; - kw_even = (k->w&1)?0:1; - kh_even = (k->h&1)?0:1; - x_edge_left = uc; - x_edge_right = w-uc; - y_edge_top = vc; - y_edge_bottom = h-vc; - - edge = 0; - if (x < x_edge_left || y < y_edge_top || x >= x_edge_right || y >= y_edge_bottom) - edge = 1; - - sum = 0.0; - k_offset = 0; - for (v=-vc; v <= vc-kh_even; ++v) { - img_offset = (y+v)*w + x; - for (u=-uc; u <= uc-kw_even; ++u, ++k_offset) { - if (!edge) - sum += img[img_offset+u] * k->kernel[k_offset]; - else - sum += k->bnd_opt(img, w, h, x+u, y+v, k->bnd_const) * k->kernel[k_offset]; - } - } - return (float)(sum * kscale); -} diff --git a/3rdparty/bgfx/3rdparty/iqa/source/decimate.c b/3rdparty/bgfx/3rdparty/iqa/source/decimate.c deleted file mode 100644 index 91c6a9b..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/source/decimate.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2011, Tom Distler (http://tdistler.com) - * All rights reserved. - * - * The BSD License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * - Neither the name of the tdistler.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "decimate.h" -#include - -int _iqa_decimate(float *img, int w, int h, int factor, const struct _kernel *k, float *result, int *rw, int *rh) -{ - int x,y; - int sw = w/factor + (w&1); - int sh = h/factor + (h&1); - int dst_offset; - float *dst=img; - - if (result) - dst = result; - - /* Downsample */ - for (y=0; y - -int _round(float a) -{ - int sign_a = a > 0.0f ? 1 : -1; - return a-(int)a >= 0.5 ? (int)a + sign_a : (int)a; -} - -int _max(int x, int y) -{ - return x >= y ? x : y; -} - -int _min(int x, int y) -{ - return x <= y ? x : y; -} - -int _cmp_float(float a, float b, int digits) -{ - /* Round */ - int sign_a = a > 0.0f ? 1 : -1; - int sign_b = b > 0.0f ? 1 : -1; - double scale = pow(10.0, (double)digits); - double ax = a * scale; - double bx = b * scale; - int ai = ax-(int)ax >= 0.5 ? (int)ax + sign_a : (int)ax; - int bi = bx-(int)bx >= 0.5 ? (int)bx + sign_b : (int)bx; - - /* Compare */ - return ai == bi ? 0 : 1; -} - -int _matrix_cmp(const float *a, const float *b, int w, int h, int digits) -{ - int offset; - int result=0; - int len=w*h; - for (offset=0; offset -#include -#include - -/* Default number of scales */ -#define SCALES 5 - -/* Low-pass filter for down-sampling (9/7 biorthogonal wavelet filter) */ -#define LPF_LEN 9 -static const float g_lpf[LPF_LEN][LPF_LEN] = { - { 0.000714f,-0.000450f,-0.002090f, 0.007132f, 0.016114f, 0.007132f,-0.002090f,-0.000450f, 0.000714f}, - {-0.000450f, 0.000283f, 0.001316f,-0.004490f,-0.010146f,-0.004490f, 0.001316f, 0.000283f,-0.000450f}, - {-0.002090f, 0.001316f, 0.006115f,-0.020867f,-0.047149f,-0.020867f, 0.006115f, 0.001316f,-0.002090f}, - { 0.007132f,-0.004490f,-0.020867f, 0.071207f, 0.160885f, 0.071207f,-0.020867f,-0.004490f, 0.007132f}, - { 0.016114f,-0.010146f,-0.047149f, 0.160885f, 0.363505f, 0.160885f,-0.047149f,-0.010146f, 0.016114f}, - { 0.007132f,-0.004490f,-0.020867f, 0.071207f, 0.160885f, 0.071207f,-0.020867f,-0.004490f, 0.007132f}, - {-0.002090f, 0.001316f, 0.006115f,-0.020867f,-0.047149f,-0.020867f, 0.006115f, 0.001316f,-0.002090f}, - {-0.000450f, 0.000283f, 0.001316f,-0.004490f,-0.010146f,-0.004490f, 0.001316f, 0.000283f,-0.000450f}, - { 0.000714f,-0.000450f,-0.002090f, 0.007132f, 0.016114f, 0.007132f,-0.002090f,-0.000450f, 0.000714f}, -}; - -/* Alpha, beta, and gamma values for each scale */ -static float g_alphas[] = { 0.0000f, 0.0000f, 0.0000f, 0.0000f, 0.1333f }; -static float g_betas[] = { 0.0448f, 0.2856f, 0.3001f, 0.2363f, 0.1333f }; -static float g_gammas[] = { 0.0448f, 0.2856f, 0.3001f, 0.2363f, 0.1333f }; - - -struct _context { - double l; /* Luminance */ - double c; /* Contrast */ - double s; /* Structure */ - float alpha; - float beta; - float gamma; -}; - -/* Called for each pixel */ -int _ms_ssim_map(const struct _ssim_int *si, void *ctx) -{ - struct _context *ms_ctx = (struct _context*)ctx; - ms_ctx->l += si->l; - ms_ctx->c += si->c; - ms_ctx->s += si->s; - return 0; -} - -/* Called to calculate the final result */ -float _ms_ssim_reduce(int w, int h, void *ctx) -{ - double size = (double)(w*h); - struct _context *ms_ctx = (struct _context*)ctx; - ms_ctx->l = pow(ms_ctx->l / size, (double)ms_ctx->alpha); - ms_ctx->c = pow(ms_ctx->c / size, (double)ms_ctx->beta); - ms_ctx->s = pow(fabs(ms_ctx->s / size), (double)ms_ctx->gamma); - return (float)(ms_ctx->l * ms_ctx->c * ms_ctx->s); -} - -/* Releases the scaled buffers */ -void _free_buffers(float **buf, int scales) -{ - int idx; - for (idx=0; idxM]( Cj(x,y)^bj * Sj(x,y)^gj ) - * where, - * L = mean - * C = variance - * S = cross-correlation - * - * b1=g1=0.0448, b2=g2=0.2856, b3=g3=0.3001, b4=g4=0.2363, a5=b5=g5=0.1333 - */ -float iqa_ms_ssim(const unsigned char *ref, const unsigned char *cmp, int w, int h, - int stride, const struct iqa_ms_ssim_args *args) -{ - int wang=0; - int scales=SCALES; - int gauss=1; - const float *alphas=g_alphas, *betas=g_betas, *gammas=g_gammas; - int idx,x,y,cur_w,cur_h; - int offset,src_offset; - float **ref_imgs, **cmp_imgs; /* Array of pointers to scaled images */ - float msssim; - struct _kernel lpf, window; - struct iqa_ssim_args s_args; - struct _map_reduce mr; - struct _context ms_ctx; - - if (args) { - wang = args->wang; - gauss = args->gaussian; - scales = args->scales; - if (args->alphas) - alphas = args->alphas; - if (args->betas) - betas = args->betas; - if (args->gammas) - gammas = args->gammas; - } - - /* Make sure we won't scale below 1x1 */ - cur_w = w; - cur_h = h; - for (idx=0; idx - -/* PSNR(a,b) = 10*log10(L^2 / MSE(a,b)), where L=2^b - 1 (8bit = 255) */ -float iqa_psnr(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride) -{ - const int L_sqd = 255 * 255; - return (float)( 10.0 * log10( L_sqd / iqa_mse(ref,cmp,w,h,stride) ) ); -} diff --git a/3rdparty/bgfx/3rdparty/iqa/source/ssim.c b/3rdparty/bgfx/3rdparty/iqa/source/ssim.c deleted file mode 100644 index d1acccb..0000000 --- a/3rdparty/bgfx/3rdparty/iqa/source/ssim.c +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright (c) 2011, Tom Distler (http://tdistler.com) - * All rights reserved. - * - * The BSD License - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * - Neither the name of the tdistler.com nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "iqa.h" -#include "convolve.h" -#include "decimate.h" -#include "math_utils.h" -#include "ssim.h" -#include -#include - - -/* Forward declarations. */ -IQA_INLINE static double _calc_luminance(float, float, float, float); -IQA_INLINE static double _calc_contrast(double, float, float, float, float); -IQA_INLINE static double _calc_structure(float, double, float, float, float, float); -static int _ssim_map(const struct _ssim_int *, void *); -static float _ssim_reduce(int, int, void *); - -/* - * SSIM(x,y)=(2*ux*uy + C1)*(2sxy + C2) / (ux^2 + uy^2 + C1)*(sx^2 + sy^2 + C2) - * where, - * ux = SUM(w*x) - * sx = (SUM(w*(x-ux)^2)^0.5 - * sxy = SUM(w*(x-ux)*(y-uy)) - * - * Returns mean SSIM. MSSIM(X,Y) = 1/M * SUM(SSIM(x,y)) - */ -float iqa_ssim(const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride, - int gaussian, const struct iqa_ssim_args *args) -{ - int scale; - int x,y,src_offset,offset; - float *ref_f,*cmp_f; - struct _kernel low_pass; - struct _kernel window; - float result; - double ssim_sum=0.0; - struct _map_reduce mr; - - /* Initialize algorithm parameters */ - scale = _max( 1, _round( (float)_min(w,h) / 256.0f ) ); - if (args) { - if(args->f) - scale = args->f; - mr.map = _ssim_map; - mr.reduce = _ssim_reduce; - mr.context = (void*)&ssim_sum; - } - window.kernel = (float*)g_square_window; - window.w = window.h = SQUARE_LEN; - window.normalized = 1; - window.bnd_opt = KBND_SYMMETRIC; - if (gaussian) { - window.kernel = (float*)g_gaussian_window; - window.w = window.h = GAUSSIAN_LEN; - } - - /* Convert image values to floats. Forcing stride = width. */ - ref_f = (float*)malloc(w*h*sizeof(float)); - cmp_f = (float*)malloc(w*h*sizeof(float)); - if (!ref_f || !cmp_f) { - if (ref_f) free(ref_f); - if (cmp_f) free(cmp_f); - return INFINITY; - } - for (y=0; y 1) { - /* Generate simple low-pass filter */ - low_pass.kernel = (float*)malloc(scale*scale*sizeof(float)); - if (!low_pass.kernel) { - free(ref_f); - free(cmp_f); - return INFINITY; - } - low_pass.w = low_pass.h = scale; - low_pass.normalized = 0; - low_pass.bnd_opt = KBND_SYMMETRIC; - for (offset=0; offsetalpha; - beta = args->beta; - gamma = args->gamma; - L = args->L; - K1 = args->K1; - K2 = args->K2; - } - C1 = (K1*L)*(K1*L); - C2 = (K2*L)*(K2*L); - C3 = C2 / 2.0f; - - ref_mu = (float*)malloc(w*h*sizeof(float)); - cmp_mu = (float*)malloc(w*h*sizeof(float)); - ref_sigma_sqd = (float*)malloc(w*h*sizeof(float)); - cmp_sigma_sqd = (float*)malloc(w*h*sizeof(float)); - sigma_both = (float*)malloc(w*h*sizeof(float)); - if (!ref_mu || !cmp_mu || !ref_sigma_sqd || !cmp_sigma_sqd || !sigma_both) { - if (ref_mu) free(ref_mu); - if (cmp_mu) free(cmp_mu); - if (ref_sigma_sqd) free(ref_sigma_sqd); - if (cmp_sigma_sqd) free(cmp_sigma_sqd); - if (sigma_both) free(sigma_both); - return INFINITY; - } - - /* Calculate mean */ - _iqa_convolve(ref, w, h, k, ref_mu, 0, 0); - _iqa_convolve(cmp, w, h, k, cmp_mu, 0, 0); - - for (y=0; ymap(&sint, mr->context)) - return INFINITY; - } - } - } - - free(ref_mu); - free(cmp_mu); - free(ref_sigma_sqd); - free(cmp_sigma_sqd); - free(sigma_both); - - if (!args) - return (float)(ssim_sum / (double)(w*h)); - return mr->reduce(w, h, mr->context); -} - - -/* _ssim_map */ -int _ssim_map(const struct _ssim_int *si, void *ctx) -{ - double *ssim_sum = (double*)ctx; - *ssim_sum += si->l * si->c * si->s; - return 0; -} - -/* _ssim_reduce */ -float _ssim_reduce(int w, int h, void *ctx) -{ - double *ssim_sum = (double*)ctx; - return (float)(*ssim_sum / (double)(w*h)); -} - - -/* _calc_luminance */ -IQA_INLINE static double _calc_luminance(float mu1, float mu2, float C1, float alpha) -{ - double result; - float sign; - /* For MS-SSIM* */ - if (C1 == 0 && mu1*mu1 == 0 && mu2*mu2 == 0) - return 1.0; - result = (2.0 * mu1 * mu2 + C1) / (mu1*mu1 + mu2*mu2 + C1); - if (alpha == 1.0f) - return result; - sign = result < 0.0 ? -1.0f : 1.0f; - return sign * pow(fabs(result),(double)alpha); -} - -/* _calc_contrast */ -IQA_INLINE static double _calc_contrast(double sigma_comb_12, float sigma1_sqd, float sigma2_sqd, float C2, float beta) -{ - double result; - float sign; - /* For MS-SSIM* */ - if (C2 == 0 && sigma1_sqd + sigma2_sqd == 0) - return 1.0; - result = (2.0 * sigma_comb_12 + C2) / (sigma1_sqd + sigma2_sqd + C2); - if (beta == 1.0f) - return result; - sign = result < 0.0 ? -1.0f : 1.0f; - return sign * pow(fabs(result),(double)beta); -} - -/* _calc_structure */ -IQA_INLINE static double _calc_structure(float sigma_12, double sigma_comb_12, float sigma1, float sigma2, float C3, float gamma) -{ - double result; - float sign; - /* For MS-SSIM* */ - if (C3 == 0 && sigma_comb_12 == 0) { - if (sigma1 == 0 && sigma2 == 0) - return 1.0; - else if (sigma1 == 0 || sigma2 == 0) - return 0.0; - } - result = (sigma_12 + C3) / (sigma_comb_12 + C3); - if (gamma == 1.0f) - return result; - sign = result < 0.0 ? -1.0f : 1.0f; - return sign * pow(fabs(result),(double)gamma); -} \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/khronos/vulkan/vk_platform.h b/3rdparty/bgfx/3rdparty/khronos/vulkan/vk_platform.h index 5d0fc76..72f8049 100644 --- a/3rdparty/bgfx/3rdparty/khronos/vulkan/vk_platform.h +++ b/3rdparty/bgfx/3rdparty/khronos/vulkan/vk_platform.h @@ -2,7 +2,7 @@ // File: vk_platform.h // /* -** Copyright (c) 2014-2015 The Khronos Group Inc. +** Copyright (c) 2014-2017 The Khronos Group Inc. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. @@ -51,13 +51,13 @@ extern "C" #define VKAPI_ATTR #define VKAPI_CALL __stdcall #define VKAPI_PTR VKAPI_CALL -#elif defined(__ANDROID__) && defined(__ARM_EABI__) && !defined(__ARM_ARCH_7A__) - // Android does not support Vulkan in native code using the "armeabi" ABI. - #error "Vulkan requires the 'armeabi-v7a' or 'armeabi-v7a-hard' ABI on 32-bit ARM CPUs" -#elif defined(__ANDROID__) && defined(__ARM_ARCH_7A__) - // On Android/ARMv7a, Vulkan functions use the armeabi-v7a-hard calling - // convention, even if the application's native code is compiled with the - // armeabi-v7a calling convention. +#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7 + #error "Vulkan isn't supported for the 'armeabi' NDK ABI" +#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE) + // On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" + // calling convention, i.e. float parameters are passed in registers. This + // is true even if the rest of the application passes floats on the stack, + // as it does by default when compiling for the armeabi-v7a NDK ABI. #define VKAPI_ATTR __attribute__((pcs("aapcs-vfp"))) #define VKAPI_CALL #define VKAPI_PTR VKAPI_ATTR diff --git a/3rdparty/bgfx/3rdparty/khronos/vulkan/vulkan.h b/3rdparty/bgfx/3rdparty/khronos/vulkan/vulkan.h index 2f18076..ef0c246 100644 --- a/3rdparty/bgfx/3rdparty/khronos/vulkan/vulkan.h +++ b/3rdparty/bgfx/3rdparty/khronos/vulkan/vulkan.h @@ -6,7 +6,7 @@ extern "C" { #endif /* -** Copyright (c) 2015-2016 The Khronos Group Inc. +** Copyright (c) 2015-2017 The Khronos Group Inc. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ extern "C" { #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) // Version of this file -#define VK_HEADER_VERSION 13 +#define VK_HEADER_VERSION 46 #define VK_NULL_HANDLE 0 @@ -53,11 +53,13 @@ extern "C" { #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; -#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) +#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE) +#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; #else #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; #endif +#endif @@ -135,6 +137,7 @@ typedef enum VkResult { VK_ERROR_INCOMPATIBLE_DRIVER = -9, VK_ERROR_TOO_MANY_OBJECTS = -10, VK_ERROR_FORMAT_NOT_SUPPORTED = -11, + VK_ERROR_FRAGMENTED_POOL = -12, VK_ERROR_SURFACE_LOST_KHR = -1000000000, VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001, VK_SUBOPTIMAL_KHR = 1000001003, @@ -142,9 +145,11 @@ typedef enum VkResult { VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001, VK_ERROR_VALIDATION_FAILED_EXT = -1000011001, VK_ERROR_INVALID_SHADER_NV = -1000012000, - VK_RESULT_BEGIN_RANGE = VK_ERROR_FORMAT_NOT_SUPPORTED, + VK_ERROR_OUT_OF_POOL_MEMORY_KHR = -1000069000, + VK_ERROR_INVALID_EXTERNAL_HANDLE_KHX = -1000072003, + VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL, VK_RESULT_END_RANGE = VK_INCOMPLETE, - VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FORMAT_NOT_SUPPORTED + 1), + VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FRAGMENTED_POOL + 1), VK_RESULT_MAX_ENUM = 0x7FFFFFFF } VkResult; @@ -214,6 +219,90 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, + VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, + VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, + VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, + VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX = 1000053000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX = 1000053001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX = 1000053002, + VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, + VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, + VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, + VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, + VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = 1000059000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = 1000059001, + VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = 1000059002, + VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059003, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = 1000059004, + VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = 1000059005, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = 1000059006, + VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = 1000059007, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = 1000059008, + VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX = 1000060000, + VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX = 1000060001, + VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX = 1000060002, + VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX = 1000060003, + VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX = 1000060004, + VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX = 1000060005, + VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX = 1000060006, + VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX = 1000060007, + VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX = 1000060008, + VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX = 1000060009, + VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX = 1000060010, + VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX = 1000060011, + VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX = 1000060012, + VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, + VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX = 1000070000, + VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX = 1000070001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHX = 1000071000, + VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHX = 1000071001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHX = 1000071002, + VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHX = 1000071003, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHX = 1000071004, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHX = 1000071005, + VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHX = 1000071006, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHX = 1000071007, + VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX = 1000072000, + VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX = 1000072001, + VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX = 1000072002, + VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073000, + VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX = 1000073001, + VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHX = 1000073002, + VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX = 1000074000, + VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHX = 1000074001, + VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX = 1000075000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHX = 1000076000, + VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHX = 1000076001, + VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX = 1000077000, + VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078000, + VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX = 1000078001, + VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX = 1000078002, + VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHX = 1000079000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000, + VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, + VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = 1000085000, + VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, + VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, + VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, + VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, + VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, + VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, + VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, + VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT = 1000090000, + VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000, + VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001, + VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002, + VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, + VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000, + VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, + VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, + VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000, + VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, + VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO, VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO, VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1), @@ -426,6 +515,14 @@ typedef enum VkFormat { VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, + VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, + VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, + VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, + VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, + VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, + VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, + VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, + VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, VK_FORMAT_BEGIN_RANGE = VK_FORMAT_UNDEFINED, VK_FORMAT_END_RANGE = VK_FORMAT_ASTC_12x12_SRGB_BLOCK, VK_FORMAT_RANGE_SIZE = (VK_FORMAT_ASTC_12x12_SRGB_BLOCK - VK_FORMAT_UNDEFINED + 1), @@ -674,6 +771,8 @@ typedef enum VkDynamicState { VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6, VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7, VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8, + VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000, + VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000, VK_DYNAMIC_STATE_BEGIN_RANGE = VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_END_RANGE = VK_DYNAMIC_STATE_STENCIL_REFERENCE, VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1), @@ -814,6 +913,8 @@ typedef enum VkFormatFeatureFlagBits { VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000, + VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = 0x00004000, + VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = 0x00008000, VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkFormatFeatureFlagBits; typedef VkFlags VkFormatFeatureFlags; @@ -837,6 +938,8 @@ typedef enum VkImageCreateFlagBits { VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, + VK_IMAGE_CREATE_BIND_SFR_BIT_KHX = 0x00000040, + VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = 0x00000020, VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkImageCreateFlagBits; typedef VkFlags VkImageCreateFlags; @@ -874,6 +977,7 @@ typedef VkFlags VkMemoryPropertyFlags; typedef enum VkMemoryHeapFlagBits { VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, + VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHX = 0x00000002, VK_MEMORY_HEAP_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkMemoryHeapFlagBits; typedef VkFlags VkMemoryHeapFlags; @@ -898,6 +1002,7 @@ typedef enum VkPipelineStageFlagBits { VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, + VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineStageFlagBits; typedef VkFlags VkPipelineStageFlags; @@ -990,6 +1095,8 @@ typedef enum VkPipelineCreateFlagBits { VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, + VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHX = 0x00000008, + VK_PIPELINE_CREATE_DISPATCH_BASE_KHX = 0x00000010, VK_PIPELINE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineCreateFlagBits; typedef VkFlags VkPipelineCreateFlags; @@ -1036,6 +1143,11 @@ typedef VkFlags VkPipelineDynamicStateCreateFlags; typedef VkFlags VkPipelineLayoutCreateFlags; typedef VkFlags VkShaderStageFlags; typedef VkFlags VkSamplerCreateFlags; + +typedef enum VkDescriptorSetLayoutCreateFlagBits { + VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001, + VK_DESCRIPTOR_SET_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkDescriptorSetLayoutCreateFlagBits; typedef VkFlags VkDescriptorSetLayoutCreateFlags; typedef enum VkDescriptorPoolCreateFlagBits { @@ -1052,6 +1164,12 @@ typedef enum VkAttachmentDescriptionFlagBits { VK_ATTACHMENT_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkAttachmentDescriptionFlagBits; typedef VkFlags VkAttachmentDescriptionFlags; + +typedef enum VkSubpassDescriptionFlagBits { + VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001, + VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002, + VK_SUBPASS_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkSubpassDescriptionFlagBits; typedef VkFlags VkSubpassDescriptionFlags; typedef enum VkAccessFlagBits { @@ -1072,12 +1190,16 @@ typedef enum VkAccessFlagBits { VK_ACCESS_HOST_WRITE_BIT = 0x00004000, VK_ACCESS_MEMORY_READ_BIT = 0x00008000, VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, + VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, + VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkAccessFlagBits; typedef VkFlags VkAccessFlags; typedef enum VkDependencyFlagBits { VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, + VK_DEPENDENCY_VIEW_LOCAL_BIT_KHX = 0x00000002, + VK_DEPENDENCY_DEVICE_GROUP_BIT_KHX = 0x00000004, VK_DEPENDENCY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkDependencyFlagBits; typedef VkFlags VkDependencyFlags; @@ -2340,14 +2462,14 @@ typedef void (VKAPI_PTR *PFN_vkCmdDraw)(VkCommandBuffer commandBuffer, uint32_t typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance); typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); -typedef void (VKAPI_PTR *PFN_vkCmdDispatch)(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z); +typedef void (VKAPI_PTR *PFN_vkCmdDispatch)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); typedef void (VKAPI_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); typedef void (VKAPI_PTR *PFN_vkCmdCopyBuffer)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions); typedef void (VKAPI_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions); typedef void (VKAPI_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter); typedef void (VKAPI_PTR *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions); typedef void (VKAPI_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions); -typedef void (VKAPI_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const uint32_t* pData); +typedef void (VKAPI_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData); typedef void (VKAPI_PTR *PFN_vkCmdFillBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data); typedef void (VKAPI_PTR *PFN_vkCmdClearColorImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); typedef void (VKAPI_PTR *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); @@ -2976,9 +3098,9 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect( VKAPI_ATTR void VKAPI_CALL vkCmdDispatch( VkCommandBuffer commandBuffer, - uint32_t x, - uint32_t y, - uint32_t z); + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect( VkCommandBuffer commandBuffer, @@ -3032,7 +3154,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer( VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, - const uint32_t* pData); + const void* pData); VKAPI_ATTR void VKAPI_CALL vkCmdFillBuffer( VkCommandBuffer commandBuffer, @@ -3177,6 +3299,19 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) typedef enum VkColorSpaceKHR { VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0, + VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001, + VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002, + VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003, + VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004, + VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005, + VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006, + VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007, + VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008, + VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009, + VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010, + VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, + VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, + VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013, VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, VK_COLOR_SPACE_END_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, VK_COLOR_SPACE_RANGE_SIZE_KHR = (VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - VK_COLOR_SPACE_SRGB_NONLINEAR_KHR + 1), @@ -3279,6 +3414,11 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) #define VK_KHR_SWAPCHAIN_SPEC_VERSION 68 #define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain" + +typedef enum VkSwapchainCreateFlagBitsKHR { + VK_SWAPCHAIN_CREATE_BIND_SFR_BIT_KHX = 0x00000001, + VK_SWAPCHAIN_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkSwapchainCreateFlagBitsKHR; typedef VkFlags VkSwapchainCreateFlagsKHR; typedef struct VkSwapchainCreateInfoKHR { @@ -3579,7 +3719,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR( #define VK_KHR_wayland_surface 1 #include -#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 5 +#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6 #define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface" typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; @@ -3712,10 +3852,259 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR( #define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge" +#define VK_KHR_get_physical_device_properties2 1 +#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 +#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" + +typedef struct VkPhysicalDeviceFeatures2KHR { + VkStructureType sType; + void* pNext; + VkPhysicalDeviceFeatures features; +} VkPhysicalDeviceFeatures2KHR; + +typedef struct VkPhysicalDeviceProperties2KHR { + VkStructureType sType; + void* pNext; + VkPhysicalDeviceProperties properties; +} VkPhysicalDeviceProperties2KHR; + +typedef struct VkFormatProperties2KHR { + VkStructureType sType; + void* pNext; + VkFormatProperties formatProperties; +} VkFormatProperties2KHR; + +typedef struct VkImageFormatProperties2KHR { + VkStructureType sType; + void* pNext; + VkImageFormatProperties imageFormatProperties; +} VkImageFormatProperties2KHR; + +typedef struct VkPhysicalDeviceImageFormatInfo2KHR { + VkStructureType sType; + const void* pNext; + VkFormat format; + VkImageType type; + VkImageTiling tiling; + VkImageUsageFlags usage; + VkImageCreateFlags flags; +} VkPhysicalDeviceImageFormatInfo2KHR; + +typedef struct VkQueueFamilyProperties2KHR { + VkStructureType sType; + void* pNext; + VkQueueFamilyProperties queueFamilyProperties; +} VkQueueFamilyProperties2KHR; + +typedef struct VkPhysicalDeviceMemoryProperties2KHR { + VkStructureType sType; + void* pNext; + VkPhysicalDeviceMemoryProperties memoryProperties; +} VkPhysicalDeviceMemoryProperties2KHR; + +typedef struct VkSparseImageFormatProperties2KHR { + VkStructureType sType; + void* pNext; + VkSparseImageFormatProperties properties; +} VkSparseImageFormatProperties2KHR; + +typedef struct VkPhysicalDeviceSparseImageFormatInfo2KHR { + VkStructureType sType; + const void* pNext; + VkFormat format; + VkImageType type; + VkSampleCountFlagBits samples; + VkImageUsageFlags usage; + VkImageTiling tiling; +} VkPhysicalDeviceSparseImageFormatInfo2KHR; + + +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2KHR* pFeatures); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2KHR* pProperties); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2KHR* pFormatProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, VkImageFormatProperties2KHR* pImageFormatProperties); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2KHR* pQueueFamilyProperties); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2KHR* pProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR( + VkPhysicalDevice physicalDevice, + VkPhysicalDeviceFeatures2KHR* pFeatures); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR( + VkPhysicalDevice physicalDevice, + VkPhysicalDeviceProperties2KHR* pProperties); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR( + VkPhysicalDevice physicalDevice, + VkFormat format, + VkFormatProperties2KHR* pFormatProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, + VkImageFormatProperties2KHR* pImageFormatProperties); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR( + VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2KHR* pQueueFamilyProperties); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR( + VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2KHR* pMemoryProperties); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties2KHR* pProperties); +#endif + +#define VK_KHR_shader_draw_parameters 1 +#define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1 +#define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters" + + +#define VK_KHR_maintenance1 1 +#define VK_KHR_MAINTENANCE1_SPEC_VERSION 1 +#define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1" + +typedef VkFlags VkCommandPoolTrimFlagsKHR; + +typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlagsKHR flags); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR( + VkDevice device, + VkCommandPool commandPool, + VkCommandPoolTrimFlagsKHR flags); +#endif + +#define VK_KHR_push_descriptor 1 +#define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 1 +#define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor" + +typedef struct VkPhysicalDevicePushDescriptorPropertiesKHR { + VkStructureType sType; + void* pNext; + uint32_t maxPushDescriptors; +} VkPhysicalDevicePushDescriptorPropertiesKHR; + + +typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetKHR)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetKHR( + VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + uint32_t set, + uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites); +#endif + +#define VK_KHR_incremental_present 1 +#define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 +#define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present" + +typedef struct VkRectLayerKHR { + VkOffset2D offset; + VkExtent2D extent; + uint32_t layer; +} VkRectLayerKHR; + +typedef struct VkPresentRegionKHR { + uint32_t rectangleCount; + const VkRectLayerKHR* pRectangles; +} VkPresentRegionKHR; + +typedef struct VkPresentRegionsKHR { + VkStructureType sType; + const void* pNext; + uint32_t swapchainCount; + const VkPresentRegionKHR* pRegions; +} VkPresentRegionsKHR; + + + +#define VK_KHR_descriptor_update_template 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplateKHR) + +#define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1 +#define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template" + + +typedef enum VkDescriptorUpdateTemplateTypeKHR { + VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = 0, + VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1, + VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_BEGIN_RANGE_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR, + VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_END_RANGE_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR, + VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_RANGE_SIZE_KHR = (VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR + 1), + VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF +} VkDescriptorUpdateTemplateTypeKHR; + +typedef VkFlags VkDescriptorUpdateTemplateCreateFlagsKHR; + +typedef struct VkDescriptorUpdateTemplateEntryKHR { + uint32_t dstBinding; + uint32_t dstArrayElement; + uint32_t descriptorCount; + VkDescriptorType descriptorType; + size_t offset; + size_t stride; +} VkDescriptorUpdateTemplateEntryKHR; + +typedef struct VkDescriptorUpdateTemplateCreateInfoKHR { + VkStructureType sType; + void* pNext; + VkDescriptorUpdateTemplateCreateFlagsKHR flags; + uint32_t descriptorUpdateEntryCount; + const VkDescriptorUpdateTemplateEntryKHR* pDescriptorUpdateEntries; + VkDescriptorUpdateTemplateTypeKHR templateType; + VkDescriptorSetLayout descriptorSetLayout; + VkPipelineBindPoint pipelineBindPoint; + VkPipelineLayout pipelineLayout; + uint32_t set; +} VkDescriptorUpdateTemplateCreateInfoKHR; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplateKHR)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate); +typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice device, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator); +typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, const void* pData); +typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR( + VkDevice device, + const VkDescriptorUpdateTemplateCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplateKHR* pDescriptorUpdateTemplate); + +VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR( + VkDevice device, + VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR( + VkDevice device, + VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, + const void* pData); + +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR( + VkCommandBuffer commandBuffer, + VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, + VkPipelineLayout layout, + uint32_t set, + const void* pData); +#endif + #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) -#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 2 +#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 6 #define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report" #define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT @@ -3750,9 +4139,14 @@ typedef enum VkDebugReportObjectTypeEXT { VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = 28, + VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, + VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, + VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, + VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, + VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = 1000085000, VK_DEBUG_REPORT_OBJECT_TYPE_BEGIN_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1), + VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT, + VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1), VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF } VkDebugReportObjectTypeEXT; @@ -3855,8 +4249,18 @@ typedef struct VkPipelineRasterizationStateRasterizationOrderAMD { +#define VK_AMD_shader_trinary_minmax 1 +#define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 +#define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" + + +#define VK_AMD_shader_explicit_vertex_parameter 1 +#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 +#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" + + #define VK_EXT_debug_marker 1 -#define VK_EXT_DEBUG_MARKER_SPEC_VERSION 3 +#define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4 #define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker" typedef struct VkDebugMarkerObjectNameInfoEXT { @@ -3912,6 +4316,1506 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT( VkDebugMarkerMarkerInfoEXT* pMarkerInfo); #endif +#define VK_AMD_gcn_shader 1 +#define VK_AMD_GCN_SHADER_SPEC_VERSION 1 +#define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" + + +#define VK_NV_dedicated_allocation 1 +#define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 +#define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" + +typedef struct VkDedicatedAllocationImageCreateInfoNV { + VkStructureType sType; + const void* pNext; + VkBool32 dedicatedAllocation; +} VkDedicatedAllocationImageCreateInfoNV; + +typedef struct VkDedicatedAllocationBufferCreateInfoNV { + VkStructureType sType; + const void* pNext; + VkBool32 dedicatedAllocation; +} VkDedicatedAllocationBufferCreateInfoNV; + +typedef struct VkDedicatedAllocationMemoryAllocateInfoNV { + VkStructureType sType; + const void* pNext; + VkImage image; + VkBuffer buffer; +} VkDedicatedAllocationMemoryAllocateInfoNV; + + + +#define VK_AMD_draw_indirect_count 1 +#define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 +#define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" + +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountAMD( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); + +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD( + VkCommandBuffer commandBuffer, + VkBuffer buffer, + VkDeviceSize offset, + VkBuffer countBuffer, + VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, + uint32_t stride); +#endif + +#define VK_AMD_negative_viewport_height 1 +#define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 +#define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" + + +#define VK_AMD_gpu_shader_half_float 1 +#define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 +#define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" + + +#define VK_AMD_shader_ballot 1 +#define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 +#define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" + + +#define VK_KHX_multiview 1 +#define VK_KHX_MULTIVIEW_SPEC_VERSION 1 +#define VK_KHX_MULTIVIEW_EXTENSION_NAME "VK_KHX_multiview" + +typedef struct VkRenderPassMultiviewCreateInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t subpassCount; + const uint32_t* pViewMasks; + uint32_t dependencyCount; + const int32_t* pViewOffsets; + uint32_t correlationMaskCount; + const uint32_t* pCorrelationMasks; +} VkRenderPassMultiviewCreateInfoKHX; + +typedef struct VkPhysicalDeviceMultiviewFeaturesKHX { + VkStructureType sType; + void* pNext; + VkBool32 multiview; + VkBool32 multiviewGeometryShader; + VkBool32 multiviewTessellationShader; +} VkPhysicalDeviceMultiviewFeaturesKHX; + +typedef struct VkPhysicalDeviceMultiviewPropertiesKHX { + VkStructureType sType; + void* pNext; + uint32_t maxMultiviewViewCount; + uint32_t maxMultiviewInstanceIndex; +} VkPhysicalDeviceMultiviewPropertiesKHX; + + + +#define VK_IMG_format_pvrtc 1 +#define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 +#define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" + + +#define VK_NV_external_memory_capabilities 1 +#define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 +#define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" + + +typedef enum VkExternalMemoryHandleTypeFlagBitsNV { + VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF +} VkExternalMemoryHandleTypeFlagBitsNV; +typedef VkFlags VkExternalMemoryHandleTypeFlagsNV; + +typedef enum VkExternalMemoryFeatureFlagBitsNV { + VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, + VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, + VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, + VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF +} VkExternalMemoryFeatureFlagBitsNV; +typedef VkFlags VkExternalMemoryFeatureFlagsNV; + +typedef struct VkExternalImageFormatPropertiesNV { + VkImageFormatProperties imageFormatProperties; + VkExternalMemoryFeatureFlagsNV externalMemoryFeatures; + VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes; + VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes; +} VkExternalImageFormatPropertiesNV; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceExternalImageFormatPropertiesNV( + VkPhysicalDevice physicalDevice, + VkFormat format, + VkImageType type, + VkImageTiling tiling, + VkImageUsageFlags usage, + VkImageCreateFlags flags, + VkExternalMemoryHandleTypeFlagsNV externalHandleType, + VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); +#endif + +#define VK_NV_external_memory 1 +#define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 +#define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" + +typedef struct VkExternalMemoryImageCreateInfoNV { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagsNV handleTypes; +} VkExternalMemoryImageCreateInfoNV; + +typedef struct VkExportMemoryAllocateInfoNV { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagsNV handleTypes; +} VkExportMemoryAllocateInfoNV; + + + +#ifdef VK_USE_PLATFORM_WIN32_KHR +#define VK_NV_external_memory_win32 1 +#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 +#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" + +typedef struct VkImportMemoryWin32HandleInfoNV { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagsNV handleType; + HANDLE handle; +} VkImportMemoryWin32HandleInfoNV; + +typedef struct VkExportMemoryWin32HandleInfoNV { + VkStructureType sType; + const void* pNext; + const SECURITY_ATTRIBUTES* pAttributes; + DWORD dwAccess; +} VkExportMemoryWin32HandleInfoNV; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV( + VkDevice device, + VkDeviceMemory memory, + VkExternalMemoryHandleTypeFlagsNV handleType, + HANDLE* pHandle); +#endif +#endif /* VK_USE_PLATFORM_WIN32_KHR */ + +#ifdef VK_USE_PLATFORM_WIN32_KHR +#define VK_NV_win32_keyed_mutex 1 +#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 +#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" + +typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { + VkStructureType sType; + const void* pNext; + uint32_t acquireCount; + const VkDeviceMemory* pAcquireSyncs; + const uint64_t* pAcquireKeys; + const uint32_t* pAcquireTimeoutMilliseconds; + uint32_t releaseCount; + const VkDeviceMemory* pReleaseSyncs; + const uint64_t* pReleaseKeys; +} VkWin32KeyedMutexAcquireReleaseInfoNV; + + +#endif /* VK_USE_PLATFORM_WIN32_KHR */ + +#define VK_KHX_device_group 1 +#define VK_MAX_DEVICE_GROUP_SIZE_KHX 32 +#define VK_KHX_DEVICE_GROUP_SPEC_VERSION 1 +#define VK_KHX_DEVICE_GROUP_EXTENSION_NAME "VK_KHX_device_group" + + +typedef enum VkPeerMemoryFeatureFlagBitsKHX { + VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHX = 0x00000001, + VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHX = 0x00000002, + VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHX = 0x00000004, + VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHX = 0x00000008, + VK_PEER_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM_KHX = 0x7FFFFFFF +} VkPeerMemoryFeatureFlagBitsKHX; +typedef VkFlags VkPeerMemoryFeatureFlagsKHX; + +typedef enum VkMemoryAllocateFlagBitsKHX { + VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHX = 0x00000001, + VK_MEMORY_ALLOCATE_FLAG_BITS_MAX_ENUM_KHX = 0x7FFFFFFF +} VkMemoryAllocateFlagBitsKHX; +typedef VkFlags VkMemoryAllocateFlagsKHX; + +typedef enum VkDeviceGroupPresentModeFlagBitsKHX { + VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHX = 0x00000001, + VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHX = 0x00000002, + VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHX = 0x00000004, + VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHX = 0x00000008, + VK_DEVICE_GROUP_PRESENT_MODE_FLAG_BITS_MAX_ENUM_KHX = 0x7FFFFFFF +} VkDeviceGroupPresentModeFlagBitsKHX; +typedef VkFlags VkDeviceGroupPresentModeFlagsKHX; + +typedef struct VkMemoryAllocateFlagsInfoKHX { + VkStructureType sType; + const void* pNext; + VkMemoryAllocateFlagsKHX flags; + uint32_t deviceMask; +} VkMemoryAllocateFlagsInfoKHX; + +typedef struct VkBindBufferMemoryInfoKHX { + VkStructureType sType; + const void* pNext; + VkBuffer buffer; + VkDeviceMemory memory; + VkDeviceSize memoryOffset; + uint32_t deviceIndexCount; + const uint32_t* pDeviceIndices; +} VkBindBufferMemoryInfoKHX; + +typedef struct VkBindImageMemoryInfoKHX { + VkStructureType sType; + const void* pNext; + VkImage image; + VkDeviceMemory memory; + VkDeviceSize memoryOffset; + uint32_t deviceIndexCount; + const uint32_t* pDeviceIndices; + uint32_t SFRRectCount; + const VkRect2D* pSFRRects; +} VkBindImageMemoryInfoKHX; + +typedef struct VkDeviceGroupRenderPassBeginInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t deviceMask; + uint32_t deviceRenderAreaCount; + const VkRect2D* pDeviceRenderAreas; +} VkDeviceGroupRenderPassBeginInfoKHX; + +typedef struct VkDeviceGroupCommandBufferBeginInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t deviceMask; +} VkDeviceGroupCommandBufferBeginInfoKHX; + +typedef struct VkDeviceGroupSubmitInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t waitSemaphoreCount; + const uint32_t* pWaitSemaphoreDeviceIndices; + uint32_t commandBufferCount; + const uint32_t* pCommandBufferDeviceMasks; + uint32_t signalSemaphoreCount; + const uint32_t* pSignalSemaphoreDeviceIndices; +} VkDeviceGroupSubmitInfoKHX; + +typedef struct VkDeviceGroupBindSparseInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t resourceDeviceIndex; + uint32_t memoryDeviceIndex; +} VkDeviceGroupBindSparseInfoKHX; + +typedef struct VkDeviceGroupPresentCapabilitiesKHX { + VkStructureType sType; + const void* pNext; + uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE_KHX]; + VkDeviceGroupPresentModeFlagsKHX modes; +} VkDeviceGroupPresentCapabilitiesKHX; + +typedef struct VkImageSwapchainCreateInfoKHX { + VkStructureType sType; + const void* pNext; + VkSwapchainKHR swapchain; +} VkImageSwapchainCreateInfoKHX; + +typedef struct VkBindImageMemorySwapchainInfoKHX { + VkStructureType sType; + const void* pNext; + VkSwapchainKHR swapchain; + uint32_t imageIndex; +} VkBindImageMemorySwapchainInfoKHX; + +typedef struct VkAcquireNextImageInfoKHX { + VkStructureType sType; + const void* pNext; + VkSwapchainKHR swapchain; + uint64_t timeout; + VkSemaphore semaphore; + VkFence fence; + uint32_t deviceMask; +} VkAcquireNextImageInfoKHX; + +typedef struct VkDeviceGroupPresentInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t swapchainCount; + const uint32_t* pDeviceMasks; + VkDeviceGroupPresentModeFlagBitsKHX mode; +} VkDeviceGroupPresentInfoKHX; + +typedef struct VkDeviceGroupSwapchainCreateInfoKHX { + VkStructureType sType; + const void* pNext; + VkDeviceGroupPresentModeFlagsKHX modes; +} VkDeviceGroupSwapchainCreateInfoKHX; + + +typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeaturesKHX)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures); +typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2KHX)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfoKHX* pBindInfos); +typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2KHX)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfoKHX* pBindInfos); +typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMaskKHX)(VkCommandBuffer commandBuffer, uint32_t deviceMask); +typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHX)(VkDevice device, VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities); +typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHX)(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHX* pModes); +typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImage2KHX)(VkDevice device, const VkAcquireNextImageInfoKHX* pAcquireInfo, uint32_t* pImageIndex); +typedef void (VKAPI_PTR *PFN_vkCmdDispatchBaseKHX)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHX)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHX( + VkDevice device, + uint32_t heapIndex, + uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlagsKHX* pPeerMemoryFeatures); + +VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2KHX( + VkDevice device, + uint32_t bindInfoCount, + const VkBindBufferMemoryInfoKHX* pBindInfos); + +VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHX( + VkDevice device, + uint32_t bindInfoCount, + const VkBindImageMemoryInfoKHX* pBindInfos); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMaskKHX( + VkCommandBuffer commandBuffer, + uint32_t deviceMask); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupPresentCapabilitiesKHX( + VkDevice device, + VkDeviceGroupPresentCapabilitiesKHX* pDeviceGroupPresentCapabilities); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHX( + VkDevice device, + VkSurfaceKHR surface, + VkDeviceGroupPresentModeFlagsKHX* pModes); + +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImage2KHX( + VkDevice device, + const VkAcquireNextImageInfoKHX* pAcquireInfo, + uint32_t* pImageIndex); + +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHX( + VkCommandBuffer commandBuffer, + uint32_t baseGroupX, + uint32_t baseGroupY, + uint32_t baseGroupZ, + uint32_t groupCountX, + uint32_t groupCountY, + uint32_t groupCountZ); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDevicePresentRectanglesKHX( + VkPhysicalDevice physicalDevice, + VkSurfaceKHR surface, + uint32_t* pRectCount, + VkRect2D* pRects); +#endif + +#define VK_EXT_validation_flags 1 +#define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 +#define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" + + +typedef enum VkValidationCheckEXT { + VK_VALIDATION_CHECK_ALL_EXT = 0, + VK_VALIDATION_CHECK_BEGIN_RANGE_EXT = VK_VALIDATION_CHECK_ALL_EXT, + VK_VALIDATION_CHECK_END_RANGE_EXT = VK_VALIDATION_CHECK_ALL_EXT, + VK_VALIDATION_CHECK_RANGE_SIZE_EXT = (VK_VALIDATION_CHECK_ALL_EXT - VK_VALIDATION_CHECK_ALL_EXT + 1), + VK_VALIDATION_CHECK_MAX_ENUM_EXT = 0x7FFFFFFF +} VkValidationCheckEXT; + +typedef struct VkValidationFlagsEXT { + VkStructureType sType; + const void* pNext; + uint32_t disabledValidationCheckCount; + VkValidationCheckEXT* pDisabledValidationChecks; +} VkValidationFlagsEXT; + + + +#ifdef VK_USE_PLATFORM_VI_NN +#define VK_NN_vi_surface 1 +#define VK_NN_VI_SURFACE_SPEC_VERSION 1 +#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" + +typedef VkFlags VkViSurfaceCreateFlagsNN; + +typedef struct VkViSurfaceCreateInfoNN { + VkStructureType sType; + const void* pNext; + VkViSurfaceCreateFlagsNN flags; + void* window; +} VkViSurfaceCreateInfoNN; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN( + VkInstance instance, + const VkViSurfaceCreateInfoNN* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); +#endif +#endif /* VK_USE_PLATFORM_VI_NN */ + +#define VK_EXT_shader_subgroup_ballot 1 +#define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1 +#define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot" + + +#define VK_EXT_shader_subgroup_vote 1 +#define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1 +#define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote" + + +#define VK_KHX_device_group_creation 1 +#define VK_KHX_DEVICE_GROUP_CREATION_SPEC_VERSION 1 +#define VK_KHX_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHX_device_group_creation" + +typedef struct VkPhysicalDeviceGroupPropertiesKHX { + VkStructureType sType; + void* pNext; + uint32_t physicalDeviceCount; + VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE_KHX]; + VkBool32 subsetAllocation; +} VkPhysicalDeviceGroupPropertiesKHX; + +typedef struct VkDeviceGroupDeviceCreateInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t physicalDeviceCount; + const VkPhysicalDevice* pPhysicalDevices; +} VkDeviceGroupDeviceCreateInfoKHX; + + +typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroupsKHX)(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHX( + VkInstance instance, + uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupPropertiesKHX* pPhysicalDeviceGroupProperties); +#endif + +#define VK_KHX_external_memory_capabilities 1 +#define VK_LUID_SIZE_KHX 8 +#define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 +#define VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_memory_capabilities" + + +typedef enum VkExternalMemoryHandleTypeFlagBitsKHX { + VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHX = 0x00000008, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHX = 0x00000010, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHX = 0x00000020, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHX = 0x00000040, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_KHX = 0x7FFFFFFF +} VkExternalMemoryHandleTypeFlagBitsKHX; +typedef VkFlags VkExternalMemoryHandleTypeFlagsKHX; + +typedef enum VkExternalMemoryFeatureFlagBitsKHX { + VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHX = 0x00000001, + VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHX = 0x00000002, + VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHX = 0x00000004, + VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM_KHX = 0x7FFFFFFF +} VkExternalMemoryFeatureFlagBitsKHX; +typedef VkFlags VkExternalMemoryFeatureFlagsKHX; + +typedef struct VkExternalMemoryPropertiesKHX { + VkExternalMemoryFeatureFlagsKHX externalMemoryFeatures; + VkExternalMemoryHandleTypeFlagsKHX exportFromImportedHandleTypes; + VkExternalMemoryHandleTypeFlagsKHX compatibleHandleTypes; +} VkExternalMemoryPropertiesKHX; + +typedef struct VkPhysicalDeviceExternalImageFormatInfoKHX { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagBitsKHX handleType; +} VkPhysicalDeviceExternalImageFormatInfoKHX; + +typedef struct VkExternalImageFormatPropertiesKHX { + VkStructureType sType; + void* pNext; + VkExternalMemoryPropertiesKHX externalMemoryProperties; +} VkExternalImageFormatPropertiesKHX; + +typedef struct VkPhysicalDeviceExternalBufferInfoKHX { + VkStructureType sType; + const void* pNext; + VkBufferCreateFlags flags; + VkBufferUsageFlags usage; + VkExternalMemoryHandleTypeFlagBitsKHX handleType; +} VkPhysicalDeviceExternalBufferInfoKHX; + +typedef struct VkExternalBufferPropertiesKHX { + VkStructureType sType; + void* pNext; + VkExternalMemoryPropertiesKHX externalMemoryProperties; +} VkExternalBufferPropertiesKHX; + +typedef struct VkPhysicalDeviceIDPropertiesKHX { + VkStructureType sType; + void* pNext; + uint8_t deviceUUID[VK_UUID_SIZE]; + uint8_t driverUUID[VK_UUID_SIZE]; + uint8_t deviceLUID[VK_LUID_SIZE_KHX]; + VkBool32 deviceLUIDValid; +} VkPhysicalDeviceIDPropertiesKHX; + + +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHX)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo, VkExternalBufferPropertiesKHX* pExternalBufferProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHX( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfoKHX* pExternalBufferInfo, + VkExternalBufferPropertiesKHX* pExternalBufferProperties); +#endif + +#define VK_KHX_external_memory 1 +#define VK_KHX_EXTERNAL_MEMORY_SPEC_VERSION 1 +#define VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHX_external_memory" +#define VK_QUEUE_FAMILY_EXTERNAL_KHX (~0U-1) + +typedef struct VkExternalMemoryImageCreateInfoKHX { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagsKHX handleTypes; +} VkExternalMemoryImageCreateInfoKHX; + +typedef struct VkExternalMemoryBufferCreateInfoKHX { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagsKHX handleTypes; +} VkExternalMemoryBufferCreateInfoKHX; + +typedef struct VkExportMemoryAllocateInfoKHX { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagsKHX handleTypes; +} VkExportMemoryAllocateInfoKHX; + + + +#ifdef VK_USE_PLATFORM_WIN32_KHX +#define VK_KHX_external_memory_win32 1 +#define VK_KHX_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 +#define VK_KHX_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHX_external_memory_win32" + +typedef struct VkImportMemoryWin32HandleInfoKHX { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagBitsKHX handleType; + HANDLE handle; +} VkImportMemoryWin32HandleInfoKHX; + +typedef struct VkExportMemoryWin32HandleInfoKHX { + VkStructureType sType; + const void* pNext; + const SECURITY_ATTRIBUTES* pAttributes; + DWORD dwAccess; + LPCWSTR name; +} VkExportMemoryWin32HandleInfoKHX; + +typedef struct VkMemoryWin32HandlePropertiesKHX { + VkStructureType sType; + void* pNext; + uint32_t memoryTypeBits; +} VkMemoryWin32HandlePropertiesKHX; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHX)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagBitsKHX handleType, HANDLE* pHandle); +typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHX)(VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHX handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHX( + VkDevice device, + VkDeviceMemory memory, + VkExternalMemoryHandleTypeFlagBitsKHX handleType, + HANDLE* pHandle); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHX( + VkDevice device, + VkExternalMemoryHandleTypeFlagBitsKHX handleType, + HANDLE handle, + VkMemoryWin32HandlePropertiesKHX* pMemoryWin32HandleProperties); +#endif +#endif /* VK_USE_PLATFORM_WIN32_KHX */ + +#define VK_KHX_external_memory_fd 1 +#define VK_KHX_EXTERNAL_MEMORY_FD_SPEC_VERSION 1 +#define VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHX_external_memory_fd" + +typedef struct VkImportMemoryFdInfoKHX { + VkStructureType sType; + const void* pNext; + VkExternalMemoryHandleTypeFlagBitsKHX handleType; + int fd; +} VkImportMemoryFdInfoKHX; + +typedef struct VkMemoryFdPropertiesKHX { + VkStructureType sType; + void* pNext; + uint32_t memoryTypeBits; +} VkMemoryFdPropertiesKHX; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdKHX)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagBitsKHX handleType, int* pFd); +typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdPropertiesKHX)(VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHX handleType, int fd, VkMemoryFdPropertiesKHX* pMemoryFdProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdKHX( + VkDevice device, + VkDeviceMemory memory, + VkExternalMemoryHandleTypeFlagBitsKHX handleType, + int* pFd); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdPropertiesKHX( + VkDevice device, + VkExternalMemoryHandleTypeFlagBitsKHX handleType, + int fd, + VkMemoryFdPropertiesKHX* pMemoryFdProperties); +#endif + +#ifdef VK_USE_PLATFORM_WIN32_KHR +#define VK_KHX_win32_keyed_mutex 1 +#define VK_KHX_WIN32_KEYED_MUTEX_SPEC_VERSION 1 +#define VK_KHX_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHX_win32_keyed_mutex" + +typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t acquireCount; + const VkDeviceMemory* pAcquireSyncs; + const uint64_t* pAcquireKeys; + const uint32_t* pAcquireTimeouts; + uint32_t releaseCount; + const VkDeviceMemory* pReleaseSyncs; + const uint64_t* pReleaseKeys; +} VkWin32KeyedMutexAcquireReleaseInfoKHX; + + +#endif /* VK_USE_PLATFORM_WIN32_KHR */ + +#define VK_KHX_external_semaphore_capabilities 1 +#define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1 +#define VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHX_external_semaphore_capabilities" + + +typedef enum VkExternalSemaphoreHandleTypeFlagBitsKHX { + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHX = 0x00000001, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHX = 0x00000002, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHX = 0x00000004, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHX = 0x00000008, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FENCE_FD_BIT_KHX = 0x00000010, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_KHX = 0x7FFFFFFF +} VkExternalSemaphoreHandleTypeFlagBitsKHX; +typedef VkFlags VkExternalSemaphoreHandleTypeFlagsKHX; + +typedef enum VkExternalSemaphoreFeatureFlagBitsKHX { + VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHX = 0x00000001, + VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHX = 0x00000002, + VK_EXTERNAL_SEMAPHORE_FEATURE_FLAG_BITS_MAX_ENUM_KHX = 0x7FFFFFFF +} VkExternalSemaphoreFeatureFlagBitsKHX; +typedef VkFlags VkExternalSemaphoreFeatureFlagsKHX; + +typedef struct VkPhysicalDeviceExternalSemaphoreInfoKHX { + VkStructureType sType; + const void* pNext; + VkExternalSemaphoreHandleTypeFlagBitsKHX handleType; +} VkPhysicalDeviceExternalSemaphoreInfoKHX; + +typedef struct VkExternalSemaphorePropertiesKHX { + VkStructureType sType; + void* pNext; + VkExternalSemaphoreHandleTypeFlagsKHX exportFromImportedHandleTypes; + VkExternalSemaphoreHandleTypeFlagsKHX compatibleHandleTypes; + VkExternalSemaphoreFeatureFlagsKHX externalSemaphoreFeatures; +} VkExternalSemaphorePropertiesKHX; + + +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHX)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo, VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphorePropertiesKHX( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo, + VkExternalSemaphorePropertiesKHX* pExternalSemaphoreProperties); +#endif + +#define VK_KHX_external_semaphore 1 +#define VK_KHX_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 +#define VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHX_external_semaphore" + +typedef struct VkExportSemaphoreCreateInfoKHX { + VkStructureType sType; + const void* pNext; + VkExternalSemaphoreHandleTypeFlagsKHX handleTypes; +} VkExportSemaphoreCreateInfoKHX; + + + +#ifdef VK_USE_PLATFORM_WIN32_KHX +#define VK_KHX_external_semaphore_win32 1 +#define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1 +#define VK_KHX_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHX_external_semaphore_win32" + +typedef struct VkImportSemaphoreWin32HandleInfoKHX { + VkStructureType sType; + const void* pNext; + VkSemaphore semaphore; + VkExternalSemaphoreHandleTypeFlagsKHX handleType; + HANDLE handle; +} VkImportSemaphoreWin32HandleInfoKHX; + +typedef struct VkExportSemaphoreWin32HandleInfoKHX { + VkStructureType sType; + const void* pNext; + const SECURITY_ATTRIBUTES* pAttributes; + DWORD dwAccess; + LPCWSTR name; +} VkExportSemaphoreWin32HandleInfoKHX; + +typedef struct VkD3D12FenceSubmitInfoKHX { + VkStructureType sType; + const void* pNext; + uint32_t waitSemaphoreValuesCount; + const uint64_t* pWaitSemaphoreValues; + uint32_t signalSemaphoreValuesCount; + const uint64_t* pSignalSemaphoreValues; +} VkD3D12FenceSubmitInfoKHX; + + +typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHX)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo); +typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHX)(VkDevice device, VkSemaphore semaphore, VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, HANDLE* pHandle); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHX( + VkDevice device, + const VkImportSemaphoreWin32HandleInfoKHX* pImportSemaphoreWin32HandleInfo); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHX( + VkDevice device, + VkSemaphore semaphore, + VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, + HANDLE* pHandle); +#endif +#endif /* VK_USE_PLATFORM_WIN32_KHX */ + +#define VK_KHX_external_semaphore_fd 1 +#define VK_KHX_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1 +#define VK_KHX_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHX_external_semaphore_fd" + +typedef struct VkImportSemaphoreFdInfoKHX { + VkStructureType sType; + const void* pNext; + VkSemaphore semaphore; + VkExternalSemaphoreHandleTypeFlagBitsKHX handleType; + int fd; +} VkImportSemaphoreFdInfoKHX; + + +typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreFdKHX)(VkDevice device, const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo); +typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreFdKHX)(VkDevice device, VkSemaphore semaphore, VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, int* pFd); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreFdKHX( + VkDevice device, + const VkImportSemaphoreFdInfoKHX* pImportSemaphoreFdInfo); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreFdKHX( + VkDevice device, + VkSemaphore semaphore, + VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, + int* pFd); +#endif + +#define VK_NVX_device_generated_commands 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX) +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX) + +#define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 1 +#define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" + + +typedef enum VkIndirectCommandsTokenTypeNVX { + VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX = 0, + VK_INDIRECT_COMMANDS_TOKEN_DESCRIPTOR_SET_NVX = 1, + VK_INDIRECT_COMMANDS_TOKEN_INDEX_BUFFER_NVX = 2, + VK_INDIRECT_COMMANDS_TOKEN_VERTEX_BUFFER_NVX = 3, + VK_INDIRECT_COMMANDS_TOKEN_PUSH_CONSTANT_NVX = 4, + VK_INDIRECT_COMMANDS_TOKEN_DRAW_INDEXED_NVX = 5, + VK_INDIRECT_COMMANDS_TOKEN_DRAW_NVX = 6, + VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX = 7, + VK_INDIRECT_COMMANDS_TOKEN_TYPE_BEGIN_RANGE_NVX = VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX, + VK_INDIRECT_COMMANDS_TOKEN_TYPE_END_RANGE_NVX = VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX, + VK_INDIRECT_COMMANDS_TOKEN_TYPE_RANGE_SIZE_NVX = (VK_INDIRECT_COMMANDS_TOKEN_DISPATCH_NVX - VK_INDIRECT_COMMANDS_TOKEN_PIPELINE_NVX + 1), + VK_INDIRECT_COMMANDS_TOKEN_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF +} VkIndirectCommandsTokenTypeNVX; + +typedef enum VkObjectEntryTypeNVX { + VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX = 0, + VK_OBJECT_ENTRY_PIPELINE_NVX = 1, + VK_OBJECT_ENTRY_INDEX_BUFFER_NVX = 2, + VK_OBJECT_ENTRY_VERTEX_BUFFER_NVX = 3, + VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX = 4, + VK_OBJECT_ENTRY_TYPE_BEGIN_RANGE_NVX = VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX, + VK_OBJECT_ENTRY_TYPE_END_RANGE_NVX = VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX, + VK_OBJECT_ENTRY_TYPE_RANGE_SIZE_NVX = (VK_OBJECT_ENTRY_PUSH_CONSTANT_NVX - VK_OBJECT_ENTRY_DESCRIPTOR_SET_NVX + 1), + VK_OBJECT_ENTRY_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF +} VkObjectEntryTypeNVX; + + +typedef enum VkIndirectCommandsLayoutUsageFlagBitsNVX { + VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, + VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, + VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, + VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, + VK_INDIRECT_COMMANDS_LAYOUT_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF +} VkIndirectCommandsLayoutUsageFlagBitsNVX; +typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNVX; + +typedef enum VkObjectEntryUsageFlagBitsNVX { + VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, + VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, + VK_OBJECT_ENTRY_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF +} VkObjectEntryUsageFlagBitsNVX; +typedef VkFlags VkObjectEntryUsageFlagsNVX; + +typedef struct VkDeviceGeneratedCommandsFeaturesNVX { + VkStructureType sType; + const void* pNext; + VkBool32 computeBindingPointSupport; +} VkDeviceGeneratedCommandsFeaturesNVX; + +typedef struct VkDeviceGeneratedCommandsLimitsNVX { + VkStructureType sType; + const void* pNext; + uint32_t maxIndirectCommandsLayoutTokenCount; + uint32_t maxObjectEntryCounts; + uint32_t minSequenceCountBufferOffsetAlignment; + uint32_t minSequenceIndexBufferOffsetAlignment; + uint32_t minCommandsTokenBufferOffsetAlignment; +} VkDeviceGeneratedCommandsLimitsNVX; + +typedef struct VkIndirectCommandsTokenNVX { + VkIndirectCommandsTokenTypeNVX tokenType; + VkBuffer buffer; + VkDeviceSize offset; +} VkIndirectCommandsTokenNVX; + +typedef struct VkIndirectCommandsLayoutTokenNVX { + VkIndirectCommandsTokenTypeNVX tokenType; + uint32_t bindingUnit; + uint32_t dynamicCount; + uint32_t divisor; +} VkIndirectCommandsLayoutTokenNVX; + +typedef struct VkIndirectCommandsLayoutCreateInfoNVX { + VkStructureType sType; + const void* pNext; + VkPipelineBindPoint pipelineBindPoint; + VkIndirectCommandsLayoutUsageFlagsNVX flags; + uint32_t tokenCount; + const VkIndirectCommandsLayoutTokenNVX* pTokens; +} VkIndirectCommandsLayoutCreateInfoNVX; + +typedef struct VkCmdProcessCommandsInfoNVX { + VkStructureType sType; + const void* pNext; + VkObjectTableNVX objectTable; + VkIndirectCommandsLayoutNVX indirectCommandsLayout; + uint32_t indirectCommandsTokenCount; + const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens; + uint32_t maxSequencesCount; + VkCommandBuffer targetCommandBuffer; + VkBuffer sequencesCountBuffer; + VkDeviceSize sequencesCountOffset; + VkBuffer sequencesIndexBuffer; + VkDeviceSize sequencesIndexOffset; +} VkCmdProcessCommandsInfoNVX; + +typedef struct VkCmdReserveSpaceForCommandsInfoNVX { + VkStructureType sType; + const void* pNext; + VkObjectTableNVX objectTable; + VkIndirectCommandsLayoutNVX indirectCommandsLayout; + uint32_t maxSequencesCount; +} VkCmdReserveSpaceForCommandsInfoNVX; + +typedef struct VkObjectTableCreateInfoNVX { + VkStructureType sType; + const void* pNext; + uint32_t objectCount; + const VkObjectEntryTypeNVX* pObjectEntryTypes; + const uint32_t* pObjectEntryCounts; + const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags; + uint32_t maxUniformBuffersPerDescriptor; + uint32_t maxStorageBuffersPerDescriptor; + uint32_t maxStorageImagesPerDescriptor; + uint32_t maxSampledImagesPerDescriptor; + uint32_t maxPipelineLayouts; +} VkObjectTableCreateInfoNVX; + +typedef struct VkObjectTableEntryNVX { + VkObjectEntryTypeNVX type; + VkObjectEntryUsageFlagsNVX flags; +} VkObjectTableEntryNVX; + +typedef struct VkObjectTablePipelineEntryNVX { + VkObjectEntryTypeNVX type; + VkObjectEntryUsageFlagsNVX flags; + VkPipeline pipeline; +} VkObjectTablePipelineEntryNVX; + +typedef struct VkObjectTableDescriptorSetEntryNVX { + VkObjectEntryTypeNVX type; + VkObjectEntryUsageFlagsNVX flags; + VkPipelineLayout pipelineLayout; + VkDescriptorSet descriptorSet; +} VkObjectTableDescriptorSetEntryNVX; + +typedef struct VkObjectTableVertexBufferEntryNVX { + VkObjectEntryTypeNVX type; + VkObjectEntryUsageFlagsNVX flags; + VkBuffer buffer; +} VkObjectTableVertexBufferEntryNVX; + +typedef struct VkObjectTableIndexBufferEntryNVX { + VkObjectEntryTypeNVX type; + VkObjectEntryUsageFlagsNVX flags; + VkBuffer buffer; + VkIndexType indexType; +} VkObjectTableIndexBufferEntryNVX; + +typedef struct VkObjectTablePushConstantEntryNVX { + VkObjectEntryTypeNVX type; + VkObjectEntryUsageFlagsNVX flags; + VkPipelineLayout pipelineLayout; + VkShaderStageFlags stageFlags; +} VkObjectTablePushConstantEntryNVX; + + +typedef void (VKAPI_PTR *PFN_vkCmdProcessCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo); +typedef void (VKAPI_PTR *PFN_vkCmdReserveSpaceForCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo); +typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectCommandsLayoutNVX)(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout); +typedef void (VKAPI_PTR *PFN_vkDestroyIndirectCommandsLayoutNVX)(VkDevice device, VkIndirectCommandsLayoutNVX indirectCommandsLayout, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkCreateObjectTableNVX)(VkDevice device, const VkObjectTableCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkObjectTableNVX* pObjectTable); +typedef void (VKAPI_PTR *PFN_vkDestroyObjectTableNVX)(VkDevice device, VkObjectTableNVX objectTable, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkRegisterObjectsNVX)(VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices); +typedef VkResult (VKAPI_PTR *PFN_vkUnregisterObjectsNVX)(VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices); +typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX)(VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, VkDeviceGeneratedCommandsLimitsNVX* pLimits); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdProcessCommandsNVX( + VkCommandBuffer commandBuffer, + const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdReserveSpaceForCommandsNVX( + VkCommandBuffer commandBuffer, + const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutNVX( + VkDevice device, + const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout); + +VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutNVX( + VkDevice device, + VkIndirectCommandsLayoutNVX indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateObjectTableNVX( + VkDevice device, + const VkObjectTableCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkObjectTableNVX* pObjectTable); + +VKAPI_ATTR void VKAPI_CALL vkDestroyObjectTableNVX( + VkDevice device, + VkObjectTableNVX objectTable, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkRegisterObjectsNVX( + VkDevice device, + VkObjectTableNVX objectTable, + uint32_t objectCount, + const VkObjectTableEntryNVX* const* ppObjectTableEntries, + const uint32_t* pObjectIndices); + +VKAPI_ATTR VkResult VKAPI_CALL vkUnregisterObjectsNVX( + VkDevice device, + VkObjectTableNVX objectTable, + uint32_t objectCount, + const VkObjectEntryTypeNVX* pObjectEntryTypes, + const uint32_t* pObjectIndices); + +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( + VkPhysicalDevice physicalDevice, + VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, + VkDeviceGeneratedCommandsLimitsNVX* pLimits); +#endif + +#define VK_NV_clip_space_w_scaling 1 +#define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1 +#define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling" + +typedef struct VkViewportWScalingNV { + float xcoeff; + float ycoeff; +} VkViewportWScalingNV; + +typedef struct VkPipelineViewportWScalingStateCreateInfoNV { + VkStructureType sType; + const void* pNext; + VkBool32 viewportWScalingEnable; + uint32_t viewportCount; + const VkViewportWScalingNV* pViewportWScalings; +} VkPipelineViewportWScalingStateCreateInfoNV; + + +typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWScalingNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingNV( + VkCommandBuffer commandBuffer, + uint32_t firstViewport, + uint32_t viewportCount, + const VkViewportWScalingNV* pViewportWScalings); +#endif + +#define VK_EXT_direct_mode_display 1 +#define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1 +#define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display" + +typedef VkResult (VKAPI_PTR *PFN_vkReleaseDisplayEXT)(VkPhysicalDevice physicalDevice, VkDisplayKHR display); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT( + VkPhysicalDevice physicalDevice, + VkDisplayKHR display); +#endif + +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT +#define VK_EXT_acquire_xlib_display 1 +#include + +#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 +#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" + +typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display); +typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT( + VkPhysicalDevice physicalDevice, + Display* dpy, + VkDisplayKHR display); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT( + VkPhysicalDevice physicalDevice, + Display* dpy, + RROutput rrOutput, + VkDisplayKHR* pDisplay); +#endif +#endif /* VK_USE_PLATFORM_XLIB_XRANDR_EXT */ + +#define VK_EXT_display_surface_counter 1 +#define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1 +#define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter" + + +typedef enum VkSurfaceCounterFlagBitsEXT { + VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001, + VK_SURFACE_COUNTER_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF +} VkSurfaceCounterFlagBitsEXT; +typedef VkFlags VkSurfaceCounterFlagsEXT; + +typedef struct VkSurfaceCapabilities2EXT { + VkStructureType sType; + void* pNext; + uint32_t minImageCount; + uint32_t maxImageCount; + VkExtent2D currentExtent; + VkExtent2D minImageExtent; + VkExtent2D maxImageExtent; + uint32_t maxImageArrayLayers; + VkSurfaceTransformFlagsKHR supportedTransforms; + VkSurfaceTransformFlagBitsKHR currentTransform; + VkCompositeAlphaFlagsKHR supportedCompositeAlpha; + VkImageUsageFlags supportedUsageFlags; + VkSurfaceCounterFlagsEXT supportedSurfaceCounters; +} VkSurfaceCapabilities2EXT; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT( + VkPhysicalDevice physicalDevice, + VkSurfaceKHR surface, + VkSurfaceCapabilities2EXT* pSurfaceCapabilities); +#endif + +#define VK_EXT_display_control 1 +#define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1 +#define VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME "VK_EXT_display_control" + + +typedef enum VkDisplayPowerStateEXT { + VK_DISPLAY_POWER_STATE_OFF_EXT = 0, + VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, + VK_DISPLAY_POWER_STATE_ON_EXT = 2, + VK_DISPLAY_POWER_STATE_BEGIN_RANGE_EXT = VK_DISPLAY_POWER_STATE_OFF_EXT, + VK_DISPLAY_POWER_STATE_END_RANGE_EXT = VK_DISPLAY_POWER_STATE_ON_EXT, + VK_DISPLAY_POWER_STATE_RANGE_SIZE_EXT = (VK_DISPLAY_POWER_STATE_ON_EXT - VK_DISPLAY_POWER_STATE_OFF_EXT + 1), + VK_DISPLAY_POWER_STATE_MAX_ENUM_EXT = 0x7FFFFFFF +} VkDisplayPowerStateEXT; + +typedef enum VkDeviceEventTypeEXT { + VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, + VK_DEVICE_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT, + VK_DEVICE_EVENT_TYPE_END_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT, + VK_DEVICE_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT - VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT + 1), + VK_DEVICE_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF +} VkDeviceEventTypeEXT; + +typedef enum VkDisplayEventTypeEXT { + VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, + VK_DISPLAY_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT, + VK_DISPLAY_EVENT_TYPE_END_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT, + VK_DISPLAY_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT - VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT + 1), + VK_DISPLAY_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF +} VkDisplayEventTypeEXT; + +typedef struct VkDisplayPowerInfoEXT { + VkStructureType sType; + const void* pNext; + VkDisplayPowerStateEXT powerState; +} VkDisplayPowerInfoEXT; + +typedef struct VkDeviceEventInfoEXT { + VkStructureType sType; + const void* pNext; + VkDeviceEventTypeEXT deviceEvent; +} VkDeviceEventInfoEXT; + +typedef struct VkDisplayEventInfoEXT { + VkStructureType sType; + const void* pNext; + VkDisplayEventTypeEXT displayEvent; +} VkDisplayEventInfoEXT; + +typedef struct VkSwapchainCounterCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkSurfaceCounterFlagsEXT surfaceCounters; +} VkSwapchainCounterCreateInfoEXT; + + +typedef VkResult (VKAPI_PTR *PFN_vkDisplayPowerControlEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo); +typedef VkResult (VKAPI_PTR *PFN_vkRegisterDeviceEventEXT)(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); +typedef VkResult (VKAPI_PTR *PFN_vkRegisterDisplayEventEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); +typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainCounterEXT)(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkDisplayPowerControlEXT( + VkDevice device, + VkDisplayKHR display, + const VkDisplayPowerInfoEXT* pDisplayPowerInfo); + +VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDeviceEventEXT( + VkDevice device, + const VkDeviceEventInfoEXT* pDeviceEventInfo, + const VkAllocationCallbacks* pAllocator, + VkFence* pFence); + +VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDisplayEventEXT( + VkDevice device, + VkDisplayKHR display, + const VkDisplayEventInfoEXT* pDisplayEventInfo, + const VkAllocationCallbacks* pAllocator, + VkFence* pFence); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT( + VkDevice device, + VkSwapchainKHR swapchain, + VkSurfaceCounterFlagBitsEXT counter, + uint64_t* pCounterValue); +#endif + +#define VK_GOOGLE_display_timing 1 +#define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1 +#define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing" + +typedef struct VkRefreshCycleDurationGOOGLE { + uint64_t refreshDuration; +} VkRefreshCycleDurationGOOGLE; + +typedef struct VkPastPresentationTimingGOOGLE { + uint32_t presentID; + uint64_t desiredPresentTime; + uint64_t actualPresentTime; + uint64_t earliestPresentTime; + uint64_t presentMargin; +} VkPastPresentationTimingGOOGLE; + +typedef struct VkPresentTimeGOOGLE { + uint32_t presentID; + uint64_t desiredPresentTime; +} VkPresentTimeGOOGLE; + +typedef struct VkPresentTimesInfoGOOGLE { + VkStructureType sType; + const void* pNext; + uint32_t swapchainCount; + const VkPresentTimeGOOGLE* pTimes; +} VkPresentTimesInfoGOOGLE; + + +typedef VkResult (VKAPI_PTR *PFN_vkGetRefreshCycleDurationGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetPastPresentationTimingGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetRefreshCycleDurationGOOGLE( + VkDevice device, + VkSwapchainKHR swapchain, + VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE( + VkDevice device, + VkSwapchainKHR swapchain, + uint32_t* pPresentationTimingCount, + VkPastPresentationTimingGOOGLE* pPresentationTimings); +#endif + +#define VK_NV_sample_mask_override_coverage 1 +#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1 +#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage" + + +#define VK_NV_geometry_shader_passthrough 1 +#define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1 +#define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough" + + +#define VK_NV_viewport_array2 1 +#define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1 +#define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2" + + +#define VK_NVX_multiview_per_view_attributes 1 +#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1 +#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes" + +typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { + VkStructureType sType; + void* pNext; + VkBool32 perViewPositionAllComponents; +} VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; + + + +#define VK_NV_viewport_swizzle 1 +#define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1 +#define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle" + + +typedef enum VkViewportCoordinateSwizzleNV { + VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, + VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, + VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2, + VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3, + VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4, + VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5, + VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6, + VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7, + VK_VIEWPORT_COORDINATE_SWIZZLE_BEGIN_RANGE_NV = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV, + VK_VIEWPORT_COORDINATE_SWIZZLE_END_RANGE_NV = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV, + VK_VIEWPORT_COORDINATE_SWIZZLE_RANGE_SIZE_NV = (VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV - VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV + 1), + VK_VIEWPORT_COORDINATE_SWIZZLE_MAX_ENUM_NV = 0x7FFFFFFF +} VkViewportCoordinateSwizzleNV; + +typedef VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV; + +typedef struct VkViewportSwizzleNV { + VkViewportCoordinateSwizzleNV x; + VkViewportCoordinateSwizzleNV y; + VkViewportCoordinateSwizzleNV z; + VkViewportCoordinateSwizzleNV w; +} VkViewportSwizzleNV; + +typedef struct VkPipelineViewportSwizzleStateCreateInfoNV { + VkStructureType sType; + const void* pNext; + VkPipelineViewportSwizzleStateCreateFlagsNV flags; + uint32_t viewportCount; + const VkViewportSwizzleNV* pViewportSwizzles; +} VkPipelineViewportSwizzleStateCreateInfoNV; + + + +#define VK_EXT_discard_rectangles 1 +#define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1 +#define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles" + + +typedef enum VkDiscardRectangleModeEXT { + VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, + VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, + VK_DISCARD_RECTANGLE_MODE_BEGIN_RANGE_EXT = VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT, + VK_DISCARD_RECTANGLE_MODE_END_RANGE_EXT = VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT, + VK_DISCARD_RECTANGLE_MODE_RANGE_SIZE_EXT = (VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT - VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT + 1), + VK_DISCARD_RECTANGLE_MODE_MAX_ENUM_EXT = 0x7FFFFFFF +} VkDiscardRectangleModeEXT; + +typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT; + +typedef struct VkPhysicalDeviceDiscardRectanglePropertiesEXT { + VkStructureType sType; + void* pNext; + uint32_t maxDiscardRectangles; +} VkPhysicalDeviceDiscardRectanglePropertiesEXT; + +typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT { + VkStructureType sType; + const void* pNext; + VkPipelineDiscardRectangleStateCreateFlagsEXT flags; + VkDiscardRectangleModeEXT discardRectangleMode; + uint32_t discardRectangleCount; + const VkRect2D* pDiscardRectangles; +} VkPipelineDiscardRectangleStateCreateInfoEXT; + + +typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEXT( + VkCommandBuffer commandBuffer, + uint32_t firstDiscardRectangle, + uint32_t discardRectangleCount, + const VkRect2D* pDiscardRectangles); +#endif + +#define VK_EXT_swapchain_colorspace 1 +#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 2 +#define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace" + + +#define VK_EXT_hdr_metadata 1 +#define VK_EXT_HDR_METADATA_SPEC_VERSION 1 +#define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata" + +typedef struct VkXYColorEXT { + float x; + float y; +} VkXYColorEXT; + +typedef struct VkHdrMetadataEXT { + VkStructureType sType; + const void* pNext; + VkXYColorEXT displayPrimaryRed; + VkXYColorEXT displayPrimaryGreen; + VkXYColorEXT displayPrimaryBlue; + VkXYColorEXT whitePoint; + float maxLuminance; + float minLuminance; + float maxContentLightLevel; + float maxFrameAverageLightLevel; +} VkHdrMetadataEXT; + + +typedef void (VKAPI_PTR *PFN_vkSetHdrMetadataEXT)(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT( + VkDevice device, + uint32_t swapchainCount, + const VkSwapchainKHR* pSwapchains, + const VkHdrMetadataEXT* pMetadata); +#endif + +#ifdef VK_USE_PLATFORM_IOS_MVK +#define VK_MVK_ios_surface 1 +#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2 +#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" + +typedef VkFlags VkIOSSurfaceCreateFlagsMVK; + +typedef struct VkIOSSurfaceCreateInfoMVK { + VkStructureType sType; + const void* pNext; + VkIOSSurfaceCreateFlagsMVK flags; + const void* pView; +} VkIOSSurfaceCreateInfoMVK; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK( + VkInstance instance, + const VkIOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); +#endif +#endif /* VK_USE_PLATFORM_IOS_MVK */ + +#ifdef VK_USE_PLATFORM_MACOS_MVK +#define VK_MVK_macos_surface 1 +#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2 +#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" + +typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; + +typedef struct VkMacOSSurfaceCreateInfoMVK { + VkStructureType sType; + const void* pNext; + VkMacOSSurfaceCreateFlagsMVK flags; + const void* pView; +} VkMacOSSurfaceCreateInfoMVK; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( + VkInstance instance, + const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); +#endif +#endif /* VK_USE_PLATFORM_MACOS_MVK */ + #ifdef __cplusplus } #endif diff --git a/3rdparty/bgfx/3rdparty/libsquish/LICENSE b/3rdparty/bgfx/3rdparty/libsquish/LICENSE deleted file mode 100644 index ed1c78d..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/3rdparty/bgfx/3rdparty/libsquish/README b/3rdparty/bgfx/3rdparty/libsquish/README deleted file mode 100644 index d26b72e..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/README +++ /dev/null @@ -1,35 +0,0 @@ -LICENSE -------- - -The squish library is distributed under the terms and conditions of the MIT -license. This license is specified at the top of each source file and must be -preserved in its entirety. - -BUILDING AND INSTALLING THE LIBRARY ------------------------------------ - -If you are using Visual Studio 2003 or above under Windows then load the Visual -Studio 2003 project in the vs7 folder. By default, the library is built using -SSE2 optimisations. To change this either change or remove the SQUISH_USE_SSE=2 -from the preprocessor symbols. - -If you are using a Mac then load the Xcode 2.2 project in the distribution. By -default, the library is built using Altivec optimisations. To change this -either change or remove SQUISH_USE_ALTIVEC=1 from the preprocessor symbols. I -guess I'll have to think about changing this for the new Intel Macs that are -rolling out... - -If you are using unix then first edit the config file in the base directory of -the distribution, enabling Altivec or SSE with the USE_ALTIVEC or USE_SSE -variables, and editing the optimisation flags passed to the C++ compiler if -necessary. Then make can be used to build the library, and make install (from -the superuser account) can be used to install (into /usr/local by default). - -REPORTING BUGS OR FEATURE REQUESTS ----------------------------------- - -Feedback can be sent to Simon Brown (the developer) at si@sjbrown.co.uk - -New releases are announced on the squish library homepage at -http://sjbrown.co.uk/?code=squish - diff --git a/3rdparty/bgfx/3rdparty/libsquish/alpha.cpp b/3rdparty/bgfx/3rdparty/libsquish/alpha.cpp deleted file mode 100644 index 0f94e21..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/alpha.cpp +++ /dev/null @@ -1,350 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#include "alpha.h" - -#include -#include - -namespace squish { - -static int FloatToInt( float a, int limit ) -{ - // use ANSI round-to-zero behaviour to get round-to-nearest - int i = ( int )( a + 0.5f ); - - // clamp to the limit - if( i < 0 ) - i = 0; - else if( i > limit ) - i = limit; - - // done - return i; -} - -void CompressAlphaDxt3( u8 const* rgba, int mask, void* block ) -{ - u8* bytes = reinterpret_cast< u8* >( block ); - - // quantise and pack the alpha values pairwise - for( int i = 0; i < 8; ++i ) - { - // quantise down to 4 bits - float alpha1 = ( float )rgba[8*i + 3] * ( 15.0f/255.0f ); - float alpha2 = ( float )rgba[8*i + 7] * ( 15.0f/255.0f ); - int quant1 = FloatToInt( alpha1, 15 ); - int quant2 = FloatToInt( alpha2, 15 ); - - // set alpha to zero where masked - int bit1 = 1 << ( 2*i ); - int bit2 = 1 << ( 2*i + 1 ); - if( ( mask & bit1 ) == 0 ) - quant1 = 0; - if( ( mask & bit2 ) == 0 ) - quant2 = 0; - - // pack into the byte - bytes[i] = ( u8 )( quant1 | ( quant2 << 4 ) ); - } -} - -void DecompressAlphaDxt3( u8* rgba, void const* block ) -{ - u8 const* bytes = reinterpret_cast< u8 const* >( block ); - - // unpack the alpha values pairwise - for( int i = 0; i < 8; ++i ) - { - // quantise down to 4 bits - u8 quant = bytes[i]; - - // unpack the values - u8 lo = quant & 0x0f; - u8 hi = quant & 0xf0; - - // convert back up to bytes - rgba[8*i + 3] = lo | ( lo << 4 ); - rgba[8*i + 7] = hi | ( hi >> 4 ); - } -} - -static void FixRange( int& min, int& max, int steps ) -{ - if( max - min < steps ) - max = std::min( min + steps, 255 ); - if( max - min < steps ) - min = std::max( 0, max - steps ); -} - -static int FitCodes( u8 const* rgba, int mask, u8 const* codes, u8* indices ) -{ - // fit each alpha value to the codebook - int err = 0; - for( int i = 0; i < 16; ++i ) - { - // check this pixel is valid - int bit = 1 << i; - if( ( mask & bit ) == 0 ) - { - // use the first code - indices[i] = 0; - continue; - } - - // find the least error and corresponding index - int value = rgba[4*i + 3]; - int least = INT_MAX; - int index = 0; - for( int j = 0; j < 8; ++j ) - { - // get the squared error from this code - int dist = ( int )value - ( int )codes[j]; - dist *= dist; - - // compare with the best so far - if( dist < least ) - { - least = dist; - index = j; - } - } - - // save this index and accumulate the error - indices[i] = ( u8 )index; - err += least; - } - - // return the total error - return err; -} - -static void WriteAlphaBlock( int alpha0, int alpha1, u8 const* indices, void* block ) -{ - u8* bytes = reinterpret_cast< u8* >( block ); - - // write the first two bytes - bytes[0] = ( u8 )alpha0; - bytes[1] = ( u8 )alpha1; - - // pack the indices with 3 bits each - u8* dest = bytes + 2; - u8 const* src = indices; - for( int i = 0; i < 2; ++i ) - { - // pack 8 3-bit values - int value = 0; - for( int j = 0; j < 8; ++j ) - { - int index = *src++; - value |= ( index << 3*j ); - } - - // store in 3 bytes - for( int j = 0; j < 3; ++j ) - { - int byte = ( value >> 8*j ) & 0xff; - *dest++ = ( u8 )byte; - } - } -} - -static void WriteAlphaBlock5( int alpha0, int alpha1, u8 const* indices, void* block ) -{ - // check the relative values of the endpoints - if( alpha0 > alpha1 ) - { - // swap the indices - u8 swapped[16]; - for( int i = 0; i < 16; ++i ) - { - u8 index = indices[i]; - if( index == 0 ) - swapped[i] = 1; - else if( index == 1 ) - swapped[i] = 0; - else if( index <= 5 ) - swapped[i] = 7 - index; - else - swapped[i] = index; - } - - // write the block - WriteAlphaBlock( alpha1, alpha0, swapped, block ); - } - else - { - // write the block - WriteAlphaBlock( alpha0, alpha1, indices, block ); - } -} - -static void WriteAlphaBlock7( int alpha0, int alpha1, u8 const* indices, void* block ) -{ - // check the relative values of the endpoints - if( alpha0 < alpha1 ) - { - // swap the indices - u8 swapped[16]; - for( int i = 0; i < 16; ++i ) - { - u8 index = indices[i]; - if( index == 0 ) - swapped[i] = 1; - else if( index == 1 ) - swapped[i] = 0; - else - swapped[i] = 9 - index; - } - - // write the block - WriteAlphaBlock( alpha1, alpha0, swapped, block ); - } - else - { - // write the block - WriteAlphaBlock( alpha0, alpha1, indices, block ); - } -} - -void CompressAlphaDxt5( u8 const* rgba, int mask, void* block ) -{ - // get the range for 5-alpha and 7-alpha interpolation - int min5 = 255; - int max5 = 0; - int min7 = 255; - int max7 = 0; - for( int i = 0; i < 16; ++i ) - { - // check this pixel is valid - int bit = 1 << i; - if( ( mask & bit ) == 0 ) - continue; - - // incorporate into the min/max - int value = rgba[4*i + 3]; - if( value < min7 ) - min7 = value; - if( value > max7 ) - max7 = value; - if( value != 0 && value < min5 ) - min5 = value; - if( value != 255 && value > max5 ) - max5 = value; - } - - // handle the case that no valid range was found - if( min5 > max5 ) - min5 = max5; - if( min7 > max7 ) - min7 = max7; - - // fix the range to be the minimum in each case - FixRange( min5, max5, 5 ); - FixRange( min7, max7, 7 ); - - // set up the 5-alpha code book - u8 codes5[8]; - codes5[0] = ( u8 )min5; - codes5[1] = ( u8 )max5; - for( int i = 1; i < 5; ++i ) - codes5[1 + i] = ( u8 )( ( ( 5 - i )*min5 + i*max5 )/5 ); - codes5[6] = 0; - codes5[7] = 255; - - // set up the 7-alpha code book - u8 codes7[8]; - codes7[0] = ( u8 )min7; - codes7[1] = ( u8 )max7; - for( int i = 1; i < 7; ++i ) - codes7[1 + i] = ( u8 )( ( ( 7 - i )*min7 + i*max7 )/7 ); - - // fit the data to both code books - u8 indices5[16]; - u8 indices7[16]; - int err5 = FitCodes( rgba, mask, codes5, indices5 ); - int err7 = FitCodes( rgba, mask, codes7, indices7 ); - - // save the block with least error - if( err5 <= err7 ) - WriteAlphaBlock5( min5, max5, indices5, block ); - else - WriteAlphaBlock7( min7, max7, indices7, block ); -} - -void DecompressAlphaDxt5( u8* rgba, void const* block ) -{ - // get the two alpha values - u8 const* bytes = reinterpret_cast< u8 const* >( block ); - int alpha0 = bytes[0]; - int alpha1 = bytes[1]; - - // compare the values to build the codebook - u8 codes[8]; - codes[0] = ( u8 )alpha0; - codes[1] = ( u8 )alpha1; - if( alpha0 <= alpha1 ) - { - // use 5-alpha codebook - for( int i = 1; i < 5; ++i ) - codes[1 + i] = ( u8 )( ( ( 5 - i )*alpha0 + i*alpha1 )/5 ); - codes[6] = 0; - codes[7] = 255; - } - else - { - // use 7-alpha codebook - for( int i = 1; i < 7; ++i ) - codes[1 + i] = ( u8 )( ( ( 7 - i )*alpha0 + i*alpha1 )/7 ); - } - - // decode the indices - u8 indices[16]; - u8 const* src = bytes + 2; - u8* dest = indices; - for( int i = 0; i < 2; ++i ) - { - // grab 3 bytes - int value = 0; - for( int j = 0; j < 3; ++j ) - { - int byte = *src++; - value |= ( byte << 8*j ); - } - - // unpack 8 3-bit values from it - for( int j = 0; j < 8; ++j ) - { - int index = ( value >> 3*j ) & 0x7; - *dest++ = ( u8 )index; - } - } - - // write out the indexed codebook values - for( int i = 0; i < 16; ++i ) - rgba[4*i + 3] = codes[indices[i]]; -} - -} // namespace squish diff --git a/3rdparty/bgfx/3rdparty/libsquish/alpha.h b/3rdparty/bgfx/3rdparty/libsquish/alpha.h deleted file mode 100644 index e5e7f32..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/alpha.h +++ /dev/null @@ -1,41 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_ALPHA_H -#define SQUISH_ALPHA_H - -#include "squish.h" - -namespace squish { - -void CompressAlphaDxt3( u8 const* rgba, int mask, void* block ); -void CompressAlphaDxt5( u8 const* rgba, int mask, void* block ); - -void DecompressAlphaDxt3( u8* rgba, void const* block ); -void DecompressAlphaDxt5( u8* rgba, void const* block ); - -} // namespace squish - -#endif // ndef SQUISH_ALPHA_H diff --git a/3rdparty/bgfx/3rdparty/libsquish/clusterfit.cpp b/3rdparty/bgfx/3rdparty/libsquish/clusterfit.cpp deleted file mode 100644 index 9670446..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/clusterfit.cpp +++ /dev/null @@ -1,392 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Copyright (c) 2007 Ignacio Castano icastano@nvidia.com - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#include "clusterfit.h" -#include "colourset.h" -#include "colourblock.h" -#include - -namespace squish { - -ClusterFit::ClusterFit( ColourSet const* colours, int flags, float* metric ) - : ColourFit( colours, flags ) -{ - // set the iteration count - m_iterationCount = ( m_flags & kColourIterativeClusterFit ) ? kMaxIterations : 1; - - // initialise the metric (old perceptual = 0.2126f, 0.7152f, 0.0722f) - if( metric ) - m_metric = Vec4( metric[0], metric[1], metric[2], 1.0f ); - else - m_metric = VEC4_CONST( 1.0f ); - - // initialise the best error - m_besterror = VEC4_CONST( FLT_MAX ); - - // cache some values - int const count = m_colours->GetCount(); - Vec3 const* values = m_colours->GetPoints(); - - // get the covariance matrix - Sym3x3 covariance = ComputeWeightedCovariance( count, values, m_colours->GetWeights() ); - - // compute the principle component - m_principle = ComputePrincipleComponent( covariance ); -} - -bool ClusterFit::ConstructOrdering( Vec3 const& axis, int iteration ) -{ - // cache some values - int const count = m_colours->GetCount(); - Vec3 const* values = m_colours->GetPoints(); - - // build the list of dot products - float dps[16]; - u8* order = ( u8* )m_order + 16*iteration; - for( int i = 0; i < count; ++i ) - { - dps[i] = Dot( values[i], axis ); - order[i] = ( u8 )i; - } - - // stable sort using them - for( int i = 0; i < count; ++i ) - { - for( int j = i; j > 0 && dps[j] < dps[j - 1]; --j ) - { - std::swap( dps[j], dps[j - 1] ); - std::swap( order[j], order[j - 1] ); - } - } - - // check this ordering is unique - for( int it = 0; it < iteration; ++it ) - { - u8 const* prev = ( u8* )m_order + 16*it; - bool same = true; - for( int i = 0; i < count; ++i ) - { - if( order[i] != prev[i] ) - { - same = false; - break; - } - } - if( same ) - return false; - } - - // copy the ordering and weight all the points - Vec3 const* unweighted = m_colours->GetPoints(); - float const* weights = m_colours->GetWeights(); - m_xsum_wsum = VEC4_CONST( 0.0f ); - for( int i = 0; i < count; ++i ) - { - int j = order[i]; - Vec4 p( unweighted[j].X(), unweighted[j].Y(), unweighted[j].Z(), 1.0f ); - Vec4 w( weights[j] ); - Vec4 x = p*w; - m_points_weights[i] = x; - m_xsum_wsum += x; - } - return true; -} - -void ClusterFit::Compress3( void* block ) -{ - // declare variables - int const count = m_colours->GetCount(); - Vec4 const two = VEC4_CONST( 2.0 ); - Vec4 const one = VEC4_CONST( 1.0f ); - Vec4 const half_half2( 0.5f, 0.5f, 0.5f, 0.25f ); - Vec4 const zero = VEC4_CONST( 0.0f ); - Vec4 const half = VEC4_CONST( 0.5f ); - Vec4 const grid( 31.0f, 63.0f, 31.0f, 0.0f ); - Vec4 const gridrcp( 1.0f/31.0f, 1.0f/63.0f, 1.0f/31.0f, 0.0f ); - - // prepare an ordering using the principle axis - ConstructOrdering( m_principle, 0 ); - - // check all possible clusters and iterate on the total order - Vec4 beststart = VEC4_CONST( 0.0f ); - Vec4 bestend = VEC4_CONST( 0.0f ); - Vec4 besterror = m_besterror; - u8 bestindices[16]; - int bestiteration = 0; - int besti = 0, bestj = 0; - - // loop over iterations (we avoid the case that all points in first or last cluster) - for( int iterationIndex = 0;; ) - { - // first cluster [0,i) is at the start - Vec4 part0 = VEC4_CONST( 0.0f ); - for( int i = 0; i < count; ++i ) - { - // second cluster [i,j) is half along - Vec4 part1 = ( i == 0 ) ? m_points_weights[0] : VEC4_CONST( 0.0f ); - int jmin = ( i == 0 ) ? 1 : i; - for( int j = jmin;; ) - { - // last cluster [j,count) is at the end - Vec4 part2 = m_xsum_wsum - part1 - part0; - - // compute least squares terms directly - Vec4 alphax_sum = MultiplyAdd( part1, half_half2, part0 ); - Vec4 alpha2_sum = alphax_sum.SplatW(); - - Vec4 betax_sum = MultiplyAdd( part1, half_half2, part2 ); - Vec4 beta2_sum = betax_sum.SplatW(); - - Vec4 alphabeta_sum = ( part1*half_half2 ).SplatW(); - - // compute the least-squares optimal points - Vec4 factor = Reciprocal( NegativeMultiplySubtract( alphabeta_sum, alphabeta_sum, alpha2_sum*beta2_sum ) ); - Vec4 a = NegativeMultiplySubtract( betax_sum, alphabeta_sum, alphax_sum*beta2_sum )*factor; - Vec4 b = NegativeMultiplySubtract( alphax_sum, alphabeta_sum, betax_sum*alpha2_sum )*factor; - - // clamp to the grid - a = Min( one, Max( zero, a ) ); - b = Min( one, Max( zero, b ) ); - a = Truncate( MultiplyAdd( grid, a, half ) )*gridrcp; - b = Truncate( MultiplyAdd( grid, b, half ) )*gridrcp; - - // compute the error (we skip the constant xxsum) - Vec4 e1 = MultiplyAdd( a*a, alpha2_sum, b*b*beta2_sum ); - Vec4 e2 = NegativeMultiplySubtract( a, alphax_sum, a*b*alphabeta_sum ); - Vec4 e3 = NegativeMultiplySubtract( b, betax_sum, e2 ); - Vec4 e4 = MultiplyAdd( two, e3, e1 ); - - // apply the metric to the error term - Vec4 e5 = e4*m_metric; - Vec4 error = e5.SplatX() + e5.SplatY() + e5.SplatZ(); - - // keep the solution if it wins - if( CompareAnyLessThan( error, besterror ) ) - { - beststart = a; - bestend = b; - besti = i; - bestj = j; - besterror = error; - bestiteration = iterationIndex; - } - - // advance - if( j == count ) - break; - part1 += m_points_weights[j]; - ++j; - } - - // advance - part0 += m_points_weights[i]; - } - - // stop if we didn't improve in this iteration - if( bestiteration != iterationIndex ) - break; - - // advance if possible - ++iterationIndex; - if( iterationIndex == m_iterationCount ) - break; - - // stop if a new iteration is an ordering that has already been tried - Vec3 axis = ( bestend - beststart ).GetVec3(); - if( !ConstructOrdering( axis, iterationIndex ) ) - break; - } - - // save the block if necessary - if( CompareAnyLessThan( besterror, m_besterror ) ) - { - // remap the indices - u8 const* order = ( u8* )m_order + 16*bestiteration; - - u8 unordered[16]; - for( int m = 0; m < besti; ++m ) - unordered[order[m]] = 0; - for( int m = besti; m < bestj; ++m ) - unordered[order[m]] = 2; - for( int m = bestj; m < count; ++m ) - unordered[order[m]] = 1; - - m_colours->RemapIndices( unordered, bestindices ); - - // save the block - WriteColourBlock3( beststart.GetVec3(), bestend.GetVec3(), bestindices, block ); - - // save the error - m_besterror = besterror; - } -} - -void ClusterFit::Compress4( void* block ) -{ - // declare variables - int const count = m_colours->GetCount(); - Vec4 const two = VEC4_CONST( 2.0f ); - Vec4 const one = VEC4_CONST( 1.0f ); - Vec4 const onethird_onethird2( 1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f, 1.0f/9.0f ); - Vec4 const twothirds_twothirds2( 2.0f/3.0f, 2.0f/3.0f, 2.0f/3.0f, 4.0f/9.0f ); - Vec4 const twonineths = VEC4_CONST( 2.0f/9.0f ); - Vec4 const zero = VEC4_CONST( 0.0f ); - Vec4 const half = VEC4_CONST( 0.5f ); - Vec4 const grid( 31.0f, 63.0f, 31.0f, 0.0f ); - Vec4 const gridrcp( 1.0f/31.0f, 1.0f/63.0f, 1.0f/31.0f, 0.0f ); - - // prepare an ordering using the principle axis - ConstructOrdering( m_principle, 0 ); - - // check all possible clusters and iterate on the total order - Vec4 beststart = VEC4_CONST( 0.0f ); - Vec4 bestend = VEC4_CONST( 0.0f ); - Vec4 besterror = m_besterror; - u8 bestindices[16]; - int bestiteration = 0; - int besti = 0, bestj = 0, bestk = 0; - - // loop over iterations (we avoid the case that all points in first or last cluster) - for( int iterationIndex = 0;; ) - { - // first cluster [0,i) is at the start - Vec4 part0 = VEC4_CONST( 0.0f ); - for( int i = 0; i < count; ++i ) - { - // second cluster [i,j) is one third along - Vec4 part1 = VEC4_CONST( 0.0f ); - for( int j = i;; ) - { - // third cluster [j,k) is two thirds along - Vec4 part2 = ( j == 0 ) ? m_points_weights[0] : VEC4_CONST( 0.0f ); - int kmin = ( j == 0 ) ? 1 : j; - for( int k = kmin;; ) - { - // last cluster [k,count) is at the end - Vec4 part3 = m_xsum_wsum - part2 - part1 - part0; - - // compute least squares terms directly - Vec4 const alphax_sum = MultiplyAdd( part2, onethird_onethird2, MultiplyAdd( part1, twothirds_twothirds2, part0 ) ); - Vec4 const alpha2_sum = alphax_sum.SplatW(); - - Vec4 const betax_sum = MultiplyAdd( part1, onethird_onethird2, MultiplyAdd( part2, twothirds_twothirds2, part3 ) ); - Vec4 const beta2_sum = betax_sum.SplatW(); - - Vec4 const alphabeta_sum = twonineths*( part1 + part2 ).SplatW(); - - // compute the least-squares optimal points - Vec4 factor = Reciprocal( NegativeMultiplySubtract( alphabeta_sum, alphabeta_sum, alpha2_sum*beta2_sum ) ); - Vec4 a = NegativeMultiplySubtract( betax_sum, alphabeta_sum, alphax_sum*beta2_sum )*factor; - Vec4 b = NegativeMultiplySubtract( alphax_sum, alphabeta_sum, betax_sum*alpha2_sum )*factor; - - // clamp to the grid - a = Min( one, Max( zero, a ) ); - b = Min( one, Max( zero, b ) ); - a = Truncate( MultiplyAdd( grid, a, half ) )*gridrcp; - b = Truncate( MultiplyAdd( grid, b, half ) )*gridrcp; - - // compute the error (we skip the constant xxsum) - Vec4 e1 = MultiplyAdd( a*a, alpha2_sum, b*b*beta2_sum ); - Vec4 e2 = NegativeMultiplySubtract( a, alphax_sum, a*b*alphabeta_sum ); - Vec4 e3 = NegativeMultiplySubtract( b, betax_sum, e2 ); - Vec4 e4 = MultiplyAdd( two, e3, e1 ); - - // apply the metric to the error term - Vec4 e5 = e4*m_metric; - Vec4 error = e5.SplatX() + e5.SplatY() + e5.SplatZ(); - - // keep the solution if it wins - if( CompareAnyLessThan( error, besterror ) ) - { - beststart = a; - bestend = b; - besterror = error; - besti = i; - bestj = j; - bestk = k; - bestiteration = iterationIndex; - } - - // advance - if( k == count ) - break; - part2 += m_points_weights[k]; - ++k; - } - - // advance - if( j == count ) - break; - part1 += m_points_weights[j]; - ++j; - } - - // advance - part0 += m_points_weights[i]; - } - - // stop if we didn't improve in this iteration - if( bestiteration != iterationIndex ) - break; - - // advance if possible - ++iterationIndex; - if( iterationIndex == m_iterationCount ) - break; - - // stop if a new iteration is an ordering that has already been tried - Vec3 axis = ( bestend - beststart ).GetVec3(); - if( !ConstructOrdering( axis, iterationIndex ) ) - break; - } - - // save the block if necessary - if( CompareAnyLessThan( besterror, m_besterror ) ) - { - // remap the indices - u8 const* order = ( u8* )m_order + 16*bestiteration; - - u8 unordered[16]; - for( int m = 0; m < besti; ++m ) - unordered[order[m]] = 0; - for( int m = besti; m < bestj; ++m ) - unordered[order[m]] = 2; - for( int m = bestj; m < bestk; ++m ) - unordered[order[m]] = 3; - for( int m = bestk; m < count; ++m ) - unordered[order[m]] = 1; - - m_colours->RemapIndices( unordered, bestindices ); - - // save the block - WriteColourBlock4( beststart.GetVec3(), bestend.GetVec3(), bestindices, block ); - - // save the error - m_besterror = besterror; - } -} - -} // namespace squish diff --git a/3rdparty/bgfx/3rdparty/libsquish/clusterfit.h b/3rdparty/bgfx/3rdparty/libsquish/clusterfit.h deleted file mode 100644 index c882469..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/clusterfit.h +++ /dev/null @@ -1,61 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Copyright (c) 2007 Ignacio Castano icastano@nvidia.com - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_CLUSTERFIT_H -#define SQUISH_CLUSTERFIT_H - -#include "squish.h" -#include "maths.h" -#include "simd.h" -#include "colourfit.h" - -namespace squish { - -class ClusterFit : public ColourFit -{ -public: - ClusterFit( ColourSet const* colours, int flags, float* metric ); - -private: - bool ConstructOrdering( Vec3 const& axis, int iteration ); - - virtual void Compress3( void* block ); - virtual void Compress4( void* block ); - - enum { kMaxIterations = 8 }; - - int m_iterationCount; - Vec3 m_principle; - u8 m_order[16*kMaxIterations]; - Vec4 m_points_weights[16]; - Vec4 m_xsum_wsum; - Vec4 m_metric; - Vec4 m_besterror; -}; - -} // namespace squish - -#endif // ndef SQUISH_CLUSTERFIT_H diff --git a/3rdparty/bgfx/3rdparty/libsquish/colourblock.cpp b/3rdparty/bgfx/3rdparty/libsquish/colourblock.cpp deleted file mode 100644 index e6a5788..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/colourblock.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#include "colourblock.h" - -namespace squish { - -static int FloatToInt( float a, int limit ) -{ - // use ANSI round-to-zero behaviour to get round-to-nearest - int i = ( int )( a + 0.5f ); - - // clamp to the limit - if( i < 0 ) - i = 0; - else if( i > limit ) - i = limit; - - // done - return i; -} - -static int FloatTo565( Vec3::Arg colour ) -{ - // get the components in the correct range - int r = FloatToInt( 31.0f*colour.X(), 31 ); - int g = FloatToInt( 63.0f*colour.Y(), 63 ); - int b = FloatToInt( 31.0f*colour.Z(), 31 ); - - // pack into a single value - return ( r << 11 ) | ( g << 5 ) | b; -} - -static void WriteColourBlock( int a, int b, u8* indices, void* block ) -{ - // get the block as bytes - u8* bytes = ( u8* )block; - - // write the endpoints - bytes[0] = ( u8 )( a & 0xff ); - bytes[1] = ( u8 )( a >> 8 ); - bytes[2] = ( u8 )( b & 0xff ); - bytes[3] = ( u8 )( b >> 8 ); - - // write the indices - for( int i = 0; i < 4; ++i ) - { - u8 const* ind = indices + 4*i; - bytes[4 + i] = ind[0] | ( ind[1] << 2 ) | ( ind[2] << 4 ) | ( ind[3] << 6 ); - } -} - -void WriteColourBlock3( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* block ) -{ - // get the packed values - int a = FloatTo565( start ); - int b = FloatTo565( end ); - - // remap the indices - u8 remapped[16]; - if( a <= b ) - { - // use the indices directly - for( int i = 0; i < 16; ++i ) - remapped[i] = indices[i]; - } - else - { - // swap a and b - std::swap( a, b ); - for( int i = 0; i < 16; ++i ) - { - if( indices[i] == 0 ) - remapped[i] = 1; - else if( indices[i] == 1 ) - remapped[i] = 0; - else - remapped[i] = indices[i]; - } - } - - // write the block - WriteColourBlock( a, b, remapped, block ); -} - -void WriteColourBlock4( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* block ) -{ - // get the packed values - int a = FloatTo565( start ); - int b = FloatTo565( end ); - - // remap the indices - u8 remapped[16]; - if( a < b ) - { - // swap a and b - std::swap( a, b ); - for( int i = 0; i < 16; ++i ) - remapped[i] = ( indices[i] ^ 0x1 ) & 0x3; - } - else if( a == b ) - { - // use index 0 - for( int i = 0; i < 16; ++i ) - remapped[i] = 0; - } - else - { - // use the indices directly - for( int i = 0; i < 16; ++i ) - remapped[i] = indices[i]; - } - - // write the block - WriteColourBlock( a, b, remapped, block ); -} - -static int Unpack565( u8 const* packed, u8* colour ) -{ - // build the packed value - int value = ( int )packed[0] | ( ( int )packed[1] << 8 ); - - // get the components in the stored range - u8 red = ( u8 )( ( value >> 11 ) & 0x1f ); - u8 green = ( u8 )( ( value >> 5 ) & 0x3f ); - u8 blue = ( u8 )( value & 0x1f ); - - // scale up to 8 bits - colour[0] = ( red << 3 ) | ( red >> 2 ); - colour[1] = ( green << 2 ) | ( green >> 4 ); - colour[2] = ( blue << 3 ) | ( blue >> 2 ); - colour[3] = 255; - - // return the value - return value; -} - -void DecompressColour( u8* rgba, void const* block, bool isDxt1 ) -{ - // get the block bytes - u8 const* bytes = reinterpret_cast< u8 const* >( block ); - - // unpack the endpoints - u8 codes[16]; - int a = Unpack565( bytes, codes ); - int b = Unpack565( bytes + 2, codes + 4 ); - - // generate the midpoints - for( int i = 0; i < 3; ++i ) - { - int c = codes[i]; - int d = codes[4 + i]; - - if( isDxt1 && a <= b ) - { - codes[8 + i] = ( u8 )( ( c + d )/2 ); - codes[12 + i] = 0; - } - else - { - codes[8 + i] = ( u8 )( ( 2*c + d )/3 ); - codes[12 + i] = ( u8 )( ( c + 2*d )/3 ); - } - } - - // fill in alpha for the intermediate values - codes[8 + 3] = 255; - codes[12 + 3] = ( isDxt1 && a <= b ) ? 0 : 255; - - // unpack the indices - u8 indices[16]; - for( int i = 0; i < 4; ++i ) - { - u8* ind = indices + 4*i; - u8 packed = bytes[4 + i]; - - ind[0] = packed & 0x3; - ind[1] = ( packed >> 2 ) & 0x3; - ind[2] = ( packed >> 4 ) & 0x3; - ind[3] = ( packed >> 6 ) & 0x3; - } - - // store out the colours - for( int i = 0; i < 16; ++i ) - { - u8 offset = 4*indices[i]; - for( int j = 0; j < 4; ++j ) - rgba[4*i + j] = codes[offset + j]; - } -} - -} // namespace squish diff --git a/3rdparty/bgfx/3rdparty/libsquish/colourblock.h b/3rdparty/bgfx/3rdparty/libsquish/colourblock.h deleted file mode 100644 index 2562561..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/colourblock.h +++ /dev/null @@ -1,41 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_COLOURBLOCK_H -#define SQUISH_COLOURBLOCK_H - -#include "squish.h" -#include "maths.h" - -namespace squish { - -void WriteColourBlock3( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* block ); -void WriteColourBlock4( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* block ); - -void DecompressColour( u8* rgba, void const* block, bool isDxt1 ); - -} // namespace squish - -#endif // ndef SQUISH_COLOURBLOCK_H diff --git a/3rdparty/bgfx/3rdparty/libsquish/colourfit.cpp b/3rdparty/bgfx/3rdparty/libsquish/colourfit.cpp deleted file mode 100644 index 11efa46..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/colourfit.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#include "colourfit.h" -#include "colourset.h" - -namespace squish { - -ColourFit::ColourFit( ColourSet const* colours, int flags ) - : m_colours( colours ), - m_flags( flags ) -{ -} - -ColourFit::~ColourFit() -{ -} - -void ColourFit::Compress( void* block ) -{ - bool isDxt1 = ( ( m_flags & kDxt1 ) != 0 ); - if( isDxt1 ) - { - Compress3( block ); - if( !m_colours->IsTransparent() ) - Compress4( block ); - } - else - Compress4( block ); -} - -} // namespace squish diff --git a/3rdparty/bgfx/3rdparty/libsquish/colourfit.h b/3rdparty/bgfx/3rdparty/libsquish/colourfit.h deleted file mode 100644 index 7593223..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/colourfit.h +++ /dev/null @@ -1,56 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_COLOURFIT_H -#define SQUISH_COLOURFIT_H - -#include "squish.h" -#include "maths.h" - -#include - -namespace squish { - -class ColourSet; - -class ColourFit -{ -public: - ColourFit( ColourSet const* colours, int flags ); - virtual ~ColourFit(); - - void Compress( void* block ); - -protected: - virtual void Compress3( void* block ) = 0; - virtual void Compress4( void* block ) = 0; - - ColourSet const* m_colours; - int m_flags; -}; - -} // namespace squish - -#endif // ndef SQUISH_COLOURFIT_H diff --git a/3rdparty/bgfx/3rdparty/libsquish/colourset.cpp b/3rdparty/bgfx/3rdparty/libsquish/colourset.cpp deleted file mode 100644 index 97d29d9..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/colourset.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#include "colourset.h" - -namespace squish { - -ColourSet::ColourSet( u8 const* rgba, int mask, int flags ) - : m_count( 0 ), - m_transparent( false ) -{ - // check the compression mode for dxt1 - bool isDxt1 = ( ( flags & kDxt1 ) != 0 ); - bool weightByAlpha = ( ( flags & kWeightColourByAlpha ) != 0 ); - - // create the minimal set - for( int i = 0; i < 16; ++i ) - { - // check this pixel is enabled - int bit = 1 << i; - if( ( mask & bit ) == 0 ) - { - m_remap[i] = -1; - continue; - } - - // check for transparent pixels when using dxt1 - if( isDxt1 && rgba[4*i + 3] < 128 ) - { - m_remap[i] = -1; - m_transparent = true; - continue; - } - - // loop over previous points for a match - for( int j = 0;; ++j ) - { - // allocate a new point - if( j == i ) - { - // normalise coordinates to [0,1] - float x = ( float )rgba[4*i] / 255.0f; - float y = ( float )rgba[4*i + 1] / 255.0f; - float z = ( float )rgba[4*i + 2] / 255.0f; - - // ensure there is always non-zero weight even for zero alpha - float w = ( float )( rgba[4*i + 3] + 1 ) / 256.0f; - - // add the point - m_points[m_count] = Vec3( x, y, z ); - m_weights[m_count] = ( weightByAlpha ? w : 1.0f ); - m_remap[i] = m_count; - - // advance - ++m_count; - break; - } - - // check for a match - int oldbit = 1 << j; - bool match = ( ( mask & oldbit ) != 0 ) - && ( rgba[4*i] == rgba[4*j] ) - && ( rgba[4*i + 1] == rgba[4*j + 1] ) - && ( rgba[4*i + 2] == rgba[4*j + 2] ) - && ( rgba[4*j + 3] >= 128 || !isDxt1 ); - if( match ) - { - // get the index of the match - int index = m_remap[j]; - - // ensure there is always non-zero weight even for zero alpha - float w = ( float )( rgba[4*i + 3] + 1 ) / 256.0f; - - // map to this point and increase the weight - m_weights[index] += ( weightByAlpha ? w : 1.0f ); - m_remap[i] = index; - break; - } - } - } - - // square root the weights - for( int i = 0; i < m_count; ++i ) - m_weights[i] = std::sqrt( m_weights[i] ); -} - -void ColourSet::RemapIndices( u8 const* source, u8* target ) const -{ - for( int i = 0; i < 16; ++i ) - { - int j = m_remap[i]; - if( j == -1 ) - target[i] = 3; - else - target[i] = source[j]; - } -} - -} // namespace squish diff --git a/3rdparty/bgfx/3rdparty/libsquish/colourset.h b/3rdparty/bgfx/3rdparty/libsquish/colourset.h deleted file mode 100644 index 0c66fe4..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/colourset.h +++ /dev/null @@ -1,58 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_COLOURSET_H -#define SQUISH_COLOURSET_H - -#include "squish.h" -#include "maths.h" - -namespace squish { - -/*! @brief Represents a set of block colours -*/ -class ColourSet -{ -public: - ColourSet( u8 const* rgba, int mask, int flags ); - - int GetCount() const { return m_count; } - Vec3 const* GetPoints() const { return m_points; } - float const* GetWeights() const { return m_weights; } - bool IsTransparent() const { return m_transparent; } - - void RemapIndices( u8 const* source, u8* target ) const; - -private: - int m_count; - Vec3 m_points[16]; - float m_weights[16]; - int m_remap[16]; - bool m_transparent; -}; - -} // namespace sqish - -#endif // ndef SQUISH_COLOURSET_H diff --git a/3rdparty/bgfx/3rdparty/libsquish/config.h b/3rdparty/bgfx/3rdparty/libsquish/config.h deleted file mode 100644 index 2fad557..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/config.h +++ /dev/null @@ -1,49 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_CONFIG_H -#define SQUISH_CONFIG_H - -// Set to 1 when building squish to use Altivec instructions. -#ifndef SQUISH_USE_ALTIVEC -#define SQUISH_USE_ALTIVEC 0 -#endif - -// Set to 1 or 2 when building squish to use SSE or SSE2 instructions. -#ifndef SQUISH_USE_SSE -#define SQUISH_USE_SSE 0 -#endif - -// Internally set SQUISH_USE_SIMD when either Altivec or SSE is available. -#if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE -#error "Cannot enable both Altivec and SSE!" -#endif -#if SQUISH_USE_ALTIVEC || SQUISH_USE_SSE -#define SQUISH_USE_SIMD 1 -#else -#define SQUISH_USE_SIMD 0 -#endif - -#endif // ndef SQUISH_CONFIG_H diff --git a/3rdparty/bgfx/3rdparty/libsquish/maths.cpp b/3rdparty/bgfx/3rdparty/libsquish/maths.cpp deleted file mode 100644 index 9af4197..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/maths.cpp +++ /dev/null @@ -1,259 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -/*! @file - - The symmetric eigensystem solver algorithm is from - http://www.geometrictools.com/Documentation/EigenSymmetric3x3.pdf -*/ - -#include "maths.h" -#include "simd.h" -#include - -namespace squish { - -Sym3x3 ComputeWeightedCovariance( int n, Vec3 const* points, float const* weights ) -{ - // compute the centroid - float total = 0.0f; - Vec3 centroid( 0.0f ); - for( int i = 0; i < n; ++i ) - { - total += weights[i]; - centroid += weights[i]*points[i]; - } - if( total > FLT_EPSILON ) - centroid /= total; - - // accumulate the covariance matrix - Sym3x3 covariance( 0.0f ); - for( int i = 0; i < n; ++i ) - { - Vec3 a = points[i] - centroid; - Vec3 b = weights[i]*a; - - covariance[0] += a.X()*b.X(); - covariance[1] += a.X()*b.Y(); - covariance[2] += a.X()*b.Z(); - covariance[3] += a.Y()*b.Y(); - covariance[4] += a.Y()*b.Z(); - covariance[5] += a.Z()*b.Z(); - } - - // return it - return covariance; -} - -#if 0 - -static Vec3 GetMultiplicity1Evector( Sym3x3 const& matrix, float evalue ) -{ - // compute M - Sym3x3 m; - m[0] = matrix[0] - evalue; - m[1] = matrix[1]; - m[2] = matrix[2]; - m[3] = matrix[3] - evalue; - m[4] = matrix[4]; - m[5] = matrix[5] - evalue; - - // compute U - Sym3x3 u; - u[0] = m[3]*m[5] - m[4]*m[4]; - u[1] = m[2]*m[4] - m[1]*m[5]; - u[2] = m[1]*m[4] - m[2]*m[3]; - u[3] = m[0]*m[5] - m[2]*m[2]; - u[4] = m[1]*m[2] - m[4]*m[0]; - u[5] = m[0]*m[3] - m[1]*m[1]; - - // find the largest component - float mc = std::fabs( u[0] ); - int mi = 0; - for( int i = 1; i < 6; ++i ) - { - float c = std::fabs( u[i] ); - if( c > mc ) - { - mc = c; - mi = i; - } - } - - // pick the column with this component - switch( mi ) - { - case 0: - return Vec3( u[0], u[1], u[2] ); - - case 1: - case 3: - return Vec3( u[1], u[3], u[4] ); - - default: - return Vec3( u[2], u[4], u[5] ); - } -} - -static Vec3 GetMultiplicity2Evector( Sym3x3 const& matrix, float evalue ) -{ - // compute M - Sym3x3 m; - m[0] = matrix[0] - evalue; - m[1] = matrix[1]; - m[2] = matrix[2]; - m[3] = matrix[3] - evalue; - m[4] = matrix[4]; - m[5] = matrix[5] - evalue; - - // find the largest component - float mc = std::fabs( m[0] ); - int mi = 0; - for( int i = 1; i < 6; ++i ) - { - float c = std::fabs( m[i] ); - if( c > mc ) - { - mc = c; - mi = i; - } - } - - // pick the first eigenvector based on this index - switch( mi ) - { - case 0: - case 1: - return Vec3( -m[1], m[0], 0.0f ); - - case 2: - return Vec3( m[2], 0.0f, -m[0] ); - - case 3: - case 4: - return Vec3( 0.0f, -m[4], m[3] ); - - default: - return Vec3( 0.0f, -m[5], m[4] ); - } -} - -Vec3 ComputePrincipleComponent( Sym3x3 const& matrix ) -{ - // compute the cubic coefficients - float c0 = matrix[0]*matrix[3]*matrix[5] - + 2.0f*matrix[1]*matrix[2]*matrix[4] - - matrix[0]*matrix[4]*matrix[4] - - matrix[3]*matrix[2]*matrix[2] - - matrix[5]*matrix[1]*matrix[1]; - float c1 = matrix[0]*matrix[3] + matrix[0]*matrix[5] + matrix[3]*matrix[5] - - matrix[1]*matrix[1] - matrix[2]*matrix[2] - matrix[4]*matrix[4]; - float c2 = matrix[0] + matrix[3] + matrix[5]; - - // compute the quadratic coefficients - float a = c1 - ( 1.0f/3.0f )*c2*c2; - float b = ( -2.0f/27.0f )*c2*c2*c2 + ( 1.0f/3.0f )*c1*c2 - c0; - - // compute the root count check - float Q = 0.25f*b*b + ( 1.0f/27.0f )*a*a*a; - - // test the multiplicity - if( FLT_EPSILON < Q ) - { - // only one root, which implies we have a multiple of the identity - return Vec3( 1.0f ); - } - else if( Q < -FLT_EPSILON ) - { - // three distinct roots - float theta = std::atan2( std::sqrt( -Q ), -0.5f*b ); - float rho = std::sqrt( 0.25f*b*b - Q ); - - float rt = std::pow( rho, 1.0f/3.0f ); - float ct = std::cos( theta/3.0f ); - float st = std::sin( theta/3.0f ); - - float l1 = ( 1.0f/3.0f )*c2 + 2.0f*rt*ct; - float l2 = ( 1.0f/3.0f )*c2 - rt*( ct + ( float )sqrt( 3.0f )*st ); - float l3 = ( 1.0f/3.0f )*c2 - rt*( ct - ( float )sqrt( 3.0f )*st ); - - // pick the larger - if( std::fabs( l2 ) > std::fabs( l1 ) ) - l1 = l2; - if( std::fabs( l3 ) > std::fabs( l1 ) ) - l1 = l3; - - // get the eigenvector - return GetMultiplicity1Evector( matrix, l1 ); - } - else // if( -FLT_EPSILON <= Q && Q <= FLT_EPSILON ) - { - // two roots - float rt; - if( b < 0.0f ) - rt = -std::pow( -0.5f*b, 1.0f/3.0f ); - else - rt = std::pow( 0.5f*b, 1.0f/3.0f ); - - float l1 = ( 1.0f/3.0f )*c2 + rt; // repeated - float l2 = ( 1.0f/3.0f )*c2 - 2.0f*rt; - - // get the eigenvector - if( std::fabs( l1 ) > std::fabs( l2 ) ) - return GetMultiplicity2Evector( matrix, l1 ); - else - return GetMultiplicity1Evector( matrix, l2 ); - } -} - -#else - -#define POWER_ITERATION_COUNT 8 - -Vec3 ComputePrincipleComponent( Sym3x3 const& matrix ) -{ - Vec4 const row0( matrix[0], matrix[1], matrix[2], 0.0f ); - Vec4 const row1( matrix[1], matrix[3], matrix[4], 0.0f ); - Vec4 const row2( matrix[2], matrix[4], matrix[5], 0.0f ); - Vec4 v = VEC4_CONST( 1.0f ); - for( int i = 0; i < POWER_ITERATION_COUNT; ++i ) - { - // matrix multiply - Vec4 w = row0*v.SplatX(); - w = MultiplyAdd(row1, v.SplatY(), w); - w = MultiplyAdd(row2, v.SplatZ(), w); - - // get max component from xyz in all channels - Vec4 a = Max(w.SplatX(), Max(w.SplatY(), w.SplatZ())); - - // divide through and advance - v = w*Reciprocal(a); - } - return v.GetVec3(); -} - -#endif - -} // namespace squish diff --git a/3rdparty/bgfx/3rdparty/libsquish/maths.h b/3rdparty/bgfx/3rdparty/libsquish/maths.h deleted file mode 100644 index 769ae46..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/maths.h +++ /dev/null @@ -1,233 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_MATHS_H -#define SQUISH_MATHS_H - -#include -#include -#include "config.h" - -namespace squish { - -class Vec3 -{ -public: - typedef Vec3 const& Arg; - - Vec3() - { - } - - explicit Vec3( float s ) - { - m_x = s; - m_y = s; - m_z = s; - } - - Vec3( float x, float y, float z ) - { - m_x = x; - m_y = y; - m_z = z; - } - - float X() const { return m_x; } - float Y() const { return m_y; } - float Z() const { return m_z; } - - Vec3 operator-() const - { - return Vec3( -m_x, -m_y, -m_z ); - } - - Vec3& operator+=( Arg v ) - { - m_x += v.m_x; - m_y += v.m_y; - m_z += v.m_z; - return *this; - } - - Vec3& operator-=( Arg v ) - { - m_x -= v.m_x; - m_y -= v.m_y; - m_z -= v.m_z; - return *this; - } - - Vec3& operator*=( Arg v ) - { - m_x *= v.m_x; - m_y *= v.m_y; - m_z *= v.m_z; - return *this; - } - - Vec3& operator*=( float s ) - { - m_x *= s; - m_y *= s; - m_z *= s; - return *this; - } - - Vec3& operator/=( Arg v ) - { - m_x /= v.m_x; - m_y /= v.m_y; - m_z /= v.m_z; - return *this; - } - - Vec3& operator/=( float s ) - { - float t = 1.0f/s; - m_x *= t; - m_y *= t; - m_z *= t; - return *this; - } - - friend Vec3 operator+( Arg left, Arg right ) - { - Vec3 copy( left ); - return copy += right; - } - - friend Vec3 operator-( Arg left, Arg right ) - { - Vec3 copy( left ); - return copy -= right; - } - - friend Vec3 operator*( Arg left, Arg right ) - { - Vec3 copy( left ); - return copy *= right; - } - - friend Vec3 operator*( Arg left, float right ) - { - Vec3 copy( left ); - return copy *= right; - } - - friend Vec3 operator*( float left, Arg right ) - { - Vec3 copy( right ); - return copy *= left; - } - - friend Vec3 operator/( Arg left, Arg right ) - { - Vec3 copy( left ); - return copy /= right; - } - - friend Vec3 operator/( Arg left, float right ) - { - Vec3 copy( left ); - return copy /= right; - } - - friend float Dot( Arg left, Arg right ) - { - return left.m_x*right.m_x + left.m_y*right.m_y + left.m_z*right.m_z; - } - - friend Vec3 Min( Arg left, Arg right ) - { - return Vec3( - std::min( left.m_x, right.m_x ), - std::min( left.m_y, right.m_y ), - std::min( left.m_z, right.m_z ) - ); - } - - friend Vec3 Max( Arg left, Arg right ) - { - return Vec3( - std::max( left.m_x, right.m_x ), - std::max( left.m_y, right.m_y ), - std::max( left.m_z, right.m_z ) - ); - } - - friend Vec3 Truncate( Arg v ) - { - return Vec3( - v.m_x > 0.0f ? std::floor( v.m_x ) : std::ceil( v.m_x ), - v.m_y > 0.0f ? std::floor( v.m_y ) : std::ceil( v.m_y ), - v.m_z > 0.0f ? std::floor( v.m_z ) : std::ceil( v.m_z ) - ); - } - -private: - float m_x; - float m_y; - float m_z; -}; - -inline float LengthSquared( Vec3::Arg v ) -{ - return Dot( v, v ); -} - -class Sym3x3 -{ -public: - Sym3x3() - { - } - - Sym3x3( float s ) - { - for( int i = 0; i < 6; ++i ) - m_x[i] = s; - } - - float operator[]( int index ) const - { - return m_x[index]; - } - - float& operator[]( int index ) - { - return m_x[index]; - } - -private: - float m_x[6]; -}; - -Sym3x3 ComputeWeightedCovariance( int n, Vec3 const* points, float const* weights ); -Vec3 ComputePrincipleComponent( Sym3x3 const& matrix ); - -} // namespace squish - -#endif // ndef SQUISH_MATHS_H diff --git a/3rdparty/bgfx/3rdparty/libsquish/rangefit.cpp b/3rdparty/bgfx/3rdparty/libsquish/rangefit.cpp deleted file mode 100644 index 3fca124..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/rangefit.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#include "rangefit.h" -#include "colourset.h" -#include "colourblock.h" -#include - -namespace squish { - -RangeFit::RangeFit( ColourSet const* colours, int flags, float* metric ) - : ColourFit( colours, flags ) -{ - // initialise the metric (old perceptual = 0.2126f, 0.7152f, 0.0722f) - if( metric ) - m_metric = Vec3( metric[0], metric[1], metric[2] ); - else - m_metric = Vec3( 1.0f ); - - // initialise the best error - m_besterror = FLT_MAX; - - // cache some values - int const count = m_colours->GetCount(); - Vec3 const* values = m_colours->GetPoints(); - float const* weights = m_colours->GetWeights(); - - // get the covariance matrix - Sym3x3 covariance = ComputeWeightedCovariance( count, values, weights ); - - // compute the principle component - Vec3 principle = ComputePrincipleComponent( covariance ); - - // get the min and max range as the codebook endpoints - Vec3 start( 0.0f ); - Vec3 end( 0.0f ); - if( count > 0 ) - { - float min, max; - - // compute the range - start = end = values[0]; - min = max = Dot( values[0], principle ); - for( int i = 1; i < count; ++i ) - { - float val = Dot( values[i], principle ); - if( val < min ) - { - start = values[i]; - min = val; - } - else if( val > max ) - { - end = values[i]; - max = val; - } - } - } - - // clamp the output to [0, 1] - Vec3 const one( 1.0f ); - Vec3 const zero( 0.0f ); - start = Min( one, Max( zero, start ) ); - end = Min( one, Max( zero, end ) ); - - // clamp to the grid and save - Vec3 const grid( 31.0f, 63.0f, 31.0f ); - Vec3 const gridrcp( 1.0f/31.0f, 1.0f/63.0f, 1.0f/31.0f ); - Vec3 const half( 0.5f ); - m_start = Truncate( grid*start + half )*gridrcp; - m_end = Truncate( grid*end + half )*gridrcp; -} - -void RangeFit::Compress3( void* block ) -{ - // cache some values - int const count = m_colours->GetCount(); - Vec3 const* values = m_colours->GetPoints(); - - // create a codebook - Vec3 codes[3]; - codes[0] = m_start; - codes[1] = m_end; - codes[2] = 0.5f*m_start + 0.5f*m_end; - - // match each point to the closest code - u8 closest[16]; - float error = 0.0f; - for( int i = 0; i < count; ++i ) - { - // find the closest code - float dist = FLT_MAX; - int idx = 0; - for( int j = 0; j < 3; ++j ) - { - float d = LengthSquared( m_metric*( values[i] - codes[j] ) ); - if( d < dist ) - { - dist = d; - idx = j; - } - } - - // save the index - closest[i] = ( u8 )idx; - - // accumulate the error - error += dist; - } - - // save this scheme if it wins - if( error < m_besterror ) - { - // remap the indices - u8 indices[16]; - m_colours->RemapIndices( closest, indices ); - - // save the block - WriteColourBlock3( m_start, m_end, indices, block ); - - // save the error - m_besterror = error; - } -} - -void RangeFit::Compress4( void* block ) -{ - // cache some values - int const count = m_colours->GetCount(); - Vec3 const* values = m_colours->GetPoints(); - - // create a codebook - Vec3 codes[4]; - codes[0] = m_start; - codes[1] = m_end; - codes[2] = ( 2.0f/3.0f )*m_start + ( 1.0f/3.0f )*m_end; - codes[3] = ( 1.0f/3.0f )*m_start + ( 2.0f/3.0f )*m_end; - - // match each point to the closest code - u8 closest[16]; - float error = 0.0f; - for( int i = 0; i < count; ++i ) - { - // find the closest code - float dist = FLT_MAX; - int idx = 0; - for( int j = 0; j < 4; ++j ) - { - float d = LengthSquared( m_metric*( values[i] - codes[j] ) ); - if( d < dist ) - { - dist = d; - idx = j; - } - } - - // save the index - closest[i] = ( u8 )idx; - - // accumulate the error - error += dist; - } - - // save this scheme if it wins - if( error < m_besterror ) - { - // remap the indices - u8 indices[16]; - m_colours->RemapIndices( closest, indices ); - - // save the block - WriteColourBlock4( m_start, m_end, indices, block ); - - // save the error - m_besterror = error; - } -} - -} // namespace squish diff --git a/3rdparty/bgfx/3rdparty/libsquish/rangefit.h b/3rdparty/bgfx/3rdparty/libsquish/rangefit.h deleted file mode 100644 index e293bdc..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/rangefit.h +++ /dev/null @@ -1,54 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_RANGEFIT_H -#define SQUISH_RANGEFIT_H - -#include "squish.h" -#include "colourfit.h" -#include "maths.h" - -namespace squish { - -class ColourSet; - -class RangeFit : public ColourFit -{ -public: - RangeFit( ColourSet const* colours, int flags, float* metric ); - -private: - virtual void Compress3( void* block ); - virtual void Compress4( void* block ); - - Vec3 m_metric; - Vec3 m_start; - Vec3 m_end; - float m_besterror; -}; - -} // squish - -#endif // ndef SQUISH_RANGEFIT_H diff --git a/3rdparty/bgfx/3rdparty/libsquish/simd.h b/3rdparty/bgfx/3rdparty/libsquish/simd.h deleted file mode 100644 index 92965e0..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/simd.h +++ /dev/null @@ -1,32 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_SIMD_H -#define SQUISH_SIMD_H - -#include "maths.h" -#include "simd_float.h" - -#endif // ndef SQUISH_SIMD_H diff --git a/3rdparty/bgfx/3rdparty/libsquish/simd_float.h b/3rdparty/bgfx/3rdparty/libsquish/simd_float.h deleted file mode 100644 index e6351b8..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/simd_float.h +++ /dev/null @@ -1,183 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_SIMD_FLOAT_H -#define SQUISH_SIMD_FLOAT_H - -#include - -namespace squish { - -#define VEC4_CONST( X ) Vec4( X ) - -class Vec4 -{ -public: - typedef Vec4 const& Arg; - - Vec4() {} - - explicit Vec4( float s ) - : m_x( s ), - m_y( s ), - m_z( s ), - m_w( s ) - { - } - - Vec4( float x, float y, float z, float w ) - : m_x( x ), - m_y( y ), - m_z( z ), - m_w( w ) - { - } - - Vec3 GetVec3() const - { - return Vec3( m_x, m_y, m_z ); - } - - Vec4 SplatX() const { return Vec4( m_x ); } - Vec4 SplatY() const { return Vec4( m_y ); } - Vec4 SplatZ() const { return Vec4( m_z ); } - Vec4 SplatW() const { return Vec4( m_w ); } - - Vec4& operator+=( Arg v ) - { - m_x += v.m_x; - m_y += v.m_y; - m_z += v.m_z; - m_w += v.m_w; - return *this; - } - - Vec4& operator-=( Arg v ) - { - m_x -= v.m_x; - m_y -= v.m_y; - m_z -= v.m_z; - m_w -= v.m_w; - return *this; - } - - Vec4& operator*=( Arg v ) - { - m_x *= v.m_x; - m_y *= v.m_y; - m_z *= v.m_z; - m_w *= v.m_w; - return *this; - } - - friend Vec4 operator+( Vec4::Arg left, Vec4::Arg right ) - { - Vec4 copy( left ); - return copy += right; - } - - friend Vec4 operator-( Vec4::Arg left, Vec4::Arg right ) - { - Vec4 copy( left ); - return copy -= right; - } - - friend Vec4 operator*( Vec4::Arg left, Vec4::Arg right ) - { - Vec4 copy( left ); - return copy *= right; - } - - //! Returns a*b + c - friend Vec4 MultiplyAdd( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return a*b + c; - } - - //! Returns -( a*b - c ) - friend Vec4 NegativeMultiplySubtract( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return c - a*b; - } - - friend Vec4 Reciprocal( Vec4::Arg v ) - { - return Vec4( - 1.0f/v.m_x, - 1.0f/v.m_y, - 1.0f/v.m_z, - 1.0f/v.m_w - ); - } - - friend Vec4 Min( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( - std::min( left.m_x, right.m_x ), - std::min( left.m_y, right.m_y ), - std::min( left.m_z, right.m_z ), - std::min( left.m_w, right.m_w ) - ); - } - - friend Vec4 Max( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( - std::max( left.m_x, right.m_x ), - std::max( left.m_y, right.m_y ), - std::max( left.m_z, right.m_z ), - std::max( left.m_w, right.m_w ) - ); - } - - friend Vec4 Truncate( Vec4::Arg v ) - { - return Vec4( - v.m_x > 0.0f ? std::floor( v.m_x ) : std::ceil( v.m_x ), - v.m_y > 0.0f ? std::floor( v.m_y ) : std::ceil( v.m_y ), - v.m_z > 0.0f ? std::floor( v.m_z ) : std::ceil( v.m_z ), - v.m_w > 0.0f ? std::floor( v.m_w ) : std::ceil( v.m_w ) - ); - } - - friend bool CompareAnyLessThan( Vec4::Arg left, Vec4::Arg right ) - { - return left.m_x < right.m_x - || left.m_y < right.m_y - || left.m_z < right.m_z - || left.m_w < right.m_w; - } - -private: - float m_x; - float m_y; - float m_z; - float m_w; -}; - -} // namespace squish - -#endif // ndef SQUISH_SIMD_FLOAT_H - diff --git a/3rdparty/bgfx/3rdparty/libsquish/singlecolourfit.cpp b/3rdparty/bgfx/3rdparty/libsquish/singlecolourfit.cpp deleted file mode 100644 index e8a0117..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/singlecolourfit.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#include "singlecolourfit.h" -#include "colourset.h" -#include "colourblock.h" - -namespace squish { - -struct SourceBlock -{ - u8 start; - u8 end; - u8 error; -}; - -struct SingleColourLookup -{ - SourceBlock sources[2]; -}; - -#include "singlecolourlookup.inl" - -static int FloatToInt( float a, int limit ) -{ - // use ANSI round-to-zero behaviour to get round-to-nearest - int i = ( int )( a + 0.5f ); - - // clamp to the limit - if( i < 0 ) - i = 0; - else if( i > limit ) - i = limit; - - // done - return i; -} - -SingleColourFit::SingleColourFit( ColourSet const* colours, int flags ) - : ColourFit( colours, flags ) -{ - // grab the single colour - Vec3 const* values = m_colours->GetPoints(); - m_colour[0] = ( u8 )FloatToInt( 255.0f*values->X(), 255 ); - m_colour[1] = ( u8 )FloatToInt( 255.0f*values->Y(), 255 ); - m_colour[2] = ( u8 )FloatToInt( 255.0f*values->Z(), 255 ); - - // initialise the best error - m_besterror = INT_MAX; -} - -void SingleColourFit::Compress3( void* block ) -{ - // build the table of lookups - SingleColourLookup const* const lookups[] = - { - lookup_5_3, - lookup_6_3, - lookup_5_3 - }; - - // find the best end-points and index - ComputeEndPoints( lookups ); - - // build the block if we win - if( m_error < m_besterror ) - { - // remap the indices - u8 indices[16]; - m_colours->RemapIndices( &m_index, indices ); - - // save the block - WriteColourBlock3( m_start, m_end, indices, block ); - - // save the error - m_besterror = m_error; - } -} - -void SingleColourFit::Compress4( void* block ) -{ - // build the table of lookups - SingleColourLookup const* const lookups[] = - { - lookup_5_4, - lookup_6_4, - lookup_5_4 - }; - - // find the best end-points and index - ComputeEndPoints( lookups ); - - // build the block if we win - if( m_error < m_besterror ) - { - // remap the indices - u8 indices[16]; - m_colours->RemapIndices( &m_index, indices ); - - // save the block - WriteColourBlock4( m_start, m_end, indices, block ); - - // save the error - m_besterror = m_error; - } -} - -void SingleColourFit::ComputeEndPoints( SingleColourLookup const* const* lookups ) -{ - // check each index combination (endpoint or intermediate) - m_error = INT_MAX; - for( int index = 0; index < 2; ++index ) - { - // check the error for this codebook index - SourceBlock const* sources[3]; - int error = 0; - for( int channel = 0; channel < 3; ++channel ) - { - // grab the lookup table and index for this channel - SingleColourLookup const* lookup = lookups[channel]; - int target = m_colour[channel]; - - // store a pointer to the source for this channel - sources[channel] = lookup[target].sources + index; - - // accumulate the error - int diff = sources[channel]->error; - error += diff*diff; - } - - // keep it if the error is lower - if( error < m_error ) - { - m_start = Vec3( - ( float )sources[0]->start/31.0f, - ( float )sources[1]->start/63.0f, - ( float )sources[2]->start/31.0f - ); - m_end = Vec3( - ( float )sources[0]->end/31.0f, - ( float )sources[1]->end/63.0f, - ( float )sources[2]->end/31.0f - ); - m_index = ( u8 )( 2*index ); - m_error = error; - } - } -} - -} // namespace squish diff --git a/3rdparty/bgfx/3rdparty/libsquish/singlecolourfit.h b/3rdparty/bgfx/3rdparty/libsquish/singlecolourfit.h deleted file mode 100644 index 54ec17e..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/singlecolourfit.h +++ /dev/null @@ -1,58 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_SINGLECOLOURFIT_H -#define SQUISH_SINGLECOLOURFIT_H - -#include "squish.h" -#include "colourfit.h" - -namespace squish { - -class ColourSet; -struct SingleColourLookup; - -class SingleColourFit : public ColourFit -{ -public: - SingleColourFit( ColourSet const* colours, int flags ); - -private: - virtual void Compress3( void* block ); - virtual void Compress4( void* block ); - - void ComputeEndPoints( SingleColourLookup const* const* lookups ); - - u8 m_colour[3]; - Vec3 m_start; - Vec3 m_end; - u8 m_index; - int m_error; - int m_besterror; -}; - -} // namespace squish - -#endif // ndef SQUISH_SINGLECOLOURFIT_H diff --git a/3rdparty/bgfx/3rdparty/libsquish/singlecolourlookup.inl b/3rdparty/bgfx/3rdparty/libsquish/singlecolourlookup.inl deleted file mode 100644 index 5e91174..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/singlecolourlookup.inl +++ /dev/null @@ -1,1064 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -static SingleColourLookup const lookup_5_3[] = -{ - { { { 0, 0, 0 }, { 0, 0, 0 } } }, - { { { 0, 0, 1 }, { 0, 0, 1 } } }, - { { { 0, 0, 2 }, { 0, 0, 2 } } }, - { { { 0, 0, 3 }, { 0, 1, 1 } } }, - { { { 0, 0, 4 }, { 0, 1, 0 } } }, - { { { 1, 0, 3 }, { 0, 1, 1 } } }, - { { { 1, 0, 2 }, { 0, 1, 2 } } }, - { { { 1, 0, 1 }, { 0, 2, 1 } } }, - { { { 1, 0, 0 }, { 0, 2, 0 } } }, - { { { 1, 0, 1 }, { 0, 2, 1 } } }, - { { { 1, 0, 2 }, { 0, 2, 2 } } }, - { { { 1, 0, 3 }, { 0, 3, 1 } } }, - { { { 1, 0, 4 }, { 0, 3, 0 } } }, - { { { 2, 0, 3 }, { 0, 3, 1 } } }, - { { { 2, 0, 2 }, { 0, 3, 2 } } }, - { { { 2, 0, 1 }, { 0, 4, 1 } } }, - { { { 2, 0, 0 }, { 0, 4, 0 } } }, - { { { 2, 0, 1 }, { 0, 4, 1 } } }, - { { { 2, 0, 2 }, { 0, 4, 2 } } }, - { { { 2, 0, 3 }, { 0, 5, 1 } } }, - { { { 2, 0, 4 }, { 0, 5, 0 } } }, - { { { 3, 0, 3 }, { 0, 5, 1 } } }, - { { { 3, 0, 2 }, { 0, 5, 2 } } }, - { { { 3, 0, 1 }, { 0, 6, 1 } } }, - { { { 3, 0, 0 }, { 0, 6, 0 } } }, - { { { 3, 0, 1 }, { 0, 6, 1 } } }, - { { { 3, 0, 2 }, { 0, 6, 2 } } }, - { { { 3, 0, 3 }, { 0, 7, 1 } } }, - { { { 3, 0, 4 }, { 0, 7, 0 } } }, - { { { 4, 0, 4 }, { 0, 7, 1 } } }, - { { { 4, 0, 3 }, { 0, 7, 2 } } }, - { { { 4, 0, 2 }, { 1, 7, 1 } } }, - { { { 4, 0, 1 }, { 1, 7, 0 } } }, - { { { 4, 0, 0 }, { 0, 8, 0 } } }, - { { { 4, 0, 1 }, { 0, 8, 1 } } }, - { { { 4, 0, 2 }, { 2, 7, 1 } } }, - { { { 4, 0, 3 }, { 2, 7, 0 } } }, - { { { 4, 0, 4 }, { 0, 9, 0 } } }, - { { { 5, 0, 3 }, { 0, 9, 1 } } }, - { { { 5, 0, 2 }, { 3, 7, 1 } } }, - { { { 5, 0, 1 }, { 3, 7, 0 } } }, - { { { 5, 0, 0 }, { 0, 10, 0 } } }, - { { { 5, 0, 1 }, { 0, 10, 1 } } }, - { { { 5, 0, 2 }, { 0, 10, 2 } } }, - { { { 5, 0, 3 }, { 0, 11, 1 } } }, - { { { 5, 0, 4 }, { 0, 11, 0 } } }, - { { { 6, 0, 3 }, { 0, 11, 1 } } }, - { { { 6, 0, 2 }, { 0, 11, 2 } } }, - { { { 6, 0, 1 }, { 0, 12, 1 } } }, - { { { 6, 0, 0 }, { 0, 12, 0 } } }, - { { { 6, 0, 1 }, { 0, 12, 1 } } }, - { { { 6, 0, 2 }, { 0, 12, 2 } } }, - { { { 6, 0, 3 }, { 0, 13, 1 } } }, - { { { 6, 0, 4 }, { 0, 13, 0 } } }, - { { { 7, 0, 3 }, { 0, 13, 1 } } }, - { { { 7, 0, 2 }, { 0, 13, 2 } } }, - { { { 7, 0, 1 }, { 0, 14, 1 } } }, - { { { 7, 0, 0 }, { 0, 14, 0 } } }, - { { { 7, 0, 1 }, { 0, 14, 1 } } }, - { { { 7, 0, 2 }, { 0, 14, 2 } } }, - { { { 7, 0, 3 }, { 0, 15, 1 } } }, - { { { 7, 0, 4 }, { 0, 15, 0 } } }, - { { { 8, 0, 4 }, { 0, 15, 1 } } }, - { { { 8, 0, 3 }, { 0, 15, 2 } } }, - { { { 8, 0, 2 }, { 1, 15, 1 } } }, - { { { 8, 0, 1 }, { 1, 15, 0 } } }, - { { { 8, 0, 0 }, { 0, 16, 0 } } }, - { { { 8, 0, 1 }, { 0, 16, 1 } } }, - { { { 8, 0, 2 }, { 2, 15, 1 } } }, - { { { 8, 0, 3 }, { 2, 15, 0 } } }, - { { { 8, 0, 4 }, { 0, 17, 0 } } }, - { { { 9, 0, 3 }, { 0, 17, 1 } } }, - { { { 9, 0, 2 }, { 3, 15, 1 } } }, - { { { 9, 0, 1 }, { 3, 15, 0 } } }, - { { { 9, 0, 0 }, { 0, 18, 0 } } }, - { { { 9, 0, 1 }, { 0, 18, 1 } } }, - { { { 9, 0, 2 }, { 0, 18, 2 } } }, - { { { 9, 0, 3 }, { 0, 19, 1 } } }, - { { { 9, 0, 4 }, { 0, 19, 0 } } }, - { { { 10, 0, 3 }, { 0, 19, 1 } } }, - { { { 10, 0, 2 }, { 0, 19, 2 } } }, - { { { 10, 0, 1 }, { 0, 20, 1 } } }, - { { { 10, 0, 0 }, { 0, 20, 0 } } }, - { { { 10, 0, 1 }, { 0, 20, 1 } } }, - { { { 10, 0, 2 }, { 0, 20, 2 } } }, - { { { 10, 0, 3 }, { 0, 21, 1 } } }, - { { { 10, 0, 4 }, { 0, 21, 0 } } }, - { { { 11, 0, 3 }, { 0, 21, 1 } } }, - { { { 11, 0, 2 }, { 0, 21, 2 } } }, - { { { 11, 0, 1 }, { 0, 22, 1 } } }, - { { { 11, 0, 0 }, { 0, 22, 0 } } }, - { { { 11, 0, 1 }, { 0, 22, 1 } } }, - { { { 11, 0, 2 }, { 0, 22, 2 } } }, - { { { 11, 0, 3 }, { 0, 23, 1 } } }, - { { { 11, 0, 4 }, { 0, 23, 0 } } }, - { { { 12, 0, 4 }, { 0, 23, 1 } } }, - { { { 12, 0, 3 }, { 0, 23, 2 } } }, - { { { 12, 0, 2 }, { 1, 23, 1 } } }, - { { { 12, 0, 1 }, { 1, 23, 0 } } }, - { { { 12, 0, 0 }, { 0, 24, 0 } } }, - { { { 12, 0, 1 }, { 0, 24, 1 } } }, - { { { 12, 0, 2 }, { 2, 23, 1 } } }, - { { { 12, 0, 3 }, { 2, 23, 0 } } }, - { { { 12, 0, 4 }, { 0, 25, 0 } } }, - { { { 13, 0, 3 }, { 0, 25, 1 } } }, - { { { 13, 0, 2 }, { 3, 23, 1 } } }, - { { { 13, 0, 1 }, { 3, 23, 0 } } }, - { { { 13, 0, 0 }, { 0, 26, 0 } } }, - { { { 13, 0, 1 }, { 0, 26, 1 } } }, - { { { 13, 0, 2 }, { 0, 26, 2 } } }, - { { { 13, 0, 3 }, { 0, 27, 1 } } }, - { { { 13, 0, 4 }, { 0, 27, 0 } } }, - { { { 14, 0, 3 }, { 0, 27, 1 } } }, - { { { 14, 0, 2 }, { 0, 27, 2 } } }, - { { { 14, 0, 1 }, { 0, 28, 1 } } }, - { { { 14, 0, 0 }, { 0, 28, 0 } } }, - { { { 14, 0, 1 }, { 0, 28, 1 } } }, - { { { 14, 0, 2 }, { 0, 28, 2 } } }, - { { { 14, 0, 3 }, { 0, 29, 1 } } }, - { { { 14, 0, 4 }, { 0, 29, 0 } } }, - { { { 15, 0, 3 }, { 0, 29, 1 } } }, - { { { 15, 0, 2 }, { 0, 29, 2 } } }, - { { { 15, 0, 1 }, { 0, 30, 1 } } }, - { { { 15, 0, 0 }, { 0, 30, 0 } } }, - { { { 15, 0, 1 }, { 0, 30, 1 } } }, - { { { 15, 0, 2 }, { 0, 30, 2 } } }, - { { { 15, 0, 3 }, { 0, 31, 1 } } }, - { { { 15, 0, 4 }, { 0, 31, 0 } } }, - { { { 16, 0, 4 }, { 0, 31, 1 } } }, - { { { 16, 0, 3 }, { 0, 31, 2 } } }, - { { { 16, 0, 2 }, { 1, 31, 1 } } }, - { { { 16, 0, 1 }, { 1, 31, 0 } } }, - { { { 16, 0, 0 }, { 4, 28, 0 } } }, - { { { 16, 0, 1 }, { 4, 28, 1 } } }, - { { { 16, 0, 2 }, { 2, 31, 1 } } }, - { { { 16, 0, 3 }, { 2, 31, 0 } } }, - { { { 16, 0, 4 }, { 4, 29, 0 } } }, - { { { 17, 0, 3 }, { 4, 29, 1 } } }, - { { { 17, 0, 2 }, { 3, 31, 1 } } }, - { { { 17, 0, 1 }, { 3, 31, 0 } } }, - { { { 17, 0, 0 }, { 4, 30, 0 } } }, - { { { 17, 0, 1 }, { 4, 30, 1 } } }, - { { { 17, 0, 2 }, { 4, 30, 2 } } }, - { { { 17, 0, 3 }, { 4, 31, 1 } } }, - { { { 17, 0, 4 }, { 4, 31, 0 } } }, - { { { 18, 0, 3 }, { 4, 31, 1 } } }, - { { { 18, 0, 2 }, { 4, 31, 2 } } }, - { { { 18, 0, 1 }, { 5, 31, 1 } } }, - { { { 18, 0, 0 }, { 5, 31, 0 } } }, - { { { 18, 0, 1 }, { 5, 31, 1 } } }, - { { { 18, 0, 2 }, { 5, 31, 2 } } }, - { { { 18, 0, 3 }, { 6, 31, 1 } } }, - { { { 18, 0, 4 }, { 6, 31, 0 } } }, - { { { 19, 0, 3 }, { 6, 31, 1 } } }, - { { { 19, 0, 2 }, { 6, 31, 2 } } }, - { { { 19, 0, 1 }, { 7, 31, 1 } } }, - { { { 19, 0, 0 }, { 7, 31, 0 } } }, - { { { 19, 0, 1 }, { 7, 31, 1 } } }, - { { { 19, 0, 2 }, { 7, 31, 2 } } }, - { { { 19, 0, 3 }, { 8, 31, 1 } } }, - { { { 19, 0, 4 }, { 8, 31, 0 } } }, - { { { 20, 0, 4 }, { 8, 31, 1 } } }, - { { { 20, 0, 3 }, { 8, 31, 2 } } }, - { { { 20, 0, 2 }, { 9, 31, 1 } } }, - { { { 20, 0, 1 }, { 9, 31, 0 } } }, - { { { 20, 0, 0 }, { 12, 28, 0 } } }, - { { { 20, 0, 1 }, { 12, 28, 1 } } }, - { { { 20, 0, 2 }, { 10, 31, 1 } } }, - { { { 20, 0, 3 }, { 10, 31, 0 } } }, - { { { 20, 0, 4 }, { 12, 29, 0 } } }, - { { { 21, 0, 3 }, { 12, 29, 1 } } }, - { { { 21, 0, 2 }, { 11, 31, 1 } } }, - { { { 21, 0, 1 }, { 11, 31, 0 } } }, - { { { 21, 0, 0 }, { 12, 30, 0 } } }, - { { { 21, 0, 1 }, { 12, 30, 1 } } }, - { { { 21, 0, 2 }, { 12, 30, 2 } } }, - { { { 21, 0, 3 }, { 12, 31, 1 } } }, - { { { 21, 0, 4 }, { 12, 31, 0 } } }, - { { { 22, 0, 3 }, { 12, 31, 1 } } }, - { { { 22, 0, 2 }, { 12, 31, 2 } } }, - { { { 22, 0, 1 }, { 13, 31, 1 } } }, - { { { 22, 0, 0 }, { 13, 31, 0 } } }, - { { { 22, 0, 1 }, { 13, 31, 1 } } }, - { { { 22, 0, 2 }, { 13, 31, 2 } } }, - { { { 22, 0, 3 }, { 14, 31, 1 } } }, - { { { 22, 0, 4 }, { 14, 31, 0 } } }, - { { { 23, 0, 3 }, { 14, 31, 1 } } }, - { { { 23, 0, 2 }, { 14, 31, 2 } } }, - { { { 23, 0, 1 }, { 15, 31, 1 } } }, - { { { 23, 0, 0 }, { 15, 31, 0 } } }, - { { { 23, 0, 1 }, { 15, 31, 1 } } }, - { { { 23, 0, 2 }, { 15, 31, 2 } } }, - { { { 23, 0, 3 }, { 16, 31, 1 } } }, - { { { 23, 0, 4 }, { 16, 31, 0 } } }, - { { { 24, 0, 4 }, { 16, 31, 1 } } }, - { { { 24, 0, 3 }, { 16, 31, 2 } } }, - { { { 24, 0, 2 }, { 17, 31, 1 } } }, - { { { 24, 0, 1 }, { 17, 31, 0 } } }, - { { { 24, 0, 0 }, { 20, 28, 0 } } }, - { { { 24, 0, 1 }, { 20, 28, 1 } } }, - { { { 24, 0, 2 }, { 18, 31, 1 } } }, - { { { 24, 0, 3 }, { 18, 31, 0 } } }, - { { { 24, 0, 4 }, { 20, 29, 0 } } }, - { { { 25, 0, 3 }, { 20, 29, 1 } } }, - { { { 25, 0, 2 }, { 19, 31, 1 } } }, - { { { 25, 0, 1 }, { 19, 31, 0 } } }, - { { { 25, 0, 0 }, { 20, 30, 0 } } }, - { { { 25, 0, 1 }, { 20, 30, 1 } } }, - { { { 25, 0, 2 }, { 20, 30, 2 } } }, - { { { 25, 0, 3 }, { 20, 31, 1 } } }, - { { { 25, 0, 4 }, { 20, 31, 0 } } }, - { { { 26, 0, 3 }, { 20, 31, 1 } } }, - { { { 26, 0, 2 }, { 20, 31, 2 } } }, - { { { 26, 0, 1 }, { 21, 31, 1 } } }, - { { { 26, 0, 0 }, { 21, 31, 0 } } }, - { { { 26, 0, 1 }, { 21, 31, 1 } } }, - { { { 26, 0, 2 }, { 21, 31, 2 } } }, - { { { 26, 0, 3 }, { 22, 31, 1 } } }, - { { { 26, 0, 4 }, { 22, 31, 0 } } }, - { { { 27, 0, 3 }, { 22, 31, 1 } } }, - { { { 27, 0, 2 }, { 22, 31, 2 } } }, - { { { 27, 0, 1 }, { 23, 31, 1 } } }, - { { { 27, 0, 0 }, { 23, 31, 0 } } }, - { { { 27, 0, 1 }, { 23, 31, 1 } } }, - { { { 27, 0, 2 }, { 23, 31, 2 } } }, - { { { 27, 0, 3 }, { 24, 31, 1 } } }, - { { { 27, 0, 4 }, { 24, 31, 0 } } }, - { { { 28, 0, 4 }, { 24, 31, 1 } } }, - { { { 28, 0, 3 }, { 24, 31, 2 } } }, - { { { 28, 0, 2 }, { 25, 31, 1 } } }, - { { { 28, 0, 1 }, { 25, 31, 0 } } }, - { { { 28, 0, 0 }, { 28, 28, 0 } } }, - { { { 28, 0, 1 }, { 28, 28, 1 } } }, - { { { 28, 0, 2 }, { 26, 31, 1 } } }, - { { { 28, 0, 3 }, { 26, 31, 0 } } }, - { { { 28, 0, 4 }, { 28, 29, 0 } } }, - { { { 29, 0, 3 }, { 28, 29, 1 } } }, - { { { 29, 0, 2 }, { 27, 31, 1 } } }, - { { { 29, 0, 1 }, { 27, 31, 0 } } }, - { { { 29, 0, 0 }, { 28, 30, 0 } } }, - { { { 29, 0, 1 }, { 28, 30, 1 } } }, - { { { 29, 0, 2 }, { 28, 30, 2 } } }, - { { { 29, 0, 3 }, { 28, 31, 1 } } }, - { { { 29, 0, 4 }, { 28, 31, 0 } } }, - { { { 30, 0, 3 }, { 28, 31, 1 } } }, - { { { 30, 0, 2 }, { 28, 31, 2 } } }, - { { { 30, 0, 1 }, { 29, 31, 1 } } }, - { { { 30, 0, 0 }, { 29, 31, 0 } } }, - { { { 30, 0, 1 }, { 29, 31, 1 } } }, - { { { 30, 0, 2 }, { 29, 31, 2 } } }, - { { { 30, 0, 3 }, { 30, 31, 1 } } }, - { { { 30, 0, 4 }, { 30, 31, 0 } } }, - { { { 31, 0, 3 }, { 30, 31, 1 } } }, - { { { 31, 0, 2 }, { 30, 31, 2 } } }, - { { { 31, 0, 1 }, { 31, 31, 1 } } }, - { { { 31, 0, 0 }, { 31, 31, 0 } } } -}; - -static SingleColourLookup const lookup_6_3[] = -{ - { { { 0, 0, 0 }, { 0, 0, 0 } } }, - { { { 0, 0, 1 }, { 0, 1, 1 } } }, - { { { 0, 0, 2 }, { 0, 1, 0 } } }, - { { { 1, 0, 1 }, { 0, 2, 1 } } }, - { { { 1, 0, 0 }, { 0, 2, 0 } } }, - { { { 1, 0, 1 }, { 0, 3, 1 } } }, - { { { 1, 0, 2 }, { 0, 3, 0 } } }, - { { { 2, 0, 1 }, { 0, 4, 1 } } }, - { { { 2, 0, 0 }, { 0, 4, 0 } } }, - { { { 2, 0, 1 }, { 0, 5, 1 } } }, - { { { 2, 0, 2 }, { 0, 5, 0 } } }, - { { { 3, 0, 1 }, { 0, 6, 1 } } }, - { { { 3, 0, 0 }, { 0, 6, 0 } } }, - { { { 3, 0, 1 }, { 0, 7, 1 } } }, - { { { 3, 0, 2 }, { 0, 7, 0 } } }, - { { { 4, 0, 1 }, { 0, 8, 1 } } }, - { { { 4, 0, 0 }, { 0, 8, 0 } } }, - { { { 4, 0, 1 }, { 0, 9, 1 } } }, - { { { 4, 0, 2 }, { 0, 9, 0 } } }, - { { { 5, 0, 1 }, { 0, 10, 1 } } }, - { { { 5, 0, 0 }, { 0, 10, 0 } } }, - { { { 5, 0, 1 }, { 0, 11, 1 } } }, - { { { 5, 0, 2 }, { 0, 11, 0 } } }, - { { { 6, 0, 1 }, { 0, 12, 1 } } }, - { { { 6, 0, 0 }, { 0, 12, 0 } } }, - { { { 6, 0, 1 }, { 0, 13, 1 } } }, - { { { 6, 0, 2 }, { 0, 13, 0 } } }, - { { { 7, 0, 1 }, { 0, 14, 1 } } }, - { { { 7, 0, 0 }, { 0, 14, 0 } } }, - { { { 7, 0, 1 }, { 0, 15, 1 } } }, - { { { 7, 0, 2 }, { 0, 15, 0 } } }, - { { { 8, 0, 1 }, { 0, 16, 1 } } }, - { { { 8, 0, 0 }, { 0, 16, 0 } } }, - { { { 8, 0, 1 }, { 0, 17, 1 } } }, - { { { 8, 0, 2 }, { 0, 17, 0 } } }, - { { { 9, 0, 1 }, { 0, 18, 1 } } }, - { { { 9, 0, 0 }, { 0, 18, 0 } } }, - { { { 9, 0, 1 }, { 0, 19, 1 } } }, - { { { 9, 0, 2 }, { 0, 19, 0 } } }, - { { { 10, 0, 1 }, { 0, 20, 1 } } }, - { { { 10, 0, 0 }, { 0, 20, 0 } } }, - { { { 10, 0, 1 }, { 0, 21, 1 } } }, - { { { 10, 0, 2 }, { 0, 21, 0 } } }, - { { { 11, 0, 1 }, { 0, 22, 1 } } }, - { { { 11, 0, 0 }, { 0, 22, 0 } } }, - { { { 11, 0, 1 }, { 0, 23, 1 } } }, - { { { 11, 0, 2 }, { 0, 23, 0 } } }, - { { { 12, 0, 1 }, { 0, 24, 1 } } }, - { { { 12, 0, 0 }, { 0, 24, 0 } } }, - { { { 12, 0, 1 }, { 0, 25, 1 } } }, - { { { 12, 0, 2 }, { 0, 25, 0 } } }, - { { { 13, 0, 1 }, { 0, 26, 1 } } }, - { { { 13, 0, 0 }, { 0, 26, 0 } } }, - { { { 13, 0, 1 }, { 0, 27, 1 } } }, - { { { 13, 0, 2 }, { 0, 27, 0 } } }, - { { { 14, 0, 1 }, { 0, 28, 1 } } }, - { { { 14, 0, 0 }, { 0, 28, 0 } } }, - { { { 14, 0, 1 }, { 0, 29, 1 } } }, - { { { 14, 0, 2 }, { 0, 29, 0 } } }, - { { { 15, 0, 1 }, { 0, 30, 1 } } }, - { { { 15, 0, 0 }, { 0, 30, 0 } } }, - { { { 15, 0, 1 }, { 0, 31, 1 } } }, - { { { 15, 0, 2 }, { 0, 31, 0 } } }, - { { { 16, 0, 2 }, { 1, 31, 1 } } }, - { { { 16, 0, 1 }, { 1, 31, 0 } } }, - { { { 16, 0, 0 }, { 0, 32, 0 } } }, - { { { 16, 0, 1 }, { 2, 31, 0 } } }, - { { { 16, 0, 2 }, { 0, 33, 0 } } }, - { { { 17, 0, 1 }, { 3, 31, 0 } } }, - { { { 17, 0, 0 }, { 0, 34, 0 } } }, - { { { 17, 0, 1 }, { 4, 31, 0 } } }, - { { { 17, 0, 2 }, { 0, 35, 0 } } }, - { { { 18, 0, 1 }, { 5, 31, 0 } } }, - { { { 18, 0, 0 }, { 0, 36, 0 } } }, - { { { 18, 0, 1 }, { 6, 31, 0 } } }, - { { { 18, 0, 2 }, { 0, 37, 0 } } }, - { { { 19, 0, 1 }, { 7, 31, 0 } } }, - { { { 19, 0, 0 }, { 0, 38, 0 } } }, - { { { 19, 0, 1 }, { 8, 31, 0 } } }, - { { { 19, 0, 2 }, { 0, 39, 0 } } }, - { { { 20, 0, 1 }, { 9, 31, 0 } } }, - { { { 20, 0, 0 }, { 0, 40, 0 } } }, - { { { 20, 0, 1 }, { 10, 31, 0 } } }, - { { { 20, 0, 2 }, { 0, 41, 0 } } }, - { { { 21, 0, 1 }, { 11, 31, 0 } } }, - { { { 21, 0, 0 }, { 0, 42, 0 } } }, - { { { 21, 0, 1 }, { 12, 31, 0 } } }, - { { { 21, 0, 2 }, { 0, 43, 0 } } }, - { { { 22, 0, 1 }, { 13, 31, 0 } } }, - { { { 22, 0, 0 }, { 0, 44, 0 } } }, - { { { 22, 0, 1 }, { 14, 31, 0 } } }, - { { { 22, 0, 2 }, { 0, 45, 0 } } }, - { { { 23, 0, 1 }, { 15, 31, 0 } } }, - { { { 23, 0, 0 }, { 0, 46, 0 } } }, - { { { 23, 0, 1 }, { 0, 47, 1 } } }, - { { { 23, 0, 2 }, { 0, 47, 0 } } }, - { { { 24, 0, 1 }, { 0, 48, 1 } } }, - { { { 24, 0, 0 }, { 0, 48, 0 } } }, - { { { 24, 0, 1 }, { 0, 49, 1 } } }, - { { { 24, 0, 2 }, { 0, 49, 0 } } }, - { { { 25, 0, 1 }, { 0, 50, 1 } } }, - { { { 25, 0, 0 }, { 0, 50, 0 } } }, - { { { 25, 0, 1 }, { 0, 51, 1 } } }, - { { { 25, 0, 2 }, { 0, 51, 0 } } }, - { { { 26, 0, 1 }, { 0, 52, 1 } } }, - { { { 26, 0, 0 }, { 0, 52, 0 } } }, - { { { 26, 0, 1 }, { 0, 53, 1 } } }, - { { { 26, 0, 2 }, { 0, 53, 0 } } }, - { { { 27, 0, 1 }, { 0, 54, 1 } } }, - { { { 27, 0, 0 }, { 0, 54, 0 } } }, - { { { 27, 0, 1 }, { 0, 55, 1 } } }, - { { { 27, 0, 2 }, { 0, 55, 0 } } }, - { { { 28, 0, 1 }, { 0, 56, 1 } } }, - { { { 28, 0, 0 }, { 0, 56, 0 } } }, - { { { 28, 0, 1 }, { 0, 57, 1 } } }, - { { { 28, 0, 2 }, { 0, 57, 0 } } }, - { { { 29, 0, 1 }, { 0, 58, 1 } } }, - { { { 29, 0, 0 }, { 0, 58, 0 } } }, - { { { 29, 0, 1 }, { 0, 59, 1 } } }, - { { { 29, 0, 2 }, { 0, 59, 0 } } }, - { { { 30, 0, 1 }, { 0, 60, 1 } } }, - { { { 30, 0, 0 }, { 0, 60, 0 } } }, - { { { 30, 0, 1 }, { 0, 61, 1 } } }, - { { { 30, 0, 2 }, { 0, 61, 0 } } }, - { { { 31, 0, 1 }, { 0, 62, 1 } } }, - { { { 31, 0, 0 }, { 0, 62, 0 } } }, - { { { 31, 0, 1 }, { 0, 63, 1 } } }, - { { { 31, 0, 2 }, { 0, 63, 0 } } }, - { { { 32, 0, 2 }, { 1, 63, 1 } } }, - { { { 32, 0, 1 }, { 1, 63, 0 } } }, - { { { 32, 0, 0 }, { 16, 48, 0 } } }, - { { { 32, 0, 1 }, { 2, 63, 0 } } }, - { { { 32, 0, 2 }, { 16, 49, 0 } } }, - { { { 33, 0, 1 }, { 3, 63, 0 } } }, - { { { 33, 0, 0 }, { 16, 50, 0 } } }, - { { { 33, 0, 1 }, { 4, 63, 0 } } }, - { { { 33, 0, 2 }, { 16, 51, 0 } } }, - { { { 34, 0, 1 }, { 5, 63, 0 } } }, - { { { 34, 0, 0 }, { 16, 52, 0 } } }, - { { { 34, 0, 1 }, { 6, 63, 0 } } }, - { { { 34, 0, 2 }, { 16, 53, 0 } } }, - { { { 35, 0, 1 }, { 7, 63, 0 } } }, - { { { 35, 0, 0 }, { 16, 54, 0 } } }, - { { { 35, 0, 1 }, { 8, 63, 0 } } }, - { { { 35, 0, 2 }, { 16, 55, 0 } } }, - { { { 36, 0, 1 }, { 9, 63, 0 } } }, - { { { 36, 0, 0 }, { 16, 56, 0 } } }, - { { { 36, 0, 1 }, { 10, 63, 0 } } }, - { { { 36, 0, 2 }, { 16, 57, 0 } } }, - { { { 37, 0, 1 }, { 11, 63, 0 } } }, - { { { 37, 0, 0 }, { 16, 58, 0 } } }, - { { { 37, 0, 1 }, { 12, 63, 0 } } }, - { { { 37, 0, 2 }, { 16, 59, 0 } } }, - { { { 38, 0, 1 }, { 13, 63, 0 } } }, - { { { 38, 0, 0 }, { 16, 60, 0 } } }, - { { { 38, 0, 1 }, { 14, 63, 0 } } }, - { { { 38, 0, 2 }, { 16, 61, 0 } } }, - { { { 39, 0, 1 }, { 15, 63, 0 } } }, - { { { 39, 0, 0 }, { 16, 62, 0 } } }, - { { { 39, 0, 1 }, { 16, 63, 1 } } }, - { { { 39, 0, 2 }, { 16, 63, 0 } } }, - { { { 40, 0, 1 }, { 17, 63, 1 } } }, - { { { 40, 0, 0 }, { 17, 63, 0 } } }, - { { { 40, 0, 1 }, { 18, 63, 1 } } }, - { { { 40, 0, 2 }, { 18, 63, 0 } } }, - { { { 41, 0, 1 }, { 19, 63, 1 } } }, - { { { 41, 0, 0 }, { 19, 63, 0 } } }, - { { { 41, 0, 1 }, { 20, 63, 1 } } }, - { { { 41, 0, 2 }, { 20, 63, 0 } } }, - { { { 42, 0, 1 }, { 21, 63, 1 } } }, - { { { 42, 0, 0 }, { 21, 63, 0 } } }, - { { { 42, 0, 1 }, { 22, 63, 1 } } }, - { { { 42, 0, 2 }, { 22, 63, 0 } } }, - { { { 43, 0, 1 }, { 23, 63, 1 } } }, - { { { 43, 0, 0 }, { 23, 63, 0 } } }, - { { { 43, 0, 1 }, { 24, 63, 1 } } }, - { { { 43, 0, 2 }, { 24, 63, 0 } } }, - { { { 44, 0, 1 }, { 25, 63, 1 } } }, - { { { 44, 0, 0 }, { 25, 63, 0 } } }, - { { { 44, 0, 1 }, { 26, 63, 1 } } }, - { { { 44, 0, 2 }, { 26, 63, 0 } } }, - { { { 45, 0, 1 }, { 27, 63, 1 } } }, - { { { 45, 0, 0 }, { 27, 63, 0 } } }, - { { { 45, 0, 1 }, { 28, 63, 1 } } }, - { { { 45, 0, 2 }, { 28, 63, 0 } } }, - { { { 46, 0, 1 }, { 29, 63, 1 } } }, - { { { 46, 0, 0 }, { 29, 63, 0 } } }, - { { { 46, 0, 1 }, { 30, 63, 1 } } }, - { { { 46, 0, 2 }, { 30, 63, 0 } } }, - { { { 47, 0, 1 }, { 31, 63, 1 } } }, - { { { 47, 0, 0 }, { 31, 63, 0 } } }, - { { { 47, 0, 1 }, { 32, 63, 1 } } }, - { { { 47, 0, 2 }, { 32, 63, 0 } } }, - { { { 48, 0, 2 }, { 33, 63, 1 } } }, - { { { 48, 0, 1 }, { 33, 63, 0 } } }, - { { { 48, 0, 0 }, { 48, 48, 0 } } }, - { { { 48, 0, 1 }, { 34, 63, 0 } } }, - { { { 48, 0, 2 }, { 48, 49, 0 } } }, - { { { 49, 0, 1 }, { 35, 63, 0 } } }, - { { { 49, 0, 0 }, { 48, 50, 0 } } }, - { { { 49, 0, 1 }, { 36, 63, 0 } } }, - { { { 49, 0, 2 }, { 48, 51, 0 } } }, - { { { 50, 0, 1 }, { 37, 63, 0 } } }, - { { { 50, 0, 0 }, { 48, 52, 0 } } }, - { { { 50, 0, 1 }, { 38, 63, 0 } } }, - { { { 50, 0, 2 }, { 48, 53, 0 } } }, - { { { 51, 0, 1 }, { 39, 63, 0 } } }, - { { { 51, 0, 0 }, { 48, 54, 0 } } }, - { { { 51, 0, 1 }, { 40, 63, 0 } } }, - { { { 51, 0, 2 }, { 48, 55, 0 } } }, - { { { 52, 0, 1 }, { 41, 63, 0 } } }, - { { { 52, 0, 0 }, { 48, 56, 0 } } }, - { { { 52, 0, 1 }, { 42, 63, 0 } } }, - { { { 52, 0, 2 }, { 48, 57, 0 } } }, - { { { 53, 0, 1 }, { 43, 63, 0 } } }, - { { { 53, 0, 0 }, { 48, 58, 0 } } }, - { { { 53, 0, 1 }, { 44, 63, 0 } } }, - { { { 53, 0, 2 }, { 48, 59, 0 } } }, - { { { 54, 0, 1 }, { 45, 63, 0 } } }, - { { { 54, 0, 0 }, { 48, 60, 0 } } }, - { { { 54, 0, 1 }, { 46, 63, 0 } } }, - { { { 54, 0, 2 }, { 48, 61, 0 } } }, - { { { 55, 0, 1 }, { 47, 63, 0 } } }, - { { { 55, 0, 0 }, { 48, 62, 0 } } }, - { { { 55, 0, 1 }, { 48, 63, 1 } } }, - { { { 55, 0, 2 }, { 48, 63, 0 } } }, - { { { 56, 0, 1 }, { 49, 63, 1 } } }, - { { { 56, 0, 0 }, { 49, 63, 0 } } }, - { { { 56, 0, 1 }, { 50, 63, 1 } } }, - { { { 56, 0, 2 }, { 50, 63, 0 } } }, - { { { 57, 0, 1 }, { 51, 63, 1 } } }, - { { { 57, 0, 0 }, { 51, 63, 0 } } }, - { { { 57, 0, 1 }, { 52, 63, 1 } } }, - { { { 57, 0, 2 }, { 52, 63, 0 } } }, - { { { 58, 0, 1 }, { 53, 63, 1 } } }, - { { { 58, 0, 0 }, { 53, 63, 0 } } }, - { { { 58, 0, 1 }, { 54, 63, 1 } } }, - { { { 58, 0, 2 }, { 54, 63, 0 } } }, - { { { 59, 0, 1 }, { 55, 63, 1 } } }, - { { { 59, 0, 0 }, { 55, 63, 0 } } }, - { { { 59, 0, 1 }, { 56, 63, 1 } } }, - { { { 59, 0, 2 }, { 56, 63, 0 } } }, - { { { 60, 0, 1 }, { 57, 63, 1 } } }, - { { { 60, 0, 0 }, { 57, 63, 0 } } }, - { { { 60, 0, 1 }, { 58, 63, 1 } } }, - { { { 60, 0, 2 }, { 58, 63, 0 } } }, - { { { 61, 0, 1 }, { 59, 63, 1 } } }, - { { { 61, 0, 0 }, { 59, 63, 0 } } }, - { { { 61, 0, 1 }, { 60, 63, 1 } } }, - { { { 61, 0, 2 }, { 60, 63, 0 } } }, - { { { 62, 0, 1 }, { 61, 63, 1 } } }, - { { { 62, 0, 0 }, { 61, 63, 0 } } }, - { { { 62, 0, 1 }, { 62, 63, 1 } } }, - { { { 62, 0, 2 }, { 62, 63, 0 } } }, - { { { 63, 0, 1 }, { 63, 63, 1 } } }, - { { { 63, 0, 0 }, { 63, 63, 0 } } } -}; - -static SingleColourLookup const lookup_5_4[] = -{ - { { { 0, 0, 0 }, { 0, 0, 0 } } }, - { { { 0, 0, 1 }, { 0, 1, 1 } } }, - { { { 0, 0, 2 }, { 0, 1, 0 } } }, - { { { 0, 0, 3 }, { 0, 1, 1 } } }, - { { { 0, 0, 4 }, { 0, 2, 1 } } }, - { { { 1, 0, 3 }, { 0, 2, 0 } } }, - { { { 1, 0, 2 }, { 0, 2, 1 } } }, - { { { 1, 0, 1 }, { 0, 3, 1 } } }, - { { { 1, 0, 0 }, { 0, 3, 0 } } }, - { { { 1, 0, 1 }, { 1, 2, 1 } } }, - { { { 1, 0, 2 }, { 1, 2, 0 } } }, - { { { 1, 0, 3 }, { 0, 4, 0 } } }, - { { { 1, 0, 4 }, { 0, 5, 1 } } }, - { { { 2, 0, 3 }, { 0, 5, 0 } } }, - { { { 2, 0, 2 }, { 0, 5, 1 } } }, - { { { 2, 0, 1 }, { 0, 6, 1 } } }, - { { { 2, 0, 0 }, { 0, 6, 0 } } }, - { { { 2, 0, 1 }, { 2, 3, 1 } } }, - { { { 2, 0, 2 }, { 2, 3, 0 } } }, - { { { 2, 0, 3 }, { 0, 7, 0 } } }, - { { { 2, 0, 4 }, { 1, 6, 1 } } }, - { { { 3, 0, 3 }, { 1, 6, 0 } } }, - { { { 3, 0, 2 }, { 0, 8, 0 } } }, - { { { 3, 0, 1 }, { 0, 9, 1 } } }, - { { { 3, 0, 0 }, { 0, 9, 0 } } }, - { { { 3, 0, 1 }, { 0, 9, 1 } } }, - { { { 3, 0, 2 }, { 0, 10, 1 } } }, - { { { 3, 0, 3 }, { 0, 10, 0 } } }, - { { { 3, 0, 4 }, { 2, 7, 1 } } }, - { { { 4, 0, 4 }, { 2, 7, 0 } } }, - { { { 4, 0, 3 }, { 0, 11, 0 } } }, - { { { 4, 0, 2 }, { 1, 10, 1 } } }, - { { { 4, 0, 1 }, { 1, 10, 0 } } }, - { { { 4, 0, 0 }, { 0, 12, 0 } } }, - { { { 4, 0, 1 }, { 0, 13, 1 } } }, - { { { 4, 0, 2 }, { 0, 13, 0 } } }, - { { { 4, 0, 3 }, { 0, 13, 1 } } }, - { { { 4, 0, 4 }, { 0, 14, 1 } } }, - { { { 5, 0, 3 }, { 0, 14, 0 } } }, - { { { 5, 0, 2 }, { 2, 11, 1 } } }, - { { { 5, 0, 1 }, { 2, 11, 0 } } }, - { { { 5, 0, 0 }, { 0, 15, 0 } } }, - { { { 5, 0, 1 }, { 1, 14, 1 } } }, - { { { 5, 0, 2 }, { 1, 14, 0 } } }, - { { { 5, 0, 3 }, { 0, 16, 0 } } }, - { { { 5, 0, 4 }, { 0, 17, 1 } } }, - { { { 6, 0, 3 }, { 0, 17, 0 } } }, - { { { 6, 0, 2 }, { 0, 17, 1 } } }, - { { { 6, 0, 1 }, { 0, 18, 1 } } }, - { { { 6, 0, 0 }, { 0, 18, 0 } } }, - { { { 6, 0, 1 }, { 2, 15, 1 } } }, - { { { 6, 0, 2 }, { 2, 15, 0 } } }, - { { { 6, 0, 3 }, { 0, 19, 0 } } }, - { { { 6, 0, 4 }, { 1, 18, 1 } } }, - { { { 7, 0, 3 }, { 1, 18, 0 } } }, - { { { 7, 0, 2 }, { 0, 20, 0 } } }, - { { { 7, 0, 1 }, { 0, 21, 1 } } }, - { { { 7, 0, 0 }, { 0, 21, 0 } } }, - { { { 7, 0, 1 }, { 0, 21, 1 } } }, - { { { 7, 0, 2 }, { 0, 22, 1 } } }, - { { { 7, 0, 3 }, { 0, 22, 0 } } }, - { { { 7, 0, 4 }, { 2, 19, 1 } } }, - { { { 8, 0, 4 }, { 2, 19, 0 } } }, - { { { 8, 0, 3 }, { 0, 23, 0 } } }, - { { { 8, 0, 2 }, { 1, 22, 1 } } }, - { { { 8, 0, 1 }, { 1, 22, 0 } } }, - { { { 8, 0, 0 }, { 0, 24, 0 } } }, - { { { 8, 0, 1 }, { 0, 25, 1 } } }, - { { { 8, 0, 2 }, { 0, 25, 0 } } }, - { { { 8, 0, 3 }, { 0, 25, 1 } } }, - { { { 8, 0, 4 }, { 0, 26, 1 } } }, - { { { 9, 0, 3 }, { 0, 26, 0 } } }, - { { { 9, 0, 2 }, { 2, 23, 1 } } }, - { { { 9, 0, 1 }, { 2, 23, 0 } } }, - { { { 9, 0, 0 }, { 0, 27, 0 } } }, - { { { 9, 0, 1 }, { 1, 26, 1 } } }, - { { { 9, 0, 2 }, { 1, 26, 0 } } }, - { { { 9, 0, 3 }, { 0, 28, 0 } } }, - { { { 9, 0, 4 }, { 0, 29, 1 } } }, - { { { 10, 0, 3 }, { 0, 29, 0 } } }, - { { { 10, 0, 2 }, { 0, 29, 1 } } }, - { { { 10, 0, 1 }, { 0, 30, 1 } } }, - { { { 10, 0, 0 }, { 0, 30, 0 } } }, - { { { 10, 0, 1 }, { 2, 27, 1 } } }, - { { { 10, 0, 2 }, { 2, 27, 0 } } }, - { { { 10, 0, 3 }, { 0, 31, 0 } } }, - { { { 10, 0, 4 }, { 1, 30, 1 } } }, - { { { 11, 0, 3 }, { 1, 30, 0 } } }, - { { { 11, 0, 2 }, { 4, 24, 0 } } }, - { { { 11, 0, 1 }, { 1, 31, 1 } } }, - { { { 11, 0, 0 }, { 1, 31, 0 } } }, - { { { 11, 0, 1 }, { 1, 31, 1 } } }, - { { { 11, 0, 2 }, { 2, 30, 1 } } }, - { { { 11, 0, 3 }, { 2, 30, 0 } } }, - { { { 11, 0, 4 }, { 2, 31, 1 } } }, - { { { 12, 0, 4 }, { 2, 31, 0 } } }, - { { { 12, 0, 3 }, { 4, 27, 0 } } }, - { { { 12, 0, 2 }, { 3, 30, 1 } } }, - { { { 12, 0, 1 }, { 3, 30, 0 } } }, - { { { 12, 0, 0 }, { 4, 28, 0 } } }, - { { { 12, 0, 1 }, { 3, 31, 1 } } }, - { { { 12, 0, 2 }, { 3, 31, 0 } } }, - { { { 12, 0, 3 }, { 3, 31, 1 } } }, - { { { 12, 0, 4 }, { 4, 30, 1 } } }, - { { { 13, 0, 3 }, { 4, 30, 0 } } }, - { { { 13, 0, 2 }, { 6, 27, 1 } } }, - { { { 13, 0, 1 }, { 6, 27, 0 } } }, - { { { 13, 0, 0 }, { 4, 31, 0 } } }, - { { { 13, 0, 1 }, { 5, 30, 1 } } }, - { { { 13, 0, 2 }, { 5, 30, 0 } } }, - { { { 13, 0, 3 }, { 8, 24, 0 } } }, - { { { 13, 0, 4 }, { 5, 31, 1 } } }, - { { { 14, 0, 3 }, { 5, 31, 0 } } }, - { { { 14, 0, 2 }, { 5, 31, 1 } } }, - { { { 14, 0, 1 }, { 6, 30, 1 } } }, - { { { 14, 0, 0 }, { 6, 30, 0 } } }, - { { { 14, 0, 1 }, { 6, 31, 1 } } }, - { { { 14, 0, 2 }, { 6, 31, 0 } } }, - { { { 14, 0, 3 }, { 8, 27, 0 } } }, - { { { 14, 0, 4 }, { 7, 30, 1 } } }, - { { { 15, 0, 3 }, { 7, 30, 0 } } }, - { { { 15, 0, 2 }, { 8, 28, 0 } } }, - { { { 15, 0, 1 }, { 7, 31, 1 } } }, - { { { 15, 0, 0 }, { 7, 31, 0 } } }, - { { { 15, 0, 1 }, { 7, 31, 1 } } }, - { { { 15, 0, 2 }, { 8, 30, 1 } } }, - { { { 15, 0, 3 }, { 8, 30, 0 } } }, - { { { 15, 0, 4 }, { 10, 27, 1 } } }, - { { { 16, 0, 4 }, { 10, 27, 0 } } }, - { { { 16, 0, 3 }, { 8, 31, 0 } } }, - { { { 16, 0, 2 }, { 9, 30, 1 } } }, - { { { 16, 0, 1 }, { 9, 30, 0 } } }, - { { { 16, 0, 0 }, { 12, 24, 0 } } }, - { { { 16, 0, 1 }, { 9, 31, 1 } } }, - { { { 16, 0, 2 }, { 9, 31, 0 } } }, - { { { 16, 0, 3 }, { 9, 31, 1 } } }, - { { { 16, 0, 4 }, { 10, 30, 1 } } }, - { { { 17, 0, 3 }, { 10, 30, 0 } } }, - { { { 17, 0, 2 }, { 10, 31, 1 } } }, - { { { 17, 0, 1 }, { 10, 31, 0 } } }, - { { { 17, 0, 0 }, { 12, 27, 0 } } }, - { { { 17, 0, 1 }, { 11, 30, 1 } } }, - { { { 17, 0, 2 }, { 11, 30, 0 } } }, - { { { 17, 0, 3 }, { 12, 28, 0 } } }, - { { { 17, 0, 4 }, { 11, 31, 1 } } }, - { { { 18, 0, 3 }, { 11, 31, 0 } } }, - { { { 18, 0, 2 }, { 11, 31, 1 } } }, - { { { 18, 0, 1 }, { 12, 30, 1 } } }, - { { { 18, 0, 0 }, { 12, 30, 0 } } }, - { { { 18, 0, 1 }, { 14, 27, 1 } } }, - { { { 18, 0, 2 }, { 14, 27, 0 } } }, - { { { 18, 0, 3 }, { 12, 31, 0 } } }, - { { { 18, 0, 4 }, { 13, 30, 1 } } }, - { { { 19, 0, 3 }, { 13, 30, 0 } } }, - { { { 19, 0, 2 }, { 16, 24, 0 } } }, - { { { 19, 0, 1 }, { 13, 31, 1 } } }, - { { { 19, 0, 0 }, { 13, 31, 0 } } }, - { { { 19, 0, 1 }, { 13, 31, 1 } } }, - { { { 19, 0, 2 }, { 14, 30, 1 } } }, - { { { 19, 0, 3 }, { 14, 30, 0 } } }, - { { { 19, 0, 4 }, { 14, 31, 1 } } }, - { { { 20, 0, 4 }, { 14, 31, 0 } } }, - { { { 20, 0, 3 }, { 16, 27, 0 } } }, - { { { 20, 0, 2 }, { 15, 30, 1 } } }, - { { { 20, 0, 1 }, { 15, 30, 0 } } }, - { { { 20, 0, 0 }, { 16, 28, 0 } } }, - { { { 20, 0, 1 }, { 15, 31, 1 } } }, - { { { 20, 0, 2 }, { 15, 31, 0 } } }, - { { { 20, 0, 3 }, { 15, 31, 1 } } }, - { { { 20, 0, 4 }, { 16, 30, 1 } } }, - { { { 21, 0, 3 }, { 16, 30, 0 } } }, - { { { 21, 0, 2 }, { 18, 27, 1 } } }, - { { { 21, 0, 1 }, { 18, 27, 0 } } }, - { { { 21, 0, 0 }, { 16, 31, 0 } } }, - { { { 21, 0, 1 }, { 17, 30, 1 } } }, - { { { 21, 0, 2 }, { 17, 30, 0 } } }, - { { { 21, 0, 3 }, { 20, 24, 0 } } }, - { { { 21, 0, 4 }, { 17, 31, 1 } } }, - { { { 22, 0, 3 }, { 17, 31, 0 } } }, - { { { 22, 0, 2 }, { 17, 31, 1 } } }, - { { { 22, 0, 1 }, { 18, 30, 1 } } }, - { { { 22, 0, 0 }, { 18, 30, 0 } } }, - { { { 22, 0, 1 }, { 18, 31, 1 } } }, - { { { 22, 0, 2 }, { 18, 31, 0 } } }, - { { { 22, 0, 3 }, { 20, 27, 0 } } }, - { { { 22, 0, 4 }, { 19, 30, 1 } } }, - { { { 23, 0, 3 }, { 19, 30, 0 } } }, - { { { 23, 0, 2 }, { 20, 28, 0 } } }, - { { { 23, 0, 1 }, { 19, 31, 1 } } }, - { { { 23, 0, 0 }, { 19, 31, 0 } } }, - { { { 23, 0, 1 }, { 19, 31, 1 } } }, - { { { 23, 0, 2 }, { 20, 30, 1 } } }, - { { { 23, 0, 3 }, { 20, 30, 0 } } }, - { { { 23, 0, 4 }, { 22, 27, 1 } } }, - { { { 24, 0, 4 }, { 22, 27, 0 } } }, - { { { 24, 0, 3 }, { 20, 31, 0 } } }, - { { { 24, 0, 2 }, { 21, 30, 1 } } }, - { { { 24, 0, 1 }, { 21, 30, 0 } } }, - { { { 24, 0, 0 }, { 24, 24, 0 } } }, - { { { 24, 0, 1 }, { 21, 31, 1 } } }, - { { { 24, 0, 2 }, { 21, 31, 0 } } }, - { { { 24, 0, 3 }, { 21, 31, 1 } } }, - { { { 24, 0, 4 }, { 22, 30, 1 } } }, - { { { 25, 0, 3 }, { 22, 30, 0 } } }, - { { { 25, 0, 2 }, { 22, 31, 1 } } }, - { { { 25, 0, 1 }, { 22, 31, 0 } } }, - { { { 25, 0, 0 }, { 24, 27, 0 } } }, - { { { 25, 0, 1 }, { 23, 30, 1 } } }, - { { { 25, 0, 2 }, { 23, 30, 0 } } }, - { { { 25, 0, 3 }, { 24, 28, 0 } } }, - { { { 25, 0, 4 }, { 23, 31, 1 } } }, - { { { 26, 0, 3 }, { 23, 31, 0 } } }, - { { { 26, 0, 2 }, { 23, 31, 1 } } }, - { { { 26, 0, 1 }, { 24, 30, 1 } } }, - { { { 26, 0, 0 }, { 24, 30, 0 } } }, - { { { 26, 0, 1 }, { 26, 27, 1 } } }, - { { { 26, 0, 2 }, { 26, 27, 0 } } }, - { { { 26, 0, 3 }, { 24, 31, 0 } } }, - { { { 26, 0, 4 }, { 25, 30, 1 } } }, - { { { 27, 0, 3 }, { 25, 30, 0 } } }, - { { { 27, 0, 2 }, { 28, 24, 0 } } }, - { { { 27, 0, 1 }, { 25, 31, 1 } } }, - { { { 27, 0, 0 }, { 25, 31, 0 } } }, - { { { 27, 0, 1 }, { 25, 31, 1 } } }, - { { { 27, 0, 2 }, { 26, 30, 1 } } }, - { { { 27, 0, 3 }, { 26, 30, 0 } } }, - { { { 27, 0, 4 }, { 26, 31, 1 } } }, - { { { 28, 0, 4 }, { 26, 31, 0 } } }, - { { { 28, 0, 3 }, { 28, 27, 0 } } }, - { { { 28, 0, 2 }, { 27, 30, 1 } } }, - { { { 28, 0, 1 }, { 27, 30, 0 } } }, - { { { 28, 0, 0 }, { 28, 28, 0 } } }, - { { { 28, 0, 1 }, { 27, 31, 1 } } }, - { { { 28, 0, 2 }, { 27, 31, 0 } } }, - { { { 28, 0, 3 }, { 27, 31, 1 } } }, - { { { 28, 0, 4 }, { 28, 30, 1 } } }, - { { { 29, 0, 3 }, { 28, 30, 0 } } }, - { { { 29, 0, 2 }, { 30, 27, 1 } } }, - { { { 29, 0, 1 }, { 30, 27, 0 } } }, - { { { 29, 0, 0 }, { 28, 31, 0 } } }, - { { { 29, 0, 1 }, { 29, 30, 1 } } }, - { { { 29, 0, 2 }, { 29, 30, 0 } } }, - { { { 29, 0, 3 }, { 29, 30, 1 } } }, - { { { 29, 0, 4 }, { 29, 31, 1 } } }, - { { { 30, 0, 3 }, { 29, 31, 0 } } }, - { { { 30, 0, 2 }, { 29, 31, 1 } } }, - { { { 30, 0, 1 }, { 30, 30, 1 } } }, - { { { 30, 0, 0 }, { 30, 30, 0 } } }, - { { { 30, 0, 1 }, { 30, 31, 1 } } }, - { { { 30, 0, 2 }, { 30, 31, 0 } } }, - { { { 30, 0, 3 }, { 30, 31, 1 } } }, - { { { 30, 0, 4 }, { 31, 30, 1 } } }, - { { { 31, 0, 3 }, { 31, 30, 0 } } }, - { { { 31, 0, 2 }, { 31, 30, 1 } } }, - { { { 31, 0, 1 }, { 31, 31, 1 } } }, - { { { 31, 0, 0 }, { 31, 31, 0 } } } -}; - -static SingleColourLookup const lookup_6_4[] = -{ - { { { 0, 0, 0 }, { 0, 0, 0 } } }, - { { { 0, 0, 1 }, { 0, 1, 0 } } }, - { { { 0, 0, 2 }, { 0, 2, 0 } } }, - { { { 1, 0, 1 }, { 0, 3, 1 } } }, - { { { 1, 0, 0 }, { 0, 3, 0 } } }, - { { { 1, 0, 1 }, { 0, 4, 0 } } }, - { { { 1, 0, 2 }, { 0, 5, 0 } } }, - { { { 2, 0, 1 }, { 0, 6, 1 } } }, - { { { 2, 0, 0 }, { 0, 6, 0 } } }, - { { { 2, 0, 1 }, { 0, 7, 0 } } }, - { { { 2, 0, 2 }, { 0, 8, 0 } } }, - { { { 3, 0, 1 }, { 0, 9, 1 } } }, - { { { 3, 0, 0 }, { 0, 9, 0 } } }, - { { { 3, 0, 1 }, { 0, 10, 0 } } }, - { { { 3, 0, 2 }, { 0, 11, 0 } } }, - { { { 4, 0, 1 }, { 0, 12, 1 } } }, - { { { 4, 0, 0 }, { 0, 12, 0 } } }, - { { { 4, 0, 1 }, { 0, 13, 0 } } }, - { { { 4, 0, 2 }, { 0, 14, 0 } } }, - { { { 5, 0, 1 }, { 0, 15, 1 } } }, - { { { 5, 0, 0 }, { 0, 15, 0 } } }, - { { { 5, 0, 1 }, { 0, 16, 0 } } }, - { { { 5, 0, 2 }, { 1, 15, 0 } } }, - { { { 6, 0, 1 }, { 0, 17, 0 } } }, - { { { 6, 0, 0 }, { 0, 18, 0 } } }, - { { { 6, 0, 1 }, { 0, 19, 0 } } }, - { { { 6, 0, 2 }, { 3, 14, 0 } } }, - { { { 7, 0, 1 }, { 0, 20, 0 } } }, - { { { 7, 0, 0 }, { 0, 21, 0 } } }, - { { { 7, 0, 1 }, { 0, 22, 0 } } }, - { { { 7, 0, 2 }, { 4, 15, 0 } } }, - { { { 8, 0, 1 }, { 0, 23, 0 } } }, - { { { 8, 0, 0 }, { 0, 24, 0 } } }, - { { { 8, 0, 1 }, { 0, 25, 0 } } }, - { { { 8, 0, 2 }, { 6, 14, 0 } } }, - { { { 9, 0, 1 }, { 0, 26, 0 } } }, - { { { 9, 0, 0 }, { 0, 27, 0 } } }, - { { { 9, 0, 1 }, { 0, 28, 0 } } }, - { { { 9, 0, 2 }, { 7, 15, 0 } } }, - { { { 10, 0, 1 }, { 0, 29, 0 } } }, - { { { 10, 0, 0 }, { 0, 30, 0 } } }, - { { { 10, 0, 1 }, { 0, 31, 0 } } }, - { { { 10, 0, 2 }, { 9, 14, 0 } } }, - { { { 11, 0, 1 }, { 0, 32, 0 } } }, - { { { 11, 0, 0 }, { 0, 33, 0 } } }, - { { { 11, 0, 1 }, { 2, 30, 0 } } }, - { { { 11, 0, 2 }, { 0, 34, 0 } } }, - { { { 12, 0, 1 }, { 0, 35, 0 } } }, - { { { 12, 0, 0 }, { 0, 36, 0 } } }, - { { { 12, 0, 1 }, { 3, 31, 0 } } }, - { { { 12, 0, 2 }, { 0, 37, 0 } } }, - { { { 13, 0, 1 }, { 0, 38, 0 } } }, - { { { 13, 0, 0 }, { 0, 39, 0 } } }, - { { { 13, 0, 1 }, { 5, 30, 0 } } }, - { { { 13, 0, 2 }, { 0, 40, 0 } } }, - { { { 14, 0, 1 }, { 0, 41, 0 } } }, - { { { 14, 0, 0 }, { 0, 42, 0 } } }, - { { { 14, 0, 1 }, { 6, 31, 0 } } }, - { { { 14, 0, 2 }, { 0, 43, 0 } } }, - { { { 15, 0, 1 }, { 0, 44, 0 } } }, - { { { 15, 0, 0 }, { 0, 45, 0 } } }, - { { { 15, 0, 1 }, { 8, 30, 0 } } }, - { { { 15, 0, 2 }, { 0, 46, 0 } } }, - { { { 16, 0, 2 }, { 0, 47, 0 } } }, - { { { 16, 0, 1 }, { 1, 46, 0 } } }, - { { { 16, 0, 0 }, { 0, 48, 0 } } }, - { { { 16, 0, 1 }, { 0, 49, 0 } } }, - { { { 16, 0, 2 }, { 0, 50, 0 } } }, - { { { 17, 0, 1 }, { 2, 47, 0 } } }, - { { { 17, 0, 0 }, { 0, 51, 0 } } }, - { { { 17, 0, 1 }, { 0, 52, 0 } } }, - { { { 17, 0, 2 }, { 0, 53, 0 } } }, - { { { 18, 0, 1 }, { 4, 46, 0 } } }, - { { { 18, 0, 0 }, { 0, 54, 0 } } }, - { { { 18, 0, 1 }, { 0, 55, 0 } } }, - { { { 18, 0, 2 }, { 0, 56, 0 } } }, - { { { 19, 0, 1 }, { 5, 47, 0 } } }, - { { { 19, 0, 0 }, { 0, 57, 0 } } }, - { { { 19, 0, 1 }, { 0, 58, 0 } } }, - { { { 19, 0, 2 }, { 0, 59, 0 } } }, - { { { 20, 0, 1 }, { 7, 46, 0 } } }, - { { { 20, 0, 0 }, { 0, 60, 0 } } }, - { { { 20, 0, 1 }, { 0, 61, 0 } } }, - { { { 20, 0, 2 }, { 0, 62, 0 } } }, - { { { 21, 0, 1 }, { 8, 47, 0 } } }, - { { { 21, 0, 0 }, { 0, 63, 0 } } }, - { { { 21, 0, 1 }, { 1, 62, 0 } } }, - { { { 21, 0, 2 }, { 1, 63, 0 } } }, - { { { 22, 0, 1 }, { 10, 46, 0 } } }, - { { { 22, 0, 0 }, { 2, 62, 0 } } }, - { { { 22, 0, 1 }, { 2, 63, 0 } } }, - { { { 22, 0, 2 }, { 3, 62, 0 } } }, - { { { 23, 0, 1 }, { 11, 47, 0 } } }, - { { { 23, 0, 0 }, { 3, 63, 0 } } }, - { { { 23, 0, 1 }, { 4, 62, 0 } } }, - { { { 23, 0, 2 }, { 4, 63, 0 } } }, - { { { 24, 0, 1 }, { 13, 46, 0 } } }, - { { { 24, 0, 0 }, { 5, 62, 0 } } }, - { { { 24, 0, 1 }, { 5, 63, 0 } } }, - { { { 24, 0, 2 }, { 6, 62, 0 } } }, - { { { 25, 0, 1 }, { 14, 47, 0 } } }, - { { { 25, 0, 0 }, { 6, 63, 0 } } }, - { { { 25, 0, 1 }, { 7, 62, 0 } } }, - { { { 25, 0, 2 }, { 7, 63, 0 } } }, - { { { 26, 0, 1 }, { 16, 45, 0 } } }, - { { { 26, 0, 0 }, { 8, 62, 0 } } }, - { { { 26, 0, 1 }, { 8, 63, 0 } } }, - { { { 26, 0, 2 }, { 9, 62, 0 } } }, - { { { 27, 0, 1 }, { 16, 48, 0 } } }, - { { { 27, 0, 0 }, { 9, 63, 0 } } }, - { { { 27, 0, 1 }, { 10, 62, 0 } } }, - { { { 27, 0, 2 }, { 10, 63, 0 } } }, - { { { 28, 0, 1 }, { 16, 51, 0 } } }, - { { { 28, 0, 0 }, { 11, 62, 0 } } }, - { { { 28, 0, 1 }, { 11, 63, 0 } } }, - { { { 28, 0, 2 }, { 12, 62, 0 } } }, - { { { 29, 0, 1 }, { 16, 54, 0 } } }, - { { { 29, 0, 0 }, { 12, 63, 0 } } }, - { { { 29, 0, 1 }, { 13, 62, 0 } } }, - { { { 29, 0, 2 }, { 13, 63, 0 } } }, - { { { 30, 0, 1 }, { 16, 57, 0 } } }, - { { { 30, 0, 0 }, { 14, 62, 0 } } }, - { { { 30, 0, 1 }, { 14, 63, 0 } } }, - { { { 30, 0, 2 }, { 15, 62, 0 } } }, - { { { 31, 0, 1 }, { 16, 60, 0 } } }, - { { { 31, 0, 0 }, { 15, 63, 0 } } }, - { { { 31, 0, 1 }, { 24, 46, 0 } } }, - { { { 31, 0, 2 }, { 16, 62, 0 } } }, - { { { 32, 0, 2 }, { 16, 63, 0 } } }, - { { { 32, 0, 1 }, { 17, 62, 0 } } }, - { { { 32, 0, 0 }, { 25, 47, 0 } } }, - { { { 32, 0, 1 }, { 17, 63, 0 } } }, - { { { 32, 0, 2 }, { 18, 62, 0 } } }, - { { { 33, 0, 1 }, { 18, 63, 0 } } }, - { { { 33, 0, 0 }, { 27, 46, 0 } } }, - { { { 33, 0, 1 }, { 19, 62, 0 } } }, - { { { 33, 0, 2 }, { 19, 63, 0 } } }, - { { { 34, 0, 1 }, { 20, 62, 0 } } }, - { { { 34, 0, 0 }, { 28, 47, 0 } } }, - { { { 34, 0, 1 }, { 20, 63, 0 } } }, - { { { 34, 0, 2 }, { 21, 62, 0 } } }, - { { { 35, 0, 1 }, { 21, 63, 0 } } }, - { { { 35, 0, 0 }, { 30, 46, 0 } } }, - { { { 35, 0, 1 }, { 22, 62, 0 } } }, - { { { 35, 0, 2 }, { 22, 63, 0 } } }, - { { { 36, 0, 1 }, { 23, 62, 0 } } }, - { { { 36, 0, 0 }, { 31, 47, 0 } } }, - { { { 36, 0, 1 }, { 23, 63, 0 } } }, - { { { 36, 0, 2 }, { 24, 62, 0 } } }, - { { { 37, 0, 1 }, { 24, 63, 0 } } }, - { { { 37, 0, 0 }, { 32, 47, 0 } } }, - { { { 37, 0, 1 }, { 25, 62, 0 } } }, - { { { 37, 0, 2 }, { 25, 63, 0 } } }, - { { { 38, 0, 1 }, { 26, 62, 0 } } }, - { { { 38, 0, 0 }, { 32, 50, 0 } } }, - { { { 38, 0, 1 }, { 26, 63, 0 } } }, - { { { 38, 0, 2 }, { 27, 62, 0 } } }, - { { { 39, 0, 1 }, { 27, 63, 0 } } }, - { { { 39, 0, 0 }, { 32, 53, 0 } } }, - { { { 39, 0, 1 }, { 28, 62, 0 } } }, - { { { 39, 0, 2 }, { 28, 63, 0 } } }, - { { { 40, 0, 1 }, { 29, 62, 0 } } }, - { { { 40, 0, 0 }, { 32, 56, 0 } } }, - { { { 40, 0, 1 }, { 29, 63, 0 } } }, - { { { 40, 0, 2 }, { 30, 62, 0 } } }, - { { { 41, 0, 1 }, { 30, 63, 0 } } }, - { { { 41, 0, 0 }, { 32, 59, 0 } } }, - { { { 41, 0, 1 }, { 31, 62, 0 } } }, - { { { 41, 0, 2 }, { 31, 63, 0 } } }, - { { { 42, 0, 1 }, { 32, 61, 0 } } }, - { { { 42, 0, 0 }, { 32, 62, 0 } } }, - { { { 42, 0, 1 }, { 32, 63, 0 } } }, - { { { 42, 0, 2 }, { 41, 46, 0 } } }, - { { { 43, 0, 1 }, { 33, 62, 0 } } }, - { { { 43, 0, 0 }, { 33, 63, 0 } } }, - { { { 43, 0, 1 }, { 34, 62, 0 } } }, - { { { 43, 0, 2 }, { 42, 47, 0 } } }, - { { { 44, 0, 1 }, { 34, 63, 0 } } }, - { { { 44, 0, 0 }, { 35, 62, 0 } } }, - { { { 44, 0, 1 }, { 35, 63, 0 } } }, - { { { 44, 0, 2 }, { 44, 46, 0 } } }, - { { { 45, 0, 1 }, { 36, 62, 0 } } }, - { { { 45, 0, 0 }, { 36, 63, 0 } } }, - { { { 45, 0, 1 }, { 37, 62, 0 } } }, - { { { 45, 0, 2 }, { 45, 47, 0 } } }, - { { { 46, 0, 1 }, { 37, 63, 0 } } }, - { { { 46, 0, 0 }, { 38, 62, 0 } } }, - { { { 46, 0, 1 }, { 38, 63, 0 } } }, - { { { 46, 0, 2 }, { 47, 46, 0 } } }, - { { { 47, 0, 1 }, { 39, 62, 0 } } }, - { { { 47, 0, 0 }, { 39, 63, 0 } } }, - { { { 47, 0, 1 }, { 40, 62, 0 } } }, - { { { 47, 0, 2 }, { 48, 46, 0 } } }, - { { { 48, 0, 2 }, { 40, 63, 0 } } }, - { { { 48, 0, 1 }, { 41, 62, 0 } } }, - { { { 48, 0, 0 }, { 41, 63, 0 } } }, - { { { 48, 0, 1 }, { 48, 49, 0 } } }, - { { { 48, 0, 2 }, { 42, 62, 0 } } }, - { { { 49, 0, 1 }, { 42, 63, 0 } } }, - { { { 49, 0, 0 }, { 43, 62, 0 } } }, - { { { 49, 0, 1 }, { 48, 52, 0 } } }, - { { { 49, 0, 2 }, { 43, 63, 0 } } }, - { { { 50, 0, 1 }, { 44, 62, 0 } } }, - { { { 50, 0, 0 }, { 44, 63, 0 } } }, - { { { 50, 0, 1 }, { 48, 55, 0 } } }, - { { { 50, 0, 2 }, { 45, 62, 0 } } }, - { { { 51, 0, 1 }, { 45, 63, 0 } } }, - { { { 51, 0, 0 }, { 46, 62, 0 } } }, - { { { 51, 0, 1 }, { 48, 58, 0 } } }, - { { { 51, 0, 2 }, { 46, 63, 0 } } }, - { { { 52, 0, 1 }, { 47, 62, 0 } } }, - { { { 52, 0, 0 }, { 47, 63, 0 } } }, - { { { 52, 0, 1 }, { 48, 61, 0 } } }, - { { { 52, 0, 2 }, { 48, 62, 0 } } }, - { { { 53, 0, 1 }, { 56, 47, 0 } } }, - { { { 53, 0, 0 }, { 48, 63, 0 } } }, - { { { 53, 0, 1 }, { 49, 62, 0 } } }, - { { { 53, 0, 2 }, { 49, 63, 0 } } }, - { { { 54, 0, 1 }, { 58, 46, 0 } } }, - { { { 54, 0, 0 }, { 50, 62, 0 } } }, - { { { 54, 0, 1 }, { 50, 63, 0 } } }, - { { { 54, 0, 2 }, { 51, 62, 0 } } }, - { { { 55, 0, 1 }, { 59, 47, 0 } } }, - { { { 55, 0, 0 }, { 51, 63, 0 } } }, - { { { 55, 0, 1 }, { 52, 62, 0 } } }, - { { { 55, 0, 2 }, { 52, 63, 0 } } }, - { { { 56, 0, 1 }, { 61, 46, 0 } } }, - { { { 56, 0, 0 }, { 53, 62, 0 } } }, - { { { 56, 0, 1 }, { 53, 63, 0 } } }, - { { { 56, 0, 2 }, { 54, 62, 0 } } }, - { { { 57, 0, 1 }, { 62, 47, 0 } } }, - { { { 57, 0, 0 }, { 54, 63, 0 } } }, - { { { 57, 0, 1 }, { 55, 62, 0 } } }, - { { { 57, 0, 2 }, { 55, 63, 0 } } }, - { { { 58, 0, 1 }, { 56, 62, 1 } } }, - { { { 58, 0, 0 }, { 56, 62, 0 } } }, - { { { 58, 0, 1 }, { 56, 63, 0 } } }, - { { { 58, 0, 2 }, { 57, 62, 0 } } }, - { { { 59, 0, 1 }, { 57, 63, 1 } } }, - { { { 59, 0, 0 }, { 57, 63, 0 } } }, - { { { 59, 0, 1 }, { 58, 62, 0 } } }, - { { { 59, 0, 2 }, { 58, 63, 0 } } }, - { { { 60, 0, 1 }, { 59, 62, 1 } } }, - { { { 60, 0, 0 }, { 59, 62, 0 } } }, - { { { 60, 0, 1 }, { 59, 63, 0 } } }, - { { { 60, 0, 2 }, { 60, 62, 0 } } }, - { { { 61, 0, 1 }, { 60, 63, 1 } } }, - { { { 61, 0, 0 }, { 60, 63, 0 } } }, - { { { 61, 0, 1 }, { 61, 62, 0 } } }, - { { { 61, 0, 2 }, { 61, 63, 0 } } }, - { { { 62, 0, 1 }, { 62, 62, 1 } } }, - { { { 62, 0, 0 }, { 62, 62, 0 } } }, - { { { 62, 0, 1 }, { 62, 63, 0 } } }, - { { { 62, 0, 2 }, { 63, 62, 0 } } }, - { { { 63, 0, 1 }, { 63, 63, 1 } } }, - { { { 63, 0, 0 }, { 63, 63, 0 } } } -}; diff --git a/3rdparty/bgfx/3rdparty/libsquish/squish.cpp b/3rdparty/bgfx/3rdparty/libsquish/squish.cpp deleted file mode 100644 index cd91f87..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/squish.cpp +++ /dev/null @@ -1,260 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#include "squish.h" -#include "colourset.h" -#include "maths.h" -#include "rangefit.h" -#include "clusterfit.h" -#include "colourblock.h" -#include "alpha.h" -#include "singlecolourfit.h" - -namespace squish { - -static int FixFlags( int flags ) -{ - // grab the flag bits - int method = flags & ( kDxt1 | kDxt3 | kDxt5 | kBc4 | kBc5 ); - int fit = flags & ( kColourIterativeClusterFit | kColourClusterFit | kColourRangeFit ); - int extra = flags & kWeightColourByAlpha; - - // set defaults - if ( method != kDxt3 - && method != kDxt5 - && method != kBc4 - && method != kBc5 ) - { - method = kDxt1; - } - if( fit != kColourRangeFit && fit != kColourIterativeClusterFit ) - fit = kColourClusterFit; - - // done - return method | fit | extra; -} - -void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric ) -{ - // fix any bad flags - flags = FixFlags( flags ); - - if ( ( flags & ( kBc4 | kBc5 ) ) != 0 ) - { - u8 alpha[16*4]; - for( int i = 0; i < 16; ++i ) - { - alpha[i*4 + 3] = rgba[i*4 + 0]; // copy R to A - } - - u8* rBlock = reinterpret_cast< u8* >( block ); - CompressAlphaDxt5( alpha, mask, rBlock ); - - if ( ( flags & ( kBc5 ) ) != 0 ) - { - for( int i = 0; i < 16; ++i ) - { - alpha[i*4 + 3] = rgba[i*4 + 1]; // copy G to A - } - - u8* gBlock = reinterpret_cast< u8* >( block ) + 8; - CompressAlphaDxt5( alpha, mask, gBlock ); - } - - return; - } - - // get the block locations - void* colourBlock = block; - void* alphaBlock = block; - if( ( flags & ( kDxt3 | kDxt5 ) ) != 0 ) - colourBlock = reinterpret_cast< u8* >( block ) + 8; - - // create the minimal point set - ColourSet colours( rgba, mask, flags ); - - // check the compression type and compress colour - if( colours.GetCount() == 1 ) - { - // always do a single colour fit - SingleColourFit fit( &colours, flags ); - fit.Compress( colourBlock ); - } - else if( ( flags & kColourRangeFit ) != 0 || colours.GetCount() == 0 ) - { - // do a range fit - RangeFit fit( &colours, flags, metric ); - fit.Compress( colourBlock ); - } - else - { - // default to a cluster fit (could be iterative or not) - ClusterFit fit( &colours, flags, metric ); - fit.Compress( colourBlock ); - } - - // compress alpha separately if necessary - if( ( flags & kDxt3 ) != 0 ) - CompressAlphaDxt3( rgba, mask, alphaBlock ); - else if( ( flags & kDxt5 ) != 0 ) - CompressAlphaDxt5( rgba, mask, alphaBlock ); -} - -void Decompress( u8* rgba, void const* block, int flags ) -{ - // fix any bad flags - flags = FixFlags( flags ); - - // get the block locations - void const* colourBlock = block; - void const* alphaBock = block; - if( ( flags & ( kDxt3 | kDxt5 ) ) != 0 ) - colourBlock = reinterpret_cast< u8 const* >( block ) + 8; - - // decompress colour - DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); - - // decompress alpha separately if necessary - if( ( flags & kDxt3 ) != 0 ) - DecompressAlphaDxt3( rgba, alphaBock ); - else if( ( flags & kDxt5 ) != 0 ) - DecompressAlphaDxt5( rgba, alphaBock ); -} - -int GetStorageRequirements( int width, int height, int flags ) -{ - // fix any bad flags - flags = FixFlags( flags ); - - // compute the storage requirements - int blockcount = ( ( width + 3 )/4 ) * ( ( height + 3 )/4 ); - int blocksize = ( ( flags & ( kDxt1 | kBc4 ) ) != 0 ) ? 8 : 16; - return blockcount*blocksize; -} - -void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric ) -{ - // fix any bad flags - flags = FixFlags( flags ); - - // initialise the block output - u8* targetBlock = reinterpret_cast< u8* >( blocks ); - int bytesPerBlock = ( ( flags & ( kDxt1 | kBc4 ) ) != 0 ) ? 8 : 16; - - // loop over blocks - for( int y = 0; y < height; y += 4 ) - { - for( int x = 0; x < width; x += 4 ) - { - // build the 4x4 block of pixels - u8 sourceRgba[16*4]; - u8* targetPixel = sourceRgba; - int mask = 0; - for( int py = 0; py < 4; ++py ) - { - for( int px = 0; px < 4; ++px ) - { - // get the source pixel in the image - int sx = x + px; - int sy = y + py; - - // enable if we're in the image - if( sx < width && sy < height ) - { - // copy the rgba value - u8 const* sourcePixel = rgba + 4*( width*sy + sx ); - for( int i = 0; i < 4; ++i ) - *targetPixel++ = *sourcePixel++; - - // enable this pixel - mask |= ( 1 << ( 4*py + px ) ); - } - else - { - // skip this pixel as its outside the image - targetPixel += 4; - } - } - } - - // compress it into the output - CompressMasked( sourceRgba, mask, targetBlock, flags, metric ); - - // advance - targetBlock += bytesPerBlock; - } - } -} - -void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags ) -{ - // fix any bad flags - flags = FixFlags( flags ); - - // initialise the block input - u8 const* sourceBlock = reinterpret_cast< u8 const* >( blocks ); - int bytesPerBlock = ( ( flags & ( kDxt1 | kBc4 ) ) != 0 ) ? 8 : 16; - - // loop over blocks - for( int y = 0; y < height; y += 4 ) - { - for( int x = 0; x < width; x += 4 ) - { - // decompress the block - u8 targetRgba[4*16]; - Decompress( targetRgba, sourceBlock, flags ); - - // write the decompressed pixels to the correct image locations - u8 const* sourcePixel = targetRgba; - for( int py = 0; py < 4; ++py ) - { - for( int px = 0; px < 4; ++px ) - { - // get the target location - int sx = x + px; - int sy = y + py; - if( sx < width && sy < height ) - { - u8* targetPixel = rgba + 4*( width*sy + sx ); - - // copy the rgba value - for( int i = 0; i < 4; ++i ) - *targetPixel++ = *sourcePixel++; - } - else - { - // skip this pixel as its outside the image - sourcePixel += 4; - } - } - } - - // advance - sourceBlock += bytesPerBlock; - } - } -} - -} // namespace squish diff --git a/3rdparty/bgfx/3rdparty/libsquish/squish.h b/3rdparty/bgfx/3rdparty/libsquish/squish.h deleted file mode 100644 index 175375f..0000000 --- a/3rdparty/bgfx/3rdparty/libsquish/squish.h +++ /dev/null @@ -1,269 +0,0 @@ -/* ----------------------------------------------------------------------------- - - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -------------------------------------------------------------------------- */ - -#ifndef SQUISH_H -#define SQUISH_H - -//! All squish API functions live in this namespace. -namespace squish { - -// ----------------------------------------------------------------------------- - -//! Typedef a quantity that is a single unsigned byte. -typedef unsigned char u8; - -// ----------------------------------------------------------------------------- - -enum -{ - //! Use DXT1 compression. - kDxt1 = ( 1 << 0 ), - - //! Use DXT3 compression. - kDxt3 = ( 1 << 1 ), - - //! Use DXT5 compression. - kDxt5 = ( 1 << 2 ), - - //! Use BC4 compression. - kBc4 = ( 1 << 3 ), - - //! Use BC5 compression. - kBc5 = ( 1 << 4 ), - - //! Use a slow but high quality colour compressor (the default). - kColourClusterFit = ( 1 << 5 ), - - //! Use a fast but low quality colour compressor. - kColourRangeFit = ( 1 << 6 ), - - //! Weight the colour by alpha during cluster fit (disabled by default). - kWeightColourByAlpha = ( 1 << 7 ), - - //! Use a very slow but very high quality colour compressor. - kColourIterativeClusterFit = ( 1 << 8 ), -}; - -// ----------------------------------------------------------------------------- - -/*! @brief Compresses a 4x4 block of pixels. - - @param rgba The rgba values of the 16 source pixels. - @param mask The valid pixel mask. - @param block Storage for the compressed DXT block. - @param flags Compression flags. - @param metric An optional perceptual metric. - - The source pixels should be presented as a contiguous array of 16 rgba - values, with each component as 1 byte each. In memory this should be: - - { r1, g1, b1, a1, .... , r16, g16, b16, a16 } - - The mask parameter enables only certain pixels within the block. The lowest - bit enables the first pixel and so on up to the 16th bit. Bits beyond the - 16th bit are ignored. Pixels that are not enabled are allowed to take - arbitrary colours in the output block. An example of how this can be used - is in the CompressImage function to disable pixels outside the bounds of - the image when the width or height is not divisible by 4. - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. When using DXT1 - compression, 8 bytes of storage are required for the compressed DXT block. - DXT3 and DXT5 compression require 16 bytes of storage per block. - - The flags parameter can also specify a preferred colour compressor to use - when fitting the RGB components of the data. Possible colour compressors - are: kColourClusterFit (the default), kColourRangeFit (very fast, low - quality) or kColourIterativeClusterFit (slowest, best quality). - - When using kColourClusterFit or kColourIterativeClusterFit, an additional - flag can be specified to weight the importance of each pixel by its alpha - value. For images that are rendered using alpha blending, this can - significantly increase the perceived quality. - - The metric parameter can be used to weight the relative importance of each - colour channel, or pass NULL to use the default uniform weight of - { 1.0f, 1.0f, 1.0f }. This replaces the previous flag-based control that - allowed either uniform or "perceptual" weights with the fixed values - { 0.2126f, 0.7152f, 0.0722f }. If non-NULL, the metric should point to a - contiguous array of 3 floats. -*/ -void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric = 0 ); - -// ----------------------------------------------------------------------------- - -/*! @brief Compresses a 4x4 block of pixels. - - @param rgba The rgba values of the 16 source pixels. - @param block Storage for the compressed DXT block. - @param flags Compression flags. - @param metric An optional perceptual metric. - - The source pixels should be presented as a contiguous array of 16 rgba - values, with each component as 1 byte each. In memory this should be: - - { r1, g1, b1, a1, .... , r16, g16, b16, a16 } - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. When using DXT1 - compression, 8 bytes of storage are required for the compressed DXT block. - DXT3 and DXT5 compression require 16 bytes of storage per block. - - The flags parameter can also specify a preferred colour compressor to use - when fitting the RGB components of the data. Possible colour compressors - are: kColourClusterFit (the default), kColourRangeFit (very fast, low - quality) or kColourIterativeClusterFit (slowest, best quality). - - When using kColourClusterFit or kColourIterativeClusterFit, an additional - flag can be specified to weight the importance of each pixel by its alpha - value. For images that are rendered using alpha blending, this can - significantly increase the perceived quality. - - The metric parameter can be used to weight the relative importance of each - colour channel, or pass NULL to use the default uniform weight of - { 1.0f, 1.0f, 1.0f }. This replaces the previous flag-based control that - allowed either uniform or "perceptual" weights with the fixed values - { 0.2126f, 0.7152f, 0.0722f }. If non-NULL, the metric should point to a - contiguous array of 3 floats. - - This method is an inline that calls CompressMasked with a mask of 0xffff, - provided for compatibility with older versions of squish. -*/ -inline void Compress( u8 const* rgba, void* block, int flags, float* metric = 0 ) -{ - CompressMasked( rgba, 0xffff, block, flags, metric ); -} - -// ----------------------------------------------------------------------------- - -/*! @brief Decompresses a 4x4 block of pixels. - - @param rgba Storage for the 16 decompressed pixels. - @param block The compressed DXT block. - @param flags Compression flags. - - The decompressed pixels will be written as a contiguous array of 16 rgba - values, with each component as 1 byte each. In memory this is: - - { r1, g1, b1, a1, .... , r16, g16, b16, a16 } - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. All other flags - are ignored. -*/ -void Decompress( u8* rgba, void const* block, int flags ); - -// ----------------------------------------------------------------------------- - -/*! @brief Computes the amount of compressed storage required. - - @param width The width of the image. - @param height The height of the image. - @param flags Compression flags. - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. All other flags - are ignored. - - Most DXT images will be a multiple of 4 in each dimension, but this - function supports arbitrary size images by allowing the outer blocks to - be only partially used. -*/ -int GetStorageRequirements( int width, int height, int flags ); - -// ----------------------------------------------------------------------------- - -/*! @brief Compresses an image in memory. - - @param rgba The pixels of the source. - @param width The width of the source image. - @param height The height of the source image. - @param blocks Storage for the compressed output. - @param flags Compression flags. - @param metric An optional perceptual metric. - - The source pixels should be presented as a contiguous array of width*height - rgba values, with each component as 1 byte each. In memory this should be: - - { r1, g1, b1, a1, .... , rn, gn, bn, an } for n = width*height - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. When using DXT1 - compression, 8 bytes of storage are required for each compressed DXT block. - DXT3 and DXT5 compression require 16 bytes of storage per block. - - The flags parameter can also specify a preferred colour compressor to use - when fitting the RGB components of the data. Possible colour compressors - are: kColourClusterFit (the default), kColourRangeFit (very fast, low - quality) or kColourIterativeClusterFit (slowest, best quality). - - When using kColourClusterFit or kColourIterativeClusterFit, an additional - flag can be specified to weight the importance of each pixel by its alpha - value. For images that are rendered using alpha blending, this can - significantly increase the perceived quality. - - The metric parameter can be used to weight the relative importance of each - colour channel, or pass NULL to use the default uniform weight of - { 1.0f, 1.0f, 1.0f }. This replaces the previous flag-based control that - allowed either uniform or "perceptual" weights with the fixed values - { 0.2126f, 0.7152f, 0.0722f }. If non-NULL, the metric should point to a - contiguous array of 3 floats. - - Internally this function calls squish::CompressMasked for each block, which - allows for pixels outside the image to take arbitrary values. The function - squish::GetStorageRequirements can be called to compute the amount of memory - to allocate for the compressed output. -*/ -void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric = 0 ); - -// ----------------------------------------------------------------------------- - -/*! @brief Decompresses an image in memory. - - @param rgba Storage for the decompressed pixels. - @param width The width of the source image. - @param height The height of the source image. - @param blocks The compressed DXT blocks. - @param flags Compression flags. - - The decompressed pixels will be written as a contiguous array of width*height - 16 rgba values, with each component as 1 byte each. In memory this is: - - { r1, g1, b1, a1, .... , rn, gn, bn, an } for n = width*height - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. All other flags - are ignored. - - Internally this function calls squish::Decompress for each block. -*/ -void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags ); - -// ----------------------------------------------------------------------------- - -} // namespace squish - -#endif // ndef SQUISH_H - diff --git a/3rdparty/bgfx/3rdparty/lodepng/README.md b/3rdparty/bgfx/3rdparty/lodepng/README.md deleted file mode 100644 index 35f9254..0000000 --- a/3rdparty/bgfx/3rdparty/lodepng/README.md +++ /dev/null @@ -1,10 +0,0 @@ -LodePNG -------- - -PNG encoder and decoder in C and C++. - -Home page: http://lodev.org/lodepng/ - -Only two files are needed to allow your program to read and write PNG files: lodepng.cpp and lodepng.h. - -The other files in the project are just examples, unit tests, etc... diff --git a/3rdparty/bgfx/3rdparty/lodepng/lodepng.cpp b/3rdparty/bgfx/3rdparty/lodepng/lodepng.cpp deleted file mode 100644 index 7baf7f9..0000000 --- a/3rdparty/bgfx/3rdparty/lodepng/lodepng.cpp +++ /dev/null @@ -1,6224 +0,0 @@ -/* -LodePNG version 20160501 - -Copyright (c) 2005-2016 Lode Vandevenne - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -*/ - -/* -The manual and changelog are in the header file "lodepng.h" -Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for C. -*/ - -#include "lodepng.h" - -#include -#include -#include - -#if defined(_MSC_VER) && (_MSC_VER >= 1310) /*Visual Studio: A few warning types are not desired here.*/ -#pragma warning( disable : 4244 ) /*implicit conversions: not warned by gcc -Wall -Wextra and requires too much casts*/ -#pragma warning( disable : 4996 ) /*VS does not like fopen, but fopen_s is not standard C so unusable here*/ -#endif /*_MSC_VER */ - -const char* LODEPNG_VERSION_STRING = "20160501"; - -/* -This source file is built up in the following large parts. The code sections -with the "LODEPNG_COMPILE_" #defines divide this up further in an intermixed way. --Tools for C and common code for PNG and Zlib --C Code for Zlib (huffman, deflate, ...) --C Code for PNG (file format chunks, adam7, PNG filters, color conversions, ...) --The C++ wrapper around all of the above -*/ - -/*The malloc, realloc and free functions defined here with "lodepng_" in front -of the name, so that you can easily change them to others related to your -platform if needed. Everything else in the code calls these. Pass --DLODEPNG_NO_COMPILE_ALLOCATORS to the compiler, or comment out -#define LODEPNG_COMPILE_ALLOCATORS in the header, to disable the ones here and -define them in your own project's source files without needing to change -lodepng source code. Don't forget to remove "static" if you copypaste them -from here.*/ - -#ifdef LODEPNG_COMPILE_ALLOCATORS -static void* lodepng_malloc(size_t size) -{ - return malloc(size); -} - -static void* lodepng_realloc(void* ptr, size_t new_size) -{ - return realloc(ptr, new_size); -} - -static void lodepng_free(void* ptr) -{ - free(ptr); -} -#else /*LODEPNG_COMPILE_ALLOCATORS*/ -void* lodepng_malloc(size_t size); -void* lodepng_realloc(void* ptr, size_t new_size); -void lodepng_free(void* ptr); -#endif /*LODEPNG_COMPILE_ALLOCATORS*/ - -/* ////////////////////////////////////////////////////////////////////////// */ -/* ////////////////////////////////////////////////////////////////////////// */ -/* // Tools for C, and common code for PNG and Zlib. // */ -/* ////////////////////////////////////////////////////////////////////////// */ -/* ////////////////////////////////////////////////////////////////////////// */ - -/* -Often in case of an error a value is assigned to a variable and then it breaks -out of a loop (to go to the cleanup phase of a function). This macro does that. -It makes the error handling code shorter and more readable. - -Example: if(!uivector_resizev(&frequencies_ll, 286, 0)) ERROR_BREAK(83); -*/ -#define CERROR_BREAK(errorvar, code)\ -{\ - errorvar = code;\ - break;\ -} - -/*version of CERROR_BREAK that assumes the common case where the error variable is named "error"*/ -#define ERROR_BREAK(code) CERROR_BREAK(error, code) - -/*Set error var to the error code, and return it.*/ -#define CERROR_RETURN_ERROR(errorvar, code)\ -{\ - errorvar = code;\ - return code;\ -} - -/*Try the code, if it returns error, also return the error.*/ -#define CERROR_TRY_RETURN(call)\ -{\ - unsigned error = call;\ - if(error) return error;\ -} - -/*Set error var to the error code, and return from the void function.*/ -#define CERROR_RETURN(errorvar, code)\ -{\ - errorvar = code;\ - return;\ -} - -/* -About uivector, ucvector and string: --All of them wrap dynamic arrays or text strings in a similar way. --LodePNG was originally written in C++. The vectors replace the std::vectors that were used in the C++ version. --The string tools are made to avoid problems with compilers that declare things like strncat as deprecated. --They're not used in the interface, only internally in this file as static functions. --As with many other structs in this file, the init and cleanup functions serve as ctor and dtor. -*/ - -#ifdef LODEPNG_COMPILE_ZLIB -/*dynamic vector of unsigned ints*/ -typedef struct uivector -{ - unsigned* data; - size_t size; /*size in number of unsigned longs*/ - size_t allocsize; /*allocated size in bytes*/ -} uivector; - -static void uivector_cleanup(void* p) -{ - ((uivector*)p)->size = ((uivector*)p)->allocsize = 0; - lodepng_free(((uivector*)p)->data); - ((uivector*)p)->data = NULL; -} - -/*returns 1 if success, 0 if failure ==> nothing done*/ -static unsigned uivector_reserve(uivector* p, size_t allocsize) -{ - if(allocsize > p->allocsize) - { - size_t newsize = (allocsize > p->allocsize * 2) ? allocsize : (allocsize * 3 / 2); - void* data = lodepng_realloc(p->data, newsize); - if(data) - { - p->allocsize = newsize; - p->data = (unsigned*)data; - } - else return 0; /*error: not enough memory*/ - } - return 1; -} - -/*returns 1 if success, 0 if failure ==> nothing done*/ -static unsigned uivector_resize(uivector* p, size_t size) -{ - if(!uivector_reserve(p, size * sizeof(unsigned))) return 0; - p->size = size; - return 1; /*success*/ -} - -/*resize and give all new elements the value*/ -static unsigned uivector_resizev(uivector* p, size_t size, unsigned value) -{ - size_t oldsize = p->size, i; - if(!uivector_resize(p, size)) return 0; - for(i = oldsize; i < size; ++i) p->data[i] = value; - return 1; -} - -static void uivector_init(uivector* p) -{ - p->data = NULL; - p->size = p->allocsize = 0; -} - -#ifdef LODEPNG_COMPILE_ENCODER -/*returns 1 if success, 0 if failure ==> nothing done*/ -static unsigned uivector_push_back(uivector* p, unsigned c) -{ - if(!uivector_resize(p, p->size + 1)) return 0; - p->data[p->size - 1] = c; - return 1; -} -#endif /*LODEPNG_COMPILE_ENCODER*/ -#endif /*LODEPNG_COMPILE_ZLIB*/ - -/* /////////////////////////////////////////////////////////////////////////// */ - -/*dynamic vector of unsigned chars*/ -typedef struct ucvector -{ - unsigned char* data; - size_t size; /*used size*/ - size_t allocsize; /*allocated size*/ -} ucvector; - -/*returns 1 if success, 0 if failure ==> nothing done*/ -static unsigned ucvector_reserve(ucvector* p, size_t allocsize) -{ - if(allocsize > p->allocsize) - { - size_t newsize = (allocsize > p->allocsize * 2) ? allocsize : (allocsize * 3 / 2); - void* data = lodepng_realloc(p->data, newsize); - if(data) - { - p->allocsize = newsize; - p->data = (unsigned char*)data; - } - else return 0; /*error: not enough memory*/ - } - return 1; -} - -/*returns 1 if success, 0 if failure ==> nothing done*/ -static unsigned ucvector_resize(ucvector* p, size_t size) -{ - if(!ucvector_reserve(p, size * sizeof(unsigned char))) return 0; - p->size = size; - return 1; /*success*/ -} - -#ifdef LODEPNG_COMPILE_PNG - -static void ucvector_cleanup(void* p) -{ - ((ucvector*)p)->size = ((ucvector*)p)->allocsize = 0; - lodepng_free(((ucvector*)p)->data); - ((ucvector*)p)->data = NULL; -} - -static void ucvector_init(ucvector* p) -{ - p->data = NULL; - p->size = p->allocsize = 0; -} -#endif /*LODEPNG_COMPILE_PNG*/ - -#ifdef LODEPNG_COMPILE_ZLIB -/*you can both convert from vector to buffer&size and vica versa. If you use -init_buffer to take over a buffer and size, it is not needed to use cleanup*/ -static void ucvector_init_buffer(ucvector* p, unsigned char* buffer, size_t size) -{ - p->data = buffer; - p->allocsize = p->size = size; -} -#endif /*LODEPNG_COMPILE_ZLIB*/ - -#if (defined(LODEPNG_COMPILE_PNG) && defined(LODEPNG_COMPILE_ANCILLARY_CHUNKS)) || defined(LODEPNG_COMPILE_ENCODER) -/*returns 1 if success, 0 if failure ==> nothing done*/ -static unsigned ucvector_push_back(ucvector* p, unsigned char c) -{ - if(!ucvector_resize(p, p->size + 1)) return 0; - p->data[p->size - 1] = c; - return 1; -} -#endif /*defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER)*/ - - -/* ////////////////////////////////////////////////////////////////////////// */ - -#ifdef LODEPNG_COMPILE_PNG -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS -/*returns 1 if success, 0 if failure ==> nothing done*/ -static unsigned string_resize(char** out, size_t size) -{ - char* data = (char*)lodepng_realloc(*out, size + 1); - if(data) - { - data[size] = 0; /*null termination char*/ - *out = data; - } - return data != 0; -} - -/*init a {char*, size_t} pair for use as string*/ -static void string_init(char** out) -{ - *out = NULL; - string_resize(out, 0); -} - -/*free the above pair again*/ -static void string_cleanup(char** out) -{ - lodepng_free(*out); - *out = NULL; -} - -static void string_set(char** out, const char* in) -{ - size_t insize = strlen(in), i; - if(string_resize(out, insize)) - { - for(i = 0; i != insize; ++i) - { - (*out)[i] = in[i]; - } - } -} -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ -#endif /*LODEPNG_COMPILE_PNG*/ - -/* ////////////////////////////////////////////////////////////////////////// */ - -unsigned lodepng_read32bitInt(const unsigned char* buffer) -{ - return (unsigned)((buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3]); -} - -#if defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER) -/*buffer must have at least 4 allocated bytes available*/ -static void lodepng_set32bitInt(unsigned char* buffer, unsigned value) -{ - buffer[0] = (unsigned char)((value >> 24) & 0xff); - buffer[1] = (unsigned char)((value >> 16) & 0xff); - buffer[2] = (unsigned char)((value >> 8) & 0xff); - buffer[3] = (unsigned char)((value ) & 0xff); -} -#endif /*defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER)*/ - -#ifdef LODEPNG_COMPILE_ENCODER -static void lodepng_add32bitInt(ucvector* buffer, unsigned value) -{ - ucvector_resize(buffer, buffer->size + 4); /*todo: give error if resize failed*/ - lodepng_set32bitInt(&buffer->data[buffer->size - 4], value); -} -#endif /*LODEPNG_COMPILE_ENCODER*/ - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / File IO / */ -/* ////////////////////////////////////////////////////////////////////////// */ - -#ifdef LODEPNG_COMPILE_DISK - -/* returns negative value on error. This should be pure C compatible, so no fstat. */ -static long lodepng_filesize(const char* filename) -{ - FILE* file; - long size; - file = fopen(filename, "rb"); - if(!file) return -1; - - if(fseek(file, 0, SEEK_END) != 0) - { - fclose(file); - return -1; - } - - size = ftell(file); - /* It may give LONG_MAX as directory size, this is invalid for us. */ - if(size == LONG_MAX) size = -1; - - fclose(file); - return size; -} - -/* load file into buffer that already has the correct allocated size. Returns error code.*/ -static unsigned lodepng_buffer_file(unsigned char* out, size_t size, const char* filename) -{ - FILE* file; - size_t readsize; - file = fopen(filename, "rb"); - if(!file) return 78; - - readsize = fread(out, 1, size, file); - fclose(file); - - if (readsize != size) return 78; - return 0; -} - -unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename) -{ - long size = lodepng_filesize(filename); - if (size < 0) return 78; - *outsize = (size_t)size; - - *out = (unsigned char*)lodepng_malloc((size_t)size); - if(!(*out) && size > 0) return 83; /*the above malloc failed*/ - - return lodepng_buffer_file(*out, (size_t)size, filename); -} - -/*write given buffer to the file, overwriting the file, it doesn't append to it.*/ -unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename) -{ - FILE* file; - file = fopen(filename, "wb" ); - if(!file) return 79; - fwrite((char*)buffer , 1 , buffersize, file); - fclose(file); - return 0; -} - -#endif /*LODEPNG_COMPILE_DISK*/ - -/* ////////////////////////////////////////////////////////////////////////// */ -/* ////////////////////////////////////////////////////////////////////////// */ -/* // End of common code and tools. Begin of Zlib related code. // */ -/* ////////////////////////////////////////////////////////////////////////// */ -/* ////////////////////////////////////////////////////////////////////////// */ - -#ifdef LODEPNG_COMPILE_ZLIB -#ifdef LODEPNG_COMPILE_ENCODER -/*TODO: this ignores potential out of memory errors*/ -#define addBitToStream(/*size_t**/ bitpointer, /*ucvector**/ bitstream, /*unsigned char*/ bit)\ -{\ - /*add a new byte at the end*/\ - if(((*bitpointer) & 7) == 0) ucvector_push_back(bitstream, (unsigned char)0);\ - /*earlier bit of huffman code is in a lesser significant bit of an earlier byte*/\ - (bitstream->data[bitstream->size - 1]) |= (bit << ((*bitpointer) & 0x7));\ - ++(*bitpointer);\ -} - -static void addBitsToStream(size_t* bitpointer, ucvector* bitstream, unsigned value, size_t nbits) -{ - size_t i; - for(i = 0; i != nbits; ++i) addBitToStream(bitpointer, bitstream, (unsigned char)((value >> i) & 1)); -} - -static void addBitsToStreamReversed(size_t* bitpointer, ucvector* bitstream, unsigned value, size_t nbits) -{ - size_t i; - for(i = 0; i != nbits; ++i) addBitToStream(bitpointer, bitstream, (unsigned char)((value >> (nbits - 1 - i)) & 1)); -} -#endif /*LODEPNG_COMPILE_ENCODER*/ - -#ifdef LODEPNG_COMPILE_DECODER - -#define READBIT(bitpointer, bitstream) ((bitstream[bitpointer >> 3] >> (bitpointer & 0x7)) & (unsigned char)1) - -static unsigned char readBitFromStream(size_t* bitpointer, const unsigned char* bitstream) -{ - unsigned char result = (unsigned char)(READBIT(*bitpointer, bitstream)); - ++(*bitpointer); - return result; -} - -static unsigned readBitsFromStream(size_t* bitpointer, const unsigned char* bitstream, size_t nbits) -{ - unsigned result = 0, i; - for(i = 0; i != nbits; ++i) - { - result += ((unsigned)READBIT(*bitpointer, bitstream)) << i; - ++(*bitpointer); - } - return result; -} -#endif /*LODEPNG_COMPILE_DECODER*/ - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / Deflate - Huffman / */ -/* ////////////////////////////////////////////////////////////////////////// */ - -#define FIRST_LENGTH_CODE_INDEX 257 -#define LAST_LENGTH_CODE_INDEX 285 -/*256 literals, the end code, some length codes, and 2 unused codes*/ -#define NUM_DEFLATE_CODE_SYMBOLS 288 -/*the distance codes have their own symbols, 30 used, 2 unused*/ -#define NUM_DISTANCE_SYMBOLS 32 -/*the code length codes. 0-15: code lengths, 16: copy previous 3-6 times, 17: 3-10 zeros, 18: 11-138 zeros*/ -#define NUM_CODE_LENGTH_CODES 19 - -/*the base lengths represented by codes 257-285*/ -static const unsigned LENGTHBASE[29] - = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, - 67, 83, 99, 115, 131, 163, 195, 227, 258}; - -/*the extra bits used by codes 257-285 (added to base length)*/ -static const unsigned LENGTHEXTRA[29] - = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, - 4, 4, 4, 4, 5, 5, 5, 5, 0}; - -/*the base backwards distances (the bits of distance codes appear after length codes and use their own huffman tree)*/ -static const unsigned DISTANCEBASE[30] - = {1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, - 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; - -/*the extra bits of backwards distances (added to base)*/ -static const unsigned DISTANCEEXTRA[30] - = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, - 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; - -/*the order in which "code length alphabet code lengths" are stored, out of this -the huffman tree of the dynamic huffman tree lengths is generated*/ -static const unsigned CLCL_ORDER[NUM_CODE_LENGTH_CODES] - = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - -/* ////////////////////////////////////////////////////////////////////////// */ - -/* -Huffman tree struct, containing multiple representations of the tree -*/ -typedef struct HuffmanTree -{ - unsigned* tree2d; - unsigned* tree1d; - unsigned* lengths; /*the lengths of the codes of the 1d-tree*/ - unsigned maxbitlen; /*maximum number of bits a single code can get*/ - unsigned numcodes; /*number of symbols in the alphabet = number of codes*/ -} HuffmanTree; - -/*function used for debug purposes to draw the tree in ascii art with C++*/ -/* -static void HuffmanTree_draw(HuffmanTree* tree) -{ - std::cout << "tree. length: " << tree->numcodes << " maxbitlen: " << tree->maxbitlen << std::endl; - for(size_t i = 0; i != tree->tree1d.size; ++i) - { - if(tree->lengths.data[i]) - std::cout << i << " " << tree->tree1d.data[i] << " " << tree->lengths.data[i] << std::endl; - } - std::cout << std::endl; -}*/ - -static void HuffmanTree_init(HuffmanTree* tree) -{ - tree->tree2d = 0; - tree->tree1d = 0; - tree->lengths = 0; -} - -static void HuffmanTree_cleanup(HuffmanTree* tree) -{ - lodepng_free(tree->tree2d); - lodepng_free(tree->tree1d); - lodepng_free(tree->lengths); -} - -/*the tree representation used by the decoder. return value is error*/ -static unsigned HuffmanTree_make2DTree(HuffmanTree* tree) -{ - unsigned nodefilled = 0; /*up to which node it is filled*/ - unsigned treepos = 0; /*position in the tree (1 of the numcodes columns)*/ - unsigned n, i; - - tree->tree2d = (unsigned*)lodepng_malloc(tree->numcodes * 2 * sizeof(unsigned)); - if(!tree->tree2d) return 83; /*alloc fail*/ - - /* - convert tree1d[] to tree2d[][]. In the 2D array, a value of 32767 means - uninited, a value >= numcodes is an address to another bit, a value < numcodes - is a code. The 2 rows are the 2 possible bit values (0 or 1), there are as - many columns as codes - 1. - A good huffman tree has N * 2 - 1 nodes, of which N - 1 are internal nodes. - Here, the internal nodes are stored (what their 0 and 1 option point to). - There is only memory for such good tree currently, if there are more nodes - (due to too long length codes), error 55 will happen - */ - for(n = 0; n < tree->numcodes * 2; ++n) - { - tree->tree2d[n] = 32767; /*32767 here means the tree2d isn't filled there yet*/ - } - - for(n = 0; n < tree->numcodes; ++n) /*the codes*/ - { - for(i = 0; i != tree->lengths[n]; ++i) /*the bits for this code*/ - { - unsigned char bit = (unsigned char)((tree->tree1d[n] >> (tree->lengths[n] - i - 1)) & 1); - /*oversubscribed, see comment in lodepng_error_text*/ - if(treepos > 2147483647 || treepos + 2 > tree->numcodes) return 55; - if(tree->tree2d[2 * treepos + bit] == 32767) /*not yet filled in*/ - { - if(i + 1 == tree->lengths[n]) /*last bit*/ - { - tree->tree2d[2 * treepos + bit] = n; /*put the current code in it*/ - treepos = 0; - } - else - { - /*put address of the next step in here, first that address has to be found of course - (it's just nodefilled + 1)...*/ - ++nodefilled; - /*addresses encoded with numcodes added to it*/ - tree->tree2d[2 * treepos + bit] = nodefilled + tree->numcodes; - treepos = nodefilled; - } - } - else treepos = tree->tree2d[2 * treepos + bit] - tree->numcodes; - } - } - - for(n = 0; n < tree->numcodes * 2; ++n) - { - if(tree->tree2d[n] == 32767) tree->tree2d[n] = 0; /*remove possible remaining 32767's*/ - } - - return 0; -} - -/* -Second step for the ...makeFromLengths and ...makeFromFrequencies functions. -numcodes, lengths and maxbitlen must already be filled in correctly. return -value is error. -*/ -static unsigned HuffmanTree_makeFromLengths2(HuffmanTree* tree) -{ - uivector blcount; - uivector nextcode; - unsigned error = 0; - unsigned bits, n; - - uivector_init(&blcount); - uivector_init(&nextcode); - - tree->tree1d = (unsigned*)lodepng_malloc(tree->numcodes * sizeof(unsigned)); - if(!tree->tree1d) error = 83; /*alloc fail*/ - - if(!uivector_resizev(&blcount, tree->maxbitlen + 1, 0) - || !uivector_resizev(&nextcode, tree->maxbitlen + 1, 0)) - error = 83; /*alloc fail*/ - - if(!error) - { - /*step 1: count number of instances of each code length*/ - for(bits = 0; bits != tree->numcodes; ++bits) ++blcount.data[tree->lengths[bits]]; - /*step 2: generate the nextcode values*/ - for(bits = 1; bits <= tree->maxbitlen; ++bits) - { - nextcode.data[bits] = (nextcode.data[bits - 1] + blcount.data[bits - 1]) << 1; - } - /*step 3: generate all the codes*/ - for(n = 0; n != tree->numcodes; ++n) - { - if(tree->lengths[n] != 0) tree->tree1d[n] = nextcode.data[tree->lengths[n]]++; - } - } - - uivector_cleanup(&blcount); - uivector_cleanup(&nextcode); - - if(!error) return HuffmanTree_make2DTree(tree); - else return error; -} - -/* -given the code lengths (as stored in the PNG file), generate the tree as defined -by Deflate. maxbitlen is the maximum bits that a code in the tree can have. -return value is error. -*/ -static unsigned HuffmanTree_makeFromLengths(HuffmanTree* tree, const unsigned* bitlen, - size_t numcodes, unsigned maxbitlen) -{ - unsigned i; - tree->lengths = (unsigned*)lodepng_malloc(numcodes * sizeof(unsigned)); - if(!tree->lengths) return 83; /*alloc fail*/ - for(i = 0; i != numcodes; ++i) tree->lengths[i] = bitlen[i]; - tree->numcodes = (unsigned)numcodes; /*number of symbols*/ - tree->maxbitlen = maxbitlen; - return HuffmanTree_makeFromLengths2(tree); -} - -#ifdef LODEPNG_COMPILE_ENCODER - -/*BPM: Boundary Package Merge, see "A Fast and Space-Economical Algorithm for Length-Limited Coding", -Jyrki Katajainen, Alistair Moffat, Andrew Turpin, 1995.*/ - -/*chain node for boundary package merge*/ -typedef struct BPMNode -{ - int weight; /*the sum of all weights in this chain*/ - unsigned index; /*index of this leaf node (called "count" in the paper)*/ - struct BPMNode* tail; /*the next nodes in this chain (null if last)*/ - int in_use; -} BPMNode; - -/*lists of chains*/ -typedef struct BPMLists -{ - /*memory pool*/ - unsigned memsize; - BPMNode* memory; - unsigned numfree; - unsigned nextfree; - BPMNode** freelist; - /*two heads of lookahead chains per list*/ - unsigned listsize; - BPMNode** chains0; - BPMNode** chains1; -} BPMLists; - -/*creates a new chain node with the given parameters, from the memory in the lists */ -static BPMNode* bpmnode_create(BPMLists* lists, int weight, unsigned index, BPMNode* tail) -{ - unsigned i; - BPMNode* result; - - /*memory full, so garbage collect*/ - if(lists->nextfree >= lists->numfree) - { - /*mark only those that are in use*/ - for(i = 0; i != lists->memsize; ++i) lists->memory[i].in_use = 0; - for(i = 0; i != lists->listsize; ++i) - { - BPMNode* node; - for(node = lists->chains0[i]; node != 0; node = node->tail) node->in_use = 1; - for(node = lists->chains1[i]; node != 0; node = node->tail) node->in_use = 1; - } - /*collect those that are free*/ - lists->numfree = 0; - for(i = 0; i != lists->memsize; ++i) - { - if(!lists->memory[i].in_use) lists->freelist[lists->numfree++] = &lists->memory[i]; - } - lists->nextfree = 0; - } - - result = lists->freelist[lists->nextfree++]; - result->weight = weight; - result->index = index; - result->tail = tail; - return result; -} - -/*sort the leaves with stable mergesort*/ -static void bpmnode_sort(BPMNode* leaves, size_t num) -{ - BPMNode* mem = (BPMNode*)lodepng_malloc(sizeof(*leaves) * num); - size_t width, counter = 0; - for(width = 1; width < num; width *= 2) - { - BPMNode* a = (counter & 1) ? mem : leaves; - BPMNode* b = (counter & 1) ? leaves : mem; - size_t p; - for(p = 0; p < num; p += 2 * width) - { - size_t q = (p + width > num) ? num : (p + width); - size_t r = (p + 2 * width > num) ? num : (p + 2 * width); - size_t i = p, j = q, k; - for(k = p; k < r; k++) - { - if(i < q && (j >= r || a[i].weight <= a[j].weight)) b[k] = a[i++]; - else b[k] = a[j++]; - } - } - counter++; - } - if(counter & 1) memcpy(leaves, mem, sizeof(*leaves) * num); - lodepng_free(mem); -} - -/*Boundary Package Merge step, numpresent is the amount of leaves, and c is the current chain.*/ -static void boundaryPM(BPMLists* lists, BPMNode* leaves, size_t numpresent, int c, int num) -{ - unsigned lastindex = lists->chains1[c]->index; - - if(c == 0) - { - if(lastindex >= numpresent) return; - lists->chains0[c] = lists->chains1[c]; - lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, 0); - } - else - { - /*sum of the weights of the head nodes of the previous lookahead chains.*/ - int sum = lists->chains0[c - 1]->weight + lists->chains1[c - 1]->weight; - lists->chains0[c] = lists->chains1[c]; - if(lastindex < numpresent && sum > leaves[lastindex].weight) - { - lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, lists->chains1[c]->tail); - return; - } - lists->chains1[c] = bpmnode_create(lists, sum, lastindex, lists->chains1[c - 1]); - /*in the end we are only interested in the chain of the last list, so no - need to recurse if we're at the last one (this gives measurable speedup)*/ - if(num + 1 < (int)(2 * numpresent - 2)) - { - boundaryPM(lists, leaves, numpresent, c - 1, num); - boundaryPM(lists, leaves, numpresent, c - 1, num); - } - } -} - -unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequencies, - size_t numcodes, unsigned maxbitlen) -{ - unsigned error = 0; - unsigned i; - size_t numpresent = 0; /*number of symbols with non-zero frequency*/ - BPMNode* leaves; /*the symbols, only those with > 0 frequency*/ - - if(numcodes == 0) return 80; /*error: a tree of 0 symbols is not supposed to be made*/ - if((1u << maxbitlen) < numcodes) return 80; /*error: represent all symbols*/ - - leaves = (BPMNode*)lodepng_malloc(numcodes * sizeof(*leaves)); - if(!leaves) return 83; /*alloc fail*/ - - for(i = 0; i != numcodes; ++i) - { - if(frequencies[i] > 0) - { - leaves[numpresent].weight = (int)frequencies[i]; - leaves[numpresent].index = i; - ++numpresent; - } - } - - for(i = 0; i != numcodes; ++i) lengths[i] = 0; - - /*ensure at least two present symbols. There should be at least one symbol - according to RFC 1951 section 3.2.7. Some decoders incorrectly require two. To - make these work as well ensure there are at least two symbols. The - Package-Merge code below also doesn't work correctly if there's only one - symbol, it'd give it the theoritical 0 bits but in practice zlib wants 1 bit*/ - if(numpresent == 0) - { - lengths[0] = lengths[1] = 1; /*note that for RFC 1951 section 3.2.7, only lengths[0] = 1 is needed*/ - } - else if(numpresent == 1) - { - lengths[leaves[0].index] = 1; - lengths[leaves[0].index == 0 ? 1 : 0] = 1; - } - else - { - BPMLists lists; - BPMNode* node; - - bpmnode_sort(leaves, numpresent); - - lists.listsize = maxbitlen; - lists.memsize = 2 * maxbitlen * (maxbitlen + 1); - lists.nextfree = 0; - lists.numfree = lists.memsize; - lists.memory = (BPMNode*)lodepng_malloc(lists.memsize * sizeof(*lists.memory)); - lists.freelist = (BPMNode**)lodepng_malloc(lists.memsize * sizeof(BPMNode*)); - lists.chains0 = (BPMNode**)lodepng_malloc(lists.listsize * sizeof(BPMNode*)); - lists.chains1 = (BPMNode**)lodepng_malloc(lists.listsize * sizeof(BPMNode*)); - if(!lists.memory || !lists.freelist || !lists.chains0 || !lists.chains1) error = 83; /*alloc fail*/ - - if(!error) - { - for(i = 0; i != lists.memsize; ++i) lists.freelist[i] = &lists.memory[i]; - - bpmnode_create(&lists, leaves[0].weight, 1, 0); - bpmnode_create(&lists, leaves[1].weight, 2, 0); - - for(i = 0; i != lists.listsize; ++i) - { - lists.chains0[i] = &lists.memory[0]; - lists.chains1[i] = &lists.memory[1]; - } - - /*each boundaryPM call adds one chain to the last list, and we need 2 * numpresent - 2 chains.*/ - for(i = 2; i != 2 * numpresent - 2; ++i) boundaryPM(&lists, leaves, numpresent, (int)maxbitlen - 1, (int)i); - - for(node = lists.chains1[maxbitlen - 1]; node; node = node->tail) - { - for(i = 0; i != node->index; ++i) ++lengths[leaves[i].index]; - } - } - - lodepng_free(lists.memory); - lodepng_free(lists.freelist); - lodepng_free(lists.chains0); - lodepng_free(lists.chains1); - } - - lodepng_free(leaves); - return error; -} - -/*Create the Huffman tree given the symbol frequencies*/ -static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const unsigned* frequencies, - size_t mincodes, size_t numcodes, unsigned maxbitlen) -{ - unsigned error = 0; - while(!frequencies[numcodes - 1] && numcodes > mincodes) --numcodes; /*trim zeroes*/ - tree->maxbitlen = maxbitlen; - tree->numcodes = (unsigned)numcodes; /*number of symbols*/ - tree->lengths = (unsigned*)lodepng_realloc(tree->lengths, numcodes * sizeof(unsigned)); - if(!tree->lengths) return 83; /*alloc fail*/ - /*initialize all lengths to 0*/ - memset(tree->lengths, 0, numcodes * sizeof(unsigned)); - - error = lodepng_huffman_code_lengths(tree->lengths, frequencies, numcodes, maxbitlen); - if(!error) error = HuffmanTree_makeFromLengths2(tree); - return error; -} - -static unsigned HuffmanTree_getCode(const HuffmanTree* tree, unsigned index) -{ - return tree->tree1d[index]; -} - -static unsigned HuffmanTree_getLength(const HuffmanTree* tree, unsigned index) -{ - return tree->lengths[index]; -} -#endif /*LODEPNG_COMPILE_ENCODER*/ - -/*get the literal and length code tree of a deflated block with fixed tree, as per the deflate specification*/ -static unsigned generateFixedLitLenTree(HuffmanTree* tree) -{ - unsigned i, error = 0; - unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned)); - if(!bitlen) return 83; /*alloc fail*/ - - /*288 possible codes: 0-255=literals, 256=endcode, 257-285=lengthcodes, 286-287=unused*/ - for(i = 0; i <= 143; ++i) bitlen[i] = 8; - for(i = 144; i <= 255; ++i) bitlen[i] = 9; - for(i = 256; i <= 279; ++i) bitlen[i] = 7; - for(i = 280; i <= 287; ++i) bitlen[i] = 8; - - error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DEFLATE_CODE_SYMBOLS, 15); - - lodepng_free(bitlen); - return error; -} - -/*get the distance code tree of a deflated block with fixed tree, as specified in the deflate specification*/ -static unsigned generateFixedDistanceTree(HuffmanTree* tree) -{ - unsigned i, error = 0; - unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned)); - if(!bitlen) return 83; /*alloc fail*/ - - /*there are 32 distance codes, but 30-31 are unused*/ - for(i = 0; i != NUM_DISTANCE_SYMBOLS; ++i) bitlen[i] = 5; - error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DISTANCE_SYMBOLS, 15); - - lodepng_free(bitlen); - return error; -} - -#ifdef LODEPNG_COMPILE_DECODER - -/* -returns the code, or (unsigned)(-1) if error happened -inbitlength is the length of the complete buffer, in bits (so its byte length times 8) -*/ -static unsigned huffmanDecodeSymbol(const unsigned char* in, size_t* bp, - const HuffmanTree* codetree, size_t inbitlength) -{ - unsigned treepos = 0, ct; - for(;;) - { - if(*bp >= inbitlength) return (unsigned)(-1); /*error: end of input memory reached without endcode*/ - /* - decode the symbol from the tree. The "readBitFromStream" code is inlined in - the expression below because this is the biggest bottleneck while decoding - */ - ct = codetree->tree2d[(treepos << 1) + READBIT(*bp, in)]; - ++(*bp); - if(ct < codetree->numcodes) return ct; /*the symbol is decoded, return it*/ - else treepos = ct - codetree->numcodes; /*symbol not yet decoded, instead move tree position*/ - - if(treepos >= codetree->numcodes) return (unsigned)(-1); /*error: it appeared outside the codetree*/ - } -} -#endif /*LODEPNG_COMPILE_DECODER*/ - -#ifdef LODEPNG_COMPILE_DECODER - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / Inflator (Decompressor) / */ -/* ////////////////////////////////////////////////////////////////////////// */ - -/*get the tree of a deflated block with fixed tree, as specified in the deflate specification*/ -static void getTreeInflateFixed(HuffmanTree* tree_ll, HuffmanTree* tree_d) -{ - /*TODO: check for out of memory errors*/ - generateFixedLitLenTree(tree_ll); - generateFixedDistanceTree(tree_d); -} - -/*get the tree of a deflated block with dynamic tree, the tree itself is also Huffman compressed with a known tree*/ -static unsigned getTreeInflateDynamic(HuffmanTree* tree_ll, HuffmanTree* tree_d, - const unsigned char* in, size_t* bp, size_t inlength) -{ - /*make sure that length values that aren't filled in will be 0, or a wrong tree will be generated*/ - unsigned error = 0; - unsigned n, HLIT, HDIST, HCLEN, i; - size_t inbitlength = inlength * 8; - - /*see comments in deflateDynamic for explanation of the context and these variables, it is analogous*/ - unsigned* bitlen_ll = 0; /*lit,len code lengths*/ - unsigned* bitlen_d = 0; /*dist code lengths*/ - /*code length code lengths ("clcl"), the bit lengths of the huffman tree used to compress bitlen_ll and bitlen_d*/ - unsigned* bitlen_cl = 0; - HuffmanTree tree_cl; /*the code tree for code length codes (the huffman tree for compressed huffman trees)*/ - - if((*bp) + 14 > (inlength << 3)) return 49; /*error: the bit pointer is or will go past the memory*/ - - /*number of literal/length codes + 257. Unlike the spec, the value 257 is added to it here already*/ - HLIT = readBitsFromStream(bp, in, 5) + 257; - /*number of distance codes. Unlike the spec, the value 1 is added to it here already*/ - HDIST = readBitsFromStream(bp, in, 5) + 1; - /*number of code length codes. Unlike the spec, the value 4 is added to it here already*/ - HCLEN = readBitsFromStream(bp, in, 4) + 4; - - if((*bp) + HCLEN * 3 > (inlength << 3)) return 50; /*error: the bit pointer is or will go past the memory*/ - - HuffmanTree_init(&tree_cl); - - while(!error) - { - /*read the code length codes out of 3 * (amount of code length codes) bits*/ - - bitlen_cl = (unsigned*)lodepng_malloc(NUM_CODE_LENGTH_CODES * sizeof(unsigned)); - if(!bitlen_cl) ERROR_BREAK(83 /*alloc fail*/); - - for(i = 0; i != NUM_CODE_LENGTH_CODES; ++i) - { - if(i < HCLEN) bitlen_cl[CLCL_ORDER[i]] = readBitsFromStream(bp, in, 3); - else bitlen_cl[CLCL_ORDER[i]] = 0; /*if not, it must stay 0*/ - } - - error = HuffmanTree_makeFromLengths(&tree_cl, bitlen_cl, NUM_CODE_LENGTH_CODES, 7); - if(error) break; - - /*now we can use this tree to read the lengths for the tree that this function will return*/ - bitlen_ll = (unsigned*)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned)); - bitlen_d = (unsigned*)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned)); - if(!bitlen_ll || !bitlen_d) ERROR_BREAK(83 /*alloc fail*/); - for(i = 0; i != NUM_DEFLATE_CODE_SYMBOLS; ++i) bitlen_ll[i] = 0; - for(i = 0; i != NUM_DISTANCE_SYMBOLS; ++i) bitlen_d[i] = 0; - - /*i is the current symbol we're reading in the part that contains the code lengths of lit/len and dist codes*/ - i = 0; - while(i < HLIT + HDIST) - { - unsigned code = huffmanDecodeSymbol(in, bp, &tree_cl, inbitlength); - if(code <= 15) /*a length code*/ - { - if(i < HLIT) bitlen_ll[i] = code; - else bitlen_d[i - HLIT] = code; - ++i; - } - else if(code == 16) /*repeat previous*/ - { - unsigned replength = 3; /*read in the 2 bits that indicate repeat length (3-6)*/ - unsigned value; /*set value to the previous code*/ - - if(i == 0) ERROR_BREAK(54); /*can't repeat previous if i is 0*/ - - if((*bp + 2) > inbitlength) ERROR_BREAK(50); /*error, bit pointer jumps past memory*/ - replength += readBitsFromStream(bp, in, 2); - - if(i < HLIT + 1) value = bitlen_ll[i - 1]; - else value = bitlen_d[i - HLIT - 1]; - /*repeat this value in the next lengths*/ - for(n = 0; n < replength; ++n) - { - if(i >= HLIT + HDIST) ERROR_BREAK(13); /*error: i is larger than the amount of codes*/ - if(i < HLIT) bitlen_ll[i] = value; - else bitlen_d[i - HLIT] = value; - ++i; - } - } - else if(code == 17) /*repeat "0" 3-10 times*/ - { - unsigned replength = 3; /*read in the bits that indicate repeat length*/ - if((*bp + 3) > inbitlength) ERROR_BREAK(50); /*error, bit pointer jumps past memory*/ - replength += readBitsFromStream(bp, in, 3); - - /*repeat this value in the next lengths*/ - for(n = 0; n < replength; ++n) - { - if(i >= HLIT + HDIST) ERROR_BREAK(14); /*error: i is larger than the amount of codes*/ - - if(i < HLIT) bitlen_ll[i] = 0; - else bitlen_d[i - HLIT] = 0; - ++i; - } - } - else if(code == 18) /*repeat "0" 11-138 times*/ - { - unsigned replength = 11; /*read in the bits that indicate repeat length*/ - if((*bp + 7) > inbitlength) ERROR_BREAK(50); /*error, bit pointer jumps past memory*/ - replength += readBitsFromStream(bp, in, 7); - - /*repeat this value in the next lengths*/ - for(n = 0; n < replength; ++n) - { - if(i >= HLIT + HDIST) ERROR_BREAK(15); /*error: i is larger than the amount of codes*/ - - if(i < HLIT) bitlen_ll[i] = 0; - else bitlen_d[i - HLIT] = 0; - ++i; - } - } - else /*if(code == (unsigned)(-1))*/ /*huffmanDecodeSymbol returns (unsigned)(-1) in case of error*/ - { - if(code == (unsigned)(-1)) - { - /*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol - (10=no endcode, 11=wrong jump outside of tree)*/ - error = (*bp) > inbitlength ? 10 : 11; - } - else error = 16; /*unexisting code, this can never happen*/ - break; - } - } - if(error) break; - - if(bitlen_ll[256] == 0) ERROR_BREAK(64); /*the length of the end code 256 must be larger than 0*/ - - /*now we've finally got HLIT and HDIST, so generate the code trees, and the function is done*/ - error = HuffmanTree_makeFromLengths(tree_ll, bitlen_ll, NUM_DEFLATE_CODE_SYMBOLS, 15); - if(error) break; - error = HuffmanTree_makeFromLengths(tree_d, bitlen_d, NUM_DISTANCE_SYMBOLS, 15); - - break; /*end of error-while*/ - } - - lodepng_free(bitlen_cl); - lodepng_free(bitlen_ll); - lodepng_free(bitlen_d); - HuffmanTree_cleanup(&tree_cl); - - return error; -} - -/*inflate a block with dynamic of fixed Huffman tree*/ -static unsigned inflateHuffmanBlock(ucvector* out, const unsigned char* in, size_t* bp, - size_t* pos, size_t inlength, unsigned btype) -{ - unsigned error = 0; - HuffmanTree tree_ll; /*the huffman tree for literal and length codes*/ - HuffmanTree tree_d; /*the huffman tree for distance codes*/ - size_t inbitlength = inlength * 8; - - HuffmanTree_init(&tree_ll); - HuffmanTree_init(&tree_d); - - if(btype == 1) getTreeInflateFixed(&tree_ll, &tree_d); - else if(btype == 2) error = getTreeInflateDynamic(&tree_ll, &tree_d, in, bp, inlength); - - while(!error) /*decode all symbols until end reached, breaks at end code*/ - { - /*code_ll is literal, length or end code*/ - unsigned code_ll = huffmanDecodeSymbol(in, bp, &tree_ll, inbitlength); - if(code_ll <= 255) /*literal symbol*/ - { - /*ucvector_push_back would do the same, but for some reason the two lines below run 10% faster*/ - if(!ucvector_resize(out, (*pos) + 1)) ERROR_BREAK(83 /*alloc fail*/); - out->data[*pos] = (unsigned char)code_ll; - ++(*pos); - } - else if(code_ll >= FIRST_LENGTH_CODE_INDEX && code_ll <= LAST_LENGTH_CODE_INDEX) /*length code*/ - { - unsigned code_d, distance; - unsigned numextrabits_l, numextrabits_d; /*extra bits for length and distance*/ - size_t start, forward, backward, length; - - /*part 1: get length base*/ - length = LENGTHBASE[code_ll - FIRST_LENGTH_CODE_INDEX]; - - /*part 2: get extra bits and add the value of that to length*/ - numextrabits_l = LENGTHEXTRA[code_ll - FIRST_LENGTH_CODE_INDEX]; - if((*bp + numextrabits_l) > inbitlength) ERROR_BREAK(51); /*error, bit pointer will jump past memory*/ - length += readBitsFromStream(bp, in, numextrabits_l); - - /*part 3: get distance code*/ - code_d = huffmanDecodeSymbol(in, bp, &tree_d, inbitlength); - if(code_d > 29) - { - if(code_ll == (unsigned)(-1)) /*huffmanDecodeSymbol returns (unsigned)(-1) in case of error*/ - { - /*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol - (10=no endcode, 11=wrong jump outside of tree)*/ - error = (*bp) > inlength * 8 ? 10 : 11; - } - else error = 18; /*error: invalid distance code (30-31 are never used)*/ - break; - } - distance = DISTANCEBASE[code_d]; - - /*part 4: get extra bits from distance*/ - numextrabits_d = DISTANCEEXTRA[code_d]; - if((*bp + numextrabits_d) > inbitlength) ERROR_BREAK(51); /*error, bit pointer will jump past memory*/ - distance += readBitsFromStream(bp, in, numextrabits_d); - - /*part 5: fill in all the out[n] values based on the length and dist*/ - start = (*pos); - if(distance > start) ERROR_BREAK(52); /*too long backward distance*/ - backward = start - distance; - - if(!ucvector_resize(out, (*pos) + length)) ERROR_BREAK(83 /*alloc fail*/); - if (distance < length) { - for(forward = 0; forward < length; ++forward) - { - out->data[(*pos)++] = out->data[backward++]; - } - } else { - memcpy(out->data + *pos, out->data + backward, length); - *pos += length; - } - } - else if(code_ll == 256) - { - break; /*end code, break the loop*/ - } - else /*if(code == (unsigned)(-1))*/ /*huffmanDecodeSymbol returns (unsigned)(-1) in case of error*/ - { - /*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol - (10=no endcode, 11=wrong jump outside of tree)*/ - error = ((*bp) > inlength * 8) ? 10 : 11; - break; - } - } - - HuffmanTree_cleanup(&tree_ll); - HuffmanTree_cleanup(&tree_d); - - return error; -} - -static unsigned inflateNoCompression(ucvector* out, const unsigned char* in, size_t* bp, size_t* pos, size_t inlength) -{ - size_t p; - unsigned LEN, NLEN, n, error = 0; - - /*go to first boundary of byte*/ - while(((*bp) & 0x7) != 0) ++(*bp); - p = (*bp) / 8; /*byte position*/ - - /*read LEN (2 bytes) and NLEN (2 bytes)*/ - if(p + 4 >= inlength) return 52; /*error, bit pointer will jump past memory*/ - LEN = in[p] + 256u * in[p + 1]; p += 2; - NLEN = in[p] + 256u * in[p + 1]; p += 2; - - /*check if 16-bit NLEN is really the one's complement of LEN*/ - if(LEN + NLEN != 65535) return 21; /*error: NLEN is not one's complement of LEN*/ - - if(!ucvector_resize(out, (*pos) + LEN)) return 83; /*alloc fail*/ - - /*read the literal data: LEN bytes are now stored in the out buffer*/ - if(p + LEN > inlength) return 23; /*error: reading outside of in buffer*/ - for(n = 0; n < LEN; ++n) out->data[(*pos)++] = in[p++]; - - (*bp) = p * 8; - - return error; -} - -static unsigned lodepng_inflatev(ucvector* out, - const unsigned char* in, size_t insize, - const LodePNGDecompressSettings* settings) -{ - /*bit pointer in the "in" data, current byte is bp >> 3, current bit is bp & 0x7 (from lsb to msb of the byte)*/ - size_t bp = 0; - unsigned BFINAL = 0; - size_t pos = 0; /*byte position in the out buffer*/ - unsigned error = 0; - - (void)settings; - - while(!BFINAL) - { - unsigned BTYPE; - if(bp + 2 >= insize * 8) return 52; /*error, bit pointer will jump past memory*/ - BFINAL = readBitFromStream(&bp, in); - BTYPE = 1u * readBitFromStream(&bp, in); - BTYPE += 2u * readBitFromStream(&bp, in); - - if(BTYPE == 3) return 20; /*error: invalid BTYPE*/ - else if(BTYPE == 0) error = inflateNoCompression(out, in, &bp, &pos, insize); /*no compression*/ - else error = inflateHuffmanBlock(out, in, &bp, &pos, insize, BTYPE); /*compression, BTYPE 01 or 10*/ - - if(error) return error; - } - - return error; -} - -unsigned lodepng_inflate(unsigned char** out, size_t* outsize, - const unsigned char* in, size_t insize, - const LodePNGDecompressSettings* settings) -{ - unsigned error; - ucvector v; - ucvector_init_buffer(&v, *out, *outsize); - error = lodepng_inflatev(&v, in, insize, settings); - *out = v.data; - *outsize = v.size; - return error; -} - -static unsigned inflate(unsigned char** out, size_t* outsize, - const unsigned char* in, size_t insize, - const LodePNGDecompressSettings* settings) -{ - if(settings->custom_inflate) - { - return settings->custom_inflate(out, outsize, in, insize, settings); - } - else - { - return lodepng_inflate(out, outsize, in, insize, settings); - } -} - -#endif /*LODEPNG_COMPILE_DECODER*/ - -#ifdef LODEPNG_COMPILE_ENCODER - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / Deflator (Compressor) / */ -/* ////////////////////////////////////////////////////////////////////////// */ - -static const size_t MAX_SUPPORTED_DEFLATE_LENGTH = 258; - -/*bitlen is the size in bits of the code*/ -static void addHuffmanSymbol(size_t* bp, ucvector* compressed, unsigned code, unsigned bitlen) -{ - addBitsToStreamReversed(bp, compressed, code, bitlen); -} - -/*search the index in the array, that has the largest value smaller than or equal to the given value, -given array must be sorted (if no value is smaller, it returns the size of the given array)*/ -static size_t searchCodeIndex(const unsigned* array, size_t array_size, size_t value) -{ - /*binary search (only small gain over linear). TODO: use CPU log2 instruction for getting symbols instead*/ - size_t left = 1; - size_t right = array_size - 1; - - while(left <= right) { - size_t mid = (left + right) >> 1; - if (array[mid] >= value) right = mid - 1; - else left = mid + 1; - } - if(left >= array_size || array[left] > value) left--; - return left; -} - -static void addLengthDistance(uivector* values, size_t length, size_t distance) -{ - /*values in encoded vector are those used by deflate: - 0-255: literal bytes - 256: end - 257-285: length/distance pair (length code, followed by extra length bits, distance code, extra distance bits) - 286-287: invalid*/ - - unsigned length_code = (unsigned)searchCodeIndex(LENGTHBASE, 29, length); - unsigned extra_length = (unsigned)(length - LENGTHBASE[length_code]); - unsigned dist_code = (unsigned)searchCodeIndex(DISTANCEBASE, 30, distance); - unsigned extra_distance = (unsigned)(distance - DISTANCEBASE[dist_code]); - - uivector_push_back(values, length_code + FIRST_LENGTH_CODE_INDEX); - uivector_push_back(values, extra_length); - uivector_push_back(values, dist_code); - uivector_push_back(values, extra_distance); -} - -/*3 bytes of data get encoded into two bytes. The hash cannot use more than 3 -bytes as input because 3 is the minimum match length for deflate*/ -static const unsigned HASH_NUM_VALUES = 65536; -static const unsigned HASH_BIT_MASK = 65535; /*HASH_NUM_VALUES - 1, but C90 does not like that as initializer*/ - -typedef struct Hash -{ - int* head; /*hash value to head circular pos - can be outdated if went around window*/ - /*circular pos to prev circular pos*/ - unsigned short* chain; - int* val; /*circular pos to hash value*/ - - /*TODO: do this not only for zeros but for any repeated byte. However for PNG - it's always going to be the zeros that dominate, so not important for PNG*/ - int* headz; /*similar to head, but for chainz*/ - unsigned short* chainz; /*those with same amount of zeros*/ - unsigned short* zeros; /*length of zeros streak, used as a second hash chain*/ -} Hash; - -static unsigned hash_init(Hash* hash, unsigned windowsize) -{ - unsigned i; - hash->head = (int*)lodepng_malloc(sizeof(int) * HASH_NUM_VALUES); - hash->val = (int*)lodepng_malloc(sizeof(int) * windowsize); - hash->chain = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); - - hash->zeros = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); - hash->headz = (int*)lodepng_malloc(sizeof(int) * (MAX_SUPPORTED_DEFLATE_LENGTH + 1)); - hash->chainz = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); - - if(!hash->head || !hash->chain || !hash->val || !hash->headz|| !hash->chainz || !hash->zeros) - { - return 83; /*alloc fail*/ - } - - /*initialize hash table*/ - for(i = 0; i != HASH_NUM_VALUES; ++i) hash->head[i] = -1; - for(i = 0; i != windowsize; ++i) hash->val[i] = -1; - for(i = 0; i != windowsize; ++i) hash->chain[i] = i; /*same value as index indicates uninitialized*/ - - for(i = 0; i <= MAX_SUPPORTED_DEFLATE_LENGTH; ++i) hash->headz[i] = -1; - for(i = 0; i != windowsize; ++i) hash->chainz[i] = i; /*same value as index indicates uninitialized*/ - - return 0; -} - -static void hash_cleanup(Hash* hash) -{ - lodepng_free(hash->head); - lodepng_free(hash->val); - lodepng_free(hash->chain); - - lodepng_free(hash->zeros); - lodepng_free(hash->headz); - lodepng_free(hash->chainz); -} - - - -static unsigned getHash(const unsigned char* data, size_t size, size_t pos) -{ - unsigned result = 0; - if(pos + 2 < size) - { - /*A simple shift and xor hash is used. Since the data of PNGs is dominated - by zeroes due to the filters, a better hash does not have a significant - effect on speed in traversing the chain, and causes more time spend on - calculating the hash.*/ - result ^= (unsigned)(data[pos + 0] << 0u); - result ^= (unsigned)(data[pos + 1] << 4u); - result ^= (unsigned)(data[pos + 2] << 8u); - } else { - size_t amount, i; - if(pos >= size) return 0; - amount = size - pos; - for(i = 0; i != amount; ++i) result ^= (unsigned)(data[pos + i] << (i * 8u)); - } - return result & HASH_BIT_MASK; -} - -static unsigned countZeros(const unsigned char* data, size_t size, size_t pos) -{ - const unsigned char* start = data + pos; - const unsigned char* end = start + MAX_SUPPORTED_DEFLATE_LENGTH; - if(end > data + size) end = data + size; - data = start; - while(data != end && *data == 0) ++data; - /*subtracting two addresses returned as 32-bit number (max value is MAX_SUPPORTED_DEFLATE_LENGTH)*/ - return (unsigned)(data - start); -} - -/*wpos = pos & (windowsize - 1)*/ -static void updateHashChain(Hash* hash, size_t wpos, unsigned hashval, unsigned short numzeros) -{ - hash->val[wpos] = (int)hashval; - if(hash->head[hashval] != -1) hash->chain[wpos] = hash->head[hashval]; - hash->head[hashval] = wpos; - - hash->zeros[wpos] = numzeros; - if(hash->headz[numzeros] != -1) hash->chainz[wpos] = hash->headz[numzeros]; - hash->headz[numzeros] = wpos; -} - -/* -LZ77-encode the data. Return value is error code. The input are raw bytes, the output -is in the form of unsigned integers with codes representing for example literal bytes, or -length/distance pairs. -It uses a hash table technique to let it encode faster. When doing LZ77 encoding, a -sliding window (of windowsize) is used, and all past bytes in that window can be used as -the "dictionary". A brute force search through all possible distances would be slow, and -this hash technique is one out of several ways to speed this up. -*/ -static unsigned encodeLZ77(uivector* out, Hash* hash, - const unsigned char* in, size_t inpos, size_t insize, unsigned windowsize, - unsigned minmatch, unsigned nicematch, unsigned lazymatching) -{ - size_t pos; - unsigned i, error = 0; - /*for large window lengths, assume the user wants no compression loss. Otherwise, max hash chain length speedup.*/ - unsigned maxchainlength = windowsize >= 8192 ? windowsize : windowsize / 8; - unsigned maxlazymatch = windowsize >= 8192 ? MAX_SUPPORTED_DEFLATE_LENGTH : 64; - - unsigned usezeros = 1; /*not sure if setting it to false for windowsize < 8192 is better or worse*/ - unsigned numzeros = 0; - - unsigned offset; /*the offset represents the distance in LZ77 terminology*/ - unsigned length; - unsigned lazy = 0; - unsigned lazylength = 0, lazyoffset = 0; - unsigned hashval; - unsigned current_offset, current_length; - unsigned prev_offset; - const unsigned char *lastptr, *foreptr, *backptr; - unsigned hashpos; - - if(windowsize == 0 || windowsize > 32768) return 60; /*error: windowsize smaller/larger than allowed*/ - if((windowsize & (windowsize - 1)) != 0) return 90; /*error: must be power of two*/ - - if(nicematch > MAX_SUPPORTED_DEFLATE_LENGTH) nicematch = MAX_SUPPORTED_DEFLATE_LENGTH; - - for(pos = inpos; pos < insize; ++pos) - { - size_t wpos = pos & (windowsize - 1); /*position for in 'circular' hash buffers*/ - unsigned chainlength = 0; - - hashval = getHash(in, insize, pos); - - if(usezeros && hashval == 0) - { - if(numzeros == 0) numzeros = countZeros(in, insize, pos); - else if(pos + numzeros > insize || in[pos + numzeros - 1] != 0) --numzeros; - } - else - { - numzeros = 0; - } - - updateHashChain(hash, wpos, hashval, numzeros); - - /*the length and offset found for the current position*/ - length = 0; - offset = 0; - - hashpos = hash->chain[wpos]; - - lastptr = &in[insize < pos + MAX_SUPPORTED_DEFLATE_LENGTH ? insize : pos + MAX_SUPPORTED_DEFLATE_LENGTH]; - - /*search for the longest string*/ - prev_offset = 0; - for(;;) - { - if(chainlength++ >= maxchainlength) break; - current_offset = hashpos <= wpos ? wpos - hashpos : wpos - hashpos + windowsize; - - if(current_offset < prev_offset) break; /*stop when went completely around the circular buffer*/ - prev_offset = current_offset; - if(current_offset > 0) - { - /*test the next characters*/ - foreptr = &in[pos]; - backptr = &in[pos - current_offset]; - - /*common case in PNGs is lots of zeros. Quickly skip over them as a speedup*/ - if(numzeros >= 3) - { - unsigned skip = hash->zeros[hashpos]; - if(skip > numzeros) skip = numzeros; - backptr += skip; - foreptr += skip; - } - - while(foreptr != lastptr && *backptr == *foreptr) /*maximum supported length by deflate is max length*/ - { - ++backptr; - ++foreptr; - } - current_length = (unsigned)(foreptr - &in[pos]); - - if(current_length > length) - { - length = current_length; /*the longest length*/ - offset = current_offset; /*the offset that is related to this longest length*/ - /*jump out once a length of max length is found (speed gain). This also jumps - out if length is MAX_SUPPORTED_DEFLATE_LENGTH*/ - if(current_length >= nicematch) break; - } - } - - if(hashpos == hash->chain[hashpos]) break; - - if(numzeros >= 3 && length > numzeros) - { - hashpos = hash->chainz[hashpos]; - if(hash->zeros[hashpos] != numzeros) break; - } - else - { - hashpos = hash->chain[hashpos]; - /*outdated hash value, happens if particular value was not encountered in whole last window*/ - if(hash->val[hashpos] != (int)hashval) break; - } - } - - if(lazymatching) - { - if(!lazy && length >= 3 && length <= maxlazymatch && length < MAX_SUPPORTED_DEFLATE_LENGTH) - { - lazy = 1; - lazylength = length; - lazyoffset = offset; - continue; /*try the next byte*/ - } - if(lazy) - { - lazy = 0; - if(pos == 0) ERROR_BREAK(81); - if(length > lazylength + 1) - { - /*push the previous character as literal*/ - if(!uivector_push_back(out, in[pos - 1])) ERROR_BREAK(83 /*alloc fail*/); - } - else - { - length = lazylength; - offset = lazyoffset; - hash->head[hashval] = -1; /*the same hashchain update will be done, this ensures no wrong alteration*/ - hash->headz[numzeros] = -1; /*idem*/ - --pos; - } - } - } - if(length >= 3 && offset > windowsize) ERROR_BREAK(86 /*too big (or overflown negative) offset*/); - - /*encode it as length/distance pair or literal value*/ - if(length < 3) /*only lengths of 3 or higher are supported as length/distance pair*/ - { - if(!uivector_push_back(out, in[pos])) ERROR_BREAK(83 /*alloc fail*/); - } - else if(length < minmatch || (length == 3 && offset > 4096)) - { - /*compensate for the fact that longer offsets have more extra bits, a - length of only 3 may be not worth it then*/ - if(!uivector_push_back(out, in[pos])) ERROR_BREAK(83 /*alloc fail*/); - } - else - { - addLengthDistance(out, length, offset); - for(i = 1; i < length; ++i) - { - ++pos; - wpos = pos & (windowsize - 1); - hashval = getHash(in, insize, pos); - if(usezeros && hashval == 0) - { - if(numzeros == 0) numzeros = countZeros(in, insize, pos); - else if(pos + numzeros > insize || in[pos + numzeros - 1] != 0) --numzeros; - } - else - { - numzeros = 0; - } - updateHashChain(hash, wpos, hashval, numzeros); - } - } - } /*end of the loop through each character of input*/ - - return error; -} - -/* /////////////////////////////////////////////////////////////////////////// */ - -static unsigned deflateNoCompression(ucvector* out, const unsigned char* data, size_t datasize) -{ - /*non compressed deflate block data: 1 bit BFINAL,2 bits BTYPE,(5 bits): it jumps to start of next byte, - 2 bytes LEN, 2 bytes NLEN, LEN bytes literal DATA*/ - - size_t i, j, numdeflateblocks = (datasize + 65534) / 65535; - unsigned datapos = 0; - for(i = 0; i != numdeflateblocks; ++i) - { - unsigned BFINAL, BTYPE, LEN, NLEN; - unsigned char firstbyte; - - BFINAL = (i == numdeflateblocks - 1); - BTYPE = 0; - - firstbyte = (unsigned char)(BFINAL + ((BTYPE & 1) << 1) + ((BTYPE & 2) << 1)); - ucvector_push_back(out, firstbyte); - - LEN = 65535; - if(datasize - datapos < 65535) LEN = (unsigned)datasize - datapos; - NLEN = 65535 - LEN; - - ucvector_push_back(out, (unsigned char)(LEN & 255)); - ucvector_push_back(out, (unsigned char)(LEN >> 8)); - ucvector_push_back(out, (unsigned char)(NLEN & 255)); - ucvector_push_back(out, (unsigned char)(NLEN >> 8)); - - /*Decompressed data*/ - for(j = 0; j < 65535 && datapos < datasize; ++j) - { - ucvector_push_back(out, data[datapos++]); - } - } - - return 0; -} - -/* -write the lz77-encoded data, which has lit, len and dist codes, to compressed stream using huffman trees. -tree_ll: the tree for lit and len codes. -tree_d: the tree for distance codes. -*/ -static void writeLZ77data(size_t* bp, ucvector* out, const uivector* lz77_encoded, - const HuffmanTree* tree_ll, const HuffmanTree* tree_d) -{ - size_t i = 0; - for(i = 0; i != lz77_encoded->size; ++i) - { - unsigned val = lz77_encoded->data[i]; - addHuffmanSymbol(bp, out, HuffmanTree_getCode(tree_ll, val), HuffmanTree_getLength(tree_ll, val)); - if(val > 256) /*for a length code, 3 more things have to be added*/ - { - unsigned length_index = val - FIRST_LENGTH_CODE_INDEX; - unsigned n_length_extra_bits = LENGTHEXTRA[length_index]; - unsigned length_extra_bits = lz77_encoded->data[++i]; - - unsigned distance_code = lz77_encoded->data[++i]; - - unsigned distance_index = distance_code; - unsigned n_distance_extra_bits = DISTANCEEXTRA[distance_index]; - unsigned distance_extra_bits = lz77_encoded->data[++i]; - - addBitsToStream(bp, out, length_extra_bits, n_length_extra_bits); - addHuffmanSymbol(bp, out, HuffmanTree_getCode(tree_d, distance_code), - HuffmanTree_getLength(tree_d, distance_code)); - addBitsToStream(bp, out, distance_extra_bits, n_distance_extra_bits); - } - } -} - -/*Deflate for a block of type "dynamic", that is, with freely, optimally, created huffman trees*/ -static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash, - const unsigned char* data, size_t datapos, size_t dataend, - const LodePNGCompressSettings* settings, unsigned final) -{ - unsigned error = 0; - - /* - A block is compressed as follows: The PNG data is lz77 encoded, resulting in - literal bytes and length/distance pairs. This is then huffman compressed with - two huffman trees. One huffman tree is used for the lit and len values ("ll"), - another huffman tree is used for the dist values ("d"). These two trees are - stored using their code lengths, and to compress even more these code lengths - are also run-length encoded and huffman compressed. This gives a huffman tree - of code lengths "cl". The code lenghts used to describe this third tree are - the code length code lengths ("clcl"). - */ - - /*The lz77 encoded data, represented with integers since there will also be length and distance codes in it*/ - uivector lz77_encoded; - HuffmanTree tree_ll; /*tree for lit,len values*/ - HuffmanTree tree_d; /*tree for distance codes*/ - HuffmanTree tree_cl; /*tree for encoding the code lengths representing tree_ll and tree_d*/ - uivector frequencies_ll; /*frequency of lit,len codes*/ - uivector frequencies_d; /*frequency of dist codes*/ - uivector frequencies_cl; /*frequency of code length codes*/ - uivector bitlen_lld; /*lit,len,dist code lenghts (int bits), literally (without repeat codes).*/ - uivector bitlen_lld_e; /*bitlen_lld encoded with repeat codes (this is a rudemtary run length compression)*/ - /*bitlen_cl is the code length code lengths ("clcl"). The bit lengths of codes to represent tree_cl - (these are written as is in the file, it would be crazy to compress these using yet another huffman - tree that needs to be represented by yet another set of code lengths)*/ - uivector bitlen_cl; - size_t datasize = dataend - datapos; - - /* - Due to the huffman compression of huffman tree representations ("two levels"), there are some anologies: - bitlen_lld is to tree_cl what data is to tree_ll and tree_d. - bitlen_lld_e is to bitlen_lld what lz77_encoded is to data. - bitlen_cl is to bitlen_lld_e what bitlen_lld is to lz77_encoded. - */ - - unsigned BFINAL = final; - size_t numcodes_ll, numcodes_d, i; - unsigned HLIT, HDIST, HCLEN; - - uivector_init(&lz77_encoded); - HuffmanTree_init(&tree_ll); - HuffmanTree_init(&tree_d); - HuffmanTree_init(&tree_cl); - uivector_init(&frequencies_ll); - uivector_init(&frequencies_d); - uivector_init(&frequencies_cl); - uivector_init(&bitlen_lld); - uivector_init(&bitlen_lld_e); - uivector_init(&bitlen_cl); - - /*This while loop never loops due to a break at the end, it is here to - allow breaking out of it to the cleanup phase on error conditions.*/ - while(!error) - { - if(settings->use_lz77) - { - error = encodeLZ77(&lz77_encoded, hash, data, datapos, dataend, settings->windowsize, - settings->minmatch, settings->nicematch, settings->lazymatching); - if(error) break; - } - else - { - if(!uivector_resize(&lz77_encoded, datasize)) ERROR_BREAK(83 /*alloc fail*/); - for(i = datapos; i < dataend; ++i) lz77_encoded.data[i - datapos] = data[i]; /*no LZ77, but still will be Huffman compressed*/ - } - - if(!uivector_resizev(&frequencies_ll, 286, 0)) ERROR_BREAK(83 /*alloc fail*/); - if(!uivector_resizev(&frequencies_d, 30, 0)) ERROR_BREAK(83 /*alloc fail*/); - - /*Count the frequencies of lit, len and dist codes*/ - for(i = 0; i != lz77_encoded.size; ++i) - { - unsigned symbol = lz77_encoded.data[i]; - ++frequencies_ll.data[symbol]; - if(symbol > 256) - { - unsigned dist = lz77_encoded.data[i + 2]; - ++frequencies_d.data[dist]; - i += 3; - } - } - frequencies_ll.data[256] = 1; /*there will be exactly 1 end code, at the end of the block*/ - - /*Make both huffman trees, one for the lit and len codes, one for the dist codes*/ - error = HuffmanTree_makeFromFrequencies(&tree_ll, frequencies_ll.data, 257, frequencies_ll.size, 15); - if(error) break; - /*2, not 1, is chosen for mincodes: some buggy PNG decoders require at least 2 symbols in the dist tree*/ - error = HuffmanTree_makeFromFrequencies(&tree_d, frequencies_d.data, 2, frequencies_d.size, 15); - if(error) break; - - numcodes_ll = tree_ll.numcodes; if(numcodes_ll > 286) numcodes_ll = 286; - numcodes_d = tree_d.numcodes; if(numcodes_d > 30) numcodes_d = 30; - /*store the code lengths of both generated trees in bitlen_lld*/ - for(i = 0; i != numcodes_ll; ++i) uivector_push_back(&bitlen_lld, HuffmanTree_getLength(&tree_ll, (unsigned)i)); - for(i = 0; i != numcodes_d; ++i) uivector_push_back(&bitlen_lld, HuffmanTree_getLength(&tree_d, (unsigned)i)); - - /*run-length compress bitlen_ldd into bitlen_lld_e by using repeat codes 16 (copy length 3-6 times), - 17 (3-10 zeroes), 18 (11-138 zeroes)*/ - for(i = 0; i != (unsigned)bitlen_lld.size; ++i) - { - unsigned j = 0; /*amount of repititions*/ - while(i + j + 1 < (unsigned)bitlen_lld.size && bitlen_lld.data[i + j + 1] == bitlen_lld.data[i]) ++j; - - if(bitlen_lld.data[i] == 0 && j >= 2) /*repeat code for zeroes*/ - { - ++j; /*include the first zero*/ - if(j <= 10) /*repeat code 17 supports max 10 zeroes*/ - { - uivector_push_back(&bitlen_lld_e, 17); - uivector_push_back(&bitlen_lld_e, j - 3); - } - else /*repeat code 18 supports max 138 zeroes*/ - { - if(j > 138) j = 138; - uivector_push_back(&bitlen_lld_e, 18); - uivector_push_back(&bitlen_lld_e, j - 11); - } - i += (j - 1); - } - else if(j >= 3) /*repeat code for value other than zero*/ - { - size_t k; - unsigned num = j / 6, rest = j % 6; - uivector_push_back(&bitlen_lld_e, bitlen_lld.data[i]); - for(k = 0; k < num; ++k) - { - uivector_push_back(&bitlen_lld_e, 16); - uivector_push_back(&bitlen_lld_e, 6 - 3); - } - if(rest >= 3) - { - uivector_push_back(&bitlen_lld_e, 16); - uivector_push_back(&bitlen_lld_e, rest - 3); - } - else j -= rest; - i += j; - } - else /*too short to benefit from repeat code*/ - { - uivector_push_back(&bitlen_lld_e, bitlen_lld.data[i]); - } - } - - /*generate tree_cl, the huffmantree of huffmantrees*/ - - if(!uivector_resizev(&frequencies_cl, NUM_CODE_LENGTH_CODES, 0)) ERROR_BREAK(83 /*alloc fail*/); - for(i = 0; i != bitlen_lld_e.size; ++i) - { - ++frequencies_cl.data[bitlen_lld_e.data[i]]; - /*after a repeat code come the bits that specify the number of repetitions, - those don't need to be in the frequencies_cl calculation*/ - if(bitlen_lld_e.data[i] >= 16) ++i; - } - - error = HuffmanTree_makeFromFrequencies(&tree_cl, frequencies_cl.data, - frequencies_cl.size, frequencies_cl.size, 7); - if(error) break; - - if(!uivector_resize(&bitlen_cl, tree_cl.numcodes)) ERROR_BREAK(83 /*alloc fail*/); - for(i = 0; i != tree_cl.numcodes; ++i) - { - /*lenghts of code length tree is in the order as specified by deflate*/ - bitlen_cl.data[i] = HuffmanTree_getLength(&tree_cl, CLCL_ORDER[i]); - } - while(bitlen_cl.data[bitlen_cl.size - 1] == 0 && bitlen_cl.size > 4) - { - /*remove zeros at the end, but minimum size must be 4*/ - if(!uivector_resize(&bitlen_cl, bitlen_cl.size - 1)) ERROR_BREAK(83 /*alloc fail*/); - } - if(error) break; - - /* - Write everything into the output - - After the BFINAL and BTYPE, the dynamic block consists out of the following: - - 5 bits HLIT, 5 bits HDIST, 4 bits HCLEN - - (HCLEN+4)*3 bits code lengths of code length alphabet - - HLIT + 257 code lenghts of lit/length alphabet (encoded using the code length - alphabet, + possible repetition codes 16, 17, 18) - - HDIST + 1 code lengths of distance alphabet (encoded using the code length - alphabet, + possible repetition codes 16, 17, 18) - - compressed data - - 256 (end code) - */ - - /*Write block type*/ - addBitToStream(bp, out, BFINAL); - addBitToStream(bp, out, 0); /*first bit of BTYPE "dynamic"*/ - addBitToStream(bp, out, 1); /*second bit of BTYPE "dynamic"*/ - - /*write the HLIT, HDIST and HCLEN values*/ - HLIT = (unsigned)(numcodes_ll - 257); - HDIST = (unsigned)(numcodes_d - 1); - HCLEN = (unsigned)bitlen_cl.size - 4; - /*trim zeroes for HCLEN. HLIT and HDIST were already trimmed at tree creation*/ - while(!bitlen_cl.data[HCLEN + 4 - 1] && HCLEN > 0) --HCLEN; - addBitsToStream(bp, out, HLIT, 5); - addBitsToStream(bp, out, HDIST, 5); - addBitsToStream(bp, out, HCLEN, 4); - - /*write the code lenghts of the code length alphabet*/ - for(i = 0; i != HCLEN + 4; ++i) addBitsToStream(bp, out, bitlen_cl.data[i], 3); - - /*write the lenghts of the lit/len AND the dist alphabet*/ - for(i = 0; i != bitlen_lld_e.size; ++i) - { - addHuffmanSymbol(bp, out, HuffmanTree_getCode(&tree_cl, bitlen_lld_e.data[i]), - HuffmanTree_getLength(&tree_cl, bitlen_lld_e.data[i])); - /*extra bits of repeat codes*/ - if(bitlen_lld_e.data[i] == 16) addBitsToStream(bp, out, bitlen_lld_e.data[++i], 2); - else if(bitlen_lld_e.data[i] == 17) addBitsToStream(bp, out, bitlen_lld_e.data[++i], 3); - else if(bitlen_lld_e.data[i] == 18) addBitsToStream(bp, out, bitlen_lld_e.data[++i], 7); - } - - /*write the compressed data symbols*/ - writeLZ77data(bp, out, &lz77_encoded, &tree_ll, &tree_d); - /*error: the length of the end code 256 must be larger than 0*/ - if(HuffmanTree_getLength(&tree_ll, 256) == 0) ERROR_BREAK(64); - - /*write the end code*/ - addHuffmanSymbol(bp, out, HuffmanTree_getCode(&tree_ll, 256), HuffmanTree_getLength(&tree_ll, 256)); - - break; /*end of error-while*/ - } - - /*cleanup*/ - uivector_cleanup(&lz77_encoded); - HuffmanTree_cleanup(&tree_ll); - HuffmanTree_cleanup(&tree_d); - HuffmanTree_cleanup(&tree_cl); - uivector_cleanup(&frequencies_ll); - uivector_cleanup(&frequencies_d); - uivector_cleanup(&frequencies_cl); - uivector_cleanup(&bitlen_lld_e); - uivector_cleanup(&bitlen_lld); - uivector_cleanup(&bitlen_cl); - - return error; -} - -static unsigned deflateFixed(ucvector* out, size_t* bp, Hash* hash, - const unsigned char* data, - size_t datapos, size_t dataend, - const LodePNGCompressSettings* settings, unsigned final) -{ - HuffmanTree tree_ll; /*tree for literal values and length codes*/ - HuffmanTree tree_d; /*tree for distance codes*/ - - unsigned BFINAL = final; - unsigned error = 0; - size_t i; - - HuffmanTree_init(&tree_ll); - HuffmanTree_init(&tree_d); - - generateFixedLitLenTree(&tree_ll); - generateFixedDistanceTree(&tree_d); - - addBitToStream(bp, out, BFINAL); - addBitToStream(bp, out, 1); /*first bit of BTYPE*/ - addBitToStream(bp, out, 0); /*second bit of BTYPE*/ - - if(settings->use_lz77) /*LZ77 encoded*/ - { - uivector lz77_encoded; - uivector_init(&lz77_encoded); - error = encodeLZ77(&lz77_encoded, hash, data, datapos, dataend, settings->windowsize, - settings->minmatch, settings->nicematch, settings->lazymatching); - if(!error) writeLZ77data(bp, out, &lz77_encoded, &tree_ll, &tree_d); - uivector_cleanup(&lz77_encoded); - } - else /*no LZ77, but still will be Huffman compressed*/ - { - for(i = datapos; i < dataend; ++i) - { - addHuffmanSymbol(bp, out, HuffmanTree_getCode(&tree_ll, data[i]), HuffmanTree_getLength(&tree_ll, data[i])); - } - } - /*add END code*/ - if(!error) addHuffmanSymbol(bp, out, HuffmanTree_getCode(&tree_ll, 256), HuffmanTree_getLength(&tree_ll, 256)); - - /*cleanup*/ - HuffmanTree_cleanup(&tree_ll); - HuffmanTree_cleanup(&tree_d); - - return error; -} - -static unsigned lodepng_deflatev(ucvector* out, const unsigned char* in, size_t insize, - const LodePNGCompressSettings* settings) -{ - unsigned error = 0; - size_t i, blocksize, numdeflateblocks; - size_t bp = 0; /*the bit pointer*/ - Hash hash; - - if(settings->btype > 2) return 61; - else if(settings->btype == 0) return deflateNoCompression(out, in, insize); - else if(settings->btype == 1) blocksize = insize; - else /*if(settings->btype == 2)*/ - { - /*on PNGs, deflate blocks of 65-262k seem to give most dense encoding*/ - blocksize = insize / 8 + 8; - if(blocksize < 65536) blocksize = 65536; - if(blocksize > 262144) blocksize = 262144; - } - - numdeflateblocks = (insize + blocksize - 1) / blocksize; - if(numdeflateblocks == 0) numdeflateblocks = 1; - - error = hash_init(&hash, settings->windowsize); - if(error) return error; - - for(i = 0; i != numdeflateblocks && !error; ++i) - { - unsigned final = (i == numdeflateblocks - 1); - size_t start = i * blocksize; - size_t end = start + blocksize; - if(end > insize) end = insize; - - if(settings->btype == 1) error = deflateFixed(out, &bp, &hash, in, start, end, settings, final); - else if(settings->btype == 2) error = deflateDynamic(out, &bp, &hash, in, start, end, settings, final); - } - - hash_cleanup(&hash); - - return error; -} - -unsigned lodepng_deflate(unsigned char** out, size_t* outsize, - const unsigned char* in, size_t insize, - const LodePNGCompressSettings* settings) -{ - unsigned error; - ucvector v; - ucvector_init_buffer(&v, *out, *outsize); - error = lodepng_deflatev(&v, in, insize, settings); - *out = v.data; - *outsize = v.size; - return error; -} - -static unsigned deflate(unsigned char** out, size_t* outsize, - const unsigned char* in, size_t insize, - const LodePNGCompressSettings* settings) -{ - if(settings->custom_deflate) - { - return settings->custom_deflate(out, outsize, in, insize, settings); - } - else - { - return lodepng_deflate(out, outsize, in, insize, settings); - } -} - -#endif /*LODEPNG_COMPILE_DECODER*/ - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / Adler32 */ -/* ////////////////////////////////////////////////////////////////////////// */ - -static unsigned update_adler32(unsigned adler, const unsigned char* data, unsigned len) -{ - unsigned s1 = adler & 0xffff; - unsigned s2 = (adler >> 16) & 0xffff; - - while(len > 0) - { - /*at least 5550 sums can be done before the sums overflow, saving a lot of module divisions*/ - unsigned amount = len > 5550 ? 5550 : len; - len -= amount; - while(amount > 0) - { - s1 += (*data++); - s2 += s1; - --amount; - } - s1 %= 65521; - s2 %= 65521; - } - - return (s2 << 16) | s1; -} - -/*Return the adler32 of the bytes data[0..len-1]*/ -static unsigned adler32(const unsigned char* data, unsigned len) -{ - return update_adler32(1L, data, len); -} - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / Zlib / */ -/* ////////////////////////////////////////////////////////////////////////// */ - -#ifdef LODEPNG_COMPILE_DECODER - -unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, - size_t insize, const LodePNGDecompressSettings* settings) -{ - unsigned error = 0; - unsigned CM, CINFO, FDICT; - - if(insize < 2) return 53; /*error, size of zlib data too small*/ - /*read information from zlib header*/ - if((in[0] * 256 + in[1]) % 31 != 0) - { - /*error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way*/ - return 24; - } - - CM = in[0] & 15; - CINFO = (in[0] >> 4) & 15; - /*FCHECK = in[1] & 31;*/ /*FCHECK is already tested above*/ - FDICT = (in[1] >> 5) & 1; - /*FLEVEL = (in[1] >> 6) & 3;*/ /*FLEVEL is not used here*/ - - if(CM != 8 || CINFO > 7) - { - /*error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec*/ - return 25; - } - if(FDICT != 0) - { - /*error: the specification of PNG says about the zlib stream: - "The additional flags shall not specify a preset dictionary."*/ - return 26; - } - - error = inflate(out, outsize, in + 2, insize - 2, settings); - if(error) return error; - - if(!settings->ignore_adler32) - { - unsigned ADLER32 = lodepng_read32bitInt(&in[insize - 4]); - unsigned checksum = adler32(*out, (unsigned)(*outsize)); - if(checksum != ADLER32) return 58; /*error, adler checksum not correct, data must be corrupted*/ - } - - return 0; /*no error*/ -} - -static unsigned zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, - size_t insize, const LodePNGDecompressSettings* settings) -{ - if(settings->custom_zlib) - { - return settings->custom_zlib(out, outsize, in, insize, settings); - } - else - { - return lodepng_zlib_decompress(out, outsize, in, insize, settings); - } -} - -#endif /*LODEPNG_COMPILE_DECODER*/ - -#ifdef LODEPNG_COMPILE_ENCODER - -unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, - size_t insize, const LodePNGCompressSettings* settings) -{ - /*initially, *out must be NULL and outsize 0, if you just give some random *out - that's pointing to a non allocated buffer, this'll crash*/ - ucvector outv; - size_t i; - unsigned error; - unsigned char* deflatedata = 0; - size_t deflatesize = 0; - - /*zlib data: 1 byte CMF (CM+CINFO), 1 byte FLG, deflate data, 4 byte ADLER32 checksum of the Decompressed data*/ - unsigned CMF = 120; /*0b01111000: CM 8, CINFO 7. With CINFO 7, any window size up to 32768 can be used.*/ - unsigned FLEVEL = 0; - unsigned FDICT = 0; - unsigned CMFFLG = 256 * CMF + FDICT * 32 + FLEVEL * 64; - unsigned FCHECK = 31 - CMFFLG % 31; - CMFFLG += FCHECK; - - /*ucvector-controlled version of the output buffer, for dynamic array*/ - ucvector_init_buffer(&outv, *out, *outsize); - - ucvector_push_back(&outv, (unsigned char)(CMFFLG >> 8)); - ucvector_push_back(&outv, (unsigned char)(CMFFLG & 255)); - - error = deflate(&deflatedata, &deflatesize, in, insize, settings); - - if(!error) - { - unsigned ADLER32 = adler32(in, (unsigned)insize); - for(i = 0; i != deflatesize; ++i) ucvector_push_back(&outv, deflatedata[i]); - lodepng_free(deflatedata); - lodepng_add32bitInt(&outv, ADLER32); - } - - *out = outv.data; - *outsize = outv.size; - - return error; -} - -/* compress using the default or custom zlib function */ -static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, - size_t insize, const LodePNGCompressSettings* settings) -{ - if(settings->custom_zlib) - { - return settings->custom_zlib(out, outsize, in, insize, settings); - } - else - { - return lodepng_zlib_compress(out, outsize, in, insize, settings); - } -} - -#endif /*LODEPNG_COMPILE_ENCODER*/ - -#else /*no LODEPNG_COMPILE_ZLIB*/ - -#ifdef LODEPNG_COMPILE_DECODER -static unsigned zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, - size_t insize, const LodePNGDecompressSettings* settings) -{ - if(!settings->custom_zlib) return 87; /*no custom zlib function provided */ - return settings->custom_zlib(out, outsize, in, insize, settings); -} -#endif /*LODEPNG_COMPILE_DECODER*/ -#ifdef LODEPNG_COMPILE_ENCODER -static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, - size_t insize, const LodePNGCompressSettings* settings) -{ - if(!settings->custom_zlib) return 87; /*no custom zlib function provided */ - return settings->custom_zlib(out, outsize, in, insize, settings); -} -#endif /*LODEPNG_COMPILE_ENCODER*/ - -#endif /*LODEPNG_COMPILE_ZLIB*/ - -/* ////////////////////////////////////////////////////////////////////////// */ - -#ifdef LODEPNG_COMPILE_ENCODER - -/*this is a good tradeoff between speed and compression ratio*/ -#define DEFAULT_WINDOWSIZE 2048 - -void lodepng_compress_settings_init(LodePNGCompressSettings* settings) -{ - /*compress with dynamic huffman tree (not in the mathematical sense, just not the predefined one)*/ - settings->btype = 2; - settings->use_lz77 = 1; - settings->windowsize = DEFAULT_WINDOWSIZE; - settings->minmatch = 3; - settings->nicematch = 128; - settings->lazymatching = 1; - - settings->custom_zlib = 0; - settings->custom_deflate = 0; - settings->custom_context = 0; -} - -const LodePNGCompressSettings lodepng_default_compress_settings = {2, 1, DEFAULT_WINDOWSIZE, 3, 128, 1, 0, 0, 0}; - - -#endif /*LODEPNG_COMPILE_ENCODER*/ - -#ifdef LODEPNG_COMPILE_DECODER - -void lodepng_decompress_settings_init(LodePNGDecompressSettings* settings) -{ - settings->ignore_adler32 = 0; - - settings->custom_zlib = 0; - settings->custom_inflate = 0; - settings->custom_context = 0; -} - -const LodePNGDecompressSettings lodepng_default_decompress_settings = {0, 0, 0, 0}; - -#endif /*LODEPNG_COMPILE_DECODER*/ - -/* ////////////////////////////////////////////////////////////////////////// */ -/* ////////////////////////////////////////////////////////////////////////// */ -/* // End of Zlib related code. Begin of PNG related code. // */ -/* ////////////////////////////////////////////////////////////////////////// */ -/* ////////////////////////////////////////////////////////////////////////// */ - -#ifdef LODEPNG_COMPILE_PNG - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / CRC32 / */ -/* ////////////////////////////////////////////////////////////////////////// */ - - -#ifndef LODEPNG_NO_COMPILE_CRC -/* CRC polynomial: 0xedb88320 */ -static unsigned lodepng_crc32_table[256] = { - 0u, 1996959894u, 3993919788u, 2567524794u, 124634137u, 1886057615u, 3915621685u, 2657392035u, - 249268274u, 2044508324u, 3772115230u, 2547177864u, 162941995u, 2125561021u, 3887607047u, 2428444049u, - 498536548u, 1789927666u, 4089016648u, 2227061214u, 450548861u, 1843258603u, 4107580753u, 2211677639u, - 325883990u, 1684777152u, 4251122042u, 2321926636u, 335633487u, 1661365465u, 4195302755u, 2366115317u, - 997073096u, 1281953886u, 3579855332u, 2724688242u, 1006888145u, 1258607687u, 3524101629u, 2768942443u, - 901097722u, 1119000684u, 3686517206u, 2898065728u, 853044451u, 1172266101u, 3705015759u, 2882616665u, - 651767980u, 1373503546u, 3369554304u, 3218104598u, 565507253u, 1454621731u, 3485111705u, 3099436303u, - 671266974u, 1594198024u, 3322730930u, 2970347812u, 795835527u, 1483230225u, 3244367275u, 3060149565u, - 1994146192u, 31158534u, 2563907772u, 4023717930u, 1907459465u, 112637215u, 2680153253u, 3904427059u, - 2013776290u, 251722036u, 2517215374u, 3775830040u, 2137656763u, 141376813u, 2439277719u, 3865271297u, - 1802195444u, 476864866u, 2238001368u, 4066508878u, 1812370925u, 453092731u, 2181625025u, 4111451223u, - 1706088902u, 314042704u, 2344532202u, 4240017532u, 1658658271u, 366619977u, 2362670323u, 4224994405u, - 1303535960u, 984961486u, 2747007092u, 3569037538u, 1256170817u, 1037604311u, 2765210733u, 3554079995u, - 1131014506u, 879679996u, 2909243462u, 3663771856u, 1141124467u, 855842277u, 2852801631u, 3708648649u, - 1342533948u, 654459306u, 3188396048u, 3373015174u, 1466479909u, 544179635u, 3110523913u, 3462522015u, - 1591671054u, 702138776u, 2966460450u, 3352799412u, 1504918807u, 783551873u, 3082640443u, 3233442989u, - 3988292384u, 2596254646u, 62317068u, 1957810842u, 3939845945u, 2647816111u, 81470997u, 1943803523u, - 3814918930u, 2489596804u, 225274430u, 2053790376u, 3826175755u, 2466906013u, 167816743u, 2097651377u, - 4027552580u, 2265490386u, 503444072u, 1762050814u, 4150417245u, 2154129355u, 426522225u, 1852507879u, - 4275313526u, 2312317920u, 282753626u, 1742555852u, 4189708143u, 2394877945u, 397917763u, 1622183637u, - 3604390888u, 2714866558u, 953729732u, 1340076626u, 3518719985u, 2797360999u, 1068828381u, 1219638859u, - 3624741850u, 2936675148u, 906185462u, 1090812512u, 3747672003u, 2825379669u, 829329135u, 1181335161u, - 3412177804u, 3160834842u, 628085408u, 1382605366u, 3423369109u, 3138078467u, 570562233u, 1426400815u, - 3317316542u, 2998733608u, 733239954u, 1555261956u, 3268935591u, 3050360625u, 752459403u, 1541320221u, - 2607071920u, 3965973030u, 1969922972u, 40735498u, 2617837225u, 3943577151u, 1913087877u, 83908371u, - 2512341634u, 3803740692u, 2075208622u, 213261112u, 2463272603u, 3855990285u, 2094854071u, 198958881u, - 2262029012u, 4057260610u, 1759359992u, 534414190u, 2176718541u, 4139329115u, 1873836001u, 414664567u, - 2282248934u, 4279200368u, 1711684554u, 285281116u, 2405801727u, 4167216745u, 1634467795u, 376229701u, - 2685067896u, 3608007406u, 1308918612u, 956543938u, 2808555105u, 3495958263u, 1231636301u, 1047427035u, - 2932959818u, 3654703836u, 1088359270u, 936918000u, 2847714899u, 3736837829u, 1202900863u, 817233897u, - 3183342108u, 3401237130u, 1404277552u, 615818150u, 3134207493u, 3453421203u, 1423857449u, 601450431u, - 3009837614u, 3294710456u, 1567103746u, 711928724u, 3020668471u, 3272380065u, 1510334235u, 755167117u -}; - -/*Return the CRC of the bytes buf[0..len-1].*/ -unsigned lodepng_crc32(const unsigned char* data, size_t length) -{ - unsigned r = 0xffffffffu; - size_t i; - for(i = 0; i < length; ++i) - { - r = lodepng_crc32_table[(r ^ data[i]) & 0xff] ^ (r >> 8); - } - return r ^ 0xffffffffu; -} -#else /* !LODEPNG_NO_COMPILE_CRC */ -unsigned lodepng_crc32(const unsigned char* data, size_t length); -#endif /* !LODEPNG_NO_COMPILE_CRC */ - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / Reading and writing single bits and bytes from/to stream for LodePNG / */ -/* ////////////////////////////////////////////////////////////////////////// */ - -static unsigned char readBitFromReversedStream(size_t* bitpointer, const unsigned char* bitstream) -{ - unsigned char result = (unsigned char)((bitstream[(*bitpointer) >> 3] >> (7 - ((*bitpointer) & 0x7))) & 1); - ++(*bitpointer); - return result; -} - -static unsigned readBitsFromReversedStream(size_t* bitpointer, const unsigned char* bitstream, size_t nbits) -{ - unsigned result = 0; - size_t i; - for(i = 0 ; i < nbits; ++i) - { - result <<= 1; - result |= (unsigned)readBitFromReversedStream(bitpointer, bitstream); - } - return result; -} - -#ifdef LODEPNG_COMPILE_DECODER -static void setBitOfReversedStream0(size_t* bitpointer, unsigned char* bitstream, unsigned char bit) -{ - /*the current bit in bitstream must be 0 for this to work*/ - if(bit) - { - /*earlier bit of huffman code is in a lesser significant bit of an earlier byte*/ - bitstream[(*bitpointer) >> 3] |= (bit << (7 - ((*bitpointer) & 0x7))); - } - ++(*bitpointer); -} -#endif /*LODEPNG_COMPILE_DECODER*/ - -static void setBitOfReversedStream(size_t* bitpointer, unsigned char* bitstream, unsigned char bit) -{ - /*the current bit in bitstream may be 0 or 1 for this to work*/ - if(bit == 0) bitstream[(*bitpointer) >> 3] &= (unsigned char)(~(1 << (7 - ((*bitpointer) & 0x7)))); - else bitstream[(*bitpointer) >> 3] |= (1 << (7 - ((*bitpointer) & 0x7))); - ++(*bitpointer); -} - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / PNG chunks / */ -/* ////////////////////////////////////////////////////////////////////////// */ - -unsigned lodepng_chunk_length(const unsigned char* chunk) -{ - return lodepng_read32bitInt(&chunk[0]); -} - -void lodepng_chunk_type(char type[5], const unsigned char* chunk) -{ - unsigned i; - for(i = 0; i != 4; ++i) type[i] = (char)chunk[4 + i]; - type[4] = 0; /*null termination char*/ -} - -unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type) -{ - if(strlen(type) != 4) return 0; - return (chunk[4] == type[0] && chunk[5] == type[1] && chunk[6] == type[2] && chunk[7] == type[3]); -} - -unsigned char lodepng_chunk_ancillary(const unsigned char* chunk) -{ - return((chunk[4] & 32) != 0); -} - -unsigned char lodepng_chunk_private(const unsigned char* chunk) -{ - return((chunk[6] & 32) != 0); -} - -unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk) -{ - return((chunk[7] & 32) != 0); -} - -unsigned char* lodepng_chunk_data(unsigned char* chunk) -{ - return &chunk[8]; -} - -const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk) -{ - return &chunk[8]; -} - -unsigned lodepng_chunk_check_crc(const unsigned char* chunk) -{ - unsigned length = lodepng_chunk_length(chunk); - unsigned CRC = lodepng_read32bitInt(&chunk[length + 8]); - /*the CRC is taken of the data and the 4 chunk type letters, not the length*/ - unsigned checksum = lodepng_crc32(&chunk[4], length + 4); - if(CRC != checksum) return 1; - else return 0; -} - -void lodepng_chunk_generate_crc(unsigned char* chunk) -{ - unsigned length = lodepng_chunk_length(chunk); - unsigned CRC = lodepng_crc32(&chunk[4], length + 4); - lodepng_set32bitInt(chunk + 8 + length, CRC); -} - -unsigned char* lodepng_chunk_next(unsigned char* chunk) -{ - unsigned total_chunk_length = lodepng_chunk_length(chunk) + 12; - return &chunk[total_chunk_length]; -} - -const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk) -{ - unsigned total_chunk_length = lodepng_chunk_length(chunk) + 12; - return &chunk[total_chunk_length]; -} - -unsigned lodepng_chunk_append(unsigned char** out, size_t* outlength, const unsigned char* chunk) -{ - unsigned i; - unsigned total_chunk_length = lodepng_chunk_length(chunk) + 12; - unsigned char *chunk_start, *new_buffer; - size_t new_length = (*outlength) + total_chunk_length; - if(new_length < total_chunk_length || new_length < (*outlength)) return 77; /*integer overflow happened*/ - - new_buffer = (unsigned char*)lodepng_realloc(*out, new_length); - if(!new_buffer) return 83; /*alloc fail*/ - (*out) = new_buffer; - (*outlength) = new_length; - chunk_start = &(*out)[new_length - total_chunk_length]; - - for(i = 0; i != total_chunk_length; ++i) chunk_start[i] = chunk[i]; - - return 0; -} - -unsigned lodepng_chunk_create(unsigned char** out, size_t* outlength, unsigned length, - const char* type, const unsigned char* data) -{ - unsigned i; - unsigned char *chunk, *new_buffer; - size_t new_length = (*outlength) + length + 12; - if(new_length < length + 12 || new_length < (*outlength)) return 77; /*integer overflow happened*/ - new_buffer = (unsigned char*)lodepng_realloc(*out, new_length); - if(!new_buffer) return 83; /*alloc fail*/ - (*out) = new_buffer; - (*outlength) = new_length; - chunk = &(*out)[(*outlength) - length - 12]; - - /*1: length*/ - lodepng_set32bitInt(chunk, (unsigned)length); - - /*2: chunk name (4 letters)*/ - chunk[4] = (unsigned char)type[0]; - chunk[5] = (unsigned char)type[1]; - chunk[6] = (unsigned char)type[2]; - chunk[7] = (unsigned char)type[3]; - - /*3: the data*/ - for(i = 0; i != length; ++i) chunk[8 + i] = data[i]; - - /*4: CRC (of the chunkname characters and the data)*/ - lodepng_chunk_generate_crc(chunk); - - return 0; -} - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / Color types and such / */ -/* ////////////////////////////////////////////////////////////////////////// */ - -/*return type is a LodePNG error code*/ -static unsigned checkColorValidity(LodePNGColorType colortype, unsigned bd) /*bd = bitdepth*/ -{ - switch(colortype) - { - case 0: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; break; /*grey*/ - case 2: if(!( bd == 8 || bd == 16)) return 37; break; /*RGB*/ - case 3: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 )) return 37; break; /*palette*/ - case 4: if(!( bd == 8 || bd == 16)) return 37; break; /*grey + alpha*/ - case 6: if(!( bd == 8 || bd == 16)) return 37; break; /*RGBA*/ - default: return 31; - } - return 0; /*allowed color type / bits combination*/ -} - -static unsigned getNumColorChannels(LodePNGColorType colortype) -{ - switch(colortype) - { - case 0: return 1; /*grey*/ - case 2: return 3; /*RGB*/ - case 3: return 1; /*palette*/ - case 4: return 2; /*grey + alpha*/ - case 6: return 4; /*RGBA*/ - } - return 0; /*unexisting color type*/ -} - -static unsigned lodepng_get_bpp_lct(LodePNGColorType colortype, unsigned bitdepth) -{ - /*bits per pixel is amount of channels * bits per channel*/ - return getNumColorChannels(colortype) * bitdepth; -} - -/* ////////////////////////////////////////////////////////////////////////// */ - -void lodepng_color_mode_init(LodePNGColorMode* info) -{ - info->key_defined = 0; - info->key_r = info->key_g = info->key_b = 0; - info->colortype = LCT_RGBA; - info->bitdepth = 8; - info->palette = 0; - info->palettesize = 0; -} - -void lodepng_color_mode_cleanup(LodePNGColorMode* info) -{ - lodepng_palette_clear(info); -} - -unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source) -{ - size_t i; - lodepng_color_mode_cleanup(dest); - *dest = *source; - if(source->palette) - { - dest->palette = (unsigned char*)lodepng_malloc(1024); - if(!dest->palette && source->palettesize) return 83; /*alloc fail*/ - for(i = 0; i != source->palettesize * 4; ++i) dest->palette[i] = source->palette[i]; - } - return 0; -} - -static int lodepng_color_mode_equal(const LodePNGColorMode* a, const LodePNGColorMode* b) -{ - size_t i; - if(a->colortype != b->colortype) return 0; - if(a->bitdepth != b->bitdepth) return 0; - if(a->key_defined != b->key_defined) return 0; - if(a->key_defined) - { - if(a->key_r != b->key_r) return 0; - if(a->key_g != b->key_g) return 0; - if(a->key_b != b->key_b) return 0; - } - /*if one of the palette sizes is 0, then we consider it to be the same as the - other: it means that e.g. the palette was not given by the user and should be - considered the same as the palette inside the PNG.*/ - if(1/*a->palettesize != 0 && b->palettesize != 0*/) { - if(a->palettesize != b->palettesize) return 0; - for(i = 0; i != a->palettesize * 4; ++i) - { - if(a->palette[i] != b->palette[i]) return 0; - } - } - return 1; -} - -void lodepng_palette_clear(LodePNGColorMode* info) -{ - if(info->palette) lodepng_free(info->palette); - info->palette = 0; - info->palettesize = 0; -} - -unsigned lodepng_palette_add(LodePNGColorMode* info, - unsigned char r, unsigned char g, unsigned char b, unsigned char a) -{ - unsigned char* data; - /*the same resize technique as C++ std::vectors is used, and here it's made so that for a palette with - the max of 256 colors, it'll have the exact alloc size*/ - if(!info->palette) /*allocate palette if empty*/ - { - /*room for 256 colors with 4 bytes each*/ - data = (unsigned char*)lodepng_realloc(info->palette, 1024); - if(!data) return 83; /*alloc fail*/ - else info->palette = data; - } - info->palette[4 * info->palettesize + 0] = r; - info->palette[4 * info->palettesize + 1] = g; - info->palette[4 * info->palettesize + 2] = b; - info->palette[4 * info->palettesize + 3] = a; - ++info->palettesize; - return 0; -} - -unsigned lodepng_get_bpp(const LodePNGColorMode* info) -{ - /*calculate bits per pixel out of colortype and bitdepth*/ - return lodepng_get_bpp_lct(info->colortype, info->bitdepth); -} - -unsigned lodepng_get_channels(const LodePNGColorMode* info) -{ - return getNumColorChannels(info->colortype); -} - -unsigned lodepng_is_greyscale_type(const LodePNGColorMode* info) -{ - return info->colortype == LCT_GREY || info->colortype == LCT_GREY_ALPHA; -} - -unsigned lodepng_is_alpha_type(const LodePNGColorMode* info) -{ - return (info->colortype & 4) != 0; /*4 or 6*/ -} - -unsigned lodepng_is_palette_type(const LodePNGColorMode* info) -{ - return info->colortype == LCT_PALETTE; -} - -unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info) -{ - size_t i; - for(i = 0; i != info->palettesize; ++i) - { - if(info->palette[i * 4 + 3] < 255) return 1; - } - return 0; -} - -unsigned lodepng_can_have_alpha(const LodePNGColorMode* info) -{ - return info->key_defined - || lodepng_is_alpha_type(info) - || lodepng_has_palette_alpha(info); -} - -size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color) -{ - /*will not overflow for any color type if roughly w * h < 268435455*/ - size_t bpp = lodepng_get_bpp(color); - size_t n = w * h; - return ((n / 8) * bpp) + ((n & 7) * bpp + 7) / 8; -} - -size_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) -{ - /*will not overflow for any color type if roughly w * h < 268435455*/ - size_t bpp = lodepng_get_bpp_lct(colortype, bitdepth); - size_t n = w * h; - return ((n / 8) * bpp) + ((n & 7) * bpp + 7) / 8; -} - - -#ifdef LODEPNG_COMPILE_PNG -#ifdef LODEPNG_COMPILE_DECODER -/*in an idat chunk, each scanline is a multiple of 8 bits, unlike the lodepng output buffer*/ -static size_t lodepng_get_raw_size_idat(unsigned w, unsigned h, const LodePNGColorMode* color) -{ - /*will not overflow for any color type if roughly w * h < 268435455*/ - size_t bpp = lodepng_get_bpp(color); - size_t line = ((w / 8) * bpp) + ((w & 7) * bpp + 7) / 8; - return h * line; -} -#endif /*LODEPNG_COMPILE_DECODER*/ -#endif /*LODEPNG_COMPILE_PNG*/ - -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - -static void LodePNGUnknownChunks_init(LodePNGInfo* info) -{ - unsigned i; - for(i = 0; i != 3; ++i) info->unknown_chunks_data[i] = 0; - for(i = 0; i != 3; ++i) info->unknown_chunks_size[i] = 0; -} - -static void LodePNGUnknownChunks_cleanup(LodePNGInfo* info) -{ - unsigned i; - for(i = 0; i != 3; ++i) lodepng_free(info->unknown_chunks_data[i]); -} - -static unsigned LodePNGUnknownChunks_copy(LodePNGInfo* dest, const LodePNGInfo* src) -{ - unsigned i; - - LodePNGUnknownChunks_cleanup(dest); - - for(i = 0; i != 3; ++i) - { - size_t j; - dest->unknown_chunks_size[i] = src->unknown_chunks_size[i]; - dest->unknown_chunks_data[i] = (unsigned char*)lodepng_malloc(src->unknown_chunks_size[i]); - if(!dest->unknown_chunks_data[i] && dest->unknown_chunks_size[i]) return 83; /*alloc fail*/ - for(j = 0; j < src->unknown_chunks_size[i]; ++j) - { - dest->unknown_chunks_data[i][j] = src->unknown_chunks_data[i][j]; - } - } - - return 0; -} - -/******************************************************************************/ - -static void LodePNGText_init(LodePNGInfo* info) -{ - info->text_num = 0; - info->text_keys = NULL; - info->text_strings = NULL; -} - -static void LodePNGText_cleanup(LodePNGInfo* info) -{ - size_t i; - for(i = 0; i != info->text_num; ++i) - { - string_cleanup(&info->text_keys[i]); - string_cleanup(&info->text_strings[i]); - } - lodepng_free(info->text_keys); - lodepng_free(info->text_strings); -} - -static unsigned LodePNGText_copy(LodePNGInfo* dest, const LodePNGInfo* source) -{ - size_t i = 0; - dest->text_keys = 0; - dest->text_strings = 0; - dest->text_num = 0; - for(i = 0; i != source->text_num; ++i) - { - CERROR_TRY_RETURN(lodepng_add_text(dest, source->text_keys[i], source->text_strings[i])); - } - return 0; -} - -void lodepng_clear_text(LodePNGInfo* info) -{ - LodePNGText_cleanup(info); -} - -unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str) -{ - char** new_keys = (char**)(lodepng_realloc(info->text_keys, sizeof(char*) * (info->text_num + 1))); - char** new_strings = (char**)(lodepng_realloc(info->text_strings, sizeof(char*) * (info->text_num + 1))); - if(!new_keys || !new_strings) - { - lodepng_free(new_keys); - lodepng_free(new_strings); - return 83; /*alloc fail*/ - } - - ++info->text_num; - info->text_keys = new_keys; - info->text_strings = new_strings; - - string_init(&info->text_keys[info->text_num - 1]); - string_set(&info->text_keys[info->text_num - 1], key); - - string_init(&info->text_strings[info->text_num - 1]); - string_set(&info->text_strings[info->text_num - 1], str); - - return 0; -} - -/******************************************************************************/ - -static void LodePNGIText_init(LodePNGInfo* info) -{ - info->itext_num = 0; - info->itext_keys = NULL; - info->itext_langtags = NULL; - info->itext_transkeys = NULL; - info->itext_strings = NULL; -} - -static void LodePNGIText_cleanup(LodePNGInfo* info) -{ - size_t i; - for(i = 0; i != info->itext_num; ++i) - { - string_cleanup(&info->itext_keys[i]); - string_cleanup(&info->itext_langtags[i]); - string_cleanup(&info->itext_transkeys[i]); - string_cleanup(&info->itext_strings[i]); - } - lodepng_free(info->itext_keys); - lodepng_free(info->itext_langtags); - lodepng_free(info->itext_transkeys); - lodepng_free(info->itext_strings); -} - -static unsigned LodePNGIText_copy(LodePNGInfo* dest, const LodePNGInfo* source) -{ - size_t i = 0; - dest->itext_keys = 0; - dest->itext_langtags = 0; - dest->itext_transkeys = 0; - dest->itext_strings = 0; - dest->itext_num = 0; - for(i = 0; i != source->itext_num; ++i) - { - CERROR_TRY_RETURN(lodepng_add_itext(dest, source->itext_keys[i], source->itext_langtags[i], - source->itext_transkeys[i], source->itext_strings[i])); - } - return 0; -} - -void lodepng_clear_itext(LodePNGInfo* info) -{ - LodePNGIText_cleanup(info); -} - -unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, - const char* transkey, const char* str) -{ - char** new_keys = (char**)(lodepng_realloc(info->itext_keys, sizeof(char*) * (info->itext_num + 1))); - char** new_langtags = (char**)(lodepng_realloc(info->itext_langtags, sizeof(char*) * (info->itext_num + 1))); - char** new_transkeys = (char**)(lodepng_realloc(info->itext_transkeys, sizeof(char*) * (info->itext_num + 1))); - char** new_strings = (char**)(lodepng_realloc(info->itext_strings, sizeof(char*) * (info->itext_num + 1))); - if(!new_keys || !new_langtags || !new_transkeys || !new_strings) - { - lodepng_free(new_keys); - lodepng_free(new_langtags); - lodepng_free(new_transkeys); - lodepng_free(new_strings); - return 83; /*alloc fail*/ - } - - ++info->itext_num; - info->itext_keys = new_keys; - info->itext_langtags = new_langtags; - info->itext_transkeys = new_transkeys; - info->itext_strings = new_strings; - - string_init(&info->itext_keys[info->itext_num - 1]); - string_set(&info->itext_keys[info->itext_num - 1], key); - - string_init(&info->itext_langtags[info->itext_num - 1]); - string_set(&info->itext_langtags[info->itext_num - 1], langtag); - - string_init(&info->itext_transkeys[info->itext_num - 1]); - string_set(&info->itext_transkeys[info->itext_num - 1], transkey); - - string_init(&info->itext_strings[info->itext_num - 1]); - string_set(&info->itext_strings[info->itext_num - 1], str); - - return 0; -} -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - -void lodepng_info_init(LodePNGInfo* info) -{ - lodepng_color_mode_init(&info->color); - info->interlace_method = 0; - info->compression_method = 0; - info->filter_method = 0; -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - info->background_defined = 0; - info->background_r = info->background_g = info->background_b = 0; - - LodePNGText_init(info); - LodePNGIText_init(info); - - info->time_defined = 0; - info->phys_defined = 0; - - LodePNGUnknownChunks_init(info); -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ -} - -void lodepng_info_cleanup(LodePNGInfo* info) -{ - lodepng_color_mode_cleanup(&info->color); -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - LodePNGText_cleanup(info); - LodePNGIText_cleanup(info); - - LodePNGUnknownChunks_cleanup(info); -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ -} - -unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source) -{ - lodepng_info_cleanup(dest); - *dest = *source; - lodepng_color_mode_init(&dest->color); - CERROR_TRY_RETURN(lodepng_color_mode_copy(&dest->color, &source->color)); - -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - CERROR_TRY_RETURN(LodePNGText_copy(dest, source)); - CERROR_TRY_RETURN(LodePNGIText_copy(dest, source)); - - LodePNGUnknownChunks_init(dest); - CERROR_TRY_RETURN(LodePNGUnknownChunks_copy(dest, source)); -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - return 0; -} - -void lodepng_info_swap(LodePNGInfo* a, LodePNGInfo* b) -{ - LodePNGInfo temp = *a; - *a = *b; - *b = temp; -} - -/* ////////////////////////////////////////////////////////////////////////// */ - -/*index: bitgroup index, bits: bitgroup size(1, 2 or 4), in: bitgroup value, out: octet array to add bits to*/ -static void addColorBits(unsigned char* out, size_t index, unsigned bits, unsigned in) -{ - unsigned m = bits == 1 ? 7 : bits == 2 ? 3 : 1; /*8 / bits - 1*/ - /*p = the partial index in the byte, e.g. with 4 palettebits it is 0 for first half or 1 for second half*/ - unsigned p = index & m; - in &= (1u << bits) - 1u; /*filter out any other bits of the input value*/ - in = in << (bits * (m - p)); - if(p == 0) out[index * bits / 8] = in; - else out[index * bits / 8] |= in; -} - -typedef struct ColorTree ColorTree; - -/* -One node of a color tree -This is the data structure used to count the number of unique colors and to get a palette -index for a color. It's like an octree, but because the alpha channel is used too, each -node has 16 instead of 8 children. -*/ -struct ColorTree -{ - ColorTree* children[16]; /*up to 16 pointers to ColorTree of next level*/ - int index; /*the payload. Only has a meaningful value if this is in the last level*/ -}; - -static void color_tree_init(ColorTree* tree) -{ - int i; - for(i = 0; i != 16; ++i) tree->children[i] = 0; - tree->index = -1; -} - -static void color_tree_cleanup(ColorTree* tree) -{ - int i; - for(i = 0; i != 16; ++i) - { - if(tree->children[i]) - { - color_tree_cleanup(tree->children[i]); - lodepng_free(tree->children[i]); - } - } -} - -/*returns -1 if color not present, its index otherwise*/ -static int color_tree_get(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) -{ - int bit = 0; - for(bit = 0; bit < 8; ++bit) - { - int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1); - if(!tree->children[i]) return -1; - else tree = tree->children[i]; - } - return tree ? tree->index : -1; -} - -#ifdef LODEPNG_COMPILE_ENCODER -static int color_tree_has(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) -{ - return color_tree_get(tree, r, g, b, a) >= 0; -} -#endif /*LODEPNG_COMPILE_ENCODER*/ - -/*color is not allowed to already exist. -Index should be >= 0 (it's signed to be compatible with using -1 for "doesn't exist")*/ -static void color_tree_add(ColorTree* tree, - unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index) -{ - int bit; - for(bit = 0; bit < 8; ++bit) - { - int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1); - if(!tree->children[i]) - { - tree->children[i] = (ColorTree*)lodepng_malloc(sizeof(ColorTree)); - color_tree_init(tree->children[i]); - } - tree = tree->children[i]; - } - tree->index = (int)index; -} - -/*put a pixel, given its RGBA color, into image of any color type*/ -static unsigned rgba8ToPixel(unsigned char* out, size_t i, - const LodePNGColorMode* mode, ColorTree* tree /*for palette*/, - unsigned char r, unsigned char g, unsigned char b, unsigned char a) -{ - if(mode->colortype == LCT_GREY) - { - unsigned char grey = r; /*((unsigned short)r + g + b) / 3*/; - if(mode->bitdepth == 8) out[i] = grey; - else if(mode->bitdepth == 16) out[i * 2 + 0] = out[i * 2 + 1] = grey; - else - { - /*take the most significant bits of grey*/ - grey = (grey >> (8 - mode->bitdepth)) & ((1 << mode->bitdepth) - 1); - addColorBits(out, i, mode->bitdepth, grey); - } - } - else if(mode->colortype == LCT_RGB) - { - if(mode->bitdepth == 8) - { - out[i * 3 + 0] = r; - out[i * 3 + 1] = g; - out[i * 3 + 2] = b; - } - else - { - out[i * 6 + 0] = out[i * 6 + 1] = r; - out[i * 6 + 2] = out[i * 6 + 3] = g; - out[i * 6 + 4] = out[i * 6 + 5] = b; - } - } - else if(mode->colortype == LCT_PALETTE) - { - int index = color_tree_get(tree, r, g, b, a); - if(index < 0) return 82; /*color not in palette*/ - if(mode->bitdepth == 8) out[i] = index; - else addColorBits(out, i, mode->bitdepth, (unsigned)index); - } - else if(mode->colortype == LCT_GREY_ALPHA) - { - unsigned char grey = r; /*((unsigned short)r + g + b) / 3*/; - if(mode->bitdepth == 8) - { - out[i * 2 + 0] = grey; - out[i * 2 + 1] = a; - } - else if(mode->bitdepth == 16) - { - out[i * 4 + 0] = out[i * 4 + 1] = grey; - out[i * 4 + 2] = out[i * 4 + 3] = a; - } - } - else if(mode->colortype == LCT_RGBA) - { - if(mode->bitdepth == 8) - { - out[i * 4 + 0] = r; - out[i * 4 + 1] = g; - out[i * 4 + 2] = b; - out[i * 4 + 3] = a; - } - else - { - out[i * 8 + 0] = out[i * 8 + 1] = r; - out[i * 8 + 2] = out[i * 8 + 3] = g; - out[i * 8 + 4] = out[i * 8 + 5] = b; - out[i * 8 + 6] = out[i * 8 + 7] = a; - } - } - - return 0; /*no error*/ -} - -/*put a pixel, given its RGBA16 color, into image of any color 16-bitdepth type*/ -static void rgba16ToPixel(unsigned char* out, size_t i, - const LodePNGColorMode* mode, - unsigned short r, unsigned short g, unsigned short b, unsigned short a) -{ - if(mode->colortype == LCT_GREY) - { - unsigned short grey = r; /*((unsigned)r + g + b) / 3*/; - out[i * 2 + 0] = (grey >> 8) & 255; - out[i * 2 + 1] = grey & 255; - } - else if(mode->colortype == LCT_RGB) - { - out[i * 6 + 0] = (r >> 8) & 255; - out[i * 6 + 1] = r & 255; - out[i * 6 + 2] = (g >> 8) & 255; - out[i * 6 + 3] = g & 255; - out[i * 6 + 4] = (b >> 8) & 255; - out[i * 6 + 5] = b & 255; - } - else if(mode->colortype == LCT_GREY_ALPHA) - { - unsigned short grey = r; /*((unsigned)r + g + b) / 3*/; - out[i * 4 + 0] = (grey >> 8) & 255; - out[i * 4 + 1] = grey & 255; - out[i * 4 + 2] = (a >> 8) & 255; - out[i * 4 + 3] = a & 255; - } - else if(mode->colortype == LCT_RGBA) - { - out[i * 8 + 0] = (r >> 8) & 255; - out[i * 8 + 1] = r & 255; - out[i * 8 + 2] = (g >> 8) & 255; - out[i * 8 + 3] = g & 255; - out[i * 8 + 4] = (b >> 8) & 255; - out[i * 8 + 5] = b & 255; - out[i * 8 + 6] = (a >> 8) & 255; - out[i * 8 + 7] = a & 255; - } -} - -/*Get RGBA8 color of pixel with index i (y * width + x) from the raw image with given color type.*/ -static void getPixelColorRGBA8(unsigned char* r, unsigned char* g, - unsigned char* b, unsigned char* a, - const unsigned char* in, size_t i, - const LodePNGColorMode* mode) -{ - if(mode->colortype == LCT_GREY) - { - if(mode->bitdepth == 8) - { - *r = *g = *b = in[i]; - if(mode->key_defined && *r == mode->key_r) *a = 0; - else *a = 255; - } - else if(mode->bitdepth == 16) - { - *r = *g = *b = in[i * 2 + 0]; - if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0; - else *a = 255; - } - else - { - unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ - size_t j = i * mode->bitdepth; - unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); - *r = *g = *b = (value * 255) / highest; - if(mode->key_defined && value == mode->key_r) *a = 0; - else *a = 255; - } - } - else if(mode->colortype == LCT_RGB) - { - if(mode->bitdepth == 8) - { - *r = in[i * 3 + 0]; *g = in[i * 3 + 1]; *b = in[i * 3 + 2]; - if(mode->key_defined && *r == mode->key_r && *g == mode->key_g && *b == mode->key_b) *a = 0; - else *a = 255; - } - else - { - *r = in[i * 6 + 0]; - *g = in[i * 6 + 2]; - *b = in[i * 6 + 4]; - if(mode->key_defined && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r - && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g - && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0; - else *a = 255; - } - } - else if(mode->colortype == LCT_PALETTE) - { - unsigned index; - if(mode->bitdepth == 8) index = in[i]; - else - { - size_t j = i * mode->bitdepth; - index = readBitsFromReversedStream(&j, in, mode->bitdepth); - } - - if(index >= mode->palettesize) - { - /*This is an error according to the PNG spec, but common PNG decoders make it black instead. - Done here too, slightly faster due to no error handling needed.*/ - *r = *g = *b = 0; - *a = 255; - } - else - { - *r = mode->palette[index * 4 + 0]; - *g = mode->palette[index * 4 + 1]; - *b = mode->palette[index * 4 + 2]; - *a = mode->palette[index * 4 + 3]; - } - } - else if(mode->colortype == LCT_GREY_ALPHA) - { - if(mode->bitdepth == 8) - { - *r = *g = *b = in[i * 2 + 0]; - *a = in[i * 2 + 1]; - } - else - { - *r = *g = *b = in[i * 4 + 0]; - *a = in[i * 4 + 2]; - } - } - else if(mode->colortype == LCT_RGBA) - { - if(mode->bitdepth == 8) - { - *r = in[i * 4 + 0]; - *g = in[i * 4 + 1]; - *b = in[i * 4 + 2]; - *a = in[i * 4 + 3]; - } - else - { - *r = in[i * 8 + 0]; - *g = in[i * 8 + 2]; - *b = in[i * 8 + 4]; - *a = in[i * 8 + 6]; - } - } -} - -/*Similar to getPixelColorRGBA8, but with all the for loops inside of the color -mode test cases, optimized to convert the colors much faster, when converting -to RGBA or RGB with 8 bit per cannel. buffer must be RGBA or RGB output with -enough memory, if has_alpha is true the output is RGBA. mode has the color mode -of the input buffer.*/ -static void getPixelColorsRGBA8(unsigned char* buffer, size_t numpixels, - unsigned has_alpha, const unsigned char* in, - const LodePNGColorMode* mode) -{ - unsigned num_channels = has_alpha ? 4 : 3; - size_t i; - if(mode->colortype == LCT_GREY) - { - if(mode->bitdepth == 8) - { - for(i = 0; i != numpixels; ++i, buffer += num_channels) - { - buffer[0] = buffer[1] = buffer[2] = in[i]; - if(has_alpha) buffer[3] = mode->key_defined && in[i] == mode->key_r ? 0 : 255; - } - } - else if(mode->bitdepth == 16) - { - for(i = 0; i != numpixels; ++i, buffer += num_channels) - { - buffer[0] = buffer[1] = buffer[2] = in[i * 2]; - if(has_alpha) buffer[3] = mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r ? 0 : 255; - } - } - else - { - unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ - size_t j = 0; - for(i = 0; i != numpixels; ++i, buffer += num_channels) - { - unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); - buffer[0] = buffer[1] = buffer[2] = (value * 255) / highest; - if(has_alpha) buffer[3] = mode->key_defined && value == mode->key_r ? 0 : 255; - } - } - } - else if(mode->colortype == LCT_RGB) - { - if(mode->bitdepth == 8) - { - for(i = 0; i != numpixels; ++i, buffer += num_channels) - { - buffer[0] = in[i * 3 + 0]; - buffer[1] = in[i * 3 + 1]; - buffer[2] = in[i * 3 + 2]; - if(has_alpha) buffer[3] = mode->key_defined && buffer[0] == mode->key_r - && buffer[1]== mode->key_g && buffer[2] == mode->key_b ? 0 : 255; - } - } - else - { - for(i = 0; i != numpixels; ++i, buffer += num_channels) - { - buffer[0] = in[i * 6 + 0]; - buffer[1] = in[i * 6 + 2]; - buffer[2] = in[i * 6 + 4]; - if(has_alpha) buffer[3] = mode->key_defined - && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r - && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g - && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b ? 0 : 255; - } - } - } - else if(mode->colortype == LCT_PALETTE) - { - unsigned index; - size_t j = 0; - for(i = 0; i != numpixels; ++i, buffer += num_channels) - { - if(mode->bitdepth == 8) index = in[i]; - else index = readBitsFromReversedStream(&j, in, mode->bitdepth); - - if(index >= mode->palettesize) - { - /*This is an error according to the PNG spec, but most PNG decoders make it black instead. - Done here too, slightly faster due to no error handling needed.*/ - buffer[0] = buffer[1] = buffer[2] = 0; - if(has_alpha) buffer[3] = 255; - } - else - { - buffer[0] = mode->palette[index * 4 + 0]; - buffer[1] = mode->palette[index * 4 + 1]; - buffer[2] = mode->palette[index * 4 + 2]; - if(has_alpha) buffer[3] = mode->palette[index * 4 + 3]; - } - } - } - else if(mode->colortype == LCT_GREY_ALPHA) - { - if(mode->bitdepth == 8) - { - for(i = 0; i != numpixels; ++i, buffer += num_channels) - { - buffer[0] = buffer[1] = buffer[2] = in[i * 2 + 0]; - if(has_alpha) buffer[3] = in[i * 2 + 1]; - } - } - else - { - for(i = 0; i != numpixels; ++i, buffer += num_channels) - { - buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0]; - if(has_alpha) buffer[3] = in[i * 4 + 2]; - } - } - } - else if(mode->colortype == LCT_RGBA) - { - if(mode->bitdepth == 8) - { - for(i = 0; i != numpixels; ++i, buffer += num_channels) - { - buffer[0] = in[i * 4 + 0]; - buffer[1] = in[i * 4 + 1]; - buffer[2] = in[i * 4 + 2]; - if(has_alpha) buffer[3] = in[i * 4 + 3]; - } - } - else - { - for(i = 0; i != numpixels; ++i, buffer += num_channels) - { - buffer[0] = in[i * 8 + 0]; - buffer[1] = in[i * 8 + 2]; - buffer[2] = in[i * 8 + 4]; - if(has_alpha) buffer[3] = in[i * 8 + 6]; - } - } - } -} - -/*Get RGBA16 color of pixel with index i (y * width + x) from the raw image with -given color type, but the given color type must be 16-bit itself.*/ -static void getPixelColorRGBA16(unsigned short* r, unsigned short* g, unsigned short* b, unsigned short* a, - const unsigned char* in, size_t i, const LodePNGColorMode* mode) -{ - if(mode->colortype == LCT_GREY) - { - *r = *g = *b = 256 * in[i * 2 + 0] + in[i * 2 + 1]; - if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0; - else *a = 65535; - } - else if(mode->colortype == LCT_RGB) - { - *r = 256u * in[i * 6 + 0] + in[i * 6 + 1]; - *g = 256u * in[i * 6 + 2] + in[i * 6 + 3]; - *b = 256u * in[i * 6 + 4] + in[i * 6 + 5]; - if(mode->key_defined - && 256u * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r - && 256u * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g - && 256u * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0; - else *a = 65535; - } - else if(mode->colortype == LCT_GREY_ALPHA) - { - *r = *g = *b = 256u * in[i * 4 + 0] + in[i * 4 + 1]; - *a = 256u * in[i * 4 + 2] + in[i * 4 + 3]; - } - else if(mode->colortype == LCT_RGBA) - { - *r = 256u * in[i * 8 + 0] + in[i * 8 + 1]; - *g = 256u * in[i * 8 + 2] + in[i * 8 + 3]; - *b = 256u * in[i * 8 + 4] + in[i * 8 + 5]; - *a = 256u * in[i * 8 + 6] + in[i * 8 + 7]; - } -} - -unsigned lodepng_convert(unsigned char* out, const unsigned char* in, - const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in, - unsigned w, unsigned h) -{ - size_t i; - ColorTree tree; - size_t numpixels = w * h; - - if(lodepng_color_mode_equal(mode_out, mode_in)) - { - size_t numbytes = lodepng_get_raw_size(w, h, mode_in); - for(i = 0; i != numbytes; ++i) out[i] = in[i]; - return 0; - } - - if(mode_out->colortype == LCT_PALETTE) - { - size_t palettesize = mode_out->palettesize; - const unsigned char* palette = mode_out->palette; - size_t palsize = size_t(1) << mode_out->bitdepth; - /*if the user specified output palette but did not give the values, assume - they want the values of the input color type (assuming that one is palette). - Note that we never create a new palette ourselves.*/ - if(palettesize == 0) - { - palettesize = mode_in->palettesize; - palette = mode_in->palette; - } - if(palettesize < palsize) palsize = palettesize; - color_tree_init(&tree); - for(i = 0; i != palsize; ++i) - { - const unsigned char* p = &palette[i * 4]; - color_tree_add(&tree, p[0], p[1], p[2], p[3], (unsigned int)(i)); - } - } - - if(mode_in->bitdepth == 16 && mode_out->bitdepth == 16) - { - for(i = 0; i != numpixels; ++i) - { - unsigned short r = 0, g = 0, b = 0, a = 0; - getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); - rgba16ToPixel(out, i, mode_out, r, g, b, a); - } - } - else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGBA) - { - getPixelColorsRGBA8(out, numpixels, 1, in, mode_in); - } - else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGB) - { - getPixelColorsRGBA8(out, numpixels, 0, in, mode_in); - } - else - { - unsigned char r = 0, g = 0, b = 0, a = 0; - for(i = 0; i != numpixels; ++i) - { - getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); - CERROR_TRY_RETURN(rgba8ToPixel(out, i, mode_out, &tree, r, g, b, a)); - } - } - - if(mode_out->colortype == LCT_PALETTE) - { - color_tree_cleanup(&tree); - } - - return 0; /*no error*/ -} - -#ifdef LODEPNG_COMPILE_ENCODER - -void lodepng_color_profile_init(LodePNGColorProfile* profile) -{ - profile->colored = 0; - profile->key = 0; - profile->alpha = 0; - profile->key_r = profile->key_g = profile->key_b = 0; - profile->numcolors = 0; - profile->bits = 1; -} - -/*function used for debug purposes with C++*/ -/*void printColorProfile(LodePNGColorProfile* p) -{ - std::cout << "colored: " << (int)p->colored << ", "; - std::cout << "key: " << (int)p->key << ", "; - std::cout << "key_r: " << (int)p->key_r << ", "; - std::cout << "key_g: " << (int)p->key_g << ", "; - std::cout << "key_b: " << (int)p->key_b << ", "; - std::cout << "alpha: " << (int)p->alpha << ", "; - std::cout << "numcolors: " << (int)p->numcolors << ", "; - std::cout << "bits: " << (int)p->bits << std::endl; -}*/ - -/*Returns how many bits needed to represent given value (max 8 bit)*/ -static unsigned getValueRequiredBits(unsigned char value) -{ - if(value == 0 || value == 255) return 1; - /*The scaling of 2-bit and 4-bit values uses multiples of 85 and 17*/ - if(value % 17 == 0) return value % 85 == 0 ? 2 : 4; - return 8; -} - -/*profile must already have been inited with mode. -It's ok to set some parameters of profile to done already.*/ -unsigned lodepng_get_color_profile(LodePNGColorProfile* profile, - const unsigned char* in, unsigned w, unsigned h, - const LodePNGColorMode* mode) -{ - unsigned error = 0; - size_t i; - ColorTree tree; - size_t numpixels = w * h; - - unsigned colored_done = lodepng_is_greyscale_type(mode) ? 1 : 0; - unsigned alpha_done = lodepng_can_have_alpha(mode) ? 0 : 1; - unsigned numcolors_done = 0; - unsigned bpp = lodepng_get_bpp(mode); - unsigned bits_done = bpp == 1 ? 1 : 0; - unsigned maxnumcolors = 257; - unsigned sixteen = 0; - if(bpp <= 8) maxnumcolors = bpp == 1 ? 2 : (bpp == 2 ? 4 : (bpp == 4 ? 16 : 256)); - - color_tree_init(&tree); - - /*Check if the 16-bit input is truly 16-bit*/ - if(mode->bitdepth == 16) - { - unsigned short r, g, b, a; - for(i = 0; i != numpixels; ++i) - { - getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode); - if((r & 255) != ((r >> 8) & 255) || (g & 255) != ((g >> 8) & 255) || - (b & 255) != ((b >> 8) & 255) || (a & 255) != ((a >> 8) & 255)) /*first and second byte differ*/ - { - sixteen = 1; - break; - } - } - } - - if(sixteen) - { - unsigned short r = 0, g = 0, b = 0, a = 0; - profile->bits = 16; - bits_done = numcolors_done = 1; /*counting colors no longer useful, palette doesn't support 16-bit*/ - - for(i = 0; i != numpixels; ++i) - { - getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode); - - if(!colored_done && (r != g || r != b)) - { - profile->colored = 1; - colored_done = 1; - } - - if(!alpha_done) - { - unsigned matchkey = (r == profile->key_r && g == profile->key_g && b == profile->key_b); - if(a != 65535 && (a != 0 || (profile->key && !matchkey))) - { - profile->alpha = 1; - alpha_done = 1; - if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ - } - else if(a == 0 && !profile->alpha && !profile->key) - { - profile->key = 1; - profile->key_r = r; - profile->key_g = g; - profile->key_b = b; - } - else if(a == 65535 && profile->key && matchkey) - { - /* Color key cannot be used if an opaque pixel also has that RGB color. */ - profile->alpha = 1; - alpha_done = 1; - } - } - if(alpha_done && numcolors_done && colored_done && bits_done) break; - } - - if(profile->key && !profile->alpha) - { - for(i = 0; i != numpixels; ++i) - { - getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode); - if(a != 0 && r == profile->key_r && g == profile->key_g && b == profile->key_b) - { - /* Color key cannot be used if an opaque pixel also has that RGB color. */ - profile->alpha = 1; - alpha_done = 1; - } - } - } - } - else /* < 16-bit */ - { - unsigned char r = 0, g = 0, b = 0, a = 0; - for(i = 0; i != numpixels; ++i) - { - getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode); - - if(!bits_done && profile->bits < 8) - { - /*only r is checked, < 8 bits is only relevant for greyscale*/ - unsigned bits = getValueRequiredBits(r); - if(bits > profile->bits) profile->bits = bits; - } - bits_done = (profile->bits >= bpp); - - if(!colored_done && (r != g || r != b)) - { - profile->colored = 1; - colored_done = 1; - if(profile->bits < 8) profile->bits = 8; /*PNG has no colored modes with less than 8-bit per channel*/ - } - - if(!alpha_done) - { - unsigned matchkey = (r == profile->key_r && g == profile->key_g && b == profile->key_b); - if(a != 255 && (a != 0 || (profile->key && !matchkey))) - { - profile->alpha = 1; - alpha_done = 1; - if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ - } - else if(a == 0 && !profile->alpha && !profile->key) - { - profile->key = 1; - profile->key_r = r; - profile->key_g = g; - profile->key_b = b; - } - else if(a == 255 && profile->key && matchkey) - { - /* Color key cannot be used if an opaque pixel also has that RGB color. */ - profile->alpha = 1; - alpha_done = 1; - if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ - } - } - - if(!numcolors_done) - { - if(!color_tree_has(&tree, r, g, b, a)) - { - color_tree_add(&tree, r, g, b, a, profile->numcolors); - if(profile->numcolors < 256) - { - unsigned char* p = profile->palette; - unsigned n = profile->numcolors; - p[n * 4 + 0] = r; - p[n * 4 + 1] = g; - p[n * 4 + 2] = b; - p[n * 4 + 3] = a; - } - ++profile->numcolors; - numcolors_done = profile->numcolors >= maxnumcolors; - } - } - - if(alpha_done && numcolors_done && colored_done && bits_done) break; - } - - if(profile->key && !profile->alpha) - { - for(i = 0; i != numpixels; ++i) - { - getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode); - if(a != 0 && r == profile->key_r && g == profile->key_g && b == profile->key_b) - { - /* Color key cannot be used if an opaque pixel also has that RGB color. */ - profile->alpha = 1; - alpha_done = 1; - } - } - } - - /*make the profile's key always 16-bit for consistency - repeat each byte twice*/ - profile->key_r += (profile->key_r << 8); - profile->key_g += (profile->key_g << 8); - profile->key_b += (profile->key_b << 8); - } - - color_tree_cleanup(&tree); - return error; -} - -/*Automatically chooses color type that gives smallest amount of bits in the -output image, e.g. grey if there are only greyscale pixels, palette if there -are less than 256 colors, ... -Updates values of mode with a potentially smaller color model. mode_out should -contain the user chosen color model, but will be overwritten with the new chosen one.*/ -unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out, - const unsigned char* image, unsigned w, unsigned h, - const LodePNGColorMode* mode_in) -{ - LodePNGColorProfile prof; - unsigned error = 0; - unsigned i, n, palettebits, grey_ok, palette_ok; - - lodepng_color_profile_init(&prof); - error = lodepng_get_color_profile(&prof, image, w, h, mode_in); - if(error) return error; - mode_out->key_defined = 0; - - if(prof.key && w * h <= 16) - { - prof.alpha = 1; /*too few pixels to justify tRNS chunk overhead*/ - if(prof.bits < 8) prof.bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ - } - grey_ok = !prof.colored && !prof.alpha; /*grey without alpha, with potentially low bits*/ - n = prof.numcolors; - palettebits = n <= 2 ? 1 : (n <= 4 ? 2 : (n <= 16 ? 4 : 8)); - palette_ok = n <= 256 && (n * 2 < w * h) && prof.bits <= 8; - if(w * h < n * 2) palette_ok = 0; /*don't add palette overhead if image has only a few pixels*/ - if(grey_ok && prof.bits <= palettebits) palette_ok = 0; /*grey is less overhead*/ - - if(palette_ok) - { - unsigned char* p = prof.palette; - lodepng_palette_clear(mode_out); /*remove potential earlier palette*/ - for(i = 0; i != prof.numcolors; ++i) - { - error = lodepng_palette_add(mode_out, p[i * 4 + 0], p[i * 4 + 1], p[i * 4 + 2], p[i * 4 + 3]); - if(error) break; - } - - mode_out->colortype = LCT_PALETTE; - mode_out->bitdepth = palettebits; - - if(mode_in->colortype == LCT_PALETTE && mode_in->palettesize >= mode_out->palettesize - && mode_in->bitdepth == mode_out->bitdepth) - { - /*If input should have same palette colors, keep original to preserve its order and prevent conversion*/ - lodepng_color_mode_cleanup(mode_out); - lodepng_color_mode_copy(mode_out, mode_in); - } - } - else /*8-bit or 16-bit per channel*/ - { - mode_out->bitdepth = prof.bits; - mode_out->colortype = prof.alpha ? (prof.colored ? LCT_RGBA : LCT_GREY_ALPHA) - : (prof.colored ? LCT_RGB : LCT_GREY); - - if(prof.key && !prof.alpha) - { - unsigned mask = (1u << mode_out->bitdepth) - 1u; /*profile always uses 16-bit, mask converts it*/ - mode_out->key_r = prof.key_r & mask; - mode_out->key_g = prof.key_g & mask; - mode_out->key_b = prof.key_b & mask; - mode_out->key_defined = 1; - } - } - - return error; -} - -#endif /* #ifdef LODEPNG_COMPILE_ENCODER */ - -/* -Paeth predicter, used by PNG filter type 4 -The parameters are of type short, but should come from unsigned chars, the shorts -are only needed to make the paeth calculation correct. -*/ -static unsigned char paethPredictor(short a, short b, short c) -{ - short pa = abs(b - c); - short pb = abs(a - c); - short pc = abs(a + b - c - c); - - if(pc < pa && pc < pb) return (unsigned char)c; - else if(pb < pa) return (unsigned char)b; - else return (unsigned char)a; -} - -/*shared values used by multiple Adam7 related functions*/ - -static const unsigned ADAM7_IX[7] = { 0, 4, 0, 2, 0, 1, 0 }; /*x start values*/ -static const unsigned ADAM7_IY[7] = { 0, 0, 4, 0, 2, 0, 1 }; /*y start values*/ -static const unsigned ADAM7_DX[7] = { 8, 8, 4, 4, 2, 2, 1 }; /*x delta values*/ -static const unsigned ADAM7_DY[7] = { 8, 8, 8, 4, 4, 2, 2 }; /*y delta values*/ - -/* -Outputs various dimensions and positions in the image related to the Adam7 reduced images. -passw: output containing the width of the 7 passes -passh: output containing the height of the 7 passes -filter_passstart: output containing the index of the start and end of each - reduced image with filter bytes -padded_passstart output containing the index of the start and end of each - reduced image when without filter bytes but with padded scanlines -passstart: output containing the index of the start and end of each reduced - image without padding between scanlines, but still padding between the images -w, h: width and height of non-interlaced image -bpp: bits per pixel -"padded" is only relevant if bpp is less than 8 and a scanline or image does not - end at a full byte -*/ -static void Adam7_getpassvalues(unsigned passw[7], unsigned passh[7], size_t filter_passstart[8], - size_t padded_passstart[8], size_t passstart[8], unsigned w, unsigned h, unsigned bpp) -{ - /*the passstart values have 8 values: the 8th one indicates the byte after the end of the 7th (= last) pass*/ - unsigned i; - - /*calculate width and height in pixels of each pass*/ - for(i = 0; i != 7; ++i) - { - passw[i] = (w + ADAM7_DX[i] - ADAM7_IX[i] - 1) / ADAM7_DX[i]; - passh[i] = (h + ADAM7_DY[i] - ADAM7_IY[i] - 1) / ADAM7_DY[i]; - if(passw[i] == 0) passh[i] = 0; - if(passh[i] == 0) passw[i] = 0; - } - - filter_passstart[0] = padded_passstart[0] = passstart[0] = 0; - for(i = 0; i != 7; ++i) - { - /*if passw[i] is 0, it's 0 bytes, not 1 (no filtertype-byte)*/ - filter_passstart[i + 1] = filter_passstart[i] - + ((passw[i] && passh[i]) ? passh[i] * (1 + (passw[i] * bpp + 7) / 8) : 0); - /*bits padded if needed to fill full byte at end of each scanline*/ - padded_passstart[i + 1] = padded_passstart[i] + passh[i] * ((passw[i] * bpp + 7) / 8); - /*only padded at end of reduced image*/ - passstart[i + 1] = passstart[i] + (passh[i] * passw[i] * bpp + 7) / 8; - } -} - -#ifdef LODEPNG_COMPILE_DECODER - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / PNG Decoder / */ -/* ////////////////////////////////////////////////////////////////////////// */ - -/*read the information from the header and store it in the LodePNGInfo. return value is error*/ -unsigned lodepng_inspect(unsigned* w, unsigned* h, LodePNGState* state, - const unsigned char* in, size_t insize) -{ - LodePNGInfo* info = &state->info_png; - if(insize == 0 || in == 0) - { - CERROR_RETURN_ERROR(state->error, 48); /*error: the given data is empty*/ - } - if(insize < 33) - { - CERROR_RETURN_ERROR(state->error, 27); /*error: the data length is smaller than the length of a PNG header*/ - } - - /*when decoding a new PNG image, make sure all parameters created after previous decoding are reset*/ - lodepng_info_cleanup(info); - lodepng_info_init(info); - - if(in[0] != 137 || in[1] != 80 || in[2] != 78 || in[3] != 71 - || in[4] != 13 || in[5] != 10 || in[6] != 26 || in[7] != 10) - { - CERROR_RETURN_ERROR(state->error, 28); /*error: the first 8 bytes are not the correct PNG signature*/ - } - if(lodepng_chunk_length(in + 8) != 13) - { - CERROR_RETURN_ERROR(state->error, 94); /*error: header size must be 13 bytes*/ - } - if(!lodepng_chunk_type_equals(in + 8, "IHDR")) - { - CERROR_RETURN_ERROR(state->error, 29); /*error: it doesn't start with a IHDR chunk!*/ - } - - /*read the values given in the header*/ - *w = lodepng_read32bitInt(&in[16]); - *h = lodepng_read32bitInt(&in[20]); - info->color.bitdepth = in[24]; - info->color.colortype = (LodePNGColorType)in[25]; - info->compression_method = in[26]; - info->filter_method = in[27]; - info->interlace_method = in[28]; - - if(*w == 0 || *h == 0) - { - CERROR_RETURN_ERROR(state->error, 93); - } - - if(!state->decoder.ignore_crc) - { - unsigned CRC = lodepng_read32bitInt(&in[29]); - unsigned checksum = lodepng_crc32(&in[12], 17); - if(CRC != checksum) - { - CERROR_RETURN_ERROR(state->error, 57); /*invalid CRC*/ - } - } - - /*error: only compression method 0 is allowed in the specification*/ - if(info->compression_method != 0) CERROR_RETURN_ERROR(state->error, 32); - /*error: only filter method 0 is allowed in the specification*/ - if(info->filter_method != 0) CERROR_RETURN_ERROR(state->error, 33); - /*error: only interlace methods 0 and 1 exist in the specification*/ - if(info->interlace_method > 1) CERROR_RETURN_ERROR(state->error, 34); - - state->error = checkColorValidity(info->color.colortype, info->color.bitdepth); - return state->error; -} - -static unsigned unfilterScanline(unsigned char* recon, const unsigned char* scanline, const unsigned char* precon, - size_t bytewidth, unsigned char filterType, size_t length) -{ - /* - For PNG filter method 0 - unfilter a PNG image scanline by scanline. when the pixels are smaller than 1 byte, - the filter works byte per byte (bytewidth = 1) - precon is the previous unfiltered scanline, recon the result, scanline the current one - the incoming scanlines do NOT include the filtertype byte, that one is given in the parameter filterType instead - recon and scanline MAY be the same memory address! precon must be disjoint. - */ - - size_t i; - switch(filterType) - { - case 0: - for(i = 0; i != length; ++i) recon[i] = scanline[i]; - break; - case 1: - for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i]; - for(i = bytewidth; i < length; ++i) recon[i] = scanline[i] + recon[i - bytewidth]; - break; - case 2: - if(precon) - { - for(i = 0; i != length; ++i) recon[i] = scanline[i] + precon[i]; - } - else - { - for(i = 0; i != length; ++i) recon[i] = scanline[i]; - } - break; - case 3: - if(precon) - { - for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i] + (precon[i] >> 1); - for(i = bytewidth; i < length; ++i) recon[i] = scanline[i] + ((recon[i - bytewidth] + precon[i]) >> 1); - } - else - { - for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i]; - for(i = bytewidth; i < length; ++i) recon[i] = scanline[i] + (recon[i - bytewidth] >> 1); - } - break; - case 4: - if(precon) - { - for(i = 0; i != bytewidth; ++i) - { - recon[i] = (scanline[i] + precon[i]); /*paethPredictor(0, precon[i], 0) is always precon[i]*/ - } - for(i = bytewidth; i < length; ++i) - { - recon[i] = (scanline[i] + paethPredictor(recon[i - bytewidth], precon[i], precon[i - bytewidth])); - } - } - else - { - for(i = 0; i != bytewidth; ++i) - { - recon[i] = scanline[i]; - } - for(i = bytewidth; i < length; ++i) - { - /*paethPredictor(recon[i - bytewidth], 0, 0) is always recon[i - bytewidth]*/ - recon[i] = (scanline[i] + recon[i - bytewidth]); - } - } - break; - default: return 36; /*error: unexisting filter type given*/ - } - return 0; -} - -static unsigned unfilter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) -{ - /* - For PNG filter method 0 - this function unfilters a single image (e.g. without interlacing this is called once, with Adam7 seven times) - out must have enough bytes allocated already, in must have the scanlines + 1 filtertype byte per scanline - w and h are image dimensions or dimensions of reduced image, bpp is bits per pixel - in and out are allowed to be the same memory address (but aren't the same size since in has the extra filter bytes) - */ - - unsigned y; - unsigned char* prevline = 0; - - /*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/ - size_t bytewidth = (bpp + 7) / 8; - size_t linebytes = (w * bpp + 7) / 8; - - for(y = 0; y < h; ++y) - { - size_t outindex = linebytes * y; - size_t inindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ - unsigned char filterType = in[inindex]; - - CERROR_TRY_RETURN(unfilterScanline(&out[outindex], &in[inindex + 1], prevline, bytewidth, filterType, linebytes)); - - prevline = &out[outindex]; - } - - return 0; -} - -/* -in: Adam7 interlaced image, with no padding bits between scanlines, but between - reduced images so that each reduced image starts at a byte. -out: the same pixels, but re-ordered so that they're now a non-interlaced image with size w*h -bpp: bits per pixel -out has the following size in bits: w * h * bpp. -in is possibly bigger due to padding bits between reduced images. -out must be big enough AND must be 0 everywhere if bpp < 8 in the current implementation -(because that's likely a little bit faster) -NOTE: comments about padding bits are only relevant if bpp < 8 -*/ -static void Adam7_deinterlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) -{ - unsigned passw[7], passh[7]; - size_t filter_passstart[8], padded_passstart[8], passstart[8]; - unsigned i; - - Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); - - if(bpp >= 8) - { - for(i = 0; i != 7; ++i) - { - unsigned x, y, b; - size_t bytewidth = bpp / 8; - for(y = 0; y < passh[i]; ++y) - for(x = 0; x < passw[i]; ++x) - { - size_t pixelinstart = passstart[i] + (y * passw[i] + x) * bytewidth; - size_t pixeloutstart = ((ADAM7_IY[i] + y * ADAM7_DY[i]) * w + ADAM7_IX[i] + x * ADAM7_DX[i]) * bytewidth; - for(b = 0; b < bytewidth; ++b) - { - out[pixeloutstart + b] = in[pixelinstart + b]; - } - } - } - } - else /*bpp < 8: Adam7 with pixels < 8 bit is a bit trickier: with bit pointers*/ - { - for(i = 0; i != 7; ++i) - { - unsigned x, y, b; - unsigned ilinebits = bpp * passw[i]; - unsigned olinebits = bpp * w; - size_t obp, ibp; /*bit pointers (for out and in buffer)*/ - for(y = 0; y < passh[i]; ++y) - for(x = 0; x < passw[i]; ++x) - { - ibp = (8 * passstart[i]) + (y * ilinebits + x * bpp); - obp = (ADAM7_IY[i] + y * ADAM7_DY[i]) * olinebits + (ADAM7_IX[i] + x * ADAM7_DX[i]) * bpp; - for(b = 0; b < bpp; ++b) - { - unsigned char bit = readBitFromReversedStream(&ibp, in); - /*note that this function assumes the out buffer is completely 0, use setBitOfReversedStream otherwise*/ - setBitOfReversedStream0(&obp, out, bit); - } - } - } - } -} - -static void removePaddingBits(unsigned char* out, const unsigned char* in, - size_t olinebits, size_t ilinebits, unsigned h) -{ - /* - After filtering there are still padding bits if scanlines have non multiple of 8 bit amounts. They need - to be removed (except at last scanline of (Adam7-reduced) image) before working with pure image buffers - for the Adam7 code, the color convert code and the output to the user. - in and out are allowed to be the same buffer, in may also be higher but still overlapping; in must - have >= ilinebits*h bits, out must have >= olinebits*h bits, olinebits must be <= ilinebits - also used to move bits after earlier such operations happened, e.g. in a sequence of reduced images from Adam7 - only useful if (ilinebits - olinebits) is a value in the range 1..7 - */ - unsigned y; - size_t diff = ilinebits - olinebits; - size_t ibp = 0, obp = 0; /*input and output bit pointers*/ - for(y = 0; y < h; ++y) - { - size_t x; - for(x = 0; x < olinebits; ++x) - { - unsigned char bit = readBitFromReversedStream(&ibp, in); - setBitOfReversedStream(&obp, out, bit); - } - ibp += diff; - } -} - -/*out must be buffer big enough to contain full image, and in must contain the full decompressed data from -the IDAT chunks (with filter index bytes and possible padding bits) -return value is error*/ -static unsigned postProcessScanlines(unsigned char* out, unsigned char* in, - unsigned w, unsigned h, const LodePNGInfo* info_png) -{ - /* - This function converts the filtered-padded-interlaced data into pure 2D image buffer with the PNG's colortype. - Steps: - *) if no Adam7: 1) unfilter 2) remove padding bits (= posible extra bits per scanline if bpp < 8) - *) if adam7: 1) 7x unfilter 2) 7x remove padding bits 3) Adam7_deinterlace - NOTE: the in buffer will be overwritten with intermediate data! - */ - unsigned bpp = lodepng_get_bpp(&info_png->color); - if(bpp == 0) return 31; /*error: invalid colortype*/ - - if(info_png->interlace_method == 0) - { - if(bpp < 8 && w * bpp != ((w * bpp + 7) / 8) * 8) - { - CERROR_TRY_RETURN(unfilter(in, in, w, h, bpp)); - removePaddingBits(out, in, w * bpp, ((w * bpp + 7) / 8) * 8, h); - } - /*we can immediately filter into the out buffer, no other steps needed*/ - else CERROR_TRY_RETURN(unfilter(out, in, w, h, bpp)); - } - else /*interlace_method is 1 (Adam7)*/ - { - unsigned passw[7], passh[7]; size_t filter_passstart[8], padded_passstart[8], passstart[8]; - unsigned i; - - Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); - - for(i = 0; i != 7; ++i) - { - CERROR_TRY_RETURN(unfilter(&in[padded_passstart[i]], &in[filter_passstart[i]], passw[i], passh[i], bpp)); - /*TODO: possible efficiency improvement: if in this reduced image the bits fit nicely in 1 scanline, - move bytes instead of bits or move not at all*/ - if(bpp < 8) - { - /*remove padding bits in scanlines; after this there still may be padding - bits between the different reduced images: each reduced image still starts nicely at a byte*/ - removePaddingBits(&in[passstart[i]], &in[padded_passstart[i]], passw[i] * bpp, - ((passw[i] * bpp + 7) / 8) * 8, passh[i]); - } - } - - Adam7_deinterlace(out, in, w, h, bpp); - } - - return 0; -} - -static unsigned readChunk_PLTE(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength) -{ - unsigned pos = 0, i; - if(color->palette) lodepng_free(color->palette); - color->palettesize = chunkLength / 3; - color->palette = (unsigned char*)lodepng_malloc(4 * color->palettesize); - if(!color->palette && color->palettesize) - { - color->palettesize = 0; - return 83; /*alloc fail*/ - } - if(color->palettesize > 256) return 38; /*error: palette too big*/ - - for(i = 0; i != color->palettesize; ++i) - { - color->palette[4 * i + 0] = data[pos++]; /*R*/ - color->palette[4 * i + 1] = data[pos++]; /*G*/ - color->palette[4 * i + 2] = data[pos++]; /*B*/ - color->palette[4 * i + 3] = 255; /*alpha*/ - } - - return 0; /* OK */ -} - -static unsigned readChunk_tRNS(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength) -{ - unsigned i; - if(color->colortype == LCT_PALETTE) - { - /*error: more alpha values given than there are palette entries*/ - if(chunkLength > color->palettesize) return 38; - - for(i = 0; i != chunkLength; ++i) color->palette[4 * i + 3] = data[i]; - } - else if(color->colortype == LCT_GREY) - { - /*error: this chunk must be 2 bytes for greyscale image*/ - if(chunkLength != 2) return 30; - - color->key_defined = 1; - color->key_r = color->key_g = color->key_b = 256u * data[0] + data[1]; - } - else if(color->colortype == LCT_RGB) - { - /*error: this chunk must be 6 bytes for RGB image*/ - if(chunkLength != 6) return 41; - - color->key_defined = 1; - color->key_r = 256u * data[0] + data[1]; - color->key_g = 256u * data[2] + data[3]; - color->key_b = 256u * data[4] + data[5]; - } - else return 42; /*error: tRNS chunk not allowed for other color models*/ - - return 0; /* OK */ -} - - -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS -/*background color chunk (bKGD)*/ -static unsigned readChunk_bKGD(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) -{ - if(info->color.colortype == LCT_PALETTE) - { - /*error: this chunk must be 1 byte for indexed color image*/ - if(chunkLength != 1) return 43; - - info->background_defined = 1; - info->background_r = info->background_g = info->background_b = data[0]; - } - else if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) - { - /*error: this chunk must be 2 bytes for greyscale image*/ - if(chunkLength != 2) return 44; - - info->background_defined = 1; - info->background_r = info->background_g = info->background_b = 256u * data[0] + data[1]; - } - else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) - { - /*error: this chunk must be 6 bytes for greyscale image*/ - if(chunkLength != 6) return 45; - - info->background_defined = 1; - info->background_r = 256u * data[0] + data[1]; - info->background_g = 256u * data[2] + data[3]; - info->background_b = 256u * data[4] + data[5]; - } - - return 0; /* OK */ -} - -/*text chunk (tEXt)*/ -static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) -{ - unsigned error = 0; - char *key = 0, *str = 0; - unsigned i; - - while(!error) /*not really a while loop, only used to break on error*/ - { - unsigned length, string2_begin; - - length = 0; - while(length < chunkLength && data[length] != 0) ++length; - /*even though it's not allowed by the standard, no error is thrown if - there's no null termination char, if the text is empty*/ - if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ - - key = (char*)lodepng_malloc(length + 1); - if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ - - key[length] = 0; - for(i = 0; i != length; ++i) key[i] = (char)data[i]; - - string2_begin = length + 1; /*skip keyword null terminator*/ - - length = chunkLength < string2_begin ? 0 : chunkLength - string2_begin; - str = (char*)lodepng_malloc(length + 1); - if(!str) CERROR_BREAK(error, 83); /*alloc fail*/ - - str[length] = 0; - for(i = 0; i != length; ++i) str[i] = (char)data[string2_begin + i]; - - error = lodepng_add_text(info, key, str); - - break; - } - - lodepng_free(key); - lodepng_free(str); - - return error; -} - -/*compressed text chunk (zTXt)*/ -static unsigned readChunk_zTXt(LodePNGInfo* info, const LodePNGDecompressSettings* zlibsettings, - const unsigned char* data, size_t chunkLength) -{ - unsigned error = 0; - unsigned i; - - unsigned length, string2_begin; - char *key = 0; - ucvector decoded; - - ucvector_init(&decoded); - - while(!error) /*not really a while loop, only used to break on error*/ - { - for(length = 0; length < chunkLength && data[length] != 0; ++length) ; - if(length + 2 >= chunkLength) CERROR_BREAK(error, 75); /*no null termination, corrupt?*/ - if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ - - key = (char*)lodepng_malloc(length + 1); - if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ - - key[length] = 0; - for(i = 0; i != length; ++i) key[i] = (char)data[i]; - - if(data[length + 1] != 0) CERROR_BREAK(error, 72); /*the 0 byte indicating compression must be 0*/ - - string2_begin = length + 2; - if(string2_begin > chunkLength) CERROR_BREAK(error, 75); /*no null termination, corrupt?*/ - - length = chunkLength - string2_begin; - /*will fail if zlib error, e.g. if length is too small*/ - error = zlib_decompress(&decoded.data, &decoded.size, - (unsigned char*)(&data[string2_begin]), - length, zlibsettings); - if(error) break; - ucvector_push_back(&decoded, 0); - - error = lodepng_add_text(info, key, (char*)decoded.data); - - break; - } - - lodepng_free(key); - ucvector_cleanup(&decoded); - - return error; -} - -/*international text chunk (iTXt)*/ -static unsigned readChunk_iTXt(LodePNGInfo* info, const LodePNGDecompressSettings* zlibsettings, - const unsigned char* data, size_t chunkLength) -{ - unsigned error = 0; - unsigned i; - - unsigned length, begin, compressed; - char *key = 0, *langtag = 0, *transkey = 0; - ucvector decoded; - ucvector_init(&decoded); - - while(!error) /*not really a while loop, only used to break on error*/ - { - /*Quick check if the chunk length isn't too small. Even without check - it'd still fail with other error checks below if it's too short. This just gives a different error code.*/ - if(chunkLength < 5) CERROR_BREAK(error, 30); /*iTXt chunk too short*/ - - /*read the key*/ - for(length = 0; length < chunkLength && data[length] != 0; ++length) ; - if(length + 3 >= chunkLength) CERROR_BREAK(error, 75); /*no null termination char, corrupt?*/ - if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ - - key = (char*)lodepng_malloc(length + 1); - if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ - - key[length] = 0; - for(i = 0; i != length; ++i) key[i] = (char)data[i]; - - /*read the compression method*/ - compressed = data[length + 1]; - if(data[length + 2] != 0) CERROR_BREAK(error, 72); /*the 0 byte indicating compression must be 0*/ - - /*even though it's not allowed by the standard, no error is thrown if - there's no null termination char, if the text is empty for the next 3 texts*/ - - /*read the langtag*/ - begin = length + 3; - length = 0; - for(i = begin; i < chunkLength && data[i] != 0; ++i) ++length; - - langtag = (char*)lodepng_malloc(length + 1); - if(!langtag) CERROR_BREAK(error, 83); /*alloc fail*/ - - langtag[length] = 0; - for(i = 0; i != length; ++i) langtag[i] = (char)data[begin + i]; - - /*read the transkey*/ - begin += length + 1; - length = 0; - for(i = begin; i < chunkLength && data[i] != 0; ++i) ++length; - - transkey = (char*)lodepng_malloc(length + 1); - if(!transkey) CERROR_BREAK(error, 83); /*alloc fail*/ - - transkey[length] = 0; - for(i = 0; i != length; ++i) transkey[i] = (char)data[begin + i]; - - /*read the actual text*/ - begin += length + 1; - - length = chunkLength < begin ? 0 : chunkLength - begin; - - if(compressed) - { - /*will fail if zlib error, e.g. if length is too small*/ - error = zlib_decompress(&decoded.data, &decoded.size, - (unsigned char*)(&data[begin]), - length, zlibsettings); - if(error) break; - if(decoded.allocsize < decoded.size) decoded.allocsize = decoded.size; - ucvector_push_back(&decoded, 0); - } - else - { - if(!ucvector_resize(&decoded, length + 1)) CERROR_BREAK(error, 83 /*alloc fail*/); - - decoded.data[length] = 0; - for(i = 0; i != length; ++i) decoded.data[i] = data[begin + i]; - } - - error = lodepng_add_itext(info, key, langtag, transkey, (char*)decoded.data); - - break; - } - - lodepng_free(key); - lodepng_free(langtag); - lodepng_free(transkey); - ucvector_cleanup(&decoded); - - return error; -} - -static unsigned readChunk_tIME(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) -{ - if(chunkLength != 7) return 73; /*invalid tIME chunk size*/ - - info->time_defined = 1; - info->time.year = 256u * data[0] + data[1]; - info->time.month = data[2]; - info->time.day = data[3]; - info->time.hour = data[4]; - info->time.minute = data[5]; - info->time.second = data[6]; - - return 0; /* OK */ -} - -static unsigned readChunk_pHYs(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) -{ - if(chunkLength != 9) return 74; /*invalid pHYs chunk size*/ - - info->phys_defined = 1; - info->phys_x = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3]; - info->phys_y = 16777216u * data[4] + 65536u * data[5] + 256u * data[6] + data[7]; - info->phys_unit = data[8]; - - return 0; /* OK */ -} -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - -/*read a PNG, the result will be in the same color type as the PNG (hence "generic")*/ -static void decodeGeneric(unsigned char** out, unsigned* w, unsigned* h, - LodePNGState* state, - const unsigned char* in, size_t insize) -{ - unsigned char IEND = 0; - const unsigned char* chunk; - size_t i; - ucvector idat; /*the data from idat chunks*/ - ucvector scanlines; - size_t predict; - size_t numpixels; - size_t outsize = 0; - - /*for unknown chunk order*/ - unsigned unknown = 0; -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - unsigned critical_pos = 1; /*1 = after IHDR, 2 = after PLTE, 3 = after IDAT*/ -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - - /*provide some proper output values if error will happen*/ - *out = 0; - - state->error = lodepng_inspect(w, h, state, in, insize); /*reads header and resets other parameters in state->info_png*/ - if(state->error) return; - - numpixels = *w * *h; - - /*multiplication overflow*/ - if(*h != 0 && numpixels / *h != *w) CERROR_RETURN(state->error, 92); - /*multiplication overflow possible further below. Allows up to 2^31-1 pixel - bytes with 16-bit RGBA, the rest is room for filter bytes.*/ - if(numpixels > 268435455) CERROR_RETURN(state->error, 92); - - ucvector_init(&idat); - chunk = &in[33]; /*first byte of the first chunk after the header*/ - - /*loop through the chunks, ignoring unknown chunks and stopping at IEND chunk. - IDAT data is put at the start of the in buffer*/ - while(!IEND && !state->error) - { - unsigned chunkLength; - const unsigned char* data; /*the data in the chunk*/ - - /*error: size of the in buffer too small to contain next chunk*/ - if((size_t)((chunk - in) + 12) > insize || chunk < in) CERROR_BREAK(state->error, 30); - - /*length of the data of the chunk, excluding the length bytes, chunk type and CRC bytes*/ - chunkLength = lodepng_chunk_length(chunk); - /*error: chunk length larger than the max PNG chunk size*/ - if(chunkLength > 2147483647) CERROR_BREAK(state->error, 63); - - if((size_t)((chunk - in) + chunkLength + 12) > insize || (chunk + chunkLength + 12) < in) - { - CERROR_BREAK(state->error, 64); /*error: size of the in buffer too small to contain next chunk*/ - } - - data = lodepng_chunk_data_const(chunk); - - /*IDAT chunk, containing compressed image data*/ - if(lodepng_chunk_type_equals(chunk, "IDAT")) - { - size_t oldsize = idat.size; - if(!ucvector_resize(&idat, oldsize + chunkLength)) CERROR_BREAK(state->error, 83 /*alloc fail*/); - for(i = 0; i != chunkLength; ++i) idat.data[oldsize + i] = data[i]; -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - critical_pos = 3; -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - } - /*IEND chunk*/ - else if(lodepng_chunk_type_equals(chunk, "IEND")) - { - IEND = 1; - } - /*palette chunk (PLTE)*/ - else if(lodepng_chunk_type_equals(chunk, "PLTE")) - { - state->error = readChunk_PLTE(&state->info_png.color, data, chunkLength); - if(state->error) break; -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - critical_pos = 2; -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - } - /*palette transparency chunk (tRNS)*/ - else if(lodepng_chunk_type_equals(chunk, "tRNS")) - { - state->error = readChunk_tRNS(&state->info_png.color, data, chunkLength); - if(state->error) break; - } -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - /*background color chunk (bKGD)*/ - else if(lodepng_chunk_type_equals(chunk, "bKGD")) - { - state->error = readChunk_bKGD(&state->info_png, data, chunkLength); - if(state->error) break; - } - /*text chunk (tEXt)*/ - else if(lodepng_chunk_type_equals(chunk, "tEXt")) - { - if(state->decoder.read_text_chunks) - { - state->error = readChunk_tEXt(&state->info_png, data, chunkLength); - if(state->error) break; - } - } - /*compressed text chunk (zTXt)*/ - else if(lodepng_chunk_type_equals(chunk, "zTXt")) - { - if(state->decoder.read_text_chunks) - { - state->error = readChunk_zTXt(&state->info_png, &state->decoder.zlibsettings, data, chunkLength); - if(state->error) break; - } - } - /*international text chunk (iTXt)*/ - else if(lodepng_chunk_type_equals(chunk, "iTXt")) - { - if(state->decoder.read_text_chunks) - { - state->error = readChunk_iTXt(&state->info_png, &state->decoder.zlibsettings, data, chunkLength); - if(state->error) break; - } - } - else if(lodepng_chunk_type_equals(chunk, "tIME")) - { - state->error = readChunk_tIME(&state->info_png, data, chunkLength); - if(state->error) break; - } - else if(lodepng_chunk_type_equals(chunk, "pHYs")) - { - state->error = readChunk_pHYs(&state->info_png, data, chunkLength); - if(state->error) break; - } -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - else /*it's not an implemented chunk type, so ignore it: skip over the data*/ - { - /*error: unknown critical chunk (5th bit of first byte of chunk type is 0)*/ - if(!lodepng_chunk_ancillary(chunk)) CERROR_BREAK(state->error, 69); - - unknown = 1; -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - if(state->decoder.remember_unknown_chunks) - { - state->error = lodepng_chunk_append(&state->info_png.unknown_chunks_data[critical_pos - 1], - &state->info_png.unknown_chunks_size[critical_pos - 1], chunk); - if(state->error) break; - } -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - } - - if(!state->decoder.ignore_crc && !unknown) /*check CRC if wanted, only on known chunk types*/ - { - if(lodepng_chunk_check_crc(chunk)) CERROR_BREAK(state->error, 57); /*invalid CRC*/ - } - - if(!IEND) chunk = lodepng_chunk_next_const(chunk); - } - - ucvector_init(&scanlines); - /*predict output size, to allocate exact size for output buffer to avoid more dynamic allocation. - If the decompressed size does not match the prediction, the image must be corrupt.*/ - if(state->info_png.interlace_method == 0) - { - /*The extra *h is added because this are the filter bytes every scanline starts with*/ - predict = lodepng_get_raw_size_idat(*w, *h, &state->info_png.color) + *h; - } - else - { - /*Adam-7 interlaced: predicted size is the sum of the 7 sub-images sizes*/ - const LodePNGColorMode* color = &state->info_png.color; - predict = 0; - predict += lodepng_get_raw_size_idat((*w + 7) >> 3, (*h + 7) >> 3, color) + ((*h + 7) >> 3); - if(*w > 4) predict += lodepng_get_raw_size_idat((*w + 3) >> 3, (*h + 7) >> 3, color) + ((*h + 7) >> 3); - predict += lodepng_get_raw_size_idat((*w + 3) >> 2, (*h + 3) >> 3, color) + ((*h + 3) >> 3); - if(*w > 2) predict += lodepng_get_raw_size_idat((*w + 1) >> 2, (*h + 3) >> 2, color) + ((*h + 3) >> 2); - predict += lodepng_get_raw_size_idat((*w + 1) >> 1, (*h + 1) >> 2, color) + ((*h + 1) >> 2); - if(*w > 1) predict += lodepng_get_raw_size_idat((*w + 0) >> 1, (*h + 1) >> 1, color) + ((*h + 1) >> 1); - predict += lodepng_get_raw_size_idat((*w + 0), (*h + 0) >> 1, color) + ((*h + 0) >> 1); - } - if(!state->error && !ucvector_reserve(&scanlines, predict)) state->error = 83; /*alloc fail*/ - if(!state->error) - { - state->error = zlib_decompress(&scanlines.data, &scanlines.size, idat.data, - idat.size, &state->decoder.zlibsettings); - if(!state->error && scanlines.size != predict) state->error = 91; /*decompressed size doesn't match prediction*/ - } - ucvector_cleanup(&idat); - - if(!state->error) - { - outsize = lodepng_get_raw_size(*w, *h, &state->info_png.color); - *out = (unsigned char*)lodepng_malloc(outsize); - if(!*out) state->error = 83; /*alloc fail*/ - } - if(!state->error) - { - for(i = 0; i < outsize; i++) (*out)[i] = 0; - state->error = postProcessScanlines(*out, scanlines.data, *w, *h, &state->info_png); - } - ucvector_cleanup(&scanlines); -} - -unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h, - LodePNGState* state, - const unsigned char* in, size_t insize) -{ - *out = 0; - decodeGeneric(out, w, h, state, in, insize); - if(state->error) return state->error; - if(!state->decoder.color_convert || lodepng_color_mode_equal(&state->info_raw, &state->info_png.color)) - { - /*same color type, no copying or converting of data needed*/ - /*store the info_png color settings on the info_raw so that the info_raw still reflects what colortype - the raw image has to the end user*/ - if(!state->decoder.color_convert) - { - state->error = lodepng_color_mode_copy(&state->info_raw, &state->info_png.color); - if(state->error) return state->error; - } - } - else - { - /*color conversion needed; sort of copy of the data*/ - unsigned char* data = *out; - size_t outsize; - - /*TODO: check if this works according to the statement in the documentation: "The converter can convert - from greyscale input color type, to 8-bit greyscale or greyscale with alpha"*/ - if(!(state->info_raw.colortype == LCT_RGB || state->info_raw.colortype == LCT_RGBA) - && !(state->info_raw.bitdepth == 8)) - { - return 56; /*unsupported color mode conversion*/ - } - - outsize = lodepng_get_raw_size(*w, *h, &state->info_raw); - *out = (unsigned char*)lodepng_malloc(outsize); - if(!(*out)) - { - state->error = 83; /*alloc fail*/ - } - else state->error = lodepng_convert(*out, data, &state->info_raw, - &state->info_png.color, *w, *h); - lodepng_free(data); - } - return state->error; -} - -unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, - size_t insize, LodePNGColorType colortype, unsigned bitdepth) -{ - unsigned error; - LodePNGState state; - lodepng_state_init(&state); - state.info_raw.colortype = colortype; - state.info_raw.bitdepth = bitdepth; - error = lodepng_decode(out, w, h, &state, in, insize); - lodepng_state_cleanup(&state); - return error; -} - -unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize) -{ - return lodepng_decode_memory(out, w, h, in, insize, LCT_RGBA, 8); -} - -unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize) -{ - return lodepng_decode_memory(out, w, h, in, insize, LCT_RGB, 8); -} - -#ifdef LODEPNG_COMPILE_DISK -unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename, - LodePNGColorType colortype, unsigned bitdepth) -{ - unsigned char* buffer = 0; - size_t buffersize; - unsigned error; - error = lodepng_load_file(&buffer, &buffersize, filename); - if(!error) error = lodepng_decode_memory(out, w, h, buffer, buffersize, colortype, bitdepth); - lodepng_free(buffer); - return error; -} - -unsigned lodepng_decode32_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename) -{ - return lodepng_decode_file(out, w, h, filename, LCT_RGBA, 8); -} - -unsigned lodepng_decode24_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename) -{ - return lodepng_decode_file(out, w, h, filename, LCT_RGB, 8); -} -#endif /*LODEPNG_COMPILE_DISK*/ - -void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings) -{ - settings->color_convert = 1; -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - settings->read_text_chunks = 1; - settings->remember_unknown_chunks = 0; -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - settings->ignore_crc = 0; - lodepng_decompress_settings_init(&settings->zlibsettings); -} - -#endif /*LODEPNG_COMPILE_DECODER*/ - -#if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) - -void lodepng_state_init(LodePNGState* state) -{ -#ifdef LODEPNG_COMPILE_DECODER - lodepng_decoder_settings_init(&state->decoder); -#endif /*LODEPNG_COMPILE_DECODER*/ -#ifdef LODEPNG_COMPILE_ENCODER - lodepng_encoder_settings_init(&state->encoder); -#endif /*LODEPNG_COMPILE_ENCODER*/ - lodepng_color_mode_init(&state->info_raw); - lodepng_info_init(&state->info_png); - state->error = 1; -} - -void lodepng_state_cleanup(LodePNGState* state) -{ - lodepng_color_mode_cleanup(&state->info_raw); - lodepng_info_cleanup(&state->info_png); -} - -void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source) -{ - lodepng_state_cleanup(dest); - *dest = *source; - lodepng_color_mode_init(&dest->info_raw); - lodepng_info_init(&dest->info_png); - dest->error = lodepng_color_mode_copy(&dest->info_raw, &source->info_raw); if(dest->error) return; - dest->error = lodepng_info_copy(&dest->info_png, &source->info_png); if(dest->error) return; -} - -#endif /* defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) */ - -#ifdef LODEPNG_COMPILE_ENCODER - -/* ////////////////////////////////////////////////////////////////////////// */ -/* / PNG Encoder / */ -/* ////////////////////////////////////////////////////////////////////////// */ - -/*chunkName must be string of 4 characters*/ -static unsigned addChunk(ucvector* out, const char* chunkName, const unsigned char* data, size_t length) -{ - CERROR_TRY_RETURN(lodepng_chunk_create(&out->data, &out->size, (unsigned)length, chunkName, data)); - out->allocsize = out->size; /*fix the allocsize again*/ - return 0; -} - -static void writeSignature(ucvector* out) -{ - /*8 bytes PNG signature, aka the magic bytes*/ - ucvector_push_back(out, 137); - ucvector_push_back(out, 80); - ucvector_push_back(out, 78); - ucvector_push_back(out, 71); - ucvector_push_back(out, 13); - ucvector_push_back(out, 10); - ucvector_push_back(out, 26); - ucvector_push_back(out, 10); -} - -static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h, - LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) -{ - unsigned error = 0; - ucvector header; - ucvector_init(&header); - - lodepng_add32bitInt(&header, w); /*width*/ - lodepng_add32bitInt(&header, h); /*height*/ - ucvector_push_back(&header, (unsigned char)bitdepth); /*bit depth*/ - ucvector_push_back(&header, (unsigned char)colortype); /*color type*/ - ucvector_push_back(&header, 0); /*compression method*/ - ucvector_push_back(&header, 0); /*filter method*/ - ucvector_push_back(&header, interlace_method); /*interlace method*/ - - error = addChunk(out, "IHDR", header.data, header.size); - ucvector_cleanup(&header); - - return error; -} - -static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info) -{ - unsigned error = 0; - size_t i; - ucvector PLTE; - ucvector_init(&PLTE); - for(i = 0; i != info->palettesize * 4; ++i) - { - /*add all channels except alpha channel*/ - if(i % 4 != 3) ucvector_push_back(&PLTE, info->palette[i]); - } - error = addChunk(out, "PLTE", PLTE.data, PLTE.size); - ucvector_cleanup(&PLTE); - - return error; -} - -static unsigned addChunk_tRNS(ucvector* out, const LodePNGColorMode* info) -{ - unsigned error = 0; - size_t i; - ucvector tRNS; - ucvector_init(&tRNS); - if(info->colortype == LCT_PALETTE) - { - size_t amount = info->palettesize; - /*the tail of palette values that all have 255 as alpha, does not have to be encoded*/ - for(i = info->palettesize; i != 0; --i) - { - if(info->palette[4 * (i - 1) + 3] == 255) --amount; - else break; - } - /*add only alpha channel*/ - for(i = 0; i != amount; ++i) ucvector_push_back(&tRNS, info->palette[4 * i + 3]); - } - else if(info->colortype == LCT_GREY) - { - if(info->key_defined) - { - ucvector_push_back(&tRNS, (unsigned char)(info->key_r >> 8)); - ucvector_push_back(&tRNS, (unsigned char)(info->key_r & 255)); - } - } - else if(info->colortype == LCT_RGB) - { - if(info->key_defined) - { - ucvector_push_back(&tRNS, (unsigned char)(info->key_r >> 8)); - ucvector_push_back(&tRNS, (unsigned char)(info->key_r & 255)); - ucvector_push_back(&tRNS, (unsigned char)(info->key_g >> 8)); - ucvector_push_back(&tRNS, (unsigned char)(info->key_g & 255)); - ucvector_push_back(&tRNS, (unsigned char)(info->key_b >> 8)); - ucvector_push_back(&tRNS, (unsigned char)(info->key_b & 255)); - } - } - - error = addChunk(out, "tRNS", tRNS.data, tRNS.size); - ucvector_cleanup(&tRNS); - - return error; -} - -static unsigned addChunk_IDAT(ucvector* out, const unsigned char* data, size_t datasize, - LodePNGCompressSettings* zlibsettings) -{ - ucvector zlibdata; - unsigned error = 0; - - /*compress with the Zlib compressor*/ - ucvector_init(&zlibdata); - error = zlib_compress(&zlibdata.data, &zlibdata.size, data, datasize, zlibsettings); - if(!error) error = addChunk(out, "IDAT", zlibdata.data, zlibdata.size); - ucvector_cleanup(&zlibdata); - - return error; -} - -static unsigned addChunk_IEND(ucvector* out) -{ - unsigned error = 0; - error = addChunk(out, "IEND", 0, 0); - return error; -} - -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - -static unsigned addChunk_tEXt(ucvector* out, const char* keyword, const char* textstring) -{ - unsigned error = 0; - size_t i; - ucvector text; - ucvector_init(&text); - for(i = 0; keyword[i] != 0; ++i) ucvector_push_back(&text, (unsigned char)keyword[i]); - if(i < 1 || i > 79) return 89; /*error: invalid keyword size*/ - ucvector_push_back(&text, 0); /*0 termination char*/ - for(i = 0; textstring[i] != 0; ++i) ucvector_push_back(&text, (unsigned char)textstring[i]); - error = addChunk(out, "tEXt", text.data, text.size); - ucvector_cleanup(&text); - - return error; -} - -static unsigned addChunk_zTXt(ucvector* out, const char* keyword, const char* textstring, - LodePNGCompressSettings* zlibsettings) -{ - unsigned error = 0; - ucvector data, compressed; - size_t i, textsize = strlen(textstring); - - ucvector_init(&data); - ucvector_init(&compressed); - for(i = 0; keyword[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)keyword[i]); - if(i < 1 || i > 79) return 89; /*error: invalid keyword size*/ - ucvector_push_back(&data, 0); /*0 termination char*/ - ucvector_push_back(&data, 0); /*compression method: 0*/ - - error = zlib_compress(&compressed.data, &compressed.size, - (unsigned char*)textstring, textsize, zlibsettings); - if(!error) - { - for(i = 0; i != compressed.size; ++i) ucvector_push_back(&data, compressed.data[i]); - error = addChunk(out, "zTXt", data.data, data.size); - } - - ucvector_cleanup(&compressed); - ucvector_cleanup(&data); - return error; -} - -static unsigned addChunk_iTXt(ucvector* out, unsigned compressed, const char* keyword, const char* langtag, - const char* transkey, const char* textstring, LodePNGCompressSettings* zlibsettings) -{ - unsigned error = 0; - ucvector data; - size_t i, textsize = strlen(textstring); - - ucvector_init(&data); - - for(i = 0; keyword[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)keyword[i]); - if(i < 1 || i > 79) return 89; /*error: invalid keyword size*/ - ucvector_push_back(&data, 0); /*null termination char*/ - ucvector_push_back(&data, compressed ? 1 : 0); /*compression flag*/ - ucvector_push_back(&data, 0); /*compression method*/ - for(i = 0; langtag[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)langtag[i]); - ucvector_push_back(&data, 0); /*null termination char*/ - for(i = 0; transkey[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)transkey[i]); - ucvector_push_back(&data, 0); /*null termination char*/ - - if(compressed) - { - ucvector compressed_data; - ucvector_init(&compressed_data); - error = zlib_compress(&compressed_data.data, &compressed_data.size, - (unsigned char*)textstring, textsize, zlibsettings); - if(!error) - { - for(i = 0; i != compressed_data.size; ++i) ucvector_push_back(&data, compressed_data.data[i]); - } - ucvector_cleanup(&compressed_data); - } - else /*not compressed*/ - { - for(i = 0; textstring[i] != 0; ++i) ucvector_push_back(&data, (unsigned char)textstring[i]); - } - - if(!error) error = addChunk(out, "iTXt", data.data, data.size); - ucvector_cleanup(&data); - return error; -} - -static unsigned addChunk_bKGD(ucvector* out, const LodePNGInfo* info) -{ - unsigned error = 0; - ucvector bKGD; - ucvector_init(&bKGD); - if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) - { - ucvector_push_back(&bKGD, (unsigned char)(info->background_r >> 8)); - ucvector_push_back(&bKGD, (unsigned char)(info->background_r & 255)); - } - else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) - { - ucvector_push_back(&bKGD, (unsigned char)(info->background_r >> 8)); - ucvector_push_back(&bKGD, (unsigned char)(info->background_r & 255)); - ucvector_push_back(&bKGD, (unsigned char)(info->background_g >> 8)); - ucvector_push_back(&bKGD, (unsigned char)(info->background_g & 255)); - ucvector_push_back(&bKGD, (unsigned char)(info->background_b >> 8)); - ucvector_push_back(&bKGD, (unsigned char)(info->background_b & 255)); - } - else if(info->color.colortype == LCT_PALETTE) - { - ucvector_push_back(&bKGD, (unsigned char)(info->background_r & 255)); /*palette index*/ - } - - error = addChunk(out, "bKGD", bKGD.data, bKGD.size); - ucvector_cleanup(&bKGD); - - return error; -} - -static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time) -{ - unsigned error = 0; - unsigned char* data = (unsigned char*)lodepng_malloc(7); - if(!data) return 83; /*alloc fail*/ - data[0] = (unsigned char)(time->year >> 8); - data[1] = (unsigned char)(time->year & 255); - data[2] = (unsigned char)time->month; - data[3] = (unsigned char)time->day; - data[4] = (unsigned char)time->hour; - data[5] = (unsigned char)time->minute; - data[6] = (unsigned char)time->second; - error = addChunk(out, "tIME", data, 7); - lodepng_free(data); - return error; -} - -static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info) -{ - unsigned error = 0; - ucvector data; - ucvector_init(&data); - - lodepng_add32bitInt(&data, info->phys_x); - lodepng_add32bitInt(&data, info->phys_y); - ucvector_push_back(&data, info->phys_unit); - - error = addChunk(out, "pHYs", data.data, data.size); - ucvector_cleanup(&data); - - return error; -} - -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - -static void filterScanline(unsigned char* out, const unsigned char* scanline, const unsigned char* prevline, - size_t length, size_t bytewidth, unsigned char filterType) -{ - size_t i; - switch(filterType) - { - case 0: /*None*/ - for(i = 0; i != length; ++i) out[i] = scanline[i]; - break; - case 1: /*Sub*/ - for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; - for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - scanline[i - bytewidth]; - break; - case 2: /*Up*/ - if(prevline) - { - for(i = 0; i != length; ++i) out[i] = scanline[i] - prevline[i]; - } - else - { - for(i = 0; i != length; ++i) out[i] = scanline[i]; - } - break; - case 3: /*Average*/ - if(prevline) - { - for(i = 0; i != bytewidth; ++i) out[i] = scanline[i] - (prevline[i] >> 1); - for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - ((scanline[i - bytewidth] + prevline[i]) >> 1); - } - else - { - for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; - for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - (scanline[i - bytewidth] >> 1); - } - break; - case 4: /*Paeth*/ - if(prevline) - { - /*paethPredictor(0, prevline[i], 0) is always prevline[i]*/ - for(i = 0; i != bytewidth; ++i) out[i] = (scanline[i] - prevline[i]); - for(i = bytewidth; i < length; ++i) - { - out[i] = (scanline[i] - paethPredictor(scanline[i - bytewidth], prevline[i], prevline[i - bytewidth])); - } - } - else - { - for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; - /*paethPredictor(scanline[i - bytewidth], 0, 0) is always scanline[i - bytewidth]*/ - for(i = bytewidth; i < length; ++i) out[i] = (scanline[i] - scanline[i - bytewidth]); - } - break; - default: return; /*unexisting filter type given*/ - } -} - -/* log2 approximation. A slight bit faster than std::log. */ -static float flog2(float f) -{ - float result = 0; - while(f > 32) { result += 4; f /= 16; } - while(f > 2) { ++result; f /= 2; } - return result + 1.442695f * (f * f * f / 3 - 3 * f * f / 2 + 3 * f - 1.83333f); -} - -static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, - const LodePNGColorMode* info, const LodePNGEncoderSettings* settings) -{ - /* - For PNG filter method 0 - out must be a buffer with as size: h + (w * h * bpp + 7) / 8, because there are - the scanlines with 1 extra byte per scanline - */ - - unsigned bpp = lodepng_get_bpp(info); - /*the width of a scanline in bytes, not including the filter type*/ - size_t linebytes = (w * bpp + 7) / 8; - /*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/ - size_t bytewidth = (bpp + 7) / 8; - const unsigned char* prevline = 0; - unsigned x, y; - unsigned error = 0; - LodePNGFilterStrategy strategy = settings->filter_strategy; - - /* - There is a heuristic called the minimum sum of absolute differences heuristic, suggested by the PNG standard: - * If the image type is Palette, or the bit depth is smaller than 8, then do not filter the image (i.e. - use fixed filtering, with the filter None). - * (The other case) If the image type is Grayscale or RGB (with or without Alpha), and the bit depth is - not smaller than 8, then use adaptive filtering heuristic as follows: independently for each row, apply - all five filters and select the filter that produces the smallest sum of absolute values per row. - This heuristic is used if filter strategy is LFS_MINSUM and filter_palette_zero is true. - - If filter_palette_zero is true and filter_strategy is not LFS_MINSUM, the above heuristic is followed, - but for "the other case", whatever strategy filter_strategy is set to instead of the minimum sum - heuristic is used. - */ - if(settings->filter_palette_zero && - (info->colortype == LCT_PALETTE || info->bitdepth < 8)) strategy = LFS_ZERO; - - if(bpp == 0) return 31; /*error: invalid color type*/ - - if(strategy == LFS_ZERO) - { - for(y = 0; y != h; ++y) - { - size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ - size_t inindex = linebytes * y; - out[outindex] = 0; /*filter type byte*/ - filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, 0); - prevline = &in[inindex]; - } - } - else if(strategy == LFS_MINSUM) - { - /*adaptive filtering*/ - size_t sum[5]; - unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ - size_t smallest = 0; - unsigned char type, bestType = 0; - - for(type = 0; type != 5; ++type) - { - attempt[type] = (unsigned char*)lodepng_malloc(linebytes); - if(!attempt[type]) return 83; /*alloc fail*/ - } - - if(!error) - { - for(y = 0; y != h; ++y) - { - /*try the 5 filter types*/ - for(type = 0; type != 5; ++type) - { - filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); - - /*calculate the sum of the result*/ - sum[type] = 0; - if(type == 0) - { - for(x = 0; x != linebytes; ++x) sum[type] += (unsigned char)(attempt[type][x]); - } - else - { - for(x = 0; x != linebytes; ++x) - { - /*For differences, each byte should be treated as signed, values above 127 are negative - (converted to signed char). Filtertype 0 isn't a difference though, so use unsigned there. - This means filtertype 0 is almost never chosen, but that is justified.*/ - unsigned char s = attempt[type][x]; - sum[type] += s < 128 ? s : (255U - s); - } - } - - /*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/ - if(type == 0 || sum[type] < smallest) - { - bestType = type; - smallest = sum[type]; - } - } - - prevline = &in[y * linebytes]; - - /*now fill the out values*/ - out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ - for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; - } - } - - for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); - } - else if(strategy == LFS_ENTROPY) - { - float sum[5]; - unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ - float smallest = 0; - unsigned type, bestType = 0; - unsigned count[256]; - - for(type = 0; type != 5; ++type) - { - attempt[type] = (unsigned char*)lodepng_malloc(linebytes); - if(!attempt[type]) return 83; /*alloc fail*/ - } - - for(y = 0; y != h; ++y) - { - /*try the 5 filter types*/ - for(type = 0; type != 5; ++type) - { - filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); - for(x = 0; x != 256; ++x) count[x] = 0; - for(x = 0; x != linebytes; ++x) ++count[attempt[type][x]]; - ++count[type]; /*the filter type itself is part of the scanline*/ - sum[type] = 0; - for(x = 0; x != 256; ++x) - { - float p = count[x] / (float)(linebytes + 1); - sum[type] += count[x] == 0 ? 0 : flog2(1 / p) * p; - } - /*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/ - if(type == 0 || sum[type] < smallest) - { - bestType = type; - smallest = sum[type]; - } - } - - prevline = &in[y * linebytes]; - - /*now fill the out values*/ - out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ - for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; - } - - for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); - } - else if(strategy == LFS_PREDEFINED) - { - for(y = 0; y != h; ++y) - { - size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ - size_t inindex = linebytes * y; - unsigned char type = settings->predefined_filters[y]; - out[outindex] = type; /*filter type byte*/ - filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type); - prevline = &in[inindex]; - } - } - else if(strategy == LFS_BRUTE_FORCE) - { - /*brute force filter chooser. - deflate the scanline after every filter attempt to see which one deflates best. - This is very slow and gives only slightly smaller, sometimes even larger, result*/ - size_t size[5]; - unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ - size_t smallest = 0; - unsigned type = 0, bestType = 0; - unsigned char* dummy; - LodePNGCompressSettings zlibsettings = settings->zlibsettings; - /*use fixed tree on the attempts so that the tree is not adapted to the filtertype on purpose, - to simulate the true case where the tree is the same for the whole image. Sometimes it gives - better result with dynamic tree anyway. Using the fixed tree sometimes gives worse, but in rare - cases better compression. It does make this a bit less slow, so it's worth doing this.*/ - zlibsettings.btype = 1; - /*a custom encoder likely doesn't read the btype setting and is optimized for complete PNG - images only, so disable it*/ - zlibsettings.custom_zlib = 0; - zlibsettings.custom_deflate = 0; - for(type = 0; type != 5; ++type) - { - attempt[type] = (unsigned char*)lodepng_malloc(linebytes); - if(!attempt[type]) return 83; /*alloc fail*/ - } - for(y = 0; y != h; ++y) /*try the 5 filter types*/ - { - for(type = 0; type != 5; ++type) - { - unsigned testsize = linebytes; - /*if(testsize > 8) testsize /= 8;*/ /*it already works good enough by testing a part of the row*/ - - filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); - size[type] = 0; - dummy = 0; - zlib_compress(&dummy, &size[type], attempt[type], testsize, &zlibsettings); - lodepng_free(dummy); - /*check if this is smallest size (or if type == 0 it's the first case so always store the values)*/ - if(type == 0 || size[type] < smallest) - { - bestType = type; - smallest = size[type]; - } - } - prevline = &in[y * linebytes]; - out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ - for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; - } - for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); - } - else return 88; /* unknown filter strategy */ - - return error; -} - -static void addPaddingBits(unsigned char* out, const unsigned char* in, - size_t olinebits, size_t ilinebits, unsigned h) -{ - /*The opposite of the removePaddingBits function - olinebits must be >= ilinebits*/ - unsigned y; - size_t diff = olinebits - ilinebits; - size_t obp = 0, ibp = 0; /*bit pointers*/ - for(y = 0; y != h; ++y) - { - size_t x; - for(x = 0; x < ilinebits; ++x) - { - unsigned char bit = readBitFromReversedStream(&ibp, in); - setBitOfReversedStream(&obp, out, bit); - } - /*obp += diff; --> no, fill in some value in the padding bits too, to avoid - "Use of uninitialised value of size ###" warning from valgrind*/ - for(x = 0; x != diff; ++x) setBitOfReversedStream(&obp, out, 0); - } -} - -/* -in: non-interlaced image with size w*h -out: the same pixels, but re-ordered according to PNG's Adam7 interlacing, with - no padding bits between scanlines, but between reduced images so that each - reduced image starts at a byte. -bpp: bits per pixel -there are no padding bits, not between scanlines, not between reduced images -in has the following size in bits: w * h * bpp. -out is possibly bigger due to padding bits between reduced images -NOTE: comments about padding bits are only relevant if bpp < 8 -*/ -static void Adam7_interlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) -{ - unsigned passw[7], passh[7]; - size_t filter_passstart[8], padded_passstart[8], passstart[8]; - unsigned i; - - Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); - - if(bpp >= 8) - { - for(i = 0; i != 7; ++i) - { - unsigned x, y, b; - size_t bytewidth = bpp / 8; - for(y = 0; y < passh[i]; ++y) - for(x = 0; x < passw[i]; ++x) - { - size_t pixelinstart = ((ADAM7_IY[i] + y * ADAM7_DY[i]) * w + ADAM7_IX[i] + x * ADAM7_DX[i]) * bytewidth; - size_t pixeloutstart = passstart[i] + (y * passw[i] + x) * bytewidth; - for(b = 0; b < bytewidth; ++b) - { - out[pixeloutstart + b] = in[pixelinstart + b]; - } - } - } - } - else /*bpp < 8: Adam7 with pixels < 8 bit is a bit trickier: with bit pointers*/ - { - for(i = 0; i != 7; ++i) - { - unsigned x, y, b; - unsigned ilinebits = bpp * passw[i]; - unsigned olinebits = bpp * w; - size_t obp, ibp; /*bit pointers (for out and in buffer)*/ - for(y = 0; y < passh[i]; ++y) - for(x = 0; x < passw[i]; ++x) - { - ibp = (ADAM7_IY[i] + y * ADAM7_DY[i]) * olinebits + (ADAM7_IX[i] + x * ADAM7_DX[i]) * bpp; - obp = (8 * passstart[i]) + (y * ilinebits + x * bpp); - for(b = 0; b < bpp; ++b) - { - unsigned char bit = readBitFromReversedStream(&ibp, in); - setBitOfReversedStream(&obp, out, bit); - } - } - } - } -} - -/*out must be buffer big enough to contain uncompressed IDAT chunk data, and in must contain the full image. -return value is error**/ -static unsigned preProcessScanlines(unsigned char** out, size_t* outsize, const unsigned char* in, - unsigned w, unsigned h, - const LodePNGInfo* info_png, const LodePNGEncoderSettings* settings) -{ - /* - This function converts the pure 2D image with the PNG's colortype, into filtered-padded-interlaced data. Steps: - *) if no Adam7: 1) add padding bits (= posible extra bits per scanline if bpp < 8) 2) filter - *) if adam7: 1) Adam7_interlace 2) 7x add padding bits 3) 7x filter - */ - unsigned bpp = lodepng_get_bpp(&info_png->color); - unsigned error = 0; - - if(info_png->interlace_method == 0) - { - *outsize = h + (h * ((w * bpp + 7) / 8)); /*image size plus an extra byte per scanline + possible padding bits*/ - *out = (unsigned char*)lodepng_malloc(*outsize); - if(!(*out) && (*outsize)) error = 83; /*alloc fail*/ - - if(!error) - { - /*non multiple of 8 bits per scanline, padding bits needed per scanline*/ - if(bpp < 8 && w * bpp != ((w * bpp + 7) / 8) * 8) - { - unsigned char* padded = (unsigned char*)lodepng_malloc(h * ((w * bpp + 7) / 8)); - if(!padded) error = 83; /*alloc fail*/ - if(!error) - { - addPaddingBits(padded, in, ((w * bpp + 7) / 8) * 8, w * bpp, h); - error = filter(*out, padded, w, h, &info_png->color, settings); - } - lodepng_free(padded); - } - else - { - /*we can immediately filter into the out buffer, no other steps needed*/ - error = filter(*out, in, w, h, &info_png->color, settings); - } - } - } - else /*interlace_method is 1 (Adam7)*/ - { - unsigned passw[7], passh[7]; - size_t filter_passstart[8], padded_passstart[8], passstart[8]; - unsigned char* adam7; - - Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); - - *outsize = filter_passstart[7]; /*image size plus an extra byte per scanline + possible padding bits*/ - *out = (unsigned char*)lodepng_malloc(*outsize); - if(!(*out)) error = 83; /*alloc fail*/ - - adam7 = (unsigned char*)lodepng_malloc(passstart[7]); - if(!adam7 && passstart[7]) error = 83; /*alloc fail*/ - - if(!error) - { - unsigned i; - - Adam7_interlace(adam7, in, w, h, bpp); - for(i = 0; i != 7; ++i) - { - if(bpp < 8) - { - unsigned char* padded = (unsigned char*)lodepng_malloc(padded_passstart[i + 1] - padded_passstart[i]); - if(!padded) ERROR_BREAK(83); /*alloc fail*/ - addPaddingBits(padded, &adam7[passstart[i]], - ((passw[i] * bpp + 7) / 8) * 8, passw[i] * bpp, passh[i]); - error = filter(&(*out)[filter_passstart[i]], padded, - passw[i], passh[i], &info_png->color, settings); - lodepng_free(padded); - } - else - { - error = filter(&(*out)[filter_passstart[i]], &adam7[padded_passstart[i]], - passw[i], passh[i], &info_png->color, settings); - } - - if(error) break; - } - } - - lodepng_free(adam7); - } - - return error; -} - -/* -palette must have 4 * palettesize bytes allocated, and given in format RGBARGBARGBARGBA... -returns 0 if the palette is opaque, -returns 1 if the palette has a single color with alpha 0 ==> color key -returns 2 if the palette is semi-translucent. -*/ -static unsigned getPaletteTranslucency(const unsigned char* palette, size_t palettesize) -{ - size_t i; - unsigned key = 0; - unsigned r = 0, g = 0, b = 0; /*the value of the color with alpha 0, so long as color keying is possible*/ - for(i = 0; i != palettesize; ++i) - { - if(!key && palette[4 * i + 3] == 0) - { - r = palette[4 * i + 0]; g = palette[4 * i + 1]; b = palette[4 * i + 2]; - key = 1; - i = (size_t)(-1); /*restart from beginning, to detect earlier opaque colors with key's value*/ - } - else if(palette[4 * i + 3] != 255) return 2; - /*when key, no opaque RGB may have key's RGB*/ - else if(key && r == palette[i * 4 + 0] && g == palette[i * 4 + 1] && b == palette[i * 4 + 2]) return 2; - } - return key; -} - -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS -static unsigned addUnknownChunks(ucvector* out, unsigned char* data, size_t datasize) -{ - unsigned char* inchunk = data; - while((size_t)(inchunk - data) < datasize) - { - CERROR_TRY_RETURN(lodepng_chunk_append(&out->data, &out->size, inchunk)); - out->allocsize = out->size; /*fix the allocsize again*/ - inchunk = lodepng_chunk_next(inchunk); - } - return 0; -} -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - -unsigned lodepng_encode(unsigned char** out, size_t* outsize, - const unsigned char* image, unsigned w, unsigned h, - LodePNGState* state) -{ - LodePNGInfo info; - ucvector outv; - unsigned char* data = 0; /*uncompressed version of the IDAT chunk data*/ - size_t datasize = 0; - - /*provide some proper output values if error will happen*/ - *out = 0; - *outsize = 0; - state->error = 0; - - lodepng_info_init(&info); - lodepng_info_copy(&info, &state->info_png); - - if((info.color.colortype == LCT_PALETTE || state->encoder.force_palette) - && (info.color.palettesize == 0 || info.color.palettesize > 256)) - { - state->error = 68; /*invalid palette size, it is only allowed to be 1-256*/ - return state->error; - } - - if(state->encoder.auto_convert) - { - state->error = lodepng_auto_choose_color(&info.color, image, w, h, &state->info_raw); - } - if(state->error) return state->error; - - if(state->encoder.zlibsettings.btype > 2) - { - CERROR_RETURN_ERROR(state->error, 61); /*error: unexisting btype*/ - } - if(state->info_png.interlace_method > 1) - { - CERROR_RETURN_ERROR(state->error, 71); /*error: unexisting interlace mode*/ - } - - state->error = checkColorValidity(info.color.colortype, info.color.bitdepth); - if(state->error) return state->error; /*error: unexisting color type given*/ - state->error = checkColorValidity(state->info_raw.colortype, state->info_raw.bitdepth); - if(state->error) return state->error; /*error: unexisting color type given*/ - - if(!lodepng_color_mode_equal(&state->info_raw, &info.color)) - { - unsigned char* converted; - size_t size = (w * h * (size_t)lodepng_get_bpp(&info.color) + 7) / 8; - - converted = (unsigned char*)lodepng_malloc(size); - if(!converted && size) state->error = 83; /*alloc fail*/ - if(!state->error) - { - state->error = lodepng_convert(converted, image, &info.color, &state->info_raw, w, h); - } - if(!state->error) preProcessScanlines(&data, &datasize, converted, w, h, &info, &state->encoder); - lodepng_free(converted); - } - else preProcessScanlines(&data, &datasize, image, w, h, &info, &state->encoder); - - ucvector_init(&outv); - while(!state->error) /*while only executed once, to break on error*/ - { -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - size_t i; -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - /*write signature and chunks*/ - writeSignature(&outv); - /*IHDR*/ - addChunk_IHDR(&outv, w, h, info.color.colortype, info.color.bitdepth, info.interlace_method); -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - /*unknown chunks between IHDR and PLTE*/ - if(info.unknown_chunks_data[0]) - { - state->error = addUnknownChunks(&outv, info.unknown_chunks_data[0], info.unknown_chunks_size[0]); - if(state->error) break; - } -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - /*PLTE*/ - if(info.color.colortype == LCT_PALETTE) - { - addChunk_PLTE(&outv, &info.color); - } - if(state->encoder.force_palette && (info.color.colortype == LCT_RGB || info.color.colortype == LCT_RGBA)) - { - addChunk_PLTE(&outv, &info.color); - } - /*tRNS*/ - if(info.color.colortype == LCT_PALETTE && getPaletteTranslucency(info.color.palette, info.color.palettesize) != 0) - { - addChunk_tRNS(&outv, &info.color); - } - if((info.color.colortype == LCT_GREY || info.color.colortype == LCT_RGB) && info.color.key_defined) - { - addChunk_tRNS(&outv, &info.color); - } -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - /*bKGD (must come between PLTE and the IDAt chunks*/ - if(info.background_defined) addChunk_bKGD(&outv, &info); - /*pHYs (must come before the IDAT chunks)*/ - if(info.phys_defined) addChunk_pHYs(&outv, &info); - - /*unknown chunks between PLTE and IDAT*/ - if(info.unknown_chunks_data[1]) - { - state->error = addUnknownChunks(&outv, info.unknown_chunks_data[1], info.unknown_chunks_size[1]); - if(state->error) break; - } -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - /*IDAT (multiple IDAT chunks must be consecutive)*/ - state->error = addChunk_IDAT(&outv, data, datasize, &state->encoder.zlibsettings); - if(state->error) break; -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - /*tIME*/ - if(info.time_defined) addChunk_tIME(&outv, &info.time); - /*tEXt and/or zTXt*/ - for(i = 0; i != info.text_num; ++i) - { - if(strlen(info.text_keys[i]) > 79) - { - state->error = 66; /*text chunk too large*/ - break; - } - if(strlen(info.text_keys[i]) < 1) - { - state->error = 67; /*text chunk too small*/ - break; - } - if(state->encoder.text_compression) - { - addChunk_zTXt(&outv, info.text_keys[i], info.text_strings[i], &state->encoder.zlibsettings); - } - else - { - addChunk_tEXt(&outv, info.text_keys[i], info.text_strings[i]); - } - } - /*LodePNG version id in text chunk*/ - if(state->encoder.add_id) - { - unsigned alread_added_id_text = 0; - for(i = 0; i != info.text_num; ++i) - { - if(!strcmp(info.text_keys[i], "LodePNG")) - { - alread_added_id_text = 1; - break; - } - } - if(alread_added_id_text == 0) - { - addChunk_tEXt(&outv, "LodePNG", LODEPNG_VERSION_STRING); /*it's shorter as tEXt than as zTXt chunk*/ - } - } - /*iTXt*/ - for(i = 0; i != info.itext_num; ++i) - { - if(strlen(info.itext_keys[i]) > 79) - { - state->error = 66; /*text chunk too large*/ - break; - } - if(strlen(info.itext_keys[i]) < 1) - { - state->error = 67; /*text chunk too small*/ - break; - } - addChunk_iTXt(&outv, state->encoder.text_compression, - info.itext_keys[i], info.itext_langtags[i], info.itext_transkeys[i], info.itext_strings[i], - &state->encoder.zlibsettings); - } - - /*unknown chunks between IDAT and IEND*/ - if(info.unknown_chunks_data[2]) - { - state->error = addUnknownChunks(&outv, info.unknown_chunks_data[2], info.unknown_chunks_size[2]); - if(state->error) break; - } -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - addChunk_IEND(&outv); - - break; /*this isn't really a while loop; no error happened so break out now!*/ - } - - lodepng_info_cleanup(&info); - lodepng_free(data); - /*instead of cleaning the vector up, give it to the output*/ - *out = outv.data; - *outsize = outv.size; - - return state->error; -} - -unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, const unsigned char* image, - unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) -{ - unsigned error; - LodePNGState state; - lodepng_state_init(&state); - state.info_raw.colortype = colortype; - state.info_raw.bitdepth = bitdepth; - state.info_png.color.colortype = colortype; - state.info_png.color.bitdepth = bitdepth; - lodepng_encode(out, outsize, image, w, h, &state); - error = state.error; - lodepng_state_cleanup(&state); - return error; -} - -unsigned lodepng_encode32(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h) -{ - return lodepng_encode_memory(out, outsize, image, w, h, LCT_RGBA, 8); -} - -unsigned lodepng_encode24(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h) -{ - return lodepng_encode_memory(out, outsize, image, w, h, LCT_RGB, 8); -} - -#ifdef LODEPNG_COMPILE_DISK -unsigned lodepng_encode_file(const char* filename, const unsigned char* image, unsigned w, unsigned h, - LodePNGColorType colortype, unsigned bitdepth) -{ - unsigned char* buffer; - size_t buffersize; - unsigned error = lodepng_encode_memory(&buffer, &buffersize, image, w, h, colortype, bitdepth); - if(!error) error = lodepng_save_file(buffer, buffersize, filename); - lodepng_free(buffer); - return error; -} - -unsigned lodepng_encode32_file(const char* filename, const unsigned char* image, unsigned w, unsigned h) -{ - return lodepng_encode_file(filename, image, w, h, LCT_RGBA, 8); -} - -unsigned lodepng_encode24_file(const char* filename, const unsigned char* image, unsigned w, unsigned h) -{ - return lodepng_encode_file(filename, image, w, h, LCT_RGB, 8); -} -#endif /*LODEPNG_COMPILE_DISK*/ - -void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings) -{ - lodepng_compress_settings_init(&settings->zlibsettings); - settings->filter_palette_zero = 1; - settings->filter_strategy = LFS_MINSUM; - settings->auto_convert = 1; - settings->force_palette = 0; - settings->predefined_filters = 0; -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - settings->add_id = 0; - settings->text_compression = 1; -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ -} - -#endif /*LODEPNG_COMPILE_ENCODER*/ -#endif /*LODEPNG_COMPILE_PNG*/ - -#ifdef LODEPNG_COMPILE_ERROR_TEXT -/* -This returns the description of a numerical error code in English. This is also -the documentation of all the error codes. -*/ -const char* lodepng_error_text(unsigned code) -{ - switch(code) - { - case 0: return "no error, everything went ok"; - case 1: return "nothing done yet"; /*the Encoder/Decoder has done nothing yet, error checking makes no sense yet*/ - case 10: return "end of input memory reached without huffman end code"; /*while huffman decoding*/ - case 11: return "error in code tree made it jump outside of huffman tree"; /*while huffman decoding*/ - case 13: return "problem while processing dynamic deflate block"; - case 14: return "problem while processing dynamic deflate block"; - case 15: return "problem while processing dynamic deflate block"; - case 16: return "unexisting code while processing dynamic deflate block"; - case 17: return "end of out buffer memory reached while inflating"; - case 18: return "invalid distance code while inflating"; - case 19: return "end of out buffer memory reached while inflating"; - case 20: return "invalid deflate block BTYPE encountered while decoding"; - case 21: return "NLEN is not ones complement of LEN in a deflate block"; - /*end of out buffer memory reached while inflating: - This can happen if the inflated deflate data is longer than the amount of bytes required to fill up - all the pixels of the image, given the color depth and image dimensions. Something that doesn't - happen in a normal, well encoded, PNG image.*/ - case 22: return "end of out buffer memory reached while inflating"; - case 23: return "end of in buffer memory reached while inflating"; - case 24: return "invalid FCHECK in zlib header"; - case 25: return "invalid compression method in zlib header"; - case 26: return "FDICT encountered in zlib header while it's not used for PNG"; - case 27: return "PNG file is smaller than a PNG header"; - /*Checks the magic file header, the first 8 bytes of the PNG file*/ - case 28: return "incorrect PNG signature, it's no PNG or corrupted"; - case 29: return "first chunk is not the header chunk"; - case 30: return "chunk length too large, chunk broken off at end of file"; - case 31: return "illegal PNG color type or bpp"; - case 32: return "illegal PNG compression method"; - case 33: return "illegal PNG filter method"; - case 34: return "illegal PNG interlace method"; - case 35: return "chunk length of a chunk is too large or the chunk too small"; - case 36: return "illegal PNG filter type encountered"; - case 37: return "illegal bit depth for this color type given"; - case 38: return "the palette is too big"; /*more than 256 colors*/ - case 39: return "more palette alpha values given in tRNS chunk than there are colors in the palette"; - case 40: return "tRNS chunk has wrong size for greyscale image"; - case 41: return "tRNS chunk has wrong size for RGB image"; - case 42: return "tRNS chunk appeared while it was not allowed for this color type"; - case 43: return "bKGD chunk has wrong size for palette image"; - case 44: return "bKGD chunk has wrong size for greyscale image"; - case 45: return "bKGD chunk has wrong size for RGB image"; - case 48: return "empty input buffer given to decoder. Maybe caused by non-existing file?"; - case 49: return "jumped past memory while generating dynamic huffman tree"; - case 50: return "jumped past memory while generating dynamic huffman tree"; - case 51: return "jumped past memory while inflating huffman block"; - case 52: return "jumped past memory while inflating"; - case 53: return "size of zlib data too small"; - case 54: return "repeat symbol in tree while there was no value symbol yet"; - /*jumped past tree while generating huffman tree, this could be when the - tree will have more leaves than symbols after generating it out of the - given lenghts. They call this an oversubscribed dynamic bit lengths tree in zlib.*/ - case 55: return "jumped past tree while generating huffman tree"; - case 56: return "given output image colortype or bitdepth not supported for color conversion"; - case 57: return "invalid CRC encountered (checking CRC can be disabled)"; - case 58: return "invalid ADLER32 encountered (checking ADLER32 can be disabled)"; - case 59: return "requested color conversion not supported"; - case 60: return "invalid window size given in the settings of the encoder (must be 0-32768)"; - case 61: return "invalid BTYPE given in the settings of the encoder (only 0, 1 and 2 are allowed)"; - /*LodePNG leaves the choice of RGB to greyscale conversion formula to the user.*/ - case 62: return "conversion from color to greyscale not supported"; - case 63: return "length of a chunk too long, max allowed for PNG is 2147483647 bytes per chunk"; /*(2^31-1)*/ - /*this would result in the inability of a deflated block to ever contain an end code. It must be at least 1.*/ - case 64: return "the length of the END symbol 256 in the Huffman tree is 0"; - case 66: return "the length of a text chunk keyword given to the encoder is longer than the maximum of 79 bytes"; - case 67: return "the length of a text chunk keyword given to the encoder is smaller than the minimum of 1 byte"; - case 68: return "tried to encode a PLTE chunk with a palette that has less than 1 or more than 256 colors"; - case 69: return "unknown chunk type with 'critical' flag encountered by the decoder"; - case 71: return "unexisting interlace mode given to encoder (must be 0 or 1)"; - case 72: return "while decoding, unexisting compression method encountering in zTXt or iTXt chunk (it must be 0)"; - case 73: return "invalid tIME chunk size"; - case 74: return "invalid pHYs chunk size"; - /*length could be wrong, or data chopped off*/ - case 75: return "no null termination char found while decoding text chunk"; - case 76: return "iTXt chunk too short to contain required bytes"; - case 77: return "integer overflow in buffer size"; - case 78: return "failed to open file for reading"; /*file doesn't exist or couldn't be opened for reading*/ - case 79: return "failed to open file for writing"; - case 80: return "tried creating a tree of 0 symbols"; - case 81: return "lazy matching at pos 0 is impossible"; - case 82: return "color conversion to palette requested while a color isn't in palette"; - case 83: return "memory allocation failed"; - case 84: return "given image too small to contain all pixels to be encoded"; - case 86: return "impossible offset in lz77 encoding (internal bug)"; - case 87: return "must provide custom zlib function pointer if LODEPNG_COMPILE_ZLIB is not defined"; - case 88: return "invalid filter strategy given for LodePNGEncoderSettings.filter_strategy"; - case 89: return "text chunk keyword too short or long: must have size 1-79"; - /*the windowsize in the LodePNGCompressSettings. Requiring POT(==> & instead of %) makes encoding 12% faster.*/ - case 90: return "windowsize must be a power of two"; - case 91: return "invalid decompressed idat size"; - case 92: return "too many pixels, not supported"; - case 93: return "zero width or height is invalid"; - case 94: return "header chunk must have a size of 13 bytes"; - } - return "unknown error code"; -} -#endif /*LODEPNG_COMPILE_ERROR_TEXT*/ - -/* ////////////////////////////////////////////////////////////////////////// */ -/* ////////////////////////////////////////////////////////////////////////// */ -/* // C++ Wrapper // */ -/* ////////////////////////////////////////////////////////////////////////// */ -/* ////////////////////////////////////////////////////////////////////////// */ - -#ifdef LODEPNG_COMPILE_CPP -namespace lodepng -{ - -#ifdef LODEPNG_COMPILE_DISK -unsigned load_file(std::vector& buffer, const std::string& filename) -{ - long size = lodepng_filesize(filename.c_str()); - if(size < 0) return 78; - buffer.resize((size_t)size); - return size == 0 ? 0 : lodepng_buffer_file(&buffer[0], (size_t)size, filename.c_str()); -} - -/*write given buffer to the file, overwriting the file, it doesn't append to it.*/ -unsigned save_file(const std::vector& buffer, const std::string& filename) -{ - return lodepng_save_file(buffer.empty() ? 0 : &buffer[0], buffer.size(), filename.c_str()); -} -#endif /* LODEPNG_COMPILE_DISK */ - -#ifdef LODEPNG_COMPILE_ZLIB -#ifdef LODEPNG_COMPILE_DECODER -unsigned decompress(std::vector& out, const unsigned char* in, size_t insize, - const LodePNGDecompressSettings& settings) -{ - unsigned char* buffer = 0; - size_t buffersize = 0; - unsigned error = zlib_decompress(&buffer, &buffersize, in, insize, &settings); - if(buffer) - { - out.insert(out.end(), &buffer[0], &buffer[buffersize]); - lodepng_free(buffer); - } - return error; -} - -unsigned decompress(std::vector& out, const std::vector& in, - const LodePNGDecompressSettings& settings) -{ - return decompress(out, in.empty() ? 0 : &in[0], in.size(), settings); -} -#endif /* LODEPNG_COMPILE_DECODER */ - -#ifdef LODEPNG_COMPILE_ENCODER -unsigned compress(std::vector& out, const unsigned char* in, size_t insize, - const LodePNGCompressSettings& settings) -{ - unsigned char* buffer = 0; - size_t buffersize = 0; - unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings); - if(buffer) - { - out.insert(out.end(), &buffer[0], &buffer[buffersize]); - lodepng_free(buffer); - } - return error; -} - -unsigned compress(std::vector& out, const std::vector& in, - const LodePNGCompressSettings& settings) -{ - return compress(out, in.empty() ? 0 : &in[0], in.size(), settings); -} -#endif /* LODEPNG_COMPILE_ENCODER */ -#endif /* LODEPNG_COMPILE_ZLIB */ - - -#ifdef LODEPNG_COMPILE_PNG - -State::State() -{ - lodepng_state_init(this); -} - -State::State(const State& other) -{ - lodepng_state_init(this); - lodepng_state_copy(this, &other); -} - -State::~State() -{ - lodepng_state_cleanup(this); -} - -State& State::operator=(const State& other) -{ - lodepng_state_copy(this, &other); - return *this; -} - -#ifdef LODEPNG_COMPILE_DECODER - -unsigned decode(std::vector& out, unsigned& w, unsigned& h, const unsigned char* in, - size_t insize, LodePNGColorType colortype, unsigned bitdepth) -{ - unsigned char* buffer; - unsigned error = lodepng_decode_memory(&buffer, &w, &h, in, insize, colortype, bitdepth); - if(buffer && !error) - { - State state; - state.info_raw.colortype = colortype; - state.info_raw.bitdepth = bitdepth; - size_t buffersize = lodepng_get_raw_size(w, h, &state.info_raw); - out.insert(out.end(), &buffer[0], &buffer[buffersize]); - lodepng_free(buffer); - } - return error; -} - -unsigned decode(std::vector& out, unsigned& w, unsigned& h, - const std::vector& in, LodePNGColorType colortype, unsigned bitdepth) -{ - return decode(out, w, h, in.empty() ? 0 : &in[0], (unsigned)in.size(), colortype, bitdepth); -} - -unsigned decode(std::vector& out, unsigned& w, unsigned& h, - State& state, - const unsigned char* in, size_t insize) -{ - unsigned char* buffer = NULL; - unsigned error = lodepng_decode(&buffer, &w, &h, &state, in, insize); - if(buffer && !error) - { - size_t buffersize = lodepng_get_raw_size(w, h, &state.info_raw); - out.insert(out.end(), &buffer[0], &buffer[buffersize]); - } - lodepng_free(buffer); - return error; -} - -unsigned decode(std::vector& out, unsigned& w, unsigned& h, - State& state, - const std::vector& in) -{ - return decode(out, w, h, state, in.empty() ? 0 : &in[0], in.size()); -} - -#ifdef LODEPNG_COMPILE_DISK -unsigned decode(std::vector& out, unsigned& w, unsigned& h, const std::string& filename, - LodePNGColorType colortype, unsigned bitdepth) -{ - std::vector buffer; - unsigned error = load_file(buffer, filename); - if(error) return error; - return decode(out, w, h, buffer, colortype, bitdepth); -} -#endif /* LODEPNG_COMPILE_DECODER */ -#endif /* LODEPNG_COMPILE_DISK */ - -#ifdef LODEPNG_COMPILE_ENCODER -unsigned encode(std::vector& out, const unsigned char* in, unsigned w, unsigned h, - LodePNGColorType colortype, unsigned bitdepth) -{ - unsigned char* buffer; - size_t buffersize; - unsigned error = lodepng_encode_memory(&buffer, &buffersize, in, w, h, colortype, bitdepth); - if(buffer) - { - out.insert(out.end(), &buffer[0], &buffer[buffersize]); - lodepng_free(buffer); - } - return error; -} - -unsigned encode(std::vector& out, - const std::vector& in, unsigned w, unsigned h, - LodePNGColorType colortype, unsigned bitdepth) -{ - if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; - return encode(out, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); -} - -unsigned encode(std::vector& out, - const unsigned char* in, unsigned w, unsigned h, - State& state) -{ - unsigned char* buffer; - size_t buffersize; - unsigned error = lodepng_encode(&buffer, &buffersize, in, w, h, &state); - if(buffer) - { - out.insert(out.end(), &buffer[0], &buffer[buffersize]); - lodepng_free(buffer); - } - return error; -} - -unsigned encode(std::vector& out, - const std::vector& in, unsigned w, unsigned h, - State& state) -{ - if(lodepng_get_raw_size(w, h, &state.info_raw) > in.size()) return 84; - return encode(out, in.empty() ? 0 : &in[0], w, h, state); -} - -#ifdef LODEPNG_COMPILE_DISK -unsigned encode(const std::string& filename, - const unsigned char* in, unsigned w, unsigned h, - LodePNGColorType colortype, unsigned bitdepth) -{ - std::vector buffer; - unsigned error = encode(buffer, in, w, h, colortype, bitdepth); - if(!error) error = save_file(buffer, filename); - return error; -} - -unsigned encode(const std::string& filename, - const std::vector& in, unsigned w, unsigned h, - LodePNGColorType colortype, unsigned bitdepth) -{ - if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; - return encode(filename, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); -} -#endif /* LODEPNG_COMPILE_DISK */ -#endif /* LODEPNG_COMPILE_ENCODER */ -#endif /* LODEPNG_COMPILE_PNG */ -} /* namespace lodepng */ -#endif /*LODEPNG_COMPILE_CPP*/ diff --git a/3rdparty/bgfx/3rdparty/lodepng/lodepng.h b/3rdparty/bgfx/3rdparty/lodepng/lodepng.h deleted file mode 100644 index 94e8195..0000000 --- a/3rdparty/bgfx/3rdparty/lodepng/lodepng.h +++ /dev/null @@ -1,1759 +0,0 @@ -/* -LodePNG version 20160501 - -Copyright (c) 2005-2016 Lode Vandevenne - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -*/ - -#ifndef LODEPNG_H -#define LODEPNG_H - -#include /*for size_t*/ - -extern const char* LODEPNG_VERSION_STRING; - -/* -The following #defines are used to create code sections. They can be disabled -to disable code sections, which can give faster compile time and smaller binary. -The "NO_COMPILE" defines are designed to be used to pass as defines to the -compiler command to disable them without modifying this header, e.g. --DLODEPNG_NO_COMPILE_ZLIB for gcc. -In addition to those below, you can also define LODEPNG_NO_COMPILE_CRC to -allow implementing a custom lodepng_crc32. -*/ -/*deflate & zlib. If disabled, you must specify alternative zlib functions in -the custom_zlib field of the compress and decompress settings*/ -#ifndef LODEPNG_NO_COMPILE_ZLIB -#define LODEPNG_COMPILE_ZLIB -#endif -/*png encoder and png decoder*/ -#ifndef LODEPNG_NO_COMPILE_PNG -#define LODEPNG_COMPILE_PNG -#endif -/*deflate&zlib decoder and png decoder*/ -#ifndef LODEPNG_NO_COMPILE_DECODER -#define LODEPNG_COMPILE_DECODER -#endif -/*deflate&zlib encoder and png encoder*/ -#ifndef LODEPNG_NO_COMPILE_ENCODER -#define LODEPNG_COMPILE_ENCODER -#endif -/*the optional built in harddisk file loading and saving functions*/ -#ifndef LODEPNG_NO_COMPILE_DISK -#define LODEPNG_COMPILE_DISK -#endif -/*support for chunks other than IHDR, IDAT, PLTE, tRNS, IEND: ancillary and unknown chunks*/ -#ifndef LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS -#define LODEPNG_COMPILE_ANCILLARY_CHUNKS -#endif -/*ability to convert error numerical codes to English text string*/ -#ifndef LODEPNG_NO_COMPILE_ERROR_TEXT -#define LODEPNG_COMPILE_ERROR_TEXT -#endif -/*Compile the default allocators (C's free, malloc and realloc). If you disable this, -you can define the functions lodepng_free, lodepng_malloc and lodepng_realloc in your -source files with custom allocators.*/ -#ifndef LODEPNG_NO_COMPILE_ALLOCATORS -#define LODEPNG_COMPILE_ALLOCATORS -#endif -/*compile the C++ version (you can disable the C++ wrapper here even when compiling for C++)*/ -#ifdef __cplusplus -#ifndef LODEPNG_NO_COMPILE_CPP -#define LODEPNG_COMPILE_CPP -#endif -#endif - -#ifdef LODEPNG_COMPILE_CPP -#include -#include -#endif /*LODEPNG_COMPILE_CPP*/ - -#ifdef LODEPNG_COMPILE_PNG -/*The PNG color types (also used for raw).*/ -typedef enum LodePNGColorType -{ - LCT_GREY = 0, /*greyscale: 1,2,4,8,16 bit*/ - LCT_RGB = 2, /*RGB: 8,16 bit*/ - LCT_PALETTE = 3, /*palette: 1,2,4,8 bit*/ - LCT_GREY_ALPHA = 4, /*greyscale with alpha: 8,16 bit*/ - LCT_RGBA = 6 /*RGB with alpha: 8,16 bit*/ -} LodePNGColorType; - -#ifdef LODEPNG_COMPILE_DECODER -/* -Converts PNG data in memory to raw pixel data. -out: Output parameter. Pointer to buffer that will contain the raw pixel data. - After decoding, its size is w * h * (bytes per pixel) bytes larger than - initially. Bytes per pixel depends on colortype and bitdepth. - Must be freed after usage with free(*out). - Note: for 16-bit per channel colors, uses big endian format like PNG does. -w: Output parameter. Pointer to width of pixel data. -h: Output parameter. Pointer to height of pixel data. -in: Memory buffer with the PNG file. -insize: size of the in buffer. -colortype: the desired color type for the raw output image. See explanation on PNG color types. -bitdepth: the desired bit depth for the raw output image. See explanation on PNG color types. -Return value: LodePNG error code (0 means no error). -*/ -unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, - const unsigned char* in, size_t insize, - LodePNGColorType colortype, unsigned bitdepth); - -/*Same as lodepng_decode_memory, but always decodes to 32-bit RGBA raw image*/ -unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h, - const unsigned char* in, size_t insize); - -/*Same as lodepng_decode_memory, but always decodes to 24-bit RGB raw image*/ -unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h, - const unsigned char* in, size_t insize); - -#ifdef LODEPNG_COMPILE_DISK -/* -Load PNG from disk, from file with given name. -Same as the other decode functions, but instead takes a filename as input. -*/ -unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned* h, - const char* filename, - LodePNGColorType colortype, unsigned bitdepth); - -/*Same as lodepng_decode_file, but always decodes to 32-bit RGBA raw image.*/ -unsigned lodepng_decode32_file(unsigned char** out, unsigned* w, unsigned* h, - const char* filename); - -/*Same as lodepng_decode_file, but always decodes to 24-bit RGB raw image.*/ -unsigned lodepng_decode24_file(unsigned char** out, unsigned* w, unsigned* h, - const char* filename); -#endif /*LODEPNG_COMPILE_DISK*/ -#endif /*LODEPNG_COMPILE_DECODER*/ - - -#ifdef LODEPNG_COMPILE_ENCODER -/* -Converts raw pixel data into a PNG image in memory. The colortype and bitdepth - of the output PNG image cannot be chosen, they are automatically determined - by the colortype, bitdepth and content of the input pixel data. - Note: for 16-bit per channel colors, needs big endian format like PNG does. -out: Output parameter. Pointer to buffer that will contain the PNG image data. - Must be freed after usage with free(*out). -outsize: Output parameter. Pointer to the size in bytes of the out buffer. -image: The raw pixel data to encode. The size of this buffer should be - w * h * (bytes per pixel), bytes per pixel depends on colortype and bitdepth. -w: width of the raw pixel data in pixels. -h: height of the raw pixel data in pixels. -colortype: the color type of the raw input image. See explanation on PNG color types. -bitdepth: the bit depth of the raw input image. See explanation on PNG color types. -Return value: LodePNG error code (0 means no error). -*/ -unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, - const unsigned char* image, unsigned w, unsigned h, - LodePNGColorType colortype, unsigned bitdepth); - -/*Same as lodepng_encode_memory, but always encodes from 32-bit RGBA raw image.*/ -unsigned lodepng_encode32(unsigned char** out, size_t* outsize, - const unsigned char* image, unsigned w, unsigned h); - -/*Same as lodepng_encode_memory, but always encodes from 24-bit RGB raw image.*/ -unsigned lodepng_encode24(unsigned char** out, size_t* outsize, - const unsigned char* image, unsigned w, unsigned h); - -#ifdef LODEPNG_COMPILE_DISK -/* -Converts raw pixel data into a PNG file on disk. -Same as the other encode functions, but instead takes a filename as output. -NOTE: This overwrites existing files without warning! -*/ -unsigned lodepng_encode_file(const char* filename, - const unsigned char* image, unsigned w, unsigned h, - LodePNGColorType colortype, unsigned bitdepth); - -/*Same as lodepng_encode_file, but always encodes from 32-bit RGBA raw image.*/ -unsigned lodepng_encode32_file(const char* filename, - const unsigned char* image, unsigned w, unsigned h); - -/*Same as lodepng_encode_file, but always encodes from 24-bit RGB raw image.*/ -unsigned lodepng_encode24_file(const char* filename, - const unsigned char* image, unsigned w, unsigned h); -#endif /*LODEPNG_COMPILE_DISK*/ -#endif /*LODEPNG_COMPILE_ENCODER*/ - - -#ifdef LODEPNG_COMPILE_CPP -namespace lodepng -{ -#ifdef LODEPNG_COMPILE_DECODER -/*Same as lodepng_decode_memory, but decodes to an std::vector. The colortype -is the format to output the pixels to. Default is RGBA 8-bit per channel.*/ -unsigned decode(std::vector& out, unsigned& w, unsigned& h, - const unsigned char* in, size_t insize, - LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); -unsigned decode(std::vector& out, unsigned& w, unsigned& h, - const std::vector& in, - LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); -#ifdef LODEPNG_COMPILE_DISK -/* -Converts PNG file from disk to raw pixel data in memory. -Same as the other decode functions, but instead takes a filename as input. -*/ -unsigned decode(std::vector& out, unsigned& w, unsigned& h, - const std::string& filename, - LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); -#endif /* LODEPNG_COMPILE_DISK */ -#endif /* LODEPNG_COMPILE_DECODER */ - -#ifdef LODEPNG_COMPILE_ENCODER -/*Same as lodepng_encode_memory, but encodes to an std::vector. colortype -is that of the raw input data. The output PNG color type will be auto chosen.*/ -unsigned encode(std::vector& out, - const unsigned char* in, unsigned w, unsigned h, - LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); -unsigned encode(std::vector& out, - const std::vector& in, unsigned w, unsigned h, - LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); -#ifdef LODEPNG_COMPILE_DISK -/* -Converts 32-bit RGBA raw pixel data into a PNG file on disk. -Same as the other encode functions, but instead takes a filename as output. -NOTE: This overwrites existing files without warning! -*/ -unsigned encode(const std::string& filename, - const unsigned char* in, unsigned w, unsigned h, - LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); -unsigned encode(const std::string& filename, - const std::vector& in, unsigned w, unsigned h, - LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); -#endif /* LODEPNG_COMPILE_DISK */ -#endif /* LODEPNG_COMPILE_ENCODER */ -} /* namespace lodepng */ -#endif /*LODEPNG_COMPILE_CPP*/ -#endif /*LODEPNG_COMPILE_PNG*/ - -#ifdef LODEPNG_COMPILE_ERROR_TEXT -/*Returns an English description of the numerical error code.*/ -const char* lodepng_error_text(unsigned code); -#endif /*LODEPNG_COMPILE_ERROR_TEXT*/ - -#ifdef LODEPNG_COMPILE_DECODER -/*Settings for zlib decompression*/ -typedef struct LodePNGDecompressSettings LodePNGDecompressSettings; -struct LodePNGDecompressSettings -{ - unsigned ignore_adler32; /*if 1, continue and don't give an error message if the Adler32 checksum is corrupted*/ - - /*use custom zlib decoder instead of built in one (default: null)*/ - unsigned (*custom_zlib)(unsigned char**, size_t*, - const unsigned char*, size_t, - const LodePNGDecompressSettings*); - /*use custom deflate decoder instead of built in one (default: null) - if custom_zlib is used, custom_deflate is ignored since only the built in - zlib function will call custom_deflate*/ - unsigned (*custom_inflate)(unsigned char**, size_t*, - const unsigned char*, size_t, - const LodePNGDecompressSettings*); - - const void* custom_context; /*optional custom settings for custom functions*/ -}; - -extern const LodePNGDecompressSettings lodepng_default_decompress_settings; -void lodepng_decompress_settings_init(LodePNGDecompressSettings* settings); -#endif /*LODEPNG_COMPILE_DECODER*/ - -#ifdef LODEPNG_COMPILE_ENCODER -/* -Settings for zlib compression. Tweaking these settings tweaks the balance -between speed and compression ratio. -*/ -typedef struct LodePNGCompressSettings LodePNGCompressSettings; -struct LodePNGCompressSettings /*deflate = compress*/ -{ - /*LZ77 related settings*/ - unsigned btype; /*the block type for LZ (0, 1, 2 or 3, see zlib standard). Should be 2 for proper compression.*/ - unsigned use_lz77; /*whether or not to use LZ77. Should be 1 for proper compression.*/ - unsigned windowsize; /*must be a power of two <= 32768. higher compresses more but is slower. Default value: 2048.*/ - unsigned minmatch; /*mininum lz77 length. 3 is normally best, 6 can be better for some PNGs. Default: 0*/ - unsigned nicematch; /*stop searching if >= this length found. Set to 258 for best compression. Default: 128*/ - unsigned lazymatching; /*use lazy matching: better compression but a bit slower. Default: true*/ - - /*use custom zlib encoder instead of built in one (default: null)*/ - unsigned (*custom_zlib)(unsigned char**, size_t*, - const unsigned char*, size_t, - const LodePNGCompressSettings*); - /*use custom deflate encoder instead of built in one (default: null) - if custom_zlib is used, custom_deflate is ignored since only the built in - zlib function will call custom_deflate*/ - unsigned (*custom_deflate)(unsigned char**, size_t*, - const unsigned char*, size_t, - const LodePNGCompressSettings*); - - const void* custom_context; /*optional custom settings for custom functions*/ -}; - -extern const LodePNGCompressSettings lodepng_default_compress_settings; -void lodepng_compress_settings_init(LodePNGCompressSettings* settings); -#endif /*LODEPNG_COMPILE_ENCODER*/ - -#ifdef LODEPNG_COMPILE_PNG -/* -Color mode of an image. Contains all information required to decode the pixel -bits to RGBA colors. This information is the same as used in the PNG file -format, and is used both for PNG and raw image data in LodePNG. -*/ -typedef struct LodePNGColorMode -{ - /*header (IHDR)*/ - LodePNGColorType colortype; /*color type, see PNG standard or documentation further in this header file*/ - unsigned bitdepth; /*bits per sample, see PNG standard or documentation further in this header file*/ - - /* - palette (PLTE and tRNS) - - Dynamically allocated with the colors of the palette, including alpha. - When encoding a PNG, to store your colors in the palette of the LodePNGColorMode, first use - lodepng_palette_clear, then for each color use lodepng_palette_add. - If you encode an image without alpha with palette, don't forget to put value 255 in each A byte of the palette. - - When decoding, by default you can ignore this palette, since LodePNG already - fills the palette colors in the pixels of the raw RGBA output. - - The palette is only supported for color type 3. - */ - unsigned char* palette; /*palette in RGBARGBA... order. When allocated, must be either 0, or have size 1024*/ - size_t palettesize; /*palette size in number of colors (amount of bytes is 4 * palettesize)*/ - - /* - transparent color key (tRNS) - - This color uses the same bit depth as the bitdepth value in this struct, which can be 1-bit to 16-bit. - For greyscale PNGs, r, g and b will all 3 be set to the same. - - When decoding, by default you can ignore this information, since LodePNG sets - pixels with this key to transparent already in the raw RGBA output. - - The color key is only supported for color types 0 and 2. - */ - unsigned key_defined; /*is a transparent color key given? 0 = false, 1 = true*/ - unsigned key_r; /*red/greyscale component of color key*/ - unsigned key_g; /*green component of color key*/ - unsigned key_b; /*blue component of color key*/ -} LodePNGColorMode; - -/*init, cleanup and copy functions to use with this struct*/ -void lodepng_color_mode_init(LodePNGColorMode* info); -void lodepng_color_mode_cleanup(LodePNGColorMode* info); -/*return value is error code (0 means no error)*/ -unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source); - -void lodepng_palette_clear(LodePNGColorMode* info); -/*add 1 color to the palette*/ -unsigned lodepng_palette_add(LodePNGColorMode* info, - unsigned char r, unsigned char g, unsigned char b, unsigned char a); - -/*get the total amount of bits per pixel, based on colortype and bitdepth in the struct*/ -unsigned lodepng_get_bpp(const LodePNGColorMode* info); -/*get the amount of color channels used, based on colortype in the struct. -If a palette is used, it counts as 1 channel.*/ -unsigned lodepng_get_channels(const LodePNGColorMode* info); -/*is it a greyscale type? (only colortype 0 or 4)*/ -unsigned lodepng_is_greyscale_type(const LodePNGColorMode* info); -/*has it got an alpha channel? (only colortype 2 or 6)*/ -unsigned lodepng_is_alpha_type(const LodePNGColorMode* info); -/*has it got a palette? (only colortype 3)*/ -unsigned lodepng_is_palette_type(const LodePNGColorMode* info); -/*only returns true if there is a palette and there is a value in the palette with alpha < 255. -Loops through the palette to check this.*/ -unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info); -/* -Check if the given color info indicates the possibility of having non-opaque pixels in the PNG image. -Returns true if the image can have translucent or invisible pixels (it still be opaque if it doesn't use such pixels). -Returns false if the image can only have opaque pixels. -In detail, it returns true only if it's a color type with alpha, or has a palette with non-opaque values, -or if "key_defined" is true. -*/ -unsigned lodepng_can_have_alpha(const LodePNGColorMode* info); -/*Returns the byte size of a raw image buffer with given width, height and color mode*/ -size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color); - -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS -/*The information of a Time chunk in PNG.*/ -typedef struct LodePNGTime -{ - unsigned year; /*2 bytes used (0-65535)*/ - unsigned month; /*1-12*/ - unsigned day; /*1-31*/ - unsigned hour; /*0-23*/ - unsigned minute; /*0-59*/ - unsigned second; /*0-60 (to allow for leap seconds)*/ -} LodePNGTime; -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - -/*Information about the PNG image, except pixels, width and height.*/ -typedef struct LodePNGInfo -{ - /*header (IHDR), palette (PLTE) and transparency (tRNS) chunks*/ - unsigned compression_method;/*compression method of the original file. Always 0.*/ - unsigned filter_method; /*filter method of the original file*/ - unsigned interlace_method; /*interlace method of the original file*/ - LodePNGColorMode color; /*color type and bits, palette and transparency of the PNG file*/ - -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - /* - suggested background color chunk (bKGD) - This color uses the same color mode as the PNG (except alpha channel), which can be 1-bit to 16-bit. - - For greyscale PNGs, r, g and b will all 3 be set to the same. When encoding - the encoder writes the red one. For palette PNGs: When decoding, the RGB value - will be stored, not a palette index. But when encoding, specify the index of - the palette in background_r, the other two are then ignored. - - The decoder does not use this background color to edit the color of pixels. - */ - unsigned background_defined; /*is a suggested background color given?*/ - unsigned background_r; /*red component of suggested background color*/ - unsigned background_g; /*green component of suggested background color*/ - unsigned background_b; /*blue component of suggested background color*/ - - /* - non-international text chunks (tEXt and zTXt) - - The char** arrays each contain num strings. The actual messages are in - text_strings, while text_keys are keywords that give a short description what - the actual text represents, e.g. Title, Author, Description, or anything else. - - A keyword is minimum 1 character and maximum 79 characters long. It's - discouraged to use a single line length longer than 79 characters for texts. - - Don't allocate these text buffers yourself. Use the init/cleanup functions - correctly and use lodepng_add_text and lodepng_clear_text. - */ - size_t text_num; /*the amount of texts in these char** buffers (there may be more texts in itext)*/ - char** text_keys; /*the keyword of a text chunk (e.g. "Comment")*/ - char** text_strings; /*the actual text*/ - - /* - international text chunks (iTXt) - Similar to the non-international text chunks, but with additional strings - "langtags" and "transkeys". - */ - size_t itext_num; /*the amount of international texts in this PNG*/ - char** itext_keys; /*the English keyword of the text chunk (e.g. "Comment")*/ - char** itext_langtags; /*language tag for this text's language, ISO/IEC 646 string, e.g. ISO 639 language tag*/ - char** itext_transkeys; /*keyword translated to the international language - UTF-8 string*/ - char** itext_strings; /*the actual international text - UTF-8 string*/ - - /*time chunk (tIME)*/ - unsigned time_defined; /*set to 1 to make the encoder generate a tIME chunk*/ - LodePNGTime time; - - /*phys chunk (pHYs)*/ - unsigned phys_defined; /*if 0, there is no pHYs chunk and the values below are undefined, if 1 else there is one*/ - unsigned phys_x; /*pixels per unit in x direction*/ - unsigned phys_y; /*pixels per unit in y direction*/ - unsigned phys_unit; /*may be 0 (unknown unit) or 1 (metre)*/ - - /* - unknown chunks - There are 3 buffers, one for each position in the PNG where unknown chunks can appear - each buffer contains all unknown chunks for that position consecutively - The 3 buffers are the unknown chunks between certain critical chunks: - 0: IHDR-PLTE, 1: PLTE-IDAT, 2: IDAT-IEND - Do not allocate or traverse this data yourself. Use the chunk traversing functions declared - later, such as lodepng_chunk_next and lodepng_chunk_append, to read/write this struct. - */ - unsigned char* unknown_chunks_data[3]; - size_t unknown_chunks_size[3]; /*size in bytes of the unknown chunks, given for protection*/ -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ -} LodePNGInfo; - -/*init, cleanup and copy functions to use with this struct*/ -void lodepng_info_init(LodePNGInfo* info); -void lodepng_info_cleanup(LodePNGInfo* info); -/*return value is error code (0 means no error)*/ -unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source); - -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS -void lodepng_clear_text(LodePNGInfo* info); /*use this to clear the texts again after you filled them in*/ -unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str); /*push back both texts at once*/ - -void lodepng_clear_itext(LodePNGInfo* info); /*use this to clear the itexts again after you filled them in*/ -unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, - const char* transkey, const char* str); /*push back the 4 texts of 1 chunk at once*/ -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ - -/* -Converts raw buffer from one color type to another color type, based on -LodePNGColorMode structs to describe the input and output color type. -See the reference manual at the end of this header file to see which color conversions are supported. -return value = LodePNG error code (0 if all went ok, an error if the conversion isn't supported) -The out buffer must have size (w * h * bpp + 7) / 8, where bpp is the bits per pixel -of the output color type (lodepng_get_bpp). -For < 8 bpp images, there should not be padding bits at the end of scanlines. -For 16-bit per channel colors, uses big endian format like PNG does. -Return value is LodePNG error code -*/ -unsigned lodepng_convert(unsigned char* out, const unsigned char* in, - const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in, - unsigned w, unsigned h); - -#ifdef LODEPNG_COMPILE_DECODER -/* -Settings for the decoder. This contains settings for the PNG and the Zlib -decoder, but not the Info settings from the Info structs. -*/ -typedef struct LodePNGDecoderSettings -{ - LodePNGDecompressSettings zlibsettings; /*in here is the setting to ignore Adler32 checksums*/ - - unsigned ignore_crc; /*ignore CRC checksums*/ - - unsigned color_convert; /*whether to convert the PNG to the color type you want. Default: yes*/ - -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - unsigned read_text_chunks; /*if false but remember_unknown_chunks is true, they're stored in the unknown chunks*/ - /*store all bytes from unknown chunks in the LodePNGInfo (off by default, useful for a png editor)*/ - unsigned remember_unknown_chunks; -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ -} LodePNGDecoderSettings; - -void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings); -#endif /*LODEPNG_COMPILE_DECODER*/ - -#ifdef LODEPNG_COMPILE_ENCODER -/*automatically use color type with less bits per pixel if losslessly possible. Default: AUTO*/ -typedef enum LodePNGFilterStrategy -{ - /*every filter at zero*/ - LFS_ZERO, - /*Use filter that gives minimum sum, as described in the official PNG filter heuristic.*/ - LFS_MINSUM, - /*Use the filter type that gives smallest Shannon entropy for this scanline. Depending - on the image, this is better or worse than minsum.*/ - LFS_ENTROPY, - /* - Brute-force-search PNG filters by compressing each filter for each scanline. - Experimental, very slow, and only rarely gives better compression than MINSUM. - */ - LFS_BRUTE_FORCE, - /*use predefined_filters buffer: you specify the filter type for each scanline*/ - LFS_PREDEFINED -} LodePNGFilterStrategy; - -/*Gives characteristics about the colors of the image, which helps decide which color model to use for encoding. -Used internally by default if "auto_convert" is enabled. Public because it's useful for custom algorithms.*/ -typedef struct LodePNGColorProfile -{ - unsigned colored; /*not greyscale*/ - unsigned key; /*if true, image is not opaque. Only if true and alpha is false, color key is possible.*/ - unsigned short key_r; /*these values are always in 16-bit bitdepth in the profile*/ - unsigned short key_g; - unsigned short key_b; - unsigned alpha; /*alpha channel or alpha palette required*/ - unsigned numcolors; /*amount of colors, up to 257. Not valid if bits == 16.*/ - unsigned char palette[1024]; /*Remembers up to the first 256 RGBA colors, in no particular order*/ - unsigned bits; /*bits per channel (not for palette). 1,2 or 4 for greyscale only. 16 if 16-bit per channel required.*/ -} LodePNGColorProfile; - -void lodepng_color_profile_init(LodePNGColorProfile* profile); - -/*Get a LodePNGColorProfile of the image.*/ -unsigned lodepng_get_color_profile(LodePNGColorProfile* profile, - const unsigned char* image, unsigned w, unsigned h, - const LodePNGColorMode* mode_in); -/*The function LodePNG uses internally to decide the PNG color with auto_convert. -Chooses an optimal color model, e.g. grey if only grey pixels, palette if < 256 colors, ...*/ -unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out, - const unsigned char* image, unsigned w, unsigned h, - const LodePNGColorMode* mode_in); - -/*Settings for the encoder.*/ -typedef struct LodePNGEncoderSettings -{ - LodePNGCompressSettings zlibsettings; /*settings for the zlib encoder, such as window size, ...*/ - - unsigned auto_convert; /*automatically choose output PNG color type. Default: true*/ - - /*If true, follows the official PNG heuristic: if the PNG uses a palette or lower than - 8 bit depth, set all filters to zero. Otherwise use the filter_strategy. Note that to - completely follow the official PNG heuristic, filter_palette_zero must be true and - filter_strategy must be LFS_MINSUM*/ - unsigned filter_palette_zero; - /*Which filter strategy to use when not using zeroes due to filter_palette_zero. - Set filter_palette_zero to 0 to ensure always using your chosen strategy. Default: LFS_MINSUM*/ - LodePNGFilterStrategy filter_strategy; - /*used if filter_strategy is LFS_PREDEFINED. In that case, this must point to a buffer with - the same length as the amount of scanlines in the image, and each value must <= 5. You - have to cleanup this buffer, LodePNG will never free it. Don't forget that filter_palette_zero - must be set to 0 to ensure this is also used on palette or low bitdepth images.*/ - const unsigned char* predefined_filters; - - /*force creating a PLTE chunk if colortype is 2 or 6 (= a suggested palette). - If colortype is 3, PLTE is _always_ created.*/ - unsigned force_palette; -#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS - /*add LodePNG identifier and version as a text chunk, for debugging*/ - unsigned add_id; - /*encode text chunks as zTXt chunks instead of tEXt chunks, and use compression in iTXt chunks*/ - unsigned text_compression; -#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ -} LodePNGEncoderSettings; - -void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings); -#endif /*LODEPNG_COMPILE_ENCODER*/ - - -#if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) -/*The settings, state and information for extended encoding and decoding.*/ -typedef struct LodePNGState -{ -#ifdef LODEPNG_COMPILE_DECODER - LodePNGDecoderSettings decoder; /*the decoding settings*/ -#endif /*LODEPNG_COMPILE_DECODER*/ -#ifdef LODEPNG_COMPILE_ENCODER - LodePNGEncoderSettings encoder; /*the encoding settings*/ -#endif /*LODEPNG_COMPILE_ENCODER*/ - LodePNGColorMode info_raw; /*specifies the format in which you would like to get the raw pixel buffer*/ - LodePNGInfo info_png; /*info of the PNG image obtained after decoding*/ - unsigned error; -#ifdef LODEPNG_COMPILE_CPP - /* For the lodepng::State subclass. */ - virtual ~LodePNGState(){} -#endif -} LodePNGState; - -/*init, cleanup and copy functions to use with this struct*/ -void lodepng_state_init(LodePNGState* state); -void lodepng_state_cleanup(LodePNGState* state); -void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source); -#endif /* defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) */ - -#ifdef LODEPNG_COMPILE_DECODER -/* -Same as lodepng_decode_memory, but uses a LodePNGState to allow custom settings and -getting much more information about the PNG image and color mode. -*/ -unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h, - LodePNGState* state, - const unsigned char* in, size_t insize); - -/* -Read the PNG header, but not the actual data. This returns only the information -that is in the header chunk of the PNG, such as width, height and color type. The -information is placed in the info_png field of the LodePNGState. -*/ -unsigned lodepng_inspect(unsigned* w, unsigned* h, - LodePNGState* state, - const unsigned char* in, size_t insize); -#endif /*LODEPNG_COMPILE_DECODER*/ - - -#ifdef LODEPNG_COMPILE_ENCODER -/*This function allocates the out buffer with standard malloc and stores the size in *outsize.*/ -unsigned lodepng_encode(unsigned char** out, size_t* outsize, - const unsigned char* image, unsigned w, unsigned h, - LodePNGState* state); -#endif /*LODEPNG_COMPILE_ENCODER*/ - -/* -The lodepng_chunk functions are normally not needed, except to traverse the -unknown chunks stored in the LodePNGInfo struct, or add new ones to it. -It also allows traversing the chunks of an encoded PNG file yourself. - -PNG standard chunk naming conventions: -First byte: uppercase = critical, lowercase = ancillary -Second byte: uppercase = public, lowercase = private -Third byte: must be uppercase -Fourth byte: uppercase = unsafe to copy, lowercase = safe to copy -*/ - -/* -Gets the length of the data of the chunk. Total chunk length has 12 bytes more. -There must be at least 4 bytes to read from. If the result value is too large, -it may be corrupt data. -*/ -unsigned lodepng_chunk_length(const unsigned char* chunk); - -/*puts the 4-byte type in null terminated string*/ -void lodepng_chunk_type(char type[5], const unsigned char* chunk); - -/*check if the type is the given type*/ -unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type); - -/*0: it's one of the critical chunk types, 1: it's an ancillary chunk (see PNG standard)*/ -unsigned char lodepng_chunk_ancillary(const unsigned char* chunk); - -/*0: public, 1: private (see PNG standard)*/ -unsigned char lodepng_chunk_private(const unsigned char* chunk); - -/*0: the chunk is unsafe to copy, 1: the chunk is safe to copy (see PNG standard)*/ -unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk); - -/*get pointer to the data of the chunk, where the input points to the header of the chunk*/ -unsigned char* lodepng_chunk_data(unsigned char* chunk); -const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk); - -/*returns 0 if the crc is correct, 1 if it's incorrect (0 for OK as usual!)*/ -unsigned lodepng_chunk_check_crc(const unsigned char* chunk); - -/*generates the correct CRC from the data and puts it in the last 4 bytes of the chunk*/ -void lodepng_chunk_generate_crc(unsigned char* chunk); - -/*iterate to next chunks. don't use on IEND chunk, as there is no next chunk then*/ -unsigned char* lodepng_chunk_next(unsigned char* chunk); -const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk); - -/* -Appends chunk to the data in out. The given chunk should already have its chunk header. -The out variable and outlength are updated to reflect the new reallocated buffer. -Returns error code (0 if it went ok) -*/ -unsigned lodepng_chunk_append(unsigned char** out, size_t* outlength, const unsigned char* chunk); - -/* -Appends new chunk to out. The chunk to append is given by giving its length, type -and data separately. The type is a 4-letter string. -The out variable and outlength are updated to reflect the new reallocated buffer. -Returne error code (0 if it went ok) -*/ -unsigned lodepng_chunk_create(unsigned char** out, size_t* outlength, unsigned length, - const char* type, const unsigned char* data); - - -/*Calculate CRC32 of buffer*/ -unsigned lodepng_crc32(const unsigned char* buf, size_t len); -#endif /*LODEPNG_COMPILE_PNG*/ - - -#ifdef LODEPNG_COMPILE_ZLIB -/* -This zlib part can be used independently to zlib compress and decompress a -buffer. It cannot be used to create gzip files however, and it only supports the -part of zlib that is required for PNG, it does not support dictionaries. -*/ - -#ifdef LODEPNG_COMPILE_DECODER -/*Inflate a buffer. Inflate is the decompression step of deflate. Out buffer must be freed after use.*/ -unsigned lodepng_inflate(unsigned char** out, size_t* outsize, - const unsigned char* in, size_t insize, - const LodePNGDecompressSettings* settings); - -/* -Decompresses Zlib data. Reallocates the out buffer and appends the data. The -data must be according to the zlib specification. -Either, *out must be NULL and *outsize must be 0, or, *out must be a valid -buffer and *outsize its size in bytes. out must be freed by user after usage. -*/ -unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, - const unsigned char* in, size_t insize, - const LodePNGDecompressSettings* settings); -#endif /*LODEPNG_COMPILE_DECODER*/ - -#ifdef LODEPNG_COMPILE_ENCODER -/* -Compresses data with Zlib. Reallocates the out buffer and appends the data. -Zlib adds a small header and trailer around the deflate data. -The data is output in the format of the zlib specification. -Either, *out must be NULL and *outsize must be 0, or, *out must be a valid -buffer and *outsize its size in bytes. out must be freed by user after usage. -*/ -unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, - const unsigned char* in, size_t insize, - const LodePNGCompressSettings* settings); - -/* -Find length-limited Huffman code for given frequencies. This function is in the -public interface only for tests, it's used internally by lodepng_deflate. -*/ -unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequencies, - size_t numcodes, unsigned maxbitlen); - -/*Compress a buffer with deflate. See RFC 1951. Out buffer must be freed after use.*/ -unsigned lodepng_deflate(unsigned char** out, size_t* outsize, - const unsigned char* in, size_t insize, - const LodePNGCompressSettings* settings); - -#endif /*LODEPNG_COMPILE_ENCODER*/ -#endif /*LODEPNG_COMPILE_ZLIB*/ - -#ifdef LODEPNG_COMPILE_DISK -/* -Load a file from disk into buffer. The function allocates the out buffer, and -after usage you should free it. -out: output parameter, contains pointer to loaded buffer. -outsize: output parameter, size of the allocated out buffer -filename: the path to the file to load -return value: error code (0 means ok) -*/ -unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename); - -/* -Save a file from buffer to disk. Warning, if it exists, this function overwrites -the file without warning! -buffer: the buffer to write -buffersize: size of the buffer to write -filename: the path to the file to save to -return value: error code (0 means ok) -*/ -unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename); -#endif /*LODEPNG_COMPILE_DISK*/ - -#ifdef LODEPNG_COMPILE_CPP -/* The LodePNG C++ wrapper uses std::vectors instead of manually allocated memory buffers. */ -namespace lodepng -{ -#ifdef LODEPNG_COMPILE_PNG -class State : public LodePNGState -{ - public: - State(); - State(const State& other); - virtual ~State(); - State& operator=(const State& other); -}; - -#ifdef LODEPNG_COMPILE_DECODER -/* Same as other lodepng::decode, but using a State for more settings and information. */ -unsigned decode(std::vector& out, unsigned& w, unsigned& h, - State& state, - const unsigned char* in, size_t insize); -unsigned decode(std::vector& out, unsigned& w, unsigned& h, - State& state, - const std::vector& in); -#endif /*LODEPNG_COMPILE_DECODER*/ - -#ifdef LODEPNG_COMPILE_ENCODER -/* Same as other lodepng::encode, but using a State for more settings and information. */ -unsigned encode(std::vector& out, - const unsigned char* in, unsigned w, unsigned h, - State& state); -unsigned encode(std::vector& out, - const std::vector& in, unsigned w, unsigned h, - State& state); -#endif /*LODEPNG_COMPILE_ENCODER*/ - -#ifdef LODEPNG_COMPILE_DISK -/* -Load a file from disk into an std::vector. -return value: error code (0 means ok) -*/ -unsigned load_file(std::vector& buffer, const std::string& filename); - -/* -Save the binary data in an std::vector to a file on disk. The file is overwritten -without warning. -*/ -unsigned save_file(const std::vector& buffer, const std::string& filename); -#endif /* LODEPNG_COMPILE_DISK */ -#endif /* LODEPNG_COMPILE_PNG */ - -#ifdef LODEPNG_COMPILE_ZLIB -#ifdef LODEPNG_COMPILE_DECODER -/* Zlib-decompress an unsigned char buffer */ -unsigned decompress(std::vector& out, const unsigned char* in, size_t insize, - const LodePNGDecompressSettings& settings = lodepng_default_decompress_settings); - -/* Zlib-decompress an std::vector */ -unsigned decompress(std::vector& out, const std::vector& in, - const LodePNGDecompressSettings& settings = lodepng_default_decompress_settings); -#endif /* LODEPNG_COMPILE_DECODER */ - -#ifdef LODEPNG_COMPILE_ENCODER -/* Zlib-compress an unsigned char buffer */ -unsigned compress(std::vector& out, const unsigned char* in, size_t insize, - const LodePNGCompressSettings& settings = lodepng_default_compress_settings); - -/* Zlib-compress an std::vector */ -unsigned compress(std::vector& out, const std::vector& in, - const LodePNGCompressSettings& settings = lodepng_default_compress_settings); -#endif /* LODEPNG_COMPILE_ENCODER */ -#endif /* LODEPNG_COMPILE_ZLIB */ -} /* namespace lodepng */ -#endif /*LODEPNG_COMPILE_CPP*/ - -/* -TODO: -[.] test if there are no memory leaks or security exploits - done a lot but needs to be checked often -[.] check compatibility with various compilers - done but needs to be redone for every newer version -[X] converting color to 16-bit per channel types -[ ] read all public PNG chunk types (but never let the color profile and gamma ones touch RGB values) -[ ] make sure encoder generates no chunks with size > (2^31)-1 -[ ] partial decoding (stream processing) -[X] let the "isFullyOpaque" function check color keys and transparent palettes too -[X] better name for the variables "codes", "codesD", "codelengthcodes", "clcl" and "lldl" -[ ] don't stop decoding on errors like 69, 57, 58 (make warnings) -[ ] let the C++ wrapper catch exceptions coming from the standard library and return LodePNG error codes -[ ] allow user to provide custom color conversion functions, e.g. for premultiplied alpha, padding bits or not, ... -[ ] allow user to give data (void*) to custom allocator -*/ - -#endif /*LODEPNG_H inclusion guard*/ - -/* -LodePNG Documentation ---------------------- - -0. table of contents --------------------- - - 1. about - 1.1. supported features - 1.2. features not supported - 2. C and C++ version - 3. security - 4. decoding - 5. encoding - 6. color conversions - 6.1. PNG color types - 6.2. color conversions - 6.3. padding bits - 6.4. A note about 16-bits per channel and endianness - 7. error values - 8. chunks and PNG editing - 9. compiler support - 10. examples - 10.1. decoder C++ example - 10.2. decoder C example - 11. state settings reference - 12. changes - 13. contact information - - -1. about --------- - -PNG is a file format to store raster images losslessly with good compression, -supporting different color types and alpha channel. - -LodePNG is a PNG codec according to the Portable Network Graphics (PNG) -Specification (Second Edition) - W3C Recommendation 10 November 2003. - -The specifications used are: - -*) Portable Network Graphics (PNG) Specification (Second Edition): - http://www.w3.org/TR/2003/REC-PNG-20031110 -*) RFC 1950 ZLIB Compressed Data Format version 3.3: - http://www.gzip.org/zlib/rfc-zlib.html -*) RFC 1951 DEFLATE Compressed Data Format Specification ver 1.3: - http://www.gzip.org/zlib/rfc-deflate.html - -The most recent version of LodePNG can currently be found at -http://lodev.org/lodepng/ - -LodePNG works both in C (ISO C90) and C++, with a C++ wrapper that adds -extra functionality. - -LodePNG exists out of two files: --lodepng.h: the header file for both C and C++ --lodepng.c(pp): give it the name lodepng.c or lodepng.cpp (or .cc) depending on your usage - -If you want to start using LodePNG right away without reading this doc, get the -examples from the LodePNG website to see how to use it in code, or check the -smaller examples in chapter 13 here. - -LodePNG is simple but only supports the basic requirements. To achieve -simplicity, the following design choices were made: There are no dependencies -on any external library. There are functions to decode and encode a PNG with -a single function call, and extended versions of these functions taking a -LodePNGState struct allowing to specify or get more information. By default -the colors of the raw image are always RGB or RGBA, no matter what color type -the PNG file uses. To read and write files, there are simple functions to -convert the files to/from buffers in memory. - -This all makes LodePNG suitable for loading textures in games, demos and small -programs, ... It's less suitable for full fledged image editors, loading PNGs -over network (it requires all the image data to be available before decoding can -begin), life-critical systems, ... - -1.1. supported features ------------------------ - -The following features are supported by the decoder: - -*) decoding of PNGs with any color type, bit depth and interlace mode, to a 24- or 32-bit color raw image, - or the same color type as the PNG -*) encoding of PNGs, from any raw image to 24- or 32-bit color, or the same color type as the raw image -*) Adam7 interlace and deinterlace for any color type -*) loading the image from harddisk or decoding it from a buffer from other sources than harddisk -*) support for alpha channels, including RGBA color model, translucent palettes and color keying -*) zlib decompression (inflate) -*) zlib compression (deflate) -*) CRC32 and ADLER32 checksums -*) handling of unknown chunks, allowing making a PNG editor that stores custom and unknown chunks. -*) the following chunks are supported (generated/interpreted) by both encoder and decoder: - IHDR: header information - PLTE: color palette - IDAT: pixel data - IEND: the final chunk - tRNS: transparency for palettized images - tEXt: textual information - zTXt: compressed textual information - iTXt: international textual information - bKGD: suggested background color - pHYs: physical dimensions - tIME: modification time - -1.2. features not supported ---------------------------- - -The following features are _not_ supported: - -*) some features needed to make a conformant PNG-Editor might be still missing. -*) partial loading/stream processing. All data must be available and is processed in one call. -*) The following public chunks are not supported but treated as unknown chunks by LodePNG - cHRM, gAMA, iCCP, sRGB, sBIT, hIST, sPLT - Some of these are not supported on purpose: LodePNG wants to provide the RGB values - stored in the pixels, not values modified by system dependent gamma or color models. - - -2. C and C++ version --------------------- - -The C version uses buffers allocated with alloc that you need to free() -yourself. You need to use init and cleanup functions for each struct whenever -using a struct from the C version to avoid exploits and memory leaks. - -The C++ version has extra functions with std::vectors in the interface and the -lodepng::State class which is a LodePNGState with constructor and destructor. - -These files work without modification for both C and C++ compilers because all -the additional C++ code is in "#ifdef __cplusplus" blocks that make C-compilers -ignore it, and the C code is made to compile both with strict ISO C90 and C++. - -To use the C++ version, you need to rename the source file to lodepng.cpp -(instead of lodepng.c), and compile it with a C++ compiler. - -To use the C version, you need to rename the source file to lodepng.c (instead -of lodepng.cpp), and compile it with a C compiler. - - -3. Security ------------ - -Even if carefully designed, it's always possible that LodePNG contains possible -exploits. If you discover one, please let me know, and it will be fixed. - -When using LodePNG, care has to be taken with the C version of LodePNG, as well -as the C-style structs when working with C++. The following conventions are used -for all C-style structs: - --if a struct has a corresponding init function, always call the init function when making a new one --if a struct has a corresponding cleanup function, call it before the struct disappears to avoid memory leaks --if a struct has a corresponding copy function, use the copy function instead of "=". - The destination must also be inited already. - - -4. Decoding ------------ - -Decoding converts a PNG compressed image to a raw pixel buffer. - -Most documentation on using the decoder is at its declarations in the header -above. For C, simple decoding can be done with functions such as -lodepng_decode32, and more advanced decoding can be done with the struct -LodePNGState and lodepng_decode. For C++, all decoding can be done with the -various lodepng::decode functions, and lodepng::State can be used for advanced -features. - -When using the LodePNGState, it uses the following fields for decoding: -*) LodePNGInfo info_png: it stores extra information about the PNG (the input) in here -*) LodePNGColorMode info_raw: here you can say what color mode of the raw image (the output) you want to get -*) LodePNGDecoderSettings decoder: you can specify a few extra settings for the decoder to use - -LodePNGInfo info_png --------------------- - -After decoding, this contains extra information of the PNG image, except the actual -pixels, width and height because these are already gotten directly from the decoder -functions. - -It contains for example the original color type of the PNG image, text comments, -suggested background color, etc... More details about the LodePNGInfo struct are -at its declaration documentation. - -LodePNGColorMode info_raw -------------------------- - -When decoding, here you can specify which color type you want -the resulting raw image to be. If this is different from the colortype of the -PNG, then the decoder will automatically convert the result. This conversion -always works, except if you want it to convert a color PNG to greyscale or to -a palette with missing colors. - -By default, 32-bit color is used for the result. - -LodePNGDecoderSettings decoder ------------------------------- - -The settings can be used to ignore the errors created by invalid CRC and Adler32 -chunks, and to disable the decoding of tEXt chunks. - -There's also a setting color_convert, true by default. If false, no conversion -is done, the resulting data will be as it was in the PNG (after decompression) -and you'll have to puzzle the colors of the pixels together yourself using the -color type information in the LodePNGInfo. - - -5. Encoding ------------ - -Encoding converts a raw pixel buffer to a PNG compressed image. - -Most documentation on using the encoder is at its declarations in the header -above. For C, simple encoding can be done with functions such as -lodepng_encode32, and more advanced decoding can be done with the struct -LodePNGState and lodepng_encode. For C++, all encoding can be done with the -various lodepng::encode functions, and lodepng::State can be used for advanced -features. - -Like the decoder, the encoder can also give errors. However it gives less errors -since the encoder input is trusted, the decoder input (a PNG image that could -be forged by anyone) is not trusted. - -When using the LodePNGState, it uses the following fields for encoding: -*) LodePNGInfo info_png: here you specify how you want the PNG (the output) to be. -*) LodePNGColorMode info_raw: here you say what color type of the raw image (the input) has -*) LodePNGEncoderSettings encoder: you can specify a few settings for the encoder to use - -LodePNGInfo info_png --------------------- - -When encoding, you use this the opposite way as when decoding: for encoding, -you fill in the values you want the PNG to have before encoding. By default it's -not needed to specify a color type for the PNG since it's automatically chosen, -but it's possible to choose it yourself given the right settings. - -The encoder will not always exactly match the LodePNGInfo struct you give, -it tries as close as possible. Some things are ignored by the encoder. The -encoder uses, for example, the following settings from it when applicable: -colortype and bitdepth, text chunks, time chunk, the color key, the palette, the -background color, the interlace method, unknown chunks, ... - -When encoding to a PNG with colortype 3, the encoder will generate a PLTE chunk. -If the palette contains any colors for which the alpha channel is not 255 (so -there are translucent colors in the palette), it'll add a tRNS chunk. - -LodePNGColorMode info_raw -------------------------- - -You specify the color type of the raw image that you give to the input here, -including a possible transparent color key and palette you happen to be using in -your raw image data. - -By default, 32-bit color is assumed, meaning your input has to be in RGBA -format with 4 bytes (unsigned chars) per pixel. - -LodePNGEncoderSettings encoder ------------------------------- - -The following settings are supported (some are in sub-structs): -*) auto_convert: when this option is enabled, the encoder will -automatically choose the smallest possible color mode (including color key) that -can encode the colors of all pixels without information loss. -*) btype: the block type for LZ77. 0 = uncompressed, 1 = fixed huffman tree, - 2 = dynamic huffman tree (best compression). Should be 2 for proper - compression. -*) use_lz77: whether or not to use LZ77 for compressed block types. Should be - true for proper compression. -*) windowsize: the window size used by the LZ77 encoder (1 - 32768). Has value - 2048 by default, but can be set to 32768 for better, but slow, compression. -*) force_palette: if colortype is 2 or 6, you can make the encoder write a PLTE - chunk if force_palette is true. This can used as suggested palette to convert - to by viewers that don't support more than 256 colors (if those still exist) -*) add_id: add text chunk "Encoder: LodePNG " to the image. -*) text_compression: default 1. If 1, it'll store texts as zTXt instead of tEXt chunks. - zTXt chunks use zlib compression on the text. This gives a smaller result on - large texts but a larger result on small texts (such as a single program name). - It's all tEXt or all zTXt though, there's no separate setting per text yet. - - -6. color conversions --------------------- - -An important thing to note about LodePNG, is that the color type of the PNG, and -the color type of the raw image, are completely independent. By default, when -you decode a PNG, you get the result as a raw image in the color type you want, -no matter whether the PNG was encoded with a palette, greyscale or RGBA color. -And if you encode an image, by default LodePNG will automatically choose the PNG -color type that gives good compression based on the values of colors and amount -of colors in the image. It can be configured to let you control it instead as -well, though. - -To be able to do this, LodePNG does conversions from one color mode to another. -It can convert from almost any color type to any other color type, except the -following conversions: RGB to greyscale is not supported, and converting to a -palette when the palette doesn't have a required color is not supported. This is -not supported on purpose: this is information loss which requires a color -reduction algorithm that is beyong the scope of a PNG encoder (yes, RGB to grey -is easy, but there are multiple ways if you want to give some channels more -weight). - -By default, when decoding, you get the raw image in 32-bit RGBA or 24-bit RGB -color, no matter what color type the PNG has. And by default when encoding, -LodePNG automatically picks the best color model for the output PNG, and expects -the input image to be 32-bit RGBA or 24-bit RGB. So, unless you want to control -the color format of the images yourself, you can skip this chapter. - -6.1. PNG color types --------------------- - -A PNG image can have many color types, ranging from 1-bit color to 64-bit color, -as well as palettized color modes. After the zlib decompression and unfiltering -in the PNG image is done, the raw pixel data will have that color type and thus -a certain amount of bits per pixel. If you want the output raw image after -decoding to have another color type, a conversion is done by LodePNG. - -The PNG specification gives the following color types: - -0: greyscale, bit depths 1, 2, 4, 8, 16 -2: RGB, bit depths 8 and 16 -3: palette, bit depths 1, 2, 4 and 8 -4: greyscale with alpha, bit depths 8 and 16 -6: RGBA, bit depths 8 and 16 - -Bit depth is the amount of bits per pixel per color channel. So the total amount -of bits per pixel is: amount of channels * bitdepth. - -6.2. color conversions ----------------------- - -As explained in the sections about the encoder and decoder, you can specify -color types and bit depths in info_png and info_raw to change the default -behaviour. - -If, when decoding, you want the raw image to be something else than the default, -you need to set the color type and bit depth you want in the LodePNGColorMode, -or the parameters colortype and bitdepth of the simple decoding function. - -If, when encoding, you use another color type than the default in the raw input -image, you need to specify its color type and bit depth in the LodePNGColorMode -of the raw image, or use the parameters colortype and bitdepth of the simple -encoding function. - -If, when encoding, you don't want LodePNG to choose the output PNG color type -but control it yourself, you need to set auto_convert in the encoder settings -to false, and specify the color type you want in the LodePNGInfo of the -encoder (including palette: it can generate a palette if auto_convert is true, -otherwise not). - -If the input and output color type differ (whether user chosen or auto chosen), -LodePNG will do a color conversion, which follows the rules below, and may -sometimes result in an error. - -To avoid some confusion: --the decoder converts from PNG to raw image --the encoder converts from raw image to PNG --the colortype and bitdepth in LodePNGColorMode info_raw, are those of the raw image --the colortype and bitdepth in the color field of LodePNGInfo info_png, are those of the PNG --when encoding, the color type in LodePNGInfo is ignored if auto_convert - is enabled, it is automatically generated instead --when decoding, the color type in LodePNGInfo is set by the decoder to that of the original - PNG image, but it can be ignored since the raw image has the color type you requested instead --if the color type of the LodePNGColorMode and PNG image aren't the same, a conversion - between the color types is done if the color types are supported. If it is not - supported, an error is returned. If the types are the same, no conversion is done. --even though some conversions aren't supported, LodePNG supports loading PNGs from any - colortype and saving PNGs to any colortype, sometimes it just requires preparing - the raw image correctly before encoding. --both encoder and decoder use the same color converter. - -Non supported color conversions: --color to greyscale: no error is thrown, but the result will look ugly because -only the red channel is taken --anything to palette when that palette does not have that color in it: in this -case an error is thrown - -Supported color conversions: --anything to 8-bit RGB, 8-bit RGBA, 16-bit RGB, 16-bit RGBA --any grey or grey+alpha, to grey or grey+alpha --anything to a palette, as long as the palette has the requested colors in it --removing alpha channel --higher to smaller bitdepth, and vice versa - -If you want no color conversion to be done (e.g. for speed or control): --In the encoder, you can make it save a PNG with any color type by giving the -raw color mode and LodePNGInfo the same color mode, and setting auto_convert to -false. --In the decoder, you can make it store the pixel data in the same color type -as the PNG has, by setting the color_convert setting to false. Settings in -info_raw are then ignored. - -The function lodepng_convert does the color conversion. It is available in the -interface but normally isn't needed since the encoder and decoder already call -it. - -6.3. padding bits ------------------ - -In the PNG file format, if a less than 8-bit per pixel color type is used and the scanlines -have a bit amount that isn't a multiple of 8, then padding bits are used so that each -scanline starts at a fresh byte. But that is NOT true for the LodePNG raw input and output. -The raw input image you give to the encoder, and the raw output image you get from the decoder -will NOT have these padding bits, e.g. in the case of a 1-bit image with a width -of 7 pixels, the first pixel of the second scanline will the the 8th bit of the first byte, -not the first bit of a new byte. - -6.4. A note about 16-bits per channel and endianness ----------------------------------------------------- - -LodePNG uses unsigned char arrays for 16-bit per channel colors too, just like -for any other color format. The 16-bit values are stored in big endian (most -significant byte first) in these arrays. This is the opposite order of the -little endian used by x86 CPU's. - -LodePNG always uses big endian because the PNG file format does so internally. -Conversions to other formats than PNG uses internally are not supported by -LodePNG on purpose, there are myriads of formats, including endianness of 16-bit -colors, the order in which you store R, G, B and A, and so on. Supporting and -converting to/from all that is outside the scope of LodePNG. - -This may mean that, depending on your use case, you may want to convert the big -endian output of LodePNG to little endian with a for loop. This is certainly not -always needed, many applications and libraries support big endian 16-bit colors -anyway, but it means you cannot simply cast the unsigned char* buffer to an -unsigned short* buffer on x86 CPUs. - - -7. error values ---------------- - -All functions in LodePNG that return an error code, return 0 if everything went -OK, or a non-zero code if there was an error. - -The meaning of the LodePNG error values can be retrieved with the function -lodepng_error_text: given the numerical error code, it returns a description -of the error in English as a string. - -Check the implementation of lodepng_error_text to see the meaning of each code. - - -8. chunks and PNG editing -------------------------- - -If you want to add extra chunks to a PNG you encode, or use LodePNG for a PNG -editor that should follow the rules about handling of unknown chunks, or if your -program is able to read other types of chunks than the ones handled by LodePNG, -then that's possible with the chunk functions of LodePNG. - -A PNG chunk has the following layout: - -4 bytes length -4 bytes type name -length bytes data -4 bytes CRC - -8.1. iterating through chunks ------------------------------ - -If you have a buffer containing the PNG image data, then the first chunk (the -IHDR chunk) starts at byte number 8 of that buffer. The first 8 bytes are the -signature of the PNG and are not part of a chunk. But if you start at byte 8 -then you have a chunk, and can check the following things of it. - -NOTE: none of these functions check for memory buffer boundaries. To avoid -exploits, always make sure the buffer contains all the data of the chunks. -When using lodepng_chunk_next, make sure the returned value is within the -allocated memory. - -unsigned lodepng_chunk_length(const unsigned char* chunk): - -Get the length of the chunk's data. The total chunk length is this length + 12. - -void lodepng_chunk_type(char type[5], const unsigned char* chunk): -unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type): - -Get the type of the chunk or compare if it's a certain type - -unsigned char lodepng_chunk_critical(const unsigned char* chunk): -unsigned char lodepng_chunk_private(const unsigned char* chunk): -unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk): - -Check if the chunk is critical in the PNG standard (only IHDR, PLTE, IDAT and IEND are). -Check if the chunk is private (public chunks are part of the standard, private ones not). -Check if the chunk is safe to copy. If it's not, then, when modifying data in a critical -chunk, unsafe to copy chunks of the old image may NOT be saved in the new one if your -program doesn't handle that type of unknown chunk. - -unsigned char* lodepng_chunk_data(unsigned char* chunk): -const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk): - -Get a pointer to the start of the data of the chunk. - -unsigned lodepng_chunk_check_crc(const unsigned char* chunk): -void lodepng_chunk_generate_crc(unsigned char* chunk): - -Check if the crc is correct or generate a correct one. - -unsigned char* lodepng_chunk_next(unsigned char* chunk): -const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk): - -Iterate to the next chunk. This works if you have a buffer with consecutive chunks. Note that these -functions do no boundary checking of the allocated data whatsoever, so make sure there is enough -data available in the buffer to be able to go to the next chunk. - -unsigned lodepng_chunk_append(unsigned char** out, size_t* outlength, const unsigned char* chunk): -unsigned lodepng_chunk_create(unsigned char** out, size_t* outlength, unsigned length, - const char* type, const unsigned char* data): - -These functions are used to create new chunks that are appended to the data in *out that has -length *outlength. The append function appends an existing chunk to the new data. The create -function creates a new chunk with the given parameters and appends it. Type is the 4-letter -name of the chunk. - -8.2. chunks in info_png ------------------------ - -The LodePNGInfo struct contains fields with the unknown chunk in it. It has 3 -buffers (each with size) to contain 3 types of unknown chunks: -the ones that come before the PLTE chunk, the ones that come between the PLTE -and the IDAT chunks, and the ones that come after the IDAT chunks. -It's necessary to make the distionction between these 3 cases because the PNG -standard forces to keep the ordering of unknown chunks compared to the critical -chunks, but does not force any other ordering rules. - -info_png.unknown_chunks_data[0] is the chunks before PLTE -info_png.unknown_chunks_data[1] is the chunks after PLTE, before IDAT -info_png.unknown_chunks_data[2] is the chunks after IDAT - -The chunks in these 3 buffers can be iterated through and read by using the same -way described in the previous subchapter. - -When using the decoder to decode a PNG, you can make it store all unknown chunks -if you set the option settings.remember_unknown_chunks to 1. By default, this -option is off (0). - -The encoder will always encode unknown chunks that are stored in the info_png. -If you need it to add a particular chunk that isn't known by LodePNG, you can -use lodepng_chunk_append or lodepng_chunk_create to the chunk data in -info_png.unknown_chunks_data[x]. - -Chunks that are known by LodePNG should not be added in that way. E.g. to make -LodePNG add a bKGD chunk, set background_defined to true and add the correct -parameters there instead. - - -9. compiler support -------------------- - -No libraries other than the current standard C library are needed to compile -LodePNG. For the C++ version, only the standard C++ library is needed on top. -Add the files lodepng.c(pp) and lodepng.h to your project, include -lodepng.h where needed, and your program can read/write PNG files. - -It is compatible with C90 and up, and C++03 and up. - -If performance is important, use optimization when compiling! For both the -encoder and decoder, this makes a large difference. - -Make sure that LodePNG is compiled with the same compiler of the same version -and with the same settings as the rest of the program, or the interfaces with -std::vectors and std::strings in C++ can be incompatible. - -CHAR_BITS must be 8 or higher, because LodePNG uses unsigned chars for octets. - -*) gcc and g++ - -LodePNG is developed in gcc so this compiler is natively supported. It gives no -warnings with compiler options "-Wall -Wextra -pedantic -ansi", with gcc and g++ -version 4.7.1 on Linux, 32-bit and 64-bit. - -*) Clang - -Fully supported and warning-free. - -*) Mingw - -The Mingw compiler (a port of gcc for Windows) should be fully supported by -LodePNG. - -*) Visual Studio and Visual C++ Express Edition - -LodePNG should be warning-free with warning level W4. Two warnings were disabled -with pragmas though: warning 4244 about implicit conversions, and warning 4996 -where it wants to use a non-standard function fopen_s instead of the standard C -fopen. - -Visual Studio may want "stdafx.h" files to be included in each source file and -give an error "unexpected end of file while looking for precompiled header". -This is not standard C++ and will not be added to the stock LodePNG. You can -disable it for lodepng.cpp only by right clicking it, Properties, C/C++, -Precompiled Headers, and set it to Not Using Precompiled Headers there. - -NOTE: Modern versions of VS should be fully supported, but old versions, e.g. -VS6, are not guaranteed to work. - -*) Compilers on Macintosh - -LodePNG has been reported to work both with gcc and LLVM for Macintosh, both for -C and C++. - -*) Other Compilers - -If you encounter problems on any compilers, feel free to let me know and I may -try to fix it if the compiler is modern and standards complient. - - -10. examples ------------- - -This decoder example shows the most basic usage of LodePNG. More complex -examples can be found on the LodePNG website. - -10.1. decoder C++ example -------------------------- - -#include "lodepng.h" -#include - -int main(int argc, char *argv[]) -{ - const char* filename = argc > 1 ? argv[1] : "test.png"; - - //load and decode - std::vector image; - unsigned width, height; - unsigned error = lodepng::decode(image, width, height, filename); - - //if there's an error, display it - if(error) std::cout << "decoder error " << error << ": " << lodepng_error_text(error) << std::endl; - - //the pixels are now in the vector "image", 4 bytes per pixel, ordered RGBARGBA..., use it as texture, draw it, ... -} - -10.2. decoder C example ------------------------ - -#include "lodepng.h" - -int main(int argc, char *argv[]) -{ - unsigned error; - unsigned char* image; - size_t width, height; - const char* filename = argc > 1 ? argv[1] : "test.png"; - - error = lodepng_decode32_file(&image, &width, &height, filename); - - if(error) printf("decoder error %u: %s\n", error, lodepng_error_text(error)); - - / * use image here * / - - free(image); - return 0; -} - -11. state settings reference ----------------------------- - -A quick reference of some settings to set on the LodePNGState - -For decoding: - -state.decoder.zlibsettings.ignore_adler32: ignore ADLER32 checksums -state.decoder.zlibsettings.custom_...: use custom inflate function -state.decoder.ignore_crc: ignore CRC checksums -state.decoder.color_convert: convert internal PNG color to chosen one -state.decoder.read_text_chunks: whether to read in text metadata chunks -state.decoder.remember_unknown_chunks: whether to read in unknown chunks -state.info_raw.colortype: desired color type for decoded image -state.info_raw.bitdepth: desired bit depth for decoded image -state.info_raw....: more color settings, see struct LodePNGColorMode -state.info_png....: no settings for decoder but ouput, see struct LodePNGInfo - -For encoding: - -state.encoder.zlibsettings.btype: disable compression by setting it to 0 -state.encoder.zlibsettings.use_lz77: use LZ77 in compression -state.encoder.zlibsettings.windowsize: tweak LZ77 windowsize -state.encoder.zlibsettings.minmatch: tweak min LZ77 length to match -state.encoder.zlibsettings.nicematch: tweak LZ77 match where to stop searching -state.encoder.zlibsettings.lazymatching: try one more LZ77 matching -state.encoder.zlibsettings.custom_...: use custom deflate function -state.encoder.auto_convert: choose optimal PNG color type, if 0 uses info_png -state.encoder.filter_palette_zero: PNG filter strategy for palette -state.encoder.filter_strategy: PNG filter strategy to encode with -state.encoder.force_palette: add palette even if not encoding to one -state.encoder.add_id: add LodePNG identifier and version as a text chunk -state.encoder.text_compression: use compressed text chunks for metadata -state.info_raw.colortype: color type of raw input image you provide -state.info_raw.bitdepth: bit depth of raw input image you provide -state.info_raw: more color settings, see struct LodePNGColorMode -state.info_png.color.colortype: desired color type if auto_convert is false -state.info_png.color.bitdepth: desired bit depth if auto_convert is false -state.info_png.color....: more color settings, see struct LodePNGColorMode -state.info_png....: more PNG related settings, see struct LodePNGInfo - - -12. changes ------------ - -The version number of LodePNG is the date of the change given in the format -yyyymmdd. - -Some changes aren't backwards compatible. Those are indicated with a (!) -symbol. - -*) 18 apr 2016: Changed qsort to custom stable sort (for platforms w/o qsort). -*) 09 apr 2016: Fixed colorkey usage detection, and better file loading (within - the limits of pure C90). -*) 08 dec 2015: Made load_file function return error if file can't be opened. -*) 24 okt 2015: Bugfix with decoding to palette output. -*) 18 apr 2015: Boundary PM instead of just package-merge for faster encoding. -*) 23 aug 2014: Reduced needless memory usage of decoder. -*) 28 jun 2014: Removed fix_png setting, always support palette OOB for - simplicity. Made ColorProfile public. -*) 09 jun 2014: Faster encoder by fixing hash bug and more zeros optimization. -*) 22 dec 2013: Power of two windowsize required for optimization. -*) 15 apr 2013: Fixed bug with LAC_ALPHA and color key. -*) 25 mar 2013: Added an optional feature to ignore some PNG errors (fix_png). -*) 11 mar 2013 (!): Bugfix with custom free. Changed from "my" to "lodepng_" - prefix for the custom allocators and made it possible with a new #define to - use custom ones in your project without needing to change lodepng's code. -*) 28 jan 2013: Bugfix with color key. -*) 27 okt 2012: Tweaks in text chunk keyword length error handling. -*) 8 okt 2012 (!): Added new filter strategy (entropy) and new auto color mode. - (no palette). Better deflate tree encoding. New compression tweak settings. - Faster color conversions while decoding. Some internal cleanups. -*) 23 sep 2012: Reduced warnings in Visual Studio a little bit. -*) 1 sep 2012 (!): Removed #define's for giving custom (de)compression functions - and made it work with function pointers instead. -*) 23 jun 2012: Added more filter strategies. Made it easier to use custom alloc - and free functions and toggle #defines from compiler flags. Small fixes. -*) 6 may 2012 (!): Made plugging in custom zlib/deflate functions more flexible. -*) 22 apr 2012 (!): Made interface more consistent, renaming a lot. Removed - redundant C++ codec classes. Reduced amount of structs. Everything changed, - but it is cleaner now imho and functionality remains the same. Also fixed - several bugs and shrunk the implementation code. Made new samples. -*) 6 nov 2011 (!): By default, the encoder now automatically chooses the best - PNG color model and bit depth, based on the amount and type of colors of the - raw image. For this, autoLeaveOutAlphaChannel replaced by auto_choose_color. -*) 9 okt 2011: simpler hash chain implementation for the encoder. -*) 8 sep 2011: lz77 encoder lazy matching instead of greedy matching. -*) 23 aug 2011: tweaked the zlib compression parameters after benchmarking. - A bug with the PNG filtertype heuristic was fixed, so that it chooses much - better ones (it's quite significant). A setting to do an experimental, slow, - brute force search for PNG filter types is added. -*) 17 aug 2011 (!): changed some C zlib related function names. -*) 16 aug 2011: made the code less wide (max 120 characters per line). -*) 17 apr 2011: code cleanup. Bugfixes. Convert low to 16-bit per sample colors. -*) 21 feb 2011: fixed compiling for C90. Fixed compiling with sections disabled. -*) 11 dec 2010: encoding is made faster, based on suggestion by Peter Eastman - to optimize long sequences of zeros. -*) 13 nov 2010: added LodePNG_InfoColor_hasPaletteAlpha and - LodePNG_InfoColor_canHaveAlpha functions for convenience. -*) 7 nov 2010: added LodePNG_error_text function to get error code description. -*) 30 okt 2010: made decoding slightly faster -*) 26 okt 2010: (!) changed some C function and struct names (more consistent). - Reorganized the documentation and the declaration order in the header. -*) 08 aug 2010: only changed some comments and external samples. -*) 05 jul 2010: fixed bug thanks to warnings in the new gcc version. -*) 14 mar 2010: fixed bug where too much memory was allocated for char buffers. -*) 02 sep 2008: fixed bug where it could create empty tree that linux apps could - read by ignoring the problem but windows apps couldn't. -*) 06 jun 2008: added more error checks for out of memory cases. -*) 26 apr 2008: added a few more checks here and there to ensure more safety. -*) 06 mar 2008: crash with encoding of strings fixed -*) 02 feb 2008: support for international text chunks added (iTXt) -*) 23 jan 2008: small cleanups, and #defines to divide code in sections -*) 20 jan 2008: support for unknown chunks allowing using LodePNG for an editor. -*) 18 jan 2008: support for tIME and pHYs chunks added to encoder and decoder. -*) 17 jan 2008: ability to encode and decode compressed zTXt chunks added - Also various fixes, such as in the deflate and the padding bits code. -*) 13 jan 2008: Added ability to encode Adam7-interlaced images. Improved - filtering code of encoder. -*) 07 jan 2008: (!) changed LodePNG to use ISO C90 instead of C++. A - C++ wrapper around this provides an interface almost identical to before. - Having LodePNG be pure ISO C90 makes it more portable. The C and C++ code - are together in these files but it works both for C and C++ compilers. -*) 29 dec 2007: (!) changed most integer types to unsigned int + other tweaks -*) 30 aug 2007: bug fixed which makes this Borland C++ compatible -*) 09 aug 2007: some VS2005 warnings removed again -*) 21 jul 2007: deflate code placed in new namespace separate from zlib code -*) 08 jun 2007: fixed bug with 2- and 4-bit color, and small interlaced images -*) 04 jun 2007: improved support for Visual Studio 2005: crash with accessing - invalid std::vector element [0] fixed, and level 3 and 4 warnings removed -*) 02 jun 2007: made the encoder add a tag with version by default -*) 27 may 2007: zlib and png code separated (but still in the same file), - simple encoder/decoder functions added for more simple usage cases -*) 19 may 2007: minor fixes, some code cleaning, new error added (error 69), - moved some examples from here to lodepng_examples.cpp -*) 12 may 2007: palette decoding bug fixed -*) 24 apr 2007: changed the license from BSD to the zlib license -*) 11 mar 2007: very simple addition: ability to encode bKGD chunks. -*) 04 mar 2007: (!) tEXt chunk related fixes, and support for encoding - palettized PNG images. Plus little interface change with palette and texts. -*) 03 mar 2007: Made it encode dynamic Huffman shorter with repeat codes. - Fixed a bug where the end code of a block had length 0 in the Huffman tree. -*) 26 feb 2007: Huffman compression with dynamic trees (BTYPE 2) now implemented - and supported by the encoder, resulting in smaller PNGs at the output. -*) 27 jan 2007: Made the Adler-32 test faster so that a timewaste is gone. -*) 24 jan 2007: gave encoder an error interface. Added color conversion from any - greyscale type to 8-bit greyscale with or without alpha. -*) 21 jan 2007: (!) Totally changed the interface. It allows more color types - to convert to and is more uniform. See the manual for how it works now. -*) 07 jan 2007: Some cleanup & fixes, and a few changes over the last days: - encode/decode custom tEXt chunks, separate classes for zlib & deflate, and - at last made the decoder give errors for incorrect Adler32 or Crc. -*) 01 jan 2007: Fixed bug with encoding PNGs with less than 8 bits per channel. -*) 29 dec 2006: Added support for encoding images without alpha channel, and - cleaned out code as well as making certain parts faster. -*) 28 dec 2006: Added "Settings" to the encoder. -*) 26 dec 2006: The encoder now does LZ77 encoding and produces much smaller files now. - Removed some code duplication in the decoder. Fixed little bug in an example. -*) 09 dec 2006: (!) Placed output parameters of public functions as first parameter. - Fixed a bug of the decoder with 16-bit per color. -*) 15 okt 2006: Changed documentation structure -*) 09 okt 2006: Encoder class added. It encodes a valid PNG image from the - given image buffer, however for now it's not compressed. -*) 08 sep 2006: (!) Changed to interface with a Decoder class -*) 30 jul 2006: (!) LodePNG_InfoPng , width and height are now retrieved in different - way. Renamed decodePNG to decodePNGGeneric. -*) 29 jul 2006: (!) Changed the interface: image info is now returned as a - struct of type LodePNG::LodePNG_Info, instead of a vector, which was a bit clumsy. -*) 28 jul 2006: Cleaned the code and added new error checks. - Corrected terminology "deflate" into "inflate". -*) 23 jun 2006: Added SDL example in the documentation in the header, this - example allows easy debugging by displaying the PNG and its transparency. -*) 22 jun 2006: (!) Changed way to obtain error value. Added - loadFile function for convenience. Made decodePNG32 faster. -*) 21 jun 2006: (!) Changed type of info vector to unsigned. - Changed position of palette in info vector. Fixed an important bug that - happened on PNGs with an uncompressed block. -*) 16 jun 2006: Internally changed unsigned into unsigned where - needed, and performed some optimizations. -*) 07 jun 2006: (!) Renamed functions to decodePNG and placed them - in LodePNG namespace. Changed the order of the parameters. Rewrote the - documentation in the header. Renamed files to lodepng.cpp and lodepng.h -*) 22 apr 2006: Optimized and improved some code -*) 07 sep 2005: (!) Changed to std::vector interface -*) 12 aug 2005: Initial release (C++, decoder only) - - -13. contact information ------------------------ - -Feel free to contact me with suggestions, problems, comments, ... concerning -LodePNG. If you encounter a PNG image that doesn't work properly with this -decoder, feel free to send it and I'll use it to find and fix the problem. - -My email address is (puzzle the account and domain together with an @ symbol): -Domain: gmail dot com. -Account: lode dot vandevenne. - - -Copyright (c) 2005-2016 Lode Vandevenne -*/ diff --git a/3rdparty/bgfx/3rdparty/edtaa3/LICENSE.md b/3rdparty/bgfx/3rdparty/mtlpp/LICENSE similarity index 58% rename from 3rdparty/bgfx/3rdparty/edtaa3/LICENSE.md rename to 3rdparty/bgfx/3rdparty/mtlpp/LICENSE index 93e6a94..1b84022 100644 --- a/3rdparty/bgfx/3rdparty/edtaa3/LICENSE.md +++ b/3rdparty/bgfx/3rdparty/mtlpp/LICENSE @@ -1,17 +1,6 @@ -https://github.com/OpenGLInsights/OpenGLInsightsCode/blob/master/Chapter%2012%202D%20Shape%20Rendering%20by%20Distance%20Fields/LICENSE.txt +MIT License -The C code and the GLSL code for the OpenGL demo is public -domain code. The distance transform code in the console -application to create distance field textures, located in -the file "edtaa3func.c", is MIT licensed, and free to use -under the following conditions. - -https://github.com/OpenGLInsights/OpenGLInsightsCode/issues/6#issuecomment-67829157 - ----- - -Copyright (C) 2011 by Stefan Gustavson -(stefan.gustavson@liu.se) +Copyright (c) 2016 Nikolay Aleksiev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -20,15 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ----- +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/3rdparty/bgfx/3rdparty/mtlpp/mtlpp.hpp b/3rdparty/bgfx/3rdparty/mtlpp/mtlpp.hpp new file mode 100644 index 0000000..d7f304b --- /dev/null +++ b/3rdparty/bgfx/3rdparty/mtlpp/mtlpp.hpp @@ -0,0 +1,2706 @@ +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +#pragma once + +////////////////////////////////////// +// FILE: defines.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +#include +#include +#include + +#ifndef __has_feature +# define __has_feature(x) 0 +#endif + +#ifndef MTLPP_CONFIG_RVALUE_REFERENCES +# define MTLPP_CONFIG_RVALUE_REFERENCES __has_feature(cxx_rvalue_references) +#endif + +#ifndef MTLPP_CONFIG_VALIDATE +# define MTLPP_CONFIG_VALIDATE 1 +#endif + +#ifndef MTLPP_CONFIG_USE_AVAILABILITY +# define MTLPP_CONFIG_USE_AVAILABILITY 0 +#endif + +#if MTLPP_CONFIG_USE_AVAILABILITY +# if __has_feature(attribute_availability_with_version_underscores) || (__has_feature(attribute_availability_with_message) && __clang__ && __clang_major__ >= 7) +# include +# define MTLPP_AVAILABLE(mac, ios) CF_AVAILABLE(mac, ios) +# define MTLPP_AVAILABLE_MAC(mac) CF_AVAILABLE_MAC(mac) +# define MTLPP_AVAILABLE_IOS(ios) CF_AVAILABLE_IOS(ios) +# define MTLPP_AVAILABLE_TVOS(tvos) +# define MTLPP_DEPRECATED(macIntro, macDep, iosIntro, iosDep) CF_DEPRECATED(macIntro, macDep, iosIntro, iosDep) +# define MTLPP_DEPRECATED_MAC(macIntro, macDep) CF_DEPRECATED_MAC(macIntro, macDep) +# define MTLPP_DEPRECATED_IOS(iosIntro, iosDep) CF_DEPRECATED_IOS(iosIntro, iosDep) +# endif +#endif + +#ifndef MTLPP_AVAILABLE +# define MTLPP_AVAILABLE(mac, ios) +# define MTLPP_AVAILABLE_MAC(mac) +# define MTLPP_AVAILABLE_IOS(ios) +# define MTLPP_AVAILABLE_TVOS(tvos) +# define MTLPP_DEPRECATED(macIntro, macDep, iosIntro, iosDep) +# define MTLPP_DEPRECATED_MAC(macIntro, macDep) +# define MTLPP_DEPRECATED_IOS(iosIntro, iosDep) +#endif + +#ifndef __DARWIN_ALIAS_STARTING_MAC___MAC_10_11 +# define __DARWIN_ALIAS_STARTING_MAC___MAC_10_11(x) +#endif +#ifndef __DARWIN_ALIAS_STARTING_MAC___MAC_10_12 +# define __DARWIN_ALIAS_STARTING_MAC___MAC_10_12(x) +#endif +#ifndef __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_0 +# define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_8_0(x) +#endif +#ifndef __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_0 +# define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_9_0(x) +#endif +#ifndef __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_0 +# define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_10_0(x) +#endif + +#define MTLPP_IS_AVAILABLE_MAC(mac) (0 __DARWIN_ALIAS_STARTING_MAC___MAC_##mac( || 1 )) +#define MTLPP_IS_AVAILABLE_IOS(ios) (0 __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_##ios( || 1 )) +#define MTLPP_IS_AVAILABLE(mac, ios) (MTLPP_IS_AVAILABLE_MAC(mac) || MTLPP_IS_AVAILABLE_IOS(ios)) + + +////////////////////////////////////// +// FILE: ns.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" + +namespace ns +{ + struct Handle + { + const void* ptr; + }; + + class Object + { + public: + inline const void* GetPtr() const { return m_ptr; } + + inline operator bool() const { return m_ptr != nullptr; } + + protected: + Object(); + Object(const Handle& handle); + Object(const Object& rhs); +#if MTLPP_CONFIG_RVALUE_REFERENCES + Object(Object&& rhs); +#endif + virtual ~Object(); + + Object& operator=(const Object& rhs); +#if MTLPP_CONFIG_RVALUE_REFERENCES + Object& operator=(Object&& rhs); +#endif + + inline void Validate() const + { +#if MTLPP_CONFIG_VALIDATE + assert(m_ptr); +#endif + } + + const void* m_ptr = nullptr; + }; + + struct Range + { + inline Range(uint32_t location, uint32_t length) : + Location(location), + Length(length) + { } + + uint32_t Location; + uint32_t Length; + }; + + class ArrayBase : public Object + { + public: + ArrayBase() { } + ArrayBase(const Handle& handle) : Object(handle) { } + + const uint32_t GetSize() const; + + protected: + void* GetItem(uint32_t index) const; + }; + + template + class Array : public ArrayBase + { + public: + Array() { } + Array(const Handle& handle) : ArrayBase(handle) { } + + const T operator[](uint32_t index) const + { + return Handle{ GetItem(index) }; + } + + T operator[](uint32_t index) + { + return Handle{ GetItem(index) }; + } + }; + + class DictionaryBase : public Object + { + public: + DictionaryBase() { } + DictionaryBase(const Handle& handle) : Object(handle) { } + + protected: + + }; + + template + class Dictionary : public DictionaryBase + { + public: + Dictionary() { } + Dictionary(const Handle& handle) : DictionaryBase(handle) { } + }; + + class String : public Object + { + public: + String() { } + String(const Handle& handle) : Object(handle) { } + String(const char* cstr); + + const char* GetCStr() const; + uint32_t GetLength() const; + }; + + class Error : public Object + { + public: + Error(); + Error(const Handle& handle) : Object(handle) { } + + String GetDomain() const; + uint32_t GetCode() const; + //@property (readonly, copy) NSDictionary *userInfo; + String GetLocalizedDescription() const; + String GetLocalizedFailureReason() const; + String GetLocalizedRecoverySuggestion() const; + String GetLocalizedRecoveryOptions() const; + //@property (nullable, readonly, strong) id recoveryAttempter; + String GetHelpAnchor() const; + }; +} + +////////////////////////////////////// +// FILE: command_encoder.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" + +namespace mtlpp +{ + class Device; + + class CommandEncoder : public ns::Object + { + public: + CommandEncoder() { } + CommandEncoder(const ns::Handle& handle) : ns::Object(handle) { } + + Device GetDevice() const; + ns::String GetLabel() const; + + void SetLabel(const ns::String& label); + + void EndEncoding(); + void InsertDebugSignpost(const ns::String& string); + void PushDebugGroup(const ns::String& string); + void PopDebugGroup(); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: pixel_format.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" + +namespace mtlpp +{ + enum class PixelFormat + { + Invalid = 0, + + A8Unorm = 1, + + R8Unorm = 10, + R8Unorm_sRGB MTLPP_AVAILABLE_IOS(8_0) = 11, + + R8Snorm = 12, + R8Uint = 13, + R8Sint = 14, + + R16Unorm = 20, + R16Snorm = 22, + R16Uint = 23, + R16Sint = 24, + R16Float = 25, + + RG8Unorm = 30, + RG8Unorm_sRGB MTLPP_AVAILABLE_IOS(8_0) = 31, + RG8Snorm = 32, + RG8Uint = 33, + RG8Sint = 34, + + B5G6R5Unorm MTLPP_AVAILABLE_IOS(8_0) = 40, + A1BGR5Unorm MTLPP_AVAILABLE_IOS(8_0) = 41, + ABGR4Unorm MTLPP_AVAILABLE_IOS(8_0) = 42, + BGR5A1Unorm MTLPP_AVAILABLE_IOS(8_0) = 43, + + R32Uint = 53, + R32Sint = 54, + R32Float = 55, + + RG16Unorm = 60, + RG16Snorm = 62, + RG16Uint = 63, + RG16Sint = 64, + RG16Float = 65, + + RGBA8Unorm = 70, + RGBA8Unorm_sRGB = 71, + RGBA8Snorm = 72, + RGBA8Uint = 73, + RGBA8Sint = 74, + + BGRA8Unorm = 80, + BGRA8Unorm_sRGB = 81, + + RGB10A2Unorm = 90, + RGB10A2Uint = 91, + + RG11B10Float = 92, + RGB9E5Float = 93, + + BGR10_XR MTLPP_AVAILABLE_IOS(10_0) = 554, + BGR10_XR_sRGB MTLPP_AVAILABLE_IOS(10_0) = 555, + + + RG32Uint = 103, + RG32Sint = 104, + RG32Float = 105, + + RGBA16Unorm = 110, + RGBA16Snorm = 112, + RGBA16Uint = 113, + RGBA16Sint = 114, + RGBA16Float = 115, + + BGRA10_XR MTLPP_AVAILABLE_IOS(10_0) = 552, + BGRA10_XR_sRGB MTLPP_AVAILABLE_IOS(10_0) = 553, + + RGBA32Uint = 123, + RGBA32Sint = 124, + RGBA32Float = 125, + + BC1_RGBA MTLPP_AVAILABLE_MAC(10_11) = 130, + BC1_RGBA_sRGB MTLPP_AVAILABLE_MAC(10_11) = 131, + BC2_RGBA MTLPP_AVAILABLE_MAC(10_11) = 132, + BC2_RGBA_sRGB MTLPP_AVAILABLE_MAC(10_11) = 133, + BC3_RGBA MTLPP_AVAILABLE_MAC(10_11) = 134, + BC3_RGBA_sRGB MTLPP_AVAILABLE_MAC(10_11) = 135, + + BC4_RUnorm MTLPP_AVAILABLE_MAC(10_11) = 140, + BC4_RSnorm MTLPP_AVAILABLE_MAC(10_11) = 141, + BC5_RGUnorm MTLPP_AVAILABLE_MAC(10_11) = 142, + BC5_RGSnorm MTLPP_AVAILABLE_MAC(10_11) = 143, + + BC6H_RGBFloat MTLPP_AVAILABLE_MAC(10_11) = 150, + BC6H_RGBUfloat MTLPP_AVAILABLE_MAC(10_11) = 151, + BC7_RGBAUnorm MTLPP_AVAILABLE_MAC(10_11) = 152, + BC7_RGBAUnorm_sRGB MTLPP_AVAILABLE_MAC(10_11) = 153, + + PVRTC_RGB_2BPP MTLPP_AVAILABLE_IOS(8_0) = 160, + PVRTC_RGB_2BPP_sRGB MTLPP_AVAILABLE_IOS(8_0) = 161, + PVRTC_RGB_4BPP MTLPP_AVAILABLE_IOS(8_0) = 162, + PVRTC_RGB_4BPP_sRGB MTLPP_AVAILABLE_IOS(8_0) = 163, + PVRTC_RGBA_2BPP MTLPP_AVAILABLE_IOS(8_0) = 164, + PVRTC_RGBA_2BPP_sRGB MTLPP_AVAILABLE_IOS(8_0) = 165, + PVRTC_RGBA_4BPP MTLPP_AVAILABLE_IOS(8_0) = 166, + PVRTC_RGBA_4BPP_sRGB MTLPP_AVAILABLE_IOS(8_0) = 167, + + EAC_R11Unorm MTLPP_AVAILABLE_IOS(8_0) = 170, + EAC_R11Snorm MTLPP_AVAILABLE_IOS(8_0) = 172, + EAC_RG11Unorm MTLPP_AVAILABLE_IOS(8_0) = 174, + EAC_RG11Snorm MTLPP_AVAILABLE_IOS(8_0) = 176, + EAC_RGBA8 MTLPP_AVAILABLE_IOS(8_0) = 178, + EAC_RGBA8_sRGB MTLPP_AVAILABLE_IOS(8_0) = 179, + + ETC2_RGB8 MTLPP_AVAILABLE_IOS(8_0) = 180, + ETC2_RGB8_sRGB MTLPP_AVAILABLE_IOS(8_0) = 181, + ETC2_RGB8A1 MTLPP_AVAILABLE_IOS(8_0) = 182, + ETC2_RGB8A1_sRGB MTLPP_AVAILABLE_IOS(8_0) = 183, + + ASTC_4x4_sRGB MTLPP_AVAILABLE_IOS(8_0) = 186, + ASTC_5x4_sRGB MTLPP_AVAILABLE_IOS(8_0) = 187, + ASTC_5x5_sRGB MTLPP_AVAILABLE_IOS(8_0) = 188, + ASTC_6x5_sRGB MTLPP_AVAILABLE_IOS(8_0) = 189, + ASTC_6x6_sRGB MTLPP_AVAILABLE_IOS(8_0) = 190, + ASTC_8x5_sRGB MTLPP_AVAILABLE_IOS(8_0) = 192, + ASTC_8x6_sRGB MTLPP_AVAILABLE_IOS(8_0) = 193, + ASTC_8x8_sRGB MTLPP_AVAILABLE_IOS(8_0) = 194, + ASTC_10x5_sRGB MTLPP_AVAILABLE_IOS(8_0) = 195, + ASTC_10x6_sRGB MTLPP_AVAILABLE_IOS(8_0) = 196, + ASTC_10x8_sRGB MTLPP_AVAILABLE_IOS(8_0) = 197, + ASTC_10x10_sRGB MTLPP_AVAILABLE_IOS(8_0) = 198, + ASTC_12x10_sRGB MTLPP_AVAILABLE_IOS(8_0) = 199, + ASTC_12x12_sRGB MTLPP_AVAILABLE_IOS(8_0) = 200, + + ASTC_4x4_LDR MTLPP_AVAILABLE_IOS(8_0) = 204, + ASTC_5x4_LDR MTLPP_AVAILABLE_IOS(8_0) = 205, + ASTC_5x5_LDR MTLPP_AVAILABLE_IOS(8_0) = 206, + ASTC_6x5_LDR MTLPP_AVAILABLE_IOS(8_0) = 207, + ASTC_6x6_LDR MTLPP_AVAILABLE_IOS(8_0) = 208, + ASTC_8x5_LDR MTLPP_AVAILABLE_IOS(8_0) = 210, + ASTC_8x6_LDR MTLPP_AVAILABLE_IOS(8_0) = 211, + ASTC_8x8_LDR MTLPP_AVAILABLE_IOS(8_0) = 212, + ASTC_10x5_LDR MTLPP_AVAILABLE_IOS(8_0) = 213, + ASTC_10x6_LDR MTLPP_AVAILABLE_IOS(8_0) = 214, + ASTC_10x8_LDR MTLPP_AVAILABLE_IOS(8_0) = 215, + ASTC_10x10_LDR MTLPP_AVAILABLE_IOS(8_0) = 216, + ASTC_12x10_LDR MTLPP_AVAILABLE_IOS(8_0) = 217, + ASTC_12x12_LDR MTLPP_AVAILABLE_IOS(8_0) = 218, + + GBGR422 = 240, + + BGRG422 = 241, + + Depth16Unorm MTLPP_AVAILABLE_MAC(10_12) = 250, + Depth32Float = 252, + + Stencil8 = 253, + + Depth24Unorm_Stencil8 MTLPP_AVAILABLE_MAC(10_11) = 255, + Depth32Float_Stencil8 MTLPP_AVAILABLE(10_11, 9_0) = 260, + + X32_Stencil8 MTLPP_AVAILABLE(10_12, 10_0) = 261, + X24_Stencil8 MTLPP_AVAILABLE_MAC(10_12) = 262, + } + MTLPP_AVAILABLE(10_11, 8_0); +} + + +////////////////////////////////////// +// FILE: resource.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" + +namespace mtlpp +{ + class Heap; + + static const uint32_t ResourceCpuCacheModeShift = 0; + static const uint32_t ResourceStorageModeShift = 4; + static const uint32_t ResourceHazardTrackingModeShift = 8; + + enum class PurgeableState + { + KeepCurrent = 1, + NonVolatile = 2, + Volatile = 3, + Empty = 4, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class CpuCacheMode + { + DefaultCache = 0, + WriteCombined = 1, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class StorageMode + { + Shared = 0, + Managed MTLPP_AVAILABLE(10_11, NA) = 1, + Private = 2, + Memoryless MTLPP_AVAILABLE(NA, 10_0) = 3, + } + MTLPP_AVAILABLE(10_11, 9_0); + + enum class ResourceOptions + { + CpuCacheModeDefaultCache = uint32_t(CpuCacheMode::DefaultCache) << ResourceCpuCacheModeShift, + CpuCacheModeWriteCombined = uint32_t(CpuCacheMode::WriteCombined) << ResourceCpuCacheModeShift, + + StorageModeShared MTLPP_AVAILABLE(10_11, 9_0) = uint32_t(StorageMode::Shared) << ResourceStorageModeShift, + StorageModeManaged MTLPP_AVAILABLE(10_11, NA) = uint32_t(StorageMode::Managed) << ResourceStorageModeShift, + StorageModePrivate MTLPP_AVAILABLE(10_11, 9_0) = uint32_t(StorageMode::Private) << ResourceStorageModeShift, + StorageModeMemoryless MTLPP_AVAILABLE(NA, 10_0) = uint32_t(StorageMode::Memoryless) << ResourceStorageModeShift, + + HazardTrackingModeUntracked MTLPP_AVAILABLE(NA, 10_0) = 0x1 << ResourceHazardTrackingModeShift, + + OptionCPUCacheModeDefault = CpuCacheModeDefaultCache, + OptionCPUCacheModeWriteCombined = CpuCacheModeWriteCombined, + } + MTLPP_AVAILABLE(10_11, 8_0); + + class Resource : public ns::Object + { + public: + Resource() { } + Resource(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetLabel() const; + CpuCacheMode GetCpuCacheMode() const; + StorageMode GetStorageMode() const MTLPP_AVAILABLE(10_11, 9_0); + Heap GetHeap() const MTLPP_AVAILABLE(NA, 10_0); + bool IsAliasable() const MTLPP_AVAILABLE(NA, 10_0); + + void SetLabel(const ns::String& label); + + PurgeableState SetPurgeableState(PurgeableState state); + void MakeAliasable() const MTLPP_AVAILABLE(NA, 10_0); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: buffer.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "pixel_format.hpp" +// #include "resource.hpp" + +namespace mtlpp +{ + class Texture; + class TextureDescriptor; + + class Buffer : public Resource + { + public: + Buffer() { } + Buffer(const ns::Handle& handle) : Resource(handle) { } + + uint32_t GetLength() const; + void* GetContents(); + void DidModify(const ns::Range& range) MTLPP_AVAILABLE_MAC(10_11); + Texture NewTexture(const TextureDescriptor& descriptor, uint32_t offset, uint32_t bytesPerRow) MTLPP_AVAILABLE_IOS(8_0); + void AddDebugMarker(const ns::String& marker, const ns::Range& range) MTLPP_AVAILABLE(10_12, 10_0); + void RemoveAllDebugMarkers() MTLPP_AVAILABLE(10_12, 10_0); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: types.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" + +namespace mtlpp +{ + struct Origin + { + inline Origin(uint32_t x, uint32_t y, uint32_t z) : + X(x), + Y(y), + Z(z) + { } + + uint32_t X; + uint32_t Y; + uint32_t Z; + }; + + struct Size + { + inline Size(uint32_t width, uint32_t height, uint32_t depth) : + Width(width), + Height(height), + Depth(depth) + { } + + uint32_t Width; + uint32_t Height; + uint32_t Depth; + }; + + struct Region + { + inline Region(uint32_t x, uint32_t width) : + Origin(x, 0, 0), + Size(width, 1, 1) + { } + + inline Region(uint32_t x, uint32_t y, uint32_t width, uint32_t height) : + Origin(x, y, 0), + Size(width, height, 1) + { } + + inline Region(uint32_t x, uint32_t y, uint32_t z, uint32_t width, uint32_t height, uint32_t depth) : + Origin(x, y, z), + Size(width, height, depth) + { } + + Origin Origin; + Size Size; + }; +} + +////////////////////////////////////// +// FILE: texture.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "resource.hpp" +// #include "buffer.hpp" +// #include "types.hpp" + +namespace mtlpp +{ + enum class TextureType + { + Texture1D = 0, + Texture1DArray = 1, + Texture2D = 2, + Texture2DArray = 3, + Texture2DMultisample = 4, + TextureCube = 5, + TextureCubeArray MTLPP_AVAILABLE_MAC(10_11) = 6, + Texture3D = 7, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class TextureUsage + { + Unknown = 0x0000, + ShaderRead = 0x0001, + ShaderWrite = 0x0002, + RenderTarget = 0x0004, + PixelFormatView = 0x0010, + } + MTLPP_AVAILABLE(10_11, 9_0); + + + class TextureDescriptor : public ns::Object + { + public: + TextureDescriptor(); + TextureDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + static TextureDescriptor Texture2DDescriptor(PixelFormat pixelFormat, uint32_t width, uint32_t height, bool mipmapped); + static TextureDescriptor TextureCubeDescriptor(PixelFormat pixelFormat, uint32_t size, bool mipmapped); + + TextureType GetTextureType() const; + PixelFormat GetPixelFormat() const; + uint32_t GetWidth() const; + uint32_t GetHeight() const; + uint32_t GetDepth() const; + uint32_t GetMipmapLevelCount() const; + uint32_t GetSampleCount() const; + uint32_t GetArrayLength() const; + ResourceOptions GetResourceOptions() const; + CpuCacheMode GetCpuCacheMode() const MTLPP_AVAILABLE(10_11, 9_0); + StorageMode GetStorageMode() const MTLPP_AVAILABLE(10_11, 9_0); + TextureUsage GetUsage() const MTLPP_AVAILABLE(10_11, 9_0); + + void SetTextureType(TextureType textureType); + void SetPixelFormat(PixelFormat pixelFormat); + void SetWidth(uint32_t width); + void SetHeight(uint32_t height); + void SetDepth(uint32_t depth); + void SetMipmapLevelCount(uint32_t mipmapLevelCount); + void SetSampleCount(uint32_t sampleCount); + void SetArrayLength(uint32_t arrayLength); + void SetResourceOptions(ResourceOptions resourceOptions); + void SetCpuCacheMode(CpuCacheMode cpuCacheMode) MTLPP_AVAILABLE(10_11, 9_0); + void SetStorageMode(StorageMode storageMode) MTLPP_AVAILABLE(10_11, 9_0); + void SetUsage(TextureUsage usage) MTLPP_AVAILABLE(10_11, 9_0); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class Texture : public Resource + { + public: + Texture() { } + Texture(const ns::Handle& handle) : Resource(handle) { } + + Resource GetRootResource() const MTLPP_DEPRECATED(10_11, 10_12, 8_0, 10_0); + Texture GetParentTexture() const MTLPP_AVAILABLE(10_11, 9_0); + uint32_t GetParentRelativeLevel() const MTLPP_AVAILABLE(10_11, 9_0); + uint32_t GetParentRelativeSlice() const MTLPP_AVAILABLE(10_11, 9_0); + Buffer GetBuffer() const MTLPP_AVAILABLE(10_12, 9_0); + uint32_t GetBufferOffset() const MTLPP_AVAILABLE(10_12, 9_0); + uint32_t GetBufferBytesPerRow() const MTLPP_AVAILABLE(10_12, 9_0); + //IOSurfaceRef GetIOSurface() const; + uint32_t GetIOSurfacePlane() const MTLPP_AVAILABLE_MAC(10_11); + TextureType GetTextureType() const; + PixelFormat GetPixelFormat() const; + uint32_t GetWidth() const; + uint32_t GetHeight() const; + uint32_t GetDepth() const; + uint32_t GetMipmapLevelCount() const; + uint32_t GetSampleCount() const; + uint32_t GetArrayLength() const; + TextureUsage GetUsage() const; + bool IsFrameBufferOnly() const; + + void GetBytes(void* pixelBytes, uint32_t bytesPerRow, uint32_t bytesPerImage, const Region& fromRegion, uint32_t mipmapLevel, uint32_t slice); + void Replace(const Region& region, uint32_t mipmapLevel, uint32_t slice, void* pixelBytes, uint32_t bytesPerRow, uint32_t bytesPerImage); + void GetBytes(void* pixelBytes, uint32_t bytesPerRow, const Region& fromRegion, uint32_t mipmapLevel); + void Replace(const Region& region, uint32_t mipmapLevel, void* pixelBytes, uint32_t bytesPerRow); + Texture NewTextureView(PixelFormat pixelFormat); + Texture NewTextureView(PixelFormat pixelFormat, TextureType textureType, const ns::Range& mipmapLevelRange, const ns::Range& sliceRange); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: argument.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "texture.hpp" + +namespace mtlpp +{ + class StructType; + class ArrayType; + + enum class DataType + { + None = 0, + + Struct = 1, + Array = 2, + + Float = 3, + Float2 = 4, + Float3 = 5, + Float4 = 6, + + Float2x2 = 7, + Float2x3 = 8, + Float2x4 = 9, + + Float3x2 = 10, + Float3x3 = 11, + Float3x4 = 12, + + Float4x2 = 13, + Float4x3 = 14, + Float4x4 = 15, + + Half = 16, + Half2 = 17, + Half3 = 18, + Half4 = 19, + + Half2x2 = 20, + Half2x3 = 21, + Half2x4 = 22, + + Half3x2 = 23, + Half3x3 = 24, + Half3x4 = 25, + + Half4x2 = 26, + Half4x3 = 27, + Half4x4 = 28, + + Int = 29, + Int2 = 30, + Int3 = 31, + Int4 = 32, + + UInt = 33, + UInt2 = 34, + UInt3 = 35, + UInt4 = 36, + + Short = 37, + Short2 = 38, + Short3 = 39, + Short4 = 40, + + UShort = 41, + UShort2 = 42, + UShort3 = 43, + UShort4 = 44, + + Char = 45, + Char2 = 46, + Char3 = 47, + Char4 = 48, + + UChar = 49, + UChar2 = 50, + UChar3 = 51, + UChar4 = 52, + + Bool = 53, + Bool2 = 54, + Bool3 = 55, + Bool4 = 56, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class ArgumentType + { + Buffer = 0, + ThreadgroupMemory = 1, + Texture = 2, + Sampler = 3, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class ArgumentAccess + { + ReadOnly = 0, + ReadWrite = 1, + WriteOnly = 2, + } + MTLPP_AVAILABLE(10_11, 8_0); + + class StructMember : public ns::Object + { + public: + StructMember(); + StructMember(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetName() const; + uint32_t GetOffset() const; + DataType GetDataType() const; + + StructType GetStructType() const; + ArrayType GetArrayType() const; + } + MTLPP_AVAILABLE(10_11, 8_0); + + class StructType : public ns::Object + { + public: + StructType(); + StructType(const ns::Handle& handle) : ns::Object(handle) { } + + const ns::Array GetMembers() const; + StructMember GetMember(const ns::String& name) const; + } + MTLPP_AVAILABLE(10_11, 8_0); + + class ArrayType : public ns::Object + { + public: + ArrayType(); + ArrayType(const ns::Handle& handle) : ns::Object(handle) { } + + uint32_t GetArrayLength() const; + DataType GetElementType() const; + uint32_t GetStride() const; + StructType GetElementStructType() const; + ArrayType GetElementArrayType() const; + } + MTLPP_AVAILABLE(10_11, 8_0); + + class Argument : public ns::Object + { + public: + Argument(); + Argument(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetName() const; + ArgumentType GetType() const; + ArgumentAccess GetAccess() const; + uint32_t GetIndex() const; + + bool IsActive() const; + + uint32_t GetBufferAlignment() const; + uint32_t GetBufferDataSize() const; + DataType GetBufferDataType() const; + StructType GetBufferStructType() const; + + uint32_t GetThreadgroupMemoryAlignment() const; + uint32_t GetThreadgroupMemoryDataSize() const; + + TextureType GetTextureType() const; + DataType GetTextureDataType() const; + + bool IsDepthTexture() const MTLPP_AVAILABLE(10_12, 10_0); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + + +////////////////////////////////////// +// FILE: library.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" +// #include "argument.hpp" + +namespace mtlpp +{ + class Device; + class FunctionConstantValues; + + enum class PatchType + { + None = 0, + Triangle = 1, + Quad = 2, + } + MTLPP_AVAILABLE(10_12, 10_0); + + class VertexAttribute : public ns::Object + { + public: + VertexAttribute(); + VertexAttribute(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetName() const; + uint32_t GetAttributeIndex() const; + DataType GetAttributeType() const MTLPP_AVAILABLE(10_11, 8_3); + bool IsActive() const; + bool IsPatchData() const MTLPP_AVAILABLE(10_12, 10_0); + bool IsPatchControlPointData() const MTLPP_AVAILABLE(10_12, 10_0); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class Attribute : public ns::Object + { + public: + Attribute(); + Attribute(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetName() const; + uint32_t GetAttributeIndex() const; + DataType GetAttributeType() const MTLPP_AVAILABLE(10_11, 8_3); + bool IsActive() const; + bool IsPatchData() const MTLPP_AVAILABLE(10_12, 10_0); + bool IsPatchControlPointData() const MTLPP_AVAILABLE(10_12, 10_0); + } + MTLPP_AVAILABLE(10_12, 10_0); + + enum class FunctionType + { + TypeVertex = 1, + TypeFragment = 2, + TypeKernel = 3, + } + MTLPP_AVAILABLE(10_11, 8_0); + + class FunctionConstant : public ns::Object + { + public: + FunctionConstant(); + FunctionConstant(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetName() const; + DataType GetType() const; + uint32_t GetIndex() const; + bool IsRequired() const; + } + MTLPP_AVAILABLE(10_12, 10_0); + + class Function : public ns::Object + { + public: + Function(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetLabel() const MTLPP_AVAILABLE(10_12, 10_0); + Device GetDevice() const; + FunctionType GetFunctionType() const; + PatchType GetPatchType() const MTLPP_AVAILABLE(10_12, 10_0); + int32_t GetPatchControlPointCount() const MTLPP_AVAILABLE(10_12, 10_0); + const ns::Array GetVertexAttributes() const; + const ns::Array GetStageInputAttributes() const MTLPP_AVAILABLE(10_12, 10_0); + ns::String GetName() const; + ns::Dictionary GetFunctionConstants() const MTLPP_AVAILABLE(10_12, 10_0); + + void SetLabel(const ns::String& label) MTLPP_AVAILABLE(10_12, 10_0); + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class LanguageVersion + { + Version1_0 MTLPP_AVAILABLE(NA, 9_0) = (1 << 16), + Version1_1 MTLPP_AVAILABLE(10_11, 9_0) = (1 << 16) + 1, + Version1_2 MTLPP_AVAILABLE(10_12, 10_0) = (1 << 16) + 2, + } + MTLPP_AVAILABLE(10_11, 9_0); + + class CompileOptions : public ns::Object + { + public: + CompileOptions(); + CompileOptions(const ns::Handle& handle) : ns::Object(handle) { } + + ns::Dictionary GetPreprocessorMacros() const; + bool IsFastMathEnabled() const; + LanguageVersion GetLanguageVersion() const MTLPP_AVAILABLE(10_11, 9_0); + + void SetFastMathEnabled(bool fastMathEnabled); + void SetFastMathEnabled(LanguageVersion languageVersion); + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class LibraryError + { + Unsupported = 1, + Internal = 2, + CompileFailure = 3, + CompileWarning = 4, + FunctionNotFound MTLPP_AVAILABLE(10_12, 10_0) = 5, + FileNotFound MTLPP_AVAILABLE(10_12, 10_0) = 6, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class RenderPipelineError + { + Internal = 1, + Unsupported = 2, + InvalidInput = 3, + } + MTLPP_AVAILABLE(10_11, 8_0); + + class Library : public ns::Object + { + public: + Library() { } + Library(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetLabel() const; + Device GetDevice() const; + ns::Array GetFunctionNames() const; + + void SetLabel(const ns::String& label); + + Function NewFunction(const ns::String& functionName); + Function NewFunction(const ns::String& functionName, const FunctionConstantValues& constantValues, ns::Error* error) MTLPP_AVAILABLE(10_12, 10_0); + void NewFunction(const ns::String& functionName, const FunctionConstantValues& constantValues, std::function completionHandler) MTLPP_AVAILABLE(10_12, 10_0); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: device.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "types.hpp" +// #include "pixel_format.hpp" +// #include "resource.hpp" +// #include "library.hpp" + +namespace mtlpp +{ + class CommandQueue; + class Device; + class Buffer; + class DepthStencilState; + class Function; + class Library; + class Texture; + class SamplerState; + class RenderPipelineState; + class ComputePipelineState; + class Heap; + class Fence; + + class SamplerDescriptor; + class RenderPipelineColorAttachmentDescriptor; + class DepthStencilDescriptor; + class TextureDescriptor; + class CompileOptions; + class RenderPipelineDescriptor; + class RenderPassDescriptor; + class RenderPipelineReflection; + class ComputePipelineDescriptor; + class ComputePipelineReflection; + class CommandQueueDescriptor; + class HeapDescriptor; + + enum class FeatureSet + { + iOS_GPUFamily1_v1 MTLPP_AVAILABLE_IOS(8_0) = 0, + iOS_GPUFamily2_v1 MTLPP_AVAILABLE_IOS(8_0) = 1, + + iOS_GPUFamily1_v2 MTLPP_AVAILABLE_IOS(8_0) = 2, + iOS_GPUFamily2_v2 MTLPP_AVAILABLE_IOS(8_0) = 3, + iOS_GPUFamily3_v1 MTLPP_AVAILABLE_IOS(9_0) = 4, + + iOS_GPUFamily1_v3 MTLPP_AVAILABLE_IOS(10_0) = 5, + iOS_GPUFamily2_v3 MTLPP_AVAILABLE_IOS(10_0) = 6, + iOS_GPUFamily3_v2 MTLPP_AVAILABLE_IOS(10_0) = 7, + + OSX_GPUFamily1_v1 MTLPP_AVAILABLE_MAC(8_0) = 10000, + + OSX_GPUFamily1_v2 MTLPP_AVAILABLE_MAC(10_12) = 10001, + OSX_ReadWriteTextureTier2 MTLPP_AVAILABLE_MAC(10_12) = 10002, + + tvOS_GPUFamily1_v1 MTLPP_AVAILABLE_TVOS(9_0) = 30000, + + tvOS_GPUFamily1_v2 MTLPP_AVAILABLE_TVOS(10_0) = 30001, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class PipelineOption + { + None = 0, + ArgumentInfo = 1 << 0, + BufferTypeInfo = 1 << 1, + } + MTLPP_AVAILABLE(10_11, 8_0); + + struct SizeAndAlign + { + uint32_t Size; + uint32_t Align; + }; + + class Device : public ns::Object + { + public: + Device() { } + Device(const ns::Handle& handle) : ns::Object(handle) { } + + static Device CreateSystemDefaultDevice() MTLPP_AVAILABLE(10_11, 8_0); + static ns::Array CopyAllDevices() MTLPP_AVAILABLE(10_11, NA); + + ns::String GetName() const; + Size GetMaxThreadsPerThreadgroup() const MTLPP_AVAILABLE(10_11, 9_0); + bool IsLowPower() const MTLPP_AVAILABLE_MAC(10_11); + bool IsHeadless() const MTLPP_AVAILABLE_MAC(10_11); + uint64_t GetRecommendedMaxWorkingSetSize() const MTLPP_AVAILABLE_MAC(10_12); + bool IsDepth24Stencil8PixelFormatSupported() const MTLPP_AVAILABLE_MAC(10_11); + + CommandQueue NewCommandQueue(); + CommandQueue NewCommandQueue(uint32_t maxCommandBufferCount); + SizeAndAlign HeapTextureSizeAndAlign(const TextureDescriptor& desc) MTLPP_AVAILABLE(NA, 10_0); + SizeAndAlign HeapBufferSizeAndAlign(uint32_t length, ResourceOptions options) MTLPP_AVAILABLE(NA, 10_0); + Heap NewHeap(const HeapDescriptor& descriptor) MTLPP_AVAILABLE(NA, 10_0); + Buffer NewBuffer(uint32_t length, ResourceOptions options); + Buffer NewBuffer(const void* pointer, uint32_t length, ResourceOptions options); + Buffer NewBuffer(void* pointer, uint32_t length, ResourceOptions options, std::function deallocator); + DepthStencilState NewDepthStencilState(const DepthStencilDescriptor& descriptor); + Texture NewTexture(const TextureDescriptor& descriptor); + //- (id )newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor iosurface:(IOSurfaceRef)iosurface plane:(NSUInteger)plane NS_AVAILABLE_MAC(10_11); + SamplerState NewSamplerState(const SamplerDescriptor& descriptor); + Library NewDefaultLibrary(); + //- (nullable id )newDefaultLibraryWithBundle:(NSBundle *)bundle error:(__autoreleasing NSError **)error NS_AVAILABLE(10_12, 10_0); + Library NewLibrary(const ns::String& filepath, ns::Error* error); + Library NewLibrary(const char* source, const CompileOptions& options, ns::Error* error); + void NewLibrary(const char* source, const CompileOptions& options, std::function completionHandler); + RenderPipelineState NewRenderPipelineState(const RenderPipelineDescriptor& descriptor, ns::Error* error); + RenderPipelineState NewRenderPipelineState(const RenderPipelineDescriptor& descriptor, PipelineOption options, RenderPipelineReflection* outReflection, ns::Error* error); + void NewRenderPipelineState(const RenderPipelineDescriptor& descriptor, std::function completionHandler); + void NewRenderPipelineState(const RenderPipelineDescriptor& descriptor, PipelineOption options, std::function completionHandler); + ComputePipelineState NewComputePipelineState(const Function& computeFunction, ns::Error* error); + ComputePipelineState NewComputePipelineState(const Function& computeFunction, PipelineOption options, ComputePipelineReflection& outReflection, ns::Error* error); + void NewComputePipelineState(const Function& computeFunction, std::function completionHandler); + void NewComputePipelineState(const Function& computeFunction, PipelineOption options, std::function completionHandler); + ComputePipelineState NewComputePipelineState(const ComputePipelineDescriptor& descriptor, PipelineOption options, ComputePipelineReflection* outReflection, ns::Error* error); + void NewComputePipelineState(const ComputePipelineDescriptor& descriptor, PipelineOption options, std::function completionHandler) MTLPP_AVAILABLE(10_11, 9_0); + Fence NewFence() MTLPP_AVAILABLE(NA, 10_0); + bool SupportsFeatureSet(FeatureSet featureSet) const; + bool SupportsTextureSampleCount(uint32_t sampleCount) const MTLPP_AVAILABLE(10_11, 9_0); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: fence.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" +// #include "device.hpp" + + +namespace mtlpp +{ + class Fence : public ns::Object + { + public: + Fence(const ns::Handle& handle) : ns::Object(handle) { } + + Texture GetDevice() const; + ns::String GetLabel() const; + + void SetLabel(const ns::String& label); + } + MTLPP_AVAILABLE(NA, 10_0); +} + +////////////////////////////////////// +// FILE: blit_command_encoder.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "command_encoder.hpp" +// #include "buffer.hpp" +// #include "texture.hpp" +// #include "fence.hpp" + +namespace mtlpp +{ + enum class BlitOption + { + None = 0, + DepthFromDepthStencil = 1 << 0, + StencilFromDepthStencil = 1 << 1, + RowLinearPVRTC MTLPP_AVAILABLE_IOS(9_0) = 1 << 2, + } + MTLPP_AVAILABLE(10_11, 9_0); + + class BlitCommandEncoder : public ns::Object + { + public: + BlitCommandEncoder() { } + BlitCommandEncoder(const ns::Handle& handle) : ns::Object(handle) { } + + void Synchronize(const Resource& resource) MTLPP_AVAILABLE_MAC(10_11); + void Synchronize(const Texture& texture, uint32_t slice, uint32_t level) MTLPP_AVAILABLE_MAC(10_11); + void Copy(const Texture& sourceTexture, uint32_t sourceSlice, uint32_t sourceLevel, const Origin& sourceOrigin, const Size& sourceSize, const Texture& destinationTexture, uint32_t destinationSlice, uint32_t destinationLevel, const Origin& destinationOrigin); + void Copy(const Buffer& sourceBuffer, uint32_t sourceOffset, uint32_t sourceBytesPerRow, uint32_t sourceBytesPerImage, const Size& sourceSize, const Texture& destinationTexture, uint32_t destinationSlice, uint32_t destinationLevel, const Origin& destinationOrigin); + void Copy(const Buffer& sourceBuffer, uint32_t sourceOffset, uint32_t sourceBytesPerRow, uint32_t sourceBytesPerImage, const Size& sourceSize, const Texture& destinationTexture, uint32_t destinationSlice, uint32_t destinationLevel, const Origin& destinationOrigin, BlitOption options); + void Copy(const Texture& sourceTexture, uint32_t sourceSlice, uint32_t sourceLevel, const Origin& sourceOrigin, const Size& sourceSize, const Buffer& destinationBuffer, uint32_t destinationOffset, uint32_t destinationBytesPerRow, uint32_t destinationBytesPerImage); + void Copy(const Texture& sourceTexture, uint32_t sourceSlice, uint32_t sourceLevel, const Origin& sourceOrigin, const Size& sourceSize, const Buffer& destinationBuffer, uint32_t destinationOffset, uint32_t destinationBytesPerRow, uint32_t destinationBytesPerImage, BlitOption options); + void Copy(const Buffer& sourceBuffer, uint32_t soruceOffset, const Buffer& destinationBuffer, uint32_t destinationOffset, uint32_t size); + void GenerateMipmaps(const Texture& texture); + void Fill(const Buffer& buffer, const ns::Range& range, uint8_t value); + void UpdateFence(const Fence& fence) MTLPP_AVAILABLE_IOS(10_0); + void WaitForFence(const Fence& fence) MTLPP_AVAILABLE_IOS(10_0); + }; +} + +////////////////////////////////////// +// FILE: command_buffer.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" + +namespace mtlpp +{ + class Device; + class CommandQueue; + class BlitCommandEncoder; + class RenderCommandEncoder; + class ParallelRenderCommandEncoder; + class ComputeCommandEncoder; + class CommandQueue; + class Drawable; + class RenderPassDescriptor; + + enum class CommandBufferStatus + { + NotEnqueued = 0, + Enqueued = 1, + Committed = 2, + Scheduled = 3, + Completed = 4, + Error = 5, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class CommandBufferError + { + None = 0, + Internal = 1, + Timeout = 2, + PageFault = 3, + Blacklisted = 4, + NotPermitted = 7, + OutOfMemory = 8, + InvalidResource = 9, + Memoryless MTLPP_AVAILABLE_IOS(10_0) = 10, + } + MTLPP_AVAILABLE(10_11, 8_0); + + class CommandBuffer : public ns::Object + { + public: + CommandBuffer() { } + CommandBuffer(const ns::Handle& handle) : ns::Object(handle) { } + + Device GetDevice() const; + CommandQueue GetCommandQueue() const; + bool GetRetainedReferences() const; + ns::String GetLabel() const; + CommandBufferStatus GetStatus() const; + ns::Error GetError() const; + + void SetLabel(const ns::String& label); + + void Enqueue(); + void Commit(); + void AddScheduledHandler(std::function handler); + void AddCompletedHandler(std::function handler); + void Present(const Drawable& drawable); + void Present(const Drawable& drawable, double presentationTime); + void WaitUntilScheduled(); + void WaitUntilCompleted(); + BlitCommandEncoder BlitCommandEncoder(); + RenderCommandEncoder RenderCommandEncoder(const RenderPassDescriptor& renderPassDescriptor); + ComputeCommandEncoder ComputeCommandEncoder(); + ParallelRenderCommandEncoder ParallelRenderCommandEncoder(const RenderPassDescriptor& renderPassDescriptor); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: compute_command_encoder.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" +// #include "command_encoder.hpp" +// #include "texture.hpp" +// #include "command_buffer.hpp" +// #include "fence.hpp" + +namespace mtlpp +{ + class ComputeCommandEncoder : public CommandEncoder + { + public: + ComputeCommandEncoder() { } + ComputeCommandEncoder(const ns::Handle& handle) : CommandEncoder(handle) { } + + void SetComputePipelineState(const ComputePipelineState& state); + void SetBytes(const void* data, uint32_t length, uint32_t index); + void SetBuffer(const Buffer& buffer, uint32_t offset, uint32_t index); + void SetBufferOffset(uint32_t offset, uint32_t index) MTLPP_AVAILABLE(10_11, 8_3); + void SetBuffers(const Buffer* buffers, const uint32_t* offsets, const ns::Range& range); + void SetTexture(const Texture& texture, uint32_t index); + void SetTextures(const Texture* textures, const ns::Range& range); + void SetSamplerState(const SamplerState& sampler, uint32_t index); + void SetSamplerStates(const SamplerState* samplers, const ns::Range& range); + void SetSamplerState(const SamplerState& sampler, float lodMinClamp, float lodMaxClamp, uint32_t index); + void SetSamplerStates(const SamplerState* samplers, const float* lodMinClamps, const float* lodMaxClamps, const ns::Range& range); + void SetThreadgroupMemory(uint32_t length, uint32_t index); + void SetStageInRegion(const Region& region) MTLPP_AVAILABLE(10_12, 10_0); + void DispatchThreadgroups(const Size& threadgroupsPerGrid, const Size& threadsPerThreadgroup); + void DispatchThreadgroupsWithIndirectBuffer(const Buffer& indirectBuffer, uint32_t indirectBufferOffset, const Size& threadsPerThreadgroup); + void UpdateFence(const Fence& fence) MTLPP_AVAILABLE_IOS(10_0); + void WaitForFence(const Fence& fence) MTLPP_AVAILABLE_IOS(10_0); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: command_queue.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" + +namespace mtlpp +{ + class Device; + class CommandBuffer; + + class CommandQueue : public ns::Object + { + public: + CommandQueue() { } + CommandQueue(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetLabel() const; + Device GetDevice() const; + + void SetLabel(const ns::String& label); + + class CommandBuffer CommandBufferWithUnretainedReferences(); + class CommandBuffer CommandBuffer(); + void InsertDebugCaptureBoundary(); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: depth_stencil.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" +// #include "device.hpp" + +namespace mtlpp +{ + enum class CompareFunction + { + Never = 0, + Less = 1, + Equal = 2, + LessEqual = 3, + Greater = 4, + NotEqual = 5, + GreaterEqual = 6, + Always = 7, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class StencilOperation + { + Keep = 0, + Zero = 1, + Replace = 2, + IncrementClamp = 3, + DecrementClamp = 4, + Invert = 5, + IncrementWrap = 6, + DecrementWrap = 7, + } + MTLPP_AVAILABLE(10_11, 8_0); + + class StencilDescriptor : public ns::Object + { + public: + StencilDescriptor(); + StencilDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + CompareFunction GetStencilCompareFunction() const; + StencilOperation GetStencilFailureOperation() const; + StencilOperation GetDepthFailureOperation() const; + StencilOperation GetDepthStencilPassOperation() const; + uint32_t GetReadMask() const; + uint32_t GetWriteMask() const; + + void SetStencilCompareFunction(CompareFunction stencilCompareFunction); + void SetStencilFailureOperation(StencilOperation stencilFailureOperation); + void SetDepthFailureOperation(StencilOperation depthFailureOperation); + void SetDepthStencilPassOperation(StencilOperation depthStencilPassOperation); + void SetReadMask(uint32_t readMask); + void SetWriteMask(uint32_t writeMask); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class DepthStencilDescriptor : public ns::Object + { + public: + DepthStencilDescriptor(); + DepthStencilDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + CompareFunction GetDepthCompareFunction() const; + bool IsDepthWriteEnabled() const; + StencilDescriptor GetFrontFaceStencil() const; + StencilDescriptor GetBackFaceStencil() const; + ns::String GetLabel() const; + + void SetDepthCompareFunction(CompareFunction depthCompareFunction) const; + void SetDepthWriteEnabled(bool depthWriteEnabled) const; + void SetFrontFaceStencil(const StencilDescriptor& frontFaceStencil) const; + void SetBackFaceStencil(const StencilDescriptor& backFaceStencil) const; + void SetLabel(const ns::String& label) const; + } + MTLPP_AVAILABLE(10_11, 8_0); + + class DepthStencilState : public ns::Object + { + public: + DepthStencilState() { } + DepthStencilState(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetLabel() const; + Device GetDevice() const; + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: drawable.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" + +namespace mtlpp +{ + class Drawable : public ns::Object + { + public: + Drawable() { } + Drawable(const ns::Handle& handle) : ns::Object(handle) { } + + void Present(); + void Present(double presentationTime); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + + +////////////////////////////////////// +// FILE: render_pass.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" + +namespace mtlpp +{ + class Texture; + class Buffer; + + enum class LoadAction + { + DontCare = 0, + Load = 1, + Clear = 2, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class StoreAction + { + DontCare = 0, + Store = 1, + MultisampleResolve = 2, + StoreAndMultisampleResolve MTLPP_AVAILABLE(10_12,10_0) = 3, + Unknown MTLPP_AVAILABLE(10_12,10_0) = 4, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class MultisampleDepthResolveFilter + { + Sample0 = 0, + Min = 1, + Max = 2, + } + MTLPP_AVAILABLE_IOS(9_0); + + struct ClearColor + { + ClearColor(double red, double green, double blue, double alpha) : + Red(red), + Green(green), + Blue(blue), + Alpha(alpha) { } + + double Red; + double Green; + double Blue; + double Alpha; + }; + + class RenderPassAttachmentDescriptor : public ns::Object + { + public: + RenderPassAttachmentDescriptor(); + RenderPassAttachmentDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + Texture GetTexture() const; + uint32_t GetLevel() const; + uint32_t GetSlice() const; + uint32_t GetDepthPlane() const; + Texture GetResolveTexture() const; + uint32_t GetResolveLevel() const; + uint32_t GetResolveSlice() const; + uint32_t GetResolveDepthPlane() const; + LoadAction GetLoadAction() const; + StoreAction GetStoreAction() const; + + void SetTexture(const Texture& texture); + void SetLevel(uint32_t level); + void SetSlice(uint32_t slice); + void SetDepthPlane(uint32_t depthPlane); + void SetResolveTexture(const Texture& texture); + void SetResolveLevel(uint32_t resolveLevel); + void SetResolveSlice(uint32_t resolveSlice); + void SetResolveDepthPlane(uint32_t resolveDepthPlane); + void SetLoadAction(LoadAction loadAction); + void SetStoreAction(StoreAction storeAction); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class RenderPassColorAttachmentDescriptor : public RenderPassAttachmentDescriptor + { + public: + RenderPassColorAttachmentDescriptor(); + RenderPassColorAttachmentDescriptor(const ns::Handle& handle) : RenderPassAttachmentDescriptor(handle) { } + + ClearColor GetClearColor() const; + + void SetClearColor(const ClearColor& clearColor); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class RenderPassDepthAttachmentDescriptor : public RenderPassAttachmentDescriptor + { + public: + RenderPassDepthAttachmentDescriptor(); + RenderPassDepthAttachmentDescriptor(const ns::Handle& handle) : RenderPassAttachmentDescriptor(handle) { } + + double GetClearDepth() const; + MultisampleDepthResolveFilter GetDepthResolveFilter() const MTLPP_AVAILABLE_IOS(9_0); + + void SetClearDepth(double clearDepth); + void SetDepthResolveFilter(MultisampleDepthResolveFilter depthResolveFilter) MTLPP_AVAILABLE_IOS(9_0); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class RenderPassStencilAttachmentDescriptor : public RenderPassAttachmentDescriptor + { + public: + RenderPassStencilAttachmentDescriptor(); + RenderPassStencilAttachmentDescriptor(const ns::Handle& handle) : RenderPassAttachmentDescriptor(handle) { } + + uint32_t GetClearStencil() const; + + void SetClearStencil(uint32_t clearStencil); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class RenderPassDescriptor : public ns::Object + { + public: + RenderPassDescriptor(); + RenderPassDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + ns::Array GetColorAttachments() const; + RenderPassDepthAttachmentDescriptor GetDepthAttachment() const; + RenderPassStencilAttachmentDescriptor GetStencilAttachment() const; + Buffer GetVisibilityResultBuffer() const; + uint32_t GetRenderTargetArrayLength() const MTLPP_AVAILABLE_MAC(10_11); + + void SetDepthAttachment(const RenderPassDepthAttachmentDescriptor& depthAttachment); + void SetStencilAttachment(const RenderPassStencilAttachmentDescriptor& stencilAttachment); + void SetVisibilityResultBuffer(const Buffer& visibilityResultBuffer); + void SetRenderTargetArrayLength(uint32_t renderTargetArrayLength) MTLPP_AVAILABLE_MAC(10_11); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: stage_input_output_descriptor.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "device.hpp" + +namespace mtlpp +{ + enum class AttributeFormat + { + Invalid = 0, + + UChar2 = 1, + UChar3 = 2, + UChar4 = 3, + + Char2 = 4, + Char3 = 5, + Char4 = 6, + + UChar2Normalized = 7, + UChar3Normalized = 8, + UChar4Normalized = 9, + + Char2Normalized = 10, + Char3Normalized = 11, + Char4Normalized = 12, + + UShort2 = 13, + UShort3 = 14, + UShort4 = 15, + + Short2 = 16, + Short3 = 17, + Short4 = 18, + + UShort2Normalized = 19, + UShort3Normalized = 20, + UShort4Normalized = 21, + + Short2Normalized = 22, + Short3Normalized = 23, + Short4Normalized = 24, + + Half2 = 25, + Half3 = 26, + Half4 = 27, + + Float = 28, + Float2 = 29, + Float3 = 30, + Float4 = 31, + + Int = 32, + Int2 = 33, + Int3 = 34, + Int4 = 35, + + UInt = 36, + UInt2 = 37, + UInt3 = 38, + UInt4 = 39, + + Int1010102Normalized = 40, + UInt1010102Normalized = 41, + } + MTLPP_AVAILABLE(10_12, 10_0); + + enum class IndexType + { + UInt16 = 0, + UInt32 = 1, + } + MTLPP_AVAILABLE(10_11, 8_0); + + + enum class StepFunction + { + Constant = 0, + + PerVertex = 1, + PerInstance = 2, + PerPatch MTLPP_AVAILABLE(10_12, 10_0) = 3, + PerPatchControlPoint MTLPP_AVAILABLE(10_12, 10_0) = 4, + + ThreadPositionInGridX = 5, + ThreadPositionInGridY = 6, + ThreadPositionInGridXIndexed = 7, + ThreadPositionInGridYIndexed = 8, + } + MTLPP_AVAILABLE(10_12, 10_0); + + class BufferLayoutDescriptor : public ns::Object + { + public: + BufferLayoutDescriptor(); + BufferLayoutDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + uint32_t GetStride() const; + StepFunction GetStepFunction() const; + uint32_t GetStepRate() const; + + void SetStride(uint32_t stride); + void SetStepFunction(StepFunction stepFunction); + void SetStepRate(uint32_t stepRate); + } + MTLPP_AVAILABLE(10_12, 10_0); + + class AttributeDescriptor : public ns::Object + { + public: + AttributeDescriptor(); + AttributeDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + AttributeFormat GetFormat() const; + uint32_t GetOffset() const; + uint32_t GetBufferIndex() const; + + void SetFormat(AttributeFormat format); + void SetOffset(uint32_t offset); + void SetBufferIndex(uint32_t bufferIndex); + } + MTLPP_AVAILABLE(10_12, 10_0); + + class StageInputOutputDescriptor : public ns::Object + { + public: + StageInputOutputDescriptor(); + StageInputOutputDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + + ns::Array GetLayouts() const; + ns::Array GetAttributes() const; + IndexType GetIndexType() const; + uint32_t GetIndexBufferIndex() const; + + void SetIndexType(IndexType indexType); + void SetIndexBufferIndex(uint32_t indexBufferIndex); + + void Reset(); + } + MTLPP_AVAILABLE(10_12, 10_0); +} + +////////////////////////////////////// +// FILE: compute_pipeline.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "device.hpp" +// #include "argument.hpp" +// #include "stage_input_output_descriptor.hpp" + +namespace mtlpp +{ + class ComputePipelineReflection : public ns::Object + { + public: + ComputePipelineReflection(); + ComputePipelineReflection(const ns::Handle& handle) : ns::Object(handle) { } + + ns::Array GetArguments() const; + } + MTLPP_AVAILABLE(10_11, 9_0); + + class ComputePipelineDescriptor : public ns::Object + { + public: + ComputePipelineDescriptor(); + ComputePipelineDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetLabel() const; + Function GetComputeFunction() const; + bool GetThreadGroupSizeIsMultipleOfThreadExecutionWidth() const; + StageInputOutputDescriptor GetStageInputDescriptor() const MTLPP_AVAILABLE(10_12, 10_0); + + void SetLabel(const ns::String& label); + void SetComputeFunction(const Function& function); + void SetThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool value); + void SetStageInputDescriptor(const StageInputOutputDescriptor& stageInputDescriptor) const MTLPP_AVAILABLE(10_12, 10_0); + + void Reset(); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class ComputePipelineState : public ns::Object + { + public: + ComputePipelineState() { } + ComputePipelineState(const ns::Handle& handle) : ns::Object(handle) { } + + Device GetDevice() const; + uint32_t GetMaxTotalThreadsPerThreadgroup() const; + uint32_t GetThreadExecutionWidth() const; + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: render_command_encoder.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "command_encoder.hpp" +// #include "command_buffer.hpp" +// #include "render_pass.hpp" +// #include "fence.hpp" +// #include "stage_input_output_descriptor.hpp" + +namespace mtlpp +{ + enum class PrimitiveType + { + Point = 0, + Line = 1, + LineStrip = 2, + Triangle = 3, + TriangleStrip = 4, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class VisibilityResultMode + { + Disabled = 0, + Boolean = 1, + Counting MTLPP_AVAILABLE(10_11, 9_0) = 2, + } + MTLPP_AVAILABLE(10_11, 8_0); + + struct ScissorRect + { + uint32_t X; + uint32_t Y; + uint32_t Width; + uint32_t Height; + }; + + struct Viewport + { + double OriginX; + double OriginY; + double Width; + double Height; + double ZNear; + double ZFar; + }; + + enum class CullMode + { + None = 0, + Front = 1, + Back = 2, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class Winding + { + Clockwise = 0, + CounterClockwise = 1, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class DepthClipMode + { + Clip = 0, + Clamp = 1, + } + MTLPP_AVAILABLE(10_11, 9_0); + + enum class TriangleFillMode + { + Fill = 0, + Lines = 1, + } + MTLPP_AVAILABLE(10_11, 8_0); + + struct DrawPrimitivesIndirectArguments + { + uint32_t VertexCount; + uint32_t InstanceCount; + uint32_t VertexStart; + uint32_t BaseInstance; + }; + + struct DrawIndexedPrimitivesIndirectArguments + { + uint32_t IndexCount; + uint32_t InstanceCount; + uint32_t IndexStart; + int32_t BaseVertex; + uint32_t BaseInstance; + }; + + struct DrawPatchIndirectArguments + { + uint32_t PatchCount; + uint32_t InstanceCount; + uint32_t PatchStart; + uint32_t BaseInstance; + }; + + struct QuadTessellationFactorsHalf + { + uint16_t EdgeTessellationFactor[4]; + uint16_t InsideTessellationFactor[2]; + }; + + struct riangleTessellationFactorsHalf + { + uint16_t EdgeTessellationFactor[3]; + uint16_t InsideTessellationFactor; + }; + + enum class RenderStages + { + Vertex = (1 << 0), + Fragment = (1 << 1), + } + MTLPP_AVAILABLE_IOS(10_0); + + + class RenderCommandEncoder : public CommandEncoder + { + public: + RenderCommandEncoder() { } + RenderCommandEncoder(const ns::Handle& handle) : CommandEncoder(handle) { } + + void SetRenderPipelineState(const RenderPipelineState& pipelineState); + void SetVertexData(const void* bytes, uint32_t length, uint32_t index) MTLPP_AVAILABLE(10_11, 8_3); + void SetVertexBuffer(const Buffer& buffer, uint32_t offset, uint32_t index); + void SetVertexBufferOffset(uint32_t offset, uint32_t index) MTLPP_AVAILABLE(10_11, 8_3); + void SetVertexBuffers(const Buffer* buffers, const uint32_t* offsets, const ns::Range& range); + void SetVertexTexture(const Texture& texture, uint32_t index); + void SetVertexTextures(const Texture* textures, const ns::Range& range); + void SetVertexSamplerState(const SamplerState& sampler, uint32_t index); + void SetVertexSamplerStates(const SamplerState* samplers, const ns::Range& range); + void SetVertexSamplerState(const SamplerState& sampler, float lodMinClamp, float lodMaxClamp, uint32_t index); + void SetVertexSamplerStates(const SamplerState* samplers, const float* lodMinClamps, const float* lodMaxClamps, const ns::Range& range); + void SetViewport(const Viewport& viewport); + void SetFrontFacingWinding(Winding frontFacingWinding); + void SetCullMode(CullMode cullMode); + void SetDepthClipMode(DepthClipMode depthClipMode) MTLPP_AVAILABLE(10_11, NA); + void SetDepthBias(float depthBias, float slopeScale, float clamp); + void SetScissorRect(const ScissorRect& rect); + void SetTriangleFillMode(TriangleFillMode fillMode); + void SetFragmentData(const void* bytes, uint32_t length, uint32_t index); + void SetFragmentBuffer(const Buffer& buffer, uint32_t offset, uint32_t index); + void SetFragmentBufferOffset(uint32_t offset, uint32_t index) MTLPP_AVAILABLE(10_11, 8_3); + void SetFragmentBuffers(const Buffer* buffers, const uint32_t* offsets, const ns::Range& range); + void SetFragmentTexture(const Texture& texture, uint32_t index); + void SetFragmentTextures(const Texture* textures, const ns::Range& range); + void SetFragmentSamplerState(const SamplerState& sampler, uint32_t index); + void SetFragmentSamplerStates(const SamplerState* samplers, const ns::Range& range); + void SetFragmentSamplerState(const SamplerState& sampler, float lodMinClamp, float lodMaxClamp, uint32_t index); + void SetFragmentSamplerStates(const SamplerState* samplers, const float* lodMinClamps, const float* lodMaxClamps, const ns::Range& range); + void SetBlendColor(float red, float green, float blue, float alpha); + void SetDepthStencilState(const DepthStencilState& depthStencilState); + void SetStencilReferenceValue(uint32_t referenceValue); + void SetStencilReferenceValue(uint32_t frontReferenceValue, uint32_t backReferenceValue); + void SetVisibilityResultMode(VisibilityResultMode mode, uint32_t offset); + void SetColorStoreAction(StoreAction storeAction, uint32_t colorAttachmentIndex) MTLPP_AVAILABLE(10_12, 10_0); + void SetDepthStoreAction(StoreAction storeAction) MTLPP_AVAILABLE(10_12, 10_0); + void SetStencilStoreAction(StoreAction storeAction) MTLPP_AVAILABLE(10_12, 10_0); + void Draw(PrimitiveType primitiveType, uint32_t vertexStart, uint32_t vertexCount); + void Draw(PrimitiveType primitiveType, uint32_t vertexStart, uint32_t vertexCount, uint32_t instanceCount) MTLPP_AVAILABLE(10_11, 9_0); + void Draw(PrimitiveType primitiveType, uint32_t vertexStart, uint32_t vertexCount, uint32_t instanceCount, uint32_t baseInstance) MTLPP_AVAILABLE(10_11, 9_0); + void Draw(PrimitiveType primitiveType, Buffer indirectBuffer, uint32_t indirectBufferOffset); + void DrawIndexed(PrimitiveType primitiveType, uint32_t indexCount, IndexType indexType, const Buffer& indexBuffer, uint32_t indexBufferOffset); + void DrawIndexed(PrimitiveType primitiveType, uint32_t indexCount, IndexType indexType, const Buffer& indexBuffer, uint32_t indexBufferOffset, uint32_t instanceCount) MTLPP_AVAILABLE(10_11, 9_0); + void DrawIndexed(PrimitiveType primitiveType, uint32_t indexCount, IndexType indexType, const Buffer& indexBuffer, uint32_t indexBufferOffset, uint32_t instanceCount, uint32_t baseVertex, uint32_t baseInstance) MTLPP_AVAILABLE(10_11, 9_0); + void DrawIndexed(PrimitiveType primitiveType, IndexType indexType, const Buffer& indexBuffer, uint32_t indexBufferOffset, const Buffer& indirectBuffer, uint32_t indirectBufferOffset); + void TextureBarrier() MTLPP_AVAILABLE_MAC(10_11); + void UpdateFence(const Fence& fence, RenderStages afterStages) MTLPP_AVAILABLE_IOS(10_0); + void WaitForFence(const Fence& fence, RenderStages beforeStages) MTLPP_AVAILABLE_IOS(10_0); + void SetTessellationFactorBuffer(const Buffer& buffer, uint32_t offset, uint32_t instanceStride) MTLPP_AVAILABLE(10_12, 10_0); + void SetTessellationFactorScale(float scale) MTLPP_AVAILABLE(10_12, 10_0); + void DrawPatches(uint32_t numberOfPatchControlPoints, uint32_t patchStart, uint32_t patchCount, const Buffer& patchIndexBuffer, uint32_t patchIndexBufferOffset, uint32_t instanceCount, uint32_t baseInstance) MTLPP_AVAILABLE(10_12, 10_0); + void DrawPatches(uint32_t numberOfPatchControlPoints, const Buffer& patchIndexBuffer, uint32_t patchIndexBufferOffset, const Buffer& indirectBuffer, uint32_t indirectBufferOffset) MTLPP_AVAILABLE(10_12, NA); + void DrawIndexedPatches(uint32_t numberOfPatchControlPoints, uint32_t patchStart, uint32_t patchCount, const Buffer& patchIndexBuffer, uint32_t patchIndexBufferOffset, const Buffer& controlPointIndexBuffer, uint32_t controlPointIndexBufferOffset, uint32_t instanceCount, uint32_t baseInstance) MTLPP_AVAILABLE(10_12, 10_0); + void DrawIndexedPatches(uint32_t numberOfPatchControlPoints, const Buffer& patchIndexBuffer, uint32_t patchIndexBufferOffset, const Buffer& controlPointIndexBuffer, uint32_t controlPointIndexBufferOffset, const Buffer& indirectBuffer, uint32_t indirectBufferOffset) MTLPP_AVAILABLE(10_12, NA); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + + +////////////////////////////////////// +// FILE: function_constant_values.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" +// #include "argument.hpp" + +namespace mtlpp +{ + class FunctionConstantValues : public ns::Object + { + public: + FunctionConstantValues(); + FunctionConstantValues(const ns::Handle& handle) : ns::Object(handle) { } + + void SetConstantValue(const void* value, DataType type, uint32_t index); + void SetConstantValue(const void* value, DataType type, const ns::String& name); + void SetConstantValues(const void* value, DataType type, const ns::Range& range); + + void Reset(); + } + MTLPP_AVAILABLE(10_12, 10_0); +} + +////////////////////////////////////// +// FILE: render_pipeline.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "device.hpp" +// #include "render_command_encoder.hpp" +// #include "render_pass.hpp" +// #include "pixel_format.hpp" +// #include "argument.hpp" +// #include "function_constant_values.hpp" + +namespace mtlpp +{ + class VertexDescriptor; + + enum class BlendFactor + { + Zero = 0, + One = 1, + SourceColor = 2, + OneMinusSourceColor = 3, + SourceAlpha = 4, + OneMinusSourceAlpha = 5, + DestinationColor = 6, + OneMinusDestinationColor = 7, + DestinationAlpha = 8, + OneMinusDestinationAlpha = 9, + SourceAlphaSaturated = 10, + BlendColor = 11, + OneMinusBlendColor = 12, + BlendAlpha = 13, + OneMinusBlendAlpha = 14, + Source1Color MTLPP_AVAILABLE_MAC(10_12) = 15, + OneMinusSource1Color MTLPP_AVAILABLE_MAC(10_12) = 16, + Source1Alpha MTLPP_AVAILABLE_MAC(10_12) = 17, + OneMinusSource1Alpha MTLPP_AVAILABLE_MAC(10_12) = 18, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class BlendOperation + { + Add = 0, + Subtract = 1, + ReverseSubtract = 2, + Min = 3, + Max = 4, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class ColorWriteMask + { + None = 0, + Red = 0x1 << 3, + Green = 0x1 << 2, + Blue = 0x1 << 1, + Alpha = 0x1 << 0, + All = 0xf + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class PrimitiveTopologyClass + { + Unspecified = 0, + Point = 1, + Line = 2, + Triangle = 3, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class TessellationPartitionMode + { + ModePow2 = 0, + ModeInteger = 1, + ModeFractionalOdd = 2, + ModeFractionalEven = 3, + } + MTLPP_AVAILABLE(10_12, 10_0); + + enum class TessellationFactorStepFunction + { + Constant = 0, + PerPatch = 1, + PerInstance = 2, + PerPatchAndPerInstance = 3, + } + MTLPP_AVAILABLE(10_12, 10_0); + + enum class TessellationFactorFormat + { + Half = 0, + } + MTLPP_AVAILABLE(10_12, 10_0); + + enum class TessellationControlPointIndexType + { + None = 0, + UInt16 = 1, + UInt32 = 2, + } + MTLPP_AVAILABLE(10_12, 10_0); + + class RenderPipelineColorAttachmentDescriptor : public ns::Object + { + public: + RenderPipelineColorAttachmentDescriptor(); + RenderPipelineColorAttachmentDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + PixelFormat GetPixelFormat() const; + bool IsBlendingEnabled() const; + BlendFactor GetSourceRgbBlendFactor() const; + BlendFactor GetDestinationRgbBlendFactor() const; + BlendOperation GetRgbBlendOperation() const; + BlendFactor GetSourceAlphaBlendFactor() const; + BlendFactor GetDestinationAlphaBlendFactor() const; + BlendOperation GetAlphaBlendOperation() const; + ColorWriteMask GetWriteMask() const; + + void SetPixelFormat(PixelFormat pixelFormat); + void SetBlendingEnabled(bool blendingEnabled); + void SetSourceRgbBlendFactor(BlendFactor sourceRgbBlendFactor); + void SetDestinationRgbBlendFactor(BlendFactor destinationRgbBlendFactor); + void SetRgbBlendOperation(BlendOperation rgbBlendOperation); + void SetSourceAlphaBlendFactor(BlendFactor sourceAlphaBlendFactor); + void SetDestinationAlphaBlendFactor(BlendFactor destinationAlphaBlendFactor); + void SetAlphaBlendOperation(BlendOperation alphaBlendOperation); + void SetWriteMask(ColorWriteMask writeMask); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class RenderPipelineReflection : public ns::Object + { + public: + RenderPipelineReflection(); + RenderPipelineReflection(const ns::Handle& handle) : ns::Object(handle) { } + + const ns::Array GetVertexArguments() const; + const ns::Array GetFragmentArguments() const; + } + MTLPP_AVAILABLE(10_11, 8_0); + + class RenderPipelineDescriptor : public ns::Object + { + public: + RenderPipelineDescriptor(); + RenderPipelineDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetLabel() const; + Function GetVertexFunction() const; + Function GetFragmentFunction() const; + VertexDescriptor GetVertexDescriptor() const; + uint32_t GetSampleCount() const; + bool IsAlphaToCoverageEnabled() const; + bool IsAlphaToOneEnabled() const; + bool IsRasterizationEnabled() const; + ns::Array GetColorAttachments() const; + PixelFormat GetDepthAttachmentPixelFormat() const; + PixelFormat GetStencilAttachmentPixelFormat() const; + PrimitiveTopologyClass GetInputPrimitiveTopology() const MTLPP_AVAILABLE_MAC(10_11); + TessellationPartitionMode GetTessellationPartitionMode() const MTLPP_AVAILABLE(10_12, 10_0); + uint32_t GetMaxTessellationFactor() const MTLPP_AVAILABLE(10_12, 10_0); + bool IsTessellationFactorScaleEnabled() const MTLPP_AVAILABLE(10_12, 10_0); + TessellationFactorFormat GetTessellationFactorFormat() const MTLPP_AVAILABLE(10_12, 10_0); + TessellationControlPointIndexType GetTessellationControlPointIndexType() const MTLPP_AVAILABLE(10_12, 10_0); + TessellationFactorStepFunction GetTessellationFactorStepFunction() const MTLPP_AVAILABLE(10_12, 10_0); + Winding GetTessellationOutputWindingOrder() const MTLPP_AVAILABLE(10_12, 10_0); + + + void SetLabel(const ns::String& label); + void SetVertexFunction(const Function& vertexFunction); + void SetFragmentFunction(const Function& fragmentFunction); + void SetVertexDescriptor(const VertexDescriptor& vertexDescriptor); + void SetSampleCount(uint32_t sampleCount); + void SetAlphaToCoverageEnabled(bool alphaToCoverageEnabled); + void SetAlphaToOneEnabled(bool alphaToOneEnabled); + void SetRasterizationEnabled(bool rasterizationEnabled); + void SetDepthAttachmentPixelFormat(PixelFormat depthAttachmentPixelFormat); + void SetStencilAttachmentPixelFormat(PixelFormat stencilAttachmentPixelFormat); + void SetInputPrimitiveTopology(PrimitiveTopologyClass inputPrimitiveTopology) MTLPP_AVAILABLE_MAC(10_11); + void SetTessellationPartitionMode(TessellationPartitionMode tessellationPartitionMode) MTLPP_AVAILABLE(10_12, 10_0); + void SetMaxTessellationFactor(uint32_t maxTessellationFactor) MTLPP_AVAILABLE(10_12, 10_0); + void SetTessellationFactorScaleEnabled(bool tessellationFactorScaleEnabled) MTLPP_AVAILABLE(10_12, 10_0); + void SetTessellationFactorFormat(TessellationFactorFormat tessellationFactorFormat) MTLPP_AVAILABLE(10_12, 10_0); + void SetTessellationControlPointIndexType(TessellationControlPointIndexType tessellationControlPointIndexType) MTLPP_AVAILABLE(10_12, 10_0); + void SetTessellationFactorStepFunction(TessellationFactorStepFunction tessellationFactorStepFunction) MTLPP_AVAILABLE(10_12, 10_0); + void SetTessellationOutputWindingOrder(Winding tessellationOutputWindingOrder) MTLPP_AVAILABLE(10_12, 10_0); + + void Reset(); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class RenderPipelineState : public ns::Object + { + public: + RenderPipelineState() { } + RenderPipelineState(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetLabel() const; + Device GetDevice() const; + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: vertex_descriptor.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" + +namespace mtlpp +{ + enum class VertexFormat + { + Invalid = 0, + + UChar2 = 1, + UChar3 = 2, + UChar4 = 3, + + Char2 = 4, + Char3 = 5, + Char4 = 6, + + UChar2Normalized = 7, + UChar3Normalized = 8, + UChar4Normalized = 9, + + Char2Normalized = 10, + Char3Normalized = 11, + Char4Normalized = 12, + + UShort2 = 13, + UShort3 = 14, + UShort4 = 15, + + Short2 = 16, + Short3 = 17, + Short4 = 18, + + UShort2Normalized = 19, + UShort3Normalized = 20, + UShort4Normalized = 21, + + Short2Normalized = 22, + Short3Normalized = 23, + Short4Normalized = 24, + + Half2 = 25, + Half3 = 26, + Half4 = 27, + + Float = 28, + Float2 = 29, + Float3 = 30, + Float4 = 31, + + Int = 32, + Int2 = 33, + Int3 = 34, + Int4 = 35, + + UInt = 36, + UInt2 = 37, + UInt3 = 38, + UInt4 = 39, + + Int1010102Normalized = 40, + UInt1010102Normalized = 41, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class VertexStepFunction + { + Constant = 0, + PerVertex = 1, + PerInstance = 2, + PerPatch MTLPP_AVAILABLE(10_12, 10_0) = 3, + PerPatchControlPoint MTLPP_AVAILABLE(10_12, 10_0) = 4, + } + MTLPP_AVAILABLE(10_11, 8_0); + + class VertexBufferLayoutDescriptor : public ns::Object + { + public: + VertexBufferLayoutDescriptor(); + VertexBufferLayoutDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + uint32_t GetStride() const; + VertexStepFunction GetStepFunction() const; + uint32_t GetStepRate() const; + + void SetStride(uint32_t stride); + void SetStepFunction(VertexStepFunction stepFunction); + void SetStepRate(uint32_t stepRate); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class VertexAttributeDescriptor : public ns::Object + { + public: + VertexAttributeDescriptor(); + VertexAttributeDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + VertexFormat GetFormat() const; + uint32_t GetOffset() const; + uint32_t GetBufferIndex() const; + + void SetFormat(VertexFormat format); + void SetOffset(uint32_t offset); + void SetBufferIndex(uint32_t bufferIndex); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class VertexDescriptor : public ns::Object + { + public: + VertexDescriptor(); + VertexDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + ns::Array GetLayouts() const; + ns::Array GetAttributes() const; + + void Reset(); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + +////////////////////////////////////// +// FILE: parallel_render_command_encoder.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" +// #include "render_pass.hpp" +// #include "command_encoder.hpp" + +namespace mtlpp +{ + class RenderCommandEncoder; + + class ParallelRenderCommandEncoder : public ns::Object + { + public: + ParallelRenderCommandEncoder() { } + ParallelRenderCommandEncoder(const ns::Handle& handle) : ns::Object(handle) { } + + RenderCommandEncoder GetRenderCommandEncoder(); + + void SetColorStoreAction(StoreAction storeAction, uint32_t colorAttachmentIndex) MTLPP_AVAILABLE(10_12, 10_0); + void SetDepthStoreAction(StoreAction storeAction) MTLPP_AVAILABLE(10_12, 10_0); + void SetStencilStoreAction(StoreAction storeAction) MTLPP_AVAILABLE(10_12, 10_0); + } + MTLPP_AVAILABLE(10_11, 8_0); +} + + +////////////////////////////////////// +// FILE: sampler.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "depth_stencil.hpp" +// #include "device.hpp" + +namespace mtlpp +{ + enum class SamplerMinMagFilter + { + Nearest = 0, + Linear = 1, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class SamplerMipFilter + { + NotMipmapped = 0, + Nearest = 1, + Linear = 2, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class SamplerAddressMode + { + ClampToEdge = 0, + MirrorClampToEdge MTLPP_AVAILABLE_MAC(10_11) = 1, + Repeat = 2, + MirrorRepeat = 3, + ClampToZero = 4, + ClampToBorderColor MTLPP_AVAILABLE_MAC(10_12) = 5, + } + MTLPP_AVAILABLE(10_11, 8_0); + + enum class SamplerBorderColor + { + TransparentBlack = 0, // {0,0,0,0} + OpaqueBlack = 1, // {0,0,0,1} + OpaqueWhite = 2, // {1,1,1,1} + }; + + class SamplerDescriptor : public ns::Object + { + public: + SamplerDescriptor(); + SamplerDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + SamplerMinMagFilter GetMinFilter() const; + SamplerMinMagFilter GetMagFilter() const; + SamplerMipFilter GetMipFilter() const; + uint32_t GetMaxAnisotropy() const; + SamplerAddressMode GetSAddressMode() const; + SamplerAddressMode GetTAddressMode() const; + SamplerAddressMode GetRAddressMode() const; + SamplerBorderColor GetBorderColor() const MTLPP_AVAILABLE_MAC(10_12); + bool IsNormalizedCoordinates() const; + float GetLodMinClamp() const; + float GetLodMaxClamp() const; + CompareFunction GetCompareFunction() const MTLPP_AVAILABLE(10_11, 9_0); + ns::String GetLabel() const; + + void SetMinFilter(SamplerMinMagFilter minFilter); + void SetMagFilter(SamplerMinMagFilter magFilter); + void SetMipFilter(SamplerMipFilter mipFilter); + void SetMaxAnisotropy(uint32_t maxAnisotropy); + void SetSAddressMode(SamplerAddressMode sAddressMode); + void SetTAddressMode(SamplerAddressMode tAddressMode); + void SetRAddressMode(SamplerAddressMode rAddressMode); + void SetBorderColor(SamplerBorderColor borderColor) MTLPP_AVAILABLE_MAC(10_12); + void SetNormalizedCoordinates(bool normalizedCoordinates); + void SetLodMinClamp(float lodMinClamp); + void SetLodMaxClamp(float lodMaxClamp); + void SetCompareFunction(CompareFunction compareFunction) MTLPP_AVAILABLE(10_11, 9_0); + void SetLabel(const ns::String& label); + } + MTLPP_AVAILABLE(10_11, 8_0); + + class SamplerState : public ns::Object + { + public: + SamplerState() { } + SamplerState(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetLabel() const; + Device GetDevice() const; + } + MTLPP_AVAILABLE(10_11, 8_0); +} + + +////////////////////////////////////// +// FILE: heap.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "ns.hpp" +// #include "device.hpp" +// #include "resource.hpp" +// #include "buffer.hpp" +// #include "texture.hpp" +// #include "types.hpp" + +namespace mtlpp +{ + class HeapDescriptor : public ns::Object + { + public: + HeapDescriptor(const ns::Handle& handle) : ns::Object(handle) { } + + uint32_t GetSize() const; + StorageMode GetStorageMode() const; + CpuCacheMode GetCpuCacheMode() const; + + void SetSize(uint32_t size) const; + void SetStorageMode(StorageMode storageMode) const; + void SetCpuCacheMode(CpuCacheMode cpuCacheMode) const; + } + MTLPP_AVAILABLE(NA, 10_0); + + class Heap : public ns::Object + { + public: + Heap(const ns::Handle& handle) : ns::Object(handle) { } + + ns::String GetLabel() const; + Device GetDevice() const; + StorageMode GetStorageMode() const; + CpuCacheMode GetCpuCacheMode() const; + uint32_t GetSize() const; + uint32_t GetUsedSize() const; + + void SetLabel(const ns::String& label); + + uint32_t MaxAvailableSizeWithAlignment(uint32_t alignment); + Buffer NewBuffer(uint32_t length, ResourceOptions options); + Texture NewTexture(const TextureDescriptor& desc); + PurgeableState SetPurgeableState(PurgeableState state); + } + MTLPP_AVAILABLE(NA, 10_0); +} + +////////////////////////////////////// +// FILE: mtlpp.hpp +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #pragma once + +// #include "defines.hpp" +// #include "blit_command_encoder.hpp" +// #include "buffer.hpp" +// #include "command_buffer.hpp" +// #include "compute_command_encoder.hpp" +// #include "command_queue.hpp" +// #include "device.hpp" +// #include "depth_stencil.hpp" +// #include "drawable.hpp" +// #include "render_pass.hpp" +// #include "compute_pipeline.hpp" +// #include "library.hpp" +// #include "pixel_format.hpp" +// #include "render_pipeline.hpp" +// #include "vertex_descriptor.hpp" +// #include "parallel_render_command_encoder.hpp" +// #include "render_command_encoder.hpp" +// #include "sampler.hpp" +// #include "texture.hpp" +// #include "heap.hpp" + diff --git a/3rdparty/bgfx/3rdparty/mtlpp/mtlpp.mm b/3rdparty/bgfx/3rdparty/mtlpp/mtlpp.mm new file mode 100644 index 0000000..205a49d --- /dev/null +++ b/3rdparty/bgfx/3rdparty/mtlpp/mtlpp.mm @@ -0,0 +1,4599 @@ +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ +#include "mtlpp.hpp" + +////////////////////////////////////// +// FILE: argument.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "argument.hpp" +#include + +namespace mtlpp +{ + StructMember::StructMember() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLStructMember alloc] init] }) + { + } + + ns::String StructMember::GetName() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLStructMember*)m_ptr name] }; + } + + uint32_t StructMember::GetOffset() const + { + Validate(); + return uint32_t([(__bridge MTLStructMember*)m_ptr offset]); + } + + DataType StructMember::GetDataType() const + { + Validate(); + return DataType([(__bridge MTLStructMember*)m_ptr dataType]); + } + + StructType StructMember::GetStructType() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLStructMember*)m_ptr structType] }; + } + + ArrayType StructMember::GetArrayType() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLStructMember*)m_ptr arrayType] }; + } + + StructType::StructType() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLStructType alloc] init] }) + { + } + + const ns::Array StructType::GetMembers() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLStructType*)m_ptr members] }; + } + + StructMember StructType::GetMember(const ns::String& name) const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLStructType*)m_ptr memberByName:(__bridge NSString*)name.GetPtr()] }; + } + + ArrayType::ArrayType() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLArrayType alloc] init] }) + { + } + + uint32_t ArrayType::GetArrayLength() const + { + Validate(); + return uint32_t([(__bridge MTLArrayType*)m_ptr arrayLength]); + } + + DataType ArrayType::GetElementType() const + { + Validate(); + return DataType([(__bridge MTLArrayType*)m_ptr elementType]); + } + + uint32_t ArrayType::GetStride() const + { + Validate(); + return uint32_t([(__bridge MTLArrayType*)m_ptr stride]); + } + + StructType ArrayType::GetElementStructType() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLArrayType*)m_ptr elementStructType] }; + } + + ArrayType ArrayType::GetElementArrayType() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLArrayType*)m_ptr elementArrayType] }; + } + + Argument::Argument() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLArgument alloc] init] }) + { + } + + ns::String Argument::GetName() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLArgument*)m_ptr name] }; + } + + ArgumentType Argument::GetType() const + { + Validate(); + return ArgumentType([(__bridge MTLArgument*)m_ptr type]); + } + + ArgumentAccess Argument::GetAccess() const + { + Validate(); + return ArgumentAccess([(__bridge MTLArgument*)m_ptr access]); + } + + uint32_t Argument::GetIndex() const + { + Validate(); + return uint32_t([(__bridge MTLArgument*)m_ptr index]); + } + + bool Argument::IsActive() const + { + Validate(); + return [(__bridge MTLArgument*)m_ptr isActive]; + } + + uint32_t Argument::GetBufferAlignment() const + { + Validate(); + return uint32_t([(__bridge MTLArgument*)m_ptr bufferAlignment]); + } + + uint32_t Argument::GetBufferDataSize() const + { + Validate(); + return uint32_t([(__bridge MTLArgument*)m_ptr bufferDataSize]); + } + + DataType Argument::GetBufferDataType() const + { + Validate(); + return DataType([(__bridge MTLArgument*)m_ptr bufferDataType]); + } + + StructType Argument::GetBufferStructType() const + { + Validate(); + return StructType(ns::Handle { (__bridge void*)[(__bridge MTLArgument*)m_ptr bufferStructType] }); + } + + uint32_t Argument::GetThreadgroupMemoryAlignment() const + { + Validate(); + return uint32_t([(__bridge MTLArgument*)m_ptr threadgroupMemoryAlignment]); + } + + uint32_t Argument::GetThreadgroupMemoryDataSize() const + { + Validate(); + return uint32_t([(__bridge MTLArgument*)m_ptr threadgroupMemoryDataSize]); + } + + TextureType Argument::GetTextureType() const + { + Validate(); + return TextureType([(__bridge MTLArgument*)m_ptr textureType]); + } + + DataType Argument::GetTextureDataType() const + { + Validate(); + return DataType([(__bridge MTLArgument*)m_ptr textureDataType]); + } + + bool Argument::IsDepthTexture() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return [(__bridge MTLArgument*)m_ptr isDepthTexture]; +#else + return false; +#endif + } +} + +////////////////////////////////////// +// FILE: blit_command_encoder.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "blit_command_encoder.hpp" +#include + +namespace mtlpp +{ + void BlitCommandEncoder::Synchronize(const Resource& resource) + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + [(__bridge id)m_ptr + synchronizeResource:(__bridge id)resource.GetPtr()]; +#endif + } + + void BlitCommandEncoder::Synchronize(const Texture& texture, uint32_t slice, uint32_t level) + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + [(__bridge id)m_ptr + synchronizeTexture:(__bridge id)texture.GetPtr() + slice:slice + level:level]; +#endif + } + + void BlitCommandEncoder::Copy(const Texture& sourceTexture, uint32_t sourceSlice, uint32_t sourceLevel, const Origin& sourceOrigin, const Size& sourceSize, const Texture& destinationTexture, uint32_t destinationSlice, uint32_t destinationLevel, const Origin& destinationOrigin) + { + Validate(); + [(__bridge id)m_ptr + copyFromTexture:(__bridge id)sourceTexture.GetPtr() + sourceSlice:sourceSlice + sourceLevel:sourceLevel + sourceOrigin:MTLOriginMake(sourceOrigin.X, sourceOrigin.Y, sourceOrigin.Z) + sourceSize:MTLSizeMake(sourceSize.Width, sourceSize.Height, sourceSize.Depth) + toTexture:(__bridge id)destinationTexture.GetPtr() + destinationSlice:destinationSlice + destinationLevel:destinationLevel + destinationOrigin:MTLOriginMake(destinationOrigin.X, destinationOrigin.Y, destinationOrigin.Z)]; + } + + void BlitCommandEncoder::Copy(const Buffer& sourceBuffer, uint32_t sourceOffset, uint32_t sourceBytesPerRow, uint32_t sourceBytesPerImage, const Size& sourceSize, const Texture& destinationTexture, uint32_t destinationSlice, uint32_t destinationLevel, const Origin& destinationOrigin) + { + Validate(); + [(__bridge id)m_ptr + copyFromBuffer:(__bridge id)sourceBuffer.GetPtr() + sourceOffset:sourceOffset + sourceBytesPerRow:sourceBytesPerRow + sourceBytesPerImage:sourceBytesPerImage + sourceSize:MTLSizeMake(sourceSize.Width, sourceSize.Height, sourceSize.Depth) + toTexture:(__bridge id)destinationTexture.GetPtr() + destinationSlice:destinationSlice + destinationLevel:destinationLevel + destinationOrigin:MTLOriginMake(destinationOrigin.X, destinationOrigin.Y, destinationOrigin.Z)]; + } + + void BlitCommandEncoder::Copy(const Buffer& sourceBuffer, uint32_t sourceOffset, uint32_t sourceBytesPerRow, uint32_t sourceBytesPerImage, const Size& sourceSize, const Texture& destinationTexture, uint32_t destinationSlice, uint32_t destinationLevel, const Origin& destinationOrigin, BlitOption options) + { + Validate(); + [(__bridge id)m_ptr + copyFromBuffer:(__bridge id)sourceBuffer.GetPtr() + sourceOffset:sourceOffset + sourceBytesPerRow:sourceBytesPerRow + sourceBytesPerImage:sourceBytesPerImage + sourceSize:MTLSizeMake(sourceSize.Width, sourceSize.Height, sourceSize.Depth) + toTexture:(__bridge id)destinationTexture.GetPtr() + destinationSlice:destinationSlice + destinationLevel:destinationLevel + destinationOrigin:MTLOriginMake(destinationOrigin.X, destinationOrigin.Y, destinationOrigin.Z) + options:MTLBlitOption(options)]; + } + + void BlitCommandEncoder::Copy(const Texture& sourceTexture, uint32_t sourceSlice, uint32_t sourceLevel, const Origin& sourceOrigin, const Size& sourceSize, const Buffer& destinationBuffer, uint32_t destinationOffset, uint32_t destinationBytesPerRow, uint32_t destinationBytesPerImage) + { + Validate(); + [(__bridge id)m_ptr + copyFromTexture:(__bridge id)sourceTexture.GetPtr() + sourceSlice:sourceSlice + sourceLevel:sourceLevel + sourceOrigin:MTLOriginMake(sourceOrigin.X, sourceOrigin.Y, sourceOrigin.Z) + sourceSize:MTLSizeMake(sourceSize.Width, sourceSize.Height, sourceSize.Depth) + toBuffer:(__bridge id)destinationBuffer.GetPtr() + destinationOffset:destinationOffset + destinationBytesPerRow:destinationBytesPerRow + destinationBytesPerImage:destinationBytesPerImage]; + } + + void BlitCommandEncoder::Copy(const Texture& sourceTexture, uint32_t sourceSlice, uint32_t sourceLevel, const Origin& sourceOrigin, const Size& sourceSize, const Buffer& destinationBuffer, uint32_t destinationOffset, uint32_t destinationBytesPerRow, uint32_t destinationBytesPerImage, BlitOption options) + { + Validate(); + [(__bridge id)m_ptr + copyFromTexture:(__bridge id)sourceTexture.GetPtr() + sourceSlice:sourceSlice + sourceLevel:sourceLevel + sourceOrigin:MTLOriginMake(sourceOrigin.X, sourceOrigin.Y, sourceOrigin.Z) + sourceSize:MTLSizeMake(sourceSize.Width, sourceSize.Height, sourceSize.Depth) + toBuffer:(__bridge id)destinationBuffer.GetPtr() + destinationOffset:destinationOffset + destinationBytesPerRow:destinationBytesPerRow + destinationBytesPerImage:destinationBytesPerImage + options:MTLBlitOption(options)]; + } + + void BlitCommandEncoder::Copy(const Buffer& sourceBuffer, uint32_t sourceOffset, const Buffer& destinationBuffer, uint32_t destinationOffset, uint32_t size) + { + Validate(); + [(__bridge id)m_ptr + copyFromBuffer:(__bridge id)sourceBuffer.GetPtr() + sourceOffset:sourceOffset + toBuffer:(__bridge id)destinationBuffer.GetPtr() + destinationOffset:destinationOffset + size:size]; + } + + void BlitCommandEncoder::GenerateMipmaps(const Texture& texture) + { + Validate(); + [(__bridge id)m_ptr + generateMipmapsForTexture:(__bridge id)texture.GetPtr()]; + } + + void BlitCommandEncoder::Fill(const Buffer& buffer, const ns::Range& range, uint8_t value) + { + Validate(); + [(__bridge id)m_ptr + fillBuffer:(__bridge id)buffer.GetPtr() + range:NSMakeRange(range.Location, range.Length) + value:value]; + } + + void BlitCommandEncoder::UpdateFence(const Fence& fence) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge id)m_ptr + updateFence:(__bridge id)fence.GetPtr()]; +#endif + } + + void BlitCommandEncoder::WaitForFence(const Fence& fence) + { +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge id)m_ptr + waitForFence:(__bridge id)fence.GetPtr()]; +#endif + } +} + +////////////////////////////////////// +// FILE: buffer.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "buffer.hpp" +// #include "texture.hpp" +#include + +namespace mtlpp +{ + uint32_t Buffer::GetLength() const + { + Validate(); + return uint32_t([(__bridge id)m_ptr length]); + } + + void* Buffer::GetContents() + { + Validate(); + return [(__bridge id)m_ptr contents]; + } + + void Buffer::DidModify(const ns::Range& range) + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + [(__bridge id)m_ptr didModifyRange:NSMakeRange(range.Location, range.Length)]; +#endif + } + + Texture Buffer::NewTexture(const TextureDescriptor& descriptor, uint32_t offset, uint32_t bytesPerRow) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(8_0) + MTLTextureDescriptor* mtlTextureDescriptor = (__bridge MTLTextureDescriptor*)descriptor.GetPtr(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newTextureWithDescriptor:mtlTextureDescriptor offset:offset bytesPerRow:bytesPerRow] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + void Buffer::AddDebugMarker(const ns::String& marker, const ns::Range& range) + { +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr addDebugMarker:(__bridge NSString*)marker.GetPtr() range:NSMakeRange(range.Location, range.Length)]; +#endif + } + + void Buffer::RemoveAllDebugMarkers() + { +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr removeAllDebugMarkers]; +#endif + } +} + +////////////////////////////////////// +// FILE: command_buffer.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "command_buffer.hpp" +// #include "command_queue.hpp" +// #include "drawable.hpp" +// #include "blit_command_encoder.hpp" +// #include "render_command_encoder.hpp" +// #include "compute_command_encoder.hpp" +// #include "parallel_render_command_encoder.hpp" +// #include "render_pass.hpp" + +#include + +namespace mtlpp +{ + Device CommandBuffer::GetDevice() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr device] }; + } + + CommandQueue CommandBuffer::GetCommandQueue() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr commandQueue] }; + } + + bool CommandBuffer::GetRetainedReferences() const + { + Validate(); + return [(__bridge id)m_ptr retainedReferences]; + } + + ns::String CommandBuffer::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; + } + + CommandBufferStatus CommandBuffer::GetStatus() const + { + Validate(); + return CommandBufferStatus([(__bridge id)m_ptr status]); + } + + ns::Error CommandBuffer::GetError() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr error] }; + } + + void CommandBuffer::SetLabel(const ns::String& label) + { + Validate(); + [(__bridge id)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; + } + + void CommandBuffer::Enqueue() + { + Validate(); + [(__bridge id)m_ptr enqueue]; + } + + void CommandBuffer::Commit() + { + Validate(); + [(__bridge id)m_ptr commit]; + } + + void CommandBuffer::AddScheduledHandler(std::function handler) + { + Validate(); + [(__bridge id)m_ptr addScheduledHandler:^(id mtlCommandBuffer){ + CommandBuffer commandBuffer(ns::Handle{ (__bridge void*)mtlCommandBuffer }); + handler(commandBuffer); + }]; + } + + void CommandBuffer::AddCompletedHandler(std::function handler) + { + Validate(); + [(__bridge id)m_ptr addCompletedHandler:^(id mtlCommandBuffer){ + CommandBuffer commandBuffer(ns::Handle{ (__bridge void*)mtlCommandBuffer }); + handler(commandBuffer); + }]; + } + + void CommandBuffer::Present(const Drawable& drawable) + { + Validate(); + [(__bridge id)m_ptr presentDrawable:(__bridge id)drawable.GetPtr()]; + } + + void CommandBuffer::Present(const Drawable& drawable, double presentationTime) + { + Validate(); + [(__bridge id)m_ptr presentDrawable:(__bridge id)drawable.GetPtr() atTime:presentationTime]; + } + + void CommandBuffer::WaitUntilScheduled() + { + Validate(); + [(__bridge id)m_ptr waitUntilScheduled]; + } + + void CommandBuffer::WaitUntilCompleted() + { + Validate(); + [(__bridge id)m_ptr waitUntilCompleted]; + } + + BlitCommandEncoder CommandBuffer::BlitCommandEncoder() + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr blitCommandEncoder] }; + } + + RenderCommandEncoder CommandBuffer::RenderCommandEncoder(const RenderPassDescriptor& renderPassDescriptor) + { + Validate(); + MTLRenderPassDescriptor* mtlRenderPassDescriptor = (__bridge MTLRenderPassDescriptor*)renderPassDescriptor.GetPtr(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr renderCommandEncoderWithDescriptor:mtlRenderPassDescriptor] }; + } + + ComputeCommandEncoder CommandBuffer::ComputeCommandEncoder() + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr computeCommandEncoder] }; + } + + ParallelRenderCommandEncoder CommandBuffer::ParallelRenderCommandEncoder(const RenderPassDescriptor& renderPassDescriptor) + { + Validate(); + MTLRenderPassDescriptor* mtlRenderPassDescriptor = (__bridge MTLRenderPassDescriptor*)renderPassDescriptor.GetPtr(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr parallelRenderCommandEncoderWithDescriptor:mtlRenderPassDescriptor] }; + } +} + +////////////////////////////////////// +// FILE: command_encoder.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "command_encoder.hpp" +// #include "device.hpp" +#include + +namespace mtlpp +{ + Device CommandEncoder::GetDevice() const + { + Validate(); + return ns::Handle { (__bridge void*)[(__bridge id)m_ptr device] }; + } + + ns::String CommandEncoder::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; + } + + void CommandEncoder::SetLabel(const ns::String& label) + { + Validate(); + [(__bridge id)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; + } + + void CommandEncoder::EndEncoding() + { + Validate(); + [(__bridge id)m_ptr endEncoding]; + } + + void CommandEncoder::InsertDebugSignpost(const ns::String& string) + { + Validate(); + [(__bridge id)m_ptr insertDebugSignpost:(__bridge NSString*)string.GetPtr()]; + } + + void CommandEncoder::PushDebugGroup(const ns::String& string) + { + Validate(); + [(__bridge id)m_ptr pushDebugGroup:(__bridge NSString*)string.GetPtr()]; + } + + void CommandEncoder::PopDebugGroup() + { + Validate(); + [(__bridge id)m_ptr popDebugGroup]; + } +} + +////////////////////////////////////// +// FILE: command_queue.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "command_queue.hpp" +// #include "command_buffer.hpp" +// #include "device.hpp" +#include + +namespace mtlpp +{ + ns::String CommandQueue::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; + } + + Device CommandQueue::GetDevice() const + { + Validate(); + return ns::Handle { (__bridge void*)[(__bridge id)m_ptr device] }; + } + + void CommandQueue::SetLabel(const ns::String& label) + { + Validate(); + [(__bridge id)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; + } + + CommandBuffer CommandQueue::CommandBufferWithUnretainedReferences() + { + Validate(); + return ns::Handle { (__bridge void*)[(__bridge id)m_ptr commandBufferWithUnretainedReferences] }; + } + + CommandBuffer CommandQueue::CommandBuffer() + { + Validate(); + return ns::Handle { (__bridge void*)[(__bridge id)m_ptr commandBuffer] }; + } + + void CommandQueue::InsertDebugCaptureBoundary() + { + Validate(); + [(__bridge id)m_ptr insertDebugCaptureBoundary]; + } +} + +////////////////////////////////////// +// FILE: compute_command_encoder.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "compute_command_encoder.hpp" +// #include "buffer.hpp" +// #include "compute_pipeline.hpp" +// #include "sampler.hpp" +#include + +namespace mtlpp +{ + void ComputeCommandEncoder::SetComputePipelineState(const ComputePipelineState& state) + { + Validate(); + [(__bridge id)m_ptr setComputePipelineState:(__bridge id)state.GetPtr()]; + } + + void ComputeCommandEncoder::SetBytes(const void* data, uint32_t length, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setBytes:data length:length atIndex:index]; + } + + void ComputeCommandEncoder::SetBuffer(const Buffer& buffer, uint32_t offset, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setBuffer:(__bridge id)buffer.GetPtr() offset:offset atIndex:index]; + } + + void ComputeCommandEncoder::SetBufferOffset(uint32_t offset, uint32_t index) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 8_3) + [(__bridge id)m_ptr setBufferOffset:offset atIndex:index]; +#endif + } + + void ComputeCommandEncoder::SetBuffers(const Buffer* buffers, const uint32_t* offsets, const ns::Range& range) + { + Validate(); + + const uint32_t maxBuffers = 32; + assert(range.Length <= maxBuffers); + + id mtlBuffers[maxBuffers]; + NSUInteger nsOffsets[maxBuffers]; + for (uint32_t i=0; i)buffers[i].GetPtr(); + nsOffsets[i] = offsets[i]; + } + + [(__bridge id)m_ptr setBuffers:mtlBuffers + offsets:nsOffsets + withRange:NSMakeRange(range.Location, range.Length)]; + } + + void ComputeCommandEncoder::SetTexture(const Texture& texture, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setTexture:(__bridge id)texture.GetPtr() atIndex:index]; + } + + void ComputeCommandEncoder::SetTextures(const Texture* textures, const ns::Range& range) + { + Validate(); + + const uint32_t maxTextures = 32; + assert(range.Length <= maxTextures); + + id mtlTextures[maxTextures]; + for (uint32_t i=0; i)textures[i].GetPtr(); + + [(__bridge id)m_ptr setTextures:mtlTextures + withRange:NSMakeRange(range.Location, range.Length)]; + } + + void ComputeCommandEncoder::SetSamplerState(const SamplerState& sampler, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setSamplerState:(__bridge id)sampler.GetPtr() atIndex:index]; + } + + void ComputeCommandEncoder::SetSamplerStates(const SamplerState* samplers, const ns::Range& range) + { + Validate(); + + const uint32_t maxStates = 32; + assert(range.Length <= maxStates); + + id mtlStates[maxStates]; + for (uint32_t i=0; i)samplers[i].GetPtr(); + + [(__bridge id)m_ptr setSamplerStates:mtlStates + withRange:NSMakeRange(range.Location, range.Length)]; + } + + void ComputeCommandEncoder::SetSamplerState(const SamplerState& sampler, float lodMinClamp, float lodMaxClamp, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setSamplerState:(__bridge id)sampler.GetPtr() + lodMinClamp:lodMinClamp + lodMaxClamp:lodMaxClamp + atIndex:index]; + } + + void ComputeCommandEncoder::SetSamplerStates(const SamplerState* samplers, const float* lodMinClamps, const float* lodMaxClamps, const ns::Range& range) + { + Validate(); + + const uint32_t maxStates = 32; + assert(range.Length <= maxStates); + + id mtlStates[maxStates]; + for (uint32_t i=0; i)samplers[i].GetPtr(); + + [(__bridge id)m_ptr setSamplerStates:mtlStates + lodMinClamps:lodMinClamps + lodMaxClamps:lodMaxClamps + withRange:NSMakeRange(range.Location, range.Length)]; + } + + void ComputeCommandEncoder::SetThreadgroupMemory(uint32_t length, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setThreadgroupMemoryLength:length atIndex:index]; + } + + void ComputeCommandEncoder::SetStageInRegion(const Region& region) + { +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr setStageInRegion:MTLRegionMake3D(region.Origin.X, region.Origin.Y, region.Origin.Z, region.Size.Width, region.Size.Height, region.Size.Depth)]; +#endif + } + + void ComputeCommandEncoder::DispatchThreadgroups(const Size& threadgroupsPerGrid, const Size& threadsPerThreadgroup) + { + Validate(); + MTLSize mtlThreadgroupsPerGrid = MTLSizeMake(threadgroupsPerGrid.Width, threadgroupsPerGrid.Height, threadgroupsPerGrid.Depth); + MTLSize mtlThreadsPerThreadgroup = MTLSizeMake(threadsPerThreadgroup.Width, threadsPerThreadgroup.Height, threadsPerThreadgroup.Depth); + [(__bridge id)m_ptr dispatchThreadgroups:mtlThreadgroupsPerGrid threadsPerThreadgroup:mtlThreadsPerThreadgroup]; + } + + void ComputeCommandEncoder::DispatchThreadgroupsWithIndirectBuffer(const Buffer& indirectBuffer, uint32_t indirectBufferOffset, const Size& threadsPerThreadgroup) + { + Validate(); + MTLSize mtlThreadsPerThreadgroup = MTLSizeMake(threadsPerThreadgroup.Width, threadsPerThreadgroup.Height, threadsPerThreadgroup.Depth); + [(__bridge id)m_ptr dispatchThreadgroupsWithIndirectBuffer:(__bridge id)indirectBuffer.GetPtr() + indirectBufferOffset:indirectBufferOffset + threadsPerThreadgroup:mtlThreadsPerThreadgroup]; + } + + void ComputeCommandEncoder::UpdateFence(const Fence& fence) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge id)m_ptr updateFence:(__bridge id)fence.GetPtr()]; +#endif + } + + void ComputeCommandEncoder::WaitForFence(const Fence& fence) + { +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge id)m_ptr waitForFence:(__bridge id)fence.GetPtr()]; +#endif + } +} + +////////////////////////////////////// +// FILE: compute_pipeline.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "compute_pipeline.hpp" +#include + +namespace mtlpp +{ + ComputePipelineReflection::ComputePipelineReflection() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLComputePipelineReflection alloc] init] }) + { + } + + ComputePipelineDescriptor::ComputePipelineDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLComputePipelineDescriptor alloc] init] }) + { + } + + ns::String ComputePipelineDescriptor::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLComputePipelineDescriptor*)m_ptr label] }; + } + + Function ComputePipelineDescriptor::GetComputeFunction() const + { + Validate(); + return ns::Handle { (__bridge void*)[(__bridge MTLComputePipelineDescriptor*)m_ptr computeFunction] }; + } + + bool ComputePipelineDescriptor::GetThreadGroupSizeIsMultipleOfThreadExecutionWidth() const + { + Validate(); + return [(__bridge MTLComputePipelineDescriptor*)m_ptr threadGroupSizeIsMultipleOfThreadExecutionWidth]; + } + + StageInputOutputDescriptor ComputePipelineDescriptor::GetStageInputDescriptor() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return ns::Handle { (__bridge void*)[(__bridge MTLComputePipelineDescriptor*)m_ptr stageInputDescriptor] }; +#else + return ns::Handle { nullptr }; +#endif + } + + void ComputePipelineDescriptor::SetLabel(const ns::String& label) + { + Validate(); + [(__bridge MTLComputePipelineDescriptor*)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; + } + + void ComputePipelineDescriptor::SetComputeFunction(const Function& function) + { + Validate(); + [(__bridge MTLComputePipelineDescriptor*)m_ptr setComputeFunction:(__bridge id)function.GetPtr()]; + } + + void ComputePipelineDescriptor::SetThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool value) + { + Validate(); + [(__bridge MTLComputePipelineDescriptor*)m_ptr setThreadGroupSizeIsMultipleOfThreadExecutionWidth:value]; + } + + void ComputePipelineDescriptor::SetStageInputDescriptor(const StageInputOutputDescriptor& stageInputDescriptor) const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLComputePipelineDescriptor*)m_ptr setStageInputDescriptor:(__bridge MTLStageInputOutputDescriptor*)stageInputDescriptor.GetPtr()]; +#endif + } + + Device ComputePipelineState::GetDevice() const + { + Validate(); + return ns::Handle { (__bridge void*)[(__bridge id)m_ptr device] }; + } + + uint32_t ComputePipelineState::GetMaxTotalThreadsPerThreadgroup() const + { + Validate(); + return uint32_t([(__bridge id)m_ptr maxTotalThreadsPerThreadgroup]); + } + + uint32_t ComputePipelineState::GetThreadExecutionWidth() const + { + Validate(); + return uint32_t([(__bridge id)m_ptr threadExecutionWidth]); + } +} + +////////////////////////////////////// +// FILE: depth_stencil.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "depth_stencil.hpp" +#include + +namespace mtlpp +{ + StencilDescriptor::StencilDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLStencilDescriptor alloc] init] }) + { + } + + CompareFunction StencilDescriptor::GetStencilCompareFunction() const + { + Validate(); + return CompareFunction([(__bridge MTLStencilDescriptor*)m_ptr stencilCompareFunction]); + } + + StencilOperation StencilDescriptor::GetStencilFailureOperation() const + { + Validate(); + return StencilOperation([(__bridge MTLStencilDescriptor*)m_ptr stencilFailureOperation]); + } + + StencilOperation StencilDescriptor::GetDepthFailureOperation() const + { + Validate(); + return StencilOperation([(__bridge MTLStencilDescriptor*)m_ptr depthFailureOperation]); + } + + StencilOperation StencilDescriptor::GetDepthStencilPassOperation() const + { + Validate(); + return StencilOperation([(__bridge MTLStencilDescriptor*)m_ptr depthStencilPassOperation]); + } + + uint32_t StencilDescriptor::GetReadMask() const + { + Validate(); + return uint32_t([(__bridge MTLStencilDescriptor*)m_ptr readMask]); + } + + uint32_t StencilDescriptor::GetWriteMask() const + { + Validate(); + return uint32_t([(__bridge MTLStencilDescriptor*)m_ptr writeMask]); + } + + void StencilDescriptor::SetStencilCompareFunction(CompareFunction stencilCompareFunction) + { + Validate(); + [(__bridge MTLStencilDescriptor*)m_ptr setStencilCompareFunction:MTLCompareFunction(stencilCompareFunction)]; + } + + void StencilDescriptor::SetStencilFailureOperation(StencilOperation stencilFailureOperation) + { + Validate(); + [(__bridge MTLStencilDescriptor*)m_ptr setStencilFailureOperation:MTLStencilOperation(stencilFailureOperation)]; + } + + void StencilDescriptor::SetDepthFailureOperation(StencilOperation depthFailureOperation) + { + Validate(); + [(__bridge MTLStencilDescriptor*)m_ptr setDepthFailureOperation:MTLStencilOperation(depthFailureOperation)]; + } + + void StencilDescriptor::SetDepthStencilPassOperation(StencilOperation depthStencilPassOperation) + { + Validate(); + [(__bridge MTLStencilDescriptor*)m_ptr setDepthStencilPassOperation:MTLStencilOperation(depthStencilPassOperation)]; + } + + void StencilDescriptor::SetReadMask(uint32_t readMask) + { + Validate(); + [(__bridge MTLStencilDescriptor*)m_ptr setReadMask:readMask]; + } + + void StencilDescriptor::SetWriteMask(uint32_t writeMask) + { + Validate(); + [(__bridge MTLStencilDescriptor*)m_ptr setWriteMask:writeMask]; + } + + DepthStencilDescriptor::DepthStencilDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLDepthStencilDescriptor alloc] init] }) + { + } + + CompareFunction DepthStencilDescriptor::GetDepthCompareFunction() const + { + Validate(); + return CompareFunction([(__bridge MTLDepthStencilDescriptor*)m_ptr depthCompareFunction]); + } + + bool DepthStencilDescriptor::IsDepthWriteEnabled() const + { + Validate(); + return [(__bridge MTLDepthStencilDescriptor*)m_ptr isDepthWriteEnabled]; + } + + StencilDescriptor DepthStencilDescriptor::GetFrontFaceStencil() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLDepthStencilDescriptor*)m_ptr frontFaceStencil] }; + } + + StencilDescriptor DepthStencilDescriptor::GetBackFaceStencil() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLDepthStencilDescriptor*)m_ptr backFaceStencil] }; + } + + ns::String DepthStencilDescriptor::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLDepthStencilDescriptor*)m_ptr label] }; + } + + void DepthStencilDescriptor::SetDepthCompareFunction(CompareFunction depthCompareFunction) const + { + Validate(); + [(__bridge MTLDepthStencilDescriptor*)m_ptr setDepthCompareFunction:MTLCompareFunction(depthCompareFunction)]; + } + + void DepthStencilDescriptor::SetDepthWriteEnabled(bool depthWriteEnabled) const + { + Validate(); + [(__bridge MTLDepthStencilDescriptor*)m_ptr setDepthWriteEnabled:depthWriteEnabled]; + } + + void DepthStencilDescriptor::SetFrontFaceStencil(const StencilDescriptor& frontFaceStencil) const + { + Validate(); + [(__bridge MTLDepthStencilDescriptor*)m_ptr setFrontFaceStencil:(__bridge MTLStencilDescriptor*)frontFaceStencil.GetPtr()]; + } + + void DepthStencilDescriptor::SetBackFaceStencil(const StencilDescriptor& backFaceStencil) const + { + Validate(); + [(__bridge MTLDepthStencilDescriptor*)m_ptr setBackFaceStencil:(__bridge MTLStencilDescriptor*)backFaceStencil.GetPtr()]; + } + + void DepthStencilDescriptor::SetLabel(const ns::String& label) const + { + Validate(); + [(__bridge MTLDepthStencilDescriptor*)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; + } + + ns::String DepthStencilState::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; + } + + Device DepthStencilState::GetDevice() const + { + Validate(); + return ns::Handle { (__bridge void*)[(__bridge id)m_ptr device] }; + } +} + +////////////////////////////////////// +// FILE: device.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "device.hpp" +// #include "buffer.hpp" +// #include "command_queue.hpp" +// #include "compute_pipeline.hpp" +// #include "depth_stencil.hpp" +// #include "render_pipeline.hpp" +// #include "sampler.hpp" +// #include "texture.hpp" +// #include "heap.hpp" +#include + +namespace mtlpp +{ + CompileOptions::CompileOptions() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLCompileOptions alloc] init] }) + { + } + + Device Device::CreateSystemDefaultDevice() + { + return ns::Handle{ (__bridge void*)MTLCreateSystemDefaultDevice() }; + } + + ns::Array Device::CopyAllDevices() + { +#if MTLPP_IS_AVAILABLE_MAC(10_11) + return ns::Handle{ (__bridge void*)MTLCopyAllDevices() }; +#else + return ns::Handle{ nullptr }; +#endif + } + + ns::String Device::GetName() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr name] }; + } + + Size Device::GetMaxThreadsPerThreadgroup() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + MTLSize mtlSize = [(__bridge id)m_ptr maxThreadsPerThreadgroup]; + return Size(uint32_t(mtlSize.width), uint32_t(mtlSize.height), uint32_t(mtlSize.depth)); +#else + return Size(0, 0, 0); +#endif + } + + bool Device::IsLowPower() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + return [(__bridge id)m_ptr isLowPower]; +#else + return false; +#endif + } + + bool Device::IsHeadless() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + return [(__bridge id)m_ptr isHeadless]; +#else + return false; +#endif + } + + uint64_t Device::GetRecommendedMaxWorkingSetSize() const + { +#if MTLPP_IS_AVAILABLE_MAC(10_12) + return [(__bridge id)m_ptr recommendedMaxWorkingSetSize]; +#else + return 0; +#endif + } + + bool Device::IsDepth24Stencil8PixelFormatSupported() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + return [(__bridge id)m_ptr isDepth24Stencil8PixelFormatSupported]; +#else + return true; +#endif + } + + CommandQueue Device::NewCommandQueue() + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newCommandQueue] }; + } + + CommandQueue Device::NewCommandQueue(uint32_t maxCommandBufferCount) + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newCommandQueueWithMaxCommandBufferCount:maxCommandBufferCount] }; + } + + SizeAndAlign Device::HeapTextureSizeAndAlign(const TextureDescriptor& desc) + { +#if MTLPP_IS_AVAILABLE_IOS(10_0) + MTLSizeAndAlign mtlSizeAndAlign = [(__bridge id)m_ptr heapTextureSizeAndAlignWithDescriptor:(__bridge MTLTextureDescriptor*)desc.GetPtr()]; + return SizeAndAlign{ uint32_t(mtlSizeAndAlign.size), uint32_t(mtlSizeAndAlign.align) }; +#else + return SizeAndAlign{0, 0}; +#endif + } + + SizeAndAlign Device::HeapBufferSizeAndAlign(uint32_t length, ResourceOptions options) + { +#if MTLPP_IS_AVAILABLE_IOS(10_0) + MTLSizeAndAlign mtlSizeAndAlign = [(__bridge id)m_ptr heapBufferSizeAndAlignWithLength:length options:MTLResourceOptions(options)]; + return SizeAndAlign{ uint32_t(mtlSizeAndAlign.size), uint32_t(mtlSizeAndAlign.align) }; +#else + return SizeAndAlign{0, 0}; +#endif + } + + Heap Device::NewHeap(const HeapDescriptor& descriptor) + { +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newHeapWithDescriptor:(__bridge MTLHeapDescriptor*)descriptor.GetPtr()] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + Buffer Device::NewBuffer(uint32_t length, ResourceOptions options) + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newBufferWithLength:length options:MTLResourceOptions(options)] }; + } + + Buffer Device::NewBuffer(const void* pointer, uint32_t length, ResourceOptions options) + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newBufferWithBytes:pointer length:length options:MTLResourceOptions(options)] }; + } + + + Buffer Device::NewBuffer(void* pointer, uint32_t length, ResourceOptions options, std::function deallocator) + { + Validate(); + return ns::Handle{ + (__bridge void*)[(__bridge id)m_ptr newBufferWithBytesNoCopy:pointer + length:length + options:MTLResourceOptions(options) + deallocator:^(void* pointer, NSUInteger length) { deallocator(pointer, uint32_t(length)); }] + }; + } + + DepthStencilState Device::NewDepthStencilState(const DepthStencilDescriptor& descriptor) + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newDepthStencilStateWithDescriptor:(__bridge MTLDepthStencilDescriptor*)descriptor.GetPtr()] }; + } + + Texture Device::NewTexture(const TextureDescriptor& descriptor) + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newTextureWithDescriptor:(__bridge MTLTextureDescriptor*)descriptor.GetPtr()] }; + } + + //- (id )newTextureWithDescriptor:(MTLTextureDescriptor *)descriptor iosurface:(IOSurfaceRef)iosurface plane:(NSUInteger)plane NS_AVAILABLE_MAC(10_11); + SamplerState Device::NewSamplerState(const SamplerDescriptor& descriptor) + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newSamplerStateWithDescriptor:(__bridge MTLSamplerDescriptor*)descriptor.GetPtr()] }; + } + + Library Device::NewDefaultLibrary() + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newDefaultLibrary] }; + } + + Library Device::NewLibrary(const ns::String& filepath, ns::Error* error) + { + Validate(); + NSError* nsError = error ? (__bridge NSError*)error->GetPtr() : nullptr; + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newLibraryWithFile:(__bridge NSString*)filepath.GetPtr() error:&nsError] }; + } + + Library Device::NewLibrary(const char* source, const CompileOptions& options, ns::Error* error) + { + Validate(); + NSString* nsSource = [NSString stringWithUTF8String:source]; + NSError* nsError = error ? (__bridge NSError*)error->GetPtr() : nullptr; + return ns::Handle{ + (__bridge void*)[(__bridge id)m_ptr newLibraryWithSource:nsSource + options:(__bridge MTLCompileOptions*)options.GetPtr() + error:&nsError] + }; + } + + void Device::NewLibrary(const char* source, const CompileOptions& options, std::function completionHandler) + { + Validate(); + NSString* nsSource = [NSString stringWithUTF8String:source]; + [(__bridge id)m_ptr newLibraryWithSource:nsSource + options:(__bridge MTLCompileOptions*)options.GetPtr() + completionHandler:^(id library, NSError * error) { + completionHandler( + ns::Handle{ (__bridge void*)library }, + ns::Handle{ (__bridge void*)error }); + }]; + } + + RenderPipelineState Device::NewRenderPipelineState(const RenderPipelineDescriptor& descriptor, ns::Error* error) + { + Validate(); + NSError* nsError = error ? (__bridge NSError*)error->GetPtr() : nullptr; + return ns::Handle{ + (__bridge void*)[(__bridge id)m_ptr newRenderPipelineStateWithDescriptor:(__bridge MTLRenderPipelineDescriptor*)descriptor.GetPtr() + error:&nsError] + }; + } + + RenderPipelineState Device::NewRenderPipelineState(const RenderPipelineDescriptor& descriptor, PipelineOption options, RenderPipelineReflection* outReflection, ns::Error* error) + { + Validate(); + NSError* nsError = error ? (__bridge NSError*)error->GetPtr() : nullptr; + MTLRenderPipelineReflection* mtlReflection = outReflection ? (__bridge MTLRenderPipelineReflection*)outReflection->GetPtr() : nullptr; + return ns::Handle{ + (__bridge void*)[(__bridge id)m_ptr newRenderPipelineStateWithDescriptor:(__bridge MTLRenderPipelineDescriptor*)descriptor.GetPtr() + options:MTLPipelineOption(options) + reflection:&mtlReflection + error:&nsError] + }; + } + + void Device::NewRenderPipelineState(const RenderPipelineDescriptor& descriptor, std::function completionHandler) + { + Validate(); + [(__bridge id)m_ptr newRenderPipelineStateWithDescriptor:(__bridge MTLRenderPipelineDescriptor*)descriptor.GetPtr() + completionHandler:^(id renderPipelineState, NSError * error) { + completionHandler( + ns::Handle{ (__bridge void*)renderPipelineState }, + ns::Handle{ (__bridge void*)error } + ); + }]; + } + + void Device::NewRenderPipelineState(const RenderPipelineDescriptor& descriptor, PipelineOption options, std::function completionHandler) + { + Validate(); + [(__bridge id)m_ptr newRenderPipelineStateWithDescriptor:(__bridge MTLRenderPipelineDescriptor*)descriptor.GetPtr() + options:MTLPipelineOption(options) + completionHandler:^(id renderPipelineState, MTLRenderPipelineReflection * reflection, NSError * error) { + completionHandler( + ns::Handle{ (__bridge void*)renderPipelineState }, + ns::Handle{ (__bridge void*)reflection }, + ns::Handle{ (__bridge void*)error } + ); + }]; + } + + ComputePipelineState Device::NewComputePipelineState(const Function& computeFunction, ns::Error* error) + { + Validate(); + NSError* nsError = error ? (__bridge NSError*)error->GetPtr() : nullptr; + return ns::Handle{ + (__bridge void*)[(__bridge id)m_ptr newComputePipelineStateWithFunction:(__bridge id)computeFunction.GetPtr() + error:&nsError] + }; + } + + ComputePipelineState Device::NewComputePipelineState(const Function& computeFunction, PipelineOption options, ComputePipelineReflection& outReflection, ns::Error* error) + { + Validate(); + return ns::Handle{ nullptr }; + } + + void Device::NewComputePipelineState(const Function& computeFunction, std::function completionHandler) + { + Validate(); + [(__bridge id)m_ptr newComputePipelineStateWithFunction:(__bridge id)computeFunction.GetPtr() + completionHandler:^(id computePipelineState, NSError * error) { + completionHandler( + ns::Handle{ (__bridge void*)computePipelineState }, + ns::Handle{ (__bridge void*)error } + ); + }]; + } + + void Device::NewComputePipelineState(const Function& computeFunction, PipelineOption options, std::function completionHandler) + { + Validate(); + [(__bridge id)m_ptr newComputePipelineStateWithFunction:(__bridge id)computeFunction.GetPtr() + options:MTLPipelineOption(options) + completionHandler:^(id computePipelineState, MTLComputePipelineReflection * reflection, NSError * error) { + completionHandler( + ns::Handle{ (__bridge void*)computePipelineState }, + ns::Handle{ (__bridge void*)reflection }, + ns::Handle{ (__bridge void*)error } + ); + }]; + } + + ComputePipelineState Device::NewComputePipelineState(const ComputePipelineDescriptor& descriptor, PipelineOption options, ComputePipelineReflection* outReflection, ns::Error* error) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + NSError* nsError = error ? (__bridge NSError*)error->GetPtr() : nullptr; + MTLComputePipelineReflection* mtlReflection = outReflection ? (__bridge MTLComputePipelineReflection*)outReflection->GetPtr() : nullptr; + return ns::Handle{ + (__bridge void*)[(__bridge id)m_ptr newComputePipelineStateWithDescriptor:(__bridge MTLComputePipelineDescriptor*)descriptor.GetPtr() + options:MTLPipelineOption(options) + reflection:&mtlReflection + error:&nsError] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + void Device::NewComputePipelineState(const ComputePipelineDescriptor& descriptor, PipelineOption options, std::function completionHandler) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + [(__bridge id)m_ptr newComputePipelineStateWithDescriptor:(__bridge MTLComputePipelineDescriptor*)descriptor.GetPtr() + options:MTLPipelineOption(options) + completionHandler:^(id computePipelineState, MTLComputePipelineReflection * reflection, NSError * error) + { + completionHandler( + ns::Handle{ (__bridge void*)computePipelineState }, + ns::Handle{ (__bridge void*)reflection }, + ns::Handle{ (__bridge void*)error }); + }]; +#endif + } + + Fence Device::NewFence() + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newFence] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + bool Device::SupportsFeatureSet(FeatureSet featureSet) const + { + Validate(); + return [(__bridge id)m_ptr supportsFeatureSet:MTLFeatureSet(featureSet)]; + } + + bool Device::SupportsTextureSampleCount(uint32_t sampleCount) const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + return [(__bridge id)m_ptr supportsTextureSampleCount:sampleCount]; +#else + return true; +#endif + } +} + +////////////////////////////////////// +// FILE: drawable.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "drawable.hpp" +#include + +namespace mtlpp +{ + void Drawable::Present() + { + Validate(); + [(__bridge id)m_ptr present]; + } + + void Drawable::Present(double presentationTime) + { + Validate(); + [(__bridge id)m_ptr presentAtTime:presentationTime]; + } +} + +////////////////////////////////////// +// FILE: fence.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "fence.hpp" +#if MTLPP_IS_AVAILABLE_IOS(10_0) +# include +#endif + +namespace mtlpp +{ + Texture Fence::GetDevice() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr device] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + ns::String Fence::GetLabel() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + void Fence::SetLabel(const ns::String& label) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge id)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; +#endif + } +} + +////////////////////////////////////// +// FILE: function_constant_values.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "function_constant_values.hpp" +#if MTLPP_IS_AVAILABLE(10_12, 10_0) +# include +#endif + +namespace mtlpp +{ + FunctionConstantValues::FunctionConstantValues() : +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + ns::Object(ns::Handle{ (__bridge void*)[[MTLFunctionConstantValues alloc] init] }) +#else + ns::Object(ns::Handle{ nullptr }) +#endif + { + } + + void FunctionConstantValues::SetConstantValue(const void* value, DataType type, uint32_t index) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLFunctionConstantValues*)m_ptr setConstantValue:value type:MTLDataType(type) atIndex:index]; +#endif + } + + void FunctionConstantValues::SetConstantValue(const void* value, DataType type, const ns::String& name) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLFunctionConstantValues*)m_ptr setConstantValue:value type:MTLDataType(type) withName:(__bridge NSString*)name.GetPtr()]; +#endif + } + + void FunctionConstantValues::SetConstantValues(const void* value, DataType type, const ns::Range& range) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLFunctionConstantValues*)m_ptr setConstantValues:value type:MTLDataType(type) withRange:NSMakeRange(range.Location, range.Length)]; +#endif + } + + void FunctionConstantValues::Reset() + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return [(__bridge MTLFunctionConstantValues*)m_ptr reset]; +#endif + } +} + +////////////////////////////////////// +// FILE: heap.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "heap.hpp" +#if MTLPP_IS_AVAILABLE_IOS(10_0) +# include +#endif + +namespace mtlpp +{ + uint32_t HeapDescriptor::GetSize() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return uint32_t([(__bridge MTLHeapDescriptor*)m_ptr size]); +#else + return 0; +#endif + + } + + StorageMode HeapDescriptor::GetStorageMode() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return StorageMode([(__bridge MTLHeapDescriptor*)m_ptr storageMode]); +#else + return StorageMode(0); +#endif + + } + + CpuCacheMode HeapDescriptor::GetCpuCacheMode() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return CpuCacheMode([(__bridge MTLHeapDescriptor*)m_ptr cpuCacheMode]); +#else + return CpuCacheMode(0); +#endif + + } + + void HeapDescriptor::SetSize(uint32_t size) const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge MTLHeapDescriptor*)m_ptr setSize:size]; +#endif + + } + + void HeapDescriptor::SetStorageMode(StorageMode storageMode) const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge MTLHeapDescriptor*)m_ptr setStorageMode:MTLStorageMode(storageMode)]; +#endif + + } + + void HeapDescriptor::SetCpuCacheMode(CpuCacheMode cpuCacheMode) const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge MTLHeapDescriptor*)m_ptr setCpuCacheMode:MTLCPUCacheMode(cpuCacheMode)]; +#endif + + } + + ns::String Heap::GetLabel() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; +#else + return ns::Handle{ nullptr }; +#endif + + } + + Device Heap::GetDevice() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr device] }; +#else + return ns::Handle{ nullptr }; +#endif + + } + + StorageMode Heap::GetStorageMode() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return StorageMode([(__bridge id)m_ptr storageMode]); +#else + return StorageMode(0); +#endif + + } + + CpuCacheMode Heap::GetCpuCacheMode() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return CpuCacheMode([(__bridge id)m_ptr cpuCacheMode]); +#else + return CpuCacheMode(0); +#endif + + } + + uint32_t Heap::GetSize() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return uint32_t([(__bridge id)m_ptr size]); +#else + return 0; +#endif + + } + + uint32_t Heap::GetUsedSize() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return uint32_t([(__bridge id)m_ptr usedSize]); +#else + return 0; +#endif + + } + + void Heap::SetLabel(const ns::String& label) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge id)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; +#endif + + } + + uint32_t Heap::MaxAvailableSizeWithAlignment(uint32_t alignment) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return uint32_t([(__bridge id)m_ptr maxAvailableSizeWithAlignment:alignment]); +#else + return 0; +#endif + + } + + Buffer Heap::NewBuffer(uint32_t length, ResourceOptions options) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newBufferWithLength:length options:MTLResourceOptions(options)] }; +#else + return ns::Handle{ nullptr }; +#endif + + } + + Texture Heap::NewTexture(const TextureDescriptor& desc) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newTextureWithDescriptor:(__bridge MTLTextureDescriptor*)desc.GetPtr()] }; +#else + return ns::Handle{ nullptr }; +#endif + + } + + PurgeableState Heap::SetPurgeableState(PurgeableState state) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return PurgeableState([(__bridge id)m_ptr setPurgeableState:MTLPurgeableState(state)]); +#else + return PurgeableState(0); +#endif + + } +} + +////////////////////////////////////// +// FILE: library.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "library.hpp" +// #include "device.hpp" +// #include "function_constant_values.hpp" +#include + +namespace mtlpp +{ + VertexAttribute::VertexAttribute() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLVertexAttribute alloc] init] }) + { + } + + ns::String VertexAttribute::GetName() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLVertexAttribute*)m_ptr name] }; + } + + uint32_t VertexAttribute::GetAttributeIndex() const + { + Validate(); + return uint32_t([(__bridge MTLVertexAttribute*)m_ptr attributeIndex]); + } + + DataType VertexAttribute::GetAttributeType() const + { + Validate(); + return DataType([(__bridge MTLVertexAttribute*)m_ptr attributeType]); + } + + bool VertexAttribute::IsActive() const + { + Validate(); + return [(__bridge MTLVertexAttribute*)m_ptr isActive]; + } + + bool VertexAttribute::IsPatchData() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return [(__bridge MTLVertexAttribute*)m_ptr isActive]; +#else + return false; +#endif + } + + bool VertexAttribute::IsPatchControlPointData() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return [(__bridge MTLVertexAttribute*)m_ptr isActive]; +#else + return false; +#endif + } + + Attribute::Attribute() : +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + ns::Object(ns::Handle{ (__bridge void*)[[MTLAttribute alloc] init] }) +#else + ns::Object(ns::Handle{ nullptr }) +#endif + { + } + + ns::String Attribute::GetName() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return ns::Handle{ (__bridge void*)[(__bridge MTLAttribute*)m_ptr name] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + uint32_t Attribute::GetAttributeIndex() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return uint32_t([(__bridge MTLAttribute*)m_ptr attributeIndex]); +#else + return 0; +#endif + } + + DataType Attribute::GetAttributeType() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return DataType([(__bridge MTLAttribute*)m_ptr attributeType]); +#else + return DataType(0); +#endif + } + + bool Attribute::IsActive() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return [(__bridge MTLAttribute*)m_ptr isActive]; +#else + return false; +#endif + } + + bool Attribute::IsPatchData() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return [(__bridge MTLAttribute*)m_ptr isActive]; +#else + return false; +#endif + } + + bool Attribute::IsPatchControlPointData() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return [(__bridge MTLAttribute*)m_ptr isActive]; +#else + return false; +#endif + } + + FunctionConstant::FunctionConstant() : +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + ns::Object(ns::Handle{ (__bridge void*)[[MTLFunctionConstant alloc] init] }) +#else + ns::Object(ns::Handle{ nullptr }) +#endif + { + } + + ns::String FunctionConstant::GetName() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return ns::Handle{ (__bridge void*)[(__bridge MTLFunctionConstant*)m_ptr name] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + DataType FunctionConstant::GetType() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return DataType([(__bridge MTLFunctionConstant*)m_ptr type]); +#else + return DataType(0); +#endif + } + + uint32_t FunctionConstant::GetIndex() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return uint32_t([(__bridge MTLFunctionConstant*)m_ptr index]); +#else + return 0; +#endif + } + + bool FunctionConstant::IsRequired() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return [(__bridge MTLFunctionConstant*)m_ptr required]; +#else + return false; +#endif + } + + ns::String Function::GetLabel() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + Device Function::GetDevice() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr device] }; + } + + FunctionType Function::GetFunctionType() const + { + Validate(); + return FunctionType([(__bridge id)m_ptr functionType]); + } + + PatchType Function::GetPatchType() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return PatchType([(__bridge id)m_ptr patchType]); +#else + return PatchType(0); +#endif + } + + int32_t Function::GetPatchControlPointCount() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return int32_t([(__bridge id)m_ptr patchControlPointCount]); +#else + return 0; +#endif + } + + const ns::Array Function::GetVertexAttributes() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr vertexAttributes] }; + } + + const ns::Array Function::GetStageInputAttributes() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr stageInputAttributes] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + ns::String Function::GetName() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr name] }; + } + + ns::Dictionary Function::GetFunctionConstants() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr functionConstantsDictionary] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + void Function::SetLabel(const ns::String& label) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; +#endif + } + + ns::Dictionary CompileOptions::GetPreprocessorMacros() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLCompileOptions*)m_ptr preprocessorMacros] }; + } + + bool CompileOptions::IsFastMathEnabled() const + { + Validate(); + return [(__bridge MTLCompileOptions*)m_ptr fastMathEnabled]; + } + + LanguageVersion CompileOptions::GetLanguageVersion() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + return LanguageVersion([(__bridge MTLCompileOptions*)m_ptr languageVersion]); +#else + return LanguageVersion::Version1_0; +#endif + } + + void CompileOptions::SetFastMathEnabled(bool fastMathEnabled) + { + Validate(); + [(__bridge MTLCompileOptions*)m_ptr setFastMathEnabled:fastMathEnabled]; + } + + void CompileOptions::SetFastMathEnabled(LanguageVersion languageVersion) + { + Validate(); + [(__bridge MTLCompileOptions*)m_ptr setFastMathEnabled:MTLLanguageVersion(languageVersion)]; + } + + ns::String Library::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; + } + + void Library::SetLabel(const ns::String& label) + { + Validate(); + [(__bridge id)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; + } + + ns::Array Library::GetFunctionNames() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr functionNames] }; + } + + Function Library::NewFunction(const ns::String& functionName) + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newFunctionWithName:(__bridge NSString*)functionName.GetPtr()] }; + } + + Function Library::NewFunction(const ns::String& functionName, const FunctionConstantValues& constantValues, ns::Error* error) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + NSError* nsError = error ? (__bridge NSError*)error->GetPtr() : nullptr; + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr + newFunctionWithName:(__bridge NSString*)functionName.GetPtr() + constantValues:(__bridge MTLFunctionConstantValues*)constantValues.GetPtr() + error:&nsError] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + void Library::NewFunction(const ns::String& functionName, const FunctionConstantValues& constantValues, std::function completionHandler) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr + newFunctionWithName:(__bridge NSString*)functionName.GetPtr() + constantValues:(__bridge MTLFunctionConstantValues*)constantValues.GetPtr() + completionHandler:^(id mtlFunction, NSError* error){ + completionHandler(ns::Handle{ (__bridge void*)mtlFunction }, ns::Handle{ (__bridge void*)error }); + }]; +#endif + } + +} + +////////////////////////////////////// +// FILE: ns.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "ns.hpp" +#include +#include +#include +#include +#include + +namespace ns +{ + Object::Object() : + m_ptr(nullptr) + { + } + + Object::Object(const Handle& handle) : + m_ptr(handle.ptr) + { + if (m_ptr) + CFRetain(m_ptr); + } + + Object::Object(const Object& rhs) : + m_ptr(rhs.m_ptr) + { + if (m_ptr) + CFRetain(m_ptr); + } + +#if MTLPP_CONFIG_RVALUE_REFERENCES + Object::Object(Object&& rhs) : + m_ptr(rhs.m_ptr) + { + rhs.m_ptr = nullptr; + } +#endif + + Object::~Object() + { + if (m_ptr) + CFRelease(m_ptr); + } + + Object& Object::operator=(const Object& rhs) + { + if (rhs.m_ptr == m_ptr) + return *this; + if (rhs.m_ptr) + CFRetain(rhs.m_ptr); + if (m_ptr) + CFRelease(m_ptr); + m_ptr = rhs.m_ptr; + return *this; + } + +#if MTLPP_CONFIG_RVALUE_REFERENCES + Object& Object::operator=(Object&& rhs) + { + if (rhs.m_ptr == m_ptr) + return *this; + if (m_ptr) + CFRelease(m_ptr); + m_ptr = rhs.m_ptr; + rhs.m_ptr = nullptr; + return *this; + } +#endif + + const uint32_t ArrayBase::GetSize() const + { + Validate(); + return uint32_t([(__bridge NSArray*)m_ptr count]); + } + + void* ArrayBase::GetItem(uint32_t index) const + { + Validate(); + return (__bridge void*)[(__bridge NSArray*)m_ptr objectAtIndexedSubscript:index]; + } + + String::String(const char* cstr) : + Object(Handle{ (__bridge void*)[NSString stringWithUTF8String:cstr] }) + { + } + + const char* String::GetCStr() const + { + Validate(); + return [(__bridge NSString*)m_ptr cStringUsingEncoding:NSUTF8StringEncoding]; + } + + uint32_t String::GetLength() const + { + Validate(); + return uint32_t([(__bridge NSString*)m_ptr length]); + } + + Error::Error() : + Object(Handle{ (__bridge void*)[[NSError alloc] init] }) + { + + } + + String Error::GetDomain() const + { + Validate(); + return Handle{ (__bridge void*)[(__bridge NSError*)m_ptr domain] }; + } + + uint32_t Error::GetCode() const + { + Validate(); + return uint32_t([(__bridge NSError*)m_ptr code]); + } + + //@property (readonly, copy) NSDictionary *userInfo; + + String Error::GetLocalizedDescription() const + { + Validate(); + return Handle{ (__bridge void*)[(__bridge NSError*)m_ptr localizedDescription] }; + } + + String Error::GetLocalizedFailureReason() const + { + Validate(); + return Handle{ (__bridge void*)[(__bridge NSError*)m_ptr localizedFailureReason] }; + } + + String Error::GetLocalizedRecoverySuggestion() const + { + Validate(); + return Handle{ (__bridge void*)[(__bridge NSError*)m_ptr localizedRecoverySuggestion] }; + } + + String Error::GetLocalizedRecoveryOptions() const + { + Validate(); + return Handle{ (__bridge void*)[(__bridge NSError*)m_ptr localizedRecoveryOptions] }; + } + + //@property (nullable, readonly, strong) id recoveryAttempter; + + String Error::GetHelpAnchor() const + { + Validate(); + return Handle{ (__bridge void*)[(__bridge NSError*)m_ptr helpAnchor] }; + } +} + +////////////////////////////////////// +// FILE: parallel_render_command_encoder.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "parallel_render_command_encoder.hpp" +// #include "render_command_encoder.hpp" +#include + +namespace mtlpp +{ + RenderCommandEncoder ParallelRenderCommandEncoder::GetRenderCommandEncoder() + { + Validate(); + return ns::Handle { (__bridge void*)[(__bridge id)m_ptr renderCommandEncoder] }; + } + + void ParallelRenderCommandEncoder::SetColorStoreAction(StoreAction storeAction, uint32_t colorAttachmentIndex) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr setColorStoreAction:MTLStoreAction(storeAction) atIndex:colorAttachmentIndex]; +#endif + } + + void ParallelRenderCommandEncoder::SetDepthStoreAction(StoreAction storeAction) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr setDepthStoreAction:MTLStoreAction(storeAction)]; +#endif + } + + void ParallelRenderCommandEncoder::SetStencilStoreAction(StoreAction storeAction) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr setStencilStoreAction:MTLStoreAction(storeAction)]; +#endif + } +} + +////////////////////////////////////// +// FILE: render_command_encoder.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "render_command_encoder.hpp" +// #include "buffer.hpp" +// #include "depth_stencil.hpp" +// #include "render_pipeline.hpp" +// #include "sampler.hpp" +// #include "texture.hpp" +#include +#include + +namespace mtlpp +{ + void RenderCommandEncoder::SetRenderPipelineState(const RenderPipelineState& pipelineState) + { + Validate(); + [(__bridge id)m_ptr setRenderPipelineState:(__bridge id)pipelineState.GetPtr()]; + } + + void RenderCommandEncoder::SetVertexData(const void* bytes, uint32_t length, uint32_t index) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 8_3) + [(__bridge id)m_ptr setVertexBytes:bytes length:length atIndex:index]; +#endif + } + + void RenderCommandEncoder::SetVertexBuffer(const Buffer& buffer, uint32_t offset, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setVertexBuffer:(__bridge id)buffer.GetPtr() + offset:offset + atIndex:index]; + } + void RenderCommandEncoder::SetVertexBufferOffset(uint32_t offset, uint32_t index) + { +#if MTLPP_IS_AVAILABLE(10_11, 8_3) + Validate(); + [(__bridge id)m_ptr setVertexBufferOffset:offset atIndex:index]; +#endif + } + + void RenderCommandEncoder::SetVertexBuffers(const Buffer* buffers, const uint32_t* offsets, const ns::Range& range) + { + Validate(); + + const uint32_t maxBuffers = 32; + assert(range.Length <= maxBuffers); + + id mtlBuffers[maxBuffers]; + NSUInteger nsOffsets[maxBuffers]; + for (uint32_t i=0; i)buffers[i].GetPtr(); + nsOffsets[i] = offsets[i]; + } + + [(__bridge id)m_ptr setVertexBuffers:mtlBuffers offsets:nsOffsets withRange:NSMakeRange(range.Location, range.Length)]; + } + + void RenderCommandEncoder::SetVertexTexture(const Texture& texture, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setVertexTexture:(__bridge id)texture.GetPtr() + atIndex:index]; + } + + + void RenderCommandEncoder::SetVertexTextures(const Texture* textures, const ns::Range& range) + { + Validate(); + + const uint32_t maxTextures = 32; + assert(range.Length <= maxTextures); + + id mtlTextures[maxTextures]; + for (uint32_t i=0; i)textures[i].GetPtr(); + + [(__bridge id)m_ptr setVertexTextures:mtlTextures withRange:NSMakeRange(range.Location, range.Length)]; + } + + void RenderCommandEncoder::SetVertexSamplerState(const SamplerState& sampler, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setVertexSamplerState:(__bridge id)sampler.GetPtr() + atIndex:index]; + + } + + void RenderCommandEncoder::SetVertexSamplerStates(const SamplerState* samplers, const ns::Range& range) + { + Validate(); + + const uint32_t maxStates = 32; + assert(range.Length <= maxStates); + + id mtlStates[maxStates]; + for (uint32_t i=0; i)samplers[i].GetPtr(); + + [(__bridge id)m_ptr setVertexSamplerStates:mtlStates withRange:NSMakeRange(range.Location, range.Length)]; + } + + void RenderCommandEncoder::SetVertexSamplerState(const SamplerState& sampler, float lodMinClamp, float lodMaxClamp, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setVertexSamplerState:(__bridge id)sampler.GetPtr() + lodMinClamp:lodMinClamp + lodMaxClamp:lodMaxClamp + atIndex:index]; + } + + void RenderCommandEncoder::SetVertexSamplerStates(const SamplerState* samplers, const float* lodMinClamps, const float* lodMaxClamps, const ns::Range& range) + { + Validate(); + + const uint32_t maxStates = 32; + assert(range.Length <= maxStates); + + id mtlStates[maxStates]; + for (uint32_t i=0; i)samplers[i].GetPtr(); + + [(__bridge id)m_ptr setVertexSamplerStates:mtlStates + lodMinClamps:lodMinClamps + lodMaxClamps:lodMaxClamps + withRange:NSMakeRange(range.Location, range.Length)]; + } + + void RenderCommandEncoder::SetViewport(const Viewport& viewport) + { + Validate(); + MTLViewport mtlViewport = { viewport.OriginX, viewport.OriginY, viewport.Width, viewport.Height, viewport.ZNear, viewport.ZFar }; + [(__bridge id)m_ptr setViewport:mtlViewport]; + } + + void RenderCommandEncoder::SetFrontFacingWinding(Winding frontFacingWinding) + { + Validate(); + [(__bridge id)m_ptr setFrontFacingWinding:MTLWinding(frontFacingWinding)]; + } + + void RenderCommandEncoder::SetCullMode(CullMode cullMode) + { + Validate(); + [(__bridge id)m_ptr setCullMode:MTLCullMode(cullMode)]; + } + + void RenderCommandEncoder::SetDepthClipMode(DepthClipMode depthClipMode) + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + [(__bridge id)m_ptr setDepthClipMode:MTLDepthClipMode(depthClipMode)]; +#endif + } + + void RenderCommandEncoder::SetDepthBias(float depthBias, float slopeScale, float clamp) + { + Validate(); + [(__bridge id)m_ptr setDepthBias:depthBias slopeScale:slopeScale clamp:clamp]; + } + + void RenderCommandEncoder::SetScissorRect(const ScissorRect& rect) + { + Validate(); + MTLScissorRect mtlRect { rect.X, rect.Y, rect.Width, rect.Height }; + [(__bridge id)m_ptr setScissorRect:mtlRect]; + } + + void RenderCommandEncoder::SetTriangleFillMode(TriangleFillMode fillMode) + { + Validate(); + [(__bridge id)m_ptr setTriangleFillMode:MTLTriangleFillMode(fillMode)]; + } + + void RenderCommandEncoder::SetFragmentData(const void* bytes, uint32_t length, uint32_t index) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 8_3) + [(__bridge id)m_ptr setFragmentBytes:bytes + length:length + atIndex:index]; +#endif + } + + void RenderCommandEncoder::SetFragmentBuffer(const Buffer& buffer, uint32_t offset, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setFragmentBuffer:(__bridge id)buffer.GetPtr() + offset:offset + atIndex:index]; + } + + void RenderCommandEncoder::SetFragmentBufferOffset(uint32_t offset, uint32_t index) + { +#if MTLPP_IS_AVAILABLE(10_11, 8_3) + Validate(); + [(__bridge id)m_ptr setFragmentBufferOffset:offset atIndex:index]; +#endif + } + + void RenderCommandEncoder::SetFragmentBuffers(const Buffer* buffers, const uint32_t* offsets, const ns::Range& range) + { + Validate(); + + const uint32_t maxBuffers = 32; + assert(range.Length <= maxBuffers); + + id mtlBuffers[maxBuffers]; + NSUInteger nsOffsets[maxBuffers]; + for (uint32_t i=0; i)buffers[i].GetPtr(); + nsOffsets[i] = offsets[i]; + } + + [(__bridge id)m_ptr setFragmentBuffers:mtlBuffers offsets:nsOffsets withRange:NSMakeRange(range.Location, range.Length)]; + } + + void RenderCommandEncoder::SetFragmentTexture(const Texture& texture, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setFragmentTexture:(__bridge id)texture.GetPtr() + atIndex:index]; + } + + void RenderCommandEncoder::SetFragmentTextures(const Texture* textures, const ns::Range& range) + { + Validate(); + + const uint32_t maxTextures = 32; + assert(range.Length <= maxTextures); + + id mtlTextures[maxTextures]; + for (uint32_t i=0; i)textures[i].GetPtr(); + + [(__bridge id)m_ptr setFragmentTextures:mtlTextures withRange:NSMakeRange(range.Location, range.Length)]; + } + + void RenderCommandEncoder::SetFragmentSamplerState(const SamplerState& sampler, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setFragmentSamplerState:(__bridge id)sampler.GetPtr() + atIndex:index]; + } + + void RenderCommandEncoder::SetFragmentSamplerStates(const SamplerState* samplers, const ns::Range& range) + { + Validate(); + + const uint32_t maxStates = 32; + assert(range.Length <= maxStates); + + id mtlStates[maxStates]; + for (uint32_t i=0; i)samplers[i].GetPtr(); + + [(__bridge id)m_ptr setFragmentSamplerStates:mtlStates withRange:NSMakeRange(range.Location, range.Length)]; + } + + void RenderCommandEncoder::SetFragmentSamplerState(const SamplerState& sampler, float lodMinClamp, float lodMaxClamp, uint32_t index) + { + Validate(); + [(__bridge id)m_ptr setFragmentSamplerState:(__bridge id)sampler.GetPtr() + lodMinClamp:lodMinClamp + lodMaxClamp:lodMaxClamp + atIndex:index]; + } + + void RenderCommandEncoder::SetFragmentSamplerStates(const SamplerState* samplers, const float* lodMinClamps, const float* lodMaxClamps, const ns::Range& range) + { + Validate(); + + const uint32_t maxStates = 32; + assert(range.Length <= maxStates); + + id mtlStates[maxStates]; + for (uint32_t i=0; i)samplers[i].GetPtr(); + + [(__bridge id)m_ptr setFragmentSamplerStates:mtlStates + lodMinClamps:lodMinClamps + lodMaxClamps:lodMaxClamps + withRange:NSMakeRange(range.Location, range.Length)]; + } + + void RenderCommandEncoder::SetBlendColor(float red, float green, float blue, float alpha) + { + Validate(); + [(__bridge id)m_ptr setBlendColorRed:red green:green blue:blue alpha:alpha]; + } + + void RenderCommandEncoder::SetDepthStencilState(const DepthStencilState& depthStencilState) + { + Validate(); + [(__bridge id)m_ptr setDepthStencilState:(__bridge id)depthStencilState.GetPtr()]; + } + + void RenderCommandEncoder::SetStencilReferenceValue(uint32_t referenceValue) + { + Validate(); + [(__bridge id)m_ptr setStencilReferenceValue:referenceValue]; + } + + void RenderCommandEncoder::SetStencilReferenceValue(uint32_t frontReferenceValue, uint32_t backReferenceValue) + { + Validate(); + [(__bridge id)m_ptr setStencilFrontReferenceValue:frontReferenceValue backReferenceValue:backReferenceValue]; + } + + void RenderCommandEncoder::SetVisibilityResultMode(VisibilityResultMode mode, uint32_t offset) + { + Validate(); + [(__bridge id)m_ptr setVisibilityResultMode:MTLVisibilityResultMode(mode) offset:offset]; + } + + void RenderCommandEncoder::SetColorStoreAction(StoreAction storeAction, uint32_t colorAttachmentIndex) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr setColorStoreAction:MTLStoreAction(storeAction) atIndex:colorAttachmentIndex]; +#endif + } + + void RenderCommandEncoder::SetDepthStoreAction(StoreAction storeAction) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr setDepthStoreAction:MTLStoreAction(storeAction)]; +#endif + } + + void RenderCommandEncoder::SetStencilStoreAction(StoreAction storeAction) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr setStencilStoreAction:MTLStoreAction(storeAction)]; +#endif + } + + void RenderCommandEncoder::Draw(PrimitiveType primitiveType, uint32_t vertexStart, uint32_t vertexCount) + { + Validate(); + [(__bridge id)m_ptr drawPrimitives:MTLPrimitiveType(primitiveType) + vertexStart:vertexStart + vertexCount:vertexCount]; + } + + void RenderCommandEncoder::Draw(PrimitiveType primitiveType, uint32_t vertexStart, uint32_t vertexCount, uint32_t instanceCount) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + [(__bridge id)m_ptr drawPrimitives:MTLPrimitiveType(primitiveType) + vertexStart:vertexStart + vertexCount:vertexCount + instanceCount:instanceCount]; +#endif + } + + void RenderCommandEncoder::Draw(PrimitiveType primitiveType, uint32_t vertexStart, uint32_t vertexCount, uint32_t instanceCount, uint32_t baseInstance) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + [(__bridge id)m_ptr drawPrimitives:MTLPrimitiveType(primitiveType) + vertexStart:vertexStart + vertexCount:vertexCount + instanceCount:instanceCount + baseInstance:baseInstance]; +#endif + } + + void RenderCommandEncoder::Draw(PrimitiveType primitiveType, Buffer indirectBuffer, uint32_t indirectBufferOffset) + { + Validate(); + [(__bridge id)m_ptr drawPrimitives:MTLPrimitiveType(primitiveType) + indirectBuffer:(__bridge id)indirectBuffer.GetPtr() + indirectBufferOffset:indirectBufferOffset]; + } + + void RenderCommandEncoder::DrawIndexed(PrimitiveType primitiveType, uint32_t indexCount, IndexType indexType, const Buffer& indexBuffer, uint32_t indexBufferOffset) + { + Validate(); + [(__bridge id)m_ptr drawIndexedPrimitives:MTLPrimitiveType(primitiveType) + indexCount:indexCount + indexType:MTLIndexType(indexType) + indexBuffer:(__bridge id)indexBuffer.GetPtr() + indexBufferOffset:indexBufferOffset]; + } + + void RenderCommandEncoder::DrawIndexed(PrimitiveType primitiveType, uint32_t indexCount, IndexType indexType, const Buffer& indexBuffer, uint32_t indexBufferOffset, uint32_t instanceCount) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + [(__bridge id)m_ptr drawIndexedPrimitives:MTLPrimitiveType(primitiveType) + indexCount:indexCount indexType:MTLIndexType(indexType) + indexBuffer:(__bridge id)indexBuffer.GetPtr() + indexBufferOffset:indexBufferOffset instanceCount:instanceCount]; +#endif + } + + void RenderCommandEncoder::DrawIndexed(PrimitiveType primitiveType, uint32_t indexCount, IndexType indexType, const Buffer& indexBuffer, uint32_t indexBufferOffset, uint32_t instanceCount, uint32_t baseVertex, uint32_t baseInstance) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + [(__bridge id)m_ptr drawIndexedPrimitives:MTLPrimitiveType(primitiveType) + indexCount:indexCount + indexType:MTLIndexType(indexType) + indexBuffer:(__bridge id)indexBuffer.GetPtr() + indexBufferOffset:indexBufferOffset + instanceCount:instanceCount + baseVertex:baseVertex + baseInstance:baseInstance]; +#endif + } + + void RenderCommandEncoder::DrawIndexed(PrimitiveType primitiveType, IndexType indexType, const Buffer& indexBuffer, uint32_t indexBufferOffset, const Buffer& indirectBuffer, uint32_t indirectBufferOffset) + { + Validate(); + [(__bridge id)m_ptr drawIndexedPrimitives:MTLPrimitiveType(primitiveType) + indexType:MTLIndexType(indexType) + indexBuffer:(__bridge id)indexBuffer.GetPtr() + indexBufferOffset:indexBufferOffset + indirectBuffer:(__bridge id)indirectBuffer.GetPtr() + indirectBufferOffset:indirectBufferOffset]; + } + + void RenderCommandEncoder::TextureBarrier() + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + [(__bridge id)m_ptr textureBarrier]; +#endif + } + + void RenderCommandEncoder::UpdateFence(const Fence& fence, RenderStages afterStages) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge id)m_ptr updateFence:(__bridge id)fence.GetPtr() afterStages:MTLRenderStages(afterStages)]; +#endif + } + + void RenderCommandEncoder::WaitForFence(const Fence& fence, RenderStages beforeStages) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge id)m_ptr waitForFence:(__bridge id)fence.GetPtr() beforeStages:MTLRenderStages(beforeStages)]; +#endif + } + + void RenderCommandEncoder::SetTessellationFactorBuffer(const Buffer& buffer, uint32_t offset, uint32_t instanceStride) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr setTessellationFactorBuffer:(__bridge id)buffer.GetPtr() offset:offset instanceStride:instanceStride]; +#endif + } + + void RenderCommandEncoder::SetTessellationFactorScale(float scale) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr setTessellationFactorScale:scale]; +#endif + } + + void RenderCommandEncoder::DrawPatches(uint32_t numberOfPatchControlPoints, uint32_t patchStart, uint32_t patchCount, const Buffer& patchIndexBuffer, uint32_t patchIndexBufferOffset, uint32_t instanceCount, uint32_t baseInstance) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr drawPatches:numberOfPatchControlPoints + patchStart:patchStart + patchCount:patchCount + patchIndexBuffer:(__bridge id)patchIndexBuffer.GetPtr() + patchIndexBufferOffset:patchIndexBufferOffset + instanceCount:instanceCount + baseInstance:baseInstance]; +#endif + } + + void RenderCommandEncoder::DrawPatches(uint32_t numberOfPatchControlPoints, const Buffer& patchIndexBuffer, uint32_t patchIndexBufferOffset, const Buffer& indirectBuffer, uint32_t indirectBufferOffset) + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_12) + [(__bridge id)m_ptr drawPatches:numberOfPatchControlPoints + patchIndexBuffer:(__bridge id)patchIndexBuffer.GetPtr() + patchIndexBufferOffset:patchIndexBufferOffset + indirectBuffer:(__bridge id)indirectBuffer.GetPtr() + indirectBufferOffset:indirectBufferOffset]; +#endif + } + + void RenderCommandEncoder::DrawIndexedPatches(uint32_t numberOfPatchControlPoints, uint32_t patchStart, uint32_t patchCount, const Buffer& patchIndexBuffer, uint32_t patchIndexBufferOffset, const Buffer& controlPointIndexBuffer, uint32_t controlPointIndexBufferOffset, uint32_t instanceCount, uint32_t baseInstance) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge id)m_ptr drawIndexedPatches:numberOfPatchControlPoints + patchStart:patchStart + patchCount:patchCount + patchIndexBuffer:(__bridge id)patchIndexBuffer.GetPtr() + patchIndexBufferOffset:patchIndexBufferOffset + controlPointIndexBuffer:(__bridge id)controlPointIndexBuffer.GetPtr() + controlPointIndexBufferOffset:controlPointIndexBufferOffset + instanceCount:instanceCount + baseInstance:baseInstance]; +#endif + } + + void RenderCommandEncoder::DrawIndexedPatches(uint32_t numberOfPatchControlPoints, const Buffer& patchIndexBuffer, uint32_t patchIndexBufferOffset, const Buffer& controlPointIndexBuffer, uint32_t controlPointIndexBufferOffset, const Buffer& indirectBuffer, uint32_t indirectBufferOffset) + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_12) + [(__bridge id)m_ptr drawIndexedPatches:numberOfPatchControlPoints + patchIndexBuffer:(__bridge id)patchIndexBuffer.GetPtr() + patchIndexBufferOffset:patchIndexBufferOffset + controlPointIndexBuffer:(__bridge id)controlPointIndexBuffer.GetPtr() + controlPointIndexBufferOffset:controlPointIndexBufferOffset + indirectBuffer:(__bridge id)indirectBuffer.GetPtr() + indirectBufferOffset:indirectBufferOffset]; +#endif + } +} + + +////////////////////////////////////// +// FILE: render_pass.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "render_pass.hpp" +// #include "texture.hpp" +#include + +namespace mtlpp +{ + RenderPassAttachmentDescriptor::RenderPassAttachmentDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLRenderPassAttachmentDescriptor alloc] init] }) + { + } + + Texture RenderPassAttachmentDescriptor::GetTexture() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr texture] }; + } + + uint32_t RenderPassAttachmentDescriptor::GetLevel() const + { + Validate(); + return uint32_t([(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr level]); + } + + uint32_t RenderPassAttachmentDescriptor::GetSlice() const + { + Validate(); + return uint32_t([(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr slice]); + } + + uint32_t RenderPassAttachmentDescriptor::GetDepthPlane() const + { + Validate(); + return uint32_t([(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr depthPlane]); + } + + Texture RenderPassAttachmentDescriptor::GetResolveTexture() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr resolveTexture] }; + } + + uint32_t RenderPassAttachmentDescriptor::GetResolveLevel() const + { + Validate(); + return uint32_t([(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr resolveLevel]); + } + + uint32_t RenderPassAttachmentDescriptor::GetResolveSlice() const + { + Validate(); + return uint32_t([(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr resolveSlice]); + } + + uint32_t RenderPassAttachmentDescriptor::GetResolveDepthPlane() const + { + Validate(); + return uint32_t([(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr resolveDepthPlane]); + } + + LoadAction RenderPassAttachmentDescriptor::GetLoadAction() const + { + Validate(); + return LoadAction([(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr loadAction]); + } + + StoreAction RenderPassAttachmentDescriptor::GetStoreAction() const + { + Validate(); + return StoreAction([(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr storeAction]); + } + + void RenderPassAttachmentDescriptor::SetTexture(const Texture& texture) + { + Validate(); + [(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr setTexture:(__bridge id)texture.GetPtr()]; + } + + void RenderPassAttachmentDescriptor::SetLevel(uint32_t level) + { + Validate(); + [(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr setLevel:level]; + } + + void RenderPassAttachmentDescriptor::SetSlice(uint32_t slice) + { + Validate(); + [(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr setSlice:slice]; + } + + void RenderPassAttachmentDescriptor::SetDepthPlane(uint32_t depthPlane) + { + Validate(); + [(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr setDepthPlane:depthPlane]; + } + + void RenderPassAttachmentDescriptor::SetResolveTexture(const Texture& texture) + { + Validate(); + [(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr setResolveTexture:(__bridge id)texture.GetPtr()]; + } + + void RenderPassAttachmentDescriptor::SetResolveLevel(uint32_t resolveLevel) + { + Validate(); + [(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr setResolveLevel:resolveLevel]; + } + + void RenderPassAttachmentDescriptor::SetResolveSlice(uint32_t resolveSlice) + { + Validate(); + [(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr setResolveSlice:resolveSlice]; + } + + void RenderPassAttachmentDescriptor::SetResolveDepthPlane(uint32_t resolveDepthPlane) + { + Validate(); + [(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr setResolveDepthPlane:resolveDepthPlane]; + } + + void RenderPassAttachmentDescriptor::SetLoadAction(LoadAction loadAction) + { + Validate(); + [(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr setLoadAction:MTLLoadAction(loadAction)]; + } + + void RenderPassAttachmentDescriptor::SetStoreAction(StoreAction storeAction) + { + Validate(); + [(__bridge MTLRenderPassAttachmentDescriptor*)m_ptr setStoreAction:MTLStoreAction(storeAction)]; + } + + RenderPassColorAttachmentDescriptor::RenderPassColorAttachmentDescriptor() : + RenderPassAttachmentDescriptor(ns::Handle{ (__bridge void*)[[MTLRenderPassColorAttachmentDescriptor alloc] init] }) + { + } + + ClearColor RenderPassColorAttachmentDescriptor::GetClearColor() const + { + Validate(); + MTLClearColor mtlClearColor = [(__bridge MTLRenderPassColorAttachmentDescriptor*)m_ptr clearColor]; + return ClearColor(mtlClearColor.red, mtlClearColor.green, mtlClearColor.blue, mtlClearColor.alpha); + } + + void RenderPassColorAttachmentDescriptor::SetClearColor(const ClearColor& clearColor) + { + Validate(); + MTLClearColor mtlClearColor = { clearColor.Red, clearColor.Green, clearColor.Blue, clearColor.Alpha }; + [(__bridge MTLRenderPassColorAttachmentDescriptor*)m_ptr setClearColor:mtlClearColor]; + } + + RenderPassDepthAttachmentDescriptor::RenderPassDepthAttachmentDescriptor() : + RenderPassAttachmentDescriptor(ns::Handle{ (__bridge void*)[[MTLRenderPassDepthAttachmentDescriptor alloc] init] }) + { + } + + double RenderPassDepthAttachmentDescriptor::GetClearDepth() const + { + Validate(); + return [(__bridge MTLRenderPassDepthAttachmentDescriptor*)m_ptr clearDepth]; + } + + MultisampleDepthResolveFilter RenderPassDepthAttachmentDescriptor::GetDepthResolveFilter() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(9_0) + return MultisampleDepthResolveFilter([(__bridge MTLRenderPassDepthAttachmentDescriptor*)m_ptr depthResolveFilter]); +#else + return MultisampleDepthResolveFilter(0); +#endif + } + + void RenderPassDepthAttachmentDescriptor::SetClearDepth(double clearDepth) + { + Validate(); + [(__bridge MTLRenderPassDepthAttachmentDescriptor*)m_ptr setClearDepth:clearDepth]; + } + + void RenderPassDepthAttachmentDescriptor::SetDepthResolveFilter(MultisampleDepthResolveFilter depthResolveFilter) + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(9_0) + [(__bridge MTLRenderPassDepthAttachmentDescriptor*)m_ptr setDepthResolveFilter:MTLMultisampleDepthResolveFilter(depthResolveFilter)]; +#endif + } + + RenderPassStencilAttachmentDescriptor::RenderPassStencilAttachmentDescriptor() : + RenderPassAttachmentDescriptor(ns::Handle{ (__bridge void*)[[MTLRenderPassStencilAttachmentDescriptor alloc] init] }) + { + } + + uint32_t RenderPassStencilAttachmentDescriptor::GetClearStencil() const + { + Validate(); + return uint32_t([(__bridge MTLRenderPassStencilAttachmentDescriptor*)m_ptr clearStencil]); + } + + void RenderPassStencilAttachmentDescriptor::SetClearStencil(uint32_t clearStencil) + { + Validate(); + [(__bridge MTLRenderPassStencilAttachmentDescriptor*)m_ptr setClearStencil:clearStencil]; + } + + RenderPassDescriptor::RenderPassDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLRenderPassDescriptor alloc] init] }) + { + } + + ns::Array RenderPassDescriptor::GetColorAttachments() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPassDescriptor*)m_ptr colorAttachments] }; + } + + RenderPassDepthAttachmentDescriptor RenderPassDescriptor::GetDepthAttachment() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPassDescriptor*)m_ptr depthAttachment] }; + } + + RenderPassStencilAttachmentDescriptor RenderPassDescriptor::GetStencilAttachment() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPassDescriptor*)m_ptr stencilAttachment] }; + } + + Buffer RenderPassDescriptor::GetVisibilityResultBuffer() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPassDescriptor*)m_ptr visibilityResultBuffer] }; + } + + uint32_t RenderPassDescriptor::GetRenderTargetArrayLength() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + return uint32_t([(__bridge MTLRenderPassDescriptor*)m_ptr renderTargetArrayLength]); +#else + return 0; +#endif + } + + void RenderPassDescriptor::SetDepthAttachment(const RenderPassDepthAttachmentDescriptor& depthAttachment) + { + Validate(); + [(__bridge MTLRenderPassDescriptor*)m_ptr setDepthAttachment:(__bridge MTLRenderPassDepthAttachmentDescriptor*)depthAttachment.GetPtr()]; + } + + void RenderPassDescriptor::SetStencilAttachment(const RenderPassStencilAttachmentDescriptor& stencilAttachment) + { + Validate(); + [(__bridge MTLRenderPassDescriptor*)m_ptr setStencilAttachment:(__bridge MTLRenderPassStencilAttachmentDescriptor*)stencilAttachment.GetPtr()]; + } + + void RenderPassDescriptor::SetVisibilityResultBuffer(const Buffer& visibilityResultBuffer) + { + Validate(); + [(__bridge MTLRenderPassDescriptor*)m_ptr setVisibilityResultBuffer:(__bridge id)visibilityResultBuffer.GetPtr()]; + } + + void RenderPassDescriptor::SetRenderTargetArrayLength(uint32_t renderTargetArrayLength) + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + [(__bridge MTLRenderPassDescriptor*)m_ptr setRenderTargetArrayLength:renderTargetArrayLength]; +#endif + } +} + +////////////////////////////////////// +// FILE: render_pipeline.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "render_pipeline.hpp" +// #include "vertex_descriptor.hpp" +#include + +namespace mtlpp +{ + RenderPipelineColorAttachmentDescriptor::RenderPipelineColorAttachmentDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLRenderPipelineColorAttachmentDescriptor alloc] init] }) + { + } + + PixelFormat RenderPipelineColorAttachmentDescriptor::GetPixelFormat() const + { + Validate(); + return PixelFormat([(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr pixelFormat]); + } + + bool RenderPipelineColorAttachmentDescriptor::IsBlendingEnabled() const + { + Validate(); + return [(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr isBlendingEnabled]; + } + + BlendFactor RenderPipelineColorAttachmentDescriptor::GetSourceRgbBlendFactor() const + { + Validate(); + return BlendFactor([(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr sourceRGBBlendFactor]); + } + + BlendFactor RenderPipelineColorAttachmentDescriptor::GetDestinationRgbBlendFactor() const + { + Validate(); + return BlendFactor([(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr destinationRGBBlendFactor]); + } + + BlendOperation RenderPipelineColorAttachmentDescriptor::GetRgbBlendOperation() const + { + Validate(); + return BlendOperation([(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr rgbBlendOperation]); + } + + BlendFactor RenderPipelineColorAttachmentDescriptor::GetSourceAlphaBlendFactor() const + { + Validate(); + return BlendFactor([(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr sourceAlphaBlendFactor]); + } + + BlendFactor RenderPipelineColorAttachmentDescriptor::GetDestinationAlphaBlendFactor() const + { + Validate(); + return BlendFactor([(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr destinationAlphaBlendFactor]); + } + + BlendOperation RenderPipelineColorAttachmentDescriptor::GetAlphaBlendOperation() const + { + Validate(); + return BlendOperation([(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr alphaBlendOperation]); + } + + ColorWriteMask RenderPipelineColorAttachmentDescriptor::GetWriteMask() const + { + Validate(); + return ColorWriteMask([(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr writeMask]); + } + + void RenderPipelineColorAttachmentDescriptor::SetPixelFormat(PixelFormat pixelFormat) + { + Validate(); + [(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr setPixelFormat:MTLPixelFormat(pixelFormat)]; + } + + void RenderPipelineColorAttachmentDescriptor::SetBlendingEnabled(bool blendingEnabled) + { + Validate(); + [(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr setBlendingEnabled:blendingEnabled]; + } + + void RenderPipelineColorAttachmentDescriptor::SetSourceRgbBlendFactor(BlendFactor sourceRgbBlendFactor) + { + Validate(); + [(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr setSourceRGBBlendFactor:MTLBlendFactor(sourceRgbBlendFactor)]; + } + + void RenderPipelineColorAttachmentDescriptor::SetDestinationRgbBlendFactor(BlendFactor destinationRgbBlendFactor) + { + Validate(); + [(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr setDestinationRGBBlendFactor:MTLBlendFactor(destinationRgbBlendFactor)]; + } + + void RenderPipelineColorAttachmentDescriptor::SetRgbBlendOperation(BlendOperation rgbBlendOperation) + { + Validate(); + [(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr setRgbBlendOperation:MTLBlendOperation(rgbBlendOperation)]; + } + + void RenderPipelineColorAttachmentDescriptor::SetSourceAlphaBlendFactor(BlendFactor sourceAlphaBlendFactor) + { + Validate(); + [(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr setSourceAlphaBlendFactor:MTLBlendFactor(sourceAlphaBlendFactor)]; + } + + void RenderPipelineColorAttachmentDescriptor::SetDestinationAlphaBlendFactor(BlendFactor destinationAlphaBlendFactor) + { + Validate(); + [(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr setDestinationAlphaBlendFactor:MTLBlendFactor(destinationAlphaBlendFactor)]; + } + + void RenderPipelineColorAttachmentDescriptor::SetAlphaBlendOperation(BlendOperation alphaBlendOperation) + { + Validate(); + [(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr setAlphaBlendOperation:MTLBlendOperation(alphaBlendOperation)]; + } + + void RenderPipelineColorAttachmentDescriptor::SetWriteMask(ColorWriteMask writeMask) + { + Validate(); + [(__bridge MTLRenderPipelineColorAttachmentDescriptor*)m_ptr setWriteMask:MTLColorWriteMask(writeMask)]; + } + + RenderPipelineReflection::RenderPipelineReflection() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLRenderPipelineReflection alloc] init] }) + { + } + + const ns::Array RenderPipelineReflection::GetVertexArguments() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPipelineReflection*)m_ptr vertexArguments] }; + } + + const ns::Array RenderPipelineReflection::GetFragmentArguments() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPipelineReflection*)m_ptr fragmentArguments] }; + } + + RenderPipelineDescriptor::RenderPipelineDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLRenderPipelineDescriptor alloc] init] }) + { + } + + ns::String RenderPipelineDescriptor::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPipelineDescriptor*)m_ptr label] }; + } + + Function RenderPipelineDescriptor::GetVertexFunction() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPipelineDescriptor*)m_ptr vertexFunction] }; + } + + Function RenderPipelineDescriptor::GetFragmentFunction() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPipelineDescriptor*)m_ptr fragmentFunction] }; + } + + VertexDescriptor RenderPipelineDescriptor::GetVertexDescriptor() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPipelineDescriptor*)m_ptr vertexDescriptor] }; + } + + uint32_t RenderPipelineDescriptor::GetSampleCount() const + { + Validate(); + return uint32_t([(__bridge MTLRenderPipelineDescriptor*)m_ptr sampleCount]); + } + + bool RenderPipelineDescriptor::IsAlphaToCoverageEnabled() const + { + Validate(); + return [(__bridge MTLRenderPipelineDescriptor*)m_ptr isAlphaToCoverageEnabled]; + } + + bool RenderPipelineDescriptor::IsAlphaToOneEnabled() const + { + Validate(); + return [(__bridge MTLRenderPipelineDescriptor*)m_ptr isAlphaToOneEnabled]; + } + + bool RenderPipelineDescriptor::IsRasterizationEnabled() const + { + Validate(); + return [(__bridge MTLRenderPipelineDescriptor*)m_ptr isRasterizationEnabled]; + } + + ns::Array RenderPipelineDescriptor::GetColorAttachments() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLRenderPipelineDescriptor*)m_ptr colorAttachments] }; + } + + PixelFormat RenderPipelineDescriptor::GetDepthAttachmentPixelFormat() const + { + Validate(); + return PixelFormat([(__bridge MTLRenderPipelineDescriptor*)m_ptr depthAttachmentPixelFormat]); + } + + PixelFormat RenderPipelineDescriptor::GetStencilAttachmentPixelFormat() const + { + Validate(); + return PixelFormat([(__bridge MTLRenderPipelineDescriptor*)m_ptr stencilAttachmentPixelFormat]); + } + + PrimitiveTopologyClass RenderPipelineDescriptor::GetInputPrimitiveTopology() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + return PrimitiveTopologyClass([(__bridge MTLRenderPipelineDescriptor*)m_ptr inputPrimitiveTopology]); +#else + return PrimitiveTopologyClass(0); +#endif + } + + TessellationPartitionMode RenderPipelineDescriptor::GetTessellationPartitionMode() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return TessellationPartitionMode([(__bridge MTLRenderPipelineDescriptor*)m_ptr tessellationPartitionMode]); +#else + return TessellationPartitionMode(0); +#endif + } + + uint32_t RenderPipelineDescriptor::GetMaxTessellationFactor() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return uint32_t([(__bridge MTLRenderPipelineDescriptor*)m_ptr maxTessellationFactor]); +#else + return 0; +#endif + } + + bool RenderPipelineDescriptor::IsTessellationFactorScaleEnabled() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return [(__bridge MTLRenderPipelineDescriptor*)m_ptr isTessellationFactorScaleEnabled]; +#else + return false; +#endif + } + + TessellationFactorFormat RenderPipelineDescriptor::GetTessellationFactorFormat() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return TessellationFactorFormat([(__bridge MTLRenderPipelineDescriptor*)m_ptr tessellationFactorFormat]); +#else + return TessellationFactorFormat(0); +#endif + } + + TessellationControlPointIndexType RenderPipelineDescriptor::GetTessellationControlPointIndexType() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return TessellationControlPointIndexType([(__bridge MTLRenderPipelineDescriptor*)m_ptr tessellationControlPointIndexType]); +#else + return TessellationControlPointIndexType(0); +#endif + } + + TessellationFactorStepFunction RenderPipelineDescriptor::GetTessellationFactorStepFunction() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return TessellationFactorStepFunction([(__bridge MTLRenderPipelineDescriptor*)m_ptr tessellationFactorStepFunction]); +#else + return TessellationFactorStepFunction(0); +#endif + } + + Winding RenderPipelineDescriptor::GetTessellationOutputWindingOrder() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return Winding([(__bridge MTLRenderPipelineDescriptor*)m_ptr tessellationOutputWindingOrder]); +#else + return Winding(0); +#endif + } + + void RenderPipelineDescriptor::SetLabel(const ns::String& label) + { + Validate(); + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; + } + + void RenderPipelineDescriptor::SetVertexFunction(const Function& vertexFunction) + { + Validate(); + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setVertexFunction:(__bridge id)vertexFunction.GetPtr()]; + } + + void RenderPipelineDescriptor::SetFragmentFunction(const Function& fragmentFunction) + { + Validate(); + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setFragmentFunction:(__bridge id)fragmentFunction.GetPtr()]; + } + + void RenderPipelineDescriptor::SetVertexDescriptor(const VertexDescriptor& vertexDescriptor) + { + Validate(); + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setVertexDescriptor:(__bridge MTLVertexDescriptor*)vertexDescriptor.GetPtr()]; + } + + void RenderPipelineDescriptor::SetSampleCount(uint32_t sampleCount) + { + Validate(); + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setSampleCount:sampleCount]; + } + + void RenderPipelineDescriptor::SetAlphaToCoverageEnabled(bool alphaToCoverageEnabled) + { + Validate(); + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setAlphaToCoverageEnabled:alphaToCoverageEnabled]; + } + + void RenderPipelineDescriptor::SetAlphaToOneEnabled(bool alphaToOneEnabled) + { + Validate(); + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setAlphaToOneEnabled:alphaToOneEnabled]; + } + + void RenderPipelineDescriptor::SetRasterizationEnabled(bool rasterizationEnabled) + { + Validate(); + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setRasterizationEnabled:rasterizationEnabled]; + } + + void RenderPipelineDescriptor::SetDepthAttachmentPixelFormat(PixelFormat depthAttachmentPixelFormat) + { + Validate(); + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setDepthAttachmentPixelFormat:MTLPixelFormat(depthAttachmentPixelFormat)]; + } + + void RenderPipelineDescriptor::SetStencilAttachmentPixelFormat(PixelFormat depthAttachmentPixelFormat) + { + Validate(); + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setStencilAttachmentPixelFormat:MTLPixelFormat(depthAttachmentPixelFormat)]; + } + + void RenderPipelineDescriptor::SetInputPrimitiveTopology(PrimitiveTopologyClass inputPrimitiveTopology) + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setInputPrimitiveTopology:MTLPrimitiveTopologyClass(inputPrimitiveTopology)]; +#endif + } + + void RenderPipelineDescriptor::SetTessellationPartitionMode(TessellationPartitionMode tessellationPartitionMode) + { +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setTessellationPartitionMode:MTLTessellationPartitionMode(tessellationPartitionMode)]; +#endif + } + + void RenderPipelineDescriptor::SetMaxTessellationFactor(uint32_t maxTessellationFactor) + { +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setMaxTessellationFactor:maxTessellationFactor]; +#endif + } + + void RenderPipelineDescriptor::SetTessellationFactorScaleEnabled(bool tessellationFactorScaleEnabled) + { +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setTessellationFactorScaleEnabled:tessellationFactorScaleEnabled]; +#endif + } + + void RenderPipelineDescriptor::SetTessellationFactorFormat(TessellationFactorFormat tessellationFactorFormat) + { +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setTessellationFactorFormat:MTLTessellationFactorFormat(tessellationFactorFormat)]; +#endif + } + + void RenderPipelineDescriptor::SetTessellationControlPointIndexType(TessellationControlPointIndexType tessellationControlPointIndexType) + { +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setTessellationControlPointIndexType:MTLTessellationControlPointIndexType(tessellationControlPointIndexType)]; +#endif + } + + void RenderPipelineDescriptor::SetTessellationFactorStepFunction(TessellationFactorStepFunction tessellationFactorStepFunction) + { +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setTessellationFactorStepFunction:MTLTessellationFactorStepFunction(tessellationFactorStepFunction)]; +#endif + } + + void RenderPipelineDescriptor::SetTessellationOutputWindingOrder(Winding tessellationOutputWindingOrder) + { +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLRenderPipelineDescriptor*)m_ptr setTessellationOutputWindingOrder:MTLWinding(tessellationOutputWindingOrder)]; +#endif + } + + void RenderPipelineDescriptor::Reset() + { + [(__bridge MTLRenderPipelineDescriptor*)m_ptr reset]; + } + + ns::String RenderPipelineState::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; + } + + Device RenderPipelineState::GetDevice() const + { + Validate(); + return ns::Handle { (__bridge void*)[(__bridge id)m_ptr device] }; + } +} + +////////////////////////////////////// +// FILE: resource.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "resource.hpp" +// #include "heap.hpp" +#include + +namespace mtlpp +{ + ns::String Resource::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; + } + + CpuCacheMode Resource::GetCpuCacheMode() const + { + Validate(); + return CpuCacheMode([(__bridge id)m_ptr cpuCacheMode]); + } + + StorageMode Resource::GetStorageMode() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + return StorageMode([(__bridge id)m_ptr storageMode]); +#else + return StorageMode(0); +#endif + } + + Heap Resource::GetHeap() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr heap] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + bool Resource::IsAliasable() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + return [(__bridge id)m_ptr isAliasable]; +#else + return false; +#endif + } + + void Resource::SetLabel(const ns::String& label) + { + Validate(); + [(__bridge id)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; + } + + PurgeableState Resource::SetPurgeableState(PurgeableState state) + { + Validate(); + return PurgeableState([(__bridge id)m_ptr setPurgeableState:MTLPurgeableState(state)]); + } + + void Resource::MakeAliasable() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_IOS(10_0) + [(__bridge id)m_ptr makeAliasable]; +#endif + } +} + +////////////////////////////////////// +// FILE: sampler.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "sampler.hpp" +#include + +namespace mtlpp +{ + SamplerDescriptor::SamplerDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLSamplerDescriptor alloc] init] }) + { + } + + SamplerMinMagFilter SamplerDescriptor::GetMinFilter() const + { + Validate(); + return SamplerMinMagFilter([(__bridge MTLSamplerDescriptor*)m_ptr minFilter]); + } + + SamplerMinMagFilter SamplerDescriptor::GetMagFilter() const + { + Validate(); + return SamplerMinMagFilter([(__bridge MTLSamplerDescriptor*)m_ptr magFilter]); + } + + SamplerMipFilter SamplerDescriptor::GetMipFilter() const + { + Validate(); + return SamplerMipFilter([(__bridge MTLSamplerDescriptor*)m_ptr mipFilter]); + } + + uint32_t SamplerDescriptor::GetMaxAnisotropy() const + { + Validate(); + return uint32_t([(__bridge MTLSamplerDescriptor*)m_ptr maxAnisotropy]); + } + + SamplerAddressMode SamplerDescriptor::GetSAddressMode() const + { + Validate(); + return SamplerAddressMode([(__bridge MTLSamplerDescriptor*)m_ptr sAddressMode]); + } + + SamplerAddressMode SamplerDescriptor::GetTAddressMode() const + { + Validate(); + return SamplerAddressMode([(__bridge MTLSamplerDescriptor*)m_ptr tAddressMode]); + } + + SamplerAddressMode SamplerDescriptor::GetRAddressMode() const + { + Validate(); + return SamplerAddressMode([(__bridge MTLSamplerDescriptor*)m_ptr rAddressMode]); + } + + SamplerBorderColor SamplerDescriptor::GetBorderColor() const + { +#if MTLPP_IS_AVAILABLE_MAC(10_12) + return SamplerBorderColor([(__bridge MTLSamplerDescriptor*)m_ptr borderColor]); +#else + return SamplerBorderColor(0); +#endif + } + + bool SamplerDescriptor::IsNormalizedCoordinates() const + { + Validate(); + return [(__bridge MTLSamplerDescriptor*)m_ptr normalizedCoordinates]; + } + + float SamplerDescriptor::GetLodMinClamp() const + { + Validate(); + return [(__bridge MTLSamplerDescriptor*)m_ptr lodMinClamp]; + } + + float SamplerDescriptor::GetLodMaxClamp() const + { + Validate(); + return [(__bridge MTLSamplerDescriptor*)m_ptr lodMaxClamp]; + } + + CompareFunction SamplerDescriptor::GetCompareFunction() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + return CompareFunction([(__bridge MTLSamplerDescriptor*)m_ptr compareFunction]); +#else + return CompareFunction(0); +#endif + } + + ns::String SamplerDescriptor::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLSamplerDescriptor*)m_ptr label] }; + } + + void SamplerDescriptor::SetMinFilter(SamplerMinMagFilter minFilter) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setMinFilter:MTLSamplerMinMagFilter(minFilter)]; + } + + void SamplerDescriptor::SetMagFilter(SamplerMinMagFilter magFilter) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setMagFilter:MTLSamplerMinMagFilter(magFilter)]; + } + + void SamplerDescriptor::SetMipFilter(SamplerMipFilter mipFilter) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setMipFilter:MTLSamplerMipFilter(mipFilter)]; + } + + void SamplerDescriptor::SetMaxAnisotropy(uint32_t maxAnisotropy) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setMaxAnisotropy:maxAnisotropy]; + } + + void SamplerDescriptor::SetSAddressMode(SamplerAddressMode sAddressMode) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setSAddressMode:MTLSamplerAddressMode(sAddressMode)]; + } + + void SamplerDescriptor::SetTAddressMode(SamplerAddressMode tAddressMode) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setTAddressMode:MTLSamplerAddressMode(tAddressMode)]; + } + + void SamplerDescriptor::SetRAddressMode(SamplerAddressMode rAddressMode) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setRAddressMode:MTLSamplerAddressMode(rAddressMode)]; + } + + void SamplerDescriptor::SetBorderColor(SamplerBorderColor borderColor) + { +#if MTLPP_IS_AVAILABLE_MAC(10_12) + [(__bridge MTLSamplerDescriptor*)m_ptr setBorderColor:MTLSamplerBorderColor(borderColor)]; +#endif + } + + void SamplerDescriptor::SetNormalizedCoordinates(bool normalizedCoordinates) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setNormalizedCoordinates:normalizedCoordinates]; + } + + void SamplerDescriptor::SetLodMinClamp(float lodMinClamp) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setLodMinClamp:lodMinClamp]; + } + + void SamplerDescriptor::SetLodMaxClamp(float lodMaxClamp) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setLodMaxClamp:lodMaxClamp]; + } + + void SamplerDescriptor::SetCompareFunction(CompareFunction compareFunction) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + [(__bridge MTLSamplerDescriptor*)m_ptr setCompareFunction:MTLCompareFunction(compareFunction)]; +#endif + } + + void SamplerDescriptor::SetLabel(const ns::String& label) + { + Validate(); + [(__bridge MTLSamplerDescriptor*)m_ptr setLabel:(__bridge NSString*)label.GetPtr()]; + } + + ns::String SamplerState::GetLabel() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr label] }; + } + + Device SamplerState::GetDevice() const + { + Validate(); + return ns::Handle { (__bridge void*)[(__bridge id)m_ptr device] }; + } +} + + +////////////////////////////////////// +// FILE: stage_input_output_descriptor.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "stage_input_output_descriptor.hpp" +#if MTLPP_IS_AVAILABLE(10_12, 10_0) +# include +#endif + +namespace mtlpp +{ + BufferLayoutDescriptor::BufferLayoutDescriptor() : +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + ns::Object(ns::Handle{ (__bridge void*)[[MTLBufferLayoutDescriptor alloc] init] }) +#else + ns::Object(ns::Handle{ nullptr }) +#endif + { + } + + uint32_t BufferLayoutDescriptor::GetStride() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return uint32_t([(__bridge MTLBufferLayoutDescriptor*)m_ptr stride]); +#else + return 0; +#endif + } + + StepFunction BufferLayoutDescriptor::GetStepFunction() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return StepFunction([(__bridge MTLBufferLayoutDescriptor*)m_ptr stepFunction]); +#else + return StepFunction(0); +#endif + } + + uint32_t BufferLayoutDescriptor::GetStepRate() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return uint32_t([(__bridge MTLBufferLayoutDescriptor*)m_ptr stepRate]); +#else + return 0; +#endif + } + + void BufferLayoutDescriptor::SetStride(uint32_t stride) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLBufferLayoutDescriptor*)m_ptr setStride:stride]; +#endif + } + + void BufferLayoutDescriptor::SetStepFunction(StepFunction stepFunction) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLBufferLayoutDescriptor*)m_ptr setStepFunction:MTLStepFunction(stepFunction)]; +#endif + } + + void BufferLayoutDescriptor::SetStepRate(uint32_t stepRate) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLBufferLayoutDescriptor*)m_ptr setStepRate:stepRate]; +#endif + } + + AttributeDescriptor::AttributeDescriptor() : +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + ns::Object(ns::Handle{ (__bridge void*)[[MTLAttributeDescriptor alloc] init] }) +#else + ns::Object(ns::Handle{ nullptr }) +#endif + { + } + + AttributeFormat AttributeDescriptor::GetFormat() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return AttributeFormat([(__bridge MTLAttributeDescriptor*)m_ptr format]); +#else + return AttributeFormat(0); +#endif + } + + uint32_t AttributeDescriptor::GetOffset() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return uint32_t([(__bridge MTLAttributeDescriptor*)m_ptr offset]); +#else + return 0; +#endif + } + + uint32_t AttributeDescriptor::GetBufferIndex() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return uint32_t([(__bridge MTLAttributeDescriptor*)m_ptr bufferIndex]); +#else + return 0; +#endif + } + + void AttributeDescriptor::SetFormat(AttributeFormat format) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLAttributeDescriptor*)m_ptr setFormat:MTLAttributeFormat(format)]; +#endif + } + + void AttributeDescriptor::SetOffset(uint32_t offset) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLAttributeDescriptor*)m_ptr setOffset:offset]; +#endif + } + + void AttributeDescriptor::SetBufferIndex(uint32_t bufferIndex) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLAttributeDescriptor*)m_ptr setBufferIndex:bufferIndex]; +#endif + } + + StageInputOutputDescriptor::StageInputOutputDescriptor() : +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + ns::Object(ns::Handle{ (__bridge void*)[[MTLStageInputOutputDescriptor alloc] init] }) +#else + ns::Object(ns::Handle{ nullptr }) +#endif + { + } + + ns::Array StageInputOutputDescriptor::GetLayouts() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return ns::Handle{ (__bridge void*)[(__bridge MTLStageInputOutputDescriptor*)m_ptr layouts] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + ns::Array StageInputOutputDescriptor::GetAttributes() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return ns::Handle{ (__bridge void*)[(__bridge MTLStageInputOutputDescriptor*)m_ptr attributes] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + IndexType StageInputOutputDescriptor::GetIndexType() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return IndexType([(__bridge MTLStageInputOutputDescriptor*)m_ptr indexType]); +#else + return IndexType(0); +#endif + } + + uint32_t StageInputOutputDescriptor::GetIndexBufferIndex() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + return uint32_t([(__bridge MTLStageInputOutputDescriptor*)m_ptr indexBufferIndex]); +#else + return 0; +#endif + } + + void StageInputOutputDescriptor::SetIndexType(IndexType indexType) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLStageInputOutputDescriptor*)m_ptr setIndexType:MTLIndexType(indexType)]; +#endif + } + + void StageInputOutputDescriptor::SetIndexBufferIndex(uint32_t indexBufferIndex) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLStageInputOutputDescriptor*)m_ptr setIndexBufferIndex:indexBufferIndex]; +#endif + } + + void StageInputOutputDescriptor::Reset() + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 10_0) + [(__bridge MTLStageInputOutputDescriptor*)m_ptr reset]; +#endif + } +} + + +////////////////////////////////////// +// FILE: texture.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "texture.hpp" +#include + +namespace mtlpp +{ + TextureDescriptor::TextureDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLTextureDescriptor alloc] init] }) + { + } + + TextureDescriptor TextureDescriptor::Texture2DDescriptor(PixelFormat pixelFormat, uint32_t width, uint32_t height, bool mipmapped) + { + return ns::Handle{ (__bridge void*)[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormat(pixelFormat) + width:width + height:height + mipmapped:mipmapped] }; + } + + TextureDescriptor TextureDescriptor::TextureCubeDescriptor(PixelFormat pixelFormat, uint32_t size, bool mipmapped) + { + return ns::Handle{ (__bridge void*)[MTLTextureDescriptor textureCubeDescriptorWithPixelFormat:MTLPixelFormat(pixelFormat) + size:size + mipmapped:mipmapped] }; + } + + TextureType TextureDescriptor::GetTextureType() const + { + Validate(); + return TextureType([(__bridge MTLTextureDescriptor*)m_ptr textureType]); + } + + PixelFormat TextureDescriptor::GetPixelFormat() const + { + Validate(); + return PixelFormat([(__bridge MTLTextureDescriptor*)m_ptr pixelFormat]); + } + + uint32_t TextureDescriptor::GetWidth() const + { + Validate(); + return uint32_t([(__bridge MTLTextureDescriptor*)m_ptr width]); + } + + uint32_t TextureDescriptor::GetHeight() const + { + Validate(); + return uint32_t([(__bridge MTLTextureDescriptor*)m_ptr height]); + } + + uint32_t TextureDescriptor::GetDepth() const + { + Validate(); + return uint32_t([(__bridge MTLTextureDescriptor*)m_ptr depth]); + } + + uint32_t TextureDescriptor::GetMipmapLevelCount() const + { + Validate(); + return uint32_t([(__bridge MTLTextureDescriptor*)m_ptr mipmapLevelCount]); + } + + uint32_t TextureDescriptor::GetSampleCount() const + { + Validate(); + return uint32_t([(__bridge MTLTextureDescriptor*)m_ptr sampleCount]); + } + + uint32_t TextureDescriptor::GetArrayLength() const + { + Validate(); + return uint32_t([(__bridge MTLTextureDescriptor*)m_ptr arrayLength]); + } + + ResourceOptions TextureDescriptor::GetResourceOptions() const + { + Validate(); + return ResourceOptions([(__bridge MTLTextureDescriptor*)m_ptr resourceOptions]); + } + + CpuCacheMode TextureDescriptor::GetCpuCacheMode() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + return CpuCacheMode([(__bridge MTLTextureDescriptor*)m_ptr cpuCacheMode]); +#else + return CpuCacheMode(0); +#endif + } + + StorageMode TextureDescriptor::GetStorageMode() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + return StorageMode([(__bridge MTLTextureDescriptor*)m_ptr storageMode]); +#else + return StorageMode(0); +#endif + } + + TextureUsage TextureDescriptor::GetUsage() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + return TextureUsage([(__bridge MTLTextureDescriptor*)m_ptr usage]); +#else + return TextureUsage(0); +#endif + } + + void TextureDescriptor::SetTextureType(TextureType textureType) + { + Validate(); + [(__bridge MTLTextureDescriptor*)m_ptr setTextureType:MTLTextureType(textureType)]; + } + + void TextureDescriptor::SetPixelFormat(PixelFormat pixelFormat) + { + Validate(); + [(__bridge MTLTextureDescriptor*)m_ptr setPixelFormat:MTLPixelFormat(pixelFormat)]; + } + + void TextureDescriptor::SetWidth(uint32_t width) + { + Validate(); + [(__bridge MTLTextureDescriptor*)m_ptr setWidth:width]; + } + + void TextureDescriptor::SetHeight(uint32_t height) + { + Validate(); + [(__bridge MTLTextureDescriptor*)m_ptr setHeight:height]; + } + + void TextureDescriptor::SetDepth(uint32_t depth) + { + Validate(); + [(__bridge MTLTextureDescriptor*)m_ptr setDepth:depth]; + } + + void TextureDescriptor::SetMipmapLevelCount(uint32_t mipmapLevelCount) + { + Validate(); + [(__bridge MTLTextureDescriptor*)m_ptr setMipmapLevelCount:mipmapLevelCount]; + } + + void TextureDescriptor::SetSampleCount(uint32_t sampleCount) + { + Validate(); + [(__bridge MTLTextureDescriptor*)m_ptr setSampleCount:sampleCount]; + } + + void TextureDescriptor::SetArrayLength(uint32_t arrayLength) + { + Validate(); + [(__bridge MTLTextureDescriptor*)m_ptr setArrayLength:arrayLength]; + } + + void TextureDescriptor::SetResourceOptions(ResourceOptions resourceOptions) + { + Validate(); + [(__bridge MTLTextureDescriptor*)m_ptr setResourceOptions:MTLResourceOptions(resourceOptions)]; + } + + void TextureDescriptor::SetCpuCacheMode(CpuCacheMode cpuCacheMode) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + [(__bridge MTLTextureDescriptor*)m_ptr setCpuCacheMode:MTLCPUCacheMode(cpuCacheMode)]; +#endif + } + + void TextureDescriptor::SetStorageMode(StorageMode storageMode) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + [(__bridge MTLTextureDescriptor*)m_ptr setStorageMode:MTLStorageMode(storageMode)]; +#endif + } + + void TextureDescriptor::SetUsage(TextureUsage usage) + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + [(__bridge MTLTextureDescriptor*)m_ptr setUsage:MTLTextureUsage(usage)]; +#endif + } + + Resource Texture::GetRootResource() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 8_0) +# if MTLPP_IS_AVAILABLE(10_12, 10_0) + return ns::Handle{ nullptr }; +# else + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr rootResource] }; +# endif +#else + return ns::Handle{ nullptr }; +#endif + } + + Texture Texture::GetParentTexture() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr parentTexture] }; +#else + return ns::Handle{ nullptr }; +#endif + } + + uint32_t Texture::GetParentRelativeLevel() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + return uint32_t([(__bridge id)m_ptr parentRelativeLevel]); +#else + return 0; +#endif + + } + + uint32_t Texture::GetParentRelativeSlice() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_11, 9_0) + return uint32_t([(__bridge id)m_ptr parentRelativeSlice]); +#else + return 0; +#endif + + } + + Buffer Texture::GetBuffer() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 9_0) + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr buffer] }; +#else + return ns::Handle{ nullptr }; +#endif + + } + + uint32_t Texture::GetBufferOffset() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 9_0) + return uint32_t([(__bridge id)m_ptr bufferOffset]); +#else + return 0; +#endif + + } + + uint32_t Texture::GetBufferBytesPerRow() const + { + Validate(); +#if MTLPP_IS_AVAILABLE(10_12, 9_0) + return uint32_t([(__bridge id)m_ptr bufferBytesPerRow]); +#else + return 0; +#endif + + } + + uint32_t Texture::GetIOSurfacePlane() const + { + Validate(); +#if MTLPP_IS_AVAILABLE_MAC(10_11) + return uint32_t([(__bridge id)m_ptr iosurfacePlane]); +#else + return 0; +#endif + } + + TextureType Texture::GetTextureType() const + { + Validate(); + return TextureType([(__bridge id)m_ptr textureType]); + } + + PixelFormat Texture::GetPixelFormat() const + { + Validate(); + return PixelFormat([(__bridge id)m_ptr pixelFormat]); + } + + uint32_t Texture::GetWidth() const + { + Validate(); + return uint32_t([(__bridge id)m_ptr width]); + } + + uint32_t Texture::GetHeight() const + { + Validate(); + return uint32_t([(__bridge id)m_ptr height]); + } + + uint32_t Texture::GetDepth() const + { + Validate(); + return uint32_t([(__bridge id)m_ptr depth]); + } + + uint32_t Texture::GetMipmapLevelCount() const + { + Validate(); + return uint32_t([(__bridge id)m_ptr mipmapLevelCount]); + } + + uint32_t Texture::GetSampleCount() const + { + Validate(); + return uint32_t([(__bridge id)m_ptr sampleCount]); + } + + uint32_t Texture::GetArrayLength() const + { + Validate(); + return uint32_t([(__bridge id)m_ptr arrayLength]); + } + + TextureUsage Texture::GetUsage() const + { + Validate(); + return TextureUsage([(__bridge id)m_ptr usage]); + } + + bool Texture::IsFrameBufferOnly() const + { + Validate(); + return [(__bridge id)m_ptr isFramebufferOnly]; + } + + void Texture::GetBytes(void* pixelBytes, uint32_t bytesPerRow, uint32_t bytesPerImage, const Region& fromRegion, uint32_t mipmapLevel, uint32_t slice) + { + Validate(); + [(__bridge id)m_ptr getBytes:pixelBytes + bytesPerRow:bytesPerRow + bytesPerImage:bytesPerImage + fromRegion:MTLRegionMake3D(fromRegion.Origin.X, fromRegion.Origin.Y, fromRegion.Origin.Z, fromRegion.Size.Width, fromRegion.Size.Height, fromRegion.Size.Depth) + mipmapLevel:mipmapLevel + slice:slice]; + } + + void Texture::Replace(const Region& region, uint32_t mipmapLevel, uint32_t slice, void* pixelBytes, uint32_t bytesPerRow, uint32_t bytesPerImage) + { + Validate(); + [(__bridge id)m_ptr replaceRegion:MTLRegionMake3D(region.Origin.X, region.Origin.Y, region.Origin.Z, region.Size.Width, region.Size.Height, region.Size.Depth) + mipmapLevel:mipmapLevel + slice:slice + withBytes:pixelBytes + bytesPerRow:bytesPerRow + bytesPerImage:bytesPerImage]; + } + + void Texture::GetBytes(void* pixelBytes, uint32_t bytesPerRow, const Region& fromRegion, uint32_t mipmapLevel) + { + Validate(); + [(__bridge id)m_ptr getBytes:pixelBytes + bytesPerRow:bytesPerRow + fromRegion:MTLRegionMake3D(fromRegion.Origin.X, fromRegion.Origin.Y, fromRegion.Origin.Z, fromRegion.Size.Width, fromRegion.Size.Height, fromRegion.Size.Depth) + mipmapLevel:mipmapLevel]; + } + + void Texture::Replace(const Region& region, uint32_t mipmapLevel, void* pixelBytes, uint32_t bytesPerRow) + { + Validate(); + [(__bridge id)m_ptr replaceRegion:MTLRegionMake3D(region.Origin.X, region.Origin.Y, region.Origin.Z, region.Size.Width, region.Size.Height, region.Size.Depth) + mipmapLevel:mipmapLevel + withBytes:pixelBytes + bytesPerRow:bytesPerRow]; + } + + Texture Texture::NewTextureView(PixelFormat pixelFormat) + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newTextureViewWithPixelFormat:MTLPixelFormat(pixelFormat)] }; + } + + Texture Texture::NewTextureView(PixelFormat pixelFormat, TextureType textureType, const ns::Range& mipmapLevelRange, const ns::Range& sliceRange) + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge id)m_ptr newTextureViewWithPixelFormat:MTLPixelFormat(pixelFormat) + textureType:MTLTextureType(textureType) + levels:NSMakeRange(mipmapLevelRange.Location, mipmapLevelRange.Length) + slices:NSMakeRange(sliceRange.Location, sliceRange.Length)] }; + } +} + +////////////////////////////////////// +// FILE: vertex_descriptor.mm +////////////////////////////////////// +/* + * Copyright 2016 Nikolay Aleksiev. All rights reserved. + * License: https://github.com/naleksiev/mtlpp/blob/master/LICENSE + */ + +// #include "vertex_descriptor.hpp" +#include + +namespace mtlpp +{ + VertexBufferLayoutDescriptor::VertexBufferLayoutDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLVertexBufferLayoutDescriptor alloc] init] }) + { + } + + uint32_t VertexBufferLayoutDescriptor::GetStride() const + { + Validate(); + return uint32_t([(__bridge MTLVertexBufferLayoutDescriptor*)m_ptr stride]); + } + + uint32_t VertexBufferLayoutDescriptor::GetStepRate() const + { + Validate(); + return uint32_t([(__bridge MTLVertexBufferLayoutDescriptor*)m_ptr stepRate]); + } + + VertexStepFunction VertexBufferLayoutDescriptor::GetStepFunction() const + { + Validate(); + return VertexStepFunction([(__bridge MTLVertexBufferLayoutDescriptor*)m_ptr stepFunction]); + } + + void VertexBufferLayoutDescriptor::SetStride(uint32_t stride) + { + Validate(); + [(__bridge MTLVertexBufferLayoutDescriptor*)m_ptr setStride:stride]; + } + + void VertexBufferLayoutDescriptor::SetStepRate(uint32_t stepRate) + { + Validate(); + [(__bridge MTLVertexBufferLayoutDescriptor*)m_ptr setStepRate:stepRate]; + } + + void VertexBufferLayoutDescriptor::SetStepFunction(VertexStepFunction stepFunction) + { + Validate(); + [(__bridge MTLVertexBufferLayoutDescriptor*)m_ptr setStepFunction:MTLVertexStepFunction(stepFunction)]; + } + + VertexAttributeDescriptor::VertexAttributeDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLVertexAttributeDescriptor alloc] init] }) + { + } + + VertexFormat VertexAttributeDescriptor::GetFormat() const + { + Validate(); + return VertexFormat([(__bridge MTLVertexAttributeDescriptor*)m_ptr format]); + } + + uint32_t VertexAttributeDescriptor::GetOffset() const + { + Validate(); + return uint32_t([(__bridge MTLVertexAttributeDescriptor*)m_ptr offset]); + } + + uint32_t VertexAttributeDescriptor::GetBufferIndex() const + { + Validate(); + return uint32_t([(__bridge MTLVertexAttributeDescriptor*)m_ptr bufferIndex]); + } + + void VertexAttributeDescriptor::SetFormat(VertexFormat format) + { + Validate(); + [(__bridge MTLVertexAttributeDescriptor*)m_ptr setFormat:MTLVertexFormat(format)]; + } + + void VertexAttributeDescriptor::SetOffset(uint32_t offset) + { + Validate(); + [(__bridge MTLVertexAttributeDescriptor*)m_ptr setOffset:offset]; + } + + void VertexAttributeDescriptor::SetBufferIndex(uint32_t bufferIndex) + { + Validate(); + [(__bridge MTLVertexAttributeDescriptor*)m_ptr setBufferIndex:bufferIndex]; + } + + VertexDescriptor::VertexDescriptor() : + ns::Object(ns::Handle{ (__bridge void*)[[MTLVertexDescriptor alloc] init] }) + { + } + + ns::Array VertexDescriptor::GetLayouts() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLVertexDescriptor*)m_ptr layouts] }; + } + + ns::Array VertexDescriptor::GetAttributes() const + { + Validate(); + return ns::Handle{ (__bridge void*)[(__bridge MTLVertexDescriptor*)m_ptr attributes] }; + } + + void VertexDescriptor::Reset() + { + Validate(); + [(__bridge MTLVertexDescriptor*)m_ptr reset]; + } +} + diff --git a/3rdparty/bgfx/3rdparty/nvtt/NVIDIA_Texture_Tools_LICENSE.txt b/3rdparty/bgfx/3rdparty/nvtt/NVIDIA_Texture_Tools_LICENSE.txt deleted file mode 100644 index c422f71..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/NVIDIA_Texture_Tools_LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -NVIDIA Texture Tools 2.0 is licensed under the MIT license. - -Copyright (c) 2007 NVIDIA Corporation - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc6h/bits.h b/3rdparty/bgfx/3rdparty/nvtt/bc6h/bits.h deleted file mode 100644 index c47a7c6..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc6h/bits.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ -#ifndef _ZOH_BITS_H -#define _ZOH_BITS_H - -// read/write a bitstream - -#include "nvcore/debug.h" - -namespace ZOH { - -class Bits -{ -public: - - Bits(char *data, int maxdatabits) { nvAssert (data && maxdatabits > 0); bptr = bend = 0; bits = data; maxbits = maxdatabits; readonly = 0;} - Bits(const char *data, int availdatabits) { nvAssert (data && availdatabits > 0); bptr = 0; bend = availdatabits; cbits = data; maxbits = availdatabits; readonly = 1;} - - void write(int value, int nbits) { - nvAssert (nbits >= 0 && nbits < 32); - nvAssert (sizeof(int)>= 4); - for (int i=0; i>i); - } - int read(int nbits) { - nvAssert (nbits >= 0 && nbits < 32); - nvAssert (sizeof(int)>= 4); - int out = 0; - for (int i=0; i= 0 && ptr < maxbits); bptr = ptr; } - int getsize() { return bend; } - -private: - int bptr; // next bit to read - int bend; // last written bit + 1 - char *bits; // ptr to user bit stream - const char *cbits; // ptr to const user bit stream - int maxbits; // max size of user bit stream - char readonly; // 1 if this is a read-only stream - - int readone() { - nvAssert (bptr < bend); - if (bptr >= bend) return 0; - int bit = (readonly ? cbits[bptr>>3] : bits[bptr>>3]) & (1 << (bptr & 7)); - ++bptr; - return bit != 0; - } - void writeone(int bit) { - nvAssert (!readonly); // "Writing a read-only bit stream" - nvAssert (bptr < maxbits); - if (bptr >= maxbits) return; - if (bit&1) - bits[bptr>>3] |= 1 << (bptr & 7); - else - bits[bptr>>3] &= ~(1 << (bptr & 7)); - if (bptr++ >= bend) bend = bptr; - } -}; - -} - -#endif diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc6h/shapes_two.h b/3rdparty/bgfx/3rdparty/nvtt/bc6h/shapes_two.h deleted file mode 100644 index 2fc5559..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc6h/shapes_two.h +++ /dev/null @@ -1,133 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ -#pragma once -#ifndef _ZOH_SHAPES_TWO_H -#define _ZOH_SHAPES_TWO_H - -// shapes for two regions - -#define NREGIONS 2 -#define NSHAPES 64 -#define SHAPEBITS 6 - -static const int shapes[NSHAPES*16] = -{ -0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, -0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, -0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, -0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, - -0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, -0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, -0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, -0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, - -0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, -0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, -0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, - -0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - -0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, -1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, -1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, - -0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, -0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, -0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, -0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, - -0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, -0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, -0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, -0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, - -0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, -0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, - -0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, -0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, -0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, -0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, - -0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, -1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, -0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, -1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, - -0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, -0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, -1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, -1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, - -0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, -1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, -0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, - -0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, -0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, - -0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, -1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, -1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, -0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, - -0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, -1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, -1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, - -0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, -1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, -0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, -0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, - -}; - -#define REGION(x,y,si) shapes[((si)&3)*4+((si)>>2)*64+(x)+(y)*16] - -static const int shapeindex_to_compressed_indices[NSHAPES*2] = -{ - 0,15, 0,15, 0,15, 0,15, - 0,15, 0,15, 0,15, 0,15, - 0,15, 0,15, 0,15, 0,15, - 0,15, 0,15, 0,15, 0,15, - - 0,15, 0, 2, 0, 8, 0, 2, - 0, 2, 0, 8, 0, 8, 0,15, - 0, 2, 0, 8, 0, 2, 0, 2, - 0, 8, 0, 8, 0, 2, 0, 2, - - 0,15, 0,15, 0, 6, 0, 8, - 0, 2, 0, 8, 0,15, 0,15, - 0, 2, 0, 8, 0, 2, 0, 2, - 0, 2, 0,15, 0,15, 0, 6, - - 0, 6, 0, 2, 0, 6, 0, 8, - 0,15, 0,15, 0, 2, 0, 2, - 0,15, 0,15, 0,15, 0,15, - 0,15, 0, 2, 0, 2, 0,15 - -}; -#define SHAPEINDEX_TO_COMPRESSED_INDICES(si,region) shapeindex_to_compressed_indices[(si)*2+(region)] - -#endif diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc6h/tile.h b/3rdparty/bgfx/3rdparty/nvtt/bc6h/tile.h deleted file mode 100644 index 6e642a2..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc6h/tile.h +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ -#ifndef _ZOH_TILE_H -#define _ZOH_TILE_H - -#include "zoh_utils.h" -#include "nvmath/vector.h" -#include - -namespace ZOH { - -//#define USE_IMPORTANCE_MAP 1 // define this if you want to increase importance of some pixels in tile -class Tile -{ -public: - // NOTE: this returns the appropriately-clamped BIT PATTERN of the half as an INTEGRAL float value - static float half2float(uint16 h) - { - return (float) Utils::ushort_to_format(h); - } - // NOTE: this is the inverse of the above operation - static uint16 float2half(float f) - { - return Utils::format_to_ushort((int)f); - } - - // look for adjacent pixels that are identical. if there are enough of them, increase their importance - void generate_importance_map() - { - // initialize - for (int y=0; y= size_x || yn < 0 || yn >= size_y) - return false; - return( (data[y][x].x == data[yn][xn].x) && - (data[y][x].y == data[yn][xn].y) && - (data[y][x].z == data[yn][xn].z) ); - } - -#ifdef USE_IMPORTANCE_MAP - bool match_4_neighbor(int x, int y) - { - return is_equal(x,y,x-1,y) || is_equal(x,y,x+1,y) || is_equal(x,y,x,y-1) || is_equal(x,y,x,y+1); - } -#else - bool match_4_neighbor(int, int) - { - return false; - } -#endif - - Tile() {}; - ~Tile(){}; - Tile(int xs, int ys) {size_x = xs; size_y = ys;} - - static const int TILE_H = 4; - static const int TILE_W = 4; - static const int TILE_TOTAL = TILE_H * TILE_W; - nv::Vector3 data[TILE_H][TILE_W]; - float importance_map[TILE_H][TILE_W]; - int size_x, size_y; // actual size of tile -}; - -} - -#endif // _ZOH_TILE_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh.cpp deleted file mode 100644 index 3053ea1..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// the zoh compressor and decompressor - -#include "tile.h" -#include "zoh.h" - -#include // memcpy - -using namespace ZOH; - - -bool ZOH::isone(const char *block) -{ - char code = block[0] & 0x1F; - - return (code == 0x03 || code == 0x07 || code == 0x0b || code == 0x0f); -} - -void ZOH::compress(const Tile &t, char *block) -{ - char oneblock[ZOH::BLOCKSIZE], twoblock[ZOH::BLOCKSIZE]; - - float mseone = ZOH::compressone(t, oneblock); - float msetwo = ZOH::compresstwo(t, twoblock); - - if (mseone <= msetwo) - memcpy(block, oneblock, ZOH::BLOCKSIZE); - else - memcpy(block, twoblock, ZOH::BLOCKSIZE); -} - -void ZOH::decompress(const char *block, Tile &t) -{ - if (ZOH::isone(block)) - ZOH::decompressone(block, t); - else - ZOH::decompresstwo(block, t); -} - -/* -void ZOH::compress(string inf, string zohf) -{ - Array2D pixels; - int w, h; - char block[ZOH::BLOCKSIZE]; - - Exr::readRgba(inf, pixels, w, h); - FILE *zohfile = fopen(zohf.c_str(), "wb"); - if (zohfile == NULL) throw "Unable to open .zoh file for write"; - - // stuff for progress bar O.o - int ntiles = ((h+Tile::TILE_H-1)/Tile::TILE_H)*((w+Tile::TILE_W-1)/Tile::TILE_W); - int tilecnt = 0; - int ndots = 25; - int dotcnt = 0; - printf("Progress ["); - for (int i=0; i (ntiles * dotcnt)/ndots) { printf("."); fflush(stdout); ++dotcnt; } - } - } - - printf("]\n"); // advance to next line finally - - if (fclose(zohfile)) throw "Close failed on .zoh file"; -} - -static int str2int(std::string s) -{ - int thing; - std::stringstream str (stringstream::in | stringstream::out); - str << s; - str >> thing; - return thing; -} - -// zoh file name is ...-w-h.zoh, extract width and height -static void extract(string zohf, int &w, int &h) -{ - size_t n = zohf.rfind('.', zohf.length()-1); - size_t n1 = zohf.rfind('-', n-1); - size_t n2 = zohf.rfind('-', n1-1); - string width = zohf.substr(n2+1, n1-n2-1); - w = str2int(width); - string height = zohf.substr(n1+1, n-n1-1); - h = str2int(height); -} - -static int mode_to_prec[] = { - 10,7,11,10, - 10,7,11,11, - 10,7,11,12, - 10,7,9,16, - 10,7,8,-1, - 10,7,8,-1, - 10,7,8,-1, - 10,7,6,-1, -}; - -static int shapeindexhist[32], modehist[32], prechistone[16], prechisttwo[16], oneregion, tworegions; - -static void stats(char block[ZOH::BLOCKSIZE]) -{ - char mode = block[0] & 0x1F; if ((mode & 0x3) == 0) mode = 0; if ((mode & 0x3) == 1) mode = 1; modehist[mode]++; - int prec = mode_to_prec[mode]; - nvAssert (prec != -1); - if (!ZOH::isone(block)) - { - tworegions++; - prechisttwo[prec]++; - int shapeindex = ((block[0] & 0xe0) >> 5) | ((block[1] & 0x3) << 3); - shapeindexhist[shapeindex]++; - } - else - { - oneregion++; - prechistone[prec]++; - } -} - -static void printstats() -{ - printf("\nPrecision histogram 10b to 16b one region: "); for (int i=10; i<=16; ++i) printf("%d,", prechistone[i]); - printf("\nPrecision histogram 6b to 11b two regions: "); for (int i=6; i<=11; ++i) printf("%d,", prechisttwo[i]); - printf("\nMode histogram: "); for (int i=0; i<32; ++i) printf("%d,", modehist[i]); - printf("\nShape index histogram: "); for (int i=0; i<32; ++i) printf("%d,", shapeindexhist[i]); - printf("\nOne region %5.2f%% Two regions %5.2f%%", 100.0*oneregion/float(oneregion+tworegions), 100.0*tworegions/float(oneregion+tworegions)); - printf("\n"); -} - -void ZOH::decompress(string zohf, string outf) -{ - Array2D pixels; - int w, h; - char block[ZOH::BLOCKSIZE]; - - extract(zohf, w, h); - FILE *zohfile = fopen(zohf.c_str(), "rb"); - if (zohfile == NULL) throw "Unable to open .zoh file for read"; - pixels.resizeErase(h, w); - - // convert to tiles and decompress each tile - for (int y=0; y - -using namespace nv; -using namespace ZOH; - -static const int denom7_weights_64[] = {0, 9, 18, 27, 37, 46, 55, 64}; // divided by 64 -static const int denom15_weights_64[] = {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64}; // divided by 64 - -/*static*/ Format Utils::FORMAT; - -int Utils::lerp(int a, int b, int i, int denom) -{ - nvDebugCheck (denom == 3 || denom == 7 || denom == 15); - nvDebugCheck (i >= 0 && i <= denom); - - int round = 32, shift = 6; - const int *weights; - - switch(denom) - { - case 3: denom *= 5; i *= 5; // fall through to case 15 - case 15: weights = denom15_weights_64; break; - case 7: weights = denom7_weights_64; break; - default: nvDebugCheck(0); - } - - return (a*weights[denom-i] +b*weights[i] + round) >> shift; -} - -Vector3 Utils::lerp(const Vector3& a, const Vector3 &b, int i, int denom) -{ - nvDebugCheck (denom == 3 || denom == 7 || denom == 15); - nvDebugCheck (i >= 0 && i <= denom); - - int shift = 6; - const int *weights; - - switch(denom) - { - case 3: denom *= 5; i *= 5; // fall through to case 15 - case 15: weights = denom15_weights_64; break; - case 7: weights = denom7_weights_64; break; - default: nvUnreachable(); - } - - // no need to round these as this is an exact division - return (a*float(weights[denom-i]) +b*float(weights[i])) / float(1 << shift); -} - - -/* - For unsigned f16, clamp the input to [0,F16MAX]. Thus u15. - For signed f16, clamp the input to [-F16MAX,F16MAX]. Thus s16. - - The conversions proceed as follows: - - unsigned f16: get bits. if high bit set, clamp to 0, else clamp to F16MAX. - signed f16: get bits. extract exp+mantissa and clamp to F16MAX. return -value if sign bit was set, else value - unsigned int: get bits. return as a positive value. - signed int. get bits. return as a value in -32768..32767. - - The inverse conversions are just the inverse of the above. -*/ - -// clamp the 3 channels of the input vector to the allowable range based on FORMAT -// note that each channel is a float storing the allowable range as a bit pattern converted to float -// that is, for unsigned f16 say, we would clamp each channel to the range [0, F16MAX] - -void Utils::clamp(Vector3 &v) -{ - for (int i=0; i<3; ++i) - { - switch(Utils::FORMAT) - { - case UNSIGNED_F16: - if (v.component[i] < 0.0) v.component[i] = 0; - else if (v.component[i] > F16MAX) v.component[i] = F16MAX; - break; - - case SIGNED_F16: - if (v.component[i] < -F16MAX) v.component[i] = -F16MAX; - else if (v.component[i] > F16MAX) v.component[i] = F16MAX; - break; - - default: - nvUnreachable(); - } - } -} - -// convert a u16 value to s17 (represented as an int) based on the format expected -int Utils::ushort_to_format(unsigned short input) -{ - int out, s; - - // clamp to the valid range we are expecting - switch (Utils::FORMAT) - { - case UNSIGNED_F16: - if (input & F16S_MASK) out = 0; - else if (input > F16MAX) out = F16MAX; - else out = input; - break; - - case SIGNED_F16: - s = input & F16S_MASK; - input &= F16EM_MASK; - if (input > F16MAX) out = F16MAX; - else out = input; - out = s ? -out : out; - break; - } - return out; -} - -// convert a s17 value to u16 based on the format expected -unsigned short Utils::format_to_ushort(int input) -{ - unsigned short out; - - // clamp to the valid range we are expecting - switch (Utils::FORMAT) - { - case UNSIGNED_F16: - nvDebugCheck (input >= 0 && input <= F16MAX); - out = input; - break; - - case SIGNED_F16: - nvDebugCheck (input >= -F16MAX && input <= F16MAX); - // convert to sign-magnitude - int s; - if (input < 0) { s = F16S_MASK; input = -input; } - else { s = 0; } - out = s | input; - break; - } - return out; -} - -// quantize the input range into equal-sized bins -int Utils::quantize(float value, int prec) -{ - int q, ivalue, s; - - nvDebugCheck (prec > 1); // didn't bother to make it work for 1 - - value = (float)floor(value + 0.5); - - int bias = (prec > 10) ? ((1<<(prec-1))-1) : 0; // bias precisions 11..16 to get a more accurate quantization - - switch (Utils::FORMAT) - { - case UNSIGNED_F16: - nvDebugCheck (value >= 0 && value <= F16MAX); - ivalue = (int)value; - q = ((ivalue << prec) + bias) / (F16MAX+1); - nvDebugCheck (q >= 0 && q < (1 << prec)); - break; - - case SIGNED_F16: - nvDebugCheck (value >= -F16MAX && value <= F16MAX); - // convert to sign-magnitude - ivalue = (int)value; - if (ivalue < 0) { s = 1; ivalue = -ivalue; } else s = 0; - - q = ((ivalue << (prec-1)) + bias) / (F16MAX+1); - if (s) - q = -q; - nvDebugCheck (q > -(1 << (prec-1)) && q < (1 << (prec-1))); - break; - } - - return q; -} - -int Utils::finish_unquantize(int q, int prec) -{ - if (Utils::FORMAT == UNSIGNED_F16) - return (q * 31) >> 6; // scale the magnitude by 31/64 - else if (Utils::FORMAT == SIGNED_F16) - return (q < 0) ? -(((-q) * 31) >> 5) : (q * 31) >> 5; // scale the magnitude by 31/32 - else - return q; -} - -// unquantize each bin to midpoint of original bin range, except -// for the end bins which we push to an endpoint of the bin range. -// we do this to ensure we can represent all possible original values. -// the asymmetric end bins do not affect PSNR for the test images. -// -// code this function assuming an arbitrary bit pattern as the encoded block -int Utils::unquantize(int q, int prec) -{ - int unq, s; - - nvDebugCheck (prec > 1); // not implemented for prec 1 - - switch (Utils::FORMAT) - { - // modify this case to move the multiplication by 31 after interpolation. - // Need to use finish_unquantize. - - // since we have 16 bits available, let's unquantize this to 16 bits unsigned - // thus the scale factor is [0-7c00)/[0-10000) = 31/64 - case UNSIGNED_F16: - if (prec >= 15) - unq = q; - else if (q == 0) - unq = 0; - else if (q == ((1<> prec; - break; - - // here, let's stick with S16 (no apparent quality benefit from going to S17) - // range is (-7c00..7c00)/(-8000..8000) = 31/32 - case SIGNED_F16: - // don't remove this test even though it appears equivalent to the code below - // as it isn't -- the code below can overflow for prec = 16 - if (prec >= 16) - unq = q; - else - { - if (q < 0) { s = 1; q = -q; } else s = 0; - - if (q == 0) - unq = 0; - else if (q >= ((1<<(prec-1))-1)) - unq = s ? -S16MAX : S16MAX; - else - { - unq = (q * (S16MAX+1) + (S16MAX+1)/2) >> (prec-1); - if (s) - unq = -unq; - } - } - break; - } - return unq; -} - - - -// pick a norm! -#define NORM_EUCLIDEAN 1 - -float Utils::norm(const Vector3 &a, const Vector3 &b) -{ -#ifdef NORM_EUCLIDEAN - return lengthSquared(a - b); -#endif -#ifdef NORM_ABS - Vector3 err = a - b; - return fabs(err.x) + fabs(err.y) + fabs(err.z); -#endif -} - -// parse [{:}]{,} -// the pointer starts here ^ -// name is 1 or 2 chars and matches field names. start and end are decimal numbers -void Utils::parse(const char *encoding, int &ptr, Field &field, int &endbit, int &len) -{ - if (ptr <= 0) return; - --ptr; - if (encoding[ptr] == ',') --ptr; - nvDebugCheck (encoding[ptr] == ']'); - --ptr; - endbit = 0; - int scale = 1; - while (encoding[ptr] != ':' && encoding[ptr] != '[') - { - nvDebugCheck(encoding[ptr] >= '0' && encoding[ptr] <= '9'); - endbit += (encoding[ptr--] - '0') * scale; - scale *= 10; - } - int startbit = 0; scale = 1; - if (encoding[ptr] == '[') - startbit = endbit; - else - { - ptr--; - while (encoding[ptr] != '[') - { - nvDebugCheck(encoding[ptr] >= '0' && encoding[ptr] <= '9'); - startbit += (encoding[ptr--] - '0') * scale; - scale *= 10; - } - } - len = startbit - endbit + 1; // startbit>=endbit note - --ptr; - if (encoding[ptr] == 'm') field = FIELD_M; - else if (encoding[ptr] == 'd') field = FIELD_D; - else { - // it's wxyz - nvDebugCheck (encoding[ptr] >= 'w' && encoding[ptr] <= 'z'); - int foo = encoding[ptr--] - 'w'; - // now it is r g or b - if (encoding[ptr] == 'r') foo += 10; - else if (encoding[ptr] == 'g') foo += 20; - else if (encoding[ptr] == 'b') foo += 30; - else nvDebugCheck(0); - field = (Field) foo; - } -} - - diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh_utils.h b/3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh_utils.h deleted file mode 100644 index 3ce33ce..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc6h/zoh_utils.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// utility class holding common routines -#ifndef _ZOH_UTILS_H -#define _ZOH_UTILS_H - -#include "nvmath/vector.h" - -namespace ZOH { - -inline int SIGN_EXTEND(int x, int nb) { return ((((signed(x))&(1<<((nb)-1)))?((~0)<<(nb)):0)|(signed(x))); } - -enum Field { - FIELD_M = 1, // mode - FIELD_D = 2, // distribution/shape - FIELD_RW = 10+0, FIELD_RX = 10+1, FIELD_RY = 10+2, FIELD_RZ = 10+3, // red channel endpoints or deltas - FIELD_GW = 20+0, FIELD_GX = 20+1, FIELD_GY = 20+2, FIELD_GZ = 20+3, // green channel endpoints or deltas - FIELD_BW = 30+0, FIELD_BX = 30+1, FIELD_BY = 30+2, FIELD_BZ = 30+3, // blue channel endpoints or deltas -}; - -// some constants -static const int F16S_MASK = 0x8000; // f16 sign mask -static const int F16EM_MASK = 0x7fff; // f16 exp & mantissa mask -static const int U16MAX = 0xffff; -static const int S16MIN = -0x8000; -static const int S16MAX = 0x7fff; -static const int INT16_MASK = 0xffff; -static const int F16MAX = 0x7bff; // MAXFLT bit pattern for halfs - -enum Format { UNSIGNED_F16, SIGNED_F16 }; - -class Utils -{ -public: - static Format FORMAT; // this is a global -- we're either handling unsigned or unsigned half values - - // error metrics - static float norm(const nv::Vector3 &a, const nv::Vector3 &b); - static float mpsnr_norm(const nv::Vector3 &a, int exposure, const nv::Vector3 &b); - - // conversion & clamp - static int ushort_to_format(unsigned short input); - static unsigned short format_to_ushort(int input); - - // clamp to format - static void clamp(nv::Vector3 &v); - - // quantization and unquantization - static int finish_unquantize(int q, int prec); - static int unquantize(int q, int prec); - static int quantize(float value, int prec); - - static void parse(const char *encoding, int &ptr, Field & field, int &endbit, int &len); - - // lerping - static int lerp(int a, int b, int i, int denom); - static nv::Vector3 lerp(const nv::Vector3 & a, const nv::Vector3 & b, int i, int denom); -}; - -} - -#endif // _ZOH_UTILS_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc6h/zohone.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc6h/zohone.cpp deleted file mode 100644 index 3652676..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc6h/zohone.cpp +++ /dev/null @@ -1,799 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// one region zoh compress/decompress code -// Thanks to Jacob Munkberg (jacob@cs.lth.se) for the shortcut of using SVD to do the equivalent of principal components analysis - -#include "bits.h" -#include "tile.h" -#include "zoh.h" -#include "zoh_utils.h" - -#include "nvmath/vector.inl" -#include "nvmath/fitting.h" - -#include // strlen -#include // FLT_MAX - -using namespace nv; -using namespace ZOH; - -#define NINDICES 16 -#define INDEXBITS 4 -#define HIGH_INDEXBIT (1<<(INDEXBITS-1)) -#define DENOM (NINDICES-1) - -#define NSHAPES 1 - -static const int shapes[NSHAPES] = -{ - 0x0000 -}; // only 1 shape - -#define REGION(x,y,shapeindex) ((shapes[shapeindex]&(1<<(15-(x)-4*(y))))!=0) - -#define POS_TO_X(pos) ((pos)&3) -#define POS_TO_Y(pos) (((pos)>>2)&3) - -#define NDELTA 2 - -struct Chanpat -{ - int prec[NDELTA]; // precision pattern for one channel -}; - -struct Pattern -{ - Chanpat chan[NCHANNELS];// allow different bit patterns per channel -- but we still want constant precision per channel - int transformed; // if 0, deltas are unsigned and no transform; otherwise, signed and transformed - int mode; // associated mode value - int modebits; // number of mode bits - const char *encoding; // verilog description of encoding for this mode -}; - -#define MAXMODEBITS 5 -#define MAXMODES (1<> 2) & 3 and x = index & 3 -static void swap_indices(IntEndpts endpts[NREGIONS_ONE], int indices[Tile::TILE_H][Tile::TILE_W], int shapeindex) -{ - int index_positions[NREGIONS_ONE]; - - index_positions[0] = 0; // since WLOG we have the high bit of the shapes at 0 - - for (int region = 0; region < NREGIONS_ONE; ++region) - { - int x = index_positions[region] & 3; - int y = (index_positions[region] >> 2) & 3; - nvDebugCheck(REGION(x,y,shapeindex) == region); // double check the table - if (indices[y][x] & HIGH_INDEXBIT) - { - // high bit is set, swap the endpts and indices for this region - int t; - for (int i=0; i> endbit, len); break; - case FIELD_RW: out.write(rw >> endbit, len); break; - case FIELD_RX: out.write(rx >> endbit, len); break; - case FIELD_GW: out.write(gw >> endbit, len); break; - case FIELD_GX: out.write(gx >> endbit, len); break; - case FIELD_BW: out.write(bw >> endbit, len); break; - case FIELD_BX: out.write(bx >> endbit, len); break; - - case FIELD_D: - case FIELD_RY: - case FIELD_RZ: - case FIELD_GY: - case FIELD_GZ: - case FIELD_BY: - case FIELD_BZ: - default: nvUnreachable(); - } - } -} - -static void read_header(Bits &in, ComprEndpts endpts[NREGIONS_ONE], Pattern &p) -{ - // reading isn't quite symmetric with writing -- we don't know the encoding until we decode the mode - int mode = in.read(2); - if (mode != 0x00 && mode != 0x01) - mode = (in.read(3) << 2) | mode; - - int pat_index = mode_to_pat[mode]; - - nvDebugCheck (pat_index >= 0 && pat_index < NPATTERNS); - nvDebugCheck (in.getptr() == patterns[pat_index].modebits); - - p = patterns[pat_index]; - - int d; - int rw, rx; - int gw, gx; - int bw, bx; - - d = 0; - rw = rx = 0; - gw = gx = 0; - bw = bx = 0; - - int ptr = int(strlen(p.encoding)); - - while (ptr) - { - Field field; - int endbit, len; - - // !!!UNDONE: get rid of string parsing!!! - Utils::parse(p.encoding, ptr, field, endbit, len); - - switch(field) - { - case FIELD_M: break; // already processed so ignore - case FIELD_RW: rw |= in.read(len) << endbit; break; - case FIELD_RX: rx |= in.read(len) << endbit; break; - case FIELD_GW: gw |= in.read(len) << endbit; break; - case FIELD_GX: gx |= in.read(len) << endbit; break; - case FIELD_BW: bw |= in.read(len) << endbit; break; - case FIELD_BX: bx |= in.read(len) << endbit; break; - - case FIELD_D: - case FIELD_RY: - case FIELD_RZ: - case FIELD_GY: - case FIELD_GZ: - case FIELD_BY: - case FIELD_BZ: - default: nvUnreachable(); - } - } - - nvDebugCheck (in.getptr() == 128 - 63); - - endpts[0].A[0] = rw; endpts[0].B[0] = rx; - endpts[0].A[1] = gw; endpts[0].B[1] = gx; - endpts[0].A[2] = bw; endpts[0].B[2] = bx; -} - -// compress index 0 -static void write_indices(const int indices[Tile::TILE_H][Tile::TILE_W], int shapeindex, Bits &out) -{ - for (int pos = 0; pos < Tile::TILE_TOTAL; ++pos) - { - int x = POS_TO_X(pos); - int y = POS_TO_Y(pos); - - out.write(indices[y][x], INDEXBITS - ((pos == 0) ? 1 : 0)); - } -} - -static void emit_block(const ComprEndpts endpts[NREGIONS_ONE], int shapeindex, const Pattern &p, const int indices[Tile::TILE_H][Tile::TILE_W], char *block) -{ - Bits out(block, ZOH::BITSIZE); - - write_header(endpts, p, out); - - write_indices(indices, shapeindex, out); - - nvDebugCheck(out.getptr() == ZOH::BITSIZE); -} - -static void generate_palette_quantized(const IntEndpts &endpts, int prec, Vector3 palette[NINDICES]) -{ - // scale endpoints - int a, b; // really need a IntVector3... - - a = Utils::unquantize(endpts.A[0], prec); - b = Utils::unquantize(endpts.B[0], prec); - - // interpolate - for (int i = 0; i < NINDICES; ++i) - palette[i].x = float(Utils::finish_unquantize(Utils::lerp(a, b, i, DENOM), prec)); - - a = Utils::unquantize(endpts.A[1], prec); - b = Utils::unquantize(endpts.B[1], prec); - - // interpolate - for (int i = 0; i < NINDICES; ++i) - palette[i].y = float(Utils::finish_unquantize(Utils::lerp(a, b, i, DENOM), prec)); - - a = Utils::unquantize(endpts.A[2], prec); - b = Utils::unquantize(endpts.B[2], prec); - - // interpolate - for (int i = 0; i < NINDICES; ++i) - palette[i].z = float(Utils::finish_unquantize(Utils::lerp(a, b, i, DENOM), prec)); -} - -// position 0 was compressed -static void read_indices(Bits &in, int shapeindex, int indices[Tile::TILE_H][Tile::TILE_W]) -{ - for (int pos = 0; pos < Tile::TILE_TOTAL; ++pos) - { - int x = POS_TO_X(pos); - int y = POS_TO_Y(pos); - - indices[y][x]= in.read(INDEXBITS - ((pos == 0) ? 1 : 0)); - } -} - -void ZOH::decompressone(const char *block, Tile &t) -{ - Bits in(block, ZOH::BITSIZE); - - Pattern p; - IntEndpts endpts[NREGIONS_ONE]; - ComprEndpts compr_endpts[NREGIONS_ONE]; - - read_header(in, compr_endpts, p); - int shapeindex = 0; // only one shape - - decompress_endpts(compr_endpts, endpts, p); - - Vector3 palette[NREGIONS_ONE][NINDICES]; - for (int r = 0; r < NREGIONS_ONE; ++r) - generate_palette_quantized(endpts[r], p.chan[0].prec[0], &palette[r][0]); - - // read indices - int indices[Tile::TILE_H][Tile::TILE_W]; - - read_indices(in, shapeindex, indices); - - nvDebugCheck(in.getptr() == ZOH::BITSIZE); - - // lookup - for (int y = 0; y < Tile::TILE_H; y++) - for (int x = 0; x < Tile::TILE_W; x++) - t.data[y][x] = palette[REGION(x,y,shapeindex)][indices[y][x]]; -} - -// given a collection of colors and quantized endpoints, generate a palette, choose best entries, and return a single toterr -static float map_colors(const Vector3 colors[], const float importance[], int np, const IntEndpts &endpts, int prec) -{ - Vector3 palette[NINDICES]; - float toterr = 0; - Vector3 err; - - generate_palette_quantized(endpts, prec, palette); - - for (int i = 0; i < np; ++i) - { - float err, besterr; - - besterr = Utils::norm(colors[i], palette[0]) * importance[i]; - - for (int j = 1; j < NINDICES && besterr > 0; ++j) - { - err = Utils::norm(colors[i], palette[j]) * importance[i]; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - besterr = err; - } - toterr += besterr; - } - return toterr; -} - -// assign indices given a tile, shape, and quantized endpoints, return toterr for each region -static void assign_indices(const Tile &tile, int shapeindex, IntEndpts endpts[NREGIONS_ONE], int prec, - int indices[Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS_ONE]) -{ - // build list of possibles - Vector3 palette[NREGIONS_ONE][NINDICES]; - - for (int region = 0; region < NREGIONS_ONE; ++region) - { - generate_palette_quantized(endpts[region], prec, &palette[region][0]); - toterr[region] = 0; - } - - Vector3 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr; - - besterr = Utils::norm(tile.data[y][x], palette[region][0]); - indices[y][x] = 0; - - for (int i = 1; i < NINDICES && besterr > 0; ++i) - { - err = Utils::norm(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[y][x] = i; - } - } - toterr[region] += besterr; - } -} - -static float perturb_one(const Vector3 colors[], const float importance[], int np, int ch, int prec, const IntEndpts &old_endpts, IntEndpts &new_endpts, - float old_err, int do_b) -{ - // we have the old endpoints: old_endpts - // we have the perturbed endpoints: new_endpts - // we have the temporary endpoints: temp_endpts - - IntEndpts temp_endpts; - float min_err = old_err; // start with the best current error - int beststep; - - // copy real endpoints so we can perturb them - for (int i=0; i>= 1) - { - bool improved = false; - for (int sign = -1; sign <= 1; sign += 2) - { - if (do_b == 0) - { - temp_endpts.A[ch] = new_endpts.A[ch] + sign * step; - if (temp_endpts.A[ch] < 0 || temp_endpts.A[ch] >= (1 << prec)) - continue; - } - else - { - temp_endpts.B[ch] = new_endpts.B[ch] + sign * step; - if (temp_endpts.B[ch] < 0 || temp_endpts.B[ch] >= (1 << prec)) - continue; - } - - float err = map_colors(colors, importance, np, temp_endpts, prec); - - if (err < min_err) - { - improved = true; - min_err = err; - beststep = sign * step; - } - } - // if this was an improvement, move the endpoint and continue search from there - if (improved) - { - if (do_b == 0) - new_endpts.A[ch] += beststep; - else - new_endpts.B[ch] += beststep; - } - } - return min_err; -} - -static void optimize_one(const Vector3 colors[], const float importance[], int np, float orig_err, const IntEndpts &orig_endpts, int prec, IntEndpts &opt_endpts) -{ - float opt_err = orig_err; - for (int ch = 0; ch < NCHANNELS; ++ch) - { - opt_endpts.A[ch] = orig_endpts.A[ch]; - opt_endpts.B[ch] = orig_endpts.B[ch]; - } - /* - err0 = perturb(rgb0, delta0) - err1 = perturb(rgb1, delta1) - if (err0 < err1) - if (err0 >= initial_error) break - rgb0 += delta0 - next = 1 - else - if (err1 >= initial_error) break - rgb1 += delta1 - next = 0 - initial_err = map() - for (;;) - err = perturb(next ? rgb1:rgb0, delta) - if (err >= initial_err) break - next? rgb1 : rgb0 += delta - initial_err = err - */ - IntEndpts new_a, new_b; - IntEndpts new_endpt; - int do_b; - - // now optimize each channel separately - for (int ch = 0; ch < NCHANNELS; ++ch) - { - // figure out which endpoint when perturbed gives the most improvement and start there - // if we just alternate, we can easily end up in a local minima - float err0 = perturb_one(colors, importance, np, ch, prec, opt_endpts, new_a, opt_err, 0); // perturb endpt A - float err1 = perturb_one(colors, importance, np, ch, prec, opt_endpts, new_b, opt_err, 1); // perturb endpt B - - if (err0 < err1) - { - if (err0 >= opt_err) - continue; - - opt_endpts.A[ch] = new_a.A[ch]; - opt_err = err0; - do_b = 1; // do B next - } - else - { - if (err1 >= opt_err) - continue; - opt_endpts.B[ch] = new_b.B[ch]; - opt_err = err1; - do_b = 0; // do A next - } - - // now alternate endpoints and keep trying until there is no improvement - for (;;) - { - float err = perturb_one(colors, importance, np, ch, prec, opt_endpts, new_endpt, opt_err, do_b); - if (err >= opt_err) - break; - if (do_b == 0) - opt_endpts.A[ch] = new_endpt.A[ch]; - else - opt_endpts.B[ch] = new_endpt.B[ch]; - opt_err = err; - do_b = 1 - do_b; // now move the other endpoint - } - } -} - -static void optimize_endpts(const Tile &tile, int shapeindex, const float orig_err[NREGIONS_ONE], - const IntEndpts orig_endpts[NREGIONS_ONE], int prec, IntEndpts opt_endpts[NREGIONS_ONE]) -{ - Vector3 pixels[Tile::TILE_TOTAL]; - float importance[Tile::TILE_TOTAL]; - float err = 0; - - for (int region=0; region 0; ++i) - { - err = Utils::norm(tile.data[y][x], palette[region][i]) * tile.importance_map[y][x]; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - besterr = err; - } - toterr += besterr; - } - return toterr; -} - -float ZOH::roughone(const Tile &tile, int shapeindex, FltEndpts endpts[NREGIONS_ONE]) -{ - for (int region=0; region maxp) maxp = dp; - } - - // choose as endpoints 2 points along the principal direction that span the projections of all of the pixel values - endpts[region].A = mean + minp*direction; - endpts[region].B = mean + maxp*direction; - - // clamp endpoints - // the argument for clamping is that the actual endpoints need to be clamped and thus we need to choose the best - // shape based on endpoints being clamped - Utils::clamp(endpts[region].A); - Utils::clamp(endpts[region].B); - } - - return map_colors(tile, shapeindex, endpts); -} - -float ZOH::compressone(const Tile &t, char *block) -{ - int shapeindex_best = 0; - FltEndpts endptsbest[NREGIONS_ONE], tempendpts[NREGIONS_ONE]; - float msebest = FLT_MAX; - - /* - collect the mse values that are within 5% of the best values - optimize each one and choose the best - */ - // hack for now -- just use the best value WORK - for (int i=0; i0.0; ++i) - { - float mse = roughone(t, i, tempendpts); - if (mse < msebest) - { - msebest = mse; - shapeindex_best = i; - memcpy(endptsbest, tempendpts, sizeof(endptsbest)); - } - - } - return refineone(t, shapeindex_best, endptsbest, block); -} diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc6h/zohtwo.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc6h/zohtwo.cpp deleted file mode 100644 index 5a14294..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc6h/zohtwo.cpp +++ /dev/null @@ -1,883 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// two regions zoh compress/decompress code -// Thanks to Jacob Munkberg (jacob@cs.lth.se) for the shortcut of using SVD to do the equivalent of principal components analysis - -/* optimization algorithm - - get initial float endpoints - convert endpoints using 16 bit precision, transform, and get bit delta. choose likely endpoint compression candidates. - note that there will be 1 or 2 candidates; 2 will be chosen when the delta values are close to the max possible. - for each EC candidate in order from max precision to smaller precision - convert endpoints using the appropriate precision. - optimize the endpoints and minimize square error. save the error and index assignments. apply index compression as well. - (thus the endpoints and indices are in final form.) - transform and get bit delta. - if the bit delta fits, exit - if we ended up with no candidates somehow, choose the tail set of EC candidates and retry. this should happen hardly ever. - add a state variable to nvDebugCheck we only do this once. - convert to bit stream. - return the error. - - Global optimization - order all tiles based on their errors - do something special for high-error tiles - the goal here is to try to avoid tiling artifacts. but I think this is a research problem. let's just generate an error image... - - display an image that shows partitioning and precision selected for each tile -*/ - -#include "bits.h" -#include "tile.h" -#include "zoh.h" -#include "zoh_utils.h" - -#include "nvmath/fitting.h" -#include "nvmath/vector.inl" - -#include // strlen -#include // FLT_MAX - -using namespace nv; -using namespace ZOH; - -#define NINDICES 8 -#define INDEXBITS 3 -#define HIGH_INDEXBIT (1<<(INDEXBITS-1)) -#define DENOM (NINDICES-1) - -// WORK: determine optimal traversal pattern to search for best shape -- what does the error curve look like? -// i.e. can we search shapes in a particular order so we can see the global error minima easily and -// stop without having to touch all shapes? - -#include "shapes_two.h" -// use only the first 32 available shapes -#undef NSHAPES -#undef SHAPEBITS -#define NSHAPES 32 -#define SHAPEBITS 5 - -#define POS_TO_X(pos) ((pos)&3) -#define POS_TO_Y(pos) (((pos)>>2)&3) - -#define NDELTA 4 - -struct Chanpat -{ - int prec[NDELTA]; // precision pattern for one channel -}; - -struct Pattern -{ - Chanpat chan[NCHANNELS]; // allow different bit patterns per channel -- but we still want constant precision per channel - int transformed; // if 0, deltas are unsigned and no transform; otherwise, signed and transformed - int mode; // associated mode value - int modebits; // number of mode bits - const char *encoding; // verilog description of encoding for this mode -}; - -#define MAXMODEBITS 5 -#define MAXMODES (1<> endbit, len); break; - case FIELD_D: out.write( d >> endbit, len); break; - case FIELD_RW: out.write(rw >> endbit, len); break; - case FIELD_RX: out.write(rx >> endbit, len); break; - case FIELD_RY: out.write(ry >> endbit, len); break; - case FIELD_RZ: out.write(rz >> endbit, len); break; - case FIELD_GW: out.write(gw >> endbit, len); break; - case FIELD_GX: out.write(gx >> endbit, len); break; - case FIELD_GY: out.write(gy >> endbit, len); break; - case FIELD_GZ: out.write(gz >> endbit, len); break; - case FIELD_BW: out.write(bw >> endbit, len); break; - case FIELD_BX: out.write(bx >> endbit, len); break; - case FIELD_BY: out.write(by >> endbit, len); break; - case FIELD_BZ: out.write(bz >> endbit, len); break; - default: nvUnreachable(); - } - } -} - -static bool read_header(Bits &in, ComprEndpts endpts[NREGIONS_TWO], int &shapeindex, Pattern &p) -{ - // reading isn't quite symmetric with writing -- we don't know the encoding until we decode the mode - int mode = in.read(2); - if (mode != 0x00 && mode != 0x01) - mode = (in.read(3) << 2) | mode; - - int pat_index = mode_to_pat[mode]; - - if (pat_index == -2) - return false; // reserved mode found - - nvDebugCheck (pat_index >= 0 && pat_index < NPATTERNS); - nvDebugCheck (in.getptr() == patterns[pat_index].modebits); - - p = patterns[pat_index]; - - int d; - int rw, rx, ry, rz; - int gw, gx, gy, gz; - int bw, bx, by, bz; - - d = 0; - rw = rx = ry = rz = 0; - gw = gx = gy = gz = 0; - bw = bx = by = bz = 0; - - int ptr = int(strlen(p.encoding)); - - while (ptr) - { - Field field; - int endbit, len; - - // !!!UNDONE: get rid of string parsing!!! - Utils::parse(p.encoding, ptr, field, endbit, len); - - switch(field) - { - case FIELD_M: break; // already processed so ignore - case FIELD_D: d |= in.read(len) << endbit; break; - case FIELD_RW: rw |= in.read(len) << endbit; break; - case FIELD_RX: rx |= in.read(len) << endbit; break; - case FIELD_RY: ry |= in.read(len) << endbit; break; - case FIELD_RZ: rz |= in.read(len) << endbit; break; - case FIELD_GW: gw |= in.read(len) << endbit; break; - case FIELD_GX: gx |= in.read(len) << endbit; break; - case FIELD_GY: gy |= in.read(len) << endbit; break; - case FIELD_GZ: gz |= in.read(len) << endbit; break; - case FIELD_BW: bw |= in.read(len) << endbit; break; - case FIELD_BX: bx |= in.read(len) << endbit; break; - case FIELD_BY: by |= in.read(len) << endbit; break; - case FIELD_BZ: bz |= in.read(len) << endbit; break; - default: nvUnreachable(); - } - } - - nvDebugCheck (in.getptr() == 128 - 46); - - shapeindex = d; - endpts[0].A[0] = rw; endpts[0].B[0] = rx; endpts[1].A[0] = ry; endpts[1].B[0] = rz; - endpts[0].A[1] = gw; endpts[0].B[1] = gx; endpts[1].A[1] = gy; endpts[1].B[1] = gz; - endpts[0].A[2] = bw; endpts[0].B[2] = bx; endpts[1].A[2] = by; endpts[1].B[2] = bz; - - return true; -} - -static void write_indices(const int indices[Tile::TILE_H][Tile::TILE_W], int shapeindex, Bits &out) -{ - int positions[NREGIONS_TWO]; - - for (int r = 0; r < NREGIONS_TWO; ++r) - positions[r] = SHAPEINDEX_TO_COMPRESSED_INDICES(shapeindex,r); - - for (int pos = 0; pos < Tile::TILE_TOTAL; ++pos) - { - int x = POS_TO_X(pos); - int y = POS_TO_Y(pos); - - bool match = false; - - for (int r = 0; r < NREGIONS_TWO; ++r) - if (positions[r] == pos) { match = true; break; } - - out.write(indices[y][x], INDEXBITS - (match ? 1 : 0)); - } -} - -static void emit_block(const ComprEndpts compr_endpts[NREGIONS_TWO], int shapeindex, const Pattern &p, const int indices[Tile::TILE_H][Tile::TILE_W], char *block) -{ - Bits out(block, ZOH::BITSIZE); - - write_header(compr_endpts, shapeindex, p, out); - - write_indices(indices, shapeindex, out); - - nvDebugCheck(out.getptr() == ZOH::BITSIZE); -} - -static void generate_palette_quantized(const IntEndpts &endpts, int prec, Vector3 palette[NINDICES]) -{ - // scale endpoints - int a, b; // really need a IntVector3... - - a = Utils::unquantize(endpts.A[0], prec); - b = Utils::unquantize(endpts.B[0], prec); - - // interpolate - for (int i = 0; i < NINDICES; ++i) - palette[i].x = float(Utils::finish_unquantize(Utils::lerp(a, b, i, DENOM), prec)); - - a = Utils::unquantize(endpts.A[1], prec); - b = Utils::unquantize(endpts.B[1], prec); - - // interpolate - for (int i = 0; i < NINDICES; ++i) - palette[i].y = float(Utils::finish_unquantize(Utils::lerp(a, b, i, DENOM), prec)); - - a = Utils::unquantize(endpts.A[2], prec); - b = Utils::unquantize(endpts.B[2], prec); - - // interpolate - for (int i = 0; i < NINDICES; ++i) - palette[i].z = float(Utils::finish_unquantize(Utils::lerp(a, b, i, DENOM), prec)); -} - -static void read_indices(Bits &in, int shapeindex, int indices[Tile::TILE_H][Tile::TILE_W]) -{ - int positions[NREGIONS_TWO]; - - for (int r = 0; r < NREGIONS_TWO; ++r) - positions[r] = SHAPEINDEX_TO_COMPRESSED_INDICES(shapeindex,r); - - for (int pos = 0; pos < Tile::TILE_TOTAL; ++pos) - { - int x = POS_TO_X(pos); - int y = POS_TO_Y(pos); - - bool match = false; - - for (int r = 0; r < NREGIONS_TWO; ++r) - if (positions[r] == pos) { match = true; break; } - - indices[y][x]= in.read(INDEXBITS - (match ? 1 : 0)); - } -} - -void ZOH::decompresstwo(const char *block, Tile &t) -{ - Bits in(block, ZOH::BITSIZE); - - Pattern p; - IntEndpts endpts[NREGIONS_TWO]; - ComprEndpts compr_endpts[NREGIONS_TWO]; - int shapeindex; - - if (!read_header(in, compr_endpts, shapeindex, p)) - { - // reserved mode, return all zeroes - for (int y = 0; y < Tile::TILE_H; y++) - for (int x = 0; x < Tile::TILE_W; x++) - t.data[y][x] = Vector3(0.0f); - - return; - } - - decompress_endpts(compr_endpts, endpts, p); - - Vector3 palette[NREGIONS_TWO][NINDICES]; - for (int r = 0; r < NREGIONS_TWO; ++r) - generate_palette_quantized(endpts[r], p.chan[0].prec[0], &palette[r][0]); - - int indices[Tile::TILE_H][Tile::TILE_W]; - - read_indices(in, shapeindex, indices); - - nvDebugCheck(in.getptr() == ZOH::BITSIZE); - - // lookup - for (int y = 0; y < Tile::TILE_H; y++) - for (int x = 0; x < Tile::TILE_W; x++) - t.data[y][x] = palette[REGION(x,y,shapeindex)][indices[y][x]]; -} - -// given a collection of colors and quantized endpoints, generate a palette, choose best entries, and return a single toterr -static float map_colors(const Vector3 colors[], const float importance[], int np, const IntEndpts &endpts, int prec) -{ - Vector3 palette[NINDICES]; - float toterr = 0; - Vector3 err; - - generate_palette_quantized(endpts, prec, palette); - - for (int i = 0; i < np; ++i) - { - float err, besterr; - - besterr = Utils::norm(colors[i], palette[0]) * importance[i]; - - for (int j = 1; j < NINDICES && besterr > 0; ++j) - { - err = Utils::norm(colors[i], palette[j]) * importance[i]; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - besterr = err; - } - toterr += besterr; - } - return toterr; -} - -// assign indices given a tile, shape, and quantized endpoints, return toterr for each region -static void assign_indices(const Tile &tile, int shapeindex, IntEndpts endpts[NREGIONS_TWO], int prec, - int indices[Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS_TWO]) -{ - // build list of possibles - Vector3 palette[NREGIONS_TWO][NINDICES]; - - for (int region = 0; region < NREGIONS_TWO; ++region) - { - generate_palette_quantized(endpts[region], prec, &palette[region][0]); - toterr[region] = 0; - } - - Vector3 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr; - - besterr = Utils::norm(tile.data[y][x], palette[region][0]); - indices[y][x] = 0; - - for (int i = 1; i < NINDICES && besterr > 0; ++i) - { - err = Utils::norm(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[y][x] = i; - } - } - toterr[region] += besterr; - } -} - -static float perturb_one(const Vector3 colors[], const float importance[], int np, int ch, int prec, const IntEndpts &old_endpts, IntEndpts &new_endpts, - float old_err, int do_b) -{ - // we have the old endpoints: old_endpts - // we have the perturbed endpoints: new_endpts - // we have the temporary endpoints: temp_endpts - - IntEndpts temp_endpts; - float min_err = old_err; // start with the best current error - int beststep; - - // copy real endpoints so we can perturb them - for (int i=0; i>= 1) - { - bool improved = false; - for (int sign = -1; sign <= 1; sign += 2) - { - if (do_b == 0) - { - temp_endpts.A[ch] = new_endpts.A[ch] + sign * step; - if (temp_endpts.A[ch] < 0 || temp_endpts.A[ch] >= (1 << prec)) - continue; - } - else - { - temp_endpts.B[ch] = new_endpts.B[ch] + sign * step; - if (temp_endpts.B[ch] < 0 || temp_endpts.B[ch] >= (1 << prec)) - continue; - } - - float err = map_colors(colors, importance, np, temp_endpts, prec); - - if (err < min_err) - { - improved = true; - min_err = err; - beststep = sign * step; - } - } - // if this was an improvement, move the endpoint and continue search from there - if (improved) - { - if (do_b == 0) - new_endpts.A[ch] += beststep; - else - new_endpts.B[ch] += beststep; - } - } - return min_err; -} - -static void optimize_one(const Vector3 colors[], const float importance[], int np, float orig_err, const IntEndpts &orig_endpts, int prec, IntEndpts &opt_endpts) -{ - float opt_err = orig_err; - for (int ch = 0; ch < NCHANNELS; ++ch) - { - opt_endpts.A[ch] = orig_endpts.A[ch]; - opt_endpts.B[ch] = orig_endpts.B[ch]; - } - /* - err0 = perturb(rgb0, delta0) - err1 = perturb(rgb1, delta1) - if (err0 < err1) - if (err0 >= initial_error) break - rgb0 += delta0 - next = 1 - else - if (err1 >= initial_error) break - rgb1 += delta1 - next = 0 - initial_err = map() - for (;;) - err = perturb(next ? rgb1:rgb0, delta) - if (err >= initial_err) break - next? rgb1 : rgb0 += delta - initial_err = err - */ - IntEndpts new_a, new_b; - IntEndpts new_endpt; - int do_b; - - // now optimize each channel separately - for (int ch = 0; ch < NCHANNELS; ++ch) - { - // figure out which endpoint when perturbed gives the most improvement and start there - // if we just alternate, we can easily end up in a local minima - float err0 = perturb_one(colors, importance, np, ch, prec, opt_endpts, new_a, opt_err, 0); // perturb endpt A - float err1 = perturb_one(colors, importance, np, ch, prec, opt_endpts, new_b, opt_err, 1); // perturb endpt B - - if (err0 < err1) - { - if (err0 >= opt_err) - continue; - - opt_endpts.A[ch] = new_a.A[ch]; - opt_err = err0; - do_b = 1; // do B next - } - else - { - if (err1 >= opt_err) - continue; - opt_endpts.B[ch] = new_b.B[ch]; - opt_err = err1; - do_b = 0; // do A next - } - - // now alternate endpoints and keep trying until there is no improvement - for (;;) - { - float err = perturb_one(colors, importance, np, ch, prec, opt_endpts, new_endpt, opt_err, do_b); - if (err >= opt_err) - break; - if (do_b == 0) - opt_endpts.A[ch] = new_endpt.A[ch]; - else - opt_endpts.B[ch] = new_endpt.B[ch]; - opt_err = err; - do_b = 1 - do_b; // now move the other endpoint - } - } -} - -static void optimize_endpts(const Tile &tile, int shapeindex, const float orig_err[NREGIONS_TWO], - const IntEndpts orig_endpts[NREGIONS_TWO], int prec, IntEndpts opt_endpts[NREGIONS_TWO]) -{ - Vector3 pixels[Tile::TILE_TOTAL]; - float importance[Tile::TILE_TOTAL]; - float err = 0; - - for (int region=0; region 0; ++i) - { - err = Utils::norm(tile.data[y][x], palette[region][i]) * tile.importance_map[y][x]; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - besterr = err; - } - toterr += besterr; - } - return toterr; -} - -float ZOH::roughtwo(const Tile &tile, int shapeindex, FltEndpts endpts[NREGIONS_TWO]) -{ - for (int region=0; region maxp) maxp = dp; - } - - // choose as endpoints 2 points along the principal direction that span the projections of all of the pixel values - endpts[region].A = mean + minp*direction; - endpts[region].B = mean + maxp*direction; - - // clamp endpoints - // the argument for clamping is that the actual endpoints need to be clamped and thus we need to choose the best - // shape based on endpoints being clamped - Utils::clamp(endpts[region].A); - Utils::clamp(endpts[region].B); - } - - return map_colors(tile, shapeindex, endpts); -} - -float ZOH::compresstwo(const Tile &t, char *block) -{ - int shapeindex_best = 0; - FltEndpts endptsbest[NREGIONS_TWO], tempendpts[NREGIONS_TWO]; - float msebest = FLT_MAX; - - /* - collect the mse values that are within 5% of the best values - optimize each one and choose the best - */ - // hack for now -- just use the best value WORK - for (int i=0; i0.0; ++i) - { - float mse = roughtwo(t, i, tempendpts); - if (mse < msebest) - { - msebest = mse; - shapeindex_best = i; - memcpy(endptsbest, tempendpts, sizeof(endptsbest)); - } - - } - return refinetwo(t, shapeindex_best, endptsbest, block); -} - diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl.cpp deleted file mode 100644 index 8e0b169..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl.cpp +++ /dev/null @@ -1,264 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// the avpcl compressor and decompressor - -#include "tile.h" -#include "avpcl.h" -#include "nvcore/debug.h" -#include "nvmath/vector.inl" -#include -#include - -using namespace nv; -using namespace AVPCL; - -// global flags -bool AVPCL::flag_premult = false; -bool AVPCL::flag_nonuniform = false; -bool AVPCL::flag_nonuniform_ati = false; - -// global mode -bool AVPCL::mode_rgb = false; // true if image had constant alpha = 255 - -void AVPCL::compress(const Tile &t, char *block) -{ - char tempblock[AVPCL::BLOCKSIZE]; - float msebest = FLT_MAX; - - float mse_mode0 = AVPCL::compress_mode0(t, tempblock); if(mse_mode0 < msebest) { msebest = mse_mode0; memcpy(block, tempblock, AVPCL::BLOCKSIZE); } - float mse_mode1 = AVPCL::compress_mode1(t, tempblock); if(mse_mode1 < msebest) { msebest = mse_mode1; memcpy(block, tempblock, AVPCL::BLOCKSIZE); } - float mse_mode2 = AVPCL::compress_mode2(t, tempblock); if(mse_mode2 < msebest) { msebest = mse_mode2; memcpy(block, tempblock, AVPCL::BLOCKSIZE); } - float mse_mode3 = AVPCL::compress_mode3(t, tempblock); if(mse_mode3 < msebest) { msebest = mse_mode3; memcpy(block, tempblock, AVPCL::BLOCKSIZE); } - float mse_mode4 = AVPCL::compress_mode4(t, tempblock); if(mse_mode4 < msebest) { msebest = mse_mode4; memcpy(block, tempblock, AVPCL::BLOCKSIZE); } - float mse_mode5 = AVPCL::compress_mode5(t, tempblock); if(mse_mode5 < msebest) { msebest = mse_mode5; memcpy(block, tempblock, AVPCL::BLOCKSIZE); } - float mse_mode6 = AVPCL::compress_mode6(t, tempblock); if(mse_mode6 < msebest) { msebest = mse_mode6; memcpy(block, tempblock, AVPCL::BLOCKSIZE); } - float mse_mode7 = AVPCL::compress_mode7(t, tempblock); if(mse_mode7 < msebest) { msebest = mse_mode7; memcpy(block, tempblock, AVPCL::BLOCKSIZE); } - - /*if (errfile) - { - float errs[21]; - int nerrs = 8; - errs[0] = mse_mode0; - errs[1] = mse_mode1; - errs[2] = mse_mode2; - errs[3] = mse_mode3; - errs[4] = mse_mode4; - errs[5] = mse_mode5; - errs[6] = mse_mode6; - errs[7] = mse_mode7; - if (fwrite(errs, sizeof(float), nerrs, errfile) != nerrs) - throw "Write error on error file"; - }*/ -} - -/* -static int getbit(char *b, int start) -{ - if (start < 0 || start >= 128) return 0; // out of range - - int ix = start >> 3; - return (b[ix] & (1 << (start & 7))) != 0; -} - -static int getbits(char *b, int start, int len) -{ - int out = 0; - for (int i=0; i= 128) return; // out of range - - int ix = start >> 3; - - if (bit & 1) - b[ix] |= (1 << (start & 7)); - else - b[ix] &= ~(1 << (start & 7)); -} - -static void setbits(char *b, int start, int len, int bits) -{ - for (int i=0; i> i); -} -*/ - -void AVPCL::decompress(const char *cblock, Tile &t) -{ - char block[AVPCL::BLOCKSIZE]; - memcpy(block, cblock, AVPCL::BLOCKSIZE); - - switch(getmode(block)) - { - case 0: AVPCL::decompress_mode0(block, t); break; - case 1: AVPCL::decompress_mode1(block, t); break; - case 2: AVPCL::decompress_mode2(block, t); break; - case 3: AVPCL::decompress_mode3(block, t); break; - case 4: AVPCL::decompress_mode4(block, t); break; - case 5: AVPCL::decompress_mode5(block, t); break; - case 6: AVPCL::decompress_mode6(block, t); break; - case 7: AVPCL::decompress_mode7(block, t); break; - case 8: // return a black tile if you get a reserved mode - for (int y=0; y pixels; - int w, h; - char block[AVPCL::BLOCKSIZE]; - - Targa::read(inf, pixels, w, h); - FILE *avpclfile = fopen(avpclf.c_str(), "wb"); - if (avpclfile == NULL) throw "Unable to open .avpcl file for write"; - FILE *errfile = NULL; - if (errf != "") - { - errfile = fopen(errf.c_str(), "wb"); - if (errfile == NULL) throw "Unable to open error file for write"; - } - - // Look at alpha channel and override the premult flag if alpha is constant (but only if premult is set) - if (AVPCL::flag_premult) - { - if (AVPCL::mode_rgb) - { - AVPCL::flag_premult = false; - cout << endl << "NOTE: Source image alpha is constant 255, turning off premultiplied-alpha error metric." << endl << endl; - } - } - - // stuff for progress bar O.o - int ntiles = ((h+Tile::TILE_H-1)/Tile::TILE_H)*((w+Tile::TILE_W-1)/Tile::TILE_W); - int tilecnt = 0; - clock_t start, prev, cur; - - start = prev = clock(); - - // convert to tiles and compress each tile - for (int y=0; y> thing; - return thing; -} - -// avpcl file name is ...-w-h-RGB[A].avpcl, extract width and height -static void extract(string avpclf, int &w, int &h, bool &mode_rgb) -{ - size_t n = avpclf.rfind('.', avpclf.length()-1); - size_t n1 = avpclf.rfind('-', n-1); - size_t n2 = avpclf.rfind('-', n1-1); - size_t n3 = avpclf.rfind('-', n2-1); - // ...-wwww-hhhh-RGB[A].avpcl - // ^ ^ ^ ^ - // n3 n2 n1 n n3 pixels; - int w, h; - char block[AVPCL::BLOCKSIZE]; - - extract(avpclf, w, h, AVPCL::mode_rgb); - FILE *avpclfile = fopen(avpclf.c_str(), "rb"); - if (avpclfile == NULL) throw "Unable to open .avpcl file for read"; - pixels.resizeErase(h, w); - - // convert to tiles and decompress each tile - for (int y=0; y -#include - -#include "shapes_three.h" - -// use only the first 16 available shapes -#undef NSHAPES -#undef SHAPEBITS -#define NSHAPES 16 -#define SHAPEBITS 4 - -using namespace nv; -using namespace AVPCL; - -#define NLSBMODES 4 // number of different lsb modes per region. since we have two .1 per region, that can have 4 values - -#define NINDICES 8 -#define INDEXBITS 3 -#define HIGH_INDEXBIT (1<<(INDEXBITS-1)) -#define DENOM (NINDICES-1) -#define BIAS (DENOM/2) - -// WORK: determine optimal traversal pattern to search for best shape -- what does the error curve look like? -// i.e. can we search shapes in a particular order so we can see the global error minima easily and -// stop without having to touch all shapes? - -#define POS_TO_X(pos) ((pos)&3) -#define POS_TO_Y(pos) (((pos)>>2)&3) - -#define NBITSIZES (NREGIONS*2) -#define ABITINDEX(region) (2*(region)+0) -#define BBITINDEX(region) (2*(region)+1) - -struct ChanBits -{ - int nbitsizes[NBITSIZES]; // bitsizes for one channel -}; - -struct Pattern -{ - ChanBits chan[NCHANNELS_RGB];// bit patterns used per channel - int transformed; // if 0, deltas are unsigned and no transform; otherwise, signed and transformed - int mode; // associated mode value - int modebits; // number of mode bits - const char *encoding; // verilog description of encoding for this mode -}; - -#define NPATTERNS 1 - -static Pattern patterns[NPATTERNS] = -{ - // red green blue xfm mode mb - 4,4,4,4,4,4, 4,4,4,4,4,4, 4,4,4,4,4,4, 0, 0x1, 1, "", // really 444.1 x 6 -}; - -struct RegionPrec -{ - int endpt_a_prec[NCHANNELS_RGB]; - int endpt_b_prec[NCHANNELS_RGB]; -}; - -struct PatternPrec -{ - RegionPrec region_precs[NREGIONS]; -}; - -// this is the precision for each channel and region -// NOTE: this MUST match the corresponding data in "patterns" above -- WARNING: there is NO nvAssert to check this! -static PatternPrec pattern_precs[NPATTERNS] = -{ - 4,4,4, 4,4,4, 4,4,4, 4,4,4, 4,4,4, 4,4,4, -}; - -// return # of bits needed to store n. handle signed or unsigned cases properly -static int nbits(int n, bool issigned) -{ - int nb; - if (n==0) - return 0; // no bits needed for 0, signed or not - else if (n > 0) - { - for (nb=0; n; ++nb, n>>=1) ; - return nb + (issigned?1:0); - } - else - { - nvAssert (issigned); - for (nb=0; n<-1; ++nb, n>>=1) ; - return nb + 1; - } -} - -static void transform_forward(IntEndptsRGB_2 ep[NREGIONS]) -{ - nvUnreachable(); -} - -static void transform_inverse(IntEndptsRGB_2 ep[NREGIONS]) -{ - nvUnreachable(); -} - -// endpoints are 555,555; reduce to 444,444 and put the lsb bit majority in compr_bits -static void compress_one(const IntEndptsRGB& endpts, IntEndptsRGB_2& compr_endpts) -{ - int onescnt; - - onescnt = 0; - for (int j=0; j> 1; - nvAssert (compr_endpts.A[j] < 16); - } - compr_endpts.a_lsb = onescnt >= 2; - - onescnt = 0; - for (int j=0; j> 1; - nvAssert (compr_endpts.B[j] < 16); - } - compr_endpts.b_lsb = onescnt >= 2; -} - -static void uncompress_one(const IntEndptsRGB_2& compr_endpts, IntEndptsRGB& endpts) -{ - for (int j=0; j= 0 && pat_index < NPATTERNS); - nvAssert (in.getptr() == patterns[pat_index].modebits); - - shapeindex = in.read(SHAPEBITS); - p = patterns[pat_index]; - - for (int j=0; j 0; ++j) - { - float err = Utils::metric4(colors[i], palette[j]) * importance[i]; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[i] = j; - } - } - toterr += besterr; - - // check for early exit - if (toterr > current_err) - { - // fill out bogus index values so it's initialized at least - for (int k = i; k < np; ++k) - indices[k] = -1; - - return FLT_MAX; - } - } - return toterr; -} - -// assign indices given a tile, shape, and quantized endpoints, return toterr for each region -static void assign_indices(const Tile &tile, int shapeindex, IntEndptsRGB_2 endpts[NREGIONS], const PatternPrec &pattern_prec, - int indices[Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS]) -{ - // build list of possibles - Vector4 palette[NREGIONS][NINDICES]; - - for (int region = 0; region < NREGIONS; ++region) - { - generate_palette_quantized(endpts[region], pattern_prec.region_precs[region], &palette[region][0]); - toterr[region] = 0; - } - - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - err = Utils::metric4(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[y][x] = i; - } - } - toterr[region] += besterr; - } -} - -// note: indices are valid only if the value returned is less than old_err; otherwise they contain -1's -// this function returns either old_err or a value smaller (if it was successful in improving the error) -static float perturb_one(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, const IntEndptsRGB_2 &old_endpts, IntEndptsRGB_2 &new_endpts, - float old_err, int do_b, int indices[Tile::TILE_TOTAL]) -{ - // we have the old endpoints: old_endpts - // we have the perturbed endpoints: new_endpts - // we have the temporary endpoints: temp_endpts - - IntEndptsRGB_2 temp_endpts; - float min_err = old_err; // start with the best current error - int beststep; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i>= 1) - { - bool improved = false; - for (int sign = -1; sign <= 1; sign += 2) - { - if (do_b == 0) - { - temp_endpts.A[ch] = new_endpts.A[ch] + sign * step; - if (temp_endpts.A[ch] < 0 || temp_endpts.A[ch] >= (1 << prec)) - continue; - } - else - { - temp_endpts.B[ch] = new_endpts.B[ch] + sign * step; - if (temp_endpts.B[ch] < 0 || temp_endpts.B[ch] >= (1 << prec)) - continue; - } - - float err = map_colors(colors, importance, np, temp_endpts, region_prec, min_err, temp_indices); - - if (err < min_err) - { - improved = true; - min_err = err; - beststep = sign * step; - for (int i=0; i 5000 perturb endpoints 50% of precision -// if err > 1000 25% -// if err > 200 12.5% -// if err > 40 6.25% -// for np = 16 -- adjust error thresholds as a function of np -// always ensure endpoint ordering is preserved (no need to overlap the scan) -// if orig_err returned from this is less than its input value, then indices[] will contain valid indices -static float exhaustive(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, float &orig_err, IntEndptsRGB_2 &opt_endpts, int indices[Tile::TILE_TOTAL]) -{ - IntEndptsRGB_2 temp_endpts; - float best_err = orig_err; - int aprec = region_prec.endpt_a_prec[ch]; - int bprec = region_prec.endpt_b_prec[ch]; - int good_indices[Tile::TILE_TOTAL]; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i 5000.0*thr_scale) { adelta = (1 << aprec)/2; bdelta = (1 << bprec)/2; } - else if (orig_err > 1000.0*thr_scale) { adelta = (1 << aprec)/4; bdelta = (1 << bprec)/4; } - else if (orig_err > 200.0*thr_scale) { adelta = (1 << aprec)/8; bdelta = (1 << bprec)/8; } - else if (orig_err > 40.0*thr_scale) { adelta = (1 << aprec)/16; bdelta = (1 << bprec)/16; } - adelta = max(adelta, 3); - bdelta = max(bdelta, 3); - -#ifdef DISABLE_EXHAUSTIVE - adelta = bdelta = 3; -#endif - - temp_endpts = opt_endpts; - - // ok figure out the range of A and B - int alow = max(0, opt_endpts.A[ch] - adelta); - int ahigh = min((1<= initial_error) break - rgb0 += delta0 - next = 1 - else - if (err1 >= initial_error) break - rgb1 += delta1 - next = 0 - initial_err = map() - for (;;) - err = perturb(next ? rgb1:rgb0, delta) - if (err >= initial_err) break - next? rgb1 : rgb0 += delta - initial_err = err - */ - IntEndptsRGB_2 new_a, new_b; - IntEndptsRGB_2 new_endpt; - int do_b; - int orig_indices[Tile::TILE_TOTAL]; - int new_indices[Tile::TILE_TOTAL]; - int temp_indices0[Tile::TILE_TOTAL]; - int temp_indices1[Tile::TILE_TOTAL]; - - // now optimize each channel separately - // for the first error improvement, we save the indices. then, for any later improvement, we compare the indices - // if they differ, we restart the loop (which then falls back to looking for a first improvement.) - for (int ch = 0; ch < NCHANNELS_RGB; ++ch) - { - // figure out which endpoint when perturbed gives the most improvement and start there - // if we just alternate, we can easily end up in a local minima - float err0 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_a, opt_err, 0, temp_indices0); // perturb endpt A - float err1 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_b, opt_err, 1, temp_indices1); // perturb endpt B - - if (err0 < err1) - { - if (err0 >= opt_err) - continue; - - for (int i=0; i= opt_err) - continue; - - for (int i=0; i= opt_err) - break; - - for (int i=0; i> 1) & 1; - - // make sure we have a valid error for temp_in - // we use FLT_MAX here because we want an accurate temp_in_err, no shortcuts - // (mapcolors will compute a mapping but will stop if the error exceeds the value passed in the FLT_MAX position) - float temp_in_err = map_colors(pixels, importance, np, temp_in, pattern_prec.region_precs[region], FLT_MAX, temp_indices); - - // now try to optimize these endpoints - float temp_out_err = optimize_one(pixels, importance, np, temp_in_err, temp_in, pattern_prec.region_precs[region], temp_out); - - // if we find an improvement, update the best so far and correct the output endpoints and errors - if (temp_out_err < best_err) - { - best_err = temp_out_err; - opt_err[region] = temp_out_err; - opt_endpts[region] = temp_out; - } - } - } -} - -/* optimization algorithm - for each pattern - convert endpoints using pattern precision - assign indices and get initial error - compress indices (and possibly reorder endpoints) - transform endpoints - if transformed endpoints fit pattern - get original endpoints back - optimize endpoints, get new endpoints, new indices, and new error // new error will almost always be better - compress new indices - transform new endpoints - if new endpoints fit pattern AND if error is improved - emit compressed block with new data - else - emit compressed block with original data // to try to preserve maximum endpoint precision -*/ - -static float refine(const Tile &tile, int shapeindex_best, const FltEndpts endpts[NREGIONS], char *block) -{ - float orig_err[NREGIONS], opt_err[NREGIONS], orig_toterr, opt_toterr, expected_opt_err[NREGIONS]; - IntEndptsRGB_2 orig_endpts[NREGIONS], opt_endpts[NREGIONS]; - int orig_indices[Tile::TILE_H][Tile::TILE_W], opt_indices[Tile::TILE_H][Tile::TILE_W]; - - for (int sp = 0; sp < NPATTERNS; ++sp) - { - quantize_endpts(endpts, pattern_precs[sp], orig_endpts); - assign_indices(tile, shapeindex_best, orig_endpts, pattern_precs[sp], orig_indices, orig_err); - swap_indices(orig_endpts, orig_indices, shapeindex_best); - if (patterns[sp].transformed) - transform_forward(orig_endpts); - // apply a heuristic here -- we check if the endpoints fit before we try to optimize them. - // the assumption made is that if they don't fit now, they won't fit after optimizing. - if (endpts_fit(orig_endpts, patterns[sp])) - { - if (patterns[sp].transformed) - transform_inverse(orig_endpts); - optimize_endpts(tile, shapeindex_best, orig_err, orig_endpts, pattern_precs[sp], expected_opt_err, opt_endpts); - assign_indices(tile, shapeindex_best, opt_endpts, pattern_precs[sp], opt_indices, opt_err); - // (nreed) Commented out asserts because they go off all the time...not sure why - //for (int i=0; i 255.0f) v.x = 255.0f; - if (v.y < 0.0f) v.y = 0.0f; - if (v.y > 255.0f) v.y = 255.0f; - if (v.z < 0.0f) v.z = 0.0f; - if (v.z > 255.0f) v.z = 255.0f; - v.w = 255.0f; -} - -static void generate_palette_unquantized(const FltEndpts endpts[NREGIONS], Vector4 palette[NREGIONS][NINDICES]) -{ - for (int region = 0; region < NREGIONS; ++region) - for (int i = 0; i < NINDICES; ++i) - palette[region][i] = Utils::lerp(endpts[region].A, endpts[region].B, i, 0, DENOM); -} - -// generate a palette from unquantized endpoints, then pick best palette color for all pixels in each region, return toterr for all regions combined -static float map_colors(const Tile &tile, int shapeindex, const FltEndpts endpts[NREGIONS]) -{ - // build list of possibles - Vector4 palette[NREGIONS][NINDICES]; - - generate_palette_unquantized(endpts, palette); - - float toterr = 0; - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - err = Utils::metric4(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching. this works for most norms. - break; - if (err < besterr) - besterr = err; - } - toterr += besterr; - } - return toterr; -} - -// for this mode, we assume alpha = 255 constant and compress only the RGB portion. -// however, we do the error check against the actual alpha values supplied for the tile. -static float rough(const Tile &tile, int shapeindex, FltEndpts endpts[NREGIONS]) -{ - for (int region=0; region maxp) maxp = dp; - } - - // choose as endpoints 2 points along the principal direction that span the projections of all of the pixel values - endpts[region].A = mean + minp*Vector4(direction, 0); - endpts[region].B = mean + maxp*Vector4(direction, 0); - - // clamp endpoints - // the argument for clamping is that the actual endpoints need to be clamped and thus we need to choose the best - // shape based on endpoints being clamped - clamp(endpts[region].A); - clamp(endpts[region].B); - } - - return map_colors(tile, shapeindex, endpts); -} - -static void swap(float *list1, int *list2, int i, int j) -{ - float t = list1[i]; list1[i] = list1[j]; list1[j] = t; - int t1 = list2[i]; list2[i] = list2[j]; list2[j] = t1; -} - -float AVPCL::compress_mode0(const Tile &t, char *block) -{ - // number of rough cases to look at. reasonable values of this are 1, NSHAPES/4, and NSHAPES - // NSHAPES/4 gets nearly all the cases; you can increase that a bit (say by 3 or 4) if you really want to squeeze the last bit out - const int NITEMS=NSHAPES/4; - - // pick the best NITEMS shapes and refine these. - struct { - FltEndpts endpts[NREGIONS]; - } all[NSHAPES]; - float roughmse[NSHAPES]; - int index[NSHAPES]; - char tempblock[AVPCL::BLOCKSIZE]; - float msebest = FLT_MAX; - - for (int i=0; i roughmse[j]) - swap(roughmse, index, i, j); - - for (int i=0; i0; ++i) - { - int shape = index[i]; - float mse = refine(t, shape, &all[shape].endpts[0], tempblock); - if (mse < msebest) - { - memcpy(block, tempblock, sizeof(tempblock)); - msebest = mse; - } - } - return msebest; -} - diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode1.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode1.cpp deleted file mode 100644 index fb1bfea..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode1.cpp +++ /dev/null @@ -1,1047 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// Thanks to Jacob Munkberg (jacob@cs.lth.se) for the shortcut of using SVD to do the equivalent of principal components analysis - -// x10 (666x2).1 (666x2).1 64p 3bi - -#include "bits.h" -#include "tile.h" -#include "avpcl.h" -#include "nvcore/debug.h" -#include "nvmath/vector.inl" -#include "nvmath/matrix.inl" -#include "nvmath/fitting.h" -#include "avpcl_utils.h" -#include "endpts.h" -#include -#include - -#include "shapes_two.h" - -using namespace nv; -using namespace AVPCL; - -#define NLSBMODES 2 // number of different lsb modes per region. since we have one .1 per region, that can have 2 values - -#define NINDICES 8 -#define INDEXBITS 3 -#define HIGH_INDEXBIT (1<<(INDEXBITS-1)) -#define DENOM (NINDICES-1) -#define BIAS (DENOM/2) - -// WORK: determine optimal traversal pattern to search for best shape -- what does the error curve look like? -// i.e. can we search shapes in a particular order so we can see the global error minima easily and -// stop without having to touch all shapes? - -#define POS_TO_X(pos) ((pos)&3) -#define POS_TO_Y(pos) (((pos)>>2)&3) - -#define NBITSIZES (NREGIONS*2) -#define ABITINDEX(region) (2*(region)+0) -#define BBITINDEX(region) (2*(region)+1) - -struct ChanBits -{ - int nbitsizes[NBITSIZES]; // bitsizes for one channel -}; - -struct Pattern -{ - ChanBits chan[NCHANNELS_RGB];// bit patterns used per channel - int transformed; // if 0, deltas are unsigned and no transform; otherwise, signed and transformed - int mode; // associated mode value - int modebits; // number of mode bits - const char *encoding; // verilog description of encoding for this mode -}; - -#define NPATTERNS 1 - -static Pattern patterns[NPATTERNS] = -{ - // red green blue xfm mode mb - 6,6,6,6, 6,6,6,6, 6,6,6,6, 0, 0x2, 2, "", -}; - -struct RegionPrec -{ - int endpt_a_prec[NCHANNELS_RGB]; - int endpt_b_prec[NCHANNELS_RGB]; -}; - -struct PatternPrec -{ - RegionPrec region_precs[NREGIONS]; -}; - - -// this is the precision for each channel and region -// NOTE: this MUST match the corresponding data in "patterns" above -- WARNING: there is NO nvAssert to check this! -static PatternPrec pattern_precs[NPATTERNS] = -{ - 6,6,6, 6,6,6, 6,6,6, 6,6,6, -}; - -// return # of bits needed to store n. handle signed or unsigned cases properly -static int nbits(int n, bool issigned) -{ - int nb; - if (n==0) - return 0; // no bits needed for 0, signed or not - else if (n > 0) - { - for (nb=0; n; ++nb, n>>=1) ; - return nb + (issigned?1:0); - } - else - { - nvAssert (issigned); - for (nb=0; n<-1; ++nb, n>>=1) ; - return nb + 1; - } -} - - -static void transform_forward(IntEndptsRGB_1 ep[NREGIONS]) -{ - nvUnreachable(); -} - -static void transform_inverse(IntEndptsRGB_1 ep[NREGIONS]) -{ - nvUnreachable(); -} - -// endpoints are 777,777; reduce to 666,666 and put the lsb bit majority in compr_bits -static void compress_one(const IntEndptsRGB& endpts, IntEndptsRGB_1& compr_endpts) -{ - int onescnt; - - onescnt = 0; - for (int j=0; j> 1; - onescnt += endpts.B[j] & 1; - compr_endpts.B[j] = endpts.B[j] >> 1; - nvAssert (compr_endpts.A[j] < 64); - nvAssert (compr_endpts.B[j] < 64); - } - compr_endpts.lsb = onescnt >= 3; -} - -static void uncompress_one(const IntEndptsRGB_1& compr_endpts, IntEndptsRGB& endpts) -{ - for (int j=0; j= 0 && pat_index < NPATTERNS); - nvAssert (in.getptr() == patterns[pat_index].modebits); - - shapeindex = in.read(SHAPEBITS); - p = patterns[pat_index]; - - for (int j=0; j 0; ++j) - { - float err = Utils::metric4(colors[i], palette[j]) * importance[i]; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[i] = j; - } - } - toterr += besterr; - - // check for early exit - if (toterr > current_err) - { - // fill out bogus index values so it's initialized at least - for (int k = i; k < np; ++k) - indices[k] = -1; - - return FLT_MAX; - } - } - return toterr; -} - -// assign indices given a tile, shape, and quantized endpoints, return toterr for each region -static void assign_indices(const Tile &tile, int shapeindex, IntEndptsRGB_1 endpts[NREGIONS], const PatternPrec &pattern_prec, - int indices[Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS]) -{ - // build list of possibles - Vector4 palette[NREGIONS][NINDICES]; - - for (int region = 0; region < NREGIONS; ++region) - { - generate_palette_quantized(endpts[region], pattern_prec.region_precs[region], &palette[region][0]); - toterr[region] = 0; - } - - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - err = Utils::metric4(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[y][x] = i; - } - } - toterr[region] += besterr; - } -} - -// note: indices are valid only if the value returned is less than old_err; otherwise they contain -1's -// this function returns either old_err or a value smaller (if it was successful in improving the error) -static float perturb_one(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, const IntEndptsRGB_1 &old_endpts, IntEndptsRGB_1 &new_endpts, - float old_err, int do_b, int indices[Tile::TILE_TOTAL]) -{ - // we have the old endpoints: old_endpts - // we have the perturbed endpoints: new_endpts - // we have the temporary endpoints: temp_endpts - - IntEndptsRGB_1 temp_endpts; - float min_err = old_err; // start with the best current error - int beststep; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i>= 1) - { - bool improved = false; - for (int sign = -1; sign <= 1; sign += 2) - { - if (do_b == 0) - { - temp_endpts.A[ch] = new_endpts.A[ch] + sign * step; - if (temp_endpts.A[ch] < 0 || temp_endpts.A[ch] >= (1 << prec)) - continue; - } - else - { - temp_endpts.B[ch] = new_endpts.B[ch] + sign * step; - if (temp_endpts.B[ch] < 0 || temp_endpts.B[ch] >= (1 << prec)) - continue; - } - - float err = map_colors(colors, importance, np, temp_endpts, region_prec, min_err, temp_indices); - - if (err < min_err) - { - improved = true; - min_err = err; - beststep = sign * step; - for (int i=0; i 5000 perturb endpoints 50% of precision -// if err > 1000 25% -// if err > 200 12.5% -// if err > 40 6.25% -// for np = 16 -- adjust error thresholds as a function of np -// always ensure endpoint ordering is preserved (no need to overlap the scan) -// if orig_err returned from this is less than its input value, then indices[] will contain valid indices -static float exhaustive(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, float orig_err, IntEndptsRGB_1 &opt_endpts, int indices[Tile::TILE_TOTAL]) -{ - IntEndptsRGB_1 temp_endpts; - float best_err = orig_err; - int aprec = region_prec.endpt_a_prec[ch]; - int bprec = region_prec.endpt_b_prec[ch]; - int good_indices[Tile::TILE_TOTAL]; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i 5000.0*thr_scale) { adelta = (1 << aprec)/2; bdelta = (1 << bprec)/2; } - else if (orig_err > 1000.0*thr_scale) { adelta = (1 << aprec)/4; bdelta = (1 << bprec)/4; } - else if (orig_err > 200.0*thr_scale) { adelta = (1 << aprec)/8; bdelta = (1 << bprec)/8; } - else if (orig_err > 40.0*thr_scale) { adelta = (1 << aprec)/16; bdelta = (1 << bprec)/16; } - adelta = max(adelta, 3); - bdelta = max(bdelta, 3); - -#ifdef DISABLE_EXHAUSTIVE - adelta = bdelta = 3; -#endif - - temp_endpts = opt_endpts; - - // ok figure out the range of A and B - int alow = max(0, opt_endpts.A[ch] - adelta); - int ahigh = min((1<= initial_error) break - rgb0 += delta0 - next = 1 - else - if (err1 >= initial_error) break - rgb1 += delta1 - next = 0 - initial_err = map() - for (;;) - err = perturb(next ? rgb1:rgb0, delta) - if (err >= initial_err) break - next? rgb1 : rgb0 += delta - initial_err = err - */ - IntEndptsRGB_1 new_a, new_b; - IntEndptsRGB_1 new_endpt; - int do_b; - int orig_indices[Tile::TILE_TOTAL]; - int new_indices[Tile::TILE_TOTAL]; - int temp_indices0[Tile::TILE_TOTAL]; - int temp_indices1[Tile::TILE_TOTAL]; - - // now optimize each channel separately - // for the first error improvement, we save the indices. then, for any later improvement, we compare the indices - // if they differ, we restart the loop (which then falls back to looking for a first improvement.) - for (int ch = 0; ch < NCHANNELS_RGB; ++ch) - { - // figure out which endpoint when perturbed gives the most improvement and start there - // if we just alternate, we can easily end up in a local minima - float err0 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_a, opt_err, 0, temp_indices0); // perturb endpt A - float err1 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_b, opt_err, 1, temp_indices1); // perturb endpt B - - if (err0 < err1) - { - if (err0 >= opt_err) - continue; - - for (int i=0; i= opt_err) - continue; - - for (int i=0; i= opt_err) - break; - - for (int i=0; i 255.0f) v.x = 255.0f; - if (v.y < 0.0f) v.y = 0.0f; - if (v.y > 255.0f) v.y = 255.0f; - if (v.z < 0.0f) v.z = 0.0f; - if (v.z > 255.0f) v.z = 255.0f; - v.w = 255.0f; -} - -static void generate_palette_unquantized(const FltEndpts endpts[NREGIONS], Vector4 palette[NREGIONS][NINDICES]) -{ - for (int region = 0; region < NREGIONS; ++region) - for (int i = 0; i < NINDICES; ++i) - palette[region][i] = Utils::lerp(endpts[region].A, endpts[region].B, i, 0, DENOM); -} - -// generate a palette from unquantized endpoints, then pick best palette color for all pixels in each region, return toterr for all regions combined -static float map_colors(const Tile &tile, int shapeindex, const FltEndpts endpts[NREGIONS]) -{ - // build list of possibles - Vector4 palette[NREGIONS][NINDICES]; - - generate_palette_unquantized(endpts, palette); - - float toterr = 0; - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - float err = Utils::metric4(tile.data[y][x], palette[region][i]) * tile.importance_map[y][x]; - - if (err > besterr) // error increased, so we're done searching. this works for most norms. - break; - if (err < besterr) - besterr = err; - } - toterr += besterr; - } - return toterr; -} - -static float rough(const Tile &tile, int shapeindex, FltEndpts endpts[NREGIONS]) -{ - for (int region=0; region maxp) maxp = dp; - } - - // choose as endpoints 2 points along the principal direction that span the projections of all of the pixel values - endpts[region].A = mean + minp*Vector4(direction, 0); - endpts[region].B = mean + maxp*Vector4(direction, 0); - - // clamp endpoints - // the argument for clamping is that the actual endpoints need to be clamped and thus we need to choose the best - // shape based on endpoints being clamped - clamp(endpts[region].A); - clamp(endpts[region].B); - } - - return map_colors(tile, shapeindex, endpts); -} - -static void swap(float *list1, int *list2, int i, int j) -{ - float t = list1[i]; list1[i] = list1[j]; list1[j] = t; - int t1 = list2[i]; list2[i] = list2[j]; list2[j] = t1; -} - -float AVPCL::compress_mode1(const Tile &t, char *block) -{ - // number of rough cases to look at. reasonable values of this are 1, NSHAPES/4, and NSHAPES - // NSHAPES/4 gets nearly all the cases; you can increase that a bit (say by 3 or 4) if you really want to squeeze the last bit out - const int NITEMS=NSHAPES/4; - - // pick the best NITEMS shapes and refine these. - struct { - FltEndpts endpts[NREGIONS]; - } all[NSHAPES]; - float roughmse[NSHAPES]; - int index[NSHAPES]; - char tempblock[AVPCL::BLOCKSIZE]; - float msebest = FLT_MAX; - - for (int i=0; i roughmse[j]) - swap(roughmse, index, i, j); - - for (int i=0; i0; ++i) - { - int shape = index[i]; - float mse = refine(t, shape, &all[shape].endpts[0], tempblock); - if (mse < msebest) - { - memcpy(block, tempblock, sizeof(tempblock)); - msebest = mse; - } - } - return msebest; -} - diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode2.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode2.cpp deleted file mode 100644 index 380ffce..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode2.cpp +++ /dev/null @@ -1,1004 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// Thanks to Jacob Munkberg (jacob@cs.lth.se) for the shortcut of using SVD to do the equivalent of principal components analysis - -// x100 555x6 64p 2bi - -#include "bits.h" -#include "tile.h" -#include "avpcl.h" -#include "nvcore/debug.h" -#include "nvmath/vector.inl" -#include "nvmath/matrix.inl" -#include "nvmath/fitting.h" -#include "avpcl_utils.h" -#include "endpts.h" -#include -#include - -#include "shapes_three.h" - -using namespace nv; -using namespace AVPCL; - -#define NINDICES 4 -#define INDEXBITS 2 -#define HIGH_INDEXBIT (1<<(INDEXBITS-1)) -#define DENOM (NINDICES-1) -#define BIAS (DENOM/2) - -// WORK: determine optimal traversal pattern to search for best shape -- what does the error curve look like? -// i.e. can we search shapes in a particular order so we can see the global error minima easily and -// stop without having to touch all shapes? - -#define POS_TO_X(pos) ((pos)&3) -#define POS_TO_Y(pos) (((pos)>>2)&3) - -#define NBITSIZES 6 - -struct ChanBits -{ - int nbitsizes[NBITSIZES]; // bitsizes for one channel -}; - -struct Pattern -{ - ChanBits chan[NCHANNELS_RGB];// bit patterns used per channel - int transformed; // if 0, deltas are unsigned and no transform; otherwise, signed and transformed - int mode; // associated mode value - int modebits; // number of mode bits - const char *encoding; // verilog description of encoding for this mode -}; - -#define NPATTERNS 1 - -static Pattern patterns[NPATTERNS] = -{ - // red green blue xfm mode mb - 5,5,5,5,5,5, 5,5,5,5,5,5, 5,5,5,5,5,5, 0, 0x4, 3, "", -}; - - -struct RegionPrec -{ - int endpt_a_prec[NCHANNELS_RGB]; - int endpt_b_prec[NCHANNELS_RGB]; -}; - -struct PatternPrec -{ - RegionPrec region_precs[NREGIONS_THREE]; -}; - - -// this is the precision for each channel and region -// NOTE: this MUST match the corresponding data in "patterns" above -- WARNING: there is NO nvAssert to check this! - -static PatternPrec pattern_precs[NPATTERNS] = -{ - 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, 5,5,5, -}; - -// return # of bits needed to store n. handle signed or unsigned cases properly -static int nbits(int n, bool issigned) -{ - int nb; - if (n==0) - return 0; // no bits needed for 0, signed or not - else if (n > 0) - { - for (nb=0; n; ++nb, n>>=1) ; - return nb + (issigned?1:0); - } - else - { - nvAssert (issigned); - for (nb=0; n<-1; ++nb, n>>=1) ; - return nb + 1; - } -} - -#define R_0 ep[0].A[i] -#define R_1 ep[0].B[i] -#define R_2 ep[1].A[i] -#define R_3 ep[1].B[i] - -static void transform_forward(IntEndptsRGB ep[NREGIONS]) -{ - for (int i=0; i= 0 && pat_index < NPATTERNS); - nvAssert (in.getptr() == patterns[pat_index].modebits); - - shapeindex = in.read(SHAPEBITS); - - p = patterns[pat_index]; - - for (int j=0; j 0; ++j) - { - float err = Utils::metric4(colors[i], palette[j]) * importance[i]; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[i] = j; - } - } - toterr += besterr; - - // check for early exit - if (toterr > current_err) - { - // fill out bogus index values so it's initialized at least - for (int k = i; k < np; ++k) - indices[k] = -1; - - return FLT_MAX; - } - } - return toterr; -} - -// assign indices given a tile, shape, and quantized endpoints, return toterr for each region -static void assign_indices(const Tile &tile, int shapeindex, IntEndptsRGB endpts[NREGIONS_THREE], const PatternPrec &pattern_prec, - int indices[Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS_THREE]) -{ - // build list of possibles - Vector4 palette[NREGIONS_THREE][NINDICES]; - - for (int region = 0; region < NREGIONS_THREE; ++region) - { - generate_palette_quantized(endpts[region], pattern_prec.region_precs[region], &palette[region][0]); - toterr[region] = 0; - } - - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - err = Utils::metric4(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[y][x] = i; - } - } - toterr[region] += besterr; - } -} - -// note: indices are valid only if the value returned is less than old_err; otherwise they contain -1's -// this function returns either old_err or a value smaller (if it was successful in improving the error) -static float perturb_one(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, const IntEndptsRGB &old_endpts, IntEndptsRGB &new_endpts, - float old_err, int do_b, int indices[Tile::TILE_TOTAL]) -{ - // we have the old endpoints: old_endpts - // we have the perturbed endpoints: new_endpts - // we have the temporary endpoints: temp_endpts - - IntEndptsRGB temp_endpts; - float min_err = old_err; // start with the best current error - int beststep; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i>= 1) - { - bool improved = false; - for (int sign = -1; sign <= 1; sign += 2) - { - if (do_b == 0) - { - temp_endpts.A[ch] = new_endpts.A[ch] + sign * step; - if (temp_endpts.A[ch] < 0 || temp_endpts.A[ch] >= (1 << prec)) - continue; - } - else - { - temp_endpts.B[ch] = new_endpts.B[ch] + sign * step; - if (temp_endpts.B[ch] < 0 || temp_endpts.B[ch] >= (1 << prec)) - continue; - } - - float err = map_colors(colors, importance, np, temp_endpts, region_prec, min_err, temp_indices); - - if (err < min_err) - { - improved = true; - min_err = err; - beststep = sign * step; - for (int i=0; i 5000 perturb endpoints 50% of precision -// if err > 1000 25% -// if err > 200 12.5% -// if err > 40 6.25% -// for np = 16 -- adjust error thresholds as a function of np -// always ensure endpoint ordering is preserved (no need to overlap the scan) -// if orig_err returned from this is less than its input value, then indices[] will contain valid indices -static float exhaustive(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, float orig_err, IntEndptsRGB &opt_endpts, int indices[Tile::TILE_TOTAL]) -{ - IntEndptsRGB temp_endpts; - float best_err = orig_err; - int aprec = region_prec.endpt_a_prec[ch]; - int bprec = region_prec.endpt_b_prec[ch]; - int good_indices[Tile::TILE_TOTAL]; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i 5000.0*thr_scale) { adelta = (1 << aprec)/2; bdelta = (1 << bprec)/2; } - else if (orig_err > 1000.0*thr_scale) { adelta = (1 << aprec)/4; bdelta = (1 << bprec)/4; } - else if (orig_err > 200.0*thr_scale) { adelta = (1 << aprec)/8; bdelta = (1 << bprec)/8; } - else if (orig_err > 40.0*thr_scale) { adelta = (1 << aprec)/16; bdelta = (1 << bprec)/16; } - adelta = max(adelta, 3); - bdelta = max(bdelta, 3); - -#ifdef DISABLE_EXHAUSTIVE - adelta = bdelta = 3; -#endif - - temp_endpts = opt_endpts; - - // ok figure out the range of A and B - int alow = max(0, opt_endpts.A[ch] - adelta); - int ahigh = min((1<= initial_error) break - rgb0 += delta0 - next = 1 - else - if (err1 >= initial_error) break - rgb1 += delta1 - next = 0 - initial_err = map() - for (;;) - err = perturb(next ? rgb1:rgb0, delta) - if (err >= initial_err) break - next? rgb1 : rgb0 += delta - initial_err = err - */ - IntEndptsRGB new_a, new_b; - IntEndptsRGB new_endpt; - int do_b; - int orig_indices[Tile::TILE_TOTAL]; - int new_indices[Tile::TILE_TOTAL]; - int temp_indices0[Tile::TILE_TOTAL]; - int temp_indices1[Tile::TILE_TOTAL]; - - // now optimize each channel separately - // for the first error improvement, we save the indices. then, for any later improvement, we compare the indices - // if they differ, we restart the loop (which then falls back to looking for a first improvement.) - for (int ch = 0; ch < NCHANNELS_RGB; ++ch) - { - // figure out which endpoint when perturbed gives the most improvement and start there - // if we just alternate, we can easily end up in a local minima - float err0 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_a, opt_err, 0, temp_indices0); // perturb endpt A - float err1 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_b, opt_err, 1, temp_indices1); // perturb endpt B - - if (err0 < err1) - { - if (err0 >= opt_err) - continue; - - for (int i=0; i= opt_err) - continue; - - for (int i=0; i= opt_err) - break; - - for (int i=0; i 255.0f) v.x = 255.0f; - if (v.y < 0.0f) v.y = 0.0f; - if (v.y > 255.0f) v.y = 255.0f; - if (v.z < 0.0f) v.z = 0.0f; - if (v.z > 255.0f) v.z = 255.0f; - v.w = 255.0f; -} - -static void generate_palette_unquantized(const FltEndpts endpts[NREGIONS_THREE], Vector4 palette[NREGIONS_THREE][NINDICES]) -{ - for (int region = 0; region < NREGIONS_THREE; ++region) - for (int i = 0; i < NINDICES; ++i) - palette[region][i] = Utils::lerp(endpts[region].A, endpts[region].B, i, 0, DENOM); -} - -// generate a palette from unquantized endpoints, then pick best palette color for all pixels in each region, return toterr for all regions combined -static float map_colors(const Tile &tile, int shapeindex, const FltEndpts endpts[NREGIONS_THREE]) -{ - // build list of possibles - Vector4 palette[NREGIONS_THREE][NINDICES]; - - generate_palette_unquantized(endpts, palette); - - float toterr = 0; - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - err = Utils::metric4(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching. this works for most norms. - break; - if (err < besterr) - besterr = err; - } - toterr += besterr; - } - return toterr; -} - -static float rough(const Tile &tile, int shapeindex, FltEndpts endpts[NREGIONS_THREE]) -{ - for (int region=0; region maxp) maxp = dp; - } - - // choose as endpoints 2 points along the principal direction that span the projections of all of the pixel values - endpts[region].A = mean + minp*Vector4(direction, 0); - endpts[region].B = mean + maxp*Vector4(direction, 0); - - // clamp endpoints - // the argument for clamping is that the actual endpoints need to be clamped and thus we need to choose the best - // shape based on endpoints being clamped - clamp(endpts[region].A); - clamp(endpts[region].B); - } - - return map_colors(tile, shapeindex, endpts); -} - -static void swap(float *list1, int *list2, int i, int j) -{ - float t = list1[i]; list1[i] = list1[j]; list1[j] = t; - int t1 = list2[i]; list2[i] = list2[j]; list2[j] = t1; -} - -float AVPCL::compress_mode2(const Tile &t, char *block) -{ - // number of rough cases to look at. reasonable values of this are 1, NSHAPES/4, and NSHAPES - // NSHAPES/4 gets nearly all the cases; you can increase that a bit (say by 3 or 4) if you really want to squeeze the last bit out - const int NITEMS=NSHAPES/4; - - // pick the best NITEMS shapes and refine these. - struct { - FltEndpts endpts[NREGIONS_THREE]; - } all[NSHAPES]; - float roughmse[NSHAPES]; - int index[NSHAPES]; - char tempblock[AVPCL::BLOCKSIZE]; - float msebest = FLT_MAX; - - for (int i=0; i roughmse[j]) - swap(roughmse, index, i, j); - - for (int i=0; i0; ++i) - { - int shape = index[i]; - float mse = refine(t, shape, &all[shape].endpts[0], tempblock); - if (mse < msebest) - { - memcpy(block, tempblock, sizeof(tempblock)); - msebest = mse; - } - } - return msebest; -} - diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode3.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode3.cpp deleted file mode 100644 index 0020d8a..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode3.cpp +++ /dev/null @@ -1,1059 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// Thanks to Jacob Munkberg (jacob@cs.lth.se) for the shortcut of using SVD to do the equivalent of principal components analysis - -// x1000 777.1x4 64p 2bi (30b) - -#include "bits.h" -#include "tile.h" -#include "avpcl.h" -#include "nvcore/debug.h" -#include "nvmath/vector.inl" -#include "nvmath/matrix.inl" -#include "nvmath/fitting.h" -#include "avpcl_utils.h" -#include "endpts.h" -#include -#include - -#include "shapes_two.h" - -using namespace nv; -using namespace AVPCL; - -#define NLSBMODES 4 // number of different lsb modes per region. since we have two .1 per region, that can have 4 values - -#define NINDICES 4 -#define INDEXBITS 2 -#define HIGH_INDEXBIT (1<<(INDEXBITS-1)) -#define DENOM (NINDICES-1) -#define BIAS (DENOM/2) - -// WORK: determine optimal traversal pattern to search for best shape -- what does the error curve look like? -// i.e. can we search shapes in a particular order so we can see the global error minima easily and -// stop without having to touch all shapes? - -#define POS_TO_X(pos) ((pos)&3) -#define POS_TO_Y(pos) (((pos)>>2)&3) - -#define NBITSIZES (NREGIONS*2) -#define ABITINDEX(region) (2*(region)+0) -#define BBITINDEX(region) (2*(region)+1) - -struct ChanBits -{ - int nbitsizes[NBITSIZES]; // bitsizes for one channel -}; - -struct Pattern -{ - ChanBits chan[NCHANNELS_RGB];// bit patterns used per channel - int transformed; // if 0, deltas are unsigned and no transform; otherwise, signed and transformed - int mode; // associated mode value - int modebits; // number of mode bits - const char *encoding; // verilog description of encoding for this mode -}; - -#define NPATTERNS 1 -#define NREGIONS 2 - -static Pattern patterns[NPATTERNS] = -{ - // red green blue xfm mode mb - 7,7,7,7, 7,7,7,7, 7,7,7,7, 0, 0x8, 4, "", -}; - -struct RegionPrec -{ - int endpt_a_prec[NCHANNELS_RGB]; - int endpt_b_prec[NCHANNELS_RGB]; -}; - -struct PatternPrec -{ - RegionPrec region_precs[NREGIONS]; -}; - - -// this is the precision for each channel and region -// NOTE: this MUST match the corresponding data in "patterns" above -- WARNING: there is NO nvAssert to check this! -static PatternPrec pattern_precs[NPATTERNS] = -{ - 7,7,7, 7,7,7, 7,7,7, 7,7,7, -}; - -// return # of bits needed to store n. handle signed or unsigned cases properly -static int nbits(int n, bool issigned) -{ - int nb; - if (n==0) - return 0; // no bits needed for 0, signed or not - else if (n > 0) - { - for (nb=0; n; ++nb, n>>=1) ; - return nb + (issigned?1:0); - } - else - { - nvAssert (issigned); - for (nb=0; n<-1; ++nb, n>>=1) ; - return nb + 1; - } -} - -static void transform_forward(IntEndptsRGB_2 ep[NREGIONS]) -{ - nvUnreachable(); -} - -static void transform_inverse(IntEndptsRGB_2 ep[NREGIONS]) -{ - nvUnreachable(); -} - -// endpoints are 888,888; reduce to 777,777 and put the lsb bit majority in compr_bits -static void compress_one(const IntEndptsRGB& endpts, IntEndptsRGB_2& compr_endpts) -{ - int onescnt; - - onescnt = 0; - for (int j=0; j> 1; - nvAssert (compr_endpts.A[j] < 128); - } - compr_endpts.a_lsb = onescnt >= 2; - - onescnt = 0; - for (int j=0; j> 1; - nvAssert (compr_endpts.B[j] < 128); - } - compr_endpts.b_lsb = onescnt >= 2; -} - -static void uncompress_one(const IntEndptsRGB_2& compr_endpts, IntEndptsRGB& endpts) -{ - for (int j=0; j= 0 && pat_index < NPATTERNS); - nvAssert (in.getptr() == patterns[pat_index].modebits); - - shapeindex = in.read(SHAPEBITS); - p = patterns[pat_index]; - - for (int j=0; j 0; ++j) - { - float err = Utils::metric4(colors[i], palette[j]) * importance[i]; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[i] = j; - } - } - toterr += besterr; - - // check for early exit - if (toterr > current_err) - { - // fill out bogus index values so it's initialized at least - for (int k = i; k < np; ++k) - indices[k] = -1; - - return FLT_MAX; - } - } - return toterr; -} - -static void assign_indices(const Tile &tile, int shapeindex, IntEndptsRGB_2 endpts[NREGIONS], const PatternPrec &pattern_prec, - int indices[Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS]) -{ - // build list of possibles - Vector4 palette[NREGIONS][NINDICES]; - - for (int region = 0; region < NREGIONS; ++region) - { - generate_palette_quantized(endpts[region], pattern_prec.region_precs[region], &palette[region][0]); - toterr[region] = 0; - } - - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - err = Utils::metric4(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[y][x] = i; - } - } - toterr[region] += besterr; - } -} - -// note: indices are valid only if the value returned is less than old_err; otherwise they contain -1's -// this function returns either old_err or a value smaller (if it was successful in improving the error) -static float perturb_one(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, const IntEndptsRGB_2 &old_endpts, IntEndptsRGB_2 &new_endpts, - float old_err, int do_b, int indices[Tile::TILE_TOTAL]) -{ - // we have the old endpoints: old_endpts - // we have the perturbed endpoints: new_endpts - // we have the temporary endpoints: temp_endpts - - IntEndptsRGB_2 temp_endpts; - float min_err = old_err; // start with the best current error - int beststep; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i>= 1) - { - bool improved = false; - for (int sign = -1; sign <= 1; sign += 2) - { - if (do_b == 0) - { - temp_endpts.A[ch] = new_endpts.A[ch] + sign * step; - if (temp_endpts.A[ch] < 0 || temp_endpts.A[ch] >= (1 << prec)) - continue; - } - else - { - temp_endpts.B[ch] = new_endpts.B[ch] + sign * step; - if (temp_endpts.B[ch] < 0 || temp_endpts.B[ch] >= (1 << prec)) - continue; - } - - float err = map_colors(colors, importance, np, temp_endpts, region_prec, min_err, temp_indices); - - if (err < min_err) - { - improved = true; - min_err = err; - beststep = sign * step; - for (int i=0; i 5000 perturb endpoints 50% of precision -// if err > 1000 25% -// if err > 200 12.5% -// if err > 40 6.25% -// for np = 16 -- adjust error thresholds as a function of np -// always ensure endpoint ordering is preserved (no need to overlap the scan) -// if orig_err returned from this is less than its input value, then indices[] will contain valid indices -static float exhaustive(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, float &orig_err, IntEndptsRGB_2 &opt_endpts, int indices[Tile::TILE_TOTAL]) -{ - IntEndptsRGB_2 temp_endpts; - float best_err = orig_err; - int aprec = region_prec.endpt_a_prec[ch]; - int bprec = region_prec.endpt_b_prec[ch]; - int good_indices[Tile::TILE_TOTAL]; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i 5000.0*thr_scale) { adelta = (1 << aprec)/2; bdelta = (1 << bprec)/2; } - else if (orig_err > 1000.0*thr_scale) { adelta = (1 << aprec)/4; bdelta = (1 << bprec)/4; } - else if (orig_err > 200.0*thr_scale) { adelta = (1 << aprec)/8; bdelta = (1 << bprec)/8; } - else if (orig_err > 40.0*thr_scale) { adelta = (1 << aprec)/16; bdelta = (1 << bprec)/16; } - adelta = max(adelta, 3); - bdelta = max(bdelta, 3); - -#ifdef DISABLE_EXHAUSTIVE - adelta = bdelta = 3; -#endif - - temp_endpts = opt_endpts; - - // ok figure out the range of A and B - int alow = max(0, opt_endpts.A[ch] - adelta); - int ahigh = min((1<= initial_error) break - rgb0 += delta0 - next = 1 - else - if (err1 >= initial_error) break - rgb1 += delta1 - next = 0 - initial_err = map() - for (;;) - err = perturb(next ? rgb1:rgb0, delta) - if (err >= initial_err) break - next? rgb1 : rgb0 += delta - initial_err = err - */ - IntEndptsRGB_2 new_a, new_b; - IntEndptsRGB_2 new_endpt; - int do_b; - int orig_indices[Tile::TILE_TOTAL]; - int new_indices[Tile::TILE_TOTAL]; - int temp_indices0[Tile::TILE_TOTAL]; - int temp_indices1[Tile::TILE_TOTAL]; - - // now optimize each channel separately - // for the first error improvement, we save the indices. then, for any later improvement, we compare the indices - // if they differ, we restart the loop (which then falls back to looking for a first improvement.) - for (int ch = 0; ch < NCHANNELS_RGB; ++ch) - { - // figure out which endpoint when perturbed gives the most improvement and start there - // if we just alternate, we can easily end up in a local minima - float err0 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_a, opt_err, 0, temp_indices0); // perturb endpt A - float err1 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_b, opt_err, 1, temp_indices1); // perturb endpt B - - if (err0 < err1) - { - if (err0 >= opt_err) - continue; - - for (int i=0; i= opt_err) - continue; - - for (int i=0; i= opt_err) - break; - - for (int i=0; i> 1) & 1; - - // make sure we have a valid error for temp_in - // we use FLT_MAX here because we want an accurate temp_in_err, no shortcuts - // (mapcolors will compute a mapping but will stop if the error exceeds the value passed in the FLT_MAX position) - float temp_in_err = map_colors(pixels, importance, np, temp_in, pattern_prec.region_precs[region], FLT_MAX, temp_indices); - - // now try to optimize these endpoints - float temp_out_err = optimize_one(pixels, importance, np, temp_in_err, temp_in, pattern_prec.region_precs[region], temp_out); - - // if we find an improvement, update the best so far and correct the output endpoints and errors - if (temp_out_err < best_err) - { - best_err = temp_out_err; - opt_err[region] = temp_out_err; - opt_endpts[region] = temp_out; - } - } - } -} - -/* optimization algorithm - for each pattern - convert endpoints using pattern precision - assign indices and get initial error - compress indices (and possibly reorder endpoints) - transform endpoints - if transformed endpoints fit pattern - get original endpoints back - optimize endpoints, get new endpoints, new indices, and new error // new error will almost always be better - compress new indices - transform new endpoints - if new endpoints fit pattern AND if error is improved - emit compressed block with new data - else - emit compressed block with original data // to try to preserve maximum endpoint precision -*/ - -static float refine(const Tile &tile, int shapeindex_best, const FltEndpts endpts[NREGIONS], char *block) -{ - float orig_err[NREGIONS], opt_err[NREGIONS], orig_toterr, opt_toterr, expected_opt_err[NREGIONS]; - IntEndptsRGB_2 orig_endpts[NREGIONS], opt_endpts[NREGIONS]; - int orig_indices[Tile::TILE_H][Tile::TILE_W], opt_indices[Tile::TILE_H][Tile::TILE_W]; - - for (int sp = 0; sp < NPATTERNS; ++sp) - { - quantize_endpts(endpts, pattern_precs[sp], orig_endpts); - assign_indices(tile, shapeindex_best, orig_endpts, pattern_precs[sp], orig_indices, orig_err); - swap_indices(orig_endpts, orig_indices, shapeindex_best); - if (patterns[sp].transformed) - transform_forward(orig_endpts); - // apply a heuristic here -- we check if the endpoints fit before we try to optimize them. - // the assumption made is that if they don't fit now, they won't fit after optimizing. - if (endpts_fit(orig_endpts, patterns[sp])) - { - if (patterns[sp].transformed) - transform_inverse(orig_endpts); - optimize_endpts(tile, shapeindex_best, orig_err, orig_endpts, pattern_precs[sp], expected_opt_err, opt_endpts); - assign_indices(tile, shapeindex_best, opt_endpts, pattern_precs[sp], opt_indices, opt_err); - // (nreed) Commented out asserts because they go off all the time...not sure why - //for (int i=0; i 255.0f) v.x = 255.0f; - if (v.y < 0.0f) v.y = 0.0f; - if (v.y > 255.0f) v.y = 255.0f; - if (v.z < 0.0f) v.z = 0.0f; - if (v.z > 255.0f) v.z = 255.0f; - v.w = 255.0f; -} - -static void generate_palette_unquantized(const FltEndpts endpts[NREGIONS], Vector4 palette[NREGIONS][NINDICES]) -{ - for (int region = 0; region < NREGIONS; ++region) - for (int i = 0; i < NINDICES; ++i) - palette[region][i] = Utils::lerp(endpts[region].A, endpts[region].B, i, 0, DENOM); -} - -// generate a palette from unquantized endpoints, then pick best palette color for all pixels in each region, return toterr for all regions combined -static float map_colors(const Tile &tile, int shapeindex, const FltEndpts endpts[NREGIONS]) -{ - // build list of possibles - Vector4 palette[NREGIONS][NINDICES]; - - generate_palette_unquantized(endpts, palette); - - float toterr = 0; - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - err = Utils::metric4(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching. this works for most norms. - break; - if (err < besterr) - besterr = err; - } - toterr += besterr; - } - return toterr; -} - -static float rough(const Tile &tile, int shapeindex, FltEndpts endpts[NREGIONS]) -{ - for (int region=0; region maxp) maxp = dp; - } - - // choose as endpoints 2 points along the principal direction that span the projections of all of the pixel values - endpts[region].A = mean + minp*Vector4(direction, 0); - endpts[region].B = mean + maxp*Vector4(direction, 0); - - // clamp endpoints - // the argument for clamping is that the actual endpoints need to be clamped and thus we need to choose the best - // shape based on endpoints being clamped - clamp(endpts[region].A); - clamp(endpts[region].B); - } - - return map_colors(tile, shapeindex, endpts); -} - -static void swap(float *list1, int *list2, int i, int j) -{ - float t = list1[i]; list1[i] = list1[j]; list1[j] = t; - int t1 = list2[i]; list2[i] = list2[j]; list2[j] = t1; -} - -float AVPCL::compress_mode3(const Tile &t, char *block) -{ - // number of rough cases to look at. reasonable values of this are 1, NSHAPES/4, and NSHAPES - // NSHAPES/4 gets nearly all the cases; you can increase that a bit (say by 3 or 4) if you really want to squeeze the last bit out - const int NITEMS=NSHAPES/4; - - // pick the best NITEMS shapes and refine these. - struct { - FltEndpts endpts[NREGIONS]; - } all[NSHAPES]; - float roughmse[NSHAPES]; - int index[NSHAPES]; - char tempblock[AVPCL::BLOCKSIZE]; - float msebest = FLT_MAX; - - for (int i=0; i roughmse[j]) - swap(roughmse, index, i, j); - - for (int i=0; i0; ++i) - { - int shape = index[i]; - float mse = refine(t, shape, &all[shape].endpts[0], tempblock); - if (mse < msebest) - { - memcpy(block, tempblock, sizeof(tempblock)); - msebest = mse; - } - } - return msebest; -} - diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode4.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode4.cpp deleted file mode 100644 index 5115d7c..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode4.cpp +++ /dev/null @@ -1,1214 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// Thanks to Jacob Munkberg (jacob@cs.lth.se) for the shortcut of using SVD to do the equivalent of principal components analysis - -// x10000 2r 1i 555x2 6x2 2bi 3bi - -#include "bits.h" -#include "tile.h" -#include "avpcl.h" -#include "nvcore/debug.h" -#include "nvmath/vector.inl" -#include "nvmath/matrix.inl" -#include "nvmath/fitting.h" -#include "avpcl_utils.h" -#include "endpts.h" -#include -#include - -using namespace nv; -using namespace AVPCL; - -// there are 2 index arrays. INDEXMODE selects between the arrays being 2 & 3 bits or 3 & 2 bits -// array 0 is always the RGB array and array 1 is always the A array -#define NINDEXARRAYS 2 -#define INDEXARRAY_RGB 0 -#define INDEXARRAY_A 1 -#define INDEXARRAY_2BITS(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? INDEXARRAY_A : INDEXARRAY_RGB) -#define INDEXARRAY_3BITS(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_3BITS) ? INDEXARRAY_A : INDEXARRAY_RGB) - -#define NINDICES3 8 -#define INDEXBITS3 3 -#define HIGH_INDEXBIT3 (1<<(INDEXBITS3-1)) -#define DENOM3 (NINDICES3-1) -#define BIAS3 (DENOM3/2) - -#define NINDICES2 4 -#define INDEXBITS2 2 -#define HIGH_INDEXBIT2 (1<<(INDEXBITS2-1)) -#define DENOM2 (NINDICES2-1) -#define BIAS2 (DENOM2/2) - -#define NINDICES_RGB(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? NINDICES3 : NINDICES2) -#define INDEXBITS_RGB(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? INDEXBITS3 : INDEXBITS2) -#define HIGH_INDEXBIT_RGB(indexmode)((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? HIGH_INDEXBIT3 : HIGH_INDEXBIT2) -#define DENOM_RGB(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? DENOM3 : DENOM2) -#define BIAS_RGB(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? BIAS3 : BIAS2) - -#define NINDICES_A(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? NINDICES2 : NINDICES3) -#define INDEXBITS_A(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? INDEXBITS2 : INDEXBITS3) -#define HIGH_INDEXBIT_A(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? HIGH_INDEXBIT2 : HIGH_INDEXBIT3) -#define DENOM_A(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? DENOM2 : DENOM3) -#define BIAS_A(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? BIAS2 : BIAS3) - -#define NSHAPES 1 - -static int shapes[NSHAPES] = -{ - 0x0000, -}; - -#define REGION(x,y,shapeindex) ((shapes[shapeindex]&(1<<(15-(x)-4*(y))))!=0) - -#define NREGIONS 1 // keep the region stuff in just in case... - -// encoded index compression location: region 0 is always at 0,0. - -#define NBITSIZES 2 // one endpoint pair - -struct ChanBits -{ - int nbitsizes[NBITSIZES]; // bitsizes for one channel -}; - -struct Pattern -{ - ChanBits chan[NCHANNELS_RGBA];// bit patterns used per channel - int transform_mode; // x0 means alpha channel not transformed, x1 otherwise. 0x rgb not transformed, 1x otherwise. - int mode; // associated mode value - int modebits; // number of mode bits - const char *encoding; // verilog description of encoding for this mode -}; - -#define TRANSFORM_MODE_ALPHA 1 -#define TRANSFORM_MODE_RGB 2 - -#define NPATTERNS 1 - -static Pattern patterns[NPATTERNS] = -{ - // red green blue alpha xfm mode mb encoding - 5,5, 5,5, 5,5, 6,6, 0x0, 0x10, 5, "", -}; - -struct RegionPrec -{ - int endpt_a_prec[NCHANNELS_RGBA]; - int endpt_b_prec[NCHANNELS_RGBA]; -}; - -struct PatternPrec -{ - RegionPrec region_precs[NREGIONS]; -}; - -// this is the precision for each channel and region -// NOTE: this MUST match the corresponding data in "patterns" above -- WARNING: there is NO nvAssert to check this! -static PatternPrec pattern_precs[NPATTERNS] = -{ - 5,5,5,6, 5,5,5,6, -}; - - -// return # of bits needed to store n. handle signed or unsigned cases properly -static int nbits(int n, bool issigned) -{ - int nb; - if (n==0) - return 0; // no bits needed for 0, signed or not - else if (n > 0) - { - for (nb=0; n; ++nb, n>>=1) ; - return nb + (issigned?1:0); - } - else - { - nvAssert (issigned); - for (nb=0; n<-1; ++nb, n>>=1) ; - return nb + 1; - } -} - -#define R_0 ep[0].A[i] -#define R_1 ep[0].B[i] - -static void transform_forward(int transform_mode, IntEndptsRGBA ep[NREGIONS]) -{ - int i; - - if (transform_mode & TRANSFORM_MODE_RGB) - for (i=CHANNEL_R; i> 2) & 3 and x = index & 3 -static void swap_indices(int shapeindex, int indexmode, IntEndptsRGBA endpts[NREGIONS], int indices[NINDEXARRAYS][Tile::TILE_H][Tile::TILE_W]) -{ - int index_positions[NREGIONS]; - - index_positions[0] = 0; // since WLOG we have the high bit of the shapes at 0 - - for (int region = 0; region < NREGIONS; ++region) - { - int x = index_positions[region] & 3; - int y = (index_positions[region] >> 2) & 3; - nvAssert(REGION(x,y,shapeindex) == region); // double check the table - - // swap RGB - if (indices[INDEXARRAY_RGB][y][x] & HIGH_INDEXBIT_RGB(indexmode)) - { - // high bit is set, swap the endpts and indices for this region - int t; - for (int i=CHANNEL_R; i<=CHANNEL_B; ++i) { t = endpts[region].A[i]; endpts[region].A[i] = endpts[region].B[i]; endpts[region].B[i] = t; } - - for (int y = 0; y < Tile::TILE_H; y++) - for (int x = 0; x < Tile::TILE_W; x++) - if (REGION(x,y,shapeindex) == region) - indices[INDEXARRAY_RGB][y][x] = NINDICES_RGB(indexmode) - 1 - indices[INDEXARRAY_RGB][y][x]; - } - - // swap A - if (indices[INDEXARRAY_A][y][x] & HIGH_INDEXBIT_A(indexmode)) - { - // high bit is set, swap the endpts and indices for this region - int t; - for (int i=CHANNEL_A; i<=CHANNEL_A; ++i) { t = endpts[region].A[i]; endpts[region].A[i] = endpts[region].B[i]; endpts[region].B[i] = t; } - - for (int y = 0; y < Tile::TILE_H; y++) - for (int x = 0; x < Tile::TILE_W; x++) - if (REGION(x,y,shapeindex) == region) - indices[INDEXARRAY_A][y][x] = NINDICES_A(indexmode) - 1 - indices[INDEXARRAY_A][y][x]; - } - } -} - -static bool endpts_fit(IntEndptsRGBA endpts[NREGIONS], const Pattern &p) -{ - return true; -} - -static void write_header(const IntEndptsRGBA endpts[NREGIONS], int shapeindex, const Pattern &p, int rotatemode, int indexmode, Bits &out) -{ - // ignore shapeindex - out.write(p.mode, p.modebits); - out.write(rotatemode, ROTATEMODE_BITS); - out.write(indexmode, INDEXMODE_BITS); - for (int i=0; i= 0 && pat_index < NPATTERNS); - nvAssert (in.getptr() == patterns[pat_index].modebits); - - p = patterns[pat_index]; - - shapeindex = 0; // we don't have any - - rotatemode = in.read(ROTATEMODE_BITS); - indexmode = in.read(INDEXMODE_BITS); - for (int i=0; i>2][i&3], INDEXBITS2 - (i==0?1:0)); // write i..[1:0] or i..[0] - - // then the 3 bit indices - nvAssert ((indices[INDEXARRAY_3BITS(indexmode)][0][0] & HIGH_INDEXBIT3) == 0); - for (int i = 0; i < Tile::TILE_TOTAL; ++i) - out.write(indices[INDEXARRAY_3BITS(indexmode)][i>>2][i&3], INDEXBITS3 - (i==0?1:0)); // write i..[2:0] or i..[1:0] -} - -static void read_indices(Bits &in, int shapeindex, int indexmode, int indices[NINDEXARRAYS][Tile::TILE_H][Tile::TILE_W]) -{ - // the indices we shorten is always index 0 - - // do the 2 bit indices first - for (int i = 0; i < Tile::TILE_TOTAL; ++i) - indices[INDEXARRAY_2BITS(indexmode)][i>>2][i&3] = in.read(INDEXBITS2 - (i==0?1:0)); // read i..[1:0] or i..[0] - - // then the 3 bit indices - for (int i = 0; i < Tile::TILE_TOTAL; ++i) - indices[INDEXARRAY_3BITS(indexmode)][i>>2][i&3] = in.read(INDEXBITS3 - (i==0?1:0)); // read i..[1:0] or i..[0] -} - -static void emit_block(const IntEndptsRGBA endpts[NREGIONS], int shapeindex, const Pattern &p, const int indices[NINDEXARRAYS][Tile::TILE_H][Tile::TILE_W], int rotatemode, int indexmode, char *block) -{ - Bits out(block, AVPCL::BITSIZE); - - write_header(endpts, shapeindex, p, rotatemode, indexmode, out); - - write_indices(indices, shapeindex, indexmode, out); - - nvAssert(out.getptr() == AVPCL::BITSIZE); -} - -static void generate_palette_quantized_rgb_a(const IntEndptsRGBA &endpts, const RegionPrec ®ion_prec, int indexmode, Vector3 palette_rgb[NINDICES3], float palette_a[NINDICES3]) -{ - // scale endpoints for RGB - int a, b; - - a = Utils::unquantize(endpts.A[0], region_prec.endpt_a_prec[0]); - b = Utils::unquantize(endpts.B[0], region_prec.endpt_b_prec[0]); - - // interpolate R - for (int i = 0; i < NINDICES_RGB(indexmode); ++i) - palette_rgb[i].x = float(Utils::lerp(a, b, i, BIAS_RGB(indexmode), DENOM_RGB(indexmode))); - - a = Utils::unquantize(endpts.A[1], region_prec.endpt_a_prec[1]); - b = Utils::unquantize(endpts.B[1], region_prec.endpt_b_prec[1]); - - // interpolate G - for (int i = 0; i < NINDICES_RGB(indexmode); ++i) - palette_rgb[i].y = float(Utils::lerp(a, b, i, BIAS_RGB(indexmode), DENOM_RGB(indexmode))); - - a = Utils::unquantize(endpts.A[2], region_prec.endpt_a_prec[2]); - b = Utils::unquantize(endpts.B[2], region_prec.endpt_b_prec[2]); - - // interpolate B - for (int i = 0; i < NINDICES_RGB(indexmode); ++i) - palette_rgb[i].z = float(Utils::lerp(a, b, i, BIAS_RGB(indexmode), DENOM_RGB(indexmode))); - - a = Utils::unquantize(endpts.A[3], region_prec.endpt_a_prec[3]); - b = Utils::unquantize(endpts.B[3], region_prec.endpt_b_prec[3]); - - // interpolate A - for (int i = 0; i < NINDICES_A(indexmode); ++i) - palette_a[i] = float(Utils::lerp(a, b, i, BIAS_A(indexmode), DENOM_A(indexmode))); - -} - -static void sign_extend(Pattern &p, IntEndptsRGBA endpts[NREGIONS]) -{ - for (int i=0; i 0; ++j) - { - err = Utils::metric1(a, palette_a[j], rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - palette_alpha = palette_a[j]; - indices[INDEXARRAY_A][i] = j; - } - } - toterr += besterr; // squared-error norms are additive since we don't do the square root - - // do RGB index - besterr = FLT_MAX; - for (int j = 0; j < NINDICES_RGB(indexmode) && besterr > 0; ++j) - { - err = !AVPCL::flag_premult ? Utils::metric3(rgb, palette_rgb[j], rotatemode) : - Utils::metric3premult_alphaout(rgb, tile_alpha, palette_rgb[j], palette_alpha); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_RGB][i] = j; - } - } - toterr += besterr; - if (toterr > current_besterr) - { - // fill out bogus index values so it's initialized at least - for (int k = i; k < np; ++k) - { - indices[INDEXARRAY_RGB][k] = -1; - indices[INDEXARRAY_A][k] = -1; - } - return FLT_MAX; - } - } - else - { - // do RGB index - besterr = FLT_MAX; - int bestindex; - for (int j = 0; j < NINDICES_RGB(indexmode) && besterr > 0; ++j) - { - err = !AVPCL::flag_premult ? Utils::metric3(rgb, palette_rgb[j], rotatemode) : - Utils::metric3premult_alphain(rgb, palette_rgb[j], rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - bestindex = j; - indices[INDEXARRAY_RGB][i] = j; - } - } - palette_alpha = (rotatemode == ROTATEMODE_RGBA_AGBR) ? (palette_rgb[bestindex]).x : - (rotatemode == ROTATEMODE_RGBA_RABG) ? (palette_rgb[bestindex]).y : - (rotatemode == ROTATEMODE_RGBA_RGAB) ? (palette_rgb[bestindex]).z : nvCheckMacro(0); - toterr += besterr; - - // do A index - besterr = FLT_MAX; - for (int j = 0; j < NINDICES_A(indexmode) && besterr > 0; ++j) - { - err = !AVPCL::flag_premult ? Utils::metric1(a, palette_a[j], rotatemode) : - Utils::metric1premult(a, tile_alpha, palette_a[j], palette_alpha, rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_A][i] = j; - } - } - toterr += besterr; // squared-error norms are additive since we don't do the square root - if (toterr > current_besterr) - { - // fill out bogus index values so it's initialized at least - for (int k = i; k < np; ++k) - { - indices[INDEXARRAY_RGB][k] = -1; - indices[INDEXARRAY_A][k] = -1; - } - return FLT_MAX; - } - } - } - return toterr; -} - -// assign indices given a tile, shape, and quantized endpoints, return toterr for each region -static void assign_indices(const Tile &tile, int shapeindex, int rotatemode, int indexmode, IntEndptsRGBA endpts[NREGIONS], const PatternPrec &pattern_prec, - int indices[NINDEXARRAYS][Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS]) -{ - Vector3 palette_rgb[NREGIONS][NINDICES3]; // could be nindices2 - float palette_a[NREGIONS][NINDICES3]; // could be nindices2 - - for (int region = 0; region < NREGIONS; ++region) - { - generate_palette_quantized_rgb_a(endpts[region], pattern_prec.region_precs[region], indexmode, &palette_rgb[region][0], &palette_a[region][0]); - toterr[region] = 0; - } - - Vector3 rgb; - float a; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr; - float palette_alpha = 0, tile_alpha = 0; - - rgb.x = (tile.data[y][x]).x; - rgb.y = (tile.data[y][x]).y; - rgb.z = (tile.data[y][x]).z; - a = (tile.data[y][x]).w; - - if(AVPCL::flag_premult) - tile_alpha = (rotatemode == ROTATEMODE_RGBA_AGBR) ? (tile.data[y][x]).x : - (rotatemode == ROTATEMODE_RGBA_RABG) ? (tile.data[y][x]).y : - (rotatemode == ROTATEMODE_RGBA_RGAB) ? (tile.data[y][x]).z : (tile.data[y][x]).w; - - // compute the two indices separately - // if we're doing premultiplied alpha, we need to choose first the index that - // determines the alpha value, and then do the other index - - if (rotatemode == ROTATEMODE_RGBA_RGBA) - { - // do A index first as it has the alpha - besterr = FLT_MAX; - for (int i = 0; i < NINDICES_A(indexmode) && besterr > 0; ++i) - { - err = Utils::metric1(a, palette_a[region][i], rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_A][y][x] = i; - palette_alpha = palette_a[region][i]; - } - } - toterr[region] += besterr; // squared-error norms are additive since we don't do the square root - - // do RGB index - besterr = FLT_MAX; - for (int i = 0; i < NINDICES_RGB(indexmode) && besterr > 0; ++i) - { - err = !AVPCL::flag_premult ? Utils::metric3(rgb, palette_rgb[region][i], rotatemode) : - Utils::metric3premult_alphaout(rgb, tile_alpha, palette_rgb[region][i], palette_alpha); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_RGB][y][x] = i; - } - } - toterr[region] += besterr; - } - else - { - // do RGB index first as it has the alpha - besterr = FLT_MAX; - int bestindex; - for (int i = 0; i < NINDICES_RGB(indexmode) && besterr > 0; ++i) - { - err = !AVPCL::flag_premult ? Utils::metric3(rgb, palette_rgb[region][i], rotatemode) : - Utils::metric3premult_alphain(rgb, palette_rgb[region][i], rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_RGB][y][x] = i; - bestindex = i; - } - } - palette_alpha = (rotatemode == ROTATEMODE_RGBA_AGBR) ? (palette_rgb[region][bestindex]).x : - (rotatemode == ROTATEMODE_RGBA_RABG) ? (palette_rgb[region][bestindex]).y : - (rotatemode == ROTATEMODE_RGBA_RGAB) ? (palette_rgb[region][bestindex]).z : nvCheckMacro(0); - toterr[region] += besterr; - - // do A index - besterr = FLT_MAX; - for (int i = 0; i < NINDICES_A(indexmode) && besterr > 0; ++i) - { - err = !AVPCL::flag_premult ? Utils::metric1(a, palette_a[region][i], rotatemode) : - Utils::metric1premult(a, tile_alpha, palette_a[region][i], palette_alpha, rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_A][y][x] = i; - } - } - toterr[region] += besterr; // squared-error norms are additive since we don't do the square root - } - } -} - -// note: indices are valid only if the value returned is less than old_err; otherwise they contain -1's -// this function returns either old_err or a value smaller (if it was successful in improving the error) -static float perturb_one(const Vector4 colors[], const float importance[], int np, int rotatemode, int indexmode, int ch, const RegionPrec ®ion_prec, const IntEndptsRGBA &old_endpts, IntEndptsRGBA &new_endpts, - float old_err, int do_b, int indices[NINDEXARRAYS][Tile::TILE_TOTAL]) -{ - // we have the old endpoints: old_endpts - // we have the perturbed endpoints: new_endpts - // we have the temporary endpoints: temp_endpts - - IntEndptsRGBA temp_endpts; - float min_err = old_err; // start with the best current error - int beststep; - int temp_indices[NINDEXARRAYS][Tile::TILE_TOTAL]; - - for (int j=0; j>= 1) - { - bool improved = false; - for (int sign = -1; sign <= 1; sign += 2) - { - if (do_b == 0) - { - temp_endpts.A[ch] = new_endpts.A[ch] + sign * step; - if (temp_endpts.A[ch] < 0 || temp_endpts.A[ch] >= (1 << prec)) - continue; - } - else - { - temp_endpts.B[ch] = new_endpts.B[ch] + sign * step; - if (temp_endpts.B[ch] < 0 || temp_endpts.B[ch] >= (1 << prec)) - continue; - } - - float err = map_colors(colors, importance, np, rotatemode, indexmode, temp_endpts, region_prec, min_err, temp_indices); - - if (err < min_err) - { - improved = true; - min_err = err; - beststep = sign * step; - for (int j=0; j 5000 perturb endpoints 50% of precision -// if err > 1000 25% -// if err > 200 12.5% -// if err > 40 6.25% -// for np = 16 -- adjust error thresholds as a function of np -// always ensure endpoint ordering is preserved (no need to overlap the scan) -static float exhaustive(const Vector4 colors[], const float importance[], int np, int rotatemode, int indexmode, int ch, const RegionPrec ®ion_prec, float orig_err, IntEndptsRGBA &opt_endpts, int indices[NINDEXARRAYS][Tile::TILE_TOTAL]) -{ - IntEndptsRGBA temp_endpts; - float best_err = orig_err; - int aprec = region_prec.endpt_a_prec[ch]; - int bprec = region_prec.endpt_b_prec[ch]; - int good_indices[NINDEXARRAYS][Tile::TILE_TOTAL]; - int temp_indices[NINDEXARRAYS][Tile::TILE_TOTAL]; - - for (int j=0; j 5000.0*thr_scale) { adelta = (1 << aprec)/2; bdelta = (1 << bprec)/2; } - else if (orig_err > 1000.0*thr_scale) { adelta = (1 << aprec)/4; bdelta = (1 << bprec)/4; } - else if (orig_err > 200.0*thr_scale) { adelta = (1 << aprec)/8; bdelta = (1 << bprec)/8; } - else if (orig_err > 40.0*thr_scale) { adelta = (1 << aprec)/16; bdelta = (1 << bprec)/16; } - adelta = max(adelta, 3); - bdelta = max(bdelta, 3); - -#ifdef DISABLE_EXHAUSTIVE - adelta = bdelta = 3; -#endif - - temp_endpts = opt_endpts; - - // ok figure out the range of A and B - int alow = max(0, opt_endpts.A[ch] - adelta); - int ahigh = min((1<= initial_error) break - rgb0 += delta0 - next = 1 - else - if (err1 >= initial_error) break - rgb1 += delta1 - next = 0 - initial_err = map() - for (;;) - err = perturb(next ? rgb1:rgb0, delta) - if (err >= initial_err) break - next? rgb1 : rgb0 += delta - initial_err = err - */ - IntEndptsRGBA new_a, new_b; - IntEndptsRGBA new_endpt; - int do_b; - int orig_indices[NINDEXARRAYS][Tile::TILE_TOTAL]; - int new_indices[NINDEXARRAYS][Tile::TILE_TOTAL]; - int temp_indices0[NINDEXARRAYS][Tile::TILE_TOTAL]; - int temp_indices1[NINDEXARRAYS][Tile::TILE_TOTAL]; - - // now optimize each channel separately - for (int ch = 0; ch < NCHANNELS_RGBA; ++ch) - { - // figure out which endpoint when perturbed gives the most improvement and start there - // if we just alternate, we can easily end up in a local minima - float err0 = perturb_one(colors, importance, np, rotatemode, indexmode, ch, region_prec, opt_endpts, new_a, opt_err, 0, temp_indices0); // perturb endpt A - float err1 = perturb_one(colors, importance, np, rotatemode, indexmode, ch, region_prec, opt_endpts, new_b, opt_err, 1, temp_indices1); // perturb endpt B - - if (err0 < err1) - { - if (err0 >= opt_err) - continue; - - for (int j=0; j= opt_err) - continue; - - for (int j=0; j= opt_err) - break; - - for (int j=0; j 255.0f) v.x = 255.0f; - if (v.y < 0.0f) v.y = 0.0f; - if (v.y > 255.0f) v.y = 255.0f; - if (v.z < 0.0f) v.z = 0.0f; - if (v.z > 255.0f) v.z = 255.0f; - if (v.w < 0.0f) v.w = 0.0f; - if (v.w > 255.0f) v.w = 255.0f; -} - -// compute initial endpoints for the "RGB" portion and the "A" portion. -// Note these channels may have been rotated. -static void rough(const Tile &tile, int shapeindex, FltEndpts endpts[NREGIONS]) -{ - for (int region=0; region maxp) maxp = dp; - - dp = alphas[i] - mean.w; - if (dp < mina) mina = dp; - if (dp > maxa) maxa = dp; - } - - // choose as endpoints 2 points along the principal direction that span the projections of all of the pixel values - endpts[region].A = mean + Vector4(minp*direction, mina); - endpts[region].B = mean + Vector4(maxp*direction, maxa); - - // clamp endpoints - // the argument for clamping is that the actual endpoints need to be clamped and thus we need to choose the best - // shape based on endpoints being clamped - clamp(endpts[region].A); - clamp(endpts[region].B); - } -} - -float AVPCL::compress_mode4(const Tile &t, char *block) -{ - FltEndpts endpts[NREGIONS]; - char tempblock[AVPCL::BLOCKSIZE]; - float msebest = FLT_MAX; - int shape = 0; - Tile t1; - - // try all rotations. refine tries the 2 different indexings. - for (int r = 0; r < NROTATEMODES && msebest > 0; ++r) - { - rotate_tile(t, r, t1); - rough(t1, shape, endpts); - for (int i = 0; i < NINDEXMODES && msebest > 0; ++i) - { - float mse = refine(t1, shape, r, i, endpts, tempblock); - if (mse < msebest) - { - memcpy(block, tempblock, sizeof(tempblock)); - msebest = mse; - } - } - } - return msebest; -} diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode5.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode5.cpp deleted file mode 100644 index f1f1636..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode5.cpp +++ /dev/null @@ -1,1216 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// Thanks to Jacob Munkberg (jacob@cs.lth.se) for the shortcut of using SVD to do the equivalent of principal components analysis - -// x100000 2r 777x2 8x2 2bi 2bi - -#include "bits.h" -#include "tile.h" -#include "avpcl.h" -#include "nvcore/debug.h" -#include "nvmath/vector.inl" -#include "nvmath/matrix.inl" -#include "nvmath/fitting.h" -#include "avpcl_utils.h" -#include "endpts.h" -#include -#include - -using namespace nv; -using namespace AVPCL; - -// there are 2 index arrays. INDEXMODE selects between the arrays being 2 & 3 bits or 3 & 2 bits -// array 0 is always the RGB array and array 1 is always the A array -#define NINDEXARRAYS 2 -#define INDEXARRAY_RGB 0 -#define INDEXARRAY_A 1 -#define INDEXARRAY_2BITS(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? INDEXARRAY_A : INDEXARRAY_RGB) -#define INDEXARRAY_3BITS(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_3BITS) ? INDEXARRAY_A : INDEXARRAY_RGB) - -#define NINDICES3 4 -#define INDEXBITS3 2 -#define HIGH_INDEXBIT3 (1<<(INDEXBITS3-1)) -#define DENOM3 (NINDICES3-1) -#define BIAS3 (DENOM3/2) - -#define NINDICES2 4 -#define INDEXBITS2 2 -#define HIGH_INDEXBIT2 (1<<(INDEXBITS2-1)) -#define DENOM2 (NINDICES2-1) -#define BIAS2 (DENOM2/2) - -#define NINDICES_RGB(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? NINDICES3 : NINDICES2) -#define INDEXBITS_RGB(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? INDEXBITS3 : INDEXBITS2) -#define HIGH_INDEXBIT_RGB(indexmode)((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? HIGH_INDEXBIT3 : HIGH_INDEXBIT2) -#define DENOM_RGB(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? DENOM3 : DENOM2) -#define BIAS_RGB(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? BIAS3 : BIAS2) - -#define NINDICES_A(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? NINDICES2 : NINDICES3) -#define INDEXBITS_A(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? INDEXBITS2 : INDEXBITS3) -#define HIGH_INDEXBIT_A(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? HIGH_INDEXBIT2 : HIGH_INDEXBIT3) -#define DENOM_A(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? DENOM2 : DENOM3) -#define BIAS_A(indexmode) ((indexmode == INDEXMODE_ALPHA_IS_2BITS) ? BIAS2 : BIAS3) - -#define NSHAPES 1 - -static int shapes[NSHAPES] = -{ - 0x0000, -}; - -#define REGION(x,y,shapeindex) ((shapes[shapeindex]&(1<<(15-(x)-4*(y))))!=0) - -#define NREGIONS 1 // keep the region stuff in just in case... - -// encoded index compression location: region 0 is always at 0,0. - -#define NBITSIZES 2 // one endpoint pair - -struct ChanBits -{ - int nbitsizes[NBITSIZES]; // bitsizes for one channel -}; - -struct Pattern -{ - ChanBits chan[NCHANNELS_RGBA];// bit patterns used per channel - int transform_mode; // x0 means alpha channel not transformed, x1 otherwise. 0x rgb not transformed, 1x otherwise. - int mode; // associated mode value - int modebits; // number of mode bits - const char *encoding; // verilog description of encoding for this mode -}; - -#define TRANSFORM_MODE_ALPHA 1 -#define TRANSFORM_MODE_RGB 2 - -#define NPATTERNS 1 - -static Pattern patterns[NPATTERNS] = -{ - // red green blue alpha xfm mode mb encoding - 7,7, 7,7, 7,7, 8,8, 0x0, 0x20, 6, "", -}; - -struct RegionPrec -{ - int endpt_a_prec[NCHANNELS_RGBA]; - int endpt_b_prec[NCHANNELS_RGBA]; -}; - -struct PatternPrec -{ - RegionPrec region_precs[NREGIONS]; -}; - -// this is the precision for each channel and region -// NOTE: this MUST match the corresponding data in "patterns" above -- WARNING: there is NO nvAssert to check this! -static PatternPrec pattern_precs[NPATTERNS] = -{ - 7,7,7,8, 7,7,7,8, -}; - - -// return # of bits needed to store n. handle signed or unsigned cases properly -static int nbits(int n, bool issigned) -{ - int nb; - if (n==0) - return 0; // no bits needed for 0, signed or not - else if (n > 0) - { - for (nb=0; n; ++nb, n>>=1) ; - return nb + (issigned?1:0); - } - else - { - nvAssert (issigned); - for (nb=0; n<-1; ++nb, n>>=1) ; - return nb + 1; - } -} - -#define R_0 ep[0].A[i] -#define R_1 ep[0].B[i] - -static void transform_forward(int transform_mode, IntEndptsRGBA ep[NREGIONS]) -{ - int i; - - if (transform_mode & TRANSFORM_MODE_RGB) - for (i=CHANNEL_R; i> 2) & 3 and x = index & 3 -static void swap_indices(int shapeindex, int indexmode, IntEndptsRGBA endpts[NREGIONS], int indices[NINDEXARRAYS][Tile::TILE_H][Tile::TILE_W]) -{ - int index_positions[NREGIONS]; - - index_positions[0] = 0; // since WLOG we have the high bit of the shapes at 0 - - for (int region = 0; region < NREGIONS; ++region) - { - int x = index_positions[region] & 3; - int y = (index_positions[region] >> 2) & 3; - nvAssert(REGION(x,y,shapeindex) == region); // double check the table - - // swap RGB - if (indices[INDEXARRAY_RGB][y][x] & HIGH_INDEXBIT_RGB(indexmode)) - { - // high bit is set, swap the endpts and indices for this region - int t; - for (int i=CHANNEL_R; i<=CHANNEL_B; ++i) { t = endpts[region].A[i]; endpts[region].A[i] = endpts[region].B[i]; endpts[region].B[i] = t; } - - for (int y = 0; y < Tile::TILE_H; y++) - for (int x = 0; x < Tile::TILE_W; x++) - if (REGION(x,y,shapeindex) == region) - indices[INDEXARRAY_RGB][y][x] = NINDICES_RGB(indexmode) - 1 - indices[INDEXARRAY_RGB][y][x]; - } - - // swap A - if (indices[INDEXARRAY_A][y][x] & HIGH_INDEXBIT_A(indexmode)) - { - // high bit is set, swap the endpts and indices for this region - int t; - for (int i=CHANNEL_A; i<=CHANNEL_A; ++i) { t = endpts[region].A[i]; endpts[region].A[i] = endpts[region].B[i]; endpts[region].B[i] = t; } - - for (int y = 0; y < Tile::TILE_H; y++) - for (int x = 0; x < Tile::TILE_W; x++) - if (REGION(x,y,shapeindex) == region) - indices[INDEXARRAY_A][y][x] = NINDICES_A(indexmode) - 1 - indices[INDEXARRAY_A][y][x]; - } - } -} - -static bool endpts_fit(IntEndptsRGBA endpts[NREGIONS], const Pattern &p) -{ - return true; -} - -static void write_header(const IntEndptsRGBA endpts[NREGIONS], int shapeindex, const Pattern &p, int rotatemode, int indexmode, Bits &out) -{ - // ignore shapeindex - out.write(p.mode, p.modebits); - out.write(rotatemode, ROTATEMODE_BITS); -// out.write(indexmode, INDEXMODE_BITS); - for (int i=0; i= 0 && pat_index < NPATTERNS); - nvAssert (in.getptr() == patterns[pat_index].modebits); - - p = patterns[pat_index]; - - shapeindex = 0; // we don't have any - - rotatemode = in.read(ROTATEMODE_BITS); - - indexmode = 0; // we don't have any - - for (int i=0; i>2][i&3], INDEXBITS2 - (i==0?1:0)); // write i..[1:0] or i..[0] - - // then the 3 bit indices - nvAssert ((indices[INDEXARRAY_3BITS(indexmode)][0][0] & HIGH_INDEXBIT3) == 0); - for (int i = 0; i < Tile::TILE_TOTAL; ++i) - out.write(indices[INDEXARRAY_3BITS(indexmode)][i>>2][i&3], INDEXBITS3 - (i==0?1:0)); // write i..[2:0] or i..[1:0] -} - -static void read_indices(Bits &in, int shapeindex, int indexmode, int indices[NINDEXARRAYS][Tile::TILE_H][Tile::TILE_W]) -{ - // the indices we shorten is always index 0 - - // do the 2 bit indices first - for (int i = 0; i < Tile::TILE_TOTAL; ++i) - indices[INDEXARRAY_2BITS(indexmode)][i>>2][i&3] = in.read(INDEXBITS2 - (i==0?1:0)); // read i..[1:0] or i..[0] - - // then the 3 bit indices - for (int i = 0; i < Tile::TILE_TOTAL; ++i) - indices[INDEXARRAY_3BITS(indexmode)][i>>2][i&3] = in.read(INDEXBITS3 - (i==0?1:0)); // read i..[1:0] or i..[0] -} - -static void emit_block(const IntEndptsRGBA endpts[NREGIONS], int shapeindex, const Pattern &p, const int indices[NINDEXARRAYS][Tile::TILE_H][Tile::TILE_W], int rotatemode, int indexmode, char *block) -{ - Bits out(block, AVPCL::BITSIZE); - - write_header(endpts, shapeindex, p, rotatemode, indexmode, out); - - write_indices(indices, shapeindex, indexmode, out); - - nvAssert(out.getptr() == AVPCL::BITSIZE); -} - -static void generate_palette_quantized_rgb_a(const IntEndptsRGBA &endpts, const RegionPrec ®ion_prec, int indexmode, Vector3 palette_rgb[NINDICES3], float palette_a[NINDICES3]) -{ - // scale endpoints for RGB - int a, b; - - a = Utils::unquantize(endpts.A[0], region_prec.endpt_a_prec[0]); - b = Utils::unquantize(endpts.B[0], region_prec.endpt_b_prec[0]); - - // interpolate R - for (int i = 0; i < NINDICES_RGB(indexmode); ++i) - palette_rgb[i].x = float(Utils::lerp(a, b, i, BIAS_RGB(indexmode), DENOM_RGB(indexmode))); - - a = Utils::unquantize(endpts.A[1], region_prec.endpt_a_prec[1]); - b = Utils::unquantize(endpts.B[1], region_prec.endpt_b_prec[1]); - - // interpolate G - for (int i = 0; i < NINDICES_RGB(indexmode); ++i) - palette_rgb[i].y = float(Utils::lerp(a, b, i, BIAS_RGB(indexmode), DENOM_RGB(indexmode))); - - a = Utils::unquantize(endpts.A[2], region_prec.endpt_a_prec[2]); - b = Utils::unquantize(endpts.B[2], region_prec.endpt_b_prec[2]); - - // interpolate B - for (int i = 0; i < NINDICES_RGB(indexmode); ++i) - palette_rgb[i].z = float(Utils::lerp(a, b, i, BIAS_RGB(indexmode), DENOM_RGB(indexmode))); - - a = Utils::unquantize(endpts.A[3], region_prec.endpt_a_prec[3]); - b = Utils::unquantize(endpts.B[3], region_prec.endpt_b_prec[3]); - - // interpolate A - for (int i = 0; i < NINDICES_A(indexmode); ++i) - palette_a[i] = float(Utils::lerp(a, b, i, BIAS_A(indexmode), DENOM_A(indexmode))); -} - -static void sign_extend(Pattern &p, IntEndptsRGBA endpts[NREGIONS]) -{ - for (int i=0; i 0; ++j) - { - err = Utils::metric1(a, palette_a[j], rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - palette_alpha = palette_a[j]; - indices[INDEXARRAY_A][i] = j; - } - } - toterr += besterr; // squared-error norms are additive since we don't do the square root - - // do RGB index - besterr = FLT_MAX; - for (int j = 0; j < NINDICES_RGB(indexmode) && besterr > 0; ++j) - { - err = !AVPCL::flag_premult ? Utils::metric3(rgb, palette_rgb[j], rotatemode) : - Utils::metric3premult_alphaout(rgb, tile_alpha, palette_rgb[j], palette_alpha); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_RGB][i] = j; - } - } - toterr += besterr; - if (toterr > current_besterr) - { - // fill out bogus index values so it's initialized at least - for (int k = i; k < np; ++k) - { - indices[INDEXARRAY_RGB][k] = -1; - indices[INDEXARRAY_A][k] = -1; - } - return FLT_MAX; - } - } - else - { - // do RGB index - besterr = FLT_MAX; - int bestindex; - for (int j = 0; j < NINDICES_RGB(indexmode) && besterr > 0; ++j) - { - err = !AVPCL::flag_premult ? Utils::metric3(rgb, palette_rgb[j], rotatemode) : - Utils::metric3premult_alphain(rgb, palette_rgb[j], rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - bestindex = j; - indices[INDEXARRAY_RGB][i] = j; - } - } - palette_alpha = (rotatemode == ROTATEMODE_RGBA_AGBR) ? (palette_rgb[bestindex]).x : - (rotatemode == ROTATEMODE_RGBA_RABG) ? (palette_rgb[bestindex]).y : - (rotatemode == ROTATEMODE_RGBA_RGAB) ? (palette_rgb[bestindex]).z : nvCheckMacro(0); - toterr += besterr; - - // do A index - besterr = FLT_MAX; - for (int j = 0; j < NINDICES_A(indexmode) && besterr > 0; ++j) - { - err = !AVPCL::flag_premult ? Utils::metric1(a, palette_a[j], rotatemode) : - Utils::metric1premult(a, tile_alpha, palette_a[j], palette_alpha, rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_A][i] = j; - } - } - toterr += besterr; // squared-error norms are additive since we don't do the square root - if (toterr > current_besterr) - { - // fill out bogus index values so it's initialized at least - for (int k = i; k < np; ++k) - { - indices[INDEXARRAY_RGB][k] = -1; - indices[INDEXARRAY_A][k] = -1; - } - return FLT_MAX; - } - } - } - return toterr; -} - -// assign indices given a tile, shape, and quantized endpoints, return toterr for each region -static void assign_indices(const Tile &tile, int shapeindex, int rotatemode, int indexmode, IntEndptsRGBA endpts[NREGIONS], const PatternPrec &pattern_prec, - int indices[NINDEXARRAYS][Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS]) -{ - Vector3 palette_rgb[NREGIONS][NINDICES3]; // could be nindices2 - float palette_a[NREGIONS][NINDICES3]; // could be nindices2 - - for (int region = 0; region < NREGIONS; ++region) - { - generate_palette_quantized_rgb_a(endpts[region], pattern_prec.region_precs[region], indexmode, &palette_rgb[region][0], &palette_a[region][0]); - toterr[region] = 0; - } - - Vector3 rgb; - float a; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr; - float palette_alpha = 0, tile_alpha = 0; - - rgb.x = (tile.data[y][x]).x; - rgb.y = (tile.data[y][x]).y; - rgb.z = (tile.data[y][x]).z; - a = (tile.data[y][x]).w; - - if(AVPCL::flag_premult) - tile_alpha = (rotatemode == ROTATEMODE_RGBA_AGBR) ? (tile.data[y][x]).x : - (rotatemode == ROTATEMODE_RGBA_RABG) ? (tile.data[y][x]).y : - (rotatemode == ROTATEMODE_RGBA_RGAB) ? (tile.data[y][x]).z : (tile.data[y][x]).w; - - // compute the two indices separately - // if we're doing premultiplied alpha, we need to choose first the index that - // determines the alpha value, and then do the other index - - if (rotatemode == ROTATEMODE_RGBA_RGBA) - { - // do A index first as it has the alpha - besterr = FLT_MAX; - for (int i = 0; i < NINDICES_A(indexmode) && besterr > 0; ++i) - { - err = Utils::metric1(a, palette_a[region][i], rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_A][y][x] = i; - palette_alpha = palette_a[region][i]; - } - } - toterr[region] += besterr; // squared-error norms are additive since we don't do the square root - - // do RGB index - besterr = FLT_MAX; - for (int i = 0; i < NINDICES_RGB(indexmode) && besterr > 0; ++i) - { - err = !AVPCL::flag_premult ? Utils::metric3(rgb, palette_rgb[region][i], rotatemode) : - Utils::metric3premult_alphaout(rgb, tile_alpha, palette_rgb[region][i], palette_alpha); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_RGB][y][x] = i; - } - } - toterr[region] += besterr; - } - else - { - // do RGB index first as it has the alpha - besterr = FLT_MAX; - int bestindex; - for (int i = 0; i < NINDICES_RGB(indexmode) && besterr > 0; ++i) - { - err = !AVPCL::flag_premult ? Utils::metric3(rgb, palette_rgb[region][i], rotatemode) : - Utils::metric3premult_alphain(rgb, palette_rgb[region][i], rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_RGB][y][x] = i; - bestindex = i; - } - } - palette_alpha = (rotatemode == ROTATEMODE_RGBA_AGBR) ? (palette_rgb[region][bestindex]).x : - (rotatemode == ROTATEMODE_RGBA_RABG) ? (palette_rgb[region][bestindex]).y : - (rotatemode == ROTATEMODE_RGBA_RGAB) ? (palette_rgb[region][bestindex]).z : nvCheckMacro(0); - toterr[region] += besterr; - - // do A index - besterr = FLT_MAX; - for (int i = 0; i < NINDICES_A(indexmode) && besterr > 0; ++i) - { - err = !AVPCL::flag_premult ? Utils::metric1(a, palette_a[region][i], rotatemode) : - Utils::metric1premult(a, tile_alpha, palette_a[region][i], palette_alpha, rotatemode); - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[INDEXARRAY_A][y][x] = i; - } - } - toterr[region] += besterr; // squared-error norms are additive since we don't do the square root - } - } -} - -// note: indices are valid only if the value returned is less than old_err; otherwise they contain -1's -// this function returns either old_err or a value smaller (if it was successful in improving the error) -static float perturb_one(const Vector4 colors[], const float importance[], int np, int rotatemode, int indexmode, int ch, const RegionPrec ®ion_prec, const IntEndptsRGBA &old_endpts, IntEndptsRGBA &new_endpts, - float old_err, int do_b, int indices[NINDEXARRAYS][Tile::TILE_TOTAL]) -{ - // we have the old endpoints: old_endpts - // we have the perturbed endpoints: new_endpts - // we have the temporary endpoints: temp_endpts - - IntEndptsRGBA temp_endpts; - float min_err = old_err; // start with the best current error - int beststep; - int temp_indices[NINDEXARRAYS][Tile::TILE_TOTAL]; - - for (int j=0; j>= 1) - { - bool improved = false; - for (int sign = -1; sign <= 1; sign += 2) - { - if (do_b == 0) - { - temp_endpts.A[ch] = new_endpts.A[ch] + sign * step; - if (temp_endpts.A[ch] < 0 || temp_endpts.A[ch] >= (1 << prec)) - continue; - } - else - { - temp_endpts.B[ch] = new_endpts.B[ch] + sign * step; - if (temp_endpts.B[ch] < 0 || temp_endpts.B[ch] >= (1 << prec)) - continue; - } - - float err = map_colors(colors, importance, np, rotatemode, indexmode, temp_endpts, region_prec, min_err, temp_indices); - - if (err < min_err) - { - improved = true; - min_err = err; - beststep = sign * step; - for (int j=0; j 5000 perturb endpoints 50% of precision -// if err > 1000 25% -// if err > 200 12.5% -// if err > 40 6.25% -// for np = 16 -- adjust error thresholds as a function of np -// always ensure endpoint ordering is preserved (no need to overlap the scan) -static float exhaustive(const Vector4 colors[], const float importance[], int np, int rotatemode, int indexmode, int ch, const RegionPrec ®ion_prec, float orig_err, IntEndptsRGBA &opt_endpts, int indices[NINDEXARRAYS][Tile::TILE_TOTAL]) -{ - IntEndptsRGBA temp_endpts; - float best_err = orig_err; - int aprec = region_prec.endpt_a_prec[ch]; - int bprec = region_prec.endpt_b_prec[ch]; - int good_indices[NINDEXARRAYS][Tile::TILE_TOTAL]; - int temp_indices[NINDEXARRAYS][Tile::TILE_TOTAL]; - - for (int j=0; j 5000.0*thr_scale) { adelta = (1 << aprec)/2; bdelta = (1 << bprec)/2; } - else if (orig_err > 1000.0*thr_scale) { adelta = (1 << aprec)/4; bdelta = (1 << bprec)/4; } - else if (orig_err > 200.0*thr_scale) { adelta = (1 << aprec)/8; bdelta = (1 << bprec)/8; } - else if (orig_err > 40.0*thr_scale) { adelta = (1 << aprec)/16; bdelta = (1 << bprec)/16; } - adelta = max(adelta, 3); - bdelta = max(bdelta, 3); - -#ifdef DISABLE_EXHAUSTIVE - adelta = bdelta = 3; -#endif - - temp_endpts = opt_endpts; - - // ok figure out the range of A and B - int alow = max(0, opt_endpts.A[ch] - adelta); - int ahigh = min((1<= initial_error) break - rgb0 += delta0 - next = 1 - else - if (err1 >= initial_error) break - rgb1 += delta1 - next = 0 - initial_err = map() - for (;;) - err = perturb(next ? rgb1:rgb0, delta) - if (err >= initial_err) break - next? rgb1 : rgb0 += delta - initial_err = err - */ - IntEndptsRGBA new_a, new_b; - IntEndptsRGBA new_endpt; - int do_b; - int orig_indices[NINDEXARRAYS][Tile::TILE_TOTAL]; - int new_indices[NINDEXARRAYS][Tile::TILE_TOTAL]; - int temp_indices0[NINDEXARRAYS][Tile::TILE_TOTAL]; - int temp_indices1[NINDEXARRAYS][Tile::TILE_TOTAL]; - - // now optimize each channel separately - for (int ch = 0; ch < NCHANNELS_RGBA; ++ch) - { - // figure out which endpoint when perturbed gives the most improvement and start there - // if we just alternate, we can easily end up in a local minima - float err0 = perturb_one(colors, importance, np, rotatemode, indexmode, ch, region_prec, opt_endpts, new_a, opt_err, 0, temp_indices0); // perturb endpt A - float err1 = perturb_one(colors, importance, np, rotatemode, indexmode, ch, region_prec, opt_endpts, new_b, opt_err, 1, temp_indices1); // perturb endpt B - - if (err0 < err1) - { - if (err0 >= opt_err) - continue; - - for (int j=0; j= opt_err) - continue; - - for (int j=0; j= opt_err) - break; - - for (int j=0; j 255.0f) v.x = 255.0f; - if (v.y < 0.0f) v.y = 0.0f; - if (v.y > 255.0f) v.y = 255.0f; - if (v.z < 0.0f) v.z = 0.0f; - if (v.z > 255.0f) v.z = 255.0f; - if (v.w < 0.0f) v.w = 0.0f; - if (v.w > 255.0f) v.w = 255.0f; -} - -// compute initial endpoints for the "RGB" portion and the "A" portion. -// Note these channels may have been rotated. -static void rough(const Tile &tile, int shapeindex, FltEndpts endpts[NREGIONS]) -{ - for (int region=0; region maxp) maxp = dp; - - dp = alphas[i] - mean.w; - if (dp < mina) mina = dp; - if (dp > maxa) maxa = dp; - } - - // choose as endpoints 2 points along the principal direction that span the projections of all of the pixel values - endpts[region].A = mean + Vector4(minp*direction, mina); - endpts[region].B = mean + Vector4(maxp*direction, maxa); - - // clamp endpoints - // the argument for clamping is that the actual endpoints need to be clamped and thus we need to choose the best - // shape based on endpoints being clamped - clamp(endpts[region].A); - clamp(endpts[region].B); - } -} - -float AVPCL::compress_mode5(const Tile &t, char *block) -{ - FltEndpts endpts[NREGIONS]; - char tempblock[AVPCL::BLOCKSIZE]; - float msebest = FLT_MAX; - int shape = 0; - Tile t1; - - // try all rotations. refine tries the 2 different indexings. - for (int r = 0; r < NROTATEMODES && msebest > 0; ++r) - { - rotate_tile(t, r, t1); - rough(t1, shape, endpts); -// for (int i = 0; i < NINDEXMODES && msebest > 0; ++i) - for (int i = 0; i < 1 && msebest > 0; ++i) - { - float mse = refine(t1, shape, r, i, endpts, tempblock); - if (mse < msebest) - { - memcpy(block, tempblock, sizeof(tempblock)); - msebest = mse; - } - } - } - return msebest; -} diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode6.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode6.cpp deleted file mode 100644 index 38e3a25..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode6.cpp +++ /dev/null @@ -1,1055 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// Thanks to Jacob Munkberg (jacob@cs.lth.se) for the shortcut of using SVD to do the equivalent of principal components analysis - -// x1000000 7777.1x2 4bi - -#include "bits.h" -#include "tile.h" -#include "avpcl.h" -#include "nvcore/debug.h" -#include "nvmath/vector.inl" -#include "nvmath/matrix.inl" -#include "nvmath/fitting.h" -#include "avpcl_utils.h" -#include "endpts.h" -#include -#include - -using namespace nv; -using namespace AVPCL; - -#define NLSBMODES 4 // number of different lsb modes per region. since we have two .1 per region, that can have 4 values - -#define NINDICES 16 -#define INDEXBITS 4 -#define HIGH_INDEXBIT (1<<(INDEXBITS-1)) -#define DENOM (NINDICES-1) -#define BIAS (DENOM/2) - -#define NSHAPES 1 - -static int shapes[NSHAPES] = -{ - 0x0000, -}; - -#define REGION(x,y,shapeindex) ((shapes[shapeindex]&(1<<(15-(x)-4*(y))))!=0) - -#define NREGIONS 1 - -#define NBITSIZES (NREGIONS*2) -#define ABITINDEX(region) (2*(region)+0) -#define BBITINDEX(region) (2*(region)+1) - -struct ChanBits -{ - int nbitsizes[NBITSIZES]; // bitsizes for one channel -}; - -struct Pattern -{ - ChanBits chan[NCHANNELS_RGBA];// bit patterns used per channel - int mode; // associated mode value - int modebits; // number of mode bits - const char *encoding; // verilog description of encoding for this mode -}; - -#define NPATTERNS 1 - -static Pattern patterns[NPATTERNS] = -{ - // red green blue alpha mode mb verilog - 7,7, 7,7, 7,7, 7,7, 0x40, 7, "", -}; - -struct RegionPrec -{ - int endpt_a_prec[NCHANNELS_RGBA]; - int endpt_b_prec[NCHANNELS_RGBA]; -}; - -struct PatternPrec -{ - RegionPrec region_precs[NREGIONS]; -}; - -// this is the precision for each channel and region -// NOTE: this MUST match the corresponding data in "patterns" above -- WARNING: there is NO nvAssert to check this! -static PatternPrec pattern_precs[NPATTERNS] = -{ - 7,7,7,7, 7,7,7,7, -}; - -// return # of bits needed to store n. handle signed or unsigned cases properly -static int nbits(int n, bool issigned) -{ - int nb; - if (n==0) - return 0; // no bits needed for 0, signed or not - else if (n > 0) - { - for (nb=0; n; ++nb, n>>=1) ; - return nb + (issigned?1:0); - } - else - { - nvAssert (issigned); - for (nb=0; n<-1; ++nb, n>>=1) ; - return nb + 1; - } -} - -/* -we're using this table to assign lsbs -abgr >=2 correct -0000 0 0 -0001 0 0 -0010 0 0 -0011 1 x1 -0100 0 0 -0101 1 x1 -0110 1 x1 -0111 1 1 -1000 0 0 -1001 1 x0 -1010 1 x0 -1011 1 1 -1100 1 x0 -1101 1 1 -1110 1 1 -1111 1 1 - -we need 8 0's and 8 1's. the x's can be either 0 or 1 as long as you get 8/8. -I choose to assign the lsbs so that the rgb channels are as good as possible. -*/ - -// 8888 ->7777.1, use the "correct" column above to assign the lsb -static void compress_one(const IntEndptsRGBA& endpts, IntEndptsRGBA_2& compr_endpts) -{ - int onescnt; - - onescnt = 0; - for (int j=0; j> 1; - nvAssert (compr_endpts.A[j] < 128); - } - compr_endpts.a_lsb = onescnt >= 2; - - onescnt = 0; - for (int j=0; j> 1; - nvAssert (compr_endpts.B[j] < 128); - } - compr_endpts.b_lsb = onescnt >= 2; -} - -static void uncompress_one(const IntEndptsRGBA_2& compr_endpts, IntEndptsRGBA& endpts) -{ - for (int j=0; j> 2) & 3 and x = index & 3 -static void swap_indices(IntEndptsRGBA_2 endpts[NREGIONS], int indices[Tile::TILE_H][Tile::TILE_W], int shapeindex) -{ - int index_positions[NREGIONS]; - - index_positions[0] = 0; // since WLOG we have the high bit of the shapes at 0 - - for (int region = 0; region < NREGIONS; ++region) - { - int x = index_positions[region] & 3; - int y = (index_positions[region] >> 2) & 3; - nvAssert(REGION(x,y,shapeindex) == region); // double check the table - if (indices[y][x] & HIGH_INDEXBIT) - { - // high bit is set, swap the endpts and indices for this region - int t; - for (int i=0; i= 0 && pat_index < NPATTERNS); - nvAssert (in.getptr() == patterns[pat_index].modebits); - - p = patterns[pat_index]; - - shapeindex = 0; // we don't have any - - for (int j=0; j>2][i&3], INDEXBITS-1); // write i..[2:0] - else - out.write(indices[i>>2][i&3], INDEXBITS); // write i..[3:0] - } - -} - -static void read_indices(Bits &in, int shapeindex, int indices[Tile::TILE_H][Tile::TILE_W]) -{ - // the index we shorten is always index 0 - for (int i = 0; i < Tile::TILE_TOTAL; ++i) - { - if (i==0) - indices[i>>2][i&3] = in.read(INDEXBITS-1); // read i..[1:0] - else - indices[i>>2][i&3] = in.read(INDEXBITS); // read i..[2:0] - } -} - -static void emit_block(const IntEndptsRGBA_2 endpts[NREGIONS], int shapeindex, const Pattern &p, const int indices[Tile::TILE_H][Tile::TILE_W], char *block) -{ - Bits out(block, AVPCL::BITSIZE); - - write_header(endpts, shapeindex, p, out); - - write_indices(indices, shapeindex, out); - - nvAssert(out.getptr() == AVPCL::BITSIZE); -} - -static void generate_palette_quantized(const IntEndptsRGBA_2 &endpts_2, const RegionPrec ®ion_prec, Vector4 palette[NINDICES]) -{ - IntEndptsRGBA endpts; - - uncompress_one(endpts_2, endpts); - - // scale endpoints - int a, b; // really need a IntVec4... - - a = Utils::unquantize(endpts.A[0], region_prec.endpt_a_prec[0]+1); // +1 since we are in uncompressed space - b = Utils::unquantize(endpts.B[0], region_prec.endpt_b_prec[0]+1); - - // interpolate - for (int i = 0; i < NINDICES; ++i) - palette[i].x = float(Utils::lerp(a, b, i, BIAS, DENOM)); - - a = Utils::unquantize(endpts.A[1], region_prec.endpt_a_prec[1]+1); - b = Utils::unquantize(endpts.B[1], region_prec.endpt_b_prec[1]+1); - - // interpolate - for (int i = 0; i < NINDICES; ++i) - palette[i].y = float(Utils::lerp(a, b, i, BIAS, DENOM)); - - a = Utils::unquantize(endpts.A[2], region_prec.endpt_a_prec[2]+1); - b = Utils::unquantize(endpts.B[2], region_prec.endpt_b_prec[2]+1); - - // interpolate - for (int i = 0; i < NINDICES; ++i) - palette[i].z = float(Utils::lerp(a, b, i, BIAS, DENOM)); - - a = Utils::unquantize(endpts.A[3], region_prec.endpt_a_prec[3]+1); - b = Utils::unquantize(endpts.B[3], region_prec.endpt_b_prec[3]+1); - - // interpolate - for (int i = 0; i < NINDICES; ++i) - palette[i].w = float(Utils::lerp(a, b, i, BIAS, DENOM)); -} - -void AVPCL::decompress_mode6(const char *block, Tile &t) -{ - Bits in(block, AVPCL::BITSIZE); - - Pattern p; - IntEndptsRGBA_2 endpts[NREGIONS]; - int shapeindex, pat_index; - - read_header(in, endpts, shapeindex, p, pat_index); - - Vector4 palette[NREGIONS][NINDICES]; - for (int r = 0; r < NREGIONS; ++r) - generate_palette_quantized(endpts[r], pattern_precs[pat_index].region_precs[r], &palette[r][0]); - - int indices[Tile::TILE_H][Tile::TILE_W]; - - read_indices(in, shapeindex, indices); - - nvAssert(in.getptr() == AVPCL::BITSIZE); - - // lookup - for (int y = 0; y < Tile::TILE_H; y++) - for (int x = 0; x < Tile::TILE_W; x++) - t.data[y][x] = palette[REGION(x,y,shapeindex)][indices[y][x]]; -} - -// given a collection of colors and quantized endpoints, generate a palette, choose best entries, and return a single toterr -static float map_colors(const Vector4 colors[], const float importance[], int np, const IntEndptsRGBA_2 &endpts, const RegionPrec ®ion_prec, float current_err, int indices[Tile::TILE_TOTAL]) -{ - Vector4 palette[NINDICES]; - float toterr = 0; - Vector4 err; - - generate_palette_quantized(endpts, region_prec, palette); - - for (int i = 0; i < np; ++i) - { - float err, besterr = FLT_MAX; - - for (int j = 0; j < NINDICES && besterr > 0; ++j) - { - err = !AVPCL::flag_premult ? Utils::metric4(colors[i], palette[j]) : - Utils::metric4premult(colors[i], palette[j]) ; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[i] = j; - } - } - toterr += besterr; - - // check for early exit - if (toterr > current_err) - { - // fill out bogus index values so it's initialized at least - for (int k = i; k < np; ++k) - indices[k] = -1; - - return FLT_MAX; - } - } - return toterr; -} - -// assign indices given a tile, shape, and quantized endpoints, return toterr for each region -static void assign_indices(const Tile &tile, int shapeindex, IntEndptsRGBA_2 endpts[NREGIONS], const PatternPrec &pattern_prec, - int indices[Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS]) -{ - // build list of possibles - Vector4 palette[NREGIONS][NINDICES]; - - for (int region = 0; region < NREGIONS; ++region) - { - generate_palette_quantized(endpts[region], pattern_prec.region_precs[region], &palette[region][0]); - toterr[region] = 0; - } - - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - err = !AVPCL::flag_premult ? Utils::metric4(tile.data[y][x], palette[region][i]) : - Utils::metric4premult(tile.data[y][x], palette[region][i]) ; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[y][x] = i; - } - } - toterr[region] += besterr; - } -} - -// note: indices are valid only if the value returned is less than old_err; otherwise they contain -1's -// this function returns either old_err or a value smaller (if it was successful in improving the error) -static float perturb_one(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, const IntEndptsRGBA_2 &old_endpts, IntEndptsRGBA_2 &new_endpts, - float old_err, int do_b, int indices[Tile::TILE_TOTAL]) -{ - // we have the old endpoints: old_endpts - // we have the perturbed endpoints: new_endpts - // we have the temporary endpoints: temp_endpts - - IntEndptsRGBA_2 temp_endpts; - float min_err = old_err; // start with the best current error - int beststep; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i>= 1) - { - bool improved = false; - for (int sign = -1; sign <= 1; sign += 2) - { - if (do_b == 0) - { - temp_endpts.A[ch] = new_endpts.A[ch] + sign * step; - if (temp_endpts.A[ch] < 0 || temp_endpts.A[ch] >= (1 << prec)) - continue; - } - else - { - temp_endpts.B[ch] = new_endpts.B[ch] + sign * step; - if (temp_endpts.B[ch] < 0 || temp_endpts.B[ch] >= (1 << prec)) - continue; - } - - float err = map_colors(colors, importance, np, temp_endpts, region_prec, min_err, temp_indices); - - if (err < min_err) - { - improved = true; - min_err = err; - beststep = sign * step; - for (int i=0; i 5000 perturb endpoints 50% of precision -// if err > 1000 25% -// if err > 200 12.5% -// if err > 40 6.25% -// for np = 16 -- adjust error thresholds as a function of np -// always ensure endpoint ordering is preserved (no need to overlap the scan) -// if orig_err returned from this is less than its input value, then indices[] will contain valid indices -static float exhaustive(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, float orig_err, IntEndptsRGBA_2 &opt_endpts, int indices[Tile::TILE_TOTAL]) -{ - IntEndptsRGBA_2 temp_endpts; - float best_err = orig_err; - int aprec = region_prec.endpt_a_prec[ch]; - int bprec = region_prec.endpt_b_prec[ch]; - int good_indices[Tile::TILE_TOTAL]; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i 5000.0*thr_scale) { adelta = (1 << aprec)/2; bdelta = (1 << bprec)/2; } - else if (orig_err > 1000.0*thr_scale) { adelta = (1 << aprec)/4; bdelta = (1 << bprec)/4; } - else if (orig_err > 200.0*thr_scale) { adelta = (1 << aprec)/8; bdelta = (1 << bprec)/8; } - else if (orig_err > 40.0*thr_scale) { adelta = (1 << aprec)/16; bdelta = (1 << bprec)/16; } - adelta = max(adelta, 3); - bdelta = max(bdelta, 3); - -#ifdef DISABLE_EXHAUSTIVE - adelta = bdelta = 3; -#endif - - temp_endpts = opt_endpts; - - // ok figure out the range of A and B - int alow = max(0, opt_endpts.A[ch] - adelta); - int ahigh = min((1<= initial_error) break - rgb0 += delta0 - next = 1 - else - if (err1 >= initial_error) break - rgb1 += delta1 - next = 0 - initial_err = map() - for (;;) - err = perturb(next ? rgb1:rgb0, delta) - if (err >= initial_err) break - next? rgb1 : rgb0 += delta - initial_err = err - */ - IntEndptsRGBA_2 new_a, new_b; - IntEndptsRGBA_2 new_endpt; - int do_b; - int orig_indices[Tile::TILE_TOTAL]; - int new_indices[Tile::TILE_TOTAL]; - int temp_indices0[Tile::TILE_TOTAL]; - int temp_indices1[Tile::TILE_TOTAL]; - - // now optimize each channel separately - // for the first error improvement, we save the indices. then, for any later improvement, we compare the indices - // if they differ, we restart the loop (which then falls back to looking for a first improvement.) - for (int ch = 0; ch < NCHANNELS_RGBA; ++ch) - { - // figure out which endpoint when perturbed gives the most improvement and start there - // if we just alternate, we can easily end up in a local minima - float err0 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_a, opt_err, 0, temp_indices0); // perturb endpt A - float err1 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_b, opt_err, 1, temp_indices1); // perturb endpt B - - if (err0 < err1) - { - if (err0 >= opt_err) - continue; - - for (int i=0; i= opt_err) - continue; - - for (int i=0; i= opt_err) - break; - - for (int i=0; i> 1) & 1; - - // make sure we have a valid error for temp_in - // we use FLT_MAX here because we want an accurate temp_in_err, no shortcuts - // (mapcolors will compute a mapping but will stop if the error exceeds the value passed in the FLT_MAX position) - float temp_in_err = map_colors(pixels, importance, np, temp_in, pattern_prec.region_precs[region], FLT_MAX, temp_indices); - - // now try to optimize these endpoints - float temp_out_err = optimize_one(pixels, importance, np, temp_in_err, temp_in, pattern_prec.region_precs[region], temp_out); - - // if we find an improvement, update the best so far and correct the output endpoints and errors - if (temp_out_err < best_err) - { - best_err = temp_out_err; - opt_err[region] = temp_out_err; - opt_endpts[region] = temp_out; - } - } - } -} - -/* optimization algorithm - for each pattern - convert endpoints using pattern precision - assign indices and get initial error - compress indices (and possibly reorder endpoints) - transform endpoints - if transformed endpoints fit pattern - get original endpoints back - optimize endpoints, get new endpoints, new indices, and new error // new error will almost always be better - compress new indices - transform new endpoints - if new endpoints fit pattern AND if error is improved - emit compressed block with new data - else - emit compressed block with original data // to try to preserve maximum endpoint precision - - simplify the above given that there is no transform now and that endpoints will always fit -*/ - -static float refine(const Tile &tile, int shapeindex_best, const FltEndpts endpts[NREGIONS], char *block) -{ - float orig_err[NREGIONS], opt_err[NREGIONS], orig_toterr, opt_toterr, expected_opt_err[NREGIONS]; - IntEndptsRGBA_2 orig_endpts[NREGIONS], opt_endpts[NREGIONS]; - int orig_indices[Tile::TILE_H][Tile::TILE_W], opt_indices[Tile::TILE_H][Tile::TILE_W]; - - for (int sp = 0; sp < NPATTERNS; ++sp) - { - quantize_endpts(endpts, pattern_precs[sp], orig_endpts); - assign_indices(tile, shapeindex_best, orig_endpts, pattern_precs[sp], orig_indices, orig_err); - swap_indices(orig_endpts, orig_indices, shapeindex_best); - - optimize_endpts(tile, shapeindex_best, orig_err, orig_endpts, pattern_precs[sp], expected_opt_err, opt_endpts); - - assign_indices(tile, shapeindex_best, opt_endpts, pattern_precs[sp], opt_indices, opt_err); - // (nreed) Commented out asserts because they go off all the time...not sure why - //for (int i=0; i 255.0f) v.x = 255.0f; - if (v.y < 0.0f) v.y = 0.0f; - if (v.y > 255.0f) v.y = 255.0f; - if (v.z < 0.0f) v.z = 0.0f; - if (v.z > 255.0f) v.z = 255.0f; - if (v.w < 0.0f) v.w = 0.0f; - if (v.w > 255.0f) v.w = 255.0f; -} - -static void generate_palette_unquantized(const FltEndpts endpts[NREGIONS], Vector4 palette[NREGIONS][NINDICES]) -{ - for (int region = 0; region < NREGIONS; ++region) - for (int i = 0; i < NINDICES; ++i) - palette[region][i] = Utils::lerp(endpts[region].A, endpts[region].B, i, 0, DENOM); -} - -// generate a palette from unquantized endpoints, then pick best palette color for all pixels in each region, return toterr for all regions combined -static float map_colors(const Tile &tile, int shapeindex, const FltEndpts endpts[NREGIONS]) -{ - // build list of possibles - Vector4 palette[NREGIONS][NINDICES]; - - generate_palette_unquantized(endpts, palette); - - float toterr = 0; - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr; - - besterr = Utils::metric4(tile.data[y][x], palette[region][0]); - - for (int i = 1; i < NINDICES && besterr > 0; ++i) - { - err = Utils::metric4(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching. this works for most norms. - break; - if (err < besterr) - besterr = err; - } - toterr += besterr; - } - return toterr; -} - -static float rough(const Tile &tile, int shapeindex, FltEndpts endpts[NREGIONS]) -{ - for (int region=0; region maxp) maxp = dp; - } - - // choose as endpoints 2 points along the principal direction that span the projections of all of the pixel values - endpts[region].A = mean + minp*direction; - endpts[region].B = mean + maxp*direction; - - // clamp endpoints - // the argument for clamping is that the actual endpoints need to be clamped and thus we need to choose the best - // shape based on endpoints being clamped - clamp(endpts[region].A); - clamp(endpts[region].B); - } - - return map_colors(tile, shapeindex, endpts); -} - -static void swap(float *list1, int *list2, int i, int j) -{ - float t = list1[i]; list1[i] = list1[j]; list1[j] = t; - int t1 = list2[i]; list2[i] = list2[j]; list2[j] = t1; -} - -float AVPCL::compress_mode6(const Tile &t, char *block) -{ - // number of rough cases to look at. reasonable values of this are 1, NSHAPES/4, and NSHAPES - // NSHAPES/4 gets nearly all the cases; you can increase that a bit (say by 3 or 4) if you really want to squeeze the last bit out - const int NITEMS=1; - - // pick the best NITEMS shapes and refine these. - struct { - FltEndpts endpts[NREGIONS]; - } all[NSHAPES]; - float roughmse[NSHAPES]; - int index[NSHAPES]; - char tempblock[AVPCL::BLOCKSIZE]; - float msebest = FLT_MAX; - - for (int i=0; i roughmse[j]) - swap(roughmse, index, i, j); - - for (int i=0; i0; ++i) - { - int shape = index[i]; - float mse = refine(t, shape, &all[shape].endpts[0], tempblock); - if (mse < msebest) - { - memcpy(block, tempblock, sizeof(tempblock)); - msebest = mse; - } - } - return msebest; -} - diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode7.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode7.cpp deleted file mode 100644 index 441c4ac..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_mode7.cpp +++ /dev/null @@ -1,1094 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// Thanks to Jacob Munkberg (jacob@cs.lth.se) for the shortcut of using SVD to do the equivalent of principal components analysis - -// x10000000 5555.1x4 64p 2bi (30b) - -#include "bits.h" -#include "tile.h" -#include "avpcl.h" -#include "nvcore/debug.h" -#include "nvmath/vector.inl" -#include "nvmath/matrix.inl" -#include "nvmath/fitting.h" -#include "avpcl_utils.h" -#include "endpts.h" -#include -#include - -#include "shapes_two.h" - -using namespace nv; -using namespace AVPCL; - -#define NLSBMODES 4 // number of different lsb modes per region. since we have two .1 per region, that can have 4 values - -#define NINDICES 4 -#define INDEXBITS 2 -#define HIGH_INDEXBIT (1<<(INDEXBITS-1)) -#define DENOM (NINDICES-1) -#define BIAS (DENOM/2) - -// WORK: determine optimal traversal pattern to search for best shape -- what does the error curve look like? -// i.e. can we search shapes in a particular order so we can see the global error minima easily and -// stop without having to touch all shapes? - -#define POS_TO_X(pos) ((pos)&3) -#define POS_TO_Y(pos) (((pos)>>2)&3) - -#define NBITSIZES (NREGIONS*2) -#define ABITINDEX(region) (2*(region)+0) -#define BBITINDEX(region) (2*(region)+1) - -struct ChanBits -{ - int nbitsizes[NBITSIZES]; // bitsizes for one channel -}; - -struct Pattern -{ - ChanBits chan[NCHANNELS_RGBA];// bit patterns used per channel - int transformed; // if 0, deltas are unsigned and no transform; otherwise, signed and transformed - int mode; // associated mode value - int modebits; // number of mode bits - const char *encoding; // verilog description of encoding for this mode -}; - -#define NPATTERNS 1 -#define NREGIONS 2 - -static Pattern patterns[NPATTERNS] = -{ - // red green blue alpha xfm mode mb - 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, 0, 0x80, 8, "", -}; - -struct RegionPrec -{ - int endpt_a_prec[NCHANNELS_RGBA]; - int endpt_b_prec[NCHANNELS_RGBA]; -}; - -struct PatternPrec -{ - RegionPrec region_precs[NREGIONS]; -}; - - -// this is the precision for each channel and region -// NOTE: this MUST match the corresponding data in "patterns" above -- WARNING: there is NO nvAssert to check this! -static PatternPrec pattern_precs[NPATTERNS] = -{ - 5,5,5,5, 5,5,5,5, 5,5,5,5, 5,5,5,5, -}; - -// return # of bits needed to store n. handle signed or unsigned cases properly -static int nbits(int n, bool issigned) -{ - int nb; - if (n==0) - return 0; // no bits needed for 0, signed or not - else if (n > 0) - { - for (nb=0; n; ++nb, n>>=1) ; - return nb + (issigned?1:0); - } - else - { - nvAssert (issigned); - for (nb=0; n<-1; ++nb, n>>=1) ; - return nb + 1; - } -} - -static void transform_forward(IntEndptsRGBA_2 ep[NREGIONS]) -{ - nvUnreachable(); -} - -static void transform_inverse(IntEndptsRGBA_2 ep[NREGIONS]) -{ - nvUnreachable(); -} - -/* -we're using this table to assign lsbs -abgr >=2 correct -0000 0 0 -0001 0 0 -0010 0 0 -0011 1 x1 -0100 0 0 -0101 1 x1 -0110 1 x1 -0111 1 1 -1000 0 0 -1001 1 x0 -1010 1 x0 -1011 1 1 -1100 1 x0 -1101 1 1 -1110 1 1 -1111 1 1 - -we need 8 0's and 8 1's. the x's can be either 0 or 1 as long as you get 8/8. -I choose to assign the lsbs so that the rgb channels are as good as possible. -*/ - -// 6666 ->5555.1, use the "correct" column above to assign the lsb -static void compress_one(const IntEndptsRGBA& endpts, IntEndptsRGBA_2& compr_endpts) -{ - int onescnt; - - onescnt = 0; - for (int j=0; j> 1; - nvAssert (compr_endpts.A[j] < 32); - } - compr_endpts.a_lsb = onescnt >= 2; - - onescnt = 0; - for (int j=0; j> 1; - nvAssert (compr_endpts.B[j] < 32); - } - compr_endpts.b_lsb = onescnt >= 2; -} - -static void uncompress_one(const IntEndptsRGBA_2& compr_endpts, IntEndptsRGBA& endpts) -{ - for (int j=0; j> 2) & 3 and x = index & 3 -static void swap_indices(IntEndptsRGBA_2 endpts[NREGIONS], int indices[Tile::TILE_H][Tile::TILE_W], int shapeindex) -{ - for (int region = 0; region < NREGIONS; ++region) - { - int position = SHAPEINDEX_TO_COMPRESSED_INDICES(shapeindex,region); - - int x = POS_TO_X(position); - int y = POS_TO_Y(position); - nvAssert(REGION(x,y,shapeindex) == region); // double check the table - if (indices[y][x] & HIGH_INDEXBIT) - { - // high bit is set, swap the endpts and indices for this region - int t; - for (int i=0; i= 0 && pat_index < NPATTERNS); - nvAssert (in.getptr() == patterns[pat_index].modebits); - - shapeindex = in.read(SHAPEBITS); - p = patterns[pat_index]; - - for (int j=0; j 0; ++j) - { - err = !AVPCL::flag_premult ? Utils::metric4(colors[i], palette[j]) : - Utils::metric4premult(colors[i], palette[j]) ; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[i] = j; - } - } - toterr += besterr; - - // check for early exit - if (toterr > current_err) - { - // fill out bogus index values so it's initialized at least - for (int k = i; k < np; ++k) - indices[k] = -1; - - return FLT_MAX; - } - } - return toterr; -} - -// assign indices given a tile, shape, and quantized endpoints, return toterr for each region -static void assign_indices(const Tile &tile, int shapeindex, IntEndptsRGBA_2 endpts[NREGIONS], const PatternPrec &pattern_prec, - int indices[Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS]) -{ - // build list of possibles - Vector4 palette[NREGIONS][NINDICES]; - - for (int region = 0; region < NREGIONS; ++region) - { - generate_palette_quantized(endpts[region], pattern_prec.region_precs[region], &palette[region][0]); - toterr[region] = 0; - } - - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - err = !AVPCL::flag_premult ? Utils::metric4(tile.data[y][x], palette[region][i]) : - Utils::metric4premult(tile.data[y][x], palette[region][i]) ; - - if (err > besterr) // error increased, so we're done searching - break; - if (err < besterr) - { - besterr = err; - indices[y][x] = i; - } - } - toterr[region] += besterr; - } -} - -// note: indices are valid only if the value returned is less than old_err; otherwise they contain -1's -// this function returns either old_err or a value smaller (if it was successful in improving the error) -static float perturb_one(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, const IntEndptsRGBA_2 &old_endpts, IntEndptsRGBA_2 &new_endpts, - float old_err, int do_b, int indices[Tile::TILE_TOTAL]) -{ - // we have the old endpoints: old_endpts - // we have the perturbed endpoints: new_endpts - // we have the temporary endpoints: temp_endpts - - IntEndptsRGBA_2 temp_endpts; - float min_err = old_err; // start with the best current error - int beststep; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i>= 1) - { - bool improved = false; - for (int sign = -1; sign <= 1; sign += 2) - { - if (do_b == 0) - { - temp_endpts.A[ch] = new_endpts.A[ch] + sign * step; - if (temp_endpts.A[ch] < 0 || temp_endpts.A[ch] >= (1 << prec)) - continue; - } - else - { - temp_endpts.B[ch] = new_endpts.B[ch] + sign * step; - if (temp_endpts.B[ch] < 0 || temp_endpts.B[ch] >= (1 << prec)) - continue; - } - - float err = map_colors(colors, importance, np, temp_endpts, region_prec, min_err, temp_indices); - - if (err < min_err) - { - improved = true; - min_err = err; - beststep = sign * step; - for (int i=0; i 5000 perturb endpoints 50% of precision -// if err > 1000 25% -// if err > 200 12.5% -// if err > 40 6.25% -// for np = 16 -- adjust error thresholds as a function of np -// always ensure endpoint ordering is preserved (no need to overlap the scan) -// if orig_err returned from this is less than its input value, then indices[] will contain valid indices -static float exhaustive(const Vector4 colors[], const float importance[], int np, int ch, const RegionPrec ®ion_prec, float orig_err, IntEndptsRGBA_2 &opt_endpts, int indices[Tile::TILE_TOTAL]) -{ - IntEndptsRGBA_2 temp_endpts; - float best_err = orig_err; - int aprec = region_prec.endpt_a_prec[ch]; - int bprec = region_prec.endpt_b_prec[ch]; - int good_indices[Tile::TILE_TOTAL]; - int temp_indices[Tile::TILE_TOTAL]; - - for (int i=0; i 5000.0*thr_scale) { adelta = (1 << aprec)/2; bdelta = (1 << bprec)/2; } - else if (orig_err > 1000.0*thr_scale) { adelta = (1 << aprec)/4; bdelta = (1 << bprec)/4; } - else if (orig_err > 200.0*thr_scale) { adelta = (1 << aprec)/8; bdelta = (1 << bprec)/8; } - else if (orig_err > 40.0*thr_scale) { adelta = (1 << aprec)/16; bdelta = (1 << bprec)/16; } - adelta = max(adelta, 3); - bdelta = max(bdelta, 3); - -#ifdef DISABLE_EXHAUSTIVE - adelta = bdelta = 3; -#endif - - temp_endpts = opt_endpts; - - // ok figure out the range of A and B - int alow = max(0, opt_endpts.A[ch] - adelta); - int ahigh = min((1<= initial_error) break - rgb0 += delta0 - next = 1 - else - if (err1 >= initial_error) break - rgb1 += delta1 - next = 0 - initial_err = map() - for (;;) - err = perturb(next ? rgb1:rgb0, delta) - if (err >= initial_err) break - next? rgb1 : rgb0 += delta - initial_err = err - */ - IntEndptsRGBA_2 new_a, new_b; - IntEndptsRGBA_2 new_endpt; - int do_b; - int orig_indices[Tile::TILE_TOTAL]; - int new_indices[Tile::TILE_TOTAL]; - int temp_indices0[Tile::TILE_TOTAL]; - int temp_indices1[Tile::TILE_TOTAL]; - - // now optimize each channel separately - // for the first error improvement, we save the indices. then, for any later improvement, we compare the indices - // if they differ, we restart the loop (which then falls back to looking for a first improvement.) - for (int ch = 0; ch < NCHANNELS_RGBA; ++ch) - { - // figure out which endpoint when perturbed gives the most improvement and start there - // if we just alternate, we can easily end up in a local minima - float err0 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_a, opt_err, 0, temp_indices0); // perturb endpt A - float err1 = perturb_one(colors, importance, np, ch, region_prec, opt_endpts, new_b, opt_err, 1, temp_indices1); // perturb endpt B - - if (err0 < err1) - { - if (err0 >= opt_err) - continue; - - for (int i=0; i= opt_err) - continue; - - for (int i=0; i= opt_err) - break; - - for (int i=0; i> 1) & 1; - - // make sure we have a valid error for temp_in - // we use FLT_MAX here because we want an accurate temp_in_err, no shortcuts - // (mapcolors will compute a mapping but will stop if the error exceeds the value passed in the FLT_MAX position) - float temp_in_err = map_colors(pixels, importance, np, temp_in, pattern_prec.region_precs[region], FLT_MAX, temp_indices); - - // now try to optimize these endpoints - float temp_out_err = optimize_one(pixels, importance, np, temp_in_err, temp_in, pattern_prec.region_precs[region], temp_out); - - // if we find an improvement, update the best so far and correct the output endpoints and errors - if (temp_out_err < best_err) - { - best_err = temp_out_err; - opt_err[region] = temp_out_err; - opt_endpts[region] = temp_out; - } - } - } -} - -/* optimization algorithm - for each pattern - convert endpoints using pattern precision - assign indices and get initial error - compress indices (and possibly reorder endpoints) - transform endpoints - if transformed endpoints fit pattern - get original endpoints back - optimize endpoints, get new endpoints, new indices, and new error // new error will almost always be better - compress new indices - transform new endpoints - if new endpoints fit pattern AND if error is improved - emit compressed block with new data - else - emit compressed block with original data // to try to preserve maximum endpoint precision -*/ - -static float refine(const Tile &tile, int shapeindex_best, const FltEndpts endpts[NREGIONS], char *block) -{ - float orig_err[NREGIONS], opt_err[NREGIONS], orig_toterr, opt_toterr, expected_opt_err[NREGIONS]; - IntEndptsRGBA_2 orig_endpts[NREGIONS], opt_endpts[NREGIONS]; - int orig_indices[Tile::TILE_H][Tile::TILE_W], opt_indices[Tile::TILE_H][Tile::TILE_W]; - - for (int sp = 0; sp < NPATTERNS; ++sp) - { - quantize_endpts(endpts, pattern_precs[sp], orig_endpts); - assign_indices(tile, shapeindex_best, orig_endpts, pattern_precs[sp], orig_indices, orig_err); - swap_indices(orig_endpts, orig_indices, shapeindex_best); - if (patterns[sp].transformed) - transform_forward(orig_endpts); - // apply a heuristic here -- we check if the endpoints fit before we try to optimize them. - // the assumption made is that if they don't fit now, they won't fit after optimizing. - if (endpts_fit(orig_endpts, patterns[sp])) - { - if (patterns[sp].transformed) - transform_inverse(orig_endpts); - optimize_endpts(tile, shapeindex_best, orig_err, orig_endpts, pattern_precs[sp], expected_opt_err, opt_endpts); - assign_indices(tile, shapeindex_best, opt_endpts, pattern_precs[sp], opt_indices, opt_err); - // (nreed) Commented out asserts because they go off all the time...not sure why - //for (int i=0; i 255.0f) v.x = 255.0f; - if (v.y < 0.0f) v.y = 0.0f; - if (v.y > 255.0f) v.y = 255.0f; - if (v.z < 0.0f) v.z = 0.0f; - if (v.z > 255.0f) v.z = 255.0f; - if (v.w < 0.0f) v.w = 0.0f; - if (v.w > 255.0f) v.w = 255.0f; -} - -static void generate_palette_unquantized(const FltEndpts endpts[NREGIONS], Vector4 palette[NREGIONS][NINDICES]) -{ - for (int region = 0; region < NREGIONS; ++region) - for (int i = 0; i < NINDICES; ++i) - palette[region][i] = Utils::lerp(endpts[region].A, endpts[region].B, i, 0, DENOM); -} - -// generate a palette from unquantized endpoints, then pick best palette color for all pixels in each region, return toterr for all regions combined -static float map_colors(const Tile &tile, int shapeindex, const FltEndpts endpts[NREGIONS]) -{ - // build list of possibles - Vector4 palette[NREGIONS][NINDICES]; - - generate_palette_unquantized(endpts, palette); - - float toterr = 0; - Vector4 err; - - for (int y = 0; y < tile.size_y; y++) - for (int x = 0; x < tile.size_x; x++) - { - int region = REGION(x,y,shapeindex); - float err, besterr = FLT_MAX; - - for (int i = 0; i < NINDICES && besterr > 0; ++i) - { - err = Utils::metric4(tile.data[y][x], palette[region][i]); - - if (err > besterr) // error increased, so we're done searching. this works for most norms. - break; - if (err < besterr) - besterr = err; - } - toterr += besterr; - } - return toterr; -} - -static float rough(const Tile &tile, int shapeindex, FltEndpts endpts[NREGIONS]) -{ - for (int region=0; region maxp) maxp = dp; - } - - // choose as endpoints 2 points along the principal direction that span the projections of all of the pixel values - endpts[region].A = mean + minp*direction; - endpts[region].B = mean + maxp*direction; - - // clamp endpoints - // the argument for clamping is that the actual endpoints need to be clamped and thus we need to choose the best - // shape based on endpoints being clamped - clamp(endpts[region].A); - clamp(endpts[region].B); - } - - return map_colors(tile, shapeindex, endpts); -} - -static void swap(float *list1, int *list2, int i, int j) -{ - float t = list1[i]; list1[i] = list1[j]; list1[j] = t; - int t1 = list2[i]; list2[i] = list2[j]; list2[j] = t1; -} - -float AVPCL::compress_mode7(const Tile &t, char *block) -{ - // number of rough cases to look at. reasonable values of this are 1, NSHAPES/4, and NSHAPES - // NSHAPES/4 gets nearly all the cases; you can increase that a bit (say by 3 or 4) if you really want to squeeze the last bit out - const int NITEMS=NSHAPES/4; - - // pick the best NITEMS shapes and refine these. - struct { - FltEndpts endpts[NREGIONS]; - } all[NSHAPES]; - float roughmse[NSHAPES]; - int index[NSHAPES]; - char tempblock[AVPCL::BLOCKSIZE]; - float msebest = FLT_MAX; - - for (int i=0; i roughmse[j]) - swap(roughmse, index, i, j); - - for (int i=0; i0; ++i) - { - int shape = index[i]; - float mse = refine(t, shape, &all[shape].endpts[0], tempblock); - if (mse < msebest) - { - memcpy(block, tempblock, sizeof(tempblock)); - msebest = mse; - } - } - return msebest; -} - diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_utils.cpp b/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_utils.cpp deleted file mode 100644 index af99711..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_utils.cpp +++ /dev/null @@ -1,389 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// Utility and common routines - -#include "avpcl_utils.h" -#include "avpcl.h" -#include "nvmath/vector.inl" -#include - -using namespace nv; -using namespace AVPCL; - -static const int denom7_weights[] = {0, 9, 18, 27, 37, 46, 55, 64}; // divided by 64 -static const int denom15_weights[] = {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64}; // divided by 64 - -int Utils::lerp(int a, int b, int i, int bias, int denom) -{ -#ifdef USE_ZOH_INTERP - nvAssert (denom == 3 || denom == 7 || denom == 15); - nvAssert (i >= 0 && i <= denom); - nvAssert (bias >= 0 && bias <= denom/2); - nvAssert (a >= 0 && b >= 0); - - int round = 0; -#ifdef USE_ZOH_INTERP_ROUNDED - round = 32; -#endif - - switch (denom) - { - case 3: denom *= 5; i *= 5; // fall through to case 15 - case 15:return (a*denom15_weights[denom-i] + b*denom15_weights[i] + round) >> 6; - case 7: return (a*denom7_weights[denom-i] + b*denom7_weights[i] + round) >> 6; - default: nvUnreachable(); return 0; - } -#else - return (((a)*((denom)-i)+(b)*(i)+(bias))/(denom)); // simple exact interpolation -#endif -} - -Vector4 Utils::lerp(Vector4::Arg a, Vector4::Arg b, int i, int bias, int denom) -{ -#ifdef USE_ZOH_INTERP - nvAssert (denom == 3 || denom == 7 || denom == 15); - nvAssert (i >= 0 && i <= denom); - nvAssert (bias >= 0 && bias <= denom/2); -// nvAssert (a >= 0 && b >= 0); - - // no need to bias these as this is an exact division - - switch (denom) - { - case 3: denom *= 5; i *= 5; // fall through to case 15 - case 15:return (a*float(denom15_weights[denom-i]) + b*float(denom15_weights[i])) / 64.0f; - case 7: return (a*float(denom7_weights[denom-i]) + b*float(denom7_weights[i])) / 64.0f; - default: nvUnreachable(); return Vector4(0); - } -#else - return (((a)*((denom)-i)+(b)*(i)+(bias))/(denom)); // simple exact interpolation -#endif -} - - -int Utils::unquantize(int q, int prec) -{ - int unq; - - nvAssert (prec > 3); // we only want to do one replicate - -#ifdef USE_ZOH_QUANT - if (prec >= 8) - unq = q; - else if (q == 0) - unq = 0; - else if (q == ((1<> prec; -#else - // avpcl unquantizer -- bit replicate - unq = (q << (8-prec)) | (q >> (2*prec-8)); -#endif - - return unq; -} - -// quantize to the best value -- i.e., minimize unquantize error -int Utils::quantize(float value, int prec) -{ - int q, unq; - - nvAssert (prec > 3); // we only want to do one replicate - - unq = (int)floor(value + 0.5f); - nvAssert (unq <= 255); - -#ifdef USE_ZOH_QUANT - q = (prec >= 8) ? unq : (unq << prec) / 256; -#else - // avpcl quantizer -- scale properly for best possible bit-replicated result - q = (unq * ((1<= 0 && q < (1 << prec)); - - return q; -} - -float Utils::metric4(Vector4::Arg a, Vector4::Arg b) -{ - Vector4 err = a - b; - - // if nonuniform, select weights and weigh away - if (AVPCL::flag_nonuniform || AVPCL::flag_nonuniform_ati) - { - float rwt, gwt, bwt; - if (AVPCL::flag_nonuniform) - { - rwt = 0.299f; gwt = 0.587f; bwt = 0.114f; - } - else /*if (AVPCL::flag_nonuniform_ati)*/ - { - rwt = 0.3086f; gwt = 0.6094f; bwt = 0.0820f; - } - - // weigh the components - err.x *= rwt; - err.y *= gwt; - err.z *= bwt; - } - - return lengthSquared(err); -} - -// WORK -- implement rotatemode for the below -- that changes where the rwt, gwt, and bwt's go. -float Utils::metric3(Vector3::Arg a, Vector3::Arg b, int rotatemode) -{ - Vector3 err = a - b; - - // if nonuniform, select weights and weigh away - if (AVPCL::flag_nonuniform || AVPCL::flag_nonuniform_ati) - { - float rwt, gwt, bwt; - if (AVPCL::flag_nonuniform) - { - rwt = 0.299f; gwt = 0.587f; bwt = 0.114f; - } - else if (AVPCL::flag_nonuniform_ati) - { - rwt = 0.3086f; gwt = 0.6094f; bwt = 0.0820f; - } - - // adjust weights based on rotatemode - switch(rotatemode) - { - case ROTATEMODE_RGBA_RGBA: break; - case ROTATEMODE_RGBA_AGBR: rwt = 1.0f; break; - case ROTATEMODE_RGBA_RABG: gwt = 1.0f; break; - case ROTATEMODE_RGBA_RGAB: bwt = 1.0f; break; - default: nvUnreachable(); - } - - // weigh the components - err.x *= rwt; - err.y *= gwt; - err.z *= bwt; - } - - return lengthSquared(err); -} - -float Utils::metric1(const float a, const float b, int rotatemode) -{ - float err = a - b; - - // if nonuniform, select weights and weigh away - if (AVPCL::flag_nonuniform || AVPCL::flag_nonuniform_ati) - { - float rwt, gwt, bwt, awt; - if (AVPCL::flag_nonuniform) - { - rwt = 0.299f; gwt = 0.587f; bwt = 0.114f; - } - else if (AVPCL::flag_nonuniform_ati) - { - rwt = 0.3086f; gwt = 0.6094f; bwt = 0.0820f; - } - - // adjust weights based on rotatemode - switch(rotatemode) - { - case ROTATEMODE_RGBA_RGBA: awt = 1.0f; break; - case ROTATEMODE_RGBA_AGBR: awt = rwt; break; - case ROTATEMODE_RGBA_RABG: awt = gwt; break; - case ROTATEMODE_RGBA_RGAB: awt = bwt; break; - default: nvUnreachable(); - } - - // weigh the components - err *= awt; - } - - return err * err; -} - -float Utils::premult(float r, float a) -{ - // note that the args are really integers stored in floats - int R = int(r), A = int(a); - - nvAssert ((R==r) && (A==a)); - - return float((R*A + 127)/255); -} - -static void premult4(Vector4& rgba) -{ - rgba.x = Utils::premult(rgba.x, rgba.w); - rgba.y = Utils::premult(rgba.y, rgba.w); - rgba.z = Utils::premult(rgba.z, rgba.w); -} - -static void premult3(Vector3& rgb, float a) -{ - rgb.x = Utils::premult(rgb.x, a); - rgb.y = Utils::premult(rgb.y, a); - rgb.z = Utils::premult(rgb.z, a); -} - -float Utils::metric4premult(Vector4::Arg a, Vector4::Arg b) -{ - Vector4 pma = a, pmb = b; - - premult4(pma); - premult4(pmb); - - Vector4 err = pma - pmb; - - // if nonuniform, select weights and weigh away - if (AVPCL::flag_nonuniform || AVPCL::flag_nonuniform_ati) - { - float rwt, gwt, bwt; - if (AVPCL::flag_nonuniform) - { - rwt = 0.299f; gwt = 0.587f; bwt = 0.114f; - } - else /*if (AVPCL::flag_nonuniform_ati)*/ - { - rwt = 0.3086f; gwt = 0.6094f; bwt = 0.0820f; - } - - // weigh the components - err.x *= rwt; - err.y *= gwt; - err.z *= bwt; - } - - return lengthSquared(err); -} - -float Utils::metric3premult_alphaout(Vector3::Arg rgb0, float a0, Vector3::Arg rgb1, float a1) -{ - Vector3 pma = rgb0, pmb = rgb1; - - premult3(pma, a0); - premult3(pmb, a1); - - Vector3 err = pma - pmb; - - // if nonuniform, select weights and weigh away - if (AVPCL::flag_nonuniform || AVPCL::flag_nonuniform_ati) - { - float rwt, gwt, bwt; - if (AVPCL::flag_nonuniform) - { - rwt = 0.299f; gwt = 0.587f; bwt = 0.114f; - } - else /*if (AVPCL::flag_nonuniform_ati)*/ - { - rwt = 0.3086f; gwt = 0.6094f; bwt = 0.0820f; - } - - // weigh the components - err.x *= rwt; - err.y *= gwt; - err.z *= bwt; - } - - return lengthSquared(err); -} - -float Utils::metric3premult_alphain(Vector3::Arg rgb0, Vector3::Arg rgb1, int rotatemode) -{ - Vector3 pma = rgb0, pmb = rgb1; - - switch(rotatemode) - { - case ROTATEMODE_RGBA_RGBA: - // this function isn't supposed to be called for this rotatemode - nvUnreachable(); - break; - case ROTATEMODE_RGBA_AGBR: - pma.y = premult(pma.y, pma.x); - pma.z = premult(pma.z, pma.x); - pmb.y = premult(pmb.y, pmb.x); - pmb.z = premult(pmb.z, pmb.x); - break; - case ROTATEMODE_RGBA_RABG: - pma.x = premult(pma.x, pma.y); - pma.z = premult(pma.z, pma.y); - pmb.x = premult(pmb.x, pmb.y); - pmb.z = premult(pmb.z, pmb.y); - break; - case ROTATEMODE_RGBA_RGAB: - pma.x = premult(pma.x, pma.z); - pma.y = premult(pma.y, pma.z); - pmb.x = premult(pmb.x, pmb.z); - pmb.y = premult(pmb.y, pmb.z); - break; - default: nvUnreachable(); - } - - Vector3 err = pma - pmb; - - // if nonuniform, select weights and weigh away - if (AVPCL::flag_nonuniform || AVPCL::flag_nonuniform_ati) - { - float rwt, gwt, bwt; - if (AVPCL::flag_nonuniform) - { - rwt = 0.299f; gwt = 0.587f; bwt = 0.114f; - } - else /*if (AVPCL::flag_nonuniform_ati)*/ - { - rwt = 0.3086f; gwt = 0.6094f; bwt = 0.0820f; - } - - // weigh the components - err.x *= rwt; - err.y *= gwt; - err.z *= bwt; - } - - return lengthSquared(err); -} - -float Utils::metric1premult(float rgb0, float a0, float rgb1, float a1, int rotatemode) -{ - float err = premult(rgb0, a0) - premult(rgb1, a1); - - // if nonuniform, select weights and weigh away - if (AVPCL::flag_nonuniform || AVPCL::flag_nonuniform_ati) - { - float rwt, gwt, bwt, awt; - if (AVPCL::flag_nonuniform) - { - rwt = 0.299f; gwt = 0.587f; bwt = 0.114f; - } - else if (AVPCL::flag_nonuniform_ati) - { - rwt = 0.3086f; gwt = 0.6094f; bwt = 0.0820f; - } - - // adjust weights based on rotatemode - switch(rotatemode) - { - case ROTATEMODE_RGBA_RGBA: awt = 1.0f; break; - case ROTATEMODE_RGBA_AGBR: awt = rwt; break; - case ROTATEMODE_RGBA_RABG: awt = gwt; break; - case ROTATEMODE_RGBA_RGAB: awt = bwt; break; - default: nvUnreachable(); - } - - // weigh the components - err *= awt; - } - - return err * err; -} diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_utils.h b/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_utils.h deleted file mode 100644 index cb546d5..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/avpcl_utils.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -// utility class holding common routines -#ifndef _AVPCL_UTILS_H -#define _AVPCL_UTILS_H - -#include "nvmath/vector.h" - -namespace AVPCL { - -inline int SIGN_EXTEND(int x, int nb) { return ((((x)&(1<<((nb)-1)))?((~0)<<(nb)):0)|(x)); } - -static const int INDEXMODE_BITS = 1; // 2 different index modes -static const int NINDEXMODES = (1<<(INDEXMODE_BITS)); -static const int INDEXMODE_ALPHA_IS_3BITS = 0; -static const int INDEXMODE_ALPHA_IS_2BITS = 1; - -static const int ROTATEMODE_BITS = 2; // 4 different rotate modes -static const int NROTATEMODES = (1<<(ROTATEMODE_BITS)); -static const int ROTATEMODE_RGBA_RGBA = 0; -static const int ROTATEMODE_RGBA_AGBR = 1; -static const int ROTATEMODE_RGBA_RABG = 2; -static const int ROTATEMODE_RGBA_RGAB = 3; - -class Utils -{ -public: - // error metrics - static float metric4(nv::Vector4::Arg a, nv::Vector4::Arg b); - static float metric3(nv::Vector3::Arg a, nv::Vector3::Arg b, int rotatemode); - static float metric1(float a, float b, int rotatemode); - - static float metric4premult(nv::Vector4::Arg rgba0, nv::Vector4::Arg rgba1); - static float metric3premult_alphaout(nv::Vector3::Arg rgb0, float a0, nv::Vector3::Arg rgb1, float a1); - static float metric3premult_alphain(nv::Vector3::Arg rgb0, nv::Vector3::Arg rgb1, int rotatemode); - static float metric1premult(float rgb0, float a0, float rgb1, float a1, int rotatemode); - - static float premult(float r, float a); - - // quantization and unquantization - static int unquantize(int q, int prec); - static int quantize(float value, int prec); - - // lerping - static int lerp(int a, int b, int i, int bias, int denom); - static nv::Vector4 lerp(nv::Vector4::Arg a, nv::Vector4::Arg b, int i, int bias, int denom); -}; - -} - -#endif diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/bits.h b/3rdparty/bgfx/3rdparty/nvtt/bc7/bits.h deleted file mode 100644 index 782f655..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/bits.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -#ifndef _AVPCL_BITS_H -#define _AVPCL_BITS_H - -// read/write a bitstream - -#include "nvcore/debug.h" - -namespace AVPCL { - -class Bits -{ -public: - - Bits(char *data, int maxdatabits) { nvAssert (data && maxdatabits > 0); bptr = bend = 0; bits = data; maxbits = maxdatabits; readonly = 0;} - Bits(const char *data, int availdatabits) { nvAssert (data && availdatabits > 0); bptr = 0; bend = availdatabits; cbits = data; maxbits = availdatabits; readonly = 1;} - - void write(int value, int nbits) { - nvAssert (nbits >= 0 && nbits < 32); - nvAssert (sizeof(int)>= 4); - for (int i=0; i>i); - } - int read(int nbits) { - nvAssert (nbits >= 0 && nbits < 32); - nvAssert (sizeof(int)>= 4); - int out = 0; - for (int i=0; i= 0 && ptr < maxbits); bptr = ptr; } - int getsize() { return bend; } - -private: - int bptr; // next bit to read - int bend; // last written bit + 1 - char *bits; // ptr to user bit stream - const char *cbits; // ptr to const user bit stream - int maxbits; // max size of user bit stream - char readonly; // 1 if this is a read-only stream - - int readone() { - nvAssert (bptr < bend); - if (bptr >= bend) return 0; - int bit = (readonly ? cbits[bptr>>3] : bits[bptr>>3]) & (1 << (bptr & 7)); - ++bptr; - return bit != 0; - } - void writeone(int bit) { - nvAssert (!readonly); // "Writing a read-only bit stream" - nvAssert (bptr < maxbits); - if (bptr >= maxbits) return; - if (bit&1) - bits[bptr>>3] |= 1 << (bptr & 7); - else - bits[bptr>>3] &= ~(1 << (bptr & 7)); - if (bptr++ >= bend) bend = bptr; - } -}; - -} - -#endif diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/endpts.h b/3rdparty/bgfx/3rdparty/nvtt/bc7/endpts.h deleted file mode 100644 index 4f42a16..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/endpts.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -#ifndef _AVPCL_ENDPTS_H -#define _AVPCL_ENDPTS_H - -// endpoint definitions and routines to search through endpoint space - -#include "nvmath/vector.h" - -namespace AVPCL { - -static const int NCHANNELS_RGB = 3; -static const int NCHANNELS_RGBA = 4; -static const int CHANNEL_R = 0; -static const int CHANNEL_G = 1; -static const int CHANNEL_B = 2; -static const int CHANNEL_A = 3; - -struct FltEndpts -{ - nv::Vector4 A; - nv::Vector4 B; -}; - -struct IntEndptsRGB -{ - int A[NCHANNELS_RGB]; - int B[NCHANNELS_RGB]; -}; - -struct IntEndptsRGB_1 -{ - int A[NCHANNELS_RGB]; - int B[NCHANNELS_RGB]; - int lsb; // shared lsb for A and B -}; - -struct IntEndptsRGB_2 -{ - int A[NCHANNELS_RGB]; - int B[NCHANNELS_RGB]; - int a_lsb; // lsb for A - int b_lsb; // lsb for B -}; - - -struct IntEndptsRGBA -{ - int A[NCHANNELS_RGBA]; - int B[NCHANNELS_RGBA]; -}; - -struct IntEndptsRGBA_2 -{ - int A[NCHANNELS_RGBA]; - int B[NCHANNELS_RGBA]; - int a_lsb; // lsb for A - int b_lsb; // lsb for B -}; - -struct IntEndptsRGBA_2a -{ - int A[NCHANNELS_RGBA]; - int B[NCHANNELS_RGBA]; - int a_lsb; // lsb for RGB channels of A - int b_lsb; // lsb for RGB channels of A -}; - -} - -#endif diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/shapes_three.h b/3rdparty/bgfx/3rdparty/nvtt/bc7/shapes_three.h deleted file mode 100644 index dc95ba5..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/shapes_three.h +++ /dev/null @@ -1,132 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -#ifndef _AVPCL_SHAPES_THREE_H -#define _AVPCL_SHAPES_THREE_H - -// shapes for 3 regions - -#define NREGIONS 3 -#define NSHAPES 64 -#define SHAPEBITS 6 - -static int shapes[NSHAPES*16] = -{ -0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 2, 2, -0, 0, 1, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 2, 2, -0, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 0, 0, 1, 1, -2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 0, 1, 1, 1, - -0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 1, 1, -0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 1, 1, -1, 1, 2, 2, 0, 0, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, -1, 1, 2, 2, 0, 0, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, - -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, -0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 2, -1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, 0, 1, 2, -2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 1, 2, - -0, 1, 1, 2, 0, 1, 2, 2, 0, 0, 1, 1, 0, 0, 1, 1, -0, 1, 1, 2, 0, 1, 2, 2, 0, 1, 1, 2, 2, 0, 0, 1, -0, 1, 1, 2, 0, 1, 2, 2, 1, 1, 2, 2, 2, 2, 0, 0, -0, 1, 1, 2, 0, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 0, - -0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 2, 2, -0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 2, 2, 0, 0, 2, 2, -0, 1, 1, 2, 2, 0, 0, 1, 1, 1, 2, 2, 0, 0, 2, 2, -1, 1, 2, 2, 2, 2, 0, 0, 1, 1, 2, 2, 1, 1, 1, 1, - -0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, -0, 2, 2, 2, 2, 2, 2, 1, 0, 1, 2, 2, 2, 2, 1, 0, -0, 2, 2, 2, 2, 2, 2, 1, 0, 1, 2, 2, 2, 2, 1, 0, - -0, 1, 2, 2, 0, 0, 1, 2, 0, 1, 1, 0, 0, 0, 0, 0, -0, 1, 2, 2, 0, 0, 1, 2, 1, 2, 2, 1, 0, 1, 1, 0, -0, 0, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, -0, 0, 0, 0, 2, 2, 2, 2, 0, 1, 1, 0, 1, 2, 2, 1, - -0, 0, 2, 2, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, -1, 1, 0, 2, 0, 1, 1, 0, 0, 1, 2, 2, 2, 0, 0, 0, -1, 1, 0, 2, 2, 0, 0, 2, 0, 1, 2, 2, 2, 2, 1, 1, -0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 2, 2, 2, 1, - -0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 1, 1, 0, 1, 2, 0, -0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 1, 2, 0, 1, 2, 0, -1, 1, 2, 2, 0, 0, 1, 2, 0, 0, 2, 2, 0, 1, 2, 0, -1, 2, 2, 2, 0, 0, 1, 1, 0, 2, 2, 2, 0, 1, 2, 0, - -0, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0, 1, 1, -1, 1, 1, 1, 1, 2, 0, 1, 2, 0, 1, 2, 2, 2, 0, 0, -2, 2, 2, 2, 2, 0, 1, 2, 1, 2, 0, 1, 1, 1, 2, 2, -0, 0, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 0, 1, 1, - -0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 2, 2, -1, 1, 2, 2, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 2, 2, -2, 2, 0, 0, 2, 2, 2, 2, 2, 1, 2, 1, 0, 0, 2, 2, -0, 0, 1, 1, 2, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, - -0, 0, 2, 2, 0, 2, 2, 0, 0, 1, 0, 1, 0, 0, 0, 0, -0, 0, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, -0, 0, 2, 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 1, 2, 1, -0, 0, 1, 1, 1, 2, 2, 1, 0, 1, 0, 1, 2, 1, 2, 1, - -0, 1, 0, 1, 0, 2, 2, 2, 0, 0, 0, 2, 0, 0, 0, 0, -0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, -0, 1, 0, 1, 0, 2, 2, 2, 0, 0, 0, 2, 2, 1, 1, 2, -2, 2, 2, 2, 0, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, - -0, 2, 2, 2, 0, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, -0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 0, 0, 0, 0, 0, -0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 0, 2, 1, 1, 2, -0, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 1, 1, 2, - -0, 1, 1, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, -0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0, -2, 2, 2, 2, 0, 0, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0, -2, 2, 2, 2, 0, 0, 2, 2, 0, 0, 2, 2, 2, 1, 1, 2, - -0, 0, 0, 2, 0, 2, 2, 2, 0, 1, 0, 1, 0, 1, 1, 1, -0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, -0, 0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, -0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, -}; - -#define REGION(x,y,si) shapes[((si)&3)*4+((si)>>2)*64+(x)+(y)*16] - -static int shapeindex_to_compressed_indices[NSHAPES*3] = -{ - 0, 3,15, 0, 3, 8, 0,15, 8, 0,15, 3, - 0, 8,15, 0, 3,15, 0,15, 3, 0,15, 8, - 0, 8,15, 0, 8,15, 0, 6,15, 0, 6,15, - 0, 6,15, 0, 5,15, 0, 3,15, 0, 3, 8, - - 0, 3,15, 0, 3, 8, 0, 8,15, 0,15, 3, - 0, 3,15, 0, 3, 8, 0, 6,15, 0,10, 8, - 0, 5, 3, 0, 8,15, 0, 8, 6, 0, 6,10, - 0, 8,15, 0, 5,15, 0,15,10, 0,15, 8, - - 0, 8,15, 0,15, 3, 0, 3,15, 0, 5,10, - 0, 6,10, 0,10, 8, 0, 8, 9, 0,15,10, - 0,15, 6, 0, 3,15, 0,15, 8, 0, 5,15, - 0,15, 3, 0,15, 6, 0,15, 6, 0,15, 8, - - 0, 3,15, 0,15, 3, 0, 5,15, 0, 5,15, - 0, 5,15, 0, 8,15, 0, 5,15, 0,10,15, - 0, 5,15, 0,10,15, 0, 8,15, 0,13,15, - 0,15, 3, 0,12,15, 0, 3,15, 0, 3, 8 - -}; -#define SHAPEINDEX_TO_COMPRESSED_INDICES(si,region) shapeindex_to_compressed_indices[(si)*3+(region)] - -#endif diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/shapes_two.h b/3rdparty/bgfx/3rdparty/nvtt/bc7/shapes_two.h deleted file mode 100644 index 853d557..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/shapes_two.h +++ /dev/null @@ -1,133 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -#ifndef _AVPCL_SHAPES_TWO_H -#define _AVPCL_SHAPES_TWO_H - -// shapes for two regions - -#define NREGIONS 2 -#define NSHAPES 64 -#define SHAPEBITS 6 - -static int shapes[NSHAPES*16] = -{ -0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, -0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, -0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, -0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, - -0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, -0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, -0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, -0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, - -0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, -0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, -0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, - -0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - -0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, -1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, -1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, - -0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, -0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, -0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, -0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, - -0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, -0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, -0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, -0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, - -0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, -0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, - -0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, -0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, -0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, -0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, - -0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, -1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, -0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, -1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, - -0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, -0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, -1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, -1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, - -0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, -1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, -0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, - -0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, -0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, - -0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, -1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, -1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, -0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, - -0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, -1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, -1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, -1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, - -0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, -1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, -0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, -0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, - -}; - -#define REGION(x,y,si) shapes[((si)&3)*4+((si)>>2)*64+(x)+(y)*16] - -static int shapeindex_to_compressed_indices[NSHAPES*2] = -{ - 0,15, 0,15, 0,15, 0,15, - 0,15, 0,15, 0,15, 0,15, - 0,15, 0,15, 0,15, 0,15, - 0,15, 0,15, 0,15, 0,15, - - 0,15, 0, 2, 0, 8, 0, 2, - 0, 2, 0, 8, 0, 8, 0,15, - 0, 2, 0, 8, 0, 2, 0, 2, - 0, 8, 0, 8, 0, 2, 0, 2, - - 0,15, 0,15, 0, 6, 0, 8, - 0, 2, 0, 8, 0,15, 0,15, - 0, 2, 0, 8, 0, 2, 0, 2, - 0, 2, 0,15, 0,15, 0, 6, - - 0, 6, 0, 2, 0, 6, 0, 8, - 0,15, 0,15, 0, 2, 0, 2, - 0,15, 0,15, 0,15, 0,15, - 0,15, 0, 2, 0, 2, 0,15 - -}; -#define SHAPEINDEX_TO_COMPRESSED_INDICES(si,region) shapeindex_to_compressed_indices[(si)*2+(region)] - -#endif diff --git a/3rdparty/bgfx/3rdparty/nvtt/bc7/tile.h b/3rdparty/bgfx/3rdparty/nvtt/bc7/tile.h deleted file mode 100644 index 730d9ba..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/bc7/tile.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2007 nVidia, Inc. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. -*/ - -#ifndef _AVPCL_TILE_H -#define _AVPCL_TILE_H - -#include "nvmath/vector.h" -#include -#include "avpcl_utils.h" - -namespace AVPCL { - -// extract a tile of pixels from an array - -class Tile -{ -public: - static const int TILE_H = 4; - static const int TILE_W = 4; - static const int TILE_TOTAL = TILE_H * TILE_W; - nv::Vector4 data[TILE_H][TILE_W]; - float importance_map[TILE_H][TILE_W]; - int size_x, size_y; // actual size of tile - - Tile() {}; - ~Tile(){}; - Tile(int xs, int ys) {size_x = xs; size_y = ys;} -}; - -} - -#endif diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/array.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/array.h deleted file mode 100644 index f4460f3..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/array.h +++ /dev/null @@ -1,181 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_CORE_ARRAY_H -#define NV_CORE_ARRAY_H - -/* -This array class requires the elements to be relocable; it uses memmove and realloc. Ideally I should be -using swap, but I honestly don't care. The only thing that you should be aware of is that internal pointers -are not supported. - -Note also that push_back and resize does not support inserting arguments elements that are in the same -container. This is forbidden to prevent an extra copy. -*/ - - -#include "memory.h" -#include "debug.h" -#include "foreach.h" // pseudoindex - - -namespace nv -{ - class Stream; - - /** - * Replacement for std::vector that is easier to debug and provides - * some nice foreach enumerators. - */ - template - class NVCORE_CLASS Array { - public: - typedef uint size_type; - - // Default constructor. - NV_FORCEINLINE Array() : m_buffer(NULL), m_capacity(0), m_size(0) {} - - // Copy constructor. - NV_FORCEINLINE Array(const Array & a) : m_buffer(NULL), m_capacity(0), m_size(0) { - copy(a.m_buffer, a.m_size); - } - - // Constructor that initializes the vector with the given elements. - NV_FORCEINLINE Array(const T * ptr, uint num) : m_buffer(NULL), m_capacity(0), m_size(0) { - copy(ptr, num); - } - - // Allocate array. - NV_FORCEINLINE explicit Array(uint capacity) : m_buffer(NULL), m_capacity(0), m_size(0) { - setArrayCapacity(capacity); - } - - // Destructor. - NV_FORCEINLINE ~Array() { - clear(); - free(m_buffer); - } - - - /// Const element access. - NV_FORCEINLINE const T & operator[]( uint index ) const - { - nvDebugCheck(index < m_size); - return m_buffer[index]; - } - NV_FORCEINLINE const T & at( uint index ) const - { - nvDebugCheck(index < m_size); - return m_buffer[index]; - } - - /// Element access. - NV_FORCEINLINE T & operator[] ( uint index ) - { - nvDebugCheck(index < m_size); - return m_buffer[index]; - } - NV_FORCEINLINE T & at( uint index ) - { - nvDebugCheck(index < m_size); - return m_buffer[index]; - } - - /// Get vector size. - NV_FORCEINLINE uint size() const { return m_size; } - - /// Get vector size. - NV_FORCEINLINE uint count() const { return m_size; } - - /// Get vector capacity. - NV_FORCEINLINE uint capacity() const { return m_capacity; } - - /// Get const vector pointer. - NV_FORCEINLINE const T * buffer() const { return m_buffer; } - - /// Get vector pointer. - NV_FORCEINLINE T * buffer() { return m_buffer; } - - /// Provide begin/end pointers for C++11 range-based for loops. - NV_FORCEINLINE T * begin() { return m_buffer; } - NV_FORCEINLINE T * end() { return m_buffer + m_size; } - NV_FORCEINLINE const T * begin() const { return m_buffer; } - NV_FORCEINLINE const T * end() const { return m_buffer + m_size; } - - /// Is vector empty. - NV_FORCEINLINE bool isEmpty() const { return m_size == 0; } - - /// Is a null vector. - NV_FORCEINLINE bool isNull() const { return m_buffer == NULL; } - - - T & append(); - void push_back( const T & val ); - void pushBack( const T & val ); - Array & append( const T & val ); - Array & operator<< ( T & t ); - void pop_back(); - void popBack(uint count = 1); - void popFront(uint count = 1); - const T & back() const; - T & back(); - const T & front() const; - T & front(); - bool contains(const T & e) const; - bool find(const T & element, uint * indexPtr) const; - bool find(const T & element, uint begin, uint end, uint * indexPtr) const; - void removeAt(uint index); - bool remove(const T & element); - void insertAt(uint index, const T & val = T()); - void append(const Array & other); - void append(const T other[], uint count); - void replaceWithLast(uint index); - void resize(uint new_size); - void resize(uint new_size, const T & elem); - void fill(const T & elem); - void clear(); - void shrink(); - void reserve(uint desired_size); - void copy(const T * data, uint count); - Array & operator=( const Array & a ); - T * release(); - - - // Array enumerator. - typedef uint PseudoIndex; - - NV_FORCEINLINE PseudoIndex start() const { return 0; } - NV_FORCEINLINE bool isDone(const PseudoIndex & i) const { nvDebugCheck(i <= this->m_size); return i == this->m_size; } - NV_FORCEINLINE void advance(PseudoIndex & i) const { nvDebugCheck(i <= this->m_size); i++; } - -#if NV_CC_MSVC - NV_FORCEINLINE T & operator[]( const PseudoIndexWrapper & i ) { - return m_buffer[i(this)]; - } - NV_FORCEINLINE const T & operator[]( const PseudoIndexWrapper & i ) const { - return m_buffer[i(this)]; - } -#endif - - // Friends. - template - friend Stream & operator<< ( Stream & s, Array & p ); - - template - friend void swap(Array & a, Array & b); - - - protected: - - void setArraySize(uint new_size); - void setArrayCapacity(uint new_capacity); - - T * m_buffer; - uint m_capacity; - uint m_size; - - }; - - -} // nv namespace - -#endif // NV_CORE_ARRAY_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/array.inl b/3rdparty/bgfx/3rdparty/nvtt/nvcore/array.inl deleted file mode 100644 index 2138b3a..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/array.inl +++ /dev/null @@ -1,437 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_CORE_ARRAY_INL -#define NV_CORE_ARRAY_INL - -#include "array.h" - -#include "stream.h" -#include "utils.h" // swap - -#include // memmove -#include // for placement new - - - -namespace nv -{ - template - NV_FORCEINLINE T & Array::append() - { - uint old_size = m_size; - uint new_size = m_size + 1; - - setArraySize(new_size); - - construct_range(m_buffer, new_size, old_size); - - return m_buffer[old_size]; // Return reference to last element. - } - - // Push an element at the end of the vector. - template - NV_FORCEINLINE void Array::push_back( const T & val ) - { -#if 1 - nvDebugCheck(&val < m_buffer || &val >= m_buffer+m_size); - - uint old_size = m_size; - uint new_size = m_size + 1; - - setArraySize(new_size); - - construct_range(m_buffer, new_size, old_size, val); -#else - uint new_size = m_size + 1; - - if (new_size > m_capacity) - { - // @@ Is there any way to avoid this copy? - // @@ Can we create a copy without side effects? Ie. without calls to constructor/destructor. Use alloca + memcpy? - // @@ Assert instead of copy? - const T copy(val); // create a copy in case value is inside of this array. - - setArraySize(new_size); - - new (m_buffer+new_size-1) T(copy); - } - else - { - m_size = new_size; - new(m_buffer+new_size-1) T(val); - } -#endif // 0/1 - } - template - NV_FORCEINLINE void Array::pushBack( const T & val ) - { - push_back(val); - } - template - NV_FORCEINLINE Array & Array::append( const T & val ) - { - push_back(val); - return *this; - } - - // Qt like push operator. - template - NV_FORCEINLINE Array & Array::operator<< ( T & t ) - { - push_back(t); - return *this; - } - - // Pop the element at the end of the vector. - template - NV_FORCEINLINE void Array::pop_back() - { - nvDebugCheck( m_size > 0 ); - resize( m_size - 1 ); - } - template - NV_FORCEINLINE void Array::popBack(uint count) - { - nvDebugCheck(m_size >= count); - resize(m_size - count); - } - - template - NV_FORCEINLINE void Array::popFront(uint count) - { - nvDebugCheck(m_size >= count); - //resize(m_size - count); - - if (m_size == count) { - clear(); - } - else { - destroy_range(m_buffer, 0, count); - - memmove(m_buffer, m_buffer + count, sizeof(T) * (m_size - count)); - - m_size -= count; - } - - } - - - // Get back element. - template - NV_FORCEINLINE const T & Array::back() const - { - nvDebugCheck( m_size > 0 ); - return m_buffer[m_size-1]; - } - - // Get back element. - template - NV_FORCEINLINE T & Array::back() - { - nvDebugCheck( m_size > 0 ); - return m_buffer[m_size-1]; - } - - // Get front element. - template - NV_FORCEINLINE const T & Array::front() const - { - nvDebugCheck( m_size > 0 ); - return m_buffer[0]; - } - - // Get front element. - template - NV_FORCEINLINE T & Array::front() - { - nvDebugCheck( m_size > 0 ); - return m_buffer[0]; - } - - // Check if the given element is contained in the array. - template - NV_FORCEINLINE bool Array::contains(const T & e) const - { - return find(e, NULL); - } - - // Return true if element found. - template - NV_FORCEINLINE bool Array::find(const T & element, uint * indexPtr) const - { - return find(element, 0, m_size, indexPtr); - } - - // Return true if element found within the given range. - template - NV_FORCEINLINE bool Array::find(const T & element, uint begin, uint end, uint * indexPtr) const - { - return ::nv::find(element, m_buffer, begin, end, indexPtr); - } - - - // Remove the element at the given index. This is an expensive operation! - template - void Array::removeAt(uint index) - { - nvDebugCheck(index >= 0 && index < m_size); - - if (m_size == 1) { - clear(); - } - else { - m_buffer[index].~T(); - - memmove(m_buffer+index, m_buffer+index+1, sizeof(T) * (m_size - 1 - index)); - m_size--; - } - } - - // Remove the first instance of the given element. - template - bool Array::remove(const T & element) - { - uint index; - if (find(element, &index)) { - removeAt(index); - return true; - } - return false; - } - - // Insert the given element at the given index shifting all the elements up. - template - void Array::insertAt(uint index, const T & val/*=T()*/) - { - nvDebugCheck( index >= 0 && index <= m_size ); - - setArraySize(m_size + 1); - - if (index < m_size - 1) { - memmove(m_buffer+index+1, m_buffer+index, sizeof(T) * (m_size - 1 - index)); - } - - // Copy-construct into the newly opened slot. - new(m_buffer+index) T(val); - } - - // Append the given data to our vector. - template - NV_FORCEINLINE void Array::append(const Array & other) - { - append(other.m_buffer, other.m_size); - } - - // Append the given data to our vector. - template - void Array::append(const T other[], uint count) - { - if (count > 0) { - const uint old_size = m_size; - - setArraySize(m_size + count); - - for (uint i = 0; i < count; i++ ) { - new(m_buffer + old_size + i) T(other[i]); - } - } - } - - - // Remove the given element by replacing it with the last one. - template - void Array::replaceWithLast(uint index) - { - nvDebugCheck( index < m_size ); - nv::swap(m_buffer[index], back()); // @@ Is this OK when index == size-1? - (m_buffer+m_size-1)->~T(); - m_size--; - } - - // Resize the vector preserving existing elements. - template - void Array::resize(uint new_size) - { - uint old_size = m_size; - - // Destruct old elements (if we're shrinking). - destroy_range(m_buffer, new_size, old_size); - - setArraySize(new_size); - - // Call default constructors - construct_range(m_buffer, new_size, old_size); - } - - - // Resize the vector preserving existing elements and initializing the - // new ones with the given value. - template - void Array::resize(uint new_size, const T & elem) - { - nvDebugCheck(&elem < m_buffer || &elem > m_buffer+m_size); - - uint old_size = m_size; - - // Destruct old elements (if we're shrinking). - destroy_range(m_buffer, new_size, old_size); - - setArraySize(new_size); - - // Call copy constructors - construct_range(m_buffer, new_size, old_size, elem); - } - - // Fill array with the given value. - template - void Array::fill(const T & elem) - { - fill(m_buffer, m_size, elem); - } - - // Clear the buffer. - template - NV_FORCEINLINE void Array::clear() - { - nvDebugCheck(isValidPtr(m_buffer)); - - // Destruct old elements - destroy_range(m_buffer, 0, m_size); - - m_size = 0; - } - - // Shrink the allocated vector. - template - NV_FORCEINLINE void Array::shrink() - { - if (m_size < m_capacity) { - setArrayCapacity(m_size); - } - } - - // Preallocate space. - template - NV_FORCEINLINE void Array::reserve(uint desired_size) - { - if (desired_size > m_capacity) { - setArrayCapacity(desired_size); - } - } - - // Copy elements to this array. Resizes it if needed. - template - NV_FORCEINLINE void Array::copy(const T * data, uint count) - { -#if 1 // More simple, but maybe not be as efficient? - destroy_range(m_buffer, 0, m_size); - - setArraySize(count); - - construct_range(m_buffer, count, 0, data); -#else - const uint old_size = m_size; - - destroy_range(m_buffer, count, old_size); - - setArraySize(count); - - copy_range(m_buffer, data, old_size); - - construct_range(m_buffer, count, old_size, data); -#endif - } - - // Assignment operator. - template - NV_FORCEINLINE Array & Array::operator=( const Array & a ) - { - copy(a.m_buffer, a.m_size); - return *this; - } - - // Release ownership of allocated memory and returns pointer to it. - template - T * Array::release() { - T * tmp = m_buffer; - m_buffer = NULL; - m_capacity = 0; - m_size = 0; - return tmp; - } - - - - // Change array size. - template - inline void Array::setArraySize(uint new_size) { - m_size = new_size; - - if (new_size > m_capacity) { - uint new_buffer_size; - if (m_capacity == 0) { - // first allocation is exact - new_buffer_size = new_size; - } - else { - // following allocations grow array by 25% - new_buffer_size = new_size + (new_size >> 2); - } - - setArrayCapacity( new_buffer_size ); - } - } - - // Change array capacity. - template - inline void Array::setArrayCapacity(uint new_capacity) { - nvDebugCheck(new_capacity >= m_size); - - if (new_capacity == 0) { - // free the buffer. - if (m_buffer != NULL) { - free(m_buffer); - m_buffer = NULL; - } - } - else { - // realloc the buffer - m_buffer = realloc(m_buffer, new_capacity); - } - - m_capacity = new_capacity; - } - - // Array serialization. - template - inline Stream & operator<< ( Stream & s, Array & p ) - { - if (s.isLoading()) { - uint size; - s << size; - p.resize( size ); - } - else { - s << p.m_size; - } - - for (uint i = 0; i < p.m_size; i++) { - s << p.m_buffer[i]; - } - - return s; - } - - // Swap the members of the two given vectors. - template - inline void swap(Array & a, Array & b) - { - nv::swap(a.m_buffer, b.m_buffer); - nv::swap(a.m_capacity, b.m_capacity); - nv::swap(a.m_size, b.m_size); - } - - -} // nv namespace - -#endif // NV_CORE_ARRAY_INL diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/debug.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/debug.h deleted file mode 100644 index 61fbd2f..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/debug.h +++ /dev/null @@ -1,216 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_CORE_DEBUG_H -#define NV_CORE_DEBUG_H - -#include "nvcore.h" - -#include // va_list - - -// Make sure we are using our assert. -#undef assert - -#define NV_ABORT_DEBUG 1 -#define NV_ABORT_IGNORE 2 -#define NV_ABORT_EXIT 3 - -#define nvNoAssert(exp) \ - NV_MULTI_LINE_MACRO_BEGIN \ - (void)sizeof(exp); \ - NV_MULTI_LINE_MACRO_END - -#if NV_NO_ASSERT - -# define nvAssert(exp) nvNoAssert(exp) -# define nvCheck(exp) nvNoAssert(exp) -# define nvDebugAssert(exp) nvNoAssert(exp) -# define nvDebugCheck(exp) nvNoAssert(exp) -# define nvDebugBreak() nvNoAssert(0) - -#else // NV_NO_ASSERT - -# if NV_CC_MSVC - // @@ Does this work in msvc-6 and earlier? -# define nvDebugBreak() __debugbreak() -//# define nvDebugBreak() __asm { int 3 } -# elif NV_OS_ORBIS -# define nvDebugBreak() __debugbreak() -# elif NV_CC_GNUC -# define nvDebugBreak() __builtin_trap() -# else -# error "No nvDebugBreak()!" -# endif - -/* -# elif NV_CC_GNUC || NV_CPU_PPC && NV_OS_DARWIN - // @@ Use __builtin_trap() on GCC -# define nvDebugBreak() __asm__ volatile ("trap") -# elif (NV_CC_GNUC || NV_CPU_X86 || NV_CPU_X86_64) && NV_OS_DARWIN -# define nvDebugBreak() __asm__ volatile ("int3") -# elif NV_CC_GNUC || NV_CPU_X86 || NV_CPU_X86_64 -# define nvDebugBreak() __asm__ ( "int %0" : :"I"(3) ) -# else -# include -# define nvDebugBreak() raise(SIGTRAP) -# endif -*/ - -#define nvDebugBreakOnce() \ - NV_MULTI_LINE_MACRO_BEGIN \ - static bool firstTime = true; \ - if (firstTime) { firstTime = false; nvDebugBreak(); } \ - NV_MULTI_LINE_MACRO_END - -#define nvAssertMacro(exp) \ - NV_MULTI_LINE_MACRO_BEGIN \ - if (!(exp)) { \ - if (nvAbort(#exp, __FILE__, __LINE__, __FUNC__) == NV_ABORT_DEBUG) { \ - nvDebugBreak(); \ - } \ - } \ - NV_MULTI_LINE_MACRO_END - -// GCC, LLVM need "##" before the __VA_ARGS__, MSVC doesn't care -#define nvAssertMacroWithIgnoreAll(exp,...) \ - NV_MULTI_LINE_MACRO_BEGIN \ - static bool ignoreAll = false; \ - if (!ignoreAll && !(exp)) { \ - int result = nvAbort(#exp, __FILE__, __LINE__, __FUNC__, ##__VA_ARGS__); \ - if (result == NV_ABORT_DEBUG) { \ - nvDebugBreak(); \ - } else if (result == NV_ABORT_IGNORE) { \ - ignoreAll = true; \ - } \ - } \ - NV_MULTI_LINE_MACRO_END - -// Interesting assert macro from Insomniac: -// http://www.gdcvault.com/play/1015319/Developing-Imperfect-Software-How-to -// Used as follows: -// if (nvCheck(i < count)) { -// normal path -// } else { -// fixup code. -// } -// This style of macro could be combined with __builtin_expect to let the compiler know failure is unlikely. -#define nvCheckMacro(exp) \ - (\ - (exp) ? true : ( \ - (nvAbort(#exp, __FILE__, __LINE__, __FUNC__) == NV_ABORT_DEBUG) ? (nvDebugBreak(), true) : ( false ) \ - ) \ - ) - - -#define nvAssert(exp) nvAssertMacro(exp) -#define nvCheck(exp) nvAssertMacro(exp) - -#if defined(_DEBUG) -# define nvDebugAssert(exp) nvAssertMacro(exp) -# define nvDebugCheck(exp) nvAssertMacro(exp) -#else // _DEBUG -# define nvDebugAssert(exp) nvNoAssert(exp) -# define nvDebugCheck(exp) nvNoAssert(exp) -#endif // _DEBUG - -#endif // NV_NO_ASSERT - -// Use nvAssume for very simple expresions only: nvAssume(0), nvAssume(value == true), etc. -/*#if !defined(_DEBUG) -# if NV_CC_MSVC -# define nvAssume(exp) __assume(exp) -# else -# define nvAssume(exp) nvCheck(exp) -# endif -#else -# define nvAssume(exp) nvCheck(exp) -#endif*/ - -#if defined(_DEBUG) -# if NV_CC_MSVC -# define nvUnreachable() nvAssert(0 && "unreachable"); __assume(0) -# else -# define nvUnreachable() nvAssert(0 && "unreachable"); __builtin_unreachable() -# endif -#else -# if NV_CC_MSVC -# define nvUnreachable() __assume(0) -# else -# define nvUnreachable() __builtin_unreachable() -# endif -#endif - - -#define nvError(x) nvAbort(x, __FILE__, __LINE__, __FUNC__) -#define nvWarning(x) nvDebugPrint("*** Warning %s/%d: %s\n", __FILE__, __LINE__, (x)) - -#ifndef NV_DEBUG_PRINT -#define NV_DEBUG_PRINT 1 //defined(_DEBUG) -#endif - -#if NV_DEBUG_PRINT -#define nvDebug(...) nvDebugPrint(__VA_ARGS__) -#else -#if NV_CC_MSVC -#define nvDebug(...) __noop(__VA_ARGS__) -#else -#define nvDebug(...) ((void)0) // Non-msvc platforms do not evaluate arguments? -#endif -#endif - - -NVCORE_API int nvAbort(const char *exp, const char *file, int line, const char * func = NULL, const char * msg = NULL, ...) __attribute__((format (printf, 5, 6))); -NVCORE_API void NV_CDECL nvDebugPrint( const char *msg, ... ) __attribute__((format (printf, 1, 2))); - -namespace nv -{ - inline bool isValidPtr(const void * ptr) { - #if NV_CPU_X86_64 - if (ptr == NULL) return true; - if (reinterpret_cast(ptr) < 0x10000ULL) return false; - if (reinterpret_cast(ptr) >= 0x000007FFFFFEFFFFULL) return false; - #else - if (reinterpret_cast(ptr) == 0xcccccccc) return false; - if (reinterpret_cast(ptr) == 0xcdcdcdcd) return false; - if (reinterpret_cast(ptr) == 0xdddddddd) return false; - if (reinterpret_cast(ptr) == 0xffffffff) return false; - #endif - return true; - } - - // Message handler interface. - struct MessageHandler { - virtual void log(const char * str, va_list arg) = 0; - virtual ~MessageHandler() {} - }; - - // Assert handler interface. - struct AssertHandler { - virtual int assertion(const char *exp, const char *file, int line, const char *func, const char *msg, va_list arg) = 0; - virtual ~AssertHandler() {} - }; - - - namespace debug - { - NVCORE_API void dumpInfo(); - NVCORE_API void dumpCallstack( MessageHandler *messageHandler, int callstackLevelsToSkip = 0 ); - - NVCORE_API void setMessageHandler( MessageHandler * messageHandler ); - NVCORE_API void resetMessageHandler(); - - NVCORE_API void setAssertHandler( AssertHandler * assertHanlder ); - NVCORE_API void resetAssertHandler(); - - NVCORE_API void enableSigHandler(bool interactive); - NVCORE_API void disableSigHandler(); - - NVCORE_API bool isDebuggerPresent(); - NVCORE_API bool attachToDebugger(); - - NVCORE_API void terminate(int code); - } - -} // nv namespace - -#endif // NV_CORE_DEBUG_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucdarwin.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucdarwin.h deleted file mode 100644 index 968f4bc..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucdarwin.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef NV_CORE_H -#error "Do not include this file directly." -#endif - -#include // uint8_t, int8_t, ... uintptr_t -#include // operator new, size_t, NULL - -#ifndef __STDC_VERSION__ -# define __STDC_VERSION__ 0 -#endif // __STDC_VERSION__ - -// Function linkage -#define DLL_IMPORT -#if __GNUC__ >= 4 -# define DLL_EXPORT __attribute__((visibility("default"))) -# define DLL_EXPORT_CLASS DLL_EXPORT -#else -# define DLL_EXPORT -# define DLL_EXPORT_CLASS -#endif - -// Function calling modes -#if NV_CPU_X86 -# define NV_CDECL __attribute__((cdecl)) -# define NV_STDCALL __attribute__((stdcall)) -#else -# define NV_CDECL -# define NV_STDCALL -#endif - -#define NV_FASTCALL __attribute__((fastcall)) -#define NV_FORCEINLINE inline -#define NV_DEPRECATED __attribute__((deprecated)) -#define NV_THREAD_LOCAL //ACS: there's no "__thread" or equivalent on iOS/OSX - -#if __GNUC__ > 2 -#define NV_PURE __attribute__((pure)) -#define NV_CONST __attribute__((const)) -#else -#define NV_PURE -#define NV_CONST -#endif - -#define NV_NOINLINE __attribute__((noinline)) - -// Define __FUNC__ properly. -#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L -# if __GNUC__ >= 2 -# define __FUNC__ __PRETTY_FUNCTION__ // __FUNCTION__ -# else -# define __FUNC__ "" -# endif -#else -# define __FUNC__ __PRETTY_FUNCTION__ -#endif - -#define restrict __restrict__ diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnuclinux.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnuclinux.h deleted file mode 100644 index 117d342..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnuclinux.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef NV_CORE_H -#error "Do not include this file directly." -#endif - -#include // uint8_t, int8_t, ... uintptr_t -#include // operator new, size_t, NULL - -#ifndef __STDC_VERSION__ -# define __STDC_VERSION__ 0 -#endif - -// Function linkage -#define DLL_IMPORT -#if __GNUC__ >= 4 -# define DLL_EXPORT __attribute__((visibility("default"))) -# define DLL_EXPORT_CLASS DLL_EXPORT -#else -# define DLL_EXPORT -# define DLL_EXPORT_CLASS -#endif - -// Function calling modes -#if NV_CPU_X86 -# define NV_CDECL __attribute__((cdecl)) -# define NV_STDCALL __attribute__((stdcall)) -#else -# define NV_CDECL -# define NV_STDCALL -#endif - -#define NV_FASTCALL __attribute__((fastcall)) -//#if __GNUC__ > 3 -// It seems that GCC does not assume always_inline implies inline. I think this depends on the GCC version :( -#define NV_FORCEINLINE inline -//#else -// Some compilers complain that inline and always_inline are redundant. -//#define NV_FORCEINLINE __attribute__((always_inline)) -//#endif -#define NV_DEPRECATED __attribute__((deprecated)) -#define NV_THREAD_LOCAL __thread - -#if __GNUC__ > 2 -#define NV_PURE __attribute__((pure)) -#define NV_CONST __attribute__((const)) -#else -#define NV_PURE -#define NV_CONST -#endif - -#define NV_NOINLINE __attribute__((noinline)) - -// Define __FUNC__ properly. -#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L -# if __GNUC__ >= 2 -# define __FUNC__ __PRETTY_FUNCTION__ // __FUNCTION__ -# else -# define __FUNC__ "" -# endif -#else -# define __FUNC__ __PRETTY_FUNCTION__ -#endif - -#define restrict __restrict__ diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucwin32.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucwin32.h deleted file mode 100644 index 68465c8..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucwin32.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef NV_CORE_H -#error "Do not include this file directly." -#endif - -//#include // size_t, NULL - -// Function linkage -#define DLL_IMPORT __declspec(dllimport) -#define DLL_EXPORT __declspec(dllexport) -#define DLL_EXPORT_CLASS DLL_EXPORT - -// Function calling modes -#if NV_CPU_X86 -# define NV_CDECL __attribute__((cdecl)) -# define NV_STDCALL __attribute__((stdcall)) -#else -# define NV_CDECL -# define NV_STDCALL -#endif - -#define NV_FASTCALL __attribute__((fastcall)) -#define NV_FORCEINLINE inline -#define NV_DEPRECATED __attribute__((deprecated)) - -#if __GNUC__ > 2 -#define NV_PURE __attribute__((pure)) -#define NV_CONST __attribute__((const)) -#else -#define NV_PURE -#define NV_CONST -#endif - -#define NV_NOINLINE __attribute__((noinline)) - -// Define __FUNC__ properly. -#if defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L -# if __GNUC__ >= 2 -# define __FUNC__ __PRETTY_FUNCTION__ // __FUNCTION__ -# else -# define __FUNC__ "" -# endif -#else -# define __FUNC__ __PRETTY_FUNCTION__ -#endif - -#define restrict __restrict__ - -/* -// Type definitions -typedef unsigned char uint8; -typedef signed char int8; - -typedef unsigned short uint16; -typedef signed short int16; - -typedef unsigned int uint32; -typedef signed int int32; - -typedef unsigned long long uint64; -typedef signed long long int64; - -// Aliases -typedef uint32 uint; -*/ - diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsvcwin32.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsvcwin32.h deleted file mode 100644 index a6c6bf9..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsvcwin32.h +++ /dev/null @@ -1,94 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_CORE_H -#error "Do not include this file directly." -#endif - -// Function linkage -#define DLL_IMPORT __declspec(dllimport) -#define DLL_EXPORT __declspec(dllexport) -#define DLL_EXPORT_CLASS DLL_EXPORT - -// Function calling modes -#define NV_CDECL __cdecl -#define NV_STDCALL __stdcall -#define NV_FASTCALL __fastcall -#define NV_DEPRECATED - -#define NV_PURE -#define NV_CONST - -// Set standard function names. -#if _MSC_VER < 1900 -# define snprintf _snprintf -#endif -#if _MSC_VER < 1500 -# define vsnprintf _vsnprintf -#endif -#if _MSC_VER < 1700 -# define strtoll _strtoi64 -# define strtoull _strtoui64 -#endif -#define chdir _chdir -#define getcwd _getcwd - -#if _MSC_VER < 1800 // Not sure what version introduced this. -#define va_copy(a, b) (a) = (b) -#endif - -#if !defined restrict -#define restrict -#endif - -// Ignore gcc attributes. -#define __attribute__(X) - -#if !defined __FUNC__ -#define __FUNC__ __FUNCTION__ -#endif - -#define NV_NOINLINE __declspec(noinline) -#define NV_FORCEINLINE inline - -#define NV_THREAD_LOCAL __declspec(thread) - -/* -// Type definitions -typedef unsigned char uint8; -typedef signed char int8; - -typedef unsigned short uint16; -typedef signed short int16; - -typedef unsigned int uint32; -typedef signed int int32; - -typedef unsigned __int64 uint64; -typedef signed __int64 int64; - -// Aliases -typedef uint32 uint; -*/ - -// Unwanted VC++ warnings to disable. -/* -#pragma warning(disable : 4244) // conversion to float, possible loss of data -#pragma warning(disable : 4245) // conversion from 'enum ' to 'unsigned long', signed/unsigned mismatch -#pragma warning(disable : 4100) // unreferenced formal parameter -#pragma warning(disable : 4514) // unreferenced inline function has been removed -#pragma warning(disable : 4710) // inline function not expanded -#pragma warning(disable : 4127) // Conditional expression is constant -#pragma warning(disable : 4305) // truncation from 'const double' to 'float' -#pragma warning(disable : 4505) // unreferenced local function has been removed - -#pragma warning(disable : 4702) // unreachable code in inline expanded function -#pragma warning(disable : 4711) // function selected for automatic inlining -#pragma warning(disable : 4725) // Pentium fdiv bug - -#pragma warning(disable : 4786) // Identifier was truncated and cannot be debugged. - -#pragma warning(disable : 4675) // resolved overload was found by argument-dependent lookup -*/ - -#pragma warning(1 : 4705) // Report unused local variables. -#pragma warning(1 : 4555) // Expression has no effect. diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/foreach.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/foreach.h deleted file mode 100644 index 71b19f7..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/foreach.h +++ /dev/null @@ -1,68 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#pragma once -#ifndef NV_CORE_FOREACH_H -#define NV_CORE_FOREACH_H - -/* -These foreach macros are very non-standard and somewhat confusing, but I like them. -*/ - -#include "nvcore.h" - -#if NV_CC_GNUC // If typeof or decltype is available: -#if !NV_CC_CPP11 -# define NV_DECLTYPE typeof // Using a non-standard extension over typeof that behaves as C++11 decltype -#else -# define NV_DECLTYPE decltype -#endif - -/* -Ideally we would like to write this: - -#define NV_FOREACH(i, container) \ - for(NV_DECLTYPE(container)::PseudoIndex i((container).start()); !(container).isDone(i); (container).advance(i)) - -But gcc versions prior to 4.7 required an intermediate type. See: -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709 -*/ - -#define NV_FOREACH(i, container) \ - typedef NV_DECLTYPE(container) NV_STRING_JOIN2(cont,__LINE__); \ - for(NV_STRING_JOIN2(cont,__LINE__)::PseudoIndex i((container).start()); !(container).isDone(i); (container).advance(i)) - -#else // If typeof not available: - -#include // placement new - -struct PseudoIndexWrapper { - template - PseudoIndexWrapper(const T & container) { - nvStaticCheck(sizeof(typename T::PseudoIndex) <= sizeof(memory)); - new (memory) typename T::PseudoIndex(container.start()); - } - // PseudoIndex cannot have a dtor! - - template typename T::PseudoIndex & operator()(const T * /*container*/) { - return *reinterpret_cast(memory); - } - template const typename T::PseudoIndex & operator()(const T * /*container*/) const { - return *reinterpret_cast(memory); - } - - uint8 memory[4]; // Increase the size if we have bigger enumerators. -}; - -#define NV_FOREACH(i, container) \ - for(PseudoIndexWrapper i(container); !(container).isDone(i(&(container))); (container).advance(i(&(container)))) - -#endif - -// Declare foreach keyword. -#if !defined NV_NO_USE_KEYWORDS -# define foreach NV_FOREACH -# define foreach_index NV_FOREACH -#endif - - -#endif // NV_CORE_FOREACH_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/hash.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/hash.h deleted file mode 100644 index a8b0b2c..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/hash.h +++ /dev/null @@ -1,83 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#pragma once -#ifndef NV_CORE_HASH_H -#define NV_CORE_HASH_H - -#include "nvcore.h" - -namespace nv -{ - inline uint sdbmHash(const void * data_in, uint size, uint h = 5381) - { - const uint8 * data = (const uint8 *) data_in; - uint i = 0; - while (i < size) { - h = (h << 16) + (h << 6) - h + (uint) data[i++]; - } - return h; - } - - // Note that this hash does not handle NaN properly. - inline uint sdbmFloatHash(const float * f, uint count, uint h = 5381) - { - for (uint i = 0; i < count; i++) { - //nvDebugCheck(nv::isFinite(*f)); - union { float f; uint32 i; } x = { f[i] }; - if (x.i == 0x80000000) x.i = 0; - h = sdbmHash(&x, 4, h); - } - return h; - } - - - template - inline uint hash(const T & t, uint h = 5381) - { - return sdbmHash(&t, sizeof(T), h); - } - - template <> - inline uint hash(const float & f, uint h) - { - return sdbmFloatHash(&f, 1, h); - } - - - // Functors for hash table: - template struct Hash - { - uint operator()(const Key & k) const { - return hash(k); - } - }; - - template struct Equal - { - bool operator()(const Key & k0, const Key & k1) const { - return k0 == k1; - } - }; - - - // @@ Move to Utils.h? - template - struct Pair { - T1 first; - T2 second; - }; - - template - bool operator==(const Pair & p0, const Pair & p1) { - return p0.first == p1.first && p0.second == p1.second; - } - - template - uint hash(const Pair & p, uint h = 5381) { - return hash(p.second, hash(p.first)); - } - - -} // nv namespace - -#endif // NV_CORE_HASH_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/memory.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/memory.h deleted file mode 100644 index b332fab..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/memory.h +++ /dev/null @@ -1,30 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_CORE_MEMORY_H -#define NV_CORE_MEMORY_H - -#include "nvcore.h" -#include - -namespace nv { - - // C++ helpers. - template inline T * malloc(size_t count) { - return (T *)::malloc(sizeof(T) * count); - } - - template inline T * realloc(T * ptr, size_t count) { - return (T *)::realloc(ptr, sizeof(T) * count); - } - - template inline void free(const T * ptr) { - ::free((void *)ptr); - } - - template inline void zero(T & data) { - memset(&data, 0, sizeof(T)); - } - -} // nv namespace - -#endif // NV_CORE_MEMORY_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/nvcore.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/nvcore.h deleted file mode 100644 index 689feff..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/nvcore.h +++ /dev/null @@ -1,363 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_CORE_H -#define NV_CORE_H - -#define NVCORE_SHARED 0 -#define NV_NO_ASSERT 0 - -// Function linkage -#if NVCORE_SHARED -#ifdef NVCORE_EXPORTS -#define NVCORE_API DLL_EXPORT -#define NVCORE_CLASS DLL_EXPORT_CLASS -#else -#define NVCORE_API DLL_IMPORT -#define NVCORE_CLASS DLL_IMPORT -#endif -#else // NVCORE_SHARED -#define NVCORE_API -#define NVCORE_CLASS -#endif // NVCORE_SHARED - -// Platform definitions -#include "posh.h" - -#define NV_OS_STRING POSH_OS_STRING - -#if defined POSH_OS_LINUX -# define NV_OS_LINUX 1 -# define NV_OS_UNIX 1 -#elif defined POSH_OS_ORBIS -# define NV_OS_ORBIS 1 -#elif defined POSH_OS_FREEBSD -# define NV_OS_FREEBSD 1 -# define NV_OS_UNIX 1 -#elif defined POSH_OS_OPENBSD -# define NV_OS_OPENBSD 1 -# define NV_OS_UNIX 1 -#elif defined POSH_OS_CYGWIN32 -# define NV_OS_CYGWIN 1 -#elif defined POSH_OS_MINGW -# define NV_OS_MINGW 1 -# define NV_OS_WIN32 1 -#elif defined POSH_OS_OSX -# define NV_OS_DARWIN 1 -# define NV_OS_UNIX 1 -#elif defined POSH_OS_IOS -# define NV_OS_DARWIN 1 //ACS should we keep this on IOS? -# define NV_OS_UNIX 1 -# define NV_OS_IOS 1 -#elif defined POSH_OS_UNIX -# define NV_OS_UNIX 1 -#elif defined POSH_OS_WIN64 -# define NV_OS_WIN32 1 -# define NV_OS_WIN64 1 -#elif defined POSH_OS_WIN32 -# define NV_OS_WIN32 1 -#elif defined POSH_OS_XBOX -# define NV_OS_XBOX 1 -#else -# error "Unsupported OS" -#endif - -#ifndef NV_OS_WIN32 -# define NV_OS_WIN32 0 -#endif // NV_OS_WIN32 - -#ifndef NV_OS_WIN64 -# define NV_OS_WIN64 0 -#endif // NV_OS_WIN64 - -#ifndef NV_OS_MINGW -# define NV_OS_MINGW 0 -#endif // NV_OS_MINGW - -#ifndef NV_OS_CYGWIN -# define NV_OS_CYGWIN 0 -#endif // NV_OS_CYGWIN - -#ifndef NV_OS_LINUX -# define NV_OS_LINUX 0 -#endif // NV_OS_LINUX - -#ifndef NV_OS_FREEBSD -# define NV_OS_FREEBSD 0 -#endif // NV_OS_FREEBSD - -#ifndef NV_OS_OPENBSD -# define NV_OS_OPENBSD 0 -#endif // NV_OS_OPENBSD - -#ifndef NV_OS_UNIX -# define NV_OS_UNIX 0 -#endif // NV_OS_UNIX - -#ifndef NV_OS_DARWIN -# define NV_OS_DARWIN 0 -#endif // NV_OS_DARWIN - -#ifndef NV_OS_XBOX -# define NV_OS_XBOX 0 -#endif // NV_OS_XBOX - -#ifndef NV_OS_ORBIS -# define NV_OS_ORBIS 0 -#endif // NV_OS_ORBIS - -#ifndef NV_OS_IOS -# define NV_OS_IOS 0 -#endif // NV_OS_IOS - -// Threading: -// some platforms don't implement __thread or similar for thread-local-storage -#if NV_OS_UNIX || NV_OS_ORBIS || NV_OS_IOS //ACStodoIOS darwin instead of ios? -# define NV_OS_USE_PTHREAD 1 -# if NV_OS_DARWIN || NV_OS_IOS -# define NV_OS_HAS_TLS_QUALIFIER 0 -# else -# define NV_OS_HAS_TLS_QUALIFIER 1 -# endif -#else -# define NV_OS_USE_PTHREAD 0 -# define NV_OS_HAS_TLS_QUALIFIER 1 -#endif - - -// CPUs: - -#define NV_CPU_STRING POSH_CPU_STRING - -#if defined POSH_CPU_X86_64 -//# define NV_CPU_X86 1 -# define NV_CPU_X86_64 1 -#elif defined POSH_CPU_X86 -# define NV_CPU_X86 1 -#elif defined POSH_CPU_PPC -# define NV_CPU_PPC 1 -#elif defined POSH_CPU_STRONGARM -# define NV_CPU_ARM 1 -#elif defined POSH_CPU_AARCH64 -# define NV_CPU_AARCH64 1 -#else -# error "Unsupported CPU" -#endif - -#ifndef NV_CPU_X86 -# define NV_CPU_X86 0 -#endif // NV_CPU_X86 - -#ifndef NV_CPU_X86_64 -# define NV_CPU_X86_64 0 -#endif // NV_CPU_X86_64 - -#ifndef NV_CPU_PPC -# define NV_CPU_PPC 0 -#endif // NV_CPU_PPC - -#ifndef NV_CPU_ARM -# define NV_CPU_ARM 0 -#endif // NV_CPU_ARM - -#ifndef NV_CPU_AARCH64 -# define NV_CPU_AARCH64 0 -#endif // NV_CPU_AARCH64 - -// Compiler: - -#if defined POSH_COMPILER_CLANG -# define NV_CC_CLANG 1 -# define NV_CC_GNUC 1 // Clang is compatible with GCC. -# define NV_CC_STRING "clang" -# pragma clang diagnostic ignored "-Wmissing-braces" -# pragma clang diagnostic ignored "-Wshadow" -# pragma clang diagnostic ignored "-Wunused-local-typedef" -# pragma clang diagnostic ignored "-Wunused-function" -# pragma clang diagnostic ignored "-Wunused-variable" -# pragma clang diagnostic ignored "-Wunused-parameter" -# pragma clang diagnostic ignored "-Wsometimes-uninitialized" -#elif defined POSH_COMPILER_GCC -# define NV_CC_GNUC 1 -# define NV_CC_STRING "gcc" -# pragma GCC diagnostic ignored "-Wshadow" -# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -# pragma GCC diagnostic ignored "-Wunused-function" -# pragma GCC diagnostic ignored "-Wunused-but-set-variable" -# pragma GCC diagnostic ignored "-Wunused-variable" -# pragma GCC diagnostic ignored "-Wunused-parameter" -# pragma GCC diagnostic ignored "-Warray-bounds" -#elif defined POSH_COMPILER_MSVC -# define NV_CC_MSVC 1 -# define NV_CC_STRING "msvc" -#else -# error "Unsupported compiler" -#endif - -#ifndef NV_CC_GNUC -# define NV_CC_GNUC 0 -#endif // NV_CC_GNUC - -#ifndef NV_CC_MSVC -# define NV_CC_MSVC 0 -#endif // NV_CC_MSVC - -#ifndef NV_CC_CLANG -# define NV_CC_CLANG 0 -#endif // NV_CC_CLANG - -#if NV_CC_MSVC -#define NV_CC_CPP11 (__cplusplus > 199711L || _MSC_VER >= 1800) // Visual Studio 2013 has all the features we use, but doesn't advertise full C++11 support yet. -#else -// @@ IC: This works in CLANG, about GCC? -// @@ ES: Doesn't work in gcc. These 3 features are available in GCC >= 4.4. -#ifdef __clang__ -#define NV_CC_CPP11 (__has_feature(cxx_deleted_functions) && __has_feature(cxx_rvalue_references) && __has_feature(cxx_static_assert)) -#elif defined __GNUC__ -#define NV_CC_CPP11 ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -#endif -#endif - -// Endiannes: -#define NV_LITTLE_ENDIAN POSH_LITTLE_ENDIAN -#define NV_BIG_ENDIAN POSH_BIG_ENDIAN -#define NV_ENDIAN_STRING POSH_ENDIAN_STRING - - -// Type definitions: -typedef posh_u8_t uint8; -typedef posh_i8_t int8; - -typedef posh_u16_t uint16; -typedef posh_i16_t int16; - -typedef posh_u32_t uint32; -typedef posh_i32_t int32; - -typedef posh_u64_t uint64; -typedef posh_i64_t int64; - -// Aliases -typedef uint32 uint; - - -// Version string: -#define NV_VERSION_STRING \ - NV_OS_STRING "/" NV_CC_STRING "/" NV_CPU_STRING"/" \ - NV_ENDIAN_STRING"-endian - " __DATE__ "-" __TIME__ - - -// Disable copy constructor and assignment operator. -#if NV_CC_CPP11 -#define NV_FORBID_COPY(C) \ - C( const C & ) = delete; \ - C &operator=( const C & ) = delete -#else -#define NV_FORBID_COPY(C) \ - private: \ - C( const C & ); \ - C &operator=( const C & ) -#endif - -// Disable dynamic allocation on the heap. -// See Prohibiting Heap-Based Objects in More Effective C++. -#define NV_FORBID_HEAPALLOC() \ - private: \ - void *operator new(size_t size); \ - void *operator new[](size_t size) - -// String concatenation macros. -#define NV_STRING_JOIN2(arg1, arg2) NV_DO_STRING_JOIN2(arg1, arg2) -#define NV_DO_STRING_JOIN2(arg1, arg2) arg1 ## arg2 -#define NV_STRING_JOIN3(arg1, arg2, arg3) NV_DO_STRING_JOIN3(arg1, arg2, arg3) -#define NV_DO_STRING_JOIN3(arg1, arg2, arg3) arg1 ## arg2 ## arg3 -#define NV_STRING2(x) #x -#define NV_STRING(x) NV_STRING2(x) - -#if NV_CC_MSVC -#define NV_MULTI_LINE_MACRO_BEGIN do { -#define NV_MULTI_LINE_MACRO_END \ - __pragma(warning(push)) \ - __pragma(warning(disable:4127)) \ - } while(false) \ - __pragma(warning(pop)) -#else -#define NV_MULTI_LINE_MACRO_BEGIN do { -#define NV_MULTI_LINE_MACRO_END } while(false) -#endif - -#if NV_CC_CPP11 -#define nvStaticCheck(x) static_assert((x), "Static assert "#x" failed") -#else -#define nvStaticCheck(x) typedef char NV_STRING_JOIN2(__static_assert_,__LINE__)[(x)] -#endif -#define NV_COMPILER_CHECK(x) nvStaticCheck(x) // I like this name best. - -// Make sure type definitions are fine. -NV_COMPILER_CHECK(sizeof(int8) == 1); -NV_COMPILER_CHECK(sizeof(uint8) == 1); -NV_COMPILER_CHECK(sizeof(int16) == 2); -NV_COMPILER_CHECK(sizeof(uint16) == 2); -NV_COMPILER_CHECK(sizeof(int32) == 4); -NV_COMPILER_CHECK(sizeof(uint32) == 4); -NV_COMPILER_CHECK(sizeof(int32) == 4); -NV_COMPILER_CHECK(sizeof(uint32) == 4); - - -#define NV_ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) - -#if 0 // Disabled in The Witness. -#if NV_CC_MSVC -#define NV_MESSAGE(x) message(__FILE__ "(" NV_STRING(__LINE__) ") : " x) -#else -#define NV_MESSAGE(x) message(x) -#endif -#else -#define NV_MESSAGE(x) -#endif - - -// Startup initialization macro. -#define NV_AT_STARTUP(some_code) \ - namespace { \ - static struct NV_STRING_JOIN2(AtStartup_, __LINE__) { \ - NV_STRING_JOIN2(AtStartup_, __LINE__)() { some_code; } \ - } \ - NV_STRING_JOIN3(AtStartup_, __LINE__, Instance); \ - } - -// Indicate the compiler that the parameter is not used to suppress compier warnings. -#define NV_UNUSED(a) ((a)=(a)) - -// Null index. @@ Move this somewhere else... it's only used by nvmesh. -//const unsigned int NIL = unsigned int(~0); -//#define NIL uint(~0) - -// Null pointer. -#ifndef NULL -#define NULL 0 -#endif - -// Platform includes -#if NV_CC_MSVC -# if NV_OS_WIN32 -# include "defsvcwin32.h" -# elif NV_OS_XBOX -# include "defsvcxbox.h" -# else -# error "MSVC: Platform not supported" -# endif -#elif NV_CC_GNUC -# if NV_OS_LINUX -# include "defsgnuclinux.h" -# elif NV_OS_DARWIN || NV_OS_FREEBSD || NV_OS_OPENBSD -# include "defsgnucdarwin.h" -# elif NV_OS_MINGW -# include "defsgnucwin32.h" -# elif NV_OS_CYGWIN -# error "GCC: Cygwin not supported" -# else -# error "GCC: Platform not supported" -# endif -#endif - -#endif // NV_CORE_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/posh.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/posh.h deleted file mode 100644 index 45d2d9e..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/posh.h +++ /dev/null @@ -1,1030 +0,0 @@ -/** -@file posh.h -@author Brian Hook -@version 1.3.001 - -Header file for POSH, the Portable Open Source Harness project. - -NOTE: Unlike most header files, this one is designed to be included -multiple times, which is why it does not have the @#ifndef/@#define -preamble. - -POSH relies on environment specified preprocessor symbols in order -to infer as much as possible about the target OS/architecture and -the host compiler capabilities. - -NOTE: POSH is simple and focused. It attempts to provide basic -functionality and information, but it does NOT attempt to emulate -missing functionality. I am also not willing to make POSH dirty -and hackish to support truly ancient and/or outmoded and/or bizarre -technologies such as non-ANSI compilers, systems with non-IEEE -floating point formats, segmented 16-bit operating systems, etc. - -Please refer to the accompanying HTML documentation or visit -http://www.poshlib.org for more information on how to use POSH. - -LICENSE: - -Copyright (c) 2004, Brian Hook -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * The names of this package'ss contributors contributors may not - be used to endorse or promote products derived from this - software without specific prior written permission. - - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -REVISION: - -I've been lax about revision histories, so this starts at, um, 1.3.001. -Sorry for any inconveniences. - -1.3.001 - 2/23/2006 - Incorporated fix for bug reported by Bill Cary, - where I was not detecting Visual Studio - compilation on x86-64 systems. Added check for - _M_X64 which should fix that. - -*/ -/* -I have yet to find an authoritative reference on preprocessor -symbols, but so far this is what I've gleaned: - -GNU GCC/G++: - - __GNUC__: GNU C version - - __GNUG__: GNU C++ compiler - - __sun__ : on Sun platforms - - __svr4__: on Solaris and other SysV R4 platforms - - __mips__: on MIPS processor platforms - - __sparc_v9__: on Sparc 64-bit CPUs - - __sparcv9: 64-bit Solaris - - __MIPSEL__: mips processor, compiled for little endian - - __MIPSEB__: mips processor, compiled for big endian - - _R5900: MIPS/Sony/Toshiba R5900 (PS2) - - mc68000: 68K - - m68000: 68K - - m68k: 68K - - __palmos__: PalmOS - -Intel C/C++ Compiler: - - __ECC : compiler version, IA64 only - - __EDG__ - - __ELF__ - - __GXX_ABI_VERSION - - __i386 : IA-32 only - - __i386__ : IA-32 only - - i386 : IA-32 only - - __ia64 : IA-64 only - - __ia64__ : IA-64 only - - ia64 : IA-64 only - - __ICC : IA-32 only - - __INTEL_COMPILER : IA-32 or IA-64, newer versions only - -Apple's C/C++ Compiler for OS X: - - __APPLE_CC__ - - __APPLE__ - - __BIG_ENDIAN__ - - __APPLE__ - - __ppc__ - - __MACH__ - -DJGPP: - - __MSDOS__ - - __unix__ - - __unix - - __GNUC__ - - __GO32 - - DJGPP - - __i386, __i386, i386 - -Cray's C compiler: - - _ADDR64: if 64-bit pointers - - _UNICOS: - - __unix: - -SGI's CC compiler predefines the following (and more) with -ansi: - - __sgi - - __unix - - __host_mips - - _SYSTYPE_SVR4 - - __mips - - _MIPSEB - - anyone know if there is a predefined symbol for the compiler?! - -MinGW: - - as GnuC but also defines _WIN32, __WIN32, WIN32, _X86_, __i386, __i386__, and several others - - __MINGW32__ - -Cygwin: - - as Gnu C, but also - - __unix__ - - __CYGWIN32__ - -Microsoft Visual Studio predefines the following: - - _MSC_VER - - _WIN32: on Win32 - - _M_IX6 (on x86 systems) - - _M_X64: on x86-64 systems - - _M_ALPHA (on DEC AXP systems) - - _SH3: WinCE, Hitachi SH-3 - - _MIPS: WinCE, MIPS - - _ARM: WinCE, ARM - -Sun's C Compiler: - - sun and _sun - - unix and _unix - - sparc and _sparc (SPARC systems only) - - i386 and _i386 (x86 systems only) - - __SVR4 (Solaris only) - - __sparcv9: 64-bit solaris - - __SUNPRO_C - - _LP64: defined in 64-bit LP64 mode, but only if is included - -Borland C/C++ predefines the following: - - __BORLANDC__: - -DEC/Compaq C/C++ on Alpha: - - __alpha - - __arch64__ - - __unix__ (on Tru64 Unix) - - __osf__ - - __DECC - - __DECCXX (C++ compilation) - - __DECC_VER - - __DECCXX_VER - -IBM's AIX compiler: - - __64BIT__ if 64-bit mode - - _AIX - - __IBMC__: C compiler version - - __IBMCPP__: C++ compiler version - - _LONG_LONG: compiler allows long long - -Watcom: - - __WATCOMC__ - - __DOS__ : if targeting DOS - - __386__ : if 32-bit support - - __WIN32__ : if targetin 32-bit Windows - -HP-UX C/C++ Compiler: - - __hpux - - __unix - - __hppa (on PA-RISC) - - __LP64__: if compiled in 64-bit mode - -Metrowerks: - - __MWERKS__ - - __powerpc__ - - _powerc - - __MC68K__ - - macintosh when compiling for MacOS - - __INTEL__ for x86 targets - - __POWERPC__ - -LLVM: - - __llvm__ - - __clang__ -*/ - -/* -** ---------------------------------------------------------------------------- -** Include optionally -** ---------------------------------------------------------------------------- -*/ -#ifdef POSH_USE_LIMITS_H -# include -#endif - -/* -** ---------------------------------------------------------------------------- -** Determine compilation environment -** ---------------------------------------------------------------------------- -*/ -#if defined __ECC || defined __ICC || defined __INTEL_COMPILER -# define POSH_COMPILER_STRING "Intel C/C++" -# define POSH_COMPILER_INTEL 1 -#endif - -#if ( defined __host_mips || defined __sgi ) && !defined __GNUC__ -# define POSH_COMPILER_STRING "MIPSpro C/C++" -# define POSH_COMPILER_MIPSPRO 1 -#endif - -#if defined __hpux && !defined __GNUC__ -# define POSH_COMPILER_STRING "HP-UX CC" -# define POSH_COMPILER_HPCC 1 -#endif - -#if defined __clang__ -# define POSH_COMPILER_STRING "Clang" -# define POSH_COMPILER_CLANG 1 -#endif - -#if defined __GNUC__ && !defined __clang__ -# define POSH_COMPILER_STRING "Gnu GCC" -# define POSH_COMPILER_GCC 1 -#endif - -#if defined __APPLE_CC__ - /* we don't define the compiler string here, let it be GNU */ -# define POSH_COMPILER_APPLECC 1 -#endif - -#if defined __IBMC__ || defined __IBMCPP__ -# define POSH_COMPILER_STRING "IBM C/C++" -# define POSH_COMPILER_IBM 1 -#endif - -#if defined _MSC_VER -# define POSH_COMPILER_STRING "Microsoft Visual C++" -# define POSH_COMPILER_MSVC 1 -#endif - -#if defined __SUNPRO_C -# define POSH_COMPILER_STRING "Sun Pro" -# define POSH_COMPILER_SUN 1 -#endif - -#if defined __BORLANDC__ -# define POSH_COMPILER_STRING "Borland C/C++" -# define POSH_COMPILER_BORLAND 1 -#endif - -#if defined __MWERKS__ -# define POSH_COMPILER_STRING "MetroWerks CodeWarrior" -# define POSH_COMPILER_METROWERKS 1 -#endif - -#if defined __DECC || defined __DECCXX -# define POSH_COMPILER_STRING "Compaq/DEC C/C++" -# define POSH_COMPILER_DEC 1 -#endif - -#if defined __WATCOMC__ -# define POSH_COMPILER_STRING "Watcom C/C++" -# define POSH_COMPILER_WATCOM 1 -#endif - -#if !defined POSH_COMPILER_STRING -# define POSH_COMPILER_STRING "Unknown compiler" -#endif - -/* -** ---------------------------------------------------------------------------- -** Determine target operating system -** ---------------------------------------------------------------------------- -*/ -#if defined linux || defined __linux__ -# define POSH_OS_LINUX 1 -# define POSH_OS_STRING "Linux" -#endif - -#if defined __FreeBSD__ -# define POSH_OS_FREEBSD 1 -# define POSH_OS_STRING "FreeBSD" -#endif - -#if defined __OpenBSD__ -# define POSH_OS_OPENBSD 1 -# define POSH_OS_STRING "OpenBSD" -#endif - -#if defined __CYGWIN32__ -# define POSH_OS_CYGWIN32 1 -# define POSH_OS_STRING "Cygwin" -#endif - -#if defined GEKKO -# define POSH_OS_GAMECUBE -# define __powerpc__ -# define POSH_OS_STRING "GameCube" -#endif - -#if defined __MINGW32__ -# define POSH_OS_MINGW 1 -# define POSH_OS_STRING "MinGW" -#endif - -#if defined GO32 && defined DJGPP && defined __MSDOS__ -# define POSH_OS_GO32 1 -# define POSH_OS_STRING "GO32/MS-DOS" -#endif - -/* NOTE: make sure you use /bt=DOS if compiling for 32-bit DOS, - otherwise Watcom assumes host=target */ -#if defined __WATCOMC__ && defined __386__ && defined __DOS__ -# define POSH_OS_DOS32 1 -# define POSH_OS_STRING "DOS/32-bit" -#endif - -#if defined _UNICOS -# define POSH_OS_UNICOS 1 -# define POSH_OS_STRING "UNICOS" -#endif - -#if ( defined __MWERKS__ && defined __powerc && !defined macintosh ) || defined __APPLE_CC__ || defined macosx -# define POSH_OS_OSX 1 -# define POSH_OS_STRING "MacOS X" -#endif - -#if defined __sun__ || defined sun || defined __sun || defined __solaris__ -# if defined __SVR4 || defined __svr4__ || defined __solaris__ -# define POSH_OS_STRING "Solaris" -# define POSH_OS_SOLARIS 1 -# endif -# if !defined POSH_OS_STRING -# define POSH_OS_STRING "SunOS" -# define POSH_OS_SUNOS 1 -# endif -#endif - -#if defined __sgi__ || defined sgi || defined __sgi -# define POSH_OS_IRIX 1 -# define POSH_OS_STRING "Irix" -#endif - -#if defined __hpux__ || defined __hpux -# define POSH_OS_HPUX 1 -# define POSH_OS_STRING "HP-UX" -#endif - -#if defined _AIX -# define POSH_OS_AIX 1 -# define POSH_OS_STRING "AIX" -#endif - -#if ( defined __alpha && defined __osf__ ) -# define POSH_OS_TRU64 1 -# define POSH_OS_STRING "Tru64" -#endif - -#if defined __BEOS__ || defined __beos__ -# define POSH_OS_BEOS 1 -# define POSH_OS_STRING "BeOS" -#endif - -#if defined amiga || defined amigados || defined AMIGA || defined _AMIGA -# define POSH_OS_AMIGA 1 -# define POSH_OS_STRING "Amiga" -#endif - -#if defined __unix__ -# define POSH_OS_UNIX 1 -# if !defined POSH_OS_STRING -# define POSH_OS_STRING "Unix-like(generic)" -# endif -#endif - -#if defined _WIN32_WCE -# define POSH_OS_WINCE 1 -# define POSH_OS_STRING "Windows CE" -#endif - -#if defined _XBOX || defined _XBOX_VER -# define POSH_OS_XBOX 1 -# define POSH_OS_STRING "XBOX" -#endif - -#if defined _WIN32 || defined WIN32 || defined __NT__ || defined __WIN32__ -# define POSH_OS_WIN32 1 -# if !defined POSH_OS_XBOX -# if defined _WIN64 -# define POSH_OS_WIN64 1 -# if !defined POSH_OS_STRING -# define POSH_OS_STRING "Win64" -# endif // !defined POSH_OS_STRING -# else -# if !defined POSH_OS_STRING -# define POSH_OS_STRING "Win32" -# endif -# endif -# endif -#endif - -#if defined __palmos__ -# define POSH_OS_PALM 1 -# define POSH_OS_STRING "PalmOS" -#endif - -#if defined THINK_C || defined macintosh -# define POSH_OS_MACOS 1 -# define POSH_OS_STRING "MacOS" -#endif - -/* -** ----------------------------------------------------------------------------- -** Determine target CPU -** ----------------------------------------------------------------------------- -*/ - -#if defined GEKKO -# define POSH_CPU_PPC750 1 -# define POSH_CPU_STRING "IBM PowerPC 750 (NGC)" -#endif - -#if defined mc68000 || defined m68k || defined __MC68K__ || defined m68000 -# define POSH_CPU_68K 1 -# define POSH_CPU_STRING "MC68000" -#endif - -#if defined __PPC__ || defined __POWERPC__ || defined powerpc || defined _POWER || defined __ppc__ || defined __powerpc__ || defined _M_PPC -# define POSH_CPU_PPC 1 -# if !defined POSH_CPU_STRING -# if defined __powerpc64__ -# define POSH_CPU_STRING "PowerPC64" -# else -# define POSH_CPU_STRING "PowerPC" -# endif -# endif -#endif - -#if defined _CRAYT3E || defined _CRAYMPP -# define POSH_CPU_CRAYT3E 1 /* target processor is a DEC Alpha 21164 used in a Cray T3E*/ -# define POSH_CPU_STRING "Cray T3E (Alpha 21164)" -#endif - -#if defined CRAY || defined _CRAY && !defined _CRAYT3E -# error Non-AXP Cray systems not supported -#endif - -#if defined _SH3 -# define POSH_CPU_SH3 1 -# define POSH_CPU_STRING "Hitachi SH-3" -#endif - -#if defined __sh4__ || defined __SH4__ -# define POSH_CPU_SH3 1 -# define POSH_CPU_SH4 1 -# define POSH_CPU_STRING "Hitachi SH-4" -#endif - -#if defined __sparc__ || defined __sparc -# if defined __arch64__ || defined __sparcv9 || defined __sparc_v9__ -# define POSH_CPU_SPARC64 1 -# define POSH_CPU_STRING "Sparc/64" -# else -# define POSH_CPU_STRING "Sparc/32" -# endif -# define POSH_CPU_SPARC 1 -#endif - -#if defined ARM || defined __arm__ || defined _ARM -# define POSH_CPU_STRONGARM 1 -# define POSH_CPU_STRING "ARM" -#endif - -#if defined __aarch64__ -# define POSH_CPU_AARCH64 1 -# define POSH_CPU_STRING "ARM64" -#endif - -#if defined mips || defined __mips__ || defined __MIPS__ || defined _MIPS -# define POSH_CPU_MIPS 1 -# if defined _R5900 -# define POSH_CPU_STRING "MIPS R5900 (PS2)" -# else -# define POSH_CPU_STRING "MIPS" -# endif -#endif - -#if defined __ia64 || defined _M_IA64 || defined __ia64__ -# define POSH_CPU_IA64 1 -# define POSH_CPU_STRING "IA64" -#endif - -#if defined __X86__ || defined __i386__ || defined i386 || defined _M_IX86 || defined __386__ || defined __x86_64__ || defined _M_X64 -# define POSH_CPU_X86 1 -# if defined __x86_64__ || defined _M_X64 -# define POSH_CPU_X86_64 1 -# endif -# if defined POSH_CPU_X86_64 -# define POSH_CPU_STRING "AMD x86-64" -# else -# define POSH_CPU_STRING "Intel 386+" -# endif -#endif - -#if defined __alpha || defined alpha || defined _M_ALPHA || defined __alpha__ -# define POSH_CPU_AXP 1 -# define POSH_CPU_STRING "AXP" -#endif - -#if defined __hppa || defined hppa -# define POSH_CPU_HPPA 1 -# define POSH_CPU_STRING "PA-RISC" -#endif - -#if !defined POSH_CPU_STRING -# error POSH cannot determine target CPU -# define POSH_CPU_STRING "Unknown" /* this is here for Doxygen's benefit */ -#endif - -/* -** ----------------------------------------------------------------------------- -** Attempt to autodetect building for embedded on Sony PS2 -** ----------------------------------------------------------------------------- -*/ -#if !defined POSH_OS_STRING -# if !defined FORCE_DOXYGEN -# define POSH_OS_EMBEDDED 1 -# endif -# if defined _R5900 -# define POSH_OS_STRING "Sony PS2(embedded)" -# else -# define POSH_OS_STRING "Embedded/Unknown" -# endif -#endif - -/* -** --------------------------------------------------------------------------- -** Handle cdecl, stdcall, fastcall, etc. -** --------------------------------------------------------------------------- -*/ -#if defined POSH_CPU_X86 && !defined POSH_CPU_X86_64 -# if defined __GNUC__ -# define POSH_CDECL __attribute__((cdecl)) -# define POSH_STDCALL __attribute__((stdcall)) -# define POSH_FASTCALL __attribute__((fastcall)) -# elif ( defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ || defined __MWERKS__ ) -# define POSH_CDECL __cdecl -# define POSH_STDCALL __stdcall -# define POSH_FASTCALL __fastcall -# endif -#else -# define POSH_CDECL -# define POSH_STDCALL -# define POSH_FASTCALL -#endif - -/* -** --------------------------------------------------------------------------- -** Define POSH_IMPORTEXPORT signature based on POSH_DLL and POSH_BUILDING_LIB -** --------------------------------------------------------------------------- -*/ - -/* -** We undefine this so that multiple inclusions will work -*/ -#if defined POSH_IMPORTEXPORT -# undef POSH_IMPORTEXPORT -#endif - -#if defined POSH_DLL -# if defined POSH_OS_WIN32 -# if defined _MSC_VER -# if ( _MSC_VER >= 800 ) -# if defined POSH_BUILDING_LIB -# define POSH_IMPORTEXPORT __declspec( dllexport ) -# else -# define POSH_IMPORTEXPORT __declspec( dllimport ) -# endif -# else -# if defined POSH_BUILDING_LIB -# define POSH_IMPORTEXPORT __export -# else -# define POSH_IMPORTEXPORT -# endif -# endif -# endif /* defined _MSC_VER */ -# if defined __BORLANDC__ -# if ( __BORLANDC__ >= 0x500 ) -# if defined POSH_BUILDING_LIB -# define POSH_IMPORTEXPORT __declspec( dllexport ) -# else -# define POSH_IMPORTEXPORT __declspec( dllimport ) -# endif -# else -# if defined POSH_BUILDING_LIB -# define POSH_IMPORTEXPORT __export -# else -# define POSH_IMPORTEXPORT -# endif -# endif -# endif /* defined __BORLANDC__ */ - /* for all other compilers, we're just making a blanket assumption */ -# if defined __GNUC__ || defined __WATCOMC__ || defined __MWERKS__ -# if defined POSH_BUILDING_LIB -# define POSH_IMPORTEXPORT __declspec( dllexport ) -# else -# define POSH_IMPORTEXPORT __declspec( dllimport ) -# endif -# endif /* all other compilers */ -# if !defined POSH_IMPORTEXPORT -# error Building DLLs not supported on this compiler (poshlib@poshlib.org if you know how) -# endif -# endif /* defined POSH_OS_WIN32 */ -#endif - -/* On pretty much everything else, we can thankfully just ignore this */ -#if !defined POSH_IMPORTEXPORT -# define POSH_IMPORTEXPORT -#endif - -#if defined FORCE_DOXYGEN -# define POSH_DLL -# define POSH_BUILDING_LIB -# undef POSH_DLL -# undef POSH_BUILDING_LIB -#endif - -/* -** ---------------------------------------------------------------------------- -** (Re)define POSH_PUBLIC_API export signature -** ---------------------------------------------------------------------------- -*/ -#ifdef POSH_PUBLIC_API -# undef POSH_PUBLIC_API -#endif - -#if ( ( defined _MSC_VER ) && ( _MSC_VER < 800 ) ) || ( defined __BORLANDC__ && ( __BORLANDC__ < 0x500 ) ) -# define POSH_PUBLIC_API(rtype) extern rtype POSH_IMPORTEXPORT -#else -# define POSH_PUBLIC_API(rtype) extern POSH_IMPORTEXPORT rtype -#endif - -/* -** ---------------------------------------------------------------------------- -** Try to infer endianess. Basically we just go through the CPUs we know are -** little endian, and assume anything that isn't one of those is big endian. -** As a sanity check, we also do this with operating systems we know are -** little endian, such as Windows. Some processors are bi-endian, such as -** the MIPS series, so we have to be careful about those. -** ---------------------------------------------------------------------------- -*/ -#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_CPU_AARCH64 || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__ -# define POSH_ENDIAN_STRING "little" -# define POSH_LITTLE_ENDIAN 1 -#else -# define POSH_ENDIAN_STRING "big" -# define POSH_BIG_ENDIAN 1 -#endif - -#if defined FORCE_DOXYGEN -# define POSH_LITTLE_ENDIAN -#endif - -/* -** ---------------------------------------------------------------------------- -** Cross-platform compile time assertion macro -** ---------------------------------------------------------------------------- -*/ -#define POSH_COMPILE_TIME_ASSERT(name, x) typedef int _POSH_dummy_ ## name[(x) ? 1 : -1 ] - -/* -** ---------------------------------------------------------------------------- -** 64-bit Integer -** -** We don't require 64-bit support, nor do we emulate its functionality, we -** simply export it if it's available. Since we can't count on -** for 64-bit support, we ignore the POSH_USE_LIMITS_H directive. -** ---------------------------------------------------------------------------- -*/ -#if defined ( __LP64__ ) || defined ( __powerpc64__ ) || defined POSH_CPU_SPARC64 -# define POSH_64BIT_INTEGER 1 -typedef long posh_i64_t; -typedef unsigned long posh_u64_t; -# define POSH_I64( x ) ((posh_i64_t)x) -# define POSH_U64( x ) ((posh_u64_t)x) -# define POSH_I64_PRINTF_PREFIX "l" -#elif defined _MSC_VER || defined __BORLANDC__ || defined __WATCOMC__ || ( defined __alpha && defined __DECC ) -# define POSH_64BIT_INTEGER 1 -typedef __int64 posh_i64_t; -typedef unsigned __int64 posh_u64_t; -# define POSH_I64( x ) ((posh_i64_t)(x##i64)) -# define POSH_U64( x ) ((posh_u64_t)(x##ui64)) -# define POSH_I64_PRINTF_PREFIX "I64" -#elif defined __GNUC__ || defined __MWERKS__ || defined __SUNPRO_C || defined __SUNPRO_CC || defined __APPLE_CC__ || defined POSH_OS_IRIX || defined _LONG_LONG || defined _CRAYC -# define POSH_64BIT_INTEGER 1 -typedef long long posh_i64_t; -typedef unsigned long long posh_u64_t; -# define POSH_U64( x ) ((posh_u64_t)(x##LL)) -# define POSH_I64( x ) ((posh_i64_t)(x##LL)) -# define POSH_I64_PRINTF_PREFIX "ll" -#endif - -/* hack */ -/*#ifdef __MINGW32__ -#undef POSH_I64 -#undef POSH_U64 -#undef POSH_I64_PRINTF_PREFIX -#define POSH_I64( x ) ((posh_i64_t)x) -#define POSH_U64( x ) ((posh_u64_t)x) -#define POSH_I64_PRINTF_PREFIX "I64" -#endif*/ - -#ifdef FORCE_DOXYGEN -typedef long long posh_i64_t; -typedef unsigned long posh_u64_t; -# define POSH_64BIT_INTEGER -# define POSH_I64_PRINTF_PREFIX -# define POSH_I64(x) -# define POSH_U64(x) -#endif - -/** Minimum value for a 64-bit signed integer */ -#define POSH_I64_MIN POSH_I64(0x8000000000000000) -/** Maximum value for a 64-bit signed integer */ -#define POSH_I64_MAX POSH_I64(0x7FFFFFFFFFFFFFFF) -/** Minimum value for a 64-bit unsigned integer */ -#define POSH_U64_MIN POSH_U64(0) -/** Maximum value for a 64-bit unsigned integer */ -#define POSH_U64_MAX POSH_U64(0xFFFFFFFFFFFFFFFF) - -/* ---------------------------------------------------------------------------- -** Basic Sized Types -** -** These types are expected to be EXACTLY sized so you can use them for -** serialization. -** ---------------------------------------------------------------------------- -*/ -#define POSH_FALSE 0 -#define POSH_TRUE 1 - -typedef int posh_bool_t; -typedef unsigned char posh_byte_t; - -/* NOTE: These assume that CHAR_BIT is 8!! */ -typedef unsigned char posh_u8_t; -typedef signed char posh_i8_t; - -#if defined POSH_USE_LIMITS_H -# if CHAR_BITS > 8 -# error This machine uses 9-bit characters. This is a warning, you can comment this out now. -# endif /* CHAR_BITS > 8 */ - -/* 16-bit */ -# if ( USHRT_MAX == 65535 ) - typedef unsigned short posh_u16_t; - typedef short posh_i16_t; -# else - /* Yes, in theory there could still be a 16-bit character type and shorts are - 32-bits in size...if you find such an architecture, let me know =P */ -# error No 16-bit type found -# endif - -/* 32-bit */ -# if ( INT_MAX == 2147483647 ) - typedef unsigned posh_u32_t; - typedef int posh_i32_t; -# elif ( LONG_MAX == 2147483647 ) - typedef unsigned long posh_u32_t; - typedef long posh_i32_t; -# else - error No 32-bit type found -# endif - -#else /* POSH_USE_LIMITS_H */ - - typedef unsigned short posh_u16_t; - typedef short posh_i16_t; - -# if !defined POSH_OS_PALM - typedef unsigned posh_u32_t; - typedef int posh_i32_t; -# else - typedef unsigned long posh_u32_t; - typedef long posh_i32_t; -# endif -#endif - -/** Minimum value for a byte */ -#define POSH_BYTE_MIN 0 -/** Maximum value for an 8-bit unsigned value */ -#define POSH_BYTE_MAX 255 -/** Minimum value for a byte */ -#define POSH_I16_MIN ( ( posh_i16_t ) 0x8000 ) -/** Maximum value for a 16-bit signed value */ -#define POSH_I16_MAX ( ( posh_i16_t ) 0x7FFF ) -/** Minimum value for a 16-bit unsigned value */ -#define POSH_U16_MIN 0 -/** Maximum value for a 16-bit unsigned value */ -#define POSH_U16_MAX ( ( posh_u16_t ) 0xFFFF ) -/** Minimum value for a 32-bit signed value */ -#define POSH_I32_MIN ( ( posh_i32_t ) 0x80000000 ) -/** Maximum value for a 32-bit signed value */ -#define POSH_I32_MAX ( ( posh_i32_t ) 0x7FFFFFFF ) -/** Minimum value for a 32-bit unsigned value */ -#define POSH_U32_MIN 0 -/** Maximum value for a 32-bit unsigned value */ -#define POSH_U32_MAX ( ( posh_u32_t ) 0xFFFFFFFF ) - -/* -** ---------------------------------------------------------------------------- -** Sanity checks on expected sizes -** ---------------------------------------------------------------------------- -*/ -#if !defined FORCE_DOXYGEN - -POSH_COMPILE_TIME_ASSERT(posh_byte_t, sizeof(posh_byte_t) == 1); -POSH_COMPILE_TIME_ASSERT(posh_u8_t, sizeof(posh_u8_t) == 1); -POSH_COMPILE_TIME_ASSERT(posh_i8_t, sizeof(posh_i8_t) == 1); -POSH_COMPILE_TIME_ASSERT(posh_u16_t, sizeof(posh_u16_t) == 2); -POSH_COMPILE_TIME_ASSERT(posh_i16_t, sizeof(posh_i16_t) == 2); -POSH_COMPILE_TIME_ASSERT(posh_u32_t, sizeof(posh_u32_t) == 4); -POSH_COMPILE_TIME_ASSERT(posh_i32_t, sizeof(posh_i32_t) == 4); - -#if !defined POSH_NO_FLOAT - POSH_COMPILE_TIME_ASSERT(posh_testfloat_t, sizeof(float)==4 ); - POSH_COMPILE_TIME_ASSERT(posh_testdouble_t, sizeof(double)==8); -#endif - -#if defined POSH_64BIT_INTEGER - POSH_COMPILE_TIME_ASSERT(posh_u64_t, sizeof(posh_u64_t) == 8); - POSH_COMPILE_TIME_ASSERT(posh_i64_t, sizeof(posh_i64_t) == 8); -#endif - -#endif - -/* -** ---------------------------------------------------------------------------- -** 64-bit pointer support -** ---------------------------------------------------------------------------- -*/ -#if defined POSH_CPU_AXP && ( defined POSH_OS_TRU64 || defined POSH_OS_LINUX ) -# define POSH_64BIT_POINTER 1 -#endif - -#if defined POSH_CPU_X86_64 && defined POSH_OS_LINUX -# define POSH_64BIT_POINTER 1 -#endif - -#if defined POSH_CPU_SPARC64 || defined POSH_OS_WIN64 || defined __64BIT__ || defined __LP64 || defined _LP64 || defined __LP64__ || defined _ADDR64 || defined _CRAYC -# define POSH_64BIT_POINTER 1 -#endif - -#if defined POSH_64BIT_POINTER - POSH_COMPILE_TIME_ASSERT( posh_64bit_pointer, sizeof( void * ) == 8 ); -#elif !defined FORCE_DOXYGEN -/* if this assertion is hit then you're on a system that either has 64-bit - addressing and we didn't catch it, or you're on a system with 16-bit - pointers. In the latter case, POSH doesn't actually care, we're just - triggering this assertion to make sure you're aware of the situation, - so feel free to delete it. - - If this assertion is triggered on a known 32 or 64-bit platform, - please let us know (poshlib@poshlib.org) */ - POSH_COMPILE_TIME_ASSERT( posh_32bit_pointer, sizeof( void * ) == 4 ); -#endif - -#if defined FORCE_DOXYGEN -# define POSH_64BIT_POINTER -#endif - -/* -** ---------------------------------------------------------------------------- -** POSH Utility Functions -** -** These are optional POSH utility functions that are not required if you don't -** need anything except static checking of your host and target environment. -** -** These functions are NOT wrapped with POSH_PUBLIC_API because I didn't want -** to enforce their export if your own library is only using them internally. -** ---------------------------------------------------------------------------- -*/ -#ifdef __cplusplus -extern "C" { -#endif - -const char *POSH_GetArchString( void ); - -#if !defined POSH_NO_FLOAT - -posh_u32_t POSH_LittleFloatBits( float f ); -posh_u32_t POSH_BigFloatBits( float f ); -float POSH_FloatFromLittleBits( posh_u32_t bits ); -float POSH_FloatFromBigBits( posh_u32_t bits ); - -void POSH_DoubleBits( double d, posh_byte_t dst[ 8 ] ); -double POSH_DoubleFromBits( const posh_byte_t src[ 8 ] ); - -/* unimplemented -float *POSH_WriteFloatToLittle( void *dst, float f ); -float *POSH_WriteFloatToBig( void *dst, float f ); -float POSH_ReadFloatFromLittle( const void *src ); -float POSH_ReadFloatFromBig( const void *src ); - -double *POSH_WriteDoubleToLittle( void *dst, double d ); -double *POSH_WriteDoubleToBig( void *dst, double d ); -double POSH_ReadDoubleFromLittle( const void *src ); -double POSH_ReadDoubleFromBig( const void *src ); -*/ -#endif /* !defined POSH_NO_FLOAT */ - -#if defined FORCE_DOXYGEN -# define POSH_NO_FLOAT -# undef POSH_NO_FLOAT -#endif - -extern posh_u16_t POSH_SwapU16( posh_u16_t u ); -extern posh_i16_t POSH_SwapI16( posh_i16_t u ); -extern posh_u32_t POSH_SwapU32( posh_u32_t u ); -extern posh_i32_t POSH_SwapI32( posh_i32_t u ); - -#if defined POSH_64BIT_INTEGER - -extern posh_u64_t POSH_SwapU64( posh_u64_t u ); -extern posh_i64_t POSH_SwapI64( posh_i64_t u ); - -#endif /*POSH_64BIT_INTEGER */ - -extern posh_u16_t *POSH_WriteU16ToLittle( void *dst, posh_u16_t value ); -extern posh_i16_t *POSH_WriteI16ToLittle( void *dst, posh_i16_t value ); -extern posh_u32_t *POSH_WriteU32ToLittle( void *dst, posh_u32_t value ); -extern posh_i32_t *POSH_WriteI32ToLittle( void *dst, posh_i32_t value ); - -extern posh_u16_t *POSH_WriteU16ToBig( void *dst, posh_u16_t value ); -extern posh_i16_t *POSH_WriteI16ToBig( void *dst, posh_i16_t value ); -extern posh_u32_t *POSH_WriteU32ToBig( void *dst, posh_u32_t value ); -extern posh_i32_t *POSH_WriteI32ToBig( void *dst, posh_i32_t value ); - -extern posh_u16_t POSH_ReadU16FromLittle( const void *src ); -extern posh_i16_t POSH_ReadI16FromLittle( const void *src ); -extern posh_u32_t POSH_ReadU32FromLittle( const void *src ); -extern posh_i32_t POSH_ReadI32FromLittle( const void *src ); - -extern posh_u16_t POSH_ReadU16FromBig( const void *src ); -extern posh_i16_t POSH_ReadI16FromBig( const void *src ); -extern posh_u32_t POSH_ReadU32FromBig( const void *src ); -extern posh_i32_t POSH_ReadI32FromBig( const void *src ); - -#if defined POSH_64BIT_INTEGER -extern posh_u64_t *POSH_WriteU64ToLittle( void *dst, posh_u64_t value ); -extern posh_i64_t *POSH_WriteI64ToLittle( void *dst, posh_i64_t value ); -extern posh_u64_t *POSH_WriteU64ToBig( void *dst, posh_u64_t value ); -extern posh_i64_t *POSH_WriteI64ToBig( void *dst, posh_i64_t value ); - -extern posh_u64_t POSH_ReadU64FromLittle( const void *src ); -extern posh_i64_t POSH_ReadI64FromLittle( const void *src ); -extern posh_u64_t POSH_ReadU64FromBig( const void *src ); -extern posh_i64_t POSH_ReadI64FromBig( const void *src ); -#endif /* POSH_64BIT_INTEGER */ - -#if defined POSH_LITTLE_ENDIAN - -# define POSH_LittleU16(x) (x) -# define POSH_LittleU32(x) (x) -# define POSH_LittleI16(x) (x) -# define POSH_LittleI32(x) (x) -# if defined POSH_64BIT_INTEGER -# define POSH_LittleU64(x) (x) -# define POSH_LittleI64(x) (x) -# endif /* defined POSH_64BIT_INTEGER */ - -# define POSH_BigU16(x) POSH_SwapU16(x) -# define POSH_BigU32(x) POSH_SwapU32(x) -# define POSH_BigI16(x) POSH_SwapI16(x) -# define POSH_BigI32(x) POSH_SwapI32(x) -# if defined POSH_64BIT_INTEGER -# define POSH_BigU64(x) POSH_SwapU64(x) -# define POSH_BigI64(x) POSH_SwapI64(x) -# endif /* defined POSH_64BIT_INTEGER */ - -#else - -# define POSH_BigU16(x) (x) -# define POSH_BigU32(x) (x) -# define POSH_BigI16(x) (x) -# define POSH_BigI32(x) (x) - -# if defined POSH_64BIT_INTEGER -# define POSH_BigU64(x) (x) -# define POSH_BigI64(x) (x) -# endif /* POSH_64BIT_INTEGER */ - -# define POSH_LittleU16(x) POSH_SwapU16(x) -# define POSH_LittleU32(x) POSH_SwapU32(x) -# define POSH_LittleI16(x) POSH_SwapI16(x) -# define POSH_LittleI32(x) POSH_SwapI32(x) - -# if defined POSH_64BIT_INTEGER -# define POSH_LittleU64(x) POSH_SwapU64(x) -# define POSH_LittleI64(x) POSH_SwapI64(x) -# endif /* POSH_64BIT_INTEGER */ - -#endif - -#ifdef __cplusplus -} -#endif diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/stdstream.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/stdstream.h deleted file mode 100644 index 4f0a10a..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/stdstream.h +++ /dev/null @@ -1,459 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#include "nvcore.h" -#include "stream.h" -#include "array.h" - -#include // fopen -#include // memcpy - -namespace nv -{ - - // Portable version of fopen. - inline FILE * fileOpen(const char * fileName, const char * mode) - { - nvCheck(fileName != NULL); -#if NV_CC_MSVC && _MSC_VER >= 1400 - FILE * fp; - if (fopen_s(&fp, fileName, mode) == 0) { - return fp; - } - return NULL; -#else - return fopen(fileName, mode); -#endif - } - - - /// Base stdio stream. - class NVCORE_CLASS StdStream : public Stream - { - NV_FORBID_COPY(StdStream); - public: - - /// Ctor. - StdStream( FILE * fp, bool autoclose ) : m_fp(fp), m_autoclose(autoclose) { } - - /// Dtor. - virtual ~StdStream() - { - if( m_fp != NULL && m_autoclose ) { -#if NV_OS_WIN32 - _fclose_nolock( m_fp ); -#else - fclose( m_fp ); -#endif - } - } - - - /** @name Stream implementation. */ - //@{ - virtual void seek( uint pos ) - { - nvDebugCheck(m_fp != NULL); - nvDebugCheck(pos <= size()); -#if NV_OS_WIN32 - _fseek_nolock(m_fp, pos, SEEK_SET); -#else - fseek(m_fp, pos, SEEK_SET); -#endif - } - - virtual uint tell() const - { - nvDebugCheck(m_fp != NULL); -#if NV_OS_WIN32 - return _ftell_nolock(m_fp); -#else - return (uint)ftell(m_fp); -#endif - } - - virtual uint size() const - { - nvDebugCheck(m_fp != NULL); -#if NV_OS_WIN32 - uint pos = _ftell_nolock(m_fp); - _fseek_nolock(m_fp, 0, SEEK_END); - uint end = _ftell_nolock(m_fp); - _fseek_nolock(m_fp, pos, SEEK_SET); -#else - uint pos = (uint)ftell(m_fp); - fseek(m_fp, 0, SEEK_END); - uint end = (uint)ftell(m_fp); - fseek(m_fp, pos, SEEK_SET); -#endif - return end; - } - - virtual bool isError() const - { - return m_fp == NULL || ferror( m_fp ) != 0; - } - - virtual void clearError() - { - nvDebugCheck(m_fp != NULL); - clearerr(m_fp); - } - - // @@ The original implementation uses feof, which only returns true when we attempt to read *past* the end of the stream. - // That is, if we read the last byte of a file, then isAtEnd would still return false, even though the stream pointer is at the file end. This is not the intent and was inconsistent with the implementation of the MemoryStream, a better - // implementation uses use ftell and fseek to determine our location within the file. - virtual bool isAtEnd() const - { - if (m_fp == NULL) return true; - //nvDebugCheck(m_fp != NULL); - //return feof( m_fp ) != 0; -#if NV_OS_WIN32 - uint pos = _ftell_nolock(m_fp); - _fseek_nolock(m_fp, 0, SEEK_END); - uint end = _ftell_nolock(m_fp); - _fseek_nolock(m_fp, pos, SEEK_SET); -#else - uint pos = (uint)ftell(m_fp); - fseek(m_fp, 0, SEEK_END); - uint end = (uint)ftell(m_fp); - fseek(m_fp, pos, SEEK_SET); -#endif - return pos == end; - } - - /// Always true. - virtual bool isSeekable() const { return true; } - //@} - - protected: - - FILE * m_fp; - bool m_autoclose; - - }; - - - /// Standard output stream. - class NVCORE_CLASS StdOutputStream : public StdStream - { - NV_FORBID_COPY(StdOutputStream); - public: - - /// Construct stream by file name. - StdOutputStream( const char * name ) : StdStream(fileOpen(name, "wb"), /*autoclose=*/true) { } - - /// Construct stream by file handle. - StdOutputStream( FILE * fp, bool autoclose ) : StdStream(fp, autoclose) - { - } - - /** @name Stream implementation. */ - //@{ - /// Write data. - virtual uint serialize( void * data, uint len ) - { - nvDebugCheck(data != NULL); - nvDebugCheck(m_fp != NULL); -#if NV_OS_WIN32 - return (uint)_fwrite_nolock(data, 1, len, m_fp); -#elif NV_OS_LINUX - return (uint)fwrite_unlocked(data, 1, len, m_fp); -#elif NV_OS_DARWIN - // @@ No error checking, always returns len. - for (uint i = 0; i < len; i++) { - putc_unlocked(((char *)data)[i], m_fp); - } - return len; -#else - return (uint)fwrite(data, 1, len, m_fp); -#endif - } - - virtual bool isLoading() const - { - return false; - } - - virtual bool isSaving() const - { - return true; - } - //@} - - }; - - - /// Standard input stream. - class NVCORE_CLASS StdInputStream : public StdStream - { - NV_FORBID_COPY(StdInputStream); - public: - - /// Construct stream by file name. - StdInputStream( const char * name ) : StdStream(fileOpen(name, "rb"), /*autoclose=*/true) { } - - /// Construct stream by file handle. - StdInputStream( FILE * fp, bool autoclose=true ) : StdStream(fp, autoclose) - { - } - - /** @name Stream implementation. */ - //@{ - /// Read data. - virtual uint serialize( void * data, uint len ) - { - nvDebugCheck(data != NULL); - nvDebugCheck(m_fp != NULL); -#if NV_OS_WIN32 - return (uint)_fread_nolock(data, 1, len, m_fp); -#elif NV_OS_LINUX - return (uint)fread_unlocked(data, 1, len, m_fp); -#elif NV_OS_DARWIN - // @@ No error checking, always returns len. - for (uint i = 0; i < len; i++) { - ((char *)data)[i] = getc_unlocked(m_fp); - } - return len; -#else - return (uint)fread(data, 1, len, m_fp); -#endif - - } - - virtual bool isLoading() const - { - return true; - } - - virtual bool isSaving() const - { - return false; - } - //@} - }; - - - - /// Memory input stream. - class NVCORE_CLASS MemoryInputStream : public Stream - { - NV_FORBID_COPY(MemoryInputStream); - public: - - /// Ctor. - MemoryInputStream( const uint8 * mem, uint size ) : m_mem(mem), m_ptr(mem), m_size(size) { } - - /** @name Stream implementation. */ - //@{ - /// Read data. - virtual uint serialize( void * data, uint len ) - { - nvDebugCheck(data != NULL); - nvDebugCheck(!isError()); - - uint left = m_size - tell(); - if (len > left) len = left; - - memcpy( data, m_ptr, len ); - m_ptr += len; - - return len; - } - - virtual void seek( uint pos ) - { - nvDebugCheck(!isError()); - m_ptr = m_mem + pos; - nvDebugCheck(!isError()); - } - - virtual uint tell() const - { - nvDebugCheck(m_ptr >= m_mem); - return uint(m_ptr - m_mem); - } - - virtual uint size() const - { - return m_size; - } - - virtual bool isError() const - { - return m_mem == NULL || m_ptr > m_mem + m_size || m_ptr < m_mem; - } - - virtual void clearError() - { - // Nothing to do. - } - - virtual bool isAtEnd() const - { - return m_ptr == m_mem + m_size; - } - - /// Always true. - virtual bool isSeekable() const - { - return true; - } - - virtual bool isLoading() const - { - return true; - } - - virtual bool isSaving() const - { - return false; - } - //@} - - const uint8 * ptr() const { return m_ptr; } - - - private: - - const uint8 * m_mem; - const uint8 * m_ptr; - uint m_size; - - }; - - - /// Buffer output stream. - class NVCORE_CLASS BufferOutputStream : public Stream - { - NV_FORBID_COPY(BufferOutputStream); - public: - - BufferOutputStream(Array & buffer) : m_buffer(buffer) { } - - virtual uint serialize( void * data, uint len ) - { - nvDebugCheck(data != NULL); - m_buffer.append((uint8 *)data, len); - return len; - } - - virtual void seek( uint /*pos*/ ) { /*Not implemented*/ } - virtual uint tell() const { return m_buffer.size(); } - virtual uint size() const { return m_buffer.size(); } - - virtual bool isError() const { return false; } - virtual void clearError() {} - - virtual bool isAtEnd() const { return true; } - virtual bool isSeekable() const { return false; } - virtual bool isLoading() const { return false; } - virtual bool isSaving() const { return true; } - - private: - Array & m_buffer; - }; - - - /// Protected input stream. - class NVCORE_CLASS ProtectedStream : public Stream - { - NV_FORBID_COPY(ProtectedStream); - public: - - /// Ctor. - ProtectedStream( Stream & s ) : m_s(&s), m_autodelete(false) - { - } - - /// Ctor. - ProtectedStream( Stream * s, bool autodelete = true ) : - m_s(s), m_autodelete(autodelete) - { - nvDebugCheck(m_s != NULL); - } - - /// Dtor. - virtual ~ProtectedStream() - { - if( m_autodelete ) { - delete m_s; - } - } - - /** @name Stream implementation. */ - //@{ - /// Read data. - virtual uint serialize( void * data, uint len ) - { - nvDebugCheck(data != NULL); - len = m_s->serialize( data, len ); - - if( m_s->isError() ) { - throw; - } - - return len; - } - - virtual void seek( uint pos ) - { - m_s->seek( pos ); - - if( m_s->isError() ) { - throw; - } - } - - virtual uint tell() const - { - return m_s->tell(); - } - - virtual uint size() const - { - return m_s->size(); - } - - virtual bool isError() const - { - return m_s->isError(); - } - - virtual void clearError() - { - m_s->clearError(); - } - - virtual bool isAtEnd() const - { - return m_s->isAtEnd(); - } - - virtual bool isSeekable() const - { - return m_s->isSeekable(); - } - - virtual bool isLoading() const - { - return m_s->isLoading(); - } - - virtual bool isSaving() const - { - return m_s->isSaving(); - } - //@} - - - private: - - Stream * const m_s; - bool const m_autodelete; - - }; - -} // nv namespace - - -//#endif // NV_CORE_STDSTREAM_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/stream.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/stream.h deleted file mode 100644 index 9252d9e..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/stream.h +++ /dev/null @@ -1,163 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_CORE_STREAM_H -#define NV_CORE_STREAM_H - -#include "nvcore.h" -#include "debug.h" - -namespace nv -{ - - /// Base stream class. - class NVCORE_CLASS Stream { - public: - - enum ByteOrder { - LittleEndian = false, - BigEndian = true, - }; - - /// Get the byte order of the system. - static ByteOrder getSystemByteOrder() { -#if NV_LITTLE_ENDIAN - return LittleEndian; -#else - return BigEndian; -#endif - } - - - /// Ctor. - Stream() : m_byteOrder(LittleEndian) { } - - /// Virtual destructor. - virtual ~Stream() {} - - /// Set byte order. - void setByteOrder(ByteOrder bo) { m_byteOrder = bo; } - - /// Get byte order. - ByteOrder byteOrder() const { return m_byteOrder; } - - - /// Serialize the given data. - virtual uint serialize( void * data, uint len ) = 0; - - /// Move to the given position in the archive. - virtual void seek( uint pos ) = 0; - - /// Return the current position in the archive. - virtual uint tell() const = 0; - - /// Return the current size of the archive. - virtual uint size() const = 0; - - /// Determine if there has been any error. - virtual bool isError() const = 0; - - /// Clear errors. - virtual void clearError() = 0; - - /// Return true if the stream is at the end. - virtual bool isAtEnd() const = 0; - - /// Return true if the stream is seekable. - virtual bool isSeekable() const = 0; - - /// Return true if this is an input stream. - virtual bool isLoading() const = 0; - - /// Return true if this is an output stream. - virtual bool isSaving() const = 0; - - - void advance(uint offset) { seek(tell() + offset); } - - - // friends - friend Stream & operator<<( Stream & s, bool & c ) { -#if NV_OS_DARWIN && !NV_CC_CPP11 - nvStaticCheck(sizeof(bool) == 4); - uint8 b = c ? 1 : 0; - s.serialize( &b, 1 ); - c = (b == 1); -#else - nvStaticCheck(sizeof(bool) == 1); - s.serialize( &c, 1 ); -#endif - return s; - } - friend Stream & operator<<( Stream & s, char & c ) { - nvStaticCheck(sizeof(char) == 1); - s.serialize( &c, 1 ); - return s; - } - friend Stream & operator<<( Stream & s, uint8 & c ) { - nvStaticCheck(sizeof(uint8) == 1); - s.serialize( &c, 1 ); - return s; - } - friend Stream & operator<<( Stream & s, int8 & c ) { - nvStaticCheck(sizeof(int8) == 1); - s.serialize( &c, 1 ); - return s; - } - friend Stream & operator<<( Stream & s, uint16 & c ) { - nvStaticCheck(sizeof(uint16) == 2); - return s.byteOrderSerialize( &c, 2 ); - } - friend Stream & operator<<( Stream & s, int16 & c ) { - nvStaticCheck(sizeof(int16) == 2); - return s.byteOrderSerialize( &c, 2 ); - } - friend Stream & operator<<( Stream & s, uint32 & c ) { - nvStaticCheck(sizeof(uint32) == 4); - return s.byteOrderSerialize( &c, 4 ); - } - friend Stream & operator<<( Stream & s, int32 & c ) { - nvStaticCheck(sizeof(int32) == 4); - return s.byteOrderSerialize( &c, 4 ); - } - friend Stream & operator<<( Stream & s, uint64 & c ) { - nvStaticCheck(sizeof(uint64) == 8); - return s.byteOrderSerialize( &c, 8 ); - } - friend Stream & operator<<( Stream & s, int64 & c ) { - nvStaticCheck(sizeof(int64) == 8); - return s.byteOrderSerialize( &c, 8 ); - } - friend Stream & operator<<( Stream & s, float & c ) { - nvStaticCheck(sizeof(float) == 4); - return s.byteOrderSerialize( &c, 4 ); - } - friend Stream & operator<<( Stream & s, double & c ) { - nvStaticCheck(sizeof(double) == 8); - return s.byteOrderSerialize( &c, 8 ); - } - - protected: - - /// Serialize in the stream byte order. - Stream & byteOrderSerialize( void * v, uint len ) { - if( m_byteOrder == getSystemByteOrder() ) { - serialize( v, len ); - } - else { - for( uint i = len; i > 0; i-- ) { - serialize( (uint8 *)v + i - 1, 1 ); - } - } - return *this; - } - - - private: - - ByteOrder m_byteOrder; - - }; - -} // nv namespace - -#endif // NV_CORE_STREAM_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/strlib.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/strlib.h deleted file mode 100644 index 80a957c..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/strlib.h +++ /dev/null @@ -1,429 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_CORE_STRING_H -#define NV_CORE_STRING_H - -#include "debug.h" -#include "hash.h" // hash - -//#include // strlen, etc. - -#if NV_OS_WIN32 -#define NV_PATH_SEPARATOR '\\' -#else -#define NV_PATH_SEPARATOR '/' -#endif - -namespace nv -{ - - NVCORE_API uint strHash(const char * str, uint h) NV_PURE; - - /// String hash based on Bernstein's hash. - inline uint strHash(const char * data, uint h = 5381) - { - uint i = 0; - while(data[i] != 0) { - h = (33 * h) ^ uint(data[i]); - i++; - } - return h; - } - - template <> struct Hash { - uint operator()(const char * str) const { return strHash(str); } - }; - - NVCORE_API uint strLen(const char * str) NV_PURE; // Asserts on NULL strings. - - NVCORE_API int strDiff(const char * s1, const char * s2) NV_PURE; // Asserts on NULL strings. - NVCORE_API int strCaseDiff(const char * s1, const char * s2) NV_PURE; // Asserts on NULL strings. - NVCORE_API bool strEqual(const char * s1, const char * s2) NV_PURE; // Accepts NULL strings. - NVCORE_API bool strCaseEqual(const char * s1, const char * s2) NV_PURE; // Accepts NULL strings. - - template <> struct Equal { - bool operator()(const char * a, const char * b) const { return strEqual(a, b); } - }; - - NVCORE_API bool strBeginsWith(const char * dst, const char * prefix) NV_PURE; - NVCORE_API bool strEndsWith(const char * dst, const char * suffix) NV_PURE; - - - NVCORE_API void strCpy(char * dst, uint size, const char * src); - NVCORE_API void strCpy(char * dst, uint size, const char * src, uint len); - NVCORE_API void strCat(char * dst, uint size, const char * src); - - NVCORE_API const char * strSkipWhiteSpace(const char * str); - NVCORE_API char * strSkipWhiteSpace(char * str); - - NVCORE_API bool strMatch(const char * str, const char * pat) NV_PURE; - - NVCORE_API bool isNumber(const char * str) NV_PURE; - - /* @@ Implement these two functions and modify StringBuilder to use them? - NVCORE_API void strFormat(const char * dst, const char * fmt, ...); - NVCORE_API void strFormatList(const char * dst, const char * fmt, va_list arg); - - template void strFormatSafe(char (&buffer)[count], const char *fmt, ...) __attribute__((format (printf, 2, 3))); - template void strFormatSafe(char (&buffer)[count], const char *fmt, ...) { - va_list args; - va_start(args, fmt); - strFormatList(buffer, count, fmt, args); - va_end(args); - } - template void strFormatListSafe(char (&buffer)[count], const char *fmt, va_list arg) { - va_list tmp; - va_copy(tmp, args); - strFormatList(buffer, count, fmt, tmp); - va_end(tmp); - }*/ - - template void strCpySafe(char (&buffer)[count], const char *src) { - strCpy(buffer, count, src); - } - - template void strCatSafe(char (&buffer)[count], const char * src) { - strCat(buffer, count, src); - } - - - - /// String builder. - class NVCORE_CLASS StringBuilder - { - public: - - StringBuilder(); - explicit StringBuilder( uint size_hint ); - StringBuilder(const char * str); - StringBuilder(const char * str, uint len); - StringBuilder(const StringBuilder & other); - - ~StringBuilder(); - - StringBuilder & format( const char * format, ... ) __attribute__((format (printf, 2, 3))); - StringBuilder & formatList( const char * format, va_list arg ); - - StringBuilder & append(const char * str); - StringBuilder & append(const char * str, uint len); - StringBuilder & appendFormat(const char * format, ...) __attribute__((format (printf, 2, 3))); - StringBuilder & appendFormatList(const char * format, va_list arg); - - StringBuilder & appendSpace(uint n); - - StringBuilder & number( int i, int base = 10 ); - StringBuilder & number( uint i, int base = 10 ); - - StringBuilder & reserve(uint size_hint); - StringBuilder & copy(const char * str); - StringBuilder & copy(const char * str, uint len); - StringBuilder & copy(const StringBuilder & str); - - StringBuilder & toLower(); - StringBuilder & toUpper(); - - bool endsWith(const char * str) const; - bool beginsWith(const char * str) const; - - char * reverseFind(char c); - - void reset(); - bool isNull() const { return m_size == 0; } - - // const char * accessors - //operator const char * () const { return m_str; } - //operator char * () { return m_str; } - const char * str() const { return m_str; } - char * str() { return m_str; } - - char * release(); - - /// Implement value semantics. - StringBuilder & operator=( const StringBuilder & s ) { - return copy(s); - } - - /// Implement value semantics. - StringBuilder & operator=( const char * s ) { - return copy(s); - } - - /// Equal operator. - bool operator==( const StringBuilder & s ) const { - return strMatch(s.m_str, m_str); - } - - /// Return the exact length. - uint length() const { return isNull() ? 0 : strLen(m_str); } - - /// Return the size of the string container. - uint capacity() const { return m_size; } - - /// Return the hash of the string. - uint hash() const { return isNull() ? 0 : strHash(m_str); } - - // Swap strings. - friend void swap(StringBuilder & a, StringBuilder & b); - - protected: - - /// Size of the string container. - uint m_size; - - /// String. - char * m_str; - - }; - - - /// Path string. @@ This should be called PathBuilder. - class NVCORE_CLASS Path : public StringBuilder - { - public: - Path() : StringBuilder() {} - explicit Path(int size_hint) : StringBuilder(size_hint) {} - Path(const char * str) : StringBuilder(str) {} - Path(const Path & path) : StringBuilder(path) {} - - const char * fileName() const; - const char * extension() const; - - void translatePath(char pathSeparator = NV_PATH_SEPARATOR); - - void appendSeparator(char pathSeparator = NV_PATH_SEPARATOR); - - void stripFileName(); - void stripExtension(); - - // statics - NVCORE_API static char separator(); - NVCORE_API static const char * fileName(const char *); - NVCORE_API static const char * extension(const char *); - - NVCORE_API static void translatePath(char * path, char pathSeparator = NV_PATH_SEPARATOR); - }; - - - /// String class. - class NVCORE_CLASS String - { - public: - - /// Constructs a null string. @sa isNull() - String() - { - data = NULL; - } - - /// Constructs a shared copy of str. - String(const String & str) - { - data = str.data; - if (data != NULL) addRef(); - } - - /// Constructs a shared string from a standard string. - String(const char * str) - { - setString(str); - } - - /// Constructs a shared string from a standard string. - String(const char * str, int length) - { - setString(str, length); - } - - /// Constructs a shared string from a StringBuilder. - String(const StringBuilder & str) - { - setString(str); - } - - /// Dtor. - ~String() - { - release(); - } - - String clone() const; - - /// Release the current string and allocate a new one. - const String & operator=( const char * str ) - { - release(); - setString( str ); - return *this; - } - - /// Release the current string and allocate a new one. - const String & operator=( const StringBuilder & str ) - { - release(); - setString( str ); - return *this; - } - - /// Implement value semantics. - String & operator=( const String & str ) - { - if (str.data != data) - { - release(); - data = str.data; - addRef(); - } - return *this; - } - - /// Equal operator. - bool operator==( const String & str ) const - { - return strMatch(str.data, data); - } - - /// Equal operator. - bool operator==( const char * str ) const - { - return strMatch(str, data); - } - - /// Not equal operator. - bool operator!=( const String & str ) const - { - return !strMatch(str.data, data); - } - - /// Not equal operator. - bool operator!=( const char * str ) const - { - return !strMatch(str, data); - } - - /// Returns true if this string is the null string. - bool isNull() const { return data == NULL; } - - /// Return the exact length. - uint length() const { nvDebugCheck(data != NULL); return strLen(data); } - - /// Return the hash of the string. - uint hash() const { nvDebugCheck(data != NULL); return strHash(data); } - - /// const char * cast operator. - operator const char * () const { return data; } - - /// Get string pointer. - const char * str() const { return data; } - - - private: - - // Add reference count. - void addRef(); - - // Decrease reference count. - void release(); - - uint16 getRefCount() const - { - nvDebugCheck(data != NULL); - return *reinterpret_cast(data - 2); - } - - void setRefCount(uint16 count) { - nvDebugCheck(data != NULL); - nvCheck(count < 0xFFFF); - *reinterpret_cast(const_cast(data - 2)) = uint16(count); - } - - void setData(const char * str) { - data = str + 2; - } - - void allocString(const char * str) - { - allocString(str, strLen(str)); - } - - void allocString(const char * str, uint length); - - void setString(const char * str); - void setString(const char * str, uint length); - void setString(const StringBuilder & str); - - // Swap strings. - friend void swap(String & a, String & b); - - private: - - const char * data; - - }; - - template <> struct Hash { - uint operator()(const String & str) const { return str.hash(); } - }; - - - // Like AutoPtr, but for const char strings. - class AutoString - { - NV_FORBID_COPY(AutoString); - NV_FORBID_HEAPALLOC(); - public: - - // Ctor. - AutoString(const char * p = NULL) : m_ptr(p) { } - -#if NV_CC_CPP11 - // Move ctor. - AutoString(AutoString && ap) : m_ptr(ap.m_ptr) { ap.m_ptr = NULL; } -#endif - - // Dtor. Deletes owned pointer. - ~AutoString() { - delete [] m_ptr; - m_ptr = NULL; - } - - // Delete owned pointer and assign new one. - void operator=(const char * p) { - if (p != m_ptr) - { - delete [] m_ptr; - m_ptr = p; - } - } - - // Get pointer. - const char * ptr() const { return m_ptr; } - operator const char *() const { return m_ptr; } - - // Relinquish ownership of the underlying pointer and returns that pointer. - const char * release() { - const char * tmp = m_ptr; - m_ptr = NULL; - return tmp; - } - - // comparison operators. - friend bool operator == (const AutoString & ap, const char * const p) { - return (ap.ptr() == p); - } - friend bool operator != (const AutoString & ap, const char * const p) { - return (ap.ptr() != p); - } - friend bool operator == (const char * const p, const AutoString & ap) { - return (ap.ptr() == p); - } - friend bool operator != (const char * const p, const AutoString & ap) { - return (ap.ptr() != p); - } - - private: - const char * m_ptr; - }; - -} // nv namespace - -#endif // NV_CORE_STRING_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/utils.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/utils.h deleted file mode 100644 index 364b629..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/utils.h +++ /dev/null @@ -1,281 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_CORE_UTILS_H -#define NV_CORE_UTILS_H - -#include "debug.h" // nvdebugcheck - -#include // for placement new - - -// Just in case. Grrr. -#undef min -#undef max - -#define NV_INT8_MIN (-128) -#define NV_INT8_MAX 127 -#define NV_UINT8_MAX 255 -#define NV_INT16_MIN (-32767-1) -#define NV_INT16_MAX 32767 -#define NV_UINT16_MAX 0xffff -#define NV_INT32_MIN (-2147483647-1) -#define NV_INT32_MAX 2147483647 -#define NV_UINT32_MAX 0xffffffff -#define NV_INT64_MAX POSH_I64(9223372036854775807) -#define NV_INT64_MIN (-POSH_I64(9223372036854775807)-1) -#define NV_UINT64_MAX POSH_U64(0xffffffffffffffff) - -#define NV_HALF_MAX 65504.0F -#define NV_FLOAT_MAX 3.402823466e+38F - -#define NV_INTEGER_TO_FLOAT_MAX 16777217 // Largest integer such that it and all smaller integers can be stored in a 32bit float. - - -namespace nv -{ - // Less error prone than casting. From CB: - // http://cbloomrants.blogspot.com/2011/06/06-17-11-c-casting-is-devil.html - - // These intentionally look like casts. - - // uint32 casts: - template inline uint32 U32(T x) { return x; } - template <> inline uint32 U32(uint64 x) { nvDebugCheck(x <= NV_UINT32_MAX); return (uint32)x; } - template <> inline uint32 U32(int64 x) { nvDebugCheck(x >= 0 && x <= NV_UINT32_MAX); return (uint32)x; } - //template <> inline uint32 U32(uint32 x) { return x; } - template <> inline uint32 U32(int32 x) { nvDebugCheck(x >= 0); return (uint32)x; } - //template <> inline uint32 U32(uint16 x) { return x; } - template <> inline uint32 U32(int16 x) { nvDebugCheck(x >= 0); return (uint32)x; } - //template <> inline uint32 U32(uint8 x) { return x; } - template <> inline uint32 U32(int8 x) { nvDebugCheck(x >= 0); return (uint32)x; } - - // int32 casts: - template inline int32 I32(T x) { return x; } - template <> inline int32 I32(uint64 x) { nvDebugCheck(x <= NV_INT32_MAX); return (int32)x; } - template <> inline int32 I32(int64 x) { nvDebugCheck(x >= NV_INT32_MIN && x <= NV_UINT32_MAX); return (int32)x; } - template <> inline int32 I32(uint32 x) { nvDebugCheck(x <= NV_INT32_MAX); return (int32)x; } - //template <> inline int32 I32(int32 x) { return x; } - //template <> inline int32 I32(uint16 x) { return x; } - //template <> inline int32 I32(int16 x) { return x; } - //template <> inline int32 I32(uint8 x) { return x; } - //template <> inline int32 I32(int8 x) { return x; } - - // uint16 casts: - template inline uint16 U16(T x) { return x; } - template <> inline uint16 U16(uint64 x) { nvDebugCheck(x <= NV_UINT16_MAX); return (uint16)x; } - template <> inline uint16 U16(int64 x) { nvDebugCheck(x >= 0 && x <= NV_UINT16_MAX); return (uint16)x; } - template <> inline uint16 U16(uint32 x) { nvDebugCheck(x <= NV_UINT16_MAX); return (uint16)x; } - template <> inline uint16 U16(int32 x) { nvDebugCheck(x >= 0 && x <= NV_UINT16_MAX); return (uint16)x; } - //template <> inline uint16 U16(uint16 x) { return x; } - template <> inline uint16 U16(int16 x) { nvDebugCheck(x >= 0); return (uint16)x; } - //template <> inline uint16 U16(uint8 x) { return x; } - template <> inline uint16 U16(int8 x) { nvDebugCheck(x >= 0); return (uint16)x; } - - // int16 casts: - template inline int16 I16(T x) { return x; } - template <> inline int16 I16(uint64 x) { nvDebugCheck(x <= NV_INT16_MAX); return (int16)x; } - template <> inline int16 I16(int64 x) { nvDebugCheck(x >= NV_INT16_MIN && x <= NV_UINT16_MAX); return (int16)x; } - template <> inline int16 I16(uint32 x) { nvDebugCheck(x <= NV_INT16_MAX); return (int16)x; } - template <> inline int16 I16(int32 x) { nvDebugCheck(x >= NV_INT16_MIN && x <= NV_UINT16_MAX); return (int16)x; } - template <> inline int16 I16(uint16 x) { nvDebugCheck(x <= NV_INT16_MAX); return (int16)x; } - //template <> inline int16 I16(int16 x) { return x; } - //template <> inline int16 I16(uint8 x) { return x; } - //template <> inline int16 I16(int8 x) { return x; } - - // uint8 casts: - template inline uint8 U8(T x) { return x; } - template <> inline uint8 U8(uint64 x) { nvDebugCheck(x <= NV_UINT8_MAX); return (uint8)x; } - template <> inline uint8 U8(int64 x) { nvDebugCheck(x >= 0 && x <= NV_UINT8_MAX); return (uint8)x; } - template <> inline uint8 U8(uint32 x) { nvDebugCheck(x <= NV_UINT8_MAX); return (uint8)x; } - template <> inline uint8 U8(int32 x) { nvDebugCheck(x >= 0 && x <= NV_UINT8_MAX); return (uint8)x; } - template <> inline uint8 U8(uint16 x) { nvDebugCheck(x <= NV_UINT8_MAX); return (uint8)x; } - template <> inline uint8 U8(int16 x) { nvDebugCheck(x >= 0 && x <= NV_UINT8_MAX); return (uint8)x; } - //template <> inline uint8 U8(uint8 x) { return x; } - template <> inline uint8 U8(int8 x) { nvDebugCheck(x >= 0); return (uint8)x; } - //template <> inline uint8 U8(int8 x) { nvDebugCheck(x >= 0.0f && x <= 255.0f); return (uint8)x; } - - // int8 casts: - template inline int8 I8(T x) { return x; } - template <> inline int8 I8(uint64 x) { nvDebugCheck(x <= NV_INT8_MAX); return (int8)x; } - template <> inline int8 I8(int64 x) { nvDebugCheck(x >= NV_INT8_MIN && x <= NV_UINT8_MAX); return (int8)x; } - template <> inline int8 I8(uint32 x) { nvDebugCheck(x <= NV_INT8_MAX); return (int8)x; } - template <> inline int8 I8(int32 x) { nvDebugCheck(x >= NV_INT8_MIN && x <= NV_UINT8_MAX); return (int8)x; } - template <> inline int8 I8(uint16 x) { nvDebugCheck(x <= NV_INT8_MAX); return (int8)x; } - template <> inline int8 I8(int16 x) { nvDebugCheck(x >= NV_INT8_MIN && x <= NV_UINT8_MAX); return (int8)x; } - template <> inline int8 I8(uint8 x) { nvDebugCheck(x <= NV_INT8_MAX); return (int8)x; } - //template <> inline int8 I8(int8 x) { return x; } - - // float casts: - template inline float F32(T x) { return x; } - template <> inline float F32(uint64 x) { nvDebugCheck(x <= NV_INTEGER_TO_FLOAT_MAX); return (float)x; } - template <> inline float F32(int64 x) { nvDebugCheck(x >= -NV_INTEGER_TO_FLOAT_MAX && x <= NV_INTEGER_TO_FLOAT_MAX); return (float)x; } - template <> inline float F32(uint32 x) { nvDebugCheck(x <= NV_INTEGER_TO_FLOAT_MAX); return (float)x; } - template <> inline float F32(int32 x) { nvDebugCheck(x >= -NV_INTEGER_TO_FLOAT_MAX && x <= NV_INTEGER_TO_FLOAT_MAX); return (float)x; } - // The compiler should not complain about these conversions: - //template <> inline float F32(uint16 x) { nvDebugCheck(return (float)x; } - //template <> inline float F32(int16 x) { nvDebugCheck(return (float)x; } - //template <> inline float F32(uint8 x) { nvDebugCheck(return (float)x; } - //template <> inline float F32(int8 x) { nvDebugCheck(return (float)x; } - - - /// Swap two values. - template - inline void swap(T & a, T & b) - { - T temp(a); - a = b; - b = temp; - } - - /// Return the maximum of the two arguments. For floating point values, it returns the second value if the first is NaN. - template - //inline const T & max(const T & a, const T & b) - inline T max(const T & a, const T & b) - { - return (b < a) ? a : b; - } - - /// Return the maximum of the four arguments. - template - //inline const T & max4(const T & a, const T & b, const T & c) - inline T max4(const T & a, const T & b, const T & c, const T & d) - { - return max(max(a, b), max(c, d)); - } - - /// Return the maximum of the three arguments. - template - //inline const T & max3(const T & a, const T & b, const T & c) - inline T max3(const T & a, const T & b, const T & c) - { - return max(a, max(b, c)); - } - - /// Return the minimum of two values. - template - //inline const T & min(const T & a, const T & b) - inline T min(const T & a, const T & b) - { - return (a < b) ? a : b; - } - - /// Return the maximum of the three arguments. - template - //inline const T & min3(const T & a, const T & b, const T & c) - inline T min3(const T & a, const T & b, const T & c) - { - return min(a, min(b, c)); - } - - /// Clamp between two values. - template - //inline const T & clamp(const T & x, const T & a, const T & b) - inline T clamp(const T & x, const T & a, const T & b) - { - return min(max(x, a), b); - } - - /** Return the next power of two. - * @see http://graphics.stanford.edu/~seander/bithacks.html - * @warning Behaviour for 0 is undefined. - * @note isPowerOfTwo(x) == true -> nextPowerOfTwo(x) == x - * @note nextPowerOfTwo(x) = 2 << log2(x-1) - */ - inline uint nextPowerOfTwo( uint x ) - { - nvDebugCheck( x != 0 ); -#if 1 // On modern CPUs this is supposed to be as fast as using the bsr instruction. - x--; - x |= x >> 1; - x |= x >> 2; - x |= x >> 4; - x |= x >> 8; - x |= x >> 16; - return x+1; -#else - uint p = 1; - while( x > p ) { - p += p; - } - return p; -#endif - } - - /// Return true if @a n is a power of two. - inline bool isPowerOfTwo( uint n ) - { - return (n & (n-1)) == 0; - } - - - // @@ Move this to utils? - /// Delete all the elements of a container. - template - void deleteAll(T & container) - { - for (typename T::PseudoIndex i = container.start(); !container.isDone(i); container.advance(i)) - { - delete container[i]; - } - } - - - - // @@ Specialize these methods for numeric, pointer, and pod types. - - template - void construct_range(T * restrict ptr, uint new_size, uint old_size) { - for (uint i = old_size; i < new_size; i++) { - new(ptr+i) T; // placement new - } - } - - template - void construct_range(T * restrict ptr, uint new_size, uint old_size, const T & elem) { - for (uint i = old_size; i < new_size; i++) { - new(ptr+i) T(elem); // placement new - } - } - - template - void construct_range(T * restrict ptr, uint new_size, uint old_size, const T * src) { - for (uint i = old_size; i < new_size; i++) { - new(ptr+i) T(src[i]); // placement new - } - } - - template - void destroy_range(T * restrict ptr, uint new_size, uint old_size) { - for (uint i = new_size; i < old_size; i++) { - (ptr+i)->~T(); // Explicit call to the destructor - } - } - - template - void fill(T * restrict dst, uint count, const T & value) { - for (uint i = 0; i < count; i++) { - dst[i] = value; - } - } - - template - void copy_range(T * restrict dst, const T * restrict src, uint count) { - for (uint i = 0; i < count; i++) { - dst[i] = src[i]; - } - } - - template - bool find(const T & element, const T * restrict ptr, uint begin, uint end, uint * index) { - for (uint i = begin; i < end; i++) { - if (ptr[i] == element) { - if (index != NULL) *index = i; - return true; - } - } - return false; - } - -} // nv namespace - -#endif // NV_CORE_UTILS_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvmath/fitting.cpp b/3rdparty/bgfx/3rdparty/nvtt/nvmath/fitting.cpp deleted file mode 100644 index ba01b1f..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvmath/fitting.cpp +++ /dev/null @@ -1,1200 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#include "fitting.h" -#include "vector.inl" -#include "plane.inl" -#include "matrix.inl" - -#include "nvcore/array.inl" -#include "nvcore/utils.h" // max, swap - -using namespace nv; - -// @@ Move to EigenSolver.h - -// @@ We should be able to do something cheaper... -static Vector3 estimatePrincipalComponent(const float * __restrict matrix) -{ - const Vector3 row0(matrix[0], matrix[1], matrix[2]); - const Vector3 row1(matrix[1], matrix[3], matrix[4]); - const Vector3 row2(matrix[2], matrix[4], matrix[5]); - - float r0 = lengthSquared(row0); - float r1 = lengthSquared(row1); - float r2 = lengthSquared(row2); - - if (r0 > r1 && r0 > r2) return row0; - if (r1 > r2) return row1; - return row2; -} - - -static inline Vector3 firstEigenVector_PowerMethod(const float *__restrict matrix) -{ - if (matrix[0] == 0 && matrix[3] == 0 && matrix[5] == 0) - { - return Vector3(0.0f); - } - - Vector3 v = estimatePrincipalComponent(matrix); - - const int NUM = 8; - for (int i = 0; i < NUM; i++) - { - float x = v.x * matrix[0] + v.y * matrix[1] + v.z * matrix[2]; - float y = v.x * matrix[1] + v.y * matrix[3] + v.z * matrix[4]; - float z = v.x * matrix[2] + v.y * matrix[4] + v.z * matrix[5]; - - float norm = max(max(x, y), z); - - v = Vector3(x, y, z) / norm; - } - - return v; -} - - -Vector3 nv::Fit::computeCentroid(int n, const Vector3 *__restrict points) -{ - Vector3 centroid(0.0f); - - for (int i = 0; i < n; i++) - { - centroid += points[i]; - } - centroid /= float(n); - - return centroid; -} - -Vector3 nv::Fit::computeCentroid(int n, const Vector3 *__restrict points, const float *__restrict weights, Vector3::Arg metric) -{ - Vector3 centroid(0.0f); - float total = 0.0f; - - for (int i = 0; i < n; i++) - { - total += weights[i]; - centroid += weights[i]*points[i]; - } - centroid /= total; - - return centroid; -} - -Vector4 nv::Fit::computeCentroid(int n, const Vector4 *__restrict points) -{ - Vector4 centroid(0.0f); - - for (int i = 0; i < n; i++) - { - centroid += points[i]; - } - centroid /= float(n); - - return centroid; -} - -Vector4 nv::Fit::computeCentroid(int n, const Vector4 *__restrict points, const float *__restrict weights, Vector4::Arg metric) -{ - Vector4 centroid(0.0f); - float total = 0.0f; - - for (int i = 0; i < n; i++) - { - total += weights[i]; - centroid += weights[i]*points[i]; - } - centroid /= total; - - return centroid; -} - - - -Vector3 nv::Fit::computeCovariance(int n, const Vector3 *__restrict points, float *__restrict covariance) -{ - // compute the centroid - Vector3 centroid = computeCentroid(n, points); - - // compute covariance matrix - for (int i = 0; i < 6; i++) - { - covariance[i] = 0.0f; - } - - for (int i = 0; i < n; i++) - { - Vector3 v = points[i] - centroid; - - covariance[0] += v.x * v.x; - covariance[1] += v.x * v.y; - covariance[2] += v.x * v.z; - covariance[3] += v.y * v.y; - covariance[4] += v.y * v.z; - covariance[5] += v.z * v.z; - } - - return centroid; -} - -Vector3 nv::Fit::computeCovariance(int n, const Vector3 *__restrict points, const float *__restrict weights, Vector3::Arg metric, float *__restrict covariance) -{ - // compute the centroid - Vector3 centroid = computeCentroid(n, points, weights, metric); - - // compute covariance matrix - for (int i = 0; i < 6; i++) - { - covariance[i] = 0.0f; - } - - for (int i = 0; i < n; i++) - { - Vector3 a = (points[i] - centroid) * metric; - Vector3 b = weights[i]*a; - - covariance[0] += a.x * b.x; - covariance[1] += a.x * b.y; - covariance[2] += a.x * b.z; - covariance[3] += a.y * b.y; - covariance[4] += a.y * b.z; - covariance[5] += a.z * b.z; - } - - return centroid; -} - -Vector4 nv::Fit::computeCovariance(int n, const Vector4 *__restrict points, float *__restrict covariance) -{ - // compute the centroid - Vector4 centroid = computeCentroid(n, points); - - // compute covariance matrix - for (int i = 0; i < 10; i++) - { - covariance[i] = 0.0f; - } - - for (int i = 0; i < n; i++) - { - Vector4 v = points[i] - centroid; - - covariance[0] += v.x * v.x; - covariance[1] += v.x * v.y; - covariance[2] += v.x * v.z; - covariance[3] += v.x * v.w; - - covariance[4] += v.y * v.y; - covariance[5] += v.y * v.z; - covariance[6] += v.y * v.w; - - covariance[7] += v.z * v.z; - covariance[8] += v.z * v.w; - - covariance[9] += v.w * v.w; - } - - return centroid; -} - -Vector4 nv::Fit::computeCovariance(int n, const Vector4 *__restrict points, const float *__restrict weights, Vector4::Arg metric, float *__restrict covariance) -{ - // compute the centroid - Vector4 centroid = computeCentroid(n, points, weights, metric); - - // compute covariance matrix - for (int i = 0; i < 10; i++) - { - covariance[i] = 0.0f; - } - - for (int i = 0; i < n; i++) - { - Vector4 a = (points[i] - centroid) * metric; - Vector4 b = weights[i]*a; - - covariance[0] += a.x * b.x; - covariance[1] += a.x * b.y; - covariance[2] += a.x * b.z; - covariance[3] += a.x * b.w; - - covariance[4] += a.y * b.y; - covariance[5] += a.y * b.z; - covariance[6] += a.y * b.w; - - covariance[7] += a.z * b.z; - covariance[8] += a.z * b.w; - - covariance[9] += a.w * b.w; - } - - return centroid; -} - - - -Vector3 nv::Fit::computePrincipalComponent_PowerMethod(int n, const Vector3 *__restrict points) -{ - float matrix[6]; - computeCovariance(n, points, matrix); - - return firstEigenVector_PowerMethod(matrix); -} - -Vector3 nv::Fit::computePrincipalComponent_PowerMethod(int n, const Vector3 *__restrict points, const float *__restrict weights, Vector3::Arg metric) -{ - float matrix[6]; - computeCovariance(n, points, weights, metric, matrix); - - return firstEigenVector_PowerMethod(matrix); -} - - - -static inline Vector3 firstEigenVector_EigenSolver3(const float *__restrict matrix) -{ - if (matrix[0] == 0 && matrix[3] == 0 && matrix[5] == 0) - { - return Vector3(0.0f); - } - - float eigenValues[3]; - Vector3 eigenVectors[3]; - if (!nv::Fit::eigenSolveSymmetric3(matrix, eigenValues, eigenVectors)) - { - return Vector3(0.0f); - } - - return eigenVectors[0]; -} - -Vector3 nv::Fit::computePrincipalComponent_EigenSolver(int n, const Vector3 *__restrict points) -{ - float matrix[6]; - computeCovariance(n, points, matrix); - - return firstEigenVector_EigenSolver3(matrix); -} - -Vector3 nv::Fit::computePrincipalComponent_EigenSolver(int n, const Vector3 *__restrict points, const float *__restrict weights, Vector3::Arg metric) -{ - float matrix[6]; - computeCovariance(n, points, weights, metric, matrix); - - return firstEigenVector_EigenSolver3(matrix); -} - - - -static inline Vector4 firstEigenVector_EigenSolver4(const float *__restrict matrix) -{ - if (matrix[0] == 0 && matrix[4] == 0 && matrix[7] == 0&& matrix[9] == 0) - { - return Vector4(0.0f); - } - - float eigenValues[4]; - Vector4 eigenVectors[4]; - if (!nv::Fit::eigenSolveSymmetric4(matrix, eigenValues, eigenVectors)) - { - return Vector4(0.0f); - } - - return eigenVectors[0]; -} - -Vector4 nv::Fit::computePrincipalComponent_EigenSolver(int n, const Vector4 *__restrict points) -{ - float matrix[10]; - computeCovariance(n, points, matrix); - - return firstEigenVector_EigenSolver4(matrix); -} - -Vector4 nv::Fit::computePrincipalComponent_EigenSolver(int n, const Vector4 *__restrict points, const float *__restrict weights, Vector4::Arg metric) -{ - float matrix[10]; - computeCovariance(n, points, weights, metric, matrix); - - return firstEigenVector_EigenSolver4(matrix); -} - - - -void ArvoSVD(int rows, int cols, float * Q, float * diag, float * R); - -Vector3 nv::Fit::computePrincipalComponent_SVD(int n, const Vector3 *__restrict points) -{ - // Store the points in an n x n matrix - Array Q; Q.resize(n*n, 0.0f); - for (int i = 0; i < n; ++i) - { - Q[i*n+0] = points[i].x; - Q[i*n+1] = points[i].y; - Q[i*n+2] = points[i].z; - } - - // Alloc space for the SVD outputs - Array diag; diag.resize(n, 0.0f); - Array R; R.resize(n*n, 0.0f); - - ArvoSVD(n, n, &Q[0], &diag[0], &R[0]); - - // Get the principal component - return Vector3(R[0], R[1], R[2]); -} - -Vector4 nv::Fit::computePrincipalComponent_SVD(int n, const Vector4 *__restrict points) -{ - // Store the points in an n x n matrix - Array Q; Q.resize(n*n, 0.0f); - for (int i = 0; i < n; ++i) - { - Q[i*n+0] = points[i].x; - Q[i*n+1] = points[i].y; - Q[i*n+2] = points[i].z; - Q[i*n+3] = points[i].w; - } - - // Alloc space for the SVD outputs - Array diag; diag.resize(n, 0.0f); - Array R; R.resize(n*n, 0.0f); - - ArvoSVD(n, n, &Q[0], &diag[0], &R[0]); - - // Get the principal component - return Vector4(R[0], R[1], R[2], R[3]); -} - - - -Plane nv::Fit::bestPlane(int n, const Vector3 *__restrict points) -{ - // compute the centroid and covariance - float matrix[6]; - Vector3 centroid = computeCovariance(n, points, matrix); - - if (matrix[0] == 0 && matrix[3] == 0 && matrix[5] == 0) - { - // If no plane defined, then return a horizontal plane. - return Plane(Vector3(0, 0, 1), centroid); - } - - float eigenValues[3]; - Vector3 eigenVectors[3]; - if (!eigenSolveSymmetric3(matrix, eigenValues, eigenVectors)) { - // If no plane defined, then return a horizontal plane. - return Plane(Vector3(0, 0, 1), centroid); - } - - return Plane(eigenVectors[2], centroid); -} - -bool nv::Fit::isPlanar(int n, const Vector3 * points, float epsilon/*=NV_EPSILON*/) -{ - // compute the centroid and covariance - float matrix[6]; - computeCovariance(n, points, matrix); - - float eigenValues[3]; - Vector3 eigenVectors[3]; - if (!eigenSolveSymmetric3(matrix, eigenValues, eigenVectors)) { - return false; - } - - return eigenValues[2] < epsilon; -} - - - -// Tridiagonal solver from Charles Bloom. -// Householder transforms followed by QL decomposition. -// Seems to be based on the code from Numerical Recipes in C. - -static void EigenSolver3_Tridiagonal(float mat[3][3], float * diag, float * subd); -static bool EigenSolver3_QLAlgorithm(float mat[3][3], float * diag, float * subd); - -bool nv::Fit::eigenSolveSymmetric3(const float matrix[6], float eigenValues[3], Vector3 eigenVectors[3]) -{ - nvDebugCheck(matrix != NULL && eigenValues != NULL && eigenVectors != NULL); - - float subd[3]; - float diag[3]; - float work[3][3]; - - work[0][0] = matrix[0]; - work[0][1] = work[1][0] = matrix[1]; - work[0][2] = work[2][0] = matrix[2]; - work[1][1] = matrix[3]; - work[1][2] = work[2][1] = matrix[4]; - work[2][2] = matrix[5]; - - EigenSolver3_Tridiagonal(work, diag, subd); - if (!EigenSolver3_QLAlgorithm(work, diag, subd)) - { - for (int i = 0; i < 3; i++) { - eigenValues[i] = 0; - eigenVectors[i] = Vector3(0); - } - return false; - } - - for (int i = 0; i < 3; i++) { - eigenValues[i] = (float)diag[i]; - } - - // eigenvectors are the columns; make them the rows : - - for (int i=0; i < 3; i++) - { - for (int j = 0; j < 3; j++) - { - eigenVectors[j].component[i] = (float) work[i][j]; - } - } - - // shuffle to sort by singular value : - if (eigenValues[2] > eigenValues[0] && eigenValues[2] > eigenValues[1]) - { - swap(eigenValues[0], eigenValues[2]); - swap(eigenVectors[0], eigenVectors[2]); - } - if (eigenValues[1] > eigenValues[0]) - { - swap(eigenValues[0], eigenValues[1]); - swap(eigenVectors[0], eigenVectors[1]); - } - if (eigenValues[2] > eigenValues[1]) - { - swap(eigenValues[1], eigenValues[2]); - swap(eigenVectors[1], eigenVectors[2]); - } - - nvDebugCheck(eigenValues[0] >= eigenValues[1] && eigenValues[0] >= eigenValues[2]); - nvDebugCheck(eigenValues[1] >= eigenValues[2]); - - return true; -} - -static void EigenSolver3_Tridiagonal(float mat[3][3], float * diag, float * subd) -{ - // Householder reduction T = Q^t M Q - // Input: - // mat, symmetric 3x3 matrix M - // Output: - // mat, orthogonal matrix Q - // diag, diagonal entries of T - // subd, subdiagonal entries of T (T is symmetric) - const float epsilon = 1e-08f; - - float a = mat[0][0]; - float b = mat[0][1]; - float c = mat[0][2]; - float d = mat[1][1]; - float e = mat[1][2]; - float f = mat[2][2]; - - diag[0] = a; - subd[2] = 0.f; - if (fabsf(c) >= epsilon) - { - const float ell = sqrtf(b*b+c*c); - b /= ell; - c /= ell; - const float q = 2*b*e+c*(f-d); - diag[1] = d+c*q; - diag[2] = f-c*q; - subd[0] = ell; - subd[1] = e-b*q; - mat[0][0] = 1; mat[0][1] = 0; mat[0][2] = 0; - mat[1][0] = 0; mat[1][1] = b; mat[1][2] = c; - mat[2][0] = 0; mat[2][1] = c; mat[2][2] = -b; - } - else - { - diag[1] = d; - diag[2] = f; - subd[0] = b; - subd[1] = e; - mat[0][0] = 1; mat[0][1] = 0; mat[0][2] = 0; - mat[1][0] = 0; mat[1][1] = 1; mat[1][2] = 0; - mat[2][0] = 0; mat[2][1] = 0; mat[2][2] = 1; - } -} - -static bool EigenSolver3_QLAlgorithm(float mat[3][3], float * diag, float * subd) -{ - // QL iteration with implicit shifting to reduce matrix from tridiagonal - // to diagonal - const int maxiter = 32; - - for (int ell = 0; ell < 3; ell++) - { - int iter; - for (iter = 0; iter < maxiter; iter++) - { - int m; - for (m = ell; m <= 1; m++) - { - float dd = fabsf(diag[m]) + fabsf(diag[m+1]); - if ( fabsf(subd[m]) + dd == dd ) - break; - } - if ( m == ell ) - break; - - float g = (diag[ell+1]-diag[ell])/(2*subd[ell]); - float r = sqrtf(g*g+1); - if ( g < 0 ) - g = diag[m]-diag[ell]+subd[ell]/(g-r); - else - g = diag[m]-diag[ell]+subd[ell]/(g+r); - float s = 1, c = 1, p = 0; - for (int i = m-1; i >= ell; i--) - { - float f = s*subd[i], b = c*subd[i]; - if ( fabsf(f) >= fabsf(g) ) - { - c = g/f; - r = sqrtf(c*c+1); - subd[i+1] = f*r; - c *= (s = 1/r); - } - else - { - s = f/g; - r = sqrtf(s*s+1); - subd[i+1] = g*r; - s *= (c = 1/r); - } - g = diag[i+1]-p; - r = (diag[i]-g)*s+2*b*c; - p = s*r; - diag[i+1] = g+p; - g = c*r-b; - - for (int k = 0; k < 3; k++) - { - f = mat[k][i+1]; - mat[k][i+1] = s*mat[k][i]+c*f; - mat[k][i] = c*mat[k][i]-s*f; - } - } - diag[ell] -= p; - subd[ell] = g; - subd[m] = 0; - } - - if ( iter == maxiter ) - // should not get here under normal circumstances - return false; - } - - return true; -} - - - -// Tridiagonal solver for 4x4 symmetric matrices. - -static void EigenSolver4_Tridiagonal(float mat[4][4], float * diag, float * subd); -static bool EigenSolver4_QLAlgorithm(float mat[4][4], float * diag, float * subd); - -bool nv::Fit::eigenSolveSymmetric4(const float matrix[10], float eigenValues[4], Vector4 eigenVectors[4]) -{ - nvDebugCheck(matrix != NULL && eigenValues != NULL && eigenVectors != NULL); - - float subd[4]; - float diag[4]; - float work[4][4]; - - work[0][0] = matrix[0]; - work[0][1] = work[1][0] = matrix[1]; - work[0][2] = work[2][0] = matrix[2]; - work[0][3] = work[3][0] = matrix[3]; - work[1][1] = matrix[4]; - work[1][2] = work[2][1] = matrix[5]; - work[1][3] = work[3][1] = matrix[6]; - work[2][2] = matrix[7]; - work[2][3] = work[3][2] = matrix[8]; - work[3][3] = matrix[9]; - - EigenSolver4_Tridiagonal(work, diag, subd); - if (!EigenSolver4_QLAlgorithm(work, diag, subd)) - { - for (int i = 0; i < 4; i++) { - eigenValues[i] = 0; - eigenVectors[i] = Vector4(0); - } - return false; - } - - for (int i = 0; i < 4; i++) { - eigenValues[i] = (float)diag[i]; - } - - // eigenvectors are the columns; make them the rows - - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 4; j++) - { - eigenVectors[j].component[i] = (float) work[i][j]; - } - } - - // sort by singular value - - for (int i = 0; i < 3; ++i) - { - for (int j = i+1; j < 4; ++j) - { - if (eigenValues[j] > eigenValues[i]) - { - swap(eigenValues[i], eigenValues[j]); - swap(eigenVectors[i], eigenVectors[j]); - } - } - } - - nvDebugCheck(eigenValues[0] >= eigenValues[1] && eigenValues[0] >= eigenValues[2] && eigenValues[0] >= eigenValues[3]); - nvDebugCheck(eigenValues[1] >= eigenValues[2] && eigenValues[1] >= eigenValues[3]); - nvDebugCheck(eigenValues[2] >= eigenValues[2]); - - return true; -} - -inline float signNonzero(float x) -{ - return (x >= 0.0f) ? 1.0f : -1.0f; -} - -static void EigenSolver4_Tridiagonal(float mat[4][4], float * diag, float * subd) -{ - // Householder reduction T = Q^t M Q - // Input: - // mat, symmetric 3x3 matrix M - // Output: - // mat, orthogonal matrix Q - // diag, diagonal entries of T - // subd, subdiagonal entries of T (T is symmetric) - - static const int n = 4; - - // Set epsilon relative to size of elements in matrix - static const float relEpsilon = 1e-6f; - float maxElement = FLT_MAX; - for (int i = 0; i < n; ++i) - for (int j = 0; j < n; ++j) - maxElement = max(maxElement, fabsf(mat[i][j])); - float epsilon = relEpsilon * maxElement; - - // Iterative algorithm, works for any size of matrix but might be slower than - // a closed-form solution for symmetric 4x4 matrices. Based on this article: - // http://en.wikipedia.org/wiki/Householder_transformation#Tridiagonalization - - Matrix A, Q(identity); - memcpy(&A, mat, sizeof(float)*n*n); - - // We proceed from left to right, making the off-tridiagonal entries zero in - // one column of the matrix at a time. - for (int k = 0; k < n - 2; ++k) - { - float sum = 0.0f; - for (int j = k+1; j < n; ++j) - sum += A(j,k)*A(j,k); - float alpha = -signNonzero(A(k+1,k)) * sqrtf(sum); - float r = sqrtf(0.5f * (alpha*alpha - A(k+1,k)*alpha)); - - // If r is zero, skip this column - already in tridiagonal form - if (fabsf(r) < epsilon) - continue; - - float v[n] = {}; - v[k+1] = 0.5f * (A(k+1,k) - alpha) / r; - for (int j = k+2; j < n; ++j) - v[j] = 0.5f * A(j,k) / r; - - Matrix P(identity); - for (int i = 0; i < n; ++i) - for (int j = 0; j < n; ++j) - P(i,j) -= 2.0f * v[i] * v[j]; - - A = mul(mul(P, A), P); - Q = mul(Q, P); - } - - nvDebugCheck(fabsf(A(2,0)) < epsilon); - nvDebugCheck(fabsf(A(0,2)) < epsilon); - nvDebugCheck(fabsf(A(3,0)) < epsilon); - nvDebugCheck(fabsf(A(0,3)) < epsilon); - nvDebugCheck(fabsf(A(3,1)) < epsilon); - nvDebugCheck(fabsf(A(1,3)) < epsilon); - - for (int i = 0; i < n; ++i) - diag[i] = A(i,i); - for (int i = 0; i < n - 1; ++i) - subd[i] = A(i+1,i); - subd[n-1] = 0.0f; - - memcpy(mat, &Q, sizeof(float)*n*n); -} - -static bool EigenSolver4_QLAlgorithm(float mat[4][4], float * diag, float * subd) -{ - // QL iteration with implicit shifting to reduce matrix from tridiagonal - // to diagonal - const int maxiter = 32; - - for (int ell = 0; ell < 4; ell++) - { - int iter; - for (iter = 0; iter < maxiter; iter++) - { - int m; - for (m = ell; m < 3; m++) - { - float dd = fabsf(diag[m]) + fabsf(diag[m+1]); - if ( fabsf(subd[m]) + dd == dd ) - break; - } - if ( m == ell ) - break; - - float g = (diag[ell+1]-diag[ell])/(2*subd[ell]); - float r = sqrtf(g*g+1); - if ( g < 0 ) - g = diag[m]-diag[ell]+subd[ell]/(g-r); - else - g = diag[m]-diag[ell]+subd[ell]/(g+r); - float s = 1, c = 1, p = 0; - for (int i = m-1; i >= ell; i--) - { - float f = s*subd[i], b = c*subd[i]; - if ( fabsf(f) >= fabsf(g) ) - { - c = g/f; - r = sqrtf(c*c+1); - subd[i+1] = f*r; - c *= (s = 1/r); - } - else - { - s = f/g; - r = sqrtf(s*s+1); - subd[i+1] = g*r; - s *= (c = 1/r); - } - g = diag[i+1]-p; - r = (diag[i]-g)*s+2*b*c; - p = s*r; - diag[i+1] = g+p; - g = c*r-b; - - for (int k = 0; k < 4; k++) - { - f = mat[k][i+1]; - mat[k][i+1] = s*mat[k][i]+c*f; - mat[k][i] = c*mat[k][i]-s*f; - } - } - diag[ell] -= p; - subd[ell] = g; - subd[m] = 0; - } - - if ( iter == maxiter ) - // should not get here under normal circumstances - return false; - } - - return true; -} - - - -int nv::Fit::compute4Means(int n, const Vector3 *__restrict points, const float *__restrict weights, Vector3::Arg metric, Vector3 *__restrict cluster) -{ - // Compute principal component. - float matrix[6]; - Vector3 centroid = computeCovariance(n, points, weights, metric, matrix); - Vector3 principal = firstEigenVector_PowerMethod(matrix); - - // Pick initial solution. - int mini, maxi; - mini = maxi = 0; - - float mindps, maxdps; - mindps = maxdps = dot(points[0] - centroid, principal); - - for (int i = 1; i < n; ++i) - { - float dps = dot(points[i] - centroid, principal); - - if (dps < mindps) { - mindps = dps; - mini = i; - } - else { - maxdps = dps; - maxi = i; - } - } - - cluster[0] = centroid + mindps * principal; - cluster[1] = centroid + maxdps * principal; - cluster[2] = (2.0f * cluster[0] + cluster[1]) / 3.0f; - cluster[3] = (2.0f * cluster[1] + cluster[0]) / 3.0f; - - // Now we have to iteratively refine the clusters. - while (true) - { - Vector3 newCluster[4] = { Vector3(0.0f), Vector3(0.0f), Vector3(0.0f), Vector3(0.0f) }; - float total[4] = {0, 0, 0, 0}; - - for (int i = 0; i < n; ++i) - { - // Find nearest cluster. - int nearest = 0; - float mindist = FLT_MAX; - for (int j = 0; j < 4; j++) - { - float dist = lengthSquared((cluster[j] - points[i]) * metric); - if (dist < mindist) - { - mindist = dist; - nearest = j; - } - } - - newCluster[nearest] += weights[i] * points[i]; - total[nearest] += weights[i]; - } - - for (int j = 0; j < 4; j++) - { - if (total[j] != 0) - newCluster[j] /= total[j]; - } - - if (equal(cluster[0], newCluster[0]) && equal(cluster[1], newCluster[1]) && - equal(cluster[2], newCluster[2]) && equal(cluster[3], newCluster[3])) - { - return (total[0] != 0) + (total[1] != 0) + (total[2] != 0) + (total[3] != 0); - } - - cluster[0] = newCluster[0]; - cluster[1] = newCluster[1]; - cluster[2] = newCluster[2]; - cluster[3] = newCluster[3]; - - // Sort clusters by weight. - for (int i = 0; i < 4; i++) - { - for (int j = i; j > 0 && total[j] > total[j - 1]; j--) - { - swap( total[j], total[j - 1] ); - swap( cluster[j], cluster[j - 1] ); - } - } - } -} - - - -// Adaptation of James Arvo's SVD code, as found in ZOH. - -inline float Sqr(float x) { return x*x; } - -inline float svd_pythag( float a, float b ) -{ - float at = fabsf(a); - float bt = fabsf(b); - if( at > bt ) - return at * sqrtf( 1.0f + Sqr( bt / at ) ); - else if( bt > 0.0f ) - return bt * sqrtf( 1.0f + Sqr( at / bt ) ); - else return 0.0f; -} - -inline float SameSign( float a, float b ) -{ - float t; - if( b >= 0.0f ) t = fabsf( a ); - else t = -fabsf( a ); - return t; -} - -void ArvoSVD(int rows, int cols, float * Q, float * diag, float * R) -{ - static const int MaxIterations = 30; - - int i, j, k, l, p, q, iter; - float c, f, h, s, x, y, z; - float norm = 0.0f; - float g = 0.0f; - float scale = 0.0f; - - Array temp; temp.resize(cols, 0.0f); - - for( i = 0; i < cols; i++ ) - { - temp[i] = scale * g; - scale = 0.0f; - g = 0.0f; - s = 0.0f; - l = i + 1; - - if( i < rows ) - { - for( k = i; k < rows; k++ ) scale += fabsf( Q[k*cols+i] ); - if( scale != 0.0f ) - { - for( k = i; k < rows; k++ ) - { - Q[k*cols+i] /= scale; - s += Sqr( Q[k*cols+i] ); - } - f = Q[i*cols+i]; - g = -SameSign( sqrtf(s), f ); - h = f * g - s; - Q[i*cols+i] = f - g; - if( i != cols - 1 ) - { - for( j = l; j < cols; j++ ) - { - s = 0.0f; - for( k = i; k < rows; k++ ) s += Q[k*cols+i] * Q[k*cols+j]; - f = s / h; - for( k = i; k < rows; k++ ) Q[k*cols+j] += f * Q[k*cols+i]; - } - } - for( k = i; k < rows; k++ ) Q[k*cols+i] *= scale; - } - } - - diag[i] = scale * g; - g = 0.0f; - s = 0.0f; - scale = 0.0f; - - if( i < rows && i != cols - 1 ) - { - for( k = l; k < cols; k++ ) scale += fabsf( Q[i*cols+k] ); - if( scale != 0.0f ) - { - for( k = l; k < cols; k++ ) - { - Q[i*cols+k] /= scale; - s += Sqr( Q[i*cols+k] ); - } - f = Q[i*cols+l]; - g = -SameSign( sqrtf(s), f ); - h = f * g - s; - Q[i*cols+l] = f - g; - for( k = l; k < cols; k++ ) temp[k] = Q[i*cols+k] / h; - if( i != rows - 1 ) - { - for( j = l; j < rows; j++ ) - { - s = 0.0f; - for( k = l; k < cols; k++ ) s += Q[j*cols+k] * Q[i*cols+k]; - for( k = l; k < cols; k++ ) Q[j*cols+k] += s * temp[k]; - } - } - for( k = l; k < cols; k++ ) Q[i*cols+k] *= scale; - } - } - norm = max( norm, fabsf( diag[i] ) + fabsf( temp[i] ) ); - } - - - for( i = cols - 1; i >= 0; i-- ) - { - if( i < cols - 1 ) - { - if( g != 0.0f ) - { - for( j = l; j < cols; j++ ) R[i*cols+j] = ( Q[i*cols+j] / Q[i*cols+l] ) / g; - for( j = l; j < cols; j++ ) - { - s = 0.0f; - for( k = l; k < cols; k++ ) s += Q[i*cols+k] * R[j*cols+k]; - for( k = l; k < cols; k++ ) R[j*cols+k] += s * R[i*cols+k]; - } - } - for( j = l; j < cols; j++ ) - { - R[i*cols+j] = 0.0f; - R[j*cols+i] = 0.0f; - } - } - R[i*cols+i] = 1.0f; - g = temp[i]; - l = i; - } - - - for( i = cols - 1; i >= 0; i-- ) - { - l = i + 1; - g = diag[i]; - if( i < cols - 1 ) for( j = l; j < cols; j++ ) Q[i*cols+j] = 0.0f; - if( g != 0.0f ) - { - g = 1.0f / g; - if( i != cols - 1 ) - { - for( j = l; j < cols; j++ ) - { - s = 0.0f; - for( k = l; k < rows; k++ ) s += Q[k*cols+i] * Q[k*cols+j]; - f = ( s / Q[i*cols+i] ) * g; - for( k = i; k < rows; k++ ) Q[k*cols+j] += f * Q[k*cols+i]; - } - } - for( j = i; j < rows; j++ ) Q[j*cols+i] *= g; - } - else - { - for( j = i; j < rows; j++ ) Q[j*cols+i] = 0.0f; - } - Q[i*cols+i] += 1.0f; - } - - - for( k = cols - 1; k >= 0; k-- ) - { - for( iter = 1; iter <= MaxIterations; iter++ ) - { - int jump; - - for( l = k; l >= 0; l-- ) - { - q = l - 1; - if( fabsf( temp[l] ) + norm == norm ) { jump = 1; break; } - if( fabsf( diag[q] ) + norm == norm ) { jump = 0; break; } - } - - if( !jump ) - { - c = 0.0f; - s = 1.0f; - for( i = l; i <= k; i++ ) - { - f = s * temp[i]; - temp[i] *= c; - if( fabsf( f ) + norm == norm ) break; - g = diag[i]; - h = svd_pythag( f, g ); - diag[i] = h; - h = 1.0f / h; - c = g * h; - s = -f * h; - for( j = 0; j < rows; j++ ) - { - y = Q[j*cols+q]; - z = Q[j*cols+i]; - Q[j*cols+q] = y * c + z * s; - Q[j*cols+i] = z * c - y * s; - } - } - } - - z = diag[k]; - if( l == k ) - { - if( z < 0.0f ) - { - diag[k] = -z; - for( j = 0; j < cols; j++ ) R[k*cols+j] *= -1.0f; - } - break; - } - if( iter >= MaxIterations ) return; - x = diag[l]; - q = k - 1; - y = diag[q]; - g = temp[q]; - h = temp[k]; - f = ( ( y - z ) * ( y + z ) + ( g - h ) * ( g + h ) ) / ( 2.0f * h * y ); - g = svd_pythag( f, 1.0f ); - f = ( ( x - z ) * ( x + z ) + h * ( ( y / ( f + SameSign( g, f ) ) ) - h ) ) / x; - c = 1.0f; - s = 1.0f; - for( j = l; j <= q; j++ ) - { - i = j + 1; - g = temp[i]; - y = diag[i]; - h = s * g; - g = c * g; - z = svd_pythag( f, h ); - temp[j] = z; - c = f / z; - s = h / z; - f = x * c + g * s; - g = g * c - x * s; - h = y * s; - y = y * c; - for( p = 0; p < cols; p++ ) - { - x = R[j*cols+p]; - z = R[i*cols+p]; - R[j*cols+p] = x * c + z * s; - R[i*cols+p] = z * c - x * s; - } - z = svd_pythag( f, h ); - diag[j] = z; - if( z != 0.0f ) - { - z = 1.0f / z; - c = f * z; - s = h * z; - } - f = c * g + s * y; - x = c * y - s * g; - for( p = 0; p < rows; p++ ) - { - y = Q[p*cols+j]; - z = Q[p*cols+i]; - Q[p*cols+j] = y * c + z * s; - Q[p*cols+i] = z * c - y * s; - } - } - temp[l] = 0.0f; - temp[k] = f; - diag[k] = x; - } - } - - // Sort the singular values into descending order. - - for( i = 0; i < cols - 1; i++ ) - { - float biggest = diag[i]; // Biggest singular value so far. - int bindex = i; // The row/col it occurred in. - for( j = i + 1; j < cols; j++ ) - { - if( diag[j] > biggest ) - { - biggest = diag[j]; - bindex = j; - } - } - if( bindex != i ) // Need to swap rows and columns. - { - // Swap columns in Q. - for (int j = 0; j < rows; ++j) - swap(Q[j*cols+i], Q[j*cols+bindex]); - - // Swap rows in R. - for (int j = 0; j < rows; ++j) - swap(R[i*cols+j], R[bindex*cols+j]); - - // Swap elements in diag. - swap(diag[i], diag[bindex]); - } - } -} diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvmath/fitting.h b/3rdparty/bgfx/3rdparty/nvtt/nvmath/fitting.h deleted file mode 100644 index e835045..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvmath/fitting.h +++ /dev/null @@ -1,49 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_MATH_FITTING_H -#define NV_MATH_FITTING_H - -#include "vector.h" -#include "plane.h" - -namespace nv -{ - namespace Fit - { - Vector3 computeCentroid(int n, const Vector3 * points); - Vector3 computeCentroid(int n, const Vector3 * points, const float * weights, const Vector3 & metric); - - Vector4 computeCentroid(int n, const Vector4 * points); - Vector4 computeCentroid(int n, const Vector4 * points, const float * weights, const Vector4 & metric); - - Vector3 computeCovariance(int n, const Vector3 * points, float * covariance); - Vector3 computeCovariance(int n, const Vector3 * points, const float * weights, const Vector3 & metric, float * covariance); - - Vector4 computeCovariance(int n, const Vector4 * points, float * covariance); - Vector4 computeCovariance(int n, const Vector4 * points, const float * weights, const Vector4 & metric, float * covariance); - - Vector3 computePrincipalComponent_PowerMethod(int n, const Vector3 * points); - Vector3 computePrincipalComponent_PowerMethod(int n, const Vector3 * points, const float * weights, const Vector3 & metric); - - Vector3 computePrincipalComponent_EigenSolver(int n, const Vector3 * points); - Vector3 computePrincipalComponent_EigenSolver(int n, const Vector3 * points, const float * weights, const Vector3 & metric); - - Vector4 computePrincipalComponent_EigenSolver(int n, const Vector4 * points); - Vector4 computePrincipalComponent_EigenSolver(int n, const Vector4 * points, const float * weights, const Vector4 & metric); - - Vector3 computePrincipalComponent_SVD(int n, const Vector3 * points); - Vector4 computePrincipalComponent_SVD(int n, const Vector4 * points); - - Plane bestPlane(int n, const Vector3 * points); - bool isPlanar(int n, const Vector3 * points, float epsilon = NV_EPSILON); - - bool eigenSolveSymmetric3(const float matrix[6], float eigenValues[3], Vector3 eigenVectors[3]); - bool eigenSolveSymmetric4(const float matrix[10], float eigenValues[4], Vector4 eigenVectors[4]); - - // Returns number of clusters [1-4]. - int compute4Means(int n, const Vector3 * points, const float * weights, const Vector3 & metric, Vector3 * cluster); - } - -} // nv namespace - -#endif // NV_MATH_FITTING_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvmath/matrix.h b/3rdparty/bgfx/3rdparty/nvtt/nvmath/matrix.h deleted file mode 100644 index 901a982..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvmath/matrix.h +++ /dev/null @@ -1,112 +0,0 @@ -// This code is in the public domain -- castanyo@yahoo.es - -#ifndef NV_MATH_MATRIX_H -#define NV_MATH_MATRIX_H - -#include "vector.h" - -// - Matrices are stored in memory in *column major* order. -// - Points are to be though of as column vectors. -// - Transformation of a point p by a matrix M is: p' = M * p - -namespace nv -{ - enum identity_t { identity }; - - // 3x3 matrix. - class NVMATH_CLASS Matrix3 - { - public: - Matrix3(); - explicit Matrix3(float f); - explicit Matrix3(identity_t); - Matrix3(const Matrix3 & m); - Matrix3(Vector3::Arg v0, Vector3::Arg v1, Vector3::Arg v2); - - float data(uint idx) const; - float & data(uint idx); - float get(uint row, uint col) const; - float operator()(uint row, uint col) const; - float & operator()(uint row, uint col); - - Vector3 row(uint i) const; - Vector3 column(uint i) const; - - void operator*=(float s); - void operator/=(float s); - void operator+=(const Matrix3 & m); - void operator-=(const Matrix3 & m); - - void scale(float s); - void scale(Vector3::Arg s); - float determinant() const; - - private: - float m_data[9]; - }; - - // Solve equation system using LU decomposition and back-substitution. - extern bool solveLU(const Matrix3 & m, const Vector3 & b, Vector3 * x); - - // Solve equation system using Cramer's inverse. - extern bool solveCramer(const Matrix3 & A, const Vector3 & b, Vector3 * x); - - - // 4x4 matrix. - class NVMATH_CLASS Matrix - { - public: - typedef Matrix const & Arg; - - Matrix(); - explicit Matrix(float f); - explicit Matrix(identity_t); - Matrix(const Matrix3 & m); - Matrix(const Matrix & m); - Matrix(Vector4::Arg v0, Vector4::Arg v1, Vector4::Arg v2, Vector4::Arg v3); - //explicit Matrix(const float m[]); // m is assumed to contain 16 elements - - float data(uint idx) const; - float & data(uint idx); - float get(uint row, uint col) const; - float operator()(uint row, uint col) const; - float & operator()(uint row, uint col); - const float * ptr() const; - - Vector4 row(uint i) const; - Vector4 column(uint i) const; - - void zero(); - void identity(); - - void scale(float s); - void scale(Vector3::Arg s); - void translate(Vector3::Arg t); - void rotate(float theta, float v0, float v1, float v2); - float determinant() const; - - void operator+=(const Matrix & m); - void operator-=(const Matrix & m); - - void apply(Matrix::Arg m); - - private: - float m_data[16]; - }; - - // Solve equation system using LU decomposition and back-substitution. - extern bool solveLU(const Matrix & A, const Vector4 & b, Vector4 * x); - - // Solve equation system using Cramer's inverse. - extern bool solveCramer(const Matrix & A, const Vector4 & b, Vector4 * x); - - // Compute inverse using LU decomposition. - extern Matrix inverseLU(const Matrix & m); - - // Compute inverse using Gaussian elimination and partial pivoting. - extern Matrix inverse(const Matrix & m); - extern Matrix3 inverse(const Matrix3 & m); - -} // nv namespace - -#endif // NV_MATH_MATRIX_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvmath/matrix.inl b/3rdparty/bgfx/3rdparty/nvtt/nvmath/matrix.inl deleted file mode 100644 index 0996a4f..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvmath/matrix.inl +++ /dev/null @@ -1,1274 +0,0 @@ -// This code is in the public domain -- castanyo@yahoo.es - -#pragma once -#ifndef NV_MATH_MATRIX_INL -#define NV_MATH_MATRIX_INL - -#include "matrix.h" - -namespace nv -{ - inline Matrix3::Matrix3() {} - - inline Matrix3::Matrix3(float f) - { - for(int i = 0; i < 9; i++) { - m_data[i] = f; - } - } - - inline Matrix3::Matrix3(identity_t) - { - for(int i = 0; i < 3; i++) { - for(int j = 0; j < 3; j++) { - m_data[3*j+i] = (i == j) ? 1.0f : 0.0f; - } - } - } - - inline Matrix3::Matrix3(const Matrix3 & m) - { - for(int i = 0; i < 9; i++) { - m_data[i] = m.m_data[i]; - } - } - - inline Matrix3::Matrix3(Vector3::Arg v0, Vector3::Arg v1, Vector3::Arg v2) - { - m_data[0] = v0.x; m_data[1] = v0.y; m_data[2] = v0.z; - m_data[3] = v1.x; m_data[4] = v1.y; m_data[5] = v1.z; - m_data[6] = v2.x; m_data[7] = v2.y; m_data[8] = v2.z; - } - - inline float Matrix3::data(uint idx) const - { - nvDebugCheck(idx < 9); - return m_data[idx]; - } - inline float & Matrix3::data(uint idx) - { - nvDebugCheck(idx < 9); - return m_data[idx]; - } - inline float Matrix3::get(uint row, uint col) const - { - nvDebugCheck(row < 3 && col < 3); - return m_data[col * 3 + row]; - } - inline float Matrix3::operator()(uint row, uint col) const - { - nvDebugCheck(row < 3 && col < 3); - return m_data[col * 3 + row]; - } - inline float & Matrix3::operator()(uint row, uint col) - { - nvDebugCheck(row < 3 && col < 3); - return m_data[col * 3 + row]; - } - - inline Vector3 Matrix3::row(uint i) const - { - nvDebugCheck(i < 3); - return Vector3(get(i, 0), get(i, 1), get(i, 2)); - } - inline Vector3 Matrix3::column(uint i) const - { - nvDebugCheck(i < 3); - return Vector3(get(0, i), get(1, i), get(2, i)); - } - - inline void Matrix3::operator*=(float s) - { - for(int i = 0; i < 9; i++) { - m_data[i] *= s; - } - } - - inline void Matrix3::operator/=(float s) - { - float is = 1.0f /s; - for(int i = 0; i < 9; i++) { - m_data[i] *= is; - } - } - - inline void Matrix3::operator+=(const Matrix3 & m) - { - for(int i = 0; i < 9; i++) { - m_data[i] += m.m_data[i]; - } - } - - inline void Matrix3::operator-=(const Matrix3 & m) - { - for(int i = 0; i < 9; i++) { - m_data[i] -= m.m_data[i]; - } - } - - inline Matrix3 operator+(const Matrix3 & a, const Matrix3 & b) - { - Matrix3 m = a; - m += b; - return m; - } - - inline Matrix3 operator-(const Matrix3 & a, const Matrix3 & b) - { - Matrix3 m = a; - m -= b; - return m; - } - - inline Matrix3 operator*(const Matrix3 & a, float s) - { - Matrix3 m = a; - m *= s; - return m; - } - - inline Matrix3 operator*(float s, const Matrix3 & a) - { - Matrix3 m = a; - m *= s; - return m; - } - - inline Matrix3 operator/(const Matrix3 & a, float s) - { - Matrix3 m = a; - m /= s; - return m; - } - - inline Matrix3 mul(const Matrix3 & a, const Matrix3 & b) - { - Matrix3 m; - - for(int i = 0; i < 3; i++) { - const float ai0 = a(i,0), ai1 = a(i,1), ai2 = a(i,2); - m(i, 0) = ai0 * b(0,0) + ai1 * b(1,0) + ai2 * b(2,0); - m(i, 1) = ai0 * b(0,1) + ai1 * b(1,1) + ai2 * b(2,1); - m(i, 2) = ai0 * b(0,2) + ai1 * b(1,2) + ai2 * b(2,2); - } - - return m; - } - - inline Matrix3 operator*(const Matrix3 & a, const Matrix3 & b) - { - return mul(a, b); - } - - // Transform the given 3d vector with the given matrix. - inline Vector3 transform(const Matrix3 & m, const Vector3 & p) - { - return Vector3( - p.x * m(0,0) + p.y * m(0,1) + p.z * m(0,2), - p.x * m(1,0) + p.y * m(1,1) + p.z * m(1,2), - p.x * m(2,0) + p.y * m(2,1) + p.z * m(2,2)); - } - - inline void Matrix3::scale(float s) - { - for (int i = 0; i < 9; i++) { - m_data[i] *= s; - } - } - - inline void Matrix3::scale(Vector3::Arg s) - { - m_data[0] *= s.x; m_data[1] *= s.x; m_data[2] *= s.x; - m_data[3] *= s.y; m_data[4] *= s.y; m_data[5] *= s.y; - m_data[6] *= s.z; m_data[7] *= s.z; m_data[8] *= s.z; - } - - inline float Matrix3::determinant() const - { - return - get(0,0) * get(1,1) * get(2,2) + - get(0,1) * get(1,2) * get(2,0) + - get(0,2) * get(1,0) * get(2,1) - - get(0,2) * get(1,1) * get(2,0) - - get(0,1) * get(1,0) * get(2,2) - - get(0,0) * get(1,2) * get(2,1); - } - - // Inverse using Cramer's rule. - inline Matrix3 inverseCramer(const Matrix3 & m) - { - const float det = m.determinant(); - if (equal(det, 0.0f, 0.0f)) { - return Matrix3(0); - } - - Matrix3 r; - - r.data(0) = - m.data(5) * m.data(7) + m.data(4) * m.data(8); - r.data(1) = + m.data(5) * m.data(6) - m.data(3) * m.data(8); - r.data(2) = - m.data(4) * m.data(6) + m.data(3) * m.data(7); - - r.data(3) = + m.data(2) * m.data(7) - m.data(1) * m.data(8); - r.data(4) = - m.data(2) * m.data(6) + m.data(0) * m.data(8); - r.data(5) = + m.data(1) * m.data(6) - m.data(0) * m.data(7); - - r.data(6) = - m.data(2) * m.data(4) + m.data(1) * m.data(5); - r.data(7) = + m.data(2) * m.data(3) - m.data(0) * m.data(5); - r.data(8) = - m.data(1) * m.data(3) + m.data(0) * m.data(4); - - r.scale(1.0f / det); - - return r; - } - - - - inline Matrix::Matrix() - { - } - - inline Matrix::Matrix(float f) - { - for(int i = 0; i < 16; i++) { - m_data[i] = 0.0f; - } - } - - inline Matrix::Matrix(identity_t) - { - for(int i = 0; i < 4; i++) { - for(int j = 0; j < 4; j++) { - m_data[4*j+i] = (i == j) ? 1.0f : 0.0f; - } - } - } - - inline Matrix::Matrix(const Matrix & m) - { - for(int i = 0; i < 16; i++) { - m_data[i] = m.m_data[i]; - } - } - - inline Matrix::Matrix(const Matrix3 & m) - { - for(int i = 0; i < 3; i++) { - for(int j = 0; j < 3; j++) { - operator()(i, j) = m.get(i, j); - } - } - for(int i = 0; i < 4; i++) { - operator()(3, i) = 0; - operator()(i, 3) = 0; - } - } - - inline Matrix::Matrix(Vector4::Arg v0, Vector4::Arg v1, Vector4::Arg v2, Vector4::Arg v3) - { - m_data[ 0] = v0.x; m_data[ 1] = v0.y; m_data[ 2] = v0.z; m_data[ 3] = v0.w; - m_data[ 4] = v1.x; m_data[ 5] = v1.y; m_data[ 6] = v1.z; m_data[ 7] = v1.w; - m_data[ 8] = v2.x; m_data[ 9] = v2.y; m_data[10] = v2.z; m_data[11] = v2.w; - m_data[12] = v3.x; m_data[13] = v3.y; m_data[14] = v3.z; m_data[15] = v3.w; - } - - /*inline Matrix::Matrix(const float m[]) - { - for(int i = 0; i < 16; i++) { - m_data[i] = m[i]; - } - }*/ - - - // Accessors - inline float Matrix::data(uint idx) const - { - nvDebugCheck(idx < 16); - return m_data[idx]; - } - inline float & Matrix::data(uint idx) - { - nvDebugCheck(idx < 16); - return m_data[idx]; - } - inline float Matrix::get(uint row, uint col) const - { - nvDebugCheck(row < 4 && col < 4); - return m_data[col * 4 + row]; - } - inline float Matrix::operator()(uint row, uint col) const - { - nvDebugCheck(row < 4 && col < 4); - return m_data[col * 4 + row]; - } - inline float & Matrix::operator()(uint row, uint col) - { - nvDebugCheck(row < 4 && col < 4); - return m_data[col * 4 + row]; - } - - inline const float * Matrix::ptr() const - { - return m_data; - } - - inline Vector4 Matrix::row(uint i) const - { - nvDebugCheck(i < 4); - return Vector4(get(i, 0), get(i, 1), get(i, 2), get(i, 3)); - } - - inline Vector4 Matrix::column(uint i) const - { - nvDebugCheck(i < 4); - return Vector4(get(0, i), get(1, i), get(2, i), get(3, i)); - } - - inline void Matrix::zero() - { - m_data[0] = 0; m_data[1] = 0; m_data[2] = 0; m_data[3] = 0; - m_data[4] = 0; m_data[5] = 0; m_data[6] = 0; m_data[7] = 0; - m_data[8] = 0; m_data[9] = 0; m_data[10] = 0; m_data[11] = 0; - m_data[12] = 0; m_data[13] = 0; m_data[14] = 0; m_data[15] = 0; - } - - inline void Matrix::identity() - { - m_data[0] = 1; m_data[1] = 0; m_data[2] = 0; m_data[3] = 0; - m_data[4] = 0; m_data[5] = 1; m_data[6] = 0; m_data[7] = 0; - m_data[8] = 0; m_data[9] = 0; m_data[10] = 1; m_data[11] = 0; - m_data[12] = 0; m_data[13] = 0; m_data[14] = 0; m_data[15] = 1; - } - - // Apply scale. - inline void Matrix::scale(float s) - { - m_data[0] *= s; m_data[1] *= s; m_data[2] *= s; m_data[3] *= s; - m_data[4] *= s; m_data[5] *= s; m_data[6] *= s; m_data[7] *= s; - m_data[8] *= s; m_data[9] *= s; m_data[10] *= s; m_data[11] *= s; - m_data[12] *= s; m_data[13] *= s; m_data[14] *= s; m_data[15] *= s; - } - - // Apply scale. - inline void Matrix::scale(Vector3::Arg s) - { - m_data[0] *= s.x; m_data[1] *= s.x; m_data[2] *= s.x; m_data[3] *= s.x; - m_data[4] *= s.y; m_data[5] *= s.y; m_data[6] *= s.y; m_data[7] *= s.y; - m_data[8] *= s.z; m_data[9] *= s.z; m_data[10] *= s.z; m_data[11] *= s.z; - } - - // Apply translation. - inline void Matrix::translate(Vector3::Arg t) - { - m_data[12] = m_data[0] * t.x + m_data[4] * t.y + m_data[8] * t.z + m_data[12]; - m_data[13] = m_data[1] * t.x + m_data[5] * t.y + m_data[9] * t.z + m_data[13]; - m_data[14] = m_data[2] * t.x + m_data[6] * t.y + m_data[10] * t.z + m_data[14]; - m_data[15] = m_data[3] * t.x + m_data[7] * t.y + m_data[11] * t.z + m_data[15]; - } - - Matrix rotation(float theta, float v0, float v1, float v2); - - // Apply rotation. - inline void Matrix::rotate(float theta, float v0, float v1, float v2) - { - Matrix R(rotation(theta, v0, v1, v2)); - apply(R); - } - - // Apply transform. - inline void Matrix::apply(Matrix::Arg m) - { - nvDebugCheck(this != &m); - - for(int i = 0; i < 4; i++) { - const float ai0 = get(i,0), ai1 = get(i,1), ai2 = get(i,2), ai3 = get(i,3); - m_data[0 + i] = ai0 * m(0,0) + ai1 * m(1,0) + ai2 * m(2,0) + ai3 * m(3,0); - m_data[4 + i] = ai0 * m(0,1) + ai1 * m(1,1) + ai2 * m(2,1) + ai3 * m(3,1); - m_data[8 + i] = ai0 * m(0,2) + ai1 * m(1,2) + ai2 * m(2,2) + ai3 * m(3,2); - m_data[12+ i] = ai0 * m(0,3) + ai1 * m(1,3) + ai2 * m(2,3) + ai3 * m(3,3); - } - } - - // Get scale matrix. - inline Matrix scale(Vector3::Arg s) - { - Matrix m(identity); - m(0,0) = s.x; - m(1,1) = s.y; - m(2,2) = s.z; - return m; - } - - // Get scale matrix. - inline Matrix scale(float s) - { - Matrix m(identity); - m(0,0) = m(1,1) = m(2,2) = s; - return m; - } - - // Get translation matrix. - inline Matrix translation(Vector3::Arg t) - { - Matrix m(identity); - m(0,3) = t.x; - m(1,3) = t.y; - m(2,3) = t.z; - return m; - } - - // Get rotation matrix. - inline Matrix rotation(float theta, float v0, float v1, float v2) - { - float cost = cosf(theta); - float sint = sinf(theta); - - Matrix m(identity); - - if( 1 == v0 && 0 == v1 && 0 == v2 ) { - m(1,1) = cost; m(2,1) = -sint; - m(1,2) = sint; m(2,2) = cost; - } - else if( 0 == v0 && 1 == v1 && 0 == v2 ) { - m(0,0) = cost; m(2,0) = sint; - m(1,2) = -sint; m(2,2) = cost; - } - else if( 0 == v0 && 0 == v1 && 1 == v2 ) { - m(0,0) = cost; m(1,0) = -sint; - m(0,1) = sint; m(1,1) = cost; - } - else { - float a2, b2, c2; - a2 = v0 * v0; - b2 = v1 * v1; - c2 = v2 * v2; - - float iscale = 1.0f / sqrtf(a2 + b2 + c2); - v0 *= iscale; - v1 *= iscale; - v2 *= iscale; - - float abm, acm, bcm; - float mcos, asin, bsin, csin; - mcos = 1.0f - cost; - abm = v0 * v1 * mcos; - acm = v0 * v2 * mcos; - bcm = v1 * v2 * mcos; - asin = v0 * sint; - bsin = v1 * sint; - csin = v2 * sint; - m(0,0) = a2 * mcos + cost; - m(1,0) = abm - csin; - m(2,0) = acm + bsin; - m(3,0) = abm + csin; - m(1,1) = b2 * mcos + cost; - m(2,1) = bcm - asin; - m(3,1) = acm - bsin; - m(1,2) = bcm + asin; - m(2,2) = c2 * mcos + cost; - } - return m; - } - - //Matrix rotation(float yaw, float pitch, float roll); - //Matrix skew(float angle, Vector3::Arg v1, Vector3::Arg v2); - - // Get frustum matrix. - inline Matrix frustum(float xmin, float xmax, float ymin, float ymax, float zNear, float zFar) - { - Matrix m(0.0f); - - float doubleznear = 2.0f * zNear; - float one_deltax = 1.0f / (xmax - xmin); - float one_deltay = 1.0f / (ymax - ymin); - float one_deltaz = 1.0f / (zFar - zNear); - - m(0,0) = doubleznear * one_deltax; - m(1,1) = doubleznear * one_deltay; - m(0,2) = (xmax + xmin) * one_deltax; - m(1,2) = (ymax + ymin) * one_deltay; - m(2,2) = -(zFar + zNear) * one_deltaz; - m(3,2) = -1.0f; - m(2,3) = -(zFar * doubleznear) * one_deltaz; - - return m; - } - - // Get inverse frustum matrix. - inline Matrix frustumInverse(float xmin, float xmax, float ymin, float ymax, float zNear, float zFar) - { - Matrix m(0.0f); - - float one_doubleznear = 1.0f / (2.0f * zNear); - float one_doubleznearzfar = 1.0f / (2.0f * zNear * zFar); - - m(0,0) = (xmax - xmin) * one_doubleznear; - m(0,3) = (xmax + xmin) * one_doubleznear; - m(1,1) = (ymax - ymin) * one_doubleznear; - m(1,3) = (ymax + ymin) * one_doubleznear; - m(2,3) = -1; - m(3,2) = -(zFar - zNear) * one_doubleznearzfar; - m(3,3) = (zFar + zNear) * one_doubleznearzfar; - - return m; - } - - // Get infinite frustum matrix. - inline Matrix frustum(float xmin, float xmax, float ymin, float ymax, float zNear) - { - Matrix m(0.0f); - - float doubleznear = 2.0f * zNear; - float one_deltax = 1.0f / (xmax - xmin); - float one_deltay = 1.0f / (ymax - ymin); - float nudge = 1.0; // 0.999; - - m(0,0) = doubleznear * one_deltax; - m(1,1) = doubleznear * one_deltay; - m(0,2) = (xmax + xmin) * one_deltax; - m(1,2) = (ymax + ymin) * one_deltay; - m(2,2) = -1.0f * nudge; - m(3,2) = -1.0f; - m(2,3) = -doubleznear * nudge; - - return m; - } - - // Get perspective matrix. - inline Matrix perspective(float fovy, float aspect, float zNear, float zFar) - { - float xmax = zNear * tanf(fovy / 2); - float xmin = -xmax; - - float ymax = xmax / aspect; - float ymin = -ymax; - - return frustum(xmin, xmax, ymin, ymax, zNear, zFar); - } - - // Get inverse perspective matrix. - inline Matrix perspectiveInverse(float fovy, float aspect, float zNear, float zFar) - { - float xmax = zNear * tanf(fovy / 2); - float xmin = -xmax; - - float ymax = xmax / aspect; - float ymin = -ymax; - - return frustumInverse(xmin, xmax, ymin, ymax, zNear, zFar); - } - - // Get infinite perspective matrix. - inline Matrix perspective(float fovy, float aspect, float zNear) - { - float x = zNear * tanf(fovy / 2); - float y = x / aspect; - return frustum( -x, x, -y, y, zNear ); - } - - // Get matrix determinant. - inline float Matrix::determinant() const - { - return - m_data[3] * m_data[6] * m_data[ 9] * m_data[12] - m_data[2] * m_data[7] * m_data[ 9] * m_data[12] - m_data[3] * m_data[5] * m_data[10] * m_data[12] + m_data[1] * m_data[7] * m_data[10] * m_data[12] + - m_data[2] * m_data[5] * m_data[11] * m_data[12] - m_data[1] * m_data[6] * m_data[11] * m_data[12] - m_data[3] * m_data[6] * m_data[ 8] * m_data[13] + m_data[2] * m_data[7] * m_data[ 8] * m_data[13] + - m_data[3] * m_data[4] * m_data[10] * m_data[13] - m_data[0] * m_data[7] * m_data[10] * m_data[13] - m_data[2] * m_data[4] * m_data[11] * m_data[13] + m_data[0] * m_data[6] * m_data[11] * m_data[13] + - m_data[3] * m_data[5] * m_data[ 8] * m_data[14] - m_data[1] * m_data[7] * m_data[ 8] * m_data[14] - m_data[3] * m_data[4] * m_data[ 9] * m_data[14] + m_data[0] * m_data[7] * m_data[ 9] * m_data[14] + - m_data[1] * m_data[4] * m_data[11] * m_data[14] - m_data[0] * m_data[5] * m_data[11] * m_data[14] - m_data[2] * m_data[5] * m_data[ 8] * m_data[15] + m_data[1] * m_data[6] * m_data[ 8] * m_data[15] + - m_data[2] * m_data[4] * m_data[ 9] * m_data[15] - m_data[0] * m_data[6] * m_data[ 9] * m_data[15] - m_data[1] * m_data[4] * m_data[10] * m_data[15] + m_data[0] * m_data[5] * m_data[10] * m_data[15]; - } - - inline Matrix transpose(Matrix::Arg m) - { - Matrix r; - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 4; j++) - { - r(i, j) = m(j, i); - } - } - return r; - } - - // Inverse using Cramer's rule. - inline Matrix inverseCramer(Matrix::Arg m) - { - Matrix r; - r.data( 0) = m.data(6)*m.data(11)*m.data(13) - m.data(7)*m.data(10)*m.data(13) + m.data(7)*m.data(9)*m.data(14) - m.data(5)*m.data(11)*m.data(14) - m.data(6)*m.data(9)*m.data(15) + m.data(5)*m.data(10)*m.data(15); - r.data( 1) = m.data(3)*m.data(10)*m.data(13) - m.data(2)*m.data(11)*m.data(13) - m.data(3)*m.data(9)*m.data(14) + m.data(1)*m.data(11)*m.data(14) + m.data(2)*m.data(9)*m.data(15) - m.data(1)*m.data(10)*m.data(15); - r.data( 2) = m.data(2)*m.data( 7)*m.data(13) - m.data(3)*m.data( 6)*m.data(13) + m.data(3)*m.data(5)*m.data(14) - m.data(1)*m.data( 7)*m.data(14) - m.data(2)*m.data(5)*m.data(15) + m.data(1)*m.data( 6)*m.data(15); - r.data( 3) = m.data(3)*m.data( 6)*m.data( 9) - m.data(2)*m.data( 7)*m.data( 9) - m.data(3)*m.data(5)*m.data(10) + m.data(1)*m.data( 7)*m.data(10) + m.data(2)*m.data(5)*m.data(11) - m.data(1)*m.data( 6)*m.data(11); - r.data( 4) = m.data(7)*m.data(10)*m.data(12) - m.data(6)*m.data(11)*m.data(12) - m.data(7)*m.data(8)*m.data(14) + m.data(4)*m.data(11)*m.data(14) + m.data(6)*m.data(8)*m.data(15) - m.data(4)*m.data(10)*m.data(15); - r.data( 5) = m.data(2)*m.data(11)*m.data(12) - m.data(3)*m.data(10)*m.data(12) + m.data(3)*m.data(8)*m.data(14) - m.data(0)*m.data(11)*m.data(14) - m.data(2)*m.data(8)*m.data(15) + m.data(0)*m.data(10)*m.data(15); - r.data( 6) = m.data(3)*m.data( 6)*m.data(12) - m.data(2)*m.data( 7)*m.data(12) - m.data(3)*m.data(4)*m.data(14) + m.data(0)*m.data( 7)*m.data(14) + m.data(2)*m.data(4)*m.data(15) - m.data(0)*m.data( 6)*m.data(15); - r.data( 7) = m.data(2)*m.data( 7)*m.data( 8) - m.data(3)*m.data( 6)*m.data( 8) + m.data(3)*m.data(4)*m.data(10) - m.data(0)*m.data( 7)*m.data(10) - m.data(2)*m.data(4)*m.data(11) + m.data(0)*m.data( 6)*m.data(11); - r.data( 8) = m.data(5)*m.data(11)*m.data(12) - m.data(7)*m.data( 9)*m.data(12) + m.data(7)*m.data(8)*m.data(13) - m.data(4)*m.data(11)*m.data(13) - m.data(5)*m.data(8)*m.data(15) + m.data(4)*m.data( 9)*m.data(15); - r.data( 9) = m.data(3)*m.data( 9)*m.data(12) - m.data(1)*m.data(11)*m.data(12) - m.data(3)*m.data(8)*m.data(13) + m.data(0)*m.data(11)*m.data(13) + m.data(1)*m.data(8)*m.data(15) - m.data(0)*m.data( 9)*m.data(15); - r.data(10) = m.data(1)*m.data( 7)*m.data(12) - m.data(3)*m.data( 5)*m.data(12) + m.data(3)*m.data(4)*m.data(13) - m.data(0)*m.data( 7)*m.data(13) - m.data(1)*m.data(4)*m.data(15) + m.data(0)*m.data( 5)*m.data(15); - r.data(11) = m.data(3)*m.data( 5)*m.data( 8) - m.data(1)*m.data( 7)*m.data( 8) - m.data(3)*m.data(4)*m.data( 9) + m.data(0)*m.data( 7)*m.data( 9) + m.data(1)*m.data(4)*m.data(11) - m.data(0)*m.data( 5)*m.data(11); - r.data(12) = m.data(6)*m.data( 9)*m.data(12) - m.data(5)*m.data(10)*m.data(12) - m.data(6)*m.data(8)*m.data(13) + m.data(4)*m.data(10)*m.data(13) + m.data(5)*m.data(8)*m.data(14) - m.data(4)*m.data( 9)*m.data(14); - r.data(13) = m.data(1)*m.data(10)*m.data(12) - m.data(2)*m.data( 9)*m.data(12) + m.data(2)*m.data(8)*m.data(13) - m.data(0)*m.data(10)*m.data(13) - m.data(1)*m.data(8)*m.data(14) + m.data(0)*m.data( 9)*m.data(14); - r.data(14) = m.data(2)*m.data( 5)*m.data(12) - m.data(1)*m.data( 6)*m.data(12) - m.data(2)*m.data(4)*m.data(13) + m.data(0)*m.data( 6)*m.data(13) + m.data(1)*m.data(4)*m.data(14) - m.data(0)*m.data( 5)*m.data(14); - r.data(15) = m.data(1)*m.data( 6)*m.data( 8) - m.data(2)*m.data( 5)*m.data( 8) + m.data(2)*m.data(4)*m.data( 9) - m.data(0)*m.data( 6)*m.data( 9) - m.data(1)*m.data(4)*m.data(10) + m.data(0)*m.data( 5)*m.data(10); - r.scale(1.0f / m.determinant()); - return r; - } - - inline Matrix isometryInverse(Matrix::Arg m) - { - Matrix r(identity); - - // transposed 3x3 upper left matrix - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 3; j++) - { - r(i, j) = m(j, i); - } - } - - // translate by the negative offsets - r.translate(-Vector3(m.data(12), m.data(13), m.data(14))); - - return r; - } - - // Transform the given 3d point with the given matrix. - inline Vector3 transformPoint(Matrix::Arg m, Vector3::Arg p) - { - return Vector3( - p.x * m(0,0) + p.y * m(0,1) + p.z * m(0,2) + m(0,3), - p.x * m(1,0) + p.y * m(1,1) + p.z * m(1,2) + m(1,3), - p.x * m(2,0) + p.y * m(2,1) + p.z * m(2,2) + m(2,3)); - } - - // Transform the given 3d vector with the given matrix. - inline Vector3 transformVector(Matrix::Arg m, Vector3::Arg p) - { - return Vector3( - p.x * m(0,0) + p.y * m(0,1) + p.z * m(0,2), - p.x * m(1,0) + p.y * m(1,1) + p.z * m(1,2), - p.x * m(2,0) + p.y * m(2,1) + p.z * m(2,2)); - } - - // Transform the given 4d vector with the given matrix. - inline Vector4 transform(Matrix::Arg m, Vector4::Arg p) - { - return Vector4( - p.x * m(0,0) + p.y * m(0,1) + p.z * m(0,2) + p.w * m(0,3), - p.x * m(1,0) + p.y * m(1,1) + p.z * m(1,2) + p.w * m(1,3), - p.x * m(2,0) + p.y * m(2,1) + p.z * m(2,2) + p.w * m(2,3), - p.x * m(3,0) + p.y * m(3,1) + p.z * m(3,2) + p.w * m(3,3)); - } - - inline Matrix mul(Matrix::Arg a, Matrix::Arg b) - { - // @@ Is this the right order? mul(a, b) = b * a - Matrix m = a; - m.apply(b); - return m; - } - - inline void Matrix::operator+=(const Matrix & m) - { - for(int i = 0; i < 16; i++) { - m_data[i] += m.m_data[i]; - } - } - - inline void Matrix::operator-=(const Matrix & m) - { - for(int i = 0; i < 16; i++) { - m_data[i] -= m.m_data[i]; - } - } - - inline Matrix operator+(const Matrix & a, const Matrix & b) - { - Matrix m = a; - m += b; - return m; - } - - inline Matrix operator-(const Matrix & a, const Matrix & b) - { - Matrix m = a; - m -= b; - return m; - } - - -} // nv namespace - - -#if 0 // old code. -/** @name Special matrices. */ -//@{ -/** Generate a translation matrix. */ -void TranslationMatrix(const Vec3 & v) { - data[0] = 1; data[1] = 0; data[2] = 0; data[3] = 0; - data[4] = 0; data[5] = 1; data[6] = 0; data[7] = 0; - data[8] = 0; data[9] = 0; data[10] = 1; data[11] = 0; - data[12] = v.x; data[13] = v.y; data[14] = v.z; data[15] = 1; -} - -/** Rotate theta degrees around v. */ -void RotationMatrix( float theta, float v0, float v1, float v2 ) { - float cost = cos(theta); - float sint = sin(theta); - - if( 1 == v0 && 0 == v1 && 0 == v2 ) { - data[0] = 1.0f; data[1] = 0.0f; data[2] = 0.0f; data[3] = 0.0f; - data[4] = 0.0f; data[5] = cost; data[6] = -sint;data[7] = 0.0f; - data[8] = 0.0f; data[9] = sint; data[10] = cost;data[11] = 0.0f; - data[12] = 0.0f;data[13] = 0.0f;data[14] = 0.0f;data[15] = 1.0f; - } - else if( 0 == v0 && 1 == v1 && 0 == v2 ) { - data[0] = cost; data[1] = 0.0f; data[2] = sint; data[3] = 0.0f; - data[4] = 0.0f; data[5] = 1.0f; data[6] = 0.0f; data[7] = 0.0f; - data[8] = -sint;data[9] = 0.0f;data[10] = cost; data[11] = 0.0f; - data[12] = 0.0f;data[13] = 0.0f;data[14] = 0.0f;data[15] = 1.0f; - } - else if( 0 == v0 && 0 == v1 && 1 == v2 ) { - data[0] = cost; data[1] = -sint;data[2] = 0.0f; data[3] = 0.0f; - data[4] = sint; data[5] = cost; data[6] = 0.0f; data[7] = 0.0f; - data[8] = 0.0f; data[9] = 0.0f; data[10] = 1.0f;data[11] = 0.0f; - data[12] = 0.0f;data[13] = 0.0f;data[14] = 0.0f;data[15] = 1.0f; - } - else { - //we need scale a,b,c to unit length. - float a2, b2, c2; - a2 = v0 * v0; - b2 = v1 * v1; - c2 = v2 * v2; - - float iscale = 1.0f / sqrtf(a2 + b2 + c2); - v0 *= iscale; - v1 *= iscale; - v2 *= iscale; - - float abm, acm, bcm; - float mcos, asin, bsin, csin; - mcos = 1.0f - cost; - abm = v0 * v1 * mcos; - acm = v0 * v2 * mcos; - bcm = v1 * v2 * mcos; - asin = v0 * sint; - bsin = v1 * sint; - csin = v2 * sint; - data[0] = a2 * mcos + cost; - data[1] = abm - csin; - data[2] = acm + bsin; - data[3] = abm + csin; - data[4] = 0.0f; - data[5] = b2 * mcos + cost; - data[6] = bcm - asin; - data[7] = acm - bsin; - data[8] = 0.0f; - data[9] = bcm + asin; - data[10] = c2 * mcos + cost; - data[11] = 0.0f; - data[12] = 0.0f; - data[13] = 0.0f; - data[14] = 0.0f; - data[15] = 1.0f; - } -} - -/* -void SkewMatrix(float angle, const Vec3 & v1, const Vec3 & v2) { -v1.Normalize(); -v2.Normalize(); - -Vec3 v3; -v3.Cross(v1, v2); -v3.Normalize(); - -// Get skew factor. -float costheta = Vec3DotProduct(v1, v2); -float sintheta = Real.Sqrt(1 - costheta * costheta); -float skew = tan(Trig.DegreesToRadians(angle) + acos(sintheta)) * sintheta - costheta; - -// Build orthonormal matrix. -v1 = FXVector3.Cross(v3, v2); -v1.Normalize(); - -Matrix R = Matrix::Identity; -R[0, 0] = v3.X; // Not sure this is in the correct order... -R[1, 0] = v3.Y; -R[2, 0] = v3.Z; -R[0, 1] = v1.X; -R[1, 1] = v1.Y; -R[2, 1] = v1.Z; -R[0, 2] = v2.X; -R[1, 2] = v2.Y; -R[2, 2] = v2.Z; - -// Build skew matrix. -Matrix S = Matrix::Identity; -S[2, 1] = -skew; - -// Return skew transform. -return R * S * R.Transpose; // Not sure this is in the correct order... -} -*/ - -/** -* Generate rotation matrix for the euler angles. This is the same as computing -* 3 rotation matrices and multiplying them together in our custom order. -* -* @todo Have to recompute this code for our new convention. -**/ -void RotationMatrix( float yaw, float pitch, float roll ) { - float sy = sin(yaw+ToRadian(90)); - float cy = cos(yaw+ToRadian(90)); - float sp = sin(pitch-ToRadian(90)); - float cp = cos(pitch-ToRadian(90)); - float sr = sin(roll); - float cr = cos(roll); - - data[0] = cr*cy + sr*sp*sy; - data[1] = cp*sy; - data[2] = -sr*cy + cr*sp*sy; - data[3] = 0; - - data[4] = -cr*sy + sr*sp*cy; - data[5] = cp*cy; - data[6] = sr*sy + cr*sp*cy; - data[7] = 0; - - data[8] = sr*cp; - data[9] = -sp; - data[10] = cr*cp; - data[11] = 0; - - data[12] = 0; - data[13] = 0; - data[14] = 0; - data[15] = 1; -} - -/** Create a frustum matrix with the far plane at the infinity. */ -void Frustum( float xmin, float xmax, float ymin, float ymax, float zNear, float zFar ) { - float one_deltax, one_deltay, one_deltaz, doubleznear; - - doubleznear = 2.0f * zNear; - one_deltax = 1.0f / (xmax - xmin); - one_deltay = 1.0f / (ymax - ymin); - one_deltaz = 1.0f / (zFar - zNear); - - data[0] = (float)(doubleznear * one_deltax); - data[1] = 0.0f; - data[2] = 0.0f; - data[3] = 0.0f; - data[4] = 0.0f; - data[5] = (float)(doubleznear * one_deltay); - data[6] = 0.f; - data[7] = 0.f; - data[8] = (float)((xmax + xmin) * one_deltax); - data[9] = (float)((ymax + ymin) * one_deltay); - data[10] = (float)(-(zFar + zNear) * one_deltaz); - data[11] = -1.f; - data[12] = 0.f; - data[13] = 0.f; - data[14] = (float)(-(zFar * doubleznear) * one_deltaz); - data[15] = 0.f; -} - -/** Create a frustum matrix with the far plane at the infinity. */ -void FrustumInf( float xmin, float xmax, float ymin, float ymax, float zNear ) { - float one_deltax, one_deltay, doubleznear, nudge; - - doubleznear = 2.0f * zNear; - one_deltax = 1.0f / (xmax - xmin); - one_deltay = 1.0f / (ymax - ymin); - nudge = 1.0; // 0.999; - - data[0] = doubleznear * one_deltax; - data[1] = 0.0f; - data[2] = 0.0f; - data[3] = 0.0f; - - data[4] = 0.0f; - data[5] = doubleznear * one_deltay; - data[6] = 0.f; - data[7] = 0.f; - - data[8] = (xmax + xmin) * one_deltax; - data[9] = (ymax + ymin) * one_deltay; - data[10] = -1.0f * nudge; - data[11] = -1.0f; - - data[12] = 0.f; - data[13] = 0.f; - data[14] = -doubleznear * nudge; - data[15] = 0.f; -} - -/** Create an inverse frustum matrix with the far plane at the infinity. */ -void FrustumInfInv( float left, float right, float bottom, float top, float zNear ) { - // this matrix is wrong (not tested floatly) I think it should be transposed. - data[0] = (right - left) / (2 * zNear); - data[1] = 0; - data[2] = 0; - data[3] = (right + left) / (2 * zNear); - data[4] = 0; - data[5] = (top - bottom) / (2 * zNear); - data[6] = 0; - data[7] = (top + bottom) / (2 * zNear); - data[8] = 0; - data[9] = 0; - data[10] = 0; - data[11] = -1; - data[12] = 0; - data[13] = 0; - data[14] = -1 / (2 * zNear); - data[15] = 1 / (2 * zNear); -} - -/** Create an homogeneous projection matrix. */ -void Perspective( float fov, float aspect, float zNear, float zFar ) { - float xmin, xmax, ymin, ymax; - - xmax = zNear * tan( fov/2 ); - xmin = -xmax; - - ymax = xmax / aspect; - ymin = -ymax; - - Frustum(xmin, xmax, ymin, ymax, zNear, zFar); -} - -/** Create a projection matrix with the far plane at the infinity. */ -void PerspectiveInf( float fov, float aspect, float zNear ) { - float x = zNear * tan( fov/2 ); - float y = x / aspect; - FrustumInf( -x, x, -y, y, zNear ); -} - -/** Create an inverse projection matrix with far plane at the infinity. */ -void PerspectiveInfInv( float fov, float aspect, float zNear ) { - float x = zNear * tan( fov/2 ); - float y = x / aspect; - FrustumInfInv( -x, x, -y, y, zNear ); -} - -/** Build bone matrix from quatertion and offset. */ -void BoneMatrix(const Quat & q, const Vec3 & offset) { - float x2, y2, z2, xx, xy, xz, yy, yz, zz, wx, wy, wz; - - // calculate coefficients - x2 = q.x + q.x; - y2 = q.y + q.y; - z2 = q.z + q.z; - - xx = q.x * x2; xy = q.x * y2; xz = q.x * z2; - yy = q.y * y2; yz = q.y * z2; zz = q.z * z2; - wx = q.w * x2; wy = q.w * y2; wz = q.w * z2; - - data[0] = 1.0f - (yy + zz); - data[1] = xy - wz; - data[2] = xz + wy; - data[3] = 0.0f; - - data[4] = xy + wz; - data[5] = 1.0f - (xx + zz); - data[6] = yz - wx; - data[7] = 0.0f; - - data[8] = xz - wy; - data[9] = yz + wx; - data[10] = 1.0f - (xx + yy); - data[11] = 0.0f; - - data[12] = offset.x; - data[13] = offset.y; - data[14] = offset.z; - data[15] = 1.0f; -} - -//@} - - -/** @name Transformations: */ -//@{ - -/** Apply a general scale. */ -void Scale( float x, float y, float z ) { - data[0] *= x; data[4] *= y; data[8] *= z; - data[1] *= x; data[5] *= y; data[9] *= z; - data[2] *= x; data[6] *= y; data[10] *= z; - data[3] *= x; data[7] *= y; data[11] *= z; -} - -/** Apply a rotation of theta degrees around the axis v*/ -void Rotate( float theta, const Vec3 & v ) { - Matrix b; - b.RotationMatrix( theta, v[0], v[1], v[2] ); - Multiply4x3( b ); -} - -/** Apply a rotation of theta degrees around the axis v*/ -void Rotate( float theta, float v0, float v1, float v2 ) { - Matrix b; - b.RotationMatrix( theta, v0, v1, v2 ); - Multiply4x3( b ); -} - -/** -* Translate the matrix by t. This is the same as multiplying by a -* translation matrix with the given offset. -* this = T * this -*/ -void Translate( const Vec3 &t ) { - data[12] = data[0] * t.x + data[4] * t.y + data[8] * t.z + data[12]; - data[13] = data[1] * t.x + data[5] * t.y + data[9] * t.z + data[13]; - data[14] = data[2] * t.x + data[6] * t.y + data[10] * t.z + data[14]; - data[15] = data[3] * t.x + data[7] * t.y + data[11] * t.z + data[15]; -} - -/** -* Translate the matrix by x, y, z. This is the same as multiplying by a -* translation matrix with the given offsets. -*/ -void Translate( float x, float y, float z ) { - data[12] = data[0] * x + data[4] * y + data[8] * z + data[12]; - data[13] = data[1] * x + data[5] * y + data[9] * z + data[13]; - data[14] = data[2] * x + data[6] * y + data[10] * z + data[14]; - data[15] = data[3] * x + data[7] * y + data[11] * z + data[15]; -} - -/** Compute the transposed matrix. */ -void Transpose() { - piSwap(data[1], data[4]); - piSwap(data[2], data[8]); - piSwap(data[6], data[9]); - piSwap(data[3], data[12]); - piSwap(data[7], data[13]); - piSwap(data[11], data[14]); -} - -/** Compute the inverse of a rigid-body/isometry/orthonormal matrix. */ -void IsometryInverse() { - // transposed 3x3 upper left matrix - piSwap(data[1], data[4]); - piSwap(data[2], data[8]); - piSwap(data[6], data[9]); - - // translate by the negative offsets - Vec3 v(-data[12], -data[13], -data[14]); - data[12] = data[13] = data[14] = 0; - Translate(v); -} - -/** Compute the inverse of the affine portion of this matrix. */ -void AffineInverse() { - data[12] = data[13] = data[14] = 0; - Transpose(); -} -//@} - -/** @name Matrix operations: */ -//@{ - -/** Return the determinant of this matrix. */ -float Determinant() const { - return data[0] * data[5] * data[10] * data[15] + - data[1] * data[6] * data[11] * data[12] + - data[2] * data[7] * data[ 8] * data[13] + - data[3] * data[4] * data[ 9] * data[14] - - data[3] * data[6] * data[ 9] * data[12] - - data[2] * data[5] * data[ 8] * data[15] - - data[1] * data[4] * data[11] * data[14] - - data[0] * data[7] * data[10] * data[12]; -} - - -/** Standard matrix product: this *= B. */ -void Multiply4x4( const Matrix & restrict B ) { - Multiply4x4(*this, B); -} - -/** Standard matrix product: this = A * B. this != B*/ -void Multiply4x4( const Matrix & A, const Matrix & restrict B ) { - piDebugCheck(this != &B); - - for(int i = 0; i < 4; i++) { - const float ai0 = A(i,0), ai1 = A(i,1), ai2 = A(i,2), ai3 = A(i,3); - GetElem(i,0) = ai0 * B(0,0) + ai1 * B(1,0) + ai2 * B(2,0) + ai3 * B(3,0); - GetElem(i,1) = ai0 * B(0,1) + ai1 * B(1,1) + ai2 * B(2,1) + ai3 * B(3,1); - GetElem(i,2) = ai0 * B(0,2) + ai1 * B(1,2) + ai2 * B(2,2) + ai3 * B(3,2); - GetElem(i,3) = ai0 * B(0,3) + ai1 * B(1,3) + ai2 * B(2,3) + ai3 * B(3,3); - } - - /* Unrolled but does not allow this == A - data[0] = A.data[0] * B.data[0] + A.data[4] * B.data[1] + A.data[8] * B.data[2] + A.data[12] * B.data[3]; - data[1] = A.data[1] * B.data[0] + A.data[5] * B.data[1] + A.data[9] * B.data[2] + A.data[13] * B.data[3]; - data[2] = A.data[2] * B.data[0] + A.data[6] * B.data[1] + A.data[10] * B.data[2] + A.data[14] * B.data[3]; - data[3] = A.data[3] * B.data[0] + A.data[7] * B.data[1] + A.data[11] * B.data[2] + A.data[15] * B.data[3]; - data[4] = A.data[0] * B.data[4] + A.data[4] * B.data[5] + A.data[8] * B.data[6] + A.data[12] * B.data[7]; - data[5] = A.data[1] * B.data[4] + A.data[5] * B.data[5] + A.data[9] * B.data[6] + A.data[13] * B.data[7]; - data[6] = A.data[2] * B.data[4] + A.data[6] * B.data[5] + A.data[10] * B.data[6] + A.data[14] * B.data[7]; - data[7] = A.data[3] * B.data[4] + A.data[7] * B.data[5] + A.data[11] * B.data[6] + A.data[15] * B.data[7]; - data[8] = A.data[0] * B.data[8] + A.data[4] * B.data[9] + A.data[8] * B.data[10] + A.data[12] * B.data[11]; - data[9] = A.data[1] * B.data[8] + A.data[5] * B.data[9] + A.data[9] * B.data[10] + A.data[13] * B.data[11]; - data[10]= A.data[2] * B.data[8] + A.data[6] * B.data[9] + A.data[10] * B.data[10] + A.data[14] * B.data[11]; - data[11]= A.data[3] * B.data[8] + A.data[7] * B.data[9] + A.data[11] * B.data[10] + A.data[15] * B.data[11]; - data[12]= A.data[0] * B.data[12] + A.data[4] * B.data[13] + A.data[8] * B.data[14] + A.data[12] * B.data[15]; - data[13]= A.data[1] * B.data[12] + A.data[5] * B.data[13] + A.data[9] * B.data[14] + A.data[13] * B.data[15]; - data[14]= A.data[2] * B.data[12] + A.data[6] * B.data[13] + A.data[10] * B.data[14] + A.data[14] * B.data[15]; - data[15]= A.data[3] * B.data[12] + A.data[7] * B.data[13] + A.data[11] * B.data[14] + A.data[15] * B.data[15]; - */ -} - -/** Standard matrix product: this *= B. */ -void Multiply4x3( const Matrix & restrict B ) { - Multiply4x3(*this, B); -} - -/** Standard product of matrices, where the last row is [0 0 0 1]. */ -void Multiply4x3( const Matrix & A, const Matrix & restrict B ) { - piDebugCheck(this != &B); - - for(int i = 0; i < 3; i++) { - const float ai0 = A(i,0), ai1 = A(i,1), ai2 = A(i,2), ai3 = A(i,3); - GetElem(i,0) = ai0 * B(0,0) + ai1 * B(1,0) + ai2 * B(2,0) + ai3 * B(3,0); - GetElem(i,1) = ai0 * B(0,1) + ai1 * B(1,1) + ai2 * B(2,1) + ai3 * B(3,1); - GetElem(i,2) = ai0 * B(0,2) + ai1 * B(1,2) + ai2 * B(2,2) + ai3 * B(3,2); - GetElem(i,3) = ai0 * B(0,3) + ai1 * B(1,3) + ai2 * B(2,3) + ai3 * B(3,3); - } - data[3] = 0.0f; data[7] = 0.0f; data[11] = 0.0f; data[15] = 1.0f; - - /* Unrolled but does not allow this == A - data[0] = a.data[0] * b.data[0] + a.data[4] * b.data[1] + a.data[8] * b.data[2] + a.data[12] * b.data[3]; - data[1] = a.data[1] * b.data[0] + a.data[5] * b.data[1] + a.data[9] * b.data[2] + a.data[13] * b.data[3]; - data[2] = a.data[2] * b.data[0] + a.data[6] * b.data[1] + a.data[10] * b.data[2] + a.data[14] * b.data[3]; - data[3] = 0.0f; - data[4] = a.data[0] * b.data[4] + a.data[4] * b.data[5] + a.data[8] * b.data[6] + a.data[12] * b.data[7]; - data[5] = a.data[1] * b.data[4] + a.data[5] * b.data[5] + a.data[9] * b.data[6] + a.data[13] * b.data[7]; - data[6] = a.data[2] * b.data[4] + a.data[6] * b.data[5] + a.data[10] * b.data[6] + a.data[14] * b.data[7]; - data[7] = 0.0f; - data[8] = a.data[0] * b.data[8] + a.data[4] * b.data[9] + a.data[8] * b.data[10] + a.data[12] * b.data[11]; - data[9] = a.data[1] * b.data[8] + a.data[5] * b.data[9] + a.data[9] * b.data[10] + a.data[13] * b.data[11]; - data[10]= a.data[2] * b.data[8] + a.data[6] * b.data[9] + a.data[10] * b.data[10] + a.data[14] * b.data[11]; - data[11]= 0.0f; - data[12]= a.data[0] * b.data[12] + a.data[4] * b.data[13] + a.data[8] * b.data[14] + a.data[12] * b.data[15]; - data[13]= a.data[1] * b.data[12] + a.data[5] * b.data[13] + a.data[9] * b.data[14] + a.data[13] * b.data[15]; - data[14]= a.data[2] * b.data[12] + a.data[6] * b.data[13] + a.data[10] * b.data[14] + a.data[14] * b.data[15]; - data[15]= 1.0f; - */ -} -//@} - - -/** @name Vector operations: */ -//@{ - -/** Transform 3d vector (w=0). */ -void TransformVec3(const Vec3 & restrict orig, Vec3 * restrict dest) const { - piDebugCheck(&orig != dest); - dest->x = orig.x * data[0] + orig.y * data[4] + orig.z * data[8]; - dest->y = orig.x * data[1] + orig.y * data[5] + orig.z * data[9]; - dest->z = orig.x * data[2] + orig.y * data[6] + orig.z * data[10]; -} -/** Transform 3d vector by the transpose (w=0). */ -void TransformVec3T(const Vec3 & restrict orig, Vec3 * restrict dest) const { - piDebugCheck(&orig != dest); - dest->x = orig.x * data[0] + orig.y * data[1] + orig.z * data[2]; - dest->y = orig.x * data[4] + orig.y * data[5] + orig.z * data[6]; - dest->z = orig.x * data[8] + orig.y * data[9] + orig.z * data[10]; -} - -/** Transform a 3d homogeneous vector, where the fourth coordinate is assumed to be 1. */ -void TransformPoint(const Vec3 & restrict orig, Vec3 * restrict dest) const { - piDebugCheck(&orig != dest); - dest->x = orig.x * data[0] + orig.y * data[4] + orig.z * data[8] + data[12]; - dest->y = orig.x * data[1] + orig.y * data[5] + orig.z * data[9] + data[13]; - dest->z = orig.x * data[2] + orig.y * data[6] + orig.z * data[10] + data[14]; -} - -/** Transform a point, normalize it, and return w. */ -float TransformPointAndNormalize(const Vec3 & restrict orig, Vec3 * restrict dest) const { - piDebugCheck(&orig != dest); - float w; - dest->x = orig.x * data[0] + orig.y * data[4] + orig.z * data[8] + data[12]; - dest->y = orig.x * data[1] + orig.y * data[5] + orig.z * data[9] + data[13]; - dest->z = orig.x * data[2] + orig.y * data[6] + orig.z * data[10] + data[14]; - w = 1 / (orig.x * data[3] + orig.y * data[7] + orig.z * data[11] + data[15]); - *dest *= w; - return w; -} - -/** Transform a point and return w. */ -float TransformPointReturnW(const Vec3 & restrict orig, Vec3 * restrict dest) const { - piDebugCheck(&orig != dest); - dest->x = orig.x * data[0] + orig.y * data[4] + orig.z * data[8] + data[12]; - dest->y = orig.x * data[1] + orig.y * data[5] + orig.z * data[9] + data[13]; - dest->z = orig.x * data[2] + orig.y * data[6] + orig.z * data[10] + data[14]; - return orig.x * data[3] + orig.y * data[7] + orig.z * data[11] + data[15]; -} - -/** Transform a normalized 3d point by a 4d matrix and return the resulting 4d vector. */ -void TransformVec4(const Vec3 & orig, Vec4 * dest) const { - dest->x = orig.x * data[0] + orig.y * data[4] + orig.z * data[8] + data[12]; - dest->y = orig.x * data[1] + orig.y * data[5] + orig.z * data[9] + data[13]; - dest->z = orig.x * data[2] + orig.y * data[6] + orig.z * data[10] + data[14]; - dest->w = orig.x * data[3] + orig.y * data[7] + orig.z * data[11] + data[15]; -} -//@} - -/** @name Matrix analysis. */ -//@{ - -/** Get the ZYZ euler angles from the matrix. Assumes the matrix is orthonormal. */ -void GetEulerAnglesZYZ(float * s, float * t, float * r) const { - if( GetElem(2,2) < 1.0f ) { - if( GetElem(2,2) > -1.0f ) { - // cs*ct*cr-ss*sr -ss*ct*cr-cs*sr st*cr - // cs*ct*sr+ss*cr -ss*ct*sr+cs*cr st*sr - // -cs*st ss*st ct - *s = atan2(GetElem(1,2), -GetElem(0,2)); - *t = acos(GetElem(2,2)); - *r = atan2(GetElem(2,1), GetElem(2,0)); - } - else { - // -c(s-r) s(s-r) 0 - // s(s-r) c(s-r) 0 - // 0 0 -1 - *s = atan2(GetElem(0, 1), -GetElem(0, 0)); // = s-r - *t = PI; - *r = 0; - } - } - else { - // c(s+r) -s(s+r) 0 - // s(s+r) c(s+r) 0 - // 0 0 1 - *s = atan2(GetElem(0, 1), GetElem(0, 0)); // = s+r - *t = 0; - *r = 0; - } -} - -//@} - -MATHLIB_API friend PiStream & operator<< ( PiStream & s, Matrix & m ); - -/** Print to debug output. */ -void Print() const { - piDebug( "[ %5.2f %5.2f %5.2f %5.2f ]\n", data[0], data[4], data[8], data[12] ); - piDebug( "[ %5.2f %5.2f %5.2f %5.2f ]\n", data[1], data[5], data[9], data[13] ); - piDebug( "[ %5.2f %5.2f %5.2f %5.2f ]\n", data[2], data[6], data[10], data[14] ); - piDebug( "[ %5.2f %5.2f %5.2f %5.2f ]\n", data[3], data[7], data[11], data[15] ); -} - - -public: - - float data[16]; - -}; -#endif - - -#endif // NV_MATH_MATRIX_INL diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvmath/nvmath.h b/3rdparty/bgfx/3rdparty/nvtt/nvmath/nvmath.h deleted file mode 100644 index 94f7ec7..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvmath/nvmath.h +++ /dev/null @@ -1,61 +0,0 @@ -// This code is in the public domain -- castanyo@yahoo.es - -#ifndef NV_MATH_H -#define NV_MATH_H - -#include -#include // finite, isnan - -#include "nvcore/utils.h" // max, clamp - -#define NVMATH_API -#define NVMATH_CLASS - -#define PI float(3.1415926535897932384626433833) -#define NV_EPSILON (0.0001f) -#define NV_NORMAL_EPSILON (0.001f) - -namespace nv -{ - inline float toRadian(float degree) { return degree * (PI / 180.0f); } - inline float toDegree(float radian) { return radian * (180.0f / PI); } - - // Robust floating point comparisons: - // http://realtimecollisiondetection.net/blog/?p=89 - inline bool equal(const float f0, const float f1, const float epsilon = NV_EPSILON) - { - //return fabs(f0-f1) <= epsilon; - return fabs(f0-f1) <= epsilon * max3(1.0f, fabsf(f0), fabsf(f1)); - } - - inline bool isZero(const float f, const float epsilon = NV_EPSILON) - { - return fabsf(f) <= epsilon; - } - - inline bool isFinite(const float f) - { -#if defined(_MSC_VER) && _MSC_VER <= 1800 - (void)f; - return true; -#else - return std::isfinite(f); -#endif // defined(_MSC_VER) && _MSC_VER <= 1800 - } - - // Eliminates negative zeros from a float array. - inline void floatCleanup(float * fp, int n) - { - for (int i = 0; i < n; i++) { - //nvDebugCheck(isFinite(fp[i])); - union { float f; uint32 i; } x = { fp[i] }; - if (x.i == 0x80000000) fp[i] = 0.0f; - } - } - - inline float saturate(float f) { - return clamp(f, 0.0f, 1.0f); - } -} - -#endif // NV_MATH_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvmath/plane.h b/3rdparty/bgfx/3rdparty/nvtt/nvmath/plane.h deleted file mode 100644 index eb544b1..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvmath/plane.h +++ /dev/null @@ -1,40 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#ifndef NV_MATH_PLANE_H -#define NV_MATH_PLANE_H - -#include "nvmath.h" -#include "vector.h" - -namespace nv -{ - class Matrix; - - class NVMATH_CLASS Plane - { - public: - Plane(); - Plane(float x, float y, float z, float w); - Plane(const Vector4 & v); - Plane(const Vector3 & v, float d); - Plane(const Vector3 & normal, const Vector3 & point); - Plane(const Vector3 & v0, const Vector3 & v1, const Vector3 & v2); - - const Plane & operator=(const Plane & v); - - Vector3 vector() const; - float offset() const; - - void operator*=(float s); - - Vector4 v; - }; - - Plane transformPlane(const Matrix &, const Plane &); - - Vector3 planeIntersection(const Plane & a, const Plane & b, const Plane & c); - - -} // nv namespace - -#endif // NV_MATH_PLANE_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvmath/plane.inl b/3rdparty/bgfx/3rdparty/nvtt/nvmath/plane.inl deleted file mode 100644 index 7baf804..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvmath/plane.inl +++ /dev/null @@ -1,49 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño - -#pragma once -#ifndef NV_MATH_PLANE_INL -#define NV_MATH_PLANE_INL - -#include "plane.h" -#include "vector.inl" - -namespace nv -{ - inline Plane::Plane() {} - inline Plane::Plane(float x, float y, float z, float w) : v(x, y, z, w) {} - inline Plane::Plane(const Vector4 & v) : v(v) {} - inline Plane::Plane(const Vector3 & v, float d) : v(v, d) {} - inline Plane::Plane(const Vector3 & normal, const Vector3 & point) : v(normal, -dot(normal, point)) {} - inline Plane::Plane(const Vector3 & v0, const Vector3 & v1, const Vector3 & v2) { - Vector3 n = cross(v1-v0, v2-v0); - float d = -dot(n, v0); - v = Vector4(n, d); - } - - inline const Plane & Plane::operator=(const Plane & p) { v = p.v; return *this; } - - inline Vector3 Plane::vector() const { return v.xyz(); } - inline float Plane::offset() const { return v.w; } - - // Normalize plane. - inline Plane normalize(const Plane & plane, float epsilon = NV_EPSILON) - { - const float len = length(plane.vector()); - const float inv = isZero(len, epsilon) ? 0 : 1.0f / len; - return Plane(plane.v * inv); - } - - // Get the signed distance from the given point to this plane. - inline float distance(const Plane & plane, const Vector3 & point) - { - return dot(plane.vector(), point) + plane.offset(); - } - - inline void Plane::operator*=(float s) - { - v *= s; - } - -} // nv namespace - -#endif // NV_MATH_PLANE_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvmath/vector.h b/3rdparty/bgfx/3rdparty/nvtt/nvmath/vector.h deleted file mode 100644 index 180cfab..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvmath/vector.h +++ /dev/null @@ -1,148 +0,0 @@ -// This code is in the public domain -- castanyo@yahoo.es - -#ifndef NV_MATH_VECTOR_H -#define NV_MATH_VECTOR_H - -#include "nvmath.h" - -namespace nv -{ - class NVMATH_CLASS Vector2 - { - public: - typedef Vector2 const & Arg; - - Vector2(); - explicit Vector2(float f); - Vector2(float x, float y); - Vector2(Vector2::Arg v); - - //template explicit Vector2(const T & v) : x(v.x), y(v.y) {} - //template operator T() const { return T(x, y); } - - const Vector2 & operator=(Vector2::Arg v); - - const float * ptr() const; - - void set(float x, float y); - - Vector2 operator-() const; - void operator+=(Vector2::Arg v); - void operator-=(Vector2::Arg v); - void operator*=(float s); - void operator*=(Vector2::Arg v); - - friend bool operator==(Vector2::Arg a, Vector2::Arg b); - friend bool operator!=(Vector2::Arg a, Vector2::Arg b); - - union { - struct { - float x, y; - }; - float component[2]; - }; - }; - - class NVMATH_CLASS Vector3 - { - public: - typedef Vector3 const & Arg; - - Vector3(); - explicit Vector3(float x); - //explicit Vector3(int x) : x(float(x)), y(float(x)), z(float(x)) {} - Vector3(float x, float y, float z); - Vector3(Vector2::Arg v, float z); - Vector3(Vector3::Arg v); - - //template explicit Vector3(const T & v) : x(v.x), y(v.y), z(v.z) {} - //template operator T() const { return T(x, y, z); } - - const Vector3 & operator=(Vector3::Arg v); - - Vector2 xy() const; - - const float * ptr() const; - - void set(float x, float y, float z); - - Vector3 operator-() const; - void operator+=(Vector3::Arg v); - void operator-=(Vector3::Arg v); - void operator*=(float s); - void operator/=(float s); - void operator*=(Vector3::Arg v); - void operator/=(Vector3::Arg v); - - friend bool operator==(Vector3::Arg a, Vector3::Arg b); - friend bool operator!=(Vector3::Arg a, Vector3::Arg b); - - union { - struct { - float x, y, z; - }; - float component[3]; - }; - }; - - class NVMATH_CLASS Vector4 - { - public: - typedef Vector4 const & Arg; - - Vector4(); - explicit Vector4(float x); - Vector4(float x, float y, float z, float w); - Vector4(Vector2::Arg v, float z, float w); - Vector4(Vector2::Arg v, Vector2::Arg u); - Vector4(Vector3::Arg v, float w); - Vector4(Vector4::Arg v); - // Vector4(const Quaternion & v); - - //template explicit Vector4(const T & v) : x(v.x), y(v.y), z(v.z), w(v.w) {} - //template operator T() const { return T(x, y, z, w); } - - const Vector4 & operator=(Vector4::Arg v); - - Vector2 xy() const; - Vector2 zw() const; - Vector3 xyz() const; - - const float * ptr() const; - - void set(float x, float y, float z, float w); - - Vector4 operator-() const; - void operator+=(Vector4::Arg v); - void operator-=(Vector4::Arg v); - void operator*=(float s); - void operator/=(float s); - void operator*=(Vector4::Arg v); - void operator/=(Vector4::Arg v); - - friend bool operator==(Vector4::Arg a, Vector4::Arg b); - friend bool operator!=(Vector4::Arg a, Vector4::Arg b); - - union { - struct { - float x, y, z, w; - }; - float component[4]; - }; - }; - -} // nv namespace - -// If we had these functions, they would be ambiguous, the compiler would not know which one to pick: -//template Vector2 to(const T & v) { return Vector2(v.x, v.y); } -//template Vector3 to(const T & v) { return Vector3(v.x, v.y, v.z); } -//template Vector4 to(const T & v) { return Vector4(v.x, v.y, v.z, v.z); } - -// We could use a cast operator so that we could infer the expected type, but that doesn't work the same way in all compilers and produces horrible error messages. - -// Instead we simply have explicit casts: -template T to(const nv::Vector2 & v) { NV_COMPILER_CHECK(sizeof(T) == sizeof(nv::Vector2)); return T(v.x, v.y); } -template T to(const nv::Vector3 & v) { NV_COMPILER_CHECK(sizeof(T) == sizeof(nv::Vector3)); return T(v.x, v.y, v.z); } -template T to(const nv::Vector4 & v) { NV_COMPILER_CHECK(sizeof(T) == sizeof(nv::Vector4)); return T(v.x, v.y, v.z, v.w); } - -#endif // NV_MATH_VECTOR_H diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvmath/vector.inl b/3rdparty/bgfx/3rdparty/nvtt/nvmath/vector.inl deleted file mode 100644 index 8f1da1e..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvmath/vector.inl +++ /dev/null @@ -1,921 +0,0 @@ -// This code is in the public domain -- castanyo@yahoo.es - -#ifndef NV_MATH_VECTOR_INL -#define NV_MATH_VECTOR_INL - -#include "vector.h" -#include "nvcore/utils.h" // min, max -#include "nvcore/hash.h" // hash - -namespace nv -{ - - // Helpers to convert vector types. Assume T has x,y members and 2 argument constructor. - //template T to(Vector2::Arg v) { return T(v.x, v.y); } - - // Helpers to convert vector types. Assume T has x,y,z members and 3 argument constructor. - //template T to(Vector3::Arg v) { return T(v.x, v.y, v.z); } - - // Helpers to convert vector types. Assume T has x,y,z members and 3 argument constructor. - //template T to(Vector4::Arg v) { return T(v.x, v.y, v.z, v.w); } - - - // Vector2 - inline Vector2::Vector2() {} - inline Vector2::Vector2(float f) : x(f), y(f) {} - inline Vector2::Vector2(float x, float y) : x(x), y(y) {} - inline Vector2::Vector2(Vector2::Arg v) : x(v.x), y(v.y) {} - - inline const Vector2 & Vector2::operator=(Vector2::Arg v) - { - x = v.x; - y = v.y; - return *this; - } - - inline const float * Vector2::ptr() const - { - return &x; - } - - inline void Vector2::set(float x, float y) - { - this->x = x; - this->y = y; - } - - inline Vector2 Vector2::operator-() const - { - return Vector2(-x, -y); - } - - inline void Vector2::operator+=(Vector2::Arg v) - { - x += v.x; - y += v.y; - } - - inline void Vector2::operator-=(Vector2::Arg v) - { - x -= v.x; - y -= v.y; - } - - inline void Vector2::operator*=(float s) - { - x *= s; - y *= s; - } - - inline void Vector2::operator*=(Vector2::Arg v) - { - x *= v.x; - y *= v.y; - } - - inline bool operator==(Vector2::Arg a, Vector2::Arg b) - { - return a.x == b.x && a.y == b.y; - } - inline bool operator!=(Vector2::Arg a, Vector2::Arg b) - { - return a.x != b.x || a.y != b.y; - } - - - // Vector3 - inline Vector3::Vector3() {} - inline Vector3::Vector3(float f) : x(f), y(f), z(f) {} - inline Vector3::Vector3(float x, float y, float z) : x(x), y(y), z(z) {} - inline Vector3::Vector3(Vector2::Arg v, float z) : x(v.x), y(v.y), z(z) {} - inline Vector3::Vector3(Vector3::Arg v) : x(v.x), y(v.y), z(v.z) {} - - inline const Vector3 & Vector3::operator=(Vector3::Arg v) - { - x = v.x; - y = v.y; - z = v.z; - return *this; - } - - - inline Vector2 Vector3::xy() const - { - return Vector2(x, y); - } - - inline const float * Vector3::ptr() const - { - return &x; - } - - inline void Vector3::set(float x, float y, float z) - { - this->x = x; - this->y = y; - this->z = z; - } - - inline Vector3 Vector3::operator-() const - { - return Vector3(-x, -y, -z); - } - - inline void Vector3::operator+=(Vector3::Arg v) - { - x += v.x; - y += v.y; - z += v.z; - } - - inline void Vector3::operator-=(Vector3::Arg v) - { - x -= v.x; - y -= v.y; - z -= v.z; - } - - inline void Vector3::operator*=(float s) - { - x *= s; - y *= s; - z *= s; - } - - inline void Vector3::operator/=(float s) - { - float is = 1.0f / s; - x *= is; - y *= is; - z *= is; - } - - inline void Vector3::operator*=(Vector3::Arg v) - { - x *= v.x; - y *= v.y; - z *= v.z; - } - - inline void Vector3::operator/=(Vector3::Arg v) - { - x /= v.x; - y /= v.y; - z /= v.z; - } - - inline bool operator==(Vector3::Arg a, Vector3::Arg b) - { - return a.x == b.x && a.y == b.y && a.z == b.z; - } - inline bool operator!=(Vector3::Arg a, Vector3::Arg b) - { - return a.x != b.x || a.y != b.y || a.z != b.z; - } - - - // Vector4 - inline Vector4::Vector4() {} - inline Vector4::Vector4(float f) : x(f), y(f), z(f), w(f) {} - inline Vector4::Vector4(float x, float y, float z, float w) : x(x), y(y), z(z), w(w) {} - inline Vector4::Vector4(Vector2::Arg v, float z, float w) : x(v.x), y(v.y), z(z), w(w) {} - inline Vector4::Vector4(Vector2::Arg v, Vector2::Arg u) : x(v.x), y(v.y), z(u.x), w(u.y) {} - inline Vector4::Vector4(Vector3::Arg v, float w) : x(v.x), y(v.y), z(v.z), w(w) {} - inline Vector4::Vector4(Vector4::Arg v) : x(v.x), y(v.y), z(v.z), w(v.w) {} - - inline const Vector4 & Vector4::operator=(const Vector4 & v) - { - x = v.x; - y = v.y; - z = v.z; - w = v.w; - return *this; - } - - inline Vector2 Vector4::xy() const - { - return Vector2(x, y); - } - - inline Vector2 Vector4::zw() const - { - return Vector2(z, w); - } - - inline Vector3 Vector4::xyz() const - { - return Vector3(x, y, z); - } - - inline const float * Vector4::ptr() const - { - return &x; - } - - inline void Vector4::set(float x, float y, float z, float w) - { - this->x = x; - this->y = y; - this->z = z; - this->w = w; - } - - inline Vector4 Vector4::operator-() const - { - return Vector4(-x, -y, -z, -w); - } - - inline void Vector4::operator+=(Vector4::Arg v) - { - x += v.x; - y += v.y; - z += v.z; - w += v.w; - } - - inline void Vector4::operator-=(Vector4::Arg v) - { - x -= v.x; - y -= v.y; - z -= v.z; - w -= v.w; - } - - inline void Vector4::operator*=(float s) - { - x *= s; - y *= s; - z *= s; - w *= s; - } - - inline void Vector4::operator/=(float s) - { - x /= s; - y /= s; - z /= s; - w /= s; - } - - inline void Vector4::operator*=(Vector4::Arg v) - { - x *= v.x; - y *= v.y; - z *= v.z; - w *= v.w; - } - - inline void Vector4::operator/=(Vector4::Arg v) - { - x /= v.x; - y /= v.y; - z /= v.z; - w /= v.w; - } - - inline bool operator==(Vector4::Arg a, Vector4::Arg b) - { - return a.x == b.x && a.y == b.y && a.z == b.z && a.w == b.w; - } - inline bool operator!=(Vector4::Arg a, Vector4::Arg b) - { - return a.x != b.x || a.y != b.y || a.z != b.z || a.w != b.w; - } - - - - // Functions - - - // Vector2 - - inline Vector2 add(Vector2::Arg a, Vector2::Arg b) - { - return Vector2(a.x + b.x, a.y + b.y); - } - inline Vector2 operator+(Vector2::Arg a, Vector2::Arg b) - { - return add(a, b); - } - - inline Vector2 sub(Vector2::Arg a, Vector2::Arg b) - { - return Vector2(a.x - b.x, a.y - b.y); - } - inline Vector2 operator-(Vector2::Arg a, Vector2::Arg b) - { - return sub(a, b); - } - - inline Vector2 scale(Vector2::Arg v, float s) - { - return Vector2(v.x * s, v.y * s); - } - - inline Vector2 scale(Vector2::Arg v, Vector2::Arg s) - { - return Vector2(v.x * s.x, v.y * s.y); - } - - inline Vector2 operator*(Vector2::Arg v, float s) - { - return scale(v, s); - } - - inline Vector2 operator*(Vector2::Arg v1, Vector2::Arg v2) - { - return Vector2(v1.x*v2.x, v1.y*v2.y); - } - - inline Vector2 operator*(float s, Vector2::Arg v) - { - return scale(v, s); - } - - inline Vector2 operator/(Vector2::Arg v, float s) - { - return scale(v, 1.0f/s); - } - - inline Vector2 lerp(Vector2::Arg v1, Vector2::Arg v2, float t) - { - const float s = 1.0f - t; - return Vector2(v1.x * s + t * v2.x, v1.y * s + t * v2.y); - } - - inline float dot(Vector2::Arg a, Vector2::Arg b) - { - return a.x * b.x + a.y * b.y; - } - - inline float lengthSquared(Vector2::Arg v) - { - return v.x * v.x + v.y * v.y; - } - - inline float length(Vector2::Arg v) - { - return sqrtf(lengthSquared(v)); - } - - inline float distance(Vector2::Arg a, Vector2::Arg b) - { - return length(a - b); - } - - inline float inverseLength(Vector2::Arg v) - { - return 1.0f / sqrtf(lengthSquared(v)); - } - - inline bool isNormalized(Vector2::Arg v, float epsilon = NV_NORMAL_EPSILON) - { - return equal(length(v), 1, epsilon); - } - - inline Vector2 normalize(Vector2::Arg v, float epsilon = NV_EPSILON) - { - float l = length(v); - NV_UNUSED(epsilon); - nvDebugCheck(!isZero(l, epsilon)); - Vector2 n = scale(v, 1.0f / l); - nvDebugCheck(isNormalized(n)); - return n; - } - - inline Vector2 normalizeSafe(Vector2::Arg v, Vector2::Arg fallback, float epsilon = NV_EPSILON) - { - float l = length(v); - if (isZero(l, epsilon)) { - return fallback; - } - return scale(v, 1.0f / l); - } - - // Safe, branchless normalization from Andy Firth. All error checking ommitted. - // http://altdevblogaday.com/2011/08/21/practical-flt-point-tricks/ - inline Vector2 normalizeFast(Vector2::Arg v) - { - const float very_small_float = 1.0e-037f; - float l = very_small_float + length(v); - return scale(v, 1.0f / l); - } - - inline bool equal(Vector2::Arg v1, Vector2::Arg v2, float epsilon = NV_EPSILON) - { - return equal(v1.x, v2.x, epsilon) && equal(v1.y, v2.y, epsilon); - } - - inline Vector2 min(Vector2::Arg a, Vector2::Arg b) - { - return Vector2(min(a.x, b.x), min(a.y, b.y)); - } - - inline Vector2 max(Vector2::Arg a, Vector2::Arg b) - { - return Vector2(max(a.x, b.x), max(a.y, b.y)); - } - - inline Vector2 clamp(Vector2::Arg v, float min, float max) - { - return Vector2(clamp(v.x, min, max), clamp(v.y, min, max)); - } - - inline Vector2 saturate(Vector2::Arg v) - { - return Vector2(saturate(v.x), saturate(v.y)); - } - - inline bool isFinite(Vector2::Arg v) - { - return isFinite(v.x) && isFinite(v.y); - } - - inline Vector2 validate(Vector2::Arg v, Vector2::Arg fallback = Vector2(0.0f)) - { - if (!isFinite(v)) return fallback; - Vector2 vf = v; - nv::floatCleanup(vf.component, 2); - return vf; - } - - // Note, this is the area scaled by 2! - inline float triangleArea(Vector2::Arg v0, Vector2::Arg v1) - { - return (v0.x * v1.y - v0.y * v1.x); // * 0.5f; - } - inline float triangleArea(Vector2::Arg a, Vector2::Arg b, Vector2::Arg c) - { - // IC: While it may be appealing to use the following expression: - //return (c.x * a.y + a.x * b.y + b.x * c.y - b.x * a.y - c.x * b.y - a.x * c.y); // * 0.5f; - - // That's actually a terrible idea. Small triangles far from the origin can end up producing fairly large floating point - // numbers and the results becomes very unstable and dependent on the order of the factors. - - // Instead, it's preferable to substract the vertices first, and multiply the resulting small values together. The result - // in this case is always much more accurate (as long as the triangle is small) and less dependent of the location of - // the triangle. - - //return ((a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x)); // * 0.5f; - return triangleArea(a-c, b-c); - } - - - template <> - inline uint hash(const Vector2 & v, uint h) - { - return sdbmFloatHash(v.component, 2, h); - } - - - - // Vector3 - - inline Vector3 add(Vector3::Arg a, Vector3::Arg b) - { - return Vector3(a.x + b.x, a.y + b.y, a.z + b.z); - } - inline Vector3 add(Vector3::Arg a, float b) - { - return Vector3(a.x + b, a.y + b, a.z + b); - } - inline Vector3 operator+(Vector3::Arg a, Vector3::Arg b) - { - return add(a, b); - } - inline Vector3 operator+(Vector3::Arg a, float b) - { - return add(a, b); - } - - inline Vector3 sub(Vector3::Arg a, Vector3::Arg b) - { - return Vector3(a.x - b.x, a.y - b.y, a.z - b.z); - } - inline Vector3 sub(Vector3::Arg a, float b) - { - return Vector3(a.x - b, a.y - b, a.z - b); - } - inline Vector3 operator-(Vector3::Arg a, Vector3::Arg b) - { - return sub(a, b); - } - inline Vector3 operator-(Vector3::Arg a, float b) - { - return sub(a, b); - } - - inline Vector3 cross(Vector3::Arg a, Vector3::Arg b) - { - return Vector3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x); - } - - inline Vector3 scale(Vector3::Arg v, float s) - { - return Vector3(v.x * s, v.y * s, v.z * s); - } - - inline Vector3 scale(Vector3::Arg v, Vector3::Arg s) - { - return Vector3(v.x * s.x, v.y * s.y, v.z * s.z); - } - - inline Vector3 operator*(Vector3::Arg v, float s) - { - return scale(v, s); - } - - inline Vector3 operator*(float s, Vector3::Arg v) - { - return scale(v, s); - } - - inline Vector3 operator*(Vector3::Arg v, Vector3::Arg s) - { - return scale(v, s); - } - - inline Vector3 operator/(Vector3::Arg v, float s) - { - return scale(v, 1.0f/s); - } - - /*inline Vector3 add_scaled(Vector3::Arg a, Vector3::Arg b, float s) - { - return Vector3(a.x + b.x * s, a.y + b.y * s, a.z + b.z * s); - }*/ - - inline Vector3 lerp(Vector3::Arg v1, Vector3::Arg v2, float t) - { - const float s = 1.0f - t; - return Vector3(v1.x * s + t * v2.x, v1.y * s + t * v2.y, v1.z * s + t * v2.z); - } - - inline float dot(Vector3::Arg a, Vector3::Arg b) - { - return a.x * b.x + a.y * b.y + a.z * b.z; - } - - inline float lengthSquared(Vector3::Arg v) - { - return v.x * v.x + v.y * v.y + v.z * v.z; - } - - inline float length(Vector3::Arg v) - { - return sqrtf(lengthSquared(v)); - } - - inline float distance(Vector3::Arg a, Vector3::Arg b) - { - return length(a - b); - } - - inline float distanceSquared(Vector3::Arg a, Vector3::Arg b) - { - return lengthSquared(a - b); - } - - inline float inverseLength(Vector3::Arg v) - { - return 1.0f / sqrtf(lengthSquared(v)); - } - - inline bool isNormalized(Vector3::Arg v, float epsilon = NV_NORMAL_EPSILON) - { - return equal(length(v), 1, epsilon); - } - - inline Vector3 normalize(Vector3::Arg v, float epsilon = NV_EPSILON) - { - float l = length(v); - NV_UNUSED(epsilon); - nvDebugCheck(!isZero(l, epsilon)); - Vector3 n = scale(v, 1.0f / l); - nvDebugCheck(isNormalized(n)); - return n; - } - - inline Vector3 normalizeSafe(Vector3::Arg v, Vector3::Arg fallback, float epsilon = NV_EPSILON) - { - float l = length(v); - if (isZero(l, epsilon)) { - return fallback; - } - return scale(v, 1.0f / l); - } - - // Safe, branchless normalization from Andy Firth. All error checking ommitted. - // http://altdevblogaday.com/2011/08/21/practical-flt-point-tricks/ - inline Vector3 normalizeFast(Vector3::Arg v) - { - const float very_small_float = 1.0e-037f; - float l = very_small_float + length(v); - return scale(v, 1.0f / l); - } - - inline bool equal(Vector3::Arg v1, Vector3::Arg v2, float epsilon = NV_EPSILON) - { - return equal(v1.x, v2.x, epsilon) && equal(v1.y, v2.y, epsilon) && equal(v1.z, v2.z, epsilon); - } - - inline Vector3 min(Vector3::Arg a, Vector3::Arg b) - { - return Vector3(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z)); - } - - inline Vector3 max(Vector3::Arg a, Vector3::Arg b) - { - return Vector3(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z)); - } - - inline Vector3 clamp(Vector3::Arg v, float min, float max) - { - return Vector3(clamp(v.x, min, max), clamp(v.y, min, max), clamp(v.z, min, max)); - } - - inline Vector3 saturate(Vector3::Arg v) - { - return Vector3(saturate(v.x), saturate(v.y), saturate(v.z)); - } - - inline Vector3 floor(Vector3::Arg v) - { - return Vector3(floorf(v.x), floorf(v.y), floorf(v.z)); - } - - inline Vector3 ceil(Vector3::Arg v) - { - return Vector3(ceilf(v.x), ceilf(v.y), ceilf(v.z)); - } - - inline bool isFinite(Vector3::Arg v) - { - return isFinite(v.x) && isFinite(v.y) && isFinite(v.z); - } - - inline Vector3 validate(Vector3::Arg v, Vector3::Arg fallback = Vector3(0.0f)) - { - if (!isFinite(v)) return fallback; - Vector3 vf = v; - nv::floatCleanup(vf.component, 3); - return vf; - } - - inline Vector3 reflect(Vector3::Arg v, Vector3::Arg n) - { - return v - (2 * dot(v, n)) * n; - } - - template <> - inline uint hash(const Vector3 & v, uint h) - { - return sdbmFloatHash(v.component, 3, h); - } - - - // Vector4 - - inline Vector4 add(Vector4::Arg a, Vector4::Arg b) - { - return Vector4(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w); - } - inline Vector4 operator+(Vector4::Arg a, Vector4::Arg b) - { - return add(a, b); - } - - inline Vector4 sub(Vector4::Arg a, Vector4::Arg b) - { - return Vector4(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w); - } - inline Vector4 operator-(Vector4::Arg a, Vector4::Arg b) - { - return sub(a, b); - } - - inline Vector4 scale(Vector4::Arg v, float s) - { - return Vector4(v.x * s, v.y * s, v.z * s, v.w * s); - } - - inline Vector4 scale(Vector4::Arg v, Vector4::Arg s) - { - return Vector4(v.x * s.x, v.y * s.y, v.z * s.z, v.w * s.w); - } - - inline Vector4 operator*(Vector4::Arg v, float s) - { - return scale(v, s); - } - - inline Vector4 operator*(float s, Vector4::Arg v) - { - return scale(v, s); - } - - inline Vector4 operator*(Vector4::Arg v, Vector4::Arg s) - { - return scale(v, s); - } - - inline Vector4 operator/(Vector4::Arg v, float s) - { - return scale(v, 1.0f/s); - } - - /*inline Vector4 add_scaled(Vector4::Arg a, Vector4::Arg b, float s) - { - return Vector4(a.x + b.x * s, a.y + b.y * s, a.z + b.z * s, a.w + b.w * s); - }*/ - - inline Vector4 lerp(Vector4::Arg v1, Vector4::Arg v2, float t) - { - const float s = 1.0f - t; - return Vector4(v1.x * s + t * v2.x, v1.y * s + t * v2.y, v1.z * s + t * v2.z, v1.w * s + t * v2.w); - } - - inline float dot(Vector4::Arg a, Vector4::Arg b) - { - return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; - } - - inline float lengthSquared(Vector4::Arg v) - { - return v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w; - } - - inline float length(Vector4::Arg v) - { - return sqrtf(lengthSquared(v)); - } - - inline float inverseLength(Vector4::Arg v) - { - return 1.0f / sqrtf(lengthSquared(v)); - } - - inline bool isNormalized(Vector4::Arg v, float epsilon = NV_NORMAL_EPSILON) - { - return equal(length(v), 1, epsilon); - } - - inline Vector4 normalize(Vector4::Arg v, float epsilon = NV_EPSILON) - { - float l = length(v); - NV_UNUSED(epsilon); - nvDebugCheck(!isZero(l, epsilon)); - Vector4 n = scale(v, 1.0f / l); - nvDebugCheck(isNormalized(n)); - return n; - } - - inline Vector4 normalizeSafe(Vector4::Arg v, Vector4::Arg fallback, float epsilon = NV_EPSILON) - { - float l = length(v); - if (isZero(l, epsilon)) { - return fallback; - } - return scale(v, 1.0f / l); - } - - // Safe, branchless normalization from Andy Firth. All error checking ommitted. - // http://altdevblogaday.com/2011/08/21/practical-flt-point-tricks/ - inline Vector4 normalizeFast(Vector4::Arg v) - { - const float very_small_float = 1.0e-037f; - float l = very_small_float + length(v); - return scale(v, 1.0f / l); - } - - inline bool equal(Vector4::Arg v1, Vector4::Arg v2, float epsilon = NV_EPSILON) - { - return equal(v1.x, v2.x, epsilon) && equal(v1.y, v2.y, epsilon) && equal(v1.z, v2.z, epsilon) && equal(v1.w, v2.w, epsilon); - } - - inline Vector4 min(Vector4::Arg a, Vector4::Arg b) - { - return Vector4(min(a.x, b.x), min(a.y, b.y), min(a.z, b.z), min(a.w, b.w)); - } - - inline Vector4 max(Vector4::Arg a, Vector4::Arg b) - { - return Vector4(max(a.x, b.x), max(a.y, b.y), max(a.z, b.z), max(a.w, b.w)); - } - - inline Vector4 clamp(Vector4::Arg v, float min, float max) - { - return Vector4(clamp(v.x, min, max), clamp(v.y, min, max), clamp(v.z, min, max), clamp(v.w, min, max)); - } - - inline Vector4 saturate(Vector4::Arg v) - { - return Vector4(saturate(v.x), saturate(v.y), saturate(v.z), saturate(v.w)); - } - - inline bool isFinite(Vector4::Arg v) - { - return isFinite(v.x) && isFinite(v.y) && isFinite(v.z) && isFinite(v.w); - } - - inline Vector4 validate(Vector4::Arg v, Vector4::Arg fallback = Vector4(0.0f)) - { - if (!isFinite(v)) return fallback; - Vector4 vf = v; - nv::floatCleanup(vf.component, 4); - return vf; - } - - template <> - inline uint hash(const Vector4 & v, uint h) - { - return sdbmFloatHash(v.component, 4, h); - } - - -#if NV_OS_IOS // LLVM is not happy with implicit conversion of immediate constants to float - - //int: - - inline Vector2 scale(Vector2::Arg v, int s) - { - return Vector2(v.x * s, v.y * s); - } - - inline Vector2 operator*(Vector2::Arg v, int s) - { - return scale(v, s); - } - - inline Vector2 operator*(int s, Vector2::Arg v) - { - return scale(v, s); - } - - inline Vector2 operator/(Vector2::Arg v, int s) - { - return scale(v, 1.0f/s); - } - - inline Vector3 scale(Vector3::Arg v, int s) - { - return Vector3(v.x * s, v.y * s, v.z * s); - } - - inline Vector3 operator*(Vector3::Arg v, int s) - { - return scale(v, s); - } - - inline Vector3 operator*(int s, Vector3::Arg v) - { - return scale(v, s); - } - - inline Vector3 operator/(Vector3::Arg v, int s) - { - return scale(v, 1.0f/s); - } - - inline Vector4 scale(Vector4::Arg v, int s) - { - return Vector4(v.x * s, v.y * s, v.z * s, v.w * s); - } - - inline Vector4 operator*(Vector4::Arg v, int s) - { - return scale(v, s); - } - - inline Vector4 operator*(int s, Vector4::Arg v) - { - return scale(v, s); - } - - inline Vector4 operator/(Vector4::Arg v, int s) - { - return scale(v, 1.0f/s); - } - - //double: - - inline Vector3 operator*(Vector3::Arg v, double s) - { - return scale(v, (float)s); - } - - inline Vector3 operator*(double s, Vector3::Arg v) - { - return scale(v, (float)s); - } - - inline Vector3 operator/(Vector3::Arg v, double s) - { - return scale(v, 1.f/((float)s)); - } - -#endif //NV_OS_IOS - -} // nv namespace - -#endif // NV_MATH_VECTOR_INL diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvtt.cpp b/3rdparty/bgfx/3rdparty/nvtt/nvtt.cpp deleted file mode 100644 index 51a2bce..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvtt.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -#include "nvtt.h" - -#include -#include - -#include "bc6h/zoh.h" -#include "bc7/avpcl.h" -#include "nvmath/vector.inl" - -NVCORE_API int nvAbort(const char *, const char *, int , const char *, const char *, ...) -{ - abort(); - return 0; -} - -namespace nvtt -{ - using namespace nv; - - void compressBC6H(const void* _input, uint32_t _width, uint32_t _height, uint32_t _stride, void* _output) - { - const uint8_t* src = (const uint8_t*)_input; - char* dst = (char*)_output; - - for (uint32_t yy = 0; yy < _height; yy += 4) - { - for (uint32_t xx = 0; xx < _width; xx += 4) - { - const Vector4* rgba = (const Vector4*)&src[yy*_stride + xx*sizeof(float)*4]; - - ZOH::Utils::FORMAT = ZOH::UNSIGNED_F16; - ZOH::Tile zohTile(4, 4); - - memset(zohTile.data, 0, sizeof(zohTile.data) ); - memset(zohTile.importance_map, 0, sizeof(zohTile.importance_map) ); - - for (uint32_t blockY = 0; blockY < 4; ++blockY) - { - for (uint32_t blockX = 0; blockX < 4; ++blockX) - { - Vector4 color = rgba[blockY*4 + blockX]; - uint16 rHalf = bx::halfFromFloat(color.x); - uint16 gHalf = bx::halfFromFloat(color.y); - uint16 bHalf = bx::halfFromFloat(color.z); - zohTile.data[blockY][blockX].x = ZOH::Tile::half2float(rHalf); - zohTile.data[blockY][blockX].y = ZOH::Tile::half2float(gHalf); - zohTile.data[blockY][blockX].z = ZOH::Tile::half2float(bHalf); - zohTile.importance_map[blockY][blockX] = 1.0f; - } - } - - ZOH::compress(zohTile, &dst[( (yy*_width) + xx)/4 * 16]); - } - } - } - - void compressBC7(const void* _input, uint32_t _width, uint32_t _height, uint32_t _stride, void* _output) - { - const uint8_t* src = (const uint8_t*)_input; - char* dst = (char*)_output; - - for (uint32_t yy = 0; yy < _height; yy += 4) - { - for (uint32_t xx = 0; xx < _width; xx += 4) - { - const Vector4* rgba = (const Vector4*)&src[yy*_stride + xx*sizeof(float)*4]; - - AVPCL::mode_rgb = false; - AVPCL::flag_premult = false; - AVPCL::flag_nonuniform = false; - AVPCL::flag_nonuniform_ati = false; - - AVPCL::Tile avpclTile(4, 4); - memset(avpclTile.data, 0, sizeof(avpclTile.data) ); - for (uint32_t blockY = 0; blockY < 4; ++blockY) - { - for (uint32_t blockX = 0; blockX < 4; ++blockX) - { - Vector4 color = rgba[blockY*4 + blockX]; - avpclTile.data[blockY][blockX] = color * 255.0f; - avpclTile.importance_map[blockY][blockX] = 1.0f; - } - } - - AVPCL::compress(avpclTile, &dst[( (yy*_width) + xx)/4 * 16]); - } - } - } - -} //namespace nvtt diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvtt.h b/3rdparty/bgfx/3rdparty/nvtt/nvtt.h deleted file mode 100644 index a37c7cf..0000000 --- a/3rdparty/bgfx/3rdparty/nvtt/nvtt.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef NVTT_H -#define NVTT_H - -#include - -namespace nvtt -{ -void compressBC6H(const void* _input, uint32_t _width, uint32_t _height, uint32_t _stride, void* _output); -void compressBC7(const void* _input, uint32_t _width, uint32_t _height, uint32_t _stride, void* _output); - -} // namespace nvtt - -#endif // NVTT_H diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imconfig.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imconfig.h index f2b0289..4ccb6ca 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imconfig.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imconfig.h @@ -6,6 +6,8 @@ #pragma once +#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS + //---- Define your own ImVector<> type if you don't want to use the provided implementation defined in imgui.h //#include //#define ImVector std::vector @@ -30,8 +32,8 @@ #define IMGUI_INCLUDE_IMGUI_USER_H //---- Don't implement default handlers for Windows (so as not to link with OpenClipboard() and others Win32 functions) -#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS -#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS +#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS +#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS //---- Don't implement help and test window functionality (ShowUserGuide()/ShowStyleEditor()/ShowTestWindow() methods will be empty) //#define IMGUI_DISABLE_TEST_WINDOWS diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp index 04ba7e3..1d085a5 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp @@ -1,14 +1,14 @@ -// dear imgui, v1.50 WIP +// dear imgui, v1.54 WIP // (main code and documentation) -// See ImGui::ShowTestWindow() in imgui_demo.cpp for demo code. -// Newcomers, read 'Programmer guide' below for notes on how to setup ImGui in your codebase. +// Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp for demo code. +// Newcomers, read 'Programmer guide' below for notes on how to setup Dear ImGui in your codebase. // Get latest version at https://github.com/ocornut/imgui // Releases change-log at https://github.com/ocornut/imgui/releases -// Gallery (please post your screenshots/video there!): https://github.com/ocornut/imgui/issues/772 +// Gallery (please post your screenshots/video there!): https://github.com/ocornut/imgui/issues/1269 // Developed by Omar Cornut and every direct or indirect contributors to the GitHub. // This library is free but I need your support to sustain development and maintenance. -// If you work for a company, please consider financial support, e.g: https://www.patreon.com/imgui +// If you work for a company, please consider financial support, see Readme. For individuals: https://www.patreon.com/imgui /* @@ -16,20 +16,24 @@ - MISSION STATEMENT - END-USER GUIDE - PROGRAMMER GUIDE (read me!) + - Read first + - How to update to a newer version of Dear ImGui + - Getting started with integrating Dear ImGui in your code/engine - API BREAKING CHANGES (read me when you update!) + - ISSUES & TODO LIST - FREQUENTLY ASKED QUESTIONS (FAQ), TIPS - How can I help? - - How do I update to a newer version of ImGui? - - What is ImTextureID and how do I display an image? - - I integrated ImGui in my engine and the text or lines are blurry.. - - I integrated ImGui in my engine and some elements are clipping or disappearing when I move windows around.. - - How can I have multiple widgets with the same label? Can I have widget without a label? (Yes). A primer on the purpose of labels/IDs. - - How can I tell when ImGui wants my mouse/keyboard inputs and when I can pass them to my application? + - How can I dipslay an image? What is ImTextureID, how does it works? + - How can I have multiple widgets with the same label? Can I have widget without a label? (Yes). A primer on labels and the ID stack. + - How can I tell when Dear ImGui wants my mouse/keyboard inputs VS when I can pass them to my application? - How can I load a different font than the default? - How can I easily use icons in my application? - How can I load multiple fonts? - How can I display and input non-latin characters such as Chinese, Japanese, Korean, Cyrillic? + - How can I preserve my Dear ImGui context across reloading a DLL? (loss of the global/static variables) - How can I use the drawing facilities without an ImGui window? (using ImDrawList API) + - I integrated Dear ImGui in my engine and the text or lines are blurry.. + - I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around.. - ISSUES & TODO-LIST - CODE @@ -37,112 +41,169 @@ MISSION STATEMENT ================= - - easy to use to create code-driven and data-driven tools - - easy to use to create ad hoc short-lived tools and long-lived, more elaborate tools - - easy to hack and improve - - minimize screen real-estate usage - - minimize setup and maintenance - - minimize state storage on user side - - portable, minimize dependencies, run on target (consoles, phones, etc.) - - efficient runtime (NB- we do allocate when "growing" content - creating a window / opening a tree node for the first time, etc. - but a typical frame won't allocate anything) - - read about immediate-mode gui principles @ http://mollyrocket.com/861, http://mollyrocket.com/forums/index.html + - Easy to use to create code-driven and data-driven tools + - Easy to use to create ad hoc short-lived tools and long-lived, more elaborate tools + - Easy to hack and improve + - Minimize screen real-estate usage + - Minimize setup and maintenance + - Minimize state storage on user side + - Portable, minimize dependencies, run on target (consoles, phones, etc.) + - Efficient runtime and memory consumption (NB- we do allocate when "growing" content e.g. creating a window, opening a tree node + for the first time, etc. but a typical frame won't allocate anything) Designed for developers and content-creators, not the typical end-user! Some of the weaknesses includes: - - doesn't look fancy, doesn't animate - - limited layout features, intricate layouts are typically crafted in code - - occasionally uses statically sized buffers for string manipulations - won't crash, but some very long pieces of text may be clipped. functions like ImGui::TextUnformatted() don't have such restriction. + - Doesn't look fancy, doesn't animate + - Limited layout features, intricate layouts are typically crafted in code END-USER GUIDE ============== - - double-click title bar to collapse window - - click upper right corner to close a window, available when 'bool* p_open' is passed to ImGui::Begin() - - click and drag on lower right corner to resize window - - click and drag on any empty space to move window - - double-click/double-tap on lower right corner grip to auto-fit to content - - TAB/SHIFT+TAB to cycle through keyboard editable fields - - use mouse wheel to scroll - - use CTRL+mouse wheel to zoom window contents (if IO.FontAllowScaling is true) - - CTRL+Click on a slider or drag box to input value as text - - text editor: + - Double-click on title bar to collapse window. + - Click upper right corner to close a window, available when 'bool* p_open' is passed to ImGui::Begin(). + - Click and drag on lower right corner to resize window (double-click to auto fit window to its contents). + - Click and drag on any empty space to move window. + - TAB/SHIFT+TAB to cycle through keyboard editable fields. + - CTRL+Click on a slider or drag box to input value as text. + - Use mouse wheel to scroll. + - Text editor: - Hold SHIFT or use mouse to select text. - - CTRL+Left/Right to word jump - - CTRL+Shift+Left/Right to select words - - CTRL+A our Double-Click to select all - - CTRL+X,CTRL+C,CTRL+V to use OS clipboard - - CTRL+Z,CTRL+Y to undo/redo - - ESCAPE to revert text to its original value + - CTRL+Left/Right to word jump. + - CTRL+Shift+Left/Right to select words. + - CTRL+A our Double-Click to select all. + - CTRL+X,CTRL+C,CTRL+V to use OS clipboard/ + - CTRL+Z,CTRL+Y to undo/redo. + - ESCAPE to revert text to its original value. - You can apply arithmetic operators +,*,/ on numerical values. Use +- to subtract (because - would set a negative value!) + - Controls are automatically adjusted for OSX to match standard OSX text editing operations. PROGRAMMER GUIDE ================ - - read the FAQ below this section! - - your code creates the UI, if your code doesn't run the UI is gone! == very dynamic UI, no construction/destructions steps, less data retention on your side, no state duplication, less sync, less bugs. - - call and read ImGui::ShowTestWindow() for demo code demonstrating most features. - - see examples/ folder for standalone sample applications. Prefer reading examples/opengl2_example/ first as it is the simplest. - you may be able to grab and copy a ready made imgui_impl_*** file from the examples/. - - customization: PushStyleColor()/PushStyleVar() or the style editor to tweak the look of the interface (e.g. if you want a more compact UI or a different color scheme). + READ FIRST - - getting started: - - init: call ImGui::GetIO() to retrieve the ImGuiIO structure and fill the fields marked 'Settings'. - - init: call io.Fonts->GetTexDataAsRGBA32(...) and load the font texture pixels into graphics memory. - - every frame: - 1/ in your mainloop or right after you got your keyboard/mouse info, call ImGui::GetIO() and fill the fields marked 'Input' - 2/ call ImGui::NewFrame() as early as you can! - 3/ use any ImGui function you want between NewFrame() and Render() - 4/ call ImGui::Render() as late as you can to end the frame and finalize render data. it will call your RenderDrawListFn handler that you set in the IO structure. - (if you don't need to render, you still need to call Render() and ignore the callback, or call EndFrame() instead. if you call neither some aspects of windows focusing/moving will appear broken.) - - all rendering information are stored into command-lists until ImGui::Render() is called. - - ImGui never touches or know about your GPU state. the only function that knows about GPU is the RenderDrawListFn handler that you provide. - - effectively it means you can create widgets at any time in your code, regardless of considerations of being in "update" vs "render" phases of your own application. - - refer to the examples applications in the examples/ folder for instruction on how to setup your code. - - a typical application skeleton may be: + - Read the FAQ below this section! + - Your code creates the UI, if your code doesn't run the UI is gone! == very dynamic UI, no construction/destructions steps, less data retention + on your side, no state duplication, less sync, less bugs. + - Call and read ImGui::ShowDemoWindow() for demo code demonstrating most features. + - You can learn about immediate-mode gui principles at http://www.johno.se/book/imgui.html or watch http://mollyrocket.com/861 - // Application init + HOW TO UPDATE TO A NEWER VERSION OF DEAR IMGUI + + - Overwrite all the sources files except for imconfig.h (if you have made modification to your copy of imconfig.h) + - Read the "API BREAKING CHANGES" section (below). This is where we list occasional API breaking changes. + If a function/type has been renamed / or marked obsolete, try to fix the name in your code before it is permanently removed from the public API. + If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it. + Please report any issue to the GitHub page! + - Try to keep your copy of dear imgui reasonably up to date. + + GETTING STARTED WITH INTEGRATING DEAR IMGUI IN YOUR CODE/ENGINE + + - Add the Dear ImGui source files to your projects, using your preferred build system. + It is recommended you build the .cpp files as part of your project and not as a library. + - You can later customize the imconfig.h file to tweak some compilation time behavior, such as integrating imgui types with your own maths types. + - See examples/ folder for standalone sample applications. + - You may be able to grab and copy a ready made imgui_impl_*** file from the examples/. + - When using Dear ImGui, your programming IDE is your friend: follow the declaration of variables, functions and types to find comments about them. + + - Init: retrieve the ImGuiIO structure with ImGui::GetIO() and fill the fields marked 'Settings': at minimum you need to set io.DisplaySize + (application resolution). Later on you will fill your keyboard mapping, clipboard handlers, and other advanced features but for a basic + integration you don't need to worry about it all. + - Init: call io.Fonts->GetTexDataAsRGBA32(...), it will build the font atlas texture, then load the texture pixels into graphics memory. + - Every frame: + - In your main loop as early a possible, fill the IO fields marked 'Input' (e.g. mouse position, buttons, keyboard info, etc.) + - Call ImGui::NewFrame() to begin the frame + - You can use any ImGui function you want between NewFrame() and Render() + - Call ImGui::Render() as late as you can to end the frame and finalize render data. it will call your io.RenderDrawListFn handler. + (Even if you don't render, call Render() and ignore the callback, or call EndFrame() instead. Otherwhise some features will break) + - All rendering information are stored into command-lists until ImGui::Render() is called. + - Dear ImGui never touches or knows about your GPU state. the only function that knows about GPU is the RenderDrawListFn handler that you provide. + - Effectively it means you can create widgets at any time in your code, regardless of considerations of being in "update" vs "render" phases + of your own application. + - Refer to the examples applications in the examples/ folder for instruction on how to setup your code. + - A minimal application skeleton may be: + + // Application init + ImGuiIO& io = ImGui::GetIO(); + io.DisplaySize.x = 1920.0f; + io.DisplaySize.y = 1280.0f; + io.RenderDrawListsFn = MyRenderFunction; // Setup a render function, or set to NULL and call GetDrawData() after Render() to access render data. + // TODO: Fill others settings of the io structure later. + + // Load texture atlas (there is a default font so you don't need to care about choosing a font yet) + unsigned char* pixels; + int width, height; + io.Fonts->GetTexDataAsRGBA32(pixels, &width, &height); + // TODO: At this points you've got the texture data and you need to upload that your your graphic system: + MyTexture* texture = MyEngine::CreateTextureFromMemoryPixels(pixels, width, height, TEXTURE_TYPE_RGBA) + // TODO: Store your texture pointer/identifier (whatever your engine uses) in 'io.Fonts->TexID'. This will be passed back to your via the renderer. + io.Fonts->TexID = (void*)texture; + + // Application main loop + while (true) + { + // Setup low-level inputs (e.g. on Win32, GetKeyboardState(), or write to those fields from your Windows message loop handlers, etc.) ImGuiIO& io = ImGui::GetIO(); - io.DisplaySize.x = 1920.0f; - io.DisplaySize.y = 1280.0f; - io.IniFilename = "imgui.ini"; - io.RenderDrawListsFn = my_render_function; // Setup a render function, or set to NULL and call GetDrawData() after Render() to access the render data. - // TODO: Fill others settings of the io structure + io.DeltaTime = 1.0f/60.0f; + io.MousePos = mouse_pos; + io.MouseDown[0] = mouse_button_0; + io.MouseDown[1] = mouse_button_1; - // Load texture atlas - // There is a default font so you don't need to care about choosing a font yet - unsigned char* pixels; - int width, height; - io.Fonts->GetTexDataAsRGBA32(pixels, &width, &height); - // TODO: At this points you've got a texture pointed to by 'pixels' and you need to upload that your your graphic system - // TODO: Store your texture pointer/identifier (whatever your engine uses) in 'io.Fonts->TexID' + // Call NewFrame(), after this point you can use ImGui::* functions anytime + ImGui::NewFrame(); - // Application main loop - while (true) - { - // 1) get low-level inputs (e.g. on Win32, GetKeyboardState(), or poll your events, etc.) - // TODO: fill all fields of IO structure and call NewFrame - ImGuiIO& io = ImGui::GetIO(); - io.DeltaTime = 1.0f/60.0f; - io.MousePos = mouse_pos; - io.MouseDown[0] = mouse_button_0; - io.MouseDown[1] = mouse_button_1; - io.KeysDown[i] = ... + // Most of your application code here + MyGameUpdate(); // may use any ImGui functions, e.g. ImGui::Begin("My window"); ImGui::Text("Hello, world!"); ImGui::End(); + MyGameRender(); // may use any ImGui functions as well! + + // Render & swap video buffers + ImGui::Render(); + SwapBuffers(); + } - // 2) call NewFrame(), after this point you can use ImGui::* functions anytime - ImGui::NewFrame(); + - A minimal render function skeleton may be: - // 3) most of your application code here - MyGameUpdate(); // may use any ImGui functions, e.g. ImGui::Begin("My window"); ImGui::Text("Hello, world!"); ImGui::End(); - MyGameRender(); // may use any ImGui functions + void void MyRenderFunction(ImDrawData* draw_data) + { + // TODO: Setup render state: alpha-blending enabled, no face culling, no depth testing, scissor enabled + // TODO: Setup viewport, orthographic projection matrix + // TODO: Setup shader: vertex { float2 pos, float2 uv, u32 color }, fragment shader sample color from 1 texture, multiply by vertex color. + for (int n = 0; n < draw_data->CmdListsCount; n++) + { + const ImDrawVert* vtx_buffer = cmd_list->VtxBuffer.Data; // vertex buffer generated by ImGui + const ImDrawIdx* idx_buffer = cmd_list->IdxBuffer.Data; // index buffer generated by ImGui + for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++) + { + const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i]; + if (pcmd->UserCallback) + { + pcmd->UserCallback(cmd_list, pcmd); + } + else + { + // The texture for the draw call is specified by pcmd->TextureId. + // The vast majority of draw calls with use the imgui texture atlas, which value you have set yourself during initialization. + MyEngineBindTexture(pcmd->TextureId); - // 4) render & swap video buffers - ImGui::Render(); - SwapBuffers(); - } + // We are using scissoring to clip some objects. All low-level graphics API supports it. + // If your engine doesn't support scissoring yet, you will get some small glitches (some elements outside their bounds) which you can fix later. + MyEngineScissor((int)pcmd->ClipRect.x, (int)pcmd->ClipRect.y, (int)(pcmd->ClipRect.z - pcmd->ClipRect.x), (int)(pcmd->ClipRect.w - pcmd->ClipRect.y)); + + // Render 'pcmd->ElemCount/3' indexed triangles. + // By default the indices ImDrawIdx are 16-bits, you can change them to 32-bits if your engine doesn't support 16-bits indices. + MyEngineDrawIndexedTriangles(pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, idx_buffer, vtx_buffer); + } + idx_buffer += pcmd->ElemCount; + } + } + } + + - The examples/ folders contains many functional implementation of the pseudo-code above. + - When calling NewFrame(), the 'io.WantCaptureMouse'/'io.WantCaptureKeyboard'/'io.WantTextInput' flags are updated. + They tell you if ImGui intends to use your inputs. So for example, if 'io.WantCaptureMouse' is set you would typically want to hide + mouse inputs from the rest of your application. Read the FAQ below for more information about those flags. - - You can read back 'io.WantCaptureMouse', 'io.WantCaptureKeybord' etc. flags from the IO structure to tell how ImGui intends to use your - inputs and to know if you should share them or hide them from the rest of your application. Read the FAQ below for more information. API BREAKING CHANGES @@ -152,6 +213,50 @@ Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code. Also read releases logs https://github.com/ocornut/imgui/releases for more details. + - 2018/01/11 (1.54) - obsoleted IsAnyWindowHovered() in favor of IsWindowHovered(ImGuiHoveredFlags_AnyWindow). Kept redirection function (will obsolete). + - 2018/01/11 (1.54) - obsoleted IsAnyWindowFocused() in favor of IsWindowFocused(ImGuiFocusedFlags_AnyWindow). Kept redirection function (will obsolete). + - 2018/01/03 (1.54) - renamed ImGuiSizeConstraintCallback to ImGuiSizeCallback, ImGuiSizeConstraintCallbackData to ImGuiSizeCallbackData. + - 2017/12/29 (1.54) - removed CalcItemRectClosestPoint() which was weird and not really used by anyone except demo code. If you need it it's easy to replicate on your side. + - 2017/12/24 (1.53) - renamed the emblematic ShowTestWindow() function to ShowDemoWindow(). Kept redirection function (will obsolete). + - 2017/12/21 (1.53) - ImDrawList: renamed style.AntiAliasedShapes to style.AntiAliasedFill for consistency and as a way to explicitly break code that manipulate those flag at runtime. You can now manipulate ImDrawList::Flags + - 2017/12/21 (1.53) - ImDrawList: removed 'bool anti_aliased = true' final parameter of ImDrawList::AddPolyline() and ImDrawList::AddConvexPolyFilled(). Prefer manipulating ImDrawList::Flags if you need to toggle them during the frame. + - 2017/12/14 (1.53) - using the ImGuiWindowFlags_NoScrollWithMouse flag on a child window forwards the mouse wheel event to the parent window, unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set. + - 2017/12/13 (1.53) - renamed GetItemsLineHeightWithSpacing() to GetFrameHeightWithSpacing(). Kept redirection function (will obsolete). + - 2017/12/13 (1.53) - obsoleted IsRootWindowFocused() in favor of using IsWindowFocused(ImGuiFocusedFlags_RootWindow). Kept redirection function (will obsolete). + - obsoleted IsRootWindowOrAnyChildFocused() in favor of using IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows). Kept redirection function (will obsolete). + - 2017/12/12 (1.53) - renamed ImGuiTreeNodeFlags_AllowOverlapMode to ImGuiTreeNodeFlags_AllowItemOverlap. Kept redirection enum (will obsolete). + - 2017/12/10 (1.53) - removed SetNextWindowContentWidth(), prefer using SetNextWindowContentSize(). Kept redirection function (will obsolete). + - 2017/11/27 (1.53) - renamed ImGuiTextBuffer::append() helper to appendf(), appendv() to appendfv(). If you copied the 'Log' demo in your code, it uses appendv() so that needs to be renamed. + - 2017/11/18 (1.53) - Style, Begin: removed ImGuiWindowFlags_ShowBorders window flag. Borders are now fully set up in the ImGuiStyle structure (see e.g. style.FrameBorderSize, style.WindowBorderSize). Use ImGui::ShowStyleEditor() to look them up. + Please note that the style system will keep evolving (hopefully stabilizing in Q1 2018), and so custom styles will probably subtly break over time. It is recommended you use the StyleColorsClassic(), StyleColorsDark(), StyleColorsLight() functions. + - 2017/11/18 (1.53) - Style: removed ImGuiCol_ComboBg in favor of combo boxes using ImGuiCol_PopupBg for consistency. + - 2017/11/18 (1.53) - Style: renamed ImGuiCol_ChildWindowBg to ImGuiCol_ChildBg. + - 2017/11/18 (1.53) - Style: renamed style.ChildWindowRounding to style.ChildRounding, ImGuiStyleVar_ChildWindowRounding to ImGuiStyleVar_ChildRounding. + - 2017/11/02 (1.53) - obsoleted IsRootWindowOrAnyChildHovered() in favor of using IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows); + - 2017/10/24 (1.52) - renamed IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS/IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS to IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS/IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS for consistency. + - 2017/10/20 (1.52) - changed IsWindowHovered() default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. + - 2017/10/20 (1.52) - marked IsItemHoveredRect()/IsMouseHoveringWindow() as obsolete, in favor of using the newly introduced flags for IsItemHovered() and IsWindowHovered(). See https://github.com/ocornut/imgui/issues/1382 for details. + removed the IsItemRectHovered()/IsWindowRectHovered() names introduced in 1.51 since they were merely more consistent names for the two functions we are now obsoleting. + - 2017/10/17 (1.52) - marked the old 5-parameters version of Begin() as obsolete (still available). Use SetNextWindowSize()+Begin() instead! + - 2017/10/11 (1.52) - renamed AlignFirstTextHeightToWidgets() to AlignTextToFramePadding(). Kept inline redirection function (will obsolete). + - 2017/09/25 (1.52) - removed SetNextWindowPosCenter() because SetNextWindowPos() now has the optional pivot information to do the same and more. Kept redirection function (will obsolete). + - 2017/08/25 (1.52) - io.MousePos needs to be set to ImVec2(-FLT_MAX,-FLT_MAX) when mouse is unavailable/missing. Previously ImVec2(-1,-1) was enough but we now accept negative mouse coordinates. In your binding if you need to support unavailable mouse, make sure to replace "io.MousePos = ImVec2(-1,-1)" with "io.MousePos = ImVec2(-FLT_MAX,-FLT_MAX)". + - 2017/08/22 (1.51) - renamed IsItemHoveredRect() to IsItemRectHovered(). Kept inline redirection function (will obsolete). -> (1.52) use IsItemHovered(ImGuiHoveredFlags_RectOnly)! + - renamed IsMouseHoveringAnyWindow() to IsAnyWindowHovered() for consistency. Kept inline redirection function (will obsolete). + - renamed IsMouseHoveringWindow() to IsWindowRectHovered() for consistency. Kept inline redirection function (will obsolete). + - 2017/08/20 (1.51) - renamed GetStyleColName() to GetStyleColorName() for consistency. + - 2017/08/20 (1.51) - added PushStyleColor(ImGuiCol idx, ImU32 col) overload, which _might_ cause an "ambiguous call" compilation error if you are using ImColor() with implicit cast. Cast to ImU32 or ImVec4 explicily to fix. + - 2017/08/15 (1.51) - marked the weird IMGUI_ONCE_UPON_A_FRAME helper macro as obsolete. prefer using the more explicit ImGuiOnceUponAFrame. + - 2017/08/15 (1.51) - changed parameter order for BeginPopupContextWindow() from (const char*,int buttons,bool also_over_items) to (const char*,int buttons,bool also_over_items). Note that most calls relied on default parameters completely. + - 2017/08/13 (1.51) - renamed ImGuiCol_Columns*** to ImGuiCol_Separator***. Kept redirection enums (will obsolete). + - 2017/08/11 (1.51) - renamed ImGuiSetCond_*** types and flags to ImGuiCond_***. Kept redirection enums (will obsolete). + - 2017/08/09 (1.51) - removed ValueColor() helpers, they are equivalent to calling Text(label) + SameLine() + ColorButton(). + - 2017/08/08 (1.51) - removed ColorEditMode() and ImGuiColorEditMode in favor of ImGuiColorEditFlags and parameters to the various Color*() functions. The SetColorEditOptions() allows to initialize default but the user can still change them with right-click context menu. + - changed prototype of 'ColorEdit4(const char* label, float col[4], bool show_alpha = true)' to 'ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0)', where passing flags = 0x01 is a safe no-op (hello dodgy backward compatibility!). - check and run the demo window, under "Color/Picker Widgets", to understand the various new options. + - changed prototype of rarely used 'ColorButton(ImVec4 col, bool small_height = false, bool outline_border = true)' to 'ColorButton(const char* desc_id, ImVec4 col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0,0))' + - 2017/07/20 (1.51) - removed IsPosHoveringAnyWindow(ImVec2), which was partly broken and misleading. ASSERT + redirect user to io.WantCaptureMouse + - 2017/05/26 (1.50) - removed ImFontConfig::MergeGlyphCenterV in favor of a more multipurpose ImFontConfig::GlyphOffset. + - 2017/05/01 (1.50) - renamed ImDrawList::PathFill() (rarely used directly) to ImDrawList::PathFillConvex() for clarity. - 2016/11/06 (1.50) - BeginChild(const char*) now applies the stack id to the provided label, consistently with other functions as it should always have been. It shouldn't affect you unless (extremely unlikely) you were appending multiple times to a same child from different locations of the stack id. If that's the case, generate an id with GetId() and use it instead of passing string to BeginChild(). - 2016/10/15 (1.50) - avoid 'void* user_data' parameter to io.SetClipboardTextFn/io.GetClipboardTextFn pointers. We pass io.ClipboardUserData to it. - 2016/09/25 (1.50) - style.WindowTitleAlign is now a ImVec2 (ImGuiAlign enum was removed). set to (0.5f,0.5f) for horizontal+vertical centering, (0.0f,0.0f) for upper-left, etc. @@ -260,90 +365,80 @@ - 2014/08/28 (1.09) - changed the behavior of IO.PixelCenterOffset following various rendering fixes + ISSUES & TODO-LIST + ================== + See TODO.txt + + FREQUENTLY ASKED QUESTIONS (FAQ), TIPS ====================================== Q: How can I help? - A: - If you are experienced enough with ImGui and with C/C++, look at the todo list and see how you want/can help! - - Become a Patron/donate. Convince your company to become a Patron or provide serious funding for development time. + A: - If you are experienced with Dear ImGui and C++, look at the github issues, or TODO.txt and see how you want/can help! + - Convince your company to fund development time! Individual users: you can also become a Patron (patreon.com/imgui) or donate on PayPal! See README. + - Disclose your usage of dear imgui via a dev blog post, a tweet, a screenshot, a mention somewhere etc. + You may post screenshot or links in the gallery threads (github.com/ocornut/imgui/issues/1269). Visuals are ideal as they inspire other programmers. + But even without visuals, disclosing your use of dear imgui help the library grow credibility, and help other teams and programmers with taking decisions. + - If you have issues or if you need to hack into the library, even if you don't expect any support it is useful that you share your issues (on github or privately). - Q: How do I update to a newer version of ImGui? - A: Overwrite the following files: - imgui.cpp - imgui.h - imgui_demo.cpp - imgui_draw.cpp - imgui_internal.h - stb_rect_pack.h - stb_textedit.h - stb_truetype.h - Don't overwrite imconfig.h if you have made modification to your copy. - Check the "API BREAKING CHANGES" sections for a list of occasional API breaking changes. If you have a problem with a function, search for its name - in the code, there will likely be a comment about it. Please report any issue to the GitHub page! - - Q: What is ImTextureID and how do I display an image? + Q: How can I display an image? What is ImTextureID, how does it works? A: ImTextureID is a void* used to pass renderer-agnostic texture references around until it hits your render function. - ImGui knows nothing about what those bits represent, it just passes them around. It is up to you to decide what you want the void* to carry! + Dear ImGui knows nothing about what those bits represent, it just passes them around. It is up to you to decide what you want the void* to carry! It could be an identifier to your OpenGL texture (cast GLuint to void*), a pointer to your custom engine material (cast MyMaterial* to void*), etc. At the end of the chain, your renderer takes this void* to cast it back into whatever it needs to select a current texture to render. Refer to examples applications, where each renderer (in a imgui_impl_xxxx.cpp file) is treating ImTextureID as a different thing. (c++ tip: OpenGL uses integers to identify textures. You can safely store an integer into a void*, just cast it to void*, don't take it's address!) To display a custom image/texture within an ImGui window, you may use ImGui::Image(), ImGui::ImageButton(), ImDrawList::AddImage() functions. - ImGui will generate the geometry and draw calls using the ImTextureID that you passed and which your renderer can use. + Dear ImGui will generate the geometry and draw calls using the ImTextureID that you passed and which your renderer can use. + You may call ImGui::ShowMetricsWindow() to explore active draw lists and visualize/understand how the draw data is generated. It is your responsibility to get textures uploaded to your GPU. - Q: I integrated ImGui in my engine and the text or lines are blurry.. - A: In your Render function, try translating your projection matrix by (0.5f,0.5f) or (0.375f,0.375f). - Also make sure your orthographic projection matrix and io.DisplaySize matches your actual framebuffer dimension. + Q: Can I have multiple widgets with the same label? Can I have widget without a label? + A: Yes. A primer on labels and the ID stack... - Q: I integrated ImGui in my engine and some elements are clipping or disappearing when I move windows around.. - A: Most likely you are mishandling the clipping rectangles in your render function. Rectangles provided by ImGui are defined as (x1=left,y1=top,x2=right,y2=bottom) and NOT as (x1,y1,width,height). + - Elements that are typically not clickable, such as Text() items don't need an ID. - Q: Can I have multiple widgets with the same label? Can I have widget without a label? (Yes) - A: Yes. A primer on the use of labels/IDs in ImGui.. + - Interactive widgets require state to be carried over multiple frames (most typically Dear ImGui often needs to remember what is + the "active" widget). to do so they need a unique ID. unique ID are typically derived from a string label, an integer index or a pointer. - - Elements that are not clickable, such as Text() items don't need an ID. + Button("OK"); // Label = "OK", ID = hash of "OK" + Button("Cancel"); // Label = "Cancel", ID = hash of "Cancel" - - Interactive widgets require state to be carried over multiple frames (most typically ImGui often needs to remember what is the "active" widget). - to do so they need a unique ID. unique ID are typically derived from a string label, an integer index or a pointer. - - Button("OK"); // Label = "OK", ID = hash of "OK" - Button("Cancel"); // Label = "Cancel", ID = hash of "Cancel" - - - ID are uniquely scoped within windows, tree nodes, etc. so no conflict can happen if you have two buttons called "OK" in two different windows - or in two different locations of a tree. + - ID are uniquely scoped within windows, tree nodes, etc. so no conflict can happen if you have two buttons called "OK" + in two different windows or in two different locations of a tree. - If you have a same ID twice in the same location, you'll have a conflict: Button("OK"); - Button("OK"); // ID collision! Both buttons will be treated as the same. + Button("OK"); // ID collision! Both buttons will be treated as the same. Fear not! this is easy to solve and there are many ways to solve it! - - When passing a label you can optionally specify extra unique ID information within string itself. This helps solving the simpler collision cases. - use "##" to pass a complement to the ID that won't be visible to the end-user: + - When passing a label you can optionally specify extra unique ID information within string itself. + Use "##" to pass a complement to the ID that won't be visible to the end-user. + This helps solving the simple collision cases when you know which items are going to be created. - Button("Play"); // Label = "Play", ID = hash of "Play" - Button("Play##foo1"); // Label = "Play", ID = hash of "Play##foo1" (different from above) - Button("Play##foo2"); // Label = "Play", ID = hash of "Play##foo2" (different from above) + Button("Play"); // Label = "Play", ID = hash of "Play" + Button("Play##foo1"); // Label = "Play", ID = hash of "Play##foo1" (different from above) + Button("Play##foo2"); // Label = "Play", ID = hash of "Play##foo2" (different from above) - If you want to completely hide the label, but still need an ID: - Checkbox("##On", &b); // Label = "", ID = hash of "##On" (no label!) + Checkbox("##On", &b); // Label = "", ID = hash of "##On" (no label!) - Occasionally/rarely you might want change a label while preserving a constant ID. This allows you to animate labels. - For example you may want to include varying information in a window title bar (and windows are uniquely identified by their ID.. obviously) + For example you may want to include varying information in a window title bar, but windows are uniquely identified by their ID.. Use "###" to pass a label that isn't part of ID: Button("Hello###ID"; // Label = "Hello", ID = hash of "ID" Button("World###ID"; // Label = "World", ID = hash of "ID" (same as above) - sprintf(buf, "My game (%f FPS)###MyGame"); + sprintf(buf, "My game (%f FPS)###MyGame", fps); Begin(buf); // Variable label, ID = hash of "MyGame" - Use PushID() / PopID() to create scopes and avoid ID conflicts within the same Window. This is the most convenient way of distinguishing ID if you are iterating and creating many UI elements. - You can push a pointer, a string or an integer value. Remember that ID are formed from the concatenation of everything in the ID stack! + You can push a pointer, a string or an integer value. Remember that ID are formed from the concatenation of _everything_ in the ID stack! for (int i = 0; i < 100; i++) { @@ -389,31 +484,37 @@ - When working with trees, ID are used to preserve the open/close state of each tree node. Depending on your use cases you may want to use strings, indices or pointers as ID. - e.g. when displaying a single object that may change over time (1-1 relationship), using a static string as ID will preserve your node open/closed state when the targeted object change. - e.g. when displaying a list of objects, using indices or pointers as ID will preserve the node open/closed state differently. experiment and see what makes more sense! + e.g. when displaying a single object that may change over time (dynamic 1-1 relationship), using a static string as ID will preserve your + node open/closed state when the targeted object change. + e.g. when displaying a list of objects, using indices or pointers as ID will preserve the node open/closed state differently. + experiment and see what makes more sense! - Q: How can I tell when ImGui wants my mouse/keyboard inputs and when I can pass them to my application? - A: You can read the 'io.WantCaptureXXX' flags in the ImGuiIO structure. Preferably read them after calling ImGui::NewFrame() to avoid those flags lagging by one frame, but either should be fine. - When 'io.WantCaptureMouse' or 'io.WantCaptureKeyboard' flags are set you may want to discard/hide the inputs from the rest of your application. - When 'io.WantInputsCharacters' is set to may want to notify your OS to popup an on-screen keyboard, if available. - ImGui is tracking dragging and widget activity that may occur outside the boundary of a window, so 'io.WantCaptureMouse' is a more accurate and complete than testing for ImGui::IsMouseHoveringAnyWindow(). - (Advanced note: text input releases focus on Return 'KeyDown', so the following Return 'KeyUp' event that your application receive will typically have 'io.WantcaptureKeyboard=false'. - Depending on your application logic it may or not be inconvenient. You might want to track which key-downs were for ImGui (e.g. with an array of bool) and filter out the corresponding key-ups.) + Q: How can I tell when Dear ImGui wants my mouse/keyboard inputs VS when I can pass them to my application? + A: You can read the 'io.WantCaptureMouse'/'io.WantCaptureKeyboard'/'ioWantTextInput' flags from the ImGuiIO structure. + - When 'io.WantCaptureMouse' or 'io.WantCaptureKeyboard' flags are set you may want to discard/hide the inputs from the rest of your application. + - When 'io.WantTextInput' is set to may want to notify your OS to popup an on-screen keyboard, if available (e.g. on a mobile phone, or console OS). + Preferably read the flags after calling ImGui::NewFrame() to avoid them lagging by one frame. But reading those flags before calling NewFrame() is + also generally ok, as the bool toggles fairly rarely and you don't generally expect to interact with either Dear ImGui or your application during + the same frame when that transition occurs. Dear ImGui is tracking dragging and widget activity that may occur outside the boundary of a window, + so 'io.WantCaptureMouse' is more accurate and correct than checking if a window is hovered. + (Advanced note: text input releases focus on Return 'KeyDown', so the following Return 'KeyUp' event that your application receive will typically + have 'io.WantCaptureKeyboard=false'. Depending on your application logic it may or not be inconvenient. You might want to track which key-downs + were for Dear ImGui, e.g. with an array of bool, and filter out the corresponding key-ups.) Q: How can I load a different font than the default? (default is an embedded version of ProggyClean.ttf, rendered at size 13) - A: Use the font atlas to load the TTF file you want: + A: Use the font atlas to load the TTF/OTF file you want: ImGuiIO& io = ImGui::GetIO(); io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_in_pixels); io.Fonts->GetTexDataAsRGBA32() or GetTexDataAsAlpha8() Q: How can I easily use icons in my application? - A: The most convenient and practical way is to merge an icon font such as FontAwesome inside you main font. Then you can refer to icons within your strings. - Read 'How can I load multiple fonts?' and the file 'extra_fonts/README.txt' for instructions. + A: The most convenient and practical way is to merge an icon font such as FontAwesome inside you main font. Then you can refer to icons within your + strings. Read 'How can I load multiple fonts?' and the file 'misc/fonts/README.txt' for instructions and useful header files. Q: How can I load multiple fonts? A: Use the font atlas to pack them into a single texture: - (Read extra_fonts/README.txt and the code in ImFontAtlas for more details.) + (Read misc/fonts/README.txt and the code in ImFontAtlas for more details.) ImGuiIO& io = ImGui::GetIO(); ImFont* font0 = io.Fonts->AddFontDefault(); @@ -427,7 +528,8 @@ ImFontConfig config; config.OversampleH = 3; config.OversampleV = 1; - config.GlyphExtraSpacing.x = 1.0f; + config.GlyphOffset.y -= 2.0f; // Move everything by 2 pixels up + config.GlyphExtraSpacing.x = 1.0f; // Increase spacing between characters io.Fonts->LoadFromFileTTF("myfontfile.ttf", size_pixels, &config); // Combine multiple fonts into one (e.g. for icon fonts) @@ -440,174 +542,54 @@ Q: How can I display and input non-Latin characters such as Chinese, Japanese, Korean, Cyrillic? A: When loading a font, pass custom Unicode ranges to specify the glyphs to load. - All your strings needs to use UTF-8 encoding. Specifying literal in your source code using a local code page (such as CP-923 for Japanese or CP-1251 for Cyrillic) will not work. - In C++11 you can encode a string literal in UTF-8 by using the u8"hello" syntax. Otherwise you can convert yourself to UTF-8 or load text data from file already saved as UTF-8. - You can also try to remap your local codepage characters to their Unicode codepoint using font->AddRemapChar(), but international users may have problems reading/editing your source code. - io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_in_pixels, NULL, io.Fonts->GetGlyphRangesJapanese()); // Load Japanese characters - io.Fonts->GetTexDataAsRGBA32() or GetTexDataAsAlpha8() - io.ImeWindowHandle = MY_HWND; // To input using Microsoft IME, give ImGui the hwnd of your application + // Add default Japanese ranges + io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_in_pixels, NULL, io.Fonts->GetGlyphRangesJapanese()); + + // Or create your own custom ranges (e.g. for a game you can feed your entire game script and only build the characters the game need) + ImVector ranges; + ImFontAtlas::GlyphRangesBuilder builder; + builder.AddText("Hello world"); // Add a string (here "Hello world" contains 7 unique characters) + builder.AddChar(0x7262); // Add a specific character + builder.AddRanges(io.Fonts->GetGlyphRangesJapanese()); // Add one of the default ranges + builder.BuildRanges(&ranges); // Build the final result (ordered ranges with all the unique characters submitted) + io.Fonts->AddFontFromFileTTF("myfontfile.ttf", size_in_pixels, NULL, ranges.Data); - As for text input, depends on you passing the right character code to io.AddInputCharacter(). The example applications do that. + All your strings needs to use UTF-8 encoding. In C++11 you can encode a string literal in UTF-8 by using the u8"hello" syntax. + Specifying literal in your source code using a local code page (such as CP-923 for Japanese or CP-1251 for Cyrillic) will NOT work! + Otherwise you can convert yourself to UTF-8 or load text data from file already saved as UTF-8. + + Text input: it is up to your application to pass the right character code to io.AddInputCharacter(). The applications in examples/ are doing that. + For languages using IME, on Windows you can copy the Hwnd of your application to io.ImeWindowHandle. + The default implementation of io.ImeSetInputScreenPosFn() on Windows will set your IME position correctly. + + Q: How can I preserve my Dear ImGui context across reloading a DLL? (loss of the global/static variables) + A: Create your own context 'ctx = CreateContext()' + 'SetCurrentContext(ctx)' and your own font atlas 'ctx->GetIO().Fonts = new ImFontAtlas()' + so you don't rely on the default globals. Q: How can I use the drawing facilities without an ImGui window? (using ImDrawList API) - A: The easiest way is to create a dummy window. Call Begin() with NoTitleBar|NoResize|NoMove|NoScrollbar|NoSavedSettings|NoInputs flag, zero background alpha, - then retrieve the ImDrawList* via GetWindowDrawList() and draw to it in any way you like. + A: - You can create a dummy window. Call Begin() with NoTitleBar|NoResize|NoMove|NoScrollbar|NoSavedSettings|NoInputs flag, + push a ImGuiCol_WindowBg with zero alpha, then retrieve the ImDrawList* via GetWindowDrawList() and draw to it in any way you like. + - You can call ImGui::GetOverlayDrawList() and use this draw list to display contents over every other imgui windows. + - You can create your own ImDrawList instance. You'll need to initialize them ImGui::GetDrawListSharedData(), or create your own ImDrawListSharedData. - - tip: the construct 'IMGUI_ONCE_UPON_A_FRAME { ... }' will run the block of code only once a frame. You can use it to quickly add custom UI in the middle of a deep nested inner loop in your code. - - tip: you can create widgets without a Begin()/End() block, they will go in an implicit window called "Debug" - - tip: you can call Begin() multiple times with the same name during the same frame, it will keep appending to the same window. this is also useful to set yourself in the context of another window (to get/set other settings) + Q: I integrated Dear ImGui in my engine and the text or lines are blurry.. + A: In your Render function, try translating your projection matrix by (0.5f,0.5f) or (0.375f,0.375f). + Also make sure your orthographic projection matrix and io.DisplaySize matches your actual framebuffer dimension. + + Q: I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around.. + A: You are probably mishandling the clipping rectangles in your render function. + Rectangles provided by ImGui are defined as (x1=left,y1=top,x2=right,y2=bottom) and NOT as (x1,y1,width,height). + + + - tip: you can call Begin() multiple times with the same name during the same frame, it will keep appending to the same window. + this is also useful to set yourself in the context of another window (to get/set other settings) + - tip: you can create widgets without a Begin()/End() block, they will go in an implicit window called "Debug". + - tip: the ImGuiOnceUponAFrame helper will allow run the block of code only once a frame. You can use it to quickly add custom UI in the middle + of a deep nested inner loop in your code. - tip: you can call Render() multiple times (e.g for VR renders). - - tip: call and read the ShowTestWindow() code in imgui_demo.cpp for more example of how to use ImGui! + - tip: call and read the ShowDemoWindow() code in imgui_demo.cpp for more example of how to use ImGui! - - ISSUES & TODO-LIST - ================== - Issue numbers (#) refer to github issues listed at https://github.com/ocornut/imgui/issues - The list below consist mostly of ideas noted down before they are requested/discussed by users (at which point it usually moves to the github) - - - doc: add a proper documentation+regression testing system (#435) - - window: add a way for very transient windows (non-saved, temporary overlay over hundreds of objects) to "clean" up from the global window list. perhaps a lightweight explicit cleanup pass. - - window: calling SetNextWindowSize() every frame with <= 0 doesn't do anything, may be useful to allow (particularly when used for a single axis) (#690) - - window: auto-fit feedback loop when user relies on any dynamic layout (window width multiplier, column) appears weird to end-user. clarify. - - window: allow resizing of child windows (possibly given min/max for each axis?) - - window: background options for child windows, border option (disable rounding) - - window: add a way to clear an existing window instead of appending (e.g. for tooltip override using a consistent api rather than the deferred tooltip) - - window: resizing from any sides? + mouse cursor directives for app. -!- window: begin with *p_open == false should return false. - - window: get size/pos helpers given names (see discussion in #249) - - window: a collapsed window can be stuck behind the main menu bar? - - window: when window is small, prioritize resize button over close button. - - window: detect extra End() call that pop the "Debug" window out and assert at call site instead of later. - - window/tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic. - - window: increase minimum size of a window with menus or fix the menu rendering so that it doesn't look odd. - - draw-list: maintaining bounding box per command would allow to merge draw command when clipping isn't relied on (typical non-scrolling window or non-overflowing column would merge with previous command). -!- scrolling: allow immediately effective change of scroll if we haven't appended items yet - - splitter/separator: formalize the splitter idiom into an official api (we want to handle n-way split) (#319) - - widgets: display mode: widget-label, label-widget (aligned on column or using fixed size), label-newline-tab-widget etc. - - widgets: clean up widgets internal toward exposing everything. - - widgets: add disabled and read-only modes (#211) - - main: considering adding an Init() function? some constructs are awkward in the implementation because of the lack of them. -!- main: make it so that a frame with no window registered won't refocus every window on subsequent frames (~bump LastFrameActive of all windows). - - main: IsItemHovered() make it more consistent for various type of widgets, widgets with multiple components, etc. also effectively IsHovered() region sometimes differs from hot region, e.g tree nodes - - main: IsItemHovered() info stored in a stack? so that 'if TreeNode() { Text; TreePop; } if IsHovered' return the hover state of the TreeNode? - - input text: clean up the mess caused by converting UTF-8 <> wchar. the code is rather inefficient right now and super fragile. - - input text: reorganize event handling, allow CharFilter to modify buffers, allow multiple events? (#541) - - input text: expose CursorPos in char filter event (#816) - - input text: flag to disable live update of the user buffer (also applies to float/int text input) - - input text: resize behavior - field could stretch when being edited? hover tooltip shows more text? - - input text: add ImGuiInputTextFlags_EnterToApply? (off #218) - - input text: add discard flag (e.g. ImGuiInputTextFlags_DiscardActiveBuffer) or make it easier to clear active focus for text replacement during edition (#725) - - input text multi-line: don't directly call AddText() which does an unnecessary vertex reserve for character count prior to clipping. and/or more line-based clipping to AddText(). and/or reorganize TextUnformatted/RenderText for more efficiency for large text (e.g TextUnformatted could clip and log separately, etc). - - input text multi-line: way to dynamically grow the buffer without forcing the user to initially allocate for worse case (follow up on #200) - - input text multi-line: line numbers? status bar? (follow up on #200) - - input text multi-line: behave better when user changes input buffer while editing is active (even though it is illegal behavior). namely, the change of buffer can create a scrollbar glitch (#725) - - input text: allow centering/positioning text so that ctrl+clicking Drag or Slider keeps the textual value at the same pixel position. - - input number: optional range min/max for Input*() functions - - input number: holding [-]/[+] buttons could increase the step speed non-linearly (or user-controlled) - - input number: use mouse wheel to step up/down - - input number: applying arithmetics ops (+,-,*,/) messes up with text edit undo stack. - - button: provide a button that looks framed. - - text: proper alignment options - - image/image button: misalignment on padded/bordered button? - - image/image button: parameters are confusing, image() has tint_col,border_col whereas imagebutton() has bg_col/tint_col. Even thou they are different parameters ordering could be more consistent. can we fix that? - - layout: horizontal layout helper (#97) - - layout: horizontal flow until no space left (#404) - - layout: more generic alignment state (left/right/centered) for single items? - - layout: clean up the InputFloatN/SliderFloatN/ColorEdit4 layout code. item width should include frame padding. - - layout: BeginGroup() needs a border option. - - columns: declare column set (each column: fixed size, %, fill, distribute default size among fills) (#513, #125) - - columns: add a conditional parameter to SetColumnOffset() (#513, #125) - - columns: separator function or parameter that works within the column (currently Separator() bypass all columns) (#125) - - columns: columns header to act as button (~sort op) and allow resize/reorder (#513, #125) - - columns: user specify columns size (#513, #125) - - columns: flag to add horizontal separator above/below? - - columns/layout: setup minimum line height (equivalent of automatically calling AlignFirstTextHeightToWidgets) - - combo: sparse combo boxes (via function call?) / iterators - - combo: contents should extends to fit label if combo widget is small - - combo/listbox: keyboard control. need InputText-like non-active focus + key handling. considering keyboard for custom listbox (pr #203) - - listbox: multiple selection - - listbox: user may want to initial scroll to focus on the one selected value? - - listbox: keyboard navigation. - - listbox: scrolling should track modified selection. -!- popups/menus: clarify usage of popups id, how MenuItem/Selectable closing parent popups affects the ID, etc. this is quite fishy needs improvement! (#331, #402) - - popups: add variant using global identifier similar to Begin/End (#402) - - popups: border options. richer api like BeginChild() perhaps? (#197) - - tooltip: tooltip that doesn't fit in entire screen seems to lose their "last preferred button" and may teleport when moving mouse - - menus: local shortcuts, global shortcuts (#456, #126) - - menus: icons - - menus: menubars: some sort of priority / effect of main menu-bar on desktop size? - - menus: calling BeginMenu() twice with a same name doesn't seem to append nicely - - statusbar: add a per-window status bar helper similar to what menubar does. - - tabs (#261, #351) - - separator: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y) -!- color: the color helpers/typing is a mess and needs sorting out. - - color: add a better color picker (#346) - - node/graph editor (#306) - - pie menus patterns (#434) - - drag'n drop, dragging helpers (carry dragging info, visualize drag source before clicking, drop target, etc.) (#143, #479) - - plot: PlotLines() should use the polygon-stroke facilities (currently issues with averaging normals) - - plot: make it easier for user to draw extra stuff into the graph (e.g: draw basis, highlight certain points, 2d plots, multiple plots) - - plot: "smooth" automatic scale over time, user give an input 0.0(full user scale) 1.0(full derived from value) - - plot: add a helper e.g. Plot(char* label, float value, float time_span=2.0f) that stores values and Plot them for you - probably another function name. and/or automatically allow to plot ANY displayed value (more reliance on stable ID) - - slider: allow using the [-]/[+] buttons used by InputFloat()/InputInt() - - slider: initial absolute click is imprecise. change to relative movement slider (same as scrollbar). - - slider: add dragging-based widgets to edit values with mouse (on 2 axises), saving screen real-estate. - - slider: tint background based on value (e.g. v_min -> v_max, or use 0.0f either side of the sign) - - slider & drag: int data passing through a float - - drag float: up/down axis - - drag float: added leeway on edge (e.g. a few invisible steps past the clamp limits) - - tree node / optimization: avoid formatting when clipped. - - tree node: tree-node/header right-most side doesn't take account of horizontal scrolling. - - tree node: add treenode/treepush int variants? not there because (void*) cast from int warns on some platforms/settings? - - tree node: try to apply scrolling at time of TreePop() if node was just opened and end of node is past scrolling limits? - - tree node / selectable render mismatch which is visible if you use them both next to each other (e.g. cf. property viewer) - - tree node: tweak color scheme to distinguish headers from selected tree node (#581) - - textwrapped: figure out better way to use TextWrapped() in an always auto-resize context (tooltip, etc.) (#249) - - settings: write more decent code to allow saving/loading new fields - - settings: api for per-tool simple persistent data (bool,int,float,columns sizes,etc.) in .ini file - - style: add window shadows. - - style/optimization: store rounded corners in texture to use 1 quad per corner (filled and wireframe) to lower the cost of rounding. - - style: color-box not always square? - - style: a concept of "compact style" that the end-user can easily rely on (e.g. PushStyleCompact()?) that maps to other settings? avoid implementing duplicate helpers such as SmallCheckbox(), etc. - - style: try to make PushStyleVar() more robust to incorrect parameters (to be more friendly to edit & continues situation). - - style: global scale setting. - - style: WindowPadding needs to be EVEN needs the 0.5 multiplier probably have a subtle effect on clip rectangle - - text: simple markup language for color change? - - font: dynamic font atlas to avoid baking huge ranges into bitmap and make scaling easier. - - font: small opt: for monospace font (like the defalt one) we can trim IndexXAdvance as long as trailing value is == FallbackXAdvance - - font: add support for kerning, probably optional. perhaps default to (32..128)^2 matrix ~ 36KB then hash fallback. - - font: add a simpler CalcTextSizeA() api? current one ok but not welcome if user needs to call it directly (without going through ImGui::CalcTextSize) - - font: fix AddRemapChar() to work before font has been built. - - log: LogButtons() options for specifying depth and/or hiding depth slider - - log: have more control over the log scope (e.g. stop logging when leaving current tree node scope) - - log: be able to log anything (e.g. right-click on a window/tree-node, shows context menu? log into tty/file/clipboard) - - log: let user copy any window content to clipboard easily (CTRL+C on windows? while moving it? context menu?). code is commented because it fails with multiple Begin/End pairs. - - filters: set a current filter that tree node can automatically query to hide themselves - - filters: handle wildcards (with implicit leading/trailing *), regexps - - shortcuts: add a shortcut api, e.g. parse "&Save" and/or "Save (CTRL+S)", pass in to widgets or provide simple ways to use (button=activate, input=focus) -!- keyboard: tooltip & combo boxes are messing up / not honoring keyboard tabbing - - keyboard: full keyboard navigation and focus. (#323) - - focus: preserve ActiveId/focus stack state, e.g. when opening a menu and close it, previously selected InputText() focus gets restored (#622) - - focus: SetKeyboardFocusHere() on with >= 0 offset could be done on same frame (else latch and modulate on beginning of next frame) - - input: rework IO system to be able to pass actual ordered/timestamped events. (~#335, #71) - - input: allow to decide and pass explicit double-clicks (e.g. for windows by the CS_DBLCLKS style). - - input: support track pad style scrolling & slider edit. - - misc: provide a way to compile out the entire implementation while providing a dummy API (e.g. #define IMGUI_DUMMY_IMPL) - - misc: double-clicking on title bar to minimize isn't consistent, perhaps move to single-click on left-most collapse icon? - - misc: provide HoveredTime and ActivatedTime to ease the creation of animations. - - style editor: have a more global HSV setter (e.g. alter hue on all elements). consider replacing active/hovered by offset in HSV space? (#438) - - style editor: color child window height expressed in multiple of line height. - - remote: make a system like RemoteImGui first-class citizen/project (#75) - - drawlist: move Font, FontSize, FontTexUvWhitePixel inside ImDrawList and make it self-contained (apart from drawing settings?) - - drawlist: end-user probably can't call Clear() directly because we expect a texture to be pushed in the stack. - - examples: directx9: save/restore device state more thoroughly. - - examples: window minimize, maximize (#583) - - optimization: add a flag to disable most of rendering, for the case where the user expect to skip it (#335) - - optimization: use another hash function than crc32, e.g. FNV1a - - optimization/render: merge command-lists with same clip-rect into one even if they aren't sequential? (as long as in-between clip rectangle don't overlap)? - - optimization: turn some the various stack vectors into statically-sized arrays - - optimization: better clipping for multi-component widgets */ #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) @@ -616,7 +598,6 @@ #include "imgui.h" #define IMGUI_DEFINE_MATH_OPERATORS -#define IMGUI_DEFINE_PLACEMENT_NEW #include "imgui_internal.h" #include // toupper, isprint @@ -638,16 +619,16 @@ // Clang warnings with -Weverything #ifdef __clang__ +#pragma clang diagnostic ignored "-Wunknown-pragmas" // warning : unknown warning group '-Wformat-pedantic *' // not all warnings are known by all clang versions.. so ignoring warnings triggers new warnings on some configuration. great! #pragma clang diagnostic ignored "-Wold-style-cast" // warning : use of old-style cast // yes, they are more terse. -#pragma clang diagnostic ignored "-Wfloat-equal" // warning : comparing floating point with == or != is unsafe // storing and comparing against same constants ok. +#pragma clang diagnostic ignored "-Wfloat-equal" // warning : comparing floating point with == or != is unsafe // storing and comparing against same constants (typically 0.0f) is ok. #pragma clang diagnostic ignored "-Wformat-nonliteral" // warning : format string is not a string literal // passing non-literal to vsnformat(). yes, user passing incorrect format strings can crash the code. #pragma clang diagnostic ignored "-Wexit-time-destructors" // warning : declaration requires an exit-time destructor // exit-time destruction order is undefined. if MemFree() leads to users code that has been disabled before exit it might cause problems. ImGui coding style welcomes static/globals. #pragma clang diagnostic ignored "-Wglobal-constructors" // warning : declaration requires a global destructor // similar to above, not sure what the exact difference it. #pragma clang diagnostic ignored "-Wsign-conversion" // warning : implicit conversion changes signedness // -#pragma clang diagnostic ignored "-Wmissing-noreturn" // warning : function xx could be declared with attribute 'noreturn' warning // GetDefaultFontData() asserts which some implementation makes it never return. #pragma clang diagnostic ignored "-Wdeprecated-declarations"// warning : 'xx' is deprecated: The POSIX name for this item.. // for strdup used in demo code (so user can copy & paste the code) -#pragma clang diagnostic ignored "-Wint-to-void-pointer-cast" // warning : cast to 'void *' from smaller integer type 'int' -#pragma clang diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used +#pragma clang diagnostic ignored "-Wunused-function" // warning : 'xxxx' defined but not used +#pragma clang diagnostic ignored "-Wformat-pedantic" // warning : format specifies type 'void *' but the argument has type 'xxxx *' // unreasonable, would lead to casting every %p arg to void*. probably enabled by -pedantic. #pragma clang diagnostic ignored "-Wint-to-void-pointer-cast" // warning : cast to 'void *' from smaller integer type 'int' // #elif defined(__GNUC__) #pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used @@ -656,53 +637,43 @@ #pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function #pragma GCC diagnostic ignored "-Wconversion" // warning: conversion to 'xxxx' from 'xxxx' may alter its value #pragma GCC diagnostic ignored "-Wcast-qual" // warning: cast from type 'xxxx' to type 'xxxx' casts away qualifiers +#pragma GCC diagnostic ignored "-Wformat-nonliteral" // warning: format not a string literal, format string not checked #endif //------------------------------------------------------------------------- // Forward Declarations //------------------------------------------------------------------------- -static void LogRenderedText(const ImVec2& ref_pos, const char* text, const char* text_end = NULL); - -static void PushMultiItemsWidths(int components, float w_full = 0.0f); -static float GetDraggedColumnOffset(int column_index); - static bool IsKeyPressedMap(ImGuiKey key, bool repeat = true); static ImFont* GetDefaultFont(); -static void SetCurrentFont(ImFont* font); static void SetCurrentWindow(ImGuiWindow* window); +static void SetWindowScrollX(ImGuiWindow* window, float new_scroll_x); static void SetWindowScrollY(ImGuiWindow* window, float new_scroll_y); -static void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiSetCond cond); -static void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiSetCond cond); -static void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiSetCond cond); -static ImGuiWindow* FindHoveredWindow(ImVec2 pos, bool excluding_childs); +static void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond); +static void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond); +static void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond); +static ImGuiWindow* FindHoveredWindow(ImVec2 pos); static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFlags flags); -static inline bool IsWindowContentHoverable(ImGuiWindow* window); -static void ClearSetNextWindowData(); static void CheckStacksSize(ImGuiWindow* window, bool write); -static void Scrollbar(ImGuiWindow* window, bool horizontal); +static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow* window); -static void AddDrawListToRenderList(ImVector& out_render_list, ImDrawList* draw_list); -static void AddWindowToRenderList(ImVector& out_render_list, ImGuiWindow* window); -static void AddWindowToSortedBuffer(ImVector& out_sorted_windows, ImGuiWindow* window); +static void AddDrawListToDrawData(ImVector* out_render_list, ImDrawList* draw_list); +static void AddWindowToDrawData(ImVector* out_render_list, ImGuiWindow* window); +static void AddWindowToSortedBuffer(ImVector* out_sorted_windows, ImGuiWindow* window); + +static ImGuiWindowSettings* AddWindowSettings(const char* name); -static ImGuiIniData* FindWindowSettings(const char* name); -static ImGuiIniData* AddWindowSettings(const char* name); static void LoadIniSettingsFromDisk(const char* ini_filename); +static void LoadIniSettingsFromMemory(const char* buf); static void SaveIniSettingsToDisk(const char* ini_filename); -static void MarkIniSettingsDirty(); +static void SaveIniSettingsToMemory(ImVector& out_buf); +static void MarkIniSettingsDirty(ImGuiWindow* window); -static void PushColumnClipRect(int column_index = -1); -static ImRect GetVisibleRect(); +static ImRect GetViewportRect(); -static bool BeginPopupEx(const char* str_id, ImGuiWindowFlags extra_flags); -static void CloseInactivePopups(); static void ClosePopupToLevel(int remaining); -static void ClosePopup(ImGuiID id); -static bool IsPopupOpen(ImGuiID id); static ImGuiWindow* GetFrontMostModalRootWindow(); -static ImVec2 FindBestPopupWindowPos(const ImVec2& base_pos, const ImVec2& size, int* last_dir, const ImRect& rect_to_avoid); static bool InputTextFilterCharacter(unsigned int* p_char, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data); static int InputTextCalcTextLenAndLineCount(const char* text_begin, const char** out_text_end); @@ -713,6 +684,12 @@ static inline void DataTypeFormatString(ImGuiDataType data_type, void* data static void DataTypeApplyOp(ImGuiDataType data_type, int op, void* value1, const void* value2); static bool DataTypeApplyOpFromText(const char* buf, const char* initial_value_buf, ImGuiDataType data_type, void* data_ptr, const char* scalar_format); +namespace ImGui +{ +static void UpdateManualResize(ImGuiWindow* window, const ImVec2& size_auto_fit, int* border_held, int resize_grip_count, ImU32 resize_grip_col[4]); +static void FocusFrontMostActiveWindow(ImGuiWindow* ignore_window); +} + //----------------------------------------------------------------------------- // Platform dependent default implementations //----------------------------------------------------------------------------- @@ -725,12 +702,13 @@ static void ImeSetInputScreenPosFn_DefaultImpl(int x, int y); // Context //----------------------------------------------------------------------------- -// Default font atlas storage . +// Default font atlas storage. // New contexts always point by default to this font atlas. It can be changed by reassigning the GetIO().Fonts variable. static ImFontAtlas GImDefaultFontAtlas; // Default context storage + current context pointer. // Implicitely used by all ImGui functions. Always assumed to be != NULL. Change to a different context by calling ImGui::SetCurrentContext() +// If you are hot-reloading this code in a DLL you will lose the static/global variables. Create your own context+font atlas instead of relying on those default (see FAQ entry "How can I preserve my ImGui context across reloading a DLL?"). // ImGui is currently not thread-safe because of this variable. If you want thread-safety to allow N threads to access N different contexts, you might work around it by: // - Having multiple instances of the ImGui code compiled inside different namespace (easiest/safest, if you have a finite number of contexts) // - or: Changing this variable to be TLS. You may #define GImGui in imconfig.h for further custom hackery. Future development aim to make this context pointer explicit to all calls. Also read https://github.com/ocornut/imgui/issues/586 @@ -747,12 +725,17 @@ ImGuiStyle::ImGuiStyle() { Alpha = 1.0f; // Global alpha applies to everything in ImGui WindowPadding = ImVec2(8,8); // Padding within a window + WindowRounding = 7.0f; // Radius of window corners rounding. Set to 0.0f to have rectangular windows + WindowBorderSize = 1.0f; // Thickness of border around windows. Generally set to 0.0f or 1.0f. Other values not well tested. WindowMinSize = ImVec2(32,32); // Minimum window size - WindowRounding = 9.0f; // Radius of window corners rounding. Set to 0.0f to have rectangular windows WindowTitleAlign = ImVec2(0.0f,0.5f);// Alignment for title bar text - ChildWindowRounding = 0.0f; // Radius of child window corners rounding. Set to 0.0f to have rectangular child windows + ChildRounding = 0.0f; // Radius of child window corners rounding. Set to 0.0f to have rectangular child windows + ChildBorderSize = 1.0f; // Thickness of border around child windows. Generally set to 0.0f or 1.0f. Other values not well tested. + PopupRounding = 0.0f; // Radius of popup window corners rounding. Set to 0.0f to have rectangular child windows + PopupBorderSize = 1.0f; // Thickness of border around popup or tooltip windows. Generally set to 0.0f or 1.0f. Other values not well tested. FramePadding = ImVec2(4,3); // Padding within a framed rectangle (used by most widgets) FrameRounding = 0.0f; // Radius of frame corners rounding. Set to 0.0f to have rectangular frames (used by most widgets). + FrameBorderSize = 0.0f; // Thickness of border around frames. Generally set to 0.0f or 1.0f. Other values not well tested. ItemSpacing = ImVec2(8,4); // Horizontal and vertical spacing between widgets/lines ItemInnerSpacing = ImVec2(4,4); // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label) TouchExtraPadding = ImVec2(0,0); // Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much! @@ -766,52 +749,34 @@ ImGuiStyle::ImGuiStyle() DisplayWindowPadding = ImVec2(22,22); // Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows. DisplaySafeAreaPadding = ImVec2(4,4); // If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows. AntiAliasedLines = true; // Enable anti-aliasing on lines/borders. Disable if you are really short on CPU/GPU. - AntiAliasedShapes = true; // Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.) - CurveTessellationTol = 1.25f; // Tessellation tolerance. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. + AntiAliasedFill = true; // Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.) + CurveTessellationTol = 1.25f; // Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. - Colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f); - Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f); - Colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.70f); - Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); - Colors[ImGuiCol_PopupBg] = ImVec4(0.05f, 0.05f, 0.10f, 0.90f); - Colors[ImGuiCol_Border] = ImVec4(0.70f, 0.70f, 0.70f, 0.65f); - Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); - Colors[ImGuiCol_FrameBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.30f); // Background of checkbox, radio button, plot, slider, text input - Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.90f, 0.80f, 0.80f, 0.40f); - Colors[ImGuiCol_FrameBgActive] = ImVec4(0.90f, 0.65f, 0.65f, 0.45f); - Colors[ImGuiCol_TitleBg] = ImVec4(0.27f, 0.27f, 0.54f, 0.83f); - Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.40f, 0.40f, 0.80f, 0.20f); - Colors[ImGuiCol_TitleBgActive] = ImVec4(0.32f, 0.32f, 0.63f, 0.87f); - Colors[ImGuiCol_MenuBarBg] = ImVec4(0.40f, 0.40f, 0.55f, 0.80f); - Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.20f, 0.25f, 0.30f, 0.60f); - Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.40f, 0.40f, 0.80f, 0.30f); - Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.40f, 0.40f, 0.80f, 0.40f); - Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 0.40f); - Colors[ImGuiCol_ComboBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.99f); - Colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.50f); - Colors[ImGuiCol_SliderGrab] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f); - Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f); - Colors[ImGuiCol_Button] = ImVec4(0.67f, 0.40f, 0.40f, 0.60f); - Colors[ImGuiCol_ButtonHovered] = ImVec4(0.67f, 0.40f, 0.40f, 1.00f); - Colors[ImGuiCol_ButtonActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f); - Colors[ImGuiCol_Header] = ImVec4(0.40f, 0.40f, 0.90f, 0.45f); - Colors[ImGuiCol_HeaderHovered] = ImVec4(0.45f, 0.45f, 0.90f, 0.80f); - Colors[ImGuiCol_HeaderActive] = ImVec4(0.53f, 0.53f, 0.87f, 0.80f); - Colors[ImGuiCol_Column] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f); - Colors[ImGuiCol_ColumnHovered] = ImVec4(0.70f, 0.60f, 0.60f, 1.00f); - Colors[ImGuiCol_ColumnActive] = ImVec4(0.90f, 0.70f, 0.70f, 1.00f); - Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f); - Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.60f); - Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f); - Colors[ImGuiCol_CloseButton] = ImVec4(0.50f, 0.50f, 0.90f, 0.50f); - Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.70f, 0.70f, 0.90f, 0.60f); - Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.70f, 0.70f, 0.70f, 1.00f); - Colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); - Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f); - Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f); - Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f); - Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f); - Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f); + ImGui::StyleColorsClassic(this); +} + +// To scale your entire UI (e.g. if you want your app to use High DPI or generally be DPI aware) you may use this helper function. Scaling the fonts is done separately and is up to you. +// Important: This operation is lossy because we round all sizes to integer. If you need to change your scale multiples, call this over a freshly initialized ImGuiStyle structure rather than scaling multiple times. +void ImGuiStyle::ScaleAllSizes(float scale_factor) +{ + WindowPadding = ImFloor(WindowPadding * scale_factor); + WindowRounding = ImFloor(WindowRounding * scale_factor); + WindowMinSize = ImFloor(WindowMinSize * scale_factor); + ChildRounding = ImFloor(ChildRounding * scale_factor); + PopupRounding = ImFloor(PopupRounding * scale_factor); + FramePadding = ImFloor(FramePadding * scale_factor); + FrameRounding = ImFloor(FrameRounding * scale_factor); + ItemSpacing = ImFloor(ItemSpacing * scale_factor); + ItemInnerSpacing = ImFloor(ItemInnerSpacing * scale_factor); + TouchExtraPadding = ImFloor(TouchExtraPadding * scale_factor); + IndentSpacing = ImFloor(IndentSpacing * scale_factor); + ColumnsMinSpacing = ImFloor(ColumnsMinSpacing * scale_factor); + ScrollbarSize = ImFloor(ScrollbarSize * scale_factor); + ScrollbarRounding = ImFloor(ScrollbarRounding * scale_factor); + GrabMinSize = ImFloor(GrabMinSize * scale_factor); + GrabRounding = ImFloor(GrabRounding * scale_factor); + DisplayWindowPadding = ImFloor(DisplayWindowPadding * scale_factor); + DisplaySafeAreaPadding = ImFloor(DisplaySafeAreaPadding * scale_factor); } ImGuiIO::ImGuiIO() @@ -819,31 +784,36 @@ ImGuiIO::ImGuiIO() // Most fields are initialized with zero memset(this, 0, sizeof(*this)); + // Settings DisplaySize = ImVec2(-1.0f, -1.0f); DeltaTime = 1.0f/60.0f; IniSavingRate = 5.0f; IniFilename = "imgui.ini"; LogFilename = "imgui_log.txt"; - Fonts = &GImDefaultFontAtlas; - FontGlobalScale = 1.0f; - FontDefault = NULL; - DisplayFramebufferScale = ImVec2(1.0f, 1.0f); - MousePos = ImVec2(-1,-1); - MousePosPrev = ImVec2(-1,-1); MouseDoubleClickTime = 0.30f; MouseDoubleClickMaxDist = 6.0f; - MouseDragThreshold = 6.0f; - for (int i = 0; i < IM_ARRAYSIZE(MouseDownDuration); i++) - MouseDownDuration[i] = MouseDownDurationPrev[i] = -1.0f; - for (int i = 0; i < IM_ARRAYSIZE(KeysDownDuration); i++) - KeysDownDuration[i] = KeysDownDurationPrev[i] = -1.0f; for (int i = 0; i < ImGuiKey_COUNT; i++) KeyMap[i] = -1; KeyRepeatDelay = 0.250f; KeyRepeatRate = 0.050f; UserData = NULL; - // User functions + Fonts = &GImDefaultFontAtlas; + FontGlobalScale = 1.0f; + FontDefault = NULL; + FontAllowUserScaling = false; + DisplayFramebufferScale = ImVec2(1.0f, 1.0f); + DisplayVisibleMin = DisplayVisibleMax = ImVec2(0.0f, 0.0f); + + // Advanced/subtle behaviors +#ifdef __APPLE__ + OptMacOSXBehaviors = true; // Set Mac OS X style defaults based on __APPLE__ compile time flag +#else + OptMacOSXBehaviors = false; +#endif + OptCursorBlink = true; + + // Settings (User Functions) RenderDrawListsFn = NULL; MemAllocFn = malloc; MemFreeFn = free; @@ -851,11 +821,14 @@ ImGuiIO::ImGuiIO() SetClipboardTextFn = SetClipboardTextFn_DefaultImpl; ClipboardUserData = NULL; ImeSetInputScreenPosFn = ImeSetInputScreenPosFn_DefaultImpl; + ImeWindowHandle = NULL; - // Set OS X style defaults based on __APPLE__ compile time flag -#ifdef __APPLE__ - OSXBehaviors = true; -#endif + // Input (NB: we already have memset zero the entire structure) + MousePos = ImVec2(-FLT_MAX, -FLT_MAX); + MousePosPrev = ImVec2(-FLT_MAX, -FLT_MAX); + MouseDragThreshold = 6.0f; + for (int i = 0; i < IM_ARRAYSIZE(MouseDownDuration); i++) MouseDownDuration[i] = MouseDownDurationPrev[i] = -1.0f; + for (int i = 0; i < IM_ARRAYSIZE(KeysDownDuration); i++) KeysDownDuration[i] = KeysDownDurationPrev[i] = -1.0f; } // Pass in translated ASCII characters for text input. @@ -895,7 +868,21 @@ void ImGuiIO::AddInputCharactersUTF8(const char* utf8_chars) #define IM_NEWLINE "\n" #endif -bool ImIsPointInTriangle(const ImVec2& p, const ImVec2& a, const ImVec2& b, const ImVec2& c) +ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& p) +{ + ImVec2 ap = p - a; + ImVec2 ab_dir = b - a; + float ab_len = sqrtf(ab_dir.x * ab_dir.x + ab_dir.y * ab_dir.y); + ab_dir *= 1.0f / ab_len; + float dot = ap.x * ab_dir.x + ap.y * ab_dir.y; + if (dot < 0.0f) + return a; + if (dot > ab_len) + return b; + return a + ab_dir * dot; +} + +bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p) { bool b1 = ((p.x - b.x) * (a.y - b.y) - (p.y - b.y) * (a.x - b.x)) < 0.0f; bool b2 = ((p.x - c.x) * (b.y - c.y) - (p.y - c.y) * (b.x - c.x)) < 0.0f; @@ -903,6 +890,33 @@ bool ImIsPointInTriangle(const ImVec2& p, const ImVec2& a, const ImVec2& b, cons return ((b1 == b2) && (b2 == b3)); } +void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p, float& out_u, float& out_v, float& out_w) +{ + ImVec2 v0 = b - a; + ImVec2 v1 = c - a; + ImVec2 v2 = p - a; + const float denom = v0.x * v1.y - v1.x * v0.y; + out_v = (v2.x * v1.y - v1.x * v2.y) / denom; + out_w = (v0.x * v2.y - v2.x * v0.y) / denom; + out_u = 1.0f - out_v - out_w; +} + +ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p) +{ + ImVec2 proj_ab = ImLineClosestPoint(a, b, p); + ImVec2 proj_bc = ImLineClosestPoint(b, c, p); + ImVec2 proj_ca = ImLineClosestPoint(c, a, p); + float dist2_ab = ImLengthSqr(p - proj_ab); + float dist2_bc = ImLengthSqr(p - proj_bc); + float dist2_ca = ImLengthSqr(p - proj_ca); + float m = ImMin(dist2_ab, ImMin(dist2_bc, dist2_ca)); + if (m == dist2_ab) + return proj_ab; + if (m == dist2_bc) + return proj_bc; + return proj_ca; +} + int ImStricmp(const char* str1, const char* str2) { int d; @@ -910,25 +924,33 @@ int ImStricmp(const char* str1, const char* str2) return d; } -int ImStrnicmp(const char* str1, const char* str2, int count) +int ImStrnicmp(const char* str1, const char* str2, size_t count) { int d = 0; while (count > 0 && (d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; count--; } return d; } -void ImStrncpy(char* dst, const char* src, int count) +void ImStrncpy(char* dst, const char* src, size_t count) { if (count < 1) return; - strncpy(dst, src, (size_t)count); + strncpy(dst, src, count); dst[count-1] = 0; } char* ImStrdup(const char *str) { size_t len = strlen(str) + 1; - void* buff = ImGui::MemAlloc(len); - return (char*)memcpy(buff, (const void*)str, len); + void* buf = ImGui::MemAlloc(len); + return (char*)memcpy(buf, (const void*)str, len); +} + +char* ImStrchrRange(const char* str, const char* str_end, char c) +{ + for ( ; str < str_end; str++) + if (*str == c) + return (char*)str; + return NULL; } int ImStrlenW(const ImWchar* str) @@ -967,31 +989,47 @@ const char* ImStristr(const char* haystack, const char* haystack_end, const char return NULL; } - -// MSVC version appears to return -1 on overflow, whereas glibc appears to return total count (which may be >= buf_size). -// Ideally we would test for only one of those limits at runtime depending on the behavior the vsnprintf(), but trying to deduct it at compile time sounds like a pandora can of worm. -int ImFormatString(char* buf, int buf_size, const char* fmt, ...) +static const char* ImAtoi(const char* src, int* output) +{ + int negative = 0; + if (*src == '-') { negative = 1; src++; } + if (*src == '+') { src++; } + int v = 0; + while (*src >= '0' && *src <= '9') + v = (v * 10) + (*src++ - '0'); + *output = negative ? -v : v; + return src; +} + +// A) MSVC version appears to return -1 on overflow, whereas glibc appears to return total count (which may be >= buf_size). +// Ideally we would test for only one of those limits at runtime depending on the behavior the vsnprintf(), but trying to deduct it at compile time sounds like a pandora can of worm. +// B) When buf==NULL vsnprintf() will return the output size. +#ifndef IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS +int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...) { - IM_ASSERT(buf_size > 0); va_list args; va_start(args, fmt); int w = vsnprintf(buf, buf_size, fmt, args); va_end(args); - if (w == -1 || w >= buf_size) - w = buf_size - 1; + if (buf == NULL) + return w; + if (w == -1 || w >= (int)buf_size) + w = (int)buf_size - 1; buf[w] = 0; return w; } -int ImFormatStringV(char* buf, int buf_size, const char* fmt, va_list args) +int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) { - IM_ASSERT(buf_size > 0); int w = vsnprintf(buf, buf_size, fmt, args); - if (w == -1 || w >= buf_size) - w = buf_size - 1; + if (buf == NULL) + return w; + if (w == -1 || w >= (int)buf_size) + w = (int)buf_size - 1; buf[w] = 0; return w; } +#endif // #ifdef IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS // Pass data_size==0 for zero-terminated strings // FIXME-OPT: Replace with e.g. FNV1a hash? CRC32 pretty much randomly access 1KB. Need to do proper measurements. @@ -1235,18 +1273,36 @@ ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in) ImU32 ImGui::GetColorU32(ImGuiCol idx, float alpha_mul) { - ImVec4 c = GImGui->Style.Colors[idx]; - c.w *= GImGui->Style.Alpha * alpha_mul; + ImGuiStyle& style = GImGui->Style; + ImVec4 c = style.Colors[idx]; + c.w *= style.Alpha * alpha_mul; return ColorConvertFloat4ToU32(c); } ImU32 ImGui::GetColorU32(const ImVec4& col) { + ImGuiStyle& style = GImGui->Style; ImVec4 c = col; - c.w *= GImGui->Style.Alpha; + c.w *= style.Alpha; return ColorConvertFloat4ToU32(c); } +const ImVec4& ImGui::GetStyleColorVec4(ImGuiCol idx) +{ + ImGuiStyle& style = GImGui->Style; + return style.Colors[idx]; +} + +ImU32 ImGui::GetColorU32(ImU32 col) +{ + float style_alpha = GImGui->Style.Alpha; + if (style_alpha >= 1.0f) + return col; + int a = (col & IM_COL32_A_MASK) >> IM_COL32_A_SHIFT; + a = (int)(a * style_alpha); // We don't need to clamp 0..255 because Style.Alpha is in 0..1 range. + return (col & ~IM_COL32_A_MASK) | (a << IM_COL32_A_SHIFT); +} + // Convert rgb floats ([0-1],[0-1],[0-1]) to hsv floats ([0-1],[0-1],[0-1]), from Foley & van Dam p592 // Optimized http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv void ImGui::ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v) @@ -1254,12 +1310,12 @@ void ImGui::ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& float K = 0.f; if (g < b) { - const float tmp = g; g = b; b = tmp; + ImSwap(g, b); K = -1.f; } if (r < g) { - const float tmp = r; r = g; g = tmp; + ImSwap(r, g); K = -2.f / 6.f - K; } @@ -1358,23 +1414,18 @@ void* ImFileLoadToMemory(const char* filename, const char* file_open_mode, int* //----------------------------------------------------------------------------- // ImGuiStorage -//----------------------------------------------------------------------------- - // Helper: Key->value storage -void ImGuiStorage::Clear() -{ - Data.clear(); -} +//----------------------------------------------------------------------------- // std::lower_bound but without the bullshit static ImVector::iterator LowerBound(ImVector& data, ImGuiID key) { ImVector::iterator first = data.begin(); ImVector::iterator last = data.end(); - int count = (int)(last - first); + size_t count = (size_t)(last - first); while (count > 0) { - int count2 = count / 2; + size_t count2 = count >> 1; ImVector::iterator mid = first + count2; if (mid->key < key) { @@ -1389,6 +1440,23 @@ static ImVector::iterator LowerBound(ImVectorkey > ((const Pair*)rhs)->key) return +1; + if (((const Pair*)lhs)->key < ((const Pair*)rhs)->key) return -1; + return 0; + } + }; + if (Data.Size > 1) + qsort(Data.Data, (size_t)Data.Size, sizeof(Pair), StaticFunc::PairCompareByID); +} + int ImGuiStorage::GetInt(ImGuiID key, int default_val) const { ImVector::iterator it = LowerBound(const_cast&>(Data), key); @@ -1604,12 +1672,12 @@ bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const #endif // Helper: Text buffer for logging/accumulating text -void ImGuiTextBuffer::appendv(const char* fmt, va_list args) +void ImGuiTextBuffer::appendfv(const char* fmt, va_list args) { va_list args_copy; va_copy(args_copy, args); - int len = vsnprintf(NULL, 0, fmt, args); // FIXME-OPT: could do a first pass write attempt, likely successful on first pass. + int len = ImFormatStringV(NULL, 0, fmt, args); // FIXME-OPT: could do a first pass write attempt, likely successful on first pass. if (len <= 0) return; @@ -1622,22 +1690,22 @@ void ImGuiTextBuffer::appendv(const char* fmt, va_list args) } Buf.resize(needed_sz); - ImFormatStringV(&Buf[write_off] - 1, len+1, fmt, args_copy); + ImFormatStringV(&Buf[write_off - 1], len + 1, fmt, args_copy); } -void ImGuiTextBuffer::append(const char* fmt, ...) +void ImGuiTextBuffer::appendf(const char* fmt, ...) { va_list args; va_start(args, fmt); - appendv(fmt, args); + appendfv(fmt, args); va_end(args); } //----------------------------------------------------------------------------- -// ImGuiSimpleColumns +// ImGuiSimpleColumns (internal use only) //----------------------------------------------------------------------------- -ImGuiSimpleColumns::ImGuiSimpleColumns() +ImGuiMenuColumns::ImGuiMenuColumns() { Count = 0; Spacing = Width = NextWidth = 0.0f; @@ -1645,7 +1713,7 @@ ImGuiSimpleColumns::ImGuiSimpleColumns() memset(NextWidths, 0, sizeof(NextWidths)); } -void ImGuiSimpleColumns::Update(int count, float spacing, bool clear) +void ImGuiMenuColumns::Update(int count, float spacing, bool clear) { IM_ASSERT(Count <= IM_ARRAYSIZE(Pos)); Count = count; @@ -1662,7 +1730,7 @@ void ImGuiSimpleColumns::Update(int count, float spacing, bool clear) } } -float ImGuiSimpleColumns::DeclColumns(float w0, float w1, float w2) // not using va_arg because they promote float to double +float ImGuiMenuColumns::DeclColumns(float w0, float w1, float w2) // not using va_arg because they promote float to double { NextWidth = 0.0f; NextWidths[0] = ImMax(NextWidths[0], w0); @@ -1673,7 +1741,7 @@ float ImGuiSimpleColumns::DeclColumns(float w0, float w1, float w2) // not using return ImMax(Width, NextWidth); } -float ImGuiSimpleColumns::CalcExtraSpace(float avail_w) +float ImGuiMenuColumns::CalcExtraSpace(float avail_w) { return ImMax(0.0f, avail_w - Width); } @@ -1690,8 +1758,8 @@ static void SetCursorPosYAndSetupDummyPrevLine(float pos_y, float line_height) ImGuiWindow* window = ImGui::GetCurrentWindow(); window->DC.CursorPosPrevLine.y = window->DC.CursorPos.y - line_height; // Setting those fields so that SetScrollHere() can properly function after the end of our clipper usage. window->DC.PrevLineHeight = (line_height - GImGui->Style.ItemSpacing.y); // If we end up needing more accurate data (to e.g. use SameLine) we may as well make the clipper have a fourth step to let user process and display the last item in their list. - if (window->DC.ColumnsCount > 1) - window->DC.ColumnsCellMinY = window->DC.CursorPos.y; // Setting this so that cell Y position are set properly + if (window->DC.ColumnsSet) + window->DC.ColumnsSet->CellMinY = window->DC.CursorPos.y; // Setting this so that cell Y position are set properly } // Use case A: Begin() called from constructor with items_height<0, then called again from Sync() in StepNo 1 @@ -1765,48 +1833,51 @@ bool ImGuiListClipper::Step() // ImGuiWindow //----------------------------------------------------------------------------- -ImGuiWindow::ImGuiWindow(const char* name) +ImGuiWindow::ImGuiWindow(ImGuiContext* context, const char* name) { Name = ImStrdup(name); ID = ImHash(name, 0); IDStack.push_back(ID); - MoveId = GetID("#MOVE"); - Flags = 0; - IndexWithinParent = 0; PosFloat = Pos = ImVec2(0.0f, 0.0f); Size = SizeFull = ImVec2(0.0f, 0.0f); SizeContents = SizeContentsExplicit = ImVec2(0.0f, 0.0f); WindowPadding = ImVec2(0.0f, 0.0f); + WindowRounding = 0.0f; + WindowBorderSize = 0.0f; + MoveId = GetID("#MOVE"); Scroll = ImVec2(0.0f, 0.0f); ScrollTarget = ImVec2(FLT_MAX, FLT_MAX); ScrollTargetCenterRatio = ImVec2(0.5f, 0.5f); ScrollbarX = ScrollbarY = false; ScrollbarSizes = ImVec2(0.0f, 0.0f); - BorderSize = 0.0f; Active = WasActive = false; - Accessed = false; + WriteAccessed = false; Collapsed = false; SkipItems = false; + Appearing = false; + CloseButton = false; + BeginOrderWithinParent = -1; + BeginOrderWithinContext = -1; BeginCount = 0; PopupId = 0; AutoFitFramesX = AutoFitFramesY = -1; AutoFitOnlyGrows = false; - AutoPosLastDirection = -1; + AutoFitChildAxises = 0x00; + AutoPosLastDirection = ImGuiDir_None; HiddenFrames = 0; - SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = ImGuiSetCond_Always | ImGuiSetCond_Once | ImGuiSetCond_FirstUseEver | ImGuiSetCond_Appearing; - SetWindowPosCenterWanted = false; + SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = ImGuiCond_Always | ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing; + SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX); LastFrameActive = -1; ItemWidthDefault = 0.0f; FontWindowScale = 1.0f; - DrawList = (ImDrawList*)ImGui::MemAlloc(sizeof(ImDrawList)); - IM_PLACEMENT_NEW(DrawList) ImDrawList(); + DrawList = IM_NEW(ImDrawList)(&context->DrawListSharedData); DrawList->_OwnerName = Name; + ParentWindow = NULL; RootWindow = NULL; RootNonPopupWindow = NULL; - ParentWindow = NULL; FocusIdxAllCounter = FocusIdxTabCounter = -1; FocusIdxAllRequestCurrent = FocusIdxTabRequestCurrent = INT_MAX; @@ -1815,11 +1886,10 @@ ImGuiWindow::ImGuiWindow(const char* name) ImGuiWindow::~ImGuiWindow() { - DrawList->~ImDrawList(); - ImGui::MemFree(DrawList); - DrawList = NULL; - ImGui::MemFree(Name); - Name = NULL; + IM_DELETE(DrawList); + IM_DELETE(Name); + for (int i = 0; i != ColumnsStorage.Size; i++) + ColumnsStorage[i].~ImGuiColumnsSet(); } ImGuiID ImGuiWindow::GetID(const char* str, const char* str_end) @@ -1844,6 +1914,16 @@ ImGuiID ImGuiWindow::GetIDNoKeepAlive(const char* str, const char* str_end) return ImHash(str, str_end ? (int)(str_end - str) : 0, seed); } +// This is only used in rare/specific situations to manufacture an ID out of nowhere. +ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs) +{ + ImGuiID seed = IDStack.back(); + const int r_rel[4] = { (int)(r_abs.Min.x - Pos.x), (int)(r_abs.Min.y - Pos.y), (int)(r_abs.Max.x - Pos.x), (int)(r_abs.Max.y - Pos.y) }; + ImGuiID id = ImHash(&r_rel, sizeof(r_rel), seed); + ImGui::KeepAliveID(id); + return id; +} + //----------------------------------------------------------------------------- // Internal API exposed in imgui_internal.h //----------------------------------------------------------------------------- @@ -1853,24 +1933,18 @@ static void SetCurrentWindow(ImGuiWindow* window) ImGuiContext& g = *GImGui; g.CurrentWindow = window; if (window) - g.FontSize = window->CalcFontSize(); -} - -ImGuiWindow* ImGui::GetParentWindow() -{ - ImGuiContext& g = *GImGui; - IM_ASSERT(g.CurrentWindowStack.Size >= 2); - return g.CurrentWindowStack[(unsigned int)g.CurrentWindowStack.Size - 2]; + g.FontSize = g.DrawListSharedData.FontSize = window->CalcFontSize(); } void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window) { ImGuiContext& g = *GImGui; + g.ActiveIdIsJustActivated = (g.ActiveId != id); + if (g.ActiveIdIsJustActivated) + g.ActiveIdTimer = 0.0f; g.ActiveId = id; g.ActiveIdAllowOverlap = false; - g.ActiveIdIsJustActivated = true; - if (id) - g.ActiveIdIsAlive = true; + g.ActiveIdIsAlive |= (id != 0); g.ActiveIdWindow = window; } @@ -1884,6 +1958,13 @@ void ImGui::SetHoveredID(ImGuiID id) ImGuiContext& g = *GImGui; g.HoveredId = id; g.HoveredIdAllowOverlap = false; + g.HoveredIdTimer = (id != 0 && g.HoveredIdPreviousFrame == id) ? (g.HoveredIdTimer + g.IO.DeltaTime) : 0.0f; +} + +ImGuiID ImGui::GetHoveredID() +{ + ImGuiContext& g = *GImGui; + return g.HoveredId ? g.HoveredId : g.HoveredIdPreviousFrame; } void ImGui::KeepAliveID(ImGuiID id) @@ -1893,27 +1974,51 @@ void ImGui::KeepAliveID(ImGuiID id) g.ActiveIdIsAlive = true; } +static inline bool IsWindowContentHoverable(ImGuiWindow* window, ImGuiHoveredFlags flags) +{ + // An active popup disable hovering on other windows (apart from its own children) + // FIXME-OPT: This could be cached/stored within the window. + ImGuiContext& g = *GImGui; + if (g.NavWindow) + if (ImGuiWindow* focused_root_window = g.NavWindow->RootWindow) + if (focused_root_window->WasActive && focused_root_window != window->RootWindow) + { + // For the purpose of those flags we differentiate "standard popup" from "modal popup" + // NB: The order of those two tests is important because Modal windows are also Popups. + if (focused_root_window->Flags & ImGuiWindowFlags_Modal) + return false; + if ((focused_root_window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiHoveredFlags_AllowWhenBlockedByPopup)) + return false; + } + + return true; +} + // Advance cursor given item size for layout. void ImGui::ItemSize(const ImVec2& size, float text_offset_y) { - ImGuiWindow* window = GetCurrentWindow(); + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; if (window->SkipItems) return; // Always align ourselves on pixel boundaries - ImGuiContext& g = *GImGui; const float line_height = ImMax(window->DC.CurrentLineHeight, size.y); const float text_base_offset = ImMax(window->DC.CurrentLineTextBaseOffset, text_offset_y); + //if (g.IO.KeyAlt) window->DrawList->AddRect(window->DC.CursorPos, window->DC.CursorPos + ImVec2(size.x, line_height), IM_COL32(255,0,0,200)); // [DEBUG] window->DC.CursorPosPrevLine = ImVec2(window->DC.CursorPos.x + size.x, window->DC.CursorPos.y); window->DC.CursorPos = ImVec2((float)(int)(window->Pos.x + window->DC.IndentX + window->DC.ColumnsOffsetX), (float)(int)(window->DC.CursorPos.y + line_height + g.Style.ItemSpacing.y)); window->DC.CursorMaxPos.x = ImMax(window->DC.CursorMaxPos.x, window->DC.CursorPosPrevLine.x); - window->DC.CursorMaxPos.y = ImMax(window->DC.CursorMaxPos.y, window->DC.CursorPos.y); - - //window->DrawList->AddCircle(window->DC.CursorMaxPos, 3.0f, IM_COL32(255,0,0,255), 4); // Debug + window->DC.CursorMaxPos.y = ImMax(window->DC.CursorMaxPos.y, window->DC.CursorPos.y - g.Style.ItemSpacing.y); + //if (g.IO.KeyAlt) window->DrawList->AddCircle(window->DC.CursorMaxPos, 3.0f, IM_COL32(255,0,0,255), 4); // [DEBUG] window->DC.PrevLineHeight = line_height; window->DC.PrevLineTextBaseOffset = text_base_offset; window->DC.CurrentLineHeight = window->DC.CurrentLineTextBaseOffset = 0.0f; + + // Horizontal layout mode + if (window->DC.LayoutType == ImGuiLayoutType_Horizontal) + SameLine(); } void ImGui::ItemSize(const ImRect& bb, float text_offset_y) @@ -1924,74 +2029,110 @@ void ImGui::ItemSize(const ImRect& bb, float text_offset_y) // Declare item bounding box for clipping and interaction. // Note that the size can be different than the one provided to ItemSize(). Typically, widgets that spread over available surface // declares their minimum size requirement to ItemSize() and then use a larger region for drawing/interaction, which is passed to ItemAdd(). -bool ImGui::ItemAdd(const ImRect& bb, const ImGuiID* id) +bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id) { - ImGuiWindow* window = GetCurrentWindow(); - window->DC.LastItemId = id ? *id : 0; - window->DC.LastItemRect = bb; - window->DC.LastItemHoveredAndUsable = window->DC.LastItemHoveredRect = false; - if (IsClippedEx(bb, id, false)) - return false; - - // This is a sensible default, but widgets are free to override it after calling ItemAdd() ImGuiContext& g = *GImGui; - if (IsMouseHoveringRect(bb.Min, bb.Max)) - { - // Matching the behavior of IsHovered() but allow if ActiveId==window->MoveID (we clicked on the window background) - // So that clicking on items with no active id such as Text() still returns true with IsItemHovered() - window->DC.LastItemHoveredRect = true; - if (g.HoveredRootWindow == window->RootWindow) - if (g.ActiveId == 0 || (id && g.ActiveId == *id) || g.ActiveIdAllowOverlap || (g.ActiveId == window->MoveId)) - if (IsWindowContentHoverable(window)) - window->DC.LastItemHoveredAndUsable = true; - } + ImGuiWindow* window = g.CurrentWindow; + const bool is_clipped = IsClippedEx(bb, id, false); + window->DC.LastItemId = id; + window->DC.LastItemRect = bb; + window->DC.LastItemRectHoveredRect = false; + if (is_clipped) + return false; + //if (g.IO.KeyAlt) window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255,255,0,120)); // [DEBUG] + // We need to calculate this now to take account of the current clipping rectangle (as items like Selectable may change them) + window->DC.LastItemRectHoveredRect = IsMouseHoveringRect(bb.Min, bb.Max); return true; } -bool ImGui::IsClippedEx(const ImRect& bb, const ImGuiID* id, bool clip_even_when_logged) +// This is roughly matching the behavior of internal-facing ItemHoverable() +// - we allow hovering to be true when ActiveId==window->MoveID, so that clicking on non-interactive items such as a Text() item still returns true with IsItemHovered() +// - this should work even for non-interactive items that have no ID, so we cannot use LastItemId +bool ImGui::IsItemHovered(ImGuiHoveredFlags flags) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = GetCurrentWindowRead(); + ImGuiWindow* window = g.CurrentWindow; + // Test for bounding box overlap, as updated as ItemAdd() + if (!window->DC.LastItemRectHoveredRect) + return false; + IM_ASSERT((flags & (ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows)) == 0); // Flags not supported by this function + + // Test if we are hovering the right window (our window could be behind another window) + // [2017/10/16] Reverted commit 344d48be3 and testing RootWindow instead. I believe it is correct to NOT test for RootWindow but this leaves us unable to use IsItemHovered() after EndChild() itself. + // Until a solution is found I believe reverting to the test from 2017/09/27 is safe since this was the test that has been running for a long while. + //if (g.HoveredWindow != window) + // return false; + if (g.HoveredRootWindow != window->RootWindow && !(flags & ImGuiHoveredFlags_AllowWhenOverlapped)) + return false; + + // Test if another item is active (e.g. being dragged) + if (!(flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem)) + if (g.ActiveId != 0 && g.ActiveId != window->DC.LastItemId && !g.ActiveIdAllowOverlap && g.ActiveId != window->MoveId) + return false; + + // Test if interactions on this window are blocked by an active popup or modal + if (!IsWindowContentHoverable(window, flags)) + return false; + + // Test if the item is disabled + if (window->DC.ItemFlags & ImGuiItemFlags_Disabled) + return false; + + // Special handling for the 1st item after Begin() which represent the title bar. When the window is collapsed (SkipItems==true) that last item will never be overwritten so we need to detect tht case. + if (window->DC.LastItemId == window->MoveId && window->WriteAccessed) + return false; + return true; +} + +// Internal facing ItemHoverable() used when submitting widgets. Differs slightly from IsItemHovered(). +bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id) +{ + ImGuiContext& g = *GImGui; + if (g.HoveredId != 0 && g.HoveredId != id && !g.HoveredIdAllowOverlap) + return false; + + ImGuiWindow* window = g.CurrentWindow; + if (g.HoveredWindow != window) + return false; + if (g.ActiveId != 0 && g.ActiveId != id && !g.ActiveIdAllowOverlap) + return false; + if (!IsMouseHoveringRect(bb.Min, bb.Max)) + return false; + if (!IsWindowContentHoverable(window, ImGuiHoveredFlags_Default)) + return false; + if (window->DC.ItemFlags & ImGuiItemFlags_Disabled) + return false; + + SetHoveredID(id); + return true; +} + +bool ImGui::IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged) +{ + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; if (!bb.Overlaps(window->ClipRect)) - if (!id || *id != GImGui->ActiveId) + if (id == 0 || id != g.ActiveId) if (clip_even_when_logged || !g.LogEnabled) return true; return false; } -// NB: This is an internal helper. The user-facing IsItemHovered() is using data emitted from ItemAdd(), with a slightly different logic. -bool ImGui::IsHovered(const ImRect& bb, ImGuiID id, bool flatten_childs) -{ - ImGuiContext& g = *GImGui; - if (g.HoveredId == 0 || g.HoveredId == id || g.HoveredIdAllowOverlap) - { - ImGuiWindow* window = GetCurrentWindowRead(); - if (g.HoveredWindow == window || (flatten_childs && g.HoveredRootWindow == window->RootWindow)) - if ((g.ActiveId == 0 || g.ActiveId == id || g.ActiveIdAllowOverlap) && IsMouseHoveringRect(bb.Min, bb.Max)) - if (IsWindowContentHoverable(g.HoveredRootWindow)) - return true; - } - return false; -} - -bool ImGui::FocusableItemRegister(ImGuiWindow* window, bool is_active, bool tab_stop) +bool ImGui::FocusableItemRegister(ImGuiWindow* window, ImGuiID id, bool tab_stop) { ImGuiContext& g = *GImGui; - const bool allow_keyboard_focus = window->DC.AllowKeyboardFocus; + const bool allow_keyboard_focus = (window->DC.ItemFlags & (ImGuiItemFlags_AllowKeyboardFocus | ImGuiItemFlags_Disabled)) == ImGuiItemFlags_AllowKeyboardFocus; window->FocusIdxAllCounter++; if (allow_keyboard_focus) window->FocusIdxTabCounter++; - // Process keyboard input at this point: TAB, Shift-TAB switch focus - // We can always TAB out of a widget that doesn't allow tabbing in. - if (tab_stop && window->FocusIdxAllRequestNext == INT_MAX && window->FocusIdxTabRequestNext == INT_MAX && is_active && IsKeyPressedMap(ImGuiKey_Tab)) - { - // Modulo on index will be applied at the end of frame once we've got the total counter of items. - window->FocusIdxTabRequestNext = window->FocusIdxTabCounter + (g.IO.KeyShift ? (allow_keyboard_focus ? -1 : 0) : +1); - } + // Process keyboard input at this point: TAB/Shift-TAB to tab out of the currently focused item. + // Note that we can always TAB out of a widget that doesn't allow tabbing in. + if (tab_stop && (g.ActiveId == id) && window->FocusIdxAllRequestNext == INT_MAX && window->FocusIdxTabRequestNext == INT_MAX && !g.IO.KeyCtrl && IsKeyPressedMap(ImGuiKey_Tab)) + window->FocusIdxTabRequestNext = window->FocusIdxTabCounter + (g.IO.KeyShift ? (allow_keyboard_focus ? -1 : 0) : +1); // Modulo on index will be applied at the end of frame once we've got the total counter of items. if (window->FocusIdxAllCounter == window->FocusIdxAllRequestCurrent) return true; @@ -2114,7 +2255,7 @@ ImGuiStyle& ImGui::GetStyle() // Same value as passed to your RenderDrawListsFn() function. valid after Render() and until the next call to NewFrame() ImDrawData* ImGui::GetDrawData() { - return GImGui->RenderDrawData.Valid ? &GImGui->RenderDrawData : NULL; + return GImGui->DrawData.Valid ? &GImGui->DrawData : NULL; } float ImGui::GetTime() @@ -2127,50 +2268,92 @@ int ImGui::GetFrameCount() return GImGui->FrameCount; } +ImDrawList* ImGui::GetOverlayDrawList() +{ + return &GImGui->OverlayDrawList; +} + +ImDrawListSharedData* ImGui::GetDrawListSharedData() +{ + return &GImGui->DrawListSharedData; +} + void ImGui::NewFrame() { ImGuiContext& g = *GImGui; // Check user data - IM_ASSERT(g.IO.DeltaTime >= 0.0f); // Need a positive DeltaTime (zero is tolerated but will cause some timing issues) - IM_ASSERT(g.IO.DisplaySize.x >= 0.0f && g.IO.DisplaySize.y >= 0.0f); - IM_ASSERT(g.IO.Fonts->Fonts.Size > 0); // Font Atlas not created. Did you call io.Fonts->GetTexDataAsRGBA32 / GetTexDataAsAlpha8 ? - IM_ASSERT(g.IO.Fonts->Fonts[0]->IsLoaded()); // Font Atlas not created. Did you call io.Fonts->GetTexDataAsRGBA32 / GetTexDataAsAlpha8 ? - IM_ASSERT(g.Style.CurveTessellationTol > 0.0f); // Invalid style setting + // (We pass an error message in the assert expression as a trick to get it visible to programmers who are not using a debugger, as most assert handlers display their argument) + IM_ASSERT(g.IO.DeltaTime >= 0.0f && "Need a positive DeltaTime (zero is tolerated but will cause some timing issues)"); + IM_ASSERT(g.IO.DisplaySize.x >= 0.0f && g.IO.DisplaySize.y >= 0.0f && "Invalid DisplaySize value"); + IM_ASSERT(g.IO.Fonts->Fonts.Size > 0 && "Font Atlas not built. Did you call io.Fonts->GetTexDataAsRGBA32() / GetTexDataAsAlpha8() ?"); + IM_ASSERT(g.IO.Fonts->Fonts[0]->IsLoaded() && "Font Atlas not built. Did you call io.Fonts->GetTexDataAsRGBA32() / GetTexDataAsAlpha8() ?"); + IM_ASSERT(g.Style.CurveTessellationTol > 0.0f && "Invalid style setting"); + IM_ASSERT(g.Style.Alpha >= 0.0f && g.Style.Alpha <= 1.0f && "Invalid style setting. Alpha cannot be negative (allows us to avoid a few clamps in color computations)"); + IM_ASSERT((g.FrameCount == 0 || g.FrameCountEnded == g.FrameCount) && "Forgot to call Render() or EndFrame() at the end of the previous frame?"); + for (int n = 0; n < ImGuiKey_COUNT; n++) + IM_ASSERT(g.IO.KeyMap[n] >= -1 && g.IO.KeyMap[n] < IM_ARRAYSIZE(g.IO.KeysDown) && "io.KeyMap[] contains an out of bound value (need to be 0..512, or -1 for unmapped key)"); + // Initialize on first frame if (!g.Initialized) - { - // Initialize on first frame - g.LogClipboard = (ImGuiTextBuffer*)ImGui::MemAlloc(sizeof(ImGuiTextBuffer)); - IM_PLACEMENT_NEW(g.LogClipboard) ImGuiTextBuffer(); - - IM_ASSERT(g.Settings.empty()); - LoadIniSettingsFromDisk(g.IO.IniFilename); - g.Initialized = true; - } - - SetCurrentFont(GetDefaultFont()); - IM_ASSERT(g.Font->IsLoaded()); + Initialize(); g.Time += g.IO.DeltaTime; g.FrameCount += 1; - g.Tooltip[0] = '\0'; + g.TooltipOverrideCount = 0; + g.WindowsActiveCount = 0; + + SetCurrentFont(GetDefaultFont()); + IM_ASSERT(g.Font->IsLoaded()); + g.DrawListSharedData.ClipRectFullscreen = ImVec4(0.0f, 0.0f, g.IO.DisplaySize.x, g.IO.DisplaySize.y); + g.DrawListSharedData.CurveTessellationTol = g.Style.CurveTessellationTol; + g.OverlayDrawList.Clear(); g.OverlayDrawList.PushTextureID(g.IO.Fonts->TexID); g.OverlayDrawList.PushClipRectFullScreen(); + g.OverlayDrawList.Flags = (g.Style.AntiAliasedLines ? ImDrawListFlags_AntiAliasedLines : 0) | (g.Style.AntiAliasedFill ? ImDrawListFlags_AntiAliasedFill : 0); // Mark rendering data as invalid to prevent user who may have a handle on it to use it - g.RenderDrawData.Valid = false; - g.RenderDrawData.CmdLists = NULL; - g.RenderDrawData.CmdListsCount = g.RenderDrawData.TotalVtxCount = g.RenderDrawData.TotalIdxCount = 0; + g.DrawData.Clear(); - // Update inputs state - if (g.IO.MousePos.x < 0 && g.IO.MousePos.y < 0) - g.IO.MousePos = ImVec2(-9999.0f, -9999.0f); - if ((g.IO.MousePos.x < 0 && g.IO.MousePos.y < 0) || (g.IO.MousePosPrev.x < 0 && g.IO.MousePosPrev.y < 0)) // if mouse just appeared or disappeared (negative coordinate) we cancel out movement in MouseDelta - g.IO.MouseDelta = ImVec2(0.0f, 0.0f); - else + // Clear reference to active widget if the widget isn't alive anymore + if (!g.HoveredIdPreviousFrame) + g.HoveredIdTimer = 0.0f; + g.HoveredIdPreviousFrame = g.HoveredId; + g.HoveredId = 0; + g.HoveredIdAllowOverlap = false; + if (!g.ActiveIdIsAlive && g.ActiveIdPreviousFrame == g.ActiveId && g.ActiveId != 0) + ClearActiveID(); + if (g.ActiveId) + g.ActiveIdTimer += g.IO.DeltaTime; + g.ActiveIdPreviousFrame = g.ActiveId; + g.ActiveIdIsAlive = false; + g.ActiveIdIsJustActivated = false; + if (g.ScalarAsInputTextId && g.ActiveId != g.ScalarAsInputTextId) + g.ScalarAsInputTextId = 0; + + // Elapse drag & drop payload + if (g.DragDropActive && g.DragDropPayload.DataFrameCount + 1 < g.FrameCount) + { + ClearDragDrop(); + g.DragDropPayloadBufHeap.clear(); + memset(&g.DragDropPayloadBufLocal, 0, sizeof(g.DragDropPayloadBufLocal)); + } + g.DragDropAcceptIdPrev = g.DragDropAcceptIdCurr; + g.DragDropAcceptIdCurr = 0; + g.DragDropAcceptIdCurrRectSurface = FLT_MAX; + + // Update keyboard input state + memcpy(g.IO.KeysDownDurationPrev, g.IO.KeysDownDuration, sizeof(g.IO.KeysDownDuration)); + for (int i = 0; i < IM_ARRAYSIZE(g.IO.KeysDown); i++) + g.IO.KeysDownDuration[i] = g.IO.KeysDown[i] ? (g.IO.KeysDownDuration[i] < 0.0f ? 0.0f : g.IO.KeysDownDuration[i] + g.IO.DeltaTime) : -1.0f; + + // Update mouse input state + // If mouse just appeared or disappeared (usually denoted by -FLT_MAX component, but in reality we test for -256000.0f) we cancel out movement in MouseDelta + if (IsMousePosValid(&g.IO.MousePos) && IsMousePosValid(&g.IO.MousePosPrev)) g.IO.MouseDelta = g.IO.MousePos - g.IO.MousePosPrev; + else + g.IO.MouseDelta = ImVec2(0.0f, 0.0f); g.IO.MousePosPrev = g.IO.MousePos; for (int i = 0; i < IM_ARRAYSIZE(g.IO.MouseDown); i++) { @@ -2192,16 +2375,17 @@ void ImGui::NewFrame() g.IO.MouseClickedTime[i] = g.Time; } g.IO.MouseClickedPos[i] = g.IO.MousePos; + g.IO.MouseDragMaxDistanceAbs[i] = ImVec2(0.0f, 0.0f); g.IO.MouseDragMaxDistanceSqr[i] = 0.0f; } else if (g.IO.MouseDown[i]) { - g.IO.MouseDragMaxDistanceSqr[i] = ImMax(g.IO.MouseDragMaxDistanceSqr[i], ImLengthSqr(g.IO.MousePos - g.IO.MouseClickedPos[i])); + ImVec2 mouse_delta = g.IO.MousePos - g.IO.MouseClickedPos[i]; + g.IO.MouseDragMaxDistanceAbs[i].x = ImMax(g.IO.MouseDragMaxDistanceAbs[i].x, mouse_delta.x < 0.0f ? -mouse_delta.x : mouse_delta.x); + g.IO.MouseDragMaxDistanceAbs[i].y = ImMax(g.IO.MouseDragMaxDistanceAbs[i].y, mouse_delta.y < 0.0f ? -mouse_delta.y : mouse_delta.y); + g.IO.MouseDragMaxDistanceSqr[i] = ImMax(g.IO.MouseDragMaxDistanceSqr[i], ImLengthSqr(mouse_delta)); } } - memcpy(g.IO.KeysDownDurationPrev, g.IO.KeysDownDuration, sizeof(g.IO.KeysDownDuration)); - for (int i = 0; i < IM_ARRAYSIZE(g.IO.KeysDown); i++) - g.IO.KeysDownDuration[i] = g.IO.KeysDown[i] ? (g.IO.KeysDownDuration[i] < 0.0f ? 0.0f : g.IO.KeysDownDuration[i] + g.IO.DeltaTime) : -1.0f; // Calculate frame-rate for the user, as a purely luxurious feature g.FramerateSecPerFrameAccum += g.IO.DeltaTime - g.FramerateSecPerFrame[g.FramerateSecPerFrameIdx]; @@ -2209,43 +2393,39 @@ void ImGui::NewFrame() g.FramerateSecPerFrameIdx = (g.FramerateSecPerFrameIdx + 1) % IM_ARRAYSIZE(g.FramerateSecPerFrame); g.IO.Framerate = 1.0f / (g.FramerateSecPerFrameAccum / (float)IM_ARRAYSIZE(g.FramerateSecPerFrame)); - // Clear reference to active widget if the widget isn't alive anymore - g.HoveredIdPreviousFrame = g.HoveredId; - g.HoveredId = 0; - g.HoveredIdAllowOverlap = false; - if (!g.ActiveIdIsAlive && g.ActiveIdPreviousFrame == g.ActiveId && g.ActiveId != 0) - ClearActiveID(); - g.ActiveIdPreviousFrame = g.ActiveId; - g.ActiveIdIsAlive = false; - g.ActiveIdIsJustActivated = false; - - // Handle user moving window (at the beginning of the frame to avoid input lag or sheering). Only valid for root windows. - if (g.MovedWindowMoveId && g.MovedWindowMoveId == g.ActiveId) + // Handle user moving window with mouse (at the beginning of the frame to avoid input lag or sheering). + if (g.MovingWindow && g.MovingWindow->MoveId == g.ActiveId) { - KeepAliveID(g.MovedWindowMoveId); - IM_ASSERT(g.MovedWindow && g.MovedWindow->RootWindow); - IM_ASSERT(g.MovedWindow->RootWindow->MoveId == g.MovedWindowMoveId); + KeepAliveID(g.ActiveId); + IM_ASSERT(g.MovingWindow && g.MovingWindow->RootWindow); if (g.IO.MouseDown[0]) { - if (!(g.MovedWindow->Flags & ImGuiWindowFlags_NoMove)) + // MovingWindow = window we clicked on, could be a child window. We track it to preserve Focus and so that ActiveIdWindow == MovingWindow and ActiveId == MovingWindow->MoveId for consistency. + ImGuiWindow* actually_moving_window = g.MovingWindow->RootWindow; + ImVec2 pos = g.IO.MousePos - g.ActiveIdClickOffset; + if (actually_moving_window->PosFloat.x != pos.x || actually_moving_window->PosFloat.y != pos.y) { - g.MovedWindow->PosFloat += g.IO.MouseDelta; - if (!(g.MovedWindow->Flags & ImGuiWindowFlags_NoSavedSettings) && (g.IO.MouseDelta.x != 0.0f || g.IO.MouseDelta.y != 0.0f)) - MarkIniSettingsDirty(); + MarkIniSettingsDirty(actually_moving_window); + actually_moving_window->PosFloat = pos; } - FocusWindow(g.MovedWindow); + FocusWindow(g.MovingWindow); } else { ClearActiveID(); - g.MovedWindow = NULL; - g.MovedWindowMoveId = 0; + g.MovingWindow = NULL; } } else { - g.MovedWindow = NULL; - g.MovedWindowMoveId = 0; + // When clicking/dragging from a window that has the _NoMove flag, we still set the ActiveId in order to prevent hovering others. + if (g.ActiveIdWindow && g.ActiveIdWindow->MoveId == g.ActiveId) + { + KeepAliveID(g.ActiveId); + if (!g.IO.MouseDown[0]) + ClearActiveID(); + } + g.MovingWindow = NULL; } // Delay saving settings so we don't spam disk too much @@ -2256,20 +2436,18 @@ void ImGui::NewFrame() SaveIniSettingsToDisk(g.IO.IniFilename); } - // Find the window we are hovering. Child windows can extend beyond the limit of their parent so we need to derive HoveredRootWindow from HoveredWindow - g.HoveredWindow = g.MovedWindow ? g.MovedWindow : FindHoveredWindow(g.IO.MousePos, false); - if (g.HoveredWindow && (g.HoveredWindow->Flags & ImGuiWindowFlags_ChildWindow)) - g.HoveredRootWindow = g.HoveredWindow->RootWindow; - else - g.HoveredRootWindow = g.MovedWindow ? g.MovedWindow->RootWindow : FindHoveredWindow(g.IO.MousePos, true); + // Find the window we are hovering + // - Child windows can extend beyond the limit of their parent so we need to derive HoveredRootWindow from HoveredWindow. + // - When moving a window we can skip the search, which also conveniently bypasses the fact that window->WindowRectClipped is lagging as this point. + // - We also support the moved window toggling the NoInputs flag after moving has started in order to be able to detect windows below it, which is useful for e.g. docking mechanisms. + g.HoveredWindow = (g.MovingWindow && !(g.MovingWindow->Flags & ImGuiWindowFlags_NoInputs)) ? g.MovingWindow : FindHoveredWindow(g.IO.MousePos); + g.HoveredRootWindow = g.HoveredWindow ? g.HoveredWindow->RootWindow : NULL; - if (ImGuiWindow* modal_window = GetFrontMostModalRootWindow()) + ImGuiWindow* modal_window = GetFrontMostModalRootWindow(); + if (modal_window != NULL) { g.ModalWindowDarkeningRatio = ImMin(g.ModalWindowDarkeningRatio + g.IO.DeltaTime * 6.0f, 1.0f); - ImGuiWindow* window = g.HoveredRootWindow; - while (window && window != modal_window) - window = window->ParentWindow; - if (!window) + if (g.HoveredRootWindow && !IsWindowChildOf(g.HoveredRootWindow, modal_window)) g.HoveredRootWindow = g.HoveredWindow = NULL; } else @@ -2277,7 +2455,7 @@ void ImGui::NewFrame() g.ModalWindowDarkeningRatio = 0.0f; } - // Are we using inputs? Tell user so they can capture/discard the inputs away from the rest of their application. + // Update the WantCaptureMouse/WantCAptureKeyboard flags, so user can capture/discard the inputs away from the rest of their application. // When clicking outside of a window we assume the click is owned by the application and won't request capture. We need to track click ownership. int mouse_earliest_button_down = -1; bool mouse_any_down = false; @@ -2287,35 +2465,46 @@ void ImGui::NewFrame() g.IO.MouseDownOwned[i] = (g.HoveredWindow != NULL) || (!g.OpenPopupStack.empty()); mouse_any_down |= g.IO.MouseDown[i]; if (g.IO.MouseDown[i]) - if (mouse_earliest_button_down == -1 || g.IO.MouseClickedTime[mouse_earliest_button_down] > g.IO.MouseClickedTime[i]) + if (mouse_earliest_button_down == -1 || g.IO.MouseClickedTime[i] < g.IO.MouseClickedTime[mouse_earliest_button_down]) mouse_earliest_button_down = i; } bool mouse_avail_to_imgui = (mouse_earliest_button_down == -1) || g.IO.MouseDownOwned[mouse_earliest_button_down]; - if (g.CaptureMouseNextFrame != -1) - g.IO.WantCaptureMouse = (g.CaptureMouseNextFrame != 0); + if (g.WantCaptureMouseNextFrame != -1) + g.IO.WantCaptureMouse = (g.WantCaptureMouseNextFrame != 0); else - g.IO.WantCaptureMouse = (mouse_avail_to_imgui && (g.HoveredWindow != NULL || mouse_any_down)) || (g.ActiveId != 0) || (!g.OpenPopupStack.empty()); - g.IO.WantCaptureKeyboard = (g.CaptureKeyboardNextFrame != -1) ? (g.CaptureKeyboardNextFrame != 0) : (g.ActiveId != 0); - g.IO.WantTextInput = (g.ActiveId != 0 && g.InputTextState.Id == g.ActiveId); + g.IO.WantCaptureMouse = (mouse_avail_to_imgui && (g.HoveredWindow != NULL || mouse_any_down)) || (!g.OpenPopupStack.empty()); + if (g.WantCaptureKeyboardNextFrame != -1) + g.IO.WantCaptureKeyboard = (g.WantCaptureKeyboardNextFrame != 0); + else + g.IO.WantCaptureKeyboard = (g.ActiveId != 0) || (modal_window != NULL); + g.IO.WantTextInput = (g.WantTextInputNextFrame != -1) ? (g.WantTextInputNextFrame != 0) : 0; g.MouseCursor = ImGuiMouseCursor_Arrow; - g.CaptureMouseNextFrame = g.CaptureKeyboardNextFrame = -1; + g.WantCaptureMouseNextFrame = g.WantCaptureKeyboardNextFrame = g.WantTextInputNextFrame = -1; g.OsImePosRequest = ImVec2(1.0f, 1.0f); // OS Input Method Editor showing on top-left of our window by default // If mouse was first clicked outside of ImGui bounds we also cancel out hovering. - if (!mouse_avail_to_imgui) + // FIXME: For patterns of drag and drop across OS windows, we may need to rework/remove this test (first committed 311c0ca9 on 2015/02) + bool mouse_dragging_extern_payload = g.DragDropActive && (g.DragDropSourceFlags & ImGuiDragDropFlags_SourceExtern) != 0; + if (!mouse_avail_to_imgui && !mouse_dragging_extern_payload) g.HoveredWindow = g.HoveredRootWindow = NULL; - // Scale & Scrolling - if (g.HoveredWindow && g.IO.MouseWheel != 0.0f && !g.HoveredWindow->Collapsed) + // Mouse wheel scrolling, scale + if (g.HoveredWindow && !g.HoveredWindow->Collapsed && (g.IO.MouseWheel != 0.0f || g.IO.MouseWheelH != 0.0f)) { + // If a child window has the ImGuiWindowFlags_NoScrollWithMouse flag, we give a chance to scroll its parent (unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set). ImGuiWindow* window = g.HoveredWindow; - if (g.IO.KeyCtrl) + ImGuiWindow* scroll_window = window; + while ((scroll_window->Flags & ImGuiWindowFlags_ChildWindow) && (scroll_window->Flags & ImGuiWindowFlags_NoScrollWithMouse) && !(scroll_window->Flags & ImGuiWindowFlags_NoScrollbar) && !(scroll_window->Flags & ImGuiWindowFlags_NoInputs) && scroll_window->ParentWindow) + scroll_window = scroll_window->ParentWindow; + const bool scroll_allowed = !(scroll_window->Flags & ImGuiWindowFlags_NoScrollWithMouse) && !(scroll_window->Flags & ImGuiWindowFlags_NoInputs); + + if (g.IO.MouseWheel != 0.0f) { - if (g.IO.FontAllowUserScaling) + if (g.IO.KeyCtrl && g.IO.FontAllowUserScaling) { // Zoom / Scale window - float new_font_scale = ImClamp(window->FontWindowScale + g.IO.MouseWheel * 0.10f, 0.50f, 2.50f); - float scale = new_font_scale / window->FontWindowScale; + const float new_font_scale = ImClamp(window->FontWindowScale + g.IO.MouseWheel * 0.10f, 0.50f, 2.50f); + const float scale = new_font_scale / window->FontWindowScale; window->FontWindowScale = new_font_scale; const ImVec2 offset = window->Size * (1.0f - scale) * (g.IO.MousePos - window->Pos) / window->Size; @@ -2324,19 +2513,26 @@ void ImGui::NewFrame() window->Size *= scale; window->SizeFull *= scale; } + else if (!g.IO.KeyCtrl && scroll_allowed) + { + // Mouse wheel vertical scrolling + float scroll_amount = 5 * scroll_window->CalcFontSize(); + scroll_amount = (float)(int)ImMin(scroll_amount, (scroll_window->ContentsRegionRect.GetHeight() + scroll_window->WindowPadding.y * 2.0f) * 0.67f); + SetWindowScrollY(scroll_window, scroll_window->Scroll.y - g.IO.MouseWheel * scroll_amount); + } } - else if (!(window->Flags & ImGuiWindowFlags_NoScrollWithMouse)) + if (g.IO.MouseWheelH != 0.0f && scroll_allowed) { - // Scroll - const int scroll_lines = (window->Flags & ImGuiWindowFlags_ComboBox) ? 3 : 5; - SetWindowScrollY(window, window->Scroll.y - g.IO.MouseWheel * window->CalcFontSize() * scroll_lines); + // Mouse wheel horizontal scrolling (for hardware that supports it) + float scroll_amount = scroll_window->CalcFontSize(); + if (!g.IO.KeyCtrl && !(window->Flags & ImGuiWindowFlags_NoScrollWithMouse)) + SetWindowScrollX(window, window->Scroll.x - g.IO.MouseWheelH * scroll_amount); } } // Pressing TAB activate widget focus - // NB: Don't discard FocusedWindow if it isn't active, so that a window that go on/off programatically won't lose its keyboard focus. - if (g.ActiveId == 0 && g.FocusedWindow != NULL && g.FocusedWindow->Active && IsKeyPressedMap(ImGuiKey_Tab, false)) - g.FocusedWindow->FocusIdxTabRequestNext = 0; + if (g.ActiveId == 0 && g.NavWindow != NULL && g.NavWindow->Active && IsKeyPressedMap(ImGuiKey_Tab, false)) + g.NavWindow->FocusIdxTabRequestNext = 0; // Mark all windows as not visible for (int i = 0; i != g.Windows.Size; i++) @@ -2344,30 +2540,100 @@ void ImGui::NewFrame() ImGuiWindow* window = g.Windows[i]; window->WasActive = window->Active; window->Active = false; - window->Accessed = false; + window->WriteAccessed = false; } // Closing the focused window restore focus to the first active root window in descending z-order - if (g.FocusedWindow && !g.FocusedWindow->WasActive) - for (int i = g.Windows.Size-1; i >= 0; i--) - if (g.Windows[i]->WasActive && !(g.Windows[i]->Flags & ImGuiWindowFlags_ChildWindow)) - { - FocusWindow(g.Windows[i]); - break; - } + if (g.NavWindow && !g.NavWindow->WasActive) + FocusFrontMostActiveWindow(NULL); // No window should be open at the beginning of the frame. // But in order to allow the user to call NewFrame() multiple times without calling Render(), we are doing an explicit clear. g.CurrentWindowStack.resize(0); g.CurrentPopupStack.resize(0); - CloseInactivePopups(); + ClosePopupsOverWindow(g.NavWindow); // Create implicit window - we will only render it if the user has added something to it. - ImGui::SetNextWindowSize(ImVec2(400,400), ImGuiSetCond_FirstUseEver); - ImGui::Begin("Debug"); + // We don't use "Debug" to avoid colliding with user trying to create a "Debug" window with custom flags. + SetNextWindowSize(ImVec2(400,400), ImGuiCond_FirstUseEver); + Begin("Debug##Default"); } -// NB: behavior of ImGui after Shutdown() is not tested/guaranteed at the moment. This function is merely here to free heap allocations. +static void* SettingsHandlerWindow_ReadOpen(ImGuiContext*, ImGuiSettingsHandler*, const char* name) +{ + ImGuiWindowSettings* settings = ImGui::FindWindowSettings(ImHash(name, 0)); + if (!settings) + settings = AddWindowSettings(name); + return (void*)settings; +} + +static void SettingsHandlerWindow_ReadLine(ImGuiContext*, ImGuiSettingsHandler*, void* entry, const char* line) +{ + ImGuiWindowSettings* settings = (ImGuiWindowSettings*)entry; + float x, y; + int i; + if (sscanf(line, "Pos=%f,%f", &x, &y) == 2) settings->Pos = ImVec2(x, y); + else if (sscanf(line, "Size=%f,%f", &x, &y) == 2) settings->Size = ImMax(ImVec2(x, y), GImGui->Style.WindowMinSize); + else if (sscanf(line, "Collapsed=%d", &i) == 1) settings->Collapsed = (i != 0); +} + +static void SettingsHandlerWindow_WriteAll(ImGuiContext* imgui_ctx, ImGuiSettingsHandler* handler, ImGuiTextBuffer* buf) +{ + // Gather data from windows that were active during this session + ImGuiContext& g = *imgui_ctx; + for (int i = 0; i != g.Windows.Size; i++) + { + ImGuiWindow* window = g.Windows[i]; + if (window->Flags & ImGuiWindowFlags_NoSavedSettings) + continue; + ImGuiWindowSettings* settings = ImGui::FindWindowSettings(window->ID); + if (!settings) + settings = AddWindowSettings(window->Name); + settings->Pos = window->Pos; + settings->Size = window->SizeFull; + settings->Collapsed = window->Collapsed; + } + + // Write a buffer + // If a window wasn't opened in this session we preserve its settings + buf->reserve(buf->size() + g.SettingsWindows.Size * 96); // ballpark reserve + for (int i = 0; i != g.SettingsWindows.Size; i++) + { + const ImGuiWindowSettings* settings = &g.SettingsWindows[i]; + if (settings->Pos.x == FLT_MAX) + continue; + const char* name = settings->Name; + if (const char* p = strstr(name, "###")) // Skip to the "###" marker if any. We don't skip past to match the behavior of GetID() + name = p; + buf->appendf("[%s][%s]\n", handler->TypeName, name); + buf->appendf("Pos=%d,%d\n", (int)settings->Pos.x, (int)settings->Pos.y); + buf->appendf("Size=%d,%d\n", (int)settings->Size.x, (int)settings->Size.y); + buf->appendf("Collapsed=%d\n", settings->Collapsed); + buf->appendf("\n"); + } +} + +void ImGui::Initialize() +{ + ImGuiContext& g = *GImGui; + g.LogClipboard = IM_NEW(ImGuiTextBuffer)(); + + // Add .ini handle for ImGuiWindow type + ImGuiSettingsHandler ini_handler; + ini_handler.TypeName = "Window"; + ini_handler.TypeHash = ImHash("Window", 0, 0); + ini_handler.ReadOpenFn = SettingsHandlerWindow_ReadOpen; + ini_handler.ReadLineFn = SettingsHandlerWindow_ReadLine; + ini_handler.WriteAllFn = SettingsHandlerWindow_WriteAll; + g.SettingsHandlers.push_front(ini_handler); + + // Load .ini file + IM_ASSERT(g.SettingsWindows.empty()); + LoadIniSettingsFromDisk(g.IO.IniFilename); + g.Initialized = true; +} + +// This function is merely here to free heap allocations. void ImGui::Shutdown() { ImGuiContext& g = *GImGui; @@ -2376,133 +2642,142 @@ void ImGui::Shutdown() if (g.IO.Fonts) // Testing for NULL to allow user to NULLify in case of running Shutdown() on multiple contexts. Bit hacky. g.IO.Fonts->Clear(); - // Cleanup of other data are conditional on actually having used ImGui. + // Cleanup of other data are conditional on actually having initialize ImGui. if (!g.Initialized) return; SaveIniSettingsToDisk(g.IO.IniFilename); for (int i = 0; i < g.Windows.Size; i++) - { - g.Windows[i]->~ImGuiWindow(); - ImGui::MemFree(g.Windows[i]); - } + IM_DELETE(g.Windows[i]); g.Windows.clear(); g.WindowsSortBuffer.clear(); g.CurrentWindow = NULL; g.CurrentWindowStack.clear(); - g.FocusedWindow = NULL; + g.WindowsById.Clear(); + g.NavWindow = NULL; g.HoveredWindow = NULL; g.HoveredRootWindow = NULL; g.ActiveIdWindow = NULL; - g.MovedWindow = NULL; - for (int i = 0; i < g.Settings.Size; i++) - ImGui::MemFree(g.Settings[i].Name); - g.Settings.clear(); + g.MovingWindow = NULL; + for (int i = 0; i < g.SettingsWindows.Size; i++) + IM_DELETE(g.SettingsWindows[i].Name); g.ColorModifiers.clear(); g.StyleModifiers.clear(); g.FontStack.clear(); g.OpenPopupStack.clear(); g.CurrentPopupStack.clear(); - g.SetNextWindowSizeConstraintCallback = NULL; - g.SetNextWindowSizeConstraintCallbackUserData = NULL; - for (int i = 0; i < IM_ARRAYSIZE(g.RenderDrawLists); i++) - g.RenderDrawLists[i].clear(); + g.DrawDataBuilder.ClearFreeMemory(); g.OverlayDrawList.ClearFreeMemory(); - g.ColorEditModeStorage.Clear(); - if (g.PrivateClipboard) - { - ImGui::MemFree(g.PrivateClipboard); - g.PrivateClipboard = NULL; - } + g.PrivateClipboard.clear(); g.InputTextState.Text.clear(); g.InputTextState.InitialText.clear(); g.InputTextState.TempTextBuffer.clear(); + g.SettingsWindows.clear(); + g.SettingsHandlers.clear(); + if (g.LogFile && g.LogFile != stdout) { fclose(g.LogFile); g.LogFile = NULL; } if (g.LogClipboard) - { - g.LogClipboard->~ImGuiTextBuffer(); - ImGui::MemFree(g.LogClipboard); - } + IM_DELETE(g.LogClipboard); g.Initialized = false; } -static ImGuiIniData* FindWindowSettings(const char* name) +ImGuiWindowSettings* ImGui::FindWindowSettings(ImGuiID id) { ImGuiContext& g = *GImGui; - ImGuiID id = ImHash(name, 0); - for (int i = 0; i != g.Settings.Size; i++) - { - ImGuiIniData* ini = &g.Settings[i]; - if (ini->Id == id) - return ini; - } + for (int i = 0; i != g.SettingsWindows.Size; i++) + if (g.SettingsWindows[i].Id == id) + return &g.SettingsWindows[i]; return NULL; } -static ImGuiIniData* AddWindowSettings(const char* name) -{ - GImGui->Settings.resize(GImGui->Settings.Size + 1); - ImGuiIniData* ini = &GImGui->Settings.back(); - ini->Name = ImStrdup(name); - ini->Id = ImHash(name, 0); - ini->Collapsed = false; - ini->Pos = ImVec2(FLT_MAX,FLT_MAX); - ini->Size = ImVec2(0,0); - return ini; -} - -// Zero-tolerance, poor-man .ini parsing -// FIXME: Write something less rubbish -static void LoadIniSettingsFromDisk(const char* ini_filename) +static ImGuiWindowSettings* AddWindowSettings(const char* name) { ImGuiContext& g = *GImGui; + g.SettingsWindows.push_back(ImGuiWindowSettings()); + ImGuiWindowSettings* settings = &g.SettingsWindows.back(); + settings->Name = ImStrdup(name); + settings->Id = ImHash(name, 0); + return settings; +} + +static void LoadIniSettingsFromDisk(const char* ini_filename) +{ if (!ini_filename) return; - - int file_size; - char* file_data = (char*)ImFileLoadToMemory(ini_filename, "rb", &file_size, 1); + char* file_data = (char*)ImFileLoadToMemory(ini_filename, "rb", NULL, +1); if (!file_data) return; + LoadIniSettingsFromMemory(file_data); + ImGui::MemFree(file_data); +} - ImGuiIniData* settings = NULL; - const char* buf_end = file_data + file_size; - for (const char* line_start = file_data; line_start < buf_end; ) +ImGuiSettingsHandler* ImGui::FindSettingsHandler(const char* type_name) +{ + ImGuiContext& g = *GImGui; + const ImGuiID type_hash = ImHash(type_name, 0, 0); + for (int handler_n = 0; handler_n < g.SettingsHandlers.Size; handler_n++) + if (g.SettingsHandlers[handler_n].TypeHash == type_hash) + return &g.SettingsHandlers[handler_n]; + return NULL; +} + +// Zero-tolerance, no error reporting, cheap .ini parsing +static void LoadIniSettingsFromMemory(const char* buf_readonly) +{ + // For convenience and to make the code simpler, we'll write zero terminators inside the buffer. So let's create a writable copy. + char* buf = ImStrdup(buf_readonly); + char* buf_end = buf + strlen(buf); + + ImGuiContext& g = *GImGui; + void* entry_data = NULL; + ImGuiSettingsHandler* entry_handler = NULL; + + char* line_end = NULL; + for (char* line = buf; line < buf_end; line = line_end + 1) { - const char* line_end = line_start; + // Skip new lines markers, then find end of the line + while (*line == '\n' || *line == '\r') + line++; + line_end = line; while (line_end < buf_end && *line_end != '\n' && *line_end != '\r') line_end++; + line_end[0] = 0; - if (line_start[0] == '[' && line_end > line_start && line_end[-1] == ']') + if (line[0] == '[' && line_end > line && line_end[-1] == ']') { - char name[64]; - ImFormatString(name, IM_ARRAYSIZE(name), "%.*s", (int)(line_end-line_start-2), line_start+1); - settings = FindWindowSettings(name); - if (!settings) - settings = AddWindowSettings(name); + // Parse "[Type][Name]". Note that 'Name' can itself contains [] characters, which is acceptable with the current format and parsing code. + line_end[-1] = 0; + const char* name_end = line_end - 1; + const char* type_start = line + 1; + char* type_end = ImStrchrRange(type_start, name_end, ']'); + const char* name_start = type_end ? ImStrchrRange(type_end + 1, name_end, '[') : NULL; + if (!type_end || !name_start) + { + name_start = type_start; // Import legacy entries that have no type + type_start = "Window"; + } + else + { + *type_end = 0; // Overwrite first ']' + name_start++; // Skip second '[' + } + entry_handler = ImGui::FindSettingsHandler(type_start); + entry_data = entry_handler ? entry_handler->ReadOpenFn(&g, entry_handler, name_start) : NULL; } - else if (settings) + else if (entry_handler != NULL && entry_data != NULL) { - float x, y; - int i; - if (sscanf(line_start, "Pos=%f,%f", &x, &y) == 2) - settings->Pos = ImVec2(x, y); - else if (sscanf(line_start, "Size=%f,%f", &x, &y) == 2) - settings->Size = ImMax(ImVec2(x, y), g.Style.WindowMinSize); - else if (sscanf(line_start, "Collapsed=%d", &i) == 1) - settings->Collapsed = (i != 0); + // Let type handler parse the line + entry_handler->ReadLineFn(&g, entry_handler, entry_data, line); } - - line_start = line_end+1; } - - ImGui::MemFree(file_data); + ImGui::MemFree(buf); } static void SaveIniSettingsToDisk(const char* ini_filename) @@ -2512,48 +2787,47 @@ static void SaveIniSettingsToDisk(const char* ini_filename) if (!ini_filename) return; - // Gather data from windows that were active during this session - for (int i = 0; i != g.Windows.Size; i++) - { - ImGuiWindow* window = g.Windows[i]; - if (window->Flags & ImGuiWindowFlags_NoSavedSettings) - continue; - ImGuiIniData* settings = FindWindowSettings(window->Name); - settings->Pos = window->Pos; - settings->Size = window->SizeFull; - settings->Collapsed = window->Collapsed; - } + ImVector buf; + SaveIniSettingsToMemory(buf); - // Write .ini file - // If a window wasn't opened in this session we preserve its settings FILE* f = ImFileOpen(ini_filename, "wt"); if (!f) return; - for (int i = 0; i != g.Settings.Size; i++) - { - const ImGuiIniData* settings = &g.Settings[i]; - if (settings->Pos.x == FLT_MAX) - continue; - const char* name = settings->Name; - if (const char* p = strstr(name, "###")) // Skip to the "###" marker if any. We don't skip past to match the behavior of GetID() - name = p; - fprintf(f, "[%s]\n", name); - fprintf(f, "Pos=%d,%d\n", (int)settings->Pos.x, (int)settings->Pos.y); - fprintf(f, "Size=%d,%d\n", (int)settings->Size.x, (int)settings->Size.y); - fprintf(f, "Collapsed=%d\n", settings->Collapsed); - fprintf(f, "\n"); - } - + fwrite(buf.Data, sizeof(char), (size_t)buf.Size, f); fclose(f); } -static void MarkIniSettingsDirty() +static void SaveIniSettingsToMemory(ImVector& out_buf) +{ + ImGuiContext& g = *GImGui; + g.SettingsDirtyTimer = 0.0f; + + ImGuiTextBuffer buf; + for (int handler_n = 0; handler_n < g.SettingsHandlers.Size; handler_n++) + { + ImGuiSettingsHandler* handler = &g.SettingsHandlers[handler_n]; + handler->WriteAllFn(&g, handler, &buf); + } + + buf.Buf.pop_back(); // Remove extra zero-terminator used by ImGuiTextBuffer + out_buf.swap(buf.Buf); +} + +void ImGui::MarkIniSettingsDirty() { ImGuiContext& g = *GImGui; if (g.SettingsDirtyTimer <= 0.0f) g.SettingsDirtyTimer = g.IO.IniSavingRate; } +static void MarkIniSettingsDirty(ImGuiWindow* window) +{ + ImGuiContext& g = *GImGui; + if (!(window->Flags & ImGuiWindowFlags_NoSavedSettings)) + if (g.SettingsDirtyTimer <= 0.0f) + g.SettingsDirtyTimer = g.IO.IniSavingRate; +} + // FIXME: Add a more explicit sort order in the window structure. static int ChildWindowComparer(const void* lhs, const void* rhs) { @@ -2563,14 +2837,12 @@ static int ChildWindowComparer(const void* lhs, const void* rhs) return d; if (int d = (a->Flags & ImGuiWindowFlags_Tooltip) - (b->Flags & ImGuiWindowFlags_Tooltip)) return d; - if (int d = (a->Flags & ImGuiWindowFlags_ComboBox) - (b->Flags & ImGuiWindowFlags_ComboBox)) - return d; - return (a->IndexWithinParent - b->IndexWithinParent); + return (a->BeginOrderWithinParent - b->BeginOrderWithinParent); } -static void AddWindowToSortedBuffer(ImVector& out_sorted_windows, ImGuiWindow* window) +static void AddWindowToSortedBuffer(ImVector* out_sorted_windows, ImGuiWindow* window) { - out_sorted_windows.push_back(window); + out_sorted_windows->push_back(window); if (window->Active) { int count = window->DC.ChildWindows.Size; @@ -2585,7 +2857,7 @@ static void AddWindowToSortedBuffer(ImVector& out_sorted_windows, } } -static void AddDrawListToRenderList(ImVector& out_render_list, ImDrawList* draw_list) +static void AddDrawListToDrawData(ImVector* out_render_list, ImDrawList* draw_list) { if (draw_list->CmdBuffer.empty()) return; @@ -2599,31 +2871,74 @@ static void AddDrawListToRenderList(ImVector& out_render_list, ImDr return; } - // Draw list sanity check. Detect mismatch between PrimReserve() calls and incrementing _VtxCurrentIdx, _VtxWritePtr etc. + // Draw list sanity check. Detect mismatch between PrimReserve() calls and incrementing _VtxCurrentIdx, _VtxWritePtr etc. May trigger for you if you are using PrimXXX functions incorrectly. IM_ASSERT(draw_list->VtxBuffer.Size == 0 || draw_list->_VtxWritePtr == draw_list->VtxBuffer.Data + draw_list->VtxBuffer.Size); IM_ASSERT(draw_list->IdxBuffer.Size == 0 || draw_list->_IdxWritePtr == draw_list->IdxBuffer.Data + draw_list->IdxBuffer.Size); IM_ASSERT((int)draw_list->_VtxCurrentIdx == draw_list->VtxBuffer.Size); - // Check that draw_list doesn't use more vertices than indexable (default ImDrawIdx = 2 bytes = 64K vertices) - // If this assert triggers because you are drawing lots of stuff manually, A) workaround by calling BeginChild()/EndChild() to put your draw commands in multiple draw lists, B) #define ImDrawIdx to a 'unsigned int' in imconfig.h and render accordingly. - IM_ASSERT((int64_t)draw_list->_VtxCurrentIdx <= ((int64_t)1L << (sizeof(ImDrawIdx)*8))); // Too many vertices in same ImDrawList. See comment above. - - out_render_list.push_back(draw_list); - GImGui->IO.MetricsRenderVertices += draw_list->VtxBuffer.Size; - GImGui->IO.MetricsRenderIndices += draw_list->IdxBuffer.Size; + // Check that draw_list doesn't use more vertices than indexable (default ImDrawIdx = unsigned short = 2 bytes = 64K vertices per ImDrawList = per window) + // If this assert triggers because you are drawing lots of stuff manually: + // A) Make sure you are coarse clipping, because ImDrawList let all your vertices pass. You can use the Metrics window to inspect draw list contents. + // B) If you need/want meshes with more than 64K vertices, uncomment the '#define ImDrawIdx unsigned int' line in imconfig.h to set the index size to 4 bytes. + // You'll need to handle the 4-bytes indices to your renderer. For example, the OpenGL example code detect index size at compile-time by doing: + // glDrawElements(GL_TRIANGLES, (GLsizei)pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, idx_buffer_offset); + // Your own engine or render API may use different parameters or function calls to specify index sizes. 2 and 4 bytes indices are generally supported by most API. + // C) If for some reason you cannot use 4 bytes indices or don't want to, a workaround is to call BeginChild()/EndChild() before reaching the 64K limit to split your draw commands in multiple draw lists. + if (sizeof(ImDrawIdx) == 2) + IM_ASSERT(draw_list->_VtxCurrentIdx < (1 << 16) && "Too many vertices in ImDrawList using 16-bit indices. Read comment above"); + + out_render_list->push_back(draw_list); } -static void AddWindowToRenderList(ImVector& out_render_list, ImGuiWindow* window) +static void AddWindowToDrawData(ImVector* out_render_list, ImGuiWindow* window) { - AddDrawListToRenderList(out_render_list, window->DrawList); + AddDrawListToDrawData(out_render_list, window->DrawList); for (int i = 0; i < window->DC.ChildWindows.Size; i++) { ImGuiWindow* child = window->DC.ChildWindows[i]; - if (!child->Active) // clipped children may have been marked not active + if (child->Active && child->HiddenFrames <= 0) // clipped children may have been marked not active + AddWindowToDrawData(out_render_list, child); + } +} + +static void AddWindowToDrawDataSelectLayer(ImGuiWindow* window) +{ + ImGuiContext& g = *GImGui; + g.IO.MetricsActiveWindows++; + if (window->Flags & ImGuiWindowFlags_Tooltip) + AddWindowToDrawData(&g.DrawDataBuilder.Layers[1], window); + else + AddWindowToDrawData(&g.DrawDataBuilder.Layers[0], window); +} + +void ImDrawDataBuilder::FlattenIntoSingleLayer() +{ + int n = Layers[0].Size; + int size = n; + for (int i = 1; i < IM_ARRAYSIZE(Layers); i++) + size += Layers[i].Size; + Layers[0].resize(size); + for (int layer_n = 1; layer_n < IM_ARRAYSIZE(Layers); layer_n++) + { + ImVector& layer = Layers[layer_n]; + if (layer.empty()) continue; - if ((child->Flags & ImGuiWindowFlags_Popup) && child->HiddenFrames > 0) - continue; - AddWindowToRenderList(out_render_list, child); + memcpy(&Layers[0][n], &layer[0], layer.Size * sizeof(ImDrawList*)); + n += layer.Size; + layer.resize(0); + } +} + +static void SetupDrawData(ImVector* draw_lists, ImDrawData* out_draw_data) +{ + out_draw_data->Valid = true; + out_draw_data->CmdLists = (draw_lists->Size > 0) ? draw_lists->Data : NULL; + out_draw_data->CmdListsCount = draw_lists->Size; + out_draw_data->TotalVtxCount = out_draw_data->TotalIdxCount = 0; + for (int n = 0; n < draw_lists->Size; n++) + { + out_draw_data->TotalVtxCount += draw_lists->Data[n]->VtxBuffer.Size; + out_draw_data->TotalIdxCount += draw_lists->Data[n]->IdxBuffer.Size; } } @@ -2647,15 +2962,8 @@ void ImGui::EndFrame() { ImGuiContext& g = *GImGui; IM_ASSERT(g.Initialized); // Forgot to call ImGui::NewFrame() - IM_ASSERT(g.FrameCountEnded != g.FrameCount); // ImGui::EndFrame() called multiple times, or forgot to call ImGui::NewFrame() again - - // Render tooltip - if (g.Tooltip[0]) - { - ImGui::BeginTooltip(); - ImGui::TextUnformatted(g.Tooltip); - ImGui::EndTooltip(); - } + if (g.FrameCountEnded == g.FrameCount) // Don't process EndFrame() multiple times. + return; // Notify OS when our Input Method Editor cursor has moved (e.g. CJK inputs using Microsoft IME) if (g.IO.ImeSetInputScreenPosFn && ImLengthSqr(g.OsImePosRequest - g.OsImePosSet) > 0.0001f) @@ -2666,29 +2974,52 @@ void ImGui::EndFrame() // Hide implicit "Debug" window if it hasn't been used IM_ASSERT(g.CurrentWindowStack.Size == 1); // Mismatched Begin()/End() calls - if (g.CurrentWindow && !g.CurrentWindow->Accessed) + if (g.CurrentWindow && !g.CurrentWindow->WriteAccessed) g.CurrentWindow->Active = false; - ImGui::End(); + End(); - // Click to focus window and start moving (after we're done with all our widgets) - if (g.ActiveId == 0 && g.HoveredId == 0 && g.IO.MouseClicked[0]) + if (g.ActiveId == 0 && g.HoveredId == 0) { - if (!(g.FocusedWindow && !g.FocusedWindow->WasActive && g.FocusedWindow->Active)) // Unless we just made a popup appear + if (!g.NavWindow || !g.NavWindow->Appearing) // Unless we just made a window/popup appear { - if (g.HoveredRootWindow != NULL) + // Click to focus window and start moving (after we're done with all our widgets) + if (g.IO.MouseClicked[0]) { - FocusWindow(g.HoveredWindow); - if (!(g.HoveredWindow->Flags & ImGuiWindowFlags_NoMove)) + if (g.HoveredRootWindow != NULL) { - g.MovedWindow = g.HoveredWindow; - g.MovedWindowMoveId = g.HoveredRootWindow->MoveId; - SetActiveID(g.MovedWindowMoveId, g.HoveredRootWindow); + // Set ActiveId even if the _NoMove flag is set, without it dragging away from a window with _NoMove would activate hover on other windows. + FocusWindow(g.HoveredWindow); + SetActiveID(g.HoveredWindow->MoveId, g.HoveredWindow); + g.ActiveIdClickOffset = g.IO.MousePos - g.HoveredRootWindow->Pos; + if (!(g.HoveredWindow->Flags & ImGuiWindowFlags_NoMove) && !(g.HoveredRootWindow->Flags & ImGuiWindowFlags_NoMove)) + g.MovingWindow = g.HoveredWindow; + } + else if (g.NavWindow != NULL && GetFrontMostModalRootWindow() == NULL) + { + // Clicking on void disable focus + FocusWindow(NULL); } } - else if (g.FocusedWindow != NULL && GetFrontMostModalRootWindow() == NULL) + + // With right mouse button we close popups without changing focus + // (The left mouse button path calls FocusWindow which will lead NewFrame->ClosePopupsOverWindow to trigger) + if (g.IO.MouseClicked[1]) { - // Clicking on void disable focus - FocusWindow(NULL); + // Find the top-most window between HoveredWindow and the front most Modal Window. + // This is where we can trim the popup stack. + ImGuiWindow* modal = GetFrontMostModalRootWindow(); + bool hovered_window_above_modal = false; + if (modal == NULL) + hovered_window_above_modal = true; + for (int i = g.Windows.Size - 1; i >= 0 && hovered_window_above_modal == false; i--) + { + ImGuiWindow* window = g.Windows[i]; + if (window == modal) + break; + if (window == g.HoveredWindow) + hovered_window_above_modal = true; + } + ClosePopupsOverWindow(hovered_window_above_modal ? g.HoveredWindow : modal); } } } @@ -2702,13 +3033,14 @@ void ImGui::EndFrame() ImGuiWindow* window = g.Windows[i]; if (window->Active && (window->Flags & ImGuiWindowFlags_ChildWindow)) // if a child is active its parent will add it continue; - AddWindowToSortedBuffer(g.WindowsSortBuffer, window); + AddWindowToSortedBuffer(&g.WindowsSortBuffer, window); } + IM_ASSERT(g.Windows.Size == g.WindowsSortBuffer.Size); // we done something wrong g.Windows.swap(g.WindowsSortBuffer); // Clear Input data for next frame - g.IO.MouseWheel = 0.0f; + g.IO.MouseWheel = g.IO.MouseWheelH = 0.0f; memset(g.IO.InputCharacters, 0, sizeof(g.IO.InputCharacters)); g.FrameCountEnded = g.FrameCount; @@ -2729,66 +3061,39 @@ void ImGui::Render() { // Gather windows to render g.IO.MetricsRenderVertices = g.IO.MetricsRenderIndices = g.IO.MetricsActiveWindows = 0; - for (int i = 0; i < IM_ARRAYSIZE(g.RenderDrawLists); i++) - g.RenderDrawLists[i].resize(0); - for (int i = 0; i != g.Windows.Size; i++) + g.DrawDataBuilder.Clear(); + for (int n = 0; n != g.Windows.Size; n++) { - ImGuiWindow* window = g.Windows[i]; + ImGuiWindow* window = g.Windows[n]; if (window->Active && window->HiddenFrames <= 0 && (window->Flags & (ImGuiWindowFlags_ChildWindow)) == 0) - { - // FIXME: Generalize this with a proper layering system so e.g. user can draw in specific layers, below text, .. - g.IO.MetricsActiveWindows++; - if (window->Flags & ImGuiWindowFlags_Popup) - AddWindowToRenderList(g.RenderDrawLists[1], window); - else if (window->Flags & ImGuiWindowFlags_Tooltip) - AddWindowToRenderList(g.RenderDrawLists[2], window); - else - AddWindowToRenderList(g.RenderDrawLists[0], window); - } - } - - // Flatten layers - int n = g.RenderDrawLists[0].Size; - int flattened_size = n; - for (int i = 1; i < IM_ARRAYSIZE(g.RenderDrawLists); i++) - flattened_size += g.RenderDrawLists[i].Size; - g.RenderDrawLists[0].resize(flattened_size); - for (int i = 1; i < IM_ARRAYSIZE(g.RenderDrawLists); i++) - { - ImVector& layer = g.RenderDrawLists[i]; - if (layer.empty()) - continue; - memcpy(&g.RenderDrawLists[0][n], &layer[0], layer.Size * sizeof(ImDrawList*)); - n += layer.Size; + AddWindowToDrawDataSelectLayer(window); } + g.DrawDataBuilder.FlattenIntoSingleLayer(); // Draw software mouse cursor if requested - if (g.IO.MouseDrawCursor) + ImVec2 offset, size, uv[4]; + if (g.IO.MouseDrawCursor && g.IO.Fonts->GetMouseCursorTexData(g.MouseCursor, &offset, &size, &uv[0], &uv[2])) { - const ImGuiMouseCursorData& cursor_data = g.MouseCursorData[g.MouseCursor]; - const ImVec2 pos = g.IO.MousePos - cursor_data.HotOffset; - const ImVec2 size = cursor_data.Size; + const ImVec2 pos = g.IO.MousePos - offset; const ImTextureID tex_id = g.IO.Fonts->TexID; g.OverlayDrawList.PushTextureID(tex_id); - g.OverlayDrawList.AddImage(tex_id, pos+ImVec2(1,0), pos+ImVec2(1,0) + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], IM_COL32(0,0,0,48)); // Shadow - g.OverlayDrawList.AddImage(tex_id, pos+ImVec2(2,0), pos+ImVec2(2,0) + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], IM_COL32(0,0,0,48)); // Shadow - g.OverlayDrawList.AddImage(tex_id, pos, pos + size, cursor_data.TexUvMin[1], cursor_data.TexUvMax[1], IM_COL32(0,0,0,255)); // Black border - g.OverlayDrawList.AddImage(tex_id, pos, pos + size, cursor_data.TexUvMin[0], cursor_data.TexUvMax[0], IM_COL32(255,255,255,255)); // White fill + g.OverlayDrawList.AddImage(tex_id, pos+ImVec2(1,0), pos+ImVec2(1,0) + size, uv[2], uv[3], IM_COL32(0,0,0,48)); // Shadow + g.OverlayDrawList.AddImage(tex_id, pos+ImVec2(2,0), pos+ImVec2(2,0) + size, uv[2], uv[3], IM_COL32(0,0,0,48)); // Shadow + g.OverlayDrawList.AddImage(tex_id, pos, pos + size, uv[2], uv[3], IM_COL32(0,0,0,255)); // Black border + g.OverlayDrawList.AddImage(tex_id, pos, pos + size, uv[0], uv[1], IM_COL32(255,255,255,255)); // White fill g.OverlayDrawList.PopTextureID(); } if (!g.OverlayDrawList.VtxBuffer.empty()) - AddDrawListToRenderList(g.RenderDrawLists[0], &g.OverlayDrawList); + AddDrawListToDrawData(&g.DrawDataBuilder.Layers[0], &g.OverlayDrawList); - // Setup draw data - g.RenderDrawData.Valid = true; - g.RenderDrawData.CmdLists = (g.RenderDrawLists[0].Size > 0) ? &g.RenderDrawLists[0][0] : NULL; - g.RenderDrawData.CmdListsCount = g.RenderDrawLists[0].Size; - g.RenderDrawData.TotalVtxCount = g.IO.MetricsRenderVertices; - g.RenderDrawData.TotalIdxCount = g.IO.MetricsRenderIndices; + // Setup ImDrawData structure for end-user + SetupDrawData(&g.DrawDataBuilder.Layers[0], &g.DrawData); + g.IO.MetricsRenderVertices = g.DrawData.TotalVtxCount; + g.IO.MetricsRenderIndices = g.DrawData.TotalIdxCount; // Render. If user hasn't set a callback then they may retrieve the draw data via GetDrawData() - if (g.RenderDrawData.CmdListsCount > 0 && g.IO.RenderDrawListsFn != NULL) - g.IO.RenderDrawListsFn(&g.RenderDrawData); + if (g.DrawData.CmdListsCount > 0 && g.IO.RenderDrawListsFn != NULL) + g.IO.RenderDrawListsFn(&g.DrawData); } } @@ -2818,23 +3123,24 @@ void ImGui::LogText(const char* fmt, ...) } else { - g.LogClipboard->appendv(fmt, args); + g.LogClipboard->appendfv(fmt, args); } va_end(args); } // Internal version that takes a position to decide on newline placement and pad items according to their depth. // We split text into individual lines to add current tree level padding -static void LogRenderedText(const ImVec2& ref_pos, const char* text, const char* text_end) +static void LogRenderedText(const ImVec2* ref_pos, const char* text, const char* text_end = NULL) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = ImGui::GetCurrentWindowRead(); + ImGuiWindow* window = g.CurrentWindow; if (!text_end) text_end = ImGui::FindRenderedTextEnd(text, text_end); - const bool log_new_line = ref_pos.y > window->DC.LogLinePosY+1; - window->DC.LogLinePosY = ref_pos.y; + const bool log_new_line = ref_pos && (ref_pos->y > window->DC.LogLinePosY + 1); + if (ref_pos) + window->DC.LogLinePosY = ref_pos->y; const char* text_remaining = text; if (g.LogStartDepth > window->DC.TreeDepth) // Re-adjust padding if we have popped out of our starting depth @@ -2879,7 +3185,7 @@ static void LogRenderedText(const ImVec2& ref_pos, const char* text, const char* void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool hide_text_after_hash) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = g.CurrentWindow; // Hide anything after a '##' string const char* text_display_end; @@ -2899,14 +3205,14 @@ void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool { window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end); if (g.LogEnabled) - LogRenderedText(pos, text, text_display_end); + LogRenderedText(&pos, text, text_display_end); } } void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = g.CurrentWindow; if (!text_end) text_end = text + strlen(text); // FIXME-OPT @@ -2916,7 +3222,7 @@ void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end { window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width); if (g.LogEnabled) - LogRenderedText(pos, text, text_end); + LogRenderedText(&pos, text, text_end); } } @@ -2931,7 +3237,7 @@ void ImGui::RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, cons return; ImGuiContext& g = *GImGui; - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = g.CurrentWindow; // Perform CPU side clipping for single clipped element to avoid using scissor state ImVec2 pos = pos_min; @@ -2958,75 +3264,96 @@ void ImGui::RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, cons window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end, 0.0f, NULL); } if (g.LogEnabled) - LogRenderedText(pos, text, text_display_end); + LogRenderedText(&pos, text, text_display_end); } // Render a rectangle shaped with optional rounding and borders void ImGui::RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border, float rounding) { - ImGuiWindow* window = GetCurrentWindow(); - + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; window->DrawList->AddRectFilled(p_min, p_max, fill_col, rounding); - if (border && (window->Flags & ImGuiWindowFlags_ShowBorders)) + const float border_size = g.Style.FrameBorderSize; + if (border && border_size > 0.0f) { - window->DrawList->AddRect(p_min+ImVec2(1,1), p_max+ImVec2(1,1), GetColorU32(ImGuiCol_BorderShadow), rounding); - window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding); + window->DrawList->AddRect(p_min+ImVec2(1,1), p_max+ImVec2(1,1), GetColorU32(ImGuiCol_BorderShadow), rounding, ImDrawCornerFlags_All, border_size); + window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All, border_size); + } +} + +void ImGui::RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding) +{ + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; + const float border_size = g.Style.FrameBorderSize; + if (border_size > 0.0f) + { + window->DrawList->AddRect(p_min+ImVec2(1,1), p_max+ImVec2(1,1), GetColorU32(ImGuiCol_BorderShadow), rounding, ImDrawCornerFlags_All, border_size); + window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All, border_size); } } // Render a triangle to denote expanded/collapsed state -void ImGui::RenderCollapseTriangle(ImVec2 p_min, bool is_open, float scale) +void ImGui::RenderTriangle(ImVec2 p_min, ImGuiDir dir, float scale) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = g.CurrentWindow; const float h = g.FontSize * 1.00f; - const float r = h * 0.40f * scale; - ImVec2 center = p_min + ImVec2(h*0.50f, h*0.50f*scale); + float r = h * 0.40f * scale; + ImVec2 center = p_min + ImVec2(h * 0.50f, h * 0.50f * scale); ImVec2 a, b, c; - if (is_open) + switch (dir) { - center.y -= r*0.25f; - a = center + ImVec2(0,1)*r; - b = center + ImVec2(-0.866f,-0.5f)*r; - c = center + ImVec2(0.866f,-0.5f)*r; - } - else - { - a = center + ImVec2(1,0)*r; - b = center + ImVec2(-0.500f,0.866f)*r; - c = center + ImVec2(-0.500f,-0.866f)*r; + case ImGuiDir_Up: + case ImGuiDir_Down: + if (dir == ImGuiDir_Up) r = -r; + center.y -= r * 0.25f; + a = ImVec2(0,1) * r; + b = ImVec2(-0.866f,-0.5f) * r; + c = ImVec2(+0.866f,-0.5f) * r; + break; + case ImGuiDir_Left: + case ImGuiDir_Right: + if (dir == ImGuiDir_Left) r = -r; + center.x -= r * 0.25f; + a = ImVec2(1,0) * r; + b = ImVec2(-0.500f,+0.866f) * r; + c = ImVec2(-0.500f,-0.866f) * r; + break; + case ImGuiDir_None: + case ImGuiDir_Count_: + IM_ASSERT(0); + break; } - window->DrawList->AddTriangleFilled(a, b, c, GetColorU32(ImGuiCol_Text)); + window->DrawList->AddTriangleFilled(center + a, center + b, center + c, GetColorU32(ImGuiCol_Text)); } void ImGui::RenderBullet(ImVec2 pos) { - ImGuiWindow* window = GetCurrentWindow(); + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; window->DrawList->AddCircleFilled(pos, GImGui->FontSize*0.20f, GetColorU32(ImGuiCol_Text), 8); } -void ImGui::RenderCheckMark(ImVec2 pos, ImU32 col) +void ImGui::RenderCheckMark(ImVec2 pos, ImU32 col, float sz) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = g.CurrentWindow; - ImVec2 a, b, c; - float start_x = (float)(int)(g.FontSize * 0.307f + 0.5f); - float rem_third = (float)(int)((g.FontSize - start_x) / 3.0f); - a.x = pos.x + 0.5f + start_x; - b.x = a.x + rem_third; - c.x = a.x + rem_third * 3.0f; - b.y = pos.y - 1.0f + (float)(int)(g.Font->Ascent * (g.FontSize / g.Font->FontSize) + 0.5f) + (float)(int)(g.Font->DisplayOffset.y); - a.y = b.y - rem_third; - c.y = b.y - rem_third * 2.0f; + float thickness = ImMax(sz / 5.0f, 1.0f); + sz -= thickness*0.5f; + pos += ImVec2(thickness*0.25f, thickness*0.25f); - window->DrawList->PathLineTo(a); - window->DrawList->PathLineTo(b); - window->DrawList->PathLineTo(c); - window->DrawList->PathStroke(col, false); + float third = sz / 3.0f; + float bx = pos.x + third; + float by = pos.y + sz - third*0.5f; + window->DrawList->PathLineTo(ImVec2(bx - third, by - third)); + window->DrawList->PathLineTo(ImVec2(bx, by)); + window->DrawList->PathLineTo(ImVec2(bx + third*2, by - third*2)); + window->DrawList->PathStroke(col, false, thickness); } // Calculate text size. Text can be multi-line. Optionally ignore text after a ## marker. @@ -3047,7 +3374,7 @@ ImVec2 ImGui::CalcTextSize(const char* text, const char* text_end, bool hide_tex return ImVec2(0.0f, font_size); ImVec2 text_size = font->CalcTextSizeA(font_size, FLT_MAX, wrap_width, text, text_display_end, NULL); - // Cancel out character spacing for the last character of a line (it is baked into glyph->XAdvance field) + // Cancel out character spacing for the last character of a line (it is baked into glyph->AdvanceX field) const float font_scale = font_size / font->FontSize; const float character_spacing_x = 1.0f * font_scale; if (text_size.x > 0.0f) @@ -3063,7 +3390,7 @@ ImVec2 ImGui::CalcTextSize(const char* text, const char* text_end, bool hide_tex void ImGui::CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = GetCurrentWindowRead(); + ImGuiWindow* window = g.CurrentWindow; if (g.LogEnabled) { // If logging is active, do not perform any clipping @@ -3088,20 +3415,18 @@ void ImGui::CalcListClipping(int items_count, float items_height, int* out_items // Find window given position, search front-to-back // FIXME: Note that we have a lag here because WindowRectClipped is updated in Begin() so windows moved by user via SetWindowPos() and not SetNextWindowPos() will have that rectangle lagging by a frame at the time FindHoveredWindow() is called, aka before the next Begin(). Moving window thankfully isn't affected. -static ImGuiWindow* FindHoveredWindow(ImVec2 pos, bool excluding_childs) +static ImGuiWindow* FindHoveredWindow(ImVec2 pos) { ImGuiContext& g = *GImGui; - for (int i = g.Windows.Size-1; i >= 0; i--) + for (int i = g.Windows.Size - 1; i >= 0; i--) { ImGuiWindow* window = g.Windows[i]; if (!window->Active) continue; if (window->Flags & ImGuiWindowFlags_NoInputs) continue; - if (excluding_childs && (window->Flags & ImGuiWindowFlags_ChildWindow) != 0) - continue; - // Using the clipped AABB so a child window will typically be clipped by its parent. + // Using the clipped AABB, a child window will typically be clipped by its parent (not always) ImRect bb(window->WindowRectClipped.Min - g.Style.TouchExtraPadding, window->WindowRectClipped.Max + g.Style.TouchExtraPadding); if (bb.Contains(pos)) return window; @@ -3115,80 +3440,76 @@ static ImGuiWindow* FindHoveredWindow(ImVec2 pos, bool excluding_childs) bool ImGui::IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = GetCurrentWindowRead(); + ImGuiWindow* window = g.CurrentWindow; // Clip ImRect rect_clipped(r_min, r_max); if (clip) - rect_clipped.Clip(window->ClipRect); + rect_clipped.ClipWith(window->ClipRect); // Expand for touch input const ImRect rect_for_touch(rect_clipped.Min - g.Style.TouchExtraPadding, rect_clipped.Max + g.Style.TouchExtraPadding); return rect_for_touch.Contains(g.IO.MousePos); } -bool ImGui::IsMouseHoveringWindow() -{ - ImGuiContext& g = *GImGui; - return g.HoveredWindow == g.CurrentWindow; -} - -bool ImGui::IsMouseHoveringAnyWindow() -{ - ImGuiContext& g = *GImGui; - return g.HoveredWindow != NULL; -} - -bool ImGui::IsPosHoveringAnyWindow(const ImVec2& pos) -{ - return FindHoveredWindow(pos, false) != NULL; -} - static bool IsKeyPressedMap(ImGuiKey key, bool repeat) { const int key_index = GImGui->IO.KeyMap[key]; - return ImGui::IsKeyPressed(key_index, repeat); + return (key_index >= 0) ? ImGui::IsKeyPressed(key_index, repeat) : false; } -int ImGui::GetKeyIndex(ImGuiKey key) +int ImGui::GetKeyIndex(ImGuiKey imgui_key) { - IM_ASSERT(key >= 0 && key < ImGuiKey_COUNT); - return GImGui->IO.KeyMap[key]; + IM_ASSERT(imgui_key >= 0 && imgui_key < ImGuiKey_COUNT); + return GImGui->IO.KeyMap[imgui_key]; } -bool ImGui::IsKeyDown(int key_index) +// Note that imgui doesn't know the semantic of each entry of io.KeyDown[]. Use your own indices/enums according to how your backend/engine stored them into KeyDown[]! +bool ImGui::IsKeyDown(int user_key_index) { - if (key_index < 0) return false; - IM_ASSERT(key_index >= 0 && key_index < IM_ARRAYSIZE(GImGui->IO.KeysDown)); - return GImGui->IO.KeysDown[key_index]; + if (user_key_index < 0) return false; + IM_ASSERT(user_key_index >= 0 && user_key_index < IM_ARRAYSIZE(GImGui->IO.KeysDown)); + return GImGui->IO.KeysDown[user_key_index]; } -bool ImGui::IsKeyPressed(int key_index, bool repeat) +int ImGui::CalcTypematicPressedRepeatAmount(float t, float t_prev, float repeat_delay, float repeat_rate) +{ + if (t == 0.0f) + return 1; + if (t <= repeat_delay || repeat_rate <= 0.0f) + return 0; + const int count = (int)((t - repeat_delay) / repeat_rate) - (int)((t_prev - repeat_delay) / repeat_rate); + return (count > 0) ? count : 0; +} + +int ImGui::GetKeyPressedAmount(int key_index, float repeat_delay, float repeat_rate) { ImGuiContext& g = *GImGui; if (key_index < 0) return false; IM_ASSERT(key_index >= 0 && key_index < IM_ARRAYSIZE(g.IO.KeysDown)); const float t = g.IO.KeysDownDuration[key_index]; + return CalcTypematicPressedRepeatAmount(t, t - g.IO.DeltaTime, repeat_delay, repeat_rate); +} + +bool ImGui::IsKeyPressed(int user_key_index, bool repeat) +{ + ImGuiContext& g = *GImGui; + if (user_key_index < 0) return false; + IM_ASSERT(user_key_index >= 0 && user_key_index < IM_ARRAYSIZE(g.IO.KeysDown)); + const float t = g.IO.KeysDownDuration[user_key_index]; if (t == 0.0f) return true; - if (repeat && t > g.IO.KeyRepeatDelay) - { - float delay = g.IO.KeyRepeatDelay, rate = g.IO.KeyRepeatRate; - if ((fmodf(t - delay, rate) > rate*0.5f) != (fmodf(t - delay - g.IO.DeltaTime, rate) > rate*0.5f)) - return true; - } + return GetKeyPressedAmount(user_key_index, g.IO.KeyRepeatDelay, g.IO.KeyRepeatRate) > 0; return false; } -bool ImGui::IsKeyReleased(int key_index) +bool ImGui::IsKeyReleased(int user_key_index) { ImGuiContext& g = *GImGui; - if (key_index < 0) return false; - IM_ASSERT(key_index >= 0 && key_index < IM_ARRAYSIZE(g.IO.KeysDown)); - if (g.IO.KeysDownDurationPrev[key_index] >= 0.0f && !g.IO.KeysDown[key_index]) - return true; - return false; + if (user_key_index < 0) return false; + IM_ASSERT(user_key_index >= 0 && user_key_index < IM_ARRAYSIZE(g.IO.KeysDown)); + return g.IO.KeysDownDurationPrev[user_key_index] >= 0.0f && !g.IO.KeysDown[user_key_index]; } bool ImGui::IsMouseDown(int button) @@ -3251,10 +3572,20 @@ ImVec2 ImGui::GetMousePosOnOpeningCurrentPopup() { ImGuiContext& g = *GImGui; if (g.CurrentPopupStack.Size > 0) - return g.OpenPopupStack[g.CurrentPopupStack.Size-1].MousePosOnOpen; + return g.OpenPopupStack[g.CurrentPopupStack.Size-1].OpenMousePos; return g.IO.MousePos; } +// We typically use ImVec2(-FLT_MAX,-FLT_MAX) to denote an invalid mouse position +bool ImGui::IsMousePosValid(const ImVec2* mouse_pos) +{ + if (mouse_pos == NULL) + mouse_pos = &GImGui->IO.MousePos; + const float MOUSE_INVALID = -256000.0f; + return mouse_pos->x >= MOUSE_INVALID && mouse_pos->y >= MOUSE_INVALID; +} + +// NB: This is only valid if IsMousePosValid(). Backends in theory should always keep mouse position valid when dragging even outside the client window. ImVec2 ImGui::GetMouseDragDelta(int button, float lock_threshold) { ImGuiContext& g = *GImGui; @@ -3287,24 +3618,12 @@ void ImGui::SetMouseCursor(ImGuiMouseCursor cursor_type) void ImGui::CaptureKeyboardFromApp(bool capture) { - GImGui->CaptureKeyboardNextFrame = capture ? 1 : 0; + GImGui->WantCaptureKeyboardNextFrame = capture ? 1 : 0; } void ImGui::CaptureMouseFromApp(bool capture) { - GImGui->CaptureMouseNextFrame = capture ? 1 : 0; -} - -bool ImGui::IsItemHovered() -{ - ImGuiWindow* window = GetCurrentWindowRead(); - return window->DC.LastItemHoveredAndUsable; -} - -bool ImGui::IsItemHoveredRect() -{ - ImGuiWindow* window = GetCurrentWindowRead(); - return window->DC.LastItemHoveredRect; + GImGui->WantCaptureMouseNextFrame = capture ? 1 : 0; } bool ImGui::IsItemActive() @@ -3312,7 +3631,7 @@ bool ImGui::IsItemActive() ImGuiContext& g = *GImGui; if (g.ActiveId) { - ImGuiWindow* window = GetCurrentWindowRead(); + ImGuiWindow* window = g.CurrentWindow; return g.ActiveId == window->DC.LastItemId; } return false; @@ -3320,12 +3639,13 @@ bool ImGui::IsItemActive() bool ImGui::IsItemClicked(int mouse_button) { - return IsMouseClicked(mouse_button) && IsItemHovered(); + return IsMouseClicked(mouse_button) && IsItemHovered(ImGuiHoveredFlags_Default); } bool ImGui::IsAnyItemHovered() { - return GImGui->HoveredId != 0 || GImGui->HoveredIdPreviousFrame != 0; + ImGuiContext& g = *GImGui; + return g.HoveredId != 0 || g.HoveredIdPreviousFrame != 0; } bool ImGui::IsAnyItemActive() @@ -3336,8 +3656,7 @@ bool ImGui::IsAnyItemActive() bool ImGui::IsItemVisible() { ImGuiWindow* window = GetCurrentWindowRead(); - ImRect r(window->ClipRect); - return r.Overlaps(window->DC.LastItemRect); + return window->ClipRect.Overlaps(window->DC.LastItemRect); } // Allow last item to be overlapped by a subsequent item. Both may be activated during the same frame before the later one takes priority. @@ -3368,19 +3687,37 @@ ImVec2 ImGui::GetItemRectSize() return window->DC.LastItemRect.GetSize(); } -ImVec2 ImGui::CalcItemRectClosestPoint(const ImVec2& pos, bool on_edge, float outward) -{ - ImGuiWindow* window = GetCurrentWindowRead(); - ImRect rect = window->DC.LastItemRect; - rect.Expand(outward); - return rect.GetClosestPoint(pos, on_edge); -} - -// Tooltip is stored and turned into a BeginTooltip()/EndTooltip() sequence at the end of the frame. Each call override previous value. -void ImGui::SetTooltipV(const char* fmt, va_list args) +static ImRect GetViewportRect() { ImGuiContext& g = *GImGui; - ImFormatStringV(g.Tooltip, IM_ARRAYSIZE(g.Tooltip), fmt, args); + if (g.IO.DisplayVisibleMin.x != g.IO.DisplayVisibleMax.x && g.IO.DisplayVisibleMin.y != g.IO.DisplayVisibleMax.y) + return ImRect(g.IO.DisplayVisibleMin, g.IO.DisplayVisibleMax); + return ImRect(0.0f, 0.0f, g.IO.DisplaySize.x, g.IO.DisplaySize.y); +} + +// Not exposed publicly as BeginTooltip() because bool parameters are evil. Let's see if other needs arise first. +void ImGui::BeginTooltipEx(ImGuiWindowFlags extra_flags, bool override_previous_tooltip) +{ + ImGuiContext& g = *GImGui; + char window_name[16]; + ImFormatString(window_name, IM_ARRAYSIZE(window_name), "##Tooltip_%02d", g.TooltipOverrideCount); + if (override_previous_tooltip) + if (ImGuiWindow* window = FindWindowByName(window_name)) + if (window->Active) + { + // Hide previous tooltips. We can't easily "reset" the content of a window so we create a new one. + window->HiddenFrames = 1; + ImFormatString(window_name, IM_ARRAYSIZE(window_name), "##Tooltip_%02d", ++g.TooltipOverrideCount); + } + ImGuiWindowFlags flags = ImGuiWindowFlags_Tooltip|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_AlwaysAutoResize; + Begin(window_name, NULL, flags | extra_flags); +} + +void ImGui::SetTooltipV(const char* fmt, va_list args) +{ + BeginTooltipEx(0, true); + TextV(fmt, args); + EndTooltip(); } void ImGui::SetTooltip(const char* fmt, ...) @@ -3391,67 +3728,75 @@ void ImGui::SetTooltip(const char* fmt, ...) va_end(args); } -static ImRect GetVisibleRect() -{ - ImGuiContext& g = *GImGui; - if (g.IO.DisplayVisibleMin.x != g.IO.DisplayVisibleMax.x && g.IO.DisplayVisibleMin.y != g.IO.DisplayVisibleMax.y) - return ImRect(g.IO.DisplayVisibleMin, g.IO.DisplayVisibleMax); - return ImRect(0.0f, 0.0f, g.IO.DisplaySize.x, g.IO.DisplaySize.y); -} - void ImGui::BeginTooltip() { - ImGuiWindowFlags flags = ImGuiWindowFlags_Tooltip|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_AlwaysAutoResize; - ImGui::Begin("##Tooltip", NULL, flags); + BeginTooltipEx(0, false); } void ImGui::EndTooltip() { IM_ASSERT(GetCurrentWindowRead()->Flags & ImGuiWindowFlags_Tooltip); // Mismatched BeginTooltip()/EndTooltip() calls - ImGui::End(); -} - -static bool IsPopupOpen(ImGuiID id) -{ - ImGuiContext& g = *GImGui; - return g.OpenPopupStack.Size > g.CurrentPopupStack.Size && g.OpenPopupStack[g.CurrentPopupStack.Size].PopupId == id; + End(); } // Mark popup as open (toggle toward open state). // Popups are closed when user click outside, or activate a pressable item, or CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. // Popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level). // One open popup per level of the popup hierarchy (NB: when assigning we reset the Window member of ImGuiPopupRef to NULL) -void ImGui::OpenPopupEx(const char* str_id, bool reopen_existing) +void ImGui::OpenPopupEx(ImGuiID id) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = g.CurrentWindow; - ImGuiID id = window->GetID(str_id); + ImGuiWindow* parent_window = g.CurrentWindow; int current_stack_size = g.CurrentPopupStack.Size; - ImGuiPopupRef popup_ref = ImGuiPopupRef(id, window, window->GetID("##menus"), g.IO.MousePos); // Tagged as new ref because constructor sets Window to NULL (we are passing the ParentWindow info here) + ImGuiPopupRef popup_ref; // Tagged as new ref as Window will be set back to NULL if we write this into OpenPopupStack. + popup_ref.PopupId = id; + popup_ref.Window = NULL; + popup_ref.ParentWindow = parent_window; + popup_ref.OpenFrameCount = g.FrameCount; + popup_ref.OpenParentId = parent_window->IDStack.back(); + popup_ref.OpenMousePos = g.IO.MousePos; + popup_ref.OpenPopupPos = g.IO.MousePos; // NB: In the Navigation branch OpenPopupPos doesn't use the mouse position, hence the separation here. + if (g.OpenPopupStack.Size < current_stack_size + 1) - g.OpenPopupStack.push_back(popup_ref); - else if (reopen_existing || g.OpenPopupStack[current_stack_size].PopupId != id) { - g.OpenPopupStack.resize(current_stack_size+1); - g.OpenPopupStack[current_stack_size] = popup_ref; + g.OpenPopupStack.push_back(popup_ref); + } + else + { + // Close child popups if any + g.OpenPopupStack.resize(current_stack_size + 1); + + // Gently handle the user mistakenly calling OpenPopup() every frame. It is a programming mistake! However, if we were to run the regular code path, the ui + // would become completely unusable because the popup will always be in hidden-while-calculating-size state _while_ claiming focus. Which would be a very confusing + // situation for the programmer. Instead, we silently allow the popup to proceed, it will keep reappearing and the programming error will be more obvious to understand. + if (g.OpenPopupStack[current_stack_size].PopupId == id && g.OpenPopupStack[current_stack_size].OpenFrameCount == g.FrameCount - 1) + g.OpenPopupStack[current_stack_size].OpenFrameCount = popup_ref.OpenFrameCount; + else + g.OpenPopupStack[current_stack_size] = popup_ref; + + // When reopening a popup we first refocus its parent, otherwise if its parent is itself a popup it would get closed by ClosePopupsOverWindow(). + // This is equivalent to what ClosePopupToLevel() does. + //if (g.OpenPopupStack[current_stack_size].PopupId == id) + // FocusWindow(parent_window); } } void ImGui::OpenPopup(const char* str_id) { - ImGui::OpenPopupEx(str_id, false); + ImGuiContext& g = *GImGui; + OpenPopupEx(g.CurrentWindow->GetID(str_id)); } -static void CloseInactivePopups() +void ImGui::ClosePopupsOverWindow(ImGuiWindow* ref_window) { ImGuiContext& g = *GImGui; if (g.OpenPopupStack.empty()) return; // When popups are stacked, clicking on a lower level popups puts focus back to it and close popups above it. - // Don't close our own child popup windows + // Don't close our own child popup windows. int n = 0; - if (g.FocusedWindow) + if (ref_window) { for (n = 0; n < g.OpenPopupStack.Size; n++) { @@ -3462,24 +3807,25 @@ static void CloseInactivePopups() if (popup.Window->Flags & ImGuiWindowFlags_ChildWindow) continue; + // Trim the stack if popups are not direct descendant of the reference window (which is often the NavWindow) bool has_focus = false; for (int m = n; m < g.OpenPopupStack.Size && !has_focus; m++) - has_focus = (g.OpenPopupStack[m].Window && g.OpenPopupStack[m].Window->RootWindow == g.FocusedWindow->RootWindow); + has_focus = (g.OpenPopupStack[m].Window && g.OpenPopupStack[m].Window->RootWindow == ref_window->RootWindow); if (!has_focus) break; } } - if (n < g.OpenPopupStack.Size) // This test is not required but it allows to set a useful breakpoint on the line below - g.OpenPopupStack.resize(n); + if (n < g.OpenPopupStack.Size) // This test is not required but it allows to set a convenient breakpoint on the block below + ClosePopupToLevel(n); } static ImGuiWindow* GetFrontMostModalRootWindow() { ImGuiContext& g = *GImGui; for (int n = g.OpenPopupStack.Size-1; n >= 0; n--) - if (ImGuiWindow* front_most_popup = g.OpenPopupStack.Data[n].Window) - if (front_most_popup->Flags & ImGuiWindowFlags_Modal) - return front_most_popup; + if (ImGuiWindow* popup = g.OpenPopupStack.Data[n].Window) + if (popup->Flags & ImGuiWindowFlags_Modal) + return popup; return NULL; } @@ -3493,7 +3839,7 @@ static void ClosePopupToLevel(int remaining) g.OpenPopupStack.resize(remaining); } -static void ClosePopup(ImGuiID id) +void ImGui::ClosePopup(ImGuiID id) { if (!IsPopupOpen(id)) return; @@ -3506,75 +3852,78 @@ void ImGui::CloseCurrentPopup() { ImGuiContext& g = *GImGui; int popup_idx = g.CurrentPopupStack.Size - 1; - if (popup_idx < 0 || popup_idx > g.OpenPopupStack.Size || g.CurrentPopupStack[popup_idx].PopupId != g.OpenPopupStack[popup_idx].PopupId) + if (popup_idx < 0 || popup_idx >= g.OpenPopupStack.Size || g.CurrentPopupStack[popup_idx].PopupId != g.OpenPopupStack[popup_idx].PopupId) return; while (popup_idx > 0 && g.OpenPopupStack[popup_idx].Window && (g.OpenPopupStack[popup_idx].Window->Flags & ImGuiWindowFlags_ChildMenu)) popup_idx--; ClosePopupToLevel(popup_idx); } -static inline void ClearSetNextWindowData() +bool ImGui::BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags) { ImGuiContext& g = *GImGui; - g.SetNextWindowPosCond = g.SetNextWindowSizeCond = g.SetNextWindowContentSizeCond = g.SetNextWindowCollapsedCond = 0; - g.SetNextWindowSizeConstraint = g.SetNextWindowFocus = false; -} - -static bool BeginPopupEx(const char* str_id, ImGuiWindowFlags extra_flags) -{ - ImGuiContext& g = *GImGui; - ImGuiWindow* window = g.CurrentWindow; - const ImGuiID id = window->GetID(str_id); if (!IsPopupOpen(id)) { - ClearSetNextWindowData(); // We behave like Begin() and need to consume those values + g.NextWindowData.Clear(); // We behave like Begin() and need to consume those values return false; } - ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f); - ImGuiWindowFlags flags = extra_flags|ImGuiWindowFlags_Popup|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_AlwaysAutoResize; - char name[20]; - if (flags & ImGuiWindowFlags_ChildMenu) - ImFormatString(name, IM_ARRAYSIZE(name), "##menu_%d", g.CurrentPopupStack.Size); // Recycle windows based on depth + if (extra_flags & ImGuiWindowFlags_ChildMenu) + ImFormatString(name, IM_ARRAYSIZE(name), "##Menu_%02d", g.CurrentPopupStack.Size); // Recycle windows based on depth else - ImFormatString(name, IM_ARRAYSIZE(name), "##popup_%08x", id); // Not recycling, so we can close/open during the same frame + ImFormatString(name, IM_ARRAYSIZE(name), "##Popup_%08x", id); // Not recycling, so we can close/open during the same frame - bool is_open = ImGui::Begin(name, NULL, flags); - if (!(window->Flags & ImGuiWindowFlags_ShowBorders)) - g.CurrentWindow->Flags &= ~ImGuiWindowFlags_ShowBorders; - if (!is_open) // NB: is_open can be 'false' when the popup is completely clipped (e.g. zero size display) - ImGui::EndPopup(); + bool is_open = Begin(name, NULL, extra_flags | ImGuiWindowFlags_Popup); + if (!is_open) // NB: Begin can return false when the popup is completely clipped (e.g. zero size display) + EndPopup(); return is_open; } -bool ImGui::BeginPopup(const char* str_id) +bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags flags) { - if (GImGui->OpenPopupStack.Size <= GImGui->CurrentPopupStack.Size) // Early out for performance + ImGuiContext& g = *GImGui; + if (g.OpenPopupStack.Size <= g.CurrentPopupStack.Size) // Early out for performance { - ClearSetNextWindowData(); // We behave like Begin() and need to consume those values + g.NextWindowData.Clear(); // We behave like Begin() and need to consume those values return false; } - return BeginPopupEx(str_id, ImGuiWindowFlags_ShowBorders); + return BeginPopupEx(g.CurrentWindow->GetID(str_id), flags|ImGuiWindowFlags_AlwaysAutoResize|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoSavedSettings); } -bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags extra_flags) +bool ImGui::IsPopupOpen(ImGuiID id) +{ + ImGuiContext& g = *GImGui; + return g.OpenPopupStack.Size > g.CurrentPopupStack.Size && g.OpenPopupStack[g.CurrentPopupStack.Size].PopupId == id; +} + +bool ImGui::IsPopupOpen(const char* str_id) +{ + ImGuiContext& g = *GImGui; + return g.OpenPopupStack.Size > g.CurrentPopupStack.Size && g.OpenPopupStack[g.CurrentPopupStack.Size].PopupId == g.CurrentWindow->GetID(str_id); +} + +bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags flags) { ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; const ImGuiID id = window->GetID(name); if (!IsPopupOpen(id)) { - ClearSetNextWindowData(); // We behave like Begin() and need to consume those values + g.NextWindowData.Clear(); // We behave like Begin() and need to consume those values return false; } - ImGuiWindowFlags flags = extra_flags|ImGuiWindowFlags_Popup|ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoCollapse|ImGuiWindowFlags_NoSavedSettings; - bool is_open = ImGui::Begin(name, p_open, flags); + // Center modal windows by default + // FIXME: Should test for (PosCond & window->SetWindowPosAllowFlags) with the upcoming window. + if (g.NextWindowData.PosCond == 0) + SetNextWindowPos(g.IO.DisplaySize * 0.5f, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f)); + + bool is_open = Begin(name, p_open, flags | ImGuiWindowFlags_Popup | ImGuiWindowFlags_Modal | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings); if (!is_open || (p_open && !*p_open)) // NB: is_open can be 'false' when the popup is completely clipped (e.g. zero size display) { - ImGui::EndPopup(); + EndPopup(); if (is_open) ClosePopup(id); return false; @@ -3585,79 +3934,90 @@ bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags ext void ImGui::EndPopup() { - ImGuiWindow* window = GetCurrentWindow(); - IM_ASSERT(window->Flags & ImGuiWindowFlags_Popup); // Mismatched BeginPopup()/EndPopup() calls - IM_ASSERT(GImGui->CurrentPopupStack.Size > 0); - ImGui::End(); - if (!(window->Flags & ImGuiWindowFlags_Modal)) - ImGui::PopStyleVar(); + ImGuiContext& g = *GImGui; (void)g; + IM_ASSERT(g.CurrentWindow->Flags & ImGuiWindowFlags_Popup); // Mismatched BeginPopup()/EndPopup() calls + IM_ASSERT(g.CurrentPopupStack.Size > 0); + End(); } -// This is a helper to handle the most simple case of associating one named popup to one given widget. -// 1. If you have many possible popups (for different "instances" of a same widget, or for wholly different widgets), you may be better off handling -// this yourself so you can store data relative to the widget that opened the popup instead of choosing different popup identifiers. -// 2. If you want right-clicking on the same item to reopen the popup at new location, use the same code replacing IsItemHovered() with IsItemHoveredRect() -// and passing true to the OpenPopupEx(). -// Because: hovering an item in a window below the popup won't normally trigger is hovering behavior/coloring. The pattern of ignoring the fact that -// the item isn't interactable (because it is blocked by the active popup) may useful in some situation when e.g. large canvas as one item, content of menu -// driven by click position. +bool ImGui::OpenPopupOnItemClick(const char* str_id, int mouse_button) +{ + ImGuiWindow* window = GImGui->CurrentWindow; + if (IsMouseReleased(mouse_button) && IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup)) + { + ImGuiID id = str_id ? window->GetID(str_id) : window->DC.LastItemId; // If user hasn't passed an ID, we can use the LastItemID. Using LastItemID as a Popup ID won't conflict! + IM_ASSERT(id != 0); // However, you cannot pass a NULL str_id if the last item has no identifier (e.g. a Text() item) + OpenPopupEx(id); + return true; + } + return false; +} + +// This is a helper to handle the simplest case of associating one named popup to one given widget. +// You may want to handle this on user side if you have specific needs (e.g. tweaking IsItemHovered() parameters). +// You can pass a NULL str_id to use the identifier of the last item. bool ImGui::BeginPopupContextItem(const char* str_id, int mouse_button) { - if (IsItemHovered() && IsMouseClicked(mouse_button)) - OpenPopupEx(str_id, false); - return BeginPopup(str_id); + ImGuiWindow* window = GImGui->CurrentWindow; + ImGuiID id = str_id ? window->GetID(str_id) : window->DC.LastItemId; // If user hasn't passed an ID, we can use the LastItemID. Using LastItemID as a Popup ID won't conflict! + IM_ASSERT(id != 0); // However, you cannot pass a NULL str_id if the last item has no identifier (e.g. a Text() item) + if (IsMouseReleased(mouse_button) && IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup)) + OpenPopupEx(id); + return BeginPopupEx(id, ImGuiWindowFlags_AlwaysAutoResize|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoSavedSettings); } -bool ImGui::BeginPopupContextWindow(bool also_over_items, const char* str_id, int mouse_button) +bool ImGui::BeginPopupContextWindow(const char* str_id, int mouse_button, bool also_over_items) { - if (!str_id) str_id = "window_context_menu"; - if (IsMouseHoveringWindow() && IsMouseClicked(mouse_button)) + if (!str_id) + str_id = "window_context"; + ImGuiID id = GImGui->CurrentWindow->GetID(str_id); + if (IsMouseReleased(mouse_button) && IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup)) if (also_over_items || !IsAnyItemHovered()) - OpenPopupEx(str_id, true); - return BeginPopup(str_id); + OpenPopupEx(id); + return BeginPopupEx(id, ImGuiWindowFlags_AlwaysAutoResize|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoSavedSettings); } bool ImGui::BeginPopupContextVoid(const char* str_id, int mouse_button) { - if (!str_id) str_id = "void_context_menu"; - if (!IsMouseHoveringAnyWindow() && IsMouseClicked(mouse_button)) - OpenPopupEx(str_id, true); - return BeginPopup(str_id); + if (!str_id) + str_id = "void_context"; + ImGuiID id = GImGui->CurrentWindow->GetID(str_id); + if (IsMouseReleased(mouse_button) && !IsWindowHovered(ImGuiHoveredFlags_AnyWindow)) + OpenPopupEx(id); + return BeginPopupEx(id, ImGuiWindowFlags_AlwaysAutoResize|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoSavedSettings); } static bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags extra_flags) { - ImGuiWindow* window = ImGui::GetCurrentWindow(); + ImGuiContext& g = *GImGui; + ImGuiWindow* parent_window = ImGui::GetCurrentWindow(); ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_ChildWindow; + flags |= (parent_window->Flags & ImGuiWindowFlags_NoMove); // Inherit the NoMove flag const ImVec2 content_avail = ImGui::GetContentRegionAvail(); ImVec2 size = ImFloor(size_arg); + const int auto_fit_axises = ((size.x == 0.0f) ? (1 << ImGuiAxis_X) : 0x00) | ((size.y == 0.0f) ? (1 << ImGuiAxis_Y) : 0x00); if (size.x <= 0.0f) - { - if (size.x == 0.0f) - flags |= ImGuiWindowFlags_ChildWindowAutoFitX; - size.x = ImMax(content_avail.x, 4.0f) - fabsf(size.x); // Arbitrary minimum zero-ish child size of 4.0f (0.0f causing too much issues) - } + size.x = ImMax(content_avail.x + size.x, 4.0f); // Arbitrary minimum child size (0.0f causing too much issues) if (size.y <= 0.0f) - { - if (size.y == 0.0f) - flags |= ImGuiWindowFlags_ChildWindowAutoFitY; - size.y = ImMax(content_avail.y, 4.0f) - fabsf(size.y); - } - if (border) - flags |= ImGuiWindowFlags_ShowBorders; + size.y = ImMax(content_avail.y + size.y, 4.0f); + + const float backup_border_size = g.Style.ChildBorderSize; + if (!border) + g.Style.ChildBorderSize = 0.0f; flags |= extra_flags; char title[256]; if (name) - ImFormatString(title, IM_ARRAYSIZE(title), "%s.%s.%08X", window->Name, name, id); + ImFormatString(title, IM_ARRAYSIZE(title), "%s/%s_%08X", parent_window->Name, name, id); else - ImFormatString(title, IM_ARRAYSIZE(title), "%s.%08X", window->Name, id); + ImFormatString(title, IM_ARRAYSIZE(title), "%s/%08X", parent_window->Name, id); - bool ret = ImGui::Begin(title, NULL, size, -1.0f, flags); - - if (!(window->Flags & ImGuiWindowFlags_ShowBorders)) - ImGui::GetCurrentWindow()->Flags &= ~ImGuiWindowFlags_ShowBorders; + ImGui::SetNextWindowSize(size); + bool ret = ImGui::Begin(title, NULL, flags); + ImGuiWindow* child_window = ImGui::GetCurrentWindow(); + child_window->AutoFitChildAxises = auto_fit_axises; + g.Style.ChildBorderSize = backup_border_size; return ret; } @@ -3678,25 +4038,24 @@ void ImGui::EndChild() ImGuiWindow* window = GetCurrentWindow(); IM_ASSERT(window->Flags & ImGuiWindowFlags_ChildWindow); // Mismatched BeginChild()/EndChild() callss - if ((window->Flags & ImGuiWindowFlags_ComboBox) || window->BeginCount > 1) + if (window->BeginCount > 1) { - ImGui::End(); + End(); } else { // When using auto-filling child window, we don't provide full width/height to ItemSize so that it doesn't feed back into automatic size-fitting. ImVec2 sz = GetWindowSize(); - if (window->Flags & ImGuiWindowFlags_ChildWindowAutoFitX) // Arbitrary minimum zero-ish child size of 4.0f causes less trouble than a 0.0f + if (window->AutoFitChildAxises & (1 << ImGuiAxis_X)) // Arbitrary minimum zero-ish child size of 4.0f causes less trouble than a 0.0f sz.x = ImMax(4.0f, sz.x); - if (window->Flags & ImGuiWindowFlags_ChildWindowAutoFitY) + if (window->AutoFitChildAxises & (1 << ImGuiAxis_Y)) sz.y = ImMax(4.0f, sz.y); + End(); - ImGui::End(); - - window = GetCurrentWindow(); - ImRect bb(window->DC.CursorPos, window->DC.CursorPos + sz); + ImGuiWindow* parent_window = GetCurrentWindow(); + ImRect bb(parent_window->DC.CursorPos, parent_window->DC.CursorPos + sz); ItemSize(sz); - ItemAdd(bb, NULL); + ItemAdd(bb, 0); } } @@ -3705,17 +4064,18 @@ bool ImGui::BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags ext { ImGuiContext& g = *GImGui; const ImGuiStyle& style = g.Style; - ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, style.Colors[ImGuiCol_FrameBg]); - ImGui::PushStyleVar(ImGuiStyleVar_ChildWindowRounding, style.FrameRounding); - ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, style.FramePadding); - return ImGui::BeginChild(id, size, (g.CurrentWindow->Flags & ImGuiWindowFlags_ShowBorders) ? true : false, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysUseWindowPadding | extra_flags); + PushStyleColor(ImGuiCol_ChildBg, style.Colors[ImGuiCol_FrameBg]); + PushStyleVar(ImGuiStyleVar_ChildRounding, style.FrameRounding); + PushStyleVar(ImGuiStyleVar_ChildBorderSize, style.FrameBorderSize); + PushStyleVar(ImGuiStyleVar_WindowPadding, style.FramePadding); + return BeginChild(id, size, true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysUseWindowPadding | extra_flags); } void ImGui::EndChildFrame() { - ImGui::EndChild(); - ImGui::PopStyleVar(2); - ImGui::PopStyleColor(); + EndChild(); + PopStyleVar(3); + PopStyleColor(); } // Save and compare stack sizes on Begin()/End() to detect usage errors @@ -3724,52 +4084,93 @@ static void CheckStacksSize(ImGuiWindow* window, bool write) // NOT checking: DC.ItemWidth, DC.AllowKeyboardFocus, DC.ButtonRepeat, DC.TextWrapPos (per window) to allow user to conveniently push once and not pop (they are cleared on Begin) ImGuiContext& g = *GImGui; int* p_backup = &window->DC.StackSizesBackup[0]; - { int current = window->IDStack.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "PushID/PopID Mismatch!"); p_backup++; } // User forgot PopID() - { int current = window->DC.GroupStack.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "BeginGroup/EndGroup Mismatch!"); p_backup++; } // User forgot EndGroup() - { int current = g.CurrentPopupStack.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "BeginMenu/EndMenu or BeginPopup/EndPopup Mismatch"); p_backup++; }// User forgot EndPopup()/EndMenu() - { int current = g.ColorModifiers.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "PushStyleColor/PopStyleColor Mismatch!"); p_backup++; } // User forgot PopStyleColor() - { int current = g.StyleModifiers.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "PushStyleVar/PopStyleVar Mismatch!"); p_backup++; } // User forgot PopStyleVar() - { int current = g.FontStack.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "PushFont/PopFont Mismatch!"); p_backup++; } // User forgot PopFont() + { int current = window->IDStack.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "PushID/PopID or TreeNode/TreePop Mismatch!"); p_backup++; } // Too few or too many PopID()/TreePop() + { int current = window->DC.GroupStack.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "BeginGroup/EndGroup Mismatch!"); p_backup++; } // Too few or too many EndGroup() + { int current = g.CurrentPopupStack.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "BeginMenu/EndMenu or BeginPopup/EndPopup Mismatch"); p_backup++;}// Too few or too many EndMenu()/EndPopup() + { int current = g.ColorModifiers.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "PushStyleColor/PopStyleColor Mismatch!"); p_backup++; } // Too few or too many PopStyleColor() + { int current = g.StyleModifiers.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "PushStyleVar/PopStyleVar Mismatch!"); p_backup++; } // Too few or too many PopStyleVar() + { int current = g.FontStack.Size; if (write) *p_backup = current; else IM_ASSERT(*p_backup == current && "PushFont/PopFont Mismatch!"); p_backup++; } // Too few or too many PopFont() IM_ASSERT(p_backup == window->DC.StackSizesBackup + IM_ARRAYSIZE(window->DC.StackSizesBackup)); } -static ImVec2 FindBestPopupWindowPos(const ImVec2& base_pos, const ImVec2& size, int* last_dir, const ImRect& r_inner) +enum ImGuiPopupPositionPolicy +{ + ImGuiPopupPositionPolicy_Default, + ImGuiPopupPositionPolicy_ComboBox +}; + +static ImVec2 FindBestWindowPosForPopup(const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy = ImGuiPopupPositionPolicy_Default) { const ImGuiStyle& style = GImGui->Style; - // Clamp into visible area while not overlapping the cursor. Safety padding is optional if our popup size won't fit without it. + // r_avoid = the rectangle to avoid (e.g. for tooltip it is a rectangle around the mouse cursor which we want to avoid. for popups it's a small point around the cursor.) + // r_outer = the visible area rectangle, minus safe area padding. If our popup size won't fit because of safe area padding we ignore it. ImVec2 safe_padding = style.DisplaySafeAreaPadding; - ImRect r_outer(GetVisibleRect()); - r_outer.Reduce(ImVec2((size.x - r_outer.GetWidth() > safe_padding.x*2) ? safe_padding.x : 0.0f, (size.y - r_outer.GetHeight() > safe_padding.y*2) ? safe_padding.y : 0.0f)); - ImVec2 base_pos_clamped = ImClamp(base_pos, r_outer.Min, r_outer.Max - size); + ImRect r_outer(GetViewportRect()); + r_outer.Expand(ImVec2((size.x - r_outer.GetWidth() > safe_padding.x*2) ? -safe_padding.x : 0.0f, (size.y - r_outer.GetHeight() > safe_padding.y*2) ? -safe_padding.y : 0.0f)); + ImVec2 base_pos_clamped = ImClamp(ref_pos, r_outer.Min, r_outer.Max - size); + //GImGui->OverlayDrawList.AddRect(r_avoid.Min, r_avoid.Max, IM_COL32(255,0,0,255)); + //GImGui->OverlayDrawList.AddRect(r_outer.Min, r_outer.Max, IM_COL32(0,255,0,255)); - for (int n = (*last_dir != -1) ? -1 : 0; n < 4; n++) // Last, Right, down, up, left. (Favor last used direction). + // Combo Box policy (we want a connecting edge) + if (policy == ImGuiPopupPositionPolicy_ComboBox) { - const int dir = (n == -1) ? *last_dir : n; - ImRect rect(dir == 0 ? r_inner.Max.x : r_outer.Min.x, dir == 1 ? r_inner.Max.y : r_outer.Min.y, dir == 3 ? r_inner.Min.x : r_outer.Max.x, dir == 2 ? r_inner.Min.y : r_outer.Max.y); - if (rect.GetWidth() < size.x || rect.GetHeight() < size.y) + const ImGuiDir dir_prefered_order[ImGuiDir_Count_] = { ImGuiDir_Down, ImGuiDir_Right, ImGuiDir_Left, ImGuiDir_Up }; + for (int n = (*last_dir != ImGuiDir_None) ? -1 : 0; n < ImGuiDir_Count_; n++) + { + const ImGuiDir dir = (n == -1) ? *last_dir : dir_prefered_order[n]; + if (n != -1 && dir == *last_dir) // Already tried this direction? + continue; + ImVec2 pos; + if (dir == ImGuiDir_Down) pos = ImVec2(r_avoid.Min.x, r_avoid.Max.y); // Below, Toward Right (default) + if (dir == ImGuiDir_Right) pos = ImVec2(r_avoid.Min.x, r_avoid.Min.y - size.y); // Above, Toward Right + if (dir == ImGuiDir_Left) pos = ImVec2(r_avoid.Max.x - size.x, r_avoid.Max.y); // Below, Toward Left + if (dir == ImGuiDir_Up) pos = ImVec2(r_avoid.Max.x - size.x, r_avoid.Min.y - size.y); // Above, Toward Left + if (!r_outer.Contains(ImRect(pos, pos + size))) + continue; + *last_dir = dir; + return pos; + } + } + + // Default popup policy + const ImGuiDir dir_prefered_order[ImGuiDir_Count_] = { ImGuiDir_Right, ImGuiDir_Down, ImGuiDir_Up, ImGuiDir_Left }; + for (int n = (*last_dir != ImGuiDir_None) ? -1 : 0; n < ImGuiDir_Count_; n++) + { + const ImGuiDir dir = (n == -1) ? *last_dir : dir_prefered_order[n]; + if (n != -1 && dir == *last_dir) // Already tried this direction? continue; + float avail_w = (dir == ImGuiDir_Left ? r_avoid.Min.x : r_outer.Max.x) - (dir == ImGuiDir_Right ? r_avoid.Max.x : r_outer.Min.x); + float avail_h = (dir == ImGuiDir_Up ? r_avoid.Min.y : r_outer.Max.y) - (dir == ImGuiDir_Down ? r_avoid.Max.y : r_outer.Min.y); + if (avail_w < size.x || avail_h < size.y) + continue; + ImVec2 pos; + pos.x = (dir == ImGuiDir_Left) ? r_avoid.Min.x - size.x : (dir == ImGuiDir_Right) ? r_avoid.Max.x : base_pos_clamped.x; + pos.y = (dir == ImGuiDir_Up) ? r_avoid.Min.y - size.y : (dir == ImGuiDir_Down) ? r_avoid.Max.y : base_pos_clamped.y; *last_dir = dir; - return ImVec2(dir == 0 ? r_inner.Max.x : dir == 3 ? r_inner.Min.x - size.x : base_pos_clamped.x, dir == 1 ? r_inner.Max.y : dir == 2 ? r_inner.Min.y - size.y : base_pos_clamped.y); + return pos; } // Fallback, try to keep within display - *last_dir = -1; - ImVec2 pos = base_pos; + *last_dir = ImGuiDir_None; + ImVec2 pos = ref_pos; pos.x = ImMax(ImMin(pos.x + size.x, r_outer.Max.x) - size.x, r_outer.Min.x); pos.y = ImMax(ImMin(pos.y + size.y, r_outer.Max.y) - size.y, r_outer.Min.y); return pos; } +static void SetWindowConditionAllowFlags(ImGuiWindow* window, ImGuiCond flags, bool enabled) +{ + window->SetWindowPosAllowFlags = enabled ? (window->SetWindowPosAllowFlags | flags) : (window->SetWindowPosAllowFlags & ~flags); + window->SetWindowSizeAllowFlags = enabled ? (window->SetWindowSizeAllowFlags | flags) : (window->SetWindowSizeAllowFlags & ~flags); + window->SetWindowCollapsedAllowFlags = enabled ? (window->SetWindowCollapsedAllowFlags | flags) : (window->SetWindowCollapsedAllowFlags & ~flags); +} + ImGuiWindow* ImGui::FindWindowByName(const char* name) { - // FIXME-OPT: Store sorted hashes -> pointers so we can do a bissection in a contiguous block ImGuiContext& g = *GImGui; ImGuiID id = ImHash(name, 0); - for (int i = 0; i < g.Windows.Size; i++) - if (g.Windows[i]->ID == id) - return g.Windows[i]; - return NULL; + return (ImGuiWindow*)g.WindowsById.GetVoidPtr(id); } static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFlags flags) @@ -3777,45 +4178,28 @@ static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFl ImGuiContext& g = *GImGui; // Create window the first time - ImGuiWindow* window = (ImGuiWindow*)ImGui::MemAlloc(sizeof(ImGuiWindow)); - IM_PLACEMENT_NEW(window) ImGuiWindow(name); + ImGuiWindow* window = IM_NEW(ImGuiWindow)(&g, name); window->Flags = flags; + g.WindowsById.SetVoidPtr(window->ID, window); - if (flags & ImGuiWindowFlags_NoSavedSettings) - { - // User can disable loading and saving of settings. Tooltip and child windows also don't store settings. - window->Size = window->SizeFull = size; - } - else + // User can disable loading and saving of settings. Tooltip and child windows also don't store settings. + if (!(flags & ImGuiWindowFlags_NoSavedSettings)) { // Retrieve settings from .ini file // Use SetWindowPos() or SetNextWindowPos() with the appropriate condition flag to change the initial position of a window. - window->PosFloat = ImVec2(60, 60); - window->Pos = ImVec2((float)(int)window->PosFloat.x, (float)(int)window->PosFloat.y); + window->Pos = window->PosFloat = ImVec2(60, 60); - ImGuiIniData* settings = FindWindowSettings(name); - if (!settings) - { - settings = AddWindowSettings(name); - } - else - { - window->SetWindowPosAllowFlags &= ~ImGuiSetCond_FirstUseEver; - window->SetWindowSizeAllowFlags &= ~ImGuiSetCond_FirstUseEver; - window->SetWindowCollapsedAllowFlags &= ~ImGuiSetCond_FirstUseEver; - } - - if (settings->Pos.x != FLT_MAX) + if (ImGuiWindowSettings* settings = ImGui::FindWindowSettings(window->ID)) { + SetWindowConditionAllowFlags(window, ImGuiCond_FirstUseEver, false); window->PosFloat = settings->Pos; - window->Pos = ImVec2((float)(int)window->PosFloat.x, (float)(int)window->PosFloat.y); + window->Pos = ImFloor(window->PosFloat); window->Collapsed = settings->Collapsed; + if (ImLengthSqr(settings->Size) > 0.00001f) + size = settings->Size; } - - if (ImLengthSqr(settings->Size) > 0.00001f && !(flags & ImGuiWindowFlags_NoResize)) - size = settings->Size; - window->Size = window->SizeFull = size; } + window->Size = window->SizeFull = window->SizeFullAtLastBegin = size; if ((flags & ImGuiWindowFlags_AlwaysAutoResize) != 0) { @@ -3838,46 +4222,240 @@ static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFl return window; } -static void ApplySizeFullWithConstraint(ImGuiWindow* window, ImVec2 new_size) +static ImVec2 CalcSizeAfterConstraint(ImGuiWindow* window, ImVec2 new_size) { ImGuiContext& g = *GImGui; - if (g.SetNextWindowSizeConstraint) + if (g.NextWindowData.SizeConstraintCond != 0) { // Using -1,-1 on either X/Y axis to preserve the current size. - ImRect cr = g.SetNextWindowSizeConstraintRect; + ImRect cr = g.NextWindowData.SizeConstraintRect; new_size.x = (cr.Min.x >= 0 && cr.Max.x >= 0) ? ImClamp(new_size.x, cr.Min.x, cr.Max.x) : window->SizeFull.x; new_size.y = (cr.Min.y >= 0 && cr.Max.y >= 0) ? ImClamp(new_size.y, cr.Min.y, cr.Max.y) : window->SizeFull.y; - if (g.SetNextWindowSizeConstraintCallback) + if (g.NextWindowData.SizeCallback) { - ImGuiSizeConstraintCallbackData data; - data.UserData = g.SetNextWindowSizeConstraintCallbackUserData; + ImGuiSizeCallbackData data; + data.UserData = g.NextWindowData.SizeCallbackUserData; data.Pos = window->Pos; data.CurrentSize = window->SizeFull; data.DesiredSize = new_size; - g.SetNextWindowSizeConstraintCallback(&data); + g.NextWindowData.SizeCallback(&data); new_size = data.DesiredSize; } } + + // Minimum size if (!(window->Flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_AlwaysAutoResize))) + { new_size = ImMax(new_size, g.Style.WindowMinSize); - window->SizeFull = new_size; + new_size.y = ImMax(new_size.y, window->TitleBarHeight() + window->MenuBarHeight() + ImMax(0.0f, g.Style.WindowRounding - 1.0f)); // Reduce artifacts with very small windows + } + return new_size; +} + +static ImVec2 CalcSizeContents(ImGuiWindow* window) +{ + ImVec2 sz; + sz.x = (float)(int)((window->SizeContentsExplicit.x != 0.0f) ? window->SizeContentsExplicit.x : (window->DC.CursorMaxPos.x - window->Pos.x + window->Scroll.x)); + sz.y = (float)(int)((window->SizeContentsExplicit.y != 0.0f) ? window->SizeContentsExplicit.y : (window->DC.CursorMaxPos.y - window->Pos.y + window->Scroll.y)); + return sz + window->WindowPadding; +} + +static ImVec2 CalcSizeAutoFit(ImGuiWindow* window, const ImVec2& size_contents) +{ + ImGuiContext& g = *GImGui; + ImGuiStyle& style = g.Style; + ImGuiWindowFlags flags = window->Flags; + ImVec2 size_auto_fit; + if ((flags & ImGuiWindowFlags_Tooltip) != 0) + { + // Tooltip always resize. We keep the spacing symmetric on both axises for aesthetic purpose. + size_auto_fit = size_contents; + } + else + { + // When the window cannot fit all contents (either because of constraints, either because screen is too small): we are growing the size on the other axis to compensate for expected scrollbar. FIXME: Might turn bigger than DisplaySize-WindowPadding. + size_auto_fit = ImClamp(size_contents, style.WindowMinSize, ImMax(style.WindowMinSize, g.IO.DisplaySize - g.Style.DisplaySafeAreaPadding)); + ImVec2 size_auto_fit_after_constraint = CalcSizeAfterConstraint(window, size_auto_fit); + if (size_auto_fit_after_constraint.x < size_contents.x && !(flags & ImGuiWindowFlags_NoScrollbar) && (flags & ImGuiWindowFlags_HorizontalScrollbar)) + size_auto_fit.y += style.ScrollbarSize; + if (size_auto_fit_after_constraint.y < size_contents.y && !(flags & ImGuiWindowFlags_NoScrollbar)) + size_auto_fit.x += style.ScrollbarSize; + } + return size_auto_fit; +} + +static float GetScrollMaxX(ImGuiWindow* window) +{ + return ImMax(0.0f, window->SizeContents.x - (window->SizeFull.x - window->ScrollbarSizes.x)); +} + +static float GetScrollMaxY(ImGuiWindow* window) +{ + return ImMax(0.0f, window->SizeContents.y - (window->SizeFull.y - window->ScrollbarSizes.y)); +} + +static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow* window) +{ + ImVec2 scroll = window->Scroll; + float cr_x = window->ScrollTargetCenterRatio.x; + float cr_y = window->ScrollTargetCenterRatio.y; + if (window->ScrollTarget.x < FLT_MAX) + scroll.x = window->ScrollTarget.x - cr_x * (window->SizeFull.x - window->ScrollbarSizes.x); + if (window->ScrollTarget.y < FLT_MAX) + scroll.y = window->ScrollTarget.y - (1.0f - cr_y) * (window->TitleBarHeight() + window->MenuBarHeight()) - cr_y * (window->SizeFull.y - window->ScrollbarSizes.y); + scroll = ImMax(scroll, ImVec2(0.0f, 0.0f)); + if (!window->Collapsed && !window->SkipItems) + { + scroll.x = ImMin(scroll.x, GetScrollMaxX(window)); + scroll.y = ImMin(scroll.y, GetScrollMaxY(window)); + } + return scroll; +} + +static ImGuiCol GetWindowBgColorIdxFromFlags(ImGuiWindowFlags flags) +{ + if (flags & (ImGuiWindowFlags_Tooltip | ImGuiWindowFlags_Popup)) + return ImGuiCol_PopupBg; + if (flags & ImGuiWindowFlags_ChildWindow) + return ImGuiCol_ChildBg; + return ImGuiCol_WindowBg; +} + +static void CalcResizePosSizeFromAnyCorner(ImGuiWindow* window, const ImVec2& corner_target, const ImVec2& corner_norm, ImVec2* out_pos, ImVec2* out_size) +{ + ImVec2 pos_min = ImLerp(corner_target, window->Pos, corner_norm); // Expected window upper-left + ImVec2 pos_max = ImLerp(window->Pos + window->Size, corner_target, corner_norm); // Expected window lower-right + ImVec2 size_expected = pos_max - pos_min; + ImVec2 size_constrained = CalcSizeAfterConstraint(window, size_expected); + *out_pos = pos_min; + if (corner_norm.x == 0.0f) + out_pos->x -= (size_constrained.x - size_expected.x); + if (corner_norm.y == 0.0f) + out_pos->y -= (size_constrained.y - size_expected.y); + *out_size = size_constrained; +} + +struct ImGuiResizeGripDef +{ + ImVec2 CornerPos; + ImVec2 InnerDir; + int AngleMin12, AngleMax12; +}; + +const ImGuiResizeGripDef resize_grip_def[4] = +{ + { ImVec2(1,1), ImVec2(-1,-1), 0, 3 }, // Lower right + { ImVec2(0,1), ImVec2(+1,-1), 3, 6 }, // Lower left + { ImVec2(0,0), ImVec2(+1,+1), 6, 9 }, // Upper left + { ImVec2(1,0), ImVec2(-1,+1), 9,12 }, // Upper right +}; + +static ImRect GetBorderRect(ImGuiWindow* window, int border_n, float perp_padding, float thickness) +{ + ImRect rect = window->Rect(); + if (thickness == 0.0f) rect.Max -= ImVec2(1,1); + if (border_n == 0) return ImRect(rect.Min.x + perp_padding, rect.Min.y, rect.Max.x - perp_padding, rect.Min.y + thickness); + if (border_n == 1) return ImRect(rect.Max.x - thickness, rect.Min.y + perp_padding, rect.Max.x, rect.Max.y - perp_padding); + if (border_n == 2) return ImRect(rect.Min.x + perp_padding, rect.Max.y - thickness, rect.Max.x - perp_padding, rect.Max.y); + if (border_n == 3) return ImRect(rect.Min.x, rect.Min.y + perp_padding, rect.Min.x + thickness, rect.Max.y - perp_padding); + IM_ASSERT(0); + return ImRect(); +} + +// Handle resize for: Resize Grips, Borders, Gamepad +static void ImGui::UpdateManualResize(ImGuiWindow* window, const ImVec2& size_auto_fit, int* border_held, int resize_grip_count, ImU32 resize_grip_col[4]) +{ + ImGuiContext& g = *GImGui; + ImGuiWindowFlags flags = window->Flags; + if ((flags & ImGuiWindowFlags_NoResize) || (flags & ImGuiWindowFlags_AlwaysAutoResize) || window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0) + return; + + const int resize_border_count = (flags & ImGuiWindowFlags_ResizeFromAnySide) ? 4 : 0; + const float grip_draw_size = (float)(int)ImMax(g.FontSize * 1.35f, window->WindowRounding + 1.0f + g.FontSize * 0.2f); + const float grip_hover_size = (float)(int)(grip_draw_size * 0.75f); + + ImVec2 pos_target(FLT_MAX, FLT_MAX); + ImVec2 size_target(FLT_MAX, FLT_MAX); + + // Manual resize grips + PushID("#RESIZE"); + for (int resize_grip_n = 0; resize_grip_n < resize_grip_count; resize_grip_n++) + { + const ImGuiResizeGripDef& grip = resize_grip_def[resize_grip_n]; + const ImVec2 corner = ImLerp(window->Pos, window->Pos + window->Size, grip.CornerPos); + + // Using the FlattenChilds button flag we make the resize button accessible even if we are hovering over a child window + ImRect resize_rect(corner, corner + grip.InnerDir * grip_hover_size); + resize_rect.FixInverted(); + bool hovered, held; + ButtonBehavior(resize_rect, window->GetID((void*)(intptr_t)resize_grip_n), &hovered, &held, ImGuiButtonFlags_FlattenChildren); + if (hovered || held) + g.MouseCursor = (resize_grip_n & 1) ? ImGuiMouseCursor_ResizeNESW : ImGuiMouseCursor_ResizeNWSE; + + if (g.HoveredWindow == window && held && g.IO.MouseDoubleClicked[0] && resize_grip_n == 0) + { + // Manual auto-fit when double-clicking + size_target = CalcSizeAfterConstraint(window, size_auto_fit); + ClearActiveID(); + } + else if (held) + { + // Resize from any of the four corners + // We don't use an incremental MouseDelta but rather compute an absolute target size based on mouse position + ImVec2 corner_target = g.IO.MousePos - g.ActiveIdClickOffset + resize_rect.GetSize() * grip.CornerPos; // Corner of the window corresponding to our corner grip + CalcResizePosSizeFromAnyCorner(window, corner_target, grip.CornerPos, &pos_target, &size_target); + } + if (resize_grip_n == 0 || held || hovered) + resize_grip_col[resize_grip_n] = GetColorU32(held ? ImGuiCol_ResizeGripActive : hovered ? ImGuiCol_ResizeGripHovered : ImGuiCol_ResizeGrip); + } + for (int border_n = 0; border_n < resize_border_count; border_n++) + { + const float BORDER_SIZE = 5.0f; // FIXME: Only works _inside_ window because of HoveredWindow check. + const float BORDER_APPEAR_TIMER = 0.05f; // Reduce visual noise + bool hovered, held; + ImRect border_rect = GetBorderRect(window, border_n, grip_hover_size, BORDER_SIZE); + ButtonBehavior(border_rect, window->GetID((void*)(intptr_t)(border_n + 4)), &hovered, &held, ImGuiButtonFlags_FlattenChildren); + if ((hovered && g.HoveredIdTimer > BORDER_APPEAR_TIMER) || held) + { + g.MouseCursor = (border_n & 1) ? ImGuiMouseCursor_ResizeEW : ImGuiMouseCursor_ResizeNS; + if (held) *border_held = border_n; + } + if (held) + { + ImVec2 border_target = window->Pos; + ImVec2 border_posn; + if (border_n == 0) { border_posn = ImVec2(0, 0); border_target.y = (g.IO.MousePos.y - g.ActiveIdClickOffset.y); } + if (border_n == 1) { border_posn = ImVec2(1, 0); border_target.x = (g.IO.MousePos.x - g.ActiveIdClickOffset.x + BORDER_SIZE); } + if (border_n == 2) { border_posn = ImVec2(0, 1); border_target.y = (g.IO.MousePos.y - g.ActiveIdClickOffset.y + BORDER_SIZE); } + if (border_n == 3) { border_posn = ImVec2(0, 0); border_target.x = (g.IO.MousePos.x - g.ActiveIdClickOffset.x); } + CalcResizePosSizeFromAnyCorner(window, border_target, border_posn, &pos_target, &size_target); + } + } + PopID(); + + // Apply back modified position/size to window + if (size_target.x != FLT_MAX) + { + window->SizeFull = size_target; + MarkIniSettingsDirty(window); + } + if (pos_target.x != FLT_MAX) + { + window->Pos = window->PosFloat = ImFloor(pos_target); + MarkIniSettingsDirty(window); + } + + window->Size = window->SizeFull; } // Push a new ImGui window to add widgets to. // - A default window called "Debug" is automatically stacked at the beginning of every frame so you can use widgets without explicitly calling a Begin/End pair. // - Begin/End can be called multiple times during the frame with the same window name to append content. -// - 'size_on_first_use' for a regular window denote the initial size for first-time creation (no saved data) and isn't that useful. Use SetNextWindowSize() prior to calling Begin() for more flexible window manipulation. // - The window name is used as a unique identifier to preserve window information across frames (and save rudimentary information to the .ini file). // You can use the "##" or "###" markers to use the same label with different id, or same id with different label. See documentation at the top of this file. // - Return false when window is collapsed, so you can early out in your code. You always need to call ImGui::End() even if false is returned. // - Passing 'bool* p_open' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed. -// - Passing non-zero 'size' is roughly equivalent to calling SetNextWindowSize(size, ImGuiSetCond_FirstUseEver) prior to calling Begin(). bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) -{ - return ImGui::Begin(name, p_open, ImVec2(0.f, 0.f), -1.0f, flags); -} - -bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_use, float bg_alpha, ImGuiWindowFlags flags) { ImGuiContext& g = *GImGui; const ImGuiStyle& style = g.Style; @@ -3885,130 +4463,140 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us IM_ASSERT(g.Initialized); // Forgot to call ImGui::NewFrame() IM_ASSERT(g.FrameCountEnded != g.FrameCount); // Called ImGui::Render() or ImGui::EndFrame() and haven't called ImGui::NewFrame() again yet - if (flags & ImGuiWindowFlags_NoInputs) - flags |= ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize; - // Find or create - bool window_is_new = false; ImGuiWindow* window = FindWindowByName(name); if (!window) { + ImVec2 size_on_first_use = (g.NextWindowData.SizeCond != 0) ? g.NextWindowData.SizeVal : ImVec2(0.0f, 0.0f); // Any condition flag will do since we are creating a new window here. window = CreateNewWindow(name, size_on_first_use, flags); - window_is_new = true; } - const int current_frame = ImGui::GetFrameCount(); + // Automatically disable manual moving/resizing when NoInputs is set + if (flags & ImGuiWindowFlags_NoInputs) + flags |= ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize; + //if (flags & ImGuiWindowFlags_NavFlattened) + // IM_ASSERT(flags & ImGuiWindowFlags_ChildWindow); + + const int current_frame = g.FrameCount; const bool first_begin_of_the_frame = (window->LastFrameActive != current_frame); if (first_begin_of_the_frame) window->Flags = (ImGuiWindowFlags)flags; else flags = window->Flags; - // Add to stack - ImGuiWindow* parent_window = !g.CurrentWindowStack.empty() ? g.CurrentWindowStack.back() : NULL; - g.CurrentWindowStack.push_back(window); - SetCurrentWindow(window); - CheckStacksSize(window, true); - IM_ASSERT(parent_window != NULL || !(flags & ImGuiWindowFlags_ChildWindow)); - - bool window_was_active = (window->LastFrameActive == current_frame - 1); // Not using !WasActive because the implicit "Debug" window would always toggle off->on + // Update the Appearing flag + bool window_just_activated_by_user = (window->LastFrameActive < current_frame - 1); // Not using !WasActive because the implicit "Debug" window would always toggle off->on + const bool window_just_appearing_after_hidden_for_resize = (window->HiddenFrames == 1); + if (flags & ImGuiWindowFlags_Popup) + { + ImGuiPopupRef& popup_ref = g.OpenPopupStack[g.CurrentPopupStack.Size]; + window_just_activated_by_user |= (window->PopupId != popup_ref.PopupId); // We recycle popups so treat window as activated if popup id changed + window_just_activated_by_user |= (window != popup_ref.Window); + } + window->Appearing = (window_just_activated_by_user || window_just_appearing_after_hidden_for_resize); + window->CloseButton = (p_open != NULL); + if (window->Appearing) + SetWindowConditionAllowFlags(window, ImGuiCond_Appearing, true); + + // Parent window is latched only on the first call to Begin() of the frame, so further append-calls can be done from a different window stack + ImGuiWindow* parent_window_in_stack = g.CurrentWindowStack.empty() ? NULL : g.CurrentWindowStack.back(); + ImGuiWindow* parent_window = first_begin_of_the_frame ? ((flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_Popup)) ? parent_window_in_stack : NULL) : window->ParentWindow; + IM_ASSERT(parent_window != NULL || !(flags & ImGuiWindowFlags_ChildWindow)); + + // Add to stack + g.CurrentWindowStack.push_back(window); + SetCurrentWindow(window); + CheckStacksSize(window, true); if (flags & ImGuiWindowFlags_Popup) { ImGuiPopupRef& popup_ref = g.OpenPopupStack[g.CurrentPopupStack.Size]; - window_was_active &= (window->PopupId == popup_ref.PopupId); - window_was_active &= (window == popup_ref.Window); popup_ref.Window = window; g.CurrentPopupStack.push_back(popup_ref); window->PopupId = popup_ref.PopupId; } - const bool window_appearing_after_being_hidden = (window->HiddenFrames == 1); - // Process SetNextWindow***() calls - bool window_pos_set_by_api = false, window_size_set_by_api = false; - if (g.SetNextWindowPosCond) + bool window_pos_set_by_api = false; + bool window_size_x_set_by_api = false, window_size_y_set_by_api = false; + if (g.NextWindowData.PosCond) { - const ImVec2 backup_cursor_pos = window->DC.CursorPos; // FIXME: not sure of the exact reason of this saving/restore anymore :( need to look into that. - if (!window_was_active || window_appearing_after_being_hidden) window->SetWindowPosAllowFlags |= ImGuiSetCond_Appearing; - window_pos_set_by_api = (window->SetWindowPosAllowFlags & g.SetNextWindowPosCond) != 0; - if (window_pos_set_by_api && ImLengthSqr(g.SetNextWindowPosVal - ImVec2(-FLT_MAX,-FLT_MAX)) < 0.001f) + window_pos_set_by_api = (window->SetWindowPosAllowFlags & g.NextWindowData.PosCond) != 0; + if (window_pos_set_by_api && ImLengthSqr(g.NextWindowData.PosPivotVal) > 0.00001f) { - window->SetWindowPosCenterWanted = true; // May be processed on the next frame if this is our first frame and we are measuring size - window->SetWindowPosAllowFlags &= ~(ImGuiSetCond_Once | ImGuiSetCond_FirstUseEver | ImGuiSetCond_Appearing); + // May be processed on the next frame if this is our first frame and we are measuring size + // FIXME: Look into removing the branch so everything can go through this same code path for consistency. + window->SetWindowPosVal = g.NextWindowData.PosVal; + window->SetWindowPosPivot = g.NextWindowData.PosPivotVal; + window->SetWindowPosAllowFlags &= ~(ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing); } else { - SetWindowPos(window, g.SetNextWindowPosVal, g.SetNextWindowPosCond); + SetWindowPos(window, g.NextWindowData.PosVal, g.NextWindowData.PosCond); } - window->DC.CursorPos = backup_cursor_pos; - g.SetNextWindowPosCond = 0; + g.NextWindowData.PosCond = 0; } - if (g.SetNextWindowSizeCond) + if (g.NextWindowData.SizeCond) { - if (!window_was_active || window_appearing_after_being_hidden) window->SetWindowSizeAllowFlags |= ImGuiSetCond_Appearing; - window_size_set_by_api = (window->SetWindowSizeAllowFlags & g.SetNextWindowSizeCond) != 0; - SetWindowSize(window, g.SetNextWindowSizeVal, g.SetNextWindowSizeCond); - g.SetNextWindowSizeCond = 0; + window_size_x_set_by_api = (window->SetWindowSizeAllowFlags & g.NextWindowData.SizeCond) != 0 && (g.NextWindowData.SizeVal.x > 0.0f); + window_size_y_set_by_api = (window->SetWindowSizeAllowFlags & g.NextWindowData.SizeCond) != 0 && (g.NextWindowData.SizeVal.y > 0.0f); + SetWindowSize(window, g.NextWindowData.SizeVal, g.NextWindowData.SizeCond); + g.NextWindowData.SizeCond = 0; } - if (g.SetNextWindowContentSizeCond) + if (g.NextWindowData.ContentSizeCond) { - window->SizeContentsExplicit = g.SetNextWindowContentSizeVal; - g.SetNextWindowContentSizeCond = 0; + // Adjust passed "client size" to become a "window size" + window->SizeContentsExplicit = g.NextWindowData.ContentSizeVal; + if (window->SizeContentsExplicit.y != 0.0f) + window->SizeContentsExplicit.y += window->TitleBarHeight() + window->MenuBarHeight(); + g.NextWindowData.ContentSizeCond = 0; } else if (first_begin_of_the_frame) { window->SizeContentsExplicit = ImVec2(0.0f, 0.0f); } - if (g.SetNextWindowCollapsedCond) + if (g.NextWindowData.CollapsedCond) { - if (!window_was_active || window_appearing_after_being_hidden) window->SetWindowCollapsedAllowFlags |= ImGuiSetCond_Appearing; - SetWindowCollapsed(window, g.SetNextWindowCollapsedVal, g.SetNextWindowCollapsedCond); - g.SetNextWindowCollapsedCond = 0; + SetWindowCollapsed(window, g.NextWindowData.CollapsedVal, g.NextWindowData.CollapsedCond); + g.NextWindowData.CollapsedCond = 0; } - if (g.SetNextWindowFocus) + if (g.NextWindowData.FocusCond) { - ImGui::SetWindowFocus(); - g.SetNextWindowFocus = false; + SetWindowFocus(); + g.NextWindowData.FocusCond = 0; } - - // Update known root window (if we are a child window, otherwise window == window->RootWindow) - int root_idx, root_non_popup_idx; - for (root_idx = g.CurrentWindowStack.Size - 1; root_idx > 0; root_idx--) - if (!(g.CurrentWindowStack[root_idx]->Flags & ImGuiWindowFlags_ChildWindow)) - break; - for (root_non_popup_idx = root_idx; root_non_popup_idx > 0; root_non_popup_idx--) - if (!(g.CurrentWindowStack[root_non_popup_idx]->Flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_Popup))) - break; - window->ParentWindow = parent_window; - window->RootWindow = g.CurrentWindowStack[root_idx]; - window->RootNonPopupWindow = g.CurrentWindowStack[root_non_popup_idx]; // This is merely for displaying the TitleBgActive color. + if (window->Appearing) + SetWindowConditionAllowFlags(window, ImGuiCond_Appearing, false); // When reusing window again multiple times a frame, just append content (don't need to setup again) if (first_begin_of_the_frame) { + const bool window_is_child_tooltip = (flags & ImGuiWindowFlags_ChildWindow) && (flags & ImGuiWindowFlags_Tooltip); // FIXME-WIP: Undocumented behavior of Child+Tooltip for pinned tooltip (#1345) + + // Initialize + window->ParentWindow = parent_window; + window->RootWindow = window->RootNonPopupWindow = window; + if (parent_window && (flags & ImGuiWindowFlags_ChildWindow) && !window_is_child_tooltip) + window->RootWindow = parent_window->RootWindow; + if (parent_window && !(flags & ImGuiWindowFlags_Modal) && (flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_Popup))) + window->RootNonPopupWindow = parent_window->RootNonPopupWindow; + //window->RootNavWindow = window; + //while (window->RootNavWindow->Flags & ImGuiWindowFlags_NavFlattened) + // window->RootNavWindow = window->RootNavWindow->ParentWindow; + window->Active = true; - window->IndexWithinParent = 0; + window->BeginOrderWithinParent = 0; + window->BeginOrderWithinContext = g.WindowsActiveCount++; window->BeginCount = 0; window->ClipRect = ImVec4(-FLT_MAX,-FLT_MAX,+FLT_MAX,+FLT_MAX); window->LastFrameActive = current_frame; window->IDStack.resize(1); - // Clear draw list, setup texture, outer clipping rectangle - window->DrawList->Clear(); - window->DrawList->PushTextureID(g.Font->ContainerAtlas->TexID); - ImRect fullscreen_rect(GetVisibleRect()); - if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_ComboBox|ImGuiWindowFlags_Popup))) - PushClipRect(parent_window->ClipRect.Min, parent_window->ClipRect.Max, true); - else - PushClipRect(fullscreen_rect.Min, fullscreen_rect.Max, true); - - if (!window_was_active) - { - // Popup first latch mouse position, will position itself when it appears next frame - window->AutoPosLastDirection = -1; - if ((flags & ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api) - window->PosFloat = g.IO.MousePos; - } + // Lock window rounding, border size and rounding so that altering the border sizes for children doesn't have side-effects. + window->WindowRounding = (flags & ImGuiWindowFlags_ChildWindow) ? style.ChildRounding : ((flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupRounding : style.WindowRounding; + window->WindowBorderSize = (flags & ImGuiWindowFlags_ChildWindow) ? style.ChildBorderSize : ((flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupBorderSize : style.WindowBorderSize; + window->WindowPadding = style.WindowPadding; + if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_Popup)) && window->WindowBorderSize == 0.0f) + window->WindowPadding = ImVec2(0.0f, (flags & ImGuiWindowFlags_MenuBar) ? style.WindowPadding.y : 0.0f); // Collapse window by double-clicking on title bar // At this point we don't have a clipping rectangle setup yet, so we can use the title bar area for hit detection and drawing @@ -4018,8 +4606,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us if (g.HoveredWindow == window && IsMouseHoveringRect(title_bar_rect.Min, title_bar_rect.Max) && g.IO.MouseDoubleClicked[0]) { window->Collapsed = !window->Collapsed; - if (!(flags & ImGuiWindowFlags_NoSavedSettings)) - MarkIniSettingsDirty(); + MarkIniSettingsDirty(window); FocusWindow(window); } } @@ -4030,99 +4617,91 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us // SIZE - // Save contents size from last frame for auto-fitting (unless explicitly specified) - window->SizeContents.x = (float)(int)((window->SizeContentsExplicit.x != 0.0f) ? window->SizeContentsExplicit.x : ((window_is_new ? 0.0f : window->DC.CursorMaxPos.x - window->Pos.x) + window->Scroll.x)); - window->SizeContents.y = (float)(int)((window->SizeContentsExplicit.y != 0.0f) ? window->SizeContentsExplicit.y : ((window_is_new ? 0.0f : window->DC.CursorMaxPos.y - window->Pos.y) + window->Scroll.y)); + // Update contents size from last frame for auto-fitting (unless explicitly specified) + window->SizeContents = CalcSizeContents(window); - // Hide popup/tooltip window when first appearing while we measure size (because we recycle them) + // Hide popup/tooltip window when re-opening while we measure size (because we recycle the windows) if (window->HiddenFrames > 0) window->HiddenFrames--; - if ((flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_Tooltip)) != 0 && !window_was_active) + if ((flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_Tooltip)) != 0 && window_just_activated_by_user) { window->HiddenFrames = 1; if (flags & ImGuiWindowFlags_AlwaysAutoResize) { - if (!window_size_set_by_api) - window->Size = window->SizeFull = ImVec2(0.f, 0.f); + if (!window_size_x_set_by_api) + window->Size.x = window->SizeFull.x = 0.f; + if (!window_size_y_set_by_api) + window->Size.y = window->SizeFull.y = 0.f; window->SizeContents = ImVec2(0.f, 0.f); } } - // Lock window padding so that altering the ShowBorders flag for children doesn't have side-effects. - window->WindowPadding = ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_ComboBox | ImGuiWindowFlags_Popup))) ? ImVec2(0,0) : style.WindowPadding; - - // Calculate auto-fit size - ImVec2 size_auto_fit; - if ((flags & ImGuiWindowFlags_Tooltip) != 0) + // Calculate auto-fit size, handle automatic resize + const ImVec2 size_auto_fit = CalcSizeAutoFit(window, window->SizeContents); + ImVec2 size_full_modified(FLT_MAX, FLT_MAX); + if (flags & ImGuiWindowFlags_AlwaysAutoResize && !window->Collapsed) { - // Tooltip always resize. We keep the spacing symmetric on both axises for aesthetic purpose. - size_auto_fit = window->SizeContents + window->WindowPadding - ImVec2(0.0f, style.ItemSpacing.y); + // Using SetNextWindowSize() overrides ImGuiWindowFlags_AlwaysAutoResize, so it can be used on tooltips/popups, etc. + if (!window_size_x_set_by_api) + window->SizeFull.x = size_full_modified.x = size_auto_fit.x; + if (!window_size_y_set_by_api) + window->SizeFull.y = size_full_modified.y = size_auto_fit.y; } - else + else if (window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0) { - size_auto_fit = ImClamp(window->SizeContents + window->WindowPadding, style.WindowMinSize, ImMax(style.WindowMinSize, g.IO.DisplaySize - g.Style.DisplaySafeAreaPadding)); - - // Handling case of auto fit window not fitting in screen on one axis, we are growing auto fit size on the other axis to compensate for expected scrollbar. FIXME: Might turn bigger than DisplaySize-WindowPadding. - if (size_auto_fit.x < window->SizeContents.x && !(flags & ImGuiWindowFlags_NoScrollbar) && (flags & ImGuiWindowFlags_HorizontalScrollbar)) - size_auto_fit.y += style.ScrollbarSize; - if (size_auto_fit.y < window->SizeContents.y && !(flags & ImGuiWindowFlags_NoScrollbar)) - size_auto_fit.x += style.ScrollbarSize; - size_auto_fit.y = ImMax(size_auto_fit.y - style.ItemSpacing.y, 0.0f); - } - - // Handle automatic resize - if (window->Collapsed) - { - // We still process initial auto-fit on collapsed windows to get a window width, - // But otherwise we don't honor ImGuiWindowFlags_AlwaysAutoResize when collapsed. - if (window->AutoFitFramesX > 0) - window->SizeFull.x = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.x, size_auto_fit.x) : size_auto_fit.x; - if (window->AutoFitFramesY > 0) - window->SizeFull.y = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.y, size_auto_fit.y) : size_auto_fit.y; - } - else - { - if ((flags & ImGuiWindowFlags_AlwaysAutoResize) && !window_size_set_by_api) - { - window->SizeFull = size_auto_fit; - } - else if ((window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0) && !window_size_set_by_api) - { - // Auto-fit only grows during the first few frames - if (window->AutoFitFramesX > 0) - window->SizeFull.x = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.x, size_auto_fit.x) : size_auto_fit.x; - if (window->AutoFitFramesY > 0) - window->SizeFull.y = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.y, size_auto_fit.y) : size_auto_fit.y; - if (!(flags & ImGuiWindowFlags_NoSavedSettings)) - MarkIniSettingsDirty(); - } + // Auto-fit only grows during the first few frames + // We still process initial auto-fit on collapsed windows to get a window width, but otherwise don't honor ImGuiWindowFlags_AlwaysAutoResize when collapsed. + if (!window_size_x_set_by_api && window->AutoFitFramesX > 0) + window->SizeFull.x = size_full_modified.x = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.x, size_auto_fit.x) : size_auto_fit.x; + if (!window_size_y_set_by_api && window->AutoFitFramesY > 0) + window->SizeFull.y = size_full_modified.y = window->AutoFitOnlyGrows ? ImMax(window->SizeFull.y, size_auto_fit.y) : size_auto_fit.y; + if (!window->Collapsed) + MarkIniSettingsDirty(window); } // Apply minimum/maximum window size constraints and final size - ApplySizeFullWithConstraint(window, window->SizeFull); - window->Size = window->Collapsed ? window->TitleBarRect().GetSize() : window->SizeFull; - + window->SizeFull = CalcSizeAfterConstraint(window, window->SizeFull); + window->Size = window->Collapsed && !(flags & ImGuiWindowFlags_ChildWindow) ? window->TitleBarRect().GetSize() : window->SizeFull; + + // SCROLLBAR STATUS + + // Update scrollbar status (based on the Size that was effective during last frame or the auto-resized Size). + if (!window->Collapsed) + { + // When reading the current size we need to read it after size constraints have been applied + float size_x_for_scrollbars = size_full_modified.x != FLT_MAX ? window->SizeFull.x : window->SizeFullAtLastBegin.x; + float size_y_for_scrollbars = size_full_modified.y != FLT_MAX ? window->SizeFull.y : window->SizeFullAtLastBegin.y; + window->ScrollbarY = (flags & ImGuiWindowFlags_AlwaysVerticalScrollbar) || ((window->SizeContents.y > size_y_for_scrollbars) && !(flags & ImGuiWindowFlags_NoScrollbar)); + window->ScrollbarX = (flags & ImGuiWindowFlags_AlwaysHorizontalScrollbar) || ((window->SizeContents.x > size_x_for_scrollbars - (window->ScrollbarY ? style.ScrollbarSize : 0.0f)) && !(flags & ImGuiWindowFlags_NoScrollbar) && (flags & ImGuiWindowFlags_HorizontalScrollbar)); + if (window->ScrollbarX && !window->ScrollbarY) + window->ScrollbarY = (window->SizeContents.y > size_y_for_scrollbars - style.ScrollbarSize) && !(flags & ImGuiWindowFlags_NoScrollbar); + window->ScrollbarSizes = ImVec2(window->ScrollbarY ? style.ScrollbarSize : 0.0f, window->ScrollbarX ? style.ScrollbarSize : 0.0f); + } + // POSITION + // Popup latch its initial position, will position itself when it appears next frame + if (window_just_activated_by_user) + { + window->AutoPosLastDirection = ImGuiDir_None; + if ((flags & ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api) + window->Pos = window->PosFloat = g.CurrentPopupStack.back().OpenPopupPos; + } + // Position child window if (flags & ImGuiWindowFlags_ChildWindow) { - window->IndexWithinParent = parent_window->DC.ChildWindows.Size; + window->BeginOrderWithinParent = parent_window->DC.ChildWindows.Size; parent_window->DC.ChildWindows.push_back(window); - } - if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup)) - { - window->Pos = window->PosFloat = parent_window->DC.CursorPos; - window->Size = window->SizeFull = size_on_first_use; // NB: argument name 'size_on_first_use' misleading here, it's really just 'size' as provided by user passed via BeginChild()->Begin(). + if (!(flags & ImGuiWindowFlags_Popup) && !window_pos_set_by_api && !window_is_child_tooltip) + window->Pos = window->PosFloat = parent_window->DC.CursorPos; } - bool window_pos_center = false; - window_pos_center |= (window->SetWindowPosCenterWanted && window->HiddenFrames == 0); - window_pos_center |= ((flags & ImGuiWindowFlags_Modal) && !window_pos_set_by_api && window_appearing_after_being_hidden); - if (window_pos_center) + const bool window_pos_with_pivot = (window->SetWindowPosVal.x != FLT_MAX && window->HiddenFrames == 0); + if (window_pos_with_pivot) { - // Center (any sort of window) - SetWindowPos(window, ImMax(style.DisplaySafeAreaPadding, fullscreen_rect.GetCenter() - window->SizeFull * 0.5f), 0); + // Position given a pivot (e.g. for centering) + SetWindowPos(window, ImMax(style.DisplaySafeAreaPadding, window->SetWindowPosVal - window->SizeFull * window->SetWindowPosPivot), 0); } else if (flags & ImGuiWindowFlags_ChildMenu) { @@ -4130,26 +4709,28 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us // This is how we end up with child menus appearing (most-commonly) on the right of the parent menu. IM_ASSERT(window_pos_set_by_api); float horizontal_overlap = style.ItemSpacing.x; // We want some overlap to convey the relative depth of each popup (currently the amount of overlap it is hard-coded to style.ItemSpacing.x, may need to introduce another style value). + ImGuiWindow* parent_menu = parent_window_in_stack; ImRect rect_to_avoid; - if (parent_window->DC.MenuBarAppending) - rect_to_avoid = ImRect(-FLT_MAX, parent_window->Pos.y + parent_window->TitleBarHeight(), FLT_MAX, parent_window->Pos.y + parent_window->TitleBarHeight() + parent_window->MenuBarHeight()); + if (parent_menu->DC.MenuBarAppending) + rect_to_avoid = ImRect(-FLT_MAX, parent_menu->Pos.y + parent_menu->TitleBarHeight(), FLT_MAX, parent_menu->Pos.y + parent_menu->TitleBarHeight() + parent_menu->MenuBarHeight()); else - rect_to_avoid = ImRect(parent_window->Pos.x + horizontal_overlap, -FLT_MAX, parent_window->Pos.x + parent_window->Size.x - horizontal_overlap - parent_window->ScrollbarSizes.x, FLT_MAX); - window->PosFloat = FindBestPopupWindowPos(window->PosFloat, window->Size, &window->AutoPosLastDirection, rect_to_avoid); + rect_to_avoid = ImRect(parent_menu->Pos.x + horizontal_overlap, -FLT_MAX, parent_menu->Pos.x + parent_menu->Size.x - horizontal_overlap - parent_menu->ScrollbarSizes.x, FLT_MAX); + window->PosFloat = FindBestWindowPosForPopup(window->PosFloat, window->Size, &window->AutoPosLastDirection, rect_to_avoid); } - else if ((flags & ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api && window_appearing_after_being_hidden) + else if ((flags & ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api && window_just_appearing_after_hidden_for_resize) { ImRect rect_to_avoid(window->PosFloat.x - 1, window->PosFloat.y - 1, window->PosFloat.x + 1, window->PosFloat.y + 1); - window->PosFloat = FindBestPopupWindowPos(window->PosFloat, window->Size, &window->AutoPosLastDirection, rect_to_avoid); + window->PosFloat = FindBestWindowPosForPopup(window->PosFloat, window->Size, &window->AutoPosLastDirection, rect_to_avoid); } // Position tooltip (always follows mouse) - if ((flags & ImGuiWindowFlags_Tooltip) != 0 && !window_pos_set_by_api) + if ((flags & ImGuiWindowFlags_Tooltip) != 0 && !window_pos_set_by_api && !window_is_child_tooltip) { - ImRect rect_to_avoid(g.IO.MousePos.x - 16, g.IO.MousePos.y - 8, g.IO.MousePos.x + 24, g.IO.MousePos.y + 24); // FIXME: Completely hard-coded. Perhaps center on cursor hit-point instead? - window->PosFloat = FindBestPopupWindowPos(g.IO.MousePos, window->Size, &window->AutoPosLastDirection, rect_to_avoid); - if (window->AutoPosLastDirection == -1) - window->PosFloat = g.IO.MousePos + ImVec2(2,2); // If there's not enough room, for tooltip we prefer avoiding the cursor at all cost even if it means that part of the tooltip won't be visible. + ImVec2 ref_pos = g.IO.MousePos; + ImRect rect_to_avoid(ref_pos.x - 16, ref_pos.y - 8, ref_pos.x + 24, ref_pos.y + 24); // FIXME: Completely hard-coded. Store boxes in mouse cursor data? Scale? Center on cursor hit-point? + window->PosFloat = FindBestWindowPosForPopup(ref_pos, window->Size, &window->AutoPosLastDirection, rect_to_avoid); + if (window->AutoPosLastDirection == ImGuiDir_None) + window->PosFloat = ref_pos + ImVec2(2,2); // If there's not enough room, for tooltip we prefer avoiding the cursor at all cost even if it means that part of the tooltip won't be visible. } // Clamp position so it stays visible @@ -4162,7 +4743,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us window->PosFloat = ImMin(window->PosFloat, g.IO.DisplaySize - padding); } } - window->Pos = ImVec2((float)(int)window->PosFloat.x, (float)(int)window->PosFloat.y); + window->Pos = ImFloor(window->PosFloat); // Default item width. Make it proportional to window size if window manually resizes if (window->Size.x > 0.0f && !(flags & ImGuiWindowFlags_Tooltip) && !(flags & ImGuiWindowFlags_AlwaysAutoResize)) @@ -4177,131 +4758,112 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us window->FocusIdxAllRequestNext = window->FocusIdxTabRequestNext = INT_MAX; // Apply scrolling - if (window->ScrollTarget.x < FLT_MAX) - { - window->Scroll.x = window->ScrollTarget.x; - window->ScrollTarget.x = FLT_MAX; - } - if (window->ScrollTarget.y < FLT_MAX) - { - float center_ratio = window->ScrollTargetCenterRatio.y; - window->Scroll.y = window->ScrollTarget.y - ((1.0f - center_ratio) * (window->TitleBarHeight() + window->MenuBarHeight())) - (center_ratio * window->SizeFull.y); - window->ScrollTarget.y = FLT_MAX; - } - window->Scroll = ImMax(window->Scroll, ImVec2(0.0f, 0.0f)); - if (!window->Collapsed && !window->SkipItems) - window->Scroll = ImMin(window->Scroll, ImMax(ImVec2(0.0f, 0.0f), window->SizeContents - window->SizeFull + window->ScrollbarSizes)); + window->Scroll = CalcNextScrollFromScrollTargetAndClamp(window); + window->ScrollTarget = ImVec2(FLT_MAX, FLT_MAX); - // Modal window darkens what is behind them + // Apply focus, new windows appears in front + bool want_focus = false; + if (window_just_activated_by_user && !(flags & ImGuiWindowFlags_NoFocusOnAppearing)) + if (!(flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_Tooltip)) || (flags & ImGuiWindowFlags_Popup)) + want_focus = true; + + // Handle manual resize: Resize Grips, Borders, Gamepad + int border_held = -1; + ImU32 resize_grip_col[4] = { 0 }; + const int resize_grip_count = (flags & ImGuiWindowFlags_ResizeFromAnySide) ? 2 : 1; // 4 + const float grip_draw_size = (float)(int)ImMax(g.FontSize * 1.35f, window->WindowRounding + 1.0f + g.FontSize * 0.2f); + if (!window->Collapsed) + UpdateManualResize(window, size_auto_fit, &border_held, resize_grip_count, &resize_grip_col[0]); + + // DRAWING + + // Setup draw list and outer clipping rectangle + window->DrawList->Clear(); + window->DrawList->Flags = (g.Style.AntiAliasedLines ? ImDrawListFlags_AntiAliasedLines : 0) | (g.Style.AntiAliasedFill ? ImDrawListFlags_AntiAliasedFill : 0); + window->DrawList->PushTextureID(g.Font->ContainerAtlas->TexID); + ImRect viewport_rect(GetViewportRect()); + if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup) && !window_is_child_tooltip) + PushClipRect(parent_window->ClipRect.Min, parent_window->ClipRect.Max, true); + else + PushClipRect(viewport_rect.Min, viewport_rect.Max, true); + + // Draw modal window background (darkens what is behind them) if ((flags & ImGuiWindowFlags_Modal) != 0 && window == GetFrontMostModalRootWindow()) - window->DrawList->AddRectFilled(fullscreen_rect.Min, fullscreen_rect.Max, GetColorU32(ImGuiCol_ModalWindowDarkening, g.ModalWindowDarkeningRatio)); + window->DrawList->AddRectFilled(viewport_rect.Min, viewport_rect.Max, GetColorU32(ImGuiCol_ModalWindowDarkening, g.ModalWindowDarkeningRatio)); // Draw window + handle manual resize + const float window_rounding = window->WindowRounding; + const float window_border_size = window->WindowBorderSize; ImRect title_bar_rect = window->TitleBarRect(); - const float window_rounding = (flags & ImGuiWindowFlags_ChildWindow) ? style.ChildWindowRounding : style.WindowRounding; + const bool window_is_focused = want_focus || (g.NavWindow && window->RootNonPopupWindow == g.NavWindow->RootNonPopupWindow); if (window->Collapsed) { - // Draw title bar only - RenderFrame(title_bar_rect.GetTL(), title_bar_rect.GetBR(), GetColorU32(ImGuiCol_TitleBgCollapsed), true, window_rounding); + // Title bar only + float backup_border_size = style.FrameBorderSize; + g.Style.FrameBorderSize = window->WindowBorderSize; + RenderFrame(title_bar_rect.Min, title_bar_rect.Max, GetColorU32(ImGuiCol_TitleBgCollapsed), true, window_rounding); + g.Style.FrameBorderSize = backup_border_size; } else { - ImU32 resize_col = 0; - const float resize_corner_size = ImMax(g.FontSize * 1.35f, window_rounding + 1.0f + g.FontSize * 0.2f); - if (!(flags & ImGuiWindowFlags_AlwaysAutoResize) && window->AutoFitFramesX <= 0 && window->AutoFitFramesY <= 0 && !(flags & ImGuiWindowFlags_NoResize)) + // Window background + ImU32 bg_col = GetColorU32(GetWindowBgColorIdxFromFlags(flags)); + if (g.NextWindowData.BgAlphaCond != 0) { - // Manual resize - const ImVec2 br = window->Rect().GetBR(); - const ImRect resize_rect(br - ImVec2(resize_corner_size * 0.75f, resize_corner_size * 0.75f), br); - const ImGuiID resize_id = window->GetID("#RESIZE"); - bool hovered, held; - ButtonBehavior(resize_rect, resize_id, &hovered, &held, ImGuiButtonFlags_FlattenChilds); - resize_col = GetColorU32(held ? ImGuiCol_ResizeGripActive : hovered ? ImGuiCol_ResizeGripHovered : ImGuiCol_ResizeGrip); - - if (hovered || held) - g.MouseCursor = ImGuiMouseCursor_ResizeNWSE; - - if (g.HoveredWindow == window && held && g.IO.MouseDoubleClicked[0]) - { - // Manual auto-fit when double-clicking - ApplySizeFullWithConstraint(window, size_auto_fit); - if (!(flags & ImGuiWindowFlags_NoSavedSettings)) - MarkIniSettingsDirty(); - ClearActiveID(); - } - else if (held) - { - // We don't use an incremental MouseDelta but rather compute an absolute target size based on mouse position - ApplySizeFullWithConstraint(window, (g.IO.MousePos - g.ActiveIdClickOffset + resize_rect.GetSize()) - window->Pos); - if (!(flags & ImGuiWindowFlags_NoSavedSettings)) - MarkIniSettingsDirty(); - } - - window->Size = window->SizeFull; - title_bar_rect = window->TitleBarRect(); + bg_col = (bg_col & ~IM_COL32_A_MASK) | (IM_F32_TO_INT8_SAT(g.NextWindowData.BgAlphaVal) << IM_COL32_A_SHIFT); + g.NextWindowData.BgAlphaCond = 0; } - - // Scrollbars - window->ScrollbarY = (flags & ImGuiWindowFlags_AlwaysVerticalScrollbar) || ((window->SizeContents.y > window->Size.y + style.ItemSpacing.y) && !(flags & ImGuiWindowFlags_NoScrollbar)); - window->ScrollbarX = (flags & ImGuiWindowFlags_AlwaysHorizontalScrollbar) || ((window->SizeContents.x > window->Size.x - (window->ScrollbarY ? style.ScrollbarSize : 0.0f) - window->WindowPadding.x) && !(flags & ImGuiWindowFlags_NoScrollbar) && (flags & ImGuiWindowFlags_HorizontalScrollbar)); - window->ScrollbarSizes = ImVec2(window->ScrollbarY ? style.ScrollbarSize : 0.0f, window->ScrollbarX ? style.ScrollbarSize : 0.0f); - window->BorderSize = (flags & ImGuiWindowFlags_ShowBorders) ? 1.0f : 0.0f; - - // Window background, Default Alpha - ImGuiCol bg_color_idx = ImGuiCol_WindowBg; - if ((flags & ImGuiWindowFlags_ComboBox) != 0) - bg_color_idx = ImGuiCol_ComboBg; - else if ((flags & ImGuiWindowFlags_Tooltip) != 0 || (flags & ImGuiWindowFlags_Popup) != 0) - bg_color_idx = ImGuiCol_PopupBg; - else if ((flags & ImGuiWindowFlags_ChildWindow) != 0) - bg_color_idx = ImGuiCol_ChildWindowBg; - ImVec4 bg_color = style.Colors[bg_color_idx]; - if (bg_alpha >= 0.0f) - bg_color.w = bg_alpha; - bg_color.w *= style.Alpha; - if (bg_color.w > 0.0f) - window->DrawList->AddRectFilled(window->Pos+ImVec2(0,window->TitleBarHeight()), window->Pos+window->Size, ColorConvertFloat4ToU32(bg_color), window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? ImGuiCorner_All : ImGuiCorner_BottomLeft|ImGuiCorner_BottomRight); + window->DrawList->AddRectFilled(window->Pos+ImVec2(0,window->TitleBarHeight()), window->Pos+window->Size, bg_col, window_rounding, (flags & ImGuiWindowFlags_NoTitleBar) ? ImDrawCornerFlags_All : ImDrawCornerFlags_Bot); // Title bar if (!(flags & ImGuiWindowFlags_NoTitleBar)) - window->DrawList->AddRectFilled(title_bar_rect.GetTL(), title_bar_rect.GetBR(), GetColorU32((g.FocusedWindow && window->RootNonPopupWindow == g.FocusedWindow->RootNonPopupWindow) ? ImGuiCol_TitleBgActive : ImGuiCol_TitleBg), window_rounding, ImGuiCorner_TopLeft|ImGuiCorner_TopRight); + window->DrawList->AddRectFilled(title_bar_rect.Min, title_bar_rect.Max, GetColorU32(window_is_focused ? ImGuiCol_TitleBgActive : ImGuiCol_TitleBg), window_rounding, ImDrawCornerFlags_Top); // Menu bar if (flags & ImGuiWindowFlags_MenuBar) { ImRect menu_bar_rect = window->MenuBarRect(); - if (flags & ImGuiWindowFlags_ShowBorders) - window->DrawList->AddLine(menu_bar_rect.GetBL(), menu_bar_rect.GetBR(), GetColorU32(ImGuiCol_Border)); - window->DrawList->AddRectFilled(menu_bar_rect.GetTL(), menu_bar_rect.GetBR(), GetColorU32(ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0.0f, ImGuiCorner_TopLeft|ImGuiCorner_TopRight); + menu_bar_rect.ClipWith(window->Rect()); // Soft clipping, in particular child window don't have minimum size covering the menu bar so this is useful for them. + window->DrawList->AddRectFilled(menu_bar_rect.Min, menu_bar_rect.Max, GetColorU32(ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0.0f, ImDrawCornerFlags_Top); + if (style.FrameBorderSize > 0.0f && menu_bar_rect.Max.y < window->Pos.y + window->Size.y) + window->DrawList->AddLine(menu_bar_rect.GetBL(), menu_bar_rect.GetBR(), GetColorU32(ImGuiCol_Border), style.FrameBorderSize); } // Scrollbars if (window->ScrollbarX) - Scrollbar(window, true); + Scrollbar(ImGuiLayoutType_Horizontal); if (window->ScrollbarY) - Scrollbar(window, false); + Scrollbar(ImGuiLayoutType_Vertical); - // Render resize grip - // (after the input handling so we don't have a frame of latency) + // Render resize grips (after their input handling so we don't have a frame of latency) if (!(flags & ImGuiWindowFlags_NoResize)) { - const ImVec2 br = window->Rect().GetBR(); - window->DrawList->PathLineTo(br + ImVec2(-resize_corner_size, -window->BorderSize)); - window->DrawList->PathLineTo(br + ImVec2(-window->BorderSize, -resize_corner_size)); - window->DrawList->PathArcToFast(ImVec2(br.x - window_rounding - window->BorderSize, br.y - window_rounding - window->BorderSize), window_rounding, 0, 3); - window->DrawList->PathFill(resize_col); + for (int resize_grip_n = 0; resize_grip_n < resize_grip_count; resize_grip_n++) + { + const ImGuiResizeGripDef& grip = resize_grip_def[resize_grip_n]; + const ImVec2 corner = ImLerp(window->Pos, window->Pos + window->Size, grip.CornerPos); + window->DrawList->PathLineTo(corner + grip.InnerDir * ((resize_grip_n & 1) ? ImVec2(window_border_size, grip_draw_size) : ImVec2(grip_draw_size, window_border_size))); + window->DrawList->PathLineTo(corner + grip.InnerDir * ((resize_grip_n & 1) ? ImVec2(grip_draw_size, window_border_size) : ImVec2(window_border_size, grip_draw_size))); + window->DrawList->PathArcToFast(ImVec2(corner.x + grip.InnerDir.x * (window_rounding + window_border_size), corner.y + grip.InnerDir.y * (window_rounding + window_border_size)), window_rounding, grip.AngleMin12, grip.AngleMax12); + window->DrawList->PathFillConvex(resize_grip_col[resize_grip_n]); + } } // Borders - if (flags & ImGuiWindowFlags_ShowBorders) + if (window_border_size > 0.0f) + window->DrawList->AddRect(window->Pos, window->Pos+window->Size, GetColorU32(ImGuiCol_Border), window_rounding, ImDrawCornerFlags_All, window_border_size); + if (border_held != -1) { - window->DrawList->AddRect(window->Pos+ImVec2(1,1), window->Pos+window->Size+ImVec2(1,1), GetColorU32(ImGuiCol_BorderShadow), window_rounding); - window->DrawList->AddRect(window->Pos, window->Pos+window->Size, GetColorU32(ImGuiCol_Border), window_rounding); - if (!(flags & ImGuiWindowFlags_NoTitleBar)) - window->DrawList->AddLine(title_bar_rect.GetBL()+ImVec2(1,0), title_bar_rect.GetBR()-ImVec2(1,0), GetColorU32(ImGuiCol_Border)); + ImRect border = GetBorderRect(window, border_held, grip_draw_size, 0.0f); + window->DrawList->AddLine(border.Min, border.Max, GetColorU32(ImGuiCol_SeparatorActive), ImMax(1.0f, window_border_size)); } + if (style.FrameBorderSize > 0 && !(flags & ImGuiWindowFlags_NoTitleBar)) + window->DrawList->AddLine(title_bar_rect.GetBL() + ImVec2(style.WindowBorderSize, -1), title_bar_rect.GetBR() + ImVec2(-style.WindowBorderSize,-1), GetColorU32(ImGuiCol_Border), style.FrameBorderSize); } + // Store a backup of SizeFull which we will use next frame to decide if we need scrollbars. + window->SizeFullAtLastBegin = window->SizeFull; + // Update ContentsRegionMax. All the variable it depends on are set above in this function. window->ContentsRegionRect.Min.x = -window->Scroll.x + window->WindowPadding.x; window->ContentsRegionRect.Min.y = -window->Scroll.y + window->WindowPadding.y + window->TitleBarHeight() + window->MenuBarHeight(); @@ -4309,6 +4871,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us window->ContentsRegionRect.Max.y = -window->Scroll.y - window->WindowPadding.y + (window->SizeContentsExplicit.y != 0.0f ? window->SizeContentsExplicit.y : (window->Size.y - window->ScrollbarSizes.y)); // Setup drawing context + // (NB: That term "drawing context / DC" lost its meaning a long time ago. Initially was meant to hold transient data only. Nowadays difference between window-> and window->DC-> is dubious.) window->DC.IndentX = 0.0f + window->WindowPadding.x - window->Scroll.x; window->DC.GroupOffsetX = 0.0f; window->DC.ColumnsOffsetX = 0.0f; @@ -4323,65 +4886,67 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us window->DC.LogLinePosY = window->DC.CursorPos.y - 9999.0f; window->DC.ChildWindows.resize(0); window->DC.LayoutType = ImGuiLayoutType_Vertical; + window->DC.ItemFlags = ImGuiItemFlags_Default_; window->DC.ItemWidth = window->ItemWidthDefault; window->DC.TextWrapPos = -1.0f; // disabled - window->DC.AllowKeyboardFocus = true; - window->DC.ButtonRepeat = false; + window->DC.ItemFlagsStack.resize(0); window->DC.ItemWidthStack.resize(0); - window->DC.AllowKeyboardFocusStack.resize(0); - window->DC.ButtonRepeatStack.resize(0); window->DC.TextWrapPosStack.resize(0); - window->DC.ColumnsCurrent = 0; - window->DC.ColumnsCount = 1; - window->DC.ColumnsStartPosY = window->DC.CursorPos.y; - window->DC.ColumnsCellMinY = window->DC.ColumnsCellMaxY = window->DC.ColumnsStartPosY; + window->DC.ColumnsSet = NULL; window->DC.TreeDepth = 0; window->DC.StateStorage = &window->StateStorage; window->DC.GroupStack.resize(0); - window->DC.ColorEditMode = ImGuiColorEditMode_UserSelect; - window->MenuColumns.Update(3, style.ItemSpacing.x, !window_was_active); + window->MenuColumns.Update(3, style.ItemSpacing.x, window_just_activated_by_user); + + if ((flags & ImGuiWindowFlags_ChildWindow) && (window->DC.ItemFlags != parent_window->DC.ItemFlags)) + { + window->DC.ItemFlags = parent_window->DC.ItemFlags; + window->DC.ItemFlagsStack.push_back(window->DC.ItemFlags); + } if (window->AutoFitFramesX > 0) window->AutoFitFramesX--; if (window->AutoFitFramesY > 0) window->AutoFitFramesY--; - // New windows appears in front (we need to do that AFTER setting DC.CursorStartPos so our initial navigation reference rectangle can start around there) - if (!window_was_active && !(flags & ImGuiWindowFlags_NoFocusOnAppearing)) - if (!(flags & (ImGuiWindowFlags_ChildWindow|ImGuiWindowFlags_Tooltip)) || (flags & ImGuiWindowFlags_Popup)) - FocusWindow(window); + // Apply focus (we need to call FocusWindow() AFTER setting DC.CursorStartPos so our initial navigation reference rectangle can start around there) + if (want_focus) + FocusWindow(window); // Title bar if (!(flags & ImGuiWindowFlags_NoTitleBar)) { + // Collapse button + if (!(flags & ImGuiWindowFlags_NoCollapse)) + { + RenderTriangle(window->Pos + style.FramePadding, window->Collapsed ? ImGuiDir_Right : ImGuiDir_Down, 1.0f); + } + + // Close button if (p_open != NULL) { - const float pad = 2.0f; - const float rad = (window->TitleBarHeight() - pad*2.0f) * 0.5f; - if (CloseButton(window->GetID("#CLOSE"), window->Rect().GetTR() + ImVec2(-pad - rad, pad + rad), rad)) + const float PAD = 2.0f; + const float rad = (window->TitleBarHeight() - PAD*2.0f) * 0.5f; + if (CloseButton(window->GetID("#CLOSE"), window->Rect().GetTR() + ImVec2(-PAD - rad, PAD + rad), rad)) *p_open = false; } - const ImVec2 text_size = CalcTextSize(name, NULL, true); - if (!(flags & ImGuiWindowFlags_NoCollapse)) - RenderCollapseTriangle(window->Pos + style.FramePadding, !window->Collapsed, 1.0f); - - ImVec2 text_min = window->Pos; - ImVec2 text_max = window->Pos + ImVec2(window->Size.x, style.FramePadding.y*2 + text_size.y); - ImRect clip_rect; - clip_rect.Max = ImVec2(window->Pos.x + window->Size.x - (p_open ? title_bar_rect.GetHeight() - 3 : style.FramePadding.x), text_max.y); // Match the size of CloseWindowButton() + // Title text (FIXME: refactor text alignment facilities along with RenderText helpers) + ImVec2 text_size = CalcTextSize(name, NULL, true); + ImRect text_r = title_bar_rect; float pad_left = (flags & ImGuiWindowFlags_NoCollapse) == 0 ? (style.FramePadding.x + g.FontSize + style.ItemInnerSpacing.x) : style.FramePadding.x; float pad_right = (p_open != NULL) ? (style.FramePadding.x + g.FontSize + style.ItemInnerSpacing.x) : style.FramePadding.x; if (style.WindowTitleAlign.x > 0.0f) pad_right = ImLerp(pad_right, pad_left, style.WindowTitleAlign.x); - text_min.x += pad_left; - text_max.x -= pad_right; - clip_rect.Min = ImVec2(text_min.x, window->Pos.y); - RenderTextClipped(text_min, text_max, name, NULL, &text_size, style.WindowTitleAlign, &clip_rect); + text_r.Min.x += pad_left; + text_r.Max.x -= pad_right; + ImRect clip_rect = text_r; + clip_rect.Max.x = window->Pos.x + window->Size.x - (p_open ? title_bar_rect.GetHeight() - 3 : style.FramePadding.x); // Match the size of CloseButton() + RenderTextClipped(text_r.Min, text_r.Max, name, NULL, &text_size, style.WindowTitleAlign, &clip_rect); } // Save clipped aabb so we can access it in constant-time in FindHoveredWindow() window->WindowRectClipped = window->Rect(); - window->WindowRectClipped.Clip(window->ClipRect); + window->WindowRectClipped.ClipWith(window->ClipRect); // Pressing CTRL+C while holding on a window copy its content to the clipboard // This works but 1. doesn't handle multiple Begin/End pairs, 2. recursing into another Begin/End pair - so we need to work that out and add better logging scope. @@ -4391,25 +4956,38 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us if (g.IO.KeyCtrl && IsKeyPressedMap(ImGuiKey_C)) ImGui::LogToClipboard(); */ + + // Inner rectangle + // We set this up after processing the resize grip so that our clip rectangle doesn't lag by a frame + // Note that if our window is collapsed we will end up with a null clipping rectangle which is the correct behavior. + window->InnerRect.Min.x = title_bar_rect.Min.x + window->WindowBorderSize; + window->InnerRect.Min.y = title_bar_rect.Max.y + window->MenuBarHeight() + (((flags & ImGuiWindowFlags_MenuBar) || !(flags & ImGuiWindowFlags_NoTitleBar)) ? style.FrameBorderSize : window->WindowBorderSize); + window->InnerRect.Max.x = window->Pos.x + window->Size.x - window->ScrollbarSizes.x - window->WindowBorderSize; + window->InnerRect.Max.y = window->Pos.y + window->Size.y - window->ScrollbarSizes.y - window->WindowBorderSize; + //window->DrawList->AddRect(window->InnerRect.Min, window->InnerRect.Max, IM_COL32_WHITE); + + // After Begin() we fill the last item / hovered data using the title bar data. Make that a standard behavior (to allow usage of context menus on title bar only, etc.). + window->DC.LastItemId = window->MoveId; + window->DC.LastItemRect = title_bar_rect; + window->DC.LastItemRectHoveredRect = IsMouseHoveringRect(title_bar_rect.Min, title_bar_rect.Max, false); } // Inner clipping rectangle - // We set this up after processing the resize grip so that our clip rectangle doesn't lag by a frame - // Note that if our window is collapsed we will end up with a null clipping rectangle which is the correct behavior. - const ImRect title_bar_rect = window->TitleBarRect(); - const float border_size = window->BorderSize; - ImRect clip_rect; // Force round to ensure that e.g. (int)(max.x-min.x) in user's render code produce correct result. - clip_rect.Min.x = ImFloor(0.5f + title_bar_rect.Min.x + ImMax(border_size, ImFloor(window->WindowPadding.x*0.5f))); - clip_rect.Min.y = ImFloor(0.5f + title_bar_rect.Max.y + window->MenuBarHeight() + border_size); - clip_rect.Max.x = ImFloor(0.5f + window->Pos.x + window->Size.x - window->ScrollbarSizes.x - ImMax(border_size, ImFloor(window->WindowPadding.x*0.5f))); - clip_rect.Max.y = ImFloor(0.5f + window->Pos.y + window->Size.y - window->ScrollbarSizes.y - border_size); + // Force round operator last to ensure that e.g. (int)(max.x-min.x) in user's render code produce correct result. + const float border_size = window->WindowBorderSize; + ImRect clip_rect; + clip_rect.Min.x = ImFloor(0.5f + window->InnerRect.Min.x + ImMax(0.0f, ImFloor(window->WindowPadding.x*0.5f - border_size))); + clip_rect.Min.y = ImFloor(0.5f + window->InnerRect.Min.y); + clip_rect.Max.x = ImFloor(0.5f + window->InnerRect.Max.x - ImMax(0.0f, ImFloor(window->WindowPadding.x*0.5f - border_size))); + clip_rect.Max.y = ImFloor(0.5f + window->InnerRect.Max.y); PushClipRect(clip_rect.Min, clip_rect.Max, true); - // Clear 'accessed' flag last thing + // Clear 'accessed' flag last thing (After PushClipRect which will set the flag. We want the flag to stay false when the default "Debug" window is unused) if (first_begin_of_the_frame) - window->Accessed = false; + window->WriteAccessed = false; + window->BeginCount++; - g.SetNextWindowSizeConstraint = false; + g.NextWindowData.SizeConstraintCond = 0; // Child window can be out of sight and have "negative" clip windows. // Mark them as collapsed so commands are skipped earlier (we can't manually collapse because they have no title bar). @@ -4434,12 +5012,29 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us return !window->SkipItems; } +// Old Begin() API with 5 parameters, avoid calling this version directly! Use SetNextWindowSize()/SetNextWindowBgAlpha() + Begin() instead. +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS +bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_first_use, float bg_alpha_override, ImGuiWindowFlags flags) +{ + // Old API feature: we could pass the initial window size as a parameter. This was misleading because it only had an effect if the window didn't have data in the .ini file. + if (size_first_use.x != 0.0f || size_first_use.y != 0.0f) + ImGui::SetNextWindowSize(size_first_use, ImGuiCond_FirstUseEver); + + // Old API feature: override the window background alpha with a parameter. + if (bg_alpha_override >= 0.0f) + ImGui::SetNextWindowBgAlpha(bg_alpha_override); + + return ImGui::Begin(name, p_open, flags); +} +#endif // IMGUI_DISABLE_OBSOLETE_FUNCTIONS + void ImGui::End() { ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; - Columns(1, "#CloseColumns"); + if (window->DC.ColumnsSet != NULL) + EndColumns(); PopClipRect(); // inner window clip rectangle // Stop logging @@ -4460,9 +5055,12 @@ void ImGui::End() // - We handle absolute seeking (when first clicking outside the grab) and relative manipulation (afterward or when clicking inside the grab) // - We store values as normalized ratio and in a form that allows the window content to change while we are holding on a scrollbar // - We handle both horizontal and vertical scrollbars, which makes the terminology not ideal. -static void Scrollbar(ImGuiWindow* window, bool horizontal) +void ImGui::Scrollbar(ImGuiLayoutType direction) { ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; + + const bool horizontal = (direction == ImGuiLayoutType_Horizontal); const ImGuiStyle& style = g.Style; const ImGuiID id = window->GetID(horizontal ? "#SCROLLX" : "#SCROLLY"); @@ -4470,38 +5068,41 @@ static void Scrollbar(ImGuiWindow* window, bool horizontal) bool other_scrollbar = (horizontal ? window->ScrollbarY : window->ScrollbarX); float other_scrollbar_size_w = other_scrollbar ? style.ScrollbarSize : 0.0f; const ImRect window_rect = window->Rect(); - const float border_size = window->BorderSize; + const float border_size = window->WindowBorderSize; ImRect bb = horizontal ? ImRect(window->Pos.x + border_size, window_rect.Max.y - style.ScrollbarSize, window_rect.Max.x - other_scrollbar_size_w - border_size, window_rect.Max.y - border_size) : ImRect(window_rect.Max.x - style.ScrollbarSize, window->Pos.y + border_size, window_rect.Max.x - border_size, window_rect.Max.y - other_scrollbar_size_w - border_size); if (!horizontal) bb.Min.y += window->TitleBarHeight() + ((window->Flags & ImGuiWindowFlags_MenuBar) ? window->MenuBarHeight() : 0.0f); + if (bb.GetWidth() <= 0.0f || bb.GetHeight() <= 0.0f) + return; - float window_rounding = (window->Flags & ImGuiWindowFlags_ChildWindow) ? style.ChildWindowRounding : style.WindowRounding; int window_rounding_corners; if (horizontal) - window_rounding_corners = ImGuiCorner_BottomLeft | (other_scrollbar ? 0 : ImGuiCorner_BottomRight); + window_rounding_corners = ImDrawCornerFlags_BotLeft | (other_scrollbar ? 0 : ImDrawCornerFlags_BotRight); else - window_rounding_corners = (((window->Flags & ImGuiWindowFlags_NoTitleBar) && !(window->Flags & ImGuiWindowFlags_MenuBar)) ? ImGuiCorner_TopRight : 0) | (other_scrollbar ? 0 : ImGuiCorner_BottomRight); - window->DrawList->AddRectFilled(bb.Min, bb.Max, ImGui::GetColorU32(ImGuiCol_ScrollbarBg), window_rounding, window_rounding_corners); - bb.Reduce(ImVec2(ImClamp((float)(int)((bb.Max.x - bb.Min.x - 2.0f) * 0.5f), 0.0f, 3.0f), ImClamp((float)(int)((bb.Max.y - bb.Min.y - 2.0f) * 0.5f), 0.0f, 3.0f))); + window_rounding_corners = (((window->Flags & ImGuiWindowFlags_NoTitleBar) && !(window->Flags & ImGuiWindowFlags_MenuBar)) ? ImDrawCornerFlags_TopRight : 0) | (other_scrollbar ? 0 : ImDrawCornerFlags_BotRight); + window->DrawList->AddRectFilled(bb.Min, bb.Max, GetColorU32(ImGuiCol_ScrollbarBg), window->WindowRounding, window_rounding_corners); + bb.Expand(ImVec2(-ImClamp((float)(int)((bb.Max.x - bb.Min.x - 2.0f) * 0.5f), 0.0f, 3.0f), -ImClamp((float)(int)((bb.Max.y - bb.Min.y - 2.0f) * 0.5f), 0.0f, 3.0f))); - // V denote the main axis of the scrollbar + // V denote the main, longer axis of the scrollbar (= height for a vertical scrollbar) float scrollbar_size_v = horizontal ? bb.GetWidth() : bb.GetHeight(); float scroll_v = horizontal ? window->Scroll.x : window->Scroll.y; - float win_size_avail_v = (horizontal ? window->Size.x : window->Size.y) - other_scrollbar_size_w; + float win_size_avail_v = (horizontal ? window->SizeFull.x : window->SizeFull.y) - other_scrollbar_size_w; float win_size_contents_v = horizontal ? window->SizeContents.x : window->SizeContents.y; - // The grabable box size generally represent the amount visible (vs the total scrollable amount) + // Calculate the height of our grabbable box. It generally represent the amount visible (vs the total scrollable amount) // But we maintain a minimum size in pixel to allow for the user to still aim inside. - const float grab_h_pixels = ImMin(ImMax(scrollbar_size_v * ImSaturate(win_size_avail_v / ImMax(win_size_contents_v, win_size_avail_v)), style.GrabMinSize), scrollbar_size_v); + IM_ASSERT(ImMax(win_size_contents_v, win_size_avail_v) > 0.0f); // Adding this assert to check if the ImMax(XXX,1.0f) is still needed. PLEASE CONTACT ME if this triggers. + const float win_size_v = ImMax(ImMax(win_size_contents_v, win_size_avail_v), 1.0f); + const float grab_h_pixels = ImClamp(scrollbar_size_v * (win_size_avail_v / win_size_v), style.GrabMinSize, scrollbar_size_v); const float grab_h_norm = grab_h_pixels / scrollbar_size_v; // Handle input right away. None of the code of Begin() is relying on scrolling position before calling Scrollbar(). bool held = false; bool hovered = false; const bool previously_held = (g.ActiveId == id); - ImGui::ButtonBehavior(bb, id, &hovered, &held); + ButtonBehavior(bb, id, &hovered, &held); float scroll_max = ImMax(1.0f, win_size_contents_v - win_size_avail_v); float scroll_ratio = ImSaturate(scroll_v / scroll_max); @@ -4514,7 +5115,7 @@ static void Scrollbar(ImGuiWindow* window, bool horizontal) // Click position in scrollbar normalized space (0.0f->1.0f) const float clicked_v_norm = ImSaturate((mouse_pos_v - scrollbar_pos_v) / scrollbar_size_v); - ImGui::SetHoveredID(id); + SetHoveredID(id); bool seek_absolute = false; if (!previously_held) @@ -4550,26 +5151,57 @@ static void Scrollbar(ImGuiWindow* window, bool horizontal) } // Render - const ImU32 grab_col = ImGui::GetColorU32(held ? ImGuiCol_ScrollbarGrabActive : hovered ? ImGuiCol_ScrollbarGrabHovered : ImGuiCol_ScrollbarGrab); + const ImU32 grab_col = GetColorU32(held ? ImGuiCol_ScrollbarGrabActive : hovered ? ImGuiCol_ScrollbarGrabHovered : ImGuiCol_ScrollbarGrab); + ImRect grab_rect; if (horizontal) - window->DrawList->AddRectFilled(ImVec2(ImLerp(bb.Min.x, bb.Max.x, grab_v_norm), bb.Min.y), ImVec2(ImLerp(bb.Min.x, bb.Max.x, grab_v_norm) + grab_h_pixels, bb.Max.y), grab_col, style.ScrollbarRounding); + grab_rect = ImRect(ImLerp(bb.Min.x, bb.Max.x, grab_v_norm), bb.Min.y, ImMin(ImLerp(bb.Min.x, bb.Max.x, grab_v_norm) + grab_h_pixels, window_rect.Max.x), bb.Max.y); else - window->DrawList->AddRectFilled(ImVec2(bb.Min.x, ImLerp(bb.Min.y, bb.Max.y, grab_v_norm)), ImVec2(bb.Max.x, ImLerp(bb.Min.y, bb.Max.y, grab_v_norm) + grab_h_pixels), grab_col, style.ScrollbarRounding); + grab_rect = ImRect(bb.Min.x, ImLerp(bb.Min.y, bb.Max.y, grab_v_norm), bb.Max.x, ImMin(ImLerp(bb.Min.y, bb.Max.y, grab_v_norm) + grab_h_pixels, window_rect.Max.y)); + window->DrawList->AddRectFilled(grab_rect.Min, grab_rect.Max, grab_col, style.ScrollbarRounding); } -// Moving window to front of display (which happens to be back of our sorted list) +void ImGui::BringWindowToFront(ImGuiWindow* window) +{ + ImGuiContext& g = *GImGui; + ImGuiWindow* current_front_window = g.Windows.back(); + if (current_front_window == window || current_front_window->RootWindow == window) + return; + for (int i = g.Windows.Size - 2; i >= 0; i--) // We can ignore the front most window + if (g.Windows[i] == window) + { + g.Windows.erase(g.Windows.Data + i); + g.Windows.push_back(window); + break; + } +} + +void ImGui::BringWindowToBack(ImGuiWindow* window) +{ + ImGuiContext& g = *GImGui; + if (g.Windows[0] == window) + return; + for (int i = 0; i < g.Windows.Size; i++) + if (g.Windows[i] == window) + { + memmove(&g.Windows[1], &g.Windows[0], (size_t)i * sizeof(ImGuiWindow*)); + g.Windows[0] = window; + break; + } +} + +// Moving window to front of display and set focus (which happens to be back of our sorted list) void ImGui::FocusWindow(ImGuiWindow* window) { ImGuiContext& g = *GImGui; // Always mark the window we passed as focused. This is used for keyboard interactions such as tabbing. - g.FocusedWindow = window; + g.NavWindow = window; // Passing NULL allow to disable keyboard focus if (!window) return; - // And move its root window to the top of the pile + // Move the root window to the top of the pile if (window->RootWindow) window = window->RootWindow; @@ -4579,15 +5211,19 @@ void ImGui::FocusWindow(ImGuiWindow* window) ClearActiveID(); // Bring to front - if ((window->Flags & ImGuiWindowFlags_NoBringToFrontOnFocus) || g.Windows.back() == window) - return; - for (int i = 0; i < g.Windows.Size; i++) - if (g.Windows[i] == window) + if (!(window->Flags & ImGuiWindowFlags_NoBringToFrontOnFocus)) + BringWindowToFront(window); +} + +void ImGui::FocusFrontMostActiveWindow(ImGuiWindow* ignore_window) +{ + ImGuiContext& g = *GImGui; + for (int i = g.Windows.Size - 1; i >= 0; i--) + if (g.Windows[i] != ignore_window && g.Windows[i]->WasActive && !(g.Windows[i]->Flags & ImGuiWindowFlags_ChildWindow)) { - g.Windows.erase(g.Windows.begin() + i); - break; + FocusWindow(g.Windows[i]); + return; } - g.Windows.push_back(window); } void ImGui::PushItemWidth(float item_width) @@ -4597,12 +5233,12 @@ void ImGui::PushItemWidth(float item_width) window->DC.ItemWidthStack.push_back(window->DC.ItemWidth); } -static void PushMultiItemsWidths(int components, float w_full) +void ImGui::PushMultiItemsWidths(int components, float w_full) { - ImGuiWindow* window = ImGui::GetCurrentWindow(); + ImGuiWindow* window = GetCurrentWindow(); const ImGuiStyle& style = GImGui->Style; if (w_full <= 0.0f) - w_full = ImGui::CalcItemWidth(); + w_full = CalcItemWidth(); const float w_item_one = ImMax(1.0f, (float)(int)((w_full - (style.ItemInnerSpacing.x) * (components-1)) / (float)components)); const float w_item_last = ImMax(1.0f, (float)(int)(w_full - (w_item_one + style.ItemInnerSpacing.x) * (components-1))); window->DC.ItemWidthStack.push_back(w_item_last); @@ -4638,7 +5274,7 @@ static ImFont* GetDefaultFont() return g.IO.FontDefault ? g.IO.FontDefault : g.IO.Fonts->Fonts[0]; } -static void SetCurrentFont(ImFont* font) +void ImGui::SetCurrentFont(ImFont* font) { ImGuiContext& g = *GImGui; IM_ASSERT(font && font->IsLoaded()); // Font Atlas not created. Did you call io.Fonts->GetTexDataAsRGBA32 / GetTexDataAsAlpha8 ? @@ -4646,7 +5282,11 @@ static void SetCurrentFont(ImFont* font) g.Font = font; g.FontBaseSize = g.IO.FontGlobalScale * g.Font->FontSize * g.Font->Scale; g.FontSize = g.CurrentWindow ? g.CurrentWindow->CalcFontSize() : 0.0f; - g.FontTexUvWhitePixel = g.Font->ContainerAtlas->TexUvWhitePixel; + + ImFontAtlas* atlas = g.Font->ContainerAtlas; + g.DrawListSharedData.TexUvWhitePixel = atlas->TexUvWhitePixel; + g.DrawListSharedData.Font = g.Font; + g.DrawListSharedData.FontSize = g.FontSize; } void ImGui::PushFont(ImFont* font) @@ -4667,32 +5307,41 @@ void ImGui::PopFont() SetCurrentFont(g.FontStack.empty() ? GetDefaultFont() : g.FontStack.back()); } -void ImGui::PushAllowKeyboardFocus(bool allow_keyboard_focus) +void ImGui::PushItemFlag(ImGuiItemFlags option, bool enabled) { ImGuiWindow* window = GetCurrentWindow(); - window->DC.AllowKeyboardFocus = allow_keyboard_focus; - window->DC.AllowKeyboardFocusStack.push_back(allow_keyboard_focus); + if (enabled) + window->DC.ItemFlags |= option; + else + window->DC.ItemFlags &= ~option; + window->DC.ItemFlagsStack.push_back(window->DC.ItemFlags); +} + +void ImGui::PopItemFlag() +{ + ImGuiWindow* window = GetCurrentWindow(); + window->DC.ItemFlagsStack.pop_back(); + window->DC.ItemFlags = window->DC.ItemFlagsStack.empty() ? ImGuiItemFlags_Default_ : window->DC.ItemFlagsStack.back(); +} + +void ImGui::PushAllowKeyboardFocus(bool allow_keyboard_focus) +{ + PushItemFlag(ImGuiItemFlags_AllowKeyboardFocus, allow_keyboard_focus); } void ImGui::PopAllowKeyboardFocus() { - ImGuiWindow* window = GetCurrentWindow(); - window->DC.AllowKeyboardFocusStack.pop_back(); - window->DC.AllowKeyboardFocus = window->DC.AllowKeyboardFocusStack.empty() ? true : window->DC.AllowKeyboardFocusStack.back(); + PopItemFlag(); } void ImGui::PushButtonRepeat(bool repeat) { - ImGuiWindow* window = GetCurrentWindow(); - window->DC.ButtonRepeat = repeat; - window->DC.ButtonRepeatStack.push_back(repeat); + PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat); } void ImGui::PopButtonRepeat() { - ImGuiWindow* window = GetCurrentWindow(); - window->DC.ButtonRepeatStack.pop_back(); - window->DC.ButtonRepeat = window->DC.ButtonRepeatStack.empty() ? false : window->DC.ButtonRepeatStack.back(); + PopItemFlag(); } void ImGui::PushTextWrapPos(float wrap_pos_x) @@ -4709,6 +5358,17 @@ void ImGui::PopTextWrapPos() window->DC.TextWrapPos = window->DC.TextWrapPosStack.empty() ? -1.0f : window->DC.TextWrapPosStack.back(); } +// FIXME: This may incur a round-trip (if the end user got their data from a float4) but eventually we aim to store the in-flight colors as ImU32 +void ImGui::PushStyleColor(ImGuiCol idx, ImU32 col) +{ + ImGuiContext& g = *GImGui; + ImGuiColMod backup; + backup.Col = idx; + backup.BackupValue = g.Style.Colors[idx]; + g.ColorModifiers.push_back(backup); + g.Style.Colors[idx] = ColorConvertU32ToFloat4(col); +} + void ImGui::PushStyleColor(ImGuiCol idx, const ImVec4& col) { ImGuiContext& g = *GImGui; @@ -4735,29 +5395,39 @@ struct ImGuiStyleVarInfo { ImGuiDataType Type; ImU32 Offset; - void* GetVarPtr() const { return (void*)((unsigned char*)&GImGui->Style + Offset); } + void* GetVarPtr(ImGuiStyle* style) const { return (void*)((unsigned char*)style + Offset); } }; -static const ImGuiStyleVarInfo GStyleVarInfo[ImGuiStyleVar_Count_] = +static const ImGuiStyleVarInfo GStyleVarInfo[] = { - { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, Alpha) }, - { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowPadding) }, - { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowRounding) }, - { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowMinSize) }, - { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, ChildWindowRounding) }, - { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, FramePadding) }, - { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, FrameRounding) }, - { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, ItemSpacing) }, - { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, ItemInnerSpacing) }, - { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, IndentSpacing) }, - { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, GrabMinSize) }, - { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, ButtonTextAlign) }, + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, Alpha) }, // ImGuiStyleVar_Alpha + { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowPadding) }, // ImGuiStyleVar_WindowPadding + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowRounding) }, // ImGuiStyleVar_WindowRounding + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowBorderSize) }, // ImGuiStyleVar_WindowBorderSize + { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowMinSize) }, // ImGuiStyleVar_WindowMinSize + { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowTitleAlign) }, // ImGuiStyleVar_WindowTitleAlign + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, ChildRounding) }, // ImGuiStyleVar_ChildRounding + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, ChildBorderSize) }, // ImGuiStyleVar_ChildBorderSize + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, PopupRounding) }, // ImGuiStyleVar_PopupRounding + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, PopupBorderSize) }, // ImGuiStyleVar_PopupBorderSize + { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, FramePadding) }, // ImGuiStyleVar_FramePadding + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, FrameRounding) }, // ImGuiStyleVar_FrameRounding + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, FrameBorderSize) }, // ImGuiStyleVar_FrameBorderSize + { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, ItemSpacing) }, // ImGuiStyleVar_ItemSpacing + { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, ItemInnerSpacing) }, // ImGuiStyleVar_ItemInnerSpacing + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, IndentSpacing) }, // ImGuiStyleVar_IndentSpacing + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, ScrollbarSize) }, // ImGuiStyleVar_ScrollbarSize + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, ScrollbarRounding) }, // ImGuiStyleVar_ScrollbarRounding + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, GrabMinSize) }, // ImGuiStyleVar_GrabMinSize + { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, GrabRounding) }, // ImGuiStyleVar_GrabRounding + { ImGuiDataType_Float2, (ImU32)IM_OFFSETOF(ImGuiStyle, ButtonTextAlign) }, // ImGuiStyleVar_ButtonTextAlign { ImGuiDataType_Float, (ImU32)IM_OFFSETOF(ImGuiStyle, ViewId) }, }; static const ImGuiStyleVarInfo* GetStyleVarInfo(ImGuiStyleVar idx) { IM_ASSERT(idx >= 0 && idx < ImGuiStyleVar_Count_); + IM_ASSERT(IM_ARRAYSIZE(GStyleVarInfo) == ImGuiStyleVar_Count_); return &GStyleVarInfo[idx]; } @@ -4766,8 +5436,9 @@ void ImGui::PushStyleVar(ImGuiStyleVar idx, float val) const ImGuiStyleVarInfo* var_info = GetStyleVarInfo(idx); if (var_info->Type == ImGuiDataType_Float) { - float* pvar = (float*)var_info->GetVarPtr(); - GImGui->StyleModifiers.push_back(ImGuiStyleMod(idx, *pvar)); + ImGuiContext& g = *GImGui; + float* pvar = (float*)var_info->GetVarPtr(&g.Style); + g.StyleModifiers.push_back(ImGuiStyleMod(idx, *pvar)); *pvar = val; return; } @@ -4779,8 +5450,9 @@ void ImGui::PushStyleVar(ImGuiStyleVar idx, const ImVec2& val) const ImGuiStyleVarInfo* var_info = GetStyleVarInfo(idx); if (var_info->Type == ImGuiDataType_Float2) { - ImVec2* pvar = (ImVec2*)var_info->GetVarPtr(); - GImGui->StyleModifiers.push_back(ImGuiStyleMod(idx, *pvar)); + ImGuiContext& g = *GImGui; + ImVec2* pvar = (ImVec2*)var_info->GetVarPtr(&g.Style); + g.StyleModifiers.push_back(ImGuiStyleMod(idx, *pvar)); *pvar = val; return; } @@ -4794,15 +5466,15 @@ void ImGui::PopStyleVar(int count) { ImGuiStyleMod& backup = g.StyleModifiers.back(); const ImGuiStyleVarInfo* info = GetStyleVarInfo(backup.VarIdx); - if (info->Type == ImGuiDataType_Float) (*(float*)info->GetVarPtr()) = backup.BackupFloat[0]; - else if (info->Type == ImGuiDataType_Float2) (*(ImVec2*)info->GetVarPtr()) = ImVec2(backup.BackupFloat[0], backup.BackupFloat[1]); - else if (info->Type == ImGuiDataType_Int) (*(int*)info->GetVarPtr()) = backup.BackupInt[0]; + if (info->Type == ImGuiDataType_Float) (*(float*)info->GetVarPtr(&g.Style)) = backup.BackupFloat[0]; + else if (info->Type == ImGuiDataType_Float2) (*(ImVec2*)info->GetVarPtr(&g.Style)) = ImVec2(backup.BackupFloat[0], backup.BackupFloat[1]); + else if (info->Type == ImGuiDataType_Int) (*(int*)info->GetVarPtr(&g.Style)) = backup.BackupInt[0]; g.StyleModifiers.pop_back(); count--; } } -const char* ImGui::GetStyleColName(ImGuiCol idx) +const char* ImGui::GetStyleColorName(ImGuiCol idx) { // Create switch-case from enum with regexp: ImGuiCol_{.*}, --> case ImGuiCol_\1: return "\1"; switch (idx) @@ -4810,7 +5482,7 @@ const char* ImGui::GetStyleColName(ImGuiCol idx) case ImGuiCol_Text: return "Text"; case ImGuiCol_TextDisabled: return "TextDisabled"; case ImGuiCol_WindowBg: return "WindowBg"; - case ImGuiCol_ChildWindowBg: return "ChildWindowBg"; + case ImGuiCol_ChildBg: return "ChildBg"; case ImGuiCol_PopupBg: return "PopupBg"; case ImGuiCol_Border: return "Border"; case ImGuiCol_BorderShadow: return "BorderShadow"; @@ -4818,14 +5490,13 @@ const char* ImGui::GetStyleColName(ImGuiCol idx) case ImGuiCol_FrameBgHovered: return "FrameBgHovered"; case ImGuiCol_FrameBgActive: return "FrameBgActive"; case ImGuiCol_TitleBg: return "TitleBg"; - case ImGuiCol_TitleBgCollapsed: return "TitleBgCollapsed"; case ImGuiCol_TitleBgActive: return "TitleBgActive"; + case ImGuiCol_TitleBgCollapsed: return "TitleBgCollapsed"; case ImGuiCol_MenuBarBg: return "MenuBarBg"; case ImGuiCol_ScrollbarBg: return "ScrollbarBg"; case ImGuiCol_ScrollbarGrab: return "ScrollbarGrab"; case ImGuiCol_ScrollbarGrabHovered: return "ScrollbarGrabHovered"; case ImGuiCol_ScrollbarGrabActive: return "ScrollbarGrabActive"; - case ImGuiCol_ComboBg: return "ComboBg"; case ImGuiCol_CheckMark: return "CheckMark"; case ImGuiCol_SliderGrab: return "SliderGrab"; case ImGuiCol_SliderGrabActive: return "SliderGrabActive"; @@ -4835,9 +5506,9 @@ const char* ImGui::GetStyleColName(ImGuiCol idx) case ImGuiCol_Header: return "Header"; case ImGuiCol_HeaderHovered: return "HeaderHovered"; case ImGuiCol_HeaderActive: return "HeaderActive"; - case ImGuiCol_Column: return "Column"; - case ImGuiCol_ColumnHovered: return "ColumnHovered"; - case ImGuiCol_ColumnActive: return "ColumnActive"; + case ImGuiCol_Separator: return "Separator"; + case ImGuiCol_SeparatorHovered: return "SeparatorHovered"; + case ImGuiCol_SeparatorActive: return "SeparatorActive"; case ImGuiCol_ResizeGrip: return "ResizeGrip"; case ImGuiCol_ResizeGripHovered: return "ResizeGripHovered"; case ImGuiCol_ResizeGripActive: return "ResizeGripActive"; @@ -4850,39 +5521,85 @@ const char* ImGui::GetStyleColName(ImGuiCol idx) case ImGuiCol_PlotHistogramHovered: return "PlotHistogramHovered"; case ImGuiCol_TextSelectedBg: return "TextSelectedBg"; case ImGuiCol_ModalWindowDarkening: return "ModalWindowDarkening"; + case ImGuiCol_DragDropTarget: return "DragDropTarget"; } IM_ASSERT(0); return "Unknown"; } -bool ImGui::IsWindowHovered() +bool ImGui::IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent) { - ImGuiContext& g = *GImGui; - return g.HoveredWindow == g.CurrentWindow && IsWindowContentHoverable(g.HoveredRootWindow); + if (window->RootWindow == potential_parent) + return true; + while (window != NULL) + { + if (window == potential_parent) + return true; + window = window->ParentWindow; + } + return false; } -bool ImGui::IsWindowFocused() +bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags) { + IM_ASSERT((flags & ImGuiHoveredFlags_AllowWhenOverlapped) == 0); // Flags not supported by this function ImGuiContext& g = *GImGui; - return g.FocusedWindow == g.CurrentWindow; + + if (flags & ImGuiHoveredFlags_AnyWindow) + { + if (g.HoveredWindow == NULL) + return false; + } + else + { + switch (flags & (ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows)) + { + case ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows: + if (g.HoveredRootWindow != g.CurrentWindow->RootWindow) + return false; + break; + case ImGuiHoveredFlags_RootWindow: + if (g.HoveredWindow != g.CurrentWindow->RootWindow) + return false; + break; + case ImGuiHoveredFlags_ChildWindows: + if (g.HoveredWindow == NULL || !IsWindowChildOf(g.HoveredWindow, g.CurrentWindow)) + return false; + break; + default: + if (g.HoveredWindow != g.CurrentWindow) + return false; + break; + } + } + + if (!IsWindowContentHoverable(g.HoveredRootWindow, flags)) + return false; + if (!(flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem)) + if (g.ActiveId != 0 && !g.ActiveIdAllowOverlap && g.ActiveId != g.HoveredWindow->MoveId) + return false; + return true; } -bool ImGui::IsRootWindowFocused() +bool ImGui::IsWindowFocused(ImGuiFocusedFlags flags) { ImGuiContext& g = *GImGui; - return g.FocusedWindow == g.CurrentWindow->RootWindow; -} + IM_ASSERT(g.CurrentWindow); // Not inside a Begin()/End() -bool ImGui::IsRootWindowOrAnyChildFocused() -{ - ImGuiContext& g = *GImGui; - return g.FocusedWindow && g.FocusedWindow->RootWindow == g.CurrentWindow->RootWindow; -} + if (flags & ImGuiFocusedFlags_AnyWindow) + return g.NavWindow != NULL; -bool ImGui::IsRootWindowOrAnyChildHovered() -{ - ImGuiContext& g = *GImGui; - return g.HoveredRootWindow && (g.HoveredRootWindow == g.CurrentWindow->RootWindow) && IsWindowContentHoverable(g.HoveredRootWindow); + switch (flags & (ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows)) + { + case ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows: + return g.NavWindow && g.NavWindow->RootWindow == g.CurrentWindow->RootWindow; + case ImGuiFocusedFlags_RootWindow: + return g.NavWindow == g.CurrentWindow->RootWindow; + case ImGuiFocusedFlags_ChildWindows: + return g.NavWindow && IsWindowChildOf(g.NavWindow, g.CurrentWindow); + default: + return g.NavWindow == g.CurrentWindow; + } } float ImGui::GetWindowWidth() @@ -4904,36 +5621,43 @@ ImVec2 ImGui::GetWindowPos() return window->Pos; } +static void SetWindowScrollX(ImGuiWindow* window, float new_scroll_x) +{ + window->DC.CursorMaxPos.x += window->Scroll.x; // SizeContents is generally computed based on CursorMaxPos which is affected by scroll position, so we need to apply our change to it. + window->Scroll.x = new_scroll_x; + window->DC.CursorMaxPos.x -= window->Scroll.x; +} + static void SetWindowScrollY(ImGuiWindow* window, float new_scroll_y) { - window->DC.CursorMaxPos.y += window->Scroll.y; + window->DC.CursorMaxPos.y += window->Scroll.y; // SizeContents is generally computed based on CursorMaxPos which is affected by scroll position, so we need to apply our change to it. window->Scroll.y = new_scroll_y; window->DC.CursorMaxPos.y -= window->Scroll.y; } -static void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiSetCond cond) +static void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond) { // Test condition (NB: bit 0 is always true) and clear flags for next time if (cond && (window->SetWindowPosAllowFlags & cond) == 0) return; - window->SetWindowPosAllowFlags &= ~(ImGuiSetCond_Once | ImGuiSetCond_FirstUseEver | ImGuiSetCond_Appearing); - window->SetWindowPosCenterWanted = false; + window->SetWindowPosAllowFlags &= ~(ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing); + window->SetWindowPosVal = ImVec2(FLT_MAX, FLT_MAX); // Set const ImVec2 old_pos = window->Pos; window->PosFloat = pos; - window->Pos = ImVec2((float)(int)window->PosFloat.x, (float)(int)window->PosFloat.y); + window->Pos = ImFloor(pos); window->DC.CursorPos += (window->Pos - old_pos); // As we happen to move the window while it is being appended to (which is a bad idea - will smear) let's at least offset the cursor window->DC.CursorMaxPos += (window->Pos - old_pos); // And more importantly we need to adjust this so size calculation doesn't get affected. } -void ImGui::SetWindowPos(const ImVec2& pos, ImGuiSetCond cond) +void ImGui::SetWindowPos(const ImVec2& pos, ImGuiCond cond) { ImGuiWindow* window = GetCurrentWindowRead(); SetWindowPos(window, pos, cond); } -void ImGui::SetWindowPos(const char* name, const ImVec2& pos, ImGuiSetCond cond) +void ImGui::SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond) { if (ImGuiWindow* window = FindWindowByName(name)) SetWindowPos(window, pos, cond); @@ -4945,12 +5669,12 @@ ImVec2 ImGui::GetWindowSize() return window->Size; } -static void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiSetCond cond) +static void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond) { // Test condition (NB: bit 0 is always true) and clear flags for next time if (cond && (window->SetWindowSizeAllowFlags & cond) == 0) return; - window->SetWindowSizeAllowFlags &= ~(ImGuiSetCond_Once | ImGuiSetCond_FirstUseEver | ImGuiSetCond_Appearing); + window->SetWindowSizeAllowFlags &= ~(ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing); // Set if (size.x > 0.0f) @@ -4975,43 +5699,48 @@ static void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiSetCond } } -void ImGui::SetWindowSize(const ImVec2& size, ImGuiSetCond cond) +void ImGui::SetWindowSize(const ImVec2& size, ImGuiCond cond) { SetWindowSize(GImGui->CurrentWindow, size, cond); } -void ImGui::SetWindowSize(const char* name, const ImVec2& size, ImGuiSetCond cond) +void ImGui::SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond) { - ImGuiWindow* window = FindWindowByName(name); - if (window) + if (ImGuiWindow* window = FindWindowByName(name)) SetWindowSize(window, size, cond); } -static void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiSetCond cond) +static void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond) { // Test condition (NB: bit 0 is always true) and clear flags for next time if (cond && (window->SetWindowCollapsedAllowFlags & cond) == 0) return; - window->SetWindowCollapsedAllowFlags &= ~(ImGuiSetCond_Once | ImGuiSetCond_FirstUseEver | ImGuiSetCond_Appearing); + window->SetWindowCollapsedAllowFlags &= ~(ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing); // Set window->Collapsed = collapsed; } -void ImGui::SetWindowCollapsed(bool collapsed, ImGuiSetCond cond) +void ImGui::SetWindowCollapsed(bool collapsed, ImGuiCond cond) { SetWindowCollapsed(GImGui->CurrentWindow, collapsed, cond); } bool ImGui::IsWindowCollapsed() { - return GImGui->CurrentWindow->Collapsed; + ImGuiWindow* window = GetCurrentWindowRead(); + return window->Collapsed; } -void ImGui::SetWindowCollapsed(const char* name, bool collapsed, ImGuiSetCond cond) +bool ImGui::IsWindowAppearing() { - ImGuiWindow* window = FindWindowByName(name); - if (window) + ImGuiWindow* window = GetCurrentWindowRead(); + return window->Appearing; +} + +void ImGui::SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond) +{ + if (ImGuiWindow* window = FindWindowByName(name)) SetWindowCollapsed(window, collapsed, cond); } @@ -5033,61 +5762,55 @@ void ImGui::SetWindowFocus(const char* name) } } -void ImGui::SetNextWindowPos(const ImVec2& pos, ImGuiSetCond cond) +void ImGui::SetNextWindowPos(const ImVec2& pos, ImGuiCond cond, const ImVec2& pivot) { ImGuiContext& g = *GImGui; - g.SetNextWindowPosVal = pos; - g.SetNextWindowPosCond = cond ? cond : ImGuiSetCond_Always; + g.NextWindowData.PosVal = pos; + g.NextWindowData.PosPivotVal = pivot; + g.NextWindowData.PosCond = cond ? cond : ImGuiCond_Always; } -void ImGui::SetNextWindowPosCenter(ImGuiSetCond cond) +void ImGui::SetNextWindowSize(const ImVec2& size, ImGuiCond cond) { ImGuiContext& g = *GImGui; - g.SetNextWindowPosVal = ImVec2(-FLT_MAX, -FLT_MAX); - g.SetNextWindowPosCond = cond ? cond : ImGuiSetCond_Always; + g.NextWindowData.SizeVal = size; + g.NextWindowData.SizeCond = cond ? cond : ImGuiCond_Always; } -void ImGui::SetNextWindowSize(const ImVec2& size, ImGuiSetCond cond) +void ImGui::SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback, void* custom_callback_user_data) { ImGuiContext& g = *GImGui; - g.SetNextWindowSizeVal = size; - g.SetNextWindowSizeCond = cond ? cond : ImGuiSetCond_Always; -} - -void ImGui::SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeConstraintCallback custom_callback, void* custom_callback_user_data) -{ - ImGuiContext& g = *GImGui; - g.SetNextWindowSizeConstraint = true; - g.SetNextWindowSizeConstraintRect = ImRect(size_min, size_max); - g.SetNextWindowSizeConstraintCallback = custom_callback; - g.SetNextWindowSizeConstraintCallbackUserData = custom_callback_user_data; + g.NextWindowData.SizeConstraintCond = ImGuiCond_Always; + g.NextWindowData.SizeConstraintRect = ImRect(size_min, size_max); + g.NextWindowData.SizeCallback = custom_callback; + g.NextWindowData.SizeCallbackUserData = custom_callback_user_data; } void ImGui::SetNextWindowContentSize(const ImVec2& size) { ImGuiContext& g = *GImGui; - g.SetNextWindowContentSizeVal = size; - g.SetNextWindowContentSizeCond = ImGuiSetCond_Always; + g.NextWindowData.ContentSizeVal = size; // In Begin() we will add the size of window decorations (title bar, menu etc.) to that to form a SizeContents value. + g.NextWindowData.ContentSizeCond = ImGuiCond_Always; } -void ImGui::SetNextWindowContentWidth(float width) +void ImGui::SetNextWindowCollapsed(bool collapsed, ImGuiCond cond) { ImGuiContext& g = *GImGui; - g.SetNextWindowContentSizeVal = ImVec2(width, g.SetNextWindowContentSizeCond ? g.SetNextWindowContentSizeVal.y : 0.0f); - g.SetNextWindowContentSizeCond = ImGuiSetCond_Always; -} - -void ImGui::SetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond) -{ - ImGuiContext& g = *GImGui; - g.SetNextWindowCollapsedVal = collapsed; - g.SetNextWindowCollapsedCond = cond ? cond : ImGuiSetCond_Always; + g.NextWindowData.CollapsedVal = collapsed; + g.NextWindowData.CollapsedCond = cond ? cond : ImGuiCond_Always; } void ImGui::SetNextWindowFocus() { ImGuiContext& g = *GImGui; - g.SetNextWindowFocus = true; + g.NextWindowData.FocusCond = ImGuiCond_Always; // Using a Cond member for consistency (may transition all of them to single flag set for fast Clear() op) +} + +void ImGui::SetNextWindowBgAlpha(float alpha) +{ + ImGuiContext& g = *GImGui; + g.NextWindowData.BgAlphaVal = alpha; + g.NextWindowData.BgAlphaCond = ImGuiCond_Always; // Using a Cond member for consistency (may transition all of them to single flag set for fast Clear() op) } // In window space (not screen space!) @@ -5095,8 +5818,8 @@ ImVec2 ImGui::GetContentRegionMax() { ImGuiWindow* window = GetCurrentWindowRead(); ImVec2 mx = window->ContentsRegionRect.Max; - if (window->DC.ColumnsCount != 1) - mx.x = GetColumnOffset(window->DC.ColumnsCurrent + 1) - window->WindowPadding.x; + if (window->DC.ColumnsSet) + mx.x = GetColumnOffset(window->DC.ColumnsSet->Current + 1) - window->WindowPadding.x; return mx; } @@ -5142,7 +5865,13 @@ float ImGui::GetTextLineHeightWithSpacing() return g.FontSize + g.Style.ItemSpacing.y; } -float ImGui::GetItemsLineHeightWithSpacing() +float ImGui::GetFrameHeight() +{ + ImGuiContext& g = *GImGui; + return g.FontSize + g.Style.FramePadding.y * 2.0f; +} + +float ImGui::GetFrameHeightWithSpacing() { ImGuiContext& g = *GImGui; return g.FontSize + g.Style.FramePadding.y * 2.0f + g.Style.ItemSpacing.y; @@ -5166,7 +5895,7 @@ float ImGui::GetFontSize() ImVec2 ImGui::GetFontTexUvWhitePixel() { - return GImGui->FontTexUvWhitePixel; + return GImGui->DrawListSharedData.TexUvWhitePixel; } void ImGui::SetWindowFontScale(float scale) @@ -5174,7 +5903,7 @@ void ImGui::SetWindowFontScale(float scale) ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); window->FontWindowScale = scale; - g.FontSize = window->CalcFontSize(); + g.FontSize = g.DrawListSharedData.FontSize = window->CalcFontSize(); } // User generally sees positions in window coordinates. Internally we store CursorPos in absolute screen coordinates because it is more convenient. @@ -5249,14 +5978,12 @@ float ImGui::GetScrollY() float ImGui::GetScrollMaxX() { - ImGuiWindow* window = GetCurrentWindowRead(); - return window->SizeContents.x - window->SizeFull.x - window->ScrollbarSizes.x; + return GetScrollMaxX(GImGui->CurrentWindow); } float ImGui::GetScrollMaxY() { - ImGuiWindow* window = GetCurrentWindowRead(); - return window->SizeContents.y - window->SizeFull.y - window->ScrollbarSizes.y; + return GetScrollMaxY(GImGui->CurrentWindow); } void ImGui::SetScrollX(float scroll_x) @@ -5279,21 +6006,36 @@ void ImGui::SetScrollFromPosY(float pos_y, float center_y_ratio) ImGuiWindow* window = GetCurrentWindow(); IM_ASSERT(center_y_ratio >= 0.0f && center_y_ratio <= 1.0f); window->ScrollTarget.y = (float)(int)(pos_y + window->Scroll.y); - if (center_y_ratio <= 0.0f && window->ScrollTarget.y <= window->WindowPadding.y) // Minor hack to make "scroll to top" take account of WindowPadding, else it would scroll to (WindowPadding.y - ItemSpacing.y) - window->ScrollTarget.y = 0.0f; window->ScrollTargetCenterRatio.y = center_y_ratio; + + // Minor hack to to make scrolling to top/bottom of window take account of WindowPadding, it looks more right to the user this way + if (center_y_ratio <= 0.0f && window->ScrollTarget.y <= window->WindowPadding.y) + window->ScrollTarget.y = 0.0f; + else if (center_y_ratio >= 1.0f && window->ScrollTarget.y >= window->SizeContents.y - window->WindowPadding.y + GImGui->Style.ItemSpacing.y) + window->ScrollTarget.y = window->SizeContents.y; } // center_y_ratio: 0.0f top of last item, 0.5f vertical center of last item, 1.0f bottom of last item. void ImGui::SetScrollHere(float center_y_ratio) { ImGuiWindow* window = GetCurrentWindow(); - float target_y = window->DC.CursorPosPrevLine.y + (window->DC.PrevLineHeight * center_y_ratio) + (GImGui->Style.ItemSpacing.y * (center_y_ratio - 0.5f) * 2.0f); // Precisely aim above, in the middle or below the last line. - SetScrollFromPosY(target_y - window->Pos.y, center_y_ratio); + float target_y = window->DC.CursorPosPrevLine.y - window->Pos.y; // Top of last item, in window space + target_y += (window->DC.PrevLineHeight * center_y_ratio) + (GImGui->Style.ItemSpacing.y * (center_y_ratio - 0.5f) * 2.0f); // Precisely aim above, in the middle or below the last line. + SetScrollFromPosY(target_y, center_y_ratio); +} + +// FIXME-NAV: This function is a placeholder for the upcoming Navigation branch + Focusing features. +// In the current branch this function will only set the scrolling, in the navigation branch it will also set your navigation cursor. +// Prefer using "SetItemDefaultFocus()" over "if (IsWindowAppearing()) SetScrollHere()" when applicable. +void ImGui::SetItemDefaultFocus() +{ + if (IsWindowAppearing()) + SetScrollHere(); } void ImGui::SetKeyboardFocusHere(int offset) { + IM_ASSERT(offset >= -1); // -1 is allowed but not below ImGuiWindow* window = GetCurrentWindow(); window->FocusIdxAllRequestNext = window->FocusIdxAllCounter + 1 + offset; window->FocusIdxTabRequestNext = INT_MAX; @@ -5388,6 +6130,7 @@ void ImGui::TextUnformatted(const char* text, const char* text_end) if (text_end == NULL) text_end = text + strlen(text); // FIXME-OPT + const ImVec2 text_pos(window->DC.CursorPos.x, window->DC.CursorPos.y + window->DC.CurrentLineTextBaseOffset); const float wrap_pos_x = window->DC.TextWrapPos; const bool wrap_enabled = wrap_pos_x >= 0.0f; if (text_end - text > 2000 && !wrap_enabled) @@ -5398,7 +6141,6 @@ void ImGui::TextUnformatted(const char* text, const char* text_end) // We also don't vertically center the text within the line full height, which is unlikely to matter because we are likely the biggest and only item on the line. const char* line = text; const float line_height = GetTextLineHeight(); - const ImVec2 text_pos = window->DC.CursorPos + ImVec2(0.0f, window->DC.CurrentLineTextBaseOffset); const ImRect clip_rect = window->ClipRect; ImVec2 text_size(0,0); @@ -5432,7 +6174,7 @@ void ImGui::TextUnformatted(const char* text, const char* text_end) while (line < text_end) { const char* line_end = strchr(line, '\n'); - if (IsClippedEx(line_rect, NULL, false)) + if (IsClippedEx(line_rect, 0, false)) break; const ImVec2 line_size = CalcTextSize(line, line_end, false); @@ -5464,7 +6206,7 @@ void ImGui::TextUnformatted(const char* text, const char* text_end) ImRect bb(text_pos, text_pos + text_size); ItemSize(bb); - ItemAdd(bb, NULL); + ItemAdd(bb, 0); } else { @@ -5472,10 +6214,9 @@ void ImGui::TextUnformatted(const char* text, const char* text_end) const ImVec2 text_size = CalcTextSize(text_begin, text_end, false, wrap_width); // Account of baseline offset - ImVec2 text_pos(window->DC.CursorPos.x, window->DC.CursorPos.y + window->DC.CurrentLineTextBaseOffset); ImRect bb(text_pos, text_pos + text_size); ItemSize(text_size); - if (!ItemAdd(bb, NULL)) + if (!ItemAdd(bb, 0)) return; // Render (we don't hide text after ## in this end-user function) @@ -5483,16 +6224,15 @@ void ImGui::TextUnformatted(const char* text, const char* text_end) } } -void ImGui::AlignFirstTextHeightToWidgets() +void ImGui::AlignTextToFramePadding() { ImGuiWindow* window = GetCurrentWindow(); if (window->SkipItems) return; - // Declare a dummy item size to that upcoming items that are smaller will center-align on the newly expanded line height. ImGuiContext& g = *GImGui; - ItemSize(ImVec2(0, g.FontSize + g.Style.FramePadding.y*2), g.Style.FramePadding.y); - SameLine(0, 0); + window->DC.CurrentLineHeight = ImMax(window->DC.CurrentLineHeight, g.FontSize + g.Style.FramePadding.y * 2); + window->DC.CurrentLineTextBaseOffset = ImMax(window->DC.CurrentLineTextBaseOffset, g.Style.FramePadding.y); } // Add a label+text combo aligned to other label+value widgets @@ -5510,7 +6250,7 @@ void ImGui::LabelTextV(const char* label, const char* fmt, va_list args) const ImRect value_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2)); const ImRect total_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w + (label_size.x > 0.0f ? style.ItemInnerSpacing.x : 0.0f), style.FramePadding.y*2) + label_size); ItemSize(total_bb, style.FramePadding.y); - if (!ItemAdd(total_bb, NULL)) + if (!ItemAdd(total_bb, 0)) return; // Render @@ -5529,18 +6269,6 @@ void ImGui::LabelText(const char* label, const char* fmt, ...) va_end(args); } -static inline bool IsWindowContentHoverable(ImGuiWindow* window) -{ - // An active popup disable hovering on other windows (apart from its own children) - ImGuiContext& g = *GImGui; - if (ImGuiWindow* focused_window = g.FocusedWindow) - if (ImGuiWindow* focused_root_window = focused_window->RootWindow) - if ((focused_root_window->Flags & ImGuiWindowFlags_Popup) != 0 && focused_root_window->WasActive && focused_root_window != window->RootWindow) - return false; - - return true; -} - bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags) { ImGuiContext& g = *GImGui; @@ -5554,14 +6282,39 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool return false; } + // Default behavior requires click+release on same spot if ((flags & (ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick)) == 0) flags |= ImGuiButtonFlags_PressedOnClickRelease; + ImGuiWindow* backup_hovered_window = g.HoveredWindow; + if ((flags & ImGuiButtonFlags_FlattenChildren) && g.HoveredRootWindow == window) + g.HoveredWindow = window; + bool pressed = false; - bool hovered = IsHovered(bb, id, (flags & ImGuiButtonFlags_FlattenChilds) != 0); + bool hovered = ItemHoverable(bb, id); + + // Special mode for Drag and Drop where holding button pressed for a long time while dragging another item triggers the button + if ((flags & ImGuiButtonFlags_PressedOnDragDropHold) && g.DragDropActive && !(g.DragDropSourceFlags & ImGuiDragDropFlags_SourceNoHoldToOpenOthers)) + if (IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem)) + { + hovered = true; + SetHoveredID(id); + if (CalcTypematicPressedRepeatAmount(g.HoveredIdTimer + 0.0001f, g.HoveredIdTimer + 0.0001f - g.IO.DeltaTime, 0.01f, 0.70f)) // FIXME: Our formula for CalcTypematicPressedRepeatAmount() is fishy + { + pressed = true; + FocusWindow(window); + } + } + + if ((flags & ImGuiButtonFlags_FlattenChildren) && g.HoveredRootWindow == window) + g.HoveredWindow = backup_hovered_window; + + // AllowOverlap mode (rarely used) requires previous frame HoveredId to be null or to match. This allows using patterns where a later submitted widget overlaps a previous one. + if (hovered && (flags & ImGuiButtonFlags_AllowItemOverlap) && (g.HoveredIdPreviousFrame != id && g.HoveredIdPreviousFrame != 0)) + hovered = false; + if (hovered) { - SetHoveredID(id); if (!(flags & ImGuiButtonFlags_NoKeyModifiers) || (!g.IO.KeyCtrl && !g.IO.KeyShift && !g.IO.KeyAlt)) { // | CLICKING | HOLDING with ImGuiButtonFlags_Repeat @@ -5573,12 +6326,14 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool { SetActiveID(id, window); // Hold on ID FocusWindow(window); - g.ActiveIdClickOffset = g.IO.MousePos - bb.Min; } if (((flags & ImGuiButtonFlags_PressedOnClick) && g.IO.MouseClicked[0]) || ((flags & ImGuiButtonFlags_PressedOnDoubleClick) && g.IO.MouseDoubleClicked[0])) { pressed = true; - ClearActiveID(); + if (flags & ImGuiButtonFlags_NoHoldingActiveID) + ClearActiveID(); + else + SetActiveID(id, window); // Hold on ID FocusWindow(window); } if ((flags & ImGuiButtonFlags_PressedOnRelease) && g.IO.MouseReleased[0]) @@ -5598,6 +6353,8 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool bool held = false; if (g.ActiveId == id) { + if (g.ActiveIdIsJustActivated) + g.ActiveIdClickOffset = g.IO.MousePos - bb.Min; if (g.IO.MouseDown[0]) { held = true; @@ -5606,15 +6363,12 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool { if (hovered && (flags & ImGuiButtonFlags_PressedOnClickRelease)) if (!((flags & ImGuiButtonFlags_Repeat) && g.IO.MouseDownDurationPrev[0] >= g.IO.KeyRepeatDelay)) // Repeat mode trumps - pressed = true; + if (!g.DragDropActive) + pressed = true; ClearActiveID(); } } - // AllowOverlap mode (rarely used) requires previous frame HoveredId to be null or to match. This allows using patterns where a later submitted widget overlaps a previous one. - if (hovered && (flags & ImGuiButtonFlags_AllowOverlapMode) && (g.HoveredIdPreviousFrame != id && g.HoveredIdPreviousFrame != 0)) - hovered = pressed = held = false; - if (out_hovered) *out_hovered = hovered; if (out_held) *out_held = held; @@ -5639,10 +6393,11 @@ bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags const ImRect bb(pos, pos + size); ItemSize(bb, style.FramePadding.y); - if (!ItemAdd(bb, &id)) + if (!ItemAdd(bb, id)) return false; - if (window->DC.ButtonRepeat) flags |= ImGuiButtonFlags_Repeat; + if (window->DC.ItemFlags & ImGuiItemFlags_ButtonRepeat) + flags |= ImGuiButtonFlags_Repeat; bool hovered, held; bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags); @@ -5686,7 +6441,7 @@ bool ImGui::InvisibleButton(const char* str_id, const ImVec2& size_arg) ImVec2 size = CalcItemSize(size_arg, 0.0f, 0.0f); const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size); ItemSize(bb); - if (!ItemAdd(bb, &id)) + if (!ItemAdd(bb, id)) return false; bool hovered, held; @@ -5707,12 +6462,13 @@ bool ImGui::CloseButton(ImGuiID id, const ImVec2& pos, float radius) // Render const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_CloseButtonActive : hovered ? ImGuiCol_CloseButtonHovered : ImGuiCol_CloseButton); - const ImVec2 center = bb.GetCenter(); + ImVec2 center = bb.GetCenter(); window->DrawList->AddCircleFilled(center, ImMax(2.0f, radius), col, 12); const float cross_extent = (radius * 0.7071f) - 1.0f; if (hovered) { + center -= ImVec2(0.5f, 0.5f); window->DrawList->AddLine(center + ImVec2(+cross_extent,+cross_extent), center + ImVec2(-cross_extent,-cross_extent), GetColorU32(ImGuiCol_Text)); window->DrawList->AddLine(center + ImVec2(+cross_extent,-cross_extent), center + ImVec2(-cross_extent,+cross_extent), GetColorU32(ImGuiCol_Text)); } @@ -5720,6 +6476,34 @@ bool ImGui::CloseButton(ImGuiID id, const ImVec2& pos, float radius) return pressed; } +// [Internal] +bool ImGui::ArrowButton(ImGuiID id, ImGuiDir dir, ImVec2 padding, ImGuiButtonFlags flags) +{ + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; + if (window->SkipItems) + return false; + + const ImGuiStyle& style = g.Style; + + const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(g.FontSize + padding.x * 2.0f, g.FontSize + padding.y * 2.0f)); + ItemSize(bb, style.FramePadding.y); + if (!ItemAdd(bb, id)) + return false; + + bool hovered, held; + bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags); + + const ImU32 col = GetColorU32((hovered && held) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button); +#ifdef IMGUI_HAS_NAV + RenderNavHighlight(bb, id); +#endif + RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding); + RenderTriangle(bb.Min + padding, dir, 1.0f); + + return pressed; +} + void ImGui::Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col) { ImGuiWindow* window = GetCurrentWindow(); @@ -5730,7 +6514,7 @@ void ImGui::Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& if (border_col.w > 0.0f) bb.Max += ImVec2(2,2); ItemSize(bb); - if (!ItemAdd(bb, NULL)) + if (!ItemAdd(bb, 0)) return; if (border_col.w > 0.0f) @@ -5767,7 +6551,7 @@ bool ImGui::ImageButton(ImTextureID user_texture_id, const ImVec2& size, const I const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size + padding*2); const ImRect image_bb(window->DC.CursorPos + padding, window->DC.CursorPos + padding + size); ItemSize(bb); - if (!ItemAdd(bb, &id)) + if (!ItemAdd(bb, id)) return false; bool hovered, held; @@ -5789,10 +6573,11 @@ void ImGui::LogToTTY(int max_depth) ImGuiContext& g = *GImGui; if (g.LogEnabled) return; - ImGuiWindow* window = GetCurrentWindowRead(); + ImGuiWindow* window = g.CurrentWindow; - g.LogEnabled = true; + IM_ASSERT(g.LogFile == NULL); g.LogFile = stdout; + g.LogEnabled = true; g.LogStartDepth = window->DC.TreeDepth; if (max_depth >= 0) g.LogAutoExpandMaxDepth = max_depth; @@ -5804,7 +6589,7 @@ void ImGui::LogToFile(int max_depth, const char* filename) ImGuiContext& g = *GImGui; if (g.LogEnabled) return; - ImGuiWindow* window = GetCurrentWindowRead(); + ImGuiWindow* window = g.CurrentWindow; if (!filename) { @@ -5813,6 +6598,7 @@ void ImGui::LogToFile(int max_depth, const char* filename) return; } + IM_ASSERT(g.LogFile == NULL); g.LogFile = ImFileOpen(filename, "ab"); if (!g.LogFile) { @@ -5831,10 +6617,11 @@ void ImGui::LogToClipboard(int max_depth) ImGuiContext& g = *GImGui; if (g.LogEnabled) return; - ImGuiWindow* window = GetCurrentWindowRead(); + ImGuiWindow* window = g.CurrentWindow; - g.LogEnabled = true; + IM_ASSERT(g.LogFile == NULL); g.LogFile = NULL; + g.LogEnabled = true; g.LogStartDepth = window->DC.TreeDepth; if (max_depth >= 0) g.LogAutoExpandMaxDepth = max_depth; @@ -5847,7 +6634,6 @@ void ImGui::LogFinish() return; LogText(IM_NEWLINE); - g.LogEnabled = false; if (g.LogFile != NULL) { if (g.LogFile == stdout) @@ -5861,6 +6647,7 @@ void ImGui::LogFinish() SetClipboardText(g.LogClipboard->begin()); g.LogClipboard->clear(); } + g.LogEnabled = false; } // Helper to display logging buttons @@ -5899,20 +6686,20 @@ bool ImGui::TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags) ImGuiStorage* storage = window->DC.StateStorage; bool is_open; - if (g.SetNextTreeNodeOpenCond != 0) + if (g.NextTreeNodeOpenCond != 0) { - if (g.SetNextTreeNodeOpenCond & ImGuiSetCond_Always) + if (g.NextTreeNodeOpenCond & ImGuiCond_Always) { - is_open = g.SetNextTreeNodeOpenVal; + is_open = g.NextTreeNodeOpenVal; storage->SetInt(id, is_open); } else { - // We treat ImGuiSetCondition_Once and ImGuiSetCondition_FirstUseEver the same because tree node state are not saved persistently. + // We treat ImGuiCond_Once and ImGuiCond_FirstUseEver the same because tree node state are not saved persistently. const int stored_value = storage->GetInt(id, -1); if (stored_value == -1) { - is_open = g.SetNextTreeNodeOpenVal; + is_open = g.NextTreeNodeOpenVal; storage->SetInt(id, is_open); } else @@ -5920,7 +6707,7 @@ bool ImGui::TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags) is_open = stored_value != 0; } } - g.SetNextTreeNodeOpenCond = 0; + g.NextTreeNodeOpenCond = 0; } else { @@ -5944,14 +6731,14 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l ImGuiContext& g = *GImGui; const ImGuiStyle& style = g.Style; const bool display_frame = (flags & ImGuiTreeNodeFlags_Framed) != 0; - const ImVec2 padding = display_frame ? style.FramePadding : ImVec2(style.FramePadding.x, 0.0f); + const ImVec2 padding = (display_frame || (flags & ImGuiTreeNodeFlags_FramePadding)) ? style.FramePadding : ImVec2(style.FramePadding.x, 0.0f); if (!label_end) label_end = FindRenderedTextEnd(label); const ImVec2 label_size = CalcTextSize(label, label_end, false); // We vertically grow up to current line height up the typical widget height. - const float text_base_offset_y = ImMax(0.0f, window->DC.CurrentLineTextBaseOffset - padding.y); // Latch before ItemSize changes it + const float text_base_offset_y = ImMax(padding.y, window->DC.CurrentLineTextBaseOffset); // Latch before ItemSize changes it const float frame_height = ImMax(ImMin(window->DC.CurrentLineHeight, g.FontSize + style.FramePadding.y*2), label_size.y + padding.y*2); ImRect bb = ImRect(window->DC.CursorPos, ImVec2(window->Pos.x + GetContentRegionMax().x, window->DC.CursorPos.y + frame_height)); if (display_frame) @@ -5966,10 +6753,10 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l ItemSize(ImVec2(text_width, frame_height), text_base_offset_y); // For regular tree nodes, we arbitrary allow to click past 2 worth of ItemSpacing - // (Ideally we'd want to add a flag for the user to specify we want want the hit test to be done up to the right side of the content or not) + // (Ideally we'd want to add a flag for the user to specify if we want the hit test to be done up to the right side of the content or not) const ImRect interact_bb = display_frame ? bb : ImRect(bb.Min.x, bb.Min.y, bb.Min.x + text_width + style.ItemSpacing.x*2, bb.Max.y); bool is_open = TreeNodeBehaviorIsOpen(id, flags); - if (!ItemAdd(interact_bb, &id)) + if (!ItemAdd(interact_bb, id)) { if (is_open && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen)) TreePushRawID(id); @@ -5981,9 +6768,12 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l // - OpenOnDoubleClick .............. double-click anywhere to open // - OpenOnArrow .................... single-click on arrow to open // - OpenOnDoubleClick|OpenOnArrow .. single-click on arrow or double-click anywhere to open - ImGuiButtonFlags button_flags = ImGuiButtonFlags_NoKeyModifiers | ((flags & ImGuiTreeNodeFlags_AllowOverlapMode) ? ImGuiButtonFlags_AllowOverlapMode : 0); + ImGuiButtonFlags button_flags = ImGuiButtonFlags_NoKeyModifiers | ((flags & ImGuiTreeNodeFlags_AllowItemOverlap) ? ImGuiButtonFlags_AllowItemOverlap : 0); + if (!(flags & ImGuiTreeNodeFlags_Leaf)) + button_flags |= ImGuiButtonFlags_PressedOnDragDropHold; if (flags & ImGuiTreeNodeFlags_OpenOnDoubleClick) button_flags |= ImGuiButtonFlags_PressedOnDoubleClick | ((flags & ImGuiTreeNodeFlags_OpenOnArrow) ? ImGuiButtonFlags_PressedOnClickRelease : 0); + bool hovered, held, pressed = ButtonBehavior(interact_bb, id, &hovered, &held, button_flags); if (pressed && !(flags & ImGuiTreeNodeFlags_Leaf)) { @@ -5992,31 +6782,33 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l toggled |= IsMouseHoveringRect(interact_bb.Min, ImVec2(interact_bb.Min.x + text_offset_x, interact_bb.Max.y)); if (flags & ImGuiTreeNodeFlags_OpenOnDoubleClick) toggled |= g.IO.MouseDoubleClicked[0]; + if (g.DragDropActive && is_open) // When using Drag and Drop "hold to open" we keep the node highlighted after opening, but never close it again. + toggled = false; if (toggled) { is_open = !is_open; window->DC.StateStorage->SetInt(id, is_open); } } - if (flags & ImGuiTreeNodeFlags_AllowOverlapMode) + if (flags & ImGuiTreeNodeFlags_AllowItemOverlap) SetItemAllowOverlap(); // Render const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header); - const ImVec2 text_pos = bb.Min + ImVec2(text_offset_x, padding.y + text_base_offset_y); + const ImVec2 text_pos = bb.Min + ImVec2(text_offset_x, text_base_offset_y); if (display_frame) { // Framed type RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding); - RenderCollapseTriangle(bb.Min + padding + ImVec2(0.0f, text_base_offset_y), is_open, 1.0f); + RenderTriangle(bb.Min + ImVec2(padding.x, text_base_offset_y), is_open ? ImGuiDir_Down : ImGuiDir_Right, 1.0f); if (g.LogEnabled) { // NB: '##' is normally used to hide text (as a library-wide feature), so we need to specify the text range to make sure the ## aren't stripped out here. const char log_prefix[] = "\n##"; const char log_suffix[] = "##"; - LogRenderedText(text_pos, log_prefix, log_prefix+3); + LogRenderedText(&text_pos, log_prefix, log_prefix+3); RenderTextClipped(text_pos, bb.Max, label, label_end, &label_size); - LogRenderedText(text_pos, log_suffix+1, log_suffix+3); + LogRenderedText(&text_pos, log_suffix+1, log_suffix+3); } else { @@ -6032,9 +6824,9 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l if (flags & ImGuiTreeNodeFlags_Bullet) RenderBullet(bb.Min + ImVec2(text_offset_x * 0.5f, g.FontSize*0.50f + text_base_offset_y)); else if (!(flags & ImGuiTreeNodeFlags_Leaf)) - RenderCollapseTriangle(bb.Min + ImVec2(padding.x, g.FontSize*0.15f + text_base_offset_y), is_open, 0.70f); + RenderTriangle(bb.Min + ImVec2(padding.x, g.FontSize*0.15f + text_base_offset_y), is_open ? ImGuiDir_Down : ImGuiDir_Right, 0.70f); if (g.LogEnabled) - LogRenderedText(text_pos, ">"); + LogRenderedText(&text_pos, ">"); RenderText(text_pos, label, label_end, false); } @@ -6064,14 +6856,16 @@ bool ImGui::CollapsingHeader(const char* label, bool* p_open, ImGuiTreeNodeFlags return false; ImGuiID id = window->GetID(label); - bool is_open = TreeNodeBehavior(id, flags | ImGuiTreeNodeFlags_CollapsingHeader | ImGuiTreeNodeFlags_NoTreePushOnOpen | (p_open ? ImGuiTreeNodeFlags_AllowOverlapMode : 0), label); + bool is_open = TreeNodeBehavior(id, flags | ImGuiTreeNodeFlags_CollapsingHeader | ImGuiTreeNodeFlags_NoTreePushOnOpen | (p_open ? ImGuiTreeNodeFlags_AllowItemOverlap : 0), label); if (p_open) { // Create a small overlapping close button // FIXME: We can evolve this into user accessible helpers to add extra buttons on title bars, headers, etc. ImGuiContext& g = *GImGui; float button_sz = g.FontSize * 0.5f; + ImGuiItemHoveredDataBackup last_item_backup; if (CloseButton(window->GetID((void*)(intptr_t)(id+1)), ImVec2(ImMin(window->DC.LastItemRect.Max.x, window->ClipRect.Max.x) - g.Style.FramePadding.x - button_sz, window->DC.LastItemRect.Min.y + g.Style.FramePadding.y + button_sz), button_sz)) *p_open = false; + last_item_backup.Restore(); } return is_open; @@ -6175,41 +6969,43 @@ float ImGui::GetTreeNodeToLabelSpacing() return g.FontSize + (g.Style.FramePadding.x * 2.0f); } -void ImGui::SetNextTreeNodeOpen(bool is_open, ImGuiSetCond cond) +void ImGui::SetNextTreeNodeOpen(bool is_open, ImGuiCond cond) { ImGuiContext& g = *GImGui; - g.SetNextTreeNodeOpenVal = is_open; - g.SetNextTreeNodeOpenCond = cond ? cond : ImGuiSetCond_Always; + if (g.CurrentWindow->SkipItems) + return; + g.NextTreeNodeOpenVal = is_open; + g.NextTreeNodeOpenCond = cond ? cond : ImGuiCond_Always; } void ImGui::PushID(const char* str_id) { - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = GetCurrentWindowRead(); window->IDStack.push_back(window->GetID(str_id)); } void ImGui::PushID(const char* str_id_begin, const char* str_id_end) { - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = GetCurrentWindowRead(); window->IDStack.push_back(window->GetID(str_id_begin, str_id_end)); } void ImGui::PushID(const void* ptr_id) { - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = GetCurrentWindowRead(); window->IDStack.push_back(window->GetID(ptr_id)); } void ImGui::PushID(int int_id) { const void* ptr_id = (void*)(intptr_t)int_id; - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = GetCurrentWindowRead(); window->IDStack.push_back(window->GetID(ptr_id)); } void ImGui::PopID() { - ImGuiWindow* window = GetCurrentWindow(); + ImGuiWindow* window = GetCurrentWindowRead(); window->IDStack.pop_back(); } @@ -6239,7 +7035,7 @@ void ImGui::Bullet() const float line_height = ImMax(ImMin(window->DC.CurrentLineHeight, g.FontSize + g.Style.FramePadding.y*2), g.FontSize); const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(g.FontSize, line_height)); ItemSize(bb); - if (!ItemAdd(bb, NULL)) + if (!ItemAdd(bb, 0)) { SameLine(0, style.FramePadding.x*2); return; @@ -6267,7 +7063,7 @@ void ImGui::BulletTextV(const char* fmt, va_list args) const float line_height = ImMax(ImMin(window->DC.CurrentLineHeight, g.FontSize + g.Style.FramePadding.y*2), g.FontSize); const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(g.FontSize + (label_size.x > 0.0f ? (label_size.x + style.FramePadding.x*2) : 0.0f), ImMax(line_height, label_size.y))); // Empty text doesn't add padding ItemSize(bb); - if (!ItemAdd(bb, NULL)) + if (!ItemAdd(bb, 0)) return; // Render @@ -6355,16 +7151,16 @@ static bool DataTypeApplyOpFromText(const char* buf, const char* initial_value_b scalar_format = "%d"; int* v = (int*)data_ptr; const int old_v = *v; - int arg0 = *v; - if (op && sscanf(initial_value_buf, scalar_format, &arg0) < 1) + int arg0i = *v; + if (op && sscanf(initial_value_buf, scalar_format, &arg0i) < 1) return false; // Store operand in a float so we can use fractional value for multipliers (*1.1), but constant always parsed as integer so we can fit big integers (e.g. 2000000003) past float precision - float arg1 = 0.0f; - if (op == '+') { if (sscanf(buf, "%f", &arg1) == 1) *v = (int)(arg0 + arg1); } // Add (use "+-" to subtract) - else if (op == '*') { if (sscanf(buf, "%f", &arg1) == 1) *v = (int)(arg0 * arg1); } // Multiply - else if (op == '/') { if (sscanf(buf, "%f", &arg1) == 1 && arg1 != 0.0f) *v = (int)(arg0 / arg1); }// Divide - else { if (sscanf(buf, scalar_format, &arg0) == 1) *v = arg0; } // Assign constant + float arg1f = 0.0f; + if (op == '+') { if (sscanf(buf, "%f", &arg1f) == 1) *v = (int)(arg0i + arg1f); } // Add (use "+-" to subtract) + else if (op == '*') { if (sscanf(buf, "%f", &arg1f) == 1) *v = (int)(arg0i * arg1f); } // Multiply + else if (op == '/') { if (sscanf(buf, "%f", &arg1f) == 1 && arg1f != 0.0f) *v = (int)(arg0i / arg1f); }// Divide + else { if (sscanf(buf, scalar_format, &arg0i) == 1) *v = arg0i; } // Assign constant (read as integer so big values are not lossy) return (old_v != *v); } else if (data_type == ImGuiDataType_Float) @@ -6373,17 +7169,17 @@ static bool DataTypeApplyOpFromText(const char* buf, const char* initial_value_b scalar_format = "%f"; float* v = (float*)data_ptr; const float old_v = *v; - float arg0 = *v; - if (op && sscanf(initial_value_buf, scalar_format, &arg0) < 1) + float arg0f = *v; + if (op && sscanf(initial_value_buf, scalar_format, &arg0f) < 1) return false; - float arg1 = 0.0f; - if (sscanf(buf, scalar_format, &arg1) < 1) + float arg1f = 0.0f; + if (sscanf(buf, scalar_format, &arg1f) < 1) return false; - if (op == '+') { *v = arg0 + arg1; } // Add (use "+-" to subtract) - else if (op == '*') { *v = arg0 * arg1; } // Multiply - else if (op == '/') { if (arg1 != 0.0f) *v = arg0 / arg1; } // Divide - else { *v = arg1; } // Assign constant + if (op == '+') { *v = arg0f + arg1f; } // Add (use "+-" to subtract) + else if (op == '*') { *v = arg0f * arg1f; } // Multiply + else if (op == '/') { if (arg1f != 0.0f) *v = arg0f / arg1f; } // Divide + else { *v = arg1f; } // Assign constant return (old_v != *v); } @@ -6391,12 +7187,14 @@ static bool DataTypeApplyOpFromText(const char* buf, const char* initial_value_b } // Create text input in place of a slider (when CTRL+Clicking on slider) +// FIXME: Logic is messy and confusing. bool ImGui::InputScalarAsWidgetReplacement(const ImRect& aabb, const char* label, ImGuiDataType data_type, void* data_ptr, ImGuiID id, int decimal_precision) { ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); // Our replacement widget will override the focus ID (registered previously to allow for a TAB focus to happen) + // On the first frame, g.ScalarAsInputTextId == 0, then on subsequent frames it becomes == id SetActiveID(g.ScalarAsInputTextId, window); SetHoveredID(0); FocusableItemUnregister(window); @@ -6404,18 +7202,12 @@ bool ImGui::InputScalarAsWidgetReplacement(const ImRect& aabb, const char* label char buf[32]; DataTypeFormatString(data_type, data_ptr, decimal_precision, buf, IM_ARRAYSIZE(buf)); bool text_value_changed = InputTextEx(label, buf, IM_ARRAYSIZE(buf), aabb.GetSize(), ImGuiInputTextFlags_CharsDecimal | ImGuiInputTextFlags_AutoSelectAll); - if (g.ScalarAsInputTextId == 0) + if (g.ScalarAsInputTextId == 0) // First frame we started displaying the InputText widget { - // First frame IM_ASSERT(g.ActiveId == id); // InputText ID expected to match the Slider ID (else we'd need to store them both, which is also possible) g.ScalarAsInputTextId = g.ActiveId; SetHoveredID(id); } - else if (g.ActiveId != g.ScalarAsInputTextId) - { - // Release - g.ScalarAsInputTextId = 0; - } if (text_value_changed) return DataTypeApplyOpFromText(buf, GImGui->InputTextState.InitialText.begin(), data_type, data_ptr, NULL); return false; @@ -6433,22 +7225,31 @@ int ImGui::ParseFormatPrecision(const char* fmt, int default_precision) fmt++; if (*fmt == '.') { - precision = atoi(fmt + 1); + fmt = ImAtoi(fmt + 1, &precision); if (precision < 0 || precision > 10) precision = default_precision; } + if (*fmt == 'e' || *fmt == 'E') // Maximum precision with scientific notation + precision = -1; break; } return precision; } +static float GetMinimumStepAtDecimalPrecision(int decimal_precision) +{ + static const float min_steps[10] = { 1.0f, 0.1f, 0.01f, 0.001f, 0.0001f, 0.00001f, 0.000001f, 0.0000001f, 0.00000001f, 0.000000001f }; + return (decimal_precision >= 0 && decimal_precision < 10) ? min_steps[decimal_precision] : powf(10.0f, (float)-decimal_precision); +} + float ImGui::RoundScalar(float value, int decimal_precision) { // Round past decimal precision // So when our value is 1.99999 with a precision of 0.001 we'll end up rounding to 2.0 // FIXME: Investigate better rounding methods - static const float min_steps[10] = { 1.0f, 0.1f, 0.01f, 0.001f, 0.0001f, 0.00001f, 0.000001f, 0.0000001f, 0.00000001f, 0.000000001f }; - float min_step = (decimal_precision >= 0 && decimal_precision < 10) ? min_steps[decimal_precision] : powf(10.0f, (float)-decimal_precision); + if (decimal_precision < 0) + return value; + const float min_step = GetMinimumStepAtDecimalPrecision(decimal_precision); bool negative = value < 0.0f; value = fabsf(value); float remainder = fmodf(value, min_step); @@ -6499,7 +7300,7 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v const float grab_padding = 2.0f; const float slider_sz = is_horizontal ? (frame_bb.GetWidth() - grab_padding * 2.0f) : (frame_bb.GetHeight() - grab_padding * 2.0f); float grab_sz; - if (decimal_precision > 0) + if (decimal_precision != 0) grab_sz = ImMin(style.GrabMinSize, slider_sz); else grab_sz = ImMin(ImMax(1.0f * (slider_sz / ((v_min < v_max ? v_max - v_min : v_min - v_max) + 1.0f)), style.GrabMinSize), slider_sz); // Integer sliders, if possible have the grab size represent 1 unit @@ -6526,13 +7327,23 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v bool value_changed = false; if (g.ActiveId == id) { + bool set_new_value = false; + float clicked_t = 0.0f; if (g.IO.MouseDown[0]) { const float mouse_abs_pos = is_horizontal ? g.IO.MousePos.x : g.IO.MousePos.y; - float clicked_t = (slider_usable_sz > 0.0f) ? ImClamp((mouse_abs_pos - slider_usable_pos_min) / slider_usable_sz, 0.0f, 1.0f) : 0.0f; + clicked_t = (slider_usable_sz > 0.0f) ? ImClamp((mouse_abs_pos - slider_usable_pos_min) / slider_usable_sz, 0.0f, 1.0f) : 0.0f; if (!is_horizontal) clicked_t = 1.0f - clicked_t; + set_new_value = true; + } + else + { + ClearActiveID(); + } + if (set_new_value) + { float new_value; if (is_non_linear) { @@ -6570,16 +7381,10 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v value_changed = true; } } - else - { - ClearActiveID(); - } } - // Calculate slider grab positioning - float grab_t = SliderBehaviorCalcRatioFromValue(*v, v_min, v_max, power, linear_zero_pos); - // Draw + float grab_t = SliderBehaviorCalcRatioFromValue(*v, v_min, v_max, power, linear_zero_pos); if (!is_horizontal) grab_t = 1.0f - grab_t; const float grab_pos = ImLerp(slider_usable_pos_min, slider_usable_pos_max, grab_t); @@ -6614,15 +7419,12 @@ bool ImGui::SliderFloat(const char* label, float* v, float v_min, float v_max, c const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); // NB- we don't call ItemSize() yet because we may turn into a text edit box below - if (!ItemAdd(total_bb, &id)) + if (!ItemAdd(total_bb, id)) { ItemSize(total_bb, style.FramePadding.y); return false; } - - const bool hovered = IsHovered(frame_bb, id); - if (hovered) - SetHoveredID(id); + const bool hovered = ItemHoverable(frame_bb, id); if (!display_format) display_format = "%.3f"; @@ -6630,12 +7432,11 @@ bool ImGui::SliderFloat(const char* label, float* v, float v_min, float v_max, c // Tabbing or CTRL-clicking on Slider turns it into an input box bool start_text_input = false; - const bool tab_focus_requested = FocusableItemRegister(window, g.ActiveId == id); + const bool tab_focus_requested = FocusableItemRegister(window, id); if (tab_focus_requested || (hovered && g.IO.MouseClicked[0])) { SetActiveID(id, window); FocusWindow(window); - if (tab_focus_requested || g.IO.KeyCtrl) { start_text_input = true; @@ -6645,9 +7446,8 @@ bool ImGui::SliderFloat(const char* label, float* v, float v_min, float v_max, c if (start_text_input || (g.ActiveId == id && g.ScalarAsInputTextId == id)) return InputScalarAsWidgetReplacement(frame_bb, label, ImGuiDataType_Float, v, id, decimal_precision); - ItemSize(total_bb, style.FramePadding.y); - // Actual slider behavior + render grab + ItemSize(total_bb, style.FramePadding.y); const bool value_changed = SliderBehavior(frame_bb, id, v, v_min, v_max, power, decimal_precision); // Display value using user-provided display format so user can add prefix/suffix/decorations to the value. @@ -6676,12 +7476,9 @@ bool ImGui::VSliderFloat(const char* label, const ImVec2& size, float* v, float const ImRect bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); ItemSize(bb, style.FramePadding.y); - if (!ItemAdd(frame_bb, &id)) + if (!ItemAdd(frame_bb, id)) return false; - - const bool hovered = IsHovered(frame_bb, id); - if (hovered) - SetHoveredID(id); + const bool hovered = ItemHoverable(frame_bb, id); if (!display_format) display_format = "%.3f"; @@ -6843,34 +7640,42 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s g.DragLastMouseDelta = ImVec2(0.f, 0.f); } + if (v_speed == 0.0f && (v_max - v_min) != 0.0f && (v_max - v_min) < FLT_MAX) + v_speed = (v_max - v_min) * g.DragSpeedDefaultRatio; + float v_cur = g.DragCurrentValue; const ImVec2 mouse_drag_delta = GetMouseDragDelta(0, 1.0f); - if (fabsf(mouse_drag_delta.x - g.DragLastMouseDelta.x) > 0.0f) + float adjust_delta = 0.0f; + if (IsMousePosValid()) { - float speed = v_speed; - if (speed == 0.0f && (v_max - v_min) != 0.0f && (v_max - v_min) < FLT_MAX) - speed = (v_max - v_min) * g.DragSpeedDefaultRatio; - if (g.IO.KeyShift && g.DragSpeedScaleFast >= 0.0f) - speed = speed * g.DragSpeedScaleFast; - if (g.IO.KeyAlt && g.DragSpeedScaleSlow >= 0.0f) - speed = speed * g.DragSpeedScaleSlow; + //if (g.ActiveIdSource == ImGuiInputSource_Mouse) + { + adjust_delta = mouse_drag_delta.x - g.DragLastMouseDelta.x; + if (g.IO.KeyShift && g.DragSpeedScaleFast >= 0.0f) + adjust_delta *= g.DragSpeedScaleFast; + if (g.IO.KeyAlt && g.DragSpeedScaleSlow >= 0.0f) + adjust_delta *= g.DragSpeedScaleSlow; + } + g.DragLastMouseDelta.x = mouse_drag_delta.x; + } + adjust_delta *= v_speed; - float delta = (mouse_drag_delta.x - g.DragLastMouseDelta.x) * speed; + if (fabsf(adjust_delta) > 0.0f) + { if (fabsf(power - 1.0f) > 0.001f) { // Logarithmic curve on both side of 0.0 float v0_abs = v_cur >= 0.0f ? v_cur : -v_cur; float v0_sign = v_cur >= 0.0f ? 1.0f : -1.0f; - float v1 = powf(v0_abs, 1.0f / power) + (delta * v0_sign); + float v1 = powf(v0_abs, 1.0f / power) + (adjust_delta * v0_sign); float v1_abs = v1 >= 0.0f ? v1 : -v1; float v1_sign = v1 >= 0.0f ? 1.0f : -1.0f; // Crossed sign line v_cur = powf(v1_abs, power) * v0_sign * v1_sign; // Reapply sign } else { - v_cur += delta; + v_cur += adjust_delta; } - g.DragLastMouseDelta.x = mouse_drag_delta.x; // Clamp if (v_min < v_max) @@ -6912,15 +7717,12 @@ bool ImGui::DragFloat(const char* label, float* v, float v_speed, float v_min, f const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); // NB- we don't call ItemSize() yet because we may turn into a text edit box below - if (!ItemAdd(total_bb, &id)) + if (!ItemAdd(total_bb, id)) { ItemSize(total_bb, style.FramePadding.y); return false; } - - const bool hovered = IsHovered(frame_bb, id); - if (hovered) - SetHoveredID(id); + const bool hovered = ItemHoverable(frame_bb, id); if (!display_format) display_format = "%.3f"; @@ -6928,12 +7730,11 @@ bool ImGui::DragFloat(const char* label, float* v, float v_speed, float v_min, f // Tabbing or CTRL-clicking on Drag turns it into an input box bool start_text_input = false; - const bool tab_focus_requested = FocusableItemRegister(window, g.ActiveId == id); - if (tab_focus_requested || (hovered && (g.IO.MouseClicked[0] | g.IO.MouseDoubleClicked[0]))) + const bool tab_focus_requested = FocusableItemRegister(window, id); + if (tab_focus_requested || (hovered && (g.IO.MouseClicked[0] || g.IO.MouseDoubleClicked[0]))) { SetActiveID(id, window); FocusWindow(window); - if (tab_focus_requested || g.IO.KeyCtrl || g.IO.MouseDoubleClicked[0]) { start_text_input = true; @@ -7122,8 +7923,9 @@ void ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_ge const ImRect inner_bb(frame_bb.Min + style.FramePadding, frame_bb.Max - style.FramePadding); const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0)); ItemSize(total_bb, style.FramePadding.y); - if (!ItemAdd(total_bb, NULL)) + if (!ItemAdd(total_bb, 0)) return; + const bool hovered = ItemHoverable(inner_bb, 0); // Determine scale from values if not specified if (scale_min == FLT_MAX || scale_max == FLT_MAX) @@ -7151,7 +7953,7 @@ void ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_ge // Tooltip on hover int v_hovered = -1; - if (IsHovered(inner_bb, 0)) + if (hovered) { const float t = ImClamp((g.IO.MousePos.x - inner_bb.Min.x) / (inner_bb.Max.x - inner_bb.Min.x), 0.0f, 0.9999f); const int v_idx = (int)(t * item_count); @@ -7170,7 +7972,8 @@ void ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_ge float v0 = values_getter(data, (0 + values_offset) % values_count); float t0 = 0.0f; - ImVec2 tp0 = ImVec2( t0, 1.0f - ImSaturate((v0 - scale_min) / (scale_max - scale_min)) ); // Point in the normalized space of our target rectangle + ImVec2 tp0 = ImVec2( t0, 1.0f - ImSaturate((v0 - scale_min) / (scale_max - scale_min)) ); // Point in the normalized space of our target rectangle + float histogram_zero_line_t = (scale_min * scale_max < 0.0f) ? (-scale_min / (scale_max - scale_min)) : (scale_min < 0.0f ? 0.0f : 1.0f); // Where does the zero line stands const ImU32 col_base = GetColorU32((plot_type == ImGuiPlotType_Lines) ? ImGuiCol_PlotLines : ImGuiCol_PlotHistogram); const ImU32 col_hovered = GetColorU32((plot_type == ImGuiPlotType_Lines) ? ImGuiCol_PlotLinesHovered : ImGuiCol_PlotHistogramHovered); @@ -7185,7 +7988,7 @@ void ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_ge // NB: Draw calls are merged together by the DrawList system. Still, we should render our batch are lower level to save a bit of CPU. ImVec2 pos0 = ImLerp(inner_bb.Min, inner_bb.Max, tp0); - ImVec2 pos1 = ImLerp(inner_bb.Min, inner_bb.Max, (plot_type == ImGuiPlotType_Lines) ? tp1 : ImVec2(tp1.x, 1.0f)); + ImVec2 pos1 = ImLerp(inner_bb.Min, inner_bb.Max, (plot_type == ImGuiPlotType_Lines) ? tp1 : ImVec2(tp1.x, histogram_zero_line_t)); if (plot_type == ImGuiPlotType_Lines) { window->DrawList->AddLine(pos0, pos1, v_hovered == v1_idx ? col_hovered : col_base); @@ -7260,15 +8063,15 @@ void ImGui::ProgressBar(float fraction, const ImVec2& size_arg, const char* over ImVec2 pos = window->DC.CursorPos; ImRect bb(pos, pos + CalcItemSize(size_arg, CalcItemWidth(), g.FontSize + style.FramePadding.y*2.0f)); ItemSize(bb, style.FramePadding.y); - if (!ItemAdd(bb, NULL)) + if (!ItemAdd(bb, 0)) return; // Render fraction = ImSaturate(fraction); RenderFrame(bb.Min, bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding); - bb.Reduce(ImVec2(window->BorderSize, window->BorderSize)); + bb.Expand(ImVec2(-style.FrameBorderSize, -style.FrameBorderSize)); const ImVec2 fill_br = ImVec2(ImLerp(bb.Min.x, bb.Max.x, fraction), bb.Max.y); - RenderFrame(bb.Min, fill_br, GetColorU32(ImGuiCol_PlotHistogram), false, style.FrameRounding); + RenderRectFilledRangeH(window->DrawList, bb, GetColorU32(ImGuiCol_PlotHistogram), 0.0f, fraction, style.FrameRounding); // Default displaying the fraction as percentage string, but user can override it char overlay_buf[32]; @@ -7294,7 +8097,7 @@ bool ImGui::Checkbox(const char* label, bool* v) const ImGuiID id = window->GetID(label); const ImVec2 label_size = CalcTextSize(label, NULL, true); - const ImRect check_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(label_size.y + style.FramePadding.y*2, label_size.y + style.FramePadding.y*2)); + const ImRect check_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(label_size.y + style.FramePadding.y*2, label_size.y + style.FramePadding.y*2)); // We want a square shape to we use Y twice ItemSize(check_bb, style.FramePadding.y); ImRect total_bb = check_bb; @@ -7307,7 +8110,7 @@ bool ImGui::Checkbox(const char* label, bool* v) total_bb = ImRect(ImMin(check_bb.Min, text_bb.Min), ImMax(check_bb.Max, text_bb.Max)); } - if (!ItemAdd(total_bb, &id)) + if (!ItemAdd(total_bb, id)) return false; bool hovered, held; @@ -7320,13 +8123,13 @@ bool ImGui::Checkbox(const char* label, bool* v) { const float check_sz = ImMin(check_bb.GetWidth(), check_bb.GetHeight()); const float pad = ImMax(1.0f, (float)(int)(check_sz / 6.0f)); - window->DrawList->AddRectFilled(check_bb.Min+ImVec2(pad,pad), check_bb.Max-ImVec2(pad,pad), GetColorU32(ImGuiCol_CheckMark), style.FrameRounding); + RenderCheckMark(check_bb.Min + ImVec2(pad,pad), GetColorU32(ImGuiCol_CheckMark), check_bb.GetWidth() - pad*2.0f); } if (g.LogEnabled) - LogRenderedText(text_bb.GetTL(), *v ? "[x]" : "[ ]"); + LogRenderedText(&text_bb.Min, *v ? "[x]" : "[ ]"); if (label_size.x > 0.0f) - RenderText(text_bb.GetTL(), label); + RenderText(text_bb.Min, label); return pressed; } @@ -7370,7 +8173,7 @@ bool ImGui::RadioButton(const char* label, bool active) total_bb.Add(text_bb); } - if (!ItemAdd(total_bb, &id)) + if (!ItemAdd(total_bb, id)) return false; ImVec2 center = check_bb.GetCenter(); @@ -7389,16 +8192,16 @@ bool ImGui::RadioButton(const char* label, bool active) window->DrawList->AddCircleFilled(center, radius-pad, GetColorU32(ImGuiCol_CheckMark), 16); } - if (window->Flags & ImGuiWindowFlags_ShowBorders) + if (style.FrameBorderSize > 0.0f) { - window->DrawList->AddCircle(center+ImVec2(1,1), radius, GetColorU32(ImGuiCol_BorderShadow), 16); - window->DrawList->AddCircle(center, radius, GetColorU32(ImGuiCol_Border), 16); + window->DrawList->AddCircle(center+ImVec2(1,1), radius, GetColorU32(ImGuiCol_BorderShadow), 16, style.FrameBorderSize); + window->DrawList->AddCircle(center, radius, GetColorU32(ImGuiCol_Border), 16, style.FrameBorderSize); } if (g.LogEnabled) - LogRenderedText(text_bb.GetTL(), active ? "(x)" : "( )"); + LogRenderedText(&text_bb.Min, active ? "(x)" : "( )"); if (label_size.x > 0.0f) - RenderText(text_bb.GetTL(), label); + RenderText(text_bb.Min, label); return pressed; } @@ -7684,6 +8487,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 const bool is_multiline = (flags & ImGuiInputTextFlags_Multiline) != 0; const bool is_editable = (flags & ImGuiInputTextFlags_ReadOnly) == 0; const bool is_password = (flags & ImGuiInputTextFlags_Password) != 0; + const bool is_undoable = (flags & ImGuiInputTextFlags_NoUndoRedo) == 0; if (is_multiline) // Open group before calling GetID() because groups tracks id created during their spawn BeginGroup(); @@ -7708,14 +8512,17 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 else { ItemSize(total_bb, style.FramePadding.y); - if (!ItemAdd(total_bb, &id)) + if (!ItemAdd(total_bb, id)) return false; } + const bool hovered = ItemHoverable(frame_bb, id); + if (hovered) + g.MouseCursor = ImGuiMouseCursor_TextInput; // Password pushes a temporary font with only a fallback glyph if (is_password) { - const ImFont::Glyph* glyph = g.Font->FindGlyph('*'); + const ImFontGlyph* glyph = g.Font->FindGlyph('*'); ImFont* password_font = &g.InputTextPasswordFont; password_font->FontSize = g.Font->FontSize; password_font->Scale = g.Font->Scale; @@ -7724,27 +8531,23 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 password_font->Descent = g.Font->Descent; password_font->ContainerAtlas = g.Font->ContainerAtlas; password_font->FallbackGlyph = glyph; - password_font->FallbackXAdvance = glyph->XAdvance; - IM_ASSERT(password_font->Glyphs.empty() && password_font->IndexXAdvance.empty() && password_font->IndexLookup.empty()); + password_font->FallbackAdvanceX = glyph->AdvanceX; + IM_ASSERT(password_font->Glyphs.empty() && password_font->IndexAdvanceX.empty() && password_font->IndexLookup.empty()); PushFont(password_font); } // NB: we are only allowed to access 'edit_state' if we are the active widget. ImGuiTextEditState& edit_state = g.InputTextState; - const bool focus_requested = FocusableItemRegister(window, g.ActiveId == id, (flags & (ImGuiInputTextFlags_CallbackCompletion|ImGuiInputTextFlags_AllowTabInput)) == 0); // Using completion callback disable keyboard tabbing + const bool focus_requested = FocusableItemRegister(window, id, (flags & (ImGuiInputTextFlags_CallbackCompletion|ImGuiInputTextFlags_AllowTabInput)) == 0); // Using completion callback disable keyboard tabbing const bool focus_requested_by_code = focus_requested && (window->FocusIdxAllCounter == window->FocusIdxAllRequestCurrent); const bool focus_requested_by_tab = focus_requested && !focus_requested_by_code; - const bool hovered = IsHovered(frame_bb, id); - if (hovered) - { - SetHoveredID(id); - g.MouseCursor = ImGuiMouseCursor_TextInput; - } const bool user_clicked = hovered && io.MouseClicked[0]; const bool user_scrolled = is_multiline && g.ActiveId == 0 && edit_state.Id == id && g.ActiveIdPreviousFrame == draw_window->GetIDNoKeepAlive("#SCROLLY"); + bool clear_active_id = false; + bool select_all = (g.ActiveId != id) && (flags & ImGuiInputTextFlags_AutoSelectAll) != 0; if (focus_requested || user_clicked || user_scrolled) { @@ -7790,8 +8593,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 else if (io.MouseClicked[0]) { // Release focus when we click outside - if (g.ActiveId == id) - ClearActiveID(); + clear_active_id = true; } bool value_changed = false; @@ -7814,12 +8616,13 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 // Although we are active we don't prevent mouse from hovering other elements unless we are interacting right now with the widget. // Down the line we should have a cleaner library-wide concept of Selected vs Active. g.ActiveIdAllowOverlap = !io.MouseDown[0]; + g.WantTextInputNextFrame = 1; // Edit in progress const float mouse_x = (io.MousePos.x - frame_bb.Min.x - style.FramePadding.x) + edit_state.ScrollX; const float mouse_y = (is_multiline ? (io.MousePos.y - draw_window->DC.CursorPos.y - style.FramePadding.y) : (g.FontSize*0.5f)); - const bool osx_double_click_selects_words = io.OSXBehaviors; // OS X style: Double click selects by word instead of selecting whole text + const bool osx_double_click_selects_words = io.OptMacOSXBehaviors; // OS X style: Double click selects by word instead of selecting whole text if (select_all || (hovered && !osx_double_click_selects_words && io.MouseDoubleClicked[0])) { edit_state.SelectAll(); @@ -7833,8 +8636,11 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 } else if (io.MouseClicked[0] && !edit_state.SelectedAllMouseLock) { - stb_textedit_click(&edit_state, &edit_state.StbState, mouse_x, mouse_y); - edit_state.CursorAnimReset(); + if (hovered) + { + stb_textedit_click(&edit_state, &edit_state.StbState, mouse_x, mouse_y); + edit_state.CursorAnimReset(); + } } else if (io.MouseDown[0] && !edit_state.SelectedAllMouseLock && (io.MouseDelta.x != 0.0f || io.MouseDelta.y != 0.0f)) { @@ -7864,13 +8670,22 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 // Consume characters memset(g.IO.InputCharacters, 0, sizeof(g.IO.InputCharacters)); } + } - // Handle various key-presses - bool cancel_edit = false; + bool cancel_edit = false; + if (g.ActiveId == id && !g.ActiveIdIsJustActivated && !clear_active_id) + { + // Handle key-presses const int k_mask = (io.KeyShift ? STB_TEXTEDIT_K_SHIFT : 0); - const bool is_shortcut_key_only = (io.OSXBehaviors ? (io.KeySuper && !io.KeyCtrl) : (io.KeyCtrl && !io.KeySuper)) && !io.KeyAlt && !io.KeyShift; // OS X style: Shortcuts using Cmd/Super instead of Ctrl - const bool is_wordmove_key_down = io.OSXBehaviors ? io.KeyAlt : io.KeyCtrl; // OS X style: Text editing cursor movement using Alt instead of Ctrl - const bool is_startend_key_down = io.OSXBehaviors && io.KeySuper && !io.KeyCtrl && !io.KeyAlt; // OS X style: Line/Text Start and End using Cmd+Arrows instead of Home/End + const bool is_shortcut_key_only = (io.OptMacOSXBehaviors ? (io.KeySuper && !io.KeyCtrl) : (io.KeyCtrl && !io.KeySuper)) && !io.KeyAlt && !io.KeyShift; // OS X style: Shortcuts using Cmd/Super instead of Ctrl + const bool is_wordmove_key_down = io.OptMacOSXBehaviors ? io.KeyAlt : io.KeyCtrl; // OS X style: Text editing cursor movement using Alt instead of Ctrl + const bool is_startend_key_down = io.OptMacOSXBehaviors && io.KeySuper && !io.KeyCtrl && !io.KeyAlt; // OS X style: Line/Text Start and End using Cmd+Arrows instead of Home/End + const bool is_ctrl_key_only = io.KeyCtrl && !io.KeyShift && !io.KeyAlt && !io.KeySuper; + const bool is_shift_key_only = io.KeyShift && !io.KeyCtrl && !io.KeyAlt && !io.KeySuper; + + const bool is_cut = ((is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_X)) || (is_shift_key_only && IsKeyPressedMap(ImGuiKey_Delete))) && is_editable && !is_password && (!is_multiline || edit_state.HasSelection()); + const bool is_copy = ((is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_C)) || (is_ctrl_key_only && IsKeyPressedMap(ImGuiKey_Insert))) && !is_password && (!is_multiline || edit_state.HasSelection()); + const bool is_paste = ((is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_V)) || (is_shift_key_only && IsKeyPressedMap(ImGuiKey_Insert))) && is_editable; if (IsKeyPressedMap(ImGuiKey_LeftArrow)) { edit_state.OnKeyPressed((is_startend_key_down ? STB_TEXTEDIT_K_LINESTART : is_wordmove_key_down ? STB_TEXTEDIT_K_WORDLEFT : STB_TEXTEDIT_K_LEFT) | k_mask); } else if (IsKeyPressedMap(ImGuiKey_RightArrow)) { edit_state.OnKeyPressed((is_startend_key_down ? STB_TEXTEDIT_K_LINEEND : is_wordmove_key_down ? STB_TEXTEDIT_K_WORDRIGHT : STB_TEXTEDIT_K_RIGHT) | k_mask); } @@ -7884,7 +8699,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 if (!edit_state.HasSelection()) { if (is_wordmove_key_down) edit_state.OnKeyPressed(STB_TEXTEDIT_K_WORDLEFT|STB_TEXTEDIT_K_SHIFT); - else if (io.OSXBehaviors && io.KeySuper && !io.KeyAlt && !io.KeyCtrl) edit_state.OnKeyPressed(STB_TEXTEDIT_K_LINESTART|STB_TEXTEDIT_K_SHIFT); + else if (io.OptMacOSXBehaviors && io.KeySuper && !io.KeyAlt && !io.KeyCtrl) edit_state.OnKeyPressed(STB_TEXTEDIT_K_LINESTART|STB_TEXTEDIT_K_SHIFT); } edit_state.OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE | k_mask); } @@ -7893,8 +8708,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 bool ctrl_enter_for_new_line = (flags & ImGuiInputTextFlags_CtrlEnterForNewLine) != 0; if (!is_multiline || (ctrl_enter_for_new_line && !io.KeyCtrl) || (!ctrl_enter_for_new_line && io.KeyCtrl)) { - ClearActiveID(); - enter_pressed = true; + enter_pressed = clear_active_id = true; } else if (is_editable) { @@ -7909,17 +8723,13 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 if (InputTextFilterCharacter(&c, flags, callback, user_data)) edit_state.OnKeyPressed((int)c); } - else if (IsKeyPressedMap(ImGuiKey_Escape)) { ClearActiveID(); cancel_edit = true; } - else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_Z) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_UNDO); edit_state.ClearSelection(); } - else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_Y) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_REDO); edit_state.ClearSelection(); } - else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_A)) { edit_state.SelectAll(); edit_state.CursorFollow = true; } - else if (is_shortcut_key_only && !is_password && ((IsKeyPressedMap(ImGuiKey_X) && is_editable) || IsKeyPressedMap(ImGuiKey_C)) && (!is_multiline || edit_state.HasSelection())) + else if (IsKeyPressedMap(ImGuiKey_Escape)) { clear_active_id = cancel_edit = true; } + else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_Z) && is_editable && is_undoable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_UNDO); edit_state.ClearSelection(); } + else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_Y) && is_editable && is_undoable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_REDO); edit_state.ClearSelection(); } + else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_A)) { edit_state.SelectAll(); edit_state.CursorFollow = true; } + else if (is_cut || is_copy) { // Cut, Copy - const bool cut = IsKeyPressedMap(ImGuiKey_X); - if (cut && !edit_state.HasSelection()) - edit_state.SelectAll(); - if (io.SetClipboardTextFn) { const int ib = edit_state.HasSelection() ? ImMin(edit_state.StbState.select_start, edit_state.StbState.select_end) : 0; @@ -7929,13 +8739,15 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 SetClipboardText(edit_state.TempTextBuffer.Data); } - if (cut) + if (is_cut) { + if (!edit_state.HasSelection()) + edit_state.SelectAll(); edit_state.CursorFollow = true; stb_textedit_cut(&edit_state, &edit_state.StbState); } } - else if (is_shortcut_key_only && IsKeyPressedMap(ImGuiKey_V) && is_editable) + else if (is_paste) { // Paste if (const char* clipboard = GetClipboardText()) @@ -7963,7 +8775,10 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 ImGui::MemFree(clipboard_filtered); } } + } + if (g.ActiveId == id) + { if (cancel_edit) { // Restore initial value @@ -7973,7 +8788,11 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 value_changed = true; } } - else + + // When using 'ImGuiInputTextFlags_EnterReturnsTrue' as a special case we reapply the live buffer back to the input buffer before clearing ActiveId, even though strictly speaking it wasn't modified on this frame. + // If we didn't do that, code like InputInt() with ImGuiInputTextFlags_EnterReturnsTrue would fail. Also this allows the user to use InputText() with ImGuiInputTextFlags_EnterReturnsTrue without maintaining any user-side storage. + bool apply_edit_back_to_user_buffer = !cancel_edit || (enter_pressed && (flags & ImGuiInputTextFlags_EnterReturnsTrue) != 0); + if (apply_edit_back_to_user_buffer) { // Apply new value immediately - copy modified buffer back // Note that as soon as the input box is active, the in-widget value gets priority over any underlying modification of the input buffer @@ -8061,6 +8880,10 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 } } + // Release active ID at the end of the function (so e.g. pressing Return still does a final application of the value) + if (clear_active_id && g.ActiveId == id) + ClearActiveID(); + // Render // Select which buffer we are going to display. When ImGuiInputTextFlags_NoLiveEdit is set 'buf' might still be the old value. We set buf to NULL to prevent accidental usage from now on. const char* buf_display = (g.ActiveId == id && is_editable) ? edit_state.TempTextBuffer.Data : buf; buf = NULL; @@ -8123,7 +8946,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 select_start_offset.y = searches_result_line_number[1] * g.FontSize; } - // Calculate text height + // Store text height (note that we haven't calculated text width at all, see GitHub issues #383, #1224) if (is_multiline) text_size = ImVec2(size.x, line_count * g.FontSize); } @@ -8186,7 +9009,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 ImVec2 rect_size = InputTextCalcTextSizeW(p, text_selected_end, &p, NULL, true); if (rect_size.x <= 0.0f) rect_size.x = (float)(int)(g.Font->GetCharAdvance((unsigned short)' ') * 0.50f); // So we can see selected empty lines ImRect rect(rect_pos + ImVec2(0.0f, bg_offy_up - g.FontSize), rect_pos +ImVec2(rect_size.x, bg_offy_dn)); - rect.Clip(clip_rect); + rect.ClipWith(clip_rect); if (rect.Overlaps(clip_rect)) draw_window->DrawList->AddRectFilled(rect.Min, rect.Max, bg_color); } @@ -8198,7 +9021,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 draw_window->DrawList->AddText(g.Font, g.FontSize, render_pos - render_scroll, GetColorU32(ImGuiCol_Text), buf_display, buf_display + edit_state.CurLenA, 0.0f, is_multiline ? NULL : &clip_rect); // Draw blinking cursor - bool cursor_is_visible = (g.InputTextState.CursorAnim <= 0.0f) || fmodf(g.InputTextState.CursorAnim, 1.20f) <= 0.80f; + bool cursor_is_visible = (!g.IO.OptCursorBlink) || (g.InputTextState.CursorAnim <= 0.0f) || fmodf(g.InputTextState.CursorAnim, 1.20f) <= 0.80f; ImVec2 cursor_screen_pos = render_pos + cursor_offset - render_scroll; ImRect cursor_screen_rect(cursor_screen_pos.x, cursor_screen_pos.y-g.FontSize+0.5f, cursor_screen_pos.x+1.0f, cursor_screen_pos.y-1.5f); if (cursor_is_visible && cursor_screen_rect.Overlaps(clip_rect)) @@ -8229,7 +9052,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 // Log as text if (g.LogEnabled && !is_password) - LogRenderedText(render_pos, buf_display, NULL); + LogRenderedText(&render_pos, buf_display, NULL); if (label_size.x > 0) RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label); @@ -8264,7 +9087,7 @@ bool ImGui::InputScalarEx(const char* label, ImGuiDataType data_type, void* data BeginGroup(); PushID(label); - const ImVec2 button_sz = ImVec2(g.FontSize, g.FontSize) + style.FramePadding*2.0f; + const ImVec2 button_sz = ImVec2(GetFrameHeight(), GetFrameHeight()); if (step_ptr) PushItemWidth(ImMax(1.0f, CalcItemWidth() - (button_sz.x + style.ItemInnerSpacing.x)*2)); @@ -8346,7 +9169,6 @@ bool ImGui::InputFloatN(const char* label, float* v, int components, int decimal } PopID(); - window->DC.CurrentLineTextBaseOffset = ImMax(window->DC.CurrentLineTextBaseOffset, g.Style.FramePadding.y); TextUnformatted(label, FindRenderedTextEnd(label)); EndGroup(); @@ -8389,7 +9211,6 @@ bool ImGui::InputIntN(const char* label, int* v, int components, ImGuiInputTextF } PopID(); - window->DC.CurrentLineTextBaseOffset = ImMax(window->DC.CurrentLineTextBaseOffset, g.Style.FramePadding.y); TextUnformatted(label, FindRenderedTextEnd(label)); EndGroup(); @@ -8411,6 +9232,157 @@ bool ImGui::InputInt4(const char* label, int v[4], ImGuiInputTextFlags extra_fla return InputIntN(label, v, 4, extra_flags); } +static float CalcMaxPopupHeightFromItemCount(int items_count) +{ + ImGuiContext& g = *GImGui; + if (items_count <= 0) + return FLT_MAX; + return (g.FontSize + g.Style.ItemSpacing.y) * items_count - g.Style.ItemSpacing.y + (g.Style.WindowPadding.y * 2); +} + +bool ImGui::BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags) +{ + // Always consume the SetNextWindowSizeConstraint() call in our early return paths + ImGuiContext& g = *GImGui; + ImGuiCond backup_next_window_size_constraint = g.NextWindowData.SizeConstraintCond; + g.NextWindowData.SizeConstraintCond = 0; + + ImGuiWindow* window = GetCurrentWindow(); + if (window->SkipItems) + return false; + + const ImGuiStyle& style = g.Style; + const ImGuiID id = window->GetID(label); + const float w = CalcItemWidth(); + + const ImVec2 label_size = CalcTextSize(label, NULL, true); + const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2.0f)); + const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); + ItemSize(total_bb, style.FramePadding.y); + if (!ItemAdd(total_bb, id)) + return false; + + bool hovered, held; + bool pressed = ButtonBehavior(frame_bb, id, &hovered, &held); + bool popup_open = IsPopupOpen(id); + + const float arrow_size = GetFrameHeight(); + const ImRect value_bb(frame_bb.Min, frame_bb.Max - ImVec2(arrow_size, 0.0f)); + RenderFrame(frame_bb.Min, frame_bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding); + RenderFrame(ImVec2(frame_bb.Max.x-arrow_size, frame_bb.Min.y), frame_bb.Max, GetColorU32(popup_open || hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button), true, style.FrameRounding); // FIXME-ROUNDING + RenderTriangle(ImVec2(frame_bb.Max.x - arrow_size + style.FramePadding.y, frame_bb.Min.y + style.FramePadding.y), ImGuiDir_Down); + if (preview_value != NULL) + RenderTextClipped(frame_bb.Min + style.FramePadding, value_bb.Max, preview_value, NULL, NULL, ImVec2(0.0f,0.0f)); + if (label_size.x > 0) + RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label); + + if (pressed && !popup_open) + { + OpenPopupEx(id); + popup_open = true; + } + + if (!popup_open) + return false; + + if (backup_next_window_size_constraint) + { + g.NextWindowData.SizeConstraintCond = backup_next_window_size_constraint; + g.NextWindowData.SizeConstraintRect.Min.x = ImMax(g.NextWindowData.SizeConstraintRect.Min.x, w); + } + else + { + if ((flags & ImGuiComboFlags_HeightMask_) == 0) + flags |= ImGuiComboFlags_HeightRegular; + IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiComboFlags_HeightMask_)); // Only one + int popup_max_height_in_items = -1; + if (flags & ImGuiComboFlags_HeightRegular) popup_max_height_in_items = 8; + else if (flags & ImGuiComboFlags_HeightSmall) popup_max_height_in_items = 4; + else if (flags & ImGuiComboFlags_HeightLarge) popup_max_height_in_items = 20; + SetNextWindowSizeConstraints(ImVec2(w, 0.0f), ImVec2(FLT_MAX, CalcMaxPopupHeightFromItemCount(popup_max_height_in_items))); + } + + char name[16]; + ImFormatString(name, IM_ARRAYSIZE(name), "##Combo_%02d", g.CurrentPopupStack.Size); // Recycle windows based on depth + + // Peak into expected window size so we can position it + if (ImGuiWindow* popup_window = FindWindowByName(name)) + if (popup_window->WasActive) + { + ImVec2 size_contents = CalcSizeContents(popup_window); + ImVec2 size_expected = CalcSizeAfterConstraint(popup_window, CalcSizeAutoFit(popup_window, size_contents)); + if (flags & ImGuiComboFlags_PopupAlignLeft) + popup_window->AutoPosLastDirection = ImGuiDir_Left; + ImVec2 pos = FindBestWindowPosForPopup(frame_bb.GetBL(), size_expected, &popup_window->AutoPosLastDirection, frame_bb, ImGuiPopupPositionPolicy_ComboBox); + SetNextWindowPos(pos); + } + + ImGuiWindowFlags window_flags = ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_Popup | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings; + if (!Begin(name, NULL, window_flags)) + { + EndPopup(); + IM_ASSERT(0); // This should never happen as we tested for IsPopupOpen() above + return false; + } + + // Horizontally align ourselves with the framed text + if (style.FramePadding.x != style.WindowPadding.x) + Indent(style.FramePadding.x - style.WindowPadding.x); + + return true; +} + +void ImGui::EndCombo() +{ + const ImGuiStyle& style = GImGui->Style; + if (style.FramePadding.x != style.WindowPadding.x) + Unindent(style.FramePadding.x - style.WindowPadding.x); + EndPopup(); +} + +// Old API, prefer using BeginCombo() nowadays if you can. +bool ImGui::Combo(const char* label, int* current_item, bool (*items_getter)(void*, int, const char**), void* data, int items_count, int popup_max_height_in_items) +{ + ImGuiContext& g = *GImGui; + + const char* preview_text = NULL; + if (*current_item >= 0 && *current_item < items_count) + items_getter(data, *current_item, &preview_text); + + // The old Combo() API exposed "popup_max_height_in_items", however the new more general BeginCombo() API doesn't, so we emulate it here. + if (popup_max_height_in_items != -1 && !g.NextWindowData.SizeConstraintCond) + { + float popup_max_height = CalcMaxPopupHeightFromItemCount(popup_max_height_in_items); + SetNextWindowSizeConstraints(ImVec2(0,0), ImVec2(FLT_MAX, popup_max_height)); + } + + if (!BeginCombo(label, preview_text, 0)) + return false; + + // Display items + // FIXME-OPT: Use clipper (but we need to disable it on the appearing frame to make sure our call to SetItemDefaultFocus() is processed) + bool value_changed = false; + for (int i = 0; i < items_count; i++) + { + PushID((void*)(intptr_t)i); + const bool item_selected = (i == *current_item); + const char* item_text; + if (!items_getter(data, i, &item_text)) + item_text = "*Unknown item*"; + if (Selectable(item_text, item_selected)) + { + value_changed = true; + *current_item = i; + } + if (item_selected) + SetItemDefaultFocus(); + PopID(); + } + + EndCombo(); + return value_changed; +} + static bool Items_ArrayGetter(void* data, int idx, const char** out_text) { const char* const* items = (const char* const*)data; @@ -8440,7 +9412,7 @@ static bool Items_SingleStringGetter(void* data, int idx, const char** out_text) } // Combo box helper allowing to pass an array of strings. -bool ImGui::Combo(const char* label, int* current_item, const char* const* items, int items_count, int height_in_items) +bool ImGui::Combo(const char* label, int* current_item, const char* const items[], int items_count, int height_in_items) { const bool value_changed = Combo(label, current_item, Items_ArrayGetter, (void*)items, items_count, height_in_items); return value_changed; @@ -8460,114 +9432,6 @@ bool ImGui::Combo(const char* label, int* current_item, const char* items_separa return value_changed; } -// Combo box function. -bool ImGui::Combo(const char* label, int* current_item, bool (*items_getter)(void*, int, const char**), void* data, int items_count, int height_in_items) -{ - ImGuiWindow* window = GetCurrentWindow(); - if (window->SkipItems) - return false; - - ImGuiContext& g = *GImGui; - const ImGuiStyle& style = g.Style; - const ImGuiID id = window->GetID(label); - const float w = CalcItemWidth(); - - const ImVec2 label_size = CalcTextSize(label, NULL, true); - const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2.0f)); - const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); - ItemSize(total_bb, style.FramePadding.y); - if (!ItemAdd(total_bb, &id)) - return false; - - const float arrow_size = (g.FontSize + style.FramePadding.x * 2.0f); - const bool hovered = IsHovered(frame_bb, id); - bool popup_open = IsPopupOpen(id); - bool popup_opened_now = false; - - const ImRect value_bb(frame_bb.Min, frame_bb.Max - ImVec2(arrow_size, 0.0f)); - RenderFrame(frame_bb.Min, frame_bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding); - RenderFrame(ImVec2(frame_bb.Max.x-arrow_size, frame_bb.Min.y), frame_bb.Max, GetColorU32(popup_open || hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button), true, style.FrameRounding); // FIXME-ROUNDING - RenderCollapseTriangle(ImVec2(frame_bb.Max.x-arrow_size, frame_bb.Min.y) + style.FramePadding, true); - - if (*current_item >= 0 && *current_item < items_count) - { - const char* item_text; - if (items_getter(data, *current_item, &item_text)) - RenderTextClipped(frame_bb.Min + style.FramePadding, value_bb.Max, item_text, NULL, NULL, ImVec2(0.0f,0.0f)); - } - - if (label_size.x > 0) - RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label); - - if (hovered) - { - SetHoveredID(id); - if (g.IO.MouseClicked[0]) - { - ClearActiveID(); - if (IsPopupOpen(id)) - { - ClosePopup(id); - } - else - { - FocusWindow(window); - OpenPopup(label); - popup_open = popup_opened_now = true; - } - } - } - - bool value_changed = false; - if (IsPopupOpen(id)) - { - // Size default to hold ~7 items - if (height_in_items < 0) - height_in_items = 7; - - float popup_height = (label_size.y + style.ItemSpacing.y) * ImMin(items_count, height_in_items) + (style.FramePadding.y * 3); - float popup_y1 = frame_bb.Max.y; - float popup_y2 = ImClamp(popup_y1 + popup_height, popup_y1, g.IO.DisplaySize.y - style.DisplaySafeAreaPadding.y); - if ((popup_y2 - popup_y1) < ImMin(popup_height, frame_bb.Min.y - style.DisplaySafeAreaPadding.y)) - { - // Position our combo ABOVE because there's more space to fit! (FIXME: Handle in Begin() or use a shared helper. We have similar code in Begin() for popup placement) - popup_y1 = ImClamp(frame_bb.Min.y - popup_height, style.DisplaySafeAreaPadding.y, frame_bb.Min.y); - popup_y2 = frame_bb.Min.y; - } - ImRect popup_rect(ImVec2(frame_bb.Min.x, popup_y1), ImVec2(frame_bb.Max.x, popup_y2)); - SetNextWindowPos(popup_rect.Min); - SetNextWindowSize(popup_rect.GetSize()); - PushStyleVar(ImGuiStyleVar_WindowPadding, style.FramePadding); - - const ImGuiWindowFlags flags = ImGuiWindowFlags_ComboBox | ((window->Flags & ImGuiWindowFlags_ShowBorders) ? ImGuiWindowFlags_ShowBorders : 0); - if (BeginPopupEx(label, flags)) - { - // Display items - Spacing(); - for (int i = 0; i < items_count; i++) - { - PushID((void*)(intptr_t)i); - const bool item_selected = (i == *current_item); - const char* item_text; - if (!items_getter(data, i, &item_text)) - item_text = "*Unknown item*"; - if (Selectable(item_text, item_selected)) - { - ClearActiveID(); - value_changed = true; - *current_item = i; - } - if (item_selected && popup_opened_now) - SetScrollHere(); - PopID(); - } - EndPopup(); - } - PopStyleVar(); - } - return value_changed; -} - // Tip: pass an empty label (e.g. "##dummy") then you can use the space to draw other text or image. // But you need to make sure the ID is unique, e.g. enclose calls in PushID/PopID. bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags flags, const ImVec2& size_arg) @@ -8579,7 +9443,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl ImGuiContext& g = *GImGui; const ImGuiStyle& style = g.Style; - if ((flags & ImGuiSelectableFlags_SpanAllColumns) && window->DC.ColumnsCount > 1) + if ((flags & ImGuiSelectableFlags_SpanAllColumns) && window->DC.ColumnsSet) // FIXME-OPT: Avoid if vertically clipped. PopClipRect(); ImGuiID id = window->GetID(label); @@ -8608,16 +9472,16 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl bb_with_spacing.Min.y -= spacing_U; bb_with_spacing.Max.x += spacing_R; bb_with_spacing.Max.y += spacing_D; - if (!ItemAdd(bb_with_spacing, &id)) + if (!ItemAdd(bb_with_spacing, id)) { - if ((flags & ImGuiSelectableFlags_SpanAllColumns) && window->DC.ColumnsCount > 1) + if ((flags & ImGuiSelectableFlags_SpanAllColumns) && window->DC.ColumnsSet) PushColumnClipRect(); return false; } ImGuiButtonFlags button_flags = 0; - if (flags & ImGuiSelectableFlags_Menu) button_flags |= ImGuiButtonFlags_PressedOnClick; - if (flags & ImGuiSelectableFlags_MenuItem) button_flags |= ImGuiButtonFlags_PressedOnClick|ImGuiButtonFlags_PressedOnRelease; + if (flags & ImGuiSelectableFlags_Menu) button_flags |= ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_NoHoldingActiveID; + if (flags & ImGuiSelectableFlags_MenuItem) button_flags |= ImGuiButtonFlags_PressedOnRelease; if (flags & ImGuiSelectableFlags_Disabled) button_flags |= ImGuiButtonFlags_Disabled; if (flags & ImGuiSelectableFlags_AllowDoubleClick) button_flags |= ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnDoubleClick; bool hovered, held; @@ -8632,7 +9496,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl RenderFrame(bb_with_spacing.Min, bb_with_spacing.Max, col, false, 0.0f); } - if ((flags & ImGuiSelectableFlags_SpanAllColumns) && window->DC.ColumnsCount > 1) + if ((flags & ImGuiSelectableFlags_SpanAllColumns) && window->DC.ColumnsSet) { PushColumnClipRect(); bb_with_spacing.Max.x -= (GetContentRegionMax().x - max_x); @@ -8643,7 +9507,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl if (flags & ImGuiSelectableFlags_Disabled) PopStyleColor(); // Automatically close popups - if (pressed && !(flags & ImGuiSelectableFlags_DontClosePopups) && (window->Flags & ImGuiWindowFlags_Popup)) + if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(window->DC.ItemFlags & ImGuiItemFlags_SelectableDontClosePopup)) CloseCurrentPopup(); return pressed; } @@ -8703,7 +9567,7 @@ bool ImGui::ListBoxHeader(const char* label, int items_count, int height_in_item void ImGui::ListBoxFooter() { - ImGuiWindow* parent_window = GetParentWindow(); + ImGuiWindow* parent_window = GetCurrentWindow()->ParentWindow; const ImRect bb = parent_window->DC.LastItemRect; const ImGuiStyle& style = GetStyle(); @@ -8717,7 +9581,7 @@ void ImGui::ListBoxFooter() EndGroup(); } -bool ImGui::ListBox(const char* label, int* current_item, const char* const* items, int items_count, int height_items) +bool ImGui::ListBox(const char* label, int* current_item, const char* const items[], int items_count, int height_items) { const bool value_changed = ListBox(label, current_item, Items_ArrayGetter, (void*)items, items_count, height_items); return value_changed; @@ -8730,7 +9594,7 @@ bool ImGui::ListBox(const char* label, int* current_item, bool (*items_getter)(v // Assume all items have even height (= 1 line of text). If you need items of different or variable sizes you can create a custom version of ListBox() in your code without using the clipper. bool value_changed = false; - ImGuiListClipper clipper(items_count, GetTextLineHeightWithSpacing()); + ImGuiListClipper clipper(items_count, GetTextLineHeightWithSpacing()); // We know exactly our line height here so we pass it as a minor optimization, but generally you don't need to. while (clipper.Step()) for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) { @@ -8758,23 +9622,38 @@ bool ImGui::MenuItem(const char* label, const char* shortcut, bool selected, boo return false; ImGuiContext& g = *GImGui; + ImGuiStyle& style = g.Style; ImVec2 pos = window->DC.CursorPos; ImVec2 label_size = CalcTextSize(label, NULL, true); - ImVec2 shortcut_size = shortcut ? CalcTextSize(shortcut, NULL) : ImVec2(0.0f, 0.0f); - float w = window->MenuColumns.DeclColumns(label_size.x, shortcut_size.x, (float)(int)(g.FontSize * 1.20f)); // Feedback for next frame - float extra_w = ImMax(0.0f, GetContentRegionAvail().x - w); - bool pressed = Selectable(label, false, ImGuiSelectableFlags_MenuItem | ImGuiSelectableFlags_DrawFillAvailWidth | (enabled ? 0 : ImGuiSelectableFlags_Disabled), ImVec2(w, 0.0f)); - if (shortcut_size.x > 0.0f) + ImGuiSelectableFlags flags = ImGuiSelectableFlags_MenuItem | (enabled ? 0 : ImGuiSelectableFlags_Disabled); + bool pressed; + if (window->DC.LayoutType == ImGuiLayoutType_Horizontal) { - PushStyleColor(ImGuiCol_Text, g.Style.Colors[ImGuiCol_TextDisabled]); - RenderText(pos + ImVec2(window->MenuColumns.Pos[1] + extra_w, 0.0f), shortcut, NULL, false); - PopStyleColor(); + // Mimic the exact layout spacing of BeginMenu() to allow MenuItem() inside a menu bar, which is a little misleading but may be useful + // Note that in this situation we render neither the shortcut neither the selected tick mark + float w = label_size.x; + window->DC.CursorPos.x += (float)(int)(style.ItemSpacing.x * 0.5f); + PushStyleVar(ImGuiStyleVar_ItemSpacing, style.ItemSpacing * 2.0f); + pressed = Selectable(label, false, flags, ImVec2(w, 0.0f)); + PopStyleVar(); + window->DC.CursorPos.x += (float)(int)(style.ItemSpacing.x * (-1.0f + 0.5f)); // -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar(). + } + else + { + ImVec2 shortcut_size = shortcut ? CalcTextSize(shortcut, NULL) : ImVec2(0.0f, 0.0f); + float w = window->MenuColumns.DeclColumns(label_size.x, shortcut_size.x, (float)(int)(g.FontSize * 1.20f)); // Feedback for next frame + float extra_w = ImMax(0.0f, GetContentRegionAvail().x - w); + pressed = Selectable(label, false, flags | ImGuiSelectableFlags_DrawFillAvailWidth, ImVec2(w, 0.0f)); + if (shortcut_size.x > 0.0f) + { + PushStyleColor(ImGuiCol_Text, g.Style.Colors[ImGuiCol_TextDisabled]); + RenderText(pos + ImVec2(window->MenuColumns.Pos[1] + extra_w, 0.0f), shortcut, NULL, false); + PopStyleColor(); + } + if (selected) + RenderCheckMark(pos + ImVec2(window->MenuColumns.Pos[2] + extra_w + g.FontSize * 0.40f, g.FontSize * 0.134f * 0.5f), GetColorU32(enabled ? ImGuiCol_Text : ImGuiCol_TextDisabled), g.FontSize * 0.866f); } - - if (selected) - RenderCheckMark(pos + ImVec2(window->MenuColumns.Pos[2] + extra_w + g.FontSize * 0.20f, 0.0f), GetColorU32(enabled ? ImGuiCol_Text : ImGuiCol_TextDisabled)); - return pressed; } @@ -8825,12 +9704,18 @@ bool ImGui::BeginMenuBar() IM_ASSERT(!window->DC.MenuBarAppending); BeginGroup(); // Save position PushID("##menubar"); - ImRect rect = window->MenuBarRect(); - PushClipRect(ImVec2(ImFloor(rect.Min.x+0.5f), ImFloor(rect.Min.y + window->BorderSize + 0.5f)), ImVec2(ImFloor(rect.Max.x+0.5f), ImFloor(rect.Max.y+0.5f)), false); - window->DC.CursorPos = ImVec2(rect.Min.x + window->DC.MenuBarOffsetX, rect.Min.y);// + g.Style.FramePadding.y); + + // We don't clip with regular window clipping rectangle as it is already set to the area below. However we clip with window full rect. + // We remove 1 worth of rounding to Max.x to that text in long menus don't tend to display over the lower-right rounded area, which looks particularly glitchy. + ImRect bar_rect = window->MenuBarRect(); + ImRect clip_rect(ImFloor(bar_rect.Min.x + 0.5f), ImFloor(bar_rect.Min.y + window->WindowBorderSize + 0.5f), ImFloor(ImMax(bar_rect.Min.x, bar_rect.Max.x - window->WindowRounding) + 0.5f), ImFloor(bar_rect.Max.y + 0.5f)); + clip_rect.ClipWith(window->WindowRectClipped); + PushClipRect(clip_rect.Min, clip_rect.Max, false); + + window->DC.CursorPos = ImVec2(bar_rect.Min.x + window->DC.MenuBarOffsetX, bar_rect.Min.y);// + g.Style.FramePadding.y); window->DC.LayoutType = ImGuiLayoutType_Horizontal; window->DC.MenuBarAppending = true; - AlignFirstTextHeightToWidgets(); + AlignTextToFramePadding(); return true; } @@ -8862,44 +9747,47 @@ bool ImGui::BeginMenu(const char* label, bool enabled) const ImGuiID id = window->GetID(label); ImVec2 label_size = CalcTextSize(label, NULL, true); - ImGuiWindow* backed_focused_window = g.FocusedWindow; bool pressed; bool menu_is_open = IsPopupOpen(id); - bool menuset_is_open = !(window->Flags & ImGuiWindowFlags_Popup) && (g.OpenPopupStack.Size > g.CurrentPopupStack.Size && g.OpenPopupStack[g.CurrentPopupStack.Size].ParentMenuSet == window->GetID("##menus")); + bool menuset_is_open = !(window->Flags & ImGuiWindowFlags_Popup) && (g.OpenPopupStack.Size > g.CurrentPopupStack.Size && g.OpenPopupStack[g.CurrentPopupStack.Size].OpenParentId == window->IDStack.back()); + ImGuiWindow* backed_nav_window = g.NavWindow; if (menuset_is_open) - g.FocusedWindow = window; + g.NavWindow = window; // Odd hack to allow hovering across menus of a same menu-set (otherwise we wouldn't be able to hover parent) // The reference position stored in popup_pos will be used by Begin() to find a suitable position for the child menu (using FindBestPopupWindowPos). ImVec2 popup_pos, pos = window->DC.CursorPos; if (window->DC.LayoutType == ImGuiLayoutType_Horizontal) { + // Menu inside an horizontal menu bar + // Selectable extend their highlight by half ItemSpacing in each direction. + // For ChildMenu, the popup position will be overwritten by the call to FindBestPopupWindowPos() in Begin() popup_pos = ImVec2(pos.x - window->WindowPadding.x, pos.y - style.FramePadding.y + window->MenuBarHeight()); window->DC.CursorPos.x += (float)(int)(style.ItemSpacing.x * 0.5f); PushStyleVar(ImGuiStyleVar_ItemSpacing, style.ItemSpacing * 2.0f); float w = label_size.x; pressed = Selectable(label, menu_is_open, ImGuiSelectableFlags_Menu | ImGuiSelectableFlags_DontClosePopups | (!enabled ? ImGuiSelectableFlags_Disabled : 0), ImVec2(w, 0.0f)); PopStyleVar(); - SameLine(); - window->DC.CursorPos.x += (float)(int)(style.ItemSpacing.x * 0.5f); + window->DC.CursorPos.x += (float)(int)(style.ItemSpacing.x * (-1.0f + 0.5f)); // -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar(). } else { + // Menu inside a menu popup_pos = ImVec2(pos.x, pos.y - style.WindowPadding.y); float w = window->MenuColumns.DeclColumns(label_size.x, 0.0f, (float)(int)(g.FontSize * 1.20f)); // Feedback to next frame float extra_w = ImMax(0.0f, GetContentRegionAvail().x - w); pressed = Selectable(label, menu_is_open, ImGuiSelectableFlags_Menu | ImGuiSelectableFlags_DontClosePopups | ImGuiSelectableFlags_DrawFillAvailWidth | (!enabled ? ImGuiSelectableFlags_Disabled : 0), ImVec2(w, 0.0f)); if (!enabled) PushStyleColor(ImGuiCol_Text, g.Style.Colors[ImGuiCol_TextDisabled]); - RenderCollapseTriangle(pos + ImVec2(window->MenuColumns.Pos[2] + extra_w + g.FontSize * 0.20f, 0.0f), false); + RenderTriangle(pos + ImVec2(window->MenuColumns.Pos[2] + extra_w + g.FontSize * 0.30f, 0.0f), ImGuiDir_Right); if (!enabled) PopStyleColor(); } - bool hovered = enabled && IsHovered(window->DC.LastItemRect, id); + const bool hovered = enabled && ItemHoverable(window->DC.LastItemRect, id); if (menuset_is_open) - g.FocusedWindow = backed_focused_window; + g.NavWindow = backed_nav_window; bool want_open = false, want_close = false; - if (window->Flags & (ImGuiWindowFlags_Popup|ImGuiWindowFlags_ChildMenu)) + if (window->DC.LayoutType != ImGuiLayoutType_Horizontal) // (window->Flags & (ImGuiWindowFlags_Popup|ImGuiWindowFlags_ChildMenu)) { // Implement http://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown to avoid using timers, so menus feels more reactive. bool moving_within_opened_triangle = false; @@ -8915,7 +9803,7 @@ bool ImGui::BeginMenu(const char* label, bool enabled) ta.x += (window->Pos.x < next_window->Pos.x) ? -0.5f : +0.5f; // to avoid numerical issues tb.y = ta.y + ImMax((tb.y - extra) - ta.y, -100.0f); // triangle is maximum 200 high to limit the slope and the bias toward large sub-menus // FIXME: Multiply by fb_scale? tc.y = ta.y + ImMin((tc.y + extra) - ta.y, +100.0f); - moving_within_opened_triangle = ImIsPointInTriangle(g.IO.MousePos, ta, tb, tc); + moving_within_opened_triangle = ImTriangleContainsPoint(ta, tb, tc, g.IO.MousePos); //window->DrawList->PushClipRectFullScreen(); window->DrawList->AddTriangleFilled(ta, tb, tc, moving_within_opened_triangle ? IM_COL32(0,128,0,128) : IM_COL32(128,0,0,128)); window->DrawList->PopClipRect(); // Debug } } @@ -8923,13 +9811,20 @@ bool ImGui::BeginMenu(const char* label, bool enabled) want_close = (menu_is_open && !hovered && g.HoveredWindow == window && g.HoveredIdPreviousFrame != 0 && g.HoveredIdPreviousFrame != id && !moving_within_opened_triangle); want_open = (!menu_is_open && hovered && !moving_within_opened_triangle) || (!menu_is_open && hovered && pressed); } - else if (menu_is_open && pressed && menuset_is_open) // menu-bar: click open menu to close + else { - want_close = true; - want_open = menu_is_open = false; + // Menu bar + if (menu_is_open && pressed && menuset_is_open) // Click an open menu again to close it + { + want_close = true; + want_open = menu_is_open = false; + } + else if (pressed || (hovered && menuset_is_open && !menu_is_open)) // First click to open, then hover to open others + { + want_open = true; + } } - else if (pressed || (hovered && menuset_is_open && !menu_is_open)) // menu-bar: first click to open, then hover to open others - want_open = true; + if (!enabled) // explicitly close if an open menu becomes disabled, facilitate users code a lot in pattern such as 'if (BeginMenu("options", has_object)) { ..use object.. }' want_close = true; if (want_close && IsPopupOpen(id)) @@ -8948,9 +9843,9 @@ bool ImGui::BeginMenu(const char* label, bool enabled) if (menu_is_open) { - SetNextWindowPos(popup_pos, ImGuiSetCond_Always); - ImGuiWindowFlags flags = ImGuiWindowFlags_ShowBorders | ((window->Flags & (ImGuiWindowFlags_Popup|ImGuiWindowFlags_ChildMenu)) ? ImGuiWindowFlags_ChildMenu|ImGuiWindowFlags_ChildWindow : ImGuiWindowFlags_ChildMenu); - menu_is_open = BeginPopupEx(label, flags); // menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display) + SetNextWindowPos(popup_pos, ImGuiCond_Always); + ImGuiWindowFlags flags = ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings | ((window->Flags & (ImGuiWindowFlags_Popup|ImGuiWindowFlags_ChildMenu)) ? ImGuiWindowFlags_ChildMenu|ImGuiWindowFlags_ChildWindow : ImGuiWindowFlags_ChildMenu); + menu_is_open = BeginPopupEx(id, flags); // menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display) } return menu_is_open; @@ -8961,50 +9856,260 @@ void ImGui::EndMenu() EndPopup(); } +// Note: only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. +void ImGui::ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags) +{ + ImGuiContext& g = *GImGui; + + int cr = IM_F32_TO_INT8_SAT(col[0]), cg = IM_F32_TO_INT8_SAT(col[1]), cb = IM_F32_TO_INT8_SAT(col[2]), ca = (flags & ImGuiColorEditFlags_NoAlpha) ? 255 : IM_F32_TO_INT8_SAT(col[3]); + BeginTooltipEx(0, true); + + const char* text_end = text ? FindRenderedTextEnd(text, NULL) : text; + if (text_end > text) + { + TextUnformatted(text, text_end); + Separator(); + } + + ImVec2 sz(g.FontSize * 3 + g.Style.FramePadding.y * 2, g.FontSize * 3 + g.Style.FramePadding.y * 2); + ColorButton("##preview", ImVec4(col[0], col[1], col[2], col[3]), (flags & (ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf)) | ImGuiColorEditFlags_NoTooltip, sz); + SameLine(); + if (flags & ImGuiColorEditFlags_NoAlpha) + Text("#%02X%02X%02X\nR: %d, G: %d, B: %d\n(%.3f, %.3f, %.3f)", cr, cg, cb, cr, cg, cb, col[0], col[1], col[2]); + else + Text("#%02X%02X%02X%02X\nR:%d, G:%d, B:%d, A:%d\n(%.3f, %.3f, %.3f, %.3f)", cr, cg, cb, ca, cr, cg, cb, ca, col[0], col[1], col[2], col[3]); + EndTooltip(); +} + +static inline ImU32 ImAlphaBlendColor(ImU32 col_a, ImU32 col_b) +{ + float t = ((col_b >> IM_COL32_A_SHIFT) & 0xFF) / 255.f; + int r = ImLerp((int)(col_a >> IM_COL32_R_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_R_SHIFT) & 0xFF, t); + int g = ImLerp((int)(col_a >> IM_COL32_G_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_G_SHIFT) & 0xFF, t); + int b = ImLerp((int)(col_a >> IM_COL32_B_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_B_SHIFT) & 0xFF, t); + return IM_COL32(r, g, b, 0xFF); +} + +// NB: This is rather brittle and will show artifact when rounding this enabled if rounded corners overlap multiple cells. Caller currently responsible for avoiding that. +// I spent a non reasonable amount of time trying to getting this right for ColorButton with rounding+anti-aliasing+ImGuiColorEditFlags_HalfAlphaPreview flag + various grid sizes and offsets, and eventually gave up... probably more reasonable to disable rounding alltogether. +void ImGui::RenderColorRectWithAlphaCheckerboard(ImVec2 p_min, ImVec2 p_max, ImU32 col, float grid_step, ImVec2 grid_off, float rounding, int rounding_corners_flags) +{ + ImGuiWindow* window = GetCurrentWindow(); + if (((col & IM_COL32_A_MASK) >> IM_COL32_A_SHIFT) < 0xFF) + { + ImU32 col_bg1 = GetColorU32(ImAlphaBlendColor(IM_COL32(204,204,204,255), col)); + ImU32 col_bg2 = GetColorU32(ImAlphaBlendColor(IM_COL32(128,128,128,255), col)); + window->DrawList->AddRectFilled(p_min, p_max, col_bg1, rounding, rounding_corners_flags); + + int yi = 0; + for (float y = p_min.y + grid_off.y; y < p_max.y; y += grid_step, yi++) + { + float y1 = ImClamp(y, p_min.y, p_max.y), y2 = ImMin(y + grid_step, p_max.y); + if (y2 <= y1) + continue; + for (float x = p_min.x + grid_off.x + (yi & 1) * grid_step; x < p_max.x; x += grid_step * 2.0f) + { + float x1 = ImClamp(x, p_min.x, p_max.x), x2 = ImMin(x + grid_step, p_max.x); + if (x2 <= x1) + continue; + int rounding_corners_flags_cell = 0; + if (y1 <= p_min.y) { if (x1 <= p_min.x) rounding_corners_flags_cell |= ImDrawCornerFlags_TopLeft; if (x2 >= p_max.x) rounding_corners_flags_cell |= ImDrawCornerFlags_TopRight; } + if (y2 >= p_max.y) { if (x1 <= p_min.x) rounding_corners_flags_cell |= ImDrawCornerFlags_BotLeft; if (x2 >= p_max.x) rounding_corners_flags_cell |= ImDrawCornerFlags_BotRight; } + rounding_corners_flags_cell &= rounding_corners_flags; + window->DrawList->AddRectFilled(ImVec2(x1,y1), ImVec2(x2,y2), col_bg2, rounding_corners_flags_cell ? rounding : 0.0f, rounding_corners_flags_cell); + } + } + } + else + { + window->DrawList->AddRectFilled(p_min, p_max, col, rounding, rounding_corners_flags); + } +} + +void ImGui::SetColorEditOptions(ImGuiColorEditFlags flags) +{ + ImGuiContext& g = *GImGui; + if ((flags & ImGuiColorEditFlags__InputsMask) == 0) + flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__InputsMask; + if ((flags & ImGuiColorEditFlags__DataTypeMask) == 0) + flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__DataTypeMask; + if ((flags & ImGuiColorEditFlags__PickerMask) == 0) + flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__PickerMask; + IM_ASSERT(ImIsPowerOfTwo((int)(flags & ImGuiColorEditFlags__InputsMask))); // Check only 1 option is selected + IM_ASSERT(ImIsPowerOfTwo((int)(flags & ImGuiColorEditFlags__DataTypeMask))); // Check only 1 option is selected + IM_ASSERT(ImIsPowerOfTwo((int)(flags & ImGuiColorEditFlags__PickerMask))); // Check only 1 option is selected + g.ColorEditOptions = flags; +} + // A little colored square. Return true when clicked. // FIXME: May want to display/ignore the alpha component in the color display? Yet show it in the tooltip. -bool ImGui::ColorButton(const ImVec4& col, bool small_height, bool outline_border) +// 'desc_id' is not called 'label' because we don't display it next to the button, but only in the tooltip. +bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags, ImVec2 size) { ImGuiWindow* window = GetCurrentWindow(); if (window->SkipItems) return false; ImGuiContext& g = *GImGui; - const ImGuiStyle& style = g.Style; - const ImGuiID id = window->GetID("#colorbutton"); - const float square_size = g.FontSize; - const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(square_size + style.FramePadding.y*2, square_size + (small_height ? 0 : style.FramePadding.y*2))); - ItemSize(bb, small_height ? 0.0f : style.FramePadding.y); - if (!ItemAdd(bb, &id)) + const ImGuiID id = window->GetID(desc_id); + float default_size = GetFrameHeight(); + if (size.x == 0.0f) + size.x = default_size; + if (size.y == 0.0f) + size.y = default_size; + const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size); + ItemSize(bb, (size.y >= default_size) ? g.Style.FramePadding.y : 0.0f); + if (!ItemAdd(bb, id)) return false; bool hovered, held; bool pressed = ButtonBehavior(bb, id, &hovered, &held); - RenderFrame(bb.Min, bb.Max, GetColorU32(col), outline_border, style.FrameRounding); - if (hovered) - SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col.x, col.y, col.z, col.w, IM_F32_TO_INT8_SAT(col.x), IM_F32_TO_INT8_SAT(col.y), IM_F32_TO_INT8_SAT(col.z), IM_F32_TO_INT8_SAT(col.w)); + if (flags & ImGuiColorEditFlags_NoAlpha) + flags &= ~(ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf); + + ImVec4 col_without_alpha(col.x, col.y, col.z, 1.0f); + float grid_step = ImMin(size.x, size.y) / 2.99f; + float rounding = ImMin(g.Style.FrameRounding, grid_step * 0.5f); + ImRect bb_inner = bb; + float off = -0.75f; // The border (using Col_FrameBg) tends to look off when color is near-opaque and rounding is enabled. This offset seemed like a good middle ground to reduce those artifacts. + bb_inner.Expand(off); + if ((flags & ImGuiColorEditFlags_AlphaPreviewHalf) && col.w < 1.0f) + { + float mid_x = (float)(int)((bb_inner.Min.x + bb_inner.Max.x) * 0.5f + 0.5f); + RenderColorRectWithAlphaCheckerboard(ImVec2(bb_inner.Min.x + grid_step, bb_inner.Min.y), bb_inner.Max, GetColorU32(col), grid_step, ImVec2(-grid_step + off, off), rounding, ImDrawCornerFlags_TopRight| ImDrawCornerFlags_BotRight); + window->DrawList->AddRectFilled(bb_inner.Min, ImVec2(mid_x, bb_inner.Max.y), GetColorU32(col_without_alpha), rounding, ImDrawCornerFlags_TopLeft|ImDrawCornerFlags_BotLeft); + } + else + { + // Because GetColorU32() multiplies by the global style Alpha and we don't want to display a checkerboard if the source code had no alpha + ImVec4 col_source = (flags & ImGuiColorEditFlags_AlphaPreview) ? col : col_without_alpha; + if (col_source.w < 1.0f) + RenderColorRectWithAlphaCheckerboard(bb_inner.Min, bb_inner.Max, GetColorU32(col_source), grid_step, ImVec2(off, off), rounding); + else + window->DrawList->AddRectFilled(bb_inner.Min, bb_inner.Max, GetColorU32(col_source), rounding, ImDrawCornerFlags_All); + } + if (g.Style.FrameBorderSize > 0.0f) + RenderFrameBorder(bb.Min, bb.Max, rounding); + else + window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_FrameBg), rounding); // Color button are often in need of some sort of border + + // Drag and Drop Source + if (g.ActiveId == id && BeginDragDropSource()) // NB: The ActiveId test is merely an optional micro-optimization + { + if (flags & ImGuiColorEditFlags_NoAlpha) + SetDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_3F, &col, sizeof(float) * 3, ImGuiCond_Once); + else + SetDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_4F, &col, sizeof(float) * 4, ImGuiCond_Once); + ColorButton(desc_id, col, flags); + SameLine(); + TextUnformatted("Color"); + EndDragDropSource(); + hovered = false; + } + + // Tooltip + if (!(flags & ImGuiColorEditFlags_NoTooltip) && hovered) + ColorTooltip(desc_id, &col.x, flags & (ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf)); return pressed; } -bool ImGui::ColorEdit3(const char* label, float col[3]) +bool ImGui::ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags) { - float col4[4]; - col4[0] = col[0]; - col4[1] = col[1]; - col4[2] = col[2]; - col4[3] = 1.0f; - const bool value_changed = ColorEdit4(label, col4, false); - col[0] = col4[0]; - col[1] = col4[1]; - col[2] = col4[2]; - return value_changed; + return ColorEdit4(label, col, flags | ImGuiColorEditFlags_NoAlpha); } -// Edit colors components (each component in 0.0f..1.0f range -// Use CTRL-Click to input value and TAB to go to next item. -bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) +void ImGui::ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags) +{ + bool allow_opt_inputs = !(flags & ImGuiColorEditFlags__InputsMask); + bool allow_opt_datatype = !(flags & ImGuiColorEditFlags__DataTypeMask); + if ((!allow_opt_inputs && !allow_opt_datatype) || !BeginPopup("context")) + return; + ImGuiContext& g = *GImGui; + ImGuiColorEditFlags opts = g.ColorEditOptions; + if (allow_opt_inputs) + { + if (RadioButton("RGB", (opts & ImGuiColorEditFlags_RGB) ? 1 : 0)) opts = (opts & ~ImGuiColorEditFlags__InputsMask) | ImGuiColorEditFlags_RGB; + if (RadioButton("HSV", (opts & ImGuiColorEditFlags_HSV) ? 1 : 0)) opts = (opts & ~ImGuiColorEditFlags__InputsMask) | ImGuiColorEditFlags_HSV; + if (RadioButton("HEX", (opts & ImGuiColorEditFlags_HEX) ? 1 : 0)) opts = (opts & ~ImGuiColorEditFlags__InputsMask) | ImGuiColorEditFlags_HEX; + } + if (allow_opt_datatype) + { + if (allow_opt_inputs) Separator(); + if (RadioButton("0..255", (opts & ImGuiColorEditFlags_Uint8) ? 1 : 0)) opts = (opts & ~ImGuiColorEditFlags__DataTypeMask) | ImGuiColorEditFlags_Uint8; + if (RadioButton("0.00..1.00", (opts & ImGuiColorEditFlags_Float) ? 1 : 0)) opts = (opts & ~ImGuiColorEditFlags__DataTypeMask) | ImGuiColorEditFlags_Float; + } + + if (allow_opt_inputs || allow_opt_datatype) + Separator(); + if (Button("Copy as..", ImVec2(-1,0))) + OpenPopup("Copy"); + if (BeginPopup("Copy")) + { + int cr = IM_F32_TO_INT8_SAT(col[0]), cg = IM_F32_TO_INT8_SAT(col[1]), cb = IM_F32_TO_INT8_SAT(col[2]), ca = (flags & ImGuiColorEditFlags_NoAlpha) ? 255 : IM_F32_TO_INT8_SAT(col[3]); + char buf[64]; + ImFormatString(buf, IM_ARRAYSIZE(buf), "(%.3ff, %.3ff, %.3ff, %.3ff)", col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]); + if (Selectable(buf)) + SetClipboardText(buf); + ImFormatString(buf, IM_ARRAYSIZE(buf), "(%d,%d,%d,%d)", cr, cg, cb, ca); + if (Selectable(buf)) + SetClipboardText(buf); + if (flags & ImGuiColorEditFlags_NoAlpha) + ImFormatString(buf, IM_ARRAYSIZE(buf), "0x%02X%02X%02X", cr, cg, cb); + else + ImFormatString(buf, IM_ARRAYSIZE(buf), "0x%02X%02X%02X%02X", cr, cg, cb, ca); + if (Selectable(buf)) + SetClipboardText(buf); + EndPopup(); + } + + g.ColorEditOptions = opts; + EndPopup(); +} + +static void ColorPickerOptionsPopup(ImGuiColorEditFlags flags, const float* ref_col) +{ + bool allow_opt_picker = !(flags & ImGuiColorEditFlags__PickerMask); + bool allow_opt_alpha_bar = !(flags & ImGuiColorEditFlags_NoAlpha) && !(flags & ImGuiColorEditFlags_AlphaBar); + if ((!allow_opt_picker && !allow_opt_alpha_bar) || !ImGui::BeginPopup("context")) + return; + ImGuiContext& g = *GImGui; + if (allow_opt_picker) + { + ImVec2 picker_size(g.FontSize * 8, ImMax(g.FontSize * 8 - (ImGui::GetFrameHeight() + g.Style.ItemInnerSpacing.x), 1.0f)); // FIXME: Picker size copied from main picker function + ImGui::PushItemWidth(picker_size.x); + for (int picker_type = 0; picker_type < 2; picker_type++) + { + // Draw small/thumbnail version of each picker type (over an invisible button for selection) + if (picker_type > 0) ImGui::Separator(); + ImGui::PushID(picker_type); + ImGuiColorEditFlags picker_flags = ImGuiColorEditFlags_NoInputs|ImGuiColorEditFlags_NoOptions|ImGuiColorEditFlags_NoLabel|ImGuiColorEditFlags_NoSidePreview|(flags & ImGuiColorEditFlags_NoAlpha); + if (picker_type == 0) picker_flags |= ImGuiColorEditFlags_PickerHueBar; + if (picker_type == 1) picker_flags |= ImGuiColorEditFlags_PickerHueWheel; + ImVec2 backup_pos = ImGui::GetCursorScreenPos(); + if (ImGui::Selectable("##selectable", false, 0, picker_size)) // By default, Selectable() is closing popup + g.ColorEditOptions = (g.ColorEditOptions & ~ImGuiColorEditFlags__PickerMask) | (picker_flags & ImGuiColorEditFlags__PickerMask); + ImGui::SetCursorScreenPos(backup_pos); + ImVec4 dummy_ref_col; + memcpy(&dummy_ref_col.x, ref_col, sizeof(float) * (picker_flags & ImGuiColorEditFlags_NoAlpha ? 3 : 4)); + ImGui::ColorPicker4("##dummypicker", &dummy_ref_col.x, picker_flags); + ImGui::PopID(); + } + ImGui::PopItemWidth(); + } + if (allow_opt_alpha_bar) + { + if (allow_opt_picker) ImGui::Separator(); + ImGui::CheckboxFlags("Alpha Bar", (unsigned int*)&g.ColorEditOptions, ImGuiColorEditFlags_AlphaBar); + } + ImGui::EndPopup(); +} + +// Edit colors components (each component in 0.0f..1.0f range). +// See enum ImGuiColorEditFlags_ for available options. e.g. Only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. +// With typical options: Left-click on colored square to open color picker. Right-click to open option menu. CTRL-Click over input fields to edit them and TAB to go to next item. +bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags) { ImGuiWindow* window = GetCurrentWindow(); if (window->SkipItems) @@ -9012,137 +10117,516 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) ImGuiContext& g = *GImGui; const ImGuiStyle& style = g.Style; - const ImGuiID id = window->GetID(label); - const float w_full = CalcItemWidth(); - const float square_sz = (g.FontSize + style.FramePadding.y * 2.0f); + const float square_sz = GetFrameHeight(); + const float w_extra = (flags & ImGuiColorEditFlags_NoSmallPreview) ? 0.0f : (square_sz + style.ItemInnerSpacing.x); + const float w_items_all = CalcItemWidth() - w_extra; + const char* label_display_end = FindRenderedTextEnd(label); - ImGuiColorEditMode edit_mode = window->DC.ColorEditMode; - if (edit_mode == ImGuiColorEditMode_UserSelect || edit_mode == ImGuiColorEditMode_UserSelectShowButton) - edit_mode = g.ColorEditModeStorage.GetInt(id, 0) % 3; - - float f[4] = { col[0], col[1], col[2], col[3] }; - if (edit_mode == ImGuiColorEditMode_HSV) - ColorConvertRGBtoHSV(f[0], f[1], f[2], f[0], f[1], f[2]); - - int i[4] = { IM_F32_TO_INT8_UNBOUND(f[0]), IM_F32_TO_INT8_UNBOUND(f[1]), IM_F32_TO_INT8_UNBOUND(f[2]), IM_F32_TO_INT8_UNBOUND(f[3]) }; - - int components = alpha ? 4 : 3; - bool value_changed = false; + const bool alpha = (flags & ImGuiColorEditFlags_NoAlpha) == 0; + const bool hdr = (flags & ImGuiColorEditFlags_HDR) != 0; + const int components = alpha ? 4 : 3; + const ImGuiColorEditFlags flags_untouched = flags; BeginGroup(); PushID(label); - const bool hsv = (edit_mode == 1); - switch (edit_mode) + // If we're not showing any slider there's no point in doing any HSV conversions + if (flags & ImGuiColorEditFlags_NoInputs) + flags = (flags & (~ImGuiColorEditFlags__InputsMask)) | ImGuiColorEditFlags_RGB | ImGuiColorEditFlags_NoOptions; + + // Context menu: display and modify options (before defaults are applied) + if (!(flags & ImGuiColorEditFlags_NoOptions)) + ColorEditOptionsPopup(col, flags); + + // Read stored options + if (!(flags & ImGuiColorEditFlags__InputsMask)) + flags |= (g.ColorEditOptions & ImGuiColorEditFlags__InputsMask); + if (!(flags & ImGuiColorEditFlags__DataTypeMask)) + flags |= (g.ColorEditOptions & ImGuiColorEditFlags__DataTypeMask); + if (!(flags & ImGuiColorEditFlags__PickerMask)) + flags |= (g.ColorEditOptions & ImGuiColorEditFlags__PickerMask); + flags |= (g.ColorEditOptions & ~(ImGuiColorEditFlags__InputsMask | ImGuiColorEditFlags__DataTypeMask | ImGuiColorEditFlags__PickerMask)); + + // Convert to the formats we need + float f[4] = { col[0], col[1], col[2], alpha ? col[3] : 1.0f }; + if (flags & ImGuiColorEditFlags_HSV) + ColorConvertRGBtoHSV(f[0], f[1], f[2], f[0], f[1], f[2]); + int i[4] = { IM_F32_TO_INT8_UNBOUND(f[0]), IM_F32_TO_INT8_UNBOUND(f[1]), IM_F32_TO_INT8_UNBOUND(f[2]), IM_F32_TO_INT8_UNBOUND(f[3]) }; + + bool value_changed = false; + bool value_changed_as_float = false; + + if ((flags & (ImGuiColorEditFlags_RGB | ImGuiColorEditFlags_HSV)) != 0 && (flags & ImGuiColorEditFlags_NoInputs) == 0) { - case ImGuiColorEditMode_RGB: - case ImGuiColorEditMode_HSV: - { - // RGB/HSV 0..255 Sliders - const float w_items_all = w_full - (square_sz + style.ItemInnerSpacing.x); - const float w_item_one = ImMax(1.0f, (float)(int)((w_items_all - (style.ItemInnerSpacing.x) * (components-1)) / (float)components)); - const float w_item_last = ImMax(1.0f, (float)(int)(w_items_all - (w_item_one + style.ItemInnerSpacing.x) * (components-1))); + // RGB/HSV 0..255 Sliders + const float w_item_one = ImMax(1.0f, (float)(int)((w_items_all - (style.ItemInnerSpacing.x) * (components-1)) / (float)components)); + const float w_item_last = ImMax(1.0f, (float)(int)(w_items_all - (w_item_one + style.ItemInnerSpacing.x) * (components-1))); - const bool hide_prefix = (w_item_one <= CalcTextSize("M:999").x); - const char* ids[4] = { "##X", "##Y", "##Z", "##W" }; - const char* fmt_table[3][4] = - { - { "%3.0f", "%3.0f", "%3.0f", "%3.0f" }, - { "R:%3.0f", "G:%3.0f", "B:%3.0f", "A:%3.0f" }, - { "H:%3.0f", "S:%3.0f", "V:%3.0f", "A:%3.0f" } - }; - const char** fmt = hide_prefix ? fmt_table[0] : hsv ? fmt_table[2] : fmt_table[1]; - - PushItemWidth(w_item_one); - for (int n = 0; n < components; n++) - { - if (n > 0) - SameLine(0, style.ItemInnerSpacing.x); - if (n + 1 == components) - PushItemWidth(w_item_last); - value_changed |= DragInt(ids[n], &i[n], 1.0f, 0, 255, fmt[n]); - } - PopItemWidth(); - PopItemWidth(); - } - break; - case ImGuiColorEditMode_HEX: + const bool hide_prefix = (w_item_one <= CalcTextSize((flags & ImGuiColorEditFlags_Float) ? "M:0.000" : "M:000").x); + const char* ids[4] = { "##X", "##Y", "##Z", "##W" }; + const char* fmt_table_int[3][4] = { - // RGB Hexadecimal Input - const float w_slider_all = w_full - square_sz; - char buf[64]; - if (alpha) - ImFormatString(buf, IM_ARRAYSIZE(buf), "#%02X%02X%02X%02X", i[0], i[1], i[2], i[3]); + { "%3.0f", "%3.0f", "%3.0f", "%3.0f" }, // Short display + { "R:%3.0f", "G:%3.0f", "B:%3.0f", "A:%3.0f" }, // Long display for RGBA + { "H:%3.0f", "S:%3.0f", "V:%3.0f", "A:%3.0f" } // Long display for HSVA + }; + const char* fmt_table_float[3][4] = + { + { "%0.3f", "%0.3f", "%0.3f", "%0.3f" }, // Short display + { "R:%0.3f", "G:%0.3f", "B:%0.3f", "A:%0.3f" }, // Long display for RGBA + { "H:%0.3f", "S:%0.3f", "V:%0.3f", "A:%0.3f" } // Long display for HSVA + }; + const int fmt_idx = hide_prefix ? 0 : (flags & ImGuiColorEditFlags_HSV) ? 2 : 1; + + PushItemWidth(w_item_one); + for (int n = 0; n < components; n++) + { + if (n > 0) + SameLine(0, style.ItemInnerSpacing.x); + if (n + 1 == components) + PushItemWidth(w_item_last); + if (flags & ImGuiColorEditFlags_Float) + value_changed = value_changed_as_float = value_changed | DragFloat(ids[n], &f[n], 1.0f/255.0f, 0.0f, hdr ? 0.0f : 1.0f, fmt_table_float[fmt_idx][n]); else - ImFormatString(buf, IM_ARRAYSIZE(buf), "#%02X%02X%02X", i[0], i[1], i[2]); - PushItemWidth(w_slider_all - style.ItemInnerSpacing.x); - if (InputText("##Text", buf, IM_ARRAYSIZE(buf), ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsUppercase)) - { - value_changed |= true; - char* p = buf; - while (*p == '#' || ImCharIsSpace(*p)) - p++; - i[0] = i[1] = i[2] = i[3] = 0; - if (alpha) - sscanf(p, "%02X%02X%02X%02X", (unsigned int*)&i[0], (unsigned int*)&i[1], (unsigned int*)&i[2], (unsigned int*)&i[3]); // Treat at unsigned (%X is unsigned) - else - sscanf(p, "%02X%02X%02X", (unsigned int*)&i[0], (unsigned int*)&i[1], (unsigned int*)&i[2]); - } - PopItemWidth(); + value_changed |= DragInt(ids[n], &i[n], 1.0f, 0, hdr ? 0 : 255, fmt_table_int[fmt_idx][n]); + if (!(flags & ImGuiColorEditFlags_NoOptions)) + OpenPopupOnItemClick("context"); } - break; + PopItemWidth(); + PopItemWidth(); + } + else if ((flags & ImGuiColorEditFlags_HEX) != 0 && (flags & ImGuiColorEditFlags_NoInputs) == 0) + { + // RGB Hexadecimal Input + char buf[64]; + if (alpha) + ImFormatString(buf, IM_ARRAYSIZE(buf), "#%02X%02X%02X%02X", ImClamp(i[0],0,255), ImClamp(i[1],0,255), ImClamp(i[2],0,255), ImClamp(i[3],0,255)); + else + ImFormatString(buf, IM_ARRAYSIZE(buf), "#%02X%02X%02X", ImClamp(i[0],0,255), ImClamp(i[1],0,255), ImClamp(i[2],0,255)); + PushItemWidth(w_items_all); + if (InputText("##Text", buf, IM_ARRAYSIZE(buf), ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsUppercase)) + { + value_changed = true; + char* p = buf; + while (*p == '#' || ImCharIsSpace(*p)) + p++; + i[0] = i[1] = i[2] = i[3] = 0; + if (alpha) + sscanf(p, "%02X%02X%02X%02X", (unsigned int*)&i[0], (unsigned int*)&i[1], (unsigned int*)&i[2], (unsigned int*)&i[3]); // Treat at unsigned (%X is unsigned) + else + sscanf(p, "%02X%02X%02X", (unsigned int*)&i[0], (unsigned int*)&i[1], (unsigned int*)&i[2]); + } + if (!(flags & ImGuiColorEditFlags_NoOptions)) + OpenPopupOnItemClick("context"); + PopItemWidth(); } - SameLine(0, style.ItemInnerSpacing.x); + ImGuiWindow* picker_active_window = NULL; + if (!(flags & ImGuiColorEditFlags_NoSmallPreview)) + { + if (!(flags & ImGuiColorEditFlags_NoInputs)) + SameLine(0, style.ItemInnerSpacing.x); - const ImVec4 col_display(col[0], col[1], col[2], 1.0f); - if (ColorButton(col_display)) - g.ColorEditModeStorage.SetInt(id, (edit_mode + 1) % 3); // Don't set local copy of 'edit_mode' right away! + const ImVec4 col_v4(col[0], col[1], col[2], alpha ? col[3] : 1.0f); + if (ColorButton("##ColorButton", col_v4, flags)) + { + if (!(flags & ImGuiColorEditFlags_NoPicker)) + { + // Store current color and open a picker + g.ColorPickerRef = col_v4; + OpenPopup("picker"); + SetNextWindowPos(window->DC.LastItemRect.GetBL() + ImVec2(-1,style.ItemSpacing.y)); + } + } + if (!(flags & ImGuiColorEditFlags_NoOptions)) + OpenPopupOnItemClick("context"); + + if (BeginPopup("picker")) + { + picker_active_window = g.CurrentWindow; + if (label != label_display_end) + { + TextUnformatted(label, label_display_end); + Separator(); + } + ImGuiColorEditFlags picker_flags_to_forward = ImGuiColorEditFlags__DataTypeMask | ImGuiColorEditFlags__PickerMask | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaBar; + ImGuiColorEditFlags picker_flags = (flags_untouched & picker_flags_to_forward) | ImGuiColorEditFlags__InputsMask | ImGuiColorEditFlags_NoLabel | ImGuiColorEditFlags_AlphaPreviewHalf; + PushItemWidth(square_sz * 12.0f); // Use 256 + bar sizes? + value_changed |= ColorPicker4("##picker", col, picker_flags, &g.ColorPickerRef.x); + PopItemWidth(); + EndPopup(); + } + } - // Recreate our own tooltip over's ColorButton() one because we want to display correct alpha here - if (IsItemHovered()) - SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col[0], col[1], col[2], col[3], IM_F32_TO_INT8_SAT(col[0]), IM_F32_TO_INT8_SAT(col[1]), IM_F32_TO_INT8_SAT(col[2]), IM_F32_TO_INT8_SAT(col[3])); - - if (window->DC.ColorEditMode == ImGuiColorEditMode_UserSelectShowButton) + if (label != label_display_end && !(flags & ImGuiColorEditFlags_NoLabel)) { SameLine(0, style.ItemInnerSpacing.x); - const char* button_titles[3] = { "RGB", "HSV", "HEX" }; - if (ButtonEx(button_titles[edit_mode], ImVec2(0,0), ImGuiButtonFlags_DontClosePopups)) - g.ColorEditModeStorage.SetInt(id, (edit_mode + 1) % 3); // Don't set local copy of 'edit_mode' right away! - } - - const char* label_display_end = FindRenderedTextEnd(label); - if (label != label_display_end) - { - SameLine(0, (window->DC.ColorEditMode == ImGuiColorEditMode_UserSelectShowButton) ? -1.0f : style.ItemInnerSpacing.x); TextUnformatted(label, label_display_end); } // Convert back - for (int n = 0; n < 4; n++) - f[n] = i[n] / 255.0f; - if (edit_mode == 1) - ColorConvertHSVtoRGB(f[0], f[1], f[2], f[0], f[1], f[2]); - - if (value_changed) + if (picker_active_window == NULL) { - col[0] = f[0]; - col[1] = f[1]; - col[2] = f[2]; - if (alpha) - col[3] = f[3]; + if (!value_changed_as_float) + for (int n = 0; n < 4; n++) + f[n] = i[n] / 255.0f; + if (flags & ImGuiColorEditFlags_HSV) + ColorConvertHSVtoRGB(f[0], f[1], f[2], f[0], f[1], f[2]); + if (value_changed) + { + col[0] = f[0]; + col[1] = f[1]; + col[2] = f[2]; + if (alpha) + col[3] = f[3]; + } } PopID(); EndGroup(); + // Drag and Drop Target + if (window->DC.LastItemRectHoveredRect && BeginDragDropTarget()) // NB: The LastItemRectHoveredRect test is merely an optional micro-optimization + { + if (const ImGuiPayload* payload = AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_3F)) + { + memcpy((float*)col, payload->Data, sizeof(float) * 3); + value_changed = true; + } + if (const ImGuiPayload* payload = AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_4F)) + { + memcpy((float*)col, payload->Data, sizeof(float) * components); + value_changed = true; + } + EndDragDropTarget(); + } + + // When picker is being actively used, use its active id so IsItemActive() will function on ColorEdit4(). + if (picker_active_window && g.ActiveId != 0 && g.ActiveIdWindow == picker_active_window) + window->DC.LastItemId = g.ActiveId; + return value_changed; } -void ImGui::ColorEditMode(ImGuiColorEditMode mode) +bool ImGui::ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags) { + float col4[4] = { col[0], col[1], col[2], 1.0f }; + if (!ColorPicker4(label, col4, flags | ImGuiColorEditFlags_NoAlpha)) + return false; + col[0] = col4[0]; col[1] = col4[1]; col[2] = col4[2]; + return true; +} + +// 'pos' is position of the arrow tip. half_sz.x is length from base to tip. half_sz.y is length on each side. +static void RenderArrow(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, ImGuiDir direction, ImU32 col) +{ + switch (direction) + { + case ImGuiDir_Left: draw_list->AddTriangleFilled(ImVec2(pos.x + half_sz.x, pos.y - half_sz.y), ImVec2(pos.x + half_sz.x, pos.y + half_sz.y), pos, col); return; + case ImGuiDir_Right: draw_list->AddTriangleFilled(ImVec2(pos.x - half_sz.x, pos.y + half_sz.y), ImVec2(pos.x - half_sz.x, pos.y - half_sz.y), pos, col); return; + case ImGuiDir_Up: draw_list->AddTriangleFilled(ImVec2(pos.x + half_sz.x, pos.y + half_sz.y), ImVec2(pos.x - half_sz.x, pos.y + half_sz.y), pos, col); return; + case ImGuiDir_Down: draw_list->AddTriangleFilled(ImVec2(pos.x - half_sz.x, pos.y - half_sz.y), ImVec2(pos.x + half_sz.x, pos.y - half_sz.y), pos, col); return; + case ImGuiDir_None: case ImGuiDir_Count_: break; // Fix warnings + } +} + +static void RenderArrowsForVerticalBar(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, float bar_w) +{ + RenderArrow(draw_list, ImVec2(pos.x + half_sz.x + 1, pos.y), ImVec2(half_sz.x + 2, half_sz.y + 1), ImGuiDir_Right, IM_COL32_BLACK); + RenderArrow(draw_list, ImVec2(pos.x + half_sz.x, pos.y), half_sz, ImGuiDir_Right, IM_COL32_WHITE); + RenderArrow(draw_list, ImVec2(pos.x + bar_w - half_sz.x - 1, pos.y), ImVec2(half_sz.x + 2, half_sz.y + 1), ImGuiDir_Left, IM_COL32_BLACK); + RenderArrow(draw_list, ImVec2(pos.x + bar_w - half_sz.x, pos.y), half_sz, ImGuiDir_Left, IM_COL32_WHITE); +} + +// ColorPicker +// Note: only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. +// FIXME: we adjust the big color square height based on item width, which may cause a flickering feedback loop (if automatic height makes a vertical scrollbar appears, affecting automatic width..) +bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags, const float* ref_col) +{ + ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); - window->DC.ColorEditMode = mode; + ImDrawList* draw_list = window->DrawList; + + ImGuiStyle& style = g.Style; + ImGuiIO& io = g.IO; + + PushID(label); + BeginGroup(); + + if (!(flags & ImGuiColorEditFlags_NoSidePreview)) + flags |= ImGuiColorEditFlags_NoSmallPreview; + + // Context menu: display and store options. + if (!(flags & ImGuiColorEditFlags_NoOptions)) + ColorPickerOptionsPopup(flags, col); + + // Read stored options + if (!(flags & ImGuiColorEditFlags__PickerMask)) + flags |= ((g.ColorEditOptions & ImGuiColorEditFlags__PickerMask) ? g.ColorEditOptions : ImGuiColorEditFlags__OptionsDefault) & ImGuiColorEditFlags__PickerMask; + IM_ASSERT(ImIsPowerOfTwo((int)(flags & ImGuiColorEditFlags__PickerMask))); // Check that only 1 is selected + if (!(flags & ImGuiColorEditFlags_NoOptions)) + flags |= (g.ColorEditOptions & ImGuiColorEditFlags_AlphaBar); + + // Setup + int components = (flags & ImGuiColorEditFlags_NoAlpha) ? 3 : 4; + bool alpha_bar = (flags & ImGuiColorEditFlags_AlphaBar) && !(flags & ImGuiColorEditFlags_NoAlpha); + ImVec2 picker_pos = window->DC.CursorPos; + float square_sz = GetFrameHeight(); + float bars_width = square_sz; // Arbitrary smallish width of Hue/Alpha picking bars + float sv_picker_size = ImMax(bars_width * 1, CalcItemWidth() - (alpha_bar ? 2 : 1) * (bars_width + style.ItemInnerSpacing.x)); // Saturation/Value picking box + float bar0_pos_x = picker_pos.x + sv_picker_size + style.ItemInnerSpacing.x; + float bar1_pos_x = bar0_pos_x + bars_width + style.ItemInnerSpacing.x; + float bars_triangles_half_sz = (float)(int)(bars_width * 0.20f); + + float backup_initial_col[4]; + memcpy(backup_initial_col, col, components * sizeof(float)); + + float wheel_thickness = sv_picker_size * 0.08f; + float wheel_r_outer = sv_picker_size * 0.50f; + float wheel_r_inner = wheel_r_outer - wheel_thickness; + ImVec2 wheel_center(picker_pos.x + (sv_picker_size + bars_width)*0.5f, picker_pos.y + sv_picker_size*0.5f); + + // Note: the triangle is displayed rotated with triangle_pa pointing to Hue, but most coordinates stays unrotated for logic. + float triangle_r = wheel_r_inner - (int)(sv_picker_size * 0.027f); + ImVec2 triangle_pa = ImVec2(triangle_r, 0.0f); // Hue point. + ImVec2 triangle_pb = ImVec2(triangle_r * -0.5f, triangle_r * -0.866025f); // Black point. + ImVec2 triangle_pc = ImVec2(triangle_r * -0.5f, triangle_r * +0.866025f); // White point. + + float H,S,V; + ColorConvertRGBtoHSV(col[0], col[1], col[2], H, S, V); + + bool value_changed = false, value_changed_h = false, value_changed_sv = false; + + if (flags & ImGuiColorEditFlags_PickerHueWheel) + { + // Hue wheel + SV triangle logic + InvisibleButton("hsv", ImVec2(sv_picker_size + style.ItemInnerSpacing.x + bars_width, sv_picker_size)); + if (IsItemActive()) + { + ImVec2 initial_off = g.IO.MouseClickedPos[0] - wheel_center; + ImVec2 current_off = g.IO.MousePos - wheel_center; + float initial_dist2 = ImLengthSqr(initial_off); + if (initial_dist2 >= (wheel_r_inner-1)*(wheel_r_inner-1) && initial_dist2 <= (wheel_r_outer+1)*(wheel_r_outer+1)) + { + // Interactive with Hue wheel + H = atan2f(current_off.y, current_off.x) / IM_PI*0.5f; + if (H < 0.0f) + H += 1.0f; + value_changed = value_changed_h = true; + } + float cos_hue_angle = cosf(-H * 2.0f * IM_PI); + float sin_hue_angle = sinf(-H * 2.0f * IM_PI); + if (ImTriangleContainsPoint(triangle_pa, triangle_pb, triangle_pc, ImRotate(initial_off, cos_hue_angle, sin_hue_angle))) + { + // Interacting with SV triangle + ImVec2 current_off_unrotated = ImRotate(current_off, cos_hue_angle, sin_hue_angle); + if (!ImTriangleContainsPoint(triangle_pa, triangle_pb, triangle_pc, current_off_unrotated)) + current_off_unrotated = ImTriangleClosestPoint(triangle_pa, triangle_pb, triangle_pc, current_off_unrotated); + float uu, vv, ww; + ImTriangleBarycentricCoords(triangle_pa, triangle_pb, triangle_pc, current_off_unrotated, uu, vv, ww); + V = ImClamp(1.0f - vv, 0.0001f, 1.0f); + S = ImClamp(uu / V, 0.0001f, 1.0f); + value_changed = value_changed_sv = true; + } + } + if (!(flags & ImGuiColorEditFlags_NoOptions)) + OpenPopupOnItemClick("context"); + } + else if (flags & ImGuiColorEditFlags_PickerHueBar) + { + // SV rectangle logic + InvisibleButton("sv", ImVec2(sv_picker_size, sv_picker_size)); + if (IsItemActive()) + { + S = ImSaturate((io.MousePos.x - picker_pos.x) / (sv_picker_size-1)); + V = 1.0f - ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size-1)); + value_changed = value_changed_sv = true; + } + if (!(flags & ImGuiColorEditFlags_NoOptions)) + OpenPopupOnItemClick("context"); + + // Hue bar logic + SetCursorScreenPos(ImVec2(bar0_pos_x, picker_pos.y)); + InvisibleButton("hue", ImVec2(bars_width, sv_picker_size)); + if (IsItemActive()) + { + H = ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size-1)); + value_changed = value_changed_h = true; + } + } + + // Alpha bar logic + if (alpha_bar) + { + SetCursorScreenPos(ImVec2(bar1_pos_x, picker_pos.y)); + InvisibleButton("alpha", ImVec2(bars_width, sv_picker_size)); + if (IsItemActive()) + { + col[3] = 1.0f - ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size-1)); + value_changed = true; + } + } + + if (!(flags & ImGuiColorEditFlags_NoSidePreview)) + { + SameLine(0, style.ItemInnerSpacing.x); + BeginGroup(); + } + + if (!(flags & ImGuiColorEditFlags_NoLabel)) + { + const char* label_display_end = FindRenderedTextEnd(label); + if (label != label_display_end) + { + if ((flags & ImGuiColorEditFlags_NoSidePreview)) + SameLine(0, style.ItemInnerSpacing.x); + TextUnformatted(label, label_display_end); + } + } + + if (!(flags & ImGuiColorEditFlags_NoSidePreview)) + { + ImVec4 col_v4(col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]); + if ((flags & ImGuiColorEditFlags_NoLabel)) + Text("Current"); + ColorButton("##current", col_v4, (flags & (ImGuiColorEditFlags_HDR|ImGuiColorEditFlags_AlphaPreview|ImGuiColorEditFlags_AlphaPreviewHalf|ImGuiColorEditFlags_NoTooltip)), ImVec2(square_sz * 3, square_sz * 2)); + if (ref_col != NULL) + { + Text("Original"); + ImVec4 ref_col_v4(ref_col[0], ref_col[1], ref_col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : ref_col[3]); + if (ColorButton("##original", ref_col_v4, (flags & (ImGuiColorEditFlags_HDR|ImGuiColorEditFlags_AlphaPreview|ImGuiColorEditFlags_AlphaPreviewHalf|ImGuiColorEditFlags_NoTooltip)), ImVec2(square_sz * 3, square_sz * 2))) + { + memcpy(col, ref_col, components * sizeof(float)); + value_changed = true; + } + } + EndGroup(); + } + + // Convert back color to RGB + if (value_changed_h || value_changed_sv) + ColorConvertHSVtoRGB(H >= 1.0f ? H - 10 * 1e-6f : H, S > 0.0f ? S : 10*1e-6f, V > 0.0f ? V : 1e-6f, col[0], col[1], col[2]); + + // R,G,B and H,S,V slider color editor + if ((flags & ImGuiColorEditFlags_NoInputs) == 0) + { + PushItemWidth((alpha_bar ? bar1_pos_x : bar0_pos_x) + bars_width - picker_pos.x); + ImGuiColorEditFlags sub_flags_to_forward = ImGuiColorEditFlags__DataTypeMask | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoSmallPreview | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf; + ImGuiColorEditFlags sub_flags = (flags & sub_flags_to_forward) | ImGuiColorEditFlags_NoPicker; + if (flags & ImGuiColorEditFlags_RGB || (flags & ImGuiColorEditFlags__InputsMask) == 0) + value_changed |= ColorEdit4("##rgb", col, sub_flags | ImGuiColorEditFlags_RGB); + if (flags & ImGuiColorEditFlags_HSV || (flags & ImGuiColorEditFlags__InputsMask) == 0) + value_changed |= ColorEdit4("##hsv", col, sub_flags | ImGuiColorEditFlags_HSV); + if (flags & ImGuiColorEditFlags_HEX || (flags & ImGuiColorEditFlags__InputsMask) == 0) + value_changed |= ColorEdit4("##hex", col, sub_flags | ImGuiColorEditFlags_HEX); + PopItemWidth(); + } + + // Try to cancel hue wrap (after ColorEdit), if any + if (value_changed) + { + float new_H, new_S, new_V; + ColorConvertRGBtoHSV(col[0], col[1], col[2], new_H, new_S, new_V); + if (new_H <= 0 && H > 0) + { + if (new_V <= 0 && V != new_V) + ColorConvertHSVtoRGB(H, S, new_V <= 0 ? V * 0.5f : new_V, col[0], col[1], col[2]); + else if (new_S <= 0) + ColorConvertHSVtoRGB(H, new_S <= 0 ? S * 0.5f : new_S, new_V, col[0], col[1], col[2]); + } + } + + ImVec4 hue_color_f(1, 1, 1, 1); ColorConvertHSVtoRGB(H, 1, 1, hue_color_f.x, hue_color_f.y, hue_color_f.z); + ImU32 hue_color32 = ColorConvertFloat4ToU32(hue_color_f); + ImU32 col32_no_alpha = ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 1.0f)); + + const ImU32 hue_colors[6+1] = { IM_COL32(255,0,0,255), IM_COL32(255,255,0,255), IM_COL32(0,255,0,255), IM_COL32(0,255,255,255), IM_COL32(0,0,255,255), IM_COL32(255,0,255,255), IM_COL32(255,0,0,255) }; + ImVec2 sv_cursor_pos; + + if (flags & ImGuiColorEditFlags_PickerHueWheel) + { + // Render Hue Wheel + const float aeps = 1.5f / wheel_r_outer; // Half a pixel arc length in radians (2pi cancels out). + const int segment_per_arc = ImMax(4, (int)wheel_r_outer / 12); + for (int n = 0; n < 6; n++) + { + const float a0 = (n) /6.0f * 2.0f * IM_PI - aeps; + const float a1 = (n+1.0f)/6.0f * 2.0f * IM_PI + aeps; + const int vert_start_idx = draw_list->VtxBuffer.Size; + draw_list->PathArcTo(wheel_center, (wheel_r_inner + wheel_r_outer)*0.5f, a0, a1, segment_per_arc); + draw_list->PathStroke(IM_COL32_WHITE, false, wheel_thickness); + const int vert_end_idx = draw_list->VtxBuffer.Size; + + // Paint colors over existing vertices + ImVec2 gradient_p0(wheel_center.x + cosf(a0) * wheel_r_inner, wheel_center.y + sinf(a0) * wheel_r_inner); + ImVec2 gradient_p1(wheel_center.x + cosf(a1) * wheel_r_inner, wheel_center.y + sinf(a1) * wheel_r_inner); + ShadeVertsLinearColorGradientKeepAlpha(draw_list->VtxBuffer.Data + vert_start_idx, draw_list->VtxBuffer.Data + vert_end_idx, gradient_p0, gradient_p1, hue_colors[n], hue_colors[n+1]); + } + + // Render Cursor + preview on Hue Wheel + float cos_hue_angle = cosf(H * 2.0f * IM_PI); + float sin_hue_angle = sinf(H * 2.0f * IM_PI); + ImVec2 hue_cursor_pos(wheel_center.x + cos_hue_angle * (wheel_r_inner+wheel_r_outer)*0.5f, wheel_center.y + sin_hue_angle * (wheel_r_inner+wheel_r_outer)*0.5f); + float hue_cursor_rad = value_changed_h ? wheel_thickness * 0.65f : wheel_thickness * 0.55f; + int hue_cursor_segments = ImClamp((int)(hue_cursor_rad / 1.4f), 9, 32); + draw_list->AddCircleFilled(hue_cursor_pos, hue_cursor_rad, hue_color32, hue_cursor_segments); + draw_list->AddCircle(hue_cursor_pos, hue_cursor_rad+1, IM_COL32(128,128,128,255), hue_cursor_segments); + draw_list->AddCircle(hue_cursor_pos, hue_cursor_rad, IM_COL32_WHITE, hue_cursor_segments); + + // Render SV triangle (rotated according to hue) + ImVec2 tra = wheel_center + ImRotate(triangle_pa, cos_hue_angle, sin_hue_angle); + ImVec2 trb = wheel_center + ImRotate(triangle_pb, cos_hue_angle, sin_hue_angle); + ImVec2 trc = wheel_center + ImRotate(triangle_pc, cos_hue_angle, sin_hue_angle); + ImVec2 uv_white = GetFontTexUvWhitePixel(); + draw_list->PrimReserve(6, 6); + draw_list->PrimVtx(tra, uv_white, hue_color32); + draw_list->PrimVtx(trb, uv_white, hue_color32); + draw_list->PrimVtx(trc, uv_white, IM_COL32_WHITE); + draw_list->PrimVtx(tra, uv_white, IM_COL32_BLACK_TRANS); + draw_list->PrimVtx(trb, uv_white, IM_COL32_BLACK); + draw_list->PrimVtx(trc, uv_white, IM_COL32_BLACK_TRANS); + draw_list->AddTriangle(tra, trb, trc, IM_COL32(128,128,128,255), 1.5f); + sv_cursor_pos = ImLerp(ImLerp(trc, tra, ImSaturate(S)), trb, ImSaturate(1 - V)); + } + else if (flags & ImGuiColorEditFlags_PickerHueBar) + { + // Render SV Square + draw_list->AddRectFilledMultiColor(picker_pos, picker_pos + ImVec2(sv_picker_size,sv_picker_size), IM_COL32_WHITE, hue_color32, hue_color32, IM_COL32_WHITE); + draw_list->AddRectFilledMultiColor(picker_pos, picker_pos + ImVec2(sv_picker_size,sv_picker_size), IM_COL32_BLACK_TRANS, IM_COL32_BLACK_TRANS, IM_COL32_BLACK, IM_COL32_BLACK); + RenderFrameBorder(picker_pos, picker_pos + ImVec2(sv_picker_size,sv_picker_size), 0.0f); + sv_cursor_pos.x = ImClamp((float)(int)(picker_pos.x + ImSaturate(S) * sv_picker_size + 0.5f), picker_pos.x + 2, picker_pos.x + sv_picker_size - 2); // Sneakily prevent the circle to stick out too much + sv_cursor_pos.y = ImClamp((float)(int)(picker_pos.y + ImSaturate(1 - V) * sv_picker_size + 0.5f), picker_pos.y + 2, picker_pos.y + sv_picker_size - 2); + + // Render Hue Bar + for (int i = 0; i < 6; ++i) + draw_list->AddRectFilledMultiColor(ImVec2(bar0_pos_x, picker_pos.y + i * (sv_picker_size / 6)), ImVec2(bar0_pos_x + bars_width, picker_pos.y + (i + 1) * (sv_picker_size / 6)), hue_colors[i], hue_colors[i], hue_colors[i + 1], hue_colors[i + 1]); + float bar0_line_y = (float)(int)(picker_pos.y + H * sv_picker_size + 0.5f); + RenderFrameBorder(ImVec2(bar0_pos_x, picker_pos.y), ImVec2(bar0_pos_x + bars_width, picker_pos.y + sv_picker_size), 0.0f); + RenderArrowsForVerticalBar(draw_list, ImVec2(bar0_pos_x - 1, bar0_line_y), ImVec2(bars_triangles_half_sz + 1, bars_triangles_half_sz), bars_width + 2.0f); + } + + // Render cursor/preview circle (clamp S/V within 0..1 range because floating points colors may lead HSV values to be out of range) + float sv_cursor_rad = value_changed_sv ? 10.0f : 6.0f; + draw_list->AddCircleFilled(sv_cursor_pos, sv_cursor_rad, col32_no_alpha, 12); + draw_list->AddCircle(sv_cursor_pos, sv_cursor_rad+1, IM_COL32(128,128,128,255), 12); + draw_list->AddCircle(sv_cursor_pos, sv_cursor_rad, IM_COL32_WHITE, 12); + + // Render alpha bar + if (alpha_bar) + { + float alpha = ImSaturate(col[3]); + ImRect bar1_bb(bar1_pos_x, picker_pos.y, bar1_pos_x + bars_width, picker_pos.y + sv_picker_size); + RenderColorRectWithAlphaCheckerboard(bar1_bb.Min, bar1_bb.Max, IM_COL32(0,0,0,0), bar1_bb.GetWidth() / 2.0f, ImVec2(0.0f, 0.0f)); + draw_list->AddRectFilledMultiColor(bar1_bb.Min, bar1_bb.Max, col32_no_alpha, col32_no_alpha, col32_no_alpha & ~IM_COL32_A_MASK, col32_no_alpha & ~IM_COL32_A_MASK); + float bar1_line_y = (float)(int)(picker_pos.y + (1.0f - alpha) * sv_picker_size + 0.5f); + RenderFrameBorder(bar1_bb.Min, bar1_bb.Max, 0.0f); + RenderArrowsForVerticalBar(draw_list, ImVec2(bar1_pos_x - 1, bar1_line_y), ImVec2(bars_triangles_half_sz + 1, bars_triangles_half_sz), bars_width + 2.0f); + } + + EndGroup(); + PopID(); + + return value_changed && memcmp(backup_initial_col, col, components * sizeof(float)); } // Horizontal separating line. @@ -9151,8 +10635,20 @@ void ImGui::Separator() ImGuiWindow* window = GetCurrentWindow(); if (window->SkipItems) return; + ImGuiContext& g = *GImGui; - if (window->DC.ColumnsCount > 1) + ImGuiWindowFlags flags = 0; + if ((flags & (ImGuiSeparatorFlags_Horizontal | ImGuiSeparatorFlags_Vertical)) == 0) + flags |= (window->DC.LayoutType == ImGuiLayoutType_Horizontal) ? ImGuiSeparatorFlags_Vertical : ImGuiSeparatorFlags_Horizontal; + IM_ASSERT(ImIsPowerOfTwo((int)(flags & (ImGuiSeparatorFlags_Horizontal | ImGuiSeparatorFlags_Vertical)))); // Check that only 1 option is selected + if (flags & ImGuiSeparatorFlags_Vertical) + { + VerticalSeparator(); + return; + } + + // Horizontal Separator + if (window->DC.ColumnsSet) PopClipRect(); float x1 = window->Pos.x; @@ -9162,26 +10658,93 @@ void ImGui::Separator() const ImRect bb(ImVec2(x1, window->DC.CursorPos.y), ImVec2(x2, window->DC.CursorPos.y+1.0f)); ItemSize(ImVec2(0.0f, 0.0f)); // NB: we don't provide our width so that it doesn't get feed back into AutoFit, we don't provide height to not alter layout. - if (!ItemAdd(bb, NULL)) + if (!ItemAdd(bb, 0)) { - if (window->DC.ColumnsCount > 1) + if (window->DC.ColumnsSet) PushColumnClipRect(); return; } - window->DrawList->AddLine(bb.Min, ImVec2(bb.Max.x,bb.Min.y), GetColorU32(ImGuiCol_Border)); + window->DrawList->AddLine(bb.Min, ImVec2(bb.Max.x,bb.Min.y), GetColorU32(ImGuiCol_Separator)); - ImGuiContext& g = *GImGui; if (g.LogEnabled) - LogText(IM_NEWLINE "--------------------------------"); + LogRenderedText(NULL, IM_NEWLINE "--------------------------------"); - if (window->DC.ColumnsCount > 1) + if (window->DC.ColumnsSet) { PushColumnClipRect(); - window->DC.ColumnsCellMinY = window->DC.CursorPos.y; + window->DC.ColumnsSet->CellMinY = window->DC.CursorPos.y; } } +void ImGui::VerticalSeparator() +{ + ImGuiWindow* window = GetCurrentWindow(); + if (window->SkipItems) + return; + ImGuiContext& g = *GImGui; + + float y1 = window->DC.CursorPos.y; + float y2 = window->DC.CursorPos.y + window->DC.CurrentLineHeight; + const ImRect bb(ImVec2(window->DC.CursorPos.x, y1), ImVec2(window->DC.CursorPos.x + 1.0f, y2)); + ItemSize(ImVec2(bb.GetWidth(), 0.0f)); + if (!ItemAdd(bb, 0)) + return; + + window->DrawList->AddLine(ImVec2(bb.Min.x, bb.Min.y), ImVec2(bb.Min.x, bb.Max.y), GetColorU32(ImGuiCol_Separator)); + if (g.LogEnabled) + LogText(" |"); +} + +bool ImGui::SplitterBehavior(ImGuiID id, const ImRect& bb, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend) +{ + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; + + const ImGuiItemFlags item_flags_backup = window->DC.ItemFlags; +#ifdef IMGUI_HAS_NAV + window->DC.ItemFlags |= ImGuiItemFlags_NoNav | ImGuiItemFlags_NoNavDefaultFocus; +#endif + bool add = ItemAdd(bb, id); + window->DC.ItemFlags = item_flags_backup; + if (!add) + return false; + + bool hovered, held; + ImRect bb_interact = bb; + bb_interact.Expand(axis == ImGuiAxis_Y ? ImVec2(0.0f, hover_extend) : ImVec2(hover_extend, 0.0f)); + ButtonBehavior(bb_interact, id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_AllowItemOverlap); + if (g.ActiveId != id) + SetItemAllowOverlap(); + + if (held || (g.HoveredId == id && g.HoveredIdPreviousFrame == id)) + SetMouseCursor(axis == ImGuiAxis_Y ? ImGuiMouseCursor_ResizeNS : ImGuiMouseCursor_ResizeEW); + + ImRect bb_render = bb; + if (held) + { + ImVec2 mouse_delta_2d = g.IO.MousePos - g.ActiveIdClickOffset - bb_interact.Min; + float mouse_delta = (axis == ImGuiAxis_Y) ? mouse_delta_2d.y : mouse_delta_2d.x; + + // Minimum pane size + if (mouse_delta < min_size1 - *size1) + mouse_delta = min_size1 - *size1; + if (mouse_delta > *size2 - min_size2) + mouse_delta = *size2 - min_size2; + + // Apply resize + *size1 += mouse_delta; + *size2 -= mouse_delta; + bb_render.Translate((axis == ImGuiAxis_X) ? ImVec2(mouse_delta, 0.0f) : ImVec2(0.0f, mouse_delta)); + } + + // Render + const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : hovered ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator); + window->DrawList->AddRectFilled(bb_render.Min, bb_render.Max, col, g.Style.FrameRounding); + + return held; +} + void ImGui::Spacing() { ImGuiWindow* window = GetCurrentWindow(); @@ -9198,7 +10761,7 @@ void ImGui::Dummy(const ImVec2& size) const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size); ItemSize(bb); - ItemAdd(bb, NULL); + ItemAdd(bb, 0); } bool ImGui::IsRectVisible(const ImVec2& size) @@ -9242,12 +10805,11 @@ void ImGui::EndGroup() ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); - IM_ASSERT(!window->DC.GroupStack.empty()); // Mismatched BeginGroup()/EndGroup() calls + IM_ASSERT(!window->DC.GroupStack.empty()); // Mismatched BeginGroup()/EndGroup() calls ImGuiGroupData& group_data = window->DC.GroupStack.back(); ImRect group_bb(group_data.BackupCursorPos, window->DC.CursorMaxPos); - group_bb.Max.y -= g.Style.ItemSpacing.y; // Cancel out last vertical spacing because we are adding one ourselves. group_bb.Max = ImMax(group_bb.Min, group_bb.Max); window->DC.CursorPos = group_data.BackupCursorPos; @@ -9262,20 +10824,19 @@ void ImGui::EndGroup() { window->DC.CurrentLineTextBaseOffset = ImMax(window->DC.PrevLineTextBaseOffset, group_data.BackupCurrentLineTextBaseOffset); // FIXME: Incorrect, we should grab the base offset from the *first line* of the group but it is hard to obtain now. ItemSize(group_bb.GetSize(), group_data.BackupCurrentLineTextBaseOffset); - ItemAdd(group_bb, NULL); + ItemAdd(group_bb, 0); } - // If the current ActiveId was declared within the boundary of our group, we copy it to LastItemId so IsItemActive() will function on the entire group. + // If the current ActiveId was declared within the boundary of our group, we copy it to LastItemId so IsItemActive() will be functional on the entire group. // It would be be neater if we replaced window.DC.LastItemId by e.g. 'bool LastItemIsActive', but if you search for LastItemId you'll notice it is only used in that context. const bool active_id_within_group = (!group_data.BackupActiveIdIsAlive && g.ActiveIdIsAlive && g.ActiveId && g.ActiveIdWindow->RootWindow == window->RootWindow); if (active_id_within_group) window->DC.LastItemId = g.ActiveId; - if (active_id_within_group && g.HoveredId == g.ActiveId) - window->DC.LastItemHoveredAndUsable = window->DC.LastItemHoveredRect = true; + window->DC.LastItemRect = group_bb; window->DC.GroupStack.pop_back(); - //window->DrawList->AddRect(group_bb.Min, group_bb.Max, IM_COL32(255,0,255,255)); // Debug + //window->DrawList->AddRect(group_bb.Min, group_bb.Max, IM_COL32(255,0,255,255)); // [Debug] } // Gets back to previous line and continue with horizontal layout @@ -9311,38 +10872,44 @@ void ImGui::NewLine() ImGuiWindow* window = GetCurrentWindow(); if (window->SkipItems) return; + + ImGuiContext& g = *GImGui; + const ImGuiLayoutType backup_layout_type = window->DC.LayoutType; + window->DC.LayoutType = ImGuiLayoutType_Vertical; if (window->DC.CurrentLineHeight > 0.0f) // In the event that we are on a line with items that is smaller that FontSize high, we will preserve its height. ItemSize(ImVec2(0,0)); else - ItemSize(ImVec2(0.0f, GImGui->FontSize)); + ItemSize(ImVec2(0.0f, g.FontSize)); + window->DC.LayoutType = backup_layout_type; } void ImGui::NextColumn() { ImGuiWindow* window = GetCurrentWindow(); - if (window->SkipItems || window->DC.ColumnsCount <= 1) + if (window->SkipItems || window->DC.ColumnsSet == NULL) return; ImGuiContext& g = *GImGui; PopItemWidth(); PopClipRect(); - window->DC.ColumnsCellMaxY = ImMax(window->DC.ColumnsCellMaxY, window->DC.CursorPos.y); - if (++window->DC.ColumnsCurrent < window->DC.ColumnsCount) + ImGuiColumnsSet* columns = window->DC.ColumnsSet; + columns->CellMaxY = ImMax(columns->CellMaxY, window->DC.CursorPos.y); + if (++columns->Current < columns->Count) { // Columns 1+ cancel out IndentX - window->DC.ColumnsOffsetX = GetColumnOffset(window->DC.ColumnsCurrent) - window->DC.IndentX + g.Style.ItemSpacing.x; - window->DrawList->ChannelsSetCurrent(window->DC.ColumnsCurrent); + window->DC.ColumnsOffsetX = GetColumnOffset(columns->Current) - window->DC.IndentX + g.Style.ItemSpacing.x; + window->DrawList->ChannelsSetCurrent(columns->Current); } else { - window->DC.ColumnsCurrent = 0; window->DC.ColumnsOffsetX = 0.0f; - window->DC.ColumnsCellMinY = window->DC.ColumnsCellMaxY; window->DrawList->ChannelsSetCurrent(0); + columns->Current = 0; + columns->CellMinY = columns->CellMaxY; } window->DC.CursorPos.x = (float)(int)(window->Pos.x + window->DC.IndentX + window->DC.ColumnsOffsetX); - window->DC.CursorPos.y = window->DC.ColumnsCellMinY; + window->DC.CursorPos.y = columns->CellMinY; window->DC.CurrentLineHeight = 0.0f; window->DC.CurrentLineTextBaseOffset = 0.0f; @@ -9353,182 +10920,308 @@ void ImGui::NextColumn() int ImGui::GetColumnIndex() { ImGuiWindow* window = GetCurrentWindowRead(); - return window->DC.ColumnsCurrent; + return window->DC.ColumnsSet ? window->DC.ColumnsSet->Current : 0; } int ImGui::GetColumnsCount() { ImGuiWindow* window = GetCurrentWindowRead(); - return window->DC.ColumnsCount; + return window->DC.ColumnsSet ? window->DC.ColumnsSet->Count : 1; } -static float GetDraggedColumnOffset(int column_index) +static float OffsetNormToPixels(const ImGuiColumnsSet* columns, float offset_norm) +{ + return offset_norm * (columns->MaxX - columns->MinX); +} + +static float PixelsToOffsetNorm(const ImGuiColumnsSet* columns, float offset) +{ + return offset / (columns->MaxX - columns->MinX); +} + +static inline float GetColumnsRectHalfWidth() { return 4.0f; } + +static float GetDraggedColumnOffset(ImGuiColumnsSet* columns, int column_index) { // Active (dragged) column always follow mouse. The reason we need this is that dragging a column to the right edge of an auto-resizing // window creates a feedback loop because we store normalized positions. So while dragging we enforce absolute positioning. ImGuiContext& g = *GImGui; - ImGuiWindow* window = ImGui::GetCurrentWindowRead(); + ImGuiWindow* window = g.CurrentWindow; IM_ASSERT(column_index > 0); // We cannot drag column 0. If you get this assert you may have a conflict between the ID of your columns and another widgets. - IM_ASSERT(g.ActiveId == window->DC.ColumnsSetId + ImGuiID(column_index)); + IM_ASSERT(g.ActiveId == columns->ID + ImGuiID(column_index)); - float x = g.IO.MousePos.x - g.ActiveIdClickOffset.x - window->Pos.x; - x = ImClamp(x, ImGui::GetColumnOffset(column_index-1)+g.Style.ColumnsMinSpacing, ImGui::GetColumnOffset(column_index+1)-g.Style.ColumnsMinSpacing); + float x = g.IO.MousePos.x - g.ActiveIdClickOffset.x + GetColumnsRectHalfWidth() - window->Pos.x; + x = ImMax(x, ImGui::GetColumnOffset(column_index - 1) + g.Style.ColumnsMinSpacing); + if ((columns->Flags & ImGuiColumnsFlags_NoPreserveWidths)) + x = ImMin(x, ImGui::GetColumnOffset(column_index + 1) - g.Style.ColumnsMinSpacing); - return (float)(int)x; + return x; } float ImGui::GetColumnOffset(int column_index) { - ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindowRead(); - if (column_index < 0) - column_index = window->DC.ColumnsCurrent; + ImGuiColumnsSet* columns = window->DC.ColumnsSet; + IM_ASSERT(columns != NULL); + if (column_index < 0) + column_index = columns->Current; + IM_ASSERT(column_index < columns->Columns.Size); + + /* if (g.ActiveId) { - const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(column_index); + ImGuiContext& g = *GImGui; + const ImGuiID column_id = columns->ColumnsSetId + ImGuiID(column_index); if (g.ActiveId == column_id) - return GetDraggedColumnOffset(column_index); + return GetDraggedColumnOffset(columns, column_index); } + */ - IM_ASSERT(column_index < window->DC.ColumnsData.Size); - const float t = window->DC.ColumnsData[column_index].OffsetNorm; - const float x_offset = window->DC.ColumnsMinX + t * (window->DC.ColumnsMaxX - window->DC.ColumnsMinX); - return (float)(int)x_offset; + const float t = columns->Columns[column_index].OffsetNorm; + const float x_offset = ImLerp(columns->MinX, columns->MaxX, t); + return x_offset; } -void ImGui::SetColumnOffset(int column_index, float offset) +static float GetColumnWidthEx(ImGuiColumnsSet* columns, int column_index, bool before_resize = false) { - ImGuiWindow* window = GetCurrentWindow(); if (column_index < 0) - column_index = window->DC.ColumnsCurrent; + column_index = columns->Current; - IM_ASSERT(column_index < window->DC.ColumnsData.Size); - const float t = (offset - window->DC.ColumnsMinX) / (window->DC.ColumnsMaxX - window->DC.ColumnsMinX); - window->DC.ColumnsData[column_index].OffsetNorm = t; - - const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(column_index); - window->DC.StateStorage->SetFloat(column_id, t); + float offset_norm; + if (before_resize) + offset_norm = columns->Columns[column_index + 1].OffsetNormBeforeResize - columns->Columns[column_index].OffsetNormBeforeResize; + else + offset_norm = columns->Columns[column_index + 1].OffsetNorm - columns->Columns[column_index].OffsetNorm; + return OffsetNormToPixels(columns, offset_norm); } float ImGui::GetColumnWidth(int column_index) { ImGuiWindow* window = GetCurrentWindowRead(); - if (column_index < 0) - column_index = window->DC.ColumnsCurrent; + ImGuiColumnsSet* columns = window->DC.ColumnsSet; + IM_ASSERT(columns != NULL); - float w = GetColumnOffset(column_index+1) - GetColumnOffset(column_index); - return w; + if (column_index < 0) + column_index = columns->Current; + return OffsetNormToPixels(columns, columns->Columns[column_index + 1].OffsetNorm - columns->Columns[column_index].OffsetNorm); } -static void PushColumnClipRect(int column_index) +void ImGui::SetColumnOffset(int column_index, float offset) { - ImGuiWindow* window = ImGui::GetCurrentWindow(); - if (column_index < 0) - column_index = window->DC.ColumnsCurrent; + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; + ImGuiColumnsSet* columns = window->DC.ColumnsSet; + IM_ASSERT(columns != NULL); - float x1 = ImFloor(0.5f + window->Pos.x + ImGui::GetColumnOffset(column_index) - 1.0f); - float x2 = ImFloor(0.5f + window->Pos.x + ImGui::GetColumnOffset(column_index+1) - 1.0f); - ImGui::PushClipRect(ImVec2(x1,-FLT_MAX), ImVec2(x2,+FLT_MAX), true); + if (column_index < 0) + column_index = columns->Current; + IM_ASSERT(column_index < columns->Columns.Size); + + const bool preserve_width = !(columns->Flags & ImGuiColumnsFlags_NoPreserveWidths) && (column_index < columns->Count-1); + const float width = preserve_width ? GetColumnWidthEx(columns, column_index, columns->IsBeingResized) : 0.0f; + + if (!(columns->Flags & ImGuiColumnsFlags_NoForceWithinWindow)) + offset = ImMin(offset, columns->MaxX - g.Style.ColumnsMinSpacing * (columns->Count - column_index)); + columns->Columns[column_index].OffsetNorm = PixelsToOffsetNorm(columns, offset - columns->MinX); + + if (preserve_width) + SetColumnOffset(column_index + 1, offset + ImMax(g.Style.ColumnsMinSpacing, width)); } -void ImGui::Columns(int columns_count, const char* id, bool border) +void ImGui::SetColumnWidth(int column_index, float width) +{ + ImGuiWindow* window = GetCurrentWindowRead(); + ImGuiColumnsSet* columns = window->DC.ColumnsSet; + IM_ASSERT(columns != NULL); + + if (column_index < 0) + column_index = columns->Current; + SetColumnOffset(column_index + 1, GetColumnOffset(column_index) + width); +} + +void ImGui::PushColumnClipRect(int column_index) +{ + ImGuiWindow* window = GetCurrentWindowRead(); + ImGuiColumnsSet* columns = window->DC.ColumnsSet; + if (column_index < 0) + column_index = columns->Current; + + PushClipRect(columns->Columns[column_index].ClipRect.Min, columns->Columns[column_index].ClipRect.Max, false); +} + +static ImGuiColumnsSet* FindOrAddColumnsSet(ImGuiWindow* window, ImGuiID id) +{ + for (int n = 0; n < window->ColumnsStorage.Size; n++) + if (window->ColumnsStorage[n].ID == id) + return &window->ColumnsStorage[n]; + + window->ColumnsStorage.push_back(ImGuiColumnsSet()); + ImGuiColumnsSet* columns = &window->ColumnsStorage.back(); + columns->ID = id; + return columns; +} + +void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiColumnsFlags flags) { ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); - IM_ASSERT(columns_count >= 1); - if (window->DC.ColumnsCount != 1) - { - if (window->DC.ColumnsCurrent != 0) - ItemSize(ImVec2(0,0)); // Advance to column 0 - PopItemWidth(); - PopClipRect(); - window->DrawList->ChannelsMerge(); - - window->DC.ColumnsCellMaxY = ImMax(window->DC.ColumnsCellMaxY, window->DC.CursorPos.y); - window->DC.CursorPos.y = window->DC.ColumnsCellMaxY; - } - - // Draw columns borders and handle resize at the time of "closing" a columns set - if (window->DC.ColumnsCount != columns_count && window->DC.ColumnsCount != 1 && window->DC.ColumnsShowBorders && !window->SkipItems) - { - const float y1 = window->DC.ColumnsStartPosY; - const float y2 = window->DC.CursorPos.y; - for (int i = 1; i < window->DC.ColumnsCount; i++) - { - float x = window->Pos.x + GetColumnOffset(i); - const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(i); - const ImRect column_rect(ImVec2(x-4,y1),ImVec2(x+4,y2)); - if (IsClippedEx(column_rect, &column_id, false)) - continue; - - bool hovered, held; - ButtonBehavior(column_rect, column_id, &hovered, &held); - if (hovered || held) - g.MouseCursor = ImGuiMouseCursor_ResizeEW; - - // Draw before resize so our items positioning are in sync with the line being drawn - const ImU32 col = GetColorU32(held ? ImGuiCol_ColumnActive : hovered ? ImGuiCol_ColumnHovered : ImGuiCol_Column); - const float xi = (float)(int)x; - window->DrawList->AddLine(ImVec2(xi, y1+1.0f), ImVec2(xi, y2), col); - - if (held) - { - if (g.ActiveIdIsJustActivated) - g.ActiveIdClickOffset.x -= 4; // Store from center of column line (we used a 8 wide rect for columns clicking) - x = GetDraggedColumnOffset(i); - SetColumnOffset(i, x); - } - } - } + IM_ASSERT(columns_count > 1); + IM_ASSERT(window->DC.ColumnsSet == NULL); // Nested columns are currently not supported // Differentiate column ID with an arbitrary prefix for cases where users name their columns set the same as another widget. // In addition, when an identifier isn't explicitly provided we include the number of columns in the hash to make it uniquer. - PushID(0x11223347 + (id ? 0 : columns_count)); - window->DC.ColumnsSetId = window->GetID(id ? id : "columns"); + PushID(0x11223347 + (str_id ? 0 : columns_count)); + ImGuiID id = window->GetID(str_id ? str_id : "columns"); PopID(); - // Set state for first column - window->DC.ColumnsCurrent = 0; - window->DC.ColumnsCount = columns_count; - window->DC.ColumnsShowBorders = border; + // Acquire storage for the columns set + ImGuiColumnsSet* columns = FindOrAddColumnsSet(window, id); + IM_ASSERT(columns->ID == id); + columns->Current = 0; + columns->Count = columns_count; + columns->Flags = flags; + window->DC.ColumnsSet = columns; - const float content_region_width = (window->SizeContentsExplicit.x != 0.0f) ? window->SizeContentsExplicit.x : window->Size.x; - window->DC.ColumnsMinX = window->DC.IndentX; // Lock our horizontal range - window->DC.ColumnsMaxX = content_region_width - window->Scroll.x - ((window->Flags & ImGuiWindowFlags_NoScrollbar) ? 0 : g.Style.ScrollbarSize);// - window->WindowPadding().x; - window->DC.ColumnsStartPosY = window->DC.CursorPos.y; - window->DC.ColumnsCellMinY = window->DC.ColumnsCellMaxY = window->DC.CursorPos.y; + // Set state for first column + const float content_region_width = (window->SizeContentsExplicit.x != 0.0f) ? (window->SizeContentsExplicit.x) : (window->Size.x -window->ScrollbarSizes.x); + columns->MinX = window->DC.IndentX - g.Style.ItemSpacing.x; // Lock our horizontal range + //column->MaxX = content_region_width - window->Scroll.x - ((window->Flags & ImGuiWindowFlags_NoScrollbar) ? 0 : g.Style.ScrollbarSize);// - window->WindowPadding().x; + columns->MaxX = content_region_width - window->Scroll.x; + columns->StartPosY = window->DC.CursorPos.y; + columns->StartMaxPosX = window->DC.CursorMaxPos.x; + columns->CellMinY = columns->CellMaxY = window->DC.CursorPos.y; window->DC.ColumnsOffsetX = 0.0f; window->DC.CursorPos.x = (float)(int)(window->Pos.x + window->DC.IndentX + window->DC.ColumnsOffsetX); - if (window->DC.ColumnsCount != 1) + // Clear data if columns count changed + if (columns->Columns.Size != 0 && columns->Columns.Size != columns_count + 1) + columns->Columns.resize(0); + + // Initialize defaults + columns->IsFirstFrame = (columns->Columns.Size == 0); + if (columns->Columns.Size == 0) { - // Cache column offsets - window->DC.ColumnsData.resize(columns_count + 1); - for (int column_index = 0; column_index < columns_count + 1; column_index++) + columns->Columns.reserve(columns_count + 1); + for (int n = 0; n < columns_count + 1; n++) { - const ImGuiID column_id = window->DC.ColumnsSetId + ImGuiID(column_index); - KeepAliveID(column_id); - const float default_t = column_index / (float)window->DC.ColumnsCount; - const float t = window->DC.StateStorage->GetFloat(column_id, default_t); // Cheaply store our floating point value inside the integer (could store a union into the map?) - window->DC.ColumnsData[column_index].OffsetNorm = t; + ImGuiColumnData column; + column.OffsetNorm = n / (float)columns_count; + columns->Columns.push_back(column); } - window->DrawList->ChannelsSplit(window->DC.ColumnsCount); - PushColumnClipRect(); - PushItemWidth(GetColumnWidth() * 0.65f); } - else + + for (int n = 0; n < columns_count + 1; n++) { - window->DC.ColumnsData.resize(0); + // Clamp position + ImGuiColumnData* column = &columns->Columns[n]; + float t = column->OffsetNorm; + if (!(columns->Flags & ImGuiColumnsFlags_NoForceWithinWindow)) + t = ImMin(t, PixelsToOffsetNorm(columns, (columns->MaxX - columns->MinX) - g.Style.ColumnsMinSpacing * (columns->Count - n))); + column->OffsetNorm = t; + + if (n == columns_count) + continue; + + // Compute clipping rectangle + float clip_x1 = ImFloor(0.5f + window->Pos.x + GetColumnOffset(n) - 1.0f); + float clip_x2 = ImFloor(0.5f + window->Pos.x + GetColumnOffset(n + 1) - 1.0f); + column->ClipRect = ImRect(clip_x1, -FLT_MAX, clip_x2, +FLT_MAX); + column->ClipRect.ClipWith(window->ClipRect); } + + window->DrawList->ChannelsSplit(columns->Count); + PushColumnClipRect(); + PushItemWidth(GetColumnWidth() * 0.65f); +} + +void ImGui::EndColumns() +{ + ImGuiContext& g = *GImGui; + ImGuiWindow* window = GetCurrentWindow(); + ImGuiColumnsSet* columns = window->DC.ColumnsSet; + IM_ASSERT(columns != NULL); + + PopItemWidth(); + PopClipRect(); + window->DrawList->ChannelsMerge(); + + columns->CellMaxY = ImMax(columns->CellMaxY, window->DC.CursorPos.y); + window->DC.CursorPos.y = columns->CellMaxY; + if (!(columns->Flags & ImGuiColumnsFlags_GrowParentContentsSize)) + window->DC.CursorMaxPos.x = ImMax(columns->StartMaxPosX, columns->MaxX); // Restore cursor max pos, as columns don't grow parent + + // Draw columns borders and handle resize + bool is_being_resized = false; + if (!(columns->Flags & ImGuiColumnsFlags_NoBorder) && !window->SkipItems) + { + const float y1 = columns->StartPosY; + const float y2 = window->DC.CursorPos.y; + int dragging_column = -1; + for (int n = 1; n < columns->Count; n++) + { + float x = window->Pos.x + GetColumnOffset(n); + const ImGuiID column_id = columns->ID + ImGuiID(n); + const float column_hw = GetColumnsRectHalfWidth(); // Half-width for interaction + const ImRect column_rect(ImVec2(x - column_hw, y1), ImVec2(x + column_hw, y2)); + KeepAliveID(column_id); + if (IsClippedEx(column_rect, column_id, false)) + continue; + + bool hovered = false, held = false; + if (!(columns->Flags & ImGuiColumnsFlags_NoResize)) + { + ButtonBehavior(column_rect, column_id, &hovered, &held); + if (hovered || held) + g.MouseCursor = ImGuiMouseCursor_ResizeEW; + if (held && !(columns->Columns[n].Flags & ImGuiColumnsFlags_NoResize)) + dragging_column = n; + } + + // Draw column (we clip the Y boundaries CPU side because very long triangles are mishandled by some GPU drivers.) + const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : hovered ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator); + const float xi = (float)(int)x; + window->DrawList->AddLine(ImVec2(xi, ImMax(y1 + 1.0f, window->ClipRect.Min.y)), ImVec2(xi, ImMin(y2, window->ClipRect.Max.y)), col); + } + + // Apply dragging after drawing the column lines, so our rendered lines are in sync with how items were displayed during the frame. + if (dragging_column != -1) + { + if (!columns->IsBeingResized) + for (int n = 0; n < columns->Count + 1; n++) + columns->Columns[n].OffsetNormBeforeResize = columns->Columns[n].OffsetNorm; + columns->IsBeingResized = is_being_resized = true; + float x = GetDraggedColumnOffset(columns, dragging_column); + SetColumnOffset(dragging_column, x); + } + } + columns->IsBeingResized = is_being_resized; + + window->DC.ColumnsSet = NULL; + window->DC.ColumnsOffsetX = 0.0f; + window->DC.CursorPos.x = (float)(int)(window->Pos.x + window->DC.IndentX + window->DC.ColumnsOffsetX); +} + +// [2017/12: This is currently the only public API, while we are working on making BeginColumns/EndColumns user-facing] +void ImGui::Columns(int columns_count, const char* id, bool border) +{ + ImGuiWindow* window = GetCurrentWindow(); + IM_ASSERT(columns_count >= 1); + if (window->DC.ColumnsSet != NULL && window->DC.ColumnsSet->Count != columns_count) + EndColumns(); + + ImGuiColumnsFlags flags = (border ? 0 : ImGuiColumnsFlags_NoBorder); + //flags |= ImGuiColumnsFlags_NoPreserveWidths; // NB: Legacy behavior + if (columns_count != 1) + BeginColumns(id, columns_count, flags); } void ImGui::Indent(float indent_w) { ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); - window->DC.IndentX += (indent_w > 0.0f) ? indent_w : g.Style.IndentSpacing; + window->DC.IndentX += (indent_w != 0.0f) ? indent_w : g.Style.IndentSpacing; window->DC.CursorPos.x = window->Pos.x + window->DC.IndentX + window->DC.ColumnsOffsetX; } @@ -9536,7 +11229,7 @@ void ImGui::Unindent(float indent_w) { ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); - window->DC.IndentX -= (indent_w > 0.0f) ? indent_w : g.Style.IndentSpacing; + window->DC.IndentX -= (indent_w != 0.0f) ? indent_w : g.Style.IndentSpacing; window->DC.CursorPos.x = window->Pos.x + window->DC.IndentX + window->DC.ColumnsOffsetX; } @@ -9601,33 +11294,287 @@ void ImGui::Value(const char* prefix, float v, const char* float_format) } } -// FIXME: May want to remove those helpers? -void ImGui::ValueColor(const char* prefix, const ImVec4& v) +//----------------------------------------------------------------------------- +// DRAG AND DROP +//----------------------------------------------------------------------------- + +void ImGui::ClearDragDrop() { - Text("%s: (%.2f,%.2f,%.2f,%.2f)", prefix, v.x, v.y, v.z, v.w); - SameLine(); - ColorButton(v, true); + ImGuiContext& g = *GImGui; + g.DragDropActive = false; + g.DragDropPayload.Clear(); + g.DragDropAcceptIdCurr = g.DragDropAcceptIdPrev = 0; + g.DragDropAcceptIdCurrRectSurface = FLT_MAX; + g.DragDropAcceptFrameCount = -1; } -void ImGui::ValueColor(const char* prefix, ImU32 v) +// Call when current ID is active. +// When this returns true you need to: a) call SetDragDropPayload() exactly once, b) you may render the payload visual/description, c) call EndDragDropSource() +bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags, int mouse_button) { - Text("%s: %08X", prefix, v); - SameLine(); - ColorButton(ColorConvertU32ToFloat4(v), true); + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; + + bool source_drag_active = false; + ImGuiID source_id = 0; + ImGuiID source_parent_id = 0; + if (!(flags & ImGuiDragDropFlags_SourceExtern)) + { + source_id = window->DC.LastItemId; + if (source_id != 0 && g.ActiveId != source_id) // Early out for most common case + return false; + if (g.IO.MouseDown[mouse_button] == false) + return false; + + if (source_id == 0) + { + // If you want to use BeginDragDropSource() on an item with no unique identifier for interaction, such as Text() or Image(), you need to: + // A) Read the explanation below, B) Use the ImGuiDragDropFlags_SourceAllowNullID flag, C) Swallow your programmer pride. + if (!(flags & ImGuiDragDropFlags_SourceAllowNullID)) + { + IM_ASSERT(0); + return false; + } + + // Magic fallback (=somehow reprehensible) to handle items with no assigned ID, e.g. Text(), Image() + // We build a throwaway ID based on current ID stack + relative AABB of items in window. + // THE IDENTIFIER WON'T SURVIVE ANY REPOSITIONING OF THE WIDGET, so if your widget moves your dragging operation will be canceled. + // We don't need to maintain/call ClearActiveID() as releasing the button will early out this function and trigger !ActiveIdIsAlive. + bool is_hovered = window->DC.LastItemRectHoveredRect; + if (!is_hovered && (g.ActiveId == 0 || g.ActiveIdWindow != window)) + return false; + source_id = window->DC.LastItemId = window->GetIDFromRectangle(window->DC.LastItemRect); + if (is_hovered) + SetHoveredID(source_id); + if (is_hovered && g.IO.MouseClicked[mouse_button]) + { + SetActiveID(source_id, window); + FocusWindow(window); + } + if (g.ActiveId == source_id) // Allow the underlying widget to display/return hovered during the mouse release frame, else we would get a flicker. + g.ActiveIdAllowOverlap = is_hovered; + } + if (g.ActiveId != source_id) + return false; + source_parent_id = window->IDStack.back(); + source_drag_active = IsMouseDragging(mouse_button); + } + else + { + window = NULL; + source_id = ImHash("#SourceExtern", 0); + source_drag_active = true; + } + + if (source_drag_active) + { + if (!g.DragDropActive) + { + IM_ASSERT(source_id != 0); + ClearDragDrop(); + ImGuiPayload& payload = g.DragDropPayload; + payload.SourceId = source_id; + payload.SourceParentId = source_parent_id; + g.DragDropActive = true; + g.DragDropSourceFlags = flags; + g.DragDropMouseButton = mouse_button; + } + + if (!(flags & ImGuiDragDropFlags_SourceNoPreviewTooltip)) + { + // FIXME-DRAG + //SetNextWindowPos(g.IO.MousePos - g.ActiveIdClickOffset - g.Style.WindowPadding); + //PushStyleVar(ImGuiStyleVar_Alpha, g.Style.Alpha * 0.60f); // This is better but e.g ColorButton with checkboard has issue with transparent colors :( + SetNextWindowPos(g.IO.MousePos); + PushStyleColor(ImGuiCol_PopupBg, GetStyleColorVec4(ImGuiCol_PopupBg) * ImVec4(1.0f, 1.0f, 1.0f, 0.6f)); + BeginTooltipEx(ImGuiWindowFlags_NoInputs); + } + + if (!(flags & ImGuiDragDropFlags_SourceNoDisableHover) && !(flags & ImGuiDragDropFlags_SourceExtern)) + window->DC.LastItemRectHoveredRect = false; + + return true; + } + return false; +} + +void ImGui::EndDragDropSource() +{ + ImGuiContext& g = *GImGui; + IM_ASSERT(g.DragDropActive); + + if (!(g.DragDropSourceFlags & ImGuiDragDropFlags_SourceNoPreviewTooltip)) + { + EndTooltip(); + PopStyleColor(); + //PopStyleVar(); + } + + // Discard the drag if have not called SetDragDropPayload() + if (g.DragDropPayload.DataFrameCount == -1) + ClearDragDrop(); +} + +// Use 'cond' to choose to submit payload on drag start or every frame +bool ImGui::SetDragDropPayload(const char* type, const void* data, size_t data_size, ImGuiCond cond) +{ + ImGuiContext& g = *GImGui; + ImGuiPayload& payload = g.DragDropPayload; + if (cond == 0) + cond = ImGuiCond_Always; + + IM_ASSERT(type != NULL); + IM_ASSERT(strlen(type) < IM_ARRAYSIZE(payload.DataType) && "Payload type can be at most 12 characters long"); + IM_ASSERT((data != NULL && data_size > 0) || (data == NULL && data_size == 0)); + IM_ASSERT(cond == ImGuiCond_Always || cond == ImGuiCond_Once); + IM_ASSERT(payload.SourceId != 0); // Not called between BeginDragDropSource() and EndDragDropSource() + + if (cond == ImGuiCond_Always || payload.DataFrameCount == -1) + { + // Copy payload + ImStrncpy(payload.DataType, type, IM_ARRAYSIZE(payload.DataType)); + g.DragDropPayloadBufHeap.resize(0); + if (data_size > sizeof(g.DragDropPayloadBufLocal)) + { + // Store in heap + g.DragDropPayloadBufHeap.resize((int)data_size); + payload.Data = g.DragDropPayloadBufHeap.Data; + memcpy((void*)payload.Data, data, data_size); + } + else if (data_size > 0) + { + // Store locally + memset(&g.DragDropPayloadBufLocal, 0, sizeof(g.DragDropPayloadBufLocal)); + payload.Data = g.DragDropPayloadBufLocal; + memcpy((void*)payload.Data, data, data_size); + } + else + { + payload.Data = NULL; + } + payload.DataSize = (int)data_size; + } + payload.DataFrameCount = g.FrameCount; + + return (g.DragDropAcceptFrameCount == g.FrameCount) || (g.DragDropAcceptFrameCount == g.FrameCount - 1); +} + +bool ImGui::BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id) +{ + ImGuiContext& g = *GImGui; + if (!g.DragDropActive) + return false; + + ImGuiWindow* window = g.CurrentWindow; + if (g.HoveredWindow == NULL || window->RootWindow != g.HoveredWindow->RootWindow) + return false; + IM_ASSERT(id != 0); + if (!IsMouseHoveringRect(bb.Min, bb.Max) || (id == g.DragDropPayload.SourceId)) + return false; + + g.DragDropTargetRect = bb; + g.DragDropTargetId = id; + return true; +} + +// We don't use BeginDragDropTargetCustom() and duplicate its code because: +// 1) we use LastItemRectHoveredRect which handles items that pushes a temporarily clip rectangle in their code. Calling BeginDragDropTargetCustom(LastItemRect) would not handle them. +// 2) and it's faster. as this code may be very frequently called, we want to early out as fast as we can. +// Also note how the HoveredWindow test is positioned differently in both functions (in both functions we optimize for the cheapest early out case) +bool ImGui::BeginDragDropTarget() +{ + ImGuiContext& g = *GImGui; + if (!g.DragDropActive) + return false; + + ImGuiWindow* window = g.CurrentWindow; + if (!window->DC.LastItemRectHoveredRect) + return false; + if (g.HoveredWindow == NULL || window->RootWindow != g.HoveredWindow->RootWindow) + return false; + + ImGuiID id = window->DC.LastItemId; + if (id == 0) + id = window->GetIDFromRectangle(window->DC.LastItemRect); + if (g.DragDropPayload.SourceId == id) + return false; + + g.DragDropTargetRect = window->DC.LastItemRect; + g.DragDropTargetId = id; + return true; +} + +bool ImGui::IsDragDropPayloadBeingAccepted() +{ + ImGuiContext& g = *GImGui; + return g.DragDropActive && g.DragDropAcceptIdPrev != 0; +} + +const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags) +{ + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; + ImGuiPayload& payload = g.DragDropPayload; + IM_ASSERT(g.DragDropActive); // Not called between BeginDragDropTarget() and EndDragDropTarget() ? + IM_ASSERT(payload.DataFrameCount != -1); // Forgot to call EndDragDropTarget() ? + if (type != NULL && !payload.IsDataType(type)) + return NULL; + + // Accept smallest drag target bounding box, this allows us to nest drag targets conveniently without ordering constraints. + // NB: We currently accept NULL id as target. However, overlapping targets requires a unique ID to function! + const bool was_accepted_previously = (g.DragDropAcceptIdPrev == g.DragDropTargetId); + ImRect r = g.DragDropTargetRect; + float r_surface = r.GetWidth() * r.GetHeight(); + if (r_surface < g.DragDropAcceptIdCurrRectSurface) + { + g.DragDropAcceptIdCurr = g.DragDropTargetId; + g.DragDropAcceptIdCurrRectSurface = r_surface; + } + + // Render default drop visuals + payload.Preview = was_accepted_previously; + flags |= (g.DragDropSourceFlags & ImGuiDragDropFlags_AcceptNoDrawDefaultRect); // Source can also inhibit the preview (useful for external sources that lives for 1 frame) + if (!(flags & ImGuiDragDropFlags_AcceptNoDrawDefaultRect) && payload.Preview) + { + // FIXME-DRAG: Settle on a proper default visuals for drop target. + r.Expand(3.5f); + bool push_clip_rect = !window->ClipRect.Contains(r); + if (push_clip_rect) window->DrawList->PushClipRectFullScreen(); + window->DrawList->AddRect(r.Min, r.Max, GetColorU32(ImGuiCol_DragDropTarget), 0.0f, ~0, 2.0f); + if (push_clip_rect) window->DrawList->PopClipRect(); + } + + g.DragDropAcceptFrameCount = g.FrameCount; + payload.Delivery = was_accepted_previously && !IsMouseDown(g.DragDropMouseButton); // For extern drag sources affecting os window focus, it's easier to just test !IsMouseDown() instead of IsMouseReleased() + if (!payload.Delivery && !(flags & ImGuiDragDropFlags_AcceptBeforeDelivery)) + return NULL; + + return &payload; +} + +// We don't really use/need this now, but added it for the sake of consistency and because we might need it later. +void ImGui::EndDragDropTarget() +{ + ImGuiContext& g = *GImGui; (void)g; + IM_ASSERT(g.DragDropActive); } //----------------------------------------------------------------------------- // PLATFORM DEPENDENT HELPERS //----------------------------------------------------------------------------- -#if defined(_WIN32) && !defined(_WINDOWS_) && (!defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS) || !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS)) +#if defined(_WIN32) && !defined(_WINDOWS_) && (!defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS) || !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS)) #undef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#ifndef __MINGW32__ +#include +#else #include #endif +#endif // Win32 API clipboard implementation -#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS) +#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS) #ifdef _MSC_VER #pragma comment(lib, "user32") @@ -9641,7 +11588,10 @@ static const char* GetClipboardTextFn_DefaultImpl(void*) return NULL; HANDLE wbuf_handle = GetClipboardData(CF_UNICODETEXT); if (wbuf_handle == NULL) + { + CloseClipboard(); return NULL; + } if (ImWchar* wbuf_global = (ImWchar*)GlobalLock(wbuf_handle)) { int buf_len = ImTextCountUtf8BytesFromStr(wbuf_global, NULL) + 1; @@ -9660,7 +11610,10 @@ static void SetClipboardTextFn_DefaultImpl(void*, const char* text) const int wbuf_length = ImTextCountCharsFromUtf8(text, NULL) + 1; HGLOBAL wbuf_handle = GlobalAlloc(GMEM_MOVEABLE, (SIZE_T)wbuf_length * sizeof(ImWchar)); if (wbuf_handle == NULL) + { + CloseClipboard(); return; + } ImWchar* wbuf_global = (ImWchar*)GlobalLock(wbuf_handle); ImTextStrFromUtf8(wbuf_global, wbuf_length, text, NULL); GlobalUnlock(wbuf_handle); @@ -9674,28 +11627,25 @@ static void SetClipboardTextFn_DefaultImpl(void*, const char* text) // Local ImGui-only clipboard implementation, if user hasn't defined better clipboard handlers static const char* GetClipboardTextFn_DefaultImpl(void*) { - return GImGui->PrivateClipboard; + ImGuiContext& g = *GImGui; + return g.PrivateClipboard.empty() ? NULL : g.PrivateClipboard.begin(); } // Local ImGui-only clipboard implementation, if user hasn't defined better clipboard handlers static void SetClipboardTextFn_DefaultImpl(void*, const char* text) { ImGuiContext& g = *GImGui; - if (g.PrivateClipboard) - { - ImGui::MemFree(g.PrivateClipboard); - g.PrivateClipboard = NULL; - } + g.PrivateClipboard.clear(); const char* text_end = text + strlen(text); - g.PrivateClipboard = (char*)ImGui::MemAlloc((size_t)(text_end - text) + 1); - memcpy(g.PrivateClipboard, text, (size_t)(text_end - text)); + g.PrivateClipboard.resize((int)(text_end - text) + 1); + memcpy(&g.PrivateClipboard[0], text, (size_t)(text_end - text)); g.PrivateClipboard[(int)(text_end - text)] = 0; } #endif // Win32 API IME support (for Asian languages, etc.) -#if defined(_WIN32) && !defined(__GNUC__) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS) +#if defined(_WIN32) && !defined(__GNUC__) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS) #include #ifdef _MSC_VER @@ -9730,17 +11680,17 @@ void ImGui::ShowMetricsWindow(bool* p_open) { if (ImGui::Begin("ImGui Metrics", p_open)) { - ImGui::Text("ImGui %s", ImGui::GetVersion()); + ImGui::Text("Dear ImGui %s", ImGui::GetVersion()); ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate); ImGui::Text("%d vertices, %d indices (%d triangles)", ImGui::GetIO().MetricsRenderVertices, ImGui::GetIO().MetricsRenderIndices, ImGui::GetIO().MetricsRenderIndices / 3); ImGui::Text("%d allocations", ImGui::GetIO().MetricsAllocs); static bool show_clip_rects = true; - ImGui::Checkbox("Show clipping rectangles when hovering a ImDrawCmd", &show_clip_rects); + ImGui::Checkbox("Show clipping rectangles when hovering draw commands", &show_clip_rects); ImGui::Separator(); struct Funcs { - static void NodeDrawList(ImDrawList* draw_list, const char* label) + static void NodeDrawList(ImGuiWindow* window, ImDrawList* draw_list, const char* label) { bool node_open = ImGui::TreeNode(draw_list, "%s: '%s' %d vtx, %d indices, %d cmds", label, draw_list->_OwnerName ? draw_list->_OwnerName : "", draw_list->VtxBuffer.Size, draw_list->IdxBuffer.Size, draw_list->CmdBuffer.Size); if (draw_list == ImGui::GetWindowDrawList()) @@ -9750,21 +11700,25 @@ void ImGui::ShowMetricsWindow(bool* p_open) if (node_open) ImGui::TreePop(); return; } + + ImDrawList* overlay_draw_list = &GImGui->OverlayDrawList; // Render additional visuals into the top-most draw list + if (window && ImGui::IsItemHovered()) + overlay_draw_list->AddRect(window->Pos, window->Pos + window->Size, IM_COL32(255, 255, 0, 255)); if (!node_open) return; - ImDrawList* overlay_draw_list = &GImGui->OverlayDrawList; // Render additional visuals into the top-most draw list - overlay_draw_list->PushClipRectFullScreen(); int elem_offset = 0; for (const ImDrawCmd* pcmd = draw_list->CmdBuffer.begin(); pcmd < draw_list->CmdBuffer.end(); elem_offset += pcmd->ElemCount, pcmd++) { + if (pcmd->UserCallback == NULL && pcmd->ElemCount == 0) + continue; if (pcmd->UserCallback) { ImGui::BulletText("Callback %p, user_data %p", pcmd->UserCallback, pcmd->UserCallbackData); continue; } ImDrawIdx* idx_buffer = (draw_list->IdxBuffer.Size > 0) ? draw_list->IdxBuffer.Data : NULL; - bool pcmd_node_open = ImGui::TreeNode((void*)(pcmd - draw_list->CmdBuffer.begin()), "Draw %-4d %s vtx, tex = %p, clip_rect = (%.0f,%.0f)..(%.0f,%.0f)", pcmd->ElemCount, draw_list->IdxBuffer.Size > 0 ? "indexed" : "non-indexed", pcmd->TextureId, pcmd->ClipRect.x, pcmd->ClipRect.y, pcmd->ClipRect.z, pcmd->ClipRect.w); + bool pcmd_node_open = ImGui::TreeNode((void*)(pcmd - draw_list->CmdBuffer.begin()), "Draw %4d %s vtx, tex 0x%p, clip_rect (%4.0f,%4.0f)-(%4.0f,%4.0f)", pcmd->ElemCount, draw_list->IdxBuffer.Size > 0 ? "indexed" : "non-indexed", pcmd->TextureId, pcmd->ClipRect.x, pcmd->ClipRect.y, pcmd->ClipRect.z, pcmd->ClipRect.w); if (show_clip_rects && ImGui::IsItemHovered()) { ImRect clip_rect = pcmd->ClipRect; @@ -9776,25 +11730,32 @@ void ImGui::ShowMetricsWindow(bool* p_open) } if (!pcmd_node_open) continue; + + // Display individual triangles/vertices. Hover on to get the corresponding triangle highlighted. ImGuiListClipper clipper(pcmd->ElemCount/3); // Manually coarse clip our print out of individual vertices to save CPU, only items that may be visible. while (clipper.Step()) for (int prim = clipper.DisplayStart, vtx_i = elem_offset + clipper.DisplayStart*3; prim < clipper.DisplayEnd; prim++) { - char buf[300], *buf_p = buf; + char buf[300]; + char *buf_p = buf, *buf_end = buf + IM_ARRAYSIZE(buf); ImVec2 triangles_pos[3]; for (int n = 0; n < 3; n++, vtx_i++) { ImDrawVert& v = draw_list->VtxBuffer[idx_buffer ? idx_buffer[vtx_i] : vtx_i]; triangles_pos[n] = v.pos; - buf_p += sprintf(buf_p, "%s %04d { pos = (%8.2f,%8.2f), uv = (%.6f,%.6f), col = %08X }\n", (n == 0) ? "vtx" : " ", vtx_i, v.pos.x, v.pos.y, v.uv.x, v.uv.y, v.col); + buf_p += ImFormatString(buf_p, (int)(buf_end - buf_p), "%s %04d: pos (%8.2f,%8.2f), uv (%.6f,%.6f), col %08X\n", (n == 0) ? "vtx" : " ", vtx_i, v.pos.x, v.pos.y, v.uv.x, v.uv.y, v.col); } ImGui::Selectable(buf, false); if (ImGui::IsItemHovered()) - overlay_draw_list->AddPolyline(triangles_pos, 3, IM_COL32(255,255,0,255), true, 1.0f, false); // Add triangle without AA, more readable for large-thin triangle + { + ImDrawListFlags backup_flags = overlay_draw_list->Flags; + overlay_draw_list->Flags &= ~ImDrawListFlags_AntiAliasedLines; // Disable AA on triangle outlines at is more readable for very large and thin triangles. + overlay_draw_list->AddPolyline(triangles_pos, 3, IM_COL32(255,255,0,255), true, 1.0f); + overlay_draw_list->Flags = backup_flags; + } } ImGui::TreePop(); } - overlay_draw_list->PopClipRect(); ImGui::TreePop(); } @@ -9811,10 +11772,10 @@ void ImGui::ShowMetricsWindow(bool* p_open) { if (!ImGui::TreeNode(window, "%s '%s', %d @ 0x%p", label, window->Name, window->Active || window->WasActive, window)) return; - NodeDrawList(window->DrawList, "DrawList"); - ImGui::BulletText("Pos: (%.1f,%.1f)", window->Pos.x, window->Pos.y); - ImGui::BulletText("Size: (%.1f,%.1f), SizeContents (%.1f,%.1f)", window->Size.x, window->Size.y, window->SizeContents.x, window->SizeContents.y); - ImGui::BulletText("Scroll: (%.2f,%.2f)", window->Scroll.x, window->Scroll.y); + NodeDrawList(window, window->DrawList, "DrawList"); + ImGui::BulletText("Pos: (%.1f,%.1f), Size: (%.1f,%.1f), SizeContents (%.1f,%.1f)", window->Pos.x, window->Pos.y, window->Size.x, window->Size.y, window->SizeContents.x, window->SizeContents.y); + ImGui::BulletText("Scroll: (%.2f/%.2f,%.2f/%.2f)", window->Scroll.x, GetScrollMaxX(window), window->Scroll.y, GetScrollMaxY(window)); + ImGui::BulletText("Active: %d, WriteAccessed: %d", window->Active, window->WriteAccessed); if (window->RootWindow != window) NodeWindow(window->RootWindow, "RootWindow"); if (window->DC.ChildWindows.Size > 0) NodeWindows(window->DC.ChildWindows, "ChildWindows"); ImGui::BulletText("Storage: %d bytes", window->StateStorage.Data.Size * (int)sizeof(ImGuiStorage::Pair)); @@ -9822,12 +11783,13 @@ void ImGui::ShowMetricsWindow(bool* p_open) } }; - ImGuiContext& g = *GImGui; // Access private state + // Access private state, we are going to display the draw lists from last frame + ImGuiContext& g = *GImGui; Funcs::NodeWindows(g.Windows, "Windows"); - if (ImGui::TreeNode("DrawList", "Active DrawLists (%d)", g.RenderDrawLists[0].Size)) + if (ImGui::TreeNode("DrawList", "Active DrawLists (%d)", g.DrawDataBuilder.Layers[0].Size)) { - for (int i = 0; i < g.RenderDrawLists[0].Size; i++) - Funcs::NodeDrawList(g.RenderDrawLists[0][i], "DrawList"); + for (int i = 0; i < g.DrawDataBuilder.Layers[0].Size; i++) + Funcs::NodeDrawList(NULL, g.DrawDataBuilder.Layers[0][i], "DrawList"); ImGui::TreePop(); } if (ImGui::TreeNode("Popups", "Open Popups Stack (%d)", g.OpenPopupStack.Size)) @@ -9839,13 +11801,15 @@ void ImGui::ShowMetricsWindow(bool* p_open) } ImGui::TreePop(); } - if (ImGui::TreeNode("Basic state")) + if (ImGui::TreeNode("Internal state")) { - ImGui::Text("FocusedWindow: '%s'", g.FocusedWindow ? g.FocusedWindow->Name : "NULL"); ImGui::Text("HoveredWindow: '%s'", g.HoveredWindow ? g.HoveredWindow->Name : "NULL"); ImGui::Text("HoveredRootWindow: '%s'", g.HoveredRootWindow ? g.HoveredRootWindow->Name : "NULL"); - ImGui::Text("HoveredID: 0x%08X/0x%08X", g.HoveredId, g.HoveredIdPreviousFrame); // Data is "in-flight" so depending on when the Metrics window is called we may see current frame information or not - ImGui::Text("ActiveID: 0x%08X/0x%08X", g.ActiveId, g.ActiveIdPreviousFrame); + ImGui::Text("HoveredId: 0x%08X/0x%08X (%.2f sec)", g.HoveredId, g.HoveredIdPreviousFrame, g.HoveredIdTimer); // Data is "in-flight" so depending on when the Metrics window is called we may see current frame information or not + ImGui::Text("ActiveId: 0x%08X/0x%08X (%.2f sec)", g.ActiveId, g.ActiveIdPreviousFrame, g.ActiveIdTimer); + ImGui::Text("ActiveIdWindow: '%s'", g.ActiveIdWindow ? g.ActiveIdWindow->Name : "NULL"); + ImGui::Text("NavWindow: '%s'", g.NavWindow ? g.NavWindow->Name : "NULL"); + ImGui::Text("DragDrop: %d, SourceId = 0x%08X, Payload \"%s\" (%d bytes)", g.DragDropActive, g.DragDropPayload.SourceId, g.DragDropPayload.DataType, g.DragDropPayload.DataSize); ImGui::TreePop(); } } diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h index aa477dc..a14a25f 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h @@ -1,22 +1,27 @@ -// dear imgui, v1.50 WIP +// dear imgui, v1.54 WIP // (headers) // See imgui.cpp file for documentation. -// See ImGui::ShowTestWindow() in imgui_demo.cpp for demo code. +// Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp for demo code. // Read 'Programmer guide' in imgui.cpp for notes on how to setup ImGui in your codebase. // Get latest version at https://github.com/ocornut/imgui #pragma once -#if !defined(IMGUI_DISABLE_INCLUDE_IMCONFIG_H) || defined(IMGUI_INCLUDE_IMCONFIG_H) -#include "imconfig.h" // User-editable configuration file +// User-editable configuration files (edit stock imconfig.h or define IMGUI_USER_CONFIG to your own filename) +#ifdef IMGUI_USER_CONFIG +#include IMGUI_USER_CONFIG #endif +#if !defined(IMGUI_DISABLE_INCLUDE_IMCONFIG_H) || defined(IMGUI_INCLUDE_IMCONFIG_H) +#include "imconfig.h" +#endif + #include // FLT_MAX #include // va_list #include // ptrdiff_t, NULL #include // memset, memmove, memcpy, strlen, strchr, strcpy, strcmp -#define IMGUI_VERSION "1.50 WIP" +#define IMGUI_VERSION "1.54 WIP" // Define attributes of all API symbols declarations, e.g. for DLL under Windows. #ifndef IMGUI_API @@ -26,15 +31,20 @@ // Define assertion handler. #ifndef IM_ASSERT #include -#define IM_ASSERT(_EXPR, ...) assert(_EXPR) +#define IM_ASSERT(_EXPR) assert(_EXPR) #endif +// Helpers // Some compilers support applying printf-style warnings to user functions. #if 0 // defined(__clang__) || defined(__GNUC__) -#define IM_PRINTFARGS(FMT) __attribute__((format(printf, FMT, (FMT+1)))) +#define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1))) +#define IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0))) #else -#define IM_PRINTFARGS(FMT) +#define IM_FMTARGS(FMT) +#define IM_FMTLIST(FMT) #endif +#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR)/sizeof(*_ARR))) +#define IM_OFFSETOF(_TYPE,_MEMBER) ((size_t)&(((_TYPE*)0)->_MEMBER)) // Offset of _MEMBER within _TYPE. Standardized as offsetof() in modern C++. #if defined(__clang__) #pragma clang diagnostic push @@ -46,9 +56,10 @@ struct ImDrawChannel; // Temporary storage for outputting drawing struct ImDrawCmd; // A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call) struct ImDrawData; // All draw command lists required to render the frame struct ImDrawList; // A single draw command list (generally one per window) +struct ImDrawListSharedData; // Data shared among multiple draw lists (typically owned by parent ImGui context, but you may create one yourself) struct ImDrawVert; // A single vertex (20 bytes by default, override layout with IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT) struct ImFont; // Runtime data for a single font within a parent ImFontAtlas -struct ImFontAtlas; // Runtime data for multiple fonts, bake multiple fonts into a single texture, TTF font loader +struct ImFontAtlas; // Runtime data for multiple fonts, bake multiple fonts into a single texture, TTF/OTF font loader struct ImFontConfig; // Configuration data when adding a font or merging fonts struct ImColor; // Helper functions to create a color that can be converted to either u32 or float4 struct ImGuiIO; // Main configuration and I/O between your application and ImGui @@ -58,8 +69,9 @@ struct ImGuiStyle; // Runtime data for styling/colors struct ImGuiTextFilter; // Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" struct ImGuiTextBuffer; // Text buffer for logging/accumulating text struct ImGuiTextEditCallbackData; // Shared state of ImGui::InputText() when using custom ImGuiTextEditCallback (rare/advanced use) -struct ImGuiSizeConstraintCallbackData;// Structure used to constraint window size in custom ways when using custom ImGuiSizeConstraintCallback (rare/advanced use) +struct ImGuiSizeCallbackData; // Structure used to constraint window size in custom ways when using custom ImGuiSizeCallback (rare/advanced use) struct ImGuiListClipper; // Helper to manually clip large list of items +struct ImGuiPayload; // User data payload for drag and drop operations struct ImGuiContext; // ImGui context (opaque) // Typedefs and Enumerations (declared as int for compatibility and to not pollute the top of this file) @@ -67,18 +79,30 @@ typedef unsigned int ImU32; // 32-bit unsigned integer (typically used t typedef unsigned int ImGuiID; // unique ID used by widgets (typically hashed from a stack of string) typedef unsigned short ImWchar; // character for keyboard input/display typedef void* ImTextureID; // user data to identify a texture (this is whatever to you want it to be! read the FAQ about ImTextureID in imgui.cpp) -typedef int ImGuiCol; // a color identifier for styling // enum ImGuiCol_ -typedef int ImGuiStyleVar; // a variable identifier for styling // enum ImGuiStyleVar_ -typedef int ImGuiKey; // a key identifier (ImGui-side enum) // enum ImGuiKey_ -typedef int ImGuiColorEditMode; // color edit mode for ColorEdit*() // enum ImGuiColorEditMode_ -typedef int ImGuiMouseCursor; // a mouse cursor identifier // enum ImGuiMouseCursor_ -typedef int ImGuiWindowFlags; // window flags for Begin*() // enum ImGuiWindowFlags_ -typedef int ImGuiSetCond; // condition flags for Set*() // enum ImGuiSetCond_ -typedef int ImGuiInputTextFlags; // flags for InputText*() // enum ImGuiInputTextFlags_ -typedef int ImGuiSelectableFlags; // flags for Selectable() // enum ImGuiSelectableFlags_ -typedef int ImGuiTreeNodeFlags; // flags for TreeNode*(), Collapsing*() // enum ImGuiTreeNodeFlags_ +typedef int ImGuiCol; // enum: a color identifier for styling // enum ImGuiCol_ +typedef int ImGuiCond; // enum: a condition for Set*() // enum ImGuiCond_ +typedef int ImGuiKey; // enum: a key identifier (ImGui-side enum) // enum ImGuiKey_ +typedef int ImGuiMouseCursor; // enum: a mouse cursor identifier // enum ImGuiMouseCursor_ +typedef int ImGuiStyleVar; // enum: a variable identifier for styling // enum ImGuiStyleVar_ +typedef int ImDrawCornerFlags; // flags: for ImDrawList::AddRect*() etc. // enum ImDrawCornerFlags_ +typedef int ImDrawListFlags; // flags: for ImDrawList // enum ImDrawListFlags_ +typedef int ImGuiColorEditFlags; // flags: for ColorEdit*(), ColorPicker*() // enum ImGuiColorEditFlags_ +typedef int ImGuiColumnsFlags; // flags: for *Columns*() // enum ImGuiColumnsFlags_ +typedef int ImGuiDragDropFlags; // flags: for *DragDrop*() // enum ImGuiDragDropFlags_ +typedef int ImGuiComboFlags; // flags: for BeginCombo() // enum ImGuiComboFlags_ +typedef int ImGuiFocusedFlags; // flags: for IsWindowFocused() // enum ImGuiFocusedFlags_ +typedef int ImGuiHoveredFlags; // flags: for IsItemHovered() etc. // enum ImGuiHoveredFlags_ +typedef int ImGuiInputTextFlags; // flags: for InputText*() // enum ImGuiInputTextFlags_ +typedef int ImGuiSelectableFlags; // flags: for Selectable() // enum ImGuiSelectableFlags_ +typedef int ImGuiTreeNodeFlags; // flags: for TreeNode*(),CollapsingHeader()// enum ImGuiTreeNodeFlags_ +typedef int ImGuiWindowFlags; // flags: for Begin*() // enum ImGuiWindowFlags_ typedef int (*ImGuiTextEditCallback)(ImGuiTextEditCallbackData *data); -typedef void (*ImGuiSizeConstraintCallback)(ImGuiSizeConstraintCallbackData* data); +typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data); +#if defined(_MSC_VER) && !defined(__clang__) +typedef unsigned __int64 ImU64; // 64-bit unsigned integer +#else +typedef unsigned long long ImU64; // 64-bit unsigned integer +#endif // Others helpers at bottom of the file: // class ImVector<> // Lightweight std::vector like class. @@ -112,21 +136,25 @@ namespace ImGui IMGUI_API ImGuiIO& GetIO(); IMGUI_API ImGuiStyle& GetStyle(); IMGUI_API ImDrawData* GetDrawData(); // same value as passed to your io.RenderDrawListsFn() function. valid after Render() and until the next call to NewFrame() - IMGUI_API void NewFrame(); // start a new ImGui frame, you can submit any command from this point until NewFrame()/Render(). - IMGUI_API void Render(); // ends the ImGui frame, finalize rendering data, then call your io.RenderDrawListsFn() function if set. + IMGUI_API void NewFrame(); // start a new ImGui frame, you can submit any command from this point until Render()/EndFrame(). + IMGUI_API void Render(); // ends the ImGui frame, finalize the draw data, then call your io.RenderDrawListsFn() function if set. + IMGUI_API void EndFrame(); // ends the ImGui frame. automatically called by Render(), so most likely don't need to ever call that yourself directly. If you don't need to render you may call EndFrame() but you'll have wasted CPU already. If you don't need to render, better to not create any imgui windows instead! IMGUI_API void Shutdown(); - IMGUI_API void ShowUserGuide(); // help block - IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL); // style editor block. you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style) - IMGUI_API void ShowTestWindow(bool* p_open = NULL); // test window demonstrating ImGui features - IMGUI_API void ShowMetricsWindow(bool* p_open = NULL); // metrics window for debugging ImGui (browse draw commands, individual vertices, window list, etc.) + + // Demo, Debug, Informations + IMGUI_API void ShowDemoWindow(bool* p_open = NULL); // create demo/test window (previously called ShowTestWindow). demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application! + IMGUI_API void ShowMetricsWindow(bool* p_open = NULL); // create metrics window. display ImGui internals: draw commands (with individual draw calls and vertices), window list, basic internal state, etc. + IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL); // add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style) + IMGUI_API bool ShowStyleSelector(const char* label); + IMGUI_API void ShowFontSelector(const char* label); + IMGUI_API void ShowUserGuide(); // add basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls). // Window - IMGUI_API bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0); // push window to the stack and start appending to it. see .cpp for details. return false when window is collapsed, so you can early out in your code. 'bool* p_open' creates a widget on the upper-right to close the window (which sets your bool to false). - IMGUI_API bool Begin(const char* name, bool* p_open, const ImVec2& size_on_first_use, float bg_alpha = -1.0f, ImGuiWindowFlags flags = 0); // OBSOLETE. this is the older/longer API. the extra parameters aren't very relevant. call SetNextWindowSize() instead if you want to set a window size. For regular windows, 'size_on_first_use' only applies to the first time EVER the window is created and probably not what you want! might obsolete this API eventually. - IMGUI_API void End(); // finish appending to current window, pop it off the window stack. - IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0,0), bool border = false, ImGuiWindowFlags extra_flags = 0); // begin a scrolling region. size==0.0f: use remaining window size, size<0.0f: use remaining window size minus abs(size). size>0.0f: fixed size. each axis can use a different mode, e.g. ImVec2(0,400). - IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0,0), bool border = false, ImGuiWindowFlags extra_flags = 0); // " - IMGUI_API void EndChild(); + IMGUI_API bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0); // push window to the stack and start appending to it. see .cpp for details. return false when window is collapsed (so you can early out in your code) but you always need to call End() regardless. 'bool* p_open' creates a widget on the upper-right to close the window (which sets your bool to false). + IMGUI_API void End(); // always call even if Begin() return false (which indicates a collapsed window)! finish appending to current window, pop it off the window stack. + IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0,0), bool border = false, ImGuiWindowFlags flags = 0); // begin a scrolling region. size==0.0f: use remaining window size, size<0.0f: use remaining window size minus abs(size). size>0.0f: fixed size. each axis can use a different mode, e.g. ImVec2(0,400). + IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0,0), bool border = false, ImGuiWindowFlags flags = 0); // " + IMGUI_API void EndChild(); // always call even if BeginChild() return false (which indicates a collapsed or clipping child window) IMGUI_API ImVec2 GetContentRegionMax(); // current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates IMGUI_API ImVec2 GetContentRegionAvail(); // == GetContentRegionMax() - GetCursorPos() IMGUI_API float GetContentRegionAvailWidth(); // @@ -139,24 +167,24 @@ namespace ImGui IMGUI_API float GetWindowWidth(); IMGUI_API float GetWindowHeight(); IMGUI_API bool IsWindowCollapsed(); + IMGUI_API bool IsWindowAppearing(); IMGUI_API void SetWindowFontScale(float scale); // per-window font scale. Adjust IO.FontGlobalScale if you want to scale all windows - IMGUI_API void SetNextWindowPos(const ImVec2& pos, ImGuiSetCond cond = 0); // set next window position. call before Begin() - IMGUI_API void SetNextWindowPosCenter(ImGuiSetCond cond = 0); // set next window position to be centered on screen. call before Begin() - IMGUI_API void SetNextWindowSize(const ImVec2& size, ImGuiSetCond cond = 0); // set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin() - IMGUI_API void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeConstraintCallback custom_callback = NULL, void* custom_callback_data = NULL); // set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Use callback to apply non-trivial programmatic constraints. - IMGUI_API void SetNextWindowContentSize(const ImVec2& size); // set next window content size (enforce the range of scrollbars). set axis to 0.0f to leave it automatic. call before Begin() - IMGUI_API void SetNextWindowContentWidth(float width); // set next window content width (enforce the range of horizontal scrollbar). call before Begin() - IMGUI_API void SetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond = 0); // set next window collapsed state. call before Begin() + IMGUI_API void SetNextWindowPos(const ImVec2& pos, ImGuiCond cond = 0, const ImVec2& pivot = ImVec2(0,0)); // set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc. + IMGUI_API void SetNextWindowSize(const ImVec2& size, ImGuiCond cond = 0); // set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin() + IMGUI_API void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL); // set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Use callback to apply non-trivial programmatic constraints. + IMGUI_API void SetNextWindowContentSize(const ImVec2& size); // set next window content size (~ enforce the range of scrollbars). not including window decorations (title bar, menu bar, etc.). set an axis to 0.0f to leave it automatic. call before Begin() + IMGUI_API void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = 0); // set next window collapsed state. call before Begin() IMGUI_API void SetNextWindowFocus(); // set next window to be focused / front-most. call before Begin() - IMGUI_API void SetWindowPos(const ImVec2& pos, ImGuiSetCond cond = 0); // (not recommended) set current window position - call within Begin()/End(). prefer using SetNextWindowPos(), as this may incur tearing and side-effects. - IMGUI_API void SetWindowSize(const ImVec2& size, ImGuiSetCond cond = 0); // (not recommended) set current window size - call within Begin()/End(). set to ImVec2(0,0) to force an auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects. - IMGUI_API void SetWindowCollapsed(bool collapsed, ImGuiSetCond cond = 0); // (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed(). + IMGUI_API void SetNextWindowBgAlpha(float alpha); // set next window background color alpha. helper to easily modify ImGuiCol_WindowBg/ChildBg/PopupBg. + IMGUI_API void SetWindowPos(const ImVec2& pos, ImGuiCond cond = 0); // (not recommended) set current window position - call within Begin()/End(). prefer using SetNextWindowPos(), as this may incur tearing and side-effects. + IMGUI_API void SetWindowSize(const ImVec2& size, ImGuiCond cond = 0); // (not recommended) set current window size - call within Begin()/End(). set to ImVec2(0,0) to force an auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects. + IMGUI_API void SetWindowCollapsed(bool collapsed, ImGuiCond cond = 0); // (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed(). IMGUI_API void SetWindowFocus(); // (not recommended) set current window to be focused / front-most. prefer using SetNextWindowFocus(). - IMGUI_API void SetWindowPos(const char* name, const ImVec2& pos, ImGuiSetCond cond = 0); // set named window position. - IMGUI_API void SetWindowSize(const char* name, const ImVec2& size, ImGuiSetCond cond = 0); // set named window size. set axis to 0.0f to force an auto-fit on this axis. - IMGUI_API void SetWindowCollapsed(const char* name, bool collapsed, ImGuiSetCond cond = 0); // set named window collapsed state - IMGUI_API void SetWindowFocus(const char* name); // set named window to be focused / front-most. use NULL to remove focus. + IMGUI_API void SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond = 0); // set named window position. + IMGUI_API void SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond = 0); // set named window size. set axis to 0.0f to force an auto-fit on this axis. + IMGUI_API void SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0); // set named window collapsed state + IMGUI_API void SetWindowFocus(const char* name); // set named window to be focused / front-most. use NULL to remove focus. IMGUI_API float GetScrollX(); // get scrolling amount [0..GetScrollMaxX()] IMGUI_API float GetScrollY(); // get scrolling amount [0..GetScrollMaxY()] @@ -164,25 +192,27 @@ namespace ImGui IMGUI_API float GetScrollMaxY(); // get maximum scrolling amount ~~ ContentSize.Y - WindowSize.Y IMGUI_API void SetScrollX(float scroll_x); // set scrolling amount [0..GetScrollMaxX()] IMGUI_API void SetScrollY(float scroll_y); // set scrolling amount [0..GetScrollMaxY()] - IMGUI_API void SetScrollHere(float center_y_ratio = 0.5f); // adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom. + IMGUI_API void SetScrollHere(float center_y_ratio = 0.5f); // adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() instead. IMGUI_API void SetScrollFromPosY(float pos_y, float center_y_ratio = 0.5f); // adjust scrolling amount to make given position valid. use GetCursorPos() or GetCursorStartPos()+offset to get valid positions. - IMGUI_API void SetKeyboardFocusHere(int offset = 0); // focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use negative 'offset' to access previous widgets. IMGUI_API void SetStateStorage(ImGuiStorage* tree); // replace tree state storage with our own (if you want to manipulate it yourself, typically clear subsection of it) IMGUI_API ImGuiStorage* GetStateStorage(); // Parameters stacks (shared) IMGUI_API void PushFont(ImFont* font); // use NULL as a shortcut to push default font IMGUI_API void PopFont(); + IMGUI_API void PushStyleColor(ImGuiCol idx, ImU32 col); IMGUI_API void PushStyleColor(ImGuiCol idx, const ImVec4& col); IMGUI_API void PopStyleColor(int count = 1); IMGUI_API void PushStyleVar(ImGuiStyleVar idx, float val); IMGUI_API void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val); IMGUI_API void PopStyleVar(int count = 1); + IMGUI_API const ImVec4& GetStyleColorVec4(ImGuiCol idx); // retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwhise use GetColorU32() to get style color + style alpha. IMGUI_API ImFont* GetFont(); // get current font IMGUI_API float GetFontSize(); // get current font size (= height in pixels) of current font with current scale applied IMGUI_API ImVec2 GetFontTexUvWhitePixel(); // get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API IMGUI_API ImU32 GetColorU32(ImGuiCol idx, float alpha_mul = 1.0f); // retrieve given style color with style alpha applied and optional extra alpha multiplier IMGUI_API ImU32 GetColorU32(const ImVec4& col); // retrieve given color with style alpha applied + IMGUI_API ImU32 GetColorU32(ImU32 col); // retrieve given color with style alpha applied // Parameters stacks (current window) IMGUI_API void PushItemWidth(float item_width); // width of items for the common item+label case, pixels. 0.0f = default to ~2/3 of windows width, >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side) @@ -190,19 +220,19 @@ namespace ImGui IMGUI_API float CalcItemWidth(); // width of item given pushed settings and current cursor position IMGUI_API void PushTextWrapPos(float wrap_pos_x = 0.0f); // word-wrapping for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space IMGUI_API void PopTextWrapPos(); - IMGUI_API void PushAllowKeyboardFocus(bool v); // allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets + IMGUI_API void PushAllowKeyboardFocus(bool allow_keyboard_focus); // allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets IMGUI_API void PopAllowKeyboardFocus(); - IMGUI_API void PushButtonRepeat(bool repeat); // in 'repeat' mode, Button*() functions return repeated true in a typematic manner (uses io.KeyRepeatDelay/io.KeyRepeatRate for now). Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame. + IMGUI_API void PushButtonRepeat(bool repeat); // in 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame. IMGUI_API void PopButtonRepeat(); // Cursor / Layout - IMGUI_API void Separator(); // horizontal line + IMGUI_API void Separator(); // separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator. IMGUI_API void SameLine(float pos_x = 0.0f, float spacing_w = -1.0f); // call between widgets or groups to layout them horizontally IMGUI_API void NewLine(); // undo a SameLine() IMGUI_API void Spacing(); // add vertical spacing IMGUI_API void Dummy(const ImVec2& size); // add a dummy item of given size - IMGUI_API void Indent(float indent_w = 0.0f); // move content position toward the right, by style.IndentSpacing or indent_w if >0 - IMGUI_API void Unindent(float indent_w = 0.0f); // move content position back to the left, by style.IndentSpacing or indent_w if >0 + IMGUI_API void Indent(float indent_w = 0.0f); // move content position toward the right, by style.IndentSpacing or indent_w if != 0 + IMGUI_API void Unindent(float indent_w = 0.0f); // move content position back to the left, by style.IndentSpacing or indent_w if != 0 IMGUI_API void BeginGroup(); // lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.) IMGUI_API void EndGroup(); IMGUI_API ImVec2 GetCursorPos(); // cursor position is relative to window position @@ -214,72 +244,78 @@ namespace ImGui IMGUI_API ImVec2 GetCursorStartPos(); // initial cursor position IMGUI_API ImVec2 GetCursorScreenPos(); // cursor position in absolute screen coordinates [0..io.DisplaySize] (useful to work with ImDrawList API) IMGUI_API void SetCursorScreenPos(const ImVec2& pos); // cursor position in absolute screen coordinates [0..io.DisplaySize] - IMGUI_API void AlignFirstTextHeightToWidgets(); // call once if the first item on the line is a Text() item and you want to vertically lower it to match subsequent (bigger) widgets - IMGUI_API float GetTextLineHeight(); // height of font == GetWindowFontSize() - IMGUI_API float GetTextLineHeightWithSpacing(); // distance (in pixels) between 2 consecutive lines of text == GetWindowFontSize() + GetStyle().ItemSpacing.y - IMGUI_API float GetItemsLineHeightWithSpacing(); // distance (in pixels) between 2 consecutive lines of standard height widgets == GetWindowFontSize() + GetStyle().FramePadding.y*2 + GetStyle().ItemSpacing.y + IMGUI_API void AlignTextToFramePadding(); // vertically align/lower upcoming text to FramePadding.y so that it will aligns to upcoming widgets (call if you have text on a line before regular widgets) + IMGUI_API float GetTextLineHeight(); // ~ FontSize + IMGUI_API float GetTextLineHeightWithSpacing(); // ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text) + IMGUI_API float GetFrameHeight(); // ~ FontSize + style.FramePadding.y * 2 + IMGUI_API float GetFrameHeightWithSpacing(); // ~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets) // Columns - // You can also use SameLine(pos_x) for simplified columning. The columns API is still work-in-progress and rather lacking. - IMGUI_API void Columns(int count = 1, const char* id = NULL, bool border = true); // setup number of columns. use an identifier to distinguish multiple column sets. close with Columns(1). - IMGUI_API void NextColumn(); // next column + // You can also use SameLine(pos_x) for simplified columns. The columns API is still work-in-progress and rather lacking. + IMGUI_API void Columns(int count = 1, const char* id = NULL, bool border = true); + IMGUI_API void NextColumn(); // next column, defaults to current row or next row if the current row is finished IMGUI_API int GetColumnIndex(); // get current column index - IMGUI_API float GetColumnOffset(int column_index = -1); // get position of column line (in pixels, from the left side of the contents region). pass -1 to use current column, otherwise 0..GetcolumnsCount() inclusive. column 0 is usually 0.0f and not resizable unless you call this + IMGUI_API float GetColumnWidth(int column_index = -1); // get column width (in pixels). pass -1 to use current column + IMGUI_API void SetColumnWidth(int column_index, float width); // set column width (in pixels). pass -1 to use current column + IMGUI_API float GetColumnOffset(int column_index = -1); // get position of column line (in pixels, from the left side of the contents region). pass -1 to use current column, otherwise 0..GetColumnsCount() inclusive. column 0 is typically 0.0f IMGUI_API void SetColumnOffset(int column_index, float offset_x); // set position of column line (in pixels, from the left side of the contents region). pass -1 to use current column - IMGUI_API float GetColumnWidth(int column_index = -1); // column width (== GetColumnOffset(GetColumnIndex()+1) - GetColumnOffset(GetColumnOffset()) - IMGUI_API int GetColumnsCount(); // number of columns (what was passed to Columns()) + IMGUI_API int GetColumnsCount(); // ID scopes - // If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them. + // If you are creating widgets in a loop you most likely want to push a unique identifier (e.g. object pointer, loop index) so ImGui can differentiate them. // You can also use the "##foobar" syntax within widget label to distinguish them from each others. Read "A primer on the use of labels/IDs" in the FAQ for more details. - IMGUI_API void PushID(const char* str_id); // push identifier into the ID stack. IDs are hash of the *entire* stack! + IMGUI_API void PushID(const char* str_id); // push identifier into the ID stack. IDs are hash of the entire stack! IMGUI_API void PushID(const char* str_id_begin, const char* str_id_end); IMGUI_API void PushID(const void* ptr_id); IMGUI_API void PushID(int int_id); IMGUI_API void PopID(); - IMGUI_API ImGuiID GetID(const char* str_id); // calculate unique ID (hash of whole ID stack + given parameter). useful if you want to query into ImGuiStorage yourself. otherwise rarely needed + IMGUI_API ImGuiID GetID(const char* str_id); // calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself IMGUI_API ImGuiID GetID(const char* str_id_begin, const char* str_id_end); IMGUI_API ImGuiID GetID(const void* ptr_id); - // Widgets - IMGUI_API void Text(const char* fmt, ...) IM_PRINTFARGS(1); - IMGUI_API void TextV(const char* fmt, va_list args); - IMGUI_API void TextColored(const ImVec4& col, const char* fmt, ...) IM_PRINTFARGS(2); // shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor(); - IMGUI_API void TextColoredV(const ImVec4& col, const char* fmt, va_list args); - IMGUI_API void TextDisabled(const char* fmt, ...) IM_PRINTFARGS(1); // shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); PopStyleColor(); - IMGUI_API void TextDisabledV(const char* fmt, va_list args); - IMGUI_API void TextWrapped(const char* fmt, ...) IM_PRINTFARGS(1); // shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size using SetNextWindowSize(). - IMGUI_API void TextWrappedV(const char* fmt, va_list args); - IMGUI_API void TextUnformatted(const char* text, const char* text_end = NULL); // doesn't require null terminated string if 'text_end' is specified. no copy done to any bounded stack buffer, recommended for long chunks of text - IMGUI_API void LabelText(const char* label, const char* fmt, ...) IM_PRINTFARGS(2); // display text+label aligned the same way as value+label widgets - IMGUI_API void LabelTextV(const char* label, const char* fmt, va_list args); - IMGUI_API void Bullet(); // draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses - IMGUI_API void BulletText(const char* fmt, ...) IM_PRINTFARGS(1); // shortcut for Bullet()+Text() - IMGUI_API void BulletTextV(const char* fmt, va_list args); + // Widgets: Text + IMGUI_API void TextUnformatted(const char* text, const char* text_end = NULL); // raw text without formatting. Roughly equivalent to Text("%s", text) but: A) doesn't require null terminated string if 'text_end' is specified, B) it's faster, no memory copy is done, no buffer size limits, recommended for long chunks of text. + IMGUI_API void Text(const char* fmt, ...) IM_FMTARGS(1); // simple formatted text + IMGUI_API void TextV(const char* fmt, va_list args) IM_FMTLIST(1); + IMGUI_API void TextColored(const ImVec4& col, const char* fmt, ...) IM_FMTARGS(2); // shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor(); + IMGUI_API void TextColoredV(const ImVec4& col, const char* fmt, va_list args) IM_FMTLIST(2); + IMGUI_API void TextDisabled(const char* fmt, ...) IM_FMTARGS(1); // shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); PopStyleColor(); + IMGUI_API void TextDisabledV(const char* fmt, va_list args) IM_FMTLIST(1); + IMGUI_API void TextWrapped(const char* fmt, ...) IM_FMTARGS(1); // shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size using SetNextWindowSize(). + IMGUI_API void TextWrappedV(const char* fmt, va_list args) IM_FMTLIST(1); + IMGUI_API void LabelText(const char* label, const char* fmt, ...) IM_FMTARGS(2); // display text+label aligned the same way as value+label widgets + IMGUI_API void LabelTextV(const char* label, const char* fmt, va_list args) IM_FMTLIST(2); + IMGUI_API void BulletText(const char* fmt, ...) IM_FMTARGS(1); // shortcut for Bullet()+Text() + IMGUI_API void BulletTextV(const char* fmt, va_list args) IM_FMTLIST(1); + IMGUI_API void Bullet(); // draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses + + // Widgets: Main IMGUI_API bool Button(const char* label, const ImVec2& size = ImVec2(0,0)); // button - IMGUI_API bool SmallButton(const char* label); // button with FramePadding=(0,0) - IMGUI_API bool InvisibleButton(const char* str_id, const ImVec2& size); + IMGUI_API bool SmallButton(const char* label); // button with FramePadding=(0,0) to easily embed within text + IMGUI_API bool InvisibleButton(const char* str_id, const ImVec2& size); // button behavior without the visuals, useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.) IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0,0), const ImVec2& uv1 = ImVec2(1,1), const ImVec4& tint_col = ImVec4(1,1,1,1), const ImVec4& border_col = ImVec4(0,0,0,0)); IMGUI_API bool ImageButton(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0,0), const ImVec2& uv1 = ImVec2(1,1), int frame_padding = -1, const ImVec4& bg_col = ImVec4(0,0,0,0), const ImVec4& tint_col = ImVec4(1,1,1,1)); // <0 frame_padding uses default frame padding settings. 0 for no padding IMGUI_API bool Checkbox(const char* label, bool* v); IMGUI_API bool CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value); IMGUI_API bool RadioButton(const char* label, bool active); IMGUI_API bool RadioButton(const char* label, int* v, int v_button); - IMGUI_API bool Combo(const char* label, int* current_item, const char* const* items, int items_count, int height_in_items = -1); - IMGUI_API bool Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int height_in_items = -1); // separate items with \0, end item-list with \0\0 - IMGUI_API bool Combo(const char* label, int* current_item, bool (*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int height_in_items = -1); - IMGUI_API bool ColorButton(const ImVec4& col, bool small_height = false, bool outline_border = true); - IMGUI_API bool ColorEdit3(const char* label, float col[3]); // Hint: 'float col[3]' function argument is same as 'float* col'. You can pass address of first element out of a contiguous set, e.g. &myvector.x - IMGUI_API bool ColorEdit4(const char* label, float col[4], bool show_alpha = true); // " - IMGUI_API void ColorEditMode(ImGuiColorEditMode mode); // FIXME-OBSOLETE: This is inconsistent with most of the API and will be obsoleted/replaced. IMGUI_API void PlotLines(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0), int stride = sizeof(float)); IMGUI_API void PlotLines(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0)); IMGUI_API void PlotHistogram(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0), int stride = sizeof(float)); IMGUI_API void PlotHistogram(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0)); IMGUI_API void ProgressBar(float fraction, const ImVec2& size_arg = ImVec2(-1,0), const char* overlay = NULL); + // Widgets: Combo Box + // The new BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it. + // The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. + IMGUI_API bool BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags = 0); + IMGUI_API void EndCombo(); // only call EndCombo() if BeginCombo() returns true! + IMGUI_API bool Combo(const char* label, int* current_item, const char* const items[], int items_count, int popup_max_height_in_items = -1); + IMGUI_API bool Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int popup_max_height_in_items = -1); // Separate items with \0 within a string, end item-list with \0\0. e.g. "One\0Two\0Three\0" + IMGUI_API bool Combo(const char* label, int* current_item, bool(*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int popup_max_height_in_items = -1); + // Widgets: Drags (tip: ctrl+click on a drag box to input with keyboard. manually input values aren't clamped, can go off-bounds) - // For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, remember than a 'float v[3]' function argument is the same as 'float* v'. You can pass address of your first element out of a contiguous set, e.g. &myvector.x + // For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x IMGUI_API bool DragFloat(const char* label, float* v, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = "%.3f", float power = 1.0f); // If v_min >= v_max we have no bound IMGUI_API bool DragFloat2(const char* label, float v[2], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool DragFloat3(const char* label, float v[3], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = "%.3f", float power = 1.0f); @@ -304,7 +340,7 @@ namespace ImGui IMGUI_API bool InputInt4(const char* label, int v[4], ImGuiInputTextFlags extra_flags = 0); // Widgets: Sliders (tip: ctrl+click on a slider to input with keyboard. manually input values aren't clamped, can go off-bounds) - IMGUI_API bool SliderFloat(const char* label, float* v, float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); // adjust display_format to decorate the value with a prefix or a suffix. Use power!=1.0 for logarithmic sliders + IMGUI_API bool SliderFloat(const char* label, float* v, float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); // adjust display_format to decorate the value with a prefix or a suffix for in-slider labels or unit display. Use power!=1.0 for logarithmic sliders IMGUI_API bool SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); @@ -316,110 +352,135 @@ namespace ImGui IMGUI_API bool VSliderFloat(const char* label, const ImVec2& size, float* v, float v_min, float v_max, const char* display_format = "%.3f", float power = 1.0f); IMGUI_API bool VSliderInt(const char* label, const ImVec2& size, int* v, int v_min, int v_max, const char* display_format = "%.0f"); + // Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.) + // Note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can the pass the address of a first float element out of a contiguous structure, e.g. &myvector.x + IMGUI_API bool ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags = 0); + IMGUI_API bool ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0); + IMGUI_API bool ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags = 0); + IMGUI_API bool ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const float* ref_col = NULL); + IMGUI_API bool ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0,0)); // display a colored square/button, hover for details, return true when pressed. + IMGUI_API void SetColorEditOptions(ImGuiColorEditFlags flags); // initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls. + // Widgets: Trees IMGUI_API bool TreeNode(const char* label); // if returning 'true' the node is open and the tree id is pushed into the id stack. user is responsible for calling TreePop(). - IMGUI_API bool TreeNode(const char* str_id, const char* fmt, ...) IM_PRINTFARGS(2); // read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet(). - IMGUI_API bool TreeNode(const void* ptr_id, const char* fmt, ...) IM_PRINTFARGS(2); // " - IMGUI_API bool TreeNodeV(const char* str_id, const char* fmt, va_list args); // " - IMGUI_API bool TreeNodeV(const void* ptr_id, const char* fmt, va_list args); // " + IMGUI_API bool TreeNode(const char* str_id, const char* fmt, ...) IM_FMTARGS(2); // read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet(). + IMGUI_API bool TreeNode(const void* ptr_id, const char* fmt, ...) IM_FMTARGS(2); // " + IMGUI_API bool TreeNodeV(const char* str_id, const char* fmt, va_list args) IM_FMTLIST(2); + IMGUI_API bool TreeNodeV(const void* ptr_id, const char* fmt, va_list args) IM_FMTLIST(2); IMGUI_API bool TreeNodeEx(const char* label, ImGuiTreeNodeFlags flags = 0); - IMGUI_API bool TreeNodeEx(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_PRINTFARGS(3); - IMGUI_API bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_PRINTFARGS(3); - IMGUI_API bool TreeNodeExV(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args); - IMGUI_API bool TreeNodeExV(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args); - IMGUI_API void TreePush(const char* str_id = NULL); // ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call Push/Pop yourself for layout purpose + IMGUI_API bool TreeNodeEx(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3); + IMGUI_API bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3); + IMGUI_API bool TreeNodeExV(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3); + IMGUI_API bool TreeNodeExV(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3); + IMGUI_API void TreePush(const char* str_id); // ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call Push/Pop yourself for layout purpose IMGUI_API void TreePush(const void* ptr_id = NULL); // " IMGUI_API void TreePop(); // ~ Unindent()+PopId() IMGUI_API void TreeAdvanceToLabelPos(); // advance cursor x position by GetTreeNodeToLabelSpacing() IMGUI_API float GetTreeNodeToLabelSpacing(); // horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode - IMGUI_API void SetNextTreeNodeOpen(bool is_open, ImGuiSetCond cond = 0); // set next TreeNode/CollapsingHeader open state. + IMGUI_API void SetNextTreeNodeOpen(bool is_open, ImGuiCond cond = 0); // set next TreeNode/CollapsingHeader open state. IMGUI_API bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0); // if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop(). IMGUI_API bool CollapsingHeader(const char* label, bool* p_open, ImGuiTreeNodeFlags flags = 0); // when 'p_open' isn't NULL, display an additional small close button on upper right of the header // Widgets: Selectable / Lists - IMGUI_API bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0,0)); // size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height - IMGUI_API bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0,0)); - IMGUI_API bool ListBox(const char* label, int* current_item, const char* const* items, int items_count, int height_in_items = -1); + IMGUI_API bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0,0)); // "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height + IMGUI_API bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0,0)); // "bool* p_selected" point to the selection state (read-write), as a convenient helper. + IMGUI_API bool ListBox(const char* label, int* current_item, const char* const items[], int items_count, int height_in_items = -1); IMGUI_API bool ListBox(const char* label, int* current_item, bool (*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int height_in_items = -1); - IMGUI_API bool ListBoxHeader(const char* label, const ImVec2& size = ImVec2(0,0)); // use if you want to reimplement ListBox() will custom data or interactions. make sure to call ListBoxFooter() afterwards. + IMGUI_API bool ListBoxHeader(const char* label, const ImVec2& size = ImVec2(0,0)); // use if you want to reimplement ListBox() will custom data or interactions. make sure to call ListBoxFooter() afterwards. IMGUI_API bool ListBoxHeader(const char* label, int items_count, int height_in_items = -1); // " - IMGUI_API void ListBoxFooter(); // terminate the scrolling region + IMGUI_API void ListBoxFooter(); // terminate the scrolling region // Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace) IMGUI_API void Value(const char* prefix, bool b); IMGUI_API void Value(const char* prefix, int v); IMGUI_API void Value(const char* prefix, unsigned int v); IMGUI_API void Value(const char* prefix, float v, const char* float_format = NULL); - IMGUI_API void ValueColor(const char* prefix, const ImVec4& v); - IMGUI_API void ValueColor(const char* prefix, ImU32 v); // Tooltips - IMGUI_API void SetTooltip(const char* fmt, ...) IM_PRINTFARGS(1); // set tooltip under mouse-cursor, typically use with ImGui::IsHovered(). last call wins - IMGUI_API void SetTooltipV(const char* fmt, va_list args); - IMGUI_API void BeginTooltip(); // use to create full-featured tooltip windows that aren't just text + IMGUI_API void SetTooltip(const char* fmt, ...) IM_FMTARGS(1); // set text tooltip under mouse-cursor, typically use with ImGui::IsItemHovered(). overidde any previous call to SetTooltip(). + IMGUI_API void SetTooltipV(const char* fmt, va_list args) IM_FMTLIST(1); + IMGUI_API void BeginTooltip(); // begin/append a tooltip window. to create full-featured tooltip (with any kind of contents). IMGUI_API void EndTooltip(); // Menus - IMGUI_API bool BeginMainMenuBar(); // create and append to a full screen menu-bar. only call EndMainMenuBar() if this returns true! - IMGUI_API void EndMainMenuBar(); - IMGUI_API bool BeginMenuBar(); // append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set). only call EndMenuBar() if this returns true! - IMGUI_API void EndMenuBar(); + IMGUI_API bool BeginMainMenuBar(); // create and append to a full screen menu-bar. + IMGUI_API void EndMainMenuBar(); // only call EndMainMenuBar() if BeginMainMenuBar() returns true! + IMGUI_API bool BeginMenuBar(); // append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window). + IMGUI_API void EndMenuBar(); // only call EndMenuBar() if BeginMenuBar() returns true! IMGUI_API bool BeginMenu(const char* label, bool enabled = true); // create a sub-menu entry. only call EndMenu() if this returns true! - IMGUI_API void EndMenu(); + IMGUI_API void EndMenu(); // only call EndBegin() if BeginMenu() returns true! IMGUI_API bool MenuItem(const char* label, const char* shortcut = NULL, bool selected = false, bool enabled = true); // return true when activated. shortcuts are displayed for convenience but not processed by ImGui at the moment IMGUI_API bool MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled = true); // return true when activated + toggle (*p_selected) if p_selected != NULL // Popups - IMGUI_API void OpenPopup(const char* str_id); // mark popup as open. popups are closed when user click outside, or activate a pressable item, or CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level). - IMGUI_API bool BeginPopup(const char* str_id); // return true if the popup is open, and you can start outputting to it. only call EndPopup() if BeginPopup() returned true! - IMGUI_API bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags extra_flags = 0); // modal dialog (block interactions behind the modal window, can't close the modal window by clicking outside) - IMGUI_API bool BeginPopupContextItem(const char* str_id, int mouse_button = 1); // helper to open and begin popup when clicked on last item. read comments in .cpp! - IMGUI_API bool BeginPopupContextWindow(bool also_over_items = true, const char* str_id = NULL, int mouse_button = 1); // helper to open and begin popup when clicked on current window. - IMGUI_API bool BeginPopupContextVoid(const char* str_id = NULL, int mouse_button = 1); // helper to open and begin popup when clicked in void (no window). - IMGUI_API void EndPopup(); + IMGUI_API void OpenPopup(const char* str_id); // call to mark popup as open (don't call every frame!). popups are closed when user click outside, or if CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. By default, Selectable()/MenuItem() are calling CloseCurrentPopup(). Popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level). + IMGUI_API bool BeginPopup(const char* str_id, ImGuiWindowFlags flags = 0); // return true if the popup is open, and you can start outputting to it. only call EndPopup() if BeginPopup() returns true! + IMGUI_API bool BeginPopupContextItem(const char* str_id = NULL, int mouse_button = 1); // helper to open and begin popup when clicked on last item. if you can pass a NULL str_id only if the previous item had an id. If you want to use that on a non-interactive item such as Text() you need to pass in an explicit ID here. read comments in .cpp! + IMGUI_API bool BeginPopupContextWindow(const char* str_id = NULL, int mouse_button = 1, bool also_over_items = true); // helper to open and begin popup when clicked on current window. + IMGUI_API bool BeginPopupContextVoid(const char* str_id = NULL, int mouse_button = 1); // helper to open and begin popup when clicked in void (where there are no imgui windows). + IMGUI_API bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0); // modal dialog (regular window with title bar, block interactions behind the modal window, can't close the modal window by clicking outside) + IMGUI_API void EndPopup(); // only call EndPopup() if BeginPopupXXX() returns true! + IMGUI_API bool OpenPopupOnItemClick(const char* str_id = NULL, int mouse_button = 1); // helper to open popup when clicked on last item. return true when just opened. + IMGUI_API bool IsPopupOpen(const char* str_id); // return true if the popup is open IMGUI_API void CloseCurrentPopup(); // close the popup we have begin-ed into. clicking on a MenuItem or Selectable automatically close the current popup. - // Logging: all text output from interface is redirected to tty/file/clipboard. By default, tree nodes are automatically opened during logging. + // Logging/Capture: all text output from interface is captured to tty/file/clipboard. By default, tree nodes are automatically opened during logging. IMGUI_API void LogToTTY(int max_depth = -1); // start logging to tty IMGUI_API void LogToFile(int max_depth = -1, const char* filename = NULL); // start logging to file IMGUI_API void LogToClipboard(int max_depth = -1); // start logging to OS clipboard IMGUI_API void LogFinish(); // stop logging (close file, etc.) IMGUI_API void LogButtons(); // helper to display buttons for logging to tty/file/clipboard - IMGUI_API void LogText(const char* fmt, ...) IM_PRINTFARGS(1); // pass text data straight to log (without being displayed) + IMGUI_API void LogText(const char* fmt, ...) IM_FMTARGS(1); // pass text data straight to log (without being displayed) + + // Drag and Drop + // [BETA API] Missing Demo code. API may evolve. + IMGUI_API bool BeginDragDropSource(ImGuiDragDropFlags flags = 0, int mouse_button = 0); // call when the current item is active. If this return true, you can call SetDragDropPayload() + EndDragDropSource() + IMGUI_API bool SetDragDropPayload(const char* type, const void* data, size_t size, ImGuiCond cond = 0);// type is a user defined string of maximum 12 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui. + IMGUI_API void EndDragDropSource(); // only call EndDragDropSource() if BeginDragDropSource() returns true! + IMGUI_API bool BeginDragDropTarget(); // call after submitting an item that may receive an item. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget() + IMGUI_API const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0); // accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the payload before the mouse button is released. + IMGUI_API void EndDragDropTarget(); // only call EndDragDropTarget() if BeginDragDropTarget() returns true! // Clipping IMGUI_API void PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect); IMGUI_API void PopClipRect(); + // Styles + IMGUI_API void StyleColorsClassic(ImGuiStyle* dst = NULL); + IMGUI_API void StyleColorsDark(ImGuiStyle* dst = NULL); + IMGUI_API void StyleColorsLight(ImGuiStyle* dst = NULL); + + // Focus + // (FIXME: Those functions will be reworked after we merge the navigation branch + have a pass at focusing/tabbing features.) + // (Prefer using "SetItemDefaultFocus()" over "if (IsWindowAppearing()) SetScrollHere()" when applicable, to make your code more forward compatible when navigation branch is merged) + IMGUI_API void SetItemDefaultFocus(); // make last item the default focused item of a window (WIP navigation branch only). Pleaase use instead of SetScrollHere(). + IMGUI_API void SetKeyboardFocusHere(int offset = 0); // focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use -1 to access previous widget. + // Utilities - IMGUI_API bool IsItemHovered(); // was the last item hovered by mouse? - IMGUI_API bool IsItemHoveredRect(); // was the last item hovered by mouse? even if another item is active or window is blocked by popup while we are hovering this - IMGUI_API bool IsItemActive(); // was the last item active? (e.g. button being held, text field being edited- items that don't interact will always return false) - IMGUI_API bool IsItemClicked(int mouse_button = 0); // was the last item clicked? (e.g. button/node just clicked on) - IMGUI_API bool IsItemVisible(); // was the last item visible? (aka not out of sight due to clipping/scrolling.) + IMGUI_API bool IsItemHovered(ImGuiHoveredFlags flags = 0); // is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for more options. + IMGUI_API bool IsItemActive(); // is the last item active? (e.g. button being held, text field being edited- items that don't interact will always return false) + IMGUI_API bool IsItemClicked(int mouse_button = 0); // is the last item clicked? (e.g. button/node just clicked on) + IMGUI_API bool IsItemVisible(); // is the last item visible? (aka not out of sight due to clipping/scrolling.) IMGUI_API bool IsAnyItemHovered(); IMGUI_API bool IsAnyItemActive(); - IMGUI_API ImVec2 GetItemRectMin(); // get bounding rect of last item in screen space + IMGUI_API ImVec2 GetItemRectMin(); // get bounding rectangle of last item, in screen space IMGUI_API ImVec2 GetItemRectMax(); // " - IMGUI_API ImVec2 GetItemRectSize(); // " + IMGUI_API ImVec2 GetItemRectSize(); // get size of last item, in screen space IMGUI_API void SetItemAllowOverlap(); // allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area. - IMGUI_API bool IsWindowHovered(); // is current window hovered and hoverable (not blocked by a popup) (differentiate child windows from each others) - IMGUI_API bool IsWindowFocused(); // is current window focused - IMGUI_API bool IsRootWindowFocused(); // is current root window focused (root = top-most parent of a child, otherwise self) - IMGUI_API bool IsRootWindowOrAnyChildFocused(); // is current root window or any of its child (including current window) focused - IMGUI_API bool IsRootWindowOrAnyChildHovered(); // is current root window or any of its child (including current window) hovered and hoverable (not blocked by a popup) + IMGUI_API bool IsWindowFocused(ImGuiFocusedFlags flags = 0); // is current window focused? or its root/child, depending on flags. see flags for options. + IMGUI_API bool IsWindowHovered(ImGuiHoveredFlags flags = 0); // is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. IMGUI_API bool IsRectVisible(const ImVec2& size); // test if rectangle (of given size, starting from cursor position) is visible / not clipped. IMGUI_API bool IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max); // test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side. - IMGUI_API bool IsPosHoveringAnyWindow(const ImVec2& pos); // is given position hovering any active imgui window IMGUI_API float GetTime(); IMGUI_API int GetFrameCount(); - IMGUI_API const char* GetStyleColName(ImGuiCol idx); - IMGUI_API ImVec2 CalcItemRectClosestPoint(const ImVec2& pos, bool on_edge = false, float outward = +0.0f); // utility to find the closest point the last item bounding rectangle edge. useful to visually link items + IMGUI_API ImDrawList* GetOverlayDrawList(); // this draw list will be the last rendered one, useful to quickly draw overlays shapes/text + IMGUI_API ImDrawListSharedData* GetDrawListSharedData(); + IMGUI_API const char* GetStyleColorName(ImGuiCol idx); IMGUI_API ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f); IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // calculate coarse clipping for large list of evenly sized items. Prefer using the ImGuiListClipper higher-level helper if you can. - IMGUI_API bool BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags extra_flags = 0); // helper to create a child window / scrolling region that looks like a normal widget frame - IMGUI_API void EndChildFrame(); + IMGUI_API bool BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags flags = 0); // helper to create a child window / scrolling region that looks like a normal widget frame + IMGUI_API void EndChildFrame(); // always call EndChildFrame() regardless of BeginChildFrame() return values (which indicates a collapsed/clipped window) IMGUI_API ImVec4 ColorConvertU32ToFloat4(ImU32 in); IMGUI_API ImU32 ColorConvertFloat4ToU32(const ImVec4& in); @@ -427,23 +488,23 @@ namespace ImGui IMGUI_API void ColorConvertHSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b); // Inputs - IMGUI_API int GetKeyIndex(ImGuiKey key); // map ImGuiKey_* values into user's key index. == io.KeyMap[key] - IMGUI_API bool IsKeyDown(int key_index); // key_index into the keys_down[] array, imgui doesn't know the semantic of each entry, uses your own indices! - IMGUI_API bool IsKeyPressed(int key_index, bool repeat = true); // uses user's key indices as stored in the keys_down[] array. if repeat=true. uses io.KeyRepeatDelay / KeyRepeatRate - IMGUI_API bool IsKeyReleased(int key_index); // " + IMGUI_API int GetKeyIndex(ImGuiKey imgui_key); // map ImGuiKey_* values into user's key index. == io.KeyMap[key] + IMGUI_API bool IsKeyDown(int user_key_index); // is key being held. == io.KeysDown[user_key_index]. note that imgui doesn't know the semantic of each entry of io.KeyDown[]. Use your own indices/enums according to how your backend/engine stored them into KeyDown[]! + IMGUI_API bool IsKeyPressed(int user_key_index, bool repeat = true); // was key pressed (went from !Down to Down). if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate + IMGUI_API bool IsKeyReleased(int user_key_index); // was key released (went from Down to !Down).. + IMGUI_API int GetKeyPressedAmount(int key_index, float repeat_delay, float rate); // uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate IMGUI_API bool IsMouseDown(int button); // is mouse button held IMGUI_API bool IsMouseClicked(int button, bool repeat = false); // did mouse button clicked (went from !Down to Down) IMGUI_API bool IsMouseDoubleClicked(int button); // did mouse button double-clicked. a double-click returns false in IsMouseClicked(). uses io.MouseDoubleClickTime. IMGUI_API bool IsMouseReleased(int button); // did mouse button released (went from Down to !Down) - IMGUI_API bool IsMouseHoveringWindow(); // is mouse hovering current window ("window" in API names always refer to current window). disregarding of any consideration of being blocked by a popup. (unlike IsWindowHovered() this will return true even if the window is blocked because of a popup) - IMGUI_API bool IsMouseHoveringAnyWindow(); // is mouse hovering any visible window - IMGUI_API bool IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true); // is mouse hovering given bounding rect (in screen space). clipped by current clipping settings. disregarding of consideration of focus/window ordering/blocked by a popup. IMGUI_API bool IsMouseDragging(int button = 0, float lock_threshold = -1.0f); // is mouse dragging. if lock_threshold < -1.0f uses io.MouseDraggingThreshold + IMGUI_API bool IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true); // is mouse hovering given bounding rect (in screen space). clipped by current clipping settings. disregarding of consideration of focus/window ordering/blocked by a popup. + IMGUI_API bool IsMousePosValid(const ImVec2* mouse_pos = NULL); // IMGUI_API ImVec2 GetMousePos(); // shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls IMGUI_API ImVec2 GetMousePosOnOpeningCurrentPopup(); // retrieve backup of mouse positioning at the time of opening popup we have BeginPopup() into IMGUI_API ImVec2 GetMouseDragDelta(int button = 0, float lock_threshold = -1.0f); // dragging amount since clicking. if lock_threshold < -1.0f uses io.MouseDraggingThreshold IMGUI_API void ResetMouseDragDelta(int button = 0); // - IMGUI_API ImGuiMouseCursor GetMouseCursor(); // get desired cursor type, reset in ImGui::NewFrame(), this updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you + IMGUI_API ImGuiMouseCursor GetMouseCursor(); // get desired cursor type, reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you IMGUI_API void SetMouseCursor(ImGuiMouseCursor type); // set desired cursor type IMGUI_API void CaptureKeyboardFromApp(bool capture = true); // manually override io.WantCaptureKeyboard flag next frame (said flag is entirely left for your application handle). e.g. force capture keyboard when your widget is being hovered. IMGUI_API void CaptureMouseFromApp(bool capture = true); // manually override io.WantCaptureMouse flag next frame (said flag is entirely left for your application handle). @@ -462,32 +523,21 @@ namespace ImGui IMGUI_API ImGuiContext* GetCurrentContext(); IMGUI_API void SetCurrentContext(ImGuiContext* ctx); - // Obsolete (will be removed) -#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS - static inline bool CollapsingHeader(const char* label, const char* str_id, bool framed = true, bool default_open = false) { (void)str_id; (void)framed; ImGuiTreeNodeFlags default_open_flags = 1<<5; return CollapsingHeader(label, (default_open ? default_open_flags : 0)); } // OBSOLETE 1.49+ - static inline ImFont* GetWindowFont() { return GetFont(); } // OBSOLETE 1.48+ - static inline float GetWindowFontSize() { return GetFontSize(); } // OBSOLETE 1.48+ - static inline void SetScrollPosHere() { SetScrollHere(); } // OBSOLETE 1.42+ - static inline bool GetWindowCollapsed() { return ImGui::IsWindowCollapsed(); } // OBSOLETE 1.39+ - static inline bool IsRectClipped(const ImVec2& size) { return !IsRectVisible(size); } // OBSOLETE 1.39+ -#endif - } // namespace ImGui // Flags for ImGui::Begin() enum ImGuiWindowFlags_ { - // Default: 0 ImGuiWindowFlags_NoTitleBar = 1 << 0, // Disable title-bar ImGuiWindowFlags_NoResize = 1 << 1, // Disable user resizing with the lower-right grip ImGuiWindowFlags_NoMove = 1 << 2, // Disable user moving the window ImGuiWindowFlags_NoScrollbar = 1 << 3, // Disable scrollbars (window can still scroll with mouse or programatically) - ImGuiWindowFlags_NoScrollWithMouse = 1 << 4, // Disable user vertically scrolling with mouse wheel + ImGuiWindowFlags_NoScrollWithMouse = 1 << 4, // Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set. ImGuiWindowFlags_NoCollapse = 1 << 5, // Disable user collapsing window by double-clicking on it ImGuiWindowFlags_AlwaysAutoResize = 1 << 6, // Resize every window to its content every frame - ImGuiWindowFlags_ShowBorders = 1 << 7, // Show borders around windows and items + //ImGuiWindowFlags_ShowBorders = 1 << 7, // Show borders around windows and items (OBSOLETE! Use e.g. style.FrameBorderSize=1.0f to enable borders). ImGuiWindowFlags_NoSavedSettings = 1 << 8, // Never load/save settings in .ini file - ImGuiWindowFlags_NoInputs = 1 << 9, // Disable catching mouse or keyboard inputs + ImGuiWindowFlags_NoInputs = 1 << 9, // Disable catching mouse or keyboard inputs, hovering test with pass through. ImGuiWindowFlags_MenuBar = 1 << 10, // Has a menu-bar ImGuiWindowFlags_HorizontalScrollbar = 1 << 11, // Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12, // Disable taking focus when transitioning from hidden to visible state @@ -495,21 +545,19 @@ enum ImGuiWindowFlags_ ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14, // Always show vertical scrollbar (even if ContentSize.y < Size.y) ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15, // Always show horizontal scrollbar (even if ContentSize.x < Size.x) ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16, // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) + ImGuiWindowFlags_ResizeFromAnySide = 1 << 17, // (WIP) Enable resize from any corners and borders. Your back-end needs to honor the different values of io.MouseCursor set by imgui. + // [Internal] - ImGuiWindowFlags_ChildWindow = 1 << 20, // Don't use! For internal use by BeginChild() - ImGuiWindowFlags_ChildWindowAutoFitX = 1 << 21, // Don't use! For internal use by BeginChild() - ImGuiWindowFlags_ChildWindowAutoFitY = 1 << 22, // Don't use! For internal use by BeginChild() - ImGuiWindowFlags_ComboBox = 1 << 23, // Don't use! For internal use by ComboBox() - ImGuiWindowFlags_Tooltip = 1 << 24, // Don't use! For internal use by BeginTooltip() - ImGuiWindowFlags_Popup = 1 << 25, // Don't use! For internal use by BeginPopup() - ImGuiWindowFlags_Modal = 1 << 26, // Don't use! For internal use by BeginPopupModal() - ImGuiWindowFlags_ChildMenu = 1 << 27 // Don't use! For internal use by BeginMenu() + ImGuiWindowFlags_ChildWindow = 1 << 24, // Don't use! For internal use by BeginChild() + ImGuiWindowFlags_Tooltip = 1 << 25, // Don't use! For internal use by BeginTooltip() + ImGuiWindowFlags_Popup = 1 << 26, // Don't use! For internal use by BeginPopup() + ImGuiWindowFlags_Modal = 1 << 27, // Don't use! For internal use by BeginPopupModal() + ImGuiWindowFlags_ChildMenu = 1 << 28 // Don't use! For internal use by BeginMenu() }; // Flags for ImGui::InputText() enum ImGuiInputTextFlags_ { - // Default: 0 ImGuiInputTextFlags_CharsDecimal = 1 << 0, // Allow 0123456789.+-*/ ImGuiInputTextFlags_CharsHexadecimal = 1 << 1, // Allow 0123456789ABCDEFabcdef ImGuiInputTextFlags_CharsUppercase = 1 << 2, // Turn a..z into A..Z @@ -526,6 +574,7 @@ enum ImGuiInputTextFlags_ ImGuiInputTextFlags_AlwaysInsertMode = 1 << 13, // Insert mode ImGuiInputTextFlags_ReadOnly = 1 << 14, // Read-only mode ImGuiInputTextFlags_Password = 1 << 15, // Password mode, display all characters as '*' + ImGuiInputTextFlags_NoUndoRedo = 1 << 16, // Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID(). // [Internal] ImGuiInputTextFlags_Multiline = 1 << 20 // For internal use by InputTextMultiline() }; @@ -535,7 +584,7 @@ enum ImGuiTreeNodeFlags_ { ImGuiTreeNodeFlags_Selected = 1 << 0, // Draw as selected ImGuiTreeNodeFlags_Framed = 1 << 1, // Full colored frame (e.g. for CollapsingHeader) - ImGuiTreeNodeFlags_AllowOverlapMode = 1 << 2, // Hit testing to allow subsequent widgets to overlap this one + ImGuiTreeNodeFlags_AllowItemOverlap = 1 << 2, // Hit testing to allow subsequent widgets to overlap this one ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3, // Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4, // Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes) ImGuiTreeNodeFlags_DefaultOpen = 1 << 5, // Default node to be open @@ -543,20 +592,79 @@ enum ImGuiTreeNodeFlags_ ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7, // Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open. ImGuiTreeNodeFlags_Leaf = 1 << 8, // No collapsing, no arrow (use as a convenience for leaf nodes). ImGuiTreeNodeFlags_Bullet = 1 << 9, // Display a bullet instead of arrow - //ImGuITreeNodeFlags_SpanAllAvailWidth = 1 << 10, // FIXME: TODO: Extend hit box horizontally even if not framed - //ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 11, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible + ImGuiTreeNodeFlags_FramePadding = 1 << 10, // Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding(). + //ImGuITreeNodeFlags_SpanAllAvailWidth = 1 << 11, // FIXME: TODO: Extend hit box horizontally even if not framed + //ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 12, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoAutoOpenOnLog + + // Obsolete names (will be removed) +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS + , ImGuiTreeNodeFlags_AllowOverlapMode = ImGuiTreeNodeFlags_AllowItemOverlap +#endif }; // Flags for ImGui::Selectable() enum ImGuiSelectableFlags_ { - // Default: 0 ImGuiSelectableFlags_DontClosePopups = 1 << 0, // Clicking this don't close parent popup window ImGuiSelectableFlags_SpanAllColumns = 1 << 1, // Selectable frame can span all columns (text will still fit in current column) ImGuiSelectableFlags_AllowDoubleClick = 1 << 2 // Generate press events on double clicks too }; +// Flags for ImGui::BeginCombo() +enum ImGuiComboFlags_ +{ + ImGuiComboFlags_PopupAlignLeft = 1 << 0, // Align the popup toward the left by default + ImGuiComboFlags_HeightSmall = 1 << 1, // Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo() + ImGuiComboFlags_HeightRegular = 1 << 2, // Max ~8 items visible (default) + ImGuiComboFlags_HeightLarge = 1 << 3, // Max ~20 items visible + ImGuiComboFlags_HeightLargest = 1 << 4, // As many fitting items as possible + ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest +}; + +// Flags for ImGui::IsWindowFocused() +enum ImGuiFocusedFlags_ +{ + ImGuiFocusedFlags_ChildWindows = 1 << 0, // IsWindowFocused(): Return true if any children of the window is focused + ImGuiFocusedFlags_RootWindow = 1 << 1, // IsWindowFocused(): Test from root window (top most parent of the current hierarchy) + ImGuiFocusedFlags_AnyWindow = 1 << 2, // IsWindowFocused(): Return true if any window is focused + ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows +}; + +// Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() +enum ImGuiHoveredFlags_ +{ + ImGuiHoveredFlags_Default = 0, // Return true if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them. + ImGuiHoveredFlags_ChildWindows = 1 << 0, // IsWindowHovered() only: Return true if any children of the window is hovered + ImGuiHoveredFlags_RootWindow = 1 << 1, // IsWindowHovered() only: Test from root window (top most parent of the current hierarchy) + ImGuiHoveredFlags_AnyWindow = 1 << 2, // IsWindowHovered() only: Return true if any window is hovered + ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 3, // Return true even if a popup window is normally blocking access to this item/window + //ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 4, // Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet. + ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 5, // Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns. + ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 6, // Return true even if the position is overlapped by another window + ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped, + ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows +}; + +// Flags for ImGui::BeginDragDropSource(), ImGui::AcceptDragDropPayload() +enum ImGuiDragDropFlags_ +{ + // BeginDragDropSource() flags + ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0, // By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disable this behavior. + ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1, // By default, when dragging we clear data so that IsItemHovered() will return true, to avoid subsequent user code submitting tooltips. This flag disable this behavior so you can still call IsItemHovered() on the source item. + ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2, // Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item. + ImGuiDragDropFlags_SourceAllowNullID = 1 << 3, // Allow items such as Text(), Image() that have no unique identifier to be used as drag source, by manufacturing a temporary identifier based on their window-relative position. This is extremely unusual within the dear imgui ecosystem and so we made it explicit. + ImGuiDragDropFlags_SourceExtern = 1 << 4, // External source (from outside of imgui), won't attempt to read current item/window info. Will always return true. Only one Extern source can be active simultaneously. + // AcceptDragDropPayload() flags + ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10, // AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered. + ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11, // Do not draw the default highlight rectangle when hovering over target. + ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect // For peeking ahead and inspecting the payload before delivery. +}; + +// Standard Drag and Drop payload types. You can define you own payload types using 12-characters long strings. Types starting with '_' are defined by Dear ImGui. +#define IMGUI_PAYLOAD_TYPE_COLOR_3F "_COL3F" // float[3] // Standard type for colors, without alpha. User code may use this type. +#define IMGUI_PAYLOAD_TYPE_COLOR_4F "_COL4F" // float[4] // Standard type for colors. User code may use this type. + // User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array enum ImGuiKey_ { @@ -569,6 +677,7 @@ enum ImGuiKey_ ImGuiKey_PageDown, ImGuiKey_Home, // for text edit ImGuiKey_End, // for text edit + ImGuiKey_Insert, // for text edit ImGuiKey_Delete, // for text edit ImGuiKey_Backspace, // for text edit ImGuiKey_Enter, // for text edit @@ -588,7 +697,7 @@ enum ImGuiCol_ ImGuiCol_Text, ImGuiCol_TextDisabled, ImGuiCol_WindowBg, // Background of normal windows - ImGuiCol_ChildWindowBg, // Background of child windows + ImGuiCol_ChildBg, // Background of child windows ImGuiCol_PopupBg, // Background of popups, menus, tooltips windows ImGuiCol_Border, ImGuiCol_BorderShadow, @@ -596,14 +705,13 @@ enum ImGuiCol_ ImGuiCol_FrameBgHovered, ImGuiCol_FrameBgActive, ImGuiCol_TitleBg, - ImGuiCol_TitleBgCollapsed, ImGuiCol_TitleBgActive, + ImGuiCol_TitleBgCollapsed, ImGuiCol_MenuBarBg, ImGuiCol_ScrollbarBg, ImGuiCol_ScrollbarGrab, ImGuiCol_ScrollbarGrabHovered, ImGuiCol_ScrollbarGrabActive, - ImGuiCol_ComboBg, ImGuiCol_CheckMark, ImGuiCol_SliderGrab, ImGuiCol_SliderGrabActive, @@ -613,9 +721,9 @@ enum ImGuiCol_ ImGuiCol_Header, ImGuiCol_HeaderHovered, ImGuiCol_HeaderActive, - ImGuiCol_Column, - ImGuiCol_ColumnHovered, - ImGuiCol_ColumnActive, + ImGuiCol_Separator, + ImGuiCol_SeparatorHovered, + ImGuiCol_SeparatorActive, ImGuiCol_ResizeGrip, ImGuiCol_ResizeGripHovered, ImGuiCol_ResizeGripActive, @@ -628,38 +736,80 @@ enum ImGuiCol_ ImGuiCol_PlotHistogramHovered, ImGuiCol_TextSelectedBg, ImGuiCol_ModalWindowDarkening, // darken entire screen when a modal window is active + ImGuiCol_DragDropTarget, ImGuiCol_COUNT + + // Obsolete names (will be removed) +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS + //, ImGuiCol_ComboBg = ImGuiCol_PopupBg // ComboBg has been merged with PopupBg, so a redirect isn't accurate. + , ImGuiCol_ChildWindowBg = ImGuiCol_ChildBg, ImGuiCol_Column = ImGuiCol_Separator, ImGuiCol_ColumnHovered = ImGuiCol_SeparatorHovered, ImGuiCol_ColumnActive = ImGuiCol_SeparatorActive +#endif }; -// Enumeration for PushStyleVar() / PopStyleVar() -// NB: the enum only refers to fields of ImGuiStyle() which makes sense to be pushed/poped in UI code. Feel free to add others. +// Enumeration for PushStyleVar() / PopStyleVar() to temporarily modify the ImGuiStyle structure. +// NB: the enum only refers to fields of ImGuiStyle which makes sense to be pushed/popped inside UI code. During initialization, feel free to just poke into ImGuiStyle directly. +// NB: if changing this enum, you need to update the associated internal table GStyleVarInfo[] accordingly. This is where we link enum values to members offset/type. enum ImGuiStyleVar_ { - ImGuiStyleVar_Alpha, // float - ImGuiStyleVar_WindowPadding, // ImVec2 - ImGuiStyleVar_WindowRounding, // float - ImGuiStyleVar_WindowMinSize, // ImVec2 - ImGuiStyleVar_ChildWindowRounding, // float - ImGuiStyleVar_FramePadding, // ImVec2 - ImGuiStyleVar_FrameRounding, // float - ImGuiStyleVar_ItemSpacing, // ImVec2 - ImGuiStyleVar_ItemInnerSpacing, // ImVec2 - ImGuiStyleVar_IndentSpacing, // float - ImGuiStyleVar_GrabMinSize, // float - ImGuiStyleVar_ButtonTextAlign, // flags ImGuiAlign_* + // Enum name ......................// Member in ImGuiStyle structure (see ImGuiStyle for descriptions) + ImGuiStyleVar_Alpha, // float Alpha + ImGuiStyleVar_WindowPadding, // ImVec2 WindowPadding + ImGuiStyleVar_WindowRounding, // float WindowRounding + ImGuiStyleVar_WindowBorderSize, // float WindowBorderSize + ImGuiStyleVar_WindowMinSize, // ImVec2 WindowMinSize + ImGuiStyleVar_WindowTitleAlign, // ImVec2 WindowTitleAlign + ImGuiStyleVar_ChildRounding, // float ChildRounding + ImGuiStyleVar_ChildBorderSize, // float ChildBorderSize + ImGuiStyleVar_PopupRounding, // float PopupRounding + ImGuiStyleVar_PopupBorderSize, // float PopupBorderSize + ImGuiStyleVar_FramePadding, // ImVec2 FramePadding + ImGuiStyleVar_FrameRounding, // float FrameRounding + ImGuiStyleVar_FrameBorderSize, // float FrameBorderSize + ImGuiStyleVar_ItemSpacing, // ImVec2 ItemSpacing + ImGuiStyleVar_ItemInnerSpacing, // ImVec2 ItemInnerSpacing + ImGuiStyleVar_IndentSpacing, // float IndentSpacing + ImGuiStyleVar_ScrollbarSize, // float ScrollbarSize + ImGuiStyleVar_ScrollbarRounding, // float ScrollbarRounding + ImGuiStyleVar_GrabMinSize, // float GrabMinSize + ImGuiStyleVar_GrabRounding, // float GrabRounding + ImGuiStyleVar_ButtonTextAlign, // ImVec2 ButtonTextAlign ImGuiStyleVar_ViewId, // uint8_t ImGuiStyleVar_Count_ + + // Obsolete names (will be removed) +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS + , ImGuiStyleVar_ChildWindowRounding = ImGuiStyleVar_ChildRounding +#endif }; -// Enumeration for ColorEditMode() -// FIXME-OBSOLETE: Will be replaced by future color/picker api -enum ImGuiColorEditMode_ +// Enumeration for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() +enum ImGuiColorEditFlags_ { - ImGuiColorEditMode_UserSelect = -2, - ImGuiColorEditMode_UserSelectShowButton = -1, - ImGuiColorEditMode_RGB = 0, - ImGuiColorEditMode_HSV = 1, - ImGuiColorEditMode_HEX = 2 + ImGuiColorEditFlags_NoAlpha = 1 << 1, // // ColorEdit, ColorPicker, ColorButton: ignore Alpha component (read 3 components from the input pointer). + ImGuiColorEditFlags_NoPicker = 1 << 2, // // ColorEdit: disable picker when clicking on colored square. + ImGuiColorEditFlags_NoOptions = 1 << 3, // // ColorEdit: disable toggling options menu when right-clicking on inputs/small preview. + ImGuiColorEditFlags_NoSmallPreview = 1 << 4, // // ColorEdit, ColorPicker: disable colored square preview next to the inputs. (e.g. to show only the inputs) + ImGuiColorEditFlags_NoInputs = 1 << 5, // // ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview colored square). + ImGuiColorEditFlags_NoTooltip = 1 << 6, // // ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview. + ImGuiColorEditFlags_NoLabel = 1 << 7, // // ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker). + ImGuiColorEditFlags_NoSidePreview = 1 << 8, // // ColorPicker: disable bigger color preview on right side of the picker, use small colored square preview instead. + // User Options (right-click on widget to change some of them). You can set application defaults using SetColorEditOptions(). The idea is that you probably don't want to override them in most of your calls, let the user choose and/or call SetColorEditOptions() during startup. + ImGuiColorEditFlags_AlphaBar = 1 << 9, // // ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker. + ImGuiColorEditFlags_AlphaPreview = 1 << 10, // // ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque. + ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 11, // // ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque. + ImGuiColorEditFlags_HDR = 1 << 12, // // (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well). + ImGuiColorEditFlags_RGB = 1 << 13, // [Inputs] // ColorEdit: choose one among RGB/HSV/HEX. ColorPicker: choose any combination using RGB/HSV/HEX. + ImGuiColorEditFlags_HSV = 1 << 14, // [Inputs] // " + ImGuiColorEditFlags_HEX = 1 << 15, // [Inputs] // " + ImGuiColorEditFlags_Uint8 = 1 << 16, // [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0..255. + ImGuiColorEditFlags_Float = 1 << 17, // [DataType] // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers. + ImGuiColorEditFlags_PickerHueBar = 1 << 18, // [PickerMode] // ColorPicker: bar for Hue, rectangle for Sat/Value. + ImGuiColorEditFlags_PickerHueWheel = 1 << 19, // [PickerMode] // ColorPicker: wheel for Hue, triangle for Sat/Value. + // Internals/Masks + ImGuiColorEditFlags__InputsMask = ImGuiColorEditFlags_RGB|ImGuiColorEditFlags_HSV|ImGuiColorEditFlags_HEX, + ImGuiColorEditFlags__DataTypeMask = ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_Float, + ImGuiColorEditFlags__PickerMask = ImGuiColorEditFlags_PickerHueWheel|ImGuiColorEditFlags_PickerHueBar, + ImGuiColorEditFlags__OptionsDefault = ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_RGB|ImGuiColorEditFlags_PickerHueBar // Change application default using SetColorEditOptions() }; // Enumeration for GetMouseCursor() @@ -669,52 +819,65 @@ enum ImGuiMouseCursor_ ImGuiMouseCursor_Arrow = 0, ImGuiMouseCursor_TextInput, // When hovering over InputText, etc. ImGuiMouseCursor_Move, // Unused - ImGuiMouseCursor_ResizeNS, // Unused - ImGuiMouseCursor_ResizeEW, // When hovering over a column - ImGuiMouseCursor_ResizeNESW, // Unused + ImGuiMouseCursor_ResizeNS, // When hovering over an horizontal border + ImGuiMouseCursor_ResizeEW, // When hovering over a vertical border or a column + ImGuiMouseCursor_ResizeNESW, // When hovering over the bottom-left corner of a window ImGuiMouseCursor_ResizeNWSE, // When hovering over the bottom-right corner of a window ImGuiMouseCursor_Count_ }; -// Condition flags for ImGui::SetWindow***(), SetNextWindow***(), SetNextTreeNode***() functions -// All those functions treat 0 as a shortcut to ImGuiSetCond_Always -enum ImGuiSetCond_ +// Condition for ImGui::SetWindow***(), SetNextWindow***(), SetNextTreeNode***() functions +// All those functions treat 0 as a shortcut to ImGuiCond_Always. From the point of view of the user use this as an enum (don't combine multiple values into flags). +enum ImGuiCond_ { - ImGuiSetCond_Always = 1 << 0, // Set the variable - ImGuiSetCond_Once = 1 << 1, // Set the variable once per runtime session (only the first call with succeed) - ImGuiSetCond_FirstUseEver = 1 << 2, // Set the variable if the window has no saved data (if doesn't exist in the .ini file) - ImGuiSetCond_Appearing = 1 << 3 // Set the variable if the window is appearing after being hidden/inactive (or the first time) + ImGuiCond_Always = 1 << 0, // Set the variable + ImGuiCond_Once = 1 << 1, // Set the variable once per runtime session (only the first call with succeed) + ImGuiCond_FirstUseEver = 1 << 2, // Set the variable if the window has no saved data (if doesn't exist in the .ini file) + ImGuiCond_Appearing = 1 << 3 // Set the variable if the window is appearing after being hidden/inactive (or the first time) + + // Obsolete names (will be removed) +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS + , ImGuiSetCond_Always = ImGuiCond_Always, ImGuiSetCond_Once = ImGuiCond_Once, ImGuiSetCond_FirstUseEver = ImGuiCond_FirstUseEver, ImGuiSetCond_Appearing = ImGuiCond_Appearing +#endif }; +// You may modify the ImGui::GetStyle() main instance during initialization and before NewFrame(). +// During the frame, prefer using ImGui::PushStyleVar(ImGuiStyleVar_XXXX)/PopStyleVar() to alter the main style values, and ImGui::PushStyleColor(ImGuiCol_XXX)/PopStyleColor() for colors. struct ImGuiStyle { - float Alpha; // Global alpha applies to everything in ImGui - ImVec2 WindowPadding; // Padding within a window - ImVec2 WindowMinSize; // Minimum window size - float WindowRounding; // Radius of window corners rounding. Set to 0.0f to have rectangular windows + float Alpha; // Global alpha applies to everything in ImGui. + ImVec2 WindowPadding; // Padding within a window. + float WindowRounding; // Radius of window corners rounding. Set to 0.0f to have rectangular windows. + float WindowBorderSize; // Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly). + ImVec2 WindowMinSize; // Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints(). ImVec2 WindowTitleAlign; // Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered. - float ChildWindowRounding; // Radius of child window corners rounding. Set to 0.0f to have rectangular windows - ImVec2 FramePadding; // Padding within a framed rectangle (used by most widgets) + float ChildRounding; // Radius of child window corners rounding. Set to 0.0f to have rectangular windows. + float ChildBorderSize; // Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly). + float PopupRounding; // Radius of popup window corners rounding. + float PopupBorderSize; // Thickness of border around popup windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly). + ImVec2 FramePadding; // Padding within a framed rectangle (used by most widgets). float FrameRounding; // Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets). - ImVec2 ItemSpacing; // Horizontal and vertical spacing between widgets/lines - ImVec2 ItemInnerSpacing; // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label) + float FrameBorderSize; // Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly). + ImVec2 ItemSpacing; // Horizontal and vertical spacing between widgets/lines. + ImVec2 ItemInnerSpacing; // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label). ImVec2 TouchExtraPadding; // Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much! float IndentSpacing; // Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2). - float ColumnsMinSpacing; // Minimum horizontal spacing between two columns - float ScrollbarSize; // Width of the vertical scrollbar, Height of the horizontal scrollbar - float ScrollbarRounding; // Radius of grab corners for scrollbar - float GrabMinSize; // Minimum width/height of a grab box for slider/scrollbar + float ColumnsMinSpacing; // Minimum horizontal spacing between two columns. + float ScrollbarSize; // Width of the vertical scrollbar, Height of the horizontal scrollbar. + float ScrollbarRounding; // Radius of grab corners for scrollbar. + float GrabMinSize; // Minimum width/height of a grab box for slider/scrollbar. float ViewId; float GrabRounding; // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs. ImVec2 ButtonTextAlign; // Alignment of button text when button is larger than text. Defaults to (0.5f,0.5f) for horizontally+vertically centered. ImVec2 DisplayWindowPadding; // Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows. ImVec2 DisplaySafeAreaPadding; // If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows. bool AntiAliasedLines; // Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU. - bool AntiAliasedShapes; // Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.) - float CurveTessellationTol; // Tessellation tolerance. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. + bool AntiAliasedFill; // Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.) + float CurveTessellationTol; // Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. ImVec4 Colors[ImGuiCol_COUNT]; IMGUI_API ImGuiStyle(); + IMGUI_API void ScaleAllSizes(float scale_factor); }; // This is where your app communicate with ImGui. Access via ImGui::GetIO(). @@ -732,10 +895,10 @@ struct ImGuiIO const char* LogFilename; // = "imgui_log.txt" // Path to .log file (default parameter to ImGui::LogToFile when no file is specified). float MouseDoubleClickTime; // = 0.30f // Time for a double-click, in seconds. float MouseDoubleClickMaxDist; // = 6.0f // Distance threshold to stay in to validate a double-click, in pixels. - float MouseDragThreshold; // = 6.0f // Distance threshold before considering we are dragging - int KeyMap[ImGuiKey_COUNT]; // // Map of indices into the KeysDown[512] entries array + float MouseDragThreshold; // = 6.0f // Distance threshold before considering we are dragging. + int KeyMap[ImGuiKey_COUNT]; // // Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state. float KeyRepeatDelay; // = 0.250f // When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.). - float KeyRepeatRate; // = 0.020f // When holding a key/button, rate at which it repeats, in seconds. + float KeyRepeatRate; // = 0.050f // When holding a key/button, rate at which it repeats, in seconds. void* UserData; // = NULL // Store your own data for retrieval by callbacks. ImFontAtlas* Fonts; // // Load and assemble one or more fonts into a single tightly packed texture. Output to Fonts array. @@ -747,10 +910,11 @@ struct ImGuiIO ImVec2 DisplayVisibleMax; // (0.0f,0.0f) // If the values are the same, we defaults to Min=(0.0f) and Max=DisplaySize // Advanced/subtle behaviors - bool OSXBehaviors; // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl + bool OptMacOSXBehaviors; // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl + bool OptCursorBlink; // = true // Enable blinking cursor, for users who consider it annoying. //------------------------------------------------------------------ - // User Functions + // Settings (User Functions) //------------------------------------------------------------------ // Rendering function, will be called in Render(). @@ -778,15 +942,16 @@ struct ImGuiIO // Input - Fill before calling NewFrame() //------------------------------------------------------------------ - ImVec2 MousePos; // Mouse position, in pixels (set to -1,-1 if no mouse / on another screen, etc.) + ImVec2 MousePos; // Mouse position, in pixels. Set to ImVec2(-FLT_MAX,-FLT_MAX) if mouse is unavailable (on another screen, etc.) bool MouseDown[5]; // Mouse buttons: left, right, middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button). Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. - float MouseWheel; // Mouse wheel: 1 unit scrolls about 5 lines text. + float MouseWheel; // Mouse wheel: 1 unit scrolls about 5 lines text. + float MouseWheelH; // Mouse wheel (Horizontal). Most users don't have a mouse with an horizontal wheel, may not be filled by all back ends. bool MouseDrawCursor; // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). bool KeyCtrl; // Keyboard modifier pressed: Control bool KeyShift; // Keyboard modifier pressed: Shift bool KeyAlt; // Keyboard modifier pressed: Alt bool KeySuper; // Keyboard modifier pressed: Cmd/Super/Windows - bool KeysDown[512]; // Keyboard keys that are pressed (in whatever storage order you naturally have access to keyboard data) + bool KeysDown[512]; // Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys). ImWchar InputCharacters[16+1]; // List of characters input (translated by user from keypress+keyboard state). Fill using AddInputCharacter() helper. // Functions @@ -798,42 +963,76 @@ struct ImGuiIO // Output - Retrieve after calling NewFrame() //------------------------------------------------------------------ - bool WantCaptureMouse; // Mouse is hovering a window or widget is active (= ImGui will use your mouse input). Use to hide mouse from the rest of your application - bool WantCaptureKeyboard; // Widget is active (= ImGui will use your keyboard input). Use to hide keyboard from the rest of your application - bool WantTextInput; // Some text input widget is active, which will read input characters from the InputCharacters array. Use to activate on screen keyboard if your system needs one + bool WantCaptureMouse; // When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application. This is set by ImGui when it wants to use your mouse (e.g. unclicked mouse is hovering a window, or a widget is active). + bool WantCaptureKeyboard; // When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application. This is set by ImGui when it wants to use your keyboard inputs. + bool WantTextInput; // Mobile/console: when io.WantTextInput is true, you may display an on-screen keyboard. This is set by ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active). + bool WantMoveMouse; // [BETA-NAV] MousePos has been altered, back-end should reposition mouse on next frame. Set only when 'NavMovesMouse=true'. float Framerate; // Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames int MetricsAllocs; // Number of active memory allocations int MetricsRenderVertices; // Vertices output during last call to Render() int MetricsRenderIndices; // Indices output during last call to Render() = number of triangles * 3 int MetricsActiveWindows; // Number of visible root windows (exclude child windows) - ImVec2 MouseDelta; // Mouse delta. Note that this is zero if either current or previous position are negative, so a disappearing/reappearing mouse won't have a huge delta for one frame. + ImVec2 MouseDelta; // Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta. //------------------------------------------------------------------ - // [Private] ImGui will maintain those fields. Forward compatibility not guaranteed! + // [Internal] ImGui will maintain those fields. Forward compatibility not guaranteed! //------------------------------------------------------------------ ImVec2 MousePosPrev; // Previous mouse position temporary storage (nb: not for public use, set to MousePos in NewFrame()) - bool MouseClicked[5]; // Mouse button went from !Down to Down ImVec2 MouseClickedPos[5]; // Position at time of clicking float MouseClickedTime[5]; // Time of last click (used to figure out double-click) + bool MouseClicked[5]; // Mouse button went from !Down to Down bool MouseDoubleClicked[5]; // Has mouse button been double-clicked? bool MouseReleased[5]; // Mouse button went from Down to !Down bool MouseDownOwned[5]; // Track if button was clicked inside a window. We don't request mouse capture from the application if click started outside ImGui bounds. float MouseDownDuration[5]; // Duration the mouse button has been down (0.0f == just clicked) float MouseDownDurationPrev[5]; // Previous time the mouse button has been down - float MouseDragMaxDistanceSqr[5]; // Squared maximum distance of how much mouse has traveled from the click point + ImVec2 MouseDragMaxDistanceAbs[5]; // Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point + float MouseDragMaxDistanceSqr[5]; // Squared maximum distance of how much mouse has traveled from the clicking point float KeysDownDuration[512]; // Duration the keyboard key has been down (0.0f == just pressed) float KeysDownDurationPrev[512]; // Previous duration the key has been down IMGUI_API ImGuiIO(); }; +//----------------------------------------------------------------------------- +// Obsolete functions (Will be removed! Read 'API BREAKING CHANGES' section in imgui.cpp for details) +//----------------------------------------------------------------------------- + +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS +namespace ImGui +{ + // OBSOLETED in 1.54 (from Dec 2017) + static inline bool IsAnyWindowFocused() { return IsWindowFocused(ImGuiFocusedFlags_AnyWindow); } + static inline bool IsAnyWindowHovered() { return IsWindowHovered(ImGuiHoveredFlags_AnyWindow); } + static inline ImVec2 CalcItemRectClosestPoint(const ImVec2& pos, bool on_edge = false, float outward = 0.f) { (void)on_edge; (void)outward; IM_ASSERT(0); return pos; } + // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017) + static inline void ShowTestWindow() { return ShowDemoWindow(); } + static inline bool IsRootWindowFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootWindow); } + static inline bool IsRootWindowOrAnyChildFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows); } + static inline void SetNextWindowContentWidth(float w) { SetNextWindowContentSize(ImVec2(w, 0.0f)); } + static inline float GetItemsLineHeightWithSpacing() { return GetFrameHeightWithSpacing(); } + // OBSOLETED in 1.52 (between Aug 2017 and Oct 2017) + bool Begin(const char* name, bool* p_open, const ImVec2& size_on_first_use, float bg_alpha_override = -1.0f, ImGuiWindowFlags flags = 0); // Use SetNextWindowSize(size, ImGuiCond_FirstUseEver) + SetNextWindowBgAlpha() instead. + static inline bool IsRootWindowOrAnyChildHovered() { return IsItemHovered(ImGuiHoveredFlags_RootAndChildWindows); } + static inline void AlignFirstTextHeightToWidgets() { AlignTextToFramePadding(); } + static inline void SetNextWindowPosCenter(ImGuiCond c=0) { ImGuiIO& io = GetIO(); SetNextWindowPos(ImVec2(io.DisplaySize.x * 0.5f, io.DisplaySize.y * 0.5f), c, ImVec2(0.5f, 0.5f)); } + // OBSOLETED in 1.51 (between Jun 2017 and Aug 2017) + static inline bool IsItemHoveredRect() { return IsItemHovered(ImGuiHoveredFlags_RectOnly); } + static inline bool IsPosHoveringAnyWindow(const ImVec2&) { IM_ASSERT(0); return false; } // This was misleading and partly broken. You probably want to use the ImGui::GetIO().WantCaptureMouse flag instead. + static inline bool IsMouseHoveringAnyWindow() { return IsWindowHovered(ImGuiHoveredFlags_AnyWindow); } + static inline bool IsMouseHoveringWindow() { return IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem); } + // OBSOLETED IN 1.49 (between Apr 2016 and May 2016) + static inline bool CollapsingHeader(const char* label, const char* str_id, bool framed = true, bool default_open = false) { (void)str_id; (void)framed; ImGuiTreeNodeFlags default_open_flags = 1 << 5; return CollapsingHeader(label, (default_open ? default_open_flags : 0)); } +} +#endif + //----------------------------------------------------------------------------- // Helpers //----------------------------------------------------------------------------- // Lightweight std::vector<> like class to avoid dragging dependencies (also: windows implementation of STL with debug enabled is absurdly slow, so let's bypass it so our code runs fast in debug). -// Our implementation does NOT call c++ constructors because we don't use them in ImGui. Don't use this class as a straight std::vector replacement in your code! +// Our implementation does NOT call C++ constructors/destructors. This is intentional and we do not require it. Do not use this class as a straight std::vector replacement in your code! template class ImVector { @@ -846,8 +1045,8 @@ public: typedef value_type* iterator; typedef const value_type* const_iterator; - ImVector() { Size = Capacity = 0; Data = NULL; } - ~ImVector() { if (Data) ImGui::MemFree(Data); } + inline ImVector() { Size = Capacity = 0; Data = NULL; } + inline ~ImVector() { if (Data) ImGui::MemFree(Data); } inline bool empty() const { return Size == 0; } inline int size() const { return Size; } @@ -863,41 +1062,41 @@ public: inline const_iterator end() const { return Data + Size; } inline value_type& front() { IM_ASSERT(Size > 0); return Data[0]; } inline const value_type& front() const { IM_ASSERT(Size > 0); return Data[0]; } - inline value_type& back() { IM_ASSERT(Size > 0); return Data[Size-1]; } - inline const value_type& back() const { IM_ASSERT(Size > 0); return Data[Size-1]; } + inline value_type& back() { IM_ASSERT(Size > 0); return Data[Size - 1]; } + inline const value_type& back() const { IM_ASSERT(Size > 0); return Data[Size - 1]; } inline void swap(ImVector& rhs) { int rhs_size = rhs.Size; rhs.Size = Size; Size = rhs_size; int rhs_cap = rhs.Capacity; rhs.Capacity = Capacity; Capacity = rhs_cap; value_type* rhs_data = rhs.Data; rhs.Data = Data; Data = rhs_data; } - inline int _grow_capacity(int new_size) { int new_capacity = Capacity ? (Capacity + Capacity/2) : 8; return new_capacity > new_size ? new_capacity : new_size; } + inline int _grow_capacity(int sz) const { int new_capacity = Capacity ? (Capacity + Capacity/2) : 8; return new_capacity > sz ? new_capacity : sz; } inline void resize(int new_size) { if (new_size > Capacity) reserve(_grow_capacity(new_size)); Size = new_size; } + inline void resize(int new_size, const T& v){ if (new_size > Capacity) reserve(_grow_capacity(new_size)); if (new_size > Size) for (int n = Size; n < new_size; n++) Data[n] = v; Size = new_size; } inline void reserve(int new_capacity) { - if (new_capacity <= Capacity) return; - T* new_data = (value_type*)ImGui::MemAlloc((size_t)new_capacity * sizeof(value_type)); - memset(&new_data[Size], 0, (size_t)(new_capacity - Size) * sizeof(value_type)); // BK - clear garbage so that 0 initialized ImString works properly. + if (new_capacity <= Capacity) + return; + T* new_data = (value_type*)ImGui::MemAlloc((size_t)new_capacity * sizeof(T)); if (Data) - memcpy(new_data, Data, (size_t)Size * sizeof(value_type)); + memcpy(new_data, Data, (size_t)Size * sizeof(T)); ImGui::MemFree(Data); Data = new_data; Capacity = new_capacity; } - inline void push_back(const value_type& v) { if (Size == Capacity) reserve(_grow_capacity(Size+1)); Data[Size++] = v; } + // NB: &v cannot be pointing inside the ImVector Data itself! e.g. v.push_back(v[10]) is forbidden. + inline void push_back(const value_type& v) { if (Size == Capacity) reserve(_grow_capacity(Size + 1)); Data[Size++] = v; } inline void pop_back() { IM_ASSERT(Size > 0); Size--; } + inline void push_front(const value_type& v) { if (Size == 0) push_back(v); else insert(Data, v); } inline iterator erase(const_iterator it) { IM_ASSERT(it >= Data && it < Data+Size); const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + 1, ((size_t)Size - (size_t)off - 1) * sizeof(value_type)); Size--; return Data + off; } - inline iterator insert(const_iterator it, const value_type& v) { IM_ASSERT(it >= Data && it <= Data+Size); const ptrdiff_t off = it - Data; if (Size == Capacity) reserve(Capacity ? Capacity * 2 : 4); if (off < (int)Size) memmove(Data + off + 1, Data + off, ((size_t)Size - (size_t)off) * sizeof(value_type)); Data[off] = v; Size++; return Data + off; } + inline iterator insert(const_iterator it, const value_type& v) { IM_ASSERT(it >= Data && it <= Data+Size); const ptrdiff_t off = it - Data; if (Size == Capacity) reserve(_grow_capacity(Size + 1)); if (off < (int)Size) memmove(Data + off + 1, Data + off, ((size_t)Size - (size_t)off) * sizeof(value_type)); Data[off] = v; Size++; return Data + off; } + inline bool contains(const value_type& v) const { const T* data = Data; const T* data_end = Data + Size; while (data < data_end) if (*data++ == v) return true; return false; } }; -// Helper: execute a block of code at maximum once a frame -// Convenient if you want to quickly create an UI within deep-nested code that runs multiple times every frame. +// Helper: execute a block of code at maximum once a frame. Convenient if you want to quickly create an UI within deep-nested code that runs multiple times every frame. // Usage: -// IMGUI_ONCE_UPON_A_FRAME -// { -// // code block will be executed one per frame -// } -// Attention! the macro expands into 2 statement so make sure you don't use it within e.g. an if() statement without curly braces. -#define IMGUI_ONCE_UPON_A_FRAME static ImGuiOnceUponAFrame imgui_oaf##__LINE__; if (imgui_oaf##__LINE__) +// static ImGuiOnceUponAFrame oaf; +// if (oaf) +// ImGui::Text("This will be called only once per frame"); struct ImGuiOnceUponAFrame { ImGuiOnceUponAFrame() { RefFrame = -1; } @@ -905,6 +1104,11 @@ struct ImGuiOnceUponAFrame operator bool() const { int current_frame = ImGui::GetFrameCount(); if (RefFrame == current_frame) return false; RefFrame = current_frame; return true; } }; +// Helper macro for ImGuiOnceUponAFrame. Attention: The macro expands into 2 statement so make sure you don't use it within e.g. an if() statement without curly braces. +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS // Will obsolete +#define IMGUI_ONCE_UPON_A_FRAME static ImGuiOnceUponAFrame imgui_oaf; if (imgui_oaf) +#endif + // Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" struct ImGuiTextFilter { @@ -928,13 +1132,12 @@ struct ImGuiTextFilter ImVector Filters; int CountGrep; - ImGuiTextFilter(const char* default_filter = ""); - ~ImGuiTextFilter() {} - void Clear() { InputBuf[0] = 0; Build(); } - bool Draw(const char* label = "Filter (inc,-exc)", float width = 0.0f); // Helper calling InputText+Build - bool PassFilter(const char* text, const char* text_end = NULL) const; - bool IsActive() const { return !Filters.empty(); } + IMGUI_API ImGuiTextFilter(const char* default_filter = ""); + IMGUI_API bool Draw(const char* label = "Filter (inc,-exc)", float width = 0.0f); // Helper calling InputText+Build + IMGUI_API bool PassFilter(const char* text, const char* text_end = NULL) const; IMGUI_API void Build(); + void Clear() { InputBuf[0] = 0; Build(); } + bool IsActive() const { return !Filters.empty(); } }; // Helper: Text buffer for logging/accumulating text @@ -949,18 +1152,19 @@ struct ImGuiTextBuffer int size() const { return Buf.Size - 1; } bool empty() { return Buf.Size <= 1; } void clear() { Buf.clear(); Buf.push_back(0); } + void reserve(int capacity) { Buf.reserve(capacity); } const char* c_str() const { return Buf.Data; } - IMGUI_API void append(const char* fmt, ...) IM_PRINTFARGS(2); - IMGUI_API void appendv(const char* fmt, va_list args); + IMGUI_API void appendf(const char* fmt, ...) IM_FMTARGS(2); + IMGUI_API void appendfv(const char* fmt, va_list args) IM_FMTLIST(2); }; // Helper: Simple Key->value storage // Typically you don't have to worry about this since a storage is held within each Window. -// We use it to e.g. store collapse state for a tree (Int 0/1), store color edit options. -// You can use it as custom user storage for temporary values. -// Declare your own storage if: +// We use it to e.g. store collapse state for a tree (Int 0/1), store color edit options. +// This is optimized for efficient reading (dichotomy into a contiguous buffer), rare writing (typically tied to user interactions) +// You can use it as custom user storage for temporary values. Declare your own storage if, for example: // - You want to manipulate the open/close state of a particular sub-tree in your interface (tree node uses Int 0/1 to store their state). -// - You want to store custom debug data easily without adding or editing structures in your code. +// - You want to store custom debug data easily without adding or editing structures in your code (probably not efficient, but convenient) // Types are NOT stored, so it is up to you to make sure your Key don't collide with different types. struct ImGuiStorage { @@ -968,7 +1172,7 @@ struct ImGuiStorage { ImGuiID key; union { int val_i; float val_f; void* val_p; }; - Pair(ImGuiID _key, int _val_i) { key = _key; val_i = _val_i; } + Pair(ImGuiID _key, int _val_i) { key = _key; val_i = _val_i; } Pair(ImGuiID _key, float _val_f) { key = _key; val_f = _val_f; } Pair(ImGuiID _key, void* _val_p) { key = _key; val_p = _val_p; } }; @@ -977,7 +1181,7 @@ struct ImGuiStorage // - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) // - Set***() functions find pair, insertion on demand if missing. // - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair. - IMGUI_API void Clear(); + void Clear() { Data.clear(); } IMGUI_API int GetInt(ImGuiID key, int default_val = 0) const; IMGUI_API void SetInt(ImGuiID key, int val); IMGUI_API bool GetBool(ImGuiID key, bool default_val = false) const; @@ -998,6 +1202,9 @@ struct ImGuiStorage // Use on your own storage if you know only integer are being stored (open/close all tree nodes) IMGUI_API void SetAllInt(int val); + + // For quicker full rebuild of a storage (instead of an incremental one), you may add all your contents and then sort once. + IMGUI_API void BuildSortByKey(); }; // Shared state of InputText(), passed to callback when a ImGuiInputTextFlags_Callback* flag is used and the corresponding callback is triggered. @@ -1025,19 +1232,41 @@ struct ImGuiTextEditCallbackData // NB: Helper functions for text manipulation. Calling those function loses selection. IMGUI_API void DeleteChars(int pos, int bytes_count); IMGUI_API void InsertChars(int pos, const char* text, const char* text_end = NULL); - bool HasSelection() const { return SelectionStart != SelectionEnd; } + bool HasSelection() const { return SelectionStart != SelectionEnd; } }; // Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). // NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough. -struct ImGuiSizeConstraintCallbackData +struct ImGuiSizeCallbackData { void* UserData; // Read-only. What user passed to SetNextWindowSizeConstraints() - ImVec2 Pos; // Read-only. Window position, for reference. - ImVec2 CurrentSize; // Read-only. Current window size. + ImVec2 Pos; // Read-only. Window position, for reference. + ImVec2 CurrentSize; // Read-only. Current window size. ImVec2 DesiredSize; // Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing. }; +// Data payload for Drag and Drop operations +struct ImGuiPayload +{ + // Members + const void* Data; // Data (copied and owned by dear imgui) + int DataSize; // Data size + + // [Internal] + ImGuiID SourceId; // Source item id + ImGuiID SourceParentId; // Source parent id (if available) + int DataFrameCount; // Data timestamp + char DataType[12 + 1]; // Data type tag (short user-supplied string, 12 characters max) + bool Preview; // Set when AcceptDragDropPayload() was called and mouse has been hovering the target item (nb: handle overlapping drag targets) + bool Delivery; // Set when AcceptDragDropPayload() was called and mouse button is released over the target item. + + ImGuiPayload() { Clear(); } + void Clear() { SourceId = SourceParentId = 0; Data = NULL; DataSize = 0; memset(DataType, 0, sizeof(DataType)); DataFrameCount = -1; Preview = Delivery = false; } + bool IsDataType(const char* type) const { return DataFrameCount != -1 && strcmp(type, DataType) == 0; } + bool IsPreview() const { return Preview; } + bool IsDelivery() const { return Delivery; } +}; + // Helpers macros to generate 32-bits encoded colors #ifdef IMGUI_USE_BGRA_PACKED_COLOR #define IM_COL32_R_SHIFT 16 @@ -1053,14 +1282,14 @@ struct ImGuiSizeConstraintCallbackData #define IM_COL32_A_MASK 0xFF000000 #endif #define IM_COL32(R,G,B,A) (((ImU32)(A)< IdxBuffer; }; +enum ImDrawCornerFlags_ +{ + ImDrawCornerFlags_TopLeft = 1 << 0, // 0x1 + ImDrawCornerFlags_TopRight = 1 << 1, // 0x2 + ImDrawCornerFlags_BotLeft = 1 << 2, // 0x4 + ImDrawCornerFlags_BotRight = 1 << 3, // 0x8 + ImDrawCornerFlags_Top = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_TopRight, // 0x3 + ImDrawCornerFlags_Bot = ImDrawCornerFlags_BotLeft | ImDrawCornerFlags_BotRight, // 0xC + ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft, // 0x5 + ImDrawCornerFlags_Right = ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight, // 0xA + ImDrawCornerFlags_All = 0xF // In your function calls you may use ~0 (= all bits sets) instead of ImDrawCornerFlags_All, as a convenience +}; + +enum ImDrawListFlags_ +{ + ImDrawListFlags_AntiAliasedLines = 1 << 0, + ImDrawListFlags_AntiAliasedFill = 1 << 1 +}; + // Draw command list // This is the low-level list of polygons that ImGui functions are filling. At the end of the frame, all command lists are passed to your ImGuiIO::RenderDrawListFn function for rendering. -// At the moment, each ImGui window contains its own ImDrawList but they could potentially be merged in the future. -// If you want to add custom rendering within a window, you can use ImGui::GetWindowDrawList() to access the current draw list and add your own primitives. +// Each ImGui window contains its own ImDrawList. You can use ImGui::GetWindowDrawList() to access the current window draw list and draw custom primitives. // You can interleave normal ImGui:: calls and adding primitives to the current draw list. -// All positions are in screen coordinates (0,0=top-left, 1 pixel per unit). Primitives are always added to the list and not culled (culling is done at render time and at a higher-level by ImGui:: functions). +// All positions are generally in pixel coordinates (top-left at (0,0), bottom-right at io.DisplaySize), however you are totally free to apply whatever transformation matrix to want to the data (if you apply such transformation you'll want to apply it to ClipRect as well) +// Important: Primitives are always added to the list and not culled (culling is done at higher-level by ImGui:: functions), if you use this API a lot consider coarse culling your drawn objects. struct ImDrawList { // This is what you have to render - ImVector CmdBuffer; // Commands. Typically 1 command = 1 gpu draw call. + ImVector CmdBuffer; // Draw commands. Typically 1 command = 1 GPU draw call, unless the command is a callback. ImVector IdxBuffer; // Index buffer. Each command consume ImDrawCmd::ElemCount of those ImVector VtxBuffer; // Vertex buffer. // [Internal, used while building lists] + ImDrawListFlags Flags; // Flags, you may poke into these to adjust anti-aliasing settings per-primitive. + const ImDrawListSharedData* _Data; // Pointer to shared draw data (you can use ImGui::GetDrawListSharedData() to get the one from current ImGui context) const char* _OwnerName; // Pointer to owner window's name for debugging unsigned int _VtxCurrentIdx; // [Internal] == VtxBuffer.Size ImDrawVert* _VtxWritePtr; // [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector<> operators too much) @@ -1185,18 +1436,21 @@ struct ImDrawList int _ChannelsCount; // [Internal] number of active channels (1+) ImVector _Channels; // [Internal] draw channels for columns API (not resized down so _ChannelsCount may be smaller than _Channels.Size) - ImDrawList() { _OwnerName = NULL; Clear(); } + // If you want to create ImDrawList instances, pass them ImGui::GetDrawListSharedData() or create and use your own ImDrawListSharedData (so you can use ImDrawList without ImGui) + ImDrawList(const ImDrawListSharedData* shared_data) { _Data = shared_data; _OwnerName = NULL; Clear(); } ~ImDrawList() { ClearFreeMemory(); } IMGUI_API void PushClipRect(ImVec2 clip_rect_min, ImVec2 clip_rect_max, bool intersect_with_current_clip_rect = false); // Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling) IMGUI_API void PushClipRectFullScreen(); IMGUI_API void PopClipRect(); IMGUI_API void PushTextureID(const ImTextureID& texture_id); IMGUI_API void PopTextureID(); + inline ImVec2 GetClipRectMin() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2(cr.x, cr.y); } + inline ImVec2 GetClipRectMax() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2(cr.z, cr.w); } // Primitives IMGUI_API void AddLine(const ImVec2& a, const ImVec2& b, ImU32 col, float thickness = 1.0f); - IMGUI_API void AddRect(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners_flags = ~0, float thickness = 1.0f); // a: upper-left, b: lower-right, rounding_corners_flags: 4-bits corresponding to which corner to round - IMGUI_API void AddRectFilled(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners_flags = ~0); // a: upper-left, b: lower-right + IMGUI_API void AddRect(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners_flags = ImDrawCornerFlags_All, float thickness = 1.0f); // a: upper-left, b: lower-right, rounding_corners_flags: 4-bits corresponding to which corner to round + IMGUI_API void AddRectFilled(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners_flags = ImDrawCornerFlags_All); // a: upper-left, b: lower-right IMGUI_API void AddRectFilledMultiColor(const ImVec2& a, const ImVec2& b, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left); IMGUI_API void AddQuad(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, ImU32 col, float thickness = 1.0f); IMGUI_API void AddQuadFilled(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, ImU32 col); @@ -1206,21 +1460,23 @@ struct ImDrawList IMGUI_API void AddCircleFilled(const ImVec2& centre, float radius, ImU32 col, int num_segments = 12); IMGUI_API void AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL); IMGUI_API void AddText(const ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL, float wrap_width = 0.0f, const ImVec4* cpu_fine_clip_rect = NULL); - IMGUI_API void AddImage(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& uv0 = ImVec2(0,0), const ImVec2& uv1 = ImVec2(1,1), ImU32 col = 0xFFFFFFFF); - IMGUI_API void AddPolyline(const ImVec2* points, const int num_points, ImU32 col, bool closed, float thickness, bool anti_aliased); - IMGUI_API void AddConvexPolyFilled(const ImVec2* points, const int num_points, ImU32 col, bool anti_aliased); + IMGUI_API void AddImage(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a = ImVec2(0,0), const ImVec2& uv_b = ImVec2(1,1), ImU32 col = 0xFFFFFFFF); + IMGUI_API void AddImageQuad(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a = ImVec2(0,0), const ImVec2& uv_b = ImVec2(1,0), const ImVec2& uv_c = ImVec2(1,1), const ImVec2& uv_d = ImVec2(0,1), ImU32 col = 0xFFFFFFFF); + IMGUI_API void AddImageRounded(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col, float rounding, int rounding_corners = ImDrawCornerFlags_All); + IMGUI_API void AddPolyline(const ImVec2* points, const int num_points, ImU32 col, bool closed, float thickness); + IMGUI_API void AddConvexPolyFilled(const ImVec2* points, const int num_points, ImU32 col); IMGUI_API void AddBezierCurve(const ImVec2& pos0, const ImVec2& cp0, const ImVec2& cp1, const ImVec2& pos1, ImU32 col, float thickness, int num_segments = 0); // Stateful path API, add points then finish with PathFill() or PathStroke() inline void PathClear() { _Path.resize(0); } inline void PathLineTo(const ImVec2& pos) { _Path.push_back(pos); } inline void PathLineToMergeDuplicate(const ImVec2& pos) { if (_Path.Size == 0 || memcmp(&_Path[_Path.Size-1], &pos, 8) != 0) _Path.push_back(pos); } - inline void PathFill(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col, true); PathClear(); } - inline void PathStroke(ImU32 col, bool closed, float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, closed, thickness, true); PathClear(); } + inline void PathFillConvex(ImU32 col) { AddConvexPolyFilled(_Path.Data, _Path.Size, col); PathClear(); } + inline void PathStroke(ImU32 col, bool closed, float thickness = 1.0f) { AddPolyline(_Path.Data, _Path.Size, col, closed, thickness); PathClear(); } IMGUI_API void PathArcTo(const ImVec2& centre, float radius, float a_min, float a_max, int num_segments = 10); IMGUI_API void PathArcToFast(const ImVec2& centre, float radius, int a_min_of_12, int a_max_of_12); // Use precomputed angles for a 12 steps circle IMGUI_API void PathBezierCurveTo(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, int num_segments = 0); - IMGUI_API void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, int rounding_corners_flags = ~0); // rounding_corners_flags: 4-bits corresponding to which corner to round + IMGUI_API void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, int rounding_corners_flags = ImDrawCornerFlags_All); // Channels // - Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives) @@ -1258,41 +1514,51 @@ struct ImDrawData int TotalIdxCount; // For convenience, sum of all cmd_lists idx_buffer.Size // Functions - ImDrawData() { Valid = false; CmdLists = NULL; CmdListsCount = TotalVtxCount = TotalIdxCount = 0; } - IMGUI_API void DeIndexAllBuffers(); // For backward compatibility: convert all buffers from indexed to de-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering! + ImDrawData() { Clear(); } + void Clear() { Valid = false; CmdLists = NULL; CmdListsCount = TotalVtxCount = TotalIdxCount = 0; } // Draw lists are owned by the ImGuiContext and only pointed to here. + IMGUI_API void DeIndexAllBuffers(); // For backward compatibility or convenience: convert all buffers from indexed to de-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering! IMGUI_API void ScaleClipRects(const ImVec2& sc); // Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than ImGui expects, or if there is a difference between your window resolution and framebuffer resolution. }; struct ImFontConfig { - void* FontData; // // TTF data - int FontDataSize; // // TTF data size - bool FontDataOwnedByAtlas; // true // TTF data ownership taken by the container ImFontAtlas (will delete memory itself). Set to true - int FontNo; // 0 // Index of font within TTF file - float SizePixels; // // Size in pixels for rasterizer + void* FontData; // // TTF/OTF data + int FontDataSize; // // TTF/OTF data size + bool FontDataOwnedByAtlas; // true // TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself). + int FontNo; // 0 // Index of font within TTF/OTF file + float SizePixels; // // Size in pixels for rasterizer. int OversampleH, OversampleV; // 3, 1 // Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis. bool PixelSnapH; // false // Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1. - ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs - const ImWchar* GlyphRanges; // // Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. - bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). - bool MergeGlyphCenterV; // false // When merging (multiple ImFontInput for one ImFont), vertically center new glyphs instead of aligning their baseline + ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs. Only X axis is supported for now. + ImVec2 GlyphOffset; // 0, 0 // Offset all glyphs from this font input. + const ImWchar* GlyphRanges; // NULL // Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. + bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights. + unsigned int RasterizerFlags; // 0x00 // Settings for custom font rasterizer (e.g. ImGuiFreeType). Leave as zero if you aren't using one. + float RasterizerMultiply; // 1.0f // Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable. // [Internal] - char Name[32]; // Name (strictly for debugging) + char Name[32]; // Name (strictly to ease debugging) ImFont* DstFont; IMGUI_API ImFontConfig(); }; -// Load and rasterize multiple TTF fonts into a same texture. +struct ImFontGlyph +{ + ImWchar Codepoint; // 0x0000..0xFFFF + float AdvanceX; // Distance to next character (= data from font + ImFontConfig::GlyphExtraSpacing.x baked in) + float X0, Y0, X1, Y1; // Glyph corners + float U0, V0, U1, V1; // Texture coordinates +}; + +// Load and rasterize multiple TTF/OTF fonts into a same texture. // Sharing a texture for multiple fonts allows us to reduce the number of draw calls during rendering. // We also add custom graphic data into the texture that serves for ImGui. // 1. (Optional) Call AddFont*** functions. If you don't call any, the default font will be loaded for you. // 2. Call GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. // 3. Upload the pixels data into a texture within your graphics system. // 4. Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture. This value will be passed back to you during rendering to identify the texture. -// 5. Call ClearTexData() to free textures memory on the heap. -// NB: If you use a 'glyph_ranges' array you need to make sure that your array persist up until the ImFont is cleared. We only copy the pointer, not the data. +// IMPORTANT: If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the ImFont is build (when calling GetTextData*** or Build()). We only copy the pointer, not the data. struct ImFontAtlas { IMGUI_API ImFontAtlas(); @@ -1300,70 +1566,110 @@ struct ImFontAtlas IMGUI_API ImFont* AddFont(const ImFontConfig* font_cfg); IMGUI_API ImFont* AddFontDefault(const ImFontConfig* font_cfg = NULL); IMGUI_API ImFont* AddFontFromFileTTF(const char* filename, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); - IMGUI_API ImFont* AddFontFromMemoryTTF(void* ttf_data, int ttf_size, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // Transfer ownership of 'ttf_data' to ImFontAtlas, will be deleted after Build() - IMGUI_API ImFont* AddFontFromMemoryCompressedTTF(const void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // 'compressed_ttf_data' still owned by caller. Compress with binary_to_compressed_c.cpp - IMGUI_API ImFont* AddFontFromMemoryCompressedBase85TTF(const char* compressed_ttf_data_base85, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // 'compressed_ttf_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with -base85 paramaeter + IMGUI_API ImFont* AddFontFromMemoryTTF(void* font_data, int font_size, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // Note: Transfer ownership of 'ttf_data' to ImFontAtlas! Will be deleted after Build(). Set font_cfg->FontDataOwnedByAtlas to false to keep ownership. + IMGUI_API ImFont* AddFontFromMemoryCompressedTTF(const void* compressed_font_data, int compressed_font_size, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp. + IMGUI_API ImFont* AddFontFromMemoryCompressedBase85TTF(const char* compressed_font_data_base85, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // 'compressed_font_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with -base85 parameter. IMGUI_API void ClearTexData(); // Clear the CPU-side texture data. Saves RAM once the texture has been copied to graphics memory. IMGUI_API void ClearInputData(); // Clear the input TTF data (inc sizes, glyph ranges) IMGUI_API void ClearFonts(); // Clear the ImGui-side font data (glyphs storage, UV coordinates) IMGUI_API void Clear(); // Clear all - // Retrieve texture data - // User is in charge of copying the pixels into graphics memory, then call SetTextureUserID() - // After loading the texture into your graphic system, store your texture handle in 'TexID' (ignore if you aren't using multiple fonts nor images) - // RGBA32 format is provided for convenience and high compatibility, but note that all RGB pixels are white, so 75% of the memory is wasted. + // Build atlas, retrieve pixel data. + // User is in charge of copying the pixels into graphics memory (e.g. create a texture with your engine). Then store your texture handle with SetTexID(). + // RGBA32 format is provided for convenience and compatibility, but note that unless you use CustomRect to draw color data, the RGB pixels emitted from Fonts will all be white (~75% of waste). // Pitch = Width * BytesPerPixels + IMGUI_API bool Build(); // Build pixels data. This is called automatically for you by the GetTexData*** functions. IMGUI_API void GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 1 byte per-pixel IMGUI_API void GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 4 bytes-per-pixel - void SetTexID(void* id) { TexID = id; } + void SetTexID(ImTextureID id) { TexID = id; } + + //------------------------------------------- + // Glyph Ranges + //------------------------------------------- // Helpers to retrieve list of common Unicode ranges (2 value per range, values are inclusive, zero-terminated list) - // NB: Make sure that your string are UTF-8 and NOT in your local code page. See FAQ for details. + // NB: Make sure that your string are UTF-8 and NOT in your local code page. In C++11, you can create UTF-8 string literal using the u8"Hello world" syntax. See FAQ for details. IMGUI_API const ImWchar* GetGlyphRangesDefault(); // Basic Latin, Extended Latin IMGUI_API const ImWchar* GetGlyphRangesKorean(); // Default + Korean characters IMGUI_API const ImWchar* GetGlyphRangesJapanese(); // Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs - IMGUI_API const ImWchar* GetGlyphRangesChinese(); // Japanese + full set of about 21000 CJK Unified Ideographs + IMGUI_API const ImWchar* GetGlyphRangesChinese(); // Default + Japanese + full set of about 21000 CJK Unified Ideographs IMGUI_API const ImWchar* GetGlyphRangesCyrillic(); // Default + about 400 Cyrillic characters IMGUI_API const ImWchar* GetGlyphRangesThai(); // Default + Thai characters + // Helpers to build glyph ranges from text data. Feed your application strings/characters to it then call BuildRanges(). + struct GlyphRangesBuilder + { + ImVector UsedChars; // Store 1-bit per Unicode code point (0=unused, 1=used) + GlyphRangesBuilder() { UsedChars.resize(0x10000 / 8); memset(UsedChars.Data, 0, 0x10000 / 8); } + bool GetBit(int n) { return (UsedChars[n >> 3] & (1 << (n & 7))) != 0; } + void SetBit(int n) { UsedChars[n >> 3] |= 1 << (n & 7); } // Set bit 'c' in the array + void AddChar(ImWchar c) { SetBit(c); } // Add character + IMGUI_API void AddText(const char* text, const char* text_end = NULL); // Add string (each character of the UTF-8 string are added) + IMGUI_API void AddRanges(const ImWchar* ranges); // Add ranges, e.g. builder.AddRanges(ImFontAtlas::GetGlyphRangesDefault) to force add all of ASCII/Latin+Ext + IMGUI_API void BuildRanges(ImVector* out_ranges); // Output new ranges + }; + + //------------------------------------------- + // Custom Rectangles/Glyphs API + //------------------------------------------- + + // You can request arbitrary rectangles to be packed into the atlas, for your own purposes. After calling Build(), you can query the rectangle position and render your pixels. + // You can also request your rectangles to be mapped as font glyph (given a font + Unicode point), so you can render e.g. custom colorful icons and use them as regular glyphs. + struct CustomRect + { + unsigned int ID; // Input // User ID. Use <0x10000 to map into a font glyph, >=0x10000 for other/internal/custom texture data. + unsigned short Width, Height; // Input // Desired rectangle dimension + unsigned short X, Y; // Output // Packed position in Atlas + float GlyphAdvanceX; // Input // For custom font glyphs only (ID<0x10000): glyph xadvance + ImVec2 GlyphOffset; // Input // For custom font glyphs only (ID<0x10000): glyph display offset + ImFont* Font; // Input // For custom font glyphs only (ID<0x10000): target font + CustomRect() { ID = 0xFFFFFFFF; Width = Height = 0; X = Y = 0xFFFF; GlyphAdvanceX = 0.0f; GlyphOffset = ImVec2(0,0); Font = NULL; } + bool IsPacked() const { return X != 0xFFFF; } + }; + + IMGUI_API int AddCustomRectRegular(unsigned int id, int width, int height); // Id needs to be >= 0x10000. Id >= 0x80000000 are reserved for ImGui and ImDrawList + IMGUI_API int AddCustomRectFontGlyph(ImFont* font, ImWchar id, int width, int height, float advance_x, const ImVec2& offset = ImVec2(0,0)); // Id needs to be < 0x10000 to register a rectangle to map into a specific font. + const CustomRect* GetCustomRectByIndex(int index) const { if (index < 0) return NULL; return &CustomRects[index]; } + + // Internals + IMGUI_API void CalcCustomRectUV(const CustomRect* rect, ImVec2* out_uv_min, ImVec2* out_uv_max); + IMGUI_API bool GetMouseCursorTexData(ImGuiMouseCursor cursor, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]); + + //------------------------------------------- // Members - // (Access texture data via GetTexData*() calls which will setup a default font for you.) - void* TexID; // User data to refer to the texture once it has been uploaded to user's graphic systems. It ia passed back to you during rendering. + //------------------------------------------- + + ImTextureID TexID; // User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure. + int TexDesiredWidth; // Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height. + int TexGlyphPadding; // Padding between glyphs within texture in pixels. Defaults to 1. + + // [Internal] + // NB: Access texture data via GetTexData*() calls! Which will setup a default font for you. unsigned char* TexPixelsAlpha8; // 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight unsigned int* TexPixelsRGBA32; // 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4 int TexWidth; // Texture width calculated during Build(). int TexHeight; // Texture height calculated during Build(). - int TexDesiredWidth; // Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height. + ImVec2 TexUvScale; // = (1.0f/TexWidth, 1.0f/TexHeight) ImVec2 TexUvWhitePixel; // Texture coordinates to a white pixel ImVector Fonts; // Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font. - - // Private + ImVector CustomRects; // Rectangles for packing custom texture data into the atlas. ImVector ConfigData; // Internal data - IMGUI_API bool Build(); // Build pixels data. This is automatically for you by the GetTexData*** functions. - IMGUI_API void RenderCustomTexData(int pass, void* rects); + int CustomRectIds[1]; // Identifiers of custom texture rectangle used by ImFontAtlas/ImDrawList }; // Font runtime data and rendering // ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32(). struct ImFont { - struct Glyph - { - ImWchar Codepoint; - float XAdvance; - float X0, Y0, X1, Y1; - float U0, V0, U1, V1; // Texture coordinates - }; - // Members: Hot ~62/78 bytes float FontSize; // // Height of characters, set during loading (don't change after loading) float Scale; // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetFontScale() ImVec2 DisplayOffset; // = (0.f,1.f) // Offset font rendering by xx pixels - ImVector Glyphs; // // All glyphs. - ImVector IndexXAdvance; // // Sparse. Glyphs->XAdvance in a directly indexable way (more cache-friendly, for CalcTextSize functions which are often bottleneck in large UI). + ImVector Glyphs; // // All glyphs. + ImVector IndexAdvanceX; // // Sparse. Glyphs->AdvanceX in a directly indexable way (more cache-friendly, for CalcTextSize functions which are often bottleneck in large UI). ImVector IndexLookup; // // Sparse. Index glyphs by Unicode code-point. - const Glyph* FallbackGlyph; // == FindGlyph(FontFallbackChar) - float FallbackXAdvance; // == FallbackGlyph->XAdvance + const ImFontGlyph* FallbackGlyph; // == FindGlyph(FontFallbackChar) + float FallbackAdvanceX; // == FallbackGlyph->AdvanceX ImWchar FallbackChar; // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar() // Members: Cold ~18/26 bytes @@ -1376,12 +1682,13 @@ struct ImFont // Methods IMGUI_API ImFont(); IMGUI_API ~ImFont(); - IMGUI_API void Clear(); + IMGUI_API void ClearOutputData(); IMGUI_API void BuildLookupTable(); - IMGUI_API const Glyph* FindGlyph(ImWchar c) const; + IMGUI_API const ImFontGlyph*FindGlyph(ImWchar c) const; IMGUI_API void SetFallbackChar(ImWchar c); - float GetCharAdvance(ImWchar c) const { return ((int)c < IndexXAdvance.Size) ? IndexXAdvance[(int)c] : FallbackXAdvance; } + float GetCharAdvance(ImWchar c) const { return ((int)c < IndexAdvanceX.Size) ? IndexAdvanceX[(int)c] : FallbackAdvanceX; } bool IsLoaded() const { return ContainerAtlas != NULL; } + const char* GetDebugName() const { return ConfigData ? ConfigData->Name : ""; } // 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable. // 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable. @@ -1390,9 +1697,14 @@ struct ImFont IMGUI_API void RenderChar(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col, unsigned short c) const; IMGUI_API void RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width = 0.0f, bool cpu_fine_clip = false) const; - // Private + // [Internal] IMGUI_API void GrowIndex(int new_size); + IMGUI_API void AddGlyph(ImWchar c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x); IMGUI_API void AddRemapChar(ImWchar dst, ImWchar src, bool overwrite_dst = true); // Makes 'dst' character/glyph points to 'src' character/glyph. Currently needs to be called AFTER fonts have been built. + +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS + typedef ImFontGlyph Glyph; // OBSOLETE 1.52+ +#endif }; #if defined(__clang__) diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp index d58c6ae..b7c6994 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp @@ -1,9 +1,22 @@ -// dear imgui, v1.50 WIP +// dear imgui, v1.54 WIP // (demo code) -// Don't remove this file from your project! It is useful reference code that you can execute. -// You can call ImGui::ShowTestWindow() in your code to learn about various features of ImGui. -// Everything in this file will be stripped out by the linker if you don't call ImGui::ShowTestWindow(). +// Message to the person tempted to delete this file when integrating ImGui into their code base: +// Don't do it! Do NOT remove this file from your project! It is useful reference code that you and other users will want to refer to. +// Everything in this file will be stripped out by the linker if you don't call ImGui::ShowDemoWindow(). +// During development, you can call ImGui::ShowDemoWindow() in your code to learn about various features of ImGui. Have it wired in a debug menu! +// Removing this file from your project is hindering access to documentation for everyone in your team, likely leading you to poorer usage of the library. +// Note that you can #define IMGUI_DISABLE_DEMO_WINDOWS in imconfig.h for the same effect. +// If you want to link core ImGui in your final builds but not those demo windows, #define IMGUI_DISABLE_DEMO_WINDOWS in imconfig.h and those functions will be empty. +// In other situation, when you have ImGui available you probably want this to be available for reference and execution. +// Thank you, +// -Your beloved friend, imgui_demo.cpp (that you won't delete) + +// Message to beginner C/C++ programmers. About the meaning of 'static': in this demo code, we frequently we use 'static' variables inside functions. +// We do this as a way to gather code and data in the same place, just to make the demo code faster to read, faster to write, and use less code. +// A static variable persist across calls, so it is essentially like a global variable but declared inside the scope of the function. +// It also happens to be a convenient way of storing simple UI related information as long as your function doesn't need to be reentrant or used in threads. +// This might be a pattern you occasionally want to use in your code, but most of the real data you would be editing is likely to be stored outside your function. #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS @@ -13,7 +26,7 @@ #include // toupper, isprint #include // sqrtf, powf, cosf, sinf, floorf, ceilf #include // vsnprintf, sscanf, printf -#include // NULL, malloc, free, qsort, atoi +#include // NULL, malloc, free, atoi #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier #include // intptr_t #else @@ -39,25 +52,28 @@ #pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function #pragma GCC diagnostic ignored "-Wconversion" // warning: conversion to 'xxxx' from 'xxxx' may alter its value #if (__GNUC__ >= 6) -#pragma GCC diagnostic ignored "-Wmisleading-indentation" // warning: this 'if' clause does not guard this statement // GCC 6.0+ only. See #883 on github. +#pragma GCC diagnostic ignored "-Wmisleading-indentation" // warning: this 'if' clause does not guard this statement // GCC 6.0+ only. See #883 on GitHub. #endif #endif -// Play it nice with Windows users. Notepad in 2015 still doesn't display text data with Unix-style \n. +// Play it nice with Windows users. Notepad in 2017 still doesn't display text data with Unix-style \n. #ifdef _WIN32 #define IM_NEWLINE "\r\n" #else #define IM_NEWLINE "\n" #endif -#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR)/sizeof(*_ARR))) #define IM_MAX(_A,_B) (((_A) >= (_B)) ? (_A) : (_B)) //----------------------------------------------------------------------------- // DEMO CODE //----------------------------------------------------------------------------- -#ifndef IMGUI_DISABLE_TEST_WINDOWS +#if !defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS) && defined(IMGUI_DISABLE_TEST_WINDOWS) && !defined(IMGUI_DISABLE_DEMO_WINDOWS) // Obsolete name since 1.53, TEST->DEMO +#define IMGUI_DISABLE_DEMO_WINDOWS +#endif + +#if !defined(IMGUI_DISABLE_DEMO_WINDOWS) static void ShowExampleAppConsole(bool* p_open); static void ShowExampleAppLog(bool* p_open); @@ -67,7 +83,7 @@ static void ShowExampleAppLongText(bool* p_open); static void ShowExampleAppAutoResize(bool* p_open); static void ShowExampleAppConstrainedResize(bool* p_open); static void ShowExampleAppFixedOverlay(bool* p_open); -static void ShowExampleAppManipulatingWindowTitle(bool* p_open); +static void ShowExampleAppWindowTitles(bool* p_open); static void ShowExampleAppCustomRendering(bool* p_open); static void ShowExampleAppMainMenuBar(); static void ShowExampleMenuFile(); @@ -78,7 +94,7 @@ static void ShowHelpMarker(const char* desc) if (ImGui::IsItemHovered()) { ImGui::BeginTooltip(); - ImGui::PushTextWrapPos(450.0f); + ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f); ImGui::TextUnformatted(desc); ImGui::PopTextWrapPos(); ImGui::EndTooltip(); @@ -88,27 +104,27 @@ static void ShowHelpMarker(const char* desc) void ImGui::ShowUserGuide() { ImGui::BulletText("Double-click on title bar to collapse window."); - ImGui::BulletText("Click and drag on lower right corner to resize window."); + ImGui::BulletText("Click and drag on lower right corner to resize window\n(double-click to auto fit window to its contents)."); ImGui::BulletText("Click and drag on any empty space to move window."); - ImGui::BulletText("Mouse Wheel to scroll."); + ImGui::BulletText("TAB/SHIFT+TAB to cycle through keyboard editable fields."); + ImGui::BulletText("CTRL+Click on a slider or drag box to input value as text."); if (ImGui::GetIO().FontAllowUserScaling) ImGui::BulletText("CTRL+Mouse Wheel to zoom window contents."); - ImGui::BulletText("TAB/SHIFT+TAB to cycle through keyboard editable fields."); - ImGui::BulletText("CTRL+Click on a slider or drag box to input text."); - ImGui::BulletText( - "While editing text:\n" - "- Hold SHIFT or use mouse to select text\n" - "- CTRL+Left/Right to word jump\n" - "- CTRL+A or double-click to select all\n" - "- CTRL+X,CTRL+C,CTRL+V clipboard\n" - "- CTRL+Z,CTRL+Y undo/redo\n" - "- ESCAPE to revert\n" - "- You can apply arithmetic operators +,*,/ on numerical values.\n" - " Use +- to subtract.\n"); + ImGui::BulletText("Mouse Wheel to scroll."); + ImGui::BulletText("While editing text:\n"); + ImGui::Indent(); + ImGui::BulletText("Hold SHIFT or use mouse to select text."); + ImGui::BulletText("CTRL+Left/Right to word jump."); + ImGui::BulletText("CTRL+A or double-click to select all."); + ImGui::BulletText("CTRL+X,CTRL+C,CTRL+V to use clipboard."); + ImGui::BulletText("CTRL+Z,CTRL+Y to undo/redo."); + ImGui::BulletText("ESCAPE to revert."); + ImGui::BulletText("You can apply arithmetic operators +,*,/ on numerical values.\nUse +- to subtract."); + ImGui::Unindent(); } // Demonstrate most ImGui features (big function!) -void ImGui::ShowTestWindow(bool* p_open) +void ImGui::ShowDemoWindow(bool* p_open) { // Examples apps static bool show_app_main_menu_bar = false; @@ -120,55 +136,56 @@ void ImGui::ShowTestWindow(bool* p_open) static bool show_app_auto_resize = false; static bool show_app_constrained_resize = false; static bool show_app_fixed_overlay = false; - static bool show_app_manipulating_window_title = false; + static bool show_app_window_titles = false; static bool show_app_custom_rendering = false; static bool show_app_style_editor = false; static bool show_app_metrics = false; static bool show_app_about = false; - if (show_app_main_menu_bar) ShowExampleAppMainMenuBar(); - if (show_app_console) ShowExampleAppConsole(&show_app_console); - if (show_app_log) ShowExampleAppLog(&show_app_log); - if (show_app_layout) ShowExampleAppLayout(&show_app_layout); - if (show_app_property_editor) ShowExampleAppPropertyEditor(&show_app_property_editor); - if (show_app_long_text) ShowExampleAppLongText(&show_app_long_text); - if (show_app_auto_resize) ShowExampleAppAutoResize(&show_app_auto_resize); - if (show_app_constrained_resize) ShowExampleAppConstrainedResize(&show_app_constrained_resize); - if (show_app_fixed_overlay) ShowExampleAppFixedOverlay(&show_app_fixed_overlay); - if (show_app_manipulating_window_title) ShowExampleAppManipulatingWindowTitle(&show_app_manipulating_window_title); - if (show_app_custom_rendering) ShowExampleAppCustomRendering(&show_app_custom_rendering); + if (show_app_main_menu_bar) ShowExampleAppMainMenuBar(); + if (show_app_console) ShowExampleAppConsole(&show_app_console); + if (show_app_log) ShowExampleAppLog(&show_app_log); + if (show_app_layout) ShowExampleAppLayout(&show_app_layout); + if (show_app_property_editor) ShowExampleAppPropertyEditor(&show_app_property_editor); + if (show_app_long_text) ShowExampleAppLongText(&show_app_long_text); + if (show_app_auto_resize) ShowExampleAppAutoResize(&show_app_auto_resize); + if (show_app_constrained_resize) ShowExampleAppConstrainedResize(&show_app_constrained_resize); + if (show_app_fixed_overlay) ShowExampleAppFixedOverlay(&show_app_fixed_overlay); + if (show_app_window_titles) ShowExampleAppWindowTitles(&show_app_window_titles); + if (show_app_custom_rendering) ShowExampleAppCustomRendering(&show_app_custom_rendering); - if (show_app_metrics) ImGui::ShowMetricsWindow(&show_app_metrics); - if (show_app_style_editor) { ImGui::Begin("Style Editor", &show_app_style_editor); ImGui::ShowStyleEditor(); ImGui::End(); } + if (show_app_metrics) { ImGui::ShowMetricsWindow(&show_app_metrics); } + if (show_app_style_editor) { ImGui::Begin("Style Editor", &show_app_style_editor); ImGui::ShowStyleEditor(); ImGui::End(); } if (show_app_about) { - ImGui::Begin("About ImGui", &show_app_about, ImGuiWindowFlags_AlwaysAutoResize); - ImGui::Text("dear imgui, %s", ImGui::GetVersion()); + ImGui::Begin("About Dear ImGui", &show_app_about, ImGuiWindowFlags_AlwaysAutoResize); + ImGui::Text("Dear ImGui, %s", ImGui::GetVersion()); ImGui::Separator(); - ImGui::Text("By Omar Cornut and all github contributors."); - ImGui::Text("ImGui is licensed under the MIT License, see LICENSE for more information."); + ImGui::Text("By Omar Cornut and all dear imgui contributors."); + ImGui::Text("Dear ImGui is licensed under the MIT License, see LICENSE for more information."); ImGui::End(); } static bool no_titlebar = false; - static bool no_border = true; - static bool no_resize = false; - static bool no_move = false; static bool no_scrollbar = false; - static bool no_collapse = false; static bool no_menu = false; + static bool no_move = false; + static bool no_resize = false; + static bool no_collapse = false; + static bool no_close = false; // Demonstrate the various window flags. Typically you would just use the default. ImGuiWindowFlags window_flags = 0; if (no_titlebar) window_flags |= ImGuiWindowFlags_NoTitleBar; - if (!no_border) window_flags |= ImGuiWindowFlags_ShowBorders; - if (no_resize) window_flags |= ImGuiWindowFlags_NoResize; - if (no_move) window_flags |= ImGuiWindowFlags_NoMove; if (no_scrollbar) window_flags |= ImGuiWindowFlags_NoScrollbar; - if (no_collapse) window_flags |= ImGuiWindowFlags_NoCollapse; if (!no_menu) window_flags |= ImGuiWindowFlags_MenuBar; - ImGui::SetNextWindowSize(ImVec2(550,680), ImGuiSetCond_FirstUseEver); + if (no_move) window_flags |= ImGuiWindowFlags_NoMove; + if (no_resize) window_flags |= ImGuiWindowFlags_NoResize; + if (no_collapse) window_flags |= ImGuiWindowFlags_NoCollapse; + if (no_close) p_open = NULL; // Don't pass our bool* to Begin + + ImGui::SetNextWindowSize(ImVec2(550,680), ImGuiCond_FirstUseEver); if (!ImGui::Begin("ImGui Demo", p_open, window_flags)) { // Early out if the window is collapsed, as an optimization. @@ -179,7 +196,7 @@ void ImGui::ShowTestWindow(bool* p_open) //ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.65f); // 2/3 of the space for widget and 1/3 for labels ImGui::PushItemWidth(-140); // Right align, keep 140 pixels for labels - ImGui::Text("Dear ImGui says hello."); + ImGui::Text("dear imgui says hello. (%s)", IMGUI_VERSION); // Menu if (ImGui::BeginMenuBar()) @@ -200,7 +217,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::MenuItem("Auto-resizing window", NULL, &show_app_auto_resize); ImGui::MenuItem("Constrained-resizing window", NULL, &show_app_constrained_resize); ImGui::MenuItem("Simple overlay", NULL, &show_app_fixed_overlay); - ImGui::MenuItem("Manipulating window title", NULL, &show_app_manipulating_window_title); + ImGui::MenuItem("Manipulating window titles", NULL, &show_app_window_titles); ImGui::MenuItem("Custom rendering", NULL, &show_app_custom_rendering); ImGui::EndMenu(); } @@ -208,7 +225,7 @@ void ImGui::ShowTestWindow(bool* p_open) { ImGui::MenuItem("Metrics", NULL, &show_app_metrics); ImGui::MenuItem("Style Editor", NULL, &show_app_style_editor); - ImGui::MenuItem("About ImGui", NULL, &show_app_about); + ImGui::MenuItem("About Dear ImGui", NULL, &show_app_about); ImGui::EndMenu(); } ImGui::EndMenuBar(); @@ -217,19 +234,20 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::Spacing(); if (ImGui::CollapsingHeader("Help")) { - ImGui::TextWrapped("This window is being created by the ShowTestWindow() function. Please refer to the code for programming reference.\n\nUser Guide:"); + ImGui::TextWrapped("This window is being created by the ShowDemoWindow() function. Please refer to the code in imgui_demo.cpp for reference.\n\n"); + ImGui::Text("USER GUIDE:"); ImGui::ShowUserGuide(); } if (ImGui::CollapsingHeader("Window options")) { ImGui::Checkbox("No titlebar", &no_titlebar); ImGui::SameLine(150); - ImGui::Checkbox("No border", &no_border); ImGui::SameLine(300); - ImGui::Checkbox("No resize", &no_resize); - ImGui::Checkbox("No move", &no_move); ImGui::SameLine(150); ImGui::Checkbox("No scrollbar", &no_scrollbar); ImGui::SameLine(300); - ImGui::Checkbox("No collapse", &no_collapse); ImGui::Checkbox("No menu", &no_menu); + ImGui::Checkbox("No move", &no_move); ImGui::SameLine(150); + ImGui::Checkbox("No resize", &no_resize); ImGui::SameLine(300); + ImGui::Checkbox("No collapse", &no_collapse); + ImGui::Checkbox("No close", &no_close); if (ImGui::TreeNode("Style")) { @@ -237,7 +255,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::TreePop(); } - if (ImGui::TreeNode("Logging")) + if (ImGui::TreeNode("Capture/Logging")) { ImGui::TextWrapped("The logging API redirects all text output so you can easily capture the content of a window or a block. Tree nodes can be automatically expanded. You can also call ImGui::LogText() to output directly to the log without a visual output."); ImGui::LogButtons(); @@ -247,6 +265,145 @@ void ImGui::ShowTestWindow(bool* p_open) if (ImGui::CollapsingHeader("Widgets")) { + if (ImGui::TreeNode("Basic")) + { + static int clicked = 0; + if (ImGui::Button("Button")) + clicked++; + if (clicked & 1) + { + ImGui::SameLine(); + ImGui::Text("Thanks for clicking me!"); + } + + static bool check = true; + ImGui::Checkbox("checkbox", &check); + + static int e = 0; + ImGui::RadioButton("radio a", &e, 0); ImGui::SameLine(); + ImGui::RadioButton("radio b", &e, 1); ImGui::SameLine(); + ImGui::RadioButton("radio c", &e, 2); + + // Color buttons, demonstrate using PushID() to add unique identifier in the ID stack, and changing style. + for (int i = 0; i < 7; i++) + { + if (i > 0) ImGui::SameLine(); + ImGui::PushID(i); + ImGui::PushStyleColor(ImGuiCol_Button, (ImVec4)ImColor::HSV(i/7.0f, 0.6f, 0.6f)); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV(i/7.0f, 0.7f, 0.7f)); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV(i/7.0f, 0.8f, 0.8f)); + ImGui::Button("Click"); + ImGui::PopStyleColor(3); + ImGui::PopID(); + } + + ImGui::Text("Hover over me"); + if (ImGui::IsItemHovered()) + ImGui::SetTooltip("I am a tooltip"); + + ImGui::SameLine(); + ImGui::Text("- or me"); + if (ImGui::IsItemHovered()) + { + ImGui::BeginTooltip(); + ImGui::Text("I am a fancy tooltip"); + static float arr[] = { 0.6f, 0.1f, 1.0f, 0.5f, 0.92f, 0.1f, 0.2f }; + ImGui::PlotLines("Curve", arr, IM_ARRAYSIZE(arr)); + ImGui::EndTooltip(); + } + + // Testing ImGuiOnceUponAFrame helper. + //static ImGuiOnceUponAFrame once; + //for (int i = 0; i < 5; i++) + // if (once) + // ImGui::Text("This will be displayed only once."); + + ImGui::Separator(); + + ImGui::LabelText("label", "Value"); + + { + // Simplified one-liner Combo() API, using values packed in a single constant string + static int current_item_1 = 1; + ImGui::Combo("combo", ¤t_item_1, "aaaa\0bbbb\0cccc\0dddd\0eeee\0\0"); + //ImGui::Combo("combo w/ array of char*", ¤t_item_2_idx, items, IM_ARRAYSIZE(items)); // Combo using proper array. You can also pass a callback to retrieve array value, no need to create/copy an array just for that. + + // General BeginCombo() API, you have full control over your selection data and display type + const char* items[] = { "AAAA", "BBBB", "CCCC", "DDDD", "EEEE", "FFFF", "GGGG", "HHHH", "IIII", "JJJJ", "KKKK", "LLLLLLL", "MMMM", "OOOOOOO", "PPPP", "QQQQQQQQQQ", "RRR", "SSSS" }; + static const char* current_item_2 = NULL; + if (ImGui::BeginCombo("combo 2", current_item_2)) // The second parameter is the label previewed before opening the combo. + { + for (int n = 0; n < IM_ARRAYSIZE(items); n++) + { + bool is_selected = (current_item_2 == items[n]); // You can store your selection however you want, outside or inside your objects + if (ImGui::Selectable(items[n], is_selected)) + current_item_2 = items[n]; + if (is_selected) + ImGui::SetItemDefaultFocus(); // Set the initial focus when opening the combo (scrolling + for keyboard navigation support in the upcoming navigation branch) + } + ImGui::EndCombo(); + } + } + + { + static char str0[128] = "Hello, world!"; + static int i0=123; + static float f0=0.001f; + ImGui::InputText("input text", str0, IM_ARRAYSIZE(str0)); + ImGui::SameLine(); ShowHelpMarker("Hold SHIFT or use mouse to select text.\n" "CTRL+Left/Right to word jump.\n" "CTRL+A or double-click to select all.\n" "CTRL+X,CTRL+C,CTRL+V clipboard.\n" "CTRL+Z,CTRL+Y undo/redo.\n" "ESCAPE to revert.\n"); + + ImGui::InputInt("input int", &i0); + ImGui::SameLine(); ShowHelpMarker("You can apply arithmetic operators +,*,/ on numerical values.\n e.g. [ 100 ], input \'*2\', result becomes [ 200 ]\nUse +- to subtract.\n"); + + ImGui::InputFloat("input float", &f0, 0.01f, 1.0f); + + static float vec4a[4] = { 0.10f, 0.20f, 0.30f, 0.44f }; + ImGui::InputFloat3("input float3", vec4a); + } + + { + static int i1=50, i2=42; + ImGui::DragInt("drag int", &i1, 1); + ImGui::SameLine(); ShowHelpMarker("Click and drag to edit value.\nHold SHIFT/ALT for faster/slower edit.\nDouble-click or CTRL+click to input value."); + + ImGui::DragInt("drag int 0..100", &i2, 1, 0, 100, "%.0f%%"); + + static float f1=1.00f, f2=0.0067f; + ImGui::DragFloat("drag float", &f1, 0.005f); + ImGui::DragFloat("drag small float", &f2, 0.0001f, 0.0f, 0.0f, "%.06f ns"); + } + + { + static int i1=0; + ImGui::SliderInt("slider int", &i1, -1, 3); + ImGui::SameLine(); ShowHelpMarker("CTRL+click to input value."); + + static float f1=0.123f, f2=0.0f; + ImGui::SliderFloat("slider float", &f1, 0.0f, 1.0f, "ratio = %.3f"); + ImGui::SliderFloat("slider log float", &f2, -10.0f, 10.0f, "%.4f", 3.0f); + static float angle = 0.0f; + ImGui::SliderAngle("slider angle", &angle); + } + + static float col1[3] = { 1.0f,0.0f,0.2f }; + static float col2[4] = { 0.4f,0.7f,0.0f,0.5f }; + ImGui::ColorEdit3("color 1", col1); + ImGui::SameLine(); ShowHelpMarker("Click on the colored square to open a color picker.\nRight-click on the colored square to show options.\nCTRL+click on individual component to input value.\n"); + + ImGui::ColorEdit4("color 2", col2); + + const char* listbox_items[] = { "Apple", "Banana", "Cherry", "Kiwi", "Mango", "Orange", "Pineapple", "Strawberry", "Watermelon" }; + static int listbox_item_current = 1; + ImGui::ListBox("listbox\n(single select)", &listbox_item_current, listbox_items, IM_ARRAYSIZE(listbox_items), 4); + + //static int listbox_item_current2 = 2; + //ImGui::PushItemWidth(-1); + //ImGui::ListBox("##listbox2", &listbox_item_current2, listbox_items, IM_ARRAYSIZE(listbox_items), 4); + //ImGui::PopItemWidth(); + + ImGui::TreePop(); + } + if (ImGui::TreeNode("Trees")) { if (ImGui::TreeNode("Basic trees")) @@ -256,7 +413,7 @@ void ImGui::ShowTestWindow(bool* p_open) { ImGui::Text("blah blah"); ImGui::SameLine(); - if (ImGui::SmallButton("print")) printf("Child %d pressed", i); + if (ImGui::SmallButton("button")) { }; ImGui::TreePop(); } ImGui::TreePop(); @@ -293,7 +450,8 @@ void ImGui::ShowTestWindow(bool* p_open) else { // Leaf: The only reason we have a TreeNode at all is to allow selection of the leaf. Otherwise we can use BulletText() or TreeAdvanceToLabelPos()+Text(). - ImGui::TreeNodeEx((void*)(intptr_t)i, node_flags | ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen, "Selectable Leaf %d", i); + node_flags |= ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen; // ImGuiTreeNodeFlags_Bullet + ImGui::TreeNodeEx((void*)(intptr_t)i, node_flags, "Selectable Leaf %d", i); if (ImGui::IsItemClicked()) node_clicked = i; } @@ -317,14 +475,16 @@ void ImGui::ShowTestWindow(bool* p_open) if (ImGui::TreeNode("Collapsing Headers")) { static bool closable_group = true; + ImGui::Checkbox("Enable extra group", &closable_group); if (ImGui::CollapsingHeader("Header")) { - ImGui::Checkbox("Enable extra group", &closable_group); + ImGui::Text("IsItemHovered: %d", IsItemHovered()); for (int i = 0; i < 5; i++) ImGui::Text("Some content %d", i); } if (ImGui::CollapsingHeader("Header with a close button", &closable_group)) { + ImGui::Text("IsItemHovered: %d", IsItemHovered()); for (int i = 0; i < 5; i++) ImGui::Text("More content %d", i); } @@ -340,79 +500,95 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::TreePop(); } - if (ImGui::TreeNode("Colored Text")) + if (ImGui::TreeNode("Text")) { - // Using shortcut. You can use PushStyleColor()/PopStyleColor() for more flexibility. - ImGui::TextColored(ImVec4(1.0f,0.0f,1.0f,1.0f), "Pink"); - ImGui::TextColored(ImVec4(1.0f,1.0f,0.0f,1.0f), "Yellow"); - ImGui::TextDisabled("Disabled"); - ImGui::TreePop(); - } + if (ImGui::TreeNode("Colored Text")) + { + // Using shortcut. You can use PushStyleColor()/PopStyleColor() for more flexibility. + ImGui::TextColored(ImVec4(1.0f,0.0f,1.0f,1.0f), "Pink"); + ImGui::TextColored(ImVec4(1.0f,1.0f,0.0f,1.0f), "Yellow"); + ImGui::TextDisabled("Disabled"); + ImGui::SameLine(); ShowHelpMarker("The TextDisabled color is stored in ImGuiStyle."); + ImGui::TreePop(); + } - if (ImGui::TreeNode("Word Wrapping")) - { - // Using shortcut. You can use PushTextWrapPos()/PopTextWrapPos() for more flexibility. - ImGui::TextWrapped("This text should automatically wrap on the edge of the window. The current implementation for text wrapping follows simple rules suitable for English and possibly other languages."); - ImGui::Spacing(); + if (ImGui::TreeNode("Word Wrapping")) + { + // Using shortcut. You can use PushTextWrapPos()/PopTextWrapPos() for more flexibility. + ImGui::TextWrapped("This text should automatically wrap on the edge of the window. The current implementation for text wrapping follows simple rules suitable for English and possibly other languages."); + ImGui::Spacing(); - static float wrap_width = 200.0f; - ImGui::SliderFloat("Wrap width", &wrap_width, -20, 600, "%.0f"); + static float wrap_width = 200.0f; + ImGui::SliderFloat("Wrap width", &wrap_width, -20, 600, "%.0f"); - ImGui::Text("Test paragraph 1:"); - ImVec2 pos = ImGui::GetCursorScreenPos(); - ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(pos.x + wrap_width, pos.y), ImVec2(pos.x + wrap_width + 10, pos.y + ImGui::GetTextLineHeight()), IM_COL32(255,0,255,255)); - ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + wrap_width); - ImGui::Text("The lazy dog is a good dog. This paragraph is made to fit within %.0f pixels. Testing a 1 character word. The quick brown fox jumps over the lazy dog.", wrap_width); - ImGui::GetWindowDrawList()->AddRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), IM_COL32(255,255,0,255)); - ImGui::PopTextWrapPos(); + ImGui::Text("Test paragraph 1:"); + ImVec2 pos = ImGui::GetCursorScreenPos(); + ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(pos.x + wrap_width, pos.y), ImVec2(pos.x + wrap_width + 10, pos.y + ImGui::GetTextLineHeight()), IM_COL32(255,0,255,255)); + ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + wrap_width); + ImGui::Text("The lazy dog is a good dog. This paragraph is made to fit within %.0f pixels. Testing a 1 character word. The quick brown fox jumps over the lazy dog.", wrap_width); + ImGui::GetWindowDrawList()->AddRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), IM_COL32(255,255,0,255)); + ImGui::PopTextWrapPos(); - ImGui::Text("Test paragraph 2:"); - pos = ImGui::GetCursorScreenPos(); - ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(pos.x + wrap_width, pos.y), ImVec2(pos.x + wrap_width + 10, pos.y + ImGui::GetTextLineHeight()), IM_COL32(255,0,255,255)); - ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + wrap_width); - ImGui::Text("aaaaaaaa bbbbbbbb, c cccccccc,dddddddd. d eeeeeeee ffffffff. gggggggg!hhhhhhhh"); - ImGui::GetWindowDrawList()->AddRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), IM_COL32(255,255,0,255)); - ImGui::PopTextWrapPos(); + ImGui::Text("Test paragraph 2:"); + pos = ImGui::GetCursorScreenPos(); + ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(pos.x + wrap_width, pos.y), ImVec2(pos.x + wrap_width + 10, pos.y + ImGui::GetTextLineHeight()), IM_COL32(255,0,255,255)); + ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + wrap_width); + ImGui::Text("aaaaaaaa bbbbbbbb, c cccccccc,dddddddd. d eeeeeeee ffffffff. gggggggg!hhhhhhhh"); + ImGui::GetWindowDrawList()->AddRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), IM_COL32(255,255,0,255)); + ImGui::PopTextWrapPos(); - ImGui::TreePop(); - } + ImGui::TreePop(); + } - if (ImGui::TreeNode("UTF-8 Text")) - { - // UTF-8 test with Japanese characters - // (needs a suitable font, try Arial Unicode or M+ fonts http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/index-en.html) - // Most compiler appears to support UTF-8 in source code (with Visual Studio you need to save your file as 'UTF-8 without signature') - // However for the sake for maximum portability here we are *not* including raw UTF-8 character in this source file, instead we encode the string with hexadecimal constants. - // In your own application be reasonable and use UTF-8 in source or retrieve the data from file system! - // Note that characters values are preserved even if the font cannot be displayed, so you can safely copy & paste garbled characters into another application. - ImGui::TextWrapped("CJK text will only appears if the font was loaded with the appropriate CJK character ranges. Call io.Font->LoadFromFileTTF() manually to load extra character ranges."); - ImGui::Text("Hiragana: \xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x93 (kakikukeko)"); - ImGui::Text("Kanjis: \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e (nihongo)"); - static char buf[32] = "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e"; - ImGui::InputText("UTF-8 input", buf, IM_ARRAYSIZE(buf)); + if (ImGui::TreeNode("UTF-8 Text")) + { + // UTF-8 test with Japanese characters + // (needs a suitable font, try Arial Unicode or M+ fonts http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/index-en.html) + // - From C++11 you can use the u8"my text" syntax to encode literal strings as UTF-8 + // - For earlier compiler, you may be able to encode your sources as UTF-8 (e.g. Visual Studio save your file as 'UTF-8 without signature') + // - HOWEVER, FOR THIS DEMO FILE, BECAUSE WE WANT TO SUPPORT COMPILER, WE ARE *NOT* INCLUDING RAW UTF-8 CHARACTERS IN THIS SOURCE FILE. + // Instead we are encoding a few string with hexadecimal constants. Don't do this in your application! + // Note that characters values are preserved even by InputText() if the font cannot be displayed, so you can safely copy & paste garbled characters into another application. + ImGui::TextWrapped("CJK text will only appears if the font was loaded with the appropriate CJK character ranges. Call io.Font->LoadFromFileTTF() manually to load extra character ranges."); + ImGui::Text("Hiragana: \xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x93 (kakikukeko)"); + ImGui::Text("Kanjis: \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e (nihongo)"); + static char buf[32] = "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e"; // "nihongo" + ImGui::InputText("UTF-8 input", buf, IM_ARRAYSIZE(buf)); + ImGui::TreePop(); + } ImGui::TreePop(); } if (ImGui::TreeNode("Images")) { ImGui::TextWrapped("Below we are displaying the font texture (which is the only texture we have access to in this demo). Use the 'ImTextureID' type as storage to pass pointers or identifier to your own texture data. Hover the texture for a zoomed view!"); - ImVec2 tex_screen_pos = ImGui::GetCursorScreenPos(); - float tex_w = (float)ImGui::GetIO().Fonts->TexWidth; - float tex_h = (float)ImGui::GetIO().Fonts->TexHeight; - ImTextureID tex_id = ImGui::GetIO().Fonts->TexID; - ImGui::Text("%.0fx%.0f", tex_w, tex_h); - ImGui::Image(tex_id, ImVec2(tex_w, tex_h), ImVec2(0,0), ImVec2(1,1), ImColor(255,255,255,255), ImColor(255,255,255,128)); + ImGuiIO& io = ImGui::GetIO(); + + // Here we are grabbing the font texture because that's the only one we have access to inside the demo code. + // Remember that ImTextureID is just storage for whatever you want it to be, it is essentially a value that will be passed to the render function inside the ImDrawCmd structure. + // If you use one of the default imgui_impl_XXXX.cpp renderer, they all have comments at the top of their file to specify what they expect to be stored in ImTextureID. + // (for example, the imgui_impl_dx11.cpp renderer expect a 'ID3D11ShaderResourceView*' pointer. The imgui_impl_glfw_gl3.cpp renderer expect a GLuint OpenGL texture identifier etc.) + // If you decided that ImTextureID = MyEngineTexture*, then you can pass your MyEngineTexture* pointers to ImGui::Image(), and gather width/height through your own functions, etc. + // Using ShowMetricsWindow() as a "debugger" to inspect the draw data that are being passed to your render will help you debug issues if you are confused about this. + // Consider using the lower-level ImDrawList::AddImage() API, via ImGui::GetWindowDrawList()->AddImage(). + ImTextureID my_tex_id = io.Fonts->TexID; + float my_tex_w = (float)io.Fonts->TexWidth; + float my_tex_h = (float)io.Fonts->TexHeight; + + ImGui::Text("%.0fx%.0f", my_tex_w, my_tex_h); + ImVec2 pos = ImGui::GetCursorScreenPos(); + ImGui::Image(my_tex_id, ImVec2(my_tex_w, my_tex_h), ImVec2(0,0), ImVec2(1,1), ImColor(255,255,255,255), ImColor(255,255,255,128)); if (ImGui::IsItemHovered()) { ImGui::BeginTooltip(); float focus_sz = 32.0f; - float focus_x = ImGui::GetMousePos().x - tex_screen_pos.x - focus_sz * 0.5f; if (focus_x < 0.0f) focus_x = 0.0f; else if (focus_x > tex_w - focus_sz) focus_x = tex_w - focus_sz; - float focus_y = ImGui::GetMousePos().y - tex_screen_pos.y - focus_sz * 0.5f; if (focus_y < 0.0f) focus_y = 0.0f; else if (focus_y > tex_h - focus_sz) focus_y = tex_h - focus_sz; + float focus_x = io.MousePos.x - pos.x - focus_sz * 0.5f; if (focus_x < 0.0f) focus_x = 0.0f; else if (focus_x > my_tex_w - focus_sz) focus_x = my_tex_w - focus_sz; + float focus_y = io.MousePos.y - pos.y - focus_sz * 0.5f; if (focus_y < 0.0f) focus_y = 0.0f; else if (focus_y > my_tex_h - focus_sz) focus_y = my_tex_h - focus_sz; ImGui::Text("Min: (%.2f, %.2f)", focus_x, focus_y); ImGui::Text("Max: (%.2f, %.2f)", focus_x + focus_sz, focus_y + focus_sz); - ImVec2 uv0 = ImVec2((focus_x) / tex_w, (focus_y) / tex_h); - ImVec2 uv1 = ImVec2((focus_x + focus_sz) / tex_w, (focus_y + focus_sz) / tex_h); - ImGui::Image(tex_id, ImVec2(128,128), uv0, uv1, ImColor(255,255,255,255), ImColor(255,255,255,128)); + ImVec2 uv0 = ImVec2((focus_x) / my_tex_w, (focus_y) / my_tex_h); + ImVec2 uv1 = ImVec2((focus_x + focus_sz) / my_tex_w, (focus_y + focus_sz) / my_tex_h); + ImGui::Image(my_tex_id, ImVec2(128,128), uv0, uv1, ImColor(255,255,255,255), ImColor(255,255,255,128)); ImGui::EndTooltip(); } ImGui::TextWrapped("And now some textured buttons.."); @@ -421,7 +597,7 @@ void ImGui::ShowTestWindow(bool* p_open) { ImGui::PushID(i); int frame_padding = -1 + i; // -1 = uses default padding - if (ImGui::ImageButton(tex_id, ImVec2(32,32), ImVec2(0,0), ImVec2(32.0f/tex_w,32/tex_h), frame_padding, ImColor(0,0,0,255))) + if (ImGui::ImageButton(my_tex_id, ImVec2(32,32), ImVec2(0,0), ImVec2(32.0f/my_tex_w,32/my_tex_h), frame_padding, ImColor(0,0,0,255))) pressed_count += 1; ImGui::PopID(); ImGui::SameLine(); @@ -433,24 +609,58 @@ void ImGui::ShowTestWindow(bool* p_open) if (ImGui::TreeNode("Selectables")) { + // Selectable() has 2 overloads: + // - The one taking "bool selected" as a read-only selection information. When Selectable() has been clicked is returns true and you can alter selection state accordingly. + // - The one taking "bool* p_selected" as a read-write selection information (convenient in some cases) + // The earlier is more flexible, as in real application your selection may be stored in a different manner (in flags within objects, as an external list, etc). if (ImGui::TreeNode("Basic")) { - static bool selected[4] = { false, true, false, false }; - ImGui::Selectable("1. I am selectable", &selected[0]); - ImGui::Selectable("2. I am selectable", &selected[1]); + static bool selection[5] = { false, true, false, false, false }; + ImGui::Selectable("1. I am selectable", &selection[0]); + ImGui::Selectable("2. I am selectable", &selection[1]); ImGui::Text("3. I am not selectable"); - ImGui::Selectable("4. I am selectable", &selected[2]); - if (ImGui::Selectable("5. I am double clickable", selected[3], ImGuiSelectableFlags_AllowDoubleClick)) + ImGui::Selectable("4. I am selectable", &selection[3]); + if (ImGui::Selectable("5. I am double clickable", selection[4], ImGuiSelectableFlags_AllowDoubleClick)) if (ImGui::IsMouseDoubleClicked(0)) - selected[3] = !selected[3]; + selection[4] = !selection[4]; ImGui::TreePop(); } - if (ImGui::TreeNode("Rendering more text into the same block")) + if (ImGui::TreeNode("Selection State: Single Selection")) { + static int selected = -1; + for (int n = 0; n < 5; n++) + { + char buf[32]; + sprintf(buf, "Object %d", n); + if (ImGui::Selectable(buf, selected == n)) + selected = n; + } + ImGui::TreePop(); + } + if (ImGui::TreeNode("Selection State: Multiple Selection")) + { + ShowHelpMarker("Hold CTRL and click to select multiple items."); + static bool selection[5] = { false, false, false, false, false }; + for (int n = 0; n < 5; n++) + { + char buf[32]; + sprintf(buf, "Object %d", n); + if (ImGui::Selectable(buf, selection[n])) + { + if (!ImGui::GetIO().KeyCtrl) // Clear selection when CTRL is not held + memset(selection, 0, sizeof(selection)); + selection[n] ^= 1; + } + } + ImGui::TreePop(); + } + if (ImGui::TreeNode("Rendering more text into the same line")) + { + // Using the Selectable() override that takes "bool* p_selected" parameter and toggle your booleans automatically. static bool selected[3] = { false, false, false }; - ImGui::Selectable("main.c", &selected[0]); ImGui::SameLine(300); ImGui::Text(" 2,345 bytes"); + ImGui::Selectable("main.c", &selected[0]); ImGui::SameLine(300); ImGui::Text(" 2,345 bytes"); ImGui::Selectable("Hello.cpp", &selected[1]); ImGui::SameLine(300); ImGui::Text("12,345 bytes"); - ImGui::Selectable("Hello.h", &selected[2]); ImGui::SameLine(300); ImGui::Text(" 2,345 bytes"); + ImGui::Selectable("Hello.h", &selected[2]); ImGui::SameLine(300); ImGui::Text(" 2,345 bytes"); ImGui::TreePop(); } if (ImGui::TreeNode("In columns")) @@ -529,143 +739,219 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::TreePop(); } - static bool a=false; - if (ImGui::Button("Button")) { printf("Clicked\n"); a ^= 1; } - if (a) + if (ImGui::TreeNode("Plots widgets")) { - ImGui::SameLine(); - ImGui::Text("Thanks for clicking me!"); - } + static bool animate = true; + ImGui::Checkbox("Animate", &animate); - static bool check = true; - ImGui::Checkbox("checkbox", &check); - - static int e = 0; - ImGui::RadioButton("radio a", &e, 0); ImGui::SameLine(); - ImGui::RadioButton("radio b", &e, 1); ImGui::SameLine(); - ImGui::RadioButton("radio c", &e, 2); - - // Color buttons, demonstrate using PushID() to add unique identifier in the ID stack, and changing style. - for (int i = 0; i < 7; i++) - { - if (i > 0) ImGui::SameLine(); - ImGui::PushID(i); - ImGui::PushStyleColor(ImGuiCol_Button, ImColor::HSV(i/7.0f, 0.6f, 0.6f)); - ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImColor::HSV(i/7.0f, 0.7f, 0.7f)); - ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImColor::HSV(i/7.0f, 0.8f, 0.8f)); - ImGui::Button("Click"); - ImGui::PopStyleColor(3); - ImGui::PopID(); - } - - ImGui::Text("Hover over me"); - if (ImGui::IsItemHovered()) - ImGui::SetTooltip("I am a tooltip"); - - ImGui::SameLine(); - ImGui::Text("- or me"); - if (ImGui::IsItemHovered()) - { - ImGui::BeginTooltip(); - ImGui::Text("I am a fancy tooltip"); static float arr[] = { 0.6f, 0.1f, 1.0f, 0.5f, 0.92f, 0.1f, 0.2f }; - ImGui::PlotLines("Curve", arr, IM_ARRAYSIZE(arr)); - ImGui::EndTooltip(); + ImGui::PlotLines("Frame Times", arr, IM_ARRAYSIZE(arr)); + + // Create a dummy array of contiguous float values to plot + // Tip: If your float aren't contiguous but part of a structure, you can pass a pointer to your first float and the sizeof() of your structure in the Stride parameter. + static float values[90] = { 0 }; + static int values_offset = 0; + static float refresh_time = 0.0f; + if (!animate || refresh_time == 0.0f) + refresh_time = ImGui::GetTime(); + while (refresh_time < ImGui::GetTime()) // Create dummy data at fixed 60 hz rate for the demo + { + static float phase = 0.0f; + values[values_offset] = cosf(phase); + values_offset = (values_offset+1) % IM_ARRAYSIZE(values); + phase += 0.10f*values_offset; + refresh_time += 1.0f/60.0f; + } + ImGui::PlotLines("Lines", values, IM_ARRAYSIZE(values), values_offset, "avg 0.0", -1.0f, 1.0f, ImVec2(0,80)); + ImGui::PlotHistogram("Histogram", arr, IM_ARRAYSIZE(arr), 0, NULL, 0.0f, 1.0f, ImVec2(0,80)); + + // Use functions to generate output + // FIXME: This is rather awkward because current plot API only pass in indices. We probably want an API passing floats and user provide sample rate/count. + struct Funcs + { + static float Sin(void*, int i) { return sinf(i * 0.1f); } + static float Saw(void*, int i) { return (i & 1) ? 1.0f : -1.0f; } + }; + static int func_type = 0, display_count = 70; + ImGui::Separator(); + ImGui::PushItemWidth(100); ImGui::Combo("func", &func_type, "Sin\0Saw\0"); ImGui::PopItemWidth(); + ImGui::SameLine(); + ImGui::SliderInt("Sample count", &display_count, 1, 400); + float (*func)(void*, int) = (func_type == 0) ? Funcs::Sin : Funcs::Saw; + ImGui::PlotLines("Lines", func, NULL, display_count, 0, NULL, -1.0f, 1.0f, ImVec2(0,80)); + ImGui::PlotHistogram("Histogram", func, NULL, display_count, 0, NULL, -1.0f, 1.0f, ImVec2(0,80)); + ImGui::Separator(); + + // Animate a simple progress bar + static float progress = 0.0f, progress_dir = 1.0f; + if (animate) + { + progress += progress_dir * 0.4f * ImGui::GetIO().DeltaTime; + if (progress >= +1.1f) { progress = +1.1f; progress_dir *= -1.0f; } + if (progress <= -0.1f) { progress = -0.1f; progress_dir *= -1.0f; } + } + + // Typically we would use ImVec2(-1.0f,0.0f) to use all available width, or ImVec2(width,0.0f) for a specified width. ImVec2(0.0f,0.0f) uses ItemWidth. + ImGui::ProgressBar(progress, ImVec2(0.0f,0.0f)); + ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x); + ImGui::Text("Progress Bar"); + + float progress_saturated = (progress < 0.0f) ? 0.0f : (progress > 1.0f) ? 1.0f : progress; + char buf[32]; + sprintf(buf, "%d/%d", (int)(progress_saturated*1753), 1753); + ImGui::ProgressBar(progress, ImVec2(0.f,0.f), buf); + ImGui::TreePop(); } - // Testing IMGUI_ONCE_UPON_A_FRAME macro - //for (int i = 0; i < 5; i++) - //{ - // IMGUI_ONCE_UPON_A_FRAME - // { - // ImGui::Text("This will be displayed only once."); - // } - //} - - ImGui::Separator(); - - ImGui::LabelText("label", "Value"); - - static int item = 1; - ImGui::Combo("combo", &item, "aaaa\0bbbb\0cccc\0dddd\0eeee\0\0"); // Combo using values packed in a single constant string (for really quick combo) - - const char* items[] = { "AAAA", "BBBB", "CCCC", "DDDD", "EEEE", "FFFF", "GGGG", "HHHH", "IIII", "JJJJ", "KKKK" }; - static int item2 = -1; - ImGui::Combo("combo scroll", &item2, items, IM_ARRAYSIZE(items)); // Combo using proper array. You can also pass a callback to retrieve array value, no need to create/copy an array just for that. - + if (ImGui::TreeNode("Color/Picker Widgets")) { - static char str0[128] = "Hello, world!"; - static int i0=123; - static float f0=0.001f; - ImGui::InputText("input text", str0, IM_ARRAYSIZE(str0)); - ImGui::SameLine(); ShowHelpMarker("Hold SHIFT or use mouse to select text.\n" "CTRL+Left/Right to word jump.\n" "CTRL+A or double-click to select all.\n" "CTRL+X,CTRL+C,CTRL+V clipboard.\n" "CTRL+Z,CTRL+Y undo/redo.\n" "ESCAPE to revert.\n"); + static ImVec4 color = ImColor(114, 144, 154, 200); - ImGui::InputInt("input int", &i0); - ImGui::SameLine(); ShowHelpMarker("You can apply arithmetic operators +,*,/ on numerical values.\n e.g. [ 100 ], input \'*2\', result becomes [ 200 ]\nUse +- to subtract.\n"); + static bool alpha_preview = true; + static bool alpha_half_preview = false; + static bool options_menu = true; + static bool hdr = false; + ImGui::Checkbox("With Alpha Preview", &alpha_preview); + ImGui::Checkbox("With Half Alpha Preview", &alpha_half_preview); + ImGui::Checkbox("With Options Menu", &options_menu); ImGui::SameLine(); ShowHelpMarker("Right-click on the individual color widget to show options."); + ImGui::Checkbox("With HDR", &hdr); ImGui::SameLine(); ShowHelpMarker("Currently all this does is to lift the 0..1 limits on dragging widgets."); + int misc_flags = (hdr ? ImGuiColorEditFlags_HDR : 0) | (alpha_half_preview ? ImGuiColorEditFlags_AlphaPreviewHalf : (alpha_preview ? ImGuiColorEditFlags_AlphaPreview : 0)) | (options_menu ? 0 : ImGuiColorEditFlags_NoOptions); - ImGui::InputFloat("input float", &f0, 0.01f, 1.0f); + ImGui::Text("Color widget:"); + ImGui::SameLine(); ShowHelpMarker("Click on the colored square to open a color picker.\nCTRL+click on individual component to input value.\n"); + ImGui::ColorEdit3("MyColor##1", (float*)&color, misc_flags); - static float vec4a[4] = { 0.10f, 0.20f, 0.30f, 0.44f }; - ImGui::InputFloat3("input float3", vec4a); + ImGui::Text("Color widget HSV with Alpha:"); + ImGui::ColorEdit4("MyColor##2", (float*)&color, ImGuiColorEditFlags_HSV | misc_flags); + + ImGui::Text("Color widget with Float Display:"); + ImGui::ColorEdit4("MyColor##2f", (float*)&color, ImGuiColorEditFlags_Float | misc_flags); + + ImGui::Text("Color button with Picker:"); + ImGui::SameLine(); ShowHelpMarker("With the ImGuiColorEditFlags_NoInputs flag you can hide all the slider/text inputs.\nWith the ImGuiColorEditFlags_NoLabel flag you can pass a non-empty label which will only be used for the tooltip and picker popup."); + ImGui::ColorEdit4("MyColor##3", (float*)&color, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel | misc_flags); + + ImGui::Text("Color button with Custom Picker Popup:"); + + // Generate a dummy palette + static bool saved_palette_inited = false; + static ImVec4 saved_palette[32]; + if (!saved_palette_inited) + for (int n = 0; n < IM_ARRAYSIZE(saved_palette); n++) + { + ImGui::ColorConvertHSVtoRGB(n / 31.0f, 0.8f, 0.8f, saved_palette[n].x, saved_palette[n].y, saved_palette[n].z); + saved_palette[n].w = 1.0f; // Alpha + } + saved_palette_inited = true; + + static ImVec4 backup_color; + bool open_popup = ImGui::ColorButton("MyColor##3b", color, misc_flags); + ImGui::SameLine(); + open_popup |= ImGui::Button("Palette"); + if (open_popup) + { + ImGui::OpenPopup("mypicker"); + backup_color = color; + } + if (ImGui::BeginPopup("mypicker")) + { + // FIXME: Adding a drag and drop example here would be perfect! + ImGui::Text("MY CUSTOM COLOR PICKER WITH AN AMAZING PALETTE!"); + ImGui::Separator(); + ImGui::ColorPicker4("##picker", (float*)&color, misc_flags | ImGuiColorEditFlags_NoSidePreview | ImGuiColorEditFlags_NoSmallPreview); + ImGui::SameLine(); + ImGui::BeginGroup(); + ImGui::Text("Current"); + ImGui::ColorButton("##current", color, ImGuiColorEditFlags_NoPicker | ImGuiColorEditFlags_AlphaPreviewHalf, ImVec2(60,40)); + ImGui::Text("Previous"); + if (ImGui::ColorButton("##previous", backup_color, ImGuiColorEditFlags_NoPicker | ImGuiColorEditFlags_AlphaPreviewHalf, ImVec2(60,40))) + color = backup_color; + ImGui::Separator(); + ImGui::Text("Palette"); + for (int n = 0; n < IM_ARRAYSIZE(saved_palette); n++) + { + ImGui::PushID(n); + if ((n % 8) != 0) + ImGui::SameLine(0.0f, ImGui::GetStyle().ItemSpacing.y); + if (ImGui::ColorButton("##palette", saved_palette[n], ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoPicker | ImGuiColorEditFlags_NoTooltip, ImVec2(20,20))) + color = ImVec4(saved_palette[n].x, saved_palette[n].y, saved_palette[n].z, color.w); // Preserve alpha! + + if (ImGui::BeginDragDropTarget()) + { + if (const ImGuiPayload* payload = AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_3F)) + memcpy((float*)&saved_palette[n], payload->Data, sizeof(float) * 3); + if (const ImGuiPayload* payload = AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_4F)) + memcpy((float*)&saved_palette[n], payload->Data, sizeof(float) * 4); + EndDragDropTarget(); + } + + ImGui::PopID(); + } + ImGui::EndGroup(); + ImGui::EndPopup(); + } + + ImGui::Text("Color button only:"); + ImGui::ColorButton("MyColor##3c", *(ImVec4*)&color, misc_flags, ImVec2(80,80)); + + ImGui::Text("Color picker:"); + static bool alpha = true; + static bool alpha_bar = true; + static bool side_preview = true; + static bool ref_color = false; + static ImVec4 ref_color_v(1.0f,0.0f,1.0f,0.5f); + static int inputs_mode = 2; + static int picker_mode = 0; + ImGui::Checkbox("With Alpha", &alpha); + ImGui::Checkbox("With Alpha Bar", &alpha_bar); + ImGui::Checkbox("With Side Preview", &side_preview); + if (side_preview) + { + ImGui::SameLine(); + ImGui::Checkbox("With Ref Color", &ref_color); + if (ref_color) + { + ImGui::SameLine(); + ImGui::ColorEdit4("##RefColor", &ref_color_v.x, ImGuiColorEditFlags_NoInputs | misc_flags); + } + } + ImGui::Combo("Inputs Mode", &inputs_mode, "All Inputs\0No Inputs\0RGB Input\0HSV Input\0HEX Input\0"); + ImGui::Combo("Picker Mode", &picker_mode, "Auto/Current\0Hue bar + SV rect\0Hue wheel + SV triangle\0"); + ImGui::SameLine(); ShowHelpMarker("User can right-click the picker to change mode."); + ImGuiColorEditFlags flags = misc_flags; + if (!alpha) flags |= ImGuiColorEditFlags_NoAlpha; // This is by default if you call ColorPicker3() instead of ColorPicker4() + if (alpha_bar) flags |= ImGuiColorEditFlags_AlphaBar; + if (!side_preview) flags |= ImGuiColorEditFlags_NoSidePreview; + if (picker_mode == 1) flags |= ImGuiColorEditFlags_PickerHueBar; + if (picker_mode == 2) flags |= ImGuiColorEditFlags_PickerHueWheel; + if (inputs_mode == 1) flags |= ImGuiColorEditFlags_NoInputs; + if (inputs_mode == 2) flags |= ImGuiColorEditFlags_RGB; + if (inputs_mode == 3) flags |= ImGuiColorEditFlags_HSV; + if (inputs_mode == 4) flags |= ImGuiColorEditFlags_HEX; + ImGui::ColorPicker4("MyColor##4", (float*)&color, flags, ref_color ? &ref_color_v.x : NULL); + + ImGui::Text("Programmatically set defaults/options:"); + ImGui::SameLine(); ShowHelpMarker("SetColorEditOptions() is designed to allow you to set boot-time default.\nWe don't have Push/Pop functions because you can force options on a per-widget basis if needed, and the user can change non-forced ones with the options menu.\nWe don't have a getter to avoid encouraging you to persistently save values that aren't forward-compatible."); + if (ImGui::Button("Uint8 + HSV")) + ImGui::SetColorEditOptions(ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_HSV); + ImGui::SameLine(); + if (ImGui::Button("Float + HDR")) + ImGui::SetColorEditOptions(ImGuiColorEditFlags_Float | ImGuiColorEditFlags_RGB); + + ImGui::TreePop(); } - { - static int i1=50, i2=42; - ImGui::DragInt("drag int", &i1, 1); - ImGui::SameLine(); ShowHelpMarker("Click and drag to edit value.\nHold SHIFT/ALT for faster/slower edit.\nDouble-click or CTRL+click to input value."); - - ImGui::DragInt("drag int 0..100", &i2, 1, 0, 100, "%.0f%%"); - - static float f1=1.00f, f2=0.0067f; - ImGui::DragFloat("drag float", &f1, 0.005f); - ImGui::DragFloat("drag small float", &f2, 0.0001f, 0.0f, 0.0f, "%.06f ns"); - } - - { - static int i1=0; - ImGui::SliderInt("slider int", &i1, -1, 3); - ImGui::SameLine(); ShowHelpMarker("CTRL+click to input value."); - - static float f1=0.123f, f2=0.0f; - ImGui::SliderFloat("slider float", &f1, 0.0f, 1.0f, "ratio = %.3f"); - ImGui::SliderFloat("slider log float", &f2, -10.0f, 10.0f, "%.4f", 3.0f); - static float angle = 0.0f; - ImGui::SliderAngle("slider angle", &angle); - } - - static float col1[3] = { 1.0f,0.0f,0.2f }; - static float col2[4] = { 0.4f,0.7f,0.0f,0.5f }; - ImGui::ColorEdit3("color 1", col1); - ImGui::SameLine(); ShowHelpMarker("Click on the colored square to change edit mode.\nCTRL+click on individual component to input value.\n"); - - ImGui::ColorEdit4("color 2", col2); - - const char* listbox_items[] = { "Apple", "Banana", "Cherry", "Kiwi", "Mango", "Orange", "Pineapple", "Strawberry", "Watermelon" }; - static int listbox_item_current = 1; - ImGui::ListBox("listbox\n(single select)", &listbox_item_current, listbox_items, IM_ARRAYSIZE(listbox_items), 4); - - //static int listbox_item_current2 = 2; - //ImGui::PushItemWidth(-1); - //ImGui::ListBox("##listbox2", &listbox_item_current2, listbox_items, IM_ARRAYSIZE(listbox_items), 4); - //ImGui::PopItemWidth(); - if (ImGui::TreeNode("Range Widgets")) { - ImGui::Unindent(); - static float begin = 10, end = 90; static int begin_i = 100, end_i = 1000; ImGui::DragFloatRange2("range", &begin, &end, 0.25f, 0.0f, 100.0f, "Min: %.1f %%", "Max: %.1f %%"); ImGui::DragIntRange2("range int (no bounds)", &begin_i, &end_i, 5, 0, 0, "Min: %.0f units", "Max: %.0f units"); - - ImGui::Indent(); ImGui::TreePop(); } if (ImGui::TreeNode("Multi-component Widgets")) { - ImGui::Unindent(); - static float vec4f[4] = { 0.10f, 0.20f, 0.30f, 0.44f }; static int vec4i[4] = { 1, 5, 100, 255 }; @@ -692,13 +978,11 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::DragInt4("drag int4", vec4i, 1, 0, 255); ImGui::SliderInt4("slider int4", vec4i, 0, 255); - ImGui::Indent(); ImGui::TreePop(); } if (ImGui::TreeNode("Vertical Sliders")) { - ImGui::Unindent(); const float spacing = 4; ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(spacing, spacing)); @@ -712,10 +996,10 @@ void ImGui::ShowTestWindow(bool* p_open) { if (i > 0) ImGui::SameLine(); ImGui::PushID(i); - ImGui::PushStyleColor(ImGuiCol_FrameBg, ImColor::HSV(i/7.0f, 0.5f, 0.5f)); - ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, ImColor::HSV(i/7.0f, 0.6f, 0.5f)); - ImGui::PushStyleColor(ImGuiCol_FrameBgActive, ImColor::HSV(i/7.0f, 0.7f, 0.5f)); - ImGui::PushStyleColor(ImGuiCol_SliderGrab, ImColor::HSV(i/7.0f, 0.9f, 0.9f)); + ImGui::PushStyleColor(ImGuiCol_FrameBg, (ImVec4)ImColor::HSV(i/7.0f, 0.5f, 0.5f)); + ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, (ImVec4)ImColor::HSV(i/7.0f, 0.6f, 0.5f)); + ImGui::PushStyleColor(ImGuiCol_FrameBgActive, (ImVec4)ImColor::HSV(i/7.0f, 0.7f, 0.5f)); + ImGui::PushStyleColor(ImGuiCol_SliderGrab, (ImVec4)ImColor::HSV(i/7.0f, 0.9f, 0.9f)); ImGui::VSliderFloat("##v", ImVec2(18,160), &values[i], 0.0f, 1.0f, ""); if (ImGui::IsItemActive() || ImGui::IsItemHovered()) ImGui::SetTooltip("%.3f", values[i]); @@ -758,113 +1042,67 @@ void ImGui::ShowTestWindow(bool* p_open) } ImGui::PopID(); ImGui::PopStyleVar(); - - ImGui::Indent(); ImGui::TreePop(); } } - if (ImGui::CollapsingHeader("Graphs widgets")) - { - static bool animate = true; - ImGui::Checkbox("Animate", &animate); - - static float arr[] = { 0.6f, 0.1f, 1.0f, 0.5f, 0.92f, 0.1f, 0.2f }; - ImGui::PlotLines("Frame Times", arr, IM_ARRAYSIZE(arr)); - - // Create a dummy array of contiguous float values to plot - // Tip: If your float aren't contiguous but part of a structure, you can pass a pointer to your first float and the sizeof() of your structure in the Stride parameter. - static float values[90] = { 0 }; - static int values_offset = 0; - if (animate) - { - static float refresh_time = ImGui::GetTime(); // Create dummy data at fixed 60 hz rate for the demo - for (; ImGui::GetTime() > refresh_time + 1.0f/60.0f; refresh_time += 1.0f/60.0f) - { - static float phase = 0.0f; - values[values_offset] = cosf(phase); - values_offset = (values_offset+1) % IM_ARRAYSIZE(values); - phase += 0.10f*values_offset; - } - } - ImGui::PlotLines("Lines", values, IM_ARRAYSIZE(values), values_offset, "avg 0.0", -1.0f, 1.0f, ImVec2(0,80)); - ImGui::PlotHistogram("Histogram", arr, IM_ARRAYSIZE(arr), 0, NULL, 0.0f, 1.0f, ImVec2(0,80)); - - // Use functions to generate output - // FIXME: This is rather awkward because current plot API only pass in indices. We probably want an API passing floats and user provide sample rate/count. - struct Funcs - { - static float Sin(void*, int i) { return sinf(i * 0.1f); } - static float Saw(void*, int i) { return (i & 1) ? 1.0f : 0.0f; } - }; - static int func_type = 0, display_count = 70; - ImGui::Separator(); - ImGui::PushItemWidth(100); ImGui::Combo("func", &func_type, "Sin\0Saw\0"); ImGui::PopItemWidth(); - ImGui::SameLine(); - ImGui::SliderInt("Sample count", &display_count, 1, 400); - float (*func)(void*, int) = (func_type == 0) ? Funcs::Sin : Funcs::Saw; - ImGui::PlotLines("Lines", func, NULL, display_count, 0, NULL, -1.0f, 1.0f, ImVec2(0,80)); - ImGui::PlotHistogram("Histogram", func, NULL, display_count, 0, NULL, -1.0f, 1.0f, ImVec2(0,80)); - ImGui::Separator(); - - // Animate a simple progress bar - static float progress = 0.0f, progress_dir = 1.0f; - if (animate) - { - progress += progress_dir * 0.4f * ImGui::GetIO().DeltaTime; - if (progress >= +1.1f) { progress = +1.1f; progress_dir *= -1.0f; } - if (progress <= -0.1f) { progress = -0.1f; progress_dir *= -1.0f; } - } - - // Typically we would use ImVec2(-1.0f,0.0f) to use all available width, or ImVec2(width,0.0f) for a specified width. ImVec2(0.0f,0.0f) uses ItemWidth. - ImGui::ProgressBar(progress, ImVec2(0.0f,0.0f)); - ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x); - ImGui::Text("Progress Bar"); - - float progress_saturated = (progress < 0.0f) ? 0.0f : (progress > 1.0f) ? 1.0f : progress; - char buf[32]; - sprintf(buf, "%d/%d", (int)(progress_saturated*1753), 1753); - ImGui::ProgressBar(progress, ImVec2(0.f,0.f), buf); - } - if (ImGui::CollapsingHeader("Layout")) { if (ImGui::TreeNode("Child regions")) { - ImGui::Text("Without border"); + static bool disable_mouse_wheel = false; + static bool disable_menu = false; + ImGui::Checkbox("Disable Mouse Wheel", &disable_mouse_wheel); + ImGui::Checkbox("Disable Menu", &disable_menu); + static int line = 50; bool goto_line = ImGui::Button("Goto"); ImGui::SameLine(); ImGui::PushItemWidth(100); goto_line |= ImGui::InputInt("##Line", &line, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue); ImGui::PopItemWidth(); - ImGui::BeginChild("Sub1", ImVec2(ImGui::GetWindowContentRegionWidth() * 0.5f,300), false, ImGuiWindowFlags_HorizontalScrollbar); - for (int i = 0; i < 100; i++) + + // Child 1: no border, enable horizontal scrollbar { - ImGui::Text("%04d: scrollable region", i); - if (goto_line && line == i) + ImGui::BeginChild("Child1", ImVec2(ImGui::GetWindowContentRegionWidth() * 0.5f, 300), false, ImGuiWindowFlags_HorizontalScrollbar | (disable_mouse_wheel ? ImGuiWindowFlags_NoScrollWithMouse : 0)); + for (int i = 0; i < 100; i++) + { + ImGui::Text("%04d: scrollable region", i); + if (goto_line && line == i) + ImGui::SetScrollHere(); + } + if (goto_line && line >= 100) ImGui::SetScrollHere(); + ImGui::EndChild(); } - if (goto_line && line >= 100) - ImGui::SetScrollHere(); - ImGui::EndChild(); ImGui::SameLine(); - ImGui::PushStyleVar(ImGuiStyleVar_ChildWindowRounding, 5.0f); - ImGui::BeginChild("Sub2", ImVec2(0,300), true); - ImGui::Text("With border"); - ImGui::Columns(2); - for (int i = 0; i < 100; i++) + // Child 2: rounded border { - if (i == 50) - ImGui::NextColumn(); - char buf[32]; - sprintf(buf, "%08x", i*5731); - ImGui::Button(buf, ImVec2(-1.0f, 0.0f)); + ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 5.0f); + ImGui::BeginChild("Child2", ImVec2(0,300), true, (disable_mouse_wheel ? ImGuiWindowFlags_NoScrollWithMouse : 0) | (disable_menu ? 0 : ImGuiWindowFlags_MenuBar)); + if (!disable_menu && ImGui::BeginMenuBar()) + { + if (ImGui::BeginMenu("Menu")) + { + ShowExampleMenuFile(); + ImGui::EndMenu(); + } + ImGui::EndMenuBar(); + } + ImGui::Columns(2); + for (int i = 0; i < 100; i++) + { + if (i == 50) + ImGui::NextColumn(); + char buf[32]; + sprintf(buf, "%08x", i*5731); + ImGui::Button(buf, ImVec2(-1.0f, 0.0f)); + } + ImGui::EndChild(); + ImGui::PopStyleVar(); } - ImGui::EndChild(); - ImGui::PopStyleVar(); ImGui::TreePop(); } @@ -918,7 +1156,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::TextColored(ImVec4(1,1,0,1), "Sailor"); // Button - ImGui::AlignFirstTextHeightToWidgets(); + ImGui::AlignTextToFramePadding(); ImGui::Text("Normal buttons"); ImGui::SameLine(); ImGui::Button("Banana"); ImGui::SameLine(); ImGui::Button("Apple"); ImGui::SameLine(); @@ -991,11 +1229,11 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::Button("CCC"); ImGui::Button("DDD"); ImGui::EndGroup(); - if (ImGui::IsItemHovered()) - ImGui::SetTooltip("Group hovered"); ImGui::SameLine(); ImGui::Button("EEE"); ImGui::EndGroup(); + if (ImGui::IsItemHovered()) + ImGui::SetTooltip("First group hovered"); } // Capture the group size and create widgets using the same size ImVec2 size = ImGui::GetItemRectSize(); @@ -1044,11 +1282,12 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::Text("TEST"); ImGui::SameLine(); ImGui::SmallButton("TEST##2"); - ImGui::AlignFirstTextHeightToWidgets(); // If your line starts with text, call this to align it to upcoming widgets. + ImGui::AlignTextToFramePadding(); // If your line starts with text, call this to align it to upcoming widgets. ImGui::Text("Text aligned to Widget"); ImGui::SameLine(); ImGui::Button("Widget##1"); ImGui::SameLine(); ImGui::Text("Widget"); ImGui::SameLine(); - ImGui::SmallButton("Widget##2"); + ImGui::SmallButton("Widget##2"); ImGui::SameLine(); + ImGui::Button("Widget##3"); // Tree const float spacing = ImGui::GetStyle().ItemInnerSpacing.x; @@ -1056,7 +1295,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::SameLine(0.0f, spacing); if (ImGui::TreeNode("Node##1")) { for (int i = 0; i < 6; i++) ImGui::BulletText("Item %d..", i); ImGui::TreePop(); } // Dummy tree data - ImGui::AlignFirstTextHeightToWidgets(); // Vertically align text node a bit lower so it'll be vertically centered with upcoming widget. Otherwise you can use SmallButton (smaller fit). + ImGui::AlignTextToFramePadding(); // Vertically align text node a bit lower so it'll be vertically centered with upcoming widget. Otherwise you can use SmallButton (smaller fit). bool node_open = ImGui::TreeNode("Node##2"); // Common mistake to avoid: if we want to SameLine after TreeNode we need to do it before we add child content. ImGui::SameLine(0.0f, spacing); ImGui::Button("Button##2"); if (node_open) { for (int i = 0; i < 6; i++) ImGui::BulletText("Item %d..", i); ImGui::TreePop(); } // Dummy tree data @@ -1066,7 +1305,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::SameLine(0.0f, spacing); ImGui::BulletText("Bullet text"); - ImGui::AlignFirstTextHeightToWidgets(); + ImGui::AlignTextToFramePadding(); ImGui::BulletText("Node"); ImGui::SameLine(0.0f, spacing); ImGui::Button("Button##4"); @@ -1080,9 +1319,9 @@ void ImGui::ShowTestWindow(bool* p_open) static int track_line = 50, scroll_to_px = 200; ImGui::Checkbox("Track", &track); ImGui::PushItemWidth(100); - ImGui::SameLine(130); track |= ImGui::DragInt("##line", &track_line, 0.25f, 0, 99, "Line %.0f"); - bool scroll_to = ImGui::Button("Scroll To"); - ImGui::SameLine(130); scroll_to |= ImGui::DragInt("##pos_y", &scroll_to_px, 1.00f, 0, 9999, "y = %.0f px"); + ImGui::SameLine(130); track |= ImGui::DragInt("##line", &track_line, 0.25f, 0, 99, "Line = %.0f"); + bool scroll_to = ImGui::Button("Scroll To Pos"); + ImGui::SameLine(130); scroll_to |= ImGui::DragInt("##pos_y", &scroll_to_px, 1.00f, 0, 9999, "Y = %.0f px"); ImGui::PopItemWidth(); if (scroll_to) track = false; @@ -1106,7 +1345,9 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::Text("Line %d", line); } } + float scroll_y = ImGui::GetScrollY(), scroll_max_y = ImGui::GetScrollMaxY(); ImGui::EndChild(); + ImGui::Text("%.0f/%0.f", scroll_y, scroll_max_y); ImGui::EndGroup(); } ImGui::TreePop(); @@ -1120,7 +1361,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::SliderInt("Lines", &lines, 1, 15); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 3.0f); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2.0f, 1.0f)); - ImGui::BeginChild("scrolling", ImVec2(0, ImGui::GetItemsLineHeightWithSpacing()*7 + 30), true, ImGuiWindowFlags_HorizontalScrollbar); + ImGui::BeginChild("scrolling", ImVec2(0, ImGui::GetFrameHeightWithSpacing()*7 + 30), true, ImGuiWindowFlags_HorizontalScrollbar); for (int line = 0; line < lines; line++) { // Display random stuff (for the sake of this trivial demo we are using basic Button+SameLine. If you want to create your own time line for a real application you may be better off @@ -1131,22 +1372,25 @@ void ImGui::ShowTestWindow(bool* p_open) if (n > 0) ImGui::SameLine(); ImGui::PushID(n + line * 1000); char num_buf[16]; - const char* label = (!(n%15)) ? "FizzBuzz" : (!(n%3)) ? "Fizz" : (!(n%5)) ? "Buzz" : (sprintf(num_buf, "%d", n), num_buf); + sprintf(num_buf, "%d", n); + const char* label = (!(n%15)) ? "FizzBuzz" : (!(n%3)) ? "Fizz" : (!(n%5)) ? "Buzz" : num_buf; float hue = n*0.05f; - ImGui::PushStyleColor(ImGuiCol_Button, ImColor::HSV(hue, 0.6f, 0.6f)); - ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImColor::HSV(hue, 0.7f, 0.7f)); - ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImColor::HSV(hue, 0.8f, 0.8f)); + ImGui::PushStyleColor(ImGuiCol_Button, (ImVec4)ImColor::HSV(hue, 0.6f, 0.6f)); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, (ImVec4)ImColor::HSV(hue, 0.7f, 0.7f)); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, (ImVec4)ImColor::HSV(hue, 0.8f, 0.8f)); ImGui::Button(label, ImVec2(40.0f + sinf((float)(line + n)) * 20.0f, 0.0f)); ImGui::PopStyleColor(3); ImGui::PopID(); } } + float scroll_x = ImGui::GetScrollX(), scroll_max_x = ImGui::GetScrollMaxX(); ImGui::EndChild(); ImGui::PopStyleVar(2); float scroll_x_delta = 0.0f; - ImGui::SmallButton("<<"); if (ImGui::IsItemActive()) scroll_x_delta = -ImGui::GetIO().DeltaTime * 1000.0f; - ImGui::SameLine(); ImGui::Text("Scroll from code"); ImGui::SameLine(); - ImGui::SmallButton(">>"); if (ImGui::IsItemActive()) scroll_x_delta = +ImGui::GetIO().DeltaTime * 1000.0f; + ImGui::SmallButton("<<"); if (ImGui::IsItemActive()) scroll_x_delta = -ImGui::GetIO().DeltaTime * 1000.0f; ImGui::SameLine(); + ImGui::Text("Scroll from code"); ImGui::SameLine(); + ImGui::SmallButton(">>"); if (ImGui::IsItemActive()) scroll_x_delta = +ImGui::GetIO().DeltaTime * 1000.0f; ImGui::SameLine(); + ImGui::Text("%.0f/%.0f", scroll_x, scroll_max_x); if (scroll_x_delta != 0.0f) { ImGui::BeginChild("scrolling"); // Demonstrate a trick: you can use Begin to set yourself in the context of another window (here we are already out of your child window) @@ -1166,8 +1410,8 @@ void ImGui::ShowTestWindow(bool* p_open) ImVec4 clip_rect(pos.x, pos.y, pos.x+size.x, pos.y+size.y); ImGui::InvisibleButton("##dummy", size); if (ImGui::IsItemActive() && ImGui::IsMouseDragging()) { offset.x += ImGui::GetIO().MouseDelta.x; offset.y += ImGui::GetIO().MouseDelta.y; } - ImGui::GetWindowDrawList()->AddRectFilled(pos, ImVec2(pos.x+size.x,pos.y+size.y), ImColor(90,90,120,255)); - ImGui::GetWindowDrawList()->AddText(ImGui::GetFont(), ImGui::GetFontSize()*2.0f, ImVec2(pos.x+offset.x,pos.y+offset.y), ImColor(255,255,255,255), "Line 1 hello\nLine 2 clip me!", NULL, 0.0f, &clip_rect); + ImGui::GetWindowDrawList()->AddRectFilled(pos, ImVec2(pos.x+size.x,pos.y+size.y), IM_COL32(90,90,120,255)); + ImGui::GetWindowDrawList()->AddText(ImGui::GetFont(), ImGui::GetFontSize()*2.0f, ImVec2(pos.x+offset.x,pos.y+offset.y), IM_COL32(255,255,255,255), "Line 1 hello\nLine 2 clip me!", NULL, 0.0f, &clip_rect); ImGui::TreePop(); } } @@ -1187,7 +1431,7 @@ void ImGui::ShowTestWindow(bool* p_open) if (ImGui::Button("Select..")) ImGui::OpenPopup("select"); ImGui::SameLine(); - ImGui::Text(selected_fish == -1 ? "" : names[selected_fish]); + ImGui::TextUnformatted(selected_fish == -1 ? "" : names[selected_fish]); if (ImGui::BeginPopup("select")) { ImGui::Text("Aquarium"); @@ -1240,42 +1484,35 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::EndPopup(); } - ImGui::Spacing(); - ImGui::TextWrapped("Below we are testing adding menu items to a regular window. It's rather unusual but should work!"); - ImGui::Separator(); - // NB: As a quirk in this very specific example, we want to differentiate the parent of this menu from the parent of the various popup menus above. - // To do so we are encloding the items in a PushID()/PopID() block to make them two different menusets. If we don't, opening any popup above and hovering our menu here - // would open it. This is because once a menu is active, we allow to switch to a sibling menu by just hovering on it, which is the desired behavior for regular menus. - ImGui::PushID("foo"); - ImGui::MenuItem("Menu item", "CTRL+M"); - if (ImGui::BeginMenu("Menu inside a regular window")) - { - ShowExampleMenuFile(); - ImGui::EndMenu(); - } - ImGui::PopID(); - ImGui::Separator(); - ImGui::TreePop(); } if (ImGui::TreeNode("Context menus")) { + // BeginPopupContextItem() is a helper to provide common/simple popup behavior of essentially doing: + // if (IsItemHovered() && IsMouseClicked(0)) + // OpenPopup(id); + // return BeginPopup(id); + // For more advanced uses you may want to replicate and cuztomize this code. This the comments inside BeginPopupContextItem() implementation. static float value = 0.5f; ImGui::Text("Value = %.3f (<-- right-click here)", value); if (ImGui::BeginPopupContextItem("item context menu")) { if (ImGui::Selectable("Set to zero")) value = 0.0f; if (ImGui::Selectable("Set to PI")) value = 3.1415f; + ImGui::PushItemWidth(-1); + ImGui::DragFloat("##Value", &value, 0.1f, 0.0f, 0.0f); + ImGui::PopItemWidth(); ImGui::EndPopup(); } - static ImVec4 color = ImColor(0.8f, 0.5f, 1.0f, 1.0f); - ImGui::ColorButton(color); - if (ImGui::BeginPopupContextItem("color context menu")) + static char name[32] = "Label1"; + char buf[64]; sprintf(buf, "Button: %s###Button", name); // ### operator override ID ignoring the preceding label + ImGui::Button(buf); + if (ImGui::BeginPopupContextItem()) // When used after an item that has an ID (here the Button), we can skip providing an ID to BeginPopupContextItem(). { - ImGui::Text("Edit color"); - ImGui::ColorEdit3("##edit", (float*)&color); + ImGui::Text("Edit name:"); + ImGui::InputText("##edit", name, IM_ARRAYSIZE(name)); if (ImGui::Button("Close")) ImGui::CloseCurrentPopup(); ImGui::EndPopup(); @@ -1293,7 +1530,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::OpenPopup("Delete?"); if (ImGui::BeginPopupModal("Delete?", NULL, ImGuiWindowFlags_AlwaysAutoResize)) { - ImGui::Text("All those beautiful files will be deleted.\nThis operation cannot be undone!\n\n"); + ImGui::Text("All those beautiful files will be deleted.\nThis operation cannot be undone!\n\n"); ImGui::Separator(); //static int dummy_i = 0; @@ -1314,13 +1551,17 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::OpenPopup("Stacked 1"); if (ImGui::BeginPopupModal("Stacked 1")) { - ImGui::Text("Hello from Stacked The First"); + ImGui::Text("Hello from Stacked The First\nUsing style.Colors[ImGuiCol_ModalWindowDarkening] for darkening."); + static int item = 1; + ImGui::Combo("Combo", &item, "aaaa\0bbbb\0cccc\0dddd\0eeee\0\0"); + static float color[4] = { 0.4f,0.7f,0.0f,0.5f }; + ImGui::ColorEdit4("color", color); // This is to test behavior of stacked regular popups over a modal - if (ImGui::Button("Another one..")) + if (ImGui::Button("Add another modal..")) ImGui::OpenPopup("Stacked 2"); if (ImGui::BeginPopupModal("Stacked 2")) { - ImGui::Text("Hello from Stacked The Second"); + ImGui::Text("Hello from Stacked The Second!"); if (ImGui::Button("Close")) ImGui::CloseCurrentPopup(); ImGui::EndPopup(); @@ -1333,10 +1574,31 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::TreePop(); } + + if (ImGui::TreeNode("Menus inside a regular window")) + { + ImGui::TextWrapped("Below we are testing adding menu items to a regular window. It's rather unusual but should work!"); + ImGui::Separator(); + // NB: As a quirk in this very specific example, we want to differentiate the parent of this menu from the parent of the various popup menus above. + // To do so we are encloding the items in a PushID()/PopID() block to make them two different menusets. If we don't, opening any popup above and hovering our menu here + // would open it. This is because once a menu is active, we allow to switch to a sibling menu by just hovering on it, which is the desired behavior for regular menus. + ImGui::PushID("foo"); + ImGui::MenuItem("Menu item", "CTRL+M"); + if (ImGui::BeginMenu("Menu inside a regular window")) + { + ShowExampleMenuFile(); + ImGui::EndMenu(); + } + ImGui::PopID(); + ImGui::Separator(); + ImGui::TreePop(); + } } if (ImGui::CollapsingHeader("Columns")) { + ImGui::PushID("Columns"); + // Basic columns if (ImGui::TreeNode("Basic")) { @@ -1360,7 +1622,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::Text("ID"); ImGui::NextColumn(); ImGui::Text("Name"); ImGui::NextColumn(); ImGui::Text("Path"); ImGui::NextColumn(); - ImGui::Text("Flags"); ImGui::NextColumn(); + ImGui::Text("Hovered"); ImGui::NextColumn(); ImGui::Separator(); const char* names[3] = { "One", "Two", "Three" }; const char* paths[3] = { "/path/one", "/path/two", "/path/three" }; @@ -1371,42 +1633,17 @@ void ImGui::ShowTestWindow(bool* p_open) sprintf(label, "%04d", i); if (ImGui::Selectable(label, selected == i, ImGuiSelectableFlags_SpanAllColumns)) selected = i; + bool hovered = ImGui::IsItemHovered(); ImGui::NextColumn(); ImGui::Text(names[i]); ImGui::NextColumn(); ImGui::Text(paths[i]); ImGui::NextColumn(); - ImGui::Text("...."); ImGui::NextColumn(); + ImGui::Text("%d", hovered); ImGui::NextColumn(); } ImGui::Columns(1); ImGui::Separator(); ImGui::TreePop(); } - // Scrolling columns - /* - if (ImGui::TreeNode("Scrolling")) - { - ImGui::BeginChild("##header", ImVec2(0, ImGui::GetTextLineHeightWithSpacing()+ImGui::GetStyle().ItemSpacing.y)); - ImGui::Columns(3); - ImGui::Text("ID"); ImGui::NextColumn(); - ImGui::Text("Name"); ImGui::NextColumn(); - ImGui::Text("Path"); ImGui::NextColumn(); - ImGui::Columns(1); - ImGui::Separator(); - ImGui::EndChild(); - ImGui::BeginChild("##scrollingregion", ImVec2(0, 60)); - ImGui::Columns(3); - for (int i = 0; i < 10; i++) - { - ImGui::Text("%04d", i); ImGui::NextColumn(); - ImGui::Text("Foobar"); ImGui::NextColumn(); - ImGui::Text("/path/foobar/%04d/", i); ImGui::NextColumn(); - } - ImGui::Columns(1); - ImGui::EndChild(); - ImGui::TreePop(); - } - */ - // Create multiple items in a same cell before switching to next column if (ImGui::TreeNode("Mixed items")) { @@ -1424,7 +1661,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::Text("An extra line here."); ImGui::NextColumn(); - ImGui::Text("Sailor"); + ImGui::Text("Sailor"); ImGui::Button("Corniflower"); static float bar = 1.0f; ImGui::InputFloat("blue", &bar, 0.05f, 0, 3); @@ -1455,25 +1692,76 @@ void ImGui::ShowTestWindow(bool* p_open) if (ImGui::TreeNode("Borders")) { + // NB: Future columns API should allow automatic horizontal borders. static bool h_borders = true; static bool v_borders = true; ImGui::Checkbox("horizontal", &h_borders); ImGui::SameLine(); ImGui::Checkbox("vertical", &v_borders); ImGui::Columns(4, NULL, v_borders); - if (h_borders) ImGui::Separator(); - for (int i = 0; i < 8; i++) + for (int i = 0; i < 4*3; i++) { + if (h_borders && ImGui::GetColumnIndex() == 0) + ImGui::Separator(); ImGui::Text("%c%c%c", 'a'+i, 'a'+i, 'a'+i); + ImGui::Text("Width %.2f\nOffset %.2f", ImGui::GetColumnWidth(), ImGui::GetColumnOffset()); ImGui::NextColumn(); } ImGui::Columns(1); - if (h_borders) ImGui::Separator(); + if (h_borders) + ImGui::Separator(); + ImGui::TreePop(); + } + + // Scrolling columns + /* + if (ImGui::TreeNode("Vertical Scrolling")) + { + ImGui::BeginChild("##header", ImVec2(0, ImGui::GetTextLineHeightWithSpacing()+ImGui::GetStyle().ItemSpacing.y)); + ImGui::Columns(3); + ImGui::Text("ID"); ImGui::NextColumn(); + ImGui::Text("Name"); ImGui::NextColumn(); + ImGui::Text("Path"); ImGui::NextColumn(); + ImGui::Columns(1); + ImGui::Separator(); + ImGui::EndChild(); + ImGui::BeginChild("##scrollingregion", ImVec2(0, 60)); + ImGui::Columns(3); + for (int i = 0; i < 10; i++) + { + ImGui::Text("%04d", i); ImGui::NextColumn(); + ImGui::Text("Foobar"); ImGui::NextColumn(); + ImGui::Text("/path/foobar/%04d/", i); ImGui::NextColumn(); + } + ImGui::Columns(1); + ImGui::EndChild(); + ImGui::TreePop(); + } + */ + + if (ImGui::TreeNode("Horizontal Scrolling")) + { + ImGui::SetNextWindowContentSize(ImVec2(1500.0f, 0.0f)); + ImGui::BeginChild("##ScrollingRegion", ImVec2(0, ImGui::GetFontSize() * 20), false, ImGuiWindowFlags_HorizontalScrollbar); + ImGui::Columns(10); + int ITEMS_COUNT = 2000; + ImGuiListClipper clipper(ITEMS_COUNT); // Also demonstrate using the clipper for large list + while (clipper.Step()) + { + for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) + for (int j = 0; j < 10; j++) + { + ImGui::Text("Line %d Column %d...", i, j); + ImGui::NextColumn(); + } + } + ImGui::Columns(1); + ImGui::EndChild(); ImGui::TreePop(); } bool node_open = ImGui::TreeNode("Tree within single cell"); - ImGui::SameLine(); ShowHelpMarker("NB: Tree node must be poped before ending the cell.\nThere's no storage of state per-cell."); + ImGui::SameLine(); ShowHelpMarker("NB: Tree node must be poped before ending the cell. There's no storage of state per-cell."); if (node_open) { ImGui::Columns(2, "tree items"); @@ -1484,6 +1772,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::Separator(); ImGui::TreePop(); } + ImGui::PopID(); } if (ImGui::CollapsingHeader("Filtering")) @@ -1501,8 +1790,46 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::BulletText("%s", lines[i]); } - if (ImGui::CollapsingHeader("Keyboard, Mouse & Focus")) + if (ImGui::CollapsingHeader("Inputs & Focus")) { + ImGuiIO& io = ImGui::GetIO(); + ImGui::Checkbox("io.MouseDrawCursor", &io.MouseDrawCursor); + ImGui::SameLine(); ShowHelpMarker("Request ImGui to render a mouse cursor for you in software. Note that a mouse cursor rendered via your application GPU rendering path will feel more laggy than hardware cursor, but will be more in sync with your other visuals.\n\nSome desktop applications may use both kinds of cursors (e.g. enable software cursor only when resizing/dragging something)."); + + ImGui::Text("WantCaptureMouse: %d", io.WantCaptureMouse); + ImGui::Text("WantCaptureKeyboard: %d", io.WantCaptureKeyboard); + ImGui::Text("WantTextInput: %d", io.WantTextInput); + ImGui::Text("WantMoveMouse: %d", io.WantMoveMouse); + + if (ImGui::TreeNode("Keyboard & Mouse State")) + { + if (ImGui::IsMousePosValid()) + ImGui::Text("Mouse pos: (%g, %g)", io.MousePos.x, io.MousePos.y); + else + ImGui::Text("Mouse pos: "); + ImGui::Text("Mouse down:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (io.MouseDownDuration[i] >= 0.0f) { ImGui::SameLine(); ImGui::Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]); } + ImGui::Text("Mouse clicked:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseClicked(i)) { ImGui::SameLine(); ImGui::Text("b%d", i); } + ImGui::Text("Mouse dbl-clicked:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseDoubleClicked(i)) { ImGui::SameLine(); ImGui::Text("b%d", i); } + ImGui::Text("Mouse released:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseReleased(i)) { ImGui::SameLine(); ImGui::Text("b%d", i); } + ImGui::Text("Mouse wheel: %.1f", io.MouseWheel); + + ImGui::Text("Keys down:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (io.KeysDownDuration[i] >= 0.0f) { ImGui::SameLine(); ImGui::Text("%d (%.02f secs)", i, io.KeysDownDuration[i]); } + ImGui::Text("Keys pressed:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (ImGui::IsKeyPressed(i)) { ImGui::SameLine(); ImGui::Text("%d", i); } + ImGui::Text("Keys release:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (ImGui::IsKeyReleased(i)) { ImGui::SameLine(); ImGui::Text("%d", i); } + ImGui::Text("Keys mods: %s%s%s%s", io.KeyCtrl ? "CTRL " : "", io.KeyShift ? "SHIFT " : "", io.KeyAlt ? "ALT " : "", io.KeySuper ? "SUPER " : ""); + + + ImGui::Button("Hovering me sets the\nkeyboard capture flag"); + if (ImGui::IsItemHovered()) + ImGui::CaptureKeyboardFromApp(true); + ImGui::SameLine(); + ImGui::Button("Holding me clears the\nthe keyboard capture flag"); + if (ImGui::IsItemActive()) + ImGui::CaptureKeyboardFromApp(false); + + ImGui::TreePop(); + } + if (ImGui::TreeNode("Tabbing")) { ImGui::Text("Use TAB/SHIFT+TAB to cycle through keyboard editable fields."); @@ -1539,6 +1866,7 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::InputText("3 (tab skip)", buf, IM_ARRAYSIZE(buf)); if (ImGui::IsItemActive()) has_focus = 3; ImGui::PopAllowKeyboardFocus(); + if (has_focus) ImGui::Text("Item with focus: %d", has_focus); else @@ -1547,65 +1875,104 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::TreePop(); } + if (ImGui::TreeNode("Focused & Hovered Test")) + { + static bool embed_all_inside_a_child_window = false; + ImGui::Checkbox("Embed everything inside a child window (for additional testing)", &embed_all_inside_a_child_window); + if (embed_all_inside_a_child_window) + ImGui::BeginChild("embeddingchild", ImVec2(0, ImGui::GetFontSize() * 25), true); + + // Testing IsWindowFocused() function with its various flags (note that the flags can be combined) + ImGui::BulletText( + "IsWindowFocused() = %d\n" + "IsWindowFocused(_ChildWindows) = %d\n" + "IsWindowFocused(_ChildWindows|_RootWindow) = %d\n" + "IsWindowFocused(_RootWindow) = %d\n" + "IsWindowFocused(_AnyWindow) = %d\n", + ImGui::IsWindowFocused(), + ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows), + ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows | ImGuiFocusedFlags_RootWindow), + ImGui::IsWindowFocused(ImGuiFocusedFlags_RootWindow), + ImGui::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)); + + // Testing IsWindowHovered() function with its various flags (note that the flags can be combined) + ImGui::BulletText( + "IsWindowHovered() = %d\n" + "IsWindowHovered(_AllowWhenBlockedByPopup) = %d\n" + "IsWindowHovered(_AllowWhenBlockedByActiveItem) = %d\n" + "IsWindowHovered(_ChildWindows) = %d\n" + "IsWindowHovered(_ChildWindows|_RootWindow) = %d\n" + "IsWindowHovered(_RootWindow) = %d\n" + "IsWindowHovered(_AnyWindow) = %d\n", + ImGui::IsWindowHovered(), + ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup), + ImGui::IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem), + ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows), + ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows | ImGuiHoveredFlags_RootWindow), + ImGui::IsWindowHovered(ImGuiHoveredFlags_RootWindow), + ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow)); + + // Testing IsItemHovered() function (because BulletText is an item itself and that would affect the output of IsItemHovered, we pass all lines in a single items to shorten the code) + ImGui::Button("ITEM"); + ImGui::BulletText( + "IsItemHovered() = %d\n" + "IsItemHovered(_AllowWhenBlockedByPopup) = %d\n" + "IsItemHovered(_AllowWhenBlockedByActiveItem) = %d\n" + "IsItemHovered(_AllowWhenOverlapped) = %d\n" + "IsItemhovered(_RectOnly) = %d\n", + ImGui::IsItemHovered(), + ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup), + ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem), + ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenOverlapped), + ImGui::IsItemHovered(ImGuiHoveredFlags_RectOnly)); + + ImGui::BeginChild("child", ImVec2(0,50), true); + ImGui::Text("This is another child window for testing IsWindowHovered() flags."); + ImGui::EndChild(); + + if (embed_all_inside_a_child_window) + EndChild(); + + ImGui::TreePop(); + } + if (ImGui::TreeNode("Dragging")) { ImGui::TextWrapped("You can use ImGui::GetMouseDragDelta(0) to query for the dragged amount on any widget."); + for (int button = 0; button < 3; button++) + ImGui::Text("IsMouseDragging(%d):\n w/ default threshold: %d,\n w/ zero threshold: %d\n w/ large threshold: %d", + button, ImGui::IsMouseDragging(button), ImGui::IsMouseDragging(button, 0.0f), ImGui::IsMouseDragging(button, 20.0f)); ImGui::Button("Drag Me"); if (ImGui::IsItemActive()) { // Draw a line between the button and the mouse cursor ImDrawList* draw_list = ImGui::GetWindowDrawList(); draw_list->PushClipRectFullScreen(); - draw_list->AddLine(ImGui::CalcItemRectClosestPoint(ImGui::GetIO().MousePos, true, -2.0f), ImGui::GetIO().MousePos, ImColor(ImGui::GetStyle().Colors[ImGuiCol_Button]), 4.0f); + draw_list->AddLine(io.MouseClickedPos[0], io.MousePos, ImGui::GetColorU32(ImGuiCol_Button), 4.0f); draw_list->PopClipRect(); + + // Drag operations gets "unlocked" when the mouse has moved past a certain threshold (the default threshold is stored in io.MouseDragThreshold) + // You can request a lower or higher threshold using the second parameter of IsMouseDragging() and GetMouseDragDelta() ImVec2 value_raw = ImGui::GetMouseDragDelta(0, 0.0f); ImVec2 value_with_lock_threshold = ImGui::GetMouseDragDelta(0); - ImVec2 mouse_delta = ImGui::GetIO().MouseDelta; + ImVec2 mouse_delta = io.MouseDelta; ImGui::SameLine(); ImGui::Text("Raw (%.1f, %.1f), WithLockThresold (%.1f, %.1f), MouseDelta (%.1f, %.1f)", value_raw.x, value_raw.y, value_with_lock_threshold.x, value_with_lock_threshold.y, mouse_delta.x, mouse_delta.y); } ImGui::TreePop(); } - if (ImGui::TreeNode("Keyboard & Mouse State")) - { - ImGuiIO& io = ImGui::GetIO(); - - ImGui::Text("MousePos: (%g, %g)", io.MousePos.x, io.MousePos.y); - ImGui::Text("Mouse down:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (io.MouseDownDuration[i] >= 0.0f) { ImGui::SameLine(); ImGui::Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]); } - ImGui::Text("Mouse clicked:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseClicked(i)) { ImGui::SameLine(); ImGui::Text("b%d", i); } - ImGui::Text("Mouse dbl-clicked:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseDoubleClicked(i)) { ImGui::SameLine(); ImGui::Text("b%d", i); } - ImGui::Text("Mouse released:"); for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseReleased(i)) { ImGui::SameLine(); ImGui::Text("b%d", i); } - ImGui::Text("MouseWheel: %.1f", io.MouseWheel); - - ImGui::Text("Keys down:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (io.KeysDownDuration[i] >= 0.0f) { ImGui::SameLine(); ImGui::Text("%d (%.02f secs)", i, io.KeysDownDuration[i]); } - ImGui::Text("Keys pressed:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (ImGui::IsKeyPressed(i)) { ImGui::SameLine(); ImGui::Text("%d", i); } - ImGui::Text("Keys release:"); for (int i = 0; i < IM_ARRAYSIZE(io.KeysDown); i++) if (ImGui::IsKeyReleased(i)) { ImGui::SameLine(); ImGui::Text("%d", i); } - ImGui::Text("KeyMods: %s%s%s%s", io.KeyCtrl ? "CTRL " : "", io.KeyShift ? "SHIFT " : "", io.KeyAlt ? "ALT " : "", io.KeySuper ? "SUPER " : ""); - - ImGui::Text("WantCaptureMouse: %s", io.WantCaptureMouse ? "true" : "false"); - ImGui::Text("WantCaptureKeyboard: %s", io.WantCaptureKeyboard ? "true" : "false"); - ImGui::Text("WantTextInput: %s", io.WantTextInput ? "true" : "false"); - - ImGui::Button("Hovering me sets the\nkeyboard capture flag"); - if (ImGui::IsItemHovered()) - ImGui::CaptureKeyboardFromApp(true); - ImGui::SameLine(); - ImGui::Button("Holding me clears the\nthe keyboard capture flag"); - if (ImGui::IsItemActive()) - ImGui::CaptureKeyboardFromApp(false); - - ImGui::TreePop(); - } - if (ImGui::TreeNode("Mouse cursors")) { - ImGui::TextWrapped("Your application can render a different mouse cursor based on what ImGui::GetMouseCursor() returns. You can also set io.MouseDrawCursor to ask ImGui to render the cursor for you in software."); - ImGui::Checkbox("io.MouseDrawCursor", &ImGui::GetIO().MouseDrawCursor); + const char* mouse_cursors_names[] = { "Arrow", "TextInput", "Move", "ResizeNS", "ResizeEW", "ResizeNESW", "ResizeNWSE" }; + IM_ASSERT(IM_ARRAYSIZE(mouse_cursors_names) == ImGuiMouseCursor_Count_); + + ImGui::Text("Current mouse cursor = %d: %s", ImGui::GetMouseCursor(), mouse_cursors_names[ImGui::GetMouseCursor()]); ImGui::Text("Hover to see mouse cursors:"); + ImGui::SameLine(); ShowHelpMarker("Your application can render a different mouse cursor based on what ImGui::GetMouseCursor() returns. If software cursor rendering (io.MouseDrawCursor) is set ImGui will draw the right cursor for you, otherwise your backend needs to handle it."); for (int i = 0; i < ImGuiMouseCursor_Count_; i++) { char label[32]; - sprintf(label, "Mouse cursor %d", i); + sprintf(label, "Mouse cursor %d: %s", i, mouse_cursors_names[i]); ImGui::Bullet(); ImGui::Selectable(label, false); if (ImGui::IsItemHovered()) ImGui::SetMouseCursor(i); @@ -1617,28 +1984,87 @@ void ImGui::ShowTestWindow(bool* p_open) ImGui::End(); } +// Demo helper function to select among default colors. See ShowStyleEditor() for more advanced options. +// Here we use the simplified Combo() api that packs items into a single literal string. Useful for quick combo boxes where the choices are known locally. +bool ImGui::ShowStyleSelector(const char* label) +{ + static int style_idx = -1; + if (ImGui::Combo(label, &style_idx, "Classic\0Dark\0Light\0")) + { + switch (style_idx) + { + case 0: ImGui::StyleColorsClassic(); break; + case 1: ImGui::StyleColorsDark(); break; + case 2: ImGui::StyleColorsLight(); break; + } + return true; + } + return false; +} + +// Demo helper function to select among loaded fonts. +// Here we use the regular BeginCombo()/EndCombo() api which is more the more flexible one. +void ImGui::ShowFontSelector(const char* label) +{ + ImGuiIO& io = ImGui::GetIO(); + ImFont* font_current = ImGui::GetFont(); + if (ImGui::BeginCombo(label, font_current->GetDebugName())) + { + for (int n = 0; n < io.Fonts->Fonts.Size; n++) + if (ImGui::Selectable(io.Fonts->Fonts[n]->GetDebugName(), io.Fonts->Fonts[n] == font_current)) + io.FontDefault = io.Fonts->Fonts[n]; + ImGui::EndCombo(); + } + ImGui::SameLine(); + ShowHelpMarker( + "- Load additional fonts with io.Fonts->AddFontFromFileTTF().\n" + "- The font atlas is built when calling io.Fonts->GetTexDataAsXXXX() or io.Fonts->Build().\n" + "- Read FAQ and documentation in misc/fonts/ for more details.\n" + "- If you need to add/remove fonts at runtime (e.g. for DPI change), do it before calling NewFrame()."); +} + void ImGui::ShowStyleEditor(ImGuiStyle* ref) { + // You can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it compares to an internally stored reference) ImGuiStyle& style = ImGui::GetStyle(); + static ImGuiStyle ref_saved_style; - // You can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it compares to the default style) - const ImGuiStyle default_style; // Default style - if (ImGui::Button("Revert Style")) - style = ref ? *ref : default_style; + // Default to using internal storage as reference + static bool init = true; + if (init && ref == NULL) + ref_saved_style = style; + init = false; + if (ref == NULL) + ref = &ref_saved_style; - if (ref) - { - ImGui::SameLine(); - if (ImGui::Button("Save Style")) - *ref = style; - } + ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.50f); - ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.55f); + if (ImGui::ShowStyleSelector("Colors##Selector")) + ref_saved_style = style; + ImGui::ShowFontSelector("Fonts##Selector"); + + // Simplified Settings + if (ImGui::SliderFloat("FrameRounding", &style.FrameRounding, 0.0f, 12.0f, "%.0f")) + style.GrabRounding = style.FrameRounding; // Make GrabRounding always the same value as FrameRounding + { bool window_border = (style.WindowBorderSize > 0.0f); if (ImGui::Checkbox("WindowBorder", &window_border)) style.WindowBorderSize = window_border ? 1.0f : 0.0f; } + ImGui::SameLine(); + { bool frame_border = (style.FrameBorderSize > 0.0f); if (ImGui::Checkbox("FrameBorder", &frame_border)) style.FrameBorderSize = frame_border ? 1.0f : 0.0f; } + ImGui::SameLine(); + { bool popup_border = (style.PopupBorderSize > 0.0f); if (ImGui::Checkbox("PopupBorder", &popup_border)) style.PopupBorderSize = popup_border ? 1.0f : 0.0f; } + + // Save/Revert button + if (ImGui::Button("Save Ref")) + *ref = ref_saved_style = style; + ImGui::SameLine(); + if (ImGui::Button("Revert Ref")) + style = *ref; + ImGui::SameLine(); + ShowHelpMarker("Save/Revert in local non-persistent storage. Default Colors definition are not affected. Use \"Export Colors\" below to save them somewhere."); if (ImGui::TreeNode("Rendering")) { - ImGui::Checkbox("Anti-aliased lines", &style.AntiAliasedLines); - ImGui::Checkbox("Anti-aliased shapes", &style.AntiAliasedShapes); + ImGui::Checkbox("Anti-aliased lines", &style.AntiAliasedLines); ImGui::SameLine(); ShowHelpMarker("When disabling anti-aliasing lines, you'll probably want to disable borders in your style as well."); + ImGui::Checkbox("Anti-aliased fill", &style.AntiAliasedFill); ImGui::PushItemWidth(100); ImGui::DragFloat("Curve Tessellation Tolerance", &style.CurveTessellationTol, 0.02f, 0.10f, FLT_MAX, NULL, 2.0f); if (style.CurveTessellationTol < 0.0f) style.CurveTessellationTol = 0.10f; @@ -1650,18 +2076,25 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) if (ImGui::TreeNode("Settings")) { ImGui::SliderFloat2("WindowPadding", (float*)&style.WindowPadding, 0.0f, 20.0f, "%.0f"); - ImGui::SliderFloat("WindowRounding", &style.WindowRounding, 0.0f, 16.0f, "%.0f"); - ImGui::SliderFloat("ChildWindowRounding", &style.ChildWindowRounding, 0.0f, 16.0f, "%.0f"); + ImGui::SliderFloat("PopupRounding", &style.PopupRounding, 0.0f, 16.0f, "%.0f"); ImGui::SliderFloat2("FramePadding", (float*)&style.FramePadding, 0.0f, 20.0f, "%.0f"); - ImGui::SliderFloat("FrameRounding", &style.FrameRounding, 0.0f, 16.0f, "%.0f"); ImGui::SliderFloat2("ItemSpacing", (float*)&style.ItemSpacing, 0.0f, 20.0f, "%.0f"); ImGui::SliderFloat2("ItemInnerSpacing", (float*)&style.ItemInnerSpacing, 0.0f, 20.0f, "%.0f"); ImGui::SliderFloat2("TouchExtraPadding", (float*)&style.TouchExtraPadding, 0.0f, 10.0f, "%.0f"); ImGui::SliderFloat("IndentSpacing", &style.IndentSpacing, 0.0f, 30.0f, "%.0f"); ImGui::SliderFloat("ScrollbarSize", &style.ScrollbarSize, 1.0f, 20.0f, "%.0f"); - ImGui::SliderFloat("ScrollbarRounding", &style.ScrollbarRounding, 0.0f, 16.0f, "%.0f"); ImGui::SliderFloat("GrabMinSize", &style.GrabMinSize, 1.0f, 20.0f, "%.0f"); - ImGui::SliderFloat("GrabRounding", &style.GrabRounding, 0.0f, 16.0f, "%.0f"); + ImGui::Text("BorderSize"); + ImGui::SliderFloat("WindowBorderSize", &style.WindowBorderSize, 0.0f, 1.0f, "%.0f"); + ImGui::SliderFloat("ChildBorderSize", &style.ChildBorderSize, 0.0f, 1.0f, "%.0f"); + ImGui::SliderFloat("PopupBorderSize", &style.PopupBorderSize, 0.0f, 1.0f, "%.0f"); + ImGui::SliderFloat("FrameBorderSize", &style.FrameBorderSize, 0.0f, 1.0f, "%.0f"); + ImGui::Text("Rounding"); + ImGui::SliderFloat("WindowRounding", &style.WindowRounding, 0.0f, 14.0f, "%.0f"); + ImGui::SliderFloat("ChildRounding", &style.ChildRounding, 0.0f, 16.0f, "%.0f"); + ImGui::SliderFloat("FrameRounding", &style.FrameRounding, 0.0f, 12.0f, "%.0f"); + ImGui::SliderFloat("ScrollbarRounding", &style.ScrollbarRounding, 0.0f, 12.0f, "%.0f"); + ImGui::SliderFloat("GrabRounding", &style.GrabRounding, 0.0f, 12.0f, "%.0f"); ImGui::Text("Alignment"); ImGui::SliderFloat2("WindowTitleAlign", (float*)&style.WindowTitleAlign, 0.0f, 1.0f, "%.2f"); ImGui::SliderFloat2("ButtonTextAlign", (float*)&style.ButtonTextAlign, 0.0f, 1.0f, "%.2f"); ImGui::SameLine(); ShowHelpMarker("Alignment applies when a button is larger than its text content."); @@ -1671,52 +2104,54 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) if (ImGui::TreeNode("Colors")) { static int output_dest = 0; - static bool output_only_modified = false; - if (ImGui::Button("Copy Colors")) + static bool output_only_modified = true; + if (ImGui::Button("Export Unsaved")) { if (output_dest == 0) ImGui::LogToClipboard(); else ImGui::LogToTTY(); - ImGui::LogText("ImGuiStyle& style = ImGui::GetStyle();" IM_NEWLINE); + ImGui::LogText("ImVec4* colors = ImGui::GetStyle().Colors;" IM_NEWLINE); for (int i = 0; i < ImGuiCol_COUNT; i++) { const ImVec4& col = style.Colors[i]; - const char* name = ImGui::GetStyleColName(i); - if (!output_only_modified || memcmp(&col, (ref ? &ref->Colors[i] : &default_style.Colors[i]), sizeof(ImVec4)) != 0) - ImGui::LogText("style.Colors[ImGuiCol_%s]%*s= ImVec4(%.2ff, %.2ff, %.2ff, %.2ff);" IM_NEWLINE, name, 22 - (int)strlen(name), "", col.x, col.y, col.z, col.w); + const char* name = ImGui::GetStyleColorName(i); + if (!output_only_modified || memcmp(&col, &ref->Colors[i], sizeof(ImVec4)) != 0) + ImGui::LogText("colors[ImGuiCol_%s]%*s= ImVec4(%.2ff, %.2ff, %.2ff, %.2ff);" IM_NEWLINE, name, 23-(int)strlen(name), "", col.x, col.y, col.z, col.w); } ImGui::LogFinish(); } ImGui::SameLine(); ImGui::PushItemWidth(120); ImGui::Combo("##output_type", &output_dest, "To Clipboard\0To TTY\0"); ImGui::PopItemWidth(); - ImGui::SameLine(); ImGui::Checkbox("Only Modified Fields", &output_only_modified); + ImGui::SameLine(); ImGui::Checkbox("Only Modified Colors", &output_only_modified); - static ImGuiColorEditMode edit_mode = ImGuiColorEditMode_RGB; - ImGui::RadioButton("RGB", &edit_mode, ImGuiColorEditMode_RGB); - ImGui::SameLine(); - ImGui::RadioButton("HSV", &edit_mode, ImGuiColorEditMode_HSV); - ImGui::SameLine(); - ImGui::RadioButton("HEX", &edit_mode, ImGuiColorEditMode_HEX); - //ImGui::Text("Tip: Click on colored square to change edit mode."); + ImGui::Text("Tip: Left-click on colored square to open color picker,\nRight-click to open edit options menu."); static ImGuiTextFilter filter; filter.Draw("Filter colors", 200); - ImGui::BeginChild("#colors", ImVec2(0, 300), true, ImGuiWindowFlags_AlwaysVerticalScrollbar); + static ImGuiColorEditFlags alpha_flags = 0; + ImGui::RadioButton("Opaque", &alpha_flags, 0); ImGui::SameLine(); + ImGui::RadioButton("Alpha", &alpha_flags, ImGuiColorEditFlags_AlphaPreview); ImGui::SameLine(); + ImGui::RadioButton("Both", &alpha_flags, ImGuiColorEditFlags_AlphaPreviewHalf); + + ImGui::BeginChild("#colors", ImVec2(0, 300), true, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar); ImGui::PushItemWidth(-160); - ImGui::ColorEditMode(edit_mode); for (int i = 0; i < ImGuiCol_COUNT; i++) { - const char* name = ImGui::GetStyleColName(i); + const char* name = ImGui::GetStyleColorName(i); if (!filter.PassFilter(name)) continue; ImGui::PushID(i); - ImGui::ColorEdit4(name, (float*)&style.Colors[i], true); - if (memcmp(&style.Colors[i], (ref ? &ref->Colors[i] : &default_style.Colors[i]), sizeof(ImVec4)) != 0) + ImGui::ColorEdit4("##color", (float*)&style.Colors[i], ImGuiColorEditFlags_AlphaBar | alpha_flags); + if (memcmp(&style.Colors[i], &ref->Colors[i], sizeof(ImVec4)) != 0) { - ImGui::SameLine(); if (ImGui::Button("Revert")) style.Colors[i] = ref ? ref->Colors[i] : default_style.Colors[i]; - if (ref) { ImGui::SameLine(); if (ImGui::Button("Save")) ref->Colors[i] = style.Colors[i]; } + // Tips: in a real user application, you may want to merge and use an icon font into the main font, so instead of "Save"/"Revert" you'd use icons. + // Read the FAQ and misc/fonts/README.txt about using icon fonts. It's really easy and super convenient! + ImGui::SameLine(0.0f, style.ItemInnerSpacing.x); if (ImGui::Button("Save")) ref->Colors[i] = style.Colors[i]; + ImGui::SameLine(0.0f, style.ItemInnerSpacing.x); if (ImGui::Button("Revert")) style.Colors[i] = ref->Colors[i]; } + ImGui::SameLine(0.0f, style.ItemInnerSpacing.x); + ImGui::TextUnformatted(name); ImGui::PopID(); } ImGui::PopItemWidth(); @@ -1725,9 +2160,9 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) ImGui::TreePop(); } - if (ImGui::TreeNode("Fonts", "Fonts (%d)", ImGui::GetIO().Fonts->Fonts.Size)) + bool fonts_opened = ImGui::TreeNode("Fonts", "Fonts (%d)", ImGui::GetIO().Fonts->Fonts.Size); + if (fonts_opened) { - ImGui::SameLine(); ShowHelpMarker("Tip: Load fonts with io.Fonts->AddFontFromFileTTF()\nbefore calling io.Fonts->GetTex* functions."); ImFontAtlas* atlas = ImGui::GetIO().Fonts; if (ImGui::TreeNode("Atlas texture", "Atlas texture (%dx%d pixels)", atlas->TexWidth, atlas->TexHeight)) { @@ -1738,19 +2173,19 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) for (int i = 0; i < atlas->Fonts.Size; i++) { ImFont* font = atlas->Fonts[i]; - ImGui::BulletText("Font %d: \'%s\', %.2f px, %d glyphs", i, font->ConfigData ? font->ConfigData[0].Name : "", font->FontSize, font->Glyphs.Size); - ImGui::TreePush((void*)(intptr_t)i); + ImGui::PushID(font); + bool font_details_opened = ImGui::TreeNode(font, "Font %d: \'%s\', %.2f px, %d glyphs", i, font->ConfigData ? font->ConfigData[0].Name : "", font->FontSize, font->Glyphs.Size); ImGui::SameLine(); if (ImGui::SmallButton("Set as default")) ImGui::GetIO().FontDefault = font; - ImGui::PushFont(font); - ImGui::Text("The quick brown fox jumps over the lazy dog"); - ImGui::PopFont(); - if (ImGui::TreeNode("Details")) + if (font_details_opened) { + ImGui::PushFont(font); + ImGui::Text("The quick brown fox jumps over the lazy dog"); + ImGui::PopFont(); ImGui::DragFloat("Font scale", &font->Scale, 0.005f, 0.3f, 2.0f, "%.1f"); // Scale only this font ImGui::SameLine(); ShowHelpMarker("Note than the default embedded font is NOT meant to be scaled.\n\nFont are currently rendered into bitmaps at a given size at the time of building the atlas. You may oversample them to get some flexibility with scaling. You can also render at multiple sizes and select which one to use at runtime.\n\n(Glimmer of hope: the atlas system should hopefully be rewritten in the future to make scaling more natural and automatic.)"); ImGui::Text("Ascent: %f, Descent: %f, Height: %f", font->Ascent, font->Descent, font->Ascent - font->Descent); ImGui::Text("Fallback character: '%c' (%d)", font->FallbackChar, font->FallbackChar); - ImGui::Text("Texture surface: %d pixels (approx)", font->MetricsTotalSurface); + ImGui::Text("Texture surface: %d pixels (approx) ~ %dx%d", font->MetricsTotalSurface, (int)sqrtf((float)font->MetricsTotalSurface), (int)sqrtf((float)font->MetricsTotalSurface)); for (int config_i = 0; config_i < font->ConfigDataCount; config_i++) { ImFontConfig* cfg = &font->ConfigData[config_i]; @@ -1759,7 +2194,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) if (ImGui::TreeNode("Glyphs", "Glyphs (%d)", font->Glyphs.Size)) { // Display all glyphs of the fonts in separate pages of 256 characters - const ImFont::Glyph* glyph_fallback = font->FallbackGlyph; // Forcefully/dodgily make FindGlyph() return NULL on fallback, which isn't the default behavior. + const ImFontGlyph* glyph_fallback = font->FallbackGlyph; // Forcefully/dodgily make FindGlyph() return NULL on fallback, which isn't the default behavior. font->FallbackGlyph = NULL; for (int base = 0; base < 0x10000; base += 256) { @@ -1776,7 +2211,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) { ImVec2 cell_p1(base_pos.x + (n % 16) * (cell_size.x + cell_spacing), base_pos.y + (n / 16) * (cell_size.y + cell_spacing)); ImVec2 cell_p2(cell_p1.x + cell_size.x, cell_p1.y + cell_size.y); - const ImFont::Glyph* glyph = font->FindGlyph((ImWchar)(base+n));; + const ImFontGlyph* glyph = font->FindGlyph((ImWchar)(base+n));; draw_list->AddRect(cell_p1, cell_p2, glyph ? IM_COL32(255,255,255,100) : IM_COL32(255,255,255,50)); font->RenderChar(draw_list, cell_size.x, cell_p1, ImGui::GetColorU32(ImGuiCol_Text), (ImWchar)(base+n)); // We use ImFont::RenderChar as a shortcut because we don't have UTF-8 conversion functions available to generate a string. if (glyph && ImGui::IsMouseHoveringRect(cell_p1, cell_p2)) @@ -1784,7 +2219,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) ImGui::BeginTooltip(); ImGui::Text("Codepoint: U+%04X", base+n); ImGui::Separator(); - ImGui::Text("XAdvance+1: %.1f", glyph->XAdvance); + ImGui::Text("AdvanceX: %.1f", glyph->AdvanceX); ImGui::Text("Pos: (%.2f,%.2f)->(%.2f,%.2f)", glyph->X0, glyph->Y0, glyph->X1, glyph->Y1); ImGui::Text("UV: (%.3f,%.3f)->(%.3f,%.3f)", glyph->U0, glyph->V0, glyph->U1, glyph->V1); ImGui::EndTooltip(); @@ -1799,7 +2234,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) } ImGui::TreePop(); } - ImGui::TreePop(); + ImGui::PopID(); } static float window_scale = 1.0f; ImGui::DragFloat("this window scale", &window_scale, 0.005f, 0.3f, 2.0f, "%.1f"); // scale only this window @@ -1872,15 +2307,24 @@ static void ShowExampleMenuFile() ImGui::EndChild(); static float f = 0.5f; static int n = 0; + static bool b = true; ImGui::SliderFloat("Value", &f, 0.0f, 1.0f); ImGui::InputFloat("Input", &f, 0.1f); ImGui::Combo("Combo", &n, "Yes\0No\0Maybe\0\0"); + ImGui::Checkbox("Check", &b); ImGui::EndMenu(); } if (ImGui::BeginMenu("Colors")) { + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0,0)); for (int i = 0; i < ImGuiCol_COUNT; i++) - ImGui::MenuItem(ImGui::GetStyleColName((ImGuiCol)i)); + { + const char* name = ImGui::GetStyleColorName((ImGuiCol)i); + ImGui::ColorButton(name, ImGui::GetStyleColorVec4((ImGuiCol)i)); + ImGui::SameLine(); + ImGui::MenuItem(name); + } + ImGui::PopStyleVar(); ImGui::EndMenu(); } if (ImGui::BeginMenu("Disabled", false)) // Disabled @@ -1913,76 +2357,97 @@ static void ShowExampleAppConstrainedResize(bool* p_open) { struct CustomConstraints // Helper functions to demonstrate programmatic constraints { - static void Square(ImGuiSizeConstraintCallbackData* data) { data->DesiredSize = ImVec2(IM_MAX(data->DesiredSize.x, data->DesiredSize.y), IM_MAX(data->DesiredSize.x, data->DesiredSize.y)); } - static void Step(ImGuiSizeConstraintCallbackData* data) { float step = (float)(int)(intptr_t)data->UserData; data->DesiredSize = ImVec2((int)(data->DesiredSize.x / step + 0.5f) * step, (int)(data->DesiredSize.y / step + 0.5f) * step); } + static void Square(ImGuiSizeCallbackData* data) { data->DesiredSize = ImVec2(IM_MAX(data->DesiredSize.x, data->DesiredSize.y), IM_MAX(data->DesiredSize.x, data->DesiredSize.y)); } + static void Step(ImGuiSizeCallbackData* data) { float step = (float)(int)(intptr_t)data->UserData; data->DesiredSize = ImVec2((int)(data->DesiredSize.x / step + 0.5f) * step, (int)(data->DesiredSize.y / step + 0.5f) * step); } }; + static bool auto_resize = false; static int type = 0; + static int display_lines = 10; if (type == 0) ImGui::SetNextWindowSizeConstraints(ImVec2(-1, 0), ImVec2(-1, FLT_MAX)); // Vertical only if (type == 1) ImGui::SetNextWindowSizeConstraints(ImVec2(0, -1), ImVec2(FLT_MAX, -1)); // Horizontal only if (type == 2) ImGui::SetNextWindowSizeConstraints(ImVec2(100, 100), ImVec2(FLT_MAX, FLT_MAX)); // Width > 100, Height > 100 - if (type == 3) ImGui::SetNextWindowSizeConstraints(ImVec2(300, 0), ImVec2(400, FLT_MAX)); // Width 300-400 - if (type == 4) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Square); // Always Square - if (type == 5) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Step, (void*)100);// Fixed Step + if (type == 3) ImGui::SetNextWindowSizeConstraints(ImVec2(400, -1), ImVec2(500, -1)); // Width 400-500 + if (type == 4) ImGui::SetNextWindowSizeConstraints(ImVec2(-1, 400), ImVec2(-1, 500)); // Height 400-500 + if (type == 5) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Square); // Always Square + if (type == 6) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Step, (void*)100);// Fixed Step - if (ImGui::Begin("Example: Constrained Resize", p_open)) + ImGuiWindowFlags flags = auto_resize ? ImGuiWindowFlags_AlwaysAutoResize : 0; + if (ImGui::Begin("Example: Constrained Resize", p_open, flags)) { const char* desc[] = { "Resize vertical only", "Resize horizontal only", "Width > 100, Height > 100", - "Width 300-400", + "Width 400-500", + "Height 400-500", "Custom: Always Square", "Custom: Fixed Steps (100)", }; - ImGui::Combo("Constraint", &type, desc, IM_ARRAYSIZE(desc)); - if (ImGui::Button("200x200")) { ImGui::SetWindowSize(ImVec2(200,200)); } ImGui::SameLine(); - if (ImGui::Button("500x500")) { ImGui::SetWindowSize(ImVec2(500,500)); } ImGui::SameLine(); - if (ImGui::Button("800x200")) ImGui::SetWindowSize(ImVec2(800,200)); - for (int i = 0; i < 10; i++) - ImGui::Text("Hello, sailor! Making this line long enough for the example."); + if (ImGui::Button("200x200")) { ImGui::SetWindowSize(ImVec2(200, 200)); } ImGui::SameLine(); + if (ImGui::Button("500x500")) { ImGui::SetWindowSize(ImVec2(500, 500)); } ImGui::SameLine(); + if (ImGui::Button("800x200")) { ImGui::SetWindowSize(ImVec2(800, 200)); } + ImGui::PushItemWidth(200); + ImGui::Combo("Constraint", &type, desc, IM_ARRAYSIZE(desc)); + ImGui::DragInt("Lines", &display_lines, 0.2f, 1, 100); + ImGui::PopItemWidth(); + ImGui::Checkbox("Auto-resize", &auto_resize); + for (int i = 0; i < display_lines; i++) + ImGui::Text("%*sHello, sailor! Making this line long enough for the example.", i * 4, ""); } ImGui::End(); } -// Demonstrate creating a simple static window with no decoration. +// Demonstrate creating a simple static window with no decoration + a context-menu to choose which corner of the screen to use. static void ShowExampleAppFixedOverlay(bool* p_open) { - ImGui::SetNextWindowPos(ImVec2(10,10)); - if (!ImGui::Begin("Example: Fixed Overlay", p_open, ImVec2(0,0), 0.3f, ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoSavedSettings)) + const float DISTANCE = 10.0f; + static int corner = 0; + ImVec2 window_pos = ImVec2((corner & 1) ? ImGui::GetIO().DisplaySize.x - DISTANCE : DISTANCE, (corner & 2) ? ImGui::GetIO().DisplaySize.y - DISTANCE : DISTANCE); + ImVec2 window_pos_pivot = ImVec2((corner & 1) ? 1.0f : 0.0f, (corner & 2) ? 1.0f : 0.0f); + ImGui::SetNextWindowPos(window_pos, ImGuiCond_Always, window_pos_pivot); + ImGui::SetNextWindowBgAlpha(0.3f); // Transparent background + if (ImGui::Begin("Example: Fixed Overlay", p_open, ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_AlwaysAutoResize|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoSavedSettings)) { + ImGui::Text("Simple overlay\nin the corner of the screen.\n(right-click to change position)"); + ImGui::Separator(); + ImGui::Text("Mouse Position: (%.1f,%.1f)", ImGui::GetIO().MousePos.x, ImGui::GetIO().MousePos.y); + if (ImGui::BeginPopupContextWindow()) + { + if (ImGui::MenuItem("Top-left", NULL, corner == 0)) corner = 0; + if (ImGui::MenuItem("Top-right", NULL, corner == 1)) corner = 1; + if (ImGui::MenuItem("Bottom-left", NULL, corner == 2)) corner = 2; + if (ImGui::MenuItem("Bottom-right", NULL, corner == 3)) corner = 3; + if (p_open && ImGui::MenuItem("Close")) *p_open = false; + ImGui::EndPopup(); + } ImGui::End(); - return; } - ImGui::Text("Simple overlay\non the top-left side of the screen."); - ImGui::Separator(); - ImGui::Text("Mouse Position: (%.1f,%.1f)", ImGui::GetIO().MousePos.x, ImGui::GetIO().MousePos.y); - ImGui::End(); } // Demonstrate using "##" and "###" in identifiers to manipulate ID generation. -// Read section "How can I have multiple widgets with the same label? Can I have widget without a label? (Yes). A primer on the purpose of labels/IDs." about ID. -static void ShowExampleAppManipulatingWindowTitle(bool*) +// This apply to regular items as well. Read FAQ section "How can I have multiple widgets with the same label? Can I have widget without a label? (Yes). A primer on the purpose of labels/IDs." for details. +static void ShowExampleAppWindowTitles(bool*) { // By default, Windows are uniquely identified by their title. // You can use the "##" and "###" markers to manipulate the display/ID. // Using "##" to display same title but have unique identifier. - ImGui::SetNextWindowPos(ImVec2(100,100), ImGuiSetCond_FirstUseEver); + ImGui::SetNextWindowPos(ImVec2(100,100), ImGuiCond_FirstUseEver); ImGui::Begin("Same title as another window##1"); ImGui::Text("This is window 1.\nMy title is the same as window 2, but my identifier is unique."); ImGui::End(); - ImGui::SetNextWindowPos(ImVec2(100,200), ImGuiSetCond_FirstUseEver); + ImGui::SetNextWindowPos(ImVec2(100,200), ImGuiCond_FirstUseEver); ImGui::Begin("Same title as another window##2"); ImGui::Text("This is window 2.\nMy title is the same as window 1, but my identifier is unique."); ImGui::End(); // Using "###" to display a changing title but keep a static identifier "AnimatedTitle" char buf[128]; - sprintf(buf, "Animated title %c %d###AnimatedTitle", "|/-\\"[(int)(ImGui::GetTime()/0.25f)&3], rand()); - ImGui::SetNextWindowPos(ImVec2(100,300), ImGuiSetCond_FirstUseEver); + sprintf(buf, "Animated title %c %d###AnimatedTitle", "|/-\\"[(int)(ImGui::GetTime()/0.25f)&3], ImGui::GetFrameCount()); + ImGui::SetNextWindowPos(ImVec2(100,300), ImGuiCond_FirstUseEver); ImGui::Begin(buf); ImGui::Text("This window has a changing title."); ImGui::End(); @@ -1991,7 +2456,7 @@ static void ShowExampleAppManipulatingWindowTitle(bool*) // Demonstrate using the low-level ImDrawList to draw custom shapes. static void ShowExampleAppCustomRendering(bool* p_open) { - ImGui::SetNextWindowSize(ImVec2(350,560), ImGuiSetCond_FirstUseEver); + ImGui::SetNextWindowSize(ImVec2(350,560), ImGuiCond_FirstUseEver); if (!ImGui::Begin("Example: Custom rendering", p_open)) { ImGui::End(); @@ -2018,8 +2483,9 @@ static void ShowExampleAppCustomRendering(bool* p_open) { float thickness = (n == 0) ? 1.0f : 4.0f; draw_list->AddCircle(ImVec2(x+sz*0.5f, y+sz*0.5f), sz*0.5f, col32, 20, thickness); x += sz+spacing; - draw_list->AddRect(ImVec2(x, y), ImVec2(x+sz, y+sz), col32, 0.0f, ~0, thickness); x += sz+spacing; - draw_list->AddRect(ImVec2(x, y), ImVec2(x+sz, y+sz), col32, 10.0f, ~0, thickness); x += sz+spacing; + draw_list->AddRect(ImVec2(x, y), ImVec2(x+sz, y+sz), col32, 0.0f, ImDrawCornerFlags_All, thickness); x += sz+spacing; + draw_list->AddRect(ImVec2(x, y), ImVec2(x+sz, y+sz), col32, 10.0f, ImDrawCornerFlags_All, thickness); x += sz+spacing; + draw_list->AddRect(ImVec2(x, y), ImVec2(x+sz, y+sz), col32, 10.0f, ImDrawCornerFlags_TopLeft|ImDrawCornerFlags_BotRight, thickness); x += sz+spacing; draw_list->AddTriangle(ImVec2(x+sz*0.5f, y), ImVec2(x+sz,y+sz-0.5f), ImVec2(x,y+sz-0.5f), col32, thickness); x += sz+spacing; draw_list->AddLine(ImVec2(x, y), ImVec2(x+sz, y ), col32, thickness); x += sz+spacing; draw_list->AddLine(ImVec2(x, y), ImVec2(x+sz, y+sz), col32, thickness); x += sz+spacing; @@ -2031,8 +2497,9 @@ static void ShowExampleAppCustomRendering(bool* p_open) draw_list->AddCircleFilled(ImVec2(x+sz*0.5f, y+sz*0.5f), sz*0.5f, col32, 32); x += sz+spacing; draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x+sz, y+sz), col32); x += sz+spacing; draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x+sz, y+sz), col32, 10.0f); x += sz+spacing; + draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x+sz, y+sz), col32, 10.0f, ImDrawCornerFlags_TopLeft|ImDrawCornerFlags_BotRight); x += sz+spacing; draw_list->AddTriangleFilled(ImVec2(x+sz*0.5f, y), ImVec2(x+sz,y+sz-0.5f), ImVec2(x,y+sz-0.5f), col32); x += sz+spacing; - draw_list->AddRectFilledMultiColor(ImVec2(x, y), ImVec2(x+sz, y+sz), ImColor(0,0,0), ImColor(255,0,0), ImColor(255,255,0), ImColor(0,255,0)); + draw_list->AddRectFilledMultiColor(ImVec2(x, y), ImVec2(x+sz, y+sz), IM_COL32(0,0,0,255), IM_COL32(255,0,0,255), IM_COL32(255,255,0,255), IM_COL32(0,255,0,255)); ImGui::Dummy(ImVec2((sz+spacing)*8, (sz+spacing)*3)); } ImGui::Separator(); @@ -2051,8 +2518,8 @@ static void ShowExampleAppCustomRendering(bool* p_open) ImVec2 canvas_size = ImGui::GetContentRegionAvail(); // Resize canvas to what's available if (canvas_size.x < 50.0f) canvas_size.x = 50.0f; if (canvas_size.y < 50.0f) canvas_size.y = 50.0f; - draw_list->AddRectFilledMultiColor(canvas_pos, ImVec2(canvas_pos.x + canvas_size.x, canvas_pos.y + canvas_size.y), ImColor(50,50,50), ImColor(50,50,60), ImColor(60,60,70), ImColor(50,50,60)); - draw_list->AddRect(canvas_pos, ImVec2(canvas_pos.x + canvas_size.x, canvas_pos.y + canvas_size.y), ImColor(255,255,255)); + draw_list->AddRectFilledMultiColor(canvas_pos, ImVec2(canvas_pos.x + canvas_size.x, canvas_pos.y + canvas_size.y), IM_COL32(50,50,50,255), IM_COL32(50,50,60,255), IM_COL32(60,60,70,255), IM_COL32(50,50,60,255)); + draw_list->AddRect(canvas_pos, ImVec2(canvas_pos.x + canvas_size.x, canvas_pos.y + canvas_size.y), IM_COL32(255,255,255,255)); bool adding_preview = false; ImGui::InvisibleButton("canvas", canvas_size); @@ -2061,7 +2528,7 @@ static void ShowExampleAppCustomRendering(bool* p_open) { adding_preview = true; points.push_back(mouse_pos_in_canvas); - if (!ImGui::GetIO().MouseDown[0]) + if (!ImGui::IsMouseDown(0)) adding_line = adding_preview = false; } if (ImGui::IsItemHovered()) @@ -2078,7 +2545,7 @@ static void ShowExampleAppCustomRendering(bool* p_open) points.pop_back(); } } - draw_list->PushClipRect(canvas_pos, ImVec2(canvas_pos.x+canvas_size.x, canvas_pos.y+canvas_size.y)); // clip lines within the canvas (if we resize it, etc.) + draw_list->PushClipRect(canvas_pos, ImVec2(canvas_pos.x+canvas_size.x, canvas_pos.y+canvas_size.y), true); // clip lines within the canvas (if we resize it, etc.) for (int i = 0; i < points.Size - 1; i += 2) draw_list->AddLine(ImVec2(canvas_pos.x + points[i].x, canvas_pos.y + points[i].y), ImVec2(canvas_pos.x + points[i+1].x, canvas_pos.y + points[i+1].y), IM_COL32(255,255,0,255), 2.0f); draw_list->PopClipRect(); @@ -2130,8 +2597,9 @@ struct ExampleAppConsole ScrollToBottom = true; } - void AddLog(const char* fmt, ...) IM_PRINTFARGS(2) + void AddLog(const char* fmt, ...) IM_FMTARGS(2) { + // FIXME-OPT char buf[1024]; va_list args; va_start(args, fmt); @@ -2144,13 +2612,22 @@ struct ExampleAppConsole void Draw(const char* title, bool* p_open) { - ImGui::SetNextWindowSize(ImVec2(520,600), ImGuiSetCond_FirstUseEver); + ImGui::SetNextWindowSize(ImVec2(520,600), ImGuiCond_FirstUseEver); if (!ImGui::Begin(title, p_open)) { ImGui::End(); return; } + // As a specific feature guaranteed by the library, after calling Begin() the last Item represent the title bar. So e.g. IsItemHovered() will return true when hovering the title bar. + // Here we create a context menu only available from the title bar. + if (ImGui::BeginPopupContextItem()) + { + if (ImGui::MenuItem("Close")) + *p_open = false; + ImGui::EndPopup(); + } + ImGui::TextWrapped("This example implements a console with basic coloring, completion and history. A more elaborate implementation may want to store entries along with extra data such as timestamp, emitter, etc."); ImGui::TextWrapped("Enter 'HELP' for help, press TAB to use text completion."); @@ -2159,6 +2636,7 @@ struct ExampleAppConsole if (ImGui::SmallButton("Add Dummy Text")) { AddLog("%d some text", Items.Size); AddLog("some more text"); AddLog("display very important message here!"); } ImGui::SameLine(); if (ImGui::SmallButton("Add Dummy Error")) { AddLog("[error] something went wrong"); } ImGui::SameLine(); if (ImGui::SmallButton("Clear")) { ClearLog(); } ImGui::SameLine(); + bool copy_to_clipboard = ImGui::SmallButton("Copy"); ImGui::SameLine(); if (ImGui::SmallButton("Scroll to bottom")) ScrollToBottom = true; //static float t = 0.0f; if (ImGui::GetTime() - t > 0.02f) { t = ImGui::GetTime(); AddLog("Spam %f", t); } @@ -2170,7 +2648,8 @@ struct ExampleAppConsole ImGui::PopStyleVar(); ImGui::Separator(); - ImGui::BeginChild("ScrollingRegion", ImVec2(0,-ImGui::GetItemsLineHeightWithSpacing()), false, ImGuiWindowFlags_HorizontalScrollbar); + const float footer_height_to_reserve = ImGui::GetStyle().ItemSpacing.y + ImGui::GetFrameHeightWithSpacing(); // 1 separator, 1 input text + ImGui::BeginChild("ScrollingRegion", ImVec2(0, -footer_height_to_reserve), false, ImGuiWindowFlags_HorizontalScrollbar); // Leave room for 1 separator + 1 InputText if (ImGui::BeginPopupContextWindow()) { if (ImGui::Selectable("Clear")) ClearLog(); @@ -2189,18 +2668,23 @@ struct ExampleAppConsole // and appending newly elements as they are inserted. This is left as a task to the user until we can manage to improve this example code! // If your items are of variable size you may want to implement code similar to what ImGuiListClipper does. Or split your data into fixed height items to allow random-seeking into your list. ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(4,1)); // Tighten spacing + if (copy_to_clipboard) + ImGui::LogToClipboard(); + ImVec4 col_default_text = ImGui::GetStyleColorVec4(ImGuiCol_Text); for (int i = 0; i < Items.Size; i++) { const char* item = Items[i]; if (!filter.PassFilter(item)) continue; - ImVec4 col = ImVec4(1.0f,1.0f,1.0f,1.0f); // A better implementation may store a type per-item. For the sample let's just parse the text. + ImVec4 col = col_default_text; if (strstr(item, "[error]")) col = ImColor(1.0f,0.4f,0.4f,1.0f); else if (strncmp(item, "# ", 2) == 0) col = ImColor(1.0f,0.78f,0.58f,1.0f); ImGui::PushStyleColor(ImGuiCol_Text, col); ImGui::TextUnformatted(item); ImGui::PopStyleColor(); } + if (copy_to_clipboard) + ImGui::LogFinish(); if (ScrollToBottom) ImGui::SetScrollHere(); ScrollToBottom = false; @@ -2219,7 +2703,7 @@ struct ExampleAppConsole } // Demonstrate keeping auto focus on the input box - if (ImGui::IsItemHovered() || (ImGui::IsRootWindowOrAnyChildFocused() && !ImGui::IsAnyItemActive() && !ImGui::IsMouseClicked(0))) + if (ImGui::IsItemHovered() || (ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) && !ImGui::IsAnyItemActive() && !ImGui::IsMouseClicked(0))) ImGui::SetKeyboardFocusHere(-1); // Auto focus previous widget ImGui::End(); @@ -2388,12 +2872,12 @@ struct ExampleAppLog void Clear() { Buf.clear(); LineOffsets.clear(); } - void AddLog(const char* fmt, ...) IM_PRINTFARGS(2) + void AddLog(const char* fmt, ...) IM_FMTARGS(2) { int old_size = Buf.size(); va_list args; va_start(args, fmt); - Buf.appendv(fmt, args); + Buf.appendfv(fmt, args); va_end(args); for (int new_size = Buf.size(); old_size < new_size; old_size++) if (Buf[old_size] == '\n') @@ -2403,7 +2887,7 @@ struct ExampleAppLog void Draw(const char* title, bool* p_open = NULL) { - ImGui::SetNextWindowSize(ImVec2(500,400), ImGuiSetCond_FirstUseEver); + ImGui::SetNextWindowSize(ImVec2(500,400), ImGuiCond_FirstUseEver); ImGui::Begin(title, p_open); if (ImGui::Button("Clear")) Clear(); ImGui::SameLine(); @@ -2444,13 +2928,13 @@ static void ShowExampleAppLog(bool* p_open) { static ExampleAppLog log; - // Demo fill + // Demo: add random items (unless Ctrl is held) static float last_time = -1.0f; float time = ImGui::GetTime(); - if (time - last_time >= 0.3f) + if (time - last_time >= 0.20f && !ImGui::GetIO().KeyCtrl) { const char* random_words[] = { "system", "info", "warning", "error", "fatal", "notice", "log" }; - log.AddLog("[%s] Hello, time is %.1f, rand() %d\n", random_words[rand() % IM_ARRAYSIZE(random_words)], time, (int)rand()); + log.AddLog("[%s] Hello, time is %.1f, frame count is %d\n", random_words[rand() % IM_ARRAYSIZE(random_words)], time, ImGui::GetFrameCount()); last_time = time; } @@ -2460,7 +2944,7 @@ static void ShowExampleAppLog(bool* p_open) // Demonstrate create a window with multiple child windows. static void ShowExampleAppLayout(bool* p_open) { - ImGui::SetNextWindowSize(ImVec2(500, 440), ImGuiSetCond_FirstUseEver); + ImGui::SetNextWindowSize(ImVec2(500, 440), ImGuiCond_FirstUseEver); if (ImGui::Begin("Example: Layout", p_open, ImGuiWindowFlags_MenuBar)) { if (ImGui::BeginMenuBar()) @@ -2488,16 +2972,14 @@ static void ShowExampleAppLayout(bool* p_open) // right ImGui::BeginGroup(); - ImGui::BeginChild("item view", ImVec2(0, -ImGui::GetItemsLineHeightWithSpacing())); // Leave room for 1 line below us + ImGui::BeginChild("item view", ImVec2(0, -ImGui::GetFrameHeightWithSpacing())); // Leave room for 1 line below us ImGui::Text("MyObject: %d", selected); ImGui::Separator(); ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. "); ImGui::EndChild(); - ImGui::BeginChild("buttons"); - if (ImGui::Button("Revert")) {} - ImGui::SameLine(); - if (ImGui::Button("Save")) {} - ImGui::EndChild(); + if (ImGui::Button("Revert")) {} + ImGui::SameLine(); + if (ImGui::Button("Save")) {} ImGui::EndGroup(); } ImGui::End(); @@ -2506,7 +2988,7 @@ static void ShowExampleAppLayout(bool* p_open) // Demonstrate create a simple property editor. static void ShowExampleAppPropertyEditor(bool* p_open) { - ImGui::SetNextWindowSize(ImVec2(430,450), ImGuiSetCond_FirstUseEver); + ImGui::SetNextWindowSize(ImVec2(430,450), ImGuiCond_FirstUseEver); if (!ImGui::Begin("Example: Property editor", p_open)) { ImGui::End(); @@ -2524,10 +3006,10 @@ static void ShowExampleAppPropertyEditor(bool* p_open) static void ShowDummyObject(const char* prefix, int uid) { ImGui::PushID(uid); // Use object uid as identifier. Most commonly you could also use the object pointer as a base ID. - ImGui::AlignFirstTextHeightToWidgets(); // Text and Tree nodes are less high than regular widgets, here we add vertical spacing to make the tree lines equal high. + ImGui::AlignTextToFramePadding(); // Text and Tree nodes are less high than regular widgets, here we add vertical spacing to make the tree lines equal high. bool node_open = ImGui::TreeNode("Object", "%s_%u", prefix, uid); ImGui::NextColumn(); - ImGui::AlignFirstTextHeightToWidgets(); + ImGui::AlignTextToFramePadding(); ImGui::Text("my sailor is rich"); ImGui::NextColumn(); if (node_open) @@ -2542,7 +3024,7 @@ static void ShowExampleAppPropertyEditor(bool* p_open) } else { - ImGui::AlignFirstTextHeightToWidgets(); + ImGui::AlignTextToFramePadding(); // Here we use a Selectable (instead of Text) to highlight on hover //ImGui::Text("Field_%d", i); char label[32]; @@ -2579,7 +3061,7 @@ static void ShowExampleAppPropertyEditor(bool* p_open) // Demonstrate/test rendering huge amount of text, and the incidence of clipping. static void ShowExampleAppLongText(bool* p_open) { - ImGui::SetNextWindowSize(ImVec2(520,600), ImGuiSetCond_FirstUseEver); + ImGui::SetNextWindowSize(ImVec2(520,600), ImGuiCond_FirstUseEver); if (!ImGui::Begin("Example: Long text display", p_open)) { ImGui::End(); @@ -2590,14 +3072,14 @@ static void ShowExampleAppLongText(bool* p_open) static ImGuiTextBuffer log; static int lines = 0; ImGui::Text("Printing unusually long amount of text."); - ImGui::Combo("Test type", &test_type, "Single call to TextUnformatted()\0Multiple calls to Text(), clipped manually\0Multiple calls to Text(), not clipped\0"); + ImGui::Combo("Test type", &test_type, "Single call to TextUnformatted()\0Multiple calls to Text(), clipped manually\0Multiple calls to Text(), not clipped (slow)\0"); ImGui::Text("Buffer contents: %d lines, %d bytes", lines, log.size()); if (ImGui::Button("Clear")) { log.clear(); lines = 0; } ImGui::SameLine(); if (ImGui::Button("Add 1000 lines")) { for (int i = 0; i < 1000; i++) - log.append("%i The quick brown fox jumps over the lazy dog\n", lines+i); + log.appendf("%i The quick brown fox jumps over the lazy dog\n", lines+i); lines += 1000; } ImGui::BeginChild("Log"); @@ -2633,7 +3115,7 @@ static void ShowExampleAppLongText(bool* p_open) // End of Demo code #else -void ImGui::ShowTestWindow(bool*) {} +void ImGui::ShowDemoWindow(bool*) {} void ImGui::ShowUserGuide() {} void ImGui::ShowStyleEditor(ImGuiStyle*) {} diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp index 8d1de8c..d943afa 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp @@ -1,7 +1,8 @@ -// dear imgui, v1.50 WIP +// dear imgui, v1.54 WIP // (drawing and font code) // Contains implementation for +// - Default styles // - ImDrawList // - ImDrawData // - ImFontAtlas @@ -14,17 +15,19 @@ #include "imgui.h" #define IMGUI_DEFINE_MATH_OPERATORS -#define IMGUI_DEFINE_PLACEMENT_NEW #include "imgui_internal.h" #include // vsnprintf, sscanf, printf #if !defined(alloca) #ifdef _WIN32 #include // alloca -#elif (defined(__FreeBSD__) || defined(FreeBSD_kernel) || defined(__DragonFly__)) && !defined(__GLIBC__) -#include // alloca. FreeBSD uses stdlib.h unless GLIBC -#else +#if !defined(alloca) +#define alloca _alloca // for clang with MS Codegen +#endif +#elif defined(__GLIBC__) || defined(__sun) #include // alloca +#else +#include // alloca #endif #endif @@ -39,9 +42,15 @@ #pragma clang diagnostic ignored "-Wfloat-equal" // warning : comparing floating point with == or != is unsafe // storing and comparing against same constants ok. #pragma clang diagnostic ignored "-Wglobal-constructors" // warning : declaration requires a global destructor // similar to above, not sure what the exact difference it. #pragma clang diagnostic ignored "-Wsign-conversion" // warning : implicit conversion changes signedness // +#if __has_warning("-Wcomma") +#pragma clang diagnostic ignored "-Wcomma" // warning : possible misuse of comma operator here // +#endif #if __has_warning("-Wreserved-id-macro") #pragma clang diagnostic ignored "-Wreserved-id-macro" // warning : macro name is a reserved identifier // #endif +#if __has_warning("-Wdouble-promotion") +#pragma clang diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function +#endif #elif defined(__GNUC__) #pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used #pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function @@ -69,9 +78,9 @@ namespace IMGUI_STB_NAMESPACE #ifdef __clang__ #pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wold-style-cast" // warning : use of old-style cast // yes, they are more terse. #pragma clang diagnostic ignored "-Wunused-function" #pragma clang diagnostic ignored "-Wmissing-prototypes" +#pragma clang diagnostic ignored "-Wimplicit-fallthrough" #endif #ifdef __GNUC__ @@ -115,16 +124,191 @@ using namespace IMGUI_STB_NAMESPACE; #endif //----------------------------------------------------------------------------- -// ImDrawList +// Style functions //----------------------------------------------------------------------------- -static const ImVec4 GNullClipRect(-8192.0f, -8192.0f, +8192.0f, +8192.0f); // Large values that are easy to encode in a few bits+shift +void ImGui::StyleColorsClassic(ImGuiStyle* dst) +{ + ImGuiStyle* style = dst ? dst : &ImGui::GetStyle(); + ImVec4* colors = style->Colors; + + colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f); + colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f); + colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.70f); + colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + colors[ImGuiCol_PopupBg] = ImVec4(0.11f, 0.11f, 0.14f, 0.92f); + colors[ImGuiCol_Border] = ImVec4(0.50f, 0.50f, 0.50f, 0.50f); + colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + colors[ImGuiCol_FrameBg] = ImVec4(0.43f, 0.43f, 0.43f, 0.39f); + colors[ImGuiCol_FrameBgHovered] = ImVec4(0.47f, 0.47f, 0.69f, 0.40f); + colors[ImGuiCol_FrameBgActive] = ImVec4(0.42f, 0.41f, 0.64f, 0.69f); + colors[ImGuiCol_TitleBg] = ImVec4(0.27f, 0.27f, 0.54f, 0.83f); + colors[ImGuiCol_TitleBgActive] = ImVec4(0.32f, 0.32f, 0.63f, 0.87f); + colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.40f, 0.40f, 0.80f, 0.20f); + colors[ImGuiCol_MenuBarBg] = ImVec4(0.40f, 0.40f, 0.55f, 0.80f); + colors[ImGuiCol_ScrollbarBg] = ImVec4(0.20f, 0.25f, 0.30f, 0.60f); + colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.40f, 0.40f, 0.80f, 0.30f); + colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.40f, 0.40f, 0.80f, 0.40f); + colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.41f, 0.39f, 0.80f, 0.60f); + colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.50f); + colors[ImGuiCol_SliderGrab] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f); + colors[ImGuiCol_SliderGrabActive] = ImVec4(0.41f, 0.39f, 0.80f, 0.60f); + colors[ImGuiCol_Button] = ImVec4(0.35f, 0.40f, 0.61f, 0.62f); + colors[ImGuiCol_ButtonHovered] = ImVec4(0.40f, 0.48f, 0.71f, 0.79f); + colors[ImGuiCol_ButtonActive] = ImVec4(0.46f, 0.54f, 0.80f, 1.00f); + colors[ImGuiCol_Header] = ImVec4(0.40f, 0.40f, 0.90f, 0.45f); + colors[ImGuiCol_HeaderHovered] = ImVec4(0.45f, 0.45f, 0.90f, 0.80f); + colors[ImGuiCol_HeaderActive] = ImVec4(0.53f, 0.53f, 0.87f, 0.80f); + colors[ImGuiCol_Separator] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f); + colors[ImGuiCol_SeparatorHovered] = ImVec4(0.60f, 0.60f, 0.70f, 1.00f); + colors[ImGuiCol_SeparatorActive] = ImVec4(0.70f, 0.70f, 0.90f, 1.00f); + colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.16f); + colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.78f, 0.82f, 1.00f, 0.60f); + colors[ImGuiCol_ResizeGripActive] = ImVec4(0.78f, 0.82f, 1.00f, 0.90f); + colors[ImGuiCol_CloseButton] = ImVec4(0.50f, 0.50f, 0.90f, 0.50f); + colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.70f, 0.70f, 0.90f, 0.60f); + colors[ImGuiCol_CloseButtonActive] = ImVec4(0.70f, 0.70f, 0.70f, 1.00f); + colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); + colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f); + colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f); + colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f); + colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f); + colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f); + colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f); +} + +void ImGui::StyleColorsDark(ImGuiStyle* dst) +{ + ImGuiStyle* style = dst ? dst : &ImGui::GetStyle(); + ImVec4* colors = style->Colors; + + colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); + colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f); + colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.06f, 0.06f, 0.94f); + colors[ImGuiCol_ChildBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.00f); + colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.08f, 0.94f); + colors[ImGuiCol_Border] = ImVec4(0.43f, 0.43f, 0.50f, 0.50f); + colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + colors[ImGuiCol_FrameBg] = ImVec4(0.16f, 0.29f, 0.48f, 0.54f); + colors[ImGuiCol_FrameBgHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f); + colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); + colors[ImGuiCol_TitleBg] = ImVec4(0.04f, 0.04f, 0.04f, 1.00f); + colors[ImGuiCol_TitleBgActive] = ImVec4(0.16f, 0.29f, 0.48f, 1.00f); + colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f); + colors[ImGuiCol_MenuBarBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f); + colors[ImGuiCol_ScrollbarBg] = ImVec4(0.02f, 0.02f, 0.02f, 0.53f); + colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f); + colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f); + colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.51f, 0.51f, 0.51f, 1.00f); + colors[ImGuiCol_CheckMark] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); + colors[ImGuiCol_SliderGrab] = ImVec4(0.24f, 0.52f, 0.88f, 1.00f); + colors[ImGuiCol_SliderGrabActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); + colors[ImGuiCol_Button] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f); + colors[ImGuiCol_ButtonHovered] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); + colors[ImGuiCol_ButtonActive] = ImVec4(0.06f, 0.53f, 0.98f, 1.00f); + colors[ImGuiCol_Header] = ImVec4(0.26f, 0.59f, 0.98f, 0.31f); + colors[ImGuiCol_HeaderHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f); + colors[ImGuiCol_HeaderActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); + colors[ImGuiCol_Separator] = colors[ImGuiCol_Border];//ImVec4(0.61f, 0.61f, 0.61f, 1.00f); + colors[ImGuiCol_SeparatorHovered] = ImVec4(0.10f, 0.40f, 0.75f, 0.78f); + colors[ImGuiCol_SeparatorActive] = ImVec4(0.10f, 0.40f, 0.75f, 1.00f); + colors[ImGuiCol_ResizeGrip] = ImVec4(0.26f, 0.59f, 0.98f, 0.25f); + colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); + colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f); + colors[ImGuiCol_CloseButton] = ImVec4(0.41f, 0.41f, 0.41f, 0.50f); + colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.98f, 0.39f, 0.36f, 1.00f); + colors[ImGuiCol_CloseButtonActive] = ImVec4(0.98f, 0.39f, 0.36f, 1.00f); + colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f); + colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f); + colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f); + colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f); + colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f); + colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f); + colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f); +} + +// Those light colors are better suited with a thicker font than the default one + FrameBorder +void ImGui::StyleColorsLight(ImGuiStyle* dst) +{ + ImGuiStyle* style = dst ? dst : &ImGui::GetStyle(); + ImVec4* colors = style->Colors; + + colors[ImGuiCol_Text] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f); + colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f); + //colors[ImGuiCol_TextHovered] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); + //colors[ImGuiCol_TextActive] = ImVec4(1.00f, 1.00f, 0.00f, 1.00f); + colors[ImGuiCol_WindowBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f); + colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + colors[ImGuiCol_PopupBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.98f); + colors[ImGuiCol_Border] = ImVec4(0.00f, 0.00f, 0.00f, 0.30f); + colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); + colors[ImGuiCol_FrameBg] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); + colors[ImGuiCol_FrameBgHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f); + colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); + colors[ImGuiCol_TitleBg] = ImVec4(0.96f, 0.96f, 0.96f, 1.00f); + colors[ImGuiCol_TitleBgActive] = ImVec4(0.82f, 0.82f, 0.82f, 1.00f); + colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 1.00f, 1.00f, 0.51f); + colors[ImGuiCol_MenuBarBg] = ImVec4(0.86f, 0.86f, 0.86f, 1.00f); + colors[ImGuiCol_ScrollbarBg] = ImVec4(0.98f, 0.98f, 0.98f, 0.53f); + colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.69f, 0.69f, 0.69f, 0.80f); + colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.49f, 0.49f, 0.49f, 0.80f); + colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.49f, 0.49f, 0.49f, 1.00f); + colors[ImGuiCol_CheckMark] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); + colors[ImGuiCol_SliderGrab] = ImVec4(0.26f, 0.59f, 0.98f, 0.78f); + colors[ImGuiCol_SliderGrabActive] = ImVec4(0.46f, 0.54f, 0.80f, 0.60f); + colors[ImGuiCol_Button] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f); + colors[ImGuiCol_ButtonHovered] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); + colors[ImGuiCol_ButtonActive] = ImVec4(0.06f, 0.53f, 0.98f, 1.00f); + colors[ImGuiCol_Header] = ImVec4(0.26f, 0.59f, 0.98f, 0.31f); + colors[ImGuiCol_HeaderHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f); + colors[ImGuiCol_HeaderActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); + colors[ImGuiCol_Separator] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f); + colors[ImGuiCol_SeparatorHovered] = ImVec4(0.14f, 0.44f, 0.80f, 0.78f); + colors[ImGuiCol_SeparatorActive] = ImVec4(0.14f, 0.44f, 0.80f, 1.00f); + colors[ImGuiCol_ResizeGrip] = ImVec4(0.80f, 0.80f, 0.80f, 0.56f); + colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); + colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f); + colors[ImGuiCol_CloseButton] = ImVec4(0.59f, 0.59f, 0.59f, 0.50f); + colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.98f, 0.39f, 0.36f, 1.00f); + colors[ImGuiCol_CloseButtonActive] = ImVec4(0.98f, 0.39f, 0.36f, 1.00f); + colors[ImGuiCol_PlotLines] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f); + colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f); + colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f); + colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.45f, 0.00f, 1.00f); + colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f); + colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f); + colors[ImGuiCol_DragDropTarget] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f); +} + +//----------------------------------------------------------------------------- +// ImDrawListData +//----------------------------------------------------------------------------- + +ImDrawListSharedData::ImDrawListSharedData() +{ + Font = NULL; + FontSize = 0.0f; + CurveTessellationTol = 0.0f; + ClipRectFullscreen = ImVec4(-8192.0f, -8192.0f, +8192.0f, +8192.0f); + + // Const data + for (int i = 0; i < IM_ARRAYSIZE(CircleVtx12); i++) + { + const float a = ((float)i * 2 * IM_PI) / (float)IM_ARRAYSIZE(CircleVtx12); + CircleVtx12[i] = ImVec2(cosf(a), sinf(a)); + } +} + +//----------------------------------------------------------------------------- +// ImDrawList +//----------------------------------------------------------------------------- void ImDrawList::Clear() { CmdBuffer.resize(0); IdxBuffer.resize(0); VtxBuffer.resize(0); + Flags = ImDrawListFlags_AntiAliasedLines | ImDrawListFlags_AntiAliasedFill; _VtxCurrentIdx = 0; _VtxWritePtr = NULL; _IdxWritePtr = NULL; @@ -158,8 +342,8 @@ void ImDrawList::ClearFreeMemory() _Channels.clear(); } -// Use macros because C++ is a terrible language, we want guaranteed inline, no code in header, and no overhead in Debug mode -#define GetCurrentClipRect() (_ClipRectStack.Size ? _ClipRectStack.Data[_ClipRectStack.Size-1] : GNullClipRect) +// Using macros because C++ is a terrible language, we want guaranteed inline, no code in header, and no overhead in Debug builds +#define GetCurrentClipRect() (_ClipRectStack.Size ? _ClipRectStack.Data[_ClipRectStack.Size-1] : _Data->ClipRectFullscreen) #define GetCurrentTextureId() (_TextureIdStack.Size ? _TextureIdStack.Data[_TextureIdStack.Size-1] : NULL) void ImDrawList::AddDrawCmd() @@ -167,7 +351,7 @@ void ImDrawList::AddDrawCmd() ImDrawCmd draw_cmd; draw_cmd.ClipRect = GetCurrentClipRect(); draw_cmd.TextureId = GetCurrentTextureId(); - draw_cmd.ViewId = (unsigned char)(GImGui->Style.ViewId); + draw_cmd.ViewId = (unsigned short)(GImGui->Style.ViewId); IM_ASSERT(draw_cmd.ClipRect.x <= draw_cmd.ClipRect.z && draw_cmd.ClipRect.y <= draw_cmd.ClipRect.w); CmdBuffer.push_back(draw_cmd); @@ -221,7 +405,7 @@ void ImDrawList::UpdateTextureID() // Try to merge with previous command if it matches, else use current command ImDrawCmd* prev_cmd = CmdBuffer.Size > 1 ? curr_cmd - 1 : NULL; - if (prev_cmd && prev_cmd->TextureId == curr_texture_id && memcmp(&prev_cmd->ClipRect, &GetCurrentClipRect(), sizeof(ImVec4)) == 0 && prev_cmd->UserCallback == NULL) + if (curr_cmd->ElemCount == 0 && prev_cmd && prev_cmd->TextureId == curr_texture_id && memcmp(&prev_cmd->ClipRect, &GetCurrentClipRect(), sizeof(ImVec4)) == 0 && prev_cmd->UserCallback == NULL) CmdBuffer.pop_back(); else curr_cmd->TextureId = curr_texture_id; @@ -251,8 +435,7 @@ void ImDrawList::PushClipRect(ImVec2 cr_min, ImVec2 cr_max, bool intersect_with_ void ImDrawList::PushClipRectFullScreen() { - PushClipRect(ImVec2(GNullClipRect.x, GNullClipRect.y), ImVec2(GNullClipRect.z, GNullClipRect.w)); - //PushClipRect(GetVisibleRect()); // FIXME-OPT: This would be more correct but we're not supposed to access ImGuiContext from here? + PushClipRect(ImVec2(_Data->ClipRectFullscreen.x, _Data->ClipRectFullscreen.y), ImVec2(_Data->ClipRectFullscreen.z, _Data->ClipRectFullscreen.w)); } void ImDrawList::PopClipRect() @@ -283,7 +466,7 @@ void ImDrawList::ChannelsSplit(int channels_count) _Channels.resize(channels_count); _ChannelsCount = channels_count; - // _Channels[] (24 bytes each) hold storage that we'll swap with this->_CmdBuffer/_IdxBuffer + // _Channels[] (24/32 bytes each) hold storage that we'll swap with this->_CmdBuffer/_IdxBuffer // The content of _Channels[0] at this point doesn't matter. We clear it to make state tidy in a debugger but we don't strictly need to. // When we switch to the next channel, we'll copy _CmdBuffer/_IdxBuffer into _Channels[0] and then _Channels[1] into _CmdBuffer/_IdxBuffer memset(&_Channels[0], 0, sizeof(ImDrawChannel)); @@ -303,7 +486,7 @@ void ImDrawList::ChannelsSplit(int channels_count) ImDrawCmd draw_cmd; draw_cmd.ClipRect = _ClipRectStack.back(); draw_cmd.TextureId = _TextureIdStack.back(); - draw_cmd.ViewId = (unsigned char)(GImGui->Style.ViewId); + draw_cmd.ViewId = (unsigned short)(GImGui->Style.ViewId); _Channels[i].CmdBuffer.push_back(draw_cmd); } } @@ -339,7 +522,7 @@ void ImDrawList::ChannelsMerge() if (int sz = ch.CmdBuffer.Size) { memcpy(cmd_write, ch.CmdBuffer.Data, sz * sizeof(ImDrawCmd)); cmd_write += sz; } if (int sz = ch.IdxBuffer.Size) { memcpy(_IdxWritePtr, ch.IdxBuffer.Data, sz * sizeof(ImDrawIdx)); _IdxWritePtr += sz; } } - AddDrawCmd(); + UpdateClipRect(); // We call this instead of AddDrawCmd(), so that empty channels won't produce an extra draw call. _ChannelsCount = 1; } @@ -361,19 +544,19 @@ void ImDrawList::PrimReserve(int idx_count, int vtx_count) ImDrawCmd& draw_cmd = CmdBuffer.Data[CmdBuffer.Size-1]; draw_cmd.ElemCount += idx_count; - int vtx_buffer_size = VtxBuffer.Size; - VtxBuffer.resize(vtx_buffer_size + vtx_count); - _VtxWritePtr = VtxBuffer.Data + vtx_buffer_size; + int vtx_buffer_old_size = VtxBuffer.Size; + VtxBuffer.resize(vtx_buffer_old_size + vtx_count); + _VtxWritePtr = VtxBuffer.Data + vtx_buffer_old_size; - int idx_buffer_size = IdxBuffer.Size; - IdxBuffer.resize(idx_buffer_size + idx_count); - _IdxWritePtr = IdxBuffer.Data + idx_buffer_size; + int idx_buffer_old_size = IdxBuffer.Size; + IdxBuffer.resize(idx_buffer_old_size + idx_count); + _IdxWritePtr = IdxBuffer.Data + idx_buffer_old_size; } // Fully unrolled with inline call to keep our debug builds decently fast. void ImDrawList::PrimRect(const ImVec2& a, const ImVec2& c, ImU32 col) { - ImVec2 b(c.x, a.y), d(a.x, c.y), uv(GImGui->FontTexUvWhitePixel); + ImVec2 b(c.x, a.y), d(a.x, c.y), uv(_Data->TexUvWhitePixel); ImDrawIdx idx = (ImDrawIdx)_VtxCurrentIdx; _IdxWritePtr[0] = idx; _IdxWritePtr[1] = (ImDrawIdx)(idx+1); _IdxWritePtr[2] = (ImDrawIdx)(idx+2); _IdxWritePtr[3] = idx; _IdxWritePtr[4] = (ImDrawIdx)(idx+2); _IdxWritePtr[5] = (ImDrawIdx)(idx+3); @@ -416,25 +599,23 @@ void ImDrawList::PrimQuadUV(const ImVec2& a, const ImVec2& b, const ImVec2& c, c } // TODO: Thickness anti-aliased lines cap are missing their AA fringe. -void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32 col, bool closed, float thickness, bool anti_aliased) +void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32 col, bool closed, float thickness) { if (points_count < 2) return; - const ImVec2 uv = GImGui->FontTexUvWhitePixel; - anti_aliased &= GImGui->Style.AntiAliasedLines; - //if (ImGui::GetIO().KeyCtrl) anti_aliased = false; // Debug + const ImVec2 uv = _Data->TexUvWhitePixel; int count = points_count; if (!closed) count = points_count-1; const bool thick_line = thickness > 1.0f; - if (anti_aliased) + if (Flags & ImDrawListFlags_AntiAliasedLines) { // Anti-aliased stroke const float AA_SIZE = 1.0f; - const ImU32 col_trans = col & IM_COL32(255,255,255,0); + const ImU32 col_trans = col & ~IM_COL32_A_MASK; const int idx_count = thick_line ? count*18 : count*12; const int vtx_count = thick_line ? points_count*4 : points_count*3; @@ -597,17 +778,15 @@ void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32 } } -void ImDrawList::AddConvexPolyFilled(const ImVec2* points, const int points_count, ImU32 col, bool anti_aliased) +void ImDrawList::AddConvexPolyFilled(const ImVec2* points, const int points_count, ImU32 col) { - const ImVec2 uv = GImGui->FontTexUvWhitePixel; - anti_aliased &= GImGui->Style.AntiAliasedShapes; - //if (ImGui::GetIO().KeyCtrl) anti_aliased = false; // Debug + const ImVec2 uv = _Data->TexUvWhitePixel; - if (anti_aliased) + if (Flags & ImDrawListFlags_AntiAliasedFill) { // Anti-aliased Fill const float AA_SIZE = 1.0f; - const ImU32 col_trans = col & IM_COL32(255,255,255,0); + const ImU32 col_trans = col & ~IM_COL32_A_MASK; const int idx_count = (points_count-2)*3 + points_count*6; const int vtx_count = (points_count*2); PrimReserve(idx_count, vtx_count); @@ -680,46 +859,32 @@ void ImDrawList::AddConvexPolyFilled(const ImVec2* points, const int points_coun } } -void ImDrawList::PathArcToFast(const ImVec2& centre, float radius, int amin, int amax) +void ImDrawList::PathArcToFast(const ImVec2& centre, float radius, int a_min_of_12, int a_max_of_12) { - static ImVec2 circle_vtx[12]; - static bool circle_vtx_builds = false; - const int circle_vtx_count = IM_ARRAYSIZE(circle_vtx); - if (!circle_vtx_builds) - { - for (int i = 0; i < circle_vtx_count; i++) - { - const float a = ((float)i / (float)circle_vtx_count) * 2*IM_PI; - circle_vtx[i].x = cosf(a); - circle_vtx[i].y = sinf(a); - } - circle_vtx_builds = true; - } - - if (amin > amax) return; - if (radius == 0.0f) + if (radius == 0.0f || a_min_of_12 > a_max_of_12) { _Path.push_back(centre); + return; } - else + _Path.reserve(_Path.Size + (a_max_of_12 - a_min_of_12 + 1)); + for (int a = a_min_of_12; a <= a_max_of_12; a++) { - _Path.reserve(_Path.Size + (amax - amin + 1)); - for (int a = amin; a <= amax; a++) - { - const ImVec2& c = circle_vtx[a % circle_vtx_count]; - _Path.push_back(ImVec2(centre.x + c.x * radius, centre.y + c.y * radius)); - } + const ImVec2& c = _Data->CircleVtx12[a % IM_ARRAYSIZE(_Data->CircleVtx12)]; + _Path.push_back(ImVec2(centre.x + c.x * radius, centre.y + c.y * radius)); } } -void ImDrawList::PathArcTo(const ImVec2& centre, float radius, float amin, float amax, int num_segments) +void ImDrawList::PathArcTo(const ImVec2& centre, float radius, float a_min, float a_max, int num_segments) { if (radius == 0.0f) + { _Path.push_back(centre); + return; + } _Path.reserve(_Path.Size + (num_segments + 1)); for (int i = 0; i <= num_segments; i++) { - const float a = amin + ((float)i / (float)num_segments) * (amax - amin); + const float a = a_min + ((float)i / (float)num_segments) * (a_max - a_min); _Path.push_back(ImVec2(centre.x + cosf(a) * radius, centre.y + sinf(a) * radius)); } } @@ -756,7 +921,7 @@ void ImDrawList::PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImV if (num_segments == 0) { // Auto-tessellated - PathBezierToCasteljau(&_Path, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, GImGui->Style.CurveTessellationTol, 0); + PathBezierToCasteljau(&_Path, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, _Data->CurveTessellationTol, 0); } else { @@ -776,27 +941,26 @@ void ImDrawList::PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImV void ImDrawList::PathRect(const ImVec2& a, const ImVec2& b, float rounding, int rounding_corners) { - float r = rounding; - r = ImMin(r, fabsf(b.x-a.x) * ( ((rounding_corners&(1|2))==(1|2)) || ((rounding_corners&(4|8))==(4|8)) ? 0.5f : 1.0f ) - 1.0f); - r = ImMin(r, fabsf(b.y-a.y) * ( ((rounding_corners&(1|8))==(1|8)) || ((rounding_corners&(2|4))==(2|4)) ? 0.5f : 1.0f ) - 1.0f); + rounding = ImMin(rounding, fabsf(b.x - a.x) * ( ((rounding_corners & ImDrawCornerFlags_Top) == ImDrawCornerFlags_Top) || ((rounding_corners & ImDrawCornerFlags_Bot) == ImDrawCornerFlags_Bot) ? 0.5f : 1.0f ) - 1.0f); + rounding = ImMin(rounding, fabsf(b.y - a.y) * ( ((rounding_corners & ImDrawCornerFlags_Left) == ImDrawCornerFlags_Left) || ((rounding_corners & ImDrawCornerFlags_Right) == ImDrawCornerFlags_Right) ? 0.5f : 1.0f ) - 1.0f); - if (r <= 0.0f || rounding_corners == 0) + if (rounding <= 0.0f || rounding_corners == 0) { PathLineTo(a); - PathLineTo(ImVec2(b.x,a.y)); + PathLineTo(ImVec2(b.x, a.y)); PathLineTo(b); - PathLineTo(ImVec2(a.x,b.y)); + PathLineTo(ImVec2(a.x, b.y)); } else { - const float r0 = (rounding_corners & 1) ? r : 0.0f; - const float r1 = (rounding_corners & 2) ? r : 0.0f; - const float r2 = (rounding_corners & 4) ? r : 0.0f; - const float r3 = (rounding_corners & 8) ? r : 0.0f; - PathArcToFast(ImVec2(a.x+r0,a.y+r0), r0, 6, 9); - PathArcToFast(ImVec2(b.x-r1,a.y+r1), r1, 9, 12); - PathArcToFast(ImVec2(b.x-r2,b.y-r2), r2, 0, 3); - PathArcToFast(ImVec2(a.x+r3,b.y-r3), r3, 3, 6); + const float rounding_tl = (rounding_corners & ImDrawCornerFlags_TopLeft) ? rounding : 0.0f; + const float rounding_tr = (rounding_corners & ImDrawCornerFlags_TopRight) ? rounding : 0.0f; + const float rounding_br = (rounding_corners & ImDrawCornerFlags_BotRight) ? rounding : 0.0f; + const float rounding_bl = (rounding_corners & ImDrawCornerFlags_BotLeft) ? rounding : 0.0f; + PathArcToFast(ImVec2(a.x + rounding_tl, a.y + rounding_tl), rounding_tl, 6, 9); + PathArcToFast(ImVec2(b.x - rounding_tr, a.y + rounding_tr), rounding_tr, 9, 12); + PathArcToFast(ImVec2(b.x - rounding_br, b.y - rounding_br), rounding_br, 0, 3); + PathArcToFast(ImVec2(a.x + rounding_bl, b.y - rounding_bl), rounding_bl, 3, 6); } } @@ -825,7 +989,7 @@ void ImDrawList::AddRectFilled(const ImVec2& a, const ImVec2& b, ImU32 col, floa if (rounding > 0.0f) { PathRect(a, b, rounding, rounding_corners_flags); - PathFill(col); + PathFillConvex(col); } else { @@ -839,7 +1003,7 @@ void ImDrawList::AddRectFilledMultiColor(const ImVec2& a, const ImVec2& c, ImU32 if (((col_upr_left | col_upr_right | col_bot_right | col_bot_left) & IM_COL32_A_MASK) == 0) return; - const ImVec2 uv = GImGui->FontTexUvWhitePixel; + const ImVec2 uv = _Data->TexUvWhitePixel; PrimReserve(6, 4); PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx)); PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx+1)); PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx+2)); PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx)); PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx+2)); PrimWriteIdx((ImDrawIdx)(_VtxCurrentIdx+3)); @@ -870,7 +1034,7 @@ void ImDrawList::AddQuadFilled(const ImVec2& a, const ImVec2& b, const ImVec2& c PathLineTo(b); PathLineTo(c); PathLineTo(d); - PathFill(col); + PathFillConvex(col); } void ImDrawList::AddTriangle(const ImVec2& a, const ImVec2& b, const ImVec2& c, ImU32 col, float thickness) @@ -892,7 +1056,7 @@ void ImDrawList::AddTriangleFilled(const ImVec2& a, const ImVec2& b, const ImVec PathLineTo(a); PathLineTo(b); PathLineTo(c); - PathFill(col); + PathFillConvex(col); } void ImDrawList::AddCircle(const ImVec2& centre, float radius, ImU32 col, int num_segments, float thickness) @@ -912,7 +1076,7 @@ void ImDrawList::AddCircleFilled(const ImVec2& centre, float radius, ImU32 col, const float a_max = IM_PI*2.0f * ((float)num_segments - 1.0f) / (float)num_segments; PathArcTo(centre, radius, 0.0f, a_max, num_segments); - PathFill(col); + PathFillConvex(col); } void ImDrawList::AddBezierCurve(const ImVec2& pos0, const ImVec2& cp0, const ImVec2& cp1, const ImVec2& pos1, ImU32 col, float thickness, int num_segments) @@ -935,12 +1099,11 @@ void ImDrawList::AddText(const ImFont* font, float font_size, const ImVec2& pos, if (text_begin == text_end) return; - // Note: This is one of the few instance of breaking the encapsulation of ImDrawList, as we pull this from ImGui state, but it is just SO useful. - // Might just move Font/FontSize to ImDrawList? + // Pull default font/size from the shared ImDrawListSharedData instance if (font == NULL) - font = GImGui->Font; + font = _Data->Font; if (font_size == 0.0f) - font_size = GImGui->FontSize; + font_size = _Data->FontSize; IM_ASSERT(font->ContainerAtlas->TexID == _TextureIdStack.back()); // Use high-level ImGui::PushFont() or low-level ImDrawList::PushTextureId() to change font. @@ -957,21 +1120,61 @@ void ImDrawList::AddText(const ImFont* font, float font_size, const ImVec2& pos, void ImDrawList::AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end) { - AddText(GImGui->Font, GImGui->FontSize, pos, col, text_begin, text_end); + AddText(NULL, 0.0f, pos, col, text_begin, text_end); } -void ImDrawList::AddImage(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& uv0, const ImVec2& uv1, ImU32 col) +void ImDrawList::AddImage(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col) { if ((col & IM_COL32_A_MASK) == 0) return; - // FIXME-OPT: This is wasting draw calls. const bool push_texture_id = _TextureIdStack.empty() || user_texture_id != _TextureIdStack.back(); if (push_texture_id) PushTextureID(user_texture_id); PrimReserve(6, 4); - PrimRectUV(a, b, uv0, uv1, col); + PrimRectUV(a, b, uv_a, uv_b, col); + + if (push_texture_id) + PopTextureID(); +} + +void ImDrawList::AddImageQuad(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col) +{ + if ((col & IM_COL32_A_MASK) == 0) + return; + + const bool push_texture_id = _TextureIdStack.empty() || user_texture_id != _TextureIdStack.back(); + if (push_texture_id) + PushTextureID(user_texture_id); + + PrimReserve(6, 4); + PrimQuadUV(a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + + if (push_texture_id) + PopTextureID(); +} + +void ImDrawList::AddImageRounded(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col, float rounding, int rounding_corners) +{ + if ((col & IM_COL32_A_MASK) == 0) + return; + + if (rounding <= 0.0f || (rounding_corners & ImDrawCornerFlags_All) == 0) + { + AddImage(user_texture_id, a, b, uv_a, uv_b, col); + return; + } + + const bool push_texture_id = _TextureIdStack.empty() || user_texture_id != _TextureIdStack.back(); + if (push_texture_id) + PushTextureID(user_texture_id); + + int vert_start_idx = VtxBuffer.Size; + PathRect(a, b, rounding, rounding_corners); + PathFillConvex(col); + int vert_end_idx = VtxBuffer.Size; + ImGui::ShadeVertsLinearUV(VtxBuffer.Data + vert_start_idx, VtxBuffer.Data + vert_end_idx, a, b, uv_a, uv_b, true); if (push_texture_id) PopTextureID(); @@ -1015,7 +1218,68 @@ void ImDrawData::ScaleClipRects(const ImVec2& scale) } //----------------------------------------------------------------------------- -// ImFontAtlas +// Shade functions +//----------------------------------------------------------------------------- + +// Generic linear color gradient, write to RGB fields, leave A untouched. +void ImGui::ShadeVertsLinearColorGradientKeepAlpha(ImDrawVert* vert_start, ImDrawVert* vert_end, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1) +{ + ImVec2 gradient_extent = gradient_p1 - gradient_p0; + float gradient_inv_length2 = 1.0f / ImLengthSqr(gradient_extent); + for (ImDrawVert* vert = vert_start; vert < vert_end; vert++) + { + float d = ImDot(vert->pos - gradient_p0, gradient_extent); + float t = ImClamp(d * gradient_inv_length2, 0.0f, 1.0f); + int r = ImLerp((int)(col0 >> IM_COL32_R_SHIFT) & 0xFF, (int)(col1 >> IM_COL32_R_SHIFT) & 0xFF, t); + int g = ImLerp((int)(col0 >> IM_COL32_G_SHIFT) & 0xFF, (int)(col1 >> IM_COL32_G_SHIFT) & 0xFF, t); + int b = ImLerp((int)(col0 >> IM_COL32_B_SHIFT) & 0xFF, (int)(col1 >> IM_COL32_B_SHIFT) & 0xFF, t); + vert->col = (r << IM_COL32_R_SHIFT) | (g << IM_COL32_G_SHIFT) | (b << IM_COL32_B_SHIFT) | (vert->col & IM_COL32_A_MASK); + } +} + +// Scan and shade backward from the end of given vertices. Assume vertices are text only (= vert_start..vert_end going left to right) so we can break as soon as we are out the gradient bounds. +void ImGui::ShadeVertsLinearAlphaGradientForLeftToRightText(ImDrawVert* vert_start, ImDrawVert* vert_end, float gradient_p0_x, float gradient_p1_x) +{ + float gradient_extent_x = gradient_p1_x - gradient_p0_x; + float gradient_inv_length2 = 1.0f / (gradient_extent_x * gradient_extent_x); + int full_alpha_count = 0; + for (ImDrawVert* vert = vert_end - 1; vert >= vert_start; vert--) + { + float d = (vert->pos.x - gradient_p0_x) * (gradient_extent_x); + float alpha_mul = 1.0f - ImClamp(d * gradient_inv_length2, 0.0f, 1.0f); + if (alpha_mul >= 1.0f && ++full_alpha_count > 2) + return; // Early out + int a = (int)(((vert->col >> IM_COL32_A_SHIFT) & 0xFF) * alpha_mul); + vert->col = (vert->col & ~IM_COL32_A_MASK) | (a << IM_COL32_A_SHIFT); + } +} + +// Distribute UV over (a, b) rectangle +void ImGui::ShadeVertsLinearUV(ImDrawVert* vert_start, ImDrawVert* vert_end, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp) +{ + const ImVec2 size = b - a; + const ImVec2 uv_size = uv_b - uv_a; + const ImVec2 scale = ImVec2( + size.x != 0.0f ? (uv_size.x / size.x) : 0.0f, + size.y != 0.0f ? (uv_size.y / size.y) : 0.0f); + + if (clamp) + { + const ImVec2 min = ImMin(uv_a, uv_b); + const ImVec2 max = ImMax(uv_a, uv_b); + + for (ImDrawVert* vertex = vert_start; vertex < vert_end; ++vertex) + vertex->uv = ImClamp(uv_a + ImMul(ImVec2(vertex->pos.x, vertex->pos.y) - a, scale), min, max); + } + else + { + for (ImDrawVert* vertex = vert_start; vertex < vert_end; ++vertex) + vertex->uv = uv_a + ImMul(ImVec2(vertex->pos.x, vertex->pos.y) - a, scale); + } +} + +//----------------------------------------------------------------------------- +// ImFontConfig //----------------------------------------------------------------------------- ImFontConfig::ImFontConfig() @@ -1029,20 +1293,79 @@ ImFontConfig::ImFontConfig() OversampleV = 1; PixelSnapH = false; GlyphExtraSpacing = ImVec2(0.0f, 0.0f); + GlyphOffset = ImVec2(0.0f, 0.0f); GlyphRanges = NULL; MergeMode = false; - MergeGlyphCenterV = false; - DstFont = NULL; + RasterizerFlags = 0x00; + RasterizerMultiply = 1.0f; memset(Name, 0, sizeof(Name)); + DstFont = NULL; } +//----------------------------------------------------------------------------- +// ImFontAtlas +//----------------------------------------------------------------------------- + +// A work of art lies ahead! (. = white layer, X = black layer, others are blank) +// The white texels on the top left are the ones we'll use everywhere in ImGui to render filled shapes. +const int FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF = 90; +const int FONT_ATLAS_DEFAULT_TEX_DATA_H = 27; +const unsigned int FONT_ATLAS_DEFAULT_TEX_DATA_ID = 0x80000000; +static const char FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF * FONT_ATLAS_DEFAULT_TEX_DATA_H + 1] = +{ + "..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX" + "..- -X.....X- X.X - X.X -X.....X - X.....X" + "--- -XXX.XXX- X...X - X...X -X....X - X....X" + "X - X.X - X.....X - X.....X -X...X - X...X" + "XX - X.X -X.......X- X.......X -X..X.X - X.X..X" + "X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X" + "X..X - X.X - X.X - X.X -XX X.X - X.X XX" + "X...X - X.X - X.X - XX X.X XX - X.X - X.X " + "X....X - X.X - X.X - X.X X.X X.X - X.X - X.X " + "X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X " + "X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X " + "X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X " + "X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X " + "X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X " + "X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X " + "X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X " + "X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX " + "X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------" + "X.X X..X - -X.......X- X.......X - XX XX - " + "XX X..X - - X.....X - X.....X - X.X X.X - " + " X..X - X...X - X...X - X..X X..X - " + " XX - X.X - X.X - X...XXXXXXXXXXXXX...X - " + "------------ - X - X -X.....................X- " + " ----------------------------------- X...XXXXXXXXXXXXX...X - " + " - X..X X..X - " + " - X.X X.X - " + " - XX XX - " +}; + +static const ImVec2 FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[ImGuiMouseCursor_Count_][3] = +{ + // Pos ........ Size ......... Offset ...... + { ImVec2(0,3), ImVec2(12,19), ImVec2( 0, 0) }, // ImGuiMouseCursor_Arrow + { ImVec2(13,0), ImVec2(7,16), ImVec2( 4, 8) }, // ImGuiMouseCursor_TextInput + { ImVec2(31,0), ImVec2(23,23), ImVec2(11,11) }, // ImGuiMouseCursor_Move + { ImVec2(21,0), ImVec2( 9,23), ImVec2( 5,11) }, // ImGuiMouseCursor_ResizeNS + { ImVec2(55,18),ImVec2(23, 9), ImVec2(11, 5) }, // ImGuiMouseCursor_ResizeEW + { ImVec2(73,0), ImVec2(17,17), ImVec2( 9, 9) }, // ImGuiMouseCursor_ResizeNESW + { ImVec2(55,0), ImVec2(17,17), ImVec2( 9, 9) }, // ImGuiMouseCursor_ResizeNWSE +}; + ImFontAtlas::ImFontAtlas() { TexID = NULL; + TexDesiredWidth = 0; + TexGlyphPadding = 1; TexPixelsAlpha8 = NULL; TexPixelsRGBA32 = NULL; - TexWidth = TexHeight = TexDesiredWidth = 0; - TexUvWhitePixel = ImVec2(0, 0); + TexWidth = TexHeight = 0; + TexUvScale = ImVec2(0.0f, 0.0f); + TexUvWhitePixel = ImVec2(0.0f, 0.0f); + for (int n = 0; n < IM_ARRAYSIZE(CustomRectIds); n++) + CustomRectIds[n] = -1; } ImFontAtlas::~ImFontAtlas() @@ -1059,7 +1382,7 @@ void ImFontAtlas::ClearInputData() ConfigData[i].FontData = NULL; } - // When clearing this we lose access to the font name and other information used to build the font. + // When clearing this we lose access to the font name and other information used to build the font. for (int i = 0; i < Fonts.Size; i++) if (Fonts[i]->ConfigData >= ConfigData.Data && Fonts[i]->ConfigData < ConfigData.Data + ConfigData.Size) { @@ -1067,6 +1390,9 @@ void ImFontAtlas::ClearInputData() Fonts[i]->ConfigDataCount = 0; } ConfigData.clear(); + CustomRects.clear(); + for (int n = 0; n < IM_ARRAYSIZE(CustomRectIds); n++) + CustomRectIds[n] = -1; } void ImFontAtlas::ClearTexData() @@ -1082,10 +1408,7 @@ void ImFontAtlas::ClearTexData() void ImFontAtlas::ClearFonts() { for (int i = 0; i < Fonts.Size; i++) - { - Fonts[i]->~ImFont(); - ImGui::MemFree(Fonts[i]); - } + IM_DELETE(Fonts[i]); Fonts.clear(); } @@ -1118,13 +1441,16 @@ void ImFontAtlas::GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_wid // Although it is likely to be the most commonly used format, our font rendering is 1 channel / 8 bpp if (!TexPixelsRGBA32) { - unsigned char* pixels; + unsigned char* pixels = NULL; GetTexDataAsAlpha8(&pixels, NULL, NULL); - TexPixelsRGBA32 = (unsigned int*)ImGui::MemAlloc((size_t)(TexWidth * TexHeight * 4)); - const unsigned char* src = pixels; - unsigned int* dst = TexPixelsRGBA32; - for (int n = TexWidth * TexHeight; n > 0; n--) - *dst++ = IM_COL32(255, 255, 255, (unsigned int)(*src++)); + if (pixels) + { + TexPixelsRGBA32 = (unsigned int*)ImGui::MemAlloc((size_t)(TexWidth * TexHeight * 4)); + const unsigned char* src = pixels; + unsigned int* dst = TexPixelsRGBA32; + for (int n = TexWidth * TexHeight; n > 0; n--) + *dst++ = IM_COL32(255, 255, 255, (unsigned int)(*src++)); + } } *out_pixels = (unsigned char*)TexPixelsRGBA32; @@ -1140,16 +1466,14 @@ ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg) // Create new font if (!font_cfg->MergeMode) - { - ImFont* font = (ImFont*)ImGui::MemAlloc(sizeof(ImFont)); - IM_PLACEMENT_NEW(font) ImFont(); - Fonts.push_back(font); - } + Fonts.push_back(IM_NEW(ImFont)); + else + IM_ASSERT(!Fonts.empty()); // When using MergeMode make sure that a font has already been added before. You can use ImGui::GetIO().Fonts->AddFontDefault() to add the default imgui font. ConfigData.push_back(*font_cfg); ImFontConfig& new_font_cfg = ConfigData.back(); - if (!new_font_cfg.DstFont) - new_font_cfg.DstFont = Fonts.back(); + if (!new_font_cfg.DstFont) + new_font_cfg.DstFont = Fonts.back(); if (!new_font_cfg.FontDataOwnedByAtlas) { new_font_cfg.FontData = ImGui::MemAlloc(new_font_cfg.FontDataSize); @@ -1162,7 +1486,7 @@ ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg) return new_font_cfg.DstFont; } -// Default font TTF is compressed with stb_compress then base85 encoded (see extra_fonts/binary_to_compressed_c.cpp for encoder) +// Default font TTF is compressed with stb_compress then base85 encoded (see misc/fonts/binary_to_compressed_c.cpp for encoder) static unsigned int stb_decompress_length(unsigned char *input); static unsigned int stb_decompress(unsigned char *output, unsigned char *i, unsigned int length); static const char* GetDefaultCompressedFontDataTTFBase85(); @@ -1188,9 +1512,10 @@ ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template) font_cfg.PixelSnapH = true; } if (font_cfg.Name[0] == '\0') strcpy(font_cfg.Name, "ProggyClean.ttf, 13px"); + if (font_cfg.SizePixels <= 0.0f) font_cfg.SizePixels = 13.0f; const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85(); - ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, 13.0f, &font_cfg, GetGlyphRangesDefault()); + ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_cfg.SizePixels, &font_cfg, GetGlyphRangesDefault()); return font; } @@ -1214,7 +1539,7 @@ ImFont* ImFontAtlas::AddFontFromFileTTF(const char* filename, float size_pixels, return AddFontFromMemoryTTF(data, data_size, size_pixels, &font_cfg, glyph_ranges); } -// NBM Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build(). +// NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build(). ImFont* ImFontAtlas::AddFontFromMemoryTTF(void* ttf_data, int ttf_size, float size_pixels, const ImFontConfig* font_cfg_template, const ImWchar* glyph_ranges) { ImFontConfig font_cfg = font_cfg_template ? *font_cfg_template : ImFontConfig(); @@ -1249,92 +1574,172 @@ ImFont* ImFontAtlas::AddFontFromMemoryCompressedBase85TTF(const char* compressed return font; } +int ImFontAtlas::AddCustomRectRegular(unsigned int id, int width, int height) +{ + IM_ASSERT(id >= 0x10000); + IM_ASSERT(width > 0 && width <= 0xFFFF); + IM_ASSERT(height > 0 && height <= 0xFFFF); + CustomRect r; + r.ID = id; + r.Width = (unsigned short)width; + r.Height = (unsigned short)height; + CustomRects.push_back(r); + return CustomRects.Size - 1; // Return index +} + +int ImFontAtlas::AddCustomRectFontGlyph(ImFont* font, ImWchar id, int width, int height, float advance_x, const ImVec2& offset) +{ + IM_ASSERT(font != NULL); + IM_ASSERT(width > 0 && width <= 0xFFFF); + IM_ASSERT(height > 0 && height <= 0xFFFF); + CustomRect r; + r.ID = id; + r.Width = (unsigned short)width; + r.Height = (unsigned short)height; + r.GlyphAdvanceX = advance_x; + r.GlyphOffset = offset; + r.Font = font; + CustomRects.push_back(r); + return CustomRects.Size - 1; // Return index +} + +void ImFontAtlas::CalcCustomRectUV(const CustomRect* rect, ImVec2* out_uv_min, ImVec2* out_uv_max) +{ + IM_ASSERT(TexWidth > 0 && TexHeight > 0); // Font atlas needs to be built before we can calculate UV coordinates + IM_ASSERT(rect->IsPacked()); // Make sure the rectangle has been packed + *out_uv_min = ImVec2((float)rect->X * TexUvScale.x, (float)rect->Y * TexUvScale.y); + *out_uv_max = ImVec2((float)(rect->X + rect->Width) * TexUvScale.x, (float)(rect->Y + rect->Height) * TexUvScale.y); +} + +bool ImFontAtlas::GetMouseCursorTexData(ImGuiMouseCursor cursor_type, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]) +{ + if (cursor_type <= ImGuiMouseCursor_None || cursor_type >= ImGuiMouseCursor_Count_) + return false; + + ImFontAtlas::CustomRect& r = CustomRects[CustomRectIds[0]]; + IM_ASSERT(r.ID == FONT_ATLAS_DEFAULT_TEX_DATA_ID); + ImVec2 pos = FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[cursor_type][0] + ImVec2((float)r.X, (float)r.Y); + ImVec2 size = FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[cursor_type][1]; + *out_size = size; + *out_offset = FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[cursor_type][2]; + out_uv_border[0] = (pos) * TexUvScale; + out_uv_border[1] = (pos + size) * TexUvScale; + pos.x += FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF + 1; + out_uv_fill[0] = (pos) * TexUvScale; + out_uv_fill[1] = (pos + size) * TexUvScale; + return true; +} + bool ImFontAtlas::Build() { - IM_ASSERT(ConfigData.Size > 0); + return ImFontAtlasBuildWithStbTruetype(this); +} - TexID = NULL; - TexWidth = TexHeight = 0; - TexUvWhitePixel = ImVec2(0, 0); - ClearTexData(); +void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_brighten_factor) +{ + for (unsigned int i = 0; i < 256; i++) + { + unsigned int value = (unsigned int)(i * in_brighten_factor); + out_table[i] = value > 255 ? 255 : (value & 0xFF); + } +} +void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsigned char* pixels, int x, int y, int w, int h, int stride) +{ + unsigned char* data = pixels + x + y * stride; + for (int j = h; j > 0; j--, data += stride) + for (int i = 0; i < w; i++) + data[i] = table[data[i]]; +} + +bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas) +{ + IM_ASSERT(atlas->ConfigData.Size > 0); + + ImFontAtlasBuildRegisterDefaultCustomRects(atlas); + + atlas->TexID = NULL; + atlas->TexWidth = atlas->TexHeight = 0; + atlas->TexUvScale = ImVec2(0.0f, 0.0f); + atlas->TexUvWhitePixel = ImVec2(0.0f, 0.0f); + atlas->ClearTexData(); + + // Count glyphs/ranges + int total_glyphs_count = 0; + int total_ranges_count = 0; + for (int input_i = 0; input_i < atlas->ConfigData.Size; input_i++) + { + ImFontConfig& cfg = atlas->ConfigData[input_i]; + if (!cfg.GlyphRanges) + cfg.GlyphRanges = atlas->GetGlyphRangesDefault(); + for (const ImWchar* in_range = cfg.GlyphRanges; in_range[0] && in_range[1]; in_range += 2, total_ranges_count++) + total_glyphs_count += (in_range[1] - in_range[0]) + 1; + } + + // We need a width for the skyline algorithm. Using a dumb heuristic here to decide of width. User can override TexDesiredWidth and TexGlyphPadding if they wish. + // Width doesn't really matter much, but some API/GPU have texture size limitations and increasing width can decrease height. + atlas->TexWidth = (atlas->TexDesiredWidth > 0) ? atlas->TexDesiredWidth : (total_glyphs_count > 4000) ? 4096 : (total_glyphs_count > 2000) ? 2048 : (total_glyphs_count > 1000) ? 1024 : 512; + atlas->TexHeight = 0; + + // Start packing + const int max_tex_height = 1024*32; + stbtt_pack_context spc = {}; + stbtt_PackBegin(&spc, NULL, atlas->TexWidth, max_tex_height, 0, atlas->TexGlyphPadding, NULL); + stbtt_PackSetOversampling(&spc, 1, 1); + + // Pack our extra data rectangles first, so it will be on the upper-left corner of our texture (UV will have small values). + ImFontAtlasBuildPackCustomRects(atlas, spc.pack_info); + + // Initialize font information (so we can error without any cleanup) struct ImFontTempBuildData { stbtt_fontinfo FontInfo; stbrp_rect* Rects; + int RectsCount; stbtt_pack_range* Ranges; int RangesCount; }; - ImFontTempBuildData* tmp_array = (ImFontTempBuildData*)ImGui::MemAlloc((size_t)ConfigData.Size * sizeof(ImFontTempBuildData)); - - // Initialize font information early (so we can error without any cleanup) + count glyphs - int total_glyph_count = 0; - int total_glyph_range_count = 0; - for (int input_i = 0; input_i < ConfigData.Size; input_i++) + ImFontTempBuildData* tmp_array = (ImFontTempBuildData*)ImGui::MemAlloc((size_t)atlas->ConfigData.Size * sizeof(ImFontTempBuildData)); + for (int input_i = 0; input_i < atlas->ConfigData.Size; input_i++) { - ImFontConfig& cfg = ConfigData[input_i]; + ImFontConfig& cfg = atlas->ConfigData[input_i]; ImFontTempBuildData& tmp = tmp_array[input_i]; + IM_ASSERT(cfg.DstFont && (!cfg.DstFont->IsLoaded() || cfg.DstFont->ContainerAtlas == atlas)); - IM_ASSERT(cfg.DstFont && (!cfg.DstFont->IsLoaded() || cfg.DstFont->ContainerAtlas == this)); const int font_offset = stbtt_GetFontOffsetForIndex((unsigned char*)cfg.FontData, cfg.FontNo); IM_ASSERT(font_offset >= 0); if (!stbtt_InitFont(&tmp.FontInfo, (unsigned char*)cfg.FontData, font_offset)) - return false; - - // Count glyphs - if (!cfg.GlyphRanges) - cfg.GlyphRanges = GetGlyphRangesDefault(); - for (const ImWchar* in_range = cfg.GlyphRanges; in_range[0] && in_range[1]; in_range += 2) { - total_glyph_count += (in_range[1] - in_range[0]) + 1; - total_glyph_range_count++; + atlas->TexWidth = atlas->TexHeight = 0; // Reset output on failure + ImGui::MemFree(tmp_array); + return false; } } - // Start packing. We need a known width for the skyline algorithm. Using a cheap heuristic here to decide of width. User can override TexDesiredWidth if they wish. - // After packing is done, width shouldn't matter much, but some API/GPU have texture size limitations and increasing width can decrease height. - TexWidth = (TexDesiredWidth > 0) ? TexDesiredWidth : (total_glyph_count > 4000) ? 4096 : (total_glyph_count > 2000) ? 2048 : (total_glyph_count > 1000) ? 1024 : 512; - TexHeight = 0; - const int max_tex_height = 1024*32; - stbtt_pack_context spc; - stbtt_PackBegin(&spc, NULL, TexWidth, max_tex_height, 0, 1, NULL); - - // Pack our extra data rectangles first, so it will be on the upper-left corner of our texture (UV will have small values). - ImVector extra_rects; - RenderCustomTexData(0, &extra_rects); - stbtt_PackSetOversampling(&spc, 1, 1); - stbrp_pack_rects((stbrp_context*)spc.pack_info, &extra_rects[0], extra_rects.Size); - for (int i = 0; i < extra_rects.Size; i++) - if (extra_rects[i].was_packed) - TexHeight = ImMax(TexHeight, extra_rects[i].y + extra_rects[i].h); - // Allocate packing character data and flag packed characters buffer as non-packed (x0=y0=x1=y1=0) int buf_packedchars_n = 0, buf_rects_n = 0, buf_ranges_n = 0; - stbtt_packedchar* buf_packedchars = (stbtt_packedchar*)ImGui::MemAlloc(total_glyph_count * sizeof(stbtt_packedchar)); - stbrp_rect* buf_rects = (stbrp_rect*)ImGui::MemAlloc(total_glyph_count * sizeof(stbrp_rect)); - stbtt_pack_range* buf_ranges = (stbtt_pack_range*)ImGui::MemAlloc(total_glyph_range_count * sizeof(stbtt_pack_range)); - memset(buf_packedchars, 0, total_glyph_count * sizeof(stbtt_packedchar)); - memset(buf_rects, 0, total_glyph_count * sizeof(stbrp_rect)); // Unnecessary but let's clear this for the sake of sanity. - memset(buf_ranges, 0, total_glyph_range_count * sizeof(stbtt_pack_range)); + stbtt_packedchar* buf_packedchars = (stbtt_packedchar*)ImGui::MemAlloc(total_glyphs_count * sizeof(stbtt_packedchar)); + stbrp_rect* buf_rects = (stbrp_rect*)ImGui::MemAlloc(total_glyphs_count * sizeof(stbrp_rect)); + stbtt_pack_range* buf_ranges = (stbtt_pack_range*)ImGui::MemAlloc(total_ranges_count * sizeof(stbtt_pack_range)); + memset(buf_packedchars, 0, total_glyphs_count * sizeof(stbtt_packedchar)); + memset(buf_rects, 0, total_glyphs_count * sizeof(stbrp_rect)); // Unnecessary but let's clear this for the sake of sanity. + memset(buf_ranges, 0, total_ranges_count * sizeof(stbtt_pack_range)); // First font pass: pack all glyphs (no rendering at this point, we are working with rectangles in an infinitely tall texture at this point) - for (int input_i = 0; input_i < ConfigData.Size; input_i++) + for (int input_i = 0; input_i < atlas->ConfigData.Size; input_i++) { - ImFontConfig& cfg = ConfigData[input_i]; + ImFontConfig& cfg = atlas->ConfigData[input_i]; ImFontTempBuildData& tmp = tmp_array[input_i]; // Setup ranges - int glyph_count = 0; - int glyph_ranges_count = 0; - for (const ImWchar* in_range = cfg.GlyphRanges; in_range[0] && in_range[1]; in_range += 2) - { - glyph_count += (in_range[1] - in_range[0]) + 1; - glyph_ranges_count++; - } + int font_glyphs_count = 0; + int font_ranges_count = 0; + for (const ImWchar* in_range = cfg.GlyphRanges; in_range[0] && in_range[1]; in_range += 2, font_ranges_count++) + font_glyphs_count += (in_range[1] - in_range[0]) + 1; tmp.Ranges = buf_ranges + buf_ranges_n; - tmp.RangesCount = glyph_ranges_count; - buf_ranges_n += glyph_ranges_count; - for (int i = 0; i < glyph_ranges_count; i++) + tmp.RangesCount = font_ranges_count; + buf_ranges_n += font_ranges_count; + for (int i = 0; i < font_ranges_count; i++) { const ImWchar* in_range = &cfg.GlyphRanges[i * 2]; stbtt_pack_range& range = tmp.Ranges[i]; @@ -1347,34 +1752,45 @@ bool ImFontAtlas::Build() // Pack tmp.Rects = buf_rects + buf_rects_n; - buf_rects_n += glyph_count; + tmp.RectsCount = font_glyphs_count; + buf_rects_n += font_glyphs_count; stbtt_PackSetOversampling(&spc, cfg.OversampleH, cfg.OversampleV); int n = stbtt_PackFontRangesGatherRects(&spc, &tmp.FontInfo, tmp.Ranges, tmp.RangesCount, tmp.Rects); + IM_ASSERT(n == font_glyphs_count); stbrp_pack_rects((stbrp_context*)spc.pack_info, tmp.Rects, n); // Extend texture height for (int i = 0; i < n; i++) if (tmp.Rects[i].was_packed) - TexHeight = ImMax(TexHeight, tmp.Rects[i].y + tmp.Rects[i].h); + atlas->TexHeight = ImMax(atlas->TexHeight, tmp.Rects[i].y + tmp.Rects[i].h); } - IM_ASSERT(buf_rects_n == total_glyph_count); - IM_ASSERT(buf_packedchars_n == total_glyph_count); - IM_ASSERT(buf_ranges_n == total_glyph_range_count); + IM_ASSERT(buf_rects_n == total_glyphs_count); + IM_ASSERT(buf_packedchars_n == total_glyphs_count); + IM_ASSERT(buf_ranges_n == total_ranges_count); // Create texture - TexHeight = ImUpperPowerOfTwo(TexHeight); - TexPixelsAlpha8 = (unsigned char*)ImGui::MemAlloc(TexWidth * TexHeight); - memset(TexPixelsAlpha8, 0, TexWidth * TexHeight); - spc.pixels = TexPixelsAlpha8; - spc.height = TexHeight; + atlas->TexHeight = ImUpperPowerOfTwo(atlas->TexHeight); + atlas->TexUvScale = ImVec2(1.0f / atlas->TexWidth, 1.0f / atlas->TexHeight); + atlas->TexPixelsAlpha8 = (unsigned char*)ImGui::MemAlloc(atlas->TexWidth * atlas->TexHeight); + memset(atlas->TexPixelsAlpha8, 0, atlas->TexWidth * atlas->TexHeight); + spc.pixels = atlas->TexPixelsAlpha8; + spc.height = atlas->TexHeight; - // Second pass: render characters - for (int input_i = 0; input_i < ConfigData.Size; input_i++) + // Second pass: render font characters + for (int input_i = 0; input_i < atlas->ConfigData.Size; input_i++) { - ImFontConfig& cfg = ConfigData[input_i]; + ImFontConfig& cfg = atlas->ConfigData[input_i]; ImFontTempBuildData& tmp = tmp_array[input_i]; stbtt_PackSetOversampling(&spc, cfg.OversampleH, cfg.OversampleV); stbtt_PackFontRangesRenderIntoRects(&spc, &tmp.FontInfo, tmp.Ranges, tmp.RangesCount, tmp.Rects); + if (cfg.RasterizerMultiply != 1.0f) + { + unsigned char multiply_table[256]; + ImFontAtlasBuildMultiplyCalcLookupTable(multiply_table, cfg.RasterizerMultiply); + for (const stbrp_rect* r = tmp.Rects; r != tmp.Rects + tmp.RectsCount; r++) + if (r->was_packed) + ImFontAtlasBuildMultiplyRectAlpha8(multiply_table, spc.pixels, r->x, r->y, r->w, r->h, spc.stride_in_bytes); + } tmp.Rects = NULL; } @@ -1384,33 +1800,22 @@ bool ImFontAtlas::Build() buf_rects = NULL; // Third pass: setup ImFont and glyphs for runtime - for (int input_i = 0; input_i < ConfigData.Size; input_i++) + for (int input_i = 0; input_i < atlas->ConfigData.Size; input_i++) { - ImFontConfig& cfg = ConfigData[input_i]; + ImFontConfig& cfg = atlas->ConfigData[input_i]; ImFontTempBuildData& tmp = tmp_array[input_i]; ImFont* dst_font = cfg.DstFont; // We can have multiple input fonts writing into a same destination font (when using MergeMode=true) - float font_scale = stbtt_ScaleForPixelHeight(&tmp.FontInfo, cfg.SizePixels); + const float font_scale = stbtt_ScaleForPixelHeight(&tmp.FontInfo, cfg.SizePixels); int unscaled_ascent, unscaled_descent, unscaled_line_gap; stbtt_GetFontVMetrics(&tmp.FontInfo, &unscaled_ascent, &unscaled_descent, &unscaled_line_gap); - float ascent = unscaled_ascent * font_scale; - float descent = unscaled_descent * font_scale; - if (!cfg.MergeMode) - { - dst_font->ContainerAtlas = this; - dst_font->ConfigData = &cfg; - dst_font->ConfigDataCount = 0; - dst_font->FontSize = cfg.SizePixels; - dst_font->Ascent = ascent; - dst_font->Descent = descent; - dst_font->Glyphs.resize(0); - dst_font->MetricsTotalSurface = 0; - } - dst_font->ConfigDataCount++; - float off_y = (cfg.MergeMode && cfg.MergeGlyphCenterV) ? (ascent - dst_font->Ascent) * 0.5f : 0.0f; + const float ascent = unscaled_ascent * font_scale; + const float descent = unscaled_descent * font_scale; + ImFontAtlasBuildSetupFont(atlas, dst_font, &cfg, ascent, descent); + const float off_x = cfg.GlyphOffset.x; + const float off_y = cfg.GlyphOffset.y + (float)(int)(dst_font->Ascent + 0.5f); - dst_font->FallbackGlyph = NULL; // Always clear fallback so FindGlyph can return NULL. It will be set again in BuildLookupTable() for (int i = 0; i < tmp.RangesCount; i++) { stbtt_pack_range& range = tmp.Ranges[i]; @@ -1426,22 +1831,10 @@ bool ImFontAtlas::Build() stbtt_aligned_quad q; float dummy_x = 0.0f, dummy_y = 0.0f; - stbtt_GetPackedQuad(range.chardata_for_range, TexWidth, TexHeight, char_idx, &dummy_x, &dummy_y, &q, 0); - - dst_font->Glyphs.resize(dst_font->Glyphs.Size + 1); - ImFont::Glyph& glyph = dst_font->Glyphs.back(); - glyph.Codepoint = (ImWchar)codepoint; - glyph.X0 = q.x0; glyph.Y0 = q.y0; glyph.X1 = q.x1; glyph.Y1 = q.y1; - glyph.U0 = q.s0; glyph.V0 = q.t0; glyph.U1 = q.s1; glyph.V1 = q.t1; - glyph.Y0 += (float)(int)(dst_font->Ascent + off_y + 0.5f); - glyph.Y1 += (float)(int)(dst_font->Ascent + off_y + 0.5f); - glyph.XAdvance = (pc.xadvance + cfg.GlyphExtraSpacing.x); // Bake spacing into XAdvance - if (cfg.PixelSnapH) - glyph.XAdvance = (float)(int)(glyph.XAdvance + 0.5f); - dst_font->MetricsTotalSurface += (int)(glyph.X1 - glyph.X0 + 1.99f) * (int)(glyph.Y1 - glyph.Y0 + 1.99f); // +1 to account for average padding, +0.99 to round + stbtt_GetPackedQuad(range.chardata_for_range, atlas->TexWidth, atlas->TexHeight, char_idx, &dummy_x, &dummy_y, &q, 0); + dst_font->AddGlyph((ImWchar)codepoint, q.x0 + off_x, q.y0 + off_y, q.x1 + off_x, q.y1 + off_y, q.s0, q.t0, q.s1, q.t1, pc.xadvance); } } - cfg.DstFont->BuildLookupTable(); } // Cleanup temporaries @@ -1449,102 +1842,100 @@ bool ImFontAtlas::Build() ImGui::MemFree(buf_ranges); ImGui::MemFree(tmp_array); - // Render into our custom data block - RenderCustomTexData(1, &extra_rects); + ImFontAtlasBuildFinish(atlas); return true; } -void ImFontAtlas::RenderCustomTexData(int pass, void* p_rects) +void ImFontAtlasBuildRegisterDefaultCustomRects(ImFontAtlas* atlas) { - // A work of art lies ahead! (. = white layer, X = black layer, others are blank) - // The white texels on the top left are the ones we'll use everywhere in ImGui to render filled shapes. - const int TEX_DATA_W = 90; - const int TEX_DATA_H = 27; - const char texture_data[TEX_DATA_W*TEX_DATA_H+1] = - { - "..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX" - "..- -X.....X- X.X - X.X -X.....X - X.....X" - "--- -XXX.XXX- X...X - X...X -X....X - X....X" - "X - X.X - X.....X - X.....X -X...X - X...X" - "XX - X.X -X.......X- X.......X -X..X.X - X.X..X" - "X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X" - "X..X - X.X - X.X - X.X -XX X.X - X.X XX" - "X...X - X.X - X.X - XX X.X XX - X.X - X.X " - "X....X - X.X - X.X - X.X X.X X.X - X.X - X.X " - "X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X " - "X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X " - "X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X " - "X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X " - "X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X " - "X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X " - "X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X " - "X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX " - "X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------" - "X.X X..X - -X.......X- X.......X - XX XX - " - "XX X..X - - X.....X - X.....X - X.X X.X - " - " X..X - X...X - X...X - X..X X..X - " - " XX - X.X - X.X - X...XXXXXXXXXXXXX...X - " - "------------ - X - X -X.....................X- " - " ----------------------------------- X...XXXXXXXXXXXXX...X - " - " - X..X X..X - " - " - X.X X.X - " - " - XX XX - " - }; + if (atlas->CustomRectIds[0] < 0) + atlas->CustomRectIds[0] = atlas->AddCustomRectRegular(FONT_ATLAS_DEFAULT_TEX_DATA_ID, FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF*2+1, FONT_ATLAS_DEFAULT_TEX_DATA_H); +} - ImVector& rects = *(ImVector*)p_rects; - if (pass == 0) +void ImFontAtlasBuildSetupFont(ImFontAtlas* atlas, ImFont* font, ImFontConfig* font_config, float ascent, float descent) +{ + if (!font_config->MergeMode) { - // Request rectangles - stbrp_rect r; - memset(&r, 0, sizeof(r)); - r.w = (TEX_DATA_W*2)+1; - r.h = TEX_DATA_H+1; - rects.push_back(r); + font->ClearOutputData(); + font->FontSize = font_config->SizePixels; + font->ConfigData = font_config; + font->ContainerAtlas = atlas; + font->Ascent = ascent; + font->Descent = descent; } - else if (pass == 1) + font->ConfigDataCount++; +} + +void ImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas, void* pack_context_opaque) +{ + stbrp_context* pack_context = (stbrp_context*)pack_context_opaque; + + ImVector& user_rects = atlas->CustomRects; + IM_ASSERT(user_rects.Size >= 1); // We expect at least the default custom rects to be registered, else something went wrong. + + ImVector pack_rects; + pack_rects.resize(user_rects.Size); + memset(pack_rects.Data, 0, sizeof(stbrp_rect) * user_rects.Size); + for (int i = 0; i < user_rects.Size; i++) { - // Render/copy pixels - const stbrp_rect& r = rects[0]; - for (int y = 0, n = 0; y < TEX_DATA_H; y++) - for (int x = 0; x < TEX_DATA_W; x++, n++) - { - const int offset0 = (int)(r.x + x) + (int)(r.y + y) * TexWidth; - const int offset1 = offset0 + 1 + TEX_DATA_W; - TexPixelsAlpha8[offset0] = texture_data[n] == '.' ? 0xFF : 0x00; - TexPixelsAlpha8[offset1] = texture_data[n] == 'X' ? 0xFF : 0x00; - } - const ImVec2 tex_uv_scale(1.0f / TexWidth, 1.0f / TexHeight); - TexUvWhitePixel = ImVec2((r.x + 0.5f) * tex_uv_scale.x, (r.y + 0.5f) * tex_uv_scale.y); - - // Setup mouse cursors - const ImVec2 cursor_datas[ImGuiMouseCursor_Count_][3] = + pack_rects[i].w = user_rects[i].Width; + pack_rects[i].h = user_rects[i].Height; + } + stbrp_pack_rects(pack_context, &pack_rects[0], pack_rects.Size); + for (int i = 0; i < pack_rects.Size; i++) + if (pack_rects[i].was_packed) { - // Pos ........ Size ......... Offset ...... - { ImVec2(0,3), ImVec2(12,19), ImVec2( 0, 0) }, // ImGuiMouseCursor_Arrow - { ImVec2(13,0), ImVec2(7,16), ImVec2( 4, 8) }, // ImGuiMouseCursor_TextInput - { ImVec2(31,0), ImVec2(23,23), ImVec2(11,11) }, // ImGuiMouseCursor_Move - { ImVec2(21,0), ImVec2( 9,23), ImVec2( 5,11) }, // ImGuiMouseCursor_ResizeNS - { ImVec2(55,18),ImVec2(23, 9), ImVec2(11, 5) }, // ImGuiMouseCursor_ResizeEW - { ImVec2(73,0), ImVec2(17,17), ImVec2( 9, 9) }, // ImGuiMouseCursor_ResizeNESW - { ImVec2(55,0), ImVec2(17,17), ImVec2( 9, 9) }, // ImGuiMouseCursor_ResizeNWSE - }; - - for (int type = 0; type < ImGuiMouseCursor_Count_; type++) - { - ImGuiMouseCursorData& cursor_data = GImGui->MouseCursorData[type]; - ImVec2 pos = cursor_datas[type][0] + ImVec2((float)r.x, (float)r.y); - const ImVec2 size = cursor_datas[type][1]; - cursor_data.Type = type; - cursor_data.Size = size; - cursor_data.HotOffset = cursor_datas[type][2]; - cursor_data.TexUvMin[0] = (pos) * tex_uv_scale; - cursor_data.TexUvMax[0] = (pos + size) * tex_uv_scale; - pos.x += TEX_DATA_W+1; - cursor_data.TexUvMin[1] = (pos) * tex_uv_scale; - cursor_data.TexUvMax[1] = (pos + size) * tex_uv_scale; + user_rects[i].X = pack_rects[i].x; + user_rects[i].Y = pack_rects[i].y; + IM_ASSERT(pack_rects[i].w == user_rects[i].Width && pack_rects[i].h == user_rects[i].Height); + atlas->TexHeight = ImMax(atlas->TexHeight, pack_rects[i].y + pack_rects[i].h); } +} + +static void ImFontAtlasBuildRenderDefaultTexData(ImFontAtlas* atlas) +{ + IM_ASSERT(atlas->CustomRectIds[0] >= 0); + ImFontAtlas::CustomRect& r = atlas->CustomRects[atlas->CustomRectIds[0]]; + IM_ASSERT(r.ID == FONT_ATLAS_DEFAULT_TEX_DATA_ID); + IM_ASSERT(r.Width == FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF*2+1); + IM_ASSERT(r.Height == FONT_ATLAS_DEFAULT_TEX_DATA_H); + IM_ASSERT(r.IsPacked()); + IM_ASSERT(atlas->TexPixelsAlpha8 != NULL); + + // Render/copy pixels + for (int y = 0, n = 0; y < FONT_ATLAS_DEFAULT_TEX_DATA_H; y++) + for (int x = 0; x < FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF; x++, n++) + { + const int offset0 = (int)(r.X + x) + (int)(r.Y + y) * atlas->TexWidth; + const int offset1 = offset0 + FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF + 1; + atlas->TexPixelsAlpha8[offset0] = FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[n] == '.' ? 0xFF : 0x00; + atlas->TexPixelsAlpha8[offset1] = FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[n] == 'X' ? 0xFF : 0x00; + } + atlas->TexUvWhitePixel = ImVec2((r.X + 0.5f) * atlas->TexUvScale.x, (r.Y + 0.5f) * atlas->TexUvScale.y); +} + +void ImFontAtlasBuildFinish(ImFontAtlas* atlas) +{ + // Render into our custom data block + ImFontAtlasBuildRenderDefaultTexData(atlas); + + // Register custom rectangle glyphs + for (int i = 0; i < atlas->CustomRects.Size; i++) + { + const ImFontAtlas::CustomRect& r = atlas->CustomRects[i]; + if (r.Font == NULL || r.ID > 0x10000) + continue; + + IM_ASSERT(r.Font->ContainerAtlas == atlas); + ImVec2 uv0, uv1; + atlas->CalcCustomRectUV(&r, &uv0, &uv1); + r.Font->AddGlyph((ImWchar)r.ID, r.GlyphOffset.x, r.GlyphOffset.y, r.GlyphOffset.x + r.Width, r.GlyphOffset.y + r.Height, uv0.x, uv0.y, uv1.x, uv1.y, r.GlyphAdvanceX); } + + // Build all fonts lookup tables + for (int i = 0; i < atlas->Fonts.Size; i++) + atlas->Fonts[i]->BuildLookupTable(); } // Retrieve list of range (2 int per range, values are inclusive) @@ -1587,7 +1978,10 @@ const ImWchar* ImFontAtlas::GetGlyphRangesChinese() const ImWchar* ImFontAtlas::GetGlyphRangesJapanese() { // Store the 1946 ideograms code points as successive offsets from the initial unicode codepoint 0x4E00. Each offset has an implicit +1. - // This encoding helps us reduce the source code size. + // This encoding is designed to helps us reduce the source code size. + // FIXME: Source a list of the revised 2136 joyo kanji list from 2010 and rebuild this. + // The current list was sourced from http://theinstructionlimit.com/author/renaudbedardrenaudbedard/page/3 + // Note that you may use ImFontAtlas::GlyphRangesBuilder to create your own ranges, by merging existing ranges or adding new characters. static const short offsets_from_0x4E00[] = { -1,0,1,3,0,0,0,0,1,0,5,1,1,0,7,4,6,10,0,1,9,9,7,1,3,19,1,10,7,1,0,1,0,5,1,0,6,4,2,6,0,0,12,6,8,0,3,5,0,1,0,9,0,0,8,1,1,3,4,5,13,0,0,8,2,17, @@ -1664,12 +2058,51 @@ const ImWchar* ImFontAtlas::GetGlyphRangesThai() static const ImWchar ranges[] = { 0x0020, 0x00FF, // Basic Latin + 0x2010, 0x205E, // Punctuations 0x0E00, 0x0E7F, // Thai 0, }; return &ranges[0]; } +//----------------------------------------------------------------------------- +// ImFontAtlas::GlyphRangesBuilder +//----------------------------------------------------------------------------- + +void ImFontAtlas::GlyphRangesBuilder::AddText(const char* text, const char* text_end) +{ + while (text_end ? (text < text_end) : *text) + { + unsigned int c = 0; + int c_len = ImTextCharFromUtf8(&c, text, text_end); + text += c_len; + if (c_len == 0) + break; + if (c < 0x10000) + AddChar((ImWchar)c); + } +} + +void ImFontAtlas::GlyphRangesBuilder::AddRanges(const ImWchar* ranges) +{ + for (; ranges[0]; ranges += 2) + for (ImWchar c = ranges[0]; c <= ranges[1]; c++) + AddChar(c); +} + +void ImFontAtlas::GlyphRangesBuilder::BuildRanges(ImVector* out_ranges) +{ + for (int n = 0; n < 0x10000; n++) + if (GetBit(n)) + { + out_ranges->push_back((ImWchar)n); + while (n < 0x10000 && GetBit(n + 1)) + n++; + out_ranges->push_back((ImWchar)n); + } + out_ranges->push_back(0); +} + //----------------------------------------------------------------------------- // ImFont //----------------------------------------------------------------------------- @@ -1678,7 +2111,8 @@ ImFont::ImFont() { Scale = 1.0f; FallbackChar = (ImWchar)'?'; - Clear(); + DisplayOffset = ImVec2(0.0f, 1.0f); + ClearOutputData(); } ImFont::~ImFont() @@ -1691,18 +2125,17 @@ ImFont::~ImFont() if (g.Font == this) g.Font = NULL; */ - Clear(); + ClearOutputData(); } -void ImFont::Clear() +void ImFont::ClearOutputData() { FontSize = 0.0f; - DisplayOffset = ImVec2(0.0f, 1.0f); Glyphs.clear(); - IndexXAdvance.clear(); + IndexAdvanceX.clear(); IndexLookup.clear(); FallbackGlyph = NULL; - FallbackXAdvance = 0.0f; + FallbackAdvanceX = 0.0f; ConfigDataCount = 0; ConfigData = NULL; ContainerAtlas = NULL; @@ -1717,13 +2150,13 @@ void ImFont::BuildLookupTable() max_codepoint = ImMax(max_codepoint, (int)Glyphs[i].Codepoint); IM_ASSERT(Glyphs.Size < 0xFFFF); // -1 is reserved - IndexXAdvance.clear(); + IndexAdvanceX.clear(); IndexLookup.clear(); GrowIndex(max_codepoint + 1); for (int i = 0; i < Glyphs.Size; i++) { int codepoint = (int)Glyphs[i].Codepoint; - IndexXAdvance[codepoint] = Glyphs[i].XAdvance; + IndexAdvanceX[codepoint] = Glyphs[i].AdvanceX; IndexLookup[codepoint] = (unsigned short)i; } @@ -1733,20 +2166,20 @@ void ImFont::BuildLookupTable() { if (Glyphs.back().Codepoint != '\t') // So we can call this function multiple times Glyphs.resize(Glyphs.Size + 1); - ImFont::Glyph& tab_glyph = Glyphs.back(); + ImFontGlyph& tab_glyph = Glyphs.back(); tab_glyph = *FindGlyph((unsigned short)' '); tab_glyph.Codepoint = '\t'; - tab_glyph.XAdvance *= 4; - IndexXAdvance[(int)tab_glyph.Codepoint] = (float)tab_glyph.XAdvance; + tab_glyph.AdvanceX *= 4; + IndexAdvanceX[(int)tab_glyph.Codepoint] = (float)tab_glyph.AdvanceX; IndexLookup[(int)tab_glyph.Codepoint] = (unsigned short)(Glyphs.Size-1); } FallbackGlyph = NULL; FallbackGlyph = FindGlyph(FallbackChar); - FallbackXAdvance = FallbackGlyph ? FallbackGlyph->XAdvance : 0.0f; + FallbackAdvanceX = FallbackGlyph ? FallbackGlyph->AdvanceX : 0.0f; for (int i = 0; i < max_codepoint + 1; i++) - if (IndexXAdvance[i] < 0.0f) - IndexXAdvance[i] = FallbackXAdvance; + if (IndexAdvanceX[i] < 0.0f) + IndexAdvanceX[i] = FallbackAdvanceX; } void ImFont::SetFallbackChar(ImWchar c) @@ -1757,17 +2190,33 @@ void ImFont::SetFallbackChar(ImWchar c) void ImFont::GrowIndex(int new_size) { - IM_ASSERT(IndexXAdvance.Size == IndexLookup.Size); - int old_size = IndexLookup.Size; - if (new_size <= old_size) + IM_ASSERT(IndexAdvanceX.Size == IndexLookup.Size); + if (new_size <= IndexLookup.Size) return; - IndexXAdvance.resize(new_size); - IndexLookup.resize(new_size); - for (int i = old_size; i < new_size; i++) - { - IndexXAdvance[i] = -1.0f; - IndexLookup[i] = (unsigned short)-1; - } + IndexAdvanceX.resize(new_size, -1.0f); + IndexLookup.resize(new_size, (unsigned short)-1); +} + +void ImFont::AddGlyph(ImWchar codepoint, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x) +{ + Glyphs.resize(Glyphs.Size + 1); + ImFontGlyph& glyph = Glyphs.back(); + glyph.Codepoint = (ImWchar)codepoint; + glyph.X0 = x0; + glyph.Y0 = y0; + glyph.X1 = x1; + glyph.Y1 = y1; + glyph.U0 = u0; + glyph.V0 = v0; + glyph.U1 = u1; + glyph.V1 = v1; + glyph.AdvanceX = advance_x + ConfigData->GlyphExtraSpacing.x; // Bake spacing into AdvanceX + + if (ConfigData->PixelSnapH) + glyph.AdvanceX = (float)(int)(glyph.AdvanceX + 0.5f); + + // Compute rough surface usage metrics (+1 to account for average padding, +0.99 to round) + MetricsTotalSurface += (int)((glyph.U1 - glyph.U0) * ContainerAtlas->TexWidth + 1.99f) * (int)((glyph.V1 - glyph.V0) * ContainerAtlas->TexHeight + 1.99f); } void ImFont::AddRemapChar(ImWchar dst, ImWchar src, bool overwrite_dst) @@ -1782,10 +2231,10 @@ void ImFont::AddRemapChar(ImWchar dst, ImWchar src, bool overwrite_dst) GrowIndex(dst + 1); IndexLookup[dst] = (src < index_size) ? IndexLookup.Data[src] : (unsigned short)-1; - IndexXAdvance[dst] = (src < index_size) ? IndexXAdvance.Data[src] : 1.0f; + IndexAdvanceX[dst] = (src < index_size) ? IndexAdvanceX.Data[src] : 1.0f; } -const ImFont::Glyph* ImFont::FindGlyph(unsigned short c) const +const ImFontGlyph* ImFont::FindGlyph(ImWchar c) const { if (c < IndexLookup.Size) { @@ -1816,6 +2265,7 @@ const char* ImFont::CalcWordWrapPositionA(float scale, const char* text, const c float line_width = 0.0f; float word_width = 0.0f; float blank_width = 0.0f; + wrap_width /= scale; // We work with unscaled widths to avoid scaling every characters const char* word_end = text; const char* prev_word_end = NULL; @@ -1849,7 +2299,7 @@ const char* ImFont::CalcWordWrapPositionA(float scale, const char* text, const c } } - const float char_width = ((int)c < IndexXAdvance.Size ? IndexXAdvance[(int)c] : FallbackXAdvance) * scale; + const float char_width = ((int)c < IndexAdvanceX.Size ? IndexAdvanceX[(int)c] : FallbackAdvanceX); if (ImCharIsSpace(c)) { if (inside_word) @@ -1966,7 +2416,7 @@ ImVec2 ImFont::CalcTextSizeA(float size, float max_width, float wrap_width, cons continue; } - const float char_width = ((int)c < IndexXAdvance.Size ? IndexXAdvance[(int)c] : FallbackXAdvance) * scale; + const float char_width = ((int)c < IndexAdvanceX.Size ? IndexAdvanceX[(int)c] : FallbackAdvanceX) * scale; if (line_width + char_width >= max_width) { s = prev_s; @@ -1992,15 +2442,13 @@ void ImFont::RenderChar(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col { if (c == ' ' || c == '\t' || c == '\n' || c == '\r') // Match behavior of RenderText(), those 4 codepoints are hard-coded. return; - if (const Glyph* glyph = FindGlyph(c)) + if (const ImFontGlyph* glyph = FindGlyph(c)) { float scale = (size >= 0.0f) ? (size / FontSize) : 1.0f; pos.x = (float)(int)pos.x + DisplayOffset.x; pos.y = (float)(int)pos.y + DisplayOffset.y; - ImVec2 pos_tl(pos.x + glyph->X0 * scale, pos.y + glyph->Y0 * scale); - ImVec2 pos_br(pos.x + glyph->X1 * scale, pos.y + glyph->Y1 * scale); draw_list->PrimReserve(6, 4); - draw_list->PrimRectUV(pos_tl, pos_br, ImVec2(glyph->U0, glyph->V0), ImVec2(glyph->U1, glyph->V1), col); + draw_list->PrimRectUV(ImVec2(pos.x + glyph->X0 * scale, pos.y + glyph->Y0 * scale), ImVec2(pos.x + glyph->X1 * scale, pos.y + glyph->Y1 * scale), ImVec2(glyph->U0, glyph->V0), ImVec2(glyph->U1, glyph->V1), col); } } @@ -2098,9 +2546,9 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col } float char_width = 0.0f; - if (const Glyph* glyph = FindGlyph((unsigned short)c)) + if (const ImFontGlyph* glyph = FindGlyph((unsigned short)c)) { - char_width = glyph->XAdvance * scale; + char_width = glyph->AdvanceX * scale; // Arbitrarily assume that both space and tabs are empty glyphs as an optimization if (c != ' ' && c != '\t') @@ -2148,8 +2596,7 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col } } - // We are NOT calling PrimRectUV() here because non-inlined causes too much overhead in a debug build. - // Inlined here: + // We are NOT calling PrimRectUV() here because non-inlined causes too much overhead in a debug builds. Inlined here: { idx_write[0] = (ImDrawIdx)(vtx_current_idx); idx_write[1] = (ImDrawIdx)(vtx_current_idx+1); idx_write[2] = (ImDrawIdx)(vtx_current_idx+2); idx_write[3] = (ImDrawIdx)(vtx_current_idx); idx_write[4] = (ImDrawIdx)(vtx_current_idx+2); idx_write[5] = (ImDrawIdx)(vtx_current_idx+3); @@ -2177,11 +2624,83 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col draw_list->_VtxCurrentIdx = (unsigned int)draw_list->VtxBuffer.Size; } +//----------------------------------------------------------------------------- +// Internals Drawing Helpers +//----------------------------------------------------------------------------- + +static inline float ImAcos01(float x) +{ + if (x <= 0.0f) return IM_PI * 0.5f; + if (x >= 1.0f) return 0.0f; + return acosf(x); + //return (-0.69813170079773212f * x * x - 0.87266462599716477f) * x + 1.5707963267948966f; // Cheap approximation, may be enough for what we do. +} + +// FIXME: Cleanup and move code to ImDrawList. +void ImGui::RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding) +{ + if (x_end_norm == x_start_norm) + return; + if (x_start_norm > x_end_norm) + ImSwap(x_start_norm, x_end_norm); + + ImVec2 p0 = ImVec2(ImLerp(rect.Min.x, rect.Max.x, x_start_norm), rect.Min.y); + ImVec2 p1 = ImVec2(ImLerp(rect.Min.x, rect.Max.x, x_end_norm), rect.Max.y); + if (rounding == 0.0f) + { + draw_list->AddRectFilled(p0, p1, col, 0.0f); + return; + } + + rounding = ImClamp(ImMin((rect.Max.x - rect.Min.x) * 0.5f, (rect.Max.y - rect.Min.y) * 0.5f) - 1.0f, 0.0f, rounding); + const float inv_rounding = 1.0f / rounding; + const float arc0_b = ImAcos01(1.0f - (p0.x - rect.Min.x) * inv_rounding); + const float arc0_e = ImAcos01(1.0f - (p1.x - rect.Min.x) * inv_rounding); + const float x0 = ImMax(p0.x, rect.Min.x + rounding); + if (arc0_b == arc0_e) + { + draw_list->PathLineTo(ImVec2(x0, p1.y)); + draw_list->PathLineTo(ImVec2(x0, p0.y)); + } + else if (arc0_b == 0.0f && arc0_e == IM_PI*0.5f) + { + draw_list->PathArcToFast(ImVec2(x0, p1.y - rounding), rounding, 3, 6); // BL + draw_list->PathArcToFast(ImVec2(x0, p0.y + rounding), rounding, 6, 9); // TR + } + else + { + draw_list->PathArcTo(ImVec2(x0, p1.y - rounding), rounding, IM_PI - arc0_e, IM_PI - arc0_b, 3); // BL + draw_list->PathArcTo(ImVec2(x0, p0.y + rounding), rounding, IM_PI + arc0_b, IM_PI + arc0_e, 3); // TR + } + if (p1.x > rect.Min.x + rounding) + { + const float arc1_b = ImAcos01(1.0f - (rect.Max.x - p1.x) * inv_rounding); + const float arc1_e = ImAcos01(1.0f - (rect.Max.x - p0.x) * inv_rounding); + const float x1 = ImMin(p1.x, rect.Max.x - rounding); + if (arc1_b == arc1_e) + { + draw_list->PathLineTo(ImVec2(x1, p0.y)); + draw_list->PathLineTo(ImVec2(x1, p1.y)); + } + else if (arc1_b == 0.0f && arc1_e == IM_PI*0.5f) + { + draw_list->PathArcToFast(ImVec2(x1, p0.y + rounding), rounding, 9, 12); // TR + draw_list->PathArcToFast(ImVec2(x1, p1.y - rounding), rounding, 0, 3); // BR + } + else + { + draw_list->PathArcTo(ImVec2(x1, p0.y + rounding), rounding, -arc1_e, -arc1_b, 3); // TR + draw_list->PathArcTo(ImVec2(x1, p1.y - rounding), rounding, +arc1_b, +arc1_e, 3); // BR + } + } + draw_list->PathFillConvex(col); +} + //----------------------------------------------------------------------------- // DEFAULT FONT DATA //----------------------------------------------------------------------------- // Compressed with stb_compress() then converted to a C array. -// Use the program in extra_fonts/binary_to_compressed_c.cpp to create the array from a TTF file. +// Use the program in misc/fonts/binary_to_compressed_c.cpp to create the array from a TTF file. // Decompression from stb.h (public domain) by Sean Barrett https://github.com/nothings/stb/blob/master/stb.h //----------------------------------------------------------------------------- diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h index effc5ce..37a31bf 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h @@ -1,9 +1,10 @@ -// dear imgui, v1.50 WIP +// dear imgui, v1.54 WIP // (internals) // You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility! -// Implement maths operators for ImVec2 (disabled by default to not collide with using IM_VEC2_CLASS_EXTRA along with your own math types+operators) +// Set: // #define IMGUI_DEFINE_MATH_OPERATORS +// To implement maths operators for ImVec2 (disabled by default to not collide with using IM_VEC2_CLASS_EXTRA along with your own math types+operators) #pragma once @@ -34,18 +35,18 @@ struct ImRect; struct ImGuiColMod; struct ImGuiStyleMod; struct ImGuiGroupData; -struct ImGuiSimpleColumns; +struct ImGuiMenuColumns; struct ImGuiDrawContext; struct ImGuiTextEditState; -struct ImGuiIniData; -struct ImGuiMouseCursorData; struct ImGuiPopupRef; struct ImGuiWindow; +struct ImGuiWindowSettings; -typedef int ImGuiLayoutType; // enum ImGuiLayoutType_ -typedef int ImGuiButtonFlags; // enum ImGuiButtonFlags_ -typedef int ImGuiTreeNodeFlags; // enum ImGuiTreeNodeFlags_ -typedef int ImGuiSliderFlags; // enum ImGuiSliderFlags_ +typedef int ImGuiLayoutType; // enum: horizontal or vertical // enum ImGuiLayoutType_ +typedef int ImGuiButtonFlags; // flags: for ButtonEx(), ButtonBehavior() // enum ImGuiButtonFlags_ +typedef int ImGuiItemFlags; // flags: for PushItemFlag() // enum ImGuiItemFlags_ +typedef int ImGuiSeparatorFlags; // flags: for Separator() - internal // enum ImGuiSeparatorFlags_ +typedef int ImGuiSliderFlags; // flags: for SliderBehavior() // enum ImGuiSliderFlags_ //------------------------------------------------------------------------- // STB libraries @@ -75,9 +76,7 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit ImGui context pointe // Helpers //----------------------------------------------------------------------------- -#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR)/sizeof(*_ARR))) -#define IM_PI 3.14159265358979323846f -#define IM_OFFSETOF(_TYPE,_ELM) ((size_t)&(((_TYPE*)0)->_ELM)) +#define IM_PI 3.14159265358979323846f // Helpers: UTF-8 <> wchar IMGUI_API int ImTextStrToUtf8(char* buf, int buf_size, const ImWchar* in_text, const ImWchar* in_text_end); // return output UTF-8 bytes count @@ -89,20 +88,28 @@ IMGUI_API int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, cons // Helpers: Misc IMGUI_API ImU32 ImHash(const void* data, int data_size, ImU32 seed = 0); // Pass data_size==0 for zero-terminated strings IMGUI_API void* ImFileLoadToMemory(const char* filename, const char* file_open_mode, int* out_file_size = NULL, int padding_bytes = 0); -IMGUI_API FILE* ImFileOpen(const char* filename, const char* file_open_mode); -IMGUI_API bool ImIsPointInTriangle(const ImVec2& p, const ImVec2& a, const ImVec2& b, const ImVec2& c); +IMGUI_API FILE* ImFileOpen(const char* filename, const char* file_open_mode); static inline bool ImCharIsSpace(int c) { return c == ' ' || c == '\t' || c == 0x3000; } +static inline bool ImIsPowerOfTwo(int v) { return v != 0 && (v & (v - 1)) == 0; } static inline int ImUpperPowerOfTwo(int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; } +// Helpers: Geometry +IMGUI_API ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& p); +IMGUI_API bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p); +IMGUI_API ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p); +IMGUI_API void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p, float& out_u, float& out_v, float& out_w); + // Helpers: String IMGUI_API int ImStricmp(const char* str1, const char* str2); -IMGUI_API int ImStrnicmp(const char* str1, const char* str2, int count); +IMGUI_API int ImStrnicmp(const char* str1, const char* str2, size_t count); +IMGUI_API void ImStrncpy(char* dst, const char* src, size_t count); IMGUI_API char* ImStrdup(const char* str); +IMGUI_API char* ImStrchrRange(const char* str_begin, const char* str_end, char c); IMGUI_API int ImStrlenW(const ImWchar* str); IMGUI_API const ImWchar*ImStrbolW(const ImWchar* buf_mid_line, const ImWchar* buf_begin); // Find beginning-of-line IMGUI_API const char* ImStristr(const char* haystack, const char* haystack_end, const char* needle, const char* needle_end); -IMGUI_API int ImFormatString(char* buf, int buf_size, const char* fmt, ...) IM_PRINTFARGS(3); -IMGUI_API int ImFormatStringV(char* buf, int buf_size, const char* fmt, va_list args); +IMGUI_API int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...) IM_FMTARGS(3); +IMGUI_API int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) IM_FMTLIST(3); // Helpers: Math // We are keeping those not leaking to the user by default, in the case the user has implicit cast operators between ImVec2 and its own types (when IM_VEC2_CLASS_EXTRA is defined) @@ -117,35 +124,46 @@ static inline ImVec2& operator+=(ImVec2& lhs, const ImVec2& rhs) static inline ImVec2& operator-=(ImVec2& lhs, const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y; return lhs; } static inline ImVec2& operator*=(ImVec2& lhs, const float rhs) { lhs.x *= rhs; lhs.y *= rhs; return lhs; } static inline ImVec2& operator/=(ImVec2& lhs, const float rhs) { lhs.x /= rhs; lhs.y /= rhs; return lhs; } +static inline ImVec4 operator+(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x+rhs.x, lhs.y+rhs.y, lhs.z+rhs.z, lhs.w+rhs.w); } static inline ImVec4 operator-(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x-rhs.x, lhs.y-rhs.y, lhs.z-rhs.z, lhs.w-rhs.w); } +static inline ImVec4 operator*(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x*rhs.x, lhs.y*rhs.y, lhs.z*rhs.z, lhs.w*rhs.w); } #endif static inline int ImMin(int lhs, int rhs) { return lhs < rhs ? lhs : rhs; } static inline int ImMax(int lhs, int rhs) { return lhs >= rhs ? lhs : rhs; } static inline float ImMin(float lhs, float rhs) { return lhs < rhs ? lhs : rhs; } static inline float ImMax(float lhs, float rhs) { return lhs >= rhs ? lhs : rhs; } -static inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(ImMin(lhs.x,rhs.x), ImMin(lhs.y,rhs.y)); } -static inline ImVec2 ImMax(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(ImMax(lhs.x,rhs.x), ImMax(lhs.y,rhs.y)); } +static inline ImVec2 ImMin(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x < rhs.x ? lhs.x : rhs.x, lhs.y < rhs.y ? lhs.y : rhs.y); } +static inline ImVec2 ImMax(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x >= rhs.x ? lhs.x : rhs.x, lhs.y >= rhs.y ? lhs.y : rhs.y); } static inline int ImClamp(int v, int mn, int mx) { return (v < mn) ? mn : (v > mx) ? mx : v; } static inline float ImClamp(float v, float mn, float mx) { return (v < mn) ? mn : (v > mx) ? mx : v; } static inline ImVec2 ImClamp(const ImVec2& f, const ImVec2& mn, ImVec2 mx) { return ImVec2(ImClamp(f.x,mn.x,mx.x), ImClamp(f.y,mn.y,mx.y)); } static inline float ImSaturate(float f) { return (f < 0.0f) ? 0.0f : (f > 1.0f) ? 1.0f : f; } +static inline void ImSwap(int& a, int& b) { int tmp = a; a = b; b = tmp; } +static inline void ImSwap(float& a, float& b) { float tmp = a; a = b; b = tmp; } +static inline int ImLerp(int a, int b, float t) { return (int)(a + (b - a) * t); } static inline float ImLerp(float a, float b, float t) { return a + (b - a) * t; } +static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, float t) { return ImVec2(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t); } static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVec2& t) { return ImVec2(a.x + (b.x - a.x) * t.x, a.y + (b.y - a.y) * t.y); } +static inline ImVec4 ImLerp(const ImVec4& a, const ImVec4& b, float t) { return ImVec4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t); } static inline float ImLengthSqr(const ImVec2& lhs) { return lhs.x*lhs.x + lhs.y*lhs.y; } static inline float ImLengthSqr(const ImVec4& lhs) { return lhs.x*lhs.x + lhs.y*lhs.y + lhs.z*lhs.z + lhs.w*lhs.w; } static inline float ImInvLength(const ImVec2& lhs, float fail_value) { float d = lhs.x*lhs.x + lhs.y*lhs.y; if (d > 0.0f) return 1.0f / sqrtf(d); return fail_value; } static inline float ImFloor(float f) { return (float)(int)f; } -static inline ImVec2 ImFloor(ImVec2 v) { return ImVec2((float)(int)v.x, (float)(int)v.y); } +static inline ImVec2 ImFloor(const ImVec2& v) { return ImVec2((float)(int)v.x, (float)(int)v.y); } +static inline float ImDot(const ImVec2& a, const ImVec2& b) { return a.x * b.x + a.y * b.y; } +static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a) { return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); } +static inline float ImLinearSweep(float current, float target, float speed) { if (current < target) return ImMin(current + speed, target); if (current > target) return ImMax(current - speed, target); return current; } +static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); } // We call C++ constructor on own allocated memory via the placement "new(ptr) Type()" syntax. // Defining a custom placement new() with a dummy parameter allows us to bypass including which on some platforms complains when user has disabled exceptions. -#ifdef IMGUI_DEFINE_PLACEMENT_NEW -struct ImPlacementNewDummy {}; -inline void* operator new(size_t, ImPlacementNewDummy, void* ptr) { return ptr; } -inline void operator delete(void*, ImPlacementNewDummy, void*) {} -#define IM_PLACEMENT_NEW(_PTR) new(ImPlacementNewDummy(), _PTR) -#endif +struct ImNewPlacementDummy {}; +inline void* operator new(size_t, ImNewPlacementDummy, void* ptr) { return ptr; } +inline void operator delete(void*, ImNewPlacementDummy, void*) {} // This is only required so we can use the symetrical new() +#define IM_PLACEMENT_NEW(_PTR) new(ImNewPlacementDummy(), _PTR) +#define IM_NEW(_TYPE) new(ImNewPlacementDummy(), ImGui::MemAlloc(sizeof(_TYPE))) _TYPE +template void IM_DELETE(T*& p) { if (p) { p->~T(); ImGui::MemFree(p); p = NULL; } } //----------------------------------------------------------------------------- // Types @@ -154,16 +172,18 @@ inline void operator delete(void*, ImPlacementNewDummy, void*) {} enum ImGuiButtonFlags_ { ImGuiButtonFlags_Repeat = 1 << 0, // hold to repeat - ImGuiButtonFlags_PressedOnClickRelease = 1 << 1, // (default) return pressed on click+release on same item (default if no PressedOn** flag is set) - ImGuiButtonFlags_PressedOnClick = 1 << 2, // return pressed on click (default requires click+release) - ImGuiButtonFlags_PressedOnRelease = 1 << 3, // return pressed on release (default requires click+release) - ImGuiButtonFlags_PressedOnDoubleClick = 1 << 4, // return pressed on double-click (default requires click+release) - ImGuiButtonFlags_FlattenChilds = 1 << 5, // allow interaction even if a child window is overlapping - ImGuiButtonFlags_DontClosePopups = 1 << 6, // disable automatically closing parent popup on press - ImGuiButtonFlags_Disabled = 1 << 7, // disable interaction - ImGuiButtonFlags_AlignTextBaseLine = 1 << 8, // vertically align button to match text baseline - ButtonEx() only - ImGuiButtonFlags_NoKeyModifiers = 1 << 9, // disable interaction if a key modifier is held - ImGuiButtonFlags_AllowOverlapMode = 1 << 10 // require previous frame HoveredId to either match id or be null before being usable + ImGuiButtonFlags_PressedOnClickRelease = 1 << 1, // return true on click + release on same item [DEFAULT if no PressedOn* flag is set] + ImGuiButtonFlags_PressedOnClick = 1 << 2, // return true on click (default requires click+release) + ImGuiButtonFlags_PressedOnRelease = 1 << 3, // return true on release (default requires click+release) + ImGuiButtonFlags_PressedOnDoubleClick = 1 << 4, // return true on double-click (default requires click+release) + ImGuiButtonFlags_FlattenChildren = 1 << 5, // allow interactions even if a child window is overlapping + ImGuiButtonFlags_AllowItemOverlap = 1 << 6, // require previous frame HoveredId to either match id or be null before being usable, use along with SetItemAllowOverlap() + ImGuiButtonFlags_DontClosePopups = 1 << 7, // disable automatically closing parent popup on press // [UNUSED] + ImGuiButtonFlags_Disabled = 1 << 8, // disable interactions + ImGuiButtonFlags_AlignTextBaseLine = 1 << 9, // vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine + ImGuiButtonFlags_NoKeyModifiers = 1 << 10, // disable interaction if a key modifier is held + ImGuiButtonFlags_NoHoldingActiveID = 1 << 11, // don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only) + ImGuiButtonFlags_PressedOnDragDropHold = 1 << 12 // press when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers) }; enum ImGuiSliderFlags_ @@ -171,15 +191,31 @@ enum ImGuiSliderFlags_ ImGuiSliderFlags_Vertical = 1 << 0 }; +enum ImGuiColumnsFlags_ +{ + // Default: 0 + ImGuiColumnsFlags_NoBorder = 1 << 0, // Disable column dividers + ImGuiColumnsFlags_NoResize = 1 << 1, // Disable resizing columns when clicking on the dividers + ImGuiColumnsFlags_NoPreserveWidths = 1 << 2, // Disable column width preservation when adjusting columns + ImGuiColumnsFlags_NoForceWithinWindow = 1 << 3, // Disable forcing columns to fit within window + ImGuiColumnsFlags_GrowParentContentsSize= 1 << 4 // (WIP) Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove. +}; + enum ImGuiSelectableFlagsPrivate_ { // NB: need to be in sync with last value of ImGuiSelectableFlags_ - ImGuiSelectableFlags_Menu = 1 << 3, - ImGuiSelectableFlags_MenuItem = 1 << 4, + ImGuiSelectableFlags_Menu = 1 << 3, // -> PressedOnClick + ImGuiSelectableFlags_MenuItem = 1 << 4, // -> PressedOnRelease ImGuiSelectableFlags_Disabled = 1 << 5, ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 6 }; +enum ImGuiSeparatorFlags_ +{ + ImGuiSeparatorFlags_Horizontal = 1 << 0, // Axis default to current layout type, so generally Horizontal unless e.g. in a menu bar + ImGuiSeparatorFlags_Vertical = 1 << 1 +}; + // FIXME: this is in development, not exposed/functional as a generic feature yet. enum ImGuiLayoutType_ { @@ -187,6 +223,13 @@ enum ImGuiLayoutType_ ImGuiLayoutType_Horizontal }; +enum ImGuiAxis +{ + ImGuiAxis_None = -1, + ImGuiAxis_X = 0, + ImGuiAxis_Y = 1 +}; + enum ImGuiPlotType { ImGuiPlotType_Lines, @@ -197,16 +240,17 @@ enum ImGuiDataType { ImGuiDataType_Int, ImGuiDataType_Float, - ImGuiDataType_Float2, + ImGuiDataType_Float2 }; -enum ImGuiCorner +enum ImGuiDir { - ImGuiCorner_TopLeft = 1 << 0, // 1 - ImGuiCorner_TopRight = 1 << 1, // 2 - ImGuiCorner_BottomRight = 1 << 2, // 4 - ImGuiCorner_BottomLeft = 1 << 3, // 8 - ImGuiCorner_All = 0x0F + ImGuiDir_None = -1, + ImGuiDir_Left = 0, + ImGuiDir_Right = 1, + ImGuiDir_Up = 2, + ImGuiDir_Down = 3, + ImGuiDir_Count_ }; // 2D axis aligned bounding-box @@ -221,34 +265,27 @@ struct IMGUI_API ImRect ImRect(const ImVec4& v) : Min(v.x, v.y), Max(v.z, v.w) {} ImRect(float x1, float y1, float x2, float y2) : Min(x1, y1), Max(x2, y2) {} - ImVec2 GetCenter() const { return ImVec2((Min.x+Max.x)*0.5f, (Min.y+Max.y)*0.5f); } - ImVec2 GetSize() const { return ImVec2(Max.x-Min.x, Max.y-Min.y); } - float GetWidth() const { return Max.x-Min.x; } - float GetHeight() const { return Max.y-Min.y; } - ImVec2 GetTL() const { return Min; } // Top-left - ImVec2 GetTR() const { return ImVec2(Max.x, Min.y); } // Top-right - ImVec2 GetBL() const { return ImVec2(Min.x, Max.y); } // Bottom-left - ImVec2 GetBR() const { return Max; } // Bottom-right - bool Contains(const ImVec2& p) const { return p.x >= Min.x && p.y >= Min.y && p.x < Max.x && p.y < Max.y; } - bool Contains(const ImRect& r) const { return r.Min.x >= Min.x && r.Min.y >= Min.y && r.Max.x < Max.x && r.Max.y < Max.y; } - bool Overlaps(const ImRect& r) const { return r.Min.y < Max.y && r.Max.y > Min.y && r.Min.x < Max.x && r.Max.x > Min.x; } - void Add(const ImVec2& rhs) { if (Min.x > rhs.x) Min.x = rhs.x; if (Min.y > rhs.y) Min.y = rhs.y; if (Max.x < rhs.x) Max.x = rhs.x; if (Max.y < rhs.y) Max.y = rhs.y; } - void Add(const ImRect& rhs) { if (Min.x > rhs.Min.x) Min.x = rhs.Min.x; if (Min.y > rhs.Min.y) Min.y = rhs.Min.y; if (Max.x < rhs.Max.x) Max.x = rhs.Max.x; if (Max.y < rhs.Max.y) Max.y = rhs.Max.y; } - void Expand(const float amount) { Min.x -= amount; Min.y -= amount; Max.x += amount; Max.y += amount; } - void Expand(const ImVec2& amount) { Min.x -= amount.x; Min.y -= amount.y; Max.x += amount.x; Max.y += amount.y; } - void Reduce(const ImVec2& amount) { Min.x += amount.x; Min.y += amount.y; Max.x -= amount.x; Max.y -= amount.y; } - void Clip(const ImRect& clip) { if (Min.x < clip.Min.x) Min.x = clip.Min.x; if (Min.y < clip.Min.y) Min.y = clip.Min.y; if (Max.x > clip.Max.x) Max.x = clip.Max.x; if (Max.y > clip.Max.y) Max.y = clip.Max.y; } - void Floor() { Min.x = (float)(int)Min.x; Min.y = (float)(int)Min.y; Max.x = (float)(int)Max.x; Max.y = (float)(int)Max.y; } - ImVec2 GetClosestPoint(ImVec2 p, bool on_edge) const - { - if (!on_edge && Contains(p)) - return p; - if (p.x > Max.x) p.x = Max.x; - else if (p.x < Min.x) p.x = Min.x; - if (p.y > Max.y) p.y = Max.y; - else if (p.y < Min.y) p.y = Min.y; - return p; - } + ImVec2 GetCenter() const { return ImVec2((Min.x + Max.x) * 0.5f, (Min.y + Max.y) * 0.5f); } + ImVec2 GetSize() const { return ImVec2(Max.x - Min.x, Max.y - Min.y); } + float GetWidth() const { return Max.x - Min.x; } + float GetHeight() const { return Max.y - Min.y; } + ImVec2 GetTL() const { return Min; } // Top-left + ImVec2 GetTR() const { return ImVec2(Max.x, Min.y); } // Top-right + ImVec2 GetBL() const { return ImVec2(Min.x, Max.y); } // Bottom-left + ImVec2 GetBR() const { return Max; } // Bottom-right + bool Contains(const ImVec2& p) const { return p.x >= Min.x && p.y >= Min.y && p.x < Max.x && p.y < Max.y; } + bool Contains(const ImRect& r) const { return r.Min.x >= Min.x && r.Min.y >= Min.y && r.Max.x <= Max.x && r.Max.y <= Max.y; } + bool Overlaps(const ImRect& r) const { return r.Min.y < Max.y && r.Max.y > Min.y && r.Min.x < Max.x && r.Max.x > Min.x; } + void Add(const ImVec2& p) { if (Min.x > p.x) Min.x = p.x; if (Min.y > p.y) Min.y = p.y; if (Max.x < p.x) Max.x = p.x; if (Max.y < p.y) Max.y = p.y; } + void Add(const ImRect& r) { if (Min.x > r.Min.x) Min.x = r.Min.x; if (Min.y > r.Min.y) Min.y = r.Min.y; if (Max.x < r.Max.x) Max.x = r.Max.x; if (Max.y < r.Max.y) Max.y = r.Max.y; } + void Expand(const float amount) { Min.x -= amount; Min.y -= amount; Max.x += amount; Max.y += amount; } + void Expand(const ImVec2& amount) { Min.x -= amount.x; Min.y -= amount.y; Max.x += amount.x; Max.y += amount.y; } + void Translate(const ImVec2& v) { Min.x += v.x; Min.y += v.y; Max.x += v.x; Max.y += v.y; } + void ClipWith(const ImRect& r) { Min = ImMax(Min, r.Min); Max = ImMin(Max, r.Max); } // Simple version, may lead to an inverted rectangle, which is fine for Contains/Overlaps test but not for display. + void ClipWithFull(const ImRect& r) { Min = ImClamp(Min, r.Min, r.Max); Max = ImClamp(Max, r.Min, r.Max); } // Full version, ensure both points are fully clipped. + void Floor() { Min.x = (float)(int)Min.x; Min.y = (float)(int)Min.y; Max.x = (float)(int)Max.x; Max.y = (float)(int)Max.y; } + void FixInverted() { if (Min.x > Max.x) ImSwap(Min.x, Max.x); if (Min.y > Max.y) ImSwap(Min.y, Max.y); } + bool IsFinite() const { return Min.x != FLT_MAX; } }; // Stacked color modifier, backup of modified data so we can restore it @@ -282,22 +319,15 @@ struct ImGuiGroupData bool AdvanceCursor; }; -// Per column data for Columns() -struct ImGuiColumnData -{ - float OffsetNorm; // Column start offset, normalized 0.0 (far left) -> 1.0 (far right) - //float IndentX; -}; - // Simple column measurement currently used for MenuItem() only. This is very short-sighted/throw-away code and NOT a generic helper. -struct IMGUI_API ImGuiSimpleColumns +struct IMGUI_API ImGuiMenuColumns { int Count; float Spacing; float Width, NextWidth; - float Pos[8], NextWidths[8]; + float Pos[4], NextWidths[4]; - ImGuiSimpleColumns(); + ImGuiMenuColumns(); void Update(int count, float spacing, bool clear); float DeclColumns(float w0, float w1, float w2); float CalcExtraSpace(float avail_w); @@ -323,40 +353,147 @@ struct IMGUI_API ImGuiTextEditState void CursorClamp() { StbState.cursor = ImMin(StbState.cursor, CurLenW); StbState.select_start = ImMin(StbState.select_start, CurLenW); StbState.select_end = ImMin(StbState.select_end, CurLenW); } bool HasSelection() const { return StbState.select_start != StbState.select_end; } void ClearSelection() { StbState.select_start = StbState.select_end = StbState.cursor; } - void SelectAll() { StbState.select_start = 0; StbState.select_end = CurLenW; StbState.cursor = StbState.select_end; StbState.has_preferred_x = false; } + void SelectAll() { StbState.select_start = 0; StbState.cursor = StbState.select_end = CurLenW; StbState.has_preferred_x = false; } void OnKeyPressed(int key); }; // Data saved in imgui.ini file -struct ImGuiIniData +struct ImGuiWindowSettings { char* Name; ImGuiID Id; ImVec2 Pos; ImVec2 Size; bool Collapsed; + + ImGuiWindowSettings() { Name = NULL; Id = 0; Pos = Size = ImVec2(0,0); Collapsed = false; } }; -// Mouse cursor data (used when io.MouseDrawCursor is set) -struct ImGuiMouseCursorData +struct ImGuiSettingsHandler { - ImGuiMouseCursor Type; - ImVec2 HotOffset; - ImVec2 Size; - ImVec2 TexUvMin[2]; - ImVec2 TexUvMax[2]; + const char* TypeName; // Short description stored in .ini file. Disallowed characters: '[' ']' + ImGuiID TypeHash; // == ImHash(TypeName, 0, 0) + void* (*ReadOpenFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, const char* name); + void (*ReadLineFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, void* entry, const char* line); + void (*WriteAllFn)(ImGuiContext* ctx, ImGuiSettingsHandler* handler, ImGuiTextBuffer* out_buf); + void* UserData; + + ImGuiSettingsHandler() { memset(this, 0, sizeof(*this)); } }; // Storage for current popup stack struct ImGuiPopupRef { - ImGuiID PopupId; // Set on OpenPopup() - ImGuiWindow* Window; // Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup() - ImGuiWindow* ParentWindow; // Set on OpenPopup() - ImGuiID ParentMenuSet; // Set on OpenPopup() - ImVec2 MousePosOnOpen; // Copy of mouse position at the time of opening popup + ImGuiID PopupId; // Set on OpenPopup() + ImGuiWindow* Window; // Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup() + ImGuiWindow* ParentWindow; // Set on OpenPopup() + int OpenFrameCount; // Set on OpenPopup() + ImGuiID OpenParentId; // Set on OpenPopup(), we need this to differenciate multiple menu sets from each others (e.g. inside menu bar vs loose menu items) + ImVec2 OpenPopupPos; // Set on OpenPopup(), preferred popup position (typically == OpenMousePos when using mouse) + ImVec2 OpenMousePos; // Set on OpenPopup(), copy of mouse position at the time of opening popup +}; - ImGuiPopupRef(ImGuiID id, ImGuiWindow* parent_window, ImGuiID parent_menu_set, const ImVec2& mouse_pos) { PopupId = id; Window = NULL; ParentWindow = parent_window; ParentMenuSet = parent_menu_set; MousePosOnOpen = mouse_pos; } +struct ImGuiColumnData +{ + float OffsetNorm; // Column start offset, normalized 0.0 (far left) -> 1.0 (far right) + float OffsetNormBeforeResize; + ImGuiColumnsFlags Flags; // Not exposed + ImRect ClipRect; + + ImGuiColumnData() { OffsetNorm = OffsetNormBeforeResize = 0.0f; Flags = 0; } +}; + +struct ImGuiColumnsSet +{ + ImGuiID ID; + ImGuiColumnsFlags Flags; + bool IsFirstFrame; + bool IsBeingResized; + int Current; + int Count; + float MinX, MaxX; + float StartPosY; + float StartMaxPosX; // Backup of CursorMaxPos + float CellMinY, CellMaxY; + ImVector Columns; + + ImGuiColumnsSet() { Clear(); } + void Clear() + { + ID = 0; + Flags = 0; + IsFirstFrame = false; + IsBeingResized = false; + Current = 0; + Count = 1; + MinX = MaxX = 0.0f; + StartPosY = 0.0f; + StartMaxPosX = 0.0f; + CellMinY = CellMaxY = 0.0f; + Columns.clear(); + } +}; + +struct IMGUI_API ImDrawListSharedData +{ + ImVec2 TexUvWhitePixel; // UV of white pixel in the atlas + ImFont* Font; // Current/default font (optional, for simplified AddText overload) + float FontSize; // Current/default font size (optional, for simplified AddText overload) + float CurveTessellationTol; + ImVec4 ClipRectFullscreen; // Value for PushClipRectFullscreen() + + // Const data + // FIXME: Bake rounded corners fill/borders in atlas + ImVec2 CircleVtx12[12]; + + ImDrawListSharedData(); +}; + +struct ImDrawDataBuilder +{ + ImVector Layers[2]; // Global layers for: regular, tooltip + + void Clear() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n++) Layers[n].resize(0); } + void ClearFreeMemory() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n++) Layers[n].clear(); } + IMGUI_API void FlattenIntoSingleLayer(); +}; + +// Storage for SetNexWindow** functions +struct ImGuiNextWindowData +{ + ImGuiCond PosCond; + ImGuiCond SizeCond; + ImGuiCond ContentSizeCond; + ImGuiCond CollapsedCond; + ImGuiCond SizeConstraintCond; + ImGuiCond FocusCond; + ImGuiCond BgAlphaCond; + ImVec2 PosVal; + ImVec2 PosPivotVal; + ImVec2 SizeVal; + ImVec2 ContentSizeVal; + bool CollapsedVal; + ImRect SizeConstraintRect; // Valid if 'SetNextWindowSizeConstraint' is true + ImGuiSizeCallback SizeCallback; + void* SizeCallbackUserData; + float BgAlphaVal; + + ImGuiNextWindowData() + { + PosCond = SizeCond = ContentSizeCond = CollapsedCond = SizeConstraintCond = FocusCond = BgAlphaCond = 0; + PosVal = PosPivotVal = SizeVal = ImVec2(0.0f, 0.0f); + ContentSizeVal = ImVec2(0.0f, 0.0f); + CollapsedVal = false; + SizeConstraintRect = ImRect(); + SizeCallback = NULL; + SizeCallbackUserData = NULL; + BgAlphaVal = FLT_MAX; + } + + void Clear() + { + PosCond = SizeCond = ContentSizeCond = CollapsedCond = SizeConstraintCond = FocusCond = BgAlphaCond = 0; + } }; // Main state for ImGui @@ -366,9 +503,9 @@ struct ImGuiContext ImGuiIO IO; ImGuiStyle Style; ImFont* Font; // (Shortcut) == FontStack.empty() ? IO.Font : FontStack.back() - float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize() - float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Size of characters. - ImVec2 FontTexUvWhitePixel; // (Shortcut) == Font->TexUvWhitePixel + float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window. + float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height. + ImDrawListSharedData DrawListSharedData; float Time; int FrameCount; @@ -376,71 +513,77 @@ struct ImGuiContext int FrameCountRendered; ImVector Windows; ImVector WindowsSortBuffer; - ImGuiWindow* CurrentWindow; // Being drawn into ImVector CurrentWindowStack; - ImGuiWindow* FocusedWindow; // Will catch keyboard inputs + ImGuiStorage WindowsById; + int WindowsActiveCount; + ImGuiWindow* CurrentWindow; // Being drawn into + ImGuiWindow* NavWindow; // Nav/focused window for navigation ImGuiWindow* HoveredWindow; // Will catch mouse inputs ImGuiWindow* HoveredRootWindow; // Will catch mouse inputs (for focus/move only) ImGuiID HoveredId; // Hovered widget bool HoveredIdAllowOverlap; ImGuiID HoveredIdPreviousFrame; + float HoveredIdTimer; ImGuiID ActiveId; // Active widget ImGuiID ActiveIdPreviousFrame; - bool ActiveIdIsAlive; + float ActiveIdTimer; + bool ActiveIdIsAlive; // Active widget has been seen this frame bool ActiveIdIsJustActivated; // Set at the time of activation for one frame - bool ActiveIdAllowOverlap; // Set only by active widget + bool ActiveIdAllowOverlap; // Active widget allows another widget to steal active id (generally for overlapping widgets, but not always) ImVec2 ActiveIdClickOffset; // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior) ImGuiWindow* ActiveIdWindow; - ImGuiWindow* MovedWindow; // Track the child window we clicked on to move a window. - ImGuiID MovedWindowMoveId; // == MovedWindow->RootWindow->MoveId - ImVector Settings; // .ini Settings - float SettingsDirtyTimer; // Save .ini Settings on disk when time reaches zero + ImGuiWindow* MovingWindow; // Track the window we clicked on (in order to preserve focus). The actually window that is moved is generally MovingWindow->RootWindow. ImVector ColorModifiers; // Stack for PushStyleColor()/PopStyleColor() ImVector StyleModifiers; // Stack for PushStyleVar()/PopStyleVar() ImVector FontStack; // Stack for PushFont()/PopFont() ImVector OpenPopupStack; // Which popups are open (persistent) ImVector CurrentPopupStack; // Which level of BeginPopup() we are in (reset every frame) - - // Storage for SetNexWindow** and SetNextTreeNode*** functions - ImVec2 SetNextWindowPosVal; - ImVec2 SetNextWindowSizeVal; - ImVec2 SetNextWindowContentSizeVal; - bool SetNextWindowCollapsedVal; - ImGuiSetCond SetNextWindowPosCond; - ImGuiSetCond SetNextWindowSizeCond; - ImGuiSetCond SetNextWindowContentSizeCond; - ImGuiSetCond SetNextWindowCollapsedCond; - ImRect SetNextWindowSizeConstraintRect; // Valid if 'SetNextWindowSizeConstraint' is true - ImGuiSizeConstraintCallback SetNextWindowSizeConstraintCallback; - void* SetNextWindowSizeConstraintCallbackUserData; - bool SetNextWindowSizeConstraint; - bool SetNextWindowFocus; - bool SetNextTreeNodeOpenVal; - ImGuiSetCond SetNextTreeNodeOpenCond; + ImGuiNextWindowData NextWindowData; // Storage for SetNextWindow** functions + bool NextTreeNodeOpenVal; // Storage for SetNextTreeNode** functions + ImGuiCond NextTreeNodeOpenCond; // Render - ImDrawData RenderDrawData; // Main ImDrawData instance to pass render information to the user - ImVector RenderDrawLists[3]; + ImDrawData DrawData; // Main ImDrawData instance to pass render information to the user + ImDrawDataBuilder DrawDataBuilder; float ModalWindowDarkeningRatio; ImDrawList OverlayDrawList; // Optional software render of mouse cursors, if io.MouseDrawCursor is set + a few debug overlays ImGuiMouseCursor MouseCursor; - ImGuiMouseCursorData MouseCursorData[ImGuiMouseCursor_Count_]; + + // Drag and Drop + bool DragDropActive; + ImGuiDragDropFlags DragDropSourceFlags; + int DragDropMouseButton; + ImGuiPayload DragDropPayload; + ImRect DragDropTargetRect; + ImGuiID DragDropTargetId; + float DragDropAcceptIdCurrRectSurface; + ImGuiID DragDropAcceptIdCurr; // Target item id (set at the time of accepting the payload) + ImGuiID DragDropAcceptIdPrev; // Target item id from previous frame (we need to store this to allow for overlapping drag and drop targets) + int DragDropAcceptFrameCount; // Last time a target expressed a desire to accept the source + ImVector DragDropPayloadBufHeap; // We don't expose the ImVector<> directly + unsigned char DragDropPayloadBufLocal[8]; // Widget state ImGuiTextEditState InputTextState; ImFont InputTextPasswordFont; ImGuiID ScalarAsInputTextId; // Temporary text input when CTRL+clicking on a slider, etc. - ImGuiStorage ColorEditModeStorage; // Store user selection of color edit mode + ImGuiColorEditFlags ColorEditOptions; // Store user options for color edit widgets + ImVec4 ColorPickerRef; float DragCurrentValue; // Currently dragged value, always float, not rounded by end-user precision settings ImVec2 DragLastMouseDelta; float DragSpeedDefaultRatio; // If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio float DragSpeedScaleSlow; float DragSpeedScaleFast; ImVec2 ScrollbarClickDeltaToGrabCenter; // Distance between mouse and center of grab box, normalized in parent space. Use storage? - char Tooltip[1024]; - char* PrivateClipboard; // If no custom clipboard handler is defined + int TooltipOverrideCount; + ImVector PrivateClipboard; // If no custom clipboard handler is defined ImVec2 OsImePosRequest, OsImePosSet; // Cursor position request & last passed to the OS Input Method Editor + // Settings + float SettingsDirtyTimer; // Save .ini Settings on disk when time reaches zero + ImVector SettingsWindows; // .ini settings for ImGuiWindow + ImVector SettingsHandlers; // List of .ini settings handlers + // Logging bool LogEnabled; FILE* LogFile; // If != NULL log to stdout/ file @@ -452,68 +595,67 @@ struct ImGuiContext float FramerateSecPerFrame[120]; // calculate estimate of framerate for user int FramerateSecPerFrameIdx; float FramerateSecPerFrameAccum; - int CaptureMouseNextFrame; // explicit capture via CaptureInputs() sets those flags - int CaptureKeyboardNextFrame; + int WantCaptureMouseNextFrame; // explicit capture via CaptureInputs() sets those flags + int WantCaptureKeyboardNextFrame; + int WantTextInputNextFrame; char TempBuffer[1024*3+1]; // temporary text buffer - ImGuiContext() + ImGuiContext() : OverlayDrawList(NULL) { Initialized = false; Font = NULL; FontSize = FontBaseSize = 0.0f; - FontTexUvWhitePixel = ImVec2(0.0f, 0.0f); Time = 0.0f; FrameCount = 0; FrameCountEnded = FrameCountRendered = -1; + WindowsActiveCount = 0; CurrentWindow = NULL; - FocusedWindow = NULL; + NavWindow = NULL; HoveredWindow = NULL; HoveredRootWindow = NULL; HoveredId = 0; HoveredIdAllowOverlap = false; HoveredIdPreviousFrame = 0; + HoveredIdTimer = 0.0f; ActiveId = 0; ActiveIdPreviousFrame = 0; + ActiveIdTimer = 0.0f; ActiveIdIsAlive = false; ActiveIdIsJustActivated = false; ActiveIdAllowOverlap = false; ActiveIdClickOffset = ImVec2(-1,-1); ActiveIdWindow = NULL; - MovedWindow = NULL; - MovedWindowMoveId = 0; - SettingsDirtyTimer = 0.0f; + MovingWindow = NULL; + NextTreeNodeOpenVal = false; + NextTreeNodeOpenCond = 0; - SetNextWindowPosVal = ImVec2(0.0f, 0.0f); - SetNextWindowSizeVal = ImVec2(0.0f, 0.0f); - SetNextWindowCollapsedVal = false; - SetNextWindowPosCond = 0; - SetNextWindowSizeCond = 0; - SetNextWindowContentSizeCond = 0; - SetNextWindowCollapsedCond = 0; - SetNextWindowSizeConstraintRect = ImRect(); - SetNextWindowSizeConstraintCallback = NULL; - SetNextWindowSizeConstraintCallbackUserData = NULL; - SetNextWindowSizeConstraint = false; - SetNextWindowFocus = false; - SetNextTreeNodeOpenVal = false; - SetNextTreeNodeOpenCond = 0; + ModalWindowDarkeningRatio = 0.0f; + OverlayDrawList._Data = &DrawListSharedData; + OverlayDrawList._OwnerName = "##Overlay"; // Give it a name for debugging + MouseCursor = ImGuiMouseCursor_Arrow; + + DragDropActive = false; + DragDropSourceFlags = 0; + DragDropMouseButton = -1; + DragDropTargetId = 0; + DragDropAcceptIdCurrRectSurface = 0.0f; + DragDropAcceptIdPrev = DragDropAcceptIdCurr = 0; + DragDropAcceptFrameCount = -1; + memset(DragDropPayloadBufLocal, 0, sizeof(DragDropPayloadBufLocal)); ScalarAsInputTextId = 0; + ColorEditOptions = ImGuiColorEditFlags__OptionsDefault; DragCurrentValue = 0.0f; DragLastMouseDelta = ImVec2(0.0f, 0.0f); DragSpeedDefaultRatio = 1.0f / 100.0f; - DragSpeedScaleSlow = 0.01f; + DragSpeedScaleSlow = 1.0f / 100.0f; DragSpeedScaleFast = 10.0f; ScrollbarClickDeltaToGrabCenter = ImVec2(0.0f, 0.0f); - memset(Tooltip, 0, sizeof(Tooltip)); - PrivateClipboard = NULL; + TooltipOverrideCount = 0; OsImePosRequest = OsImePosSet = ImVec2(-1.0f, -1.0f); - ModalWindowDarkeningRatio = 0.0f; - OverlayDrawList._OwnerName = "##Overlay"; // Give it a name for debugging - MouseCursor = ImGuiMouseCursor_Arrow; - memset(MouseCursorData, 0, sizeof(MouseCursorData)); + SettingsDirtyTimer = 0.0f; LogEnabled = false; LogFile = NULL; @@ -524,11 +666,23 @@ struct ImGuiContext memset(FramerateSecPerFrame, 0, sizeof(FramerateSecPerFrame)); FramerateSecPerFrameIdx = 0; FramerateSecPerFrameAccum = 0.0f; - CaptureMouseNextFrame = CaptureKeyboardNextFrame = -1; + WantCaptureMouseNextFrame = WantCaptureKeyboardNextFrame = WantTextInputNextFrame = -1; memset(TempBuffer, 0, sizeof(TempBuffer)); } }; +// Transient per-window flags, reset at the beginning of the frame. For child window, inherited from parent on first Begin(). +enum ImGuiItemFlags_ +{ + ImGuiItemFlags_AllowKeyboardFocus = 1 << 0, // true + ImGuiItemFlags_ButtonRepeat = 1 << 1, // false // Button() will return true multiple times based on io.KeyRepeatDelay and io.KeyRepeatRate settings. + ImGuiItemFlags_Disabled = 1 << 2, // false // FIXME-WIP: Disable interactions but doesn't affect visuals. Should be: grey out and disable interactions with widgets that affect data + view widgets (WIP) + //ImGuiItemFlags_NoNav = 1 << 3, // false + //ImGuiItemFlags_NoNavDefaultFocus = 1 << 4, // false + ImGuiItemFlags_SelectableDontClosePopup = 1 << 5, // false // MenuItem/Selectable() automatically closes current Popup window + ImGuiItemFlags_Default_ = ImGuiItemFlags_AllowKeyboardFocus +}; + // Transient per-window data, reset at the beginning of the frame // FIXME: That's theory, in practice the delimitation between ImGuiWindow and ImGuiDrawContext is quite tenuous and could be reconsidered. struct IMGUI_API ImGuiDrawContext @@ -536,7 +690,7 @@ struct IMGUI_API ImGuiDrawContext ImVec2 CursorPos; ImVec2 CursorPosPrevLine; ImVec2 CursorStartPos; - ImVec2 CursorMaxPos; // Implicitly calculate the size of our contents, always extending. Saved into window->SizeContents at the end of the frame + ImVec2 CursorMaxPos; // Used to implicitly calculate the size of our contents, always growing during the frame. Turned into window->SizeContents at the beginning of next frame float CurrentLineHeight; float CurrentLineTextBaseOffset; float PrevLineHeight; @@ -545,8 +699,7 @@ struct IMGUI_API ImGuiDrawContext int TreeDepth; ImGuiID LastItemId; ImRect LastItemRect; - bool LastItemHoveredAndUsable; // Item rectangle is hovered, and its window is currently interactable with (not blocked by a popup preventing access to the window) - bool LastItemHoveredRect; // Item rectangle is hovered, but its window may or not be currently interactable with (might be blocked by a popup preventing access to the window) + bool LastItemRectHoveredRect; bool MenuBarAppending; float MenuBarOffsetX; ImVector ChildWindows; @@ -554,31 +707,19 @@ struct IMGUI_API ImGuiDrawContext ImGuiLayoutType LayoutType; // We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. + ImGuiItemFlags ItemFlags; // == ItemFlagsStack.back() [empty == ImGuiItemFlags_Default] float ItemWidth; // == ItemWidthStack.back(). 0.0: default, >0.0: width in pixels, <0.0: align xx pixels to the right of window float TextWrapPos; // == TextWrapPosStack.back() [empty == -1.0f] - bool AllowKeyboardFocus; // == AllowKeyboardFocusStack.back() [empty == true] - bool ButtonRepeat; // == ButtonRepeatStack.back() [empty == false] + ImVectorItemFlagsStack; ImVector ItemWidthStack; ImVector TextWrapPosStack; - ImVector AllowKeyboardFocusStack; - ImVector ButtonRepeatStack; ImVectorGroupStack; - ImGuiColorEditMode ColorEditMode; int StackSizesBackup[6]; // Store size of various stacks for asserting float IndentX; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.) float GroupOffsetX; float ColumnsOffsetX; // Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API. - int ColumnsCurrent; - int ColumnsCount; - float ColumnsMinX; - float ColumnsMaxX; - float ColumnsStartPosY; - float ColumnsCellMinY; - float ColumnsCellMaxY; - bool ColumnsShowBorders; - ImGuiID ColumnsSetId; - ImVector ColumnsData; + ImGuiColumnsSet* ColumnsSet; // Current columns set ImGuiDrawContext() { @@ -588,29 +729,21 @@ struct IMGUI_API ImGuiDrawContext LogLinePosY = -1.0f; TreeDepth = 0; LastItemId = 0; - LastItemRect = ImRect(0.0f,0.0f,0.0f,0.0f); - LastItemHoveredAndUsable = LastItemHoveredRect = false; + LastItemRect = ImRect(); + LastItemRectHoveredRect = false; MenuBarAppending = false; MenuBarOffsetX = 0.0f; StateStorage = NULL; LayoutType = ImGuiLayoutType_Vertical; ItemWidth = 0.0f; - ButtonRepeat = false; - AllowKeyboardFocus = true; + ItemFlags = ImGuiItemFlags_Default_; TextWrapPos = -1.0f; - ColorEditMode = ImGuiColorEditMode_RGB; memset(StackSizesBackup, 0, sizeof(StackSizesBackup)); IndentX = 0.0f; GroupOffsetX = 0.0f; ColumnsOffsetX = 0.0f; - ColumnsCurrent = 0; - ColumnsCount = 1; - ColumnsMinX = ColumnsMaxX = 0.0f; - ColumnsStartPosY = 0.0f; - ColumnsCellMinY = ColumnsCellMaxY = 0.0f; - ColumnsShowBorders = true; - ColumnsSetId = 0; + ColumnsSet = NULL; } }; @@ -620,51 +753,60 @@ struct IMGUI_API ImGuiWindow char* Name; ImGuiID ID; // == ImHash(Name) ImGuiWindowFlags Flags; // See enum ImGuiWindowFlags_ - int IndexWithinParent; // Order within immediate parent window, if we are a child window. Otherwise 0. ImVec2 PosFloat; ImVec2 Pos; // Position rounded-up to nearest pixel ImVec2 Size; // Current size (==SizeFull or collapsed title bar size) ImVec2 SizeFull; // Size when non collapsed - ImVec2 SizeContents; // Size of contents (== extents reach of the drawing cursor) from previous frame + ImVec2 SizeFullAtLastBegin; // Copy of SizeFull at the end of Begin. This is the reference value we'll use on the next frame to decide if we need scrollbars. + ImVec2 SizeContents; // Size of contents (== extents reach of the drawing cursor) from previous frame. Include decoration, window title, border, menu, etc. ImVec2 SizeContentsExplicit; // Size of contents explicitly set by the user via SetNextWindowContentSize() ImRect ContentsRegionRect; // Maximum visible content position in window coordinates. ~~ (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis - ImVec2 WindowPadding; // Window padding at the time of begin. We need to lock it, in particular manipulation of the ShowBorder would have an effect + ImVec2 WindowPadding; // Window padding at the time of begin. + float WindowRounding; // Window rounding at the time of begin. + float WindowBorderSize; // Window border size at the time of begin. ImGuiID MoveId; // == window->GetID("#MOVE") ImVec2 Scroll; ImVec2 ScrollTarget; // target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0f. (FLT_MAX for no change) ImVec2 ScrollTargetCenterRatio; // 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered bool ScrollbarX, ScrollbarY; ImVec2 ScrollbarSizes; - float BorderSize; - bool Active; // Set to true on Begin() + bool Active; // Set to true on Begin(), unless Collapsed bool WasActive; - bool Accessed; // Set to true when any widget access the current window + bool WriteAccessed; // Set to true when any widget access the current window bool Collapsed; // Set when collapsing window to become only title-bar - bool SkipItems; // == Visible && !Collapsed + bool SkipItems; // Set when items can safely be all clipped (e.g. window not visible or collapsed) + bool Appearing; // Set during the frame where the window is appearing (or re-appearing) + bool CloseButton; // Set when the window has a close button (p_open != NULL) + int BeginOrderWithinParent; // Order within immediate parent window, if we are a child window. Otherwise 0. + int BeginOrderWithinContext; // Order within entire imgui context. This is mostly used for debugging submission order related issues. int BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs) ImGuiID PopupId; // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling) int AutoFitFramesX, AutoFitFramesY; bool AutoFitOnlyGrows; - int AutoPosLastDirection; + int AutoFitChildAxises; + ImGuiDir AutoPosLastDirection; int HiddenFrames; - int SetWindowPosAllowFlags; // bit ImGuiSetCond_*** specify if SetWindowPos() call will succeed with this particular flag. - int SetWindowSizeAllowFlags; // bit ImGuiSetCond_*** specify if SetWindowSize() call will succeed with this particular flag. - int SetWindowCollapsedAllowFlags; // bit ImGuiSetCond_*** specify if SetWindowCollapsed() call will succeed with this particular flag. - bool SetWindowPosCenterWanted; + ImGuiCond SetWindowPosAllowFlags; // store condition flags for next SetWindowPos() call. + ImGuiCond SetWindowSizeAllowFlags; // store condition flags for next SetWindowSize() call. + ImGuiCond SetWindowCollapsedAllowFlags; // store condition flags for next SetWindowCollapsed() call. + ImVec2 SetWindowPosVal; // store window position when using a non-zero Pivot (position set needs to be processed when we know the window size) + ImVec2 SetWindowPosPivot; // store window pivot for positioning. ImVec2(0,0) when positioning from top-left corner; ImVec2(0.5f,0.5f) for centering; ImVec2(1,1) for bottom right. ImGuiDrawContext DC; // Temporary per-window data, reset at the beginning of the frame ImVector IDStack; // ID stack. ID are hashes seeded with the value at the top of the stack ImRect ClipRect; // = DrawList->clip_rect_stack.back(). Scissoring / clipping rectangle. x1, y1, x2, y2. ImRect WindowRectClipped; // = WindowRect just after setup in Begin(). == window->Rect() for root window. + ImRect InnerRect; int LastFrameActive; float ItemWidthDefault; - ImGuiSimpleColumns MenuColumns; // Simplified columns storage for menu items + ImGuiMenuColumns MenuColumns; // Simplified columns storage for menu items ImGuiStorage StateStorage; + ImVector ColumnsStorage; float FontWindowScale; // Scale multiplier per-window ImDrawList* DrawList; - ImGuiWindow* RootWindow; // If we are a child window, this is pointing to the first non-child parent window. Else point to ourself. - ImGuiWindow* RootNonPopupWindow; // If we are a child window, this is pointing to the first non-child non-popup parent window. Else point to ourself. - ImGuiWindow* ParentWindow; // If we are a child window, this is pointing to our parent window. Else point to NULL. + ImGuiWindow* ParentWindow; // If we are a child _or_ popup window, this is pointing to our parent. Otherwise NULL. + ImGuiWindow* RootWindow; // Generally point to ourself. If we are a child window, this is pointing to the first non-child parent window. + ImGuiWindow* RootNonPopupWindow; // Generally point to ourself. Used to display TitleBgActive color and for selecting which window to use for NavWindowing // Navigation / Focus int FocusIdxAllCounter; // Start at -1 and increase as assigned via FocusItemRegister() @@ -675,13 +817,15 @@ struct IMGUI_API ImGuiWindow int FocusIdxTabRequestNext; // " public: - ImGuiWindow(const char* name); + ImGuiWindow(ImGuiContext* context, const char* name); ~ImGuiWindow(); ImGuiID GetID(const char* str, const char* str_end = NULL); ImGuiID GetID(const void* ptr); ImGuiID GetIDNoKeepAlive(const char* str, const char* str_end = NULL); + ImGuiID GetIDFromRectangle(const ImRect& r_abs); + // We don't use g.FontSize because the window may be != g.CurrentWidow. ImRect Rect() const { return ImRect(Pos.x, Pos.y, Pos.x+Size.x, Pos.y+Size.y); } float CalcFontSize() const { return GImGui->FontBaseSize * FontWindowScale; } float TitleBarHeight() const { return (Flags & ImGuiWindowFlags_NoTitleBar) ? 0.0f : CalcFontSize() + GImGui->Style.FramePadding.y * 2.0f; } @@ -690,6 +834,18 @@ public: ImRect MenuBarRect() const { float y1 = Pos.y + TitleBarHeight(); return ImRect(Pos.x, y1, Pos.x + SizeFull.x, y1 + MenuBarHeight()); } }; +// Backup and restore just enough data to be able to use IsItemHovered() on item A after another B in the same window has overwritten the data. +struct ImGuiItemHoveredDataBackup +{ + ImGuiID LastItemId; + ImRect LastItemRect; + bool LastItemRectHoveredRect; + + ImGuiItemHoveredDataBackup() { Backup(); } + void Backup() { ImGuiWindow* window = GImGui->CurrentWindow; LastItemId = window->DC.LastItemId; LastItemRect = window->DC.LastItemRect; LastItemRectHoveredRect = window->DC.LastItemRectHoveredRect; } + void Restore() const { ImGuiWindow* window = GImGui->CurrentWindow; window->DC.LastItemId = LastItemId; window->DC.LastItemRect = LastItemRect; window->DC.LastItemRectHoveredRect = LastItemRectHoveredRect; } +}; + //----------------------------------------------------------------------------- // Internal API // No guarantee of forward compatibility here. @@ -702,45 +858,80 @@ namespace ImGui // - ImGui::NewFrame() has never been called, which is illegal. // - You are calling ImGui functions after ImGui::Render() and before the next ImGui::NewFrame(), which is also illegal. inline ImGuiWindow* GetCurrentWindowRead() { ImGuiContext& g = *GImGui; return g.CurrentWindow; } - inline ImGuiWindow* GetCurrentWindow() { ImGuiContext& g = *GImGui; g.CurrentWindow->Accessed = true; return g.CurrentWindow; } - IMGUI_API ImGuiWindow* GetParentWindow(); + inline ImGuiWindow* GetCurrentWindow() { ImGuiContext& g = *GImGui; g.CurrentWindow->WriteAccessed = true; return g.CurrentWindow; } IMGUI_API ImGuiWindow* FindWindowByName(const char* name); IMGUI_API void FocusWindow(ImGuiWindow* window); + IMGUI_API void BringWindowToFront(ImGuiWindow* window); + IMGUI_API void BringWindowToBack(ImGuiWindow* window); + IMGUI_API bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent); - IMGUI_API void EndFrame(); // Ends the ImGui frame. Automatically called by Render()! you most likely don't need to ever call that yourself directly. If you don't need to render you can call EndFrame() but you'll have wasted CPU already. If you don't need to render, don't create any windows instead! + IMGUI_API void Initialize(); + + IMGUI_API void MarkIniSettingsDirty(); + IMGUI_API ImGuiSettingsHandler* FindSettingsHandler(const char* type_name); + IMGUI_API ImGuiWindowSettings* FindWindowSettings(ImGuiID id); IMGUI_API void SetActiveID(ImGuiID id, ImGuiWindow* window); - IMGUI_API void ClearActiveID(); + IMGUI_API void ClearActiveID(); IMGUI_API void SetHoveredID(ImGuiID id); + IMGUI_API ImGuiID GetHoveredID(); IMGUI_API void KeepAliveID(ImGuiID id); IMGUI_API void ItemSize(const ImVec2& size, float text_offset_y = 0.0f); IMGUI_API void ItemSize(const ImRect& bb, float text_offset_y = 0.0f); - IMGUI_API bool ItemAdd(const ImRect& bb, const ImGuiID* id); - IMGUI_API bool IsClippedEx(const ImRect& bb, const ImGuiID* id, bool clip_even_when_logged); - IMGUI_API bool IsHovered(const ImRect& bb, ImGuiID id, bool flatten_childs = false); - IMGUI_API bool FocusableItemRegister(ImGuiWindow* window, bool is_active, bool tab_stop = true); // Return true if focus is requested + IMGUI_API bool ItemAdd(const ImRect& bb, ImGuiID id); + IMGUI_API bool ItemHoverable(const ImRect& bb, ImGuiID id); + IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged); + IMGUI_API bool FocusableItemRegister(ImGuiWindow* window, ImGuiID id, bool tab_stop = true); // Return true if focus is requested IMGUI_API void FocusableItemUnregister(ImGuiWindow* window); IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_x, float default_y); IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x); + IMGUI_API void PushMultiItemsWidths(int components, float width_full = 0.0f); + IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled); + IMGUI_API void PopItemFlag(); - IMGUI_API void OpenPopupEx(const char* str_id, bool reopen_existing); + IMGUI_API void SetCurrentFont(ImFont* font); - // NB: All position are in absolute pixels coordinates (not window coordinates) - // FIXME: All those functions are a mess and needs to be refactored into something decent. AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. - // We need: a sort of symbol library, preferably baked into font atlas when possible + decent text rendering helpers. + IMGUI_API void OpenPopupEx(ImGuiID id); + IMGUI_API void ClosePopup(ImGuiID id); + IMGUI_API void ClosePopupsOverWindow(ImGuiWindow* ref_window); + IMGUI_API bool IsPopupOpen(ImGuiID id); + IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags); + IMGUI_API void BeginTooltipEx(ImGuiWindowFlags extra_flags, bool override_previous_tooltip = true); + + IMGUI_API int CalcTypematicPressedRepeatAmount(float t, float t_prev, float repeat_delay, float repeat_rate); + + IMGUI_API void Scrollbar(ImGuiLayoutType direction); + IMGUI_API void VerticalSeparator(); // Vertical separator, for menu bars (use current line height). not exposed because it is misleading what it doesn't have an effect on regular layout. + IMGUI_API bool SplitterBehavior(ImGuiID id, const ImRect& bb, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f); + + IMGUI_API bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id); + IMGUI_API void ClearDragDrop(); + IMGUI_API bool IsDragDropPayloadBeingAccepted(); + + // FIXME-WIP: New Columns API + IMGUI_API void BeginColumns(const char* str_id, int count, ImGuiColumnsFlags flags = 0); // setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns(). + IMGUI_API void EndColumns(); // close columns + IMGUI_API void PushColumnClipRect(int column_index = -1); + + // NB: All position are in absolute pixels coordinates (never using window coordinates internally) + // AVOID USING OUTSIDE OF IMGUI.CPP! NOT FOR PUBLIC CONSUMPTION. THOSE FUNCTIONS ARE A MESS. THEIR SIGNATURE AND BEHAVIOR WILL CHANGE, THEY NEED TO BE REFACTORED INTO SOMETHING DECENT. IMGUI_API void RenderText(ImVec2 pos, const char* text, const char* text_end = NULL, bool hide_text_after_hash = true); IMGUI_API void RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width); IMGUI_API void RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align = ImVec2(0,0), const ImRect* clip_rect = NULL); IMGUI_API void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border = true, float rounding = 0.0f); - IMGUI_API void RenderCollapseTriangle(ImVec2 pos, bool is_open, float scale = 1.0f); + IMGUI_API void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding = 0.0f); + IMGUI_API void RenderColorRectWithAlphaCheckerboard(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, float grid_step, ImVec2 grid_off, float rounding = 0.0f, int rounding_corners_flags = ~0); + IMGUI_API void RenderTriangle(ImVec2 pos, ImGuiDir dir, float scale = 1.0f); IMGUI_API void RenderBullet(ImVec2 pos); - IMGUI_API void RenderCheckMark(ImVec2 pos, ImU32 col); + IMGUI_API void RenderCheckMark(ImVec2 pos, ImU32 col, float sz); + IMGUI_API void RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding); IMGUI_API const char* FindRenderedTextEnd(const char* text, const char* text_end = NULL); // Find the optional ## from which we stop displaying text. IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0); IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0,0), ImGuiButtonFlags flags = 0); IMGUI_API bool CloseButton(ImGuiID id, const ImVec2& pos, float radius); + IMGUI_API bool ArrowButton(ImGuiID id, ImGuiDir dir, ImVec2 padding, ImGuiButtonFlags flags = 0); IMGUI_API bool SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, ImGuiSliderFlags flags = 0); IMGUI_API bool SliderFloatN(const char* label, float* v, int components, float v_min, float v_max, const char* display_format, float power); @@ -756,6 +947,9 @@ namespace ImGui IMGUI_API bool InputScalarEx(const char* label, ImGuiDataType data_type, void* data_ptr, void* step_ptr, void* step_fast_ptr, const char* scalar_format, ImGuiInputTextFlags extra_flags); IMGUI_API bool InputScalarAsWidgetReplacement(const ImRect& aabb, const char* label, ImGuiDataType data_type, void* data_ptr, ImGuiID id, int decimal_precision); + IMGUI_API void ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags); + IMGUI_API void ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags); + IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL); IMGUI_API bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags = 0); // Consume previous SetNextTreeNodeOpened() data, if any. May return true when logging IMGUI_API void TreePushRawID(ImGuiID id); @@ -765,8 +959,22 @@ namespace ImGui IMGUI_API int ParseFormatPrecision(const char* fmt, int default_value); IMGUI_API float RoundScalar(float value, int decimal_precision); + // Shade functions + IMGUI_API void ShadeVertsLinearColorGradientKeepAlpha(ImDrawVert* vert_start, ImDrawVert* vert_end, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1); + IMGUI_API void ShadeVertsLinearAlphaGradientForLeftToRightText(ImDrawVert* vert_start, ImDrawVert* vert_end, float gradient_p0_x, float gradient_p1_x); + IMGUI_API void ShadeVertsLinearUV(ImDrawVert* vert_start, ImDrawVert* vert_end, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp); + } // namespace ImGui +// ImFontAtlas internals +IMGUI_API bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas); +IMGUI_API void ImFontAtlasBuildRegisterDefaultCustomRects(ImFontAtlas* atlas); +IMGUI_API void ImFontAtlasBuildSetupFont(ImFontAtlas* atlas, ImFont* font, ImFontConfig* font_config, float ascent, float descent); +IMGUI_API void ImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas, void* spc); +IMGUI_API void ImFontAtlasBuildFinish(ImFontAtlas* atlas); +IMGUI_API void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_multiply_factor); +IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsigned char* pixels, int x, int y, int w, int h, int stride); + #ifdef __clang__ #pragma clang diagnostic pop #endif diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_node_graph_test.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_node_graph_test.cpp deleted file mode 100644 index 669137c..0000000 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_node_graph_test.cpp +++ /dev/null @@ -1,232 +0,0 @@ -// Creating a node graph editor for ImGui -// Quick demo, not production code! -// See https://github.com/ocornut/imgui/issues/306 -// v0.01 -// Animated gif: https://cloud.githubusercontent.com/assets/8225057/9472357/c0263c04-4b4c-11e5-9fdf-2cd4f33f6582.gif - -#include -#include "imgui.h" - -// NB: You can use math functions/operators on ImVec2 if you #define IMGUI_DEFINE_MATH_OPERATORS and #include "imgui_internal.h" -// Here we only declare simple +/- operators so others don't leak into the demo code. -static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x+rhs.x, lhs.y+rhs.y); } -static inline ImVec2 operator-(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x-rhs.x, lhs.y-rhs.y); } - -struct Node -{ - int ID; - char Name[32]; - ImVec2 Pos, Size; - float Value; - int InputsCount, OutputsCount; - - Node(int id, const char* name, const ImVec2& pos, float value, int inputs_count, int outputs_count) { ID = id; strncpy(Name, name, 31); Name[31] = 0; Pos = pos; Value = value; InputsCount = inputs_count; OutputsCount = outputs_count; } - - ImVec2 GetInputSlotPos(int slot_no) const { return ImVec2(Pos.x, Pos.y + Size.y * ((float)slot_no+1) / ((float)InputsCount+1)); } - ImVec2 GetOutputSlotPos(int slot_no) const { return ImVec2(Pos.x + Size.x, Pos.y + Size.y * ((float)slot_no+1) / ((float)OutputsCount+1)); } -}; - -struct NodeLink -{ - int InputIdx, InputSlot, OutputIdx, OutputSlot; - - NodeLink(int input_idx, int input_slot, int output_idx, int output_slot) { InputIdx = input_idx; InputSlot = input_slot; OutputIdx = output_idx; OutputSlot = output_slot; } -}; - -// Really dumb data structure provided for the example. -// Note that we storing links are INDICES (not ID) to make example code shorter, obviously a bad idea for any general purpose code. -void ShowExampleAppCustomNodeGraph(bool* opened) -{ - ImGui::SetNextWindowSize(ImVec2(700,600), ImGuiSetCond_FirstUseEver); - if (!ImGui::Begin("Example: Custom Node Graph", opened)) - { - ImGui::End(); - return; - } - - static ImVector nodes; - static ImVector links; - static bool inited = false; - static ImVec2 scrolling = ImVec2(0.0f, 0.0f); - static int node_selected = -1; - if (!inited) - { - nodes.push_back(Node(0, "MainTex", ImVec2(40,50), 0.5f, 1, 1)); - nodes.push_back(Node(1, "BumpMap", ImVec2(40,150), 0.42f, 1, 1)); - nodes.push_back(Node(2, "Combine", ImVec2(270,80), 1.0f, 2, 2)); - links.push_back(NodeLink(0, 0, 2, 0)); - links.push_back(NodeLink(1, 0, 2, 1)); - inited = true; - } - - // Draw a list of nodes on the left side - bool open_context_menu = false; - int node_hovered_in_list = -1; - int node_hovered_in_scene = -1; - ImGui::BeginChild("node_list", ImVec2(100,0)); - ImGui::Text("Nodes"); - ImGui::Separator(); - for (int node_idx = 0; node_idx < nodes.Size; node_idx++) - { - Node* node = &nodes[node_idx]; - ImGui::PushID(node->ID); - if (ImGui::Selectable(node->Name, node->ID == node_selected)) - node_selected = node->ID; - if (ImGui::IsItemHovered()) - { - node_hovered_in_list = node->ID; - open_context_menu |= ImGui::IsMouseClicked(1); - } - ImGui::PopID(); - } - ImGui::EndChild(); - - ImGui::SameLine(); - ImGui::BeginGroup(); - - const float NODE_SLOT_RADIUS = 4.0f; - const ImVec2 NODE_WINDOW_PADDING(8.0f, 8.0f); - - // Create our child canvas - ImGui::Text("Hold middle mouse button to scroll (%.2f,%.2f)", scrolling.x, scrolling.y); - ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(1,1)); - ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0,0)); - ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImColor(40,40,40,200)); - ImGui::BeginChild("scrolling_region", ImVec2(0,0), true, ImGuiWindowFlags_NoScrollbar|ImGuiWindowFlags_NoMove); - ImGui::PushItemWidth(120.0f); - - ImDrawList* draw_list = ImGui::GetWindowDrawList(); - draw_list->ChannelsSplit(2); - ImVec2 offset = ImGui::GetCursorScreenPos() - scrolling; - - // Display links - draw_list->ChannelsSetCurrent(0); // Background - for (int link_idx = 0; link_idx < links.Size; link_idx++) - { - NodeLink* link = &links[link_idx]; - Node* node_inp = &nodes[link->InputIdx]; - Node* node_out = &nodes[link->OutputIdx]; - -#if 1 - // Hermite spline - // TODO: move to ImDrawList path API - ImVec2 p1 = offset+node_inp->GetOutputSlotPos(link->InputSlot); - ImVec2 t1 = ImVec2(+80.0f, 0.0f); - ImVec2 p2 = offset+node_out->GetInputSlotPos(link->OutputSlot); - ImVec2 t2 = ImVec2(+80.0f, 0.0f); - const int STEPS = 12; - for (int step = 0; step <= STEPS; step++) - { - float t = (float)step / (float)STEPS; - float h1 = +2*t*t*t - 3*t*t + 1.0f; - float h2 = -2*t*t*t + 3*t*t; - float h3 = t*t*t - 2*t*t + t; - float h4 = t*t*t - t*t; - draw_list->PathLineTo(ImVec2(h1*p1.x + h2*p2.x + h3*t1.x + h4*t2.x, h1*p1.y + h2*p2.y + h3*t1.y + h4*t2.y)); - } - draw_list->PathStroke(ImColor(200,200,100), false, 3.0f); -#else - draw_list->AddLine(offset+node_inp->GetOutputSlotPos(link->InputSlot), offset+node_out->GetInputSlotPos(link->OutputSlot), ImColor(200,200,100), 3.0f); -#endif - } - - // Display nodes - for (int node_idx = 0; node_idx < nodes.Size; node_idx++) - { - Node* node = &nodes[node_idx]; - ImGui::PushID(node->ID); - ImVec2 node_rect_min = offset + node->Pos; - - // Display node contents first - draw_list->ChannelsSetCurrent(1); // Foreground - bool old_any_active = ImGui::IsAnyItemActive(); - ImGui::SetCursorScreenPos(node_rect_min + NODE_WINDOW_PADDING); - ImGui::BeginGroup(); // Lock horizontal position - ImGui::Text("%s", node->Name); - ImGui::SliderFloat("##value", &node->Value, 0.0f, 1.0f, "Alpha %.2f"); - float dummy_color[3] = { node->Pos.x / ImGui::GetWindowWidth(), node->Pos.y / ImGui::GetWindowHeight(), fmodf((float)node->ID * 0.5f, 1.0f) }; - ImGui::ColorEdit3("##color", &dummy_color[0]); - ImGui::EndGroup(); - - // Save the size of what we have emitted and weither any of the widgets are being used - bool node_widgets_active = (!old_any_active && ImGui::IsAnyItemActive()); - node->Size = ImGui::GetItemRectSize() + NODE_WINDOW_PADDING + NODE_WINDOW_PADDING; - ImVec2 node_rect_max = node_rect_min + node->Size; - - // Display node box - draw_list->ChannelsSetCurrent(0); // Background - ImGui::SetCursorScreenPos(node_rect_min); - ImGui::InvisibleButton("node", node->Size); - if (ImGui::IsItemHovered()) - { - node_hovered_in_scene = node->ID; - open_context_menu |= ImGui::IsMouseClicked(1); - } - bool node_moving_active = ImGui::IsItemActive(); - if (node_widgets_active || node_moving_active) - node_selected = node->ID; - if (node_moving_active && ImGui::IsMouseDragging(0)) - node->Pos = node->Pos + ImGui::GetIO().MouseDelta; - - ImU32 node_bg_color = (node_hovered_in_list == node->ID || node_hovered_in_scene == node->ID || (node_hovered_in_list == -1 && node_selected == node->ID)) ? ImColor(75,75,75) : ImColor(60,60,60); - draw_list->AddRectFilled(node_rect_min, node_rect_max, node_bg_color, 4.0f); - draw_list->AddRect(node_rect_min, node_rect_max, ImColor(100,100,100), 4.0f); - for (int slot_idx = 0; slot_idx < node->InputsCount; slot_idx++) - draw_list->AddCircleFilled(offset + node->GetInputSlotPos(slot_idx), NODE_SLOT_RADIUS, ImColor(150,150,150,150)); - for (int slot_idx = 0; slot_idx < node->OutputsCount; slot_idx++) - draw_list->AddCircleFilled(offset + node->GetOutputSlotPos(slot_idx), NODE_SLOT_RADIUS, ImColor(150,150,150,150)); - - ImGui::PopID(); - } - draw_list->ChannelsMerge(); - - // Open context menu - if (!ImGui::IsAnyItemHovered() && ImGui::IsMouseHoveringWindow() && ImGui::IsMouseClicked(1)) - { - node_selected = node_hovered_in_list = node_hovered_in_scene = -1; - open_context_menu = true; - } - if (open_context_menu) - { - ImGui::OpenPopup("context_menu"); - if (node_hovered_in_list != -1) - node_selected = node_hovered_in_list; - if (node_hovered_in_scene != -1) - node_selected = node_hovered_in_scene; - } - - // Draw context menu - ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(8,8)); - if (ImGui::BeginPopup("context_menu")) - { - Node* node = node_selected != -1 ? &nodes[node_selected] : NULL; - ImVec2 scene_pos = ImGui::GetMousePosOnOpeningCurrentPopup() - offset; - if (node) - { - ImGui::Text("Node '%s'", node->Name); - ImGui::Separator(); - if (ImGui::MenuItem("Rename..", NULL, false, false)) {} - if (ImGui::MenuItem("Delete", NULL, false, false)) {} - if (ImGui::MenuItem("Copy", NULL, false, false)) {} - } - else - { - if (ImGui::MenuItem("Add")) { nodes.push_back(Node(nodes.Size, "New node", scene_pos, 0.5f, 2, 2)); } - if (ImGui::MenuItem("Paste", NULL, false, false)) {} - } - ImGui::EndPopup(); - } - ImGui::PopStyleVar(); - - // Scrolling - if (ImGui::IsWindowHovered() && !ImGui::IsAnyItemActive() && ImGui::IsMouseDragging(2, 0.0f)) - scrolling = scrolling - ImGui::GetIO().MouseDelta; - - ImGui::PopItemWidth(); - ImGui::EndChild(); - ImGui::PopStyleColor(); - ImGui::PopStyleVar(2); - ImGui::EndGroup(); - - ImGui::End(); -} diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h index 2ddf489..daebb8d 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h @@ -43,8 +43,7 @@ namespace ImGui } // namespace ImGui #include "widgets/color_picker.h" -// Disabled (martin) to use different docking system -// https://github.com/vassvik/imgui_docking_minimal +#include "widgets/color_wheel.h" // #include "widgets/dock.h" #include "widgets/file_list.h" #include "widgets/gizmo.h" diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.inl b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.inl index aa64902..e438a82 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.inl +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.inl @@ -72,10 +72,10 @@ namespace ImGui } // namespace #include "widgets/color_picker.inl" -// Disabled (martin) to use different docking system -// https://github.com/vassvik/imgui_docking_minimal -// #include "widgets/dock.inl" +#include "widgets/color_wheel.inl" +#include "widgets/dock.inl" #include "widgets/file_list.inl" #include "widgets/gizmo.inl" #include "widgets/memory_editor.inl" #include "widgets/range_slider.inl" + diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp deleted file mode 100644 index 83a7e40..0000000 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.cpp +++ /dev/null @@ -1,1681 +0,0 @@ -/* - * Copyright 2011-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -/* - * Based on ImWindow code from: - * https://github.com/thennequin/ImWindow - * - * MIT license: - * https://github.com/thennequin/ImWindow/blob/master/LICENSE - */ - -#include "imgui_wm.h" -#include "imgui_internal.h" -#include - -#define IMGUI_NEW(type) new (ImGui::MemAlloc(sizeof(type) ) ) type -#define IMGUI_DELETE(type, obj) static_cast(obj)->~type(), ImGui::MemFree(obj) -#define IMGUI_DELETE_NULL(type, obj) for (;;) { if (NULL != obj) { IMGUI_DELETE(type, obj); obj = NULL; } break; } - -namespace ImGuiWM -{ - enum EPlatformWindowAction - { - E_PLATFORM_WINDOW_ACTION_DESTOY = 1, - E_PLATFORM_WINDOW_ACTION_SHOW = 2, - E_PLATFORM_WINDOW_ACTION_HIDE = 4, - E_PLATFORM_WINDOW_ACTION_SET_POSITION = 8, - E_PLATFORM_WINDOW_ACTION_SET_SIZE = 16, - }; - - static const ImVec2 IM_VEC2_0 = ImVec2(0, 0); - static const ImVec2 IM_VEC2_N1 = ImVec2(-1, -1); - - int Id::s_iNextId = 0; - - Id::Id() - { - m_iId = s_iNextId++; - ImFormatString(m_pId, 11, "0x%8X", m_iId); - } - - ImU32 Id::GetId() const - { - return m_iId; - } - - const char* Id::GetStr() const - { - return m_pId; - } - - Window::Window() - { - m_pTitle = NULL; - WindowManager::GetInstance()->AddWindow(this); - } - - Window::~Window() - { - WindowManager::GetInstance()->RemoveWindow(this); - ImGui::MemFree(m_pTitle); - } - - void Window::Destroy() - { - WindowManager::GetInstance()->DestroyWindow(this); - } - - void Window::SetTitle(const char* pTitle) - { - ImGui::MemFree(m_pTitle); - m_pTitle = ImStrdup(pTitle); - } - - const char* Window::GetTitle() const - { - return m_pTitle; - } - - const ImVec2& Window::GetLastPosition() const - { - return m_oLastPosition; - } - - const ImVec2& Window::GetLastSize() const - { - return m_oLastSize; - } - - Container::Container(Container* pParent) - { - IM_ASSERT(NULL != pParent); - m_pSplits[0] = NULL; - m_pSplits[1] = NULL; - m_bVerticalSplit = false; - m_iActiveWindow = 0; - m_fSplitRatio = 0.5f; - m_bIsDrag = false; - m_pParent = pParent; - m_pParentWindow = (NULL != pParent) ? pParent->m_pParentWindow : NULL; - } - - Container::Container(PlatformWindow* pParent) - { - IM_ASSERT(NULL != pParent); - m_pSplits[0] = NULL; - m_pSplits[1] = NULL; - m_bVerticalSplit = false; - m_iActiveWindow = 0; - m_fSplitRatio = 0.5f; - m_bIsDrag = false; - m_pParent = NULL; - m_pParentWindow = pParent; - } - - Container::~Container() - { - while (m_lWindows.begin() != m_lWindows.end()) - { - Window* window = *m_lWindows.begin(); - WindowManager::GetInstance()->RemoveWindow(window); - IMGUI_DELETE(Window, window); - m_lWindows.erase(m_lWindows.begin()); - } - - IMGUI_DELETE_NULL(Container, m_pSplits[0]); - IMGUI_DELETE_NULL(Container, m_pSplits[1]); - } - - void Container::CreateSplits() - { - m_pSplits[0] = IMGUI_NEW(Container)(this); - m_pSplits[1] = IMGUI_NEW(Container)(this); - } - - void Container::Dock(Window* pWindow, EDockOrientation eOrientation) - { - IM_ASSERT(NULL != pWindow); - - if (NULL != pWindow) - { - IM_ASSERT(eOrientation != E_DOCK_ORIENTATION_CENTER || !IsSplit()); - - if (!IsSplit()) - { - if (m_lWindows.size() == 0) - { - eOrientation = E_DOCK_ORIENTATION_CENTER; - } - - switch (eOrientation) - { - case E_DOCK_ORIENTATION_CENTER: - { - m_lWindows.push_back(pWindow); - m_iActiveWindow = int(m_lWindows.size() - 1); - } - break; - case E_DOCK_ORIENTATION_TOP: - { - m_bVerticalSplit = true; - CreateSplits(); - m_pSplits[0]->Dock(pWindow); - m_pSplits[1]->m_lWindows.insert(m_pSplits[1]->m_lWindows.begin(), m_lWindows.begin(), m_lWindows.end()); - m_lWindows.clear(); - m_iActiveWindow = 0; - } - break; - case E_DOCK_ORIENTATION_LEFT: - { - m_bVerticalSplit = false; - CreateSplits(); - m_pSplits[0]->Dock(pWindow); - m_pSplits[1]->m_lWindows.insert(m_pSplits[1]->m_lWindows.begin(), m_lWindows.begin(), m_lWindows.end()); - m_lWindows.clear(); - m_iActiveWindow = 0; - } - break; - case E_DOCK_ORIENTATION_RIGHT: - { - m_bVerticalSplit = false; - CreateSplits(); - m_pSplits[0]->m_lWindows.insert(m_pSplits[0]->m_lWindows.begin(), m_lWindows.begin(), m_lWindows.end()); - m_pSplits[1]->Dock(pWindow); - m_lWindows.clear(); - m_iActiveWindow = 0; - } - break; - case E_DOCK_ORIENTATION_BOTTOM: - { - m_bVerticalSplit = true; - CreateSplits(); - m_pSplits[0]->m_lWindows.insert(m_pSplits[0]->m_lWindows.begin(), m_lWindows.begin(), m_lWindows.end()); - m_pSplits[1]->Dock(pWindow); - m_lWindows.clear(); - m_iActiveWindow = 0; - } - break; - } - } - else - { - switch (eOrientation) - { - case E_DOCK_ORIENTATION_CENTER: - IM_ASSERT(false); - break; - case E_DOCK_ORIENTATION_TOP: - { - Container* pSplit0 = m_pSplits[0]; - Container* pSplit1 = m_pSplits[1]; - CreateSplits(); - m_pSplits[0]->m_lWindows.push_back(pWindow); - m_pSplits[1]->m_bVerticalSplit = m_bVerticalSplit; - m_pSplits[1]->m_fSplitRatio = m_fSplitRatio; - m_pSplits[1]->m_pSplits[0] = pSplit0; - m_pSplits[1]->m_pSplits[1] = pSplit1; - m_pSplits[1]->m_pSplits[0]->m_pParent = m_pSplits[1]; - m_pSplits[1]->m_pSplits[1]->m_pParent = m_pSplits[1]; - m_fSplitRatio = WindowManager::GetInstance()->GetConfig().m_fDragMarginSizeRatio; - m_bVerticalSplit = true; - } - break; - case E_DOCK_ORIENTATION_LEFT: - { - Container* pSplit0 = m_pSplits[0]; - Container* pSplit1 = m_pSplits[1]; - CreateSplits(); - m_pSplits[0]->m_lWindows.push_back(pWindow); - m_pSplits[1]->m_bVerticalSplit = m_bVerticalSplit; - m_pSplits[1]->m_fSplitRatio = m_fSplitRatio; - m_pSplits[1]->m_pSplits[0] = pSplit0; - m_pSplits[1]->m_pSplits[1] = pSplit1; - m_pSplits[1]->m_pSplits[0]->m_pParent = m_pSplits[1]; - m_pSplits[1]->m_pSplits[1]->m_pParent = m_pSplits[1]; - m_fSplitRatio = WindowManager::GetInstance()->GetConfig().m_fDragMarginSizeRatio; - m_bVerticalSplit = false; - } - break; - case E_DOCK_ORIENTATION_RIGHT: - { - Container* pSplit0 = m_pSplits[0]; - Container* pSplit1 = m_pSplits[1]; - CreateSplits(); - m_pSplits[1]->m_lWindows.push_back(pWindow); - m_pSplits[0]->m_bVerticalSplit = m_bVerticalSplit; - m_pSplits[0]->m_fSplitRatio = m_fSplitRatio; - m_pSplits[0]->m_pSplits[0] = pSplit0; - m_pSplits[0]->m_pSplits[1] = pSplit1; - m_pSplits[0]->m_pSplits[0]->m_pParent = m_pSplits[0]; - m_pSplits[0]->m_pSplits[1]->m_pParent = m_pSplits[0]; - m_fSplitRatio = 1.f - WindowManager::GetInstance()->GetConfig().m_fDragMarginSizeRatio; - m_bVerticalSplit = false; - } - break; - case E_DOCK_ORIENTATION_BOTTOM: - { - Container* pSplit0 = m_pSplits[0]; - Container* pSplit1 = m_pSplits[1]; - CreateSplits(); - m_pSplits[1]->m_lWindows.push_back(pWindow); - m_pSplits[0]->m_bVerticalSplit = m_bVerticalSplit; - m_pSplits[0]->m_fSplitRatio = m_fSplitRatio; - m_pSplits[0]->m_pSplits[0] = pSplit0; - m_pSplits[0]->m_pSplits[1] = pSplit1; - m_pSplits[0]->m_pSplits[0]->m_pParent = m_pSplits[0]; - m_pSplits[0]->m_pSplits[1]->m_pParent = m_pSplits[0]; - m_fSplitRatio = 1.f - WindowManager::GetInstance()->GetConfig().m_fDragMarginSizeRatio; - m_bVerticalSplit = true; - } - break; - } - } - } - } - - bool Container::UnDock(Window* pWindow) - { - if (std::find(m_lWindows.begin(), m_lWindows.end(), pWindow) != m_lWindows.end()) - { - m_lWindows.remove(pWindow); - if (m_iActiveWindow >= int(m_lWindows.size())) - { - m_iActiveWindow = int(m_lWindows.size() - 1); - } - return true; - } - - if (NULL != m_pSplits[0] && NULL != m_pSplits[1]) - { - if (m_pSplits[0]->UnDock(pWindow)) - { - if (m_pSplits[0]->IsEmpty()) - { - if (m_pSplits[1]->IsSplit()) - { - Container* pSplit = m_pSplits[1]; - m_bVerticalSplit = pSplit->m_bVerticalSplit; - IMGUI_DELETE_NULL(Container, m_pSplits[0]); - m_pSplits[0] = pSplit->m_pSplits[0]; - m_pSplits[1] = pSplit->m_pSplits[1]; - pSplit->m_pSplits[0] = NULL; - pSplit->m_pSplits[1] = NULL; - m_pSplits[0]->m_pParent = this; - m_pSplits[1]->m_pParent = this; - IMGUI_DELETE_NULL(Container, pSplit); - } - else - { - m_lWindows.insert(m_lWindows.end(), m_pSplits[1]->m_lWindows.begin(), m_pSplits[1]->m_lWindows.end()); - m_pSplits[1]->m_lWindows.clear(); - m_pSplits[1]->m_iActiveWindow = 0; - IMGUI_DELETE_NULL(Container, m_pSplits[0]); - IMGUI_DELETE_NULL(Container, m_pSplits[1]); - } - } - return true; - } - - if (m_pSplits[1]->UnDock(pWindow)) - { - if (m_pSplits[1]->IsEmpty()) - { - if (m_pSplits[0]->IsSplit()) - { - Container* pSplit = m_pSplits[0]; - m_bVerticalSplit = pSplit->m_bVerticalSplit; - IMGUI_DELETE_NULL(Container, m_pSplits[1]); - m_pSplits[0] = pSplit->m_pSplits[0]; - m_pSplits[1] = pSplit->m_pSplits[1]; - pSplit->m_pSplits[0] = NULL; - pSplit->m_pSplits[1] = NULL; - m_pSplits[0]->m_pParent = this; - m_pSplits[1]->m_pParent = this; - IMGUI_DELETE_NULL(Container, pSplit); - } - else - { - m_lWindows.insert(m_lWindows.end(), m_pSplits[0]->m_lWindows.begin(), m_pSplits[0]->m_lWindows.end()); - m_pSplits[0]->m_lWindows.clear(); - m_pSplits[0]->m_iActiveWindow = 0; - IMGUI_DELETE_NULL(Container, m_pSplits[0]); - IMGUI_DELETE_NULL(Container, m_pSplits[1]); - } - } - return true; - } - } - - return false; - } - - bool Container::IsEmpty() - { - //IM_ASSERT(IsSplit() != HasWindowTabbed()); - return !(IsSplit() || HasWindowTabbed()); - } - - bool Container::IsSplit() - { - IM_ASSERT((NULL == m_pSplits[0]) == (NULL == m_pSplits[1])); - return (NULL != m_pSplits[0] && NULL != m_pSplits[1]); - } - - bool Container::HasWindowTabbed() - { - return m_lWindows.size() > 0; - } - - Container* Container::HasWindow(const Window* pWindow) - { - if (std::find(m_lWindows.begin(), m_lWindows.end(), pWindow) != m_lWindows.end()) - { - return this; - } - else - { - if (NULL != m_pSplits[0]) - { - Container* pContainer = m_pSplits[0]->HasWindow(pWindow); - if (NULL != pContainer) - { - return pContainer; - } - } - if (NULL != m_pSplits[1]) - { - Container* pContainer = m_pSplits[1]->HasWindow(pWindow); - if (NULL != pContainer) - { - return pContainer; - } - } - } - return NULL; - } - - PlatformWindow* Container::GetPlatformWindowParent() const - { - return m_pParentWindow; - } - - void Container::Paint() - { - WindowManager* pWindowManager = WindowManager::GetInstance(); - ImGuiWindow* pWindow = ImGui::GetCurrentWindow(); - const ImGuiStyle& oStyle = ImGui::GetStyle(); - ImDrawList* pDrawList = ImGui::GetWindowDrawList(); - - const ImVec2 oPos = ImGui::GetWindowPos(); - const ImVec2 oSize = ImGui::GetWindowSize(); - const ImVec2 oMin = ImVec2(oPos.x + 1, oPos.y + 1); - const ImVec2 oMax = ImVec2(oPos.x + oSize.x - 2, oPos.y + oSize.y - 2); - - m_oLastPosition = oPos; - m_oLastSize = oSize; - - const int iSeparatorHalfSize = 2; - const int iSeparatorSize = iSeparatorHalfSize * 2; - - if (IsSplit()) - { - if (m_bVerticalSplit) - { - float iFirstHeight = oSize.y * m_fSplitRatio - iSeparatorHalfSize - pWindow->WindowPadding.x; - - ImGui::BeginChild("Split1", ImVec2(0, iFirstHeight), false, ImGuiWindowFlags_NoScrollbar); - m_pSplits[0]->Paint(); - ImGui::EndChild(); - - ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f)); - ImRect oSeparatorRect(0, iFirstHeight, oSize.x, iFirstHeight + iSeparatorSize); - ImGui::Button("", oSeparatorRect.GetSize()); - if (ImGui::IsItemHovered() || m_bIsDrag) - { - ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeNS); - } - ImGui::PopStyleVar(1); - - if (ImGui::IsItemActive()) - { - if (!m_bIsDrag) - { - m_bIsDrag = true; - } - m_fSplitRatio += ImGui::GetIO().MouseDelta.y / oSize.y; - m_fSplitRatio = ImClamp(m_fSplitRatio, 0.05f, 0.95f); - - } - else - { - m_bIsDrag = false; - } - - ImGui::BeginChild("Split2", ImVec2(0, 0), false, ImGuiWindowFlags_NoScrollbar); - m_pSplits[1]->Paint(/*iX, iY + iFirstHeight, iWidth, iSecondHeight*/); - ImGui::EndChild(); - } - else - { - float iFirstWidth = oSize.x * m_fSplitRatio - iSeparatorHalfSize - pWindow->WindowPadding.y; - ImGui::BeginChild("Split1", ImVec2(iFirstWidth, 0), false, ImGuiWindowFlags_NoScrollbar); - m_pSplits[0]->Paint(); - ImGui::EndChild(); - - ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f)); - ImGui::SameLine(); - - ImRect oSeparatorRect(iFirstWidth, 0, iFirstWidth + iSeparatorSize, oSize.y); - ImGui::Button("", oSeparatorRect.GetSize()); - - if (ImGui::IsItemHovered() || m_bIsDrag) - { - ImGui::SetMouseCursor(ImGuiMouseCursor_ResizeEW); - } - ImGui::PopStyleVar(1); - - if (ImGui::IsItemActive()) - { - if (!m_bIsDrag) - { - m_bIsDrag = true; - } - - m_fSplitRatio += ImGui::GetIO().MouseDelta.x / oSize.x; - m_fSplitRatio = ImClamp(m_fSplitRatio, 0.05f, 0.95f); - } - else - { - m_bIsDrag = false; - } - - ImGui::SameLine(); - - ImGui::BeginChild("Split2", ImVec2(0, 0), false, ImGuiWindowFlags_NoScrollbar); - m_pSplits[1]->Paint(); - ImGui::EndChild(); - } - } - else if (HasWindowTabbed()) - { - ImGui::InvisibleButton("TabListButton", ImVec2(16, 16)); - ImGui::SameLine(); - - if (ImGui::BeginPopupContextItem("TabListMenu", 0)) - { - int iIndex = 0; - for (WindowList::const_iterator itWindow = m_lWindows.begin(); itWindow != m_lWindows.end(); ++itWindow, ++iIndex) - { - if (ImGui::Selectable((*itWindow)->GetTitle())) - { - m_iActiveWindow = iIndex; - } - } - ImGui::EndPopup(); - } - - ImColor oLinesColor = ImColor(160, 160, 160, 255); - if (ImGui::IsItemHovered()) - { - oLinesColor = ImColor(255, 255, 255, 255); - } - ImVec2 oButtonMin = ImGui::GetItemRectMin(); - ImVec2 oButtonMax = ImGui::GetItemRectMax(); - ImVec2 oButtonSize = ImVec2(oButtonMax.x - oButtonMin.x, oButtonMax.y - oButtonMin.y); - pDrawList->AddLine( - ImVec2(oButtonMin.x + 1, oButtonMin.y + oButtonSize.y / 2), - ImVec2(oButtonMax.x - 1, oButtonMin.y + oButtonSize.y / 2), - oLinesColor); - - pDrawList->AddLine( - ImVec2(oButtonMin.x + 1, oButtonMin.y + oButtonSize.y / 2 - 4), - ImVec2(oButtonMax.x - 1, oButtonMin.y + oButtonSize.y / 2 - 4), - oLinesColor); - - pDrawList->AddLine( - ImVec2(oButtonMin.x + 1, oButtonMin.y + oButtonSize.y / 2 + 4), - ImVec2(oButtonMax.x - 1, oButtonMin.y + oButtonSize.y / 2 + 4), - oLinesColor); - - pDrawList->ChannelsSplit(2); - - //Tabs - int iIndex = 0; - int iNewActive = m_iActiveWindow; - int iSize = int(m_lWindows.size()); - for (WindowList::iterator it = m_lWindows.begin(); it != m_lWindows.end(); ++it) - { - const ImVec2 oTextSize = ImGui::CalcTextSize((*it)->GetTitle()); - ImVec2 oRectSize(oTextSize.x + 15, 25); - - ImGui::PushID(iIndex); - - bool bSelected = iIndex == m_iActiveWindow; - if (ImGui::InvisibleButton((*it)->GetId(), oRectSize)) - { - iNewActive = iIndex; - } - if (iIndex < (iSize - 1)) - { - ImGui::SameLine(); - } - - if (ImGui::IsItemActive()) - { - if (ImGui::IsMouseDragging()) - { - pWindowManager->StartDragWindow(*it); - } - } - - ImColor oNormalTab(50, 50, 50, 255); // normal - ImColor oSelectedTab(37, 37, 37, 255); // selected - ImColor oBorderColor(72, 72, 72, 255); // border - - ImVec2 oRectMin = ImGui::GetItemRectMin(); - ImVec2 oRectMax = ImGui::GetItemRectMax(); - - const float fOverlap = 10.f; - const float fSlopWidth = 30.f; - const float sSlopP1Ratio = 0.6f; - const float fSlopP2Ratio = 0.4f; - const float fSlopHRatio = 0.f; - const float fShadowDropSize = 15.f; - const float fShadowSlopRatio = 0.6f; - const float fShadowAlpha = 0.75f; - - pDrawList->PathClear(); - if (bSelected) - { - pDrawList->ChannelsSetCurrent(1); - } - else - { - pDrawList->ChannelsSetCurrent(0); - } - - //Drop shadows - const ImVec2 uv = GImGui->FontTexUvWhitePixel; - pDrawList->PrimReserve(3, 3); - pDrawList->PrimWriteIdx((ImDrawIdx)(pDrawList->_VtxCurrentIdx)); pDrawList->PrimWriteIdx((ImDrawIdx)(pDrawList->_VtxCurrentIdx + 1)); pDrawList->PrimWriteIdx((ImDrawIdx)(pDrawList->_VtxCurrentIdx + 2)); - pDrawList->PrimWriteVtx(ImVec2(oRectMin.x - fOverlap - fShadowDropSize, oRectMax.y), uv, ImColor(0.f, 0.f, 0.f, 0.f)); - pDrawList->PrimWriteVtx(ImVec2(oRectMin.x - fOverlap + fSlopWidth * fShadowSlopRatio, oRectMin.y), uv, ImColor(0.f, 0.f, 0.f, 0.f)); - pDrawList->PrimWriteVtx(ImVec2(oRectMin.x - fOverlap + fSlopWidth * fShadowSlopRatio, oRectMax.y), uv, ImColor(0.f, 0.f, 0.f, fShadowAlpha)); - if (bSelected) - { - pDrawList->PrimReserve(3, 3); - pDrawList->PrimWriteIdx((ImDrawIdx)(pDrawList->_VtxCurrentIdx)); pDrawList->PrimWriteIdx((ImDrawIdx)(pDrawList->_VtxCurrentIdx + 1)); pDrawList->PrimWriteIdx((ImDrawIdx)(pDrawList->_VtxCurrentIdx + 2)); - pDrawList->PrimWriteVtx(ImVec2(oRectMax.x + fOverlap + fShadowDropSize, oRectMax.y), uv, ImColor(0.f, 0.f, 0.f, 0.f)); - pDrawList->PrimWriteVtx(ImVec2(oRectMax.x + fOverlap - fSlopWidth * fShadowSlopRatio, oRectMin.y), uv, ImColor(0.f, 0.f, 0.f, 0.f)); - pDrawList->PrimWriteVtx(ImVec2(oRectMax.x + fOverlap - fSlopWidth * fShadowSlopRatio, oRectMax.y), uv, ImColor(0.f, 0.f, 0.f, fShadowAlpha)); - } - - // Draw tab and border - if (bSelected) - { - pDrawList->PathLineTo(ImVec2(oMin.x, oRectMax.y)); - } - pDrawList->PathLineTo(ImVec2(oRectMin.x - fOverlap, oRectMax.y)); - pDrawList->PathBezierCurveTo( - ImVec2(oRectMin.x + fSlopWidth * sSlopP1Ratio - fOverlap, oRectMin.y + (oRectMax.y - oRectMin.y) * fSlopHRatio), - ImVec2(oRectMin.x + fSlopWidth * fSlopP2Ratio - fOverlap, oRectMin.y), - ImVec2(oRectMin.x + fSlopWidth - fOverlap, oRectMin.y) - ); - pDrawList->PathLineTo(ImVec2(oRectMax.x - fSlopWidth + fOverlap, oRectMin.y)); - pDrawList->PathBezierCurveTo( - ImVec2(oRectMax.x - fSlopWidth * fSlopP2Ratio + fOverlap, oRectMin.y), - ImVec2(oRectMax.x - fSlopWidth * sSlopP1Ratio + fOverlap, oRectMin.y + (oRectMax.y - oRectMin.y) * fSlopHRatio), - ImVec2(oRectMax.x + fOverlap, oRectMax.y) - ); - - if (bSelected) - { - pDrawList->AddConvexPolyFilled(pDrawList->_Path.Data + 1, pDrawList->_Path.Size - 1, bSelected ? oSelectedTab : oNormalTab, true); - if (oMax.x > (oRectMax.x + fOverlap)) - { - pDrawList->PathLineTo(ImVec2(oMax.x, oRectMax.y)); - } - pDrawList->AddPolyline(pDrawList->_Path.Data, pDrawList->_Path.Size, oBorderColor, false, 1.5f, true); - } - else - { - pDrawList->AddConvexPolyFilled(pDrawList->_Path.Data, pDrawList->_Path.Size, bSelected ? oSelectedTab : oNormalTab, true); - } - - pDrawList->PathClear(); - - ImGui::RenderTextClipped(oRectMin, ImVec2(oRectMax.x, oRectMax.y), (*it)->GetTitle(), NULL, &oTextSize, ImGuiAlign_Center | ImGuiAlign_VCenter); - - if (ImGui::BeginPopupContextItem("TabMenu")) - { - if (ImGui::Selectable("Close")) - { - (*it)->Destroy(); - } - if (ImGui::BeginMenu("Dock to")) - { - int iIndex1 = 0; - - if (pWindowManager->GetMainPlatformWindow()->GetContainer()->IsEmpty()) - { - ImGui::PushID(0); - if (ImGui::Selectable("Main")) pWindowManager->Dock((*it)); - ImGui::PopID(); - ++iIndex1; - } - const WindowList& lWindows = pWindowManager->GetWindowList(); - for (WindowList::const_iterator itWindow = lWindows.begin(); itWindow != lWindows.end(); ++itWindow) - { - if ((*it) != (*itWindow)) - { - ImGui::PushID(iIndex1); - if (ImGui::BeginMenu((*itWindow)->GetTitle())) - { - bool bHovered = false; - PlatformWindow* pPlatformWindow = pWindowManager->GetWindowParent((*itWindow)); - - ImVec2 oLastWinPos = (*itWindow)->GetLastPosition(); - ImVec2 oLastWinSize = (*itWindow)->GetLastSize(); - - ImGui::PushID(0); - if (ImGui::Selectable("Tab")) pWindowManager->DockWith((*it), (*itWindow), E_DOCK_ORIENTATION_CENTER); - if (ImGui::IsItemHovered() && NULL != pPlatformWindow) - { - bHovered = true; - pWindowManager->DrawWindowArea(pPlatformWindow, oLastWinPos, oLastWinSize, ImColor(0.f, 0.5f, 1.f, 0.5f)); - } - ImGui::PopID(); - - ImGui::PushID(1); - if (ImGui::Selectable("Top")) pWindowManager->DockWith((*it), (*itWindow), E_DOCK_ORIENTATION_TOP); - if (ImGui::IsItemHovered() && NULL != pPlatformWindow) - { - bHovered = true; - pWindowManager->DrawWindowArea(pPlatformWindow, oLastWinPos, ImVec2(oLastWinSize.x, oLastWinSize.y / 2.f), ImColor(0.f, 0.5f, 1.f, 0.5f)); - } - ImGui::PopID(); - - ImGui::PushID(2); - if (ImGui::Selectable("Left")) pWindowManager->DockWith((*it), (*itWindow), E_DOCK_ORIENTATION_LEFT); - if (ImGui::IsItemHovered() && NULL != pPlatformWindow) - { - bHovered = true; - pWindowManager->DrawWindowArea(pPlatformWindow, oLastWinPos, ImVec2(oLastWinSize.x / 2.f, oLastWinSize.y), ImColor(0.f, 0.5f, 1.f, 0.5f)); - } - ImGui::PopID(); - - ImGui::PushID(3); - if (ImGui::Selectable("Right")) pWindowManager->DockWith((*it), (*itWindow), E_DOCK_ORIENTATION_RIGHT); - if (ImGui::IsItemHovered() && NULL != pPlatformWindow) - { - bHovered = true; - pWindowManager->DrawWindowArea(pPlatformWindow, ImVec2(oLastWinPos.x + oLastWinSize.x / 2.f, oLastWinPos.y), ImVec2(oLastWinSize.x / 2.f, oLastWinSize.y), ImColor(0.f, 0.5f, 1.f, 0.5f)); - } - ImGui::PopID(); - - ImGui::PushID(4); - if (ImGui::Selectable("Bottom")) pWindowManager->DockWith((*it), (*itWindow), E_DOCK_ORIENTATION_BOTTOM); - if (ImGui::IsItemHovered() && NULL != pPlatformWindow) - { - bHovered = true; - pWindowManager->DrawWindowArea(pPlatformWindow, ImVec2(oLastWinPos.x, oLastWinPos.y + oLastWinSize.y / 2.f), ImVec2(oLastWinSize.x, oLastWinSize.y / 2.f), ImColor(0.f, 0.5f, 1.f, 0.5f)); - } - ImGui::PopID(); - - if (!bHovered) - { - if (NULL != pPlatformWindow) - { - pWindowManager->DrawWindowArea(pPlatformWindow, oLastWinPos, oLastWinSize, ImColor(0.f, 0.5f, 1.f, 0.5f)); - } - } - - ImGui::EndMenu(); - } - ImGui::PopID(); - } - ++iIndex1; - } - - ImGui::EndMenu(); - } - if (ImGui::Selectable("Float")) - { - pWindowManager->Float((*it)); - } - - ImGui::EndPopup(); - } - - ImGui::PopID(); - - ++iIndex; - } - m_iActiveWindow = iNewActive; - pDrawList->ChannelsMerge(); - - WindowList::iterator itActiveWindow = m_lWindows.begin(); - std::advance(itActiveWindow, m_iActiveWindow); - - //Draw active - IM_ASSERT(itActiveWindow != m_lWindows.end()); - if (itActiveWindow != m_lWindows.end()) - { - ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, oStyle.WindowPadding); - //ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImColor(59, 59, 59, 255)); - ImGui::BeginChild((*itActiveWindow)->GetId(), ImVec2(0, 0), false, ImGuiWindowFlags_HorizontalScrollbar); - - ImVec2 oWinPos = ImGui::GetWindowPos(); - ImVec2 oWinSize = ImGui::GetWindowSize(); - - for (WindowList::iterator it = m_lWindows.begin(); it != m_lWindows.end(); ++it) - { - (*it)->m_oLastPosition = oWinPos; - (*it)->m_oLastSize = oWinSize; - } - (*itActiveWindow)->OnGui(); - - ImGui::EndChild(); - //ImGui::PopStyleColor(1); - ImGui::PopStyleVar(1); - } - } - else - { - // This case can happened only where it's main container - IM_ASSERT(m_pParent == NULL); - } - } - - Container* Container::GetBestDocking(const ImVec2 oCursorPos, EDockOrientation& oOutOrientation, ImVec2& oOutAreaPos, ImVec2& oOutAreaSize) - { - if (m_pParent == NULL || - (oCursorPos.x >= m_oLastPosition.x && oCursorPos.x <= (m_oLastPosition.x + m_oLastSize.x) && - oCursorPos.y >= m_oLastPosition.y && oCursorPos.y <= (m_oLastPosition.y + m_oLastSize.y))) - { - if (IsSplit()) - { - Container* pBestContainer = NULL; - pBestContainer = m_pSplits[0]->GetBestDocking(oCursorPos, oOutOrientation, oOutAreaPos, oOutAreaSize); - if (NULL != pBestContainer) - { - return pBestContainer; - } - pBestContainer = m_pSplits[1]->GetBestDocking(oCursorPos, oOutOrientation, oOutAreaPos, oOutAreaSize); - if (NULL != pBestContainer) - { - return pBestContainer; - } - } - else - { - const float c_fBoxHalfSize = 20.f; - const float c_fBoxSize = c_fBoxHalfSize * 2.f; - const float c_fMinSize = c_fBoxSize * 4.f; - const float c_fSplitRatio = 0.5f; - //const float c_fSplitRatio = oConfig.m_fDragMarginSizeRatio; - const ImColor oBoxColor(200, 200, 255, 255); - const ImColor oBoxHightlightColor(100, 100, 255, 255); - - if (m_oLastSize.x < c_fMinSize && m_oLastSize.y < c_fMinSize) - { - oOutOrientation = E_DOCK_ORIENTATION_CENTER; - oOutAreaPos = m_oLastPosition; - oOutAreaSize = m_oLastSize; - return this; - } - else - { - ImVec2 oCenter = ImVec2(m_oLastPosition.x + m_oLastSize.x / 2.f, m_oLastPosition.y + m_oLastSize.y / 2.f); - - bool bIsInCenter = false; - bool bIsInTop = false; - bool bIsInLeft = false; - bool bIsInRight = false; - bool bIsInBottom = false; - - //Center - ImRect oRectCenter(ImVec2(oCenter.x - c_fBoxHalfSize, oCenter.y - c_fBoxHalfSize), ImVec2(oCenter.x + c_fBoxHalfSize, oCenter.y + c_fBoxHalfSize)); - bIsInCenter = oRectCenter.Contains(oCursorPos); - WindowManager::GetInstance()->DrawWindowArea(m_pParentWindow, oRectCenter.Min, oRectCenter.GetSize(), bIsInCenter ? oBoxHightlightColor : oBoxColor); - - if (m_oLastSize.y >= c_fMinSize) - { - //Top - ImRect oRectTop(ImVec2(oCenter.x - c_fBoxHalfSize, oCenter.y - c_fBoxHalfSize * 4.f), ImVec2(oCenter.x + c_fBoxHalfSize, oCenter.y - c_fBoxHalfSize * 2.f)); - bIsInTop = oRectTop.Contains(oCursorPos); - WindowManager::GetInstance()->DrawWindowArea(m_pParentWindow, oRectTop.Min, oRectTop.GetSize(), bIsInTop ? oBoxHightlightColor : oBoxColor); - - //Bottom - ImRect oRectBottom(ImVec2(oCenter.x - c_fBoxHalfSize, oCenter.y + c_fBoxHalfSize * 2.f), ImVec2(oCenter.x + c_fBoxHalfSize, oCenter.y + c_fBoxHalfSize * 4.f)); - bIsInBottom = oRectBottom.Contains(oCursorPos); - WindowManager::GetInstance()->DrawWindowArea(m_pParentWindow, oRectBottom.Min, oRectBottom.GetSize(), bIsInBottom ? oBoxHightlightColor : oBoxColor); - } - - if (m_oLastSize.x >= c_fMinSize) - { - //Left - ImRect oRectLeft(ImVec2(oCenter.x - c_fBoxHalfSize * 4.f, oCenter.y - c_fBoxHalfSize), ImVec2(oCenter.x - c_fBoxHalfSize * 2.f, oCenter.y + c_fBoxHalfSize)); - bIsInLeft = oRectLeft.Contains(oCursorPos); - WindowManager::GetInstance()->DrawWindowArea(m_pParentWindow, oRectLeft.Min, oRectLeft.GetSize(), bIsInLeft ? oBoxHightlightColor : oBoxColor); - - //Right - ImRect oRectRight(ImVec2(oCenter.x + c_fBoxHalfSize * 2.f, oCenter.y - c_fBoxHalfSize), ImVec2(oCenter.x + c_fBoxHalfSize * 4.f, oCenter.y + c_fBoxHalfSize)); - bIsInRight = oRectRight.Contains(oCursorPos); - WindowManager::GetInstance()->DrawWindowArea(m_pParentWindow, oRectRight.Min, oRectRight.GetSize(), bIsInRight ? oBoxHightlightColor : oBoxColor); - } - - if (bIsInCenter) - { - oOutOrientation = E_DOCK_ORIENTATION_CENTER; - oOutAreaPos = m_oLastPosition; - oOutAreaSize = m_oLastSize; - return this; - } - else if (bIsInTop) - { - oOutOrientation = E_DOCK_ORIENTATION_TOP; - oOutAreaPos = m_oLastPosition; - oOutAreaSize = ImVec2(m_oLastSize.x, m_oLastSize.y * c_fSplitRatio); - return this; - } - else if (bIsInLeft) - { - oOutOrientation = E_DOCK_ORIENTATION_LEFT; - oOutAreaPos = m_oLastPosition; - oOutAreaSize = ImVec2(m_oLastSize.x * c_fSplitRatio, m_oLastSize.y); - return this; - } - else if (bIsInRight) - { - oOutOrientation = E_DOCK_ORIENTATION_RIGHT; - oOutAreaPos = ImVec2(m_oLastPosition.x + m_oLastSize.x * (1.f - c_fSplitRatio), m_oLastPosition.y); - oOutAreaSize = ImVec2(m_oLastSize.x * c_fSplitRatio, m_oLastSize.y); - return this; - } - else if (bIsInBottom) - { - oOutOrientation = E_DOCK_ORIENTATION_BOTTOM; - oOutAreaPos = ImVec2(m_oLastPosition.x, m_oLastPosition.y + m_oLastSize.y * (1.f - c_fSplitRatio)); - oOutAreaSize = ImVec2(m_oLastSize.x, m_oLastSize.y * c_fSplitRatio); - return this; - } - } - } - } - - return NULL; - } - - PlatformWindow::PlatformWindow(bool bMain, bool bIsDragWindow) - { - m_bMain = bMain; - m_bIsDragWindow = bIsDragWindow; - m_pContainer = IMGUI_NEW(Container)(this); - m_pPreviousState = NULL; - - ImGui::GetIO().IniFilename = NULL; - - m_pState = ImGui::CreateContext(); - } - - PlatformWindow::~PlatformWindow() - { - IMGUI_DELETE_NULL(Container, m_pContainer); - - SetState(); - if (!IsMain()) - { - ImGui::GetIO().Fonts = NULL; - } - - RestoreState(); - ImGui::DestroyContext(m_pState); - m_pState = NULL; - } - - void PlatformWindow::OnClose() - { - WindowManager::GetInstance()->OnClosePlatformWindow(this); - } - - static bool s_bStatePush = false; - - bool PlatformWindow::IsStateSet() - { - return s_bStatePush; - } - - void PlatformWindow::SetState() - { - IM_ASSERT(s_bStatePush == false); - s_bStatePush = true; - m_pPreviousState = ImGui::GetCurrentContext(); - ImGui::SetCurrentContext(m_pState); - memcpy(&m_pState->Style, &m_pPreviousState->Style, sizeof(ImGuiStyle) ); - } - - void PlatformWindow::RestoreState() - { - IM_ASSERT(s_bStatePush == true); - s_bStatePush = false; - memcpy(&m_pPreviousState->Style, &m_pState->Style, sizeof(ImGuiStyle) ); - ImGui::SetCurrentContext(m_pPreviousState); - } - - void PlatformWindow::OnLoseFocus() - { - ImGuiContext& g = *m_pState; - g.SetNextWindowPosCond = g.SetNextWindowSizeCond = g.SetNextWindowContentSizeCond = g.SetNextWindowCollapsedCond = g.SetNextWindowFocus = 0; - } - - void PlatformWindow::Paint() - { - PaintBegin(); - WindowManager::GetInstance()->Paint(this); - PaintEnd(); - } - - bool PlatformWindow::IsMain() - { - return m_bMain; - } - - void PlatformWindow::Dock(Window* pWindow) - { - m_pContainer->Dock(pWindow); - } - - bool PlatformWindow::UnDock(Window* pWindow) - { - return m_pContainer->UnDock(pWindow); - } - - Container* PlatformWindow::GetContainer() - { - return m_pContainer; - } - - Container* PlatformWindow::HasWindow(Window* pWindow) - { - return m_pContainer->HasWindow(pWindow); - } - - void PlatformWindow::PaintContainer() - { - m_pContainer->Paint(); - } - - WindowManager::DrawWindowAreaAction::DrawWindowAreaAction(PlatformWindow* pWindow, const ImVec2& oRectPos, const ImVec2& oRectSize, const ImColor& oColor) - : m_oColor(oColor) - { - m_pWindow = pWindow; - m_oRectPos = oRectPos; - m_oRectSize = oRectSize; - } - - WindowManager* WindowManager::s_pInstance = 0; - - ////////////////////////////////////////////////////////////////////////// - - WindowManager::Config::Config() - : m_fDragMarginRatio(0.1f) - , m_fDragMarginSizeRatio(0.25f) - , m_oHightlightAreaColor(0.f, 0.5f, 1.f, 0.5f) - { - } - - ////////////////////////////////////////////////////////////////////////// - - WindowManager::WindowManager() - { - s_pInstance = this; - m_pMainPlatformWindow = NULL; - m_pDragPlatformWindow = NULL; - m_pCurrentPlatformWindow = NULL; - m_pDraggedWindow = NULL; - m_oDragPreviewOffset = ImVec2(-20, -10); - } - - WindowManager::~WindowManager() - { - IMGUI_DELETE_NULL(PlatformWindow, m_pMainPlatformWindow); - IMGUI_DELETE_NULL(PlatformWindow, m_pDragPlatformWindow); - s_pInstance = 0; - ImGui::Shutdown(); - } - - bool WindowManager::Init() - { - m_pMainPlatformWindow = CreatePlatformWindow(true, NULL, false); - if (NULL != m_pMainPlatformWindow) - { - m_pMainPlatformWindow->Show(); - - m_pDragPlatformWindow = CreatePlatformWindow(false, m_pMainPlatformWindow, true); - return true; - } - return false; - } - - bool WindowManager::Run() - { - if (m_pMainPlatformWindow != NULL) - { - ImGuiIO& io = ImGui::GetIO(); - m_pMainPlatformWindow->SetSize(io.DisplaySize); - } - InternalRun(); - return m_pMainPlatformWindow != NULL; - } - - void WindowManager::Exit() - { - //TODO : Manual exit - } - - PlatformWindow* WindowManager::GetMainPlatformWindow() - { - return m_pMainPlatformWindow; - } - - WindowManager::Config& WindowManager::GetConfig() - { - return m_oConfig; - } - - void WindowManager::SetMainTitle(const char* pTitle) - { - if (NULL != m_pMainPlatformWindow) - { - m_pMainPlatformWindow->SetTitle(pTitle); - } - } - - void WindowManager::Dock(Window* pWindow, EDockOrientation eOrientation, PlatformWindow* pToPlatformWindow) - { - DockAction* pAction = IMGUI_NEW(DockAction); - pAction->m_bFloat = false; - pAction->m_pWindow = pWindow; - pAction->m_pWith = NULL; - pAction->m_eOrientation = eOrientation; - pAction->m_pToPlatformWindow = (pToPlatformWindow != NULL) ? pToPlatformWindow : m_pMainPlatformWindow; - pAction->m_pToContainer = NULL; - m_lDockActions.push_back(pAction); - } - - void WindowManager::DockTo(Window* pWindow, EDockOrientation eOrientation, Container* pContainer) - { - IM_ASSERT(NULL != pContainer); - if (NULL != pContainer) - { - DockAction* pAction = IMGUI_NEW(DockAction); - pAction->m_bFloat = false; - pAction->m_pWindow = pWindow; - pAction->m_pWith = NULL; - pAction->m_eOrientation = eOrientation; - pAction->m_pToPlatformWindow = NULL; - pAction->m_pToContainer = pContainer; - m_lDockActions.push_back(pAction); - } - } - - void WindowManager::DockWith(Window* pWindow, Window* pWithWindow, EDockOrientation eOrientation) - { - DockAction* pAction = IMGUI_NEW(DockAction); - pAction->m_bFloat = false; - pAction->m_pWindow = pWindow; - pAction->m_pWith = pWithWindow; - pAction->m_eOrientation = eOrientation; - m_lDockActions.push_back(pAction); - } - - void WindowManager::Float(Window* pWindow, const ImVec2& oPosition, const ImVec2& oSize) - { - DockAction* pAction = IMGUI_NEW(DockAction); - pAction->m_bFloat = true; - pAction->m_pWindow = pWindow; - pAction->m_oPosition = oPosition; - pAction->m_oSize = oSize; - m_lDockActions.push_back(pAction); - } - - const WindowList& WindowManager::GetWindowList() const - { - return m_lWindows; - } - - PlatformWindow* WindowManager::GetCurrentPlatformWindow() - { - return m_pCurrentPlatformWindow; - } - - PlatformWindow* WindowManager::GetWindowParent(Window* pWindow) - { - Container* pContainer = m_pMainPlatformWindow->HasWindow(pWindow); - if (NULL != pContainer) - { - return m_pMainPlatformWindow; - } - - for (PlatformWindowList::iterator it = m_lPlatformWindows.begin(); it != m_lPlatformWindows.end(); ++it) - { - pContainer = (*it)->HasWindow(pWindow); - if (NULL != pContainer) - { - return *it; - } - } - IM_ASSERT(false); - return NULL; - } - - void WindowManager::Log(const char* pFormat, ...) - { - char pBuffer[32768]; - va_list argptr; - va_start(argptr, pFormat); - ImFormatStringV(pBuffer, sizeof(char) * 32767, pFormat, argptr); - va_end(argptr); - LogFormatted(pBuffer); - } - - void WindowManager::PreUpdate() - { - if (NULL != m_pMainPlatformWindow) - { - m_pMainPlatformWindow->PreUpdate(); - } - - for (PlatformWindowList::iterator it = m_lPlatformWindows.begin(); it != m_lPlatformWindows.end(); ++it) - { - (*it)->PreUpdate(); - } - } - - void WindowManager::Update() - { - UpdatePlatformwWindowActions(); - UpdateDockActions(); - UpdateOrphans(); - - while (m_lToDestroyWindows.begin() != m_lToDestroyWindows.end()) - { - Window* pWindow = *m_lToDestroyWindows.begin(); - - m_lToDestroyWindows.remove(pWindow); - m_lOrphanWindows.remove(pWindow); - m_lWindows.remove(pWindow); - - InternalUnDock(pWindow); - - IMGUI_DELETE(Window, pWindow); - } - - while (m_lToDestroyPlatformWindows.begin() != m_lToDestroyPlatformWindows.end()) - { - PlatformWindow* pPlatformWindow = *m_lToDestroyPlatformWindows.begin(); - m_lToDestroyPlatformWindows.remove(pPlatformWindow); - m_lPlatformWindows.remove(pPlatformWindow); - IMGUI_DELETE(PlatformWindow, pPlatformWindow); - } - - UpdateDragWindow(); - - m_pCurrentPlatformWindow = m_pMainPlatformWindow; - if (NULL != m_pMainPlatformWindow) - { - m_pMainPlatformWindow->Paint(); - } - - for (PlatformWindowList::iterator it = m_lPlatformWindows.begin(); it != m_lPlatformWindows.end(); ++it) - { - m_pCurrentPlatformWindow = (*it); - (*it)->Paint(); - } - - m_pCurrentPlatformWindow = NULL; - } - - void WindowManager::UpdatePlatformwWindowActions() - { - while (m_lPlatformWindowActions.begin() != m_lPlatformWindowActions.end()) - { - PlatformWindowAction* pAction = *m_lPlatformWindowActions.begin(); - - IM_ASSERT((pAction->m_iFlags & E_PLATFORM_WINDOW_ACTION_SHOW & E_PLATFORM_WINDOW_ACTION_HIDE) == 0); // Can't show and hide - - if (pAction->m_iFlags & E_PLATFORM_WINDOW_ACTION_DESTOY) - { - //pAction->m_pPlatformWindow->Show(); - //todo destroy - bool bFound = false; - if (m_pMainPlatformWindow == pAction->m_pPlatformWindow) - { - while (m_lPlatformWindows.begin() != m_lPlatformWindows.end()) - { - IMGUI_DELETE(PlatformWindow, *m_lPlatformWindows.begin()); - m_lPlatformWindows.erase(m_lPlatformWindows.begin()); - } - IMGUI_DELETE(PlatformWindow, m_pMainPlatformWindow); - m_pMainPlatformWindow = NULL; - bFound = true; - } - else - { - for (PlatformWindowList::iterator it = m_lPlatformWindows.begin(); it != m_lPlatformWindows.end(); ++it) - { - if (*it == pAction->m_pPlatformWindow) - { - IMGUI_DELETE(PlatformWindow, *it); - m_lPlatformWindows.erase(it); - bFound = true; - break; - } - } - } - - if (!bFound) - { - IM_ASSERT(false, "ImwPlatformWindow not found, maybe already closed"); - } - } - - if (pAction->m_iFlags & E_PLATFORM_WINDOW_ACTION_SHOW) - { - pAction->m_pPlatformWindow->Show(); - } - - if (pAction->m_iFlags & E_PLATFORM_WINDOW_ACTION_HIDE) - { - pAction->m_pPlatformWindow->Hide(); - } - - if (pAction->m_iFlags & E_PLATFORM_WINDOW_ACTION_SET_POSITION) - { - pAction->m_pPlatformWindow->SetPosition(pAction->m_oPosition); - } - - if (pAction->m_iFlags & E_PLATFORM_WINDOW_ACTION_SET_SIZE) - { - pAction->m_pPlatformWindow->SetSize(pAction->m_oSize); - } - - IMGUI_DELETE(PlatformWindowAction, *m_lPlatformWindowActions.begin()); - m_lPlatformWindowActions.erase(m_lPlatformWindowActions.begin()); - } - } - - void WindowManager::UpdateDockActions() - { - while (m_lDockActions.begin() != m_lDockActions.end()) - { - DockAction* pAction = *m_lDockActions.begin(); - - InternalUnDock(pAction->m_pWindow); - - if (pAction->m_bFloat) - { - if (!InternalFloat(pAction->m_pWindow, pAction->m_oPosition, pAction->m_oSize) ) - { - InternalDock(pAction->m_pWindow, E_DOCK_ORIENTATION_LEFT, m_pMainPlatformWindow); - } - } - else - { - if (NULL != pAction->m_pWith) - { - InternalDockWith(pAction->m_pWindow, pAction->m_pWith, pAction->m_eOrientation); - } - else if (NULL != pAction->m_pToContainer) - { - InternalDockTo(pAction->m_pWindow, pAction->m_eOrientation, pAction->m_pToContainer); - } - else - { - InternalDock(pAction->m_pWindow, pAction->m_eOrientation, pAction->m_pToPlatformWindow); - } - } - - m_lOrphanWindows.remove(pAction->m_pWindow); - - IMGUI_DELETE(DockAction, pAction); - m_lDockActions.erase(m_lDockActions.begin()); - } - } - - void WindowManager::UpdateOrphans() - { - while (m_lOrphanWindows.begin() != m_lOrphanWindows.end()) - { - if (m_pMainPlatformWindow->m_pContainer->IsEmpty()) - { - InternalDock(*m_lOrphanWindows.begin(), E_DOCK_ORIENTATION_CENTER, m_pMainPlatformWindow); - } - else - { - ImVec2 oSize = ImVec2(300, 300); - ImVec2 oPos = m_pMainPlatformWindow->GetPosition(); - ImVec2 oMainSize = m_pMainPlatformWindow->GetSize(); - oPos.x += (oMainSize.x - oSize.x) / 2; - oPos.y += (oMainSize.y - oSize.y) / 2; - InternalFloat(*m_lOrphanWindows.begin(), oPos, oSize); - } - m_lOrphanWindows.erase(m_lOrphanWindows.begin()); - } - } - - void WindowManager::Paint(PlatformWindow* pWindow) - { - if (!pWindow->GetContainer()->IsEmpty() ) - { - float fY = 0.f; - - ImGui::SetNextWindowPos(ImVec2(0, fY), ImGuiSetCond_Always); - ImGui::SetNextWindowSize(ImVec2(pWindow->GetSize().x, pWindow->GetSize().y - fY), ImGuiSetCond_Always); - int iFlags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse; - - if (NULL != m_pDraggedWindow) - { - iFlags += ImGuiWindowFlags_NoInputs; - } - - ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(5.0f, 5.0f)); - char name[64]; - ImFormatString(name, sizeof(name), "Window %p", pWindow); - ImGui::Begin(name, NULL, iFlags); - pWindow->PaintContainer(); - ImGui::End(); - ImGui::PopStyleVar(1); - - ImGui::Begin("##Overlay", NULL, ImVec2(0, 0), 0.f, ImGuiWindowFlags_Tooltip | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_AlwaysAutoResize); - ImDrawList* pDrawList = ImGui::GetWindowDrawList(); - for (ImwList::iterator it = m_lDrawWindowAreas.begin(); it != m_lDrawWindowAreas.end();) - { - const DrawWindowAreaAction& oAction = *it; - - if (pWindow == oAction.m_pWindow) - { - ImVec2 oPosA = oAction.m_oRectPos; - ImVec2 oPosB = oAction.m_oRectSize; - oPosB.x += oPosA.x; - oPosB.y += oPosA.y; - - pDrawList->PushClipRectFullScreen(); - pDrawList->AddRectFilled(oPosA, oPosB, oAction.m_oColor); - pDrawList->PopClipRect(); - ImwList::iterator toRemove = it; - ++it; - m_lDrawWindowAreas.erase(toRemove); - } - else - { - ++it; - } - } - - ImGui::End(); - } - } - - static ImVec2 GetCursorPos() - { - ImGuiIO& io = ImGui::GetIO(); - return io.MousePos; - } - - void WindowManager::StartDragWindow(Window* pWindow) - { - if (NULL == m_pDraggedWindow) - { - m_pDraggedWindow = pWindow; - - PlatformWindowAction* pAction = IMGUI_NEW(PlatformWindowAction); - pAction->m_pPlatformWindow = m_pDragPlatformWindow; - pAction->m_iFlags = E_PLATFORM_WINDOW_ACTION_SHOW | E_PLATFORM_WINDOW_ACTION_SET_POSITION | E_PLATFORM_WINDOW_ACTION_SET_SIZE; - ImVec2 oCursorPos = GetCursorPos(); - pAction->m_oPosition = ImVec2(oCursorPos.x + m_oDragPreviewOffset.x, oCursorPos.y + m_oDragPreviewOffset.y); - pAction->m_oSize = ImVec2(pWindow->GetLastSize().x, pWindow->GetLastSize().y); - m_lPlatformWindowActions.push_back(pAction); - - Dock(pWindow, E_DOCK_ORIENTATION_CENTER, m_pDragPlatformWindow); - m_pDragPlatformWindow->m_pState->IO.MouseDown[0] = true; - } - } - - void WindowManager::StopDragWindow() - { - PlatformWindowAction* pAction = IMGUI_NEW(PlatformWindowAction); - pAction->m_pPlatformWindow = m_pDragPlatformWindow; - pAction->m_iFlags = E_PLATFORM_WINDOW_ACTION_HIDE; - m_pDragPlatformWindow->Hide(); - m_lPlatformWindowActions.push_back(pAction); - m_pDraggedWindow = NULL; - } - - void WindowManager::UpdateDragWindow() - { - if (NULL != m_pDraggedWindow) - { - m_pCurrentPlatformWindow = m_pDragPlatformWindow; - m_pDragPlatformWindow->Paint(); - m_pCurrentPlatformWindow = NULL; - - ImVec2 oCursorPos = GetCursorPos(); - m_pDragPlatformWindow->SetPosition(ImVec2(oCursorPos.x + m_oDragPreviewOffset.x, oCursorPos.y + m_oDragPreviewOffset.y)); - - //Search best dock area - EDockOrientation eBestDockOrientation; - ImVec2 oHightlightPos; - ImVec2 oHightlightSize; - Container* pBestContainer = GetBestDocking(m_pMainPlatformWindow, oCursorPos, eBestDockOrientation, oHightlightPos, oHightlightSize); - if (NULL == pBestContainer) - { - for (PlatformWindowList::iterator it = m_lPlatformWindows.begin(); it != m_lPlatformWindows.end() && NULL == pBestContainer; ++it) - { - pBestContainer = GetBestDocking(*it, oCursorPos, eBestDockOrientation, oHightlightPos, oHightlightSize); - } - } - if (pBestContainer) - { - DrawWindowArea(pBestContainer->GetPlatformWindowParent(), oHightlightPos, oHightlightSize, m_oConfig.m_oHightlightAreaColor); - } - - ImGuiIO& io = ImGui::GetIO(); - if (!io.MouseDown[0]) - { - if (NULL != pBestContainer) - { - DockTo(m_pDraggedWindow, eBestDockOrientation, pBestContainer); - } - else - { - Float(m_pDraggedWindow, m_pDragPlatformWindow->GetPosition(), m_pDragPlatformWindow->GetSize()); - } - - StopDragWindow(); - } - } - } - - Container* WindowManager::GetBestDocking(PlatformWindow* pPlatformWindow, const ImVec2 oCursorPos, EDockOrientation& oOutOrientation, ImVec2& oOutAreaPos, ImVec2& oOutAreaSize) - { - ImVec2 oPos = pPlatformWindow->GetPosition(); - ImVec2 oSize = pPlatformWindow->GetSize(); - if (oCursorPos.x >= oPos.x && oCursorPos.x <= (oPos.x + oSize.x) && - oCursorPos.y >= oPos.y && oCursorPos.y <= (oPos.y + oSize.y)) - { - ImVec2 oRectPos(oCursorPos.x - oPos.x, oCursorPos.y - oPos.y); - - Container* pBestContainer = pPlatformWindow->GetContainer()->GetBestDocking(oRectPos, oOutOrientation, oOutAreaPos, oOutAreaSize); - if (NULL != pBestContainer) - { - return pBestContainer; - } - - //Left - if (oRectPos.x <= oSize.x * m_oConfig.m_fDragMarginRatio) - { - oOutOrientation = E_DOCK_ORIENTATION_LEFT; - oOutAreaPos = IM_VEC2_0; - oOutAreaSize = ImVec2(oSize.x * m_oConfig.m_fDragMarginSizeRatio, oSize.y); - } - //Right - else if (oRectPos.x >= oSize.x * (1.f - m_oConfig.m_fDragMarginRatio)) - { - oOutOrientation = E_DOCK_ORIENTATION_RIGHT; - oOutAreaPos = ImVec2(oSize.x * (1.f - m_oConfig.m_fDragMarginSizeRatio), 0.f); - oOutAreaSize = ImVec2(oSize.x * m_oConfig.m_fDragMarginSizeRatio, oSize.y); - } - //Top - else if (oRectPos.y <= oSize.y * m_oConfig.m_fDragMarginRatio) - { - oOutOrientation = E_DOCK_ORIENTATION_TOP; - oOutAreaPos = IM_VEC2_0; - oOutAreaSize = ImVec2(oSize.x, oSize.y * m_oConfig.m_fDragMarginSizeRatio); - } - //Bottom - else if (oRectPos.y >= oSize.y * (1.f - m_oConfig.m_fDragMarginRatio)) - { - oOutOrientation = E_DOCK_ORIENTATION_BOTTOM; - oOutAreaPos = ImVec2(0.f, oSize.y * (1.f - m_oConfig.m_fDragMarginSizeRatio)); - oOutAreaSize = ImVec2(oSize.x, oSize.y * m_oConfig.m_fDragMarginSizeRatio); - } - else - { - oOutOrientation = E_DOCK_ORIENTATION_CENTER; - oOutAreaPos = IM_VEC2_0; - oOutAreaSize = ImVec2(oSize.x, oSize.y); - //IM_ASSERT(false); //Best dock orientation not found - return NULL; - } - return pPlatformWindow->GetContainer(); - } - return NULL; - } - - void WindowManager::AddWindow(Window* pWindow) - { - m_lWindows.push_back(pWindow); - - m_lOrphanWindows.push_back(pWindow); - } - - void WindowManager::RemoveWindow(Window* pWindow) - { - m_lWindows.remove(pWindow); - m_lOrphanWindows.remove(pWindow); - } - - void WindowManager::DestroyWindow(Window* pWindow) - { - if (NULL != pWindow && std::find(m_lToDestroyWindows.begin(), m_lToDestroyWindows.end(), pWindow) == m_lToDestroyWindows.end()) - { - m_lToDestroyWindows.push_back(pWindow); - } - } - - void WindowManager::InternalDock(Window* pWindow, EDockOrientation eOrientation, PlatformWindow* pToPlatformWindow) - { - pToPlatformWindow->m_pContainer->Dock(pWindow, eOrientation); - } - - void WindowManager::InternalDockTo(Window* pWindow, EDockOrientation eOrientation, Container* pToContainer) - { - pToContainer->Dock(pWindow, eOrientation); - } - - void WindowManager::InternalDockWith(Window* pWindow, Window* pWithWindow, EDockOrientation eOrientation) - { - Container* pContainer = m_pMainPlatformWindow->HasWindow(pWithWindow); - if (NULL != pContainer) - { - pContainer->Dock(pWindow, eOrientation); - } - - for (PlatformWindowList::iterator it = m_lPlatformWindows.begin(); it != m_lPlatformWindows.end(); ++it) - { - pContainer = (*it)->HasWindow(pWithWindow); - if (NULL != pContainer) - { - pContainer->Dock(pWindow, eOrientation); - break; - } - } - } - - bool WindowManager::InternalFloat(Window* pWindow, ImVec2 oPosition, ImVec2 oSize) - { - PlatformWindow* pPlatformWindow = CreatePlatformWindow(false, m_pMainPlatformWindow, false); - if (NULL == pPlatformWindow) - { - return false; - } - - m_lPlatformWindows.push_back(pPlatformWindow); - - if (oSize.x == IM_VEC2_N1.x && oSize.y == IM_VEC2_N1.y) - { - oSize = pWindow->GetLastSize(); - } - - if (oPosition.x == IM_VEC2_N1.x && oPosition.y == IM_VEC2_N1.y) - { - oPosition = GetCursorPos(); - oPosition.x -= 20; - oPosition.x -= 10; - } - pPlatformWindow->Dock(pWindow); - pPlatformWindow->SetSize(oSize); - pPlatformWindow->SetPosition(oPosition); - pPlatformWindow->Show(); - - return true; - } - - void WindowManager::InternalUnDock(Window* pWindow) - { - if (m_pMainPlatformWindow->UnDock(pWindow)) - { - return; - } - - for (PlatformWindowList::iterator it = m_lPlatformWindows.begin(); it != m_lPlatformWindows.end(); ++it) - { - if ((*it)->UnDock(pWindow)) - { - //Destroy empty platform window if not main window - if (!(*it)->IsMain() && (*it)->GetContainer()->IsEmpty()) - { - m_lToDestroyPlatformWindows.push_back(*it); - } - return; - } - } - - m_pDragPlatformWindow->UnDock(pWindow); - } - - void WindowManager::OnClosePlatformWindow(PlatformWindow* pWindow) - { - PlatformWindowAction* pAction = IMGUI_NEW(PlatformWindowAction); - pAction->m_iFlags = E_PLATFORM_WINDOW_ACTION_DESTOY; - pAction->m_pPlatformWindow = pWindow; - m_lPlatformWindowActions.push_back(pAction); - } - - void WindowManager::DrawWindowArea(PlatformWindow* pWindow, const ImVec2& oPos, const ImVec2& oSize, const ImColor& oColor) - { - m_lDrawWindowAreas.push_back(DrawWindowAreaAction(pWindow, oPos, oSize, oColor)); - } - - // Static - WindowManager* WindowManager::GetInstance() - { - return s_pInstance; - } - -} // namespace ImWindow diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.h deleted file mode 100644 index e191339..0000000 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_wm.h +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright 2011-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -/* - * Based on ImWindow code from: - * https://github.com/thennequin/ImWindow - * - * MIT license: - * https://github.com/thennequin/ImWindow/blob/master/LICENSE - */ - -#ifndef IMGUI_WM_H_HEADER_GUARD -#define IMGUI_WM_H_HEADER_GUARD - -#include "imgui.h" - -typedef unsigned int ImU32; - -#ifndef ImwList -# include -# define ImwList std::list -#endif // ImList - -#ifndef ImwMap -# include -# define ImwMap std::unordered_map -#endif // ImMap - -namespace ImGuiWM -{ - enum EDockOrientation - { - E_DOCK_ORIENTATION_CENTER, - E_DOCK_ORIENTATION_TOP, - E_DOCK_ORIENTATION_LEFT, - E_DOCK_ORIENTATION_RIGHT, - E_DOCK_ORIENTATION_BOTTOM, - }; - - class Id - { - public: - Id(); - ImU32 GetId() const; - const char* GetStr() const; - - private: - ImU32 m_iId; - char m_pId[11]; - static int s_iNextId; - }; - - class Window - { - friend class WindowManager; - friend class Container; - - public: - virtual void OnGui() = 0; - virtual void OnMenu() {}; - - const char* GetId() const { return m_oId.GetStr(); } - - void Destroy(); - - void SetTitle(const char* pTitle); - const char* GetTitle() const; - - const ImVec2& GetLastPosition() const; - const ImVec2& GetLastSize() const; - - protected: - Window(); - virtual ~Window(); - - char* m_pTitle; - Id m_oId; - - ImVec2 m_oLastPosition; - ImVec2 m_oLastSize; - }; - - typedef ImwList WindowList; - - class PlatformWindow; - - class Container - { - friend class PlatformWindow; - - public: - void Dock(Window* pWindow,EDockOrientation eOrientation = E_DOCK_ORIENTATION_CENTER); - bool UnDock(Window* pWindow); - - bool IsEmpty(); - bool IsSplit(); - bool HasWindowTabbed(); - Container* HasWindow(const Window* pWindow); - PlatformWindow* GetPlatformWindowParent() const; - Container* GetBestDocking(const ImVec2 oCursorPosInContainer,EDockOrientation& oOutOrientation,ImVec2& oOutAreaPos,ImVec2& oOutAreaSize); - - protected: - Container(Container* pParent); - Container(PlatformWindow* pParent); - ~Container(); - - void CreateSplits(); - void Paint(); - - Container* m_pParent; - PlatformWindow* m_pParentWindow; - WindowList m_lWindows; - Container* m_pSplits[2]; - - float m_fSplitRatio; - bool m_bVerticalSplit; - int m_iActiveWindow; - - bool m_bIsDrag; - - ImVec2 m_oLastPosition; - ImVec2 m_oLastSize; - }; - - class PlatformWindow - { - friend class WindowManager; - - public: - PlatformWindow(bool bMainWindow,bool bIsDragWindow); - virtual ~PlatformWindow(); - - virtual bool Init(PlatformWindow* pParent) = 0; - - virtual const ImVec2& GetPosition() const = 0; - virtual const ImVec2& GetSize() const = 0; - - virtual void Show() = 0; - virtual void Hide() = 0; - virtual void SetSize(const ImVec2& size) = 0; - virtual void SetPosition(const ImVec2& pos) = 0; - virtual void SetTitle(const char* pTitle) = 0; - - bool IsMain(); - - void Dock(Window* pWindow); - bool UnDock(Window* pWindow); - - Container* GetContainer(); - Container* HasWindow(Window* pWindow); - bool IsStateSet(); - - protected: - void SetState(); - void RestoreState(); - void OnLoseFocus(); - virtual void PreUpdate() = 0; - virtual void PaintBegin() = 0; - virtual void Paint(); - virtual void PaintEnd() = 0; - virtual void Destroy() = 0; - virtual void StartDrag() = 0; - virtual void StopDrag() = 0; - virtual bool IsDraging() = 0; - - void PaintContainer(); - void OnClose(); - - Id m_oId; - bool m_bMain; - bool m_bIsDragWindow; - Container* m_pContainer; - ImGuiContext* m_pState; - ImGuiContext* m_pPreviousState; - }; - - typedef ImwList PlatformWindowList; - - class WindowManager - { - friend class Window; - friend class PlatformWindow; - friend class Container; - - struct PlatformWindowAction - { - PlatformWindow* m_pPlatformWindow; - unsigned int m_iFlags; - ImVec2 m_oPosition; - ImVec2 m_oSize; - }; - - struct DockAction - { - Window* m_pWindow; - - // Is Dock or Float - bool m_bFloat; - - //For Docking - Window* m_pWith; - EDockOrientation m_eOrientation; - PlatformWindow* m_pToPlatformWindow; - Container* m_pToContainer; - - //For Floating - ImVec2 m_oPosition; - ImVec2 m_oSize; - }; - - struct DrawWindowAreaAction - { - DrawWindowAreaAction(PlatformWindow* pWindow,const ImVec2& oRectPos,const ImVec2& oRectSize,const ImColor& oColor); - PlatformWindow* m_pWindow; - ImVec2 m_oRectPos; - ImVec2 m_oRectSize; - ImColor m_oColor; - }; - - public: - struct Config - { - Config(); - float m_fDragMarginRatio; - float m_fDragMarginSizeRatio; - ImColor m_oHightlightAreaColor; - }; - - WindowManager(); - virtual ~WindowManager(); - - bool Init(); - bool Run(); - void Exit(); - - PlatformWindow* GetMainPlatformWindow(); - Config& GetConfig(); - - void SetMainTitle(const char* pTitle); - - void Dock(Window* pWindow, EDockOrientation eOrientation = E_DOCK_ORIENTATION_CENTER, PlatformWindow* pToPlatformWindow = NULL); - void DockTo(Window* pWindow, EDockOrientation eOrientation = E_DOCK_ORIENTATION_CENTER, Container* pContainer = NULL); - void DockWith(Window* pWindow, Window* pWithWindow,EDockOrientation eOrientation = E_DOCK_ORIENTATION_CENTER); - void Float(Window* pWindow, const ImVec2& oPosition = ImVec2(-1,-1), const ImVec2& oSize = ImVec2(-1,-1)); - - const WindowList& GetWindowList() const; - PlatformWindow* GetCurrentPlatformWindow(); - PlatformWindow* GetWindowParent(Window* pWindow); - - void Log(const char* pFormat, ...); - virtual void LogFormatted(const char* pStr) = 0;; - - static WindowManager* GetInstance(); - - protected: - virtual PlatformWindow* CreatePlatformWindow(bool bMain,PlatformWindow* pParent,bool bDragWindow) = 0; - virtual void InternalRun() = 0; - - void AddWindow(Window* pWindow); - void RemoveWindow(Window* pWindow); - void DestroyWindow(Window* pWindow); - - void InternalDock(Window* pWindow,EDockOrientation eOrientation,PlatformWindow* pToPlatformWindow); - void InternalDockTo(Window* pWindow,EDockOrientation eOrientation,Container* pToContainer); - void InternalDockWith(Window* pWindow,Window* pWithWindow,EDockOrientation eOrientation); - bool InternalFloat(Window* pWindow,ImVec2 oPosition,ImVec2 oSize); - void InternalUnDock(Window* pWindow); - void InternalDrag(Window* pWindow); - - void OnClosePlatformWindow(PlatformWindow* pWindow); - - void DrawWindowArea(PlatformWindow* pWindow,const ImVec2& oPos,const ImVec2& oSize,const ImColor& oColor); - - void PreUpdate(); - void Update(); - void UpdatePlatformwWindowActions(); - void UpdateDockActions(); - void UpdateOrphans(); - - void Paint(PlatformWindow* pWindow); - - void StartDragWindow(Window* pWindow); - void StopDragWindow(); - void UpdateDragWindow(); - Container* GetBestDocking(PlatformWindow* pPlatformWindow,const ImVec2 oCursorPos,EDockOrientation& oOutOrientation,ImVec2& oOutAreaPos,ImVec2& oOutAreaSize); - - Config m_oConfig; - PlatformWindow* m_pMainPlatformWindow; - PlatformWindowList m_lPlatformWindows; - PlatformWindow* m_pDragPlatformWindow; - WindowList m_lWindows; - WindowList m_lOrphanWindows; - WindowList m_lToDestroyWindows; - PlatformWindowList m_lToDestroyPlatformWindows; - ImwList m_lPlatformWindowActions; - ImwList m_lDockActions; - ImwList m_lDrawWindowAreas; - - PlatformWindow* m_pCurrentPlatformWindow; - Window* m_pDraggedWindow; - - ImVec2 m_oDragPreviewOffset; - - static WindowManager* s_pInstance; - }; -} - -#endif // IMGUI_WM_H_HEADER_GUARD diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_picker.inl b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_picker.inl index a297eb3..3fd2e87 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_picker.inl +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_picker.inl @@ -12,7 +12,7 @@ namespace ImGui // Setup ImVec2 picker_pos = ImGui::GetCursorScreenPos(); ImVec2 sv_picker_size = ImVec2(256.0f, 256.0f); // Saturation/Value picking box - float bars_width = ImGui::GetWindowFontSize() + style.FramePadding.y*2.0f; // Width of Hue/Alpha picking bars (using Framepadding.y to match the ColorButton sides) + float bars_width = ImGui::GetFontSize() + style.FramePadding.y*2.0f; // Width of Hue/Alpha picking bars (using Framepadding.y to match the ColorButton sides) float bar0_pos_x = picker_pos.x + sv_picker_size.x + style.ItemInnerSpacing.x; float bar1_pos_x = bar0_pos_x + bars_width + style.ItemInnerSpacing.x; diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_wheel.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_wheel.h new file mode 100644 index 0000000..7d75b9e --- /dev/null +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_wheel.h @@ -0,0 +1,7 @@ +namespace ImGui +{ + void ColorWheel(const char* _text, float* _rgba, float _size); + + void ColorWheel(const char* _text, uint32_t* _rgba, float _size); + +} // namespace ImGui diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_wheel.inl b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_wheel.inl new file mode 100644 index 0000000..9765714 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/color_wheel.inl @@ -0,0 +1,39 @@ +namespace ImGui +{ + void ColorWheel(const char* _text, float* _rgba, float _size) + { + (void)_size; + ColorEdit4(_text + , _rgba, 0 + | ImGuiColorEditFlags_PickerHueWheel + | ImGuiColorEditFlags_Float + ); + } + + inline void decodeRgba(float* _dst, const uint32_t* _src) + { + uint8_t* src = (uint8_t*)_src; + _dst[0] = float(src[0] / 255.0f); + _dst[1] = float(src[1] / 255.0f); + _dst[2] = float(src[2] / 255.0f); + _dst[3] = float(src[3] / 255.0f); + } + + inline void encodeRgba(uint32_t* _dst, const float* _src) + { + uint8_t* dst = (uint8_t*)_dst; + dst[0] = uint8_t(_src[0] * 255.0); + dst[1] = uint8_t(_src[1] * 255.0); + dst[2] = uint8_t(_src[2] * 255.0); + dst[3] = uint8_t(_src[3] * 255.0); + } + + void ColorWheel(const char* _text, uint32_t* _rgba, float _size) + { + float rgba[4]; + decodeRgba(rgba, _rgba); + ColorWheel(_text, rgba, _size); + encodeRgba(_rgba, rgba); + } + +} // namespace ImGui diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/dock.inl b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/dock.inl index ab0165b..1dceb70 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/dock.inl +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/dock.inl @@ -71,6 +71,7 @@ namespace ImGui , active(true) , status(Status_Float) , opened(false) + , first(true) { location[0] = 0; children[0] = children[1] = NULL; @@ -233,7 +234,10 @@ namespace ImGui ImU32 id = ImHash(label, 0); for (int i = 0; i < m_docks.size(); ++i) { - if (m_docks[i]->id == id) return *m_docks[i]; + if (m_docks[i]->id == id) + { + return *m_docks[i]; + } } Dock* new_dock = (Dock*)MemAlloc(sizeof(Dock)); @@ -365,18 +369,22 @@ namespace ImGui ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoScrollbar | - ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_ShowBorders | + ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoBringToFrontOnFocus; Dock* root = getRootDock(); + const ImVec2& displaySize = GetIO().DisplaySize; if (root) { - SetNextWindowPos(root->pos); - SetNextWindowSize(root->size); + const ImVec2 percentage(displaySize.x / root->size.x, displaySize.y / root->size.y ); + const ImVec2 rescaledPos = root->pos * percentage; + const ImVec2 rescaledSize = root->size * percentage; + SetNextWindowPos(rescaledPos); + SetNextWindowSize(rescaledSize); } else { SetNextWindowPos(ImVec2(0, 0)); - SetNextWindowSize(GetIO().DisplaySize); + SetNextWindowSize(displaySize); } ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0); Begin("###DockPanel", NULL, flags); @@ -504,8 +512,6 @@ namespace ImGui Begin("##Overlay", NULL, - ImVec2(0, 0), - 0.f, ImGuiWindowFlags_Tooltip | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_AlwaysAutoResize); @@ -856,12 +862,7 @@ namespace ImGui void rootDock(const ImVec2& pos, const ImVec2& size) { Dock* root = getRootDock(); - - // martin: make sure we have a root dock - if (!root) - root = &getDock("Root", true); - - root->status = Status_Docked; + if (!root) return; ImVec2 min_size = root->getMinSize(); ImVec2 requested_size = size; @@ -906,6 +907,7 @@ namespace ImGui void tryDockToStoredLocation(Dock& dock) { if (dock.status == Status_Docked) return; + if (dock.location[0] == 0) return; Dock* tmp = getRootDock(); if (!tmp) return; @@ -925,8 +927,7 @@ namespace ImGui bool begin(const char* label, bool* opened, ImGuiWindowFlags extra_flags) { Dock& dock = getDock(label, !opened || *opened); - // martin: tweak docking for better defaults - if (!dock.opened || (!opened || *opened)) tryDockToStoredLocation(dock); + if (!dock.opened && (!opened || *opened)) tryDockToStoredLocation(dock); dock.last_frame = ImGui::GetFrameCount(); if (strcmp(dock.label, label) != 0) { @@ -965,9 +966,7 @@ namespace ImGui SetNextWindowSize(dock.size); bool ret = Begin(label, opened, - dock.size, - -1.0f, - ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_ShowBorders | extra_flags); + ImGuiWindowFlags_NoCollapse | extra_flags); m_end_action = EndAction_End; dock.pos = GetWindowPos(); dock.size = GetWindowSize(); diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/file_list.inl b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/file_list.inl index 41b07ed..75f1fc5 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/file_list.inl +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/file_list.inl @@ -16,7 +16,7 @@ namespace ImGui void ImFileList::ChDir(const char* path) { -#if BX_PLATFORM_NACL || BX_PLATFORM_PS4 +#if BX_PLATFORM_PS4 BX_UNUSED(path); #else DIR* dir = opendir(path); @@ -47,7 +47,7 @@ namespace ImGui closedir(dir); } -#endif // BX_PLATFORM_NACL || BX_PLATFORM_PS4 +#endif // BX_PLATFORM_PS4 } void ImFileList::Draw() diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/gizmo.inl b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/gizmo.inl index 53dbc15..749a0d2 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/gizmo.inl +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/gizmo.inl @@ -62,6 +62,8 @@ namespace ImGuizmo //template T LERP(T x, T y, float z) { return (x + (y - x)*z); } template T Clamp(T x, T y, T z) { return ((xz) ? z : x)); } template T max(T x, T y) { return (x > y) ? x : y; } + template T min(T x, T y) { return (x < y) ? x : y; } + template bool IsWithin(T x, T y, T z) { return (x>=y) && (x<=z); } struct matrix_t; struct vec_t @@ -83,7 +85,7 @@ namespace ImGuizmo vec_t& operator -= (const vec_t& v) { x -= v.x; y -= v.y; z -= v.z; w -= v.w; return *this; } vec_t& operator += (const vec_t& v) { x += v.x; y += v.y; z += v.z; w += v.w; return *this; } vec_t& operator *= (const vec_t& v) { x *= v.x; y *= v.y; z *= v.z; w *= v.w; return *this; } - vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *= v; return *this; } + vec_t& operator *= (float v) { x *= v; y *= v; z *= v; w *= v; return *this; } vec_t operator * (float f) const; vec_t operator - () const; @@ -96,7 +98,7 @@ namespace ImGuizmo float LengthSq() const { return (x*x + y*y + z*z); }; vec_t Normalize() { (*this) *= (1.f / Length()); return (*this); } vec_t Normalize(const vec_t& v) { this->Set(v.x, v.y, v.z, v.w); this->Normalize(); return (*this); } - vec_t Abs() const; + vec_t Abs() const; void Cross(const vec_t& v) { vec_t res; @@ -144,7 +146,6 @@ namespace ImGuizmo vec_t vec_t::operator + (const vec_t& v) const { return makeVect(x + v.x, y + v.y, z + v.z, w + v.w); } vec_t vec_t::operator * (const vec_t& v) const { return makeVect(x * v.x, y * v.y, z * v.z, w * v.w); } vec_t vec_t::Abs() const { return makeVect(fabsf(x), fabsf(y), fabsf(z)); } - ImVec2 operator+ (const ImVec2& a, const ImVec2& b) { return ImVec2(a.x + b.x, a.y + b.y); } vec_t Normalized(const vec_t& v) { vec_t res; res = v; res.Normalize(); return res; } vec_t Cross(const vec_t& v1, const vec_t& v2) @@ -185,7 +186,7 @@ namespace ImGuizmo { vec_t right, up, dir, position; } v; - vec_t component[4]; + vec_t component[4]; }; matrix_t(const matrix_t& other) { memcpy(&m16[0], &other.m16[0], sizeof(float) * 16); } @@ -488,7 +489,7 @@ namespace ImGuizmo SCALE_Y, SCALE_Z, SCALE_XYZ, - BOUNDS + BOUNDS }; struct Context @@ -517,6 +518,7 @@ namespace ImGuizmo vec_t mRayOrigin; vec_t mRayVector; + float mRadiusSquareCenter; ImVec2 mScreenSquareCenter; ImVec2 mScreenSquareMin; ImVec2 mScreenSquareMax; @@ -548,23 +550,25 @@ namespace ImGuizmo bool mBelowPlaneLimit[3]; float mAxisFactor[3]; - // bounds stretching - vec_t mBoundsPivot; - vec_t mBoundsAnchor; - vec_t mBoundsPlan; - vec_t mBoundsLocalPivot; - int mBoundsBestAxis; - int mBoundsAxis[2]; - bool mbUsingBounds; - matrix_t mBoundsMatrix; + // bounds stretching + vec_t mBoundsPivot; + vec_t mBoundsAnchor; + vec_t mBoundsPlan; + vec_t mBoundsLocalPivot; + int mBoundsBestAxis; + int mBoundsAxis[2]; + bool mbUsingBounds; + matrix_t mBoundsMatrix; // int mCurrentOperation; - float mX = 0.f; - float mY = 0.f; - float mWidth = 0.f; - float mHeight = 0.f; + float mX = 0.f; + float mY = 0.f; + float mWidth = 0.f; + float mHeight = 0.f; + float mXMax = 0.f; + float mYMax = 0.f; }; static Context gContext; @@ -574,7 +578,11 @@ namespace ImGuizmo static const vec_t directionUnary[3] = { makeVect(1.f, 0.f, 0.f), makeVect(0.f, 1.f, 0.f), makeVect(0.f, 0.f, 1.f) }; static const ImU32 directionColor[3] = { 0xFF0000AA, 0xFF00AA00, 0xFFAA0000 }; - static const ImU32 selectionColor = 0xFF1080FF; + + // Alpha: 100%: FF, 87%: DE, 70%: B3, 54%: 8A, 50%: 80, 38%: 61, 12%: 1F + static const ImU32 planeBorderColor[3] = { 0xFFAA0000, 0xFF0000AA, 0xFF00AA00 }; + static const ImU32 planeColor[3] = { 0x610000AA, 0x6100AA00, 0x61AA0000 }; + static const ImU32 selectionColor = 0x8A1080FF; static const ImU32 inactiveColor = 0x99999999; static const ImU32 translationLineColor = 0xAAAAAAAA; static const char *translationInfoMask[] = { "X : %5.3f", "Y : %5.3f", "Z : %5.3f", "X : %5.3f Y : %5.3f", "Y : %5.3f Z : %5.3f", "X : %5.3f Z : %5.3f", "X : %5.3f Y : %5.3f Z : %5.3f" }; @@ -600,11 +608,11 @@ namespace ImGuizmo trans *= 0.5f / trans.w; trans += makeVect(0.5f, 0.5f); trans.y = 1.f - trans.y; - trans.x *= gContext.mWidth; - trans.y *= gContext.mHeight; - trans.x += gContext.mX; - trans.y += gContext.mY; - return ImVec2(trans.x, trans.y); + trans.x *= gContext.mWidth; + trans.y *= gContext.mHeight; + trans.x += gContext.mX; + trans.y += gContext.mY; + return ImVec2(trans.x, trans.y); } static void ComputeCameraRay(vec_t &rayOrigin, vec_t &rayDir) @@ -614,9 +622,9 @@ namespace ImGuizmo matrix_t mViewProjInverse; mViewProjInverse.Inverse(gContext.mViewMat * gContext.mProjectionMat); - float mox = ((io.MousePos.x - gContext.mX) / gContext.mWidth) * 2.f - 1.f; - float moy = (1.f - ((io.MousePos.y - gContext.mY) / gContext.mHeight)) * 2.f - 1.f; - + float mox = ((io.MousePos.x - gContext.mX) / gContext.mWidth) * 2.f - 1.f; + float moy = (1.f - ((io.MousePos.y - gContext.mY) / gContext.mHeight)) * 2.f - 1.f; + rayOrigin.Transform(makeVect(mox, moy, 0.f, 1.f), mViewProjInverse); rayOrigin *= 1.f / rayOrigin.w; vec_t rayEnd; @@ -636,23 +644,38 @@ namespace ImGuizmo return -(numer / denom); } + static bool IsInContextRect( ImVec2 p ) + { + return IsWithin( p.x, gContext.mX, gContext.mXMax ) && IsWithin(p.y, gContext.mY, gContext.mYMax ); + } + void SetRect(float x, float y, float width, float height) { - gContext.mX = x; - gContext.mY = y; - gContext.mWidth = width; - gContext.mHeight = height; + gContext.mX = x; + gContext.mY = y; + gContext.mWidth = width; + gContext.mHeight = height; + gContext.mXMax = gContext.mX + gContext.mWidth; + gContext.mYMax = gContext.mY + gContext.mXMax; + } + + void SetDrawlist() + { + gContext.mDrawList = ImGui::GetWindowDrawList(); } void BeginFrame() { ImGuiIO& io = ImGui::GetIO(); - ImGui::Begin("gizmo", NULL, io.DisplaySize, 0, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoBringToFrontOnFocus); - - gContext.mDrawList = ImGui::GetWindowDrawList(); + const ImU32 flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoBringToFrontOnFocus; + ImGui::SetNextWindowSize(io.DisplaySize); + ImGui::PushStyleColor(ImGuiCol_WindowBg, 0); + ImGui::Begin("gizmo", NULL, flags); + gContext.mDrawList = ImGui::GetWindowDrawList(); ImGui::End(); + ImGui::PopStyleColor(); } bool IsUsing() @@ -668,11 +691,11 @@ namespace ImGuizmo void Enable(bool enable) { gContext.mbEnable = enable; - if (!enable) - { - gContext.mbUsing = false; - gContext.mbUsingBounds = false; - } + if (!enable) + { + gContext.mbUsing = false; + gContext.mbUsingBounds = false; + } } static float GetUniform(const vec_t& position, const matrix_t& mat) @@ -733,7 +756,8 @@ namespace ImGuizmo { int colorPlaneIndex = (i + 2) % 3; colors[i + 1] = (type == (int)(MOVE_X + i)) ? selectionColor : directionColor[i]; - colors[i + 4] = (type == (int)(MOVE_XY + i)) ? selectionColor : directionColor[colorPlaneIndex]; + colors[i + 4] = (type == (int)(MOVE_XY + i)) ? selectionColor : planeColor[colorPlaneIndex]; + colors[i + 4] = (type == MOVE_SCREEN) ? selectionColor : colors[i + 4]; } break; case ROTATE: @@ -746,8 +770,6 @@ namespace ImGuizmo for (int i = 0; i < 3; i++) colors[i + 1] = (type == (int)(SCALE_X + i)) ? selectionColor : directionColor[i]; break; - default: - break; } } else @@ -851,6 +873,7 @@ namespace ImGuizmo vec_t cameraToModelNormalized = Normalized(gContext.mModel.v.position - gContext.mCameraEye); cameraToModelNormalized.TransformVector(gContext.mModelInverse); + gContext.mRadiusSquareCenter = screenRotateSize * gContext.mHeight; for (int axis = 0; axis < 3; axis++) { ImVec2 circlePos[halfCircleSegmentCount]; @@ -864,9 +887,14 @@ namespace ImGuizmo vec_t pos = makeVect(axisPos[axis], axisPos[(axis+1)%3], axisPos[(axis+2)%3]) * gContext.mScreenFactor; circlePos[i] = worldToPos(pos, gContext.mMVP); } - drawList->AddPolyline(circlePos, halfCircleSegmentCount, colors[3 - axis], false, 2, true); + + float radiusAxis = sqrtf( (ImLengthSqr(worldToPos(gContext.mModel.v.position, gContext.mViewProjection) - circlePos[0]) )); + if(radiusAxis > gContext.mRadiusSquareCenter) + gContext.mRadiusSquareCenter = radiusAxis; + + drawList->AddPolyline(circlePos, halfCircleSegmentCount, colors[3 - axis], false, 2); } - drawList->AddCircle(worldToPos(gContext.mModel.v.position, gContext.mViewProjection), screenRotateSize * gContext.mHeight, colors[0], 64); + drawList->AddCircle(worldToPos(gContext.mModel.v.position, gContext.mViewProjection), gContext.mRadiusSquareCenter, colors[0], 64, 3.f); if (gContext.mbUsing) { @@ -883,8 +911,8 @@ namespace ImGuizmo pos *= gContext.mScreenFactor; circlePos[i] = worldToPos(pos + gContext.mModel.v.position, gContext.mViewProjection); } - drawList->AddConvexPolyFilled(circlePos, halfCircleSegmentCount, 0x801080FF, true); - drawList->AddPolyline(circlePos, halfCircleSegmentCount, 0xFF1080FF, true, 2, true); + drawList->AddConvexPolyFilled(circlePos, halfCircleSegmentCount, 0x801080FF); + drawList->AddPolyline(circlePos, halfCircleSegmentCount, 0xFF1080FF, true, 2); ImVec2 destinationPosOnScreen = circlePos[1]; char tmps[512]; @@ -912,9 +940,6 @@ namespace ImGuizmo ImU32 colors[7]; ComputeColors(colors, type, SCALE); - // draw screen cirle - drawList->AddCircleFilled(gContext.mScreenSquareCenter, 12.f, colors[0], 32); - // draw vec_t scaleDisplay = { 1.f, 1.f, 1.f, 1.f }; @@ -936,17 +961,20 @@ namespace ImGuizmo if (gContext.mbUsing) { - drawList->AddLine(baseSSpace, worldDirSSpaceNoScale, 0xFF404040, 6.f); - drawList->AddCircleFilled(worldDirSSpaceNoScale, 10.f, 0xFF404040); + drawList->AddLine(baseSSpace, worldDirSSpaceNoScale, 0xFF404040, 3.f); + drawList->AddCircleFilled(worldDirSSpaceNoScale, 6.f, 0xFF404040); } - drawList->AddLine(baseSSpace, worldDirSSpace, colors[i + 1], 6.f); - drawList->AddCircleFilled(worldDirSSpace, 10.f, colors[i + 1]); + drawList->AddLine(baseSSpace, worldDirSSpace, colors[i + 1], 3.f); + drawList->AddCircleFilled(worldDirSSpace, 6.f, colors[i + 1]); if (gContext.mAxisFactor[i] < 0.f) DrawHatchedAxis(dirPlaneX * scaleDisplay[i]); } } + + // draw screen cirle + drawList->AddCircleFilled(gContext.mScreenSquareCenter, 6.f, colors[0], 32); if (gContext.mbUsing) { @@ -972,21 +1000,21 @@ namespace ImGuizmo static void DrawTranslationGizmo(int type) { ImDrawList* drawList = gContext.mDrawList; - if (!drawList) - return; + if (!drawList) + return; // colors ImU32 colors[7]; ComputeColors(colors, type, TRANSLATE); - // draw screen quad - drawList->AddRectFilled(gContext.mScreenSquareMin, gContext.mScreenSquareMax, colors[0], 2.f); - + const ImVec2 origin = worldToPos(gContext.mModel.v.position, gContext.mViewProjection); + // draw - for (unsigned int i = 0; i < 3; i++) + bool belowAxisLimit = false; + bool belowPlaneLimit = false; + for (unsigned int i = 0; i < 3; ++i) { vec_t dirPlaneX, dirPlaneY; - bool belowAxisLimit, belowPlaneLimit; ComputeTripodAxisAndVisibility(i, dirPlaneX, dirPlaneY, belowAxisLimit, belowPlaneLimit); // draw axis @@ -995,8 +1023,20 @@ namespace ImGuizmo ImVec2 baseSSpace = worldToPos(dirPlaneX * 0.1f * gContext.mScreenFactor, gContext.mMVP); ImVec2 worldDirSSpace = worldToPos(dirPlaneX * gContext.mScreenFactor, gContext.mMVP); - drawList->AddLine(baseSSpace, worldDirSSpace, colors[i + 1], 6.f); - + drawList->AddLine(baseSSpace, worldDirSSpace, colors[i + 1], 3.f); + + // Arrow head begin + ImVec2 dir(origin - worldDirSSpace); + + float d = sqrtf(ImLengthSqr(dir)); + dir /= d; // Normalize + dir *= 6.0f; + + ImVec2 ortogonalDir(dir.y, -dir.x); // Perpendicular vector + ImVec2 a(worldDirSSpace + dir); + drawList->AddTriangleFilled(worldDirSSpace - dir, a + ortogonalDir, a - ortogonalDir, colors[i + 1]); + // Arrow head end + if (gContext.mAxisFactor[i] < 0.f) DrawHatchedAxis(dirPlaneX); } @@ -1005,15 +1045,18 @@ namespace ImGuizmo if (belowPlaneLimit) { ImVec2 screenQuadPts[4]; - for (int j = 0; j < 4; j++) + for (int j = 0; j < 4; ++j) { vec_t cornerWorldPos = (dirPlaneX * quadUV[j * 2] + dirPlaneY * quadUV[j * 2 + 1]) * gContext.mScreenFactor; screenQuadPts[j] = worldToPos(cornerWorldPos, gContext.mMVP); } - drawList->AddConvexPolyFilled(screenQuadPts, 4, colors[i + 4], true); + drawList->AddPolyline(screenQuadPts, 4, planeBorderColor[i], true, 1.0f); + drawList->AddConvexPolyFilled(screenQuadPts, 4, colors[i + 4]); } } + drawList->AddCircleFilled(gContext.mScreenSquareCenter, 6.f, colors[0], 32); + if (gContext.mbUsing) { ImVec2 sourcePosOnScreen = worldToPos(gContext.mMatrixOrigin, gContext.mViewProjection); @@ -1034,176 +1077,233 @@ namespace ImGuizmo } } + static bool CanActivate() + { + if (ImGui::IsMouseClicked(0) && !ImGui::IsAnyItemHovered() && !ImGui::IsAnyItemActive()) + return true; + return false; + } + static void HandleAndDrawLocalBounds(float *bounds, matrix_t *matrix, float *snapValues) { - ImGuiIO& io = ImGui::GetIO(); - ImDrawList* drawList = gContext.mDrawList; + ImGuiIO& io = ImGui::GetIO(); + ImDrawList* drawList = gContext.mDrawList; - // compute best projection axis - vec_t bestAxisWorldDirection; - int bestAxis = gContext.mBoundsBestAxis; - if (!gContext.mbUsingBounds) - { - - float bestDot = 0.f; - for (unsigned int i = 0; i < 3; i++) - { - vec_t dirPlaneNormalWorld; - dirPlaneNormalWorld.TransformVector(directionUnary[i], gContext.mModelSource); - dirPlaneNormalWorld.Normalize(); + // compute best projection axis + vec_t axesWorldDirections[3]; + vec_t bestAxisWorldDirection = { 0.0f, 0.0f, 0.0f, 0.0f }; + int axes[3]; + unsigned int numAxes = 1; + axes[0] = gContext.mBoundsBestAxis; + int bestAxis = axes[0]; + if (!gContext.mbUsingBounds) + { + numAxes = 0; + float bestDot = 0.f; + for (unsigned int i = 0; i < 3; i++) + { + vec_t dirPlaneNormalWorld; + dirPlaneNormalWorld.TransformVector(directionUnary[i], gContext.mModelSource); + dirPlaneNormalWorld.Normalize(); - float dt = Dot(Normalized(gContext.mCameraEye - gContext.mModelSource.v.position), dirPlaneNormalWorld); - if (fabsf(dt) >= bestDot) - { - bestDot = fabsf(dt); - bestAxis = i; - bestAxisWorldDirection = dirPlaneNormalWorld; - } - } - } + float dt = fabsf( Dot(Normalized(gContext.mCameraEye - gContext.mModelSource.v.position), dirPlaneNormalWorld) ); + if ( dt >= bestDot ) + { + bestDot = dt; + bestAxis = i; + bestAxisWorldDirection = dirPlaneNormalWorld; + } - // corners - vec_t aabb[4]; + if( dt >= 0.1f ) + { + axes[numAxes] = i; + axesWorldDirections[numAxes] = dirPlaneNormalWorld; + ++numAxes; + } + } + } - int secondAxis = (bestAxis + 1) % 3; - int thirdAxis = (bestAxis + 2) % 3; + if( numAxes == 0 ) + { + axes[0] = bestAxis; + axesWorldDirections[0] = bestAxisWorldDirection; + numAxes = 1; + } + else if( bestAxis != axes[0] ) + { + unsigned int bestIndex = 0; + for (unsigned int i = 0; i < numAxes; i++) + { + if( axes[i] == bestAxis ) + { + bestIndex = i; + break; + } + } + int tempAxis = axes[0]; + axes[0] = axes[bestIndex]; + axes[bestIndex] = tempAxis; + vec_t tempDirection = axesWorldDirections[0]; + axesWorldDirections[0] = axesWorldDirections[bestIndex]; + axesWorldDirections[bestIndex] = tempDirection; + } - for (int i = 0; i < 4; i++) - { - aabb[i][3] = aabb[i][bestAxis] = 0.f; - aabb[i][secondAxis] = bounds[secondAxis + 3 * (i >> 1)]; - aabb[i][thirdAxis] = bounds[thirdAxis + 3 * ((i >> 1) ^ (i & 1))]; - } + for (unsigned int axisIndex = 0; axisIndex < numAxes; ++axisIndex) + { + bestAxis = axes[axisIndex]; + bestAxisWorldDirection = axesWorldDirections[axisIndex]; - // draw bounds - unsigned int anchorAlpha = gContext.mbEnable ? 0xFF000000 : 0x80000000; + // corners + vec_t aabb[4]; - matrix_t boundsMVP = gContext.mModelSource * gContext.mViewProjection; - for (int i = 0; i < 4;i++) - { - ImVec2 worldBound1 = worldToPos(aabb[i], boundsMVP); - ImVec2 worldBound2 = worldToPos(aabb[(i+1)%4], boundsMVP); - float boundDistance = sqrtf(ImLengthSqr(worldBound1 - worldBound2)); - int stepCount = (int)(boundDistance / 10.f); - float stepLength = 1.f / (float)stepCount; - for (int j = 0; j < stepCount; j++) - { - float t1 = (float)j * stepLength; - float t2 = (float)j * stepLength + stepLength * 0.5f; - ImVec2 worldBoundSS1 = ImLerp(worldBound1, worldBound2, ImVec2(t1, t1)); - ImVec2 worldBoundSS2 = ImLerp(worldBound1, worldBound2, ImVec2(t2, t2)); - drawList->AddLine(worldBoundSS1, worldBoundSS2, 0xAAAAAA + anchorAlpha, 3.f); - } - vec_t midPoint = (aabb[i] + aabb[(i + 1) % 4] ) * 0.5f; - ImVec2 midBound = worldToPos(midPoint, boundsMVP); - static const float AnchorBigRadius = 8.f; - static const float AnchorSmallRadius = 6.f; - bool overBigAnchor = ImLengthSqr(worldBound1 - io.MousePos) <= (AnchorBigRadius*AnchorBigRadius); - bool overSmallAnchor = ImLengthSqr(midBound - io.MousePos) <= (AnchorBigRadius*AnchorBigRadius); + int secondAxis = (bestAxis + 1) % 3; + int thirdAxis = (bestAxis + 2) % 3; - - unsigned int bigAnchorColor = overBigAnchor ? selectionColor : (0xAAAAAA + anchorAlpha); - unsigned int smallAnchorColor = overSmallAnchor ? selectionColor : (0xAAAAAA + anchorAlpha); - - drawList->AddCircleFilled(worldBound1, AnchorBigRadius, bigAnchorColor); - drawList->AddCircleFilled(midBound, AnchorSmallRadius, smallAnchorColor); - int oppositeIndex = (i + 2) % 4; - // big anchor on corners - if (!gContext.mbUsingBounds && gContext.mbEnable && overBigAnchor && io.MouseDown[0]) - { - gContext.mBoundsPivot.TransformPoint(aabb[(i + 2) % 4], gContext.mModelSource); - gContext.mBoundsAnchor.TransformPoint(aabb[i], gContext.mModelSource); - gContext.mBoundsPlan = BuildPlan(gContext.mBoundsAnchor, bestAxisWorldDirection); - gContext.mBoundsBestAxis = bestAxis; - gContext.mBoundsAxis[0] = secondAxis; - gContext.mBoundsAxis[1] = thirdAxis; + for (int i = 0; i < 4; i++) + { + aabb[i][3] = aabb[i][bestAxis] = 0.f; + aabb[i][secondAxis] = bounds[secondAxis + 3 * (i >> 1)]; + aabb[i][thirdAxis] = bounds[thirdAxis + 3 * ((i >> 1) ^ (i & 1))]; + } - gContext.mBoundsLocalPivot.Set(0.f); - gContext.mBoundsLocalPivot[secondAxis] = aabb[oppositeIndex][secondAxis]; - gContext.mBoundsLocalPivot[thirdAxis] = aabb[oppositeIndex][thirdAxis]; + // draw bounds + unsigned int anchorAlpha = gContext.mbEnable ? 0xFF000000 : 0x80000000; - gContext.mbUsingBounds = true; - gContext.mBoundsMatrix = gContext.mModelSource; - } - // small anchor on middle of segment - if (!gContext.mbUsingBounds && gContext.mbEnable && overSmallAnchor && io.MouseDown[0]) - { - vec_t midPointOpposite = (aabb[(i + 2) % 4] + aabb[(i + 3) % 4]) * 0.5f; - gContext.mBoundsPivot.TransformPoint(midPointOpposite, gContext.mModelSource); - gContext.mBoundsAnchor.TransformPoint(midPoint, gContext.mModelSource); - gContext.mBoundsPlan = BuildPlan(gContext.mBoundsAnchor, bestAxisWorldDirection); - gContext.mBoundsBestAxis = bestAxis; - int indices[] = { secondAxis , thirdAxis }; - gContext.mBoundsAxis[0] = indices[i%2]; - gContext.mBoundsAxis[1] = -1; + matrix_t boundsMVP = gContext.mModelSource * gContext.mViewProjection; + for (int i = 0; i < 4;i++) + { + ImVec2 worldBound1 = worldToPos(aabb[i], boundsMVP); + ImVec2 worldBound2 = worldToPos(aabb[(i+1)%4], boundsMVP); + if( !IsInContextRect( worldBound1 ) || !IsInContextRect( worldBound2 ) ) + { + continue; + } + float boundDistance = sqrtf(ImLengthSqr(worldBound1 - worldBound2)); + int stepCount = (int)(boundDistance / 10.f); + stepCount = min( stepCount, 1000 ); + float stepLength = 1.f / (float)stepCount; + for (int j = 0; j < stepCount; j++) + { + float t1 = (float)j * stepLength; + float t2 = (float)j * stepLength + stepLength * 0.5f; + ImVec2 worldBoundSS1 = ImLerp(worldBound1, worldBound2, ImVec2(t1, t1)); + ImVec2 worldBoundSS2 = ImLerp(worldBound1, worldBound2, ImVec2(t2, t2)); + drawList->AddLine(worldBoundSS1, worldBoundSS2, 0xAAAAAA + anchorAlpha, 3.f); + } + vec_t midPoint = (aabb[i] + aabb[(i + 1) % 4] ) * 0.5f; + ImVec2 midBound = worldToPos(midPoint, boundsMVP); + static const float AnchorBigRadius = 8.f; + static const float AnchorSmallRadius = 6.f; + bool overBigAnchor = ImLengthSqr(worldBound1 - io.MousePos) <= (AnchorBigRadius*AnchorBigRadius); + bool overSmallAnchor = ImLengthSqr(midBound - io.MousePos) <= (AnchorBigRadius*AnchorBigRadius); - gContext.mBoundsLocalPivot.Set(0.f); - gContext.mBoundsLocalPivot[gContext.mBoundsAxis[0]] = aabb[oppositeIndex][indices[i % 2]];// bounds[gContext.mBoundsAxis[0]] * (((i + 1) & 2) ? 1.f : -1.f); + + unsigned int bigAnchorColor = overBigAnchor ? selectionColor : (0xAAAAAA + anchorAlpha); + unsigned int smallAnchorColor = overSmallAnchor ? selectionColor : (0xAAAAAA + anchorAlpha); + + drawList->AddCircleFilled(worldBound1, AnchorBigRadius, bigAnchorColor); + drawList->AddCircleFilled(midBound, AnchorSmallRadius, smallAnchorColor); + int oppositeIndex = (i + 2) % 4; + // big anchor on corners + if (!gContext.mbUsingBounds && gContext.mbEnable && overBigAnchor && CanActivate()) + { + gContext.mBoundsPivot.TransformPoint(aabb[(i + 2) % 4], gContext.mModelSource); + gContext.mBoundsAnchor.TransformPoint(aabb[i], gContext.mModelSource); + gContext.mBoundsPlan = BuildPlan(gContext.mBoundsAnchor, bestAxisWorldDirection); + gContext.mBoundsBestAxis = bestAxis; + gContext.mBoundsAxis[0] = secondAxis; + gContext.mBoundsAxis[1] = thirdAxis; - gContext.mbUsingBounds = true; - gContext.mBoundsMatrix = gContext.mModelSource; - } - } - - if (gContext.mbUsingBounds) - { - matrix_t scale; - scale.SetToIdentity(); + gContext.mBoundsLocalPivot.Set(0.f); + gContext.mBoundsLocalPivot[secondAxis] = aabb[oppositeIndex][secondAxis]; + gContext.mBoundsLocalPivot[thirdAxis] = aabb[oppositeIndex][thirdAxis]; - // compute projected mouse position on plan - const float len = IntersectRayPlane(gContext.mRayOrigin, gContext.mRayVector, gContext.mBoundsPlan); - vec_t newPos = gContext.mRayOrigin + gContext.mRayVector * len; + gContext.mbUsingBounds = true; + gContext.mBoundsMatrix = gContext.mModelSource; + } + // small anchor on middle of segment + if (!gContext.mbUsingBounds && gContext.mbEnable && overSmallAnchor && CanActivate()) + { + vec_t midPointOpposite = (aabb[(i + 2) % 4] + aabb[(i + 3) % 4]) * 0.5f; + gContext.mBoundsPivot.TransformPoint(midPointOpposite, gContext.mModelSource); + gContext.mBoundsAnchor.TransformPoint(midPoint, gContext.mModelSource); + gContext.mBoundsPlan = BuildPlan(gContext.mBoundsAnchor, bestAxisWorldDirection); + gContext.mBoundsBestAxis = bestAxis; + int indices[] = { secondAxis , thirdAxis }; + gContext.mBoundsAxis[0] = indices[i%2]; + gContext.mBoundsAxis[1] = -1; - // compute a reference and delta vectors base on mouse move - vec_t deltaVector = (newPos - gContext.mBoundsPivot).Abs(); - vec_t referenceVector = (gContext.mBoundsAnchor - gContext.mBoundsPivot).Abs(); + gContext.mBoundsLocalPivot.Set(0.f); + gContext.mBoundsLocalPivot[gContext.mBoundsAxis[0]] = aabb[oppositeIndex][indices[i % 2]];// bounds[gContext.mBoundsAxis[0]] * (((i + 1) & 2) ? 1.f : -1.f); - // for 1 or 2 axes, compute a ratio that's used for scale and snap it based on resulting length - for (int i = 0; i < 2; i++) - { - int axisIndex = gContext.mBoundsAxis[i]; - if (axisIndex == -1) - continue; + gContext.mbUsingBounds = true; + gContext.mBoundsMatrix = gContext.mModelSource; + } + } + + if (gContext.mbUsingBounds) + { + matrix_t scale; + scale.SetToIdentity(); - float ratioAxis = 1.f; - vec_t axisDir = gContext.mBoundsMatrix.component[axisIndex].Abs(); + // compute projected mouse position on plan + const float len = IntersectRayPlane(gContext.mRayOrigin, gContext.mRayVector, gContext.mBoundsPlan); + vec_t newPos = gContext.mRayOrigin + gContext.mRayVector * len; - float dtAxis = axisDir.Dot(referenceVector); - float boundSize = bounds[axisIndex + 3] - bounds[axisIndex]; - if (dtAxis > FLT_EPSILON) - ratioAxis = axisDir.Dot(deltaVector) / dtAxis; + // compute a reference and delta vectors base on mouse move + vec_t deltaVector = (newPos - gContext.mBoundsPivot).Abs(); + vec_t referenceVector = (gContext.mBoundsAnchor - gContext.mBoundsPivot).Abs(); - if (snapValues) - { - float length = boundSize * ratioAxis; - ComputeSnap(&length, snapValues[axisIndex]); - if (boundSize > FLT_EPSILON) - ratioAxis = length / boundSize; - } - scale.component[axisIndex] *= ratioAxis; - } + // for 1 or 2 axes, compute a ratio that's used for scale and snap it based on resulting length + for (int i = 0; i < 2; i++) + { + int axisIndex1 = gContext.mBoundsAxis[i]; + if (axisIndex1 == -1) + continue; - // transform matrix - matrix_t preScale, postScale; - preScale.Translation(-gContext.mBoundsLocalPivot); - postScale.Translation(gContext.mBoundsLocalPivot); - matrix_t res = preScale * scale * postScale * gContext.mBoundsMatrix; - *matrix = res; + float ratioAxis = 1.f; + vec_t axisDir = gContext.mBoundsMatrix.component[axisIndex1].Abs(); - // info text - char tmps[512]; - ImVec2 destinationPosOnScreen = worldToPos(gContext.mModel.v.position, gContext.mViewProjection); - ImFormatString(tmps, sizeof(tmps), "X: %.2f Y: %.2f Z:%.2f" - , (bounds[3] - bounds[0]) * gContext.mBoundsMatrix.component[0].Length() * scale.component[0].Length() - , (bounds[4] - bounds[1]) * gContext.mBoundsMatrix.component[1].Length() * scale.component[1].Length() - , (bounds[5] - bounds[2]) * gContext.mBoundsMatrix.component[2].Length() * scale.component[2].Length() - ); - drawList->AddText(ImVec2(destinationPosOnScreen.x + 15, destinationPosOnScreen.y + 15), 0xFF000000, tmps); - drawList->AddText(ImVec2(destinationPosOnScreen.x + 14, destinationPosOnScreen.y + 14), 0xFFFFFFFF, tmps); - } + float dtAxis = axisDir.Dot(referenceVector); + float boundSize = bounds[axisIndex1 + 3] - bounds[axisIndex1]; + if (dtAxis > FLT_EPSILON) + ratioAxis = axisDir.Dot(deltaVector) / dtAxis; - if (!io.MouseDown[0]) - gContext.mbUsingBounds = false; + if (snapValues) + { + float length = boundSize * ratioAxis; + ComputeSnap(&length, snapValues[axisIndex1]); + if (boundSize > FLT_EPSILON) + ratioAxis = length / boundSize; + } + scale.component[axisIndex1] *= ratioAxis; + } + + // transform matrix + matrix_t preScale, postScale; + preScale.Translation(-gContext.mBoundsLocalPivot); + postScale.Translation(gContext.mBoundsLocalPivot); + matrix_t res = preScale * scale * postScale * gContext.mBoundsMatrix; + *matrix = res; + + // info text + char tmps[512]; + ImVec2 destinationPosOnScreen = worldToPos(gContext.mModel.v.position, gContext.mViewProjection); + ImFormatString(tmps, sizeof(tmps), "X: %.2f Y: %.2f Z:%.2f" + , (bounds[3] - bounds[0]) * gContext.mBoundsMatrix.component[0].Length() * scale.component[0].Length() + , (bounds[4] - bounds[1]) * gContext.mBoundsMatrix.component[1].Length() * scale.component[1].Length() + , (bounds[5] - bounds[2]) * gContext.mBoundsMatrix.component[2].Length() * scale.component[2].Length() + ); + drawList->AddText(ImVec2(destinationPosOnScreen.x + 15, destinationPosOnScreen.y + 15), 0xFF000000, tmps); + drawList->AddText(ImVec2(destinationPosOnScreen.x + 14, destinationPosOnScreen.y + 14), 0xFFFFFFFF, tmps); + } + + if (!io.MouseDown[0]) + gContext.mbUsingBounds = false; + + if( gContext.mbUsingBounds ) + break; + } } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1249,7 +1349,7 @@ namespace ImGuizmo vec_t deltaScreen = { io.MousePos.x - gContext.mScreenSquareCenter.x, io.MousePos.y - gContext.mScreenSquareCenter.y, 0.f, 0.f }; float dist = deltaScreen.Length(); - if (dist >= (screenRotateSize - 0.002f) * gContext.mHeight && dist < (screenRotateSize + 0.002f) * gContext.mHeight) + if (dist >= (gContext.mRadiusSquareCenter - 1.0f) && dist < (gContext.mRadiusSquareCenter + 1.0f)) type = ROTATE_SCREEN; const vec_t planNormals[] = { gContext.mModel.v.right, gContext.mModel.v.up, gContext.mModel.v.dir}; @@ -1321,6 +1421,7 @@ namespace ImGuizmo // move if (gContext.mbUsing) { + ImGui::CaptureMouseFromApp(); const float len = IntersectRayPlane(gContext.mRayOrigin, gContext.mRayVector, gContext.mTranslationPlan); vec_t newPos = gContext.mRayOrigin + gContext.mRayVector * len; @@ -1379,8 +1480,9 @@ namespace ImGuizmo // find new possible way to move vec_t gizmoHitProportion; type = GetMoveType(&gizmoHitProportion); - if (io.MouseDown[0] && type != NONE) + if (CanActivate() && type != NONE) { + ImGui::CaptureMouseFromApp(); gContext.mbUsing = true; gContext.mCurrentOperation = type; const vec_t movePlanNormal[] = { gContext.mModel.v.up, gContext.mModel.v.dir, gContext.mModel.v.right, gContext.mModel.v.dir, gContext.mModel.v.right, gContext.mModel.v.up, -gContext.mCameraDir }; @@ -1403,8 +1505,9 @@ namespace ImGuizmo { // find new possible way to scale type = GetScaleType(); - if (io.MouseDown[0] && type != NONE) + if (CanActivate() && type != NONE) { + ImGui::CaptureMouseFromApp(); gContext.mbUsing = true; gContext.mCurrentOperation = type; const vec_t movePlanNormal[] = { gContext.mModel.v.up, gContext.mModel.v.dir, gContext.mModel.v.right, gContext.mModel.v.dir, gContext.mModel.v.up, gContext.mModel.v.right, -gContext.mCameraDir }; @@ -1423,6 +1526,7 @@ namespace ImGuizmo // scale if (gContext.mbUsing) { + ImGui::CaptureMouseFromApp(); const float len = IntersectRayPlane(gContext.mRayOrigin, gContext.mRayVector, gContext.mTranslationPlan); vec_t newPos = gContext.mRayOrigin + gContext.mRayVector * len; vec_t newOrigin = newPos - gContext.mRelativeOrigin * gContext.mScreenFactor; @@ -1442,7 +1546,7 @@ namespace ImGuizmo gContext.mScale[axisIndex] = max(ratio, 0.001f); } else - { + { float scaleDelta = (io.MousePos.x - gContext.mSaveMousePosx) * 0.01f; gContext.mScale.Set(max(1.f + scaleDelta, 0.001f)); } @@ -1486,14 +1590,15 @@ namespace ImGuizmo if (!gContext.mbUsing) { type = GetRotateType(); - + if (type == ROTATE_SCREEN) { applyRotationLocaly = true; } - if (io.MouseDown[0] && type != NONE) + if (CanActivate() && type != NONE) { + ImGui::CaptureMouseFromApp(); gContext.mbUsing = true; gContext.mCurrentOperation = type; const vec_t rotatePlanNormal[] = { gContext.mModel.v.right, gContext.mModel.v.up, gContext.mModel.v.dir, -gContext.mCameraDir }; @@ -1517,6 +1622,7 @@ namespace ImGuizmo // rotation if (gContext.mbUsing) { + ImGui::CaptureMouseFromApp(); gContext.mRotationAngle = ComputeAngleOnPlan(); if (snap) { @@ -1621,41 +1727,41 @@ namespace ImGuizmo int type = NONE; if (gContext.mbEnable) { - if (!gContext.mbUsingBounds) - { - switch (operation) - { - case ROTATE: - HandleRotation(matrix, deltaMatrix, type, snap); - break; - case TRANSLATE: - HandleTranslation(matrix, deltaMatrix, type, snap); - break; - case SCALE: - HandleScale(matrix, deltaMatrix, type, snap); - break; - } - } + if (!gContext.mbUsingBounds) + { + switch (operation) + { + case ROTATE: + HandleRotation(matrix, deltaMatrix, type, snap); + break; + case TRANSLATE: + HandleTranslation(matrix, deltaMatrix, type, snap); + break; + case SCALE: + HandleScale(matrix, deltaMatrix, type, snap); + break; + } + } } - if (localBounds && !gContext.mbUsing) - HandleAndDrawLocalBounds(localBounds, (matrix_t*)matrix, boundsSnap); + if (localBounds && !gContext.mbUsing) + HandleAndDrawLocalBounds(localBounds, (matrix_t*)matrix, boundsSnap); - if (!gContext.mbUsingBounds) - { - switch (operation) - { - case ROTATE: - DrawRotationGizmo(type); - break; - case TRANSLATE: - DrawTranslationGizmo(type); - break; - case SCALE: - DrawScaleGizmo(type); - break; - } - } + if (!gContext.mbUsingBounds) + { + switch (operation) + { + case ROTATE: + DrawRotationGizmo(type); + break; + case TRANSLATE: + DrawTranslationGizmo(type); + break; + case SCALE: + DrawScaleGizmo(type); + break; + } + } } void DrawCube(const float *view, const float *projection, float *matrix) @@ -1707,7 +1813,7 @@ namespace ImGuizmo continue; // draw face with lighter color - gContext.mDrawList->AddConvexPolyFilled(faceCoordsScreen, 4, directionColor[normalIndex] | 0x808080, true); + gContext.mDrawList->AddConvexPolyFilled(faceCoordsScreen, 4, directionColor[normalIndex] | 0x808080); } } }; diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/memory_editor.inl b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/memory_editor.inl index d8b1464..54b9651 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/memory_editor.inl +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/memory_editor.inl @@ -16,7 +16,7 @@ namespace ImGui unsigned char* mem_data = (unsigned char*)mem_data_void; - BeginChild("##scrolling", ImVec2(0, -GetItemsLineHeightWithSpacing())); + BeginChild("##scrolling", ImVec2(0, -GetFrameHeight())); if (ImGui::BeginPopupContextWindow() ) { @@ -202,7 +202,7 @@ namespace ImGui Separator(); - AlignFirstTextHeightToWidgets(); + AlignTextToFramePadding(); PushItemWidth(50); PushAllowKeyboardFocus(false); int rows_backup = Rows; diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/range_slider.inl b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/range_slider.inl index e4851a0..5b3fc60 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/range_slider.inl +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/range_slider.inl @@ -160,13 +160,13 @@ bool RangeSliderFloat(const char* label, float* v1, float* v2, float v_min, floa const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); // NB- we don't call ItemSize() yet because we may turn into a text edit box below - if (!ItemAdd(total_bb, &id)) + if (!ItemAdd(total_bb, id)) { ItemSize(total_bb, style.FramePadding.y); return false; } - const bool hovered = IsHovered(frame_bb, id); + const bool hovered = ItemHoverable(frame_bb, id); if (hovered) SetHoveredID(id); diff --git a/3rdparty/bgfx/3rdparty/pvrtc/AlphaBitmap.h b/3rdparty/bgfx/3rdparty/pvrtc/AlphaBitmap.h deleted file mode 100644 index 4197332..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/AlphaBitmap.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include "Bitmap.h" - -namespace Javelin { - -class AlphaBitmap : public Bitmap { -public: - AlphaBitmap() {} - - AlphaBitmap(int w, int h) - : Bitmap(w, h, 1) { - } - - const unsigned char *GetData() const { return data; } - - unsigned char *GetData() { return data; } -}; - -} diff --git a/3rdparty/bgfx/3rdparty/pvrtc/BitScale.cpp b/3rdparty/bgfx/3rdparty/pvrtc/BitScale.cpp deleted file mode 100644 index 3e74193..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/BitScale.cpp +++ /dev/null @@ -1,183 +0,0 @@ -#include "BitScale.h" - -const uint8_t Javelin::Data::BITSCALE_5_TO_8[32] = { - 0, 8, 16, 24, 32, 41, 49, 57, 65, 74, - 82, 90, 98, 106, 115, 123, 131, 139, 148, 156, - 164, 172, 180, 189, 197, 205, 213, 222, 230, 238, - 246, 255}; - -const uint8_t Javelin::Data::BITSCALE_4_TO_8[16] = { - 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, - 170, 187, 204, 221, 238, 255}; - -const uint8_t Javelin::Data::BITSCALE_3_TO_8[8] = { - 0, 36, 72, 109, 145, 182, 218, 255}; - -const uint8_t Javelin::Data::BITSCALE_8_TO_5_FLOOR[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, - 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, - 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, - 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, - 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, - 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, - 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, - 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, - 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, - 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, - 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, - 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, - 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, - 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, - 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, - 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, - 30, 30, 30, 30, 30, 31}; - -const uint8_t Javelin::Data::BITSCALE_8_TO_4_FLOOR[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 15}; - -const uint8_t Javelin::Data::BITSCALE_8_TO_3_FLOOR[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 7}; - -const uint8_t Javelin::Data::BITSCALE_8_TO_5_CEIL[256] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, - 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, - 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, - 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, - 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, - 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, - 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, - 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, - 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, - 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, - 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, - 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, - 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, - 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, - 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, - 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, - 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, - 28, 29, 29, 29, 29, 29, 29, 29, 29, 30, - 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, - 31, 31, 31, 31, 31, 31}; - -const uint8_t Javelin::Data::BITSCALE_8_TO_4_CEIL[256] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15}; - -const uint8_t Javelin::Data::BITSCALE_8_TO_3_CEIL[256] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7}; - diff --git a/3rdparty/bgfx/3rdparty/pvrtc/BitScale.h b/3rdparty/bgfx/3rdparty/pvrtc/BitScale.h deleted file mode 100644 index b600fe9..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/BitScale.h +++ /dev/null @@ -1,28 +0,0 @@ -//============================================================================ - -#pragma once - -#include - -//============================================================================ - -namespace Javelin -{ - namespace Data - { -//============================================================================ - - extern const uint8_t BITSCALE_5_TO_8[32]; - extern const uint8_t BITSCALE_4_TO_8[16]; - extern const uint8_t BITSCALE_3_TO_8[8]; - extern const uint8_t BITSCALE_8_TO_5_FLOOR[256]; - extern const uint8_t BITSCALE_8_TO_4_FLOOR[256]; - extern const uint8_t BITSCALE_8_TO_3_FLOOR[256]; - extern const uint8_t BITSCALE_8_TO_5_CEIL[256]; - extern const uint8_t BITSCALE_8_TO_4_CEIL[256]; - extern const uint8_t BITSCALE_8_TO_3_CEIL[256]; - -//============================================================================ - } // namespace Data -} // namespace Javelin -//============================================================================ diff --git a/3rdparty/bgfx/3rdparty/pvrtc/BitUtility.h b/3rdparty/bgfx/3rdparty/pvrtc/BitUtility.h deleted file mode 100644 index 588ff3e..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/BitUtility.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -namespace Javelin { - -class BitUtility { -public: - static bool IsPowerOf2(unsigned int x) { - return (x & (x - 1)) == 0; - } - - static unsigned int RotateRight(unsigned int value, unsigned int shift) { - if ((shift &= sizeof(value) * 8 - 1) == 0) { - return value; - } - return (value >> shift) | (value << (sizeof(value) * 8 - shift)); - } -}; - -} diff --git a/3rdparty/bgfx/3rdparty/pvrtc/Bitmap.h b/3rdparty/bgfx/3rdparty/pvrtc/Bitmap.h deleted file mode 100644 index 409ef1e..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/Bitmap.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -#include "Point2.h" - -namespace Javelin { - -class Bitmap { -public: - int width; - int height; - unsigned char *data; - - Bitmap() {} - - Bitmap(int w, int h, int bytesPerPixel) - : width(w) - , height(h) - , data(new unsigned char[width * height * bytesPerPixel]) { - } - - virtual ~Bitmap() { - delete [] data; - } - - Point2 GetSize() const { return Point2(width, height); } - - int GetArea() const { return width * height; } - - int GetBitmapWidth() const { return width; } - - int GetBitmapHeight() const { return height; } - - const unsigned char *GetRawData() const { return data; } -}; - -} diff --git a/3rdparty/bgfx/3rdparty/pvrtc/ColorRgba.h b/3rdparty/bgfx/3rdparty/pvrtc/ColorRgba.h deleted file mode 100644 index e3ec6aa..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/ColorRgba.h +++ /dev/null @@ -1,152 +0,0 @@ -#pragma once - -namespace Javelin { - -template -class ColorRgb { -public: - T r; - T g; - T b; - - - ColorRgb() - : r(0) - , g(0) - , b(0) { - } - - ColorRgb(T red, T green, T blue) - : r(red) - , g(green) - , b(blue) { - } - - ColorRgb(const ColorRgb &x) - : r(x.r) - , g(x.g) - , b(x.b) { - } - - ColorRgb operator *(int x) { - return ColorRgb(r * x, g * x, b * x); - } - - ColorRgb operator +(const ColorRgb &x) const { - return ColorRgb(r + (int)x.r, g + (int)x.g, b + (int)x.b); - } - - ColorRgb operator -(const ColorRgb &x) const { - return ColorRgb(r - (int)x.r, g - (int)x.g, b - (int)x.b); - } - - int operator %(const ColorRgb &x) const { - return r * (int)x.r + g * (int)x.g + b * (int)x.b; - } - - bool operator ==(const ColorRgb &x) const { - return r == x.r && g == x.g && b == x.b; - } - - bool operator !=(const ColorRgb &x) const { - return r != x.r || g != x.g || b != x.b; - } - - void SetMin(const ColorRgb &x) { - if (x.r < r) { - r = x.r; - } - if (x.g < g) { - g = x.g; - } - if (x.b < b) { - b = x.b; - } - } - - void SetMax(const ColorRgb &x) { - if (x.r > r) { - r = x.r; - } - if (x.g > g) { - g = x.g; - } - if (x.b > b) { - b = x.b; - } - } -}; - -template -class ColorRgba : public ColorRgb { -public: - T a; - - ColorRgba() : - a(0) { - } - - ColorRgba(T red, T green, T blue, T alpha) - : ColorRgb(red, green, blue) - , a(alpha) { - } - - ColorRgba(const ColorRgba &x) - : ColorRgb(x.r, x.g, x.b) - , a(x.a) { - } - - ColorRgba operator *(int x) { - return ColorRgba(ColorRgb::r * x, - ColorRgb::g * x, - ColorRgb::b * x, - a * x); - } - - ColorRgba operator +(const ColorRgba &x) { - return ColorRgba(ColorRgb::r + (int)x.r, - ColorRgb::g + (int)x.g, - ColorRgb::b + (int)x.b, - a + (int)x.a); - } - - ColorRgba operator -(const ColorRgba &x) { - return ColorRgba(ColorRgb::r - (int)x.r, - ColorRgb::g - (int)x.g, - ColorRgb::b - (int)x.b, - a - (int)x.a); - } - - int operator %(const ColorRgba &x) { - return ColorRgb::r * (int)x.r + - ColorRgb::g * (int)x.g + - ColorRgb::b * (int)x.b + - a * (int)x.a; - } - - bool operator ==(const ColorRgba &x) { - return ColorRgb::r == x.r && ColorRgb::g == x.g && - ColorRgb::b == x.b && a == x.a; - } - - bool operator !=(const ColorRgba &x) { - return ColorRgb::r != x.r || ColorRgb::g != x.g || - ColorRgb::b != x.b || a != x.a; - } - - void SetMin(const ColorRgba &x) { - ColorRgb::SetMin(x); - if (x.a < a) { - a = x.a; - } - } - - void SetMax(const ColorRgba &x) { - ColorRgb::SetMax(x); - if (x.a > a) { - a = x.a; - } - } -}; - -} diff --git a/3rdparty/bgfx/3rdparty/pvrtc/Interval.h b/3rdparty/bgfx/3rdparty/pvrtc/Interval.h deleted file mode 100644 index a7252e8..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/Interval.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -namespace Javelin { - -template -class Interval { -public: - T min; - T max; - - Interval() { - } - - Interval &operator|=(const T &x) { - min.SetMin(x); - max.SetMax(x); - return *this; - } -}; - -} diff --git a/3rdparty/bgfx/3rdparty/pvrtc/LICENSE.TXT b/3rdparty/bgfx/3rdparty/pvrtc/LICENSE.TXT deleted file mode 100644 index 974fc09..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/LICENSE.TXT +++ /dev/null @@ -1,25 +0,0 @@ -Copyright © 2014, Jeffrey Lim. All Rights Reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/3rdparty/bgfx/3rdparty/pvrtc/MortonTable.cpp b/3rdparty/bgfx/3rdparty/pvrtc/MortonTable.cpp deleted file mode 100644 index 29a5af6..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/MortonTable.cpp +++ /dev/null @@ -1,43 +0,0 @@ -//============================================================================ - -#include "MortonTable.h" - -//============================================================================ - -const unsigned short Javelin::Data::MORTON_TABLE[256] = -{ - 0x0000, 0x0001, 0x0004, 0x0005, 0x0010, 0x0011, 0x0014, 0x0015, - 0x0040, 0x0041, 0x0044, 0x0045, 0x0050, 0x0051, 0x0054, 0x0055, - 0x0100, 0x0101, 0x0104, 0x0105, 0x0110, 0x0111, 0x0114, 0x0115, - 0x0140, 0x0141, 0x0144, 0x0145, 0x0150, 0x0151, 0x0154, 0x0155, - 0x0400, 0x0401, 0x0404, 0x0405, 0x0410, 0x0411, 0x0414, 0x0415, - 0x0440, 0x0441, 0x0444, 0x0445, 0x0450, 0x0451, 0x0454, 0x0455, - 0x0500, 0x0501, 0x0504, 0x0505, 0x0510, 0x0511, 0x0514, 0x0515, - 0x0540, 0x0541, 0x0544, 0x0545, 0x0550, 0x0551, 0x0554, 0x0555, - 0x1000, 0x1001, 0x1004, 0x1005, 0x1010, 0x1011, 0x1014, 0x1015, - 0x1040, 0x1041, 0x1044, 0x1045, 0x1050, 0x1051, 0x1054, 0x1055, - 0x1100, 0x1101, 0x1104, 0x1105, 0x1110, 0x1111, 0x1114, 0x1115, - 0x1140, 0x1141, 0x1144, 0x1145, 0x1150, 0x1151, 0x1154, 0x1155, - 0x1400, 0x1401, 0x1404, 0x1405, 0x1410, 0x1411, 0x1414, 0x1415, - 0x1440, 0x1441, 0x1444, 0x1445, 0x1450, 0x1451, 0x1454, 0x1455, - 0x1500, 0x1501, 0x1504, 0x1505, 0x1510, 0x1511, 0x1514, 0x1515, - 0x1540, 0x1541, 0x1544, 0x1545, 0x1550, 0x1551, 0x1554, 0x1555, - 0x4000, 0x4001, 0x4004, 0x4005, 0x4010, 0x4011, 0x4014, 0x4015, - 0x4040, 0x4041, 0x4044, 0x4045, 0x4050, 0x4051, 0x4054, 0x4055, - 0x4100, 0x4101, 0x4104, 0x4105, 0x4110, 0x4111, 0x4114, 0x4115, - 0x4140, 0x4141, 0x4144, 0x4145, 0x4150, 0x4151, 0x4154, 0x4155, - 0x4400, 0x4401, 0x4404, 0x4405, 0x4410, 0x4411, 0x4414, 0x4415, - 0x4440, 0x4441, 0x4444, 0x4445, 0x4450, 0x4451, 0x4454, 0x4455, - 0x4500, 0x4501, 0x4504, 0x4505, 0x4510, 0x4511, 0x4514, 0x4515, - 0x4540, 0x4541, 0x4544, 0x4545, 0x4550, 0x4551, 0x4554, 0x4555, - 0x5000, 0x5001, 0x5004, 0x5005, 0x5010, 0x5011, 0x5014, 0x5015, - 0x5040, 0x5041, 0x5044, 0x5045, 0x5050, 0x5051, 0x5054, 0x5055, - 0x5100, 0x5101, 0x5104, 0x5105, 0x5110, 0x5111, 0x5114, 0x5115, - 0x5140, 0x5141, 0x5144, 0x5145, 0x5150, 0x5151, 0x5154, 0x5155, - 0x5400, 0x5401, 0x5404, 0x5405, 0x5410, 0x5411, 0x5414, 0x5415, - 0x5440, 0x5441, 0x5444, 0x5445, 0x5450, 0x5451, 0x5454, 0x5455, - 0x5500, 0x5501, 0x5504, 0x5505, 0x5510, 0x5511, 0x5514, 0x5515, - 0x5540, 0x5541, 0x5544, 0x5545, 0x5550, 0x5551, 0x5554, 0x5555 -}; - -//============================================================================ diff --git a/3rdparty/bgfx/3rdparty/pvrtc/MortonTable.h b/3rdparty/bgfx/3rdparty/pvrtc/MortonTable.h deleted file mode 100644 index 7a27e59..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/MortonTable.h +++ /dev/null @@ -1,18 +0,0 @@ -//============================================================================ - -#pragma once - -//============================================================================ - -namespace Javelin -{ - namespace Data - { -//============================================================================ - - extern const unsigned short MORTON_TABLE[256]; - -//============================================================================ - } // namespace Data -} // namespace Javelin -//============================================================================ diff --git a/3rdparty/bgfx/3rdparty/pvrtc/Point2.h b/3rdparty/bgfx/3rdparty/pvrtc/Point2.h deleted file mode 100644 index 89fa4b6..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/Point2.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -namespace Javelin { - -template -class Point2 { -public: - T x; - T y; - - Point2(int a, int b) - : x(a) - , y(b) { - } -}; - -} diff --git a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcDecoder.cpp b/3rdparty/bgfx/3rdparty/pvrtc/PvrTcDecoder.cpp deleted file mode 100644 index d8a36b3..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcDecoder.cpp +++ /dev/null @@ -1,144 +0,0 @@ -//============================================================================ - -#include "PvrTcDecoder.h" -#include "PvrTcPacket.h" - -#include "MortonTable.h" -#include - -//============================================================================ - -using namespace Javelin; -using Data::MORTON_TABLE; - -//============================================================================ - -inline unsigned PvrTcDecoder::GetMortonNumber(int x, int y) -{ - return MORTON_TABLE[x >> 8] << 17 | MORTON_TABLE[y >> 8] << 16 | MORTON_TABLE[x & 0xFF] << 1 | MORTON_TABLE[y & 0xFF]; -} - -//============================================================================ - -void PvrTcDecoder::DecodeRgb4Bpp(ColorRgb* result, const Point2& size, const void* data) -{ - assert(size.x == size.y); - - const int blocks = size.x / 4; - const int blockMask = blocks-1; - const PvrTcPacket* packets = static_cast(data); - - for(int y = 0; y < blocks; ++y) - { - for(int x = 0; x < blocks; ++x) - { - const PvrTcPacket* packet = packets + GetMortonNumber(x, y); - - unsigned mod = packet->modulationData; - const unsigned char (*weights)[4] = PvrTcPacket::WEIGHTS + 4*packet->usePunchthroughAlpha; - const unsigned char (*factor)[4] = PvrTcPacket::BILINEAR_FACTORS; - - for(int py = 0; py < 4; ++py) - { - const int yOffset = (py < 2) ? -1 : 0; - const int y0 = (y + yOffset) & blockMask; - const int y1 = (y0+1) & blockMask; - - for(int px = 0; px < 4; ++px) - { - const int xOffset = (px < 2) ? -1 : 0; - const int x0 = (x + xOffset) & blockMask; - const int x1 = (x0+1) & blockMask; - - const PvrTcPacket* p0 = packets + GetMortonNumber(x0, y0); - const PvrTcPacket* p1 = packets + GetMortonNumber(x1, y0); - const PvrTcPacket* p2 = packets + GetMortonNumber(x0, y1); - const PvrTcPacket* p3 = packets + GetMortonNumber(x1, y1); - - ColorRgb ca = p0->GetColorRgbA() * (*factor)[0] + - p1->GetColorRgbA() * (*factor)[1] + - p2->GetColorRgbA() * (*factor)[2] + - p3->GetColorRgbA() * (*factor)[3]; - - ColorRgb cb = p0->GetColorRgbB() * (*factor)[0] + - p1->GetColorRgbB() * (*factor)[1] + - p2->GetColorRgbB() * (*factor)[2] + - p3->GetColorRgbB() * (*factor)[3]; - - const unsigned char* w = weights[mod&3]; - ColorRgb c; - c.r = (ca.r * w[0] + cb.r * w[1]) >> 7; - c.g = (ca.g * w[0] + cb.g * w[1]) >> 7; - c.b = (ca.b * w[0] + cb.b * w[1]) >> 7; - - result[(py+y*4)*size.x + (px+x*4)] = c; - mod >>= 2; - factor++; - } - } - } - } -} - -void PvrTcDecoder::DecodeRgba4Bpp(ColorRgba* result, const Point2& size, const void* data) -{ - assert(size.x == size.y); - - const int blocks = size.x / 4; - const int blockMask = blocks-1; - const PvrTcPacket* packets = static_cast(data); - - for(int y = 0; y < blocks; ++y) - { - for(int x = 0; x < blocks; ++x) - { - const PvrTcPacket* packet = packets + GetMortonNumber(x, y); - - unsigned mod = packet->modulationData; - const unsigned char (*weights)[4] = PvrTcPacket::WEIGHTS + 4*packet->usePunchthroughAlpha; - const unsigned char (*factor)[4] = PvrTcPacket::BILINEAR_FACTORS; - - for(int py = 0; py < 4; ++py) - { - const int yOffset = (py < 2) ? -1 : 0; - const int y0 = (y + yOffset) & blockMask; - const int y1 = (y0+1) & blockMask; - - for(int px = 0; px < 4; ++px) - { - const int xOffset = (px < 2) ? -1 : 0; - const int x0 = (x + xOffset) & blockMask; - const int x1 = (x0+1) & blockMask; - - const PvrTcPacket* p0 = packets + GetMortonNumber(x0, y0); - const PvrTcPacket* p1 = packets + GetMortonNumber(x1, y0); - const PvrTcPacket* p2 = packets + GetMortonNumber(x0, y1); - const PvrTcPacket* p3 = packets + GetMortonNumber(x1, y1); - - ColorRgba ca = p0->GetColorRgbaA() * (*factor)[0] + - p1->GetColorRgbaA() * (*factor)[1] + - p2->GetColorRgbaA() * (*factor)[2] + - p3->GetColorRgbaA() * (*factor)[3]; - - ColorRgba cb = p0->GetColorRgbaB() * (*factor)[0] + - p1->GetColorRgbaB() * (*factor)[1] + - p2->GetColorRgbaB() * (*factor)[2] + - p3->GetColorRgbaB() * (*factor)[3]; - - const unsigned char* w = weights[mod&3]; - ColorRgba c; - c.r = (ca.r * w[0] + cb.r * w[1]) >> 7; - c.g = (ca.g * w[0] + cb.g * w[1]) >> 7; - c.b = (ca.b * w[0] + cb.b * w[1]) >> 7; - c.a = (ca.a * w[2] + cb.a * w[3]) >> 7; - - result[(py+y*4)*size.x + (px+x*4)] = c; - mod >>= 2; - factor++; - } - } - } - } -} - -//============================================================================ diff --git a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcDecoder.h b/3rdparty/bgfx/3rdparty/pvrtc/PvrTcDecoder.h deleted file mode 100644 index 1b6fcf9..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcDecoder.h +++ /dev/null @@ -1,25 +0,0 @@ -//============================================================================ - -#pragma once -#include "Point2.h" -#include "ColorRgba.h" - -//============================================================================ - -namespace Javelin -{ -//============================================================================ - - class PvrTcDecoder - { - public: - static void DecodeRgb4Bpp(ColorRgb* result, const Point2& size, const void* data); - static void DecodeRgba4Bpp(ColorRgba* result, const Point2& size, const void* data); - - private: - static unsigned GetMortonNumber(int x, int y); - }; - -//============================================================================ -} -//============================================================================ diff --git a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcEncoder.cpp b/3rdparty/bgfx/3rdparty/pvrtc/PvrTcEncoder.cpp deleted file mode 100644 index 56cc8e0..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcEncoder.cpp +++ /dev/null @@ -1,464 +0,0 @@ -//============================================================================ - -#include "PvrTcEncoder.h" -#include "AlphaBitmap.h" -#include "PvrTcPacket.h" -#include "RgbBitmap.h" -#include "RgbaBitmap.h" -#include "MortonTable.h" -#include "BitUtility.h" -#include "Interval.h" -#include -#include -#include - -//============================================================================ - -using namespace Javelin; -using Data::MORTON_TABLE; - -//============================================================================ - -static const unsigned char MODULATION_LUT[16] = -{ - 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3 -}; - -//============================================================================ - -inline unsigned PvrTcEncoder::GetMortonNumber(int x, int y) -{ - return MORTON_TABLE[x >> 8] << 17 | MORTON_TABLE[y >> 8] << 16 | MORTON_TABLE[x & 0xFF] << 1 | MORTON_TABLE[y & 0xFF]; -} - -//============================================================================ - -void PvrTcEncoder::EncodeAlpha2Bpp(void* result, const AlphaBitmap& bitmap) -{ - int size = bitmap.GetBitmapWidth(); - assert(size == bitmap.GetBitmapHeight()); - assert(BitUtility::IsPowerOf2(size)); - - // Blocks in each dimension. - int xBlocks = size/8; - int yBlocks = size/4; - - const unsigned char* bitmapData = bitmap.GetRawData(); - - PvrTcPacket* packets = static_cast(result); - for(int y = 0; y < yBlocks; ++y) - { - for(int x = 0; x < xBlocks; ++x) - { - PvrTcPacket* packet = packets + GetMortonNumber(x, y); - packet->usePunchthroughAlpha = 0; - packet->colorAIsOpaque = 0; - packet->colorA = 0x7ff; // White, with 0 alpha - packet->colorBIsOpaque = 1; - packet->colorB = 0x7fff; // White with full alpha - - const unsigned char* blockBitmapData = &bitmapData[y*4*size + x*8]; - - uint32_t modulationData = 0; - for(int py = 0; py < 4; ++py) - { - const unsigned char* rowBitmapData = blockBitmapData; - for(int px = 0; px < 8; ++px) - { - unsigned char pixel = *rowBitmapData++; - modulationData = BitUtility::RotateRight(modulationData | (pixel >> 7), 1); - } - blockBitmapData += size; - } - packet->modulationData = modulationData; - } - } -} - -void PvrTcEncoder::EncodeAlpha4Bpp(void* result, const AlphaBitmap& bitmap) -{ - int size = bitmap.GetBitmapWidth(); - assert(size == bitmap.GetBitmapHeight()); - assert(BitUtility::IsPowerOf2(size)); - - // Blocks in each dimension. - int blocks = size/4; - - const unsigned char* bitmapData = bitmap.GetRawData(); - - PvrTcPacket* packets = static_cast(result); - for(int y = 0; y < blocks; ++y) - { - for(int x = 0; x < blocks; ++x) - { - PvrTcPacket* packet = packets + GetMortonNumber(x, y); - packet->usePunchthroughAlpha = 0; - packet->colorAIsOpaque = 0; - packet->colorA = 0x7ff; // White, with 0 alpha - packet->colorBIsOpaque = 1; - packet->colorB = 0x7fff; // White with full alpha - - const unsigned char* blockBitmapData = &bitmapData[(y*size + x)*4]; - - uint32_t modulationData = 0; - for(int py = 0; py < 4; ++py) - { - const unsigned char* rowBitmapData = blockBitmapData; - for(int px = 0; px < 4; ++px) - { - unsigned char pixel = *rowBitmapData++; - modulationData = BitUtility::RotateRight(modulationData | MODULATION_LUT[pixel>>4], 2); - } - blockBitmapData += size; - } - packet->modulationData = modulationData; - } - } -} - -//============================================================================ - -typedef Interval > ColorRgbBoundingBox; - -static void CalculateBoundingBox(ColorRgbBoundingBox& cbb, const RgbBitmap& bitmap, int blockX, int blockY) -{ - int size = bitmap.GetBitmapWidth(); - const ColorRgb* data = bitmap.GetData() + blockY * 4 * size + blockX * 4; - - cbb.min = data[0]; - cbb.max = data[0]; - cbb |= data[1]; - cbb |= data[2]; - cbb |= data[3]; - - cbb |= data[size]; - cbb |= data[size+1]; - cbb |= data[size+2]; - cbb |= data[size+3]; - - cbb |= data[2*size]; - cbb |= data[2*size+1]; - cbb |= data[2*size+2]; - cbb |= data[2*size+3]; - - cbb |= data[3*size]; - cbb |= data[3*size+1]; - cbb |= data[3*size+2]; - cbb |= data[3*size+3]; -} - -void PvrTcEncoder::EncodeRgb4Bpp(void* result, const RgbBitmap& bitmap) -{ - assert(bitmap.GetBitmapWidth() == bitmap.GetBitmapHeight()); - assert(BitUtility::IsPowerOf2(bitmap.GetBitmapWidth())); - const int size = bitmap.GetBitmapWidth(); - const int blocks = size / 4; - const int blockMask = blocks-1; - - PvrTcPacket* packets = static_cast(result); - - for(int y = 0; y < blocks; ++y) - { - for(int x = 0; x < blocks; ++x) - { - ColorRgbBoundingBox cbb; - CalculateBoundingBox(cbb, bitmap, x, y); - PvrTcPacket* packet = packets + GetMortonNumber(x, y); - packet->usePunchthroughAlpha = 0; - packet->SetColorA(cbb.min); - packet->SetColorB(cbb.max); - } - } - - for(int y = 0; y < blocks; ++y) - { - for(int x = 0; x < blocks; ++x) - { - const unsigned char (*factor)[4] = PvrTcPacket::BILINEAR_FACTORS; - const ColorRgb* data = bitmap.GetData() + y * 4 * size + x * 4; - - uint32_t modulationData = 0; - - for(int py = 0; py < 4; ++py) - { - const int yOffset = (py < 2) ? -1 : 0; - const int y0 = (y + yOffset) & blockMask; - const int y1 = (y0+1) & blockMask; - - for(int px = 0; px < 4; ++px) - { - const int xOffset = (px < 2) ? -1 : 0; - const int x0 = (x + xOffset) & blockMask; - const int x1 = (x0+1) & blockMask; - - const PvrTcPacket* p0 = packets + GetMortonNumber(x0, y0); - const PvrTcPacket* p1 = packets + GetMortonNumber(x1, y0); - const PvrTcPacket* p2 = packets + GetMortonNumber(x0, y1); - const PvrTcPacket* p3 = packets + GetMortonNumber(x1, y1); - - ColorRgb ca = p0->GetColorRgbA() * (*factor)[0] + - p1->GetColorRgbA() * (*factor)[1] + - p2->GetColorRgbA() * (*factor)[2] + - p3->GetColorRgbA() * (*factor)[3]; - - ColorRgb cb = p0->GetColorRgbB() * (*factor)[0] + - p1->GetColorRgbB() * (*factor)[1] + - p2->GetColorRgbB() * (*factor)[2] + - p3->GetColorRgbB() * (*factor)[3]; - - const ColorRgb& pixel = data[py*size + px]; - ColorRgb d = cb - ca; - ColorRgb p(pixel.r*16, pixel.g*16, pixel.b*16); - ColorRgb v = p - ca; - - // PVRTC uses weightings of 0, 3/8, 5/8 and 1 - // The boundaries for these are 3/16, 1/2 (=8/16), 13/16 - int projection = (v % d) * 16; - int lengthSquared = d % d; - if(projection > 3*lengthSquared) modulationData++; - if(projection > 8*lengthSquared) modulationData++; - if(projection > 13*lengthSquared) modulationData++; - - modulationData = BitUtility::RotateRight(modulationData, 2); - - factor++; - } - } - - PvrTcPacket* packet = packets + GetMortonNumber(x, y); - packet->modulationData = modulationData; - } - } -} - -//============================================================================ - -static void CalculateBoundingBox(ColorRgbBoundingBox& cbb, const RgbaBitmap& bitmap, int blockX, int blockY) -{ - int size = bitmap.GetBitmapWidth(); - const ColorRgba* data = bitmap.GetData() + blockY * 4 * size + blockX * 4; - - cbb.min = data[0]; - cbb.max = data[0]; - - cbb |= data[1]; - cbb |= data[2]; - cbb |= data[3]; - - cbb |= data[size]; - cbb |= data[size+1]; - cbb |= data[size+2]; - cbb |= data[size+3]; - - cbb |= data[2*size]; - cbb |= data[2*size+1]; - cbb |= data[2*size+2]; - cbb |= data[2*size+3]; - - cbb |= data[3*size]; - cbb |= data[3*size+1]; - cbb |= data[3*size+2]; - cbb |= data[3*size+3]; -} - -void PvrTcEncoder::EncodeRgb4Bpp(void* result, const RgbaBitmap& bitmap) -{ - assert(bitmap.GetBitmapWidth() == bitmap.GetBitmapHeight()); - assert(BitUtility::IsPowerOf2(bitmap.GetBitmapWidth())); - const int size = bitmap.GetBitmapWidth(); - const int blocks = size / 4; - const int blockMask = blocks-1; - - PvrTcPacket* packets = static_cast(result); - - for(int y = 0; y < blocks; ++y) - { - for(int x = 0; x < blocks; ++x) - { - ColorRgbBoundingBox cbb; - CalculateBoundingBox(cbb, bitmap, x, y); - PvrTcPacket* packet = packets + GetMortonNumber(x, y); - packet->usePunchthroughAlpha = 0; - packet->SetColorA(cbb.min); - packet->SetColorB(cbb.max); - } - } - - for(int y = 0; y < blocks; ++y) - { - for(int x = 0; x < blocks; ++x) - { - const unsigned char (*factor)[4] = PvrTcPacket::BILINEAR_FACTORS; - const ColorRgba* data = bitmap.GetData() + y * 4 * size + x * 4; - - uint32_t modulationData = 0; - - for(int py = 0; py < 4; ++py) - { - const int yOffset = (py < 2) ? -1 : 0; - const int y0 = (y + yOffset) & blockMask; - const int y1 = (y0+1) & blockMask; - - for(int px = 0; px < 4; ++px) - { - const int xOffset = (px < 2) ? -1 : 0; - const int x0 = (x + xOffset) & blockMask; - const int x1 = (x0+1) & blockMask; - - const PvrTcPacket* p0 = packets + GetMortonNumber(x0, y0); - const PvrTcPacket* p1 = packets + GetMortonNumber(x1, y0); - const PvrTcPacket* p2 = packets + GetMortonNumber(x0, y1); - const PvrTcPacket* p3 = packets + GetMortonNumber(x1, y1); - - ColorRgb ca = p0->GetColorRgbA() * (*factor)[0] + - p1->GetColorRgbA() * (*factor)[1] + - p2->GetColorRgbA() * (*factor)[2] + - p3->GetColorRgbA() * (*factor)[3]; - - ColorRgb cb = p0->GetColorRgbB() * (*factor)[0] + - p1->GetColorRgbB() * (*factor)[1] + - p2->GetColorRgbB() * (*factor)[2] + - p3->GetColorRgbB() * (*factor)[3]; - - const ColorRgb& pixel = data[py*size + px]; - ColorRgb d = cb - ca; - ColorRgb p(pixel.r*16, pixel.g*16, pixel.b*16); - ColorRgb v = p - ca; - - // PVRTC uses weightings of 0, 3/8, 5/8 and 1 - // The boundaries for these are 3/16, 1/2 (=8/16), 13/16 - int projection = (v % d) * 16; - int lengthSquared = d % d; - if(projection > 3*lengthSquared) modulationData++; - if(projection > 8*lengthSquared) modulationData++; - if(projection > 13*lengthSquared) modulationData++; - - modulationData = BitUtility::RotateRight(modulationData, 2); - - factor++; - } - } - - PvrTcPacket* packet = packets + GetMortonNumber(x, y); - packet->modulationData = modulationData; - } - } -} - -//============================================================================ - -typedef Interval > ColorRgbaBoundingBox; - -static void CalculateBoundingBox(ColorRgbaBoundingBox& cbb, const RgbaBitmap& bitmap, int blockX, int blockY) -{ - int size = bitmap.GetBitmapWidth(); - const ColorRgba* data = bitmap.GetData() + blockY * 4 * size + blockX * 4; - - cbb.min = data[0]; - cbb.max = data[0]; - - cbb |= data[1]; - cbb |= data[2]; - cbb |= data[3]; - - cbb |= data[size]; - cbb |= data[size+1]; - cbb |= data[size+2]; - cbb |= data[size+3]; - - cbb |= data[2*size]; - cbb |= data[2*size+1]; - cbb |= data[2*size+2]; - cbb |= data[2*size+3]; - - cbb |= data[3*size]; - cbb |= data[3*size+1]; - cbb |= data[3*size+2]; - cbb |= data[3*size+3]; -} - -void PvrTcEncoder::EncodeRgba4Bpp(void* result, const RgbaBitmap& bitmap) -{ - assert(bitmap.GetBitmapWidth() == bitmap.GetBitmapHeight()); - assert(BitUtility::IsPowerOf2(bitmap.GetBitmapWidth())); - const int size = bitmap.GetBitmapWidth(); - const int blocks = size / 4; - const int blockMask = blocks-1; - - PvrTcPacket* packets = static_cast(result); - - for(int y = 0; y < blocks; ++y) - { - for(int x = 0; x < blocks; ++x) - { - ColorRgbaBoundingBox cbb; - CalculateBoundingBox(cbb, bitmap, x, y); - PvrTcPacket* packet = packets + GetMortonNumber(x, y); - packet->usePunchthroughAlpha = 0; - packet->SetColorA(cbb.min); - packet->SetColorB(cbb.max); - } - } - - for(int y = 0; y < blocks; ++y) - { - for(int x = 0; x < blocks; ++x) - { - const unsigned char (*factor)[4] = PvrTcPacket::BILINEAR_FACTORS; - const ColorRgba* data = bitmap.GetData() + y * 4 * size + x * 4; - - uint32_t modulationData = 0; - - for(int py = 0; py < 4; ++py) - { - const int yOffset = (py < 2) ? -1 : 0; - const int y0 = (y + yOffset) & blockMask; - const int y1 = (y0+1) & blockMask; - - for(int px = 0; px < 4; ++px) - { - const int xOffset = (px < 2) ? -1 : 0; - const int x0 = (x + xOffset) & blockMask; - const int x1 = (x0+1) & blockMask; - - const PvrTcPacket* p0 = packets + GetMortonNumber(x0, y0); - const PvrTcPacket* p1 = packets + GetMortonNumber(x1, y0); - const PvrTcPacket* p2 = packets + GetMortonNumber(x0, y1); - const PvrTcPacket* p3 = packets + GetMortonNumber(x1, y1); - - ColorRgba ca = p0->GetColorRgbaA() * (*factor)[0] + - p1->GetColorRgbaA() * (*factor)[1] + - p2->GetColorRgbaA() * (*factor)[2] + - p3->GetColorRgbaA() * (*factor)[3]; - - ColorRgba cb = p0->GetColorRgbaB() * (*factor)[0] + - p1->GetColorRgbaB() * (*factor)[1] + - p2->GetColorRgbaB() * (*factor)[2] + - p3->GetColorRgbaB() * (*factor)[3]; - - const ColorRgba& pixel = data[py*size + px]; - ColorRgba d = cb - ca; - ColorRgba p(pixel.r*16, pixel.g*16, pixel.b*16, pixel.a*16); - ColorRgba v = p - ca; - - // PVRTC uses weightings of 0, 3/8, 5/8 and 1 - // The boundaries for these are 3/16, 1/2 (=8/16), 13/16 - int projection = (v % d) * 16; - int lengthSquared = d % d; - if(projection > 3*lengthSquared) modulationData++; - if(projection > 8*lengthSquared) modulationData++; - if(projection > 13*lengthSquared) modulationData++; - - modulationData = BitUtility::RotateRight(modulationData, 2); - - factor++; - } - } - - PvrTcPacket* packet = packets + GetMortonNumber(x, y); - packet->modulationData = modulationData; - } - } -} - -//============================================================================ diff --git a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcEncoder.h b/3rdparty/bgfx/3rdparty/pvrtc/PvrTcEncoder.h deleted file mode 100644 index fd24484..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcEncoder.h +++ /dev/null @@ -1,43 +0,0 @@ -//============================================================================ - -#pragma once -#include "ColorRgba.h" -#include "AlphaBitmap.h" -#include "RgbBitmap.h" -#include "RgbaBitmap.h" - -//============================================================================ - -namespace Javelin -{ -//============================================================================ - - class AlphaBitmap; - class RgbBitmap; - class RgbaBitmap; - - class PvrTcEncoder - { - public: - // Result must be large enough for bitmap.GetArea()/4 bytes - static void EncodeAlpha2Bpp(void* result, const AlphaBitmap& bitmap); - - // Result must be large enough for bitmap.GetArea()/2 bytes - static void EncodeAlpha4Bpp(void* result, const AlphaBitmap& bitmap); - - // Result must be large enough for bitmap.GetArea()/2 bytes - static void EncodeRgb4Bpp(void* result, const RgbBitmap& bitmap); - - // Result must be large enough for bitmap.GetArea()/2 bytes - static void EncodeRgb4Bpp(void* result, const RgbaBitmap& bitmap); - - // Result must be large enough for bitmap.GetArea()/2 bytes - static void EncodeRgba4Bpp(void* result, const RgbaBitmap& bitmap); - - private: - static unsigned GetMortonNumber(int x, int y); - }; - -//============================================================================ -} -//============================================================================ diff --git a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcPacket.cpp b/3rdparty/bgfx/3rdparty/pvrtc/PvrTcPacket.cpp deleted file mode 100644 index 2e40d37..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcPacket.cpp +++ /dev/null @@ -1,209 +0,0 @@ -//============================================================================ - -#include "PvrTcPacket.h" -#include "BitScale.h" - -//============================================================================ - -using namespace Javelin; - -//============================================================================ - -const unsigned char PvrTcPacket::BILINEAR_FACTORS[16][4] = -{ - { 4, 4, 4, 4 }, - { 2, 6, 2, 6 }, - { 8, 0, 8, 0 }, - { 6, 2, 6, 2 }, - - { 2, 2, 6, 6 }, - { 1, 3, 3, 9 }, - { 4, 0, 12, 0 }, - { 3, 1, 9, 3 }, - - { 8, 8, 0, 0 }, - { 4, 12, 0, 0 }, - { 16, 0, 0, 0 }, - { 12, 4, 0, 0 }, - - { 6, 6, 2, 2 }, - { 3, 9, 1, 3 }, - { 12, 0, 4, 0 }, - { 9, 3, 3, 1 }, -}; - -// Weights are { colorA, colorB, alphaA, alphaB } -const unsigned char PvrTcPacket::WEIGHTS[8][4] = -{ - // Weights for Mode=0 - { 8, 0, 8, 0 }, - { 5, 3, 5, 3 }, - { 3, 5, 3, 5 }, - { 0, 8, 0, 8 }, - - // Weights for Mode=1 - { 8, 0, 8, 0 }, - { 4, 4, 4, 4 }, - { 4, 4, 0, 0 }, - { 0, 8, 0, 8 }, -}; - -//============================================================================ - -ColorRgb PvrTcPacket::GetColorRgbA() const -{ - if(colorAIsOpaque) - { - unsigned char r = colorA >> 9; - unsigned char g = colorA >> 4 & 0x1f; - unsigned char b = colorA & 0xf; - return ColorRgb(Data::BITSCALE_5_TO_8[r], - Data::BITSCALE_5_TO_8[g], - Data::BITSCALE_4_TO_8[b]); - } - else - { - unsigned char r = (colorA >> 7) & 0xf; - unsigned char g = (colorA >> 3) & 0xf; - unsigned char b = colorA & 7; - return ColorRgb(Data::BITSCALE_4_TO_8[r], - Data::BITSCALE_4_TO_8[g], - Data::BITSCALE_3_TO_8[b]); - } -} - -ColorRgb PvrTcPacket::GetColorRgbB() const -{ - if(colorBIsOpaque) - { - unsigned char r = colorB >> 10; - unsigned char g = colorB >> 5 & 0x1f; - unsigned char b = colorB & 0x1f; - return ColorRgb(Data::BITSCALE_5_TO_8[r], - Data::BITSCALE_5_TO_8[g], - Data::BITSCALE_5_TO_8[b]); - } - else - { - unsigned char r = colorB >> 8 & 0xf; - unsigned char g = colorB >> 4 & 0xf; - unsigned char b = colorB & 0xf; - return ColorRgb(Data::BITSCALE_4_TO_8[r], - Data::BITSCALE_4_TO_8[g], - Data::BITSCALE_4_TO_8[b]); - } -} - -ColorRgba PvrTcPacket::GetColorRgbaA() const -{ - if(colorAIsOpaque) - { - unsigned char r = colorA >> 9; - unsigned char g = colorA >> 4 & 0x1f; - unsigned char b = colorA & 0xf; - return ColorRgba(Data::BITSCALE_5_TO_8[r], - Data::BITSCALE_5_TO_8[g], - Data::BITSCALE_4_TO_8[b], - 255); - } - else - { - unsigned char a = colorA >> 11 & 7; - unsigned char r = colorA >> 7 & 0xf; - unsigned char g = colorA >> 3 & 0xf; - unsigned char b = colorA & 7; - return ColorRgba(Data::BITSCALE_4_TO_8[r], - Data::BITSCALE_4_TO_8[g], - Data::BITSCALE_3_TO_8[b], - Data::BITSCALE_3_TO_8[a]); - } -} - -ColorRgba PvrTcPacket::GetColorRgbaB() const -{ - if(colorBIsOpaque) - { - unsigned char r = colorB >> 10; - unsigned char g = colorB >> 5 & 0x1f; - unsigned char b = colorB & 0x1f; - return ColorRgba(Data::BITSCALE_5_TO_8[r], - Data::BITSCALE_5_TO_8[g], - Data::BITSCALE_5_TO_8[b], - 255); - } - else - { - unsigned char a = colorB >> 12 & 7; - unsigned char r = colorB >> 8 & 0xf; - unsigned char g = colorB >> 4 & 0xf; - unsigned char b = colorB & 0xf; - return ColorRgba(Data::BITSCALE_4_TO_8[r], - Data::BITSCALE_4_TO_8[g], - Data::BITSCALE_4_TO_8[b], - Data::BITSCALE_3_TO_8[a]); - } -} - -//============================================================================ - -void PvrTcPacket::SetColorA(const ColorRgb& c) -{ - int r = Data::BITSCALE_8_TO_5_FLOOR[c.r]; - int g = Data::BITSCALE_8_TO_5_FLOOR[c.g]; - int b = Data::BITSCALE_8_TO_4_FLOOR[c.b]; - colorA = r<<9 | g<<4 | b; - colorAIsOpaque = true; -} - -void PvrTcPacket::SetColorB(const ColorRgb& c) -{ - int r = Data::BITSCALE_8_TO_5_CEIL[c.r]; - int g = Data::BITSCALE_8_TO_5_CEIL[c.g]; - int b = Data::BITSCALE_8_TO_5_CEIL[c.b]; - colorB = r<<10 | g<<5 | b; - colorBIsOpaque = true; -} - -void PvrTcPacket::SetColorA(const ColorRgba& c) -{ - int a = Data::BITSCALE_8_TO_3_FLOOR[c.a]; - if(a == 7) - { - int r = Data::BITSCALE_8_TO_5_FLOOR[c.r]; - int g = Data::BITSCALE_8_TO_5_FLOOR[c.g]; - int b = Data::BITSCALE_8_TO_4_FLOOR[c.b]; - colorA = r<<9 | g<<4 | b; - colorAIsOpaque = true; - } - else - { - int r = Data::BITSCALE_8_TO_4_FLOOR[c.r]; - int g = Data::BITSCALE_8_TO_4_FLOOR[c.g]; - int b = Data::BITSCALE_8_TO_3_FLOOR[c.b]; - colorA = a<<11 | r<<7 | g<<3 | b; - colorAIsOpaque = false; - } -} - -void PvrTcPacket::SetColorB(const ColorRgba& c) -{ - int a = Data::BITSCALE_8_TO_3_CEIL[c.a]; - if(a == 7) - { - int r = Data::BITSCALE_8_TO_5_CEIL[c.r]; - int g = Data::BITSCALE_8_TO_5_CEIL[c.g]; - int b = Data::BITSCALE_8_TO_5_CEIL[c.b]; - colorB = r<<10 | g<<5 | b; - colorBIsOpaque = true; - } - else - { - int r = Data::BITSCALE_8_TO_4_CEIL[c.r]; - int g = Data::BITSCALE_8_TO_4_CEIL[c.g]; - int b = Data::BITSCALE_8_TO_4_CEIL[c.b]; - colorB = a<<12 | r<<8 | g<<4 | b; - colorBIsOpaque = false; - } -} - -//============================================================================ diff --git a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcPacket.h b/3rdparty/bgfx/3rdparty/pvrtc/PvrTcPacket.h deleted file mode 100644 index ac3b6a4..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/PvrTcPacket.h +++ /dev/null @@ -1,65 +0,0 @@ -//============================================================================ -// -// Modulation data specifies weightings of colorA to colorB for each pixel -// -// For mode = 0 -// 00: 0/8 -// 01: 3/8 -// 10: 5/8 -// 11: 8/8 -// -// For mode = 1 -// 00: 0/8 -// 01: 4/8 -// 10: 4/8 with alpha punchthrough -// 11: 8/8 -// -// For colorIsOpaque=0 -// 3 bits A -// 4 bits R -// 4 bits G -// 3/4 bits B -// -// For colorIsOpaque=1 -// 5 bits R -// 5 bits G -// 4/5 bits B -// -//============================================================================ - -#pragma once -#include "ColorRgba.h" - -//============================================================================ - -namespace Javelin -{ -//============================================================================ - - struct PvrTcPacket - { - unsigned int modulationData; - unsigned usePunchthroughAlpha : 1; - unsigned colorA : 14; - unsigned colorAIsOpaque : 1; - unsigned colorB : 15; - unsigned colorBIsOpaque : 1; - - ColorRgb GetColorRgbA() const; - ColorRgb GetColorRgbB() const; - ColorRgba GetColorRgbaA() const; - ColorRgba GetColorRgbaB() const; - - void SetColorA(const ColorRgb& c); - void SetColorB(const ColorRgb& c); - - void SetColorA(const ColorRgba& c); - void SetColorB(const ColorRgba& c); - - static const unsigned char BILINEAR_FACTORS[16][4]; - static const unsigned char WEIGHTS[8][4]; - }; - -//============================================================================ -} // namespace Javelin -//============================================================================ diff --git a/3rdparty/bgfx/3rdparty/pvrtc/README.md b/3rdparty/bgfx/3rdparty/pvrtc/README.md deleted file mode 100644 index fb31a18..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/README.md +++ /dev/null @@ -1,17 +0,0 @@ -PvrTcCompressor -=============== - -This was an afternoon project to determine whether crude approximations could -produce reasonable results. - -~~This is *NOT* complete sourcecode. It includes enough code to show the details -of how the algorithm works.~~ - -~~If anyone decides to make this compile separately, send a pull request.~~ - -Thanks to Brendan Duncan for contributing a pull request to fill in all of the -classes and to build a simple test case. Specifically, he has contributed all of -the files that do NOT begin with PvrTc - -http://roartindon.blogspot.sg/2014/08/pvr-texture-compression-exploration.html - diff --git a/3rdparty/bgfx/3rdparty/pvrtc/RgbBitmap.h b/3rdparty/bgfx/3rdparty/pvrtc/RgbBitmap.h deleted file mode 100644 index 4f3c57b..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/RgbBitmap.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "Bitmap.h" -#include "ColorRgba.h" - -namespace Javelin { - -class RgbBitmap : public Bitmap { -public: - RgbBitmap() {} - - RgbBitmap(int w, int h) - : Bitmap(w, h, 3) { - } - - const ColorRgb *GetData() const { - return reinterpret_cast *>(data); - } - - ColorRgb *GetData() { - return reinterpret_cast *>(data); - } -}; - -} diff --git a/3rdparty/bgfx/3rdparty/pvrtc/RgbaBitmap.h b/3rdparty/bgfx/3rdparty/pvrtc/RgbaBitmap.h deleted file mode 100644 index ae43a77..0000000 --- a/3rdparty/bgfx/3rdparty/pvrtc/RgbaBitmap.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include "ColorRgba.h" - -namespace Javelin { - -class RgbaBitmap : public Bitmap { -public: - RgbaBitmap() {} - - RgbaBitmap(int w, int h) - : Bitmap(w, h, 4) { - } - - const ColorRgba *GetData() const { - return reinterpret_cast *>(data); - } - - ColorRgba *GetData() { - return reinterpret_cast *>(data); - } -}; - -} diff --git a/3rdparty/bgfx/3rdparty/remotery/LICENSE b/3rdparty/bgfx/3rdparty/remotery/LICENSE deleted file mode 100644 index 67db858..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c b/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c deleted file mode 100644 index 74b351f..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c +++ /dev/null @@ -1,6697 +0,0 @@ -// -// Copyright 2014-2017 Celtoys Ltd -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -/* -@Contents: - - @DEPS: External Dependencies - @TIMERS: Platform-specific timers - @TLS: Thread-Local Storage - @ATOMIC: Atomic Operations - @VMBUFFER: Mirror Buffer using Virtual Memory for auto-wrap - @NEW: New/Delete operators with error values for simplifying object create/destroy - @THREADS: Threads - @SAFEC: Safe C Library excerpts - @OBJALLOC: Reusable Object Allocator - @DYNBUF: Dynamic Buffer - @HASHTABLE: Integer pair hash map for inserts/finds. No removes for added simplicity. - @STRINGTABLE: Map from string hash to string offset in local buffer - @SOCKETS: Sockets TCP/IP Wrapper - @SHA1: SHA-1 Cryptographic Hash Function - @BASE64: Base-64 encoder - @MURMURHASH: Murmur-Hash 3 - @WEBSOCKETS: WebSockets - @MESSAGEQ: Multiple producer, single consumer message queue - @NETWORK: Network Server - @SAMPLE: Base Sample Description (CPU by default) - @SAMPLETREE: A tree of samples with their allocator - @TSAMPLER: Per-Thread Sampler - @REMOTERY: Remotery - @CUDA: CUDA event sampling - @D3D11: Direct3D 11 event sampling - @OPENGL: OpenGL event sampling - @METAL: Metal event sampling -*/ - -#define RMT_IMPL -#include "Remotery.h" - - -#ifdef RMT_PLATFORM_WINDOWS - #pragma comment(lib, "ws2_32.lib") -#endif - - -#if RMT_ENABLED - - -// Global settings -static rmtSettings g_Settings; -static rmtBool g_SettingsInitialized = RMT_FALSE; - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @DEPS: External Dependencies ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -// -// Required CRT dependencies -// -#if RMT_USE_TINYCRT - - #include - #include - #include - - #define CreateFileMapping CreateFileMappingA - -#else - - #ifdef RMT_PLATFORM_MACOS - #include - #include - #include - #include - #else - #include - #endif - - #include - - #ifdef RMT_PLATFORM_WINDOWS - #include - #ifndef __MINGW32__ - #include - #endif - #undef min - #undef max - #endif - - #ifdef RMT_PLATFORM_LINUX - #include - #include - #endif - - #if defined(RMT_PLATFORM_POSIX) - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #endif - - #ifdef __MINGW32__ - #include - #endif - -#endif - -#if 0 //def _MSC_VER - #define RMT_UNREFERENCED_PARAMETER(i) assert(i == 0 || i != 0); // To fool warning C4100 on warning level 4 -#else - #define RMT_UNREFERENCED_PARAMETER(i) (void)(1 ? (void)0 : ((void)i)) -#endif - - -#if RMT_USE_CUDA - #include -#endif - - - -rmtU8 minU8(rmtU8 a, rmtU8 b) -{ - return a < b ? a : b; -} -rmtS64 minS64(rmtS64 a, rmtS64 b) -{ - return a < b ? a : b; -} - - -rmtU8 maxU8(rmtU8 a, rmtU8 b) -{ - return a > b ? a : b; -} -rmtS64 maxS64(rmtS64 a, rmtS64 b) -{ - return a > b ? a : b; -} - - -// Memory management functions -static void* rmtMalloc( rmtU32 size ) -{ - return g_Settings.malloc( g_Settings.mm_context, size ); -} - -static void* rmtRealloc( void* ptr, rmtU32 size) -{ - return g_Settings.realloc( g_Settings.mm_context, ptr, size ); -} - -static void rmtFree( void* ptr ) -{ - g_Settings.free( g_Settings.mm_context, ptr ); -} - -#if RMT_USE_OPENGL -// DLL/Shared Library functions -static void* rmtLoadLibrary(const char* path) -{ - #if defined(RMT_PLATFORM_WINDOWS) - return (void*)LoadLibraryA(path); - #elif defined(RMT_PLATFORM_POSIX) - return dlopen(path, RTLD_LOCAL | RTLD_LAZY); - #else - return NULL; - #endif -} - -static void rmtFreeLibrary(void* handle) -{ - #if defined(RMT_PLATFORM_WINDOWS) - FreeLibrary((HMODULE)handle); - #elif defined(RMT_PLATFORM_POSIX) - dlclose(handle); - #endif -} - -static void* rmtGetProcAddress(void* handle, const char* symbol) -{ - #if defined(RMT_PLATFORM_WINDOWS) - #ifdef _MSC_VER - #pragma warning(push) - #pragma warning(disable:4152) // C4152: nonstandard extension, function/data pointer conversion in expression - #endif - return GetProcAddress((HMODULE)handle, (LPCSTR)symbol); - #ifdef _MSC_VER - #pragma warning(pop) - #endif - #elif defined(RMT_PLATFORM_POSIX) - return dlsym(handle, symbol); - #else - return NULL; - #endif -} -#endif - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @TIMERS: Platform-specific timers ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -// -// Get millisecond timer value that has only one guarantee: multiple calls are consistently comparable. -// On some platforms, even though this returns milliseconds, the timer may be far less accurate. -// -static rmtU32 msTimer_Get() -{ - #ifdef RMT_PLATFORM_WINDOWS - return (rmtU32)GetTickCount(); - #else - clock_t time = clock(); - rmtU32 msTime = (rmtU32) (time / (CLOCKS_PER_SEC / 1000)); - return msTime; - #endif -} - - -// -// Micro-second accuracy high performance counter -// -#ifndef RMT_PLATFORM_WINDOWS - typedef rmtU64 LARGE_INTEGER; -#endif -typedef struct -{ - LARGE_INTEGER counter_start; - double counter_scale; -} usTimer; - - -static void usTimer_Init(usTimer* timer) -{ - #if defined(RMT_PLATFORM_WINDOWS) - LARGE_INTEGER performance_frequency; - - assert(timer != NULL); - - // Calculate the scale from performance counter to microseconds - QueryPerformanceFrequency(&performance_frequency); - timer->counter_scale = 1000000.0 / performance_frequency.QuadPart; - - // Record the offset for each read of the counter - QueryPerformanceCounter(&timer->counter_start); - - #elif defined(RMT_PLATFORM_MACOS) - - mach_timebase_info_data_t nsScale; - mach_timebase_info( &nsScale ); - const double ns_per_us = 1.0e3; - timer->counter_scale = (double)(nsScale.numer) / ((double)nsScale.denom * ns_per_us); - - timer->counter_start = mach_absolute_time(); - - #elif defined(RMT_PLATFORM_LINUX) - - struct timespec tv; - clock_gettime(CLOCK_REALTIME, &tv); - timer->counter_start = (rmtU64)(tv.tv_sec * (rmtU64)1000000) + (rmtU64)(tv.tv_nsec * 0.001); - - #endif -} - - -static rmtU64 usTimer_Get(usTimer* timer) -{ - #if defined(RMT_PLATFORM_WINDOWS) - LARGE_INTEGER performance_count; - - assert(timer != NULL); - - // Read counter and convert to microseconds - QueryPerformanceCounter(&performance_count); - return (rmtU64)((performance_count.QuadPart - timer->counter_start.QuadPart) * timer->counter_scale); - - #elif defined(RMT_PLATFORM_MACOS) - - rmtU64 curr_time = mach_absolute_time(); - return (rmtU64)((curr_time - timer->counter_start) * timer->counter_scale); - - #elif defined(RMT_PLATFORM_LINUX) - - struct timespec tv; - clock_gettime(CLOCK_REALTIME, &tv); - return ((rmtU64)(tv.tv_sec * (rmtU64)1000000) + (rmtU64)(tv.tv_nsec * 0.001)) - timer->counter_start; - - #endif -} - - -static void msSleep(rmtU32 time_ms) -{ - #ifdef RMT_PLATFORM_WINDOWS - Sleep(time_ms); - #elif defined(RMT_PLATFORM_POSIX) - usleep(time_ms * 1000); - #endif -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @TLS: Thread-Local Storage ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -#define TLS_INVALID_HANDLE 0xFFFFFFFF - -#if defined(RMT_PLATFORM_WINDOWS) - typedef rmtU32 rmtTLS; -#else - typedef pthread_key_t rmtTLS; -#endif - -static rmtError tlsAlloc(rmtTLS* handle) -{ - assert(handle != NULL); - -#if defined(RMT_PLATFORM_WINDOWS) - - *handle = (rmtTLS)TlsAlloc(); - if (*handle == TLS_OUT_OF_INDEXES) - { - *handle = TLS_INVALID_HANDLE; - return RMT_ERROR_TLS_ALLOC_FAIL; - } - -#elif defined(RMT_PLATFORM_POSIX) - - if (pthread_key_create(handle, NULL) != 0) - { - *handle = TLS_INVALID_HANDLE; - return RMT_ERROR_TLS_ALLOC_FAIL; - } - -#endif - - return RMT_ERROR_NONE; -} - - -static void tlsFree(rmtTLS handle) -{ - assert(handle != TLS_INVALID_HANDLE); - -#if defined(RMT_PLATFORM_WINDOWS) - - TlsFree(handle); - -#elif defined(RMT_PLATFORM_POSIX) - - pthread_key_delete((pthread_key_t)handle); - -#endif -} - - -static void tlsSet(rmtTLS handle, void* value) -{ - assert(handle != TLS_INVALID_HANDLE); - -#if defined(RMT_PLATFORM_WINDOWS) - - TlsSetValue(handle, value); - -#elif defined(RMT_PLATFORM_POSIX) - - pthread_setspecific((pthread_key_t)handle, value); - -#endif -} - - -static void* tlsGet(rmtTLS handle) -{ - assert(handle != TLS_INVALID_HANDLE); - -#if defined(RMT_PLATFORM_WINDOWS) - - return TlsGetValue(handle); - -#elif defined(RMT_PLATFORM_POSIX) - - return pthread_getspecific((pthread_key_t)handle); - -#endif -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @ATOMIC: Atomic Operations ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - -static rmtBool AtomicCompareAndSwap(rmtU32 volatile* val, long old_val, long new_val) -{ - #if defined(RMT_PLATFORM_WINDOWS) && !defined(__MINGW32__) - return _InterlockedCompareExchange((long volatile*)val, new_val, old_val) == old_val ? RMT_TRUE : RMT_FALSE; - #elif defined(RMT_PLATFORM_POSIX) || defined(__MINGW32__) - return __sync_bool_compare_and_swap(val, old_val, new_val) ? RMT_TRUE : RMT_FALSE; - #endif -} - - -static rmtBool AtomicCompareAndSwapPointer(long* volatile* ptr, long* old_ptr, long* new_ptr) -{ - #if defined(RMT_PLATFORM_WINDOWS) && !defined(__MINGW32__) - #ifdef _WIN64 - return _InterlockedCompareExchange64((__int64 volatile*)ptr, (__int64)new_ptr, (__int64)old_ptr) == (__int64)old_ptr ? RMT_TRUE : RMT_FALSE; - #else - return _InterlockedCompareExchange((long volatile*)ptr, (long)new_ptr, (long)old_ptr) == (long)old_ptr ? RMT_TRUE : RMT_FALSE; - #endif - #elif defined(RMT_PLATFORM_POSIX) || defined(__MINGW32__) - return __sync_bool_compare_and_swap(ptr, old_ptr, new_ptr) ? RMT_TRUE : RMT_FALSE; - #endif -} - - -// -// NOTE: Does not guarantee a memory barrier -// TODO: Make sure all platforms don't insert a memory barrier as this is only for stats -// Alternatively, add strong/weak memory order equivalents -// -static rmtS32 AtomicAdd(rmtS32 volatile* value, rmtS32 add) -{ - #if defined(RMT_PLATFORM_WINDOWS) && !defined(__MINGW32__) - return _InterlockedExchangeAdd((long volatile*)value, (long)add); - #elif defined(RMT_PLATFORM_POSIX) || defined(__MINGW32__) - return __sync_fetch_and_add(value, add); - #endif -} - - -static void AtomicSub(rmtS32 volatile* value, rmtS32 sub) -{ - // Not all platforms have an implementation so just negate and add - AtomicAdd(value, -sub); -} - - -// Compiler write fences (windows implementation) -static void WriteFence() -{ -#if defined(RMT_PLATFORM_WINDOWS) && !defined(__MINGW32__) - _WriteBarrier(); -#elif defined (__clang__) - __asm__ volatile("" : : : "memory"); -#else - asm volatile ("" : : : "memory"); -#endif -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @NEW: New/Delete operators with error values for simplifying object create/destroy ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -// Ensures the pointer is non-NULL, calls the destructor, frees memory and sets the pointer to NULL -#define Delete(type, obj) \ - if (obj != NULL) \ - { \ - type##_Destructor(obj); \ - rmtFree(obj); \ - obj = NULL; \ - } - - -// New is implemented in terms of two begin/end macros -// New will allocate enough space for the object and call the constructor -// If allocation fails the constructor won't be called -// If the constructor fails, the destructor is called and memory is released -// NOTE: Use of sizeof() requires that the type be defined at the point of call -// This is a disadvantage over requiring only a custom Create function -#define BeginNew(type, obj) \ - { \ - obj = (type*)rmtMalloc(sizeof(type)); \ - if (obj == NULL) \ - { \ - error = RMT_ERROR_MALLOC_FAIL; \ - } \ - else \ - { \ - - -#define EndNew(type, obj) \ - if (error != RMT_ERROR_NONE) \ - Delete(type, obj); \ - } \ - } - - -// Specialisations for New with varying constructor parameter counts -#define New_0(type, obj) \ - BeginNew(type, obj); error = type##_Constructor(obj); EndNew(type, obj) -#define New_1(type, obj, a0) \ - BeginNew(type, obj); error = type##_Constructor(obj, a0); EndNew(type, obj) -#define New_2(type, obj, a0, a1) \ - BeginNew(type, obj); error = type##_Constructor(obj, a0, a1); EndNew(type, obj) -#define New_3(type, obj, a0, a1, a2) \ - BeginNew(type, obj); error = type##_Constructor(obj, a0, a1, a2); EndNew(type, obj) - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @VMBUFFER: Mirror Buffer using Virtual Memory for auto-wrap ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -typedef struct VirtualMirrorBuffer -{ - // Page-rounded size of the buffer without mirroring - rmtU32 size; - - // Pointer to the first part of the mirror - // The second part comes directly after at ptr+size bytes - rmtU8* ptr; - -#ifdef RMT_PLATFORM_WINDOWS - HANDLE file_map_handle; -#endif - -} VirtualMirrorBuffer; - - -#ifdef __ANDROID__ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include -#include -#define ASHMEM_DEVICE "/dev/ashmem" - -/* - * ashmem_create_region - creates a new ashmem region and returns the file - * descriptor, or <0 on error - * - * `name' is an optional label to give the region (visible in /proc/pid/maps) - * `size' is the size of the region, in page-aligned bytes - */ -int ashmem_create_region(const char *name, size_t size) -{ - int fd, ret; - - fd = open(ASHMEM_DEVICE, O_RDWR); - if (fd < 0) - return fd; - - if (name) { - char buf[ASHMEM_NAME_LEN] = {0}; - - strncpy(buf, name, sizeof(buf)); - buf[sizeof(buf)-1] = 0; - ret = ioctl(fd, ASHMEM_SET_NAME, buf); - if (ret < 0) - goto error; - } - - ret = ioctl(fd, ASHMEM_SET_SIZE, size); - if (ret < 0) - goto error; - - return fd; - -error: - close(fd); - return ret; -} -#endif // __ANDROID__ - - -static rmtError VirtualMirrorBuffer_Constructor(VirtualMirrorBuffer* buffer, rmtU32 size, int nb_attempts) -{ - static const rmtU32 k_64 = 64 * 1024; - RMT_UNREFERENCED_PARAMETER(nb_attempts); - -#ifdef RMT_PLATFORM_LINUX - char path[] = "/dev/shm/ring-buffer-XXXXXX"; - int file_descriptor; -#endif - - // Round up to page-granulation; the nearest 64k boundary for now - size = (size + k_64 - 1) / k_64 * k_64; - - // Set defaults - buffer->size = size; - buffer->ptr = NULL; -#ifdef RMT_PLATFORM_WINDOWS - buffer->file_map_handle = INVALID_HANDLE_VALUE; -#endif - -#ifdef RMT_PLATFORM_WINDOWS - - // Windows version based on https://gist.github.com/rygorous/3158316 - - while (nb_attempts-- > 0) - { - rmtU8* desired_addr; - - // Create a file mapping for pointing to its physical address with multiple virtual pages - buffer->file_map_handle = CreateFileMapping( - INVALID_HANDLE_VALUE, - 0, - PAGE_READWRITE, - 0, - size, - 0); - if (buffer->file_map_handle == NULL) - break; - - // Reserve two contiguous pages of virtual memory - desired_addr = (rmtU8*)VirtualAlloc(0, size * 2, MEM_RESERVE, PAGE_NOACCESS); - if (desired_addr == NULL) - break; - - // Release the range immediately but retain the address for the next sequence of code to - // try and map to it. In the mean-time some other OS thread may come along and allocate this - // address range from underneath us so multiple attempts need to be made. - VirtualFree(desired_addr, 0, MEM_RELEASE); - - // Immediately try to point both pages at the file mapping - if (MapViewOfFileEx(buffer->file_map_handle, FILE_MAP_ALL_ACCESS, 0, 0, size, desired_addr) == desired_addr && - MapViewOfFileEx(buffer->file_map_handle, FILE_MAP_ALL_ACCESS, 0, 0, size, desired_addr + size) == desired_addr + size) - { - buffer->ptr = desired_addr; - break; - } - - // Failed to map the virtual pages; cleanup and try again - CloseHandle(buffer->file_map_handle); - buffer->file_map_handle = NULL; - } - -#endif - -#ifdef RMT_PLATFORM_MACOS - - // - // Mac version based on https://github.com/mikeash/MAMirroredQueue - // - // Copyright (c) 2010, Michael Ash - // All rights reserved. - // - // Redistribution and use in source and binary forms, with or without modification, are permitted provided that - // the following conditions are met: - // - // Redistributions of source code must retain the above copyright notice, this list of conditions and the following - // disclaimer. - // - // Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the - // following disclaimer in the documentation and/or other materials provided with the distribution. - // Neither the name of Michael Ash nor the names of its contributors may be used to endorse or promote products - // derived from this software without specific prior written permission. - // - // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - // GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - // - - while (nb_attempts-- > 0) - { - vm_prot_t cur_prot, max_prot; - kern_return_t mach_error; - rmtU8* ptr = NULL; - rmtU8* target = NULL; - - // Allocate 2 contiguous pages of virtual memory - if (vm_allocate(mach_task_self(), (vm_address_t*)&ptr, size * 2, VM_FLAGS_ANYWHERE) != KERN_SUCCESS) - break; - - // Try to deallocate the last page, leaving its virtual memory address free - target = ptr + size; - if (vm_deallocate(mach_task_self(), (vm_address_t)target, size) != KERN_SUCCESS) - { - vm_deallocate(mach_task_self(), (vm_address_t)ptr, size * 2); - break; - } - - // Attempt to remap the page just deallocated to the buffer again - mach_error = vm_remap( - mach_task_self(), - (vm_address_t*)&target, - size, - 0, // mask - 0, // anywhere - mach_task_self(), - (vm_address_t)ptr, - 0, //copy - &cur_prot, - &max_prot, - VM_INHERIT_COPY); - - if (mach_error == KERN_NO_SPACE) - { - // Failed on this pass, cleanup and make another attempt - if (vm_deallocate(mach_task_self(), (vm_address_t)ptr, size) != KERN_SUCCESS) - break; - } - - else if (mach_error == KERN_SUCCESS) - { - // Leave the loop on success - buffer->ptr = ptr; - break; - } - - else - { - // Unknown error, can't recover - vm_deallocate(mach_task_self(), (vm_address_t)ptr, size); - break; - } - } - -#endif - -#ifdef RMT_PLATFORM_LINUX - - // Linux version based on now-defunct Wikipedia section http://en.wikipedia.org/w/index.php?title=Circular_buffer&oldid=600431497 - - -#ifdef __ANDROID__ - file_descriptor = ashmem_create_region("remotery_shm", size * 2); - if (file_descriptor < 0) { - return RMT_ERROR_VIRTUAL_MEMORY_BUFFER_FAIL; - } -#else - // Create a unique temporary filename in the shared memory folder - file_descriptor = mkstemp(path); - if (file_descriptor < 0) - return RMT_ERROR_VIRTUAL_MEMORY_BUFFER_FAIL; - - // Delete the name - if (unlink(path)) - return RMT_ERROR_VIRTUAL_MEMORY_BUFFER_FAIL; - - // Set the file size to twice the buffer size - // TODO: this 2x behaviour can be avoided with similar solution to Win/Mac - if (ftruncate (file_descriptor, size * 2)) - return RMT_ERROR_VIRTUAL_MEMORY_BUFFER_FAIL; - -#endif - // Map 2 contiguous pages - buffer->ptr = (rmtU8*)mmap(NULL, size * 2, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); - if (buffer->ptr == MAP_FAILED) - { - buffer->ptr = NULL; - return RMT_ERROR_VIRTUAL_MEMORY_BUFFER_FAIL; - } - - // Point both pages to the same memory file - if (mmap(buffer->ptr, size, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, file_descriptor, 0) != buffer->ptr || - mmap(buffer->ptr + size, size, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, file_descriptor, 0) != buffer->ptr + size) - return RMT_ERROR_VIRTUAL_MEMORY_BUFFER_FAIL; - -#endif - - // Cleanup if exceeded number of attempts or failed - if (buffer->ptr == NULL) - return RMT_ERROR_VIRTUAL_MEMORY_BUFFER_FAIL; - - return RMT_ERROR_NONE; -} - - -static void VirtualMirrorBuffer_Destructor(VirtualMirrorBuffer* buffer) -{ - assert(buffer != 0); - -#ifdef RMT_PLATFORM_WINDOWS - if (buffer->file_map_handle != NULL) - { - CloseHandle(buffer->file_map_handle); - buffer->file_map_handle = NULL; - } -#endif - -#ifdef RMT_PLATFORM_MACOS - if (buffer->ptr != NULL) - vm_deallocate(mach_task_self(), (vm_address_t)buffer->ptr, buffer->size * 2); -#endif - -#ifdef RMT_PLATFORM_LINUX - if (buffer->ptr != NULL) - munmap(buffer->ptr, buffer->size * 2); -#endif - - buffer->ptr = NULL; -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @THREADS: Threads ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - -typedef struct Thread_t rmtThread; -typedef rmtError(*ThreadProc)(rmtThread* thread); - - -struct Thread_t -{ - // OS-specific data - #if defined(RMT_PLATFORM_WINDOWS) - HANDLE handle; - #else - pthread_t handle; - #endif - - // Callback executed when the thread is created - ThreadProc callback; - - // Caller-specified parameter passed to Thread_Create - void* param; - - // Error state returned from callback - rmtError error; - - // External threads can set this to request an exit - volatile rmtBool request_exit; - -}; - - -#if defined(RMT_PLATFORM_WINDOWS) - - static DWORD WINAPI ThreadProcWindows(LPVOID lpParameter) - { - rmtThread* thread = (rmtThread*)lpParameter; - assert(thread != NULL); - thread->error = thread->callback(thread); - return thread->error == RMT_ERROR_NONE ? 1 : 0; - } - -#else - static void* StartFunc( void* pArgs ) - { - rmtThread* thread = (rmtThread*)pArgs; - assert(thread != NULL); - thread->error = thread->callback(thread); - return NULL; // returned error not use, check thread->error. - } -#endif - - -static int rmtThread_Valid(rmtThread* thread) -{ - assert(thread != NULL); - - #if defined(RMT_PLATFORM_WINDOWS) - return thread->handle != NULL; - #else - return !pthread_equal(thread->handle, pthread_self()); - #endif -} - - -static rmtError rmtThread_Constructor(rmtThread* thread, ThreadProc callback, void* param) -{ - assert(thread != NULL); - - thread->callback = callback; - thread->param = param; - thread->error = RMT_ERROR_NONE; - thread->request_exit = RMT_FALSE; - - // OS-specific thread creation - - #if defined (RMT_PLATFORM_WINDOWS) - - thread->handle = CreateThread( - NULL, // lpThreadAttributes - 0, // dwStackSize - ThreadProcWindows, // lpStartAddress - thread, // lpParameter - 0, // dwCreationFlags - NULL); // lpThreadId - - if (thread->handle == NULL) - return RMT_ERROR_CREATE_THREAD_FAIL; - - #else - - int32_t error = pthread_create( &thread->handle, NULL, StartFunc, thread ); - if (error) - { - // Contents of 'thread' parameter to pthread_create() are undefined after - // failure call so can't pre-set to invalid value before hand. - thread->handle = pthread_self(); - return RMT_ERROR_CREATE_THREAD_FAIL; - } - - #endif - - return RMT_ERROR_NONE; -} - - -static void rmtThread_RequestExit(rmtThread* thread) -{ - // Not really worried about memory barriers or delayed visibility to the target thread - assert(thread != NULL); - thread->request_exit = RMT_TRUE; -} - - -static void rmtThread_Join(rmtThread* thread) -{ - assert(rmtThread_Valid(thread)); - - #if defined(RMT_PLATFORM_WINDOWS) - WaitForSingleObject(thread->handle, INFINITE); - #else - pthread_join(thread->handle, NULL); - #endif -} - - -static void rmtThread_Destructor(rmtThread* thread) -{ - assert(thread != NULL); - - if (rmtThread_Valid(thread)) - { - // Shutdown the thread - rmtThread_RequestExit(thread); - rmtThread_Join(thread); - - // OS-specific release of thread resources - - #if defined(RMT_PLATFORM_WINDOWS) - CloseHandle(thread->handle); - thread->handle = NULL; - #endif - } -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @SAFEC: Safe C Library excerpts - http://sourceforge.net/projects/safeclib/ ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -/*------------------------------------------------------------------ - * - * November 2008, Bo Berry - * - * Copyright (c) 2008-2011 by Cisco Systems, Inc - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - *------------------------------------------------------------------ - */ - - -// NOTE: Microsoft also has its own version of these functions so I'm do some hacky PP to remove them -#define strnlen_s strnlen_s_safe_c -#define strncat_s strncat_s_safe_c -#define strcpy_s strcpy_s_safe_c - - -#define RSIZE_MAX_STR (4UL << 10) /* 4KB */ -#define RCNEGATE(x) x - - -#define EOK ( 0 ) -#define ESNULLP ( 400 ) /* null ptr */ -#define ESZEROL ( 401 ) /* length is zero */ -#define ESLEMAX ( 403 ) /* length exceeds max */ -#define ESOVRLP ( 404 ) /* overlap undefined */ -#define ESNOSPC ( 406 ) /* not enough space for s2 */ -#define ESUNTERM ( 407 ) /* unterminated string */ -#define ESNOTFND ( 409 ) /* not found */ - -#ifndef _ERRNO_T_DEFINED -#define _ERRNO_T_DEFINED -typedef int errno_t; -#endif - -#if (!defined(_WIN64) && !defined(__APPLE__)) || (defined(__MINGW32__) && !defined(RSIZE_T_DEFINED)) -typedef unsigned int rsize_t; -#endif - -#if defined(RMT_PLATFORM_MACOS) && !defined(_RSIZE_T) -typedef __darwin_size_t rsize_t; -#endif - -static rsize_t -strnlen_s (const char *dest, rsize_t dmax) -{ - rsize_t count; - - if (dest == NULL) { - return RCNEGATE(0); - } - - if (dmax == 0) { - return RCNEGATE(0); - } - - if (dmax > RSIZE_MAX_STR) { - return RCNEGATE(0); - } - - count = 0; - while (*dest && dmax) { - count++; - dmax--; - dest++; - } - - return RCNEGATE(count); -} - - -static errno_t -strstr_s (char *dest, rsize_t dmax, - const char *src, rsize_t slen, char **substring) -{ - rsize_t len; - rsize_t dlen; - int i; - - if (substring == NULL) { - return RCNEGATE(ESNULLP); - } - *substring = NULL; - - if (dest == NULL) { - return RCNEGATE(ESNULLP); - } - - if (dmax == 0) { - return RCNEGATE(ESZEROL); - } - - if (dmax > RSIZE_MAX_STR) { - return RCNEGATE(ESLEMAX); - } - - if (src == NULL) { - return RCNEGATE(ESNULLP); - } - - if (slen == 0) { - return RCNEGATE(ESZEROL); - } - - if (slen > RSIZE_MAX_STR) { - return RCNEGATE(ESLEMAX); - } - - /* - * src points to a string with zero length, or - * src equals dest, return dest - */ - if (*src == '\0' || dest == src) { - *substring = dest; - return RCNEGATE(EOK); - } - - while (*dest && dmax) { - i = 0; - len = slen; - dlen = dmax; - - while (src[i] && dlen) { - - /* not a match, not a substring */ - if (dest[i] != src[i]) { - break; - } - - /* move to the next char */ - i++; - len--; - dlen--; - - if (src[i] == '\0' || !len) { - *substring = dest; - return RCNEGATE(EOK); - } - } - dest++; - dmax--; - } - - /* - * substring was not found, return NULL - */ - *substring = NULL; - return RCNEGATE(ESNOTFND); -} - - -static errno_t -strncat_s (char *dest, rsize_t dmax, const char *src, rsize_t slen) -{ - const char *overlap_bumper; - - if (dest == NULL) { - return RCNEGATE(ESNULLP); - } - - if (src == NULL) { - return RCNEGATE(ESNULLP); - } - - if (slen > RSIZE_MAX_STR) { - return RCNEGATE(ESLEMAX); - } - - if (dmax == 0) { - return RCNEGATE(ESZEROL); - } - - if (dmax > RSIZE_MAX_STR) { - return RCNEGATE(ESLEMAX); - } - - /* hold base of dest in case src was not copied */ - - if (dest < src) { - overlap_bumper = src; - - /* Find the end of dest */ - while (*dest != '\0') { - - if (dest == overlap_bumper) { - return RCNEGATE(ESOVRLP); - } - - dest++; - dmax--; - if (dmax == 0) { - return RCNEGATE(ESUNTERM); - } - } - - while (dmax > 0) { - if (dest == overlap_bumper) { - return RCNEGATE(ESOVRLP); - } - - /* - * Copying truncated before the source null is encountered - */ - if (slen == 0) { - *dest = '\0'; - return RCNEGATE(EOK); - } - - *dest = *src; - if (*dest == '\0') { - return RCNEGATE(EOK); - } - - dmax--; - slen--; - dest++; - src++; - } - - } else { - overlap_bumper = dest; - - /* Find the end of dest */ - while (*dest != '\0') { - - /* - * NOTE: no need to check for overlap here since src comes first - * in memory and we're not incrementing src here. - */ - dest++; - dmax--; - if (dmax == 0) { - return RCNEGATE(ESUNTERM); - } - } - - while (dmax > 0) { - if (src == overlap_bumper) { - return RCNEGATE(ESOVRLP); - } - - /* - * Copying truncated - */ - if (slen == 0) { - *dest = '\0'; - return RCNEGATE(EOK); - } - - *dest = *src; - if (*dest == '\0') { - return RCNEGATE(EOK); - } - - dmax--; - slen--; - dest++; - src++; - } - } - - /* - * the entire src was not copied, so the string will be nulled. - */ - return RCNEGATE(ESNOSPC); -} - - -errno_t -strcpy_s(char *dest, rsize_t dmax, const char *src) -{ - const char *overlap_bumper; - - if (dest == NULL) { - return RCNEGATE(ESNULLP); - } - - if (dmax == 0) { - return RCNEGATE(ESZEROL); - } - - if (dmax > RSIZE_MAX_STR) { - return RCNEGATE(ESLEMAX); - } - - if (src == NULL) { - *dest = '\0'; - return RCNEGATE(ESNULLP); - } - - if (dest == src) { - return RCNEGATE(EOK); - } - - if (dest < src) { - overlap_bumper = src; - - while (dmax > 0) { - if (dest == overlap_bumper) { - return RCNEGATE(ESOVRLP); - } - - *dest = *src; - if (*dest == '\0') { - return RCNEGATE(EOK); - } - - dmax--; - dest++; - src++; - } - - } - else { - overlap_bumper = dest; - - while (dmax > 0) { - if (src == overlap_bumper) { - return RCNEGATE(ESOVRLP); - } - - *dest = *src; - if (*dest == '\0') { - return RCNEGATE(EOK); - } - - dmax--; - dest++; - src++; - } - } - - /* - * the entire src must have been copied, if not reset dest - * to null the string. - */ - return RCNEGATE(ESNOSPC); -} - -#if !(defined(RMT_PLATFORM_LINUX) && RMT_USE_POSIX_THREADNAMES) - -/* very simple integer to hex */ -static const char* hex_encoding_table = "0123456789ABCDEF"; - -static void itoahex_s( char *dest, rsize_t dmax, rmtS32 value ) -{ - rsize_t len; - rmtS32 halfbytepos; - - halfbytepos = 8; - - /* strip leading 0's */ - while (halfbytepos > 1) - { - --halfbytepos; - if (value >> (4 * halfbytepos) & 0xF) - { - ++halfbytepos; - break; - } - } - - len = 0; - while(len + 1 < dmax && halfbytepos > 0) - { - --halfbytepos; - dest[len] = hex_encoding_table[value >> (4 * halfbytepos) & 0xF]; - ++len; - } - - if (len < dmax) - { - dest[len] = 0; - } -} - -#endif - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @OBJALLOC: Reusable Object Allocator ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -// -// All objects that require free-list-backed allocation need to inherit from this type. -// -typedef struct ObjectLink_s -{ - struct ObjectLink_s* volatile next; -} ObjectLink; - - -static void ObjectLink_Constructor(ObjectLink* link) -{ - assert(link != NULL); - link->next = NULL; -} - - -typedef rmtError (*ObjConstructor)(void*); -typedef void (*ObjDestructor)(void*); - - -typedef struct -{ - // Object create/destroy parameters - rmtU32 object_size; - ObjConstructor constructor; - ObjDestructor destructor; - - // Number of objects in the free list - volatile rmtS32 nb_free; - - // Number of objects used by callers - volatile rmtS32 nb_inuse; - - // Total allocation count - volatile rmtS32 nb_allocated; - - ObjectLink* first_free; -} ObjectAllocator; - - -static rmtError ObjectAllocator_Constructor(ObjectAllocator* allocator, rmtU32 object_size, ObjConstructor constructor, ObjDestructor destructor) -{ - allocator->object_size = object_size; - allocator->constructor = constructor; - allocator->destructor = destructor; - allocator->nb_free = 0; - allocator->nb_inuse = 0; - allocator->nb_allocated = 0; - allocator->first_free = NULL; - return RMT_ERROR_NONE; -} - - -static void ObjectAllocator_Destructor(ObjectAllocator* allocator) -{ - // Ensure everything has been released to the allocator - assert(allocator != NULL); - assert(allocator->nb_inuse == 0); - - // Destroy all objects released to the allocator - while (allocator->first_free != NULL) - { - ObjectLink* next = allocator->first_free->next; - assert(allocator->destructor != NULL); - allocator->destructor(allocator->first_free); - rmtFree(allocator->first_free); - allocator->first_free = next; - } -} - - -static void ObjectAllocator_Push(ObjectAllocator* allocator, ObjectLink* start, ObjectLink* end) -{ - assert(allocator != NULL); - assert(start != NULL); - assert(end != NULL); - - // CAS pop add range to the front of the list - for (;;) - { - ObjectLink* old_link = (ObjectLink*)allocator->first_free; - end->next = old_link; - if (AtomicCompareAndSwapPointer((long* volatile*)&allocator->first_free, (long*)old_link, (long*)start) == RMT_TRUE) - break; - } -} - - -static ObjectLink* ObjectAllocator_Pop(ObjectAllocator* allocator) -{ - ObjectLink* link; - - assert(allocator != NULL); - assert(allocator->first_free != NULL); - - // CAS pop from the front of the list - for (;;) - { - ObjectLink* old_link = (ObjectLink*)allocator->first_free; - ObjectLink* next_link = old_link->next; - if (AtomicCompareAndSwapPointer((long* volatile*)&allocator->first_free, (long*)old_link, (long*)next_link) == RMT_TRUE) - { - link = old_link; - break; - } - } - - link->next = NULL; - - return link; -} - - -static rmtError ObjectAllocator_Alloc(ObjectAllocator* allocator, void** object) -{ - // This function only calls the object constructor on initial malloc of an object - - assert(allocator != NULL); - assert(object != NULL); - - // Has the free list run out? - if (allocator->first_free == NULL) - { - rmtError error; - - // Allocate/construct a new object - void* free_object = rmtMalloc( allocator->object_size ); - if (free_object == NULL) - return RMT_ERROR_MALLOC_FAIL; - assert(allocator->constructor != NULL); - error = allocator->constructor(free_object); - if (error != RMT_ERROR_NONE) - { - // Auto-teardown on failure - assert(allocator->destructor != NULL); - allocator->destructor(free_object); - rmtFree(free_object); - return error; - } - - // Add to the free list - ObjectAllocator_Push(allocator, (ObjectLink*)free_object, (ObjectLink*)free_object); - AtomicAdd(&allocator->nb_allocated, 1); - AtomicAdd(&allocator->nb_free, 1); - } - - // Pull available objects from the free list - *object = ObjectAllocator_Pop(allocator); - AtomicSub(&allocator->nb_free, 1); - AtomicAdd(&allocator->nb_inuse, 1); - - return RMT_ERROR_NONE; -} - - -static void ObjectAllocator_Free(ObjectAllocator* allocator, void* object) -{ - // Add back to the free-list - assert(allocator != NULL); - ObjectAllocator_Push(allocator, (ObjectLink*)object, (ObjectLink*)object); - AtomicSub(&allocator->nb_inuse, 1); - AtomicAdd(&allocator->nb_free, 1); -} - - -static void ObjectAllocator_FreeRange(ObjectAllocator* allocator, void* start, void* end, rmtU32 count) -{ - assert(allocator != NULL); - ObjectAllocator_Push(allocator, (ObjectLink*)start, (ObjectLink*)end); - AtomicSub(&allocator->nb_inuse, count); - AtomicAdd(&allocator->nb_free, count); -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @DYNBUF: Dynamic Buffer ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -typedef struct -{ - rmtU32 alloc_granularity; - - rmtU32 bytes_allocated; - rmtU32 bytes_used; - - rmtU8* data; -} Buffer; - - -static rmtError Buffer_Constructor(Buffer* buffer, rmtU32 alloc_granularity) -{ - assert(buffer != NULL); - buffer->alloc_granularity = alloc_granularity; - buffer->bytes_allocated = 0; - buffer->bytes_used = 0; - buffer->data = NULL; - return RMT_ERROR_NONE; -} - - -static void Buffer_Destructor(Buffer* buffer) -{ - assert(buffer != NULL); - - if (buffer->data != NULL) - { - rmtFree(buffer->data); - buffer->data = NULL; - } -} - - -static rmtError Buffer_Write(Buffer* buffer, void* data, rmtU32 length) -{ - assert(buffer != NULL); - - // Reallocate the buffer on overflow - if (buffer->bytes_used + length > buffer->bytes_allocated) - { - // Calculate size increase rounded up to the requested allocation granularity - rmtU32 g = buffer->alloc_granularity; - rmtU32 a = buffer->bytes_allocated + length; - a = a + ((g - 1) - ((a - 1) % g)); - buffer->bytes_allocated = a; - buffer->data = (rmtU8*)rmtRealloc(buffer->data, buffer->bytes_allocated); - if (buffer->data == NULL) - return RMT_ERROR_MALLOC_FAIL; - } - - // Copy all bytes - memcpy(buffer->data + buffer->bytes_used, data, length); - buffer->bytes_used += length; - - // NULL terminate (if possible) for viewing in debug - if (buffer->bytes_used < buffer->bytes_allocated) - buffer->data[buffer->bytes_used] = 0; - - return RMT_ERROR_NONE; -} - - -static rmtError Buffer_WriteStringZ(Buffer* buffer, rmtPStr string) -{ - assert(string != NULL); - return Buffer_Write(buffer, (void*)string, (rmtU32)strnlen_s(string, 2048) + 1); -} - - -static void U32ToByteArray(rmtU8* dest, rmtU32 value) -{ - // Commit as little-endian - dest[0] = value & 255; - dest[1] = (value >> 8) & 255; - dest[2] = (value >> 16) & 255; - dest[3] = value >> 24; -} - - -static rmtError Buffer_WriteU32(Buffer* buffer, rmtU32 value) -{ - rmtU8 temp[4]; - U32ToByteArray(temp, value); - return Buffer_Write(buffer, temp, sizeof(temp)); -} - - -static rmtBool IsLittleEndian() -{ - // Not storing this in a global variable allows the compiler to more easily optimise - // this away altogether. - union - { - unsigned int i; - unsigned char c[sizeof(unsigned int)]; - } u; - u.i = 1; - return u.c[0] == 1 ? RMT_TRUE : RMT_FALSE; -} - - -static rmtError Buffer_WriteU64(Buffer* buffer, rmtU64 value) -{ - // Write as a double as Javascript DataView doesn't have a 64-bit integer read - union - { - double d; - unsigned char c[sizeof(double)]; - } u; - char temp[8]; - u.d = (double)value; - if (IsLittleEndian()) - { - temp[0] = u.c[0]; - temp[1] = u.c[1]; - temp[2] = u.c[2]; - temp[3] = u.c[3]; - temp[4] = u.c[4]; - temp[5] = u.c[5]; - temp[6] = u.c[6]; - temp[7] = u.c[7]; - } - else - { - temp[0] = u.c[7]; - temp[1] = u.c[6]; - temp[2] = u.c[5]; - temp[3] = u.c[4]; - temp[4] = u.c[3]; - temp[5] = u.c[2]; - temp[6] = u.c[1]; - temp[7] = u.c[0]; - } - return Buffer_Write(buffer, u.c, sizeof(u.c)); -} - - -static rmtError Buffer_WriteStringWithLength(Buffer* buffer, rmtPStr string) -{ - rmtU32 length = (rmtU32)strnlen_s(string, 2048); - rmtError error; - - error = Buffer_WriteU32(buffer, length); - if (error != RMT_ERROR_NONE) - return error; - - return Buffer_Write(buffer, (void*)string, length); -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @HASHTABLE: Integer pair hash map for inserts/finds. No removes for added simplicity. ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -#define RMT_NOT_FOUND 0xFFFFFFFF - - -typedef struct -{ - // Non-zero, pre-hashed key - rmtU32 key; - - // Value that's not equal to RMT_NOT_FOUND - rmtU32 value; -} HashSlot; - - -typedef struct -{ - // Stats - rmtU32 max_nb_slots; - rmtU32 nb_slots; - - // Data - HashSlot* slots; -} rmtHashTable; - - -static rmtError rmtHashTable_Constructor(rmtHashTable* table, rmtU32 max_nb_slots) -{ - // Default initialise - assert(table != NULL); - table->max_nb_slots = max_nb_slots; - table->nb_slots = 0; - - // Allocate and clear the hash slots - table->slots = (HashSlot*)rmtMalloc(table->max_nb_slots * sizeof(HashSlot)); - if (table->slots == NULL) - return RMT_ERROR_MALLOC_FAIL; - memset(table->slots, 0, table->max_nb_slots * sizeof(HashSlot)); - - return RMT_ERROR_NONE; -} - - -static void rmtHashTable_Destructor(rmtHashTable* table) -{ - assert(table != NULL); - - if (table->slots != NULL) - { - rmtFree(table->slots); - table->slots = NULL; - } -} - - -static rmtError rmtHashTable_Resize(rmtHashTable* table); - - -static rmtError rmtHashTable_Insert(rmtHashTable* table, rmtU32 key, rmtU32 value) -{ - HashSlot* slot = NULL; - rmtError error = RMT_ERROR_NONE; - - // Calculate initial slot location for this key - rmtU32 index_mask = table->max_nb_slots - 1; - rmtU32 index = key & index_mask; - - assert(key != 0); - assert(value != RMT_NOT_FOUND); - - // Linear probe for free slot, reusing any existing key matches - // There will always be at least one free slot due to load factor management - while (table->slots[index].key) - { - if (table->slots[index].key == key) - { - // Counter occupied slot increments below - table->nb_slots--; - break; - } - - index = (index + 1) & index_mask; - } - - // Just verify that I've got no errors in the code above - assert(index < table->max_nb_slots); - - // Add to the table - slot = table->slots + index; - slot->key = key; - slot->value = value; - table->nb_slots++; - - // Resize when load factor is greater than 2/3 - if (table->nb_slots > (table->max_nb_slots * 2) / 3) - error = rmtHashTable_Resize(table); - - return error; -} - - -static rmtError rmtHashTable_Resize(rmtHashTable* table) -{ - rmtU32 old_max_nb_slots = table->max_nb_slots; - HashSlot* new_slots = NULL; - HashSlot* old_slots = table->slots; - - // Increase the table size - rmtU32 new_max_nb_slots = table->max_nb_slots; - if (new_max_nb_slots < 8192 * 4) - new_max_nb_slots *= 4; - else - new_max_nb_slots *= 2; - - // Allocate and clear a new table - new_slots = (HashSlot*)rmtMalloc(new_max_nb_slots * sizeof(HashSlot)); - if (new_slots == NULL) - return RMT_ERROR_MALLOC_FAIL; - memset(new_slots, 0, new_max_nb_slots * sizeof(HashSlot)); - - // Update fields of the table after successful allocation only - table->slots = new_slots; - table->max_nb_slots = new_max_nb_slots; - table->nb_slots = 0; - - // Reinsert all objects into the new table - for (rmtU32 i = 0; i < old_max_nb_slots; i++) - { - HashSlot* slot = old_slots + i; - if (slot->key != 0) - rmtHashTable_Insert(table, slot->key, slot->key); - } - - free(old_slots); - - return RMT_ERROR_NONE; -} - - -static rmtU32 rmtHashTable_Find(rmtHashTable* table, rmtU32 key) -{ - // Calculate initial slot location for this key - rmtU32 index_mask = table->max_nb_slots - 1; - rmtU32 index = key & index_mask; - - // Linear probe for matching hash - while (table->slots[index].key) - { - HashSlot* slot = table->slots + index; - - if (slot->key == key) - return slot->value; - - index = (index + 1) & index_mask; - } - - return RMT_NOT_FOUND; -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @STRINGTABLE: Map from string hash to string offset in local buffer ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -typedef struct -{ - // Growable dynamic array of strings added so far - Buffer* text; - - // Map from text hash to text location in the buffer - rmtHashTable* text_map; -} StringTable; - - -static rmtError StringTable_Constructor(StringTable* table) -{ - rmtError error; - - // Default initialise - assert(table != NULL); - table->text = NULL; - table->text_map = NULL; - - // Allocate reasonably storage for initial sample names - - New_1(Buffer, table->text, 8 * 1024); - if (error != RMT_ERROR_NONE) - return error; - - New_1(rmtHashTable, table->text_map, 1 * 1024); - if (error != RMT_ERROR_NONE) - return error; - - return RMT_ERROR_NONE; -} - - -static void StringTable_Destructor(StringTable* table) -{ - assert(table != NULL); - - Delete(rmtHashTable, table->text_map); - Delete(Buffer, table->text); -} - - -static rmtPStr StringTable_Find(StringTable* table, rmtU32 name_hash) -{ - rmtU32 text_offset = rmtHashTable_Find(table->text_map, name_hash); - if (text_offset != RMT_NOT_FOUND) - return (rmtPStr)(table->text->data + text_offset); - return NULL; -} - - -static void StringTable_Insert(StringTable* table, rmtU32 name_hash, rmtPStr name) -{ - // Only add to the buffer if the string isn't already there - rmtU32 text_offset = rmtHashTable_Find(table->text_map, name_hash); - if (text_offset == RMT_NOT_FOUND) - { - // TODO: Allocation errors aren't being passed on to the caller - text_offset = table->text->bytes_used; - Buffer_WriteStringZ(table->text, name); - rmtHashTable_Insert(table->text_map, name_hash, text_offset); - } -} - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @SOCKETS: Sockets TCP/IP Wrapper ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -#ifndef RMT_PLATFORM_WINDOWS - typedef int SOCKET; - #define INVALID_SOCKET -1 - #define SOCKET_ERROR -1 - #define SD_SEND SHUT_WR - #define closesocket close -#endif - - -typedef struct -{ - SOCKET socket; -} TCPSocket; - - -typedef struct -{ - rmtBool can_read; - rmtBool can_write; - rmtError error_state; -} SocketStatus; - - -// -// Function prototypes -// -static void TCPSocket_Close(TCPSocket* tcp_socket); - - -static rmtError InitialiseNetwork() -{ - #ifdef RMT_PLATFORM_WINDOWS - - WSADATA wsa_data; - if (WSAStartup(MAKEWORD(2, 2), &wsa_data)) - return RMT_ERROR_SOCKET_INIT_NETWORK_FAIL; - if (LOBYTE(wsa_data.wVersion) != 2 || HIBYTE(wsa_data.wVersion) != 2) - return RMT_ERROR_SOCKET_INIT_NETWORK_FAIL; - - return RMT_ERROR_NONE; - - #else - - return RMT_ERROR_NONE; - - #endif -} - - -static void ShutdownNetwork() -{ - #ifdef RMT_PLATFORM_WINDOWS - WSACleanup(); - #endif -} - - -static rmtError TCPSocket_Constructor(TCPSocket* tcp_socket) -{ - assert(tcp_socket != NULL); - tcp_socket->socket = INVALID_SOCKET; - return InitialiseNetwork(); -} - - -static void TCPSocket_Destructor(TCPSocket* tcp_socket) -{ - assert(tcp_socket != NULL); - TCPSocket_Close(tcp_socket); - ShutdownNetwork(); -} - - -static rmtError TCPSocket_RunServer(TCPSocket* tcp_socket, rmtU16 port, rmtBool limit_connections_to_localhost) -{ - SOCKET s = INVALID_SOCKET; - struct sockaddr_in sin; - int enable = 1; - #ifdef RMT_PLATFORM_WINDOWS - u_long nonblock = 1; - #endif - - memset(&sin, 0, sizeof(sin) ); - assert(tcp_socket != NULL); - - // Try to create the socket - s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (s == SOCKET_ERROR) - return RMT_ERROR_SOCKET_CREATE_FAIL; - - // set SO_REUSEADDR so binding doesn't fail when restarting the application - // (otherwise the same port can't be reused within TIME_WAIT) - // I'm not checking for errors because if this fails (unlikely) we might still - // be able to bind to the socket anyway - #ifdef RMT_PLATFORM_POSIX - setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable)); - #elif defined(RMT_PLATFORM_WINDOWS) - // windows also needs SO_EXCLUSEIVEADDRUSE, - // see http://www.andy-pearce.com/blog/posts/2013/Feb/so_reuseaddr-on-windows/ - setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&enable, sizeof(enable)); - enable = 1; - setsockopt(s, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *)&enable, sizeof(enable)); - #endif - - // Bind the socket to the incoming port - sin.sin_family = AF_INET; - sin.sin_addr.s_addr = htonl(limit_connections_to_localhost ? INADDR_LOOPBACK : INADDR_ANY); - sin.sin_port = htons(port); - if (bind(s, (struct sockaddr*)&sin, sizeof(sin)) == SOCKET_ERROR) - return RMT_ERROR_SOCKET_BIND_FAIL; - - // Connection is valid, remaining code is socket state modification - tcp_socket->socket = s; - - // Enter a listening state with a backlog of 1 connection - if (listen(s, 1) == SOCKET_ERROR) - return RMT_ERROR_SOCKET_LISTEN_FAIL; - - // Set as non-blocking - #ifdef RMT_PLATFORM_WINDOWS - if (ioctlsocket(tcp_socket->socket, FIONBIO, &nonblock) == SOCKET_ERROR) - return RMT_ERROR_SOCKET_SET_NON_BLOCKING_FAIL; - #else - if (fcntl(tcp_socket->socket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR) - return RMT_ERROR_SOCKET_SET_NON_BLOCKING_FAIL; - #endif - - return RMT_ERROR_NONE; -} - - -static void TCPSocket_Close(TCPSocket* tcp_socket) -{ - assert(tcp_socket != NULL); - - if (tcp_socket->socket != INVALID_SOCKET) - { - // Shutdown the connection, stopping all sends - int result = shutdown(tcp_socket->socket, SD_SEND); - if (result != SOCKET_ERROR) - { - // Keep receiving until the peer closes the connection - int total = 0; - char temp_buf[128]; - while (result > 0) - { - result = (int)recv(tcp_socket->socket, temp_buf, sizeof(temp_buf), 0); - total += result; - } - } - - // Close the socket and issue a network shutdown request - closesocket(tcp_socket->socket); - tcp_socket->socket = INVALID_SOCKET; - } -} - - -static SocketStatus TCPSocket_PollStatus(TCPSocket* tcp_socket) -{ - SocketStatus status; - fd_set fd_read, fd_write, fd_errors; - struct timeval tv; - - status.can_read = RMT_FALSE; - status.can_write = RMT_FALSE; - status.error_state = RMT_ERROR_NONE; - - assert(tcp_socket != NULL); - if (tcp_socket->socket == INVALID_SOCKET) - { - status.error_state = RMT_ERROR_SOCKET_INVALID_POLL; - return status; - } - - // Set read/write/error markers for the socket - FD_ZERO(&fd_read); - FD_ZERO(&fd_write); - FD_ZERO(&fd_errors); -#ifdef _MSC_VER -# pragma warning(push) -# pragma warning(disable:4127) // warning C4127: conditional expression is constant -#endif // _MSC_VER - FD_SET(tcp_socket->socket, &fd_read); - FD_SET(tcp_socket->socket, &fd_write); - FD_SET(tcp_socket->socket, &fd_errors); -#ifdef _MSC_VER -# pragma warning(pop) -#endif // _MSC_VER - - // Poll socket status without blocking - tv.tv_sec = 0; - tv.tv_usec = 0; - if (select(((int)tcp_socket->socket)+1, &fd_read, &fd_write, &fd_errors, &tv) == SOCKET_ERROR) - { - status.error_state = RMT_ERROR_SOCKET_SELECT_FAIL; - return status; - } - - status.can_read = FD_ISSET(tcp_socket->socket, &fd_read) != 0 ? RMT_TRUE : RMT_FALSE; - status.can_write = FD_ISSET(tcp_socket->socket, &fd_write) != 0 ? RMT_TRUE : RMT_FALSE; - status.error_state = FD_ISSET(tcp_socket->socket, &fd_errors) != 0 ? RMT_ERROR_SOCKET_POLL_ERRORS : RMT_ERROR_NONE; - return status; -} - - -static rmtError TCPSocket_AcceptConnection(TCPSocket* tcp_socket, TCPSocket** client_socket) -{ - SocketStatus status; - SOCKET s; - rmtError error; - - // Ensure there is an incoming connection - assert(tcp_socket != NULL); - status = TCPSocket_PollStatus(tcp_socket); - if (status.error_state != RMT_ERROR_NONE || !status.can_read) - return status.error_state; - - // Accept the connection - s = accept(tcp_socket->socket, 0, 0); - if (s == SOCKET_ERROR) - return RMT_ERROR_SOCKET_ACCEPT_FAIL; - -#ifdef SO_NOSIGPIPE - // On POSIX systems, send() may send a SIGPIPE signal when writing to an - // already closed connection. By setting this option, we prevent the - // signal from being emitted and send will instead return an error and set - // errno to EPIPE. - // - // This is supported on BSD platforms and not on Linux. - { - int flag = 1; - setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, &flag, sizeof(flag)); - } -#endif - // Create a client socket for the new connection - assert(client_socket != NULL); - New_0(TCPSocket, *client_socket); - if (error != RMT_ERROR_NONE) - return error; - (*client_socket)->socket = s; - - return RMT_ERROR_NONE; -} - - -static int TCPSocketWouldBlock() -{ -#ifdef RMT_PLATFORM_WINDOWS - DWORD error = WSAGetLastError(); - return (error == WSAEWOULDBLOCK); - #else - int error = errno; - return (error == EAGAIN || error == EWOULDBLOCK); -#endif - -} - - -static rmtError TCPSocket_Send(TCPSocket* tcp_socket, const void* data, rmtU32 length, rmtU32 timeout_ms) -{ - SocketStatus status; - char* cur_data = NULL; - char* end_data = NULL; - rmtU32 start_ms = 0; - rmtU32 cur_ms = 0; - - assert(tcp_socket != NULL); - - start_ms = msTimer_Get(); - - // Loop until timeout checking whether data can be written - status.can_write = RMT_FALSE; - while (!status.can_write) - { - status = TCPSocket_PollStatus(tcp_socket); - if (status.error_state != RMT_ERROR_NONE) - return status.error_state; - - cur_ms = msTimer_Get(); - if (cur_ms - start_ms > timeout_ms) - return RMT_ERROR_SOCKET_SEND_TIMEOUT; - } - - cur_data = (char*)data; - end_data = cur_data + length; - - while (cur_data < end_data) - { - // Attempt to send the remaining chunk of data - int bytes_sent; - int send_flags = 0; -#ifdef MSG_NOSIGNAL - // On Linux this prevents send from emitting a SIGPIPE signal - // Equivalent on BSD to the SO_NOSIGPIPE option. - send_flags = MSG_NOSIGNAL; -#endif - bytes_sent = (int)send(tcp_socket->socket, cur_data, (int)(end_data - cur_data), send_flags); - - if (bytes_sent == SOCKET_ERROR || bytes_sent == 0) - { - // Close the connection if sending fails for any other reason other than blocking - if (bytes_sent != 0 && !TCPSocketWouldBlock()) - return RMT_ERROR_SOCKET_SEND_FAIL; - - // First check for tick-count overflow and reset, giving a slight hitch every 49.7 days - cur_ms = msTimer_Get(); - if (cur_ms < start_ms) - { - start_ms = cur_ms; - continue; - } - - // - // Timeout can happen when: - // - // 1) endpoint is no longer there - // 2) endpoint can't consume quick enough - // 3) local buffers overflow - // - // As none of these are actually errors, we have to pass this timeout back to the caller. - // - // TODO: This strategy breaks down if a send partially completes and then times out! - // - if (cur_ms - start_ms > timeout_ms) - { - return RMT_ERROR_SOCKET_SEND_TIMEOUT; - } - } - else - { - // Jump over the data sent - cur_data += bytes_sent; - } - } - - return RMT_ERROR_NONE; -} - - -static rmtError TCPSocket_Receive(TCPSocket* tcp_socket, void* data, rmtU32 length, rmtU32 timeout_ms) -{ - SocketStatus status; - char* cur_data = NULL; - char* end_data = NULL; - rmtU32 start_ms = 0; - rmtU32 cur_ms = 0; - - assert(tcp_socket != NULL); - - // Ensure there is data to receive - status = TCPSocket_PollStatus(tcp_socket); - if (status.error_state != RMT_ERROR_NONE) - return status.error_state; - if (!status.can_read) - return RMT_ERROR_SOCKET_RECV_NO_DATA; - - cur_data = (char*)data; - end_data = cur_data + length; - - // Loop until all data has been received - start_ms = msTimer_Get(); - while (cur_data < end_data) - { - int bytes_received = (int)recv(tcp_socket->socket, cur_data, (int)(end_data - cur_data), 0); - - if (bytes_received == SOCKET_ERROR || bytes_received == 0) - { - // Close the connection if receiving fails for any other reason other than blocking - if (bytes_received != 0 && !TCPSocketWouldBlock()) - return RMT_ERROR_SOCKET_RECV_FAILED; - - // First check for tick-count overflow and reset, giving a slight hitch every 49.7 days - cur_ms = msTimer_Get(); - if (cur_ms < start_ms) - { - start_ms = cur_ms; - continue; - } - - // - // Timeout can happen when: - // - // 1) data is delayed by sender - // 2) sender fails to send a complete set of packets - // - // As not all of these scenarios are errors, we need to pass this information back to the caller. - // - // TODO: This strategy breaks down if a receive partially completes and then times out! - // - if (cur_ms - start_ms > timeout_ms) - { - return RMT_ERROR_SOCKET_RECV_TIMEOUT; - } - } - else - { - // Jump over the data received - cur_data += bytes_received; - } - } - - return RMT_ERROR_NONE; -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @SHA1: SHA-1 Cryptographic Hash Function ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - -// -// Typed to allow enforced data size specification -// -typedef struct -{ - rmtU8 data[20]; -} SHA1; - - -/* - Copyright (c) 2011, Micael Hildenborg - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Micael Hildenborg nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY Micael Hildenborg ''AS IS'' AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL Micael Hildenborg BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - Contributors: - Gustav - Several members in the gamedev.se forum. - Gregory Petrosyan - */ - - -// Rotate an integer value to left. -static unsigned int rol(const unsigned int value, const unsigned int steps) -{ - return ((value << steps) | (value >> (32 - steps))); -} - - -// Sets the first 16 integers in the buffert to zero. -// Used for clearing the W buffert. -static void clearWBuffert(unsigned int* buffert) -{ - int pos; - for (pos = 16; --pos >= 0;) - { - buffert[pos] = 0; - } -} - -static void innerHash(unsigned int* result, unsigned int* w) -{ - unsigned int a = result[0]; - unsigned int b = result[1]; - unsigned int c = result[2]; - unsigned int d = result[3]; - unsigned int e = result[4]; - - int round = 0; - - #define sha1macro(func,val) \ - { \ - const unsigned int t = rol(a, 5) + (func) + e + val + w[round]; \ - e = d; \ - d = c; \ - c = rol(b, 30); \ - b = a; \ - a = t; \ - } - - while (round < 16) - { - sha1macro((b & c) | (~b & d), 0x5a827999) - ++round; - } - while (round < 20) - { - w[round] = rol((w[round - 3] ^ w[round - 8] ^ w[round - 14] ^ w[round - 16]), 1); - sha1macro((b & c) | (~b & d), 0x5a827999) - ++round; - } - while (round < 40) - { - w[round] = rol((w[round - 3] ^ w[round - 8] ^ w[round - 14] ^ w[round - 16]), 1); - sha1macro(b ^ c ^ d, 0x6ed9eba1) - ++round; - } - while (round < 60) - { - w[round] = rol((w[round - 3] ^ w[round - 8] ^ w[round - 14] ^ w[round - 16]), 1); - sha1macro((b & c) | (b & d) | (c & d), 0x8f1bbcdc) - ++round; - } - while (round < 80) - { - w[round] = rol((w[round - 3] ^ w[round - 8] ^ w[round - 14] ^ w[round - 16]), 1); - sha1macro(b ^ c ^ d, 0xca62c1d6) - ++round; - } - - #undef sha1macro - - result[0] += a; - result[1] += b; - result[2] += c; - result[3] += d; - result[4] += e; -} - - -static void calc(const void* src, const int bytelength, unsigned char* hash) -{ - int roundPos; - int lastBlockBytes; - int hashByte; - - // Init the result array. - unsigned int result[5] = { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 }; - - // Cast the void src pointer to be the byte array we can work with. - const unsigned char* sarray = (const unsigned char*) src; - - // The reusable round buffer - unsigned int w[80]; - - // Loop through all complete 64byte blocks. - const int endOfFullBlocks = bytelength - 64; - int endCurrentBlock; - int currentBlock = 0; - - while (currentBlock <= endOfFullBlocks) - { - endCurrentBlock = currentBlock + 64; - - // Init the round buffer with the 64 byte block data. - for (roundPos = 0; currentBlock < endCurrentBlock; currentBlock += 4) - { - // This line will swap endian on big endian and keep endian on little endian. - w[roundPos++] = (unsigned int) sarray[currentBlock + 3] - | (((unsigned int) sarray[currentBlock + 2]) << 8) - | (((unsigned int) sarray[currentBlock + 1]) << 16) - | (((unsigned int) sarray[currentBlock]) << 24); - } - innerHash(result, w); - } - - // Handle the last and not full 64 byte block if existing. - endCurrentBlock = bytelength - currentBlock; - clearWBuffert(w); - lastBlockBytes = 0; - for (;lastBlockBytes < endCurrentBlock; ++lastBlockBytes) - { - w[lastBlockBytes >> 2] |= (unsigned int) sarray[lastBlockBytes + currentBlock] << ((3 - (lastBlockBytes & 3)) << 3); - } - w[lastBlockBytes >> 2] |= 0x80U << ((3 - (lastBlockBytes & 3)) << 3); - if (endCurrentBlock >= 56) - { - innerHash(result, w); - clearWBuffert(w); - } - w[15] = bytelength << 3; - innerHash(result, w); - - // Store hash in result pointer, and make sure we get in in the correct order on both endian models. - for (hashByte = 20; --hashByte >= 0;) - { - hash[hashByte] = (result[hashByte >> 2] >> (((3 - hashByte) & 0x3) << 3)) & 0xff; - } -} - - -static SHA1 SHA1_Calculate(const void* src, unsigned int length) -{ - SHA1 hash; - assert((int)length >= 0); - calc(src, length, hash.data); - return hash; -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @BASE64: Base-64 encoder ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -static const char* b64_encoding_table = - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/"; - - -static rmtU32 Base64_CalculateEncodedLength(rmtU32 length) -{ - // ceil(l * 4/3) - return 4 * ((length + 2) / 3); -} - - -static void Base64_Encode(const rmtU8* in_bytes, rmtU32 length, rmtU8* out_bytes) -{ - rmtU32 i; - rmtU32 encoded_length; - rmtU32 remaining_bytes; - - rmtU8* optr = out_bytes; - - for (i = 0; i < length; ) - { - // Read input 3 values at a time, null terminating - rmtU32 c0 = i < length ? in_bytes[i++] : 0; - rmtU32 c1 = i < length ? in_bytes[i++] : 0; - rmtU32 c2 = i < length ? in_bytes[i++] : 0; - - // Encode 4 bytes for ever 3 input bytes - rmtU32 triple = (c0 << 0x10) + (c1 << 0x08) + c2; - *optr++ = b64_encoding_table[(triple >> 3 * 6) & 0x3F]; - *optr++ = b64_encoding_table[(triple >> 2 * 6) & 0x3F]; - *optr++ = b64_encoding_table[(triple >> 1 * 6) & 0x3F]; - *optr++ = b64_encoding_table[(triple >> 0 * 6) & 0x3F]; - } - - // Pad output to multiple of 3 bytes with terminating '=' - encoded_length = Base64_CalculateEncodedLength(length); - remaining_bytes = (3 - ((length + 2) % 3)) - 1; - for (i = 0; i < remaining_bytes; i++) - out_bytes[encoded_length - 1 - i] = '='; - - // Null terminate - out_bytes[encoded_length] = 0; -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @MURMURHASH: MurmurHash3 - https://code.google.com/p/smhasher ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - -//----------------------------------------------------------------------------- -// MurmurHash3 was written by Austin Appleby, and is placed in the public -// domain. The author hereby disclaims copyright to this source code. -//----------------------------------------------------------------------------- - - -static rmtU32 rotl32(rmtU32 x, rmtS8 r) -{ - return (x << r) | (x >> (32 - r)); -} - - -// Block read - if your platform needs to do endian-swapping or can only -// handle aligned reads, do the conversion here -static rmtU32 getblock32(const rmtU32* p, int i) -{ - return p[i]; -} - - -// Finalization mix - force all bits of a hash block to avalanche -static rmtU32 fmix32(rmtU32 h) -{ - h ^= h >> 16; - h *= 0x85ebca6b; - h ^= h >> 13; - h *= 0xc2b2ae35; - h ^= h >> 16; - return h; -} - - -static rmtU32 MurmurHash3_x86_32(const void* key, int len, rmtU32 seed) -{ - const rmtU8* data = (const rmtU8*)key; - const int nblocks = len / 4; - - rmtU32 h1 = seed; - - const rmtU32 c1 = 0xcc9e2d51; - const rmtU32 c2 = 0x1b873593; - - int i; - - const rmtU32 * blocks = (const rmtU32 *)(data + nblocks*4); - const rmtU8 * tail = (const rmtU8*)(data + nblocks*4); - - rmtU32 k1 = 0; - - //---------- - // body - - for (i = -nblocks; i; i++) - { - rmtU32 k2 = getblock32(blocks,i); - - k2 *= c1; - k2 = rotl32(k2,15); - k2 *= c2; - - h1 ^= k2; - h1 = rotl32(h1,13); - h1 = h1*5+0xe6546b64; - } - - //---------- - // tail - - switch(len & 3) - { - case 3: k1 ^= tail[2] << 16; - case 2: k1 ^= tail[1] << 8; - case 1: k1 ^= tail[0]; - k1 *= c1; - k1 = rotl32(k1,15); - k1 *= c2; - h1 ^= k1; - }; - - //---------- - // finalization - - h1 ^= len; - - h1 = fmix32(h1); - - return h1; -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @WEBSOCKETS: WebSockets ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -enum WebSocketMode -{ - WEBSOCKET_NONE = 0, - WEBSOCKET_TEXT = 1, - WEBSOCKET_BINARY = 2, -}; - - -typedef struct -{ - TCPSocket* tcp_socket; - - enum WebSocketMode mode; - - rmtU32 frame_bytes_remaining; - rmtU32 mask_offset; - - union - { - rmtU8 mask[4]; - rmtU32 mask_u32; - } data; - -} WebSocket; - - -static void WebSocket_Close(WebSocket* web_socket); - - -static char* GetField(char* buffer, rsize_t buffer_length, rmtPStr field_name) -{ - char* field = NULL; - char* buffer_end = buffer + buffer_length - 1; - - rsize_t field_length = strnlen_s(field_name, buffer_length); - if (field_length == 0) - return NULL; - - // Search for the start of the field - if (strstr_s(buffer, buffer_length, field_name, field_length, &field) != EOK) - return NULL; - - // Field name is now guaranteed to be in the buffer so its safe to jump over it without hitting the bounds - field += strlen(field_name); - - // Skip any trailing whitespace - while (*field == ' ') - { - if (field >= buffer_end) - return NULL; - field++; - } - - return field; -} - - -static const char websocket_guid[] = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; -static const char websocket_response[] = - "HTTP/1.1 101 Switching Protocols\r\n" - "Upgrade: websocket\r\n" - "Connection: Upgrade\r\n" - "Sec-WebSocket-Accept: "; - - -static rmtError WebSocketHandshake(TCPSocket* tcp_socket, rmtPStr limit_host) -{ - rmtU32 start_ms, now_ms; - - // Parsing scratchpad - char buffer[1024]; - char* buffer_ptr = buffer; - int buffer_len = sizeof(buffer) - 1; - char* buffer_end = buffer + buffer_len; - - char response_buffer[256]; - int response_buffer_len = sizeof(response_buffer) - 1; - - char* version; - char* host; - char* key; - char* key_end; - SHA1 hash; - - assert(tcp_socket != NULL); - - start_ms = msTimer_Get(); - - // Really inefficient way of receiving the handshake data from the browser - // Not really sure how to do this any better, as the termination requirement is \r\n\r\n - while (buffer_ptr - buffer < buffer_len) - { - rmtError error = TCPSocket_Receive(tcp_socket, buffer_ptr, 1, 20); - if (error == RMT_ERROR_SOCKET_RECV_FAILED) - return error; - - // If there's a stall receiving the data, check for a handshake timeout - if (error == RMT_ERROR_SOCKET_RECV_NO_DATA || error == RMT_ERROR_SOCKET_RECV_TIMEOUT) - { - now_ms = msTimer_Get(); - if (now_ms - start_ms > 1000) - return RMT_ERROR_SOCKET_RECV_TIMEOUT; - - continue; - } - - // Just in case new enums are added... - assert(error == RMT_ERROR_NONE); - - if (buffer_ptr - buffer >= 4) - { - if (*(buffer_ptr - 3) == '\r' && - *(buffer_ptr - 2) == '\n' && - *(buffer_ptr - 1) == '\r' && - *(buffer_ptr - 0) == '\n') - break; - } - - buffer_ptr++; - } - *buffer_ptr = 0; - - // HTTP GET instruction - if (memcmp(buffer, "GET", 3) != 0) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_NOT_GET; - - // Look for the version number and verify that it's supported - version = GetField(buffer, buffer_len, "Sec-WebSocket-Version:"); - if (version == NULL) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_NO_VERSION; - if (buffer_end - version < 2 || (version[0] != '8' && (version[0] != '1' || version[1] != '3'))) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_BAD_VERSION; - - // Make sure this connection comes from a known host - host = GetField(buffer, buffer_len, "Host:"); - if (host == NULL) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_NO_HOST; - if (limit_host != NULL) - { - rsize_t limit_host_len = strnlen_s(limit_host, 128); - char* found = NULL; - if (strstr_s(host, buffer_end - host, limit_host, limit_host_len, &found) != EOK) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_BAD_HOST; - } - - // Look for the key start and null-terminate it within the receive buffer - key = GetField(buffer, buffer_len, "Sec-WebSocket-Key:"); - if (key == NULL) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_NO_KEY; - if (strstr_s(key, buffer_end - key, "\r\n", 2, &key_end) != EOK) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_BAD_KEY; - *key_end = 0; - - // Concatenate the browser's key with the WebSocket Protocol GUID and base64 encode - // the hash, to prove to the browser that this is a bonafide WebSocket server - buffer[0] = 0; - if (strncat_s(buffer, buffer_len, key, key_end - key) != EOK) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_STRING_FAIL; - if (strncat_s(buffer, buffer_len, websocket_guid, sizeof(websocket_guid)) != EOK) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_STRING_FAIL; - hash = SHA1_Calculate(buffer, (rmtU32)strnlen_s(buffer, buffer_len)); - Base64_Encode(hash.data, sizeof(hash.data), (rmtU8*)buffer); - - // Send the response back to the server with a longer timeout than usual - response_buffer[0] = 0; - if (strncat_s(response_buffer, response_buffer_len, websocket_response, sizeof(websocket_response)) != EOK) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_STRING_FAIL; - if (strncat_s(response_buffer, response_buffer_len, buffer, buffer_len) != EOK) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_STRING_FAIL; - if (strncat_s(response_buffer, response_buffer_len, "\r\n\r\n", 4) != EOK) - return RMT_ERROR_WEBSOCKET_HANDSHAKE_STRING_FAIL; - - return TCPSocket_Send(tcp_socket, response_buffer, (rmtU32)strnlen_s(response_buffer, response_buffer_len), 1000); -} - - -static rmtError WebSocket_Constructor(WebSocket* web_socket, TCPSocket* tcp_socket) -{ - rmtError error = RMT_ERROR_NONE; - - assert(web_socket != NULL); - web_socket->tcp_socket = tcp_socket; - web_socket->mode = WEBSOCKET_NONE; - web_socket->frame_bytes_remaining = 0; - web_socket->mask_offset = 0; - web_socket->data.mask[0] = 0; - web_socket->data.mask[1] = 0; - web_socket->data.mask[2] = 0; - web_socket->data.mask[3] = 0; - - // Caller can optionally specify which TCP socket to use - if (web_socket->tcp_socket == NULL) - New_0(TCPSocket, web_socket->tcp_socket); - - return error; -} - - -static void WebSocket_Destructor(WebSocket* web_socket) -{ - WebSocket_Close(web_socket); -} - - -static rmtError WebSocket_RunServer(WebSocket* web_socket, rmtU16 port, rmtBool limit_connections_to_localhost, enum WebSocketMode mode) -{ - // Create the server's listening socket - assert(web_socket != NULL); - web_socket->mode = mode; - return TCPSocket_RunServer(web_socket->tcp_socket, port, limit_connections_to_localhost); -} - - -static void WebSocket_Close(WebSocket* web_socket) -{ - assert(web_socket != NULL); - Delete(TCPSocket, web_socket->tcp_socket); -} - - -static SocketStatus WebSocket_PollStatus(WebSocket* web_socket) -{ - assert(web_socket != NULL); - return TCPSocket_PollStatus(web_socket->tcp_socket); -} - - -static rmtError WebSocket_AcceptConnection(WebSocket* web_socket, WebSocket** client_socket) -{ - TCPSocket* tcp_socket = NULL; - rmtError error; - - // Is there a waiting connection? - assert(web_socket != NULL); - error = TCPSocket_AcceptConnection(web_socket->tcp_socket, &tcp_socket); - if (error != RMT_ERROR_NONE || tcp_socket == NULL) - return error; - - // Need a successful handshake between client/server before allowing the connection - // TODO: Specify limit_host - error = WebSocketHandshake(tcp_socket, NULL); - if (error != RMT_ERROR_NONE) - return error; - - // Allocate and return a new client socket - assert(client_socket != NULL); - New_1(WebSocket, *client_socket, tcp_socket); - if (error != RMT_ERROR_NONE) - return error; - - (*client_socket)->mode = web_socket->mode; - - return RMT_ERROR_NONE; -} - - -static void WriteSize(rmtU32 size, rmtU8* dest, rmtU32 dest_size, rmtU32 dest_offset) -{ - int size_size = dest_size - dest_offset; - rmtU32 i; - for (i = 0; i < dest_size; i++) - { - int j = i - dest_offset; - dest[i] = (j < 0) ? 0 : (size >> ((size_size - j - 1) * 8)) & 0xFF; - } -} - - -static rmtError WebSocket_Send(WebSocket* web_socket, const void* data, rmtU32 length, rmtU32 timeout_ms) -{ - rmtError error; - SocketStatus status; - rmtU8 final_fragment, frame_type, frame_header[10]; - rmtU32 frame_header_size; - - assert(web_socket != NULL); - - // Can't send if there are socket errors - status = WebSocket_PollStatus(web_socket); - if (status.error_state != RMT_ERROR_NONE) - return status.error_state; - - final_fragment = 0x1 << 7; - frame_type = (rmtU8)web_socket->mode; - frame_header[0] = final_fragment | frame_type; - - // Construct the frame header, correctly applying the narrowest size - frame_header_size = 0; - if (length <= 125) - { - frame_header_size = 2; - frame_header[1] = (rmtU8)length; - } - else if (length <= 65535) - { - frame_header_size = 2 + 2; - frame_header[1] = 126; - WriteSize(length, frame_header + 2, 2, 0); - } - else - { - frame_header_size = 2 + 8; - frame_header[1] = 127; - WriteSize(length, frame_header + 2, 8, 4); - } - - // Send frame header - assert(data != NULL); - error = TCPSocket_Send(web_socket->tcp_socket, frame_header, frame_header_size, timeout_ms); - if (error != RMT_ERROR_NONE) - return error; - - // Send frame data separately so that we don't have to allocate memory or memcpy it into - // the same buffer as the header. - // If this step times out then the frame data will be discarded and the browser will receive - // an invalid frame without its data, forcing a disconnect error. - // Before things get that far, flag this as a send fail and let the server schedule a graceful - // disconnect. - error = TCPSocket_Send(web_socket->tcp_socket, data, length, timeout_ms); - if (error == RMT_ERROR_SOCKET_SEND_TIMEOUT) - error = RMT_ERROR_SOCKET_SEND_FAIL; - - return error; -} - - -static rmtError ReceiveFrameHeader(WebSocket* web_socket) -{ - // TODO: Specify infinite timeout? - - rmtError error; - rmtU8 msg_header[2] = { 0, 0 }; - int msg_length, size_bytes_remaining, i; - rmtBool mask_present; - - assert(web_socket != NULL); - - // Get message header - error = TCPSocket_Receive(web_socket->tcp_socket, msg_header, 2, 20); - if (error != RMT_ERROR_NONE) - return error; - - // Check for WebSocket Protocol disconnect - if (msg_header[0] == 0x88) - return RMT_ERROR_WEBSOCKET_DISCONNECTED; - - // Check that the client isn't sending messages we don't understand - if (msg_header[0] != 0x81 && msg_header[0] != 0x82) - return RMT_ERROR_WEBSOCKET_BAD_FRAME_HEADER; - - // Get message length and check to see if it's a marker for a wider length - msg_length = msg_header[1] & 0x7F; - size_bytes_remaining = 0; - switch (msg_length) - { - case 126: size_bytes_remaining = 2; break; - case 127: size_bytes_remaining = 8; break; - } - - if (size_bytes_remaining > 0) - { - // Receive the wider bytes of the length - rmtU8 size_bytes[4]; - error = TCPSocket_Receive(web_socket->tcp_socket, size_bytes, size_bytes_remaining, 20); - if (error != RMT_ERROR_NONE) - return RMT_ERROR_WEBSOCKET_BAD_FRAME_HEADER_SIZE; - - // Calculate new length, MSB first - msg_length = 0; - for (i = 0; i < size_bytes_remaining; i++) - msg_length |= size_bytes[i] << ((size_bytes_remaining - 1 - i) * 8); - } - - // Receive any message data masks - mask_present = (msg_header[1] & 0x80) != 0 ? RMT_TRUE : RMT_FALSE; - if (mask_present) - { - error = TCPSocket_Receive(web_socket->tcp_socket, web_socket->data.mask, 4, 20); - if (error != RMT_ERROR_NONE) - return error; - } - - web_socket->frame_bytes_remaining = msg_length; - web_socket->mask_offset = 0; - - return RMT_ERROR_NONE; -} - - -static rmtError WebSocket_Receive(WebSocket* web_socket, void* data, rmtU32* msg_len, rmtU32 length, rmtU32 timeout_ms) -{ - SocketStatus status; - char* cur_data; - char* end_data; - rmtU32 start_ms, now_ms; - rmtU32 bytes_to_read; - rmtError error; - - assert(web_socket != NULL); - - // Can't read with any socket errors - status = WebSocket_PollStatus(web_socket); - if (status.error_state != RMT_ERROR_NONE) - return status.error_state; - - cur_data = (char*)data; - end_data = cur_data + length; - - start_ms = msTimer_Get(); - while (cur_data < end_data) - { - // Get next WebSocket frame if we've run out of data to read from the socket - if (web_socket->frame_bytes_remaining == 0) - { - error = ReceiveFrameHeader(web_socket); - if (error != RMT_ERROR_NONE) - return error; - - // Set output message length only on initial receive - if (msg_len != NULL) - *msg_len = web_socket->frame_bytes_remaining; - } - - // Read as much required data as possible - bytes_to_read = web_socket->frame_bytes_remaining < length ? web_socket->frame_bytes_remaining : length; - error = TCPSocket_Receive(web_socket->tcp_socket, cur_data, bytes_to_read, 20); - if (error == RMT_ERROR_SOCKET_RECV_FAILED) - return error; - - // If there's a stall receiving the data, check for timeout - if (error == RMT_ERROR_SOCKET_RECV_NO_DATA || error == RMT_ERROR_SOCKET_RECV_TIMEOUT) - { - now_ms = msTimer_Get(); - if (now_ms - start_ms > timeout_ms) - return RMT_ERROR_SOCKET_RECV_TIMEOUT; - continue; - } - - // Apply data mask - if (web_socket->data.mask_u32 != 0) - { - rmtU32 i; - for (i = 0; i < bytes_to_read; i++) - { - *((rmtU8*)cur_data + i) ^= web_socket->data.mask[web_socket->mask_offset & 3]; - web_socket->mask_offset++; - } - } - - cur_data += bytes_to_read; - web_socket->frame_bytes_remaining -= bytes_to_read; - } - - return RMT_ERROR_NONE; -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @MESSAGEQ: Multiple producer, single consumer message queue ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - -typedef enum MessageID -{ - MsgID_NotReady, - MsgID_LogText, - MsgID_SampleTree, -} MessageID; - - -typedef struct Message -{ - MessageID id; - - rmtU32 payload_size; - - // For telling which thread the message came from in the debugger - struct ThreadSampler* thread_sampler; - - rmtU8 payload[1]; -} Message; - - -// Multiple producer, single consumer message queue that uses its own data buffer -// to store the message data. -typedef struct rmtMessageQueue -{ - rmtU32 size; - - // The physical address of this data buffer is pointed to by two sequential - // virtual memory pages, allowing automatic wrap-around of any reads or writes - // that exceed the limits of the buffer. - VirtualMirrorBuffer* data; - - // Read/write position never wrap allowing trivial overflow checks - // with easier debugging - rmtU32 read_pos; - rmtU32 write_pos; - -} rmtMessageQueue; - - -static rmtError rmtMessageQueue_Constructor(rmtMessageQueue* queue, rmtU32 size) -{ - rmtError error; - - assert(queue != NULL); - - // Set defaults - queue->size = 0; - queue->data = NULL; - queue->read_pos = 0; - queue->write_pos = 0; - - New_2(VirtualMirrorBuffer, queue->data, size, 10); - if (error != RMT_ERROR_NONE) - return error; - - // The mirror buffer needs to be page-aligned and will change the requested - // size to match that. - queue->size = queue->data->size; - - // Set the entire buffer to not ready message - memset(queue->data->ptr, MsgID_NotReady, queue->size); - - return RMT_ERROR_NONE; -} - - -static void rmtMessageQueue_Destructor(rmtMessageQueue* queue) -{ - assert(queue != NULL); - Delete(VirtualMirrorBuffer, queue->data); -} - - -static rmtU32 rmtMessageQueue_SizeForPayload(rmtU32 payload_size) -{ - // Add message header and align for ARM platforms - rmtU32 size = sizeof(Message) + payload_size; - size = (size + 3) & ~3U; - return size; -} - - -static Message* rmtMessageQueue_AllocMessage(rmtMessageQueue* queue, rmtU32 payload_size, struct ThreadSampler* thread_sampler) -{ - Message* msg; - - rmtU32 write_size = rmtMessageQueue_SizeForPayload(payload_size); - - assert(queue != NULL); - - for (;;) - { - // Check for potential overflow - rmtU32 s = queue->size; - rmtU32 r = queue->read_pos; - rmtU32 w = queue->write_pos; - if ((int)(w - r) > ((int)(s - write_size))) - return NULL; - - // Point to the newly allocated space - msg = (Message*)(queue->data->ptr + (w & (s - 1))); - - // Increment the write position, leaving the loop if this is the thread that succeeded - if (AtomicCompareAndSwap(&queue->write_pos, w, w + write_size) == RMT_TRUE) - { - // Safe to set payload size after thread claims ownership of this allocated range - msg->payload_size = payload_size; - msg->thread_sampler = thread_sampler; - break; - } - } - - return msg; -} - - -static void rmtMessageQueue_CommitMessage(Message* message, MessageID id) -{ - assert(message != NULL); - - // Ensure message writes complete before commit - WriteFence(); - - // Setting the message ID signals to the consumer that the message is ready - assert(message->id == MsgID_NotReady); - message->id = id; -} - - -Message* rmtMessageQueue_PeekNextMessage(rmtMessageQueue* queue) -{ - Message* ptr; - rmtU32 r; - - assert(queue != NULL); - - // First check that there are bytes queued - if (queue->write_pos - queue->read_pos == 0) - return NULL; - - // Messages are in the queue but may not have been commit yet - // Messages behind this one may have been commit but it's not reachable until - // the next one in the queue is ready. - r = queue->read_pos & (queue->size - 1); - ptr = (Message*)(queue->data->ptr + r); - if (ptr->id != MsgID_NotReady) - return ptr; - - return NULL; -} - - -static void rmtMessageQueue_ConsumeNextMessage(rmtMessageQueue* queue, Message* message) -{ - rmtU32 message_size; - - assert(queue != NULL); - assert(message != NULL); - - // Setting the message ID to "not ready" serves as a marker to the consumer that even though - // space has been allocated for a message, the message isn't ready to be consumed - // yet. - // - // We can't do that when allocating the message because multiple threads will be fighting for - // the same location. Instead, clear out any messages just read by the consumer before advancing - // the read position so that a winning thread's allocation will inherit the "not ready" state. - // - // This costs some write bandwidth and has the potential to flush cache to other cores. - message_size = rmtMessageQueue_SizeForPayload(message->payload_size); - memset(message, MsgID_NotReady, message_size); - - // Ensure clear completes before advancing the read position - WriteFence(); - queue->read_pos += message_size; -} - - -static rmtBool rmtMessageQueue_IsEmpty(rmtMessageQueue* queue) -{ - assert(queue != NULL); - return queue->write_pos - queue->read_pos == 0; -} - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @NETWORK: Network Server ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - -typedef rmtError (*Server_ReceiveHandler)(void*, char*, rmtU32); - - -typedef struct -{ - WebSocket* listen_socket; - - WebSocket* client_socket; - - rmtU32 last_ping_time; - - rmtU16 port; - rmtBool limit_connections_to_localhost; - - // Handler for receiving messages from the client - Server_ReceiveHandler receive_handler; - void* receive_handler_context; -} Server; - - -static rmtError Server_CreateListenSocket(Server* server, rmtU16 port, rmtBool limit_connections_to_localhost) -{ - rmtError error = RMT_ERROR_NONE; - - New_1(WebSocket, server->listen_socket, NULL); - if (error == RMT_ERROR_NONE) - error = WebSocket_RunServer(server->listen_socket, port, limit_connections_to_localhost, WEBSOCKET_BINARY); - - return error; -} - - -static rmtError Server_Constructor(Server* server, rmtU16 port, rmtBool limit_connections_to_localhost) -{ - assert(server != NULL); - server->listen_socket = NULL; - server->client_socket = NULL; - server->last_ping_time = 0; - server->port = port; - server->limit_connections_to_localhost = limit_connections_to_localhost; - server->receive_handler = NULL; - server->receive_handler_context = NULL; - - // Create the listening WebSocket - return Server_CreateListenSocket(server, port, limit_connections_to_localhost); -} - - -static void Server_Destructor(Server* server) -{ - assert(server != NULL); - Delete(WebSocket, server->client_socket); - Delete(WebSocket, server->listen_socket); -} - - -static rmtBool Server_IsClientConnected(Server* server) -{ - assert(server != NULL); - return server->client_socket != NULL ? RMT_TRUE : RMT_FALSE; -} - - -static void Server_DisconnectClient(Server* server) -{ - WebSocket* client_socket; - - assert(server != NULL); - - // NULL the variable before destroying the socket - client_socket = server->client_socket; - server->client_socket = NULL; - WriteFence(); - Delete(WebSocket, client_socket); -} - - -static rmtError Server_Send(Server* server, const void* data, rmtU32 length, rmtU32 timeout) -{ - assert(server != NULL); - if (Server_IsClientConnected(server)) - { - rmtError error = WebSocket_Send(server->client_socket, data, length, timeout); - if (error == RMT_ERROR_SOCKET_SEND_FAIL) - Server_DisconnectClient(server); - - return error; - } - - return RMT_ERROR_NONE; -} - - -static rmtError Server_ReceiveMessage(Server* server, char message_first_byte, rmtU32 message_length) -{ - char message_data[1024]; - rmtError error; - - // Check for potential message data overflow - if (message_length >= sizeof(message_data) - 1) - { - rmt_LogText("Ignoring console input bigger than internal receive buffer (1024 bytes)"); - return RMT_ERROR_NONE; - } - - // Receive the rest of the message - message_data[0] = message_first_byte; - error = WebSocket_Receive(server->client_socket, message_data + 1, NULL, message_length - 1, 100); - if (error != RMT_ERROR_NONE) - return error; - message_data[message_length] = 0; - - // Each message must have a descriptive 4 byte header - if (message_length < 4) - return RMT_ERROR_NONE; - - // Dispatch to handler - if (server->receive_handler) - error = server->receive_handler(server->receive_handler_context, message_data, message_length); - - return error; -} - - -static void Server_Update(Server* server) -{ - rmtU32 cur_time; - - assert(server != NULL); - - // Recreate the listening socket if it's been destroyed earlier - if (server->listen_socket == NULL) - Server_CreateListenSocket(server, server->port, server->limit_connections_to_localhost); - - if (server->listen_socket != NULL && server->client_socket == NULL) - { - // Accept connections as long as there is no client connected - WebSocket* client_socket = NULL; - rmtError error = WebSocket_AcceptConnection(server->listen_socket, &client_socket); - if (error == RMT_ERROR_NONE) - { - server->client_socket = client_socket; - } - else - { - // Destroy the listen socket on failure to accept - // It will get recreated in another update - Delete(WebSocket, server->listen_socket); - } - } - - else - { - // Loop checking for incoming messages - for (;;) - { - // Inspect first byte to see if a message is there - char message_first_byte; - rmtU32 message_length; - rmtError error = WebSocket_Receive(server->client_socket, &message_first_byte, &message_length, 1, 0); - if (error == RMT_ERROR_NONE) - { - // Parse remaining message - error = Server_ReceiveMessage(server, message_first_byte, message_length); - if (error != RMT_ERROR_NONE) - { - Server_DisconnectClient(server); - break; - } - - // Check for more... - continue; - } - - // Passable errors... - if (error == RMT_ERROR_SOCKET_RECV_NO_DATA) - { - // No data available - break; - } - - if (error == RMT_ERROR_SOCKET_RECV_TIMEOUT) - { - // Data not available yet, can afford to ignore as we're only reading the first byte - break; - } - - // Anything else is an error that may have closed the connection - Server_DisconnectClient(server); - break; - } - } - - // Send pings to the client every second - cur_time = msTimer_Get(); - if (cur_time - server->last_ping_time > 1000) - { - rmtPStr ping_message = "PING"; - Server_Send(server, ping_message, (rmtU32)strlen(ping_message), 4); - server->last_ping_time = cur_time; - } -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @SAMPLE: Base Sample Description for CPU by default ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -#define SAMPLE_NAME_LEN 128 - - -enum SampleType -{ - SampleType_CPU, - SampleType_CUDA, - SampleType_D3D11, - SampleType_OpenGL, - SampleType_Metal, - SampleType_Count, -}; - - -typedef struct Sample -{ - // Inherit so that samples can be quickly allocated - ObjectLink Link; - - enum SampleType type; - - // Used to anonymously copy sample data without knowning its type - rmtU32 size_bytes; - - // Hash generated from sample name - rmtU32 name_hash; - - // Unique, persistent ID among all samples - rmtU32 unique_id; - - // Null-terminated string storing the hash-prefixed 6-digit colour - rmtU8 unique_id_html_colour[8]; - - // Links to related samples in the tree - struct Sample* parent; - struct Sample* first_child; - struct Sample* last_child; - struct Sample* next_sibling; - - // Keep track of child count to distinguish from repeated calls to the same function at the same stack level - // This is also mixed with the callstack hash to allow consistent addressing of any point in the tree - rmtU32 nb_children; - - // Sample end points and length in microseconds - rmtU64 us_start; - rmtU64 us_end; - rmtU64 us_length; - -} Sample; - - -static rmtError Sample_Constructor(Sample* sample) -{ - assert(sample != NULL); - - ObjectLink_Constructor((ObjectLink*)sample); - - sample->type = SampleType_CPU; - sample->size_bytes = sizeof(Sample); - sample->name_hash = 0; - sample->unique_id = 0; - sample->unique_id_html_colour[0] = '#'; - sample->unique_id_html_colour[1] = 0; - sample->unique_id_html_colour[7] = 0; - sample->parent = NULL; - sample->first_child = NULL; - sample->last_child = NULL; - sample->next_sibling = NULL; - sample->nb_children = 0; - sample->us_start = 0; - sample->us_end = 0; - sample->us_length = 0; - - return RMT_ERROR_NONE; -} - - -static void Sample_Destructor(Sample* sample) -{ - RMT_UNREFERENCED_PARAMETER(sample); -} - - -static void Sample_Prepare(Sample* sample, rmtU32 name_hash, Sample* parent) -{ - sample->name_hash = name_hash; - sample->unique_id = 0; - sample->parent = parent; - sample->first_child = NULL; - sample->last_child = NULL; - sample->next_sibling = NULL; - sample->nb_children = 0; - sample->us_start = 0; - sample->us_end = 0; - sample->us_length = 0; -} - - -#define BIN_ERROR_CHECK(stmt) { error = stmt; if (error != RMT_ERROR_NONE) return error; } - - -static rmtError bin_SampleArray(Buffer* buffer, Sample* first_sample); - - -static rmtError bin_Sample(Buffer* buffer, Sample* sample) -{ - rmtError error; - - assert(sample != NULL); - - BIN_ERROR_CHECK(Buffer_WriteU32(buffer, sample->name_hash)); - BIN_ERROR_CHECK(Buffer_WriteU32(buffer, sample->unique_id)); - BIN_ERROR_CHECK(Buffer_Write(buffer, sample->unique_id_html_colour, 7)); - BIN_ERROR_CHECK(Buffer_WriteU64(buffer, sample->us_start)); - BIN_ERROR_CHECK(Buffer_WriteU64(buffer, maxS64(sample->us_length, 0))); - BIN_ERROR_CHECK(bin_SampleArray(buffer, sample)); - - return RMT_ERROR_NONE; -} - - -static rmtError bin_SampleArray(Buffer* buffer, Sample* parent_sample) -{ - rmtError error; - Sample* sample; - - BIN_ERROR_CHECK(Buffer_WriteU32(buffer, parent_sample->nb_children)); - for (sample = parent_sample->first_child; sample != NULL; sample = sample->next_sibling) - BIN_ERROR_CHECK(bin_Sample(buffer, sample)); - - return RMT_ERROR_NONE; -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @SAMPLETREE: A tree of samples with their allocator ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -typedef struct SampleTree -{ - // Allocator for all samples - ObjectAllocator* allocator; - - // Root sample for all samples created by this thread - Sample* root; - - // Most recently pushed sample - Sample* current_parent; - -} SampleTree; - - -static rmtError SampleTree_Constructor(SampleTree* tree, rmtU32 sample_size, ObjConstructor constructor, ObjDestructor destructor) -{ - rmtError error; - - assert(tree != NULL); - - tree->allocator = NULL; - tree->root = NULL; - tree->current_parent = NULL; - - // Create the sample allocator - New_3(ObjectAllocator, tree->allocator, sample_size, constructor, destructor); - if (error != RMT_ERROR_NONE) - return error; - - // Create a root sample that's around for the lifetime of the thread - error = ObjectAllocator_Alloc(tree->allocator, (void**)&tree->root); - if (error != RMT_ERROR_NONE) - return error; - Sample_Prepare(tree->root, 0, NULL); - tree->current_parent = tree->root; - - return RMT_ERROR_NONE; -} - - -static void SampleTree_Destructor(SampleTree* tree) -{ - assert(tree != NULL); - - if (tree->root != NULL) - { - ObjectAllocator_Free(tree->allocator, tree->root); - tree->root = NULL; - } - - Delete(ObjectAllocator, tree->allocator); -} - - -static rmtU32 HashCombine(rmtU32 hash_a, rmtU32 hash_b) -{ - // A sequence of 32 uniformly random bits so that each bit of the combined hash is changed on application - // Derived from the golden ratio: UINT_MAX / ((1 + sqrt(5)) / 2) - // In reality it's just an arbitrary value which happens to work well, avoiding mapping all zeros to zeros. - // http://burtleburtle.net/bob/hash/doobs.html - static rmtU32 random_bits = 0x9E3779B9; - hash_a ^= hash_b + random_bits + (hash_a << 6) + (hash_a >> 2); - return hash_a; -} - - -static rmtError SampleTree_Push(SampleTree* tree, rmtU32 name_hash, rmtU32 flags, Sample** sample) -{ - Sample* parent; - rmtError error; - rmtU32 unique_id; - - // As each tree has a root sample node allocated, a parent must always be present - assert(tree != NULL); - assert(tree->current_parent != NULL); - parent = tree->current_parent; - - if ((flags & RMTSF_Aggregate) != 0) - { - // Linear search for previous instance of this sample name - Sample* sibling; - for (sibling = parent->first_child; sibling != NULL; sibling = sibling->next_sibling) - { - if (sibling->name_hash == name_hash) - { - tree->current_parent = sibling; - *sample = sibling; - return RMT_ERROR_NONE; - } - } - } - - if (parent->name_hash == name_hash) - { - // TODO: Collapse recursion on flag? - } - - // Allocate a new sample - error = ObjectAllocator_Alloc(tree->allocator, (void**)sample); - if (error != RMT_ERROR_NONE) - return error; - Sample_Prepare(*sample, name_hash, parent); - - // Generate a unique ID for this sample in the tree - unique_id = parent->unique_id; - unique_id = HashCombine(unique_id, (*sample)->name_hash); - unique_id = HashCombine(unique_id, parent->nb_children); - (*sample)->unique_id = unique_id; - - // Add sample to its parent - parent->nb_children++; - if (parent->first_child == NULL) - { - parent->first_child = *sample; - parent->last_child = *sample; - } - else - { - assert(parent->last_child != NULL); - parent->last_child->next_sibling = *sample; - parent->last_child = *sample; - } - - // Make this sample the new parent of any newly created samples - tree->current_parent = *sample; - - return RMT_ERROR_NONE; -} - - -static void SampleTree_Pop(SampleTree* tree, Sample* sample) -{ - assert(tree != NULL); - assert(sample != NULL); - assert(sample != tree->root); - tree->current_parent = sample->parent; -} - - -static ObjectLink* FlattenSampleTree(Sample* sample, rmtU32* nb_samples) -{ - Sample* child; - ObjectLink* cur_link = &sample->Link; - - assert(sample != NULL); - assert(nb_samples != NULL); - - *nb_samples += 1; - sample->Link.next = (ObjectLink*)sample->first_child; - - // Link all children together - for (child = sample->first_child; child != NULL; child = child->next_sibling) - { - ObjectLink* last_link = FlattenSampleTree(child, nb_samples); - last_link->next = (ObjectLink*)child->next_sibling; - cur_link = last_link; - } - - // Clear child info - sample->first_child = NULL; - sample->last_child = NULL; - sample->nb_children = 0; - - return cur_link; -} - - -static void FreeSampleTree(Sample* sample, ObjectAllocator* allocator) -{ - // Chain all samples together in a flat list - rmtU32 nb_cleared_samples = 0; - ObjectLink* last_link = FlattenSampleTree(sample, &nb_cleared_samples); - - // Release the complete sample memory range - if (sample->Link.next != NULL) - ObjectAllocator_FreeRange(allocator, sample, last_link, nb_cleared_samples); - else - ObjectAllocator_Free(allocator, sample); -} - - -typedef struct Msg_SampleTree -{ - Sample* root_sample; - - ObjectAllocator* allocator; - - rmtPStr thread_name; -} Msg_SampleTree; - - -static void AddSampleTreeMessage(rmtMessageQueue* queue, Sample* sample, ObjectAllocator* allocator, rmtPStr thread_name, struct ThreadSampler* thread_sampler) -{ - Msg_SampleTree* payload; - - // Attempt to allocate a message for sending the tree to the viewer - Message* message = rmtMessageQueue_AllocMessage(queue, sizeof(Msg_SampleTree), thread_sampler); - if (message == NULL) - { - // Discard the tree on failure - FreeSampleTree(sample, allocator); - return; - } - - // Populate and commit - payload = (Msg_SampleTree*)message->payload; - payload->root_sample = sample; - payload->allocator = allocator; - payload->thread_name = thread_name; - rmtMessageQueue_CommitMessage(message, MsgID_SampleTree); -} - - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @TSAMPLER: Per-Thread Sampler ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -typedef struct ThreadSampler -{ - // Name to assign to the thread in the viewer - rmtS8 name[64]; - - // Store a unique sample tree for each type - SampleTree* sample_trees[SampleType_Count]; - - // Table of all sample names encountered on this thread - StringTable* names; - - // Next in the global list of active thread samplers - struct ThreadSampler* volatile next; - -} ThreadSampler; - -static rmtError ThreadSampler_Constructor(ThreadSampler* thread_sampler) -{ - rmtError error; - int i; - - assert(thread_sampler != NULL); - - // Set defaults - for (i = 0; i < SampleType_Count; i++) - thread_sampler->sample_trees[i] = NULL; - thread_sampler->names = NULL; - thread_sampler->next = NULL; - - // Set the initial name to Thread0 etc. or use the existing Linux name. - thread_sampler->name[0] = 0; - #if defined(RMT_PLATFORM_LINUX) && RMT_USE_POSIX_THREADNAMES - prctl(PR_GET_NAME,thread_sampler->name,0,0,0); - #else - { - static rmtS32 countThreads = 0; - strncat_s(thread_sampler->name, sizeof(thread_sampler->name), "Thread", 6); - itoahex_s(thread_sampler->name + 6, sizeof(thread_sampler->name) - 6, AtomicAdd(&countThreads, 1)); - } - #endif - - // Create the CPU sample tree only - the rest are created on-demand as they need - // extra context information to function correctly. - New_3(SampleTree, thread_sampler->sample_trees[SampleType_CPU], sizeof(Sample), (ObjConstructor)Sample_Constructor, (ObjDestructor)Sample_Destructor); - if (error != RMT_ERROR_NONE) - return error; - - // Create sample name string table - New_0(StringTable, thread_sampler->names); - if (error != RMT_ERROR_NONE) - return error; - - return RMT_ERROR_NONE; -} - - -static void ThreadSampler_Destructor(ThreadSampler* ts) -{ - int i; - - assert(ts != NULL); - - Delete(StringTable, ts->names); - - for (i = 0; i < SampleType_Count; i++) - Delete(SampleTree, ts->sample_trees[i]); -} - - -static rmtError ThreadSampler_Push(SampleTree* tree, rmtU32 name_hash, rmtU32 flags, Sample** sample) -{ - return SampleTree_Push(tree, name_hash, flags, sample); -} - - -static rmtBool ThreadSampler_Pop(ThreadSampler* ts, rmtMessageQueue* queue, Sample* sample) -{ - SampleTree* tree = ts->sample_trees[sample->type]; - SampleTree_Pop(tree, sample); - - // Are we back at the root? - if (tree->current_parent == tree->root) - { - // Disconnect all samples from the root and pack in the chosen message queue - Sample* root = tree->root; - root->first_child = NULL; - root->last_child = NULL; - root->nb_children = 0; - AddSampleTreeMessage(queue, sample, tree->allocator, ts->name, ts); - - return RMT_TRUE; - } - - return RMT_FALSE; -} - - -static rmtU32 ThreadSampler_GetNameHash(ThreadSampler* ts, rmtPStr name, rmtU32* hash_cache) -{ - rmtU32 name_hash = 0; - - // Hash cache provided? - if (hash_cache != NULL) - { - // Calculate the hash first time round only - if (*hash_cache == 0) - { - assert(name != NULL); - *hash_cache = MurmurHash3_x86_32(name, (int)strnlen_s(name, 256), 0); - - // Also add to the string table on its first encounter - StringTable_Insert(ts->names, *hash_cache, name); - } - - return *hash_cache; - } - - // Have to recalculate and speculatively insert the name every time when no cache storage exists - name_hash = MurmurHash3_x86_32(name, (int)strnlen_s(name, 256), 0); - StringTable_Insert(ts->names, name_hash, name); - return name_hash; -} - - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @REMOTERY: Remotery ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -#if RMT_USE_D3D11 -typedef struct D3D11 D3D11; -static rmtError D3D11_Create(D3D11** d3d11); -static void D3D11_Destructor(D3D11* d3d11); -#endif - - -#if RMT_USE_OPENGL -typedef struct OpenGL_t OpenGL; -static rmtError OpenGL_Create(OpenGL** opengl); -static void OpenGL_Destructor(OpenGL* opengl); -#endif - - -#if RMT_USE_METAL -typedef struct Metal_t Metal; -static rmtError Metal_Create(Metal** metal); -static void Metal_Destructor(Metal* metal); -#endif - - -struct Remotery -{ - Server* server; - - // Microsecond accuracy timer for CPU timestamps - usTimer timer; - - rmtTLS thread_sampler_tls_handle; - - // Linked list of all known threads being sampled - ThreadSampler* volatile first_thread_sampler; - - // Queue between clients and main remotery thread - rmtMessageQueue* mq_to_rmt_thread; - - // A dynamically-sized buffer used for binary-encoding the sample tree and sending to the client - Buffer* bin_buf; - - // The main server thread - rmtThread* thread; - -#if RMT_USE_CUDA - rmtCUDABind cuda; -#endif - -#if RMT_USE_D3D11 - D3D11* d3d11; -#endif - -#if RMT_USE_OPENGL - OpenGL* opengl; -#endif - -#if RMT_USE_METAL - Metal* metal; -#endif -}; - - -// -// Global remotery context -// -static Remotery* g_Remotery = NULL; - - -// -// This flag marks the EXE/DLL that created the global remotery instance. We want to allow -// only the creating EXE/DLL to destroy the remotery instance. -// -static rmtBool g_RemoteryCreated = RMT_FALSE; - - -static void Remotery_DestroyThreadSamplers(Remotery* rmt); - - -static const rmtU8 g_DecimalToHex[17] = "0123456789abcdef"; - - -static void GetSampleDigest(Sample* sample, rmtU32* digest_hash, rmtU32* nb_samples) -{ - Sample* child; - - assert(sample != NULL); - assert(digest_hash != NULL); - assert(nb_samples != NULL); - - // Concatenate this sample - (*nb_samples)++; - *digest_hash = MurmurHash3_x86_32(&sample->unique_id, sizeof(sample->unique_id), *digest_hash); - - { - rmtU8 shift = 4; - - // Get 6 nibbles for lower 3 bytes of the unique sample ID - rmtU8* sample_id = (rmtU8*)&sample->unique_id; - rmtU8 hex_sample_id[6]; - hex_sample_id[0] = sample_id[0] & 15; - hex_sample_id[1] = sample_id[0] >> 4; - hex_sample_id[2] = sample_id[1] & 15; - hex_sample_id[3] = sample_id[1] >> 4; - hex_sample_id[4] = sample_id[2] & 15; - hex_sample_id[5] = sample_id[2] >> 4; - - // As the nibbles will be used as hex colour digits, shift them up to make pastel colours - hex_sample_id[0] = minU8(hex_sample_id[0] + shift, 15); - hex_sample_id[1] = minU8(hex_sample_id[1] + shift, 15); - hex_sample_id[2] = minU8(hex_sample_id[2] + shift, 15); - hex_sample_id[3] = minU8(hex_sample_id[3] + shift, 15); - hex_sample_id[4] = minU8(hex_sample_id[4] + shift, 15); - hex_sample_id[5] = minU8(hex_sample_id[5] + shift, 15); - - // Convert the nibbles to hex for the final colour - sample->unique_id_html_colour[1] = g_DecimalToHex[hex_sample_id[0]]; - sample->unique_id_html_colour[2] = g_DecimalToHex[hex_sample_id[1]]; - sample->unique_id_html_colour[3] = g_DecimalToHex[hex_sample_id[2]]; - sample->unique_id_html_colour[4] = g_DecimalToHex[hex_sample_id[3]]; - sample->unique_id_html_colour[5] = g_DecimalToHex[hex_sample_id[4]]; - sample->unique_id_html_colour[6] = g_DecimalToHex[hex_sample_id[5]]; - } - - // Concatenate children - for (child = sample->first_child; child != NULL; child = child->next_sibling) - GetSampleDigest(child, digest_hash, nb_samples); -} - - -static rmtError Remotery_SendLogTextMessage(Remotery* rmt, Message* message) -{ - assert(rmt != NULL); - assert(message != NULL); - return Server_Send(rmt->server, message->payload, message->payload_size, 20); -} - - -static rmtError bin_SampleTree(Buffer* buffer, Msg_SampleTree* msg) -{ - Sample* root_sample; - char thread_name[64]; - rmtU32 digest_hash = 0, nb_samples = 0; - rmtError error; - - assert(buffer != NULL); - assert(msg != NULL); - - // Get the message root sample - root_sample = msg->root_sample; - assert(root_sample != NULL); - - // Reset the buffer position to the start - buffer->bytes_used = 0; - - // Add any sample types as a thread name post-fix to ensure they get their own viewer - thread_name[0] = 0; - strncat_s(thread_name, sizeof(thread_name), msg->thread_name, strnlen_s(msg->thread_name, 64)); - if (root_sample->type == SampleType_CUDA) - strncat_s(thread_name, sizeof(thread_name), " (CUDA)", 7); - if (root_sample->type == SampleType_D3D11) - strncat_s(thread_name, sizeof(thread_name), " (D3D11)", 8); - if (root_sample->type == SampleType_OpenGL) - strncat_s(thread_name, sizeof(thread_name), " (OpenGL)", 9); - if (root_sample->type == SampleType_Metal) - strncat_s(thread_name, sizeof(thread_name), " (Metal)", 8); - - // Get digest hash of samples so that viewer can efficiently rebuild its tables - rmt_BeginCPUSample(GetSampleDigest, RMTSF_Aggregate); - GetSampleDigest(root_sample, &digest_hash, &nb_samples); - rmt_EndCPUSample(); - - // Write global message header - BIN_ERROR_CHECK(Buffer_Write(buffer, (void*)"SMPL ", 8)); - - // Write sample message header - BIN_ERROR_CHECK(Buffer_WriteStringWithLength(buffer, thread_name)); - BIN_ERROR_CHECK(Buffer_WriteU32(buffer, nb_samples)); - BIN_ERROR_CHECK(Buffer_WriteU32(buffer, digest_hash)); - - // Write entire sample tree - BIN_ERROR_CHECK(bin_Sample(buffer, root_sample)); - - // Patch message size - U32ToByteArray(buffer->data + 4, buffer->bytes_used); - - return RMT_ERROR_NONE; -} - - - -#if RMT_USE_CUDA -static rmtBool AreCUDASamplesReady(Sample* sample); -static rmtBool GetCUDASampleTimes(Sample* root_sample, Sample* sample); -#endif - - -static rmtError Remotery_SendSampleTreeMessage(Remotery* rmt, Message* message) -{ - Msg_SampleTree* sample_tree; - rmtError error = RMT_ERROR_NONE; - Sample* sample; - - assert(rmt != NULL); - assert(message != NULL); - - // Get the message root sample - sample_tree = (Msg_SampleTree*)message->payload; - sample = sample_tree->root_sample; - assert(sample != NULL); - - #if RMT_USE_CUDA - if (sample->type == SampleType_CUDA) - { - // If these CUDA samples aren't ready yet, stick them to the back of the queue and continue - rmtBool are_samples_ready; - rmt_BeginCPUSample(AreCUDASamplesReady, 0); - are_samples_ready = AreCUDASamplesReady(sample); - rmt_EndCPUSample(); - if (!are_samples_ready) - { - AddSampleTreeMessage(rmt->mq_to_rmt_thread, sample, sample_tree->allocator, sample_tree->thread_name, message->thread_sampler); - return RMT_ERROR_NONE; - } - - // Retrieve timing of all CUDA samples - rmt_BeginCPUSample(GetCUDASampleTimes, 0); - GetCUDASampleTimes(sample->parent, sample); - rmt_EndCPUSample(); - } - #endif - - // Serialise the sample tree and send to the viewer with a reasonably long timeout as the size - // of the sample data may be large - rmt_BeginCPUSample(bin_SampleTree, RMTSF_Aggregate); - error = bin_SampleTree(rmt->bin_buf, sample_tree); - rmt_EndCPUSample(); - if (error == RMT_ERROR_NONE) - { - rmt_BeginCPUSample(Server_Send, RMTSF_Aggregate); - error = Server_Send(rmt->server, rmt->bin_buf->data, rmt->bin_buf->bytes_used, 50000); - rmt_EndCPUSample(); - } - - // Release the sample tree back to its allocator - FreeSampleTree(sample, sample_tree->allocator); - - return error; -} - - -static rmtError Remotery_ConsumeMessageQueue(Remotery* rmt) -{ - rmtU32 nb_messages_sent = 0; - const rmtU32 maxNbMessagesPerUpdate = g_Settings.maxNbMessagesPerUpdate; - - assert(rmt != NULL); - - // Absorb as many messages in the queue while disconnected - if (Server_IsClientConnected(rmt->server) == RMT_FALSE) - return RMT_ERROR_NONE; - - // Loop reading the max number of messages for this update - while( nb_messages_sent++ < maxNbMessagesPerUpdate ) - { - rmtError error = RMT_ERROR_NONE; - Message* message = rmtMessageQueue_PeekNextMessage(rmt->mq_to_rmt_thread); - if (message == NULL) - break; - - switch (message->id) - { - // This shouldn't be possible - case MsgID_NotReady: - assert(RMT_FALSE); - break; - - // Dispatch to message handler - case MsgID_LogText: - error = Remotery_SendLogTextMessage(rmt, message); - break; - case MsgID_SampleTree: - rmt_BeginCPUSample(SendSampleTreeMessage, RMTSF_Aggregate); - error = Remotery_SendSampleTreeMessage(rmt, message); - rmt_EndCPUSample(); - break; - } - - // Consume the message before reacting to any errors - rmtMessageQueue_ConsumeNextMessage(rmt->mq_to_rmt_thread, message); - if (error != RMT_ERROR_NONE) - return error; - } - - return RMT_ERROR_NONE; -} - - -static void Remotery_FlushMessageQueue(Remotery* rmt) -{ - assert(rmt != NULL); - - // Loop reading all remaining messages - for (;;) - { - Message* message = rmtMessageQueue_PeekNextMessage(rmt->mq_to_rmt_thread); - if (message == NULL) - break; - - switch (message->id) - { - // These can be safely ignored - case MsgID_NotReady: - case MsgID_LogText: - break; - - // Release all samples back to their allocators - case MsgID_SampleTree: - { - Msg_SampleTree* sample_tree = (Msg_SampleTree*)message->payload; - FreeSampleTree(sample_tree->root_sample, sample_tree->allocator); - break; - } - } - - rmtMessageQueue_ConsumeNextMessage(rmt->mq_to_rmt_thread, message); - } -} - - -static rmtError Remotery_ThreadMain(rmtThread* thread) -{ - Remotery* rmt = (Remotery*)thread->param; - assert(rmt != NULL); - - rmt_SetCurrentThreadName("Remotery"); - - while (thread->request_exit == RMT_FALSE) - { - rmt_BeginCPUSample(Wakeup, 0); - - rmt_BeginCPUSample(ServerUpdate, 0); - Server_Update(rmt->server); - rmt_EndCPUSample(); - - rmt_BeginCPUSample(ConsumeMessageQueue, 0); - Remotery_ConsumeMessageQueue(rmt); - rmt_EndCPUSample(); - - rmt_EndCPUSample(); - - // - // [NOTE-A] - // - // Possible sequence of user events at this point: - // - // 1. Add samples to the queue. - // 2. Shutdown remotery. - // - // This loop will exit with unrelease samples. - // - - msSleep(g_Settings.msSleepBetweenServerUpdates); - } - - // Release all samples to their allocators as a consequence of [NOTE-A] - Remotery_FlushMessageQueue(rmt); - - return RMT_ERROR_NONE; -} - - -static rmtError Remotery_ReceiveMessage(void* context, char* message_data, rmtU32 message_length) -{ - Remotery* rmt = (Remotery*)context; - - // Manual dispatch on 4-byte message headers (message ID is little-endian encoded) - #define FOURCC(a, b, c, d) (rmtU32)( ((d) << 24) | ((c) << 16) | ((b) << 8) | (a) ) - rmtU32 message_id = *(rmtU32*)message_data; - - switch (message_id) - { - case FOURCC('C', 'O', 'N', 'I'): - { - // Pass on to any registered handler - if (g_Settings.input_handler != NULL) - g_Settings.input_handler(message_data + 4, g_Settings.input_handler_context); - - rmt_LogText("Console message received..."); - rmt_LogText(message_data + 4); - break; - } - - case FOURCC('G', 'S', 'M', 'P'): - { - // Convert name hash to integer - rmtU32 name_hash = 0; - const char* cur = message_data + 4; - const char* end = cur + message_length - 4; - while (cur < end) - name_hash = name_hash * 10 + *cur++ - '0'; - - // Search all threads for a matching string hash - ThreadSampler* ts; - for (ts = rmt->first_thread_sampler; ts != NULL; ts = ts->next) - { - rmtPStr name = StringTable_Find(ts->names, name_hash); - if (name != NULL) - { - // Construct a response message containing the matching name - rmtU8 response[256]; - rmtU32 name_length = (rmtU32)strnlen_s(name, 256 - 12); - response[0] = 'S'; - response[1] = 'S'; - response[2] = 'M'; - response[3] = 'P'; - U32ToByteArray(response + 4, name_hash); - U32ToByteArray(response + 8, name_length); - memcpy(response + 12, name, name_length); - - // Send back immediately as we're on the server thread - return Server_Send(rmt->server, response, 12 + name_length, 10); - } - } - - break; - } - } - - #undef FOURCC - - return RMT_ERROR_NONE; -} - - -static rmtError Remotery_Constructor(Remotery* rmt) -{ - rmtError error; - - assert(rmt != NULL); - - // Set default state - rmt->server = NULL; - rmt->thread_sampler_tls_handle = TLS_INVALID_HANDLE; - rmt->first_thread_sampler = NULL; - rmt->mq_to_rmt_thread = NULL; - rmt->bin_buf = NULL; - rmt->thread = NULL; - - #if RMT_USE_CUDA - rmt->cuda.CtxSetCurrent = NULL; - rmt->cuda.EventCreate = NULL; - rmt->cuda.EventDestroy = NULL; - rmt->cuda.EventElapsedTime = NULL; - rmt->cuda.EventQuery = NULL; - rmt->cuda.EventRecord = NULL; - #endif - - #if RMT_USE_D3D11 - rmt->d3d11 = NULL; - #endif - - #if RMT_USE_OPENGL - rmt->opengl = NULL; - #endif - - #if RMT_USE_METAL - rmt->metal = NULL; - #endif - - // Kick-off the timer - usTimer_Init(&rmt->timer); - - // Allocate a TLS handle for the thread sampler - error = tlsAlloc(&rmt->thread_sampler_tls_handle); - if (error != RMT_ERROR_NONE) - return error; - - // Create the server - New_2(Server, rmt->server, g_Settings.port, g_Settings.limit_connections_to_localhost); - if (error != RMT_ERROR_NONE) - return error; - - // Setup incoming message handler - rmt->server->receive_handler = Remotery_ReceiveMessage; - rmt->server->receive_handler_context = rmt; - - // Create the main message thread with only one page - New_1(rmtMessageQueue, rmt->mq_to_rmt_thread, g_Settings.messageQueueSizeInBytes); - if (error != RMT_ERROR_NONE) - return error; - - // Create the binary serialisation buffer - New_1(Buffer, rmt->bin_buf, 4096); - if (error != RMT_ERROR_NONE) - return error; - - #if RMT_USE_D3D11 - error = D3D11_Create(&rmt->d3d11); - if (error != RMT_ERROR_NONE) - return error; - #endif - - #if RMT_USE_OPENGL - error = OpenGL_Create(&rmt->opengl); - if (error != RMT_ERROR_NONE) - return error; - #endif - - #if RMT_USE_METAL - error = Metal_Create(&rmt->metal); - if (error != RMT_ERROR_NONE) - return error; - #endif - - - // Set as the global instance before creating any threads that uses it for sampling itself - assert(g_Remotery == NULL); - g_Remotery = rmt; - g_RemoteryCreated = RMT_TRUE; - - // Ensure global instance writes complete before other threads get a chance to use it - WriteFence(); - - // Create the main update thread once everything has been defined for the global remotery object - New_2(rmtThread, rmt->thread, Remotery_ThreadMain, rmt); - return error; -} - - -static void Remotery_Destructor(Remotery* rmt) -{ - assert(rmt != NULL); - - // Join the remotery thread before clearing the global object as the thread is profiling itself - Delete(rmtThread, rmt->thread); - - if (g_RemoteryCreated) - { - g_Remotery = NULL; - g_RemoteryCreated = RMT_FALSE; - } - - #if RMT_USE_D3D11 - Delete(D3D11, rmt->d3d11); - #endif - - #if RMT_USE_OPENGL - Delete(OpenGL, rmt->opengl); - #endif - - #if RMT_USE_METAL - Delete(Metal, rmt->metal); - #endif - - Delete(Buffer, rmt->bin_buf); - Delete(rmtMessageQueue, rmt->mq_to_rmt_thread); - - Remotery_DestroyThreadSamplers(rmt); - - Delete(Server, rmt->server); - - if (rmt->thread_sampler_tls_handle != TLS_INVALID_HANDLE) - { - tlsFree(rmt->thread_sampler_tls_handle); - rmt->thread_sampler_tls_handle = 0; - } -} - - -static rmtError Remotery_GetThreadSampler(Remotery* rmt, ThreadSampler** thread_sampler) -{ - ThreadSampler* ts; - - // Is there a thread sampler associated with this thread yet? - assert(rmt != NULL); - ts = (ThreadSampler*)tlsGet(rmt->thread_sampler_tls_handle); - if (ts == NULL) - { - // Allocate on-demand - rmtError error; - New_0(ThreadSampler, *thread_sampler); - if (error != RMT_ERROR_NONE) - return error; - ts = *thread_sampler; - - // Add to the beginning of the global linked list of thread samplers - for (;;) - { - ThreadSampler* old_ts = rmt->first_thread_sampler; - ts->next = old_ts; - - // If the old value is what we expect it to be then no other thread has - // changed it since this thread sampler was used as a candidate first list item - if (AtomicCompareAndSwapPointer((long* volatile*)&rmt->first_thread_sampler, (long*)old_ts, (long*)ts) == RMT_TRUE) - break; - } - - tlsSet(rmt->thread_sampler_tls_handle, ts); - } - - assert(thread_sampler != NULL); - *thread_sampler = ts; - return RMT_ERROR_NONE; -} - - -static void Remotery_BlockingDeleteSampleTree(Remotery* rmt, enum SampleType sample_type) -{ - ThreadSampler* ts; - - // Get the attached thread sampler - assert(rmt != NULL); - if (Remotery_GetThreadSampler(rmt, &ts) == RMT_ERROR_NONE) - { - SampleTree* sample_tree = ts->sample_trees[sample_type]; - if (sample_tree != NULL) - { - // Wait around until the Remotery server thread has sent all sample trees - // of this type to the client - while (sample_tree->allocator->nb_inuse > 1) - msSleep(1); - - // Now free to delete - Delete(SampleTree, sample_tree); - ts->sample_trees[sample_type] = NULL; - } - } -} - - - -static void Remotery_DestroyThreadSamplers(Remotery* rmt) -{ - // If the handle failed to create in the first place then it shouldn't be possible to create thread samplers - assert(rmt != NULL); - if (rmt->thread_sampler_tls_handle == TLS_INVALID_HANDLE) - { - assert(rmt->first_thread_sampler == NULL); - return; - } - - // Keep popping thread samplers off the linked list until they're all gone - // This does not make any assumptions, making it possible for thread samplers to be created while they're all - // deleted. While this is erroneous calling code, this will prevent a confusing crash. - while (rmt->first_thread_sampler != NULL) - { - ThreadSampler* ts; - - for (;;) - { - ThreadSampler* old_ts = rmt->first_thread_sampler; - ThreadSampler* next_ts = old_ts->next; - - if (AtomicCompareAndSwapPointer((long* volatile*)&rmt->first_thread_sampler, (long*)old_ts, (long*)next_ts) == RMT_TRUE) - { - ts = old_ts; - break; - } - } - - Delete(ThreadSampler, ts); - } -} - - -static void* CRTMalloc(void* mm_context, rmtU32 size) -{ - RMT_UNREFERENCED_PARAMETER(mm_context); - return malloc((size_t)size); -} - - -static void CRTFree(void* mm_context, void* ptr) -{ - RMT_UNREFERENCED_PARAMETER(mm_context); - free(ptr); -} - -static void* CRTRealloc(void* mm_context, void* ptr, rmtU32 size) -{ - RMT_UNREFERENCED_PARAMETER(mm_context); - return realloc(ptr, size); -} - - -RMT_API rmtSettings* _rmt_Settings(void) -{ - // Default-initialize on first call - if( g_SettingsInitialized == RMT_FALSE ) - { - g_Settings.port = 0x4597; - g_Settings.limit_connections_to_localhost = RMT_FALSE; - g_Settings.msSleepBetweenServerUpdates = 10; - g_Settings.messageQueueSizeInBytes = 128 * 1024; - g_Settings.maxNbMessagesPerUpdate = 10; - g_Settings.malloc = CRTMalloc; - g_Settings.free = CRTFree; - g_Settings.realloc = CRTRealloc; - g_Settings.input_handler = NULL; - g_Settings.input_handler_context = NULL; - g_Settings.logFilename = "rmtLog.txt"; - - g_SettingsInitialized = RMT_TRUE; - } - - return &g_Settings; -} - - -RMT_API rmtError _rmt_CreateGlobalInstance(Remotery** remotery) -{ - rmtError error; - - // Default-initialise if user has not set values - rmt_Settings(); - - // Creating the Remotery instance also records it as the global instance - assert(remotery != NULL); - New_0(Remotery, *remotery); - return error; -} - - -RMT_API void _rmt_DestroyGlobalInstance(Remotery* remotery) -{ - // Ensure this is the module that created it - assert(g_RemoteryCreated == RMT_TRUE); - assert(g_Remotery == remotery); - Delete(Remotery, remotery); -} - - -RMT_API void _rmt_SetGlobalInstance(Remotery* remotery) -{ - // Default-initialise if user has not set values - rmt_Settings(); - - g_Remotery = remotery; -} - - -RMT_API Remotery* _rmt_GetGlobalInstance(void) -{ - return g_Remotery; -} - - -#ifdef RMT_PLATFORM_WINDOWS - #pragma pack(push,8) - typedef struct tagTHREADNAME_INFO - { - DWORD dwType; // Must be 0x1000. - LPCSTR szName; // Pointer to name (in user addr space). - DWORD dwThreadID; // Thread ID (-1=caller thread). - DWORD dwFlags; // Reserved for future use, must be zero. - } THREADNAME_INFO; - #pragma pack(pop) -#endif - -static void SetDebuggerThreadName(const char* name) -{ - #ifdef RMT_PLATFORM_WINDOWS - THREADNAME_INFO info; - info.dwType = 0x1000; - info.szName = name; - info.dwThreadID = (DWORD)-1; - info.dwFlags = 0; - - #ifndef __MINGW32__ - __try - { - RaiseException(0x406D1388, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info); - } - __except(1 /* EXCEPTION_EXECUTE_HANDLER */) - { - } - #endif - #else - RMT_UNREFERENCED_PARAMETER(name); - #endif - - #ifdef RMT_PLATFORM_LINUX - // pthread_setname_np is a non-standard GNU extension. - char name_clamp[16]; - name_clamp[0] = 0; - strncat_s(name_clamp, sizeof(name_clamp), name, 15); - prctl(PR_SET_NAME,name_clamp,0,0,0); - #endif -} - - -RMT_API void _rmt_SetCurrentThreadName(rmtPStr thread_name) -{ - ThreadSampler* ts; - - if (g_Remotery == NULL) - return; - - // Get data for this thread - if (Remotery_GetThreadSampler(g_Remotery, &ts) != RMT_ERROR_NONE) - return; - - // Copy name and apply to the debugger - strcpy_s(ts->name, sizeof(ts->name), thread_name); - SetDebuggerThreadName(thread_name); -} - - -static rmtBool QueueLine(rmtMessageQueue* queue, unsigned char* text, rmtU32 size, struct ThreadSampler* thread_sampler) -{ - Message* message; - - assert(queue != NULL); - - // Prefix with text size - rmtU32 text_size = size - 8; - U32ToByteArray(text + 4, text_size); - - // Allocate some space for the line - message = rmtMessageQueue_AllocMessage(queue, size, thread_sampler); - if (message == NULL) - return RMT_FALSE; - - // Copy the text and commit the message - memcpy(message->payload, text, size); - rmtMessageQueue_CommitMessage(message, MsgID_LogText); - - return RMT_TRUE; -} - - -RMT_API void _rmt_LogText(rmtPStr text) -{ - int start_offset, prev_offset, i; - unsigned char line_buffer[1024] = { 0 }; - ThreadSampler* ts; - - if (g_Remotery == NULL) - return; - - Remotery_GetThreadSampler(g_Remotery, &ts); - - // Start the line with the message header - line_buffer[0] = 'L'; - line_buffer[1] = 'O'; - line_buffer[2] = 'G'; - line_buffer[3] = 'M'; - start_offset = 8; - - // There might be newlines in the buffer, so split them into multiple network calls - prev_offset = start_offset; - for (i = 0; text[i] != 0; i++) - { - char c = text[i]; - - // Line wrap when too long or newline encountered - if (prev_offset == sizeof(line_buffer) - 3 || c == '\n') - { - if (QueueLine(g_Remotery->mq_to_rmt_thread, line_buffer, prev_offset, ts) == RMT_FALSE) - return; - - // Restart line - prev_offset = start_offset; - } - - // Safe to insert 2 characters here as previous check would split lines if not enough space left - switch (c) - { - // Skip newline, dealt with above - case '\n': - break; - - // Escape these - case '\\': - line_buffer[prev_offset++] = '\\'; - line_buffer[prev_offset++] = '\\'; - break; - - case '\"': - line_buffer[prev_offset++] = '\\'; - line_buffer[prev_offset++] = '\"'; - break; - - // Add the rest - default: - line_buffer[prev_offset++] = c; - break; - } - } - - // Send the last line - if (prev_offset > start_offset) - { - assert(prev_offset < ((int)sizeof(line_buffer) - 3)); - QueueLine(g_Remotery->mq_to_rmt_thread, line_buffer, prev_offset, ts); - } -} - - -RMT_API void _rmt_BeginCPUSample(rmtPStr name, rmtU32 flags, rmtU32* hash_cache) -{ - // 'hash_cache' stores a pointer to a sample name's hash value. Internally this is used to identify unique callstacks and it - // would be ideal that it's not recalculated each time the sample is used. This can be statically cached at the point - // of call or stored elsewhere when dynamic names are required. - // - // If 'hash_cache' is NULL then this call becomes more expensive, as it has to recalculate the hash of the name. - - ThreadSampler* ts; - - if (g_Remotery == NULL) - return; - - // TODO: Time how long the bits outside here cost and subtract them from the parent - - if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) - { - Sample* sample; - rmtU32 name_hash = ThreadSampler_GetNameHash(ts, name, hash_cache); - if (ThreadSampler_Push(ts->sample_trees[SampleType_CPU], name_hash, flags, &sample) == RMT_ERROR_NONE) - { - // If this is an aggregate sample, store the time in 'end' as we want to preserve 'start' - if (sample->us_length != 0) - sample->us_end = usTimer_Get(&g_Remotery->timer); - else - sample->us_start = usTimer_Get(&g_Remotery->timer); - } - } -} - - -RMT_API void _rmt_EndCPUSample(void) -{ - ThreadSampler* ts; - - if (g_Remotery == NULL) - return; - - if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) - { - Sample* sample = ts->sample_trees[SampleType_CPU]->current_parent; - - rmtU64 us_end = usTimer_Get(&g_Remotery->timer); - - // Is this an aggregate sample? - if (sample->us_length != 0) - { - sample->us_length += (us_end - sample->us_end); - sample->us_end = us_end; - } - else - { - sample->us_end = us_end; - sample->us_length = (us_end - sample->us_start); - } - - sample->us_end = usTimer_Get(&g_Remotery->timer); - ThreadSampler_Pop(ts, g_Remotery->mq_to_rmt_thread, sample); - } -} - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @CUDA: CUDA event sampling ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -#if RMT_USE_CUDA - - -typedef struct CUDASample -{ - // IS-A inheritance relationship - Sample Sample; - - // Pair of events that wrap the sample - CUevent event_start; - CUevent event_end; - -} CUDASample; - - -static rmtError MapCUDAResult(CUresult result) -{ - switch (result) - { - case CUDA_SUCCESS: return RMT_ERROR_NONE; - case CUDA_ERROR_DEINITIALIZED: return RMT_ERROR_CUDA_DEINITIALIZED; - case CUDA_ERROR_NOT_INITIALIZED: return RMT_ERROR_CUDA_NOT_INITIALIZED; - case CUDA_ERROR_INVALID_CONTEXT: return RMT_ERROR_CUDA_INVALID_CONTEXT; - case CUDA_ERROR_INVALID_VALUE: return RMT_ERROR_CUDA_INVALID_VALUE; - case CUDA_ERROR_INVALID_HANDLE: return RMT_ERROR_CUDA_INVALID_HANDLE; - case CUDA_ERROR_OUT_OF_MEMORY: return RMT_ERROR_CUDA_OUT_OF_MEMORY; - case CUDA_ERROR_NOT_READY: return RMT_ERROR_ERROR_NOT_READY; - default: return RMT_ERROR_CUDA_UNKNOWN; - } -} - - -#define CUDA_MAKE_FUNCTION(name, params) \ - typedef CUresult (CUDAAPI *name##Ptr) params; \ - name##Ptr name = (name##Ptr)g_Remotery->cuda.name; - - -#define CUDA_GUARD(call) \ - { \ - rmtError error = call; \ - if (error != RMT_ERROR_NONE) \ - return error; \ - } - - -// Wrappers around CUDA driver functions that manage the active context. -static rmtError CUDASetContext(void* context) -{ - CUDA_MAKE_FUNCTION(CtxSetCurrent, (CUcontext ctx)); - assert(CtxSetCurrent != NULL); - return MapCUDAResult(CtxSetCurrent((CUcontext)context)); -} -static rmtError CUDAGetContext(void** context) -{ - CUDA_MAKE_FUNCTION(CtxGetCurrent, (CUcontext* ctx)); - assert(CtxGetCurrent != NULL); - return MapCUDAResult(CtxGetCurrent((CUcontext*)context)); -} -static rmtError CUDAEnsureContext() -{ - void* current_context; - CUDA_GUARD(CUDAGetContext(¤t_context)); - - assert(g_Remotery != NULL); - if (current_context != g_Remotery->cuda.context) - CUDA_GUARD(CUDASetContext(g_Remotery->cuda.context)); - - return RMT_ERROR_NONE; -} - - -// Wrappers around CUDA driver functions that manage events -static rmtError CUDAEventCreate(CUevent* phEvent, unsigned int Flags) -{ - CUDA_MAKE_FUNCTION(EventCreate, (CUevent *phEvent, unsigned int Flags)); - CUDA_GUARD(CUDAEnsureContext()); - return MapCUDAResult(EventCreate(phEvent, Flags)); -} -static rmtError CUDAEventDestroy(CUevent hEvent) -{ - CUDA_MAKE_FUNCTION(EventDestroy, (CUevent hEvent)); - CUDA_GUARD(CUDAEnsureContext()); - return MapCUDAResult(EventDestroy(hEvent)); -} -static rmtError CUDAEventRecord(CUevent hEvent, void* hStream) -{ - CUDA_MAKE_FUNCTION(EventRecord, (CUevent hEvent, CUstream hStream)); - CUDA_GUARD(CUDAEnsureContext()); - return MapCUDAResult(EventRecord(hEvent, (CUstream)hStream)); -} -static rmtError CUDAEventQuery(CUevent hEvent) -{ - CUDA_MAKE_FUNCTION(EventQuery, (CUevent hEvent)); - CUDA_GUARD(CUDAEnsureContext()); - return MapCUDAResult(EventQuery(hEvent)); -} -static rmtError CUDAEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) -{ - CUDA_MAKE_FUNCTION(EventElapsedTime, (float *pMilliseconds, CUevent hStart, CUevent hEnd)); - CUDA_GUARD(CUDAEnsureContext()); - return MapCUDAResult(EventElapsedTime(pMilliseconds, hStart, hEnd)); -} - - -static rmtError CUDASample_Constructor(CUDASample* sample) -{ - rmtError error; - - assert(sample != NULL); - - // Chain to sample constructor - Sample_Constructor((Sample*)sample); - sample->Sample.type = SampleType_CUDA; - sample->Sample.size_bytes = sizeof(CUDASample); - sample->event_start = NULL; - sample->event_end = NULL; - - // Create non-blocking events with timing - assert(g_Remotery != NULL); - error = CUDAEventCreate(&sample->event_start, CU_EVENT_DEFAULT); - if (error == RMT_ERROR_NONE) - error = CUDAEventCreate(&sample->event_end, CU_EVENT_DEFAULT); - return error; -} - - -static void CUDASample_Destructor(CUDASample* sample) -{ - assert(sample != NULL); - - // Destroy events - if (sample->event_start != NULL) - CUDAEventDestroy(sample->event_start); - if (sample->event_end != NULL) - CUDAEventDestroy(sample->event_end); - - Sample_Destructor((Sample*)sample); -} - - -static rmtBool AreCUDASamplesReady(Sample* sample) -{ - rmtError error; - Sample* child; - - CUDASample* cuda_sample = (CUDASample*)sample; - assert(sample->type == SampleType_CUDA); - - // Check to see if both of the CUDA events have been processed - error = CUDAEventQuery(cuda_sample->event_start); - if (error != RMT_ERROR_NONE) - return RMT_FALSE; - error = CUDAEventQuery(cuda_sample->event_end); - if (error != RMT_ERROR_NONE) - return RMT_FALSE; - - // Check child sample events - for (child = sample->first_child; child != NULL; child = child->next_sibling) - { - if (!AreCUDASamplesReady(child)) - return RMT_FALSE; - } - - return RMT_TRUE; -} - - -static rmtBool GetCUDASampleTimes(Sample* root_sample, Sample* sample) -{ - Sample* child; - - CUDASample* cuda_root_sample = (CUDASample*)root_sample; - CUDASample* cuda_sample = (CUDASample*)sample; - - float ms_start, ms_end; - - assert(root_sample != NULL); - assert(sample != NULL); - - // Get millisecond timing of each sample event, relative to initial root sample - if (CUDAEventElapsedTime(&ms_start, cuda_root_sample->event_start, cuda_sample->event_start) != RMT_ERROR_NONE) - return RMT_FALSE; - if (CUDAEventElapsedTime(&ms_end, cuda_root_sample->event_start, cuda_sample->event_end) != RMT_ERROR_NONE) - return RMT_FALSE; - - // Convert to microseconds and add to the sample - sample->us_start = (rmtU64)(ms_start * 1000); - sample->us_end = (rmtU64)(ms_end * 1000); - sample->us_length = sample->us_end - sample->us_start; - - // Get child sample times - for (child = sample->first_child; child != NULL; child = child->next_sibling) - { - if (!GetCUDASampleTimes(root_sample, child)) - return RMT_FALSE; - } - - return RMT_TRUE; -} - - -RMT_API void _rmt_BindCUDA(const rmtCUDABind* bind) -{ - assert(bind != NULL); - if (g_Remotery != NULL) - g_Remotery->cuda = *bind; -} - - -RMT_API void _rmt_BeginCUDASample(rmtPStr name, rmtU32* hash_cache, void* stream) -{ - ThreadSampler* ts; - - if (g_Remotery == NULL) - return; - - if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) - { - rmtError error; - Sample* sample; - rmtU32 name_hash = ThreadSampler_GetNameHash(ts, name, hash_cache); - - // Create the CUDA tree on-demand as the tree needs an up-front-created root. - // This is not possible to create on initialisation as a CUDA binding is not yet available. - SampleTree** cuda_tree = &ts->sample_trees[SampleType_CUDA]; - if (*cuda_tree == NULL) - { - CUDASample* root_sample; - - New_3(SampleTree, *cuda_tree, sizeof(CUDASample), (ObjConstructor)CUDASample_Constructor, (ObjDestructor)CUDASample_Destructor); - if (error != RMT_ERROR_NONE) - return; - - // Record an event once on the root sample, used to measure absolute sample - // times since this point - root_sample = (CUDASample*)(*cuda_tree)->root; - error = CUDAEventRecord(root_sample->event_start, stream); - if (error != RMT_ERROR_NONE) - return; - } - - // Push the same and record its event - if (ThreadSampler_Push(*cuda_tree, name_hash, 0, &sample) == RMT_ERROR_NONE) - { - CUDASample* cuda_sample = (CUDASample*)sample; - CUDAEventRecord(cuda_sample->event_start, stream); - } - } -} - - -RMT_API void _rmt_EndCUDASample(void* stream) -{ - ThreadSampler* ts; - - if (g_Remotery == NULL) - return; - - if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) - { - CUDASample* sample = (CUDASample*)ts->sample_trees[SampleType_CUDA]->current_parent; - CUDAEventRecord(sample->event_end, stream); - ThreadSampler_Pop(ts, g_Remotery->mq_to_rmt_thread, (Sample*)sample); - } -} - - -#endif // RMT_USE_CUDA - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - @D3D11: Direct3D 11 event sampling ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -#if RMT_USE_D3D11 - - -// As clReflect has no way of disabling C++ compile mode, this forces C interfaces everywhere... -#define CINTERFACE - -// ...unfortunately these C++ helpers aren't wrapped by the same macro but they can be disabled individually -#define D3D11_NO_HELPERS - -// Allow use of the D3D11 helper macros for accessing the C-style vtable -#define COBJMACROS - -#include - - -typedef struct D3D11 -{ - // Context set by user - ID3D11Device* device; - ID3D11DeviceContext* context; - - HRESULT last_error; - - // Queue to the D3D 11 main update thread - // Given that BeginSample/EndSample need to be called from the same thread that does the update, there - // is really no need for this to be a thread-safe queue. I'm using it for its convenience. - rmtMessageQueue* mq_to_d3d11_main; - - // Mark the first time so that remaining timestamps are offset from this - rmtU64 first_timestamp; -} D3D11; - - -static rmtError D3D11_Create(D3D11** d3d11) -{ - rmtError error; - - assert(d3d11 != NULL); - - // Allocate space for the D3D11 data - *d3d11 = (D3D11*)rmtMalloc(sizeof(D3D11)); - if (*d3d11 == NULL) - return RMT_ERROR_MALLOC_FAIL; - - // Set defaults - (*d3d11)->device = NULL; - (*d3d11)->context = NULL; - (*d3d11)->last_error = S_OK; - (*d3d11)->mq_to_d3d11_main = NULL; - (*d3d11)->first_timestamp = 0; - - New_1(rmtMessageQueue, (*d3d11)->mq_to_d3d11_main, g_Settings.messageQueueSizeInBytes); - if (error != RMT_ERROR_NONE) - { - Delete(D3D11, *d3d11); - return error; - } - - return RMT_ERROR_NONE; -} - - -static void D3D11_Destructor(D3D11* d3d11) -{ - assert(d3d11 != NULL); - Delete(rmtMessageQueue, d3d11->mq_to_d3d11_main); -} - - -typedef struct D3D11Timestamp -{ - // Inherit so that timestamps can be quickly allocated - ObjectLink Link; - - // Pair of timestamp queries that wrap the sample - ID3D11Query* query_start; - ID3D11Query* query_end; - - // A disjoint to measure frequency/stability - // TODO: Does *each* sample need one of these? - ID3D11Query* query_disjoint; -} D3D11Timestamp; - - -static rmtError D3D11Timestamp_Constructor(D3D11Timestamp* stamp) -{ - D3D11_QUERY_DESC timestamp_desc; - D3D11_QUERY_DESC disjoint_desc; - ID3D11Device* device; - HRESULT* last_error; - - assert(stamp != NULL); - - ObjectLink_Constructor((ObjectLink*)stamp); - - // Set defaults - stamp->query_start = NULL; - stamp->query_end = NULL; - stamp->query_disjoint = NULL; - - assert(g_Remotery != NULL); - assert(g_Remotery->d3d11 != NULL); - device = g_Remotery->d3d11->device; - last_error = &g_Remotery->d3d11->last_error; - - // Create start/end timestamp queries - timestamp_desc.Query = D3D11_QUERY_TIMESTAMP; - timestamp_desc.MiscFlags = 0; - *last_error = ID3D11Device_CreateQuery(device, ×tamp_desc, &stamp->query_start); - if (*last_error != S_OK) - return RMT_ERROR_D3D11_FAILED_TO_CREATE_QUERY; - *last_error = ID3D11Device_CreateQuery(device, ×tamp_desc, &stamp->query_end); - if (*last_error != S_OK) - return RMT_ERROR_D3D11_FAILED_TO_CREATE_QUERY; - - // Create disjoint query - disjoint_desc.Query = D3D11_QUERY_TIMESTAMP_DISJOINT; - disjoint_desc.MiscFlags = 0; - *last_error = ID3D11Device_CreateQuery(device, &disjoint_desc, &stamp->query_disjoint); - if (*last_error != S_OK) - return RMT_ERROR_D3D11_FAILED_TO_CREATE_QUERY; - - return RMT_ERROR_NONE; -} - - -static void D3D11Timestamp_Destructor(D3D11Timestamp* stamp) -{ - assert(stamp != NULL); - - // Destroy queries - if (stamp->query_disjoint != NULL) - ID3D11Query_Release(stamp->query_disjoint); - if (stamp->query_end != NULL) - ID3D11Query_Release(stamp->query_end); - if (stamp->query_start != NULL) - ID3D11Query_Release(stamp->query_start); -} - - -static void D3D11Timestamp_Begin(D3D11Timestamp* stamp, ID3D11DeviceContext* context) -{ - assert(stamp != NULL); - - // Start of disjoint and first query - ID3D11DeviceContext_Begin(context, (ID3D11Asynchronous*)stamp->query_disjoint); - ID3D11DeviceContext_End(context, (ID3D11Asynchronous*)stamp->query_start); -} - - -static void D3D11Timestamp_End(D3D11Timestamp* stamp, ID3D11DeviceContext* context) -{ - assert(stamp != NULL); - - // End of disjoint and second query - ID3D11DeviceContext_End(context, (ID3D11Asynchronous*)stamp->query_end); - ID3D11DeviceContext_End(context, (ID3D11Asynchronous*)stamp->query_disjoint); -} - - -static HRESULT D3D11Timestamp_GetData(D3D11Timestamp* stamp, ID3D11DeviceContext* context, rmtU64* out_start, rmtU64* out_end, rmtU64* out_first_timestamp) -{ - ID3D11Asynchronous* query_start; - ID3D11Asynchronous* query_end; - ID3D11Asynchronous* query_disjoint; - HRESULT result; - - UINT64 start; - UINT64 end; - D3D11_QUERY_DATA_TIMESTAMP_DISJOINT disjoint; - - assert(stamp != NULL); - query_start = (ID3D11Asynchronous*)stamp->query_start; - query_end = (ID3D11Asynchronous*)stamp->query_end; - query_disjoint = (ID3D11Asynchronous*)stamp->query_disjoint; - - // Check to see if all queries are ready - // If any fail to arrive, wait until later - result = ID3D11DeviceContext_GetData(context, query_start, &start, sizeof(start), D3D11_ASYNC_GETDATA_DONOTFLUSH); - if (result != S_OK) - return result; - result = ID3D11DeviceContext_GetData(context, query_end, &end, sizeof(end), D3D11_ASYNC_GETDATA_DONOTFLUSH); - if (result != S_OK) - return result; - result = ID3D11DeviceContext_GetData(context, query_disjoint, &disjoint, sizeof(disjoint), D3D11_ASYNC_GETDATA_DONOTFLUSH); - if (result != S_OK) - return result; - - if (disjoint.Disjoint == FALSE) - { - double frequency = disjoint.Frequency / 1000000.0; - - // Mark the first timestamp - assert(out_first_timestamp != NULL); - if (*out_first_timestamp == 0) - *out_first_timestamp = start; - - // Calculate start and end timestamps from the disjoint info - *out_start = (rmtU64)((start - *out_first_timestamp) / frequency); - *out_end = (rmtU64)((end - *out_first_timestamp) / frequency); - } - - return S_OK; -} - - -typedef struct D3D11Sample -{ - // IS-A inheritance relationship - Sample Sample; - - D3D11Timestamp* timestamp; - -} D3D11Sample; - - -static rmtError D3D11Sample_Constructor(D3D11Sample* sample) -{ - rmtError error; - - assert(sample != NULL); - - // Chain to sample constructor - Sample_Constructor((Sample*)sample); - sample->Sample.type = SampleType_D3D11; - sample->Sample.size_bytes = sizeof(D3D11Sample); - New_0(D3D11Timestamp, sample->timestamp); - - return RMT_ERROR_NONE; -} - - -static void D3D11Sample_Destructor(D3D11Sample* sample) -{ - Delete(D3D11Timestamp, sample->timestamp); - Sample_Destructor((Sample*)sample); -} - - -RMT_API void _rmt_BindD3D11(void* device, void* context) -{ - if (g_Remotery != NULL) - { - assert(g_Remotery->d3d11 != NULL); - - assert(device != NULL); - g_Remotery->d3d11->device = (ID3D11Device*)device; - assert(context != NULL); - g_Remotery->d3d11->context = (ID3D11DeviceContext*)context; - } -} - - -static void UpdateD3D11Frame(void); - - -RMT_API void _rmt_UnbindD3D11(void) -{ - if (g_Remotery != NULL) - { - D3D11* d3d11 = g_Remotery->d3d11; - assert(d3d11 != NULL); - - // Stall waiting for the D3D queue to empty into the Remotery queue - while (!rmtMessageQueue_IsEmpty(d3d11->mq_to_d3d11_main)) - UpdateD3D11Frame(); - - // Inform sampler to not add any more samples - d3d11->device = NULL; - d3d11->context = NULL; - - // Forcefully delete sample tree on this thread to release time stamps from - // the same thread that created them - Remotery_BlockingDeleteSampleTree(g_Remotery, SampleType_D3D11); - } -} - - -RMT_API void _rmt_BeginD3D11Sample(rmtPStr name, rmtU32* hash_cache) -{ - ThreadSampler* ts; - D3D11* d3d11; - - if (g_Remotery == NULL) - return; - - // Has D3D11 been unbound? - d3d11 = g_Remotery->d3d11; - assert(d3d11 != NULL); - if (d3d11->device == NULL || d3d11->context == NULL) - return; - - if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) - { - Sample* sample; - rmtU32 name_hash = ThreadSampler_GetNameHash(ts, name, hash_cache); - - // Create the D3D11 tree on-demand as the tree needs an up-front-created root. - // This is not possible to create on initialisation as a D3D11 binding is not yet available. - SampleTree** d3d_tree = &ts->sample_trees[SampleType_D3D11]; - if (*d3d_tree == NULL) - { - rmtError error; - New_3(SampleTree, *d3d_tree, sizeof(D3D11Sample), (ObjConstructor)D3D11Sample_Constructor, (ObjDestructor)D3D11Sample_Destructor); - if (error != RMT_ERROR_NONE) - return; - } - - // Push the sample and activate the timestamp - if (ThreadSampler_Push(*d3d_tree, name_hash, 0, &sample) == RMT_ERROR_NONE) - { - D3D11Sample* d3d_sample = (D3D11Sample*)sample; - D3D11Timestamp_Begin(d3d_sample->timestamp, d3d11->context); - } - } -} - - -static rmtBool GetD3D11SampleTimes(Sample* sample, rmtU64* out_first_timestamp) -{ - Sample* child; - - D3D11Sample* d3d_sample = (D3D11Sample*)sample; - - assert(sample != NULL); - if (d3d_sample->timestamp != NULL) - { - HRESULT result; - - D3D11* d3d11 = g_Remotery->d3d11; - assert(d3d11 != NULL); - - result = D3D11Timestamp_GetData( - d3d_sample->timestamp, - d3d11->context, - &sample->us_start, - &sample->us_end, - out_first_timestamp); - - if (result != S_OK) - { - d3d11->last_error = result; - return RMT_FALSE; - } - - sample->us_length = sample->us_end - sample->us_start; - } - - // Get child sample times - for (child = sample->first_child; child != NULL; child = child->next_sibling) - { - if (!GetD3D11SampleTimes(child, out_first_timestamp)) - return RMT_FALSE; - } - - return RMT_TRUE; -} - - -static void UpdateD3D11Frame(void) -{ - D3D11* d3d11; - - if (g_Remotery == NULL) - return; - - d3d11 = g_Remotery->d3d11; - assert(d3d11 != NULL); - - rmt_BeginCPUSample(rmt_UpdateD3D11Frame, 0); - - // Process all messages in the D3D queue - for (;;) - { - Msg_SampleTree* sample_tree; - Sample* sample; - - Message* message = rmtMessageQueue_PeekNextMessage(d3d11->mq_to_d3d11_main); - if (message == NULL) - break; - - // There's only one valid message type in this queue - assert(message->id == MsgID_SampleTree); - sample_tree = (Msg_SampleTree*)message->payload; - sample = sample_tree->root_sample; - assert(sample->type == SampleType_D3D11); - - // Retrieve timing of all D3D11 samples - // If they aren't ready leave the message unconsumed, holding up later frames and maintaining order - if (!GetD3D11SampleTimes(sample, &d3d11->first_timestamp)) - break; - - // Pass samples onto the remotery thread for sending to the viewer - AddSampleTreeMessage(g_Remotery->mq_to_rmt_thread, sample, sample_tree->allocator, sample_tree->thread_name, message->thread_sampler); - rmtMessageQueue_ConsumeNextMessage(d3d11->mq_to_d3d11_main, message); - } - - rmt_EndCPUSample(); -} - - -RMT_API void _rmt_EndD3D11Sample(void) -{ - ThreadSampler* ts; - D3D11* d3d11; - - if (g_Remotery == NULL) - return; - - // Has D3D11 been unbound? - d3d11 = g_Remotery->d3d11; - assert(d3d11 != NULL); - if (d3d11->device == NULL || d3d11->context == NULL) - return; - - if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) - { - // Close the timestamp - D3D11Sample* d3d_sample = (D3D11Sample*)ts->sample_trees[SampleType_D3D11]->current_parent; - if (d3d_sample->timestamp != NULL) - D3D11Timestamp_End(d3d_sample->timestamp, d3d11->context); - - // Send to the update loop for ready-polling - if (ThreadSampler_Pop(ts, d3d11->mq_to_d3d11_main, (Sample*)d3d_sample)) - // Perform ready-polling on popping of the root sample - UpdateD3D11Frame(); - } -} - - -#endif // RMT_USE_D3D11 - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -@OpenGL: OpenGL event sampling ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -#if RMT_USE_OPENGL - - -#ifndef APIENTRY -# if defined(__MINGW32__) || defined(__CYGWIN__) -# define APIENTRY __stdcall -# elif (defined(_MSC_VER) && (_MSC_VER >= 800)) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) -# define APIENTRY __stdcall -# else -# define APIENTRY -# endif -#endif - -#ifndef GLAPI -# if defined(__MINGW32__) || defined(__CYGWIN__) -# define GLAPI extern -# elif defined (_WIN32) -# define GLAPI WINGDIAPI -# else -# define GLAPI extern -# endif -#endif - -#ifndef GLAPIENTRY -#define GLAPIENTRY APIENTRY -#endif - -typedef rmtU32 GLenum; -typedef rmtU32 GLuint; -typedef rmtS32 GLint; -typedef rmtS32 GLsizei; -typedef rmtU64 GLuint64; -typedef rmtS64 GLint64; -typedef unsigned char GLubyte; - -typedef GLenum (GLAPIENTRY * PFNGLGETERRORPROC) (void); -typedef void (GLAPIENTRY * PFNGLGENQUERIESPROC) (GLsizei n, GLuint* ids); -typedef void (GLAPIENTRY * PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint* ids); -typedef void (GLAPIENTRY * PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (GLAPIENTRY * PFNGLENDQUERYPROC) (GLenum target); -typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint* params); -typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint* params); -typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64* params); -typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64* params); -typedef void (GLAPIENTRY * PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); - -#define GL_NO_ERROR 0 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_TIME_ELAPSED 0x88BF -#define GL_TIMESTAMP 0x8E28 - -#define RMT_GL_GET_FUN(x) assert(g_Remotery->opengl->x != NULL); g_Remotery->opengl->x - -#define rmtglGenQueries RMT_GL_GET_FUN(__glGenQueries) -#define rmtglDeleteQueries RMT_GL_GET_FUN(__glDeleteQueries) -#define rmtglBeginQuery RMT_GL_GET_FUN(__glBeginQuery) -#define rmtglEndQuery RMT_GL_GET_FUN(__glEndQuery) -#define rmtglGetQueryObjectiv RMT_GL_GET_FUN(__glGetQueryObjectiv) -#define rmtglGetQueryObjectuiv RMT_GL_GET_FUN(__glGetQueryObjectuiv) -#define rmtglGetQueryObjecti64v RMT_GL_GET_FUN(__glGetQueryObjecti64v) -#define rmtglGetQueryObjectui64v RMT_GL_GET_FUN(__glGetQueryObjectui64v) -#define rmtglQueryCounter RMT_GL_GET_FUN(__glQueryCounter) - - -struct OpenGL_t -{ - // Handle to the OS OpenGL DLL - void* dll_handle; - - PFNGLGETERRORPROC __glGetError; - PFNGLGENQUERIESPROC __glGenQueries; - PFNGLDELETEQUERIESPROC __glDeleteQueries; - PFNGLBEGINQUERYPROC __glBeginQuery; - PFNGLENDQUERYPROC __glEndQuery; - PFNGLGETQUERYOBJECTIVPROC __glGetQueryObjectiv; - PFNGLGETQUERYOBJECTUIVPROC __glGetQueryObjectuiv; - PFNGLGETQUERYOBJECTI64VPROC __glGetQueryObjecti64v; - PFNGLGETQUERYOBJECTUI64VPROC __glGetQueryObjectui64v; - PFNGLQUERYCOUNTERPROC __glQueryCounter; - - // Queue to the OpenGL main update thread - // Given that BeginSample/EndSample need to be called from the same thread that does the update, there - // is really no need for this to be a thread-safe queue. I'm using it for its convenience. - rmtMessageQueue* mq_to_opengl_main; - - // Mark the first time so that remaining timestamps are offset from this - rmtU64 first_timestamp; -}; - - -static GLenum rmtglGetError(void) -{ - if (g_Remotery != NULL) - { - assert(g_Remotery->opengl != NULL); - if (g_Remotery->opengl->__glGetError != NULL) - return g_Remotery->opengl->__glGetError(); - } - - return (GLenum)0; -} - - -#ifdef RMT_PLATFORM_LINUX - #ifdef __cplusplus - extern "C" void* glXGetProcAddressARB(const GLubyte*); - #else - extern void* glXGetProcAddressARB(const GLubyte*); - #endif -#endif - - -static void* rmtglGetProcAddress(OpenGL* opengl, const char* symbol) -{ - #if defined(RMT_PLATFORM_WINDOWS) - { - // Get OpenGL extension-loading function for each call - typedef void* (*wglGetProcAddressFn)(LPCSTR); - { - assert(opengl != NULL); - wglGetProcAddressFn wglGetProcAddress = (wglGetProcAddressFn)rmtGetProcAddress(opengl->dll_handle, "wglGetProcAddress"); - if (wglGetProcAddress != NULL) - return wglGetProcAddress(symbol); - } - } - - #elif defined(RMT_PLATFORM_MACOS) && !defined(GLEW_APPLE_GLX) - - return rmtGetProcAddress(opengl->dll_handle, symbol); - - #elif defined(RMT_PLATFORM_LINUX) - - return glXGetProcAddressARB((const GLubyte*)symbol); - - #endif - - return NULL; -} - - -static rmtError OpenGL_Create(OpenGL** opengl) -{ - rmtError error; - - assert(opengl != NULL); - - *opengl = (OpenGL*)rmtMalloc(sizeof(OpenGL)); - if (*opengl == NULL) - return RMT_ERROR_MALLOC_FAIL; - - (*opengl)->dll_handle = NULL; - - (*opengl)->__glGetError = NULL; - (*opengl)->__glGenQueries = NULL; - (*opengl)->__glDeleteQueries = NULL; - (*opengl)->__glBeginQuery = NULL; - (*opengl)->__glEndQuery = NULL; - (*opengl)->__glGetQueryObjectiv = NULL; - (*opengl)->__glGetQueryObjectuiv = NULL; - (*opengl)->__glGetQueryObjecti64v = NULL; - (*opengl)->__glGetQueryObjectui64v = NULL; - (*opengl)->__glQueryCounter = NULL; - - (*opengl)->mq_to_opengl_main = NULL; - (*opengl)->first_timestamp = 0; - - New_1(rmtMessageQueue, (*opengl)->mq_to_opengl_main, g_Settings.messageQueueSizeInBytes); - return error; -} - - -static void OpenGL_Destructor(OpenGL* opengl) -{ - assert(opengl != NULL); - Delete(rmtMessageQueue, opengl->mq_to_opengl_main); -} - - -typedef struct OpenGLTimestamp -{ - // Inherit so that timestamps can be quickly allocated - ObjectLink Link; - - // Pair of timestamp queries that wrap the sample - GLuint queries[2]; -} OpenGLTimestamp; - - -static rmtError OpenGLTimestamp_Constructor(OpenGLTimestamp* stamp) -{ - int error; - - assert(stamp != NULL); - - ObjectLink_Constructor((ObjectLink*)stamp); - - // Set defaults - stamp->queries[0] = stamp->queries[1] = 0; - - // Create start/end timestamp queries - assert(g_Remotery != NULL); - rmtglGenQueries(2, stamp->queries); - error = rmtglGetError(); - if (error != GL_NO_ERROR) - return RMT_ERROR_OPENGL_ERROR; - - return RMT_ERROR_NONE; -} - - -static void OpenGLTimestamp_Destructor(OpenGLTimestamp* stamp) -{ - assert(stamp != NULL); - - // Destroy queries - if (stamp->queries[0] != 0) - { - int error; - rmtglDeleteQueries(2, stamp->queries); - error = rmtglGetError(); - assert(error == GL_NO_ERROR); - } -} - - -static void OpenGLTimestamp_Begin(OpenGLTimestamp* stamp) -{ - assert(stamp != NULL); - - // First query - assert(g_Remotery != NULL); - rmtglQueryCounter(stamp->queries[0], GL_TIMESTAMP); -} - - -static void OpenGLTimestamp_End(OpenGLTimestamp* stamp) -{ - assert(stamp != NULL); - - // Second query - assert(g_Remotery != NULL); - rmtglQueryCounter(stamp->queries[1], GL_TIMESTAMP); -} - - -static rmtBool OpenGLTimestamp_GetData(OpenGLTimestamp* stamp, rmtU64* out_start, rmtU64* out_end, rmtU64* out_first_timestamp) -{ - GLuint64 start = 0, end = 0; - GLint startAvailable = 0, endAvailable = 0; - int error; - - assert(g_Remotery != NULL); - - assert(stamp != NULL); - assert(stamp->queries[0] != 0 && stamp->queries[1] != 0); - - // Check to see if all queries are ready - // If any fail to arrive, wait until later - rmtglGetQueryObjectiv(stamp->queries[0], GL_QUERY_RESULT_AVAILABLE, &startAvailable); - error = rmtglGetError(); - assert(error == GL_NO_ERROR); - if (!startAvailable) - return RMT_FALSE; - rmtglGetQueryObjectiv(stamp->queries[1], GL_QUERY_RESULT_AVAILABLE, &endAvailable); - error = rmtglGetError(); - assert(error == GL_NO_ERROR); - if (!endAvailable) - return RMT_FALSE; - - rmtglGetQueryObjectui64v(stamp->queries[0], GL_QUERY_RESULT, &start); - error = rmtglGetError(); - assert(error == GL_NO_ERROR); - rmtglGetQueryObjectui64v(stamp->queries[1], GL_QUERY_RESULT, &end); - error = rmtglGetError(); - assert(error == GL_NO_ERROR); - - // Mark the first timestamp - assert(out_first_timestamp != NULL); - if (*out_first_timestamp == 0) - *out_first_timestamp = start; - - // Calculate start and end timestamps (we want us, the queries give us ns) - *out_start = (rmtU64)(start - *out_first_timestamp) / 1000ULL; - *out_end = (rmtU64)(end - *out_first_timestamp) / 1000ULL; - - return RMT_TRUE; -} - - -typedef struct OpenGLSample -{ - // IS-A inheritance relationship - Sample m_sample; - - OpenGLTimestamp* timestamp; - -} OpenGLSample; - - -static rmtError OpenGLSample_Constructor(OpenGLSample* sample) -{ - rmtError error; - - assert(sample != NULL); - - // Chain to sample constructor - Sample_Constructor((Sample*)sample); - sample->m_sample.type = SampleType_OpenGL; - sample->m_sample.size_bytes = sizeof(OpenGLSample); - New_0(OpenGLTimestamp, sample->timestamp); - - return RMT_ERROR_NONE; -} - - -static void OpenGLSample_Destructor(OpenGLSample* sample) -{ - Delete(OpenGLTimestamp, sample->timestamp); - Sample_Destructor((Sample*)sample); -} - - -RMT_API void _rmt_BindOpenGL() -{ - if (g_Remotery != NULL) - { - OpenGL* opengl = g_Remotery->opengl; - assert(opengl != NULL); - - #if defined (RMT_PLATFORM_WINDOWS) - opengl->dll_handle = rmtLoadLibrary("opengl32.dll"); - #elif defined (RMT_PLATFORM_MACOS) - opengl->dll_handle = rmtLoadLibrary("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"); - #endif - - opengl->__glGetError = (PFNGLGETERRORPROC)rmtGetProcAddress(opengl->dll_handle, "glGetError"); - opengl->__glGenQueries = (PFNGLGENQUERIESPROC)rmtglGetProcAddress(opengl, "glGenQueries"); - opengl->__glDeleteQueries = (PFNGLDELETEQUERIESPROC)rmtglGetProcAddress(opengl, "glDeleteQueries"); - opengl->__glBeginQuery = (PFNGLBEGINQUERYPROC)rmtglGetProcAddress(opengl, "glBeginQuery"); - opengl->__glEndQuery = (PFNGLENDQUERYPROC)rmtglGetProcAddress(opengl, "glEndQuery"); - opengl->__glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)rmtglGetProcAddress(opengl, "glGetQueryObjectiv"); - opengl->__glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)rmtglGetProcAddress(opengl, "glGetQueryObjectuiv"); - opengl->__glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC)rmtglGetProcAddress(opengl, "glGetQueryObjecti64v"); - opengl->__glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC)rmtglGetProcAddress(opengl, "glGetQueryObjectui64v"); - opengl->__glQueryCounter = (PFNGLQUERYCOUNTERPROC)rmtglGetProcAddress(opengl, "glQueryCounter"); - } -} - - -static void UpdateOpenGLFrame(void); - - -RMT_API void _rmt_UnbindOpenGL(void) -{ - if (g_Remotery != NULL) - { - OpenGL* opengl = g_Remotery->opengl; - assert(opengl != NULL); - - // Stall waiting for the OpenGL queue to empty into the Remotery queue - while (!rmtMessageQueue_IsEmpty(opengl->mq_to_opengl_main)) - UpdateOpenGLFrame(); - - // Forcefully delete sample tree on this thread to release time stamps from - // the same thread that created them - Remotery_BlockingDeleteSampleTree(g_Remotery, SampleType_OpenGL); - - // Release reference to the OpenGL DLL - if (opengl->dll_handle != NULL) - { - rmtFreeLibrary(opengl->dll_handle); - opengl->dll_handle = NULL; - } - } -} - - -RMT_API void _rmt_BeginOpenGLSample(rmtPStr name, rmtU32* hash_cache) -{ - ThreadSampler* ts; - - if (g_Remotery == NULL) - return; - - if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) - { - Sample* sample; - rmtU32 name_hash = ThreadSampler_GetNameHash(ts, name, hash_cache); - - // Create the OpenGL tree on-demand as the tree needs an up-front-created root. - // This is not possible to create on initialisation as a OpenGL binding is not yet available. - SampleTree** ogl_tree = &ts->sample_trees[SampleType_OpenGL]; - if (*ogl_tree == NULL) - { - rmtError error; - New_3(SampleTree, *ogl_tree, sizeof(OpenGLSample), (ObjConstructor)OpenGLSample_Constructor, (ObjDestructor)OpenGLSample_Destructor); - if (error != RMT_ERROR_NONE) - return; - } - - // Push the sample and activate the timestamp - if (ThreadSampler_Push(*ogl_tree, name_hash, 0, &sample) == RMT_ERROR_NONE) - { - OpenGLSample* ogl_sample = (OpenGLSample*)sample; - OpenGLTimestamp_Begin(ogl_sample->timestamp); - } - } -} - - -static rmtBool GetOpenGLSampleTimes(Sample* sample, rmtU64* out_first_timestamp) -{ - Sample* child; - - OpenGLSample* ogl_sample = (OpenGLSample*)sample; - - assert(sample != NULL); - if (ogl_sample->timestamp != NULL) - { - if (!OpenGLTimestamp_GetData(ogl_sample->timestamp, &sample->us_start, &sample->us_end, out_first_timestamp)) - return RMT_FALSE; - - sample->us_length = sample->us_end - sample->us_start; - } - - // Get child sample times - for (child = sample->first_child; child != NULL; child = child->next_sibling) - { - if (!GetOpenGLSampleTimes(child, out_first_timestamp)) - return RMT_FALSE; - } - - return RMT_TRUE; -} - - -static void UpdateOpenGLFrame(void) -{ - OpenGL* opengl; - - if (g_Remotery == NULL) - return; - - opengl = g_Remotery->opengl; - assert(opengl != NULL); - - rmt_BeginCPUSample(rmt_UpdateOpenGLFrame, 0); - - // Process all messages in the OpenGL queue - while (1) - { - Msg_SampleTree* sample_tree; - Sample* sample; - - Message* message = rmtMessageQueue_PeekNextMessage(opengl->mq_to_opengl_main); - if (message == NULL) - break; - - // There's only one valid message type in this queue - assert(message->id == MsgID_SampleTree); - sample_tree = (Msg_SampleTree*)message->payload; - sample = sample_tree->root_sample; - assert(sample->type == SampleType_OpenGL); - - // Retrieve timing of all OpenGL samples - // If they aren't ready leave the message unconsumed, holding up later frames and maintaining order - if (!GetOpenGLSampleTimes(sample, &opengl->first_timestamp)) - break; - - // Pass samples onto the remotery thread for sending to the viewer - AddSampleTreeMessage(g_Remotery->mq_to_rmt_thread, sample, sample_tree->allocator, sample_tree->thread_name, message->thread_sampler); - rmtMessageQueue_ConsumeNextMessage(opengl->mq_to_opengl_main, message); - } - - rmt_EndCPUSample(); -} - - -RMT_API void _rmt_EndOpenGLSample(void) -{ - ThreadSampler* ts; - - if (g_Remotery == NULL) - return; - - if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) - { - // Close the timestamp - OpenGLSample* ogl_sample = (OpenGLSample*)ts->sample_trees[SampleType_OpenGL]->current_parent; - if (ogl_sample->timestamp != NULL) - OpenGLTimestamp_End(ogl_sample->timestamp); - - // Send to the update loop for ready-polling - if (ThreadSampler_Pop(ts, g_Remotery->opengl->mq_to_opengl_main, (Sample*)ogl_sample)) - // Perform ready-polling on popping of the root sample - UpdateOpenGLFrame(); - } -} - - - -#endif // RMT_USE_OPENGL - - - -/* - ------------------------------------------------------------------------------------------------------------------------ - ------------------------------------------------------------------------------------------------------------------------ - @Metal: Metal event sampling - ------------------------------------------------------------------------------------------------------------------------ - ------------------------------------------------------------------------------------------------------------------------ - */ - - - -#if RMT_USE_METAL - - - -struct Metal_t -{ - // Queue to the Metal main update thread - // Given that BeginSample/EndSample need to be called from the same thread that does the update, there - // is really no need for this to be a thread-safe queue. I'm using it for its convenience. - rmtMessageQueue* mq_to_metal_main; -}; - - -static rmtError Metal_Create(Metal** metal) -{ - rmtError error; - - assert(metal != NULL); - - *metal = (Metal*)rmtMalloc(sizeof(Metal)); - if (*metal == NULL) - return RMT_ERROR_MALLOC_FAIL; - - (*metal)->mq_to_metal_main = NULL; - - New_1(rmtMessageQueue, (*metal)->mq_to_metal_main, g_Settings.messageQueueSizeInBytes); - return error; -} - - -static void Metal_Destructor(Metal* metal) -{ - assert(metal != NULL); - Delete(rmtMessageQueue, metal->mq_to_metal_main); -} - - -typedef struct MetalTimestamp -{ - // Inherit so that timestamps can be quickly allocated - ObjectLink Link; - - // Output from GPU callbacks - rmtU64 start; - rmtU64 end; - rmtBool ready; -} MetalTimestamp; - - -static rmtError MetalTimestamp_Constructor(MetalTimestamp* stamp) -{ - assert(stamp != NULL); - - ObjectLink_Constructor((ObjectLink*)stamp); - - // Set defaults - stamp->start = 0; - stamp->end = 0; - stamp->ready = RMT_FALSE; - - return RMT_ERROR_NONE; -} - - -static void MetalTimestamp_Destructor(MetalTimestamp* stamp) -{ - assert(stamp != NULL); -} - - -rmtU64 rmtMetal_usGetTime() -{ - // Share the CPU timer for auto-sync - assert(g_Remotery != NULL); - return usTimer_Get(&g_Remotery->timer); -} - - -void rmtMetal_MeasureCommandBuffer(unsigned long long* out_start, unsigned long long* out_end, unsigned int* out_ready); - - -static void MetalTimestamp_Begin(MetalTimestamp* stamp) -{ - assert(stamp != NULL); - stamp->ready = RMT_FALSE; - - // Metal can currently only issue callbacks at the command buffer level - // So for now measure execution of the entire command buffer - rmtMetal_MeasureCommandBuffer(&stamp->start, &stamp->end, &stamp->ready); -} - - -static void MetalTimestamp_End(MetalTimestamp* stamp) -{ - assert(stamp != NULL); - - // As Metal can currently only measure entire command buffers, this function is a no-op - // as the completed handler was already issued in Begin -} - - -static rmtBool MetalTimestamp_GetData(MetalTimestamp* stamp, rmtU64* out_start, rmtU64* out_end) -{ - assert(g_Remotery != NULL); - assert(stamp != NULL); - - // GPU writes ready flag when complete handler is called - if (stamp->ready == RMT_FALSE) - return RMT_FALSE; - - *out_start = stamp->start; - *out_end = stamp->end; - - return RMT_TRUE; -} - - -typedef struct MetalSample -{ - // IS-A inheritance relationship - Sample m_sample; - - MetalTimestamp* timestamp; - -} MetalSample; - - -static rmtError MetalSample_Constructor(MetalSample* sample) -{ - rmtError error; - - assert(sample != NULL); - - // Chain to sample constructor - Sample_Constructor((Sample*)sample); - sample->m_sample.type = SampleType_Metal; - sample->m_sample.size_bytes = sizeof(MetalSample); - New_0(MetalTimestamp, sample->timestamp); - - return RMT_ERROR_NONE; -} - - -static void MetalSample_Destructor(MetalSample* sample) -{ - Delete(MetalTimestamp, sample->timestamp); - Sample_Destructor((Sample*)sample); -} - - -static void UpdateOpenGLFrame(void); - - -/*RMT_API void _rmt_UnbindMetal(void) -{ - if (g_Remotery != NULL) - { - Metal* metal = g_Remotery->metal; - assert(metal != NULL); - - // Stall waiting for the Metal queue to empty into the Remotery queue - while (!rmtMessageQueue_IsEmpty(metal->mq_to_metal_main)) - UpdateMetalFrame(); - - // Forcefully delete sample tree on this thread to release time stamps from - // the same thread that created them - Remotery_BlockingDeleteSampleTree(g_Remotery, SampleType_Metal); - } -}*/ - - -RMT_API void _rmt_BeginMetalSample(rmtPStr name, rmtU32* hash_cache) -{ - ThreadSampler* ts; - - if (g_Remotery == NULL) - return; - - if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) - { - Sample* sample; - rmtU32 name_hash = ThreadSampler_GetNameHash(ts, name, hash_cache); - - // Create the Metal tree on-demand as the tree needs an up-front-created root. - // This is not possible to create on initialisation as a Metal binding is not yet available. - SampleTree** metal_tree = &ts->sample_trees[SampleType_Metal]; - if (*metal_tree == NULL) - { - rmtError error; - New_3(SampleTree, *metal_tree, sizeof(MetalSample), (ObjConstructor)MetalSample_Constructor, (ObjDestructor)MetalSample_Destructor); - if (error != RMT_ERROR_NONE) - return; - } - - // Push the sample and activate the timestamp - if (ThreadSampler_Push(*metal_tree, name_hash, 0, &sample) == RMT_ERROR_NONE) - { - MetalSample* metal_sample = (MetalSample*)sample; - MetalTimestamp_Begin(metal_sample->timestamp); - } - } -} - - -static rmtBool GetMetalSampleTimes(Sample* sample) -{ - Sample* child; - - MetalSample* metal_sample = (MetalSample*)sample; - - assert(sample != NULL); - if (metal_sample->timestamp != NULL) - { - if (!MetalTimestamp_GetData(metal_sample->timestamp, &sample->us_start, &sample->us_end)) - return RMT_FALSE; - - sample->us_length = sample->us_end - sample->us_start; - } - - // Get child sample times - for (child = sample->first_child; child != NULL; child = child->next_sibling) - { - if (!GetMetalSampleTimes(child)) - return RMT_FALSE; - } - - return RMT_TRUE; -} - - -static void UpdateMetalFrame(void) -{ - Metal* metal; - - if (g_Remotery == NULL) - return; - - metal = g_Remotery->metal; - assert(metal != NULL); - - rmt_BeginCPUSample(rmt_UpdateMetalFrame, 0); - - // Process all messages in the Metal queue - while (1) - { - Msg_SampleTree* sample_tree; - Sample* sample; - - Message* message = rmtMessageQueue_PeekNextMessage(metal->mq_to_metal_main); - if (message == NULL) - break; - - // There's only one valid message type in this queue - assert(message->id == MsgID_SampleTree); - sample_tree = (Msg_SampleTree*)message->payload; - sample = sample_tree->root_sample; - assert(sample->type == SampleType_Metal); - - // Retrieve timing of all Metal samples - // If they aren't ready leave the message unconsumed, holding up later frames and maintaining order - if (!GetMetalSampleTimes(sample)) - break; - - // Pass samples onto the remotery thread for sending to the viewer - AddSampleTreeMessage(g_Remotery->mq_to_rmt_thread, sample, sample_tree->allocator, sample_tree->thread_name, message->thread_sampler); - rmtMessageQueue_ConsumeNextMessage(metal->mq_to_metal_main, message); - } - - rmt_EndCPUSample(); -} - - -RMT_API void _rmt_EndMetalSample(void) -{ - ThreadSampler* ts; - - if (g_Remotery == NULL) - return; - - if (Remotery_GetThreadSampler(g_Remotery, &ts) == RMT_ERROR_NONE) - { - // Close the timestamp - MetalSample* metal_sample = (MetalSample*)ts->sample_trees[SampleType_Metal]->current_parent; - if (metal_sample->timestamp != NULL) - MetalTimestamp_End(metal_sample->timestamp); - - // Send to the update loop for ready-polling - if (ThreadSampler_Pop(ts, g_Remotery->metal->mq_to_metal_main, (Sample*)metal_sample)) - // Perform ready-polling on popping of the root sample - UpdateMetalFrame(); - } -} - - - -#endif // RMT_USE_METAL - - -#endif // RMT_ENABLED - diff --git a/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.h b/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.h deleted file mode 100644 index 9b25a0c..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.h +++ /dev/null @@ -1,620 +0,0 @@ - - -/* -Copyright 2014 Celtoys Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - - -/* - -Compiling ---------- - -* Windows (MSVC) - add lib/Remotery.c and lib/Remotery.h to your program. Set include - directories to add Remotery/lib path. The required library ws2_32.lib should be picked - up through the use of the #pragma comment(lib, "ws2_32.lib") directive in Remotery.c. - -* Mac OS X (XCode) - simply add lib/Remotery.c and lib/Remotery.h to your program. - -* Linux (GCC) - add the source in lib folder. Compilation of the code requires -pthreads for - library linkage. For example to compile the same run: cc lib/Remotery.c sample/sample.c - -I lib -pthread -lm - -You can define some extra macros to modify what features are compiled into Remotery. These are -documented just below this comment. - -*/ - - -#ifndef RMT_INCLUDED_H -#define RMT_INCLUDED_H - - -// Set to 0 to not include any bits of Remotery in your build -#ifndef RMT_ENABLED -#define RMT_ENABLED 1 -#endif - -// Used by the Celtoys TinyCRT library (not released yet) -#ifndef RMT_USE_TINYCRT -#define RMT_USE_TINYCRT 0 -#endif - -// Assuming CUDA headers/libs are setup, allow CUDA profiling -#ifndef RMT_USE_CUDA -#define RMT_USE_CUDA 0 -#endif - -// Assuming Direct3D 11 headers/libs are setup, allow D3D11 profiling -#ifndef RMT_USE_D3D11 -#define RMT_USE_D3D11 0 -#endif - -// Allow OpenGL profiling -#ifndef RMT_USE_OPENGL -#define RMT_USE_OPENGL 0 -#endif - -// Allow Metal profiling -#ifndef RMT_USE_METAL -#define RMT_USE_METAL 0 -#endif - -// Initially use POSIX thread names to name threads instead of Thread0, 1, ... -#ifndef RMT_USE_POSIX_THREADNAMES -#define RMT_USE_POSIX_THREADNAMES 0 -#endif - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - Compiler/Platform Detection and Preprocessor Utilities ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - -// Platform identification -#if defined(_WINDOWS) || defined(_WIN32) - #define RMT_PLATFORM_WINDOWS -#elif defined(__linux__) - #define RMT_PLATFORM_LINUX - #define RMT_PLATFORM_POSIX -#elif defined(__APPLE__) - #define RMT_PLATFORM_MACOS - #define RMT_PLATFORM_POSIX -#endif - -#ifdef RMT_DLL - #if defined (RMT_PLATFORM_WINDOWS) - #if defined (RMT_IMPL) - #define RMT_API __declspec(dllexport) - #else - #define RMT_API __declspec(dllimport) - #endif - #elif defined (RMT_PLATFORM_POSIX) - #if defined (RMT_IMPL) - #define RMT_API __attribute__((visibility("default"))) - #else - #define RMT_API - #endif - #endif -#else - #define RMT_API -#endif - -// Allows macros to be written that can work around the inability to do: #define(x) #ifdef x -// with the C preprocessor. -#if RMT_ENABLED - #define IFDEF_RMT_ENABLED(t, f) t -#else - #define IFDEF_RMT_ENABLED(t, f) f -#endif -#if RMT_ENABLED && RMT_USE_CUDA - #define IFDEF_RMT_USE_CUDA(t, f) t -#else - #define IFDEF_RMT_USE_CUDA(t, f) f -#endif -#if RMT_ENABLED && RMT_USE_D3D11 - #define IFDEF_RMT_USE_D3D11(t, f) t -#else - #define IFDEF_RMT_USE_D3D11(t, f) f -#endif -#if RMT_ENABLED && RMT_USE_OPENGL - #define IFDEF_RMT_USE_OPENGL(t, f) t -#else - #define IFDEF_RMT_USE_OPENGL(t, f) f -#endif -#if RMT_ENABLED && RMT_USE_METAL - #define IFDEF_RMT_USE_METAL(t, f) t -#else - #define IFDEF_RMT_USE_METAL(t, f) f -#endif - - -// Public interface is written in terms of these macros to easily enable/disable itself -#define RMT_OPTIONAL(macro, x) IFDEF_ ## macro(x, ) -#define RMT_OPTIONAL_RET(macro, x, y) IFDEF_ ## macro(x, (y)) - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - Types ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -// Boolean -typedef unsigned int rmtBool; -#define RMT_TRUE ((rmtBool)1) -#define RMT_FALSE ((rmtBool)0) - - -// Unsigned integer types -typedef unsigned char rmtU8; -typedef unsigned short rmtU16; -typedef unsigned int rmtU32; -typedef unsigned long long rmtU64; - - -// Signed integer types -typedef char rmtS8; -typedef short rmtS16; -typedef int rmtS32; -typedef long long rmtS64; - - -// Const, null-terminated string pointer -typedef const char* rmtPStr; - - -// Handle to the main remotery instance -typedef struct Remotery Remotery; - - -// All possible error codes -typedef enum rmtError -{ - RMT_ERROR_NONE, - - // System errors - RMT_ERROR_MALLOC_FAIL, // Malloc call within remotery failed - RMT_ERROR_TLS_ALLOC_FAIL, // Attempt to allocate thread local storage failed - RMT_ERROR_VIRTUAL_MEMORY_BUFFER_FAIL, // Failed to create a virtual memory mirror buffer - RMT_ERROR_CREATE_THREAD_FAIL, // Failed to create a thread for the server - - // Network TCP/IP socket errors - RMT_ERROR_SOCKET_INIT_NETWORK_FAIL, // Network initialisation failure (e.g. on Win32, WSAStartup fails) - RMT_ERROR_SOCKET_CREATE_FAIL, // Can't create a socket for connection to the remote viewer - RMT_ERROR_SOCKET_BIND_FAIL, // Can't bind a socket for the server - RMT_ERROR_SOCKET_LISTEN_FAIL, // Created server socket failed to enter a listen state - RMT_ERROR_SOCKET_SET_NON_BLOCKING_FAIL, // Created server socket failed to switch to a non-blocking state - RMT_ERROR_SOCKET_INVALID_POLL, // Poll attempt on an invalid socket - RMT_ERROR_SOCKET_SELECT_FAIL, // Server failed to call select on socket - RMT_ERROR_SOCKET_POLL_ERRORS, // Poll notified that the socket has errors - RMT_ERROR_SOCKET_ACCEPT_FAIL, // Server failed to accept connection from client - RMT_ERROR_SOCKET_SEND_TIMEOUT, // Timed out trying to send data - RMT_ERROR_SOCKET_SEND_FAIL, // Unrecoverable error occured while client/server tried to send data - RMT_ERROR_SOCKET_RECV_NO_DATA, // No data available when attempting a receive - RMT_ERROR_SOCKET_RECV_TIMEOUT, // Timed out trying to receive data - RMT_ERROR_SOCKET_RECV_FAILED, // Unrecoverable error occured while client/server tried to receive data - - // WebSocket errors - RMT_ERROR_WEBSOCKET_HANDSHAKE_NOT_GET, // WebSocket server handshake failed, not HTTP GET - RMT_ERROR_WEBSOCKET_HANDSHAKE_NO_VERSION, // WebSocket server handshake failed, can't locate WebSocket version - RMT_ERROR_WEBSOCKET_HANDSHAKE_BAD_VERSION, // WebSocket server handshake failed, unsupported WebSocket version - RMT_ERROR_WEBSOCKET_HANDSHAKE_NO_HOST, // WebSocket server handshake failed, can't locate host - RMT_ERROR_WEBSOCKET_HANDSHAKE_BAD_HOST, // WebSocket server handshake failed, host is not allowed to connect - RMT_ERROR_WEBSOCKET_HANDSHAKE_NO_KEY, // WebSocket server handshake failed, can't locate WebSocket key - RMT_ERROR_WEBSOCKET_HANDSHAKE_BAD_KEY, // WebSocket server handshake failed, WebSocket key is ill-formed - RMT_ERROR_WEBSOCKET_HANDSHAKE_STRING_FAIL, // WebSocket server handshake failed, internal error, bad string code - RMT_ERROR_WEBSOCKET_DISCONNECTED, // WebSocket server received a disconnect request and closed the socket - RMT_ERROR_WEBSOCKET_BAD_FRAME_HEADER, // Couldn't parse WebSocket frame header - RMT_ERROR_WEBSOCKET_BAD_FRAME_HEADER_SIZE, // Partially received wide frame header size - RMT_ERROR_WEBSOCKET_BAD_FRAME_HEADER_MASK, // Partially received frame header data mask - RMT_ERROR_WEBSOCKET_RECEIVE_TIMEOUT, // Timeout receiving frame header - - RMT_ERROR_REMOTERY_NOT_CREATED, // Remotery object has not been created - RMT_ERROR_SEND_ON_INCOMPLETE_PROFILE, // An attempt was made to send an incomplete profile tree to the client - - // CUDA error messages - RMT_ERROR_CUDA_DEINITIALIZED, // This indicates that the CUDA driver is in the process of shutting down - RMT_ERROR_CUDA_NOT_INITIALIZED, // This indicates that the CUDA driver has not been initialized with cuInit() or that initialization has failed - RMT_ERROR_CUDA_INVALID_CONTEXT, // This most frequently indicates that there is no context bound to the current thread - RMT_ERROR_CUDA_INVALID_VALUE, // This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values - RMT_ERROR_CUDA_INVALID_HANDLE, // This indicates that a resource handle passed to the API call was not valid - RMT_ERROR_CUDA_OUT_OF_MEMORY, // The API call failed because it was unable to allocate enough memory to perform the requested operation - RMT_ERROR_ERROR_NOT_READY, // This indicates that a resource handle passed to the API call was not valid - - // Direct3D 11 error messages - RMT_ERROR_D3D11_FAILED_TO_CREATE_QUERY, // Failed to create query for sample - - // OpenGL error messages - RMT_ERROR_OPENGL_ERROR, // Generic OpenGL error, no need to expose detail since app will need an OpenGL error callback registered - - RMT_ERROR_CUDA_UNKNOWN, -} rmtError; - - -typedef enum rmtSampleFlags -{ - // Default behaviour - RMTSF_None = 0, - - // Search parent for same-named samples and merge timing instead of adding a new sample - RMTSF_Aggregate = 1, -} rmtSampleFlags; - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - Public Interface ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -// Can call remotery functions on a null pointer -// TODO: Can embed extern "C" in these macros? - -#define rmt_Settings() \ - RMT_OPTIONAL_RET(RMT_ENABLED, _rmt_Settings(), NULL ) - -#define rmt_CreateGlobalInstance(rmt) \ - RMT_OPTIONAL_RET(RMT_ENABLED, _rmt_CreateGlobalInstance(rmt), RMT_ERROR_NONE) - -#define rmt_DestroyGlobalInstance(rmt) \ - RMT_OPTIONAL(RMT_ENABLED, _rmt_DestroyGlobalInstance(rmt)) - -#define rmt_SetGlobalInstance(rmt) \ - RMT_OPTIONAL(RMT_ENABLED, _rmt_SetGlobalInstance(rmt)) - -#define rmt_GetGlobalInstance() \ - RMT_OPTIONAL_RET(RMT_ENABLED, _rmt_GetGlobalInstance(), NULL) - -#define rmt_SetCurrentThreadName(rmt) \ - RMT_OPTIONAL(RMT_ENABLED, _rmt_SetCurrentThreadName(rmt)) - -#define rmt_LogText(text) \ - RMT_OPTIONAL(RMT_ENABLED, _rmt_LogText(text)) - -#define rmt_BeginCPUSample(name, flags) \ - RMT_OPTIONAL(RMT_ENABLED, { \ - static rmtU32 rmt_sample_hash_##name = 0; \ - _rmt_BeginCPUSample(#name, flags, &rmt_sample_hash_##name); \ - }) - -#define rmt_BeginCPUSampleDynamic(namestr, flags) \ - RMT_OPTIONAL(RMT_ENABLED, _rmt_BeginCPUSample(namestr, flags, NULL)) - -#define rmt_EndCPUSample() \ - RMT_OPTIONAL(RMT_ENABLED, _rmt_EndCPUSample()) - - -// Callback function pointer types -typedef void* (*rmtMallocPtr)(void* mm_context, rmtU32 size); -typedef void* (*rmtReallocPtr)(void* mm_context, void* ptr, rmtU32 size); -typedef void (*rmtFreePtr)(void* mm_context, void* ptr); -typedef void (*rmtInputHandlerPtr)(const char* text, void* context); - - -// Struture to fill in to modify Remotery default settings -typedef struct rmtSettings -{ - // Which port to listen for incoming connections on - rmtU16 port; - - // Only allow connections on localhost? - // For dev builds you may want to access your game from other devices but if - // you distribute a game to your players with Remotery active, probably best - // to limit connections to localhost. - rmtBool limit_connections_to_localhost; - - // How long to sleep between server updates, hopefully trying to give - // a little CPU back to other threads. - rmtU32 msSleepBetweenServerUpdates; - - // Size of the internal message queues Remotery uses - // Will be rounded to page granularity of 64k - rmtU32 messageQueueSizeInBytes; - - // If the user continuously pushes to the message queue, the server network - // code won't get a chance to update unless there's an upper-limit on how - // many messages can be consumed per loop. - rmtU32 maxNbMessagesPerUpdate; - - // Callback pointers for memory allocation - rmtMallocPtr malloc; - rmtReallocPtr realloc; - rmtFreePtr free; - void* mm_context; - - // Callback pointer for receiving input from the Remotery console - rmtInputHandlerPtr input_handler; - - // Context pointer that gets sent to Remotery console callback function - void* input_handler_context; - - rmtPStr logFilename; -} rmtSettings; - - -// Structure to fill in when binding CUDA to Remotery -typedef struct rmtCUDABind -{ - // The main context that all driver functions apply before each call - void* context; - - // Driver API function pointers that need to be pointed to - // Untyped so that the CUDA headers are not required in this file - // NOTE: These are named differently to the CUDA functions because the CUDA API has a habit of using - // macros to point function calls to different versions, e.g. cuEventDestroy is a macro for - // cuEventDestroy_v2. - void* CtxSetCurrent; - void* CtxGetCurrent; - void* EventCreate; - void* EventDestroy; - void* EventRecord; - void* EventQuery; - void* EventElapsedTime; - -} rmtCUDABind; - - -// Call once after you've initialised CUDA to bind it to Remotery -#define rmt_BindCUDA(bind) \ - RMT_OPTIONAL(RMT_USE_CUDA, _rmt_BindCUDA(bind)) - -// Mark the beginning of a CUDA sample on the specified asynchronous stream -#define rmt_BeginCUDASample(name, stream) \ - RMT_OPTIONAL(RMT_USE_CUDA, { \ - static rmtU32 rmt_sample_hash_##name = 0; \ - _rmt_BeginCUDASample(#name, &rmt_sample_hash_##name, stream); \ - }) - -// Mark the end of a CUDA sample on the specified asynchronous stream -#define rmt_EndCUDASample(stream) \ - RMT_OPTIONAL(RMT_USE_CUDA, _rmt_EndCUDASample(stream)) - - -#define rmt_BindD3D11(device, context) \ - RMT_OPTIONAL(RMT_USE_D3D11, _rmt_BindD3D11(device, context)) - -#define rmt_UnbindD3D11() \ - RMT_OPTIONAL(RMT_USE_D3D11, _rmt_UnbindD3D11()) - -#define rmt_BeginD3D11Sample(name) \ - RMT_OPTIONAL(RMT_USE_D3D11, { \ - static rmtU32 rmt_sample_hash_##name = 0; \ - _rmt_BeginD3D11Sample(#name, &rmt_sample_hash_##name); \ - }) - -#define rmt_BeginD3D11SampleDynamic(namestr) \ - RMT_OPTIONAL(RMT_USE_D3D11, _rmt_BeginD3D11Sample(namestr, NULL)) - -#define rmt_EndD3D11Sample() \ - RMT_OPTIONAL(RMT_USE_D3D11, _rmt_EndD3D11Sample()) - - -#define rmt_BindOpenGL() \ - RMT_OPTIONAL(RMT_USE_OPENGL, _rmt_BindOpenGL()) - -#define rmt_UnbindOpenGL() \ - RMT_OPTIONAL(RMT_USE_OPENGL, _rmt_UnbindOpenGL()) - -#define rmt_BeginOpenGLSample(name) \ - RMT_OPTIONAL(RMT_USE_OPENGL, { \ - static rmtU32 rmt_sample_hash_##name = 0; \ - _rmt_BeginOpenGLSample(#name, &rmt_sample_hash_##name); \ - }) - -#define rmt_BeginOpenGLSampleDynamic(namestr) \ - RMT_OPTIONAL(RMT_USE_OPENGL, _rmt_BeginOpenGLSample(namestr, NULL)) - -#define rmt_EndOpenGLSample() \ - RMT_OPTIONAL(RMT_USE_OPENGL, _rmt_EndOpenGLSample()) - - -#define rmt_BindMetal(command_buffer) \ - RMT_OPTIONAL(RMT_USE_METAL, _rmt_BindMetal(command_buffer)); - -#define rmt_UnbindMetal() \ - RMT_OPTIONAL(RMT_USE_METAL, _rmt_UnbindMetal()); - -#define rmt_BeginMetalSample(name) \ - RMT_OPTIONAL(RMT_USE_METAL, { \ - static rmtU32 rmt_sample_hash_##name = 0; \ - _rmt_BeginMetalSample(#name, &rmt_sample_hash_##name); \ - }) - -#define rmt_BeginMetalSampleDynamic(namestr) \ - RMT_OPTIONAL(RMT_USE_METAL, _rmt_BeginMetalSample(namestr, NULL)) - -#define rmt_EndMetalSample() \ - RMT_OPTIONAL(RMT_USE_METAL, _rmt_EndMetalSample()) - - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - C++ Public Interface Extensions ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -#ifdef __cplusplus - - -#if RMT_ENABLED - -// Types that end samples in their destructors -extern "C" RMT_API void _rmt_EndCPUSample(void); -struct rmt_EndCPUSampleOnScopeExit -{ - ~rmt_EndCPUSampleOnScopeExit() - { - _rmt_EndCPUSample(); - } -}; -#if RMT_USE_CUDA -extern "C" RMT_API void _rmt_EndCUDASample(void* stream); -struct rmt_EndCUDASampleOnScopeExit -{ - rmt_EndCUDASampleOnScopeExit(void* stream) : stream(stream) - { - } - ~rmt_EndCUDASampleOnScopeExit() - { - _rmt_EndCUDASample(stream); - } - void* stream; -}; -#endif -#if RMT_USE_D3D11 -extern "C" RMT_API void _rmt_EndD3D11Sample(void); -struct rmt_EndD3D11SampleOnScopeExit -{ - ~rmt_EndD3D11SampleOnScopeExit() - { - _rmt_EndD3D11Sample(); - } -}; -#endif - -#if RMT_USE_OPENGL -extern "C" RMT_API void _rmt_EndOpenGLSample(void); -struct rmt_EndOpenGLSampleOnScopeExit -{ - ~rmt_EndOpenGLSampleOnScopeExit() - { - _rmt_EndOpenGLSample(); - } -}; -#endif - -#if RMT_USE_METAL -extern "C" RMT_API void _rmt_EndMetalSample(void); -struct rmt_EndMetalSampleOnScopeExit -{ - ~rmt_EndMetalSampleOnScopeExit() - { - _rmt_EndMetalSample(); - } -}; -#endif - -#endif - - - -// Pairs a call to rmt_BeginSample with its call to rmt_EndSample when leaving scope -#define rmt_ScopedCPUSample(name, flags) \ - RMT_OPTIONAL(RMT_ENABLED, rmt_BeginCPUSample(name, flags)); \ - RMT_OPTIONAL(RMT_ENABLED, rmt_EndCPUSampleOnScopeExit rmt_ScopedCPUSample##name); -#define rmt_ScopedCUDASample(name, stream) \ - RMT_OPTIONAL(RMT_USE_CUDA, rmt_BeginCUDASample(name, stream)); \ - RMT_OPTIONAL(RMT_USE_CUDA, rmt_EndCUDASampleOnScopeExit rmt_ScopedCUDASample##name(stream)); -#define rmt_ScopedD3D11Sample(name) \ - RMT_OPTIONAL(RMT_USE_D3D11, rmt_BeginD3D11Sample(name)); \ - RMT_OPTIONAL(RMT_USE_D3D11, rmt_EndD3D11SampleOnScopeExit rmt_ScopedD3D11Sample##name); -#define rmt_ScopedOpenGLSample(name) \ - RMT_OPTIONAL(RMT_USE_OPENGL, rmt_BeginOpenGLSample(name)); \ - RMT_OPTIONAL(RMT_USE_OPENGL, rmt_EndOpenGLSampleOnScopeExit rmt_ScopedOpenGLSample##name); -#define rmt_ScopedMetalSample(name) \ - RMT_OPTIONAL(RMT_USE_METAL, rmt_BeginMetalSample(name)); \ - RMT_OPTIONAL(RMT_USE_METAL, rmt_EndMetalSampleOnScopeExit rmt_ScopedMetalSample##name); - -#endif - - - -/* ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- - Private Interface - don't directly call these ------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------- -*/ - - - -#if RMT_ENABLED - -#ifdef __cplusplus -extern "C" { -#endif - -RMT_API rmtSettings* _rmt_Settings( void ); -RMT_API enum rmtError _rmt_CreateGlobalInstance(Remotery** remotery); -RMT_API void _rmt_DestroyGlobalInstance(Remotery* remotery); -RMT_API void _rmt_SetGlobalInstance(Remotery* remotery); -RMT_API Remotery* _rmt_GetGlobalInstance(void); -RMT_API void _rmt_SetCurrentThreadName(rmtPStr thread_name); -RMT_API void _rmt_LogText(rmtPStr text); -RMT_API void _rmt_BeginCPUSample(rmtPStr name, rmtU32 flags, rmtU32* hash_cache); -RMT_API void _rmt_EndCPUSample(void); - -#if RMT_USE_CUDA -RMT_API void _rmt_BindCUDA(const rmtCUDABind* bind); -RMT_API void _rmt_BeginCUDASample(rmtPStr name, rmtU32* hash_cache, void* stream); -RMT_API void _rmt_EndCUDASample(void* stream); -#endif - -#if RMT_USE_D3D11 -RMT_API void _rmt_BindD3D11(void* device, void* context); -RMT_API void _rmt_UnbindD3D11(void); -RMT_API void _rmt_BeginD3D11Sample(rmtPStr name, rmtU32* hash_cache); -RMT_API void _rmt_EndD3D11Sample(void); -#endif - -#if RMT_USE_OPENGL -RMT_API void _rmt_BindOpenGL(); -RMT_API void _rmt_UnbindOpenGL(void); -RMT_API void _rmt_BeginOpenGLSample(rmtPStr name, rmtU32* hash_cache); -RMT_API void _rmt_EndOpenGLSample(void); -#endif - -#if RMT_USE_METAL -RMT_API void _rmt_BeginMetalSample(rmtPStr name, rmtU32* hash_cache); -RMT_API void _rmt_EndMetalSample(void); -#endif - -#ifdef __cplusplus - -} -#endif - -#if RMT_USE_METAL -#ifdef __OBJC__ -RMT_API void _rmt_BindMetal(id command_buffer); -RMT_API void _rmt_UnbindMetal(); -#endif -#endif - -#endif // RMT_ENABLED - - -#endif diff --git a/3rdparty/bgfx/3rdparty/remotery/readme.md b/3rdparty/bgfx/3rdparty/remotery/readme.md deleted file mode 100644 index 3dc26f0..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/readme.md +++ /dev/null @@ -1,216 +0,0 @@ -Remotery --------- - -A realtime CPU/GPU profiler hosted in a single C file with a viewer that runs in a web browser. - -![screenshot](screenshot.png?raw=true) - -Supported features: - -* Lightweight instrumentation of multiple threads running on the CPU. -* Web viewer that runs in Chrome, Firefox and Safari. Custom WebSockets server - transmits sample data to the browser on a latent thread. -* Profiles itself and shows how it's performing in the viewer. -* Can optionally sample CUDA/D3D11/OpenGL GPU activity. -* Console output for logging text. -* Console input for sending commands to your game. - - -Compiling ---------- - -* Windows (MSVC) - add lib/Remotery.c and lib/Remotery.h to your program. Set include - directories to add Remotery/lib path. The required library ws2_32.lib should be picked - up through the use of the #pragma comment(lib, "ws2_32.lib") directive in Remotery.c. - -* Mac OS X (XCode) - simply add lib/Remotery.c, lib/Remotery.h and lib/Remotery.mm to your program. - -* Linux (GCC) - add the source in lib folder. Compilation of the code requires -pthreads for - library linkage. For example to compile the same run: cc lib/Remotery.c sample/sample.c - -I lib -pthread -lm - -You can define some extra macros to modify what features are compiled into Remotery: - - Macro Default Description - - RMT_ENABLED 1 Disable this to not include any bits of Remotery in your build - RMT_USE_TINYCRT 0 Used by the Celtoys TinyCRT library (not released yet) - RMT_USE_CUDA 0 Assuming CUDA headers/libs are setup, allow CUDA profiling - RMT_USE_D3D11 0 Assuming Direct3D 11 headers/libs are setup, allow D3D11 GPU profiling - RMT_USE_OPENGL 0 Allow OpenGL GPU profiling (dynamically links OpenGL libraries on available platforms) - RMT_USE_METAL 0 Allow Metal profiling of command buffers - - -Basic Use ---------- - -See the sample directory for further examples. A quick example: - - int main() - { - // Create the main instance of Remotery. - // You need only do this once per program. - Remotery* rmt; - rmt_CreateGlobalInstance(&rmt); - - // Explicit begin/end for C - { - rmt_BeginCPUSample(LogText, 0); - rmt_LogText("Time me, please!"); - rmt_EndCPUSample(); - } - - // Scoped begin/end for C++ - { - rmt_ScopedCPUSample(LogText, 0); - rmt_LogText("Time me, too!"); - } - - // Destroy the main instance of Remotery. - rmt_DestroyGlobalInstance(rmt); - } - - -Running the Viewer ------------------- - -Double-click or launch `vis/index.html` from the browser. - - -Sampling CUDA GPU activity --------------------------- - -Remotery allows for profiling multiple threads of CUDA execution using different asynchronous streams -that must all share the same context. After initialising both Remotery and CUDA you need to bind the -two together using the call: - - rmtCUDABind bind; - bind.context = m_Context; - bind.CtxSetCurrent = &cuCtxSetCurrent; - bind.CtxGetCurrent = &cuCtxGetCurrent; - bind.EventCreate = &cuEventCreate; - bind.EventDestroy = &cuEventDestroy; - bind.EventRecord = &cuEventRecord; - bind.EventQuery = &cuEventQuery; - bind.EventElapsedTime = &cuEventElapsedTime; - rmt_BindCUDA(&bind); - -Explicitly pointing to the CUDA interface allows Remotery to be included anywhere in your project without -need for you to link with the required CUDA libraries. After the bind completes you can safely sample any -CUDA activity: - - CUstream stream; - - // Explicit begin/end for C - { - rmt_BeginCUDASample(UnscopedSample, stream); - // ... CUDA code ... - rmt_EndCUDASample(stream); - } - - // Scoped begin/end for C++ - { - rmt_ScopedCUDASample(ScopedSample, stream); - // ... CUDA code ... - } - -Remotery supports only one context for all threads and will use cuCtxGetCurrent and cuCtxSetCurrent to -ensure the current thread has the context you specify in rmtCUDABind.context. - - -Sampling Direct3D 11 GPU activity ---------------------------------- - -Remotery allows sampling of GPU activity on your main D3D11 context. After initialising Remotery, you need -to bind it to D3D11 with a single call from the thread that owns the device context: - - // Parameters are ID3D11Device* and ID3D11DeviceContext* - rmt_BindD3D11(d3d11_device, d3d11_context); - -Sampling is then a simple case of: - - // Explicit begin/end for C - { - rmt_BeginD3D11Sample(UnscopedSample); - // ... D3D code ... - rmt_EndD3D11Sample(); - } - - // Scoped begin/end for C++ - { - rmt_ScopedD3D11Sample(ScopedSample); - // ... D3D code ... - } - -Support for multiple contexts can be added pretty easily if there is demand for the feature. When you shutdown -your D3D11 device and context, ensure you notify Remotery before shutting down Remotery itself: - - rmt_UnbindD3D11(); - - -Sampling OpenGL GPU activity ----------------------------- - -Remotery allows sampling of GPU activity on your main OpenGL context. After initialising Remotery, you need -to bind it to OpenGL with the single call: - - rmt_BindOpenGL(); - -Sampling is then a simple case of: - - // Explicit begin/end for C - { - rmt_BeginOpenGLSample(UnscopedSample); - // ... OpenGL code ... - rmt_EndOpenGLSample(); - } - - // Scoped begin/end for C++ - { - rmt_ScopedOpenGLSample(ScopedSample); - // ... OpenGL code ... - } - -Support for multiple contexts can be added pretty easily if there is demand for the feature. When you shutdown -your OpenGL device and context, ensure you notify Remotery before shutting down Remotery itself: - - rmt_UnbindOpenGL(); - - -Sampling Metal GPU activity ---------------------------- - -Remotery can sample Metal command buffers issued to the GPU from multiple threads. As the Metal API does not -support finer grained profiling, samples will return only the timing of the bound command buffer, irrespective -of how many you issue. As such, make sure you bind and sample the command buffer for each call site: - - rmt_BindMetal(mtl_command_buffer); - rmt_ScopedMetalSample(command_buffer_name); - -The C API supports begin/end also: - - rmt_BindMetal(mtl_command_buffer); - rmt_BeginMetalSample(command_buffer_name); - ... - rmt_EndMetalSample(); - - -Applying Configuration Settings -------------------------------- - -Before creating your Remotery instance, you can configure its behaviour by retrieving its settings object: - - rmtSettings* settings = rmt_Settings(); - -Some important settings are: - - // Redirect any Remotery allocations to your own malloc/free, with an additional context pointer - // that gets passed to your callbacks. - settings->malloc; - settings->free; - settings->mm_context; - - // Specify an input handler that receives text input from the Remotery console, with an additional - // context pointer that gets passed to your callback. - settings->input_handler; - settings->input_handler_context; diff --git a/3rdparty/bgfx/3rdparty/remotery/sample/sample.c b/3rdparty/bgfx/3rdparty/remotery/sample/sample.c deleted file mode 100644 index f579e1c..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/sample/sample.c +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include -#include -#include -#include "Remotery.h" - -double delay() { - int i, end; - double j = 0; - - rmt_BeginCPUSample(delay, 0); - for( i = 0, end = rand()/100; i < end; ++i ) { - j += sin(i); - } - rmt_EndCPUSample(); - return j; -} - -int sig = 0; - -/// Allow to close cleanly with ctrl + c -void sigintHandler(int sig_num) { - sig = sig_num; - printf("Interrupted\n"); -} - -int main( ) { - signal(SIGINT, sigintHandler); - - Remotery *rmt; - - if( RMT_ERROR_NONE != rmt_CreateGlobalInstance(&rmt) ) { - return -1; - } - - while (sig == 0) { - rmt_LogText("start profiling"); - delay(); - rmt_LogText("end profiling"); - } - - rmt_DestroyGlobalInstance(rmt); - printf("Cleaned up and quit\n"); - return 0; -} diff --git a/3rdparty/bgfx/3rdparty/remotery/screenshot.png b/3rdparty/bgfx/3rdparty/remotery/screenshot.png deleted file mode 100644 index 62e044e158fa8c03c4fcd186538b693316742686..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 87218 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 k7PiN|39x%Fx34FdMas5sUty7Y7VqdE_N!IUA) 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"; - - // Append to local text buffer and ensure clip the oldest text to ensure a max size - existing_text = existing_text + new_text; - var max_len = 10 * 1024; - var len = existing_text.length; - if (len > max_len) - existing_text = existing_text.substr(len - max_len, max_len); - - return existing_text; - } - - - function UpdateHTML(self) - { - // Reset the current text buffer as html - - if (self.LastPageTextBufferLen != self.PageTextBuffer.length) - { - var page_node = self.PageContainer.Node; - page_node.innerHTML = self.PageTextBuffer; - page_node.scrollTop = page_node.scrollHeight; - self.LastPageTextBufferLen = self.PageTextBuffer.length; - } - - if (self.LastAppTextBufferLen != self.AppTextBuffer.length) - { - var app_node = self.AppContainer.Node; - app_node.innerHTML = self.AppTextBuffer; - app_node.scrollTop = app_node.scrollHeight; - self.LastAppTextBufferLen = self.AppTextBuffer.length; - } - } - - - function ProcessInput(self, node) - { - // Send the message exactly - var msg = node.value; - self.Server.Send("CONI" + msg); - - // Emit to console and clear - self.Log("> " + msg); - self.UserInput.SetValue(""); - - // Keep track of recently issued commands, with an upper bound - self.CommandHistory.push(msg); - var extra_commands = self.CommandHistory.length - self.MaxNbCommands; - if (extra_commands > 0) - self.CommandHistory.splice(0, extra_commands); - - // Set command history index to the most recent command - self.CommandIndex = self.CommandHistory.length; - - // Backup to local store - LocalStore.Set("App", "Global", "CommandHistory", self.CommandHistory); - - // Keep focus with the edit box - return true; - } - - - function OnKeyPress(self, evt) - { - evt = DOM.Event.Get(evt); - - if (evt.keyCode == Keyboard.Codes.UP) - { - if (self.CommandHistory.length > 0) - { - // Cycle backwards through the command history - self.CommandIndex--; - if (self.CommandIndex < 0) - self.CommandIndex = self.CommandHistory.length - 1; - var command = self.CommandHistory[self.CommandIndex]; - self.UserInput.SetValue(command); - } - - // Stops default behaviour of moving cursor to the beginning - DOM.Event.StopDefaultAction(evt); - } - - else if (evt.keyCode == Keyboard.Codes.DOWN) - { - if (self.CommandHistory.length > 0) - { - // Cycle fowards through the command history - self.CommandIndex = (self.CommandIndex + 1) % self.CommandHistory.length; - var command = self.CommandHistory[self.CommandIndex]; - self.UserInput.SetValue(command); - } - - // Stops default behaviour of moving cursor to the end - DOM.Event.StopDefaultAction(evt); - } - } - - - function OnFocus(self) - { - // Reset command index on focus - self.CommandIndex = self.CommandHistory.length; - } - - - return Console; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Code/PixelTimeRange.js b/3rdparty/bgfx/3rdparty/remotery/vis/Code/PixelTimeRange.js deleted file mode 100644 index 14a0668..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Code/PixelTimeRange.js +++ /dev/null @@ -1,61 +0,0 @@ - - -PixelTimeRange = (function() -{ - function PixelTimeRange(start_us, span_us, span_px) - { - this.Span_px = span_px; - this.Set(start_us, span_us); - } - - - PixelTimeRange.prototype.Set = function(start_us, span_us) - { - this.Start_us = start_us; - this.Span_us = span_us; - this.End_us = this.Start_us + span_us; - this.usPerPixel = this.Span_px / this.Span_us; - } - - - PixelTimeRange.prototype.SetStart = function(start_us) - { - this.Start_us = start_us; - this.End_us = start_us + this.Span_us; - } - - - PixelTimeRange.prototype.SetEnd = function(end_us) - { - this.End_us = end_us; - this.Start_us = end_us - this.Span_us; - } - - - PixelTimeRange.prototype.SetPixelSpan = function(span_px) - { - this.Span_px = span_px; - this.usPerPixel = this.Span_px / this.Span_us; - } - - - PixelTimeRange.prototype.PixelOffset = function(time_us) - { - return Math.floor((time_us - this.Start_us) * this.usPerPixel); - } - - - PixelTimeRange.prototype.PixelSize = function(time_us) - { - return Math.floor(time_us * this.usPerPixel); - } - - - PixelTimeRange.prototype.Clone = function() - { - return new PixelTimeRange(this.Start_us, this.Span_us, this.Span_px); - } - - - return PixelTimeRange; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Code/Remotery.js b/3rdparty/bgfx/3rdparty/remotery/vis/Code/Remotery.js deleted file mode 100644 index ca1d4f7..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Code/Remotery.js +++ /dev/null @@ -1,330 +0,0 @@ - -// -// TODO: Window resizing needs finer-grain control -// TODO: Take into account where user has moved the windows -// TODO: Controls need automatic resizing within their parent windows -// - - -Settings = (function() -{ - function Settings() - { - this.IsPaused = false; - } - - return Settings; - -})(); - - -Remotery = (function() -{ - // crack the url and get the parameter we want - var getUrlParameter = function getUrlParameter( search_param) - { - var page_url = decodeURIComponent( window.location.search.substring(1) ), - url_vars = page_url.split('&'), - param_name, - i; - - for (i = 0; i < url_vars.length; i++) - { - param_name = url_vars[i].split('='); - - if (param_name[0] === search_param) - { - return param_name[1] === undefined ? true : param_name[1]; - } - } - }; - - function Remotery() - { - this.WindowManager = new WM.WindowManager(); - this.Settings = new Settings(); - - // "addr" param is ip:port and will override the local store version if passed in the URL - var addr = getUrlParameter( "addr" ); - if ( addr != null ) - this.ConnectionAddress = "ws://" + addr + "/rmt"; - else - this.ConnectionAddress = LocalStore.Get("App", "Global", "ConnectionAddress", "ws://127.0.0.1:17815/rmt"); - - this.Server = new WebSocketConnection(); - this.Server.AddConnectHandler(Bind(OnConnect, this)); - - // Create the console up front as everything reports to it - this.Console = new Console(this.WindowManager, this.Server); - - // Create required windows - this.TitleWindow = new TitleWindow(this.WindowManager, this.Settings, this.Server, this.ConnectionAddress); - this.TitleWindow.SetConnectionAddressChanged(Bind(OnAddressChanged, this)); - this.TimelineWindow = new TimelineWindow(this.WindowManager, this.Settings, this.Server, Bind(OnTimelineCheck, this)); - this.TimelineWindow.SetOnHover(Bind(OnSampleHover, this)); - this.TimelineWindow.SetOnSelected(Bind(OnSampleSelected, this)); - - this.NbSampleWindows = 0; - this.SampleWindows = { }; - this.FrameHistory = { }; - this.SelectedFrames = { }; - this.NameMap = { }; - - this.Server.AddMessageHandler("SMPL", Bind(OnSamples, this)); - this.Server.AddMessageHandler("SSMP", Bind(OnSampleName, this)); - - // Kick-off the auto-connect loop - AutoConnect(this); - - // Hook up resize event handler - DOM.Event.AddHandler(window, "resize", Bind(OnResizeWindow, this)); - OnResizeWindow(this); - - // Hook up browser-native canvas refresh - this.DisplayFrame = 0; - this.LastKnownPause = this.Settings.IsPaused; - var self = this; - (function display_loop() - { - window.requestAnimationFrame(display_loop); - DrawTimeline(self); - })(); - } - - - function AutoConnect(self) - { - // Only attempt to connect if there isn't already a connection or an attempt to connect - if (!self.Server.Connected()) - self.Server.Connect(self.ConnectionAddress); - - // Always schedule another check - window.setTimeout(Bind(AutoConnect, self), 2000); - } - - - function OnConnect(self) - { - // Connection address has been validated - LocalStore.Set("App", "Global", "ConnectionAddress", self.ConnectionAddress); - } - - - function OnAddressChanged(self, node) - { - // Update and disconnect, relying on auto-connect to reconnect - self.ConnectionAddress = node.value; - self.Server.Disconnect(); - - // Give input focus away - return false; - } - - - function DrawTimeline(self) - { - // Has pause state changed? - if (self.Settings.IsPaused != self.LastKnownPaused) - { - // When switching TO paused, draw one last frame to ensure the sample text gets drawn - self.LastKnownPaused = self.Settings.IsPaused; - self.TimelineWindow.DrawAllRows(); - return; - } - - // Don't waste time drawing the timeline when paused - if (self.Settings.IsPaused) - return; - - // requestAnimationFrame can run up to 60hz which is way too much for drawing the timeline - // Assume it's running at 60hz and skip frames to achieve 10hz instead - // Doing this instead of using setTimeout because it's better for browser rendering (or; will be once WebGL is in use) - // TODO: Expose as config variable because high refresh rate is great when using a separate viewiing machine - if ((self.DisplayFrame % 10) == 0) - self.TimelineWindow.DrawAllRows(); - - self.DisplayFrame++; - } - - - function DecodeSample(self, data_view_reader) - { - var sample = {}; - - // Get name hash and lookup name it map - sample.name_hash = data_view_reader.GetUInt32(); - sample.name = self.NameMap[sample.name_hash]; - - // If the name doesn't exist in the map yet, request it from the server - if (sample.name == undefined) - { - // Meanwhile, store the hash as the name - sample.name = sample.name_hash; - self.Server.Send("GSMP" + sample.name); - } - - // Get the rest of the sample data - sample.id = data_view_reader.GetUInt32(); - sample.colour = data_view_reader.GetStringOfLength(7); - sample.us_start = data_view_reader.GetUInt64(); - sample.us_length = data_view_reader.GetUInt64(); - - // Recurse into children - sample.children = []; - DecodeSampleArray(self, data_view_reader, sample.children); - - return sample; - } - - - function DecodeSampleArray(self, data_view_reader, samples) - { - var nb_samples = data_view_reader.GetUInt32(); - for (var i = 0; i < nb_samples; i++) - { - var sample = DecodeSample(self, data_view_reader); - samples.push(sample) - } - } - - - function DecodeSamples(self, data_view_reader) - { - // Message-specific header - var message = { }; - message.thread_name = data_view_reader.GetString(); - message.nb_samples = data_view_reader.GetUInt32(); - message.sample_digest = data_view_reader.GetUInt32(); - - // Read samples - message.samples = []; - message.samples.push(DecodeSample(self, data_view_reader)); - - return message; - } - - - function OnSamples(self, socket, data_view) - { - // Discard any new samples while paused - if (self.Settings.IsPaused) - return; - - // Binary decode incoming sample data - var message = DecodeSamples(self, new DataViewReader(data_view, 8)); - var name = message.thread_name; - - // Add to frame history for this thread - var thread_frame = new ThreadFrame(message); - if (!(name in self.FrameHistory)) - self.FrameHistory[name] = [ ]; - var frame_history = self.FrameHistory[name]; - frame_history.push(thread_frame); - - // Discard old frames to keep memory-use constant - var max_nb_frames = 10000; - var extra_frames = frame_history.length - max_nb_frames; - if (extra_frames > 0) - frame_history.splice(0, extra_frames); - - // Create sample windows on-demand - if (!(name in self.SampleWindows)) - { - self.SampleWindows[name] = new SampleWindow(self.WindowManager, name, self.NbSampleWindows); - self.SampleWindows[name].WindowResized(self.TimelineWindow.Window, self.Console.Window); - self.NbSampleWindows++; - MoveSampleWindows(this); - } - - // Set on the window and timeline - self.SampleWindows[name].OnSamples(message.nb_samples, message.sample_digest, message.samples); - self.TimelineWindow.OnSamples(name, frame_history); - } - - - function OnSampleName(self, socket, data_view) - { - // Add any names sent by the server to the local map - var data_view_reader = new DataViewReader(data_view, 4); - var name_hash = data_view_reader.GetUInt32(); - var name = data_view_reader.GetString(); - self.NameMap[name_hash] = name; - } - - - function OnTimelineCheck(self, name, evt) - { - // Show/hide the equivalent sample window and move all the others to occupy any left-over space - var target = DOM.Event.GetNode(evt); - self.SampleWindows[name].SetVisible(target.checked); - MoveSampleWindows(self); - } - - - function MoveSampleWindows(self) - { - // Stack all windows next to each other - var xpos = 0; - for (var i in self.SampleWindows) - { - var sample_window = self.SampleWindows[i]; - if (sample_window.Visible) - sample_window.SetXPos(xpos++, self.TimelineWindow.Window, self.Console.Window); - } - } - - - function OnSampleHover(self, thread_name, hover) - { - // Hover only changes sample window contents when paused - var sample_window = self.SampleWindows[thread_name]; - if (sample_window && self.Settings.IsPaused) - { - if (hover == null) - { - // When there's no hover, go back to the selected frame - if (self.SelectedFrames[thread_name]) - { - var frame = self.SelectedFrames[thread_name]; - sample_window.OnSamples(frame.NbSamples, frame.SampleDigest, frame.Samples); - } - } - - else - { - // Populate with sample under hover - var frame = hover[0]; - sample_window.OnSamples(frame.NbSamples, frame.SampleDigest, frame.Samples); - } - } - } - - - function OnSampleSelected(self, thread_name, select) - { - // Lookup sample window set the frame samples on it - if (select && thread_name in self.SampleWindows) - { - var sample_window = self.SampleWindows[thread_name]; - var frame = select[0]; - self.SelectedFrames[thread_name] = frame; - sample_window.OnSamples(frame.NbSamples, frame.SampleDigest, frame.Samples); - } - } - - - function OnResizeWindow(self) - { - // Resize windows - var w = window.innerWidth; - var h = window.innerHeight; - self.Console.WindowResized(w, h); - self.TitleWindow.WindowResized(w, h); - self.TimelineWindow.WindowResized(w, h, self.TitleWindow.Window); - for (var i in self.SampleWindows) - self.SampleWindows[i].WindowResized(self.TimelineWindow.Window, self.Console.Window); - } - - - return Remotery; -})(); \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Code/SampleWindow.js b/3rdparty/bgfx/3rdparty/remotery/vis/Code/SampleWindow.js deleted file mode 100644 index 74f769e..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Code/SampleWindow.js +++ /dev/null @@ -1,178 +0,0 @@ - -SampleWindow = (function() -{ - function SampleWindow(wm, name, offset) - { - // Sample digest for checking if grid needs to be repopulated - this.NbSamples = 0; - this.SampleDigest = null; - - this.XPos = 10 + offset * 410; - this.Window = wm.AddWindow(name, 100, 100, 100, 100); - this.Window.Show(); - this.Visible = true; - - // Create a grid that's indexed by the unique sample ID - this.Grid = this.Window.AddControlNew(new WM.Grid(0, 0, 380, 400)); - this.RootRow = this.Grid.Rows.Add({ "Name": "Samples" }, "GridGroup", { "Name": "GridGroup" }); - this.RootRow.Rows.AddIndex("_ID"); - } - - - SampleWindow.prototype.SetXPos = function(xpos, top_window, bottom_window) - { - Anim.Animate( - Bind(AnimatedMove, this, top_window, bottom_window), - this.XPos, 10 + xpos * 410, 0.25); - } - - - function AnimatedMove(self, top_window, bottom_window, val) - { - self.XPos = val; - self.WindowResized(top_window, bottom_window); - } - - - SampleWindow.prototype.SetVisible = function(visible) - { - if (visible != this.Visible) - { - if (visible == true) - this.Window.Show(); - else - this.Window.Hide(); - - this.Visible = visible; - } - } - - - SampleWindow.prototype.WindowResized = function(top_window, bottom_window) - { - var top = top_window.Position[1] + top_window.Size[1] + 10; - this.Window.SetPosition(this.XPos, top_window.Position[1] + top_window.Size[1] + 10); - this.Window.SetSize(400, bottom_window.Position[1] - 10 - top); - } - - - SampleWindow.prototype.OnSamples = function(nb_samples, sample_digest, samples) - { - if (!this.Visible) - return; - - // Recreate all the HTML if the number of samples gets bigger - if (nb_samples > this.NbSamples) - { - GrowGrid(this.RootRow, nb_samples); - this.NbSamples = nb_samples; - } - - // If the content of the samples changes from previous update, update them all - if (this.SampleDigest != sample_digest) - { - this.RootRow.Rows.ClearIndex("_ID"); - var index = UpdateAllSampleFields(this.RootRow, samples, 0, ""); - this.SampleDigest = sample_digest; - - // Clear out any left-over rows - for (var i = index; i < this.RootRow.Rows.Rows.length; i++) - { - var row = this.RootRow.Rows.Rows[i]; - DOM.Node.Hide(row.Node); - } - } - - else if (this.Visible) - { - // Otherwise just update the existing sample fields - UpdateChangedSampleFields(this.RootRow, samples, ""); - } - } - - - function GrowGrid(parent_row, nb_samples) - { - parent_row.Rows.Clear(); - - for (var i = 0; i < nb_samples; i++) - { - var cell_data = - { - _ID: i, - Name: "", - Control: new WM.Label() - }; - - var cell_classes = - { - Name: "SampleNameCell", - }; - - parent_row.Rows.Add(cell_data, null, cell_classes); - } - } - - - function UpdateAllSampleFields(parent_row, samples, index, indent) - { - for (var i in samples) - { - var sample = samples[i]; - - // Match row allocation in GrowGrid - var row = parent_row.Rows.Rows[index++]; - - // Sample row may have been hidden previously - DOM.Node.Show(row.Node); - - // Assign unique ID so that the common fast path of updating sample times only - // can lookup target samples in the grid - row.CellData._ID = sample.id; - parent_row.Rows.AddRowToIndex("_ID", sample.id, row); - - // Record sample name for later comparison - row.CellData.Name = sample.name; - - // Set sample name and colour - var name_node = row.CellNodes["Name"]; - name_node.innerHTML = indent + sample.name; - DOM.Node.SetColour(name_node, sample.colour); - - row.CellData.Control.SetText(sample.us_length); - - index = UpdateAllSampleFields(parent_row, sample.children, index, indent + "     "); - } - - return index; - } - - - function UpdateChangedSampleFields(parent_row, samples, indent) - { - for (var i in samples) - { - var sample = samples[i]; - - var row = parent_row.Rows.GetBy("_ID", sample.id); - if (row) - { - row.CellData.Control.SetText(sample.us_length); - - // Sample name will change when it switches from hash ID to network-retrieved - // name. Quickly check that before re-applying the HTML for the name. - if (row.CellData.Name != sample.name) - { - var name_node = row.CellNodes["Name"]; - row.CellData.Name = sample.name; - name_node.innerHTML = indent + sample.name; - } - } - - UpdateChangedSampleFields(parent_row, sample.children, indent + "     "); - } - } - - - return SampleWindow; -})(); \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Code/ThreadFrame.js b/3rdparty/bgfx/3rdparty/remotery/vis/Code/ThreadFrame.js deleted file mode 100644 index a631590..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Code/ThreadFrame.js +++ /dev/null @@ -1,28 +0,0 @@ - - -ThreadFrame = (function() -{ - function ThreadFrame(message) - { - // Persist the required message data - this.NbSamples = message.nb_samples; - this.SampleDigest = message.sample_digest; - this.Samples = message.samples; - - // Calculate the frame start/end times - this.StartTime_us = 0; - this.EndTime_us = 0; - var nb_root_samples = this.Samples.length; - if (nb_root_samples > 0) - { - var last_sample = this.Samples[nb_root_samples - 1]; - this.StartTime_us = this.Samples[0].us_start; - this.EndTime_us = last_sample.us_start + last_sample.us_length; - } - - this.Length_us = this.EndTime_us - this.StartTime_us; - } - - - return ThreadFrame; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Code/TimelineRow.js b/3rdparty/bgfx/3rdparty/remotery/vis/Code/TimelineRow.js deleted file mode 100644 index 9645f25..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Code/TimelineRow.js +++ /dev/null @@ -1,376 +0,0 @@ - - -TimelineRow = (function() -{ - var row_template = function(){/* -

-
- -
-
-
+
-
-
-
-
-
-
- -
-
-*/}.toString().split(/\n/).slice(1, -1).join("\n"); - - - var CANVAS_Y_OFFSET = 0; - var CANVAS_BORDER = 1; - var SAMPLE_HEIGHT = 16; - var SAMPLE_BORDER = 1; - var SAMPLE_Y_SPACING = SAMPLE_HEIGHT + SAMPLE_BORDER * 2; - var SAMPLE_Y_OFFSET = CANVAS_Y_OFFSET + CANVAS_BORDER + 1; - - - function TimelineRow(name, width, parent_node, frame_history, check_handler) - { - this.Name = name; - - // Create the row HTML and add to the parent - this.ContainerNode = DOM.Node.CreateHTML(row_template); - this.Node = DOM.Node.FindWithClass(this.ContainerNode, "TimelineRowData"); - this.LabelNode = DOM.Node.FindWithClass(this.ContainerNode, "TimelineRowLabel"); - this.LabelNode.innerHTML = name; - this.CheckboxNode = DOM.Node.FindWithClass(this.ContainerNode, "TimelineRowCheckbox"); - var expand_node_0 = DOM.Node.FindWithClass(this.ContainerNode, "TimelineRowExpand", 0); - var expand_node_1 = DOM.Node.FindWithClass(this.ContainerNode, "TimelineRowExpand", 1); - this.IncNode = DOM.Node.FindWithClass(expand_node_0, "TimelineRowExpandButton"); - this.DecNode = DOM.Node.FindWithClass(expand_node_1, "TimelineRowExpandButton"); - this.CanvasNode = DOM.Node.FindWithClass(this.ContainerNode, "TimelineRowCanvas"); - parent_node.appendChild(this.ContainerNode); - - // All sample view windows visible by default - this.CheckboxNode.checked = true; - DOM.Event.AddHandler(this.CheckboxNode, "change", function(evt) { check_handler(name, evt); }); - - // Manually hook-up events to simulate div:active - // I can't get the equivalent CSS to work in Firefox, so... - DOM.Event.AddHandler(this.IncNode, "mousedown", ExpandButtonDown); - DOM.Event.AddHandler(this.IncNode, "mouseup", ExpandButtonUp); - DOM.Event.AddHandler(this.IncNode, "mouseleave", ExpandButtonUp); - DOM.Event.AddHandler(this.DecNode, "mousedown", ExpandButtonDown); - DOM.Event.AddHandler(this.DecNode, "mouseup", ExpandButtonUp); - DOM.Event.AddHandler(this.DecNode, "mouseleave", ExpandButtonUp); - - // Pressing +/i increases/decreases depth - DOM.Event.AddHandler(this.IncNode, "click", Bind(IncDepth, this)); - DOM.Event.AddHandler(this.DecNode, "click", Bind(DecDepth, this)); - - // Setup the canvas - this.Depth = 1; - this.Ctx = this.CanvasNode.getContext("2d"); - this.SetSize(width); - this.Clear(); - - // Frame index to start at when looking for first visible sample - this.StartFrameIndex = 0; - - this.FrameHistory = frame_history; - this.VisibleFrames = [ ]; - this.VisibleTimeRange = null; - - // Sample the mouse is currently hovering over - this.HoverSample = null; - this.HoverSampleDepth = 0; - - // Currently selected sample - this.SelectedSample = null; - this.SelectedSampleDepth = 0; - } - - - TimelineRow.prototype.SetSize = function(width) - { - // Must ALWAYS set the width/height properties together. Setting one on its own has weird side-effects. - this.CanvasNode.width = width; - this.CanvasNode.height = CANVAS_BORDER + SAMPLE_BORDER + SAMPLE_Y_SPACING * this.Depth; - this.Draw(true); - } - - - TimelineRow.prototype.Clear = function() - { - // Fill box that shows the boundary between thread rows - this.Ctx.fillStyle = "#666" - var b = CANVAS_BORDER; - this.Ctx.fillRect(b, b, this.CanvasNode.width - b * 2, this.CanvasNode.height - b * 2); - } - - - TimelineRow.prototype.SetVisibleFrames = function(time_range) - { - // Clear previous visible list - this.VisibleFrames = [ ]; - if (this.FrameHistory.length == 0) - return; - - // Store a copy of the visible time range rather than referencing it - // This prevents external modifications to the time range from affecting rendering/selection - time_range = time_range.Clone(); - this.VisibleTimeRange = time_range; - - // The frame history can be reset outside this class - // This also catches the overflow to the end of the frame list below when a thread stops sending samples - var max_frame = Math.max(this.FrameHistory.length - 1, 0); - var start_frame_index = Math.min(this.StartFrameIndex, max_frame); - - // First do a back-track in case the time range moves negatively - while (start_frame_index > 0) - { - var frame = this.FrameHistory[start_frame_index]; - if (time_range.Start_us > frame.StartTime_us) - break; - start_frame_index--; - } - - // Then search from this point for the first visible frame - while (start_frame_index < this.FrameHistory.length) - { - var frame = this.FrameHistory[start_frame_index]; - if (frame.EndTime_us > time_range.Start_us) - break; - start_frame_index++; - } - - // Gather all frames up to the end point - this.StartFrameIndex = start_frame_index; - for (var i = start_frame_index; i < this.FrameHistory.length; i++) - { - var frame = this.FrameHistory[i]; - if (frame.StartTime_us > time_range.End_us) - break; - this.VisibleFrames.push(frame); - } - } - - - TimelineRow.prototype.Draw = function(draw_text) - { - this.Clear(); - - // Draw all root samples in the visible frame set - for (var i in this.VisibleFrames) - { - var frame = this.VisibleFrames[i]; - DrawSamples(this, frame.Samples, 1, draw_text); - } - } - - - function DrawSamples(self, samples, depth, draw_text) - { - for (var i in samples) - { - var sample = samples[i]; - DrawSample(self, sample, depth, draw_text); - - if (depth < self.Depth && sample.children != null) - DrawSamples(self, sample.children, depth + 1, draw_text); - } - } - - - TimelineRow.prototype.UpdateHoverSample = function(mouse_state, x_offset) - { - var hover = GetSampleAtPosition(this, mouse_state, x_offset); - if (hover) - this.SetHoverSample(hover[1], hover[2]); - return hover; - } - - - TimelineRow.prototype.UpdateSelectedSample = function(mouse_state, x_offset) - { - var select = GetSampleAtPosition(this, mouse_state, x_offset); - if (select) - this.SetSelectedSample(select[1], select[2]); - return select; - } - - - TimelineRow.prototype.SetHoverSample = function(sample, sample_depth) - { - if (sample != this.HoverSample) - { - // Discard old highlight - // TODO: When zoomed right out, tiny samples are anti-aliased and this becomes inaccurate - var old_sample = this.HoverSample; - var old_sample_depth = this.HoverSampleDepth; - this.HoverSample = null; - this.HoverSampleDepth = 0; - DrawSample(this, old_sample, old_sample_depth, true); - - // Add new highlight - this.HoverSample = sample; - this.HoverSampleDepth = sample_depth; - DrawSample(this, sample, sample_depth, true); - } - } - - - TimelineRow.prototype.SetSelectedSample = function(sample, sample_depth) - { - if (sample != this.SelectedSample) - { - // Discard old highlight - // TODO: When zoomed right out, tiny samples are anti-aliased and this becomes inaccurate - var old_sample = this.SelectedSample; - var old_sample_depth = this.SelectedSampleDepth; - this.SelectedSample = null; - this.SelectedSampleDepth = 0; - DrawSample(this, old_sample, old_sample_depth, true); - - // Add new highlight - this.SelectedSample = sample; - this.SelectedSampleDepth = sample_depth; - DrawSample(this, sample, sample_depth, true); - } - } - - - function ExpandButtonDown(evt) - { - var node = DOM.Event.GetNode(evt); - DOM.Node.AddClass(node, "TimelineRowExpandButtonActive"); - } - - - function ExpandButtonUp(evt) - { - var node = DOM.Event.GetNode(evt); - DOM.Node.RemoveClass(node, "TimelineRowExpandButtonActive"); - } - - - function IncDepth(self) - { - self.Depth++; - self.SetSize(self.CanvasNode.width); - } - - - function DecDepth(self) - { - if (self.Depth > 1) - { - self.Depth--; - self.SetSize(self.CanvasNode.width); - } - } - - - function GetSampleAtPosition(self, mouse_state, x_offset) - { - // Mouse movement can occur before any data is sent to a timeline row - var time_range = self.VisibleTimeRange; - if (time_range == null) - return; - - // Get the time the mouse is over - var x = mouse_state.Position[0] - x_offset; - var time_us = time_range.Start_us + x / time_range.usPerPixel; - - var canvas_y_offset = DOM.Node.GetPosition(self.CanvasNode)[1]; - var mouse_y_offset = mouse_state.Position[1] - canvas_y_offset; - mouse_y_offset = Math.min(Math.max(mouse_y_offset, 0), self.CanvasNode.height); - var depth = Math.floor(mouse_y_offset / SAMPLE_Y_SPACING) + 1; - - // Search for the first frame to intersect this time - for (var i in self.VisibleFrames) - { - var frame = self.VisibleFrames[i]; - if (time_us >= frame.StartTime_us && time_us < frame.EndTime_us) - { - var found_sample = FindSample(self, frame.Samples, time_us, depth, 1); - if (found_sample != null) - return [ frame, found_sample[0], found_sample[1] ]; - } - } - - return null; - } - - - function FindSample(self, samples, time_us, target_depth, depth) - { - for (var i in samples) - { - var sample = samples[i]; - if (depth == target_depth) - { - if (time_us >= sample.us_start && time_us < sample.us_start + sample.us_length) - return [ sample, depth ]; - } - - else if (depth < target_depth && sample.children != null) - { - var found_sample = FindSample(self, sample.children, time_us, target_depth, depth + 1); - if (found_sample != null) - return found_sample; - } - } - - return null; - } - - - function DrawSample(self, sample, depth, draw_text) - { - if (sample == null) - return; - - // Determine pixel range of the sample - var time_range = self.VisibleTimeRange; - var x0 = time_range.PixelOffset(sample.us_start); - var x1 = x0 + time_range.PixelSize(sample.us_length); - - // Clip to padded timeline row - var min_x = 3; - var max_x = self.CanvasNode.width - 5; - x0 = Math.min(Math.max(x0, min_x), max_x); - x1 = Math.min(Math.max(x1, min_x), max_x); - - var offset_x = x0; - var offset_y = SAMPLE_Y_OFFSET + (depth - 1) * SAMPLE_Y_SPACING; - var size_x = x1 - x0; - var size_y = SAMPLE_HEIGHT; - - // Normal rendering - var ctx = self.Ctx; - ctx.fillStyle = sample.colour; - ctx.fillRect(offset_x, offset_y, size_x, size_y); - - // Highlight rendering - var b = (sample == self.HoverSample) ? 255 : 0; - var r = (sample == self.SelectedSample) ? 255 : 0; - if (b + r > 0) - { - ctx.lineWidth = 1; - ctx.strokeStyle = "rgb(" + r + ", 0, " + b + ")"; - ctx.strokeRect(offset_x + 0.5, offset_y + 0.5, size_x - 1, size_y - 1); - } - - // Draw sample names clipped to the bounds of the sample - // Also reject tiny samples with no space to render text - if (draw_text && size_x > 8) - { - ctx.save(); - ctx.beginPath(); - ctx.rect(offset_x + 2.5, offset_y + 1.5, size_x - 5, size_y - 3); - ctx.clip(); - ctx.font = "9px verdana"; - ctx.fillStyle = "black"; - ctx.fillText(sample.name, offset_x + 5.5, offset_y + 1.5 + 9); - ctx.restore(); - } - } - - - return TimelineRow; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Code/TimelineWindow.js b/3rdparty/bgfx/3rdparty/remotery/vis/Code/TimelineWindow.js deleted file mode 100644 index 06479b7..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Code/TimelineWindow.js +++ /dev/null @@ -1,270 +0,0 @@ - -// -// TODO: Use WebGL and instancing for quicker renders -// - - -TimelineWindow = (function() -{ - var BORDER = 10; - - var ROW_START_SIZE = 210; - - var ROW_END_SIZE = 20; // make room for scrollbar - - var box_template = "
"; - - - function TimelineWindow(wm, settings, server, check_handler) - { - this.Settings = settings; - - // Ordered list of thread rows on the timeline - this.ThreadRows = [ ]; - - // Create window and containers - this.Window = wm.AddWindow("Timeline", 10, 20, 100, 100); - this.Window.ShowNoAnim(); - this.TimelineContainer = this.Window.AddControlNew(new WM.Container(10, 10, 800, 160)); - DOM.Node.AddClass(this.TimelineContainer.Node, "TimelineContainer"); - - var mouse_wheel_event = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; - DOM.Event.AddHandler(this.TimelineContainer.Node, mouse_wheel_event, Bind(OnMouseScroll, this)); - - // Setup timeline manipulation - this.MouseDown = false; - this.TimelineMoved = false; - this.OnHoverHandler = null; - this.OnSelectedHandler = null; - DOM.Event.AddHandler(this.TimelineContainer.Node, "mousedown", Bind(OnMouseDown, this)); - DOM.Event.AddHandler(this.TimelineContainer.Node, "mouseup", Bind(OnMouseUp, this)); - DOM.Event.AddHandler(this.TimelineContainer.Node, "mousemove", Bind(OnMouseMove, this)); - - // Set time range AFTER the window has been created, as it uses the window to determine pixel coverage - this.TimeRange = new PixelTimeRange(0, 200 * 1000, RowWidth(this)); - - this.CheckHandler = check_handler; - } - - - TimelineWindow.prototype.SetOnHover = function(handler) - { - this.OnHoverHandler = handler; - } - - - TimelineWindow.prototype.SetOnSelected = function(handler) - { - this.OnSelectedHandler = handler; - } - - - TimelineWindow.prototype.WindowResized = function(width, height, top_window) - { - // Resize window - var top = top_window.Position[1] + top_window.Size[1] + 10; - this.Window.SetPosition(10, top); - this.Window.SetSize(width - 2 * 10, 200); - - // Resize controls - var parent_size = this.Window.Size; - this.TimelineContainer.SetPosition(BORDER, 10); - this.TimelineContainer.SetSize(parent_size[0] - 2 * BORDER, 160); - - // Resize rows - var row_width = RowWidth(this); - for (var i in this.ThreadRows) - { - var row = this.ThreadRows[i]; - row.SetSize(row_width); - } - - // Adjust time range to new width - this.TimeRange.SetPixelSpan(row_width); - this.DrawAllRows(); - } - - - TimelineWindow.prototype.ResetTimeRange = function() - { - this.TimeRange.SetStart(0); - } - - - TimelineWindow.prototype.OnSamples = function(thread_name, frame_history) - { - // Shift the timeline to the last entry on this thread - // As multiple threads come through here with different end frames, only do this for the latest - var last_frame = frame_history[frame_history.length - 1]; - if (last_frame.EndTime_us > this.TimeRange.End_us) - this.TimeRange.SetEnd(last_frame.EndTime_us); - - // Search for the index of this thread - var thread_index = -1; - for (var i in this.ThreadRows) - { - if (this.ThreadRows[i].Name == thread_name) - { - thread_index = i; - break; - } - } - - // If this thread has not been seen before, add a new row to the list and re-sort - if (thread_index == -1) - { - var row = new TimelineRow(thread_name, RowWidth(this), this.TimelineContainer.Node, frame_history, this.CheckHandler); - this.ThreadRows.push(row); - this.ThreadRows.sort(function(a, b) { return b.Name.localeCompare(a.Name); }); - } - } - - - TimelineWindow.prototype.DrawAllRows = function() - { - var time_range = this.TimeRange; - var draw_text = this.Settings.IsPaused; - for (var i in this.ThreadRows) - { - var thread_row = this.ThreadRows[i]; - thread_row.SetVisibleFrames(time_range); - thread_row.Draw(draw_text); - } - } - - - function RowXOffset(self) - { - // Add sizing of the label - // TODO: Use computed size - return DOM.Node.GetPosition(self.TimelineContainer.Node)[0] + ROW_START_SIZE; - } - - - function RowWidth(self) - { - // Subtract sizing of the label - // TODO: Use computed size - return self.TimelineContainer.Size[0] - (ROW_START_SIZE + ROW_END_SIZE); - } - - - function OnMouseScroll(self, evt) - { - var mouse_state = new Mouse.State(evt); - var scale = 1.11; - if (mouse_state.WheelDelta > 0) - scale = 1 / scale; - - // What time is the mouse hovering over? - var x = mouse_state.Position[0] - RowXOffset(self); - var time_us = self.TimeRange.Start_us + x / self.TimeRange.usPerPixel; - - // Calculate start time relative to the mouse hover position - var time_start_us = self.TimeRange.Start_us - time_us; - - // Scale and offset back to the hover time - self.TimeRange.Set(time_start_us * scale + time_us, self.TimeRange.Span_us * scale); - self.DrawAllRows(); - - // Prevent vertical scrolling on mouse-wheel - DOM.Event.StopDefaultAction(evt); - } - - - function OnMouseDown(self, evt) - { - // Only manipulate the timelime when paused - if (!self.Settings.IsPaused) - return; - - self.MouseDown = true; - self.TimelineMoved = false; - DOM.Event.StopDefaultAction(evt); - } - - - function OnMouseUp(self, evt) - { - // Only manipulate the timelime when paused - if (!self.Settings.IsPaused) - return; - - var mouse_state = new Mouse.State(evt); - - self.MouseDown = false; - - if (!self.TimelineMoved) - { - // Search for the row being clicked and update its selection - var row_node = DOM.Event.GetNode(evt); - for (var i in self.ThreadRows) - { - var thread_row = self.ThreadRows[i]; - if (thread_row.CanvasNode == row_node) - { - var select = thread_row.UpdateSelectedSample(mouse_state, RowXOffset(self)); - - // Call any selection handlers - if (self.OnSelectedHandler) - self.OnSelectedHandler(thread_row.Name, select); - - break; - } - } - } - } - - - function OnMouseMove(self, evt) - { - // Only manipulate the timelime when paused - if (!self.Settings.IsPaused) - return; - - var mouse_state = new Mouse.State(evt); - - if (self.MouseDown) - { - // Get the time the mouse is over - var x = mouse_state.Position[0] - RowXOffset(self); - var time_us = self.TimeRange.Start_us + x / self.TimeRange.usPerPixel; - - // Shift the visible time range with mouse movement - var time_offset_us = mouse_state.PositionDelta[0] / self.TimeRange.usPerPixel; - if (time_offset_us) - { - self.TimeRange.SetStart(self.TimeRange.Start_us - time_offset_us); - self.DrawAllRows(); - self.TimelineMoved = true; - } - } - - else - { - // Highlight any samples the mouse moves over - var row_node = DOM.Event.GetNode(evt); - for (var i in self.ThreadRows) - { - var thread_row = self.ThreadRows[i]; - if (thread_row.CanvasNode == row_node) - { - var hover = thread_row.UpdateHoverSample(mouse_state, RowXOffset(self)); - - if (self.OnHoverHandler) - self.OnHoverHandler(thread_row.Name, hover); - } - else - { - thread_row.SetHoverSample(null, 0); - if (self.OnHoverHandler) - self.OnHoverHandler(thread_row.Name, null); - } - } - } - } - - - return TimelineWindow; -})(); - diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Code/TitleWindow.js b/3rdparty/bgfx/3rdparty/remotery/vis/Code/TitleWindow.js deleted file mode 100644 index 6e19759..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Code/TitleWindow.js +++ /dev/null @@ -1,59 +0,0 @@ - -TitleWindow = (function() -{ - function TitleWindow(wm, settings, server, connection_address) - { - this.Settings = settings; - - this.Window = wm.AddWindow("     Remotery", 10, 10, 100, 100); - this.Window.ShowNoAnim(); - - this.PingContainer = this.Window.AddControlNew(new WM.Container(4, -13, 10, 10)); - DOM.Node.AddClass(this.PingContainer.Node, "PingContainer"); - - this.EditBox = this.Window.AddControlNew(new WM.EditBox(10, 5, 300, 18, "Connection Address", connection_address)); - - // Setup pause button - this.PauseButton = this.Window.AddControlNew(new WM.Button("Pause", 5, 5, { toggle: true })); - this.PauseButton.SetOnClick(Bind(OnPausePressed, this)); - - server.AddMessageHandler("PING", Bind(OnPing, this)); - } - - - TitleWindow.prototype.SetConnectionAddressChanged = function(handler) - { - this.EditBox.SetChangeHandler(handler); - } - - - TitleWindow.prototype.WindowResized = function(width, height) - { - this.Window.SetSize(width - 2 * 10, 50); - this.PauseButton.SetPosition(width - 80, 5); - } - - - function OnPausePressed(self) - { - self.Settings.IsPaused = self.PauseButton.IsPressed(); - if (self.Settings.IsPaused) - self.PauseButton.SetText("Paused"); - else - self.PauseButton.SetText("Pause"); - } - - - function OnPing(self, server) - { - // Set the ping container as active and take it off half a second later - DOM.Node.AddClass(self.PingContainer.Node, "PingContainerActive"); - window.setTimeout(Bind(function(self) - { - DOM.Node.RemoveClass(self.PingContainer.Node, "PingContainerActive"); - }, self), 500); - } - - - return TitleWindow; -})(); \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Code/WebSocketConnection.js b/3rdparty/bgfx/3rdparty/remotery/vis/Code/WebSocketConnection.js deleted file mode 100644 index 95b1208..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Code/WebSocketConnection.js +++ /dev/null @@ -1,137 +0,0 @@ - -WebSocketConnection = (function() -{ - function WebSocketConnection() - { - this.MessageHandlers = { }; - this.Socket = null; - this.Console = null; - } - - - WebSocketConnection.prototype.SetConsole = function(console) - { - this.Console = console; - } - - - WebSocketConnection.prototype.Connected = function() - { - // Will return true if the socket is also in the process of connecting - return this.Socket != null; - } - - - WebSocketConnection.prototype.AddConnectHandler = function(handler) - { - this.AddMessageHandler("__OnConnect__", handler); - } - - - WebSocketConnection.prototype.AddDisconnectHandler = function(handler) - { - this.AddMessageHandler("__OnDisconnect__", handler); - } - - - WebSocketConnection.prototype.AddMessageHandler = function(message_name, handler) - { - // Create the message handler array on-demand - if (!(message_name in this.MessageHandlers)) - this.MessageHandlers[message_name] = [ ]; - this.MessageHandlers[message_name].push(handler); - } - - - WebSocketConnection.prototype.Connect = function(address) - { - // Disconnect if already connected - if (this.Connected()) - this.Disconnect(); - - Log(this, "Connecting to " + address); - - this.Socket = new WebSocket(address); - this.Socket.binaryType = "arraybuffer"; - this.Socket.onopen = Bind(OnOpen, this); - this.Socket.onmessage = Bind(OnMessage, this); - this.Socket.onclose = Bind(OnClose, this); - this.Socket.onerror = Bind(OnError, this); - } - - - WebSocketConnection.prototype.Disconnect = function() - { - Log(this, "Disconnecting"); - if (this.Connected()) - this.Socket.close(); - } - - - WebSocketConnection.prototype.Send = function(msg) - { - if (this.Connected()) - this.Socket.send(msg); - } - - - function Log(self, message) - { - self.Console.Log(message); - } - - - function CallMessageHandlers(self, message_name, data_view) - { - if (message_name in self.MessageHandlers) - { - var handlers = self.MessageHandlers[message_name]; - for (var i in handlers) - handlers[i](self, data_view); - } - } - - - function OnOpen(self, event) - { - Log(self, "Connected"); - CallMessageHandlers(self, "__OnConnect__"); - } - - - function OnClose(self, event) - { - // Clear all references - self.Socket.onopen = null; - self.Socket.onmessage = null; - self.Socket.onclose = null; - self.Socket.onerror = null; - self.Socket = null; - - Log(self, "Disconnected"); - CallMessageHandlers(self, "__OnDisconnect__"); - } - - - function OnError(self, event) - { - Log(self, "Connection Error "); - } - - - function OnMessage(self, event) - { - var data_view = new DataView(event.data); - - var id = String.fromCharCode( - data_view.getInt8(0), - data_view.getInt8(1), - data_view.getInt8(2), - data_view.getInt8(3)); - - CallMessageHandlers(self, id, data_view); - } - - - return WebSocketConnection; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/Styles/Remotery.css b/3rdparty/bgfx/3rdparty/remotery/vis/Styles/Remotery.css deleted file mode 100644 index 995095f..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/Styles/Remotery.css +++ /dev/null @@ -1,212 +0,0 @@ - -body -{ - /* Take up the full page */ - width: 100%; - height: 100%; - margin: 0px; - - background-color: #AAA; -} - - -.NoSelect -{ - /* Disable text selection so that it doesn't interfere with faux-button clicking */ - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - - /* Stops the text cursor over the label */ - cursor:default; -} - - -/* Override default window styles to remove 3D effect */ -.Window -{ - background: #555; - box-shadow: none; - border-radius: 3px; -} -/*.WindowTitleBar -{ - border-bottom: none; - border-radius: 0px; -} -.WindowBody -{ - border-top: none; -}*/ - - -/* Override default container style to remove 3D effect */ -.Container -{ - border: none; - box-shadow: none; -} - - -/* Override default edit box style to remove 3D effect */ -.EditBox -{ - border: none; - box-shadow: none; - width:200; -} - - - -.ConsoleText -{ - overflow:auto; - color: #BBB; - font: 9px Verdana; - margin: 2px; - white-space: pre; -} - - -.PingContainer -{ - background-color: #F55; - border-radius: 2px; - - /* Transition from green is gradual */ - transition: background-color 0.25s ease-in; -} - - -.PingContainerActive -{ - background-color: #5F5; - - /* Transition to green is instant */ - transition: none; -} - - -.SampleNameCell -{ - width:300px; -} - - -.TimelineBox -{ - /* Following style generally copies GridRowCell.GridGroup from BrowserLib */ - - padding: 1px 1px 1px 2px; - margin: 1px; - - border: 1px solid; - border-radius: 2px; - border-top-color:#555; - border-left-color:#555; - border-bottom-color:#111; - border-right-color:#111; - - background: #222; - - font: 9px Verdana; - color: #BBB; -} -.TimelineRow -{ - width: 100%; -} -.TimelineRowCheckbox -{ - width: 12px; - height: 12px; - margin: 0px; -} -.TimelineRowCheck -{ - /* Pull .TimelineRowExpand to the right of the checkbox */ - float:left; - - width: 14px; - height: 14px; -} -.TimelineRowExpand -{ - /* Pull .TimelineRowLabel to the right of +/- buttons */ - float:left; - - width: 14px; - height: 14px; -} -.TimelineRowExpandButton -{ - width: 11px; - height: 12px; - - color: #333; - - border: 1px solid; - - border-top-color:#F4F4F4; - border-left-color:#F4F4F4; - border-bottom-color:#8E8F8F; - border-right-color:#8E8F8F; - - /* Top-right to bottom-left grey background gradient */ - background: #f6f6f6; /* Old browsers */ - background: -moz-linear-gradient(-45deg, #f6f6f6 0%, #abaeb2 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f6f6f6), color-stop(100%,#abaeb2)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(-45deg, #f6f6f6 0%,#abaeb2 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(-45deg, #f6f6f6 0%,#abaeb2 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(-45deg, #f6f6f6 0%,#abaeb2 100%); /* IE10+ */ - background: linear-gradient(135deg, #f6f6f6 0%,#abaeb2 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f6f6f6', endColorstr='#abaeb2',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ - - text-align: center; - vertical-align: center; -} -.TimelineRowExpandButton:hover -{ - border-top-color:#79C6F9; - border-left-color:#79C6F9; - border-bottom-color:#385D72; - border-right-color:#385D72; - - /* Top-right to bottom-left blue background gradient, matching border */ - background: #f3f3f3; /* Old browsers */ - background: -moz-linear-gradient(-45deg, #f3f3f3 0%, #79c6f9 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#f3f3f3), color-stop(100%,#79c6f9)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(-45deg, #f3f3f3 0%,#79c6f9 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(-45deg, #f3f3f3 0%,#79c6f9 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(-45deg, #f3f3f3 0%,#79c6f9 100%); /* IE10+ */ - background: linear-gradient(135deg, #f3f3f3 0%,#79c6f9 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f3f3f3', endColorstr='#79c6f9',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ -} -.TimelineRowExpandButtonActive -{ - /* Simple means of shifting text within a div to the bottom-right */ - padding-left:1px; - padding-top:1px; - width:10px; - height:11px; -} -.TimelineRowLabel -{ - /* Pull .TimelineRowCanvas to the right of the label */ - float:left; - - width: 140px; - height: 14px; -} -.TimelineRowCanvas -{ -} - -/* enable vertical scrollbar in TimelineContainer (useful for many threads) */ -.TimelineContainer -{ - overflow-y: scroll; -} diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Animation.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Animation.js deleted file mode 100644 index 516aa9c..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Animation.js +++ /dev/null @@ -1,65 +0,0 @@ - -// -// Very basic linear value animation system, for now. -// - - -namespace("Anim"); - - -Anim.Animation = (function() -{ - var anim_hz = 60; - - - function Animation(anim_func, start_value, end_value, time, end_callback) - { - // Setup initial parameters - this.StartValue = start_value; - this.EndValue = end_value; - this.ValueInc = (end_value - start_value) / (time * anim_hz); - this.Value = start_value; - this.Complete = false; - this.EndCallback = end_callback; - - // Cache the update function to prevent recreating the closure - var self = this; - this.AnimFunc = anim_func; - this.AnimUpdate = function() { Update(self); } - - // Call for the start value - this.AnimUpdate(); - } - - - function Update(self) - { - // Queue up the next frame immediately - var id = window.setTimeout(self.AnimUpdate, 1000 / anim_hz); - - // Linear step the value and check for completion - self.Value += self.ValueInc; - if (Math.abs(self.Value - self.EndValue) < 0.01) - { - self.Value = self.EndValue; - self.Complete = true; - - if (self.EndCallback) - self.EndCallback(); - - window.clearTimeout(id); - } - - // Pass to the animation function - self.AnimFunc(self.Value); - } - - - return Animation; -})(); - - -Anim.Animate = function(anim_func, start_value, end_value, time, end_callback) -{ - return new Anim.Animation(anim_func, start_value, end_value, time, end_callback); -} diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Bind.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Bind.js deleted file mode 100644 index 102ee26..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Bind.js +++ /dev/null @@ -1,92 +0,0 @@ -// -// This will generate a closure for the given function and optionally bind an arbitrary number of -// its initial arguments to specific values. -// -// Parameters: -// -// 0: Either the function scope or the function. -// 1: If 0 is the function scope, this is the function. -// Otherwise it's the start of the optional bound argument list. -// 2: Start of the optional bound argument list if 1 is the function. -// -// Examples: -// -// function GlobalFunction(p0, p1, p2) { } -// function ThisFunction(p0, p1, p2) { } -// -// var a = Bind("GlobalFunction"); -// var b = Bind(this, "ThisFunction"); -// var c = Bind("GlobalFunction", BoundParam0, BoundParam1); -// var d = Bind(this, "ThisFunction", BoundParam0, BoundParam1); -// var e = Bind(GlobalFunction); -// var f = Bind(this, ThisFunction); -// var g = Bind(GlobalFunction, BoundParam0, BoundParam1); -// var h = Bind(this, ThisFunction, BoundParam0, BoundParam1); -// -// a(0, 1, 2); -// b(0, 1, 2); -// c(2); -// d(2); -// e(0, 1, 2); -// f(0, 1, 2); -// g(2); -// h(2); -// -function Bind() -{ - // No closure to define? - if (arguments.length == 0) - return null; - - // Figure out which of the 4 call types is being used to bind - // Locate scope, function and bound parameter start index - - if (typeof(arguments[0]) == "string") - { - var scope = window; - var func = window[arguments[0]]; - var start = 1; - } - - else if (typeof(arguments[0]) == "function") - { - var scope = window; - var func = arguments[0]; - var start = 1; - } - - else if (typeof(arguments[1]) == "string") - { - var scope = arguments[0]; - var func = scope[arguments[1]]; - var start = 2; - } - - else if (typeof(arguments[1]) == "function") - { - var scope = arguments[0]; - var func = arguments[1]; - var start = 2; - } - - else - { - // unknown - console.log("Bind() ERROR: Unknown bind parameter configuration"); - return; - } - - // Convert the arguments list to an array - var arg_array = Array.prototype.slice.call(arguments, start); - start = arg_array.length; - - return function() - { - // Concatenate incoming arguments - for (var i = 0; i < arguments.length; i++) - arg_array[start + i] = arguments[i]; - - // Call the function in the given scope with the new arguments - return func.apply(scope, arg_array); - } -} diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Convert.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Convert.js deleted file mode 100644 index b1f5461..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Convert.js +++ /dev/null @@ -1,218 +0,0 @@ - -namespace("Convert"); - - -// -// Convert between utf8 and b64 without raising character out of range exceptions with unicode strings -// Technique described here: http://monsur.hossa.in/2012/07/20/utf-8-in-javascript.html -// -Convert.utf8string_to_b64string = function(str) -{ - return btoa(unescape(encodeURIComponent(str))); -} -Convert.b64string_to_utf8string = function(str) -{ - return decodeURIComponent(escape(atob(str))); -} - - -// -// More general approach, converting between byte arrays and b64 -// Info here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding -// -Convert.b64string_to_Uint8Array = function(sBase64, nBlocksSize) -{ - function b64ToUint6 (nChr) - { - return nChr > 64 && nChr < 91 ? - nChr - 65 - : nChr > 96 && nChr < 123 ? - nChr - 71 - : nChr > 47 && nChr < 58 ? - nChr + 4 - : nChr === 43 ? - 62 - : nChr === 47 ? - 63 - : - 0; - } - - var - sB64Enc = sBase64.replace(/[^A-Za-z0-9\+\/]/g, ""), - nInLen = sB64Enc.length, - nOutLen = nBlocksSize ? Math.ceil((nInLen * 3 + 1 >> 2) / nBlocksSize) * nBlocksSize : nInLen * 3 + 1 >> 2, - taBytes = new Uint8Array(nOutLen); - - for (var nMod3, nMod4, nUint24 = 0, nOutIdx = 0, nInIdx = 0; nInIdx < nInLen; nInIdx++) - { - nMod4 = nInIdx & 3; - nUint24 |= b64ToUint6(sB64Enc.charCodeAt(nInIdx)) << 18 - 6 * nMod4; - if (nMod4 === 3 || nInLen - nInIdx === 1) - { - for (nMod3 = 0; nMod3 < 3 && nOutIdx < nOutLen; nMod3++, nOutIdx++) - taBytes[nOutIdx] = nUint24 >>> (16 >>> nMod3 & 24) & 255; - nUint24 = 0; - } - } - - return taBytes; -} -Convert.Uint8Array_to_b64string = function(aBytes) -{ - function uint6ToB64 (nUint6) - { - return nUint6 < 26 ? - nUint6 + 65 - : nUint6 < 52 ? - nUint6 + 71 - : nUint6 < 62 ? - nUint6 - 4 - : nUint6 === 62 ? - 43 - : nUint6 === 63 ? - 47 - : - 65; - } - - var nMod3, sB64Enc = ""; - - for (var nLen = aBytes.length, nUint24 = 0, nIdx = 0; nIdx < nLen; nIdx++) - { - nMod3 = nIdx % 3; - if (nIdx > 0 && (nIdx * 4 / 3) % 76 === 0) - sB64Enc += "\r\n"; - nUint24 |= aBytes[nIdx] << (16 >>> nMod3 & 24); - if (nMod3 === 2 || aBytes.length - nIdx === 1) - { - sB64Enc += String.fromCharCode(uint6ToB64(nUint24 >>> 18 & 63), uint6ToB64(nUint24 >>> 12 & 63), uint6ToB64(nUint24 >>> 6 & 63), uint6ToB64(nUint24 & 63)); - nUint24 = 0; - } - } - - return sB64Enc.replace(/A(?=A$|$)/g, "="); -} - - -// -// Unicode and arbitrary value safe conversion between strings and Uint8Arrays -// -Convert.Uint8Array_to_string = function(aBytes) -{ - var sView = ""; - - for (var nPart, nLen = aBytes.length, nIdx = 0; nIdx < nLen; nIdx++) - { - nPart = aBytes[nIdx]; - sView += String.fromCharCode( - nPart > 251 && nPart < 254 && nIdx + 5 < nLen ? /* six bytes */ - /* (nPart - 252 << 32) is not possible in ECMAScript! So...: */ - (nPart - 252) * 1073741824 + (aBytes[++nIdx] - 128 << 24) + (aBytes[++nIdx] - 128 << 18) + (aBytes[++nIdx] - 128 << 12) + (aBytes[++nIdx] - 128 << 6) + aBytes[++nIdx] - 128 - : nPart > 247 && nPart < 252 && nIdx + 4 < nLen ? /* five bytes */ - (nPart - 248 << 24) + (aBytes[++nIdx] - 128 << 18) + (aBytes[++nIdx] - 128 << 12) + (aBytes[++nIdx] - 128 << 6) + aBytes[++nIdx] - 128 - : nPart > 239 && nPart < 248 && nIdx + 3 < nLen ? /* four bytes */ - (nPart - 240 << 18) + (aBytes[++nIdx] - 128 << 12) + (aBytes[++nIdx] - 128 << 6) + aBytes[++nIdx] - 128 - : nPart > 223 && nPart < 240 && nIdx + 2 < nLen ? /* three bytes */ - (nPart - 224 << 12) + (aBytes[++nIdx] - 128 << 6) + aBytes[++nIdx] - 128 - : nPart > 191 && nPart < 224 && nIdx + 1 < nLen ? /* two bytes */ - (nPart - 192 << 6) + aBytes[++nIdx] - 128 - : /* nPart < 127 ? */ /* one byte */ - nPart - ); - } - - return sView; -} -Convert.string_to_Uint8Array = function(sDOMStr) -{ - var aBytes, nChr, nStrLen = sDOMStr.length, nArrLen = 0; - - /* mapping... */ - - for (var nMapIdx = 0; nMapIdx < nStrLen; nMapIdx++) - { - nChr = sDOMStr.charCodeAt(nMapIdx); - nArrLen += nChr < 0x80 ? 1 : nChr < 0x800 ? 2 : nChr < 0x10000 ? 3 : nChr < 0x200000 ? 4 : nChr < 0x4000000 ? 5 : 6; - } - - aBytes = new Uint8Array(nArrLen); - - /* transcription... */ - - for (var nIdx = 0, nChrIdx = 0; nIdx < nArrLen; nChrIdx++) - { - nChr = sDOMStr.charCodeAt(nChrIdx); - if (nChr < 128) - { - /* one byte */ - aBytes[nIdx++] = nChr; - } - else if (nChr < 0x800) - { - /* two bytes */ - aBytes[nIdx++] = 192 + (nChr >>> 6); - aBytes[nIdx++] = 128 + (nChr & 63); - } - else if (nChr < 0x10000) - { - /* three bytes */ - aBytes[nIdx++] = 224 + (nChr >>> 12); - aBytes[nIdx++] = 128 + (nChr >>> 6 & 63); - aBytes[nIdx++] = 128 + (nChr & 63); - } - else if (nChr < 0x200000) - { - /* four bytes */ - aBytes[nIdx++] = 240 + (nChr >>> 18); - aBytes[nIdx++] = 128 + (nChr >>> 12 & 63); - aBytes[nIdx++] = 128 + (nChr >>> 6 & 63); - aBytes[nIdx++] = 128 + (nChr & 63); - } - else if (nChr < 0x4000000) - { - /* five bytes */ - aBytes[nIdx++] = 248 + (nChr >>> 24); - aBytes[nIdx++] = 128 + (nChr >>> 18 & 63); - aBytes[nIdx++] = 128 + (nChr >>> 12 & 63); - aBytes[nIdx++] = 128 + (nChr >>> 6 & 63); - aBytes[nIdx++] = 128 + (nChr & 63); - } - else /* if (nChr <= 0x7fffffff) */ - { - /* six bytes */ - aBytes[nIdx++] = 252 + /* (nChr >>> 32) is not possible in ECMAScript! So...: */ (nChr / 1073741824); - aBytes[nIdx++] = 128 + (nChr >>> 24 & 63); - aBytes[nIdx++] = 128 + (nChr >>> 18 & 63); - aBytes[nIdx++] = 128 + (nChr >>> 12 & 63); - aBytes[nIdx++] = 128 + (nChr >>> 6 & 63); - aBytes[nIdx++] = 128 + (nChr & 63); - } - } - - return aBytes; -} - - -// -// Converts all characters in a string that have equivalent entities to their ampersand/entity names. -// Based on https://gist.github.com/jonathantneal/6093551 -// -Convert.string_to_html_entities = (function() -{ - 'use strict'; - - var data = '34quot38amp39apos60lt62gt160nbsp161iexcl162cent163pound164curren165yen166brvbar167sect168uml169copy170ordf171laquo172not173shy174reg175macr176deg177plusmn178sup2179sup3180acute181micro182para183middot184cedil185sup1186ordm187raquo188frac14189frac12190frac34191iquest192Agrave193Aacute194Acirc195Atilde196Auml197Aring198AElig199Ccedil200Egrave201Eacute202Ecirc203Euml204Igrave205Iacute206Icirc207Iuml208ETH209Ntilde210Ograve211Oacute212Ocirc213Otilde214Ouml215times216Oslash217Ugrave218Uacute219Ucirc220Uuml221Yacute222THORN223szlig224agrave225aacute226acirc227atilde228auml229aring230aelig231ccedil232egrave233eacute234ecirc235euml236igrave237iacute238icirc239iuml240eth241ntilde242ograve243oacute244ocirc245otilde246ouml247divide248oslash249ugrave250uacute251ucirc252uuml253yacute254thorn255yuml402fnof913Alpha914Beta915Gamma916Delta917Epsilon918Zeta919Eta920Theta921Iota922Kappa923Lambda924Mu925Nu926Xi927Omicron928Pi929Rho931Sigma932Tau933Upsilon934Phi935Chi936Psi937Omega945alpha946beta947gamma948delta949epsilon950zeta951eta952theta953iota954kappa955lambda956mu957nu958xi959omicron960pi961rho962sigmaf963sigma964tau965upsilon966phi967chi968psi969omega977thetasym978upsih982piv8226bull8230hellip8242prime8243Prime8254oline8260frasl8472weierp8465image8476real8482trade8501alefsym8592larr8593uarr8594rarr8595darr8596harr8629crarr8656lArr8657uArr8658rArr8659dArr8660hArr8704forall8706part8707exist8709empty8711nabla8712isin8713notin8715ni8719prod8721sum8722minus8727lowast8730radic8733prop8734infin8736ang8743and8744or8745cap8746cup8747int8756there48764sim8773cong8776asymp8800ne8801equiv8804le8805ge8834sub8835sup8836nsub8838sube8839supe8853oplus8855otimes8869perp8901sdot8968lceil8969rceil8970lfloor8971rfloor9001lang9002rang9674loz9824spades9827clubs9829hearts9830diams338OElig339oelig352Scaron353scaron376Yuml710circ732tilde8194ensp8195emsp8201thinsp8204zwnj8205zwj8206lrm8207rlm8211ndash8212mdash8216lsquo8217rsquo8218sbquo8220ldquo8221rdquo8222bdquo8224dagger8225Dagger8240permil8249lsaquo8250rsaquo8364euro'; - var charCodes = data.split(/[A-z]+/); - var entities = data.split(/\d+/).slice(1); - - return function encodeHTMLEntities(text) - { - return text.replace(/[\u00A0-\u2666<>"'&]/g, function (match) - { - var charCode = String(match.charCodeAt(0)); - var index = charCodes.indexOf(charCode); - return '&' + (entities[index] ? entities[index] : '#' + charCode) + ';'; - }); - }; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Core.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Core.js deleted file mode 100644 index aab35c9..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Core.js +++ /dev/null @@ -1,20 +0,0 @@ - -// TODO: requires function for checking existence of dependencies - - -function namespace(name) -{ - // Ensure all nested namespaces are created only once - - var ns_list = name.split("."); - var parent_ns = window; - - for (var i in ns_list) - { - var ns_name = ns_list[i]; - if (!(ns_name in parent_ns)) - parent_ns[ns_name] = { }; - - parent_ns = parent_ns[ns_name]; - } -} \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/DOM.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/DOM.js deleted file mode 100644 index f11fb19..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/DOM.js +++ /dev/null @@ -1,499 +0,0 @@ - -namespace("DOM.Node"); -namespace("DOM.Event"); -namespace("DOM.Applet"); - - - -// -// ===================================================================================================================== -// ----- DOCUMENT NODE/ELEMENT EXTENSIONS ------------------------------------------------------------------------------ -// ===================================================================================================================== -// - - - -DOM.Node.Get = function(id) -{ - return document.getElementById(id); -} - - -// -// Set node position -// -DOM.Node.SetPosition = function(node, position) -{ - node.style.left = position[0]; - node.style.top = position[1]; -} -DOM.Node.SetX = function(node, x) -{ - node.style.left = x; -} -DOM.Node.SetY = function(node, y) -{ - node.style.top = y; -} - - -// -// Get the absolute position of a HTML element on the page -// -DOM.Node.GetPosition = function(element, account_for_scroll) -{ - // Recurse up through parents, summing offsets from their parent - var x = 0, y = 0; - for (var node = element; node != null; node = node.offsetParent) - { - x += node.offsetLeft; - y += node.offsetTop; - } - - if (account_for_scroll) - { - // Walk up the hierarchy subtracting away any scrolling - for (var node = element; node != document.body; node = node.parentNode) - { - x -= node.scrollLeft; - y -= node.scrollTop; - } - } - - return [x, y]; -} - - -// -// Set node size -// -DOM.Node.SetSize = function(node, size) -{ - node.style.width = size[0]; - node.style.height = size[1]; -} -DOM.Node.SetWidth = function(node, width) -{ - node.style.width = width; -} -DOM.Node.SetHeight = function(node, height) -{ - node.style.height = height; -} - - -// -// Get node OFFSET size: -// clientX includes padding -// offsetX includes padding and borders -// scrollX includes padding, borders and size of contained node -// -DOM.Node.GetSize = function(node) -{ - return [ node.offsetWidth, node.offsetHeight ]; -} -DOM.Node.GetWidth = function(node) -{ - return node.offsetWidth; -} -DOM.Node.GetHeight = function(node) -{ - return node.offsetHeight; -} - - -// -// Set node opacity -// -DOM.Node.SetOpacity = function(node, value) -{ - node.style.opacity = value; -} - - -DOM.Node.SetColour = function(node, colour) -{ - node.style.color = colour; -} - - -// -// Hide a node by completely disabling its rendering (it no longer contributes to document layout) -// -DOM.Node.Hide = function(node) -{ - node.style.display = "none"; -} - - -// -// Show a node by restoring its influcen in document layout -// -DOM.Node.Show = function(node) -{ - node.style.display = "block"; -} - - -// -// Add a CSS class to a HTML element, specified last -// -DOM.Node.AddClass = function(node, class_name) -{ - // Ensure the class hasn't already been added - DOM.Node.RemoveClass(node, class_name); - node.className += " " + class_name; -} - - -// -// Remove a CSS class from a HTML element -// -DOM.Node.RemoveClass = function(node, class_name) -{ - // Remove all variations of where the class name can be in the string list - var regexp = new RegExp("\\b" + class_name + "\\b"); - node.className = node.className.replace(regexp, ""); -} - - - -// -// Check to see if a HTML element contains a class -// -DOM.Node.HasClass = function(node, class_name) -{ - var regexp = new RegExp("\\b" + class_name + "\\b"); - return regexp.test(node.className); -} - - -// -// Recursively search for a node with the given class name -// -DOM.Node.FindWithClass = function(parent_node, class_name, index) -{ - // Search the children looking for a node with the given class name - for (var i in parent_node.childNodes) - { - var node = parent_node.childNodes[i]; - if (DOM.Node.HasClass(node, class_name)) - { - if (index === undefined || index-- == 0) - return node; - } - - // Recurse into children - node = DOM.Node.FindWithClass(node, class_name); - if (node != null) - return node; - } - - return null; -} - - -// -// Check to see if one node logically contains another -// -DOM.Node.Contains = function(node, container_node) -{ - while (node != null && node != container_node) - node = node.parentNode; - return node != null; -} - - -// -// Create the HTML nodes specified in the text passed in -// Assumes there is only one root node in the text -// -DOM.Node.CreateHTML = function(html) -{ - var div = document.createElement("div"); - div.innerHTML = html; - - // First child may be a text node, followed by the created HTML - var child = div.firstChild; - if (child != null && child.nodeType == 3) - child = child.nextSibling; - return child; -} - - -// -// Make a copy of a HTML element, making it visible and clearing its ID to ensure it's not a duplicate -// -DOM.Node.Clone = function(name) -{ - // Get the template element and clone it, making sure it's renderable - var node = DOM.Node.Get(name); - node = node.cloneNode(true); - node.id = null; - node.style.display = "block"; - return node; -} - - -// -// Append an arbitrary block of HTML to an existing node -// -DOM.Node.AppendHTML = function(node, html) -{ - var child = DOM.Node.CreateHTML(html); - node.appendChild(child); - return child; -} - - -// -// Append a div that clears the float style -// -DOM.Node.AppendClearFloat = function(node) -{ - var div = document.createElement("div"); - div.style.clear = "both"; - node.appendChild(div); -} - - -// -// Check to see that the object passed in is an instance of a DOM node -// -DOM.Node.IsNode = function(object) -{ - return object instanceof Element; -} - - -// -// Create an "iframe shim" so that elements within it render over a Java Applet -// http://web.archive.org/web/20110707212850/http://www.oratransplant.nl/2007/10/26/using-iframe-shim-to-partly-cover-a-java-applet/ -// -DOM.Node.CreateShim = function(parent) -{ - var shimmer = document.createElement("iframe"); - - // Position the shimmer so that it's the same location/size as its parent - shimmer.style.position = "fixed"; - shimmer.style.left = parent.style.left; - shimmer.style.top = parent.style.top; - shimmer.style.width = parent.offsetWidth; - shimmer.style.height = parent.offsetHeight; - - // We want the shimmer to be one level below its contents - shimmer.style.zIndex = parent.style.zIndex - 1; - - // Ensure its empty - shimmer.setAttribute("frameborder", "0"); - shimmer.setAttribute("src", ""); - - // Add to the document and the parent - document.body.appendChild(shimmer); - parent.Shimmer = shimmer; - return shimmer; -} - - - -// -// ===================================================================================================================== -// ----- EVENT HANDLING EXTENSIONS ------------------------------------------------------------------------------------- -// ===================================================================================================================== -// - - - -// -// Retrieves the event from the first parameter passed into an HTML event -// -DOM.Event.Get = function(evt) -{ - // Internet explorer doesn't pass the event - return window.event || evt; -} - - -// -// Retrieves the element that triggered an event from the event object -// -DOM.Event.GetNode = function(evt) -{ - evt = DOM.Event.Get(evt); - - // Get the target element - var element; - if (evt.target) - element = evt.target; - else if (e.srcElement) - element = evt.srcElement; - - // Default Safari bug - if (element.nodeType == 3) - element = element.parentNode; - - return element; -} - - -// -// Stop default action for an event -// -DOM.Event.StopDefaultAction = function(evt) -{ - if (evt && evt.preventDefault) - evt.preventDefault(); - else if (window.event && window.event.returnValue) - window.event.returnValue = false; -} - - -// -// Stops events bubbling up to parent event handlers -// -DOM.Event.StopPropagation = function(evt) -{ - evt = DOM.Event.Get(evt); - if (evt) - { - evt.cancelBubble = true; - if (evt.stopPropagation) - evt.stopPropagation(); - } -} - - -// -// Stop both event default action and propagation -// -DOM.Event.StopAll = function(evt) -{ - DOM.Event.StopDefaultAction(evt); - DOM.Event.StopPropagation(evt); -} - - -// -// Adds an event handler to an event -// -DOM.Event.AddHandler = function(obj, evt, func) -{ - if (obj) - { - if (obj.addEventListener) - obj.addEventListener(evt, func, false); - else if (obj.attachEvent) - obj.attachEvent("on" + evt, func); - } -} - - -// -// Removes an event handler from an event -// -DOM.Event.RemoveHandler = function(obj, evt, func) -{ - if (obj) - { - if (obj.removeEventListener) - obj.removeEventListener(evt, func, false); - else if (obj.detachEvent) - obj.detachEvent("on" + evt, func); - } -} - - -// -// Get the position of the mouse cursor, page relative -// -DOM.Event.GetMousePosition = function(evt) -{ - evt = DOM.Event.Get(evt); - - var px = 0; - var py = 0; - if (evt.pageX || evt.pageY) - { - px = evt.pageX; - py = evt.pageY; - } - else if (evt.clientX || evt.clientY) - { - px = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; - py = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; - } - - return [px, py]; -} - - - -// -// ===================================================================================================================== -// ----- JAVA APPLET EXTENSIONS ---------------------------------------------------------------------------------------- -// ===================================================================================================================== -// - - - -// -// Create an applet element for loading a Java applet, attaching it to the specified node -// -DOM.Applet.Load = function(dest_id, id, code, archive) -{ - // Lookup the applet destination - var dest = DOM.Node.Get(dest_id); - if (!dest) - return; - - // Construct the applet element and add it to the destination - Debug.Log("Injecting applet DOM code"); - var applet = ""; - applet += ""; - dest.innerHTML = applet; -} - - -// -// Moves and resizes a named applet so that it fits in the destination div element. -// The applet must be contained by a div element itself. This container div is moved along -// with the applet. -// -DOM.Applet.Move = function(dest_div, applet, z_index, hide) -{ - if (!applet || !dest_div) - return; - - // Before modifying any location information, hide the applet so that it doesn't render over - // any newly visible elements that appear while the location information is being modified. - if (hide) - applet.style.visibility = "hidden"; - - // Get its view rect - var pos = DOM.Node.GetPosition(dest_div); - var w = dest_div.offsetWidth; - var h = dest_div.offsetHeight; - - // It needs to be embedded in a
for correct scale/position adjustment - var container = applet.parentNode; - if (!container || container.localName != "div") - { - Debug.Log("ERROR: Couldn't find source applet's div container"); - return; - } - - // Reposition and resize the containing div element - container.style.left = pos[0]; - container.style.top = pos[1]; - container.style.width = w; - container.style.height = h; - container.style.zIndex = z_index; - - // Resize the applet itself - applet.style.width = w; - applet.style.height = h; - - // Everything modified, safe to show - applet.style.visibility = "visible"; -} diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Keyboard.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Keyboard.js deleted file mode 100644 index f70f4ea..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Keyboard.js +++ /dev/null @@ -1,149 +0,0 @@ - -namespace("Keyboard") - - -// ===================================================================================================================== -// Key codes copied from closure-library -// https://code.google.com/p/closure-library/source/browse/closure/goog/events/keycodes.js -// --------------------------------------------------------------------------------------------------------------------- -// Copyright 2006 The Closure Library Authors. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -Keyboard.Codes = { - WIN_KEY_FF_LINUX : 0, - MAC_ENTER : 3, - BACKSPACE : 8, - TAB : 9, - NUM_CENTER : 12, // NUMLOCK on FF/Safari Mac - ENTER : 13, - SHIFT : 16, - CTRL : 17, - ALT : 18, - PAUSE : 19, - CAPS_LOCK : 20, - ESC : 27, - SPACE : 32, - PAGE_UP : 33, // also NUM_NORTH_EAST - PAGE_DOWN : 34, // also NUM_SOUTH_EAST - END : 35, // also NUM_SOUTH_WEST - HOME : 36, // also NUM_NORTH_WEST - LEFT : 37, // also NUM_WEST - UP : 38, // also NUM_NORTH - RIGHT : 39, // also NUM_EAST - DOWN : 40, // also NUM_SOUTH - PRINT_SCREEN : 44, - INSERT : 45, // also NUM_INSERT - DELETE : 46, // also NUM_DELETE - ZERO : 48, - ONE : 49, - TWO : 50, - THREE : 51, - FOUR : 52, - FIVE : 53, - SIX : 54, - SEVEN : 55, - EIGHT : 56, - NINE : 57, - FF_SEMICOLON : 59, // Firefox (Gecko) fires this for semicolon instead of 186 - FF_EQUALS : 61, // Firefox (Gecko) fires this for equals instead of 187 - FF_DASH : 173, // Firefox (Gecko) fires this for dash instead of 189 - QUESTION_MARK : 63, // needs localization - A : 65, - B : 66, - C : 67, - D : 68, - E : 69, - F : 70, - G : 71, - H : 72, - I : 73, - J : 74, - K : 75, - L : 76, - M : 77, - N : 78, - O : 79, - P : 80, - Q : 81, - R : 82, - S : 83, - T : 84, - U : 85, - V : 86, - W : 87, - X : 88, - Y : 89, - Z : 90, - META : 91, // WIN_KEY_LEFT - WIN_KEY_RIGHT : 92, - CONTEXT_MENU : 93, - NUM_ZERO : 96, - NUM_ONE : 97, - NUM_TWO : 98, - NUM_THREE : 99, - NUM_FOUR : 100, - NUM_FIVE : 101, - NUM_SIX : 102, - NUM_SEVEN : 103, - NUM_EIGHT : 104, - NUM_NINE : 105, - NUM_MULTIPLY : 106, - NUM_PLUS : 107, - NUM_MINUS : 109, - NUM_PERIOD : 110, - NUM_DIVISION : 111, - F1 : 112, - F2 : 113, - F3 : 114, - F4 : 115, - F5 : 116, - F6 : 117, - F7 : 118, - F8 : 119, - F9 : 120, - F10 : 121, - F11 : 122, - F12 : 123, - NUMLOCK : 144, - SCROLL_LOCK : 145, - - // OS-specific media keys like volume controls and browser controls. - FIRST_MEDIA_KEY : 166, - LAST_MEDIA_KEY : 183, - - SEMICOLON : 186, // needs localization - DASH : 189, // needs localization - EQUALS : 187, // needs localization - COMMA : 188, // needs localization - PERIOD : 190, // needs localization - SLASH : 191, // needs localization - APOSTROPHE : 192, // needs localization - TILDE : 192, // needs localization - SINGLE_QUOTE : 222, // needs localization - OPEN_SQUARE_BRACKET : 219, // needs localization - BACKSLASH : 220, // needs localization - CLOSE_SQUARE_BRACKET: 221, // needs localization - WIN_KEY : 224, - MAC_FF_META : 224, // Firefox (Gecko) fires this for the meta key instead of 91 - MAC_WK_CMD_LEFT : 91, // WebKit Left Command key fired, same as META - MAC_WK_CMD_RIGHT : 93, // WebKit Right Command key fired, different from META - WIN_IME : 229, - - // We've seen users whose machines fire this keycode at regular one - // second intervals. The common thread among these users is that - // they're all using Dell Inspiron laptops, so we suspect that this - // indicates a hardware/bios problem. - // http://en.community.dell.com/support-forums/laptop/f/3518/p/19285957/19523128.aspx - PHANTOM : 255 -}; -// ===================================================================================================================== diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/LocalStore.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/LocalStore.js deleted file mode 100644 index 5e34206..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/LocalStore.js +++ /dev/null @@ -1,26 +0,0 @@ - -namespace("LocalStore"); - - -LocalStore.Set = function(class_name, class_id, variable_id, data) -{ - if (typeof(Storage) != "undefined") - { - var name = class_name + "_" + class_id + "_" + variable_id; - localStorage[name] = JSON.stringify(data); - } -} - - -LocalStore.Get = function(class_name, class_id, variable_id, default_data) -{ - if (typeof(Storage) != "undefined") - { - var name = class_name + "_" + class_id + "_" + variable_id; - var data = localStorage[name] - if (data) - return JSON.parse(data); - } - - return default_data; -} \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Mouse.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Mouse.js deleted file mode 100644 index a694b80..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/Mouse.js +++ /dev/null @@ -1,83 +0,0 @@ - -namespace("Mouse"); - - -Mouse.State =(function() -{ - function State(event) - { - // Get button press states - if (typeof event.buttons != "undefined") - { - // Firefox - this.Left = (event.buttons & 1) != 0; - this.Right = (event.buttons & 2) != 0; - this.Middle = (event.buttons & 4) != 0; - } - else - { - // Chrome - this.Left = (event.button == 0); - this.Middle = (event.button == 1); - this.Right = (event.button == 2); - } - - // Get page-relative mouse position - this.Position = DOM.Event.GetMousePosition(event); - - // Get wheel delta - var delta = 0; - if (event.wheelDelta) - delta = event.wheelDelta / 120; // IE/Opera - else if (event.detail) - delta = -event.detail / 3; // Mozilla - this.WheelDelta = delta; - - // Get the mouse position delta - // Requires Pointer Lock API support - this.PositionDelta = [ - event.movementX || event.mozMovementX || event.webkitMovementX || 0, - event.movementY || event.mozMovementY || event.webkitMovementY || 0 - ]; - } - - return State; -})(); - - -// -// Basic Pointer Lock API support -// https://developer.mozilla.org/en-US/docs/WebAPI/Pointer_Lock -// http://www.chromium.org/developers/design-documents/mouse-lock -// -// Note that API has not been standardised yet so browsers can implement functions with prefixes -// - - -Mouse.PointerLockSupported = function() -{ - return 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document; -} - - -Mouse.RequestPointerLock = function(element) -{ - element.requestPointerLock = element.requestPointerLock || element.mozRequestPointerLock || element.webkitRequestPointerLock; - if (element.requestPointerLock) - element.requestPointerLock(); -} - - -Mouse.ExitPointerLock = function() -{ - document.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock; - if (document.exitPointerLock) - document.exitPointerLock(); -} - - -// Can use this element to detect whether pointer lock is enabled (returns non-null) -Mouse.PointerLockElement = function() -{ - return document.pointerLockElement || document.mozPointerLockElement || document.webkitPointerLockElement; -} diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/MurmurHash3.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/MurmurHash3.js deleted file mode 100644 index c423d49..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/Core/Code/MurmurHash3.js +++ /dev/null @@ -1,68 +0,0 @@ - -namespace("Hash"); - -/** - * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011) - * - * @author Gary Court - * @see http://github.com/garycourt/murmurhash-js - * @author Austin Appleby - * @see http://sites.google.com/site/murmurhash/ - * - * @param {string} key ASCII only - * @param {number} seed Positive integer only - * @return {number} 32-bit positive integer hash - */ - -Hash.Murmur3 = function(key, seed) -{ - var remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i; - - remainder = key.length & 3; // key.length % 4 - bytes = key.length - remainder; - h1 = seed; - c1 = 0xcc9e2d51; - c2 = 0x1b873593; - i = 0; - - while (i < bytes) { - k1 = - ((key.charCodeAt(i) & 0xff)) | - ((key.charCodeAt(++i) & 0xff) << 8) | - ((key.charCodeAt(++i) & 0xff) << 16) | - ((key.charCodeAt(++i) & 0xff) << 24); - ++i; - - k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff; - k1 = (k1 << 15) | (k1 >>> 17); - k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff; - - h1 ^= k1; - h1 = (h1 << 13) | (h1 >>> 19); - h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff; - h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16)); - } - - k1 = 0; - - switch (remainder) { - case 3: k1 ^= (key.charCodeAt(i + 2) & 0xff) << 16; - case 2: k1 ^= (key.charCodeAt(i + 1) & 0xff) << 8; - case 1: k1 ^= (key.charCodeAt(i) & 0xff); - - k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff; - k1 = (k1 << 15) | (k1 >>> 17); - k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff; - h1 ^= k1; - } - - h1 ^= key.length; - - h1 ^= h1 >>> 16; - h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff; - h1 ^= h1 >>> 13; - h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff; - h1 ^= h1 >>> 16; - - return h1 >>> 0; -} \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Button.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Button.js deleted file mode 100644 index 12e0981..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Button.js +++ /dev/null @@ -1,131 +0,0 @@ - -namespace("WM"); - - -WM.Button = (function() -{ - var template_html = "
"; - - - function Button(text, x, y, opts) - { - this.OnClick = null; - this.Toggle = opts && opts.toggle; - - this.Node = DOM.Node.CreateHTML(template_html); - - // Set node dimensions - this.SetPosition(x, y); - if (opts && opts.w && opts.h) - this.SetSize(opts.w, opts.h); - - // Override the default class name - if (opts && opts.class) - this.Node.className = opts.class; - - this.SetText(text); - - // Create the mouse press event handlers - DOM.Event.AddHandler(this.Node, "mousedown", Bind(OnMouseDown, this)); - this.OnMouseOutDelegate = Bind(OnMouseUp, this, false); - this.OnMouseUpDelegate = Bind(OnMouseUp, this, true); - } - - - Button.prototype.SetPosition = function(x, y) - { - this.Position = [ x, y ]; - DOM.Node.SetPosition(this.Node, this.Position); - } - - - Button.prototype.SetSize = function(w, h) - { - this.Size = [ w, h ]; - DOM.Node.SetSize(this.Node, this.Size); - } - - - Button.prototype.SetText = function(text) - { - this.Node.innerHTML = text; - } - - - Button.prototype.SetOnClick = function(on_click) - { - this.OnClick = on_click; - } - - - Button.prototype.SetState = function(pressed) - { - if (pressed) - DOM.Node.AddClass(this.Node, "ButtonHeld"); - else - DOM.Node.RemoveClass(this.Node, "ButtonHeld"); - } - - - Button.prototype.ToggleState = function() - { - if (DOM.Node.HasClass(this.Node, "ButtonHeld")) - this.SetState(false); - else - this.SetState(true); - } - - - Button.prototype.IsPressed = function() - { - return DOM.Node.HasClass(this.Node, "ButtonHeld"); - } - - - function OnMouseDown(self, evt) - { - // Decide how to set the button state - if (self.Toggle) - self.ToggleState(); - else - self.SetState(true); - - // Activate release handlers - DOM.Event.AddHandler(self.Node, "mouseout", self.OnMouseOutDelegate); - DOM.Event.AddHandler(self.Node, "mouseup", self.OnMouseUpDelegate); - - DOM.Event.StopAll(evt); - } - - - function OnMouseUp(self, confirm, evt) - { - if (confirm) - { - // Only release for non-toggles - if (!self.Toggle) - self.SetState(false); - } - else - { - // Decide how to set the button state - if (self.Toggle) - self.ToggleState(); - else - self.SetState(false); - } - - // Remove release handlers - DOM.Event.RemoveHandler(self.Node, "mouseout", self.OnMouseOutDelegate); - DOM.Event.RemoveHandler(self.Node, "mouseup", self.OnMouseUpDelegate); - - // Call the click handler if this is a button press - if (confirm && self.OnClick) - self.OnClick(self); - - DOM.Event.StopAll(evt); - } - - - return Button; -})(); \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/ComboBox.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/ComboBox.js deleted file mode 100644 index d199b3a..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/ComboBox.js +++ /dev/null @@ -1,237 +0,0 @@ - -namespace("WM"); - - -WM.ComboBoxPopup = (function() -{ - var body_template_html = "
"; - - var item_template_html = " \ -
\ -
\ -
\ -
\ -
"; - - - function ComboBoxPopup(combo_box) - { - this.ComboBox = combo_box; - this.ParentNode = combo_box.Node; - this.ValueNodes = [ ]; - - // Create the template node - this.Node = DOM.Node.CreateHTML(body_template_html); - - DOM.Event.AddHandler(this.Node, "mousedown", Bind(SelectItem, this)); - this.CancelDelegate = Bind(this, "Cancel"); - } - - - ComboBoxPopup.prototype.SetValues = function(values) - { - // Clear existing values - this.Node.innerHTML = ""; - - // Generate HTML nodes for each value - this.ValueNodes = [ ]; - for (var i in values) - { - var item_node = DOM.Node.CreateHTML(item_template_html); - var text_node = DOM.Node.FindWithClass(item_node, "ComboBoxPopupItemText"); - - item_node.Value = values[i]; - text_node.innerHTML = values[i]; - - this.Node.appendChild(item_node); - this.ValueNodes.push(item_node); - } - } - - - ComboBoxPopup.prototype.Show = function(selection_index) - { - // Initially match the position of the parent node - var pos = DOM.Node.GetPosition(this.ParentNode); - DOM.Node.SetPosition(this.Node, pos); - - // Take the width/z-index from the parent node - this.Node.style.width = this.ParentNode.offsetWidth; - this.Node.style.zIndex = this.ParentNode.style.zIndex + 1; - - // Setup event handlers - DOM.Event.AddHandler(document.body, "mousedown", this.CancelDelegate); - - // Show the popup so that the HTML layout engine kicks in before - // the layout info is used below - this.ParentNode.appendChild(this.Node); - - // Show/hide the tick image based on which node is selected - for (var i in this.ValueNodes) - { - var node = this.ValueNodes[i]; - var icon_node = DOM.Node.FindWithClass(node, "ComboBoxPopupItemIcon"); - - if (i == selection_index) - { - icon_node.style.display = "block"; - - // Also, shift the popup up so that the mouse is over the selected item and is highlighted - var item_pos = DOM.Node.GetPosition(this.ValueNodes[selection_index]); - var diff_pos = [ item_pos[0] - pos[0], item_pos[1] - pos[1] ]; - pos = [ pos[0] - diff_pos[0], pos[1] - diff_pos[1] ]; - } - else - { - icon_node.style.display = "none"; - } - } - - DOM.Node.SetPosition(this.Node, pos); - } - - - ComboBoxPopup.prototype.Hide = function() - { - DOM.Event.RemoveHandler(document.body, "mousedown", this.CancelDelegate); - this.ParentNode.removeChild(this.Node); - } - - - function SelectItem(self, evt) - { - // Search for which item node is being clicked on - var node = DOM.Event.GetNode(evt); - for (var i in self.ValueNodes) - { - var value_node = self.ValueNodes[i]; - if (DOM.Node.Contains(node, value_node)) - { - // Set the value on the combo box - self.ComboBox.SetValue(value_node.Value); - self.Hide(); - break; - } - } - } - - - function Cancel(self, evt) - { - // Don't cancel if the mouse up is anywhere on the popup or combo box - var node = DOM.Event.GetNode(evt); - if (!DOM.Node.Contains(node, self.Node) && - !DOM.Node.Contains(node, self.ParentNode)) - { - self.Hide(); - } - - - DOM.Event.StopAll(evt); - } - - - return ComboBoxPopup; -})(); - - -WM.ComboBox = (function() -{ - var template_html = " \ -
\ -
\ -
\ -
\ -
"; - - - function ComboBox() - { - this.OnChange = null; - - // Create the template node and locate key nodes - this.Node = DOM.Node.CreateHTML(template_html); - this.TextNode = DOM.Node.FindWithClass(this.Node, "ComboBoxText"); - - // Create a reusable popup - this.Popup = new WM.ComboBoxPopup(this); - - // Set an empty set of values - this.SetValues([]); - this.SetValue("<empty>"); - - // Create the mouse press event handlers - DOM.Event.AddHandler(this.Node, "mousedown", Bind(OnMouseDown, this)); - this.OnMouseOutDelegate = Bind(OnMouseUp, this, false); - this.OnMouseUpDelegate = Bind(OnMouseUp, this, true); - } - - - ComboBox.prototype.SetOnChange = function(on_change) - { - this.OnChange = on_change; - } - - - ComboBox.prototype.SetValues = function(values) - { - this.Values = values; - this.Popup.SetValues(values); - } - - - ComboBox.prototype.SetValue = function(value) - { - // Set the value and its HTML rep - var old_value = this.Value; - this.Value = value; - this.TextNode.innerHTML = value; - - // Call change handler - if (this.OnChange) - this.OnChange(value, old_value); - } - - - ComboBox.prototype.GetValue = function() - { - return this.Value; - } - - - function OnMouseDown(self, evt) - { - // If this check isn't made, the click will trigger from the popup, too - var node = DOM.Event.GetNode(evt); - if (DOM.Node.Contains(node, self.Node)) - { - // Add the depression class and activate release handlers - DOM.Node.AddClass(self.Node, "ComboBoxPressed"); - DOM.Event.AddHandler(self.Node, "mouseout", self.OnMouseOutDelegate); - DOM.Event.AddHandler(self.Node, "mouseup", self.OnMouseUpDelegate); - - DOM.Event.StopAll(evt); - } - } - - - function OnMouseUp(self, confirm, evt) - { - // Remove depression class and remove release handlers - DOM.Node.RemoveClass(self.Node, "ComboBoxPressed"); - DOM.Event.RemoveHandler(self.Node, "mouseout", self.OnMouseOutDelegate); - DOM.Event.RemoveHandler(self.Node, "mouseup", self.OnMouseUpDelegate); - - // If this is a confirmed press and there are some values in the list, show the popup - if (confirm && self.Values.length > 0) - { - var selection_index = self.Values.indexOf(self.Value); - self.Popup.Show(selection_index); - } - - DOM.Event.StopAll(evt); - } - - - return ComboBox; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Container.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Container.js deleted file mode 100644 index 2ba1388..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Container.js +++ /dev/null @@ -1,34 +0,0 @@ - -namespace("WM"); - - -WM.Container = (function() -{ - var template_html = "
"; - - - function Container(x, y, w, h) - { - // Create a simple container node - this.Node = DOM.Node.CreateHTML(template_html); - this.SetPosition(x, y); - this.SetSize(w, h); - } - - - Container.prototype.SetPosition = function(x, y) - { - this.Position = [ x, y ]; - DOM.Node.SetPosition(this.Node, this.Position); - } - - - Container.prototype.SetSize = function(w, h) - { - this.Size = [ w, h ]; - DOM.Node.SetSize(this.Node, this.Size); - } - - - return Container; -})(); \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/EditBox.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/EditBox.js deleted file mode 100644 index fd0a039..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/EditBox.js +++ /dev/null @@ -1,119 +0,0 @@ - -namespace("WM"); - - -WM.EditBox = (function() -{ - var template_html = " \ -
\ -
Label
\ - \ -
"; - - - function EditBox(x, y, w, h, label, text) - { - this.ChangeHandler = null; - - // Create node and locate its internal nodes - this.Node = DOM.Node.CreateHTML(template_html); - this.LabelNode = DOM.Node.FindWithClass(this.Node, "EditBoxLabel"); - this.EditNode = DOM.Node.FindWithClass(this.Node, "EditBox"); - - // Set label and value - this.LabelNode.innerHTML = label; - this.SetValue(text); - - this.SetPosition(x, y); - this.SetSize(w, h); - - this.PreviousValue = ""; - - // Hook up the event handlers - DOM.Event.AddHandler(this.EditNode, "focus", Bind(OnFocus, this)); - DOM.Event.AddHandler(this.EditNode, "keypress", Bind(OnKeyPress, this)); - DOM.Event.AddHandler(this.EditNode, "keydown", Bind(OnKeyDown, this)); - } - - - EditBox.prototype.SetPosition = function(x, y) - { - this.Position = [ x, y ]; - DOM.Node.SetPosition(this.Node, this.Position); - } - - - EditBox.prototype.SetSize = function(w, h) - { - this.Size = [ w, h ]; - DOM.Node.SetSize(this.EditNode, this.Size); - } - - - EditBox.prototype.SetChangeHandler = function(handler) - { - this.ChangeHandler = handler; - } - - - EditBox.prototype.SetValue = function(value) - { - if (this.EditNode) - this.EditNode.value = value; - } - - - EditBox.prototype.GetValue = function() - { - if (this.EditNode) - return this.EditNode.value; - - return null; - } - - - EditBox.prototype.LoseFocus = function() - { - if (this.EditNode) - this.EditNode.blur(); - } - - - function OnFocus(self, evt) - { - // Backup on focus - self.PreviousValue = self.EditNode.value; - } - - - function OnKeyPress(self, evt) - { - // Allow enter to confirm the text only when there's data - if (evt.keyCode == 13 && self.EditNode.value != "" && self.ChangeHandler) - { - var focus = self.ChangeHandler(self.EditNode); - if (!focus) - self.EditNode.blur(); - self.PreviousValue = ""; - } - } - - - function OnKeyDown(self, evt) - { - // Allow escape to cancel any text changes - if (evt.keyCode == 27) - { - // On initial edit of the input, escape should NOT replace with the empty string - if (self.PreviousValue != "") - { - self.EditNode.value = self.PreviousValue; - } - - self.EditNode.blur(); - } - } - - - return EditBox; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Grid.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Grid.js deleted file mode 100644 index 4c35cef..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Grid.js +++ /dev/null @@ -1,252 +0,0 @@ - -namespace("WM"); - - -WM.GridRows = (function() -{ - function GridRows(parent_object) - { - this.ParentObject = parent_object; - - // Array of rows in the order they were added - this.Rows = [ ]; - - // Collection of custom row indexes for fast lookup - this.Indexes = { }; - } - - - GridRows.prototype.AddIndex = function(cell_field_name) - { - var index = { }; - - // Go through existing rows and add to the index - for (var i in this.Rows) - { - var row = this.Rows[i]; - if (cell_field_name in row.CellData) - { - var cell_field = row.CellData[cell_field_name]; - index[cell_field] = row; - } - } - - this.Indexes[cell_field_name] = index; - } - - - GridRows.prototype.ClearIndex = function(index_name) - { - this.Indexes[index_name] = { }; - } - - GridRows.prototype.AddRowToIndex = function(index_name, cell_data, row) - { - this.Indexes[index_name][cell_data] = row; - } - - - GridRows.prototype.Add = function(cell_data, row_classes, cell_classes) - { - var row = new WM.GridRow(this.ParentObject, cell_data, row_classes, cell_classes); - this.Rows.push(row); - return row; - } - - - GridRows.prototype.GetBy = function(cell_field_name, cell_data) - { - var index = this.Indexes[cell_field_name]; - return index[cell_data]; - } - - - GridRows.prototype.Clear = function() - { - // Remove all node references from the parent - for (var i in this.Rows) - { - var row = this.Rows[i]; - row.Parent.BodyNode.removeChild(row.Node); - } - - // Clear all indexes - for (var i in this.Indexes) - this.Indexes[i] = { }; - - this.Rows = [ ]; - } - - - return GridRows; -})(); - - -WM.GridRow = (function() -{ - var template_html = "
"; - - - // - // 'cell_data' is an object with a variable number of fields. - // Any fields prefixed with an underscore are hidden. - // - function GridRow(parent, cell_data, row_classes, cell_classes) - { - // Setup data - this.Parent = parent; - this.IsOpen = true; - this.AnimHandle = null; - this.Rows = new WM.GridRows(this); - this.CellData = cell_data; - this.CellNodes = { } - - // Create the main row node - this.Node = DOM.Node.CreateHTML(template_html); - if (row_classes) - DOM.Node.AddClass(this.Node, row_classes); - - // Embed a pointer to the row in the root node so that it can be clicked - this.Node.GridRow = this; - - // Create nodes for each required cell - for (var attr in this.CellData) - { - if (this.CellData.hasOwnProperty(attr)) - { - var data = this.CellData[attr]; - - // Update any grid row index references - if (attr in parent.Rows.Indexes) - parent.Rows.AddRowToIndex(attr, data, this); - - // Hide any cells with underscore prefixes - if (attr[0] == "_") - continue; - - // Create a node for the cell and add any custom classes - var node = DOM.Node.AppendHTML(this.Node, "
"); - if (cell_classes && attr in cell_classes) - DOM.Node.AddClass(node, cell_classes[attr]); - this.CellNodes[attr] = node; - - // If this is a Window Control, add its node to the cell - if (data instanceof Object && "Node" in data && DOM.Node.IsNode(data.Node)) - { - data.ParentNode = node; - node.appendChild(data.Node); - } - - else - { - // Otherwise just assign the data as text - node.innerHTML = data; - } - } - } - - // Add the body node for any children - DOM.Node.AppendClearFloat(this.Node); - this.BodyNode = DOM.Node.AppendHTML(this.Node, "
"); - - // Add the row to the parent - this.Parent.BodyNode.appendChild(this.Node); - } - - - GridRow.prototype.Open = function() - { - // Don't allow open while animating - if (this.AnimHandle == null || this.AnimHandle.Complete) - { - this.IsOpen = true; - - // Kick off open animation - var node = this.BodyNode; - this.AnimHandle = Anim.Animate( - function (val) { DOM.Node.SetHeight(node, val) }, - 0, this.Height, 0.2); - } - } - - - GridRow.prototype.Close = function() - { - // Don't allow close while animating - if (this.AnimHandle == null || this.AnimHandle.Complete) - { - this.IsOpen = false; - - // Record height for the next open request - this.Height = this.BodyNode.offsetHeight; - - // Kick off close animation - var node = this.BodyNode; - this.AnimHandle = Anim.Animate( - function (val) { DOM.Node.SetHeight(node, val) }, - this.Height, 0, 0.2); - } - } - - - GridRow.prototype.Toggle = function() - { - if (this.IsOpen) - this.Close(); - else - this.Open(); - } - - - return GridRow; -})(); - - -WM.Grid = (function() -{ - var template_html = " \ -
\ -
\ -
"; - - - function Grid(x, y, width, height) - { - this.Rows = new WM.GridRows(this); - - this.Node = DOM.Node.CreateHTML(template_html); - this.BodyNode = DOM.Node.FindWithClass(this.Node, "GridBody"); - - DOM.Node.SetPosition(this.Node, [ x, y ]); - DOM.Node.SetSize(this.Node, [ width, height ]); - - DOM.Event.AddHandler(this.Node, "dblclick", OnDblClick); - - var mouse_wheel_event = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; - DOM.Event.AddHandler(this.Node, mouse_wheel_event, Bind(OnMouseScroll, this)); - } - - - function OnDblClick(evt) - { - // Clicked on a header? - var node = DOM.Event.GetNode(evt); - if (DOM.Node.HasClass(node, "GridRowName")) - { - // Toggle rows open/close - var row = node.parentNode.GridRow; - if (row) - row.Toggle(); - } - } - - - function OnMouseScroll(self, evt) - { - var mouse_state = new Mouse.State(evt); - self.Node.scrollTop -= mouse_state.WheelDelta * 20; - } - - - return Grid; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Label.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Label.js deleted file mode 100644 index 9b1d852..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Label.js +++ /dev/null @@ -1,31 +0,0 @@ - -namespace("WM"); - - -WM.Label = (function() -{ - var template_html = "
"; - - - function Label(x, y, text) - { - // Create the node - this.Node = DOM.Node.CreateHTML(template_html); - - // Allow position to be optional - if (x != null && y != null) - DOM.Node.SetPosition(this.Node, [x, y]); - - this.SetText(text); - } - - - Label.prototype.SetText = function(text) - { - if (text != null) - this.Node.innerHTML = text; - } - - - return Label; -})(); \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Treeview.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Treeview.js deleted file mode 100644 index 66ef80e..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Treeview.js +++ /dev/null @@ -1,352 +0,0 @@ - -namespace("WM"); - - -WM.Treeview = (function() -{ - var Margin = 10; - - - var tree_template_html = " \ -
\ -
\ -
\ -
\ -
\ -
\ -
"; - - - var item_template_html = " \ -
\ - \ -
\ -
\ -
\ -
\ -
"; - - - // TODO: Remove parent_node (required for stuff that doesn't use the WM yet) - function Treeview(x, y, width, height, parent_node) - { - // Cache initialisation options - this.ParentNode = parent_node; - this.Position = [ x, y ]; - this.Size = [ width, height ]; - - this.Node = null; - this.ScrollbarNode = null; - this.SelectedItem = null; - this.ContentsNode = null; - - // Setup options - this.HighlightOnHover = false; - this.EnableScrollbar = true; - this.HorizontalLayoutDepth = 1; - - // Generate an empty tree - this.Clear(); - } - - - Treeview.prototype.SetHighlightOnHover = function(highlight) - { - this.HighlightOnHover = highlight; - } - - - Treeview.prototype.SetEnableScrollbar = function(enable) - { - this.EnableScrollbar = enable; - } - - - Treeview.prototype.SetHorizontalLayoutDepth = function(depth) - { - this.HorizontalLayoutDepth = depth; - } - - - Treeview.prototype.SetNodeSelectedHandler = function(handler) - { - this.NodeSelectedHandler = handler; - } - - - Treeview.prototype.Clear = function() - { - this.RootItem = new WM.TreeviewItem(this, null, null, null, null); - this.GenerateHTML(); - } - - - Treeview.prototype.Root = function() - { - return this.RootItem; - } - - - Treeview.prototype.ClearSelection = function() - { - if (this.SelectedItem != null) - { - DOM.Node.RemoveClass(this.SelectedItem.Node, "TreeviewItemSelected"); - this.SelectedItem = null; - } - } - - - Treeview.prototype.SelectItem = function(item, mouse_pos) - { - // Notify the select handler - if (this.NodeSelectedHandler) - this.NodeSelectedHandler(item.Node, this.SelectedItem, item, mouse_pos); - - // Remove highlight from the old selection - this.ClearSelection(); - - // Swap in new selection and apply highlight - this.SelectedItem = item; - DOM.Node.AddClass(this.SelectedItem.Node, "TreeviewItemSelected"); - } - - - Treeview.prototype.GenerateHTML = function() - { - // Clone the template and locate important nodes - var old_node = this.Node; - this.Node = DOM.Node.CreateHTML(tree_template_html); - this.ChildrenNode = DOM.Node.FindWithClass(this.Node, "TreeviewItemChildren"); - this.ScrollbarNode = DOM.Node.FindWithClass(this.Node, "TreeviewScrollbar"); - - DOM.Node.SetPosition(this.Node, this.Position); - DOM.Node.SetSize(this.Node, this.Size); - - // Generate the contents of the treeview - GenerateTree(this, this.ChildrenNode, this.RootItem.Children, 0); - - // Cross-browser (?) means of adding a mouse wheel handler - var mouse_wheel_event = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; - DOM.Event.AddHandler(this.Node, mouse_wheel_event, Bind(OnMouseScroll, this)); - - DOM.Event.AddHandler(this.Node, "dblclick", Bind(OnMouseDoubleClick, this)); - DOM.Event.AddHandler(this.Node, "mousedown", Bind(OnMouseDown, this)); - DOM.Event.AddHandler(this.Node, "mouseup", OnMouseUp); - - // Swap in the newly generated control node if it's already been attached to a parent - if (old_node && old_node.parentNode) - { - old_node.parentNode.removeChild(old_node); - this.ParentNode.appendChild(this.Node); - } - - if (this.EnableScrollbar) - { - this.UpdateScrollbar(); - DOM.Event.AddHandler(this.ScrollbarNode, "mousedown", Bind(OnMouseDown_Scrollbar, this)); - DOM.Event.AddHandler(this.ScrollbarNode, "mouseup", Bind(OnMouseUp_Scrollbar, this)); - DOM.Event.AddHandler(this.ScrollbarNode, "mouseout", Bind(OnMouseUp_Scrollbar, this)); - DOM.Event.AddHandler(this.ScrollbarNode, "mousemove", Bind(OnMouseMove_Scrollbar, this)); - } - - else - { - DOM.Node.Hide(DOM.Node.FindWithClass(this.Node, "TreeviewScrollbarInset")); - } - } - - - Treeview.prototype.UpdateScrollbar = function() - { - if (!this.EnableScrollbar) - return; - - var scrollbar_scale = Math.min((this.Node.offsetHeight - Margin * 2) / this.ChildrenNode.offsetHeight, 1); - this.ScrollbarNode.style.height = parseInt(scrollbar_scale * 100) + "%"; - - // Shift the scrollbar container along with the parent window - this.ScrollbarNode.parentNode.style.top = this.Node.scrollTop; - - var scroll_fraction = this.Node.scrollTop / (this.Node.scrollHeight - this.Node.offsetHeight); - var max_height = this.Node.offsetHeight - Margin; - var max_scrollbar_offset = max_height - this.ScrollbarNode.offsetHeight; - var scrollbar_offset = scroll_fraction * max_scrollbar_offset; - this.ScrollbarNode.style.top = scrollbar_offset; - } - - - function GenerateTree(self, parent_node, items, depth) - { - if (items.length == 0) - return null; - - for (var i in items) - { - var item = items[i]; - - // Create the node for this item and locate important nodes - var node = DOM.Node.CreateHTML(item_template_html); - var img = DOM.Node.FindWithClass(node, "TreeviewItemImage"); - var text = DOM.Node.FindWithClass(node, "TreeviewItemText"); - var children = DOM.Node.FindWithClass(node, "TreeviewItemChildren"); - - // Attach the item to the node - node.TreeviewItem = item; - item.Node = node; - - // Add the class which highlights selection on hover - if (self.HighlightOnHover) - DOM.Node.AddClass(node, "TreeviewItemHover"); - - // Instruct the children to wrap around - if (depth >= self.HorizontalLayoutDepth) - node.style.cssFloat = "left"; - - if (item.OpenImage == null || item.CloseImage == null) - { - // If there no images, remove the image node - node.removeChild(img); - } - else - { - // Set the image source to open - img.src = item.OpenImage.src; - img.style.width = item.OpenImage.width; - img.style.height = item.OpenImage.height; - item.ImageNode = img; - } - - // Setup the text to display - text.innerHTML = item.Label; - - // Add the div to the parent and recurse into children - parent_node.appendChild(node); - GenerateTree(self, children, item.Children, depth + 1); - item.ChildrenNode = children; - } - - // Clear the wrap-around - if (depth >= self.HorizontalLayoutDepth) - DOM.Node.AppendClearFloat(parent_node.parentNode); - } - - - function OnMouseScroll(self, evt) - { - // Get mouse wheel movement - var delta = evt.detail ? evt.detail * -1 : evt.wheelDelta; - delta *= 8; - - // Scroll the main window with wheel movement and clamp - self.Node.scrollTop -= delta; - self.Node.scrollTop = Math.min(self.Node.scrollTop, (self.ChildrenNode.offsetHeight - self.Node.offsetHeight) + Margin * 2); - - self.UpdateScrollbar(); - } - - - function OnMouseDoubleClick(self, evt) - { - DOM.Event.StopDefaultAction(evt); - - // Get the tree view item being clicked, if any - var node = DOM.Event.GetNode(evt); - var tvitem = GetTreeviewItemFromNode(self, node); - if (tvitem == null) - return; - - if (tvitem.Children.length) - tvitem.Toggle(); - } - - - function OnMouseDown(self, evt) - { - DOM.Event.StopDefaultAction(evt); - - // Get the tree view item being clicked, if any - var node = DOM.Event.GetNode(evt); - var tvitem = GetTreeviewItemFromNode(self, node); - if (tvitem == null) - return; - - // If clicking on the image, expand any children - if (node.tagName == "IMG" && tvitem.Children.length) - { - tvitem.Toggle(); - } - - else - { - var mouse_pos = DOM.Event.GetMousePosition(evt); - self.SelectItem(tvitem, mouse_pos); - } - } - - - function OnMouseUp(evt) - { - // Event handler used merely to stop events bubbling up to containers - DOM.Event.StopPropagation(evt); - } - - - function OnMouseDown_Scrollbar(self, evt) - { - self.ScrollbarHeld = true; - - // Cache the mouse height relative to the scrollbar - self.LastY = evt.clientY; - self.ScrollY = self.Node.scrollTop; - - DOM.Node.AddClass(self.ScrollbarNode, "TreeviewScrollbarHeld"); - DOM.Event.StopDefaultAction(evt); - } - - - function OnMouseUp_Scrollbar(self, evt) - { - self.ScrollbarHeld = false; - DOM.Node.RemoveClass(self.ScrollbarNode, "TreeviewScrollbarHeld"); - } - - - function OnMouseMove_Scrollbar(self, evt) - { - if (self.ScrollbarHeld) - { - var delta_y = evt.clientY - self.LastY; - self.LastY = evt.clientY; - - var max_height = self.Node.offsetHeight - Margin; - var max_scrollbar_offset = max_height - self.ScrollbarNode.offsetHeight; - var max_contents_scroll = self.Node.scrollHeight - self.Node.offsetHeight; - var scale = max_contents_scroll / max_scrollbar_offset; - - // Increment the local float variable and assign, as scrollTop is of type int - self.ScrollY += delta_y * scale; - self.Node.scrollTop = self.ScrollY; - self.Node.scrollTop = Math.min(self.Node.scrollTop, (self.ChildrenNode.offsetHeight - self.Node.offsetHeight) + Margin * 2); - - self.UpdateScrollbar(); - } - } - - - function GetTreeviewItemFromNode(self, node) - { - // Walk up toward the tree view node looking for this first item - while (node && node != self.Node) - { - if ("TreeviewItem" in node) - return node.TreeviewItem; - - node = node.parentNode; - } - - return null; - } - - return Treeview; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/TreeviewItem.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/TreeviewItem.js deleted file mode 100644 index ac6133e..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/TreeviewItem.js +++ /dev/null @@ -1,109 +0,0 @@ - -namespace("WM"); - - -WM.TreeviewItem = (function() -{ - function TreeviewItem(treeview, name, data, open_image, close_image) - { - // Assign members - this.Treeview = treeview; - this.Label = name; - this.Data = data; - this.OpenImage = open_image; - this.CloseImage = close_image; - - this.Children = [ ]; - - // The HTML node wrapping the item and its children - this.Node = null; - - // The HTML node storing the image for the open/close state feedback - this.ImageNode = null; - - // The HTML node storing just the children - this.ChildrenNode = null; - - // Animation handle for opening and closing the child nodes, only used - // if the tree view item as children - this.AnimHandle = null; - - // Open state of the item - this.IsOpen = true; - } - - - TreeviewItem.prototype.AddItem = function(name, data, open_image, close_image) - { - var item = new WM.TreeviewItem(this.Treeview, name, data, open_image, close_image); - this.Children.push(item); - return item; - } - - - TreeviewItem.prototype.Open = function() - { - if (this.AnimHandle == null || this.AnimHandle.Complete) - { - // Swap to the open state - this.IsOpen = true; - if (this.ImageNode != null && this.OpenImage != null) - this.ImageNode.src = this.OpenImage.src; - - // Cache for closure binding - var child_node = this.ChildrenNode; - var end_height = this.StartHeight; - var treeview = this.Treeview; - - // Reveal the children and animate their height to max - this.ChildrenNode.style.display = "block"; - this.AnimHandle = Anim.Animate( - function (val) { DOM.Node.SetHeight(child_node, val) }, - 0, end_height, 0.2, - function() { treeview.UpdateScrollbar(); }); - - // Fade the children in - Anim.Animate(function(val) { DOM.Node.SetOpacity(child_node, val) }, 0, 1, 0.2); - } - } - - - TreeviewItem.prototype.Close = function() - { - if (this.AnimHandle == null || this.AnimHandle.Complete) - { - // Swap to the close state - this.IsOpen = false; - if (this.ImageNode != null && this.CloseImage != null) - this.ImageNode.src = this.CloseImage.src; - - // Cache for closure binding - var child_node = this.ChildrenNode; - var treeview = this.Treeview; - - // Mark the height of the item for reload later - this.StartHeight = child_node.offsetHeight; - - // Shrink the height of the children and hide them upon completion - this.AnimHandle = Anim.Animate( - function (val) { DOM.Node.SetHeight(child_node, val) }, - this.ChildrenNode.offsetHeight, 0, 0.2, - function() { child_node.style.display = "none"; treeview.UpdateScrollbar(); }); - - // Fade the children out - Anim.Animate(function(val) { DOM.Node.SetOpacity(child_node, val) }, 1, 0, 0.2); - } - } - - - TreeviewItem.prototype.Toggle = function() - { - if (this.IsOpen) - this.Close(); - else - this.Open(); - } - - - return TreeviewItem; -})(); diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Window.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Window.js deleted file mode 100644 index e5e986f..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/Window.js +++ /dev/null @@ -1,243 +0,0 @@ - -namespace("WM"); - - -WM.Window = (function() -{ - var template_html = " \ -
\ -
\ -
Window Title Bar
\ -
O
\ -
\ -
\ -
\ -
"; - - - function Window(manager, title, x, y, width, height, parent_node) - { - this.Manager = manager; - this.ParentNode = parent_node || document.body; - this.OnMove = null; - this.Visible = false; - this.AnimatedShow = false; - - // Clone the window template and locate key nodes within it - this.Node = DOM.Node.CreateHTML(template_html); - this.TitleBarNode = DOM.Node.FindWithClass(this.Node, "WindowTitleBar"); - this.TitleBarTextNode = DOM.Node.FindWithClass(this.Node, "WindowTitleBarText"); - this.TitleBarCloseNode = DOM.Node.FindWithClass(this.Node, "WindowTitleBarClose"); - this.BodyNode = DOM.Node.FindWithClass(this.Node, "WindowBody"); - - // Setup the position and dimensions of the window - this.SetPosition(x, y); - this.SetSize(width, height); - - // Set the title text - this.TitleBarTextNode.innerHTML = title; - - // Hook up event handlers - DOM.Event.AddHandler(this.Node, "mousedown", Bind(this, "SetTop")); - DOM.Event.AddHandler(this.TitleBarNode, "mousedown", Bind(this, "BeginMove")); - DOM.Event.AddHandler(this.TitleBarCloseNode, "mousedown", Bind(this, "Hide")); - - // Create delegates for removable handlers - this.MoveDelegate = Bind(this, "Move"); - this.EndMoveDelegate = Bind(this, "EndMove"); - } - - - Window.prototype.SetOnMove = function(on_move) - { - this.OnMove = on_move; - } - - - Window.prototype.Show = function() - { - if (this.Node.parentNode != this.ParentNode) - { - this.ShowNoAnim(); - Anim.Animate(Bind(this, "OpenAnimation"), 0, 1, 1); - } - } - - - Window.prototype.ShowNoAnim = function() - { - // Add to the document - this.ParentNode.appendChild(this.Node); - this.AnimatedShow = false; - this.Visible = true; - } - - - Window.prototype.Hide = function() - { - if (this.Node.parentNode == this.ParentNode) - { - if (this.AnimatedShow) - { - // Trigger animation that ends with removing the window from the document - Anim.Animate( - Bind(this, "CloseAnimation"), - 0, 1, 0.25, - Bind(this, "HideNoAnim")); - } - else - { - this.HideNoAnim(); - } - } - } - - - Window.prototype.HideNoAnim = function() - { - // Remove node - this.ParentNode.removeChild(this.Node); - this.Visible = false; - } - - - Window.prototype.SetTop = function() - { - this.Manager.SetTopWindow(this); - } - - - - Window.prototype.SetTitle = function(title) - { - this.TitleBarTextNode.innerHTML = title; - } - - - // TODO: Update this - Window.prototype.AddControl = function(control) - { - // Get all arguments to this function and replace the first with this window node - var args = [].slice.call(arguments); - args[0] = this.BodyNode; - - // Create the control and call its Init method with the modified arguments - var instance = new control(); - instance.Init.apply(instance, args); - - return instance; - } - - - Window.prototype.AddControlNew = function(control) - { - control.ParentNode = this.BodyNode; - this.BodyNode.appendChild(control.Node); - return control; - } - - - Window.prototype.Scale = function(t) - { - // Calculate window bounds centre/extents - var ext_x = this.Size[0] / 2; - var ext_y = this.Size[1] / 2; - var mid_x = this.Position[0] + ext_x; - var mid_y = this.Position[1] + ext_y; - - // Scale from the mid-point - DOM.Node.SetPosition(this.Node, [ mid_x - ext_x * t, mid_y - ext_y * t ]); - DOM.Node.SetSize(this.Node, [ this.Size[0] * t, this.Size[1] * t ]); - } - - - Window.prototype.OpenAnimation = function(val) - { - // Power ease in - var t = 1 - Math.pow(1 - val, 8); - this.Scale(t); - DOM.Node.SetOpacity(this.Node, 1 - Math.pow(1 - val, 8)); - this.AnimatedShow = true; - } - - - Window.prototype.CloseAnimation = function(val) - { - // Power ease out - var t = 1 - Math.pow(val, 4); - this.Scale(t); - DOM.Node.SetOpacity(this.Node, t); - } - - - Window.prototype.NotifyChange = function() - { - if (this.OnMove) - { - var pos = DOM.Node.GetPosition(this.Node); - this.OnMove(this, pos); - } - } - - - Window.prototype.BeginMove = function(evt) - { - // Calculate offset of the window from the mouse down position - var mouse_pos = DOM.Event.GetMousePosition(evt); - this.Offset = [ mouse_pos[0] - this.Position[0], mouse_pos[1] - this.Position[1] ]; - - // Dynamically add handlers for movement and release - DOM.Event.AddHandler(document, "mousemove", this.MoveDelegate); - DOM.Event.AddHandler(document, "mouseup", this.EndMoveDelegate); - - DOM.Event.StopDefaultAction(evt); - } - - - Window.prototype.Move = function(evt) - { - // Use the offset at the beginning of movement to drag the window around - var mouse_pos = DOM.Event.GetMousePosition(evt); - var offset = this.Offset; - var pos = [ mouse_pos[0] - offset[0], mouse_pos[1] - offset[1] ]; - this.SetPosition(pos[0], pos[1]); - - if (this.OnMove) - this.OnMove(this, pos); - - DOM.Event.StopDefaultAction(evt); - } - - - Window.prototype.EndMove = function(evt) - { - // Remove handlers added during mouse down - DOM.Event.RemoveHandler(document, "mousemove", this.MoveDelegate); - DOM.Event.RemoveHandler(document, "mouseup", this.EndMoveDelegate); - - DOM.Event.StopDefaultAction(evt); - } - - - Window.prototype.SetPosition = function(x, y) - { - this.Position = [ x, y ]; - DOM.Node.SetPosition(this.Node, this.Position); - } - - - Window.prototype.SetSize = function(w, h) - { - this.Size = [ w, h ]; - DOM.Node.SetSize(this.Node, this.Size); - } - - - Window.prototype.GetZIndex = function() - { - return parseInt(this.Node.style.zIndex); - } - - - return Window; -})(); \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/WindowManager.js b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/WindowManager.js deleted file mode 100644 index bef33c2..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Code/WindowManager.js +++ /dev/null @@ -1,54 +0,0 @@ - -namespace("WM"); - - -WM.WindowManager = (function() -{ - function WindowManager() - { - // An empty list of windows under window manager control - this.Windows = [ ]; - } - - - WindowManager.prototype.AddWindow = function(title, x, y, width, height, parent_node) - { - // Create the window and add it to the list of windows - var wnd = new WM.Window(this, title, x, y, width, height, parent_node); - this.Windows.push(wnd); - - // Always bring to the top on creation - wnd.SetTop(); - - return wnd; - } - - - WindowManager.prototype.SetTopWindow = function(top_wnd) - { - // Bring the window to the top of the window list - var top_wnd_index = this.Windows.indexOf(top_wnd); - if (top_wnd_index != -1) - this.Windows.splice(top_wnd_index, 1); - this.Windows.push(top_wnd); - - // Set a CSS z-index for each visible window from the bottom up - for (var i in this.Windows) - { - var wnd = this.Windows[i]; - if (!wnd.Visible) - continue; - - // Ensure there's space between each window for the elements inside to be sorted - var z = (parseInt(i) + 1) * 10; - wnd.Node.style.zIndex = z; - - // Notify window that its z-order has changed - wnd.NotifyChange(); - } - } - - - return WindowManager; - -})(); \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Styles/WindowManager.css b/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Styles/WindowManager.css deleted file mode 100644 index 169a57d..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/extern/BrowserLib/WindowManager/Styles/WindowManager.css +++ /dev/null @@ -1,546 +0,0 @@ - - -.notextsel -{ - /* Disable text selection so that it doesn't interfere with button-clicking */ - user-select:none; - - /* Stops the text cursor over the label */ - cursor:default; -} - - - -/* ------------------------------------------------------------------------------------------------------------------ */ -/* Window Styles */ -/* ------------------------------------------------------------------------------------------------------------------ */ - - - -.Window -{ - /* Allows movement of the window to exceed browser region without triggering scroll bars */ - position:fixed; - - /* Clip all contents to the window border */ - overflow: hidden; - - background: #404040; - - border-radius: 5px; - -moz-border-radius: 5px; - - -webkit-box-shadow: 3px 3px 3px #111, 1px 1px 1px #606060 inset; - box-shadow: 3px 3px 3px #111, 1px 1px 1px #606060 inset; -} - -.Window_Transparent -{ - /* Set transparency changes to fade in/out */ - opacity: 0.5; - transition: opacity 0.5s ease-out; - -moz-transition: opacity 0.5s ease-out; - -webkit-transition: opacity 0.5s ease-out; -} - -.Window_Transparent:hover -{ - opacity: 1; -} - -.WindowTitleBar -{ - height: 17px; - cursor: move; - - border-bottom: 1px solid #303030; - border-radius: 5px; -} - -.WindowTitleBarText -{ - color: #BBB; - font: 9px Verdana; - - padding: 3px; - cursor: move; -} - -.WindowTitleBarClose -{ - color: #999999; - font: 9px Verdana; - - padding: 3px; - cursor: default; -} - -.WindowBody -{ - /* Turns this node into a "positioned node" so that its children can be placed relative to it */ - position: absolute; - - /* Fill the parent window node */ - width: 100%; - height: 100%; - - padding:10px; - border-top: 1px solid #606060; -} - - - -/* ------------------------------------------------------------------------------------------------------------------ */ -/* Container Styles */ -/* ------------------------------------------------------------------------------------------------------------------ */ - - - -.Container -{ - /* Position relative to the parent window */ - position: absolute; - - background:#2C2C2C; - - border: 1px black solid; - - /* Two inset box shadows to simulate depressing */ - -webkit-box-shadow: -1px -1px 1px #222 inset, 1px 1px 1px #222 inset; - box-shadow: -1px -1px 1px #222 inset, 1px 1px 1px #222 inset; -} - - - -/* ------------------------------------------------------------------------------------------------------------------ */ -/* Treeview Styles */ -/* ------------------------------------------------------------------------------------------------------------------ */ - - - -.Treeview -{ - position: absolute; - - background:#2C2C2C; - border: 1px solid black; - overflow:hidden; - - /* Two inset box shadows to simulate depressing */ - -webkit-box-shadow: -1px -1px 1px #222 inset, 1px 1px 1px #222 inset; - box-shadow: -1px -1px 1px #222 inset, 1px 1px 1px #222 inset; -} - -.TreeviewItem -{ - margin:1px; - padding:2px; - border:solid 1px #2C2C2C; - background-color:#2C2C2C; -} - -.TreeviewItemImage -{ - float: left; -} - -.TreeviewItemText -{ - float: left; - margin-left:4px; -} - -.TreeviewItemChildren -{ - overflow: hidden; -} - -.TreeviewItemSelected -{ - background-color:#444; - border-color:#FFF; - - -webkit-transition: background-color 0.2s ease-in-out; - -moz-transition: background-color 0.2s ease-in-out; - -webkit-transition: border-color 0.2s ease-in-out; - -moz-transition: border-color 0.2s ease-in-out; -} - -/* Used to populate treeviews that want highlight on hover behaviour */ -.TreeviewItemHover -{ -} - -.TreeviewItemHover:hover -{ - background-color:#111; - border-color:#444; - - -webkit-transition: background-color 0.2s ease-in-out; - -moz-transition: background-color 0.2s ease-in-out; - -webkit-transition: border-color 0.2s ease-in-out; - -moz-transition: border-color 0.2s ease-in-out; -} - -.TreeviewScrollbarInset -{ - float: right; - - position:relative; - - height: 100%; - - /* CRAZINESS PART A: Trying to get the inset and scrollbar to have 100% height match its container */ - margin: -8px -8px 0 0; - padding: 0 1px 14px 1px; - - width:20px; - background:#2C2C2C; - border: 1px solid black; - - /* Two inset box shadows to simulate depressing */ - -webkit-box-shadow: -1px -1px 1px #222 inset, 1px 1px 1px #222 inset; - box-shadow: -1px -1px 1px #222 inset, 1px 1px 1px #222 inset; -} - -.TreeviewScrollbar -{ - position:relative; - - background:#2C2C2C; - border: 1px solid black; - - /* CRAZINESS PART B: Trying to get the inset and scrollbar to have 100% height match its container */ - padding: 0 0 10px 0; - margin: 1px 0 0 0; - - width: 18px; - height: 100%; - - border-radius:6px; - border-color:#000; - border-width:1px; - border-style:solid; - - /* The gradient for the button background */ - background-color:#666; - background: -webkit-gradient(linear, left top, left bottom, from(#666), to(#383838)); - background: -moz-linear-gradient(top, #666, #383838); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#666666', endColorstr='#383838'); - - /* A box shadow and inset box highlight */ - -webkit-box-shadow: 1px 1px 1px #222, 1px 1px 1px #777 inset; - box-shadow: 1px 1px 1px #222, 1px 1px 1px #777 inset; -} - -.TreeviewScrollbarHeld -{ - /* Reset the gradient to a full-colour background */ - background:#383838; - - /* Two inset box shadows to simulate depressing */ - -webkit-box-shadow: -1px -1px 1px #222 inset, 1px 1px 1px #222 inset; - box-shadow: -1px -1px 1px #222 inset, 1px 1px 1px #222 inset; -} - - - -/* ------------------------------------------------------------------------------------------------------------------ */ -/* Treeview Styles */ -/* ------------------------------------------------------------------------------------------------------------------ */ - - - -.EditBoxContainer -{ - position: absolute; - padding:2px 10px 2px 10px; -} - -.EditBoxLabel -{ - float:left; - padding: 3px 4px 4px 4px; - font: 9px Verdana; -} - -.EditBox -{ - float:left; - - background:#666; - border: 1px solid; - border-radius: 6px; - padding: 3px 4px 3px 4px; - height: 20px; - - box-shadow: 1px 1px 1px #222 inset; - - transition: all 0.3s ease-in-out; -} - -.EditBox:focus -{ - background:#FFF; - outline:0; -} - - - -/* ------------------------------------------------------------------------------------------------------------------ */ -/* Label Styles */ -/* ------------------------------------------------------------------------------------------------------------------ */ - - - -.Label -{ - /* Position relative to the parent window */ - position:absolute; - - color: #BBB; - font: 9px Verdana; -} - - - -/* ------------------------------------------------------------------------------------------------------------------ */ -/* Combo Box Styles */ -/* ------------------------------------------------------------------------------------------------------------------ */ - - - -.ComboBox -{ - position:absolute; - - /* TEMP! */ - width:90px; - - /* Height is fixed to match the font */ - height:14px; - - /* Align the text within the combo box */ - padding: 1px 0 0 5px; - - /* Solid, rounded border */ - border: 1px solid #111; - border-radius: 5px; - - /* http://www.colorzilla.com/gradient-editor/#e3e3e3+0,c6c6c6+22,b7b7b7+33,afafaf+50,a7a7a7+67,797979+82,414141+100;Custom */ - background: #e3e3e3; - background: -moz-linear-gradient(top, #e3e3e3 0%, #c6c6c6 22%, #b7b7b7 33%, #afafaf 50%, #a7a7a7 67%, #797979 82%, #414141 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e3e3e3), color-stop(22%,#c6c6c6), color-stop(33%,#b7b7b7), color-stop(50%,#afafaf), color-stop(67%,#a7a7a7), color-stop(82%,#797979), color-stop(100%,#414141)); - background: -webkit-linear-gradient(top, #e3e3e3 0%,#c6c6c6 22%,#b7b7b7 33%,#afafaf 50%,#a7a7a7 67%,#797979 82%,#414141 100%); - background: -o-linear-gradient(top, #e3e3e3 0%,#c6c6c6 22%,#b7b7b7 33%,#afafaf 50%,#a7a7a7 67%,#797979 82%,#414141 100%); - background: -ms-linear-gradient(top, #e3e3e3 0%,#c6c6c6 22%,#b7b7b7 33%,#afafaf 50%,#a7a7a7 67%,#797979 82%,#414141 100%); - background: linear-gradient(top, #e3e3e3 0%,#c6c6c6 22%,#b7b7b7 33%,#afafaf 50%,#a7a7a7 67%,#797979 82%,#414141 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e3e3e3', endColorstr='#414141',GradientType=0 ); -} - -.ComboBoxPressed -{ - /* The reverse of the default background, simulating depression */ - background: #414141; - background: -moz-linear-gradient(top, #414141 0%, #797979 18%, #a7a7a7 33%, #afafaf 50%, #b7b7b7 67%, #c6c6c6 78%, #e3e3e3 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#414141), color-stop(18%,#797979), color-stop(33%,#a7a7a7), color-stop(50%,#afafaf), color-stop(67%,#b7b7b7), color-stop(78%,#c6c6c6), color-stop(100%,#e3e3e3)); - background: -webkit-linear-gradient(top, #414141 0%,#797979 18%,#a7a7a7 33%,#afafaf 50%,#b7b7b7 67%,#c6c6c6 78%,#e3e3e3 100%); - background: -o-linear-gradient(top, #414141 0%,#797979 18%,#a7a7a7 33%,#afafaf 50%,#b7b7b7 67%,#c6c6c6 78%,#e3e3e3 100%); - background: -ms-linear-gradient(top, #414141 0%,#797979 18%,#a7a7a7 33%,#afafaf 50%,#b7b7b7 67%,#c6c6c6 78%,#e3e3e3 100%); - background: linear-gradient(top, #414141 0%,#797979 18%,#a7a7a7 33%,#afafaf 50%,#b7b7b7 67%,#c6c6c6 78%,#e3e3e3 100%); - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#414141', endColorstr='#e3e3e3',GradientType=0 ); -} - -.ComboBoxText -{ - /* Text info */ - color: #000; - font: 9px Verdana; - - float:left; -} - -.ComboBoxIcon -{ - /* Push the image to the far right */ - float:right; - - /* Align the image with the combo box */ - padding: 2px 5px 0 0; -} - -.ComboBoxPopup -{ - position: fixed; - - background: #CCC; - - border-radius: 5px; - - padding: 1px 0 1px 0; -} - -.ComboBoxPopupItem -{ - /* Text info */ - color: #000; - font: 9px Verdana; - - padding: 1px 1px 1px 5px; - - border-bottom: 1px solid #AAA; - border-top: 1px solid #FFF; -} - -.ComboBoxPopupItemText -{ - float:left; -} - -.ComboBoxPopupItemIcon -{ - /* Push the image to the far right */ - float:right; - - /* Align the image with the combo box */ - padding: 2px 5px 0 0; -} - -.ComboBoxPopupItem:first-child -{ - border-top: 0px; -} - -.ComboBoxPopupItem:last-child -{ - border-bottom: 0px; -} - -.ComboBoxPopupItem:hover -{ - color:#FFF; - background: #2036E1; -} - - - -/* ------------------------------------------------------------------------------------------------------------------ */ -/* Grid Styles */ -/* ------------------------------------------------------------------------------------------------------------------ */ - - - -.Grid -{ - /* Clip contents */ - overflow: hidden; - - position: relative; - - background: #333; - - border-radius: 2px; -} - -.GridBody -{ -} - -.GridRow -{ - background:#303030; - - color: #BBB; - font: 9px Verdana; - - padding: 2px; -} - -.GridRow.GridGroup -{ - padding: 0px; -} - -.GridRow:nth-child(odd) -{ - background:#333; -} - -.GridRowCell -{ - float:left; -} -.GridRowCell.GridGroup -{ - color: #BBB; - - /* Override default from name */ - width: 100%; - - padding: 1px 1px 1px 2px; - border: 1px solid; - border-radius: 2px; - - border-top-color:#555; - border-left-color:#555; - border-bottom-color:#111; - border-right-color:#111; - - background: #222; -} - -.GridRowBody -{ - /* Clip all contents for show/hide group*/ - overflow: hidden; - - /* Crazy CSS rules: controls for properties don't clip if this isn't set on this parent */ - position: relative; -} - - - -/* ------------------------------------------------------------------------------------------------------------------ */ -/* Button Styles */ -/* ------------------------------------------------------------------------------------------------------------------ */ - - - -.Button -{ - /* Position relative to the parent window */ - position:absolute; - - border-radius:6px; - border-color:#000; - border-width:1px; - border-style:solid; - - /* Padding at the top includes 2px for the text drop-shadow */ - padding: 2px 5px 3px 5px; - - color: #BBB; - font: 9px Verdana; - text-shadow: 1px 1px 1px black; - text-align: center; - - /* The gradient for the button background */ - background-color:#666; - background: -webkit-gradient(linear, left top, left bottom, from(#666), to(#383838)); - background: -moz-linear-gradient(top, #666, #383838); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#666666', endColorstr='#383838'); - - /* A box shadow and inset box highlight */ - -webkit-box-shadow: 1px 1px 1px #222, 1px 1px 1px #777 inset; - box-shadow: 1px 1px 1px #222, 1px 1px 1px #777 inset; -} - -.ButtonHeld -{ - /* Reset the gradient to a full-colour background */ - background:#383838; - - /* Two inset box shadows to simulate depressing */ - -webkit-box-shadow: -1px -1px 1px #222 inset, 1px 1px 1px #222 inset; - box-shadow: -1px -1px 1px #222 inset, 1px 1px 1px #222 inset; -} diff --git a/3rdparty/bgfx/3rdparty/remotery/vis/index.html b/3rdparty/bgfx/3rdparty/remotery/vis/index.html deleted file mode 100644 index 3e57256..0000000 --- a/3rdparty/bgfx/3rdparty/remotery/vis/index.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - Remotery Viewer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/3rdparty/bgfx/3rdparty/stb/stb_image.c b/3rdparty/bgfx/3rdparty/stb/stb_image.c deleted file mode 100644 index ad26b74..0000000 --- a/3rdparty/bgfx/3rdparty/stb/stb_image.c +++ /dev/null @@ -1,6769 +0,0 @@ -#ifdef __GNUC__ -# pragma GCC diagnostic ignored "-Wshadow" -# pragma GCC diagnostic ignored "-Warray-bounds" -# ifndef __clang__ -# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -# endif // __clang__ -#elif defined(_MSC_VER) -# pragma warning(disable:4244) // warning C4244: '=': conversion from 'int' to 'stbi__uint16', possible loss of data -# pragma warning(disable:4245) // warning C4245: 'argument': conversion from 'int' to 'char', signed/unsigned mismatch -# pragma warning(disable:4312) // warning C4312: 'type cast': conversion from '' to '' of greater size -# pragma warning(disable:4456) // warning C4456: declaration of 'k' hides previous local declaration -# pragma warning(disable:4457) // warning C4457: declaration of 'y' hides function parameter -#endif - -/* stb_image - v2.06 - public domain image loader - http://nothings.org/stb_image.h - no warranty implied; use at your own risk - - Do this: - #define STB_IMAGE_IMPLEMENTATION - before you include this file in *one* C or C++ file to create the implementation. - - // i.e. it should look like this: - #include ... - #include ... - #include ... - #define STB_IMAGE_IMPLEMENTATION - #include "stb_image.h" - - You can #define STBI_ASSERT(x) before the #include to avoid using assert.h. - And #define STBI_MALLOC, STBI_REALLOC, and STBI_FREE to avoid using malloc,realloc,free - - - QUICK NOTES: - Primarily of interest to game developers and other people who can - avoid problematic images and only need the trivial interface - - JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib) - PNG 1/2/4/8-bit-per-channel (16 bpc not supported) - - TGA (not sure what subset, if a subset) - BMP non-1bpp, non-RLE - PSD (composited view only, no extra channels, 8/16 bit-per-channel) - - GIF (*comp always reports as 4-channel) - HDR (radiance rgbE format) - PIC (Softimage PIC) - PNM (PPM and PGM binary only) - - Animated GIF still needs a proper API, but here's one way to do it: - http://gist.github.com/urraka/685d9a6340b26b830d49 - - - decode from memory or through FILE (define STBI_NO_STDIO to remove code) - - decode from arbitrary I/O callbacks - - SIMD acceleration on x86/x64 (SSE2) and ARM (NEON) - - Full documentation under "DOCUMENTATION" below. - - - Revision 2.00 release notes: - - - Progressive JPEG is now supported. - - - PPM and PGM binary formats are now supported, thanks to Ken Miller. - - - x86 platforms now make use of SSE2 SIMD instructions for - JPEG decoding, and ARM platforms can use NEON SIMD if requested. - This work was done by Fabian "ryg" Giesen. SSE2 is used by - default, but NEON must be enabled explicitly; see docs. - - With other JPEG optimizations included in this version, we see - 2x speedup on a JPEG on an x86 machine, and a 1.5x speedup - on a JPEG on an ARM machine, relative to previous versions of this - library. The same results will not obtain for all JPGs and for all - x86/ARM machines. (Note that progressive JPEGs are significantly - slower to decode than regular JPEGs.) This doesn't mean that this - is the fastest JPEG decoder in the land; rather, it brings it - closer to parity with standard libraries. If you want the fastest - decode, look elsewhere. (See "Philosophy" section of docs below.) - - See final bullet items below for more info on SIMD. - - - Added STBI_MALLOC, STBI_REALLOC, and STBI_FREE macros for replacing - the memory allocator. Unlike other STBI libraries, these macros don't - support a context parameter, so if you need to pass a context in to - the allocator, you'll have to store it in a global or a thread-local - variable. - - - Split existing STBI_NO_HDR flag into two flags, STBI_NO_HDR and - STBI_NO_LINEAR. - STBI_NO_HDR: suppress implementation of .hdr reader format - STBI_NO_LINEAR: suppress high-dynamic-range light-linear float API - - - You can suppress implementation of any of the decoders to reduce - your code footprint by #defining one or more of the following - symbols before creating the implementation. - - STBI_NO_JPEG - STBI_NO_PNG - STBI_NO_BMP - STBI_NO_PSD - STBI_NO_TGA - STBI_NO_GIF - STBI_NO_HDR - STBI_NO_PIC - STBI_NO_PNM (.ppm and .pgm) - - - You can request *only* certain decoders and suppress all other ones - (this will be more forward-compatible, as addition of new decoders - doesn't require you to disable them explicitly): - - STBI_ONLY_JPEG - STBI_ONLY_PNG - STBI_ONLY_BMP - STBI_ONLY_PSD - STBI_ONLY_TGA - STBI_ONLY_GIF - STBI_ONLY_HDR - STBI_ONLY_PIC - STBI_ONLY_PNM (.ppm and .pgm) - - Note that you can define multiples of these, and you will get all - of them ("only x" and "only y" is interpreted to mean "only x&y"). - - - If you use STBI_NO_PNG (or _ONLY_ without PNG), and you still - want the zlib decoder to be available, #define STBI_SUPPORT_ZLIB - - - Compilation of all SIMD code can be suppressed with - #define STBI_NO_SIMD - It should not be necessary to disable SIMD unless you have issues - compiling (e.g. using an x86 compiler which doesn't support SSE - intrinsics or that doesn't support the method used to detect - SSE2 support at run-time), and even those can be reported as - bugs so I can refine the built-in compile-time checking to be - smarter. - - - The old STBI_SIMD system which allowed installing a user-defined - IDCT etc. has been removed. If you need this, don't upgrade. My - assumption is that almost nobody was doing this, and those who - were will find the built-in SIMD more satisfactory anyway. - - - RGB values computed for JPEG images are slightly different from - previous versions of stb_image. (This is due to using less - integer precision in SIMD.) The C code has been adjusted so - that the same RGB values will be computed regardless of whether - SIMD support is available, so your app should always produce - consistent results. But these results are slightly different from - previous versions. (Specifically, about 3% of available YCbCr values - will compute different RGB results from pre-1.49 versions by +-1; - most of the deviating values are one smaller in the G channel.) - - - If you must produce consistent results with previous versions of - stb_image, #define STBI_JPEG_OLD and you will get the same results - you used to; however, you will not get the SIMD speedups for - the YCbCr-to-RGB conversion step (although you should still see - significant JPEG speedup from the other changes). - - Please note that STBI_JPEG_OLD is a temporary feature; it will be - removed in future versions of the library. It is only intended for - near-term back-compatibility use. - - - Latest revision history: - 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes - 2.11 (2016-04-02) 16-bit PNGS; enable SSE2 in non-gcc x64 - RGB-format JPEG; remove white matting in PSD; - allocate large structures on the stack; - correct channel count for PNG & BMP - 2.10 (2016-01-22) avoid warning introduced in 2.09 - 2.09 (2016-01-16) 16-bit TGA; comments in PNM files; STBI_REALLOC_SIZED - 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA - 2.07 (2015-09-13) partial animated GIF support - limited 16-bit PSD support - minor bugs, code cleanup, and compiler warnings - 2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value - 2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning - 2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit - 2.03 (2015-04-12) additional corruption checking - stbi_set_flip_vertically_on_load - fix NEON support; fix mingw support - 2.02 (2015-01-19) fix incorrect assert, fix warning - 2.01 (2015-01-17) fix various warnings - 2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG - 2.00 (2014-12-25) optimize JPEG, including x86 SSE2 & ARM NEON SIMD - progressive JPEG - PGM/PPM support - STBI_MALLOC,STBI_REALLOC,STBI_FREE - STBI_NO_*, STBI_ONLY_* - GIF bugfix - - See end of file for full revision history. - - - ============================ Contributors ========================= - - Image formats Extensions, features - Sean Barrett (jpeg, png, bmp) Jetro Lauha (stbi_info) - Nicolas Schulz (hdr, psd) Martin "SpartanJ" Golini (stbi_info) - Jonathan Dummer (tga) James "moose2000" Brown (iPhone PNG) - Jean-Marc Lienher (gif) Ben "Disch" Wenger (io callbacks) - Tom Seddon (pic) Omar Cornut (1/2/4-bit PNG) - Thatcher Ulrich (psd) Nicolas Guillemot (vertical flip) - Ken Miller (pgm, ppm) Richard Mitton (16-bit PSD) - urraka@github (animated gif) Junggon Kim (PNM comments) - Daniel Gibson (16-bit TGA) - - Optimizations & bugfixes - Fabian "ryg" Giesen - Arseny Kapoulkine - - Bug & warning fixes - Marc LeBlanc David Woo Guillaume George Martins Mozeiko - Christpher Lloyd Martin Golini Jerry Jansson Joseph Thomson - Dave Moore Roy Eltham Hayaki Saito Phil Jordan - Won Chun Luke Graham Johan Duparc Nathan Reed - the Horde3D community Thomas Ruf Ronny Chevalier Nick Verigakis - Janez Zemva John Bartholomew Michal Cichon svdijk@github - Jonathan Blow Ken Hamada Tero Hanninen Baldur Karlsson - Laurent Gomila Cort Stratton Sergio Gonzalez romigrou@github - Aruelien Pocheville Thibault Reuille Cass Everitt Matthew Gregan - Ryamond Barbiero Paul Du Bois Engin Manap snagar@github - Michaelangel007@github Oriol Ferrer Mesia socks-the-fox - Blazej Dariusz Roszkowski - - -LICENSE - -This software is dual-licensed to the public domain and under the following -license: you are granted a perpetual, irrevocable license to copy, modify, -publish, and distribute this file as you see fit. - -*/ - -#ifndef STBI_INCLUDE_STB_IMAGE_H -#define STBI_INCLUDE_STB_IMAGE_H - -// DOCUMENTATION -// -// Limitations: -// - no 16-bit-per-channel PNG -// - no 12-bit-per-channel JPEG -// - no JPEGs with arithmetic coding -// - no 1-bit BMP -// - GIF always returns *comp=4 -// -// Basic usage (see HDR discussion below for HDR usage): -// int x,y,n; -// unsigned char *data = stbi_load(filename, &x, &y, &n, 0); -// // ... process data if not NULL ... -// // ... x = width, y = height, n = # 8-bit components per pixel ... -// // ... replace '0' with '1'..'4' to force that many components per pixel -// // ... but 'n' will always be the number that it would have been if you said 0 -// stbi_image_free(data) -// -// Standard parameters: -// int *x -- outputs image width in pixels -// int *y -- outputs image height in pixels -// int *comp -- outputs # of image components in image file -// int req_comp -- if non-zero, # of image components requested in result -// -// The return value from an image loader is an 'unsigned char *' which points -// to the pixel data, or NULL on an allocation failure or if the image is -// corrupt or invalid. The pixel data consists of *y scanlines of *x pixels, -// with each pixel consisting of N interleaved 8-bit components; the first -// pixel pointed to is top-left-most in the image. There is no padding between -// image scanlines or between pixels, regardless of format. The number of -// components N is 'req_comp' if req_comp is non-zero, or *comp otherwise. -// If req_comp is non-zero, *comp has the number of components that _would_ -// have been output otherwise. E.g. if you set req_comp to 4, you will always -// get RGBA output, but you can check *comp to see if it's trivially opaque -// because e.g. there were only 3 channels in the source image. -// -// An output image with N components has the following components interleaved -// in this order in each pixel: -// -// N=#comp components -// 1 grey -// 2 grey, alpha -// 3 red, green, blue -// 4 red, green, blue, alpha -// -// If image loading fails for any reason, the return value will be NULL, -// and *x, *y, *comp will be unchanged. The function stbi_failure_reason() -// can be queried for an extremely brief, end-user unfriendly explanation -// of why the load failed. Define STBI_NO_FAILURE_STRINGS to avoid -// compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly -// more user-friendly ones. -// -// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized. -// -// =========================================================================== -// -// Philosophy -// -// stb libraries are designed with the following priorities: -// -// 1. easy to use -// 2. easy to maintain -// 3. good performance -// -// Sometimes I let "good performance" creep up in priority over "easy to maintain", -// and for best performance I may provide less-easy-to-use APIs that give higher -// performance, in addition to the easy to use ones. Nevertheless, it's important -// to keep in mind that from the standpoint of you, a client of this library, -// all you care about is #1 and #3, and stb libraries do not emphasize #3 above all. -// -// Some secondary priorities arise directly from the first two, some of which -// make more explicit reasons why performance can't be emphasized. -// -// - Portable ("ease of use") -// - Small footprint ("easy to maintain") -// - No dependencies ("ease of use") -// -// =========================================================================== -// -// I/O callbacks -// -// I/O callbacks allow you to read from arbitrary sources, like packaged -// files or some other source. Data read from callbacks are processed -// through a small internal buffer (currently 128 bytes) to try to reduce -// overhead. -// -// The three functions you must define are "read" (reads some bytes of data), -// "skip" (skips some bytes of data), "eof" (reports if the stream is at the end). -// -// =========================================================================== -// -// SIMD support -// -// The JPEG decoder will try to automatically use SIMD kernels on x86 when -// supported by the compiler. For ARM Neon support, you must explicitly -// request it. -// -// (The old do-it-yourself SIMD API is no longer supported in the current -// code.) -// -// On x86, SSE2 will automatically be used when available based on a run-time -// test; if not, the generic C versions are used as a fall-back. On ARM targets, -// the typical path is to have separate builds for NEON and non-NEON devices -// (at least this is true for iOS and Android). Therefore, the NEON support is -// toggled by a build flag: define STBI_NEON to get NEON loops. -// -// The output of the JPEG decoder is slightly different from versions where -// SIMD support was introduced (that is, for versions before 1.49). The -// difference is only +-1 in the 8-bit RGB channels, and only on a small -// fraction of pixels. You can force the pre-1.49 behavior by defining -// STBI_JPEG_OLD, but this will disable some of the SIMD decoding path -// and hence cost some performance. -// -// If for some reason you do not want to use any of SIMD code, or if -// you have issues compiling it, you can disable it entirely by -// defining STBI_NO_SIMD. -// -// =========================================================================== -// -// HDR image support (disable by defining STBI_NO_HDR) -// -// stb_image now supports loading HDR images in general, and currently -// the Radiance .HDR file format, although the support is provided -// generically. You can still load any file through the existing interface; -// if you attempt to load an HDR file, it will be automatically remapped to -// LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1; -// both of these constants can be reconfigured through this interface: -// -// stbi_hdr_to_ldr_gamma(2.2f); -// stbi_hdr_to_ldr_scale(1.0f); -// -// (note, do not use _inverse_ constants; stbi_image will invert them -// appropriately). -// -// Additionally, there is a new, parallel interface for loading files as -// (linear) floats to preserve the full dynamic range: -// -// float *data = stbi_loadf(filename, &x, &y, &n, 0); -// -// If you load LDR images through this interface, those images will -// be promoted to floating point values, run through the inverse of -// constants corresponding to the above: -// -// stbi_ldr_to_hdr_scale(1.0f); -// stbi_ldr_to_hdr_gamma(2.2f); -// -// Finally, given a filename (or an open file or memory block--see header -// file for details) containing image data, you can query for the "most -// appropriate" interface to use (that is, whether the image is HDR or -// not), using: -// -// stbi_is_hdr(char *filename); -// -// =========================================================================== -// -// iPhone PNG support: -// -// By default we convert iphone-formatted PNGs back to RGB, even though -// they are internally encoded differently. You can disable this conversion -// by by calling stbi_convert_iphone_png_to_rgb(0), in which case -// you will always just get the native iphone "format" through (which -// is BGR stored in RGB). -// -// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per -// pixel to remove any premultiplied alpha *only* if the image file explicitly -// says there's premultiplied data (currently only happens in iPhone images, -// and only if iPhone convert-to-rgb processing is on). -// - - -#ifndef STBI_NO_STDIO -#include -#endif // STBI_NO_STDIO - -#define STBI_VERSION 1 - -enum -{ - STBI_default = 0, // only used for req_comp - - STBI_grey = 1, - STBI_grey_alpha = 2, - STBI_rgb = 3, - STBI_rgb_alpha = 4 -}; - -typedef unsigned char stbi_uc; - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef STB_IMAGE_STATIC -#define STBIDEF static -#else -#define STBIDEF extern -#endif - -////////////////////////////////////////////////////////////////////////////// -// -// PRIMARY API - works on images of any type -// - -// -// load image by filename, open file, or memory buffer -// - -typedef struct -{ - int (*read) (void *user,char *data,int size); // fill 'data' with 'size' bytes. return number of bytes actually read - void (*skip) (void *user,int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative - int (*eof) (void *user); // returns nonzero if we are at end of file/data -} stbi_io_callbacks; - -STBIDEF stbi_uc *stbi_load (char const *filename, int *x, int *y, int *comp, int req_comp); -STBIDEF stbi_uc *stbi_load_from_memory (stbi_uc const *buffer, int len , int *x, int *y, int *comp, int req_comp); -STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk , void *user, int *x, int *y, int *comp, int req_comp); - -#ifndef STBI_NO_STDIO -STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *comp, int req_comp); -// for stbi_load_from_file, file pointer is left pointing immediately after image -#endif - -#ifndef STBI_NO_LINEAR - STBIDEF float *stbi_loadf (char const *filename, int *x, int *y, int *comp, int req_comp); - STBIDEF float *stbi_loadf_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp); - STBIDEF float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp); - - #ifndef STBI_NO_STDIO - STBIDEF float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *comp, int req_comp); - #endif -#endif - -#ifndef STBI_NO_HDR - STBIDEF void stbi_hdr_to_ldr_gamma(float gamma); - STBIDEF void stbi_hdr_to_ldr_scale(float scale); -#endif // STBI_NO_HDR - -#ifndef STBI_NO_LINEAR - STBIDEF void stbi_ldr_to_hdr_gamma(float gamma); - STBIDEF void stbi_ldr_to_hdr_scale(float scale); -#endif // STBI_NO_LINEAR - -// stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR -STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user); -STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len); -#ifndef STBI_NO_STDIO -STBIDEF int stbi_is_hdr (char const *filename); -STBIDEF int stbi_is_hdr_from_file(FILE *f); -#endif // STBI_NO_STDIO - - -// get a VERY brief reason for failure -// NOT THREADSAFE -STBIDEF const char *stbi_failure_reason (void); - -// free the loaded image -- this is just free() -STBIDEF void stbi_image_free (void *retval_from_stbi_load); - -// get image dimensions & components without fully decoding -STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp); -STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp); - -#ifndef STBI_NO_STDIO -STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp); -STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp); - -#endif - - - -// for image formats that explicitly notate that they have premultiplied alpha, -// we just return the colors as stored in the file. set this flag to force -// unpremultiplication. results are undefined if the unpremultiply overflow. -STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply); - -// indicate whether we should process iphone images back to canonical format, -// or just pass them through "as-is" -STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert); - -// flip the image vertically, so the first pixel in the output array is the bottom left -STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip); - -// ZLIB client - used by PNG, available for other purposes - -STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen); -STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header); -STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen); -STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); - -STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen); -STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); - - -#ifdef __cplusplus -} -#endif - -// -// -//// end header file ///////////////////////////////////////////////////// -#endif // STBI_INCLUDE_STB_IMAGE_H - -#ifdef STB_IMAGE_IMPLEMENTATION - -#if defined(STBI_ONLY_JPEG) || defined(STBI_ONLY_PNG) || defined(STBI_ONLY_BMP) \ - || defined(STBI_ONLY_TGA) || defined(STBI_ONLY_GIF) || defined(STBI_ONLY_PSD) \ - || defined(STBI_ONLY_HDR) || defined(STBI_ONLY_PIC) || defined(STBI_ONLY_PNM) \ - || defined(STBI_ONLY_ZLIB) - #ifndef STBI_ONLY_JPEG - #define STBI_NO_JPEG - #endif - #ifndef STBI_ONLY_PNG - #define STBI_NO_PNG - #endif - #ifndef STBI_ONLY_BMP - #define STBI_NO_BMP - #endif - #ifndef STBI_ONLY_PSD - #define STBI_NO_PSD - #endif - #ifndef STBI_ONLY_TGA - #define STBI_NO_TGA - #endif - #ifndef STBI_ONLY_GIF - #define STBI_NO_GIF - #endif - #ifndef STBI_ONLY_HDR - #define STBI_NO_HDR - #endif - #ifndef STBI_ONLY_PIC - #define STBI_NO_PIC - #endif - #ifndef STBI_ONLY_PNM - #define STBI_NO_PNM - #endif -#endif - -#if defined(STBI_NO_PNG) && !defined(STBI_SUPPORT_ZLIB) && !defined(STBI_NO_ZLIB) -#define STBI_NO_ZLIB -#endif - - -#include -#include // ptrdiff_t on osx -#include -#include - -#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) -#include // ldexp -#endif - -#ifndef STBI_NO_STDIO -#include -#endif - -#ifndef STBI_ASSERT -#include -#define STBI_ASSERT(x) assert(x) -#endif - - -#ifndef _MSC_VER - #ifdef __cplusplus - #define stbi_inline inline - #else - #define stbi_inline - #endif -#else - #define stbi_inline __forceinline -#endif - - -#ifdef _MSC_VER -typedef unsigned short stbi__uint16; -typedef signed short stbi__int16; -typedef unsigned int stbi__uint32; -typedef signed int stbi__int32; -#else -#include -typedef uint16_t stbi__uint16; -typedef int16_t stbi__int16; -typedef uint32_t stbi__uint32; -typedef int32_t stbi__int32; -#endif - -// should produce compiler error if size is wrong -typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1]; - -#ifdef _MSC_VER -#define STBI_NOTUSED(v) (void)(v) -#else -#define STBI_NOTUSED(v) (void)sizeof(v) -#endif - -#ifdef _MSC_VER -#define STBI_HAS_LROTL -#endif - -#ifdef STBI_HAS_LROTL - #define stbi_lrot(x,y) _lrotl(x,y) -#else - #define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (32 - (y)))) -#endif - -#if defined(STBI_MALLOC) && defined(STBI_FREE) && (defined(STBI_REALLOC) || defined(STBI_REALLOC_SIZED)) -// ok -#elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC) && !defined(STBI_REALLOC_SIZED) -// ok -#else -#error "Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC (or STBI_REALLOC_SIZED)." -#endif - -#ifndef STBI_MALLOC -#define STBI_MALLOC(sz) malloc(sz) -#define STBI_REALLOC(p,newsz) realloc(p,newsz) -#define STBI_FREE(p) free(p) -#endif - -#ifndef STBI_REALLOC_SIZED -#define STBI_REALLOC_SIZED(p,oldsz,newsz) STBI_REALLOC(p,newsz) -#endif - -// x86/x64 detection -#if defined(__x86_64__) || defined(_M_X64) -#define STBI__X64_TARGET -#elif defined(__i386) || defined(_M_IX86) -#define STBI__X86_TARGET -#endif - -#if defined(__GNUC__) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET)) && !defined(__SSE2__) && !defined(STBI_NO_SIMD) -// NOTE: not clear do we actually need this for the 64-bit path? -// gcc doesn't support sse2 intrinsics unless you compile with -msse2, -// (but compiling with -msse2 allows the compiler to use SSE2 everywhere; -// this is just broken and gcc are jerks for not fixing it properly -// http://www.virtualdub.org/blog/pivot/entry.php?id=363 ) -#define STBI_NO_SIMD -#endif - -#if defined(__MINGW32__) && defined(STBI__X86_TARGET) && !defined(STBI_MINGW_ENABLE_SSE2) && !defined(STBI_NO_SIMD) -// Note that __MINGW32__ doesn't actually mean 32-bit, so we have to avoid STBI__X64_TARGET -// -// 32-bit MinGW wants ESP to be 16-byte aligned, but this is not in the -// Windows ABI and VC++ as well as Windows DLLs don't maintain that invariant. -// As a result, enabling SSE2 on 32-bit MinGW is dangerous when not -// simultaneously enabling "-mstackrealign". -// -// See https://github.com/nothings/stb/issues/81 for more information. -// -// So default to no SSE2 on 32-bit MinGW. If you've read this far and added -// -mstackrealign to your build settings, feel free to #define STBI_MINGW_ENABLE_SSE2. -#define STBI_NO_SIMD -#endif - -#if !defined(STBI_NO_SIMD) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET)) -#define STBI_SSE2 -#include - -#ifdef _MSC_VER - -#if _MSC_VER >= 1400 // not VC6 -#include // __cpuid -static int stbi__cpuid3(void) -{ - int info[4]; - __cpuid(info,1); - return info[3]; -} -#else -static int stbi__cpuid3(void) -{ - int res; - __asm { - mov eax,1 - cpuid - mov res,edx - } - return res; -} -#endif - -#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name - -static int stbi__sse2_available() -{ - int info3 = stbi__cpuid3(); - return ((info3 >> 26) & 1) != 0; -} -#else // assume GCC-style if not VC++ -#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) - -static int stbi__sse2_available() -{ -#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 // GCC 4.8 or later - // GCC 4.8+ has a nice way to do this - return __builtin_cpu_supports("sse2"); -#else - // portable way to do this, preferably without using GCC inline ASM? - // just bail for now. - return 0; -#endif -} -#endif -#endif - -// ARM NEON -#if defined(STBI_NO_SIMD) && defined(STBI_NEON) -#undef STBI_NEON -#endif - -#ifdef STBI_NEON -#include -// assume GCC or Clang on ARM targets -#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) -#endif - -#ifndef STBI_SIMD_ALIGN -#define STBI_SIMD_ALIGN(type, name) type name -#endif - -/////////////////////////////////////////////// -// -// stbi__context struct and start_xxx functions - -// stbi__context structure is our basic context used by all images, so it -// contains all the IO context, plus some basic image information -typedef struct -{ - stbi__uint32 img_x, img_y; - int img_n, img_out_n; - - stbi_io_callbacks io; - void *io_user_data; - - int read_from_callbacks; - int buflen; - stbi_uc buffer_start[128]; - - stbi_uc *img_buffer, *img_buffer_end; - stbi_uc *img_buffer_original, *img_buffer_original_end; -} stbi__context; - - -static void stbi__refill_buffer(stbi__context *s); - -// initialize a memory-decode context -static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len) -{ - s->io.read = NULL; - s->read_from_callbacks = 0; - s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer; - s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len; -} - -// initialize a callback-based context -static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user) -{ - s->io = *c; - s->io_user_data = user; - s->buflen = sizeof(s->buffer_start); - s->read_from_callbacks = 1; - s->img_buffer_original = s->buffer_start; - stbi__refill_buffer(s); - s->img_buffer_original_end = s->img_buffer_end; -} - -#ifndef STBI_NO_STDIO - -static int stbi__stdio_read(void *user, char *data, int size) -{ - return (int) fread(data,1,size,(FILE*) user); -} - -static void stbi__stdio_skip(void *user, int n) -{ - fseek((FILE*) user, n, SEEK_CUR); -} - -static int stbi__stdio_eof(void *user) -{ - return feof((FILE*) user); -} - -static stbi_io_callbacks stbi__stdio_callbacks = -{ - stbi__stdio_read, - stbi__stdio_skip, - stbi__stdio_eof, -}; - -static void stbi__start_file(stbi__context *s, FILE *f) -{ - stbi__start_callbacks(s, &stbi__stdio_callbacks, (void *) f); -} - -//static void stop_file(stbi__context *s) { } - -#endif // !STBI_NO_STDIO - -static void stbi__rewind(stbi__context *s) -{ - // conceptually rewind SHOULD rewind to the beginning of the stream, - // but we just rewind to the beginning of the initial buffer, because - // we only use it after doing 'test', which only ever looks at at most 92 bytes - s->img_buffer = s->img_buffer_original; - s->img_buffer_end = s->img_buffer_original_end; -} - -#ifndef STBI_NO_JPEG -static int stbi__jpeg_test(stbi__context *s); -static stbi_uc *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp); -static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PNG -static int stbi__png_test(stbi__context *s); -static stbi_uc *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp); -static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_BMP -static int stbi__bmp_test(stbi__context *s); -static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp); -static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_TGA -static int stbi__tga_test(stbi__context *s); -static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp); -static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PSD -static int stbi__psd_test(stbi__context *s); -static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp); -static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_HDR -static int stbi__hdr_test(stbi__context *s); -static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp); -static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PIC -static int stbi__pic_test(stbi__context *s); -static stbi_uc *stbi__pic_load(stbi__context *s, int *x, int *y, int *comp, int req_comp); -static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_GIF -static int stbi__gif_test(stbi__context *s); -static stbi_uc *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp); -static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -#ifndef STBI_NO_PNM -static int stbi__pnm_test(stbi__context *s); -static stbi_uc *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp); -static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp); -#endif - -// this is not threadsafe -static const char *stbi__g_failure_reason; - -STBIDEF const char *stbi_failure_reason(void) -{ - return stbi__g_failure_reason; -} - -static int stbi__err(const char *str) -{ - stbi__g_failure_reason = str; - return 0; -} - -static void *stbi__malloc(size_t size) -{ - return STBI_MALLOC(size); -} - -// stbi__err - error -// stbi__errpf - error returning pointer to float -// stbi__errpuc - error returning pointer to unsigned char - -#ifdef STBI_NO_FAILURE_STRINGS - #define stbi__err(x,y) 0 -#elif defined(STBI_FAILURE_USERMSG) - #define stbi__err(x,y) stbi__err(y) -#else - #define stbi__err(x,y) stbi__err(x) -#endif - -#define stbi__errpf(x,y) ((float *)(size_t) (stbi__err(x,y)?NULL:NULL)) -#define stbi__errpuc(x,y) ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL)) - -STBIDEF void stbi_image_free(void *retval_from_stbi_load) -{ - STBI_FREE(retval_from_stbi_load); -} - -#ifndef STBI_NO_LINEAR -static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp); -#endif - -#ifndef STBI_NO_HDR -static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp); -#endif - -static int stbi__vertically_flip_on_load = 0; - -STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip) -{ - stbi__vertically_flip_on_load = flag_true_if_should_flip; -} - -static unsigned char *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - #ifndef STBI_NO_JPEG - if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp); - #endif - #ifndef STBI_NO_PNG - if (stbi__png_test(s)) return stbi__png_load(s,x,y,comp,req_comp); - #endif - #ifndef STBI_NO_BMP - if (stbi__bmp_test(s)) return stbi__bmp_load(s,x,y,comp,req_comp); - #endif - #ifndef STBI_NO_GIF - if (stbi__gif_test(s)) return stbi__gif_load(s,x,y,comp,req_comp); - #endif - #ifndef STBI_NO_PSD - if (stbi__psd_test(s)) return stbi__psd_load(s,x,y,comp,req_comp); - #endif - #ifndef STBI_NO_PIC - if (stbi__pic_test(s)) return stbi__pic_load(s,x,y,comp,req_comp); - #endif - #ifndef STBI_NO_PNM - if (stbi__pnm_test(s)) return stbi__pnm_load(s,x,y,comp,req_comp); - #endif - - #ifndef STBI_NO_HDR - if (stbi__hdr_test(s)) { - float *hdr = stbi__hdr_load(s, x,y,comp,req_comp); - return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); - } - #endif - - #ifndef STBI_NO_TGA - // test tga last because it's a crappy test! - if (stbi__tga_test(s)) - return stbi__tga_load(s,x,y,comp,req_comp); - #endif - - return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); -} - -static unsigned char *stbi__load_flip(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - unsigned char *result = stbi__load_main(s, x, y, comp, req_comp); - - if (stbi__vertically_flip_on_load && result != NULL) { - int w = *x, h = *y; - int depth = req_comp ? req_comp : *comp; - int row,col,z; - stbi_uc temp; - - // @OPTIMIZE: use a bigger temp buffer and memcpy multiple pixels at once - for (row = 0; row < (h>>1); row++) { - for (col = 0; col < w; col++) { - for (z = 0; z < depth; z++) { - temp = result[(row * w + col) * depth + z]; - result[(row * w + col) * depth + z] = result[((h - row - 1) * w + col) * depth + z]; - result[((h - row - 1) * w + col) * depth + z] = temp; - } - } - } - } - - return result; -} - -#ifndef STBI_NO_HDR -static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp) -{ - if (stbi__vertically_flip_on_load && result != NULL) { - int w = *x, h = *y; - int depth = req_comp ? req_comp : *comp; - int row,col,z; - float temp; - - // @OPTIMIZE: use a bigger temp buffer and memcpy multiple pixels at once - for (row = 0; row < (h>>1); row++) { - for (col = 0; col < w; col++) { - for (z = 0; z < depth; z++) { - temp = result[(row * w + col) * depth + z]; - result[(row * w + col) * depth + z] = result[((h - row - 1) * w + col) * depth + z]; - result[((h - row - 1) * w + col) * depth + z] = temp; - } - } - } - } -} -#endif - -#ifndef STBI_NO_STDIO - -static FILE *stbi__fopen(char const *filename, char const *mode) -{ - FILE *f; -#if defined(_MSC_VER) && _MSC_VER >= 1400 - if (0 != fopen_s(&f, filename, mode)) - f=0; -#else - f = fopen(filename, mode); -#endif - return f; -} - - -STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp) -{ - FILE *f = stbi__fopen(filename, "rb"); - unsigned char *result; - if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); - result = stbi_load_from_file(f,x,y,comp,req_comp); - fclose(f); - return result; -} - -STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) -{ - unsigned char *result; - stbi__context s; - stbi__start_file(&s,f); - result = stbi__load_flip(&s,x,y,comp,req_comp); - if (result) { - // need to 'unget' all the characters in the IO buffer - fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); - } - return result; -} -#endif //!STBI_NO_STDIO - -STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__load_flip(&s,x,y,comp,req_comp); -} - -STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); - return stbi__load_flip(&s,x,y,comp,req_comp); -} - -#ifndef STBI_NO_LINEAR -static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - unsigned char *data; - #ifndef STBI_NO_HDR - if (stbi__hdr_test(s)) { - float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp); - if (hdr_data) - stbi__float_postprocess(hdr_data,x,y,comp,req_comp); - return hdr_data; - } - #endif - data = stbi__load_flip(s, x, y, comp, req_comp); - if (data) - return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp); - return stbi__errpf("unknown image type", "Image not of any known type, or corrupt"); -} - -STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__loadf_main(&s,x,y,comp,req_comp); -} - -STBIDEF float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); - return stbi__loadf_main(&s,x,y,comp,req_comp); -} - -#ifndef STBI_NO_STDIO -STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp) -{ - float *result; - FILE *f = stbi__fopen(filename, "rb"); - if (!f) return stbi__errpf("can't fopen", "Unable to open file"); - result = stbi_loadf_from_file(f,x,y,comp,req_comp); - fclose(f); - return result; -} - -STBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) -{ - stbi__context s; - stbi__start_file(&s,f); - return stbi__loadf_main(&s,x,y,comp,req_comp); -} -#endif // !STBI_NO_STDIO - -#endif // !STBI_NO_LINEAR - -// these is-hdr-or-not is defined independent of whether STBI_NO_LINEAR is -// defined, for API simplicity; if STBI_NO_LINEAR is defined, it always -// reports false! - -STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len) -{ - #ifndef STBI_NO_HDR - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__hdr_test(&s); - #else - STBI_NOTUSED(buffer); - STBI_NOTUSED(len); - return 0; - #endif -} - -#ifndef STBI_NO_STDIO -STBIDEF int stbi_is_hdr (char const *filename) -{ - FILE *f = stbi__fopen(filename, "rb"); - int result=0; - if (f) { - result = stbi_is_hdr_from_file(f); - fclose(f); - } - return result; -} - -STBIDEF int stbi_is_hdr_from_file(FILE *f) -{ - #ifndef STBI_NO_HDR - stbi__context s; - stbi__start_file(&s,f); - return stbi__hdr_test(&s); - #else - STBI_NOTUSED(f); - return 0; - #endif -} -#endif // !STBI_NO_STDIO - -STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user) -{ - #ifndef STBI_NO_HDR - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); - return stbi__hdr_test(&s); - #else - STBI_NOTUSED(clbk); - STBI_NOTUSED(user); - return 0; - #endif -} - -#ifndef STBI_NO_LINEAR -static float stbi__l2h_gamma=2.2f, stbi__l2h_scale=1.0f; - -STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; } -STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; } -#endif - -static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f; - -STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; } -STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; } - - -////////////////////////////////////////////////////////////////////////////// -// -// Common code used by all image loaders -// - -enum -{ - STBI__SCAN_load=0, - STBI__SCAN_type, - STBI__SCAN_header -}; - -static void stbi__refill_buffer(stbi__context *s) -{ - int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen); - if (n == 0) { - // at end of file, treat same as if from memory, but need to handle case - // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file - s->read_from_callbacks = 0; - s->img_buffer = s->buffer_start; - s->img_buffer_end = s->buffer_start+1; - *s->img_buffer = 0; - } else { - s->img_buffer = s->buffer_start; - s->img_buffer_end = s->buffer_start + n; - } -} - -stbi_inline static stbi_uc stbi__get8(stbi__context *s) -{ - if (s->img_buffer < s->img_buffer_end) - return *s->img_buffer++; - if (s->read_from_callbacks) { - stbi__refill_buffer(s); - return *s->img_buffer++; - } - return 0; -} - -stbi_inline static int stbi__at_eof(stbi__context *s) -{ - if (s->io.read) { - if (!(s->io.eof)(s->io_user_data)) return 0; - // if feof() is true, check if buffer = end - // special case: we've only got the special 0 character at the end - if (s->read_from_callbacks == 0) return 1; - } - - return s->img_buffer >= s->img_buffer_end; -} - -static void stbi__skip(stbi__context *s, int n) -{ - if (n < 0) { - s->img_buffer = s->img_buffer_end; - return; - } - if (s->io.read) { - int blen = (int) (s->img_buffer_end - s->img_buffer); - if (blen < n) { - s->img_buffer = s->img_buffer_end; - (s->io.skip)(s->io_user_data, n - blen); - return; - } - } - s->img_buffer += n; -} - -static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n) -{ - if (s->io.read) { - int blen = (int) (s->img_buffer_end - s->img_buffer); - if (blen < n) { - int res, count; - - memcpy(buffer, s->img_buffer, blen); - - count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen); - res = (count == (n-blen)); - s->img_buffer = s->img_buffer_end; - return res; - } - } - - if (s->img_buffer+n <= s->img_buffer_end) { - memcpy(buffer, s->img_buffer, n); - s->img_buffer += n; - return 1; - } else - return 0; -} - -static int stbi__get16be(stbi__context *s) -{ - int z = stbi__get8(s); - return (z << 8) + stbi__get8(s); -} - -static stbi__uint32 stbi__get32be(stbi__context *s) -{ - stbi__uint32 z = stbi__get16be(s); - return (z << 16) + stbi__get16be(s); -} - -#if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) -// nothing -#else -static int stbi__get16le(stbi__context *s) -{ - int z = stbi__get8(s); - return z + (stbi__get8(s) << 8); -} -#endif - -#ifndef STBI_NO_BMP -static stbi__uint32 stbi__get32le(stbi__context *s) -{ - stbi__uint32 z = stbi__get16le(s); - return z + (stbi__get16le(s) << 16); -} -#endif - -#define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings - - -////////////////////////////////////////////////////////////////////////////// -// -// generic converter from built-in img_n to req_comp -// individual types do this automatically as much as possible (e.g. jpeg -// does all cases internally since it needs to colorspace convert anyway, -// and it never has alpha, so very few cases ). png can automatically -// interleave an alpha=255 channel, but falls back to this for other cases -// -// assume data buffer is malloced, so malloc a new one and free that one -// only failure mode is malloc failing - -static stbi_uc stbi__compute_y(int r, int g, int b) -{ - return (stbi_uc) (((r*77) + (g*150) + (29*b)) >> 8); -} - -static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y) -{ - int i,j; - unsigned char *good; - - if (req_comp == img_n) return data; - STBI_ASSERT(req_comp >= 1 && req_comp <= 4); - - good = (unsigned char *) stbi__malloc(req_comp * x * y); - if (good == NULL) { - STBI_FREE(data); - return stbi__errpuc("outofmem", "Out of memory"); - } - - for (j=0; j < (int) y; ++j) { - unsigned char *src = data + j * x * img_n ; - unsigned char *dest = good + j * x * req_comp; - - #define COMBO(a,b) ((a)*8+(b)) - #define CASE(a,b) case COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) - // convert source image with img_n components to one with req_comp components; - // avoid switch per pixel, so use switch per scanline and massive macros - switch (COMBO(img_n, req_comp)) { - CASE(1,2) dest[0]=src[0], dest[1]=255; break; - CASE(1,3) dest[0]=dest[1]=dest[2]=src[0]; break; - CASE(1,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=255; break; - CASE(2,1) dest[0]=src[0]; break; - CASE(2,3) dest[0]=dest[1]=dest[2]=src[0]; break; - CASE(2,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=src[1]; break; - CASE(3,4) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2],dest[3]=255; break; - CASE(3,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break; - CASE(3,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = 255; break; - CASE(4,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break; - CASE(4,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = src[3]; break; - CASE(4,3) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2]; break; - default: STBI_ASSERT(0); - } - #undef CASE - } - - STBI_FREE(data); - return good; -} - -#ifndef STBI_NO_LINEAR -static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp) -{ - int i,k,n; - float *output = (float *) stbi__malloc(x * y * comp * sizeof(float)); - if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } - // compute number of non-alpha components - if (comp & 1) n = comp; else n = comp-1; - for (i=0; i < x*y; ++i) { - for (k=0; k < n; ++k) { - output[i*comp + k] = (float) (pow(data[i*comp+k]/255.0f, stbi__l2h_gamma) * stbi__l2h_scale); - } - if (k < comp) output[i*comp + k] = data[i*comp+k]/255.0f; - } - STBI_FREE(data); - return output; -} -#endif - -#ifndef STBI_NO_HDR -#define stbi__float2int(x) ((int) (x)) -static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp) -{ - int i,k,n; - stbi_uc *output = (stbi_uc *) stbi__malloc(x * y * comp); - if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } - // compute number of non-alpha components - if (comp & 1) n = comp; else n = comp-1; - for (i=0; i < x*y; ++i) { - for (k=0; k < n; ++k) { - float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; - if (z < 0) z = 0; - if (z > 255) z = 255; - output[i*comp + k] = (stbi_uc) stbi__float2int(z); - } - if (k < comp) { - float z = data[i*comp+k] * 255 + 0.5f; - if (z < 0) z = 0; - if (z > 255) z = 255; - output[i*comp + k] = (stbi_uc) stbi__float2int(z); - } - } - STBI_FREE(data); - return output; -} -#endif - -////////////////////////////////////////////////////////////////////////////// -// -// "baseline" JPEG/JFIF decoder -// -// simple implementation -// - doesn't support delayed output of y-dimension -// - simple interface (only one output format: 8-bit interleaved RGB) -// - doesn't try to recover corrupt jpegs -// - doesn't allow partial loading, loading multiple at once -// - still fast on x86 (copying globals into locals doesn't help x86) -// - allocates lots of intermediate memory (full size of all components) -// - non-interleaved case requires this anyway -// - allows good upsampling (see next) -// high-quality -// - upsampled channels are bilinearly interpolated, even across blocks -// - quality integer IDCT derived from IJG's 'slow' -// performance -// - fast huffman; reasonable integer IDCT -// - some SIMD kernels for common paths on targets with SSE2/NEON -// - uses a lot of intermediate memory, could cache poorly - -#ifndef STBI_NO_JPEG - -// huffman decoding acceleration -#define FAST_BITS 9 // larger handles more cases; smaller stomps less cache - -typedef struct -{ - stbi_uc fast[1 << FAST_BITS]; - // weirdly, repacking this into AoS is a 10% speed loss, instead of a win - stbi__uint16 code[256]; - stbi_uc values[256]; - stbi_uc size[257]; - unsigned int maxcode[18]; - int delta[17]; // old 'firstsymbol' - old 'firstcode' -} stbi__huffman; - -typedef struct -{ - stbi__context *s; - stbi__huffman huff_dc[4]; - stbi__huffman huff_ac[4]; - stbi_uc dequant[4][64]; - stbi__int16 fast_ac[4][1 << FAST_BITS]; - -// sizes for components, interleaved MCUs - int img_h_max, img_v_max; - int img_mcu_x, img_mcu_y; - int img_mcu_w, img_mcu_h; - -// definition of jpeg image component - struct - { - int id; - int h,v; - int tq; - int hd,ha; - int dc_pred; - - int x,y,w2,h2; - stbi_uc *data; - void *raw_data, *raw_coeff; - stbi_uc *linebuf; - short *coeff; // progressive only - int coeff_w, coeff_h; // number of 8x8 coefficient blocks - } img_comp[4]; - - stbi__uint32 code_buffer; // jpeg entropy-coded buffer - int code_bits; // number of valid bits - unsigned char marker; // marker seen while filling entropy buffer - int nomore; // flag if we saw a marker so must stop - - int progressive; - int spec_start; - int spec_end; - int succ_high; - int succ_low; - int eob_run; - int rgb; - - int scan_n, order[4]; - int restart_interval, todo; - -// kernels - void (*idct_block_kernel)(stbi_uc *out, int out_stride, short data[64]); - void (*YCbCr_to_RGB_kernel)(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step); - stbi_uc *(*resample_row_hv_2_kernel)(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs); -} stbi__jpeg; - -static int stbi__build_huffman(stbi__huffman *h, int *count) -{ - int i,j,k=0,code; - // build size list for each symbol (from JPEG spec) - for (i=0; i < 16; ++i) - for (j=0; j < count[i]; ++j) - h->size[k++] = (stbi_uc) (i+1); - h->size[k] = 0; - - // compute actual symbols (from jpeg spec) - code = 0; - k = 0; - for(j=1; j <= 16; ++j) { - // compute delta to add to code to compute symbol id - h->delta[j] = k - code; - if (h->size[k] == j) { - while (h->size[k] == j) - h->code[k++] = (stbi__uint16) (code++); - if (code-1 >= (1 << j)) return stbi__err("bad code lengths","Corrupt JPEG"); - } - // compute largest code + 1 for this size, preshifted as needed later - h->maxcode[j] = code << (16-j); - code <<= 1; - } - h->maxcode[j] = 0xffffffff; - - // build non-spec acceleration table; 255 is flag for not-accelerated - memset(h->fast, 255, 1 << FAST_BITS); - for (i=0; i < k; ++i) { - int s = h->size[i]; - if (s <= FAST_BITS) { - int c = h->code[i] << (FAST_BITS-s); - int m = 1 << (FAST_BITS-s); - for (j=0; j < m; ++j) { - h->fast[c+j] = (stbi_uc) i; - } - } - } - return 1; -} - -// build a table that decodes both magnitude and value of small ACs in -// one go. -static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h) -{ - int i; - for (i=0; i < (1 << FAST_BITS); ++i) { - stbi_uc fast = h->fast[i]; - fast_ac[i] = 0; - if (fast < 255) { - int rs = h->values[fast]; - int run = (rs >> 4) & 15; - int magbits = rs & 15; - int len = h->size[fast]; - - if (magbits && len + magbits <= FAST_BITS) { - // magnitude code followed by receive_extend code - int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); - int m = 1 << (magbits - 1); - if (k < m) k += (-1 << magbits) + 1; - // if the result is small enough, we can fit it in fast_ac table - if (k >= -128 && k <= 127) - fast_ac[i] = (stbi__int16) ((k << 8) + (run << 4) + (len + magbits)); - } - } - } -} - -static void stbi__grow_buffer_unsafe(stbi__jpeg *j) -{ - do { - int b = j->nomore ? 0 : stbi__get8(j->s); - if (b == 0xff) { - int c = stbi__get8(j->s); - if (c != 0) { - j->marker = (unsigned char) c; - j->nomore = 1; - return; - } - } - j->code_buffer |= b << (24 - j->code_bits); - j->code_bits += 8; - } while (j->code_bits <= 24); -} - -// (1 << n) - 1 -static stbi__uint32 stbi__bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535}; - -// decode a jpeg huffman value from the bitstream -stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h) -{ - unsigned int temp; - int c,k; - - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - - // look at the top FAST_BITS and determine what symbol ID it is, - // if the code is <= FAST_BITS - c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); - k = h->fast[c]; - if (k < 255) { - int s = h->size[k]; - if (s > j->code_bits) - return -1; - j->code_buffer <<= s; - j->code_bits -= s; - return h->values[k]; - } - - // naive test is to shift the code_buffer down so k bits are - // valid, then test against maxcode. To speed this up, we've - // preshifted maxcode left so that it has (16-k) 0s at the - // end; in other words, regardless of the number of bits, it - // wants to be compared against something shifted to have 16; - // that way we don't need to shift inside the loop. - temp = j->code_buffer >> 16; - for (k=FAST_BITS+1 ; ; ++k) - if (temp < h->maxcode[k]) - break; - if (k == 17) { - // error! code not found - j->code_bits -= 16; - return -1; - } - - if (k > j->code_bits) - return -1; - - // convert the huffman code to the symbol id - c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; - STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); - - // convert the id to a symbol - j->code_bits -= k; - j->code_buffer <<= k; - return h->values[c]; -} - -// bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); - - sgn = (stbi__int32)j->code_buffer >> 31; // sign bit is always in MSB - k = stbi_lrot(j->code_buffer, n); - STBI_ASSERT(n >= 0 && n < (int) (sizeof(stbi__bmask)/sizeof(*stbi__bmask))); - j->code_buffer = k & ~stbi__bmask[n]; - k &= stbi__bmask[n]; - j->code_bits -= n; - return k + (stbi__jbias[n] & ~sgn); -} - -// get some unsigned bits -stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n) -{ - unsigned int k; - if (j->code_bits < n) stbi__grow_buffer_unsafe(j); - k = stbi_lrot(j->code_buffer, n); - j->code_buffer = k & ~stbi__bmask[n]; - k &= stbi__bmask[n]; - j->code_bits -= n; - return k; -} - -stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j) -{ - unsigned int k; - if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); - k = j->code_buffer; - j->code_buffer <<= 1; - --j->code_bits; - return k & 0x80000000; -} - -// given a value that's at position X in the zigzag stream, -// where does it appear in the 8x8 matrix coded as row-major? -static stbi_uc stbi__jpeg_dezigzag[64+15] = -{ - 0, 1, 8, 16, 9, 2, 3, 10, - 17, 24, 32, 25, 18, 11, 4, 5, - 12, 19, 26, 33, 40, 48, 41, 34, - 27, 20, 13, 6, 7, 14, 21, 28, - 35, 42, 49, 56, 57, 50, 43, 36, - 29, 22, 15, 23, 30, 37, 44, 51, - 58, 59, 52, 45, 38, 31, 39, 46, - 53, 60, 61, 54, 47, 55, 62, 63, - // let corrupt input sample past end - 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63 -}; - -// decode one 64-entry block-- -static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi_uc *dequant) -{ - int diff,dc,k; - int t; - - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - t = stbi__jpeg_huff_decode(j, hdc); - if (t < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - - // 0 all the ac values now so we can do it 32-bits at a time - memset(data,0,64*sizeof(data[0])); - - diff = t ? stbi__extend_receive(j, t) : 0; - dc = j->img_comp[b].dc_pred + diff; - j->img_comp[b].dc_pred = dc; - data[0] = (short) (dc * dequant[0]); - - // decode AC components, see JPEG spec - k = 1; - do { - unsigned int zig; - int c,r,s; - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); - r = fac[c]; - if (r) { // fast-AC path - k += (r >> 4) & 15; // run - s = r & 15; // combined length - j->code_buffer <<= s; - j->code_bits -= s; - // decode into unzigzag'd location - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) ((r >> 8) * dequant[zig]); - } else { - int rs = stbi__jpeg_huff_decode(j, hac); - if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - s = rs & 15; - r = rs >> 4; - if (s == 0) { - if (rs != 0xf0) break; // end block - k += 16; - } else { - k += r; - // decode into unzigzag'd location - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) (stbi__extend_receive(j,s) * dequant[zig]); - } - } - } while (k < 64); - return 1; -} - -static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__huffman *hdc, int b) -{ - int diff,dc; - int t; - if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - - if (j->succ_high == 0) { - // first scan for DC coefficient, must be first - memset(data,0,64*sizeof(data[0])); // 0 all the ac values now - t = stbi__jpeg_huff_decode(j, hdc); - diff = t ? stbi__extend_receive(j, t) : 0; - - dc = j->img_comp[b].dc_pred + diff; - j->img_comp[b].dc_pred = dc; - data[0] = (short) (dc << j->succ_low); - } else { - // refinement scan for DC coefficient - if (stbi__jpeg_get_bit(j)) - data[0] += (short) (1 << j->succ_low); - } - return 1; -} - -// @OPTIMIZE: store non-zigzagged during the decode passes, -// and only de-zigzag when dequantizing -static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__huffman *hac, stbi__int16 *fac) -{ - int k; - if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); - - if (j->succ_high == 0) { - int shift = j->succ_low; - - if (j->eob_run) { - --j->eob_run; - return 1; - } - - k = j->spec_start; - do { - unsigned int zig; - int c,r,s; - if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); - c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); - r = fac[c]; - if (r) { // fast-AC path - k += (r >> 4) & 15; // run - s = r & 15; // combined length - j->code_buffer <<= s; - j->code_bits -= s; - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) ((r >> 8) << shift); - } else { - int rs = stbi__jpeg_huff_decode(j, hac); - if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - s = rs & 15; - r = rs >> 4; - if (s == 0) { - if (r < 15) { - j->eob_run = (1 << r); - if (r) - j->eob_run += stbi__jpeg_get_bits(j, r); - --j->eob_run; - break; - } - k += 16; - } else { - k += r; - zig = stbi__jpeg_dezigzag[k++]; - data[zig] = (short) (stbi__extend_receive(j,s) << shift); - } - } - } while (k <= j->spec_end); - } else { - // refinement scan for these AC coefficients - - short bit = (short) (1 << j->succ_low); - - if (j->eob_run) { - --j->eob_run; - for (k = j->spec_start; k <= j->spec_end; ++k) { - short *p = &data[stbi__jpeg_dezigzag[k]]; - if (*p != 0) - if (stbi__jpeg_get_bit(j)) - if ((*p & bit)==0) { - if (*p > 0) - *p += bit; - else - *p -= bit; - } - } - } else { - k = j->spec_start; - do { - int r,s; - int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh - if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); - s = rs & 15; - r = rs >> 4; - if (s == 0) { - if (r < 15) { - j->eob_run = (1 << r) - 1; - if (r) - j->eob_run += stbi__jpeg_get_bits(j, r); - r = 64; // force end of block - } else { - // r=15 s=0 should write 16 0s, so we just do - // a run of 15 0s and then write s (which is 0), - // so we don't have to do anything special here - } - } else { - if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); - // sign bit - if (stbi__jpeg_get_bit(j)) - s = bit; - else - s = -bit; - } - - // advance by r - while (k <= j->spec_end) { - short *p = &data[stbi__jpeg_dezigzag[k++]]; - if (*p != 0) { - if (stbi__jpeg_get_bit(j)) - if ((*p & bit)==0) { - if (*p > 0) - *p += bit; - else - *p -= bit; - } - } else { - if (r == 0) { - *p = (short) s; - break; - } - --r; - } - } - } while (k <= j->spec_end); - } - } - return 1; -} - -// take a -128..127 value and stbi__clamp it and convert to 0..255 -stbi_inline static stbi_uc stbi__clamp(int x) -{ - // trick to use a single test to catch both cases - if ((unsigned int) x > 255) { - if (x < 0) return 0; - if (x > 255) return 255; - } - return (stbi_uc) x; -} - -#define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) -#define stbi__fsh(x) ((x) << 12) - -// derived from jidctint -- DCT_ISLOW -#define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ - int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ - p2 = s2; \ - p3 = s6; \ - p1 = (p2+p3) * stbi__f2f(0.5411961f); \ - t2 = p1 + p3*stbi__f2f(-1.847759065f); \ - t3 = p1 + p2*stbi__f2f( 0.765366865f); \ - p2 = s0; \ - p3 = s4; \ - t0 = stbi__fsh(p2+p3); \ - t1 = stbi__fsh(p2-p3); \ - x0 = t0+t3; \ - x3 = t0-t3; \ - x1 = t1+t2; \ - x2 = t1-t2; \ - t0 = s7; \ - t1 = s5; \ - t2 = s3; \ - t3 = s1; \ - p3 = t0+t2; \ - p4 = t1+t3; \ - p1 = t0+t3; \ - p2 = t1+t2; \ - p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ - t0 = t0*stbi__f2f( 0.298631336f); \ - t1 = t1*stbi__f2f( 2.053119869f); \ - t2 = t2*stbi__f2f( 3.072711026f); \ - t3 = t3*stbi__f2f( 1.501321110f); \ - p1 = p5 + p1*stbi__f2f(-0.899976223f); \ - p2 = p5 + p2*stbi__f2f(-2.562915447f); \ - p3 = p3*stbi__f2f(-1.961570560f); \ - p4 = p4*stbi__f2f(-0.390180644f); \ - t3 += p1+p4; \ - t2 += p2+p3; \ - t1 += p2+p4; \ - t0 += p1+p3; - -static void stbi__idct_block(stbi_uc *out, int out_stride, short data[64]) -{ - int i,val[64],*v=val; - stbi_uc *o; - short *d = data; - - // columns - for (i=0; i < 8; ++i,++d, ++v) { - // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing - if (d[ 8]==0 && d[16]==0 && d[24]==0 && d[32]==0 - && d[40]==0 && d[48]==0 && d[56]==0) { - // no shortcut 0 seconds - // (1|2|3|4|5|6|7)==0 0 seconds - // all separate -0.047 seconds - // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds - int dcterm = d[0] << 2; - v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; - } else { - STBI__IDCT_1D(d[ 0],d[ 8],d[16],d[24],d[32],d[40],d[48],d[56]) - // constants scaled things up by 1<<12; let's bring them back - // down, but keep 2 extra bits of precision - x0 += 512; x1 += 512; x2 += 512; x3 += 512; - v[ 0] = (x0+t3) >> 10; - v[56] = (x0-t3) >> 10; - v[ 8] = (x1+t2) >> 10; - v[48] = (x1-t2) >> 10; - v[16] = (x2+t1) >> 10; - v[40] = (x2-t1) >> 10; - v[24] = (x3+t0) >> 10; - v[32] = (x3-t0) >> 10; - } - } - - for (i=0, v=val, o=out; i < 8; ++i,v+=8,o+=out_stride) { - // no fast case since the first 1D IDCT spread components out - STBI__IDCT_1D(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7]) - // constants scaled things up by 1<<12, plus we had 1<<2 from first - // loop, plus horizontal and vertical each scale by sqrt(8) so together - // we've got an extra 1<<3, so 1<<17 total we need to remove. - // so we want to round that, which means adding 0.5 * 1<<17, - // aka 65536. Also, we'll end up with -128 to 127 that we want - // to encode as 0..255 by adding 128, so we'll add that before the shift - x0 += 65536 + (128<<17); - x1 += 65536 + (128<<17); - x2 += 65536 + (128<<17); - x3 += 65536 + (128<<17); - // tried computing the shifts into temps, or'ing the temps to see - // if any were out of range, but that was slower - o[0] = stbi__clamp((x0+t3) >> 17); - o[7] = stbi__clamp((x0-t3) >> 17); - o[1] = stbi__clamp((x1+t2) >> 17); - o[6] = stbi__clamp((x1-t2) >> 17); - o[2] = stbi__clamp((x2+t1) >> 17); - o[5] = stbi__clamp((x2-t1) >> 17); - o[3] = stbi__clamp((x3+t0) >> 17); - o[4] = stbi__clamp((x3-t0) >> 17); - } -} - -#ifdef STBI_SSE2 -// sse2 integer IDCT. not the fastest possible implementation but it -// produces bit-identical results to the generic C version so it's -// fully "transparent". -static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) -{ - // This is constructed to match our regular (generic) integer IDCT exactly. - __m128i row0, row1, row2, row3, row4, row5, row6, row7; - __m128i tmp; - - // dot product constant: even elems=x, odd elems=y - #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) - - // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) - // out(1) = c1[even]*x + c1[odd]*y - #define dct_rot(out0,out1, x,y,c0,c1) \ - __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ - __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ - __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ - __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ - __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ - __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) - - // out = in << 12 (in 16-bit, out 32-bit) - #define dct_widen(out, in) \ - __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ - __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) - - // wide add - #define dct_wadd(out, a, b) \ - __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ - __m128i out##_h = _mm_add_epi32(a##_h, b##_h) - - // wide sub - #define dct_wsub(out, a, b) \ - __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ - __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) - - // butterfly a/b, add bias, then shift by "s" and pack - #define dct_bfly32o(out0, out1, a,b,bias,s) \ - { \ - __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ - __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ - dct_wadd(sum, abiased, b); \ - dct_wsub(dif, abiased, b); \ - out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ - out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ - } - - // 8-bit interleave step (for transposes) - #define dct_interleave8(a, b) \ - tmp = a; \ - a = _mm_unpacklo_epi8(a, b); \ - b = _mm_unpackhi_epi8(tmp, b) - - // 16-bit interleave step (for transposes) - #define dct_interleave16(a, b) \ - tmp = a; \ - a = _mm_unpacklo_epi16(a, b); \ - b = _mm_unpackhi_epi16(tmp, b) - - #define dct_pass(bias,shift) \ - { \ - /* even part */ \ - dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ - __m128i sum04 = _mm_add_epi16(row0, row4); \ - __m128i dif04 = _mm_sub_epi16(row0, row4); \ - dct_widen(t0e, sum04); \ - dct_widen(t1e, dif04); \ - dct_wadd(x0, t0e, t3e); \ - dct_wsub(x3, t0e, t3e); \ - dct_wadd(x1, t1e, t2e); \ - dct_wsub(x2, t1e, t2e); \ - /* odd part */ \ - dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ - dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ - __m128i sum17 = _mm_add_epi16(row1, row7); \ - __m128i sum35 = _mm_add_epi16(row3, row5); \ - dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ - dct_wadd(x4, y0o, y4o); \ - dct_wadd(x5, y1o, y5o); \ - dct_wadd(x6, y2o, y5o); \ - dct_wadd(x7, y3o, y4o); \ - dct_bfly32o(row0,row7, x0,x7,bias,shift); \ - dct_bfly32o(row1,row6, x1,x6,bias,shift); \ - dct_bfly32o(row2,row5, x2,x5,bias,shift); \ - dct_bfly32o(row3,row4, x3,x4,bias,shift); \ - } - - __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); - __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f( 0.765366865f), stbi__f2f(0.5411961f)); - __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); - __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); - __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f( 0.298631336f), stbi__f2f(-1.961570560f)); - __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f( 3.072711026f)); - __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f( 2.053119869f), stbi__f2f(-0.390180644f)); - __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f( 1.501321110f)); - - // rounding biases in column/row passes, see stbi__idct_block for explanation. - __m128i bias_0 = _mm_set1_epi32(512); - __m128i bias_1 = _mm_set1_epi32(65536 + (128<<17)); - - // load - row0 = _mm_load_si128((const __m128i *) (data + 0*8)); - row1 = _mm_load_si128((const __m128i *) (data + 1*8)); - row2 = _mm_load_si128((const __m128i *) (data + 2*8)); - row3 = _mm_load_si128((const __m128i *) (data + 3*8)); - row4 = _mm_load_si128((const __m128i *) (data + 4*8)); - row5 = _mm_load_si128((const __m128i *) (data + 5*8)); - row6 = _mm_load_si128((const __m128i *) (data + 6*8)); - row7 = _mm_load_si128((const __m128i *) (data + 7*8)); - - // column pass - dct_pass(bias_0, 10); - - { - // 16bit 8x8 transpose pass 1 - dct_interleave16(row0, row4); - dct_interleave16(row1, row5); - dct_interleave16(row2, row6); - dct_interleave16(row3, row7); - - // transpose pass 2 - dct_interleave16(row0, row2); - dct_interleave16(row1, row3); - dct_interleave16(row4, row6); - dct_interleave16(row5, row7); - - // transpose pass 3 - dct_interleave16(row0, row1); - dct_interleave16(row2, row3); - dct_interleave16(row4, row5); - dct_interleave16(row6, row7); - } - - // row pass - dct_pass(bias_1, 17); - - { - // pack - __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 - __m128i p1 = _mm_packus_epi16(row2, row3); - __m128i p2 = _mm_packus_epi16(row4, row5); - __m128i p3 = _mm_packus_epi16(row6, row7); - - // 8bit 8x8 transpose pass 1 - dct_interleave8(p0, p2); // a0e0a1e1... - dct_interleave8(p1, p3); // c0g0c1g1... - - // transpose pass 2 - dct_interleave8(p0, p1); // a0c0e0g0... - dct_interleave8(p2, p3); // b0d0f0h0... - - // transpose pass 3 - dct_interleave8(p0, p2); // a0b0c0d0... - dct_interleave8(p1, p3); // a4b4c4d4... - - // store - _mm_storel_epi64((__m128i *) out, p0); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; - _mm_storel_epi64((__m128i *) out, p2); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; - _mm_storel_epi64((__m128i *) out, p1); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; - _mm_storel_epi64((__m128i *) out, p3); out += out_stride; - _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p3, 0x4e)); - } - -#undef dct_const -#undef dct_rot -#undef dct_widen -#undef dct_wadd -#undef dct_wsub -#undef dct_bfly32o -#undef dct_interleave8 -#undef dct_interleave16 -#undef dct_pass -} - -#endif // STBI_SSE2 - -#ifdef STBI_NEON - -// NEON integer IDCT. should produce bit-identical -// results to the generic C version. -static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) -{ - int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; - - int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); - int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); - int16x4_t rot0_2 = vdup_n_s16(stbi__f2f( 0.765366865f)); - int16x4_t rot1_0 = vdup_n_s16(stbi__f2f( 1.175875602f)); - int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); - int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); - int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); - int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); - int16x4_t rot3_0 = vdup_n_s16(stbi__f2f( 0.298631336f)); - int16x4_t rot3_1 = vdup_n_s16(stbi__f2f( 2.053119869f)); - int16x4_t rot3_2 = vdup_n_s16(stbi__f2f( 3.072711026f)); - int16x4_t rot3_3 = vdup_n_s16(stbi__f2f( 1.501321110f)); - -#define dct_long_mul(out, inq, coeff) \ - int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ - int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) - -#define dct_long_mac(out, acc, inq, coeff) \ - int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ - int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) - -#define dct_widen(out, inq) \ - int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ - int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) - -// wide add -#define dct_wadd(out, a, b) \ - int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ - int32x4_t out##_h = vaddq_s32(a##_h, b##_h) - -// wide sub -#define dct_wsub(out, a, b) \ - int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ - int32x4_t out##_h = vsubq_s32(a##_h, b##_h) - -// butterfly a/b, then shift using "shiftop" by "s" and pack -#define dct_bfly32o(out0,out1, a,b,shiftop,s) \ - { \ - dct_wadd(sum, a, b); \ - dct_wsub(dif, a, b); \ - out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ - out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ - } - -#define dct_pass(shiftop, shift) \ - { \ - /* even part */ \ - int16x8_t sum26 = vaddq_s16(row2, row6); \ - dct_long_mul(p1e, sum26, rot0_0); \ - dct_long_mac(t2e, p1e, row6, rot0_1); \ - dct_long_mac(t3e, p1e, row2, rot0_2); \ - int16x8_t sum04 = vaddq_s16(row0, row4); \ - int16x8_t dif04 = vsubq_s16(row0, row4); \ - dct_widen(t0e, sum04); \ - dct_widen(t1e, dif04); \ - dct_wadd(x0, t0e, t3e); \ - dct_wsub(x3, t0e, t3e); \ - dct_wadd(x1, t1e, t2e); \ - dct_wsub(x2, t1e, t2e); \ - /* odd part */ \ - int16x8_t sum15 = vaddq_s16(row1, row5); \ - int16x8_t sum17 = vaddq_s16(row1, row7); \ - int16x8_t sum35 = vaddq_s16(row3, row5); \ - int16x8_t sum37 = vaddq_s16(row3, row7); \ - int16x8_t sumodd = vaddq_s16(sum17, sum35); \ - dct_long_mul(p5o, sumodd, rot1_0); \ - dct_long_mac(p1o, p5o, sum17, rot1_1); \ - dct_long_mac(p2o, p5o, sum35, rot1_2); \ - dct_long_mul(p3o, sum37, rot2_0); \ - dct_long_mul(p4o, sum15, rot2_1); \ - dct_wadd(sump13o, p1o, p3o); \ - dct_wadd(sump24o, p2o, p4o); \ - dct_wadd(sump23o, p2o, p3o); \ - dct_wadd(sump14o, p1o, p4o); \ - dct_long_mac(x4, sump13o, row7, rot3_0); \ - dct_long_mac(x5, sump24o, row5, rot3_1); \ - dct_long_mac(x6, sump23o, row3, rot3_2); \ - dct_long_mac(x7, sump14o, row1, rot3_3); \ - dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ - dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ - dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ - dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ - } - - // load - row0 = vld1q_s16(data + 0*8); - row1 = vld1q_s16(data + 1*8); - row2 = vld1q_s16(data + 2*8); - row3 = vld1q_s16(data + 3*8); - row4 = vld1q_s16(data + 4*8); - row5 = vld1q_s16(data + 5*8); - row6 = vld1q_s16(data + 6*8); - row7 = vld1q_s16(data + 7*8); - - // add DC bias - row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); - - // column pass - dct_pass(vrshrn_n_s32, 10); - - // 16bit 8x8 transpose - { -// these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. -// whether compilers actually get this is another story, sadly. -#define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } -#define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } -#define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } - - // pass 1 - dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 - dct_trn16(row2, row3); - dct_trn16(row4, row5); - dct_trn16(row6, row7); - - // pass 2 - dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 - dct_trn32(row1, row3); - dct_trn32(row4, row6); - dct_trn32(row5, row7); - - // pass 3 - dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 - dct_trn64(row1, row5); - dct_trn64(row2, row6); - dct_trn64(row3, row7); - -#undef dct_trn16 -#undef dct_trn32 -#undef dct_trn64 - } - - // row pass - // vrshrn_n_s32 only supports shifts up to 16, we need - // 17. so do a non-rounding shift of 16 first then follow - // up with a rounding shift by 1. - dct_pass(vshrn_n_s32, 16); - - { - // pack and round - uint8x8_t p0 = vqrshrun_n_s16(row0, 1); - uint8x8_t p1 = vqrshrun_n_s16(row1, 1); - uint8x8_t p2 = vqrshrun_n_s16(row2, 1); - uint8x8_t p3 = vqrshrun_n_s16(row3, 1); - uint8x8_t p4 = vqrshrun_n_s16(row4, 1); - uint8x8_t p5 = vqrshrun_n_s16(row5, 1); - uint8x8_t p6 = vqrshrun_n_s16(row6, 1); - uint8x8_t p7 = vqrshrun_n_s16(row7, 1); - - // again, these can translate into one instruction, but often don't. -#define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } -#define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } -#define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } - - // sadly can't use interleaved stores here since we only write - // 8 bytes to each scan line! - - // 8x8 8-bit transpose pass 1 - dct_trn8_8(p0, p1); - dct_trn8_8(p2, p3); - dct_trn8_8(p4, p5); - dct_trn8_8(p6, p7); - - // pass 2 - dct_trn8_16(p0, p2); - dct_trn8_16(p1, p3); - dct_trn8_16(p4, p6); - dct_trn8_16(p5, p7); - - // pass 3 - dct_trn8_32(p0, p4); - dct_trn8_32(p1, p5); - dct_trn8_32(p2, p6); - dct_trn8_32(p3, p7); - - // store - vst1_u8(out, p0); out += out_stride; - vst1_u8(out, p1); out += out_stride; - vst1_u8(out, p2); out += out_stride; - vst1_u8(out, p3); out += out_stride; - vst1_u8(out, p4); out += out_stride; - vst1_u8(out, p5); out += out_stride; - vst1_u8(out, p6); out += out_stride; - vst1_u8(out, p7); - -#undef dct_trn8_8 -#undef dct_trn8_16 -#undef dct_trn8_32 - } - -#undef dct_long_mul -#undef dct_long_mac -#undef dct_widen -#undef dct_wadd -#undef dct_wsub -#undef dct_bfly32o -#undef dct_pass -} - -#endif // STBI_NEON - -#define STBI__MARKER_none 0xff -// if there's a pending marker from the entropy stream, return that -// otherwise, fetch from the stream and get a marker. if there's no -// marker, return 0xff, which is never a valid marker value -static stbi_uc stbi__get_marker(stbi__jpeg *j) -{ - stbi_uc x; - if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } - x = stbi__get8(j->s); - if (x != 0xff) return STBI__MARKER_none; - while (x == 0xff) - x = stbi__get8(j->s); - return x; -} - -// in each scan, we'll have scan_n components, and the order -// of the components is specified by order[] -#define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) - -// after a restart interval, stbi__jpeg_reset the entropy decoder and -// the dc prediction -static void stbi__jpeg_reset(stbi__jpeg *j) -{ - j->code_bits = 0; - j->code_buffer = 0; - j->nomore = 0; - j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = 0; - j->marker = STBI__MARKER_none; - j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; - j->eob_run = 0; - // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, - // since we don't even allow 1<<30 pixels -} - -static int stbi__parse_entropy_coded_data(stbi__jpeg *z) -{ - stbi__jpeg_reset(z); - if (!z->progressive) { - if (z->scan_n == 1) { - int i,j; - STBI_SIMD_ALIGN(short, data[64]); - int n = z->order[0]; - // non-interleaved data, we just need to process one block at a time, - // in trivial scanline order - // number of blocks to do just depends on how many actual "pixels" this - // component has, independent of interleaved MCU blocking and such - int w = (z->img_comp[n].x+7) >> 3; - int h = (z->img_comp[n].y+7) >> 3; - for (j=0; j < h; ++j) { - for (i=0; i < w; ++i) { - int ha = z->img_comp[n].ha; - if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); - // every data block is an MCU, so countdown the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - // if it's NOT a restart, then just bail, so we get corrupt data - // rather than no data - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } else { // interleaved - int i,j,k,x,y; - STBI_SIMD_ALIGN(short, data[64]); - for (j=0; j < z->img_mcu_y; ++j) { - for (i=0; i < z->img_mcu_x; ++i) { - // scan an interleaved mcu... process scan_n components in order - for (k=0; k < z->scan_n; ++k) { - int n = z->order[k]; - // scan out an mcu's worth of this component; that's just determined - // by the basic H and V specified for the component - for (y=0; y < z->img_comp[n].v; ++y) { - for (x=0; x < z->img_comp[n].h; ++x) { - int x2 = (i*z->img_comp[n].h + x)*8; - int y2 = (j*z->img_comp[n].v + y)*8; - int ha = z->img_comp[n].ha; - if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; - z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data); - } - } - } - // after all interleaved components, that's an interleaved MCU, - // so now count down the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } - } else { - if (z->scan_n == 1) { - int i,j; - int n = z->order[0]; - // non-interleaved data, we just need to process one block at a time, - // in trivial scanline order - // number of blocks to do just depends on how many actual "pixels" this - // component has, independent of interleaved MCU blocking and such - int w = (z->img_comp[n].x+7) >> 3; - int h = (z->img_comp[n].y+7) >> 3; - for (j=0; j < h; ++j) { - for (i=0; i < w; ++i) { - short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - if (z->spec_start == 0) { - if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) - return 0; - } else { - int ha = z->img_comp[n].ha; - if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) - return 0; - } - // every data block is an MCU, so countdown the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } else { // interleaved - int i,j,k,x,y; - for (j=0; j < z->img_mcu_y; ++j) { - for (i=0; i < z->img_mcu_x; ++i) { - // scan an interleaved mcu... process scan_n components in order - for (k=0; k < z->scan_n; ++k) { - int n = z->order[k]; - // scan out an mcu's worth of this component; that's just determined - // by the basic H and V specified for the component - for (y=0; y < z->img_comp[n].v; ++y) { - for (x=0; x < z->img_comp[n].h; ++x) { - int x2 = (i*z->img_comp[n].h + x); - int y2 = (j*z->img_comp[n].v + y); - short *data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); - if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) - return 0; - } - } - } - // after all interleaved components, that's an interleaved MCU, - // so now count down the restart interval - if (--z->todo <= 0) { - if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); - if (!STBI__RESTART(z->marker)) return 1; - stbi__jpeg_reset(z); - } - } - } - return 1; - } - } -} - -static void stbi__jpeg_dequantize(short *data, stbi_uc *dequant) -{ - int i; - for (i=0; i < 64; ++i) - data[i] *= dequant[i]; -} - -static void stbi__jpeg_finish(stbi__jpeg *z) -{ - if (z->progressive) { - // dequantize and idct the data - int i,j,n; - for (n=0; n < z->s->img_n; ++n) { - int w = (z->img_comp[n].x+7) >> 3; - int h = (z->img_comp[n].y+7) >> 3; - for (j=0; j < h; ++j) { - for (i=0; i < w; ++i) { - short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); - stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); - z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); - } - } - } - } -} - -static int stbi__process_marker(stbi__jpeg *z, int m) -{ - int L; - switch (m) { - case STBI__MARKER_none: // no marker found - return stbi__err("expected marker","Corrupt JPEG"); - - case 0xDD: // DRI - specify restart interval - if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len","Corrupt JPEG"); - z->restart_interval = stbi__get16be(z->s); - return 1; - - case 0xDB: // DQT - define quantization table - L = stbi__get16be(z->s)-2; - while (L > 0) { - int q = stbi__get8(z->s); - int p = q >> 4; - int t = q & 15,i; - if (p != 0) return stbi__err("bad DQT type","Corrupt JPEG"); - if (t > 3) return stbi__err("bad DQT table","Corrupt JPEG"); - for (i=0; i < 64; ++i) - z->dequant[t][stbi__jpeg_dezigzag[i]] = stbi__get8(z->s); - L -= 65; - } - return L==0; - - case 0xC4: // DHT - define huffman table - L = stbi__get16be(z->s)-2; - while (L > 0) { - stbi_uc *v; - int sizes[16],i,n=0; - int q = stbi__get8(z->s); - int tc = q >> 4; - int th = q & 15; - if (tc > 1 || th > 3) return stbi__err("bad DHT header","Corrupt JPEG"); - for (i=0; i < 16; ++i) { - sizes[i] = stbi__get8(z->s); - n += sizes[i]; - } - L -= 17; - if (tc == 0) { - if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0; - v = z->huff_dc[th].values; - } else { - if (!stbi__build_huffman(z->huff_ac+th, sizes)) return 0; - v = z->huff_ac[th].values; - } - for (i=0; i < n; ++i) - v[i] = stbi__get8(z->s); - if (tc != 0) - stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); - L -= n; - } - return L==0; - } - // check for comment block or APP blocks - if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { - stbi__skip(z->s, stbi__get16be(z->s)-2); - return 1; - } - return 0; -} - -// after we see SOS -static int stbi__process_scan_header(stbi__jpeg *z) -{ - int i; - int Ls = stbi__get16be(z->s); - z->scan_n = stbi__get8(z->s); - if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return stbi__err("bad SOS component count","Corrupt JPEG"); - if (Ls != 6+2*z->scan_n) return stbi__err("bad SOS len","Corrupt JPEG"); - for (i=0; i < z->scan_n; ++i) { - int id = stbi__get8(z->s), which; - int q = stbi__get8(z->s); - for (which = 0; which < z->s->img_n; ++which) - if (z->img_comp[which].id == id) - break; - if (which == z->s->img_n) return 0; // no match - z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff","Corrupt JPEG"); - z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff","Corrupt JPEG"); - z->order[i] = which; - } - - { - int aa; - z->spec_start = stbi__get8(z->s); - z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 - aa = stbi__get8(z->s); - z->succ_high = (aa >> 4); - z->succ_low = (aa & 15); - if (z->progressive) { - if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) - return stbi__err("bad SOS", "Corrupt JPEG"); - } else { - if (z->spec_start != 0) return stbi__err("bad SOS","Corrupt JPEG"); - if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS","Corrupt JPEG"); - z->spec_end = 63; - } - } - - return 1; -} - -static int stbi__process_frame_header(stbi__jpeg *z, int scan) -{ - stbi__context *s = z->s; - int Lf,p,i,q, h_max=1,v_max=1,c; - Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len","Corrupt JPEG"); // JPEG - p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit","JPEG format not supported: 8-bit only"); // JPEG baseline - s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG - s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width","Corrupt JPEG"); // JPEG requires - c = stbi__get8(s); - if (c != 3 && c != 1) return stbi__err("bad component count","Corrupt JPEG"); // JFIF requires - s->img_n = c; - for (i=0; i < c; ++i) { - z->img_comp[i].data = NULL; - z->img_comp[i].linebuf = NULL; - } - - if (Lf != 8+3*s->img_n) return stbi__err("bad SOF len","Corrupt JPEG"); - - z->rgb = 0; - for (i=0; i < s->img_n; ++i) { - static unsigned char rgb[3] = { 'R', 'G', 'B' }; - z->img_comp[i].id = stbi__get8(s); - if (z->img_comp[i].id != i+1) // JFIF requires - if (z->img_comp[i].id != i) { // some version of jpegtran outputs non-JFIF-compliant files! - // somethings output this (see http://fileformats.archiveteam.org/wiki/JPEG#Color_format) - if (z->img_comp[i].id != rgb[i]) - return stbi__err("bad component ID","Corrupt JPEG"); - ++z->rgb; - } - q = stbi__get8(s); - z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H","Corrupt JPEG"); - z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V","Corrupt JPEG"); - z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ","Corrupt JPEG"); - } - - if (scan != STBI__SCAN_load) return 1; - - if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); - - for (i=0; i < s->img_n; ++i) { - if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; - if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; - } - - // compute interleaved mcu info - z->img_h_max = h_max; - z->img_v_max = v_max; - z->img_mcu_w = h_max * 8; - z->img_mcu_h = v_max * 8; - z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w; - z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h; - - for (i=0; i < s->img_n; ++i) { - // number of effective pixels (e.g. for non-interleaved MCU) - z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max; - z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max; - // to simplify generation, we'll allocate enough memory to decode - // the bogus oversized data from using interleaved MCUs and their - // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't - // discard the extra data until colorspace conversion - z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; - z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; - z->img_comp[i].raw_data = stbi__malloc(z->img_comp[i].w2 * z->img_comp[i].h2+15); - - if (z->img_comp[i].raw_data == NULL) { - for(--i; i >= 0; --i) { - STBI_FREE(z->img_comp[i].raw_data); - z->img_comp[i].raw_data = NULL; - } - return stbi__err("outofmem", "Out of memory"); - } - // align blocks for idct using mmx/sse - z->img_comp[i].data = (stbi_uc*) (((size_t) z->img_comp[i].raw_data + 15) & ~15); - z->img_comp[i].linebuf = NULL; - if (z->progressive) { - z->img_comp[i].coeff_w = (z->img_comp[i].w2 + 7) >> 3; - z->img_comp[i].coeff_h = (z->img_comp[i].h2 + 7) >> 3; - z->img_comp[i].raw_coeff = STBI_MALLOC(z->img_comp[i].coeff_w * z->img_comp[i].coeff_h * 64 * sizeof(short) + 15); - z->img_comp[i].coeff = (short*) (((size_t) z->img_comp[i].raw_coeff + 15) & ~15); - } else { - z->img_comp[i].coeff = 0; - z->img_comp[i].raw_coeff = 0; - } - } - - return 1; -} - -// use comparisons since in some cases we handle more than one case (e.g. SOF) -#define stbi__DNL(x) ((x) == 0xdc) -#define stbi__SOI(x) ((x) == 0xd8) -#define stbi__EOI(x) ((x) == 0xd9) -#define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) -#define stbi__SOS(x) ((x) == 0xda) - -#define stbi__SOF_progressive(x) ((x) == 0xc2) - -static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan) -{ - int m; - z->marker = STBI__MARKER_none; // initialize cached marker to empty - m = stbi__get_marker(z); - if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG"); - if (scan == STBI__SCAN_type) return 1; - m = stbi__get_marker(z); - while (!stbi__SOF(m)) { - if (!stbi__process_marker(z,m)) return 0; - m = stbi__get_marker(z); - while (m == STBI__MARKER_none) { - // some files have extra padding after their blocks, so ok, we'll scan - if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); - m = stbi__get_marker(z); - } - } - z->progressive = stbi__SOF_progressive(m); - if (!stbi__process_frame_header(z, scan)) return 0; - return 1; -} - -// decode image to YCbCr format -static int stbi__decode_jpeg_image(stbi__jpeg *j) -{ - int m; - for (m = 0; m < 4; m++) { - j->img_comp[m].raw_data = NULL; - j->img_comp[m].raw_coeff = NULL; - } - j->restart_interval = 0; - if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; - m = stbi__get_marker(j); - while (!stbi__EOI(m)) { - if (stbi__SOS(m)) { - if (!stbi__process_scan_header(j)) return 0; - if (!stbi__parse_entropy_coded_data(j)) return 0; - if (j->marker == STBI__MARKER_none ) { - // handle 0s at the end of image data from IP Kamera 9060 - while (!stbi__at_eof(j->s)) { - int x = stbi__get8(j->s); - if (x == 255) { - j->marker = stbi__get8(j->s); - break; - } else if (x != 0) { - return stbi__err("junk before marker", "Corrupt JPEG"); - } - } - // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 - } - } else { - if (!stbi__process_marker(j, m)) return 0; - } - m = stbi__get_marker(j); - } - if (j->progressive) - stbi__jpeg_finish(j); - return 1; -} - -// static jfif-centered resampling (across block boundaries) - -typedef stbi_uc *(*resample_row_func)(stbi_uc *out, stbi_uc *in0, stbi_uc *in1, - int w, int hs); - -#define stbi__div4(x) ((stbi_uc) ((x) >> 2)) - -static stbi_uc *resample_row_1(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - STBI_NOTUSED(out); - STBI_NOTUSED(in_far); - STBI_NOTUSED(w); - STBI_NOTUSED(hs); - return in_near; -} - -static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate two samples vertically for every one in input - int i; - STBI_NOTUSED(hs); - for (i=0; i < w; ++i) - out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2); - return out; -} - -static stbi_uc* stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate two samples horizontally for every one in input - int i; - stbi_uc *input = in_near; - - if (w == 1) { - // if only one sample, can't do any interpolation - out[0] = out[1] = input[0]; - return out; - } - - out[0] = input[0]; - out[1] = stbi__div4(input[0]*3 + input[1] + 2); - for (i=1; i < w-1; ++i) { - int n = 3*input[i]+2; - out[i*2+0] = stbi__div4(n+input[i-1]); - out[i*2+1] = stbi__div4(n+input[i+1]); - } - out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2); - out[i*2+1] = input[w-1]; - - STBI_NOTUSED(in_far); - STBI_NOTUSED(hs); - - return out; -} - -#define stbi__div16(x) ((stbi_uc) ((x) >> 4)) - -static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate 2x2 samples for every one in input - int i,t0,t1; - if (w == 1) { - out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); - return out; - } - - t1 = 3*in_near[0] + in_far[0]; - out[0] = stbi__div4(t1+2); - for (i=1; i < w; ++i) { - t0 = t1; - t1 = 3*in_near[i]+in_far[i]; - out[i*2-1] = stbi__div16(3*t0 + t1 + 8); - out[i*2 ] = stbi__div16(3*t1 + t0 + 8); - } - out[w*2-1] = stbi__div4(t1+2); - - STBI_NOTUSED(hs); - - return out; -} - -#if defined(STBI_SSE2) || defined(STBI_NEON) -static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // need to generate 2x2 samples for every one in input - int i=0,t0,t1; - - if (w == 1) { - out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); - return out; - } - - t1 = 3*in_near[0] + in_far[0]; - // process groups of 8 pixels for as long as we can. - // note we can't handle the last pixel in a row in this loop - // because we need to handle the filter boundary conditions. - for (; i < ((w-1) & ~7); i += 8) { -#if defined(STBI_SSE2) - // load and perform the vertical filtering pass - // this uses 3*x + y = 4*x + (y - x) - __m128i zero = _mm_setzero_si128(); - __m128i farb = _mm_loadl_epi64((__m128i *) (in_far + i)); - __m128i nearb = _mm_loadl_epi64((__m128i *) (in_near + i)); - __m128i farw = _mm_unpacklo_epi8(farb, zero); - __m128i nearw = _mm_unpacklo_epi8(nearb, zero); - __m128i diff = _mm_sub_epi16(farw, nearw); - __m128i nears = _mm_slli_epi16(nearw, 2); - __m128i curr = _mm_add_epi16(nears, diff); // current row - - // horizontal filter works the same based on shifted vers of current - // row. "prev" is current row shifted right by 1 pixel; we need to - // insert the previous pixel value (from t1). - // "next" is current row shifted left by 1 pixel, with first pixel - // of next block of 8 pixels added in. - __m128i prv0 = _mm_slli_si128(curr, 2); - __m128i nxt0 = _mm_srli_si128(curr, 2); - __m128i prev = _mm_insert_epi16(prv0, t1, 0); - __m128i next = _mm_insert_epi16(nxt0, 3*in_near[i+8] + in_far[i+8], 7); - - // horizontal filter, polyphase implementation since it's convenient: - // even pixels = 3*cur + prev = cur*4 + (prev - cur) - // odd pixels = 3*cur + next = cur*4 + (next - cur) - // note the shared term. - __m128i bias = _mm_set1_epi16(8); - __m128i curs = _mm_slli_epi16(curr, 2); - __m128i prvd = _mm_sub_epi16(prev, curr); - __m128i nxtd = _mm_sub_epi16(next, curr); - __m128i curb = _mm_add_epi16(curs, bias); - __m128i even = _mm_add_epi16(prvd, curb); - __m128i odd = _mm_add_epi16(nxtd, curb); - - // interleave even and odd pixels, then undo scaling. - __m128i int0 = _mm_unpacklo_epi16(even, odd); - __m128i int1 = _mm_unpackhi_epi16(even, odd); - __m128i de0 = _mm_srli_epi16(int0, 4); - __m128i de1 = _mm_srli_epi16(int1, 4); - - // pack and write output - __m128i outv = _mm_packus_epi16(de0, de1); - _mm_storeu_si128((__m128i *) (out + i*2), outv); -#elif defined(STBI_NEON) - // load and perform the vertical filtering pass - // this uses 3*x + y = 4*x + (y - x) - uint8x8_t farb = vld1_u8(in_far + i); - uint8x8_t nearb = vld1_u8(in_near + i); - int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); - int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); - int16x8_t curr = vaddq_s16(nears, diff); // current row - - // horizontal filter works the same based on shifted vers of current - // row. "prev" is current row shifted right by 1 pixel; we need to - // insert the previous pixel value (from t1). - // "next" is current row shifted left by 1 pixel, with first pixel - // of next block of 8 pixels added in. - int16x8_t prv0 = vextq_s16(curr, curr, 7); - int16x8_t nxt0 = vextq_s16(curr, curr, 1); - int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); - int16x8_t next = vsetq_lane_s16(3*in_near[i+8] + in_far[i+8], nxt0, 7); - - // horizontal filter, polyphase implementation since it's convenient: - // even pixels = 3*cur + prev = cur*4 + (prev - cur) - // odd pixels = 3*cur + next = cur*4 + (next - cur) - // note the shared term. - int16x8_t curs = vshlq_n_s16(curr, 2); - int16x8_t prvd = vsubq_s16(prev, curr); - int16x8_t nxtd = vsubq_s16(next, curr); - int16x8_t even = vaddq_s16(curs, prvd); - int16x8_t odd = vaddq_s16(curs, nxtd); - - // undo scaling and round, then store with even/odd phases interleaved - uint8x8x2_t o; - o.val[0] = vqrshrun_n_s16(even, 4); - o.val[1] = vqrshrun_n_s16(odd, 4); - vst2_u8(out + i*2, o); -#endif - - // "previous" value for next iter - t1 = 3*in_near[i+7] + in_far[i+7]; - } - - t0 = t1; - t1 = 3*in_near[i] + in_far[i]; - out[i*2] = stbi__div16(3*t1 + t0 + 8); - - for (++i; i < w; ++i) { - t0 = t1; - t1 = 3*in_near[i]+in_far[i]; - out[i*2-1] = stbi__div16(3*t0 + t1 + 8); - out[i*2 ] = stbi__div16(3*t1 + t0 + 8); - } - out[w*2-1] = stbi__div4(t1+2); - - STBI_NOTUSED(hs); - - return out; -} -#endif - -static stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) -{ - // resample with nearest-neighbor - int i,j; - STBI_NOTUSED(in_far); - for (i=0; i < w; ++i) - for (j=0; j < hs; ++j) - out[i*hs+j] = in_near[i]; - return out; -} - -#ifdef STBI_JPEG_OLD -// this is the same YCbCr-to-RGB calculation that stb_image has used -// historically before the algorithm changes in 1.49 -#define float2fixed(x) ((int) ((x) * 65536 + 0.5)) -static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step) -{ - int i; - for (i=0; i < count; ++i) { - int y_fixed = (y[i] << 16) + 32768; // rounding - int r,g,b; - int cr = pcr[i] - 128; - int cb = pcb[i] - 128; - r = y_fixed + cr*float2fixed(1.40200f); - g = y_fixed - cr*float2fixed(0.71414f) - cb*float2fixed(0.34414f); - b = y_fixed + cb*float2fixed(1.77200f); - r >>= 16; - g >>= 16; - b >>= 16; - if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } - if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } - if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } - out[0] = (stbi_uc)r; - out[1] = (stbi_uc)g; - out[2] = (stbi_uc)b; - out[3] = 255; - out += step; - } -} -#else -// this is a reduced-precision calculation of YCbCr-to-RGB introduced -// to make sure the code produces the same results in both SIMD and scalar -#define float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) -static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step) -{ - int i; - for (i=0; i < count; ++i) { - int y_fixed = (y[i] << 20) + (1<<19); // rounding - int r,g,b; - int cr = pcr[i] - 128; - int cb = pcb[i] - 128; - r = y_fixed + cr* float2fixed(1.40200f); - g = y_fixed + (cr*-float2fixed(0.71414f)) + ((cb*-float2fixed(0.34414f)) & 0xffff0000); - b = y_fixed + cb* float2fixed(1.77200f); - r >>= 20; - g >>= 20; - b >>= 20; - if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } - if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } - if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } - out[0] = (stbi_uc)r; - out[1] = (stbi_uc)g; - out[2] = (stbi_uc)b; - out[3] = 255; - out += step; - } -} -#endif - -#if defined(STBI_SSE2) || defined(STBI_NEON) -static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step) -{ - int i = 0; - -#ifdef STBI_SSE2 - // step == 3 is pretty ugly on the final interleave, and i'm not convinced - // it's useful in practice (you wouldn't use it for textures, for example). - // so just accelerate step == 4 case. - if (step == 4) { - // this is a fairly straightforward implementation and not super-optimized. - __m128i signflip = _mm_set1_epi8(-0x80); - __m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f)); - __m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f)); - __m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f)); - __m128i cb_const1 = _mm_set1_epi16( (short) ( 1.77200f*4096.0f+0.5f)); - __m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128); - __m128i xw = _mm_set1_epi16(255); // alpha channel - - for (; i+7 < count; i += 8) { - // load - __m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i)); - __m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i)); - __m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i)); - __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 - __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 - - // unpack to short (and left-shift cr, cb by 8) - __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); - __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); - __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); - - // color transform - __m128i yws = _mm_srli_epi16(yw, 4); - __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); - __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); - __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); - __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); - __m128i rws = _mm_add_epi16(cr0, yws); - __m128i gwt = _mm_add_epi16(cb0, yws); - __m128i bws = _mm_add_epi16(yws, cb1); - __m128i gws = _mm_add_epi16(gwt, cr1); - - // descale - __m128i rw = _mm_srai_epi16(rws, 4); - __m128i bw = _mm_srai_epi16(bws, 4); - __m128i gw = _mm_srai_epi16(gws, 4); - - // back to byte, set up for transpose - __m128i brb = _mm_packus_epi16(rw, bw); - __m128i gxb = _mm_packus_epi16(gw, xw); - - // transpose to interleave channels - __m128i t0 = _mm_unpacklo_epi8(brb, gxb); - __m128i t1 = _mm_unpackhi_epi8(brb, gxb); - __m128i o0 = _mm_unpacklo_epi16(t0, t1); - __m128i o1 = _mm_unpackhi_epi16(t0, t1); - - // store - _mm_storeu_si128((__m128i *) (out + 0), o0); - _mm_storeu_si128((__m128i *) (out + 16), o1); - out += 32; - } - } -#endif - -#ifdef STBI_NEON - // in this version, step=3 support would be easy to add. but is there demand? - if (step == 4) { - // this is a fairly straightforward implementation and not super-optimized. - uint8x8_t signflip = vdup_n_u8(0x80); - int16x8_t cr_const0 = vdupq_n_s16( (short) ( 1.40200f*4096.0f+0.5f)); - int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f)); - int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f)); - int16x8_t cb_const1 = vdupq_n_s16( (short) ( 1.77200f*4096.0f+0.5f)); - - for (; i+7 < count; i += 8) { - // load - uint8x8_t y_bytes = vld1_u8(y + i); - uint8x8_t cr_bytes = vld1_u8(pcr + i); - uint8x8_t cb_bytes = vld1_u8(pcb + i); - int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); - int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); - - // expand to s16 - int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); - int16x8_t crw = vshll_n_s8(cr_biased, 7); - int16x8_t cbw = vshll_n_s8(cb_biased, 7); - - // color transform - int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); - int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); - int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); - int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); - int16x8_t rws = vaddq_s16(yws, cr0); - int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); - int16x8_t bws = vaddq_s16(yws, cb1); - - // undo scaling, round, convert to byte - uint8x8x4_t o; - o.val[0] = vqrshrun_n_s16(rws, 4); - o.val[1] = vqrshrun_n_s16(gws, 4); - o.val[2] = vqrshrun_n_s16(bws, 4); - o.val[3] = vdup_n_u8(255); - - // store, interleaving r/g/b/a - vst4_u8(out, o); - out += 8*4; - } - } -#endif - - for (; i < count; ++i) { - int y_fixed = (y[i] << 20) + (1<<19); // rounding - int r,g,b; - int cr = pcr[i] - 128; - int cb = pcb[i] - 128; - r = y_fixed + cr* float2fixed(1.40200f); - g = y_fixed + cr*-float2fixed(0.71414f) + ((cb*-float2fixed(0.34414f)) & 0xffff0000); - b = y_fixed + cb* float2fixed(1.77200f); - r >>= 20; - g >>= 20; - b >>= 20; - if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } - if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } - if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } - out[0] = (stbi_uc)r; - out[1] = (stbi_uc)g; - out[2] = (stbi_uc)b; - out[3] = 255; - out += step; - } -} -#endif - -// set up the kernels -static void stbi__setup_jpeg(stbi__jpeg *j) -{ - j->idct_block_kernel = stbi__idct_block; - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; - -#ifdef STBI_SSE2 - if (stbi__sse2_available()) { - j->idct_block_kernel = stbi__idct_simd; - #ifndef STBI_JPEG_OLD - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - #endif - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; - } -#endif - -#ifdef STBI_NEON - j->idct_block_kernel = stbi__idct_simd; - #ifndef STBI_JPEG_OLD - j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; - #endif - j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; -#endif -} - -// clean up the temporary component buffers -static void stbi__cleanup_jpeg(stbi__jpeg *j) -{ - int i; - for (i=0; i < j->s->img_n; ++i) { - if (j->img_comp[i].raw_data) { - STBI_FREE(j->img_comp[i].raw_data); - j->img_comp[i].raw_data = NULL; - j->img_comp[i].data = NULL; - } - if (j->img_comp[i].raw_coeff) { - STBI_FREE(j->img_comp[i].raw_coeff); - j->img_comp[i].raw_coeff = 0; - j->img_comp[i].coeff = 0; - } - if (j->img_comp[i].linebuf) { - STBI_FREE(j->img_comp[i].linebuf); - j->img_comp[i].linebuf = NULL; - } - } -} - -typedef struct -{ - resample_row_func resample; - stbi_uc *line0,*line1; - int hs,vs; // expansion factor in each axis - int w_lores; // horizontal pixels pre-expansion - int ystep; // how far through vertical expansion we are - int ypos; // which pre-expansion row we're on -} stbi__resample; - -static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp, int req_comp) -{ - int n, decode_n; - z->s->img_n = 0; // make stbi__cleanup_jpeg safe - - // validate req_comp - if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - - // load a jpeg image from whichever source, but leave in YCbCr format - if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } - - // determine actual number of components to generate - n = req_comp ? req_comp : z->s->img_n; - - if (z->s->img_n == 3 && n < 3) - decode_n = 1; - else - decode_n = z->s->img_n; - - // resample and color-convert - { - int k; - unsigned int i,j; - stbi_uc *output; - stbi_uc *coutput[4]; - - stbi__resample res_comp[4]; - - for (k=0; k < decode_n; ++k) { - stbi__resample *r = &res_comp[k]; - - // allocate line buffer big enough for upsampling off the edges - // with upsample factor of 4 - z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3); - if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - - r->hs = z->img_h_max / z->img_comp[k].h; - r->vs = z->img_v_max / z->img_comp[k].v; - r->ystep = r->vs >> 1; - r->w_lores = (z->s->img_x + r->hs-1) / r->hs; - r->ypos = 0; - r->line0 = r->line1 = z->img_comp[k].data; - - if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; - else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; - else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; - else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; - else r->resample = stbi__resample_row_generic; - } - - // can't error after this so, this is safe - output = (stbi_uc *) stbi__malloc(n * z->s->img_x * z->s->img_y + 1); - if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } - - // now go ahead and resample - for (j=0; j < z->s->img_y; ++j) { - stbi_uc *out = output + n * z->s->img_x * j; - for (k=0; k < decode_n; ++k) { - stbi__resample *r = &res_comp[k]; - int y_bot = r->ystep >= (r->vs >> 1); - coutput[k] = r->resample(z->img_comp[k].linebuf, - y_bot ? r->line1 : r->line0, - y_bot ? r->line0 : r->line1, - r->w_lores, r->hs); - if (++r->ystep >= r->vs) { - r->ystep = 0; - r->line0 = r->line1; - if (++r->ypos < z->img_comp[k].y) - r->line1 += z->img_comp[k].w2; - } - } - if (n >= 3) { - stbi_uc *y = coutput[0]; - if (z->s->img_n == 3) { - if (z->rgb == 3) { - for (i=0; i < z->s->img_x; ++i) { - out[0] = y[i]; - out[1] = coutput[1][i]; - out[2] = coutput[2][i]; - out[3] = 255; - out += n; - } - } else { - z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); - } - } else - for (i=0; i < z->s->img_x; ++i) { - out[0] = out[1] = out[2] = y[i]; - out[3] = 255; // not used if n==3 - out += n; - } - } else { - stbi_uc *y = coutput[0]; - if (n == 1) - for (i=0; i < z->s->img_x; ++i) out[i] = y[i]; - else - for (i=0; i < z->s->img_x; ++i) *out++ = y[i], *out++ = 255; - } - } - stbi__cleanup_jpeg(z); - *out_x = z->s->img_x; - *out_y = z->s->img_y; - if (comp) *comp = z->s->img_n; // report original components, not output - return output; - } -} - -static unsigned char *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - unsigned char* result; - stbi__jpeg* j = (stbi__jpeg*) stbi__malloc(sizeof(stbi__jpeg)); - j->s = s; - stbi__setup_jpeg(j); - result = load_jpeg_image(j, x,y,comp,req_comp); - STBI_FREE(j); - return result; -} - -static int stbi__jpeg_test(stbi__context *s) -{ - int r; - stbi__jpeg j; - j.s = s; - stbi__setup_jpeg(&j); - r = stbi__decode_jpeg_header(&j, STBI__SCAN_type); - stbi__rewind(s); - return r; -} - -static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp) -{ - if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { - stbi__rewind( j->s ); - return 0; - } - if (x) *x = j->s->img_x; - if (y) *y = j->s->img_y; - if (comp) *comp = j->s->img_n; - return 1; -} - -static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) -{ - int result; - stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg))); - j->s = s; - result = stbi__jpeg_info_raw(j, x, y, comp); - STBI_FREE(j); - return result; -} -#endif - -// public domain zlib decode v0.2 Sean Barrett 2006-11-18 -// simple implementation -// - all input must be provided in an upfront buffer -// - all output is written to a single output buffer (can malloc/realloc) -// performance -// - fast huffman - -#ifndef STBI_NO_ZLIB - -// fast-way is faster to check than jpeg huffman, but slow way is slower -#define STBI__ZFAST_BITS 9 // accelerate all cases in default tables -#define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) - -// zlib-style huffman encoding -// (jpegs packs from left, zlib from right, so can't share code) -typedef struct -{ - stbi__uint16 fast[1 << STBI__ZFAST_BITS]; - stbi__uint16 firstcode[16]; - int maxcode[17]; - stbi__uint16 firstsymbol[16]; - stbi_uc size[288]; - stbi__uint16 value[288]; -} stbi__zhuffman; - -stbi_inline static int stbi__bitreverse16(int n) -{ - n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); - n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); - n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); - n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); - return n; -} - -stbi_inline static int stbi__bit_reverse(int v, int bits) -{ - STBI_ASSERT(bits <= 16); - // to bit reverse n bits, reverse 16 and shift - // e.g. 11 bits, bit reverse and shift away 5 - return stbi__bitreverse16(v) >> (16-bits); -} - -static int stbi__zbuild_huffman(stbi__zhuffman *z, stbi_uc *sizelist, int num) -{ - int i,k=0; - int code, next_code[16], sizes[17]; - - // DEFLATE spec for generating codes - memset(sizes, 0, sizeof(sizes)); - memset(z->fast, 0, sizeof(z->fast)); - for (i=0; i < num; ++i) - ++sizes[sizelist[i]]; - sizes[0] = 0; - for (i=1; i < 16; ++i) - if (sizes[i] > (1 << i)) - return stbi__err("bad sizes", "Corrupt PNG"); - code = 0; - for (i=1; i < 16; ++i) { - next_code[i] = code; - z->firstcode[i] = (stbi__uint16) code; - z->firstsymbol[i] = (stbi__uint16) k; - code = (code + sizes[i]); - if (sizes[i]) - if (code-1 >= (1 << i)) return stbi__err("bad codelengths","Corrupt PNG"); - z->maxcode[i] = code << (16-i); // preshift for inner loop - code <<= 1; - k += sizes[i]; - } - z->maxcode[16] = 0x10000; // sentinel - for (i=0; i < num; ++i) { - int s = sizelist[i]; - if (s) { - int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; - stbi__uint16 fastv = (stbi__uint16) ((s << 9) | i); - z->size [c] = (stbi_uc ) s; - z->value[c] = (stbi__uint16) i; - if (s <= STBI__ZFAST_BITS) { - int j = stbi__bit_reverse(next_code[s],s); - while (j < (1 << STBI__ZFAST_BITS)) { - z->fast[j] = fastv; - j += (1 << s); - } - } - ++next_code[s]; - } - } - return 1; -} - -// zlib-from-memory implementation for PNG reading -// because PNG allows splitting the zlib stream arbitrarily, -// and it's annoying structurally to have PNG call ZLIB call PNG, -// we require PNG read all the IDATs and combine them into a single -// memory buffer - -typedef struct -{ - stbi_uc *zbuffer, *zbuffer_end; - int num_bits; - stbi__uint32 code_buffer; - - char *zout; - char *zout_start; - char *zout_end; - int z_expandable; - - stbi__zhuffman z_length, z_distance; -} stbi__zbuf; - -stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z) -{ - if (z->zbuffer >= z->zbuffer_end) return 0; - return *z->zbuffer++; -} - -static void stbi__fill_bits(stbi__zbuf *z) -{ - do { - STBI_ASSERT(z->code_buffer < (1U << z->num_bits)); - z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits; - z->num_bits += 8; - } while (z->num_bits <= 24); -} - -stbi_inline static unsigned int stbi__zreceive(stbi__zbuf *z, int n) -{ - unsigned int k; - if (z->num_bits < n) stbi__fill_bits(z); - k = z->code_buffer & ((1 << n) - 1); - z->code_buffer >>= n; - z->num_bits -= n; - return k; -} - -static int stbi__zhuffman_decode_slowpath(stbi__zbuf *a, stbi__zhuffman *z) -{ - int b,s,k; - // not resolved by fast table, so compute it the slow way - // use jpeg approach, which requires MSbits at top - k = stbi__bit_reverse(a->code_buffer, 16); - for (s=STBI__ZFAST_BITS+1; ; ++s) - if (k < z->maxcode[s]) - break; - if (s == 16) return -1; // invalid code! - // code size is s, so: - b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s]; - STBI_ASSERT(z->size[b] == s); - a->code_buffer >>= s; - a->num_bits -= s; - return z->value[b]; -} - -stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z) -{ - int b,s; - if (a->num_bits < 16) stbi__fill_bits(a); - b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; - if (b) { - s = b >> 9; - a->code_buffer >>= s; - a->num_bits -= s; - return b & 511; - } - return stbi__zhuffman_decode_slowpath(a, z); -} - -static int stbi__zexpand(stbi__zbuf *z, char *zout, int n) // need to make room for n bytes -{ - char *q; - int cur, limit, old_limit; - z->zout = zout; - if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG"); - cur = (int) (z->zout - z->zout_start); - limit = old_limit = (int) (z->zout_end - z->zout_start); - while (cur + n > limit) - limit *= 2; - q = (char *) STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); - STBI_NOTUSED(old_limit); - if (q == NULL) return stbi__err("outofmem", "Out of memory"); - z->zout_start = q; - z->zout = q + cur; - z->zout_end = q + limit; - return 1; -} - -static int stbi__zlength_base[31] = { - 3,4,5,6,7,8,9,10,11,13, - 15,17,19,23,27,31,35,43,51,59, - 67,83,99,115,131,163,195,227,258,0,0 }; - -static int stbi__zlength_extra[31]= -{ 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; - -static int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, -257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; - -static int stbi__zdist_extra[32] = -{ 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; - -static int stbi__parse_huffman_block(stbi__zbuf *a) -{ - char *zout = a->zout; - for(;;) { - int z = stbi__zhuffman_decode(a, &a->z_length); - if (z < 256) { - if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); // error in huffman codes - if (zout >= a->zout_end) { - if (!stbi__zexpand(a, zout, 1)) return 0; - zout = a->zout; - } - *zout++ = (char) z; - } else { - stbi_uc *p; - int len,dist; - if (z == 256) { - a->zout = zout; - return 1; - } - z -= 257; - len = stbi__zlength_base[z]; - if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); - z = stbi__zhuffman_decode(a, &a->z_distance); - if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); - dist = stbi__zdist_base[z]; - if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); - if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG"); - if (zout + len > a->zout_end) { - if (!stbi__zexpand(a, zout, len)) return 0; - zout = a->zout; - } - p = (stbi_uc *) (zout - dist); - if (dist == 1) { // run of one byte; common in images. - stbi_uc v = *p; - if (len) { do *zout++ = v; while (--len); } - } else { - if (len) { do *zout++ = *p++; while (--len); } - } - } - } -} - -static int stbi__compute_huffman_codes(stbi__zbuf *a) -{ - static stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; - stbi__zhuffman z_codelength; - stbi_uc lencodes[286+32+137];//padding for maximum single op - stbi_uc codelength_sizes[19]; - int i,n; - - int hlit = stbi__zreceive(a,5) + 257; - int hdist = stbi__zreceive(a,5) + 1; - int hclen = stbi__zreceive(a,4) + 4; - - memset(codelength_sizes, 0, sizeof(codelength_sizes)); - for (i=0; i < hclen; ++i) { - int s = stbi__zreceive(a,3); - codelength_sizes[length_dezigzag[i]] = (stbi_uc) s; - } - if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; - - n = 0; - while (n < hlit + hdist) { - int c = stbi__zhuffman_decode(a, &z_codelength); - if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); - if (c < 16) - lencodes[n++] = (stbi_uc) c; - else if (c == 16) { - c = stbi__zreceive(a,2)+3; - memset(lencodes+n, lencodes[n-1], c); - n += c; - } else if (c == 17) { - c = stbi__zreceive(a,3)+3; - memset(lencodes+n, 0, c); - n += c; - } else { - STBI_ASSERT(c == 18); - c = stbi__zreceive(a,7)+11; - memset(lencodes+n, 0, c); - n += c; - } - } - if (n != hlit+hdist) return stbi__err("bad codelengths","Corrupt PNG"); - if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; - if (!stbi__zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0; - return 1; -} - -static int stbi__parse_uncompressed_block(stbi__zbuf *a) -{ - stbi_uc header[4]; - int len,nlen,k; - if (a->num_bits & 7) - stbi__zreceive(a, a->num_bits & 7); // discard - // drain the bit-packed data into header - k = 0; - while (a->num_bits > 0) { - header[k++] = (stbi_uc) (a->code_buffer & 255); // suppress MSVC run-time check - a->code_buffer >>= 8; - a->num_bits -= 8; - } - STBI_ASSERT(a->num_bits == 0); - // now fill header the normal way - while (k < 4) - header[k++] = stbi__zget8(a); - len = header[1] * 256 + header[0]; - nlen = header[3] * 256 + header[2]; - if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt","Corrupt PNG"); - if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer","Corrupt PNG"); - if (a->zout + len > a->zout_end) - if (!stbi__zexpand(a, a->zout, len)) return 0; - memcpy(a->zout, a->zbuffer, len); - a->zbuffer += len; - a->zout += len; - return 1; -} - -static int stbi__parse_zlib_header(stbi__zbuf *a) -{ - int cmf = stbi__zget8(a); - int cm = cmf & 15; - /* int cinfo = cmf >> 4; */ - int flg = stbi__zget8(a); - if ((cmf*256+flg) % 31 != 0) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec - if (flg & 32) return stbi__err("no preset dict","Corrupt PNG"); // preset dictionary not allowed in png - if (cm != 8) return stbi__err("bad compression","Corrupt PNG"); // DEFLATE required for png - // window = 1 << (8 + cinfo)... but who cares, we fully buffer output - return 1; -} - -// @TODO: should statically initialize these for optimal thread safety -static stbi_uc stbi__zdefault_length[288], stbi__zdefault_distance[32]; -static void stbi__init_zdefaults(void) -{ - int i; // use <= to match clearly with spec - for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; - for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; - for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; - for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; - - for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; -} - -static int stbi__parse_zlib(stbi__zbuf *a, int parse_header) -{ - int final, type; - if (parse_header) - if (!stbi__parse_zlib_header(a)) return 0; - a->num_bits = 0; - a->code_buffer = 0; - do { - final = stbi__zreceive(a,1); - type = stbi__zreceive(a,2); - if (type == 0) { - if (!stbi__parse_uncompressed_block(a)) return 0; - } else if (type == 3) { - return 0; - } else { - if (type == 1) { - // use fixed code lengths - if (!stbi__zdefault_distance[31]) stbi__init_zdefaults(); - if (!stbi__zbuild_huffman(&a->z_length , stbi__zdefault_length , 288)) return 0; - if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; - } else { - if (!stbi__compute_huffman_codes(a)) return 0; - } - if (!stbi__parse_huffman_block(a)) return 0; - } - } while (!final); - return 1; -} - -static int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, int parse_header) -{ - a->zout_start = obuf; - a->zout = obuf; - a->zout_end = obuf + olen; - a->z_expandable = exp; - - return stbi__parse_zlib(a, parse_header); -} - -STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen) -{ - stbi__zbuf a; - char *p = (char *) stbi__malloc(initial_size); - if (p == NULL) return NULL; - a.zbuffer = (stbi_uc *) buffer; - a.zbuffer_end = (stbi_uc *) buffer + len; - if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { - if (outlen) *outlen = (int) (a.zout - a.zout_start); - return a.zout_start; - } else { - STBI_FREE(a.zout_start); - return NULL; - } -} - -STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen) -{ - return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); -} - -STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header) -{ - stbi__zbuf a; - char *p = (char *) stbi__malloc(initial_size); - if (p == NULL) return NULL; - a.zbuffer = (stbi_uc *) buffer; - a.zbuffer_end = (stbi_uc *) buffer + len; - if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { - if (outlen) *outlen = (int) (a.zout - a.zout_start); - return a.zout_start; - } else { - STBI_FREE(a.zout_start); - return NULL; - } -} - -STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen) -{ - stbi__zbuf a; - a.zbuffer = (stbi_uc *) ibuffer; - a.zbuffer_end = (stbi_uc *) ibuffer + ilen; - if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) - return (int) (a.zout - a.zout_start); - else - return -1; -} - -STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen) -{ - stbi__zbuf a; - char *p = (char *) stbi__malloc(16384); - if (p == NULL) return NULL; - a.zbuffer = (stbi_uc *) buffer; - a.zbuffer_end = (stbi_uc *) buffer+len; - if (stbi__do_zlib(&a, p, 16384, 1, 0)) { - if (outlen) *outlen = (int) (a.zout - a.zout_start); - return a.zout_start; - } else { - STBI_FREE(a.zout_start); - return NULL; - } -} - -STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen) -{ - stbi__zbuf a; - a.zbuffer = (stbi_uc *) ibuffer; - a.zbuffer_end = (stbi_uc *) ibuffer + ilen; - if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) - return (int) (a.zout - a.zout_start); - else - return -1; -} -#endif - -// public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 -// simple implementation -// - only 8-bit samples -// - no CRC checking -// - allocates lots of intermediate memory -// - avoids problem of streaming data between subsystems -// - avoids explicit window management -// performance -// - uses stb_zlib, a PD zlib implementation with fast huffman decoding - -#ifndef STBI_NO_PNG -typedef struct -{ - stbi__uint32 length; - stbi__uint32 type; -} stbi__pngchunk; - -static stbi__pngchunk stbi__get_chunk_header(stbi__context *s) -{ - stbi__pngchunk c; - c.length = stbi__get32be(s); - c.type = stbi__get32be(s); - return c; -} - -static int stbi__check_png_header(stbi__context *s) -{ - static stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; - int i; - for (i=0; i < 8; ++i) - if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig","Not a PNG"); - return 1; -} - -typedef struct -{ - stbi__context *s; - stbi_uc *idata, *expanded, *out; - int depth; -} stbi__png; - - -enum { - STBI__F_none=0, - STBI__F_sub=1, - STBI__F_up=2, - STBI__F_avg=3, - STBI__F_paeth=4, - // synthetic filters used for first scanline to avoid needing a dummy row of 0s - STBI__F_avg_first, - STBI__F_paeth_first -}; - -static stbi_uc first_row_filter[5] = -{ - STBI__F_none, - STBI__F_sub, - STBI__F_none, - STBI__F_avg_first, - STBI__F_paeth_first -}; - -static int stbi__paeth(int a, int b, int c) -{ - int p = a + b - c; - int pa = abs(p-a); - int pb = abs(p-b); - int pc = abs(p-c); - if (pa <= pb && pa <= pc) return a; - if (pb <= pc) return b; - return c; -} - -static stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; - -// create the png data from post-deflated data -static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) -{ - int bytes = (depth == 16? 2 : 1); - stbi__context *s = a->s; - stbi__uint32 i,j,stride = x*out_n*bytes; - stbi__uint32 img_len, img_width_bytes; - int k; - int img_n = s->img_n; // copy it into a local for later - - int output_bytes = out_n*bytes; - int filter_bytes = img_n*bytes; - int width = x; - - STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1); - a->out = (stbi_uc *) stbi__malloc(x * y * output_bytes); // extra bytes to write off the end into - if (!a->out) return stbi__err("outofmem", "Out of memory"); - - img_width_bytes = (((img_n * x * depth) + 7) >> 3); - img_len = (img_width_bytes + 1) * y; - if (s->img_x == x && s->img_y == y) { - if (raw_len != img_len) return stbi__err("not enough pixels","Corrupt PNG"); - } else { // interlaced: - if (raw_len < img_len) return stbi__err("not enough pixels","Corrupt PNG"); - } - - for (j=0; j < y; ++j) { - stbi_uc *cur = a->out + stride*j; - stbi_uc *prior = cur - stride; - int filter = *raw++; - - if (filter > 4) - return stbi__err("invalid filter","Corrupt PNG"); - - if (depth < 8) { - STBI_ASSERT(img_width_bytes <= x); - cur += x*out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place - filter_bytes = 1; - width = img_width_bytes; - } - - // if first row, use special filter that doesn't sample previous row - if (j == 0) filter = first_row_filter[filter]; - - // handle first byte explicitly - for (k=0; k < filter_bytes; ++k) { - switch (filter) { - case STBI__F_none : cur[k] = raw[k]; break; - case STBI__F_sub : cur[k] = raw[k]; break; - case STBI__F_up : cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; - case STBI__F_avg : cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1)); break; - case STBI__F_paeth : cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0,prior[k],0)); break; - case STBI__F_avg_first : cur[k] = raw[k]; break; - case STBI__F_paeth_first: cur[k] = raw[k]; break; - } - } - - if (depth == 8) { - if (img_n != out_n) - cur[img_n] = 255; // first pixel - raw += img_n; - cur += out_n; - prior += out_n; - } else if (depth == 16) { - if (img_n != out_n) { - cur[filter_bytes] = 255; // first pixel top byte - cur[filter_bytes+1] = 255; // first pixel bottom byte - } - raw += filter_bytes; - cur += output_bytes; - prior += output_bytes; - } else { - raw += 1; - cur += 1; - prior += 1; - } - - // this is a little gross, so that we don't switch per-pixel or per-component - if (depth < 8 || img_n == out_n) { - int nk = (width - 1)*filter_bytes; - #define CASE(f) \ - case f: \ - for (k=0; k < nk; ++k) - switch (filter) { - // "none" filter turns into a memcpy here; make that explicit. - case STBI__F_none: memcpy(cur, raw, nk); break; - CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); break; - CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; - CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); break; - CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); break; - CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); break; - CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); break; - } - #undef CASE - raw += nk; - } else { - STBI_ASSERT(img_n+1 == out_n); - #define CASE(f) \ - case f: \ - for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \ - for (k=0; k < filter_bytes; ++k) - switch (filter) { - CASE(STBI__F_none) cur[k] = raw[k]; break; - CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); break; - CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break; - CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); break; - CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); break; - CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); break; - CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); break; - } - #undef CASE - - // the loop above sets the high byte of the pixels' alpha, but for - // 16 bit png files we also need the low byte set. we'll do that here. - if (depth == 16) { - cur = a->out + stride*j; // start at the beginning of the row again - for (i=0; i < x; ++i,cur+=output_bytes) { - cur[filter_bytes+1] = 255; - } - } - } - } - - // we make a separate pass to expand bits to pixels; for performance, - // this could run two scanlines behind the above code, so it won't - // intefere with filtering but will still be in the cache. - if (depth < 8) { - for (j=0; j < y; ++j) { - stbi_uc *cur = a->out + stride*j; - stbi_uc *in = a->out + stride*j + x*out_n - img_width_bytes; - // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit - // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop - stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range - - // note that the final byte might overshoot and write more data than desired. - // we can allocate enough data that this never writes out of memory, but it - // could also overwrite the next scanline. can it overwrite non-empty data - // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel. - // so we need to explicitly clamp the final ones - - if (depth == 4) { - for (k=x*img_n; k >= 2; k-=2, ++in) { - *cur++ = scale * ((*in >> 4) ); - *cur++ = scale * ((*in ) & 0x0f); - } - if (k > 0) *cur++ = scale * ((*in >> 4) ); - } else if (depth == 2) { - for (k=x*img_n; k >= 4; k-=4, ++in) { - *cur++ = scale * ((*in >> 6) ); - *cur++ = scale * ((*in >> 4) & 0x03); - *cur++ = scale * ((*in >> 2) & 0x03); - *cur++ = scale * ((*in ) & 0x03); - } - if (k > 0) *cur++ = scale * ((*in >> 6) ); - if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03); - if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03); - } else if (depth == 1) { - for (k=x*img_n; k >= 8; k-=8, ++in) { - *cur++ = scale * ((*in >> 7) ); - *cur++ = scale * ((*in >> 6) & 0x01); - *cur++ = scale * ((*in >> 5) & 0x01); - *cur++ = scale * ((*in >> 4) & 0x01); - *cur++ = scale * ((*in >> 3) & 0x01); - *cur++ = scale * ((*in >> 2) & 0x01); - *cur++ = scale * ((*in >> 1) & 0x01); - *cur++ = scale * ((*in ) & 0x01); - } - if (k > 0) *cur++ = scale * ((*in >> 7) ); - if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01); - if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01); - if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01); - if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01); - if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01); - if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01); - } - if (img_n != out_n) { - int q; - // insert alpha = 255 - cur = a->out + stride*j; - if (img_n == 1) { - for (q=x-1; q >= 0; --q) { - cur[q*2+1] = 255; - cur[q*2+0] = cur[q]; - } - } else { - STBI_ASSERT(img_n == 3); - for (q=x-1; q >= 0; --q) { - cur[q*4+3] = 255; - cur[q*4+2] = cur[q*3+2]; - cur[q*4+1] = cur[q*3+1]; - cur[q*4+0] = cur[q*3+0]; - } - } - } - } - } else if (depth == 16) { - // force the image data from big-endian to platform-native. - // this is done in a separate pass due to the decoding relying - // on the data being untouched, but could probably be done - // per-line during decode if care is taken. - stbi_uc *cur = a->out; - stbi__uint16 *cur16 = (stbi__uint16*)cur; - - for(i=0; i < x*y*out_n; ++i,cur16++,cur+=2) { - *cur16 = (cur[0] << 8) | cur[1]; - } - } - - return 1; -} - -static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) -{ - stbi_uc *final; - int p; - if (!interlaced) - return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); - - // de-interlacing - final = (stbi_uc *) stbi__malloc(a->s->img_x * a->s->img_y * out_n); - for (p=0; p < 7; ++p) { - int xorig[] = { 0,4,0,2,0,1,0 }; - int yorig[] = { 0,0,4,0,2,0,1 }; - int xspc[] = { 8,8,4,4,2,2,1 }; - int yspc[] = { 8,8,8,4,4,2,2 }; - int i,j,x,y; - // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 - x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p]; - y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p]; - if (x && y) { - stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; - if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { - STBI_FREE(final); - return 0; - } - for (j=0; j < y; ++j) { - for (i=0; i < x; ++i) { - int out_y = j*yspc[p]+yorig[p]; - int out_x = i*xspc[p]+xorig[p]; - memcpy(final + out_y*a->s->img_x*out_n + out_x*out_n, - a->out + (j*x+i)*out_n, out_n); - } - } - STBI_FREE(a->out); - image_data += img_len; - image_data_len -= img_len; - } - } - a->out = final; - - return 1; -} - -static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n) -{ - stbi__context *s = z->s; - stbi__uint32 i, pixel_count = s->img_x * s->img_y; - stbi_uc *p = z->out; - - // compute color-based transparency, assuming we've - // already got 255 as the alpha value in the output - STBI_ASSERT(out_n == 2 || out_n == 4); - - if (out_n == 2) { - for (i=0; i < pixel_count; ++i) { - p[1] = (p[0] == tc[0] ? 0 : 255); - p += 2; - } - } else { - for (i=0; i < pixel_count; ++i) { - if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - p[3] = 0; - p += 4; - } - } - return 1; -} - -static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int out_n) -{ - stbi__context *s = z->s; - stbi__uint32 i, pixel_count = s->img_x * s->img_y; - stbi__uint16 *p = (stbi__uint16*) z->out; - - // compute color-based transparency, assuming we've - // already got 65535 as the alpha value in the output - STBI_ASSERT(out_n == 2 || out_n == 4); - - if (out_n == 2) { - for (i = 0; i < pixel_count; ++i) { - p[1] = (p[0] == tc[0] ? 0 : 65535); - p += 2; - } - } else { - for (i = 0; i < pixel_count; ++i) { - if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) - p[3] = 0; - p += 4; - } - } - return 1; -} - -static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int pal_img_n) -{ - stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; - stbi_uc *p, *temp_out, *orig = a->out; - - p = (stbi_uc *) stbi__malloc(pixel_count * pal_img_n); - if (p == NULL) return stbi__err("outofmem", "Out of memory"); - - // between here and free(out) below, exitting would leak - temp_out = p; - - if (pal_img_n == 3) { - for (i=0; i < pixel_count; ++i) { - int n = orig[i]*4; - p[0] = palette[n ]; - p[1] = palette[n+1]; - p[2] = palette[n+2]; - p += 3; - } - } else { - for (i=0; i < pixel_count; ++i) { - int n = orig[i]*4; - p[0] = palette[n ]; - p[1] = palette[n+1]; - p[2] = palette[n+2]; - p[3] = palette[n+3]; - p += 4; - } - } - STBI_FREE(a->out); - a->out = temp_out; - - STBI_NOTUSED(len); - - return 1; -} - -static int stbi__reduce_png(stbi__png *p) -{ - int i; - int img_len = p->s->img_x * p->s->img_y * p->s->img_out_n; - stbi_uc *reduced; - stbi__uint16 *orig = (stbi__uint16*)p->out; - - if (p->depth != 16) return 1; // don't need to do anything if not 16-bit data - - reduced = (stbi_uc *)stbi__malloc(img_len); - if (p == NULL) return stbi__err("outofmem", "Out of memory"); - - for (i = 0; i < img_len; ++i) reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is a decent approx of 16->8 bit scaling - - p->out = reduced; - STBI_FREE(orig); - - return 1; -} - -static int stbi__unpremultiply_on_load = 0; -static int stbi__de_iphone_flag = 0; - -STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) -{ - stbi__unpremultiply_on_load = flag_true_if_should_unpremultiply; -} - -STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) -{ - stbi__de_iphone_flag = flag_true_if_should_convert; -} - -static void stbi__de_iphone(stbi__png *z) -{ - stbi__context *s = z->s; - stbi__uint32 i, pixel_count = s->img_x * s->img_y; - stbi_uc *p = z->out; - - if (s->img_out_n == 3) { // convert bgr to rgb - for (i=0; i < pixel_count; ++i) { - stbi_uc t = p[0]; - p[0] = p[2]; - p[2] = t; - p += 3; - } - } else { - STBI_ASSERT(s->img_out_n == 4); - if (stbi__unpremultiply_on_load) { - // convert bgr to rgb and unpremultiply - for (i=0; i < pixel_count; ++i) { - stbi_uc a = p[3]; - stbi_uc t = p[0]; - if (a) { - p[0] = p[2] * 255 / a; - p[1] = p[1] * 255 / a; - p[2] = t * 255 / a; - } else { - p[0] = p[2]; - p[2] = t; - } - p += 4; - } - } else { - // convert bgr to rgb - for (i=0; i < pixel_count; ++i) { - stbi_uc t = p[0]; - p[0] = p[2]; - p[2] = t; - p += 4; - } - } - } -} - -#define STBI__PNG_TYPE(a,b,c,d) (((a) << 24) + ((b) << 16) + ((c) << 8) + (d)) - -static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) -{ - stbi_uc palette[1024], pal_img_n=0; - stbi_uc has_trans=0, tc[3]; - stbi__uint16 tc16[3]; - stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0; - int first=1,k,interlace=0, color=0, is_iphone=0; - stbi__context *s = z->s; - - z->expanded = NULL; - z->idata = NULL; - z->out = NULL; - - if (!stbi__check_png_header(s)) return 0; - - if (scan == STBI__SCAN_type) return 1; - - for (;;) { - stbi__pngchunk c = stbi__get_chunk_header(s); - switch (c.type) { - case STBI__PNG_TYPE('C','g','B','I'): - is_iphone = 1; - stbi__skip(s, c.length); - break; - case STBI__PNG_TYPE('I','H','D','R'): { - int comp,filter; - if (!first) return stbi__err("multiple IHDR","Corrupt PNG"); - first = 0; - if (c.length != 13) return stbi__err("bad IHDR len","Corrupt PNG"); - s->img_x = stbi__get32be(s); if (s->img_x > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)"); - s->img_y = stbi__get32be(s); if (s->img_y > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)"); - z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only","PNG not supported: 1/2/4/8/16-bit only"); - color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype","Corrupt PNG"); - if (color == 3 && z->depth == 16) return stbi__err("bad ctype","Corrupt PNG"); - if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype","Corrupt PNG"); - comp = stbi__get8(s); if (comp) return stbi__err("bad comp method","Corrupt PNG"); - filter= stbi__get8(s); if (filter) return stbi__err("bad filter method","Corrupt PNG"); - interlace = stbi__get8(s); if (interlace>1) return stbi__err("bad interlace method","Corrupt PNG"); - if (!s->img_x || !s->img_y) return stbi__err("0-pixel image","Corrupt PNG"); - if (!pal_img_n) { - s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); - if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); - if (scan == STBI__SCAN_header) return 1; - } else { - // if paletted, then pal_n is our final components, and - // img_n is # components to decompress/filter. - s->img_n = 1; - if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG"); - // if SCAN_header, have to scan to see if we have a tRNS - } - break; - } - - case STBI__PNG_TYPE('P','L','T','E'): { - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (c.length > 256*3) return stbi__err("invalid PLTE","Corrupt PNG"); - pal_len = c.length / 3; - if (pal_len * 3 != c.length) return stbi__err("invalid PLTE","Corrupt PNG"); - for (i=0; i < pal_len; ++i) { - palette[i*4+0] = stbi__get8(s); - palette[i*4+1] = stbi__get8(s); - palette[i*4+2] = stbi__get8(s); - palette[i*4+3] = 255; - } - break; - } - - case STBI__PNG_TYPE('t','R','N','S'): { - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (z->idata) return stbi__err("tRNS after IDAT","Corrupt PNG"); - if (pal_img_n) { - if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } - if (pal_len == 0) return stbi__err("tRNS before PLTE","Corrupt PNG"); - if (c.length > pal_len) return stbi__err("bad tRNS len","Corrupt PNG"); - pal_img_n = 4; - for (i=0; i < c.length; ++i) - palette[i*4+3] = stbi__get8(s); - } else { - if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG"); - if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG"); - has_trans = 1; - if (z->depth == 16) { - for (k = 0; k < s->img_n; ++k) tc16[k] = stbi__get16be(s); // copy the values as-is - } else { - for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger - } - } - break; - } - - case STBI__PNG_TYPE('I','D','A','T'): { - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG"); - if (scan == STBI__SCAN_header) { s->img_n = pal_img_n; return 1; } - if ((int)(ioff + c.length) < (int)ioff) return 0; - if (ioff + c.length > idata_limit) { - stbi__uint32 idata_limit_old = idata_limit; - stbi_uc *p; - if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; - while (ioff + c.length > idata_limit) - idata_limit *= 2; - STBI_NOTUSED(idata_limit_old); - p = (stbi_uc *) STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); - z->idata = p; - } - if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err("outofdata","Corrupt PNG"); - ioff += c.length; - break; - } - - case STBI__PNG_TYPE('I','E','N','D'): { - stbi__uint32 raw_len, bpl; - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if (scan != STBI__SCAN_load) return 1; - if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG"); - // initial guess for decoded data size to avoid unnecessary reallocs - bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component - raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; - z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone); - if (z->expanded == NULL) return 0; // zlib should set error - STBI_FREE(z->idata); z->idata = NULL; - if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans) - s->img_out_n = s->img_n+1; - else - s->img_out_n = s->img_n; - if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; - if (has_trans) { - if (z->depth == 16) { - if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; - } else { - if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; - } - } - if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) - stbi__de_iphone(z); - if (pal_img_n) { - // pal_img_n == 3 or 4 - s->img_n = pal_img_n; // record the actual colors we had - s->img_out_n = pal_img_n; - if (req_comp >= 3) s->img_out_n = req_comp; - if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) - return 0; - } - STBI_FREE(z->expanded); z->expanded = NULL; - return 1; - } - - default: - // if critical, fail - if (first) return stbi__err("first not IHDR", "Corrupt PNG"); - if ((c.type & (1 << 29)) == 0) { - #ifndef STBI_NO_FAILURE_STRINGS - // not threadsafe - static char invalid_chunk[] = "XXXX PNG chunk not known"; - invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); - invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); - invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); - invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); - #endif - return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); - } - stbi__skip(s, c.length); - break; - } - // end of PNG chunk, read and skip CRC - stbi__get32be(s); - } -} - -static unsigned char *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp) -{ - unsigned char *result=NULL; - if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); - if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { - if (p->depth == 16) { - if (!stbi__reduce_png(p)) { - return result; - } - } - result = p->out; - p->out = NULL; - if (req_comp && req_comp != p->s->img_out_n) { - result = stbi__convert_format(result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); - p->s->img_out_n = req_comp; - if (result == NULL) return result; - } - *x = p->s->img_x; - *y = p->s->img_y; - if (n) *n = p->s->img_n; - } - STBI_FREE(p->out); p->out = NULL; - STBI_FREE(p->expanded); p->expanded = NULL; - STBI_FREE(p->idata); p->idata = NULL; - - return result; -} - -static unsigned char *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - stbi__png p; - p.s = s; - return stbi__do_png(&p, x,y,comp,req_comp); -} - -static int stbi__png_test(stbi__context *s) -{ - int r; - r = stbi__check_png_header(s); - stbi__rewind(s); - return r; -} - -static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp) -{ - if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { - stbi__rewind( p->s ); - return 0; - } - if (x) *x = p->s->img_x; - if (y) *y = p->s->img_y; - if (comp) *comp = p->s->img_n; - return 1; -} - -static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp) -{ - stbi__png p; - p.s = s; - return stbi__png_info_raw(&p, x, y, comp); -} -#endif - -// Microsoft/Windows BMP image - -#ifndef STBI_NO_BMP -static int stbi__bmp_test_raw(stbi__context *s) -{ - int r; - int sz; - if (stbi__get8(s) != 'B') return 0; - if (stbi__get8(s) != 'M') return 0; - stbi__get32le(s); // discard filesize - stbi__get16le(s); // discard reserved - stbi__get16le(s); // discard reserved - stbi__get32le(s); // discard data offset - sz = stbi__get32le(s); - r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); - return r; -} - -static int stbi__bmp_test(stbi__context *s) -{ - int r = stbi__bmp_test_raw(s); - stbi__rewind(s); - return r; -} - - -// returns 0..31 for the highest set bit -static int stbi__high_bit(unsigned int z) -{ - int n=0; - if (z == 0) return -1; - if (z >= 0x10000) n += 16, z >>= 16; - if (z >= 0x00100) n += 8, z >>= 8; - if (z >= 0x00010) n += 4, z >>= 4; - if (z >= 0x00004) n += 2, z >>= 2; - if (z >= 0x00002) n += 1, z >>= 1; - return n; -} - -static int stbi__bitcount(unsigned int a) -{ - a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 - a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 - a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits - a = (a + (a >> 8)); // max 16 per 8 bits - a = (a + (a >> 16)); // max 32 per 8 bits - return a & 0xff; -} - -static int stbi__shiftsigned(int v, int shift, int bits) -{ - int result; - int z=0; - - if (shift < 0) v <<= -shift; - else v >>= shift; - result = v; - - z = bits; - while (z < 8) { - result += v >> z; - z += bits; - } - return result; -} - -typedef struct -{ - int bpp, offset, hsz; - unsigned int mr,mg,mb,ma, all_a; -} stbi__bmp_data; - -static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info) -{ - int hsz; - if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); - stbi__get32le(s); // discard filesize - stbi__get16le(s); // discard reserved - stbi__get16le(s); // discard reserved - info->offset = stbi__get32le(s); - info->hsz = hsz = stbi__get32le(s); - info->mr = info->mg = info->mb = info->ma = 0; - - if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); - if (hsz == 12) { - s->img_x = stbi__get16le(s); - s->img_y = stbi__get16le(s); - } else { - s->img_x = stbi__get32le(s); - s->img_y = stbi__get32le(s); - } - if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); - info->bpp = stbi__get16le(s); - if (info->bpp == 1) return stbi__errpuc("monochrome", "BMP type not supported: 1-bit"); - if (hsz != 12) { - int compress = stbi__get32le(s); - if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); - stbi__get32le(s); // discard sizeof - stbi__get32le(s); // discard hres - stbi__get32le(s); // discard vres - stbi__get32le(s); // discard colorsused - stbi__get32le(s); // discard max important - if (hsz == 40 || hsz == 56) { - if (hsz == 56) { - stbi__get32le(s); - stbi__get32le(s); - stbi__get32le(s); - stbi__get32le(s); - } - if (info->bpp == 16 || info->bpp == 32) { - if (compress == 0) { - if (info->bpp == 32) { - info->mr = 0xffu << 16; - info->mg = 0xffu << 8; - info->mb = 0xffu << 0; - info->ma = 0xffu << 24; - info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 - } else { - info->mr = 31u << 10; - info->mg = 31u << 5; - info->mb = 31u << 0; - } - } else if (compress == 3) { - info->mr = stbi__get32le(s); - info->mg = stbi__get32le(s); - info->mb = stbi__get32le(s); - // not documented, but generated by photoshop and handled by mspaint - if (info->mr == info->mg && info->mg == info->mb) { - // ?!?!? - return stbi__errpuc("bad BMP", "bad BMP"); - } - } else - return stbi__errpuc("bad BMP", "bad BMP"); - } - } else { - int i; - if (hsz != 108 && hsz != 124) - return stbi__errpuc("bad BMP", "bad BMP"); - info->mr = stbi__get32le(s); - info->mg = stbi__get32le(s); - info->mb = stbi__get32le(s); - info->ma = stbi__get32le(s); - stbi__get32le(s); // discard color space - for (i=0; i < 12; ++i) - stbi__get32le(s); // discard color space parameters - if (hsz == 124) { - stbi__get32le(s); // discard rendering intent - stbi__get32le(s); // discard offset of profile data - stbi__get32le(s); // discard size of profile data - stbi__get32le(s); // discard reserved - } - } - } - return (void *) 1; -} - - -static stbi_uc *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - stbi_uc *out; - unsigned int mr=0,mg=0,mb=0,ma=0, all_a; - stbi_uc pal[256][4]; - int psize=0,i,j,width; - int flip_vertically, pad, target; - stbi__bmp_data info; - - info.all_a = 255; - if (stbi__bmp_parse_header(s, &info) == NULL) - return NULL; // error code already set - - flip_vertically = ((int) s->img_y) > 0; - s->img_y = abs((int) s->img_y); - - mr = info.mr; - mg = info.mg; - mb = info.mb; - ma = info.ma; - all_a = info.all_a; - - if (info.hsz == 12) { - if (info.bpp < 24) - psize = (info.offset - 14 - 24) / 3; - } else { - if (info.bpp < 16) - psize = (info.offset - 14 - info.hsz) >> 2; - } - - s->img_n = ma ? 4 : 3; - if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 - target = req_comp; - else - target = s->img_n; // if they want monochrome, we'll post-convert - - out = (stbi_uc *) stbi__malloc(target * s->img_x * s->img_y); - if (!out) return stbi__errpuc("outofmem", "Out of memory"); - if (info.bpp < 16) { - int z=0; - if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } - for (i=0; i < psize; ++i) { - pal[i][2] = stbi__get8(s); - pal[i][1] = stbi__get8(s); - pal[i][0] = stbi__get8(s); - if (info.hsz != 12) stbi__get8(s); - pal[i][3] = 255; - } - stbi__skip(s, info.offset - 14 - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); - if (info.bpp == 4) width = (s->img_x + 1) >> 1; - else if (info.bpp == 8) width = s->img_x; - else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } - pad = (-width)&3; - for (j=0; j < (int) s->img_y; ++j) { - for (i=0; i < (int) s->img_x; i += 2) { - int v=stbi__get8(s),v2=0; - if (info.bpp == 4) { - v2 = v & 15; - v >>= 4; - } - out[z++] = pal[v][0]; - out[z++] = pal[v][1]; - out[z++] = pal[v][2]; - if (target == 4) out[z++] = 255; - if (i+1 == (int) s->img_x) break; - v = (info.bpp == 8) ? stbi__get8(s) : v2; - out[z++] = pal[v][0]; - out[z++] = pal[v][1]; - out[z++] = pal[v][2]; - if (target == 4) out[z++] = 255; - } - stbi__skip(s, pad); - } - } else { - int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0; - int z = 0; - int easy=0; - stbi__skip(s, info.offset - 14 - info.hsz); - if (info.bpp == 24) width = 3 * s->img_x; - else if (info.bpp == 16) width = 2*s->img_x; - else /* bpp = 32 and pad = 0 */ width=0; - pad = (-width) & 3; - if (info.bpp == 24) { - easy = 1; - } else if (info.bpp == 32) { - if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) - easy = 2; - } - if (!easy) { - if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } - // right shift amt to put high bit in position #7 - rshift = stbi__high_bit(mr)-7; rcount = stbi__bitcount(mr); - gshift = stbi__high_bit(mg)-7; gcount = stbi__bitcount(mg); - bshift = stbi__high_bit(mb)-7; bcount = stbi__bitcount(mb); - ashift = stbi__high_bit(ma)-7; acount = stbi__bitcount(ma); - } - for (j=0; j < (int) s->img_y; ++j) { - if (easy) { - for (i=0; i < (int) s->img_x; ++i) { - unsigned char a; - out[z+2] = stbi__get8(s); - out[z+1] = stbi__get8(s); - out[z+0] = stbi__get8(s); - z += 3; - a = (easy == 2 ? stbi__get8(s) : 255); - all_a |= a; - if (target == 4) out[z++] = a; - } - } else { - int bpp = info.bpp; - for (i=0; i < (int) s->img_x; ++i) { - stbi__uint32 v = (bpp == 16 ? (stbi__uint32) stbi__get16le(s) : stbi__get32le(s)); - int a; - out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); - out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); - out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); - a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); - all_a |= a; - if (target == 4) out[z++] = STBI__BYTECAST(a); - } - } - stbi__skip(s, pad); - } - } - - // if alpha channel is all 0s, replace with all 255s - if (target == 4 && all_a == 0) - for (i=4*s->img_x*s->img_y-1; i >= 0; i -= 4) - out[i] = 255; - - if (flip_vertically) { - stbi_uc t; - for (j=0; j < (int) s->img_y>>1; ++j) { - stbi_uc *p1 = out + j *s->img_x*target; - stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target; - for (i=0; i < (int) s->img_x*target; ++i) { - t = p1[i], p1[i] = p2[i], p2[i] = t; - } - } - } - - if (req_comp && req_comp != target) { - out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); - if (out == NULL) return out; // stbi__convert_format frees input on failure - } - - *x = s->img_x; - *y = s->img_y; - if (comp) *comp = s->img_n; - return out; -} -#endif - -// Targa Truevision - TGA -// by Jonathan Dummer -#ifndef STBI_NO_TGA -// returns STBI_rgb or whatever, 0 on error -static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) -{ - // only RGB or RGBA (incl. 16bit) or grey allowed - if(is_rgb16) *is_rgb16 = 0; - switch(bits_per_pixel) { - case 8: return STBI_grey; - case 16: if(is_grey) return STBI_grey_alpha; - // else: fall-through - case 15: if(is_rgb16) *is_rgb16 = 1; - return STBI_rgb; - case 24: // fall-through - case 32: return bits_per_pixel/8; - default: return 0; - } -} - -static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp) -{ - int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; - int sz, tga_colormap_type; - stbi__get8(s); // discard Offset - tga_colormap_type = stbi__get8(s); // colormap type - if( tga_colormap_type > 1 ) { - stbi__rewind(s); - return 0; // only RGB or indexed allowed - } - tga_image_type = stbi__get8(s); // image type - if ( tga_colormap_type == 1 ) { // colormapped (paletted) image - if (tga_image_type != 1 && tga_image_type != 9) { - stbi__rewind(s); - return 0; - } - stbi__skip(s,4); // skip index of first colormap entry and number of entries - sz = stbi__get8(s); // check bits per palette color entry - if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) { - stbi__rewind(s); - return 0; - } - stbi__skip(s,4); // skip image x and y origin - tga_colormap_bpp = sz; - } else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE - if ( (tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11) ) { - stbi__rewind(s); - return 0; // only RGB or grey allowed, +/- RLE - } - stbi__skip(s,9); // skip colormap specification and image x/y origin - tga_colormap_bpp = 0; - } - tga_w = stbi__get16le(s); - if( tga_w < 1 ) { - stbi__rewind(s); - return 0; // test width - } - tga_h = stbi__get16le(s); - if( tga_h < 1 ) { - stbi__rewind(s); - return 0; // test height - } - tga_bits_per_pixel = stbi__get8(s); // bits per pixel - stbi__get8(s); // ignore alpha bits - if (tga_colormap_bpp != 0) { - if((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { - // when using a colormap, tga_bits_per_pixel is the size of the indexes - // I don't think anything but 8 or 16bit indexes makes sense - stbi__rewind(s); - return 0; - } - tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); - } else { - tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); - } - if(!tga_comp) { - stbi__rewind(s); - return 0; - } - if (x) *x = tga_w; - if (y) *y = tga_h; - if (comp) *comp = tga_comp; - return 1; // seems to have passed everything -} - -static int stbi__tga_test(stbi__context *s) -{ - int res = 0; - int sz, tga_color_type; - stbi__get8(s); // discard Offset - tga_color_type = stbi__get8(s); // color type - if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed - sz = stbi__get8(s); // image type - if ( tga_color_type == 1 ) { // colormapped (paletted) image - if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 - stbi__skip(s,4); // skip index of first colormap entry and number of entries - sz = stbi__get8(s); // check bits per palette color entry - if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; - stbi__skip(s,4); // skip image x and y origin - } else { // "normal" image w/o colormap - if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE - stbi__skip(s,9); // skip colormap specification and image x/y origin - } - if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width - if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height - sz = stbi__get8(s); // bits per pixel - if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index - if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; - - res = 1; // if we got this far, everything's good and we can return 1 instead of 0 - -errorEnd: - stbi__rewind(s); - return res; -} - -// read 16bit value and convert to 24bit RGB -void stbi__tga_read_rgb16(stbi__context *s, stbi_uc* out) -{ - stbi__uint16 px = stbi__get16le(s); - stbi__uint16 fiveBitMask = 31; - // we have 3 channels with 5bits each - int r = (px >> 10) & fiveBitMask; - int g = (px >> 5) & fiveBitMask; - int b = px & fiveBitMask; - // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later - out[0] = (r * 255)/31; - out[1] = (g * 255)/31; - out[2] = (b * 255)/31; - - // some people claim that the most significant bit might be used for alpha - // (possibly if an alpha-bit is set in the "image descriptor byte") - // but that only made 16bit test images completely translucent.. - // so let's treat all 15 and 16bit TGAs as RGB with no alpha. -} - -static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - // read in the TGA header stuff - int tga_offset = stbi__get8(s); - int tga_indexed = stbi__get8(s); - int tga_image_type = stbi__get8(s); - int tga_is_RLE = 0; - int tga_palette_start = stbi__get16le(s); - int tga_palette_len = stbi__get16le(s); - int tga_palette_bits = stbi__get8(s); - int tga_x_origin = stbi__get16le(s); - int tga_y_origin = stbi__get16le(s); - int tga_width = stbi__get16le(s); - int tga_height = stbi__get16le(s); - int tga_bits_per_pixel = stbi__get8(s); - int tga_comp, tga_rgb16=0; - int tga_inverted = stbi__get8(s); - // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) - // image data - unsigned char *tga_data; - unsigned char *tga_palette = NULL; - int i, j; - unsigned char raw_data[4]; - int RLE_count = 0; - int RLE_repeating = 0; - int read_next_pixel = 1; - - // do a tiny bit of precessing - if ( tga_image_type >= 8 ) - { - tga_image_type -= 8; - tga_is_RLE = 1; - } - tga_inverted = 1 - ((tga_inverted >> 5) & 1); - - // If I'm paletted, then I'll use the number of bits from the palette - if ( tga_indexed ) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); - else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); - - if(!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency - return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); - - // tga info - *x = tga_width; - *y = tga_height; - if (comp) *comp = tga_comp; - - tga_data = (unsigned char*)stbi__malloc( (size_t)tga_width * tga_height * tga_comp ); - if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); - - // skip to the data's starting position (offset usually = 0) - stbi__skip(s, tga_offset ); - - if ( !tga_indexed && !tga_is_RLE && !tga_rgb16 ) { - for (i=0; i < tga_height; ++i) { - int row = tga_inverted ? tga_height -i - 1 : i; - stbi_uc *tga_row = tga_data + row*tga_width*tga_comp; - stbi__getn(s, tga_row, tga_width * tga_comp); - } - } else { - // do I need to load a palette? - if ( tga_indexed) - { - // any data to skip? (offset usually = 0) - stbi__skip(s, tga_palette_start ); - // load the palette - tga_palette = (unsigned char*)stbi__malloc( tga_palette_len * tga_comp ); - if (!tga_palette) { - STBI_FREE(tga_data); - return stbi__errpuc("outofmem", "Out of memory"); - } - if (tga_rgb16) { - stbi_uc *pal_entry = tga_palette; - STBI_ASSERT(tga_comp == STBI_rgb); - for (i=0; i < tga_palette_len; ++i) { - stbi__tga_read_rgb16(s, pal_entry); - pal_entry += tga_comp; - } - } else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { - STBI_FREE(tga_data); - STBI_FREE(tga_palette); - return stbi__errpuc("bad palette", "Corrupt TGA"); - } - } - // load the data - for (i=0; i < tga_width * tga_height; ++i) - { - // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? - if ( tga_is_RLE ) - { - if ( RLE_count == 0 ) - { - // yep, get the next byte as a RLE command - int RLE_cmd = stbi__get8(s); - RLE_count = 1 + (RLE_cmd & 127); - RLE_repeating = RLE_cmd >> 7; - read_next_pixel = 1; - } else if ( !RLE_repeating ) - { - read_next_pixel = 1; - } - } else - { - read_next_pixel = 1; - } - // OK, if I need to read a pixel, do it now - if ( read_next_pixel ) - { - // load however much data we did have - if ( tga_indexed ) - { - // read in index, then perform the lookup - int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); - if ( pal_idx >= tga_palette_len ) { - // invalid index - pal_idx = 0; - } - pal_idx *= tga_comp; - for (j = 0; j < tga_comp; ++j) { - raw_data[j] = tga_palette[pal_idx+j]; - } - } else if(tga_rgb16) { - STBI_ASSERT(tga_comp == STBI_rgb); - stbi__tga_read_rgb16(s, raw_data); - } else { - // read in the data raw - for (j = 0; j < tga_comp; ++j) { - raw_data[j] = stbi__get8(s); - } - } - // clear the reading flag for the next pixel - read_next_pixel = 0; - } // end of reading a pixel - - // copy data - for (j = 0; j < tga_comp; ++j) - tga_data[i*tga_comp+j] = raw_data[j]; - - // in case we're in RLE mode, keep counting down - --RLE_count; - } - // do I need to invert the image? - if ( tga_inverted ) - { - for (j = 0; j*2 < tga_height; ++j) - { - int index1 = j * tga_width * tga_comp; - int index2 = (tga_height - 1 - j) * tga_width * tga_comp; - for (i = tga_width * tga_comp; i > 0; --i) - { - unsigned char temp = tga_data[index1]; - tga_data[index1] = tga_data[index2]; - tga_data[index2] = temp; - ++index1; - ++index2; - } - } - } - // clear my palette, if I had one - if ( tga_palette != NULL ) - { - STBI_FREE( tga_palette ); - } - } - - // swap RGB - if the source data was RGB16, it already is in the right order - if (tga_comp >= 3 && !tga_rgb16) - { - unsigned char* tga_pixel = tga_data; - for (i=0; i < tga_width * tga_height; ++i) - { - unsigned char temp = tga_pixel[0]; - tga_pixel[0] = tga_pixel[2]; - tga_pixel[2] = temp; - tga_pixel += tga_comp; - } - } - - // convert to target component count - if (req_comp && req_comp != tga_comp) - tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); - - // the things I do to get rid of an error message, and yet keep - // Microsoft's C compilers happy... [8^( - tga_palette_start = tga_palette_len = tga_palette_bits = - tga_x_origin = tga_y_origin = 0; - // OK, done - return tga_data; -} -#endif - -// ************************************************************************************************* -// Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB - -#ifndef STBI_NO_PSD -static int stbi__psd_test(stbi__context *s) -{ - int r = (stbi__get32be(s) == 0x38425053); - stbi__rewind(s); - return r; -} - -static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - int pixelCount; - int channelCount, compression; - int channel, i, count, len; - int bitdepth; - int w,h; - stbi_uc *out; - - // Check identifier - if (stbi__get32be(s) != 0x38425053) // "8BPS" - return stbi__errpuc("not PSD", "Corrupt PSD image"); - - // Check file type version. - if (stbi__get16be(s) != 1) - return stbi__errpuc("wrong version", "Unsupported version of PSD image"); - - // Skip 6 reserved bytes. - stbi__skip(s, 6 ); - - // Read the number of channels (R, G, B, A, etc). - channelCount = stbi__get16be(s); - if (channelCount < 0 || channelCount > 16) - return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); - - // Read the rows and columns of the image. - h = stbi__get32be(s); - w = stbi__get32be(s); - - // Make sure the depth is 8 bits. - bitdepth = stbi__get16be(s); - if (bitdepth != 8 && bitdepth != 16) - return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); - - // Make sure the color mode is RGB. - // Valid options are: - // 0: Bitmap - // 1: Grayscale - // 2: Indexed color - // 3: RGB color - // 4: CMYK color - // 7: Multichannel - // 8: Duotone - // 9: Lab color - if (stbi__get16be(s) != 3) - return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); - - // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) - stbi__skip(s,stbi__get32be(s) ); - - // Skip the image resources. (resolution, pen tool paths, etc) - stbi__skip(s, stbi__get32be(s) ); - - // Skip the reserved data. - stbi__skip(s, stbi__get32be(s) ); - - // Find out if the data is compressed. - // Known values: - // 0: no compression - // 1: RLE compressed - compression = stbi__get16be(s); - if (compression > 1) - return stbi__errpuc("bad compression", "PSD has an unknown compression format"); - - // Create the destination image. - out = (stbi_uc *) stbi__malloc(4 * w*h); - if (!out) return stbi__errpuc("outofmem", "Out of memory"); - pixelCount = w*h; - - // Initialize the data to zero. - //memset( out, 0, pixelCount * 4 ); - - // Finally, the image data. - if (compression) { - // RLE as used by .PSD and .TIFF - // Loop until you get the number of unpacked bytes you are expecting: - // Read the next source byte into n. - // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. - // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. - // Else if n is 128, noop. - // Endloop - - // The RLE-compressed data is preceeded by a 2-byte data count for each row in the data, - // which we're going to just skip. - stbi__skip(s, h * channelCount * 2 ); - - // Read the RLE data by channel. - for (channel = 0; channel < 4; channel++) { - stbi_uc *p; - - p = out+channel; - if (channel >= channelCount) { - // Fill this channel with default data. - for (i = 0; i < pixelCount; i++, p += 4) - *p = (channel == 3 ? 255 : 0); - } else { - // Read the RLE data. - count = 0; - while (count < pixelCount) { - len = stbi__get8(s); - if (len == 128) { - // No-op. - } else if (len < 128) { - // Copy next len+1 bytes literally. - len++; - count += len; - while (len) { - *p = stbi__get8(s); - p += 4; - len--; - } - } else if (len > 128) { - stbi_uc val; - // Next -len+1 bytes in the dest are replicated from next source byte. - // (Interpret len as a negative 8-bit int.) - len ^= 0x0FF; - len += 2; - val = stbi__get8(s); - count += len; - while (len) { - *p = val; - p += 4; - len--; - } - } - } - } - } - - } else { - // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) - // where each channel consists of an 8-bit value for each pixel in the image. - - // Read the data by channel. - for (channel = 0; channel < 4; channel++) { - stbi_uc *p; - - p = out + channel; - if (channel >= channelCount) { - // Fill this channel with default data. - stbi_uc val = channel == 3 ? 255 : 0; - for (i = 0; i < pixelCount; i++, p += 4) - *p = val; - } else { - // Read the data. - if (bitdepth == 16) { - for (i = 0; i < pixelCount; i++, p += 4) - *p = (stbi_uc) (stbi__get16be(s) >> 8); - } else { - for (i = 0; i < pixelCount; i++, p += 4) - *p = stbi__get8(s); - } - } - } - } - - if (channelCount >= 4) { - for (i=0; i < w*h; ++i) { - unsigned char *pixel = out + 4*i; - if (pixel[3] != 0 && pixel[3] != 255) { - // remove weird white matte from PSD - float a = pixel[3] / 255.0f; - float ra = 1.0f / a; - float inv_a = 255.0f * (1 - ra); - pixel[0] = (unsigned char) (pixel[0]*ra + inv_a); - pixel[1] = (unsigned char) (pixel[1]*ra + inv_a); - pixel[2] = (unsigned char) (pixel[2]*ra + inv_a); - } - } - } - - if (req_comp && req_comp != 4) { - out = stbi__convert_format(out, 4, req_comp, w, h); - if (out == NULL) return out; // stbi__convert_format frees input on failure - } - - if (comp) *comp = 4; - *y = h; - *x = w; - - return out; -} -#endif - -// ************************************************************************************************* -// Softimage PIC loader -// by Tom Seddon -// -// See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format -// See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ - -#ifndef STBI_NO_PIC -static int stbi__pic_is4(stbi__context *s,const char *str) -{ - int i; - for (i=0; i<4; ++i) - if (stbi__get8(s) != (stbi_uc)str[i]) - return 0; - - return 1; -} - -static int stbi__pic_test_core(stbi__context *s) -{ - int i; - - if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) - return 0; - - for(i=0;i<84;++i) - stbi__get8(s); - - if (!stbi__pic_is4(s,"PICT")) - return 0; - - return 1; -} - -typedef struct -{ - stbi_uc size,type,channel; -} stbi__pic_packet; - -static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest) -{ - int mask=0x80, i; - - for (i=0; i<4; ++i, mask>>=1) { - if (channel & mask) { - if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short"); - dest[i]=stbi__get8(s); - } - } - - return dest; -} - -static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src) -{ - int mask=0x80,i; - - for (i=0;i<4; ++i, mask>>=1) - if (channel&mask) - dest[i]=src[i]; -} - -static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *comp, stbi_uc *result) -{ - int act_comp=0,num_packets=0,y,chained; - stbi__pic_packet packets[10]; - - // this will (should...) cater for even some bizarre stuff like having data - // for the same channel in multiple packets. - do { - stbi__pic_packet *packet; - - if (num_packets==sizeof(packets)/sizeof(packets[0])) - return stbi__errpuc("bad format","too many packets"); - - packet = &packets[num_packets++]; - - chained = stbi__get8(s); - packet->size = stbi__get8(s); - packet->type = stbi__get8(s); - packet->channel = stbi__get8(s); - - act_comp |= packet->channel; - - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (reading packets)"); - if (packet->size != 8) return stbi__errpuc("bad format","packet isn't 8bpp"); - } while (chained); - - *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? - - for(y=0; ytype) { - default: - return stbi__errpuc("bad format","packet has bad compression type"); - - case 0: {//uncompressed - int x; - - for(x=0;xchannel,dest)) - return 0; - break; - } - - case 1://Pure RLE - { - int left=width, i; - - while (left>0) { - stbi_uc count,value[4]; - - count=stbi__get8(s); - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pure read count)"); - - if (count > left) - count = (stbi_uc) left; - - if (!stbi__readval(s,packet->channel,value)) return 0; - - for(i=0; ichannel,dest,value); - left -= count; - } - } - break; - - case 2: {//Mixed RLE - int left=width; - while (left>0) { - int count = stbi__get8(s), i; - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (mixed read count)"); - - if (count >= 128) { // Repeated - stbi_uc value[4]; - - if (count==128) - count = stbi__get16be(s); - else - count -= 127; - if (count > left) - return stbi__errpuc("bad file","scanline overrun"); - - if (!stbi__readval(s,packet->channel,value)) - return 0; - - for(i=0;ichannel,dest,value); - } else { // Raw - ++count; - if (count>left) return stbi__errpuc("bad file","scanline overrun"); - - for(i=0;ichannel,dest)) - return 0; - } - left-=count; - } - break; - } - } - } - } - - return result; -} - -static stbi_uc *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_comp) -{ - stbi_uc *result; - int i, x,y; - - for (i=0; i<92; ++i) - stbi__get8(s); - - x = stbi__get16be(s); - y = stbi__get16be(s); - if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pic header)"); - if ((1 << 28) / x < y) return stbi__errpuc("too large", "Image too large to decode"); - - stbi__get32be(s); //skip `ratio' - stbi__get16be(s); //skip `fields' - stbi__get16be(s); //skip `pad' - - // intermediate buffer is RGBA - result = (stbi_uc *) stbi__malloc(x*y*4); - memset(result, 0xff, x*y*4); - - if (!stbi__pic_load_core(s,x,y,comp, result)) { - STBI_FREE(result); - result=0; - } - *px = x; - *py = y; - if (req_comp == 0) req_comp = *comp; - result=stbi__convert_format(result,4,req_comp,x,y); - - return result; -} - -static int stbi__pic_test(stbi__context *s) -{ - int r = stbi__pic_test_core(s); - stbi__rewind(s); - return r; -} -#endif - -// ************************************************************************************************* -// GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb - -#ifndef STBI_NO_GIF -typedef struct -{ - stbi__int16 prefix; - stbi_uc first; - stbi_uc suffix; -} stbi__gif_lzw; - -typedef struct -{ - int w,h; - stbi_uc *out, *old_out; // output buffer (always 4 components) - int flags, bgindex, ratio, transparent, eflags, delay; - stbi_uc pal[256][4]; - stbi_uc lpal[256][4]; - stbi__gif_lzw codes[4096]; - stbi_uc *color_table; - int parse, step; - int lflags; - int start_x, start_y; - int max_x, max_y; - int cur_x, cur_y; - int line_size; -} stbi__gif; - -static int stbi__gif_test_raw(stbi__context *s) -{ - int sz; - if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; - sz = stbi__get8(s); - if (sz != '9' && sz != '7') return 0; - if (stbi__get8(s) != 'a') return 0; - return 1; -} - -static int stbi__gif_test(stbi__context *s) -{ - int r = stbi__gif_test_raw(s); - stbi__rewind(s); - return r; -} - -static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp) -{ - int i; - for (i=0; i < num_entries; ++i) { - pal[i][2] = stbi__get8(s); - pal[i][1] = stbi__get8(s); - pal[i][0] = stbi__get8(s); - pal[i][3] = transp == i ? 0 : 255; - } -} - -static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info) -{ - stbi_uc version; - if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') - return stbi__err("not GIF", "Corrupt GIF"); - - version = stbi__get8(s); - if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF"); - if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); - - stbi__g_failure_reason = ""; - g->w = stbi__get16le(s); - g->h = stbi__get16le(s); - g->flags = stbi__get8(s); - g->bgindex = stbi__get8(s); - g->ratio = stbi__get8(s); - g->transparent = -1; - - if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments - - if (is_info) return 1; - - if (g->flags & 0x80) - stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1); - - return 1; -} - -static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp) -{ - stbi__gif* g = (stbi__gif*) stbi__malloc(sizeof(stbi__gif)); - if (!stbi__gif_header(s, g, comp, 1)) { - STBI_FREE(g); - stbi__rewind( s ); - return 0; - } - if (x) *x = g->w; - if (y) *y = g->h; - STBI_FREE(g); - return 1; -} - -static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code) -{ - stbi_uc *p, *c; - - // recurse to decode the prefixes, since the linked-list is backwards, - // and working backwards through an interleaved image would be nasty - if (g->codes[code].prefix >= 0) - stbi__out_gif_code(g, g->codes[code].prefix); - - if (g->cur_y >= g->max_y) return; - - p = &g->out[g->cur_x + g->cur_y]; - c = &g->color_table[g->codes[code].suffix * 4]; - - if (c[3] >= 128) { - p[0] = c[2]; - p[1] = c[1]; - p[2] = c[0]; - p[3] = c[3]; - } - g->cur_x += 4; - - if (g->cur_x >= g->max_x) { - g->cur_x = g->start_x; - g->cur_y += g->step; - - while (g->cur_y >= g->max_y && g->parse > 0) { - g->step = (1 << g->parse) * g->line_size; - g->cur_y = g->start_y + (g->step >> 1); - --g->parse; - } - } -} - -static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g) -{ - stbi_uc lzw_cs; - stbi__int32 len, init_code; - stbi__uint32 first; - stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear; - stbi__gif_lzw *p; - - lzw_cs = stbi__get8(s); - if (lzw_cs > 12) return NULL; - clear = 1 << lzw_cs; - first = 1; - codesize = lzw_cs + 1; - codemask = (1 << codesize) - 1; - bits = 0; - valid_bits = 0; - for (init_code = 0; init_code < clear; init_code++) { - g->codes[init_code].prefix = -1; - g->codes[init_code].first = (stbi_uc) init_code; - g->codes[init_code].suffix = (stbi_uc) init_code; - } - - // support no starting clear code - avail = clear+2; - oldcode = -1; - - len = 0; - for(;;) { - if (valid_bits < codesize) { - if (len == 0) { - len = stbi__get8(s); // start new block - if (len == 0) - return g->out; - } - --len; - bits |= (stbi__int32) stbi__get8(s) << valid_bits; - valid_bits += 8; - } else { - stbi__int32 code = bits & codemask; - bits >>= codesize; - valid_bits -= codesize; - // @OPTIMIZE: is there some way we can accelerate the non-clear path? - if (code == clear) { // clear code - codesize = lzw_cs + 1; - codemask = (1 << codesize) - 1; - avail = clear + 2; - oldcode = -1; - first = 0; - } else if (code == clear + 1) { // end of stream code - stbi__skip(s, len); - while ((len = stbi__get8(s)) > 0) - stbi__skip(s,len); - return g->out; - } else if (code <= avail) { - if (first) return stbi__errpuc("no clear code", "Corrupt GIF"); - - if (oldcode >= 0) { - p = &g->codes[avail++]; - if (avail > 4096) return stbi__errpuc("too many codes", "Corrupt GIF"); - p->prefix = (stbi__int16) oldcode; - p->first = g->codes[oldcode].first; - p->suffix = (code == avail) ? p->first : g->codes[code].first; - } else if (code == avail) - return stbi__errpuc("illegal code in raster", "Corrupt GIF"); - - stbi__out_gif_code(g, (stbi__uint16) code); - - if ((avail & codemask) == 0 && avail <= 0x0FFF) { - codesize++; - codemask = (1 << codesize) - 1; - } - - oldcode = code; - } else { - return stbi__errpuc("illegal code in raster", "Corrupt GIF"); - } - } - } -} - -static void stbi__fill_gif_background(stbi__gif *g, int x0, int y0, int x1, int y1) -{ - int x, y; - stbi_uc *c = g->pal[g->bgindex]; - for (y = y0; y < y1; y += 4 * g->w) { - for (x = x0; x < x1; x += 4) { - stbi_uc *p = &g->out[y + x]; - p[0] = c[2]; - p[1] = c[1]; - p[2] = c[0]; - p[3] = 0; - } - } -} - -// this function is designed to support animated gifs, although stb_image doesn't support it -static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp) -{ - int i; - stbi_uc *prev_out = 0; - - if (g->out == 0 && !stbi__gif_header(s, g, comp,0)) - return 0; // stbi__g_failure_reason set by stbi__gif_header - - prev_out = g->out; - g->out = (stbi_uc *) stbi__malloc(4 * g->w * g->h); - if (g->out == 0) return stbi__errpuc("outofmem", "Out of memory"); - - switch ((g->eflags & 0x1C) >> 2) { - case 0: // unspecified (also always used on 1st frame) - stbi__fill_gif_background(g, 0, 0, 4 * g->w, 4 * g->w * g->h); - break; - case 1: // do not dispose - if (prev_out) memcpy(g->out, prev_out, 4 * g->w * g->h); - g->old_out = prev_out; - break; - case 2: // dispose to background - if (prev_out) memcpy(g->out, prev_out, 4 * g->w * g->h); - stbi__fill_gif_background(g, g->start_x, g->start_y, g->max_x, g->max_y); - break; - case 3: // dispose to previous - if (g->old_out) { - for (i = g->start_y; i < g->max_y; i += 4 * g->w) - memcpy(&g->out[i + g->start_x], &g->old_out[i + g->start_x], g->max_x - g->start_x); - } - break; - } - - for (;;) { - switch (stbi__get8(s)) { - case 0x2C: /* Image Descriptor */ - { - int prev_trans = -1; - stbi__int32 x, y, w, h; - stbi_uc *o; - - x = stbi__get16le(s); - y = stbi__get16le(s); - w = stbi__get16le(s); - h = stbi__get16le(s); - if (((x + w) > (g->w)) || ((y + h) > (g->h))) - return stbi__errpuc("bad Image Descriptor", "Corrupt GIF"); - - g->line_size = g->w * 4; - g->start_x = x * 4; - g->start_y = y * g->line_size; - g->max_x = g->start_x + w * 4; - g->max_y = g->start_y + h * g->line_size; - g->cur_x = g->start_x; - g->cur_y = g->start_y; - - g->lflags = stbi__get8(s); - - if (g->lflags & 0x40) { - g->step = 8 * g->line_size; // first interlaced spacing - g->parse = 3; - } else { - g->step = g->line_size; - g->parse = 0; - } - - if (g->lflags & 0x80) { - stbi__gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1); - g->color_table = (stbi_uc *) g->lpal; - } else if (g->flags & 0x80) { - if (g->transparent >= 0 && (g->eflags & 0x01)) { - prev_trans = g->pal[g->transparent][3]; - g->pal[g->transparent][3] = 0; - } - g->color_table = (stbi_uc *) g->pal; - } else - return stbi__errpuc("missing color table", "Corrupt GIF"); - - o = stbi__process_gif_raster(s, g); - if (o == NULL) return NULL; - - if (prev_trans != -1) - g->pal[g->transparent][3] = (stbi_uc) prev_trans; - - return o; - } - - case 0x21: // Comment Extension. - { - int len; - if (stbi__get8(s) == 0xF9) { // Graphic Control Extension. - len = stbi__get8(s); - if (len == 4) { - g->eflags = stbi__get8(s); - g->delay = stbi__get16le(s); - g->transparent = stbi__get8(s); - } else { - stbi__skip(s, len); - break; - } - } - while ((len = stbi__get8(s)) != 0) - stbi__skip(s, len); - break; - } - - case 0x3B: // gif stream termination code - return (stbi_uc *) s; // using '1' causes warning on some compilers - - default: - return stbi__errpuc("unknown code", "Corrupt GIF"); - } - } - - STBI_NOTUSED(req_comp); -} - -static stbi_uc *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - stbi_uc *u = 0; - stbi__gif* g = (stbi__gif*) stbi__malloc(sizeof(stbi__gif)); - memset(g, 0, sizeof(*g)); - - u = stbi__gif_load_next(s, g, comp, req_comp); - if (u == (stbi_uc *) s) u = 0; // end of animated gif marker - if (u) { - *x = g->w; - *y = g->h; - if (req_comp && req_comp != 4) - u = stbi__convert_format(u, 4, req_comp, g->w, g->h); - } - else if (g->out) - STBI_FREE(g->out); - STBI_FREE(g); - return u; -} - -static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp) -{ - return stbi__gif_info_raw(s,x,y,comp); -} -#endif - -// ************************************************************************************************* -// Radiance RGBE HDR loader -// originally by Nicolas Schulz -#ifndef STBI_NO_HDR -static int stbi__hdr_test_core(stbi__context *s) -{ - const char *signature = "#?RADIANCE\n"; - int i; - for (i=0; signature[i]; ++i) - if (stbi__get8(s) != signature[i]) - return 0; - return 1; -} - -static int stbi__hdr_test(stbi__context* s) -{ - int r = stbi__hdr_test_core(s); - stbi__rewind(s); - return r; -} - -#define STBI__HDR_BUFLEN 1024 -static char *stbi__hdr_gettoken(stbi__context *z, char *buffer) -{ - int len=0; - char c = '\0'; - - c = (char) stbi__get8(z); - - while (!stbi__at_eof(z) && c != '\n') { - buffer[len++] = c; - if (len == STBI__HDR_BUFLEN-1) { - // flush to end of line - while (!stbi__at_eof(z) && stbi__get8(z) != '\n') - ; - break; - } - c = (char) stbi__get8(z); - } - - buffer[len] = 0; - return buffer; -} - -static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp) -{ - if ( input[3] != 0 ) { - float f1; - // Exponent - f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8)); - if (req_comp <= 2) - output[0] = (input[0] + input[1] + input[2]) * f1 / 3; - else { - output[0] = input[0] * f1; - output[1] = input[1] * f1; - output[2] = input[2] * f1; - } - if (req_comp == 2) output[1] = 1; - if (req_comp == 4) output[3] = 1; - } else { - switch (req_comp) { - case 4: output[3] = 1; /* fallthrough */ - case 3: output[0] = output[1] = output[2] = 0; - break; - case 2: output[1] = 1; /* fallthrough */ - case 1: output[0] = 0; - break; - } - } -} - -static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - char buffer[STBI__HDR_BUFLEN]; - char *token; - int valid = 0; - int width, height; - stbi_uc *scanline; - float *hdr_data; - int len; - unsigned char count, value; - int i, j, k, c1,c2, z; - - - // Check identifier - if (strcmp(stbi__hdr_gettoken(s,buffer), "#?RADIANCE") != 0) - return stbi__errpf("not HDR", "Corrupt HDR image"); - - // Parse header - for(;;) { - token = stbi__hdr_gettoken(s,buffer); - if (token[0] == 0) break; - if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; - } - - if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format"); - - // Parse width and height - // can't use sscanf() if we're not using stdio! - token = stbi__hdr_gettoken(s,buffer); - if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); - token += 3; - height = (int) strtol(token, &token, 10); - while (*token == ' ') ++token; - if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); - token += 3; - width = (int) strtol(token, NULL, 10); - - *x = width; - *y = height; - - if (comp) *comp = 3; - if (req_comp == 0) req_comp = 3; - - // Read data - hdr_data = (float *) stbi__malloc(height * width * req_comp * sizeof(float)); - - // Load image data - // image data is stored as some number of sca - if ( width < 8 || width >= 32768) { - // Read flat data - for (j=0; j < height; ++j) { - for (i=0; i < width; ++i) { - stbi_uc rgbe[4]; - main_decode_loop: - stbi__getn(s, rgbe, 4); - stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp); - } - } - } else { - // Read RLE-encoded data - scanline = NULL; - - for (j = 0; j < height; ++j) { - c1 = stbi__get8(s); - c2 = stbi__get8(s); - len = stbi__get8(s); - if (c1 != 2 || c2 != 2 || (len & 0x80)) { - // not run-length encoded, so we have to actually use THIS data as a decoded - // pixel (note this can't be a valid pixel--one of RGB must be >= 128) - stbi_uc rgbe[4]; - rgbe[0] = (stbi_uc) c1; - rgbe[1] = (stbi_uc) c2; - rgbe[2] = (stbi_uc) len; - rgbe[3] = (stbi_uc) stbi__get8(s); - stbi__hdr_convert(hdr_data, rgbe, req_comp); - i = 1; - j = 0; - STBI_FREE(scanline); - goto main_decode_loop; // yes, this makes no sense - } - len <<= 8; - len |= stbi__get8(s); - if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } - if (scanline == NULL) scanline = (stbi_uc *) stbi__malloc(width * 4); - - for (k = 0; k < 4; ++k) { - i = 0; - while (i < width) { - count = stbi__get8(s); - if (count > 128) { - // Run - value = stbi__get8(s); - count -= 128; - for (z = 0; z < count; ++z) - scanline[i++ * 4 + k] = value; - } else { - // Dump - for (z = 0; z < count; ++z) - scanline[i++ * 4 + k] = stbi__get8(s); - } - } - } - for (i=0; i < width; ++i) - stbi__hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp); - } - STBI_FREE(scanline); - } - - return hdr_data; -} - -static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp) -{ - char buffer[STBI__HDR_BUFLEN]; - char *token; - int valid = 0; - - if (stbi__hdr_test(s) == 0) { - stbi__rewind( s ); - return 0; - } - - for(;;) { - token = stbi__hdr_gettoken(s,buffer); - if (token[0] == 0) break; - if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; - } - - if (!valid) { - stbi__rewind( s ); - return 0; - } - token = stbi__hdr_gettoken(s,buffer); - if (strncmp(token, "-Y ", 3)) { - stbi__rewind( s ); - return 0; - } - token += 3; - *y = (int) strtol(token, &token, 10); - while (*token == ' ') ++token; - if (strncmp(token, "+X ", 3)) { - stbi__rewind( s ); - return 0; - } - token += 3; - *x = (int) strtol(token, NULL, 10); - *comp = 3; - return 1; -} -#endif // STBI_NO_HDR - -#ifndef STBI_NO_BMP -static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp) -{ - void *p; - stbi__bmp_data info; - - info.all_a = 255; - p = stbi__bmp_parse_header(s, &info); - stbi__rewind( s ); - if (p == NULL) - return 0; - *x = s->img_x; - *y = s->img_y; - *comp = info.ma ? 4 : 3; - return 1; -} -#endif - -#ifndef STBI_NO_PSD -static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp) -{ - int channelCount; - if (stbi__get32be(s) != 0x38425053) { - stbi__rewind( s ); - return 0; - } - if (stbi__get16be(s) != 1) { - stbi__rewind( s ); - return 0; - } - stbi__skip(s, 6); - channelCount = stbi__get16be(s); - if (channelCount < 0 || channelCount > 16) { - stbi__rewind( s ); - return 0; - } - *y = stbi__get32be(s); - *x = stbi__get32be(s); - if (stbi__get16be(s) != 8) { - stbi__rewind( s ); - return 0; - } - if (stbi__get16be(s) != 3) { - stbi__rewind( s ); - return 0; - } - *comp = 4; - return 1; -} -#endif - -#ifndef STBI_NO_PIC -static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp) -{ - int act_comp=0,num_packets=0,chained; - stbi__pic_packet packets[10]; - - if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) { - stbi__rewind(s); - return 0; - } - - stbi__skip(s, 88); - - *x = stbi__get16be(s); - *y = stbi__get16be(s); - if (stbi__at_eof(s)) { - stbi__rewind( s); - return 0; - } - if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) { - stbi__rewind( s ); - return 0; - } - - stbi__skip(s, 8); - - do { - stbi__pic_packet *packet; - - if (num_packets==sizeof(packets)/sizeof(packets[0])) - return 0; - - packet = &packets[num_packets++]; - chained = stbi__get8(s); - packet->size = stbi__get8(s); - packet->type = stbi__get8(s); - packet->channel = stbi__get8(s); - act_comp |= packet->channel; - - if (stbi__at_eof(s)) { - stbi__rewind( s ); - return 0; - } - if (packet->size != 8) { - stbi__rewind( s ); - return 0; - } - } while (chained); - - *comp = (act_comp & 0x10 ? 4 : 3); - - return 1; -} -#endif - -// ************************************************************************************************* -// Portable Gray Map and Portable Pixel Map loader -// by Ken Miller -// -// PGM: http://netpbm.sourceforge.net/doc/pgm.html -// PPM: http://netpbm.sourceforge.net/doc/ppm.html -// -// Known limitations: -// Does not support comments in the header section -// Does not support ASCII image data (formats P2 and P3) -// Does not support 16-bit-per-channel - -#ifndef STBI_NO_PNM - -static int stbi__pnm_test(stbi__context *s) -{ - char p, t; - p = (char) stbi__get8(s); - t = (char) stbi__get8(s); - if (p != 'P' || (t != '5' && t != '6')) { - stbi__rewind( s ); - return 0; - } - return 1; -} - -static stbi_uc *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp) -{ - stbi_uc *out; - if (!stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n)) - return 0; - *x = s->img_x; - *y = s->img_y; - *comp = s->img_n; - - out = (stbi_uc *) stbi__malloc(s->img_n * s->img_x * s->img_y); - if (!out) return stbi__errpuc("outofmem", "Out of memory"); - stbi__getn(s, out, s->img_n * s->img_x * s->img_y); - - if (req_comp && req_comp != s->img_n) { - out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); - if (out == NULL) return out; // stbi__convert_format frees input on failure - } - return out; -} - -static int stbi__pnm_isspace(char c) -{ - return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; -} - -static void stbi__pnm_skip_whitespace(stbi__context *s, char *c) -{ - for (;;) { - while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) - *c = (char) stbi__get8(s); - - if (stbi__at_eof(s) || *c != '#') - break; - - while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' ) - *c = (char) stbi__get8(s); - } -} - -static int stbi__pnm_isdigit(char c) -{ - return c >= '0' && c <= '9'; -} - -static int stbi__pnm_getinteger(stbi__context *s, char *c) -{ - int value = 0; - - while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { - value = value*10 + (*c - '0'); - *c = (char) stbi__get8(s); - } - - return value; -} - -static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp) -{ - int maxv; - char c, p, t; - - stbi__rewind( s ); - - // Get identifier - p = (char) stbi__get8(s); - t = (char) stbi__get8(s); - if (p != 'P' || (t != '5' && t != '6')) { - stbi__rewind( s ); - return 0; - } - - *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm - - c = (char) stbi__get8(s); - stbi__pnm_skip_whitespace(s, &c); - - *x = stbi__pnm_getinteger(s, &c); // read width - stbi__pnm_skip_whitespace(s, &c); - - *y = stbi__pnm_getinteger(s, &c); // read height - stbi__pnm_skip_whitespace(s, &c); - - maxv = stbi__pnm_getinteger(s, &c); // read max value - - if (maxv > 255) - return stbi__err("max value > 255", "PPM image not 8-bit"); - else - return 1; -} -#endif - -static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp) -{ - #ifndef STBI_NO_JPEG - if (stbi__jpeg_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PNG - if (stbi__png_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_GIF - if (stbi__gif_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_BMP - if (stbi__bmp_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PSD - if (stbi__psd_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PIC - if (stbi__pic_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_PNM - if (stbi__pnm_info(s, x, y, comp)) return 1; - #endif - - #ifndef STBI_NO_HDR - if (stbi__hdr_info(s, x, y, comp)) return 1; - #endif - - // test tga last because it's a crappy test! - #ifndef STBI_NO_TGA - if (stbi__tga_info(s, x, y, comp)) - return 1; - #endif - return stbi__err("unknown image type", "Image not of any known type, or corrupt"); -} - -#ifndef STBI_NO_STDIO -STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp) -{ - FILE *f = stbi__fopen(filename, "rb"); - int result; - if (!f) return stbi__err("can't fopen", "Unable to open file"); - result = stbi_info_from_file(f, x, y, comp); - fclose(f); - return result; -} - -STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) -{ - int r; - stbi__context s; - long pos = ftell(f); - stbi__start_file(&s, f); - r = stbi__info_main(&s,x,y,comp); - fseek(f,pos,SEEK_SET); - return r; -} -#endif // !STBI_NO_STDIO - -STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp) -{ - stbi__context s; - stbi__start_mem(&s,buffer,len); - return stbi__info_main(&s,x,y,comp); -} - -STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp) -{ - stbi__context s; - stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); - return stbi__info_main(&s,x,y,comp); -} - -#endif // STB_IMAGE_IMPLEMENTATION - -/* - revision history: - 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes - 2.11 (2016-04-02) allocate large structures on the stack - remove white matting for transparent PSD - fix reported channel count for PNG & BMP - re-enable SSE2 in non-gcc 64-bit - support RGB-formatted JPEG - read 16-bit PNGs (only as 8-bit) - 2.10 (2016-01-22) avoid warning introduced in 2.09 by STBI_REALLOC_SIZED - 2.09 (2016-01-16) allow comments in PNM files - 16-bit-per-pixel TGA (not bit-per-component) - info() for TGA could break due to .hdr handling - info() for BMP to shares code instead of sloppy parse - can use STBI_REALLOC_SIZED if allocator doesn't support realloc - code cleanup - 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA - 2.07 (2015-09-13) fix compiler warnings - partial animated GIF support - limited 16-bpc PSD support - #ifdef unused functions - bug with < 92 byte PIC,PNM,HDR,TGA - 2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value - 2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning - 2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit - 2.03 (2015-04-12) extra corruption checking (mmozeiko) - stbi_set_flip_vertically_on_load (nguillemot) - fix NEON support; fix mingw support - 2.02 (2015-01-19) fix incorrect assert, fix warning - 2.01 (2015-01-17) fix various warnings; suppress SIMD on gcc 32-bit without -msse2 - 2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG - 2.00 (2014-12-25) optimize JPG, including x86 SSE2 & NEON SIMD (ryg) - progressive JPEG (stb) - PGM/PPM support (Ken Miller) - STBI_MALLOC,STBI_REALLOC,STBI_FREE - GIF bugfix -- seemingly never worked - STBI_NO_*, STBI_ONLY_* - 1.48 (2014-12-14) fix incorrectly-named assert() - 1.47 (2014-12-14) 1/2/4-bit PNG support, both direct and paletted (Omar Cornut & stb) - optimize PNG (ryg) - fix bug in interlaced PNG with user-specified channel count (stb) - 1.46 (2014-08-26) - fix broken tRNS chunk (colorkey-style transparency) in non-paletted PNG - 1.45 (2014-08-16) - fix MSVC-ARM internal compiler error by wrapping malloc - 1.44 (2014-08-07) - various warning fixes from Ronny Chevalier - 1.43 (2014-07-15) - fix MSVC-only compiler problem in code changed in 1.42 - 1.42 (2014-07-09) - don't define _CRT_SECURE_NO_WARNINGS (affects user code) - fixes to stbi__cleanup_jpeg path - added STBI_ASSERT to avoid requiring assert.h - 1.41 (2014-06-25) - fix search&replace from 1.36 that messed up comments/error messages - 1.40 (2014-06-22) - fix gcc struct-initialization warning - 1.39 (2014-06-15) - fix to TGA optimization when req_comp != number of components in TGA; - fix to GIF loading because BMP wasn't rewinding (whoops, no GIFs in my test suite) - add support for BMP version 5 (more ignored fields) - 1.38 (2014-06-06) - suppress MSVC warnings on integer casts truncating values - fix accidental rename of 'skip' field of I/O - 1.37 (2014-06-04) - remove duplicate typedef - 1.36 (2014-06-03) - convert to header file single-file library - if de-iphone isn't set, load iphone images color-swapped instead of returning NULL - 1.35 (2014-05-27) - various warnings - fix broken STBI_SIMD path - fix bug where stbi_load_from_file no longer left file pointer in correct place - fix broken non-easy path for 32-bit BMP (possibly never used) - TGA optimization by Arseny Kapoulkine - 1.34 (unknown) - use STBI_NOTUSED in stbi__resample_row_generic(), fix one more leak in tga failure case - 1.33 (2011-07-14) - make stbi_is_hdr work in STBI_NO_HDR (as specified), minor compiler-friendly improvements - 1.32 (2011-07-13) - support for "info" function for all supported filetypes (SpartanJ) - 1.31 (2011-06-20) - a few more leak fixes, bug in PNG handling (SpartanJ) - 1.30 (2011-06-11) - added ability to load files via callbacks to accomidate custom input streams (Ben Wenger) - removed deprecated format-specific test/load functions - removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway - error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha) - fix inefficiency in decoding 32-bit BMP (David Woo) - 1.29 (2010-08-16) - various warning fixes from Aurelien Pocheville - 1.28 (2010-08-01) - fix bug in GIF palette transparency (SpartanJ) - 1.27 (2010-08-01) - cast-to-stbi_uc to fix warnings - 1.26 (2010-07-24) - fix bug in file buffering for PNG reported by SpartanJ - 1.25 (2010-07-17) - refix trans_data warning (Won Chun) - 1.24 (2010-07-12) - perf improvements reading from files on platforms with lock-heavy fgetc() - minor perf improvements for jpeg - deprecated type-specific functions so we'll get feedback if they're needed - attempt to fix trans_data warning (Won Chun) - 1.23 fixed bug in iPhone support - 1.22 (2010-07-10) - removed image *writing* support - stbi_info support from Jetro Lauha - GIF support from Jean-Marc Lienher - iPhone PNG-extensions from James Brown - warning-fixes from Nicolas Schulz and Janez Zemva (i.stbi__err. Janez (U+017D)emva) - 1.21 fix use of 'stbi_uc' in header (reported by jon blow) - 1.20 added support for Softimage PIC, by Tom Seddon - 1.19 bug in interlaced PNG corruption check (found by ryg) - 1.18 (2008-08-02) - fix a threading bug (local mutable static) - 1.17 support interlaced PNG - 1.16 major bugfix - stbi__convert_format converted one too many pixels - 1.15 initialize some fields for thread safety - 1.14 fix threadsafe conversion bug - header-file-only version (#define STBI_HEADER_FILE_ONLY before including) - 1.13 threadsafe - 1.12 const qualifiers in the API - 1.11 Support installable IDCT, colorspace conversion routines - 1.10 Fixes for 64-bit (don't use "unsigned long") - optimized upsampling by Fabian "ryg" Giesen - 1.09 Fix format-conversion for PSD code (bad global variables!) - 1.08 Thatcher Ulrich's PSD code integrated by Nicolas Schulz - 1.07 attempt to fix C++ warning/errors again - 1.06 attempt to fix C++ warning/errors again - 1.05 fix TGA loading to return correct *comp and use good luminance calc - 1.04 default float alpha is 1, not 255; use 'void *' for stbi_image_free - 1.03 bugfixes to STBI_NO_STDIO, STBI_NO_HDR - 1.02 support for (subset of) HDR files, float interface for preferred access to them - 1.01 fix bug: possible bug in handling right-side up bmps... not sure - fix bug: the stbi__bmp_load() and stbi__tga_load() functions didn't work at all - 1.00 interface to zlib that skips zlib header - 0.99 correct handling of alpha in palette - 0.98 TGA loader by lonesock; dynamically add loaders (untested) - 0.97 jpeg errors on too large a file; also catch another malloc failure - 0.96 fix detection of invalid v value - particleman@mollyrocket forum - 0.95 during header scan, seek to markers in case of padding - 0.94 STBI_NO_STDIO to disable stdio usage; rename all #defines the same - 0.93 handle jpegtran output; verbose errors - 0.92 read 4,8,16,24,32-bit BMP files of several formats - 0.91 output 24-bit Windows 3.0 BMP files - 0.90 fix a few more warnings; bump version number to approach 1.0 - 0.61 bugfixes due to Marc LeBlanc, Christopher Lloyd - 0.60 fix compiling as c++ - 0.59 fix warnings: merge Dave Moore's -Wall fixes - 0.58 fix bug: zlib uncompressed mode len/nlen was wrong endian - 0.57 fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available - 0.56 fix bug: zlib uncompressed mode len vs. nlen - 0.55 fix bug: restart_interval not initialized to 0 - 0.54 allow NULL for 'int *comp' - 0.53 fix bug in png 3->4; speedup png decoding - 0.52 png handles req_comp=3,4 directly; minor cleanup; jpeg comments - 0.51 obey req_comp requests, 1-component jpegs return as 1-component, - on 'test' only check type, not whether we support this variant - 0.50 (2006-11-19) - first released version -*/ diff --git a/3rdparty/bgfx/3rdparty/stb/stb_rect_pack.h b/3rdparty/bgfx/3rdparty/stb/stb_rect_pack.h index b09786b..45534f8 100644 --- a/3rdparty/bgfx/3rdparty/stb/stb_rect_pack.h +++ b/3rdparty/bgfx/3rdparty/stb/stb_rect_pack.h @@ -1,7 +1,18 @@ #if defined(__GNUC__) || defined(__clang__) +# if defined(__has_warning) +# define STB_HAS_WARNING __has_warning +# else +# define STB_HAS_WARNING(w) 1 +# endif +# if defined(__clang__) +# pragma clang diagnostic ignored "-Wunknown-pragmas" +# endif // defined(__clang__) # pragma GCC diagnostic ignored "-Wtype-limits" # pragma GCC diagnostic ignored "-Wunused-function" # pragma GCC diagnostic ignored "-Wunused-parameter" +# if STB_HAS_WARNING("-Wunused-but-set-variable") +# pragma GCC diagnostic ignored "-Wunused-but-set-variable" +# endif #else # pragma warning(disable:4100) // C4100: 'c': unreferenced formal parameter #endif diff --git a/3rdparty/bgfx/3rdparty/stb/stb_truetype.h b/3rdparty/bgfx/3rdparty/stb/stb_truetype.h index c99f5d6..7e4eb48 100644 --- a/3rdparty/bgfx/3rdparty/stb/stb_truetype.h +++ b/3rdparty/bgfx/3rdparty/stb/stb_truetype.h @@ -1,11 +1,11 @@ -#ifdef __GNUC__ -# pragma GCC diagnostic ignored "-Wshadow" -#elif defined(_MSC_VER) -# pragma warning(disable:4456) // warning C4456: declaration of 'k' hides previous local declaration +#if defined(__has_warning) +# if __has_warning("-Wcomma") +# pragma GCC diagnostic ignored "-Wcomma" // Possible misuse of comma operator here +# endif #endif -// stb_truetype.h - v1.07 - public domain -// authored from 2009-2015 by Sean Barrett / RAD Game Tools +// stb_truetype.h - v1.15 - public domain +// authored from 2009-2016 by Sean Barrett / RAD Game Tools // // This library processes TrueType files: // parse files @@ -26,10 +26,12 @@ // // Mikko Mononen: compound shape support, more cmap formats // Tor Andersson: kerning, subpixel rendering +// Dougall Johnson: OpenType / Type 2 font handling // // Misc other: // Ryan Gordon // Simon Glass +// github:IntellectualKitty // // Bug/warning reports/fixes: // "Zer" on mollyrocket (with fix) @@ -54,9 +56,14 @@ // Higor Euripedes // Thomas Fields // Derek Vinyard +// Cort Stratton // // VERSION HISTORY // +// 1.15 (2017-03-03) make more arguments const +// 1.14 (2017-01-16) num-fonts-in-TTC function +// 1.13 (2017-01-02) support OpenType fonts, certain Apple fonts +// 1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual // 1.11 (2016-04-02) fix unused-variable warning // 1.10 (2016-04-02) user-defined fabs(); rare memory leak; remove duplicate typedef // 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use allocation userdata properly @@ -66,20 +73,12 @@ // fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?); // fixed an assert() bug in the new rasterizer // replace assert() with STBTT_assert() in new rasterizer -// 1.06 (2015-07-14) performance improvements (~35% faster on x86 and x64 on test machine) -// also more precise AA rasterizer, except if shapes overlap -// remove need for STBTT_sort -// 1.05 (2015-04-15) fix misplaced definitions for STBTT_STATIC -// 1.04 (2015-04-15) typo in example -// 1.03 (2015-04-12) STBTT_STATIC, fix memory leak in new packing, various fixes // // Full history can be found at the end of this file. // // LICENSE // -// This software is dual-licensed to the public domain and under the following -// license: you are granted a perpetual, irrevocable license to copy, modify, -// publish, and distribute this file as you see fit. +// See end of file for license information. // // USAGE // @@ -106,7 +105,8 @@ // // "Load" a font file from a memory buffer (you have to keep the buffer loaded) // stbtt_InitFont() -// stbtt_GetFontOffsetForIndex() -- use for TTC font collections +// stbtt_GetFontOffsetForIndex() -- indexing for TTC font collections +// stbtt_GetNumberOfFonts() -- number of fonts for TTC font collections // // Render a unicode codepoint to a bitmap // stbtt_GetCodepointBitmap() -- allocates and returns a bitmap @@ -464,6 +464,14 @@ int main(int arg, char **argv) extern "C" { #endif +// private structure +typedef struct +{ + unsigned char *data; + int cursor; + int size; +} stbtt__buf; + ////////////////////////////////////////////////////////////////////////////// // // TEXTURE BAKING API @@ -493,7 +501,7 @@ typedef struct float x1,y1,s1,t1; // bottom-right } stbtt_aligned_quad; -STBTT_DEF void stbtt_GetBakedQuad(stbtt_bakedchar *chardata, int pw, int ph, // same data as above +STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph, // same data as above int char_index, // character to display float *xpos, float *ypos, // pointers to current position in screen pixel space stbtt_aligned_quad *q, // output: quad to draw @@ -533,7 +541,7 @@ typedef struct stbrp_rect stbrp_rect; STBTT_DEF int stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, int width, int height, int stride_in_bytes, int padding, void *alloc_context); // Initializes a packing context stored in the passed-in stbtt_pack_context. // Future calls using this context will pack characters into the bitmap passed -// in here: a 1-channel bitmap that is weight x height. stride_in_bytes is +// in here: a 1-channel bitmap that is width * height. stride_in_bytes is // the distance from one row to the next (or 0 to mean they are packed tightly // together). "padding" is the amount of padding to leave between each // character (normally you want '1' for bitmaps you'll use as textures with @@ -593,15 +601,15 @@ STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h // To use with PackFontRangesGather etc., you must set it before calls // call to PackFontRangesGatherRects. -STBTT_DEF void stbtt_GetPackedQuad(stbtt_packedchar *chardata, int pw, int ph, // same data as above +STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, // same data as above int char_index, // character to display float *xpos, float *ypos, // pointers to current position in screen pixel space stbtt_aligned_quad *q, // output: quad to draw int align_to_integer); -STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects); +STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects); STBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, stbrp_rect *rects, int num_rects); -STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects); +STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects); // Calling these functions in sequence is roughly equivalent to calling // stbtt_PackFontRanges(). If you more control over the packing of multiple // fonts, or if you want to pack custom data into a font texture, take a look @@ -632,14 +640,19 @@ struct stbtt_pack_context { // // +STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data); +// This function will determine the number of fonts in a font file. TrueType +// collection (.ttc) files may contain multiple fonts, while TrueType font +// (.ttf) files only contain one font. The number of fonts can be used for +// indexing with the previous function where the index is between zero and one +// less than the total fonts. If an error occurs, -1 is returned. + STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index); // Each .ttf/.ttc file may have more than one font. Each font has a sequential // index number starting from 0. Call this function to get the font offset for // a given index; it returns -1 if the index is out of range. A regular .ttf // file will only define one font and it always be at offset 0, so it will -// return '0' for index 0, and -1 for all other indices. You can just skip -// this step if you know it's that kind of font. - +// return '0' for index 0, and -1 for all other indices. // The following structure is defined publically so you can declare one on // the stack or as a global or etc, but you should treat it as opaque. @@ -654,6 +667,13 @@ struct stbtt_fontinfo int loca,head,glyf,hhea,hmtx,kern; // table locations as offset from start of .ttf int index_map; // a cmap mapping for our chosen character encoding int indexToLocFormat; // format needed to map from glyph index to glyph + + stbtt__buf cff; // cff font data + stbtt__buf charstrings; // the charstring index + stbtt__buf gsubrs; // global charstring subroutines index + stbtt__buf subrs; // private charstring subroutines index + stbtt__buf fontdicts; // array of font dicts + stbtt__buf fdselect; // map from glyph to fontdict }; STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset); @@ -731,7 +751,8 @@ STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, in enum { STBTT_vmove=1, STBTT_vline, - STBTT_vcurve + STBTT_vcurve, + STBTT_vcubic }; #endif @@ -740,7 +761,7 @@ STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, in #define stbtt_vertex_type short // can't use stbtt_int16 because that's not visible in the header file typedef struct { - stbtt_vertex_type x,y,cx,cy; + stbtt_vertex_type x,y,cx,cy,cx1,cy1; unsigned char type,padding; } stbtt_vertex; #endif @@ -962,6 +983,152 @@ typedef int stbtt__test_oversample_pow2[(STBTT_MAX_OVERSAMPLE & (STBTT_MAX_OVERS #define STBTT__NOTUSED(v) (void)sizeof(v) #endif +////////////////////////////////////////////////////////////////////////// +// +// stbtt__buf helpers to parse data from file +// + +static stbtt_uint8 stbtt__buf_get8(stbtt__buf *b) +{ + if (b->cursor >= b->size) + return 0; + return b->data[b->cursor++]; +} + +static stbtt_uint8 stbtt__buf_peek8(stbtt__buf *b) +{ + if (b->cursor >= b->size) + return 0; + return b->data[b->cursor]; +} + +static void stbtt__buf_seek(stbtt__buf *b, int o) +{ + STBTT_assert(!(o > b->size || o < 0)); + b->cursor = (o > b->size || o < 0) ? b->size : o; +} + +static void stbtt__buf_skip(stbtt__buf *b, int o) +{ + stbtt__buf_seek(b, b->cursor + o); +} + +static stbtt_uint32 stbtt__buf_get(stbtt__buf *b, int n) +{ + stbtt_uint32 v = 0; + int i; + STBTT_assert(n >= 1 && n <= 4); + for (i = 0; i < n; i++) + v = (v << 8) | stbtt__buf_get8(b); + return v; +} + +static stbtt__buf stbtt__new_buf(const void *p, size_t size) +{ + stbtt__buf r; + STBTT_assert(size < 0x40000000); + r.data = (stbtt_uint8*) p; + r.size = (int) size; + r.cursor = 0; + return r; +} + +#define stbtt__buf_get16(b) stbtt__buf_get((b), 2) +#define stbtt__buf_get32(b) stbtt__buf_get((b), 4) + +static stbtt__buf stbtt__buf_range(const stbtt__buf *b, int o, int s) +{ + stbtt__buf r = stbtt__new_buf(NULL, 0); + if (o < 0 || s < 0 || o > b->size || s > b->size - o) return r; + r.data = b->data + o; + r.size = s; + return r; +} + +static stbtt__buf stbtt__cff_get_index(stbtt__buf *b) +{ + int count, start, offsize; + start = b->cursor; + count = stbtt__buf_get16(b); + if (count) { + offsize = stbtt__buf_get8(b); + STBTT_assert(offsize >= 1 && offsize <= 4); + stbtt__buf_skip(b, offsize * count); + stbtt__buf_skip(b, stbtt__buf_get(b, offsize) - 1); + } + return stbtt__buf_range(b, start, b->cursor - start); +} + +static stbtt_uint32 stbtt__cff_int(stbtt__buf *b) +{ + int b0 = stbtt__buf_get8(b); + if (b0 >= 32 && b0 <= 246) return b0 - 139; + else if (b0 >= 247 && b0 <= 250) return (b0 - 247)*256 + stbtt__buf_get8(b) + 108; + else if (b0 >= 251 && b0 <= 254) return -(b0 - 251)*256 - stbtt__buf_get8(b) - 108; + else if (b0 == 28) return stbtt__buf_get16(b); + else if (b0 == 29) return stbtt__buf_get32(b); + STBTT_assert(0); + return 0; +} + +static void stbtt__cff_skip_operand(stbtt__buf *b) { + int v, b0 = stbtt__buf_peek8(b); + STBTT_assert(b0 >= 28); + if (b0 == 30) { + stbtt__buf_skip(b, 1); + while (b->cursor < b->size) { + v = stbtt__buf_get8(b); + if ((v & 0xF) == 0xF || (v >> 4) == 0xF) + break; + } + } else { + stbtt__cff_int(b); + } +} + +static stbtt__buf stbtt__dict_get(stbtt__buf *b, int key) +{ + stbtt__buf_seek(b, 0); + while (b->cursor < b->size) { + int start = b->cursor, end, op; + while (stbtt__buf_peek8(b) >= 28) + stbtt__cff_skip_operand(b); + end = b->cursor; + op = stbtt__buf_get8(b); + if (op == 12) op = stbtt__buf_get8(b) | 0x100; + if (op == key) return stbtt__buf_range(b, start, end-start); + } + return stbtt__buf_range(b, 0, 0); +} + +static void stbtt__dict_get_ints(stbtt__buf *b, int key, int outcount, stbtt_uint32 *out) +{ + int i; + stbtt__buf operands = stbtt__dict_get(b, key); + for (i = 0; i < outcount && operands.cursor < operands.size; i++) + out[i] = stbtt__cff_int(&operands); +} + +static int stbtt__cff_index_count(stbtt__buf *b) +{ + stbtt__buf_seek(b, 0); + return stbtt__buf_get16(b); +} + +static stbtt__buf stbtt__cff_index_get(stbtt__buf b, int i) +{ + int count, offsize, start, end; + stbtt__buf_seek(&b, 0); + count = stbtt__buf_get16(&b); + offsize = stbtt__buf_get8(&b); + STBTT_assert(i >= 0 && i < count); + STBTT_assert(offsize >= 1 && offsize <= 4); + stbtt__buf_skip(&b, i*offsize); + start = stbtt__buf_get(&b, offsize); + end = stbtt__buf_get(&b, offsize); + return stbtt__buf_range(&b, 2+(count+1)*offsize+start, end - start); +} + ////////////////////////////////////////////////////////////////////////// // // accessors to parse data from file @@ -974,32 +1141,22 @@ typedef int stbtt__test_oversample_pow2[(STBTT_MAX_OVERSAMPLE & (STBTT_MAX_OVERS #define ttCHAR(p) (* (stbtt_int8 *) (p)) #define ttFixed(p) ttLONG(p) -#if defined(STB_TRUETYPE_BIGENDIAN) && !defined(ALLOW_UNALIGNED_TRUETYPE) - - #define ttUSHORT(p) (* (stbtt_uint16 *) (p)) - #define ttSHORT(p) (* (stbtt_int16 *) (p)) - #define ttULONG(p) (* (stbtt_uint32 *) (p)) - #define ttLONG(p) (* (stbtt_int32 *) (p)) - -#else - - static stbtt_uint16 ttUSHORT(const stbtt_uint8 *p) { return p[0]*256 + p[1]; } - static stbtt_int16 ttSHORT(const stbtt_uint8 *p) { return p[0]*256 + p[1]; } - static stbtt_uint32 ttULONG(const stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; } - static stbtt_int32 ttLONG(const stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; } - -#endif +static stbtt_uint16 ttUSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; } +static stbtt_int16 ttSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; } +static stbtt_uint32 ttULONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; } +static stbtt_int32 ttLONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; } #define stbtt_tag4(p,c0,c1,c2,c3) ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3)) #define stbtt_tag(p,str) stbtt_tag4(p,str[0],str[1],str[2],str[3]) -static int stbtt__isfont(const stbtt_uint8 *font) +static int stbtt__isfont(stbtt_uint8 *font) { // check the version number if (stbtt_tag4(font, '1',0,0,0)) return 1; // TrueType 1 if (stbtt_tag(font, "typ1")) return 1; // TrueType with type 1 font -- we don't support this! if (stbtt_tag(font, "OTTO")) return 1; // OpenType with CFF if (stbtt_tag4(font, 0,1,0,0)) return 1; // OpenType 1.0 + if (stbtt_tag(font, "true")) return 1; // Apple specification for TrueType fonts return 0; } @@ -1017,7 +1174,7 @@ static stbtt_uint32 stbtt__find_table(stbtt_uint8 *data, stbtt_uint32 fontstart, return 0; } -STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *font_collection, int index) +static int stbtt_GetFontOffsetForIndex_internal(unsigned char *font_collection, int index) { // if it's just a font, there's only one valid index if (stbtt__isfont(font_collection)) @@ -1036,14 +1193,43 @@ STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *font_collection, return -1; } -STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data2, int fontstart) +static int stbtt_GetNumberOfFonts_internal(unsigned char *font_collection) +{ + // if it's just a font, there's only one valid font + if (stbtt__isfont(font_collection)) + return 1; + + // check if it's a TTC + if (stbtt_tag(font_collection, "ttcf")) { + // version 1? + if (ttULONG(font_collection+4) == 0x00010000 || ttULONG(font_collection+4) == 0x00020000) { + return ttLONG(font_collection+8); + } + } + return 0; +} + +static stbtt__buf stbtt__get_subrs(stbtt__buf cff, stbtt__buf fontdict) +{ + stbtt_uint32 subrsoff = 0, private_loc[2] = { 0, 0 }; + stbtt__buf pdict; + stbtt__dict_get_ints(&fontdict, 18, 2, private_loc); + if (!private_loc[1] || !private_loc[0]) return stbtt__new_buf(NULL, 0); + pdict = stbtt__buf_range(&cff, private_loc[1], private_loc[0]); + stbtt__dict_get_ints(&pdict, 19, 1, &subrsoff); + if (!subrsoff) return stbtt__new_buf(NULL, 0); + stbtt__buf_seek(&cff, private_loc[1]+subrsoff); + return stbtt__cff_get_index(&cff); +} + +static int stbtt_InitFont_internal(stbtt_fontinfo *info, unsigned char *data, int fontstart) { - stbtt_uint8 *data = (stbtt_uint8 *) data2; stbtt_uint32 cmap, t; stbtt_int32 i,numTables; info->data = data; info->fontstart = fontstart; + info->cff = stbtt__new_buf(NULL, 0); cmap = stbtt__find_table(data, fontstart, "cmap"); // required info->loca = stbtt__find_table(data, fontstart, "loca"); // required @@ -1052,8 +1238,61 @@ STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data2, i info->hhea = stbtt__find_table(data, fontstart, "hhea"); // required info->hmtx = stbtt__find_table(data, fontstart, "hmtx"); // required info->kern = stbtt__find_table(data, fontstart, "kern"); // not required - if (!cmap || !info->loca || !info->head || !info->glyf || !info->hhea || !info->hmtx) + + if (!cmap || !info->head || !info->hhea || !info->hmtx) return 0; + if (info->glyf) { + // required for truetype + if (!info->loca) return 0; + } else { + // initialization for CFF / Type2 fonts (OTF) + stbtt__buf b, topdict, topdictidx; + stbtt_uint32 cstype = 2, charstrings = 0, fdarrayoff = 0, fdselectoff = 0; + stbtt_uint32 cff; + + cff = stbtt__find_table(data, fontstart, "CFF "); + if (!cff) return 0; + + info->fontdicts = stbtt__new_buf(NULL, 0); + info->fdselect = stbtt__new_buf(NULL, 0); + + // @TODO this should use size from table (not 512MB) + info->cff = stbtt__new_buf(data+cff, 512*1024*1024); + b = info->cff; + + // read the header + stbtt__buf_skip(&b, 2); + stbtt__buf_seek(&b, stbtt__buf_get8(&b)); // hdrsize + + // @TODO the name INDEX could list multiple fonts, + // but we just use the first one. + stbtt__cff_get_index(&b); // name INDEX + topdictidx = stbtt__cff_get_index(&b); + topdict = stbtt__cff_index_get(topdictidx, 0); + stbtt__cff_get_index(&b); // string INDEX + info->gsubrs = stbtt__cff_get_index(&b); + + stbtt__dict_get_ints(&topdict, 17, 1, &charstrings); + stbtt__dict_get_ints(&topdict, 0x100 | 6, 1, &cstype); + stbtt__dict_get_ints(&topdict, 0x100 | 36, 1, &fdarrayoff); + stbtt__dict_get_ints(&topdict, 0x100 | 37, 1, &fdselectoff); + info->subrs = stbtt__get_subrs(b, topdict); + + // we only support Type 2 charstrings + if (cstype != 2) return 0; + if (charstrings == 0) return 0; + + if (fdarrayoff) { + // looks like a CID font + if (!fdselectoff) return 0; + stbtt__buf_seek(&b, fdarrayoff); + info->fontdicts = stbtt__cff_get_index(&b); + info->fdselect = stbtt__buf_range(&b, fdselectoff, b.size-fdselectoff); + } + + stbtt__buf_seek(&b, charstrings); + info->charstrings = stbtt__cff_get_index(&b); + } t = stbtt__find_table(data, fontstart, "maxp"); if (t) @@ -1204,6 +1443,8 @@ static int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_index) { int g1,g2; + STBTT_assert(!info->cff.size); + if (glyph_index >= info->numGlyphs) return -1; // glyph index out of range if (info->indexToLocFormat >= 2) return -1; // unknown index->glyph map format @@ -1218,15 +1459,21 @@ static int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_index) return g1==g2 ? -1 : g1; // if length is 0, return -1 } +static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1); + STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1) { - int g = stbtt__GetGlyfOffset(info, glyph_index); - if (g < 0) return 0; + if (info->cff.size) { + stbtt__GetGlyphInfoT2(info, glyph_index, x0, y0, x1, y1); + } else { + int g = stbtt__GetGlyfOffset(info, glyph_index); + if (g < 0) return 0; - if (x0) *x0 = ttSHORT(info->data + g + 2); - if (y0) *y0 = ttSHORT(info->data + g + 4); - if (x1) *x1 = ttSHORT(info->data + g + 6); - if (y1) *y1 = ttSHORT(info->data + g + 8); + if (x0) *x0 = ttSHORT(info->data + g + 2); + if (y0) *y0 = ttSHORT(info->data + g + 4); + if (x1) *x1 = ttSHORT(info->data + g + 6); + if (y1) *y1 = ttSHORT(info->data + g + 8); + } return 1; } @@ -1238,7 +1485,10 @@ STBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int codepoint, i STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_index) { stbtt_int16 numberOfContours; - int g = stbtt__GetGlyfOffset(info, glyph_index); + int g; + if (info->cff.size) + return stbtt__GetGlyphInfoT2(info, glyph_index, NULL, NULL, NULL, NULL) == 0; + g = stbtt__GetGlyfOffset(info, glyph_index); if (g < 0) return 1; numberOfContours = ttSHORT(info->data + g); return numberOfContours == 0; @@ -1260,7 +1510,7 @@ static int stbtt__close_shape(stbtt_vertex *vertices, int num_vertices, int was_ return num_vertices; } -STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) +static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) { stbtt_int16 numberOfContours; stbtt_uint8 *endPtsOfContours; @@ -1486,6 +1736,416 @@ STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, s return num_vertices; } +typedef struct +{ + int bounds; + int started; + float first_x, first_y; + float x, y; + stbtt_int32 min_x, max_x, min_y, max_y; + + stbtt_vertex *pvertices; + int num_vertices; +} stbtt__csctx; + +#define STBTT__CSCTX_INIT(bounds) {bounds,0, 0,0, 0,0, 0,0,0,0, NULL, 0} + +static void stbtt__track_vertex(stbtt__csctx *c, stbtt_int32 x, stbtt_int32 y) +{ + if (x > c->max_x || !c->started) c->max_x = x; + if (y > c->max_y || !c->started) c->max_y = y; + if (x < c->min_x || !c->started) c->min_x = x; + if (y < c->min_y || !c->started) c->min_y = y; + c->started = 1; +} + +static void stbtt__csctx_v(stbtt__csctx *c, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy, stbtt_int32 cx1, stbtt_int32 cy1) +{ + if (c->bounds) { + stbtt__track_vertex(c, x, y); + if (type == STBTT_vcubic) { + stbtt__track_vertex(c, cx, cy); + stbtt__track_vertex(c, cx1, cy1); + } + } else { + stbtt_setvertex(&c->pvertices[c->num_vertices], type, x, y, cx, cy); + c->pvertices[c->num_vertices].cx1 = (stbtt_int16) cx1; + c->pvertices[c->num_vertices].cy1 = (stbtt_int16) cy1; + } + c->num_vertices++; +} + +static void stbtt__csctx_close_shape(stbtt__csctx *ctx) +{ + if (ctx->first_x != ctx->x || ctx->first_y != ctx->y) + stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->first_x, (int)ctx->first_y, 0, 0, 0, 0); +} + +static void stbtt__csctx_rmove_to(stbtt__csctx *ctx, float dx, float dy) +{ + stbtt__csctx_close_shape(ctx); + ctx->first_x = ctx->x = ctx->x + dx; + ctx->first_y = ctx->y = ctx->y + dy; + stbtt__csctx_v(ctx, STBTT_vmove, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0); +} + +static void stbtt__csctx_rline_to(stbtt__csctx *ctx, float dx, float dy) +{ + ctx->x += dx; + ctx->y += dy; + stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0); +} + +static void stbtt__csctx_rccurve_to(stbtt__csctx *ctx, float dx1, float dy1, float dx2, float dy2, float dx3, float dy3) +{ + float cx1 = ctx->x + dx1; + float cy1 = ctx->y + dy1; + float cx2 = cx1 + dx2; + float cy2 = cy1 + dy2; + ctx->x = cx2 + dx3; + ctx->y = cy2 + dy3; + stbtt__csctx_v(ctx, STBTT_vcubic, (int)ctx->x, (int)ctx->y, (int)cx1, (int)cy1, (int)cx2, (int)cy2); +} + +static stbtt__buf stbtt__get_subr(stbtt__buf idx, int n) +{ + int count = stbtt__cff_index_count(&idx); + int bias = 107; + if (count >= 33900) + bias = 32768; + else if (count >= 1240) + bias = 1131; + n += bias; + if (n < 0 || n >= count) + return stbtt__new_buf(NULL, 0); + return stbtt__cff_index_get(idx, n); +} + +static stbtt__buf stbtt__cid_get_glyph_subrs(const stbtt_fontinfo *info, int glyph_index) +{ + stbtt__buf fdselect = info->fdselect; + int nranges, start, end, v, fmt, fdselector = -1, i; + + stbtt__buf_seek(&fdselect, 0); + fmt = stbtt__buf_get8(&fdselect); + if (fmt == 0) { + // untested + stbtt__buf_skip(&fdselect, glyph_index); + fdselector = stbtt__buf_get8(&fdselect); + } else if (fmt == 3) { + nranges = stbtt__buf_get16(&fdselect); + start = stbtt__buf_get16(&fdselect); + for (i = 0; i < nranges; i++) { + v = stbtt__buf_get8(&fdselect); + end = stbtt__buf_get16(&fdselect); + if (glyph_index >= start && glyph_index < end) { + fdselector = v; + break; + } + start = end; + } + } + if (fdselector == -1) stbtt__new_buf(NULL, 0); + return stbtt__get_subrs(info->cff, stbtt__cff_index_get(info->fontdicts, fdselector)); +} + +static int stbtt__run_charstring(const stbtt_fontinfo *info, int glyph_index, stbtt__csctx *c) +{ + int in_header = 1, maskbits = 0, subr_stack_height = 0, sp = 0, v, i, b0; + int has_subrs = 0, clear_stack; + float s[48]; + stbtt__buf subr_stack[10], subrs = info->subrs, b; + float f; + +#define STBTT__CSERR(s) (0) + + // this currently ignores the initial width value, which isn't needed if we have hmtx + b = stbtt__cff_index_get(info->charstrings, glyph_index); + while (b.cursor < b.size) { + i = 0; + clear_stack = 1; + b0 = stbtt__buf_get8(&b); + switch (b0) { + // @TODO implement hinting + case 0x13: // hintmask + case 0x14: // cntrmask + if (in_header) + maskbits += (sp / 2); // implicit "vstem" + in_header = 0; + stbtt__buf_skip(&b, (maskbits + 7) / 8); + break; + + case 0x01: // hstem + case 0x03: // vstem + case 0x12: // hstemhm + case 0x17: // vstemhm + maskbits += (sp / 2); + break; + + case 0x15: // rmoveto + in_header = 0; + if (sp < 2) return STBTT__CSERR("rmoveto stack"); + stbtt__csctx_rmove_to(c, s[sp-2], s[sp-1]); + break; + case 0x04: // vmoveto + in_header = 0; + if (sp < 1) return STBTT__CSERR("vmoveto stack"); + stbtt__csctx_rmove_to(c, 0, s[sp-1]); + break; + case 0x16: // hmoveto + in_header = 0; + if (sp < 1) return STBTT__CSERR("hmoveto stack"); + stbtt__csctx_rmove_to(c, s[sp-1], 0); + break; + + case 0x05: // rlineto + if (sp < 2) return STBTT__CSERR("rlineto stack"); + for (; i + 1 < sp; i += 2) + stbtt__csctx_rline_to(c, s[i], s[i+1]); + break; + + // hlineto/vlineto and vhcurveto/hvcurveto alternate horizontal and vertical + // starting from a different place. + + case 0x07: // vlineto + if (sp < 1) return STBTT__CSERR("vlineto stack"); + goto vlineto; + case 0x06: // hlineto + if (sp < 1) return STBTT__CSERR("hlineto stack"); + for (;;) { + if (i >= sp) break; + stbtt__csctx_rline_to(c, s[i], 0); + i++; + vlineto: + if (i >= sp) break; + stbtt__csctx_rline_to(c, 0, s[i]); + i++; + } + break; + + case 0x1F: // hvcurveto + if (sp < 4) return STBTT__CSERR("hvcurveto stack"); + goto hvcurveto; + case 0x1E: // vhcurveto + if (sp < 4) return STBTT__CSERR("vhcurveto stack"); + for (;;) { + if (i + 3 >= sp) break; + stbtt__csctx_rccurve_to(c, 0, s[i], s[i+1], s[i+2], s[i+3], (sp - i == 5) ? s[i + 4] : 0.0f); + i += 4; + hvcurveto: + if (i + 3 >= sp) break; + stbtt__csctx_rccurve_to(c, s[i], 0, s[i+1], s[i+2], (sp - i == 5) ? s[i+4] : 0.0f, s[i+3]); + i += 4; + } + break; + + case 0x08: // rrcurveto + if (sp < 6) return STBTT__CSERR("rcurveline stack"); + for (; i + 5 < sp; i += 6) + stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); + break; + + case 0x18: // rcurveline + if (sp < 8) return STBTT__CSERR("rcurveline stack"); + for (; i + 5 < sp - 2; i += 6) + stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); + if (i + 1 >= sp) return STBTT__CSERR("rcurveline stack"); + stbtt__csctx_rline_to(c, s[i], s[i+1]); + break; + + case 0x19: // rlinecurve + if (sp < 8) return STBTT__CSERR("rlinecurve stack"); + for (; i + 1 < sp - 6; i += 2) + stbtt__csctx_rline_to(c, s[i], s[i+1]); + if (i + 5 >= sp) return STBTT__CSERR("rlinecurve stack"); + stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); + break; + + case 0x1A: // vvcurveto + case 0x1B: // hhcurveto + if (sp < 4) return STBTT__CSERR("(vv|hh)curveto stack"); + f = 0.0; + if (sp & 1) { f = s[i]; i++; } + for (; i + 3 < sp; i += 4) { + if (b0 == 0x1B) + stbtt__csctx_rccurve_to(c, s[i], f, s[i+1], s[i+2], s[i+3], 0.0); + else + stbtt__csctx_rccurve_to(c, f, s[i], s[i+1], s[i+2], 0.0, s[i+3]); + f = 0.0; + } + break; + + case 0x0A: // callsubr + if (!has_subrs) { + if (info->fdselect.size) + subrs = stbtt__cid_get_glyph_subrs(info, glyph_index); + has_subrs = 1; + } + // fallthrough + case 0x1D: // callgsubr + if (sp < 1) return STBTT__CSERR("call(g|)subr stack"); + v = (int) s[--sp]; + if (subr_stack_height >= 10) return STBTT__CSERR("recursion limit"); + subr_stack[subr_stack_height++] = b; + b = stbtt__get_subr(b0 == 0x0A ? subrs : info->gsubrs, v); + if (b.size == 0) return STBTT__CSERR("subr not found"); + b.cursor = 0; + clear_stack = 0; + break; + + case 0x0B: // return + if (subr_stack_height <= 0) return STBTT__CSERR("return outside subr"); + b = subr_stack[--subr_stack_height]; + clear_stack = 0; + break; + + case 0x0E: // endchar + stbtt__csctx_close_shape(c); + return 1; + + case 0x0C: { // two-byte escape + float dx1, dx2, dx3, dx4, dx5, dx6, dy1, dy2, dy3, dy4, dy5, dy6; + float dx, dy; + int b1 = stbtt__buf_get8(&b); + switch (b1) { + // @TODO These "flex" implementations ignore the flex-depth and resolution, + // and always draw beziers. + case 0x22: // hflex + if (sp < 7) return STBTT__CSERR("hflex stack"); + dx1 = s[0]; + dx2 = s[1]; + dy2 = s[2]; + dx3 = s[3]; + dx4 = s[4]; + dx5 = s[5]; + dx6 = s[6]; + stbtt__csctx_rccurve_to(c, dx1, 0, dx2, dy2, dx3, 0); + stbtt__csctx_rccurve_to(c, dx4, 0, dx5, -dy2, dx6, 0); + break; + + case 0x23: // flex + if (sp < 13) return STBTT__CSERR("flex stack"); + dx1 = s[0]; + dy1 = s[1]; + dx2 = s[2]; + dy2 = s[3]; + dx3 = s[4]; + dy3 = s[5]; + dx4 = s[6]; + dy4 = s[7]; + dx5 = s[8]; + dy5 = s[9]; + dx6 = s[10]; + dy6 = s[11]; + //fd is s[12] + stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3); + stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6); + break; + + case 0x24: // hflex1 + if (sp < 9) return STBTT__CSERR("hflex1 stack"); + dx1 = s[0]; + dy1 = s[1]; + dx2 = s[2]; + dy2 = s[3]; + dx3 = s[4]; + dx4 = s[5]; + dx5 = s[6]; + dy5 = s[7]; + dx6 = s[8]; + stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, 0); + stbtt__csctx_rccurve_to(c, dx4, 0, dx5, dy5, dx6, -(dy1+dy2+dy5)); + break; + + case 0x25: // flex1 + if (sp < 11) return STBTT__CSERR("flex1 stack"); + dx1 = s[0]; + dy1 = s[1]; + dx2 = s[2]; + dy2 = s[3]; + dx3 = s[4]; + dy3 = s[5]; + dx4 = s[6]; + dy4 = s[7]; + dx5 = s[8]; + dy5 = s[9]; + dx6 = dy6 = s[10]; + dx = dx1+dx2+dx3+dx4+dx5; + dy = dy1+dy2+dy3+dy4+dy5; + if (STBTT_fabs(dx) > STBTT_fabs(dy)) + dy6 = -dy; + else + dx6 = -dx; + stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3); + stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6); + break; + + default: + return STBTT__CSERR("unimplemented"); + } + } break; + + default: + if (b0 != 255 && b0 != 28 && (b0 < 32 || b0 > 254)) + return STBTT__CSERR("reserved operator"); + + // push immediate + if (b0 == 255) { + f = (float)stbtt__buf_get32(&b) / 0x10000; + } else { + stbtt__buf_skip(&b, -1); + f = (float)(stbtt_int16)stbtt__cff_int(&b); + } + if (sp >= 48) return STBTT__CSERR("push stack overflow"); + s[sp++] = f; + clear_stack = 0; + break; + } + if (clear_stack) sp = 0; + } + return STBTT__CSERR("no endchar"); + +#undef STBTT__CSERR +} + +static int stbtt__GetGlyphShapeT2(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) +{ + // runs the charstring twice, once to count and once to output (to avoid realloc) + stbtt__csctx count_ctx = STBTT__CSCTX_INIT(1); + stbtt__csctx output_ctx = STBTT__CSCTX_INIT(0); + if (stbtt__run_charstring(info, glyph_index, &count_ctx)) { + *pvertices = (stbtt_vertex*)STBTT_malloc(count_ctx.num_vertices*sizeof(stbtt_vertex), info->userdata); + output_ctx.pvertices = *pvertices; + if (stbtt__run_charstring(info, glyph_index, &output_ctx)) { + STBTT_assert(output_ctx.num_vertices == count_ctx.num_vertices); + return output_ctx.num_vertices; + } + } + *pvertices = NULL; + return 0; +} + +static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1) +{ + stbtt__csctx c = STBTT__CSCTX_INIT(1); + int r = stbtt__run_charstring(info, glyph_index, &c); + if (x0) { + *x0 = r ? c.min_x : 0; + *y0 = r ? c.min_y : 0; + *x1 = r ? c.max_x : 0; + *y1 = r ? c.max_y : 0; + } + return r ? c.num_vertices : 0; +} + +STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) +{ + if (!info->cff.size) + return stbtt__GetGlyphShapeTT(info, glyph_index, pvertices); + else + return stbtt__GetGlyphShapeT2(info, glyph_index, pvertices); +} + STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing) { stbtt_uint16 numOfLongHorMetrics = ttUSHORT(info->data+info->hhea + 34); @@ -2356,6 +3016,48 @@ static int stbtt__tesselate_curve(stbtt__point *points, int *num_points, float x return 1; } +static void stbtt__tesselate_cubic(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float objspace_flatness_squared, int n) +{ + // @TODO this "flatness" calculation is just made-up nonsense that seems to work well enough + float dx0 = x1-x0; + float dy0 = y1-y0; + float dx1 = x2-x1; + float dy1 = y2-y1; + float dx2 = x3-x2; + float dy2 = y3-y2; + float dx = x3-x0; + float dy = y3-y0; + float longlen = (float) (STBTT_sqrt(dx0*dx0+dy0*dy0)+STBTT_sqrt(dx1*dx1+dy1*dy1)+STBTT_sqrt(dx2*dx2+dy2*dy2)); + float shortlen = (float) STBTT_sqrt(dx*dx+dy*dy); + float flatness_squared = longlen*longlen-shortlen*shortlen; + + if (n > 16) // 65536 segments on one curve better be enough! + return; + + if (flatness_squared > objspace_flatness_squared) { + float x01 = (x0+x1)/2; + float y01 = (y0+y1)/2; + float x12 = (x1+x2)/2; + float y12 = (y1+y2)/2; + float x23 = (x2+x3)/2; + float y23 = (y2+y3)/2; + + float xa = (x01+x12)/2; + float ya = (y01+y12)/2; + float xb = (x12+x23)/2; + float yb = (y12+y23)/2; + + float mx = (xa+xb)/2; + float my = (ya+yb)/2; + + stbtt__tesselate_cubic(points, num_points, x0,y0, x01,y01, xa,ya, mx,my, objspace_flatness_squared,n+1); + stbtt__tesselate_cubic(points, num_points, mx,my, xb,yb, x23,y23, x3,y3, objspace_flatness_squared,n+1); + } else { + stbtt__add_point(points, *num_points,x3,y3); + *num_points = *num_points+1; + } +} + // returns number of contours static stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts, float objspace_flatness, int **contour_lengths, int *num_contours, void *userdata) { @@ -2412,6 +3114,14 @@ static stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts, objspace_flatness_squared, 0); x = vertices[i].x, y = vertices[i].y; break; + case STBTT_vcubic: + stbtt__tesselate_cubic(points, &num_points, x,y, + vertices[i].cx, vertices[i].cy, + vertices[i].cx1, vertices[i].cy1, + vertices[i].x, vertices[i].y, + objspace_flatness_squared, 0); + x = vertices[i].x, y = vertices[i].y; + break; } } (*contour_lengths)[n] = num_points - start; @@ -2538,7 +3248,7 @@ STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned ch // // This is SUPER-CRAPPY packing to keep source code small -STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset, // font location (use offset=0 for plain .ttf) +static int stbtt_BakeFontBitmap_internal(unsigned char *data, int offset, // font location (use offset=0 for plain .ttf) float pixel_height, // height of font in pixels unsigned char *pixels, int pw, int ph, // bitmap to be filled in int first_char, int num_chars, // characters to bake @@ -2584,11 +3294,11 @@ STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset, // fo return bottom_y; } -STBTT_DEF void stbtt_GetBakedQuad(stbtt_bakedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int opengl_fillrule) +STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int opengl_fillrule) { float d3d_bias = opengl_fillrule ? 0 : -0.5f; float ipw = 1.0f / pw, iph = 1.0f / ph; - stbtt_bakedchar *b = chardata + char_index; + const stbtt_bakedchar *b = chardata + char_index; int round_x = STBTT_ifloor((*xpos + b->xoff) + 0.5f); int round_y = STBTT_ifloor((*ypos + b->yoff) + 0.5f); @@ -2868,7 +3578,7 @@ static float stbtt__oversample_shift(int oversample) } // rects array must be big enough to accommodate all characters in the given ranges -STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects) +STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects) { int i,j,k; @@ -2897,7 +3607,7 @@ STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, stbtt_fon } // rects array must be big enough to accommodate all characters in the given ranges -STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects) +STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects) { int i,j,k, return_value = 1; @@ -3032,10 +3742,10 @@ STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, unsigned char *fontda return stbtt_PackFontRanges(spc, fontdata, font_index, &range, 1); } -STBTT_DEF void stbtt_GetPackedQuad(stbtt_packedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int align_to_integer) +STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int align_to_integer) { float ipw = 1.0f / pw, iph = 1.0f / ph; - stbtt_packedchar *b = chardata + char_index; + const stbtt_packedchar *b = chardata + char_index; if (align_to_integer) { float x = (float) STBTT_ifloor((*xpos + b->xoff) + 0.5f); @@ -3066,7 +3776,7 @@ STBTT_DEF void stbtt_GetPackedQuad(stbtt_packedchar *chardata, int pw, int ph, i // // check if a utf8 string contains a prefix which is the utf16 string; if so return length of matching utf8 string -static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(const stbtt_uint8 *s1, stbtt_int32 len1, const stbtt_uint8 *s2, stbtt_int32 len2) +static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint8 *s1, stbtt_int32 len1, stbtt_uint8 *s2, stbtt_int32 len2) { stbtt_int32 i=0; @@ -3105,9 +3815,9 @@ static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(const stbtt_uint8 return i; } -STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2) +static int stbtt_CompareUTF8toUTF16_bigendian_internal(char *s1, int len1, char *s2, int len2) { - return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((const stbtt_uint8*) s1, len1, (const stbtt_uint8*) s2, len2); + return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((stbtt_uint8*) s1, len1, (stbtt_uint8*) s2, len2); } // returns results in whatever encoding you request... but note that 2-byte encodings @@ -3163,7 +3873,7 @@ static int stbtt__matchpair(stbtt_uint8 *fc, stbtt_uint32 nm, stbtt_uint8 *name, return 1; } else if (matchlen < nlen && name[matchlen] == ' ') { ++matchlen; - if (stbtt_CompareUTF8toUTF16_bigendian((char*) (name+matchlen), nlen-matchlen, (char*)(fc+stringOffset+off),slen)) + if (stbtt_CompareUTF8toUTF16_bigendian_internal((char*) (name+matchlen), nlen-matchlen, (char*)(fc+stringOffset+off),slen)) return 1; } } else { @@ -3209,7 +3919,7 @@ static int stbtt__matches(stbtt_uint8 *fc, stbtt_uint32 offset, stbtt_uint8 *nam return 0; } -STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *font_collection, const char *name_utf8, stbtt_int32 flags) +static int stbtt_FindMatchingFont_internal(unsigned char *font_collection, char *name_utf8, stbtt_int32 flags) { stbtt_int32 i; for (i=0;;++i) { @@ -3220,11 +3930,53 @@ STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *font_collection, const } } +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#endif + +STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset, + float pixel_height, unsigned char *pixels, int pw, int ph, + int first_char, int num_chars, stbtt_bakedchar *chardata) +{ + return stbtt_BakeFontBitmap_internal((unsigned char *) data, offset, pixel_height, pixels, pw, ph, first_char, num_chars, chardata); +} + +STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index) +{ + return stbtt_GetFontOffsetForIndex_internal((unsigned char *) data, index); +} + +STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data) +{ + return stbtt_GetNumberOfFonts_internal((unsigned char *) data); +} + +STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset) +{ + return stbtt_InitFont_internal(info, (unsigned char *) data, offset); +} + +STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int flags) +{ + return stbtt_FindMatchingFont_internal((unsigned char *) fontdata, (char *) name, flags); +} + +STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2) +{ + return stbtt_CompareUTF8toUTF16_bigendian_internal((char *) s1, len1, (char *) s2, len2); +} + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + #endif // STB_TRUETYPE_IMPLEMENTATION // FULL VERSION HISTORY // +// 1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual // 1.11 (2016-04-02) fix unused-variable warning // 1.10 (2016-04-02) allow user-defined fabs() replacement // fix memory leak if fontsize=0.0 @@ -3271,3 +4023,45 @@ STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *font_collection, const // 0.2 (2009-03-11) Fix unsigned/signed char warnings // 0.1 (2009-03-09) First public release // + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2017 Sean Barrett +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +------------------------------------------------------------------------------ +*/ diff --git a/3rdparty/bgfx/3rdparty/tinyexr/README.md b/3rdparty/bgfx/3rdparty/tinyexr/README.md deleted file mode 100644 index aea03fd..0000000 --- a/3rdparty/bgfx/3rdparty/tinyexr/README.md +++ /dev/null @@ -1,274 +0,0 @@ -# Tiny OpenEXR image library. - -![Example](https://github.com/syoyo/tinyexr/blob/master/asakusa.png?raw=true) - -[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/k07ftfe4ph057qau/branch/master?svg=true)](https://ci.appveyor.com/project/syoyo/tinyexr/branch/master) - -[![Travis build Status](https://travis-ci.org/syoyo/tinyexr.svg)](https://travis-ci.org/syoyo/tinyexr) - -[![Coverity Scan Build Status](https://scan.coverity.com/projects/5827/badge.svg)](https://scan.coverity.com/projects/5827) - -`tinyexr` is a small, single header-only library to load and save OpenEXR(.exr) images. -`tinyexr` is written in portable C++(no library dependency except for STL), thus `tinyexr` is good to embed into your application. -To use `tinyexr`, simply copy `tinyexr.h` into your project. - -`tinyexr` currently supports: - -* OpenEXR version 1.x. -* Normal image - * Scanline format. - * Uncompress("compress" = 0), ZIPS("compress" = 2), ZIP compression("compress" = 3) and PIZ compression("compress" = 4). - * Half/Uint/Float pixel type. - * Custom attributes(up to 128) -* Deep image - * Scanline format. - * ZIPS compression("compress" = 2). - * Half, float pixel type. -* Litte endian machine. -* Limited support for big endian machine. - * read/write normal image. -* C interface. - * You can easily write language bindings(e.g. golang) -* EXR saving - * with ZIP compression. -* JavaScript library - * Through emscripten. - -# Use case - -* mallie https://github.com/lighttransport/mallie -* PBRT v3 https://github.com/mmp/pbrt-v3 -* Cinder 0.9.0 https://libcinder.org/notes/v0.9.0 -* Piccante(develop branch) http://piccantelib.net/ -* Your project here! - -## Examples - -* [examples/deepview/](examples/deepview) Deep image view -* [examples/rgbe2exr/](examples/rgbe2exr) .hdr to EXR converter -* [examples/exr2rgbe/](examples/exr2rgbe) EXR to .hdr converter - -## Usage - -NOTE: **API is still subject to change**. See the source code for details. - -Include `tinyexr.h` with `TINYEXR_IMPLEMENTATION` flag(do this only for **one** .cc file). - -``` -#define TINYEXR_IMPLEMENTATION -#include "tinyexr.h" -``` - -Quickly reading RGB(A) EXR file. - -``` - const char* input = "asakusa.exr"; - float* out; // width * height * RGBA - int width; - int height; - const char* err; - - int ret = LoadEXR(&out, &width, &height, input, &err); -``` - -Loading EXR from a file. - -``` - const char* input = "asakusa.exr"; - const char* err; - - EXRImage exrImage; - InitEXRImage(&exrImage); - - int ret = ParseMultiChannelEXRHeaderFromFile(&exrImage, input, &err); - if (ret != 0) { - fprintf(stderr, "Parse EXR err: %s\n", err); - return; - } - - //// Uncomment if you want reading HALF image as FLOAT. - //for (int i = 0; i < exrImage.num_channels; i++) { - // if (exrImage.pixel_types[i] = TINYEXR_PIXELTYPE_HALF) { - // exrImage.requested_pixel_types[i] = TINYEXR_PIXELTYPE_FLOAT; - // } - //} - - ret = LoadMultiChannelEXRFromFile(&exrImage, input, &err); - if (ret != 0) { - fprintf(stderr, "Load EXR err: %s\n", err); - return; - } -``` - -Saving EXR file. - -``` - bool SaveEXR(const float* rgb, int width, int height, const char* outfilename) { - - float* channels[3]; - - EXRImage image; - InitEXRImage(&image); - - image.num_channels = 3; - - // Must be BGR(A) order, since most of EXR viewers expect this channel order. - const char* channel_names[] = {"B", "G", "R"}; // "B", "G", "R", "A" for RGBA image - - std::vector images[3]; - images[0].resize(width * height); - images[1].resize(width * height); - images[2].resize(width * height); - - for (int i = 0; i < width * height; i++) { - images[0][i] = rgb[3*i+0]; - images[1][i] = rgb[3*i+1]; - images[2][i] = rgb[3*i+2]; - } - - float* image_ptr[3]; - image_ptr[0] = &(images[2].at(0)); // B - image_ptr[1] = &(images[1].at(0)); // G - image_ptr[2] = &(images[0].at(0)); // R - - image.channel_names = channel_names; - image.images = (unsigned char**)image_ptr; - image.width = width; - image.height = height; - image.compression = TINYEXR_COMPRESSIONTYPE_ZIP; - - image.pixel_types = (int *)malloc(sizeof(int) * image.num_channels); - image.requested_pixel_types = (int *)malloc(sizeof(int) * image.num_channels); - for (int i = 0; i < image.num_channels; i++) { - image.pixel_types[i] = TINYEXR_PIXELTYPE_FLOAT; // pixel type of input image - image.requested_pixel_types[i] = TINYEXR_PIXELTYPE_HALF; // pixel type of output image to be stored in .EXR - } - - const char* err; - int ret = SaveMultiChannelEXRToFile(&image, outfilename, &err); - if (ret != 0) { - fprintf(stderr, "Save EXR err: %s\n", err); - return ret; - } - printf("Saved exr file. [ %s ] \n", outfilename); - - free(image.pixel_types); - free(image.requested_pixel_types); - - return ret; - - } -``` - - -Reading deep image EXR file. -See `example/deepview` for actual usage. - -``` - const char* input = "deepimage.exr"; - const char* err; - DeepImage deepImage; - - int ret = LoadDeepEXR(&deepImage, input, &err); - - // acccess to each sample in the deep pixel. - for (int y = 0; y < deepImage.height; y++) { - int sampleNum = deepImage.offset_table[y][deepImage.width-1]; - for (int x = 0; x < deepImage.width-1; x++) { - int s_start = deepImage.offset_table[y][x]; - int s_end = deepImage.offset_table[y][x+1]; - if (s_start >= sampleNum) { - continue; - } - s_end = (s_end < sampleNum) ? s_end : sampleNum; - for (int s = s_start; s < s_end; s++) { - float val = deepImage.image[depthChan][y][s]; - ... - } - } - } - -``` - -### deepview - -`examples/deepview` is simple deep image viewer in OpenGL. - -![DeepViewExample](https://github.com/syoyo/tinyexr/blob/master/examples/deepview/deepview_screencast.gif?raw=true) - -## TODO - -Contribution is welcome! - -- [ ] Compression - - [ ] NONE("compress" = 0, load) - - [ ] RLE("compress" = 1, load) - - [x] ZIPS("compress" = 2, load) - - [x] ZIP("compress" = 3, load) - - [x] PIZ("compress" = 4, load) - - [x] NONE("compress" = 0, save) - - [ ] RLE("compress" = 1, save) - - [x] ZIPS("compress" = 2, save) - - [x] ZIP("compress" = 3, save) - - [ ] PIZ("compress" = 4, save) -- [ ] Custom attributes - - [x] Normal image(EXR 1.x) - - [ ] Deep image(EXR 2.x) -- [ ] JavaScript library - - [x] LoadEXRFromMemory - - [ ] SaveMultiChannelEXR - - [ ] Deep image save/load -- [ ] Write from/to memory buffer. - - [x] SaveMultiChannelEXR - - [x] LoadMultiChannelEXR - - [ ] Deep image save/load -- [ ] Tile format. -- [ ] Support for various compression type. - - [x] zstd compression(Not in OpenEXR spec, though) -- [x] Multi-channel. -- [ ] Multi-part(EXR2.0) -- [ ] Line order. - - [x] Increasing, decreasing(load) - - [ ] Random? - - [ ] Increasing, decreasing(save) -- [ ] Pixel format(UINT, FLOAT). - - [x] UINT, FLOAT(load) - - [x] UINT, FLOAT(deep load) - - [x] UINT, FLOAT(save) - - [ ] UINT, FLOAT(deep save) -- [ ] Full support for big endian machine. - - [x] Loading multi channel EXR - - [x] Saving multi channel EXR - - [ ] Loading deep image - - [ ] Saving deep image -- [ ] Optimization - - [ ] ISPC? - - [x] OpenMP multi-threading in EXR loading. - - [x] OpenMP multi-threading in EXR saving. - - [ ] OpenMP multi-threading in deep image loading. - - [ ] OpenMP multi-threading in deep image saving. - -## Similar or related projects - -* miniexr: https://github.com/aras-p/miniexr (Write OpenEXR) -* stb_image_resize.h: https://github.com/nothings/stb (Good for HDR image resizing) - -## License - -3-clause BSD - -`tinyexr` uses miniz, which is developed by Rich Geldreich , and licensed under public domain. - -`tinyexr` tools uses stb, which is licensed under public domain: https://github.com/nothings/stb -`tinyexr` uses some code from OpenEXR, which is licensed under 3-clause BSD license. - -## Author(s) - -Syoyo Fujita(syoyo@lighttransport.com) - -## Contributor(s) - -* Matt Ebb (http://mattebb.com) : deep image example. Thanks! -* Matt Pharr (http://pharr.org/matt/) : Testing tinyexr with OpenEXR(IlmImf). Thanks! -* Andrew Bell (https://github.com/andrewfb) & Richard Eakin (https://github.com/richardeakin) : Improving TinyEXR API. Thanks! -* Mike Wong (https://github.com/mwkm) : ZIPS compression support in loading. Thanks! diff --git a/3rdparty/bgfx/3rdparty/tinyexr/tinyexr.cc b/3rdparty/bgfx/3rdparty/tinyexr/tinyexr.cc deleted file mode 100644 index 969a6d5..0000000 --- a/3rdparty/bgfx/3rdparty/tinyexr/tinyexr.cc +++ /dev/null @@ -1,2 +0,0 @@ -#define TINYEXR_IMPLEMENTATION -#include "tinyexr.h" diff --git a/3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h b/3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h deleted file mode 100644 index 947941d..0000000 --- a/3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h +++ /dev/null @@ -1,12354 +0,0 @@ -/* -Copyright (c) 2014 - 2016, Syoyo Fujita -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// TinyEXR contains some OpenEXR code, which is licensed under ------------ - -/////////////////////////////////////////////////////////////////////////// -// -// Copyright (c) 2002, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Industrial Light & Magic nor the names of -// its contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////// - -// End of OpenEXR license ------------------------------------------------- - -#ifndef TINYEXR_H_ -#define TINYEXR_H_ - -// -// -// Do this: -// #define TINYEXR_IMPLEMENTATION -// before you include this file in *one* C or C++ file to create the -// implementation. -// -// // i.e. it should look like this: -// #include ... -// #include ... -// #include ... -// #define TINYEXR_IMPLEMENTATION -// #include "tinyexr.h" -// -// - -#include // for size_t -#include // guess stdint.h is available(C99) - -#ifdef __cplusplus -extern "C" { -#endif - -// Use embedded miniz or not to decode ZIP format pixel. Linking with zlib -// required if this flas is 0. -#ifndef TINYEXR_USE_MINIZ -#define TINYEXR_USE_MINIZ (1) -#endif - -// Disable PIZ comporession when applying cpplint. -#ifndef TINYEXR_USE_PIZ -#define TINYEXR_USE_PIZ (1) -#endif - -#ifndef TINYEXR_USE_ZFP -#define TINYEXR_USE_ZFP (0) // TinyEXR extension. -// http://computation.llnl.gov/projects/floating-point-compression -#endif - -#define TINYEXR_SUCCESS (0) -#define TINYEXR_ERROR_INVALID_MAGIC_NUMBER (-1) -#define TINYEXR_ERROR_INVALID_EXR_VERSION (-2) -#define TINYEXR_ERROR_INVALID_ARGUMENT (-3) -#define TINYEXR_ERROR_INVALID_DATA (-4) -#define TINYEXR_ERROR_INVALID_FILE (-5) -#define TINYEXR_ERROR_INVALID_PARAMETER (-5) -#define TINYEXR_ERROR_CANT_OPEN_FILE (-6) -#define TINYEXR_ERROR_UNSUPPORTED_FORMAT (-7) -#define TINYEXR_ERROR_INVALID_HEADER (-8) - -// @note { OpenEXR file format: http://www.openexr.com/openexrfilelayout.pdf } - -// pixel type: possible values are: UINT = 0 HALF = 1 FLOAT = 2 -#define TINYEXR_PIXELTYPE_UINT (0) -#define TINYEXR_PIXELTYPE_HALF (1) -#define TINYEXR_PIXELTYPE_FLOAT (2) - -#define TINYEXR_MAX_ATTRIBUTES (128) - -#define TINYEXR_COMPRESSIONTYPE_NONE (0) -#define TINYEXR_COMPRESSIONTYPE_RLE (1) -#define TINYEXR_COMPRESSIONTYPE_ZIPS (2) -#define TINYEXR_COMPRESSIONTYPE_ZIP (3) -#define TINYEXR_COMPRESSIONTYPE_PIZ (4) -#define TINYEXR_COMPRESSIONTYPE_ZFP (128) // TinyEXR extension - -#define TINYEXR_ZFP_COMPRESSIONTYPE_RATE (0) -#define TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION (1) -#define TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY (2) - -#define TINYEXR_TILE_ONE_LEVEL (0) -#define TINYEXR_TILE_MIPMAP_LEVELS (1) -#define TINYEXR_TILE_RIPMAP_LEVELS (2) - -#define TINYEXR_TILE_ROUND_DOWN (0) -#define TINYEXR_TILE_ROUND_UP (1) - -typedef struct _EXRVersion { - int version; // this must be 2 - int tiled; // tile format image - int long_name; // long name attribute - int non_image; // deep image(EXR 2.0) - int multipart; // multi-part(EXR 2.0) -} EXRVersion; - -typedef struct _EXRAttribute { - char name[256]; // name and type are up to 255 chars long. - char type[256]; - unsigned char *value; // uint8_t* - int size; - int pad0; -} EXRAttribute; - -typedef struct _EXRChannelInfo { - char name[256]; // less than 255 bytes long - int pixel_type; - int x_sampling; - int y_sampling; - unsigned char p_linear; - unsigned char pad[3]; -} EXRChannelInfo; - -typedef struct _EXRTile { - int offset_x; - int offset_y; - int level_x; - int level_y; - - int width; // actual width in a tile. - int height; // actual height int a tile. - - unsigned char **images; // image[channels][pixels] -} EXRTile; - -typedef struct _EXRHeader { - float pixel_aspect_ratio; - int line_order; - int data_window[4]; - int display_window[4]; - float screen_window_center[2]; - float screen_window_width; - - int chunk_count; - - // Properties for tiled format(`tiledesc`). - int tiled; - int tile_size_x; - int tile_size_y; - int tile_level_mode; - int tile_rounding_mode; - - int long_name; - int non_image; - int multipart; - unsigned int header_len; - - // Custom attributes(exludes required attributes(e.g. `channels`, - // `compression`, etc) - int num_custom_attributes; - EXRAttribute custom_attributes[TINYEXR_MAX_ATTRIBUTES]; - - EXRChannelInfo *channels; // [num_channels] - - int *pixel_types; // Loaded pixel type(TINYEXR_PIXELTYPE_*) of `images` for - // each channel. This is overwritten with `requested_pixel_types` when - // loading. - int num_channels; - - int compression_type; // compression type(TINYEXR_COMPRESSIONTYPE_*) - int *requested_pixel_types; // Filled initially by - // ParseEXRHeaderFrom(Meomory|File), then users - // can edit it(only valid for HALF pixel type - // channel) - -} EXRHeader; - -typedef struct _EXRMultiPartHeader { - int num_headers; - EXRHeader *headers; - -} EXRMultiPartHeader; - -typedef struct _EXRImage { - EXRTile *tiles; // Tiled pixel data. The application must reconstruct image - // from tiles manually. NULL if scanline format. - unsigned char **images; // image[channels][pixels]. NULL if tiled format. - - int width; - int height; - int num_channels; - - // Properties for tile format. - int num_tiles; - -} EXRImage; - -typedef struct _EXRMultiPartImage { - int num_images; - EXRImage *images; - -} EXRMultiPartImage; - -typedef struct _DeepImage { - const char **channel_names; - float ***image; // image[channels][scanlines][samples] - int **offset_table; // offset_table[scanline][offsets] - int num_channels; - int width; - int height; - int pad0; -} DeepImage; - -// @deprecated { to be removed. } -// Loads single-frame OpenEXR image. Assume EXR image contains RGB(A) channels. -// Application must free image data as returned by `out_rgba` -// Result image format is: float x RGBA x width x hight -// Returns negative value and may set error string in `err` when there's an -// error -extern int LoadEXR(float **out_rgba, int *width, int *height, - const char *filename, const char **err); - -// @deprecated { to be removed. } -// Saves single-frame OpenEXR image. Assume EXR image contains RGB(A) channels. -// components must be 3(RGB) or 4(RGBA). -// Result image format is: float x RGB(A) x width x hight -extern int SaveEXR(const float *data, int width, int height, int components, - const char *filename); - -// Initialize EXRHeader struct -extern void InitEXRHeader(EXRHeader *exr_header); - -// Initialize EXRImage struct -extern void InitEXRImage(EXRImage *exr_image); - -// Free's internal data of EXRHeader struct -extern int FreeEXRHeader(EXRHeader *exr_header); - -// Free's internal data of EXRImage struct -extern int FreeEXRImage(EXRImage *exr_image); - -// Parse EXR version header of a file. -extern int ParseEXRVersionFromFile(EXRVersion *version, const char *filename); - -// Parse EXR version header from memory-mapped EXR data. -extern int ParseEXRVersionFromMemory(EXRVersion *version, - const unsigned char *memory, size_t size); - -// Parse single-part OpenEXR header from a file and initialize `EXRHeader`. -extern int ParseEXRHeaderFromFile(EXRHeader *header, const EXRVersion *version, - const char *filename, const char **err); - -// Parse single-part OpenEXR header from a memory and initialize `EXRHeader`. -extern int ParseEXRHeaderFromMemory(EXRHeader *header, - const EXRVersion *version, - const unsigned char *memory, size_t size, - const char **err); - -// Parse multi-part OpenEXR headers from a file and initialize `EXRHeader*` -// array. -extern int ParseEXRMultipartHeaderFromFile(EXRHeader ***headers, - int *num_headers, - const EXRVersion *version, - const char *filename, - const char **err); - -// Parse multi-part OpenEXR headers from a memory and initialize `EXRHeader*` -// array -extern int ParseEXRMultipartHeaderFromMemory(EXRHeader ***headers, - int *num_headers, - const EXRVersion *version, - const unsigned char *memory, - size_t size, const char **err); - -// Loads single-part OpenEXR image from a file. -// Application must setup `ParseEXRHeaderFromFile` before calling this function. -// Application can free EXRImage using `FreeEXRImage` -// Returns negative value and may set error string in `err` when there's an -// error -extern int LoadEXRImageFromFile(EXRImage *image, const EXRHeader *header, - const char *filename, const char **err); - -// Loads single-part OpenEXR image from a memory. -// Application must setup `EXRHeader` with -// `ParseEXRHeaderFromMemory` before calling this function. -// Application can free EXRImage using `FreeEXRImage` -// Returns negative value and may set error string in `err` when there's an -// error -extern int LoadEXRImageFromMemory(EXRImage *image, const EXRHeader *header, - const unsigned char *memory, - const size_t size, - const char **err); - -// Loads multi-part OpenEXR image from a file. -// Application must setup `ParseEXRMultipartHeaderFromFile` before calling this -// function. -// Application can free EXRImage using `FreeEXRImage` -// Returns negative value and may set error string in `err` when there's an -// error -extern int LoadEXRMultipartImageFromFile(EXRImage *images, - const EXRHeader **headers, - unsigned int num_parts, - const char *filename, - const char **err); - -// Loads multi-part OpenEXR image from a memory. -// Application must setup `EXRHeader*` array with -// `ParseEXRMultipartHeaderFromMemory` before calling this function. -// Application can free EXRImage using `FreeEXRImage` -// Returns negative value and may set error string in `err` when there's an -// error -extern int LoadEXRMultipartImageFromMemory(EXRImage *images, - const EXRHeader **headers, - unsigned int num_parts, - const unsigned char *memory, - const char **err); - -// Saves multi-channel, single-frame OpenEXR image to a file. -// Returns negative value and may set error string in `err` when there's an -// error -extern int SaveEXRImageToFile(const EXRImage *image, - const EXRHeader *exr_header, const char *filename, - const char **err); - -// Saves multi-channel, single-frame OpenEXR image to a memory. -// Image is compressed using EXRImage.compression value. -// Return the number of bytes if succes. -// Returns negative value and may set error string in `err` when there's an -// error -extern size_t SaveEXRImageToMemory(const EXRImage *image, - const EXRHeader *exr_header, - unsigned char **memory, const char **err); - -// Loads single-frame OpenEXR deep image. -// Application must free memory of variables in DeepImage(image, offset_table) -// Returns negative value and may set error string in `err` when there's an -// error -extern int LoadDeepEXR(DeepImage *out_image, const char *filename, - const char **err); - -// NOT YET IMPLEMENTED: -// Saves single-frame OpenEXR deep image. -// Returns negative value and may set error string in `err` when there's an -// error -// extern int SaveDeepEXR(const DeepImage *in_image, const char *filename, -// const char **err); - -// NOT YET IMPLEMENTED: -// Loads multi-part OpenEXR deep image. -// Application must free memory of variables in DeepImage(image, offset_table) -// extern int LoadMultiPartDeepEXR(DeepImage **out_image, int num_parts, const -// char *filename, -// const char **err); - -// For emscripten. -// Loads single-frame OpenEXR image from memory. Assume EXR image contains -// RGB(A) channels. -// `out_rgba` must have enough memory(at least sizeof(float) x 4(RGBA) x width x -// hight) -// Returns negative value and may set error string in `err` when there's an -// error -extern int LoadEXRFromMemory(float *out_rgba, const unsigned char *memory, - size_t size, const char **err); - -#ifdef __cplusplus -} -#endif - -#ifdef TINYEXR_IMPLEMENTATION -#include -#include -#include -#include -#include -#include - -#include -#include - -// @todo { remove including tinyexr.h } -#include "tinyexr.h" - -#ifdef _OPENMP -#include -#endif - -#if TINYEXR_USE_MINIZ -#else -#include "zlib.h" -#endif - -#if TINYEXR_USE_ZFP -#include "zfp.h" -#endif - -#if __cplusplus > 199711L -// C++11 -#include -#endif // __cplusplus > 199711L - -namespace tinyexr { - -#if __cplusplus > 199711L -// C++11 -typedef uint64_t tinyexr_uint64; -typedef int64_t tinyexr_int64; -#else -// Although `long long` is not a standard type pre C++11, assume it is defined -// as a compiler's extension. -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wc++11-long-long" -#endif -typedef unsigned long long tinyexr_uint64; -typedef long long tinyexr_int64; -#ifdef __clang__ -#pragma clang diagnostic pop -#endif -#endif - -#if TINYEXR_USE_MINIZ - -namespace miniz { - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wc++11-long-long" -#pragma clang diagnostic ignored "-Wold-style-cast" -#pragma clang diagnostic ignored "-Wpadded" -#pragma clang diagnostic ignored "-Wsign-conversion" -#pragma clang diagnostic ignored "-Wc++11-extensions" -#pragma clang diagnostic ignored "-Wconversion" -#endif - -/* miniz.c v1.15 - public domain deflate/inflate, zlib-subset, ZIP - reading/writing/appending, PNG writing - See "unlicense" statement at the end of this file. - Rich Geldreich , last updated Oct. 13, 2013 - Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: - http://www.ietf.org/rfc/rfc1951.txt - - Most API's defined in miniz.c are optional. For example, to disable the - archive related functions just define - MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO - (see the list below for more macros). - - * Change History - 10/13/13 v1.15 r4 - Interim bugfix release while I work on the next major - release with Zip64 support (almost there!): - - Critical fix for the MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY bug - (thanks kahmyong.moon@hp.com) which could cause locate files to not find - files. This bug - would only have occured in earlier versions if you explicitly used this - flag, OR if you used mz_zip_extract_archive_file_to_heap() or - mz_zip_add_mem_to_archive_file_in_place() - (which used this flag). If you can't switch to v1.15 but want to fix - this bug, just remove the uses of this flag from both helper funcs (and of - course don't use the flag). - - Bugfix in mz_zip_reader_extract_to_mem_no_alloc() from kymoon when - pUser_read_buf is not NULL and compressed size is > uncompressed size - - Fixing mz_zip_reader_extract_*() funcs so they don't try to extract - compressed data from directory entries, to account for weird zipfiles which - contain zero-size compressed data on dir entries. - Hopefully this fix won't cause any issues on weird zip archives, - because it assumes the low 16-bits of zip external attributes are DOS - attributes (which I believe they always are in practice). - - Fixing mz_zip_reader_is_file_a_directory() so it doesn't check the - internal attributes, just the filename and external attributes - - mz_zip_reader_init_file() - missing MZ_FCLOSE() call if the seek failed - - Added cmake support for Linux builds which builds all the examples, - tested with clang v3.3 and gcc v4.6. - - Clang fix for tdefl_write_image_to_png_file_in_memory() from toffaletti - - Merged MZ_FORCEINLINE fix from hdeanclark - - Fix include before config #ifdef, thanks emil.brink - - Added tdefl_write_image_to_png_file_in_memory_ex(): supports Y flipping - (super useful for OpenGL apps), and explicit control over the compression - level (so you can - set it to 1 for real-time compression). - - Merged in some compiler fixes from paulharris's github repro. - - Retested this build under Windows (VS 2010, including static analysis), - tcc 0.9.26, gcc v4.6 and clang v3.3. - - Added example6.c, which dumps an image of the mandelbrot set to a PNG - file. - - Modified example2 to help test the - MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY flag more. - - In r3: Bugfix to mz_zip_writer_add_file() found during merge: Fix - possible src file fclose() leak if alignment bytes+local header file write - faiiled - - In r4: Minor bugfix to mz_zip_writer_add_from_zip_reader(): - Was pushing the wrong central dir header offset, appears harmless in this - release, but it became a problem in the zip64 branch - 5/20/12 v1.14 - MinGW32/64 GCC 4.6.1 compiler fixes: added MZ_FORCEINLINE, - #include (thanks fermtect). - 5/19/12 v1.13 - From jason@cornsyrup.org and kelwert@mtu.edu - Fix - mz_crc32() so it doesn't compute the wrong CRC-32's when mz_ulong is 64-bit. - - Temporarily/locally slammed in "typedef unsigned long mz_ulong" and - re-ran a randomized regression test on ~500k files. - - Eliminated a bunch of warnings when compiling with GCC 32-bit/64. - - Ran all examples, miniz.c, and tinfl.c through MSVC 2008's /analyze - (static analysis) option and fixed all warnings (except for the silly - "Use of the comma-operator in a tested expression.." analysis warning, - which I purposely use to work around a MSVC compiler warning). - - Created 32-bit and 64-bit Codeblocks projects/workspace. Built and - tested Linux executables. The codeblocks workspace is compatible with - Linux+Win32/x64. - - Added miniz_tester solution/project, which is a useful little app - derived from LZHAM's tester app that I use as part of the regression test. - - Ran miniz.c and tinfl.c through another series of regression testing on - ~500,000 files and archives. - - Modified example5.c so it purposely disables a bunch of high-level - functionality (MINIZ_NO_STDIO, etc.). (Thanks to corysama for the - MINIZ_NO_STDIO bug report.) - - Fix ftell() usage in examples so they exit with an error on files which - are too large (a limitation of the examples, not miniz itself). - 4/12/12 v1.12 - More comments, added low-level example5.c, fixed a couple - minor level_and_flags issues in the archive API's. - level_and_flags can now be set to MZ_DEFAULT_COMPRESSION. Thanks to Bruce - Dawson for the feedback/bug report. - 5/28/11 v1.11 - Added statement from unlicense.org - 5/27/11 v1.10 - Substantial compressor optimizations: - - Level 1 is now ~4x faster than before. The L1 compressor's throughput - now varies between 70-110MB/sec. on a - - Core i7 (actual throughput varies depending on the type of data, and x64 - vs. x86). - - Improved baseline L2-L9 compression perf. Also, greatly improved - compression perf. issues on some file types. - - Refactored the compression code for better readability and - maintainability. - - Added level 10 compression level (L10 has slightly better ratio than - level 9, but could have a potentially large - drop in throughput on some files). - 5/15/11 v1.09 - Initial stable release. - - * Low-level Deflate/Inflate implementation notes: - - Compression: Use the "tdefl" API's. The compressor supports raw, static, - and dynamic blocks, lazy or - greedy parsing, match length filtering, RLE-only, and Huffman-only streams. - It performs and compresses - approximately as well as zlib. - - Decompression: Use the "tinfl" API's. The entire decompressor is - implemented as a single function - coroutine: see tinfl_decompress(). It supports decompression into a 32KB - (or larger power of 2) wrapping buffer, or into a memory - block large enough to hold the entire file. - - The low-level tdefl/tinfl API's do not make any use of dynamic memory - allocation. - - * zlib-style API notes: - - miniz.c implements a fairly large subset of zlib. There's enough - functionality present for it to be a drop-in - zlib replacement in many apps: - The z_stream struct, optional memory allocation callbacks - deflateInit/deflateInit2/deflate/deflateReset/deflateEnd/deflateBound - inflateInit/inflateInit2/inflate/inflateEnd - compress, compress2, compressBound, uncompress - CRC-32, Adler-32 - Using modern, minimal code size, CPU cache friendly - routines. - Supports raw deflate streams or standard zlib streams with adler-32 - checking. - - Limitations: - The callback API's are not implemented yet. No support for gzip headers or - zlib static dictionaries. - I've tried to closely emulate zlib's various flavors of stream flushing - and return status codes, but - there are no guarantees that miniz.c pulls this off perfectly. - - * PNG writing: See the tdefl_write_image_to_png_file_in_memory() function, - originally written by - Alex Evans. Supports 1-4 bytes/pixel images. - - * ZIP archive API notes: - - The ZIP archive API's where designed with simplicity and efficiency in - mind, with just enough abstraction to - get the job done with minimal fuss. There are simple API's to retrieve file - information, read files from - existing archives, create new archives, append new files to existing - archives, or clone archive data from - one archive to another. It supports archives located in memory or the heap, - on disk (using stdio.h), - or you can specify custom file read/write callbacks. - - - Archive reading: Just call this function to read a single file from a - disk archive: - - void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const - char *pArchive_name, - size_t *pSize, mz_uint zip_flags); - - For more complex cases, use the "mz_zip_reader" functions. Upon opening an - archive, the entire central - directory is located and read as-is into memory, and subsequent file access - only occurs when reading individual files. - - - Archives file scanning: The simple way is to use this function to scan a - loaded archive for a specific file: - - int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, - const char *pComment, mz_uint flags); - - The locate operation can optionally check file comments too, which (as one - example) can be used to identify - multiple versions of the same file in an archive. This function uses a - simple linear search through the central - directory, so it's not very fast. - - Alternately, you can iterate through all the files in an archive (using - mz_zip_reader_get_num_files()) and - retrieve detailed info on each file by calling mz_zip_reader_file_stat(). - - - Archive creation: Use the "mz_zip_writer" functions. The ZIP writer - immediately writes compressed file data - to disk and builds an exact image of the central directory in memory. The - central directory image is written - all at once at the end of the archive file when the archive is finalized. - - The archive writer can optionally align each file's local header and file - data to any power of 2 alignment, - which can be useful when the archive will be read from optical media. Also, - the writer supports placing - arbitrary data blobs at the very beginning of ZIP archives. Archives - written using either feature are still - readable by any ZIP tool. - - - Archive appending: The simple way to add a single file to an archive is - to call this function: - - mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, - const char *pArchive_name, - const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 - comment_size, mz_uint level_and_flags); - - The archive will be created if it doesn't already exist, otherwise it'll be - appended to. - Note the appending is done in-place and is not an atomic operation, so if - something goes wrong - during the operation it's possible the archive could be left without a - central directory (although the local - file headers and file data will be fine, so the archive will be - recoverable). - - For more complex archive modification scenarios: - 1. The safest way is to use a mz_zip_reader to read the existing archive, - cloning only those bits you want to - preserve into a new archive using using the - mz_zip_writer_add_from_zip_reader() function (which compiles the - compressed file data as-is). When you're done, delete the old archive and - rename the newly written archive, and - you're done. This is safe but requires a bunch of temporary disk space or - heap memory. - - 2. Or, you can convert an mz_zip_reader in-place to an mz_zip_writer using - mz_zip_writer_init_from_reader(), - append new files as needed, then finalize the archive which will write an - updated central directory to the - original archive. (This is basically what - mz_zip_add_mem_to_archive_file_in_place() does.) There's a - possibility that the archive's central directory could be lost with this - method if anything goes wrong, though. - - - ZIP archive support limitations: - No zip64 or spanning support. Extraction functions can only handle - unencrypted, stored or deflated files. - Requires streams capable of seeking. - - * This is a header file library, like stb_image.c. To get only a header file, - either cut and paste the - below header, or create miniz.h, #define MINIZ_HEADER_FILE_ONLY, and then - include miniz.c from it. - - * Important: For best perf. be sure to customize the below macros for your - target platform: - #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 - #define MINIZ_LITTLE_ENDIAN 1 - #define MINIZ_HAS_64BIT_REGISTERS 1 - - * On platforms using glibc, Be sure to "#define _LARGEFILE64_SOURCE 1" before - including miniz.c to ensure miniz - uses the 64-bit variants: fopen64(), stat64(), etc. Otherwise you won't be - able to process large files - (i.e. 32-bit stat() fails for me on files > 0x7FFFFFFF bytes). -*/ - -#ifndef MINIZ_HEADER_INCLUDED -#define MINIZ_HEADER_INCLUDED - -#include - -// Defines to completely disable specific portions of miniz.c: -// If all macros here are defined the only functionality remaining will be -// CRC-32, adler-32, tinfl, and tdefl. - -// Define MINIZ_NO_STDIO to disable all usage and any functions which rely on -// stdio for file I/O. -//#define MINIZ_NO_STDIO - -// If MINIZ_NO_TIME is specified then the ZIP archive functions will not be able -// to get the current time, or -// get/set file times, and the C run-time funcs that get/set times won't be -// called. -// The current downside is the times written to your archives will be from 1979. -#define MINIZ_NO_TIME - -// Define MINIZ_NO_ARCHIVE_APIS to disable all ZIP archive API's. -//#define MINIZ_NO_ARCHIVE_APIS - -// Define MINIZ_NO_ARCHIVE_APIS to disable all writing related ZIP archive -// API's. -//#define MINIZ_NO_ARCHIVE_WRITING_APIS - -// Define MINIZ_NO_ZLIB_APIS to remove all ZLIB-style compression/decompression -// API's. -//#define MINIZ_NO_ZLIB_APIS - -// Define MINIZ_NO_ZLIB_COMPATIBLE_NAME to disable zlib names, to prevent -// conflicts against stock zlib. -//#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES - -// Define MINIZ_NO_MALLOC to disable all calls to malloc, free, and realloc. -// Note if MINIZ_NO_MALLOC is defined then the user must always provide custom -// user alloc/free/realloc -// callbacks to the zlib and archive API's, and a few stand-alone helper API's -// which don't provide custom user -// functions (such as tdefl_compress_mem_to_heap() and -// tinfl_decompress_mem_to_heap()) won't work. -//#define MINIZ_NO_MALLOC - -#if defined(__TINYC__) && (defined(__linux) || defined(__linux__)) -// TODO: Work around "error: include file 'sys\utime.h' when compiling with tcc -// on Linux -#define MINIZ_NO_TIME -#endif - -#if !defined(MINIZ_NO_TIME) && !defined(MINIZ_NO_ARCHIVE_APIS) -#include -#endif - -#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || \ - defined(__i386) || defined(__i486__) || defined(__i486) || \ - defined(i386) || defined(__ia64__) || defined(__x86_64__) -// MINIZ_X86_OR_X64_CPU is only used to help set the below macros. -#define MINIZ_X86_OR_X64_CPU 1 -#endif - -#if defined(__sparcv9) -// Big endian -#else -#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU -// Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian. -#define MINIZ_LITTLE_ENDIAN 1 -#endif -#endif - -#if MINIZ_X86_OR_X64_CPU -// Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient -// integer loads and stores from unaligned addresses. -//#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 -#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES \ - 0 // disable to suppress compiler warnings -#endif - -#if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || \ - defined(_LP64) || defined(__LP64__) || defined(__ia64__) || \ - defined(__x86_64__) -// Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are -// reasonably fast (and don't involve compiler generated calls to helper -// functions). -#define MINIZ_HAS_64BIT_REGISTERS 1 -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -// ------------------- zlib-style API Definitions. - -// For more compatibility with zlib, miniz.c uses unsigned long for some -// parameters/struct members. Beware: mz_ulong can be either 32 or 64-bits! -typedef unsigned long mz_ulong; - -// mz_free() internally uses the MZ_FREE() macro (which by default calls free() -// unless you've modified the MZ_MALLOC macro) to release a block allocated from -// the heap. -void mz_free(void *p); - -#define MZ_ADLER32_INIT (1) -// mz_adler32() returns the initial adler-32 value to use when called with -// ptr==NULL. -mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len); - -#define MZ_CRC32_INIT (0) -// mz_crc32() returns the initial CRC-32 value to use when called with -// ptr==NULL. -mz_ulong mz_crc32(mz_ulong crc, const unsigned char *ptr, size_t buf_len); - -// Compression strategies. -enum { - MZ_DEFAULT_STRATEGY = 0, - MZ_FILTERED = 1, - MZ_HUFFMAN_ONLY = 2, - MZ_RLE = 3, - MZ_FIXED = 4 -}; - -// Method -#define MZ_DEFLATED 8 - -#ifndef MINIZ_NO_ZLIB_APIS - -// Heap allocation callbacks. -// Note that mz_alloc_func parameter types purpsosely differ from zlib's: -// items/size is size_t, not unsigned long. -typedef void *(*mz_alloc_func)(void *opaque, size_t items, size_t size); -typedef void (*mz_free_func)(void *opaque, void *address); -typedef void *(*mz_realloc_func)(void *opaque, void *address, size_t items, - size_t size); - -#define MZ_VERSION "9.1.15" -#define MZ_VERNUM 0x91F0 -#define MZ_VER_MAJOR 9 -#define MZ_VER_MINOR 1 -#define MZ_VER_REVISION 15 -#define MZ_VER_SUBREVISION 0 - -// Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The -// other values are for advanced use (refer to the zlib docs). -enum { - MZ_NO_FLUSH = 0, - MZ_PARTIAL_FLUSH = 1, - MZ_SYNC_FLUSH = 2, - MZ_FULL_FLUSH = 3, - MZ_FINISH = 4, - MZ_BLOCK = 5 -}; - -// Return status codes. MZ_PARAM_ERROR is non-standard. -enum { - MZ_OK = 0, - MZ_STREAM_END = 1, - MZ_NEED_DICT = 2, - MZ_ERRNO = -1, - MZ_STREAM_ERROR = -2, - MZ_DATA_ERROR = -3, - MZ_MEM_ERROR = -4, - MZ_BUF_ERROR = -5, - MZ_VERSION_ERROR = -6, - MZ_PARAM_ERROR = -10000 -}; - -// Compression levels: 0-9 are the standard zlib-style levels, 10 is best -// possible compression (not zlib compatible, and may be very slow), -// MZ_DEFAULT_COMPRESSION=MZ_DEFAULT_LEVEL. -enum { - MZ_NO_COMPRESSION = 0, - MZ_BEST_SPEED = 1, - MZ_BEST_COMPRESSION = 9, - MZ_UBER_COMPRESSION = 10, - MZ_DEFAULT_LEVEL = 6, - MZ_DEFAULT_COMPRESSION = -1 -}; - -// Window bits -#define MZ_DEFAULT_WINDOW_BITS 15 - -struct mz_internal_state; - -// Compression/decompression stream struct. -typedef struct mz_stream_s { - const unsigned char *next_in; // pointer to next byte to read - unsigned int avail_in; // number of bytes available at next_in - mz_ulong total_in; // total number of bytes consumed so far - - unsigned char *next_out; // pointer to next byte to write - unsigned int avail_out; // number of bytes that can be written to next_out - mz_ulong total_out; // total number of bytes produced so far - - char *msg; // error msg (unused) - struct mz_internal_state *state; // internal state, allocated by zalloc/zfree - - mz_alloc_func - zalloc; // optional heap allocation function (defaults to malloc) - mz_free_func zfree; // optional heap free function (defaults to free) - void *opaque; // heap alloc function user pointer - - int data_type; // data_type (unused) - mz_ulong adler; // adler32 of the source or uncompressed data - mz_ulong reserved; // not used -} mz_stream; - -typedef mz_stream *mz_streamp; - -// Returns the version string of miniz.c. -const char *mz_version(void); - -// mz_deflateInit() initializes a compressor with default options: -// Parameters: -// pStream must point to an initialized mz_stream struct. -// level must be between [MZ_NO_COMPRESSION, MZ_BEST_COMPRESSION]. -// level 1 enables a specially optimized compression function that's been -// optimized purely for performance, not ratio. -// (This special func. is currently only enabled when -// MINIZ_USE_UNALIGNED_LOADS_AND_STORES and MINIZ_LITTLE_ENDIAN are defined.) -// Return values: -// MZ_OK on success. -// MZ_STREAM_ERROR if the stream is bogus. -// MZ_PARAM_ERROR if the input parameters are bogus. -// MZ_MEM_ERROR on out of memory. -int mz_deflateInit(mz_streamp pStream, int level); - -// mz_deflateInit2() is like mz_deflate(), except with more control: -// Additional parameters: -// method must be MZ_DEFLATED -// window_bits must be MZ_DEFAULT_WINDOW_BITS (to wrap the deflate stream with -// zlib header/adler-32 footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate/no -// header or footer) -// mem_level must be between [1, 9] (it's checked but ignored by miniz.c) -int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, - int mem_level, int strategy); - -// Quickly resets a compressor without having to reallocate anything. Same as -// calling mz_deflateEnd() followed by mz_deflateInit()/mz_deflateInit2(). -int mz_deflateReset(mz_streamp pStream); - -// mz_deflate() compresses the input to output, consuming as much of the input -// and producing as much output as possible. -// Parameters: -// pStream is the stream to read from and write to. You must initialize/update -// the next_in, avail_in, next_out, and avail_out members. -// flush may be MZ_NO_FLUSH, MZ_PARTIAL_FLUSH/MZ_SYNC_FLUSH, MZ_FULL_FLUSH, or -// MZ_FINISH. -// Return values: -// MZ_OK on success (when flushing, or if more input is needed but not -// available, and/or there's more output to be written but the output buffer -// is full). -// MZ_STREAM_END if all input has been consumed and all output bytes have been -// written. Don't call mz_deflate() on the stream anymore. -// MZ_STREAM_ERROR if the stream is bogus. -// MZ_PARAM_ERROR if one of the parameters is invalid. -// MZ_BUF_ERROR if no forward progress is possible because the input and/or -// output buffers are empty. (Fill up the input buffer or free up some output -// space and try again.) -int mz_deflate(mz_streamp pStream, int flush); - -// mz_deflateEnd() deinitializes a compressor: -// Return values: -// MZ_OK on success. -// MZ_STREAM_ERROR if the stream is bogus. -int mz_deflateEnd(mz_streamp pStream); - -// mz_deflateBound() returns a (very) conservative upper bound on the amount of -// data that could be generated by deflate(), assuming flush is set to only -// MZ_NO_FLUSH or MZ_FINISH. -mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len); - -// Single-call compression functions mz_compress() and mz_compress2(): -// Returns MZ_OK on success, or one of the error codes from mz_deflate() on -// failure. -int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, - const unsigned char *pSource, mz_ulong source_len); -int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, - const unsigned char *pSource, mz_ulong source_len, int level); - -// mz_compressBound() returns a (very) conservative upper bound on the amount of -// data that could be generated by calling mz_compress(). -mz_ulong mz_compressBound(mz_ulong source_len); - -// Initializes a decompressor. -int mz_inflateInit(mz_streamp pStream); - -// mz_inflateInit2() is like mz_inflateInit() with an additional option that -// controls the window size and whether or not the stream has been wrapped with -// a zlib header/footer: -// window_bits must be MZ_DEFAULT_WINDOW_BITS (to parse zlib header/footer) or -// -MZ_DEFAULT_WINDOW_BITS (raw deflate). -int mz_inflateInit2(mz_streamp pStream, int window_bits); - -// Decompresses the input stream to the output, consuming only as much of the -// input as needed, and writing as much to the output as possible. -// Parameters: -// pStream is the stream to read from and write to. You must initialize/update -// the next_in, avail_in, next_out, and avail_out members. -// flush may be MZ_NO_FLUSH, MZ_SYNC_FLUSH, or MZ_FINISH. -// On the first call, if flush is MZ_FINISH it's assumed the input and output -// buffers are both sized large enough to decompress the entire stream in a -// single call (this is slightly faster). -// MZ_FINISH implies that there are no more source bytes available beside -// what's already in the input buffer, and that the output buffer is large -// enough to hold the rest of the decompressed data. -// Return values: -// MZ_OK on success. Either more input is needed but not available, and/or -// there's more output to be written but the output buffer is full. -// MZ_STREAM_END if all needed input has been consumed and all output bytes -// have been written. For zlib streams, the adler-32 of the decompressed data -// has also been verified. -// MZ_STREAM_ERROR if the stream is bogus. -// MZ_DATA_ERROR if the deflate stream is invalid. -// MZ_PARAM_ERROR if one of the parameters is invalid. -// MZ_BUF_ERROR if no forward progress is possible because the input buffer is -// empty but the inflater needs more input to continue, or if the output -// buffer is not large enough. Call mz_inflate() again -// with more input data, or with more room in the output buffer (except when -// using single call decompression, described above). -int mz_inflate(mz_streamp pStream, int flush); - -// Deinitializes a decompressor. -int mz_inflateEnd(mz_streamp pStream); - -// Single-call decompression. -// Returns MZ_OK on success, or one of the error codes from mz_inflate() on -// failure. -int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, - const unsigned char *pSource, mz_ulong source_len); - -// Returns a string description of the specified error code, or NULL if the -// error code is invalid. -const char *mz_error(int err); - -// Redefine zlib-compatible names to miniz equivalents, so miniz.c can be used -// as a drop-in replacement for the subset of zlib that miniz.c supports. -// Define MINIZ_NO_ZLIB_COMPATIBLE_NAMES to disable zlib-compatibility if you -// use zlib in the same project. -#ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES -typedef unsigned char Byte; -typedef unsigned int uInt; -typedef mz_ulong uLong; -typedef Byte Bytef; -typedef uInt uIntf; -typedef char charf; -typedef int intf; -typedef void *voidpf; -typedef uLong uLongf; -typedef void *voidp; -typedef void *const voidpc; -#define Z_NULL 0 -#define Z_NO_FLUSH MZ_NO_FLUSH -#define Z_PARTIAL_FLUSH MZ_PARTIAL_FLUSH -#define Z_SYNC_FLUSH MZ_SYNC_FLUSH -#define Z_FULL_FLUSH MZ_FULL_FLUSH -#define Z_FINISH MZ_FINISH -#define Z_BLOCK MZ_BLOCK -#define Z_OK MZ_OK -#define Z_STREAM_END MZ_STREAM_END -#define Z_NEED_DICT MZ_NEED_DICT -#define Z_ERRNO MZ_ERRNO -#define Z_STREAM_ERROR MZ_STREAM_ERROR -#define Z_DATA_ERROR MZ_DATA_ERROR -#define Z_MEM_ERROR MZ_MEM_ERROR -#define Z_BUF_ERROR MZ_BUF_ERROR -#define Z_VERSION_ERROR MZ_VERSION_ERROR -#define Z_PARAM_ERROR MZ_PARAM_ERROR -#define Z_NO_COMPRESSION MZ_NO_COMPRESSION -#define Z_BEST_SPEED MZ_BEST_SPEED -#define Z_BEST_COMPRESSION MZ_BEST_COMPRESSION -#define Z_DEFAULT_COMPRESSION MZ_DEFAULT_COMPRESSION -#define Z_DEFAULT_STRATEGY MZ_DEFAULT_STRATEGY -#define Z_FILTERED MZ_FILTERED -#define Z_HUFFMAN_ONLY MZ_HUFFMAN_ONLY -#define Z_RLE MZ_RLE -#define Z_FIXED MZ_FIXED -#define Z_DEFLATED MZ_DEFLATED -#define Z_DEFAULT_WINDOW_BITS MZ_DEFAULT_WINDOW_BITS -#define alloc_func mz_alloc_func -#define free_func mz_free_func -#define internal_state mz_internal_state -#define z_stream mz_stream -#define deflateInit mz_deflateInit -#define deflateInit2 mz_deflateInit2 -#define deflateReset mz_deflateReset -#define deflate mz_deflate -#define deflateEnd mz_deflateEnd -#define deflateBound mz_deflateBound -#define compress mz_compress -#define compress2 mz_compress2 -#define compressBound mz_compressBound -#define inflateInit mz_inflateInit -#define inflateInit2 mz_inflateInit2 -#define inflate mz_inflate -#define inflateEnd mz_inflateEnd -#define uncompress mz_uncompress -#define crc32 mz_crc32 -#define adler32 mz_adler32 -#define MAX_WBITS 15 -#define MAX_MEM_LEVEL 9 -#define zError mz_error -#define ZLIB_VERSION MZ_VERSION -#define ZLIB_VERNUM MZ_VERNUM -#define ZLIB_VER_MAJOR MZ_VER_MAJOR -#define ZLIB_VER_MINOR MZ_VER_MINOR -#define ZLIB_VER_REVISION MZ_VER_REVISION -#define ZLIB_VER_SUBREVISION MZ_VER_SUBREVISION -#define zlibVersion mz_version -#define zlib_version mz_version() -#endif // #ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES - -#endif // MINIZ_NO_ZLIB_APIS - -// ------------------- Types and macros - -typedef unsigned char mz_uint8; -typedef signed short mz_int16; -typedef unsigned short mz_uint16; -typedef unsigned int mz_uint32; -typedef unsigned int mz_uint; -typedef long long mz_int64; -typedef unsigned long long mz_uint64; -typedef int mz_bool; - -#define MZ_FALSE (0) -#define MZ_TRUE (1) - -// An attempt to work around MSVC's spammy "warning C4127: conditional -// expression is constant" message. -#ifdef _MSC_VER -#define MZ_MACRO_END while (0, 0) -#else -#define MZ_MACRO_END while (0) -#endif - -// ------------------- ZIP archive reading/writing - -#ifndef MINIZ_NO_ARCHIVE_APIS - -enum { - MZ_ZIP_MAX_IO_BUF_SIZE = 64 * 1024, - MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE = 260, - MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE = 256 -}; - -typedef struct { - mz_uint32 m_file_index; - mz_uint32 m_central_dir_ofs; - mz_uint16 m_version_made_by; - mz_uint16 m_version_needed; - mz_uint16 m_bit_flag; - mz_uint16 m_method; -#ifndef MINIZ_NO_TIME - time_t m_time; -#endif - mz_uint32 m_crc32; - mz_uint64 m_comp_size; - mz_uint64 m_uncomp_size; - mz_uint16 m_internal_attr; - mz_uint32 m_external_attr; - mz_uint64 m_local_header_ofs; - mz_uint32 m_comment_size; - char m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE]; - char m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE]; -} mz_zip_archive_file_stat; - -typedef size_t (*mz_file_read_func)(void *pOpaque, mz_uint64 file_ofs, - void *pBuf, size_t n); -typedef size_t (*mz_file_write_func)(void *pOpaque, mz_uint64 file_ofs, - const void *pBuf, size_t n); - -struct mz_zip_internal_state_tag; -typedef struct mz_zip_internal_state_tag mz_zip_internal_state; - -typedef enum { - MZ_ZIP_MODE_INVALID = 0, - MZ_ZIP_MODE_READING = 1, - MZ_ZIP_MODE_WRITING = 2, - MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3 -} mz_zip_mode; - -typedef struct mz_zip_archive_tag { - mz_uint64 m_archive_size; - mz_uint64 m_central_directory_file_ofs; - mz_uint m_total_files; - mz_zip_mode m_zip_mode; - - mz_uint m_file_offset_alignment; - - mz_alloc_func m_pAlloc; - mz_free_func m_pFree; - mz_realloc_func m_pRealloc; - void *m_pAlloc_opaque; - - mz_file_read_func m_pRead; - mz_file_write_func m_pWrite; - void *m_pIO_opaque; - - mz_zip_internal_state *m_pState; - -} mz_zip_archive; - -typedef enum { - MZ_ZIP_FLAG_CASE_SENSITIVE = 0x0100, - MZ_ZIP_FLAG_IGNORE_PATH = 0x0200, - MZ_ZIP_FLAG_COMPRESSED_DATA = 0x0400, - MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY = 0x0800 -} mz_zip_flags; - -// ZIP archive reading - -// Inits a ZIP archive reader. -// These functions read and validate the archive's central directory. -mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, - mz_uint32 flags); -mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, - size_t size, mz_uint32 flags); - -#ifndef MINIZ_NO_STDIO -mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, - mz_uint32 flags); -#endif - -// Returns the total number of files in the archive. -mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip); - -// Returns detailed information about an archive file entry. -mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, - mz_zip_archive_file_stat *pStat); - -// Determines if an archive file entry is a directory entry. -mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, - mz_uint file_index); -mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, - mz_uint file_index); - -// Retrieves the filename of an archive file entry. -// Returns the number of bytes written to pFilename, or if filename_buf_size is -// 0 this function returns the number of bytes needed to fully store the -// filename. -mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, - char *pFilename, mz_uint filename_buf_size); - -// Attempts to locates a file in the archive's central directory. -// Valid flags: MZ_ZIP_FLAG_CASE_SENSITIVE, MZ_ZIP_FLAG_IGNORE_PATH -// Returns -1 if the file cannot be found. -int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, - const char *pComment, mz_uint flags); - -// Extracts a archive file to a memory buffer using no memory allocation. -mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, - mz_uint file_index, void *pBuf, - size_t buf_size, mz_uint flags, - void *pUser_read_buf, - size_t user_read_buf_size); -mz_bool mz_zip_reader_extract_file_to_mem_no_alloc( - mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, - mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size); - -// Extracts a archive file to a memory buffer. -mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, - void *pBuf, size_t buf_size, - mz_uint flags); -mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, - const char *pFilename, void *pBuf, - size_t buf_size, mz_uint flags); - -// Extracts a archive file to a dynamically allocated heap buffer. -void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, - size_t *pSize, mz_uint flags); -void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, - const char *pFilename, size_t *pSize, - mz_uint flags); - -// Extracts a archive file using a callback function to output the file's data. -mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, - mz_uint file_index, - mz_file_write_func pCallback, - void *pOpaque, mz_uint flags); -mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, - const char *pFilename, - mz_file_write_func pCallback, - void *pOpaque, mz_uint flags); - -#ifndef MINIZ_NO_STDIO -// Extracts a archive file to a disk file and sets its last accessed and -// modified times. -// This function only extracts files, not archive directory records. -mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, - const char *pDst_filename, mz_uint flags); -mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, - const char *pArchive_filename, - const char *pDst_filename, - mz_uint flags); -#endif - -// Ends archive reading, freeing all allocations, and closing the input archive -// file if mz_zip_reader_init_file() was used. -mz_bool mz_zip_reader_end(mz_zip_archive *pZip); - -// ZIP archive writing - -#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS - -// Inits a ZIP archive writer. -mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size); -mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, - size_t size_to_reserve_at_beginning, - size_t initial_allocation_size); - -#ifndef MINIZ_NO_STDIO -mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, - mz_uint64 size_to_reserve_at_beginning); -#endif - -// Converts a ZIP archive reader object into a writer object, to allow efficient -// in-place file appends to occur on an existing archive. -// For archives opened using mz_zip_reader_init_file, pFilename must be the -// archive's filename so it can be reopened for writing. If the file can't be -// reopened, mz_zip_reader_end() will be called. -// For archives opened using mz_zip_reader_init_mem, the memory block must be -// growable using the realloc callback (which defaults to realloc unless you've -// overridden it). -// Finally, for archives opened using mz_zip_reader_init, the mz_zip_archive's -// user provided m_pWrite function cannot be NULL. -// Note: In-place archive modification is not recommended unless you know what -// you're doing, because if execution stops or something goes wrong before -// the archive is finalized the file's central directory will be hosed. -mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, - const char *pFilename); - -// Adds the contents of a memory buffer to an archive. These functions record -// the current local time into the archive. -// To add a directory entry, call this method with an archive name ending in a -// forwardslash with empty buffer. -// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, -// MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or -// just set to MZ_DEFAULT_COMPRESSION. -mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, - const void *pBuf, size_t buf_size, - mz_uint level_and_flags); -mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, - const char *pArchive_name, const void *pBuf, - size_t buf_size, const void *pComment, - mz_uint16 comment_size, - mz_uint level_and_flags, mz_uint64 uncomp_size, - mz_uint32 uncomp_crc32); - -#ifndef MINIZ_NO_STDIO -// Adds the contents of a disk file to an archive. This function also records -// the disk file's modified time into the archive. -// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, -// MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or -// just set to MZ_DEFAULT_COMPRESSION. -mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, - const char *pSrc_filename, const void *pComment, - mz_uint16 comment_size, mz_uint level_and_flags); -#endif - -// Adds a file to an archive by fully cloning the data from another archive. -// This function fully clones the source file's compressed data (no -// recompression), along with its full filename, extra data, and comment fields. -mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, - mz_zip_archive *pSource_zip, - mz_uint file_index); - -// Finalizes the archive by writing the central directory records followed by -// the end of central directory record. -// After an archive is finalized, the only valid call on the mz_zip_archive -// struct is mz_zip_writer_end(). -// An archive must be manually finalized by calling this function for it to be -// valid. -mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip); -mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **pBuf, - size_t *pSize); - -// Ends archive writing, freeing all allocations, and closing the output file if -// mz_zip_writer_init_file() was used. -// Note for the archive to be valid, it must have been finalized before ending. -mz_bool mz_zip_writer_end(mz_zip_archive *pZip); - -// Misc. high-level helper functions: - -// mz_zip_add_mem_to_archive_file_in_place() efficiently (but not atomically) -// appends a memory blob to a ZIP archive. -// level_and_flags - compression level (0-10, see MZ_BEST_SPEED, -// MZ_BEST_COMPRESSION, etc.) logically OR'd with zero or more mz_zip_flags, or -// just set to MZ_DEFAULT_COMPRESSION. -mz_bool mz_zip_add_mem_to_archive_file_in_place( - const char *pZip_filename, const char *pArchive_name, const void *pBuf, - size_t buf_size, const void *pComment, mz_uint16 comment_size, - mz_uint level_and_flags); - -// Reads a single file from an archive into a heap block. -// Returns NULL on failure. -void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, - const char *pArchive_name, - size_t *pSize, mz_uint zip_flags); - -#endif // #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS - -#endif // #ifndef MINIZ_NO_ARCHIVE_APIS - -// ------------------- Low-level Decompression API Definitions - -// Decompression flags used by tinfl_decompress(). -// TINFL_FLAG_PARSE_ZLIB_HEADER: If set, the input has a valid zlib header and -// ends with an adler32 checksum (it's a valid zlib stream). Otherwise, the -// input is a raw deflate stream. -// TINFL_FLAG_HAS_MORE_INPUT: If set, there are more input bytes available -// beyond the end of the supplied input buffer. If clear, the input buffer -// contains all remaining input. -// TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF: If set, the output buffer is large -// enough to hold the entire decompressed stream. If clear, the output buffer is -// at least the size of the dictionary (typically 32KB). -// TINFL_FLAG_COMPUTE_ADLER32: Force adler-32 checksum computation of the -// decompressed bytes. -enum { - TINFL_FLAG_PARSE_ZLIB_HEADER = 1, - TINFL_FLAG_HAS_MORE_INPUT = 2, - TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF = 4, - TINFL_FLAG_COMPUTE_ADLER32 = 8 -}; - -// High level decompression functions: -// tinfl_decompress_mem_to_heap() decompresses a block in memory to a heap block -// allocated via malloc(). -// On entry: -// pSrc_buf, src_buf_len: Pointer and size of the Deflate or zlib source data -// to decompress. -// On return: -// Function returns a pointer to the decompressed data, or NULL on failure. -// *pOut_len will be set to the decompressed data's size, which could be larger -// than src_buf_len on uncompressible data. -// The caller must call mz_free() on the returned block when it's no longer -// needed. -void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, - size_t *pOut_len, int flags); - -// tinfl_decompress_mem_to_mem() decompresses a block in memory to another block -// in memory. -// Returns TINFL_DECOMPRESS_MEM_TO_MEM_FAILED on failure, or the number of bytes -// written on success. -#define TINFL_DECOMPRESS_MEM_TO_MEM_FAILED ((size_t)(-1)) -size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, - const void *pSrc_buf, size_t src_buf_len, - int flags); - -// tinfl_decompress_mem_to_callback() decompresses a block in memory to an -// internal 32KB buffer, and a user provided callback function will be called to -// flush the buffer. -// Returns 1 on success or 0 on failure. -typedef int (*tinfl_put_buf_func_ptr)(const void *pBuf, int len, void *pUser); -int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, - tinfl_put_buf_func_ptr pPut_buf_func, - void *pPut_buf_user, int flags); - -struct tinfl_decompressor_tag; -typedef struct tinfl_decompressor_tag tinfl_decompressor; - -// Max size of LZ dictionary. -#define TINFL_LZ_DICT_SIZE 32768 - -// Return status. -typedef enum { - TINFL_STATUS_BAD_PARAM = -3, - TINFL_STATUS_ADLER32_MISMATCH = -2, - TINFL_STATUS_FAILED = -1, - TINFL_STATUS_DONE = 0, - TINFL_STATUS_NEEDS_MORE_INPUT = 1, - TINFL_STATUS_HAS_MORE_OUTPUT = 2 -} tinfl_status; - -// Initializes the decompressor to its initial state. -#define tinfl_init(r) \ - do { \ - (r)->m_state = 0; \ - } \ - MZ_MACRO_END -#define tinfl_get_adler32(r) (r)->m_check_adler32 - -// Main low-level decompressor coroutine function. This is the only function -// actually needed for decompression. All the other functions are just -// high-level helpers for improved usability. -// This is a universal API, i.e. it can be used as a building block to build any -// desired higher level decompression API. In the limit case, it can be called -// once per every byte input or output. -tinfl_status tinfl_decompress(tinfl_decompressor *r, - const mz_uint8 *pIn_buf_next, - size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, - mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, - const mz_uint32 decomp_flags); - -// Internal/private bits follow. -enum { - TINFL_MAX_HUFF_TABLES = 3, - TINFL_MAX_HUFF_SYMBOLS_0 = 288, - TINFL_MAX_HUFF_SYMBOLS_1 = 32, - TINFL_MAX_HUFF_SYMBOLS_2 = 19, - TINFL_FAST_LOOKUP_BITS = 10, - TINFL_FAST_LOOKUP_SIZE = 1 << TINFL_FAST_LOOKUP_BITS -}; - -typedef struct { - mz_uint8 m_code_size[TINFL_MAX_HUFF_SYMBOLS_0]; - mz_int16 m_look_up[TINFL_FAST_LOOKUP_SIZE], - m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2]; -} tinfl_huff_table; - - -#ifndef MINIZ_HAS_64BIT_REGISTERS -# define MINIZ_HAS_64BIT_REGISTERS 0 -#endif - -#ifndef TINFL_USE_64BIT_BITBUF -# if MINIZ_HAS_64BIT_REGISTERS -# define TINFL_USE_64BIT_BITBUF 1 -# else -# define TINFL_USE_64BIT_BITBUF 0 -# endif -#endif - -#if TINFL_USE_64BIT_BITBUF -typedef mz_uint64 tinfl_bit_buf_t; -#define TINFL_BITBUF_SIZE (64) -#else -typedef mz_uint32 tinfl_bit_buf_t; -#define TINFL_BITBUF_SIZE (32) -#endif - -struct tinfl_decompressor_tag { - mz_uint32 m_state, m_num_bits, m_zhdr0, m_zhdr1, m_z_adler32, m_final, m_type, - m_check_adler32, m_dist, m_counter, m_num_extra, - m_table_sizes[TINFL_MAX_HUFF_TABLES]; - tinfl_bit_buf_t m_bit_buf; - size_t m_dist_from_out_buf_start; - tinfl_huff_table m_tables[TINFL_MAX_HUFF_TABLES]; - mz_uint8 m_raw_header[4], - m_len_codes[TINFL_MAX_HUFF_SYMBOLS_0 + TINFL_MAX_HUFF_SYMBOLS_1 + 137]; -}; - -// ------------------- Low-level Compression API Definitions - -// Set TDEFL_LESS_MEMORY to 1 to use less memory (compression will be slightly -// slower, and raw/dynamic blocks will be output more frequently). -#define TDEFL_LESS_MEMORY 0 - -// tdefl_init() compression flags logically OR'd together (low 12 bits contain -// the max. number of probes per dictionary search): -// TDEFL_DEFAULT_MAX_PROBES: The compressor defaults to 128 dictionary probes -// per dictionary search. 0=Huffman only, 1=Huffman+LZ (fastest/crap -// compression), 4095=Huffman+LZ (slowest/best compression). -enum { - TDEFL_HUFFMAN_ONLY = 0, - TDEFL_DEFAULT_MAX_PROBES = 128, - TDEFL_MAX_PROBES_MASK = 0xFFF -}; - -// TDEFL_WRITE_ZLIB_HEADER: If set, the compressor outputs a zlib header before -// the deflate data, and the Adler-32 of the source data at the end. Otherwise, -// you'll get raw deflate data. -// TDEFL_COMPUTE_ADLER32: Always compute the adler-32 of the input data (even -// when not writing zlib headers). -// TDEFL_GREEDY_PARSING_FLAG: Set to use faster greedy parsing, instead of more -// efficient lazy parsing. -// TDEFL_NONDETERMINISTIC_PARSING_FLAG: Enable to decrease the compressor's -// initialization time to the minimum, but the output may vary from run to run -// given the same input (depending on the contents of memory). -// TDEFL_RLE_MATCHES: Only look for RLE matches (matches with a distance of 1) -// TDEFL_FILTER_MATCHES: Discards matches <= 5 chars if enabled. -// TDEFL_FORCE_ALL_STATIC_BLOCKS: Disable usage of optimized Huffman tables. -// TDEFL_FORCE_ALL_RAW_BLOCKS: Only use raw (uncompressed) deflate blocks. -// The low 12 bits are reserved to control the max # of hash probes per -// dictionary lookup (see TDEFL_MAX_PROBES_MASK). -enum { - TDEFL_WRITE_ZLIB_HEADER = 0x01000, - TDEFL_COMPUTE_ADLER32 = 0x02000, - TDEFL_GREEDY_PARSING_FLAG = 0x04000, - TDEFL_NONDETERMINISTIC_PARSING_FLAG = 0x08000, - TDEFL_RLE_MATCHES = 0x10000, - TDEFL_FILTER_MATCHES = 0x20000, - TDEFL_FORCE_ALL_STATIC_BLOCKS = 0x40000, - TDEFL_FORCE_ALL_RAW_BLOCKS = 0x80000 -}; - -// High level compression functions: -// tdefl_compress_mem_to_heap() compresses a block in memory to a heap block -// allocated via malloc(). -// On entry: -// pSrc_buf, src_buf_len: Pointer and size of source block to compress. -// flags: The max match finder probes (default is 128) logically OR'd against -// the above flags. Higher probes are slower but improve compression. -// On return: -// Function returns a pointer to the compressed data, or NULL on failure. -// *pOut_len will be set to the compressed data's size, which could be larger -// than src_buf_len on uncompressible data. -// The caller must free() the returned block when it's no longer needed. -void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, - size_t *pOut_len, int flags); - -// tdefl_compress_mem_to_mem() compresses a block in memory to another block in -// memory. -// Returns 0 on failure. -size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, - const void *pSrc_buf, size_t src_buf_len, - int flags); - -// Compresses an image to a compressed PNG file in memory. -// On entry: -// pImage, w, h, and num_chans describe the image to compress. num_chans may be -// 1, 2, 3, or 4. -// The image pitch in bytes per scanline will be w*num_chans. The leftmost -// pixel on the top scanline is stored first in memory. -// level may range from [0,10], use MZ_NO_COMPRESSION, MZ_BEST_SPEED, -// MZ_BEST_COMPRESSION, etc. or a decent default is MZ_DEFAULT_LEVEL -// If flip is true, the image will be flipped on the Y axis (useful for OpenGL -// apps). -// On return: -// Function returns a pointer to the compressed data, or NULL on failure. -// *pLen_out will be set to the size of the PNG image file. -// The caller must mz_free() the returned heap block (which will typically be -// larger than *pLen_out) when it's no longer needed. -void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, - int h, int num_chans, - size_t *pLen_out, - mz_uint level, mz_bool flip); -void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, - int num_chans, size_t *pLen_out); - -// Output stream interface. The compressor uses this interface to write -// compressed data. It'll typically be called TDEFL_OUT_BUF_SIZE at a time. -typedef mz_bool (*tdefl_put_buf_func_ptr)(const void *pBuf, int len, - void *pUser); - -// tdefl_compress_mem_to_output() compresses a block to an output stream. The -// above helpers use this function internally. -mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, - tdefl_put_buf_func_ptr pPut_buf_func, - void *pPut_buf_user, int flags); - -enum { - TDEFL_MAX_HUFF_TABLES = 3, - TDEFL_MAX_HUFF_SYMBOLS_0 = 288, - TDEFL_MAX_HUFF_SYMBOLS_1 = 32, - TDEFL_MAX_HUFF_SYMBOLS_2 = 19, - TDEFL_LZ_DICT_SIZE = 32768, - TDEFL_LZ_DICT_SIZE_MASK = TDEFL_LZ_DICT_SIZE - 1, - TDEFL_MIN_MATCH_LEN = 3, - TDEFL_MAX_MATCH_LEN = 258 -}; - -// TDEFL_OUT_BUF_SIZE MUST be large enough to hold a single entire compressed -// output block (using static/fixed Huffman codes). -#if TDEFL_LESS_MEMORY -enum { - TDEFL_LZ_CODE_BUF_SIZE = 24 * 1024, - TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13) / 10, - TDEFL_MAX_HUFF_SYMBOLS = 288, - TDEFL_LZ_HASH_BITS = 12, - TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, - TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, - TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS -}; -#else -enum { - TDEFL_LZ_CODE_BUF_SIZE = 64 * 1024, - TDEFL_OUT_BUF_SIZE = (TDEFL_LZ_CODE_BUF_SIZE * 13) / 10, - TDEFL_MAX_HUFF_SYMBOLS = 288, - TDEFL_LZ_HASH_BITS = 15, - TDEFL_LEVEL1_HASH_SIZE_MASK = 4095, - TDEFL_LZ_HASH_SHIFT = (TDEFL_LZ_HASH_BITS + 2) / 3, - TDEFL_LZ_HASH_SIZE = 1 << TDEFL_LZ_HASH_BITS -}; -#endif - -// The low-level tdefl functions below may be used directly if the above helper -// functions aren't flexible enough. The low-level functions don't make any heap -// allocations, unlike the above helper functions. -typedef enum { - TDEFL_STATUS_BAD_PARAM = -2, - TDEFL_STATUS_PUT_BUF_FAILED = -1, - TDEFL_STATUS_OKAY = 0, - TDEFL_STATUS_DONE = 1 -} tdefl_status; - -// Must map to MZ_NO_FLUSH, MZ_SYNC_FLUSH, etc. enums -typedef enum { - TDEFL_NO_FLUSH = 0, - TDEFL_SYNC_FLUSH = 2, - TDEFL_FULL_FLUSH = 3, - TDEFL_FINISH = 4 -} tdefl_flush; - -// tdefl's compression state structure. -typedef struct { - tdefl_put_buf_func_ptr m_pPut_buf_func; - void *m_pPut_buf_user; - mz_uint m_flags, m_max_probes[2]; - int m_greedy_parsing; - mz_uint m_adler32, m_lookahead_pos, m_lookahead_size, m_dict_size; - mz_uint8 *m_pLZ_code_buf, *m_pLZ_flags, *m_pOutput_buf, *m_pOutput_buf_end; - mz_uint m_num_flags_left, m_total_lz_bytes, m_lz_code_buf_dict_pos, m_bits_in, - m_bit_buffer; - mz_uint m_saved_match_dist, m_saved_match_len, m_saved_lit, - m_output_flush_ofs, m_output_flush_remaining, m_finished, m_block_index, - m_wants_to_finish; - tdefl_status m_prev_return_status; - const void *m_pIn_buf; - void *m_pOut_buf; - size_t *m_pIn_buf_size, *m_pOut_buf_size; - tdefl_flush m_flush; - const mz_uint8 *m_pSrc; - size_t m_src_buf_left, m_out_buf_ofs; - mz_uint8 m_dict[TDEFL_LZ_DICT_SIZE + TDEFL_MAX_MATCH_LEN - 1]; - mz_uint16 m_huff_count[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS]; - mz_uint16 m_huff_codes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS]; - mz_uint8 m_huff_code_sizes[TDEFL_MAX_HUFF_TABLES][TDEFL_MAX_HUFF_SYMBOLS]; - mz_uint8 m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE]; - mz_uint16 m_next[TDEFL_LZ_DICT_SIZE]; - mz_uint16 m_hash[TDEFL_LZ_HASH_SIZE]; - mz_uint8 m_output_buf[TDEFL_OUT_BUF_SIZE]; -} tdefl_compressor; - -// Initializes the compressor. -// There is no corresponding deinit() function because the tdefl API's do not -// dynamically allocate memory. -// pBut_buf_func: If NULL, output data will be supplied to the specified -// callback. In this case, the user should call the tdefl_compress_buffer() API -// for compression. -// If pBut_buf_func is NULL the user should always call the tdefl_compress() -// API. -// flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, -// etc.) -tdefl_status tdefl_init(tdefl_compressor *d, - tdefl_put_buf_func_ptr pPut_buf_func, - void *pPut_buf_user, int flags); - -// Compresses a block of data, consuming as much of the specified input buffer -// as possible, and writing as much compressed data to the specified output -// buffer as possible. -tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, - size_t *pIn_buf_size, void *pOut_buf, - size_t *pOut_buf_size, tdefl_flush flush); - -// tdefl_compress_buffer() is only usable when the tdefl_init() is called with a -// non-NULL tdefl_put_buf_func_ptr. -// tdefl_compress_buffer() always consumes the entire input buffer. -tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, - size_t in_buf_size, tdefl_flush flush); - -tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d); -mz_uint32 tdefl_get_adler32(tdefl_compressor *d); - -// Can't use tdefl_create_comp_flags_from_zip_params if MINIZ_NO_ZLIB_APIS isn't -// defined, because it uses some of its macros. -#ifndef MINIZ_NO_ZLIB_APIS -// Create tdefl_compress() flags given zlib-style compression parameters. -// level may range from [0,10] (where 10 is absolute max compression, but may be -// much slower on some files) -// window_bits may be -15 (raw deflate) or 15 (zlib) -// strategy may be either MZ_DEFAULT_STRATEGY, MZ_FILTERED, MZ_HUFFMAN_ONLY, -// MZ_RLE, or MZ_FIXED -mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, - int strategy); -#endif // #ifndef MINIZ_NO_ZLIB_APIS - -#ifdef __cplusplus -} -#endif - -#endif // MINIZ_HEADER_INCLUDED - -// ------------------- End of Header: Implementation follows. (If you only want -// the header, define MINIZ_HEADER_FILE_ONLY.) - -#ifndef MINIZ_HEADER_FILE_ONLY - -typedef unsigned char mz_validate_uint16[sizeof(mz_uint16) == 2 ? 1 : -1]; -typedef unsigned char mz_validate_uint32[sizeof(mz_uint32) == 4 ? 1 : -1]; -typedef unsigned char mz_validate_uint64[sizeof(mz_uint64) == 8 ? 1 : -1]; - -#include -#include - -#define MZ_ASSERT(x) assert(x) - -#ifdef MINIZ_NO_MALLOC -#define MZ_MALLOC(x) NULL -#define MZ_FREE(x) (void)x, ((void)0) -#define MZ_REALLOC(p, x) NULL -#else -#define MZ_MALLOC(x) malloc(x) -#define MZ_FREE(x) free(x) -#define MZ_REALLOC(p, x) realloc(p, x) -#endif - -#define MZ_MAX(a, b) (((a) > (b)) ? (a) : (b)) -#define MZ_MIN(a, b) (((a) < (b)) ? (a) : (b)) -#define MZ_CLEAR_OBJ(obj) memset(&(obj), 0, sizeof(obj)) - -#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN -#define MZ_READ_LE16(p) *((const mz_uint16 *)(p)) -#define MZ_READ_LE32(p) *((const mz_uint32 *)(p)) -#else -#define MZ_READ_LE16(p) \ - ((mz_uint32)(((const mz_uint8 *)(p))[0]) | \ - ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U)) -#define MZ_READ_LE32(p) \ - ((mz_uint32)(((const mz_uint8 *)(p))[0]) | \ - ((mz_uint32)(((const mz_uint8 *)(p))[1]) << 8U) | \ - ((mz_uint32)(((const mz_uint8 *)(p))[2]) << 16U) | \ - ((mz_uint32)(((const mz_uint8 *)(p))[3]) << 24U)) -#endif - -#ifdef _MSC_VER -#define MZ_FORCEINLINE __forceinline -#elif defined(__GNUC__) -#define MZ_FORCEINLINE inline __attribute__((__always_inline__)) -#else -#define MZ_FORCEINLINE inline -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -// ------------------- zlib-style API's - -mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len) { - mz_uint32 i, s1 = (mz_uint32)(adler & 0xffff), s2 = (mz_uint32)(adler >> 16); - size_t block_len = buf_len % 5552; - if (!ptr) return MZ_ADLER32_INIT; - while (buf_len) { - for (i = 0; i + 7 < block_len; i += 8, ptr += 8) { - s1 += ptr[0], s2 += s1; - s1 += ptr[1], s2 += s1; - s1 += ptr[2], s2 += s1; - s1 += ptr[3], s2 += s1; - s1 += ptr[4], s2 += s1; - s1 += ptr[5], s2 += s1; - s1 += ptr[6], s2 += s1; - s1 += ptr[7], s2 += s1; - } - for (; i < block_len; ++i) s1 += *ptr++, s2 += s1; - s1 %= 65521U, s2 %= 65521U; - buf_len -= block_len; - block_len = 5552; - } - return (s2 << 16) + s1; -} - -// Karl Malbrain's compact CRC-32. See "A compact CCITT crc16 and crc32 C -// implementation that balances processor cache usage against speed": -// http://www.geocities.com/malbrain/ -mz_ulong mz_crc32(mz_ulong crc, const mz_uint8 *ptr, size_t buf_len) { - static const mz_uint32 s_crc32[16] = { - 0, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 0x6b6b51f4, - 0x4db26158, 0x5005713c, 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, - 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c}; - mz_uint32 crcu32 = (mz_uint32)crc; - if (!ptr) return MZ_CRC32_INIT; - crcu32 = ~crcu32; - while (buf_len--) { - mz_uint8 b = *ptr++; - crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b & 0xF)]; - crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b >> 4)]; - } - return ~crcu32; -} - -void mz_free(void *p) { MZ_FREE(p); } - -#ifndef MINIZ_NO_ZLIB_APIS - -static void *def_alloc_func(void *opaque, size_t items, size_t size) { - (void)opaque, (void)items, (void)size; - return MZ_MALLOC(items * size); -} -static void def_free_func(void *opaque, void *address) { - (void)opaque, (void)address; - MZ_FREE(address); -} -static void *def_realloc_func(void *opaque, void *address, size_t items, - size_t size) { - (void)opaque, (void)address, (void)items, (void)size; - return MZ_REALLOC(address, items * size); -} - -const char *mz_version(void) { return MZ_VERSION; } - -int mz_deflateInit(mz_streamp pStream, int level) { - return mz_deflateInit2(pStream, level, MZ_DEFLATED, MZ_DEFAULT_WINDOW_BITS, 9, - MZ_DEFAULT_STRATEGY); -} - -int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, - int mem_level, int strategy) { - tdefl_compressor *pComp; - mz_uint comp_flags = - TDEFL_COMPUTE_ADLER32 | - tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy); - - if (!pStream) return MZ_STREAM_ERROR; - if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || - ((window_bits != MZ_DEFAULT_WINDOW_BITS) && - (-window_bits != MZ_DEFAULT_WINDOW_BITS))) - return MZ_PARAM_ERROR; - - pStream->data_type = 0; - pStream->adler = MZ_ADLER32_INIT; - pStream->msg = NULL; - pStream->reserved = 0; - pStream->total_in = 0; - pStream->total_out = 0; - if (!pStream->zalloc) pStream->zalloc = def_alloc_func; - if (!pStream->zfree) pStream->zfree = def_free_func; - - pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, - sizeof(tdefl_compressor)); - if (!pComp) return MZ_MEM_ERROR; - - pStream->state = (struct mz_internal_state *)pComp; - - if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY) { - mz_deflateEnd(pStream); - return MZ_PARAM_ERROR; - } - - return MZ_OK; -} - -int mz_deflateReset(mz_streamp pStream) { - if ((!pStream) || (!pStream->state) || (!pStream->zalloc) || - (!pStream->zfree)) - return MZ_STREAM_ERROR; - pStream->total_in = pStream->total_out = 0; - tdefl_init((tdefl_compressor *)pStream->state, NULL, NULL, - ((tdefl_compressor *)pStream->state)->m_flags); - return MZ_OK; -} - -int mz_deflate(mz_streamp pStream, int flush) { - size_t in_bytes, out_bytes; - mz_ulong orig_total_in, orig_total_out; - int mz_status = MZ_OK; - - if ((!pStream) || (!pStream->state) || (flush < 0) || (flush > MZ_FINISH) || - (!pStream->next_out)) - return MZ_STREAM_ERROR; - if (!pStream->avail_out) return MZ_BUF_ERROR; - - if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH; - - if (((tdefl_compressor *)pStream->state)->m_prev_return_status == - TDEFL_STATUS_DONE) - return (flush == MZ_FINISH) ? MZ_STREAM_END : MZ_BUF_ERROR; - - orig_total_in = pStream->total_in; - orig_total_out = pStream->total_out; - for (;;) { - tdefl_status defl_status; - in_bytes = pStream->avail_in; - out_bytes = pStream->avail_out; - - defl_status = tdefl_compress((tdefl_compressor *)pStream->state, - pStream->next_in, &in_bytes, pStream->next_out, - &out_bytes, (tdefl_flush)flush); - pStream->next_in += (mz_uint)in_bytes; - pStream->avail_in -= (mz_uint)in_bytes; - pStream->total_in += (mz_uint)in_bytes; - pStream->adler = tdefl_get_adler32((tdefl_compressor *)pStream->state); - - pStream->next_out += (mz_uint)out_bytes; - pStream->avail_out -= (mz_uint)out_bytes; - pStream->total_out += (mz_uint)out_bytes; - - if (defl_status < 0) { - mz_status = MZ_STREAM_ERROR; - break; - } else if (defl_status == TDEFL_STATUS_DONE) { - mz_status = MZ_STREAM_END; - break; - } else if (!pStream->avail_out) - break; - else if ((!pStream->avail_in) && (flush != MZ_FINISH)) { - if ((flush) || (pStream->total_in != orig_total_in) || - (pStream->total_out != orig_total_out)) - break; - return MZ_BUF_ERROR; // Can't make forward progress without some input. - } - } - return mz_status; -} - -int mz_deflateEnd(mz_streamp pStream) { - if (!pStream) return MZ_STREAM_ERROR; - if (pStream->state) { - pStream->zfree(pStream->opaque, pStream->state); - pStream->state = NULL; - } - return MZ_OK; -} - -mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len) { - (void)pStream; - // This is really over conservative. (And lame, but it's actually pretty - // tricky to compute a true upper bound given the way tdefl's blocking works.) - return MZ_MAX(128 + (source_len * 110) / 100, - 128 + source_len + ((source_len / (31 * 1024)) + 1) * 5); -} - -int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, - const unsigned char *pSource, mz_ulong source_len, int level) { - int status; - mz_stream stream; - memset(&stream, 0, sizeof(stream)); - - // In case mz_ulong is 64-bits (argh I hate longs). - if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR; - - stream.next_in = pSource; - stream.avail_in = (mz_uint32)source_len; - stream.next_out = pDest; - stream.avail_out = (mz_uint32)*pDest_len; - - status = mz_deflateInit(&stream, level); - if (status != MZ_OK) return status; - - status = mz_deflate(&stream, MZ_FINISH); - if (status != MZ_STREAM_END) { - mz_deflateEnd(&stream); - return (status == MZ_OK) ? MZ_BUF_ERROR : status; - } - - *pDest_len = stream.total_out; - return mz_deflateEnd(&stream); -} - -int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, - const unsigned char *pSource, mz_ulong source_len) { - return mz_compress2(pDest, pDest_len, pSource, source_len, - MZ_DEFAULT_COMPRESSION); -} - -mz_ulong mz_compressBound(mz_ulong source_len) { - return mz_deflateBound(NULL, source_len); -} - -typedef struct { - tinfl_decompressor m_decomp; - mz_uint m_dict_ofs, m_dict_avail, m_first_call, m_has_flushed; - int m_window_bits; - mz_uint8 m_dict[TINFL_LZ_DICT_SIZE]; - tinfl_status m_last_status; -} inflate_state; - -int mz_inflateInit2(mz_streamp pStream, int window_bits) { - inflate_state *pDecomp; - if (!pStream) return MZ_STREAM_ERROR; - if ((window_bits != MZ_DEFAULT_WINDOW_BITS) && - (-window_bits != MZ_DEFAULT_WINDOW_BITS)) - return MZ_PARAM_ERROR; - - pStream->data_type = 0; - pStream->adler = 0; - pStream->msg = NULL; - pStream->total_in = 0; - pStream->total_out = 0; - pStream->reserved = 0; - if (!pStream->zalloc) pStream->zalloc = def_alloc_func; - if (!pStream->zfree) pStream->zfree = def_free_func; - - pDecomp = (inflate_state *)pStream->zalloc(pStream->opaque, 1, - sizeof(inflate_state)); - if (!pDecomp) return MZ_MEM_ERROR; - - pStream->state = (struct mz_internal_state *)pDecomp; - - tinfl_init(&pDecomp->m_decomp); - pDecomp->m_dict_ofs = 0; - pDecomp->m_dict_avail = 0; - pDecomp->m_last_status = TINFL_STATUS_NEEDS_MORE_INPUT; - pDecomp->m_first_call = 1; - pDecomp->m_has_flushed = 0; - pDecomp->m_window_bits = window_bits; - - return MZ_OK; -} - -int mz_inflateInit(mz_streamp pStream) { - return mz_inflateInit2(pStream, MZ_DEFAULT_WINDOW_BITS); -} - -int mz_inflate(mz_streamp pStream, int flush) { - inflate_state *pState; - mz_uint n, first_call, decomp_flags = TINFL_FLAG_COMPUTE_ADLER32; - size_t in_bytes, out_bytes, orig_avail_in; - tinfl_status status; - - if ((!pStream) || (!pStream->state)) return MZ_STREAM_ERROR; - if (flush == MZ_PARTIAL_FLUSH) flush = MZ_SYNC_FLUSH; - if ((flush) && (flush != MZ_SYNC_FLUSH) && (flush != MZ_FINISH)) - return MZ_STREAM_ERROR; - - pState = (inflate_state *)pStream->state; - if (pState->m_window_bits > 0) decomp_flags |= TINFL_FLAG_PARSE_ZLIB_HEADER; - orig_avail_in = pStream->avail_in; - - first_call = pState->m_first_call; - pState->m_first_call = 0; - if (pState->m_last_status < 0) return MZ_DATA_ERROR; - - if (pState->m_has_flushed && (flush != MZ_FINISH)) return MZ_STREAM_ERROR; - pState->m_has_flushed |= (flush == MZ_FINISH); - - if ((flush == MZ_FINISH) && (first_call)) { - // MZ_FINISH on the first call implies that the input and output buffers are - // large enough to hold the entire compressed/decompressed file. - decomp_flags |= TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF; - in_bytes = pStream->avail_in; - out_bytes = pStream->avail_out; - status = tinfl_decompress(&pState->m_decomp, pStream->next_in, &in_bytes, - pStream->next_out, pStream->next_out, &out_bytes, - decomp_flags); - pState->m_last_status = status; - pStream->next_in += (mz_uint)in_bytes; - pStream->avail_in -= (mz_uint)in_bytes; - pStream->total_in += (mz_uint)in_bytes; - pStream->adler = tinfl_get_adler32(&pState->m_decomp); - pStream->next_out += (mz_uint)out_bytes; - pStream->avail_out -= (mz_uint)out_bytes; - pStream->total_out += (mz_uint)out_bytes; - - if (status < 0) - return MZ_DATA_ERROR; - else if (status != TINFL_STATUS_DONE) { - pState->m_last_status = TINFL_STATUS_FAILED; - return MZ_BUF_ERROR; - } - return MZ_STREAM_END; - } - // flush != MZ_FINISH then we must assume there's more input. - if (flush != MZ_FINISH) decomp_flags |= TINFL_FLAG_HAS_MORE_INPUT; - - if (pState->m_dict_avail) { - n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); - memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); - pStream->next_out += n; - pStream->avail_out -= n; - pStream->total_out += n; - pState->m_dict_avail -= n; - pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); - return ((pState->m_last_status == TINFL_STATUS_DONE) && - (!pState->m_dict_avail)) - ? MZ_STREAM_END - : MZ_OK; - } - - for (;;) { - in_bytes = pStream->avail_in; - out_bytes = TINFL_LZ_DICT_SIZE - pState->m_dict_ofs; - - status = tinfl_decompress( - &pState->m_decomp, pStream->next_in, &in_bytes, pState->m_dict, - pState->m_dict + pState->m_dict_ofs, &out_bytes, decomp_flags); - pState->m_last_status = status; - - pStream->next_in += (mz_uint)in_bytes; - pStream->avail_in -= (mz_uint)in_bytes; - pStream->total_in += (mz_uint)in_bytes; - pStream->adler = tinfl_get_adler32(&pState->m_decomp); - - pState->m_dict_avail = (mz_uint)out_bytes; - - n = MZ_MIN(pState->m_dict_avail, pStream->avail_out); - memcpy(pStream->next_out, pState->m_dict + pState->m_dict_ofs, n); - pStream->next_out += n; - pStream->avail_out -= n; - pStream->total_out += n; - pState->m_dict_avail -= n; - pState->m_dict_ofs = (pState->m_dict_ofs + n) & (TINFL_LZ_DICT_SIZE - 1); - - if (status < 0) - return MZ_DATA_ERROR; // Stream is corrupted (there could be some - // uncompressed data left in the output dictionary - - // oh well). - else if ((status == TINFL_STATUS_NEEDS_MORE_INPUT) && (!orig_avail_in)) - return MZ_BUF_ERROR; // Signal caller that we can't make forward progress - // without supplying more input or by setting flush - // to MZ_FINISH. - else if (flush == MZ_FINISH) { - // The output buffer MUST be large to hold the remaining uncompressed data - // when flush==MZ_FINISH. - if (status == TINFL_STATUS_DONE) - return pState->m_dict_avail ? MZ_BUF_ERROR : MZ_STREAM_END; - // status here must be TINFL_STATUS_HAS_MORE_OUTPUT, which means there's - // at least 1 more byte on the way. If there's no more room left in the - // output buffer then something is wrong. - else if (!pStream->avail_out) - return MZ_BUF_ERROR; - } else if ((status == TINFL_STATUS_DONE) || (!pStream->avail_in) || - (!pStream->avail_out) || (pState->m_dict_avail)) - break; - } - - return ((status == TINFL_STATUS_DONE) && (!pState->m_dict_avail)) - ? MZ_STREAM_END - : MZ_OK; -} - -int mz_inflateEnd(mz_streamp pStream) { - if (!pStream) return MZ_STREAM_ERROR; - if (pStream->state) { - pStream->zfree(pStream->opaque, pStream->state); - pStream->state = NULL; - } - return MZ_OK; -} - -int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, - const unsigned char *pSource, mz_ulong source_len) { - mz_stream stream; - int status; - memset(&stream, 0, sizeof(stream)); - - // In case mz_ulong is 64-bits (argh I hate longs). - if ((source_len | *pDest_len) > 0xFFFFFFFFU) return MZ_PARAM_ERROR; - - stream.next_in = pSource; - stream.avail_in = (mz_uint32)source_len; - stream.next_out = pDest; - stream.avail_out = (mz_uint32)*pDest_len; - - status = mz_inflateInit(&stream); - if (status != MZ_OK) return status; - - status = mz_inflate(&stream, MZ_FINISH); - if (status != MZ_STREAM_END) { - mz_inflateEnd(&stream); - return ((status == MZ_BUF_ERROR) && (!stream.avail_in)) ? MZ_DATA_ERROR - : status; - } - *pDest_len = stream.total_out; - - return mz_inflateEnd(&stream); -} - -const char *mz_error(int err) { - static struct { - int m_err; - const char *m_pDesc; - } s_error_descs[] = {{MZ_OK, ""}, - {MZ_STREAM_END, "stream end"}, - {MZ_NEED_DICT, "need dictionary"}, - {MZ_ERRNO, "file error"}, - {MZ_STREAM_ERROR, "stream error"}, - {MZ_DATA_ERROR, "data error"}, - {MZ_MEM_ERROR, "out of memory"}, - {MZ_BUF_ERROR, "buf error"}, - {MZ_VERSION_ERROR, "version error"}, - {MZ_PARAM_ERROR, "parameter error"}}; - mz_uint i; - for (i = 0; i < sizeof(s_error_descs) / sizeof(s_error_descs[0]); ++i) - if (s_error_descs[i].m_err == err) return s_error_descs[i].m_pDesc; - return NULL; -} - -#endif // MINIZ_NO_ZLIB_APIS - -// ------------------- Low-level Decompression (completely independent from all -// compression API's) - -#define TINFL_MEMCPY(d, s, l) memcpy(d, s, l) -#define TINFL_MEMSET(p, c, l) memset(p, c, l) - -#define TINFL_CR_BEGIN \ - switch (r->m_state) { \ - case 0: -#define TINFL_CR_RETURN(state_index, result) \ - do { \ - status = result; \ - r->m_state = state_index; \ - goto common_exit; \ - case state_index:; \ - } \ - MZ_MACRO_END -#define TINFL_CR_RETURN_FOREVER(state_index, result) \ - do { \ - for (;;) { \ - TINFL_CR_RETURN(state_index, result); \ - } \ - } \ - MZ_MACRO_END -#define TINFL_CR_FINISH } - -// TODO: If the caller has indicated that there's no more input, and we attempt -// to read beyond the input buf, then something is wrong with the input because -// the inflator never -// reads ahead more than it needs to. Currently TINFL_GET_BYTE() pads the end of -// the stream with 0's in this scenario. -#define TINFL_GET_BYTE(state_index, c) \ - do { \ - if (pIn_buf_cur >= pIn_buf_end) { \ - for (;;) { \ - if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { \ - TINFL_CR_RETURN(state_index, TINFL_STATUS_NEEDS_MORE_INPUT); \ - if (pIn_buf_cur < pIn_buf_end) { \ - c = *pIn_buf_cur++; \ - break; \ - } \ - } else { \ - c = 0; \ - break; \ - } \ - } \ - } else \ - c = *pIn_buf_cur++; \ - } \ - MZ_MACRO_END - -#define TINFL_NEED_BITS(state_index, n) \ - do { \ - mz_uint c; \ - TINFL_GET_BYTE(state_index, c); \ - bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \ - num_bits += 8; \ - } while (num_bits < (mz_uint)(n)) -#define TINFL_SKIP_BITS(state_index, n) \ - do { \ - if (num_bits < (mz_uint)(n)) { \ - TINFL_NEED_BITS(state_index, n); \ - } \ - bit_buf >>= (n); \ - num_bits -= (n); \ - } \ - MZ_MACRO_END -#define TINFL_GET_BITS(state_index, b, n) \ - do { \ - if (num_bits < (mz_uint)(n)) { \ - TINFL_NEED_BITS(state_index, n); \ - } \ - b = bit_buf & ((1 << (n)) - 1); \ - bit_buf >>= (n); \ - num_bits -= (n); \ - } \ - MZ_MACRO_END - -// TINFL_HUFF_BITBUF_FILL() is only used rarely, when the number of bytes -// remaining in the input buffer falls below 2. -// It reads just enough bytes from the input stream that are needed to decode -// the next Huffman code (and absolutely no more). It works by trying to fully -// decode a -// Huffman code by using whatever bits are currently present in the bit buffer. -// If this fails, it reads another byte, and tries again until it succeeds or -// until the -// bit buffer contains >=15 bits (deflate's max. Huffman code size). -#define TINFL_HUFF_BITBUF_FILL(state_index, pHuff) \ - do { \ - temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]; \ - if (temp >= 0) { \ - code_len = temp >> 9; \ - if ((code_len) && (num_bits >= code_len)) break; \ - } else if (num_bits > TINFL_FAST_LOOKUP_BITS) { \ - code_len = TINFL_FAST_LOOKUP_BITS; \ - do { \ - temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ - } while ((temp < 0) && (num_bits >= (code_len + 1))); \ - if (temp >= 0) break; \ - } \ - TINFL_GET_BYTE(state_index, c); \ - bit_buf |= (((tinfl_bit_buf_t)c) << num_bits); \ - num_bits += 8; \ - } while (num_bits < 15); - -// TINFL_HUFF_DECODE() decodes the next Huffman coded symbol. It's more complex -// than you would initially expect because the zlib API expects the decompressor -// to never read -// beyond the final byte of the deflate stream. (In other words, when this macro -// wants to read another byte from the input, it REALLY needs another byte in -// order to fully -// decode the next Huffman code.) Handling this properly is particularly -// important on raw deflate (non-zlib) streams, which aren't followed by a byte -// aligned adler-32. -// The slow path is only executed at the very end of the input buffer. -#define TINFL_HUFF_DECODE(state_index, sym, pHuff) \ - do { \ - int temp; \ - mz_uint code_len, c; \ - if (num_bits < 15) { \ - if ((pIn_buf_end - pIn_buf_cur) < 2) { \ - TINFL_HUFF_BITBUF_FILL(state_index, pHuff); \ - } else { \ - bit_buf |= (((tinfl_bit_buf_t)pIn_buf_cur[0]) << num_bits) | \ - (((tinfl_bit_buf_t)pIn_buf_cur[1]) << (num_bits + 8)); \ - pIn_buf_cur += 2; \ - num_bits += 16; \ - } \ - } \ - if ((temp = (pHuff)->m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= \ - 0) \ - code_len = temp >> 9, temp &= 511; \ - else { \ - code_len = TINFL_FAST_LOOKUP_BITS; \ - do { \ - temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; \ - } while (temp < 0); \ - } \ - sym = temp; \ - bit_buf >>= code_len; \ - num_bits -= code_len; \ - } \ - MZ_MACRO_END - -tinfl_status tinfl_decompress(tinfl_decompressor *r, - const mz_uint8 *pIn_buf_next, - size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, - mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, - const mz_uint32 decomp_flags) { - static const int s_length_base[31] = { - 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, - 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; - static const int s_length_extra[31] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, - 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, - 4, 4, 5, 5, 5, 5, 0, 0, 0}; - static const int s_dist_base[32] = { - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, - 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, - 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0}; - static const int s_dist_extra[32] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, - 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, - 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; - static const mz_uint8 s_length_dezigzag[19] = { - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - static const int s_min_table_sizes[3] = {257, 1, 4}; - - tinfl_status status = TINFL_STATUS_FAILED; - mz_uint32 num_bits, dist, counter, num_extra; - tinfl_bit_buf_t bit_buf; - const mz_uint8 *pIn_buf_cur = pIn_buf_next, - *const pIn_buf_end = pIn_buf_next + *pIn_buf_size; - mz_uint8 *pOut_buf_cur = pOut_buf_next, - *const pOut_buf_end = pOut_buf_next + *pOut_buf_size; - size_t out_buf_size_mask = - (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF) - ? (size_t)-1 - : ((pOut_buf_next - pOut_buf_start) + *pOut_buf_size) - 1, - dist_from_out_buf_start; - - // Ensure the output buffer's size is a power of 2, unless the output buffer - // is large enough to hold the entire output file (in which case it doesn't - // matter). - if (((out_buf_size_mask + 1) & out_buf_size_mask) || - (pOut_buf_next < pOut_buf_start)) { - *pIn_buf_size = *pOut_buf_size = 0; - return TINFL_STATUS_BAD_PARAM; - } - - num_bits = r->m_num_bits; - bit_buf = r->m_bit_buf; - dist = r->m_dist; - counter = r->m_counter; - num_extra = r->m_num_extra; - dist_from_out_buf_start = r->m_dist_from_out_buf_start; - TINFL_CR_BEGIN - - bit_buf = num_bits = dist = counter = num_extra = r->m_zhdr0 = r->m_zhdr1 = 0; - r->m_z_adler32 = r->m_check_adler32 = 1; - if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) { - TINFL_GET_BYTE(1, r->m_zhdr0); - TINFL_GET_BYTE(2, r->m_zhdr1); - counter = (((r->m_zhdr0 * 256 + r->m_zhdr1) % 31 != 0) || - (r->m_zhdr1 & 32) || ((r->m_zhdr0 & 15) != 8)); - if (!(decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) - counter |= (((1U << (8U + (r->m_zhdr0 >> 4))) > 32768U) || - ((out_buf_size_mask + 1) < - (size_t)(1ULL << (8U + (r->m_zhdr0 >> 4))))); - if (counter) { - TINFL_CR_RETURN_FOREVER(36, TINFL_STATUS_FAILED); - } - } - - do { - TINFL_GET_BITS(3, r->m_final, 3); - r->m_type = r->m_final >> 1; - if (r->m_type == 0) { - TINFL_SKIP_BITS(5, num_bits & 7); - for (counter = 0; counter < 4; ++counter) { - if (num_bits) - TINFL_GET_BITS(6, r->m_raw_header[counter], 8); - else - TINFL_GET_BYTE(7, r->m_raw_header[counter]); - } - if ((counter = (r->m_raw_header[0] | (r->m_raw_header[1] << 8))) != - (mz_uint)(0xFFFF ^ - (r->m_raw_header[2] | (r->m_raw_header[3] << 8)))) { - TINFL_CR_RETURN_FOREVER(39, TINFL_STATUS_FAILED); - } - while ((counter) && (num_bits)) { - TINFL_GET_BITS(51, dist, 8); - while (pOut_buf_cur >= pOut_buf_end) { - TINFL_CR_RETURN(52, TINFL_STATUS_HAS_MORE_OUTPUT); - } - *pOut_buf_cur++ = (mz_uint8)dist; - counter--; - } - while (counter) { - size_t n; - while (pOut_buf_cur >= pOut_buf_end) { - TINFL_CR_RETURN(9, TINFL_STATUS_HAS_MORE_OUTPUT); - } - while (pIn_buf_cur >= pIn_buf_end) { - if (decomp_flags & TINFL_FLAG_HAS_MORE_INPUT) { - TINFL_CR_RETURN(38, TINFL_STATUS_NEEDS_MORE_INPUT); - } else { - TINFL_CR_RETURN_FOREVER(40, TINFL_STATUS_FAILED); - } - } - n = MZ_MIN(MZ_MIN((size_t)(pOut_buf_end - pOut_buf_cur), - (size_t)(pIn_buf_end - pIn_buf_cur)), - counter); - TINFL_MEMCPY(pOut_buf_cur, pIn_buf_cur, n); - pIn_buf_cur += n; - pOut_buf_cur += n; - counter -= (mz_uint)n; - } - } else if (r->m_type == 3) { - TINFL_CR_RETURN_FOREVER(10, TINFL_STATUS_FAILED); - } else { - if (r->m_type == 1) { - mz_uint8 *p = r->m_tables[0].m_code_size; - mz_uint i; - r->m_table_sizes[0] = 288; - r->m_table_sizes[1] = 32; - TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); - for (i = 0; i <= 143; ++i) *p++ = 8; - for (; i <= 255; ++i) *p++ = 9; - for (; i <= 279; ++i) *p++ = 7; - for (; i <= 287; ++i) *p++ = 8; - } else { - for (counter = 0; counter < 3; counter++) { - TINFL_GET_BITS(11, r->m_table_sizes[counter], "\05\05\04"[counter]); - r->m_table_sizes[counter] += s_min_table_sizes[counter]; - } - MZ_CLEAR_OBJ(r->m_tables[2].m_code_size); - for (counter = 0; counter < r->m_table_sizes[2]; counter++) { - mz_uint s; - TINFL_GET_BITS(14, s, 3); - r->m_tables[2].m_code_size[s_length_dezigzag[counter]] = (mz_uint8)s; - } - r->m_table_sizes[2] = 19; - } - for (; (int)r->m_type >= 0; r->m_type--) { - int tree_next, tree_cur; - tinfl_huff_table *pTable; - mz_uint i, j, used_syms, total, sym_index, next_code[17], - total_syms[16]; - pTable = &r->m_tables[r->m_type]; - MZ_CLEAR_OBJ(total_syms); - MZ_CLEAR_OBJ(pTable->m_look_up); - MZ_CLEAR_OBJ(pTable->m_tree); - for (i = 0; i < r->m_table_sizes[r->m_type]; ++i) - total_syms[pTable->m_code_size[i]]++; - used_syms = 0, total = 0; - next_code[0] = next_code[1] = 0; - for (i = 1; i <= 15; ++i) { - used_syms += total_syms[i]; - next_code[i + 1] = (total = ((total + total_syms[i]) << 1)); - } - if ((65536 != total) && (used_syms > 1)) { - TINFL_CR_RETURN_FOREVER(35, TINFL_STATUS_FAILED); - } - for (tree_next = -1, sym_index = 0; - sym_index < r->m_table_sizes[r->m_type]; ++sym_index) { - mz_uint rev_code = 0, l, cur_code, - code_size = pTable->m_code_size[sym_index]; - if (!code_size) continue; - cur_code = next_code[code_size]++; - for (l = code_size; l > 0; l--, cur_code >>= 1) - rev_code = (rev_code << 1) | (cur_code & 1); - if (code_size <= TINFL_FAST_LOOKUP_BITS) { - mz_int16 k = (mz_int16)((code_size << 9) | sym_index); - while (rev_code < TINFL_FAST_LOOKUP_SIZE) { - pTable->m_look_up[rev_code] = k; - rev_code += (1 << code_size); - } - continue; - } - if (0 == - (tree_cur = pTable->m_look_up[rev_code & - (TINFL_FAST_LOOKUP_SIZE - 1)])) { - pTable->m_look_up[rev_code & (TINFL_FAST_LOOKUP_SIZE - 1)] = - (mz_int16)tree_next; - tree_cur = tree_next; - tree_next -= 2; - } - rev_code >>= (TINFL_FAST_LOOKUP_BITS - 1); - for (j = code_size; j > (TINFL_FAST_LOOKUP_BITS + 1); j--) { - tree_cur -= ((rev_code >>= 1) & 1); - if (!pTable->m_tree[-tree_cur - 1]) { - pTable->m_tree[-tree_cur - 1] = (mz_int16)tree_next; - tree_cur = tree_next; - tree_next -= 2; - } else - tree_cur = pTable->m_tree[-tree_cur - 1]; - } - tree_cur -= ((rev_code >>= 1) & 1); - pTable->m_tree[-tree_cur - 1] = (mz_int16)sym_index; - } - if (r->m_type == 2) { - for (counter = 0; - counter < (r->m_table_sizes[0] + r->m_table_sizes[1]);) { - mz_uint s; - TINFL_HUFF_DECODE(16, dist, &r->m_tables[2]); - if (dist < 16) { - r->m_len_codes[counter++] = (mz_uint8)dist; - continue; - } - if ((dist == 16) && (!counter)) { - TINFL_CR_RETURN_FOREVER(17, TINFL_STATUS_FAILED); - } - num_extra = "\02\03\07"[dist - 16]; - TINFL_GET_BITS(18, s, num_extra); - s += "\03\03\013"[dist - 16]; - TINFL_MEMSET(r->m_len_codes + counter, - (dist == 16) ? r->m_len_codes[counter - 1] : 0, s); - counter += s; - } - if ((r->m_table_sizes[0] + r->m_table_sizes[1]) != counter) { - TINFL_CR_RETURN_FOREVER(21, TINFL_STATUS_FAILED); - } - TINFL_MEMCPY(r->m_tables[0].m_code_size, r->m_len_codes, - r->m_table_sizes[0]); - TINFL_MEMCPY(r->m_tables[1].m_code_size, - r->m_len_codes + r->m_table_sizes[0], - r->m_table_sizes[1]); - } - } - for (;;) { - mz_uint8 *pSrc; - for (;;) { - if (((pIn_buf_end - pIn_buf_cur) < 4) || - ((pOut_buf_end - pOut_buf_cur) < 2)) { - TINFL_HUFF_DECODE(23, counter, &r->m_tables[0]); - if (counter >= 256) break; - while (pOut_buf_cur >= pOut_buf_end) { - TINFL_CR_RETURN(24, TINFL_STATUS_HAS_MORE_OUTPUT); - } - *pOut_buf_cur++ = (mz_uint8)counter; - } else { - int sym2; - mz_uint code_len; -#if TINFL_USE_64BIT_BITBUF - if (num_bits < 30) { - bit_buf |= - (((tinfl_bit_buf_t)MZ_READ_LE32(pIn_buf_cur)) << num_bits); - pIn_buf_cur += 4; - num_bits += 32; - } -#else - if (num_bits < 15) { - bit_buf |= - (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); - pIn_buf_cur += 2; - num_bits += 16; - } -#endif - if ((sym2 = - r->m_tables[0] - .m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= - 0) - code_len = sym2 >> 9; - else { - code_len = TINFL_FAST_LOOKUP_BITS; - do { - sym2 = r->m_tables[0] - .m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; - } while (sym2 < 0); - } - counter = sym2; - bit_buf >>= code_len; - num_bits -= code_len; - if (counter & 256) break; - -#if !TINFL_USE_64BIT_BITBUF - if (num_bits < 15) { - bit_buf |= - (((tinfl_bit_buf_t)MZ_READ_LE16(pIn_buf_cur)) << num_bits); - pIn_buf_cur += 2; - num_bits += 16; - } -#endif - if ((sym2 = - r->m_tables[0] - .m_look_up[bit_buf & (TINFL_FAST_LOOKUP_SIZE - 1)]) >= - 0) - code_len = sym2 >> 9; - else { - code_len = TINFL_FAST_LOOKUP_BITS; - do { - sym2 = r->m_tables[0] - .m_tree[~sym2 + ((bit_buf >> code_len++) & 1)]; - } while (sym2 < 0); - } - bit_buf >>= code_len; - num_bits -= code_len; - - pOut_buf_cur[0] = (mz_uint8)counter; - if (sym2 & 256) { - pOut_buf_cur++; - counter = sym2; - break; - } - pOut_buf_cur[1] = (mz_uint8)sym2; - pOut_buf_cur += 2; - } - } - if ((counter &= 511) == 256) break; - - num_extra = s_length_extra[counter - 257]; - counter = s_length_base[counter - 257]; - if (num_extra) { - mz_uint extra_bits; - TINFL_GET_BITS(25, extra_bits, num_extra); - counter += extra_bits; - } - - TINFL_HUFF_DECODE(26, dist, &r->m_tables[1]); - num_extra = s_dist_extra[dist]; - dist = s_dist_base[dist]; - if (num_extra) { - mz_uint extra_bits; - TINFL_GET_BITS(27, extra_bits, num_extra); - dist += extra_bits; - } - - dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start; - if ((dist > dist_from_out_buf_start) && - (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF)) { - TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED); - } - - pSrc = pOut_buf_start + - ((dist_from_out_buf_start - dist) & out_buf_size_mask); - - if ((MZ_MAX(pOut_buf_cur, pSrc) + counter) > pOut_buf_end) { - while (counter--) { - while (pOut_buf_cur >= pOut_buf_end) { - TINFL_CR_RETURN(53, TINFL_STATUS_HAS_MORE_OUTPUT); - } - *pOut_buf_cur++ = - pOut_buf_start[(dist_from_out_buf_start++ - dist) & - out_buf_size_mask]; - } - continue; - } -#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES - else if ((counter >= 9) && (counter <= dist)) { - const mz_uint8 *pSrc_end = pSrc + (counter & ~7); - do { - ((mz_uint32 *)pOut_buf_cur)[0] = ((const mz_uint32 *)pSrc)[0]; - ((mz_uint32 *)pOut_buf_cur)[1] = ((const mz_uint32 *)pSrc)[1]; - pOut_buf_cur += 8; - } while ((pSrc += 8) < pSrc_end); - if ((counter &= 7) < 3) { - if (counter) { - pOut_buf_cur[0] = pSrc[0]; - if (counter > 1) pOut_buf_cur[1] = pSrc[1]; - pOut_buf_cur += counter; - } - continue; - } - } -#endif - do { - pOut_buf_cur[0] = pSrc[0]; - pOut_buf_cur[1] = pSrc[1]; - pOut_buf_cur[2] = pSrc[2]; - pOut_buf_cur += 3; - pSrc += 3; - } while ((int)(counter -= 3) > 2); - if ((int)counter > 0) { - pOut_buf_cur[0] = pSrc[0]; - if ((int)counter > 1) pOut_buf_cur[1] = pSrc[1]; - pOut_buf_cur += counter; - } - } - } - } while (!(r->m_final & 1)); - if (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) { - TINFL_SKIP_BITS(32, num_bits & 7); - for (counter = 0; counter < 4; ++counter) { - mz_uint s; - if (num_bits) - TINFL_GET_BITS(41, s, 8); - else - TINFL_GET_BYTE(42, s); - r->m_z_adler32 = (r->m_z_adler32 << 8) | s; - } - } - TINFL_CR_RETURN_FOREVER(34, TINFL_STATUS_DONE); - TINFL_CR_FINISH - -common_exit: - r->m_num_bits = num_bits; - r->m_bit_buf = bit_buf; - r->m_dist = dist; - r->m_counter = counter; - r->m_num_extra = num_extra; - r->m_dist_from_out_buf_start = dist_from_out_buf_start; - *pIn_buf_size = pIn_buf_cur - pIn_buf_next; - *pOut_buf_size = pOut_buf_cur - pOut_buf_next; - if ((decomp_flags & - (TINFL_FLAG_PARSE_ZLIB_HEADER | TINFL_FLAG_COMPUTE_ADLER32)) && - (status >= 0)) { - const mz_uint8 *ptr = pOut_buf_next; - size_t buf_len = *pOut_buf_size; - mz_uint32 i, s1 = r->m_check_adler32 & 0xffff, - s2 = r->m_check_adler32 >> 16; - size_t block_len = buf_len % 5552; - while (buf_len) { - for (i = 0; i + 7 < block_len; i += 8, ptr += 8) { - s1 += ptr[0], s2 += s1; - s1 += ptr[1], s2 += s1; - s1 += ptr[2], s2 += s1; - s1 += ptr[3], s2 += s1; - s1 += ptr[4], s2 += s1; - s1 += ptr[5], s2 += s1; - s1 += ptr[6], s2 += s1; - s1 += ptr[7], s2 += s1; - } - for (; i < block_len; ++i) s1 += *ptr++, s2 += s1; - s1 %= 65521U, s2 %= 65521U; - buf_len -= block_len; - block_len = 5552; - } - r->m_check_adler32 = (s2 << 16) + s1; - if ((status == TINFL_STATUS_DONE) && - (decomp_flags & TINFL_FLAG_PARSE_ZLIB_HEADER) && - (r->m_check_adler32 != r->m_z_adler32)) - status = TINFL_STATUS_ADLER32_MISMATCH; - } - return status; -} - -// Higher level helper functions. -void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, - size_t *pOut_len, int flags) { - tinfl_decompressor decomp; - void *pBuf = NULL, *pNew_buf; - size_t src_buf_ofs = 0, out_buf_capacity = 0; - *pOut_len = 0; - tinfl_init(&decomp); - for (;;) { - size_t src_buf_size = src_buf_len - src_buf_ofs, - dst_buf_size = out_buf_capacity - *pOut_len, new_out_buf_capacity; - tinfl_status status = tinfl_decompress( - &decomp, (const mz_uint8 *)pSrc_buf + src_buf_ofs, &src_buf_size, - (mz_uint8 *)pBuf, pBuf ? (mz_uint8 *)pBuf + *pOut_len : NULL, - &dst_buf_size, (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | - TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); - if ((status < 0) || (status == TINFL_STATUS_NEEDS_MORE_INPUT)) { - MZ_FREE(pBuf); - *pOut_len = 0; - return NULL; - } - src_buf_ofs += src_buf_size; - *pOut_len += dst_buf_size; - if (status == TINFL_STATUS_DONE) break; - new_out_buf_capacity = out_buf_capacity * 2; - if (new_out_buf_capacity < 128) new_out_buf_capacity = 128; - pNew_buf = MZ_REALLOC(pBuf, new_out_buf_capacity); - if (!pNew_buf) { - MZ_FREE(pBuf); - *pOut_len = 0; - return NULL; - } - pBuf = pNew_buf; - out_buf_capacity = new_out_buf_capacity; - } - return pBuf; -} - -size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, - const void *pSrc_buf, size_t src_buf_len, - int flags) { - tinfl_decompressor decomp; - tinfl_status status; - tinfl_init(&decomp); - status = - tinfl_decompress(&decomp, (const mz_uint8 *)pSrc_buf, &src_buf_len, - (mz_uint8 *)pOut_buf, (mz_uint8 *)pOut_buf, &out_buf_len, - (flags & ~TINFL_FLAG_HAS_MORE_INPUT) | - TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF); - return (status != TINFL_STATUS_DONE) ? TINFL_DECOMPRESS_MEM_TO_MEM_FAILED - : out_buf_len; -} - -int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, - tinfl_put_buf_func_ptr pPut_buf_func, - void *pPut_buf_user, int flags) { - int result = 0; - tinfl_decompressor decomp; - mz_uint8 *pDict = (mz_uint8 *)MZ_MALLOC(TINFL_LZ_DICT_SIZE); - size_t in_buf_ofs = 0, dict_ofs = 0; - if (!pDict) return TINFL_STATUS_FAILED; - tinfl_init(&decomp); - for (;;) { - size_t in_buf_size = *pIn_buf_size - in_buf_ofs, - dst_buf_size = TINFL_LZ_DICT_SIZE - dict_ofs; - tinfl_status status = - tinfl_decompress(&decomp, (const mz_uint8 *)pIn_buf + in_buf_ofs, - &in_buf_size, pDict, pDict + dict_ofs, &dst_buf_size, - (flags & - ~(TINFL_FLAG_HAS_MORE_INPUT | - TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))); - in_buf_ofs += in_buf_size; - if ((dst_buf_size) && - (!(*pPut_buf_func)(pDict + dict_ofs, (int)dst_buf_size, pPut_buf_user))) - break; - if (status != TINFL_STATUS_HAS_MORE_OUTPUT) { - result = (status == TINFL_STATUS_DONE); - break; - } - dict_ofs = (dict_ofs + dst_buf_size) & (TINFL_LZ_DICT_SIZE - 1); - } - MZ_FREE(pDict); - *pIn_buf_size = in_buf_ofs; - return result; -} - -// ------------------- Low-level Compression (independent from all decompression -// API's) - -// Purposely making these tables static for faster init and thread safety. -static const mz_uint16 s_tdefl_len_sym[256] = { - 257, 258, 259, 260, 261, 262, 263, 264, 265, 265, 266, 266, 267, 267, 268, - 268, 269, 269, 269, 269, 270, 270, 270, 270, 271, 271, 271, 271, 272, 272, - 272, 272, 273, 273, 273, 273, 273, 273, 273, 273, 274, 274, 274, 274, 274, - 274, 274, 274, 275, 275, 275, 275, 275, 275, 275, 275, 276, 276, 276, 276, - 276, 276, 276, 276, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - 278, 278, 278, 278, 278, 278, 279, 279, 279, 279, 279, 279, 279, 279, 279, - 279, 279, 279, 279, 279, 279, 279, 280, 280, 280, 280, 280, 280, 280, 280, - 280, 280, 280, 280, 280, 280, 280, 280, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 282, 282, 282, 282, 282, - 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, - 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 283, 283, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, - 285}; - -static const mz_uint8 s_tdefl_len_extra[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0}; - -static const mz_uint8 s_tdefl_small_dist_sym[512] = { - 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, - 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17}; - -static const mz_uint8 s_tdefl_small_dist_extra[512] = { - 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}; - -static const mz_uint8 s_tdefl_large_dist_sym[128] = { - 0, 0, 18, 19, 20, 20, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, - 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29}; - -static const mz_uint8 s_tdefl_large_dist_extra[128] = { - 0, 0, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, - 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13}; - -// Radix sorts tdefl_sym_freq[] array by 16-bit key m_key. Returns ptr to sorted -// values. -typedef struct { mz_uint16 m_key, m_sym_index; } tdefl_sym_freq; -static tdefl_sym_freq *tdefl_radix_sort_syms(mz_uint num_syms, - tdefl_sym_freq *pSyms0, - tdefl_sym_freq *pSyms1) { - mz_uint32 total_passes = 2, pass_shift, pass, i, hist[256 * 2]; - tdefl_sym_freq *pCur_syms = pSyms0, *pNew_syms = pSyms1; - MZ_CLEAR_OBJ(hist); - for (i = 0; i < num_syms; i++) { - mz_uint freq = pSyms0[i].m_key; - hist[freq & 0xFF]++; - hist[256 + ((freq >> 8) & 0xFF)]++; - } - while ((total_passes > 1) && (num_syms == hist[(total_passes - 1) * 256])) - total_passes--; - for (pass_shift = 0, pass = 0; pass < total_passes; pass++, pass_shift += 8) { - const mz_uint32 *pHist = &hist[pass << 8]; - mz_uint offsets[256], cur_ofs = 0; - for (i = 0; i < 256; i++) { - offsets[i] = cur_ofs; - cur_ofs += pHist[i]; - } - for (i = 0; i < num_syms; i++) - pNew_syms[offsets[(pCur_syms[i].m_key >> pass_shift) & 0xFF]++] = - pCur_syms[i]; - { - tdefl_sym_freq *t = pCur_syms; - pCur_syms = pNew_syms; - pNew_syms = t; - } - } - return pCur_syms; -} - -// tdefl_calculate_minimum_redundancy() originally written by: Alistair Moffat, -// alistair@cs.mu.oz.au, Jyrki Katajainen, jyrki@diku.dk, November 1996. -static void tdefl_calculate_minimum_redundancy(tdefl_sym_freq *A, int n) { - int root, leaf, next, avbl, used, dpth; - if (n == 0) - return; - else if (n == 1) { - A[0].m_key = 1; - return; - } - A[0].m_key += A[1].m_key; - root = 0; - leaf = 2; - for (next = 1; next < n - 1; next++) { - if (leaf >= n || A[root].m_key < A[leaf].m_key) { - A[next].m_key = A[root].m_key; - A[root++].m_key = (mz_uint16)next; - } else - A[next].m_key = A[leaf++].m_key; - if (leaf >= n || (root < next && A[root].m_key < A[leaf].m_key)) { - A[next].m_key = (mz_uint16)(A[next].m_key + A[root].m_key); - A[root++].m_key = (mz_uint16)next; - } else - A[next].m_key = (mz_uint16)(A[next].m_key + A[leaf++].m_key); - } - A[n - 2].m_key = 0; - for (next = n - 3; next >= 0; next--) - A[next].m_key = A[A[next].m_key].m_key + 1; - avbl = 1; - used = dpth = 0; - root = n - 2; - next = n - 1; - while (avbl > 0) { - while (root >= 0 && (int)A[root].m_key == dpth) { - used++; - root--; - } - while (avbl > used) { - A[next--].m_key = (mz_uint16)(dpth); - avbl--; - } - avbl = 2 * used; - dpth++; - used = 0; - } -} - -// Limits canonical Huffman code table's max code size. -enum { TDEFL_MAX_SUPPORTED_HUFF_CODESIZE = 32 }; -static void tdefl_huffman_enforce_max_code_size(int *pNum_codes, - int code_list_len, - int max_code_size) { - int i; - mz_uint32 total = 0; - if (code_list_len <= 1) return; - for (i = max_code_size + 1; i <= TDEFL_MAX_SUPPORTED_HUFF_CODESIZE; i++) - pNum_codes[max_code_size] += pNum_codes[i]; - for (i = max_code_size; i > 0; i--) - total += (((mz_uint32)pNum_codes[i]) << (max_code_size - i)); - while (total != (1UL << max_code_size)) { - pNum_codes[max_code_size]--; - for (i = max_code_size - 1; i > 0; i--) - if (pNum_codes[i]) { - pNum_codes[i]--; - pNum_codes[i + 1] += 2; - break; - } - total--; - } -} - -static void tdefl_optimize_huffman_table(tdefl_compressor *d, int table_num, - int table_len, int code_size_limit, - int static_table) { - int i, j, l, num_codes[1 + TDEFL_MAX_SUPPORTED_HUFF_CODESIZE]; - mz_uint next_code[TDEFL_MAX_SUPPORTED_HUFF_CODESIZE + 1]; - MZ_CLEAR_OBJ(num_codes); - if (static_table) { - for (i = 0; i < table_len; i++) - num_codes[d->m_huff_code_sizes[table_num][i]]++; - } else { - tdefl_sym_freq syms0[TDEFL_MAX_HUFF_SYMBOLS], syms1[TDEFL_MAX_HUFF_SYMBOLS], - *pSyms; - int num_used_syms = 0; - const mz_uint16 *pSym_count = &d->m_huff_count[table_num][0]; - for (i = 0; i < table_len; i++) - if (pSym_count[i]) { - syms0[num_used_syms].m_key = (mz_uint16)pSym_count[i]; - syms0[num_used_syms++].m_sym_index = (mz_uint16)i; - } - - pSyms = tdefl_radix_sort_syms(num_used_syms, syms0, syms1); - tdefl_calculate_minimum_redundancy(pSyms, num_used_syms); - - for (i = 0; i < num_used_syms; i++) num_codes[pSyms[i].m_key]++; - - tdefl_huffman_enforce_max_code_size(num_codes, num_used_syms, - code_size_limit); - - MZ_CLEAR_OBJ(d->m_huff_code_sizes[table_num]); - MZ_CLEAR_OBJ(d->m_huff_codes[table_num]); - for (i = 1, j = num_used_syms; i <= code_size_limit; i++) - for (l = num_codes[i]; l > 0; l--) - d->m_huff_code_sizes[table_num][pSyms[--j].m_sym_index] = (mz_uint8)(i); - } - - next_code[1] = 0; - for (j = 0, i = 2; i <= code_size_limit; i++) - next_code[i] = j = ((j + num_codes[i - 1]) << 1); - - for (i = 0; i < table_len; i++) { - mz_uint rev_code = 0, code, code_size; - if ((code_size = d->m_huff_code_sizes[table_num][i]) == 0) continue; - code = next_code[code_size]++; - for (l = code_size; l > 0; l--, code >>= 1) - rev_code = (rev_code << 1) | (code & 1); - d->m_huff_codes[table_num][i] = (mz_uint16)rev_code; - } -} - -#define TDEFL_PUT_BITS(b, l) \ - do { \ - mz_uint bits = b; \ - mz_uint len = l; \ - MZ_ASSERT(bits <= ((1U << len) - 1U)); \ - d->m_bit_buffer |= (bits << d->m_bits_in); \ - d->m_bits_in += len; \ - while (d->m_bits_in >= 8) { \ - if (d->m_pOutput_buf < d->m_pOutput_buf_end) \ - *d->m_pOutput_buf++ = (mz_uint8)(d->m_bit_buffer); \ - d->m_bit_buffer >>= 8; \ - d->m_bits_in -= 8; \ - } \ - } \ - MZ_MACRO_END - -#define TDEFL_RLE_PREV_CODE_SIZE() \ - { \ - if (rle_repeat_count) { \ - if (rle_repeat_count < 3) { \ - d->m_huff_count[2][prev_code_size] = (mz_uint16)( \ - d->m_huff_count[2][prev_code_size] + rle_repeat_count); \ - while (rle_repeat_count--) \ - packed_code_sizes[num_packed_code_sizes++] = prev_code_size; \ - } else { \ - d->m_huff_count[2][16] = (mz_uint16)(d->m_huff_count[2][16] + 1); \ - packed_code_sizes[num_packed_code_sizes++] = 16; \ - packed_code_sizes[num_packed_code_sizes++] = \ - (mz_uint8)(rle_repeat_count - 3); \ - } \ - rle_repeat_count = 0; \ - } \ - } - -#define TDEFL_RLE_ZERO_CODE_SIZE() \ - { \ - if (rle_z_count) { \ - if (rle_z_count < 3) { \ - d->m_huff_count[2][0] = \ - (mz_uint16)(d->m_huff_count[2][0] + rle_z_count); \ - while (rle_z_count--) packed_code_sizes[num_packed_code_sizes++] = 0; \ - } else if (rle_z_count <= 10) { \ - d->m_huff_count[2][17] = (mz_uint16)(d->m_huff_count[2][17] + 1); \ - packed_code_sizes[num_packed_code_sizes++] = 17; \ - packed_code_sizes[num_packed_code_sizes++] = \ - (mz_uint8)(rle_z_count - 3); \ - } else { \ - d->m_huff_count[2][18] = (mz_uint16)(d->m_huff_count[2][18] + 1); \ - packed_code_sizes[num_packed_code_sizes++] = 18; \ - packed_code_sizes[num_packed_code_sizes++] = \ - (mz_uint8)(rle_z_count - 11); \ - } \ - rle_z_count = 0; \ - } \ - } - -static mz_uint8 s_tdefl_packed_code_size_syms_swizzle[] = { - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; - -static void tdefl_start_dynamic_block(tdefl_compressor *d) { - int num_lit_codes, num_dist_codes, num_bit_lengths; - mz_uint i, total_code_sizes_to_pack, num_packed_code_sizes, rle_z_count, - rle_repeat_count, packed_code_sizes_index; - mz_uint8 - code_sizes_to_pack[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], - packed_code_sizes[TDEFL_MAX_HUFF_SYMBOLS_0 + TDEFL_MAX_HUFF_SYMBOLS_1], - prev_code_size = 0xFF; - - d->m_huff_count[0][256] = 1; - - tdefl_optimize_huffman_table(d, 0, TDEFL_MAX_HUFF_SYMBOLS_0, 15, MZ_FALSE); - tdefl_optimize_huffman_table(d, 1, TDEFL_MAX_HUFF_SYMBOLS_1, 15, MZ_FALSE); - - for (num_lit_codes = 286; num_lit_codes > 257; num_lit_codes--) - if (d->m_huff_code_sizes[0][num_lit_codes - 1]) break; - for (num_dist_codes = 30; num_dist_codes > 1; num_dist_codes--) - if (d->m_huff_code_sizes[1][num_dist_codes - 1]) break; - - memcpy(code_sizes_to_pack, &d->m_huff_code_sizes[0][0], num_lit_codes); - memcpy(code_sizes_to_pack + num_lit_codes, &d->m_huff_code_sizes[1][0], - num_dist_codes); - total_code_sizes_to_pack = num_lit_codes + num_dist_codes; - num_packed_code_sizes = 0; - rle_z_count = 0; - rle_repeat_count = 0; - - memset(&d->m_huff_count[2][0], 0, - sizeof(d->m_huff_count[2][0]) * TDEFL_MAX_HUFF_SYMBOLS_2); - for (i = 0; i < total_code_sizes_to_pack; i++) { - mz_uint8 code_size = code_sizes_to_pack[i]; - if (!code_size) { - TDEFL_RLE_PREV_CODE_SIZE(); - if (++rle_z_count == 138) { - TDEFL_RLE_ZERO_CODE_SIZE(); - } - } else { - TDEFL_RLE_ZERO_CODE_SIZE(); - if (code_size != prev_code_size) { - TDEFL_RLE_PREV_CODE_SIZE(); - d->m_huff_count[2][code_size] = - (mz_uint16)(d->m_huff_count[2][code_size] + 1); - packed_code_sizes[num_packed_code_sizes++] = code_size; - } else if (++rle_repeat_count == 6) { - TDEFL_RLE_PREV_CODE_SIZE(); - } - } - prev_code_size = code_size; - } - if (rle_repeat_count) { - TDEFL_RLE_PREV_CODE_SIZE(); - } else { - TDEFL_RLE_ZERO_CODE_SIZE(); - } - - tdefl_optimize_huffman_table(d, 2, TDEFL_MAX_HUFF_SYMBOLS_2, 7, MZ_FALSE); - - TDEFL_PUT_BITS(2, 2); - - TDEFL_PUT_BITS(num_lit_codes - 257, 5); - TDEFL_PUT_BITS(num_dist_codes - 1, 5); - - for (num_bit_lengths = 18; num_bit_lengths >= 0; num_bit_lengths--) - if (d->m_huff_code_sizes - [2][s_tdefl_packed_code_size_syms_swizzle[num_bit_lengths]]) - break; - num_bit_lengths = MZ_MAX(4, (num_bit_lengths + 1)); - TDEFL_PUT_BITS(num_bit_lengths - 4, 4); - for (i = 0; (int)i < num_bit_lengths; i++) - TDEFL_PUT_BITS( - d->m_huff_code_sizes[2][s_tdefl_packed_code_size_syms_swizzle[i]], 3); - - for (packed_code_sizes_index = 0; - packed_code_sizes_index < num_packed_code_sizes;) { - mz_uint code = packed_code_sizes[packed_code_sizes_index++]; - MZ_ASSERT(code < TDEFL_MAX_HUFF_SYMBOLS_2); - TDEFL_PUT_BITS(d->m_huff_codes[2][code], d->m_huff_code_sizes[2][code]); - if (code >= 16) - TDEFL_PUT_BITS(packed_code_sizes[packed_code_sizes_index++], - "\02\03\07"[code - 16]); - } -} - -static void tdefl_start_static_block(tdefl_compressor *d) { - mz_uint i; - mz_uint8 *p = &d->m_huff_code_sizes[0][0]; - - for (i = 0; i <= 143; ++i) *p++ = 8; - for (; i <= 255; ++i) *p++ = 9; - for (; i <= 279; ++i) *p++ = 7; - for (; i <= 287; ++i) *p++ = 8; - - memset(d->m_huff_code_sizes[1], 5, 32); - - tdefl_optimize_huffman_table(d, 0, 288, 15, MZ_TRUE); - tdefl_optimize_huffman_table(d, 1, 32, 15, MZ_TRUE); - - TDEFL_PUT_BITS(1, 2); -} - -static const mz_uint mz_bitmasks[17] = { - 0x0000, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, - 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF}; - -#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && \ - MINIZ_HAS_64BIT_REGISTERS -static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) { - mz_uint flags; - mz_uint8 *pLZ_codes; - mz_uint8 *pOutput_buf = d->m_pOutput_buf; - mz_uint8 *pLZ_code_buf_end = d->m_pLZ_code_buf; - mz_uint64 bit_buffer = d->m_bit_buffer; - mz_uint bits_in = d->m_bits_in; - -#define TDEFL_PUT_BITS_FAST(b, l) \ - { \ - bit_buffer |= (((mz_uint64)(b)) << bits_in); \ - bits_in += (l); \ - } - - flags = 1; - for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < pLZ_code_buf_end; - flags >>= 1) { - if (flags == 1) flags = *pLZ_codes++ | 0x100; - - if (flags & 1) { - mz_uint s0, s1, n0, n1, sym, num_extra_bits; - mz_uint match_len = pLZ_codes[0], - match_dist = *(const mz_uint16 *)(pLZ_codes + 1); - pLZ_codes += 3; - - MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); - TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], - d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); - TDEFL_PUT_BITS_FAST(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], - s_tdefl_len_extra[match_len]); - - // This sequence coaxes MSVC into using cmov's vs. jmp's. - s0 = s_tdefl_small_dist_sym[match_dist & 511]; - n0 = s_tdefl_small_dist_extra[match_dist & 511]; - s1 = s_tdefl_large_dist_sym[match_dist >> 8]; - n1 = s_tdefl_large_dist_extra[match_dist >> 8]; - sym = (match_dist < 512) ? s0 : s1; - num_extra_bits = (match_dist < 512) ? n0 : n1; - - MZ_ASSERT(d->m_huff_code_sizes[1][sym]); - TDEFL_PUT_BITS_FAST(d->m_huff_codes[1][sym], - d->m_huff_code_sizes[1][sym]); - TDEFL_PUT_BITS_FAST(match_dist & mz_bitmasks[num_extra_bits], - num_extra_bits); - } else { - mz_uint lit = *pLZ_codes++; - MZ_ASSERT(d->m_huff_code_sizes[0][lit]); - TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], - d->m_huff_code_sizes[0][lit]); - - if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) { - flags >>= 1; - lit = *pLZ_codes++; - MZ_ASSERT(d->m_huff_code_sizes[0][lit]); - TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], - d->m_huff_code_sizes[0][lit]); - - if (((flags & 2) == 0) && (pLZ_codes < pLZ_code_buf_end)) { - flags >>= 1; - lit = *pLZ_codes++; - MZ_ASSERT(d->m_huff_code_sizes[0][lit]); - TDEFL_PUT_BITS_FAST(d->m_huff_codes[0][lit], - d->m_huff_code_sizes[0][lit]); - } - } - } - - if (pOutput_buf >= d->m_pOutput_buf_end) return MZ_FALSE; - - *(mz_uint64 *)pOutput_buf = bit_buffer; - pOutput_buf += (bits_in >> 3); - bit_buffer >>= (bits_in & ~7); - bits_in &= 7; - } - -#undef TDEFL_PUT_BITS_FAST - - d->m_pOutput_buf = pOutput_buf; - d->m_bits_in = 0; - d->m_bit_buffer = 0; - - while (bits_in) { - mz_uint32 n = MZ_MIN(bits_in, 16); - TDEFL_PUT_BITS((mz_uint)bit_buffer & mz_bitmasks[n], n); - bit_buffer >>= n; - bits_in -= n; - } - - TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); - - return (d->m_pOutput_buf < d->m_pOutput_buf_end); -} -#else -static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) { - mz_uint flags; - mz_uint8 *pLZ_codes; - - flags = 1; - for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; - flags >>= 1) { - if (flags == 1) flags = *pLZ_codes++ | 0x100; - if (flags & 1) { - mz_uint sym, num_extra_bits; - mz_uint match_len = pLZ_codes[0], - match_dist = (pLZ_codes[1] | (pLZ_codes[2] << 8)); - pLZ_codes += 3; - - MZ_ASSERT(d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); - TDEFL_PUT_BITS(d->m_huff_codes[0][s_tdefl_len_sym[match_len]], - d->m_huff_code_sizes[0][s_tdefl_len_sym[match_len]]); - TDEFL_PUT_BITS(match_len & mz_bitmasks[s_tdefl_len_extra[match_len]], - s_tdefl_len_extra[match_len]); - - if (match_dist < 512) { - sym = s_tdefl_small_dist_sym[match_dist]; - num_extra_bits = s_tdefl_small_dist_extra[match_dist]; - } else { - sym = s_tdefl_large_dist_sym[match_dist >> 8]; - num_extra_bits = s_tdefl_large_dist_extra[match_dist >> 8]; - } - MZ_ASSERT(d->m_huff_code_sizes[1][sym]); - TDEFL_PUT_BITS(d->m_huff_codes[1][sym], d->m_huff_code_sizes[1][sym]); - TDEFL_PUT_BITS(match_dist & mz_bitmasks[num_extra_bits], num_extra_bits); - } else { - mz_uint lit = *pLZ_codes++; - MZ_ASSERT(d->m_huff_code_sizes[0][lit]); - TDEFL_PUT_BITS(d->m_huff_codes[0][lit], d->m_huff_code_sizes[0][lit]); - } - } - - TDEFL_PUT_BITS(d->m_huff_codes[0][256], d->m_huff_code_sizes[0][256]); - - return (d->m_pOutput_buf < d->m_pOutput_buf_end); -} -#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN && - // MINIZ_HAS_64BIT_REGISTERS - -static mz_bool tdefl_compress_block(tdefl_compressor *d, mz_bool static_block) { - if (static_block) - tdefl_start_static_block(d); - else - tdefl_start_dynamic_block(d); - return tdefl_compress_lz_codes(d); -} - -static int tdefl_flush_block(tdefl_compressor *d, int flush) { - mz_uint saved_bit_buf, saved_bits_in; - mz_uint8 *pSaved_output_buf; - mz_bool comp_block_succeeded = MZ_FALSE; - int n, use_raw_block = - ((d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS) != 0) && - (d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size; - mz_uint8 *pOutput_buf_start = - ((d->m_pPut_buf_func == NULL) && - ((*d->m_pOut_buf_size - d->m_out_buf_ofs) >= TDEFL_OUT_BUF_SIZE)) - ? ((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs) - : d->m_output_buf; - - d->m_pOutput_buf = pOutput_buf_start; - d->m_pOutput_buf_end = d->m_pOutput_buf + TDEFL_OUT_BUF_SIZE - 16; - - MZ_ASSERT(!d->m_output_flush_remaining); - d->m_output_flush_ofs = 0; - d->m_output_flush_remaining = 0; - - *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> d->m_num_flags_left); - d->m_pLZ_code_buf -= (d->m_num_flags_left == 8); - - if ((d->m_flags & TDEFL_WRITE_ZLIB_HEADER) && (!d->m_block_index)) { - TDEFL_PUT_BITS(0x78, 8); - TDEFL_PUT_BITS(0x01, 8); - } - - TDEFL_PUT_BITS(flush == TDEFL_FINISH, 1); - - pSaved_output_buf = d->m_pOutput_buf; - saved_bit_buf = d->m_bit_buffer; - saved_bits_in = d->m_bits_in; - - if (!use_raw_block) - comp_block_succeeded = - tdefl_compress_block(d, (d->m_flags & TDEFL_FORCE_ALL_STATIC_BLOCKS) || - (d->m_total_lz_bytes < 48)); - - // If the block gets expanded, forget the current contents of the output - // buffer and send a raw block instead. - if (((use_raw_block) || - ((d->m_total_lz_bytes) && ((d->m_pOutput_buf - pSaved_output_buf + 1U) >= - d->m_total_lz_bytes))) && - ((d->m_lookahead_pos - d->m_lz_code_buf_dict_pos) <= d->m_dict_size)) { - mz_uint i; - d->m_pOutput_buf = pSaved_output_buf; - d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; - TDEFL_PUT_BITS(0, 2); - if (d->m_bits_in) { - TDEFL_PUT_BITS(0, 8 - d->m_bits_in); - } - for (i = 2; i; --i, d->m_total_lz_bytes ^= 0xFFFF) { - TDEFL_PUT_BITS(d->m_total_lz_bytes & 0xFFFF, 16); - } - for (i = 0; i < d->m_total_lz_bytes; ++i) { - TDEFL_PUT_BITS( - d->m_dict[(d->m_lz_code_buf_dict_pos + i) & TDEFL_LZ_DICT_SIZE_MASK], - 8); - } - } - // Check for the extremely unlikely (if not impossible) case of the compressed - // block not fitting into the output buffer when using dynamic codes. - else if (!comp_block_succeeded) { - d->m_pOutput_buf = pSaved_output_buf; - d->m_bit_buffer = saved_bit_buf, d->m_bits_in = saved_bits_in; - tdefl_compress_block(d, MZ_TRUE); - } - - if (flush) { - if (flush == TDEFL_FINISH) { - if (d->m_bits_in) { - TDEFL_PUT_BITS(0, 8 - d->m_bits_in); - } - if (d->m_flags & TDEFL_WRITE_ZLIB_HEADER) { - mz_uint i, a = d->m_adler32; - for (i = 0; i < 4; i++) { - TDEFL_PUT_BITS((a >> 24) & 0xFF, 8); - a <<= 8; - } - } - } else { - mz_uint i, z = 0; - TDEFL_PUT_BITS(0, 3); - if (d->m_bits_in) { - TDEFL_PUT_BITS(0, 8 - d->m_bits_in); - } - for (i = 2; i; --i, z ^= 0xFFFF) { - TDEFL_PUT_BITS(z & 0xFFFF, 16); - } - } - } - - MZ_ASSERT(d->m_pOutput_buf < d->m_pOutput_buf_end); - - memset(&d->m_huff_count[0][0], 0, - sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); - memset(&d->m_huff_count[1][0], 0, - sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); - - d->m_pLZ_code_buf = d->m_lz_code_buf + 1; - d->m_pLZ_flags = d->m_lz_code_buf; - d->m_num_flags_left = 8; - d->m_lz_code_buf_dict_pos += d->m_total_lz_bytes; - d->m_total_lz_bytes = 0; - d->m_block_index++; - - if ((n = (int)(d->m_pOutput_buf - pOutput_buf_start)) != 0) { - if (d->m_pPut_buf_func) { - *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; - if (!(*d->m_pPut_buf_func)(d->m_output_buf, n, d->m_pPut_buf_user)) - return (d->m_prev_return_status = TDEFL_STATUS_PUT_BUF_FAILED); - } else if (pOutput_buf_start == d->m_output_buf) { - int bytes_to_copy = (int)MZ_MIN( - (size_t)n, (size_t)(*d->m_pOut_buf_size - d->m_out_buf_ofs)); - memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, d->m_output_buf, - bytes_to_copy); - d->m_out_buf_ofs += bytes_to_copy; - if ((n -= bytes_to_copy) != 0) { - d->m_output_flush_ofs = bytes_to_copy; - d->m_output_flush_remaining = n; - } - } else { - d->m_out_buf_ofs += n; - } - } - - return d->m_output_flush_remaining; -} - -#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES -#define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16 *)(p) -static MZ_FORCEINLINE void tdefl_find_match( - tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, - mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) { - mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, - match_len = *pMatch_len, probe_pos = pos, next_probe_pos, - probe_len; - mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; - const mz_uint16 *s = (const mz_uint16 *)(d->m_dict + pos), *p, *q; - mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), - s01 = TDEFL_READ_UNALIGNED_WORD(s); - MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); - if (max_match_len <= match_len) return; - for (;;) { - for (;;) { - if (--num_probes_left == 0) return; -#define TDEFL_PROBE \ - next_probe_pos = d->m_next[probe_pos]; \ - if ((!next_probe_pos) || \ - ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) \ - return; \ - probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ - if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) \ - break; - TDEFL_PROBE; - TDEFL_PROBE; - TDEFL_PROBE; - } - if (!dist) break; - q = (const mz_uint16 *)(d->m_dict + probe_pos); - if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; - p = s; - probe_len = 32; - do { - } while ( - (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && - (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && - (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && - (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && - (--probe_len > 0)); - if (!probe_len) { - *pMatch_dist = dist; - *pMatch_len = MZ_MIN(max_match_len, TDEFL_MAX_MATCH_LEN); - break; - } else if ((probe_len = ((mz_uint)(p - s) * 2) + - (mz_uint)(*(const mz_uint8 *)p == - *(const mz_uint8 *)q)) > match_len) { - *pMatch_dist = dist; - if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == - max_match_len) - break; - c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]); - } - } -} -#else -static MZ_FORCEINLINE void tdefl_find_match( - tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, - mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) { - mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, - match_len = *pMatch_len, probe_pos = pos, next_probe_pos, - probe_len; - mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; - const mz_uint8 *s = d->m_dict + pos, *p, *q; - mz_uint8 c0 = d->m_dict[pos + match_len], c1 = d->m_dict[pos + match_len - 1]; - MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); - if (max_match_len <= match_len) return; - for (;;) { - for (;;) { - if (--num_probes_left == 0) return; -#define TDEFL_PROBE \ - next_probe_pos = d->m_next[probe_pos]; \ - if ((!next_probe_pos) || \ - ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) \ - return; \ - probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ - if ((d->m_dict[probe_pos + match_len] == c0) && \ - (d->m_dict[probe_pos + match_len - 1] == c1)) \ - break; - TDEFL_PROBE; - TDEFL_PROBE; - TDEFL_PROBE; - } - if (!dist) break; - p = s; - q = d->m_dict + probe_pos; - for (probe_len = 0; probe_len < max_match_len; probe_len++) - if (*p++ != *q++) break; - if (probe_len > match_len) { - *pMatch_dist = dist; - if ((*pMatch_len = match_len = probe_len) == max_match_len) return; - c0 = d->m_dict[pos + match_len]; - c1 = d->m_dict[pos + match_len - 1]; - } - } -} -#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES - -#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN -static mz_bool tdefl_compress_fast(tdefl_compressor *d) { - // Faster, minimally featured LZRW1-style match+parse loop with better - // register utilization. Intended for applications where raw throughput is - // valued more highly than ratio. - mz_uint lookahead_pos = d->m_lookahead_pos, - lookahead_size = d->m_lookahead_size, dict_size = d->m_dict_size, - total_lz_bytes = d->m_total_lz_bytes, - num_flags_left = d->m_num_flags_left; - mz_uint8 *pLZ_code_buf = d->m_pLZ_code_buf, *pLZ_flags = d->m_pLZ_flags; - mz_uint cur_pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; - - while ((d->m_src_buf_left) || ((d->m_flush) && (lookahead_size))) { - const mz_uint TDEFL_COMP_FAST_LOOKAHEAD_SIZE = 4096; - mz_uint dst_pos = - (lookahead_pos + lookahead_size) & TDEFL_LZ_DICT_SIZE_MASK; - mz_uint num_bytes_to_process = (mz_uint)MZ_MIN( - d->m_src_buf_left, TDEFL_COMP_FAST_LOOKAHEAD_SIZE - lookahead_size); - d->m_src_buf_left -= num_bytes_to_process; - lookahead_size += num_bytes_to_process; - - while (num_bytes_to_process) { - mz_uint32 n = MZ_MIN(TDEFL_LZ_DICT_SIZE - dst_pos, num_bytes_to_process); - memcpy(d->m_dict + dst_pos, d->m_pSrc, n); - if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) - memcpy(d->m_dict + TDEFL_LZ_DICT_SIZE + dst_pos, d->m_pSrc, - MZ_MIN(n, (TDEFL_MAX_MATCH_LEN - 1) - dst_pos)); - d->m_pSrc += n; - dst_pos = (dst_pos + n) & TDEFL_LZ_DICT_SIZE_MASK; - num_bytes_to_process -= n; - } - - dict_size = MZ_MIN(TDEFL_LZ_DICT_SIZE - lookahead_size, dict_size); - if ((!d->m_flush) && (lookahead_size < TDEFL_COMP_FAST_LOOKAHEAD_SIZE)) - break; - - while (lookahead_size >= 4) { - mz_uint cur_match_dist, cur_match_len = 1; - mz_uint8 *pCur_dict = d->m_dict + cur_pos; - mz_uint first_trigram = (*(const mz_uint32 *)pCur_dict) & 0xFFFFFF; - mz_uint hash = - (first_trigram ^ (first_trigram >> (24 - (TDEFL_LZ_HASH_BITS - 8)))) & - TDEFL_LEVEL1_HASH_SIZE_MASK; - mz_uint probe_pos = d->m_hash[hash]; - d->m_hash[hash] = (mz_uint16)lookahead_pos; - - if (((cur_match_dist = (mz_uint16)(lookahead_pos - probe_pos)) <= - dict_size) && - ((*(const mz_uint32 *)(d->m_dict + - (probe_pos &= TDEFL_LZ_DICT_SIZE_MASK)) & - 0xFFFFFF) == first_trigram)) { - const mz_uint16 *p = (const mz_uint16 *)pCur_dict; - const mz_uint16 *q = (const mz_uint16 *)(d->m_dict + probe_pos); - mz_uint32 probe_len = 32; - do { - } while ((TDEFL_READ_UNALIGNED_WORD(++p) == - TDEFL_READ_UNALIGNED_WORD(++q)) && - (TDEFL_READ_UNALIGNED_WORD(++p) == - TDEFL_READ_UNALIGNED_WORD(++q)) && - (TDEFL_READ_UNALIGNED_WORD(++p) == - TDEFL_READ_UNALIGNED_WORD(++q)) && - (TDEFL_READ_UNALIGNED_WORD(++p) == - TDEFL_READ_UNALIGNED_WORD(++q)) && - (--probe_len > 0)); - cur_match_len = ((mz_uint)(p - (const mz_uint16 *)pCur_dict) * 2) + - (mz_uint)(*(const mz_uint8 *)p == *(const mz_uint8 *)q); - if (!probe_len) - cur_match_len = cur_match_dist ? TDEFL_MAX_MATCH_LEN : 0; - - if ((cur_match_len < TDEFL_MIN_MATCH_LEN) || - ((cur_match_len == TDEFL_MIN_MATCH_LEN) && - (cur_match_dist >= 8U * 1024U))) { - cur_match_len = 1; - *pLZ_code_buf++ = (mz_uint8)first_trigram; - *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); - d->m_huff_count[0][(mz_uint8)first_trigram]++; - } else { - mz_uint32 s0, s1; - cur_match_len = MZ_MIN(cur_match_len, lookahead_size); - - MZ_ASSERT((cur_match_len >= TDEFL_MIN_MATCH_LEN) && - (cur_match_dist >= 1) && - (cur_match_dist <= TDEFL_LZ_DICT_SIZE)); - - cur_match_dist--; - - pLZ_code_buf[0] = (mz_uint8)(cur_match_len - TDEFL_MIN_MATCH_LEN); - *(mz_uint16 *)(&pLZ_code_buf[1]) = (mz_uint16)cur_match_dist; - pLZ_code_buf += 3; - *pLZ_flags = (mz_uint8)((*pLZ_flags >> 1) | 0x80); - - s0 = s_tdefl_small_dist_sym[cur_match_dist & 511]; - s1 = s_tdefl_large_dist_sym[cur_match_dist >> 8]; - d->m_huff_count[1][(cur_match_dist < 512) ? s0 : s1]++; - - d->m_huff_count[0][s_tdefl_len_sym[cur_match_len - - TDEFL_MIN_MATCH_LEN]]++; - } - } else { - *pLZ_code_buf++ = (mz_uint8)first_trigram; - *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); - d->m_huff_count[0][(mz_uint8)first_trigram]++; - } - - if (--num_flags_left == 0) { - num_flags_left = 8; - pLZ_flags = pLZ_code_buf++; - } - - total_lz_bytes += cur_match_len; - lookahead_pos += cur_match_len; - dict_size = MZ_MIN(dict_size + cur_match_len, TDEFL_LZ_DICT_SIZE); - cur_pos = (cur_pos + cur_match_len) & TDEFL_LZ_DICT_SIZE_MASK; - MZ_ASSERT(lookahead_size >= cur_match_len); - lookahead_size -= cur_match_len; - - if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) { - int n; - d->m_lookahead_pos = lookahead_pos; - d->m_lookahead_size = lookahead_size; - d->m_dict_size = dict_size; - d->m_total_lz_bytes = total_lz_bytes; - d->m_pLZ_code_buf = pLZ_code_buf; - d->m_pLZ_flags = pLZ_flags; - d->m_num_flags_left = num_flags_left; - if ((n = tdefl_flush_block(d, 0)) != 0) - return (n < 0) ? MZ_FALSE : MZ_TRUE; - total_lz_bytes = d->m_total_lz_bytes; - pLZ_code_buf = d->m_pLZ_code_buf; - pLZ_flags = d->m_pLZ_flags; - num_flags_left = d->m_num_flags_left; - } - } - - while (lookahead_size) { - mz_uint8 lit = d->m_dict[cur_pos]; - - total_lz_bytes++; - *pLZ_code_buf++ = lit; - *pLZ_flags = (mz_uint8)(*pLZ_flags >> 1); - if (--num_flags_left == 0) { - num_flags_left = 8; - pLZ_flags = pLZ_code_buf++; - } - - d->m_huff_count[0][lit]++; - - lookahead_pos++; - dict_size = MZ_MIN(dict_size + 1, TDEFL_LZ_DICT_SIZE); - cur_pos = (cur_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK; - lookahead_size--; - - if (pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) { - int n; - d->m_lookahead_pos = lookahead_pos; - d->m_lookahead_size = lookahead_size; - d->m_dict_size = dict_size; - d->m_total_lz_bytes = total_lz_bytes; - d->m_pLZ_code_buf = pLZ_code_buf; - d->m_pLZ_flags = pLZ_flags; - d->m_num_flags_left = num_flags_left; - if ((n = tdefl_flush_block(d, 0)) != 0) - return (n < 0) ? MZ_FALSE : MZ_TRUE; - total_lz_bytes = d->m_total_lz_bytes; - pLZ_code_buf = d->m_pLZ_code_buf; - pLZ_flags = d->m_pLZ_flags; - num_flags_left = d->m_num_flags_left; - } - } - } - - d->m_lookahead_pos = lookahead_pos; - d->m_lookahead_size = lookahead_size; - d->m_dict_size = dict_size; - d->m_total_lz_bytes = total_lz_bytes; - d->m_pLZ_code_buf = pLZ_code_buf; - d->m_pLZ_flags = pLZ_flags; - d->m_num_flags_left = num_flags_left; - return MZ_TRUE; -} -#endif // MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN - -static MZ_FORCEINLINE void tdefl_record_literal(tdefl_compressor *d, - mz_uint8 lit) { - d->m_total_lz_bytes++; - *d->m_pLZ_code_buf++ = lit; - *d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1); - if (--d->m_num_flags_left == 0) { - d->m_num_flags_left = 8; - d->m_pLZ_flags = d->m_pLZ_code_buf++; - } - d->m_huff_count[0][lit]++; -} - -static MZ_FORCEINLINE void tdefl_record_match(tdefl_compressor *d, - mz_uint match_len, - mz_uint match_dist) { - mz_uint32 s0, s1; - - MZ_ASSERT((match_len >= TDEFL_MIN_MATCH_LEN) && (match_dist >= 1) && - (match_dist <= TDEFL_LZ_DICT_SIZE)); - - d->m_total_lz_bytes += match_len; - - d->m_pLZ_code_buf[0] = (mz_uint8)(match_len - TDEFL_MIN_MATCH_LEN); - - match_dist -= 1; - d->m_pLZ_code_buf[1] = (mz_uint8)(match_dist & 0xFF); - d->m_pLZ_code_buf[2] = (mz_uint8)(match_dist >> 8); - d->m_pLZ_code_buf += 3; - - *d->m_pLZ_flags = (mz_uint8)((*d->m_pLZ_flags >> 1) | 0x80); - if (--d->m_num_flags_left == 0) { - d->m_num_flags_left = 8; - d->m_pLZ_flags = d->m_pLZ_code_buf++; - } - - s0 = s_tdefl_small_dist_sym[match_dist & 511]; - s1 = s_tdefl_large_dist_sym[(match_dist >> 8) & 127]; - d->m_huff_count[1][(match_dist < 512) ? s0 : s1]++; - - if (match_len >= TDEFL_MIN_MATCH_LEN) - d->m_huff_count[0][s_tdefl_len_sym[match_len - TDEFL_MIN_MATCH_LEN]]++; -} - -static mz_bool tdefl_compress_normal(tdefl_compressor *d) { - const mz_uint8 *pSrc = d->m_pSrc; - size_t src_buf_left = d->m_src_buf_left; - tdefl_flush flush = d->m_flush; - - while ((src_buf_left) || ((flush) && (d->m_lookahead_size))) { - mz_uint len_to_move, cur_match_dist, cur_match_len, cur_pos; - // Update dictionary and hash chains. Keeps the lookahead size equal to - // TDEFL_MAX_MATCH_LEN. - if ((d->m_lookahead_size + d->m_dict_size) >= (TDEFL_MIN_MATCH_LEN - 1)) { - mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & - TDEFL_LZ_DICT_SIZE_MASK, - ins_pos = d->m_lookahead_pos + d->m_lookahead_size - 2; - mz_uint hash = (d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] - << TDEFL_LZ_HASH_SHIFT) ^ - d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK]; - mz_uint num_bytes_to_process = (mz_uint)MZ_MIN( - src_buf_left, TDEFL_MAX_MATCH_LEN - d->m_lookahead_size); - const mz_uint8 *pSrc_end = pSrc + num_bytes_to_process; - src_buf_left -= num_bytes_to_process; - d->m_lookahead_size += num_bytes_to_process; - while (pSrc != pSrc_end) { - mz_uint8 c = *pSrc++; - d->m_dict[dst_pos] = c; - if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) - d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c; - hash = ((hash << TDEFL_LZ_HASH_SHIFT) ^ c) & (TDEFL_LZ_HASH_SIZE - 1); - d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; - d->m_hash[hash] = (mz_uint16)(ins_pos); - dst_pos = (dst_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK; - ins_pos++; - } - } else { - while ((src_buf_left) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN)) { - mz_uint8 c = *pSrc++; - mz_uint dst_pos = (d->m_lookahead_pos + d->m_lookahead_size) & - TDEFL_LZ_DICT_SIZE_MASK; - src_buf_left--; - d->m_dict[dst_pos] = c; - if (dst_pos < (TDEFL_MAX_MATCH_LEN - 1)) - d->m_dict[TDEFL_LZ_DICT_SIZE + dst_pos] = c; - if ((++d->m_lookahead_size + d->m_dict_size) >= TDEFL_MIN_MATCH_LEN) { - mz_uint ins_pos = d->m_lookahead_pos + (d->m_lookahead_size - 1) - 2; - mz_uint hash = ((d->m_dict[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] - << (TDEFL_LZ_HASH_SHIFT * 2)) ^ - (d->m_dict[(ins_pos + 1) & TDEFL_LZ_DICT_SIZE_MASK] - << TDEFL_LZ_HASH_SHIFT) ^ - c) & - (TDEFL_LZ_HASH_SIZE - 1); - d->m_next[ins_pos & TDEFL_LZ_DICT_SIZE_MASK] = d->m_hash[hash]; - d->m_hash[hash] = (mz_uint16)(ins_pos); - } - } - } - d->m_dict_size = - MZ_MIN(TDEFL_LZ_DICT_SIZE - d->m_lookahead_size, d->m_dict_size); - if ((!flush) && (d->m_lookahead_size < TDEFL_MAX_MATCH_LEN)) break; - - // Simple lazy/greedy parsing state machine. - len_to_move = 1; - cur_match_dist = 0; - cur_match_len = - d->m_saved_match_len ? d->m_saved_match_len : (TDEFL_MIN_MATCH_LEN - 1); - cur_pos = d->m_lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK; - if (d->m_flags & (TDEFL_RLE_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS)) { - if ((d->m_dict_size) && (!(d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS))) { - mz_uint8 c = d->m_dict[(cur_pos - 1) & TDEFL_LZ_DICT_SIZE_MASK]; - cur_match_len = 0; - while (cur_match_len < d->m_lookahead_size) { - if (d->m_dict[cur_pos + cur_match_len] != c) break; - cur_match_len++; - } - if (cur_match_len < TDEFL_MIN_MATCH_LEN) - cur_match_len = 0; - else - cur_match_dist = 1; - } - } else { - tdefl_find_match(d, d->m_lookahead_pos, d->m_dict_size, - d->m_lookahead_size, &cur_match_dist, &cur_match_len); - } - if (((cur_match_len == TDEFL_MIN_MATCH_LEN) && - (cur_match_dist >= 8U * 1024U)) || - (cur_pos == cur_match_dist) || - ((d->m_flags & TDEFL_FILTER_MATCHES) && (cur_match_len <= 5))) { - cur_match_dist = cur_match_len = 0; - } - if (d->m_saved_match_len) { - if (cur_match_len > d->m_saved_match_len) { - tdefl_record_literal(d, (mz_uint8)d->m_saved_lit); - if (cur_match_len >= 128) { - tdefl_record_match(d, cur_match_len, cur_match_dist); - d->m_saved_match_len = 0; - len_to_move = cur_match_len; - } else { - d->m_saved_lit = d->m_dict[cur_pos]; - d->m_saved_match_dist = cur_match_dist; - d->m_saved_match_len = cur_match_len; - } - } else { - tdefl_record_match(d, d->m_saved_match_len, d->m_saved_match_dist); - len_to_move = d->m_saved_match_len - 1; - d->m_saved_match_len = 0; - } - } else if (!cur_match_dist) - tdefl_record_literal(d, - d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]); - else if ((d->m_greedy_parsing) || (d->m_flags & TDEFL_RLE_MATCHES) || - (cur_match_len >= 128)) { - tdefl_record_match(d, cur_match_len, cur_match_dist); - len_to_move = cur_match_len; - } else { - d->m_saved_lit = d->m_dict[MZ_MIN(cur_pos, sizeof(d->m_dict) - 1)]; - d->m_saved_match_dist = cur_match_dist; - d->m_saved_match_len = cur_match_len; - } - // Move the lookahead forward by len_to_move bytes. - d->m_lookahead_pos += len_to_move; - MZ_ASSERT(d->m_lookahead_size >= len_to_move); - d->m_lookahead_size -= len_to_move; - d->m_dict_size = - MZ_MIN(d->m_dict_size + len_to_move, (mz_uint)TDEFL_LZ_DICT_SIZE); - // Check if it's time to flush the current LZ codes to the internal output - // buffer. - if ((d->m_pLZ_code_buf > &d->m_lz_code_buf[TDEFL_LZ_CODE_BUF_SIZE - 8]) || - ((d->m_total_lz_bytes > 31 * 1024) && - (((((mz_uint)(d->m_pLZ_code_buf - d->m_lz_code_buf) * 115) >> 7) >= - d->m_total_lz_bytes) || - (d->m_flags & TDEFL_FORCE_ALL_RAW_BLOCKS)))) { - int n; - d->m_pSrc = pSrc; - d->m_src_buf_left = src_buf_left; - if ((n = tdefl_flush_block(d, 0)) != 0) - return (n < 0) ? MZ_FALSE : MZ_TRUE; - } - } - - d->m_pSrc = pSrc; - d->m_src_buf_left = src_buf_left; - return MZ_TRUE; -} - -static tdefl_status tdefl_flush_output_buffer(tdefl_compressor *d) { - if (d->m_pIn_buf_size) { - *d->m_pIn_buf_size = d->m_pSrc - (const mz_uint8 *)d->m_pIn_buf; - } - - if (d->m_pOut_buf_size) { - size_t n = MZ_MIN(*d->m_pOut_buf_size - d->m_out_buf_ofs, - d->m_output_flush_remaining); - memcpy((mz_uint8 *)d->m_pOut_buf + d->m_out_buf_ofs, - d->m_output_buf + d->m_output_flush_ofs, n); - d->m_output_flush_ofs += (mz_uint)n; - d->m_output_flush_remaining -= (mz_uint)n; - d->m_out_buf_ofs += n; - - *d->m_pOut_buf_size = d->m_out_buf_ofs; - } - - return (d->m_finished && !d->m_output_flush_remaining) ? TDEFL_STATUS_DONE - : TDEFL_STATUS_OKAY; -} - -tdefl_status tdefl_compress(tdefl_compressor *d, const void *pIn_buf, - size_t *pIn_buf_size, void *pOut_buf, - size_t *pOut_buf_size, tdefl_flush flush) { - if (!d) { - if (pIn_buf_size) *pIn_buf_size = 0; - if (pOut_buf_size) *pOut_buf_size = 0; - return TDEFL_STATUS_BAD_PARAM; - } - - d->m_pIn_buf = pIn_buf; - d->m_pIn_buf_size = pIn_buf_size; - d->m_pOut_buf = pOut_buf; - d->m_pOut_buf_size = pOut_buf_size; - d->m_pSrc = (const mz_uint8 *)(pIn_buf); - d->m_src_buf_left = pIn_buf_size ? *pIn_buf_size : 0; - d->m_out_buf_ofs = 0; - d->m_flush = flush; - - if (((d->m_pPut_buf_func != NULL) == - ((pOut_buf != NULL) || (pOut_buf_size != NULL))) || - (d->m_prev_return_status != TDEFL_STATUS_OKAY) || - (d->m_wants_to_finish && (flush != TDEFL_FINISH)) || - (pIn_buf_size && *pIn_buf_size && !pIn_buf) || - (pOut_buf_size && *pOut_buf_size && !pOut_buf)) { - if (pIn_buf_size) *pIn_buf_size = 0; - if (pOut_buf_size) *pOut_buf_size = 0; - return (d->m_prev_return_status = TDEFL_STATUS_BAD_PARAM); - } - d->m_wants_to_finish |= (flush == TDEFL_FINISH); - - if ((d->m_output_flush_remaining) || (d->m_finished)) - return (d->m_prev_return_status = tdefl_flush_output_buffer(d)); - -#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN - if (((d->m_flags & TDEFL_MAX_PROBES_MASK) == 1) && - ((d->m_flags & TDEFL_GREEDY_PARSING_FLAG) != 0) && - ((d->m_flags & (TDEFL_FILTER_MATCHES | TDEFL_FORCE_ALL_RAW_BLOCKS | - TDEFL_RLE_MATCHES)) == 0)) { - if (!tdefl_compress_fast(d)) return d->m_prev_return_status; - } else -#endif // #if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN - { - if (!tdefl_compress_normal(d)) return d->m_prev_return_status; - } - - if ((d->m_flags & (TDEFL_WRITE_ZLIB_HEADER | TDEFL_COMPUTE_ADLER32)) && - (pIn_buf)) - d->m_adler32 = - (mz_uint32)mz_adler32(d->m_adler32, (const mz_uint8 *)pIn_buf, - d->m_pSrc - (const mz_uint8 *)pIn_buf); - - if ((flush) && (!d->m_lookahead_size) && (!d->m_src_buf_left) && - (!d->m_output_flush_remaining)) { - if (tdefl_flush_block(d, flush) < 0) return d->m_prev_return_status; - d->m_finished = (flush == TDEFL_FINISH); - if (flush == TDEFL_FULL_FLUSH) { - MZ_CLEAR_OBJ(d->m_hash); - MZ_CLEAR_OBJ(d->m_next); - d->m_dict_size = 0; - } - } - - return (d->m_prev_return_status = tdefl_flush_output_buffer(d)); -} - -tdefl_status tdefl_compress_buffer(tdefl_compressor *d, const void *pIn_buf, - size_t in_buf_size, tdefl_flush flush) { - MZ_ASSERT(d->m_pPut_buf_func); - return tdefl_compress(d, pIn_buf, &in_buf_size, NULL, NULL, flush); -} - -tdefl_status tdefl_init(tdefl_compressor *d, - tdefl_put_buf_func_ptr pPut_buf_func, - void *pPut_buf_user, int flags) { - d->m_pPut_buf_func = pPut_buf_func; - d->m_pPut_buf_user = pPut_buf_user; - d->m_flags = (mz_uint)(flags); - d->m_max_probes[0] = 1 + ((flags & 0xFFF) + 2) / 3; - d->m_greedy_parsing = (flags & TDEFL_GREEDY_PARSING_FLAG) != 0; - d->m_max_probes[1] = 1 + (((flags & 0xFFF) >> 2) + 2) / 3; - if (!(flags & TDEFL_NONDETERMINISTIC_PARSING_FLAG)) MZ_CLEAR_OBJ(d->m_hash); - d->m_lookahead_pos = d->m_lookahead_size = d->m_dict_size = - d->m_total_lz_bytes = d->m_lz_code_buf_dict_pos = d->m_bits_in = 0; - d->m_output_flush_ofs = d->m_output_flush_remaining = d->m_finished = - d->m_block_index = d->m_bit_buffer = d->m_wants_to_finish = 0; - d->m_pLZ_code_buf = d->m_lz_code_buf + 1; - d->m_pLZ_flags = d->m_lz_code_buf; - d->m_num_flags_left = 8; - d->m_pOutput_buf = d->m_output_buf; - d->m_pOutput_buf_end = d->m_output_buf; - d->m_prev_return_status = TDEFL_STATUS_OKAY; - d->m_saved_match_dist = d->m_saved_match_len = d->m_saved_lit = 0; - d->m_adler32 = 1; - d->m_pIn_buf = NULL; - d->m_pOut_buf = NULL; - d->m_pIn_buf_size = NULL; - d->m_pOut_buf_size = NULL; - d->m_flush = TDEFL_NO_FLUSH; - d->m_pSrc = NULL; - d->m_src_buf_left = 0; - d->m_out_buf_ofs = 0; - memset(&d->m_huff_count[0][0], 0, - sizeof(d->m_huff_count[0][0]) * TDEFL_MAX_HUFF_SYMBOLS_0); - memset(&d->m_huff_count[1][0], 0, - sizeof(d->m_huff_count[1][0]) * TDEFL_MAX_HUFF_SYMBOLS_1); - return TDEFL_STATUS_OKAY; -} - -tdefl_status tdefl_get_prev_return_status(tdefl_compressor *d) { - return d->m_prev_return_status; -} - -mz_uint32 tdefl_get_adler32(tdefl_compressor *d) { return d->m_adler32; } - -mz_bool tdefl_compress_mem_to_output(const void *pBuf, size_t buf_len, - tdefl_put_buf_func_ptr pPut_buf_func, - void *pPut_buf_user, int flags) { - tdefl_compressor *pComp; - mz_bool succeeded; - if (((buf_len) && (!pBuf)) || (!pPut_buf_func)) return MZ_FALSE; - pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); - if (!pComp) return MZ_FALSE; - succeeded = (tdefl_init(pComp, pPut_buf_func, pPut_buf_user, flags) == - TDEFL_STATUS_OKAY); - succeeded = - succeeded && (tdefl_compress_buffer(pComp, pBuf, buf_len, TDEFL_FINISH) == - TDEFL_STATUS_DONE); - MZ_FREE(pComp); - return succeeded; -} - -typedef struct { - size_t m_size, m_capacity; - mz_uint8 *m_pBuf; - mz_bool m_expandable; -} tdefl_output_buffer; - -static mz_bool tdefl_output_buffer_putter(const void *pBuf, int len, - void *pUser) { - tdefl_output_buffer *p = (tdefl_output_buffer *)pUser; - size_t new_size = p->m_size + len; - if (new_size > p->m_capacity) { - size_t new_capacity = p->m_capacity; - mz_uint8 *pNew_buf; - if (!p->m_expandable) return MZ_FALSE; - do { - new_capacity = MZ_MAX(128U, new_capacity << 1U); - } while (new_size > new_capacity); - pNew_buf = (mz_uint8 *)MZ_REALLOC(p->m_pBuf, new_capacity); - if (!pNew_buf) return MZ_FALSE; - p->m_pBuf = pNew_buf; - p->m_capacity = new_capacity; - } - memcpy((mz_uint8 *)p->m_pBuf + p->m_size, pBuf, len); - p->m_size = new_size; - return MZ_TRUE; -} - -void *tdefl_compress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, - size_t *pOut_len, int flags) { - tdefl_output_buffer out_buf; - MZ_CLEAR_OBJ(out_buf); - if (!pOut_len) - return MZ_FALSE; - else - *pOut_len = 0; - out_buf.m_expandable = MZ_TRUE; - if (!tdefl_compress_mem_to_output( - pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) - return NULL; - *pOut_len = out_buf.m_size; - return out_buf.m_pBuf; -} - -size_t tdefl_compress_mem_to_mem(void *pOut_buf, size_t out_buf_len, - const void *pSrc_buf, size_t src_buf_len, - int flags) { - tdefl_output_buffer out_buf; - MZ_CLEAR_OBJ(out_buf); - if (!pOut_buf) return 0; - out_buf.m_pBuf = (mz_uint8 *)pOut_buf; - out_buf.m_capacity = out_buf_len; - if (!tdefl_compress_mem_to_output( - pSrc_buf, src_buf_len, tdefl_output_buffer_putter, &out_buf, flags)) - return 0; - return out_buf.m_size; -} - -#ifndef MINIZ_NO_ZLIB_APIS -static const mz_uint s_tdefl_num_probes[11] = {0, 1, 6, 32, 16, 32, - 128, 256, 512, 768, 1500}; - -// level may actually range from [0,10] (10 is a "hidden" max level, where we -// want a bit more compression and it's fine if throughput to fall off a cliff -// on some files). -mz_uint tdefl_create_comp_flags_from_zip_params(int level, int window_bits, - int strategy) { - mz_uint comp_flags = - s_tdefl_num_probes[(level >= 0) ? MZ_MIN(10, level) : MZ_DEFAULT_LEVEL] | - ((level <= 3) ? TDEFL_GREEDY_PARSING_FLAG : 0); - if (window_bits > 0) comp_flags |= TDEFL_WRITE_ZLIB_HEADER; - - if (!level) - comp_flags |= TDEFL_FORCE_ALL_RAW_BLOCKS; - else if (strategy == MZ_FILTERED) - comp_flags |= TDEFL_FILTER_MATCHES; - else if (strategy == MZ_HUFFMAN_ONLY) - comp_flags &= ~TDEFL_MAX_PROBES_MASK; - else if (strategy == MZ_FIXED) - comp_flags |= TDEFL_FORCE_ALL_STATIC_BLOCKS; - else if (strategy == MZ_RLE) - comp_flags |= TDEFL_RLE_MATCHES; - - return comp_flags; -} -#endif // MINIZ_NO_ZLIB_APIS - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4204) // nonstandard extension used : non-constant - // aggregate initializer (also supported by GNU - // C and C99, so no big deal) -#pragma warning(disable : 4244) // 'initializing': conversion from '__int64' to - // 'int', possible loss of data -#pragma warning( \ - disable : 4267) // 'argument': conversion from '__int64' to 'int', - // possible loss of data -#pragma warning(disable : 4996) // 'strdup': The POSIX name for this item is - // deprecated. Instead, use the ISO C and C++ - // conformant name: _strdup. -#endif - -// Simple PNG writer function by Alex Evans, 2011. Released into the public -// domain: https://gist.github.com/908299, more context at -// http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/. -// This is actually a modification of Alex's original code so PNG files -// generated by this function pass pngcheck. -void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, - int h, int num_chans, - size_t *pLen_out, - mz_uint level, mz_bool flip) { - // Using a local copy of this array here in case MINIZ_NO_ZLIB_APIS was - // defined. - static const mz_uint s_tdefl_png_num_probes[11] = { - 0, 1, 6, 32, 16, 32, 128, 256, 512, 768, 1500}; - tdefl_compressor *pComp = - (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); - tdefl_output_buffer out_buf; - int i, bpl = w * num_chans, y, z; - mz_uint32 c; - *pLen_out = 0; - if (!pComp) return NULL; - MZ_CLEAR_OBJ(out_buf); - out_buf.m_expandable = MZ_TRUE; - out_buf.m_capacity = 57 + MZ_MAX(64, (1 + bpl) * h); - if (NULL == (out_buf.m_pBuf = (mz_uint8 *)MZ_MALLOC(out_buf.m_capacity))) { - MZ_FREE(pComp); - return NULL; - } - // write dummy header - for (z = 41; z; --z) tdefl_output_buffer_putter(&z, 1, &out_buf); - // compress image data - tdefl_init( - pComp, tdefl_output_buffer_putter, &out_buf, - s_tdefl_png_num_probes[MZ_MIN(10, level)] | TDEFL_WRITE_ZLIB_HEADER); - for (y = 0; y < h; ++y) { - tdefl_compress_buffer(pComp, &z, 1, TDEFL_NO_FLUSH); - tdefl_compress_buffer(pComp, - (mz_uint8 *)pImage + (flip ? (h - 1 - y) : y) * bpl, - bpl, TDEFL_NO_FLUSH); - } - if (tdefl_compress_buffer(pComp, NULL, 0, TDEFL_FINISH) != - TDEFL_STATUS_DONE) { - MZ_FREE(pComp); - MZ_FREE(out_buf.m_pBuf); - return NULL; - } - // write real header - *pLen_out = out_buf.m_size - 41; - { - static const mz_uint8 chans[] = {0x00, 0x00, 0x04, 0x02, 0x06}; - mz_uint8 pnghdr[41] = {0x89, - 0x50, - 0x4e, - 0x47, - 0x0d, - 0x0a, - 0x1a, - 0x0a, - 0x00, - 0x00, - 0x00, - 0x0d, - 0x49, - 0x48, - 0x44, - 0x52, - 0, - 0, - (mz_uint8)(w >> 8), - (mz_uint8)w, - 0, - 0, - (mz_uint8)(h >> 8), - (mz_uint8)h, - 8, - chans[num_chans], - 0, - 0, - 0, - 0, - 0, - 0, - 0, - (mz_uint8)(*pLen_out >> 24), - (mz_uint8)(*pLen_out >> 16), - (mz_uint8)(*pLen_out >> 8), - (mz_uint8)*pLen_out, - 0x49, - 0x44, - 0x41, - 0x54}; - c = (mz_uint32)mz_crc32(MZ_CRC32_INIT, pnghdr + 12, 17); - for (i = 0; i < 4; ++i, c <<= 8) - ((mz_uint8 *)(pnghdr + 29))[i] = (mz_uint8)(c >> 24); - memcpy(out_buf.m_pBuf, pnghdr, 41); - } - // write footer (IDAT CRC-32, followed by IEND chunk) - if (!tdefl_output_buffer_putter( - "\0\0\0\0\0\0\0\0\x49\x45\x4e\x44\xae\x42\x60\x82", 16, &out_buf)) { - *pLen_out = 0; - MZ_FREE(pComp); - MZ_FREE(out_buf.m_pBuf); - return NULL; - } - c = (mz_uint32)mz_crc32(MZ_CRC32_INIT, out_buf.m_pBuf + 41 - 4, - *pLen_out + 4); - for (i = 0; i < 4; ++i, c <<= 8) - (out_buf.m_pBuf + out_buf.m_size - 16)[i] = (mz_uint8)(c >> 24); - // compute final size of file, grab compressed data buffer and return - *pLen_out += 57; - MZ_FREE(pComp); - return out_buf.m_pBuf; -} -void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, - int num_chans, size_t *pLen_out) { - // Level 6 corresponds to TDEFL_DEFAULT_MAX_PROBES or MZ_DEFAULT_LEVEL (but we - // can't depend on MZ_DEFAULT_LEVEL being available in case the zlib API's - // where #defined out) - return tdefl_write_image_to_png_file_in_memory_ex(pImage, w, h, num_chans, - pLen_out, 6, MZ_FALSE); -} - -// ------------------- .ZIP archive reading - -#ifndef MINIZ_NO_ARCHIVE_APIS - -#ifdef MINIZ_NO_STDIO -#define MZ_FILE void * -#else -#include -#include - -#if defined(_MSC_VER) || defined(__MINGW64__) -static FILE *mz_fopen(const char *pFilename, const char *pMode) { - FILE *pFile = NULL; - fopen_s(&pFile, pFilename, pMode); - return pFile; -} -static FILE *mz_freopen(const char *pPath, const char *pMode, FILE *pStream) { - FILE *pFile = NULL; - if (freopen_s(&pFile, pPath, pMode, pStream)) return NULL; - return pFile; -} -#ifndef MINIZ_NO_TIME -#include -#endif -#define MZ_FILE FILE -#define MZ_FOPEN mz_fopen -#define MZ_FCLOSE fclose -#define MZ_FREAD fread -#define MZ_FWRITE fwrite -#define MZ_FTELL64 _ftelli64 -#define MZ_FSEEK64 _fseeki64 -#define MZ_FILE_STAT_STRUCT _stat -#define MZ_FILE_STAT _stat -#define MZ_FFLUSH fflush -#define MZ_FREOPEN mz_freopen -#define MZ_DELETE_FILE remove -#elif defined(__MINGW32__) -#ifndef MINIZ_NO_TIME -#include -#endif -#define MZ_FILE FILE -#define MZ_FOPEN(f, m) fopen(f, m) -#define MZ_FCLOSE fclose -#define MZ_FREAD fread -#define MZ_FWRITE fwrite -#define MZ_FTELL64 ftello64 -#define MZ_FSEEK64 fseeko64 -#define MZ_FILE_STAT_STRUCT _stat -#define MZ_FILE_STAT _stat -#define MZ_FFLUSH fflush -#define MZ_FREOPEN(f, m, s) freopen(f, m, s) -#define MZ_DELETE_FILE remove -#elif defined(__TINYC__) -#ifndef MINIZ_NO_TIME -#include -#endif -#define MZ_FILE FILE -#define MZ_FOPEN(f, m) fopen(f, m) -#define MZ_FCLOSE fclose -#define MZ_FREAD fread -#define MZ_FWRITE fwrite -#define MZ_FTELL64 ftell -#define MZ_FSEEK64 fseek -#define MZ_FILE_STAT_STRUCT stat -#define MZ_FILE_STAT stat -#define MZ_FFLUSH fflush -#define MZ_FREOPEN(f, m, s) freopen(f, m, s) -#define MZ_DELETE_FILE remove -#elif defined(__GNUC__) && defined(_LARGEFILE64_SOURCE) && _LARGEFILE64_SOURCE -#ifndef MINIZ_NO_TIME -#include -#endif -#define MZ_FILE FILE -#define MZ_FOPEN(f, m) fopen64(f, m) -#define MZ_FCLOSE fclose -#define MZ_FREAD fread -#define MZ_FWRITE fwrite -#define MZ_FTELL64 ftello64 -#define MZ_FSEEK64 fseeko64 -#define MZ_FILE_STAT_STRUCT stat64 -#define MZ_FILE_STAT stat64 -#define MZ_FFLUSH fflush -#define MZ_FREOPEN(p, m, s) freopen64(p, m, s) -#define MZ_DELETE_FILE remove -#else -#ifndef MINIZ_NO_TIME -#include -#endif -#define MZ_FILE FILE -#define MZ_FOPEN(f, m) fopen(f, m) -#define MZ_FCLOSE fclose -#define MZ_FREAD fread -#define MZ_FWRITE fwrite -#define MZ_FTELL64 ftello -#define MZ_FSEEK64 fseeko -#define MZ_FILE_STAT_STRUCT stat -#define MZ_FILE_STAT stat -#define MZ_FFLUSH fflush -#define MZ_FREOPEN(f, m, s) freopen(f, m, s) -#define MZ_DELETE_FILE remove -#endif // #ifdef _MSC_VER -#endif // #ifdef MINIZ_NO_STDIO - -#define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c)) - -// Various ZIP archive enums. To completely avoid cross platform compiler -// alignment and platform endian issues, miniz.c doesn't use structs for any of -// this stuff. -enum { - // ZIP archive identifiers and record sizes - MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG = 0x06054b50, - MZ_ZIP_CENTRAL_DIR_HEADER_SIG = 0x02014b50, - MZ_ZIP_LOCAL_DIR_HEADER_SIG = 0x04034b50, - MZ_ZIP_LOCAL_DIR_HEADER_SIZE = 30, - MZ_ZIP_CENTRAL_DIR_HEADER_SIZE = 46, - MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE = 22, - // Central directory header record offsets - MZ_ZIP_CDH_SIG_OFS = 0, - MZ_ZIP_CDH_VERSION_MADE_BY_OFS = 4, - MZ_ZIP_CDH_VERSION_NEEDED_OFS = 6, - MZ_ZIP_CDH_BIT_FLAG_OFS = 8, - MZ_ZIP_CDH_METHOD_OFS = 10, - MZ_ZIP_CDH_FILE_TIME_OFS = 12, - MZ_ZIP_CDH_FILE_DATE_OFS = 14, - MZ_ZIP_CDH_CRC32_OFS = 16, - MZ_ZIP_CDH_COMPRESSED_SIZE_OFS = 20, - MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS = 24, - MZ_ZIP_CDH_FILENAME_LEN_OFS = 28, - MZ_ZIP_CDH_EXTRA_LEN_OFS = 30, - MZ_ZIP_CDH_COMMENT_LEN_OFS = 32, - MZ_ZIP_CDH_DISK_START_OFS = 34, - MZ_ZIP_CDH_INTERNAL_ATTR_OFS = 36, - MZ_ZIP_CDH_EXTERNAL_ATTR_OFS = 38, - MZ_ZIP_CDH_LOCAL_HEADER_OFS = 42, - // Local directory header offsets - MZ_ZIP_LDH_SIG_OFS = 0, - MZ_ZIP_LDH_VERSION_NEEDED_OFS = 4, - MZ_ZIP_LDH_BIT_FLAG_OFS = 6, - MZ_ZIP_LDH_METHOD_OFS = 8, - MZ_ZIP_LDH_FILE_TIME_OFS = 10, - MZ_ZIP_LDH_FILE_DATE_OFS = 12, - MZ_ZIP_LDH_CRC32_OFS = 14, - MZ_ZIP_LDH_COMPRESSED_SIZE_OFS = 18, - MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS = 22, - MZ_ZIP_LDH_FILENAME_LEN_OFS = 26, - MZ_ZIP_LDH_EXTRA_LEN_OFS = 28, - // End of central directory offsets - MZ_ZIP_ECDH_SIG_OFS = 0, - MZ_ZIP_ECDH_NUM_THIS_DISK_OFS = 4, - MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS = 6, - MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS = 8, - MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS = 10, - MZ_ZIP_ECDH_CDIR_SIZE_OFS = 12, - MZ_ZIP_ECDH_CDIR_OFS_OFS = 16, - MZ_ZIP_ECDH_COMMENT_SIZE_OFS = 20, -}; - -typedef struct { - void *m_p; - size_t m_size, m_capacity; - mz_uint m_element_size; -} mz_zip_array; - -struct mz_zip_internal_state_tag { - mz_zip_array m_central_dir; - mz_zip_array m_central_dir_offsets; - mz_zip_array m_sorted_central_dir_offsets; - MZ_FILE *m_pFile; - void *m_pMem; - size_t m_mem_size; - size_t m_mem_capacity; -}; - -#define MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(array_ptr, element_size) \ - (array_ptr)->m_element_size = element_size -#define MZ_ZIP_ARRAY_ELEMENT(array_ptr, element_type, index) \ - ((element_type *)((array_ptr)->m_p))[index] - -static MZ_FORCEINLINE void mz_zip_array_clear(mz_zip_archive *pZip, - mz_zip_array *pArray) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pArray->m_p); - memset(pArray, 0, sizeof(mz_zip_array)); -} - -static mz_bool mz_zip_array_ensure_capacity(mz_zip_archive *pZip, - mz_zip_array *pArray, - size_t min_new_capacity, - mz_uint growing) { - void *pNew_p; - size_t new_capacity = min_new_capacity; - MZ_ASSERT(pArray->m_element_size); - if (pArray->m_capacity >= min_new_capacity) return MZ_TRUE; - if (growing) { - new_capacity = MZ_MAX(1, pArray->m_capacity); - while (new_capacity < min_new_capacity) new_capacity *= 2; - } - if (NULL == (pNew_p = pZip->m_pRealloc(pZip->m_pAlloc_opaque, pArray->m_p, - pArray->m_element_size, new_capacity))) - return MZ_FALSE; - pArray->m_p = pNew_p; - pArray->m_capacity = new_capacity; - return MZ_TRUE; -} - -static MZ_FORCEINLINE mz_bool mz_zip_array_reserve(mz_zip_archive *pZip, - mz_zip_array *pArray, - size_t new_capacity, - mz_uint growing) { - if (new_capacity > pArray->m_capacity) { - if (!mz_zip_array_ensure_capacity(pZip, pArray, new_capacity, growing)) - return MZ_FALSE; - } - return MZ_TRUE; -} - -static MZ_FORCEINLINE mz_bool mz_zip_array_resize(mz_zip_archive *pZip, - mz_zip_array *pArray, - size_t new_size, - mz_uint growing) { - if (new_size > pArray->m_capacity) { - if (!mz_zip_array_ensure_capacity(pZip, pArray, new_size, growing)) - return MZ_FALSE; - } - pArray->m_size = new_size; - return MZ_TRUE; -} - -static MZ_FORCEINLINE mz_bool mz_zip_array_ensure_room(mz_zip_archive *pZip, - mz_zip_array *pArray, - size_t n) { - return mz_zip_array_reserve(pZip, pArray, pArray->m_size + n, MZ_TRUE); -} - -static MZ_FORCEINLINE mz_bool mz_zip_array_push_back(mz_zip_archive *pZip, - mz_zip_array *pArray, - const void *pElements, - size_t n) { - size_t orig_size = pArray->m_size; - if (!mz_zip_array_resize(pZip, pArray, orig_size + n, MZ_TRUE)) - return MZ_FALSE; - memcpy((mz_uint8 *)pArray->m_p + orig_size * pArray->m_element_size, - pElements, n * pArray->m_element_size); - return MZ_TRUE; -} - -#ifndef MINIZ_NO_TIME -static time_t mz_zip_dos_to_time_t(int dos_time, int dos_date) { - struct tm tm; - memset(&tm, 0, sizeof(tm)); - tm.tm_isdst = -1; - tm.tm_year = ((dos_date >> 9) & 127) + 1980 - 1900; - tm.tm_mon = ((dos_date >> 5) & 15) - 1; - tm.tm_mday = dos_date & 31; - tm.tm_hour = (dos_time >> 11) & 31; - tm.tm_min = (dos_time >> 5) & 63; - tm.tm_sec = (dos_time << 1) & 62; - return mktime(&tm); -} - -static void mz_zip_time_to_dos_time(time_t time, mz_uint16 *pDOS_time, - mz_uint16 *pDOS_date) { -#ifdef _MSC_VER - struct tm tm_struct; - struct tm *tm = &tm_struct; - errno_t err = localtime_s(tm, &time); - if (err) { - *pDOS_date = 0; - *pDOS_time = 0; - return; - } -#else - struct tm *tm = localtime(&time); -#endif - *pDOS_time = (mz_uint16)(((tm->tm_hour) << 11) + ((tm->tm_min) << 5) + - ((tm->tm_sec) >> 1)); - *pDOS_date = (mz_uint16)(((tm->tm_year + 1900 - 1980) << 9) + - ((tm->tm_mon + 1) << 5) + tm->tm_mday); -} -#endif - -#ifndef MINIZ_NO_STDIO -static mz_bool mz_zip_get_file_modified_time(const char *pFilename, - mz_uint16 *pDOS_time, - mz_uint16 *pDOS_date) { -#ifdef MINIZ_NO_TIME - (void)pFilename; - *pDOS_date = *pDOS_time = 0; -#else - struct MZ_FILE_STAT_STRUCT file_stat; - // On Linux with x86 glibc, this call will fail on large files (>= 0x80000000 - // bytes) unless you compiled with _LARGEFILE64_SOURCE. Argh. - if (MZ_FILE_STAT(pFilename, &file_stat) != 0) return MZ_FALSE; - mz_zip_time_to_dos_time(file_stat.st_mtime, pDOS_time, pDOS_date); -#endif // #ifdef MINIZ_NO_TIME - return MZ_TRUE; -} - -#ifndef MINIZ_NO_TIME -static mz_bool mz_zip_set_file_times(const char *pFilename, time_t access_time, - time_t modified_time) { - struct utimbuf t; - t.actime = access_time; - t.modtime = modified_time; - return !utime(pFilename, &t); -} -#endif // #ifndef MINIZ_NO_TIME -#endif // #ifndef MINIZ_NO_STDIO - -static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, - mz_uint32 flags) { - (void)flags; - if ((!pZip) || (pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID)) - return MZ_FALSE; - - if (!pZip->m_pAlloc) pZip->m_pAlloc = def_alloc_func; - if (!pZip->m_pFree) pZip->m_pFree = def_free_func; - if (!pZip->m_pRealloc) pZip->m_pRealloc = def_realloc_func; - - pZip->m_zip_mode = MZ_ZIP_MODE_READING; - pZip->m_archive_size = 0; - pZip->m_central_directory_file_ofs = 0; - pZip->m_total_files = 0; - - if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc( - pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state)))) - return MZ_FALSE; - memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state)); - MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, - sizeof(mz_uint8)); - MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, - sizeof(mz_uint32)); - MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, - sizeof(mz_uint32)); - return MZ_TRUE; -} - -static MZ_FORCEINLINE mz_bool -mz_zip_reader_filename_less(const mz_zip_array *pCentral_dir_array, - const mz_zip_array *pCentral_dir_offsets, - mz_uint l_index, mz_uint r_index) { - const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT( - pCentral_dir_array, mz_uint8, - MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, - l_index)), - *pE; - const mz_uint8 *pR = &MZ_ZIP_ARRAY_ELEMENT( - pCentral_dir_array, mz_uint8, - MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, r_index)); - mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS), - r_len = MZ_READ_LE16(pR + MZ_ZIP_CDH_FILENAME_LEN_OFS); - mz_uint8 l = 0, r = 0; - pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; - pR += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; - pE = pL + MZ_MIN(l_len, r_len); - while (pL < pE) { - if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR))) break; - pL++; - pR++; - } - return (pL == pE) ? (l_len < r_len) : (l < r); -} - -#define MZ_SWAP_UINT32(a, b) \ - do { \ - mz_uint32 t = a; \ - a = b; \ - b = t; \ - } \ - MZ_MACRO_END - -// Heap sort of lowercased filenames, used to help accelerate plain central -// directory searches by mz_zip_reader_locate_file(). (Could also use qsort(), -// but it could allocate memory.) -static void mz_zip_reader_sort_central_dir_offsets_by_filename( - mz_zip_archive *pZip) { - mz_zip_internal_state *pState = pZip->m_pState; - const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets; - const mz_zip_array *pCentral_dir = &pState->m_central_dir; - mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT( - &pState->m_sorted_central_dir_offsets, mz_uint32, 0); - const int size = pZip->m_total_files; - int start = (size - 2) >> 1, end; - while (start >= 0) { - int child, root = start; - for (;;) { - if ((child = (root << 1) + 1) >= size) break; - child += - (((child + 1) < size) && - (mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, - pIndices[child], pIndices[child + 1]))); - if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, - pIndices[root], pIndices[child])) - break; - MZ_SWAP_UINT32(pIndices[root], pIndices[child]); - root = child; - } - start--; - } - - end = size - 1; - while (end > 0) { - int child, root = 0; - MZ_SWAP_UINT32(pIndices[end], pIndices[0]); - for (;;) { - if ((child = (root << 1) + 1) >= end) break; - child += - (((child + 1) < end) && - mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, - pIndices[child], pIndices[child + 1])); - if (!mz_zip_reader_filename_less(pCentral_dir, pCentral_dir_offsets, - pIndices[root], pIndices[child])) - break; - MZ_SWAP_UINT32(pIndices[root], pIndices[child]); - root = child; - } - end--; - } -} - -static mz_bool mz_zip_reader_read_central_dir(mz_zip_archive *pZip, - mz_uint32 flags) { - mz_uint cdir_size, num_this_disk, cdir_disk_index; - mz_uint64 cdir_ofs; - mz_int64 cur_file_ofs; - const mz_uint8 *p; - mz_uint32 buf_u32[4096 / sizeof(mz_uint32)]; - mz_uint8 *pBuf = (mz_uint8 *)buf_u32; - mz_bool sort_central_dir = - ((flags & MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY) == 0); - // Basic sanity checks - reject files which are too small, and check the first - // 4 bytes of the file to make sure a local header is there. - if (pZip->m_archive_size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) - return MZ_FALSE; - // Find the end of central directory record by scanning the file from the end - // towards the beginning. - cur_file_ofs = - MZ_MAX((mz_int64)pZip->m_archive_size - (mz_int64)sizeof(buf_u32), 0); - for (;;) { - int i, - n = (int)MZ_MIN(sizeof(buf_u32), pZip->m_archive_size - cur_file_ofs); - if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, n) != (mz_uint)n) - return MZ_FALSE; - for (i = n - 4; i >= 0; --i) - if (MZ_READ_LE32(pBuf + i) == MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) break; - if (i >= 0) { - cur_file_ofs += i; - break; - } - if ((!cur_file_ofs) || ((pZip->m_archive_size - cur_file_ofs) >= - (0xFFFF + MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE))) - return MZ_FALSE; - cur_file_ofs = MZ_MAX(cur_file_ofs - (sizeof(buf_u32) - 3), 0); - } - // Read and verify the end of central directory record. - if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, - MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) != - MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) - return MZ_FALSE; - if ((MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_SIG_OFS) != - MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG) || - ((pZip->m_total_files = - MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS)) != - MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS))) - return MZ_FALSE; - - num_this_disk = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_THIS_DISK_OFS); - cdir_disk_index = MZ_READ_LE16(pBuf + MZ_ZIP_ECDH_NUM_DISK_CDIR_OFS); - if (((num_this_disk | cdir_disk_index) != 0) && - ((num_this_disk != 1) || (cdir_disk_index != 1))) - return MZ_FALSE; - - if ((cdir_size = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_SIZE_OFS)) < - pZip->m_total_files * MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) - return MZ_FALSE; - - cdir_ofs = MZ_READ_LE32(pBuf + MZ_ZIP_ECDH_CDIR_OFS_OFS); - if ((cdir_ofs + (mz_uint64)cdir_size) > pZip->m_archive_size) return MZ_FALSE; - - pZip->m_central_directory_file_ofs = cdir_ofs; - - if (pZip->m_total_files) { - mz_uint i, n; - - // Read the entire central directory into a heap block, and allocate another - // heap block to hold the unsorted central dir file record offsets, and - // another to hold the sorted indices. - if ((!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir, cdir_size, - MZ_FALSE)) || - (!mz_zip_array_resize(pZip, &pZip->m_pState->m_central_dir_offsets, - pZip->m_total_files, MZ_FALSE))) - return MZ_FALSE; - - if (sort_central_dir) { - if (!mz_zip_array_resize(pZip, - &pZip->m_pState->m_sorted_central_dir_offsets, - pZip->m_total_files, MZ_FALSE)) - return MZ_FALSE; - } - - if (pZip->m_pRead(pZip->m_pIO_opaque, cdir_ofs, - pZip->m_pState->m_central_dir.m_p, - cdir_size) != cdir_size) - return MZ_FALSE; - - // Now create an index into the central directory file records, do some - // basic sanity checking on each record, and check for zip64 entries (which - // are not yet supported). - p = (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p; - for (n = cdir_size, i = 0; i < pZip->m_total_files; ++i) { - mz_uint total_header_size, comp_size, decomp_size, disk_index; - if ((n < MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) || - (MZ_READ_LE32(p) != MZ_ZIP_CENTRAL_DIR_HEADER_SIG)) - return MZ_FALSE; - MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, - i) = - (mz_uint32)(p - (const mz_uint8 *)pZip->m_pState->m_central_dir.m_p); - if (sort_central_dir) - MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_sorted_central_dir_offsets, - mz_uint32, i) = i; - comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); - decomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS); - if (((!MZ_READ_LE32(p + MZ_ZIP_CDH_METHOD_OFS)) && - (decomp_size != comp_size)) || - (decomp_size && !comp_size) || (decomp_size == 0xFFFFFFFF) || - (comp_size == 0xFFFFFFFF)) - return MZ_FALSE; - disk_index = MZ_READ_LE16(p + MZ_ZIP_CDH_DISK_START_OFS); - if ((disk_index != num_this_disk) && (disk_index != 1)) return MZ_FALSE; - if (((mz_uint64)MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS) + - MZ_ZIP_LOCAL_DIR_HEADER_SIZE + comp_size) > pZip->m_archive_size) - return MZ_FALSE; - if ((total_header_size = MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + - MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + - MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS) + - MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS)) > - n) - return MZ_FALSE; - n -= total_header_size; - p += total_header_size; - } - } - - if (sort_central_dir) - mz_zip_reader_sort_central_dir_offsets_by_filename(pZip); - - return MZ_TRUE; -} - -mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, - mz_uint32 flags) { - if ((!pZip) || (!pZip->m_pRead)) return MZ_FALSE; - if (!mz_zip_reader_init_internal(pZip, flags)) return MZ_FALSE; - pZip->m_archive_size = size; - if (!mz_zip_reader_read_central_dir(pZip, flags)) { - mz_zip_reader_end(pZip); - return MZ_FALSE; - } - return MZ_TRUE; -} - -static size_t mz_zip_mem_read_func(void *pOpaque, mz_uint64 file_ofs, - void *pBuf, size_t n) { - mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; - size_t s = (file_ofs >= pZip->m_archive_size) - ? 0 - : (size_t)MZ_MIN(pZip->m_archive_size - file_ofs, n); - memcpy(pBuf, (const mz_uint8 *)pZip->m_pState->m_pMem + file_ofs, s); - return s; -} - -mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, - size_t size, mz_uint32 flags) { - if (!mz_zip_reader_init_internal(pZip, flags)) return MZ_FALSE; - pZip->m_archive_size = size; - pZip->m_pRead = mz_zip_mem_read_func; - pZip->m_pIO_opaque = pZip; -#ifdef __cplusplus - pZip->m_pState->m_pMem = const_cast(pMem); -#else - pZip->m_pState->m_pMem = (void *)pMem; -#endif - pZip->m_pState->m_mem_size = size; - if (!mz_zip_reader_read_central_dir(pZip, flags)) { - mz_zip_reader_end(pZip); - return MZ_FALSE; - } - return MZ_TRUE; -} - -#ifndef MINIZ_NO_STDIO -static size_t mz_zip_file_read_func(void *pOpaque, mz_uint64 file_ofs, - void *pBuf, size_t n) { - mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; - mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile); - if (((mz_int64)file_ofs < 0) || - (((cur_ofs != (mz_int64)file_ofs)) && - (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET)))) - return 0; - return MZ_FREAD(pBuf, 1, n, pZip->m_pState->m_pFile); -} - -mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, - mz_uint32 flags) { - mz_uint64 file_size; - MZ_FILE *pFile = MZ_FOPEN(pFilename, "rb"); - if (!pFile) return MZ_FALSE; - if (MZ_FSEEK64(pFile, 0, SEEK_END)) { - MZ_FCLOSE(pFile); - return MZ_FALSE; - } - file_size = MZ_FTELL64(pFile); - if (!mz_zip_reader_init_internal(pZip, flags)) { - MZ_FCLOSE(pFile); - return MZ_FALSE; - } - pZip->m_pRead = mz_zip_file_read_func; - pZip->m_pIO_opaque = pZip; - pZip->m_pState->m_pFile = pFile; - pZip->m_archive_size = file_size; - if (!mz_zip_reader_read_central_dir(pZip, flags)) { - mz_zip_reader_end(pZip); - return MZ_FALSE; - } - return MZ_TRUE; -} -#endif // #ifndef MINIZ_NO_STDIO - -mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip) { - return pZip ? pZip->m_total_files : 0; -} - -static MZ_FORCEINLINE const mz_uint8 *mz_zip_reader_get_cdh( - mz_zip_archive *pZip, mz_uint file_index) { - if ((!pZip) || (!pZip->m_pState) || (file_index >= pZip->m_total_files) || - (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) - return NULL; - return &MZ_ZIP_ARRAY_ELEMENT( - &pZip->m_pState->m_central_dir, mz_uint8, - MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, - file_index)); -} - -mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, - mz_uint file_index) { - mz_uint m_bit_flag; - const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); - if (!p) return MZ_FALSE; - m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); - return (m_bit_flag & 1); -} - -mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, - mz_uint file_index) { - mz_uint filename_len, external_attr; - const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); - if (!p) return MZ_FALSE; - - // First see if the filename ends with a '/' character. - filename_len = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); - if (filename_len) { - if (*(p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_len - 1) == '/') - return MZ_TRUE; - } - - // Bugfix: This code was also checking if the internal attribute was non-zero, - // which wasn't correct. - // Most/all zip writers (hopefully) set DOS file/directory attributes in the - // low 16-bits, so check for the DOS directory flag and ignore the source OS - // ID in the created by field. - // FIXME: Remove this check? Is it necessary - we already check the filename. - external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS); - if ((external_attr & 0x10) != 0) return MZ_TRUE; - - return MZ_FALSE; -} - -mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, - mz_zip_archive_file_stat *pStat) { - mz_uint n; - const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); - if ((!p) || (!pStat)) return MZ_FALSE; - - // Unpack the central directory record. - pStat->m_file_index = file_index; - pStat->m_central_dir_ofs = MZ_ZIP_ARRAY_ELEMENT( - &pZip->m_pState->m_central_dir_offsets, mz_uint32, file_index); - pStat->m_version_made_by = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_MADE_BY_OFS); - pStat->m_version_needed = MZ_READ_LE16(p + MZ_ZIP_CDH_VERSION_NEEDED_OFS); - pStat->m_bit_flag = MZ_READ_LE16(p + MZ_ZIP_CDH_BIT_FLAG_OFS); - pStat->m_method = MZ_READ_LE16(p + MZ_ZIP_CDH_METHOD_OFS); -#ifndef MINIZ_NO_TIME - pStat->m_time = - mz_zip_dos_to_time_t(MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_TIME_OFS), - MZ_READ_LE16(p + MZ_ZIP_CDH_FILE_DATE_OFS)); -#endif - pStat->m_crc32 = MZ_READ_LE32(p + MZ_ZIP_CDH_CRC32_OFS); - pStat->m_comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); - pStat->m_uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS); - pStat->m_internal_attr = MZ_READ_LE16(p + MZ_ZIP_CDH_INTERNAL_ATTR_OFS); - pStat->m_external_attr = MZ_READ_LE32(p + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS); - pStat->m_local_header_ofs = MZ_READ_LE32(p + MZ_ZIP_CDH_LOCAL_HEADER_OFS); - - // Copy as much of the filename and comment as possible. - n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); - n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE - 1); - memcpy(pStat->m_filename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); - pStat->m_filename[n] = '\0'; - - n = MZ_READ_LE16(p + MZ_ZIP_CDH_COMMENT_LEN_OFS); - n = MZ_MIN(n, MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE - 1); - pStat->m_comment_size = n; - memcpy(pStat->m_comment, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + - MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS) + - MZ_READ_LE16(p + MZ_ZIP_CDH_EXTRA_LEN_OFS), - n); - pStat->m_comment[n] = '\0'; - - return MZ_TRUE; -} - -mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, - char *pFilename, mz_uint filename_buf_size) { - mz_uint n; - const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); - if (!p) { - if (filename_buf_size) pFilename[0] = '\0'; - return 0; - } - n = MZ_READ_LE16(p + MZ_ZIP_CDH_FILENAME_LEN_OFS); - if (filename_buf_size) { - n = MZ_MIN(n, filename_buf_size - 1); - memcpy(pFilename, p + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n); - pFilename[n] = '\0'; - } - return n + 1; -} - -static MZ_FORCEINLINE mz_bool mz_zip_reader_string_equal(const char *pA, - const char *pB, - mz_uint len, - mz_uint flags) { - mz_uint i; - if (flags & MZ_ZIP_FLAG_CASE_SENSITIVE) return 0 == memcmp(pA, pB, len); - for (i = 0; i < len; ++i) - if (MZ_TOLOWER(pA[i]) != MZ_TOLOWER(pB[i])) return MZ_FALSE; - return MZ_TRUE; -} - -static MZ_FORCEINLINE int mz_zip_reader_filename_compare( - const mz_zip_array *pCentral_dir_array, - const mz_zip_array *pCentral_dir_offsets, mz_uint l_index, const char *pR, - mz_uint r_len) { - const mz_uint8 *pL = &MZ_ZIP_ARRAY_ELEMENT( - pCentral_dir_array, mz_uint8, - MZ_ZIP_ARRAY_ELEMENT(pCentral_dir_offsets, mz_uint32, - l_index)), - *pE; - mz_uint l_len = MZ_READ_LE16(pL + MZ_ZIP_CDH_FILENAME_LEN_OFS); - mz_uint8 l = 0, r = 0; - pL += MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; - pE = pL + MZ_MIN(l_len, r_len); - while (pL < pE) { - if ((l = MZ_TOLOWER(*pL)) != (r = MZ_TOLOWER(*pR))) break; - pL++; - pR++; - } - return (pL == pE) ? (int)(l_len - r_len) : (l - r); -} - -static int mz_zip_reader_locate_file_binary_search(mz_zip_archive *pZip, - const char *pFilename) { - mz_zip_internal_state *pState = pZip->m_pState; - const mz_zip_array *pCentral_dir_offsets = &pState->m_central_dir_offsets; - const mz_zip_array *pCentral_dir = &pState->m_central_dir; - mz_uint32 *pIndices = &MZ_ZIP_ARRAY_ELEMENT( - &pState->m_sorted_central_dir_offsets, mz_uint32, 0); - const int size = pZip->m_total_files; - const mz_uint filename_len = (mz_uint)strlen(pFilename); - int l = 0, h = size - 1; - while (l <= h) { - int m = (l + h) >> 1, file_index = pIndices[m], - comp = - mz_zip_reader_filename_compare(pCentral_dir, pCentral_dir_offsets, - file_index, pFilename, filename_len); - if (!comp) - return file_index; - else if (comp < 0) - l = m + 1; - else - h = m - 1; - } - return -1; -} - -int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, - const char *pComment, mz_uint flags) { - mz_uint file_index; - size_t name_len, comment_len; - if ((!pZip) || (!pZip->m_pState) || (!pName) || - (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) - return -1; - if (((flags & (MZ_ZIP_FLAG_IGNORE_PATH | MZ_ZIP_FLAG_CASE_SENSITIVE)) == 0) && - (!pComment) && (pZip->m_pState->m_sorted_central_dir_offsets.m_size)) - return mz_zip_reader_locate_file_binary_search(pZip, pName); - name_len = strlen(pName); - if (name_len > 0xFFFF) return -1; - comment_len = pComment ? strlen(pComment) : 0; - if (comment_len > 0xFFFF) return -1; - for (file_index = 0; file_index < pZip->m_total_files; file_index++) { - const mz_uint8 *pHeader = &MZ_ZIP_ARRAY_ELEMENT( - &pZip->m_pState->m_central_dir, mz_uint8, - MZ_ZIP_ARRAY_ELEMENT(&pZip->m_pState->m_central_dir_offsets, mz_uint32, - file_index)); - mz_uint filename_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_FILENAME_LEN_OFS); - const char *pFilename = - (const char *)pHeader + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE; - if (filename_len < name_len) continue; - if (comment_len) { - mz_uint file_extra_len = MZ_READ_LE16(pHeader + MZ_ZIP_CDH_EXTRA_LEN_OFS), - file_comment_len = - MZ_READ_LE16(pHeader + MZ_ZIP_CDH_COMMENT_LEN_OFS); - const char *pFile_comment = pFilename + filename_len + file_extra_len; - if ((file_comment_len != comment_len) || - (!mz_zip_reader_string_equal(pComment, pFile_comment, - file_comment_len, flags))) - continue; - } - if ((flags & MZ_ZIP_FLAG_IGNORE_PATH) && (filename_len)) { - int ofs = filename_len - 1; - do { - if ((pFilename[ofs] == '/') || (pFilename[ofs] == '\\') || - (pFilename[ofs] == ':')) - break; - } while (--ofs >= 0); - ofs++; - pFilename += ofs; - filename_len -= ofs; - } - if ((filename_len == name_len) && - (mz_zip_reader_string_equal(pName, pFilename, filename_len, flags))) - return file_index; - } - return -1; -} - -mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, - mz_uint file_index, void *pBuf, - size_t buf_size, mz_uint flags, - void *pUser_read_buf, - size_t user_read_buf_size) { - int status = TINFL_STATUS_DONE; - mz_uint64 needed_size, cur_file_ofs, comp_remaining, - out_buf_ofs = 0, read_buf_size, read_buf_ofs = 0, read_buf_avail; - mz_zip_archive_file_stat file_stat; - void *pRead_buf; - mz_uint32 - local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / - sizeof(mz_uint32)]; - mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; - tinfl_decompressor inflator; - - if ((buf_size) && (!pBuf)) return MZ_FALSE; - - if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) return MZ_FALSE; - - // Empty file, or a directory (but not always a directory - I've seen odd zips - // with directories that have compressed data which inflates to 0 bytes) - if (!file_stat.m_comp_size) return MZ_TRUE; - - // Entry is a subdirectory (I've seen old zips with dir entries which have - // compressed deflate data which inflates to 0 bytes, but these entries claim - // to uncompress to 512 bytes in the headers). - // I'm torn how to handle this case - should it fail instead? - if (mz_zip_reader_is_file_a_directory(pZip, file_index)) return MZ_TRUE; - - // Encryption and patch files are not supported. - if (file_stat.m_bit_flag & (1 | 32)) return MZ_FALSE; - - // This function only supports stored and deflate. - if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && - (file_stat.m_method != MZ_DEFLATED)) - return MZ_FALSE; - - // Ensure supplied output buffer is large enough. - needed_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? file_stat.m_comp_size - : file_stat.m_uncomp_size; - if (buf_size < needed_size) return MZ_FALSE; - - // Read and parse the local directory entry. - cur_file_ofs = file_stat.m_local_header_ofs; - if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, - MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != - MZ_ZIP_LOCAL_DIR_HEADER_SIZE) - return MZ_FALSE; - if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) - return MZ_FALSE; - - cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + - MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + - MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); - if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size) - return MZ_FALSE; - - if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method)) { - // The file is stored or the caller has requested the compressed data. - if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pBuf, - (size_t)needed_size) != needed_size) - return MZ_FALSE; - return ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) != 0) || - (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, - (size_t)file_stat.m_uncomp_size) == file_stat.m_crc32); - } - - // Decompress the file either directly from memory or from a file input - // buffer. - tinfl_init(&inflator); - - if (pZip->m_pState->m_pMem) { - // Read directly from the archive in memory. - pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs; - read_buf_size = read_buf_avail = file_stat.m_comp_size; - comp_remaining = 0; - } else if (pUser_read_buf) { - // Use a user provided read buffer. - if (!user_read_buf_size) return MZ_FALSE; - pRead_buf = (mz_uint8 *)pUser_read_buf; - read_buf_size = user_read_buf_size; - read_buf_avail = 0; - comp_remaining = file_stat.m_comp_size; - } else { - // Temporarily allocate a read buffer. - read_buf_size = - MZ_MIN(file_stat.m_comp_size, (mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE); -#ifdef _MSC_VER - if (((0, sizeof(size_t) == sizeof(mz_uint32))) && - (read_buf_size > 0x7FFFFFFF)) -#else - if (((sizeof(size_t) == sizeof(mz_uint32))) && (read_buf_size > 0x7FFFFFFF)) -#endif - return MZ_FALSE; - if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, - (size_t)read_buf_size))) - return MZ_FALSE; - read_buf_avail = 0; - comp_remaining = file_stat.m_comp_size; - } - - do { - size_t in_buf_size, - out_buf_size = (size_t)(file_stat.m_uncomp_size - out_buf_ofs); - if ((!read_buf_avail) && (!pZip->m_pState->m_pMem)) { - read_buf_avail = MZ_MIN(read_buf_size, comp_remaining); - if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, - (size_t)read_buf_avail) != read_buf_avail) { - status = TINFL_STATUS_FAILED; - break; - } - cur_file_ofs += read_buf_avail; - comp_remaining -= read_buf_avail; - read_buf_ofs = 0; - } - in_buf_size = (size_t)read_buf_avail; - status = tinfl_decompress( - &inflator, (mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, - (mz_uint8 *)pBuf, (mz_uint8 *)pBuf + out_buf_ofs, &out_buf_size, - TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF | - (comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0)); - read_buf_avail -= in_buf_size; - read_buf_ofs += in_buf_size; - out_buf_ofs += out_buf_size; - } while (status == TINFL_STATUS_NEEDS_MORE_INPUT); - - if (status == TINFL_STATUS_DONE) { - // Make sure the entire file was decompressed, and check its CRC. - if ((out_buf_ofs != file_stat.m_uncomp_size) || - (mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, - (size_t)file_stat.m_uncomp_size) != file_stat.m_crc32)) - status = TINFL_STATUS_FAILED; - } - - if ((!pZip->m_pState->m_pMem) && (!pUser_read_buf)) - pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); - - return status == TINFL_STATUS_DONE; -} - -mz_bool mz_zip_reader_extract_file_to_mem_no_alloc( - mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, - mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size) { - int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags); - if (file_index < 0) return MZ_FALSE; - return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, - flags, pUser_read_buf, - user_read_buf_size); -} - -mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, - void *pBuf, size_t buf_size, - mz_uint flags) { - return mz_zip_reader_extract_to_mem_no_alloc(pZip, file_index, pBuf, buf_size, - flags, NULL, 0); -} - -mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, - const char *pFilename, void *pBuf, - size_t buf_size, mz_uint flags) { - return mz_zip_reader_extract_file_to_mem_no_alloc(pZip, pFilename, pBuf, - buf_size, flags, NULL, 0); -} - -void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, - size_t *pSize, mz_uint flags) { - mz_uint64 comp_size, uncomp_size, alloc_size; - const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index); - void *pBuf; - - if (pSize) *pSize = 0; - if (!p) return NULL; - - comp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); - uncomp_size = MZ_READ_LE32(p + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS); - - alloc_size = (flags & MZ_ZIP_FLAG_COMPRESSED_DATA) ? comp_size : uncomp_size; -#ifdef _MSC_VER - if (((0, sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF)) -#else - if (((sizeof(size_t) == sizeof(mz_uint32))) && (alloc_size > 0x7FFFFFFF)) -#endif - return NULL; - if (NULL == - (pBuf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, (size_t)alloc_size))) - return NULL; - - if (!mz_zip_reader_extract_to_mem(pZip, file_index, pBuf, (size_t)alloc_size, - flags)) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); - return NULL; - } - - if (pSize) *pSize = (size_t)alloc_size; - return pBuf; -} - -void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, - const char *pFilename, size_t *pSize, - mz_uint flags) { - int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags); - if (file_index < 0) { - if (pSize) *pSize = 0; - return MZ_FALSE; - } - return mz_zip_reader_extract_to_heap(pZip, file_index, pSize, flags); -} - -mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, - mz_uint file_index, - mz_file_write_func pCallback, - void *pOpaque, mz_uint flags) { - int status = TINFL_STATUS_DONE; - mz_uint file_crc32 = MZ_CRC32_INIT; - mz_uint64 read_buf_size, read_buf_ofs = 0, read_buf_avail, comp_remaining, - out_buf_ofs = 0, cur_file_ofs; - mz_zip_archive_file_stat file_stat; - void *pRead_buf = NULL; - void *pWrite_buf = NULL; - mz_uint32 - local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / - sizeof(mz_uint32)]; - mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; - - if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) return MZ_FALSE; - - // Empty file, or a directory (but not always a directory - I've seen odd zips - // with directories that have compressed data which inflates to 0 bytes) - if (!file_stat.m_comp_size) return MZ_TRUE; - - // Entry is a subdirectory (I've seen old zips with dir entries which have - // compressed deflate data which inflates to 0 bytes, but these entries claim - // to uncompress to 512 bytes in the headers). - // I'm torn how to handle this case - should it fail instead? - if (mz_zip_reader_is_file_a_directory(pZip, file_index)) return MZ_TRUE; - - // Encryption and patch files are not supported. - if (file_stat.m_bit_flag & (1 | 32)) return MZ_FALSE; - - // This function only supports stored and deflate. - if ((!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (file_stat.m_method != 0) && - (file_stat.m_method != MZ_DEFLATED)) - return MZ_FALSE; - - // Read and parse the local directory entry. - cur_file_ofs = file_stat.m_local_header_ofs; - if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pLocal_header, - MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != - MZ_ZIP_LOCAL_DIR_HEADER_SIZE) - return MZ_FALSE; - if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) - return MZ_FALSE; - - cur_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE + - MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + - MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); - if ((cur_file_ofs + file_stat.m_comp_size) > pZip->m_archive_size) - return MZ_FALSE; - - // Decompress the file either directly from memory or from a file input - // buffer. - if (pZip->m_pState->m_pMem) { - pRead_buf = (mz_uint8 *)pZip->m_pState->m_pMem + cur_file_ofs; - read_buf_size = read_buf_avail = file_stat.m_comp_size; - comp_remaining = 0; - } else { - read_buf_size = - MZ_MIN(file_stat.m_comp_size, (mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE); - if (NULL == (pRead_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, - (size_t)read_buf_size))) - return MZ_FALSE; - read_buf_avail = 0; - comp_remaining = file_stat.m_comp_size; - } - - if ((flags & MZ_ZIP_FLAG_COMPRESSED_DATA) || (!file_stat.m_method)) { - // The file is stored or the caller has requested the compressed data. - if (pZip->m_pState->m_pMem) { -#ifdef _MSC_VER - if (((0, sizeof(size_t) == sizeof(mz_uint32))) && - (file_stat.m_comp_size > 0xFFFFFFFF)) -#else - if (((sizeof(size_t) == sizeof(mz_uint32))) && - (file_stat.m_comp_size > 0xFFFFFFFF)) -#endif - return MZ_FALSE; - if (pCallback(pOpaque, out_buf_ofs, pRead_buf, - (size_t)file_stat.m_comp_size) != file_stat.m_comp_size) - status = TINFL_STATUS_FAILED; - else if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) - file_crc32 = - (mz_uint32)mz_crc32(file_crc32, (const mz_uint8 *)pRead_buf, - (size_t)file_stat.m_comp_size); - cur_file_ofs += file_stat.m_comp_size; - out_buf_ofs += file_stat.m_comp_size; - comp_remaining = 0; - } else { - while (comp_remaining) { - read_buf_avail = MZ_MIN(read_buf_size, comp_remaining); - if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, - (size_t)read_buf_avail) != read_buf_avail) { - status = TINFL_STATUS_FAILED; - break; - } - - if (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) - file_crc32 = (mz_uint32)mz_crc32( - file_crc32, (const mz_uint8 *)pRead_buf, (size_t)read_buf_avail); - - if (pCallback(pOpaque, out_buf_ofs, pRead_buf, - (size_t)read_buf_avail) != read_buf_avail) { - status = TINFL_STATUS_FAILED; - break; - } - cur_file_ofs += read_buf_avail; - out_buf_ofs += read_buf_avail; - comp_remaining -= read_buf_avail; - } - } - } else { - tinfl_decompressor inflator; - tinfl_init(&inflator); - - if (NULL == (pWrite_buf = pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, - TINFL_LZ_DICT_SIZE))) - status = TINFL_STATUS_FAILED; - else { - do { - mz_uint8 *pWrite_buf_cur = - (mz_uint8 *)pWrite_buf + (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1)); - size_t in_buf_size, - out_buf_size = - TINFL_LZ_DICT_SIZE - (out_buf_ofs & (TINFL_LZ_DICT_SIZE - 1)); - if ((!read_buf_avail) && (!pZip->m_pState->m_pMem)) { - read_buf_avail = MZ_MIN(read_buf_size, comp_remaining); - if (pZip->m_pRead(pZip->m_pIO_opaque, cur_file_ofs, pRead_buf, - (size_t)read_buf_avail) != read_buf_avail) { - status = TINFL_STATUS_FAILED; - break; - } - cur_file_ofs += read_buf_avail; - comp_remaining -= read_buf_avail; - read_buf_ofs = 0; - } - - in_buf_size = (size_t)read_buf_avail; - status = tinfl_decompress( - &inflator, (const mz_uint8 *)pRead_buf + read_buf_ofs, &in_buf_size, - (mz_uint8 *)pWrite_buf, pWrite_buf_cur, &out_buf_size, - comp_remaining ? TINFL_FLAG_HAS_MORE_INPUT : 0); - read_buf_avail -= in_buf_size; - read_buf_ofs += in_buf_size; - - if (out_buf_size) { - if (pCallback(pOpaque, out_buf_ofs, pWrite_buf_cur, out_buf_size) != - out_buf_size) { - status = TINFL_STATUS_FAILED; - break; - } - file_crc32 = - (mz_uint32)mz_crc32(file_crc32, pWrite_buf_cur, out_buf_size); - if ((out_buf_ofs += out_buf_size) > file_stat.m_uncomp_size) { - status = TINFL_STATUS_FAILED; - break; - } - } - } while ((status == TINFL_STATUS_NEEDS_MORE_INPUT) || - (status == TINFL_STATUS_HAS_MORE_OUTPUT)); - } - } - - if ((status == TINFL_STATUS_DONE) && - (!(flags & MZ_ZIP_FLAG_COMPRESSED_DATA))) { - // Make sure the entire file was decompressed, and check its CRC. - if ((out_buf_ofs != file_stat.m_uncomp_size) || - (file_crc32 != file_stat.m_crc32)) - status = TINFL_STATUS_FAILED; - } - - if (!pZip->m_pState->m_pMem) pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); - if (pWrite_buf) pZip->m_pFree(pZip->m_pAlloc_opaque, pWrite_buf); - - return status == TINFL_STATUS_DONE; -} - -mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, - const char *pFilename, - mz_file_write_func pCallback, - void *pOpaque, mz_uint flags) { - int file_index = mz_zip_reader_locate_file(pZip, pFilename, NULL, flags); - if (file_index < 0) return MZ_FALSE; - return mz_zip_reader_extract_to_callback(pZip, file_index, pCallback, pOpaque, - flags); -} - -#ifndef MINIZ_NO_STDIO -static size_t mz_zip_file_write_callback(void *pOpaque, mz_uint64 ofs, - const void *pBuf, size_t n) { - (void)ofs; - return MZ_FWRITE(pBuf, 1, n, (MZ_FILE *)pOpaque); -} - -mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, - const char *pDst_filename, - mz_uint flags) { - mz_bool status; - mz_zip_archive_file_stat file_stat; - MZ_FILE *pFile; - if (!mz_zip_reader_file_stat(pZip, file_index, &file_stat)) return MZ_FALSE; - pFile = MZ_FOPEN(pDst_filename, "wb"); - if (!pFile) return MZ_FALSE; - status = mz_zip_reader_extract_to_callback( - pZip, file_index, mz_zip_file_write_callback, pFile, flags); - if (MZ_FCLOSE(pFile) == EOF) return MZ_FALSE; -#ifndef MINIZ_NO_TIME - if (status) - mz_zip_set_file_times(pDst_filename, file_stat.m_time, file_stat.m_time); -#endif - return status; -} -#endif // #ifndef MINIZ_NO_STDIO - -mz_bool mz_zip_reader_end(mz_zip_archive *pZip) { - if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || - (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) - return MZ_FALSE; - - if (pZip->m_pState) { - mz_zip_internal_state *pState = pZip->m_pState; - pZip->m_pState = NULL; - mz_zip_array_clear(pZip, &pState->m_central_dir); - mz_zip_array_clear(pZip, &pState->m_central_dir_offsets); - mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets); - -#ifndef MINIZ_NO_STDIO - if (pState->m_pFile) { - MZ_FCLOSE(pState->m_pFile); - pState->m_pFile = NULL; - } -#endif // #ifndef MINIZ_NO_STDIO - - pZip->m_pFree(pZip->m_pAlloc_opaque, pState); - } - pZip->m_zip_mode = MZ_ZIP_MODE_INVALID; - - return MZ_TRUE; -} - -#ifndef MINIZ_NO_STDIO -mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, - const char *pArchive_filename, - const char *pDst_filename, - mz_uint flags) { - int file_index = - mz_zip_reader_locate_file(pZip, pArchive_filename, NULL, flags); - if (file_index < 0) return MZ_FALSE; - return mz_zip_reader_extract_to_file(pZip, file_index, pDst_filename, flags); -} -#endif - -// ------------------- .ZIP archive writing - -#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS - -static void mz_write_le16(mz_uint8 *p, mz_uint16 v) { - p[0] = (mz_uint8)v; - p[1] = (mz_uint8)(v >> 8); -} -static void mz_write_le32(mz_uint8 *p, mz_uint32 v) { - p[0] = (mz_uint8)v; - p[1] = (mz_uint8)(v >> 8); - p[2] = (mz_uint8)(v >> 16); - p[3] = (mz_uint8)(v >> 24); -} -#define MZ_WRITE_LE16(p, v) mz_write_le16((mz_uint8 *)(p), (mz_uint16)(v)) -#define MZ_WRITE_LE32(p, v) mz_write_le32((mz_uint8 *)(p), (mz_uint32)(v)) - -mz_bool mz_zip_writer_init(mz_zip_archive *pZip, mz_uint64 existing_size) { - if ((!pZip) || (pZip->m_pState) || (!pZip->m_pWrite) || - (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID)) - return MZ_FALSE; - - if (pZip->m_file_offset_alignment) { - // Ensure user specified file offset alignment is a power of 2. - if (pZip->m_file_offset_alignment & (pZip->m_file_offset_alignment - 1)) - return MZ_FALSE; - } - - if (!pZip->m_pAlloc) pZip->m_pAlloc = def_alloc_func; - if (!pZip->m_pFree) pZip->m_pFree = def_free_func; - if (!pZip->m_pRealloc) pZip->m_pRealloc = def_realloc_func; - - pZip->m_zip_mode = MZ_ZIP_MODE_WRITING; - pZip->m_archive_size = existing_size; - pZip->m_central_directory_file_ofs = 0; - pZip->m_total_files = 0; - - if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc( - pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state)))) - return MZ_FALSE; - memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state)); - MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, - sizeof(mz_uint8)); - MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, - sizeof(mz_uint32)); - MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, - sizeof(mz_uint32)); - return MZ_TRUE; -} - -static size_t mz_zip_heap_write_func(void *pOpaque, mz_uint64 file_ofs, - const void *pBuf, size_t n) { - mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; - mz_zip_internal_state *pState = pZip->m_pState; - mz_uint64 new_size = MZ_MAX(file_ofs + n, pState->m_mem_size); -#ifdef _MSC_VER - if ((!n) || - ((0, sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF))) -#else - if ((!n) || - ((sizeof(size_t) == sizeof(mz_uint32)) && (new_size > 0x7FFFFFFF))) -#endif - return 0; - if (new_size > pState->m_mem_capacity) { - void *pNew_block; - size_t new_capacity = MZ_MAX(64, pState->m_mem_capacity); - while (new_capacity < new_size) new_capacity *= 2; - if (NULL == (pNew_block = pZip->m_pRealloc( - pZip->m_pAlloc_opaque, pState->m_pMem, 1, new_capacity))) - return 0; - pState->m_pMem = pNew_block; - pState->m_mem_capacity = new_capacity; - } - memcpy((mz_uint8 *)pState->m_pMem + file_ofs, pBuf, n); - pState->m_mem_size = (size_t)new_size; - return n; -} - -mz_bool mz_zip_writer_init_heap(mz_zip_archive *pZip, - size_t size_to_reserve_at_beginning, - size_t initial_allocation_size) { - pZip->m_pWrite = mz_zip_heap_write_func; - pZip->m_pIO_opaque = pZip; - if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning)) return MZ_FALSE; - if (0 != (initial_allocation_size = MZ_MAX(initial_allocation_size, - size_to_reserve_at_beginning))) { - if (NULL == (pZip->m_pState->m_pMem = pZip->m_pAlloc( - pZip->m_pAlloc_opaque, 1, initial_allocation_size))) { - mz_zip_writer_end(pZip); - return MZ_FALSE; - } - pZip->m_pState->m_mem_capacity = initial_allocation_size; - } - return MZ_TRUE; -} - -#ifndef MINIZ_NO_STDIO -static size_t mz_zip_file_write_func(void *pOpaque, mz_uint64 file_ofs, - const void *pBuf, size_t n) { - mz_zip_archive *pZip = (mz_zip_archive *)pOpaque; - mz_int64 cur_ofs = MZ_FTELL64(pZip->m_pState->m_pFile); - if (((mz_int64)file_ofs < 0) || - (((cur_ofs != (mz_int64)file_ofs)) && - (MZ_FSEEK64(pZip->m_pState->m_pFile, (mz_int64)file_ofs, SEEK_SET)))) - return 0; - return MZ_FWRITE(pBuf, 1, n, pZip->m_pState->m_pFile); -} - -mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, - mz_uint64 size_to_reserve_at_beginning) { - MZ_FILE *pFile; - pZip->m_pWrite = mz_zip_file_write_func; - pZip->m_pIO_opaque = pZip; - if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning)) return MZ_FALSE; - if (NULL == (pFile = MZ_FOPEN(pFilename, "wb"))) { - mz_zip_writer_end(pZip); - return MZ_FALSE; - } - pZip->m_pState->m_pFile = pFile; - if (size_to_reserve_at_beginning) { - mz_uint64 cur_ofs = 0; - char buf[4096]; - MZ_CLEAR_OBJ(buf); - do { - size_t n = (size_t)MZ_MIN(sizeof(buf), size_to_reserve_at_beginning); - if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_ofs, buf, n) != n) { - mz_zip_writer_end(pZip); - return MZ_FALSE; - } - cur_ofs += n; - size_to_reserve_at_beginning -= n; - } while (size_to_reserve_at_beginning); - } - return MZ_TRUE; -} -#endif // #ifndef MINIZ_NO_STDIO - -mz_bool mz_zip_writer_init_from_reader(mz_zip_archive *pZip, - const char *pFilename) { - mz_zip_internal_state *pState; - if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_READING)) - return MZ_FALSE; - // No sense in trying to write to an archive that's already at the support max - // size - if ((pZip->m_total_files == 0xFFFF) || - ((pZip->m_archive_size + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + - MZ_ZIP_LOCAL_DIR_HEADER_SIZE) > 0xFFFFFFFF)) - return MZ_FALSE; - - pState = pZip->m_pState; - - if (pState->m_pFile) { -#ifdef MINIZ_NO_STDIO - pFilename; - return MZ_FALSE; -#else - // Archive is being read from stdio - try to reopen as writable. - if (pZip->m_pIO_opaque != pZip) return MZ_FALSE; - if (!pFilename) return MZ_FALSE; - pZip->m_pWrite = mz_zip_file_write_func; - if (NULL == - (pState->m_pFile = MZ_FREOPEN(pFilename, "r+b", pState->m_pFile))) { - // The mz_zip_archive is now in a bogus state because pState->m_pFile is - // NULL, so just close it. - mz_zip_reader_end(pZip); - return MZ_FALSE; - } -#endif // #ifdef MINIZ_NO_STDIO - } else if (pState->m_pMem) { - // Archive lives in a memory block. Assume it's from the heap that we can - // resize using the realloc callback. - if (pZip->m_pIO_opaque != pZip) return MZ_FALSE; - pState->m_mem_capacity = pState->m_mem_size; - pZip->m_pWrite = mz_zip_heap_write_func; - } - // Archive is being read via a user provided read function - make sure the - // user has specified a write function too. - else if (!pZip->m_pWrite) - return MZ_FALSE; - - // Start writing new files at the archive's current central directory - // location. - pZip->m_archive_size = pZip->m_central_directory_file_ofs; - pZip->m_zip_mode = MZ_ZIP_MODE_WRITING; - pZip->m_central_directory_file_ofs = 0; - - return MZ_TRUE; -} - -mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name, - const void *pBuf, size_t buf_size, - mz_uint level_and_flags) { - return mz_zip_writer_add_mem_ex(pZip, pArchive_name, pBuf, buf_size, NULL, 0, - level_and_flags, 0, 0); -} - -typedef struct { - mz_zip_archive *m_pZip; - mz_uint64 m_cur_archive_file_ofs; - mz_uint64 m_comp_size; -} mz_zip_writer_add_state; - -static mz_bool mz_zip_writer_add_put_buf_callback(const void *pBuf, int len, - void *pUser) { - mz_zip_writer_add_state *pState = (mz_zip_writer_add_state *)pUser; - if ((int)pState->m_pZip->m_pWrite(pState->m_pZip->m_pIO_opaque, - pState->m_cur_archive_file_ofs, pBuf, - len) != len) - return MZ_FALSE; - pState->m_cur_archive_file_ofs += len; - pState->m_comp_size += len; - return MZ_TRUE; -} - -static mz_bool mz_zip_writer_create_local_dir_header( - mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, - mz_uint16 extra_size, mz_uint64 uncomp_size, mz_uint64 comp_size, - mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, - mz_uint16 dos_time, mz_uint16 dos_date) { - (void)pZip; - memset(pDst, 0, MZ_ZIP_LOCAL_DIR_HEADER_SIZE); - MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_SIG_OFS, MZ_ZIP_LOCAL_DIR_HEADER_SIG); - MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_VERSION_NEEDED_OFS, method ? 20 : 0); - MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_BIT_FLAG_OFS, bit_flags); - MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_METHOD_OFS, method); - MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_TIME_OFS, dos_time); - MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILE_DATE_OFS, dos_date); - MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_CRC32_OFS, uncomp_crc32); - MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_COMPRESSED_SIZE_OFS, comp_size); - MZ_WRITE_LE32(pDst + MZ_ZIP_LDH_DECOMPRESSED_SIZE_OFS, uncomp_size); - MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_FILENAME_LEN_OFS, filename_size); - MZ_WRITE_LE16(pDst + MZ_ZIP_LDH_EXTRA_LEN_OFS, extra_size); - return MZ_TRUE; -} - -static mz_bool mz_zip_writer_create_central_dir_header( - mz_zip_archive *pZip, mz_uint8 *pDst, mz_uint16 filename_size, - mz_uint16 extra_size, mz_uint16 comment_size, mz_uint64 uncomp_size, - mz_uint64 comp_size, mz_uint32 uncomp_crc32, mz_uint16 method, - mz_uint16 bit_flags, mz_uint16 dos_time, mz_uint16 dos_date, - mz_uint64 local_header_ofs, mz_uint32 ext_attributes) { - (void)pZip; - memset(pDst, 0, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE); - MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_SIG_OFS, MZ_ZIP_CENTRAL_DIR_HEADER_SIG); - MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_VERSION_NEEDED_OFS, method ? 20 : 0); - MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_BIT_FLAG_OFS, bit_flags); - MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_METHOD_OFS, method); - MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_TIME_OFS, dos_time); - MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILE_DATE_OFS, dos_date); - MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_CRC32_OFS, uncomp_crc32); - MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS, comp_size); - MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_DECOMPRESSED_SIZE_OFS, uncomp_size); - MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_FILENAME_LEN_OFS, filename_size); - MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_EXTRA_LEN_OFS, extra_size); - MZ_WRITE_LE16(pDst + MZ_ZIP_CDH_COMMENT_LEN_OFS, comment_size); - MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_EXTERNAL_ATTR_OFS, ext_attributes); - MZ_WRITE_LE32(pDst + MZ_ZIP_CDH_LOCAL_HEADER_OFS, local_header_ofs); - return MZ_TRUE; -} - -static mz_bool mz_zip_writer_add_to_central_dir( - mz_zip_archive *pZip, const char *pFilename, mz_uint16 filename_size, - const void *pExtra, mz_uint16 extra_size, const void *pComment, - mz_uint16 comment_size, mz_uint64 uncomp_size, mz_uint64 comp_size, - mz_uint32 uncomp_crc32, mz_uint16 method, mz_uint16 bit_flags, - mz_uint16 dos_time, mz_uint16 dos_date, mz_uint64 local_header_ofs, - mz_uint32 ext_attributes) { - mz_zip_internal_state *pState = pZip->m_pState; - mz_uint32 central_dir_ofs = (mz_uint32)pState->m_central_dir.m_size; - size_t orig_central_dir_size = pState->m_central_dir.m_size; - mz_uint8 central_dir_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE]; - - // No zip64 support yet - if ((local_header_ofs > 0xFFFFFFFF) || - (((mz_uint64)pState->m_central_dir.m_size + - MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + filename_size + extra_size + - comment_size) > 0xFFFFFFFF)) - return MZ_FALSE; - - if (!mz_zip_writer_create_central_dir_header( - pZip, central_dir_header, filename_size, extra_size, comment_size, - uncomp_size, comp_size, uncomp_crc32, method, bit_flags, dos_time, - dos_date, local_header_ofs, ext_attributes)) - return MZ_FALSE; - - if ((!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_dir_header, - MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)) || - (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pFilename, - filename_size)) || - (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pExtra, - extra_size)) || - (!mz_zip_array_push_back(pZip, &pState->m_central_dir, pComment, - comment_size)) || - (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, - ¢ral_dir_ofs, 1))) { - // Try to push the central directory array back into its original state. - mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, - MZ_FALSE); - return MZ_FALSE; - } - - return MZ_TRUE; -} - -static mz_bool mz_zip_writer_validate_archive_name(const char *pArchive_name) { - // Basic ZIP archive filename validity checks: Valid filenames cannot start - // with a forward slash, cannot contain a drive letter, and cannot use - // DOS-style backward slashes. - if (*pArchive_name == '/') return MZ_FALSE; - while (*pArchive_name) { - if ((*pArchive_name == '\\') || (*pArchive_name == ':')) return MZ_FALSE; - pArchive_name++; - } - return MZ_TRUE; -} - -static mz_uint mz_zip_writer_compute_padding_needed_for_file_alignment( - mz_zip_archive *pZip) { - mz_uint32 n; - if (!pZip->m_file_offset_alignment) return 0; - n = (mz_uint32)(pZip->m_archive_size & (pZip->m_file_offset_alignment - 1)); - return (pZip->m_file_offset_alignment - n) & - (pZip->m_file_offset_alignment - 1); -} - -static mz_bool mz_zip_writer_write_zeros(mz_zip_archive *pZip, - mz_uint64 cur_file_ofs, mz_uint32 n) { - char buf[4096]; - memset(buf, 0, MZ_MIN(sizeof(buf), n)); - while (n) { - mz_uint32 s = MZ_MIN(sizeof(buf), n); - if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_file_ofs, buf, s) != s) - return MZ_FALSE; - cur_file_ofs += s; - n -= s; - } - return MZ_TRUE; -} - -mz_bool mz_zip_writer_add_mem_ex(mz_zip_archive *pZip, - const char *pArchive_name, const void *pBuf, - size_t buf_size, const void *pComment, - mz_uint16 comment_size, - mz_uint level_and_flags, mz_uint64 uncomp_size, - mz_uint32 uncomp_crc32) { - mz_uint16 method = 0, dos_time = 0, dos_date = 0; - mz_uint level, ext_attributes = 0, num_alignment_padding_bytes; - mz_uint64 local_dir_header_ofs = pZip->m_archive_size, - cur_archive_file_ofs = pZip->m_archive_size, comp_size = 0; - size_t archive_name_size; - mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE]; - tdefl_compressor *pComp = NULL; - mz_bool store_data_uncompressed; - mz_zip_internal_state *pState; - - if ((int)level_and_flags < 0) level_and_flags = MZ_DEFAULT_LEVEL; - level = level_and_flags & 0xF; - store_data_uncompressed = - ((!level) || (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)); - - if ((!pZip) || (!pZip->m_pState) || - (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || ((buf_size) && (!pBuf)) || - (!pArchive_name) || ((comment_size) && (!pComment)) || - (pZip->m_total_files == 0xFFFF) || (level > MZ_UBER_COMPRESSION)) - return MZ_FALSE; - - pState = pZip->m_pState; - - if ((!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) && (uncomp_size)) - return MZ_FALSE; - // No zip64 support yet - if ((buf_size > 0xFFFFFFFF) || (uncomp_size > 0xFFFFFFFF)) return MZ_FALSE; - if (!mz_zip_writer_validate_archive_name(pArchive_name)) return MZ_FALSE; - -#ifndef MINIZ_NO_TIME - { - time_t cur_time; - time(&cur_time); - mz_zip_time_to_dos_time(cur_time, &dos_time, &dos_date); - } -#endif // #ifndef MINIZ_NO_TIME - - archive_name_size = strlen(pArchive_name); - if (archive_name_size > 0xFFFF) return MZ_FALSE; - - num_alignment_padding_bytes = - mz_zip_writer_compute_padding_needed_for_file_alignment(pZip); - - // no zip64 support yet - if ((pZip->m_total_files == 0xFFFF) || - ((pZip->m_archive_size + num_alignment_padding_bytes + - MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + - comment_size + archive_name_size) > 0xFFFFFFFF)) - return MZ_FALSE; - - if ((archive_name_size) && (pArchive_name[archive_name_size - 1] == '/')) { - // Set DOS Subdirectory attribute bit. - ext_attributes |= 0x10; - // Subdirectories cannot contain data. - if ((buf_size) || (uncomp_size)) return MZ_FALSE; - } - - // Try to do any allocations before writing to the archive, so if an - // allocation fails the file remains unmodified. (A good idea if we're doing - // an in-place modification.) - if ((!mz_zip_array_ensure_room( - pZip, &pState->m_central_dir, - MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + archive_name_size + comment_size)) || - (!mz_zip_array_ensure_room(pZip, &pState->m_central_dir_offsets, 1))) - return MZ_FALSE; - - if ((!store_data_uncompressed) && (buf_size)) { - if (NULL == (pComp = (tdefl_compressor *)pZip->m_pAlloc( - pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor)))) - return MZ_FALSE; - } - - if (!mz_zip_writer_write_zeros( - pZip, cur_archive_file_ofs, - num_alignment_padding_bytes + sizeof(local_dir_header))) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); - return MZ_FALSE; - } - local_dir_header_ofs += num_alignment_padding_bytes; - if (pZip->m_file_offset_alignment) { - MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == - 0); - } - cur_archive_file_ofs += - num_alignment_padding_bytes + sizeof(local_dir_header); - - MZ_CLEAR_OBJ(local_dir_header); - if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, - archive_name_size) != archive_name_size) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); - return MZ_FALSE; - } - cur_archive_file_ofs += archive_name_size; - - if (!(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA)) { - uncomp_crc32 = - (mz_uint32)mz_crc32(MZ_CRC32_INIT, (const mz_uint8 *)pBuf, buf_size); - uncomp_size = buf_size; - if (uncomp_size <= 3) { - level = 0; - store_data_uncompressed = MZ_TRUE; - } - } - - if (store_data_uncompressed) { - if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pBuf, - buf_size) != buf_size) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); - return MZ_FALSE; - } - - cur_archive_file_ofs += buf_size; - comp_size = buf_size; - - if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA) method = MZ_DEFLATED; - } else if (buf_size) { - mz_zip_writer_add_state state; - - state.m_pZip = pZip; - state.m_cur_archive_file_ofs = cur_archive_file_ofs; - state.m_comp_size = 0; - - if ((tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, - tdefl_create_comp_flags_from_zip_params( - level, -15, MZ_DEFAULT_STRATEGY)) != - TDEFL_STATUS_OKAY) || - (tdefl_compress_buffer(pComp, pBuf, buf_size, TDEFL_FINISH) != - TDEFL_STATUS_DONE)) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); - return MZ_FALSE; - } - - comp_size = state.m_comp_size; - cur_archive_file_ofs = state.m_cur_archive_file_ofs; - - method = MZ_DEFLATED; - } - - pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); - pComp = NULL; - - // no zip64 support yet - if ((comp_size > 0xFFFFFFFF) || (cur_archive_file_ofs > 0xFFFFFFFF)) - return MZ_FALSE; - - if (!mz_zip_writer_create_local_dir_header( - pZip, local_dir_header, (mz_uint16)archive_name_size, 0, uncomp_size, - comp_size, uncomp_crc32, method, 0, dos_time, dos_date)) - return MZ_FALSE; - - if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, local_dir_header, - sizeof(local_dir_header)) != sizeof(local_dir_header)) - return MZ_FALSE; - - if (!mz_zip_writer_add_to_central_dir( - pZip, pArchive_name, (mz_uint16)archive_name_size, NULL, 0, pComment, - comment_size, uncomp_size, comp_size, uncomp_crc32, method, 0, - dos_time, dos_date, local_dir_header_ofs, ext_attributes)) - return MZ_FALSE; - - pZip->m_total_files++; - pZip->m_archive_size = cur_archive_file_ofs; - - return MZ_TRUE; -} - -#ifndef MINIZ_NO_STDIO -mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, - const char *pSrc_filename, const void *pComment, - mz_uint16 comment_size, - mz_uint level_and_flags) { - mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes; - mz_uint16 method = 0, dos_time = 0, dos_date = 0, ext_attributes = 0; - mz_uint64 local_dir_header_ofs = pZip->m_archive_size, - cur_archive_file_ofs = pZip->m_archive_size, uncomp_size = 0, - comp_size = 0; - size_t archive_name_size; - mz_uint8 local_dir_header[MZ_ZIP_LOCAL_DIR_HEADER_SIZE]; - MZ_FILE *pSrc_file = NULL; - - if ((int)level_and_flags < 0) level_and_flags = MZ_DEFAULT_LEVEL; - level = level_and_flags & 0xF; - - if ((!pZip) || (!pZip->m_pState) || - (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || - ((comment_size) && (!pComment)) || (level > MZ_UBER_COMPRESSION)) - return MZ_FALSE; - if (level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA) return MZ_FALSE; - if (!mz_zip_writer_validate_archive_name(pArchive_name)) return MZ_FALSE; - - archive_name_size = strlen(pArchive_name); - if (archive_name_size > 0xFFFF) return MZ_FALSE; - - num_alignment_padding_bytes = - mz_zip_writer_compute_padding_needed_for_file_alignment(pZip); - - // no zip64 support yet - if ((pZip->m_total_files == 0xFFFF) || - ((pZip->m_archive_size + num_alignment_padding_bytes + - MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE + - comment_size + archive_name_size) > 0xFFFFFFFF)) - return MZ_FALSE; - - if (!mz_zip_get_file_modified_time(pSrc_filename, &dos_time, &dos_date)) - return MZ_FALSE; - - pSrc_file = MZ_FOPEN(pSrc_filename, "rb"); - if (!pSrc_file) return MZ_FALSE; - MZ_FSEEK64(pSrc_file, 0, SEEK_END); - uncomp_size = MZ_FTELL64(pSrc_file); - MZ_FSEEK64(pSrc_file, 0, SEEK_SET); - - if (uncomp_size > 0xFFFFFFFF) { - // No zip64 support yet - MZ_FCLOSE(pSrc_file); - return MZ_FALSE; - } - if (uncomp_size <= 3) level = 0; - - if (!mz_zip_writer_write_zeros( - pZip, cur_archive_file_ofs, - num_alignment_padding_bytes + sizeof(local_dir_header))) { - MZ_FCLOSE(pSrc_file); - return MZ_FALSE; - } - local_dir_header_ofs += num_alignment_padding_bytes; - if (pZip->m_file_offset_alignment) { - MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == - 0); - } - cur_archive_file_ofs += - num_alignment_padding_bytes + sizeof(local_dir_header); - - MZ_CLEAR_OBJ(local_dir_header); - if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pArchive_name, - archive_name_size) != archive_name_size) { - MZ_FCLOSE(pSrc_file); - return MZ_FALSE; - } - cur_archive_file_ofs += archive_name_size; - - if (uncomp_size) { - mz_uint64 uncomp_remaining = uncomp_size; - void *pRead_buf = - pZip->m_pAlloc(pZip->m_pAlloc_opaque, 1, MZ_ZIP_MAX_IO_BUF_SIZE); - if (!pRead_buf) { - MZ_FCLOSE(pSrc_file); - return MZ_FALSE; - } - - if (!level) { - while (uncomp_remaining) { - mz_uint n = - (mz_uint)MZ_MIN((mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE, uncomp_remaining); - if ((MZ_FREAD(pRead_buf, 1, n, pSrc_file) != n) || - (pZip->m_pWrite(pZip->m_pIO_opaque, cur_archive_file_ofs, pRead_buf, - n) != n)) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); - MZ_FCLOSE(pSrc_file); - return MZ_FALSE; - } - uncomp_crc32 = - (mz_uint32)mz_crc32(uncomp_crc32, (const mz_uint8 *)pRead_buf, n); - uncomp_remaining -= n; - cur_archive_file_ofs += n; - } - comp_size = uncomp_size; - } else { - mz_bool result = MZ_FALSE; - mz_zip_writer_add_state state; - tdefl_compressor *pComp = (tdefl_compressor *)pZip->m_pAlloc( - pZip->m_pAlloc_opaque, 1, sizeof(tdefl_compressor)); - if (!pComp) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); - MZ_FCLOSE(pSrc_file); - return MZ_FALSE; - } - - state.m_pZip = pZip; - state.m_cur_archive_file_ofs = cur_archive_file_ofs; - state.m_comp_size = 0; - - if (tdefl_init(pComp, mz_zip_writer_add_put_buf_callback, &state, - tdefl_create_comp_flags_from_zip_params( - level, -15, MZ_DEFAULT_STRATEGY)) != - TDEFL_STATUS_OKAY) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); - pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); - MZ_FCLOSE(pSrc_file); - return MZ_FALSE; - } - - for (;;) { - size_t in_buf_size = (mz_uint32)MZ_MIN(uncomp_remaining, - (mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE); - tdefl_status status; - - if (MZ_FREAD(pRead_buf, 1, in_buf_size, pSrc_file) != in_buf_size) - break; - - uncomp_crc32 = (mz_uint32)mz_crc32( - uncomp_crc32, (const mz_uint8 *)pRead_buf, in_buf_size); - uncomp_remaining -= in_buf_size; - - status = tdefl_compress_buffer( - pComp, pRead_buf, in_buf_size, - uncomp_remaining ? TDEFL_NO_FLUSH : TDEFL_FINISH); - if (status == TDEFL_STATUS_DONE) { - result = MZ_TRUE; - break; - } else if (status != TDEFL_STATUS_OKAY) - break; - } - - pZip->m_pFree(pZip->m_pAlloc_opaque, pComp); - - if (!result) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); - MZ_FCLOSE(pSrc_file); - return MZ_FALSE; - } - - comp_size = state.m_comp_size; - cur_archive_file_ofs = state.m_cur_archive_file_ofs; - - method = MZ_DEFLATED; - } - - pZip->m_pFree(pZip->m_pAlloc_opaque, pRead_buf); - } - - MZ_FCLOSE(pSrc_file); - pSrc_file = NULL; - - // no zip64 support yet - if ((comp_size > 0xFFFFFFFF) || (cur_archive_file_ofs > 0xFFFFFFFF)) - return MZ_FALSE; - - if (!mz_zip_writer_create_local_dir_header( - pZip, local_dir_header, (mz_uint16)archive_name_size, 0, uncomp_size, - comp_size, uncomp_crc32, method, 0, dos_time, dos_date)) - return MZ_FALSE; - - if (pZip->m_pWrite(pZip->m_pIO_opaque, local_dir_header_ofs, local_dir_header, - sizeof(local_dir_header)) != sizeof(local_dir_header)) - return MZ_FALSE; - - if (!mz_zip_writer_add_to_central_dir( - pZip, pArchive_name, (mz_uint16)archive_name_size, NULL, 0, pComment, - comment_size, uncomp_size, comp_size, uncomp_crc32, method, 0, - dos_time, dos_date, local_dir_header_ofs, ext_attributes)) - return MZ_FALSE; - - pZip->m_total_files++; - pZip->m_archive_size = cur_archive_file_ofs; - - return MZ_TRUE; -} -#endif // #ifndef MINIZ_NO_STDIO - -mz_bool mz_zip_writer_add_from_zip_reader(mz_zip_archive *pZip, - mz_zip_archive *pSource_zip, - mz_uint file_index) { - mz_uint n, bit_flags, num_alignment_padding_bytes; - mz_uint64 comp_bytes_remaining, local_dir_header_ofs; - mz_uint64 cur_src_file_ofs, cur_dst_file_ofs; - mz_uint32 - local_header_u32[(MZ_ZIP_LOCAL_DIR_HEADER_SIZE + sizeof(mz_uint32) - 1) / - sizeof(mz_uint32)]; - mz_uint8 *pLocal_header = (mz_uint8 *)local_header_u32; - mz_uint8 central_header[MZ_ZIP_CENTRAL_DIR_HEADER_SIZE]; - size_t orig_central_dir_size; - mz_zip_internal_state *pState; - void *pBuf; - const mz_uint8 *pSrc_central_header; - - if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING)) - return MZ_FALSE; - if (NULL == - (pSrc_central_header = mz_zip_reader_get_cdh(pSource_zip, file_index))) - return MZ_FALSE; - pState = pZip->m_pState; - - num_alignment_padding_bytes = - mz_zip_writer_compute_padding_needed_for_file_alignment(pZip); - - // no zip64 support yet - if ((pZip->m_total_files == 0xFFFF) || - ((pZip->m_archive_size + num_alignment_padding_bytes + - MZ_ZIP_LOCAL_DIR_HEADER_SIZE + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE) > - 0xFFFFFFFF)) - return MZ_FALSE; - - cur_src_file_ofs = - MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS); - cur_dst_file_ofs = pZip->m_archive_size; - - if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, - pLocal_header, MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != - MZ_ZIP_LOCAL_DIR_HEADER_SIZE) - return MZ_FALSE; - if (MZ_READ_LE32(pLocal_header) != MZ_ZIP_LOCAL_DIR_HEADER_SIG) - return MZ_FALSE; - cur_src_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE; - - if (!mz_zip_writer_write_zeros(pZip, cur_dst_file_ofs, - num_alignment_padding_bytes)) - return MZ_FALSE; - cur_dst_file_ofs += num_alignment_padding_bytes; - local_dir_header_ofs = cur_dst_file_ofs; - if (pZip->m_file_offset_alignment) { - MZ_ASSERT((local_dir_header_ofs & (pZip->m_file_offset_alignment - 1)) == - 0); - } - - if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pLocal_header, - MZ_ZIP_LOCAL_DIR_HEADER_SIZE) != - MZ_ZIP_LOCAL_DIR_HEADER_SIZE) - return MZ_FALSE; - cur_dst_file_ofs += MZ_ZIP_LOCAL_DIR_HEADER_SIZE; - - n = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_FILENAME_LEN_OFS) + - MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_EXTRA_LEN_OFS); - comp_bytes_remaining = - n + MZ_READ_LE32(pSrc_central_header + MZ_ZIP_CDH_COMPRESSED_SIZE_OFS); - - if (NULL == (pBuf = pZip->m_pAlloc( - pZip->m_pAlloc_opaque, 1, - (size_t)MZ_MAX(sizeof(mz_uint32) * 4, - MZ_MIN((mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE, - comp_bytes_remaining))))) - return MZ_FALSE; - - while (comp_bytes_remaining) { - n = (mz_uint)MZ_MIN((mz_uint)MZ_ZIP_MAX_IO_BUF_SIZE, comp_bytes_remaining); - if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, - n) != n) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); - return MZ_FALSE; - } - cur_src_file_ofs += n; - - if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); - return MZ_FALSE; - } - cur_dst_file_ofs += n; - - comp_bytes_remaining -= n; - } - - bit_flags = MZ_READ_LE16(pLocal_header + MZ_ZIP_LDH_BIT_FLAG_OFS); - if (bit_flags & 8) { - // Copy data descriptor - if (pSource_zip->m_pRead(pSource_zip->m_pIO_opaque, cur_src_file_ofs, pBuf, - sizeof(mz_uint32) * 4) != sizeof(mz_uint32) * 4) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); - return MZ_FALSE; - } - - n = sizeof(mz_uint32) * ((MZ_READ_LE32(pBuf) == 0x08074b50) ? 4 : 3); - if (pZip->m_pWrite(pZip->m_pIO_opaque, cur_dst_file_ofs, pBuf, n) != n) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); - return MZ_FALSE; - } - - cur_src_file_ofs += n; - cur_dst_file_ofs += n; - } - pZip->m_pFree(pZip->m_pAlloc_opaque, pBuf); - - // no zip64 support yet - if (cur_dst_file_ofs > 0xFFFFFFFF) return MZ_FALSE; - - orig_central_dir_size = pState->m_central_dir.m_size; - - memcpy(central_header, pSrc_central_header, MZ_ZIP_CENTRAL_DIR_HEADER_SIZE); - MZ_WRITE_LE32(central_header + MZ_ZIP_CDH_LOCAL_HEADER_OFS, - local_dir_header_ofs); - if (!mz_zip_array_push_back(pZip, &pState->m_central_dir, central_header, - MZ_ZIP_CENTRAL_DIR_HEADER_SIZE)) - return MZ_FALSE; - - n = MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_FILENAME_LEN_OFS) + - MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_EXTRA_LEN_OFS) + - MZ_READ_LE16(pSrc_central_header + MZ_ZIP_CDH_COMMENT_LEN_OFS); - if (!mz_zip_array_push_back( - pZip, &pState->m_central_dir, - pSrc_central_header + MZ_ZIP_CENTRAL_DIR_HEADER_SIZE, n)) { - mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, - MZ_FALSE); - return MZ_FALSE; - } - - if (pState->m_central_dir.m_size > 0xFFFFFFFF) return MZ_FALSE; - n = (mz_uint32)orig_central_dir_size; - if (!mz_zip_array_push_back(pZip, &pState->m_central_dir_offsets, &n, 1)) { - mz_zip_array_resize(pZip, &pState->m_central_dir, orig_central_dir_size, - MZ_FALSE); - return MZ_FALSE; - } - - pZip->m_total_files++; - pZip->m_archive_size = cur_dst_file_ofs; - - return MZ_TRUE; -} - -mz_bool mz_zip_writer_finalize_archive(mz_zip_archive *pZip) { - mz_zip_internal_state *pState; - mz_uint64 central_dir_ofs, central_dir_size; - mz_uint8 hdr[MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE]; - - if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING)) - return MZ_FALSE; - - pState = pZip->m_pState; - - // no zip64 support yet - if ((pZip->m_total_files > 0xFFFF) || - ((pZip->m_archive_size + pState->m_central_dir.m_size + - MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) > 0xFFFFFFFF)) - return MZ_FALSE; - - central_dir_ofs = 0; - central_dir_size = 0; - if (pZip->m_total_files) { - // Write central directory - central_dir_ofs = pZip->m_archive_size; - central_dir_size = pState->m_central_dir.m_size; - pZip->m_central_directory_file_ofs = central_dir_ofs; - if (pZip->m_pWrite(pZip->m_pIO_opaque, central_dir_ofs, - pState->m_central_dir.m_p, - (size_t)central_dir_size) != central_dir_size) - return MZ_FALSE; - pZip->m_archive_size += central_dir_size; - } - - // Write end of central directory record - MZ_CLEAR_OBJ(hdr); - MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_SIG_OFS, - MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIG); - MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_NUM_ENTRIES_ON_DISK_OFS, - pZip->m_total_files); - MZ_WRITE_LE16(hdr + MZ_ZIP_ECDH_CDIR_TOTAL_ENTRIES_OFS, pZip->m_total_files); - MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_SIZE_OFS, central_dir_size); - MZ_WRITE_LE32(hdr + MZ_ZIP_ECDH_CDIR_OFS_OFS, central_dir_ofs); - - if (pZip->m_pWrite(pZip->m_pIO_opaque, pZip->m_archive_size, hdr, - sizeof(hdr)) != sizeof(hdr)) - return MZ_FALSE; -#ifndef MINIZ_NO_STDIO - if ((pState->m_pFile) && (MZ_FFLUSH(pState->m_pFile) == EOF)) return MZ_FALSE; -#endif // #ifndef MINIZ_NO_STDIO - - pZip->m_archive_size += sizeof(hdr); - - pZip->m_zip_mode = MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED; - return MZ_TRUE; -} - -mz_bool mz_zip_writer_finalize_heap_archive(mz_zip_archive *pZip, void **pBuf, - size_t *pSize) { - if ((!pZip) || (!pZip->m_pState) || (!pBuf) || (!pSize)) return MZ_FALSE; - if (pZip->m_pWrite != mz_zip_heap_write_func) return MZ_FALSE; - if (!mz_zip_writer_finalize_archive(pZip)) return MZ_FALSE; - - *pBuf = pZip->m_pState->m_pMem; - *pSize = pZip->m_pState->m_mem_size; - pZip->m_pState->m_pMem = NULL; - pZip->m_pState->m_mem_size = pZip->m_pState->m_mem_capacity = 0; - return MZ_TRUE; -} - -mz_bool mz_zip_writer_end(mz_zip_archive *pZip) { - mz_zip_internal_state *pState; - mz_bool status = MZ_TRUE; - if ((!pZip) || (!pZip->m_pState) || (!pZip->m_pAlloc) || (!pZip->m_pFree) || - ((pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) && - (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED))) - return MZ_FALSE; - - pState = pZip->m_pState; - pZip->m_pState = NULL; - mz_zip_array_clear(pZip, &pState->m_central_dir); - mz_zip_array_clear(pZip, &pState->m_central_dir_offsets); - mz_zip_array_clear(pZip, &pState->m_sorted_central_dir_offsets); - -#ifndef MINIZ_NO_STDIO - if (pState->m_pFile) { - MZ_FCLOSE(pState->m_pFile); - pState->m_pFile = NULL; - } -#endif // #ifndef MINIZ_NO_STDIO - - if ((pZip->m_pWrite == mz_zip_heap_write_func) && (pState->m_pMem)) { - pZip->m_pFree(pZip->m_pAlloc_opaque, pState->m_pMem); - pState->m_pMem = NULL; - } - - pZip->m_pFree(pZip->m_pAlloc_opaque, pState); - pZip->m_zip_mode = MZ_ZIP_MODE_INVALID; - return status; -} - -#ifndef MINIZ_NO_STDIO -mz_bool mz_zip_add_mem_to_archive_file_in_place( - const char *pZip_filename, const char *pArchive_name, const void *pBuf, - size_t buf_size, const void *pComment, mz_uint16 comment_size, - mz_uint level_and_flags) { - mz_bool status, created_new_archive = MZ_FALSE; - mz_zip_archive zip_archive; - struct MZ_FILE_STAT_STRUCT file_stat; - MZ_CLEAR_OBJ(zip_archive); - if ((int)level_and_flags < 0) level_and_flags = MZ_DEFAULT_LEVEL; - if ((!pZip_filename) || (!pArchive_name) || ((buf_size) && (!pBuf)) || - ((comment_size) && (!pComment)) || - ((level_and_flags & 0xF) > MZ_UBER_COMPRESSION)) - return MZ_FALSE; - if (!mz_zip_writer_validate_archive_name(pArchive_name)) return MZ_FALSE; - if (MZ_FILE_STAT(pZip_filename, &file_stat) != 0) { - // Create a new archive. - if (!mz_zip_writer_init_file(&zip_archive, pZip_filename, 0)) - return MZ_FALSE; - created_new_archive = MZ_TRUE; - } else { - // Append to an existing archive. - if (!mz_zip_reader_init_file( - &zip_archive, pZip_filename, - level_and_flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY)) - return MZ_FALSE; - if (!mz_zip_writer_init_from_reader(&zip_archive, pZip_filename)) { - mz_zip_reader_end(&zip_archive); - return MZ_FALSE; - } - } - status = - mz_zip_writer_add_mem_ex(&zip_archive, pArchive_name, pBuf, buf_size, - pComment, comment_size, level_and_flags, 0, 0); - // Always finalize, even if adding failed for some reason, so we have a valid - // central directory. (This may not always succeed, but we can try.) - if (!mz_zip_writer_finalize_archive(&zip_archive)) status = MZ_FALSE; - if (!mz_zip_writer_end(&zip_archive)) status = MZ_FALSE; - if ((!status) && (created_new_archive)) { - // It's a new archive and something went wrong, so just delete it. - int ignoredStatus = MZ_DELETE_FILE(pZip_filename); - (void)ignoredStatus; - } - return status; -} - -void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, - const char *pArchive_name, - size_t *pSize, mz_uint flags) { - int file_index; - mz_zip_archive zip_archive; - void *p = NULL; - - if (pSize) *pSize = 0; - - if ((!pZip_filename) || (!pArchive_name)) return NULL; - - MZ_CLEAR_OBJ(zip_archive); - if (!mz_zip_reader_init_file( - &zip_archive, pZip_filename, - flags | MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY)) - return NULL; - - if ((file_index = mz_zip_reader_locate_file(&zip_archive, pArchive_name, NULL, - flags)) >= 0) - p = mz_zip_reader_extract_to_heap(&zip_archive, file_index, pSize, flags); - - mz_zip_reader_end(&zip_archive); - return p; -} - -#endif // #ifndef MINIZ_NO_STDIO - -#endif // #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS - -#endif // #ifndef MINIZ_NO_ARCHIVE_APIS - -#ifdef __cplusplus -} -#endif - -#endif // MINIZ_HEADER_FILE_ONLY - -/* - This is free and unencumbered software released into the public domain. - - Anyone is free to copy, modify, publish, use, compile, sell, or - distribute this software, either in source code form or as a compiled - binary, for any purpose, commercial or non-commercial, and by any - means. - - In jurisdictions that recognize copyright laws, the author or authors - of this software dedicate any and all copyright interest in the - software to the public domain. We make this dedication for the benefit - of the public at large and to the detriment of our heirs and - successors. We intend this dedication to be an overt act of - relinquishment in perpetuity of all present and future rights to this - software under copyright law. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR - OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - - For more information, please refer to -*/ - -// ---------------------- end of miniz ---------------------------------------- - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif -} -#else - -// Reuse MINIZ_LITTE_ENDIAN macro - -#if defined(__sparcv9) -// Big endian -#else -#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU -// Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian. -#define MINIZ_LITTLE_ENDIAN 1 -#endif -#endif - -#endif // TINYEXR_USE_MINIZ - -// static bool IsBigEndian(void) { -// union { -// unsigned int i; -// char c[4]; -// } bint = {0x01020304}; -// -// return bint.c[0] == 1; -//} - -static const int kEXRVersionSize = 8; - -static void swap2(unsigned short *val) { -#ifdef MINIZ_LITTLE_ENDIAN - (void)val; -#else - unsigned short tmp = *val; - unsigned char *dst = reinterpret_cast(val); - unsigned char *src = reinterpret_cast(&tmp); - - dst[0] = src[1]; - dst[1] = src[0]; -#endif -} - -static void swap4(unsigned int *val) { -#ifdef MINIZ_LITTLE_ENDIAN - (void)val; -#else - unsigned int tmp = *val; - unsigned char *dst = reinterpret_cast(val); - unsigned char *src = reinterpret_cast(&tmp); - - dst[0] = src[3]; - dst[1] = src[2]; - dst[2] = src[1]; - dst[3] = src[0]; -#endif -} - -static void swap8(tinyexr::tinyexr_uint64 *val) { -#ifdef MINIZ_LITTLE_ENDIAN - (void)val; -#else - tinyexr::tinyexr_uint64 tmp = (*val); - unsigned char *dst = reinterpret_cast(val); - unsigned char *src = reinterpret_cast(&tmp); - - dst[0] = src[7]; - dst[1] = src[6]; - dst[2] = src[5]; - dst[3] = src[4]; - dst[4] = src[3]; - dst[5] = src[2]; - dst[6] = src[1]; - dst[7] = src[0]; -#endif -} - -// https://gist.github.com/rygorous/2156668 -// Reuse MINIZ_LITTLE_ENDIAN flag from miniz. -union FP32 { - unsigned int u; - float f; - struct { -#if MINIZ_LITTLE_ENDIAN - unsigned int Mantissa : 23; - unsigned int Exponent : 8; - unsigned int Sign : 1; -#else - unsigned int Sign : 1; - unsigned int Exponent : 8; - unsigned int Mantissa : 23; -#endif - } s; -}; - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpadded" -#endif - -union FP16 { - unsigned short u; - struct { -#if MINIZ_LITTLE_ENDIAN - unsigned int Mantissa : 10; - unsigned int Exponent : 5; - unsigned int Sign : 1; -#else - unsigned int Sign : 1; - unsigned int Exponent : 5; - unsigned int Mantissa : 10; -#endif - } s; -}; - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - -static FP32 half_to_float(FP16 h) { - static const FP32 magic = {113 << 23}; - static const unsigned int shifted_exp = 0x7c00 - << 13; // exponent mask after shift - FP32 o; - - o.u = (h.u & 0x7fffU) << 13U; // exponent/mantissa bits - unsigned int exp_ = shifted_exp & o.u; // just the exponent - o.u += (127 - 15) << 23; // exponent adjust - - // handle exponent special cases - if (exp_ == shifted_exp) // Inf/NaN? - o.u += (128 - 16) << 23; // extra exp adjust - else if (exp_ == 0) // Zero/Denormal? - { - o.u += 1 << 23; // extra exp adjust - o.f -= magic.f; // renormalize - } - - o.u |= (h.u & 0x8000U) << 16U; // sign bit - return o; -} - -static FP16 float_to_half_full(FP32 f) { - FP16 o = {0}; - - // Based on ISPC reference code (with minor modifications) - if (f.s.Exponent == 0) // Signed zero/denormal (which will underflow) - o.s.Exponent = 0; - else if (f.s.Exponent == 255) // Inf or NaN (all exponent bits set) - { - o.s.Exponent = 31; - o.s.Mantissa = f.s.Mantissa ? 0x200 : 0; // NaN->qNaN and Inf->Inf - } else // Normalized number - { - // Exponent unbias the single, then bias the halfp - int newexp = f.s.Exponent - 127 + 15; - if (newexp >= 31) // Overflow, return signed infinity - o.s.Exponent = 31; - else if (newexp <= 0) // Underflow - { - if ((14 - newexp) <= 24) // Mantissa might be non-zero - { - unsigned int mant = f.s.Mantissa | 0x800000; // Hidden 1 bit - o.s.Mantissa = mant >> (14 - newexp); - if ((mant >> (13 - newexp)) & 1) // Check for rounding - o.u++; // Round, might overflow into exp bit, but this is OK - } - } else { - o.s.Exponent = static_cast(newexp); - o.s.Mantissa = f.s.Mantissa >> 13; - if (f.s.Mantissa & 0x1000) // Check for rounding - o.u++; // Round, might overflow to inf, this is OK - } - } - - o.s.Sign = f.s.Sign; - return o; -} - -// NOTE: From OpenEXR code -// #define IMF_INCREASING_Y 0 -// #define IMF_DECREASING_Y 1 -// #define IMF_RAMDOM_Y 2 -// -// #define IMF_NO_COMPRESSION 0 -// #define IMF_RLE_COMPRESSION 1 -// #define IMF_ZIPS_COMPRESSION 2 -// #define IMF_ZIP_COMPRESSION 3 -// #define IMF_PIZ_COMPRESSION 4 -// #define IMF_PXR24_COMPRESSION 5 -// #define IMF_B44_COMPRESSION 6 -// #define IMF_B44A_COMPRESSION 7 - -static const char *ReadString(std::string *s, const char *ptr) { - // Read untile NULL(\0). - const char *p = ptr; - const char *q = ptr; - while ((*q) != 0) q++; - - (*s) = std::string(p, q); - - return q + 1; // skip '\0' -} - -static bool ReadAttribute(std::string *name, std::string *type, - std::vector *data, size_t *marker_size, - const char *marker, size_t size) { - size_t name_len = strnlen(marker, size); - if (name_len == size) { - // String does not have a terminating character. - return false; - } - *name = std::string(marker, name_len); - - marker += name_len + 1; - size -= name_len + 1; - - size_t type_len = strnlen(marker, size); - if (type_len == size) { - return false; - } - *type = std::string(marker, type_len); - - marker += type_len + 1; - size -= type_len + 1; - - if (size < sizeof(uint32_t)) { - return false; - } - - uint32_t data_len; - memcpy(&data_len, marker, sizeof(uint32_t)); - tinyexr::swap4(reinterpret_cast(&data_len)); - - marker += sizeof(uint32_t); - size -= sizeof(uint32_t); - - if (size < data_len) { - return false; - } - - data->resize(static_cast(data_len)); - memcpy(&data->at(0), marker, static_cast(data_len)); - - *marker_size = name_len + 1 + type_len + 1 + sizeof(uint32_t) + data_len; - return true; -} - -static void WriteAttributeToMemory(std::vector *out, - const char *name, const char *type, - const unsigned char *data, int len) { - out->insert(out->end(), name, name + strlen(name) + 1); - out->insert(out->end(), type, type + strlen(type) + 1); - - int outLen = len; - tinyexr::swap4(reinterpret_cast(&outLen)); - out->insert(out->end(), reinterpret_cast(&outLen), - reinterpret_cast(&outLen) + sizeof(int)); - out->insert(out->end(), data, data + len); -} - -typedef struct { - std::string name; // less than 255 bytes long - int pixel_type; - int x_sampling; - int y_sampling; - unsigned char p_linear; - unsigned char pad[3]; -} ChannelInfo; - -typedef struct { - std::vector channels; - std::vector attributes; - - int data_window[4]; - int line_order; - int display_window[4]; - float screen_window_center[2]; - float screen_window_width; - float pixel_aspect_ratio; - - int chunk_count; - - // Tiled format - int tile_size_x; - int tile_size_y; - int tile_level_mode; - int tile_rounding_mode; - - unsigned int header_len; - - int compression_type; - - void clear() { - channels.clear(); - attributes.clear(); - - data_window[0] = 0; - data_window[1] = 0; - data_window[2] = 0; - data_window[3] = 0; - line_order = 0; - display_window[0] = 0; - display_window[1] = 0; - display_window[2] = 0; - display_window[3] = 0; - screen_window_center[0] = 0.0f; - screen_window_center[1] = 0.0f; - screen_window_width = 0.0f; - pixel_aspect_ratio = 0.0f; - - chunk_count = 0; - - // Tiled format - tile_size_x = 0; - tile_size_y = 0; - tile_level_mode = 0; - tile_rounding_mode = 0; - - header_len = 0; - compression_type = 0; - } -} HeaderInfo; - -static void ReadChannelInfo(std::vector &channels, - const std::vector &data) { - const char *p = reinterpret_cast(&data.at(0)); - - for (;;) { - if ((*p) == 0) { - break; - } - ChannelInfo info; - p = ReadString(&info.name, p); - - memcpy(&info.pixel_type, p, sizeof(int)); - p += 4; - info.p_linear = static_cast(p[0]); // uchar - p += 1 + 3; // reserved: uchar[3] - memcpy(&info.x_sampling, p, sizeof(int)); // int - p += 4; - memcpy(&info.y_sampling, p, sizeof(int)); // int - p += 4; - - tinyexr::swap4(reinterpret_cast(&info.pixel_type)); - tinyexr::swap4(reinterpret_cast(&info.x_sampling)); - tinyexr::swap4(reinterpret_cast(&info.y_sampling)); - - channels.push_back(info); - } -} - -static void WriteChannelInfo(std::vector &data, - const std::vector &channels) { - size_t sz = 0; - - // Calculate total size. - for (size_t c = 0; c < channels.size(); c++) { - sz += strlen(channels[c].name.c_str()) + 1; // +1 for \0 - sz += 16; // 4 * int - } - data.resize(sz + 1); - - unsigned char *p = &data.at(0); - - for (size_t c = 0; c < channels.size(); c++) { - memcpy(p, channels[c].name.c_str(), strlen(channels[c].name.c_str())); - p += strlen(channels[c].name.c_str()); - (*p) = '\0'; - p++; - - int pixel_type = channels[c].pixel_type; - int x_sampling = channels[c].x_sampling; - int y_sampling = channels[c].y_sampling; - tinyexr::swap4(reinterpret_cast(&pixel_type)); - tinyexr::swap4(reinterpret_cast(&x_sampling)); - tinyexr::swap4(reinterpret_cast(&y_sampling)); - - memcpy(p, &pixel_type, sizeof(int)); - p += sizeof(int); - - (*p) = channels[c].p_linear; - p += 4; - - memcpy(p, &x_sampling, sizeof(int)); - p += sizeof(int); - - memcpy(p, &y_sampling, sizeof(int)); - p += sizeof(int); - } - - (*p) = '\0'; -} - -static void CompressZip(unsigned char *dst, - tinyexr::tinyexr_uint64 &compressedSize, - const unsigned char *src, unsigned long src_size) { - std::vector tmpBuf(src_size); - - // - // Apply EXR-specific? postprocess. Grabbed from OpenEXR's - // ImfZipCompressor.cpp - // - - // - // Reorder the pixel data. - // - - const char *srcPtr = reinterpret_cast(src); - - { - char *t1 = reinterpret_cast(&tmpBuf.at(0)); - char *t2 = reinterpret_cast(&tmpBuf.at(0)) + (src_size + 1) / 2; - const char *stop = srcPtr + src_size; - - for (;;) { - if (srcPtr < stop) - *(t1++) = *(srcPtr++); - else - break; - - if (srcPtr < stop) - *(t2++) = *(srcPtr++); - else - break; - } - } - - // - // Predictor. - // - - { - unsigned char *t = &tmpBuf.at(0) + 1; - unsigned char *stop = &tmpBuf.at(0) + src_size; - int p = t[-1]; - - while (t < stop) { - int d = int(t[0]) - p + (128 + 256); - p = t[0]; - t[0] = static_cast(d); - ++t; - } - } - -#if TINYEXR_USE_MINIZ - // - // Compress the data using miniz - // - - miniz::mz_ulong outSize = miniz::mz_compressBound(src_size); - int ret = miniz::mz_compress( - dst, &outSize, static_cast(&tmpBuf.at(0)), - src_size); - assert(ret == miniz::MZ_OK); - (void)ret; - - compressedSize = outSize; -#else - uLong outSize = compressBound(static_cast(src_size)); - int ret = compress(dst, &outSize, static_cast(&tmpBuf.at(0)), - src_size); - assert(ret == Z_OK); - - compressedSize = outSize; -#endif -} - -static void DecompressZip(unsigned char *dst, - unsigned long *uncompressed_size /* inout */, - const unsigned char *src, unsigned long src_size) { - std::vector tmpBuf(*uncompressed_size); - -#if TINYEXR_USE_MINIZ - int ret = - miniz::mz_uncompress(&tmpBuf.at(0), uncompressed_size, src, src_size); - assert(ret == miniz::MZ_OK); - (void)ret; -#else - int ret = uncompress(&tmpBuf.at(0), uncompressed_size, src, src_size); - assert(ret == Z_OK); - (void)ret; -#endif - - // - // Apply EXR-specific? postprocess. Grabbed from OpenEXR's - // ImfZipCompressor.cpp - // - - // Predictor. - { - unsigned char *t = &tmpBuf.at(0) + 1; - unsigned char *stop = &tmpBuf.at(0) + (*uncompressed_size); - - while (t < stop) { - int d = int(t[-1]) + int(t[0]) - 128; - t[0] = static_cast(d); - ++t; - } - } - - // Reorder the pixel data. - { - const char *t1 = reinterpret_cast(&tmpBuf.at(0)); - const char *t2 = reinterpret_cast(&tmpBuf.at(0)) + - (*uncompressed_size + 1) / 2; - char *s = reinterpret_cast(dst); - char *stop = s + (*uncompressed_size); - - for (;;) { - if (s < stop) - *(s++) = *(t1++); - else - break; - - if (s < stop) - *(s++) = *(t2++); - else - break; - } - } -} - -// RLE code from OpenEXR -------------------------------------- - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wsign-conversion" -#endif - -const int MIN_RUN_LENGTH = 3; -const int MAX_RUN_LENGTH = 127; - -// -// Compress an array of bytes, using run-length encoding, -// and return the length of the compressed data. -// - -static int rleCompress(int inLength, const char in[], signed char out[]) { - const char *inEnd = in + inLength; - const char *runStart = in; - const char *runEnd = in + 1; - signed char *outWrite = out; - - while (runStart < inEnd) { - while (runEnd < inEnd && *runStart == *runEnd && - runEnd - runStart - 1 < MAX_RUN_LENGTH) { - ++runEnd; - } - - if (runEnd - runStart >= MIN_RUN_LENGTH) { - // - // Compressable run - // - - *outWrite++ = static_cast(runEnd - runStart) - 1; - *outWrite++ = *(reinterpret_cast(runStart)); - runStart = runEnd; - } else { - // - // Uncompressable run - // - - while (runEnd < inEnd && - ((runEnd + 1 >= inEnd || *runEnd != *(runEnd + 1)) || - (runEnd + 2 >= inEnd || *(runEnd + 1) != *(runEnd + 2))) && - runEnd - runStart < MAX_RUN_LENGTH) { - ++runEnd; - } - - *outWrite++ = static_cast(runStart - runEnd); - - while (runStart < runEnd) { - *outWrite++ = *(reinterpret_cast(runStart++)); - } - } - - ++runEnd; - } - - return static_cast(outWrite - out); -} - -// -// Uncompress an array of bytes compressed with rleCompress(). -// Returns the length of the oncompressed data, or 0 if the -// length of the uncompressed data would be more than maxLength. -// - -static int rleUncompress(int inLength, int maxLength, const signed char in[], - char out[]) { - char *outStart = out; - - while (inLength > 0) { - if (*in < 0) { - int count = -(static_cast(*in++)); - inLength -= count + 1; - - if (0 > (maxLength -= count)) return 0; - - memcpy(out, in, count); - out += count; - in += count; - } else { - int count = *in++; - inLength -= 2; - - if (0 > (maxLength -= count + 1)) return 0; - - memset(out, *reinterpret_cast(in), count + 1); - out += count + 1; - - in++; - } - } - - return static_cast(out - outStart); -} - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif -// End of RLE code from OpenEXR ----------------------------------- - -static void CompressRle(unsigned char *dst, - tinyexr::tinyexr_uint64 &compressedSize, - const unsigned char *src, unsigned long src_size) { - std::vector tmpBuf(src_size); - - // - // Apply EXR-specific? postprocess. Grabbed from OpenEXR's - // ImfRleCompressor.cpp - // - - // - // Reorder the pixel data. - // - - const char *srcPtr = reinterpret_cast(src); - - { - char *t1 = reinterpret_cast(&tmpBuf.at(0)); - char *t2 = reinterpret_cast(&tmpBuf.at(0)) + (src_size + 1) / 2; - const char *stop = srcPtr + src_size; - - for (;;) { - if (srcPtr < stop) - *(t1++) = *(srcPtr++); - else - break; - - if (srcPtr < stop) - *(t2++) = *(srcPtr++); - else - break; - } - } - - // - // Predictor. - // - - { - unsigned char *t = &tmpBuf.at(0) + 1; - unsigned char *stop = &tmpBuf.at(0) + src_size; - int p = t[-1]; - - while (t < stop) { - int d = int(t[0]) - p + (128 + 256); - p = t[0]; - t[0] = static_cast(d); - ++t; - } - } - - // outSize will be (srcSiz * 3) / 2 at max. - int outSize = rleCompress(static_cast(src_size), - reinterpret_cast(&tmpBuf.at(0)), - reinterpret_cast(dst)); - assert(outSize > 0); - - compressedSize = static_cast(outSize); -} - -static void DecompressRle(unsigned char *dst, - const unsigned long uncompressed_size, - const unsigned char *src, unsigned long src_size) { - std::vector tmpBuf(uncompressed_size); - - int ret = rleUncompress(static_cast(src_size), - static_cast(uncompressed_size), - reinterpret_cast(src), - reinterpret_cast(&tmpBuf.at(0))); - assert(ret == static_cast(uncompressed_size)); - (void)ret; - - // - // Apply EXR-specific? postprocess. Grabbed from OpenEXR's - // ImfRleCompressor.cpp - // - - // Predictor. - { - unsigned char *t = &tmpBuf.at(0) + 1; - unsigned char *stop = &tmpBuf.at(0) + uncompressed_size; - - while (t < stop) { - int d = int(t[-1]) + int(t[0]) - 128; - t[0] = static_cast(d); - ++t; - } - } - - // Reorder the pixel data. - { - const char *t1 = reinterpret_cast(&tmpBuf.at(0)); - const char *t2 = reinterpret_cast(&tmpBuf.at(0)) + - (uncompressed_size + 1) / 2; - char *s = reinterpret_cast(dst); - char *stop = s + uncompressed_size; - - for (;;) { - if (s < stop) - *(s++) = *(t1++); - else - break; - - if (s < stop) - *(s++) = *(t2++); - else - break; - } - } -} - -#if TINYEXR_USE_PIZ - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wc++11-long-long" -#pragma clang diagnostic ignored "-Wold-style-cast" -#pragma clang diagnostic ignored "-Wpadded" -#pragma clang diagnostic ignored "-Wsign-conversion" -#pragma clang diagnostic ignored "-Wc++11-extensions" -#pragma clang diagnostic ignored "-Wconversion" -#endif - -// -// PIZ compress/uncompress, based on OpenEXR's ImfPizCompressor.cpp -// -// ----------------------------------------------------------------- -// Copyright (c) 2004, Industrial Light & Magic, a division of Lucas -// Digital Ltd. LLC) -// (3 clause BSD license) -// - -struct PIZChannelData { - unsigned short *start; - unsigned short *end; - int nx; - int ny; - int ys; - int size; -}; - -//----------------------------------------------------------------------------- -// -// 16-bit Haar Wavelet encoding and decoding -// -// The source code in this file is derived from the encoding -// and decoding routines written by Christian Rouet for his -// PIZ image file format. -// -//----------------------------------------------------------------------------- - -// -// Wavelet basis functions without modulo arithmetic; they produce -// the best compression ratios when the wavelet-transformed data are -// Huffman-encoded, but the wavelet transform works only for 14-bit -// data (untransformed data values must be less than (1 << 14)). -// - -inline void wenc14(unsigned short a, unsigned short b, unsigned short &l, - unsigned short &h) { - short as = static_cast(a); - short bs = static_cast(b); - - short ms = (as + bs) >> 1; - short ds = as - bs; - - l = static_cast(ms); - h = static_cast(ds); -} - -inline void wdec14(unsigned short l, unsigned short h, unsigned short &a, - unsigned short &b) { - short ls = static_cast(l); - short hs = static_cast(h); - - int hi = hs; - int ai = ls + (hi & 1) + (hi >> 1); - - short as = static_cast(ai); - short bs = static_cast(ai - hi); - - a = static_cast(as); - b = static_cast(bs); -} - -// -// Wavelet basis functions with modulo arithmetic; they work with full -// 16-bit data, but Huffman-encoding the wavelet-transformed data doesn't -// compress the data quite as well. -// - -const int NBITS = 16; -const int A_OFFSET = 1 << (NBITS - 1); -const int M_OFFSET = 1 << (NBITS - 1); -const int MOD_MASK = (1 << NBITS) - 1; - -inline void wenc16(unsigned short a, unsigned short b, unsigned short &l, - unsigned short &h) { - int ao = (a + A_OFFSET) & MOD_MASK; - int m = ((ao + b) >> 1); - int d = ao - b; - - if (d < 0) m = (m + M_OFFSET) & MOD_MASK; - - d &= MOD_MASK; - - l = static_cast(m); - h = static_cast(d); -} - -inline void wdec16(unsigned short l, unsigned short h, unsigned short &a, - unsigned short &b) { - int m = l; - int d = h; - int bb = (m - (d >> 1)) & MOD_MASK; - int aa = (d + bb - A_OFFSET) & MOD_MASK; - b = static_cast(bb); - a = static_cast(aa); -} - -// -// 2D Wavelet encoding: -// - -static void wav2Encode( - unsigned short *in, // io: values are transformed in place - int nx, // i : x size - int ox, // i : x offset - int ny, // i : y size - int oy, // i : y offset - unsigned short mx) // i : maximum in[x][y] value -{ - bool w14 = (mx < (1 << 14)); - int n = (nx > ny) ? ny : nx; - int p = 1; // == 1 << level - int p2 = 2; // == 1 << (level+1) - - // - // Hierachical loop on smaller dimension n - // - - while (p2 <= n) { - unsigned short *py = in; - unsigned short *ey = in + oy * (ny - p2); - int oy1 = oy * p; - int oy2 = oy * p2; - int ox1 = ox * p; - int ox2 = ox * p2; - unsigned short i00, i01, i10, i11; - - // - // Y loop - // - - for (; py <= ey; py += oy2) { - unsigned short *px = py; - unsigned short *ex = py + ox * (nx - p2); - - // - // X loop - // - - for (; px <= ex; px += ox2) { - unsigned short *p01 = px + ox1; - unsigned short *p10 = px + oy1; - unsigned short *p11 = p10 + ox1; - - // - // 2D wavelet encoding - // - - if (w14) { - wenc14(*px, *p01, i00, i01); - wenc14(*p10, *p11, i10, i11); - wenc14(i00, i10, *px, *p10); - wenc14(i01, i11, *p01, *p11); - } else { - wenc16(*px, *p01, i00, i01); - wenc16(*p10, *p11, i10, i11); - wenc16(i00, i10, *px, *p10); - wenc16(i01, i11, *p01, *p11); - } - } - - // - // Encode (1D) odd column (still in Y loop) - // - - if (nx & p) { - unsigned short *p10 = px + oy1; - - if (w14) - wenc14(*px, *p10, i00, *p10); - else - wenc16(*px, *p10, i00, *p10); - - *px = i00; - } - } - - // - // Encode (1D) odd line (must loop in X) - // - - if (ny & p) { - unsigned short *px = py; - unsigned short *ex = py + ox * (nx - p2); - - for (; px <= ex; px += ox2) { - unsigned short *p01 = px + ox1; - - if (w14) - wenc14(*px, *p01, i00, *p01); - else - wenc16(*px, *p01, i00, *p01); - - *px = i00; - } - } - - // - // Next level - // - - p = p2; - p2 <<= 1; - } -} - -// -// 2D Wavelet decoding: -// - -static void wav2Decode( - unsigned short *in, // io: values are transformed in place - int nx, // i : x size - int ox, // i : x offset - int ny, // i : y size - int oy, // i : y offset - unsigned short mx) // i : maximum in[x][y] value -{ - bool w14 = (mx < (1 << 14)); - int n = (nx > ny) ? ny : nx; - int p = 1; - int p2; - - // - // Search max level - // - - while (p <= n) p <<= 1; - - p >>= 1; - p2 = p; - p >>= 1; - - // - // Hierarchical loop on smaller dimension n - // - - while (p >= 1) { - unsigned short *py = in; - unsigned short *ey = in + oy * (ny - p2); - int oy1 = oy * p; - int oy2 = oy * p2; - int ox1 = ox * p; - int ox2 = ox * p2; - unsigned short i00, i01, i10, i11; - - // - // Y loop - // - - for (; py <= ey; py += oy2) { - unsigned short *px = py; - unsigned short *ex = py + ox * (nx - p2); - - // - // X loop - // - - for (; px <= ex; px += ox2) { - unsigned short *p01 = px + ox1; - unsigned short *p10 = px + oy1; - unsigned short *p11 = p10 + ox1; - - // - // 2D wavelet decoding - // - - if (w14) { - wdec14(*px, *p10, i00, i10); - wdec14(*p01, *p11, i01, i11); - wdec14(i00, i01, *px, *p01); - wdec14(i10, i11, *p10, *p11); - } else { - wdec16(*px, *p10, i00, i10); - wdec16(*p01, *p11, i01, i11); - wdec16(i00, i01, *px, *p01); - wdec16(i10, i11, *p10, *p11); - } - } - - // - // Decode (1D) odd column (still in Y loop) - // - - if (nx & p) { - unsigned short *p10 = px + oy1; - - if (w14) - wdec14(*px, *p10, i00, *p10); - else - wdec16(*px, *p10, i00, *p10); - - *px = i00; - } - } - - // - // Decode (1D) odd line (must loop in X) - // - - if (ny & p) { - unsigned short *px = py; - unsigned short *ex = py + ox * (nx - p2); - - for (; px <= ex; px += ox2) { - unsigned short *p01 = px + ox1; - - if (w14) - wdec14(*px, *p01, i00, *p01); - else - wdec16(*px, *p01, i00, *p01); - - *px = i00; - } - } - - // - // Next level - // - - p2 = p; - p >>= 1; - } -} - -//----------------------------------------------------------------------------- -// -// 16-bit Huffman compression and decompression. -// -// The source code in this file is derived from the 8-bit -// Huffman compression and decompression routines written -// by Christian Rouet for his PIZ image file format. -// -//----------------------------------------------------------------------------- - -// Adds some modification for tinyexr. - -const int HUF_ENCBITS = 16; // literal (value) bit length -const int HUF_DECBITS = 14; // decoding bit size (>= 8) - -const int HUF_ENCSIZE = (1 << HUF_ENCBITS) + 1; // encoding table size -const int HUF_DECSIZE = 1 << HUF_DECBITS; // decoding table size -const int HUF_DECMASK = HUF_DECSIZE - 1; - -struct HufDec { // short code long code - //------------------------------- - int len : 8; // code length 0 - int lit : 24; // lit p size - int *p; // 0 lits -}; - -inline long long hufLength(long long code) { return code & 63; } - -inline long long hufCode(long long code) { return code >> 6; } - -inline void outputBits(int nBits, long long bits, long long &c, int &lc, - char *&out) { - c <<= nBits; - lc += nBits; - - c |= bits; - - while (lc >= 8) *out++ = static_cast((c >> (lc -= 8))); -} - -inline long long getBits(int nBits, long long &c, int &lc, const char *&in) { - while (lc < nBits) { - c = (c << 8) | *(reinterpret_cast(in++)); - lc += 8; - } - - lc -= nBits; - return (c >> lc) & ((1 << nBits) - 1); -} - -// -// ENCODING TABLE BUILDING & (UN)PACKING -// - -// -// Build a "canonical" Huffman code table: -// - for each (uncompressed) symbol, hcode contains the length -// of the corresponding code (in the compressed data) -// - canonical codes are computed and stored in hcode -// - the rules for constructing canonical codes are as follows: -// * shorter codes (if filled with zeroes to the right) -// have a numerically higher value than longer codes -// * for codes with the same length, numerical values -// increase with numerical symbol values -// - because the canonical code table can be constructed from -// symbol lengths alone, the code table can be transmitted -// without sending the actual code values -// - see http://www.compressconsult.com/huffman/ -// - -static void hufCanonicalCodeTable(long long hcode[HUF_ENCSIZE]) { - long long n[59]; - - // - // For each i from 0 through 58, count the - // number of different codes of length i, and - // store the count in n[i]. - // - - for (int i = 0; i <= 58; ++i) n[i] = 0; - - for (int i = 0; i < HUF_ENCSIZE; ++i) n[hcode[i]] += 1; - - // - // For each i from 58 through 1, compute the - // numerically lowest code with length i, and - // store that code in n[i]. - // - - long long c = 0; - - for (int i = 58; i > 0; --i) { - long long nc = ((c + n[i]) >> 1); - n[i] = c; - c = nc; - } - - // - // hcode[i] contains the length, l, of the - // code for symbol i. Assign the next available - // code of length l to the symbol and store both - // l and the code in hcode[i]. - // - - for (int i = 0; i < HUF_ENCSIZE; ++i) { - int l = static_cast(hcode[i]); - - if (l > 0) hcode[i] = l | (n[l]++ << 6); - } -} - -// -// Compute Huffman codes (based on frq input) and store them in frq: -// - code structure is : [63:lsb - 6:msb] | [5-0: bit length]; -// - max code length is 58 bits; -// - codes outside the range [im-iM] have a null length (unused values); -// - original frequencies are destroyed; -// - encoding tables are used by hufEncode() and hufBuildDecTable(); -// - -struct FHeapCompare { - bool operator()(long long *a, long long *b) { return *a > *b; } -}; - -static void hufBuildEncTable( - long long *frq, // io: input frequencies [HUF_ENCSIZE], output table - int *im, // o: min frq index - int *iM) // o: max frq index -{ - // - // This function assumes that when it is called, array frq - // indicates the frequency of all possible symbols in the data - // that are to be Huffman-encoded. (frq[i] contains the number - // of occurrences of symbol i in the data.) - // - // The loop below does three things: - // - // 1) Finds the minimum and maximum indices that point - // to non-zero entries in frq: - // - // frq[im] != 0, and frq[i] == 0 for all i < im - // frq[iM] != 0, and frq[i] == 0 for all i > iM - // - // 2) Fills array fHeap with pointers to all non-zero - // entries in frq. - // - // 3) Initializes array hlink such that hlink[i] == i - // for all array entries. - // - - int hlink[HUF_ENCSIZE]; - long long *fHeap[HUF_ENCSIZE]; - - *im = 0; - - while (!frq[*im]) (*im)++; - - int nf = 0; - - for (int i = *im; i < HUF_ENCSIZE; i++) { - hlink[i] = i; - - if (frq[i]) { - fHeap[nf] = &frq[i]; - nf++; - *iM = i; - } - } - - // - // Add a pseudo-symbol, with a frequency count of 1, to frq; - // adjust the fHeap and hlink array accordingly. Function - // hufEncode() uses the pseudo-symbol for run-length encoding. - // - - (*iM)++; - frq[*iM] = 1; - fHeap[nf] = &frq[*iM]; - nf++; - - // - // Build an array, scode, such that scode[i] contains the number - // of bits assigned to symbol i. Conceptually this is done by - // constructing a tree whose leaves are the symbols with non-zero - // frequency: - // - // Make a heap that contains all symbols with a non-zero frequency, - // with the least frequent symbol on top. - // - // Repeat until only one symbol is left on the heap: - // - // Take the two least frequent symbols off the top of the heap. - // Create a new node that has first two nodes as children, and - // whose frequency is the sum of the frequencies of the first - // two nodes. Put the new node back into the heap. - // - // The last node left on the heap is the root of the tree. For each - // leaf node, the distance between the root and the leaf is the length - // of the code for the corresponding symbol. - // - // The loop below doesn't actually build the tree; instead we compute - // the distances of the leaves from the root on the fly. When a new - // node is added to the heap, then that node's descendants are linked - // into a single linear list that starts at the new node, and the code - // lengths of the descendants (that is, their distance from the root - // of the tree) are incremented by one. - // - - std::make_heap(&fHeap[0], &fHeap[nf], FHeapCompare()); - - long long scode[HUF_ENCSIZE]; - memset(scode, 0, sizeof(long long) * HUF_ENCSIZE); - - while (nf > 1) { - // - // Find the indices, mm and m, of the two smallest non-zero frq - // values in fHeap, add the smallest frq to the second-smallest - // frq, and remove the smallest frq value from fHeap. - // - - int mm = fHeap[0] - frq; - std::pop_heap(&fHeap[0], &fHeap[nf], FHeapCompare()); - --nf; - - int m = fHeap[0] - frq; - std::pop_heap(&fHeap[0], &fHeap[nf], FHeapCompare()); - - frq[m] += frq[mm]; - std::push_heap(&fHeap[0], &fHeap[nf], FHeapCompare()); - - // - // The entries in scode are linked into lists with the - // entries in hlink serving as "next" pointers and with - // the end of a list marked by hlink[j] == j. - // - // Traverse the lists that start at scode[m] and scode[mm]. - // For each element visited, increment the length of the - // corresponding code by one bit. (If we visit scode[j] - // during the traversal, then the code for symbol j becomes - // one bit longer.) - // - // Merge the lists that start at scode[m] and scode[mm] - // into a single list that starts at scode[m]. - // - - // - // Add a bit to all codes in the first list. - // - - for (int j = m;; j = hlink[j]) { - scode[j]++; - - assert(scode[j] <= 58); - - if (hlink[j] == j) { - // - // Merge the two lists. - // - - hlink[j] = mm; - break; - } - } - - // - // Add a bit to all codes in the second list - // - - for (int j = mm;; j = hlink[j]) { - scode[j]++; - - assert(scode[j] <= 58); - - if (hlink[j] == j) break; - } - } - - // - // Build a canonical Huffman code table, replacing the code - // lengths in scode with (code, code length) pairs. Copy the - // code table from scode into frq. - // - - hufCanonicalCodeTable(scode); - memcpy(frq, scode, sizeof(long long) * HUF_ENCSIZE); -} - -// -// Pack an encoding table: -// - only code lengths, not actual codes, are stored -// - runs of zeroes are compressed as follows: -// -// unpacked packed -// -------------------------------- -// 1 zero 0 (6 bits) -// 2 zeroes 59 -// 3 zeroes 60 -// 4 zeroes 61 -// 5 zeroes 62 -// n zeroes (6 or more) 63 n-6 (6 + 8 bits) -// - -const int SHORT_ZEROCODE_RUN = 59; -const int LONG_ZEROCODE_RUN = 63; -const int SHORTEST_LONG_RUN = 2 + LONG_ZEROCODE_RUN - SHORT_ZEROCODE_RUN; -const int LONGEST_LONG_RUN = 255 + SHORTEST_LONG_RUN; - -static void hufPackEncTable( - const long long *hcode, // i : encoding table [HUF_ENCSIZE] - int im, // i : min hcode index - int iM, // i : max hcode index - char **pcode) // o: ptr to packed table (updated) -{ - char *p = *pcode; - long long c = 0; - int lc = 0; - - for (; im <= iM; im++) { - int l = hufLength(hcode[im]); - - if (l == 0) { - int zerun = 1; - - while ((im < iM) && (zerun < LONGEST_LONG_RUN)) { - if (hufLength(hcode[im + 1]) > 0) break; - im++; - zerun++; - } - - if (zerun >= 2) { - if (zerun >= SHORTEST_LONG_RUN) { - outputBits(6, LONG_ZEROCODE_RUN, c, lc, p); - outputBits(8, zerun - SHORTEST_LONG_RUN, c, lc, p); - } else { - outputBits(6, SHORT_ZEROCODE_RUN + zerun - 2, c, lc, p); - } - continue; - } - } - - outputBits(6, l, c, lc, p); - } - - if (lc > 0) *p++ = (unsigned char)(c << (8 - lc)); - - *pcode = p; -} - -// -// Unpack an encoding table packed by hufPackEncTable(): -// - -static bool hufUnpackEncTable( - const char **pcode, // io: ptr to packed table (updated) - int ni, // i : input size (in bytes) - int im, // i : min hcode index - int iM, // i : max hcode index - long long *hcode) // o: encoding table [HUF_ENCSIZE] -{ - memset(hcode, 0, sizeof(long long) * HUF_ENCSIZE); - - const char *p = *pcode; - long long c = 0; - int lc = 0; - - for (; im <= iM; im++) { - if (p - *pcode > ni) { - return false; - } - - long long l = hcode[im] = getBits(6, c, lc, p); // code length - - if (l == (long long)LONG_ZEROCODE_RUN) { - if (p - *pcode > ni) { - return false; - } - - int zerun = getBits(8, c, lc, p) + SHORTEST_LONG_RUN; - - if (im + zerun > iM + 1) { - return false; - } - - while (zerun--) hcode[im++] = 0; - - im--; - } else if (l >= (long long)SHORT_ZEROCODE_RUN) { - int zerun = l - SHORT_ZEROCODE_RUN + 2; - - if (im + zerun > iM + 1) { - return false; - } - - while (zerun--) hcode[im++] = 0; - - im--; - } - } - - *pcode = const_cast(p); - - hufCanonicalCodeTable(hcode); - - return true; -} - -// -// DECODING TABLE BUILDING -// - -// -// Clear a newly allocated decoding table so that it contains only zeroes. -// - -static void hufClearDecTable(HufDec *hdecod) // io: (allocated by caller) -// decoding table [HUF_DECSIZE] -{ - for (int i = 0; i < HUF_DECSIZE; i++) { - hdecod[i].len = 0; - hdecod[i].lit = 0; - hdecod[i].p = NULL; - } - // memset(hdecod, 0, sizeof(HufDec) * HUF_DECSIZE); -} - -// -// Build a decoding hash table based on the encoding table hcode: -// - short codes (<= HUF_DECBITS) are resolved with a single table access; -// - long code entry allocations are not optimized, because long codes are -// unfrequent; -// - decoding tables are used by hufDecode(); -// - -static bool hufBuildDecTable(const long long *hcode, // i : encoding table - int im, // i : min index in hcode - int iM, // i : max index in hcode - HufDec *hdecod) // o: (allocated by caller) -// decoding table [HUF_DECSIZE] -{ - // - // Init hashtable & loop on all codes. - // Assumes that hufClearDecTable(hdecod) has already been called. - // - - for (; im <= iM; im++) { - long long c = hufCode(hcode[im]); - int l = hufLength(hcode[im]); - - if (c >> l) { - // - // Error: c is supposed to be an l-bit code, - // but c contains a value that is greater - // than the largest l-bit number. - // - - // invalidTableEntry(); - return false; - } - - if (l > HUF_DECBITS) { - // - // Long code: add a secondary entry - // - - HufDec *pl = hdecod + (c >> (l - HUF_DECBITS)); - - if (pl->len) { - // - // Error: a short code has already - // been stored in table entry *pl. - // - - // invalidTableEntry(); - return false; - } - - pl->lit++; - - if (pl->p) { - int *p = pl->p; - pl->p = new int[pl->lit]; - - for (int i = 0; i < pl->lit - 1; ++i) pl->p[i] = p[i]; - - delete[] p; - } else { - pl->p = new int[1]; - } - - pl->p[pl->lit - 1] = im; - } else if (l) { - // - // Short code: init all primary entries - // - - HufDec *pl = hdecod + (c << (HUF_DECBITS - l)); - - for (long long i = 1ULL << (HUF_DECBITS - l); i > 0; i--, pl++) { - if (pl->len || pl->p) { - // - // Error: a short code or a long code has - // already been stored in table entry *pl. - // - - // invalidTableEntry(); - return false; - } - - pl->len = l; - pl->lit = im; - } - } - } - - return true; -} - -// -// Free the long code entries of a decoding table built by hufBuildDecTable() -// - -static void hufFreeDecTable(HufDec *hdecod) // io: Decoding table -{ - for (int i = 0; i < HUF_DECSIZE; i++) { - if (hdecod[i].p) { - delete[] hdecod[i].p; - hdecod[i].p = 0; - } - } -} - -// -// ENCODING -// - -inline void outputCode(long long code, long long &c, int &lc, char *&out) { - outputBits(hufLength(code), hufCode(code), c, lc, out); -} - -inline void sendCode(long long sCode, int runCount, long long runCode, - long long &c, int &lc, char *&out) { - // - // Output a run of runCount instances of the symbol sCount. - // Output the symbols explicitly, or if that is shorter, output - // the sCode symbol once followed by a runCode symbol and runCount - // expressed as an 8-bit number. - // - - if (hufLength(sCode) + hufLength(runCode) + 8 < hufLength(sCode) * runCount) { - outputCode(sCode, c, lc, out); - outputCode(runCode, c, lc, out); - outputBits(8, runCount, c, lc, out); - } else { - while (runCount-- >= 0) outputCode(sCode, c, lc, out); - } -} - -// -// Encode (compress) ni values based on the Huffman encoding table hcode: -// - -static int hufEncode // return: output size (in bits) - (const long long *hcode, // i : encoding table - const unsigned short *in, // i : uncompressed input buffer - const int ni, // i : input buffer size (in bytes) - int rlc, // i : rl code - char *out) // o: compressed output buffer -{ - char *outStart = out; - long long c = 0; // bits not yet written to out - int lc = 0; // number of valid bits in c (LSB) - int s = in[0]; - int cs = 0; - - // - // Loop on input values - // - - for (int i = 1; i < ni; i++) { - // - // Count same values or send code - // - - if (s == in[i] && cs < 255) { - cs++; - } else { - sendCode(hcode[s], cs, hcode[rlc], c, lc, out); - cs = 0; - } - - s = in[i]; - } - - // - // Send remaining code - // - - sendCode(hcode[s], cs, hcode[rlc], c, lc, out); - - if (lc) *out = (c << (8 - lc)) & 0xff; - - return (out - outStart) * 8 + lc; -} - -// -// DECODING -// - -// -// In order to force the compiler to inline them, -// getChar() and getCode() are implemented as macros -// instead of "inline" functions. -// - -#define getChar(c, lc, in) \ - { \ - c = (c << 8) | *(unsigned char *)(in++); \ - lc += 8; \ - } - -#define getCode(po, rlc, c, lc, in, out, oe) \ - { \ - if (po == rlc) { \ - if (lc < 8) getChar(c, lc, in); \ - \ - lc -= 8; \ - \ - unsigned char cs = (c >> lc); \ - \ - if (out + cs > oe) return false; \ - \ - unsigned short s = out[-1]; \ - \ - while (cs-- > 0) *out++ = s; \ - } else if (out < oe) { \ - *out++ = po; \ - } else { \ - return false; \ - } \ - } - -// -// Decode (uncompress) ni bits based on encoding & decoding tables: -// - -static bool hufDecode(const long long *hcode, // i : encoding table - const HufDec *hdecod, // i : decoding table - const char *in, // i : compressed input buffer - int ni, // i : input size (in bits) - int rlc, // i : run-length code - int no, // i : expected output size (in bytes) - unsigned short *out) // o: uncompressed output buffer -{ - long long c = 0; - int lc = 0; - unsigned short *outb = out; - unsigned short *oe = out + no; - const char *ie = in + (ni + 7) / 8; // input byte size - - // - // Loop on input bytes - // - - while (in < ie) { - getChar(c, lc, in); - - // - // Access decoding table - // - - while (lc >= HUF_DECBITS) { - const HufDec pl = hdecod[(c >> (lc - HUF_DECBITS)) & HUF_DECMASK]; - - if (pl.len) { - // - // Get short code - // - - lc -= pl.len; - getCode(pl.lit, rlc, c, lc, in, out, oe); - } else { - if (!pl.p) { - return false; - } - // invalidCode(); // wrong code - - // - // Search long code - // - - int j; - - for (j = 0; j < pl.lit; j++) { - int l = hufLength(hcode[pl.p[j]]); - - while (lc < l && in < ie) // get more bits - getChar(c, lc, in); - - if (lc >= l) { - if (hufCode(hcode[pl.p[j]]) == - ((c >> (lc - l)) & (((long long)(1) << l) - 1))) { - // - // Found : get long code - // - - lc -= l; - getCode(pl.p[j], rlc, c, lc, in, out, oe); - break; - } - } - } - - if (j == pl.lit) { - return false; - // invalidCode(); // Not found - } - } - } - } - - // - // Get remaining (short) codes - // - - int i = (8 - ni) & 7; - c >>= i; - lc -= i; - - while (lc > 0) { - const HufDec pl = hdecod[(c << (HUF_DECBITS - lc)) & HUF_DECMASK]; - - if (pl.len) { - lc -= pl.len; - getCode(pl.lit, rlc, c, lc, in, out, oe); - } else { - return false; - // invalidCode(); // wrong (long) code - } - } - - if (out - outb != no) { - return false; - } - // notEnoughData (); - - return true; -} - -static void countFrequencies(long long freq[HUF_ENCSIZE], - const unsigned short data[/*n*/], int n) { - for (int i = 0; i < HUF_ENCSIZE; ++i) freq[i] = 0; - - for (int i = 0; i < n; ++i) ++freq[data[i]]; -} - -static void writeUInt(char buf[4], unsigned int i) { - unsigned char *b = (unsigned char *)buf; - - b[0] = i; - b[1] = i >> 8; - b[2] = i >> 16; - b[3] = i >> 24; -} - -static unsigned int readUInt(const char buf[4]) { - const unsigned char *b = (const unsigned char *)buf; - - return (b[0] & 0x000000ff) | ((b[1] << 8) & 0x0000ff00) | - ((b[2] << 16) & 0x00ff0000) | ((b[3] << 24) & 0xff000000); -} - -// -// EXTERNAL INTERFACE -// - -static int hufCompress(const unsigned short raw[], int nRaw, - char compressed[]) { - if (nRaw == 0) return 0; - - long long freq[HUF_ENCSIZE]; - - countFrequencies(freq, raw, nRaw); - - int im = 0; - int iM = 0; - hufBuildEncTable(freq, &im, &iM); - - char *tableStart = compressed + 20; - char *tableEnd = tableStart; - hufPackEncTable(freq, im, iM, &tableEnd); - int tableLength = tableEnd - tableStart; - - char *dataStart = tableEnd; - int nBits = hufEncode(freq, raw, nRaw, iM, dataStart); - int data_length = (nBits + 7) / 8; - - writeUInt(compressed, im); - writeUInt(compressed + 4, iM); - writeUInt(compressed + 8, tableLength); - writeUInt(compressed + 12, nBits); - writeUInt(compressed + 16, 0); // room for future extensions - - return dataStart + data_length - compressed; -} - -static bool hufUncompress(const char compressed[], int nCompressed, - unsigned short raw[], int nRaw) { - if (nCompressed == 0) { - if (nRaw != 0) return false; - - return false; - } - - int im = readUInt(compressed); - int iM = readUInt(compressed + 4); - // int tableLength = readUInt (compressed + 8); - int nBits = readUInt(compressed + 12); - - if (im < 0 || im >= HUF_ENCSIZE || iM < 0 || iM >= HUF_ENCSIZE) return false; - - const char *ptr = compressed + 20; - - // - // Fast decoder needs at least 2x64-bits of compressed data, and - // needs to be run-able on this platform. Otherwise, fall back - // to the original decoder - // - - // if (FastHufDecoder::enabled() && nBits > 128) - //{ - // FastHufDecoder fhd (ptr, nCompressed - (ptr - compressed), im, iM, iM); - // fhd.decode ((unsigned char*)ptr, nBits, raw, nRaw); - //} - // else - { - std::vector freq(HUF_ENCSIZE); - std::vector hdec(HUF_DECSIZE); - - hufClearDecTable(&hdec.at(0)); - - hufUnpackEncTable(&ptr, nCompressed - (ptr - compressed), im, iM, - &freq.at(0)); - - { - if (nBits > 8 * (nCompressed - (ptr - compressed))) { - return false; - } - - hufBuildDecTable(&freq.at(0), im, iM, &hdec.at(0)); - hufDecode(&freq.at(0), &hdec.at(0), ptr, nBits, iM, nRaw, raw); - } - // catch (...) - //{ - // hufFreeDecTable (hdec); - // throw; - //} - - hufFreeDecTable(&hdec.at(0)); - } - - return true; -} - -// -// Functions to compress the range of values in the pixel data -// - -const int USHORT_RANGE = (1 << 16); -const int BITMAP_SIZE = (USHORT_RANGE >> 3); - -static void bitmapFromData(const unsigned short data[/*nData*/], int nData, - unsigned char bitmap[BITMAP_SIZE], - unsigned short &minNonZero, - unsigned short &maxNonZero) { - for (int i = 0; i < BITMAP_SIZE; ++i) bitmap[i] = 0; - - for (int i = 0; i < nData; ++i) bitmap[data[i] >> 3] |= (1 << (data[i] & 7)); - - bitmap[0] &= ~1; // zero is not explicitly stored in - // the bitmap; we assume that the - // data always contain zeroes - minNonZero = BITMAP_SIZE - 1; - maxNonZero = 0; - - for (int i = 0; i < BITMAP_SIZE; ++i) { - if (bitmap[i]) { - if (minNonZero > i) minNonZero = i; - if (maxNonZero < i) maxNonZero = i; - } - } -} - -static unsigned short forwardLutFromBitmap( - const unsigned char bitmap[BITMAP_SIZE], unsigned short lut[USHORT_RANGE]) { - int k = 0; - - for (int i = 0; i < USHORT_RANGE; ++i) { - if ((i == 0) || (bitmap[i >> 3] & (1 << (i & 7)))) - lut[i] = k++; - else - lut[i] = 0; - } - - return k - 1; // maximum value stored in lut[], -} // i.e. number of ones in bitmap minus 1 - -static unsigned short reverseLutFromBitmap( - const unsigned char bitmap[BITMAP_SIZE], unsigned short lut[USHORT_RANGE]) { - int k = 0; - - for (int i = 0; i < USHORT_RANGE; ++i) { - if ((i == 0) || (bitmap[i >> 3] & (1 << (i & 7)))) lut[k++] = i; - } - - int n = k - 1; - - while (k < USHORT_RANGE) lut[k++] = 0; - - return n; // maximum k where lut[k] is non-zero, -} // i.e. number of ones in bitmap minus 1 - -static void applyLut(const unsigned short lut[USHORT_RANGE], - unsigned short data[/*nData*/], int nData) { - for (int i = 0; i < nData; ++i) data[i] = lut[data[i]]; -} - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif // __clang__ - -static bool CompressPiz(unsigned char *outPtr, unsigned int &outSize, - const unsigned char *inPtr, size_t inSize, - const std::vector &channelInfo, - int data_width, int num_lines) { - unsigned char bitmap[BITMAP_SIZE]; - unsigned short minNonZero; - unsigned short maxNonZero; - -#if !MINIZ_LITTLE_ENDIAN - // @todo { PIZ compression on BigEndian architecture. } - assert(0); - return false; -#endif - - // Assume `inSize` is multiple of 2 or 4. - std::vector tmpBuffer(inSize / sizeof(unsigned short)); - - std::vector channelData(channelInfo.size()); - unsigned short *tmpBufferEnd = &tmpBuffer.at(0); - - for (size_t c = 0; c < channelData.size(); c++) { - PIZChannelData &cd = channelData[c]; - - cd.start = tmpBufferEnd; - cd.end = cd.start; - - cd.nx = data_width; - cd.ny = num_lines; - // cd.ys = c.channel().ySampling; - - size_t pixelSize = sizeof(int); // UINT and FLOAT - if (channelInfo[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { - pixelSize = sizeof(short); - } - - cd.size = static_cast(pixelSize / sizeof(short)); - - tmpBufferEnd += cd.nx * cd.ny * cd.size; - } - - const unsigned char *ptr = inPtr; - for (int y = 0; y < num_lines; ++y) { - for (size_t i = 0; i < channelData.size(); ++i) { - PIZChannelData &cd = channelData[i]; - - // if (modp (y, cd.ys) != 0) - // continue; - - size_t n = static_cast(cd.nx * cd.size); - memcpy(cd.end, ptr, n * sizeof(unsigned short)); - ptr += n * sizeof(unsigned short); - cd.end += n; - } - } - - bitmapFromData(&tmpBuffer.at(0), static_cast(tmpBuffer.size()), bitmap, - minNonZero, maxNonZero); - - unsigned short lut[USHORT_RANGE]; - unsigned short maxValue = forwardLutFromBitmap(bitmap, lut); - applyLut(lut, &tmpBuffer.at(0), static_cast(tmpBuffer.size())); - - // - // Store range compression info in _outBuffer - // - - char *buf = reinterpret_cast(outPtr); - - memcpy(buf, &minNonZero, sizeof(unsigned short)); - buf += sizeof(unsigned short); - memcpy(buf, &maxNonZero, sizeof(unsigned short)); - buf += sizeof(unsigned short); - - if (minNonZero <= maxNonZero) { - memcpy(buf, reinterpret_cast(&bitmap[0] + minNonZero), - maxNonZero - minNonZero + 1); - buf += maxNonZero - minNonZero + 1; - } - - // - // Apply wavelet encoding - // - - for (size_t i = 0; i < channelData.size(); ++i) { - PIZChannelData &cd = channelData[i]; - - for (int j = 0; j < cd.size; ++j) { - wav2Encode(cd.start + j, cd.nx, cd.size, cd.ny, cd.nx * cd.size, - maxValue); - } - } - - // - // Apply Huffman encoding; append the result to _outBuffer - // - - // length header(4byte), then huff data. Initialize length header with zero, - // then later fill it by `length`. - char *lengthPtr = buf; - int zero = 0; - memcpy(buf, &zero, sizeof(int)); - buf += sizeof(int); - - int length = - hufCompress(&tmpBuffer.at(0), static_cast(tmpBuffer.size()), buf); - memcpy(lengthPtr, &length, sizeof(int)); - - outSize = static_cast( - (reinterpret_cast(buf) - outPtr) + - static_cast(length)); - return true; -} - -static bool DecompressPiz(unsigned char *outPtr, const unsigned char *inPtr, - size_t tmpBufSize, int num_channels, - const EXRChannelInfo *channels, int data_width, - int num_lines) { - unsigned char bitmap[BITMAP_SIZE]; - unsigned short minNonZero; - unsigned short maxNonZero; - -#if !MINIZ_LITTLE_ENDIAN - // @todo { PIZ compression on BigEndian architecture. } - assert(0); - return false; -#endif - - memset(bitmap, 0, BITMAP_SIZE); - - const unsigned char *ptr = inPtr; - minNonZero = *(reinterpret_cast(ptr)); - maxNonZero = *(reinterpret_cast(ptr + 2)); - ptr += 4; - - if (maxNonZero >= BITMAP_SIZE) { - return false; - } - - if (minNonZero <= maxNonZero) { - memcpy(reinterpret_cast(&bitmap[0] + minNonZero), ptr, - maxNonZero - minNonZero + 1); - ptr += maxNonZero - minNonZero + 1; - } - - unsigned short lut[USHORT_RANGE]; - memset(lut, 0, sizeof(unsigned short) * USHORT_RANGE); - unsigned short maxValue = reverseLutFromBitmap(bitmap, lut); - - // - // Huffman decoding - // - - int length; - - length = *(reinterpret_cast(ptr)); - ptr += sizeof(int); - - std::vector tmpBuffer(tmpBufSize); - hufUncompress(reinterpret_cast(ptr), length, &tmpBuffer.at(0), - static_cast(tmpBufSize)); - - // - // Wavelet decoding - // - - std::vector channelData(static_cast(num_channels)); - - unsigned short *tmpBufferEnd = &tmpBuffer.at(0); - - for (size_t i = 0; i < static_cast(num_channels); ++i) { - const EXRChannelInfo &chan = channels[i]; - - size_t pixelSize = sizeof(int); // UINT and FLOAT - if (chan.pixel_type == TINYEXR_PIXELTYPE_HALF) { - pixelSize = sizeof(short); - } - - channelData[i].start = tmpBufferEnd; - channelData[i].end = channelData[i].start; - channelData[i].nx = data_width; - channelData[i].ny = num_lines; - // channelData[i].ys = 1; - channelData[i].size = static_cast(pixelSize / sizeof(short)); - - tmpBufferEnd += channelData[i].nx * channelData[i].ny * channelData[i].size; - } - - for (size_t i = 0; i < channelData.size(); ++i) { - PIZChannelData &cd = channelData[i]; - - for (int j = 0; j < cd.size; ++j) { - wav2Decode(cd.start + j, cd.nx, cd.size, cd.ny, cd.nx * cd.size, - maxValue); - } - } - - // - // Expand the pixel data to their original range - // - - applyLut(lut, &tmpBuffer.at(0), static_cast(tmpBufSize)); - - for (int y = 0; y < num_lines; y++) { - for (size_t i = 0; i < channelData.size(); ++i) { - PIZChannelData &cd = channelData[i]; - - // if (modp (y, cd.ys) != 0) - // continue; - - size_t n = static_cast(cd.nx * cd.size); - memcpy(outPtr, cd.end, static_cast(n * sizeof(unsigned short))); - outPtr += n * sizeof(unsigned short); - cd.end += n; - } - } - - return true; -} -#endif // TINYEXR_USE_PIZ - -#if TINYEXR_USE_ZFP -struct ZFPCompressionParam { - double rate; - int precision; - double tolerance; - int type; // TINYEXR_ZFP_COMPRESSIONTYPE_* - - ZFPCompressionParam() { - type = TINYEXR_ZFP_COMPRESSIONTYPE_RATE; - rate = 2.0; - precision = 0; - tolerance = 0.0f; - } -}; - -bool FindZFPCompressionParam(ZFPCompressionParam *param, - const EXRAttribute *attributes, - int num_attributes) { - bool foundType = false; - - for (int i = 0; i < num_attributes; i++) { - if ((strcmp(attributes[i].name, "zfpCompressionType") == 0) && - (attributes[i].size == 1)) { - param->type = static_cast(attributes[i].value[0]); - - foundType = true; - } - } - - if (!foundType) { - return false; - } - - if (param->type == TINYEXR_ZFP_COMPRESSIONTYPE_RATE) { - for (int i = 0; i < num_attributes; i++) { - if ((strcmp(attributes[i].name, "zfpCompressionRate") == 0) && - (attributes[i].size == 8)) { - param->rate = *(reinterpret_cast(attributes[i].value)); - return true; - } - } - } else if (param->type == TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION) { - for (int i = 0; i < num_attributes; i++) { - if ((strcmp(attributes[i].name, "zfpCompressionPrecision") == 0) && - (attributes[i].size == 4)) { - param->rate = *(reinterpret_cast(attributes[i].value)); - return true; - } - } - } else if (param->type == TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY) { - for (int i = 0; i < num_attributes; i++) { - if ((strcmp(attributes[i].name, "zfpCompressionTolerance") == 0) && - (attributes[i].size == 8)) { - param->tolerance = *(reinterpret_cast(attributes[i].value)); - return true; - } - } - } else { - assert(0); - } - - return false; -} - -// Assume pixel format is FLOAT for all channels. -static bool DecompressZfp(float *dst, int dst_width, int dst_num_lines, - int num_channels, const unsigned char *src, - unsigned long src_size, - const ZFPCompressionParam ¶m) { - size_t uncompressed_size = dst_width * dst_num_lines * num_channels; - - zfp_stream *zfp = NULL; - zfp_field *field = NULL; - - assert((dst_width % 4) == 0); - assert((dst_num_lines % 4) == 0); - - if ((dst_width & 3U) || (dst_num_lines & 3U)) { - return false; - } - - field = - zfp_field_2d(reinterpret_cast(const_cast(src)), - zfp_type_float, dst_width, dst_num_lines * num_channels); - zfp = zfp_stream_open(NULL); - - if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_RATE) { - zfp_stream_set_rate(zfp, param.rate, zfp_type_float, /* dimention */ 2, - /* write random access */ 0); - } else if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION) { - zfp_stream_set_precision(zfp, param.precision, zfp_type_float); - } else if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY) { - zfp_stream_set_accuracy(zfp, param.tolerance, zfp_type_float); - } else { - assert(0); - } - - size_t buf_size = zfp_stream_maximum_size(zfp, field); - std::vector buf(buf_size); - memcpy(&buf.at(0), src, src_size); - - bitstream *stream = stream_open(&buf.at(0), buf_size); - zfp_stream_set_bit_stream(zfp, stream); - zfp_stream_rewind(zfp); - - size_t image_size = dst_width * dst_num_lines; - - for (int c = 0; c < num_channels; c++) { - // decompress 4x4 pixel block. - for (int y = 0; y < dst_num_lines; y += 4) { - for (int x = 0; x < dst_width; x += 4) { - float fblock[16]; - zfp_decode_block_float_2(zfp, fblock); - for (int j = 0; j < 4; j++) { - for (int i = 0; i < 4; i++) { - dst[c * image_size + ((y + j) * dst_width + (x + i))] = - fblock[j * 4 + i]; - } - } - } - } - } - - zfp_field_free(field); - zfp_stream_close(zfp); - stream_close(stream); - - return true; -} - -// Assume pixel format is FLOAT for all channels. -bool CompressZfp(std::vector *outBuf, unsigned int *outSize, - const float *inPtr, int width, int num_lines, int num_channels, - const ZFPCompressionParam ¶m) { - zfp_stream *zfp = NULL; - zfp_field *field = NULL; - - assert((width % 4) == 0); - assert((num_lines % 4) == 0); - - if ((width & 3U) || (num_lines & 3U)) { - return false; - } - - // create input array. - field = zfp_field_2d(reinterpret_cast(const_cast(inPtr)), - zfp_type_float, width, num_lines * num_channels); - - zfp = zfp_stream_open(NULL); - - if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_RATE) { - zfp_stream_set_rate(zfp, param.rate, zfp_type_float, 2, 0); - } else if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION) { - zfp_stream_set_precision(zfp, param.precision, zfp_type_float); - } else if (param.type == TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY) { - zfp_stream_set_accuracy(zfp, param.tolerance, zfp_type_float); - } else { - assert(0); - } - - size_t buf_size = zfp_stream_maximum_size(zfp, field); - - outBuf->resize(buf_size); - - bitstream *stream = stream_open(&outBuf->at(0), buf_size); - zfp_stream_set_bit_stream(zfp, stream); - zfp_field_free(field); - - size_t image_size = width * num_lines; - - for (int c = 0; c < num_channels; c++) { - // compress 4x4 pixel block. - for (int y = 0; y < num_lines; y += 4) { - for (int x = 0; x < width; x += 4) { - float fblock[16]; - for (int j = 0; j < 4; j++) { - for (int i = 0; i < 4; i++) { - fblock[j * 4 + i] = - inPtr[c * image_size + ((y + j) * width + (x + i))]; - } - } - zfp_encode_block_float_2(zfp, fblock); - } - } - } - - zfp_stream_flush(zfp); - (*outSize) = zfp_stream_compressed_size(zfp); - - zfp_stream_close(zfp); - - return true; -} - -#endif - -// -// ----------------------------------------------------------------- -// - -static void DecodePixelData(/* out */ unsigned char **out_images, - const int *requested_pixel_types, - const unsigned char *data_ptr, size_t data_len, - int compression_type, int line_order, int width, - int height, int x_stride, int y, int line_no, - int num_lines, size_t pixel_data_size, - size_t num_attributes, - const EXRAttribute *attributes, size_t num_channels, - const EXRChannelInfo *channels, - const std::vector &channel_offset_list) { - if (compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { // PIZ -#if TINYEXR_USE_PIZ - // Allocate original data size. - std::vector outBuf(static_cast( - static_cast(width * num_lines) * pixel_data_size)); - size_t tmpBufLen = static_cast( - static_cast(width * num_lines) * pixel_data_size); - - bool ret = tinyexr::DecompressPiz( - reinterpret_cast(&outBuf.at(0)), data_ptr, tmpBufLen, - static_cast(num_channels), channels, width, num_lines); - - assert(ret); - (void)ret; - - // For PIZ_COMPRESSION: - // pixel sample data for channel 0 for scanline 0 - // pixel sample data for channel 1 for scanline 0 - // pixel sample data for channel ... for scanline 0 - // pixel sample data for channel n for scanline 0 - // pixel sample data for channel 0 for scanline 1 - // pixel sample data for channel 1 for scanline 1 - // pixel sample data for channel ... for scanline 1 - // pixel sample data for channel n for scanline 1 - // ... - for (size_t c = 0; c < static_cast(num_channels); c++) { - if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { - for (size_t v = 0; v < static_cast(num_lines); v++) { - const unsigned short *line_ptr = reinterpret_cast( - &outBuf.at(v * pixel_data_size * static_cast(width) + - channel_offset_list[c] * static_cast(width))); - for (size_t u = 0; u < static_cast(width); u++) { - FP16 hf; - - hf.u = line_ptr[u]; - - tinyexr::swap2(reinterpret_cast(&hf.u)); - - if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { - unsigned short *image = - reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += static_cast( - (height - 1 - (line_no + static_cast(v)))) * - static_cast(x_stride) + - u; - } - *image = hf.u; - } else { // HALF -> FLOAT - FP32 f32 = half_to_float(hf); - float *image = reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += static_cast( - (height - 1 - (line_no + static_cast(v)))) * - static_cast(x_stride) + - u; - } - *image = f32.f; - } - } - } - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { - assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_UINT); - - for (size_t v = 0; v < static_cast(num_lines); v++) { - const unsigned int *line_ptr = reinterpret_cast( - &outBuf.at(v * pixel_data_size * static_cast(width) + - channel_offset_list[c] * static_cast(width))); - for (size_t u = 0; u < static_cast(width); u++) { - unsigned int val = line_ptr[u]; - - tinyexr::swap4(&val); - - unsigned int *image = - reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += static_cast( - (height - 1 - (line_no + static_cast(v)))) * - static_cast(x_stride) + - u; - } - *image = val; - } - } - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { - assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT); - for (size_t v = 0; v < static_cast(num_lines); v++) { - const float *line_ptr = reinterpret_cast(&outBuf.at( - v * pixel_data_size * static_cast(x_stride) + - channel_offset_list[c] * static_cast(x_stride))); - for (size_t u = 0; u < static_cast(width); u++) { - float val = line_ptr[u]; - - tinyexr::swap4(reinterpret_cast(&val)); - - float *image = reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += static_cast( - (height - 1 - (line_no + static_cast(v)))) * - static_cast(x_stride) + - u; - } - *image = val; - } - } - } else { - assert(0); - } - } -#else - assert(0 && "PIZ is enabled in this build"); -#endif - - } else if (compression_type == TINYEXR_COMPRESSIONTYPE_ZIPS || - compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) { - // Allocate original data size. - std::vector outBuf(static_cast(width) * - static_cast(num_lines) * - pixel_data_size); - - unsigned long dstLen = outBuf.size(); - assert(dstLen > 0); - tinyexr::DecompressZip(reinterpret_cast(&outBuf.at(0)), - &dstLen, data_ptr, - static_cast(data_len)); - - // For ZIP_COMPRESSION: - // pixel sample data for channel 0 for scanline 0 - // pixel sample data for channel 1 for scanline 0 - // pixel sample data for channel ... for scanline 0 - // pixel sample data for channel n for scanline 0 - // pixel sample data for channel 0 for scanline 1 - // pixel sample data for channel 1 for scanline 1 - // pixel sample data for channel ... for scanline 1 - // pixel sample data for channel n for scanline 1 - // ... - for (size_t c = 0; c < static_cast(num_channels); c++) { - if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { - for (size_t v = 0; v < static_cast(num_lines); v++) { - const unsigned short *line_ptr = reinterpret_cast( - &outBuf.at(v * static_cast(pixel_data_size) * - static_cast(width) + - channel_offset_list[c] * static_cast(width))); - for (size_t u = 0; u < static_cast(width); u++) { - tinyexr::FP16 hf; - - hf.u = line_ptr[u]; - - tinyexr::swap2(reinterpret_cast(&hf.u)); - - if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { - unsigned short *image = - reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += (static_cast(height) - 1U - - (static_cast(line_no) + v)) * - static_cast(x_stride) + - u; - } - *image = hf.u; - } else { // HALF -> FLOAT - tinyexr::FP32 f32 = half_to_float(hf); - float *image = reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += (static_cast(height) - 1U - - (static_cast(line_no) + v)) * - static_cast(x_stride) + - u; - } - *image = f32.f; - } - } - } - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { - assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_UINT); - - for (size_t v = 0; v < static_cast(num_lines); v++) { - const unsigned int *line_ptr = reinterpret_cast( - &outBuf.at(v * pixel_data_size * static_cast(width) + - channel_offset_list[c] * static_cast(width))); - for (size_t u = 0; u < static_cast(width); u++) { - unsigned int val = line_ptr[u]; - - tinyexr::swap4(&val); - - unsigned int *image = - reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += (static_cast(height) - 1U - - (static_cast(line_no) + v)) * - static_cast(x_stride) + - u; - } - *image = val; - } - } - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { - assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT); - for (size_t v = 0; v < static_cast(num_lines); v++) { - const float *line_ptr = reinterpret_cast( - &outBuf.at(v * pixel_data_size * static_cast(width) + - channel_offset_list[c] * static_cast(width))); - for (size_t u = 0; u < static_cast(width); u++) { - float val = line_ptr[u]; - - tinyexr::swap4(reinterpret_cast(&val)); - - float *image = reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += (static_cast(height) - 1U - - (static_cast(line_no) + v)) * - static_cast(x_stride) + - u; - } - *image = val; - } - } - } else { - assert(0); - } - } - } else if (compression_type == TINYEXR_COMPRESSIONTYPE_RLE) { - // Allocate original data size. - std::vector outBuf(static_cast(width) * - static_cast(num_lines) * - pixel_data_size); - - unsigned long dstLen = outBuf.size(); - assert(dstLen > 0); - tinyexr::DecompressRle(reinterpret_cast(&outBuf.at(0)), - dstLen, data_ptr, - static_cast(data_len)); - - // For RLE_COMPRESSION: - // pixel sample data for channel 0 for scanline 0 - // pixel sample data for channel 1 for scanline 0 - // pixel sample data for channel ... for scanline 0 - // pixel sample data for channel n for scanline 0 - // pixel sample data for channel 0 for scanline 1 - // pixel sample data for channel 1 for scanline 1 - // pixel sample data for channel ... for scanline 1 - // pixel sample data for channel n for scanline 1 - // ... - for (size_t c = 0; c < static_cast(num_channels); c++) { - if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { - for (size_t v = 0; v < static_cast(num_lines); v++) { - const unsigned short *line_ptr = reinterpret_cast( - &outBuf.at(v * static_cast(pixel_data_size) * - static_cast(width) + - channel_offset_list[c] * static_cast(width))); - for (size_t u = 0; u < static_cast(width); u++) { - tinyexr::FP16 hf; - - hf.u = line_ptr[u]; - - tinyexr::swap2(reinterpret_cast(&hf.u)); - - if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { - unsigned short *image = - reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += (static_cast(height) - 1U - - (static_cast(line_no) + v)) * - static_cast(x_stride) + - u; - } - *image = hf.u; - } else { // HALF -> FLOAT - tinyexr::FP32 f32 = half_to_float(hf); - float *image = reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += (static_cast(height) - 1U - - (static_cast(line_no) + v)) * - static_cast(x_stride) + - u; - } - *image = f32.f; - } - } - } - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { - assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_UINT); - - for (size_t v = 0; v < static_cast(num_lines); v++) { - const unsigned int *line_ptr = reinterpret_cast( - &outBuf.at(v * pixel_data_size * static_cast(width) + - channel_offset_list[c] * static_cast(width))); - for (size_t u = 0; u < static_cast(width); u++) { - unsigned int val = line_ptr[u]; - - tinyexr::swap4(&val); - - unsigned int *image = - reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += (static_cast(height) - 1U - - (static_cast(line_no) + v)) * - static_cast(x_stride) + - u; - } - *image = val; - } - } - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { - assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT); - for (size_t v = 0; v < static_cast(num_lines); v++) { - const float *line_ptr = reinterpret_cast( - &outBuf.at(v * pixel_data_size * static_cast(width) + - channel_offset_list[c] * static_cast(width))); - for (size_t u = 0; u < static_cast(width); u++) { - float val = line_ptr[u]; - - tinyexr::swap4(reinterpret_cast(&val)); - - float *image = reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += (static_cast(height) - 1U - - (static_cast(line_no) + v)) * - static_cast(x_stride) + - u; - } - *image = val; - } - } - } else { - assert(0); - } - } - } else if (compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { -#if TINYEXR_USE_ZFP - tinyexr::ZFPCompressionParam zfp_compression_param; - if (!FindZFPCompressionParam(&zfp_compression_param, attributes, - num_attributes)) { - assert(0); - return; - } - - // Allocate original data size. - std::vector outBuf(static_cast(width) * - static_cast(num_lines) * - pixel_data_size); - - unsigned long dstLen = outBuf.size(); - assert(dstLen > 0); - tinyexr::DecompressZfp(reinterpret_cast(&outBuf.at(0)), width, - num_lines, num_channels, data_ptr, - static_cast(data_len), - zfp_compression_param); - - // For ZFP_COMPRESSION: - // pixel sample data for channel 0 for scanline 0 - // pixel sample data for channel 1 for scanline 0 - // pixel sample data for channel ... for scanline 0 - // pixel sample data for channel n for scanline 0 - // pixel sample data for channel 0 for scanline 1 - // pixel sample data for channel 1 for scanline 1 - // pixel sample data for channel ... for scanline 1 - // pixel sample data for channel n for scanline 1 - // ... - for (size_t c = 0; c < static_cast(num_channels); c++) { - assert(channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT); - if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { - assert(requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT); - for (size_t v = 0; v < static_cast(num_lines); v++) { - const float *line_ptr = reinterpret_cast( - &outBuf.at(v * pixel_data_size * static_cast(width) + - channel_offset_list[c] * static_cast(width))); - for (size_t u = 0; u < static_cast(width); u++) { - float val = line_ptr[u]; - - tinyexr::swap4(reinterpret_cast(&val)); - - float *image = reinterpret_cast(out_images)[c]; - if (line_order == 0) { - image += (static_cast(line_no) + v) * - static_cast(x_stride) + - u; - } else { - image += (static_cast(height) - 1U - - (static_cast(line_no) + v)) * - static_cast(x_stride) + - u; - } - *image = val; - } - } - } else { - assert(0); - } - } -#else - (void)attributes; - (void)num_attributes; - (void)num_channels; - assert(0); -#endif - } else if (compression_type == TINYEXR_COMPRESSIONTYPE_NONE) { - for (size_t c = 0; c < num_channels; c++) { - if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { - const unsigned short *line_ptr = - reinterpret_cast( - data_ptr + - c * static_cast(width) * sizeof(unsigned short)); - - if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { - unsigned short *outLine = - reinterpret_cast(out_images[c]); - if (line_order == 0) { - outLine += y * x_stride; - } else { - outLine += (height - 1 - y) * x_stride; - } - - for (int u = 0; u < width; u++) { - tinyexr::FP16 hf; - - hf.u = line_ptr[u]; - - tinyexr::swap2(reinterpret_cast(&hf.u)); - - outLine[u] = hf.u; - } - } else if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT) { - float *outLine = reinterpret_cast(out_images[c]); - if (line_order == 0) { - outLine += y * x_stride; - } else { - outLine += (height - 1 - y) * x_stride; - } - - for (int u = 0; u < width; u++) { - tinyexr::FP16 hf; - - hf.u = line_ptr[u]; - - tinyexr::swap2(reinterpret_cast(&hf.u)); - - tinyexr::FP32 f32 = half_to_float(hf); - - outLine[u] = f32.f; - } - } else { - assert(0); - } - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { - const float *line_ptr = reinterpret_cast( - data_ptr + c * static_cast(width) * sizeof(float)); - - float *outLine = reinterpret_cast(out_images[c]); - if (line_order == 0) { - outLine += y * x_stride; - } else { - outLine += (height - 1 - y) * x_stride; - } - - for (int u = 0; u < width; u++) { - float val = line_ptr[u]; - - tinyexr::swap4(reinterpret_cast(&val)); - - outLine[u] = val; - } - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { - const unsigned int *line_ptr = reinterpret_cast( - data_ptr + c * static_cast(width) * sizeof(unsigned int)); - - unsigned int *outLine = reinterpret_cast(out_images[c]); - if (line_order == 0) { - outLine += y * x_stride; - } else { - outLine += (height - 1 - y) * x_stride; - } - - for (int u = 0; u < width; u++) { - unsigned int val = line_ptr[u]; - - tinyexr::swap4(reinterpret_cast(&val)); - - outLine[u] = val; - } - } - } - } -} - -static void DecodeTiledPixelData( - unsigned char **out_images, int *width, int *height, - const int *requested_pixel_types, const unsigned char *data_ptr, - size_t data_len, int compression_type, int line_order, int data_width, - int data_height, int tile_offset_x, int tile_offset_y, int tile_size_x, - int tile_size_y, size_t pixel_data_size, size_t num_attributes, - const EXRAttribute *attributes, size_t num_channels, - const EXRChannelInfo *channels, - const std::vector &channel_offset_list) { - assert(tile_offset_x * tile_size_x < data_width); - assert(tile_offset_y * tile_size_y < data_height); - - // Compute actual image size in a tile. - if ((tile_offset_x + 1) * tile_size_x >= data_width) { - (*width) = data_width - (tile_offset_x * tile_size_x); - } else { - (*width) = tile_size_x; - } - - if ((tile_offset_y + 1) * tile_size_y >= data_height) { - (*height) = data_height - (tile_offset_y * tile_size_y); - } else { - (*height) = tile_size_y; - } - - // Image size = tile size. - DecodePixelData(out_images, requested_pixel_types, data_ptr, data_len, - compression_type, line_order, (*width), tile_size_y, - /* stride */ tile_size_x, /* y */ 0, /* line_no */ 0, - (*height), pixel_data_size, num_attributes, attributes, - num_channels, channels, channel_offset_list); -} - -static void ComputeChannelLayout(std::vector *channel_offset_list, - int *pixel_data_size, size_t *channel_offset, - int num_channels, - const EXRChannelInfo *channels) { - channel_offset_list->resize(static_cast(num_channels)); - - (*pixel_data_size) = 0; - (*channel_offset) = 0; - - for (size_t c = 0; c < static_cast(num_channels); c++) { - (*channel_offset_list)[c] = (*channel_offset); - if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { - (*pixel_data_size) += sizeof(unsigned short); - (*channel_offset) += sizeof(unsigned short); - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { - (*pixel_data_size) += sizeof(float); - (*channel_offset) += sizeof(float); - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { - (*pixel_data_size) += sizeof(unsigned int); - (*channel_offset) += sizeof(unsigned int); - } else { - assert(0); - } - } -} - -static unsigned char **AllocateImage(int num_channels, - const EXRChannelInfo *channels, - const int *requested_pixel_types, - int data_width, int data_height) { - unsigned char **images = - reinterpret_cast(static_cast( - malloc(sizeof(float *) * static_cast(num_channels)))); - - for (size_t c = 0; c < static_cast(num_channels); c++) { - size_t data_len = - static_cast(data_width) * static_cast(data_height); - if (channels[c].pixel_type == TINYEXR_PIXELTYPE_HALF) { - // pixel_data_size += sizeof(unsigned short); - // channel_offset += sizeof(unsigned short); - // Alloc internal image for half type. - if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { - images[c] = - reinterpret_cast(static_cast( - malloc(sizeof(unsigned short) * data_len))); - } else if (requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT) { - images[c] = reinterpret_cast( - static_cast(malloc(sizeof(float) * data_len))); - } else { - assert(0); - } - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_FLOAT) { - // pixel_data_size += sizeof(float); - // channel_offset += sizeof(float); - images[c] = reinterpret_cast( - static_cast(malloc(sizeof(float) * data_len))); - } else if (channels[c].pixel_type == TINYEXR_PIXELTYPE_UINT) { - // pixel_data_size += sizeof(unsigned int); - // channel_offset += sizeof(unsigned int); - images[c] = reinterpret_cast( - static_cast(malloc(sizeof(unsigned int) * data_len))); - } else { - assert(0); - } - } - - return images; -} - -static int ParseEXRHeader(HeaderInfo *info, bool *empty_header, - const EXRVersion *version, std::string *err, - const unsigned char *buf, size_t size) { - const char *marker = reinterpret_cast(&buf[0]); - - if (empty_header) { - (*empty_header) = false; - } - - if (version->multipart) { - if (size > 0 && marker[0] == '\0') { - // End of header list. - if (empty_header) { - (*empty_header) = true; - } - return TINYEXR_SUCCESS; - } - } - - // According to the spec, the header of every OpenEXR file must contain at - // least the following attributes: - // - // channels chlist - // compression compression - // dataWindow box2i - // displayWindow box2i - // lineOrder lineOrder - // pixelAspectRatio float - // screenWindowCenter v2f - // screenWindowWidth float - bool has_channels = false; - bool has_compression = false; - bool has_data_window = false; - bool has_display_window = false; - bool has_line_order = false; - bool has_pixel_aspect_ratio = false; - bool has_screen_window_center = false; - bool has_screen_window_width = false; - - info->data_window[0] = 0; - info->data_window[1] = 0; - info->data_window[2] = 0; - info->data_window[3] = 0; - info->line_order = 0; // @fixme - info->display_window[0] = 0; - info->display_window[1] = 0; - info->display_window[2] = 0; - info->display_window[3] = 0; - info->screen_window_center[0] = 0.0f; - info->screen_window_center[1] = 0.0f; - info->screen_window_width = -1.0f; - info->pixel_aspect_ratio = -1.0f; - - info->tile_size_x = -1; - info->tile_size_y = -1; - info->tile_level_mode = -1; - info->tile_rounding_mode = -1; - - info->attributes.clear(); - - // Read attributes - size_t orig_size = size; - for (;;) { - if (0 == size) { - return TINYEXR_ERROR_INVALID_DATA; - } else if (marker[0] == '\0') { - size--; - break; - } - - std::string attr_name; - std::string attr_type; - std::vector data; - size_t marker_size; - if (!tinyexr::ReadAttribute(&attr_name, &attr_type, &data, &marker_size, - marker, size)) { - return TINYEXR_ERROR_INVALID_DATA; - } - marker += marker_size; - size -= marker_size; - - if (version->tiled && attr_name.compare("tiles") == 0) { - unsigned int x_size, y_size; - unsigned char tile_mode; - assert(data.size() == 9); - memcpy(&x_size, &data.at(0), sizeof(int)); - memcpy(&y_size, &data.at(4), sizeof(int)); - tile_mode = data[8]; - tinyexr::swap4(&x_size); - tinyexr::swap4(&y_size); - - info->tile_size_x = static_cast(x_size); - info->tile_size_y = static_cast(y_size); - - // mode = levelMode + roundingMode * 16 - info->tile_level_mode = tile_mode & 0x3; - info->tile_rounding_mode = (tile_mode >> 4) & 0x1; - - } else if (attr_name.compare("compression") == 0) { - bool ok = false; - if ((data[0] >= TINYEXR_COMPRESSIONTYPE_NONE) && - (data[0] < TINYEXR_COMPRESSIONTYPE_PIZ)) { - ok = true; - } - - if (data[0] == TINYEXR_COMPRESSIONTYPE_PIZ) { -#if TINYEXR_USE_PIZ - ok = true; -#else - if (err) { - (*err) = "PIZ compression is not supported."; - } - return TINYEXR_ERROR_UNSUPPORTED_FORMAT; -#endif - } - - if (data[0] == TINYEXR_COMPRESSIONTYPE_ZFP) { -#if TINYEXR_USE_ZFP - ok = true; -#else - if (err) { - (*err) = "ZFP compression is not supported."; - } - return TINYEXR_ERROR_UNSUPPORTED_FORMAT; -#endif - } - - if (!ok) { - if (err) { - (*err) = "Unknown compression type."; - } - return TINYEXR_ERROR_UNSUPPORTED_FORMAT; - } - - info->compression_type = static_cast(data[0]); - has_compression = true; - - } else if (attr_name.compare("channels") == 0) { - // name: zero-terminated string, from 1 to 255 bytes long - // pixel type: int, possible values are: UINT = 0 HALF = 1 FLOAT = 2 - // pLinear: unsigned char, possible values are 0 and 1 - // reserved: three chars, should be zero - // xSampling: int - // ySampling: int - - ReadChannelInfo(info->channels, data); - - if (info->channels.size() < 1) { - if (err) { - (*err) = "# of channels is zero."; - } - return TINYEXR_ERROR_INVALID_DATA; - } - - has_channels = true; - - } else if (attr_name.compare("dataWindow") == 0) { - memcpy(&info->data_window[0], &data.at(0), sizeof(int)); - memcpy(&info->data_window[1], &data.at(4), sizeof(int)); - memcpy(&info->data_window[2], &data.at(8), sizeof(int)); - memcpy(&info->data_window[3], &data.at(12), sizeof(int)); - tinyexr::swap4(reinterpret_cast(&info->data_window[0])); - tinyexr::swap4(reinterpret_cast(&info->data_window[1])); - tinyexr::swap4(reinterpret_cast(&info->data_window[2])); - tinyexr::swap4(reinterpret_cast(&info->data_window[3])); - - has_data_window = true; - } else if (attr_name.compare("displayWindow") == 0) { - memcpy(&info->display_window[0], &data.at(0), sizeof(int)); - memcpy(&info->display_window[1], &data.at(4), sizeof(int)); - memcpy(&info->display_window[2], &data.at(8), sizeof(int)); - memcpy(&info->display_window[3], &data.at(12), sizeof(int)); - tinyexr::swap4( - reinterpret_cast(&info->display_window[0])); - tinyexr::swap4( - reinterpret_cast(&info->display_window[1])); - tinyexr::swap4( - reinterpret_cast(&info->display_window[2])); - tinyexr::swap4( - reinterpret_cast(&info->display_window[3])); - - has_display_window = true; - } else if (attr_name.compare("lineOrder") == 0) { - info->line_order = static_cast(data[0]); - has_line_order = true; - } else if (attr_name.compare("pixelAspectRatio") == 0) { - memcpy(&info->pixel_aspect_ratio, &data.at(0), sizeof(float)); - tinyexr::swap4( - reinterpret_cast(&info->pixel_aspect_ratio)); - has_pixel_aspect_ratio = true; - } else if (attr_name.compare("screenWindowCenter") == 0) { - memcpy(&info->screen_window_center[0], &data.at(0), sizeof(float)); - memcpy(&info->screen_window_center[1], &data.at(4), sizeof(float)); - tinyexr::swap4( - reinterpret_cast(&info->screen_window_center[0])); - tinyexr::swap4( - reinterpret_cast(&info->screen_window_center[1])); - has_screen_window_center = true; - } else if (attr_name.compare("screenWindowWidth") == 0) { - memcpy(&info->screen_window_width, &data.at(0), sizeof(float)); - tinyexr::swap4( - reinterpret_cast(&info->screen_window_width)); - - has_screen_window_width = true; - } else if (attr_name.compare("chunkCount") == 0) { - memcpy(&info->chunk_count, &data.at(0), sizeof(int)); - tinyexr::swap4(reinterpret_cast(&info->chunk_count)); - } else { - // Custom attribute(up to TINYEXR_MAX_ATTRIBUTES) - if (info->attributes.size() < TINYEXR_MAX_ATTRIBUTES) { - EXRAttribute attrib; - strncpy(attrib.name, attr_name.c_str(), 255); - attrib.name[255] = '\0'; - strncpy(attrib.type, attr_type.c_str(), 255); - attrib.type[255] = '\0'; - attrib.size = static_cast(data.size()); - attrib.value = static_cast(malloc(data.size())); - memcpy(reinterpret_cast(attrib.value), &data.at(0), - data.size()); - info->attributes.push_back(attrib); - } - } - } - - // Check if required attributes exist - { - std::stringstream ss_err; - - if (!has_compression) { - ss_err << "\"compression\" attribute not found in the header." - << std::endl; - } - - if (!has_channels) { - ss_err << "\"channels\" attribute not found in the header." << std::endl; - } - - if (!has_line_order) { - ss_err << "\"lineOrder\" attribute not found in the header." << std::endl; - } - - if (!has_display_window) { - ss_err << "\"displayWindow\" attribute not found in the header." - << std::endl; - } - - if (!has_data_window) { - ss_err << "\"dataWindow\" attribute not found in the header." - << std::endl; - } - - if (!has_pixel_aspect_ratio) { - ss_err << "\"pixelAspectRatio\" attribute not found in the header." - << std::endl; - } - - if (!has_screen_window_width) { - ss_err << "\"screenWindowWidth\" attribute not found in the header." - << std::endl; - } - - if (!has_screen_window_center) { - ss_err << "\"screenWindowCenter\" attribute not found in the header." - << std::endl; - } - - if (!(ss_err.str().empty())) { - if (err) { - (*err) += ss_err.str(); - } - return TINYEXR_ERROR_INVALID_HEADER; - } - } - - info->header_len = static_cast(orig_size - size); - - return TINYEXR_SUCCESS; -} - -// C++ HeaderInfo to C EXRHeader conversion. -static void ConvertHeader(EXRHeader *exr_header, const HeaderInfo &info) { - exr_header->pixel_aspect_ratio = info.pixel_aspect_ratio; - exr_header->screen_window_center[0] = info.screen_window_center[0]; - exr_header->screen_window_center[1] = info.screen_window_center[1]; - exr_header->screen_window_width = info.screen_window_width; - exr_header->chunk_count = info.chunk_count; - exr_header->display_window[0] = info.display_window[0]; - exr_header->display_window[1] = info.display_window[1]; - exr_header->display_window[2] = info.display_window[2]; - exr_header->display_window[3] = info.display_window[3]; - exr_header->data_window[0] = info.data_window[0]; - exr_header->data_window[1] = info.data_window[1]; - exr_header->data_window[2] = info.data_window[2]; - exr_header->data_window[3] = info.data_window[3]; - exr_header->line_order = info.line_order; - exr_header->compression_type = info.compression_type; - - exr_header->tile_size_x = info.tile_size_x; - exr_header->tile_size_y = info.tile_size_y; - exr_header->tile_level_mode = info.tile_level_mode; - exr_header->tile_rounding_mode = info.tile_rounding_mode; - - exr_header->num_channels = static_cast(info.channels.size()); - - exr_header->channels = static_cast(malloc( - sizeof(EXRChannelInfo) * static_cast(exr_header->num_channels))); - for (size_t c = 0; c < static_cast(exr_header->num_channels); c++) { - strncpy(exr_header->channels[c].name, info.channels[c].name.c_str(), 255); - // manually add '\0' for safety. - exr_header->channels[c].name[255] = '\0'; - - exr_header->channels[c].pixel_type = info.channels[c].pixel_type; - exr_header->channels[c].p_linear = info.channels[c].p_linear; - exr_header->channels[c].x_sampling = info.channels[c].x_sampling; - exr_header->channels[c].y_sampling = info.channels[c].y_sampling; - } - - exr_header->pixel_types = static_cast( - malloc(sizeof(int) * static_cast(exr_header->num_channels))); - for (size_t c = 0; c < static_cast(exr_header->num_channels); c++) { - exr_header->pixel_types[c] = info.channels[c].pixel_type; - } - - // Initially fill with values of `pixel_types` - exr_header->requested_pixel_types = static_cast( - malloc(sizeof(int) * static_cast(exr_header->num_channels))); - for (size_t c = 0; c < static_cast(exr_header->num_channels); c++) { - exr_header->requested_pixel_types[c] = info.channels[c].pixel_type; - } - - assert(info.attributes.size() < TINYEXR_MAX_ATTRIBUTES); - exr_header->num_custom_attributes = static_cast(info.attributes.size()); - - for (size_t i = 0; i < info.attributes.size(); i++) { - memcpy(exr_header->custom_attributes[i].name, info.attributes[i].name, 256); - memcpy(exr_header->custom_attributes[i].type, info.attributes[i].type, 256); - exr_header->custom_attributes[i].size = info.attributes[i].size; - // Just copy poiner - exr_header->custom_attributes[i].value = info.attributes[i].value; - } - - exr_header->header_len = info.header_len; -} - -static int DecodeChunk(EXRImage *exr_image, const EXRHeader *exr_header, - const std::vector &offsets, - const unsigned char *head) { - int num_channels = exr_header->num_channels; - - int num_scanline_blocks = 1; - if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) { - num_scanline_blocks = 16; - } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { - num_scanline_blocks = 32; - } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { - num_scanline_blocks = 16; - } - - int data_width = exr_header->data_window[2] - exr_header->data_window[0] + 1; - int data_height = exr_header->data_window[3] - exr_header->data_window[1] + 1; - - size_t num_blocks = offsets.size(); - - std::vector channel_offset_list; - int pixel_data_size = 0; - size_t channel_offset = 0; - tinyexr::ComputeChannelLayout(&channel_offset_list, &pixel_data_size, - &channel_offset, num_channels, - exr_header->channels); - - if (exr_header->tiled) { - size_t num_tiles = offsets.size(); // = # of blocks - - exr_image->tiles = static_cast( - malloc(sizeof(EXRTile) * static_cast(num_tiles))); - - for (size_t tile_idx = 0; tile_idx < num_tiles; tile_idx++) { - // Allocate memory for each tile. - exr_image->tiles[tile_idx].images = tinyexr::AllocateImage( - num_channels, exr_header->channels, exr_header->requested_pixel_types, - data_width, data_height); - - // 16 byte: tile coordinates - // 4 byte : data size - // ~ : data(uncompressed or compressed) - const unsigned char *data_ptr = - reinterpret_cast(head + offsets[tile_idx]); - - int tile_coordinates[4]; - memcpy(tile_coordinates, data_ptr, sizeof(int) * 4); - tinyexr::swap4(reinterpret_cast(&tile_coordinates[0])); - tinyexr::swap4(reinterpret_cast(&tile_coordinates[1])); - tinyexr::swap4(reinterpret_cast(&tile_coordinates[2])); - tinyexr::swap4(reinterpret_cast(&tile_coordinates[3])); - - // @todo{ LoD } - assert(tile_coordinates[2] == 0); - assert(tile_coordinates[3] == 0); - - int data_len; - memcpy(&data_len, data_ptr + 16, - sizeof(int)); // 16 = sizeof(tile_coordinates) - tinyexr::swap4(reinterpret_cast(&data_len)); - assert(data_len >= 4); - - // Move to data addr: 20 = 16 + 4; - data_ptr += 20; - - tinyexr::DecodeTiledPixelData( - exr_image->tiles[tile_idx].images, - &(exr_image->tiles[tile_idx].width), - &(exr_image->tiles[tile_idx].height), - exr_header->requested_pixel_types, data_ptr, - static_cast(data_len), exr_header->compression_type, - exr_header->line_order, data_width, data_height, tile_coordinates[0], - tile_coordinates[1], exr_header->tile_size_x, exr_header->tile_size_y, - static_cast(pixel_data_size), - static_cast(exr_header->num_custom_attributes), - exr_header->custom_attributes, - static_cast(exr_header->num_channels), exr_header->channels, - channel_offset_list); - - exr_image->tiles[tile_idx].offset_x = tile_coordinates[0]; - exr_image->tiles[tile_idx].offset_y = tile_coordinates[1]; - exr_image->tiles[tile_idx].level_x = tile_coordinates[2]; - exr_image->tiles[tile_idx].level_y = tile_coordinates[3]; - - exr_image->num_tiles = static_cast(num_tiles); - } - } else { // scanline format - - exr_image->images = tinyexr::AllocateImage( - num_channels, exr_header->channels, exr_header->requested_pixel_types, - data_width, data_height); - -#ifdef _OPENMP -#pragma omp parallel for -#endif - for (int y = 0; y < static_cast(num_blocks); y++) { - size_t y_idx = static_cast(y); - const unsigned char *data_ptr = - reinterpret_cast(head + offsets[y_idx]); - // 4 byte: scan line - // 4 byte: data size - // ~ : pixel data(uncompressed or compressed) - int line_no; - memcpy(&line_no, data_ptr, sizeof(int)); - int data_len; - memcpy(&data_len, data_ptr + 4, sizeof(int)); - tinyexr::swap4(reinterpret_cast(&line_no)); - tinyexr::swap4(reinterpret_cast(&data_len)); - - int end_line_no = (std::min)(line_no + num_scanline_blocks, - (exr_header->data_window[3] + 1)); - - int num_lines = end_line_no - line_no; - assert(num_lines > 0); - - // Move to data addr: 8 = 4 + 4; - data_ptr += 8; - - // Adjust line_no with data_window.bmin.y - line_no -= exr_header->data_window[1]; - - tinyexr::DecodePixelData( - exr_image->images, exr_header->requested_pixel_types, data_ptr, - static_cast(data_len), exr_header->compression_type, - exr_header->line_order, data_width, data_height, data_width, y, - line_no, num_lines, static_cast(pixel_data_size), - static_cast(exr_header->num_custom_attributes), - exr_header->custom_attributes, - static_cast(exr_header->num_channels), exr_header->channels, - channel_offset_list); - } // omp parallel - } - - // Overwrite `pixel_type` with `requested_pixel_type`. - { - for (int c = 0; c < exr_header->num_channels; c++) { - exr_header->pixel_types[c] = exr_header->requested_pixel_types[c]; - } - } - - { - exr_image->num_channels = num_channels; - - exr_image->width = data_width; - exr_image->height = data_height; - } - - return TINYEXR_SUCCESS; -} - -static void ReconstructLineOffsets(std::vector *offsets, size_t n, const unsigned char *head, const unsigned char *marker, const size_t size) -{ - assert(head < marker); - assert(offsets->size() == n); - - for (size_t i = 0; i < n; i++) { - size_t offset = static_cast(marker - head); - assert(offset < size); // Offset should not exceed whole EXR file/data size. - - int y; - int data_len; - - memcpy(&y, marker, sizeof(int)); - memcpy(&data_len, marker + 4, sizeof(unsigned int)); - - tinyexr::swap4(reinterpret_cast(&y)); - tinyexr::swap4(reinterpret_cast(&data_len)); - - (*offsets)[i] = offset; - - marker += data_len + 8; // 8 = 4 bytes(y) + 4 bytes(data_len) - } -} - -static int DecodeEXRImage(EXRImage *exr_image, const EXRHeader *exr_header, - const unsigned char *head, - const unsigned char *marker, const size_t size, const char **err) { - if (exr_image == NULL || exr_header == NULL || head == NULL || - marker == NULL || (size <= tinyexr::kEXRVersionSize)) { - if (err) { - (*err) = "Invalid argument."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - int num_scanline_blocks = 1; - if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) { - num_scanline_blocks = 16; - } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { - num_scanline_blocks = 32; - } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { - num_scanline_blocks = 16; - } - - int data_width = exr_header->data_window[2] - exr_header->data_window[0] + 1; - int data_height = exr_header->data_window[3] - exr_header->data_window[1] + 1; - - // Read offset tables. - size_t num_blocks; - - if (exr_header->chunk_count > 0) { - // Use `chunkCount` attribute. - num_blocks = static_cast(exr_header->chunk_count); - } else if (exr_header->tiled) { - // @todo { LoD } - size_t num_x_tiles = static_cast(data_width) / - static_cast(exr_header->tile_size_x); - if (num_x_tiles * static_cast(exr_header->tile_size_x) < - static_cast(data_width)) { - num_x_tiles++; - } - size_t num_y_tiles = static_cast(data_height) / - static_cast(exr_header->tile_size_y); - if (num_y_tiles * static_cast(exr_header->tile_size_y) < - static_cast(data_height)) { - num_y_tiles++; - } - - num_blocks = num_x_tiles * num_y_tiles; - } else { - num_blocks = static_cast(data_height) / - static_cast(num_scanline_blocks); - if (num_blocks * static_cast(num_scanline_blocks) < - static_cast(data_height)) { - num_blocks++; - } - } - - std::vector offsets(num_blocks); - - for (size_t y = 0; y < num_blocks; y++) { - tinyexr::tinyexr_uint64 offset; - memcpy(&offset, marker, sizeof(tinyexr::tinyexr_uint64)); - tinyexr::swap8(&offset); - marker += sizeof(tinyexr::tinyexr_uint64); // = 8 - offsets[y] = offset; - } - - // If line offsets are invalid, we try to reconstruct it. - // See OpenEXR/IlmImf/ImfScanLineInputFile.cpp::readLineOffsets() for details. - for (size_t y = 0; y < num_blocks; y++) { - if (offsets[y] <= 0) { - // TODO(syoyo) Report as warning. - //if (err) { - // stringstream ss; - // ss << "Incomplete lineOffsets." << std::endl; - // (*err) += ss.str(); - //} - ReconstructLineOffsets(&offsets, num_blocks, head, marker, size); - break; - } - } - - return DecodeChunk(exr_image, exr_header, offsets, head); -} - -} // namespace tinyexr - -int LoadEXR(float **out_rgba, int *width, int *height, const char *filename, - const char **err) { - if (out_rgba == NULL) { - if (err) { - (*err) = "Invalid argument.\n"; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - EXRVersion exr_version; - EXRImage exr_image; - EXRHeader exr_header; - InitEXRHeader(&exr_header); - InitEXRImage(&exr_image); - - { - int ret = ParseEXRVersionFromFile(&exr_version, filename); - if (ret != TINYEXR_SUCCESS) { - return ret; - } - - if (exr_version.multipart || exr_version.non_image) { - if (err) { - (*err) = "Loading multipart or DeepImage is not supported yet.\n"; - } - return TINYEXR_ERROR_INVALID_DATA; // @fixme. - } - } - - { - int ret = ParseEXRHeaderFromFile(&exr_header, &exr_version, filename, err); - if (ret != TINYEXR_SUCCESS) { - return ret; - } - } - - // Read HALF channel as FLOAT. - for (int i = 0; i < exr_header.num_channels; i++) { - if (exr_header.pixel_types[i] == TINYEXR_PIXELTYPE_HALF) { - exr_header.requested_pixel_types[i] = TINYEXR_PIXELTYPE_FLOAT; - } - } - - { - int ret = LoadEXRImageFromFile(&exr_image, &exr_header, filename, err); - if (ret != TINYEXR_SUCCESS) { - return ret; - } - } - - // RGBA - int idxR = -1; - int idxG = -1; - int idxB = -1; - int idxA = -1; - for (int c = 0; c < exr_header.num_channels; c++) { - if (strcmp(exr_header.channels[c].name, "R") == 0) { - idxR = c; - } else if (strcmp(exr_header.channels[c].name, "G") == 0) { - idxG = c; - } else if (strcmp(exr_header.channels[c].name, "B") == 0) { - idxB = c; - } else if (strcmp(exr_header.channels[c].name, "A") == 0) { - idxA = c; - } - } - - if (idxR == -1) { - if (err) { - (*err) = "R channel not found\n"; - } - - // @todo { free exr_image } - return TINYEXR_ERROR_INVALID_DATA; - } - - if (idxG == -1) { - if (err) { - (*err) = "G channel not found\n"; - } - // @todo { free exr_image } - return TINYEXR_ERROR_INVALID_DATA; - } - - if (idxB == -1) { - if (err) { - (*err) = "B channel not found\n"; - } - // @todo { free exr_image } - return TINYEXR_ERROR_INVALID_DATA; - } - - (*out_rgba) = reinterpret_cast( - malloc(4 * sizeof(float) * static_cast(exr_image.width) * - static_cast(exr_image.height))); - for (int i = 0; i < exr_image.width * exr_image.height; i++) { - (*out_rgba)[4 * i + 0] = - reinterpret_cast(exr_image.images)[idxR][i]; - (*out_rgba)[4 * i + 1] = - reinterpret_cast(exr_image.images)[idxG][i]; - (*out_rgba)[4 * i + 2] = - reinterpret_cast(exr_image.images)[idxB][i]; - if (idxA != -1) { - (*out_rgba)[4 * i + 3] = - reinterpret_cast(exr_image.images)[idxA][i]; - } else { - (*out_rgba)[4 * i + 3] = 1.0; - } - } - - (*width) = exr_image.width; - (*height) = exr_image.height; - - FreeEXRHeader(&exr_header); - FreeEXRImage(&exr_image); - - return TINYEXR_SUCCESS; -} - -int ParseEXRHeaderFromMemory(EXRHeader *exr_header, const EXRVersion *version, - const unsigned char *memory, size_t size, - const char **err) { - if (memory == NULL || exr_header == NULL) { - if (err) { - (*err) = "Invalid argument.\n"; - } - - // Invalid argument - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - if (size < tinyexr::kEXRVersionSize) { - return TINYEXR_ERROR_INVALID_DATA; - } - - const unsigned char *marker = memory + tinyexr::kEXRVersionSize; - size_t marker_size = size - tinyexr::kEXRVersionSize; - - tinyexr::HeaderInfo info; - info.clear(); - - std::string err_str; - int ret = ParseEXRHeader(&info, NULL, version, &err_str, marker, marker_size); - - if (ret != TINYEXR_SUCCESS) { - if (err && !err_str.empty()) { - (*err) = strdup(err_str.c_str()); // May leak - } - } - - ConvertHeader(exr_header, info); - - // transfoer `tiled` from version. - exr_header->tiled = version->tiled; - - return ret; -} - -int LoadEXRFromMemory(float *out_rgba, const unsigned char *memory, size_t size, - const char **err) { - if (out_rgba == NULL || memory == NULL) { - if (err) { - (*err) = "Invalid argument.\n"; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - EXRVersion exr_version; - EXRImage exr_image; - EXRHeader exr_header; - - InitEXRHeader(&exr_header); - - int ret = ParseEXRVersionFromMemory(&exr_version, memory, size); - if (ret != TINYEXR_SUCCESS) { - return ret; - } - - ret = ParseEXRHeaderFromMemory(&exr_header, &exr_version, memory, size, err); - if (ret != TINYEXR_SUCCESS) { - return ret; - } - - InitEXRImage(&exr_image); - ret = LoadEXRImageFromMemory(&exr_image, &exr_header, memory, size, err); - if (ret != TINYEXR_SUCCESS) { - return ret; - } - - // RGBA - int idxR = -1; - int idxG = -1; - int idxB = -1; - int idxA = -1; - for (int c = 0; c < exr_header.num_channels; c++) { - if (strcmp(exr_header.channels[c].name, "R") == 0) { - idxR = c; - } else if (strcmp(exr_header.channels[c].name, "G") == 0) { - idxG = c; - } else if (strcmp(exr_header.channels[c].name, "B") == 0) { - idxB = c; - } else if (strcmp(exr_header.channels[c].name, "A") == 0) { - idxA = c; - } - } - - if (idxR == -1) { - if (err) { - (*err) = "R channel not found\n"; - } - - // @todo { free exr_image } - return TINYEXR_ERROR_INVALID_DATA; - } - - if (idxG == -1) { - if (err) { - (*err) = "G channel not found\n"; - } - // @todo { free exr_image } - return TINYEXR_ERROR_INVALID_DATA; - } - - if (idxB == -1) { - if (err) { - (*err) = "B channel not found\n"; - } - // @todo { free exr_image } - return TINYEXR_ERROR_INVALID_DATA; - } - - // Assume `out_rgba` have enough memory allocated. - for (int i = 0; i < exr_image.width * exr_image.height; i++) { - out_rgba[4 * i + 0] = reinterpret_cast(exr_image.images)[idxR][i]; - out_rgba[4 * i + 1] = reinterpret_cast(exr_image.images)[idxG][i]; - out_rgba[4 * i + 2] = reinterpret_cast(exr_image.images)[idxB][i]; - if (idxA > 0) { - out_rgba[4 * i + 3] = - reinterpret_cast(exr_image.images)[idxA][i]; - } else { - out_rgba[4 * i + 3] = 1.0; - } - } - - return TINYEXR_SUCCESS; -} - -int LoadEXRImageFromFile(EXRImage *exr_image, const EXRHeader *exr_header, - const char *filename, const char **err) { - if (exr_image == NULL) { - if (err) { - (*err) = "Invalid argument."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - -#ifdef _WIN32 - FILE *fp = NULL; - fopen_s(&fp, filename, "rb"); -#else - FILE *fp = fopen(filename, "rb"); -#endif - if (!fp) { - if (err) { - (*err) = "Cannot read file."; - } - return TINYEXR_ERROR_CANT_OPEN_FILE; - } - - size_t filesize; - // Compute size - fseek(fp, 0, SEEK_END); - filesize = static_cast(ftell(fp)); - fseek(fp, 0, SEEK_SET); - - std::vector buf(filesize); // @todo { use mmap } - { - size_t ret; - ret = fread(&buf[0], 1, filesize, fp); - assert(ret == filesize); - fclose(fp); - (void)ret; - } - - return LoadEXRImageFromMemory(exr_image, exr_header, &buf.at(0), filesize, err); -} - -int LoadEXRImageFromMemory(EXRImage *exr_image, const EXRHeader *exr_header, - const unsigned char *memory, const size_t size, const char **err) { - if (exr_image == NULL || memory == NULL || (size < tinyexr::kEXRVersionSize)) { - if (err) { - (*err) = "Invalid argument."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - if (exr_header->header_len == 0) { - if (err) { - (*err) = "EXRHeader is not initialized."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - const unsigned char *head = memory; - const unsigned char *marker = reinterpret_cast( - memory + exr_header->header_len + - 8); // +8 for magic number + version header. - return tinyexr::DecodeEXRImage(exr_image, exr_header, head, marker, size, err); -} - -size_t SaveEXRImageToMemory(const EXRImage *exr_image, - const EXRHeader *exr_header, - unsigned char **memory_out, const char **err) { - if (exr_image == NULL || memory_out == NULL || - exr_header->compression_type < 0) { - if (err) { - (*err) = "Invalid argument."; - } - return 0; // @fixme - } - -#if !TINYEXR_USE_PIZ - if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { - if (err) { - (*err) = "PIZ compression is not supported in this build."; - } - return 0; - } -#endif - -#if !TINYEXR_USE_ZFP - if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { - if (err) { - (*err) = "ZFP compression is not supported in this build."; - } - return 0; - } -#endif - -#if TINYEXR_USE_ZFP - for (size_t i = 0; i < static_cast(exr_header->num_channels); i++) { - if (exr_header->requested_pixel_types[i] != TINYEXR_PIXELTYPE_FLOAT) { - if (err) { - (*err) = "Pixel type must be FLOAT for ZFP compression."; - } - return 0; - } - } -#endif - - std::vector memory; - - // Header - { - const char header[] = {0x76, 0x2f, 0x31, 0x01}; - memory.insert(memory.end(), header, header + 4); - } - - // Version, scanline. - { - char marker[] = {2, 0, 0, 0}; - /* @todo - if (exr_header->tiled) { - marker[1] |= 0x2; - } - if (exr_header->long_name) { - marker[1] |= 0x4; - } - if (exr_header->non_image) { - marker[1] |= 0x8; - } - if (exr_header->multipart) { - marker[1] |= 0x10; - } - */ - memory.insert(memory.end(), marker, marker + 4); - } - - int num_scanlines = 1; - if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) { - num_scanlines = 16; - } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { - num_scanlines = 32; - } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { - num_scanlines = 16; - } - - // Write attributes. - std::vector channels; - { - std::vector data; - - for (int c = 0; c < exr_header->num_channels; c++) { - tinyexr::ChannelInfo info; - info.p_linear = 0; - info.pixel_type = exr_header->requested_pixel_types[c]; - info.x_sampling = 1; - info.y_sampling = 1; - info.name = std::string(exr_header->channels[c].name); - channels.push_back(info); - } - - tinyexr::WriteChannelInfo(data, channels); - - tinyexr::WriteAttributeToMemory(&memory, "channels", "chlist", &data.at(0), - static_cast(data.size())); - } - - { - int comp = exr_header->compression_type; - tinyexr::swap4(reinterpret_cast(&comp)); - tinyexr::WriteAttributeToMemory( - &memory, "compression", "compression", - reinterpret_cast(&comp), 1); - } - - { - int data[4] = {0, 0, exr_image->width - 1, exr_image->height - 1}; - tinyexr::swap4(reinterpret_cast(&data[0])); - tinyexr::swap4(reinterpret_cast(&data[1])); - tinyexr::swap4(reinterpret_cast(&data[2])); - tinyexr::swap4(reinterpret_cast(&data[3])); - tinyexr::WriteAttributeToMemory( - &memory, "dataWindow", "box2i", - reinterpret_cast(data), sizeof(int) * 4); - tinyexr::WriteAttributeToMemory( - &memory, "displayWindow", "box2i", - reinterpret_cast(data), sizeof(int) * 4); - } - - { - unsigned char line_order = 0; // @fixme { read line_order from EXRHeader } - tinyexr::WriteAttributeToMemory(&memory, "lineOrder", "lineOrder", - &line_order, 1); - } - - { - float aspectRatio = 1.0f; - tinyexr::swap4(reinterpret_cast(&aspectRatio)); - tinyexr::WriteAttributeToMemory( - &memory, "pixelAspectRatio", "float", - reinterpret_cast(&aspectRatio), sizeof(float)); - } - - { - float center[2] = {0.0f, 0.0f}; - tinyexr::swap4(reinterpret_cast(¢er[0])); - tinyexr::swap4(reinterpret_cast(¢er[1])); - tinyexr::WriteAttributeToMemory( - &memory, "screenWindowCenter", "v2f", - reinterpret_cast(center), 2 * sizeof(float)); - } - - { - float w = static_cast(exr_image->width); - tinyexr::swap4(reinterpret_cast(&w)); - tinyexr::WriteAttributeToMemory(&memory, "screenWindowWidth", "float", - reinterpret_cast(&w), - sizeof(float)); - } - - // Custom attributes - if (exr_header->num_custom_attributes > 0) { - for (int i = 0; i < exr_header->num_custom_attributes; i++) { - tinyexr::WriteAttributeToMemory( - &memory, exr_header->custom_attributes[i].name, - exr_header->custom_attributes[i].type, - reinterpret_cast( - exr_header->custom_attributes[i].value), - exr_header->custom_attributes[i].size); - } - } - - { // end of header - unsigned char e = 0; - memory.push_back(e); - } - - int num_blocks = exr_image->height / num_scanlines; - if (num_blocks * num_scanlines < exr_image->height) { - num_blocks++; - } - - std::vector offsets(static_cast(num_blocks)); - - size_t headerSize = memory.size(); - tinyexr::tinyexr_uint64 offset = - headerSize + - static_cast(num_blocks) * - sizeof( - tinyexr::tinyexr_int64); // sizeof(header) + sizeof(offsetTable) - - std::vector data; - - std::vector > data_list( - static_cast(num_blocks)); - std::vector channel_offset_list( - static_cast(exr_header->num_channels)); - - int pixel_data_size = 0; - size_t channel_offset = 0; - for (size_t c = 0; c < static_cast(exr_header->num_channels); c++) { - channel_offset_list[c] = channel_offset; - if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { - pixel_data_size += sizeof(unsigned short); - channel_offset += sizeof(unsigned short); - } else if (exr_header->requested_pixel_types[c] == - TINYEXR_PIXELTYPE_FLOAT) { - pixel_data_size += sizeof(float); - channel_offset += sizeof(float); - } else if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_UINT) { - pixel_data_size += sizeof(unsigned int); - channel_offset += sizeof(unsigned int); - } else { - assert(0); - } - } - -#if TINYEXR_USE_ZFP - tinyexr::ZFPCompressionParam zfp_compression_param; - - // Use ZFP compression parameter from custom attributes(if such a parameter - // exists) - { - bool ret = tinyexr::FindZFPCompressionParam( - &zfp_compression_param, exr_header->custom_attributes, - exr_header->num_custom_attributes); - - if (!ret) { - // Use predefined compression parameter. - zfp_compression_param.type = 0; - zfp_compression_param.rate = 2; - } - } -#endif - -// Use signed int since some OpenMP compiler doesn't allow unsigned type for -// `parallel for` -#ifdef _OPENMP -#pragma omp parallel for -#endif - for (int i = 0; i < num_blocks; i++) { - size_t ii = static_cast(i); - int start_y = num_scanlines * i; - int endY = (std::min)(num_scanlines * (i + 1), exr_image->height); - int h = endY - start_y; - - std::vector buf( - static_cast(exr_image->width * h * pixel_data_size)); - - for (size_t c = 0; c < static_cast(exr_header->num_channels); c++) { - if (exr_header->pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { - if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT) { - for (int y = 0; y < h; y++) { - for (int x = 0; x < exr_image->width; x++) { - tinyexr::FP16 h16; - h16.u = reinterpret_cast( - exr_image->images)[c][(y + start_y) * exr_image->width + x]; - - tinyexr::FP32 f32 = half_to_float(h16); - - tinyexr::swap4(reinterpret_cast(&f32.f)); - - // Assume increasing Y - float *line_ptr = reinterpret_cast(&buf.at( - static_cast(pixel_data_size * y * exr_image->width) + - channel_offset_list[c] * - static_cast(exr_image->width))); - line_ptr[x] = f32.f; - } - } - } else if (exr_header->requested_pixel_types[c] == - TINYEXR_PIXELTYPE_HALF) { - for (int y = 0; y < h; y++) { - for (int x = 0; x < exr_image->width; x++) { - unsigned short val = reinterpret_cast( - exr_image->images)[c][(y + start_y) * exr_image->width + x]; - - tinyexr::swap2(&val); - - // Assume increasing Y - unsigned short *line_ptr = reinterpret_cast( - &buf.at(static_cast(pixel_data_size * y * - exr_image->width) + - channel_offset_list[c] * - static_cast(exr_image->width))); - line_ptr[x] = val; - } - } - } else { - assert(0); - } - - } else if (exr_header->pixel_types[c] == TINYEXR_PIXELTYPE_FLOAT) { - if (exr_header->requested_pixel_types[c] == TINYEXR_PIXELTYPE_HALF) { - for (int y = 0; y < h; y++) { - for (int x = 0; x < exr_image->width; x++) { - tinyexr::FP32 f32; - f32.f = reinterpret_cast( - exr_image->images)[c][(y + start_y) * exr_image->width + x]; - - tinyexr::FP16 h16; - h16 = float_to_half_full(f32); - - tinyexr::swap2(reinterpret_cast(&h16.u)); - - // Assume increasing Y - unsigned short *line_ptr = reinterpret_cast( - &buf.at(static_cast(pixel_data_size * y * - exr_image->width) + - channel_offset_list[c] * - static_cast(exr_image->width))); - line_ptr[x] = h16.u; - } - } - } else if (exr_header->requested_pixel_types[c] == - TINYEXR_PIXELTYPE_FLOAT) { - for (int y = 0; y < h; y++) { - for (int x = 0; x < exr_image->width; x++) { - float val = reinterpret_cast( - exr_image->images)[c][(y + start_y) * exr_image->width + x]; - - tinyexr::swap4(reinterpret_cast(&val)); - - // Assume increasing Y - float *line_ptr = reinterpret_cast(&buf.at( - static_cast(pixel_data_size * y * exr_image->width) + - channel_offset_list[c] * - static_cast(exr_image->width))); - line_ptr[x] = val; - } - } - } else { - assert(0); - } - } else if (exr_header->pixel_types[c] == TINYEXR_PIXELTYPE_UINT) { - for (int y = 0; y < h; y++) { - for (int x = 0; x < exr_image->width; x++) { - unsigned int val = reinterpret_cast( - exr_image->images)[c][(y + start_y) * exr_image->width + x]; - - tinyexr::swap4(&val); - - // Assume increasing Y - unsigned int *line_ptr = reinterpret_cast(&buf.at( - static_cast(pixel_data_size * y * exr_image->width) + - channel_offset_list[c] * - static_cast(exr_image->width))); - line_ptr[x] = val; - } - } - } - } - - if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_NONE) { - // 4 byte: scan line - // 4 byte: data size - // ~ : pixel data(uncompressed) - std::vector header(8); - unsigned int data_len = static_cast(buf.size()); - memcpy(&header.at(0), &start_y, sizeof(int)); - memcpy(&header.at(4), &data_len, sizeof(unsigned int)); - - tinyexr::swap4(reinterpret_cast(&header.at(0))); - tinyexr::swap4(reinterpret_cast(&header.at(4))); - - data_list[ii].insert(data_list[ii].end(), header.begin(), header.end()); - data_list[ii].insert(data_list[ii].end(), buf.begin(), - buf.begin() + data_len); - - } else if ((exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZIPS) || - (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZIP)) { -#if TINYEXR_USE_MINIZ - std::vector block( - tinyexr::miniz::mz_compressBound(buf.size())); -#else - std::vector block(compressBound(buf.size())); -#endif - tinyexr::tinyexr_uint64 outSize = block.size(); - - tinyexr::CompressZip(&block.at(0), outSize, - reinterpret_cast(&buf.at(0)), - buf.size()); - - // 4 byte: scan line - // 4 byte: data size - // ~ : pixel data(compressed) - std::vector header(8); - unsigned int data_len = static_cast(outSize); // truncate - memcpy(&header.at(0), &start_y, sizeof(int)); - memcpy(&header.at(4), &data_len, sizeof(unsigned int)); - - tinyexr::swap4(reinterpret_cast(&header.at(0))); - tinyexr::swap4(reinterpret_cast(&header.at(4))); - - data_list[ii].insert(data_list[ii].end(), header.begin(), header.end()); - data_list[ii].insert(data_list[ii].end(), block.begin(), - block.begin() + data_len); - - } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_RLE) { - // (buf.size() * 3) / 2 would be enough. - std::vector block((buf.size() * 3) / 2); - - tinyexr::tinyexr_uint64 outSize = block.size(); - - tinyexr::CompressRle(&block.at(0), outSize, - reinterpret_cast(&buf.at(0)), - buf.size()); - - // 4 byte: scan line - // 4 byte: data size - // ~ : pixel data(compressed) - std::vector header(8); - unsigned int data_len = static_cast(outSize); // truncate - memcpy(&header.at(0), &start_y, sizeof(int)); - memcpy(&header.at(4), &data_len, sizeof(unsigned int)); - - tinyexr::swap4(reinterpret_cast(&header.at(0))); - tinyexr::swap4(reinterpret_cast(&header.at(4))); - - data_list[ii].insert(data_list[ii].end(), header.begin(), header.end()); - data_list[ii].insert(data_list[ii].end(), block.begin(), - block.begin() + data_len); - - } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { -#if TINYEXR_USE_PIZ - unsigned int bufLen = - 1024 + static_cast( - 1.2 * static_cast( - buf.size())); // @fixme { compute good bound. } - std::vector block(bufLen); - unsigned int outSize = static_cast(block.size()); - - CompressPiz(&block.at(0), outSize, - reinterpret_cast(&buf.at(0)), - buf.size(), channels, exr_image->width, h); - - // 4 byte: scan line - // 4 byte: data size - // ~ : pixel data(compressed) - std::vector header(8); - unsigned int data_len = outSize; - memcpy(&header.at(0), &start_y, sizeof(int)); - memcpy(&header.at(4), &data_len, sizeof(unsigned int)); - - tinyexr::swap4(reinterpret_cast(&header.at(0))); - tinyexr::swap4(reinterpret_cast(&header.at(4))); - - data_list[ii].insert(data_list[ii].end(), header.begin(), header.end()); - data_list[ii].insert(data_list[ii].end(), block.begin(), - block.begin() + data_len); - -#else - assert(0); -#endif - } else if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { -#if TINYEXR_USE_ZFP - std::vector block; - unsigned int outSize; - - tinyexr::CompressZfp( - &block, &outSize, reinterpret_cast(&buf.at(0)), - exr_image->width, h, exr_header->num_channels, zfp_compression_param); - - // 4 byte: scan line - // 4 byte: data size - // ~ : pixel data(compressed) - std::vector header(8); - unsigned int data_len = outSize; - memcpy(&header.at(0), &start_y, sizeof(int)); - memcpy(&header.at(4), &data_len, sizeof(unsigned int)); - - tinyexr::swap4(reinterpret_cast(&header.at(0))); - tinyexr::swap4(reinterpret_cast(&header.at(4))); - - data_list[ii].insert(data_list[ii].end(), header.begin(), header.end()); - data_list[ii].insert(data_list[ii].end(), block.begin(), - block.begin() + data_len); - -#else - assert(0); -#endif - } else { - assert(0); - } - } // omp parallel - - for (size_t i = 0; i < static_cast(num_blocks); i++) { - data.insert(data.end(), data_list[i].begin(), data_list[i].end()); - - offsets[i] = offset; - tinyexr::swap8(reinterpret_cast(&offsets[i])); - offset += data_list[i].size(); - } - - { - memory.insert( - memory.end(), reinterpret_cast(&offsets.at(0)), - reinterpret_cast(&offsets.at(0)) + - sizeof(tinyexr::tinyexr_uint64) * static_cast(num_blocks)); - } - - { memory.insert(memory.end(), data.begin(), data.end()); } - - assert(memory.size() > 0); - - (*memory_out) = static_cast(malloc(memory.size())); - memcpy((*memory_out), &memory.at(0), memory.size()); - - return memory.size(); // OK -} - -int SaveEXRImageToFile(const EXRImage *exr_image, const EXRHeader *exr_header, - const char *filename, const char **err) { - if (exr_image == NULL || filename == NULL || - exr_header->compression_type < 0) { - if (err) { - (*err) = "Invalid argument."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - -#if !TINYEXR_USE_PIZ - if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_PIZ) { - if (err) { - (*err) = "PIZ compression is not supported in this build."; - } - return 0; - } -#endif - -#if !TINYEXR_USE_ZFP - if (exr_header->compression_type == TINYEXR_COMPRESSIONTYPE_ZFP) { - if (err) { - (*err) = "ZFP compression is not supported in this build."; - } - return 0; - } -#endif - -#ifdef _WIN32 - FILE *fp = NULL; - fopen_s(&fp, filename, "wb"); -#else - FILE *fp = fopen(filename, "wb"); -#endif - if (!fp) { - if (err) { - (*err) = "Cannot write a file."; - } - return TINYEXR_ERROR_CANT_OPEN_FILE; - } - - unsigned char *mem = NULL; - size_t mem_size = SaveEXRImageToMemory(exr_image, exr_header, &mem, err); - - if ((mem_size > 0) && mem) { - fwrite(mem, 1, mem_size, fp); - } - free(mem); - - fclose(fp); - - return TINYEXR_SUCCESS; -} - -int LoadDeepEXR(DeepImage *deep_image, const char *filename, const char **err) { - if (deep_image == NULL) { - if (err) { - (*err) = "Invalid argument."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - FILE *fp = fopen(filename, "rb"); - if (!fp) { - if (err) { - (*err) = "Cannot read file."; - } - return TINYEXR_ERROR_CANT_OPEN_FILE; - } - - size_t filesize; - // Compute size - fseek(fp, 0, SEEK_END); - filesize = static_cast(ftell(fp)); - fseek(fp, 0, SEEK_SET); - - if (filesize == 0) { - fclose(fp); - if (err) { - (*err) = "File size is zero."; - } - return TINYEXR_ERROR_INVALID_FILE; - } - - std::vector buf(filesize); // @todo { use mmap } - { - size_t ret; - ret = fread(&buf[0], 1, filesize, fp); - assert(ret == filesize); - (void)ret; - } - fclose(fp); - - const char *head = &buf[0]; - const char *marker = &buf[0]; - - // Header check. - { - const char header[] = {0x76, 0x2f, 0x31, 0x01}; - - if (memcmp(marker, header, 4) != 0) { - if (err) { - (*err) = "Invalid magic number."; - } - return TINYEXR_ERROR_INVALID_MAGIC_NUMBER; - } - marker += 4; - } - - // Version, scanline. - { - // ver 2.0, scanline, deep bit on(0x800) - // must be [2, 0, 0, 0] - if (marker[0] != 2 || marker[1] != 8 || marker[2] != 0 || marker[3] != 0) { - if (err) { - (*err) = "Unsupported version or scanline."; - } - return TINYEXR_ERROR_UNSUPPORTED_FORMAT; - } - - marker += 4; - } - - int dx = -1; - int dy = -1; - int dw = -1; - int dh = -1; - int num_scanline_blocks = 1; // 16 for ZIP compression. - int compression_type = -1; - int num_channels = -1; - std::vector channels; - - // Read attributes - size_t size = filesize - tinyexr::kEXRVersionSize; - for (;;) { - if (0 == size) { - return TINYEXR_ERROR_INVALID_DATA; - } else if (marker[0] == '\0') { - size--; - break; - } - - std::string attr_name; - std::string attr_type; - std::vector data; - size_t marker_size; - if (!tinyexr::ReadAttribute(&attr_name, &attr_type, &data, &marker_size, - marker, size)) { - return TINYEXR_ERROR_INVALID_DATA; - } - marker += marker_size; - size -= marker_size; - - if (attr_name.compare("compression") == 0) { - compression_type = data[0]; - if (compression_type > TINYEXR_COMPRESSIONTYPE_PIZ) { - if (err) { - (*err) = "Unsupported compression type."; - } - return TINYEXR_ERROR_UNSUPPORTED_FORMAT; - } - - if (compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) { - num_scanline_blocks = 16; - } - - } else if (attr_name.compare("channels") == 0) { - // name: zero-terminated string, from 1 to 255 bytes long - // pixel type: int, possible values are: UINT = 0 HALF = 1 FLOAT = 2 - // pLinear: unsigned char, possible values are 0 and 1 - // reserved: three chars, should be zero - // xSampling: int - // ySampling: int - - tinyexr::ReadChannelInfo(channels, data); - - num_channels = static_cast(channels.size()); - - if (num_channels < 1) { - if (err) { - (*err) = "Invalid channels format."; - } - return TINYEXR_ERROR_INVALID_DATA; - } - - } else if (attr_name.compare("dataWindow") == 0) { - memcpy(&dx, &data.at(0), sizeof(int)); - memcpy(&dy, &data.at(4), sizeof(int)); - memcpy(&dw, &data.at(8), sizeof(int)); - memcpy(&dh, &data.at(12), sizeof(int)); - tinyexr::swap4(reinterpret_cast(&dx)); - tinyexr::swap4(reinterpret_cast(&dy)); - tinyexr::swap4(reinterpret_cast(&dw)); - tinyexr::swap4(reinterpret_cast(&dh)); - - } else if (attr_name.compare("displayWindow") == 0) { - int x; - int y; - int w; - int h; - memcpy(&x, &data.at(0), sizeof(int)); - memcpy(&y, &data.at(4), sizeof(int)); - memcpy(&w, &data.at(8), sizeof(int)); - memcpy(&h, &data.at(12), sizeof(int)); - tinyexr::swap4(reinterpret_cast(&x)); - tinyexr::swap4(reinterpret_cast(&y)); - tinyexr::swap4(reinterpret_cast(&w)); - tinyexr::swap4(reinterpret_cast(&h)); - } - } - - assert(dx >= 0); - assert(dy >= 0); - assert(dw >= 0); - assert(dh >= 0); - assert(num_channels >= 1); - - int data_width = dw - dx + 1; - int data_height = dh - dy + 1; - - std::vector image( - static_cast(data_width * data_height * 4)); // 4 = RGBA - - // Read offset tables. - int num_blocks = data_height / num_scanline_blocks; - if (num_blocks * num_scanline_blocks < data_height) { - num_blocks++; - } - - std::vector offsets(static_cast(num_blocks)); - - for (size_t y = 0; y < static_cast(num_blocks); y++) { - tinyexr::tinyexr_int64 offset; - memcpy(&offset, marker, sizeof(tinyexr::tinyexr_int64)); - tinyexr::swap8(reinterpret_cast(&offset)); - marker += sizeof(tinyexr::tinyexr_int64); // = 8 - offsets[y] = offset; - } - -#if TINYEXR_USE_PIZ - if ((compression_type == TINYEXR_COMPRESSIONTYPE_NONE) || - (compression_type == TINYEXR_COMPRESSIONTYPE_RLE) || - (compression_type == TINYEXR_COMPRESSIONTYPE_ZIPS) || - (compression_type == TINYEXR_COMPRESSIONTYPE_ZIP) || - (compression_type == TINYEXR_COMPRESSIONTYPE_PIZ)) { -#else - if ((compression_type == TINYEXR_COMPRESSIONTYPE_NONE) || - (compression_type == TINYEXR_COMPRESSIONTYPE_RLE) || - (compression_type == TINYEXR_COMPRESSIONTYPE_ZIPS) || - (compression_type == TINYEXR_COMPRESSIONTYPE_ZIP)) { -#endif - // OK - } else { - if (err) { - (*err) = "Unsupported format."; - } - return TINYEXR_ERROR_UNSUPPORTED_FORMAT; - } - - deep_image->image = static_cast( - malloc(sizeof(float **) * static_cast(num_channels))); - for (int c = 0; c < num_channels; c++) { - deep_image->image[c] = static_cast( - malloc(sizeof(float *) * static_cast(data_height))); - for (int y = 0; y < data_height; y++) { - } - } - - deep_image->offset_table = static_cast( - malloc(sizeof(int *) * static_cast(data_height))); - for (int y = 0; y < data_height; y++) { - deep_image->offset_table[y] = static_cast( - malloc(sizeof(int) * static_cast(data_width))); - } - - for (size_t y = 0; y < static_cast(num_blocks); y++) { - const unsigned char *data_ptr = - reinterpret_cast(head + offsets[y]); - - // int: y coordinate - // int64: packed size of pixel offset table - // int64: packed size of sample data - // int64: unpacked size of sample data - // compressed pixel offset table - // compressed sample data - int line_no; - tinyexr::tinyexr_int64 packedOffsetTableSize; - tinyexr::tinyexr_int64 packedSampleDataSize; - tinyexr::tinyexr_int64 unpackedSampleDataSize; - memcpy(&line_no, data_ptr, sizeof(int)); - memcpy(&packedOffsetTableSize, data_ptr + 4, - sizeof(tinyexr::tinyexr_int64)); - memcpy(&packedSampleDataSize, data_ptr + 12, - sizeof(tinyexr::tinyexr_int64)); - memcpy(&unpackedSampleDataSize, data_ptr + 20, - sizeof(tinyexr::tinyexr_int64)); - - tinyexr::swap4(reinterpret_cast(&line_no)); - tinyexr::swap8( - reinterpret_cast(&packedOffsetTableSize)); - tinyexr::swap8( - reinterpret_cast(&packedSampleDataSize)); - tinyexr::swap8( - reinterpret_cast(&unpackedSampleDataSize)); - - std::vector pixelOffsetTable(static_cast(data_width)); - - // decode pixel offset table. - { - unsigned long dstLen = pixelOffsetTable.size() * sizeof(int); - tinyexr::DecompressZip( - reinterpret_cast(&pixelOffsetTable.at(0)), &dstLen, - data_ptr + 28, static_cast(packedOffsetTableSize)); - - assert(dstLen == pixelOffsetTable.size() * sizeof(int)); - for (size_t i = 0; i < static_cast(data_width); i++) { - deep_image->offset_table[y][i] = pixelOffsetTable[i]; - } - } - - std::vector sample_data( - static_cast(unpackedSampleDataSize)); - - // decode sample data. - { - unsigned long dstLen = static_cast(unpackedSampleDataSize); - tinyexr::DecompressZip( - reinterpret_cast(&sample_data.at(0)), &dstLen, - data_ptr + 28 + packedOffsetTableSize, - static_cast(packedSampleDataSize)); - assert(dstLen == static_cast(unpackedSampleDataSize)); - } - - // decode sample - int sampleSize = -1; - std::vector channel_offset_list(static_cast(num_channels)); - { - int channel_offset = 0; - for (size_t i = 0; i < static_cast(num_channels); i++) { - channel_offset_list[i] = channel_offset; - if (channels[i].pixel_type == TINYEXR_PIXELTYPE_UINT) { // UINT - channel_offset += 4; - } else if (channels[i].pixel_type == TINYEXR_PIXELTYPE_HALF) { // half - channel_offset += 2; - } else if (channels[i].pixel_type == - TINYEXR_PIXELTYPE_FLOAT) { // float - channel_offset += 4; - } else { - assert(0); - } - } - sampleSize = channel_offset; - } - assert(sampleSize >= 2); - - assert(static_cast( - pixelOffsetTable[static_cast(data_width - 1)] * - sampleSize) == sample_data.size()); - int samples_per_line = static_cast(sample_data.size()) / sampleSize; - - // - // Alloc memory - // - - // - // pixel data is stored as image[channels][pixel_samples] - // - { - tinyexr::tinyexr_uint64 data_offset = 0; - for (size_t c = 0; c < static_cast(num_channels); c++) { - deep_image->image[c][y] = static_cast( - malloc(sizeof(float) * static_cast(samples_per_line))); - - if (channels[c].pixel_type == 0) { // UINT - for (size_t x = 0; x < static_cast(samples_per_line); x++) { - unsigned int ui = *reinterpret_cast( - &sample_data.at(data_offset + x * sizeof(int))); - deep_image->image[c][y][x] = static_cast(ui); // @fixme - } - data_offset += - sizeof(unsigned int) * static_cast(samples_per_line); - } else if (channels[c].pixel_type == 1) { // half - for (size_t x = 0; x < static_cast(samples_per_line); x++) { - tinyexr::FP16 f16; - f16.u = *reinterpret_cast( - &sample_data.at(data_offset + x * sizeof(short))); - tinyexr::FP32 f32 = half_to_float(f16); - deep_image->image[c][y][x] = f32.f; - } - data_offset += sizeof(short) * static_cast(samples_per_line); - } else { // float - for (size_t x = 0; x < static_cast(samples_per_line); x++) { - float f = *reinterpret_cast( - &sample_data.at(data_offset + x * sizeof(float))); - deep_image->image[c][y][x] = f; - } - data_offset += sizeof(float) * static_cast(samples_per_line); - } - } - } - } // y - - deep_image->width = data_width; - deep_image->height = data_height; - - deep_image->channel_names = static_cast( - malloc(sizeof(const char *) * static_cast(num_channels))); - for (size_t c = 0; c < static_cast(num_channels); c++) { -#ifdef _WIN32 - deep_image->channel_names[c] = _strdup(channels[c].name.c_str()); -#else - deep_image->channel_names[c] = strdup(channels[c].name.c_str()); -#endif - } - deep_image->num_channels = num_channels; - - return TINYEXR_SUCCESS; -} - -void InitEXRImage(EXRImage *exr_image) { - if (exr_image == NULL) { - return; - } - - exr_image->width = 0; - exr_image->height = 0; - exr_image->num_channels = 0; - - exr_image->images = NULL; - exr_image->tiles = NULL; -} - -void InitEXRHeader(EXRHeader *exr_header) { - if (exr_header == NULL) { - return; - } - - memset(exr_header, 0, sizeof(EXRHeader)); -} - -int FreeEXRHeader(EXRHeader *exr_header) { - if (exr_header == NULL) { - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - if (exr_header->channels) { - free(exr_header->channels); - } - - if (exr_header->pixel_types) { - free(exr_header->pixel_types); - } - - if (exr_header->requested_pixel_types) { - free(exr_header->requested_pixel_types); - } - - for (int i = 0; i < exr_header->num_custom_attributes; i++) { - if (exr_header->custom_attributes[i].value) { - free(exr_header->custom_attributes[i].value); - } - } - - return TINYEXR_SUCCESS; -} - -int FreeEXRImage(EXRImage *exr_image) { - if (exr_image == NULL) { - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - for (int i = 0; i < exr_image->num_channels; i++) { - if (exr_image->images && exr_image->images[i]) { - free(exr_image->images[i]); - } - } - - if (exr_image->images) { - free(exr_image->images); - } - - if (exr_image->tiles) { - for (int tid = 0; tid < exr_image->num_tiles; tid++) { - for (int i = 0; i < exr_image->num_channels; i++) { - if (exr_image->tiles[tid].images && exr_image->tiles[tid].images[i]) { - free(exr_image->tiles[tid].images[i]); - } - } - if (exr_image->tiles[tid].images) { - free(exr_image->tiles[tid].images); - } - } - } - - return TINYEXR_SUCCESS; -} - -int ParseEXRHeaderFromFile(EXRHeader *exr_header, const EXRVersion *exr_version, - const char *filename, const char **err) { - if (exr_header == NULL || exr_version == NULL || filename == NULL) { - if (err) { - (*err) = "Invalid argument."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - -#ifdef _WIN32 - FILE *fp = NULL; - fopen_s(&fp, filename, "rb"); -#else - FILE *fp = fopen(filename, "rb"); -#endif - if (!fp) { - if (err) { - (*err) = "Cannot read file."; - } - return TINYEXR_ERROR_CANT_OPEN_FILE; - } - - size_t filesize; - // Compute size - fseek(fp, 0, SEEK_END); - filesize = static_cast(ftell(fp)); - fseek(fp, 0, SEEK_SET); - - std::vector buf(filesize); // @todo { use mmap } - { - size_t ret; - ret = fread(&buf[0], 1, filesize, fp); - assert(ret == filesize); - fclose(fp); - - if (ret != filesize) { - if (err) { - (*err) = "fread error."; - } - return TINYEXR_ERROR_INVALID_FILE; - } - } - - return ParseEXRHeaderFromMemory(exr_header, exr_version, &buf.at(0), filesize, - err); -} - -int ParseEXRMultipartHeaderFromMemory(EXRHeader ***exr_headers, - int *num_headers, - const EXRVersion *exr_version, - const unsigned char *memory, size_t size, - const char **err) { - if (memory == NULL || exr_headers == NULL || num_headers == NULL || - exr_version == NULL) { - // Invalid argument - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - if (size < tinyexr::kEXRVersionSize) { - return TINYEXR_ERROR_INVALID_DATA; - } - - const unsigned char *marker = memory + tinyexr::kEXRVersionSize; - size_t marker_size = size - tinyexr::kEXRVersionSize; - - std::vector infos; - - for (;;) { - tinyexr::HeaderInfo info; - info.clear(); - - std::string err_str; - bool empty_header = false; - int ret = ParseEXRHeader(&info, &empty_header, exr_version, &err_str, - marker, marker_size); - - if (ret != TINYEXR_SUCCESS) { - if (err) { - (*err) = strdup(err_str.c_str()); // may leak - } - return ret; - } - - if (empty_header) { - marker += 1; // skip '\0' - break; - } - - // `chunkCount` must exist in the header. - if (info.chunk_count == 0) { - if (err) { - (*err) = "`chunkCount' attribute is not found in the header."; - } - return TINYEXR_ERROR_INVALID_DATA; - } - - infos.push_back(info); - - // move to next header. - marker += info.header_len; - size -= info.header_len; - } - - // allocate memory for EXRHeader and create array of EXRHeader pointers. - (*exr_headers) = - static_cast(malloc(sizeof(EXRHeader *) * infos.size())); - for (size_t i = 0; i < infos.size(); i++) { - EXRHeader *exr_header = static_cast(malloc(sizeof(EXRHeader))); - - ConvertHeader(exr_header, infos[i]); - - // transfoer `tiled` from version. - exr_header->tiled = exr_version->tiled; - - (*exr_headers)[i] = exr_header; - } - - (*num_headers) = static_cast(infos.size()); - - return TINYEXR_SUCCESS; -} - -int ParseEXRMultipartHeaderFromFile(EXRHeader ***exr_headers, int *num_headers, - const EXRVersion *exr_version, - const char *filename, const char **err) { - if (exr_headers == NULL || num_headers == NULL || exr_version == NULL || - filename == NULL) { - if (err) { - (*err) = "Invalid argument."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - -#ifdef _WIN32 - FILE *fp = NULL; - fopen_s(&fp, filename, "rb"); -#else - FILE *fp = fopen(filename, "rb"); -#endif - if (!fp) { - if (err) { - (*err) = "Cannot read file."; - } - return TINYEXR_ERROR_CANT_OPEN_FILE; - } - - size_t filesize; - // Compute size - fseek(fp, 0, SEEK_END); - filesize = static_cast(ftell(fp)); - fseek(fp, 0, SEEK_SET); - - std::vector buf(filesize); // @todo { use mmap } - { - size_t ret; - ret = fread(&buf[0], 1, filesize, fp); - assert(ret == filesize); - fclose(fp); - - if (ret != filesize) { - if (err) { - (*err) = "fread error."; - } - return TINYEXR_ERROR_INVALID_FILE; - } - } - - return ParseEXRMultipartHeaderFromMemory( - exr_headers, num_headers, exr_version, &buf.at(0), filesize, err); -} - -int ParseEXRVersionFromMemory(EXRVersion *version, const unsigned char *memory, - size_t size) { - if (version == NULL || memory == NULL) { - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - if (size < tinyexr::kEXRVersionSize) { - return TINYEXR_ERROR_INVALID_DATA; - } - - const unsigned char *marker = memory; - - // Header check. - { - const char header[] = {0x76, 0x2f, 0x31, 0x01}; - - if (memcmp(marker, header, 4) != 0) { - return TINYEXR_ERROR_INVALID_MAGIC_NUMBER; - } - marker += 4; - } - - version->tiled = false; - version->long_name = false; - version->non_image = false; - version->multipart = false; - - // Parse version header. - { - // must be 2 - if (marker[0] != 2) { - return TINYEXR_ERROR_INVALID_EXR_VERSION; - } - - if (version == NULL) { - return TINYEXR_SUCCESS; // May OK - } - - version->version = 2; - - if (marker[1] & 0x2) { // 9th bit - version->tiled = true; - } - if (marker[1] & 0x4) { // 10th bit - version->long_name = true; - } - if (marker[1] & 0x8) { // 11th bit - version->non_image = true; // (deep image) - } - if (marker[1] & 0x10) { // 12th bit - version->multipart = true; - } - } - - return TINYEXR_SUCCESS; -} - -int ParseEXRVersionFromFile(EXRVersion *version, const char *filename) { - if (filename == NULL) { - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - -#ifdef _WIN32 - FILE *fp = NULL; - fopen_s(&fp, filename, "rb"); -#else - FILE *fp = fopen(filename, "rb"); -#endif - if (!fp) { - return TINYEXR_ERROR_CANT_OPEN_FILE; - } - - size_t file_size; - // Compute size - fseek(fp, 0, SEEK_END); - file_size = static_cast(ftell(fp)); - fseek(fp, 0, SEEK_SET); - - if (file_size < tinyexr::kEXRVersionSize) { - return TINYEXR_ERROR_INVALID_FILE; - } - - unsigned char buf[tinyexr::kEXRVersionSize]; - size_t ret = fread(&buf[0], 1, tinyexr::kEXRVersionSize, fp); - fclose(fp); - - if (ret != tinyexr::kEXRVersionSize) { - return TINYEXR_ERROR_INVALID_FILE; - } - - return ParseEXRVersionFromMemory(version, buf, tinyexr::kEXRVersionSize); -} - -int LoadEXRMultipartImageFromMemory(EXRImage *exr_images, - const EXRHeader **exr_headers, - unsigned int num_parts, - const unsigned char *memory, - const char **err) { - if (exr_images == NULL || exr_headers == NULL || num_parts == 0 || - memory == NULL) { - if (err) { - (*err) = "Invalid argument."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - // compute total header size. - size_t total_header_size = 0; - for (unsigned int i = 0; i < num_parts; i++) { - if (exr_headers[i]->header_len == 0) { - if (err) { - (*err) = "EXRHeader is not initialized."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - total_header_size += exr_headers[i]->header_len; - } - - const char *marker = reinterpret_cast( - memory + total_header_size + 4 + - 4); // +8 for magic number and version header. - - marker += 1; // Skip empty header. - - // NOTE 1: - // In multipart image, There is 'part number' before chunk data. - // 4 byte : part number - // 4+ : chunk - // - // NOTE 2: - // EXR spec says 'part number' is 'unsigned long' but actually this is - // 'unsigned int(4 bytes)' in OpenEXR implementation... - // http://www.openexr.com/openexrfilelayout.pdf - - // Load chunk offset table. - std::vector > chunk_offset_table_list; - for (size_t i = 0; i < static_cast(num_parts); i++) { - std::vector offset_table( - static_cast(exr_headers[i]->chunk_count)); - - for (size_t c = 0; c < offset_table.size(); c++) { - tinyexr::tinyexr_uint64 offset; - memcpy(&offset, marker, 8); - tinyexr::swap8(&offset); - - offset_table[c] = offset + 4; // +4 to skip 'part number' - marker += 8; - } - - chunk_offset_table_list.push_back(offset_table); - } - - // Decode image. - for (size_t i = 0; i < static_cast(num_parts); i++) { - std::vector &offset_table = - chunk_offset_table_list[i]; - - // First check 'part number' is identitical to 'i' - for (size_t c = 0; c < offset_table.size(); c++) { - const unsigned char *part_number_addr = - memory + offset_table[c] - 4; // -4 to move to 'part number' field. - unsigned int part_no; - memcpy(&part_no, part_number_addr, sizeof(unsigned int)); // 4 - tinyexr::swap4(&part_no); - - if (part_no != i) { - assert(0); - return TINYEXR_ERROR_INVALID_DATA; - } - } - - int ret = tinyexr::DecodeChunk(&exr_images[i], exr_headers[i], offset_table, - memory); - if (ret != TINYEXR_SUCCESS) { - return ret; - } - } - - return TINYEXR_SUCCESS; -} - -int LoadEXRMultipartImageFromFile(EXRImage *exr_images, - const EXRHeader **exr_headers, - unsigned int num_parts, const char *filename, - const char **err) { - if (exr_images == NULL || exr_headers == NULL || num_parts == 0) { - if (err) { - (*err) = "Invalid argument."; - } - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - -#ifdef _WIN32 - FILE *fp = NULL; - fopen_s(&fp, filename, "rb"); -#else - FILE *fp = fopen(filename, "rb"); -#endif - if (!fp) { - if (err) { - (*err) = "Cannot read file."; - } - return TINYEXR_ERROR_CANT_OPEN_FILE; - } - - size_t filesize; - // Compute size - fseek(fp, 0, SEEK_END); - filesize = static_cast(ftell(fp)); - fseek(fp, 0, SEEK_SET); - - std::vector buf(filesize); // @todo { use mmap } - { - size_t ret; - ret = fread(&buf[0], 1, filesize, fp); - assert(ret == filesize); - fclose(fp); - (void)ret; - } - - return LoadEXRMultipartImageFromMemory(exr_images, exr_headers, num_parts, - &buf.at(0), err); -} - -int SaveEXR(const float *data, int width, int height, int components, - const char *outfilename) { - if (components == 3 || components == 4) { - // OK - } else { - return TINYEXR_ERROR_INVALID_ARGUMENT; - } - - // Assume at least 16x16 pixels. - if (width < 16) return TINYEXR_ERROR_INVALID_ARGUMENT; - if (height < 16) return TINYEXR_ERROR_INVALID_ARGUMENT; - - EXRHeader header; - InitEXRHeader(&header); - - EXRImage image; - InitEXRImage(&image); - - image.num_channels = components; - - std::vector images[4]; - images[0].resize(static_cast(width * height)); - images[1].resize(static_cast(width * height)); - images[2].resize(static_cast(width * height)); - images[3].resize(static_cast(width * height)); - - // Split RGB(A)RGB(A)RGB(A)... into R, G and B(and A) layers - for (size_t i = 0; i < static_cast(width * height); i++) { - images[0][i] = data[static_cast(components) * i + 0]; - images[1][i] = data[static_cast(components) * i + 1]; - images[2][i] = data[static_cast(components) * i + 2]; - if (components == 4) { - images[3][i] = data[static_cast(components) * i + 3]; - } - } - - float *image_ptr[4] = {0, 0, 0, 0}; - if (components == 4) { - image_ptr[0] = &(images[3].at(0)); // A - image_ptr[1] = &(images[2].at(0)); // B - image_ptr[2] = &(images[1].at(0)); // G - image_ptr[3] = &(images[0].at(0)); // R - } else { - image_ptr[0] = &(images[2].at(0)); // B - image_ptr[1] = &(images[1].at(0)); // G - image_ptr[2] = &(images[0].at(0)); // R - } - - image.images = reinterpret_cast(image_ptr); - image.width = width; - image.height = height; - - header.num_channels = components; - header.channels = static_cast(malloc( - sizeof(EXRChannelInfo) * static_cast(header.num_channels))); - // Must be (A)BGR order, since most of EXR viewers expect this channel order. - if (components == 4) { - strncpy(header.channels[0].name, "A", 255); - header.channels[0].name[strlen("A")] = '\0'; - strncpy(header.channels[1].name, "B", 255); - header.channels[1].name[strlen("B")] = '\0'; - strncpy(header.channels[2].name, "G", 255); - header.channels[2].name[strlen("G")] = '\0'; - strncpy(header.channels[3].name, "R", 255); - header.channels[3].name[strlen("R")] = '\0'; - } else { - strncpy(header.channels[0].name, "B", 255); - header.channels[0].name[strlen("B")] = '\0'; - strncpy(header.channels[1].name, "G", 255); - header.channels[1].name[strlen("G")] = '\0'; - strncpy(header.channels[2].name, "R", 255); - header.channels[2].name[strlen("R")] = '\0'; - } - - header.pixel_types = static_cast( - malloc(sizeof(int) * static_cast(header.num_channels))); - header.requested_pixel_types = static_cast( - malloc(sizeof(int) * static_cast(header.num_channels))); - for (int i = 0; i < header.num_channels; i++) { - header.pixel_types[i] = - TINYEXR_PIXELTYPE_FLOAT; // pixel type of input image - header.requested_pixel_types[i] = - TINYEXR_PIXELTYPE_HALF; // pixel type of output image to be stored in - // .EXR - } - - const char *err; - int ret = SaveEXRImageToFile(&image, &header, outfilename, &err); - if (ret != TINYEXR_SUCCESS) { - return ret; - } - - free(header.channels); - free(header.pixel_types); - free(header.requested_pixel_types); - - return ret; -} - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -#endif - -#endif // TINYEXR_H_ diff --git a/3rdparty/bgfx/CMakeLists.txt b/3rdparty/bgfx/CMakeLists.txt index 62d729d..7fa3abc 100644 --- a/3rdparty/bgfx/CMakeLists.txt +++ b/3rdparty/bgfx/CMakeLists.txt @@ -13,7 +13,8 @@ ADD_DEFINITIONS ("-DENTRY_CONFIG_USE_GLFW=1") ADD_DEFINITIONS ("-D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS") INCLUDE_DIRECTORIES ( - ${CMAKE_CURRENT_SOURCE_DIR}/bx/include + ${CMAKE_CURRENT_SOURCE_DIR}/../bx/include + ${CMAKE_CURRENT_SOURCE_DIR}/../bx/3rdparty ${CMAKE_CURRENT_SOURCE_DIR}/../bimg/include ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/khronos ${CMAKE_CURRENT_SOURCE_DIR}/include @@ -44,18 +45,14 @@ SET (BGFX_SOURCES ) SET (BGFX_AUX_SOURCES - examples/common/entry/dbg.cpp examples/common/nanovg/nanovg.cpp examples/common/nanovg/nanovg_bgfx.cpp examples/common/imgui/imgui.cpp - examples/common/imgui/ocornut_imgui.cpp 3rdparty/ib-compress/indexbuffercompression.cpp 3rdparty/ib-compress/indexbufferdecompression.cpp - 3rdparty/stb/stb_image.c 3rdparty/ocornut-imgui/imgui.cpp 3rdparty/ocornut-imgui/imgui_draw.cpp 3rdparty/ocornut-imgui/imgui_demo.cpp - 3rdparty/ocornut-imgui/imgui_node_graph_test.cpp ) ADD_LIBRARY ( bgfx SHARED ${BGFX_SOURCES} ) @@ -93,13 +90,13 @@ SET ( glslang_SRCS # 3rdparty/glslang/StandAlone/StandAlone.cpp # 3rdparty/glslang/StandAlone/ResourceLimits.cpp # 3rdparty/glslang/StandAlone/spirv-remap.cpp - 3rdparty/glslang/hlsl/hlslGrammar.cpp - 3rdparty/glslang/hlsl/hlslParseHelper.cpp - 3rdparty/glslang/hlsl/hlslParseables.cpp - 3rdparty/glslang/hlsl/hlslTokenStream.cpp - 3rdparty/glslang/hlsl/hlslAttributes.cpp - 3rdparty/glslang/hlsl/hlslOpMap.cpp - 3rdparty/glslang/hlsl/hlslScanContext.cpp + # 3rdparty/glslang/hlsl/hlslGrammar.cpp + # 3rdparty/glslang/hlsl/hlslParseHelper.cpp + # 3rdparty/glslang/hlsl/hlslParseables.cpp + # 3rdparty/glslang/hlsl/hlslTokenStream.cpp + # 3rdparty/glslang/hlsl/hlslAttributes.cpp + # 3rdparty/glslang/hlsl/hlslOpMap.cpp + # 3rdparty/glslang/hlsl/hlslScanContext.cpp 3rdparty/glslang/glslang/OSDependent/Unix/ossource.cpp # 3rdparty/glslang/glslang/OSDependent/Windows/ossource.cpp # 3rdparty/glslang/glslang/OSDependent/Windows/main.cpp @@ -110,6 +107,7 @@ SET ( glslang_SRCS 3rdparty/glslang/glslang/MachineIndependent/Intermediate.cpp 3rdparty/glslang/glslang/MachineIndependent/limits.cpp 3rdparty/glslang/glslang/MachineIndependent/Scan.cpp + 3rdparty/glslang/glslang/MachineIndependent/attribute.cpp 3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp 3rdparty/glslang/glslang/MachineIndependent/SymbolTable.cpp 3rdparty/glslang/glslang/MachineIndependent/ParseHelper.cpp @@ -125,13 +123,11 @@ SET ( glslang_SRCS 3rdparty/glslang/glslang/MachineIndependent/ParseContextBase.cpp 3rdparty/glslang/glslang/MachineIndependent/linkValidate.cpp 3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp - 3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp - 3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp 3rdparty/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp - 3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp - 3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp 3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp + 3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp 3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp + 3rdparty/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp 3rdparty/glslang/glslang/MachineIndependent/propagateNoContraction.cpp ) diff --git a/3rdparty/bgfx/LICENSE b/3rdparty/bgfx/LICENSE index dd17ed4..3df43e3 100644 --- a/3rdparty/bgfx/LICENSE +++ b/3rdparty/bgfx/LICENSE @@ -1,4 +1,4 @@ -Copyright 2010-2017 Branimir Karadzic. All rights reserved. +Copyright 2010-2018 Branimir Karadzic. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/3rdparty/bgfx/README.md b/3rdparty/bgfx/README.md index 5d918d3..1f6d644 100644 --- a/3rdparty/bgfx/README.md +++ b/3rdparty/bgfx/README.md @@ -37,18 +37,17 @@ Supported platforms: * iOS (iPhone, iPad, AppleTV) * Linux * MIPS Creator CI20 - * Native Client (PPAPI 37+, ARM, x86, x64, PNaCl) * OSX (10.9+) * RaspberryPi * SteamLink * Windows (XP, Vista, 7, 8, 10) - * WinRT (WinPhone 8.0+) + * UWP (Universal Windows, Xbox One) Supported compilers: * Clang 3.3 and above * GCC 4.6 and above - * VS2012 and above + * VS2015 and above Languages: @@ -58,7 +57,8 @@ Languages: * [Go language API bindings](https://github.com/james4k/go-bgfx) * [Haskell language API bindings](https://github.com/haskell-game/bgfx) * [Lightweight Java Game Library 3 bindings](https://github.com/LWJGL/lwjgl3) - * [Lua language API bindings](https://github.com/excessive/lua-bgfx) + * [Lua language API bindings 1](https://github.com/excessive/lua-bgfx) + * [Lua language API bindings 2](https://github.com/cloudwu/lua-bgfx) * [Nim language API bindings](https://github.com/Halsys/nim-bgfx) * [Python language API bindings](https://github.com/jnadro/pybgfx#pybgf) * [Rust language API bindings](https://github.com/rhoot/bgfx-rs) @@ -95,10 +95,10 @@ https://github.com/dariomanesku/cmftStudio cmftStudio - cubemap filtering tool. ## Crown -https://github.com/taylor001/crown Crown is a general purpose data-driven game +https://github.com/dbartolini/crown Crown is a general purpose data-driven game engine, written from scratch with a minimalistic and data-oriented design philosophy in mind. -![Crown screenshot](https://raw.githubusercontent.com/taylor001/crown/master/docs/shots/level-editor.png) +![Crown screenshot](https://raw.githubusercontent.com/dbartolini/crown/master/docs/shots/level-editor.png) ## Offroad Legends 2 @@ -111,8 +111,8 @@ focusing on racing games. https://github.com/andr3wmac/Torque6 Torque 6 is an MIT licensed 3D engine loosely based on Torque2D. Being neither Torque2D or Torque3D it is the 6th derivative of the original Torque Engine. -Torque 6 Material Editor ## twinkle @@ -147,7 +147,13 @@ C++ and using bgfx to support multiple rendering APIs. ## DLS http://makingartstudios.itch.io/dls - DLS the digital logic simulator game. -![dls-screenshot](https://img.itch.io/aW1hZ2UvMzk3MTgvMTc5MjQ4LnBuZw==/original/kA%2FQPb.png) + + +http://dls.makingartstudios.com/sandbox/ - DLS: The Sandbox +![dls-sandbox-screenshot](https://pbs.twimg.com/media/DBaFwOKWAAEq0mp.jpg:large) ## MAME @@ -159,9 +165,10 @@ https://github.com/mamedev/mame MAME - Multiple Arcade Machine Emulator https://blackshift.itch.io/blackshift - Blackshift is a grid-based, space-themed action puzzle game which isn't afraid of complexity — think Chip's Challenge on -crack. -Blackshift Trailer, May 2016 @@ -170,8 +177,9 @@ width="640" height="480" border="0" /> https://eheitzresearch.wordpress.com/415-2/ - Real-Time Polygonal-Light Shading with Linearly Transformed Cosines, Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt, ACM SIGGRAPH 2016 -Real-Time Polygonal-Light Shading with Linearly Transformed Cosines @@ -180,8 +188,9 @@ width="640" height="480" border="0" /> http://www.dogbytegames.com/dead_venture.html - Dead Venture is a new Drive 'N Gun game where you help a handful of survivals reach the safe haven: a military base on a far island. -Dead Venture - Gameplay Teaser (iOS / Android) @@ -208,8 +217,8 @@ WYSIWYG Editor http://gorallygame.com/ - Go Rally is top-down rally game with a career mode, multiplayer time challenges, and a track creator. -Go Rally @@ -230,18 +239,51 @@ game in development. It's a combination of FPS and stealth. https://github.com/VladSerhiienko/FbxPipeline - Yet another FBX exporter with flatbuffers serialization. -## FRAG +## FRAG - Framework for Rather Awesome Games -https://github.com/fragworks/frag - FRAG is a game creation framework being -developed using the Nim programming language, and is currently in pre-alpha -status. The immediate development focus for FRAG is supporting the creation of -2D desktop games. +http://fragworks.io/ - FRAG is a cross-platform 2D game creation framework for +the Nim programming language. ## vg-renderer https://github.com/jdryg/vg-renderer#vg-renderer - A vector graphics renderer for bgfx, based on ideas from both NanoVG and ImDrawList (Dear ImGUI) +## Zombie Safari + +http://www.dogbytegames.com/zombie_safari.html - Do what you please in this +Open-World Offroad Driving game: explore massive landscapes, complete challenges, +smash zombies, find secret locations, unlock and upgrade cars and weapons, it's +up to you! + + + +## Smith and Winston + +http://www.smithandwinston.com/ - Smith and Winston is an exploration twin stick +shooter for PC, PS4 & XBoxOne arriving in late 2018. Smith and Winston features +a massively destructable voxel world, rapid twin stick combat, physics puzzles +and Metroid style discovery. + + + +## Football Manager 2018 + +http://www.footballmanager.com/ - Football Manager 2018 is a 2017 football +management simulation video game developed by Sports Interactive and published +by Sega. + + + [License (BSD 2-clause)](https://bkaradzic.github.io/bgfx/license.html) ----------------------------------------------------------------------- @@ -249,7 +291,7 @@ for bgfx, based on ideas from both NanoVG and ImDrawList (Dear ImGUI) - Copyright 2010-2017 Branimir Karadzic. All rights reserved. + Copyright 2010-2018 Branimir Karadzic. All rights reserved. https://github.com/bkaradzic/bgfx diff --git a/3rdparty/bgfx/examples/common/aviwriter.h b/3rdparty/bgfx/examples/common/aviwriter.h index 41bd1ab..554e716 100644 --- a/3rdparty/bgfx/examples/common/aviwriter.h +++ b/3rdparty/bgfx/examples/common/aviwriter.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/bgfx_utils.cpp b/3rdparty/bgfx/examples/common/bgfx_utils.cpp index 6a92d1c..2850b31 100644 --- a/3rdparty/bgfx/examples/common/bgfx_utils.cpp +++ b/3rdparty/bgfx/examples/common/bgfx_utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -13,7 +13,7 @@ namespace stl = tinystl; #include #include #include -#include +#include #include #include #include "entry/entry.h" @@ -119,11 +119,14 @@ static bgfx::ShaderHandle loadShader(bx::FileReaderI* _reader, const char* _name break; } - bx::strlncpy(filePath, BX_COUNTOF(filePath), shaderPath); - bx::strlncat(filePath, BX_COUNTOF(filePath), _name); - bx::strlncat(filePath, BX_COUNTOF(filePath), ".bin"); + bx::strCopy(filePath, BX_COUNTOF(filePath), shaderPath); + bx::strCat(filePath, BX_COUNTOF(filePath), _name); + bx::strCat(filePath, BX_COUNTOF(filePath), ".bin"); - return bgfx::createShader(loadMem(_reader, filePath) ); + bgfx::ShaderHandle handle = bgfx::createShader(loadMem(_reader, filePath) ); + bgfx::setName(handle, filePath); + + return handle; } bgfx::ShaderHandle loadShader(const char* _name) @@ -155,7 +158,7 @@ static void imageReleaseCb(void* _ptr, void* _userData) bimg::imageFree(imageContainer); } -bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath, uint32_t _flags, uint8_t _skip, bgfx::TextureInfo* _info) +bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath, uint32_t _flags, uint8_t _skip, bgfx::TextureInfo* _info, bimg::Orientation::Enum* _orientation) { BX_UNUSED(_skip); bgfx::TextureHandle handle = BGFX_INVALID_HANDLE; @@ -168,6 +171,11 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath, if (NULL != imageContainer) { + if (NULL != _orientation) + { + *_orientation = imageContainer->m_orientation; + } + const bgfx::Memory* mem = bgfx::makeRef( imageContainer->m_data , imageContainer->m_size @@ -187,6 +195,18 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath, , mem ); } + else if (1 < imageContainer->m_depth) + { + handle = bgfx::createTexture3D( + uint16_t(imageContainer->m_width) + , uint16_t(imageContainer->m_height) + , uint16_t(imageContainer->m_depth) + , 1 < imageContainer->m_numMips + , bgfx::TextureFormat::Enum(imageContainer->m_format) + , _flags + , mem + ); + } else { handle = bgfx::createTexture2D( @@ -200,16 +220,18 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath, ); } + bgfx::setName(handle, _filePath); + if (NULL != _info) { bgfx::calcTextureSize( *_info , uint16_t(imageContainer->m_width) , uint16_t(imageContainer->m_height) - , 0 - , false - , false - , 1 + , uint16_t(imageContainer->m_depth) + , imageContainer->m_cubeMap + , 1 < imageContainer->m_numMips + , imageContainer->m_numLayers , bgfx::TextureFormat::Enum(imageContainer->m_format) ); } @@ -219,9 +241,9 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath, return handle; } -bgfx::TextureHandle loadTexture(const char* _name, uint32_t _flags, uint8_t _skip, bgfx::TextureInfo* _info) +bgfx::TextureHandle loadTexture(const char* _name, uint32_t _flags, uint8_t _skip, bgfx::TextureInfo* _info, bimg::Orientation::Enum* _orientation) { - return loadTexture(entry::getFileReader(), _name, _flags, _skip, _info); + return loadTexture(entry::getFileReader(), _name, _flags, _skip, _info, _orientation); } bimg::ImageContainer* imageLoad(const char* _filePath, bgfx::TextureFormat::Enum _dstFormat) @@ -373,8 +395,8 @@ struct Group void reset() { - m_vbh.idx = bgfx::invalidHandle; - m_ibh.idx = bgfx::invalidHandle; + m_vbh.idx = bgfx::kInvalidHandle; + m_ibh.idx = bgfx::kInvalidHandle; m_prims.clear(); } @@ -515,17 +537,17 @@ struct Mesh for (GroupArray::const_iterator it = m_groups.begin(), itEnd = m_groups.end(); it != itEnd; ++it) { const Group& group = *it; - bgfx::destroyVertexBuffer(group.m_vbh); + bgfx::destroy(group.m_vbh); if (bgfx::isValid(group.m_ibh) ) { - bgfx::destroyIndexBuffer(group.m_ibh); + bgfx::destroy(group.m_ibh); } } m_groups.clear(); } - void submit(uint8_t _id, bgfx::ProgramHandle _program, const float* _mtx, uint64_t _state) const + void submit(bgfx::ViewId _id, bgfx::ProgramHandle _program, const float* _mtx, uint64_t _state) const { if (BGFX_STATE_MASK == _state) { @@ -547,7 +569,7 @@ struct Mesh const Group& group = *it; bgfx::setIndexBuffer(group.m_ibh); - bgfx::setVertexBuffer(group.m_vbh); + bgfx::setVertexBuffer(0, group.m_vbh); bgfx::submit(_id, _program, 0, it != itEnd-1); } } @@ -578,7 +600,7 @@ struct Mesh const Group& group = *it; bgfx::setIndexBuffer(group.m_ibh); - bgfx::setVertexBuffer(group.m_vbh); + bgfx::setVertexBuffer(0, group.m_vbh); bgfx::submit(state.m_viewId, state.m_program, 0, it != itEnd-1); } } @@ -626,7 +648,7 @@ void meshStateDestroy(MeshState* _meshState) BX_FREE(entry::getAllocator(), _meshState); } -void meshSubmit(const Mesh* _mesh, uint8_t _id, bgfx::ProgramHandle _program, const float* _mtx, uint64_t _state) +void meshSubmit(const Mesh* _mesh, bgfx::ViewId _id, bgfx::ProgramHandle _program, const float* _mtx, uint64_t _state) { _mesh->submit(_id, _program, _mtx, _state); } @@ -636,7 +658,7 @@ void meshSubmit(const Mesh* _mesh, const MeshState*const* _state, uint8_t _numPa _mesh->submit(_state, _numPasses, _mtx, _numMatrices); } -Args::Args(int _argc, char** _argv) +Args::Args(int _argc, const char* const* _argv) : m_type(bgfx::RendererType::Count) , m_pciId(BGFX_PCI_ID_NONE) { @@ -654,7 +676,7 @@ Args::Args(int _argc, char** _argv) { m_type = bgfx::RendererType::Noop; } - else if (BX_ENABLED(BX_PLATFORM_WINDOWS) ) + else if (BX_ENABLED(BX_PLATFORM_WINDOWS|BX_PLATFORM_WINRT|BX_PLATFORM_XBOXONE) ) { if (cmdLine.hasArg("d3d9") ) { diff --git a/3rdparty/bgfx/examples/common/bgfx_utils.h b/3rdparty/bgfx/examples/common/bgfx_utils.h index e81510f..dacb5e4 100644 --- a/3rdparty/bgfx/examples/common/bgfx_utils.h +++ b/3rdparty/bgfx/examples/common/bgfx_utils.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -23,7 +23,7 @@ bgfx::ShaderHandle loadShader(const char* _name); bgfx::ProgramHandle loadProgram(const char* _vsName, const char* _fsName); /// -bgfx::TextureHandle loadTexture(const char* _name, uint32_t _flags = BGFX_TEXTURE_NONE, uint8_t _skip = 0, bgfx::TextureInfo* _info = NULL); +bgfx::TextureHandle loadTexture(const char* _name, uint32_t _flags = BGFX_TEXTURE_NONE, uint8_t _skip = 0, bgfx::TextureInfo* _info = NULL, bimg::Orientation::Enum* _orientation = NULL); /// bimg::ImageContainer* imageLoad(const char* _filePath, bgfx::TextureFormat::Enum _dstFormat); @@ -41,7 +41,7 @@ void calcTangents(void* _vertices, uint16_t _numVertices, bgfx::VertexDecl _decl inline bool checkAvailTransientBuffers(uint32_t _numVertices, const bgfx::VertexDecl& _decl, uint32_t _numIndices) { return _numVertices == bgfx::getAvailTransientVertexBuffer(_numVertices, _decl) - && _numIndices == bgfx::getAvailTransientIndexBuffer(_numIndices) + && (0 == _numIndices || _numIndices == bgfx::getAvailTransientIndexBuffer(_numIndices) ) ; } @@ -75,7 +75,7 @@ struct MeshState uint64_t m_state; bgfx::ProgramHandle m_program; uint8_t m_numTextures; - uint8_t m_viewId; + bgfx::ViewId m_viewId; }; struct Mesh; @@ -93,7 +93,7 @@ MeshState* meshStateCreate(); void meshStateDestroy(MeshState* _meshState); /// -void meshSubmit(const Mesh* _mesh, uint8_t _id, bgfx::ProgramHandle _program, const float* _mtx, uint64_t _state = BGFX_STATE_MASK); +void meshSubmit(const Mesh* _mesh, bgfx::ViewId _id, bgfx::ProgramHandle _program, const float* _mtx, uint64_t _state = BGFX_STATE_MASK); /// void meshSubmit(const Mesh* _mesh, const MeshState*const* _state, uint8_t _numPasses, const float* _mtx, uint16_t _numMatrices = 1); @@ -101,7 +101,7 @@ void meshSubmit(const Mesh* _mesh, const MeshState*const* _state, uint8_t _numPa /// struct Args { - Args(int _argc, char** _argv); + Args(int _argc, const char* const* _argv); bgfx::RendererType::Enum m_type; uint16_t m_pciId; diff --git a/3rdparty/bgfx/examples/common/bounds.cpp b/3rdparty/bgfx/examples/common/bounds.cpp index 0240da2..22ad128 100644 --- a/3rdparty/bgfx/examples/common/bounds.cpp +++ b/3rdparty/bgfx/examples/common/bounds.cpp @@ -1,10 +1,10 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include -#include +#include #include "bounds.h" void aabbToObb(Obb& _obb, const Aabb& _aabb) @@ -19,6 +19,28 @@ void aabbToObb(Obb& _obb, const Aabb& _aabb) _obb.m_mtx[15] = 1.0f; } +void toAabb(Aabb& _aabb, const Obb& _obb) +{ + float xyz[3] = { 1.0f, 1.0f, 1.0f }; + + float tmp[3]; + bx::vec3MulMtx(tmp, xyz, _obb.m_mtx); + + bx::vec3Move(_aabb.m_min, tmp); + bx::vec3Move(_aabb.m_max, tmp); + + for (uint32_t ii = 1; ii < 8; ++ii) + { + xyz[0] = ii & 1 ? -1.0f : 1.0f; + xyz[1] = ii & 2 ? -1.0f : 1.0f; + xyz[2] = ii & 4 ? -1.0f : 1.0f; + bx::vec3MulMtx(tmp, xyz, _obb.m_mtx); + + bx::vec3Min(_aabb.m_min, _aabb.m_min, tmp); + bx::vec3Max(_aabb.m_max, _aabb.m_max, tmp); + } +} + void toAabb(Aabb& _aabb, const Sphere& _sphere) { float radius = _sphere.m_radius; @@ -39,9 +61,9 @@ void toAabb(Aabb& _aabb, const Disk& _disk) const float inv = 1.0f / (tmp[0]*tmp[1]*tmp[2]); float extent[3]; - extent[0] = _disk.m_radius * tmp[0] * bx::fsqrt( (nsq[0] + nsq[1] * nsq[2]) * inv); - extent[1] = _disk.m_radius * tmp[1] * bx::fsqrt( (nsq[1] + nsq[2] * nsq[0]) * inv); - extent[2] = _disk.m_radius * tmp[2] * bx::fsqrt( (nsq[2] + nsq[0] * nsq[1]) * inv); + extent[0] = _disk.m_radius * tmp[0] * bx::sqrt( (nsq[0] + nsq[1] * nsq[2]) * inv); + extent[1] = _disk.m_radius * tmp[1] * bx::sqrt( (nsq[1] + nsq[2] * nsq[0]) * inv); + extent[2] = _disk.m_radius * tmp[2] * bx::sqrt( (nsq[2] + nsq[0] * nsq[1]) * inv); bx::vec3Sub(_aabb.m_min, _disk.m_center, extent); bx::vec3Add(_aabb.m_max, _disk.m_center, extent); @@ -66,9 +88,9 @@ void toAabb(Aabb& _aabb, const Cylinder& _cylinder) const float inv = 1.0f / (tmp[0]*tmp[1]*tmp[2]); float extent[3]; - extent[0] = _cylinder.m_radius * tmp[0] * bx::fsqrt( (nsq[0] + nsq[1] * nsq[2]) * inv); - extent[1] = _cylinder.m_radius * tmp[1] * bx::fsqrt( (nsq[1] + nsq[2] * nsq[0]) * inv); - extent[2] = _cylinder.m_radius * tmp[2] * bx::fsqrt( (nsq[2] + nsq[0] * nsq[1]) * inv); + extent[0] = _cylinder.m_radius * tmp[0] * bx::sqrt( (nsq[0] + nsq[1] * nsq[2]) * inv); + extent[1] = _cylinder.m_radius * tmp[1] * bx::sqrt( (nsq[1] + nsq[2] * nsq[0]) * inv); + extent[2] = _cylinder.m_radius * tmp[2] * bx::sqrt( (nsq[2] + nsq[0] * nsq[1]) * inv); float minP[3]; bx::vec3Sub(minP, _cylinder.m_pos, extent); @@ -112,12 +134,12 @@ void toAabb(Aabb& _aabb, const void* _vertices, uint32_t _numVertices, uint32_t float xx = position[0]; float yy = position[1]; float zz = position[2]; - min[0] = bx::fmin(xx, min[0]); - min[1] = bx::fmin(yy, min[1]); - min[2] = bx::fmin(zz, min[2]); - max[0] = bx::fmax(xx, max[0]); - max[1] = bx::fmax(yy, max[1]); - max[2] = bx::fmax(zz, max[2]); + min[0] = bx::min(xx, min[0]); + min[1] = bx::min(yy, min[1]); + min[2] = bx::min(zz, min[2]); + max[0] = bx::max(xx, max[0]); + max[1] = bx::max(yy, max[1]); + max[2] = bx::max(zz, max[2]); } _aabb.m_min[0] = min[0]; @@ -148,12 +170,12 @@ void toAabb(Aabb& _aabb, const float* _mtx, const void* _vertices, uint32_t _num float xx = position[0]; float yy = position[1]; float zz = position[2]; - min[0] = bx::fmin(xx, min[0]); - min[1] = bx::fmin(yy, min[1]); - min[2] = bx::fmin(zz, min[2]); - max[0] = bx::fmax(xx, max[0]); - max[1] = bx::fmax(yy, max[1]); - max[2] = bx::fmax(zz, max[2]); + min[0] = bx::min(xx, min[0]); + min[1] = bx::min(yy, min[1]); + min[2] = bx::min(zz, min[2]); + max[0] = bx::max(xx, max[0]); + max[1] = bx::max(yy, max[1]); + max[2] = bx::max(zz, max[2]); } _aabb.m_min[0] = min[0]; @@ -216,7 +238,7 @@ void calcObb(Obb& _obb, const void* _vertices, uint32_t _numVertices, uint32_t _ Obb best; aabbToObb(best, aabb); - float angleStep = float(bx::piHalf/_steps); + float angleStep = float(bx::kPiHalf/_steps); float ax = 0.0f; float mtx[16]; @@ -278,11 +300,11 @@ void calcMaxBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _num float zz = position[2] - center[2]; float distSq = xx*xx + yy*yy + zz*zz; - maxDistSq = bx::fmax(distSq, maxDistSq); + maxDistSq = bx::max(distSq, maxDistSq); } bx::vec3Move(_sphere.m_center, center); - _sphere.m_radius = bx::fsqrt(maxDistSq); + _sphere.m_radius = bx::sqrt(maxDistSq); } void calcMinBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _numVertices, uint32_t _stride, float _step) @@ -331,7 +353,7 @@ void calcMinBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _num center[0] += xx * radiusStep; center[1] += yy * radiusStep; center[2] += zz * radiusStep; - maxDistSq = bx::flerp(maxDistSq, distSq, _step); + maxDistSq = bx::lerp(maxDistSq, distSq, _step); break; } @@ -340,7 +362,7 @@ void calcMinBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _num } while (!done); bx::vec3Move(_sphere.m_center, center); - _sphere.m_radius = bx::fsqrt(maxDistSq); + _sphere.m_radius = bx::sqrt(maxDistSq); } void calcPlaneUv(const Plane& _plane, float* _udir, float* _vdir) @@ -469,7 +491,7 @@ inline void getPointAt(float* _result, const Ray& _ray, float _t) bx::vec3Add(_result, _ray.m_pos, tmp); } -bool intersect(const Ray& _ray, const Aabb& _aabb, Intersection* _intersection) +bool intersect(const Ray& _ray, const Aabb& _aabb, Hit* _hit) { float invDir[3]; bx::vec3Rcp(invDir, _ray.m_dir); @@ -490,8 +512,8 @@ bool intersect(const Ray& _ray, const Aabb& _aabb, Intersection* _intersection) float max[3]; bx::vec3Max(max, t0, t1); - const float tmin = bx::fmax3(min[0], min[1], min[2]); - const float tmax = bx::fmin3(max[0], max[1], max[2]); + const float tmin = bx::max(min[0], min[1], min[2]); + const float tmax = bx::min(max[0], max[1], max[2]); if (tmax < 0.0f || tmin > tmax) @@ -499,39 +521,80 @@ bool intersect(const Ray& _ray, const Aabb& _aabb, Intersection* _intersection) return false; } - if (NULL != _intersection) + if (NULL != _hit) { - _intersection->m_normal[0] = float( (min[0] == tmin) - (max[0] == tmin) ); - _intersection->m_normal[1] = float( (min[1] == tmin) - (max[1] == tmin) ); - _intersection->m_normal[2] = float( (min[2] == tmin) - (max[2] == tmin) ); + _hit->m_normal[0] = float( (t1[0] == tmin) - (t0[0] == tmin) ); + _hit->m_normal[1] = float( (t1[1] == tmin) - (t0[1] == tmin) ); + _hit->m_normal[2] = float( (t1[2] == tmin) - (t0[2] == tmin) ); - _intersection->m_dist = tmin; - getPointAt(_intersection->m_pos, _ray, tmin); + _hit->m_dist = tmin; + getPointAt(_hit->m_pos, _ray, tmin); } return true; } -bool intersect(const Ray& _ray, const Disk& _disk, Intersection* _intersection) +static const Aabb s_kUnitAabb = { - Plane plane; - bx::vec3Move(plane.m_normal, _disk.m_normal); - plane.m_dist = -bx::vec3Dot(_disk.m_center, _disk.m_normal); + { -1.0f, -1.0f, -1.0f }, + { 1.0f, 1.0f, 1.0f }, +}; - Intersection tmpIntersection; - _intersection = NULL != _intersection ? _intersection : &tmpIntersection; +bool intersect(const Ray& _ray, const Obb& _obb, Hit* _hit) +{ + Aabb aabb; + toAabb(aabb, _obb); - if (intersect(_ray, plane, _intersection) ) + if (!intersect(_ray, aabb) ) { - float tmp[3]; - bx::vec3Sub(tmp, _disk.m_center, _intersection->m_pos); - return bx::vec3Dot(tmp, tmp) <= bx::fsq(_disk.m_radius); + return false; + } + + float mtxInv[16]; + bx::mtxInverse(mtxInv, _obb.m_mtx); + + Ray obbRay; + bx::vec3MulMtx(obbRay.m_pos, _ray.m_pos, mtxInv); + bx::vec3MulMtxXyz0(obbRay.m_dir, _ray.m_dir, mtxInv); + + if (intersect(obbRay, s_kUnitAabb, _hit) ) + { + if (NULL != _hit) + { + float tmp[3]; + bx::vec3MulMtx(tmp, _hit->m_pos, _obb.m_mtx); + bx::vec3Move(_hit->m_pos, tmp); + + bx::vec3MulMtxXyz0(tmp, _hit->m_normal, _obb.m_mtx); + bx::vec3Norm(_hit->m_normal, tmp); + } + + return true; } return false; } -bool intersect(const Ray& _ray, const Cylinder& _cylinder, bool _capsule, Intersection* _intersection) +bool intersect(const Ray& _ray, const Disk& _disk, Hit* _hit) +{ + Plane plane; + bx::vec3Move(plane.m_normal, _disk.m_normal); + plane.m_dist = -bx::vec3Dot(_disk.m_center, _disk.m_normal); + + Hit tmpHit; + _hit = NULL != _hit ? _hit : &tmpHit; + + if (intersect(_ray, plane, _hit) ) + { + float tmp[3]; + bx::vec3Sub(tmp, _disk.m_center, _hit->m_pos); + return bx::vec3Dot(tmp, tmp) <= bx::square(_disk.m_radius); + } + + return false; +} + +static bool intersect(const Ray& _ray, const Cylinder& _cylinder, bool _capsule, Hit* _hit) { float axis[3]; bx::vec3Sub(axis, _cylinder.m_end, _cylinder.m_pos); @@ -543,7 +606,7 @@ bool intersect(const Ray& _ray, const Cylinder& _cylinder, bool _capsule, Inters bx::vec3Cross(normal, _ray.m_dir, axis); const float len = bx::vec3Norm(normal, normal); - const float dist = bx::fabsolute(bx::vec3Dot(rc, normal) ); + const float dist = bx::abs(bx::vec3Dot(rc, normal) ); if (dist > _cylinder.m_radius) { @@ -557,9 +620,14 @@ bool intersect(const Ray& _ray, const Cylinder& _cylinder, bool _capsule, Inters bx::vec3Cross(vo, normal, axis); bx::vec3Norm(vo, vo); - const float rsq = bx::fsq(_cylinder.m_radius); + const float rsq = bx::square(_cylinder.m_radius); const float ddoto = bx::vec3Dot(_ray.m_dir, vo); - const float ss = t0 - bx::fabsolute(bx::fsqrt(rsq - bx::fsq(dist) ) / ddoto); + const float ss = t0 - bx::abs(bx::sqrt(rsq - bx::square(dist) ) / ddoto); + + if (0.0f > ss) + { + return false; + } float point[3]; getPointAt(point, _ray, ss); @@ -571,19 +639,19 @@ bool intersect(const Ray& _ray, const Cylinder& _cylinder, bool _capsule, Inters if (height > 0.0f && height < axisLen) { - if (NULL != _intersection) + if (NULL != _hit) { const float t1 = height / axisLen; float pointOnAxis[3]; bx::vec3Lerp(pointOnAxis, _cylinder.m_pos, _cylinder.m_end, t1); - bx::vec3Move(_intersection->m_pos, point); + bx::vec3Move(_hit->m_pos, point); float tmp[3]; bx::vec3Sub(tmp, point, pointOnAxis); - bx::vec3Norm(_intersection->m_normal, tmp); + bx::vec3Norm(_hit->m_normal, tmp); - _intersection->m_dist = ss; + _hit->m_dist = ss; } return true; @@ -615,7 +683,7 @@ bool intersect(const Ray& _ray, const Cylinder& _cylinder, bool _capsule, Inters : _cylinder.m_end ); - return intersect(_ray, sphere, _intersection); + return intersect(_ray, sphere, _hit); } Plane plane; @@ -634,20 +702,120 @@ bool intersect(const Ray& _ray, const Cylinder& _cylinder, bool _capsule, Inters plane.m_dist = -bx::vec3Dot(pos, plane.m_normal); - Intersection tmpIntersection; - _intersection = NULL != _intersection ? _intersection : &tmpIntersection; + Hit tmpHit; + _hit = NULL != _hit ? _hit : &tmpHit; - if (intersect(_ray, plane, _intersection) ) + if (intersect(_ray, plane, _hit) ) { float tmp[3]; - bx::vec3Sub(tmp, pos, _intersection->m_pos); + bx::vec3Sub(tmp, pos, _hit->m_pos); return bx::vec3Dot(tmp, tmp) <= rsq; } return false; } -bool intersect(const Ray& _ray, const Plane& _plane, Intersection* _intersection) +bool intersect(const Ray& _ray, const Cylinder& _cylinder, Hit* _hit) +{ + return intersect(_ray, _cylinder, false, _hit); +} + +bool intersect(const Ray& _ray, const Capsule& _capsule, Hit* _hit) +{ + BX_STATIC_ASSERT(sizeof(Capsule) == sizeof(Cylinder) ); + return intersect(_ray, *( (const Cylinder*)&_capsule), true, _hit); +} + +bool intersect(const Ray& _ray, const Cone& _cone, Hit* _hit) +{ + float axis[3]; + bx::vec3Sub(axis, _cone.m_pos, _cone.m_end); + + float normal[3]; + const float len = bx::vec3Norm(normal, axis); + + Disk disk; + bx::vec3Move(disk.m_center, _cone.m_pos); + bx::vec3Move(disk.m_normal, normal); + disk.m_radius = _cone.m_radius; + + Hit tmpInt; + Hit* out = NULL != _hit ? _hit : &tmpInt; + bool hit = intersect(_ray, disk, out); + + float ro[3]; + bx::vec3Sub(ro, _ray.m_pos, _cone.m_end); + + const float hyp = bx::sqrt(bx::square(_cone.m_radius) + bx::square(len) ); + const float cosaSq = bx::square(len/hyp); + const float ndoto = bx::vec3Dot(normal, ro); + const float ndotd = bx::vec3Dot(normal, _ray.m_dir); + + const float aa = bx::square(ndotd) - cosaSq; + const float bb = 2.0f * (ndotd*ndoto - bx::vec3Dot(_ray.m_dir, ro)*cosaSq); + const float cc = bx::square(ndoto) - bx::vec3Dot(ro, ro)*cosaSq; + + float det = bb*bb - 4.0f*aa*cc; + + if (0.0f > det) + { + return hit; + } + + det = bx::sqrt(det); + const float invA2 = 1.0f / (2.0f*aa); + const float t1 = (-bb - det) * invA2; + const float t2 = (-bb + det) * invA2; + + float tt = t1; + if (0.0f > t1 + || (0.0f < t2 && t2 < t1) ) + { + tt = t2; + } + + if (0.0f > tt) + { + return hit; + } + + float hitPos[3]; + getPointAt(hitPos, _ray, tt); + + float point[3]; + bx::vec3Sub(point, hitPos, _cone.m_end); + + const float hh = bx::vec3Dot(normal, point); + + if (0.0f > hh + || len < hh) + { + return hit; + } + + if (NULL != _hit) + { + if (!hit + || tt < _hit->m_dist) + { + _hit->m_dist = tt; + + bx::vec3Move(_hit->m_pos, hitPos); + + const float scale = hh / bx::vec3Dot(point, point); + float pointScaled[3]; + bx::vec3Mul(pointScaled, point, scale); + + float tmp[3]; + bx::vec3Sub(tmp, pointScaled, normal); + bx::vec3Norm(_hit->m_normal, tmp); + } + } + + return true; +} + +bool intersect(const Ray& _ray, const Plane& _plane, Hit* _hit) { float equation = bx::vec3Dot(_ray.m_pos, _plane.m_normal) + _plane.m_dist; if (0.0f > equation) @@ -661,20 +829,20 @@ bool intersect(const Ray& _ray, const Plane& _plane, Intersection* _intersection return false; } - if (NULL != _intersection) + if (NULL != _hit) { - bx::vec3Move(_intersection->m_normal, _plane.m_normal); + bx::vec3Move(_hit->m_normal, _plane.m_normal); float tt = -equation/ndotd; - _intersection->m_dist = tt; + _hit->m_dist = tt; - getPointAt(_intersection->m_pos, _ray, tt); + getPointAt(_hit->m_pos, _ray, tt); } return true; } -bool intersect(const Ray& _ray, const Sphere& _sphere, Intersection* _intersection) +bool intersect(const Ray& _ray, const Sphere& _sphere, Hit* _hit) { float rs[3]; bx::vec3Sub(rs, _ray.m_pos, _sphere.m_center); @@ -686,7 +854,7 @@ bool intersect(const Ray& _ray, const Sphere& _sphere, Intersection* _intersecti } const float aa = bx::vec3Dot(_ray.m_dir, _ray.m_dir); - const float cc = bx::vec3Dot(rs, rs) - bx::fsq(_sphere.m_radius); + const float cc = bx::vec3Dot(rs, rs) - bx::square(_sphere.m_radius); const float discriminant = bb*bb - aa*cc; @@ -695,7 +863,7 @@ bool intersect(const Ray& _ray, const Sphere& _sphere, Intersection* _intersecti return false; } - const float sqrtDiscriminant = bx::fsqrt(discriminant); + const float sqrtDiscriminant = bx::sqrt(discriminant); const float invA = 1.0f / aa; const float tt = -(bb + sqrtDiscriminant)*invA; @@ -704,23 +872,23 @@ bool intersect(const Ray& _ray, const Sphere& _sphere, Intersection* _intersecti return false; } - if (NULL != _intersection) + if (NULL != _hit) { - _intersection->m_dist = tt; + _hit->m_dist = tt; float point[3]; getPointAt(point, _ray, tt); - bx::vec3Move(_intersection->m_pos, point); + bx::vec3Move(_hit->m_pos, point); float tmp[3]; bx::vec3Sub(tmp, point, _sphere.m_center); - bx::vec3Norm(_intersection->m_normal, tmp); + bx::vec3Norm(_hit->m_normal, tmp); } return true; } -bool intersect(const Ray& _ray, const Tris& _triangle, Intersection* _intersection) +bool intersect(const Ray& _ray, const Tris& _triangle, Hit* _hit) { float edge10[3]; bx::vec3Sub(edge10, _triangle.m_v1, _triangle.m_v0); @@ -754,14 +922,14 @@ bool intersect(const Ray& _ray, const Tris& _triangle, Intersection* _intersecti return false; } - if (NULL != _intersection) + if (NULL != _hit) { - bx::vec3Norm(_intersection->m_normal, normal); + bx::vec3Norm(_hit->m_normal, normal); const float tt = bx::vec3Dot(normal, vo) * invDet; - _intersection->m_dist = tt; + _hit->m_dist = tt; - getPointAt(_intersection->m_pos, _ray, tt); + getPointAt(_hit->m_pos, _ray, tt); } return true; diff --git a/3rdparty/bgfx/examples/common/bounds.h b/3rdparty/bgfx/examples/common/bounds.h index 604892c..ce3be6b 100644 --- a/3rdparty/bgfx/examples/common/bounds.h +++ b/3rdparty/bgfx/examples/common/bounds.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -19,6 +19,20 @@ struct Cylinder float m_radius; }; +struct Capsule +{ + float m_pos[3]; + float m_end[3]; + float m_radius; +}; + +struct Cone +{ + float m_pos[3]; + float m_end[3]; + float m_radius; +}; + struct Disk { float m_center[3]; @@ -56,7 +70,7 @@ struct Tris float m_v2[3]; }; -struct Intersection +struct Hit { float m_pos[3]; float m_normal[3]; @@ -66,6 +80,9 @@ struct Intersection /// Convert axis aligned bounding box to oriented bounding box. void aabbToObb(Obb& _obb, const Aabb& _aabb); +/// Convert oriented bounding box to axis aligned bounding box. +void toAabb(Aabb& _aabb, const Obb& _obb); + /// Convert sphere to axis aligned bounding box. void toAabb(Aabb& _aabb, const Sphere& _sphere); @@ -112,22 +129,31 @@ void intersectPlanes(float _result[3], const Plane& _pa, const Plane& _pb, const /// Make screen space ray from x, y coordinate and inverse view-projection matrix. Ray makeRay(float _x, float _y, const float* _invVp); -/// Intersect ray / aabb. -bool intersect(const Ray& _ray, const Aabb& _aabb, Intersection* _intersection = NULL); +/// Intersect ray / AABB. +bool intersect(const Ray& _ray, const Aabb& _aabb, Hit* _hit = NULL); + +/// Intersect ray / OBB. +bool intersect(const Ray& _ray, const Obb& _obb, Hit* _hit = NULL); /// Intersect ray / cylinder. -bool intersect(const Ray& _ray, const Cylinder& _cylinder, bool _capsule, Intersection* _intersection = NULL); +bool intersect(const Ray& _ray, const Cylinder& _cylinder, Hit* _hit = NULL); + +/// Intersect ray / capsule. +bool intersect(const Ray& _ray, const Capsule& _capsule, Hit* _hit = NULL); + +/// Intersect ray / cone. +bool intersect(const Ray& _ray, const Cone& _cone, Hit* _hit = NULL); /// Intersect ray / disk. -bool intersect(const Ray& _ray, const Disk& _disk, Intersection* _intersection = NULL); +bool intersect(const Ray& _ray, const Disk& _disk, Hit* _hit = NULL); /// Intersect ray / plane. -bool intersect(const Ray& _ray, const Plane& _plane, Intersection* _intersection = NULL); +bool intersect(const Ray& _ray, const Plane& _plane, Hit* _hit = NULL); /// Intersect ray / sphere. -bool intersect(const Ray& _ray, const Sphere& _sphere, Intersection* _intersection = NULL); +bool intersect(const Ray& _ray, const Sphere& _sphere, Hit* _hit = NULL); /// Intersect ray / triangle. -bool intersect(const Ray& _ray, const Tris& _triangle, Intersection* _intersection = NULL); +bool intersect(const Ray& _ray, const Tris& _triangle, Hit* _hit = NULL); #endif // BOUNDS_H_HEADER_GUARD diff --git a/3rdparty/bgfx/examples/common/camera.cpp b/3rdparty/bgfx/examples/common/camera.cpp index a2a1c31..1abf8e2 100644 --- a/3rdparty/bgfx/examples/common/camera.cpp +++ b/3rdparty/bgfx/examples/common/camera.cpp @@ -4,7 +4,7 @@ */ #include -#include +#include #include "camera.h" #include "entry/entry.h" #include "entry/cmd.h" @@ -15,32 +15,32 @@ int cmdMove(CmdContext* /*_context*/, void* /*_userData*/, int _argc, char const { if (_argc > 1) { - if (0 == bx::strncmp(_argv[1], "forward") ) + if (0 == bx::strCmp(_argv[1], "forward") ) { cameraSetKeyState(CAMERA_KEY_FORWARD, true); return 0; } - else if (0 == bx::strncmp(_argv[1], "left") ) + else if (0 == bx::strCmp(_argv[1], "left") ) { cameraSetKeyState(CAMERA_KEY_LEFT, true); return 0; } - else if (0 == bx::strncmp(_argv[1], "right") ) + else if (0 == bx::strCmp(_argv[1], "right") ) { cameraSetKeyState(CAMERA_KEY_RIGHT, true); return 0; } - else if (0 == bx::strncmp(_argv[1], "backward") ) + else if (0 == bx::strCmp(_argv[1], "backward") ) { cameraSetKeyState(CAMERA_KEY_BACKWARD, true); return 0; } - else if (0 == bx::strncmp(_argv[1], "up") ) + else if (0 == bx::strCmp(_argv[1], "up") ) { cameraSetKeyState(CAMERA_KEY_UP, true); return 0; } - else if (0 == bx::strncmp(_argv[1], "down") ) + else if (0 == bx::strCmp(_argv[1], "down") ) { cameraSetKeyState(CAMERA_KEY_DOWN, true); return 0; @@ -166,16 +166,16 @@ struct Camera float direction[3] = { - bx::fcos(m_verticalAngle) * bx::fsin(m_horizontalAngle), - bx::fsin(m_verticalAngle), - bx::fcos(m_verticalAngle) * bx::fcos(m_horizontalAngle), + bx::cos(m_verticalAngle) * bx::sin(m_horizontalAngle), + bx::sin(m_verticalAngle), + bx::cos(m_verticalAngle) * bx::cos(m_horizontalAngle), }; float right[3] = { - bx::fsin(m_horizontalAngle - bx::piHalf), + bx::sin(m_horizontalAngle - bx::kPiHalf), 0, - bx::fcos(m_horizontalAngle - bx::piHalf), + bx::cos(m_horizontalAngle - bx::kPiHalf), }; float up[3]; diff --git a/3rdparty/bgfx/examples/common/common.h b/3rdparty/bgfx/examples/common/common.h index b53aba2..e86a41c 100644 --- a/3rdparty/bgfx/examples/common/common.h +++ b/3rdparty/bgfx/examples/common/common.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -7,7 +7,7 @@ #define COMMON_H_HEADER_GUARD #include -#include +#include #include "entry/entry.h" diff --git a/3rdparty/bgfx/examples/common/common.sh b/3rdparty/bgfx/examples/common/common.sh index 2ebe4c7..e997f87 100644 --- a/3rdparty/bgfx/examples/common/common.sh +++ b/3rdparty/bgfx/examples/common/common.sh @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/cube_atlas.cpp b/3rdparty/bgfx/examples/common/cube_atlas.cpp index 481e978..c112969 100644 --- a/3rdparty/bgfx/examples/common/cube_atlas.cpp +++ b/3rdparty/bgfx/examples/common/cube_atlas.cpp @@ -306,7 +306,7 @@ Atlas::Atlas(uint16_t _textureSize, const uint8_t* _textureBuffer, uint16_t _reg Atlas::~Atlas() { - bgfx::destroyTexture(m_textureHandle); + bgfx::destroy(m_textureHandle); delete [] m_layers; delete [] m_regions; diff --git a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp index 7565966..9b37b4c 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp +++ b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -9,10 +9,9 @@ #include "../bgfx_utils.h" #include "../packrect.h" -#include +#include #include #include -#include #include struct DebugVertex @@ -83,6 +82,25 @@ struct DebugShapeVertex bgfx::VertexDecl DebugShapeVertex::ms_decl; +struct DebugMeshVertex +{ + float m_x; + float m_y; + float m_z; + + static void init() + { + ms_decl + .begin() + .add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float) + .end(); + } + + static bgfx::VertexDecl ms_decl; +}; + +bgfx::VertexDecl DebugMeshVertex::ms_decl; + static DebugShapeVertex s_cubeVertices[8] = { {-1.0f, 1.0f, 1.0f, { 0, 0, 0, 0 } }, @@ -128,18 +146,18 @@ static uint8_t getCircleLod(uint8_t _lod) static void circle(float* _out, float _angle) { - float sa = bx::fsin(_angle); - float ca = bx::fcos(_angle); + float sa = bx::sin(_angle); + float ca = bx::cos(_angle); _out[0] = sa; _out[1] = ca; } static void squircle(float* _out, float _angle) { - float sa = bx::fsin(_angle); - float ca = bx::fcos(_angle); - _out[0] = bx::fsqrt(bx::fabsolute(sa) ) * bx::fsign(sa); - _out[1] = bx::fsqrt(bx::fabsolute(ca) ) * bx::fsign(ca); + float sa = bx::sin(_angle); + float ca = bx::cos(_angle); + _out[0] = bx::sqrt(bx::abs(sa) ) * bx::sign(sa); + _out[1] = bx::sqrt(bx::abs(ca) ) * bx::sign(ca); } uint32_t genSphere(uint8_t _subdiv0, void* _pos0 = NULL, uint16_t _posStride0 = 0, void* _normals0 = NULL, uint16_t _normalStride0 = 0) @@ -156,7 +174,7 @@ uint32_t genSphere(uint8_t _subdiv0, void* _pos0 = NULL, uint16_t _posStride0 = { static const float scale = 1.0f; static const float golden = 1.6180339887f; - static const float len = bx::fsqrt(golden*golden + 1.0f); + static const float len = bx::sqrt(golden*golden + 1.0f); static const float ss = 1.0f/len * scale; static const float ll = ss*golden; @@ -267,7 +285,7 @@ uint32_t genSphere(uint8_t _subdiv0, void* _pos0 = NULL, uint16_t _posStride0 = } gen(_pos0, _posStride0, _normals0, _normalStride0, _subdiv0); } - uint32_t numVertices = 20*3*bx::uint32_max(1, (uint32_t)bx::fpow(4.0f, _subdiv0) ); + uint32_t numVertices = 20*3*bx::uint32_max(1, (uint32_t)bx::pow(4.0f, _subdiv0) ); return numVertices; } @@ -295,14 +313,15 @@ void getPoint(float* _result, Axis::Enum _axis, float _x, float _y) } } - #include "vs_debugdraw_lines.bin.h" #include "fs_debugdraw_lines.bin.h" #include "vs_debugdraw_lines_stipple.bin.h" #include "fs_debugdraw_lines_stipple.bin.h" #include "vs_debugdraw_fill.bin.h" +#include "vs_debugdraw_fill_mesh.bin.h" #include "fs_debugdraw_fill.bin.h" #include "vs_debugdraw_fill_lit.bin.h" +#include "vs_debugdraw_fill_lit_mesh.bin.h" #include "fs_debugdraw_fill_lit.bin.h" #include "vs_debugdraw_fill_texture.bin.h" #include "fs_debugdraw_fill_texture.bin.h" @@ -314,8 +333,10 @@ static const bgfx::EmbeddedShader s_embeddedShaders[] = BGFX_EMBEDDED_SHADER(vs_debugdraw_lines_stipple), BGFX_EMBEDDED_SHADER(fs_debugdraw_lines_stipple), BGFX_EMBEDDED_SHADER(vs_debugdraw_fill), + BGFX_EMBEDDED_SHADER(vs_debugdraw_fill_mesh), BGFX_EMBEDDED_SHADER(fs_debugdraw_fill), BGFX_EMBEDDED_SHADER(vs_debugdraw_fill_lit), + BGFX_EMBEDDED_SHADER(vs_debugdraw_fill_lit_mesh), BGFX_EMBEDDED_SHADER(fs_debugdraw_fill_lit), BGFX_EMBEDDED_SHADER(vs_debugdraw_fill_texture), BGFX_EMBEDDED_SHADER(fs_debugdraw_fill_texture), @@ -335,7 +356,7 @@ struct SpriteT SpriteHandle create(uint16_t _width, uint16_t _height) { - SpriteHandle handle = { bx::HandleAlloc::invalid }; + SpriteHandle handle = { bx::kInvalidHandle }; if (m_handleAlloc.getNumHandles() < m_handleAlloc.getMaxHandles() ) { @@ -343,7 +364,15 @@ struct SpriteT if (m_ra.find(_width, _height, pack) ) { handle.idx = m_handleAlloc.alloc(); - m_pack[handle.idx] = pack; + + if (isValid(handle) ) + { + m_pack[handle.idx] = pack; + } + else + { + m_ra.clear(pack); + } } } @@ -367,6 +396,101 @@ struct SpriteT RectPack2DT<256> m_ra; }; +template +struct GeometryT +{ + GeometryT() + { + } + + GeometryHandle create(uint32_t _numVertices, const DdVertex* _vertices, uint32_t _numIndices, const uint16_t* _indices) + { + BX_UNUSED(_numVertices, _vertices, _numIndices, _indices); + + GeometryHandle handle = { m_handleAlloc.alloc() }; + + if (isValid(handle) ) + { + Geometry& geometry = m_geometry[handle.idx]; + geometry.m_vbh = bgfx::createVertexBuffer( + bgfx::copy(_vertices, _numVertices*sizeof(DdVertex) ) + , DebugMeshVertex::ms_decl + ); + + geometry.m_topologyNumIndices[0] = _numIndices; + geometry.m_topologyNumIndices[1] = bgfx::topologyConvert( + bgfx::TopologyConvert::TriListToLineList + , NULL + , 0 + , _indices + , _numIndices + , false + ); + + const uint32_t numIndices = 0 + + geometry.m_topologyNumIndices[0] + + geometry.m_topologyNumIndices[1] + ; + const bgfx::Memory* mem = bgfx::alloc(numIndices*sizeof(uint16_t) ); + uint16_t* indices = (uint16_t*)mem->data; + + bx::memCopy(&indices[0], _indices, _numIndices*sizeof(uint16_t) ); + + bgfx::topologyConvert( + bgfx::TopologyConvert::TriListToLineList + , &indices[geometry.m_topologyNumIndices[0] ] + , geometry.m_topologyNumIndices[1]*sizeof(uint16_t) + , _indices + , _numIndices + , false + ); + + geometry.m_ibh = bgfx::createIndexBuffer(mem); + } + + return handle; + } + + void destroy(GeometryHandle _handle) + { + Geometry& geometry = m_geometry[_handle.idx]; + bgfx::destroy(geometry.m_vbh); + bgfx::destroy(geometry.m_ibh); + + m_handleAlloc.free(_handle.idx); + } + + struct Geometry + { + Geometry() + { + m_vbh.idx = bx::kInvalidHandle; + m_ibh.idx = bx::kInvalidHandle; + m_topologyNumIndices[0] = 0; + m_topologyNumIndices[1] = 0; + } + + bgfx::VertexBufferHandle m_vbh; + bgfx::IndexBufferHandle m_ibh; + uint32_t m_topologyNumIndices[2]; + }; + + bx::HandleAllocT m_handleAlloc; + Geometry m_geometry[MaxHandlesT]; +}; + +struct Attrib +{ + uint64_t m_state; + float m_offset; + float m_scale; + float m_spin; + uint32_t m_abgr; + bool m_stipple; + bool m_wireframe; + uint8_t m_lod; +}; + struct DebugDraw { DebugDraw() @@ -380,54 +504,60 @@ struct DebugDraw m_allocator = _allocator; m_depthTestLess = _depthTestLess; -#if BX_CONFIG_ALLOCATOR_CRT if (NULL == _allocator) { - static bx::CrtAllocator allocator; + static bx::DefaultAllocator allocator; m_allocator = &allocator; } -#endif // BX_CONFIG_ALLOCATOR_CRT DebugVertex::init(); DebugUvVertex::init(); DebugShapeVertex::init(); + DebugMeshVertex::init(); bgfx::RendererType::Enum type = bgfx::getRendererType(); - m_program[Program::Lines] = - bgfx::createProgram( - bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_lines") - , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_lines") - , true - ); + m_program[Program::Lines] = bgfx::createProgram( + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_lines") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_lines") + , true + ); - m_program[Program::LinesStipple] = - bgfx::createProgram( - bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_lines_stipple") - , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_lines_stipple") - , true - ); + m_program[Program::LinesStipple] = bgfx::createProgram( + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_lines_stipple") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_lines_stipple") + , true + ); - m_program[Program::Fill] = - bgfx::createProgram( - bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill") - , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill") - , true - ); + m_program[Program::Fill] = bgfx::createProgram( + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill") + , true + ); - m_program[Program::FillLit] = - bgfx::createProgram( - bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill_lit") - , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill_lit") - , true - ); + m_program[Program::FillMesh] = bgfx::createProgram( + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill_mesh") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill") + , true + ); - m_program[Program::FillTexture] = - bgfx::createProgram( - bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill_texture") - , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill_texture") - , true - ); + m_program[Program::FillLit] = bgfx::createProgram( + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill_lit") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill_lit") + , true + ); + + m_program[Program::FillLitMesh] = bgfx::createProgram( + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill_lit_mesh") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill_lit") + , true + ); + + m_program[Program::FillTexture] = bgfx::createProgram( + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_debugdraw_fill_texture") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_debugdraw_fill_texture") + , true + ); u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4, 4); s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); @@ -458,24 +588,26 @@ struct DebugDraw trilist[ii] = uint16_t(ii); } - uint32_t numLineListIndices = bgfx::topologyConvert(bgfx::TopologyConvert::TriListToLineList - , NULL - , 0 - , trilist - , numIndices - , false - ); + uint32_t numLineListIndices = bgfx::topologyConvert( + bgfx::TopologyConvert::TriListToLineList + , NULL + , 0 + , trilist + , numIndices + , false + ); indices[id] = (uint16_t*)BX_ALLOC(m_allocator, (numIndices + numLineListIndices)*sizeof(uint16_t) ); uint16_t* indicesOut = indices[id]; bx::memCopy(indicesOut, trilist, numIndices*sizeof(uint16_t) ); - bgfx::topologyConvert(bgfx::TopologyConvert::TriListToLineList - , &indicesOut[numIndices] - , numLineListIndices*sizeof(uint16_t) - , trilist - , numIndices - , false - ); + bgfx::topologyConvert( + bgfx::TopologyConvert::TriListToLineList + , &indicesOut[numIndices] + , numLineListIndices*sizeof(uint16_t) + , trilist + , numIndices + , false + ); m_mesh[id].m_startVertex = startVertex; m_mesh[id].m_numVertices = numVertices; @@ -495,7 +627,7 @@ struct DebugDraw Mesh::Enum id = Mesh::Enum(Mesh::Cone0+mesh); const uint32_t num = getCircleLod(uint8_t(mesh) ); - const float step = bx::pi * 2.0f / num; + const float step = bx::kPi * 2.0f / num; const uint32_t numVertices = num+1; const uint32_t numIndices = num*6; @@ -556,7 +688,7 @@ struct DebugDraw Mesh::Enum id = Mesh::Enum(Mesh::Cylinder0+mesh); const uint32_t num = getCircleLod(uint8_t(mesh) ); - const float step = bx::pi * 2.0f / num; + const float step = bx::kPi * 2.0f / num; const uint32_t numVertices = num*2; const uint32_t numIndices = num*12; @@ -626,7 +758,7 @@ struct DebugDraw Mesh::Enum id = Mesh::Enum(Mesh::Capsule0+mesh); const uint32_t num = getCircleLod(uint8_t(mesh) ); - const float step = bx::pi * 2.0f / num; + const float step = bx::kPi * 2.0f / num; const uint32_t numVertices = num*2; const uint32_t numIndices = num*6; @@ -733,7 +865,6 @@ struct DebugDraw m_vbh = bgfx::createVertexBuffer(vb, DebugShapeVertex::ms_decl); m_ibh = bgfx::createIndexBuffer(ib); - m_mtx = 0; m_viewId = 0; m_pos = 0; m_indexPos = 0; @@ -743,15 +874,15 @@ struct DebugDraw void shutdown() { - bgfx::destroyIndexBuffer(m_ibh); - bgfx::destroyVertexBuffer(m_vbh); + bgfx::destroy(m_ibh); + bgfx::destroy(m_vbh); for (uint32_t ii = 0; ii < Program::Count; ++ii) { - bgfx::destroyProgram(m_program[ii]); + bgfx::destroy(m_program[ii]); } - bgfx::destroyUniform(u_params); - bgfx::destroyUniform(s_texColor); - bgfx::destroyTexture(m_texture); + bgfx::destroy(u_params); + bgfx::destroy(s_texColor); + bgfx::destroy(m_texture); } SpriteHandle createSprite(uint16_t _width, uint16_t _height, const void* _data) @@ -781,12 +912,21 @@ struct DebugDraw m_sprite.destroy(_handle); } - void begin(uint8_t _viewId) + GeometryHandle createGeometry(uint32_t _numVertices, const DdVertex* _vertices, uint32_t _numIndices, const uint16_t* _indices) + { + return m_geometry.create(_numVertices, _vertices, _numIndices, _indices); + } + + void destroy(GeometryHandle _handle) + { + m_geometry.destroy(_handle); + } + + void begin(bgfx::ViewId _viewId) { BX_CHECK(State::Count == m_state); m_viewId = _viewId; - m_mtx = 0; m_state = State::None; m_stack = 0; @@ -804,6 +944,9 @@ struct DebugDraw attrib.m_stipple = false; attrib.m_wireframe = false; attrib.m_lod = 0; + + m_mtxStackCurrent = 0; + m_mtxStack[m_mtxStackCurrent].reset(); } void end() @@ -813,7 +956,7 @@ struct DebugDraw flushQuad(); flush(); - m_state = State::Count; + m_state = State::Count; } void push() @@ -836,20 +979,24 @@ struct DebugDraw --m_stack; } - void setTransform(const void* _mtx) + void setTransform(const void* _mtx, uint16_t _num = 1) { BX_CHECK(State::Count != m_state); flush(); + MatrixStack& stack = m_mtxStack[m_mtxStackCurrent]; + if (NULL == _mtx) { - m_mtx = 0; + stack.reset(); return; } bgfx::Transform transform; - m_mtx = bgfx::allocTransform(&transform, 1); - bx::memCopy(transform.data, _mtx, 64); + stack.mtx = bgfx::allocTransform(&transform, _num); + stack.num = _num; + stack.data = transform.data; + bx::memCopy(transform.data, _mtx, _num*64); } void setTranslate(float _x, float _y, float _z) @@ -864,6 +1011,54 @@ struct DebugDraw setTranslate(_pos[0], _pos[1], _pos[2]); } + void pushTransform(const void* _mtx, uint16_t _num) + { + BX_CHECK(m_mtxStackCurrent < BX_COUNTOF(m_mtxStack), "Out of matrix stack!"); + BX_CHECK(State::Count != m_state); + flush(); + + float* mtx = NULL; + + const MatrixStack& stack = m_mtxStack[m_mtxStackCurrent]; + + if (NULL == stack.data) + { + mtx = (float*)_mtx; + } + else + { + mtx = (float*)alloca(_num*64); + for (uint16_t ii = 0; ii < _num; ++ii) + { + const float* mtxTransform = (const float*)_mtx; + bx::mtxMul(&mtx[ii*16], &mtxTransform[ii*16], stack.data); + } + } + + m_mtxStackCurrent++; + setTransform(mtx, _num); + } + + void popTransform() + { + BX_CHECK(State::Count != m_state); + flush(); + + m_mtxStackCurrent--; + } + + void pushTranslate(float _x, float _y, float _z) + { + float mtx[16]; + bx::mtxTranslate(mtx, _x, _y, _z); + pushTransform(mtx, 1); + } + + void pushTranslate(const float* _pos) + { + pushTranslate(_pos[0], _pos[1], _pos[2]); + } + void setState(bool _depthTest, bool _depthWrite, bool _clockwise) { const uint64_t depthTest = m_depthTestLess @@ -1057,29 +1252,39 @@ struct DebugDraw void draw(const Aabb& _aabb) { - moveTo(_aabb.m_min[0], _aabb.m_min[1], _aabb.m_min[2]); - lineTo(_aabb.m_max[0], _aabb.m_min[1], _aabb.m_min[2]); - lineTo(_aabb.m_max[0], _aabb.m_max[1], _aabb.m_min[2]); - lineTo(_aabb.m_min[0], _aabb.m_max[1], _aabb.m_min[2]); - close(); + const Attrib& attrib = m_attrib[m_stack]; + if (attrib.m_wireframe) + { + moveTo(_aabb.m_min[0], _aabb.m_min[1], _aabb.m_min[2]); + lineTo(_aabb.m_max[0], _aabb.m_min[1], _aabb.m_min[2]); + lineTo(_aabb.m_max[0], _aabb.m_max[1], _aabb.m_min[2]); + lineTo(_aabb.m_min[0], _aabb.m_max[1], _aabb.m_min[2]); + close(); - moveTo(_aabb.m_min[0], _aabb.m_min[1], _aabb.m_max[2]); - lineTo(_aabb.m_max[0], _aabb.m_min[1], _aabb.m_max[2]); - lineTo(_aabb.m_max[0], _aabb.m_max[1], _aabb.m_max[2]); - lineTo(_aabb.m_min[0], _aabb.m_max[1], _aabb.m_max[2]); - close(); + moveTo(_aabb.m_min[0], _aabb.m_min[1], _aabb.m_max[2]); + lineTo(_aabb.m_max[0], _aabb.m_min[1], _aabb.m_max[2]); + lineTo(_aabb.m_max[0], _aabb.m_max[1], _aabb.m_max[2]); + lineTo(_aabb.m_min[0], _aabb.m_max[1], _aabb.m_max[2]); + close(); - moveTo(_aabb.m_min[0], _aabb.m_min[1], _aabb.m_min[2]); - lineTo(_aabb.m_min[0], _aabb.m_min[1], _aabb.m_max[2]); + moveTo(_aabb.m_min[0], _aabb.m_min[1], _aabb.m_min[2]); + lineTo(_aabb.m_min[0], _aabb.m_min[1], _aabb.m_max[2]); - moveTo(_aabb.m_max[0], _aabb.m_min[1], _aabb.m_min[2]); - lineTo(_aabb.m_max[0], _aabb.m_min[1], _aabb.m_max[2]); + moveTo(_aabb.m_max[0], _aabb.m_min[1], _aabb.m_min[2]); + lineTo(_aabb.m_max[0], _aabb.m_min[1], _aabb.m_max[2]); - moveTo(_aabb.m_min[0], _aabb.m_max[1], _aabb.m_min[2]); - lineTo(_aabb.m_min[0], _aabb.m_max[1], _aabb.m_max[2]); + moveTo(_aabb.m_min[0], _aabb.m_max[1], _aabb.m_min[2]); + lineTo(_aabb.m_min[0], _aabb.m_max[1], _aabb.m_max[2]); - moveTo(_aabb.m_max[0], _aabb.m_max[1], _aabb.m_min[2]); - lineTo(_aabb.m_max[0], _aabb.m_max[1], _aabb.m_max[2]); + moveTo(_aabb.m_max[0], _aabb.m_max[1], _aabb.m_min[2]); + lineTo(_aabb.m_max[0], _aabb.m_max[1], _aabb.m_max[2]); + } + else + { + Obb obb; + aabbToObb(obb, _aabb); + draw(Mesh::Cube, obb.m_mtx, 1, false); + } } void draw(const Cylinder& _cylinder, bool _capsule) @@ -1097,7 +1302,7 @@ struct DebugDraw const Attrib& attrib = m_attrib[m_stack]; if (attrib.m_wireframe) { - setTransform(_obb.m_mtx); + pushTransform(_obb.m_mtx, 1); moveTo(-1.0f, -1.0f, -1.0f); lineTo( 1.0f, -1.0f, -1.0f); @@ -1123,7 +1328,7 @@ struct DebugDraw moveTo(-1.0f, -1.0f, -1.0f); lineTo(-1.0f, -1.0f, 1.0f); - setTransform(NULL); + popTransform(); } else { @@ -1136,23 +1341,126 @@ struct DebugDraw const Attrib& attrib = m_attrib[m_stack]; float mtx[16]; bx::mtxSRT(mtx - , _sphere.m_radius - , _sphere.m_radius - , _sphere.m_radius - , 0.0f - , 0.0f - , 0.0f - , _sphere.m_center[0] - , _sphere.m_center[1] - , _sphere.m_center[2] - ); + , _sphere.m_radius + , _sphere.m_radius + , _sphere.m_radius + , 0.0f + , 0.0f + , 0.0f + , _sphere.m_center[0] + , _sphere.m_center[1] + , _sphere.m_center[2] + ); uint8_t lod = attrib.m_lod > Mesh::SphereMaxLod - ? uint8_t(Mesh::SphereMaxLod) - : attrib.m_lod - ; + ? uint8_t(Mesh::SphereMaxLod) + : attrib.m_lod + ; draw(Mesh::Enum(Mesh::Sphere0 + lod), mtx, 1, attrib.m_wireframe); } + void setUParams(const Attrib& _attrib, bool _wireframe) + { + const float flip = 0 == (_attrib.m_state & BGFX_STATE_CULL_CCW) ? 1.0f : -1.0f; + const uint8_t alpha = _attrib.m_abgr >> 24; + + float params[4][4] = + { + { // lightDir + 0.0f * flip, + -1.0f * flip, + 0.0f * flip, + 3.0f, // shininess + }, + { // skyColor + 1.0f, + 0.9f, + 0.8f, + 0.0f, // unused + }, + { // groundColor.xyz0 + 0.2f, + 0.22f, + 0.5f, + 0.0f, // unused + }, + { // matColor + ( (_attrib.m_abgr) & 0xff) / 255.0f, + ( (_attrib.m_abgr >> 8) & 0xff) / 255.0f, + ( (_attrib.m_abgr >> 16) & 0xff) / 255.0f, + (alpha) / 255.0f, + }, + }; + + bx::vec3Norm(params[0], params[0]); + bgfx::setUniform(u_params, params, 4); + + bgfx::setState(0 + | _attrib.m_state + | (_wireframe ? BGFX_STATE_PT_LINES | BGFX_STATE_LINEAA | BGFX_STATE_BLEND_ALPHA + : (alpha < 0xff) ? BGFX_STATE_BLEND_ALPHA : 0) + ); + } + + void draw(GeometryHandle _handle) + { + Geometry::Geometry& geometry = m_geometry.m_geometry[_handle.idx]; + bgfx::setVertexBuffer(0, geometry.m_vbh); + + const Attrib& attrib = m_attrib[m_stack]; + const bool wireframe = attrib.m_wireframe; + setUParams(attrib, wireframe); + + if (wireframe) + { + bgfx::setIndexBuffer( + geometry.m_ibh + , geometry.m_topologyNumIndices[0] + , geometry.m_topologyNumIndices[1] + ); + } + else if (0 != geometry.m_topologyNumIndices[0]) + { + bgfx::setIndexBuffer( + geometry.m_ibh + , 0 + , geometry.m_topologyNumIndices[0] + ); + } + + bgfx::setTransform(m_mtxStack[m_mtxStackCurrent].mtx); + bgfx::ProgramHandle program = m_program[wireframe ? Program::FillMesh : Program::FillLitMesh]; + bgfx::submit(m_viewId, program); + } + + void draw(bool _lineList, uint32_t _numVertices, const DdVertex* _vertices, uint32_t _numIndices, const uint16_t* _indices) + { + flush(); + + if (_numVertices == bgfx::getAvailTransientVertexBuffer(_numVertices, DebugMeshVertex::ms_decl) ) + { + bgfx::TransientVertexBuffer tvb; + bgfx::allocTransientVertexBuffer(&tvb, _numVertices, DebugMeshVertex::ms_decl); + bx::memCopy(tvb.data, _vertices, _numVertices * DebugMeshVertex::ms_decl.m_stride); + bgfx::setVertexBuffer(0, &tvb); + + if (0 < _numIndices) + { + bgfx::TransientIndexBuffer tib; + bgfx::allocTransientIndexBuffer(&tib, _numIndices); + bx::memCopy(tib.data, _indices, _numIndices * sizeof(uint16_t) ); + bgfx::setIndexBuffer(&tib); + } + + const Attrib& attrib = m_attrib[m_stack]; + const bool wireframe = _lineList; + setUParams(attrib, wireframe); + + bgfx::setTransform(m_mtxStack[m_mtxStackCurrent].mtx); + bgfx::ProgramHandle program = m_program[wireframe ? Program::FillMesh : Program::FillLitMesh]; + bgfx::submit(m_viewId, program); + } + } + void drawFrustum(const float* _viewProj) { Plane planes[6]; @@ -1202,14 +1510,14 @@ struct DebugDraw { const Attrib& attrib = m_attrib[m_stack]; const uint32_t num = getCircleLod(attrib.m_lod); - const float step = bx::pi * 2.0f / num; + const float step = bx::kPi * 2.0f / num; - _degrees = bx::fwrap(_degrees, 360.0f); + _degrees = bx::wrap(_degrees, 360.0f); float pos[3]; getPoint(pos, _axis - , bx::fsin(step * 0)*_radius - , bx::fcos(step * 0)*_radius + , bx::sin(step * 0)*_radius + , bx::cos(step * 0)*_radius ); moveTo(pos[0] + _x, pos[1] + _y, pos[2] + _z); @@ -1219,23 +1527,23 @@ struct DebugDraw for (uint32_t ii = 1; ii < n+1; ++ii) { getPoint(pos, _axis - , bx::fsin(step * ii)*_radius - , bx::fcos(step * ii)*_radius - ); + , bx::sin(step * ii)*_radius + , bx::cos(step * ii)*_radius + ); lineTo(pos[0] + _x, pos[1] + _y, pos[2] + _z); } moveTo(_x, _y, _z); getPoint(pos, _axis - , bx::fsin(step * 0)*_radius - , bx::fcos(step * 0)*_radius - ); + , bx::sin(step * 0)*_radius + , bx::cos(step * 0)*_radius + ); lineTo(pos[0] + _x, pos[1] + _y, pos[2] + _z); getPoint(pos, _axis - , bx::fsin(step * n)*_radius - , bx::fcos(step * n)*_radius - ); + , bx::sin(step * n)*_radius + , bx::cos(step * n)*_radius + ); moveTo(pos[0] + _x, pos[1] + _y, pos[2] + _z); lineTo(_x, _y, _z); } @@ -1244,8 +1552,8 @@ struct DebugDraw { const Attrib& attrib = m_attrib[m_stack]; const uint32_t num = getCircleLod(attrib.m_lod); - const float step = bx::pi * 2.0f / num; - _weight = bx::fclamp(_weight, 0.0f, 2.0f); + const float step = bx::kPi * 2.0f / num; + _weight = bx::clamp(_weight, 0.0f, 2.0f); float udir[3]; float vdir[3]; @@ -1260,8 +1568,8 @@ struct DebugDraw circle(xy0, 0.0f); squircle(xy1, 0.0f); - bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius); - bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius); + bx::vec3Mul(pos, udir, bx::lerp(xy0[0], xy1[0], _weight)*_radius); + bx::vec3Mul(tmp0, vdir, bx::lerp(xy0[1], xy1[1], _weight)*_radius); bx::vec3Add(tmp1, pos, tmp0); bx::vec3Add(pos, tmp1, _center); moveTo(pos); @@ -1272,8 +1580,8 @@ struct DebugDraw circle(xy0, angle); squircle(xy1, angle); - bx::vec3Mul(pos, udir, bx::flerp(xy0[0], xy1[0], _weight)*_radius); - bx::vec3Mul(tmp0, vdir, bx::flerp(xy0[1], xy1[1], _weight)*_radius); + bx::vec3Mul(pos, udir, bx::lerp(xy0[0], xy1[0], _weight)*_radius); + bx::vec3Mul(tmp0, vdir, bx::lerp(xy0[1], xy1[1], _weight)*_radius); bx::vec3Add(tmp1, pos, tmp0); bx::vec3Add(pos, tmp1, _center); lineTo(pos); @@ -1291,8 +1599,8 @@ struct DebugDraw { const Attrib& attrib = m_attrib[m_stack]; const uint32_t num = getCircleLod(attrib.m_lod); - const float step = bx::pi * 2.0f / num; - _weight = bx::fclamp(_weight, 0.0f, 2.0f); + const float step = bx::kPi * 2.0f / num; + _weight = bx::clamp(_weight, 0.0f, 2.0f); float xy0[2]; float xy1[2]; @@ -1301,8 +1609,8 @@ struct DebugDraw float pos[3]; getPoint(pos, _axis - , bx::flerp(xy0[0], xy1[0], _weight)*_radius - , bx::flerp(xy0[1], xy1[1], _weight)*_radius + , bx::lerp(xy0[0], xy1[0], _weight)*_radius + , bx::lerp(xy0[1], xy1[1], _weight)*_radius ); moveTo(pos[0] + _x, pos[1] + _y, pos[2] + _z); @@ -1313,8 +1621,8 @@ struct DebugDraw squircle(xy1, angle); getPoint(pos, _axis - , bx::flerp(xy0[0], xy1[0], _weight)*_radius - , bx::flerp(xy0[1], xy1[1], _weight)*_radius + , bx::lerp(xy0[0], xy1[0], _weight)*_radius + , bx::lerp(xy0[1], xy1[1], _weight)*_radius ); lineTo(pos[0] + _x, pos[1] + _y, pos[2] + _z); } @@ -1504,9 +1812,9 @@ struct DebugDraw if (_capsule) { uint8_t lod = attrib.m_lod > Mesh::CapsuleMaxLod - ? uint8_t(Mesh::CapsuleMaxLod) - : attrib.m_lod - ; + ? uint8_t(Mesh::CapsuleMaxLod) + : attrib.m_lod + ; draw(Mesh::Enum(Mesh::Capsule0 + lod), mtx[0], 2, attrib.m_wireframe); Sphere sphere; @@ -1520,9 +1828,9 @@ struct DebugDraw else { uint8_t lod = attrib.m_lod > Mesh::CylinderMaxLod - ? uint8_t(Mesh::CylinderMaxLod) - : attrib.m_lod - ; + ? uint8_t(Mesh::CylinderMaxLod) + : attrib.m_lod + ; draw(Mesh::Enum(Mesh::Cylinder0 + lod), mtx[0], 2, attrib.m_wireframe); } } @@ -1546,9 +1854,9 @@ struct DebugDraw mid[0] = _x + _len - _thickness; mid[1] = _y; mid[2] = _z; - to[0] = _x + _len; - to[1] = _y; - to[2] = _z; + to[0] = _x + _len; + to[1] = _y; + to[2] = _z; drawCylinder(from, mid, _thickness, false); drawCone(mid, to, _thickness); @@ -1556,9 +1864,9 @@ struct DebugDraw mid[0] = _x; mid[1] = _y + _len - _thickness; mid[2] = _z; - to[0] = _x; - to[1] = _y + _len; - to[2] = _z; + to[0] = _x; + to[1] = _y + _len; + to[2] = _z; drawCylinder(from, mid, _thickness, false); drawCone(mid, to, _thickness); @@ -1566,9 +1874,9 @@ struct DebugDraw mid[0] = _x; mid[1] = _y; mid[2] = _z + _len - _thickness; - to[0] = _x; - to[1] = _y; - to[2] = _z + _len; + to[0] = _x; + to[1] = _y; + to[2] = _z + _len; drawCylinder(from, mid, _thickness, false); drawCone(mid, to, _thickness); } @@ -1658,7 +1966,7 @@ struct DebugDraw void drawGrid(Axis::Enum _axis, const float* _center, uint32_t _size, float _step) { push(); - setTranslate(_center); + pushTranslate(_center); const uint32_t num = (_size/2)*2-1; const float halfExtent = float(_size/2) * _step; @@ -1761,18 +2069,20 @@ private: Lines, LinesStipple, Fill, + FillMesh, FillLit, + FillLitMesh, FillTexture, Count }; }; - void draw(Mesh::Enum _mesh, const float* _mtx, uint16_t _num, bool _wireframe) const + void draw(Mesh::Enum _mesh, const float* _mtx, uint16_t _num, bool _wireframe) { - const Mesh& mesh = m_mesh[_mesh]; + pushTransform(_mtx, _num); - const Attrib& attrib = m_attrib[m_stack]; + const Mesh& mesh = m_mesh[_mesh]; if (0 != mesh.m_numIndices[_wireframe]) { @@ -1782,49 +2092,16 @@ private: ); } - const float flip = 0 == (attrib.m_state & BGFX_STATE_CULL_CCW) ? 1.0f : -1.0f; - const uint8_t alpha = attrib.m_abgr>>24; + const Attrib& attrib = m_attrib[m_stack]; + setUParams(attrib, _wireframe); - float params[4][4] = - { - { // lightDir - 0.0f * flip, - -1.0f * flip, - 0.0f * flip, - 3.0f, // shininess - }, - { // skyColor - 1.0f, - 0.9f, - 0.8f, - 0.0f, // unused - }, - { // groundColor.xyz0 - 0.2f, - 0.22f, - 0.5f, - 0.0f, // unused - }, - { // matColor - ( (attrib.m_abgr )&0xff)/255.0f, - ( (attrib.m_abgr>> 8)&0xff)/255.0f, - ( (attrib.m_abgr>>16)&0xff)/255.0f, - ( alpha )/255.0f, - }, - }; + MatrixStack& stack = m_mtxStack[m_mtxStackCurrent]; + bgfx::setTransform(stack.mtx, stack.num); - bx::vec3Norm(params[0], params[0]); - - bgfx::setUniform(u_params, params, 4); - - bgfx::setTransform(_mtx, _num); - bgfx::setVertexBuffer(m_vbh, mesh.m_startVertex, mesh.m_numVertices); - bgfx::setState(0 - | attrib.m_state - | (_wireframe ? BGFX_STATE_PT_LINES|BGFX_STATE_LINEAA|BGFX_STATE_BLEND_ALPHA - : (alpha < 0xff) ? BGFX_STATE_BLEND_ALPHA : 0) - ); + bgfx::setVertexBuffer(0, m_vbh, mesh.m_startVertex, mesh.m_numVertices); bgfx::submit(m_viewId, m_program[_wireframe ? Program::Fill : Program::FillLit]); + + popTransform(); } void softFlush() @@ -1851,16 +2128,16 @@ private: const Attrib& attrib = m_attrib[m_stack]; - bgfx::setVertexBuffer(&tvb); + bgfx::setVertexBuffer(0, &tvb); bgfx::setIndexBuffer(&tib); bgfx::setState(0 - | BGFX_STATE_RGB_WRITE - | BGFX_STATE_PT_LINES - | attrib.m_state - | BGFX_STATE_LINEAA - | BGFX_STATE_BLEND_ALPHA - ); - bgfx::setTransform(m_mtx); + | BGFX_STATE_RGB_WRITE + | BGFX_STATE_PT_LINES + | attrib.m_state + | BGFX_STATE_LINEAA + | BGFX_STATE_BLEND_ALPHA + ); + bgfx::setTransform(m_mtxStack[m_mtxStackCurrent].mtx); bgfx::ProgramHandle program = m_program[attrib.m_stipple ? 1 : 0]; bgfx::submit(m_viewId, program); } @@ -1900,12 +2177,12 @@ private: const Attrib& attrib = m_attrib[m_stack]; - bgfx::setVertexBuffer(&tvb); + bgfx::setVertexBuffer(0, &tvb); bgfx::setIndexBuffer(&tib); bgfx::setState(0 - | (attrib.m_state & ~BGFX_STATE_CULL_MASK) - ); - bgfx::setTransform(m_mtx); + | (attrib.m_state & ~BGFX_STATE_CULL_MASK) + ); + bgfx::setTransform(m_mtxStack[m_mtxStackCurrent].mtx); bgfx::setTexture(0, s_texColor, m_texture); bgfx::submit(m_viewId, m_program[Program::FillTexture]); } @@ -1939,23 +2216,28 @@ private: DebugUvVertex m_cacheQuad[cacheQuadSize]; uint16_t m_posQuad; - uint32_t m_mtx; - uint8_t m_viewId; - uint8_t m_stack; - bool m_depthTestLess; + uint32_t m_mtxStackCurrent; - struct Attrib + struct MatrixStack { - uint64_t m_state; - float m_offset; - float m_scale; - float m_spin; - uint32_t m_abgr; - bool m_stipple; - bool m_wireframe; - uint8_t m_lod; + void reset() + { + mtx = 0; + num = 1; + data = NULL; + } + + uint32_t mtx; + uint16_t num; + float* data; }; + MatrixStack m_mtxStack[32]; + + bgfx::ViewId m_viewId; + uint8_t m_stack; + bool m_depthTestLess; + Attrib m_attrib[stackSize]; State::Enum m_state; @@ -1965,6 +2247,9 @@ private: typedef SpriteT<256, SPRITE_TEXTURE_SIZE> Sprite; Sprite m_sprite; + typedef GeometryT<256> Geometry; + Geometry m_geometry; + bgfx::UniformHandle s_texColor; bgfx::TextureHandle m_texture; bgfx::ProgramHandle m_program[Program::Count]; @@ -1998,7 +2283,17 @@ void ddDestroy(SpriteHandle _handle) s_dd.destroy(_handle); } -void ddBegin(uint8_t _viewId) +GeometryHandle ddCreateGeometry(uint32_t _numVertices, const DdVertex* _vertices, uint32_t _numIndices, const uint16_t* _indices) +{ + return s_dd.createGeometry(_numVertices, _vertices, _numIndices, _indices); +} + +void ddDestroy(GeometryHandle _handle) +{ + s_dd.destroy(_handle); +} + +void ddBegin(uint16_t _viewId) { s_dd.begin(_viewId); } @@ -2088,9 +2383,14 @@ void ddDraw(const Aabb& _aabb) s_dd.draw(_aabb); } -void ddDraw(const Cylinder& _cylinder, bool _capsule) +void ddDraw(const Cylinder& _cylinder) { - s_dd.draw(_cylinder, _capsule); + s_dd.draw(_cylinder, false); +} + +void ddDraw(const Capsule& _capsule) +{ + s_dd.draw( *( (const Cylinder*)&_capsule), true); } void ddDraw(const Disk& _disk) @@ -2108,6 +2408,26 @@ void ddDraw(const Sphere& _sphere) s_dd.draw(_sphere); } +void ddDraw(const Cone& _cone) +{ + ddDrawCone(_cone.m_pos, _cone.m_end, _cone.m_radius); +} + +void ddDraw(GeometryHandle _handle) +{ + s_dd.draw(_handle); +} + +void ddDrawLineList(uint32_t _numVertices, const DdVertex* _vertices, uint32_t _numIndices, const uint16_t* _indices) +{ + s_dd.draw(true, _numVertices, _vertices, _numIndices, _indices); +} + +void ddDrawTriList(uint32_t _numVertices, const DdVertex* _vertices, uint32_t _numIndices, const uint16_t* _indices) +{ + s_dd.draw(false, _numVertices, _vertices, _numIndices, _indices); +} + void ddDrawFrustum(const void* _viewProj) { s_dd.drawFrustum(_viewProj); @@ -2148,19 +2468,9 @@ void ddDrawCone(const void* _from, const void* _to, float _radius) s_dd.drawCone(_from, _to, _radius); } -void ddDrawCylinder(const void* _from, const void* _to, float _radius, bool _capsule) +void ddDrawCylinder(const void* _from, const void* _to, float _radius) { - if (_capsule) - { - s_dd.push(); - s_dd.setLod(0); - s_dd.drawCylinder(_from, _to, _radius, true); - s_dd.pop(); - } - else - { - s_dd.drawCylinder(_from, _to, _radius, false); - } + s_dd.drawCylinder(_from, _to, _radius, false); } void ddDrawCapsule(const void* _from, const void* _to, float _radius) diff --git a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h index 222c05f..2547ad8 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h +++ b/3rdparty/bgfx/examples/common/debugdraw/debugdraw.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -21,10 +21,17 @@ struct Axis }; }; -struct SpriteHandle { uint16_t idx; }; +struct DdVertex +{ + float x, y, z; +}; +struct SpriteHandle { uint16_t idx; }; inline bool isValid(SpriteHandle _handle) { return _handle.idx != UINT16_MAX; } +struct GeometryHandle { uint16_t idx; }; +inline bool isValid(GeometryHandle _handle) { return _handle.idx != UINT16_MAX; } + /// void ddInit(bool _depthTestLess = true, bx::AllocatorI* _allocator = NULL); @@ -38,7 +45,13 @@ SpriteHandle ddCreateSprite(uint16_t _width, uint16_t _height, const void* _data void ddDestroy(SpriteHandle _handle); /// -void ddBegin(uint8_t _viewId); +GeometryHandle ddCreateGeometry(uint32_t _numVertices, const DdVertex* _vertices, uint32_t _numIndices = 0, const uint16_t* _indices = NULL); + +/// +void ddDestroy(GeometryHandle _handle); + +/// +void ddBegin(uint16_t _viewId); /// void ddEnd(); @@ -92,7 +105,10 @@ void ddClose(); void ddDraw(const Aabb& _aabb); /// -void ddDraw(const Cylinder& _cylinder, bool _capsule = false); +void ddDraw(const Cylinder& _cylinder); + +/// +void ddDraw(const Capsule& _capsule); /// void ddDraw(const Disk& _disk); @@ -103,6 +119,18 @@ void ddDraw(const Obb& _obb); /// void ddDraw(const Sphere& _sphere); +/// +void ddDraw(const Cone& _cone); + +/// +void ddDraw(GeometryHandle _handle); + +/// +void ddDrawLineList(uint32_t _numVertices, const DdVertex* _vertices, uint32_t _numIndices = 0, const uint16_t* _indices = NULL); + +/// +void ddDrawTriList(uint32_t _numVertices, const DdVertex* _vertices, uint32_t _numIndices = 0, const uint16_t* _indices = NULL); + /// void ddDrawFrustum(const void* _viewProj); @@ -128,7 +156,7 @@ void ddDrawQuad(bgfx::TextureHandle _handle, const float* _normal, const float* void ddDrawCone(const void* _from, const void* _to, float _radius); /// -void ddDrawCylinder(const void* _from, const void* _to, float _radius, bool _capsule = false); +void ddDrawCylinder(const void* _from, const void* _to, float _radius); /// void ddDrawCapsule(const void* _from, const void* _to, float _radius); diff --git a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill.bin.h b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill.bin.h index 59db5b6..b1eb12e 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill.bin.h +++ b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_debugdraw_fill_glsl[104] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par 0x61, 0x6d, 0x73, 0x02, 0x04, 0x00, 0x00, 0x04, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, // ams......J...uni 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // form vec4 u_para 0x6d, 0x73, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // ms[4];.void main @@ -8,179 +8,180 @@ static const uint8_t fs_debugdraw_fill_glsl[104] = 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5b, // olor = u_params[ 0x33, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 3];.}... }; -static const uint8_t fs_debugdraw_fill_spv[2128] = +static const uint8_t fs_debugdraw_fill_spv[2142] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par - 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0x34, 0x08, 0x03, 0x02, 0x23, 0x07, 0x00, // ams......4...#.. - 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x2e, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, // ........a....... - 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, // ...............G - 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, // LSL.std.450..... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x06, 0x00, 0x04, // ................ - 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xd1, // .......main..... - 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, // ................ - 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, // .......main..... - 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, // ...5...vec4_spla - 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, // t(f1;.........._ - 0x78, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x4d, 0x0f, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, // x......M...@main - 0x28, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x2c, 0x41, 0x00, 0x00, 0x67, // (vf4;......,A..g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, // l_FragData_0_... - 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, // .......bgfx_Void - 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9d, 0x5e, 0x00, 0x00, 0x70, // Frag........^..p - 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x24, // aram...........$ - 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x00, // Global.......... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, // ...u_viewRect... - 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie - 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, // wTexel.......... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, // ...u_view....... - 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, // .......u_invView - 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, // ...............u - 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x05, // _proj........... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, // ...u_invProj.... - 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x07, // wProj........... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ...u_invViewProj - 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, // ...............u - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x09, // _model.......... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, // ...u_modelView.. - 0x00, 0x07, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // ...........u_mod - 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, // elViewProj...... - 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, // .......u_alphaRe - 0x66, 0x34, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, // f4.............u - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, // _params........B - 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x3d, 0x51, 0x00, 0x00, 0x67, // ...........=Q..g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, // l_FragData_0_... - 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, // .......param.... - 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // .......gl_FragDa - 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x7d, 0x01, 0x00, 0x00, 0x06, // ta_0_..G...}.... - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x04, 0x00, 0x00, 0x06, // ...@...G........ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x00, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, // ...#.......H.... - 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // .......#.......H - 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, // ...........#... - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x03, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x03, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, // ...#...`...H.... - 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, // ...........#.... - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x05, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x05, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, // ...#.......H.... - 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, // ...........#... - 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x07, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x07, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, // ...#...`...H.... - 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, // ...........#.... - 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x09, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x09, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, // ...#.......H.... - 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, // ...........#.... - 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0b, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, // ...#... ...H.... - 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, // .......#...0...G - 0x00, 0x03, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, // ...........G...B - 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, // ...".......G.... - 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, // ................ - 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, // ...!............ - 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, // ....... ... .... - 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, // ................ - 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, // ...........!.... - 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, // ........... .... - 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xf5, // ...........!.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, // ...........+.... - 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, // ...............e - 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, // ................ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, // ... .......+.... - 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x7d, // ...j... .......} - 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, // ...e...j...+.... - 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xb2, // ................ - 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, 0xd2, // ................ - 0x01, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // ...........e...e - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // ...e...e...e...e - 0x00, 0x00, 0x00, 0x7d, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, // ...}...e...e.... - 0x00, 0x00, 0x00, 0xb2, 0x04, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4f, 0x04, 0x00, 0x00, 0x02, // ....... ...O.... - 0x00, 0x00, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4f, 0x04, 0x00, 0x00, 0x42, // .......;...O...B - 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, // ............... - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, // .......+......./ - 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, // .......+........ - 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, // ....... ........ - 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, // ....... ........ - 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, // .......;........ - 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, // .......6........ - 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2d, // ...............- - 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, // a..;............ - 0x00, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe7, 0x49, 0x00, 0x00, 0x4d, // ...9........I..M - 0x0f, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3d, // .......=.......= - 0x51, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x3d, // Q......>.......= - 0x51, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, // Q......8...6.... - 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, // ...5...........7 - 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, // ................ - 0x2e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, // ...=.......dW... - 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, // ...=........N... - 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, // ...=.......I9... - 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, // ...=........9... - 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, // ...P........*..d - 0x57, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, // W...N..I9...9... - 0x00, 0x02, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, // ....*..8...6.... - 0x00, 0x00, 0x00, 0x4d, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00, 0x00, 0x00, 0x37, // ...M...........7 - 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2c, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x31, // .......,A......1 - 0x27, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x9d, 0x5e, 0x00, 0x00, 0x07, // '..;........^... - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9d, 0x5e, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, // ...>....^......9 - 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x9d, // ...........5.... - 0x5e, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x0a, 0x5a, 0x00, 0x00, 0x42, // ^..A........Z..B - 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, // .../.......=.... - 0x00, 0x00, 0x00, 0x6b, 0x2e, 0x00, 0x00, 0x0a, 0x5a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2c, // ...k....Z..>..., - 0x41, 0x00, 0x00, 0x6b, 0x2e, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // A..k.......8.... + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0x40, 0x08, 0x00, 0x00, 0x03, 0x02, 0x23, // ams......@.....# + 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x2e, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........a..... + 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... + 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x06, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, // ................ + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, // .....main....... + 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, // .5...vec4_splat( + 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, // f1;.........._x. + 0x00, 0x05, 0x00, 0x05, 0x00, 0x4d, 0x0f, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, // .....M...@main(v + 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x2c, 0x41, 0x00, 0x00, 0x67, 0x6c, 0x5f, // f4;......,A..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, // .....bgfx_VoidFr + 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9d, 0x5e, 0x00, 0x00, 0x70, 0x61, 0x72, // ag........^..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x24, 0x47, 0x6c, // am...........$Gl + 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // obal............ + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, // .u_viewRect..... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, // .........u_viewT + 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, // exel............ + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, // .u_view......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, // .....u_invView.. + 0x00, 0x06, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, // .............u_p + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, // roj............. + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, // .u_invProj...... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .........u_viewP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, // roj............. + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // .u_invViewProj.. + 0x00, 0x06, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .............u_m + 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, // odel............ + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, // .u_modelView.... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, // ViewProj........ + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, // .....u_alphaRef4 + 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, // .............u_p + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // arams........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x3d, 0x51, 0x00, 0x00, 0x67, 0x6c, 0x5f, // .........=Q..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, // FragData_0_..... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, // .....param...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x7d, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, // _0_..G...}...... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, // .@...G.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#.......H...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#...`...H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#.......H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#...`...H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#.......H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#... ...H...... + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#...0...G.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, // .........G...B.. + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, // .".......G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, // .!.............. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ..... ... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xf5, 0x00, 0x00, // .........!...... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, // .............e.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // . .......+...... + 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x7d, 0x01, 0x00, // .j... .......}.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // .e...j...+...... + 0x00, 0x16, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xb2, 0x04, 0x00, // ................ + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, 0xd2, 0x01, 0x00, // ................ + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .........e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x7d, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .}...e...e...... + 0x00, 0xb2, 0x04, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4f, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... ...O...... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4f, 0x04, 0x00, 0x00, 0x42, 0x13, 0x00, // .....;...O...B.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, // .....+......./.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, 0x0a, 0x00, // .....+.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... .......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ..... .......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, // .....;.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // .....6.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2d, 0x61, 0x00, // .............-a. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.............. + 0x00, 0x39, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe7, 0x49, 0x00, 0x00, 0x4d, 0x0f, 0x00, // .9........I..M.. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3d, 0x51, 0x00, // .....=.......=Q. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x3d, 0x51, 0x00, // .....>.......=Q. + 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .....8...6...... + 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .5...........7.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, // ................ + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=.......dW..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........N..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=.......I9..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........9..... + 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, // .P........*..dW. + 0x00, 0xa9, 0x4e, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, // ..N..I9...9..... + 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // ..*..8...6...... + 0x00, 0x4d, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .M...........7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2c, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x31, 0x27, 0x00, // .....,A......1'. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x9d, 0x5e, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........^..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9d, 0x5e, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....^......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x9d, 0x5e, 0x00, // .........5....^. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x0a, 0x5a, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........Z..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0x6b, 0x2e, 0x00, 0x00, 0x0a, 0x5a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2c, 0x41, 0x00, // .k....Z..>...,A. + 0x00, 0x6b, 0x2e, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .k.......8.... }; -static const uint8_t fs_debugdraw_fill_dx9[180] = +static const uint8_t fs_debugdraw_fill_dx9[182] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par - 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, // ams............. - 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x00, // . .CTAB....S.... - 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x4c, // ...............L - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3c, // ...0...........< - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, // .......u_params. - 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x31, 0x00, 0xab, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, // 1............... - 0xff, 0x00, 0x00, 0x00, // .... + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, // ams............. + 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ... .CTAB....S.. + 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ + 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... + 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, // .<.......u_param + 0x73, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, // s............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, // 0.1............. + 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... }; -static const uint8_t fs_debugdraw_fill_dx11[251] = +static const uint8_t fs_debugdraw_fill_dx11[253] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par - 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0xdc, 0x00, 0x44, 0x58, 0x42, 0x43, 0xda, // ams........DXBC. - 0xfb, 0x8d, 0xd4, 0xad, 0x58, 0xef, 0x92, 0x13, 0x90, 0x07, 0xb7, 0x79, 0x4c, 0x38, 0x95, 0x01, // ....X......yL8.. - 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, // ...........,...` - 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // .......ISGN,.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ....... ........ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S - 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x2c, // V_POSITION.OSGN, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // ........... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S - 0x48, 0x44, 0x52, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x59, // HDR@...@.......Y - 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, // ...F. .........e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // .... ......6.... - 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ......F. ...... - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, // ...>.....@. + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x44, 0x58, 0x42, // ams..........DXB + 0x43, 0xda, 0xfb, 0x8d, 0xd4, 0xad, 0x58, 0xef, 0x92, 0x13, 0x90, 0x07, 0xb7, 0x79, 0x4c, 0x38, // C.....X......yL8 + 0x95, 0x01, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .............,.. + 0x00, 0x60, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, // .`.......ISGN,.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ + 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, // .SV_POSITION.OSG + 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // N,........... .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, // .....SV_TARGET.. + 0xab, 0x53, 0x48, 0x44, 0x52, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .SHDR@...@...... + 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .Y...F. ........ + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .e.... ......6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, // .....>.....@. }; static const uint8_t fs_debugdraw_fill_mtl[425] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par 0x61, 0x6d, 0x73, 0x02, 0x04, 0x00, 0x00, 0x04, 0x00, 0x8b, 0x01, 0x00, 0x00, 0x75, 0x73, 0x69, // ams..........usi 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, // ng namespace met 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // al;.struct xlatM diff --git a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill.sc b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill.sc index 532cf6e..f04d07e 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill.sc @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_lit.bin.h b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_lit.bin.h index 83c8f56..61d5293 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_lit.bin.h +++ b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_lit.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_debugdraw_fill_lit_glsl[510] = { - 0x46, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH...V_...u_par + 0x46, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH...V_...u_par 0x61, 0x6d, 0x73, 0x02, 0x04, 0x00, 0x00, 0x04, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, // ams..........var 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, // ying highp vec3 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // v_world;.uniform @@ -33,340 +33,343 @@ static const uint8_t fs_debugdraw_fill_lit_glsl[510] = 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, // gl_FragColor = 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tmpvar_3;.}... }; -static const uint8_t fs_debugdraw_fill_lit_spv[4024] = +static const uint8_t fs_debugdraw_fill_lit_spv[4038] = { - 0x46, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH...V_...u_par - 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0x9c, 0x0f, 0x03, 0x02, 0x23, 0x07, 0x00, // ams..........#.. - 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x6f, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, // .......ob....... - 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, // ...............G - 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, // LSL.std.450..... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x04, // ................ - 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xd4, // .......main..... - 0x0f, 0x00, 0x00, 0x6f, 0x12, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, // ...o............ - 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, // ...............m - 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x6d, // ain........0...m - 0x69, 0x78, 0x28, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, // ix(vf3;vf3;vf3;. - 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, // ..........._a... - 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd9, // ......._b....... - 0x0e, 0x00, 0x00, 0x5f, 0x74, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x01, 0x14, 0x00, 0x00, 0x76, // ..._t..........v - 0x65, 0x63, 0x33, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, // ec3_splat(f1;... - 0x00, 0x03, 0x00, 0xe5, 0x41, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, // ....A.._x......5 - 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, // ...vec4_splat(f1 - 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, // ;.........._x... - 0x00, 0x07, 0x00, 0xd1, 0x10, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x33, // .......@main(vf3 - 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x6e, // ;vf3;vf4;......n - 0x62, 0x00, 0x00, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x8f, // b..v_view....... - 0x41, 0x00, 0x00, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x05, 0x00, 0x06, 0x00, 0x8c, // A..v_world...... - 0x4a, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, // J..gl_FragData_0 - 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, // _..........bgfx_ - 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9d, // VoidFrag........ - 0x5d, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x83, // ]..param........ - 0x0f, 0x00, 0x00, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x58, // ...normal......X - 0x0d, 0x00, 0x00, 0x76, 0x69, 0x65, 0x77, 0x44, 0x69, 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0x67, // ...viewDir.....g - 0x15, 0x00, 0x00, 0x6e, 0x64, 0x6f, 0x74, 0x6c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe2, // ...ndotl........ - 0x04, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, // ...$Global...... - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, // .......u_viewRec - 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, // t..............u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xe2, // _viewTexel...... - 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, // .......u_view... - 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, // ...........u_inv - 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x04, // View............ - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, // ...u_proj....... - 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, // .......u_invProj - 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, // ...............u - 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xe2, // _viewProj....... - 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, // .......u_invView - 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x08, // Proj............ - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, // ...u_model...... - 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // .......u_modelVi - 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, // ew.............u - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, // _modelViewProj.. - 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, // ...........u_alp - 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0c, // haRef4.......... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, 0x05, // ...u_params..... - 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x96, // ...B............ - 0x0e, 0x00, 0x00, 0x64, 0x69, 0x66, 0x66, 0x75, 0x73, 0x65, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd4, // ...diffuse...... - 0x56, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xbe, // V..param........ - 0x39, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf7, // 9..param........ - 0x39, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0c, // 9..param........ - 0x0a, 0x00, 0x00, 0x73, 0x70, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x91, // ...spec......... - 0x37, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xcb, // 7..param........ - 0x41, 0x00, 0x00, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd4, // A..v_view....... - 0x0f, 0x00, 0x00, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2c, // ...v_view......, - 0x3f, 0x00, 0x00, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x05, 0x00, 0x04, 0x00, 0x6f, // ?..v_world.....o - 0x12, 0x00, 0x00, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, // ...v_world...... - 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, // ...gl_FragData_0 - 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, // _.......G..param - 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, // ........U..param - 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, // ...........param - 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ...........gl_Fr - 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, // agData_0_..G...B - 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xfa, // .......@...G.... - 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, // ...........H.... - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, // .......#.......H - 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, // ...........#.... - 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, // ...H............ - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, // ...H...........# - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x02, // ... ...H........ - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, // ...........H.... - 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, // ...........H.... - 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, // .......#...`...H - 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ................ - 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, // ...H............ - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, // ...H...........# - 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x04, // .......H........ - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, // ...........H.... - 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, // ...........H.... - 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, // .......#.......H - 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ................ - 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, // ...H............ - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, // ...H...........# - 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x06, // ... ...H........ - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, // ...........H.... - 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, // ...........H.... - 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, // .......#...`...H - 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ................ - 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, // ...H............ - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, // ...H...........# - 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x08, // .......H........ - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, // ...........H.... - 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, // ...........H.... - 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, // .......#.......H - 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ................ - 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, // ...H............ - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, // ...H...........# - 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0a, // .......H........ - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, // ...........H.... - 0x04, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, // .......#... ...H - 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, // ...........#...0 - 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, // ...G...........G - 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...B...".......G - 0x00, 0x04, 0x00, 0xd4, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...............G - 0x00, 0x04, 0x00, 0x6f, 0x12, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, // ...o...........G - 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, // ................ - 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, // .......!........ - 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, // ........... .... - 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, // ............... - 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x21, // ...............! - 0x00, 0x06, 0x00, 0x75, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, // ...u............ - 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, // ....... ........ - 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x18, // .......!........ - 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, // ................ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, // .......!........ - 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, // ....... ........ - 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x08, // .......!...n.... - 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, // ...............+ - 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // ................ - 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, // ...e............ - 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, // ....... .......+ - 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, // .......j... .... - 0x00, 0x04, 0x00, 0x42, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x2b, // ...B...e...j...+ - 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, // ................ - 0x00, 0x04, 0x00, 0xfa, 0x07, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, 0x1e, // ................ - 0x00, 0x0f, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, // ...............e - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // ...e...e...e...e - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x42, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // ...e...B...e...e - 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x07, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x5f, // ........... ..._ - 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x5f, // ...........;..._ - 0x07, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, // ...B............ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, // ... .......+.... - 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, // .../.......+.... - 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, // ........... .... - 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, // ...........+.... - 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, // ...........+.... - 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, // ...........+.... - 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0c, // ..........?+.... - 0x00, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, // ...........+.... - 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, // ........... .... - 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, // ........... .... - 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, // ...........;.... - 0x02, 0x00, 0x00, 0xd4, 0x0f, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, // ...........;.... - 0x02, 0x00, 0x00, 0x6f, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, // ...o....... .... - 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, // ...........;.... - 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, // ...........6.... - 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, // ................ - 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc9, // ...Sa..;........ - 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xab, // G......;........ - 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, // U......;........ - 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcb, // .......=........ - 0x41, 0x00, 0x00, 0xd4, 0x0f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, // A......=......., - 0x3f, 0x00, 0x00, 0x6f, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xcb, // ?..o...>....G... - 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, // A..>....U..,?..9 - 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0xd1, 0x10, 0x00, 0x00, 0xc9, // ........&....... - 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, // G...U......=.... - 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, // ...........>.... - 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, // ...........8...6 - 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, // .......0.......u - 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x37, // ...7...........7 - 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, // ...........7.... - 0x02, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x9a, 0x54, 0x00, 0x00, 0x3d, // ............T..= - 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x75, 0x1e, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, // .......u.......= - 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x8b, 0x43, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x3d, // ........C......= - 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x92, 0x42, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x0c, // ........B....... - 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x1a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, // ................ - 0x00, 0x00, 0x00, 0x75, 0x1e, 0x00, 0x00, 0x8b, 0x43, 0x00, 0x00, 0x92, 0x42, 0x00, 0x00, 0xfe, // ...u....C...B... - 0x00, 0x02, 0x00, 0x05, 0x1a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, // .......8...6.... - 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x37, // ...............7 - 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xe5, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x73, // ........A......s - 0x1d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6a, 0x62, 0x00, 0x00, 0xe5, // ...=.......jb... - 0x41, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x5b, 0x00, 0x00, 0xe5, // A..=........[... - 0x41, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x29, 0x2b, 0x00, 0x00, 0xe5, // A..=.......)+... - 0x41, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x9b, 0x19, 0x00, 0x00, 0x6a, // A..P...........j - 0x62, 0x00, 0x00, 0x18, 0x5b, 0x00, 0x00, 0x29, 0x2b, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x9b, // b...[..)+....... - 0x19, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, // ...8...6.......5 - 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, // ...........7.... - 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2e, 0x5f, 0x00, 0x00, 0x3d, // ............_..= - 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, // ........[......= - 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x25, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, // .......%S......= - 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc5, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, // ........=......= - 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd8, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, // ........=......P - 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x56, 0x5b, 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0x25, // .......V[...[..% - 0x53, 0x00, 0x00, 0xc5, 0x3d, 0x00, 0x00, 0xd8, 0x3d, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x56, // S...=...=......V - 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xd1, // [..8...6........ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, // .......n...7.... - 0x02, 0x00, 0x00, 0x6e, 0x62, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x8f, // ...nb..7........ - 0x41, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x8c, 0x4a, 0x00, 0x00, 0xf8, // A..7........J... - 0x00, 0x02, 0x00, 0xc0, 0x53, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x9d, // ....S..;........ - 0x5d, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xd4, // ]......;........ - 0x56, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xbe, // V......;........ - 0x39, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xf7, // 9......;........ - 0x39, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x91, // 9......;........ - 0x37, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9d, 0x5d, 0x00, 0x00, 0x0c, // 7......>....]... - 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, // ...9...........5 - 0x13, 0x00, 0x00, 0x9d, 0x5d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xa5, // ....]..=........ - 0x29, 0x00, 0x00, 0x8f, 0x41, 0x00, 0x00, 0xcf, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xeb, // )...A........... - 0x21, 0x00, 0x00, 0xa5, 0x29, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xc9, // !...)..=........ - 0x1f, 0x00, 0x00, 0x8f, 0x41, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xf9, // ....A........... - 0x2f, 0x00, 0x00, 0xc9, 0x1f, 0x00, 0x00, 0xd0, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd5, // /............... - 0x44, 0x00, 0x00, 0xf9, 0x2f, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x62, // D.../..........b - 0x5a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0xeb, 0x21, 0x00, 0x00, 0xd5, // Z......D....!... - 0x44, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x83, 0x0f, 0x00, 0x00, 0x01, // D............... - 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x62, 0x5a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, // ...E...bZ..=.... - 0x00, 0x00, 0x00, 0xf4, 0x1e, 0x00, 0x00, 0x6e, 0x62, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, // .......nb....... - 0x00, 0x00, 0x00, 0xe7, 0x2b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0xf4, // ....+......E.... - 0x1e, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x58, 0x0d, 0x00, 0x00, 0xe7, // ...........X.... - 0x2b, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x83, 0x60, 0x00, 0x00, 0x42, // +..A........`..B - 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, // .../.......=.... - 0x00, 0x00, 0x00, 0xb5, 0x2a, 0x00, 0x00, 0x83, 0x60, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, // ....*...`..O.... - 0x00, 0x00, 0x00, 0x7c, 0x4a, 0x00, 0x00, 0xb5, 0x2a, 0x00, 0x00, 0xb5, 0x2a, 0x00, 0x00, 0x00, // ...|J...*...*... - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x94, 0x00, 0x05, 0x00, 0x0d, // ................ - 0x00, 0x00, 0x00, 0x67, 0x15, 0x00, 0x00, 0x83, 0x0f, 0x00, 0x00, 0x7c, 0x4a, 0x00, 0x00, 0x85, // ...g.......|J... - 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5e, 0x5e, 0x00, 0x00, 0x67, 0x15, 0x00, 0x00, 0xfc, // .......^^..g.... - 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x97, 0x19, 0x00, 0x00, 0x5e, // ...............^ - 0x5e, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1e, // ^......P........ - 0x54, 0x00, 0x00, 0x97, 0x19, 0x00, 0x00, 0x97, 0x19, 0x00, 0x00, 0x97, 0x19, 0x00, 0x00, 0x41, // T..............A - 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x44, 0x3d, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, // .......D=..B.../ - 0x0a, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfb, // .......=........ - 0x1a, 0x00, 0x00, 0x44, 0x3d, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0f, // ...D=..O........ - 0x35, 0x00, 0x00, 0xfb, 0x1a, 0x00, 0x00, 0xfb, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // 5............... - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd4, 0x56, 0x00, 0x00, 0x0f, // .......>....V... - 0x35, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xc3, 0x49, 0x00, 0x00, 0x42, // 5..A........I..B - 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, // .../.......=.... - 0x00, 0x00, 0x00, 0x37, 0x5f, 0x00, 0x00, 0xc3, 0x49, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, // ...7_...I..O.... - 0x00, 0x00, 0x00, 0xd6, 0x34, 0x00, 0x00, 0x37, 0x5f, 0x00, 0x00, 0x37, 0x5f, 0x00, 0x00, 0x00, // ....4..7_..7_... - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbe, // ...........>.... - 0x39, 0x00, 0x00, 0xd6, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xf7, 0x39, 0x00, 0x00, 0x1e, // 9...4..>....9... - 0x54, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x8b, 0x56, 0x00, 0x00, 0x30, // T..9........V..0 - 0x0c, 0x00, 0x00, 0xd4, 0x56, 0x00, 0x00, 0xbe, 0x39, 0x00, 0x00, 0xf7, 0x39, 0x00, 0x00, 0x41, // ....V...9...9..A - 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x20, 0x58, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, // ....... X..B.../ - 0x0a, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x58, // .......=.......X - 0x61, 0x00, 0x00, 0x20, 0x58, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x5a, // a.. X..O.......Z - 0x4f, 0x00, 0x00, 0x58, 0x61, 0x00, 0x00, 0x58, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // O..Xa..Xa....... - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x96, // ................ - 0x0e, 0x00, 0x00, 0x8b, 0x56, 0x00, 0x00, 0x5a, 0x4f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x91, // ....V..ZO..>.... - 0x37, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x19, // 7......9........ - 0x4e, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x91, 0x37, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x18, // N.......7....... - 0x00, 0x00, 0x00, 0x3b, 0x2f, 0x00, 0x00, 0x96, 0x0e, 0x00, 0x00, 0x19, 0x4e, 0x00, 0x00, 0x41, // ...;/.......N..A - 0x00, 0x07, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x84, 0x3a, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, // ........:..B.../ - 0x0a, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, // ...........=.... - 0x00, 0x00, 0x00, 0xaf, 0x2a, 0x00, 0x00, 0x84, 0x3a, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, // ....*...:..Q.... - 0x00, 0x00, 0x00, 0xe5, 0x33, 0x00, 0x00, 0x3b, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, // ....3..;/......Q - 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xde, 0x43, 0x00, 0x00, 0x3b, 0x2f, 0x00, 0x00, 0x01, // ........C..;/... - 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc5, 0x4f, 0x00, 0x00, 0x3b, // ...Q........O..; - 0x2f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9e, // /......P........ - 0x3f, 0x00, 0x00, 0xe5, 0x33, 0x00, 0x00, 0xde, 0x43, 0x00, 0x00, 0xc5, 0x4f, 0x00, 0x00, 0xaf, // ?...3...C...O... - 0x2a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8c, 0x4a, 0x00, 0x00, 0x9e, 0x3f, 0x00, 0x00, 0xfd, // *..>....J...?... - 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ...8.... + 0x46, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH...V_...u_par + 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0xa8, 0x0f, 0x00, 0x00, 0x03, 0x02, 0x23, // ams............# + 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x6f, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, // .........ob..... + 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... + 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0xd4, 0x0f, 0x00, 0x00, 0x6f, 0x12, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, // .....o.......... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x6d, 0x69, 0x78, // n........0...mix + 0x28, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, // (vf3;vf3;vf3;... + 0x00, 0x05, 0x00, 0x03, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, // ........._a..... + 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd9, 0x0e, 0x00, // ....._b......... + 0x00, 0x5f, 0x74, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x01, 0x14, 0x00, 0x00, 0x76, 0x65, 0x63, // ._t..........vec + 0x33, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, // 3_splat(f1;..... + 0x00, 0xe5, 0x41, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, // ..A.._x......5.. + 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, // .vec4_splat(f1;. + 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x07, // ........._x..... + 0x00, 0xd1, 0x10, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x33, 0x3b, 0x76, // .....@main(vf3;v + 0x66, 0x33, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x6e, 0x62, 0x00, // f3;vf4;......nb. + 0x00, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x8f, 0x41, 0x00, // .v_view.......A. + 0x00, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x05, 0x00, 0x06, 0x00, 0x8c, 0x4a, 0x00, // .v_world......J. + 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, // .gl_FragData_0_. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, // .........bgfx_Vo + 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9d, 0x5d, 0x00, // idFrag........]. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x83, 0x0f, 0x00, // .param.......... + 0x00, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x58, 0x0d, 0x00, // .normal......X.. + 0x00, 0x76, 0x69, 0x65, 0x77, 0x44, 0x69, 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0x67, 0x15, 0x00, // .viewDir.....g.. + 0x00, 0x6e, 0x64, 0x6f, 0x74, 0x6c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, // .ndotl.......... + 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, // .$Global........ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, // .....u_viewRect. + 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, // iewTexel........ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_view..... + 0x00, 0xe2, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // .........u_invVi + 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ew.............. + 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, // .u_proj......... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // .....u_invProj.. + 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xe2, 0x04, 0x00, // iewProj......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, // .....u_invViewPr + 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, // oj.............. + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, // .u_model........ + 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView + 0x00, 0x06, 0x00, 0x07, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .............u_m + 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, // odelViewProj.... + 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, // .........u_alpha + 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00, // Ref4............ + 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, // .u_params....... + 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x96, 0x0e, 0x00, // .B.............. + 0x00, 0x64, 0x69, 0x66, 0x66, 0x75, 0x73, 0x65, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd4, 0x56, 0x00, // .diffuse......V. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xbe, 0x39, 0x00, // .param........9. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf7, 0x39, 0x00, // .param........9. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0c, 0x0a, 0x00, // .param.......... + 0x00, 0x73, 0x70, 0x65, 0x63, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x91, 0x37, 0x00, // .spec.........7. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xcb, 0x41, 0x00, // .param........A. + 0x00, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd4, 0x0f, 0x00, // .v_view......... + 0x00, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2c, 0x3f, 0x00, // .v_view......,?. + 0x00, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x05, 0x00, 0x04, 0x00, 0x6f, 0x12, 0x00, // .v_world.....o.. + 0x00, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, // .v_world........ + 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, // .gl_FragData_0_. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......G..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......U..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .........param.. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // .........gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x04, 0x00, // Data_0_..G...B.. + 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xfa, 0x07, 0x00, // .....@...G...... + 0x00, 0x06, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, // .........H...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0xe2, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, // . ...H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, // .........H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, // .........H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0xe2, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, // .........H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, // .........H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0xe2, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, // . ...H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, // .........H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, // .........H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0xe2, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, // .........H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, // .........H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0xe2, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe2, 0x04, 0x00, // .........H...... + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#... ...H.. + 0x00, 0xe2, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, // .........#...0.. + 0x00, 0x47, 0x00, 0x03, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .G...........G.. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .B...".......G.. + 0x00, 0xd4, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. + 0x00, 0x6f, 0x12, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .o...........G.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, // ................ + 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, // .....!.......... + 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, // ......... ...... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, // .............!.. + 0x00, 0x75, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, // .u.............. + 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // .....!.......... + 0x00, 0x8a, 0x02, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .....!.......... + 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .....!...n...... + 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, // ................ + 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // .e.............. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // .....j... ...... + 0x00, 0x42, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, // .B...e...j...+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // ................ + 0x00, 0xfa, 0x07, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, // ................ + 0x00, 0xe2, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .............e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x42, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...B...e...e.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x07, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x5f, 0x07, 0x00, // ......... ..._.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x5f, 0x07, 0x00, // .........;..._.. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .B.............. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // . .......+...... + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // ./.......+...... + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // ........?+...... + 0x00, 0x14, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // .........+...... + 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // .........;...... + 0x00, 0xd4, 0x0f, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // .........;...... + 0x00, 0x6f, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .o....... ...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // .........6...... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, // ................ + 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, // .Sa..;........G. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, // .....;........U. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, // .....;.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, // .....=........A. + 0x00, 0xd4, 0x0f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, // .....=.......,?. + 0x00, 0x6f, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xcb, 0x41, 0x00, // .o...>....G...A. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x07, // .>....U..,?..9.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0xd1, 0x10, 0x00, 0x00, 0xc9, 0x47, 0x00, // ......&.......G. + 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ..U......=...... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, // .........>...... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .........8...6.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, // .....0.......u.. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, // .7...........7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, // .........7...... + 0x00, 0xd9, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x9a, 0x54, 0x00, 0x00, 0x3d, 0x00, 0x04, // ..........T..=.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x75, 0x1e, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....u.......=.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x8b, 0x43, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......C......=.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x92, 0x42, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x08, // ......B......... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x05, 0x1a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, // ................ + 0x00, 0x75, 0x1e, 0x00, 0x00, 0x8b, 0x43, 0x00, 0x00, 0x92, 0x42, 0x00, 0x00, 0xfe, 0x00, 0x02, // .u....C...B..... + 0x00, 0x05, 0x1a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, // .....8...6...... + 0x00, 0x01, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .............7.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xe5, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x73, 0x1d, 0x00, // ......A......s.. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6a, 0x62, 0x00, 0x00, 0xe5, 0x41, 0x00, // .=.......jb...A. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x5b, 0x00, 0x00, 0xe5, 0x41, 0x00, // .=........[...A. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x29, 0x2b, 0x00, 0x00, 0xe5, 0x41, 0x00, // .=.......)+...A. + 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x9b, 0x19, 0x00, 0x00, 0x6a, 0x62, 0x00, // .P...........jb. + 0x00, 0x18, 0x5b, 0x00, 0x00, 0x29, 0x2b, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x9b, 0x19, 0x00, // ..[..)+......... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, // .8...6.......5.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, // .........7...... + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2e, 0x5f, 0x00, 0x00, 0x3d, 0x00, 0x04, // .........._..=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......[......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x25, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....%S......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc5, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......=......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd8, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, // ......=......P.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x56, 0x5b, 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0x25, 0x53, 0x00, // .....V[...[..%S. + 0x00, 0xc5, 0x3d, 0x00, 0x00, 0xd8, 0x3d, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x56, 0x5b, 0x00, // ..=...=......V[. + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xd1, 0x10, 0x00, // .8...6.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, // .....n...7...... + 0x00, 0x6e, 0x62, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x8f, 0x41, 0x00, // .nb..7........A. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x8c, 0x4a, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7........J..... + 0x00, 0xc0, 0x53, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x9d, 0x5d, 0x00, // ..S..;........]. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xd4, 0x56, 0x00, // .....;........V. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xbe, 0x39, 0x00, // .....;........9. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xf7, 0x39, 0x00, // .....;........9. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x91, 0x37, 0x00, // .....;........7. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9d, 0x5d, 0x00, 0x00, 0x0c, 0x0a, 0x00, // .....>....]..... + 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, // .9...........5.. + 0x00, 0x9d, 0x5d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xa5, 0x29, 0x00, // ..]..=........). + 0x00, 0x8f, 0x41, 0x00, 0x00, 0xcf, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xeb, 0x21, 0x00, // ..A...........!. + 0x00, 0xa5, 0x29, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xc9, 0x1f, 0x00, // ..)..=.......... + 0x00, 0x8f, 0x41, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xf9, 0x2f, 0x00, // ..A.........../. + 0x00, 0xc9, 0x1f, 0x00, 0x00, 0xd0, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd5, 0x44, 0x00, // ..............D. + 0x00, 0xf9, 0x2f, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x62, 0x5a, 0x00, // ../..........bZ. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0xeb, 0x21, 0x00, 0x00, 0xd5, 0x44, 0x00, // .....D....!...D. + 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x83, 0x0f, 0x00, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x45, 0x00, 0x00, 0x00, 0x62, 0x5a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .E...bZ..=...... + 0x00, 0xf4, 0x1e, 0x00, 0x00, 0x6e, 0x62, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // .....nb......... + 0x00, 0xe7, 0x2b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0xf4, 0x1e, 0x00, // ..+......E...... + 0x00, 0x7f, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x58, 0x0d, 0x00, 0x00, 0xe7, 0x2b, 0x00, // .........X....+. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x83, 0x60, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........`..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0xb5, 0x2a, 0x00, 0x00, 0x83, 0x60, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, // ..*...`..O...... + 0x00, 0x7c, 0x4a, 0x00, 0x00, 0xb5, 0x2a, 0x00, 0x00, 0xb5, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, // .|J...*...*..... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x94, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x67, 0x15, 0x00, 0x00, 0x83, 0x0f, 0x00, 0x00, 0x7c, 0x4a, 0x00, 0x00, 0x85, 0x00, 0x05, // .g.......|J..... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5e, 0x5e, 0x00, 0x00, 0x67, 0x15, 0x00, 0x00, 0xfc, 0x00, 0x00, // .....^^..g...... + 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x97, 0x19, 0x00, 0x00, 0x5e, 0x5e, 0x00, // .............^^. + 0x00, 0xfc, 0x00, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x54, 0x00, // .....P........T. + 0x00, 0x97, 0x19, 0x00, 0x00, 0x97, 0x19, 0x00, 0x00, 0x97, 0x19, 0x00, 0x00, 0x41, 0x00, 0x06, // .............A.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x44, 0x3d, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // .....D=..B.../.. + 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfb, 0x1a, 0x00, // .....=.......... + 0x00, 0x44, 0x3d, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0f, 0x35, 0x00, // .D=..O........5. + 0x00, 0xfb, 0x1a, 0x00, 0x00, 0xfb, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd4, 0x56, 0x00, 0x00, 0x0f, 0x35, 0x00, // .....>....V...5. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xc3, 0x49, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........I..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0x37, 0x5f, 0x00, 0x00, 0xc3, 0x49, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, // .7_...I..O...... + 0x00, 0xd6, 0x34, 0x00, 0x00, 0x37, 0x5f, 0x00, 0x00, 0x37, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, // ..4..7_..7_..... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbe, 0x39, 0x00, // .........>....9. + 0x00, 0xd6, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xf7, 0x39, 0x00, 0x00, 0x1e, 0x54, 0x00, // ..4..>....9...T. + 0x00, 0x39, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x8b, 0x56, 0x00, 0x00, 0x30, 0x0c, 0x00, // .9........V..0.. + 0x00, 0xd4, 0x56, 0x00, 0x00, 0xbe, 0x39, 0x00, 0x00, 0xf7, 0x39, 0x00, 0x00, 0x41, 0x00, 0x06, // ..V...9...9..A.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x20, 0x58, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ..... X..B.../.. + 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x58, 0x61, 0x00, // .....=.......Xa. + 0x00, 0x20, 0x58, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x5a, 0x4f, 0x00, // . X..O.......ZO. + 0x00, 0x58, 0x61, 0x00, 0x00, 0x58, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .Xa..Xa......... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x96, 0x0e, 0x00, // ................ + 0x00, 0x8b, 0x56, 0x00, 0x00, 0x5a, 0x4f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x91, 0x37, 0x00, // ..V..ZO..>....7. + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x19, 0x4e, 0x00, // .....9........N. + 0x00, 0x01, 0x14, 0x00, 0x00, 0x91, 0x37, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, // ......7......... + 0x00, 0x3b, 0x2f, 0x00, 0x00, 0x96, 0x0e, 0x00, 0x00, 0x19, 0x4e, 0x00, 0x00, 0x41, 0x00, 0x07, // .;/.......N..A.. + 0x00, 0x8b, 0x02, 0x00, 0x00, 0x84, 0x3a, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ......:..B.../.. + 0x00, 0x14, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........=...... + 0x00, 0xaf, 0x2a, 0x00, 0x00, 0x84, 0x3a, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ..*...:..Q...... + 0x00, 0xe5, 0x33, 0x00, 0x00, 0x3b, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, // ..3..;/......Q.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xde, 0x43, 0x00, 0x00, 0x3b, 0x2f, 0x00, 0x00, 0x01, 0x00, 0x00, // ......C..;/..... + 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc5, 0x4f, 0x00, 0x00, 0x3b, 0x2f, 0x00, // .Q........O..;/. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9e, 0x3f, 0x00, // .....P........?. + 0x00, 0xe5, 0x33, 0x00, 0x00, 0xde, 0x43, 0x00, 0x00, 0xc5, 0x4f, 0x00, 0x00, 0xaf, 0x2a, 0x00, // ..3...C...O...*. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8c, 0x4a, 0x00, 0x00, 0x9e, 0x3f, 0x00, 0x00, 0xfd, 0x00, 0x01, // .>....J...?..... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .8.... }; -static const uint8_t fs_debugdraw_fill_lit_dx9[400] = +static const uint8_t fs_debugdraw_fill_lit_dx9[402] = { - 0x46, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH...V_...u_par - 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0x74, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, // ams......t...... - 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, 0x00, // . .CTAB....S.... - 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x4c, // ...............L - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3c, // ...0...........< - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, // .......u_params. - 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x04, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x3f, 0x00, // 1..Q..........?. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, // ................ - 0x00, 0x01, 0x80, 0x00, 0x00, 0x07, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, // ................ - 0x00, 0xc9, 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x5b, // ...............[ - 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xd2, 0x90, 0x05, 0x00, 0x00, 0x03, 0x02, // ................ - 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, // ................ - 0x00, 0x07, 0x80, 0x01, 0x00, 0xd2, 0x80, 0x00, 0x00, 0xc9, 0x80, 0x02, 0x00, 0xe4, 0x81, 0x24, // ...............$ - 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, // ................ - 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, 0xa0, 0x01, // ................ - 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x0e, 0x80, 0x01, 0x00, 0x90, 0x81, 0x01, 0x00, 0x90, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, // ................ - 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x05, // ................ - 0x00, 0x00, 0x03, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, // ................ - 0x00, 0x00, 0x02, 0x00, 0x08, 0x08, 0x80, 0x03, 0x00, 0xff, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ................ + 0x46, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH...V_...u_par + 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0x74, 0x01, 0x00, 0x00, 0x00, 0x03, 0xff, // ams......t...... + 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ... .CTAB....S.. + 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ + 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... + 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, // .<.......u_param + 0x73, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, // s............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x04, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, // 0.1..Q.......... + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, // ?............... + 0x02, 0x05, 0x00, 0x01, 0x80, 0x00, 0x00, 0x07, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, // ................ + 0x80, 0x00, 0x00, 0xc9, 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x5b, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xd2, 0x90, 0x05, 0x00, 0x00, // .[.............. + 0x03, 0x02, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd2, 0x80, 0x00, 0x00, 0xc9, 0x80, 0x02, 0x00, 0xe4, // ................ + 0x81, 0x24, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, // .$.............. + 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x00, // ................ + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x0e, 0x80, 0x01, 0x00, 0x90, 0x81, 0x01, 0x00, 0x90, 0xa0, 0x04, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x02, 0x00, 0xe4, // ................ + 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, // ................ + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x08, 0x80, 0x03, 0x00, 0xff, 0xa0, 0xff, 0xff, 0x00, // ................ + 0x00, 0x00, // .. }; -static const uint8_t fs_debugdraw_fill_lit_dx11[719] = +static const uint8_t fs_debugdraw_fill_lit_dx11[721] = { - 0x46, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH...V_...u_par - 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0xb0, 0x02, 0x44, 0x58, 0x42, 0x43, 0x59, // ams........DXBCY - 0x1c, 0xf9, 0xc6, 0x41, 0xb7, 0xae, 0xfd, 0xa5, 0xa5, 0x0c, 0x28, 0x25, 0x0d, 0x24, 0x29, 0x01, // ...A......(%.$). - 0x00, 0x00, 0x00, 0xb0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, // ...........,.... - 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, // .......ISGNh.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // .......P........ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ................ - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x53, // ...............S - 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, // V_POSITION.TEXCO - 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ORD....OSGN,.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....... ........ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S - 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xd8, // V_TARGET...SHDR. - 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, // ...@...v...Y...F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x72, // . .........b...r - 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... - 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x72, // ...h.......6...r - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x14, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, // ...........A.... - 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x05, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // .......r.......F - 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x05, 0x72, 0x00, 0x10, 0x00, 0x01, // ...........r.... - 0x00, 0x00, 0x00, 0x26, 0x19, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, // ...&.......8...r - 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // .......F.......F - 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, // .......2...r.... - 0x00, 0x00, 0x00, 0x26, 0x09, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x96, 0x04, 0x10, 0x00, 0x00, // ...&............ - 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, // ...F...A........ - 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, // ...........F.... - 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x05, 0x82, // ...F.......D.... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, // .......:.......8 - 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, // ...r............ - 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x12, // ...F............ - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // .......F.......F - 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x12, // . .........2.... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ................ - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, // @.....?.@.....?. - 0x00, 0x00, 0x0a, 0xe2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x89, 0x20, 0x00, 0x00, // ............. .. - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x89, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, // ......... .A.... - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, // .......2...r.... - 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x38, // ...F. .........8 - 0x00, 0x00, 0x08, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, // ...r ......F.... - 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, // ...F. .........6 - 0x00, 0x00, 0x06, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, // .... ......:. .. - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, // .......>.....@. + 0x46, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH...V_...u_par + 0x61, 0x6d, 0x73, 0x12, 0x04, 0x00, 0x00, 0x04, 0x00, 0xb0, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, // ams..........DXB + 0x43, 0x59, 0x1c, 0xf9, 0xc6, 0x41, 0xb7, 0xae, 0xfd, 0xa5, 0xa5, 0x0c, 0x28, 0x25, 0x0d, 0x24, // CY...A......(%.$ + 0x29, 0x01, 0x00, 0x00, 0x00, 0xb0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // )............,.. + 0x00, 0x9c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, // .........ISGNh.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ + 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, // ................ + 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, // .SV_POSITION.TEX + 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, // COORD....OSGN,.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ + 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, // .SV_TARGET...SHD + 0x52, 0xd8, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, // R....@...v...Y.. + 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, // .F. .........b.. + 0x03, 0x72, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .r.......e.... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .....h.......6.. + 0x06, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x14, 0x10, 0x80, 0x41, 0x00, 0x00, // .r...........A.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x05, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .........r...... + 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x05, 0x72, 0x00, 0x10, // .F...........r.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x26, 0x19, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, // .....&.......8.. + 0x07, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, // .r.......F...... + 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, // .F.......2...r.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x09, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x96, 0x04, 0x10, // .....&.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // .....F...A...... + 0x00, 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, // .............F.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .....F.......D.. + 0x05, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .........:...... + 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, // .8...r.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .....F.......... + 0x08, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, // .........F...... + 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, // .F. .........2.. + 0x09, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // ..@.....?.@..... + 0x3f, 0x00, 0x00, 0x00, 0x0a, 0xe2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x89, 0x20, // ?.............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x89, 0x20, 0x80, 0x41, 0x00, 0x00, // ........... .A.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, // .........2...r.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // .....F. ........ + 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, // .8...r ......F.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .....F. ........ + 0x00, 0x36, 0x00, 0x00, 0x06, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, // .6.... ......:. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, // .........>.....@ + 0x00, // . }; static const uint8_t fs_debugdraw_fill_lit_mtl[862] = { - 0x46, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH...V_...u_par + 0x46, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH...V_...u_par 0x61, 0x6d, 0x73, 0x02, 0x04, 0x00, 0x00, 0x04, 0x00, 0x40, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, // ams......@...usi 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, // ng namespace met 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // al;.struct xlatM diff --git a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_lit.sc b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_lit.sc index 7fb087d..a16bbe4 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_lit.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_lit.sc @@ -1,7 +1,7 @@ $input v_view, v_world /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_texture.bin.h b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_texture.bin.h new file mode 100644 index 0000000..790581d --- /dev/null +++ b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_texture.bin.h @@ -0,0 +1,319 @@ +static const uint8_t fs_debugdraw_fill_texture_glsl[253] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xdd, 0x00, 0x00, 0x00, 0x76, // Color..........v + 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec + 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary + 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, // ing highp vec2 v + 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, // _texcoord0;.unif + 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, // orm sampler2D s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, // texColor;.void m + 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, // ain ().{. lowp + 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, // vec4 tmpvar_1;. + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, // tmpvar_1 = text + 0x75, 0x72, 0x65, 0x32, 0x44, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, // ure2D (s_texColo + 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x3b, // r, v_texcoord0); + 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, // . gl_FragColor + 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x2a, 0x20, 0x76, 0x5f, // = (tmpvar_1 * v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // color0);.}... +}; +static const uint8_t fs_debugdraw_fill_texture_spv[3315] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xe4, 0x0c, 0x00, 0x00, 0x03, 0x02, // FSH............. + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, // #.........Ta.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, // ..w...t......... + 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, // ................ + 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x42, 0x67, // in........a...Bg + 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, // fxSampler2D..... + 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, // ..a.......m_samp + 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x01, 0x00, // ler.......a..... + 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, // ..m_texture..... + 0x0e, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, // ......bgfxTextur + 0x65, 0x32, 0x44, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, // e2D(struct-BgfxS + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, 0x31, 0x31, // ampler2D-p1-t211 + 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, // ;vf2;.....'..._s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, // ampler.......... + 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, // .._coord......5. + 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, // ..vec4_splat(f1; + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, // .........._x.... + 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, // ......@main(vf4; + 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x42, 0x24, // vf2;vf4;......B$ + 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..v_color0...... + 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..x ..v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // 0......A..gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, // gData_0_......C. + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, // ..s_texColor.... + 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ......s_texColor + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, // Sampler......... + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, // ..s_texColorText + 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, // ure...........bg + 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, // fx_VoidFrag..... + 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ...T..param..... + 0x04, 0x00, 0x45, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ..EN..param..... + 0x04, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ......param..... + 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ...A..v_color0.. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ......w...v_colo + 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, // r0.........<..v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, // texcoord0.....t. + 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... + 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // ......gl_FragDat + 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, // a_0_.......G..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, // ram........U..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, // ram...........pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, // ram...........gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, // _FragData_0_.... + 0x04, 0x00, 0xba, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, // ......$Global... + 0x06, 0x00, 0xba, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xba, 0x00, 0x00, 0x00, 0x01, 0x00, // Rect............ + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, // ..u_viewTexel... + 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xba, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xba, 0x00, // invView......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ......u_proj.... + 0x06, 0x00, 0xba, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, // ..........u_invP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xba, 0x00, 0x00, 0x00, 0x06, 0x00, // roj............. + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ..u_viewProj.... + 0x07, 0x00, 0xba, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xba, 0x00, // iewProj......... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, // ......u_model... + 0x06, 0x00, 0xba, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode + 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xba, 0x00, 0x00, 0x00, 0x0a, 0x00, // lView........... + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ..u_modelViewPro + 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xba, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, // j.............u_ + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, // alphaRef4.G..... + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, // ..".......G..... + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, // ..!.......G..... + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, // ..".......G..... + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, // ..!.......G...w. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, // ..........G...t. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, // ..........G..... + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xda, 0x00, // ..........G..... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, // ......@...H..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xba, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x02, 0x00, // .. ...H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xba, 0x00, // ..........H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, // ..........H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#...`...H. + 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xba, 0x00, // ..........H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, // ..........H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xba, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x06, 0x00, // .. ...H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xba, 0x00, // ..........H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, // ..........H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#...`...H. + 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xba, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x08, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xba, 0x00, // ..........H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, // ..........H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xba, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, 0x00, 0x00, 0x0a, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xba, 0x00, // ..........H..... + 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, // ......#... ...G. + 0x03, 0x00, 0xba, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, // ................ + 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, // ..!............. + 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, // ..........a..... + 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, // ..a............. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xc2, 0x03, 0x00, 0x00, 0x1d, 0x00, // ......!......... + 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, // ..........!..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x69, 0x00, // ..........!...i. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, 0x09, // .. ...........a. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, // ..;.......C..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, // .. ...y......... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, // ..;...y......... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, // ..;............. + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, // .. ............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, // .. ...z......... + 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // ......w....... . + 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // ......t....... . + 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, // ................ + 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, // ..e............. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, // ......j... ..... + 0x04, 0x00, 0xda, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, // ......e...j..... + 0x0e, 0x00, 0xba, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, // ..............e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e.......e...e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, // ......6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, // ..............Sa + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, // ..;........G.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, // ..;........U.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, // ..=.......!C.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, // ..=........3.... + 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, // ..P...a.... ..!C + 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, // ...3..>...C.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, // ..=........A..w. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, // ..=........<..t. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, // ..>....G...A..>. + 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, // ...U...<..9..... + 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, // ...&.......G...U + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, // ......=......... + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, // ......>......... + 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ......8...6..... + 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x03, 0x00, 0x00, 0x37, 0x00, // ..............7. + 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......'...7..... + 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xcd, 0x5b, 0x00, 0x00, 0x41, 0x00, // ...........[..A. + 0x05, 0x00, 0x14, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, // ......i$..'..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x69, 0x24, // ..=........1..i$ + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x27, 0x0e, // ..A...z...TD..'. + 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x9b, 0x56, // ......=........V + 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xc9, 0x42, // ..TD..V........B + 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ...1...V..=..... + 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, // ..6.......W..... + 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xfe, 0x00, // ...Q...B..6..... + 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ...Q..8...6..... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, // ..5...........7. + 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x17, 0x3e, // ...............> + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0xdd, 0x0e, // ..=........S.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xdd, 0x0e, // ..=.......]J.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0xdd, 0x0e, // ..=........4.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, 0xdd, 0x0e, // ..=........5.... + 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x18, 0x53, // ..P.......?:...S + 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, 0xfe, 0x00, // ..]J...4...5.... + 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, // ..?:..8...6..... + 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x37, 0x00, // ..........i...7. + 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......B$..7..... + 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc4, 0x41, // ..x ..7........A + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, // ..........;..... + 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, // ...T......;..... + 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, // ..EN......;..... + 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, // ..........>....T + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, // ......9......... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x61, 0x09, // ..5....T..=...a. + 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x45, 0x4e, // ...Q..C...>...EN + 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x6f, 0x23, // ...Q..=.......o# + 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x6f, 0x23, // ..x ..>.......o# + 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x45, 0x5f, 0x00, 0x00, 0x99, 0x0f, // ..9.......E_.... + 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..EN......=..... + 0x00, 0x00, 0xac, 0x21, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x1d, 0x00, // ...!..B$........ + 0x00, 0x00, 0x73, 0x2b, 0x00, 0x00, 0x45, 0x5f, 0x00, 0x00, 0xac, 0x21, 0x00, 0x00, 0x3e, 0x00, // ..s+..E_...!..>. + 0x03, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x73, 0x2b, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, // ...A..s+......8. + 0x01, 0x00, 0x00, // ... +}; +static const uint8_t fs_debugdraw_fill_texture_dx9[240] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x00, // Color0.......... + 0x03, 0xff, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, // ..... .CTAB....S + 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ...L...0........ + 0x00, 0x02, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...<.......s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, // Color........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......ps_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, // 10.1........... + 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, // ...........B.... + 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, // ................ + 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ................ +}; +static const uint8_t fs_debugdraw_fill_texture_dx11[403] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x70, 0x01, 0x00, 0x00, 0x44, // Color0.....p...D + 0x58, 0x42, 0x43, 0xbe, 0x78, 0xe7, 0xa5, 0x19, 0x0c, 0x70, 0xeb, 0x4c, 0xb1, 0xac, 0x1f, 0x16, // XBC.x....p.L.... + 0x84, 0xe9, 0x97, 0x01, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, // .......p......., + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, // ...........ISGNl + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, // ...........b.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, // ................ + 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, // ...SV_POSITION.C + 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, // OLOR.TEXCOORD..O + 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, // .......SV_TARGET + 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x94, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x25, // ...SHDR....@...% + 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, // ...Z....`......X + 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, // ....p......UU..b + 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, // ...........b...2 + 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, // ...h.......E.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // .......F.......F + 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, // ~.......`......8 + 0x00, 0x00, 0x07, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, // .... ......F.... + 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, // ...F.......>.... + 0x00, 0x00, 0x00, // ... +}; +static const uint8_t fs_debugdraw_fill_texture_mtl[590] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x3f, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH.......?...us + 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me + 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . float4 v_colo + 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, // r0;. float2 v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, // excoord0;.};.str + 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // uct xlatMtlShade + 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // rOutput {. floa + 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, // t4 gl_FragColor; + 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // tlShaderUniform + 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, // {.};.fragment xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, // t xlatMtlMain (x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, // latMtlShaderInpu + 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, // t _mtl_i [[stage + 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, // _in]], constant + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, // xlatMtlShaderUni + 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, // form& _mtl_u [[b + 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x0a, 0x20, 0x20, 0x2c, 0x20, 0x20, // uffer(0)]]. , + 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, // texture2d s_texColor [[t + 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, 0x61, 0x6d, // exture(0)]], sam + 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, // pler _mtlsmp_s_t + 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, // exColor [[sample + 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, // r(0)]]).{. xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // _mtl_o;. _mtl_o + 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, // .gl_FragColor = + 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, // (s_texColor.samp + 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, // le(_mtlsmp_s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x29, 0x28, // Color, (float2)( + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // _mtl_i.v_texcoor + 0x64, 0x30, 0x29, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, // d0)) * _mtl_i.v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, // color0);. retur + 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // n _mtl_o;.}... +}; +extern const uint8_t* fs_debugdraw_fill_texture_pssl; +extern const uint32_t fs_debugdraw_fill_texture_pssl_size; diff --git a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_texture.sc b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_texture.sc new file mode 100644 index 0000000..7a1f5b5 --- /dev/null +++ b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_fill_texture.sc @@ -0,0 +1,15 @@ +$input v_texcoord0, v_color0 + +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include + +SAMPLER2D(s_texColor, 0); + +void main() +{ + gl_FragColor = texture2D(s_texColor, v_texcoord0) * v_color0; +} diff --git a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines.bin.h b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines.bin.h index 75233cf..8e05b35 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines.bin.h +++ b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines.bin.h @@ -1,180 +1,180 @@ static const uint8_t fs_debugdraw_lines_glsl[89] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I..J...va + 0x46, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I..J...va 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // v_color0;.void 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // main ().{. gl_F 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // ragColor = v_col 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // or0;.}... }; -static const uint8_t fs_debugdraw_lines_spv[2065] = +static const uint8_t fs_debugdraw_lines_spv[2079] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x04, 0x08, 0x03, 0x02, 0x23, 0x07, // FSH....I......#. - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x7a, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........za...... - 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, // GLSL.std.450.... - 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, // ........main.... - 0x77, 0x0e, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, // w............... - 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, // ............main - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, // ........5...vec4 - 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, // _splat(f1;...... - 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xff, 0x0f, 0x00, 0x00, // ...._x.......... - 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // @main(vf4;vf4;.. - 0x05, 0x00, 0x05, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....O0..v_color0 - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa2, 0x25, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // .........%..gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ragData_0_...... - 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, // ....bgfx_VoidFra - 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // g.......,N..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, // m........@..v_co - 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, // lor0........w... - 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // v_color0........ - 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // ....gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // 0_.......G..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // m...........gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ragData_0_...... - 0xc7, 0x02, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, // ....$Global..... - 0xc7, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, // ........u_viewRe - 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ct.............. - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, // u_viewTexel..... - 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, // ........u_view.. - 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in - 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // vView........... - 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_proj...... - 0xc7, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, // ........u_invPro - 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // j............... - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, // u_viewProj...... - 0xc7, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ........u_invVie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // wProj........... - 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_model..... - 0xc7, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // ........u_modelV - 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // iew............. - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. - 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, // ............u_al - 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, // phaRef4.G...w... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ........G....... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xf0, 0x06, 0x00, 0x00, // ........G....... - 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ....@...H....... - 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xc7, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........#....... - 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... - 0xc7, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xc7, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... - 0xc7, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xc7, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... - 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ - 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... - 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, // .... ... ....... - 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, // ........!....... - 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... - 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x3d, 0x0b, 0x00, 0x00, // ........!...=... - 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ....w....... ... - 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ - 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... - 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... - 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... - 0xf0, 0x06, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // ....e...j....... - 0xc7, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... - 0x65, 0x00, 0x00, 0x00, 0xf0, 0x06, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e.......e...e... - 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... - 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. - 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........G...... - 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... - 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, // =........@..w... - 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, // >....G...@..9... - 0x08, 0x00, 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, // ....ya.......G.. - 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, // ....=........... - 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, // ....>........... - 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....8...6....... - 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 5...........7... - 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, 0x00, // ................ - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // =.......dW...... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // =........N...... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // =.......I9...... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // =........9...... - 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, // P........*..dW.. - 0xa9, 0x4e, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, // .N..I9...9...... - 0xb0, 0x2a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, // .*..8...6....... - 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // ........=...7... - 0x9a, 0x02, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....O0..7....... - 0xa2, 0x25, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xee, 0x5f, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .%......._..;... - 0x8a, 0x02, 0x00, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ....,N......>... - 0x2c, 0x4e, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // ,N......9....... - 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....5...,N..=... - 0x1d, 0x00, 0x00, 0x00, 0x58, 0x5b, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ....X[..O0..>... - 0xa2, 0x25, 0x00, 0x00, 0x58, 0x5b, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // .%..X[......8... - 0x00, // . + 0x46, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x03, 0x02, // FSH....I........ + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x7a, 0x61, 0x00, 0x00, 0x00, 0x00, // #.........za.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, // ..w............. + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, // ................ + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, // ......5...vec4_s + 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, // plat(f1;........ + 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x40, 0x6d, // .._x..........@m + 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, // ain(vf4;vf4;.... + 0x05, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ..O0..v_color0.. + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa2, 0x25, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // .......%..gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, // gData_0_........ + 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, // ..bgfx_VoidFrag. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ......,N..param. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .......@..v_colo + 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, // r0........w...v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, // color0.......... + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......G..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ..........param. + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // ..........gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc7, 0x02, // gData_0_........ + 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, // ..$Global....... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, // ......u_viewRect + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc7, 0x02, // viewTexel....... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, // ......u_view.... + 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV + 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, // iew............. + 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, // ..u_proj........ + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, // ......u_invProj. + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xc7, 0x02, // viewProj........ + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, // ......u_invViewP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, // roj............. + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, // ..u_model....... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie + 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, // w.............u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, // modelViewProj... + 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, // ..........u_alph + 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, // aRef4.G...w..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, // ......G......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xf0, 0x06, 0x00, 0x00, 0x06, 0x00, // ......G......... + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x00, 0x00, // ..@...H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, // ..#.......H..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x03, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x03, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, // ..#...`...H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, // ..#.......H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x07, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x07, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, // ..#...`...H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, // ..#.......H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0b, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xc7, 0x02, // ..#... ...G..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, // .. ... ......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......!......... + 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x3d, 0x0b, 0x00, 0x00, 0x08, 0x00, // ......!...=..... + 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, // .......... ..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, // ..........;..... + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, // ..w....... ..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, // ..........;..... + 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // ..............e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... + 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xf0, 0x06, // ..j... ......... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xc7, 0x02, // ..e...j......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0xf0, 0x06, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......e...e..... + 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, // ..........Sa..;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......G......;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3e, 0x00, // .......@..w...>. + 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x08, 0x00, // ...G...@..9..... + 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x9a, 0x16, // ..ya.......G.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, // ..=............. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, // ..>............. + 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, // ..8...6.......5. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, // ..........7..... + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, 0x00, 0x3d, 0x00, // ..............=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, // ......dW......=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, // .......N......=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, // ......I9......=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, // .......9......P. + 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xa9, 0x4e, // .......*..dW...N + 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xb0, 0x2a, // ..I9...9.......* + 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xff, 0x0f, // ..8...6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, // ......=...7..... + 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa2, 0x25, // ..O0..7........% + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xee, 0x5f, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, // ......._..;..... + 0x00, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2c, 0x4e, // ..,N......>...,N + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, // ......9......... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..5...,N..=..... + 0x00, 0x00, 0x58, 0x5b, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa2, 0x25, // ..X[..O0..>....% + 0x00, 0x00, 0x58, 0x5b, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..X[......8.... }; -static const uint8_t fs_debugdraw_lines_dx9[129] = +static const uint8_t fs_debugdraw_lines_dx9[131] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x74, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..t..... - 0xfe, 0xff, 0x14, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... - 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ - 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro - 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 - 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // .1.............. - 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, // ................ - 0x00, // . + 0x46, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x03, // FSH....I..t..... + 0xff, 0xff, 0xfe, 0xff, 0x14, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, // ......CTAB....#. + 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ + 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......ps_3_0.Mic + 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler + 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // 10.1............ + 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; -static const uint8_t fs_debugdraw_lines_dx11[260] = +static const uint8_t fs_debugdraw_lines_dx11[262] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xf4, 0x00, 0x44, 0x58, 0x42, 0x43, // FSH....I....DXBC - 0xa6, 0x7f, 0x08, 0xe2, 0x95, 0xbd, 0x5f, 0xa3, 0x3f, 0x5b, 0x58, 0x8e, 0x54, 0x0f, 0x89, 0x67, // ......_.?[X.T..g - 0x01, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,... - 0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // ........ISGNL... - 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8....... - 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ - 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // D............... - 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT - 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // ION.COLOR...OSGN - 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET... - 0x53, 0x48, 0x44, 0x52, 0x38, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, // SHDR8...@....... - 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, // b...........e... - 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // . ......6.... .. - 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>... - 0x00, 0x00, 0x00, 0x00, // .... + 0x46, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x44, 0x58, // FSH....I......DX + 0x42, 0x43, 0xa6, 0x7f, 0x08, 0xe2, 0x95, 0xbd, 0x5f, 0xa3, 0x3f, 0x5b, 0x58, 0x8e, 0x54, 0x0f, // BC......_.?[X.T. + 0x89, 0x67, 0x01, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // .g............,. + 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, // ..........ISGNL. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........8..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ..D............. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, // ..........SV_POS + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x4f, 0x53, // ITION.COLOR...OS + 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET. + 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x38, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x0e, 0x00, // ..SHDR8...@..... + 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, // ..b...........e. + 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, // ... ......6.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, // ......F.......>. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ...... }; static const uint8_t fs_debugdraw_lines_mtl[404] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x85, 0x01, 0x00, 0x00, 0x75, 0x73, // FSH....I......us + 0x46, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x85, 0x01, 0x00, 0x00, 0x75, 0x73, // FSH....I......us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { diff --git a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines.sc b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines.sc index 19f8692..0b13177 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines.sc @@ -1,7 +1,7 @@ $input v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines_stipple.bin.h b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines_stipple.bin.h index 9d8ff47..335264b 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines_stipple.bin.h +++ b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines_stipple.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_debugdraw_lines_stipple_glsl[235] = { - 0x46, 0x53, 0x48, 0x04, 0xe7, 0x1a, 0x5a, 0xef, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH...Z.......va + 0x46, 0x53, 0x48, 0x05, 0xe7, 0x1a, 0x5a, 0xef, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH...Z.......va 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // v_color0;.varyi 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, // ng highp float v @@ -16,239 +16,240 @@ static const uint8_t fs_debugdraw_lines_stipple_glsl[235] = 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, // _FragColor = v_c 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // olor0;.}... }; -static const uint8_t fs_debugdraw_lines_stipple_spv[2773] = +static const uint8_t fs_debugdraw_lines_stipple_spv[2787] = { - 0x46, 0x53, 0x48, 0x04, 0xe7, 0x1a, 0x5a, 0xef, 0x00, 0x00, 0xc8, 0x0a, 0x03, 0x02, 0x23, 0x07, // FSH...Z.......#. - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0xf4, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........a...... - 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, // GLSL.std.450.... - 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, // ........main.... - 0x77, 0x0e, 0x00, 0x00, 0xf9, 0x15, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, // w............... - 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ - 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x13, 0x00, 0x00, // main........,... - 0x6d, 0x6f, 0x64, 0x28, 0x66, 0x31, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, // mod(f1;f1;...... - 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, 0x00, // ...._a.......... - 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, // _b......5...vec4 - 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, // _splat(f1;...... - 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xa6, 0x14, 0x00, 0x00, // ...._x.......... - 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x66, 0x31, 0x3b, 0x76, 0x66, 0x34, // @main(vf4;f1;vf4 - 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfb, 0x54, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, // ;........T..v_co - 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa4, 0x52, 0x00, 0x00, // lor0.........R.. - 0x76, 0x5f, 0x73, 0x74, 0x69, 0x70, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // v_stipple....... - 0xbf, 0x58, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // .X..gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, // 0_..........bgfx - 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // _VoidFrag....... - 0x97, 0x52, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .R..param....... - 0x07, 0x4c, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .L..param....... - 0x8b, 0x2c, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // .,..param....... - 0xcb, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // .A..v_color0.... - 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....w...v_color0 - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x76, 0x5f, 0x73, 0x74, // ........,?..v_st - 0x69, 0x70, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xf9, 0x15, 0x00, 0x00, // ipple........... - 0x76, 0x5f, 0x73, 0x74, 0x69, 0x70, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // v_stipple....... - 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // ....gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // 0_.......G..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m........U..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // m...........gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ragData_0_...... - 0x0b, 0x05, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, // ....$Global..... - 0x0b, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, // ........u_viewRe - 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ct.............. - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, // u_viewTexel..... - 0x0b, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, // ........u_view.. - 0x06, 0x00, 0x06, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in - 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, // vView........... - 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_proj...... - 0x0b, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, // ........u_invPro - 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // j............... - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, // u_viewProj...... - 0x0b, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ........u_invVie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, // wProj........... - 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_model..... - 0x0b, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // ........u_modelV - 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // iew............. - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. - 0x06, 0x00, 0x06, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, // ............u_al - 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, // phaRef4.G...w... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xf9, 0x15, 0x00, 0x00, // ........G....... - 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ........G....... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x2a, 0x07, 0x00, 0x00, // ........G...*... - 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, // ....@...H....... - 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x0b, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........#....... - 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, // ........H....... - 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, // ........H....... - 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... - 0x0b, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, // ........H....... - 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, // ........H....... - 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x0b, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, // ........H....... - 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, // ........H....... - 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... - 0x0b, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, // ........H....... - 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, // ........H....... - 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x0b, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, // ........H....... - 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... - 0x0b, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ - 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... - 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, // .... ... ....... - 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xd7, 0x0a, 0x00, 0x00, // ........!....... - 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // ................ - 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, // ............!... - 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, // ............!... - 0x51, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, // Q............... - 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....+........... - 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, // ....+........... - 0x00, 0x00, 0x00, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6e, 0x01, 0x00, 0x00, // ...>+.......n... - 0x00, 0x00, 0x80, 0x3e, 0x14, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ...>........ ... - 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ....w....... ... - 0x8b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x8b, 0x02, 0x00, 0x00, 0xf9, 0x15, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ - 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... - 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... - 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... - 0x2a, 0x07, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // *...e...j....... - 0x0b, 0x05, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... - 0x65, 0x00, 0x00, 0x00, 0x2a, 0x07, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...*...e...e... - 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... - 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. - 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........G...... - 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... - 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... - 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, // =........A..w... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xf9, 0x15, 0x00, 0x00, // =.......,?...... - 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....G...A..>... - 0xab, 0x55, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, // .U..,?..9....... - 0xbd, 0x26, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, // .&.......G...U.. - 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, // ....=........... - 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, // ....>........... - 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // ....8...6....... - 0x2c, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7, 0x0a, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // ,...........7... - 0x8a, 0x02, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........7....... - 0xc7, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x43, 0x5c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ........C...=... - 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....dW......=... - 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....N......=... - 0x0d, 0x00, 0x00, 0x00, 0x71, 0x3d, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....q=......=... - 0x0d, 0x00, 0x00, 0x00, 0x15, 0x4c, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, // .....L.......... - 0x0d, 0x00, 0x00, 0x00, 0xf6, 0x18, 0x00, 0x00, 0x71, 0x3d, 0x00, 0x00, 0x15, 0x4c, 0x00, 0x00, // ........q=...L.. - 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa1, 0x2b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .........+...... - 0x08, 0x00, 0x00, 0x00, 0xf6, 0x18, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ - 0x86, 0x40, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xa1, 0x2b, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, // .@...N...+...... - 0x0d, 0x00, 0x00, 0x00, 0xbf, 0x2c, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0x86, 0x40, 0x00, 0x00, // .....,..dW...@.. - 0xfe, 0x00, 0x02, 0x00, 0xbf, 0x2c, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, // .....,..8...6... - 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, // ....5........... - 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7............... - 0xc4, 0x25, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x94, 0x1f, 0x00, 0x00, // .%..=........... - 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1f, 0x48, 0x00, 0x00, // ....=........H.. - 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xbf, 0x32, 0x00, 0x00, // ....=........2.. - 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd2, 0x32, 0x00, 0x00, // ....=........2.. - 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xec, 0x21, 0x00, 0x00, // ....P........!.. - 0x94, 0x1f, 0x00, 0x00, 0x1f, 0x48, 0x00, 0x00, 0xbf, 0x32, 0x00, 0x00, 0xd2, 0x32, 0x00, 0x00, // .....H...2...2.. - 0xfe, 0x00, 0x02, 0x00, 0xec, 0x21, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, // .....!..8...6... - 0x08, 0x00, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, // ............Q... - 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xfb, 0x54, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7........T..7... - 0x8a, 0x02, 0x00, 0x00, 0xa4, 0x52, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // .....R..7....... - 0xbf, 0x58, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xf3, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .X.......a..;... - 0x8a, 0x02, 0x00, 0x00, 0x97, 0x52, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....R......;... - 0x8a, 0x02, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....L......;... - 0x8a, 0x02, 0x00, 0x00, 0x8b, 0x2c, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .....,......>... - 0x97, 0x52, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // .R......9....... - 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x97, 0x52, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....5....R..=... - 0x0d, 0x00, 0x00, 0x00, 0x69, 0x4f, 0x00, 0x00, 0xa4, 0x52, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ....iO...R..>... - 0x07, 0x4c, 0x00, 0x00, 0x69, 0x4f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x2c, 0x00, 0x00, // .L..iO..>....,.. - 0x6e, 0x01, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x22, 0x00, 0x00, // n...9.......!".. - 0x2c, 0x13, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x8b, 0x2c, 0x00, 0x00, 0xb8, 0x00, 0x05, 0x00, // ,....L...,...... - 0x09, 0x00, 0x00, 0x00, 0x6e, 0x1d, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x21, 0x22, 0x00, 0x00, // ....n.......!".. - 0xf7, 0x00, 0x03, 0x00, 0x09, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, // ................ - 0x6e, 0x1d, 0x00, 0x00, 0x2a, 0x4a, 0x00, 0x00, 0x09, 0x1d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // n...*J.......... - 0x2a, 0x4a, 0x00, 0x00, 0xfc, 0x00, 0x01, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x09, 0x1d, 0x00, 0x00, // *J.............. - 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x05, 0x3c, 0x00, 0x00, 0xfb, 0x54, 0x00, 0x00, // =........<...T.. - 0x3e, 0x00, 0x03, 0x00, 0xbf, 0x58, 0x00, 0x00, 0x05, 0x3c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >....X...<...... - 0x38, 0x00, 0x01, 0x00, 0x00, // 8.... + 0x46, 0x53, 0x48, 0x05, 0xe7, 0x1a, 0x5a, 0xef, 0x00, 0x00, 0xd4, 0x0a, 0x00, 0x00, 0x03, 0x02, // FSH...Z......... + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0xf4, 0x61, 0x00, 0x00, 0x00, 0x00, // #..........a.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0xf9, 0x15, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, // ..w............. + 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, // ................ + 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x13, 0x00, 0x00, 0x6d, 0x6f, // in........,...mo + 0x64, 0x28, 0x66, 0x31, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc6, 0x0e, // d(f1;f1;........ + 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x5f, 0x62, // .._a.........._b + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, // ......5...vec4_s + 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, // plat(f1;........ + 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x40, 0x6d, // .._x..........@m + 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x66, 0x31, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, // ain(vf4;f1;vf4;. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfb, 0x54, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .......T..v_colo + 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa4, 0x52, 0x00, 0x00, 0x76, 0x5f, // r0.........R..v_ + 0x73, 0x74, 0x69, 0x70, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xbf, 0x58, // stipple........X + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, // ..........bgfx_V + 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x52, // oidFrag........R + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x07, 0x4c, // ..param........L + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x8b, 0x2c, // ..param........, + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, // ..param........A + 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..v_color0...... + 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ..w...v_color0.. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x76, 0x5f, 0x73, 0x74, 0x69, 0x70, // ......,?..v_stip + 0x70, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xf9, 0x15, 0x00, 0x00, 0x76, 0x5f, // ple...........v_ + 0x73, 0x74, 0x69, 0x70, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, // stipple......... + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......G..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......U..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ..........param. + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // ..........gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0b, 0x05, // gData_0_........ + 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x0b, 0x05, // ..$Global....... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, // ......u_viewRect + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x0b, 0x05, // viewTexel....... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, // ......u_view.... + 0x06, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV + 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x04, 0x00, // iew............. + 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x0b, 0x05, // ..u_proj........ + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, // ......u_invProj. + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x0b, 0x05, // viewProj........ + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, // ......u_invViewP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x08, 0x00, // roj............. + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x0b, 0x05, // ..u_model....... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie + 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, // w.............u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, // modelViewProj... + 0x06, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, // ..........u_alph + 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, // aRef4.G...w..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xf9, 0x15, 0x00, 0x00, 0x1e, 0x00, // ......G......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, // ......G......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x2a, 0x07, 0x00, 0x00, 0x06, 0x00, // ......G...*..... + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x00, 0x00, // ..@...H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, // ..#.......H..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x03, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x03, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, // ..#...`...H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, // ..#.......H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x07, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x07, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, // ..#...`...H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, // ..#.......H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0b, 0x05, 0x00, 0x00, 0x0b, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x0b, 0x05, // ..#... ...G..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, // .. ... ......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xd7, 0x0a, 0x00, 0x00, 0x0d, 0x00, // ......!......... + 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, // ................ + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, // ..........!..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x51, 0x00, // ..........!...Q. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6e, 0x01, 0x00, 0x00, 0x00, 0x00, // .>+.......n..... + 0x80, 0x3e, 0x14, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, // .>........ ..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, // ..........;..... + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, // ..w....... ..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8b, 0x02, // ..........;..... + 0x00, 0x00, 0xf9, 0x15, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, // .......... ..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, // ..........;..... + 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // ..............e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... + 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x2a, 0x07, // ..j... .......*. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x0b, 0x05, // ..e...j......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x2a, 0x07, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ..*...e...e..... + 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, // ..........Sa..;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......G......;. + 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......U......;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, // .......A..w...=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xf9, 0x15, 0x00, 0x00, 0x3e, 0x00, // ......,?......>. + 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, // ...G...A..>....U + 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, // ..,?..9........& + 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, // .......G...U.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, // ..=............. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, // ..>............. + 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2c, 0x13, // ..8...6.......,. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7, 0x0a, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, // ..........7..... + 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xc7, 0x0e, // ......7......... + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x43, 0x5c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ......C...=..... + 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..dW......=..... + 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ...N......=..... + 0x00, 0x00, 0x71, 0x3d, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..q=......=..... + 0x00, 0x00, 0x15, 0x4c, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, 0x0d, 0x00, // ...L............ + 0x00, 0x00, 0xf6, 0x18, 0x00, 0x00, 0x71, 0x3d, 0x00, 0x00, 0x15, 0x4c, 0x00, 0x00, 0x0c, 0x00, // ......q=...L.... + 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa1, 0x2b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, // .......+........ + 0x00, 0x00, 0xf6, 0x18, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x86, 0x40, // ...............@ + 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xa1, 0x2b, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, // ...N...+........ + 0x00, 0x00, 0xbf, 0x2c, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0x86, 0x40, 0x00, 0x00, 0xfe, 0x00, // ...,..dW...@.... + 0x02, 0x00, 0xbf, 0x2c, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ...,..8...6..... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, // ..5...........7. + 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xc4, 0x25, // ...............% + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x94, 0x1f, 0x00, 0x00, 0xdd, 0x0e, // ..=............. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1f, 0x48, 0x00, 0x00, 0xdd, 0x0e, // ..=........H.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xbf, 0x32, 0x00, 0x00, 0xdd, 0x0e, // ..=........2.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd2, 0x32, 0x00, 0x00, 0xdd, 0x0e, // ..=........2.... + 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xec, 0x21, 0x00, 0x00, 0x94, 0x1f, // ..P........!.... + 0x00, 0x00, 0x1f, 0x48, 0x00, 0x00, 0xbf, 0x32, 0x00, 0x00, 0xd2, 0x32, 0x00, 0x00, 0xfe, 0x00, // ...H...2...2.... + 0x02, 0x00, 0xec, 0x21, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, // ...!..8...6..... + 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x37, 0x00, // ..........Q...7. + 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xfb, 0x54, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, // .......T..7..... + 0x00, 0x00, 0xa4, 0x52, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbf, 0x58, // ...R..7........X + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xf3, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, // .......a..;..... + 0x00, 0x00, 0x97, 0x52, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, // ...R......;..... + 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, // ...L......;..... + 0x00, 0x00, 0x8b, 0x2c, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x52, // ...,......>....R + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, // ......9......... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x97, 0x52, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..5....R..=..... + 0x00, 0x00, 0x69, 0x4f, 0x00, 0x00, 0xa4, 0x52, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x07, 0x4c, // ..iO...R..>....L + 0x00, 0x00, 0x69, 0x4f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x2c, 0x00, 0x00, 0x6e, 0x01, // ..iO..>....,..n. + 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x22, 0x00, 0x00, 0x2c, 0x13, // ..9.......!"..,. + 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x8b, 0x2c, 0x00, 0x00, 0xb8, 0x00, 0x05, 0x00, 0x09, 0x00, // ...L...,........ + 0x00, 0x00, 0x6e, 0x1d, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x21, 0x22, 0x00, 0x00, 0xf7, 0x00, // ..n.......!".... + 0x03, 0x00, 0x09, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x6e, 0x1d, // ..............n. + 0x00, 0x00, 0x2a, 0x4a, 0x00, 0x00, 0x09, 0x1d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2a, 0x4a, // ..*J..........*J + 0x00, 0x00, 0xfc, 0x00, 0x01, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x09, 0x1d, 0x00, 0x00, 0x3d, 0x00, // ..............=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x05, 0x3c, 0x00, 0x00, 0xfb, 0x54, 0x00, 0x00, 0x3e, 0x00, // .......<...T..>. + 0x03, 0x00, 0xbf, 0x58, 0x00, 0x00, 0x05, 0x3c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, // ...X...<......8. + 0x01, 0x00, 0x00, // ... }; -static const uint8_t fs_debugdraw_lines_stipple_dx9[297] = +static const uint8_t fs_debugdraw_lines_stipple_dx9[299] = { - 0x46, 0x53, 0x48, 0x04, 0xe7, 0x1a, 0x5a, 0xef, 0x00, 0x00, 0x1c, 0x01, 0x00, 0x03, 0xff, 0xff, // FSH...Z......... - 0xfe, 0xff, 0x14, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... - 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ - 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro - 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 - 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, // .1..Q..........@ - 0x00, 0x00, 0x80, 0x3e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, // ...>...>....Q... - 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // ................ - 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x01, 0x90, 0x05, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x13, 0x00, 0x00, 0x02, // ................ - 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, // ................ - 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, // ..U............. - 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa1, 0x01, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x03, // ......U......... - 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x58, 0x00, 0x00, 0x04, // ............X... - 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x55, 0xa0, // ..............U. - 0x41, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, // A............... - 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... + 0x46, 0x53, 0x48, 0x05, 0xe7, 0x1a, 0x5a, 0xef, 0x00, 0x00, 0x1c, 0x01, 0x00, 0x00, 0x00, 0x03, // FSH...Z......... + 0xff, 0xff, 0xfe, 0xff, 0x14, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, // ......CTAB....#. + 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ + 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......ps_3_0.Mic + 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler + 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, // 10.1..Q......... + 0x80, 0x40, 0x00, 0x00, 0x80, 0x3e, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, // .@...>...>....Q. + 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x01, 0x90, 0x05, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x13, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x01, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ....U........... + 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa1, 0x01, 0x00, 0x00, 0x90, 0x02, 0x00, // ........U....... + 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x58, 0x00, // ..............X. + 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, // ................ + 0x55, 0xa0, 0x41, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, // U.A............. + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ........... }; -static const uint8_t fs_debugdraw_lines_stipple_dx11[440] = +static const uint8_t fs_debugdraw_lines_stipple_dx11[442] = { - 0x46, 0x53, 0x48, 0x04, 0xe7, 0x1a, 0x5a, 0xef, 0x00, 0x00, 0xa8, 0x01, 0x44, 0x58, 0x42, 0x43, // FSH...Z.....DXBC - 0x6f, 0x8f, 0x64, 0x39, 0xd9, 0xef, 0xc7, 0x09, 0x59, 0xdc, 0x77, 0x5a, 0xe8, 0x91, 0x4c, 0x16, // o.d9....Y.wZ..L. - 0x01, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,... - 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl... - 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........P....... - 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ - 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ - 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........b....... - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, // ................ - 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, // SV_POSITION.COLO - 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, // R.TEXCOORD..OSGN - 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET... - 0x53, 0x48, 0x44, 0x52, 0xcc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, // SHDR....@...3... - 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, // b...........b... - 0x12, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // ........e.... .. - 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, // ....h.......8... - 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x41, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, // .@.....@A....... - 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, // ............2... - 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, // ............A... - 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3e, 0x0a, 0x10, 0x10, 0x00, // .....@.....>.... - 0x02, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....1........... - 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // .@.....>........ - 0x0d, 0x00, 0x04, 0x03, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // ............6... - 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // . ......F....... - 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // >....... + 0x46, 0x53, 0x48, 0x05, 0xe7, 0x1a, 0x5a, 0xef, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x44, 0x58, // FSH...Z.......DX + 0x42, 0x43, 0x6f, 0x8f, 0x64, 0x39, 0xd9, 0xef, 0xc7, 0x09, 0x59, 0xdc, 0x77, 0x5a, 0xe8, 0x91, // BCo.d9....Y.wZ.. + 0x4c, 0x16, 0x01, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // L.............,. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, // ..........ISGNl. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........P..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........b..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x01, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO + 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, // LOR.TEXCOORD..OS + 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET. + 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xcc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x33, 0x00, // ..SHDR....@...3. + 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, // ..b...........b. + 0x00, 0x03, 0x12, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, // ..........e.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, // ......h.......8. + 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x10, 0x10, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x41, 0x00, 0x00, 0x05, 0x12, 0x00, // ...@.....@A..... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, // ..............2. + 0x00, 0x0a, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x80, 0x41, 0x00, // ..............A. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3e, 0x0a, 0x10, // .......@.....>.. + 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, // ......1......... + 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, // ...@.....>...... + 0x00, 0x00, 0x0d, 0x00, 0x04, 0x03, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, // ..............6. + 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, // ... ......F..... + 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ..>....... }; static const uint8_t fs_debugdraw_lines_stipple_mtl[555] = { - 0x46, 0x53, 0x48, 0x04, 0xe7, 0x1a, 0x5a, 0xef, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...Z.......us + 0x46, 0x53, 0x48, 0x05, 0xe7, 0x1a, 0x5a, 0xef, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...Z.......us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { diff --git a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines_stipple.sc b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines_stipple.sc index 29a2e7a..96e4b22 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines_stipple.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/fs_debugdraw_lines_stipple.sc @@ -1,7 +1,7 @@ $input v_color0, v_stipple /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/debugdraw/makefile b/3rdparty/bgfx/examples/common/debugdraw/makefile index 27e6c6b..72fbea9 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/makefile +++ b/3rdparty/bgfx/examples/common/debugdraw/makefile @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.bin.h b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.bin.h index d816a1c..4901f7d 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.bin.h +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_debugdraw_fill_glsl[329] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, // wProj.......u_mo 0x64, 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0x1b, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, // del. .. .....att 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // ribute highp vec @@ -22,256 +22,252 @@ static const uint8_t vs_debugdraw_fill_glsl[329] = 0x65, 0x73, 0x2e, 0x78, 0x29, 0x5d, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // es.x)] * tmpvar_ 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 1));.}... }; -static const uint8_t vs_debugdraw_fill_spv[2636] = +static const uint8_t vs_debugdraw_fill_spv[2546] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // el. .. ..u_viewP - 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x20, 0x0a, 0x03, 0x02, 0x23, 0x07, 0x00, // roj...... ...#.. - 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x9a, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, // ........a....... - 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, // ...............G - 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, // LSL.std.450..... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x48, // .......main....H - 0x0c, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, // ................ - 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, // .......main..... - 0x00, 0x04, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, // .......Output... - 0x00, 0x06, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // ...........gl_Po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x05, 0x00, 0x06, 0x00, 0xbd, 0x10, 0x00, 0x00, 0x40, // sition.........@ - 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x69, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, // main(vi4;vf3;... - 0x00, 0x05, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, // ...O0..a_indices - 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa2, 0x25, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, // ........%..a_pos - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xff, 0x10, 0x00, 0x00, 0x6d, // ition..........m - 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x24, // odel...........$ - 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x00, // Global.......... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, // ...u_viewRect... - 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie - 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, // wTexel.......... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, // ...u_view....... - 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, // .......u_invView - 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, // ...............u - 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x05, // _proj........... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, // ...u_invProj.... - 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x07, // wProj........... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ...u_invViewProj - 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, // ...............u - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x09, // _model.......... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, // ...u_modelView.. - 0x00, 0x07, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // ...........u_mod - 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, // elViewProj...... - 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, // .......u_alphaRe - 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, // f4.....B........ - 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, // ......._varying_ - 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, // ........A..a_ind - 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x61, // ices.......H...a - 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, // _indices......., - 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, // ?..a_position... - 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // .......a_positio - 0x6e, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, // n..........@entr - 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, // yPointOutput_gl_ - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, // Position........ - 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, // G..param........ - 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xcf, // ...param........ - 0x03, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, // ...Output....... - 0x0f, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, // ...@entryPointOu - 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x06, // tput...G........ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x00, // ...@...H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, // ...#.......H.... - 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // .......#.......H - 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, // ...........#... - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x03, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x03, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, // ...#...`...H.... - 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, // ...........#.... - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x05, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x05, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, // ...#.......H.... - 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, // ...........#... - 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x07, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x07, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, // ...#...`...H.... - 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, // ...........#.... - 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x09, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x09, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, // ...#.......H.... - 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, // ...........#.... - 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0b, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x97, // ...#... ...G.... - 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, // .......G...B..." - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x1e, // .......G...H.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, // .......G........ - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, // .......G........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, // .......G........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, // ...............! - 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, // ................ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1a, // ... ............ - 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, // ........... .... - 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, // ................ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, // ... ............ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, // ....... ........ - 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, // ................ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x1d, // ................ - 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x3f, 0x07, 0x00, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x97, // ...!...?........ - 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, // ....... ........ - 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, // .......+........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, // ......?....e.... - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, // ............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, // .......+.......j - 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x65, // ... ...........e - 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x1d, // ...j............ - 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // .......e...e...e - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xc3, // ...e...e...e.... - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, // ...e...e....... - 0x00, 0x04, 0x00, 0x51, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x3b, // ...Q...........; - 0x00, 0x04, 0x00, 0x51, 0x02, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, // ...Q...B.......+ - 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x2b, // .......#.......+ - 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, // ............... - 0x00, 0x04, 0x00, 0x89, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, // ............... - 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, // ...........e... - 0x00, 0x04, 0x00, 0x76, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x2b, // ...v...........+ - 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, // ...............+ - 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, // ............... - 0x00, 0x04, 0x00, 0x98, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x3b, // ...............; - 0x00, 0x04, 0x00, 0x98, 0x02, 0x00, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, // .......H....... - 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, // ...............; - 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, // ............... - 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, // ...............; - 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1e, // ................ - 0x00, 0x02, 0x00, 0xcf, 0x03, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4c, 0x06, 0x00, 0x00, 0x03, // ....... ...L.... - 0x00, 0x00, 0x00, 0xcf, 0x03, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4c, 0x06, 0x00, 0x00, 0xcd, // .......;...L.... - 0x0f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, // .......6........ - 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, // ...............S - 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x07, // a..;........G... - 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, // ...;............ - 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x48, // ...=........A..H - 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, // ...=.......,?... - 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, // ...>....G...A..> - 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0xf9, // .......,?..9.... - 0x03, 0x00, 0x00, 0x39, 0x19, 0x00, 0x00, 0xbd, 0x10, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x9a, // ...9........G... - 0x16, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf8, 0x21, 0x00, 0x00, 0x39, // ...Q........!..9 - 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xf8, // .......>........ - 0x21, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0xf9, // !......8...6.... - 0x03, 0x00, 0x00, 0xbd, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x07, 0x00, 0x00, 0x37, // ...........?...7 - 0x00, 0x03, 0x00, 0x97, 0x02, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, // .......O0..7.... - 0x02, 0x00, 0x00, 0xa2, 0x25, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xdb, 0x5f, 0x00, 0x00, 0x3b, // ....%......._..; - 0x00, 0x04, 0x00, 0x76, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, // ...v...........= - 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd1, 0x46, 0x00, 0x00, 0xa2, 0x25, 0x00, 0x00, 0x51, // ........F...%..Q - 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2c, 0x46, 0x00, 0x00, 0xd1, 0x46, 0x00, 0x00, 0x00, // .......,F...F... - 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd3, 0x4f, 0x00, 0x00, 0xd1, // ...Q........O... - 0x46, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, // F......Q........ - 0x5b, 0x00, 0x00, 0xd1, 0x46, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, // [...F......P.... - 0x00, 0x00, 0x00, 0x4c, 0x3b, 0x00, 0x00, 0x2c, 0x46, 0x00, 0x00, 0xd3, 0x4f, 0x00, 0x00, 0xf3, // ...L;..,F...O... - 0x5b, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x89, 0x02, 0x00, 0x00, 0x5a, // [......A.......Z - 0x60, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0c, // `..O0......=.... - 0x00, 0x00, 0x00, 0x99, 0x61, 0x00, 0x00, 0x5a, 0x60, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0xe2, // ....a..Z`..A.... - 0x02, 0x00, 0x00, 0xa2, 0x48, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x23, 0x0a, 0x00, 0x00, 0x99, // ....H..B...#.... - 0x61, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xb5, 0x2f, 0x00, 0x00, 0xa2, // a..=...e..../... - 0x48, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xff, 0x10, 0x00, 0x00, 0x4c, // H..............L - 0x3b, 0x00, 0x00, 0xb5, 0x2f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0xc4, // ;.../..A........ - 0x2e, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, // ...B.......=...e - 0x00, 0x00, 0x00, 0xcc, 0x5e, 0x00, 0x00, 0xc4, 0x2e, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, // ....^........... - 0x00, 0x00, 0x00, 0x67, 0x44, 0x00, 0x00, 0xff, 0x10, 0x00, 0x00, 0xcc, 0x5e, 0x00, 0x00, 0x41, // ...gD.......^..A - 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xee, 0x27, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, // ........'....... - 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xee, 0x27, 0x00, 0x00, 0x67, 0x44, 0x00, 0x00, 0x3d, // ...>....'..gD..= - 0x00, 0x04, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x5e, 0x5b, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, // .......^[....... - 0x00, 0x02, 0x00, 0x5e, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ...^[..8.... + 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0xc4, 0x09, 0x00, 0x00, 0x03, 0x02, 0x23, // roj............# + 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x9a, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........a..... + 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... + 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x48, 0x0c, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x03, 0x00, 0x03, // .H.............. + 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf9, 0x03, 0x00, // .main........... + 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xf9, 0x03, 0x00, // .Output......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // .....gl_Position + 0x00, 0x05, 0x00, 0x06, 0x00, 0xbd, 0x10, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, // .........@main(v + 0x69, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x4f, 0x30, 0x00, // i4;vf3;......O0. + 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .a_indices...... + 0x00, 0xa2, 0x25, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // ..%..a_position. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xff, 0x10, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x00, // .........model.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, // .........$Global + 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, // iewRect......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, // .....u_viewTexel + 0x00, 0x06, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, // iew............. + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // .u_invView...... + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, // .........u_proj. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, // nvProj.......... + 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // .....u_viewProj. + 0x00, 0x06, 0x00, 0x07, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // nvViewProj...... + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .............u_m + 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x97, 0x0b, 0x00, // odelView........ + 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, // Proj............ + 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, // .u_alphaRef4.... + 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, // .B.............. + 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // ._varying_...... + 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, // ..A..a_indices.. + 0x00, 0x05, 0x00, 0x05, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, // .....H...a_indic + 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, // es.......,?..a_p + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, // osition......... + 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x0a, // .a_position..... + 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, // .....@entryPoint + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, // Output.gl_Positi + 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, // on........G..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, // am...........par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, // am...G.......... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, // .@...H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, // .#.......H...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, // .#...`...H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, // .#.......H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, // .#...`...H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, // .#.......H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x97, 0x0b, 0x00, // .#... ...G...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, // .....G...B...".. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x1e, 0x00, 0x00, // .....G...H...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, // .....G.......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....G.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, // .............!.. + 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, // . .............. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // . .............. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x05, 0x00, 0x3f, 0x07, 0x00, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x97, 0x02, 0x00, // .!...?.......... + 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // ....?....e...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .....+.......j.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // . ...........e.. + 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x1d, 0x00, 0x00, // .j.............. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .....e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, // .e...e...e...... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .e...e....... .. + 0x00, 0x51, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x3b, 0x00, 0x04, // .Q...........;.. + 0x00, 0x51, 0x02, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .Q...B.......+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .....#.......+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x89, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .........e... .. + 0x00, 0x76, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x2b, 0x00, 0x04, // .v...........+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x98, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x98, 0x02, 0x00, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .....H....... .. + 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, // .............6.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, // .....Sa..;...... + 0x00, 0xef, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, // ..G......;...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, // .........=...... + 0x00, 0xcb, 0x41, 0x00, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // ..A..H...=...... + 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, // .,?......>....G. + 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, // ..A..>.......,?. + 0x00, 0x39, 0x00, 0x06, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x39, 0x19, 0x00, 0x00, 0xbd, 0x10, 0x00, // .9.......9...... + 0x00, 0xef, 0x47, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // ..G......Q...... + 0x00, 0xf8, 0x21, 0x00, 0x00, 0x39, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, // ..!..9.......>.. + 0x00, 0x95, 0x15, 0x00, 0x00, 0xf8, 0x21, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, // ......!......8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0xf9, 0x03, 0x00, 0x00, 0xbd, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x3f, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x97, 0x02, 0x00, 0x00, 0x4f, 0x30, 0x00, // .?...7.......O0. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xa2, 0x25, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7........%..... + 0x00, 0xdb, 0x5f, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x76, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, // .._..;...v...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd1, 0x46, 0x00, // .....=........F. + 0x00, 0xa2, 0x25, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2c, 0x46, 0x00, // ..%..Q.......,F. + 0x00, 0xd1, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ..F......Q...... + 0x00, 0xd3, 0x4f, 0x00, 0x00, 0xd1, 0x46, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, // ..O...F......Q.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x5b, 0x00, 0x00, 0xd1, 0x46, 0x00, 0x00, 0x02, 0x00, 0x00, // ......[...F..... + 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x4c, 0x3b, 0x00, 0x00, 0x2c, 0x46, 0x00, // .P.......L;..,F. + 0x00, 0xd3, 0x4f, 0x00, 0x00, 0xf3, 0x5b, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, // ..O...[......A.. + 0x00, 0x89, 0x02, 0x00, 0x00, 0x5a, 0x60, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x0a, 0x0a, 0x00, // .....Z`..O0..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x99, 0x61, 0x00, 0x00, 0x5a, 0x60, 0x00, // .=........a..Z`. + 0x00, 0x41, 0x00, 0x06, 0x00, 0xe2, 0x02, 0x00, 0x00, 0xa2, 0x48, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........H..B.. + 0x00, 0x23, 0x0a, 0x00, 0x00, 0x99, 0x61, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, // .#....a..=...e.. + 0x00, 0xb5, 0x2f, 0x00, 0x00, 0xa2, 0x48, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // ../...H......... + 0x00, 0xff, 0x10, 0x00, 0x00, 0x4c, 0x3b, 0x00, 0x00, 0xb5, 0x2f, 0x00, 0x00, 0x41, 0x00, 0x05, // .....L;.../..A.. + 0x00, 0xe2, 0x02, 0x00, 0x00, 0xc4, 0x2e, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x1d, 0x0a, 0x00, // .........B...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xcc, 0x5e, 0x00, 0x00, 0xc4, 0x2e, 0x00, // .=...e....^..... + 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x67, 0x44, 0x00, 0x00, 0xff, 0x10, 0x00, // .........gD..... + 0x00, 0xcc, 0x5e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xee, 0x27, 0x00, // ..^..A........'. + 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xee, 0x27, 0x00, // .........>....'. + 0x00, 0x67, 0x44, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x5e, 0x5b, 0x00, // .gD..=.......^[. + 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x5e, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, // .........^[..8.. + 0x00, 0x00, // .. }; -static const uint8_t vs_debugdraw_fill_dx9[480] = +static const uint8_t vs_debugdraw_fill_dx9[482] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x80, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // el. .....u_viewP - 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x80, 0x00, 0x04, 0x00, 0xb4, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, // roj............. - 0xff, 0x2b, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, // .+.CTAB......... - 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x78, // ...............x - 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x4c, // ...D...........L - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x04, // ................ - 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // ...h.......u_mod - 0x65, 0x6c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // el......... .... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, // ...u_viewProj... - 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, // ...............v - 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, // s_3_0.Microsoft - 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, // (R) HLSL Shader - 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, // Compiler 10.1..Q - 0x00, 0x00, 0x05, 0x84, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x80, 0x00, // ................ - 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................ - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x01, 0x80, 0x84, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x2e, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x01, 0xb0, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x01, // ................ - 0x00, 0x55, 0x90, 0x01, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x05, 0x00, // .U.. ........... - 0x00, 0x0f, 0x80, 0x00, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x90, 0x00, // .... ........... - 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x20, 0xe4, 0xa0, 0x00, // ............ ... - 0x00, 0x00, 0xb0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x04, 0x00, // ................ - 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x05, // ........ ....... - 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x81, 0x00, 0xe4, 0xa0, 0x04, // .........U...... - 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x80, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x01, // ................ - 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x82, 0x00, 0xe4, 0xa0, 0x00, // ................ - 0x00, 0xaa, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0xe0, 0x83, // ................ - 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ................ + 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x80, 0x00, 0x04, 0x00, 0xb4, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, // roj............. + 0xff, 0xfe, 0xff, 0x2b, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, // ...+.CTAB....... + 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ + 0x00, 0x78, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // .x...D.......... + 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, // .L.............. + 0x00, 0x04, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .....h.......u_m + 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, // odel......... .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // .....u_viewProj. + 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, // .vs_3_0.Microsof + 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, // t (R) HLSL Shade + 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, // r Compiler 10.1. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x84, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, // .Q..........@... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, // ................ + 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x84, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x2e, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // ................ + 0x80, 0x01, 0x00, 0x55, 0x90, 0x01, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, // ...U.. ......... + 0x05, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, // ...... ......... + 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x20, 0xe4, // .............. . + 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, // .......... ..... + 0xb0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x81, 0x00, 0xe4, // ...........U.... + 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x80, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, // ................ + 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x82, 0x00, 0xe4, // ................ + 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // ................ + 0xe0, 0x83, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, // ................ + 0x00, 0x00, // .. }; -static const uint8_t vs_debugdraw_fill_dx11[675] = +static const uint8_t vs_debugdraw_fill_dx11[677] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, // wProj.......u_mo - 0x64, 0x65, 0x6c, 0x04, 0x20, 0x40, 0x00, 0x80, 0x00, 0x70, 0x02, 0x44, 0x58, 0x42, 0x43, 0x21, // del. @...p.DXBC! - 0x99, 0xbc, 0x62, 0x67, 0xb7, 0x95, 0xd6, 0x90, 0x9d, 0x96, 0xc0, 0x0e, 0x98, 0x00, 0xf9, 0x01, // ..bg............ - 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, // ...p.......,.... - 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, // .......ISGNP.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......8........ - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x45, // ...............E - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ................ - 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x42, 0x4c, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x44, 0x49, // .......BLENDINDI - 0x43, 0x45, 0x53, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0x4f, // CES.POSITION...O - 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI - 0x4f, 0x4e, 0x00, 0x53, 0x48, 0x44, 0x52, 0xb0, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x6c, // ON.SHDR....@...l - 0x00, 0x00, 0x00, 0x59, 0x08, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, // ...Y...F. ...... - 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x12, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, // ..._..........._ - 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, // ...r.......g.... - 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, // ..........h.... - 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // ...)............ - 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x38, // ........@......8 - 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, // ...........V.... - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a, // ...F. .......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x01, // .......2........ - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0a, // ...F. .......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...............F - 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x01, // .......2........ - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0a, // ...F. .......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...............F - 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, // ...F.......F. .. - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, // ...............8 - 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, // ...........V.... - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, // ...F. .........2 - 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...........F. .. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...............F - 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, // .......2........ - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, // ...F. .......... - 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, // .......F.......2 - 0x00, 0x00, 0x0a, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. .. - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...............F - 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x0e, 0x00, 0x01, // .......>........ - 0x00, 0x40, 0x08, // .@. + 0x64, 0x65, 0x6c, 0x04, 0x20, 0x40, 0x00, 0x80, 0x00, 0x70, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, // del. @...p...DXB + 0x43, 0x21, 0x99, 0xbc, 0x62, 0x67, 0xb7, 0x95, 0xd6, 0x90, 0x9d, 0x96, 0xc0, 0x0e, 0x98, 0x00, // C!..bg.......... + 0xf9, 0x01, 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .....p.......,.. + 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, // .........ISGNP.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........8...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, // ................ + 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .E.............. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x42, 0x4c, 0x45, 0x4e, 0x44, 0x49, 0x4e, // .........BLENDIN + 0x44, 0x49, 0x43, 0x45, 0x53, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, // DICES.POSITION.. + 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .OSGN,.......... + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // . .............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, // .........SV_POSI + 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x53, 0x48, 0x44, 0x52, 0xb0, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, // TION.SHDR....@.. + 0x00, 0x6c, 0x00, 0x00, 0x00, 0x59, 0x08, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .l...Y...F. .... + 0x00, 0x84, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x12, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, // ....._.......... + 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, // ._...r.......g.. + 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, // .. ..........h.. + 0x02, 0x02, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .....).......... + 0x00, 0x0a, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, // ..........@..... + 0x00, 0x38, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, // .8...........V.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, // .....F. ........ + 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, // .........2...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .....F. ........ + 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, // .F.......2...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, // .....F. ........ + 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, // .F.............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .....F.......F. + 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, // .8...........V.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .....F. ........ + 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .2...........F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, // .F.......2...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // .....F. ........ + 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, // .........F...... + 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .2.... ......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x0e, // .F.......>...... + 0x00, 0x01, 0x00, 0x40, 0x08, // ...@. }; static const uint8_t vs_debugdraw_fill_mtl[685] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, // wProj.......u_mo 0x64, 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0x7f, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, // del. .. .....usi 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, // ng namespace met diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.sc b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.sc index 7cd02be..afb034c 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill.sc @@ -1,7 +1,7 @@ $input a_position, a_indices /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h index c925652..731eadd 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_debugdraw_fill_lit_glsl[532] = { - 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie + 0x56, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie 0x77, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // w.......u_viewPr 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // oj.......u_model 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0xd9, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, // . .. .....attrib @@ -35,323 +35,321 @@ static const uint8_t vs_debugdraw_fill_lit_glsl[532] = 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, // = tmpvar_2.xyz;. 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t vs_debugdraw_fill_lit_spv[3281] = +static const uint8_t vs_debugdraw_fill_lit_spv[3247] = { - 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...V_...u_mod + 0x56, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...V_...u_mod 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // el. .. ..u_viewP 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // roj.......u_view - 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x98, 0x0c, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, // ..........#..... - 0x01, 0x00, 0x08, 0x00, 0x9a, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, // .....a.......... - 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, // ............GLSL - 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, // .std.450........ - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x48, 0x0c, 0x00, 0x00, // ....main....H... - 0xa6, 0x14, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ - 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....main........ - 0x69, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // i...Output...... - 0x69, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // i.......gl_Posit - 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x05, 0x00, 0x69, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ion.....i....... - 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x69, 0x04, 0x00, 0x00, // v_view......i... - 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x05, 0x00, 0x06, 0x00, // ....v_world..... - 0xbd, 0x10, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x69, 0x34, 0x3b, 0x76, 0x66, // ....@main(vi4;vf - 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, // 3;......O0..a_in - 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa2, 0x25, 0x00, 0x00, // dices........%.. - 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_position...... - 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, // ...._varying_... - 0x05, 0x00, 0x04, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x00, 0x00, // ....<...world... - 0x05, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ....^...$Global. - 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....^.......u_vi - 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, // ewRect......^... - 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. - 0x06, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....^.......u_vi - 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew......^....... - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... - 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ^.......u_proj.. - 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ....^.......u_in - 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, // vProj.......^... - 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. - 0x06, 0x00, 0x07, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ....^.......u_in - 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... - 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // ^.......u_model. - 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ....^.......u_mo - 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x5e, 0x05, 0x00, 0x00, // delView.....^... - 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP - 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj.....^....... - 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, // u_alphaRef4..... - 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, 0x00, 0x00, // B............A.. - 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_indices....... - 0x48, 0x0c, 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, // H...a_indices... - 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // ....,?..a_positi - 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // on..........a_po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, // sition.......... - 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, // flattenTemp..... - 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .U..param....... - 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, // ....param....... - 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // ....@entryPointO - 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // utput_gl_Positio - 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, // n...........Outp - 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x1f, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ut.............. - 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x1f, 0x04, 0x00, 0x00, // v_view.......... - 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x05, 0x00, 0x07, 0x00, // ....v_world..... - 0xcd, 0x0f, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // ....@entryPointO - 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, // utput...G....... - 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ....@...H...^... - 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x5e, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^.......#....... - 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... - 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... - 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H...^....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... - 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... - 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... - 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... - 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... - 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... - 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H...^....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... - 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... - 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... - 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... - 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... - 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H...^....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... - 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... - 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... - 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... - 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... - 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... - 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H...^....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... - 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... - 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... - 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... - 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... - 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H...^....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... - 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... - 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ^.......G...B... - 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x48, 0x0c, 0x00, 0x00, // ".......G...H... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, // ........G....... - 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, // ........G....... - 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, // ........G....... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ - 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // !............... - 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // .... ........... - 0x1a, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x97, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // .... ........... - 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // ........ ....... - 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x69, 0x04, 0x00, 0x00, // ............i... - 0x1d, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, // ............!... - 0x1f, 0x08, 0x00, 0x00, 0x69, 0x04, 0x00, 0x00, 0x97, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, // ....i........... - 0x20, 0x00, 0x04, 0x00, 0xe6, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x69, 0x04, 0x00, 0x00, // ...........i... - 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // +............... - 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... - 0x2c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ,.......,....... - 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... - 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... - 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........+....... - 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, // .......?....e... - 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // ................ - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // .......+....... - 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, // j... ........... - 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x5e, 0x05, 0x00, 0x00, // e...j.......^... - 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ........e...e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... - 0xab, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....e...e....... - 0x20, 0x00, 0x04, 0x00, 0xdb, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5e, 0x05, 0x00, 0x00, // ...........^... - 0x3b, 0x00, 0x04, 0x00, 0xdb, 0x07, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ;.......B....... - 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // +.......#....... - 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... - 0x20, 0x00, 0x04, 0x00, 0x89, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, // ............... - 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ...........e... - 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... - 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // +............... - 0x20, 0x00, 0x04, 0x00, 0x98, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x98, 0x02, 0x00, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;.......H....... - 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... - 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;............... - 0x1e, 0x00, 0x04, 0x00, 0x1f, 0x04, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ................ - 0x20, 0x00, 0x04, 0x00, 0x9c, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1f, 0x04, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;............... - 0x20, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... - 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ........Sa..;... - 0xe6, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x97, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....U......;... - 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ............=... - 0x1a, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....A..H...=... - 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ....,?......>... - 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, // .U...A..>....... - 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x69, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, // ,?..9...i...I&.. - 0xbd, 0x10, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .....U......>... - 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....I&..A....... - 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // T4..........=... - 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ........T4..>... - 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, // ........A....... - 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // 'A..........=... - 0x18, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ........'A..A... - 0x99, 0x02, 0x00, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // .....N.......... - 0x3e, 0x00, 0x03, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >....N......A... - 0x95, 0x02, 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....M.......... - 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, // =............M.. - 0x41, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, // A............... - 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, // ....>........... - 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x69, 0x04, 0x00, 0x00, // ....8...6...i... - 0xbd, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x08, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // ............7... - 0x97, 0x02, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, // ....O0..7....... - 0xa2, 0x25, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x27, 0x60, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .%......'`..;... - 0xe6, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ............A... - 0x95, 0x02, 0x00, 0x00, 0xf3, 0x1c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ................ - 0x3e, 0x00, 0x03, 0x00, 0xf3, 0x1c, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >.......,...A... - 0x95, 0x02, 0x00, 0x00, 0xd3, 0x40, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....@.......... - 0x3e, 0x00, 0x03, 0x00, 0xd3, 0x40, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >....@..,...=... - 0x18, 0x00, 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, 0xa2, 0x25, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // ....~ ...%..Q... - 0x0d, 0x00, 0x00, 0x00, 0x03, 0x43, 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....C..~ ...... - 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd3, 0x4f, 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, // Q........O..~ .. - 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x5b, 0x00, 0x00, // ....Q........[.. - 0x7e, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // ~ ......P....... - 0x4c, 0x3b, 0x00, 0x00, 0x03, 0x43, 0x00, 0x00, 0xd3, 0x4f, 0x00, 0x00, 0xf3, 0x5b, 0x00, 0x00, // L;...C...O...[.. - 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x89, 0x02, 0x00, 0x00, 0x5a, 0x60, 0x00, 0x00, // ....A.......Z`.. - 0x4f, 0x30, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // O0......=....... - 0x99, 0x61, 0x00, 0x00, 0x5a, 0x60, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0xe2, 0x02, 0x00, 0x00, // .a..Z`..A....... - 0xa2, 0x48, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x23, 0x0a, 0x00, 0x00, 0x99, 0x61, 0x00, 0x00, // .H..B...#....a.. - 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xb5, 0x2f, 0x00, 0x00, 0xa2, 0x48, 0x00, 0x00, // =...e..../...H.. - 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x4c, 0x3b, 0x00, 0x00, // ........<...L;.. - 0xb5, 0x2f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0xc4, 0x2e, 0x00, 0x00, // ./..A........... - 0x42, 0x13, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, // B.......=...e... - 0xcc, 0x5e, 0x00, 0x00, 0xc4, 0x2e, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // .^.............. - 0x67, 0x44, 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0xcc, 0x5e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // gD..<....^..A... - 0x9a, 0x02, 0x00, 0x00, 0x3a, 0x28, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....:(.......... - 0x3e, 0x00, 0x03, 0x00, 0x3a, 0x28, 0x00, 0x00, 0x67, 0x44, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...:(..gD..A... - 0xe2, 0x02, 0x00, 0x00, 0xa9, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....G..B....... - 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x49, 0x27, 0x00, 0x00, 0xa9, 0x47, 0x00, 0x00, // =...e...I'...G.. - 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2a, 0x3b, 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, // ........*;..<... - 0x49, 0x27, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xe6, 0x24, 0x00, 0x00, // I'..O........$.. - 0x2a, 0x3b, 0x00, 0x00, 0x2a, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // *;..*;.......... - 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0xf1, 0x52, 0x00, 0x00, // ....A........R.. - 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xf1, 0x52, 0x00, 0x00, // ........>....R.. - 0xe6, 0x24, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcb, 0x3d, 0x00, 0x00, // .$..O........=.. - 0x3c, 0x0c, 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // <...<........... - 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0x0e, 0x19, 0x00, 0x00, // ....A........... - 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0e, 0x19, 0x00, 0x00, // ........>....... - 0xcb, 0x3d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x69, 0x04, 0x00, 0x00, 0x5e, 0x5b, 0x00, 0x00, // .=..=...i...^[.. - 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x5e, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // ........^[..8... - 0x00, // . + 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x74, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, // ......t.....#... + 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x9a, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, // .......a........ + 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, // ..............GL + 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, // SL.std.450...... + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x48, 0x0c, // ......main....H. + 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0xc9, 0x0f, 0x00, 0x00, 0xc1, 0x11, // ................ + 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, // ................ + 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ......main...... + 0x04, 0x00, 0x69, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, // ..i...Output.... + 0x06, 0x00, 0x69, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, // ..i.......gl_Pos + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x05, 0x00, 0x69, 0x04, 0x00, 0x00, 0x01, 0x00, // ition.....i..... + 0x00, 0x00, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x69, 0x04, // ..v_view......i. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x05, 0x00, // ......v_world... + 0x06, 0x00, 0xbd, 0x10, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x69, 0x34, 0x3b, // ......@main(vi4; + 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x61, 0x5f, // vf3;......O0..a_ + 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa2, 0x25, // indices........% + 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, // ..a_position.... + 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, // ......_varying_. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, // ......<...world. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, // ......^...$Globa + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....^.......u_ + 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, // viewRect......^. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, // ......u_viewTexe + 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....^.......u_ + 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, // view......^..... + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invView..... + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, // ..^.......u_proj + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......^.......u_ + 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, // invProj.......^. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ......u_viewProj + 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......^.......u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // invViewProj..... + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..^.......u_mode + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....^.......u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x5e, 0x05, // modelView.....^. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0b, 0x00, // wProj.....^..... + 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, // ..u_alphaRef4... + 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, // ..B............A + 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, // ..a_indices..... + 0x05, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, // ..H...a_indices. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ......,?..a_posi + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, // tion..........a_ + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, // position........ + 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, // ..flattenTemp... + 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ...U..param..... + 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ......param..... + 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, // ......@entryPoin + 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // tOutput.gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0xc9, 0x0f, 0x00, 0x00, 0x40, 0x65, // ion...........@e + 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, // ntryPointOutput. + 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0xc1, 0x11, // v_view.......... + 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, // ..@entryPointOut + 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x00, 0x00, 0x47, 0x00, // put.v_world...G. + 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, // ..........@...H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, // ..^.......#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...^.......#. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, // ......H...^..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, // ......H...^..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, // ..#... ...H...^. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..^...........H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, // ..^.......#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...^......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, // ......H...^..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, // ......H...^..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, // ..#.......H...^. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..^...........H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, // ..^.......#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...^......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, // ......H...^..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, // ......H...^..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, // ..#... ...H...^. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..^...........H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, // ..^.......#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...^......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, // ......H...^..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, // ......H...^..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, // ..#.......H...^. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..^...........H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, // ..^.......#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...^......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, // ......H...^..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, // ......H...^..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, // ..#.......H...^. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, // ..^.......#... . + 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, // ..G...^.......G. + 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..B...".......G. + 0x04, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..H...........G. + 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. + 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. + 0x04, 0x00, 0xc9, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. + 0x04, 0x00, 0xc1, 0x11, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, // ................ + 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, // ......!......... + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... + 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1a, 0x00, // .. ............. + 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, // .......... ..... + 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, // ................ + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, // ................ + 0x05, 0x00, 0x69, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, // ..i............. + 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x1f, 0x08, 0x00, 0x00, 0x69, 0x04, 0x00, 0x00, 0x97, 0x02, // ..!.......i..... + 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe6, 0x06, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x69, 0x04, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, // ..i...+......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x0a, // ......,.......,. + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, 0x00, // .............?.. + 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, // ..e............. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, // ......j... ..... + 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, // ......e...j..... + 0x0e, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, // ..^...........e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xab, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e.......e...e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xdb, 0x07, 0x00, 0x00, 0x02, 0x00, // ...... ......... + 0x00, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xdb, 0x07, 0x00, 0x00, 0x42, 0x13, // ..^...;.......B. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x0a, // ......+.......#. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x89, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, // ...... ......... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, // ..e...+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, // ......+......... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x98, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... + 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x98, 0x02, 0x00, 0x00, 0x48, 0x0c, // ......;.......H. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, // ......;......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x15, // ......;......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0xc9, 0x0f, // ......;......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0xc1, 0x11, // ......;......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, // ......6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, // ..............Sa + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe6, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, // ..;........U.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x48, 0x0c, // ..=........A..H. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, 0x14, // ..=.......,?.... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, // ..>....U...A..>. + 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x69, 0x04, // ......,?..9...i. + 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0xbd, 0x10, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, // ..I&.......U.... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, // ..>.......I&..A. + 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, // ......T4........ + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, // ..=...........T4 + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, // ..>...........A. + 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, // .......@........ + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, // ..=....... ....@ + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x0f, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, // ..>....... ...A. + 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, // .......@........ + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, // ..=........-...@ + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc1, 0x11, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, // ..>........-.... + 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x69, 0x04, 0x00, 0x00, 0xbd, 0x10, // ..8...6...i..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x08, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x97, 0x02, // ..........7..... + 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xa2, 0x25, // ..O0..7........% + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x27, 0x60, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe6, 0x06, // ......'`..;..... + 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, // ..........A..... + 0x00, 0x00, 0xf3, 0x1c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ..............>. + 0x03, 0x00, 0xf3, 0x1c, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, // ......,...A..... + 0x00, 0x00, 0xd3, 0x40, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ...@..........>. + 0x03, 0x00, 0xd3, 0x40, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, // ...@..,...=..... + 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, 0xa2, 0x25, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..~ ...%..Q..... + 0x00, 0x00, 0x03, 0x43, 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, // ...C..~ ......Q. + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd3, 0x4f, 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, 0x01, 0x00, // .......O..~ .... + 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x5b, 0x00, 0x00, 0x7e, 0x20, // ..Q........[..~ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x4c, 0x3b, // ......P.......L; + 0x00, 0x00, 0x03, 0x43, 0x00, 0x00, 0xd3, 0x4f, 0x00, 0x00, 0xf3, 0x5b, 0x00, 0x00, 0x8a, 0x00, // ...C...O...[.... + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x89, 0x02, 0x00, 0x00, 0x5a, 0x60, 0x00, 0x00, 0x4f, 0x30, // ..A.......Z`..O0 + 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x99, 0x61, // ......=........a + 0x00, 0x00, 0x5a, 0x60, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0xe2, 0x02, 0x00, 0x00, 0xa2, 0x48, // ..Z`..A........H + 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x23, 0x0a, 0x00, 0x00, 0x99, 0x61, 0x00, 0x00, 0x3d, 0x00, // ..B...#....a..=. + 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xb5, 0x2f, 0x00, 0x00, 0xa2, 0x48, 0x00, 0x00, 0x90, 0x00, // ..e..../...H.... + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x4c, 0x3b, 0x00, 0x00, 0xb5, 0x2f, // ......<...L;.../ + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0xc4, 0x2e, 0x00, 0x00, 0x42, 0x13, // ..A...........B. + 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xcc, 0x5e, // ......=...e....^ + 0x00, 0x00, 0xc4, 0x2e, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x67, 0x44, // ..............gD + 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0xcc, 0x5e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..<....^..A..... + 0x00, 0x00, 0x3a, 0x28, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ..:(..........>. + 0x03, 0x00, 0x3a, 0x28, 0x00, 0x00, 0x67, 0x44, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, // ..:(..gD..A..... + 0x00, 0x00, 0xa9, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ...G..B.......=. + 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x49, 0x27, 0x00, 0x00, 0xa9, 0x47, 0x00, 0x00, 0x90, 0x00, // ..e...I'...G.... + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2a, 0x3b, 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x49, 0x27, // ......*;..<...I' + 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xe6, 0x24, 0x00, 0x00, 0x2a, 0x3b, // ..O........$..*; + 0x00, 0x00, 0x2a, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, // ..*;............ + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0xf1, 0x52, 0x00, 0x00, 0x0f, 0x12, // ..A........R.... + 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xf1, 0x52, 0x00, 0x00, 0xe6, 0x24, // ......>....R...$ + 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcb, 0x3d, 0x00, 0x00, 0x3c, 0x0c, // ..O........=..<. + 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, // ..<............. + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0x0e, 0x19, 0x00, 0x00, 0x0f, 0x12, // ..A............. + 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0e, 0x19, 0x00, 0x00, 0xcb, 0x3d, // ......>........= + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x69, 0x04, 0x00, 0x00, 0x5e, 0x5b, 0x00, 0x00, 0x0f, 0x12, // ..=...i...^[.... + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x5e, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ......^[..8.... }; -static const uint8_t vs_debugdraw_fill_lit_dx9[633] = +static const uint8_t vs_debugdraw_fill_lit_dx9[635] = { - 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...V_...u_mod + 0x56, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...V_...u_mod 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x80, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x04, // el. .....u_view. 0x01, 0x80, 0x00, 0x04, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ......u_viewProj - 0x04, 0x01, 0x84, 0x00, 0x04, 0x00, 0x40, 0x02, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x32, 0x00, // ......@.......2. - 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, // CTAB............ - 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x93, 0x00, 0x00, 0x00, // ................ - 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, // X...........`... - 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x00, // ....p........... - 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, 0x84, 0x00, // x............... - 0x04, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ....x.......u_mo - 0x64, 0x65, 0x6c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, // del......... ... - 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, // ....u_view...... - 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi - 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // ewProj.vs_3_0.Mi - 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL - 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler - 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x88, 0x00, 0x0f, 0xa0, // 10.1...Q....... - 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...@............ - 0x1f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ - 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ - 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x07, 0xe0, // ................ - 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x01, 0x80, 0x88, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x2e, 0x00, 0x00, 0x02, // ................ - 0x00, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ................ - 0x01, 0x00, 0x55, 0x90, 0x01, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, 0x00, 0x05, // ..U.. .......... - 0x00, 0x00, 0x0f, 0x80, 0x00, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0x00, 0x90, // ..... .......... - 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x20, 0xe4, 0xa0, // ............. .. - 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x04, // ................ - 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, // ......... ...... - 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x85, 0x00, 0xe4, 0xa0, // ..........U..... - 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x84, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x80, // ................ - 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x86, 0x00, 0xe4, 0xa0, // ................ - 0x00, 0x00, 0xaa, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0xe0, // ................ - 0x87, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, // ................ - 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0x55, 0x80, 0x81, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, // ......U......... - 0x01, 0x00, 0x07, 0x80, 0x80, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, // ................ - 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, 0x82, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x80, // ................ - 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0xe0, 0x83, 0x00, 0xe4, 0xa0, // ................ - 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x07, 0xe0, // ................ - 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... + 0x04, 0x01, 0x84, 0x00, 0x04, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, // ......@......... + 0x32, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x03, // 2.CTAB.......... + 0xfe, 0xff, 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x93, 0x00, // ................ + 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x60, 0x00, // ..X...........`. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x04, 0x00, // ......p......... + 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, // ..x............. + 0x84, 0x00, 0x04, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......x.......u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x00, // model......... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0xab, 0x03, 0x00, // ......u_view.... + 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, // viewProj.vs_3_0. + 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, // Microsoft (R) HL + 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, // SL Shader Compil + 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x88, 0x00, // er 10.1...Q..... + 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....@.......... + 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x07, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x88, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x2e, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x01, 0xb0, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ + 0x0f, 0x80, 0x01, 0x00, 0x55, 0x90, 0x01, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x04, 0x00, // ....U.. ........ + 0x00, 0x05, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x20, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, // ....... ........ + 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x20, // ............... + 0xe4, 0xa0, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x20, 0xe4, 0xa0, 0x00, 0x00, // ........... .... + 0x00, 0xb0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x85, 0x00, // ............U... + 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x84, 0x00, 0xe4, 0xa0, 0x00, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x86, 0x00, // ................ + 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ + 0x0f, 0xe0, 0x87, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, // ................ + 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0x55, 0x80, 0x81, 0x00, 0xe4, 0xa0, 0x04, 0x00, // ........U....... + 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, 0x80, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, 0x82, 0x00, 0xe4, 0xa0, 0x00, 0x00, // ................ + 0xaa, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0xe0, 0x83, 0x00, // ................ + 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, // ................ + 0x07, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ........... }; -static const uint8_t vs_debugdraw_fill_lit_dx11[944] = +static const uint8_t vs_debugdraw_fill_lit_dx11[946] = { - 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie + 0x56, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie 0x77, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // w.......u_viewPr 0x6f, 0x6a, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // oj..@....u_model - 0x04, 0x20, 0x80, 0x00, 0x80, 0x00, 0x70, 0x03, 0x44, 0x58, 0x42, 0x43, 0x4a, 0x63, 0x00, 0x1f, // . ....p.DXBCJc.. - 0x8c, 0xf0, 0x42, 0x23, 0xf7, 0x2c, 0xd7, 0x55, 0x64, 0x23, 0x64, 0x92, 0x01, 0x00, 0x00, 0x00, // ..B#.,.Ud#d..... - 0x70, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, // p.......,....... - 0xf4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....ISGNP....... - 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....8........... - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, // ............E... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x07, 0x07, 0x00, 0x00, 0x42, 0x4c, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x44, 0x49, 0x43, 0x45, 0x53, // ....BLENDINDICES - 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // .POSITION...OSGN - 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, // h...........P... - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, // ................ - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x07, 0x08, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // ....SV_POSITION. - 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, // TEXCOORD....SHDR - 0x74, 0x02, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x59, 0x08, 0x00, 0x04, // t...@.......Y... - 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // F. ........._... - 0x12, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, // ........_...r... - 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....g.... ...... - 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....e...r ...... - 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, // e...r ......h... - 0x02, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....)........... - 0x0a, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .........@...... - 0x38, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, // 8...........V... - 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....F. ......... - 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, // ........2....... - 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....F. ......... - 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, // F.......2....... - 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....F. ......... - 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // F............... - 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, // ....F.......F. . - 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, // 8...........V... - 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....F. ......... - 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . - 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // F.......2....... - 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ....F. ......... - 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... - 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2.... ......F. . - 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, // F.......8...r... - 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, // ....V.......F. . - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, // ........2...r... - 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... - 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... - 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, // 2...r.......F. . - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x20, 0x10, 0x00, // F.......2...r .. - 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....F. ......... - 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... - 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, // 6...r ......F... - 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x0e, 0x00, 0x01, 0x00, 0x80, 0x08, // ....>........... + 0x04, 0x20, 0x80, 0x00, 0x80, 0x00, 0x70, 0x03, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x4a, 0x63, // . ....p...DXBCJc + 0x00, 0x1f, 0x8c, 0xf0, 0x42, 0x23, 0xf7, 0x2c, 0xd7, 0x55, 0x64, 0x23, 0x64, 0x92, 0x01, 0x00, // ....B#.,.Ud#d... + 0x00, 0x00, 0x70, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, // ..p.......,..... + 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, // ......ISGNP..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......8......... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00, 0x45, 0x00, // ..............E. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x42, 0x4c, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x44, 0x49, 0x43, // ......BLENDINDIC + 0x45, 0x53, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0x4f, 0x53, // ES.POSITION...OS + 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNh...........P. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x5c, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO + 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, 0x48, // N.TEXCOORD....SH + 0x44, 0x52, 0x74, 0x02, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x59, 0x08, // DRt...@.......Y. + 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x5f, 0x00, // ..F. ........._. + 0x00, 0x03, 0x12, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, // .........._...r. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......g.... .... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, // ......e...r .... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, // ..e...r ......h. + 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, // ......)......... + 0x00, 0x00, 0x0a, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x02, 0x00, // ...........@.... + 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x15, // ..8...........V. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, // ......F. ....... + 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, // ..........2..... + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, // ......F. ....... + 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0xf2, 0x00, // ..F.......2..... + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, // ......F. ....... + 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xf2, 0x00, // ..F............. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, // ......F.......F. + 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, // ............... + 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, // ..8...........V. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ......F. ....... + 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, // ..2...........F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, // ............... + 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, // ..F.......2..... + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, // ......F. ....... + 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, // ..........F..... + 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, // ..2.... ......F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, // ............... + 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, // ..F.......8...r. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, // ......V.......F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, // .........2...r. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F. ....... + 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, // ..........F..... + 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, // ..2...r.......F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, // ............... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x20, // ..F.......2...r + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ......F. ....... + 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, // ..........F..... + 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, // ..6...r ......F. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x0e, 0x00, 0x01, 0x00, // ......>......... + 0x80, 0x08, // .. }; static const uint8_t vs_debugdraw_fill_lit_mtl[881] = { - 0x56, 0x53, 0x48, 0x04, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie + 0x56, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie 0x77, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // w.......u_viewPr 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // oj.......u_model 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0x36, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, // . .. .6...using diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc index ab5a83f..5cad2f1 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc @@ -2,7 +2,7 @@ $input a_position, a_indices $output v_view, v_world /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit_mesh.bin.h b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit_mesh.bin.h new file mode 100644 index 0000000..a76ec27 --- /dev/null +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit_mesh.bin.h @@ -0,0 +1,389 @@ +static const uint8_t vs_debugdraw_fill_lit_mesh_glsl[485] = +{ + 0x56, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie + 0x77, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // w.......u_viewPr + 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // oj.......u_model + 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0xaa, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, // . .. .....attrib + 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, // ute highp vec3 a + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // _position;.varyi + 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, // ng highp vec3 v_ + 0x76, 0x69, 0x65, 0x77, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, // view;.varying hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, // ghp vec3 v_world + 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // ;.uniform highp + 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // mat4 u_view;.uni + 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, // form highp mat4 + 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, // u_viewProj;.unif + 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // orm mat4 u_model + 0x5b, 0x33, 0x32, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, // [32];.void main + 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // ().{. highp vec + 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // 4 tmpvar_1;. tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, // pvar_1.w = 1.0;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, // tmpvar_1.xyz = + 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x68, // a_position;. h + 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // ighp vec4 tmpvar + 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, // _2;. tmpvar_2 = + 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x30, 0x5d, 0x20, 0x2a, 0x20, 0x74, // (u_model[0] * t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, // mpvar_1);. gl_P + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x76, 0x69, 0x65, // osition = (u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // wProj * tmpvar_2 + 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x75, // );. v_view = (u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // _view * tmpvar_2 + 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, // ).xyz;. v_world + 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x3b, // = tmpvar_2.xyz; + 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... +}; +static const uint8_t vs_debugdraw_fill_lit_mesh_spv[3179] = +{ + 0x56, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...V_...u_mod + 0x65, 0x6c, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // el.......u_viewP + 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // roj.......u_view + 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, // ......0.....#... + 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, // ......Ta........ + 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, // ..............GL + 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, // SL.std.450...... + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x48, 0x0c, // ......main....H. + 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0xc9, 0x0f, 0x00, 0x00, 0xc1, 0x11, // ................ + 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, // ................ + 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ......main...... + 0x04, 0x00, 0x69, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, // ..i...Output.... + 0x06, 0x00, 0x69, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, // ..i.......gl_Pos + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x05, 0x00, 0x69, 0x04, 0x00, 0x00, 0x01, 0x00, // ition.....i..... + 0x00, 0x00, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x69, 0x04, // ..v_view......i. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x05, 0x00, // ......v_world... + 0x06, 0x00, 0xbd, 0x10, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x69, 0x34, 0x3b, // ......@main(vi4; + 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x61, 0x5f, // vf3;......O0..a_ + 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa2, 0x25, // indices........% + 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, // ..a_position.... + 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, // ......_varying_. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, // ......<...world. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, // ......^...$Globa + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....^.......u_ + 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, // viewRect......^. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, // ......u_viewTexe + 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....^.......u_ + 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, // view......^..... + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invView..... + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, // ..^.......u_proj + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......^.......u_ + 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, // invProj.......^. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ......u_viewProj + 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......^.......u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // invViewProj..... + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..^.......u_mode + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....^.......u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x5e, 0x05, // modelView.....^. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0b, 0x00, // wProj.....^..... + 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, // ..u_alphaRef4... + 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, // ..B............A + 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, // ..a_indices..... + 0x05, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, // ..H...a_indices. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ......,?..a_posi + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, // tion..........a_ + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, // position........ + 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, // ..flattenTemp... + 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ...U..param..... + 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ......param..... + 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, // ......@entryPoin + 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // tOutput.gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0xc9, 0x0f, 0x00, 0x00, 0x40, 0x65, // ion...........@e + 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, // ntryPointOutput. + 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0xc1, 0x11, // v_view.......... + 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, // ..@entryPointOut + 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x00, 0x00, 0x47, 0x00, // put.v_world...G. + 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, // ..........@...H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, // ..^.......#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...^.......#. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, // ......H...^..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, // ......H...^..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, // ..#... ...H...^. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..^...........H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, // ..^.......#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...^......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, // ......H...^..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, // ......H...^..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, // ..#.......H...^. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..^...........H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, // ..^.......#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...^......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, // ......H...^..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, // ......H...^..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, // ..#... ...H...^. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..^...........H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, // ..^.......#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...^......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, // ......H...^..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, // ......H...^..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, // ..#.......H...^. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..^...........H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, // ..^.......#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...^......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, // ......H...^..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, // ......H...^..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, // ..#.......H...^. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, // ..^.......#... . + 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, // ..G...^.......G. + 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..B...".......G. + 0x04, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..H...........G. + 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. + 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. + 0x04, 0x00, 0xc9, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. + 0x04, 0x00, 0xc1, 0x11, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, // ................ + 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, // ......!......... + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... + 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1a, 0x00, // .. ............. + 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, // .......... ..... + 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, // ................ + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, // ................ + 0x05, 0x00, 0x69, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, // ..i............. + 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x1f, 0x08, 0x00, 0x00, 0x69, 0x04, 0x00, 0x00, 0x97, 0x02, // ..!.......i..... + 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe6, 0x06, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x69, 0x04, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, // ..i...+......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x0a, // ......,.......,. + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, 0x00, // .............?.. + 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, // ..e............. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, // ......j... ..... + 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, // ......e...j..... + 0x0e, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, // ..^...........e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xab, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e.......e...e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xdb, 0x07, 0x00, 0x00, 0x02, 0x00, // ...... ......... + 0x00, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xdb, 0x07, 0x00, 0x00, 0x42, 0x13, // ..^...;.......B. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x0a, // ......+.......#. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, // ...... ......... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, // ..e...+......... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x98, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... + 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x98, 0x02, 0x00, 0x00, 0x48, 0x0c, // ......;.......H. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, // ......;......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x15, // ......;......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0xc9, 0x0f, // ......;......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0xc1, 0x11, // ......;......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, // ......6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, // ..............Sa + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe6, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, // ..;........U.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x48, 0x0c, // ..=........A..H. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, 0x14, // ..=.......,?.... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, // ..>....U...A..>. + 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x69, 0x04, // ......,?..9...i. + 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0xbd, 0x10, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, // ..I&.......U.... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, // ..>.......I&..A. + 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, // ......T4........ + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, // ..=...........T4 + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, // ..>...........A. + 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, // .......@........ + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, // ..=....... ....@ + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x0f, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, // ..>....... ...A. + 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, // .......@........ + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, // ..=........-...@ + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc1, 0x11, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, // ..>........-.... + 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x69, 0x04, 0x00, 0x00, 0xbd, 0x10, // ..8...6...i..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x08, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x97, 0x02, // ..........7..... + 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xa2, 0x25, // ..O0..7........% + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x27, 0x60, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe6, 0x06, // ......'`..;..... + 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, // ..........A..... + 0x00, 0x00, 0xf3, 0x1c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ..............>. + 0x03, 0x00, 0xf3, 0x1c, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, // ......,...A..... + 0x00, 0x00, 0xd3, 0x40, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ...@..........>. + 0x03, 0x00, 0xd3, 0x40, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, // ...@..,...=..... + 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, 0xa2, 0x25, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..~ ...%..Q..... + 0x00, 0x00, 0x03, 0x43, 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, // ...C..~ ......Q. + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd3, 0x4f, 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, 0x01, 0x00, // .......O..~ .... + 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x5b, 0x00, 0x00, 0x7e, 0x20, // ..Q........[..~ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x4c, 0x3b, // ......P.......L; + 0x00, 0x00, 0x03, 0x43, 0x00, 0x00, 0xd3, 0x4f, 0x00, 0x00, 0xf3, 0x5b, 0x00, 0x00, 0x8a, 0x00, // ...C...O...[.... + 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0xe2, 0x02, 0x00, 0x00, 0xb8, 0x1b, 0x00, 0x00, 0x42, 0x13, // ..A...........B. + 0x00, 0x00, 0x23, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, // ..#.......=...e. + 0x00, 0x00, 0x82, 0x2c, 0x00, 0x00, 0xb8, 0x1b, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, // ...,............ + 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x4c, 0x3b, 0x00, 0x00, 0x82, 0x2c, 0x00, 0x00, 0x41, 0x00, // ..<...L;...,..A. + 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0xc4, 0x2e, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x1d, 0x0a, // ..........B..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xcc, 0x5e, 0x00, 0x00, 0xc4, 0x2e, // ..=...e....^.... + 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x67, 0x44, 0x00, 0x00, 0x3c, 0x0c, // ..........gD..<. + 0x00, 0x00, 0xcc, 0x5e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x3a, 0x28, // ...^..A.......:( + 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3a, 0x28, // ..........>...:( + 0x00, 0x00, 0x67, 0x44, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0xa9, 0x47, // ..gD..A........G + 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, // ..B.......=...e. + 0x00, 0x00, 0x49, 0x27, 0x00, 0x00, 0xa9, 0x47, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, // ..I'...G........ + 0x00, 0x00, 0x2a, 0x3b, 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x49, 0x27, 0x00, 0x00, 0x4f, 0x00, // ..*;..<...I'..O. + 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xe6, 0x24, 0x00, 0x00, 0x2a, 0x3b, 0x00, 0x00, 0x2a, 0x3b, // .......$..*;..*; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, // ..............A. + 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0xf1, 0x52, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, // .......R........ + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xf1, 0x52, 0x00, 0x00, 0xe6, 0x24, 0x00, 0x00, 0x4f, 0x00, // ..>....R...$..O. + 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcb, 0x3d, 0x00, 0x00, 0x3c, 0x0c, 0x00, 0x00, 0x3c, 0x0c, // .......=..<...<. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, // ..............A. + 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0x0e, 0x19, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, // ................ + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0e, 0x19, 0x00, 0x00, 0xcb, 0x3d, 0x00, 0x00, 0x3d, 0x00, // ..>........=..=. + 0x04, 0x00, 0x69, 0x04, 0x00, 0x00, 0x5e, 0x5b, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, // ..i...^[........ + 0x02, 0x00, 0x5e, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..^[..8.... +}; +static const uint8_t vs_debugdraw_fill_lit_mesh_dx9[555] = +{ + 0x56, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...V_...u_mod + 0x65, 0x6c, 0x04, 0x20, 0x08, 0x00, 0x04, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x04, // el. .....u_view. + 0x01, 0x00, 0x00, 0x04, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ......u_viewProj + 0x04, 0x01, 0x04, 0x00, 0x04, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, // ................ + 0x32, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x03, // 2.CTAB.......... + 0xfe, 0xff, 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x93, 0x00, // ................ + 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, // ..X...........`. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, // ......p......... + 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x02, 0x00, // ..x............. + 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......x.......u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x00, // model......... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0xab, 0x03, 0x00, // ......u_view.... + 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, // viewProj.vs_3_0. + 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, // Microsoft (R) HL + 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, // SL Shader Compil + 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // er 10.1......... + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ + 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x07, 0xe0, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x0f, 0x80, 0x09, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... + 0x0f, 0x80, 0x08, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x0a, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x0b, 0x00, // ................ + 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x05, 0x00, // ............U... + 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x04, 0x00, 0xe4, 0xa0, 0x00, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x06, 0x00, // ................ + 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ + 0x0f, 0xe0, 0x07, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, // ................ + 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x04, 0x00, // ........U....... + 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, // ................ + 0xaa, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0xe0, 0x03, 0x00, // ................ + 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, // ................ + 0x07, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ........... +}; +static const uint8_t vs_debugdraw_fill_lit_mesh_dx11[874] = +{ + 0x56, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie + 0x77, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // w.......u_viewPr + 0x6f, 0x6a, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // oj..@....u_model + 0x04, 0x20, 0x80, 0x00, 0x80, 0x00, 0x28, 0x03, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xc4, 0x14, // . ....(...DXBC.. + 0x8c, 0x7a, 0xb5, 0xb5, 0x88, 0x8c, 0xc7, 0xf4, 0x92, 0xe3, 0x3e, 0xf8, 0xb7, 0x7a, 0x01, 0x00, // .z........>..z.. + 0x00, 0x00, 0x28, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, // ..(.......,..... + 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, // ......ISGNP..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......8......... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x45, 0x00, // ..............E. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x42, 0x4c, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x44, 0x49, 0x43, // ......BLENDINDIC + 0x45, 0x53, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0x4f, 0x53, // ES.POSITION...OS + 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNh...........P. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x5c, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO + 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, 0x48, // N.TEXCOORD....SH + 0x44, 0x52, 0x2c, 0x02, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x59, 0x00, // DR,...@.......Y. + 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x5f, 0x00, // ..F. ........._. + 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, // ..r.......g.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, // ..........e...r + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, // ......e...r .... + 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, // ..h.......8..... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, // ......V.......F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, // .........2..... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, // ......F. ....... + 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ..........F..... + 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, // ..2...........F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, // ............... + 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x00, // ..F............. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, // ......F.......F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, // .........8..... + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, // ......V.......F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, // .........2..... + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ......F. ....... + 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, // ..........F..... + 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, // ..2...........F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, // ............... + 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x20, // ..F.......2.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, // ......F. ....... + 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, // ..........F..... + 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, // ..8...r.......V. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ......F. ....... + 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, // ..2...r.......F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, // ............... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, // ..F.......2...r. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, // ......F. ....... + 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, // ..........F..... + 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, // ..2...r ......F. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, // ............... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, // ..F.......6...r + 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, // ......F.......>. + 0x00, 0x01, 0x00, 0x02, 0x0e, 0x00, 0x01, 0x00, 0x80, 0x08, // .......... +}; +static const uint8_t vs_debugdraw_fill_lit_mesh_mtl[822] = +{ + 0x56, 0x53, 0x48, 0x05, 0x0f, 0xc8, 0x56, 0x5f, 0x03, 0x00, 0x06, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH...V_...u_vie + 0x77, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // w.......u_viewPr + 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // oj.......u_model + 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0xfb, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, // . .. .....using + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, // namespace metal; + 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // .struct xlatMtlS + 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, // haderInput {. f + 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // loat3 a_position + 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, // [[attribute(0)] + 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, // ];.};.struct xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput + 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, // {. float4 gl_P + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // osition [[positi + 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, // on]];. float3 v + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, // _view;. float3 + 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // v_world;.};.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // Uniform {. floa + 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x66, // t4x4 u_view;. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // loat4x4 u_viewPr + 0x6f, 0x6a, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, // oj;. float4x4 u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x33, 0x32, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, // _model[32];.};.v + 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // ertex xlatMtlSha + 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // derOutput xlatMt + 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // lMain (xlatMtlSh + 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // aderInput _mtl_i + 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, // [[stage_in]], c + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // onstant xlatMtlS + 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, // haderUniform& _m + 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, // tl_u [[buffer(0) + 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // ]]).{. xlatMtlS + 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // haderOutput _mtl + 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, // _o;. float4 tmp + 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // var_1 = 0;. tmp + 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, // var_1.w = 1.0;. + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, // tmpvar_1.xyz = + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // _mtl_i.a_positio + 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, // n;. float4 tmpv + 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // ar_2 = 0;. tmpv + 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, // ar_2 = (_mtl_u.u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x30, 0x5d, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, // _model[0] * tmpv + 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // ar_1);. _mtl_o. + 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x5f, // gl_Position = (_ + 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // mtl_u.u_viewProj + 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x3b, 0x0a, 0x20, 0x20, // * tmpvar_2);. + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x20, 0x3d, 0x20, // _mtl_o.v_view = + 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x20, 0x2a, // (_mtl_u.u_view * + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, // tmpvar_2).xyz;. + 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x77, 0x6f, 0x72, 0x6c, 0x64, // _mtl_o.v_world + 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x3b, // = tmpvar_2.xyz; + 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // . return _mtl_o + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // ;.}... +}; +extern const uint8_t* vs_debugdraw_fill_lit_mesh_pssl; +extern const uint32_t vs_debugdraw_fill_lit_mesh_pssl_size; diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit_mesh.sc b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit_mesh.sc new file mode 100644 index 0000000..7616da2 --- /dev/null +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit_mesh.sc @@ -0,0 +1,17 @@ +$input a_position, a_indices +$output v_view, v_world + +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include + +void main() +{ + vec4 world = mul(u_model[0], vec4(a_position, 1.0) ); + gl_Position = mul(u_viewProj, world); + v_view = mul(u_view, world).xyz; + v_world = world.xyz; +} diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_mesh.bin.h b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_mesh.bin.h new file mode 100644 index 0000000..edf5db8 --- /dev/null +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_mesh.bin.h @@ -0,0 +1,294 @@ +static const uint8_t vs_debugdraw_fill_mesh_glsl[282] = +{ + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, // wProj.......u_mo + 0x64, 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0xec, 0x00, 0x00, 0x00, 0x61, 0x74, 0x74, // del. .. .....att + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // ribute highp vec + 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x75, 0x6e, // 3 a_position;.un + 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, // iform highp mat4 + 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // u_viewProj;.uni + 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // form mat4 u_mode + 0x6c, 0x5b, 0x33, 0x32, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // l[32];.void main + 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // ().{. highp ve + 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, // c4 tmpvar_1;. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, // mpvar_1.w = 1.0; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, // . tmpvar_1.xyz + 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, // = a_position;. + 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, // gl_Position = (u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x28, 0x75, 0x5f, 0x6d, // _viewProj * (u_m + 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x30, 0x5d, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // odel[0] * tmpvar + 0x5f, 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _1));.}... +}; +static const uint8_t vs_debugdraw_fill_mesh_spv[2478] = +{ + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // el.......u_viewP + 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x80, 0x09, 0x00, 0x00, 0x03, 0x02, 0x23, // roj............# + 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // .........Ta..... + 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... + 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x48, 0x0c, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x03, 0x00, 0x03, // .H.............. + 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf9, 0x03, 0x00, // .main........... + 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xf9, 0x03, 0x00, // .Output......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // .....gl_Position + 0x00, 0x05, 0x00, 0x06, 0x00, 0xbd, 0x10, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, // .........@main(v + 0x69, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x4f, 0x30, 0x00, // i4;vf3;......O0. + 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .a_indices...... + 0x00, 0xa2, 0x25, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // ..%..a_position. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xff, 0x10, 0x00, 0x00, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x00, // .........model.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, // .........$Global + 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, // iewRect......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, // .....u_viewTexel + 0x00, 0x06, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, // iew............. + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // .u_invView...... + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, // .........u_proj. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, // nvProj.......... + 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // .....u_viewProj. + 0x00, 0x06, 0x00, 0x07, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // nvViewProj...... + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .............u_m + 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x97, 0x0b, 0x00, // odelView........ + 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, // Proj............ + 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, // .u_alphaRef4.... + 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, // .B.............. + 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // ._varying_...... + 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x00, 0x00, // ..A..a_indices.. + 0x00, 0x05, 0x00, 0x05, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x61, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, // .....H...a_indic + 0x65, 0x73, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, // es.......,?..a_p + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, // osition......... + 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x0a, // .a_position..... + 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, // .....@entryPoint + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, // Output.gl_Positi + 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, // on........G..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, // am...........par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, // am...G.......... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, // .@...H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, // .#.......H...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, // .#...`...H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, // .#.......H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, // .#...`...H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, // .#.......H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x97, 0x0b, 0x00, // .#... ...G...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, // .....G...B...".. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x1e, 0x00, 0x00, // .....G...H...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, // .....G.......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....G.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, // .............!.. + 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, // . .............. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // . .............. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x05, 0x00, 0x3f, 0x07, 0x00, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x97, 0x02, 0x00, // .!...?.......... + 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // ....?....e...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .....+.......j.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // . ...........e.. + 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x1d, 0x00, 0x00, // .j.............. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .....e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, // .e...e...e...... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .e...e....... .. + 0x00, 0x51, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x97, 0x0b, 0x00, 0x00, 0x3b, 0x00, 0x04, // .Q...........;.. + 0x00, 0x51, 0x02, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .Q...B.......+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .....#.......+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .........e... .. + 0x00, 0x76, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x2b, 0x00, 0x04, // .v...........+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x98, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x98, 0x02, 0x00, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .....H....... .. + 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, // .............6.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, // .....Sa..;...... + 0x00, 0xef, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, // ..G......;...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1a, 0x00, 0x00, // .........=...... + 0x00, 0xcb, 0x41, 0x00, 0x00, 0x48, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // ..A..H...=...... + 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, // .,?......>....G. + 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, // ..A..>.......,?. + 0x00, 0x39, 0x00, 0x06, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x39, 0x19, 0x00, 0x00, 0xbd, 0x10, 0x00, // .9.......9...... + 0x00, 0xef, 0x47, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // ..G......Q...... + 0x00, 0xf8, 0x21, 0x00, 0x00, 0x39, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, // ..!..9.......>.. + 0x00, 0x95, 0x15, 0x00, 0x00, 0xf8, 0x21, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, // ......!......8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0xf9, 0x03, 0x00, 0x00, 0xbd, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x3f, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x97, 0x02, 0x00, 0x00, 0x4f, 0x30, 0x00, // .?...7.......O0. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xa2, 0x25, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7........%..... + 0x00, 0xdb, 0x5f, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x76, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, // .._..;...v...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd1, 0x46, 0x00, // .....=........F. + 0x00, 0xa2, 0x25, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2c, 0x46, 0x00, // ..%..Q.......,F. + 0x00, 0xd1, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ..F......Q...... + 0x00, 0xd3, 0x4f, 0x00, 0x00, 0xd1, 0x46, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, // ..O...F......Q.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x5b, 0x00, 0x00, 0xd1, 0x46, 0x00, 0x00, 0x02, 0x00, 0x00, // ......[...F..... + 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x4c, 0x3b, 0x00, 0x00, 0x2c, 0x46, 0x00, // .P.......L;..,F. + 0x00, 0xd3, 0x4f, 0x00, 0x00, 0xf3, 0x5b, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, // ..O...[......A.. + 0x00, 0xe2, 0x02, 0x00, 0x00, 0xb8, 0x1b, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x23, 0x0a, 0x00, // .........B...#.. + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x82, 0x2c, 0x00, // .....=...e....,. + 0x00, 0xb8, 0x1b, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xff, 0x10, 0x00, // ................ + 0x00, 0x4c, 0x3b, 0x00, 0x00, 0x82, 0x2c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, // .L;...,..A...... + 0x00, 0xc4, 0x2e, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....B.......=.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0xcc, 0x5e, 0x00, 0x00, 0xc4, 0x2e, 0x00, 0x00, 0x90, 0x00, 0x05, // .e....^......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x67, 0x44, 0x00, 0x00, 0xff, 0x10, 0x00, 0x00, 0xcc, 0x5e, 0x00, // .....gD.......^. + 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xee, 0x27, 0x00, 0x00, 0x0f, 0x12, 0x00, // .A........'..... + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xee, 0x27, 0x00, 0x00, 0x67, 0x44, 0x00, // .....>....'..gD. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x5e, 0x5b, 0x00, 0x00, 0x0f, 0x12, 0x00, // .=.......^[..... + 0x00, 0xfe, 0x00, 0x02, 0x00, 0x5e, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .....^[..8.... +}; +static const uint8_t vs_debugdraw_fill_mesh_dx9[402] = +{ + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x04, 0x20, 0x04, 0x00, 0x04, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // el. .....u_viewP + 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x64, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, // roj......d...... + 0xff, 0xfe, 0xff, 0x2b, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, // ...+.CTAB....... + 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ + 0x00, 0x78, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, // .x...D.......... + 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // .L.............. + 0x00, 0x04, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .....h.......u_m + 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, // odel......... .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // .....u_viewProj. + 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, // .vs_3_0.Microsof + 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, // t (R) HLSL Shade + 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, // r Compiler 10.1. + 0xab, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ................ + 0x80, 0x05, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // .......U........ + 0x80, 0x04, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x0f, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x07, 0x00, 0xe4, // ................ + 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, 0xe4, // ...........U.... + 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, // ................ + 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, // ................ + 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // ................ + 0xe0, 0x03, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, // ................ + 0x00, 0x00, // .. +}; +static const uint8_t vs_debugdraw_fill_mesh_dx11[605] = +{ + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, // wProj.......u_mo + 0x64, 0x65, 0x6c, 0x04, 0x20, 0x40, 0x00, 0x80, 0x00, 0x28, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, // del. @...(...DXB + 0x43, 0x27, 0x23, 0xd8, 0x33, 0xce, 0xb9, 0x21, 0xaa, 0x08, 0x79, 0xa6, 0x15, 0x6b, 0x1a, 0x45, // C'#.3..!..y..k.E + 0x8d, 0x01, 0x00, 0x00, 0x00, 0x28, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .....(.......,.. + 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, // .........ISGNP.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........8...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ + 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .E.............. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x42, 0x4c, 0x45, 0x4e, 0x44, 0x49, 0x4e, // .........BLENDIN + 0x44, 0x49, 0x43, 0x45, 0x53, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, // DICES.POSITION.. + 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .OSGN,.......... + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // . .............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, // .........SV_POSI + 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x53, 0x48, 0x44, 0x52, 0x68, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, // TION.SHDRh...@.. + 0x00, 0x5a, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .Z...Y...F. .... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, // ....._...r...... + 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .g.... ......... + 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, // .h.......8...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .....V.......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, // .........2...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .....F. ........ + 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, // .........F...... + 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .2...........F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, // .F.............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .....F.......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, // .........8...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .....V.......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, // .........2...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....F. ........ + 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, // .........F...... + 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .2...........F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x20, 0x10, // .F.......2.... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .....F. ........ + 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, // .........F...... + 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x0e, 0x00, 0x01, 0x00, 0x40, 0x08, // .>.........@. +}; +static const uint8_t vs_debugdraw_fill_mesh_mtl[626] = +{ + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, // wProj.......u_mo + 0x64, 0x65, 0x6c, 0x04, 0x20, 0x00, 0x00, 0x20, 0x00, 0x44, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, // del. .. .D...usi + 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, // ng namespace met + 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // al;.struct xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, // tlShaderInput {. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // float3 a_posit + 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, // ion [[attribute( + 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, // 0)]];.};.struct + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut + 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // put {. float4 g + 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, // l_Position [[pos + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // ition]];.};.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // Uniform {. floa + 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, // t4x4 u_viewProj; + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, // . float4x4 u_mo + 0x64, 0x65, 0x6c, 0x5b, 0x33, 0x32, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, // del[32];.};.vert + 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ex xlatMtlShader + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, // Output xlatMtlMa + 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // in (xlatMtlShade + 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, // rInput _mtl_i [[ + 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, // stage_in]], cons + 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // tant xlatMtlShad + 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // erUniform& _mtl_ + 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, // u [[buffer(0)]]) + 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // .{. xlatMtlShad + 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // erOutput _mtl_o; + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // . float4 tmpvar + 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // _1 = 0;. tmpvar + 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // _1.w = 1.0;. tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, // pvar_1.xyz = _mt + 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, // l_i.a_position;. + 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, // _mtl_o.gl_Posi + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, // tion = (_mtl_u.u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x28, 0x5f, 0x6d, 0x74, // _viewProj * (_mt + 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5b, 0x30, 0x5d, 0x20, 0x2a, // l_u.u_model[0] * + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, // tmpvar_1));. r + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, // eturn _mtl_o;.}. + 0x0a, 0x00, // .. +}; +extern const uint8_t* vs_debugdraw_fill_mesh_pssl; +extern const uint32_t vs_debugdraw_fill_mesh_pssl_size; diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_mesh.sc b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_mesh.sc new file mode 100644 index 0000000..3d3e515 --- /dev/null +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_mesh.sc @@ -0,0 +1,14 @@ +$input a_position, a_indices + +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include + +void main() +{ + vec4 model = mul(u_model[0], vec4(a_position, 1.0) ); + gl_Position = mul(u_viewProj, model); +} diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_texture.bin.h b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_texture.bin.h new file mode 100644 index 0000000..4988688 --- /dev/null +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_texture.bin.h @@ -0,0 +1,355 @@ +static const uint8_t vs_debugdraw_fill_texture_glsl[420] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0x7f, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color + 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig + 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // hp vec3 a_positi + 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // on;.attribute hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ghp vec2 a_texco + 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, // ord0;.varying hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 v_color + 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.varying highp + 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec2 v_texcoord + 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.uniform highp + 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // mat4 u_modelVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // wProj;.void main + 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // ().{. highp ve + 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, // c4 tmpvar_1;. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, // mpvar_1.w = 1.0; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, // . tmpvar_1.xyz + 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, // = a_position;. + 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, // gl_Position = (u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, // _modelViewProj * + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, // tmpvar_1);. v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, // texcoord0 = a_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // xcoord0;. v_col + 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, // or0 = a_color0;. + 0x7d, 0x0a, 0x0a, 0x00, // }... +}; +static const uint8_t vs_debugdraw_fill_texture_spv[3209] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0x64, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, // d.....#......... + 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // Ta.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // main............ + 0x95, 0x0e, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........v....... + 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ + 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....main........ + 0x64, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // d...Output...... + 0x64, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // d.......gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ion.....d....... + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // v_color0........ + 0x64, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // d.......v_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0xad, 0x11, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // rd0.........@mai + 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, // n(vf4;vf3;vf2;.. + 0x05, 0x00, 0x05, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ........a_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // ......../B..a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x10, 0x46, 0x00, 0x00, // sition.......F.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, // ...._varying_... + 0x05, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ........$Global. + 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, // ewRect.......... + 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. + 0x06, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew.............. + 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... + 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ........u_proj.. + 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, // vProj........... + 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. + 0x06, 0x00, 0x07, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... + 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // ........u_model. + 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xdf, 0x00, 0x00, 0x00, // delView......... + 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP + 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj............. + 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, // u_alphaRef4..... + 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, // B............A.. + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_color0........ + 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ....a_color0.... + 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // .....?..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // on..........a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, // sition......@,.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // ....a_texcoord0. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m........8..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x76, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // v...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. + 0x05, 0x00, 0x0a, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // ........@entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // intOutput.v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x65, 0x04, 0x00, 0x00, // oord0...G...e... + 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // ....@...H....... + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xdf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........#....... + 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // ........H....... + 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... + 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ........G...B... + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, // ".......G....... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, // ........G....... + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, // ........G...v... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ + 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... + 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x64, 0x04, 0x00, 0x00, // ............d... + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, // ............!... + 0x03, 0x09, 0x00, 0x00, 0x64, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, // ....d........... + 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x64, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // d........... ... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ...?+........... + 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, // ....,........... + 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ................ + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // +............... + 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ,............... + 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ........e....... + 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... + 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, // ....+.......j... + 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x65, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // .......e...e... + 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // j............... + 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ....e...e...e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, // e...e...e...e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // e...e....... ... + 0x5c, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... + 0x5c, 0x03, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ....B.......+... + 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ....)....... ... + 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ........e... ... + 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... + 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... + 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... + 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... + 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... + 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... + 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... + 0x9c, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... + 0x9c, 0x02, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ....v....... ... + 0x92, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... + 0x92, 0x02, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, // ............6... + 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ + 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, // ....Sa..;....... + 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........;....... + 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // .U......;....... + 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, // .8......;....... + 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ........=....... + 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // .A......=....... + 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // .?......=....... + 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, // @,......>....U.. + 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x38, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, // .A..>....8...?.. + 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, // >.......@,..9... + 0x64, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0xad, 0x11, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, // d...I&.......U.. + 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, // .8......>....... + 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, // I&..A.......T4.. + 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ........=....... + 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, // ....T4..>....... + 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // ....A........@.. + 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ........=....... + 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x76, 0x13, 0x00, 0x00, // ....@..>...v... + 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, // ...A........@.. + 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // ........=....... + 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x17, 0x00, 0x00, // .-...@..>....... + 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, // .-......8...6... + 0x64, 0x04, 0x00, 0x00, 0xad, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, // d............... + 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7...........7... + 0x95, 0x02, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, // ..../B..7....... + 0x10, 0x46, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x70, 0x1e, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .F......p...;... + 0xe1, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ............A... + 0x9a, 0x02, 0x00, 0x00, 0xbb, 0x25, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....%.......... + 0x3e, 0x00, 0x03, 0x00, 0xbb, 0x25, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >....%......A... + 0x90, 0x02, 0x00, 0x00, 0x9b, 0x49, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....I.......... + 0x3e, 0x00, 0x03, 0x00, 0x9b, 0x49, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >....I......=... + 0x18, 0x00, 0x00, 0x00, 0x46, 0x29, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // ....F)../B..Q... + 0x0d, 0x00, 0x00, 0x00, 0xcb, 0x4b, 0x00, 0x00, 0x46, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....K..F)...... + 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9b, 0x58, 0x00, 0x00, 0x46, 0x29, 0x00, 0x00, // Q........X..F).. + 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3c, 0x1a, 0x00, 0x00, // ....Q.......<... + 0x46, 0x29, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // F)......P....... + 0x14, 0x44, 0x00, 0x00, 0xcb, 0x4b, 0x00, 0x00, 0x9b, 0x58, 0x00, 0x00, 0x3c, 0x1a, 0x00, 0x00, // .D...K...X..<... + 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x80, 0x24, 0x00, 0x00, // ....A........$.. + 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, // B...)...=...e... + 0x4a, 0x35, 0x00, 0x00, 0x80, 0x24, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // J5...$.......... + 0xf6, 0x33, 0x00, 0x00, 0x14, 0x44, 0x00, 0x00, 0x4a, 0x35, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .3...D..J5..A... + 0x9a, 0x02, 0x00, 0x00, 0xb6, 0x30, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // .....0.......... + 0x3e, 0x00, 0x03, 0x00, 0xb6, 0x30, 0x00, 0x00, 0xf6, 0x33, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >....0...3..=... + 0x13, 0x00, 0x00, 0x00, 0xad, 0x32, 0x00, 0x00, 0x10, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .....2...F..A... + 0x90, 0x02, 0x00, 0x00, 0xbd, 0x4d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....M.......... + 0x3e, 0x00, 0x03, 0x00, 0xbd, 0x4d, 0x00, 0x00, 0xad, 0x32, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >....M...2..=... + 0x1d, 0x00, 0x00, 0x00, 0xae, 0x32, 0x00, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .....2......A... + 0x9a, 0x02, 0x00, 0x00, 0xbe, 0x4d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....M.......... + 0x3e, 0x00, 0x03, 0x00, 0xbe, 0x4d, 0x00, 0x00, 0xae, 0x32, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >....M...2..=... + 0x64, 0x04, 0x00, 0x00, 0xf6, 0x31, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, // d....1.......... + 0xf6, 0x31, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .1..8.... +}; +static const uint8_t vs_debugdraw_fill_texture_dx9[349] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... + 0x38, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, // 8.........!.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, // Compiler 10.1.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ + 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ................ + 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ......U......... + 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, // ................ + 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, // ................ + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, // ................ + 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, // ................ + 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. +}; +static const uint8_t vs_debugdraw_fill_texture_dx11[622] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... + 0x40, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x25, 0x0b, 0xbc, 0xf2, 0xf1, 0x2f, 0x13, 0x1a, // @...DXBC%..../.. + 0x84, 0x83, 0x08, 0xf9, 0x08, 0xa1, 0x2c, 0x84, 0x01, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, // ......,.....@... + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, // ....,........... + 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNh........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........V....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, // ................ + 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // _............... + 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, // SITION.TEXCOORD. + 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGNl........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // b............... + 0x02, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO + 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x28, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // RD..SHDR(...@... + 0x4a, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // J...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._........... + 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _...r......._... + 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // 2.......g.... .. + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // ........e.... .. + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....e...2 ...... + 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, // h.......8....... + 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....V.......F. . + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ........2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... + 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, // F............ .. + 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....F.......F. . + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // ........6.... .. + 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // ....F.......6... + 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // 2 ......F....... + 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // >...........@. +}; +static const uint8_t vs_debugdraw_fill_texture_mtl[777] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0xe4, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // ....using namesp + 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, // t xlatMtlShaderI + 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // nput {. float4 + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, // a_color0 [[attri + 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // bute(0)]];. flo + 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, // at3 a_position [ + 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, // [attribute(1)]]; + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // . float2 a_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, // oord0 [[attribut + 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // e(2)]];.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, // gl_Position [[p + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // osition]];. flo + 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, // at4 v_color0;. + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // float2 v_texcoor + 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, // d0;.};.struct xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo + 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, // rm {. float4x4 + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, // u_modelViewProj; + 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.vertex xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, // tlShaderOutput x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, // latMtlMain (xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, // MtlShaderInput _ + 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, // mtl_i [[stage_in + 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, // ]], constant xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, // tMtlShaderUnifor + 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, // m& _mtl_u [[buff + 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, // er(0)]]).{. xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // _mtl_o;. float + 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, // 4 tmpvar_1 = 0;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, // tmpvar_1.w = 1 + 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, // .0;. tmpvar_1.x + 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, // yz = _mtl_i.a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // sition;. _mtl_o + 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, // .gl_Position = ( + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // _mtl_u.u_modelVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ewProj * tmpvar_ + 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x74, // 1);. _mtl_o.v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // excoord0 = _mtl_ + 0x69, 0x2e, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, // i.a_texcoord0;. + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // _mtl_o.v_color0 + 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // = _mtl_i.a_colo + 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, // r0;. return _mt + 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // l_o;.}... +}; +extern const uint8_t* vs_debugdraw_fill_texture_pssl; +extern const uint32_t vs_debugdraw_fill_texture_pssl_size; diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_texture.sc b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_texture.sc new file mode 100644 index 0000000..e5d82b8 --- /dev/null +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_texture.sc @@ -0,0 +1,16 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_color0 + +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include + +void main() +{ + gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); + v_texcoord0 = a_texcoord0; + v_color0 = a_color0; +} diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines.bin.h b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines.bin.h index bd669a2..9dcca12 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines.bin.h +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_debugdraw_lines_glsl[325] = { - 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod + 0x56, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x20, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ...attribute hi 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color @@ -22,243 +22,239 @@ static const uint8_t vs_debugdraw_lines_glsl[325] = 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, // lor0 = a_color0; 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... }; -static const uint8_t vs_debugdraw_lines_spv[2763] = +static const uint8_t vs_debugdraw_lines_spv[2697] = { - 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod + 0x56, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... - 0xa8, 0x0a, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x54, 0x61, // ....#.........Ta - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ - 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 - 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. - 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0xd8, 0x0c, // in.............. - 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x4f, 0x75, // in........8...Ou - 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x00, 0x00, // tput......8..... - 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, // ..gl_Position... - 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ..8.......v_colo - 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0x40, 0x6d, // r0............@m - 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, // ain(vf4;vf3;.... - 0x05, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ...H..a_color0.. - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x47, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ......,G..a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, // tion.........._v - 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x99, 0x02, // arying_......... - 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, // ..$Global....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, // ......u_viewRect - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, // viewTexel....... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, // ......u_view.... - 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV - 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x04, 0x00, // iew............. - 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, // ..u_proj........ - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, // ......u_invProj. - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x99, 0x02, // viewProj........ - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, // ......u_invViewP - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x08, 0x00, // roj............. - 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, // ..u_model....... - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie - 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, // w.............u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, // modelViewProj... - 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, // ..........u_alph - 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, // aRef4.....B..... - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .......A..a_colo - 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, // r0............a_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, // color0........,? - 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, // ..a_position.... - 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // ......a_position - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, // ..........flatte - 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, // nTemp......U..pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, // ram...........pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, // ram...........@e - 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, // ntryPointOutput_ - 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, // gl_Position..... - 0x04, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, // ......Output.... - 0x06, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ..........v_colo - 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x40, 0x65, // r0............@e - 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, // ntryPointOutput. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x37, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, // ..G...7.......@. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x01, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, // ..#.......H..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. - 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, // ..`...H......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, // ......H......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. - 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, // ..`...H......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, // ......H......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x99, 0x02, 0x00, 0x00, 0x02, 0x00, // .. ...G......... - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G...B..."..... - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, // ..G............. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. - 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, // ..........!..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, // .. ............. - 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......8......... - 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xc6, 0x07, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x9a, 0x02, // ..!.......8..... - 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, // ..8........... . - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, // ......+......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, // ......+......... - 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, // .....?+......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, // ......,......... - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, // ................ - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. - 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, // ......e......... - 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, // ..+.......j... . - 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x37, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, // ......7...e...j. - 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x99, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, // ................ - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x37, 0x02, 0x00, 0x00, 0x65, 0x00, // ..e...e...7...e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x05, // ..e....... ..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x99, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x16, 0x05, // ..........;..... - 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..B.......+..... - 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, // ..)....... ..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, // ......e... ..... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, // ..........;..... - 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, // .......... ..... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, // ..........;..... - 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, // .......... ..... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, // ..........;..... - 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0xf9, 0x03, // ................ - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x76, 0x06, 0x00, 0x00, 0x03, 0x00, // ...... ...v..... - 0x00, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x76, 0x06, 0x00, 0x00, 0xcd, 0x0f, // ......;...v..... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, // ......6......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, // ..............Sa - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, // ..;............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, // ..;........U.... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, // ..;............. - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x89, 0x14, // ..=........A.... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, 0x14, // ..=.......,?.... - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, // ..>....U...A..>. - 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x38, 0x04, // ......,?..9...8. - 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, // ..I&.......U.... - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, // ..>.......I&..A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, // ......T4........ - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, // ..=...........T4 - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, // ..>...........A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, // ......'A........ - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, // ..=...........'A - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xcd, 0x0f, // ..A............. - 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xdf, 0x1c, // ......>......... - 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x38, 0x04, // ......8...6...8. - 0x00, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x07, 0x00, 0x00, 0x37, 0x00, // ..............7. - 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, // .......H..7..... - 0x00, 0x00, 0x2c, 0x47, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x51, 0x1d, 0x00, 0x00, 0x3b, 0x00, // ..,G......Q...;. - 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, // ..............A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x50, 0x24, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, // ......P$........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x50, 0x24, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x3d, 0x00, // ..>...P$......=. - 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, 0x2c, 0x47, 0x00, 0x00, 0x51, 0x00, // ......'(..,G..Q. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xac, 0x4a, 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, 0x00, 0x00, // .......J..'(.... - 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x7c, 0x57, 0x00, 0x00, 0x27, 0x28, // ..Q.......|W..'( - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1d, 0x19, // ......Q......... - 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, // ..'(......P..... - 0x00, 0x00, 0xf5, 0x42, 0x00, 0x00, 0xac, 0x4a, 0x00, 0x00, 0x7c, 0x57, 0x00, 0x00, 0x1d, 0x19, // ...B...J..|W.... - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x61, 0x23, // ......A.......a# - 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, // ..B...)...=...e. - 0x00, 0x00, 0x2b, 0x34, 0x00, 0x00, 0x61, 0x23, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, // ..+4..a#........ - 0x00, 0x00, 0xd7, 0x32, 0x00, 0x00, 0xf5, 0x42, 0x00, 0x00, 0x2b, 0x34, 0x00, 0x00, 0x41, 0x00, // ...2...B..+4..A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x97, 0x2f, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, // ......./........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x2f, 0x00, 0x00, 0xd7, 0x32, 0x00, 0x00, 0x3d, 0x00, // ..>..../...2..=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8e, 0x31, 0x00, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x41, 0x00, // .......1...H..A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9e, 0x4c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, // .......L........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9e, 0x4c, 0x00, 0x00, 0x8e, 0x31, 0x00, 0x00, 0x3d, 0x00, // ..>....L...1..=. - 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x30, 0x19, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, // ..8...0......... - 0x02, 0x00, 0x30, 0x19, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..0...8.... + 0x64, 0x0a, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, // d.....#......... + 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // Ta.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // main............ + 0x95, 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, // ....v........... + 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, // ............main + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, // ........8...Outp + 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ut......8....... + 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, // gl_Position..... + 0x38, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // 8.......v_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // ............@mai + 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // n(vf4;vf3;...... + 0xf5, 0x48, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // .H..a_color0.... + 0x05, 0x00, 0x05, 0x00, 0x2c, 0x47, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // ....,G..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, // on.........._var + 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // ying_........... + 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, // $Global......... + 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, // ....u_viewRect.. + 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ewTexel......... + 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_view...... + 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ........u_invVie + 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // w............... + 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, // u_proj.......... + 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // ....u_invProj... + 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x99, 0x02, 0x00, 0x00, // ewProj.......... + 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ....u_invViewPro + 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // j............... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, // u_model......... + 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, // ....u_modelView. + 0x06, 0x00, 0x07, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, // delViewProj..... + 0x99, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, // ........u_alphaR + 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ef4.....B....... + 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // .....A..a_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, // ............a_co + 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, // lor0........,?.. + 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_position...... + 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, // ....a_position.. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x76, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // v...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. + 0x47, 0x00, 0x04, 0x00, 0x37, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // G...7.......@... + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....H........... + 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // #.......H....... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... + 0x99, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // `...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x99, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... + 0x99, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // `...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x99, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x99, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x99, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...G........... + 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...B..."....... + 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G............... + 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // G............... + 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G............... + 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...v........... + 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, // ........!....... + 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... + 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... + 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... + 0x1e, 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....8........... + 0x21, 0x00, 0x05, 0x00, 0xc6, 0x07, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, // !.......8....... + 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x38, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // 8........... ... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ...?+........... + 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, // ....,........... + 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ................ + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... + 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....e........... + 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ....... + 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // +.......j... ... + 0x1c, 0x00, 0x04, 0x00, 0x37, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, // ....7...e...j... + 0x1e, 0x00, 0x0e, 0x00, 0x99, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ................ + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x37, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...7...e... + 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x05, 0x00, 0x00, // e....... ....... + 0x02, 0x00, 0x00, 0x00, 0x99, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x16, 0x05, 0x00, 0x00, // ........;....... + 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // B.......+....... + 0x29, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, // )....... ....... + 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, // ....e... ....... + 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, // ........;....... + 0x89, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, // ........ ....... + 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, // ........;....... + 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, // ........ ....... + 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, // ........;....... + 0x95, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, // ........;....... + 0x76, 0x13, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, // v.......6....... + 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // ................ + 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, // Sa..;........... + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, // ....;........U.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // ....;........... + 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, // ....=........A.. + 0x89, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, // ....=.......,?.. + 0xa6, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, // ....>....U...A.. + 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, // >.......,?..9... + 0x38, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, // 8...I&.......U.. + 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, // ....>.......I&.. + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, // A.......T4...... + 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, // ....=........... + 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, // T4..>........... + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, // A........@...... + 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, // ....=........-.. + 0xee, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x76, 0x13, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, // .@..>...v....-.. + 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x38, 0x04, 0x00, 0x00, // ....8...6...8... + 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // ............7... + 0x9a, 0x02, 0x00, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, // .....H..7....... + 0x2c, 0x47, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x51, 0x1d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ,G......Q...;... + 0xb5, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ............A... + 0x9a, 0x02, 0x00, 0x00, 0x50, 0x24, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....P$.......... + 0x3e, 0x00, 0x03, 0x00, 0x50, 0x24, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >...P$......=... + 0x18, 0x00, 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, 0x2c, 0x47, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // ....'(..,G..Q... + 0x0d, 0x00, 0x00, 0x00, 0xac, 0x4a, 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....J..'(...... + 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x7c, 0x57, 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, // Q.......|W..'(.. + 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1d, 0x19, 0x00, 0x00, // ....Q........... + 0x27, 0x28, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // '(......P....... + 0xf5, 0x42, 0x00, 0x00, 0xac, 0x4a, 0x00, 0x00, 0x7c, 0x57, 0x00, 0x00, 0x1d, 0x19, 0x00, 0x00, // .B...J..|W...... + 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x61, 0x23, 0x00, 0x00, // ....A.......a#.. + 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, // B...)...=...e... + 0x2b, 0x34, 0x00, 0x00, 0x61, 0x23, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // +4..a#.......... + 0xd7, 0x32, 0x00, 0x00, 0xf5, 0x42, 0x00, 0x00, 0x2b, 0x34, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .2...B..+4..A... + 0x9a, 0x02, 0x00, 0x00, 0x97, 0x2f, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ...../.......... + 0x3e, 0x00, 0x03, 0x00, 0x97, 0x2f, 0x00, 0x00, 0xd7, 0x32, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >..../...2..=... + 0x1d, 0x00, 0x00, 0x00, 0x8e, 0x31, 0x00, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .....1...H..A... + 0x9a, 0x02, 0x00, 0x00, 0x9e, 0x4c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....L.......... + 0x3e, 0x00, 0x03, 0x00, 0x9e, 0x4c, 0x00, 0x00, 0x8e, 0x31, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >....L...1..=... + 0x38, 0x04, 0x00, 0x00, 0x30, 0x19, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, // 8...0........... + 0x30, 0x19, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // 0...8.... }; -static const uint8_t vs_debugdraw_lines_dx9[311] = +static const uint8_t vs_debugdraw_lines_dx9[313] = { - 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod + 0x56, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x14, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........!.CTAB.. - 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, // modelViewProj... - 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs - 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( - 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, // ompiler 10.1.... - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ - 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ - 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... + 0x14, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, // ..........!.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, // Compiler 10.1.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ + 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, // ................ + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, // ..............U. + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, // ................ + 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, // ................ + 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... }; -static const uint8_t vs_debugdraw_lines_dx11[510] = +static const uint8_t vs_debugdraw_lines_dx11[512] = { - 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod + 0x56, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0xd4, 0x01, 0x44, 0x58, 0x42, 0x43, 0x32, 0x9b, 0xdd, 0xb5, 0xa9, 0xb7, 0x22, 0xf0, 0xcf, 0x5e, // ..DXBC2....."..^ - 0x34, 0x2c, 0x72, 0xf0, 0x87, 0x00, 0x01, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x03, 0x00, // 4,r............. - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...|.......IS - 0x47, 0x4e, 0x48, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, // GNH...........8. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......>......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x43, 0x4f, // ..............CO - 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0x4f, 0x53, // LOR.POSITION..OS - 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, // GNL...........8. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......D......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, // ..............SV - 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, // _POSITION.COLOR. - 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xfc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x3f, 0x00, // ..SHDR....@...?. - 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ..Y...F. ....... - 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, // .._..........._. - 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, // ..r.......g.... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, // ..........e.... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, // ......h.......8. - 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, // ..........V..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, // ..F. .........2. - 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..........F. ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, // ..............F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, // ..F. ........... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F......... - 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, // ..F. .........6. - 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x05, 0x00, 0x01, 0x00, 0x40, 0x00, // ..>.........@. + 0xd4, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x32, 0x9b, 0xdd, 0xb5, 0xa9, 0xb7, 0x22, 0xf0, // ....DXBC2.....". + 0xcf, 0x5e, 0x34, 0x2c, 0x72, 0xf0, 0x87, 0x00, 0x01, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, // .^4,r........... + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, // ....,...|....... + 0x49, 0x53, 0x47, 0x4e, 0x48, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNH........... + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // 8............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........>....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, // ................ + 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, // COLOR.POSITION.. + 0x4f, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGNL........... + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // 8............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........D....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, // SV_POSITION.COLO + 0x52, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xfc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // R...SHDR....@... + 0x3f, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // ?...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._........... + 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, // _...r.......g... + 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, // . ..........e... + 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, // . ......h....... + 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, // 8...........V... + 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....F. ......... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // F.......2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....F. ......... + 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ..... ......F... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....F. ......... + 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F... + 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x05, 0x00, 0x01, 0x00, 0x40, 0x00, // ....>.........@. }; static const uint8_t vs_debugdraw_lines_mtl[673] = { - 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod + 0x56, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x7c, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // |...using namesp 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines.sc b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines.sc index a709737..bfb5c73 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines.sc @@ -2,7 +2,7 @@ $input a_position, a_color0 $output v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines_stipple.bin.h b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines_stipple.bin.h index 65a08ad..f235877 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines_stipple.bin.h +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines_stipple.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_debugdraw_lines_stipple_glsl[419] = { - 0x56, 0x53, 0x48, 0x04, 0xe7, 0x1a, 0x5a, 0xef, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...Z....u_mod + 0x56, 0x53, 0x48, 0x05, 0xe7, 0x1a, 0x5a, 0xef, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...Z....u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x7e, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ~...attribute hi 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color @@ -28,284 +28,282 @@ static const uint8_t vs_debugdraw_lines_stipple_glsl[419] = 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x3b, 0x0a, 0x7d, // a_texcoord0.x;.} 0x0a, 0x0a, 0x00, // ... }; -static const uint8_t vs_debugdraw_lines_stipple_spv[3279] = +static const uint8_t vs_debugdraw_lines_stipple_spv[3237] = { - 0x56, 0x53, 0x48, 0x04, 0xe7, 0x1a, 0x5a, 0xef, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...Z....u_mod + 0x56, 0x53, 0x48, 0x05, 0xe7, 0x1a, 0x5a, 0xef, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...Z....u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... - 0xac, 0x0c, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x54, 0x61, // ....#.........Ta - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ - 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 - 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. - 0x00, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, // in.............. - 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ - 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4c, 0x04, // ..main........L. - 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x4c, 0x04, // ..Output......L. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // ......gl_Positio - 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, // n.....L.......v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x4c, 0x04, // color0........L. - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x73, 0x74, 0x69, 0x70, 0x70, 0x6c, 0x65, 0x00, // ......v_stipple. - 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xad, 0x11, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, // ..........@main( - 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, // vf4;vf3;vf2;.... - 0x05, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ......a_color0.. - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ....../B..a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x10, 0x46, 0x00, 0x00, 0x61, 0x5f, // tion.......F..a_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, // texcoord0....... - 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, // .._varying_..... - 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, // ......$Global... - 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x01, 0x00, // Rect............ - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, // ..u_viewTexel... - 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xdf, 0x00, // invView......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ......u_proj.... - 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, // ..........u_invP - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, // roj............. - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ..u_viewProj.... - 0x07, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xdf, 0x00, // iewProj......... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, // ......u_model... - 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode - 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, // lView........... - 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ..u_modelViewPro - 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, // j.............u_ - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, // alphaRef4.....B. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x61, 0x5f, // ...........A..a_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, // color0.......... - 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..a_color0...... - 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // ...?..a_position - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ..........a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x61, 0x5f, // tion......@,..a_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, // texcoord0....... - 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..a_texcoord0... - 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, // ......flattenTem - 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // p......U..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......8..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ..........param. - 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, // ..........@entry - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, // PointOutput_gl_P - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x08, 0x04, // osition......... - 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x08, 0x04, // ..Output........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ......v_color0.. - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x08, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, // ..............v_ - 0x73, 0x74, 0x69, 0x70, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, // stipple......... - 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, // ..@entryPointOut - 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x65, 0x04, 0x00, 0x00, 0x06, 0x00, // put...G...e..... - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, // ..@...H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, // ..#.......H..... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, // ..........#... . - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, // ..#...`...H..... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, // ..#.......H..... - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, // ..........#... . - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, // ..#...`...H..... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, // ..#.......H..... - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0b, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xdf, 0x00, // ..#... ...G..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, // ......G...B...". - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. - 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x1d, 0x00, // ..........L..... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xd3, 0x08, // ..........!..... - 0x00, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x90, 0x02, // ..L............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xc9, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x4c, 0x04, // .. ...........L. - 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, // ..+............. - 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, // .?+............. - 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, // ..,............. - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. - 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. - 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, // ................ - 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, // ..e............. - 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. - 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, // ......j... ..... - 0x04, 0x00, 0x65, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, // ..e...e...j..... - 0x0e, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, // ..............e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x5c, 0x03, 0x00, 0x00, 0x02, 0x00, // ...... ......... - 0x00, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x5c, 0x03, 0x00, 0x00, 0x42, 0x13, // ......;.......B. - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, // ......+.......). - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, // ...... ......... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, // ..e...+......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, // ......;......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, // ......;......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... - 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, // ......;......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd8, 0x0c, // ......;......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x08, 0x04, 0x00, 0x00, 0x1d, 0x00, // ................ - 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x85, 0x06, 0x00, 0x00, 0x03, 0x00, // ...... ......... - 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x85, 0x06, 0x00, 0x00, 0xcd, 0x0f, // ......;......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... - 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, // ......6......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, // ..............Sa - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xc9, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, // ..;............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, // ..;........U.... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, // ..;........8.... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, // ..;............. - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, // ..=........A.... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, // ..=........?.... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, // ..=.......@,.... - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, // ..>....U...A..>. - 0x03, 0x00, 0x95, 0x38, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, // ...8...?..>..... - 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x49, 0x26, // ..@,..9...L...I& - 0x00, 0x00, 0xad, 0x11, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, // .......U...8.... - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, // ..>.......I&..A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, // ......T4........ - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, // ..=...........T4 - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, // ..>...........A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, // ......'A........ - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, // ..=...........'A - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xcd, 0x0f, // ..A........N.... - 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xdf, 0x1c, // ......>....N.... - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x08, 0x10, // ..A........M.... - 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe0, 0x1c, // ......=......... - 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x01, 0x5c, // ...M..A......... - 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, // ..........>..... - 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ..........8...6. - 0x05, 0x00, 0x4c, 0x04, 0x00, 0x00, 0xad, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x08, // ..L............. - 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x37, 0x00, // ..7...........7. - 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ....../B..7..... - 0x00, 0x00, 0x10, 0x46, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x70, 0x1e, 0x00, 0x00, 0x3b, 0x00, // ...F......p...;. - 0x04, 0x00, 0xc9, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, // ..............A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbb, 0x25, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, // .......%........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbb, 0x25, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, // ..>....%......A. - 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x9b, 0x49, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, // .......I........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9b, 0x49, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..>....I......=. - 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x46, 0x29, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x51, 0x00, // ......F)../B..Q. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcb, 0x4b, 0x00, 0x00, 0x46, 0x29, 0x00, 0x00, 0x00, 0x00, // .......K..F).... - 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9b, 0x58, 0x00, 0x00, 0x46, 0x29, // ..Q........X..F) - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3c, 0x1a, // ......Q.......<. - 0x00, 0x00, 0x46, 0x29, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, // ..F)......P..... - 0x00, 0x00, 0x14, 0x44, 0x00, 0x00, 0xcb, 0x4b, 0x00, 0x00, 0x9b, 0x58, 0x00, 0x00, 0x3c, 0x1a, // ...D...K...X..<. - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x80, 0x24, // ......A........$ - 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, // ..B...)...=...e. - 0x00, 0x00, 0x4a, 0x35, 0x00, 0x00, 0x80, 0x24, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, // ..J5...$........ - 0x00, 0x00, 0xf6, 0x33, 0x00, 0x00, 0x14, 0x44, 0x00, 0x00, 0x4a, 0x35, 0x00, 0x00, 0x41, 0x00, // ...3...D..J5..A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb6, 0x30, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, // .......0........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb6, 0x30, 0x00, 0x00, 0xf6, 0x33, 0x00, 0x00, 0x3d, 0x00, // ..>....0...3..=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xad, 0x32, 0x00, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x41, 0x00, // .......2......A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x09, 0x4e, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, // .......N........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x09, 0x4e, 0x00, 0x00, 0xad, 0x32, 0x00, 0x00, 0x41, 0x00, // ..>....N...2..A. - 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x94, 0x4a, 0x00, 0x00, 0x10, 0x46, 0x00, 0x00, 0x0a, 0x0a, // .......J...F.... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x94, 0x4a, // ..=............J - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x95, 0x4a, 0x00, 0x00, 0x0f, 0x12, // ..A........J.... - 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x4a, 0x00, 0x00, 0xb2, 0x19, // ......>....J.... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x4c, 0x04, 0x00, 0x00, 0xf6, 0x31, 0x00, 0x00, 0x0f, 0x12, // ..=...L....1.... - 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xf6, 0x31, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .......1..8.... + 0x80, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, // ......#......... + 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // Ta.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // main............ + 0x95, 0x0e, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0xfb, 0x0b, 0x00, 0x00, // ........v....... + 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ + 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....main........ + 0x4c, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // L...Output...... + 0x4c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // L.......gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ion.....L....... + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // v_color0........ + 0x4c, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x73, 0x74, 0x69, 0x70, 0x70, 0x6c, // L.......v_stippl + 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xad, 0x11, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // e...........@mai + 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, // n(vf4;vf3;vf2;.. + 0x05, 0x00, 0x05, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ........a_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // ......../B..a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x10, 0x46, 0x00, 0x00, // sition.......F.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, // ...._varying_... + 0x05, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ........$Global. + 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, // ewRect.......... + 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. + 0x06, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew.............. + 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... + 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ........u_proj.. + 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, // vProj........... + 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. + 0x06, 0x00, 0x07, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... + 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // ........u_model. + 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xdf, 0x00, 0x00, 0x00, // delView......... + 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP + 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj............. + 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, // u_alphaRef4..... + 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, // B............A.. + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_color0........ + 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ....a_color0.... + 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // .....?..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // on..........a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, // sition......@,.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // ....a_texcoord0. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m........8..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x76, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // v...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. + 0x05, 0x00, 0x09, 0x00, 0xfb, 0x0b, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // ........@entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x73, 0x74, 0x69, 0x70, // intOutput.v_stip + 0x70, 0x6c, 0x65, 0x00, 0x47, 0x00, 0x04, 0x00, 0x65, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ple.G...e....... + 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // @...H........... + 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // #.......H....... + 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ....#.......H... + 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... + 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ........#... ... + 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....H........... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....H........... + 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // #...`...H....... + 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... + 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, // ........#....... + 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... + 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // #.......H....... + 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... + 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, // ........#... ... + 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....H........... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....H........... + 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // #...`...H....... + 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... + 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, // ........#....... + 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... + 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, // #.......H....... + 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... + 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, // ........#....... + 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // ....H........... + 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xdf, 0x00, 0x00, 0x00, // #... ...G....... + 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, // ....G...B..."... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G........... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G........... + 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G........... + 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // ....G........... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G...v....... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xfb, 0x0b, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G........... + 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, // ............!... + 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ............... + 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ........L....... + 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xd3, 0x08, 0x00, 0x00, // ........!....... + 0x4c, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, // L............... + 0x20, 0x00, 0x04, 0x00, 0xc9, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x4c, 0x04, 0x00, 0x00, // ...........L... + 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........ ....... + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // +............... + 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, // +..............? + 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... + 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ,............... + 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... + 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ + 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... + 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... + 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... + 0x65, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // e...e...j....... + 0xdf, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x5c, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0xdf, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x5c, 0x03, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // ....;.......B... + 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, // ....+.......)... + 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x65, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, // e...+........... + 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, // ....;.......v... + 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xfb, 0x0b, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. + 0x3b, 0x00, 0x04, 0x00, 0xc9, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... + 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........8...... + 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // =........A...... + 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // =........?...... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // =.......@,...... + 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....U...A..>... + 0x95, 0x38, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, // .8...?..>....... + 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x4c, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, // @,..9...L...I&.. + 0xad, 0x11, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // .....U...8...... + 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >.......I&..A... + 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....T4.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, // =...........T4.. + 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...........A... + 0x9a, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // =....... ....@.. + 0x3e, 0x00, 0x03, 0x00, 0x76, 0x13, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...v... ...A... + 0x8a, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, // =........-...@.. + 0x3e, 0x00, 0x03, 0x00, 0xfb, 0x0b, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >........-...... + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x4c, 0x04, 0x00, 0x00, 0xad, 0x11, 0x00, 0x00, // 8...6...L....... + 0x00, 0x00, 0x00, 0x00, 0xd3, 0x08, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........7....... + 0xe2, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, // ....7......./B.. + 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x10, 0x46, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7........F...... + 0x70, 0x1e, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xc9, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // p...;........... + 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbb, 0x25, 0x00, 0x00, // ....A........%.. + 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbb, 0x25, 0x00, 0x00, // ........>....%.. + 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x9b, 0x49, 0x00, 0x00, // ....A........I.. + 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9b, 0x49, 0x00, 0x00, // ........>....I.. + 0x0c, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x46, 0x29, 0x00, 0x00, // ....=.......F).. + 0x2f, 0x42, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcb, 0x4b, 0x00, 0x00, // /B..Q........K.. + 0x46, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // F)......Q....... + 0x9b, 0x58, 0x00, 0x00, 0x46, 0x29, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // .X..F)......Q... + 0x0d, 0x00, 0x00, 0x00, 0x3c, 0x1a, 0x00, 0x00, 0x46, 0x29, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....<...F)...... + 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x14, 0x44, 0x00, 0x00, 0xcb, 0x4b, 0x00, 0x00, // P........D...K.. + 0x9b, 0x58, 0x00, 0x00, 0x3c, 0x1a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .X..<.......A... + 0xe2, 0x02, 0x00, 0x00, 0x80, 0x24, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, // .....$..B...)... + 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x4a, 0x35, 0x00, 0x00, 0x80, 0x24, 0x00, 0x00, // =...e...J5...$.. + 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf6, 0x33, 0x00, 0x00, 0x14, 0x44, 0x00, 0x00, // .........3...D.. + 0x4a, 0x35, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb6, 0x30, 0x00, 0x00, // J5..A........0.. + 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb6, 0x30, 0x00, 0x00, // ........>....0.. + 0xf6, 0x33, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xad, 0x32, 0x00, 0x00, // .3..=........2.. + 0xe2, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x09, 0x4e, 0x00, 0x00, // ....A........N.. + 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x09, 0x4e, 0x00, 0x00, // ........>....N.. + 0xad, 0x32, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x94, 0x4a, 0x00, 0x00, // .2..A........J.. + 0x10, 0x46, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .F......=....... + 0xb2, 0x19, 0x00, 0x00, 0x94, 0x4a, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, // .....J..A....... + 0x95, 0x4a, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .J..........>... + 0x95, 0x4a, 0x00, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x4c, 0x04, 0x00, 0x00, // .J......=...L... + 0xf6, 0x31, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xf6, 0x31, 0x00, 0x00, // .1...........1.. + 0x38, 0x00, 0x01, 0x00, 0x00, // 8.... }; -static const uint8_t vs_debugdraw_lines_stipple_dx9[347] = +static const uint8_t vs_debugdraw_lines_stipple_dx9[349] = { - 0x56, 0x53, 0x48, 0x04, 0xe7, 0x1a, 0x5a, 0xef, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...Z....u_mod + 0x56, 0x53, 0x48, 0x05, 0xe7, 0x1a, 0x5a, 0xef, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...Z....u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x38, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // 8.......!.CTAB.. - 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, // modelViewProj... - 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs - 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( - 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, // ompiler 10.1.... - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x00, 0x80, 0x02, 0x00, 0x01, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ - 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, // ................ - 0x01, 0xe0, 0x02, 0x00, 0x00, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ........... + 0x38, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, // 8.........!.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, // Compiler 10.1.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ + 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x01, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ................ + 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ......U......... + 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, // ................ + 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, // ................ + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, // ................ + 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, // ................ + 0x02, 0x00, 0x01, 0xe0, 0x02, 0x00, 0x00, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. }; -static const uint8_t vs_debugdraw_lines_stipple_dx11[620] = +static const uint8_t vs_debugdraw_lines_stipple_dx11[622] = { - 0x56, 0x53, 0x48, 0x04, 0xe7, 0x1a, 0x5a, 0xef, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...Z....u_mod + 0x56, 0x53, 0x48, 0x05, 0xe7, 0x1a, 0x5a, 0xef, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...Z....u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x40, 0x02, 0x44, 0x58, 0x42, 0x43, 0xdc, 0x27, 0x18, 0xb1, 0x2d, 0xea, 0xb1, 0x79, 0x0a, 0x20, // @.DXBC.'..-..y. - 0xf3, 0x0f, 0x0b, 0xfd, 0x09, 0x50, 0x01, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x03, 0x00, // .....P....@..... - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS - 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNh...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......V......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x5f, 0x00, // .............._. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, // ......COLOR.POSI - 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, // TION.TEXCOORD.OS - 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNl...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, // ..............b. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x01, 0x0e, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO - 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // N.COLOR.TEXCOORD - 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x28, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x4a, 0x00, // ..SHDR(...@...J. - 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ..Y...F. ....... - 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, // .._..........._. - 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x12, 0x10, // ..r......._..... - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......g.... .... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, // ......e.... .... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x12, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, // ..e.... ......h. - 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8......... - 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..V.......F. ... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, // ..F. ........... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, // ......F.......2. - 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..........F. ... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, // ..............F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ........... .... - 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..F.......F. ... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, // ......6.... .... - 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x12, 0x20, // ..F.......6.... - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, // ..............>. - 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ..........@. + 0x40, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xdc, 0x27, 0x18, 0xb1, 0x2d, 0xea, 0xb1, 0x79, // @...DXBC.'..-..y + 0x0a, 0x20, 0xf3, 0x0f, 0x0b, 0xfd, 0x09, 0x50, 0x01, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, // . .....P....@... + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, // ....,........... + 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNh........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........V....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, // ................ + 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // _............... + 0x02, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, // SITION.TEXCOORD. + 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGNl........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // b............... + 0x02, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO + 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x28, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // RD..SHDR(...@... + 0x4a, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // J...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._........... + 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _...r......._... + 0x12, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // ........g.... .. + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // ........e.... .. + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x12, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....e.... ...... + 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, // h.......8....... + 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....V.......F. . + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ........2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... + 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, // F............ .. + 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....F.......F. . + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // ........6.... .. + 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // ....F.......6... + 0x12, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // . .............. + 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // >...........@. }; static const uint8_t vs_debugdraw_lines_stipple_mtl[774] = { - 0x56, 0x53, 0x48, 0x04, 0xe7, 0x1a, 0x5a, 0xef, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...Z....u_mod + 0x56, 0x53, 0x48, 0x05, 0xe7, 0x1a, 0x5a, 0xef, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH...Z....u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0xe1, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // ....using namesp 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines_stipple.sc b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines_stipple.sc index 9e027b8..91b2d8b 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines_stipple.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_lines_stipple.sc @@ -2,7 +2,7 @@ $input a_position, a_color0, a_texcoord0 $output v_color0, v_stipple /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/entry/cmd.cpp b/3rdparty/bgfx/examples/common/entry/cmd.cpp index ae3d14d..441bbfa 100644 --- a/3rdparty/bgfx/examples/common/entry/cmd.cpp +++ b/3rdparty/bgfx/examples/common/entry/cmd.cpp @@ -1,11 +1,12 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include -#include #include +#include +#include #include "dbg.h" #include "cmd.h" @@ -28,7 +29,7 @@ struct CmdContext void add(const char* _name, ConsoleFn _fn, void* _userData) { - uint32_t cmd = bx::hashMurmur2A(_name, (uint32_t)bx::strnlen(_name) ); + uint32_t cmd = bx::hash(_name, (uint32_t)bx::strLen(_name) ); BX_CHECK(m_lookup.end() == m_lookup.find(cmd), "Command \"%s\" already exist.", _name); Func fn = { _fn, _userData }; m_lookup.insert(stl::make_pair(cmd, fn) ); @@ -46,7 +47,7 @@ struct CmdContext if (argc > 0) { int err = -1; - uint32_t cmd = bx::hashMurmur2A(argv[0], (uint32_t)bx::strnlen(argv[0]) ); + uint32_t cmd = bx::hash(argv[0], (uint32_t)bx::strLen(argv[0]) ); CmdLookup::iterator it = m_lookup.find(cmd); if (it != m_lookup.end() ) { @@ -104,7 +105,14 @@ void cmdAdd(const char* _name, ConsoleFn _fn, void* _userData) s_cmdContext->add(_name, _fn, _userData); } -void cmdExec(const char* _cmd) +void cmdExec(const char* _format, ...) { - s_cmdContext->exec(_cmd); + char tmp[2048]; + + va_list argList; + va_start(argList, _format); + bx::vsnprintf(tmp, BX_COUNTOF(tmp), _format, argList); + va_end(argList); + + s_cmdContext->exec(tmp); } diff --git a/3rdparty/bgfx/examples/common/entry/cmd.h b/3rdparty/bgfx/examples/common/entry/cmd.h index 2fa1ad4..27523d1 100644 --- a/3rdparty/bgfx/examples/common/entry/cmd.h +++ b/3rdparty/bgfx/examples/common/entry/cmd.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -19,6 +19,6 @@ void cmdShutdown(); void cmdAdd(const char* _name, ConsoleFn _fn, void* _userData = NULL); /// -void cmdExec(const char* _cmd); +void cmdExec(const char* _format, ...); #endif // CMD_H_HEADER_GUARD diff --git a/3rdparty/bgfx/examples/common/entry/dbg.cpp b/3rdparty/bgfx/examples/common/entry/dbg.cpp deleted file mode 100644 index edefcae..0000000 --- a/3rdparty/bgfx/examples/common/entry/dbg.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2011-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -#include -#include -#include -#include // isprint - -#include "dbg.h" -#include -#include - -void dbgPrintfVargs(const char* _format, va_list _argList) -{ - char temp[8192]; - char* out = temp; - int32_t len = bx::vsnprintf(out, sizeof(temp), _format, _argList); - if ( (int32_t)sizeof(temp) < len) - { - out = (char*)alloca(len+1); - len = bx::vsnprintf(out, len, _format, _argList); - } - out[len] = '\0'; - bx::debugOutput(out); -} - -void dbgPrintf(const char* _format, ...) -{ - va_list argList; - va_start(argList, _format); - dbgPrintfVargs(_format, argList); - va_end(argList); -} - -#define DBG_ADDRESS "%" PRIxPTR - -void dbgPrintfData(const void* _data, uint32_t _size, const char* _format, ...) -{ -#define HEX_DUMP_WIDTH 16 -#define HEX_DUMP_SPACE_WIDTH 48 -#define HEX_DUMP_FORMAT "%-" DBG_STRINGIZE(HEX_DUMP_SPACE_WIDTH) "." DBG_STRINGIZE(HEX_DUMP_SPACE_WIDTH) "s" - - va_list argList; - va_start(argList, _format); - dbgPrintfVargs(_format, argList); - va_end(argList); - - dbgPrintf("\ndata: " DBG_ADDRESS ", size: %d\n", _data, _size); - - if (NULL != _data) - { - const uint8_t* data = reinterpret_cast(_data); - char hex[HEX_DUMP_WIDTH*3+1]; - char ascii[HEX_DUMP_WIDTH+1]; - uint32_t hexPos = 0; - uint32_t asciiPos = 0; - for (uint32_t ii = 0; ii < _size; ++ii) - { - bx::snprintf(&hex[hexPos], sizeof(hex)-hexPos, "%02x ", data[asciiPos]); - hexPos += 3; - - ascii[asciiPos] = isprint(data[asciiPos]) ? data[asciiPos] : '.'; - asciiPos++; - - if (HEX_DUMP_WIDTH == asciiPos) - { - ascii[asciiPos] = '\0'; - dbgPrintf("\t" DBG_ADDRESS "\t" HEX_DUMP_FORMAT "\t%s\n", data, hex, ascii); - data += asciiPos; - hexPos = 0; - asciiPos = 0; - } - } - - if (0 != asciiPos) - { - ascii[asciiPos] = '\0'; - dbgPrintf("\t" DBG_ADDRESS "\t" HEX_DUMP_FORMAT "\t%s\n", data, hex, ascii); - } - } - -#undef HEX_DUMP_WIDTH -#undef HEX_DUMP_SPACE_WIDTH -#undef HEX_DUMP_FORMAT -} diff --git a/3rdparty/bgfx/examples/common/entry/dbg.h b/3rdparty/bgfx/examples/common/entry/dbg.h index 06a228e..2a50e7a 100644 --- a/3rdparty/bgfx/examples/common/entry/dbg.h +++ b/3rdparty/bgfx/examples/common/entry/dbg.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/entry/entry.cpp b/3rdparty/bgfx/examples/common/entry/entry.cpp index 9770134..a063334 100644 --- a/3rdparty/bgfx/examples/common/entry/entry.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry.cpp @@ -1,12 +1,12 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include +#include +#include #include -#include -#include #include @@ -18,19 +18,16 @@ #include "cmd.h" #include "input.h" -#define RMT_ENABLED ENTRY_CONFIG_PROFILER -#include - -extern "C" int _main_(int _argc, char** _argv); +extern "C" int32_t _main_(int32_t _argc, char** _argv); namespace entry { static uint32_t s_debug = BGFX_DEBUG_NONE; static uint32_t s_reset = BGFX_RESET_NONE; + static uint32_t s_width = ENTRY_DEFAULT_WIDTH; + static uint32_t s_height = ENTRY_DEFAULT_HEIGHT; static bool s_exit = false; - static Remotery* s_rmt = NULL; - static bx::FileReaderI* s_fileReader = NULL; static bx::FileWriterI* s_fileWriter = NULL; @@ -39,50 +36,33 @@ namespace entry typedef bx::StringT<&g_allocator> String; - void* rmtMalloc(void* /*_context*/, rmtU32 _size) - { - return BX_ALLOC(g_allocator, _size); - } - - void* rmtRealloc(void* /*_context*/, void* _ptr, rmtU32 _size) - { - return BX_REALLOC(g_allocator, _ptr, _size); - } - - void rmtFree(void* /*_context*/, void* _ptr) - { - BX_FREE(g_allocator, _ptr); - } - static String s_currentDir; -#if BX_CONFIG_CRT_FILE_READER_WRITER - class FileReader : public bx::CrtFileReader + class FileReader : public bx::FileReader { - typedef bx::CrtFileReader super; + typedef bx::FileReader super; public: - virtual bool open(const char* _filePath, bx::Error* _err) BX_OVERRIDE + virtual bool open(const bx::FilePath& _filePath, bx::Error* _err) override { String filePath(s_currentDir); - filePath.append(_filePath); + filePath.append(_filePath.get() ); return super::open(filePath.getPtr(), _err); } }; - class FileWriter : public bx::CrtFileWriter + class FileWriter : public bx::FileWriter { - typedef bx::CrtFileWriter super; + typedef bx::FileWriter super; public: - virtual bool open(const char* _filePath, bool _append, bx::Error* _err) BX_OVERRIDE + virtual bool open(const bx::FilePath& _filePath, bool _append, bx::Error* _err) override { String filePath(s_currentDir); - filePath.append(_filePath); + filePath.append(_filePath.get() ); return super::open(filePath.getPtr(), _append, _err); } }; -#endif // BX_CONFIG_CRT_FILE_READER_WRITER void setCurrentDir(const char* _dir) { @@ -95,7 +75,7 @@ namespace entry BX_PRAGMA_DIAGNOSTIC_PUSH(); BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4459); // warning C4459: declaration of 's_allocator' hides global declaration BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wshadow"); - static bx::CrtAllocator s_allocator; + static bx::DefaultAllocator s_allocator; return &s_allocator; BX_PRAGMA_DIAGNOSTIC_POP(); } @@ -254,13 +234,17 @@ BX_PRAGMA_DIAGNOSTIC_POP(); bool setOrToggle(uint32_t& _flags, const char* _name, uint32_t _bit, int _first, int _argc, char const* const* _argv) { - if (0 == bx::strncmp(_argv[_first], _name) ) + if (0 == bx::strCmp(_argv[_first], _name) ) { int arg = _first+1; if (_argc > arg) { _flags &= ~_bit; - _flags |= bx::toBool(_argv[arg]) ? _bit : 0; + + bool set = false; + bx::fromString(&set, _argv[arg]); + + _flags |= set ? _bit : 0; } else { @@ -275,13 +259,23 @@ BX_PRAGMA_DIAGNOSTIC_POP(); int cmdMouseLock(CmdContext* /*_context*/, void* /*_userData*/, int _argc, char const* const* _argv) { - if (_argc > 1) + if (1 < _argc) { - inputSetMouseLock(_argc > 1 ? bx::toBool(_argv[1]) : !inputIsMouseLocked() ); - return 0; + bool set = false; + if (2 < _argc) + { + bx::fromString(&set, _argv[1]); + inputSetMouseLock(set); + } + else + { + inputSetMouseLock(!inputIsMouseLocked() ); + } + + return bx::kExitSuccess; } - return 1; + return bx::kExitFailure; } int cmdGraphics(CmdContext* /*_context*/, void* /*_userData*/, int _argc, char const* const* _argv) @@ -300,17 +294,19 @@ BX_PRAGMA_DIAGNOSTIC_POP(); || setOrToggle(s_reset, "depthclamp", BGFX_RESET_DEPTH_CLAMP, 1, _argc, _argv) ) { - return 0; + return bx::kExitSuccess; } else if (setOrToggle(s_debug, "stats", BGFX_DEBUG_STATS, 1, _argc, _argv) || setOrToggle(s_debug, "ifh", BGFX_DEBUG_IFH, 1, _argc, _argv) || setOrToggle(s_debug, "text", BGFX_DEBUG_TEXT, 1, _argc, _argv) - || setOrToggle(s_debug, "wireframe", BGFX_DEBUG_WIREFRAME, 1, _argc, _argv) ) + || setOrToggle(s_debug, "wireframe", BGFX_DEBUG_WIREFRAME, 1, _argc, _argv) + || setOrToggle(s_debug, "profiler", BGFX_DEBUG_PROFILER, 1, _argc, _argv) + ) { bgfx::setDebug(s_debug); - return 0; + return bx::kExitSuccess; } - else if (0 == bx::strncmp(_argv[1], "screenshot") ) + else if (0 == bx::strCmp(_argv[1], "screenshot") ) { bgfx::FrameBufferHandle fbh = BGFX_INVALID_HANDLE; @@ -328,23 +324,23 @@ BX_PRAGMA_DIAGNOSTIC_POP(); bgfx::requestScreenShot(fbh, filePath); } - return 0; + return bx::kExitSuccess; } - else if (0 == bx::strncmp(_argv[1], "fullscreen") ) + else if (0 == bx::strCmp(_argv[1], "fullscreen") ) { WindowHandle window = { 0 }; toggleFullscreen(window); - return 0; + return bx::kExitSuccess; } } - return 1; + return bx::kExitFailure; } int cmdExit(CmdContext* /*_context*/, void* /*_userData*/, int /*_argc*/, char const* const* /*_argv*/) { s_exit = true; - return 0; + return bx::kExitSuccess; } static const InputBinding s_bindings[] = @@ -362,6 +358,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { entry::Key::F4, entry::Modifier::None, 1, NULL, "graphics hmd" }, { entry::Key::F4, entry::Modifier::LeftShift, 1, NULL, "graphics hmdrecenter" }, { entry::Key::F4, entry::Modifier::LeftCtrl, 1, NULL, "graphics hmddbg" }, + { entry::Key::F6, entry::Modifier::None, 1, NULL, "graphics profiler" }, { entry::Key::F7, entry::Modifier::None, 1, NULL, "graphics vsync" }, { entry::Key::F8, entry::Modifier::None, 1, NULL, "graphics msaa" }, { entry::Key::F9, entry::Modifier::None, 1, NULL, "graphics flush" }, @@ -380,87 +377,265 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } #endif // BX_PLATFORM_EMSCRIPTEN - static App* s_apps = NULL; + static AppI* s_currentApp = NULL; + static AppI* s_apps = NULL; + static uint32_t s_numApps = 0; - App::App(const char* _name) + static char s_restartArgs[1024] = { '\0' }; + + static AppI* getCurrentApp(AppI* _set = NULL) { - m_name = _name; - m_next = s_apps; + if (NULL != _set) + { + s_currentApp = _set; + } + else if (NULL == s_currentApp) + { + s_currentApp = getFirstApp(); + } + + return s_currentApp; + } + + static AppI* getNextWrap(AppI* _app) + { + AppI* next = _app->getNext(); + if (NULL != next) + { + return next; + } + + return getFirstApp(); + } + + int cmdApp(CmdContext* /*_context*/, void* /*_userData*/, int _argc, char const* const* _argv) + { + if (0 == bx::strCmp(_argv[1], "restart") ) + { + if (2 == _argc) + { + bx::strCopy(s_restartArgs, BX_COUNTOF(s_restartArgs), getCurrentApp()->getName() ); + return bx::kExitSuccess; + } + + if (0 == bx::strCmp(_argv[2], "next") ) + { + AppI* next = getNextWrap(getCurrentApp() ); + bx::strCopy(s_restartArgs, BX_COUNTOF(s_restartArgs), next->getName() ); + return bx::kExitSuccess; + } + else if (0 == bx::strCmp(_argv[2], "prev") ) + { + AppI* prev = getCurrentApp(); + for (AppI* app = getNextWrap(prev); app != getCurrentApp(); app = getNextWrap(app) ) + { + prev = app; + } + + bx::strCopy(s_restartArgs, BX_COUNTOF(s_restartArgs), prev->getName() ); + return bx::kExitSuccess; + } + + for (AppI* app = getFirstApp(); NULL != app; app = app->getNext() ) + { + if (0 == bx::strCmp(_argv[2], app->getName() ) ) + { + bx::strCopy(s_restartArgs, BX_COUNTOF(s_restartArgs), app->getName() ); + return bx::kExitSuccess; + } + } + } + + return bx::kExitFailure; + } + + AppI::AppI(const char* _name, const char* _description) + { + m_name = _name; + m_description = _description; + m_next = s_apps; + s_apps = this; + s_numApps++; } - App::~App() + AppI::~AppI() { + for (AppI* prev = NULL, *app = s_apps, *next = app->getNext() + ; NULL != app + ; prev = app, app = next, next = app->getNext() ) + { + if (app == this) + { + if (NULL != prev) + { + prev->m_next = next; + } + else + { + s_apps = next; + } + + --s_numApps; + + break; + } + } } - App* getFirstApp() + const char* AppI::getName() const + { + return m_name; + } + + const char* AppI::getDescription() const + { + return m_description; + } + + AppI* AppI::getNext() + { + return m_next; + } + + AppI* getFirstApp() { return s_apps; } - int runApp(AppI* _app, int _argc, char** _argv) + uint32_t getNumApps() { - _app->init(_argc, _argv); + return s_numApps; + } + + int runApp(AppI* _app, int _argc, const char* const* _argv) + { + _app->init(_argc, _argv, s_width, s_height); bgfx::frame(); WindowHandle defaultWindow = { 0 }; - setWindowSize(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT); + setWindowSize(defaultWindow, s_width, s_height); #if BX_PLATFORM_EMSCRIPTEN s_app = _app; emscripten_set_main_loop(&updateApp, -1, 1); #else - while (_app->update() ); + while (_app->update() ) + { + if (0 != bx::strLen(s_restartArgs) ) + { + break; + } + } #endif // BX_PLATFORM_EMSCRIPTEN return _app->shutdown(); } - int main(int _argc, char** _argv) + static int32_t sortApp(const void* _lhs, const void* _rhs) + { + const AppI* lhs = *(const AppI**)_lhs; + const AppI* rhs = *(const AppI**)_rhs; + + return bx::strCmpI(lhs->getName(), rhs->getName() ); + } + + static void sortApps() + { + if (2 > s_numApps) + { + return; + } + + AppI** apps = (AppI**)BX_ALLOC(g_allocator, s_numApps*sizeof(AppI*) ); + + uint32_t ii = 0; + for (AppI* app = getFirstApp(); NULL != app; app = app->getNext() ) + { + apps[ii++] = app; + } + bx::quickSort(apps, s_numApps, sizeof(AppI*), sortApp); + + s_apps = apps[0]; + for (ii = 1; ii < s_numApps; ++ii) + { + AppI* app = apps[ii-1]; + app->m_next = apps[ii]; + } + apps[s_numApps-1]->m_next = NULL; + + BX_FREE(g_allocator, apps); + } + + int main(int _argc, const char* const* _argv) { //DBG(BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME); - if (BX_ENABLED(ENTRY_CONFIG_PROFILER) ) - { - rmtSettings* settings = rmt_Settings(); - BX_WARN(NULL != settings, "Remotery is not enabled."); - if (NULL != settings) - { - settings->malloc = rmtMalloc; - settings->realloc = rmtRealloc; - settings->free = rmtFree; - - rmtError err = rmt_CreateGlobalInstance(&s_rmt); - BX_WARN(RMT_ERROR_NONE != err, "Remotery failed to create global instance."); - if (RMT_ERROR_NONE == err) - { - rmt_SetCurrentThreadName("Main"); - } - else - { - s_rmt = NULL; - } - } - } - -#if BX_CONFIG_CRT_FILE_READER_WRITER s_fileReader = BX_NEW(g_allocator, FileReader); s_fileWriter = BX_NEW(g_allocator, FileWriter); -#endif // BX_CONFIG_CRT_FILE_READER_WRITER cmdInit(); cmdAdd("mouselock", cmdMouseLock); cmdAdd("graphics", cmdGraphics ); cmdAdd("exit", cmdExit ); + cmdAdd("app", cmdApp ); inputInit(); inputAddBindings("bindings", s_bindings); entry::WindowHandle defaultWindow = { 0 }; - entry::setWindowTitle(defaultWindow, bx::baseName(_argv[0]) ); + + bx::FilePath fp(_argv[0]); + char title[bx::kMaxFilePath]; + bx::strCopy(title, BX_COUNTOF(title), fp.getBaseName() ); + + entry::setWindowTitle(defaultWindow, title); setWindowSize(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT); - int32_t result = ::_main_(_argc, _argv); + sortApps(); + + const char* find = ""; + if (1 < _argc) + { + find = _argv[_argc-1]; + } + +restart: + AppI* selected = NULL; + + for (AppI* app = getFirstApp(); NULL != app; app = app->getNext() ) + { + if (NULL == selected + && bx::strFindI(app->getName(), find) ) + { + selected = app; + } +#if 0 + DBG("%c %s, %s" + , app == selected ? '>' : ' ' + , app->getName() + , app->getDescription() + ); +#endif // 0 + } + + int32_t result = bx::kExitSuccess; + s_restartArgs[0] = '\0'; + if (0 == s_numApps) + { + result = ::_main_(_argc, (char**)_argv); + } + else + { + result = runApp(getCurrentApp(selected), _argc, _argv); + } + + if (0 != bx::strLen(s_restartArgs) ) + { + find = s_restartArgs; + goto restart; + } + setCurrentDir(""); inputRemoveBindings("bindings"); @@ -468,23 +643,17 @@ BX_PRAGMA_DIAGNOSTIC_POP(); cmdShutdown(); -#if BX_CONFIG_CRT_FILE_READER_WRITER BX_DELETE(g_allocator, s_fileReader); s_fileReader = NULL; BX_DELETE(g_allocator, s_fileWriter); s_fileWriter = NULL; -#endif // BX_CONFIG_CRT_FILE_READER_WRITER - - if (BX_ENABLED(ENTRY_CONFIG_PROFILER) - && NULL != s_rmt) - { - rmt_DestroyGlobalInstance(s_rmt); - } return result; } + WindowState s_window[ENTRY_CONFIG_MAX_WINDOWS]; + bool processEvents(uint32_t& _width, uint32_t& _height, uint32_t& _debug, uint32_t& _reset, MouseState* _mouse) { s_debug = _debug; @@ -565,6 +734,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); case Event::Size: { const SizeEvent* size = static_cast(ev); + WindowState& win = s_window[0]; + win.m_handle = size->m_handle; + win.m_width = size->m_width; + win.m_height = size->m_height; + handle = size->m_handle; _width = size->m_width; _height = size->m_height; @@ -578,6 +752,13 @@ BX_PRAGMA_DIAGNOSTIC_POP(); case Event::Suspend: break; + case Event::DropFile: + { + const DropFileEvent* drop = static_cast(ev); + DBG("%s", drop->m_filePath.get() ); + } + break; + default: break; } @@ -597,11 +778,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); _debug = s_debug; + s_width = _width; + s_height = _height; + return s_exit; } - WindowState s_window[ENTRY_CONFIG_MAX_WINDOWS]; - bool processWindowEvents(WindowState& _state, uint32_t& _debug, uint32_t& _reset) { s_debug = _debug; @@ -610,6 +792,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); WindowHandle handle = { UINT16_MAX }; bool mouseLock = inputIsMouseLocked(); + bool clearDropFile = true; const Event* ev; do @@ -730,6 +913,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); case Event::Suspend: break; + case Event::DropFile: + { + const DropFileEvent* drop = static_cast(ev); + win.m_dropFile = drop->m_filePath; + clearDropFile = false; + } + break; + default: break; } @@ -741,7 +932,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); if (isValid(handle) ) { - const WindowState& win = s_window[handle.idx]; + WindowState& win = s_window[handle.idx]; + if (clearDropFile) + { + win.m_dropFile.clear(); + } + _state = win; if (handle.idx == 0) @@ -774,6 +970,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); bx::AllocatorI* getAllocator() { + if (NULL == g_allocator) + { + g_allocator = getDefaultAllocator(); + } + return g_allocator; } diff --git a/3rdparty/bgfx/examples/common/entry/entry.h b/3rdparty/bgfx/examples/common/entry/entry.h index cfdfd25..75cbeb2 100644 --- a/3rdparty/bgfx/examples/common/entry/entry.h +++ b/3rdparty/bgfx/examples/common/entry/entry.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -8,6 +8,7 @@ #include "dbg.h" #include +#include #include namespace bx { struct FileReaderI; struct FileWriterI; struct AllocatorI; } @@ -18,12 +19,21 @@ extern "C" int _main_(int _argc, char** _argv); #define ENTRY_WINDOW_FLAG_ASPECT_RATIO UINT32_C(0x00000001) #define ENTRY_WINDOW_FLAG_FRAME UINT32_C(0x00000002) -#define ENTRY_IMPLEMENT_MAIN(_app) \ - int _main_(int _argc, char** _argv) \ - { \ - _app app; \ - return entry::runApp(&app, _argc, _argv); \ - } +#ifndef ENTRY_CONFIG_IMPLEMENT_MAIN +# define ENTRY_CONFIG_IMPLEMENT_MAIN 0 +#endif // ENTRY_CONFIG_IMPLEMENT_MAIN + +#if ENTRY_CONFIG_IMPLEMENT_MAIN +#define ENTRY_IMPLEMENT_MAIN(_app, _name, _description) \ + int _main_(int _argc, char** _argv) \ + { \ + _app app(_name, _description); \ + return entry::runApp(&app, _argc, _argv); \ + } +#else +#define ENTRY_IMPLEMENT_MAIN(_app, _name, _description) \ + _app s_ ## _app ## App(_name, _description) +#endif // ENTRY_CONFIG_IMPLEMENT_MAIN namespace entry { @@ -243,7 +253,7 @@ namespace entry void setWindowPos(WindowHandle _handle, int32_t _x, int32_t _y); void setWindowSize(WindowHandle _handle, uint32_t _width, uint32_t _height); void setWindowTitle(WindowHandle _handle, const char* _title); - void toggleWindowFrame(WindowHandle _handle); + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled); void toggleFullscreen(WindowHandle _handle); void setMouseLock(WindowHandle _handle, bool _lock); void setCurrentDir(const char* _dir); @@ -263,49 +273,53 @@ namespace entry uint32_t m_height; MouseState m_mouse; void* m_nwh; + bx::FilePath m_dropFile; }; bool processWindowEvents(WindowState& _state, uint32_t& _debug, uint32_t& _reset); - struct BX_NO_VTABLE AppI - { - virtual ~AppI() = 0; - virtual void init(int _argc, char** _argv) = 0; - virtual int shutdown() = 0; - virtual bool update() = 0; - }; - - inline AppI::~AppI() - { - } - - class App : public AppI + class BX_NO_VTABLE AppI { public: - App(const char* _name); + /// + AppI(const char* _name, const char* _description); - virtual ~App(); + /// + virtual ~AppI() = 0; - const char* getName() const - { - return m_name; - } + /// + virtual void init(int32_t _argc, const char* const* _argv, uint32_t _width, uint32_t _height) = 0; - AppI* getNext() - { - return m_next; - } + /// + virtual int shutdown() = 0; + + /// + virtual bool update() = 0; + + /// + const char* getName() const; + + /// + const char* getDescription() const; + + /// + AppI* getNext(); + + AppI* m_next; private: const char* m_name; - App* m_next; + const char* m_description; }; /// - App* getFirstApp(); + AppI* getFirstApp(); /// - int runApp(AppI* _app, int _argc, char** _argv); + uint32_t getNumApps(); + + /// + int runApp(AppI* _app, int _argc, const char* const* _argv); } // namespace entry diff --git a/3rdparty/bgfx/examples/common/entry/entry_android.cpp b/3rdparty/bgfx/examples/common/entry/entry_android.cpp index 78ed2f7..644ed4a 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_android.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_android.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -9,8 +9,8 @@ #include -#include #include +#include #include #include @@ -86,9 +86,87 @@ namespace entry struct MainThreadEntry { int m_argc; - char** m_argv; + const char* const* m_argv; - static int32_t threadFunc(void* _userData); + static int32_t threadFunc(bx::Thread* _thread, void* _userData); + }; + + class FileReaderAndroid : public bx::FileReaderI + { + public: + FileReaderAndroid(AAssetManager* _assetManager, AAsset* _file) + : m_assetManager(_assetManager) + , m_file(_file) + , m_open(false) + { + } + + virtual ~FileReaderAndroid() + { + close(); + } + + virtual bool open(const bx::FilePath& _filePath, bx::Error* _err) override + { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + + if (NULL != m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_ALREADY_OPEN, "FileReader: File is already open."); + return false; + } + + m_file = AAssetManager_open(m_assetManager, _filePath.get(), AASSET_MODE_RANDOM); + if (NULL == m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "FileReader: Failed to open file."); + return false; + } + + m_open = true; + return true; + } + + virtual void close() override + { + if (m_open + && NULL != m_file) + { + AAsset_close(m_file); + m_file = NULL; + } + } + + virtual int64_t seek(int64_t _offset, bx::Whence::Enum _whence) override + { + BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); + return AAsset_seek64(m_file, _offset, _whence); + + } + + virtual int32_t read(void* _data, int32_t _size, bx::Error* _err) override + { + BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + + int32_t size = (int32_t)AAsset_read(m_file, _data, _size); + if (size != _size) + { + if (0 == AAsset_getRemainingLength(m_file) ) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_EOF, "FileReader: EOF."); + } + + return size >= 0 ? size : 0; + } + + return size; + } + + private: + AAssetManager* m_assetManager; + AAsset* m_file; + bool m_open; }; struct Context @@ -119,9 +197,9 @@ namespace entry , 0 ); - const char* argv[1] = { "android.so" }; + const char* const argv[1] = { "android.so" }; m_mte.m_argc = 1; - m_mte.m_argv = const_cast(argv); + m_mte.m_argv = argv; while (0 == m_app->destroyRequested) { @@ -457,9 +535,9 @@ namespace entry BX_UNUSED(_handle, _title); } - void toggleWindowFrame(WindowHandle _handle) + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled) { - BX_UNUSED(_handle); + BX_UNUSED(_handle, _flags, _enabled); } void toggleFullscreen(WindowHandle _handle) @@ -472,8 +550,10 @@ namespace entry BX_UNUSED(_handle, _lock); } - int32_t MainThreadEntry::threadFunc(void* _userData) + int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData) { + BX_UNUSED(_thread); + int32_t result = chdir("/sdcard/bgfx/examples/runtime"); BX_CHECK(0 == result, "Failed to chdir to dir. android.permission.WRITE_EXTERNAL_STORAGE?", errno); diff --git a/3rdparty/bgfx/examples/common/entry/entry_asmjs.cpp b/3rdparty/bgfx/examples/common/entry/entry_asmjs.cpp index 9cabff5..4434e41 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_asmjs.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_asmjs.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -86,7 +86,7 @@ namespace entry } } - int32_t run(int _argc, char** _argv) + int32_t run(int _argc, const char* const* _argv) { emscripten_set_mousedown_callback("#canvas", this, true, mouseCb); emscripten_set_mouseup_callback("#canvas", this, true, mouseCb); @@ -381,9 +381,9 @@ namespace entry BX_UNUSED(_handle, _title); } - void toggleWindowFrame(WindowHandle _handle) + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled) { - BX_UNUSED(_handle); + BX_UNUSED(_handle, _flags, _enabled); } void toggleFullscreen(WindowHandle _handle) @@ -397,7 +397,7 @@ namespace entry } } -int main(int _argc, char** _argv) +int main(int _argc, const char* const* _argv) { using namespace entry; return s_ctx.run(_argc, _argv); diff --git a/3rdparty/bgfx/examples/common/entry/entry_glfw.cpp b/3rdparty/bgfx/examples/common/entry/entry_glfw.cpp index 0ff8fd3..5e81dd9 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_glfw.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_glfw.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -28,8 +28,9 @@ #include -#include #include +#include +#include #include #include "dbg.h" @@ -227,9 +228,9 @@ namespace entry struct MainThreadEntry { int m_argc; - char** m_argv; + const char* const* m_argv; - static int32_t threadFunc(void* _userData); + static int32_t threadFunc(bx::Thread* _thread, void* _userData); }; enum MsgType @@ -275,7 +276,7 @@ namespace entry static void joystickCb(int _jid, int _action); // Based on cutef8 by Jeff Bezanson (Public Domain) - static uint8_t encodeUTF8(uint8_t _chars[4], unsigned int _scancode) + static uint8_t encodeUTF8(uint8_t _chars[4], uint32_t _scancode) { uint8_t length = 0; @@ -308,86 +309,92 @@ namespace entry struct Context { Context() - : m_scrollPos(0.0) + : m_msgs(getAllocator() ) + , m_scrollPos(0.0f) { bx::memSet(s_translateKey, 0, sizeof(s_translateKey)); - s_translateKey[GLFW_KEY_ESCAPE] = Key::Esc; - s_translateKey[GLFW_KEY_ENTER] = Key::Return; - s_translateKey[GLFW_KEY_TAB] = Key::Tab; - s_translateKey[GLFW_KEY_BACKSPACE] = Key::Backspace; - s_translateKey[GLFW_KEY_SPACE] = Key::Space; - s_translateKey[GLFW_KEY_UP] = Key::Up; - s_translateKey[GLFW_KEY_DOWN] = Key::Down; - s_translateKey[GLFW_KEY_LEFT] = Key::Left; - s_translateKey[GLFW_KEY_RIGHT] = Key::Right; - s_translateKey[GLFW_KEY_PAGE_UP] = Key::PageUp; - s_translateKey[GLFW_KEY_PAGE_DOWN] = Key::PageDown; - s_translateKey[GLFW_KEY_HOME] = Key::Home; - s_translateKey[GLFW_KEY_END] = Key::End; + s_translateKey[GLFW_KEY_ESCAPE] = Key::Esc; + s_translateKey[GLFW_KEY_ENTER] = Key::Return; + s_translateKey[GLFW_KEY_TAB] = Key::Tab; + s_translateKey[GLFW_KEY_BACKSPACE] = Key::Backspace; + s_translateKey[GLFW_KEY_SPACE] = Key::Space; + s_translateKey[GLFW_KEY_UP] = Key::Up; + s_translateKey[GLFW_KEY_DOWN] = Key::Down; + s_translateKey[GLFW_KEY_LEFT] = Key::Left; + s_translateKey[GLFW_KEY_RIGHT] = Key::Right; + s_translateKey[GLFW_KEY_PAGE_UP] = Key::PageUp; + s_translateKey[GLFW_KEY_PAGE_DOWN] = Key::PageDown; + s_translateKey[GLFW_KEY_HOME] = Key::Home; + s_translateKey[GLFW_KEY_END] = Key::End; s_translateKey[GLFW_KEY_PRINT_SCREEN] = Key::Print; - s_translateKey[GLFW_KEY_KP_ADD] = Key::Plus; + s_translateKey[GLFW_KEY_KP_ADD] = Key::Plus; + s_translateKey[GLFW_KEY_EQUAL] = Key::Plus; s_translateKey[GLFW_KEY_KP_SUBTRACT] = Key::Minus; - s_translateKey[GLFW_KEY_F1] = Key::F1; - s_translateKey[GLFW_KEY_F2] = Key::F2; - s_translateKey[GLFW_KEY_F3] = Key::F3; - s_translateKey[GLFW_KEY_F4] = Key::F4; - s_translateKey[GLFW_KEY_F5] = Key::F5; - s_translateKey[GLFW_KEY_F6] = Key::F6; - s_translateKey[GLFW_KEY_F7] = Key::F7; - s_translateKey[GLFW_KEY_F8] = Key::F8; - s_translateKey[GLFW_KEY_F9] = Key::F9; - s_translateKey[GLFW_KEY_F10] = Key::F10; - s_translateKey[GLFW_KEY_F11] = Key::F11; - s_translateKey[GLFW_KEY_F12] = Key::F12; - s_translateKey[GLFW_KEY_KP_0] = Key::NumPad0; - s_translateKey[GLFW_KEY_KP_1] = Key::NumPad1; - s_translateKey[GLFW_KEY_KP_2] = Key::NumPad2; - s_translateKey[GLFW_KEY_KP_3] = Key::NumPad3; - s_translateKey[GLFW_KEY_KP_4] = Key::NumPad4; - s_translateKey[GLFW_KEY_KP_5] = Key::NumPad5; - s_translateKey[GLFW_KEY_KP_6] = Key::NumPad6; - s_translateKey[GLFW_KEY_KP_7] = Key::NumPad7; - s_translateKey[GLFW_KEY_KP_8] = Key::NumPad8; - s_translateKey[GLFW_KEY_KP_9] = Key::NumPad9; - s_translateKey[GLFW_KEY_0] = Key::Key0; - s_translateKey[GLFW_KEY_1] = Key::Key1; - s_translateKey[GLFW_KEY_2] = Key::Key2; - s_translateKey[GLFW_KEY_3] = Key::Key3; - s_translateKey[GLFW_KEY_4] = Key::Key4; - s_translateKey[GLFW_KEY_5] = Key::Key5; - s_translateKey[GLFW_KEY_6] = Key::Key6; - s_translateKey[GLFW_KEY_7] = Key::Key7; - s_translateKey[GLFW_KEY_8] = Key::Key8; - s_translateKey[GLFW_KEY_9] = Key::Key9; - s_translateKey[GLFW_KEY_A] = Key::KeyA; - s_translateKey[GLFW_KEY_B] = Key::KeyB; - s_translateKey[GLFW_KEY_C] = Key::KeyC; - s_translateKey[GLFW_KEY_D] = Key::KeyD; - s_translateKey[GLFW_KEY_E] = Key::KeyE; - s_translateKey[GLFW_KEY_F] = Key::KeyF; - s_translateKey[GLFW_KEY_G] = Key::KeyG; - s_translateKey[GLFW_KEY_H] = Key::KeyH; - s_translateKey[GLFW_KEY_I] = Key::KeyI; - s_translateKey[GLFW_KEY_J] = Key::KeyJ; - s_translateKey[GLFW_KEY_K] = Key::KeyK; - s_translateKey[GLFW_KEY_L] = Key::KeyL; - s_translateKey[GLFW_KEY_M] = Key::KeyM; - s_translateKey[GLFW_KEY_N] = Key::KeyN; - s_translateKey[GLFW_KEY_O] = Key::KeyO; - s_translateKey[GLFW_KEY_P] = Key::KeyP; - s_translateKey[GLFW_KEY_Q] = Key::KeyQ; - s_translateKey[GLFW_KEY_R] = Key::KeyR; - s_translateKey[GLFW_KEY_S] = Key::KeyS; - s_translateKey[GLFW_KEY_T] = Key::KeyT; - s_translateKey[GLFW_KEY_U] = Key::KeyU; - s_translateKey[GLFW_KEY_V] = Key::KeyV; - s_translateKey[GLFW_KEY_W] = Key::KeyW; - s_translateKey[GLFW_KEY_X] = Key::KeyX; - s_translateKey[GLFW_KEY_Y] = Key::KeyY; - s_translateKey[GLFW_KEY_Z] = Key::KeyZ; + s_translateKey[GLFW_KEY_MINUS] = Key::Minus; + s_translateKey[GLFW_KEY_COMMA] = Key::Comma; + s_translateKey[GLFW_KEY_PERIOD] = Key::Period; + s_translateKey[GLFW_KEY_SLASH] = Key::Slash; + s_translateKey[GLFW_KEY_F1] = Key::F1; + s_translateKey[GLFW_KEY_F2] = Key::F2; + s_translateKey[GLFW_KEY_F3] = Key::F3; + s_translateKey[GLFW_KEY_F4] = Key::F4; + s_translateKey[GLFW_KEY_F5] = Key::F5; + s_translateKey[GLFW_KEY_F6] = Key::F6; + s_translateKey[GLFW_KEY_F7] = Key::F7; + s_translateKey[GLFW_KEY_F8] = Key::F8; + s_translateKey[GLFW_KEY_F9] = Key::F9; + s_translateKey[GLFW_KEY_F10] = Key::F10; + s_translateKey[GLFW_KEY_F11] = Key::F11; + s_translateKey[GLFW_KEY_F12] = Key::F12; + s_translateKey[GLFW_KEY_KP_0] = Key::NumPad0; + s_translateKey[GLFW_KEY_KP_1] = Key::NumPad1; + s_translateKey[GLFW_KEY_KP_2] = Key::NumPad2; + s_translateKey[GLFW_KEY_KP_3] = Key::NumPad3; + s_translateKey[GLFW_KEY_KP_4] = Key::NumPad4; + s_translateKey[GLFW_KEY_KP_5] = Key::NumPad5; + s_translateKey[GLFW_KEY_KP_6] = Key::NumPad6; + s_translateKey[GLFW_KEY_KP_7] = Key::NumPad7; + s_translateKey[GLFW_KEY_KP_8] = Key::NumPad8; + s_translateKey[GLFW_KEY_KP_9] = Key::NumPad9; + s_translateKey[GLFW_KEY_0] = Key::Key0; + s_translateKey[GLFW_KEY_1] = Key::Key1; + s_translateKey[GLFW_KEY_2] = Key::Key2; + s_translateKey[GLFW_KEY_3] = Key::Key3; + s_translateKey[GLFW_KEY_4] = Key::Key4; + s_translateKey[GLFW_KEY_5] = Key::Key5; + s_translateKey[GLFW_KEY_6] = Key::Key6; + s_translateKey[GLFW_KEY_7] = Key::Key7; + s_translateKey[GLFW_KEY_8] = Key::Key8; + s_translateKey[GLFW_KEY_9] = Key::Key9; + s_translateKey[GLFW_KEY_A] = Key::KeyA; + s_translateKey[GLFW_KEY_B] = Key::KeyB; + s_translateKey[GLFW_KEY_C] = Key::KeyC; + s_translateKey[GLFW_KEY_D] = Key::KeyD; + s_translateKey[GLFW_KEY_E] = Key::KeyE; + s_translateKey[GLFW_KEY_F] = Key::KeyF; + s_translateKey[GLFW_KEY_G] = Key::KeyG; + s_translateKey[GLFW_KEY_H] = Key::KeyH; + s_translateKey[GLFW_KEY_I] = Key::KeyI; + s_translateKey[GLFW_KEY_J] = Key::KeyJ; + s_translateKey[GLFW_KEY_K] = Key::KeyK; + s_translateKey[GLFW_KEY_L] = Key::KeyL; + s_translateKey[GLFW_KEY_M] = Key::KeyM; + s_translateKey[GLFW_KEY_N] = Key::KeyN; + s_translateKey[GLFW_KEY_O] = Key::KeyO; + s_translateKey[GLFW_KEY_P] = Key::KeyP; + s_translateKey[GLFW_KEY_Q] = Key::KeyQ; + s_translateKey[GLFW_KEY_R] = Key::KeyR; + s_translateKey[GLFW_KEY_S] = Key::KeyS; + s_translateKey[GLFW_KEY_T] = Key::KeyT; + s_translateKey[GLFW_KEY_U] = Key::KeyU; + s_translateKey[GLFW_KEY_V] = Key::KeyV; + s_translateKey[GLFW_KEY_W] = Key::KeyW; + s_translateKey[GLFW_KEY_X] = Key::KeyX; + s_translateKey[GLFW_KEY_Y] = Key::KeyY; + s_translateKey[GLFW_KEY_Z] = Key::KeyZ; } - int run(int _argc, char** _argv) + int run(int _argc, const char* const* _argv) { m_mte.m_argc = _argc; m_mte.m_argv = _argv; @@ -397,7 +404,7 @@ namespace entry if (!glfwInit() ) { DBG("glfwInit failed!"); - return EXIT_FAILURE; + return bx::kExitFailure; } glfwSetJoystickCallback(joystickCb); @@ -416,7 +423,7 @@ namespace entry { DBG("glfwCreateWindow failed!"); glfwTerminate(); - return EXIT_FAILURE; + return bx::kExitFailure; } glfwSetKeyCallback(m_windows[0], keyCb); @@ -425,6 +432,7 @@ namespace entry glfwSetCursorPosCallback(m_windows[0], cursorPosCb); glfwSetMouseButtonCallback(m_windows[0], mouseButtonCb); glfwSetWindowSizeCallback(m_windows[0], windowSizeCb); + glfwSetDropCallback(m_windows[0], dropFileCb); glfwSetWindow(m_windows[0]); m_eventQueue.postSizeEvent(handle, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT); @@ -484,6 +492,7 @@ namespace entry glfwSetCursorPosCallback(window, cursorPosCb); glfwSetMouseButtonCallback(window, mouseButtonCb); glfwSetWindowSizeCallback(window, windowSizeCb); + glfwSetDropCallback(window, dropFileCb); m_windows[msg->m_handle.idx] = window; m_eventQueue.postSizeEvent(msg->m_handle, msg->m_width, msg->m_height); @@ -533,17 +542,25 @@ namespace entry case GLFW_WINDOW_TOGGLE_FULL_SCREEN: { GLFWwindow* window = m_windows[msg->m_handle.idx]; - if (glfwGetWindowMonitor(window)) + if (glfwGetWindowMonitor(window) ) { - int width, height; - glfwGetWindowSize(window, &width, &height); - glfwSetWindowMonitor(window, NULL, 0, 0, width, height, 0); + glfwSetWindowMonitor(window + , NULL + , m_oldX + , m_oldY + , m_oldWidth + , m_oldHeight + , 0 + ); } else { GLFWmonitor* monitor = glfwGetPrimaryMonitor(); if (NULL != monitor) { + glfwGetWindowPos(window, &m_oldX, &m_oldY); + glfwGetWindowSize(window, &m_oldWidth, &m_oldHeight); + const GLFWvidmode* mode = glfwGetVideoMode(monitor); glfwSetWindowMonitor(window , monitor @@ -604,12 +621,13 @@ namespace entry return invalid; } - static void keyCb(GLFWwindow* _window, int _key, int _scancode, int _action, int _mods); - static void charCb(GLFWwindow* _window, unsigned int _scancode); + static void keyCb(GLFWwindow* _window, int32_t _key, int32_t _scancode, int32_t _action, int32_t _mods); + static void charCb(GLFWwindow* _window, uint32_t _scancode); static void scrollCb(GLFWwindow* _window, double _dx, double _dy); static void cursorPosCb(GLFWwindow* _window, double _mx, double _my); - static void mouseButtonCb(GLFWwindow* _window, int _button, int _action, int _mods); - static void windowSizeCb(GLFWwindow* _window, int _width, int _height); + static void mouseButtonCb(GLFWwindow* _window, int32_t _button, int32_t _action, int32_t _mods); + static void windowSizeCb(GLFWwindow* _window, int32_t _width, int32_t _height); + static void dropFileCb(GLFWwindow* _window, int32_t _count, const char** _filePaths); MainThreadEntry m_mte; bx::Thread m_thread; @@ -624,12 +642,17 @@ namespace entry bx::SpScUnboundedQueueT m_msgs; + int32_t m_oldX; + int32_t m_oldY; + int32_t m_oldWidth; + int32_t m_oldHeight; + double m_scrollPos; }; Context s_ctx; - void Context::keyCb(GLFWwindow* _window, int _key, int _scancode, int _action, int _mods) + void Context::keyCb(GLFWwindow* _window, int32_t _key, int32_t _scancode, int32_t _action, int32_t _mods) { BX_UNUSED(_scancode); if (_key == GLFW_KEY_UNKNOWN) @@ -643,7 +666,7 @@ namespace entry s_ctx.m_eventQueue.postKeyEvent(handle, key, mods, down); } - void Context::charCb(GLFWwindow* _window, unsigned int _scancode) + void Context::charCb(GLFWwindow* _window, uint32_t _scancode) { WindowHandle handle = s_ctx.findHandle(_window); uint8_t chars[4]; @@ -680,7 +703,7 @@ namespace entry ); } - void Context::mouseButtonCb(GLFWwindow* _window, int _button, int _action, int _mods) + void Context::mouseButtonCb(GLFWwindow* _window, int32_t _button, int32_t _action, int32_t _mods) { BX_UNUSED(_mods); WindowHandle handle = s_ctx.findHandle(_window); @@ -696,12 +719,21 @@ namespace entry ); } - void Context::windowSizeCb(GLFWwindow* _window, int _width, int _height) + void Context::windowSizeCb(GLFWwindow* _window, int32_t _width, int32_t _height) { WindowHandle handle = s_ctx.findHandle(_window); s_ctx.m_eventQueue.postSizeEvent(handle, _width, _height); } + void Context::dropFileCb(GLFWwindow* _window, int32_t _count, const char** _filePaths) + { + WindowHandle handle = s_ctx.findHandle(_window); + for (int32_t ii = 0; ii < _count; ++ii) + { + s_ctx.m_eventQueue.postDropFileEvent(handle, _filePaths[ii]); + } + } + static void joystickCb(int _jid, int _action) { if (_jid >= ENTRY_CONFIG_MAX_GAMEPADS) @@ -793,12 +825,9 @@ namespace entry glfwPostEmptyEvent(); } - void toggleWindowFrame(WindowHandle _handle) + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled) { - Msg* msg = new Msg(GLFW_WINDOW_TOGGLE_FRAME); - msg->m_handle = _handle; - s_ctx.m_msgs.push(msg); - glfwPostEmptyEvent(); + BX_UNUSED(_handle, _flags, _enabled); } void toggleFullscreen(WindowHandle _handle) @@ -818,8 +847,10 @@ namespace entry glfwPostEmptyEvent(); } - int32_t MainThreadEntry::threadFunc(void* _userData) + int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData) { + BX_UNUSED(_thread); + MainThreadEntry* self = (MainThreadEntry*)_userData; int32_t result = main(self->m_argc, self->m_argv); @@ -833,7 +864,7 @@ namespace entry } } -int main(int _argc, char** _argv) +int main(int _argc, const char* const* _argv) { using namespace entry; return s_ctx.run(_argc, _argv); diff --git a/3rdparty/bgfx/examples/common/entry/entry_ios.mm b/3rdparty/bgfx/examples/common/entry/entry_ios.mm index c2dbdce..569e99f 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_ios.mm +++ b/3rdparty/bgfx/examples/common/entry/entry_ios.mm @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -27,9 +27,9 @@ namespace entry struct MainThreadEntry { int m_argc; - char** m_argv; + const char* const* m_argv; - static int32_t threadFunc(void* _userData); + static int32_t threadFunc(bx::Thread* _thread, void* _userData); }; static WindowHandle s_defaultWindow = { 0 }; @@ -38,9 +38,9 @@ namespace entry { Context(uint32_t _width, uint32_t _height) { - static const char* argv[1] = { "ios" }; + const char* const argv[1] = { "ios" }; m_mte.m_argc = 1; - m_mte.m_argv = const_cast(argv); + m_mte.m_argv = argv; m_eventQueue.postSizeEvent(s_defaultWindow, _width, _height); @@ -63,19 +63,22 @@ namespace entry static Context* s_ctx; - int32_t MainThreadEntry::threadFunc(void* _userData) + int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData) { + BX_UNUSED(_thread); + CFBundleRef mainBundle = CFBundleGetMainBundle(); - if ( mainBundle != nil ) + if (mainBundle != nil) { CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle); - if ( resourcesURL != nil ) + if (resourcesURL != nil) { char path[PATH_MAX]; - if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX) ) + if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8*)path, PATH_MAX) ) { chdir(path); } + CFRelease(resourcesURL); } } @@ -127,9 +130,9 @@ namespace entry BX_UNUSED(_handle, _title); } - void toggleWindowFrame(WindowHandle _handle) + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled) { - BX_UNUSED(_handle); + BX_UNUSED(_handle, _flags, _enabled); } void toggleFullscreen(WindowHandle _handle) @@ -247,6 +250,8 @@ static void* m_device = NULL; BX_UNUSED(touches); UITouch *touch = [[event allTouches] anyObject]; CGPoint touchLocation = [touch locationInView:self]; + touchLocation.x *= self.contentScaleFactor; + touchLocation.y *= self.contentScaleFactor; s_ctx->m_eventQueue.postMouseEvent(s_defaultWindow, touchLocation.x, touchLocation.y, 0); s_ctx->m_eventQueue.postMouseEvent(s_defaultWindow, touchLocation.x, touchLocation.y, 0, MouseButton::Left, true); @@ -257,6 +262,9 @@ static void* m_device = NULL; BX_UNUSED(touches); UITouch *touch = [[event allTouches] anyObject]; CGPoint touchLocation = [touch locationInView:self]; + touchLocation.x *= self.contentScaleFactor; + touchLocation.y *= self.contentScaleFactor; + s_ctx->m_eventQueue.postMouseEvent(s_defaultWindow, touchLocation.x, touchLocation.y, 0, MouseButton::Left, false); } @@ -265,6 +273,9 @@ static void* m_device = NULL; BX_UNUSED(touches); UITouch *touch = [[event allTouches] anyObject]; CGPoint touchLocation = [touch locationInView:self]; + touchLocation.x *= self.contentScaleFactor; + touchLocation.y *= self.contentScaleFactor; + s_ctx->m_eventQueue.postMouseEvent(s_defaultWindow, touchLocation.x, touchLocation.y, 0); } @@ -273,6 +284,9 @@ static void* m_device = NULL; BX_UNUSED(touches); UITouch *touch = [[event allTouches] anyObject]; CGPoint touchLocation = [touch locationInView:self]; + touchLocation.x *= self.contentScaleFactor; + touchLocation.y *= self.contentScaleFactor; + s_ctx->m_eventQueue.postMouseEvent(s_defaultWindow, touchLocation.x, touchLocation.y, 0, MouseButton::Left, false); } @@ -312,8 +326,7 @@ static void* m_device = NULL; [m_window makeKeyAndVisible]; - //float scaleFactor = [[UIScreen mainScreen] scale]; // should use this, but needs to further pass the value to the `nvgBeginFrame()` call's `devicePixelRatio` parameter in `ExampleNanoVG` class' `update()` method so it can actually work properly. - float scaleFactor = 1.0f; + float scaleFactor = [[UIScreen mainScreen] scale]; [m_view setContentScaleFactor: scaleFactor ]; s_ctx = new Context((uint32_t)(scaleFactor*rect.size.width), (uint32_t)(scaleFactor*rect.size.height)); @@ -361,10 +374,10 @@ static void* m_device = NULL; @end -int main(int _argc, char* _argv[]) +int main(int _argc, const char* const* _argv) { NSAutoreleasePool* pool = [ [NSAutoreleasePool alloc] init]; - int exitCode = UIApplicationMain(_argc, _argv, @"UIApplication", NSStringFromClass([AppDelegate class]) ); + int exitCode = UIApplicationMain(_argc, (char**)_argv, @"UIApplication", NSStringFromClass([AppDelegate class]) ); [pool release]; return exitCode; } diff --git a/3rdparty/bgfx/examples/common/entry/entry_nacl.cpp b/3rdparty/bgfx/examples/common/entry/entry_nacl.cpp deleted file mode 100644 index b51a96e..0000000 --- a/3rdparty/bgfx/examples/common/entry/entry_nacl.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -#include "entry_p.h" - -#if ENTRY_CONFIG_USE_NATIVE && BX_PLATFORM_NACL - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "entry.h" - -namespace entry -{ - const PPB_Core* g_coreInterface; - const PPB_Instance* g_instInterface; - const PPB_Graphics3D* g_graphicsInterface; - const PPB_MessageLoop* g_messageLoopInterface; - const PPB_URLLoader* g_urlLoaderInterface; - const PPB_URLRequestInfo* g_urlRequestInterface; - const PPB_URLResponseInfo* g_urlResponseInterface; - const PPB_Var* g_varInterface; - PP_Instance g_instance; - - const Event* poll() - { - return NULL; - } - - const Event* poll(WindowHandle _handle) - { - BX_UNUSED(_handle); - return NULL; - } - - void release(const Event* _event) - { - BX_UNUSED(_event); - } - - WindowHandle createWindow(int32_t _x, int32_t _y, uint32_t _width, uint32_t _height, uint32_t _flags, const char* _title) - { - BX_UNUSED(_x, _y, _width, _height, _flags, _title); - WindowHandle handle = { UINT16_MAX }; - return handle; - } - - void destroyWindow(WindowHandle _handle) - { - BX_UNUSED(_handle); - } - - void setWindowPos(WindowHandle _handle, int32_t _x, int32_t _y) - { - BX_UNUSED(_handle, _x, _y); - } - - void setWindowSize(WindowHandle _handle, uint32_t _width, uint32_t _height) - { - BX_UNUSED(_handle, _width, _height); - } - - void setWindowTitle(WindowHandle _handle, const char* _title) - { - BX_UNUSED(_handle, _title); - } - - void toggleWindowFrame(WindowHandle _handle) - { - BX_UNUSED(_handle); - } - - void toggleFullscreen(WindowHandle _handle) - { - BX_UNUSED(_handle); - } - - void setMouseLock(WindowHandle _handle, bool _lock) - { - BX_UNUSED(_handle, _lock); - } - - template - bool initializeInterface(PPB_GetInterface _interface, const char* _name, const Type*& _result) - { - _result = reinterpret_cast(_interface(_name) ); -// DBG("%p %s", _result, _name); - return NULL != _result; - } - - struct MainThreadEntry - { - int m_argc; - char** m_argv; - - static int32_t threadFunc(void* _userData); - }; - - struct NaclContext - { - NaclContext() - { - static const char* argv[1] = { "nacl.nexe" }; - m_mte.m_argc = 1; - m_mte.m_argv = const_cast(argv); - - m_thread.init(MainThreadEntry::threadFunc, &m_mte); - } - - ~NaclContext() - { - m_thread.shutdown(); - } - - MainThreadEntry m_mte; - bx::Thread m_thread; - }; - - static NaclContext* s_ctx; - - int32_t MainThreadEntry::threadFunc(void* _userData) - { - MainThreadEntry* self = (MainThreadEntry*)_userData; - - PP_Resource resource = g_messageLoopInterface->Create(g_instance); - g_messageLoopInterface->AttachToCurrentThread(resource); - - int32_t result = main(self->m_argc, self->m_argv); - return result; - } - - static PP_Bool naclInstanceDidCreate(PP_Instance _instance, uint32_t /*_argc*/, const char* /*_argn*/[], const char* /*_argv*/[]) - { - g_instance = _instance; // one instance only! - - if (bgfx::naclSetInterfaces(g_instance, g_instInterface, g_graphicsInterface, NULL) ) - { - s_ctx = new NaclContext; - return PP_TRUE; - } - - return PP_FALSE; - } - - static void naclInstanceDidDestroy(PP_Instance _instance) - { - BX_UNUSED(_instance); - delete s_ctx; - } - - static void naclInstanceDidChangeView(PP_Instance /*_instance*/, PP_Resource /*_view*/) - { - } - - static void naclInstanceDidChangeFocus(PP_Instance /*_instance*/, PP_Bool /*_focus*/) - { - } - - static PP_Bool naclInstanceHandleDocumentLoad(PP_Instance /*_instance*/, PP_Resource /*_urlLoader*/) - { - return PP_FALSE; - } - -} // namespace entry - -using namespace entry; - -PP_EXPORT const void* PPP_GetInterface(const char* _name) -{ - if (0 == bx::strncmp(_name, PPP_INSTANCE_INTERFACE) ) - { - static PPP_Instance instanceInterface = - { - &naclInstanceDidCreate, - &naclInstanceDidDestroy, - &naclInstanceDidChangeView, - &naclInstanceDidChangeFocus, - &naclInstanceHandleDocumentLoad, - }; - - return &instanceInterface; - } - - return NULL; -} - -PP_EXPORT int32_t PPP_InitializeModule(PP_Module _module, PPB_GetInterface _interface) -{ - DBG("PPAPI version: %d", PPAPI_RELEASE); - - BX_UNUSED(_module); - bool result = true; - result &= initializeInterface(_interface, PPB_CORE_INTERFACE, g_coreInterface); - result &= initializeInterface(_interface, PPB_GRAPHICS_3D_INTERFACE, g_graphicsInterface); - result &= initializeInterface(_interface, PPB_INSTANCE_INTERFACE, g_instInterface); - result &= initializeInterface(_interface, PPB_MESSAGELOOP_INTERFACE, g_messageLoopInterface); - result &= initializeInterface(_interface, PPB_URLLOADER_INTERFACE, g_urlLoaderInterface); - result &= initializeInterface(_interface, PPB_URLREQUESTINFO_INTERFACE, g_urlRequestInterface); - result &= initializeInterface(_interface, PPB_URLRESPONSEINFO_INTERFACE, g_urlResponseInterface); - result &= initializeInterface(_interface, PPB_VAR_INTERFACE, g_varInterface); - result &= glInitializePPAPI(_interface); - - return result ? PP_OK : PP_ERROR_NOINTERFACE; -} - -PP_EXPORT void PPP_ShutdownModule() -{ -} - -#endif // ENTRY_CONFIG_USE_NATIVE && BX_PLATFROM_NACL diff --git a/3rdparty/bgfx/examples/common/entry/entry_noop.cpp b/3rdparty/bgfx/examples/common/entry/entry_noop.cpp index 1e85e2d..098f1ae 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_noop.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_noop.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -7,8 +7,6 @@ #if ENTRY_CONFIG_USE_NOOP -#include - namespace entry { const Event* poll() @@ -54,9 +52,9 @@ namespace entry BX_UNUSED(_handle, _title); } - void toggleWindowFrame(WindowHandle _handle) + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled) { - BX_UNUSED(_handle); + BX_UNUSED(_handle, _flags, _enabled); } void toggleFullscreen(WindowHandle _handle) @@ -71,7 +69,7 @@ namespace entry } // namespace entry -int main(int _argc, char** _argv) +int main(int _argc, const char* const* _argv) { entry::main(_argc, _argv); } diff --git a/3rdparty/bgfx/examples/common/entry/entry_osx.mm b/3rdparty/bgfx/examples/common/entry/entry_osx.mm index 49a8f9b..4e0aa7c 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_osx.mm +++ b/3rdparty/bgfx/examples/common/entry/entry_osx.mm @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -64,21 +64,24 @@ namespace entry struct MainThreadEntry { int m_argc; - char** m_argv; + const char* const* m_argv; - static int32_t threadFunc(void* _userData) + static int32_t threadFunc(bx::Thread* _thread, void* _userData) { + BX_UNUSED(_thread); + CFBundleRef mainBundle = CFBundleGetMainBundle(); - if ( mainBundle != nil ) + if (mainBundle != nil) { CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle); - if ( resourcesURL != nil ) + if (resourcesURL != nil) { char path[PATH_MAX]; - if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX) ) + if (CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8*)path, PATH_MAX) ) { chdir(path); } + CFRelease(resourcesURL); } } @@ -100,7 +103,7 @@ namespace entry , m_fullscreen(false) { s_translateKey[27] = Key::Esc; - s_translateKey[uint8_t('\n')] = Key::Return; + s_translateKey[uint8_t('\r')] = Key::Return; s_translateKey[uint8_t('\t')] = Key::Tab; s_translateKey[127] = Key::Backspace; s_translateKey[uint8_t(' ')] = Key::Space; @@ -224,7 +227,7 @@ namespace entry *_pressedChar = (uint8_t)keyChar; int keyCode = keyChar; - *specialKeys = translateModifiers([event modifierFlags]); + *specialKeys = translateModifiers(int([event modifierFlags])); // if this is a unhandled key just return None if (keyCode < 256) @@ -271,66 +274,52 @@ namespace entry switch (eventType) { - case NSMouseMoved: - case NSLeftMouseDragged: - case NSRightMouseDragged: - case NSOtherMouseDragged: - { - getMousePos(&m_mx, &m_my); - m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll); - break; - } + case NSMouseMoved: + case NSLeftMouseDragged: + case NSRightMouseDragged: + case NSOtherMouseDragged: + getMousePos(&m_mx, &m_my); + m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll); + break; - case NSLeftMouseDown: + case NSLeftMouseDown: { // Command + Left Mouse Button acts as middle! This just a temporary solution! // This is because the average OSX user doesn't have middle mouse click. MouseButton::Enum mb = ([event modifierFlags] & NSCommandKeyMask) ? MouseButton::Middle : MouseButton::Left; m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, mb, true); - break; } + break; - case NSLeftMouseUp: - { - m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Left, false); - m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Middle, false); // TODO: remove! - break; - } + case NSLeftMouseUp: + m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Left, false); + m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Middle, false); + break; - case NSRightMouseDown: - { - m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Right, true); - break; - } + case NSRightMouseDown: + m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Right, true); + break; - case NSRightMouseUp: - { - m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Right, false); - break; - } + case NSRightMouseUp: + m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Right, false); + break; - case NSOtherMouseDown: - { - m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Middle, true); - break; - } + case NSOtherMouseDown: + m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Middle, true); + break; - case NSOtherMouseUp: - { - m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Middle, false); - break; - } + case NSOtherMouseUp: + m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll, MouseButton::Middle, false); + break; - case NSScrollWheel: - { - m_scrollf += [event deltaY]; + case NSScrollWheel: + m_scrollf += [event deltaY]; - m_scroll = (int32_t)m_scrollf; - m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll); - break; - } + m_scroll = (int32_t)m_scrollf; + m_eventQueue.postMouseEvent(s_defaultWindow, m_mx, m_my, m_scroll); + break; - case NSKeyDown: + case NSKeyDown: { uint8_t modifiers = 0; uint8_t pressedChar[4]; @@ -351,11 +340,10 @@ namespace entry return false; } } - - break; } + break; - case NSKeyUp: + case NSKeyUp: { uint8_t modifiers = 0; uint8_t pressedChar[4]; @@ -369,8 +357,11 @@ namespace entry return false; } - break; } + break; + + default: + break; } [NSApp sendEvent:event]; @@ -409,7 +400,7 @@ namespace entry m_eventQueue.postSuspendEvent(s_defaultWindow, Suspend::DidSuspend); } - int32_t run(int _argc, char** _argv) + int32_t run(int _argc, const char* const* _argv) { [NSApplication sharedApplication]; @@ -481,16 +472,16 @@ namespace entry thread.init(mte.threadFunc, &mte); WindowHandle handle = { 0 }; - m_eventQueue.postSizeEvent(handle, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT); + NSRect contentRect = [window contentRectForFrameRect: m_windowFrame]; + uint32_t width = uint32_t(contentRect.size.width); + uint32_t height = uint32_t(contentRect.size.height); + m_eventQueue.postSizeEvent(handle, width, height); while (!(m_exit = [dg applicationHasTerminated]) ) { @autoreleasepool { - if (bgfx::RenderFrame::Exiting == bgfx::renderFrame() ) - { - break; - } + bgfx::renderFrame(); } while (dispatchEvent(peekEvent() ) ) @@ -605,16 +596,9 @@ namespace entry } } - void toggleWindowFrame(WindowHandle _handle) + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled) { - if (s_ctx.isValid(_handle) ) - { - s_ctx.m_style ^= NSTitledWindowMask; - dispatch_async(dispatch_get_main_queue() - , ^{ - [s_ctx.m_window[_handle.idx] setStyleMask: s_ctx.m_style]; - }); - } + BX_UNUSED(_handle, _flags, _enabled); } void toggleFullscreen(WindowHandle _handle) @@ -770,7 +754,7 @@ namespace entry @end -int main(int _argc, char** _argv) +int main(int _argc, const char* const* _argv) { using namespace entry; return s_ctx.run(_argc, _argv); diff --git a/3rdparty/bgfx/examples/common/entry/entry_p.h b/3rdparty/bgfx/examples/common/entry/entry_p.h index ab45cfe..6776610 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_p.h +++ b/3rdparty/bgfx/examples/common/entry/entry_p.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -9,11 +9,12 @@ #define TINYSTL_ALLOCATOR entry::TinyStlAllocator #include +#include #include "entry.h" #ifndef ENTRY_CONFIG_USE_NOOP -# define ENTRY_CONFIG_USE_NOOP (BX_PLATFORM_QNX) +# define ENTRY_CONFIG_USE_NOOP 0 #endif // ENTRY_CONFIG_USE_NOOP #ifndef ENTRY_CONFIG_USE_SDL @@ -67,7 +68,7 @@ namespace entry static void static_deallocate(void* _ptr, size_t /*_bytes*/); }; - int main(int _argc, char** _argv); + int main(int _argc, const char* const* _argv); char keyToAscii(Key::Enum _key, uint8_t _modifiers); @@ -84,6 +85,7 @@ namespace entry Size, Window, Suspend, + DropFile, }; Event(Enum _type) @@ -170,6 +172,13 @@ namespace entry Suspend::Enum m_state; }; + struct DropFileEvent : public Event + { + ENTRY_IMPLEMENT_EVENT(DropFileEvent, Event::DropFile); + + bx::FilePath m_filePath; + }; + const Event* poll(); const Event* poll(WindowHandle _handle); void release(const Event* _event); @@ -177,6 +186,11 @@ namespace entry class EventQueue { public: + EventQueue() + : m_queue(getAllocator() ) + { + } + ~EventQueue() { for (const Event* ev = poll(); NULL != ev; ev = poll() ) @@ -187,7 +201,7 @@ namespace entry void postAxisEvent(WindowHandle _handle, GamepadHandle _gamepad, GamepadAxis::Enum _axis, int32_t _value) { - AxisEvent* ev = new AxisEvent(_handle); + AxisEvent* ev = BX_NEW(getAllocator(), AxisEvent)(_handle); ev->m_gamepad = _gamepad; ev->m_axis = _axis; ev->m_value = _value; @@ -196,7 +210,7 @@ namespace entry void postCharEvent(WindowHandle _handle, uint8_t _len, const uint8_t _char[4]) { - CharEvent* ev = new CharEvent(_handle); + CharEvent* ev = BX_NEW(getAllocator(), CharEvent)(_handle); ev->m_len = _len; bx::memCopy(ev->m_char, _char, 4); m_queue.push(ev); @@ -204,13 +218,13 @@ namespace entry void postExitEvent() { - Event* ev = new Event(Event::Exit); + Event* ev = BX_NEW(getAllocator(), Event)(Event::Exit); m_queue.push(ev); } void postGamepadEvent(WindowHandle _handle, GamepadHandle _gamepad, bool _connected) { - GamepadEvent* ev = new GamepadEvent(_handle); + GamepadEvent* ev = BX_NEW(getAllocator(), GamepadEvent)(_handle); ev->m_gamepad = _gamepad; ev->m_connected = _connected; m_queue.push(ev); @@ -218,7 +232,7 @@ namespace entry void postKeyEvent(WindowHandle _handle, Key::Enum _key, uint8_t _modifiers, bool _down) { - KeyEvent* ev = new KeyEvent(_handle); + KeyEvent* ev = BX_NEW(getAllocator(), KeyEvent)(_handle); ev->m_key = _key; ev->m_modifiers = _modifiers; ev->m_down = _down; @@ -227,7 +241,7 @@ namespace entry void postMouseEvent(WindowHandle _handle, int32_t _mx, int32_t _my, int32_t _mz) { - MouseEvent* ev = new MouseEvent(_handle); + MouseEvent* ev = BX_NEW(getAllocator(), MouseEvent)(_handle); ev->m_mx = _mx; ev->m_my = _my; ev->m_mz = _mz; @@ -239,7 +253,7 @@ namespace entry void postMouseEvent(WindowHandle _handle, int32_t _mx, int32_t _my, int32_t _mz, MouseButton::Enum _button, bool _down) { - MouseEvent* ev = new MouseEvent(_handle); + MouseEvent* ev = BX_NEW(getAllocator(), MouseEvent)(_handle); ev->m_mx = _mx; ev->m_my = _my; ev->m_mz = _mz; @@ -251,7 +265,7 @@ namespace entry void postSizeEvent(WindowHandle _handle, uint32_t _width, uint32_t _height) { - SizeEvent* ev = new SizeEvent(_handle); + SizeEvent* ev = BX_NEW(getAllocator(), SizeEvent)(_handle); ev->m_width = _width; ev->m_height = _height; m_queue.push(ev); @@ -259,18 +273,25 @@ namespace entry void postWindowEvent(WindowHandle _handle, void* _nwh = NULL) { - WindowEvent* ev = new WindowEvent(_handle); + WindowEvent* ev = BX_NEW(getAllocator(), WindowEvent)(_handle); ev->m_nwh = _nwh; m_queue.push(ev); } void postSuspendEvent(WindowHandle _handle, Suspend::Enum _state) { - SuspendEvent* ev = new SuspendEvent(_handle); + SuspendEvent* ev = BX_NEW(getAllocator(), SuspendEvent)(_handle); ev->m_state = _state; m_queue.push(ev); } + void postDropFileEvent(WindowHandle _handle, const bx::FilePath& _filePath) + { + DropFileEvent* ev = BX_NEW(getAllocator(), DropFileEvent)(_handle); + ev->m_filePath = _filePath; + m_queue.push(ev); + } + const Event* poll() { return m_queue.pop(); @@ -293,7 +314,7 @@ namespace entry void release(const Event* _event) const { - delete _event; + BX_DELETE(getAllocator(), const_cast(_event) ); } private: diff --git a/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp b/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp index b8476f7..7a14820 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -11,7 +11,7 @@ # define SDL_MAIN_HANDLED #endif // BX_PLATFORM_WINDOWS -#include +#include #include @@ -25,12 +25,10 @@ BX_PRAGMA_DIAGNOSTIC_POP() # undef None #endif // defined(None) -#include #include #include #include #include -#include #include #include @@ -251,7 +249,7 @@ namespace entry int m_argc; char** m_argv; - static int32_t threadFunc(void* _userData); + static int32_t threadFunc(bx::Thread* _thread, void* _userData); }; /// @@ -283,6 +281,7 @@ namespace entry , m_width(0) , m_height(0) , m_flags(0) + , m_flagsEnabled(false) { } @@ -292,6 +291,7 @@ namespace entry uint32_t m_height; uint32_t m_flags; tinystl::string m_title; + bool m_flagsEnabled; }; static uint32_t s_userEventStart; @@ -301,6 +301,7 @@ namespace entry SDL_USER_WINDOW_CREATE, SDL_USER_WINDOW_DESTROY, SDL_USER_WINDOW_SET_TITLE, + SDL_USER_WINDOW_SET_FLAGS, SDL_USER_WINDOW_SET_POS, SDL_USER_WINDOW_SET_SIZE, SDL_USER_WINDOW_TOGGLE_FRAME, @@ -487,16 +488,27 @@ namespace entry WindowHandle defaultWindow = { 0 }; setWindowSize(defaultWindow, m_width, m_height, true); - bx::FileReaderI* reader = getFileReader(); + SDL_EventState(SDL_DROPFILE, SDL_ENABLE); + + bx::FileReaderI* reader = NULL; + while (NULL == reader) + { + reader = getFileReader(); + bx::sleep(100); + } + if (bx::open(reader, "gamecontrollerdb.txt") ) { bx::AllocatorI* allocator = getAllocator(); uint32_t size = (uint32_t)bx::getSize(reader); - void* data = BX_ALLOC(allocator, size); + void* data = BX_ALLOC(allocator, size + 1); bx::read(reader, data, size); bx::close(reader); + ((char*)data)[size] = '\0'; - SDL_GameControllerAddMapping( (char*)data); + if (SDL_GameControllerAddMapping( (char*)data) < 0) { + DBG("SDL game controller add mapping failed: %s", SDL_GetError()); + } BX_FREE(allocator, data); } @@ -796,6 +808,18 @@ namespace entry } break; + case SDL_DROPFILE: + { + const SDL_DropEvent& dev = event.drop; + WindowHandle handle = defaultWindow; //findHandle(dev.windowID); + if (isValid(handle) ) + { + m_eventQueue.postDropFileEvent(handle, dev.file); + SDL_free(dev.file); + } + } + break; + default: { const SDL_UserEvent& uev = event.user; @@ -807,13 +831,13 @@ namespace entry Msg* msg = (Msg*)uev.data2; m_window[handle.idx] = SDL_CreateWindow(msg->m_title.c_str() - , msg->m_x - , msg->m_y - , msg->m_width - , msg->m_height - , SDL_WINDOW_SHOWN - | SDL_WINDOW_RESIZABLE - ); + , msg->m_x + , msg->m_y + , msg->m_width + , msg->m_height + , SDL_WINDOW_SHOWN + | SDL_WINDOW_RESIZABLE + ); m_flags[handle.idx] = msg->m_flags; @@ -852,6 +876,24 @@ namespace entry } break; + case SDL_USER_WINDOW_SET_FLAGS: + { + WindowHandle handle = getWindowHandle(uev); + Msg* msg = (Msg*)uev.data2; + + if (msg->m_flagsEnabled) + { + m_flags[handle.idx] |= msg->m_flags; + } + else + { + m_flags[handle.idx] &= ~msg->m_flags; + } + + delete msg; + } + break; + case SDL_USER_WINDOW_SET_POS: { WindowHandle handle = getWindowHandle(uev); @@ -1068,9 +1110,12 @@ namespace entry sdlPostEvent(SDL_USER_WINDOW_SET_TITLE, _handle, msg); } - void toggleWindowFrame(WindowHandle _handle) + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled) { - sdlPostEvent(SDL_USER_WINDOW_TOGGLE_FRAME, _handle); + Msg* msg = new Msg; + msg->m_flags = _flags; + msg->m_flagsEnabled = _enabled; + sdlPostEvent(SDL_USER_WINDOW_SET_FLAGS, _handle, msg); } void toggleFullscreen(WindowHandle _handle) @@ -1083,8 +1128,10 @@ namespace entry sdlPostEvent(SDL_USER_WINDOW_MOUSE_LOCK, _handle, NULL, _lock); } - int32_t MainThreadEntry::threadFunc(void* _userData) + int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData) { + BX_UNUSED(_thread); + MainThreadEntry* self = (MainThreadEntry*)_userData; int32_t result = main(self->m_argc, self->m_argv); diff --git a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp index 055c857..7ea3471 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -266,6 +266,7 @@ namespace entry WM_USER_WINDOW_CREATE = WM_USER, WM_USER_WINDOW_DESTROY, WM_USER_WINDOW_SET_TITLE, + WM_USER_WINDOW_SET_FLAGS, WM_USER_WINDOW_SET_POS, WM_USER_WINDOW_SET_SIZE, WM_USER_WINDOW_TOGGLE_FRAME, @@ -311,9 +312,9 @@ namespace entry struct MainThreadEntry { int m_argc; - char** m_argv; + const char* const* m_argv; - static int32_t threadFunc(void* _userData); + static int32_t threadFunc(bx::Thread* _thread, void* _userData); }; struct Msg @@ -324,6 +325,7 @@ namespace entry , m_width(0) , m_height(0) , m_flags(0) + , m_flagsEnabled(false) { } @@ -333,6 +335,7 @@ namespace entry uint32_t m_height; uint32_t m_flags; tinystl::string m_title; + bool m_flagsEnabled; }; static void mouseCapture(HWND _hwnd, bool _capture) @@ -381,7 +384,7 @@ namespace entry s_translateKey[VK_OEM_7] = Key::Quote; s_translateKey[VK_OEM_COMMA] = Key::Comma; s_translateKey[VK_OEM_PERIOD] = Key::Period; - s_translateKey[VK_DECIMAL] = Key::Period; + s_translateKey[VK_DECIMAL] = Key::Period; s_translateKey[VK_OEM_2] = Key::Slash; s_translateKey[VK_OEM_5] = Key::Backslash; s_translateKey[VK_OEM_3] = Key::Tilde; @@ -445,7 +448,7 @@ namespace entry s_translateKey[uint8_t('Z')] = Key::KeyZ; } - int32_t run(int _argc, char** _argv) + int32_t run(int _argc, const char* const* _argv) { SetDllDirectoryA("."); @@ -466,7 +469,9 @@ namespace entry RegisterClassExA(&wnd); m_windowAlloc.alloc(); - m_hwnd[0] = CreateWindowA("bgfx" + m_hwnd[0] = CreateWindowExA( + WS_EX_ACCEPTFILES + , "bgfx" , "BGFX" , WS_OVERLAPPEDWINDOW|WS_VISIBLE , 0 @@ -498,6 +503,8 @@ namespace entry mte.m_argc = _argc; mte.m_argv = _argv; + bgfx::renderFrame(); + bx::Thread thread; thread.init(mte.threadFunc, &mte); m_init = true; @@ -509,6 +516,8 @@ namespace entry while (!m_exit) { + bgfx::renderFrame(); + s_xinput.update(m_eventQueue); WaitForInputIdle(GetCurrentProcess(), 16); @@ -519,6 +528,8 @@ namespace entry } } + while (bgfx::RenderFrame::NoContext != bgfx::renderFrame() ) {}; + thread.shutdown(); DestroyWindow(m_hwnd[0]); @@ -584,6 +595,23 @@ namespace entry } break; + case WM_USER_WINDOW_SET_FLAGS: + { + Msg* msg = (Msg*)_lparam; + + if (msg->m_flagsEnabled) + { + m_flags[_wparam] |= msg->m_flags; + } + else + { + m_flags[_wparam] &= ~msg->m_flags; + } + + delete msg; + } + break; + case WM_USER_WINDOW_SET_POS: { Msg* msg = (Msg*)_lparam; @@ -661,13 +689,23 @@ namespace entry } // Recalculate position using different anchor points - switch(_wparam) + switch (_wparam) { - case WMSZ_LEFT: case WMSZ_TOPLEFT: + rect.left = rect.right - width - m_frameWidth; + rect.top = rect.bottom - height - m_frameHeight; + break; + + case WMSZ_TOP: + case WMSZ_TOPRIGHT: + rect.right = rect.left + width + m_frameWidth; + rect.top = rect.bottom - height - m_frameHeight; + break; + + case WMSZ_LEFT: case WMSZ_BOTTOMLEFT: - rect.left = rect.right - width - m_frameWidth; - rect.bottom = rect.top + height + m_frameHeight; + rect.left = rect.right - width - m_frameWidth; + rect.bottom = rect.top + height + m_frameHeight; break; default: @@ -822,6 +860,17 @@ namespace entry } break; + case WM_DROPFILES: + { + HDROP drop = (HDROP)_wparam; + char tmp[bx::kMaxFilePath]; + uint32_t result = DragQueryFileA(drop, 0, tmp, sizeof(tmp) ); + BX_UNUSED(result); + WindowHandle handle = findHandle(_hwnd); + m_eventQueue.postDropFileEvent(handle, tmp); + } + break; + default: break; } @@ -881,10 +930,6 @@ namespace entry } else { -#if defined(__MINGW32__) - rect = m_rect; - style = m_style; -#else HMONITOR monitor = MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST); MONITORINFO mi; mi.cbSize = sizeof(mi); @@ -892,7 +937,6 @@ namespace entry newrect = mi.rcMonitor; rect = mi.rcMonitor; m_aspectRatio = float(newrect.right - newrect.left)/float(newrect.bottom - newrect.top); -#endif // !defined(__MINGW__) } SetWindowLong(_hwnd, GWL_STYLE, style); @@ -1070,9 +1114,12 @@ namespace entry PostMessage(s_ctx.m_hwnd[0], WM_USER_WINDOW_SET_TITLE, _handle.idx, (LPARAM)msg); } - void toggleWindowFrame(WindowHandle _handle) + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled) { - PostMessage(s_ctx.m_hwnd[0], WM_USER_WINDOW_TOGGLE_FRAME, _handle.idx, 0); + Msg* msg = new Msg; + msg->m_flags = _flags; + msg->m_flagsEnabled = _enabled; + PostMessage(s_ctx.m_hwnd[0], WM_USER_WINDOW_SET_FLAGS, _handle.idx, (LPARAM)msg); } void toggleFullscreen(WindowHandle _handle) @@ -1085,7 +1132,7 @@ namespace entry PostMessage(s_ctx.m_hwnd[0], WM_USER_WINDOW_MOUSE_LOCK, _handle.idx, _lock); } - int32_t MainThreadEntry::threadFunc(void* _userData) + int32_t MainThreadEntry::threadFunc(bx::Thread* /*_thread*/, void* _userData) { MainThreadEntry* self = (MainThreadEntry*)_userData; int32_t result = main(self->m_argc, self->m_argv); @@ -1095,7 +1142,7 @@ namespace entry } // namespace entry -int main(int _argc, char** _argv) +int main(int _argc, const char* const* _argv) { using namespace entry; return s_ctx.run(_argc, _argv); diff --git a/3rdparty/bgfx/examples/common/entry/entry_winrt.cx b/3rdparty/bgfx/examples/common/entry/entry_winrt.cx index 39e3d1d..76270e9 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_winrt.cx +++ b/3rdparty/bgfx/examples/common/entry/entry_winrt.cx @@ -9,7 +9,7 @@ #include #include -#include +#include #include using namespace Windows::ApplicationModel; @@ -24,7 +24,7 @@ using namespace Windows::Graphics::Display; #endif // BX_PLATFORM_WINRT using namespace Platform; -static char* g_emptyArgs[] = { "" }; +static const char* const g_emptyArgs[] = { "app.exe", "", "" }; static entry::WindowHandle g_defaultWindow = { 0 }; static entry::EventQueue g_eventQueue; @@ -79,6 +79,8 @@ public: virtual void Run() { + bgfx::renderFrame(); + bx::Thread thread; thread.init(MainThreadFunc, nullptr); @@ -89,8 +91,8 @@ public: auto dpi = DisplayInformation::GetForCurrentView()->LogicalDpi; static const float dipsPerInch = 96.0f; g_eventQueue.postSizeEvent(g_defaultWindow - , lround(bx::ffloor(bounds.Width * dpi / dipsPerInch + 0.5f) ) - , lround(bx::ffloor(bounds.Height * dpi / dipsPerInch + 0.5f) ) + , lround(bx::floor(bounds.Width * dpi / dipsPerInch + 0.5f) ) + , lround(bx::floor(bounds.Height * dpi / dipsPerInch + 0.5f) ) ); #endif // BX_PLATFORM_WINRT @@ -104,10 +106,14 @@ public: { window->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessOneAndAllPending); } + + bgfx::renderFrame(); } g_eventQueue.postExitEvent(); + while (bgfx::RenderFrame::NoContext != bgfx::renderFrame() ) {}; + thread.shutdown(); } @@ -144,9 +150,9 @@ private: m_windowClosed = true; } - static int32_t MainThreadFunc(void*) + static int32_t MainThreadFunc(bx::Thread*, void*) { - return entry::main(0, g_emptyArgs); + return entry::main(BX_COUNTOF(g_emptyArgs), g_emptyArgs); } }; @@ -203,9 +209,9 @@ namespace entry BX_UNUSED(_handle, _title); } - void toggleWindowFrame(WindowHandle _handle) + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled) { - BX_UNUSED(_handle); + BX_UNUSED(_handle, _flags, _enabled); } void toggleFullscreen(WindowHandle _handle) diff --git a/3rdparty/bgfx/examples/common/entry/entry_x11.cpp b/3rdparty/bgfx/examples/common/entry/entry_x11.cpp index 78e4306..155c4dd 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_x11.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_x11.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -220,10 +220,10 @@ namespace entry struct MainThreadEntry { - int m_argc; - char** m_argv; + int32_t m_argc; + const char* const* m_argv; - static int32_t threadFunc(void* _userData); + static int32_t threadFunc(bx::Thread* _thread, void* _userData); }; struct Msg @@ -343,7 +343,7 @@ namespace entry m_mz = 0; } - int32_t run(int _argc, char** _argv) + int32_t run(int _argc, const char* const* _argv) { XInitThreads(); m_display = XOpenDisplay(0); @@ -679,8 +679,10 @@ namespace entry static Context s_ctx; - int32_t MainThreadEntry::threadFunc(void* _userData) + int32_t MainThreadEntry::threadFunc(bx::Thread* _thread, void* _userData) { + BX_UNUSED(_thread); + MainThreadEntry* self = (MainThreadEntry*)_userData; int32_t result = main(self->m_argc, self->m_argv); s_ctx.m_exit = true; @@ -756,9 +758,9 @@ namespace entry XStoreName(display, window, _title); } - void toggleWindowFrame(WindowHandle _handle) + void setWindowFlags(WindowHandle _handle, uint32_t _flags, bool _enabled) { - BX_UNUSED(_handle); + BX_UNUSED(_handle, _flags, _enabled); } void toggleFullscreen(WindowHandle _handle) @@ -773,7 +775,7 @@ namespace entry } // namespace entry -int main(int _argc, char** _argv) +int main(int _argc, const char* const* _argv) { using namespace entry; return s_ctx.run(_argc, _argv); diff --git a/3rdparty/bgfx/examples/common/entry/input.cpp b/3rdparty/bgfx/examples/common/entry/input.cpp index e90d05e..5fdad9c 100644 --- a/3rdparty/bgfx/examples/common/entry/input.cpp +++ b/3rdparty/bgfx/examples/common/entry/input.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/entry/input.h b/3rdparty/bgfx/examples/common/entry/input.h index 281267d..6954f3d 100644 --- a/3rdparty/bgfx/examples/common/entry/input.h +++ b/3rdparty/bgfx/examples/common/entry/input.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/example-glue.cpp b/3rdparty/bgfx/examples/common/example-glue.cpp new file mode 100644 index 0000000..b6b3d45 --- /dev/null +++ b/3rdparty/bgfx/examples/common/example-glue.cpp @@ -0,0 +1,392 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "imgui/imgui.h" +#include "entry/entry.h" +#include "entry/cmd.h" +#include +#include +#include + +static bool bar(float _width, float _maxWidth, float _height, const ImVec4& _color) +{ + const ImGuiStyle& style = ImGui::GetStyle(); + + ImVec4 hoveredColor( + _color.x + _color.x*0.1f + , _color.y + _color.y*0.1f + , _color.z + _color.z*0.1f + , _color.w + _color.w*0.1f + ); + + ImGui::PushStyleColor(ImGuiCol_Button, _color); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, hoveredColor); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, _color); + ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 0.0f); + ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, style.ItemSpacing.y) ); + + bool itemHovered = false; + + ImGui::Button("", ImVec2(_width, _height) ); + itemHovered |= ImGui::IsItemHovered(); + + ImGui::SameLine(); + ImGui::InvisibleButton("", ImVec2(_maxWidth-_width, _height) ); + itemHovered |= ImGui::IsItemHovered(); + + ImGui::PopStyleVar(2); + ImGui::PopStyleColor(3); + + return itemHovered; +} + +static const ImVec4 s_resourceColor(0.5f, 0.5f, 0.5f, 1.0f); + +static void resourceBar(const char* _name, const char* _tooltip, uint32_t _num, uint32_t _max, float _maxWidth, float _height) +{ + bool itemHovered = false; + + ImGui::Text("%s: %4d / %4d", _name, _num, _max); + itemHovered |= ImGui::IsItemHovered(); + ImGui::SameLine(); + + const float percentage = float(_num)/float(_max); + + itemHovered |= bar(bx::max(1.0f, percentage*_maxWidth), _maxWidth, _height, s_resourceColor); + ImGui::SameLine(); + + ImGui::Text("%5.2f%%", percentage*100.0f); + + if (itemHovered) + { + ImGui::SetTooltip("%s %5.2f%%" + , _tooltip + , percentage*100.0f + ); + } +} + +static bool s_showStats = false; + +void showExampleDialog(entry::AppI* _app, const char* _errorText) +{ + char temp[1024]; + bx::snprintf(temp, BX_COUNTOF(temp), "Example: %s", _app->getName() ); + + ImGui::SetNextWindowPos( + ImVec2(10.0f, 50.0f) + , ImGuiCond_FirstUseEver + ); + ImGui::SetNextWindowSize( + ImVec2(300.0f, 200.0f) + , ImGuiCond_FirstUseEver + ); + + ImGui::Begin(temp); + + ImGui::TextWrapped("%s", _app->getDescription() ); + ImGui::Separator(); + + if (NULL != _errorText) + { + const int64_t now = bx::getHPCounter(); + const int64_t freq = bx::getHPFrequency(); + const float time = float(now%freq)/float(freq); + + bool blink = time > 0.5f; + + ImGui::PushStyleColor(ImGuiCol_Text + , blink + ? ImVec4(1.0, 0.0, 0.0, 1.0) + : ImVec4(1.0, 1.0, 1.0, 1.0) + ); + ImGui::TextWrapped("%s", _errorText); + ImGui::Separator(); + ImGui::PopStyleColor(); + } + + { + uint32_t num = entry::getNumApps(); + const char** items = (const char**)alloca(num*sizeof(void*) ); + + uint32_t ii = 0; + int32_t current = 0; + for (entry::AppI* app = entry::getFirstApp(); NULL != app; app = app->getNext() ) + { + if (app == _app) + { + current = ii; + } + + items[ii++] = app->getName(); + } + + if (1 < num + && ImGui::Combo("Example", ¤t, items, num) ) + { + char command[1024]; + bx::snprintf(command, BX_COUNTOF(command), "app restart %s", items[current]); + cmdExec(command); + } + + const bgfx::Caps* caps = bgfx::getCaps(); + if (0 != (caps->supported & BGFX_CAPS_GRAPHICS_DEBUGGER) ) + { + ImGui::SameLine(); + ImGui::Text(ICON_FA_SNOWFLAKE_O); + } + + ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(3.0f, 3.0f) ); + + if (ImGui::Button(ICON_FA_REPEAT " Restart" ) ) + { + cmdExec("app restart"); + } + + if (1 < entry::getNumApps() ) + { + ImGui::SameLine(); + if (ImGui::Button(ICON_KI_PREVIOUS " Prev") ) + { + cmdExec("app restart prev"); + } + + ImGui::SameLine(); + if (ImGui::Button(ICON_KI_NEXT " Next") ) + { + cmdExec("app restart next"); + } + } + + ImGui::SameLine(); + if (ImGui::Button(ICON_KI_EXIT " Exit") ) + { + cmdExec("exit"); + } + + ImGui::SameLine(); + s_showStats ^= ImGui::Button(ICON_FA_BAR_CHART); + + ImGui::PopStyleVar(); + } + +#if 0 + { + bgfx::RendererType::Enum supportedRenderers[bgfx::RendererType::Count]; + uint8_t num = bgfx::getSupportedRenderers(BX_COUNTOF(supportedRenderers), supportedRenderers); + + const bgfx::Caps* caps = bgfx::getCaps(); + + const char* items[bgfx::RendererType::Count]; + + int32_t current = 0; + for (uint8_t ii = 0; ii < num; ++ii) + { + items[ii] = bgfx::getRendererName(supportedRenderers[ii]); + if (supportedRenderers[ii] == caps->rendererType) + { + current = ii; + } + } + + if (ImGui::Combo("Renderer", ¤t, items, num) ) + { + cmdExec("app restart"); + } + + num = caps->numGPUs; + if (0 != num) + { + current = 0; + for (uint8_t ii = 0; ii < num; ++ii) + { + const bgfx::Caps::GPU& gpu = caps->gpu[ii]; + + items[ii] = gpu.vendorId == BGFX_PCI_ID_AMD ? "AMD" + : gpu.vendorId == BGFX_PCI_ID_INTEL ? "Intel" + : gpu.vendorId == BGFX_PCI_ID_NVIDIA ? "nVidia" + : "Unknown?" + ; + + if (caps->vendorId == gpu.vendorId + && caps->deviceId == gpu.deviceId) + { + current = ii; + } + } + + if (ImGui::Combo("GPU", ¤t, items, num) ) + { + cmdExec("app restart"); + } + } + } +#endif // 0 + + const bgfx::Stats* stats = bgfx::getStats(); + const double toMsCpu = 1000.0/stats->cpuTimerFreq; + const double toMsGpu = 1000.0/stats->gpuTimerFreq; + const double frameMs = double(stats->cpuTimeFrame)*toMsCpu; + ImGui::Text("Frame %0.3f [ms], %0.3f FPS" + , frameMs + , 1000.0/frameMs + ); + + ImGui::Text("Submit CPU %0.3f, GPU %0.3f (L: %d)" + , double(stats->cpuTimeEnd - stats->cpuTimeBegin)*toMsCpu + , double(stats->gpuTimeEnd - stats->gpuTimeBegin)*toMsGpu + , stats->maxGpuLatency + ); + + if (-INT64_MAX != stats->gpuMemoryUsed) + { + char tmp0[64]; + bx::prettify(tmp0, BX_COUNTOF(tmp0), stats->gpuMemoryUsed); + + char tmp1[64]; + bx::prettify(tmp1, BX_COUNTOF(tmp1), stats->gpuMemoryMax); + + ImGui::Text("GPU mem: %s / %s", tmp0, tmp1); + } + + if (s_showStats) + { + ImGui::SetNextWindowSize( + ImVec2(300.0f, 500.0f) + , ImGuiCond_FirstUseEver + ); + + if (ImGui::Begin(ICON_FA_BAR_CHART " Stats", &s_showStats) ) + { + if (ImGui::CollapsingHeader(ICON_FA_PUZZLE_PIECE " Resources") ) + { + const bgfx::Caps* caps = bgfx::getCaps(); + + const float itemHeight = ImGui::GetTextLineHeightWithSpacing(); + const float maxWidth = 90.0f; + + ImGui::PushFont(ImGui::Font::Mono); + ImGui::Text("Res: Num / Max"); + resourceBar("DIB", "Dynamic index buffers", stats->numDynamicIndexBuffers, caps->limits.maxDynamicIndexBuffers, maxWidth, itemHeight); + resourceBar("DVB", "Dynamic vertex buffers", stats->numDynamicVertexBuffers, caps->limits.maxDynamicVertexBuffers, maxWidth, itemHeight); + resourceBar(" FB", "Frame buffers", stats->numFrameBuffers, caps->limits.maxFrameBuffers, maxWidth, itemHeight); + resourceBar(" IB", "Index buffers", stats->numIndexBuffers, caps->limits.maxIndexBuffers, maxWidth, itemHeight); + resourceBar(" OQ", "Occlusion queries", stats->numOcclusionQueries, caps->limits.maxOcclusionQueries, maxWidth, itemHeight); + resourceBar(" P", "Programs", stats->numPrograms, caps->limits.maxPrograms, maxWidth, itemHeight); + resourceBar(" S", "Shaders", stats->numShaders, caps->limits.maxShaders, maxWidth, itemHeight); + resourceBar(" T", "Textures", stats->numTextures, caps->limits.maxTextures, maxWidth, itemHeight); + resourceBar(" U", "Uniforms", stats->numUniforms, caps->limits.maxUniforms, maxWidth, itemHeight); + resourceBar(" VB", "Vertex buffers", stats->numVertexBuffers, caps->limits.maxVertexBuffers, maxWidth, itemHeight); + resourceBar(" VD", "Vertex declarations", stats->numVertexDecls, caps->limits.maxVertexDecls, maxWidth, itemHeight); + ImGui::PopFont(); + } + + if (ImGui::CollapsingHeader(ICON_FA_CLOCK_O " Profiler") ) + { + if (0 == stats->numViews) + { + ImGui::Text("Profiler is not enabled."); + } + else + { + if (ImGui::BeginChild("##view_profiler", ImVec2(0.0f, 0.0f) ) ) + { + ImGui::PushFont(ImGui::Font::Mono); + + ImVec4 cpuColor(0.5f, 1.0f, 0.5f, 1.0f); + ImVec4 gpuColor(0.5f, 0.5f, 1.0f, 1.0f); + + const float itemHeight = ImGui::GetTextLineHeightWithSpacing(); + const float itemHeightWithSpacing = ImGui::GetFrameHeightWithSpacing(); + const double toCpuMs = 1000.0/double(stats->cpuTimerFreq); + const double toGpuMs = 1000.0/double(stats->gpuTimerFreq); + const float scale = 3.0f; + + if (ImGui::ListBoxHeader("Encoders", ImVec2(ImGui::GetWindowWidth(), stats->numEncoders*itemHeightWithSpacing) ) ) + { + ImGuiListClipper clipper(stats->numEncoders, itemHeight); + + while (clipper.Step() ) + { + for (int32_t pos = clipper.DisplayStart; pos < clipper.DisplayEnd; ++pos) + { + const bgfx::EncoderStats& encoderStats = stats->encoderStats[pos]; + + ImGui::Text("%3d", pos); + ImGui::SameLine(64.0f); + + const float maxWidth = 30.0f*scale; + const float cpuMs = float( (encoderStats.cpuTimeEnd-encoderStats.cpuTimeBegin)*toCpuMs); + const float cpuWidth = bx::clamp(cpuMs*scale, 1.0f, maxWidth); + + if (bar(cpuWidth, maxWidth, itemHeight, cpuColor) ) + { + ImGui::SetTooltip("Encoder %d, CPU: %f [ms]" + , pos + , cpuMs + ); + } + } + } + + ImGui::ListBoxFooter(); + } + + ImGui::Separator(); + + if (ImGui::ListBoxHeader("Views", ImVec2(ImGui::GetWindowWidth(), stats->numViews*itemHeightWithSpacing) ) ) + { + ImGuiListClipper clipper(stats->numViews, itemHeight); + + while (clipper.Step() ) + { + for (int32_t pos = clipper.DisplayStart; pos < clipper.DisplayEnd; ++pos) + { + const bgfx::ViewStats& viewStats = stats->viewStats[pos]; + + ImGui::Text("%3d %3d %s", pos, viewStats.view, viewStats.name); + + const float maxWidth = 30.0f*scale; + const float cpuWidth = bx::clamp(float(viewStats.cpuTimeElapsed*toCpuMs)*scale, 1.0f, maxWidth); + const float gpuWidth = bx::clamp(float(viewStats.gpuTimeElapsed*toGpuMs)*scale, 1.0f, maxWidth); + + ImGui::SameLine(64.0f); + + if (bar(cpuWidth, maxWidth, itemHeight, cpuColor) ) + { + ImGui::SetTooltip("View %d \"%s\", CPU: %f [ms]" + , pos + , viewStats.name + , viewStats.cpuTimeElapsed*toCpuMs + ); + } + + ImGui::SameLine(); + if (bar(gpuWidth, maxWidth, itemHeight, gpuColor) ) + { + ImGui::SetTooltip("View: %d \"%s\", GPU: %f [ms]" + , pos + , viewStats.name + , viewStats.gpuTimeElapsed*toGpuMs + ); + } + } + } + + ImGui::ListBoxFooter(); + } + + ImGui::PopFont(); + } + + ImGui::EndChild(); + } + } + } + ImGui::End(); + } + + ImGui::End(); +} diff --git a/3rdparty/bgfx/examples/common/font/font_manager.cpp b/3rdparty/bgfx/examples/common/font/font_manager.cpp index fb44cad..0da5c17 100644 --- a/3rdparty/bgfx/examples/common/font/font_manager.cpp +++ b/3rdparty/bgfx/examples/common/font/font_manager.cpp @@ -3,8 +3,6 @@ * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ -#define USE_EDTAA3 0 - #include #if BX_COMPILER_MSVC @@ -28,12 +26,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); #include -#if USE_EDTAA3 -# include -#else -# define SDF_IMPLEMENTATION -# include -#endif // USE_EDTAA3 +#define SDF_IMPLEMENTATION +#include #include // wcslen @@ -272,102 +266,6 @@ bool TrueTypeFont::bakeGlyphSubpixel(CodePoint _codePoint, GlyphInfo& _glyphInfo return true; } -static void makeDistanceMap(const uint8_t* _img, uint8_t* _outImg, uint32_t _width, uint32_t _height) -{ -#if USE_EDTAA3 - int16_t* xdist = (int16_t*)malloc(_width * _height * sizeof(int16_t) ); - int16_t* ydist = (int16_t*)malloc(_width * _height * sizeof(int16_t) ); - double* gx = (double*)calloc(_width * _height, sizeof(double) ); - double* gy = (double*)calloc(_width * _height, sizeof(double) ); - double* data = (double*)calloc(_width * _height, sizeof(double) ); - double* outside = (double*)calloc(_width * _height, sizeof(double) ); - double* inside = (double*)calloc(_width * _height, sizeof(double) ); - uint32_t ii; - - // Convert img into double (data) - double img_min = 255, img_max = -255; - for (ii = 0; ii < _width * _height; ++ii) - { - double v = _img[ii]; - data[ii] = v; - if (v > img_max) - { - img_max = v; - } - - if (v < img_min) - { - img_min = v; - } - } - - // Rescale image levels between 0 and 1 - for (ii = 0; ii < _width * _height; ++ii) - { - data[ii] = (_img[ii] - img_min) / (img_max - img_min); - } - - // Compute outside = edtaa3(bitmap); % Transform background (0's) - computegradient(data, _width, _height, gx, gy); - edtaa3(data, gx, gy, _width, _height, xdist, ydist, outside); - for (ii = 0; ii < _width * _height; ++ii) - { - if (outside[ii] < 0) - { - outside[ii] = 0.0; - } - } - - // Compute inside = edtaa3(1-bitmap); % Transform foreground (1's) - bx::memSet(gx, 0, sizeof(double) * _width * _height); - bx::memSet(gy, 0, sizeof(double) * _width * _height); - for (ii = 0; ii < _width * _height; ++ii) - { - data[ii] = 1.0 - data[ii]; - } - - computegradient(data, _width, _height, gx, gy); - edtaa3(data, gx, gy, _width, _height, xdist, ydist, inside); - for (ii = 0; ii < _width * _height; ++ii) - { - if (inside[ii] < 0) - { - inside[ii] = 0.0; - } - } - - // distmap = outside - inside; % Bipolar distance field - uint8_t* out = _outImg; - for (ii = 0; ii < _width * _height; ++ii) - { - outside[ii] -= inside[ii]; - outside[ii] = 128 + outside[ii] * 16; - - if (outside[ii] < 0) - { - outside[ii] = 0; - } - - if (outside[ii] > 255) - { - outside[ii] = 255; - } - - out[ii] = 255 - (uint8_t) outside[ii]; - } - - free(xdist); - free(ydist); - free(gx); - free(gy); - free(data); - free(outside); - free(inside); -#else - sdfBuild(_outImg, _width, 8.0f, _img, _width, _height, _width); -#endif // USE_EDTAA3 -} - bool TrueTypeFont::bakeGlyphDistance(CodePoint _codePoint, GlyphInfo& _glyphInfo, uint8_t* _outBuffer) { BX_CHECK(m_font != NULL, "TrueTypeFont not initialized"); @@ -426,7 +324,7 @@ bool TrueTypeFont::bakeGlyphDistance(CodePoint _codePoint, GlyphInfo& _glyphInfo bx::memCopy(alphaImg + ii * nw + dw, _outBuffer + (ii - dh) * ww, ww); } - makeDistanceMap(alphaImg, _outBuffer, nw, nh); + sdfBuild(_outBuffer, nw, 8.0f, alphaImg, nw, nh, nw); free(alphaImg); _glyphInfo.offset_x -= (float)dw; @@ -446,7 +344,7 @@ struct FontManager::CachedFont CachedFont() : trueTypeFont(NULL) { - masterFontHandle.idx = bx::HandleAlloc::invalid; + masterFontHandle.idx = bx::kInvalidHandle; } FontInfo fontInfo; @@ -510,7 +408,7 @@ FontManager::~FontManager() TrueTypeHandle FontManager::createTtf(const uint8_t* _buffer, uint32_t _size) { uint16_t id = m_filesHandles.alloc(); - BX_CHECK(id != bx::HandleAlloc::invalid, "Invalid handle used"); + BX_CHECK(id != bx::kInvalidHandle, "Invalid handle used"); m_cachedFiles[id].buffer = new uint8_t[_size]; m_cachedFiles[id].bufferSize = _size; bx::memCopy(m_cachedFiles[id].buffer, _buffer, _size); @@ -536,12 +434,12 @@ FontHandle FontManager::createFontByPixelSize(TrueTypeHandle _ttfHandle, uint32_ if (!ttf->init(m_cachedFiles[_ttfHandle.idx].buffer, m_cachedFiles[_ttfHandle.idx].bufferSize, _typefaceIndex, _pixelSize) ) { delete ttf; - FontHandle invalid = { bx::HandleAlloc::invalid }; + FontHandle invalid = { bx::kInvalidHandle }; return invalid; } uint16_t fontIdx = m_fontHandles.alloc(); - BX_CHECK(fontIdx != bx::HandleAlloc::invalid, "Invalid handle used"); + BX_CHECK(fontIdx != bx::kInvalidHandle, "Invalid handle used"); CachedFont& font = m_cachedFonts[fontIdx]; font.trueTypeFont = ttf; @@ -549,7 +447,7 @@ FontHandle FontManager::createFontByPixelSize(TrueTypeHandle _ttfHandle, uint32_ font.fontInfo.fontType = int16_t(_fontType); font.fontInfo.pixelSize = uint16_t(_pixelSize); font.cachedGlyphs.clear(); - font.masterFontHandle.idx = bx::HandleAlloc::invalid; + font.masterFontHandle.idx = bx::kInvalidHandle; FontHandle handle = { fontIdx }; return handle; @@ -572,7 +470,7 @@ FontHandle FontManager::createScaledFontToPixelSize(FontHandle _baseFontHandle, newFontInfo.underlinePosition = (newFontInfo.underlinePosition * newFontInfo.scale); uint16_t fontIdx = m_fontHandles.alloc(); - BX_CHECK(fontIdx != bx::HandleAlloc::invalid, "Invalid handle used"); + BX_CHECK(fontIdx != bx::kInvalidHandle, "Invalid handle used"); CachedFont& font = m_cachedFonts[fontIdx]; font.cachedGlyphs.clear(); @@ -719,6 +617,11 @@ const GlyphInfo* FontManager::getGlyphInfo(FontHandle _handle, CodePoint _codePo bool FontManager::addBitmap(GlyphInfo& _glyphInfo, const uint8_t* _data) { - _glyphInfo.regionIndex = m_atlas->addRegion( (uint16_t) ceil(_glyphInfo.width), (uint16_t) ceil(_glyphInfo.height), _data, AtlasRegion::TYPE_GRAY); + _glyphInfo.regionIndex = m_atlas->addRegion( + (uint16_t)bx::ceil(_glyphInfo.width) + , (uint16_t)bx::ceil(_glyphInfo.height) + , _data + , AtlasRegion::TYPE_GRAY + ); return true; } diff --git a/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h b/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h index 709bec2..3adbb44 100644 --- a/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h +++ b/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_font_basic_glsl[553] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x09, 0x02, 0x00, 0x00, 0x76, // Color..........v 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary @@ -36,340 +36,347 @@ static const uint8_t fs_font_basic_glsl[553] = 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ragColor = tmpva 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_4;.}... }; -static const uint8_t fs_font_basic_spv[4053] = +static const uint8_t fs_font_basic_spv[4175] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xc8, 0x0f, 0x03, 0x02, 0x23, 0x07, // FSH...........#. - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........Ta...... - 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, // GLSL.std.450.... - 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, // ........main.... - 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, // w...t........... - 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ - 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, // main........g... - 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x00, // BgfxSamplerCube. - 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, // ....g.......m_sa - 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, // mpler.......g... - 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, // ....m_texture... - 0x05, 0x00, 0x0f, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, // ........bgfxText - 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, // ureCube(struct-B - 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x2d, 0x70, // gfxSamplerCube-p - 0x31, 0x2d, 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, // 1-tC11;vf3;..... - 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, // '..._sampler.... - 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, // ........_coord.. - 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, // ....5...vec4_spl - 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, // at(f1;.......... - 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // _x..........@mai - 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // n(vf4;vf4;vf4;.. - 0x05, 0x00, 0x05, 0x00, 0x42, 0x24, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....B$..v_color0 - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, // ........x ..v_te - 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, // xcoord0......A.. - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, // gl_FragData_0_.. - 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // ....C...s_texCol - 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // or..........s_te - 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, // xColorSampler... - 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // ........s_texCol - 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // orTexture....... - 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, // ....bgfx_VoidFra - 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // g........T..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, // m...........colo - 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // r......./1..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x69, 0x6e, 0x64, 0x65, // m.......M...inde - 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x60, 0x10, 0x00, 0x00, 0x72, 0x67, 0x62, 0x61, // x.......`...rgba - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x61, 0x6c, 0x70, 0x68, // ............alph - 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, // a........A..v_co - 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, // lor0........w... - 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // v_color0........ - 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // .<..v_texcoord0. - 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ....t...v_texcoo - 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // rd0.........gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ragData_0_...... - 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .G..param....... - 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .U..param....... - 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....param....... - 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // ....gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x44, 0x01, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, // 0_......D...$Glo - 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x44, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // bal.....D....... - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_viewRect...... - 0x44, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, // D.......u_viewTe - 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // xel.....D....... - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x44, 0x01, 0x00, 0x00, // u_view......D... - 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, // ....u_invView... - 0x06, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, // ....D.......u_pr - 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x44, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // oj......D....... - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_invProj....... - 0x44, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // D.......u_viewPr - 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x44, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // oj......D....... - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // u_invViewProj... - 0x06, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ....D.......u_mo - 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x44, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // del.....D....... - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, // u_modelView..... - 0x44, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // D.......u_modelV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x44, 0x01, 0x00, 0x00, // iewProj.....D... - 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, // ....u_alphaRef4. - 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G......."....... - 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G.......!....... - 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G......."....... - 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G.......!....... - 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...w........... - 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // G...t........... - 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G............... - 0x47, 0x00, 0x04, 0x00, 0x42, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // G...B.......@... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...D.......#... - 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....H...D....... - 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x44, 0x01, 0x00, 0x00, // #.......H...D... - 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, // ........H...D... - 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... - 0x44, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // D............... - 0x48, 0x00, 0x04, 0x00, 0x44, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...D........... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...D.......#... - 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // `...H...D....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x44, 0x01, 0x00, 0x00, // ........H...D... - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, // ........H...D... - 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x44, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // D............... - 0x48, 0x00, 0x04, 0x00, 0x44, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...D........... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...D.......#... - 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H...D....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x44, 0x01, 0x00, 0x00, // ........H...D... - 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, // ........H...D... - 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... - 0x44, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // D............... - 0x48, 0x00, 0x04, 0x00, 0x44, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...D........... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...D.......#... - 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // `...H...D....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x44, 0x01, 0x00, 0x00, // ........H...D... - 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, // ........H...D... - 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x44, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // D............... - 0x48, 0x00, 0x04, 0x00, 0x44, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...D........... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...D.......#... - 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H...D....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x44, 0x01, 0x00, 0x00, // ........H...D... - 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, // ........H...D... - 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x44, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // D............... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...D.......#... - 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x44, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...G...D....... - 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, // ........!....... - 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x98, 0x00, 0x00, 0x00, // .... ........... - 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, // ................ - 0x67, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // g........... ... - 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // !.......g....... - 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // ................ - 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, // ............!... - 0xe8, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, // ........!....... - 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ............... - 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, // !............... - 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... - 0x21, 0x00, 0x06, 0x00, 0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, // !............... - 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, // ........;...!... - 0x43, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, // C....... ...y... - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, // ........;...y... - 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, // ........ ....... - 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, // ........;....... - 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ................ - 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // .......+....... - 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... - 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, // ................ - 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....+........... - 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, // ....+........... - 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x69, 0x0b, 0x00, 0x00, // ....+.......i... - 0x00, 0x00, 0x80, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, // ...@+........... - 0x00, 0x00, 0x00, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, // ...?+........... - 0x04, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x88, 0x03, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ - 0x16, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x05, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... - 0x88, 0x03, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, // ....+........... - 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, // ....+........... - 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // ....+........... - 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, // ....+........... - 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, // ....+........... - 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... - 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, // ....;.......w... - 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, // ....;.......t... - 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... - 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ....;........... - 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ........e....... - 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, // ....+.......j... - 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x42, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // .......B...e... - 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x44, 0x01, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // j.......D....... - 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ....e...e...e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x42, 0x03, 0x00, 0x00, // e...e...e...B... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, // e...e.......6... - 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....Sa..;....... - 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // .G......;....... - 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // .U......;....... - 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, // ........=....... - 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, // !C......=....... - 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, 0x00, 0x00, // .3......P...g... - 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // . ..!C...3..>... - 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // C.... ..=....... - 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .A..w...=....... - 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, // .<..t...>....G.. - 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, // .A..>....U...<.. - 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, // 9........&...... - 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .G...U......=... - 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ............>... - 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // ............8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0xe8, 0x03, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // ....7...!...'... - 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7............... - 0xcd, 0x5b, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x15, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, // .[..A.......i$.. - 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, // '.......=....... - 0x16, 0x31, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x79, 0x04, 0x00, 0x00, // .1..i$..A...y... - 0x54, 0x44, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // TD..'.......=... - 0xfc, 0x01, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, // .....V..TD..V... - 0xfe, 0x01, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, // .....B...1...V.. - 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, // =.......6....... - 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, // W........Q...B.. - 0x36, 0x1c, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // 6........Q..8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6.......5....... - 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // ....7........... - 0xf8, 0x00, 0x02, 0x00, 0x17, 0x3e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .....>..=....... - 0x18, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .S......=....... - 0x5d, 0x4a, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ]J......=....... - 0xfd, 0x34, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .4......=....... - 0x10, 0x35, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // .5......P....... - 0x3f, 0x3a, 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, // ?:...S..]J...4.. - 0x10, 0x35, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // .5......?:..8... - 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0x91, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, // ....7.......B$.. - 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7.......x ..7... - 0x9a, 0x02, 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, // .....A.......... - 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........T...... - 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... - 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;......./1...... - 0x3b, 0x00, 0x04, 0x00, 0x05, 0x06, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;.......`....... - 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, // >....T......9... - 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, // ........5....T.. - 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2a, 0x46, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, // =.......*F..x .. - 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xed, 0x44, 0x00, 0x00, 0x2a, 0x46, 0x00, 0x00, // O........D..*F.. - 0x2a, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // *F.............. - 0x3e, 0x00, 0x03, 0x00, 0x2f, 0x31, 0x00, 0x00, 0xed, 0x44, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, // >.../1...D..9... - 0x1d, 0x00, 0x00, 0x00, 0xcf, 0x5f, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, // ....._......C... - 0x2f, 0x31, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, 0xcf, 0x5f, 0x00, 0x00, // /1..>........_.. - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x59, 0x4b, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, // A.......YK..x .. - 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xea, 0x36, 0x00, 0x00, // ....=........6.. - 0x59, 0x4b, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x09, 0x3e, 0x00, 0x00, // YK...........>.. - 0xea, 0x36, 0x00, 0x00, 0x69, 0x0b, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .6..i........... - 0x90, 0x24, 0x00, 0x00, 0x09, 0x3e, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x04, 0x00, // .$...>......n... - 0x0c, 0x00, 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x90, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ....M....$..A... - 0x8a, 0x02, 0x00, 0x00, 0x6b, 0x5e, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, // ....k^.......... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x81, 0x2e, 0x00, 0x00, 0x6b, 0x5e, 0x00, 0x00, // =...........k^.. - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x94, 0x46, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, // A........F..`... - 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x94, 0x46, 0x00, 0x00, 0x81, 0x2e, 0x00, 0x00, // ....>....F...... - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x48, 0x46, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, // A.......HF...... - 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe5, 0x5f, 0x00, 0x00, // ....=........_.. - 0x48, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x95, 0x46, 0x00, 0x00, // HF..A........F.. - 0x60, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x46, 0x00, 0x00, // `.......>....F.. - 0xe5, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x49, 0x46, 0x00, 0x00, // ._..A.......IF.. - 0x18, 0x0e, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........=....... - 0xe6, 0x5f, 0x00, 0x00, 0x49, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, // ._..IF..A....... - 0x96, 0x46, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .F..`.......>... - 0x96, 0x46, 0x00, 0x00, 0xe6, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, // .F..._..A....... - 0x4a, 0x46, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // JF..........=... - 0x0d, 0x00, 0x00, 0x00, 0xe7, 0x5f, 0x00, 0x00, 0x4a, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ....._..JF..A... - 0x8a, 0x02, 0x00, 0x00, 0x97, 0x46, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, // .....F..`....... - 0x3e, 0x00, 0x03, 0x00, 0x97, 0x46, 0x00, 0x00, 0xe7, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >....F..._..A... - 0x8a, 0x02, 0x00, 0x00, 0xfc, 0x45, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, // .....E..`...M... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xfc, 0x45, 0x00, 0x00, // =............E.. - 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x26, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, // =........&..B$.. - 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x93, 0x36, 0x00, 0x00, 0x1d, 0x26, 0x00, 0x00, // O........6...&.. - 0x1d, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .&.............. - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4b, 0x5e, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, // A.......K^..B$.. - 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x13, 0x43, 0x00, 0x00, // ....=........C.. - 0x4b, 0x5e, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x52, 0x5c, 0x00, 0x00, // K^..........R... - 0x13, 0x43, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .C......Q....... - 0x1e, 0x1d, 0x00, 0x00, 0x93, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // .....6......Q... - 0x0d, 0x00, 0x00, 0x00, 0xdc, 0x22, 0x00, 0x00, 0x93, 0x36, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....."...6...... - 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x93, 0x36, 0x00, 0x00, // Q.......6`...6.. - 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, // ....P........P.. - 0x1e, 0x1d, 0x00, 0x00, 0xdc, 0x22, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x52, 0x5c, 0x00, 0x00, // ....."..6`..R... - 0x3e, 0x00, 0x03, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >....A...P...... - 0x38, 0x00, 0x01, 0x00, 0x00, // 8.... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x03, 0x02, // FSH.......@..... + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, // #.........Ta.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, // ..w...t......... + 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, // ................ + 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x42, 0x67, // in........g...Bg + 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x00, 0x06, 0x00, // fxSamplerCube... + 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, // ..g.......m_samp + 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x01, 0x00, // ler.......g..... + 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, // ..m_texture..... + 0x0f, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, // ......bgfxTextur + 0x65, 0x43, 0x75, 0x62, 0x65, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, // eCube(struct-Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x2d, 0x70, 0x31, 0x2d, // xSamplerCube-p1- + 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, // tC11;vf3;.....'. + 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // .._sampler...... + 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, // ......_coord.... + 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, // ..5...vec4_splat + 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, // (f1;.........._x + 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, // ..........@main( + 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, // vf4;vf4;vf4;.... + 0x05, 0x00, 0x42, 0x24, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ..B$..v_color0.. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ......x ..v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x67, 0x6c, // oord0......A..gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, // _FragData_0_.... + 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ..C...s_texColor + 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ..........s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, // olorSampler..... + 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ......s_texColor + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, // Texture......... + 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, // ..bgfx_VoidFrag. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......T..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // ..........color. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......0..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ....../1..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x00, // ......M...index. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x60, 0x10, 0x00, 0x00, 0x72, 0x67, 0x62, 0x61, 0x00, 0x00, // ......`...rgba.. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, // ..........alpha. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .......A..v_colo + 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, // r0........w...v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, // color0.........< + 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... + 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..t...v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // 0.........gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, // gData_0_.......G + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, // ..param........U + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, // ..param......... + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, // ..param......... + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x07, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, // ..........$Globa + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xab, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.............u_ + 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xab, 0x07, // viewRect........ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, // ......u_viewTexe + 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.............u_ + 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xab, 0x07, 0x00, 0x00, 0x03, 0x00, // view............ + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invView..... + 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, // ..........u_proj + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xab, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xab, 0x07, // invProj......... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ......u_viewProj + 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xab, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // invViewProj..... + 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xab, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.............u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xab, 0x07, // modelView....... + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xab, 0x07, 0x00, 0x00, 0x0b, 0x00, // wProj........... + 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, // ..u_alphaRef4.G. + 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......".......G. + 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......!.......G. + 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......".......G. + 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......!.......G. + 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..w...........G. + 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, // ..t...........G. + 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. + 0x04, 0x00, 0x13, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, // ..........@...H. + 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xab, 0x07, 0x00, 0x00, 0x02, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x02, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, // ..#... ...H..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xab, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, // ..........#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xab, 0x07, 0x00, 0x00, 0x04, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x04, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, // ..#.......H..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xab, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xab, 0x07, 0x00, 0x00, 0x06, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x06, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, // ..#... ...H..... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xab, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, // ..........#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xab, 0x07, 0x00, 0x00, 0x08, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x08, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, // ..#.......H..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xab, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xab, 0x07, 0x00, 0x00, 0x0a, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x0a, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xab, 0x07, // ..#.......H..... + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xab, 0x07, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, // ..........#... . + 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xab, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, // ..G............. + 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, // ......!......... + 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x98, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x67, 0x09, // ..............g. + 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, // .......... ...!. + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, // ......g......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, // ................ + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xe8, 0x03, // ..........!..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, // ......!....... . + 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x06, 0x00, 0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ + 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, // ...... ..."..... + 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x43, 0x12, // ..g...;..."...C. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, // ...... ...y..... + 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, // ......;...y..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0x00, 0x00, // ...... ......... + 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0xee, 0x0e, // ......;......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, // ......+......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x03, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, // ...... ...z..... + 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x98, 0x00, // ................ + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, // ..+............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x69, 0x0b, 0x00, 0x00, 0x00, 0x00, // ..+.......i..... + 0x80, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, // .@+............. + 0x00, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, 0x04, 0x00, // .?+............. + 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xa1, 0x03, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x16, 0x0a, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1e, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xa1, 0x03, // .. ............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, // ..+............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, // ..+............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x03, 0x00, // ..+............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, // ..;.......w..... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;.......t..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, // ..;............. + 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, // ......e......... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, // ..+.......j... . + 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x13, 0x05, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, // ..........e...j. + 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xab, 0x07, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, // ................ + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x13, 0x05, 0x00, 0x00, 0x65, 0x00, // ..e...e.......e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, // ..e.......6..... + 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, // ................ + 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, // ..Sa..;........G + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xab, 0x55, // ......;........U + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, // ......;......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, // ......=.......!C + 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x33, // ......=........3 + 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, 0x00, 0x00, 0x12, 0x20, // ......P...g.... + 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, // ..!C...3..>...C. + 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, // ... ..=........A + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x03, 0x3c, // ..w...=........< + 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, // ..t...>....G...A + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, // ..>....U...<..9. + 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0xc9, 0x47, // .......&.......G + 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ...U......=..... + 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, // ..........>..... + 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ..........8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x03, // ................ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, // ..7...!...'...7. + 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xcd, 0x5b, // ...............[ + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x16, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x27, 0x0e, // ..A.......i$..'. + 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x16, 0x31, // ......=........1 + 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x54, 0x44, // ..i$..A...z...TD + 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, // ..'.......=..... + 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, // ...V..TD..V..... + 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x3d, 0x00, // ...B...1...V..=. + 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, // ......6.......W. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x36, 0x1c, // .......Q...B..6. + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // .......Q..8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, // ......5......... + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, // ..7............. + 0x02, 0x00, 0x17, 0x3e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x53, // ...>..=........S + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5d, 0x4a, // ......=.......]J + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x34, // ......=........4 + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x10, 0x35, // ......=........5 + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3f, 0x3a, // ......P.......?: + 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0x10, 0x35, // ...S..]J...4...5 + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ......?:..8...6. + 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x37, 0x00, // ..7.......B$..7. + 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, // ......x ..7..... + 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, // ...A..........;. + 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......T......;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..!....0......;. + 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ....../1......;. + 0x04, 0x00, 0x1e, 0x06, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, // ......`.......>. + 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, // ...T......9..... + 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x3d, 0x00, // ......5....T..=. + 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, // ..g....Q..C...>. + 0x03, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ...0...Q..=..... + 0x00, 0x00, 0x51, 0x18, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, // ..Q...x ..O..... + 0x00, 0x00, 0x11, 0x48, 0x00, 0x00, 0x51, 0x18, 0x00, 0x00, 0x51, 0x18, 0x00, 0x00, 0x00, 0x00, // ...H..Q...Q..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2f, 0x31, // ..........>.../1 + 0x00, 0x00, 0x11, 0x48, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcf, 0x5f, // ...H..9........_ + 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x3e, 0x00, // .......0../1..>. + 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, 0xcf, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ......._..A..... + 0x00, 0x00, 0x59, 0x4b, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..YK..x ......=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xea, 0x36, 0x00, 0x00, 0x59, 0x4b, 0x00, 0x00, 0x85, 0x00, // .......6..YK.... + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x09, 0x3e, 0x00, 0x00, 0xea, 0x36, 0x00, 0x00, 0x69, 0x0b, // .......>...6..i. + 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x90, 0x24, 0x00, 0x00, 0x09, 0x3e, // ...........$...> + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x4d, 0x15, // ......n.......M. + 0x00, 0x00, 0x90, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x6b, 0x5e, // ...$..A.......k^ + 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........=..... + 0x00, 0x00, 0x81, 0x2e, 0x00, 0x00, 0x6b, 0x5e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ......k^..A..... + 0x00, 0x00, 0x94, 0x46, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ...F..`.......>. + 0x03, 0x00, 0x94, 0x46, 0x00, 0x00, 0x81, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ...F......A..... + 0x00, 0x00, 0x48, 0x46, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..HF..........=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe5, 0x5f, 0x00, 0x00, 0x48, 0x46, 0x00, 0x00, 0x41, 0x00, // ......._..HF..A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x95, 0x46, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x0e, 0x0a, // .......F..`..... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x46, 0x00, 0x00, 0xe5, 0x5f, 0x00, 0x00, 0x41, 0x00, // ..>....F..._..A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x49, 0x46, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x0a, 0x0a, // ......IF........ + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe6, 0x5f, 0x00, 0x00, 0x49, 0x46, // ..=........_..IF + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x96, 0x46, 0x00, 0x00, 0x60, 0x10, // ..A........F..`. + 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x96, 0x46, 0x00, 0x00, 0xe6, 0x5f, // ......>....F..._ + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4a, 0x46, 0x00, 0x00, 0x18, 0x0e, // ..A.......JF.... + 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe7, 0x5f, // ......=........_ + 0x00, 0x00, 0x4a, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x97, 0x46, // ..JF..A........F + 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x46, // ..`.......>....F + 0x00, 0x00, 0xe7, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xfc, 0x45, // ..._..A........E + 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..`...M...=..... + 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0xfc, 0x45, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // .......E..=..... + 0x00, 0x00, 0x1d, 0x26, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, // ...&..B$..O..... + 0x00, 0x00, 0x93, 0x36, 0x00, 0x00, 0x1d, 0x26, 0x00, 0x00, 0x1d, 0x26, 0x00, 0x00, 0x00, 0x00, // ...6...&...&.... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ..........A..... + 0x00, 0x00, 0x4b, 0x5e, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..K^..B$......=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x13, 0x43, 0x00, 0x00, 0x4b, 0x5e, 0x00, 0x00, 0x85, 0x00, // .......C..K^.... + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x52, 0x5c, 0x00, 0x00, 0x13, 0x43, 0x00, 0x00, 0xf3, 0x10, // ......R....C.... + 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1e, 0x1d, 0x00, 0x00, 0x93, 0x36, // ..Q............6 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xdc, 0x22, // ......Q........" + 0x00, 0x00, 0x93, 0x36, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ...6......Q..... + 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x93, 0x36, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, // ..6`...6......P. + 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0x1e, 0x1d, 0x00, 0x00, 0xdc, 0x22, // .......P......." + 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x52, 0x5c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc4, 0x41, // ..6`..R...>....A + 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ...P......8.... }; -static const uint8_t fs_font_basic_dx9[454] = +static const uint8_t fs_font_basic_dx9[456] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xa8, 0x01, 0x00, 0x03, 0xff, // Color0.......... - 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ... .CTAB....S.. - 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ - 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo - 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, // 0.1..Q.......... - 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, // @...?.......?Q.. - 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, // ................ - 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ...@............ - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // ................ - 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, // ...........U.... - 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, // .........X...... - 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, // ...U............ - 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, // ...........U.X.. - 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, // ...............U - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, // .X.............. - 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // .....B.......... - 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xc6, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x00, // Color0.......... + 0x03, 0xff, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, // ..... .CTAB....S + 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ...L...0........ + 0x00, 0x02, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...<.......s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, // Color........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......ps_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, // 10.1..Q........ + 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, // ..@...?.......?Q + 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, // ................ + 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, // .....@.......... + 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, // .............U.. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, // ...........X.... + 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, // .....U.......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, // .............U.X + 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, // ................ + 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, // ................ + 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, // .U.............. + 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, // ...X............ + 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, // .......B........ + 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, // ................ + 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, // ................ + 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, // ................ + 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ........ }; -static const uint8_t fs_font_basic_dx11[617] = +static const uint8_t fs_font_basic_dx11[619] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x48, 0x02, 0x44, 0x58, 0x42, // Color0.....H.DXB - 0x43, 0xdb, 0x69, 0x11, 0xe0, 0xc0, 0xf9, 0x23, 0x5b, 0x4d, 0x65, 0x8f, 0xa1, 0x99, 0x34, 0xff, // C.i....#[Me...4. - 0x76, 0x01, 0x00, 0x00, 0x00, 0x48, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // v....H.......,.. - 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, // .........ISGNl.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ - 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........b...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, // .SV_POSITION.COL - 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, // OR.TEXCOORD..OSG - 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // N,........... .. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, // .....SV_TARGET.. - 0xab, 0x53, 0x48, 0x44, 0x52, 0x6c, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, // .SHDRl...@...[.. - 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, // .Z....`......X0. - 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, // ..p......UU..b.. - 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, // .........b...... - 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....e.... ..... - 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // .h.......i...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, // .........E...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, // .....F.......F~. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // ......`......6.. - 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, // ..0 .........*.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, // .....6....0 .... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .............6.. - 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, // ..0 ............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, // .....6....0 .... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, // .....:.......2.. - 0x09, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, // .........:...... - 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // ..@.....@.@..... - 0x3f, 0x1b, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, // ?............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .....6.......... - 0x00, 0x0a, 0x30, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ..0 ............ - 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, // .8.... ......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .....:.......6.. - 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, // .r ......F...... - 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // .>....... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x48, 0x02, 0x00, 0x00, 0x44, // Color0.....H...D + 0x58, 0x42, 0x43, 0xdb, 0x69, 0x11, 0xe0, 0xc0, 0xf9, 0x23, 0x5b, 0x4d, 0x65, 0x8f, 0xa1, 0x99, // XBC.i....#[Me... + 0x34, 0xff, 0x76, 0x01, 0x00, 0x00, 0x00, 0x48, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, // 4.v....H......., + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, // ...........ISGNl + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, // ...........b.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, // ...SV_POSITION.C + 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, // OLOR.TEXCOORD..O + 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, // .......SV_TARGET + 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x6c, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x5b, // ...SHDRl...@...[ + 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, // ...Z....`......X + 0x30, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, // 0...p......UU..b + 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, // ...........b.... + 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x04, 0x00, // ...h.......i.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, // ...........E.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // .......F.......F + 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, // ~.......`......6 + 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, // ....0 .........* + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, // .......6....0 .. + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, // ...............6 + 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, // ....0 .......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, // .......6....0 .. + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, // .......:.......2 + 0x00, 0x00, 0x09, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x02, // ...........:.... + 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, // ....@.....@.@... + 0x00, 0x00, 0x3f, 0x1b, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // ..?............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, // .......6........ + 0x00, 0x00, 0x00, 0x0a, 0x30, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, // ....0 .......... + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // ...8.... ....... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, // .......:.......6 + 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x01, // ...r ......F.... + 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ...>....... }; static const uint8_t fs_font_basic_mtl[937] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x9a, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x9a, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { diff --git a/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h b/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h index 91090bc..cf317b6 100644 --- a/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h +++ b/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_font_distance_field_glsl[1019] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xdb, 0x03, 0x00, 0x00, 0x76, // Color..........v 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary @@ -65,408 +65,416 @@ static const uint8_t fs_font_distance_field_glsl[1019] = 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_9;.}... }; -static const uint8_t fs_font_distance_field_spv[4425] = +static const uint8_t fs_font_distance_field_spv[4547] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x3c, 0x11, 0x03, 0x02, 0x23, 0x07, // FSH.......<...#. - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........Ta...... - 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, // GLSL.std.450.... - 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, // ........main.... - 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, // w...t........... - 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ - 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, // main........g... - 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x00, // BgfxSamplerCube. - 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, // ....g.......m_sa - 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, // mpler.......g... - 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, // ....m_texture... - 0x05, 0x00, 0x0f, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, // ........bgfxText - 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, // ureCube(struct-B - 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x2d, 0x70, // gfxSamplerCube-p - 0x31, 0x2d, 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, // 1-tC11;vf3;..... - 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, // '..._sampler.... - 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, // ........_coord.. - 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, // ....5...vec4_spl - 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, // at(f1;.......... - 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // _x..........@mai - 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // n(vf4;vf4;vf4;.. - 0x05, 0x00, 0x05, 0x00, 0x42, 0x24, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....B$..v_color0 - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, // ........x ..v_te - 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, // xcoord0......A.. - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, // gl_FragData_0_.. - 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // ....C...s_texCol - 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // or..........s_te - 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, // xColorSampler... - 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // ........s_texCol - 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // orTexture....... - 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, // ....bgfx_VoidFra - 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // g........T..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, // m...........colo - 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // r......./1..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x69, 0x6e, 0x64, 0x65, // m.......M...inde - 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x60, 0x10, 0x00, 0x00, 0x72, 0x67, 0x62, 0x61, // x.......`...rgba - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x81, 0x11, 0x00, 0x00, 0x64, 0x69, 0x73, 0x74, // ............dist - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xcf, 0x16, 0x00, 0x00, 0x64, 0x78, 0x00, 0x00, // ............dx.. - 0x05, 0x00, 0x03, 0x00, 0xd0, 0x16, 0x00, 0x00, 0x64, 0x79, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, // ........dy...... - 0xc9, 0x10, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf3, 0x10, 0x00, 0x00, // ....w........... - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, // alpha........A.. - 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // v_color0........ - 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // w...v_color0.... - 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // .....<..v_texcoo - 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, // rd0.....t...v_te - 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, // xcoord0......... - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, // gl_FragData_0_.. - 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // .....G..param... - 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // .....U..param... - 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // ........param... - 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // ........gl_FragD - 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x06, 0x00, 0x00, // ata_0_.......... - 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1f, 0x06, 0x00, 0x00, // $Global......... - 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, // ....u_viewRect.. - 0x06, 0x00, 0x06, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi - 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, // ewTexel......... - 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_view...... - 0x1f, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ........u_invVie - 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // w............... - 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1f, 0x06, 0x00, 0x00, // u_proj.......... - 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // ....u_invProj... - 0x06, 0x00, 0x06, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi - 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x1f, 0x06, 0x00, 0x00, // ewProj.......... - 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ....u_invViewPro - 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // j............... - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1f, 0x06, 0x00, 0x00, // u_model......... - 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, // ....u_modelView. - 0x06, 0x00, 0x07, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo - 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, // delViewProj..... - 0x1f, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, // ........u_alphaR - 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, // ef4.G......."... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, // ....G.......!... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, // ....G......."... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, // ....G.......!... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G...w....... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G...t....... - 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G........... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x37, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ....G...7....... - 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // @...H........... - 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, // #.......H....... - 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ....#.......H... - 0x1f, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x1f, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ........#... ... - 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....H........... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, // #...`...H....... - 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x1f, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x1f, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, // ........#....... - 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, // #.......H....... - 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x1f, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x1f, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, // ........#... ... - 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....H........... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, // #...`...H....... - 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x1f, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x1f, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, // ........#....... - 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, // #.......H....... - 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x1f, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x1f, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, // ........#....... - 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x1f, 0x06, 0x00, 0x00, // #... ...G....... - 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, // ............!... - 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, // ................ - 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, // ........ ....... - 0x98, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x1e, 0x00, 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, // ....g........... - 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, // ...!.......g... - 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ - 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... - 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ................ - 0x21, 0x00, 0x05, 0x00, 0xe8, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, // !...........!... - 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... - 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....!........... - 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... - 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....!........... - 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x21, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // !...C....... ... - 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // y...........;... - 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // y........... ... - 0x15, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x15, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // ................ - 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... - 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, // ................ - 0xfe, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........+....... - 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // ................ - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // .......+....... - 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........+....... - 0x69, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // i......@+....... - 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // .......?+....... - 0x16, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x88, 0x03, 0x00, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x05, 0x06, 0x00, 0x00, // ........ ....... - 0x07, 0x00, 0x00, 0x00, 0x88, 0x03, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // ........+....... - 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // ........+....... - 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... - 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // ........+....... - 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... - 0x14, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........+....... - 0xf7, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, // .......A ....... - 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, // ........;....... - 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, // w.......;....... - 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, // t....... ....... - 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, // ........;....... - 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... - 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // ........+....... - 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x37, 0x00, 0x00, 0x00, // j... .......7... - 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x1f, 0x06, 0x00, 0x00, // e...j........... - 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ........e...e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... - 0x37, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // 7...e...e....... - 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ........Sa..;... - 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....G......;... - 0x9a, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....U......;... - 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ............=... - 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....!C......=... - 0x98, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, // .....3......P... - 0x67, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, // g.... ..!C...3.. - 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >...C.... ..=... - 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....A..w...=... - 0x1d, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .....<..t...>... - 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, // .G...A..>....U.. - 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, // .<..9........&.. - 0x82, 0x0d, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // .....G...U...... - 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // =............... - 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >............... - 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, // 8...6........... - 0x00, 0x00, 0x00, 0x00, 0xe8, 0x03, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, // ........7...!... - 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, // '...7........... - 0xf8, 0x00, 0x02, 0x00, 0xcd, 0x5b, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x15, 0x03, 0x00, 0x00, // .....[..A....... - 0x69, 0x24, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // i$..'.......=... - 0x98, 0x00, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .....1..i$..A... - 0x79, 0x04, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // y...TD..'....... - 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, // =........V..TD.. - 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, // V........B...1.. - 0x9b, 0x56, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, // .V..=.......6... - 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, // ....W........Q.. - 0xc9, 0x42, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, // .B..6........Q.. - 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, // 8...6.......5... - 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........7....... - 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x17, 0x3e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .........>..=... - 0x0d, 0x00, 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....S......=... - 0x0d, 0x00, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....]J......=... - 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....4......=... - 0x0d, 0x00, 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, // .....5......P... - 0x1d, 0x00, 0x00, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, // ....?:...S..]J.. - 0xfd, 0x34, 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, // .4...5......?:.. - 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, // 8...6........... - 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........7....... - 0x42, 0x24, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, // B$..7.......x .. - 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7........A...... - 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, // ....;........T.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, // ....;........... - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, // ....;......./1.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x05, 0x06, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, // ....;.......`... - 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....>....T...... - 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, // 9...........5... - 0xd5, 0x54, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2a, 0x46, 0x00, 0x00, // .T..=.......*F.. - 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xed, 0x44, 0x00, 0x00, // x ..O........D.. - 0x2a, 0x46, 0x00, 0x00, 0x2a, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // *F..*F.......... - 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2f, 0x31, 0x00, 0x00, 0xed, 0x44, 0x00, 0x00, // ....>.../1...D.. - 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcf, 0x5f, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, // 9........_...... - 0x43, 0x12, 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, // C.../1..>....... - 0xcf, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x59, 0x4b, 0x00, 0x00, // ._..A.......YK.. - 0x78, 0x20, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // x ......=....... - 0xea, 0x36, 0x00, 0x00, 0x59, 0x4b, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .6..YK.......... - 0x09, 0x3e, 0x00, 0x00, 0xea, 0x36, 0x00, 0x00, 0x69, 0x0b, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, // .>...6..i....... - 0x0d, 0x00, 0x00, 0x00, 0x90, 0x24, 0x00, 0x00, 0x09, 0x3e, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, // .....$...>...... - 0x6e, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x90, 0x24, 0x00, 0x00, // n.......M....$.. - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x6b, 0x5e, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, // A.......k^...... - 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x81, 0x2e, 0x00, 0x00, // ....=........... - 0x6b, 0x5e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x94, 0x46, 0x00, 0x00, // k^..A........F.. - 0x60, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x94, 0x46, 0x00, 0x00, // `.......>....F.. - 0x81, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x48, 0x46, 0x00, 0x00, // ....A.......HF.. - 0x18, 0x0e, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........=....... - 0xe5, 0x5f, 0x00, 0x00, 0x48, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, // ._..HF..A....... - 0x95, 0x46, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .F..`.......>... - 0x95, 0x46, 0x00, 0x00, 0xe5, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, // .F..._..A....... - 0x49, 0x46, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // IF..........=... - 0x0d, 0x00, 0x00, 0x00, 0xe6, 0x5f, 0x00, 0x00, 0x49, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ....._..IF..A... - 0x8a, 0x02, 0x00, 0x00, 0x96, 0x46, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....F..`....... - 0x3e, 0x00, 0x03, 0x00, 0x96, 0x46, 0x00, 0x00, 0xe6, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >....F..._..A... - 0x8a, 0x02, 0x00, 0x00, 0x4a, 0x46, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, // ....JF.......... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe7, 0x5f, 0x00, 0x00, 0x4a, 0x46, 0x00, 0x00, // =........_..JF.. - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x97, 0x46, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, // A........F..`... - 0x14, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x46, 0x00, 0x00, 0xe7, 0x5f, 0x00, 0x00, // ....>....F..._.. - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xfc, 0x45, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, // A........E..`... - 0x4d, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x81, 0x11, 0x00, 0x00, // M...=........... - 0xfc, 0x45, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa7, 0x30, 0x00, 0x00, // .E..=........0.. - 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xbb, 0x1d, 0x00, 0x00, // x ..O........... - 0xa7, 0x30, 0x00, 0x00, 0xa7, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .0...0.......... - 0x02, 0x00, 0x00, 0x00, 0xcf, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x63, 0x23, 0x00, 0x00, // ............c#.. - 0xbb, 0x1d, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcf, 0x16, 0x00, 0x00, // ................ - 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x63, 0x23, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....B...c#..=... - 0x1d, 0x00, 0x00, 0x00, 0xca, 0x51, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, // .....Q..x ..O... - 0x18, 0x00, 0x00, 0x00, 0x47, 0x1e, 0x00, 0x00, 0xca, 0x51, 0x00, 0x00, 0xca, 0x51, 0x00, 0x00, // ....G....Q...Q.. - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, // ................ - 0x18, 0x00, 0x00, 0x00, 0xe1, 0x57, 0x00, 0x00, 0x47, 0x1e, 0x00, 0x00, 0xd0, 0x00, 0x04, 0x00, // .....W..G....... - 0x18, 0x00, 0x00, 0x00, 0x42, 0x58, 0x00, 0x00, 0xe1, 0x57, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, // ....BX...W...... - 0x0d, 0x00, 0x00, 0x00, 0xd0, 0x16, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, // ............B... - 0x42, 0x58, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x87, 0x45, 0x00, 0x00, // BX...........E.. - 0xcf, 0x16, 0x00, 0x00, 0xd0, 0x16, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ - 0xc9, 0x10, 0x00, 0x00, 0xf7, 0x0a, 0x00, 0x00, 0x87, 0x45, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, // .........E...... - 0x0d, 0x00, 0x00, 0x00, 0x23, 0x44, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xc9, 0x10, 0x00, 0x00, // ....#D.......... - 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6b, 0x1f, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, // ........k....... - 0xc9, 0x10, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, // ................ - 0x01, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x23, 0x44, 0x00, 0x00, 0x6b, 0x1f, 0x00, 0x00, // ....1...#D..k... - 0x81, 0x11, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa5, 0x4a, 0x00, 0x00, // ....=........J.. - 0x42, 0x24, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x97, 0x49, 0x00, 0x00, // B$..O........I.. - 0xa5, 0x4a, 0x00, 0x00, 0xa5, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .J...J.......... - 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4b, 0x5e, 0x00, 0x00, // ....A.......K^.. - 0x42, 0x24, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // B$......=....... - 0x13, 0x43, 0x00, 0x00, 0x4b, 0x5e, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .C..K^.......... - 0x52, 0x5c, 0x00, 0x00, 0x13, 0x43, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // R....C......Q... - 0x0d, 0x00, 0x00, 0x00, 0x1e, 0x1d, 0x00, 0x00, 0x97, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........I...... - 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xdc, 0x22, 0x00, 0x00, 0x97, 0x49, 0x00, 0x00, // Q........"...I.. - 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, // ....Q.......6`.. - 0x97, 0x49, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // .I......P....... - 0x0f, 0x50, 0x00, 0x00, 0x1e, 0x1d, 0x00, 0x00, 0xdc, 0x22, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, // .P......."..6`.. - 0x52, 0x5c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, // R...>....A...P.. - 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ....8.... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xb4, 0x11, 0x00, 0x00, 0x03, 0x02, // FSH............. + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, // #.........Ta.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, // ..w...t......... + 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, // ................ + 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x42, 0x67, // in........g...Bg + 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x00, 0x06, 0x00, // fxSamplerCube... + 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, // ..g.......m_samp + 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x01, 0x00, // ler.......g..... + 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, // ..m_texture..... + 0x0f, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, // ......bgfxTextur + 0x65, 0x43, 0x75, 0x62, 0x65, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, // eCube(struct-Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x2d, 0x70, 0x31, 0x2d, // xSamplerCube-p1- + 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, // tC11;vf3;.....'. + 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // .._sampler...... + 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, // ......_coord.... + 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, // ..5...vec4_splat + 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, // (f1;.........._x + 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, // ..........@main( + 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, // vf4;vf4;vf4;.... + 0x05, 0x00, 0x42, 0x24, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ..B$..v_color0.. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ......x ..v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x67, 0x6c, // oord0......A..gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, // _FragData_0_.... + 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ..C...s_texColor + 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ..........s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, // olorSampler..... + 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ......s_texColor + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, // Texture......... + 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, // ..bgfx_VoidFrag. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......T..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // ..........color. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......0..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ....../1..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x00, // ......M...index. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x60, 0x10, 0x00, 0x00, 0x72, 0x67, 0x62, 0x61, 0x00, 0x00, // ......`...rgba.. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x81, 0x11, 0x00, 0x00, 0x64, 0x69, 0x73, 0x74, 0x00, 0x00, // ..........dist.. + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xcf, 0x16, 0x00, 0x00, 0x64, 0x78, 0x00, 0x00, 0x05, 0x00, // ..........dx.... + 0x03, 0x00, 0xd0, 0x16, 0x00, 0x00, 0x64, 0x79, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc9, 0x10, // ......dy........ + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x61, 0x6c, // ..w...........al + 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, // pha........A..v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, // color0........w. + 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..v_color0...... + 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ...<..v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // 0.....t...v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, // oord0.........gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, // _FragData_0_.... + 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ...G..param..... + 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ...U..param..... + 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ......param..... + 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // ......gl_FragDat + 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x24, 0x47, // a_0_..........$G + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, // lobal........... + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, // ..u_viewRect.... + 0x06, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x02, 0x00, // Texel........... + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc3, 0x00, // ..u_view........ + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, // ......u_invView. + 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x05, 0x00, // proj............ + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invProj..... + 0x06, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x07, 0x00, // Proj............ + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // ..u_invViewProj. + 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x09, 0x00, // model........... + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, // ..u_modelView... + 0x07, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode + 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc3, 0x00, // lViewProj....... + 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, // ......u_alphaRef + 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // 4.G......."..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G.......!..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G......."..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G.......!..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G...w......... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, // ..G...t......... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x08, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, // ..G...........@. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x01, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc3, 0x00, // ..#.......H..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, // ..........H..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. + 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x03, 0x00, // ..`...H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc3, 0x00, // ..........H..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, // ..........H..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc3, 0x00, // ..........H..... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, // ..........H..... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. + 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x07, 0x00, // ..`...H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc3, 0x00, // ..........H..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, // ..........H..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc3, 0x00, // ..........H..... + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, // ..........H..... + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x02, 0x00, // .. ...G......... + 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, // ..........!..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, // ................ + 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x98, 0x00, // ...... ......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, // ................ + 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, // ..g........... . + 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x17, 0x00, // ..!.......g..... + 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, // ................ + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x05, 0x00, 0xe8, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x95, 0x02, // ..........!..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. + 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, // ..!............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. + 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, // ..!............. + 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, // .......... ...". + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, // ......g...;...". + 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, // ..C....... ...y. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, // ..........;...y. + 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, // .......... ..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x15, 0x03, // ..........;..... + 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // .. .......+..... + 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x03, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..........+..... + 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, // .......... ...z. + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, // ................ + 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, // ......+......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x69, 0x0b, // ......+.......i. + 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfc, 0x00, // .....@+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x16, 0x0a, // .....?+......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xa1, 0x03, 0x00, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x16, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1e, 0x06, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0xa1, 0x03, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x0a, // ......+......... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, // ......+......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, // ......+......... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, 0x0a, // ......+......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf7, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, // .....A ......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, // ......;.......w. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x74, 0x14, // ......;.......t. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, // ......;......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ..........e..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, // ......+.......j. + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x08, 0x02, 0x00, 0x00, 0x65, 0x00, // .. ...........e. + 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x1d, 0x00, // ..j............. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ......e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x08, 0x02, // ..e...e...e..... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, // ..e...e.......6. + 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, // ................ + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, // ......Sa..;..... + 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, // ...G......;..... + 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, // ...U......;..... + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, // ..........=..... + 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, // ..!C......=..... + 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, // ...3......P...g. + 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, // ... ..!C...3..>. + 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..C.... ..=..... + 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ...A..w...=..... + 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, // ...<..t...>....G + 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, // ...A..>....U...< + 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x82, 0x0d, // ..9........&.... + 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, // ...G...U......=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, // ..............>. + 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, // ..............8. + 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0xe8, 0x03, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, // ......7...!...'. + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, // ..7............. + 0x02, 0x00, 0xcd, 0x5b, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x16, 0x03, 0x00, 0x00, 0x69, 0x24, // ...[..A.......i$ + 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, // ..'.......=..... + 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, // ...1..i$..A...z. + 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..TD..'.......=. + 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, // .......V..TD..V. + 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, // .......B...1...V + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, // ..=.......6..... + 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, // ..W........Q...B + 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, // ..6........Q..8. + 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, // ..6.......5..... + 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, // ......7......... + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x17, 0x3e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // .......>..=..... + 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ...S......=..... + 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..]J......=..... + 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ...4......=..... + 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, // ...5......P..... + 0x00, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, // ..?:...S..]J...4 + 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, // ...5......?:..8. + 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, // ......7.......B$ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, // ..7.......x ..7. + 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, // .......A........ + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, // ..;........T.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x07, 0x00, // ..;...!....0.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x07, 0x00, // ..;......./1.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1e, 0x06, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x07, 0x00, // ..;.......`..... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, // ..>....T......9. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, // ..........5....T + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x43, 0x12, // ..=...g....Q..C. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x3d, 0x00, // ..>....0...Q..=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x51, 0x18, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, // ......Q...x ..O. + 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x11, 0x48, 0x00, 0x00, 0x51, 0x18, 0x00, 0x00, 0x51, 0x18, // .......H..Q...Q. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, // ..............>. + 0x03, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x11, 0x48, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, // ../1...H..9..... + 0x00, 0x00, 0xcf, 0x5f, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x2f, 0x31, // ..._.......0../1 + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, 0xcf, 0x5f, 0x00, 0x00, 0x41, 0x00, // ..>........_..A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x59, 0x4b, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x13, 0x0a, // ......YK..x .... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xea, 0x36, 0x00, 0x00, 0x59, 0x4b, // ..=........6..YK + 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x09, 0x3e, 0x00, 0x00, 0xea, 0x36, // ...........>...6 + 0x00, 0x00, 0x69, 0x0b, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x90, 0x24, // ..i............$ + 0x00, 0x00, 0x09, 0x3e, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x04, 0x00, 0x0c, 0x00, // ...>......n..... + 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x90, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ..M....$..A..... + 0x00, 0x00, 0x6b, 0x5e, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..k^..........=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x81, 0x2e, 0x00, 0x00, 0x6b, 0x5e, 0x00, 0x00, 0x41, 0x00, // ..........k^..A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x94, 0x46, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x0b, 0x0a, // .......F..`..... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x94, 0x46, 0x00, 0x00, 0x81, 0x2e, 0x00, 0x00, 0x41, 0x00, // ..>....F......A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x48, 0x46, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x0d, 0x0a, // ......HF........ + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe5, 0x5f, 0x00, 0x00, 0x48, 0x46, // ..=........_..HF + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x95, 0x46, 0x00, 0x00, 0x60, 0x10, // ..A........F..`. + 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x46, 0x00, 0x00, 0xe5, 0x5f, // ......>....F..._ + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x49, 0x46, 0x00, 0x00, 0x18, 0x0e, // ..A.......IF.... + 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe6, 0x5f, // ......=........_ + 0x00, 0x00, 0x49, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x96, 0x46, // ..IF..A........F + 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x96, 0x46, // ..`.......>....F + 0x00, 0x00, 0xe6, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4a, 0x46, // ..._..A.......JF + 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........=..... + 0x00, 0x00, 0xe7, 0x5f, 0x00, 0x00, 0x4a, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ..._..JF..A..... + 0x00, 0x00, 0x97, 0x46, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ...F..`.......>. + 0x03, 0x00, 0x97, 0x46, 0x00, 0x00, 0xe7, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ...F..._..A..... + 0x00, 0x00, 0xfc, 0x45, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x3d, 0x00, // ...E..`...M...=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x81, 0x11, 0x00, 0x00, 0xfc, 0x45, 0x00, 0x00, 0x3d, 0x00, // ...........E..=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa7, 0x30, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, // .......0..x ..O. + 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xbb, 0x1d, 0x00, 0x00, 0xa7, 0x30, 0x00, 0x00, 0xa7, 0x30, // ...........0...0 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xcf, 0x00, // ................ + 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x63, 0x23, 0x00, 0x00, 0xbb, 0x1d, 0x00, 0x00, 0x0c, 0x00, // ......c#........ + 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcf, 0x16, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, // ..............B. + 0x00, 0x00, 0x63, 0x23, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xca, 0x51, // ..c#..=........Q + 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x47, 0x1e, // ..x ..O.......G. + 0x00, 0x00, 0xca, 0x51, 0x00, 0x00, 0xca, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ...Q...Q........ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xe1, 0x57, // ...............W + 0x00, 0x00, 0x47, 0x1e, 0x00, 0x00, 0xd0, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x42, 0x58, // ..G...........BX + 0x00, 0x00, 0xe1, 0x57, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd0, 0x16, // ...W............ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x42, 0x58, 0x00, 0x00, 0x81, 0x00, // ......B...BX.... + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x87, 0x45, 0x00, 0x00, 0xcf, 0x16, 0x00, 0x00, 0xd0, 0x16, // .......E........ + 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc9, 0x10, 0x00, 0x00, 0xf7, 0x0a, // ................ + 0x00, 0x00, 0x87, 0x45, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x23, 0x44, // ...E..........#D + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xc9, 0x10, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x6b, 0x1f, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xc9, 0x10, 0x00, 0x00, 0x0c, 0x00, // ..k............. + 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x31, 0x00, // ..............1. + 0x00, 0x00, 0x23, 0x44, 0x00, 0x00, 0x6b, 0x1f, 0x00, 0x00, 0x81, 0x11, 0x00, 0x00, 0x3d, 0x00, // ..#D..k.......=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa5, 0x4a, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x4f, 0x00, // .......J..B$..O. + 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x97, 0x49, 0x00, 0x00, 0xa5, 0x4a, 0x00, 0x00, 0xa5, 0x4a, // .......I...J...J + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, // ..............A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4b, 0x5e, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x13, 0x0a, // ......K^..B$.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x13, 0x43, 0x00, 0x00, 0x4b, 0x5e, // ..=........C..K^ + 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x52, 0x5c, 0x00, 0x00, 0x13, 0x43, // ..........R....C + 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1e, 0x1d, // ......Q......... + 0x00, 0x00, 0x97, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ...I......Q..... + 0x00, 0x00, 0xdc, 0x22, 0x00, 0x00, 0x97, 0x49, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, // ..."...I......Q. + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x97, 0x49, 0x00, 0x00, 0x02, 0x00, // ......6`...I.... + 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0x1e, 0x1d, // ..P........P.... + 0x00, 0x00, 0xdc, 0x22, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x52, 0x5c, 0x00, 0x00, 0x3e, 0x00, // ..."..6`..R...>. + 0x03, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, // ...A...P......8. + 0x01, 0x00, 0x00, // ... }; -static const uint8_t fs_font_distance_field_dx9[746] = +static const uint8_t fs_font_distance_field_dx9[748] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x02, 0x00, 0x03, 0xff, // Color0.......... - 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ... .CTAB....S.. - 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ - 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo - 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, // 0.1..Q.......... - 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, // @...?.......?Q.. - 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, // ................ - 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, // ...@.Q.......... - 0x41, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x40, 0x1f, 0x00, 0x00, // A...?......@@... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, // ................ - 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, // ................ - 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ...U............ - 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, // .X.........U.... - 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ...U.X.......... - 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // .......U........ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // .........X...... - 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x42, 0x00, 0x00, // .............B.. - 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x0e, 0x80, 0x01, 0x00, 0x90, 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0xf9, // ................ - 0x80, 0x00, 0x00, 0xf9, 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, // ...............U - 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x5b, 0x00, 0x00, // ...........U.[.. - 0x02, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, // ................ - 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, // ................ - 0x80, 0x00, 0x00, 0xaa, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0xaa, // ...........U.... - 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, // ...........U.... - 0xa1, 0x02, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, // ...U...........U - 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, // .......U........ - 0x80, 0x00, 0x00, 0xaa, 0x81, 0x00, 0x00, 0xe4, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // ................ - 0x80, 0x00, 0x00, 0x55, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x55, // ...U...........U - 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x02, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, // .......U........ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x00, // Color0.......... + 0x03, 0xff, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, // ..... .CTAB....S + 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ...L...0........ + 0x00, 0x02, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...<.......s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, // Color........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......ps_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, // 10.1..Q........ + 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, // ..@...?.......?Q + 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, // ................ + 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, // .....@.Q........ + 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x40, 0x1f, // ..A...?......@@. + 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, // ................ + 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, // ................ + 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, // ................ + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, // .....U.......... + 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, // ...X.........U.. + 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, // ................ + 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, // .....U.X........ + 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, // .........U...... + 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, // ...........X.... + 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x42, // ...............B + 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x09, // ................ + 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x80, 0x01, 0x00, 0x90, 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x0e, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, // ................ + 0x00, 0xf9, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, // ................ + 0x00, 0x55, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x5b, // .U...........U.[ + 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x08, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x04, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, // ................ + 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, // .............U.. + 0x00, 0xaa, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, // .............U.. + 0x00, 0x00, 0xa1, 0x02, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, // .....U.......... + 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, // .U.......U...... + 0x00, 0x03, 0x80, 0x00, 0x00, 0xaa, 0x81, 0x00, 0x00, 0xe4, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x80, 0x00, // .....U.......... + 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, // .U.............. + 0x00, 0x00, 0x80, 0x02, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, // .........U...... + 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, // ................ + 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............ }; -static const uint8_t fs_font_distance_field_dx11[1053] = +static const uint8_t fs_font_distance_field_dx11[1055] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xfc, 0x03, 0x44, 0x58, 0x42, // Color0.......DXB - 0x43, 0x9a, 0xd6, 0x47, 0xb1, 0x98, 0xc8, 0x0f, 0x79, 0xab, 0x0a, 0x57, 0x47, 0xee, 0xac, 0xc0, // C..G....y..WG... - 0xfe, 0x01, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .............,.. - 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, // .........ISGNl.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ - 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........b...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, // .SV_POSITION.COL - 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, // OR.TEXCOORD..OSG - 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // N,........... .. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, // .....SV_TARGET.. - 0xab, 0x53, 0x48, 0x44, 0x52, 0x20, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, // .SHDR ...@...... - 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, // .Z....`......X0. - 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, // ..p......UU..b.. - 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, // .........b...... - 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....e.... ..... - 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // .h.......i...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, // .........E...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, // .....F.......F~. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // ......`......6.. - 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, // ..0 .........*.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, // .....6....0 .... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .............6.. - 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, // ..0 ............ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, // .....6....0 .... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, // .....:.......2.. - 0x09, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, // .........:...... - 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // ..@.....@.@..... - 0x3f, 0x1b, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, // ?............... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .....6.......... - 0x00, 0x0a, 0x30, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ..0 ............ - 0x00, 0x36, 0x00, 0x00, 0x06, 0xe2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x19, 0x10, // .6.............. - 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x05, 0xe2, 0x00, 0x10, // .A.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .....V.......... - 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, // .".............. - 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x05, 0x72, 0x00, 0x10, // .............r.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .....F.......... - 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, // .B.......F...... - 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x05, 0x62, 0x00, 0x10, // .F.......K...b.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....V.......... - 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .".............. - 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x42, 0x00, 0x10, // .*.......2...B.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........A...... - 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // ..@.....A.@..... - 0x3f, 0x32, 0x00, 0x00, 0x09, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, // ?2...".......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x01, 0x40, 0x00, // ......@.....A.@. - 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ....?....2...... - 0x00, 0xa6, 0x0a, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, // .....A.......F.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0a, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ........."...... - 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, // ..@.....?...?... - 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x00, // ?...?........8 . - 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x22, 0x00, 0x10, // .........2...".. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, // ..............@. - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x38, 0x00, 0x00, // ......@....@@8.. - 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, // .........8...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....8.... ..... - 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, // .........:...... - 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, // .6...r ......F.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // .....>....... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x44, // Color0.........D + 0x58, 0x42, 0x43, 0x9a, 0xd6, 0x47, 0xb1, 0x98, 0xc8, 0x0f, 0x79, 0xab, 0x0a, 0x57, 0x47, 0xee, // XBC..G....y..WG. + 0xac, 0xc0, 0xfe, 0x01, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, // ..............., + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, // ...........ISGNl + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, // ...........b.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, // ...SV_POSITION.C + 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, // OLOR.TEXCOORD..O + 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, // .......SV_TARGET + 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x20, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xc8, // ...SHDR ...@.... + 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, // ...Z....`......X + 0x30, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, // 0...p......UU..b + 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, // ...........b.... + 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x04, 0x00, // ...h.......i.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, // ...........E.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // .......F.......F + 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, // ~.......`......6 + 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, // ....0 .........* + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, // .......6....0 .. + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, // ...............6 + 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, // ....0 .......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0x12, 0x30, 0x20, 0x00, 0x00, // .......6....0 .. + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, // .......:.......2 + 0x00, 0x00, 0x09, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x02, // ...........:.... + 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, // ....@.....@.@... + 0x00, 0x00, 0x3f, 0x1b, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // ..?............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, // .......6........ + 0x00, 0x00, 0x00, 0x0a, 0x30, 0x20, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, // ....0 .......... + 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xe2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, // ...6............ + 0x19, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x05, 0xe2, // ...A............ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, // .......V........ + 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, // ..."............ + 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x05, 0x72, // ...............r + 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, // .......F........ + 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, // ...B.......F.... + 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x05, 0x62, // ...F.......K...b + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......V........ + 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, // ..."............ + 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x42, // ...*.......2...B + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, // ...........A.... + 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x01, 0x40, 0x00, 0x00, 0x00, // ....@.....A.@... + 0x00, 0x00, 0x3f, 0x32, 0x00, 0x00, 0x09, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, // ..?2..."........ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x01, // ........@.....A. + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, 0x00, 0x00, // @.....?....2.... + 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // .......A.......F + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x0a, 0x22, 0x00, 0x10, 0x00, 0x00, // ...........".... + 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, // ....@.....?...?. + 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, // ..?...?........8 + 0x20, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, // ............... + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x22, // ...........2..." + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ................ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x38, // @.......@....@@8 + 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x12, // ...........8.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, // ................ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, // .......8.... ... + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, // ...........:.... + 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...6...r ......F + 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // .......>....... }; static const uint8_t fs_font_distance_field_mtl[1413] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x76, 0x05, 0x00, 0x00, 0x75, 0x73, // FSH.......v...us + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x76, 0x05, 0x00, 0x00, 0x75, 0x73, // FSH.......v...us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { diff --git a/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h b/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h index 5764cc1..3730e07 100644 --- a/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h +++ b/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_font_distance_field_subpixel_glsl[1268] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd4, 0x04, 0x00, 0x00, 0x76, // Color..........v 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary @@ -81,435 +81,446 @@ static const uint8_t fs_font_distance_field_subpixel_glsl[1268] = 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x29, 0x3b, 0x0a, // * v_color0.w);. 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t fs_font_distance_field_subpixel_spv[4457] = +static const uint8_t fs_font_distance_field_subpixel_spv[4639] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x5c, 0x11, 0x03, 0x02, 0x23, 0x07, // FSH...........#. - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0xb1, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........a...... - 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, // GLSL.std.450.... - 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, // ........main.... - 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, // w...t........... - 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ - 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, // main........g... - 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x00, // BgfxSamplerCube. - 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, // ....g.......m_sa - 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, // mpler.......g... - 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, // ....m_texture... - 0x05, 0x00, 0x0f, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, // ........bgfxText - 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, // ureCube(struct-B - 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x2d, 0x70, // gfxSamplerCube-p - 0x31, 0x2d, 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, // 1-tC11;vf3;..... - 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, // '..._sampler.... - 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, // ........_coord.. - 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, // ....5...vec4_spl - 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, // at(f1;.......... - 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // _x..........@mai - 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // n(vf4;vf4;vf4;.. - 0x05, 0x00, 0x05, 0x00, 0x42, 0x24, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....B$..v_color0 - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, // ........x ..v_te - 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, // xcoord0......A.. - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, // gl_FragData_0_.. - 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // ....C...s_texCol - 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // or..........s_te - 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, // xColorSampler... - 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // ........s_texCol - 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // orTexture....... - 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, // ....bgfx_VoidFra - 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // g........T..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x69, 0x6e, 0x64, 0x65, // m.......M...inde - 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x57, 0x17, 0x00, 0x00, 0x64, 0x78, 0x33, 0x00, // x.......W...dx3. - 0x05, 0x00, 0x03, 0x00, 0x85, 0x0f, 0x00, 0x00, 0x64, 0x79, 0x33, 0x00, 0x05, 0x00, 0x04, 0x00, // ........dy3..... - 0xc2, 0x0c, 0x00, 0x00, 0x64, 0x65, 0x63, 0x61, 0x6c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // ....decal....... - 0xd7, 0x12, 0x00, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4c, 0x65, 0x66, 0x74, 0x00, 0x00, // ....sampleLeft.. - 0x05, 0x00, 0x05, 0x00, 0x07, 0x0f, 0x00, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x69, // ........sampleRi - 0x67, 0x68, 0x74, 0x00, 0x05, 0x00, 0x05, 0x00, 0x1f, 0x14, 0x00, 0x00, 0x6c, 0x65, 0x66, 0x74, // ght.........left - 0x5f, 0x64, 0x69, 0x73, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x45, 0x4e, 0x00, 0x00, // _dist.......EN.. - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2a, 0x0f, 0x00, 0x00, // param.......*... - 0x72, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // right_dist...... - 0xc9, 0x2e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....param....... - 0x81, 0x11, 0x00, 0x00, 0x64, 0x69, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, // ....dist........ - 0xcf, 0x16, 0x00, 0x00, 0x64, 0x78, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd0, 0x16, 0x00, 0x00, // ....dx.......... - 0x64, 0x79, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc9, 0x10, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, // dy..........w... - 0x05, 0x00, 0x05, 0x00, 0x4a, 0x0d, 0x00, 0x00, 0x73, 0x75, 0x62, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ....J...sub_colo - 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, // r........A..v_co - 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, // lor0........w... - 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // v_color0........ - 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // .<..v_texcoord0. - 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ....t...v_texcoo - 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // rd0.........gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ragData_0_...... - 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .G..param....... - 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .U..param....... - 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....param....... - 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // ....gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, // 0_......M...$Glo - 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // bal.....M....... - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_viewRect...... - 0x4d, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, // M.......u_viewTe - 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // xel.....M....... - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x4d, 0x06, 0x00, 0x00, // u_view......M... - 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, // ....u_invView... - 0x06, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, // ....M.......u_pr - 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // oj......M....... - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_invProj....... - 0x4d, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // M.......u_viewPr - 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // oj......M....... - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // u_invViewProj... - 0x06, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ....M.......u_mo - 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // del.....M....... - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, // u_modelView..... - 0x4d, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // M.......u_modelV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x4d, 0x06, 0x00, 0x00, // iewProj.....M... - 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, // ....u_alphaRef4. - 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G......."....... - 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G.......!....... - 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G......."....... - 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G.......!....... - 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...w........... - 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // G...t........... - 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G............... - 0x47, 0x00, 0x04, 0x00, 0xf0, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // G...........@... - 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...M.......#... - 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....H...M....... - 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x4d, 0x06, 0x00, 0x00, // #.......H...M... - 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, // ........H...M... - 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... - 0x4d, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // M............... - 0x48, 0x00, 0x04, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...M........... - 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...M.......#... - 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // `...H...M....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x4d, 0x06, 0x00, 0x00, // ........H...M... - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, // ........H...M... - 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x4d, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // M............... - 0x48, 0x00, 0x04, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...M........... - 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...M.......#... - 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H...M....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x4d, 0x06, 0x00, 0x00, // ........H...M... - 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, // ........H...M... - 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... - 0x4d, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // M............... - 0x48, 0x00, 0x04, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...M........... - 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...M.......#... - 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // `...H...M....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x4d, 0x06, 0x00, 0x00, // ........H...M... - 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, // ........H...M... - 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x4d, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // M............... - 0x48, 0x00, 0x04, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...M........... - 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...M.......#... - 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H...M....... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x4d, 0x06, 0x00, 0x00, // ........H...M... - 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, // ........H...M... - 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x4d, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // M............... - 0x48, 0x00, 0x05, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...M.......#... - 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...G...M....... - 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, // ........!....... - 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x98, 0x00, 0x00, 0x00, // .... ........... - 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, // ................ - 0x67, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // g........... ... - 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // !.......g....... - 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // ................ - 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, // ............!... - 0xe8, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, // ........!....... - 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ............... - 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, // !............... - 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... - 0x21, 0x00, 0x06, 0x00, 0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, // !............... - 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, // ........;...!... - 0x43, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, // C....... ...y... - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, // ........;...y... - 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, // ........ ....... - 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, // ........;....... - 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ................ - 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // .......+....... - 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... - 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, // ................ - 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....+........... - 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, // ....+........... - 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x69, 0x0b, 0x00, 0x00, // ....+.......i... - 0x00, 0x00, 0x80, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, // ...@+........... - 0x00, 0x00, 0x00, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x01, 0x00, 0x00, // ...?+........... - 0xc1, 0xaa, 0x2a, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf7, 0x0a, 0x00, 0x00, // ..*>+........... - 0x00, 0x00, 0x00, 0x41, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ...A ........... - 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, // ....;.......w... - 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, // ....;.......t... - 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... - 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ....;........... - 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ........e....... - 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, // ....+.......j... - 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xf0, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ...........e... - 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x4d, 0x06, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // j.......M....... - 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ....e...e...e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xf0, 0x04, 0x00, 0x00, // e...e...e....... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, // e...e.......6... - 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....Sa..;....... - 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // .G......;....... - 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // .U......;....... - 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, // ........=....... - 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, // !C......=....... - 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, 0x00, 0x00, // .3......P...g... - 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // . ..!C...3..>... - 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // C.... ..=....... - 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .A..w...=....... - 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, // .<..t...>....G.. - 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, // .A..>....U...<.. - 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, // 9........&...... - 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .G...U......=... - 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ............>... - 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // ............8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0xe8, 0x03, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // ....7...!...'... - 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7............... - 0xcd, 0x5b, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x15, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, // .[..A.......i$.. - 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, // '.......=....... - 0x16, 0x31, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x79, 0x04, 0x00, 0x00, // .1..i$..A...y... - 0x54, 0x44, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // TD..'.......=... - 0xfc, 0x01, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, // .....V..TD..V... - 0xfe, 0x01, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, // .....B...1...V.. - 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, // =.......6....... - 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, // W........Q...B.. - 0x36, 0x1c, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // 6........Q..8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6.......5....... - 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // ....7........... - 0xf8, 0x00, 0x02, 0x00, 0x17, 0x3e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .....>..=....... - 0x18, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .S......=....... - 0x5d, 0x4a, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ]J......=....... - 0xfd, 0x34, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .4......=....... - 0x10, 0x35, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // .5......P....... - 0x3f, 0x3a, 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, // ?:...S..]J...4.. - 0x10, 0x35, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // .5......?:..8... - 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0x91, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, // ....7.......B$.. - 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7.......x ..7... - 0x9a, 0x02, 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, // .....A.......... - 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........T...... - 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;.......EN...... - 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... - 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, // >....T......9... - 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, // ........5....T.. - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x14, 0x22, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, // A........"..x .. - 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc6, 0x33, 0x00, 0x00, // ....=........3.. - 0x14, 0x22, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x09, 0x3e, 0x00, 0x00, // ."...........>.. - 0xc6, 0x33, 0x00, 0x00, 0x69, 0x0b, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .3..i........... - 0x44, 0x24, 0x00, 0x00, 0x09, 0x3e, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x04, 0x00, // D$...>......n... - 0x0c, 0x00, 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x44, 0x24, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....M...D$..=... - 0x1d, 0x00, 0x00, 0x00, 0xd1, 0x47, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, // .....G..x ..O... - 0x18, 0x00, 0x00, 0x00, 0xfa, 0x49, 0x00, 0x00, 0xd1, 0x47, 0x00, 0x00, 0xd1, 0x47, 0x00, 0x00, // .....I...G...G.. - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xcf, 0x00, 0x04, 0x00, // ................ - 0x18, 0x00, 0x00, 0x00, 0x57, 0x17, 0x00, 0x00, 0xfa, 0x49, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....W....I..=... - 0x1d, 0x00, 0x00, 0x00, 0xb1, 0x37, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, // .....7..x ..O... - 0x18, 0x00, 0x00, 0x00, 0xb5, 0x1e, 0x00, 0x00, 0xb1, 0x37, 0x00, 0x00, 0xb1, 0x37, 0x00, 0x00, // .........7...7.. - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, // ................ - 0x18, 0x00, 0x00, 0x00, 0x45, 0x61, 0x00, 0x00, 0xb5, 0x1e, 0x00, 0x00, 0xd0, 0x00, 0x04, 0x00, // ....Ea.......... - 0x18, 0x00, 0x00, 0x00, 0x85, 0x0f, 0x00, 0x00, 0x45, 0x61, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, // ........Ea...... - 0x18, 0x00, 0x00, 0x00, 0xc2, 0x0c, 0x00, 0x00, 0x57, 0x17, 0x00, 0x00, 0xfd, 0x01, 0x00, 0x00, // ........W....... - 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf9, 0x29, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, // =........)..x .. - 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xc3, 0x32, 0x00, 0x00, 0xf9, 0x29, 0x00, 0x00, // O........2...).. - 0xf9, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .).............. - 0x83, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd7, 0x12, 0x00, 0x00, 0xc3, 0x32, 0x00, 0x00, // .............2.. - 0xc2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x25, 0x00, 0x00, // ....=........%.. - 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x5e, 0x37, 0x00, 0x00, // x ..O.......^7.. - 0x13, 0x25, 0x00, 0x00, 0x13, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .%...%.......... - 0x02, 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x00, 0x00, // ................ - 0x5e, 0x37, 0x00, 0x00, 0xc2, 0x0c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x45, 0x4e, 0x00, 0x00, // ^7......>...EN.. - 0xd7, 0x12, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x2a, 0x00, 0x00, // ....9........*.. - 0xd5, 0x11, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, 0x4f, 0x00, 0x09, 0x00, // ....C...EN..O... - 0x1d, 0x00, 0x00, 0x00, 0x6a, 0x5b, 0x00, 0x00, 0x1f, 0x2a, 0x00, 0x00, 0x1f, 0x2a, 0x00, 0x00, // ....j[...*...*.. - 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ - 0x4d, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1f, 0x14, 0x00, 0x00, 0x6a, 0x5b, 0x00, 0x00, // M...........j[.. - 0x4d, 0x15, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x07, 0x0f, 0x00, 0x00, // M...>........... - 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa3, 0x1d, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, // 9............... - 0x43, 0x12, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x4f, 0x00, 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, // C.......O....... - 0x63, 0x60, 0x00, 0x00, 0xa3, 0x1d, 0x00, 0x00, 0xa3, 0x1d, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // c`.............. - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x05, 0x00, // ............M... - 0x0d, 0x00, 0x00, 0x00, 0x2a, 0x0f, 0x00, 0x00, 0x63, 0x60, 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, // ....*...c`..M... - 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc3, 0x52, 0x00, 0x00, 0x1f, 0x14, 0x00, 0x00, // .........R...... - 0x2a, 0x0f, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x81, 0x11, 0x00, 0x00, // *............... - 0xfc, 0x00, 0x00, 0x00, 0xc3, 0x52, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, // .....R.......... - 0xcf, 0x16, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x57, 0x17, 0x00, 0x00, // ........B...W... - 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd0, 0x16, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x42, 0x00, 0x00, 0x00, 0x85, 0x0f, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // B............... - 0x8f, 0x4e, 0x00, 0x00, 0xcf, 0x16, 0x00, 0x00, 0xd0, 0x16, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, // .N.............. - 0x0d, 0x00, 0x00, 0x00, 0xc9, 0x10, 0x00, 0x00, 0xf7, 0x0a, 0x00, 0x00, 0x8f, 0x4e, 0x00, 0x00, // .............N.. - 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3f, 0x23, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, // ........?#...... - 0xc9, 0x10, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd3, 0x50, 0x00, 0x00, // ....P........P.. - 0x3f, 0x23, 0x00, 0x00, 0x3f, 0x23, 0x00, 0x00, 0x3f, 0x23, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, // ?#..?#..?#...... - 0x0d, 0x00, 0x00, 0x00, 0x70, 0x3a, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xc9, 0x10, 0x00, 0x00, // ....p:.......... - 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x82, 0x21, 0x00, 0x00, 0x70, 0x3a, 0x00, 0x00, // P........!..p:.. - 0x70, 0x3a, 0x00, 0x00, 0x70, 0x3a, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, // p:..p:..P....... - 0x2e, 0x4d, 0x00, 0x00, 0x1f, 0x14, 0x00, 0x00, 0x81, 0x11, 0x00, 0x00, 0x2a, 0x0f, 0x00, 0x00, // .M..........*... - 0x0c, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x4a, 0x0d, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........J....... - 0x31, 0x00, 0x00, 0x00, 0xd3, 0x50, 0x00, 0x00, 0x82, 0x21, 0x00, 0x00, 0x2e, 0x4d, 0x00, 0x00, // 1....P...!...M.. - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xa2, 0x48, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, // A........H..B$.. - 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0a, 0x2f, 0x00, 0x00, // ....=......../.. - 0xa2, 0x48, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x24, 0x29, 0x00, 0x00, // .H..........$).. - 0x4a, 0x0d, 0x00, 0x00, 0x0a, 0x2f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // J..../..=....... - 0x31, 0x27, 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x4f, 0x00, 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, // 1'...A..O....... - 0xb0, 0x61, 0x00, 0x00, 0x31, 0x27, 0x00, 0x00, 0x24, 0x29, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // .a..1'..$)...... - 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ............>... - 0xc4, 0x41, 0x00, 0x00, 0xb0, 0x61, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, // .A...a..A....... - 0xfd, 0x44, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .D..B$......=... - 0x0d, 0x00, 0x00, 0x00, 0x2a, 0x32, 0x00, 0x00, 0xfd, 0x44, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, // ....*2...D...... - 0x0d, 0x00, 0x00, 0x00, 0x3a, 0x1b, 0x00, 0x00, 0x81, 0x11, 0x00, 0x00, 0x2a, 0x32, 0x00, 0x00, // ....:.......*2.. - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x89, 0x46, 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, // A........F...A.. - 0x13, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x89, 0x46, 0x00, 0x00, 0x3a, 0x1b, 0x00, 0x00, // ....>....F..:... - 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ....8.... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x03, 0x02, // FSH............. + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0xb1, 0x61, 0x00, 0x00, 0x00, 0x00, // #..........a.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, // ..w...t......... + 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, // ................ + 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x42, 0x67, // in........g...Bg + 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x00, 0x06, 0x00, // fxSamplerCube... + 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, // ..g.......m_samp + 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x01, 0x00, // ler.......g..... + 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, // ..m_texture..... + 0x0f, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, // ......bgfxTextur + 0x65, 0x43, 0x75, 0x62, 0x65, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, // eCube(struct-Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x2d, 0x70, 0x31, 0x2d, // xSamplerCube-p1- + 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, // tC11;vf3;.....'. + 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // .._sampler...... + 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, // ......_coord.... + 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, // ..5...vec4_splat + 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, // (f1;.........._x + 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, // ..........@main( + 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, // vf4;vf4;vf4;.... + 0x05, 0x00, 0x42, 0x24, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ..B$..v_color0.. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ......x ..v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x67, 0x6c, // oord0......A..gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, // _FragData_0_.... + 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ..C...s_texColor + 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ..........s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, // olorSampler..... + 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ......s_texColor + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, // Texture......... + 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, // ..bgfx_VoidFrag. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......T..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x00, // ......M...index. + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x57, 0x17, 0x00, 0x00, 0x64, 0x78, 0x33, 0x00, 0x05, 0x00, // ......W...dx3... + 0x03, 0x00, 0x85, 0x0f, 0x00, 0x00, 0x64, 0x79, 0x33, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc2, 0x0c, // ......dy3....... + 0x00, 0x00, 0x64, 0x65, 0x63, 0x61, 0x6c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xd7, 0x12, // ..decal......... + 0x00, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4c, 0x65, 0x66, 0x74, 0x00, 0x00, 0x05, 0x00, // ..sampleLeft.... + 0x05, 0x00, 0x07, 0x0f, 0x00, 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x69, 0x67, 0x68, // ......sampleRigh + 0x74, 0x00, 0x05, 0x00, 0x05, 0x00, 0x1f, 0x14, 0x00, 0x00, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x64, // t.........left_d + 0x69, 0x73, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0c, 0x4e, 0x00, 0x00, 0x70, 0x61, // ist........N..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x70, 0x61, // ram........0..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2a, 0x0f, 0x00, 0x00, 0x72, 0x69, // ram.......*...ri + 0x67, 0x68, 0x74, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2f, 0x31, // ght_dist....../1 + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x2e, // ..param......... + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x81, 0x11, // ..param......... + 0x00, 0x00, 0x64, 0x69, 0x73, 0x74, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xcf, 0x16, // ..dist.......... + 0x00, 0x00, 0x64, 0x78, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd0, 0x16, 0x00, 0x00, 0x64, 0x79, // ..dx..........dy + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc9, 0x10, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x05, 0x00, // ..........w..... + 0x05, 0x00, 0x4a, 0x0d, 0x00, 0x00, 0x73, 0x75, 0x62, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // ..J...sub_color. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .......A..v_colo + 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, // r0........w...v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, // color0.........< + 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... + 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..t...v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // 0.........gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, // gData_0_.......G + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, // ..param........U + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, // ..param......... + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, // ..param......... + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x35, 0x08, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, // ......5...$Globa + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x35, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....5.......u_ + 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x35, 0x08, // viewRect......5. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, // ......u_viewTexe + 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....5.......u_ + 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x35, 0x08, 0x00, 0x00, 0x03, 0x00, // view......5..... + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invView..... + 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, // ..5.......u_proj + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x35, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......5.......u_ + 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x35, 0x08, // invProj.......5. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ......u_viewProj + 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x35, 0x08, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......5.......u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // invViewProj..... + 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..5.......u_mode + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x35, 0x08, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....5.......u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x35, 0x08, // modelView.....5. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x35, 0x08, 0x00, 0x00, 0x0b, 0x00, // wProj.....5..... + 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, // ..u_alphaRef4.G. + 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......".......G. + 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......!.......G. + 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......".......G. + 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......!.......G. + 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..w...........G. + 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, // ..t...........G. + 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. + 0x04, 0x00, 0x7b, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, // ..{.......@...H. + 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, // ..5.......#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...5.......#. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x35, 0x08, 0x00, 0x00, 0x02, 0x00, // ......H...5..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x02, 0x00, // ......H...5..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, // ..#... ...H...5. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x35, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..5...........H. + 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, // ..5.......#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...5......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x35, 0x08, 0x00, 0x00, 0x04, 0x00, // ......H...5..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x04, 0x00, // ......H...5..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, // ..#.......H...5. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x35, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..5...........H. + 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, // ..5.......#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...5......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x35, 0x08, 0x00, 0x00, 0x06, 0x00, // ......H...5..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x06, 0x00, // ......H...5..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, // ..#... ...H...5. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x35, 0x08, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..5...........H. + 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, // ..5.......#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...5......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x35, 0x08, 0x00, 0x00, 0x08, 0x00, // ......H...5..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x08, 0x00, // ......H...5..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, // ..#.......H...5. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0x35, 0x08, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..5...........H. + 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, // ..5.......#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H...5......... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x35, 0x08, 0x00, 0x00, 0x0a, 0x00, // ......H...5..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x0a, 0x00, // ......H...5..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x35, 0x08, // ..#.......H...5. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0x35, 0x08, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, // ..5.......#... . + 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x35, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, // ..G...5......... + 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, // ......!......... + 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x98, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x67, 0x09, // ..............g. + 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, // .......... ...!. + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, // ......g......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, // ................ + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xe8, 0x03, // ..........!..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, // ......!....... . + 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x06, 0x00, 0x91, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ + 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, // ...... ..."..... + 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x43, 0x12, // ..g...;..."...C. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, // ...... ...y..... + 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, // ......;...y..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0x00, 0x00, // ...... ......... + 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0xee, 0x0e, // ......;......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, // ......+......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x03, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, // ...... ...z..... + 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x98, 0x00, // ................ + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, // ..+............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x69, 0x0b, 0x00, 0x00, 0x00, 0x00, // ..+.......i..... + 0x80, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, // .@+............. + 0x00, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x01, 0x00, 0x00, 0xc1, 0xaa, // .?+............. + 0x2a, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf7, 0x0a, 0x00, 0x00, 0x00, 0x00, // *>+............. + 0x00, 0x41, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, // .A ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, // ..;.......w..... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;.......t..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, // ..;............. + 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, // ......e......... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, // ..+.......j... . + 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x7b, 0x07, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, // ......{...e...j. + 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x35, 0x08, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......5......... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x7b, 0x07, 0x00, 0x00, 0x65, 0x00, // ..e...e...{...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, // ..e.......6..... + 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, // ................ + 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, // ..Sa..;........G + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xab, 0x55, // ......;........U + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, // ......;......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, // ......=.......!C + 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x33, // ......=........3 + 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, 0x00, 0x00, 0x12, 0x20, // ......P...g.... + 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, // ..!C...3..>...C. + 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, // ... ..=........A + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x03, 0x3c, // ..w...=........< + 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, // ..t...>....G...A + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, // ..>....U...<..9. + 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0xc9, 0x47, // .......&.......G + 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ...U......=..... + 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, // ..........>..... + 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ..........8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x03, // ................ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, // ..7...!...'...7. + 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xcd, 0x5b, // ...............[ + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x16, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x27, 0x0e, // ..A.......i$..'. + 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x16, 0x31, // ......=........1 + 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x54, 0x44, // ..i$..A...z...TD + 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, // ..'.......=..... + 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, // ...V..TD..V..... + 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x3d, 0x00, // ...B...1...V..=. + 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, // ......6.......W. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x36, 0x1c, // .......Q...B..6. + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // .......Q..8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, // ......5......... + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, // ..7............. + 0x02, 0x00, 0x17, 0x3e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x53, // ...>..=........S + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5d, 0x4a, // ......=.......]J + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x34, // ......=........4 + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x10, 0x35, // ......=........5 + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3f, 0x3a, // ......P.......?: + 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0x10, 0x35, // ...S..]J...4...5 + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ......?:..8...6. + 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x37, 0x00, // ..7.......B$..7. + 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, // ......x ..7..... + 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, // ...A..........;. + 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......T......;. + 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x0c, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..!....N......;. + 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......0......;. + 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..!.../1......;. + 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, // ..............>. + 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, // ...T......9..... + 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x41, 0x00, // ......5....T..A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x14, 0x22, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x13, 0x0a, // ......."..x .... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc6, 0x33, 0x00, 0x00, 0x14, 0x22, // ..=........3..." + 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x09, 0x3e, 0x00, 0x00, 0xc6, 0x33, // ...........>...3 + 0x00, 0x00, 0x69, 0x0b, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x44, 0x24, // ..i...........D$ + 0x00, 0x00, 0x09, 0x3e, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x6e, 0x00, 0x04, 0x00, 0x0c, 0x00, // ...>......n..... + 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x44, 0x24, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..M...D$..=..... + 0x00, 0x00, 0xd1, 0x47, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, // ...G..x ..O..... + 0x00, 0x00, 0xfa, 0x49, 0x00, 0x00, 0xd1, 0x47, 0x00, 0x00, 0xd1, 0x47, 0x00, 0x00, 0x00, 0x00, // ...I...G...G.... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xcf, 0x00, 0x04, 0x00, 0x18, 0x00, // ................ + 0x00, 0x00, 0x57, 0x17, 0x00, 0x00, 0xfa, 0x49, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..W....I..=..... + 0x00, 0x00, 0xb1, 0x37, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, // ...7..x ..O..... + 0x00, 0x00, 0xb5, 0x1e, 0x00, 0x00, 0xb1, 0x37, 0x00, 0x00, 0xb1, 0x37, 0x00, 0x00, 0x00, 0x00, // .......7...7.... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x18, 0x00, // ................ + 0x00, 0x00, 0x45, 0x61, 0x00, 0x00, 0xb5, 0x1e, 0x00, 0x00, 0xd0, 0x00, 0x04, 0x00, 0x18, 0x00, // ..Ea............ + 0x00, 0x00, 0x85, 0x0f, 0x00, 0x00, 0x45, 0x61, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, // ......Ea........ + 0x00, 0x00, 0xc2, 0x0c, 0x00, 0x00, 0x57, 0x17, 0x00, 0x00, 0xfd, 0x01, 0x00, 0x00, 0x3d, 0x00, // ......W.......=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf9, 0x29, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, // .......)..x ..O. + 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xc3, 0x32, 0x00, 0x00, 0xf9, 0x29, 0x00, 0x00, 0xf9, 0x29, // .......2...)...) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x83, 0x00, // ................ + 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd7, 0x12, 0x00, 0x00, 0xc3, 0x32, 0x00, 0x00, 0xc2, 0x0c, // ...........2.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x25, 0x00, 0x00, 0x78, 0x20, // ..=........%..x + 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x4b, 0x37, 0x00, 0x00, 0x13, 0x25, // ..O.......K7...% + 0x00, 0x00, 0x13, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, // ...%............ + 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x00, 0x00, 0x4b, 0x37, // ..............K7 + 0x00, 0x00, 0xc2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0xc2, 0x46, // ......=...g....F + 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0c, 0x4e, 0x00, 0x00, 0xc2, 0x46, // ..C...>....N...F + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xf6, 0x30, 0x00, 0x00, 0xd7, 0x12, 0x00, 0x00, 0x39, 0x00, // ..>....0......9. + 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb6, 0x5e, 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x0c, 0x4e, // .......^.......N + 0x00, 0x00, 0xf6, 0x30, 0x00, 0x00, 0x4f, 0x00, 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x57, 0x5b, // ...0..O.......W[ + 0x00, 0x00, 0xb6, 0x5e, 0x00, 0x00, 0xb6, 0x5e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, // ...^...^........ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..........M..... + 0x00, 0x00, 0x1f, 0x14, 0x00, 0x00, 0x57, 0x5b, 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x3d, 0x00, // ......W[..M...=. + 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0x4e, 0x1a, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, // ..g...N...C...>. + 0x03, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x4e, 0x1a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x2e, // ../1..N...>..... + 0x00, 0x00, 0x07, 0x0f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb7, 0x5e, // ......9........^ + 0x00, 0x00, 0xd5, 0x11, 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x4f, 0x00, // ....../1......O. + 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x63, 0x60, 0x00, 0x00, 0xb7, 0x5e, 0x00, 0x00, 0xb7, 0x5e, // ......c`...^...^ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x4d, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2a, 0x0f, 0x00, 0x00, 0x63, 0x60, // ..M.......*...c` + 0x00, 0x00, 0x4d, 0x15, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc3, 0x52, // ..M............R + 0x00, 0x00, 0x1f, 0x14, 0x00, 0x00, 0x2a, 0x0f, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, // ......*......... + 0x00, 0x00, 0x81, 0x11, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xc3, 0x52, 0x00, 0x00, 0x0c, 0x00, // ...........R.... + 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcf, 0x16, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, // ..............B. + 0x00, 0x00, 0x57, 0x17, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd0, 0x16, // ..W............. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x85, 0x0f, 0x00, 0x00, 0x81, 0x00, // ......B......... + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8f, 0x4e, 0x00, 0x00, 0xcf, 0x16, 0x00, 0x00, 0xd0, 0x16, // .......N........ + 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc9, 0x10, 0x00, 0x00, 0xf7, 0x0a, // ................ + 0x00, 0x00, 0x8f, 0x4e, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3f, 0x23, // ...N..........?# + 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xc9, 0x10, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, // ..........P..... + 0x00, 0x00, 0xd3, 0x50, 0x00, 0x00, 0x3f, 0x23, 0x00, 0x00, 0x3f, 0x23, 0x00, 0x00, 0x3f, 0x23, // ...P..?#..?#..?# + 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x70, 0x3a, 0x00, 0x00, 0xfc, 0x00, // ..........p:.... + 0x00, 0x00, 0xc9, 0x10, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x82, 0x21, // ......P........! + 0x00, 0x00, 0x70, 0x3a, 0x00, 0x00, 0x70, 0x3a, 0x00, 0x00, 0x70, 0x3a, 0x00, 0x00, 0x50, 0x00, // ..p:..p:..p:..P. + 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2e, 0x4d, 0x00, 0x00, 0x1f, 0x14, 0x00, 0x00, 0x81, 0x11, // .......M........ + 0x00, 0x00, 0x2a, 0x0f, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x4a, 0x0d, // ..*...........J. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0xd3, 0x50, 0x00, 0x00, 0x82, 0x21, // ......1....P...! + 0x00, 0x00, 0x2e, 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xa2, 0x48, // ...M..A........H + 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..B$......=..... + 0x00, 0x00, 0x0a, 0x2f, 0x00, 0x00, 0xa2, 0x48, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, // .../...H........ + 0x00, 0x00, 0x24, 0x29, 0x00, 0x00, 0x4a, 0x0d, 0x00, 0x00, 0x0a, 0x2f, 0x00, 0x00, 0x3d, 0x00, // ..$)..J..../..=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x31, 0x27, 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x4f, 0x00, // ......1'...A..O. + 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x61, 0x00, 0x00, 0x31, 0x27, 0x00, 0x00, 0x24, 0x29, // .......a..1'..$) + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc4, 0x41, 0x00, 0x00, 0xb0, 0x61, 0x00, 0x00, 0x41, 0x00, // ..>....A...a..A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xfd, 0x44, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x13, 0x0a, // .......D..B$.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2a, 0x32, 0x00, 0x00, 0xfd, 0x44, // ..=.......*2...D + 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3a, 0x1b, 0x00, 0x00, 0x81, 0x11, // ..........:..... + 0x00, 0x00, 0x2a, 0x32, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x89, 0x46, // ..*2..A........F + 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x89, 0x46, // ...A......>....F + 0x00, 0x00, 0x3a, 0x1b, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..:.......8.... }; -static const uint8_t fs_font_distance_field_subpixel_dx9[894] = +static const uint8_t fs_font_distance_field_subpixel_dx9[896] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x60, 0x03, 0x00, 0x03, 0xff, // Color0.....`.... - 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ... .CTAB....S.. - 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ - 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo - 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, // 0.1..Q.......... - 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, // @...?.......?Q.. - 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, // ................ - 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, // ...@.Q.......... - 0xc0, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, // ...@@........Q.. - 0x05, 0x03, 0x00, 0x0f, 0xa0, 0xc1, 0xaa, 0x2a, 0x3e, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, // .......*>...A... - 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, // ?............... - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // ................ - 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, // ...........U.... - 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, // .........X...... - 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, // ...U............ - 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, // ...........U.X.. - 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, // ...............U - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, // .X.............. - 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x5b, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, // .....[.......... - 0x90, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x03, 0x00, 0x00, // ................ - 0xa1, 0x01, 0x00, 0xe4, 0x90, 0x42, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, // .....B.......... - 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x80, 0x02, 0x00, 0xc6, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, // ................ - 0x80, 0x03, 0x00, 0x00, 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x08, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, // ................ - 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, // ................ - 0x80, 0x01, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, // ................ - 0x80, 0x42, 0x00, 0x00, 0x03, 0x03, 0x00, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, // .B.............. - 0xa0, 0x09, 0x00, 0x00, 0x03, 0x02, 0x00, 0x04, 0x80, 0x03, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x02, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, // ................ - 0x80, 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, // ...............U - 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x91, 0x5c, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, // ................ - 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x55, // ...............U - 0xa1, 0x03, 0x00, 0xaa, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x03, 0x00, 0x55, 0xa0, 0x03, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ...U............ - 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0e, // ...U............ - 0x80, 0x00, 0x00, 0x55, 0x81, 0x02, 0x00, 0x90, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, // ...U............ - 0x80, 0x02, 0x00, 0x55, 0x80, 0x00, 0x00, 0xff, 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, // ...U............ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x17, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x00, 0x00, 0xf9, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, // .......U........ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x07, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xff, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .............. + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x60, 0x03, 0x00, 0x00, 0x00, // Color0.....`.... + 0x03, 0xff, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, // ..... .CTAB....S + 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ...L...0........ + 0x00, 0x02, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...<.......s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, // Color........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......ps_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, // 10.1..Q........ + 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, // ..@...?.......?Q + 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, // ................ + 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, // .....@.Q........ + 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, // .....@@........Q + 0x00, 0x00, 0x05, 0x03, 0x00, 0x0f, 0xa0, 0xc1, 0xaa, 0x2a, 0x3e, 0x00, 0x00, 0x00, 0x41, 0x00, // .........*>...A. + 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, // ..?............. + 0x00, 0x08, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, // .............U.. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, // ...........X.... + 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, // .....U.......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, // .............U.X + 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, // ................ + 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, // ................ + 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, // .U.............. + 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, // ...X............ + 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x5b, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x01, // .......[........ + 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x03, // ................ + 0x00, 0x00, 0xa1, 0x01, 0x00, 0xe4, 0x90, 0x42, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, // .......B........ + 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x80, 0x02, // ................ + 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x03, 0x00, 0x07, 0x80, 0x01, // ................ + 0x00, 0xe4, 0x80, 0x03, 0x00, 0x00, 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x08, 0x00, 0x00, 0x03, 0x01, // ................ + 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x01, // ................ + 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x01, // ................ + 0x00, 0x00, 0x80, 0x42, 0x00, 0x00, 0x03, 0x03, 0x00, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x00, // ...B............ + 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x02, 0x00, 0x04, 0x80, 0x03, 0x00, 0xc6, 0x80, 0x00, // ................ + 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x02, 0x00, 0xaa, 0x80, 0x02, // ................ + 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, // ................ + 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x91, 0x5c, // .U.............. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x01, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, // ................ + 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, // ................ + 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, // ................ + 0x00, 0x55, 0xa1, 0x03, 0x00, 0xaa, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, // .U.............. + 0x00, 0x00, 0x80, 0x03, 0x00, 0x55, 0xa0, 0x03, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, // .....U.......... + 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, // .....U.......... + 0x00, 0x0e, 0x80, 0x00, 0x00, 0x55, 0x81, 0x02, 0x00, 0x90, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, // .....U.......... + 0x08, 0x08, 0x80, 0x02, 0x00, 0x55, 0x80, 0x00, 0x00, 0xff, 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, // .....U.......... + 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x17, 0x80, 0x00, // ................ + 0x00, 0x00, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, 0x00, // ................ + 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, // .........U...... + 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, // ................ + 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xff, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ................ }; -static const uint8_t fs_font_distance_field_subpixel_dx11[1305] = +static const uint8_t fs_font_distance_field_subpixel_dx11[1307] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xf8, 0x04, 0x44, 0x58, 0x42, // Color0.......DXB - 0x43, 0x72, 0x17, 0x00, 0xad, 0x3a, 0xed, 0x4a, 0x16, 0x14, 0x58, 0xdb, 0x06, 0xdf, 0x01, 0x0f, // Cr...:.J..X..... - 0x39, 0x01, 0x00, 0x00, 0x00, 0xf8, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // 9............,.. - 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, // .........ISGNl.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ - 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........b...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, // .SV_POSITION.COL - 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, // OR.TEXCOORD..OSG - 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // N,........... .. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, // .....SV_TARGET.. - 0xab, 0x53, 0x48, 0x44, 0x52, 0x1c, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x07, 0x01, 0x00, // .SHDR....@...... - 0x00, 0x35, 0x18, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, // .5..........?... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, // ................ - 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ?............... - 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....?........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, // ........?Z....`. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, // .....X0...p..... - 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x82, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, // .UU..b.......... - 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .b...........e.. - 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, // .. ......h...... - 0x00, 0x32, 0x00, 0x00, 0x09, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, // .2...........:.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x01, 0x40, 0x00, // ......@.....@.@. - 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1b, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ....?........... - 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x05, 0xe2, 0x00, 0x10, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x19, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, // .............2.. - 0x0d, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x80, 0x41, 0x00, 0x00, // .r...........A.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xc1, 0xaa, 0x2a, 0x3e, 0xc1, 0xaa, 0x2a, // ......@....*>..* - 0x3e, 0xc1, 0xaa, 0x2a, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, // >..*>....F...... - 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, // .E...........F.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, // .....F~.......`. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, // ................ - 0x00, 0x66, 0x0c, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x9e, 0x90, 0x00, 0x0a, 0x00, 0x10, // .f.......F...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, // .....2...r...... - 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xc1, 0xaa, 0x2a, // ..........@....* - 0x3e, 0xc1, 0xaa, 0x2a, 0x3e, 0xc1, 0xaa, 0x2a, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, // >..*>..*>....F.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ........."...... - 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, // .E...........F.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, // .....F~.......`. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, // .........B...... - 0x00, 0x66, 0x0c, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x9e, 0x90, 0x00, 0x0a, 0x00, 0x10, // .f.......F...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x2a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, // .*.............. - 0x00, 0x38, 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, // .8...".......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x36, 0x00, 0x00, // ......@.....?6.. - 0x06, 0xd2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x19, 0x10, 0x80, 0x41, 0x00, 0x00, // .............A.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x05, 0xd2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x06, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x03, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x03, 0x10, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x05, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .....K...2...... - 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, // .F.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .....2..."...... - 0x00, 0x0a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, // .....A........@. - 0x00, 0x00, 0x00, 0x00, 0x41, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x32, 0x00, 0x00, // ....A.@.....?2.. - 0x09, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // ..@.....A.@..... - 0x3f, 0x00, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, // ?............... - 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .A.............. - 0x00, 0x00, 0x00, 0x00, 0x08, 0xe2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, // .............V.. - 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x10, 0x00, 0x01, 0x00, 0x00, // .A.............. - 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, // .8.... ......... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, // .....:.......... - 0x0a, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, // ..........@..... - 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x0a, 0x00, 0x10, // ?...?...?...?... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .....8 ..r...... - 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x32, 0x00, 0x00, 0x0f, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, // .2...r.......F.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, // ......@......... - 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, // ..........@....@ - 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, // @..@@..@@....8.. - 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, // .r.......F...... - 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, // .F.......8...r.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, // .....F.......F.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....8...r ..... - 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x1f, 0x10, 0x00, 0x01, 0x00, 0x00, // .F.............. - 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // .>....... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xf8, 0x04, 0x00, 0x00, 0x44, // Color0.........D + 0x58, 0x42, 0x43, 0x72, 0x17, 0x00, 0xad, 0x3a, 0xed, 0x4a, 0x16, 0x14, 0x58, 0xdb, 0x06, 0xdf, // XBCr...:.J..X... + 0x01, 0x0f, 0x39, 0x01, 0x00, 0x00, 0x00, 0xf8, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, // ..9............, + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, // ...........ISGNl + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, // ...........b.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, // ...SV_POSITION.C + 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, // OLOR.TEXCOORD..O + 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, // .......SV_TARGET + 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x1c, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x07, // ...SHDR....@.... + 0x01, 0x00, 0x00, 0x35, 0x18, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, // ...5..........?. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..?............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......?......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x5a, 0x00, 0x00, 0x03, 0x00, // ..........?Z.... + 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, // `......X0...p... + 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x82, 0x10, 0x10, 0x00, 0x01, // ...UU..b........ + 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, // ...b...........e + 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x03, // .... ......h.... + 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, // ...2...........: + 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x01, // ........@.....@. + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1b, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x00, // @.....?......... + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x05, 0xe2, // ................ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x19, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, // ...............2 + 0x00, 0x00, 0x0d, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x80, 0x41, // ...r...........A + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xc1, 0xaa, 0x2a, 0x3e, 0xc1, // ........@....*>. + 0xaa, 0x2a, 0x3e, 0xc1, 0xaa, 0x2a, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x02, // .*>..*>....F.... + 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...E...........F + 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......F~....... + 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, 0x01, // `............... + 0x00, 0x00, 0x00, 0x66, 0x0c, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x9e, 0x90, 0x00, 0x0a, // ...f.......F.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0c, 0x72, 0x00, 0x10, 0x00, 0x02, // .......2...r.... + 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xc1, // ............@... + 0xaa, 0x2a, 0x3e, 0xc1, 0xaa, 0x2a, 0x3e, 0xc1, 0xaa, 0x2a, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x46, // .*>..*>..*>....F + 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, // ...........".... + 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // ...E...........F + 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......F~....... + 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x01, // `..........B.... + 0x00, 0x00, 0x00, 0x66, 0x0c, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x9e, 0x90, 0x00, 0x0a, // ...f.......F.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x01, // ...*............ + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, // ...8..."........ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x36, // ........@.....?6 + 0x00, 0x00, 0x06, 0xd2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x19, 0x10, 0x80, 0x41, // ...............A + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x05, 0xd2, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x06, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0x12, // ................ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x03, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, // ................ + 0x03, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x05, 0x32, 0x00, 0x10, 0x00, 0x00, // .......K...2.... + 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x12, // ...F............ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, // ................ + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x22, 0x00, 0x10, 0x00, 0x00, // .......2...".... + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // .......A........ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x32, // @.....A.@.....?2 + 0x00, 0x00, 0x09, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x01, 0x40, 0x00, 0x00, 0x00, // ....@.....A.@... + 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, // ..?............. + 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, // ...A............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, // ...............V + 0x05, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x10, 0x00, 0x01, // ...A............ + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, // ...8.... ....... + 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, // .......:........ + 0x00, 0x00, 0x0a, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, // ............@... + 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x0a, // ..?...?...?...?. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, // .......8 ..r.... + 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0f, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...2...r.......F + 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, // ........@....... + 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, // ............@... + 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x38, // .@@..@@..@@....8 + 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, // ...r.......F.... + 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, // ...F.......8...r + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // .......F.......F + 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x20, 0x10, 0x00, 0x00, // .......8...r ... + 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x1f, 0x10, 0x00, 0x01, // ...F............ + 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ...>....... }; static const uint8_t fs_font_distance_field_subpixel_mtl[1654] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x67, 0x06, 0x00, 0x00, 0x75, 0x73, // FSH.......g...us + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x67, 0x06, 0x00, 0x00, 0x75, 0x73, // FSH.......g...us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { diff --git a/3rdparty/bgfx/examples/common/font/makefile b/3rdparty/bgfx/examples/common/font/makefile index 928467d..9dd5826 100644 --- a/3rdparty/bgfx/examples/common/font/makefile +++ b/3rdparty/bgfx/examples/common/font/makefile @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # diff --git a/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp b/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp index 0ae7877..b442a81 100644 --- a/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp +++ b/3rdparty/bgfx/examples/common/font/text_buffer_manager.cpp @@ -251,7 +251,7 @@ void TextBuffer::appendText(FontHandle _fontHandle, const char* _string, const c if (_end == NULL) { - _end = _string + bx::strnlen(_string); + _end = _string + bx::strLen(_string); } BX_CHECK(_end >= _string); @@ -613,11 +613,11 @@ TextBufferManager::~TextBufferManager() BX_CHECK(m_textBufferHandles.getNumHandles() == 0, "All the text buffers must be destroyed before destroying the manager"); delete [] m_textBuffers; - bgfx::destroyUniform(s_texColor); + bgfx::destroy(s_texColor); - bgfx::destroyProgram(m_basicProgram); - bgfx::destroyProgram(m_distanceProgram); - bgfx::destroyProgram(m_distanceSubpixelProgram); + bgfx::destroy(m_basicProgram); + bgfx::destroy(m_distanceProgram); + bgfx::destroy(m_distanceSubpixelProgram); } TextBufferHandle TextBufferManager::createTextBuffer(uint32_t _type, BufferType::Enum _bufferType) @@ -628,8 +628,8 @@ TextBufferHandle TextBufferManager::createTextBuffer(uint32_t _type, BufferType: bc.textBuffer = new TextBuffer(m_fontManager); bc.fontType = _type; bc.bufferType = _bufferType; - bc.indexBufferHandleIdx = bgfx::invalidHandle; - bc.vertexBufferHandleIdx = bgfx::invalidHandle; + bc.indexBufferHandleIdx = bgfx::kInvalidHandle; + bc.vertexBufferHandleIdx = bgfx::kInvalidHandle; TextBufferHandle ret = {textIdx}; return ret; @@ -644,7 +644,7 @@ void TextBufferManager::destroyTextBuffer(TextBufferHandle _handle) delete bc.textBuffer; bc.textBuffer = NULL; - if (bc.vertexBufferHandleIdx == bgfx::invalidHandle) + if (bc.vertexBufferHandleIdx == bgfx::kInvalidHandle) { return; } @@ -657,8 +657,8 @@ void TextBufferManager::destroyTextBuffer(TextBufferHandle _handle) bgfx::VertexBufferHandle vbh; ibh.idx = bc.indexBufferHandleIdx; vbh.idx = bc.vertexBufferHandleIdx; - bgfx::destroyIndexBuffer(ibh); - bgfx::destroyVertexBuffer(vbh); + bgfx::destroy(ibh); + bgfx::destroy(vbh); } break; @@ -668,8 +668,8 @@ void TextBufferManager::destroyTextBuffer(TextBufferHandle _handle) bgfx::DynamicVertexBufferHandle vbh; ibh.idx = bc.indexBufferHandleIdx; vbh.idx = bc.vertexBufferHandleIdx; - bgfx::destroyDynamicIndexBuffer(ibh); - bgfx::destroyDynamicVertexBuffer(vbh); + bgfx::destroy(ibh); + bgfx::destroy(vbh); break; @@ -678,7 +678,7 @@ void TextBufferManager::destroyTextBuffer(TextBufferHandle _handle) } } -void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, uint8_t _id, int32_t _depth) +void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, bgfx::ViewId _id, int32_t _depth) { BX_CHECK(bgfx::isValid(_handle), "Invalid handle used"); @@ -730,7 +730,7 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, uint8_t _id, bgfx::IndexBufferHandle ibh; bgfx::VertexBufferHandle vbh; - if (bgfx::invalidHandle == bc.vertexBufferHandleIdx) + if (bgfx::kInvalidHandle == bc.vertexBufferHandleIdx) { ibh = bgfx::createIndexBuffer( bgfx::copy(bc.textBuffer->getIndexBuffer(), indexSize) @@ -750,7 +750,7 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, uint8_t _id, ibh.idx = bc.indexBufferHandleIdx; } - bgfx::setVertexBuffer(vbh, 0, bc.textBuffer->getVertexCount() ); + bgfx::setVertexBuffer(0, vbh, 0, bc.textBuffer->getVertexCount() ); bgfx::setIndexBuffer(ibh, 0, bc.textBuffer->getIndexCount() ); } break; @@ -760,7 +760,7 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, uint8_t _id, bgfx::DynamicIndexBufferHandle ibh; bgfx::DynamicVertexBufferHandle vbh; - if (bgfx::invalidHandle == bc.vertexBufferHandleIdx ) + if (bgfx::kInvalidHandle == bc.vertexBufferHandleIdx ) { ibh = bgfx::createDynamicIndexBuffer( bgfx::copy(bc.textBuffer->getIndexBuffer(), indexSize) @@ -790,7 +790,7 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, uint8_t _id, ); } - bgfx::setVertexBuffer(vbh, 0, bc.textBuffer->getVertexCount() ); + bgfx::setVertexBuffer(0, vbh, 0, bc.textBuffer->getVertexCount() ); bgfx::setIndexBuffer(ibh, 0, bc.textBuffer->getIndexCount() ); } break; @@ -803,7 +803,7 @@ void TextBufferManager::submitTextBuffer(TextBufferHandle _handle, uint8_t _id, bgfx::allocTransientVertexBuffer(&tvb, bc.textBuffer->getVertexCount(), m_vertexDecl); bx::memCopy(tib.data, bc.textBuffer->getIndexBuffer(), indexSize); bx::memCopy(tvb.data, bc.textBuffer->getVertexBuffer(), vertexSize); - bgfx::setVertexBuffer(&tvb, 0, bc.textBuffer->getVertexCount() ); + bgfx::setVertexBuffer(0, &tvb, 0, bc.textBuffer->getVertexCount() ); bgfx::setIndexBuffer(&tib, 0, bc.textBuffer->getIndexCount() ); } break; diff --git a/3rdparty/bgfx/examples/common/font/text_buffer_manager.h b/3rdparty/bgfx/examples/common/font/text_buffer_manager.h index 0183b39..788fba8 100644 --- a/3rdparty/bgfx/examples/common/font/text_buffer_manager.h +++ b/3rdparty/bgfx/examples/common/font/text_buffer_manager.h @@ -47,7 +47,7 @@ public: TextBufferHandle createTextBuffer(uint32_t _type, BufferType::Enum _bufferType); void destroyTextBuffer(TextBufferHandle _handle); - void submitTextBuffer(TextBufferHandle _handle, uint8_t _id, int32_t _depth = 0); + void submitTextBuffer(TextBufferHandle _handle, bgfx::ViewId _id, int32_t _depth = 0); void setStyle(TextBufferHandle _handle, uint32_t _flags = STYLE_NORMAL); void setTextColor(TextBufferHandle _handle, uint32_t _rgba = 0x000000FF); @@ -64,16 +64,16 @@ public: /// Append a wide char unicode string to the buffer using current pen position and color. void appendText(TextBufferHandle _handle, FontHandle _fontHandle, const wchar_t* _string, const wchar_t* _end = NULL); - + /// Append a whole face of the atlas cube, mostly used for debugging and visualizing atlas. void appendAtlasFace(TextBufferHandle _handle, uint16_t _faceIndex); /// Clear the text buffer and reset its state (pen/color). void clearTextBuffer(TextBufferHandle _handle); - + /// Return the rectangular size of the current text buffer (including all its content). - TextRectangle getRectangle(TextBufferHandle _handle) const; - + TextRectangle getRectangle(TextBufferHandle _handle) const; + private: struct BufferCache { diff --git a/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h b/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h index 49d22ec..0df5f5f 100644 --- a/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h +++ b/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_font_basic_glsl[431] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x8a, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color @@ -28,275 +28,272 @@ static const uint8_t vs_font_basic_glsl[431] = 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // d0;. v_color0 = 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... }; -static const uint8_t vs_font_basic_spv[3171] = +static const uint8_t vs_font_basic_spv[3133] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... - 0x40, 0x0c, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x36, 0x62, // @...#.........6b - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ - 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 - 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. - 0x00, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, // in.............. - 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ - 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x8c, 0x04, // ..main.......... - 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, // ..Output........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // ......gl_Positio - 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, // n.............v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, // color0.......... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ......v_texcoord - 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, // 0.........@main( - 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, // vf4;vf2;vf4;.... - 0x05, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ..O...a_color0.. - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ......:...a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0x61, 0x5f, // tion.......M..a_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, // texcoord0....... - 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, // .._varying_..... - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, // ......$Global... - 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x01, 0x00, // Rect............ - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, // ..u_viewTexel... - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xbc, 0x01, // invView......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ......u_proj.... - 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, // ..........u_invP - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, // roj............. - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ..u_viewProj.... - 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xbc, 0x01, // iewProj......... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, // ......u_model... - 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode - 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, // lView........... - 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ..u_modelViewPro - 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, // j.............u_ - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, // alphaRef4.....B. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x61, 0x5f, // ...........A..a_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, // color0.......... - 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..a_color0...... - 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // ...?..a_position - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ..........a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x61, 0x5f, // tion......@,..a_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, // texcoord0....... - 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..a_texcoord0... - 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, // ......flattenTem - 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // p......U..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......8..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ..........param. - 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, // ..........@entry - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, // PointOutput_gl_P - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x38, 0x04, // osition.......8. - 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, // ..Output......8. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ......v_color0.. - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, // ......8.......v_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, // texcoord0....... - 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, // ..@entryPointOut - 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x06, 0x00, // put...G...N..... - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x00, // ..@...H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#.......H..... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, // ..........#... . - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#...`...H..... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#.......H..... - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, // ..........#... . - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#...`...H..... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#.......H..... - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0b, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xbc, 0x01, // ..#... ...G..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, // ......G...B...". - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. - 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x1d, 0x00, // ................ - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x71, 0x09, // ..........!...q. - 0x00, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x8c, 0x04, // .. ............. - 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, // ..+............. - 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, // .?+............. - 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, // ..,............. - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. - 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x00, // ..............,. - 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, // ......z......... - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..........+..... - 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // ..............e. - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... - 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x4e, 0x03, // ..j... .......N. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xbc, 0x01, // ..e...j......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. - 0x00, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ..N...e...e..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xbc, 0x01, // .. ...9......... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, // ..;...9...B..... - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x0a, 0x00, // ..+.......)..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, // .. ...........e. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, // ..;............. - 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......8......... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x38, 0x04, // .. ...........8. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, // ..;............. - 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, // ..6............. - 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, // ..........Sa..;. - 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. - 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......U......;. - 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......8......;. - 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x3d, 0x00, // .......A......=. - 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, // .......?......=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, // ......@,......>. - 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x38, // ...U...A..>....8 - 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x40, 0x2c, // ...?..>.......@, - 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x16, 0x0e, // ..9.......I&.... - 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, // ...U...8......>. - 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ......I&..A..... - 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..T4..........=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, // ..........T4..>. - 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..........A..... - 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..'A..........=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x41, 0x00, // ..........'A..A. - 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0b, 0x0a, // .......N........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x41, 0x00, // ..>....N......A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, // .......M........ - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0xc1, 0x4d, // ..=............M - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xcd, 0x0f, // ..A............. - 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xe0, 0x1c, // ......>......... - 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x8c, 0x04, // ......8...6..... - 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x09, 0x00, 0x00, 0x37, 0x00, // ..........q...7. - 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......O...7..... - 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb9, 0x4d, // ..:...7........M - 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x5f, 0x57, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, // ......_W..;..... - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..........A..... - 0x00, 0x00, 0x64, 0x2d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ..d-..........>. - 0x03, 0x00, 0x64, 0x2d, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..d-......A..... - 0x00, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ...8..........>. - 0x03, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ...8..z...=..... - 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..5b..:...Q..... - 0x00, 0x00, 0x28, 0x3a, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, // ..(:..5b......Q. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9b, 0x46, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x01, 0x00, // .......F..5b.... - 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0x28, 0x3a, // ..P........2..(: - 0x00, 0x00, 0x9b, 0x46, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, // ...F..........A. - 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, // ......),..B...). - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x29, 0x2c, // ..=...e....<..), - 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x84, 0x32, // ...........;...2 - 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x5f, 0x38, // ...<..A......._8 - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x38, // ..........>..._8 - 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x21, // ...;..=........! - 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2d, 0x3c, // ...M..A.......-< - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2d, 0x3c, // ..........>...-< - 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x21, // ...!..=........! - 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2e, 0x3c, // ..O...A........< - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2e, 0x3c, // ..........>....< - 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x47, 0x3a, // ...!..=.......G: - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x38, 0x00, // ..........G:..8. - 0x01, 0x00, 0x00, // ... + 0x18, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, // ......#......... + 0x36, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // 6b.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // main............ + 0x95, 0x0e, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........v....... + 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ + 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....main........ + 0x8c, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....Output...... + 0x8c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // ........gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ion............. + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // v_color0........ + 0x8c, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ........v_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // rd0.........@mai + 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // n(vf4;vf2;vf4;.. + 0x05, 0x00, 0x05, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....O...a_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // ........:...a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb9, 0x4d, 0x00, 0x00, // sition.......M.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, // ...._varying_... + 0x05, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ........$Global. + 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, // ewRect.......... + 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. + 0x06, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew.............. + 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... + 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ........u_proj.. + 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, // vProj........... + 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. + 0x06, 0x00, 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... + 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // ........u_model. + 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, // delView......... + 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP + 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj............. + 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, // u_alphaRef4..... + 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, // B............A.. + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_color0........ + 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ....a_color0.... + 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // .....?..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // on..........a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, // sition......@,.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // ....a_texcoord0. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m........8..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x76, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // v...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. + 0x05, 0x00, 0x0a, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // ........@entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // intOutput.v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4e, 0x03, 0x00, 0x00, // oord0...G...N... + 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ....@...H....... + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xbc, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........#....... + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... + 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ........G...B... + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, // ".......G....... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, // ........G....... + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, // ........G...v... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ + 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... + 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, // ................ + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, // ............!... + 0x71, 0x09, 0x00, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, // q............... + 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x8c, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ...?+........... + 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, // ....,........... + 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ................ + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // +............... + 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ,.......z....... + 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ + 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... + 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... + 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... + 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // N...e...j....... + 0xbc, 0x01, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x65, 0x00, 0x00, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...N...e...e... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ...9....... + 0xbc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // ....;...9...B... + 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, // ....+.......)... + 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // e... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, // ....;.......v... + 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. + 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... + 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........8...... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // =........A...... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // =........?...... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // =.......@,...... + 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....U...A..>... + 0x95, 0x38, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, // .8...?..>....... + 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, // @,..9.......I&.. + 0x16, 0x0e, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // .....U...8...... + 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >.......I&..A... + 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....T4.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, // =...........T4.. + 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...........A... + 0x9a, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // =....... ....@.. + 0x3e, 0x00, 0x03, 0x00, 0x76, 0x13, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...v... ...A... + 0x9a, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, // =........-...@.. + 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >........-...... + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, // 8...6........... + 0x00, 0x00, 0x00, 0x00, 0x71, 0x09, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....q...7....... + 0x4f, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, // O...7.......:... + 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7........M...... + 0x5f, 0x57, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // _W..;........... + 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x64, 0x2d, 0x00, 0x00, // ....A.......d-.. + 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x64, 0x2d, 0x00, 0x00, // ........>...d-.. + 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x0b, 0x38, 0x00, 0x00, // ....A........8.. + 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0b, 0x38, 0x00, 0x00, // ........>....8.. + 0x7a, 0x0b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, // z...=.......5b.. + 0x3a, 0x19, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x28, 0x3a, 0x00, 0x00, // :...Q.......(:.. + 0x35, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // 5b......Q....... + 0x9b, 0x46, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, // .F..5b......P... + 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0x28, 0x3a, 0x00, 0x00, 0x9b, 0x46, 0x00, 0x00, // .....2..(:...F.. + 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, // ........A....... + 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ),..B...)...=... + 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, // e....<..),...... + 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, // .....;...2...<.. + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x5f, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A......._8...... + 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x38, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, // ....>..._8...;.. + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, // =........!...M.. + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A.......-<...... + 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, // ....>...-<...!.. + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, // =........!..O... + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2e, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A........<...... + 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2e, 0x3c, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, // ....>....<...!.. + 0x3d, 0x00, 0x04, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // =.......G:...... + 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ....G:..8.... }; -static const uint8_t vs_font_basic_dx9[327] = +static const uint8_t vs_font_basic_dx9[329] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x24, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // $.......!.CTAB.. - 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, // modelViewProj... - 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs - 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( - 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, // ompiler 10.1.... - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, // ................ - 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... + 0x24, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, // $.........!.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, // Compiler 10.1.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ + 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ................ + 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ......U......... + 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, // ................ + 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, // ................ + 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... }; -static const uint8_t vs_font_basic_dx11[580] = +static const uint8_t vs_font_basic_dx11[582] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x18, 0x02, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, 0x48, 0x51, // ..DXBC.].....:HQ - 0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, // ...i.f.......... - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS - 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNh...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......V......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x5f, 0x00, // .............._. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, // ......COLOR.POSI - 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, // TION.TEXCOORD.OS - 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNl...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, // ..............b. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO - 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // N.COLOR.TEXCOORD - 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, // ..SHDR....@...@. - 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ..Y...F. ....... - 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, // .._..........._. - 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, // ..2......._..... - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......g.... .... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, // ......e.... .... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, // ..e.... ......h. - 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8......... - 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..V.......F. ... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, // ..F. ........... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F......... - 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, // ..F. .........6. - 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x1e, // ..6.... ......F. - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, // ......>......... - 0x10, 0x00, 0x40, 0x00, // ..@. + 0x18, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, // ....DXBC.].....: + 0x48, 0x51, 0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, // HQ...i.f........ + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, // ....,........... + 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNh........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........V....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // ................ + 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // _............... + 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, // SITION.TEXCOORD. + 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGNl........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // b............... + 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO + 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // RD..SHDR....@... + 0x40, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // @...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._........... + 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _...2......._... + 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // ........g.... .. + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // ........e.... .. + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....e.... ...... + 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, // h.......8....... + 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....V.......F. . + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ........2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... + 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ..... ......F... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....F. ......... + 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F... + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....6.... ...... + 0x46, 0x1e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, // F.......>....... + 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ....@. }; static const uint8_t vs_font_basic_mtl[790] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0xf1, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // ....using namesp 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc diff --git a/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h b/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h index 273d399..5970dbb 100644 --- a/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h +++ b/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_font_distance_field_glsl[431] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x8a, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color @@ -28,275 +28,272 @@ static const uint8_t vs_font_distance_field_glsl[431] = 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // d0;. v_color0 = 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... }; -static const uint8_t vs_font_distance_field_spv[3171] = +static const uint8_t vs_font_distance_field_spv[3133] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... - 0x40, 0x0c, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x36, 0x62, // @...#.........6b - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ - 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 - 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. - 0x00, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, // in.............. - 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ - 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x8c, 0x04, // ..main.......... - 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, // ..Output........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // ......gl_Positio - 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, // n.............v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, // color0.......... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ......v_texcoord - 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, // 0.........@main( - 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, // vf4;vf2;vf4;.... - 0x05, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ..O...a_color0.. - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ......:...a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0x61, 0x5f, // tion.......M..a_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, // texcoord0....... - 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, // .._varying_..... - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, // ......$Global... - 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x01, 0x00, // Rect............ - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, // ..u_viewTexel... - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xbc, 0x01, // invView......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ......u_proj.... - 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, // ..........u_invP - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, // roj............. - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ..u_viewProj.... - 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xbc, 0x01, // iewProj......... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, // ......u_model... - 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode - 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, // lView........... - 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ..u_modelViewPro - 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, // j.............u_ - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, // alphaRef4.....B. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x61, 0x5f, // ...........A..a_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, // color0.......... - 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..a_color0...... - 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // ...?..a_position - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ..........a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x61, 0x5f, // tion......@,..a_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, // texcoord0....... - 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..a_texcoord0... - 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, // ......flattenTem - 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // p......U..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......8..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ..........param. - 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, // ..........@entry - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, // PointOutput_gl_P - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x38, 0x04, // osition.......8. - 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, // ..Output......8. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ......v_color0.. - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, // ......8.......v_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, // texcoord0....... - 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, // ..@entryPointOut - 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x06, 0x00, // put...G...N..... - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x00, // ..@...H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#.......H..... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, // ..........#... . - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#...`...H..... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#.......H..... - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, // ..........#... . - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#...`...H..... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#.......H..... - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0b, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xbc, 0x01, // ..#... ...G..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, // ......G...B...". - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. - 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x1d, 0x00, // ................ - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x71, 0x09, // ..........!...q. - 0x00, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x8c, 0x04, // .. ............. - 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, // ..+............. - 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, // .?+............. - 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, // ..,............. - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. - 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x00, // ..............,. - 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, // ......z......... - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..........+..... - 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // ..............e. - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... - 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x4e, 0x03, // ..j... .......N. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xbc, 0x01, // ..e...j......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. - 0x00, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ..N...e...e..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xbc, 0x01, // .. ...9......... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, // ..;...9...B..... - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x0a, 0x00, // ..+.......)..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, // .. ...........e. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, // ..;............. - 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......8......... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x38, 0x04, // .. ...........8. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, // ..;............. - 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, // ..6............. - 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, // ..........Sa..;. - 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. - 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......U......;. - 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......8......;. - 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x3d, 0x00, // .......A......=. - 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, // .......?......=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, // ......@,......>. - 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x38, // ...U...A..>....8 - 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x40, 0x2c, // ...?..>.......@, - 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x16, 0x0e, // ..9.......I&.... - 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, // ...U...8......>. - 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ......I&..A..... - 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..T4..........=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, // ..........T4..>. - 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..........A..... - 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..'A..........=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x41, 0x00, // ..........'A..A. - 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0b, 0x0a, // .......N........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x41, 0x00, // ..>....N......A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, // .......M........ - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0xc1, 0x4d, // ..=............M - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xcd, 0x0f, // ..A............. - 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xe0, 0x1c, // ......>......... - 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x8c, 0x04, // ......8...6..... - 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x09, 0x00, 0x00, 0x37, 0x00, // ..........q...7. - 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......O...7..... - 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb9, 0x4d, // ..:...7........M - 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x5f, 0x57, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, // ......_W..;..... - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..........A..... - 0x00, 0x00, 0x64, 0x2d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ..d-..........>. - 0x03, 0x00, 0x64, 0x2d, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..d-......A..... - 0x00, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ...8..........>. - 0x03, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ...8..z...=..... - 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..5b..:...Q..... - 0x00, 0x00, 0x28, 0x3a, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, // ..(:..5b......Q. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9b, 0x46, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x01, 0x00, // .......F..5b.... - 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0x28, 0x3a, // ..P........2..(: - 0x00, 0x00, 0x9b, 0x46, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, // ...F..........A. - 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, // ......),..B...). - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x29, 0x2c, // ..=...e....<..), - 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x84, 0x32, // ...........;...2 - 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x5f, 0x38, // ...<..A......._8 - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x38, // ..........>..._8 - 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x21, // ...;..=........! - 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2d, 0x3c, // ...M..A.......-< - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2d, 0x3c, // ..........>...-< - 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x21, // ...!..=........! - 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2e, 0x3c, // ..O...A........< - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2e, 0x3c, // ..........>....< - 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x47, 0x3a, // ...!..=.......G: - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x38, 0x00, // ..........G:..8. - 0x01, 0x00, 0x00, // ... + 0x18, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, // ......#......... + 0x36, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // 6b.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // main............ + 0x95, 0x0e, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........v....... + 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ + 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....main........ + 0x8c, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....Output...... + 0x8c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // ........gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ion............. + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // v_color0........ + 0x8c, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ........v_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // rd0.........@mai + 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // n(vf4;vf2;vf4;.. + 0x05, 0x00, 0x05, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....O...a_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // ........:...a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb9, 0x4d, 0x00, 0x00, // sition.......M.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, // ...._varying_... + 0x05, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ........$Global. + 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, // ewRect.......... + 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. + 0x06, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew.............. + 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... + 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ........u_proj.. + 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, // vProj........... + 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. + 0x06, 0x00, 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... + 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // ........u_model. + 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, // delView......... + 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP + 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj............. + 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, // u_alphaRef4..... + 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, // B............A.. + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_color0........ + 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ....a_color0.... + 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // .....?..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // on..........a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, // sition......@,.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // ....a_texcoord0. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m........8..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x76, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // v...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. + 0x05, 0x00, 0x0a, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // ........@entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // intOutput.v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4e, 0x03, 0x00, 0x00, // oord0...G...N... + 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ....@...H....... + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xbc, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........#....... + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... + 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ........G...B... + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, // ".......G....... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, // ........G....... + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, // ........G...v... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ + 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... + 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, // ................ + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, // ............!... + 0x71, 0x09, 0x00, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, // q............... + 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x8c, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ...?+........... + 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, // ....,........... + 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ................ + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // +............... + 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ,.......z....... + 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ + 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... + 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... + 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... + 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // N...e...j....... + 0xbc, 0x01, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x65, 0x00, 0x00, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...N...e...e... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ...9....... + 0xbc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // ....;...9...B... + 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, // ....+.......)... + 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // e... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, // ....;.......v... + 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. + 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... + 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........8...... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // =........A...... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // =........?...... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // =.......@,...... + 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....U...A..>... + 0x95, 0x38, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, // .8...?..>....... + 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, // @,..9.......I&.. + 0x16, 0x0e, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // .....U...8...... + 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >.......I&..A... + 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....T4.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, // =...........T4.. + 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...........A... + 0x9a, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // =....... ....@.. + 0x3e, 0x00, 0x03, 0x00, 0x76, 0x13, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...v... ...A... + 0x9a, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, // =........-...@.. + 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >........-...... + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, // 8...6........... + 0x00, 0x00, 0x00, 0x00, 0x71, 0x09, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....q...7....... + 0x4f, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, // O...7.......:... + 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7........M...... + 0x5f, 0x57, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // _W..;........... + 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x64, 0x2d, 0x00, 0x00, // ....A.......d-.. + 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x64, 0x2d, 0x00, 0x00, // ........>...d-.. + 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x0b, 0x38, 0x00, 0x00, // ....A........8.. + 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0b, 0x38, 0x00, 0x00, // ........>....8.. + 0x7a, 0x0b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, // z...=.......5b.. + 0x3a, 0x19, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x28, 0x3a, 0x00, 0x00, // :...Q.......(:.. + 0x35, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // 5b......Q....... + 0x9b, 0x46, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, // .F..5b......P... + 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0x28, 0x3a, 0x00, 0x00, 0x9b, 0x46, 0x00, 0x00, // .....2..(:...F.. + 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, // ........A....... + 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ),..B...)...=... + 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, // e....<..),...... + 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, // .....;...2...<.. + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x5f, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A......._8...... + 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x38, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, // ....>..._8...;.. + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, // =........!...M.. + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A.......-<...... + 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, // ....>...-<...!.. + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, // =........!..O... + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2e, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A........<...... + 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2e, 0x3c, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, // ....>....<...!.. + 0x3d, 0x00, 0x04, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // =.......G:...... + 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ....G:..8.... }; -static const uint8_t vs_font_distance_field_dx9[327] = +static const uint8_t vs_font_distance_field_dx9[329] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x24, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // $.......!.CTAB.. - 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, // modelViewProj... - 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs - 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( - 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, // ompiler 10.1.... - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, // ................ - 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... + 0x24, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, // $.........!.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, // Compiler 10.1.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ + 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ................ + 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ......U......... + 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, // ................ + 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, // ................ + 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... }; -static const uint8_t vs_font_distance_field_dx11[580] = +static const uint8_t vs_font_distance_field_dx11[582] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x18, 0x02, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, 0x48, 0x51, // ..DXBC.].....:HQ - 0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, // ...i.f.......... - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS - 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNh...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......V......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x5f, 0x00, // .............._. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, // ......COLOR.POSI - 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, // TION.TEXCOORD.OS - 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNl...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, // ..............b. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO - 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // N.COLOR.TEXCOORD - 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, // ..SHDR....@...@. - 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ..Y...F. ....... - 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, // .._..........._. - 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, // ..2......._..... - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......g.... .... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, // ......e.... .... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, // ..e.... ......h. - 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8......... - 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..V.......F. ... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, // ..F. ........... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F......... - 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, // ..F. .........6. - 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x1e, // ..6.... ......F. - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, // ......>......... - 0x10, 0x00, 0x40, 0x00, // ..@. + 0x18, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, // ....DXBC.].....: + 0x48, 0x51, 0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, // HQ...i.f........ + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, // ....,........... + 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNh........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........V....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // ................ + 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // _............... + 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, // SITION.TEXCOORD. + 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGNl........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // b............... + 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO + 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // RD..SHDR....@... + 0x40, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // @...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._........... + 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _...2......._... + 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // ........g.... .. + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // ........e.... .. + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....e.... ...... + 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, // h.......8....... + 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....V.......F. . + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ........2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... + 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ..... ......F... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....F. ......... + 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F... + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....6.... ...... + 0x46, 0x1e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, // F.......>....... + 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ....@. }; static const uint8_t vs_font_distance_field_mtl[790] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0xf1, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // ....using namesp 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc diff --git a/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h b/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h index fecf290..bef4868 100644 --- a/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h +++ b/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_font_distance_field_subpixel_glsl[431] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x8a, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color @@ -28,275 +28,272 @@ static const uint8_t vs_font_distance_field_subpixel_glsl[431] = 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // d0;. v_color0 = 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... }; -static const uint8_t vs_font_distance_field_subpixel_spv[3171] = +static const uint8_t vs_font_distance_field_subpixel_spv[3133] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... - 0x40, 0x0c, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x36, 0x62, // @...#.........6b - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ - 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 - 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. - 0x00, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, // in.............. - 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ - 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x8c, 0x04, // ..main.......... - 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, // ..Output........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // ......gl_Positio - 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, // n.............v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, // color0.......... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ......v_texcoord - 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, // 0.........@main( - 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, // vf4;vf2;vf4;.... - 0x05, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ..O...a_color0.. - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ......:...a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0x61, 0x5f, // tion.......M..a_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, // texcoord0....... - 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, // .._varying_..... - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, // ......$Global... - 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x01, 0x00, // Rect............ - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, // ..u_viewTexel... - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xbc, 0x01, // invView......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ......u_proj.... - 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, // ..........u_invP - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, // roj............. - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ..u_viewProj.... - 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xbc, 0x01, // iewProj......... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, // ......u_model... - 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode - 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, // lView........... - 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ..u_modelViewPro - 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, // j.............u_ - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, // alphaRef4.....B. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x61, 0x5f, // ...........A..a_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, // color0.......... - 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..a_color0...... - 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // ...?..a_position - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ..........a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x61, 0x5f, // tion......@,..a_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, // texcoord0....... - 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..a_texcoord0... - 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, // ......flattenTem - 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // p......U..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......8..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ..........param. - 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, // ..........@entry - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, // PointOutput_gl_P - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x38, 0x04, // osition.......8. - 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, // ..Output......8. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ......v_color0.. - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, // ......8.......v_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, // texcoord0....... - 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, // ..@entryPointOut - 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x06, 0x00, // put...G...N..... - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x00, // ..@...H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#.......H..... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, // ..........#... . - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#...`...H..... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#.......H..... - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, // ..........#... . - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#...`...H..... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, // ..#.......H..... - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0b, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xbc, 0x01, // ..#... ...G..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, // ......G...B...". - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, // ......G......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. - 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x1d, 0x00, // ................ - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x71, 0x09, // ..........!...q. - 0x00, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x8c, 0x04, // .. ............. - 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, // ..+............. - 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, // .?+............. - 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, // ..,............. - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. - 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x00, // ..............,. - 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, // ......z......... - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..........+..... - 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // ..............e. - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... - 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x4e, 0x03, // ..j... .......N. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xbc, 0x01, // ..e...j......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. - 0x00, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ..N...e...e..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xbc, 0x01, // .. ...9......... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, // ..;...9...B..... - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x0a, 0x00, // ..+.......)..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, // .. ...........e. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, // ..;............. - 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......8......... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x38, 0x04, // .. ...........8. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, // ..;............. - 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, // ..6............. - 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, // ..........Sa..;. - 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. - 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......U......;. - 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......8......;. - 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x3d, 0x00, // .......A......=. - 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, // .......?......=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, // ......@,......>. - 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x38, // ...U...A..>....8 - 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x40, 0x2c, // ...?..>.......@, - 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x16, 0x0e, // ..9.......I&.... - 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, // ...U...8......>. - 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ......I&..A..... - 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..T4..........=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, // ..........T4..>. - 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..........A..... - 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..'A..........=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x41, 0x00, // ..........'A..A. - 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0b, 0x0a, // .......N........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x41, 0x00, // ..>....N......A. - 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, // .......M........ - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0xc1, 0x4d, // ..=............M - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xcd, 0x0f, // ..A............. - 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xe0, 0x1c, // ......>......... - 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x8c, 0x04, // ......8...6..... - 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x09, 0x00, 0x00, 0x37, 0x00, // ..........q...7. - 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......O...7..... - 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb9, 0x4d, // ..:...7........M - 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x5f, 0x57, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, // ......_W..;..... - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..........A..... - 0x00, 0x00, 0x64, 0x2d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ..d-..........>. - 0x03, 0x00, 0x64, 0x2d, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..d-......A..... - 0x00, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ...8..........>. - 0x03, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ...8..z...=..... - 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..5b..:...Q..... - 0x00, 0x00, 0x28, 0x3a, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, // ..(:..5b......Q. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9b, 0x46, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x01, 0x00, // .......F..5b.... - 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0x28, 0x3a, // ..P........2..(: - 0x00, 0x00, 0x9b, 0x46, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, // ...F..........A. - 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, // ......),..B...). - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x29, 0x2c, // ..=...e....<..), - 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x84, 0x32, // ...........;...2 - 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x5f, 0x38, // ...<..A......._8 - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x38, // ..........>..._8 - 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x21, // ...;..=........! - 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2d, 0x3c, // ...M..A.......-< - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2d, 0x3c, // ..........>...-< - 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x21, // ...!..=........! - 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2e, 0x3c, // ..O...A........< - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2e, 0x3c, // ..........>....< - 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x47, 0x3a, // ...!..=.......G: - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x38, 0x00, // ..........G:..8. - 0x01, 0x00, 0x00, // ... + 0x18, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, // ......#......... + 0x36, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // 6b.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // main............ + 0x95, 0x0e, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........v....... + 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ + 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....main........ + 0x8c, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....Output...... + 0x8c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // ........gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ion............. + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // v_color0........ + 0x8c, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ........v_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // rd0.........@mai + 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // n(vf4;vf2;vf4;.. + 0x05, 0x00, 0x05, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....O...a_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // ........:...a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb9, 0x4d, 0x00, 0x00, // sition.......M.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, // ...._varying_... + 0x05, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ........$Global. + 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, // ewRect.......... + 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. + 0x06, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew.............. + 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... + 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ........u_proj.. + 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, // vProj........... + 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. + 0x06, 0x00, 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... + 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // ........u_model. + 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xbc, 0x01, 0x00, 0x00, // delView......... + 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP + 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj............. + 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, // u_alphaRef4..... + 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, // B............A.. + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_color0........ + 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ....a_color0.... + 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // .....?..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // on..........a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, // sition......@,.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // ....a_texcoord0. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m........8..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x76, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // v...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. + 0x05, 0x00, 0x0a, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // ........@entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // intOutput.v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4e, 0x03, 0x00, 0x00, // oord0...G...N... + 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ....@...H....... + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xbc, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........#....... + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0xbc, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xbc, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0xbc, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xbc, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xbc, 0x01, 0x00, 0x00, // ........H....... + 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... + 0xbc, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ........G...B... + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, // ".......G....... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, // ........G....... + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, // ........G...v... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ + 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... + 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, // ................ + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, // ............!... + 0x71, 0x09, 0x00, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, // q............... + 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x8c, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ...?+........... + 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, // ....,........... + 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ................ + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // +............... + 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ,.......z....... + 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ + 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... + 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... + 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... + 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // N...e...j....... + 0xbc, 0x01, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x65, 0x00, 0x00, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...N...e...e... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ...9....... + 0xbc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x39, 0x04, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // ....;...9...B... + 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, // ....+.......)... + 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // e... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, // ....;.......v... + 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. + 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... + 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........8...... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // =........A...... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // =........?...... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // =.......@,...... + 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....U...A..>... + 0x95, 0x38, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, // .8...?..>....... + 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, // @,..9.......I&.. + 0x16, 0x0e, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // .....U...8...... + 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >.......I&..A... + 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....T4.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, // =...........T4.. + 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...........A... + 0x9a, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // =....... ....@.. + 0x3e, 0x00, 0x03, 0x00, 0x76, 0x13, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...v... ...A... + 0x9a, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, // =........-...@.. + 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >........-...... + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, // 8...6........... + 0x00, 0x00, 0x00, 0x00, 0x71, 0x09, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....q...7....... + 0x4f, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, // O...7.......:... + 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7........M...... + 0x5f, 0x57, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // _W..;........... + 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x64, 0x2d, 0x00, 0x00, // ....A.......d-.. + 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x64, 0x2d, 0x00, 0x00, // ........>...d-.. + 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x0b, 0x38, 0x00, 0x00, // ....A........8.. + 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0b, 0x38, 0x00, 0x00, // ........>....8.. + 0x7a, 0x0b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, // z...=.......5b.. + 0x3a, 0x19, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x28, 0x3a, 0x00, 0x00, // :...Q.......(:.. + 0x35, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // 5b......Q....... + 0x9b, 0x46, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, // .F..5b......P... + 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0x28, 0x3a, 0x00, 0x00, 0x9b, 0x46, 0x00, 0x00, // .....2..(:...F.. + 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, // ........A....... + 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ),..B...)...=... + 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, // e....<..),...... + 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, // .....;...2...<.. + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x5f, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A......._8...... + 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x38, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, // ....>..._8...;.. + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, // =........!...M.. + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A.......-<...... + 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, // ....>...-<...!.. + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, // =........!..O... + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2e, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A........<...... + 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2e, 0x3c, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, // ....>....<...!.. + 0x3d, 0x00, 0x04, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // =.......G:...... + 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ....G:..8.... }; -static const uint8_t vs_font_distance_field_subpixel_dx9[327] = +static const uint8_t vs_font_distance_field_subpixel_dx9[329] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x24, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // $.......!.CTAB.. - 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, // modelViewProj... - 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs - 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( - 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, // ompiler 10.1.... - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, // ................ - 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... + 0x24, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, // $.........!.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, // Compiler 10.1.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ + 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ................ + 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ......U......... + 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, // ................ + 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, // ................ + 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... }; -static const uint8_t vs_font_distance_field_subpixel_dx11[580] = +static const uint8_t vs_font_distance_field_subpixel_dx11[582] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x18, 0x02, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, 0x48, 0x51, // ..DXBC.].....:HQ - 0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, // ...i.f.......... - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS - 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNh...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......V......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x5f, 0x00, // .............._. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, // ......COLOR.POSI - 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, // TION.TEXCOORD.OS - 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNl...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, // ..............b. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO - 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // N.COLOR.TEXCOORD - 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, // ..SHDR....@...@. - 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ..Y...F. ....... - 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, // .._..........._. - 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, // ..2......._..... - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......g.... .... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, // ......e.... .... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, // ..e.... ......h. - 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8......... - 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..V.......F. ... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, // ..F. ........... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F......... - 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, // ..F. .........6. - 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x1e, // ..6.... ......F. - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, // ......>......... - 0x10, 0x00, 0x40, 0x00, // ..@. + 0x18, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xe3, 0x5d, 0xf0, 0xa8, 0xb3, 0x95, 0xec, 0x3a, // ....DXBC.].....: + 0x48, 0x51, 0xb3, 0xab, 0xaf, 0x69, 0xf9, 0x66, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, // HQ...i.f........ + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, // ....,........... + 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNh........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........V....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // ................ + 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // _............... + 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, // SITION.TEXCOORD. + 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGNl........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // b............... + 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO + 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // RD..SHDR....@... + 0x40, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // @...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._........... + 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _...2......._... + 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // ........g.... .. + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // ........e.... .. + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....e.... ...... + 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, // h.......8....... + 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....V.......F. . + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ........2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... + 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ..... ......F... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....F. ......... + 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F... + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....6.... ...... + 0x46, 0x1e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, // F.......>....... + 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ....@. }; static const uint8_t vs_font_distance_field_subpixel_mtl[790] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0xf1, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // ....using namesp 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h index 9cad96b..f4384d5 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h @@ -1,180 +1,180 @@ static const uint8_t fs_imgui_color_glsl[89] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I..J...va + 0x46, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I..J...va 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // v_color0;.void 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, // main ().{. gl_F 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // ragColor = v_col 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // or0;.}... }; -static const uint8_t fs_imgui_color_spv[2065] = +static const uint8_t fs_imgui_color_spv[2079] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x04, 0x08, 0x03, 0x02, 0x23, 0x07, // FSH....I......#. - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x7a, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........za...... - 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, // GLSL.std.450.... - 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, // ........main.... - 0x77, 0x0e, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, // w............... - 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, // ............main - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, // ........5...vec4 - 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, // _splat(f1;...... - 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xff, 0x0f, 0x00, 0x00, // ...._x.......... - 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // @main(vf4;vf4;.. - 0x05, 0x00, 0x05, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....O0..v_color0 - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa2, 0x25, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // .........%..gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ragData_0_...... - 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, // ....bgfx_VoidFra - 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // g.......,N..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, // m........@..v_co - 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, // lor0........w... - 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // v_color0........ - 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // ....gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // 0_.......G..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // m...........gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ragData_0_...... - 0xc7, 0x02, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, // ....$Global..... - 0xc7, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, // ........u_viewRe - 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ct.............. - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, // u_viewTexel..... - 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, // ........u_view.. - 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in - 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // vView........... - 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_proj...... - 0xc7, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, // ........u_invPro - 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // j............... - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, // u_viewProj...... - 0xc7, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ........u_invVie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // wProj........... - 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_model..... - 0xc7, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // ........u_modelV - 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // iew............. - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. - 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, // ............u_al - 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, // phaRef4.G...w... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ........G....... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xf0, 0x06, 0x00, 0x00, // ........G....... - 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ....@...H....... - 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xc7, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........#....... - 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... - 0xc7, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xc7, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... - 0xc7, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xc7, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, // ........H....... - 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... - 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ - 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... - 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, // .... ... ....... - 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, // ........!....... - 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... - 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x3d, 0x0b, 0x00, 0x00, // ........!...=... - 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ....w....... ... - 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ - 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... - 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... - 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... - 0xf0, 0x06, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // ....e...j....... - 0xc7, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... - 0x65, 0x00, 0x00, 0x00, 0xf0, 0x06, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e.......e...e... - 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... - 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. - 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........G...... - 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... - 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, // =........@..w... - 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, // >....G...@..9... - 0x08, 0x00, 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, // ....ya.......G.. - 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, // ....=........... - 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, // ....>........... - 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....8...6....... - 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 5...........7... - 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, 0x00, // ................ - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // =.......dW...... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // =........N...... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // =.......I9...... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // =........9...... - 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, // P........*..dW.. - 0xa9, 0x4e, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, // .N..I9...9...... - 0xb0, 0x2a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, // .*..8...6....... - 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // ........=...7... - 0x9a, 0x02, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....O0..7....... - 0xa2, 0x25, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xee, 0x5f, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .%......._..;... - 0x8a, 0x02, 0x00, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ....,N......>... - 0x2c, 0x4e, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // ,N......9....... - 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....5...,N..=... - 0x1d, 0x00, 0x00, 0x00, 0x58, 0x5b, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ....X[..O0..>... - 0xa2, 0x25, 0x00, 0x00, 0x58, 0x5b, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // .%..X[......8... - 0x00, // . + 0x46, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x03, 0x02, // FSH....I........ + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x7a, 0x61, 0x00, 0x00, 0x00, 0x00, // #.........za.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, // ..w............. + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, // ................ + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, // ......5...vec4_s + 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, // plat(f1;........ + 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x40, 0x6d, // .._x..........@m + 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, // ain(vf4;vf4;.... + 0x05, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ..O0..v_color0.. + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa2, 0x25, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // .......%..gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, // gData_0_........ + 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, // ..bgfx_VoidFrag. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ......,N..param. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .......@..v_colo + 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, // r0........w...v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, // color0.......... + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......G..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ..........param. + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // ..........gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc7, 0x02, // gData_0_........ + 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, // ..$Global....... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, // ......u_viewRect + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc7, 0x02, // viewTexel....... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, // ......u_view.... + 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV + 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, // iew............. + 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, // ..u_proj........ + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, // ......u_invProj. + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xc7, 0x02, // viewProj........ + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, // ......u_invViewP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, // roj............. + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc7, 0x02, // ..u_model....... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie + 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, // w.............u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, // modelViewProj... + 0x06, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, // ..........u_alph + 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, // aRef4.G...w..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, // ......G......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xf0, 0x06, 0x00, 0x00, 0x06, 0x00, // ......G......... + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x00, 0x00, // ..@...H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, // ..#.......H..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x03, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x03, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, // ..#...`...H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, // ..#.......H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x07, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x07, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, // ..#...`...H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, // ..#.......H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc7, 0x02, 0x00, 0x00, 0x0b, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xc7, 0x02, // ..#... ...G..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, // .. ... ......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......!......... + 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x3d, 0x0b, 0x00, 0x00, 0x08, 0x00, // ......!...=..... + 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, // .......... ..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, // ..........;..... + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, // ..w....... ..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, // ..........;..... + 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // ..............e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... + 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xf0, 0x06, // ..j... ......... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xc7, 0x02, // ..e...j......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0xf0, 0x06, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......e...e..... + 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, // ..........Sa..;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......G......;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3e, 0x00, // .......@..w...>. + 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xbf, 0x40, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x08, 0x00, // ...G...@..9..... + 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x9a, 0x16, // ..ya.......G.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, // ..=............. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, // ..>............. + 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, // ..8...6.......5. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, // ..........7..... + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, 0x00, 0x3d, 0x00, // ..............=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, // ......dW......=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, // .......N......=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, // ......I9......=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, // .......9......P. + 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xa9, 0x4e, // .......*..dW...N + 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xb0, 0x2a, // ..I9...9.......* + 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xff, 0x0f, // ..8...6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, // ......=...7..... + 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa2, 0x25, // ..O0..7........% + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xee, 0x5f, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, // ......._..;..... + 0x00, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2c, 0x4e, // ..,N......>...,N + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, // ......9......... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..5...,N..=..... + 0x00, 0x00, 0x58, 0x5b, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa2, 0x25, // ..X[..O0..>....% + 0x00, 0x00, 0x58, 0x5b, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..X[......8.... }; -static const uint8_t fs_imgui_color_dx9[129] = +static const uint8_t fs_imgui_color_dx9[131] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x74, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..t..... - 0xfe, 0xff, 0x14, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... - 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ - 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro - 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 - 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // .1.............. - 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, // ................ - 0x00, // . + 0x46, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x03, // FSH....I..t..... + 0xff, 0xff, 0xfe, 0xff, 0x14, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, // ......CTAB....#. + 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ + 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......ps_3_0.Mic + 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler + 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // 10.1............ + 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; -static const uint8_t fs_imgui_color_dx11[260] = +static const uint8_t fs_imgui_color_dx11[262] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xf4, 0x00, 0x44, 0x58, 0x42, 0x43, // FSH....I....DXBC - 0xa6, 0x7f, 0x08, 0xe2, 0x95, 0xbd, 0x5f, 0xa3, 0x3f, 0x5b, 0x58, 0x8e, 0x54, 0x0f, 0x89, 0x67, // ......_.?[X.T..g - 0x01, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,... - 0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // ........ISGNL... - 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8....... - 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ - 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // D............... - 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT - 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // ION.COLOR...OSGN - 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET... - 0x53, 0x48, 0x44, 0x52, 0x38, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, // SHDR8...@....... - 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, // b...........e... - 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // . ......6.... .. - 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>... - 0x00, 0x00, 0x00, 0x00, // .... + 0x46, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x44, 0x58, // FSH....I......DX + 0x42, 0x43, 0xa6, 0x7f, 0x08, 0xe2, 0x95, 0xbd, 0x5f, 0xa3, 0x3f, 0x5b, 0x58, 0x8e, 0x54, 0x0f, // BC......_.?[X.T. + 0x89, 0x67, 0x01, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // .g............,. + 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, // ..........ISGNL. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........8..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ..D............. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, // ..........SV_POS + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x4f, 0x53, // ITION.COLOR...OS + 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET. + 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x38, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x0e, 0x00, // ..SHDR8...@..... + 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, // ..b...........e. + 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, // ... ......6.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, // ......F.......>. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ...... }; static const uint8_t fs_imgui_color_mtl[404] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x85, 0x01, 0x00, 0x00, 0x75, 0x73, // FSH....I......us + 0x46, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x85, 0x01, 0x00, 0x00, 0x75, 0x73, // FSH....I......us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.sc b/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.sc index 19f8692..0b13177 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.sc +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.sc @@ -1,7 +1,7 @@ $input v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h index d0d5acf..29b5766 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_imgui_cubemap_glsl[363] = { - 0x46, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima + 0x46, 0x53, 0x48, 0x05, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor... 0x00, 0x01, 0x00, 0x33, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...3...varying h @@ -24,295 +24,302 @@ static const uint8_t fs_imgui_cubemap_glsl[363] = 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_1;.}... }; -static const uint8_t fs_imgui_cubemap_spv[3585] = +static const uint8_t fs_imgui_cubemap_spv[3707] = { - 0x46, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima + 0x46, 0x53, 0x48, 0x05, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, // geLodEnabled.... - 0x01, 0x00, 0xdc, 0x0d, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, // ......#......... - 0x8e, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // .a.............. - 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std - 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ - 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ - 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x34, 0x0e, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, // main....4....... - 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ - 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....main........ - 0x67, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, // g...BgfxSamplerC - 0x75, 0x62, 0x65, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ube.....g....... - 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // m_sampler....... - 0x67, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // g.......m_textur - 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x11, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, // e...........bgfx - 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x28, 0x73, // TextureCubeLod(s - 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, // truct-BgfxSample - 0x72, 0x43, 0x75, 0x62, 0x65, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, // rCube-p1-tC11;vf - 0x33, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, // 3;f1;.......'... - 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // _sampler........ - 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ...._coord...... - 0x2e, 0x12, 0x00, 0x00, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ...._level...... - 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, // 5...vec4_splat(f - 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, // 1;.........._x.. - 0x05, 0x00, 0x06, 0x00, 0x9e, 0x16, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, // ........@main(vf - 0x33, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x32, 0x00, 0x00, // 3;vf4;.......2.. - 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // v_normal........ - 0x02, 0x25, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // .%..gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // 0_......C...s_te - 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, // xColor.......... - 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, // s_texColorSample - 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // r...........s_te - 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, // xColorTexture... - 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, // ........bgfx_Voi - 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, // dFrag........T.. - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, // param........... - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xa5, 0x09, 0x00, 0x00, // color........... - 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa5, 0x09, 0x00, 0x00, // $Global......... - 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, // ....u_viewRect.. - 0x06, 0x00, 0x06, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi - 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, // ewTexel......... - 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_view...... - 0xa5, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ........u_invVie - 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // w............... - 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa5, 0x09, 0x00, 0x00, // u_proj.......... - 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // ....u_invProj... - 0x06, 0x00, 0x06, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi - 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xa5, 0x09, 0x00, 0x00, // ewProj.......... - 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ....u_invViewPro - 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // j............... - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa5, 0x09, 0x00, 0x00, // u_model......... - 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, // ....u_modelView. - 0x06, 0x00, 0x07, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo - 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, // delViewProj..... - 0xa5, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, // ........u_alphaR - 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, // ef4............. - 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, // u_imageLodEnable - 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // d.......B....... - 0x05, 0x00, 0x04, 0x00, 0x45, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // ....EN..param... - 0x05, 0x00, 0x04, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // ........param... - 0x05, 0x00, 0x04, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, // ........alpha... - 0x05, 0x00, 0x05, 0x00, 0xee, 0x40, 0x00, 0x00, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, // .....@..v_normal - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x34, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x6e, 0x6f, // ........4...v_no - 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, // rmal............ - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, // gl_FragData_0_.. - 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // .....G..param... - 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // ........param... - 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // ........gl_FragD - 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, // ata_0_..G....... - 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, // ".......G....... - 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, // !.......G....... - 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, // ".......G....... - 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xce, 0x02, 0x00, 0x00, // !.......G....... - 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, // ....@...H....... - 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xa5, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........#....... - 0x48, 0x00, 0x04, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa5, 0x09, 0x00, 0x00, // ........H....... - 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, // ........H....... - 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... - 0xa5, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa5, 0x09, 0x00, 0x00, // ........H....... - 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, // ........H....... - 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xa5, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa5, 0x09, 0x00, 0x00, // ........H....... - 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, // ........H....... - 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... - 0xa5, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa5, 0x09, 0x00, 0x00, // ........H....... - 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, // ........H....... - 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xa5, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa5, 0x09, 0x00, 0x00, // ........H....... - 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... - 0xa5, 0x09, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, // ........#...0... - 0x47, 0x00, 0x03, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // G...........G... - 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // B...".......G... - 0x34, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // 4...........G... - 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, // ................ - 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....!........... - 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ - 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x98, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ............... - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, // ............g... - 0xfc, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, // ........ ...!... - 0x00, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // ....g........... - 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // ........ ....... - 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........ ....... - 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xaf, 0x04, 0x00, 0x00, // ........!....... - 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, // ....!........... - 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, // !............... - 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... - 0x21, 0x00, 0x05, 0x00, 0x2e, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, // !............... - 0x9a, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, // ....;...!...C... - 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ...y....... - 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, // ....;...y....... - 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ........... - 0x98, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, // ....;........... - 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... - 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....+........... - 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, // ................ - 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... - 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....e........... - 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ....... - 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // +.......j... ... - 0x1c, 0x00, 0x04, 0x00, 0xce, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, // ........e...j... - 0x1e, 0x00, 0x0f, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ................ - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xce, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e.......e... - 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // e........... ... - 0x5f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa5, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // _...........;... - 0x5f, 0x00, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // _...B.......+... - 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ..../.......+... - 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0d, 0x00, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x2b, 0x00, 0x04, 0x00, // ..........L>+... - 0x0d, 0x00, 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x2b, 0x00, 0x04, 0x00, // ....!.....L?+... - 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x96, 0x02, 0x00, 0x00, 0x34, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ....4....... ... - 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x9b, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, // ............6... - 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // ....Sa..;....... - 0xef, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // .G......;....... - 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, // ........=....... - 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, // !C......=....... - 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, 0x00, 0x00, // .3......P...g... - 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // . ..!C...3..>... - 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // C.... ..=....... - 0xee, 0x40, 0x00, 0x00, 0x34, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, // .@..4...>....G.. - 0xee, 0x40, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, // .@..9.......ya.. - 0x9e, 0x16, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....G......=... - 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ............>... - 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // ............8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0xaf, 0x04, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // ....7...!...'... - 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7...........7... - 0x8a, 0x02, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, // ............$T.. - 0x41, 0x00, 0x05, 0x00, 0x15, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // A...........'... - 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, // ....=.......m).. - 0xc0, 0x1c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x79, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, // ....A...y....U.. - 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, // '.......=....... - 0xf2, 0x4e, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, // .N...U..V....... - 0x32, 0x39, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // 29..m)...N..=... - 0x18, 0x00, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ............=... - 0x0d, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, // ....=>......X... - 0x1d, 0x00, 0x00, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, // ........29...... - 0x02, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, // ....=>.......... - 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, // 8...6.......5... - 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........7....... - 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2e, 0x5f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ........._..=... - 0x0d, 0x00, 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....[......=... - 0x0d, 0x00, 0x00, 0x00, 0x25, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....%S......=... - 0x0d, 0x00, 0x00, 0x00, 0xc5, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....=......=... - 0x0d, 0x00, 0x00, 0x00, 0xd8, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, // .....=......P... - 0x1d, 0x00, 0x00, 0x00, 0x56, 0x5b, 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0x25, 0x53, 0x00, 0x00, // ....V[...[..%S.. - 0xc5, 0x3d, 0x00, 0x00, 0xd8, 0x3d, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x56, 0x5b, 0x00, 0x00, // .=...=......V[.. - 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9e, 0x16, 0x00, 0x00, // 8...6........... - 0x00, 0x00, 0x00, 0x00, 0x2e, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, // ........7....... - 0x95, 0x32, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x02, 0x25, 0x00, 0x00, // .2..7........%.. - 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........;....... - 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // .T......;....... - 0x45, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, // EN......;....... - 0xc9, 0x2e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, // ........>....T.. - 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, // ....9........... - 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // 5....T..=....... - 0xe0, 0x51, 0x00, 0x00, 0x95, 0x32, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x45, 0x4e, 0x00, 0x00, // .Q...2..>...EN.. - 0xe0, 0x51, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x75, 0x39, 0x00, 0x00, // .Q..A.......u9.. - 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // B.../.......=... - 0x0d, 0x00, 0x00, 0x00, 0x8d, 0x61, 0x00, 0x00, 0x75, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .....a..u9..>... - 0xc9, 0x2e, 0x00, 0x00, 0x8d, 0x61, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // .....a..9....... - 0x0f, 0x4e, 0x00, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, // .N......C...EN.. - 0xc9, 0x2e, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, // ....O........... - 0x0f, 0x4e, 0x00, 0x00, 0x0f, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .N...N.......... - 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x6b, 0x20, 0x00, 0x00, // ....A.......k .. - 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // B.../.......=... - 0x0d, 0x00, 0x00, 0x00, 0xa3, 0x46, 0x00, 0x00, 0x6b, 0x20, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, // .....F..k ...... - 0x0d, 0x00, 0x00, 0x00, 0xe2, 0x3b, 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, 0xa3, 0x46, 0x00, 0x00, // .....;..!....F.. - 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, // ................ - 0xe2, 0x3b, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x22, 0x00, 0x00, // .;..Q........".. - 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........Q....... - 0x7b, 0x2f, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // {/..........Q... - 0x0d, 0x00, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....6`.......... - 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0x01, 0x22, 0x00, 0x00, // P........P...".. - 0x7b, 0x2f, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // {/..6`......>... - 0x02, 0x25, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // .%...P......8... - 0x00, // . + 0x01, 0x00, 0x54, 0x0e, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, // ..T.....#....... + 0x08, 0x00, 0x8e, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, // ...a............ + 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, // ..........GLSL.s + 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, // td.450.......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x34, 0x0e, 0x00, 0x00, 0xd1, 0x0d, // ..main....4..... + 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x67, 0x09, // ..main........g. + 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, // ..BgfxSamplerCub + 0x65, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, // e.....g.......m_ + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, // sampler.......g. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, // ......m_texture. + 0x00, 0x00, 0x05, 0x00, 0x11, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, // ..........bgfxTe + 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, // xtureCubeLod(str + 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, // uct-BgfxSamplerC + 0x75, 0x62, 0x65, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, // ube-p1-tC11;vf3; + 0x66, 0x31, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, // f1;.......'..._s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, // ampler.......... + 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, // .._coord........ + 0x00, 0x00, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, // .._level......5. + 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, // ..vec4_splat(f1; + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, // .........._x.... + 0x06, 0x00, 0x9e, 0x16, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x33, 0x3b, // ......@main(vf3; + 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x32, 0x00, 0x00, 0x76, 0x5f, // vf4;.......2..v_ + 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x02, 0x25, // normal.........% + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ......C...s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, // olor..........s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, // texColorSampler. + 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ..........s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, // olorTexture..... + 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, // ......bgfx_VoidF + 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, // rag........T..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, // ram...........co + 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x24, 0x47, // lor...........$G + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x00, 0x00, // lobal........... + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, // ..u_viewRect.... + 0x06, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x02, 0x00, // Texel........... + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc8, 0x08, // ..u_view........ + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, // ......u_invView. + 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x05, 0x00, // proj............ + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invProj..... + 0x06, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x07, 0x00, // Proj............ + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // ..u_invViewProj. + 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x09, 0x00, // model........... + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, // ..u_modelView... + 0x07, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode + 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc8, 0x08, // lViewProj....... + 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, // ......u_alphaRef + 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, // 4.............u_ + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00, // imageLodEnabled. + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ......B......... + 0x04, 0x00, 0x0c, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ...N..param..... + 0x04, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ../1..param..... + 0x04, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ......param..... + 0x04, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, // ......alpha..... + 0x05, 0x00, 0xee, 0x40, 0x00, 0x00, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, // ...@..v_normal.. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x34, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, // ......4...v_norm + 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, // al............gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, // _FragData_0_.... + 0x04, 0x00, 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ...G..param..... + 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ......param..... + 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // ......gl_FragDat + 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, // a_0_..G.......". + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, // ......G.......!. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, // ......G.......". + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, // ......G.......!. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xe5, 0x03, 0x00, 0x00, 0x06, 0x00, // ......G......... + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x00, 0x00, // ..@...H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, // ..#.......H..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x03, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x03, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, // ..#...`...H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, // ..#.......H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x07, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x07, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, // ..#...`...H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, // ..#.......H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x0b, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc8, 0x08, // ..#... ...H..... + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, // ......#...0...G. + 0x03, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, // ..........G...B. + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x34, 0x0e, // ..".......G...4. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, // ..........G..... + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, // ................ + 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, // ..!............. + 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x98, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0xfc, 0x01, // ..........g..... + 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x07, 0x00, // ...... ...!..... + 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, // ..g............. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xaf, 0x04, 0x00, 0x00, 0x1d, 0x00, // ......!......... + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, // ..!...........!. + 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x05, 0x00, 0x2e, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x67, 0x09, // .. ...".......g. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, // ..;..."...C..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, // .. ...y......... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, // ..;...y......... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, // ..;............. + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x98, 0x00, // .. ............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, // .. ...z......... + 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, // ................ + 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, // ..e............. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, // ......j... ..... + 0x04, 0x00, 0xe5, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, // ......e...j..... + 0x0f, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, // ..............e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xe5, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e.......e...e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x45, 0x0b, // .......... ...E. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x45, 0x0b, // ..........;...E. + 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..B.......+..... + 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // ../.......+..... + 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, // .......... ..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... + 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ........L>+..... + 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // ..!.....L?+..... + 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, // .......... ..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, // ..........;..... + 0x00, 0x00, 0x34, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, // ..4....... ..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, // ..........;..... + 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, // ..........6..... + 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, // ................ + 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xef, 0x47, // ..Sa..;........G + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, // ......;......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, // ......=.......!C + 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x33, // ......=........3 + 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, 0x00, 0x00, 0x12, 0x20, // ......P...g.... + 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, // ..!C...3..>...C. + 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xee, 0x40, // ... ..=........@ + 0x00, 0x00, 0x34, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xee, 0x40, // ..4...>....G...@ + 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, 0x9e, 0x16, // ..9.......ya.... + 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ...G......=..... + 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, // ..........>..... + 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ..........8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0x04, // ................ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, // ..7...!...'...7. + 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, // ..........7..... + 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, // ..........$T..A. + 0x05, 0x00, 0x16, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, // ..........'..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, // ..=.......m).... + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, // ..A...z....U..'. + 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, // ......=........N + 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, // ...U..V.......29 + 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, // ..m)...N..=..... + 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........=..... + 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, // ..=>......X..... + 0x00, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, // ......29........ + 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, // ..=>..........8. + 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, // ..6.......5..... + 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, // ......7......... + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2e, 0x5f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ......._..=..... + 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ...[......=..... + 0x00, 0x00, 0x25, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..%S......=..... + 0x00, 0x00, 0xc5, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ...=......=..... + 0x00, 0x00, 0xd8, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, // ...=......P..... + 0x00, 0x00, 0x56, 0x5b, 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0x25, 0x53, 0x00, 0x00, 0xc5, 0x3d, // ..V[...[..%S...= + 0x00, 0x00, 0xd8, 0x3d, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x56, 0x5b, 0x00, 0x00, 0x38, 0x00, // ...=......V[..8. + 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9e, 0x16, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0x2e, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x32, // ......7........2 + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x02, 0x25, 0x00, 0x00, 0xf8, 0x00, // ..7........%.... + 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xd5, 0x54, // ......;........T + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x0c, 0x4e, // ......;...!....N + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2f, 0x31, // ......;......./1 + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xc9, 0x2e, // ......;......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x0c, 0x0a, // ......>....T.... + 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, // ..9...........5. + 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0x94, 0x51, // ...T..=...g....Q + 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0c, 0x4e, 0x00, 0x00, 0x94, 0x51, // ..C...>....N...Q + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x07, 0x24, 0x00, 0x00, 0x95, 0x32, // ..=........$...2 + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x07, 0x24, 0x00, 0x00, 0x41, 0x00, // ..>.../1...$..A. + 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x75, 0x39, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, // ......u9..B.../. + 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8d, 0x61, // ......=........a + 0x00, 0x00, 0x75, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x8d, 0x61, // ..u9..>........a + 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0f, 0x4e, 0x00, 0x00, 0xf4, 0x10, // ..9........N.... + 0x00, 0x00, 0x0c, 0x4e, 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x4f, 0x00, // ...N../1......O. + 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x0f, 0x4e, 0x00, 0x00, 0x0f, 0x4e, // ...........N...N + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, // ..............A. + 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x6b, 0x20, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, // ......k ..B.../. + 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa3, 0x46, // ......=........F + 0x00, 0x00, 0x6b, 0x20, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe2, 0x3b, // ..k ...........; + 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, 0xa3, 0x46, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..!....F........ + 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0xe2, 0x3b, 0x00, 0x00, 0x51, 0x00, // ...........;..Q. + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x22, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00, // ......."........ + 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x7b, 0x2f, 0x00, 0x00, 0x18, 0x0e, // ..Q.......{/.... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x36, 0x60, // ......Q.......6` + 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, // ..........P..... + 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0x01, 0x22, 0x00, 0x00, 0x7b, 0x2f, 0x00, 0x00, 0x36, 0x60, // ...P..."..{/..6` + 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x02, 0x25, 0x00, 0x00, 0x0f, 0x50, // ......>....%...P + 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ......8.... }; -static const uint8_t fs_imgui_cubemap_dx9[382] = +static const uint8_t fs_imgui_cubemap_dx9[384] = { - 0x46, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH....e...s_tex + 0x46, 0x53, 0x48, 0x05, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH....e...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... - 0x00, 0x01, 0x00, 0x48, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, 0x54, 0x41, // ...H.........CTA - 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, // B............... - 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .............D.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, // .`...........t.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // .....s_texColor. - 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, // .u_imageLodEnabl - 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // ed.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x4c, // 0.1..Q.........L - 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, // ?..L>........... - 0x02, 0x03, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, // ............._.. - 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // ................ - 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, // ...U...........U - 0x80, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x55, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // .......U...... + 0x00, 0x01, 0x00, 0x48, 0x01, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, // ...H...........C + 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, // TAB............. + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, // ...............D + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, // ...`...........t + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, // .......s_texColo + 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // ...u_imageLodEna + 0x62, 0x6c, 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, // bled............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......ps_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0xcd, // 10.1..Q........ + 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, // .L?..L>......... + 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, // ................ + 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, // ..............._ + 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, // ................ + 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, // .....U.......... + 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x55, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // .U.......U...... }; -static const uint8_t fs_imgui_cubemap_dx11[441] = +static const uint8_t fs_imgui_cubemap_dx11[443] = { - 0x46, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima + 0x46, 0x53, 0x48, 0x05, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x00, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, // ...s_texColor0.. - 0x00, 0x01, 0x00, 0x80, 0x01, 0x44, 0x58, 0x42, 0x43, 0x3a, 0x0c, 0x3f, 0xee, 0x22, 0x31, 0x60, // .....DXBC:.?."1` - 0x3f, 0x80, 0x4a, 0x2e, 0x3f, 0xcb, 0x18, 0x1c, 0x94, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ?.J.?........... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, // .....,.......... - 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .ISGNL.......... - 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .8.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4e, 0x4f, 0x52, // .SV_POSITION.NOR - 0x4d, 0x41, 0x4c, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // MAL..OSGN,...... - 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..... .......... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, // .............SV_ - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xc4, 0x00, 0x00, // TARGET...SHDR... - 0x00, 0x40, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, // .@...1...Y...F. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, // .........Z....`. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, // .....X0...p..... - 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, // .UU..b...r...... - 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, // .e.... ......h.. - 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .....H.......... - 0x00, 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, // .F.......F~..... - 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, // ..`........ .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....6...r ..... - 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x82, 0x20, 0x10, // .F.......2.... . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....... ........ - 0x00, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, // ..@....L?.@....L - 0x3e, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // >>....... + 0x00, 0x01, 0x00, 0x80, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x3a, 0x0c, 0x3f, 0xee, 0x22, // .......DXBC:.?." + 0x31, 0x60, 0x3f, 0x80, 0x4a, 0x2e, 0x3f, 0xcb, 0x18, 0x1c, 0x94, 0x01, 0x00, 0x00, 0x00, 0x80, // 1`?.J.?......... + 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb4, // .......,........ + 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, // ...ISGNL........ + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ...8............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, // ...........D.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, // ................ + 0x07, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4e, // ...SV_POSITION.N + 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ORMAL..OSGN,.... + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....... ........ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S + 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xc4, // V_TARGET...SHDR. + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, // ...@...1...Y...F + 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, // . .........Z.... + 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, // `......X0...p... + 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, // ...UU..b...r.... + 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, // ...e.... ......h + 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x00, // .......H........ + 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, // ...F.......F~... + 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, // ....`........ .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, // .......6...r ... + 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x82, // ...F.......2.... + 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ...... + 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x01, 0x40, 0x00, 0x00, 0xcd, // ....@....L?.@... + 0xcc, 0x4c, 0x3e, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // .L>>....... }; static const uint8_t fs_imgui_cubemap_mtl[747] = { - 0x46, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima + 0x46, 0x53, 0x48, 0x05, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH....e...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0xc4, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, // ......using name 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, // space metal;.str diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.sc b/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.sc index cf210f6..20bb3a5 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.sc +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.sc @@ -1,7 +1,7 @@ $input v_normal /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h index 54fe9d1..ab7bbc3 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_imgui_image_glsl[360] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor... 0x00, 0x01, 0x00, 0x30, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...0...varying h @@ -24,296 +24,304 @@ static const uint8_t fs_imgui_image_glsl[360] = 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // agColor = tmpvar 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _1;.}... }; -static const uint8_t fs_imgui_image_spv[3597] = +static const uint8_t fs_imgui_image_spv[3719] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, // geLodEnabled.... - 0x01, 0x00, 0xe8, 0x0d, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, // ......#......... - 0x8e, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // .a.............. - 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std - 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ - 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ - 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, // main....t....... - 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ - 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....main........ - 0x61, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, // a...BgfxSampler2 - 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // D.......a....... - 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // m_sampler....... - 0x61, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // a.......m_textur - 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0xce, 0x14, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, // e...........bgfx - 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, // Texture2DLod(str - 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, // uct-BgfxSampler2 - 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x66, 0x31, // D-p1-t211;vf2;f1 - 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, // ;.......'..._sam - 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, // pler............ - 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, 0x00, 0x00, // _coord.......... - 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, // _level......5... - 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, // vec4_splat(f1;.. - 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ........_x...... - 0xe8, 0x16, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, // ....@main(vf2;vf - 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x32, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, // 4;.......2..v_te - 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x02, 0x25, 0x00, 0x00, // xcoord0......%.. - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, // gl_FragData_0_.. - 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // ....C...s_texCol - 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // or..........s_te - 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, // xColorSampler... - 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // ........s_texCol - 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // orTexture....... - 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, // ....bgfx_VoidFra - 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // g........T..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, // m...........colo - 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x26, 0x05, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, // r.......&...$Glo - 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x26, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // bal.....&....... - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_viewRect...... - 0x26, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, // &.......u_viewTe - 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // xel.....&....... - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x26, 0x05, 0x00, 0x00, // u_view......&... - 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, // ....u_invView... - 0x06, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, // ....&.......u_pr - 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x26, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // oj......&....... - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_invProj....... - 0x26, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // &.......u_viewPr - 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x26, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // oj......&....... - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // u_invViewProj... - 0x06, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ....&.......u_mo - 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x26, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // del.....&....... - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, // u_modelView..... - 0x26, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // &.......u_modelV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x26, 0x05, 0x00, 0x00, // iewProj.....&... - 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, // ....u_alphaRef4. - 0x06, 0x00, 0x08, 0x00, 0x26, 0x05, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, // ....&.......u_im - 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00, 0x00, 0x00, // ageLodEnabled... - 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....B........... - 0x45, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // EN..param....... - 0xc9, 0x2e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....param....... - 0xf3, 0x10, 0x00, 0x00, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // ....alpha....... - 0xee, 0x40, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // .@..v_texcoord0. - 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ....t...v_texcoo - 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // rd0.........gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ragData_0_...... - 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .G..param....... - 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....param....... - 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // ....gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, // 0_..G......."... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, // ....G.......!... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, // ....G......."... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, // ....G.......!... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x88, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ....G........... - 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // @...H...&....... - 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, // #.......H...&... - 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ....#.......H... - 0x26, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // &...........H... - 0x26, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // &.......#... ... - 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...&........... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x26, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....H...&....... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....H...&....... - 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, // #...`...H...&... - 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x26, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // &...........H... - 0x26, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, // &.......#....... - 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...&........... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x26, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H...&....... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H...&....... - 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, // #.......H...&... - 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x26, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // &...........H... - 0x26, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, // &.......#... ... - 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...&........... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x26, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....H...&....... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....H...&....... - 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, // #...`...H...&... - 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x26, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // &...........H... - 0x26, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, // &.......#....... - 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...&........... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x26, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H...&....... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H...&....... - 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, // #.......H...&... - 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x26, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // &...........H... - 0x26, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, // &.......#....... - 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...&........... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // ....H...&....... - 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x26, 0x05, 0x00, 0x00, // #... ...H...&... - 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#...0...G... - 0x26, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // &.......G...B... - 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, // ".......G...t... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ........G....... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ - 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, // !............... - 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, // ........a....... - 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ........... - 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // a............... - 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... - 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... - 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x89, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....!........... - 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, // ............!... - 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, // ............!... - 0x1f, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, // ................ - 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;.......C....... - 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, // ...y........... - 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;...y........... - 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;............... - 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........ ....... - 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // +............... - 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... - 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // ................ - 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ - 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... - 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... - 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... - 0x88, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, // ....e...j....... - 0x26, 0x05, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // &...........e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... - 0x65, 0x00, 0x00, 0x00, 0x88, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e.......e...e... - 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xa3, 0x07, 0x00, 0x00, // ........ ....... - 0x02, 0x00, 0x00, 0x00, 0x26, 0x05, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xa3, 0x07, 0x00, 0x00, // ....&...;....... - 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // B.......+....... - 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // /.......+....... - 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, // ........ ....... - 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........+....... - 0x05, 0x0b, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ......L>+....... - 0x21, 0x0a, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // !.....L?+....... - 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, // ........ ....... - 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, // ........;....... - 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, // t....... ....... - 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, // ........;....... - 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, // ........6....... - 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // ................ - 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, // Sa..;........G.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // ....;........... - 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, // ....=.......!C.. - 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, // ....=........3.. - 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, // ....P...a.... .. - 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, // !C...3..>...C... - 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // . ..=........@.. - 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // t...>....G...@.. - 0x39, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, 0xe8, 0x16, 0x00, 0x00, // 9.......ya...... - 0xef, 0x47, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .G......=....... - 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ........>....... - 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, // ........8...6... - 0x1d, 0x00, 0x00, 0x00, 0xce, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x04, 0x00, 0x00, // ................ - 0x37, 0x00, 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7.......'...7... - 0x90, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........7....... - 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ........$T..A... - 0x13, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ........'....... - 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, // =.......m)...... - 0x41, 0x00, 0x05, 0x00, 0x79, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // A...y....U..'... - 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, // ....=........N.. - 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, // .U..V.......29.. - 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // m)...N..=....... - 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........=....... - 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // =>......X....... - 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....29.......... - 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // =>..........8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6.......5....... - 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // ....7........... - 0xf8, 0x00, 0x02, 0x00, 0x2e, 0x5f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ....._..=....... - 0xe0, 0x5b, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .[......=....... - 0x25, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // %S......=....... - 0xc5, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .=......=....... - 0xd8, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // .=......P....... - 0x56, 0x5b, 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0x25, 0x53, 0x00, 0x00, 0xc5, 0x3d, 0x00, 0x00, // V[...[..%S...=.. - 0xd8, 0x3d, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x56, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // .=......V[..8... - 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0x1f, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x95, 0x32, 0x00, 0x00, // ....7........2.. - 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x02, 0x25, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7........%...... - 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, // ....;........T.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, // ....;.......EN.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, // ....;........... - 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....>....T...... - 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, // 9...........5... - 0xd5, 0x54, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xe0, 0x51, 0x00, 0x00, // .T..=........Q.. - 0x95, 0x32, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x45, 0x4e, 0x00, 0x00, 0xe0, 0x51, 0x00, 0x00, // .2..>...EN...Q.. - 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x75, 0x39, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A.......u9..B... - 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // /.......=....... - 0x8d, 0x61, 0x00, 0x00, 0x75, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x2e, 0x00, 0x00, // .a..u9..>....... - 0x8d, 0x61, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0f, 0x4e, 0x00, 0x00, // .a..9........N.. - 0xce, 0x14, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, // ....C...EN...... - 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x0f, 0x4e, 0x00, 0x00, // O............N.. - 0x0f, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .N.............. - 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x6b, 0x20, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A.......k ..B... - 0x2f, 0x0a, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // /.......=....... - 0xa3, 0x46, 0x00, 0x00, 0x6b, 0x20, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .F..k .......... - 0xe2, 0x3b, 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, 0xa3, 0x46, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, // .;..!....F...... - 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0xe2, 0x3b, 0x00, 0x00, // .............;.. - 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x22, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, // Q........"...... - 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x7b, 0x2f, 0x00, 0x00, // ....Q.......{/.. - 0x18, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........Q....... - 0x36, 0x60, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, // 6`..........P... - 0x1d, 0x00, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0x01, 0x22, 0x00, 0x00, 0x7b, 0x2f, 0x00, 0x00, // .....P..."..{/.. - 0x36, 0x60, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x02, 0x25, 0x00, 0x00, // 6`......>....%.. - 0x0f, 0x50, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .P......8.... + 0x01, 0x00, 0x60, 0x0e, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, // ..`.....#....... + 0x08, 0x00, 0x8e, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, // ...a............ + 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, // ..........GLSL.s + 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, // td.450.......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, // ..main....t..... + 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, // ..main........a. + 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, // ..BgfxSampler2D. + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, // ......a.......m_ + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, // sampler.......a. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, // ......m_texture. + 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0xce, 0x14, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, // ..........bgfxTe + 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, // xture2DLod(struc + 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, // t-BgfxSampler2D- + 0x70, 0x31, 0x2d, 0x74, 0x32, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x66, 0x31, 0x3b, 0x00, // p1-t211;vf2;f1;. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, // ......'..._sampl + 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, // er............_c + 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x5f, 0x6c, // oord.........._l + 0x65, 0x76, 0x65, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, // evel......5...ve + 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, // c4_splat(f1;.... + 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xe8, 0x16, // ......_x........ + 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, // ..@main(vf2;vf4; + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x32, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // .......2..v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x02, 0x25, 0x00, 0x00, 0x67, 0x6c, // oord0......%..gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, // _FragData_0_.... + 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ..C...s_texColor + 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ..........s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, // olorSampler..... + 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ......s_texColor + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, // Texture......... + 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, // ..bgfx_VoidFrag. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......T..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // ..........color. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x49, 0x04, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, // ......I...$Globa + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x49, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....I.......u_ + 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x49, 0x04, // viewRect......I. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, // ......u_viewTexe + 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....I.......u_ + 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x49, 0x04, 0x00, 0x00, 0x03, 0x00, // view......I..... + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invView..... + 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, // ..I.......u_proj + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x49, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......I.......u_ + 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x49, 0x04, // invProj.......I. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ......u_viewProj + 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x49, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......I.......u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // invViewProj..... + 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..I.......u_mode + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x49, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....I.......u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x49, 0x04, // modelView.....I. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x49, 0x04, 0x00, 0x00, 0x0b, 0x00, // wProj.....I..... + 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, // ..u_alphaRef4... + 0x08, 0x00, 0x49, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, // ..I.......u_imag + 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, // eLodEnabled..... + 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0c, 0x4e, // ..B............N + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2f, 0x31, // ..param......./1 + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x2e, // ..param......... + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf3, 0x10, // ..param......... + 0x00, 0x00, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xee, 0x40, // ..alpha........@ + 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... + 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..t...v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // 0.........gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, // gData_0_.......G + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, // ..param......... + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, // ..param......... + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G......."..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G.......!..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G......."..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G.......!..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x9f, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, // ..G...........@. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...I.......#. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x01, 0x00, // ......H...I..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x49, 0x04, // ..#.......H...I. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, // ..........H...I. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. + 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..I............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x49, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...I......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...I.......#. + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x03, 0x00, // ..`...H...I..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x49, 0x04, // ..........H...I. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, // ..........H...I. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..I............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x49, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...I......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...I.......#. + 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x05, 0x00, // ......H...I..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x49, 0x04, // ..........H...I. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, // ..........H...I. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. + 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..I............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x49, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...I......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...I.......#. + 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x07, 0x00, // ..`...H...I..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x49, 0x04, // ..........H...I. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, // ..........H...I. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..I............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x49, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...I......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...I.......#. + 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x09, 0x00, // ......H...I..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x49, 0x04, // ..........H...I. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, // ..........H...I. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..I............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...I.......#. + 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x49, 0x04, 0x00, 0x00, 0x0c, 0x00, // .. ...H...I..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x49, 0x04, // ..#...0...G...I. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, // ......G...B...". + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G...t..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, // ......G......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, // ................ + 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, // .......... ..... + 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x96, 0x00, // ......a......... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x09, // .. ...........a. + 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, // .. ............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. + 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x89, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x00, // ..!............. + 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, // ..........!..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x1f, 0x0b, // ..........!..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x3b, 0x00, // ..........a...;. + 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, // ......C....... . + 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, // ..y...........;. + 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, // ..y........... . + 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, // ................ + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, // ..z............. + 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, // ................ + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // ..............e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... + 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x9f, 0x04, // ..j... ......... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, 0x49, 0x04, // ..e...j.......I. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x9f, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......e...e..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xc6, 0x06, 0x00, 0x00, 0x02, 0x00, // ...... ......... + 0x00, 0x00, 0x49, 0x04, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xc6, 0x06, 0x00, 0x00, 0x42, 0x13, // ..I...;.......B. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, // ......+......./. + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, // ...... ......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x05, 0x0b, // ......+......... + 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x0a, // ....L>+.......!. + 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, // ....L?+......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, // ......;.......t. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xd1, 0x0d, // ......;......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, // ......6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, // ..............Sa + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x07, 0x00, // ..;........G.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, // ..=.......!C.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, // ..=........3.... + 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, // ..P...a.... ..!C + 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, // ...3..>...C.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x74, 0x14, // ..=........@..t. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x39, 0x00, // ..>....G...@..9. + 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, 0xe8, 0x16, 0x00, 0x00, 0xef, 0x47, // ......ya.......G + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, // ......=......... + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, // ......>......... + 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ......8...6..... + 0x00, 0x00, 0xce, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x04, 0x00, 0x00, 0x37, 0x00, // ..............7. + 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......'...7..... + 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x2e, 0x12, // ......7......... + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x14, 0x03, // ......$T..A..... + 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ......'.......=. + 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x41, 0x00, // ......m)......A. + 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, // ..z....U..'..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0xe4, 0x55, // ..=........N...U + 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0x6d, 0x29, // ..V.......29..m) + 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xcd, 0x19, // ...N..=......... + 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3d, 0x3e, // ......=.......=> + 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x11, 0x1c, // ......X......... + 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3d, 0x3e, // ..29..........=> + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ..........8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, // ......5......... + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, // ..7............. + 0x02, 0x00, 0x2e, 0x5f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe0, 0x5b, // ..._..=........[ + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x25, 0x53, // ......=.......%S + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc5, 0x3d, // ......=........= + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd8, 0x3d, // ......=........= + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x56, 0x5b, // ......P.......V[ + 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0x25, 0x53, 0x00, 0x00, 0xc5, 0x3d, 0x00, 0x00, 0xd8, 0x3d, // ...[..%S...=...= + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x56, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ......V[..8...6. + 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x0b, // ................ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x95, 0x32, 0x00, 0x00, 0x37, 0x00, // ..7........2..7. + 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x02, 0x25, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, // .......%........ + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, // ..;........T.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x0c, 0x4e, 0x00, 0x00, 0x07, 0x00, // ..;........N.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x07, 0x00, // ..;......./1.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, // ..>....T......9. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, // ..........5....T + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x43, 0x12, // ..=...a....Q..C. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0c, 0x4e, 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x3d, 0x00, // ..>....N...Q..=. + 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x07, 0x24, 0x00, 0x00, 0x95, 0x32, 0x00, 0x00, 0x3e, 0x00, // .......$...2..>. + 0x03, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x07, 0x24, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, // ../1...$..A..... + 0x00, 0x00, 0x75, 0x39, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, // ..u9..B.../..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8d, 0x61, 0x00, 0x00, 0x75, 0x39, // ..=........a..u9 + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x8d, 0x61, 0x00, 0x00, 0x39, 0x00, // ..>........a..9. + 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0f, 0x4e, 0x00, 0x00, 0xce, 0x14, 0x00, 0x00, 0x0c, 0x4e, // .......N.......N + 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, // ../1......O..... + 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x0f, 0x4e, 0x00, 0x00, 0x0f, 0x4e, 0x00, 0x00, 0x00, 0x00, // .......N...N.... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, // ..........A..... + 0x00, 0x00, 0x6b, 0x20, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0d, 0x0a, // ..k ..B.../..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa3, 0x46, 0x00, 0x00, 0x6b, 0x20, // ..=........F..k + 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe2, 0x3b, 0x00, 0x00, 0x21, 0x0a, // ...........;..!. + 0x00, 0x00, 0xa3, 0x46, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, // ...F............ + 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0xe2, 0x3b, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // .......;..Q..... + 0x00, 0x00, 0x01, 0x22, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, // ..."..........Q. + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x7b, 0x2f, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x01, 0x00, // ......{/........ + 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x18, 0x0e, // ..Q.......6`.... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0f, 0x50, // ......P........P + 0x00, 0x00, 0x01, 0x22, 0x00, 0x00, 0x7b, 0x2f, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0xf3, 0x10, // ..."..{/..6`.... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x02, 0x25, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0xfd, 0x00, // ..>....%...P.... + 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..8.... }; -static const uint8_t fs_imgui_image_dx9[386] = +static const uint8_t fs_imgui_image_dx9[388] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... - 0x00, 0x01, 0x00, 0x4c, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, 0x54, 0x41, // ...L.........CTA - 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, // B............... - 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .............D.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, // .`...........t.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // .....s_texColor. - 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, // .u_imageLodEnabl - 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // ed.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, // 0.1..Q.......... - 0x3f, 0x00, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, // ?......L?..L>... - 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, // ................ - 0xa0, 0x00, 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, // ................ - 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, // ._.............. - 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x0c, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, // ................ - 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, 0x80, 0xff, 0xff, 0x00, // ...U............ - 0x00, 0x00, // .. + 0x00, 0x01, 0x00, 0x4c, 0x01, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, // ...L...........C + 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, // TAB............. + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, // ...............D + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, // ...`...........t + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, // .......s_texColo + 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // ...u_imageLodEna + 0x62, 0x6c, 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, // bled............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......ps_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, // 10.1..Q........ + 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, // ..?......L?..L>. + 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, // ................ + 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, // ................ + 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, // ..._............ + 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, // ................ + 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, 0x80, 0xff, // .....U.......... + 0xff, 0x00, 0x00, 0x00, // .... }; -static const uint8_t fs_imgui_image_dx11[445] = +static const uint8_t fs_imgui_image_dx11[447] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x00, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, // ...s_texColor0.. - 0x00, 0x01, 0x00, 0x84, 0x01, 0x44, 0x58, 0x42, 0x43, 0x60, 0x83, 0xa2, 0x5c, 0x77, 0x3d, 0xcc, // .....DXBC`...w=. - 0x9b, 0xb9, 0x73, 0xdf, 0x41, 0x6b, 0x18, 0x8f, 0x0e, 0x01, 0x00, 0x00, 0x00, 0x84, 0x01, 0x00, // ..s.Ak.......... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, // .....,.......... - 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .ISGNP.......... - 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .8.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, // .SV_POSITION.TEX - 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, // COORD....OSGN,.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, // .SV_TARGET...SHD - 0x52, 0xc4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, // R....@...1...Y.. - 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, // .F. .........Z.. - 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, // ..`......X....p. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, // .....UU..b...2.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....e.... ..... - 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, // .h.......H...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, // .....F.......F~. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, // ......`........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, // .........6...r . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, // .....F.......2.. - 0x0a, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ........ .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x01, 0x40, 0x00, // ......@....L?.@. - 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // ...L>>....... + 0x00, 0x01, 0x00, 0x84, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x60, 0x83, 0xa2, 0x5c, 0x77, // .......DXBC`...w + 0x3d, 0xcc, 0x9b, 0xb9, 0x73, 0xdf, 0x41, 0x6b, 0x18, 0x8f, 0x0e, 0x01, 0x00, 0x00, 0x00, 0x84, // =...s.Ak........ + 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, // .......,........ + 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, // ...ISGNP........ + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ...8............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, // ...........D.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ................ + 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, // ...SV_POSITION.T + 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, // EXCOORD....OSGN, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // ........... .... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S + 0x48, 0x44, 0x52, 0xc4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x59, // HDR....@...1...Y + 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5a, // ...F. .........Z + 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, // ....`......X.... + 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, // p......UU..b...2 + 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, // ...h.......H.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // .......F.......F + 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // ~.......`....... + 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, // . .........6...r + 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, // ......F.......2 + 0x00, 0x00, 0x0a, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, // .... ........ .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x01, // ........@....L?. + 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // @....L>>....... }; static const uint8_t fs_imgui_image_mtl[751] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0xc8, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, // ......using name 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, // space metal;.str diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h index e490439..176871c 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_imgui_image_swizz_glsl[565] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x02, 0x01, 0x00, 0x00, // ...u_swizzle.... 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor... @@ -37,326 +37,333 @@ static const uint8_t fs_imgui_image_swizz_glsl[565] = 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, // olor = tmpvar_3; 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... }; -static const uint8_t fs_imgui_image_swizz_spv[3957] = +static const uint8_t fs_imgui_image_swizz_spv[4079] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x12, 0x01, 0x00, 0x00, // ...u_swizzle.... - 0x01, 0x00, 0x40, 0x0f, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, // ..@...#......... - 0x7a, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // za.............. - 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std - 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ - 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ - 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, // main....t....... - 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ - 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....main........ - 0x61, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, // a...BgfxSampler2 - 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // D.......a....... - 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // m_sampler....... - 0x61, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // a.......m_textur - 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0xce, 0x14, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, // e...........bgfx - 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, // Texture2DLod(str - 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, // uct-BgfxSampler2 - 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x66, 0x31, // D-p1-t211;vf2;f1 - 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, // ;.......'..._sam - 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, // pler............ - 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, 0x00, 0x00, // _coord.......... - 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x01, 0x14, 0x00, 0x00, // _level.......... - 0x76, 0x65, 0x63, 0x33, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, // vec3_splat(f1;.. - 0x05, 0x00, 0x03, 0x00, 0xab, 0x5b, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // .....[.._x...... - 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, // 5...vec4_splat(f - 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, // 1;.........._x.. - 0x05, 0x00, 0x06, 0x00, 0xe8, 0x16, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, // ........@main(vf - 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xae, 0x58, 0x00, 0x00, // 2;vf4;.......X.. - 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, // v_texcoord0..... - 0x3e, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // >...gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // 0_......C...s_te - 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, // xColor.......... - 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, // s_texColorSample - 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // r...........s_te - 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, // xColorTexture... - 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, // ........bgfx_Voi - 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4b, 0x4e, 0x00, 0x00, // dFrag.......KN.. - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, // param........... - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xca, 0x03, 0x00, 0x00, // color........... - 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xca, 0x03, 0x00, 0x00, // $Global......... - 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, // ....u_viewRect.. - 0x06, 0x00, 0x06, 0x00, 0xca, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi - 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, // ewTexel......... - 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_view...... - 0xca, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ........u_invVie - 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // w............... - 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xca, 0x03, 0x00, 0x00, // u_proj.......... - 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // ....u_invProj... - 0x06, 0x00, 0x06, 0x00, 0xca, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi - 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xca, 0x03, 0x00, 0x00, // ewProj.......... - 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ....u_invViewPro - 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // j............... - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xca, 0x03, 0x00, 0x00, // u_model......... - 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, // ....u_modelView. - 0x06, 0x00, 0x07, 0x00, 0xca, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo - 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, // delViewProj..... - 0xca, 0x03, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, // ........u_alphaR - 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0xca, 0x03, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, // ef4............. - 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, // u_imageLodEnable - 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xca, 0x03, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // d............... - 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, // u_swizzle....... - 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x82, 0x47, 0x00, 0x00, // B............G.. - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xa5, 0x2a, 0x00, 0x00, // param........*.. - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf3, 0x10, 0x00, 0x00, // param........... - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3f, 0x28, 0x00, 0x00, // alpha.......?(.. - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xee, 0x40, 0x00, 0x00, // param........@.. - 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // v_texcoord0..... - 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // t...v_texcoord0. - 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // ........gl_FragD - 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, 0x00, 0x00, // ata_0_.......G.. - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, // param........... - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, // param........... - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, // gl_FragData_0_.. - 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G......."....... - 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G.......!....... - 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G......."....... - 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G.......!....... - 0x47, 0x00, 0x04, 0x00, 0xcd, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // G...........@... - 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xca, 0x03, 0x00, 0x00, // #.......H....... - 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, // ........H....... - 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... - 0xca, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xca, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // `...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xca, 0x03, 0x00, 0x00, // ........H....... - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, // ........H....... - 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xca, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xca, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xca, 0x03, 0x00, 0x00, // ........H....... - 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, // ........H....... - 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... - 0xca, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xca, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // `...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xca, 0x03, 0x00, 0x00, // ........H....... - 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, // ........H....... - 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xca, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0xca, 0x03, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xca, 0x03, 0x00, 0x00, // ........H....... - 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, // ........H....... - 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0xca, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, // ...H........... - 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xca, 0x03, 0x00, 0x00, // #...0...H....... - 0x0d, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#...@...G... - 0xca, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ........G...B... - 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, // ".......G...t... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ........G....... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ - 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, // !............... - 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, // ........a....... - 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ........... - 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // a............... - 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... - 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... - 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x89, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....!........... - 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // ................ - 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, // ............!... - 0xe5, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, // ............!... - 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, // ............!... - 0x1f, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, // ................ - 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;.......C....... - 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, // ...y........... - 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;...y........... - 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;............... - 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........ ....... - 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // +............... - 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... - 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ - 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... - 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... - 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... - 0xcd, 0x06, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x10, 0x00, // ....e...j....... - 0xca, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... - 0x65, 0x00, 0x00, 0x00, 0xcd, 0x06, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e.......e...e... - 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x47, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xca, 0x03, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // G...........;... - 0x47, 0x06, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // G...B.......+... - 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ..../.......+... - 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0c, 0x00, 0x00, 0x00, 0x32, 0x0a, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ....2....... ... - 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0d, 0x00, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x2b, 0x00, 0x04, 0x00, // ..........L>+... - 0x0d, 0x00, 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x2b, 0x00, 0x04, 0x00, // ....!.....L?+... - 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ....t....... ... - 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... - 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, // ............6... - 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, // ....Sa..;....... - 0xef, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // .G......;....... - 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, // ........=....... - 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, // !C......=....... - 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, // .3......P...a... - 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // . ..!C...3..>... - 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // C.... ..=....... - 0xee, 0x40, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, // .@..t...>....G.. - 0xee, 0x40, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, // .@..9.......ya.. - 0xe8, 0x16, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....G......=... - 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ............>... - 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // ............8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0x89, 0x04, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // ....7.......'... - 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7...........7... - 0x8a, 0x02, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, // ............$T.. - 0x41, 0x00, 0x05, 0x00, 0x13, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // A...........'... - 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, // ....=.......m).. - 0xc0, 0x1c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x79, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, // ....A...y....U.. - 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, // '.......=....... - 0xf2, 0x4e, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, // .N...U..V....... - 0x32, 0x39, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // 29..m)...N..=... - 0x13, 0x00, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ............=... - 0x0d, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, // ....=>......X... - 0x1d, 0x00, 0x00, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, // ........29...... - 0x02, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, // ....=>.......... - 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, // 8...6........... - 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........7....... - 0xab, 0x5b, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xc6, 0x35, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .[.......5..=... - 0x0d, 0x00, 0x00, 0x00, 0x29, 0x1a, 0x00, 0x00, 0xab, 0x5b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....)....[..=... - 0x0d, 0x00, 0x00, 0x00, 0x1d, 0x44, 0x00, 0x00, 0xab, 0x5b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....D...[..=... - 0x0d, 0x00, 0x00, 0x00, 0x67, 0x2d, 0x00, 0x00, 0xab, 0x5b, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, // ....g-...[..P... - 0x18, 0x00, 0x00, 0x00, 0xee, 0x31, 0x00, 0x00, 0x29, 0x1a, 0x00, 0x00, 0x1d, 0x44, 0x00, 0x00, // .....1..)....D.. - 0x67, 0x2d, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xee, 0x31, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // g-.......1..8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6.......5....... - 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // ....7........... - 0xf8, 0x00, 0x02, 0x00, 0x6a, 0x56, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ....jV..=....... - 0x56, 0x55, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // VU......=....... - 0x9b, 0x4c, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .L......=....... - 0x3b, 0x37, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ;7......=....... - 0x4e, 0x37, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // N7......P....... - 0x92, 0x52, 0x00, 0x00, 0x56, 0x55, 0x00, 0x00, 0x9b, 0x4c, 0x00, 0x00, 0x3b, 0x37, 0x00, 0x00, // .R..VU...L..;7.. - 0x4e, 0x37, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x92, 0x52, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // N7.......R..8... - 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0x1f, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xae, 0x58, 0x00, 0x00, // ....7........X.. - 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x3e, 0x1c, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7.......>....... - 0xa7, 0x5d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4b, 0x4e, 0x00, 0x00, // .]..;.......KN.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x82, 0x47, 0x00, 0x00, // ....;........G.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xa5, 0x2a, 0x00, 0x00, // ....;........*.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x3f, 0x28, 0x00, 0x00, // ....;.......?(.. - 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x4b, 0x4e, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....>...KN...... - 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, // 9...........5... - 0x4b, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x56, 0x4b, 0x00, 0x00, // KN..=.......VK.. - 0xae, 0x58, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x82, 0x47, 0x00, 0x00, 0x56, 0x4b, 0x00, 0x00, // .X..>....G..VK.. - 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xeb, 0x32, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A........2..B... - 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // /.......=....... - 0x03, 0x5b, 0x00, 0x00, 0xeb, 0x32, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa5, 0x2a, 0x00, 0x00, // .[...2..>....*.. - 0x03, 0x5b, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xaf, 0x50, 0x00, 0x00, // .[..9........P.. - 0xce, 0x14, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x82, 0x47, 0x00, 0x00, 0xa5, 0x2a, 0x00, 0x00, // ....C....G...*.. - 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xa7, 0x1c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A...........B... - 0x32, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x59, 0x1e, 0x00, 0x00, // 2...=.......Y... - 0xa7, 0x1c, 0x00, 0x00, 0x94, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, // ................ - 0xaf, 0x50, 0x00, 0x00, 0x59, 0x1e, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, // .P..Y...A....... - 0x47, 0x59, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, // GY..B.../....... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x4e, 0x5c, 0x00, 0x00, 0x47, 0x59, 0x00, 0x00, // =.......N...GY.. - 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x28, 0x4d, 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, // ........(M..!... - 0x4e, 0x5c, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, // N............... - 0x05, 0x0b, 0x00, 0x00, 0x28, 0x4d, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3f, 0x28, 0x00, 0x00, // ....(M..>...?(.. - 0x18, 0x0e, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x87, 0x22, 0x00, 0x00, // ....9........".. - 0x01, 0x14, 0x00, 0x00, 0x3f, 0x28, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // ....?(..Q....... - 0x12, 0x5e, 0x00, 0x00, 0x87, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // .^..."......Q... - 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x41, 0x00, 0x00, 0x87, 0x22, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....+A..."...... - 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xac, 0x59, 0x00, 0x00, 0x87, 0x22, 0x00, 0x00, // Q........Y...".. - 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x85, 0x49, 0x00, 0x00, // ....P........I.. - 0x12, 0x5e, 0x00, 0x00, 0x2b, 0x41, 0x00, 0x00, 0xac, 0x59, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, // .^..+A...Y...... - 0x3e, 0x00, 0x03, 0x00, 0x3e, 0x1c, 0x00, 0x00, 0x85, 0x49, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >...>....I...... - 0x38, 0x00, 0x01, 0x00, 0x00, // 8.... + 0x01, 0x00, 0xb8, 0x0f, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, // ........#....... + 0x08, 0x00, 0x7a, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, // ..za............ + 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, // ..........GLSL.s + 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, // td.450.......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, // ..main....t..... + 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, // ..main........a. + 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, // ..BgfxSampler2D. + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, // ......a.......m_ + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, // sampler.......a. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, // ......m_texture. + 0x00, 0x00, 0x05, 0x00, 0x10, 0x00, 0xce, 0x14, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, // ..........bgfxTe + 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, // xture2DLod(struc + 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, // t-BgfxSampler2D- + 0x70, 0x31, 0x2d, 0x74, 0x32, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x66, 0x31, 0x3b, 0x00, // p1-t211;vf2;f1;. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, // ......'..._sampl + 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, // er............_c + 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x5f, 0x6c, // oord.........._l + 0x65, 0x76, 0x65, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x01, 0x14, 0x00, 0x00, 0x76, 0x65, // evel..........ve + 0x63, 0x33, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, // c3_splat(f1;.... + 0x03, 0x00, 0xab, 0x5b, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, // ...[.._x......5. + 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, // ..vec4_splat(f1; + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, // .........._x.... + 0x06, 0x00, 0xe8, 0x16, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x32, 0x3b, // ......@main(vf2; + 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xae, 0x58, 0x00, 0x00, 0x76, 0x5f, // vf4;.......X..v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x3e, 0x1c, // texcoord0.....>. + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ......C...s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, // olor..........s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, // texColorSampler. + 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ..........s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, // olorTexture..... + 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, // ......bgfx_VoidF + 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4b, 0x4e, 0x00, 0x00, 0x70, 0x61, // rag.......KN..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, // ram...........co + 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xed, 0x02, 0x00, 0x00, 0x24, 0x47, // lor...........$G + 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xed, 0x02, 0x00, 0x00, 0x00, 0x00, // lobal........... + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, // ..u_viewRect.... + 0x06, 0x00, 0xed, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x02, 0x00, // Texel........... + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xed, 0x02, // ..u_view........ + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, // ......u_invView. + 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xed, 0x02, 0x00, 0x00, 0x05, 0x00, // proj............ + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invProj..... + 0x06, 0x00, 0xed, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xed, 0x02, 0x00, 0x00, 0x07, 0x00, // Proj............ + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // ..u_invViewProj. + 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xed, 0x02, 0x00, 0x00, 0x09, 0x00, // model........... + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, // ..u_modelView... + 0x07, 0x00, 0xed, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode + 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xed, 0x02, // lViewProj....... + 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, // ......u_alphaRef + 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0xed, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, // 4.............u_ + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00, // imageLodEnabled. + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xed, 0x02, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, // swizzle.......B. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x82, 0x47, 0x00, 0x00, 0x70, 0x61, // ...........G..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x6c, 0x2a, 0x00, 0x00, 0x70, 0x61, // ram.......l*..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xa5, 0x2a, 0x00, 0x00, 0x70, 0x61, // ram........*..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x61, 0x6c, // ram...........al + 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3f, 0x28, 0x00, 0x00, 0x70, 0x61, // pha.......?(..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xee, 0x40, 0x00, 0x00, 0x76, 0x5f, // ram........@..v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, // texcoord0.....t. + 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... + 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // ......gl_FragDat + 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, // a_0_.......G..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, // ram...........pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, // ram...........gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, // _FragData_0_..G. + 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......".......G. + 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......!.......G. + 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......".......G. + 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......!.......G. + 0x04, 0x00, 0xe4, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, // ..........@...H. + 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xed, 0x02, 0x00, 0x00, 0x02, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x02, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, // ..#... ...H..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xed, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, // ..........#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xed, 0x02, 0x00, 0x00, 0x04, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x04, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, // ..#.......H..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xed, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xed, 0x02, 0x00, 0x00, 0x06, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x06, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, // ..#... ...H..... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xed, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, // ..........#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xed, 0x02, 0x00, 0x00, 0x08, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x08, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, // ..#.......H..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xed, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xed, 0x02, 0x00, 0x00, 0x0a, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x0a, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, // ..#.......H..... + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xed, 0x02, 0x00, 0x00, 0x0d, 0x00, // ..0...H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xed, 0x02, // ..#...@...G..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, // ......G...B...". + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G...t..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, // ......G......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, // ................ + 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, // .......... ..... + 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x96, 0x00, // ......a......... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x09, // .. ...........a. + 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, // .. ............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. + 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x89, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x00, // ..!............. + 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, // ................ + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xe5, 0x00, // ..........!..... + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, // ..........!..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x1f, 0x0b, // ..........!..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x3b, 0x00, // ..........a...;. + 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, // ......C....... . + 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, // ..y...........;. + 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, // ..y........... . + 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, // ................ + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, // ..z............. + 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // ..............e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... + 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xe4, 0x07, // ..j... ......... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x10, 0x00, 0xed, 0x02, // ..e...j......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0xe4, 0x07, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......e...e..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x6a, 0x05, // .......... ...j. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xed, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x6a, 0x05, // ..........;...j. + 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..B.......+..... + 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // ../.......+..... + 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, // .......... ..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..........+..... + 0x00, 0x00, 0x32, 0x0a, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, // ..2....... ..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... + 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ........L>+..... + 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // ..!.....L?+..... + 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, // .......... ..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, // ..........;..... + 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, // ..t....... ..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, // ..........;..... + 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, // ..........6..... + 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, // ................ + 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xef, 0x47, // ..Sa..;........G + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, // ......;......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, // ......=.......!C + 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, // ......=........3 + 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, // ......P...a.... + 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, // ..!C...3..>...C. + 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xee, 0x40, // ... ..=........@ + 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xee, 0x40, // ..t...>....G...@ + 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, 0xe8, 0x16, // ..9.......ya.... + 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ...G......=..... + 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, // ..........>..... + 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ..........8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x04, // ................ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, // ..7.......'...7. + 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, // ..........7..... + 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, // ..........$T..A. + 0x05, 0x00, 0x14, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, // ..........'..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, // ..=.......m).... + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, // ..A...z....U..'. + 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, // ......=........N + 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, // ...U..V.......29 + 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ..m)...N..=..... + 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........=..... + 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, // ..=>......X..... + 0x00, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, // ......29........ + 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, // ..=>..........8. + 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xab, 0x5b, // ......7........[ + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xc6, 0x35, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // .......5..=..... + 0x00, 0x00, 0x29, 0x1a, 0x00, 0x00, 0xab, 0x5b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..)....[..=..... + 0x00, 0x00, 0x1d, 0x44, 0x00, 0x00, 0xab, 0x5b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ...D...[..=..... + 0x00, 0x00, 0x67, 0x2d, 0x00, 0x00, 0xab, 0x5b, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, // ..g-...[..P..... + 0x00, 0x00, 0xee, 0x31, 0x00, 0x00, 0x29, 0x1a, 0x00, 0x00, 0x1d, 0x44, 0x00, 0x00, 0x67, 0x2d, // ...1..)....D..g- + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xee, 0x31, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // .......1..8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, // ......5......... + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, // ..7............. + 0x02, 0x00, 0x6a, 0x56, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x56, 0x55, // ..jV..=.......VU + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9b, 0x4c, // ......=........L + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x37, // ......=.......;7 + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x4e, 0x37, // ......=.......N7 + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x92, 0x52, // ......P........R + 0x00, 0x00, 0x56, 0x55, 0x00, 0x00, 0x9b, 0x4c, 0x00, 0x00, 0x3b, 0x37, 0x00, 0x00, 0x4e, 0x37, // ..VU...L..;7..N7 + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x92, 0x52, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // .......R..8...6. + 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x0b, // ................ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xae, 0x58, 0x00, 0x00, 0x37, 0x00, // ..7........X..7. + 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x3e, 0x1c, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xa7, 0x5d, // ......>........] + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4b, 0x4e, 0x00, 0x00, 0x07, 0x00, // ..;.......KN.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x82, 0x47, 0x00, 0x00, 0x07, 0x00, // ..;........G.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x6c, 0x2a, 0x00, 0x00, 0x07, 0x00, // ..;.......l*.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xa5, 0x2a, 0x00, 0x00, 0x07, 0x00, // ..;........*.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x3f, 0x28, 0x00, 0x00, 0x07, 0x00, // ..;.......?(.... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x4b, 0x4e, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, // ..>...KN......9. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x4b, 0x4e, // ..........5...KN + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0x0a, 0x4b, 0x00, 0x00, 0x43, 0x12, // ..=...a....K..C. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x82, 0x47, 0x00, 0x00, 0x0a, 0x4b, 0x00, 0x00, 0x3d, 0x00, // ..>....G...K..=. + 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x7d, 0x1d, 0x00, 0x00, 0xae, 0x58, 0x00, 0x00, 0x3e, 0x00, // ......}....X..>. + 0x03, 0x00, 0x6c, 0x2a, 0x00, 0x00, 0x7d, 0x1d, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, // ..l*..}...A..... + 0x00, 0x00, 0xeb, 0x32, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, // ...2..B.../..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x5b, 0x00, 0x00, 0xeb, 0x32, // ..=........[...2 + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa5, 0x2a, 0x00, 0x00, 0x03, 0x5b, 0x00, 0x00, 0x39, 0x00, // ..>....*...[..9. + 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xaf, 0x50, 0x00, 0x00, 0xce, 0x14, 0x00, 0x00, 0x82, 0x47, // .......P.......G + 0x00, 0x00, 0x6c, 0x2a, 0x00, 0x00, 0xa5, 0x2a, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, // ..l*...*..A..... + 0x00, 0x00, 0xa7, 0x1c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x32, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ......B...2...=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x59, 0x1e, 0x00, 0x00, 0xa7, 0x1c, 0x00, 0x00, 0x94, 0x00, // ......Y......... + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0xaf, 0x50, 0x00, 0x00, 0x59, 0x1e, // ...........P..Y. + 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x47, 0x59, 0x00, 0x00, 0x42, 0x13, // ..A.......GY..B. + 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ../.......=..... + 0x00, 0x00, 0x4e, 0x5c, 0x00, 0x00, 0x47, 0x59, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..N...GY........ + 0x00, 0x00, 0x28, 0x4d, 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, 0x4e, 0x5c, 0x00, 0x00, 0x81, 0x00, // ..(M..!...N..... + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0x28, 0x4d, // ..............(M + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3f, 0x28, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x39, 0x00, // ..>...?(......9. + 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x87, 0x22, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x3f, 0x28, // ......."......?( + 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x12, 0x5e, 0x00, 0x00, 0x87, 0x22, // ..Q........^..." + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x41, // ......Q.......+A + 0x00, 0x00, 0x87, 0x22, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..."......Q..... + 0x00, 0x00, 0xac, 0x59, 0x00, 0x00, 0x87, 0x22, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, // ...Y..."......P. + 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x85, 0x49, 0x00, 0x00, 0x12, 0x5e, 0x00, 0x00, 0x2b, 0x41, // .......I...^..+A + 0x00, 0x00, 0xac, 0x59, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3e, 0x1c, // ...Y......>...>. + 0x00, 0x00, 0x85, 0x49, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ...I......8.... }; -static const uint8_t fs_imgui_image_swizz_dx9[450] = +static const uint8_t fs_imgui_image_swizz_dx9[452] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... 0x00, 0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x12, 0x01, 0x01, // ....u_swizzle... - 0x00, 0x01, 0x00, 0x7c, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x36, 0x00, 0x43, 0x54, 0x41, // ...|.......6.CTA - 0x42, 0x1c, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x03, 0x00, 0x00, // B............... - 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, // .............X.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........d...... - 0x00, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, // .t.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // ................ - 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .........s_texCo - 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, // .....u_imageLodE - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, // nabled.......... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, // .........u_swizz - 0x6c, 0x65, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // le.ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x31, 0x00, 0xab, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, // 1....Q.......... - 0x3f, 0x00, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, // ?......L?..L>... - 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xd0, // ................ - 0xa0, 0x00, 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, // ................ - 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, // ._.............. - 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, // ................ - 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, // .......U........ - 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0x40, 0x80, 0xff, 0xff, 0x00, // ...........@.... - 0x00, 0x00, // .. + 0x00, 0x01, 0x00, 0x7c, 0x01, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x36, 0x00, 0x43, // ...|.........6.C + 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x03, // TAB............. + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x58, // ...............X + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, // ...........d.... + 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x88, // ...t............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, // ................ + 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, // Color........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, // .......u_imageLo + 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, // dEnabled........ + 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x73, 0x77, 0x69, // ...........u_swi + 0x7a, 0x7a, 0x6c, 0x65, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // zzle.ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, // 0.1....Q........ + 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, // ..?......L?..L>. + 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x02, // ................ + 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, // ................ + 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, // ..._............ + 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, // ................ + 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x04, // ................ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, // .........U...... + 0x00, 0xff, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0x40, 0x80, 0xff, // .............@.. + 0xff, 0x00, 0x00, 0x00, // .... }; -static const uint8_t fs_imgui_image_swizz_dx11[493] = +static const uint8_t fs_imgui_image_swizz_dx11[495] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x00, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x12, 0x00, 0x10, 0x00, // ...u_swizzle.... 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, // ...s_texColor0.. - 0x00, 0x01, 0x00, 0xa4, 0x01, 0x44, 0x58, 0x42, 0x43, 0x82, 0x53, 0x75, 0xc2, 0x4f, 0x7e, 0x06, // .....DXBC.Su.O~. - 0x0a, 0x49, 0x27, 0x42, 0x29, 0x01, 0x0a, 0x6a, 0x92, 0x01, 0x00, 0x00, 0x00, 0xa4, 0x01, 0x00, // .I'B)..j........ - 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, // .....,.......... - 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .ISGNP.......... - 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .8.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, // .SV_POSITION.TEX - 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, // COORD....OSGN,.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, // .SV_TARGET...SHD - 0x52, 0xe4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, // R....@...9...Y.. - 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, // .F. .........Z.. - 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, // ..`......X....p. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, // .....UU..b...2.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....e.... ..... - 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, // .h.......H...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, // .....F.......F~. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, // ......`........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .....F.......F. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x22, 0x00, 0x10, // .........2...".. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....... ........ - 0x00, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, // ..@....L?.@....L - 0x3e, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x10, // >6.... ......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, // .....>..... . + 0x00, 0x01, 0x00, 0xa4, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x82, 0x53, 0x75, 0xc2, 0x4f, // .......DXBC.Su.O + 0x7e, 0x06, 0x0a, 0x49, 0x27, 0x42, 0x29, 0x01, 0x0a, 0x6a, 0x92, 0x01, 0x00, 0x00, 0x00, 0xa4, // ~..I'B)..j...... + 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, // .......,........ + 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, // ...ISGNP........ + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ...8............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, // ...........D.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ................ + 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, // ...SV_POSITION.T + 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, // EXCOORD....OSGN, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // ........... .... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S + 0x48, 0x44, 0x52, 0xe4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x59, // HDR....@...9...Y + 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5a, // ...F. .........Z + 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, // ....`......X.... + 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, // p......UU..b...2 + 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, // ...h.......H.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // .......F.......F + 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // ~.......`....... + 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x08, 0x12, // . .............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // .......F.......F + 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x22, // . .........2..." + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x01, 0x40, 0x00, 0x00, 0xcd, // ....@....L?.@... + 0xcc, 0x4c, 0x3e, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, // .L>6.... ....... + 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, // .......>..... . }; static const uint8_t fs_imgui_image_swizz_mtl[950] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x02, 0x01, 0x00, 0x00, // ...u_swizzle.... 0x01, 0x00, 0x7f, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, // ......using name diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h index b663f8e..74c5a5f 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_imgui_latlong_glsl[651] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, // ...s_texColor... 0x00, 0x01, 0x00, 0x53, 0x02, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // ...S...varying h @@ -42,366 +42,373 @@ static const uint8_t fs_imgui_latlong_glsl[651] = 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_4;.}... }; -static const uint8_t fs_imgui_latlong_spv[4373] = +static const uint8_t fs_imgui_latlong_spv[4495] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, 0x00, // geLodEnabled.... - 0x01, 0x00, 0xf0, 0x10, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, // ......#......... - 0x75, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // ub.............. - 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std - 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ - 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ - 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, // main....t....... - 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ - 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....main........ - 0x67, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, // g...BgfxSamplerC - 0x75, 0x62, 0x65, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ube.....g....... - 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // m_sampler....... - 0x67, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // g.......m_textur - 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x11, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, // e...........bgfx - 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x28, 0x73, // TextureCubeLod(s - 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, // truct-BgfxSample - 0x72, 0x43, 0x75, 0x62, 0x65, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, // rCube-p1-tC11;vf - 0x33, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, // 3;f1;.......'... - 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // _sampler........ - 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ...._coord...... - 0x2e, 0x12, 0x00, 0x00, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ...._level...... - 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, // 5...vec4_splat(f - 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, // 1;.........._x.. - 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0c, 0x00, 0x00, 0x76, 0x65, 0x63, 0x46, 0x72, 0x6f, 0x6d, 0x4c, // ........vecFromL - 0x61, 0x74, 0x4c, 0x6f, 0x6e, 0x67, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x03, 0x00, // atLong(vf2;..... - 0x73, 0x10, 0x00, 0x00, 0x5f, 0x75, 0x76, 0x00, 0x05, 0x00, 0x06, 0x00, 0xe8, 0x16, 0x00, 0x00, // s..._uv......... - 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // @main(vf2;vf4;.. - 0x05, 0x00, 0x05, 0x00, 0x5b, 0x4c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ....[L..v_texcoo - 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x55, 0x3d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // rd0.....U=..gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // ragData_0_...... - 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, // C...s_texColor.. - 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // ........s_texCol - 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, // orSampler....... - 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, // ....s_texColorTe - 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x43, 0x08, 0x00, 0x00, // xture.......C... - 0x70, 0x69, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xbf, 0x15, 0x00, 0x00, 0x74, 0x77, 0x6f, 0x50, // pi..........twoP - 0x69, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xca, 0x0c, 0x00, 0x00, 0x70, 0x68, 0x69, 0x00, // i...........phi. - 0x05, 0x00, 0x04, 0x00, 0xb3, 0x13, 0x00, 0x00, 0x74, 0x68, 0x65, 0x74, 0x61, 0x00, 0x00, 0x00, // ........theta... - 0x05, 0x00, 0x04, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x00, 0x00, // ........result.. - 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, // ........bgfx_Voi - 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x13, 0x57, 0x00, 0x00, // dFrag........W.. - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x46, 0x17, 0x00, 0x00, // param.......F... - 0x64, 0x69, 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // dir.....JP..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, // m...........colo - 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x19, 0x03, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, // r...........$Glo - 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x19, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // bal............. - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_viewRect...... - 0x19, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, // ........u_viewTe - 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // xel............. - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x19, 0x03, 0x00, 0x00, // u_view.......... - 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, // ....u_invView... - 0x06, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, // ............u_pr - 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x19, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // oj.............. - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_invProj....... - 0x19, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // ........u_viewPr - 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x19, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // oj.............. - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // u_invViewProj... - 0x06, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo - 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x19, 0x03, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // del............. - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, // u_modelView..... - 0x19, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // ........u_modelV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x19, 0x03, 0x00, 0x00, // iewProj......... - 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, // ....u_alphaRef4. - 0x06, 0x00, 0x08, 0x00, 0x19, 0x03, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, // ............u_im - 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00, 0x00, 0x00, // ageLodEnabled... - 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....B........... - 0x6d, 0x33, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // m3..param....... - 0x07, 0x31, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .1..param....... - 0xf3, 0x10, 0x00, 0x00, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // ....alpha....... - 0xee, 0x40, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // .@..v_texcoord0. - 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ....t...v_texcoo - 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // rd0.........gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ragData_0_...... - 0xef, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .G..param....... - 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....param....... - 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // ....gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, // 0_..G......."... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, // ....G.......!... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, // ....G......."... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, // ....G.......!... - 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x35, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ....G...5....... - 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // @...H........... - 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, // #.......H....... - 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ....#.......H... - 0x19, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x19, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ........#... ... - 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x19, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....H........... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, // #...`...H....... - 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x19, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x19, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, // ........#....... - 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x19, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, // #.......H....... - 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x19, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x19, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, // ........#... ... - 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x19, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....H........... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, // #...`...H....... - 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x19, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x19, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, // ........#....... - 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x19, 0x03, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, // #.......H....... - 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x19, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x19, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, // ........#....... - 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H............... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x19, 0x03, 0x00, 0x00, // #... ...H....... - 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#...0...G... - 0x19, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ........G...B... - 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, // ".......G...t... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ........G....... - 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ - 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, // !............... - 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x19, 0x00, 0x09, 0x00, 0x98, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, // ........g....... - 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ...!....... - 0x67, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // g............... - 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... - 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... - 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xaf, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....!........... - 0x21, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, // !...........!... - 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // ................ - 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, // ............!... - 0xf7, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, // ............!... - 0x1f, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, // ................ - 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;...!...C....... - 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, // ...y........... - 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;...y........... - 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ;............... - 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........ ....... - 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // +............... - 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... - 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0d, 0x00, 0x00, 0x00, 0x43, 0x08, 0x00, 0x00, 0xdb, 0x0f, 0x49, 0x40, 0x2b, 0x00, 0x04, 0x00, // ....C.....I@+... - 0x0d, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0x00, 0x04, 0x00, // ...........@.... - 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... - 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0b, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... - 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ - 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // e...........+... - 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... - 0x35, 0x09, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, // 5...e...j....... - 0x19, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... - 0x65, 0x00, 0x00, 0x00, 0x35, 0x09, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...5...e...e... - 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x05, 0x00, 0x00, // ........ ....... - 0x02, 0x00, 0x00, 0x00, 0x19, 0x03, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x05, 0x00, 0x00, // ........;....... - 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // B.......+....... - 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, // /....... ....... - 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........+....... - 0x05, 0x0b, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ......L>+....... - 0x21, 0x0a, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, // !.....L? ....... - 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, // ........;....... - 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, // t....... ....... - 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, // ........;....... - 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, // ........6....... - 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // ................ - 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, // Sa..;........G.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // ....;........... - 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, // ....=.......!C.. - 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, // ....=........3.. - 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, // ....P...g.... .. - 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, // !C...3..>...C... - 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // . ..=........@.. - 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // t...>....G...@.. - 0x39, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, 0xe8, 0x16, 0x00, 0x00, // 9.......ya...... - 0xef, 0x47, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .G......=....... - 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ........>....... - 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, // ........8...6... - 0x1d, 0x00, 0x00, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0x04, 0x00, 0x00, // ................ - 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7...!...'...7... - 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........7....... - 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ........$T..A... - 0x15, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ........'....... - 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, // =.......m)...... - 0x41, 0x00, 0x05, 0x00, 0x79, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // A...y....U..'... - 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, // ....=........N.. - 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, // .U..V.......29.. - 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // m)...N..=....... - 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........=....... - 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // =>......X....... - 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....29.......... - 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // =>..........8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6.......5....... - 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // ....7........... - 0xf8, 0x00, 0x02, 0x00, 0x2e, 0x5f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ....._..=....... - 0xe0, 0x5b, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .[......=....... - 0x25, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // %S......=....... - 0xc5, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .=......=....... - 0xd8, 0x3d, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // .=......P....... - 0x56, 0x5b, 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0x25, 0x53, 0x00, 0x00, 0xc5, 0x3d, 0x00, 0x00, // V[...[..%S...=.. - 0xd8, 0x3d, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x56, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // .=......V[..8... - 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcd, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0xf7, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x73, 0x10, 0x00, 0x00, // ....7.......s... - 0xf8, 0x00, 0x02, 0x00, 0xb4, 0x33, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // .....3..;....... - 0xa2, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ - 0xbf, 0x15, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x43, 0x08, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ........C...A... - 0x8a, 0x02, 0x00, 0x00, 0x01, 0x38, 0x00, 0x00, 0x73, 0x10, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, // .....8..s....... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xac, 0x54, 0x00, 0x00, 0x01, 0x38, 0x00, 0x00, // =........T...8.. - 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xca, 0x0c, 0x00, 0x00, 0xac, 0x54, 0x00, 0x00, // .............T.. - 0xbf, 0x15, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4e, 0x3e, 0x00, 0x00, // ....A.......N>.. - 0x73, 0x10, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // s.......=....... - 0xca, 0x50, 0x00, 0x00, 0x4e, 0x3e, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .P..N>.......... - 0xb3, 0x13, 0x00, 0x00, 0xca, 0x50, 0x00, 0x00, 0x43, 0x08, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, // .....P..C....... - 0x0d, 0x00, 0x00, 0x00, 0x37, 0x35, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ....75.......... - 0xb3, 0x13, 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9c, 0x5c, 0x00, 0x00, // ................ - 0x37, 0x35, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x68, 0x32, 0x00, 0x00, // 75..........h2.. - 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xca, 0x0c, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x90, 0x32, 0x00, 0x00, 0x9c, 0x5c, 0x00, 0x00, 0x68, 0x32, 0x00, 0x00, // .....2......h2.. - 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x48, 0x44, 0x00, 0x00, 0xa2, 0x10, 0x00, 0x00, // A.......HD...... - 0x0a, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x48, 0x44, 0x00, 0x00, 0x90, 0x32, 0x00, 0x00, // ....>...HD...2.. - 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfa, 0x57, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .........W...... - 0x0e, 0x00, 0x00, 0x00, 0xb3, 0x13, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........A....... - 0xcf, 0x38, 0x00, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .8..........>... - 0xcf, 0x38, 0x00, 0x00, 0xfa, 0x57, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, // .8...W.......... - 0x3e, 0x42, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x13, 0x00, 0x00, // >B.............. - 0x7f, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x1a, 0x00, 0x00, 0x3e, 0x42, 0x00, 0x00, // ............>B.. - 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x96, 0x1a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x0e, 0x00, 0x00, 0x00, 0xca, 0x0c, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ - 0x2b, 0x3a, 0x00, 0x00, 0xb3, 0x1a, 0x00, 0x00, 0x96, 0x1a, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // +:..........A... - 0x8a, 0x02, 0x00, 0x00, 0xaf, 0x3c, 0x00, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, // .....<.......... - 0x3e, 0x00, 0x03, 0x00, 0xaf, 0x3c, 0x00, 0x00, 0x2b, 0x3a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >....<..+:..=... - 0x18, 0x00, 0x00, 0x00, 0x85, 0x41, 0x00, 0x00, 0xa2, 0x10, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, // .....A.......... - 0x85, 0x41, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, // .A..8...6....... - 0xe8, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // ............7... - 0x90, 0x02, 0x00, 0x00, 0x5b, 0x4c, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....[L..7....... - 0x55, 0x3d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xf0, 0x1b, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // U=..........;... - 0x8a, 0x02, 0x00, 0x00, 0x13, 0x57, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....W......;... - 0x90, 0x02, 0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ....JP......;... - 0x95, 0x02, 0x00, 0x00, 0x6d, 0x33, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ....m3......;... - 0x8a, 0x02, 0x00, 0x00, 0x07, 0x31, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .....1......>... - 0x13, 0x57, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // .W......9....... - 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x13, 0x57, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....5....W..=... - 0x13, 0x00, 0x00, 0x00, 0x86, 0x53, 0x00, 0x00, 0x5b, 0x4c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .....S..[L..>... - 0x4a, 0x50, 0x00, 0x00, 0x86, 0x53, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, // JP...S..9....... - 0x46, 0x17, 0x00, 0x00, 0xcd, 0x0c, 0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // F.......JP..>... - 0x6d, 0x33, 0x00, 0x00, 0x46, 0x17, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, // m3..F...A....... - 0x19, 0x2f, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, // ./..B.../....... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x4c, 0x19, 0x00, 0x00, 0x19, 0x2f, 0x00, 0x00, // =.......L..../.. - 0x3e, 0x00, 0x03, 0x00, 0x07, 0x31, 0x00, 0x00, 0x4c, 0x19, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, // >....1..L...9... - 0x1d, 0x00, 0x00, 0x00, 0x4d, 0x50, 0x00, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, // ....MP......C... - 0x6d, 0x33, 0x00, 0x00, 0x07, 0x31, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, // m3...1..O....... - 0x18, 0x0e, 0x00, 0x00, 0x4d, 0x50, 0x00, 0x00, 0x4d, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....MP..MP...... - 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, // ........A....... - 0xa9, 0x22, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, // ."..B.../....... - 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe1, 0x48, 0x00, 0x00, 0xa9, 0x22, 0x00, 0x00, // =........H...".. - 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x3e, 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, // ........ >..!... - 0xe1, 0x48, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, // .H.............. - 0x05, 0x0b, 0x00, 0x00, 0x20, 0x3e, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .... >..Q....... - 0x3f, 0x24, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // ?$..........Q... - 0x0d, 0x00, 0x00, 0x00, 0xb9, 0x31, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .....1.......... - 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x74, 0x62, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, // Q.......tb...... - 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x4d, 0x52, 0x00, 0x00, // ....P.......MR.. - 0x3f, 0x24, 0x00, 0x00, 0xb9, 0x31, 0x00, 0x00, 0x74, 0x62, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, // ?$...1..tb...... - 0x3e, 0x00, 0x03, 0x00, 0x55, 0x3d, 0x00, 0x00, 0x4d, 0x52, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >...U=..MR...... - 0x38, 0x00, 0x01, 0x00, 0x00, // 8.... + 0x01, 0x00, 0x68, 0x11, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, // ..h.....#....... + 0x08, 0x00, 0x75, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, // ..ub............ + 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, // ..........GLSL.s + 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, // td.450.......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, // ..main....t..... + 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x67, 0x09, // ..main........g. + 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, // ..BgfxSamplerCub + 0x65, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, // e.....g.......m_ + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, // sampler.......g. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, // ......m_texture. + 0x00, 0x00, 0x05, 0x00, 0x11, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, // ..........bgfxTe + 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, // xtureCubeLod(str + 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, // uct-BgfxSamplerC + 0x75, 0x62, 0x65, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, // ube-p1-tC11;vf3; + 0x66, 0x31, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, // f1;.......'..._s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, // ampler.......... + 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, // .._coord........ + 0x00, 0x00, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, // .._level......5. + 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, // ..vec4_splat(f1; + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, // .........._x.... + 0x07, 0x00, 0xcd, 0x0c, 0x00, 0x00, 0x76, 0x65, 0x63, 0x46, 0x72, 0x6f, 0x6d, 0x4c, 0x61, 0x74, // ......vecFromLat + 0x4c, 0x6f, 0x6e, 0x67, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x03, 0x00, 0x73, 0x10, // Long(vf2;.....s. + 0x00, 0x00, 0x5f, 0x75, 0x76, 0x00, 0x05, 0x00, 0x06, 0x00, 0xe8, 0x16, 0x00, 0x00, 0x40, 0x6d, // .._uv.........@m + 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, // ain(vf2;vf4;.... + 0x05, 0x00, 0x5b, 0x4c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..[L..v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x55, 0x3d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // 0.....U=..gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, // gData_0_......C. + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, // ..s_texColor.... + 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ......s_texColor + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, // Sampler......... + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, // ..s_texColorText + 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x43, 0x08, 0x00, 0x00, 0x70, 0x69, // ure.......C...pi + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xbf, 0x15, 0x00, 0x00, 0x74, 0x77, 0x6f, 0x50, 0x69, 0x00, // ..........twoPi. + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xca, 0x0c, 0x00, 0x00, 0x70, 0x68, 0x69, 0x00, 0x05, 0x00, // ..........phi... + 0x04, 0x00, 0xb3, 0x13, 0x00, 0x00, 0x74, 0x68, 0x65, 0x74, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, // ......theta..... + 0x04, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x00, 0x00, 0x05, 0x00, // ......result.... + 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, // ......bgfx_VoidF + 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x13, 0x57, 0x00, 0x00, 0x70, 0x61, // rag........W..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x46, 0x17, 0x00, 0x00, 0x64, 0x69, // ram.......F...di + 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // r.....JP..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // ..........color. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, // ......<...$Globa + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....<.......u_ + 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, // viewRect......<. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, // ......u_viewTexe + 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....<.......u_ + 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, // view......<..... + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invView..... + 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, // ..<.......u_proj + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......<.......u_ + 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, // invProj.......<. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ......u_viewProj + 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......<.......u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // invViewProj..... + 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..<.......u_mode + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.....<.......u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3c, 0x02, // modelView.....<. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0b, 0x00, // wProj.....<..... + 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, // ..u_alphaRef4... + 0x08, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, // ..<.......u_imag + 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, // eLodEnabled..... + 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x34, 0x33, // ..B...........43 + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x6d, 0x33, // ..param.......m3 + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x07, 0x31, // ..param........1 + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf3, 0x10, // ..param......... + 0x00, 0x00, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xee, 0x40, // ..alpha........@ + 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... + 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..t...v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // 0.........gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xef, 0x47, // gData_0_.......G + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, // ..param......... + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, // ..param......... + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G......."..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G.......!..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G......."..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G.......!..... + 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4c, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, // ..G...L.......@. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...<.......#. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x01, 0x00, // ......H...<..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, // ..#.......H...<. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, // ..........H...<. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. + 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..<............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...<......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...<.......#. + 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, // ..`...H...<..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, // ..........H...<. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, // ..........H...<. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..<............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...<......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...<.......#. + 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, // ......H...<..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, // ..........H...<. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, // ..........H...<. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. + 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..<............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...<......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...<.......#. + 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, // ..`...H...<..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, // ..........H...<. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, // ..........H...<. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..<............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...<......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...<.......#. + 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, // ......H...<..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, // ..........H...<. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, // ..........H...<. + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..<............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...<.......#. + 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0c, 0x00, // .. ...H...<..... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x3c, 0x02, // ..#...0...G...<. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, // ......G...B...". + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, // ......G...t..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, // ......G......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, // ................ + 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, // .......... ..... + 0x09, 0x00, 0x98, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x98, 0x00, // ......g......... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x67, 0x09, // .. ...!.......g. + 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, // .. ............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. + 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xaf, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, // ..!...........!. + 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, // ..........!..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, // ................ + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xf7, 0x00, // ..........!..... + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x1f, 0x0b, // ..........!..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x3b, 0x00, // ..".......g...;. + 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, // .."...C....... . + 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, // ..y...........;. + 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, // ..y........... . + 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, // ................ + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x16, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, // ..z............. + 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... + 0x00, 0x00, 0x43, 0x08, 0x00, 0x00, 0xdb, 0x0f, 0x49, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..C.....I@+..... + 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // .........@...... + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... + 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // ..........+..... + 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // ..........+..... + 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // ..............e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // ..........+..... + 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x4c, 0x0a, // ..j... .......L. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, 0x3c, 0x02, // ..e...j.......<. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x4c, 0x0a, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ..L...e...e..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb9, 0x04, 0x00, 0x00, 0x02, 0x00, // ...... ......... + 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb9, 0x04, 0x00, 0x00, 0x42, 0x13, // ..<...;.......B. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, // ......+......./. + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, // ...... ......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x05, 0x0b, // ......+......... + 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3e, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x0a, // ....L>+.......!. + 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, // ....L? ......... + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, // ......;.......t. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xd1, 0x0d, // ......;......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, // ......6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, // ..............Sa + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xef, 0x47, 0x00, 0x00, 0x07, 0x00, // ..;........G.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, // ..=.......!C.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, // ..=........3.... + 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, // ..P...g.... ..!C + 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, // ...3..>...C.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x74, 0x14, // ..=........@..t. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xef, 0x47, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x39, 0x00, // ..>....G...@..9. + 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x79, 0x61, 0x00, 0x00, 0xe8, 0x16, 0x00, 0x00, 0xef, 0x47, // ......ya.......G + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, // ......=......... + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, // ......>......... + 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ......8...6..... + 0x00, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0x04, 0x00, 0x00, 0x37, 0x00, // ..............7. + 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, // ..!...'...7..... + 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x2e, 0x12, // ......7......... + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x16, 0x03, // ......$T..A..... + 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ......'.......=. + 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x41, 0x00, // ......m)......A. + 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, // ..z....U..'..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0xe4, 0x55, // ..=........N...U + 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0x6d, 0x29, // ..V.......29..m) + 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcd, 0x19, // ...N..=......... + 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3d, 0x3e, // ......=.......=> + 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x11, 0x1c, // ......X......... + 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3d, 0x3e, // ..29..........=> + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ..........8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, // ......5......... + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, // ..7............. + 0x02, 0x00, 0x2e, 0x5f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe0, 0x5b, // ..._..=........[ + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x25, 0x53, // ......=.......%S + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc5, 0x3d, // ......=........= + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd8, 0x3d, // ......=........= + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x56, 0x5b, // ......P.......V[ + 0x00, 0x00, 0xe0, 0x5b, 0x00, 0x00, 0x25, 0x53, 0x00, 0x00, 0xc5, 0x3d, 0x00, 0x00, 0xd8, 0x3d, // ...[..%S...=...= + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x56, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ......V[..8...6. + 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcd, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf7, 0x00, // ................ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x73, 0x10, 0x00, 0x00, 0xf8, 0x00, // ..7.......s..... + 0x02, 0x00, 0xb4, 0x33, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xa2, 0x10, // ...3..;......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xbf, 0x15, // ................ + 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x43, 0x08, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ......C...A..... + 0x00, 0x00, 0x01, 0x38, 0x00, 0x00, 0x73, 0x10, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ...8..s.......=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xac, 0x54, 0x00, 0x00, 0x01, 0x38, 0x00, 0x00, 0x85, 0x00, // .......T...8.... + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xca, 0x0c, 0x00, 0x00, 0xac, 0x54, 0x00, 0x00, 0xbf, 0x15, // ...........T.... + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4e, 0x3e, 0x00, 0x00, 0x73, 0x10, // ..A.......N>..s. + 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xca, 0x50, // ......=........P + 0x00, 0x00, 0x4e, 0x3e, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x13, // ..N>............ + 0x00, 0x00, 0xca, 0x50, 0x00, 0x00, 0x43, 0x08, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, // ...P..C......... + 0x00, 0x00, 0x37, 0x35, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x13, // ..75............ + 0x00, 0x00, 0x7f, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9c, 0x5c, 0x00, 0x00, 0x37, 0x35, // ..............75 + 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x68, 0x32, 0x00, 0x00, 0x01, 0x00, // ..........h2.... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xca, 0x0c, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x90, 0x32, 0x00, 0x00, 0x9c, 0x5c, 0x00, 0x00, 0x68, 0x32, 0x00, 0x00, 0x41, 0x00, // ...2......h2..A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x48, 0x44, 0x00, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x0a, 0x0a, // ......HD........ + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x48, 0x44, 0x00, 0x00, 0x90, 0x32, 0x00, 0x00, 0x0c, 0x00, // ..>...HD...2.... + 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfa, 0x57, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, // .......W........ + 0x00, 0x00, 0xb3, 0x13, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xcf, 0x38, // ......A........8 + 0x00, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xcf, 0x38, // ..........>....8 + 0x00, 0x00, 0xfa, 0x57, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3e, 0x42, // ...W..........>B + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x13, 0x00, 0x00, 0x7f, 0x00, // ................ + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x1a, 0x00, 0x00, 0x3e, 0x42, 0x00, 0x00, 0x0c, 0x00, // ..........>B.... + 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x96, 0x1a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, // ................ + 0x00, 0x00, 0xca, 0x0c, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x3a, // ..............+: + 0x00, 0x00, 0xb3, 0x1a, 0x00, 0x00, 0x96, 0x1a, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ..........A..... + 0x00, 0x00, 0xaf, 0x3c, 0x00, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ...<..........>. + 0x03, 0x00, 0xaf, 0x3c, 0x00, 0x00, 0x2b, 0x3a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, // ...<..+:..=..... + 0x00, 0x00, 0x85, 0x41, 0x00, 0x00, 0xa2, 0x10, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x85, 0x41, // ...A...........A + 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe8, 0x16, // ..8...6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ..........7..... + 0x00, 0x00, 0x5b, 0x4c, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x55, 0x3d, // ..[L..7.......U= + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xf0, 0x1b, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, // ..........;..... + 0x00, 0x00, 0x13, 0x57, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, // ...W......;..... + 0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, // ..JP......;...!. + 0x00, 0x00, 0x34, 0x33, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, // ..43......;..... + 0x00, 0x00, 0x6d, 0x33, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, // ..m3......;..... + 0x00, 0x00, 0x07, 0x31, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x13, 0x57, // ...1......>....W + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, // ......9......... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x13, 0x57, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ..5....W..=..... + 0x00, 0x00, 0x86, 0x53, 0x00, 0x00, 0x5b, 0x4c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x4a, 0x50, // ...S..[L..>...JP + 0x00, 0x00, 0x86, 0x53, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x46, 0x17, // ...S..9.......F. + 0x00, 0x00, 0xcd, 0x0c, 0x00, 0x00, 0x4a, 0x50, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x67, 0x09, // ......JP..=...g. + 0x00, 0x00, 0xe5, 0x53, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x34, 0x33, // ...S..C...>...43 + 0x00, 0x00, 0xe5, 0x53, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x6d, 0x33, 0x00, 0x00, 0x46, 0x17, // ...S..>...m3..F. + 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x3d, 0x32, 0x00, 0x00, 0x42, 0x13, // ..A.......=2..B. + 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ../.......=..... + 0x00, 0x00, 0x4c, 0x19, 0x00, 0x00, 0x3d, 0x32, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x07, 0x31, // ..L...=2..>....1 + 0x00, 0x00, 0x4c, 0x19, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x4d, 0x50, // ..L...9.......MP + 0x00, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x34, 0x33, 0x00, 0x00, 0x6d, 0x33, 0x00, 0x00, 0x07, 0x31, // ......43..m3...1 + 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x4d, 0x50, // ..O...........MP + 0x00, 0x00, 0x4d, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, // ..MP............ + 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xa9, 0x22, 0x00, 0x00, 0x42, 0x13, // ..A........"..B. + 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ../.......=..... + 0x00, 0x00, 0xe1, 0x48, 0x00, 0x00, 0xa9, 0x22, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, // ...H..."........ + 0x00, 0x00, 0x20, 0x3e, 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, 0xe1, 0x48, 0x00, 0x00, 0x81, 0x00, // .. >..!....H.... + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x00, 0x20, 0x3e, // .............. > + 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3f, 0x24, 0x00, 0x00, 0x18, 0x0e, // ..Q.......?$.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb9, 0x31, // ......Q........1 + 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..........Q..... + 0x00, 0x00, 0x74, 0x62, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, // ..tb..........P. + 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x4d, 0x52, 0x00, 0x00, 0x3f, 0x24, 0x00, 0x00, 0xb9, 0x31, // ......MR..?$...1 + 0x00, 0x00, 0x74, 0x62, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x55, 0x3d, // ..tb......>...U= + 0x00, 0x00, 0x4d, 0x52, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..MR......8.... }; -static const uint8_t fs_imgui_latlong_dx9[546] = +static const uint8_t fs_imgui_latlong_dx9[548] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... - 0x00, 0x01, 0x00, 0xec, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, 0x54, 0x41, // .............CTA - 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, // B............... - 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .............D.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, // .`...........t.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // .....s_texColor. - 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, // .u_imageLodEnabl - 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // ed.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, // 0.1..Q.......... - 0x3f, 0xdb, 0x0f, 0xc9, 0x40, 0xdb, 0x0f, 0x49, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, // ?...@..I.....Q.. - 0x05, 0x02, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x00, 0x00, 0x00, // .......L?..L>... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, // ................ - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x02, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x13, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x55, 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, 0x00, 0x00, // .......U.....%.. - 0x02, 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x55, 0x90, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0xa0, 0x13, 0x00, 0x00, // ...U............ - 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x55, 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, 0x00, 0x00, // .......U.....%.. - 0x02, 0x02, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x05, // ................ - 0x80, 0x01, 0x00, 0xc5, 0x80, 0x02, 0x00, 0x55, 0x81, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // .......U........ - 0x80, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, // ................ - 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, // ._.............. - 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, // .......U........ - 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, 0xa0, 0xff, 0xff, 0x00, // ...U.......U.... - 0x00, 0x00, // .. + 0x00, 0x01, 0x00, 0xec, 0x01, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, // ...............C + 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, // TAB............. + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, // ...............D + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, // ...`...........t + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, // .......s_texColo + 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, // ...u_imageLodEna + 0x62, 0x6c, 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, // bled............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......ps_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, // 10.1..Q........ + 0x00, 0x00, 0x3f, 0xdb, 0x0f, 0xc9, 0x40, 0xdb, 0x0f, 0x49, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x51, // ..?...@..I.....Q + 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x00, // .........L?..L>. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, // ................ + 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x02, // ................ + 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x13, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x55, 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, // .........U.....% + 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x90, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0xa0, 0x13, // .....U.......... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x55, 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, // .........U.....% + 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x05, 0x80, 0x01, 0x00, 0xc5, 0x80, 0x02, 0x00, 0x55, 0x81, 0x01, 0x00, 0x00, 0x02, 0x00, // .........U...... + 0x00, 0x02, 0x80, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, // ................ + 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, // ..._............ + 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, // .........U...... + 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, 0xa0, 0xff, // .....U.......U.. + 0xff, 0x00, 0x00, 0x00, // .... }; -static const uint8_t fs_imgui_latlong_dx11[617] = +static const uint8_t fs_imgui_latlong_dx11[619] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x00, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, // ...s_texColor0.. - 0x00, 0x01, 0x00, 0x30, 0x02, 0x44, 0x58, 0x42, 0x43, 0x8e, 0x4b, 0x65, 0x9b, 0x2e, 0xce, 0x92, // ...0.DXBC.Ke.... - 0x33, 0xf0, 0xfb, 0x9d, 0x50, 0x09, 0x30, 0x0b, 0xf1, 0x01, 0x00, 0x00, 0x00, 0x30, 0x02, 0x00, // 3...P.0......0.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, // .....,.......... - 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .ISGNP.......... - 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .8.............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, // .SV_POSITION.TEX - 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, // COORD....OSGN,.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, // .SV_TARGET...SHD - 0x52, 0x70, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, // Rp...@.......Y.. - 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, // .F. .........Z.. - 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, 0x04, 0x00, 0x70, 0x10, // ..`......X0...p. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, // .....UU..b...2.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....e.... ..... - 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, // .h.......8...2.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, // ..............@. - 0x00, 0xdb, 0x0f, 0x49, 0x40, 0xdb, 0x0f, 0xc9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...I@...@....... - 0x00, 0x4d, 0x00, 0x00, 0x06, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x00, // .M...B.......... - 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, // .........M...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, // .............A.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x06, 0x00, 0xd0, 0x00, 0x00, 0x62, 0x00, 0x10, // .....M.......b.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, // .............8.. - 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .........*...... - 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, // .:.......8...... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, // .....:.......*.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .....H.......... - 0x00, 0x46, 0x03, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, // .F.......F~..... - 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, // ..`........ .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....6...r ..... - 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x82, 0x20, 0x10, // .F.......2.... . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....... ........ - 0x00, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, // ..@....L?.@....L - 0x3e, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // >>....... + 0x00, 0x01, 0x00, 0x30, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x8e, 0x4b, 0x65, 0x9b, 0x2e, // ...0...DXBC.Ke.. + 0xce, 0x92, 0x33, 0xf0, 0xfb, 0x9d, 0x50, 0x09, 0x30, 0x0b, 0xf1, 0x01, 0x00, 0x00, 0x00, 0x30, // ..3...P.0......0 + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0xb8, // .......,........ + 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, // ...ISGNP........ + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ...8............ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, // ...........D.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ................ + 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, // ...SV_POSITION.T + 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, // EXCOORD....OSGN, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // ........... .... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S + 0x48, 0x44, 0x52, 0x70, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x59, // HDRp...@.......Y + 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5a, // ...F. .........Z + 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, 0x04, 0x00, // ....`......X0... + 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, // p......UU..b...2 + 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0x32, // ...h.......8...2 + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, // ................ + 0x40, 0x00, 0x00, 0xdb, 0x0f, 0x49, 0x40, 0xdb, 0x0f, 0xc9, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // @....I@...@..... + 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x06, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...M...B........ + 0xd0, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x07, 0x82, // ...........M.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x80, 0x41, // ...............A + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x00, 0x06, 0x00, 0xd0, 0x00, 0x00, 0x62, // .......M.......b + 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, // ...............8 + 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, // ...........*.... + 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, // ...:.......8.... + 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, // .......:.......* + 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x00, // .......H........ + 0x00, 0x00, 0x00, 0x46, 0x03, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, // ...F.......F~... + 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, // ....`........ .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, // .......6...r ... + 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x82, // ...F.......2.... + 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ...... + 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0x01, 0x40, 0x00, 0x00, 0xcd, // ....@....L?.@... + 0xcc, 0x4c, 0x3e, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // .L>>....... }; static const uint8_t fs_imgui_latlong_mtl[1038] = { - 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima + 0x46, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, 0x61, // FSH.o.><...u_ima 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x02, 0x01, 0x00, 0x00, // geLodEnabled.... 0x01, 0x00, 0xe7, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, // ......using name 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, // space metal;.str diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h index 0447442..5757299 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_imgui_texture_glsl[290] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x76, // Color..........v 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary @@ -20,275 +20,283 @@ static const uint8_t fs_imgui_texture_glsl[290] = 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, // r = tmpvar_1;.}. 0x0a, 0x00, // .. }; -static const uint8_t fs_imgui_texture_spv[3417] = +static const uint8_t fs_imgui_texture_spv[3539] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x4c, 0x0d, 0x03, 0x02, 0x23, 0x07, // FSH.......L...#. - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........Ta...... - 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, // GLSL.std.450.... - 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, // ........main.... - 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, // w...t........... - 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ - 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, // main........a... - 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, // BgfxSampler2D... - 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, // ....a.......m_sa - 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, // mpler.......a... - 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, // ....m_texture... - 0x05, 0x00, 0x0e, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, // ........bgfxText - 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, // ure2D(struct-Bgf - 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, // xSampler2D-p1-t2 - 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, // 11;vf2;.....'... - 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // _sampler........ - 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ...._coord...... - 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, // 5...vec4_splat(f - 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, // 1;.........._x.. - 0x05, 0x00, 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, // ........@main(vf - 0x34, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // 4;vf2;vf4;...... - 0x42, 0x24, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // B$..v_color0.... - 0x05, 0x00, 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ....x ..v_texcoo - 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // rd0......A..gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // ragData_0_...... - 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, // C...s_texColor.. - 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // ........s_texCol - 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, // orSampler....... - 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, // ....s_texColorTe - 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, // xture........... - 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, // bgfx_VoidFrag... - 0x05, 0x00, 0x04, 0x00, 0x0e, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // .....U..param... - 0x05, 0x00, 0x04, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, // ........alpha... - 0x05, 0x00, 0x04, 0x00, 0xdf, 0x4b, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // .....K..param... - 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // .....A..v_color0 - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, // ........w...v_co - 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, // lor0.........<.. - 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // v_texcoord0..... - 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // t...v_texcoord0. - 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // ........gl_FragD - 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, // ata_0_.......G.. - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, // param........U.. - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, // param........... - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, // param........... - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, // gl_FragData_0_.. - 0x05, 0x00, 0x04, 0x00, 0x44, 0x06, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ....D...$Global. - 0x06, 0x00, 0x06, 0x00, 0x44, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....D.......u_vi - 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x44, 0x06, 0x00, 0x00, // ewRect......D... - 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. - 0x06, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....D.......u_vi - 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x44, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew......D....... - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... - 0x44, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // D.......u_proj.. - 0x06, 0x00, 0x06, 0x00, 0x44, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ....D.......u_in - 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x44, 0x06, 0x00, 0x00, // vProj.......D... - 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. - 0x06, 0x00, 0x07, 0x00, 0x44, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ....D.......u_in - 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... - 0x44, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // D.......u_model. - 0x06, 0x00, 0x06, 0x00, 0x44, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ....D.......u_mo - 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x44, 0x06, 0x00, 0x00, // delView.....D... - 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP - 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x44, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj.....D....... - 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, // u_alphaRef4.G... - 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // ....".......G... - 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // ....!.......G... - 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // ....".......G... - 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // ....!.......G... - 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // w...........G... - 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // t...........G... - 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // ............G... - 0xc3, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ........@...H... - 0x44, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // D.......#....... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...D.......#... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x44, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....H...D....... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....H...D....... - 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, // #... ...H...D... - 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x44, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // D...........H... - 0x44, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, // D.......#...`... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...D........... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x44, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H...D....... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H...D....... - 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, // #.......H...D... - 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x44, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // D...........H... - 0x44, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, // D.......#....... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...D........... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x44, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ....H...D....... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ....H...D....... - 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, // #... ...H...D... - 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x44, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // D...........H... - 0x44, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, // D.......#...`... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...D........... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x44, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H...D....... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H...D....... - 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, // #.......H...D... - 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... - 0x44, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // D...........H... - 0x44, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, // D.......#....... - 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...D........... - 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x44, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H...D....... - 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H...D....... - 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x44, 0x06, 0x00, 0x00, // #.......H...D... - 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... - 0x44, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, // D.......#... ... - 0x47, 0x00, 0x03, 0x00, 0x44, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, // G...D........... - 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....!........... - 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ - 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ............... - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, // ............a... - 0xfc, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, // ........ ....... - 0x00, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // ....a........... - 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, // ........ ....... - 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xc2, 0x03, 0x00, 0x00, // ........!....... - 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, // ............!... - 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, // ............!... - 0x69, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, // i............... - 0x9a, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, // ....;.......C... - 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ...y....... - 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, // ....;...y....... - 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ........... - 0x96, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, // ....;........... - 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... - 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....+........... - 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, // ................ - 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... - 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ....... - 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ - 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // +............... - 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;.......w....... - 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;.......t....... - 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... - 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;............... - 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....e........... - 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // +.......j... ... - 0x1c, 0x00, 0x04, 0x00, 0xc3, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, // ........e...j... - 0x1e, 0x00, 0x0e, 0x00, 0x44, 0x06, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....D........... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xc3, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e.......e... - 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, // e.......6....... - 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // ................ - 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, // Sa..;........G.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, // ....;........U.. - 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // ....;........... - 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, // ....=.......!C.. - 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, // ....=........3.. - 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, // ....P...a.... .. - 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, // !C...3..>...C... - 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, // . ..=........A.. - 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, // w...=........<.. - 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, // t...>....G...A.. - 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, // >....U...<..9... - 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, // .....&.......G.. - 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .U......=....... - 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ........>....... - 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, // ........8...6... - 0x1d, 0x00, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x03, 0x00, 0x00, // ................ - 0x37, 0x00, 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7.......'...7... - 0x90, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xcd, 0x5b, 0x00, 0x00, // .............[.. - 0x41, 0x00, 0x05, 0x00, 0x13, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // A.......i$..'... - 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, // ....=........1.. - 0x69, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x79, 0x04, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, // i$..A...y...TD.. - 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, // '.......=....... - 0x9b, 0x56, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, // .V..TD..V....... - 0xc9, 0x42, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .B...1...V..=... - 0x13, 0x00, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, // ....6.......W... - 0x1d, 0x00, 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, // .....Q...B..6... - 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, // .....Q..8...6... - 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, // ....5........... - 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7............... - 0x17, 0x3e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, // .>..=........S.. - 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, // ....=.......]J.. - 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, // ....=........4.. - 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, // ....=........5.. - 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3f, 0x3a, 0x00, 0x00, // ....P.......?:.. - 0x18, 0x53, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, // .S..]J...4...5.. - 0xfe, 0x00, 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, // ....?:..8...6... - 0x08, 0x00, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, // ............i... - 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7.......B$..7... - 0x90, 0x02, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....x ..7....... - 0xc4, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .A..........;... - 0x8a, 0x02, 0x00, 0x00, 0x0e, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....U......;... - 0x90, 0x02, 0x00, 0x00, 0xdf, 0x4b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .....K......>... - 0x0e, 0x55, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // .U......9....... - 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x0e, 0x55, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....5....U..=... - 0x13, 0x00, 0x00, 0x00, 0x48, 0x51, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ....HQ..x ..>... - 0xdf, 0x4b, 0x00, 0x00, 0x48, 0x51, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, // .K..HQ..9....... - 0x69, 0x4c, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0xdf, 0x4b, 0x00, 0x00, // iL......C....K.. - 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x69, 0x4c, 0x00, 0x00, // Q...........iL.. - 0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8f, 0x29, 0x00, 0x00, // ....=........).. - 0x42, 0x24, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x23, 0x43, 0x00, 0x00, // B$..O.......#C.. - 0x8f, 0x29, 0x00, 0x00, 0x8f, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .)...).......... - 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4b, 0x5e, 0x00, 0x00, // ....A.......K^.. - 0x42, 0x24, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // B$......=....... - 0x13, 0x43, 0x00, 0x00, 0x4b, 0x5e, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .C..K^.......... - 0x52, 0x5c, 0x00, 0x00, 0x13, 0x43, 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // R....C......Q... - 0x0d, 0x00, 0x00, 0x00, 0x1e, 0x1d, 0x00, 0x00, 0x23, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........#C...... - 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xdc, 0x22, 0x00, 0x00, 0x23, 0x43, 0x00, 0x00, // Q........"..#C.. - 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, // ....Q.......6`.. - 0x23, 0x43, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // #C......P....... - 0x0f, 0x50, 0x00, 0x00, 0x1e, 0x1d, 0x00, 0x00, 0xdc, 0x22, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, // .P......."..6`.. - 0x52, 0x5c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, // R...>....A...P.. - 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ....8.... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xc4, 0x0d, 0x00, 0x00, 0x03, 0x02, // FSH............. + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, // #.........Ta.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, // ..w...t......... + 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, // ................ + 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x42, 0x67, // in........a...Bg + 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, // fxSampler2D..... + 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, // ..a.......m_samp + 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x01, 0x00, // ler.......a..... + 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, // ..m_texture..... + 0x0e, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, // ......bgfxTextur + 0x65, 0x32, 0x44, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, // e2D(struct-BgfxS + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, 0x31, 0x31, // ampler2D-p1-t211 + 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, // ;vf2;.....'..._s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, // ampler.......... + 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, // .._coord......5. + 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, // ..vec4_splat(f1; + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, // .........._x.... + 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, // ......@main(vf4; + 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x42, 0x24, // vf2;vf4;......B$ + 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..v_color0...... + 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..x ..v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // 0......A..gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, // gData_0_......C. + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, // ..s_texColor.... + 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ......s_texColor + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, // Sampler......... + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, // ..s_texColorText + 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, // ure...........bg + 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, // fx_VoidFrag..... + 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ...T..param..... + 0x04, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x00, 0x00, 0x05, 0x00, // ......alpha..... + 0x04, 0x00, 0x45, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ..EN..param..... + 0x04, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ......param..... + 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ...A..v_color0.. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ......w...v_colo + 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, // r0.........<..v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, // texcoord0.....t. + 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... + 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // ......gl_FragDat + 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, // a_0_.......G..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, // ram........U..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, // ram...........pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, // ram...........gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, // _FragData_0_.... + 0x04, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, // ......$Global... + 0x06, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x01, 0x00, // Rect............ + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, // ..u_viewTexel... + 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xe8, 0x00, // invView......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ......u_proj.... + 0x06, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, // ..........u_invP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x06, 0x00, // roj............. + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ..u_viewProj.... + 0x07, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xe8, 0x00, // iewProj......... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, // ......u_model... + 0x06, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode + 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x0a, 0x00, // lView........... + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ..u_modelViewPro + 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, // j.............u_ + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, // alphaRef4.G..... + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, // ..".......G..... + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, // ..!.......G..... + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, // ..".......G..... + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, // ..!.......G...w. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, // ..........G...t. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, // ..........G..... + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x93, 0x05, // ..........G..... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, // ......@...H..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x02, 0x00, // .. ...H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe8, 0x00, // ..........H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, // ..........H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#...`...H. + 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x04, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe8, 0x00, // ..........H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, // ..........H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x06, 0x00, // .. ...H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe8, 0x00, // ..........H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, // ..........H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#...`...H. + 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x08, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe8, 0x00, // ..........H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, // ..........H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x0a, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xe8, 0x00, // ..........H..... + 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, // ......#... ...G. + 0x03, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, // ................ + 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, // ..!............. + 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, // ..........a..... + 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, // ..a............. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xc2, 0x03, 0x00, 0x00, 0x1d, 0x00, // ......!......... + 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, // ..........!..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x69, 0x00, // ..........!...i. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, 0x09, // .. ...........a. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, // ..;.......C..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, // .. ...y......... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, // ..;...y......... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, // ..;............. + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, // .. ............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, // .. ...z......... + 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, // ................ + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, // ...... ......... + 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // ......w....... . + 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // ......t....... . + 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, // ................ + 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..e...........+. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, // ......j... ..... + 0x04, 0x00, 0x93, 0x05, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, // ......e...j..... + 0x0e, 0x00, 0xe8, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, // ..............e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x93, 0x05, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e.......e...e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, // ......6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, // ..............Sa + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, // ..;........G.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, // ..;........U.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, // ..=.......!C.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, // ..=........3.... + 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, // ..P...a.... ..!C + 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, // ...3..>...C.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, // ..=........A..w. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, // ..=........<..t. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, // ..>....G...A..>. + 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, // ...U...<..9..... + 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, // ...&.......G...U + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, // ......=......... + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, // ......>......... + 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ......8...6..... + 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x03, 0x00, 0x00, 0x37, 0x00, // ..............7. + 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......'...7..... + 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xcd, 0x5b, 0x00, 0x00, 0x41, 0x00, // ...........[..A. + 0x05, 0x00, 0x14, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, // ......i$..'..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x69, 0x24, // ..=........1..i$ + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x27, 0x0e, // ..A...z...TD..'. + 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x9b, 0x56, // ......=........V + 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xc9, 0x42, // ..TD..V........B + 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ...1...V..=..... + 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, // ..6.......W..... + 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xfe, 0x00, // ...Q...B..6..... + 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ...Q..8...6..... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, // ..5...........7. + 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x17, 0x3e, // ...............> + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0xdd, 0x0e, // ..=........S.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xdd, 0x0e, // ..=.......]J.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0xdd, 0x0e, // ..=........4.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, 0xdd, 0x0e, // ..=........5.... + 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x18, 0x53, // ..P.......?:...S + 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, 0xfe, 0x00, // ..]J...4...5.... + 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, // ..?:..8...6..... + 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x37, 0x00, // ..........i...7. + 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......B$..7..... + 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc4, 0x41, // ..x ..7........A + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, // ..........;..... + 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, // ...T......;..... + 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, // ..EN......;..... + 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, // ..........>....T + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, // ......9......... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x61, 0x09, // ..5....T..=...a. + 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x45, 0x4e, // ...Q..C...>...EN + 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x6f, 0x23, // ...Q..=.......o# + 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x6f, 0x23, // ..x ..>.......o# + 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x69, 0x4c, 0x00, 0x00, 0x99, 0x0f, // ..9.......iL.... + 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..EN......Q..... + 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x69, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x00, // ......iL......=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8f, 0x29, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x4f, 0x00, // .......)..B$..O. + 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x23, 0x43, 0x00, 0x00, 0x8f, 0x29, 0x00, 0x00, 0x8f, 0x29, // ......#C...)...) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, // ..............A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4b, 0x5e, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x13, 0x0a, // ......K^..B$.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x13, 0x43, 0x00, 0x00, 0x4b, 0x5e, // ..=........C..K^ + 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x52, 0x5c, 0x00, 0x00, 0x13, 0x43, // ..........R....C + 0x00, 0x00, 0xf3, 0x10, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1e, 0x1d, // ......Q......... + 0x00, 0x00, 0x23, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..#C......Q..... + 0x00, 0x00, 0xdc, 0x22, 0x00, 0x00, 0x23, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, // ..."..#C......Q. + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x23, 0x43, 0x00, 0x00, 0x02, 0x00, // ......6`..#C.... + 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0x1e, 0x1d, // ..P........P.... + 0x00, 0x00, 0xdc, 0x22, 0x00, 0x00, 0x36, 0x60, 0x00, 0x00, 0x52, 0x5c, 0x00, 0x00, 0x3e, 0x00, // ..."..6`..R...>. + 0x03, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x0f, 0x50, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, // ...A...P......8. + 0x01, 0x00, 0x00, // ... }; -static const uint8_t fs_imgui_texture_dx9[250] = +static const uint8_t fs_imgui_texture_dx9[252] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xdc, 0x00, 0x00, 0x03, 0xff, // Color0.......... - 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ... .CTAB....S.. - 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ - 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo - 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // 0.1............. - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // .........B...... - 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x00, // Color0.......... + 0x03, 0xff, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, // ..... .CTAB....S + 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ...L...0........ + 0x00, 0x02, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...<.......s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, // Color........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......ps_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, // 10.1........... + 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, // ...........B.... + 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, // ................ + 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, // ................ + 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............ }; -static const uint8_t fs_imgui_texture_dx11[421] = +static const uint8_t fs_imgui_texture_dx11[423] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x84, 0x01, 0x44, 0x58, 0x42, // Color0.......DXB - 0x43, 0x57, 0x7b, 0x79, 0x39, 0xfb, 0xd2, 0x84, 0x36, 0x53, 0xeb, 0x9a, 0xf9, 0x9e, 0xa5, 0xf8, // CW{y9...6S...... - 0xb1, 0x01, 0x00, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .............,.. - 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, // .........ISGNl.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ - 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........b...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, // .SV_POSITION.COL - 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, // OR.TEXCOORD..OSG - 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // N,........... .. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, // .....SV_TARGET.. - 0xab, 0x53, 0x48, 0x44, 0x52, 0xa8, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, // .SHDR....@...*.. - 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, // .Z....`......X.. - 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, // ..p......UU..b.. - 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, // .........b...2.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....e.... ..... - 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, // .h.......E...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, // .....F.......F~. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, // ......`......8.. - 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .. ............. - 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, // .:.......6...r . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, // .....F.......>.. - 0x01, 0x00, 0x00, 0x00, 0x00, // ..... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x84, 0x01, 0x00, 0x00, 0x44, // Color0.........D + 0x58, 0x42, 0x43, 0x57, 0x7b, 0x79, 0x39, 0xfb, 0xd2, 0x84, 0x36, 0x53, 0xeb, 0x9a, 0xf9, 0x9e, // XBCW{y9...6S.... + 0xa5, 0xf8, 0xb1, 0x01, 0x00, 0x00, 0x00, 0x84, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, // ..............., + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, // ...........ISGNl + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, // ...........b.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, // ................ + 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, // ...SV_POSITION.C + 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, // OLOR.TEXCOORD..O + 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, // .......SV_TARGET + 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xa8, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x2a, // ...SHDR....@...* + 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, // ...Z....`......X + 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, // ....p......UU..b + 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, // ...........b...2 + 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, // ...h.......E.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // .......F.......F + 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, // ~.......`......8 + 0x00, 0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, // .... ........... + 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, // ...:.......6...r + 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, // ......F.......> + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ....... }; static const uint8_t fs_imgui_texture_mtl[680] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x99, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...........us + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x99, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...........us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.sc b/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.sc index 99814a3..6f890a6 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.sc +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.sc @@ -1,7 +1,7 @@ $input v_texcoord0, v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h index c1585aa..5c34290 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_ocornut_imgui_glsl[238] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd3, 0x00, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // ..........varyin 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, // g highp vec4 v_c 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // olor0;.varying h @@ -16,258 +16,266 @@ static const uint8_t fs_ocornut_imgui_glsl[238] = 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x2a, 0x20, 0x76, // = (tmpvar_1 * v 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _color0);.}... }; -static const uint8_t fs_ocornut_imgui_spv[3197] = +static const uint8_t fs_ocornut_imgui_spv[3319] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x70, 0x0c, 0x03, 0x02, 0x23, 0x07, // FSH.......p...#. - 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........Ta...... - 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, // GLSL.std.450.... - 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, // ................ - 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, // ........main.... - 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, // w...t........... - 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ - 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, // main........a... - 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, // BgfxSampler2D... - 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, // ....a.......m_sa - 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, // mpler.......a... - 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, // ....m_texture... - 0x05, 0x00, 0x0e, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, // ........bgfxText - 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, // ure2D(struct-Bgf - 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, // xSampler2D-p1-t2 - 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, // 11;vf2;.....'... - 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // _sampler........ - 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ...._coord...... - 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, // 5...vec4_splat(f - 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, // 1;.........._x.. - 0x05, 0x00, 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, // ........@main(vf - 0x34, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // 4;vf2;vf4;...... - 0x42, 0x24, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // B$..v_color0.... - 0x05, 0x00, 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ....x ..v_texcoo - 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // rd0......A..gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ragData_0_...... - 0xfe, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....s_tex....... - 0x0f, 0x0d, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // ....s_texSampler - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // ........K...s_te - 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // xTexture........ - 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, // ....bgfx_VoidFra - 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0e, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // g........U..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x41, 0x12, 0x00, 0x00, 0x74, 0x65, 0x78, 0x65, // m.......A...texe - 0x6c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xdf, 0x4b, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // l........K..para - 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, // m........A..v_co - 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, // lor0........w... - 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // v_color0........ - 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // .<..v_texcoord0. - 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ....t...v_texcoo - 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // rd0.........gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ragData_0_...... - 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .G..param....... - 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .U..param....... - 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....param....... - 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // ....gl_FragData_ - 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x01, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, // 0_..........$Glo - 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // bal............. - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_viewRect...... - 0x97, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, // ........u_viewTe - 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // xel............. - 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x01, 0x00, 0x00, // u_view.......... - 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, // ....u_invView... - 0x06, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, // ............u_pr - 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // oj.............. - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_invProj....... - 0x97, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // ........u_viewPr - 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x97, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // oj.............. - 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // u_invViewProj... - 0x06, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo - 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // del............. - 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, // u_modelView..... - 0x97, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // ........u_modelV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x97, 0x01, 0x00, 0x00, // iewProj......... - 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, // ....u_alphaRef4. - 0x47, 0x00, 0x04, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G......."....... - 0x47, 0x00, 0x04, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G.......!....... - 0x47, 0x00, 0x04, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...K..."....... - 0x47, 0x00, 0x04, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...K...!....... - 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...w........... - 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // G...t........... - 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G............... - 0x47, 0x00, 0x04, 0x00, 0x86, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // G...........@... - 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....H........... - 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x01, 0x00, 0x00, // #.......H....... - 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, // ........H....... - 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... - 0x97, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0x97, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // `...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x01, 0x00, 0x00, // ........H....... - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, // ........H....... - 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x97, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0x97, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x01, 0x00, 0x00, // ........H....... - 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, // ........H....... - 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... - 0x97, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0x97, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // `...H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x01, 0x00, 0x00, // ........H....... - 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, // ........H....... - 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x97, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x04, 0x00, 0x97, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... - 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... - 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x97, 0x01, 0x00, 0x00, // ........H....... - 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, // ........H....... - 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... - 0x97, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x48, 0x00, 0x05, 0x00, 0x97, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... - 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x97, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...G........... - 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, // ........!....... - 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // ................ - 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, // .... ........... - 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, // ................ - 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // a........... ... - 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // ........a....... - 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... - 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // ................ - 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, // ............!... - 0xc2, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, // ................ - 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ............... - 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, // !............... - 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... - 0x21, 0x00, 0x06, 0x00, 0x69, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, // !...i........... - 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, // ........;....... - 0xfe, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, // ........ ...y... - 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, // ........;...y... - 0x0f, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, // ........ ....... - 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, // ........;....... - 0x4b, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // K............... - 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // .......+....... - 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... - 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, // ................ - 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....+........... - 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... - 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, // ....;.......w... - 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... - 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, // ....;.......t... - 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... - 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ....;........... - 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ........e....... - 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, // ....+.......j... - 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x86, 0x0b, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ...........e... - 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x97, 0x01, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // j............... - 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ....e...e...e... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x86, 0x0b, 0x00, 0x00, // e...e...e....... - 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, // e...e.......6... - 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....Sa..;....... - 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, // .G......;....... - 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // .U......;....... - 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, // ........=....... - 0x21, 0x43, 0x00, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, // !C......=....... - 0x02, 0x33, 0x00, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, // .3..K...P...a... - 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // . ..!C...3..>... - 0xfe, 0x0e, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ..... ..=....... - 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // .A..w...=....... - 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, // .<..t...>....G.. - 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, // .A..>....U...<.. - 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, // 9........&...... - 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .G...U......=... - 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ............>... - 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // ............8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0xc2, 0x03, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // ....7.......'... - 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7............... - 0xcd, 0x5b, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x13, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, // .[..A.......i$.. - 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, // '.......=....... - 0x16, 0x31, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x79, 0x04, 0x00, 0x00, // .1..i$..A...y... - 0x54, 0x44, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // TD..'.......=... - 0xfc, 0x01, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, // .....V..TD..V... - 0xfe, 0x01, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, // .....B...1...V.. - 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, // =.......6....... - 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, // W........Q...B.. - 0x36, 0x1c, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // 6........Q..8... - 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6.......5....... - 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, // ....7........... - 0xf8, 0x00, 0x02, 0x00, 0x17, 0x3e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .....>..=....... - 0x18, 0x53, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .S......=....... - 0x5d, 0x4a, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ]J......=....... - 0xfd, 0x34, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .4......=....... - 0x10, 0x35, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // .5......P....... - 0x3f, 0x3a, 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, // ?:...S..]J...4.. - 0x10, 0x35, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // .5......?:..8... - 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... - 0x69, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, // i...7.......B$.. - 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7.......x ..7... - 0x9a, 0x02, 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, // .....A.......... - 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x0e, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... - 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xdf, 0x4b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........K...... - 0x3e, 0x00, 0x03, 0x00, 0x0e, 0x55, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, // >....U......9... - 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x0e, 0x55, 0x00, 0x00, // ........5....U.. - 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x48, 0x51, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, // =.......HQ..x .. - 0x3e, 0x00, 0x03, 0x00, 0xdf, 0x4b, 0x00, 0x00, 0x48, 0x51, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, // >....K..HQ..9... - 0x1d, 0x00, 0x00, 0x00, 0x41, 0x12, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, // ....A........... - 0xdf, 0x4b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xac, 0x21, 0x00, 0x00, // .K..=........!.. - 0x42, 0x24, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x73, 0x2b, 0x00, 0x00, // B$..........s+.. - 0x41, 0x12, 0x00, 0x00, 0xac, 0x21, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc4, 0x41, 0x00, 0x00, // A....!..>....A.. - 0x73, 0x2b, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // s+......8.... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xe8, 0x0c, 0x00, 0x00, 0x03, 0x02, // FSH............. + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, // #.........Ta.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, // ..w...t......... + 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, // ................ + 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x42, 0x67, // in........a...Bg + 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, // fxSampler2D..... + 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, // ..a.......m_samp + 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x01, 0x00, // ler.......a..... + 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, // ..m_texture..... + 0x0e, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, // ......bgfxTextur + 0x65, 0x32, 0x44, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, // e2D(struct-BgfxS + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, 0x31, 0x31, // ampler2D-p1-t211 + 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, // ;vf2;.....'..._s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, // ampler.......... + 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, // .._coord......5. + 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, // ..vec4_splat(f1; + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, // .........._x.... + 0x07, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, // ......@main(vf4; + 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x42, 0x24, // vf2;vf4;......B$ + 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..v_color0...... + 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..x ..v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // 0......A..gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xfe, 0x0e, // gData_0_........ + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x0f, 0x0d, // ..s_tex......... + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, // ..s_texSampler.. + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x54, // ......K...s_texT + 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, // exture.......... + 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, // ..bgfx_VoidFrag. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // .......T..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x41, 0x12, 0x00, 0x00, 0x74, 0x65, 0x78, 0x65, 0x6c, 0x00, // ......A...texel. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x45, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ......EN..param. + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ..........param. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .......A..v_colo + 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, // r0........w...v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, // color0.........< + 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... + 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..t...v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // 0.........gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, // gData_0_.......G + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, // ..param........U + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, // ..param......... + 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, // ..param......... + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, // ..........$Globa + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.............u_ + 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xfe, 0x07, // viewRect........ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, // ......u_viewTexe + 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.............u_ + 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x03, 0x00, // view............ + 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invView..... + 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, // ..........u_proj + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xfe, 0x07, // invProj......... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // ......u_viewProj + 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // invViewProj..... + 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode + 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, // l.............u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xfe, 0x07, // modelView....... + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x0b, 0x00, // wProj........... + 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, // ..u_alphaRef4.G. + 0x04, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......".......G. + 0x04, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......!.......G. + 0x04, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..K...".......G. + 0x04, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..K...!.......G. + 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..w...........G. + 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, // ..t...........G. + 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. + 0x04, 0x00, 0x94, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, // ..........@...H. + 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x02, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x02, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, // ..#... ...H..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, // ..........#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x04, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x04, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, // ..#.......H..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x06, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x06, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, // ..#... ...H..... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, // ..........#...`. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x08, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x08, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, // ..#.......H..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x0a, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x0a, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfe, 0x07, // ..#.......H..... + 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, // ..........#... . + 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, // ..G............. + 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, // ......!......... + 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, // ..............a. + 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, // ......a......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, // ................ + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xc2, 0x03, // ..........!..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x06, 0x00, 0x69, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, // ..i............. + 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, // ...... ......... + 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0xfe, 0x0e, // ..a...;......... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, // ...... ...y..... + 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x0f, 0x0d, // ......;...y..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, // ...... ......... + 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x4b, 0x0f, // ......;.......K. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, // ......+......... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, // ......+......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, // ...... ...z..... + 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, // ................ + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, // ..;.......w..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;.......t..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, // ..;............. + 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, // ......e......... + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, // ..+.......j... . + 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x94, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, // ..........e...j. + 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, // ................ + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x94, 0x01, 0x00, 0x00, 0x65, 0x00, // ..e...e.......e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, // ..e.......6..... + 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, // ................ + 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, // ..Sa..;........G + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xab, 0x55, // ......;........U + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, // ......;......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, // ......=.......!C + 0x00, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, // ......=........3 + 0x00, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, // ..K...P...a.... + 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xfe, 0x0e, // ..!C...3..>..... + 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, // ... ..=........A + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x03, 0x3c, // ..w...=........< + 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, // ..t...>....G...A + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, // ..>....U...<..9. + 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0xc9, 0x47, // .......&.......G + 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ...U......=..... + 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, // ..........>..... + 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ..........8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x03, // ................ + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, // ..7.......'...7. + 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xcd, 0x5b, // ...............[ + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x14, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x27, 0x0e, // ..A.......i$..'. + 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x16, 0x31, // ......=........1 + 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x54, 0x44, // ..i$..A...z...TD + 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, // ..'.......=..... + 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, // ...V..TD..V..... + 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x3d, 0x00, // ...B...1...V..=. + 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, // ......6.......W. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x36, 0x1c, // .......Q...B..6. + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // .......Q..8...6. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, // ......5......... + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, // ..7............. + 0x02, 0x00, 0x17, 0x3e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x53, // ...>..=........S + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5d, 0x4a, // ......=.......]J + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x34, // ......=........4 + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x10, 0x35, // ......=........5 + 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3f, 0x3a, // ......P.......?: + 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0x10, 0x35, // ...S..]J...4...5 + 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // ......?:..8...6. + 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x69, 0x00, // ..............i. + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x37, 0x00, // ..7.......B$..7. + 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, // ......x ..7..... + 0x00, 0x00, 0xc4, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, // ...A..........;. + 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......T......;. + 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ......EN......;. + 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, // ..............>. + 0x03, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, // ...T......9..... + 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x3d, 0x00, // ......5....T..=. + 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, 0x3e, 0x00, // ..a....Q......>. + 0x03, 0x00, 0x45, 0x4e, 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ..EN...Q..=..... + 0x00, 0x00, 0x6f, 0x23, 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x2e, // ..o#..x ..>..... + 0x00, 0x00, 0x6f, 0x23, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x41, 0x12, // ..o#..9.......A. + 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x45, 0x4e, 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x3d, 0x00, // ......EN......=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xac, 0x21, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x85, 0x00, // .......!..B$.... + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x73, 0x2b, 0x00, 0x00, 0x41, 0x12, 0x00, 0x00, 0xac, 0x21, // ......s+..A....! + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x73, 0x2b, 0x00, 0x00, 0xfd, 0x00, // ..>....A..s+.... + 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..8.... }; -static const uint8_t fs_ocornut_imgui_dx9[229] = +static const uint8_t fs_ocornut_imgui_dx9[231] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x1f, 0x00, // 0............... - 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, // CTAB....O....... - 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, // ............H... - 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x38, 0x00, 0x00, 0x00, // 0...........8... - 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x00, 0xab, 0xab, 0x04, 0x00, 0x0c, 0x00, // ....s_tex....... - 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, // ............ps_3 - 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, // _0.Microsoft (R) - 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, // HLSL Shader Com - 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, // piler 10.1...... - 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ - 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, // ................ - 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, // B............... - 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, // ................ - 0xff, 0xff, 0x00, 0x00, 0x00, // ..... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, // 0............... + 0x1f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x03, // ..CTAB....O..... + 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x38, 0x00, // ..0...........8. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x00, 0xab, 0xab, 0x04, 0x00, // ......s_tex..... + 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, // ..............ps + 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( + 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, // ompiler 10.1.... + 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, // ................ + 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, // ..B............. + 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, // ................ + 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... }; -static const uint8_t fs_ocornut_imgui_dx11[396] = +static const uint8_t fs_ocornut_imgui_dx11[398] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x70, 0x01, 0x44, 0x58, 0x42, 0x43, 0xbe, 0x78, 0xe7, 0xa5, // 0.....p.DXBC.x.. - 0x19, 0x0c, 0x70, 0xeb, 0x4c, 0xb1, 0xac, 0x1f, 0x16, 0x84, 0xe9, 0x97, 0x01, 0x00, 0x00, 0x00, // ..p.L........... - 0x70, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, // p.......,....... - 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....ISGNl....... - 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....P........... - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....b........... - 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, // ............SV_P - 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, // OSITION.COLOR.TE - 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, // XCOORD..OSGN,... - 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ....... - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ - 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, // SV_TARGET...SHDR - 0x94, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, // ....@...%...Z... - 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, // .`......X....p.. - 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, // ....UU..b....... - 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....b...2....... - 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, // e.... ......h... - 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....E........... - 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // F.......F~...... - 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x20, 0x10, 0x00, // .`......8.... .. - 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // ....F.......F... - 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ....>....... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x70, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xbe, 0x78, // 0.....p...DXBC.x + 0xe7, 0xa5, 0x19, 0x0c, 0x70, 0xeb, 0x4c, 0xb1, 0xac, 0x1f, 0x16, 0x84, 0xe9, 0x97, 0x01, 0x00, // ....p.L......... + 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..p.......,..... + 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, // ......ISGNl..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ......P......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......b......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x53, 0x56, // ..............SV + 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, // _POSITION.COLOR. + 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, // TEXCOORD..OSGN,. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, // ..SV_TARGET...SH + 0x44, 0x52, 0x94, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x5a, 0x00, // DR....@...%...Z. + 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, // ...`......X....p + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, // ......UU..b..... + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, // ......b...2..... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, // ..e.... ......h. + 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......E......... + 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, // ..F.......F~.... + 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x20, // ...`......8.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, // ......F.......F. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ......>....... }; static const uint8_t fs_ocornut_imgui_mtl[570] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x2b, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH.......+...us + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x2b, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH.......+...us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { diff --git a/3rdparty/bgfx/examples/common/imgui/imgui.cpp b/3rdparty/bgfx/examples/common/imgui/imgui.cpp index af1ff08..b634b87 100644 --- a/3rdparty/bgfx/examples/common/imgui/imgui.cpp +++ b/3rdparty/bgfx/examples/common/imgui/imgui.cpp @@ -1,818 +1,88 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2014-2015 Daniel Collin. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ -// This code is based on: -// -// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. -// -// Source altered and distributed from https://github.com/AdrienHerubel/imgui - -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "imgui.h" -#include "ocornut_imgui.h" #include "../bgfx_utils.h" -#include "../nanovg/nanovg.h" -#include +#ifndef USE_ENTRY +# if defined(SCI_NAMESPACE) +# define USE_ENTRY 1 +# else +# define USE_ENTRY 0 +# endif // defined(SCI_NAMESPACE) +#endif // USE_ENTRY -// embedded shaders -#include "vs_imgui_color.bin.h" -#include "fs_imgui_color.bin.h" -#include "vs_imgui_texture.bin.h" -#include "fs_imgui_texture.bin.h" -#include "vs_imgui_cubemap.bin.h" -#include "fs_imgui_cubemap.bin.h" -#include "vs_imgui_latlong.bin.h" -#include "fs_imgui_latlong.bin.h" +#if USE_ENTRY +# include "../entry/entry.h" +#endif // USE_ENTRY + +#if defined(SCI_NAMESPACE) +# include "../entry/input.h" +# include "scintilla.h" +#endif // defined(SCI_NAMESPACE) + +#include "vs_ocornut_imgui.bin.h" +#include "fs_ocornut_imgui.bin.h" #include "vs_imgui_image.bin.h" #include "fs_imgui_image.bin.h" -#include "fs_imgui_image_swizz.bin.h" + +#include "roboto_regular.ttf.h" +#include "robotomono_regular.ttf.h" +#include "icons_kenney.ttf.h" +#include "icons_font_awesome.ttf.h" static const bgfx::EmbeddedShader s_embeddedShaders[] = { - BGFX_EMBEDDED_SHADER(vs_imgui_color), - BGFX_EMBEDDED_SHADER(fs_imgui_color), - BGFX_EMBEDDED_SHADER(vs_imgui_texture), - BGFX_EMBEDDED_SHADER(fs_imgui_texture), - BGFX_EMBEDDED_SHADER(vs_imgui_cubemap), - BGFX_EMBEDDED_SHADER(fs_imgui_cubemap), - BGFX_EMBEDDED_SHADER(vs_imgui_latlong), - BGFX_EMBEDDED_SHADER(fs_imgui_latlong), + BGFX_EMBEDDED_SHADER(vs_ocornut_imgui), + BGFX_EMBEDDED_SHADER(fs_ocornut_imgui), BGFX_EMBEDDED_SHADER(vs_imgui_image), BGFX_EMBEDDED_SHADER(fs_imgui_image), - BGFX_EMBEDDED_SHADER(fs_imgui_image_swizz), BGFX_EMBEDDED_SHADER_END() }; -// embedded font -#include "roboto_regular.ttf.h" - -BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4244); // warning C4244: '=' : conversion from '' to '', possible loss of data - -#define USE_NANOVG_FONT 0 - -#define IMGUI_CONFIG_MAX_FONTS 20 - -#define MAX_TEMP_COORDS 100 -#define NUM_CIRCLE_VERTS (8 * 4) - -static const int32_t BUTTON_HEIGHT = 20; -static const int32_t SLIDER_HEIGHT = 20; -static const int32_t SLIDER_MARKER_WIDTH = 10; -static const int32_t CHECK_SIZE = 8; -static const int32_t DEFAULT_SPACING = 4; -static const int32_t TEXT_HEIGHT = 8; -static const int32_t SCROLL_AREA_PADDING = 6; -static const int32_t AREA_HEADER = 20; -static const float s_tabStops[4] = {150, 210, 270, 330}; - -void* imguiMalloc(size_t _size, void*); -void imguiFree(void* _ptr, void*); - -#define IMGUI_MIN(_a, _b) (_a)<(_b)?(_a):(_b) -#define IMGUI_MAX(_a, _b) (_a)>(_b)?(_a):(_b) -#define IMGUI_CLAMP(_a, _min, _max) IMGUI_MIN(IMGUI_MAX(_a, _min), _max) - -BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4505); // error C4505: '' : unreferenced local function has been removed -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-function"); // warning: ‘int rect_width_compare(const void*, const void*)’ defined but not used -BX_PRAGMA_DIAGNOSTIC_PUSH(); -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wunknown-pragmas") -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-but-set-variable"); // warning: variable ‘L1’ set but not used -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wtype-limits"); // warning: comparison is always true due to limited range of data type -#define STBTT_malloc(_size, _userData) imguiMalloc(_size, _userData) -#define STBTT_free(_ptr, _userData) imguiFree(_ptr, _userData) -#define STB_RECT_PACK_IMPLEMENTATION -#include -#define STB_TRUETYPE_IMPLEMENTATION -#include -BX_PRAGMA_DIAGNOSTIC_POP(); - -namespace +struct FontRangeMerge { - static uint32_t addQuad(uint16_t* _indices, uint16_t _idx0, uint16_t _idx1, uint16_t _idx2, uint16_t _idx3) - { - _indices[0] = _idx0; - _indices[1] = _idx3; - _indices[2] = _idx1; + const void* data; + size_t size; + ImWchar ranges[3]; +}; - _indices[3] = _idx1; - _indices[4] = _idx3; - _indices[5] = _idx2; - - return 6; - } - - float sign(float px, float py, float ax, float ay, float bx, float by) - { - return (px - bx) * (ay - by) - (ax - bx) * (py - by); - } - - bool pointInTriangle(float px, float py, float ax, float ay, float bx, float by, float cx, float cy) - { - const bool b1 = sign(px, py, ax, ay, bx, by) < 0.0f; - const bool b2 = sign(px, py, bx, by, cx, cy) < 0.0f; - const bool b3 = sign(px, py, cx, cy, ax, ay) < 0.0f; - - return ( (b1 == b2) && (b2 == b3) ); - } - - void closestPointOnLine(float& ox, float &oy, float px, float py, float ax, float ay, float bx, float by) - { - float dx = px - ax; - float dy = py - ay; - - float lx = bx - ax; - float ly = by - ay; - - float len = sqrtf(lx*lx+ly*ly); - - // Normalize. - float invLen = 1.0f/len; - lx*=invLen; - ly*=invLen; - - float dot = (dx*lx + dy*ly); - - if (dot < 0.0f) - { - ox = ax; - oy = ay; - } - else if (dot > len) - { - ox = bx; - oy = by; - } - else - { - ox = ax + lx*dot; - oy = ay + ly*dot; - } - } - - void closestPointOnTriangle(float& ox, float &oy, float px, float py, float ax, float ay, float bx, float by, float cx, float cy) - { - float abx, aby; - float bcx, bcy; - float cax, cay; - closestPointOnLine(abx, aby, px, py, ax, ay, bx, by); - closestPointOnLine(bcx, bcy, px, py, bx, by, cx, cy); - closestPointOnLine(cax, cay, px, py, cx, cy, ax, ay); - - const float pabx = px - abx; - const float paby = py - aby; - const float pbcx = px - bcx; - const float pbcy = py - bcy; - const float pcax = px - cax; - const float pcay = py - cay; - - const float lab = sqrtf(pabx*pabx+paby*paby); - const float lbc = sqrtf(pbcx*pbcx+pbcy*pbcy); - const float lca = sqrtf(pcax*pcax+pcay*pcay); - - const float m = bx::fmin3(lab, lbc, lca); - if (m == lab) - { - ox = abx; - oy = aby; - } - else if (m == lbc) - { - ox = bcx; - oy = bcy; - } - else// if (m == lca). - { - ox = cax; - oy = cay; - } - } - - inline float vec2Dot(const float* __restrict _a, const float* __restrict _b) - { - return _a[0]*_b[0] + _a[1]*_b[1]; - } - - void barycentric(float& _u, float& _v, float& _w - , float _ax, float _ay - , float _bx, float _by - , float _cx, float _cy - , float _px, float _py - ) - { - const float v0[2] = { _bx - _ax, _by - _ay }; - const float v1[2] = { _cx - _ax, _cy - _ay }; - const float v2[2] = { _px - _ax, _py - _ay }; - const float d00 = vec2Dot(v0, v0); - const float d01 = vec2Dot(v0, v1); - const float d11 = vec2Dot(v1, v1); - const float d20 = vec2Dot(v2, v0); - const float d21 = vec2Dot(v2, v1); - const float denom = d00 * d11 - d01 * d01; - _v = (d11 * d20 - d01 * d21) / denom; - _w = (d00 * d21 - d01 * d20) / denom; - _u = 1.0f - _v - _w; - } - - struct PosColorVertex - { - float m_x; - float m_y; - uint32_t m_abgr; - - static void init() - { - ms_decl - .begin() - .add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float) - .add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true) - .end(); - } - - static bgfx::VertexDecl ms_decl; - }; - - bgfx::VertexDecl PosColorVertex::ms_decl; - - struct PosColorUvVertex - { - float m_x; - float m_y; - float m_u; - float m_v; - uint32_t m_abgr; - - static void init() - { - ms_decl - .begin() - .add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float) - .add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float) - .add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true) - .end(); - } - - static bgfx::VertexDecl ms_decl; - }; - - bgfx::VertexDecl PosColorUvVertex::ms_decl; - - struct PosUvVertex - { - float m_x; - float m_y; - float m_u; - float m_v; - - static void init() - { - ms_decl - .begin() - .add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float) - .add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float) - .end(); - } - - static bgfx::VertexDecl ms_decl; - }; - - bgfx::VertexDecl PosUvVertex::ms_decl; - - struct PosNormalVertex - { - float m_x; - float m_y; - float m_z; - float m_nx; - float m_ny; - float m_nz; - - static void init() - { - ms_decl.begin() - .add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float) - .add(bgfx::Attrib::Normal, 3, bgfx::AttribType::Float) - .end(); - } - - void set(float _x, float _y, float _z, float _nx, float _ny, float _nz) - { - m_x = _x; - m_y = _y; - m_z = _z; - m_nx = _nx; - m_ny = _ny; - m_nz = _nz; - } - - static bgfx::VertexDecl ms_decl; - }; - - bgfx::VertexDecl PosNormalVertex::ms_decl; - -} // namespace - -#if !USE_NANOVG_FONT -static float getTextLength(stbtt_bakedchar* _chardata, const char* _text, uint32_t& _numVertices) +static FontRangeMerge s_fontRangeMerge[] = { - float xpos = 0; - float len = 0; - uint32_t numVertices = 0; + { s_iconsKenneyTtf, sizeof(s_iconsKenneyTtf), { ICON_MIN_KI, ICON_MAX_KI, 0 } }, + { s_iconsFontAwesomeTtf, sizeof(s_iconsFontAwesomeTtf), { ICON_MIN_FA, ICON_MAX_FA, 0 } }, +}; - while (*_text) - { - int32_t ch = (uint8_t)*_text; - if (ch == '\t') - { - for (int32_t ii = 0; ii < 4; ++ii) - { - if (xpos < s_tabStops[ii]) - { - xpos = s_tabStops[ii]; - break; - } - } - } - else if (ch >= ' ' - && ch < 128) - { - stbtt_bakedchar* b = _chardata + ch - ' '; - int32_t round_x = STBTT_ifloor( (xpos + b->xoff) + 0.5); - len = round_x + b->x1 - b->x0 + 0.5f; - xpos += b->xadvance; - numVertices += 6; - } +static void* memAlloc(size_t _size); +static void memFree(void* _ptr); - ++_text; - } - - _numVertices = numVertices; - - return len; -} -#endif // !USE_NANOVG_FONT - -struct Imgui +struct OcornutImguiContext { - Imgui() - : m_mx(-1) - , m_my(-1) - , m_scroll(0) - , m_active(0) - , m_hot(0) - , m_hotToBe(0) - , m_dragX(0) - , m_dragY(0) - , m_dragOrig(0) - , m_left(false) - , m_leftPressed(false) - , m_leftReleased(false) - , m_isHot(false) - , m_wentActive(false) - , m_insideArea(false) - , m_isActivePresent(false) - , m_checkActivePresence(false) - , m_widgetId(0) - , m_enabledAreaIds(0) - , m_textureWidth(512) - , m_textureHeight(512) - , m_halfTexel(0.0f) - , m_nvg(NULL) - , m_view(255) - , m_surfaceWidth(0) - , m_surfaceHeight(0) - , m_viewWidth(0) - , m_viewHeight(0) - , m_currentFontIdx(0) + static void renderDrawLists(ImDrawData* _drawData); + + void render(ImDrawData* _drawData) { - m_areaId.reset(); + const ImGuiIO& io = ImGui::GetIO(); + const float width = io.DisplaySize.x; + const float height = io.DisplaySize.y; - m_invTextureWidth = 1.0f/m_textureWidth; - m_invTextureHeight = 1.0f/m_textureHeight; + bgfx::setViewName(m_viewId, "ImGui"); + bgfx::setViewMode(m_viewId, bgfx::ViewMode::Sequential); - u_imageLodEnabled.idx = bgfx::invalidHandle; - u_imageSwizzle.idx = bgfx::invalidHandle; - s_texColor.idx = bgfx::invalidHandle; - m_missingTexture.idx = bgfx::invalidHandle; - - m_colorProgram.idx = bgfx::invalidHandle; - m_textureProgram.idx = bgfx::invalidHandle; - m_cubeMapProgram.idx = bgfx::invalidHandle; - m_latlongProgram.idx = bgfx::invalidHandle; - m_imageProgram.idx = bgfx::invalidHandle; - m_imageSwizzProgram.idx = bgfx::invalidHandle; - } - - ImguiFontHandle createFont(const void* _data, float _fontSize) - { -#if !USE_NANOVG_FONT - const ImguiFontHandle handle = { m_fontHandle.alloc() }; - const bgfx::Memory* mem = bgfx::alloc(m_textureWidth * m_textureHeight); - stbtt_BakeFontBitmap( (uint8_t*)_data, 0, _fontSize, mem->data, m_textureWidth, m_textureHeight, 32, 96, m_fonts[handle.idx].m_cdata); - m_fonts[handle.idx].m_texture = bgfx::createTexture2D( - m_textureWidth - , m_textureHeight - , false - , 1 - , bgfx::TextureFormat::R8 - , BGFX_TEXTURE_NONE - , mem - ); - m_fonts[handle.idx].m_size = _fontSize; -#else - const ImguiFontHandle handle = { bgfx::invalidHandle }; -#endif // !USE_NANOVG_FONT - return handle; - } - - void setFont(ImguiFontHandle _handle) - { - if (isValid(_handle) ) - { - m_currentFontIdx = _handle.idx; - } - } - - bgfx::TextureHandle genMissingTexture(uint32_t _width, uint32_t _height, float _lineWidth = 0.02f) - { - const bgfx::Memory* mem = bgfx::alloc(_width*_height*4); - uint32_t* bgra8 = (uint32_t*)mem->data; - - const float sx = 0.70710677f; - const float cx = 0.70710677f; - - for (uint32_t yy = 0; yy < _height; ++yy) - { - for (uint32_t xx = 0; xx < _width; ++xx) - { - float px = xx / float(_width) * 2.0f - 1.0f; - float py = yy / float(_height) * 2.0f - 1.0f; - - float sum = bx::fpulse(px * cx - py * sx, _lineWidth, -_lineWidth) - + bx::fpulse(px * sx + py * cx, _lineWidth, -_lineWidth) - ; - *bgra8++ = sum >= 1.0f ? 0xffff0000 : 0xffffffff; - } - } - - return bgfx::createTexture2D( - uint16_t(_width) - , uint16_t(_height) - , false - , 1 - , bgfx::TextureFormat::BGRA8 - , 0 - , mem - ); - } - - ImguiFontHandle create(float _fontSize, bx::AllocatorI* _allocator) - { - m_allocator = _allocator; - -#if BX_CONFIG_ALLOCATOR_CRT - if (NULL == _allocator) - { - static bx::CrtAllocator allocator; - m_allocator = &allocator; - } -#endif // BX_CONFIG_ALLOCATOR_CRT - - IMGUI_create(_fontSize, m_allocator); - - m_nvg = nvgCreate(1, m_view, m_allocator); - nvgCreateFontMem(m_nvg, "default", (unsigned char*)s_robotoRegularTtf, INT32_MAX, 0); - nvgFontSize(m_nvg, _fontSize); - nvgFontFace(m_nvg, "default"); - - for (int32_t ii = 0; ii < NUM_CIRCLE_VERTS; ++ii) - { - float a = (float)ii / (float)NUM_CIRCLE_VERTS * (float)(bx::pi * 2.0); - m_circleVerts[ii * 2 + 0] = cosf(a); - m_circleVerts[ii * 2 + 1] = sinf(a); - } - - PosColorVertex::init(); - PosColorUvVertex::init(); - PosUvVertex::init(); - PosNormalVertex::init(); - - u_imageLodEnabled = bgfx::createUniform("u_imageLodEnabled", bgfx::UniformType::Vec4); - u_imageSwizzle = bgfx::createUniform("u_swizzle", bgfx::UniformType::Vec4); - s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); - - bgfx::ShaderHandle vsh; - bgfx::ShaderHandle fsh; - - bgfx::RendererType::Enum type = bgfx::getRendererType(); - vsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_imgui_color"); - fsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_imgui_color"); - m_colorProgram = bgfx::createProgram(vsh, fsh); - bgfx::destroyShader(vsh); - bgfx::destroyShader(fsh); - - vsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_imgui_texture"); - fsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_imgui_texture"); - m_textureProgram = bgfx::createProgram(vsh, fsh); - bgfx::destroyShader(vsh); - bgfx::destroyShader(fsh); - - vsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_imgui_cubemap"); - fsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_imgui_cubemap"); - m_cubeMapProgram = bgfx::createProgram(vsh, fsh); - bgfx::destroyShader(vsh); - bgfx::destroyShader(fsh); - - vsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_imgui_latlong"); - fsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_imgui_latlong"); - m_latlongProgram = bgfx::createProgram(vsh, fsh); - bgfx::destroyShader(vsh); - bgfx::destroyShader(fsh); - - vsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_imgui_image"); - fsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_imgui_image"); - m_imageProgram = bgfx::createProgram(vsh, fsh); - bgfx::destroyShader(fsh); - - // Notice: using the same vsh. - fsh = bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_imgui_image_swizz"); - m_imageSwizzProgram = bgfx::createProgram(vsh, fsh); - bgfx::destroyShader(fsh); - bgfx::destroyShader(vsh); - - m_missingTexture = genMissingTexture(256, 256, 0.04f); - -#if !USE_NANOVG_FONT - const ImguiFontHandle handle = createFont(s_robotoRegularTtf, _fontSize); - m_currentFontIdx = handle.idx; -#else - const ImguiFontHandle handle = { bgfx::invalidHandle }; -#endif // !USE_NANOVG_FONT - return handle; - } - - void destroy() - { - bgfx::destroyUniform(u_imageLodEnabled); - bgfx::destroyUniform(u_imageSwizzle); - bgfx::destroyUniform(s_texColor); -#if !USE_NANOVG_FONT - for (uint16_t ii = 0, num = m_fontHandle.getNumHandles(); ii < num; ++ii) - { - uint16_t idx = m_fontHandle.getHandleAt(0); - bgfx::destroyTexture(m_fonts[idx].m_texture); - m_fontHandle.free(idx); - } -#endif // !USE_NANOVG_FONT - bgfx::destroyTexture(m_missingTexture); - bgfx::destroyProgram(m_colorProgram); - bgfx::destroyProgram(m_textureProgram); - bgfx::destroyProgram(m_cubeMapProgram); - bgfx::destroyProgram(m_latlongProgram); - bgfx::destroyProgram(m_imageProgram); - bgfx::destroyProgram(m_imageSwizzProgram); - nvgDelete(m_nvg); - - IMGUI_destroy(); - } - - bool anyActive() const - { - return m_active != 0; - } - - inline void updatePresence(uint32_t _id) - { - if (m_checkActivePresence && m_active == _id) - { - m_isActivePresent = true; - } - } - - uint32_t getId() - { - const uint32_t id = (m_areaId << 16) | m_widgetId++; - updatePresence(id); - return id; - } - - bool isActive(uint32_t _id) const - { - return m_active == _id; - } - - bool isActiveInputField(uint32_t _id) const - { - return m_inputField == _id; - } - - bool isHot(uint32_t _id) const - { - return m_hot == _id; - } - - bool inRect(int32_t _x, int32_t _y, int32_t _width, int32_t _height, bool _checkScroll = true) const - { - return (!_checkScroll || m_areas[m_areaId].m_inside) - && m_mx >= _x - && m_mx <= _x + _width - && m_my >= _y - && m_my <= _y + _height; - } - - bool isEnabled(uint16_t _areaId) - { - return (m_enabledAreaIds>>_areaId)&0x1; - } - - void setEnabled(uint16_t _areaId) - { - m_enabledAreaIds |= (UINT64_C(1)<<_areaId); - } - - void clearInput() - { - m_leftPressed = false; - m_leftReleased = false; - m_scroll = 0; - } - - void clearActive() - { - m_active = 0; - // mark all UI for this frame as processed - clearInput(); - } - - void clearActiveInputField() - { - m_inputField = 0; - } - - void setActive(uint32_t _id) - { - m_active = _id; - m_wentActive = true; - m_inputField = 0; - } - - void setActiveInputField(uint32_t _id) - { - m_inputField = _id; - } - - void setHot(uint32_t _id) - { - m_hotToBe = _id; - } - - bool buttonLogic(uint32_t _id, bool _over) - { - bool res = false; - // process down - if (!anyActive() ) - { - if (_over) - { - setHot(_id); - } - - if (isHot(_id) - && m_leftPressed) - { - setActive(_id); - } - } - - // if button is active, then react on left up - if (isActive(_id) ) - { - if (_over) - { - setHot(_id); - } - - if (m_leftReleased) - { - if (isHot(_id) ) - { - res = true; - } - - clearActive(); - } - } - - if (isHot(_id) ) - { - m_isHot = true; - } - - return res; - } - - void inputLogic(uint32_t _id, bool _over) - { - if (!anyActive() ) - { - if (_over) - { - setHot(_id); - } - - if (isHot(_id) - && m_leftPressed) - { - // Toggle active input. - if (isActiveInputField(_id) ) - { - clearActiveInputField(); - } - else - { - setActiveInputField(_id); - } - } - } - - if (isHot(_id) ) - { - m_isHot = true; - } - - if (m_leftPressed - && !m_isHot - && m_inputField != 0) - { - clearActiveInputField(); - } - } - - void updateInput(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, char _inputChar) - { - bool left = (_button & IMGUI_MBUT_LEFT) != 0; - - m_mx = _mx; - m_my = _my; - m_leftPressed = !m_left && left; - m_leftReleased = m_left && !left; - m_left = left; - m_scroll = _scroll; - - _inputChar = _inputChar & 0x7f; // ASCII or GTFO! :) - m_lastChar = m_char; - m_char = _inputChar; - } - - void beginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, uint16_t _surfaceWidth, uint16_t _surfaceHeight, char _inputChar, uint8_t _view) - { - m_view = _view; - m_viewWidth = _width; - m_viewHeight = _height; - m_surfaceWidth = _surfaceWidth; - m_surfaceHeight = _surfaceHeight; - - const float xscale = float(m_surfaceWidth) /float(m_viewWidth); - const float yscale = float(m_surfaceHeight)/float(m_viewHeight); - const int32_t mx = int32_t(float(_mx)*xscale); - const int32_t my = int32_t(float(_my)*yscale); - - IMGUI_beginFrame(mx, my, _button, _scroll, _width, _height, _inputChar, _view); - nvgBeginFrame(m_nvg, m_viewWidth, m_viewHeight, 1.0f); - nvgViewId(m_nvg, _view); - - bgfx::setViewName(_view, "IMGUI"); - bgfx::setViewSeq(_view, true); - - const bgfx::HMD* hmd = bgfx::getHMD(); + const bgfx::HMD* hmd = bgfx::getHMD(); + const bgfx::Caps* caps = bgfx::getCaps(); if (NULL != hmd && 0 != (hmd->flags & BGFX_HMD_RENDERING) ) { - m_viewWidth = _width / 2; - m_surfaceWidth = _surfaceWidth / 2; - float proj[16]; bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f, bgfx::getCaps()->homogeneousDepth); @@ -824,2727 +94,370 @@ struct Imgui const float offset1 = -proj[8] + (hmd->eye[1].viewOffset[0] / dist * proj[0]); float ortho[2][16]; - const float viewOffset = _surfaceWidth/4.0f; - const float viewWidth = _surfaceWidth/2.0f; - bx::mtxOrtho(ortho[0], viewOffset, viewOffset + viewWidth, (float)m_surfaceHeight, 0.0f, 0.0f, 1000.0f, offset0); - bx::mtxOrtho(ortho[1], viewOffset, viewOffset + viewWidth, (float)m_surfaceHeight, 0.0f, 0.0f, 1000.0f, offset1); - bgfx::setViewTransform(_view, NULL, ortho[0], BGFX_VIEW_STEREO, ortho[1]); - bgfx::setViewRect(_view, 0, 0, hmd->width, hmd->height); + const float viewOffset = width/4.0f; + const float viewWidth = width/2.0f; + bx::mtxOrtho(ortho[0], viewOffset, viewOffset + viewWidth, height, 0.0f, 0.0f, 1000.0f, offset0, caps->homogeneousDepth); + bx::mtxOrtho(ortho[1], viewOffset, viewOffset + viewWidth, height, 0.0f, 0.0f, 1000.0f, offset1, caps->homogeneousDepth); + bgfx::setViewTransform(m_viewId, NULL, ortho[0], BGFX_VIEW_STEREO, ortho[1]); + bgfx::setViewRect(m_viewId, 0, 0, hmd->width, hmd->height); } else { float ortho[16]; - bx::mtxOrtho(ortho, 0.0f, (float)m_surfaceWidth, (float)m_surfaceHeight, 0.0f, 0.0f, 1000.0f); - bgfx::setViewTransform(_view, NULL, ortho); - bgfx::setViewRect(_view, 0, 0, _width, _height); + bx::mtxOrtho(ortho, 0.0f, width, height, 0.0f, 0.0f, 1000.0f, 0.0f, caps->homogeneousDepth); + bgfx::setViewTransform(m_viewId, NULL, ortho); + bgfx::setViewRect(m_viewId, 0, 0, uint16_t(width), uint16_t(height) ); } - if (!ImGui::IsMouseHoveringAnyWindow() ) + // Render command lists + for (int32_t ii = 0, num = _drawData->CmdListsCount; ii < num; ++ii) { - updateInput(mx, my, _button, _scroll, _inputChar); + bgfx::TransientVertexBuffer tvb; + bgfx::TransientIndexBuffer tib; + + const ImDrawList* drawList = _drawData->CmdLists[ii]; + uint32_t numVertices = (uint32_t)drawList->VtxBuffer.size(); + uint32_t numIndices = (uint32_t)drawList->IdxBuffer.size(); + + if (!checkAvailTransientBuffers(numVertices, m_decl, numIndices) ) + { + // not enough space in transient buffer just quit drawing the rest... + break; + } + + bgfx::allocTransientVertexBuffer(&tvb, numVertices, m_decl); + bgfx::allocTransientIndexBuffer(&tib, numIndices); + + ImDrawVert* verts = (ImDrawVert*)tvb.data; + bx::memCopy(verts, drawList->VtxBuffer.begin(), numVertices * sizeof(ImDrawVert) ); + + ImDrawIdx* indices = (ImDrawIdx*)tib.data; + bx::memCopy(indices, drawList->IdxBuffer.begin(), numIndices * sizeof(ImDrawIdx) ); + + uint32_t offset = 0; + for (const ImDrawCmd* cmd = drawList->CmdBuffer.begin(), *cmdEnd = drawList->CmdBuffer.end(); cmd != cmdEnd; ++cmd) + { + if (cmd->UserCallback) + { + cmd->UserCallback(drawList, cmd); + } + else if (0 != cmd->ElemCount) + { + uint64_t state = 0 + | BGFX_STATE_RGB_WRITE + | BGFX_STATE_ALPHA_WRITE + | BGFX_STATE_MSAA + ; + + bgfx::TextureHandle th = m_texture; + bgfx::ProgramHandle program = m_program; + + if (NULL != cmd->TextureId) + { + union { ImTextureID ptr; struct { bgfx::TextureHandle handle; uint8_t flags; uint8_t mip; } s; } texture = { cmd->TextureId }; + state |= 0 != (IMGUI_FLAGS_ALPHA_BLEND & texture.s.flags) + ? BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) + : BGFX_STATE_NONE + ; + th = texture.s.handle; + if (0 != texture.s.mip) + { + const float lodEnabled[4] = { float(texture.s.mip), 1.0f, 0.0f, 0.0f }; + bgfx::setUniform(u_imageLodEnabled, lodEnabled); + program = m_imageProgram; + } + } + else + { + state |= BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA); + } + + const uint16_t xx = uint16_t(bx::max(cmd->ClipRect.x, 0.0f) ); + const uint16_t yy = uint16_t(bx::max(cmd->ClipRect.y, 0.0f) ); + bgfx::setScissor(xx, yy + , uint16_t(bx::min(cmd->ClipRect.z, 65535.0f)-xx) + , uint16_t(bx::min(cmd->ClipRect.w, 65535.0f)-yy) + ); + + bgfx::setState(state); + bgfx::setTexture(0, s_tex, th); + bgfx::setVertexBuffer(0, &tvb, 0, numVertices); + bgfx::setIndexBuffer(&tib, offset, cmd->ElemCount); + bgfx::submit(cmd->ViewId, program); + } + + offset += cmd->ElemCount; + } + } + } + + void create(float _fontSize, bx::AllocatorI* _allocator) + { + m_allocator = _allocator; + + if (NULL == _allocator) + { + static bx::DefaultAllocator allocator; + m_allocator = &allocator; } - m_hot = m_hotToBe; - m_hotToBe = 0; + m_viewId = 255; + m_lastScroll = 0; + m_last = bx::getHPCounter(); - m_wentActive = false; - m_isHot = false; + ImGuiIO& io = ImGui::GetIO(); + io.RenderDrawListsFn = renderDrawLists; + io.MemAllocFn = memAlloc; + io.MemFreeFn = memFree; - Area& area = getCurrentArea(); - area.m_widgetX = 0; - area.m_widgetY = 0; - area.m_widgetW = 0; + io.DisplaySize = ImVec2(1280.0f, 720.0f); + io.DeltaTime = 1.0f / 60.0f; + io.IniFilename = NULL; - m_areaId.reset(); - m_widgetId = 0; - m_enabledAreaIds = 0; - m_insideArea = false; + setupStyle(true); - m_isActivePresent = false; +#if defined(SCI_NAMESPACE) + io.KeyMap[ImGuiKey_Tab] = (int)entry::Key::Tab; + io.KeyMap[ImGuiKey_LeftArrow] = (int)entry::Key::Left; + io.KeyMap[ImGuiKey_RightArrow] = (int)entry::Key::Right; + io.KeyMap[ImGuiKey_UpArrow] = (int)entry::Key::Up; + io.KeyMap[ImGuiKey_DownArrow] = (int)entry::Key::Down; + io.KeyMap[ImGuiKey_Home] = (int)entry::Key::Home; + io.KeyMap[ImGuiKey_End] = (int)entry::Key::End; + io.KeyMap[ImGuiKey_Delete] = (int)entry::Key::Delete; + io.KeyMap[ImGuiKey_Backspace] = (int)entry::Key::Backspace; + io.KeyMap[ImGuiKey_Enter] = (int)entry::Key::Return; + io.KeyMap[ImGuiKey_Escape] = (int)entry::Key::Esc; + io.KeyMap[ImGuiKey_A] = (int)entry::Key::KeyA; + io.KeyMap[ImGuiKey_C] = (int)entry::Key::KeyC; + io.KeyMap[ImGuiKey_V] = (int)entry::Key::KeyV; + io.KeyMap[ImGuiKey_X] = (int)entry::Key::KeyX; + io.KeyMap[ImGuiKey_Y] = (int)entry::Key::KeyY; + io.KeyMap[ImGuiKey_Z] = (int)entry::Key::KeyZ; +#endif // defined(SCI_NAMESPACE) + + bgfx::RendererType::Enum type = bgfx::getRendererType(); + m_program = bgfx::createProgram( + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_ocornut_imgui") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_ocornut_imgui") + , true + ); + + u_imageLodEnabled = bgfx::createUniform("u_imageLodEnabled", bgfx::UniformType::Vec4); + m_imageProgram = bgfx::createProgram( + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_imgui_image") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_imgui_image") + , true + ); + + m_decl + .begin() + .add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float) + .add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float) + .add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true) + .end(); + + s_tex = bgfx::createUniform("s_tex", bgfx::UniformType::Int1); + + uint8_t* data; + int32_t width; + int32_t height; + { + ImFontConfig config; + config.FontDataOwnedByAtlas = false; + config.MergeMode = false; +// config.MergeGlyphCenterV = true; + + const ImWchar* ranges = io.Fonts->GetGlyphRangesCyrillic(); + m_font[ImGui::Font::Regular] = io.Fonts->AddFontFromMemoryTTF( (void*)s_robotoRegularTtf, sizeof(s_robotoRegularTtf), _fontSize, &config, ranges); + m_font[ImGui::Font::Mono ] = io.Fonts->AddFontFromMemoryTTF( (void*)s_robotoMonoRegularTtf, sizeof(s_robotoMonoRegularTtf), _fontSize-3.0f, &config, ranges); + + config.MergeMode = true; + config.DstFont = m_font[ImGui::Font::Regular]; + + for (uint32_t ii = 0; ii < BX_COUNTOF(s_fontRangeMerge); ++ii) + { + const FontRangeMerge& frm = s_fontRangeMerge[ii]; + + io.Fonts->AddFontFromMemoryTTF( (void*)frm.data + , (int)frm.size + , _fontSize-3.0f + , &config + , frm.ranges + ); + } + } + + io.Fonts->GetTexDataAsRGBA32(&data, &width, &height); + + m_texture = bgfx::createTexture2D( + (uint16_t)width + , (uint16_t)height + , false + , 1 + , bgfx::TextureFormat::BGRA8 + , 0 + , bgfx::copy(data, width*height*4) + ); + } + + void destroy() + { + ImGui::Shutdown(); + + bgfx::destroy(s_tex); + bgfx::destroy(m_texture); + + bgfx::destroy(u_imageLodEnabled); + bgfx::destroy(m_imageProgram); + bgfx::destroy(m_program); + + m_allocator = NULL; + } + + void setupStyle(bool _dark) + { + // Doug Binks' darl color scheme + // https://gist.github.com/dougbinks/8089b4bbaccaaf6fa204236978d165a9 + ImGuiStyle& style = ImGui::GetStyle(); + if (_dark) + { + ImGui::StyleColorsDark(&style); + } + else + { + ImGui::StyleColorsLight(&style); + } + + style.FrameRounding = 4.0f; + style.WindowBorderSize = 0.0f; + } + + void beginFrame( + int32_t _mx + , int32_t _my + , uint8_t _button + , int32_t _scroll + , int _width + , int _height + , char _inputChar + , bgfx::ViewId _viewId + ) + { + m_viewId = _viewId; + + ImGuiIO& io = ImGui::GetIO(); + if (_inputChar < 0x7f) + { + io.AddInputCharacter(_inputChar); // ASCII or GTFO! :( + } + + io.DisplaySize = ImVec2( (float)_width, (float)_height); + + const int64_t now = bx::getHPCounter(); + const int64_t frameTime = now - m_last; + m_last = now; + const double freq = double(bx::getHPFrequency() ); + io.DeltaTime = float(frameTime/freq); + + io.MousePos = ImVec2( (float)_mx, (float)_my); + io.MouseDown[0] = 0 != (_button & IMGUI_MBUT_LEFT); + io.MouseDown[1] = 0 != (_button & IMGUI_MBUT_RIGHT); + io.MouseDown[2] = 0 != (_button & IMGUI_MBUT_MIDDLE); + io.MouseWheel = (float)(_scroll - m_lastScroll); + m_lastScroll = _scroll; + +#if defined(SCI_NAMESPACE) + uint8_t modifiers = inputGetModifiersState(); + io.KeyShift = 0 != (modifiers & (entry::Modifier::LeftShift | entry::Modifier::RightShift) ); + io.KeyCtrl = 0 != (modifiers & (entry::Modifier::LeftCtrl | entry::Modifier::RightCtrl ) ); + io.KeyAlt = 0 != (modifiers & (entry::Modifier::LeftAlt | entry::Modifier::RightAlt ) ); + for (int32_t ii = 0; ii < (int32_t)entry::Key::Count; ++ii) + { + io.KeysDown[ii] = inputGetKeyState(entry::Key::Enum(ii) ); + } +#endif // defined(SCI_NAMESPACE) + + ImGui::NewFrame(); + ImGui::PushStyleVar(ImGuiStyleVar_ViewId, (float)_viewId); + + ImGuizmo::BeginFrame(); } void endFrame() { - if (m_checkActivePresence && !m_isActivePresent) - { - // The ui element is not present any more, reset active field. - m_active = 0; - } - m_checkActivePresence = (0 != m_active); - - clearInput(); - - nvgEndFrame(m_nvg); - IMGUI_endFrame(); + ImGui::PopStyleVar(1); + ImGui::Render(); } - bool beginScroll(int32_t _height, int32_t* _scroll, bool _enabled) - { - Area& parentArea = getCurrentArea(); - - m_areaId.next(); - const uint32_t scrollId = getId(); - - Area& area = getCurrentArea(); - - const uint16_t parentBottom = parentArea.m_scissorY + parentArea.m_scissorHeight; - const uint16_t childBottom = parentArea.m_widgetY + _height; - const uint16_t bottom = IMGUI_MIN(childBottom, parentBottom); - - const uint16_t top = IMGUI_MAX(parentArea.m_widgetY, parentArea.m_scissorY); - - area.m_contentX = parentArea.m_contentX; - area.m_contentY = parentArea.m_widgetY; - area.m_contentWidth = parentArea.m_contentWidth - (SCROLL_AREA_PADDING*3); - area.m_contentHeight = _height; - area.m_widgetX = parentArea.m_widgetX; - area.m_widgetY = parentArea.m_widgetY + (*_scroll); - area.m_widgetW = parentArea.m_widgetW - (SCROLL_AREA_PADDING*3); - - area.m_scissorX = area.m_contentX; - area.m_scissorWidth = area.m_contentWidth; - - area.m_scissorY = top - 1; - area.m_scissorHeight = bottom - top; - area.m_scissorEnabled = true; - - area.m_height = _height; - - area.m_scrollVal = _scroll; - area.m_scrollId = scrollId; - - area.m_inside = inRect(parentArea.m_scissorX - , area.m_scissorY - , parentArea.m_scissorWidth - , area.m_scissorHeight - , false - ); - area.m_didScroll = false; - - parentArea.m_widgetY += (_height + DEFAULT_SPACING); - - if (_enabled) - { - setEnabled(m_areaId); - } - - nvgScissor(m_nvg, area); - - m_insideArea |= area.m_inside; - - return area.m_inside; - } - - void endScroll(int32_t _r) - { - Area& area = getCurrentArea(); - area.m_scissorEnabled = false; - - const int32_t xx = area.m_contentX + area.m_contentWidth - 1; - const int32_t yy = area.m_contentY; - const int32_t width = SCROLL_AREA_PADDING * 2; - const int32_t height = area.m_height; - - const int32_t aa = area.m_contentY+area.m_height; - const int32_t bb = area.m_widgetY-DEFAULT_SPACING; - const int32_t sbot = IMGUI_MAX(aa, bb); - const int32_t stop = area.m_contentY + (*area.m_scrollVal); - const int32_t sh = IMGUI_MAX(1, sbot - stop); // The scrollable area height. - - const uint32_t hid = area.m_scrollId; - const float barHeight = (float)height / (float)sh; - const bool hasScrollBar = (barHeight < 1.0f); - - // Handle mouse scrolling. - if (area.m_inside && !area.m_didScroll && !anyActive() ) - { - if (m_scroll) - { - const int32_t diff = height - sh; - - const int32_t val = *area.m_scrollVal + 20*m_scroll; - const int32_t min = (diff < 0) ? diff : *area.m_scrollVal; - const int32_t max = 0; - const int32_t newVal = IMGUI_CLAMP(val, min, max); - *area.m_scrollVal = newVal; - - if (hasScrollBar) - { - area.m_didScroll = true; - } - } - } - - area.m_inside = false; - - int32_t* scroll = area.m_scrollVal; - - // This must be called here before drawing scroll bars - // so that scissor of parrent area applies. - m_areaId.pop(); - - // Propagate 'didScroll' to parrent area to avoid scrolling multiple areas at once. - Area& parentArea = getCurrentArea(); - parentArea.m_didScroll = (parentArea.m_didScroll || area.m_didScroll); - - // Draw and handle scroll click. - if (hasScrollBar) - { - const float barY = bx::fsaturate( (float)(-(*scroll) ) / (float)sh); - - // Handle scroll bar logic. - const int32_t hx = xx; - const int32_t hy = yy + (int)(barY * height); - const int32_t hw = width; - const int32_t hh = (int)(barHeight * height); - - const int32_t range = height - (hh - 1); - const bool over = inRect(hx, hy, hw, hh); - buttonLogic(hid, over); - if (isActive(hid) ) - { - float uu = (float)(hy - yy) / (float)range; - if (m_wentActive) - { - m_dragY = m_my; - m_dragOrig = uu; - } - - if (m_dragY != m_my) - { - const int32_t diff = height - sh; - - const int32_t drag = m_my - m_dragY; - const float dragFactor = float(sh)/float(height); - - const int32_t val = *scroll - int32_t(drag*dragFactor); - const int32_t min = (diff < 0) ? diff : *scroll; - const int32_t max = 0; - *scroll = IMGUI_CLAMP(val, min, max); - - m_dragY = m_my; - } - } - - // BG - drawRoundedRect( (float)xx - , (float)yy - , (float)width - , (float)height - , (float)_r - , imguiRGBA(0, 0, 0, 196) - ); - - // Bar - if (isActive(hid) ) - { - drawRoundedRect( (float)hx - , (float)hy - , (float)hw - , (float)hh - , (float)_r - , imguiRGBA(255, 196, 0, 196) - ); - } - else - { - drawRoundedRect( (float)hx - , (float)hy - , (float)hw - , (float)hh - , (float)_r - , isHot(hid) ? imguiRGBA(255, 196, 0, 96) : imguiRGBA(255, 255, 255, 64) - ); - } - } - else - { - // Clear active if scroll is selected but not visible any more. - if (isActive(hid) ) - { - clearActive(); - } - } - - nvgScissor(m_nvg, parentArea); - } - - bool beginArea(const char* _name, int32_t _x, int32_t _y, int32_t _width, int32_t _height, bool _enabled, int32_t _r) - { - m_areaId.next(); - const uint32_t scrollId = getId(); - - const bool hasTitle = (NULL != _name && '\0' != _name[0]); - const int32_t header = hasTitle ? AREA_HEADER : 0; - - Area& area = getCurrentArea(); - area.m_x = _x; - area.m_y = _y; - area.m_width = _width; - area.m_height = _height; - - area.m_contentX = area.m_x + SCROLL_AREA_PADDING; - area.m_contentY = area.m_y + SCROLL_AREA_PADDING + header; - area.m_contentWidth = area.m_width - SCROLL_AREA_PADDING; - area.m_contentHeight = area.m_height - SCROLL_AREA_PADDING*2 - header; - - area.m_scissorX = area.m_contentX; - area.m_scissorY = area.m_y + SCROLL_AREA_PADDING + header; - area.m_scissorHeight = area.m_height - SCROLL_AREA_PADDING*2 - header; - area.m_scissorWidth = area.m_contentWidth; - area.m_scissorEnabled = false; - - area.m_widgetX = area.m_contentX; - area.m_widgetY = area.m_contentY; - area.m_widgetW = area.m_width - SCROLL_AREA_PADDING*2; - - static int32_t s_zeroScroll = 0; - area.m_scrollVal = &s_zeroScroll; - area.m_scrollId = scrollId; - area.m_inside = inRect(area.m_scissorX, area.m_scissorY, area.m_scissorWidth, area.m_scissorHeight, false); - area.m_didScroll = false; - - if (_enabled) - { - setEnabled(m_areaId); - } - - if (0 == _r) - { - drawRect( (float)_x - , (float)_y - , (float)_width + 0.3f /*border fix for seamlessly joining two scroll areas*/ - , (float)_height + 0.3f /*border fix for seamlessly joining two scroll areas*/ - , imguiRGBA(0, 0, 0, 192) - ); - } - else - { - drawRoundedRect( (float)_x - , (float)_y - , (float)_width - , (float)_height - , (float)_r - , imguiRGBA(0, 0, 0, 192) - ); - } - - if (hasTitle) - { - drawText(_x + 10 - , _y + 18 - , ImguiTextAlign::Left - , _name - , imguiRGBA(255, 255, 255, 128) - ); - } - area.m_scissorEnabled = true; - - nvgScissor(m_nvg, area); - - m_insideArea |= area.m_inside; - return area.m_inside; - } - - void endArea() - { - m_areaId.pop(); - nvgResetScissor(m_nvg); - } - - bool button(const char* _text, bool _enabled, ImguiAlign::Enum _align, uint32_t _rgb0, int32_t _r) - { - const uint32_t id = getId(); - - Area& area = getCurrentArea(); - const int32_t yy = area.m_widgetY; - const int32_t height = BUTTON_HEIGHT; - area.m_widgetY += BUTTON_HEIGHT + DEFAULT_SPACING; - - int32_t xx; - int32_t width; - if (ImguiAlign::Left == _align) - { - xx = area.m_contentX + SCROLL_AREA_PADDING; - width = area.m_widgetW; - } - else if (ImguiAlign::LeftIndented == _align - || ImguiAlign::Right == _align) - { - xx = area.m_widgetX; - width = area.m_widgetW-1; //TODO: -1 ! - } - else //if (ImguiAlign::Center == _align - //|| ImguiAlign::CenterIndented == _align). - { - xx = area.m_widgetX; - width = area.m_widgetW - (area.m_widgetX-area.m_contentX); - } - - const bool enabled = _enabled && isEnabled(m_areaId); - const bool over = enabled && inRect(xx, yy, width, height); - const bool res = buttonLogic(id, over); - - const uint32_t rgb0 = _rgb0&0x00ffffff; - - if (!visible(yy, height, area.m_scissorY, area.m_scissorHeight)) - { - return false; - } - - drawRoundedRect( (float)xx - , (float)yy - , (float)width - , (float)height - , (float)_r - , rgb0 | imguiRGBA(0, 0, 0, isActive(id) ? 196 : 96) - ); - - if (enabled) - { - drawText(xx + BUTTON_HEIGHT / 2 - , yy + BUTTON_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _text - , isHot(id) ? imguiRGBA(255, 196, 0, 255) : imguiRGBA(255, 255, 255, 200) - ); - } - else - { - drawText(xx + BUTTON_HEIGHT / 2 - , yy + BUTTON_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _text - , imguiRGBA(128, 128, 128, 200) - ); - } - - return res; - } - - bool item(const char* _text, bool _enabled) - { - const uint32_t id = getId(); - - Area& area = getCurrentArea(); - const int32_t xx = area.m_widgetX; - const int32_t yy = area.m_widgetY; - const int32_t width = area.m_widgetW; - const int32_t height = BUTTON_HEIGHT; - area.m_widgetY += BUTTON_HEIGHT + DEFAULT_SPACING; - - const bool enabled = _enabled && isEnabled(m_areaId); - const bool over = enabled && inRect(xx, yy, width, height); - const bool res = buttonLogic(id, over); - - if (!visible(yy, height, area.m_scissorY, area.m_scissorHeight)) - { - return false; - } - - if (isHot(id) ) - { - drawRoundedRect( (float)xx - , (float)yy - , (float)width - , (float)height - , 2.0f - , imguiRGBA(255, 196, 0, isActive(id) ? 196 : 96) - ); - } - - if (enabled) - { - drawText(xx + BUTTON_HEIGHT / 2 - , yy + BUTTON_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _text - , imguiRGBA(255, 255, 255, 200) - ); - } - else - { - drawText(xx + BUTTON_HEIGHT / 2 - , yy + BUTTON_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _text - , imguiRGBA(128, 128, 128, 200) - ); - } - - return res; - } - - bool check(const char* _text, bool _checked, bool _enabled) - { - const uint32_t id = getId(); - - Area& area = getCurrentArea(); - const int32_t xx = area.m_widgetX; - const int32_t yy = area.m_widgetY; - const int32_t width = area.m_widgetW; - const int32_t height = BUTTON_HEIGHT; - area.m_widgetY += BUTTON_HEIGHT + DEFAULT_SPACING; - - const bool enabled = _enabled && isEnabled(m_areaId); - const bool over = enabled && inRect(xx, yy, width, height); - const bool res = buttonLogic(id, over); - - const int32_t cx = xx + BUTTON_HEIGHT / 2 - CHECK_SIZE / 2; - const int32_t cy = yy + BUTTON_HEIGHT / 2 - CHECK_SIZE / 2; - - if (!visible(cy, CHECK_SIZE+6, area.m_scissorY, area.m_scissorHeight)) - { - return false; - } - - drawRoundedRect( (float)cx - 3 - , (float)cy - 3 - , (float)CHECK_SIZE + 6 - , (float)CHECK_SIZE + 6 - , 4 - , imguiRGBA(128, 128, 128, isActive(id) ? 196 : 96) - ); - - if (_checked) - { - if (enabled) - { - drawRoundedRect( (float)cx - , (float)cy - , (float)CHECK_SIZE - , (float)CHECK_SIZE - , (float)CHECK_SIZE / 2 - 1 - , imguiRGBA(255, 255, 255, isActive(id) ? 255 : 200) - ); - } - else - { - drawRoundedRect( (float)cx - , (float)cy - , (float)CHECK_SIZE - , (float)CHECK_SIZE - , (float)CHECK_SIZE / 2 - 1 - , imguiRGBA(128, 128, 128, 200) - ); - } - } - - if (enabled) - { - drawText(xx + BUTTON_HEIGHT - , yy + BUTTON_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _text - , isHot(id) ? imguiRGBA(255, 196, 0, 255) : imguiRGBA(255, 255, 255, 200) - ); - } - else - { - drawText(xx + BUTTON_HEIGHT - , yy + BUTTON_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _text - , imguiRGBA(128, 128, 128, 200) - ); - } - - return res; - } - - void input(const char* _label, char* _str, uint32_t _len, bool _enabled, ImguiAlign::Enum _align, int32_t _r) - { - const uint32_t id = getId(); - - Area& area = getCurrentArea(); - const int32_t yy = area.m_widgetY; - area.m_widgetY += BUTTON_HEIGHT + DEFAULT_SPACING; - - int32_t xx; - int32_t width; - if (ImguiAlign::Left == _align) - { - xx = area.m_contentX + SCROLL_AREA_PADDING; - width = area.m_widgetW; - } - else if (ImguiAlign::LeftIndented == _align - || ImguiAlign::Right == _align) - { - xx = area.m_widgetX; - width = area.m_widgetW-1; //TODO: -1 ! - } - else //if (ImguiAlign::Center == _align - //|| ImguiAlign::CenterIndented == _align). - { - xx = area.m_widgetX; - width = area.m_widgetW - (area.m_widgetX-area.m_contentX); - } - - const bool drawLabel = (NULL != _label && _label[0] != '\0'); - - if (drawLabel) - { - drawText(xx - , yy + BUTTON_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _label - , imguiRGBA(255, 255, 255, 200) - ); - } - - // Handle input. - if (isActiveInputField(id) ) - { - const size_t cursor = size_t(strlen(_str) ); - - if (m_char == 0x08 || m_char == 0x7f) //backspace or delete - { - _str[cursor-1] = '\0'; - } - else if (m_char == 0x0d || m_char == 0x1b) //enter or escape - { - clearActiveInputField(); - } - else if (cursor < _len-1 - && 0 != m_char) - { - _str[cursor] = m_char; - _str[cursor+1] = '\0'; - } - } - - // Draw input area. - const int32_t height = BUTTON_HEIGHT; - if (drawLabel) - { - uint32_t numVertices = 0; //unused - const int32_t labelWidth = int32_t(getTextLength(m_fonts[m_currentFontIdx].m_cdata, _label, numVertices) ); - xx += (labelWidth + 6); - width -= (labelWidth + 6); - } - const bool enabled = _enabled && isEnabled(m_areaId); - const bool over = enabled && inRect(xx, yy, width, height); - inputLogic(id, over); - - drawRoundedRect( (float)xx - , (float)yy - , (float)width - , (float)height - , (float)_r - , isActiveInputField(id)?imguiRGBA(255,196,0,255):imguiRGBA(128,128,128,96) - ); - - if (isActiveInputField(id) ) - { - drawText(xx + 6 - , yy + BUTTON_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _str - , imguiRGBA(0, 0, 0, 255) - ); - } - else - { - drawText(xx + 6 - , yy + BUTTON_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _str - , isHot(id) ? imguiRGBA(255,196,0,255) : imguiRGBA(255,255,255,255) - ); - } - } - - uint8_t tabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint32_t _nTabs, uint32_t _nEnabled, va_list _argList) - { - const char* titles[16]; - bool tabEnabled[16]; - const uint8_t tabCount = IMGUI_MIN(_nTabs, 16); - const uint8_t enabledCount = IMGUI_MIN(_nEnabled, 16); - - // Read titles. - { - uint8_t ii = 0; - for (; ii < tabCount; ++ii) - { - const char* str = va_arg(_argList, const char*); - titles[ii] = str; - } - for (; ii < _nTabs; ++ii) - { - const char* str = va_arg(_argList, const char*); - BX_UNUSED(str); - } - } - - // Read enabled tabs. - { - uint8_t ii = 0; - for (; ii < enabledCount; ++ii) - { - const bool enabled = (0 != va_arg(_argList, int) ); - tabEnabled[ii] = enabled; - } - for (; ii < _nEnabled; ++ii) - { - const int enabled = va_arg(_argList, int); - BX_UNUSED(enabled); - } - for (; ii < _nTabs; ++ii) - { - tabEnabled[ii] = true; - } - } - - Area& area = getCurrentArea(); - const int32_t yy = area.m_widgetY; - area.m_widgetY += _height + DEFAULT_SPACING; - - int32_t xx; - int32_t width; - if (ImguiAlign::Left == _align) - { - xx = area.m_contentX + SCROLL_AREA_PADDING; - width = area.m_widgetW; - } - else if (ImguiAlign::LeftIndented == _align - || ImguiAlign::Right == _align) - { - xx = area.m_widgetX; - width = area.m_widgetW-1; //TODO: -1 ! - } - else //if (ImguiAlign::Center == _align - //|| ImguiAlign::CenterIndented == _align). - { - xx = area.m_widgetX; - width = area.m_widgetW - (area.m_widgetX-area.m_contentX); - } - - uint8_t selected = _selected; - const int32_t tabWidth = width / tabCount; - const int32_t tabWidthHalf = width / (tabCount*2); - const int32_t textY = yy + _height/2 + int32_t(m_fonts[m_currentFontIdx].m_size)/2 - 2; - - drawRoundedRect( (float)xx - , (float)yy - , (float)width - , (float)_height - , (float)_r - , _enabled?imguiRGBA(128,128,128,96):imguiRGBA(128,128,128,64) - ); - - for (uint8_t ii = 0; ii < tabCount; ++ii) - { - const uint32_t id = getId(); - - int32_t buttonX = xx + ii*width/tabCount; - int32_t textX = buttonX + tabWidthHalf; - - const bool enabled = _enabled && tabEnabled[ii] && isEnabled(m_areaId); - const bool over = enabled && inRect(buttonX, yy, tabWidth, _height); - const bool res = buttonLogic(id, over); - - const uint32_t textColor = (ii == selected) - ? (enabled ? imguiRGBA(0,0,0,255) : imguiRGBA(255,255,255,100) ) - : (isHot(id) ? imguiRGBA(255,196,0,enabled?255:100) : imguiRGBA(255,255,255,enabled?200:100) ) - ; - - if (ii == selected) - { - drawRoundedRect( (float)buttonX - , (float)yy - , (float)tabWidth - , (float)_height - , (float)_r - , enabled?imguiRGBA(255,196,0,200):imguiRGBA(128,128,128,32) - ); - } - else if (isActive(id) ) - { - drawRoundedRect( (float)buttonX - , (float)yy - , (float)tabWidth - , (float)_height - , (float)_r - , imguiRGBA(128,128,128,196) - ); - } - - drawText(textX - , textY - , ImguiTextAlign::Center - , titles[ii] - , textColor - ); - - if (res) - { - selected = ii; - } - } - - return selected; - } - - bool image(bgfx::TextureHandle _image, float _lod, int32_t _width, int32_t _height, ImguiAlign::Enum _align, bool _enabled, bool _originBottomLeft) - { - const uint32_t id = getId(); - Area& area = getCurrentArea(); - - int32_t xx; - if (ImguiAlign::Left == _align) - { - xx = area.m_contentX + SCROLL_AREA_PADDING; - } - else if (ImguiAlign::LeftIndented == _align) - { - xx = area.m_widgetX; - } - else if (ImguiAlign::Center == _align) - { - xx = area.m_contentX + (area.m_widgetW-_width)/2; - } - else if (ImguiAlign::CenterIndented == _align) - { - xx = (area.m_widgetX + area.m_widgetW + area.m_contentX - _width)/2; - } - else //if (ImguiAlign::Right == _align). - { - xx = area.m_contentX + area.m_widgetW - _width; - } - - const int32_t yy = area.m_widgetY; - area.m_widgetY += _height + DEFAULT_SPACING; - - if (screenQuad(xx, yy, _width, _height, _originBottomLeft) ) - { - const bool enabled = _enabled && isEnabled(m_areaId); - const bool over = enabled && inRect(xx, yy, _width, _height); - const bool res = buttonLogic(id, over); - - const float lodEnabled[4] = { _lod, float(enabled), 0.0f, 0.0f }; - bgfx::setUniform(u_imageLodEnabled, lodEnabled); - bgfx::setTexture(0, s_texColor, bgfx::isValid(_image) ? _image : m_missingTexture); - bgfx::setState(BGFX_STATE_RGB_WRITE - |BGFX_STATE_ALPHA_WRITE - |BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) - ); - setCurrentScissor(); - bgfx::submit(m_view, m_imageProgram); - - return res; - } - - return false; - } - - bool image(bgfx::TextureHandle _image, float _lod, float _width, float _aspect, ImguiAlign::Enum _align, bool _enabled, bool _originBottomLeft) - { - const float width = _width*float(getCurrentArea().m_widgetW); - const float height = width/_aspect; - - return image(_image, _lod, int32_t(width), int32_t(height), _align, _enabled, _originBottomLeft); - } - - bool imageChannel(bgfx::TextureHandle _image, uint8_t _channel, float _lod, int32_t _width, int32_t _height, ImguiAlign::Enum _align, bool _enabled) - { - BX_CHECK(_channel < 4, "Channel param must be from 0 to 3!"); - - const uint32_t id = getId(); - Area& area = getCurrentArea(); - - int32_t xx; - if (ImguiAlign::Left == _align) - { - xx = area.m_contentX + SCROLL_AREA_PADDING; - } - else if (ImguiAlign::LeftIndented == _align) - { - xx = area.m_widgetX; - } - else if (ImguiAlign::Center == _align) - { - xx = area.m_contentX + (area.m_widgetW-_width)/2; - } - else if (ImguiAlign::CenterIndented == _align) - { - xx = (area.m_widgetX + area.m_widgetW + area.m_contentX - _width)/2; - } - else //if (ImguiAlign::Right == _align). - { - xx = area.m_contentX + area.m_widgetW - _width; - } - - const int32_t yy = area.m_widgetY; - area.m_widgetY += _height + DEFAULT_SPACING; - - if (screenQuad(xx, yy, _width, _height) ) - { - const bool enabled = _enabled && isEnabled(m_areaId); - const bool over = enabled && inRect(xx, yy, _width, _height); - const bool res = buttonLogic(id, over); - - const float lodEnabled[4] = { _lod, float(enabled), 0.0f, 0.0f }; - bgfx::setUniform(u_imageLodEnabled, lodEnabled); - - float swizz[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; - swizz[_channel] = 1.0f; - bgfx::setUniform(u_imageSwizzle, swizz); - - bgfx::setTexture(0, s_texColor, bgfx::isValid(_image) ? _image : m_missingTexture); - bgfx::setState(BGFX_STATE_RGB_WRITE - |BGFX_STATE_ALPHA_WRITE - |BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) - ); - setCurrentScissor(); - bgfx::submit(m_view, m_imageSwizzProgram); - - return res; - } - - return false; - } - - bool imageChannel(bgfx::TextureHandle _image, uint8_t _channel, float _lod, float _width, float _aspect, ImguiAlign::Enum _align, bool _enabled) - { - const float width = _width*float(getCurrentArea().m_widgetW); - const float height = width/_aspect; - - return imageChannel(_image, _channel, _lod, int32_t(width), int32_t(height), _align, _enabled); - } - - bool latlong(bgfx::TextureHandle _cubemap, float _lod, ImguiAlign::Enum _align, bool _enabled) - { - const uint32_t id = getId(); - - Area& area = getCurrentArea(); - int32_t xx; - int32_t width; - if (ImguiAlign::Left == _align) - { - xx = area.m_contentX + SCROLL_AREA_PADDING; - width = area.m_widgetW; - } - else if (ImguiAlign::LeftIndented == _align - || ImguiAlign::Right == _align) - { - xx = area.m_widgetX; - width = area.m_widgetW; - } - else //if (ImguiAlign::Center == _align - //|| ImguiAlign::CenterIndented == _align). - { - xx = area.m_widgetX; - width = area.m_widgetW - (area.m_widgetX-area.m_contentX); - } - - const int32_t height = width/2; - const int32_t yy = area.m_widgetY; - area.m_widgetY += height + DEFAULT_SPACING; - - if (screenQuad(xx, yy, width, height, false) ) - { - const bool enabled = _enabled && isEnabled(m_areaId); - const bool over = enabled && inRect(xx, yy, width, height); - const bool res = buttonLogic(id, over); - - const float lodEnabled[4] = { _lod, float(enabled), 0.0f, 0.0f }; - bgfx::setUniform(u_imageLodEnabled, lodEnabled); - - bgfx::setTexture(0, s_texColor, _cubemap); - bgfx::setState(BGFX_STATE_RGB_WRITE - |BGFX_STATE_ALPHA_WRITE - |BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) - ); - setCurrentScissor(); - bgfx::submit(m_view, m_latlongProgram); - - return res; - } - - return false; - } - - bool cubeMap(bgfx::TextureHandle _cubemap, float _lod, bool _cross, bool _sameHeight, ImguiAlign::Enum _align, bool _enabled) - { - const uint32_t id = getId(); - - Area& area = getCurrentArea(); - int32_t xx; - int32_t width; - if (ImguiAlign::Left == _align) - { - xx = area.m_contentX + SCROLL_AREA_PADDING; - width = area.m_widgetW; - } - else if (ImguiAlign::LeftIndented == _align - || ImguiAlign::Right == _align) - { - xx = area.m_widgetX; - width = area.m_widgetW; - } - else //if (ImguiAlign::Center == _align - //|| ImguiAlign::CenterIndented == _align). - { - xx = area.m_widgetX; - width = area.m_widgetW - (area.m_widgetX-area.m_contentX); - } - - const bool adjustHeight = (_cross && _sameHeight); - const bool fullHeight = (_cross && !_sameHeight); - - if (adjustHeight) - { - xx += width/6; - } - - const int32_t height = fullHeight ? (width*3)/4 : (width/2); - const int32_t yy = area.m_widgetY; - area.m_widgetY += height + DEFAULT_SPACING; - - const uint32_t numVertices = 14; - const uint32_t numIndices = 36; - if (checkAvailTransientBuffers(numVertices, PosNormalVertex::ms_decl, numIndices) ) - { - bgfx::TransientVertexBuffer tvb; - bgfx::allocTransientVertexBuffer(&tvb, numVertices, PosNormalVertex::ms_decl); - - bgfx::TransientIndexBuffer tib; - bgfx::allocTransientIndexBuffer(&tib, numIndices); - - PosNormalVertex* vertex = (PosNormalVertex*)tvb.data; - uint16_t* indices = (uint16_t*)tib.data; - - if (_cross) - { - vertex->set(0.0f, 0.5f, 0.0f, -1.0f, 1.0f, -1.0f); ++vertex; - vertex->set(0.0f, 1.0f, 0.0f, -1.0f, -1.0f, -1.0f); ++vertex; - - vertex->set(0.5f, 0.0f, 0.0f, -1.0f, 1.0f, -1.0f); ++vertex; - vertex->set(0.5f, 0.5f, 0.0f, -1.0f, 1.0f, 1.0f); ++vertex; - vertex->set(0.5f, 1.0f, 0.0f, -1.0f, -1.0f, 1.0f); ++vertex; - vertex->set(0.5f, 1.5f, 0.0f, -1.0f, -1.0f, -1.0f); ++vertex; - - vertex->set(1.0f, 0.0f, 0.0f, 1.0f, 1.0f, -1.0f); ++vertex; - vertex->set(1.0f, 0.5f, 0.0f, 1.0f, 1.0f, 1.0f); ++vertex; - vertex->set(1.0f, 1.0f, 0.0f, 1.0f, -1.0f, 1.0f); ++vertex; - vertex->set(1.0f, 1.5f, 0.0f, 1.0f, -1.0f, -1.0f); ++vertex; - - vertex->set(1.5f, 0.5f, 0.0f, 1.0f, 1.0f, -1.0f); ++vertex; - vertex->set(1.5f, 1.0f, 0.0f, 1.0f, -1.0f, -1.0f); ++vertex; - - vertex->set(2.0f, 0.5f, 0.0f, -1.0f, 1.0f, -1.0f); ++vertex; - vertex->set(2.0f, 1.0f, 0.0f, -1.0f, -1.0f, -1.0f); ++vertex; - - indices += addQuad(indices, 0, 3, 4, 1); - indices += addQuad(indices, 2, 6, 7, 3); - indices += addQuad(indices, 3, 7, 8, 4); - indices += addQuad(indices, 4, 8, 9, 5); - indices += addQuad(indices, 7, 10, 11, 8); - indices += addQuad(indices, 10, 12, 13, 11); - } - else - { - vertex->set(0.0f, 0.25f, 0.0f, -1.0f, 1.0f, -1.0f); ++vertex; - vertex->set(0.0f, 0.75f, 0.0f, -1.0f, -1.0f, -1.0f); ++vertex; - - vertex->set(0.5f, 0.00f, 0.0f, -1.0f, 1.0f, 1.0f); ++vertex; - vertex->set(0.5f, 0.50f, 0.0f, -1.0f, -1.0f, 1.0f); ++vertex; - vertex->set(0.5f, 1.00f, 0.0f, 1.0f, -1.0f, -1.0f); ++vertex; - - vertex->set(1.0f, 0.25f, 0.0f, 1.0f, 1.0f, 1.0f); ++vertex; - vertex->set(1.0f, 0.75f, 0.0f, 1.0f, -1.0f, 1.0f); ++vertex; - - vertex->set(1.0f, 0.25f, 0.0f, 1.0f, 1.0f, 1.0f); ++vertex; - vertex->set(1.0f, 0.75f, 0.0f, 1.0f, -1.0f, 1.0f); ++vertex; - - vertex->set(1.5f, 0.00f, 0.0f, -1.0f, 1.0f, 1.0f); ++vertex; - vertex->set(1.5f, 0.50f, 0.0f, 1.0f, 1.0f, -1.0f); ++vertex; - vertex->set(1.5f, 1.00f, 0.0f, 1.0f, -1.0f, -1.0f); ++vertex; - - vertex->set(2.0f, 0.25f, 0.0f, -1.0f, 1.0f, -1.0f); ++vertex; - vertex->set(2.0f, 0.75f, 0.0f, -1.0f, -1.0f, -1.0f); ++vertex; - - indices += addQuad(indices, 0, 2, 3, 1); - indices += addQuad(indices, 1, 3, 6, 4); - indices += addQuad(indices, 2, 5, 6, 3); - indices += addQuad(indices, 7, 9, 12, 10); - indices += addQuad(indices, 7, 10, 11, 8); - indices += addQuad(indices, 10, 12, 13, 11); - } - - const bool enabled = _enabled && isEnabled(m_areaId); - const bool over = enabled && inRect(xx, yy, width, height); - const bool res = buttonLogic(id, over); - - const float widthf = float(width); - const float scale = adjustHeight ? (widthf+0.5f)/3.0f : (widthf*0.5f + 0.25f); - - float mtx[16]; - bx::mtxSRT(mtx, scale, scale, 1.0f, 0.0f, 0.0f, 0.0f, float(xx), float(yy), 0.0f); - - const float lodEnabled[4] = { _lod, float(enabled), 0.0f, 0.0f }; - bgfx::setUniform(u_imageLodEnabled, lodEnabled); - - bgfx::setTransform(mtx); - bgfx::setTexture(0, s_texColor, _cubemap); - bgfx::setVertexBuffer(&tvb); - bgfx::setIndexBuffer(&tib); - bgfx::setState(BGFX_STATE_RGB_WRITE - |BGFX_STATE_ALPHA_WRITE - |BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) - ); - setCurrentScissor(); - bgfx::submit(m_view, m_cubeMapProgram); - - return res; - } - - return false; - } - - bool cubeMap(bgfx::TextureHandle _cubemap, float _lod, ImguiCubemap::Enum _display, bool _sameHeight, ImguiAlign::Enum _align, bool _enabled) - { - if (ImguiCubemap::Cross == _display - || ImguiCubemap::Hex == _display) - { - return cubeMap(_cubemap, _lod, (ImguiCubemap::Cross == _display), _sameHeight, _align, _enabled); - } - else //(ImguiCubemap::Latlong == _display). - { - return latlong(_cubemap, _lod, _align, _enabled); - } - } - - bool collapse(const char* _text, const char* _subtext, bool _checked, bool _enabled) - { - const uint32_t id = getId(); - - Area& area = getCurrentArea(); - const int32_t xx = area.m_widgetX; - const int32_t yy = area.m_widgetY; - const int32_t width = area.m_widgetW; - const int32_t height = BUTTON_HEIGHT; - area.m_widgetY += BUTTON_HEIGHT + DEFAULT_SPACING; - - const int32_t cx = xx + BUTTON_HEIGHT/2 - CHECK_SIZE/2; - const int32_t cy = yy + BUTTON_HEIGHT/2 - CHECK_SIZE/2 + DEFAULT_SPACING/2; - - const int32_t textY = yy + BUTTON_HEIGHT/2 + TEXT_HEIGHT/2 + DEFAULT_SPACING/2; - - const bool enabled = _enabled && isEnabled(m_areaId); - const bool over = enabled && inRect(xx, yy, width, height); - const bool res = buttonLogic(id, over); - - if (_checked) - { - drawTriangle(cx - , cy - , CHECK_SIZE - , CHECK_SIZE - , TriangleOrientation::Up - , imguiRGBA(255, 255, 255, isActive(id) ? 255 : 200) - ); - } - else - { - drawTriangle(cx-1 // With -1 is more aesthetically pleasing. - , cy - , CHECK_SIZE - , CHECK_SIZE - , TriangleOrientation::Right - , imguiRGBA(255, 255, 255, isActive(id) ? 255 : 200) - ); - } - - if (enabled) - { - drawText(xx + BUTTON_HEIGHT - , textY - , ImguiTextAlign::Left - , _text - , isHot(id) ? imguiRGBA(255, 196, 0, 255) : imguiRGBA(255, 255, 255, 200) - ); - } - else - { - drawText(xx + BUTTON_HEIGHT - , textY - , ImguiTextAlign::Left - , _text - , imguiRGBA(128, 128, 128, 200) - ); - } - - if (_subtext) - { - drawText(xx + width - BUTTON_HEIGHT / 2 - , textY - , ImguiTextAlign::Right - , _subtext - , imguiRGBA(255, 255, 255, 128) - ); - } - - return res; - } - - bool borderButton(ImguiBorder::Enum _border, bool _checked, bool _enabled) - { - // Since border button isn't part of any area, just use this custom/unique areaId. - const uint16_t areaId = UINT16_MAX-1; - const uint32_t id = (areaId << 16) | m_widgetId++; - updatePresence(id); - - const int32_t triSize = 12; - const int32_t borderSize = 15; - - int32_t xx; - int32_t yy; - int32_t width; - int32_t height; - int32_t triX; - int32_t triY; - TriangleOrientation::Enum orientation; - - if (ImguiBorder::Left == _border) - { - xx = -borderSize; - yy = -1; - width = 2*borderSize+1; - height = m_surfaceHeight+1; - triX = 0; - triY = (m_surfaceHeight-triSize)/2; - orientation = _checked ? TriangleOrientation::Left : TriangleOrientation::Right; - } - else if (ImguiBorder::Right == _border) - { - xx = m_surfaceWidth - borderSize; - yy = -1; - width = 2*borderSize+1; - height = m_surfaceHeight+1; - triX = m_surfaceWidth - triSize - 2; - triY = (m_surfaceHeight-width)/2; - orientation = _checked ? TriangleOrientation::Right : TriangleOrientation::Left; - } - else if (ImguiBorder::Top == _border) - { - xx = 0; - yy = -borderSize; - width = m_surfaceWidth; - height = 2*borderSize; - triX = (m_surfaceWidth-triSize)/2; - triY = 0; - orientation = _checked ? TriangleOrientation::Up : TriangleOrientation::Down; - } - else //if (ImguiBorder::Bottom == _border). - { - xx = 0; - yy = m_surfaceHeight - borderSize; - width = m_surfaceWidth; - height = 2*borderSize; - triX = (m_surfaceWidth-triSize)/2; - triY = m_surfaceHeight-triSize; - orientation = _checked ? TriangleOrientation::Down : TriangleOrientation::Up; - } - - const bool over = _enabled && inRect(xx, yy, width, height, false); - const bool res = buttonLogic(id, over); - - drawRect( (float)xx - , (float)yy - , (float)width - , (float)height - , isActive(id) ? imguiRGBA(23, 23, 23, 192) : imguiRGBA(0, 0, 0, 222) - ); - - drawTriangle( triX - , triY - , triSize - , triSize - , orientation - , isHot(id) ? imguiRGBA(255, 196, 0, 222) : imguiRGBA(255, 255, 255, 192) - ); - - return res; - } - - void labelVargs(const char* _format, va_list _argList, uint32_t _rgba) - { - char temp[8192]; - char* out = temp; - int32_t len = bx::vsnprintf(out, sizeof(temp), _format, _argList); - if ( (int32_t)sizeof(temp) < len) - { - out = (char*)alloca(len+1); - len = bx::vsnprintf(out, len, _format, _argList); - } - out[len] = '\0'; - - Area& area = getCurrentArea(); - const int32_t xx = area.m_widgetX; - const int32_t yy = area.m_widgetY; - area.m_widgetY += BUTTON_HEIGHT; - drawText(xx - , yy + BUTTON_HEIGHT/2 + TEXT_HEIGHT/2 - , ImguiTextAlign::Left - , out - , _rgba - ); - } - - void value(const char* _text) - { - Area& area = getCurrentArea(); - const int32_t xx = area.m_widgetX; - const int32_t yy = area.m_widgetY; - const int32_t ww = area.m_widgetW; - area.m_widgetY += BUTTON_HEIGHT; - - drawText(xx + ww - BUTTON_HEIGHT / 2 - , yy + BUTTON_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Right - , _text - , imguiRGBA(255, 255, 255, 200) - ); - } - - bool slider(const char* _text, float& _val, float _vmin, float _vmax, float _vinc, bool _enabled, ImguiAlign::Enum _align) - { - const uint32_t id = getId(); - - Area& area = getCurrentArea(); - const int32_t yy = area.m_widgetY; - const int32_t height = SLIDER_HEIGHT; - area.m_widgetY += SLIDER_HEIGHT + DEFAULT_SPACING; - - int32_t xx; - int32_t width; - if (ImguiAlign::Left == _align) - { - xx = area.m_contentX + SCROLL_AREA_PADDING; - width = area.m_widgetW; - } - else if (ImguiAlign::LeftIndented == _align - || ImguiAlign::Right == _align) - { - xx = area.m_widgetX; - width = area.m_widgetW; - } - else //if (ImguiAlign::Center == _align - //|| ImguiAlign::CenterIndented == _align). - { - xx = area.m_widgetX; - width = area.m_widgetW - (area.m_widgetX-area.m_contentX); - } - - drawRoundedRect( (float)xx, (float)yy, (float)width, (float)height, 4.0f, imguiRGBA(0, 0, 0, 128) ); - - const int32_t range = width - SLIDER_MARKER_WIDTH; - - float uu = bx::fsaturate( (_val - _vmin) / (_vmax - _vmin) ); - int32_t m = (int)(uu * range); - bool valChanged = false; - - const bool enabled = _enabled && isEnabled(m_areaId); - const bool over = enabled && inRect(xx + m, yy, SLIDER_MARKER_WIDTH, SLIDER_HEIGHT); - const bool res = buttonLogic(id, over); - - if (isActive(id) ) - { - if (m_wentActive) - { - m_dragX = m_mx; - m_dragOrig = uu; - } - - if (m_dragX != m_mx) - { - uu = bx::fsaturate(m_dragOrig + (float)(m_mx - m_dragX) / (float)range); - - _val = _vmin + uu * (_vmax - _vmin); - _val = floorf(_val / _vinc + 0.5f) * _vinc; // Snap to vinc - m = (int)(uu * range); - valChanged = true; - } - } - - if (isActive(id) ) - { - drawRoundedRect( (float)(xx + m) - , (float)yy - , (float)SLIDER_MARKER_WIDTH - , (float)SLIDER_HEIGHT - , 4.0f - , imguiRGBA(255, 255, 255, 255) - ); - } - else - { - drawRoundedRect( (float)(xx + m) - , (float)yy - , (float)SLIDER_MARKER_WIDTH - , (float)SLIDER_HEIGHT - , 4.0f - , isHot(id) ? imguiRGBA(255, 196, 0, 128) : imguiRGBA(255, 255, 255, 64) - ); - } - - // TODO: fix this, take a look at 'nicenum'. - int32_t digits = (int)(ceilf(log10f(_vinc) ) ); - char fmt[16]; - bx::snprintf(fmt, 16, "%%.%df", digits >= 0 ? 0 : -digits); - char msg[128]; - bx::snprintf(msg, 128, fmt, _val); - - if (enabled) - { - drawText(xx + SLIDER_HEIGHT / 2 - , yy + SLIDER_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _text - , isHot(id) ? imguiRGBA(255, 196, 0, 255) : imguiRGBA(255, 255, 255, 200) - ); - - drawText(xx + width - SLIDER_HEIGHT / 2 - , yy + SLIDER_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Right - , msg - , isHot(id) ? imguiRGBA(255, 196, 0, 255) : imguiRGBA(255, 255, 255, 200) - ); - } - else - { - drawText(xx + SLIDER_HEIGHT / 2 - , yy + SLIDER_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Left - , _text - , imguiRGBA(128, 128, 128, 200) - ); - - drawText(xx + width - SLIDER_HEIGHT / 2 - , yy + SLIDER_HEIGHT / 2 + TEXT_HEIGHT / 2 - , ImguiTextAlign::Right - , msg - , imguiRGBA(128, 128, 128, 200) - ); - } - - return res || valChanged; - } - - void indent(uint16_t _width) - { - Area& area = getCurrentArea(); - area.m_widgetX += _width; - area.m_widgetW -= _width; - } - - void unindent(uint16_t _width) - { - Area& area = getCurrentArea(); - area.m_widgetX -= _width; - area.m_widgetW += _width; - } - - void separator(uint16_t _height) - { - Area& area = getCurrentArea(); - area.m_widgetY += _height; - } - - void separatorLine(uint16_t _height, ImguiAlign::Enum _align) - { - Area& area = getCurrentArea(); - //const int32_t width = area.m_widgetW; - const int32_t height = 1; - //const int32_t xx = area.m_widgetX; - const int32_t yy = area.m_widgetY + _height/2 - height; - - int32_t xx; - int32_t width; - if (ImguiAlign::Left == _align) - { - xx = area.m_contentX + SCROLL_AREA_PADDING; - width = area.m_widgetW; - } - else if (ImguiAlign::LeftIndented == _align - || ImguiAlign::Right == _align) - { - xx = area.m_widgetX; - width = area.m_widgetW; - } - else //if (ImguiAlign::Center == _align - //|| ImguiAlign::CenterIndented == _align). - { - xx = area.m_widgetX; - width = area.m_widgetW - (area.m_widgetX-area.m_contentX) + 1; - } - - area.m_widgetY += _height; - - drawRect( (float)xx - , (float)yy - , (float)width - , (float)height - , imguiRGBA(255, 255, 255, 32) - ); - } - - void drawPolygon(const float* _coords, uint32_t _numCoords, float _r, uint32_t _abgr) - { - _numCoords = bx::uint32_min(_numCoords, MAX_TEMP_COORDS); - - for (uint32_t ii = 0, jj = _numCoords - 1; ii < _numCoords; jj = ii++) - { - const float* v0 = &_coords[jj * 2]; - const float* v1 = &_coords[ii * 2]; - float dx = v1[0] - v0[0]; - float dy = v1[1] - v0[1]; - float d = sqrtf(dx * dx + dy * dy); - if (d > 0) - { - d = 1.0f / d; - dx *= d; - dy *= d; - } - - m_tempNormals[jj * 2 + 0] = dy; - m_tempNormals[jj * 2 + 1] = -dx; - } - - for (uint32_t ii = 0, jj = _numCoords - 1; ii < _numCoords; jj = ii++) - { - float dlx0 = m_tempNormals[jj * 2 + 0]; - float dly0 = m_tempNormals[jj * 2 + 1]; - float dlx1 = m_tempNormals[ii * 2 + 0]; - float dly1 = m_tempNormals[ii * 2 + 1]; - float dmx = (dlx0 + dlx1) * 0.5f; - float dmy = (dly0 + dly1) * 0.5f; - float dmr2 = dmx * dmx + dmy * dmy; - if (dmr2 > 0.000001f) - { - float scale = 1.0f / dmr2; - if (scale > 10.0f) - { - scale = 10.0f; - } - - dmx *= scale; - dmy *= scale; - } - - m_tempCoords[ii * 2 + 0] = _coords[ii * 2 + 0] + dmx * _r; - m_tempCoords[ii * 2 + 1] = _coords[ii * 2 + 1] + dmy * _r; - } - - uint32_t numVertices = _numCoords*6 + (_numCoords-2)*3; - if (numVertices == bgfx::getAvailTransientVertexBuffer(numVertices, PosColorVertex::ms_decl) ) - { - bgfx::TransientVertexBuffer tvb; - bgfx::allocTransientVertexBuffer(&tvb, numVertices, PosColorVertex::ms_decl); - uint32_t trans = _abgr&0xffffff; - - PosColorVertex* vertex = (PosColorVertex*)tvb.data; - for (uint32_t ii = 0, jj = _numCoords-1; ii < _numCoords; jj = ii++) - { - vertex->m_x = _coords[ii*2+0]; - vertex->m_y = _coords[ii*2+1]; - vertex->m_abgr = _abgr; - ++vertex; - - vertex->m_x = _coords[jj*2+0]; - vertex->m_y = _coords[jj*2+1]; - vertex->m_abgr = _abgr; - ++vertex; - - vertex->m_x = m_tempCoords[jj*2+0]; - vertex->m_y = m_tempCoords[jj*2+1]; - vertex->m_abgr = trans; - ++vertex; - - vertex->m_x = m_tempCoords[jj*2+0]; - vertex->m_y = m_tempCoords[jj*2+1]; - vertex->m_abgr = trans; - ++vertex; - - vertex->m_x = m_tempCoords[ii*2+0]; - vertex->m_y = m_tempCoords[ii*2+1]; - vertex->m_abgr = trans; - ++vertex; - - vertex->m_x = _coords[ii*2+0]; - vertex->m_y = _coords[ii*2+1]; - vertex->m_abgr = _abgr; - ++vertex; - } - - for (uint32_t ii = 2; ii < _numCoords; ++ii) - { - vertex->m_x = _coords[0]; - vertex->m_y = _coords[1]; - vertex->m_abgr = _abgr; - ++vertex; - - vertex->m_x = _coords[(ii-1)*2+0]; - vertex->m_y = _coords[(ii-1)*2+1]; - vertex->m_abgr = _abgr; - ++vertex; - - vertex->m_x = _coords[ii*2+0]; - vertex->m_y = _coords[ii*2+1]; - vertex->m_abgr = _abgr; - ++vertex; - } - - bgfx::setVertexBuffer(&tvb); - bgfx::setState(0 - | BGFX_STATE_RGB_WRITE - | BGFX_STATE_ALPHA_WRITE - | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) - ); - setCurrentScissor(); - bgfx::submit(m_view, m_colorProgram); - } - } - - void drawRect(float _x, float _y, float _w, float _h, uint32_t _argb, float _fth = 1.0f) - { - float verts[4 * 2] = - { - _x + 0.5f, _y + 0.5f, - _x + _w - 0.5f, _y + 0.5f, - _x + _w - 0.5f, _y + _h - 0.5f, - _x + 0.5f, _y + _h - 0.5f, - }; - - drawPolygon(verts, 4, _fth, _argb); - } - - void drawRoundedRect(float _x, float _y, float _w, float _h, float _r, uint32_t _argb, float _fth = 1.0f) - { - if (0.0f == _r) - { - return drawRect(_x, _y, _w, _h, _argb, _fth); - } - - const uint32_t num = NUM_CIRCLE_VERTS / 4; - const float* cverts = m_circleVerts; - float verts[(num + 1) * 4 * 2]; - float* vv = verts; - - for (uint32_t ii = 0; ii <= num; ++ii) - { - *vv++ = _x + _w - _r + cverts[ii * 2] * _r; - *vv++ = _y + _h - _r + cverts[ii * 2 + 1] * _r; - } - - for (uint32_t ii = num; ii <= num * 2; ++ii) - { - *vv++ = _x + _r + cverts[ii * 2] * _r; - *vv++ = _y + _h - _r + cverts[ii * 2 + 1] * _r; - } - - for (uint32_t ii = num * 2; ii <= num * 3; ++ii) - { - *vv++ = _x + _r + cverts[ii * 2] * _r; - *vv++ = _y + _r + cverts[ii * 2 + 1] * _r; - } - - for (uint32_t ii = num * 3; ii < num * 4; ++ii) - { - *vv++ = _x + _w - _r + cverts[ii * 2] * _r; - *vv++ = _y + _r + cverts[ii * 2 + 1] * _r; - } - - *vv++ = _x + _w - _r + cverts[0] * _r; - *vv++ = _y + _r + cverts[1] * _r; - - drawPolygon(verts, (num + 1) * 4, _fth, _argb); - } - - void drawLine(float _x0, float _y0, float _x1, float _y1, float _r, uint32_t _abgr, float _fth = 1.0f) - { - float dx = _x1 - _x0; - float dy = _y1 - _y0; - float d = sqrtf(dx * dx + dy * dy); - if (d > 0.0001f) - { - d = 1.0f / d; - dx *= d; - dy *= d; - } - - float nx = dy; - float ny = -dx; - float verts[4 * 2]; - _r -= _fth; - _r *= 0.5f; - if (_r < 0.01f) - { - _r = 0.01f; - } - - dx *= _r; - dy *= _r; - nx *= _r; - ny *= _r; - - verts[0] = _x0 - dx - nx; - verts[1] = _y0 - dy - ny; - - verts[2] = _x0 - dx + nx; - verts[3] = _y0 - dy + ny; - - verts[4] = _x1 + dx + nx; - verts[5] = _y1 + dy + ny; - - verts[6] = _x1 + dx - nx; - verts[7] = _y1 + dy - ny; - - drawPolygon(verts, 4, _fth, _abgr); - } - - struct TriangleOrientation - { - enum Enum - { - Left, - Right, - Up, - Down, - }; - }; - - void drawTriangle(int32_t _x, int32_t _y, int32_t _width, int32_t _height, TriangleOrientation::Enum _orientation, uint32_t _abgr) - { - if (TriangleOrientation::Left == _orientation) - { - const float verts[3 * 2] = - { - (float)_x + 0.5f + (float)_width * 1.0f, (float)_y + 0.5f, - (float)_x + 0.5f, (float)_y + 0.5f + (float)_height / 2.0f - 0.5f, - (float)_x + 0.5f + (float)_width * 1.0f, (float)_y + 0.5f + (float)_height - 1.0f, - }; - - drawPolygon(verts, 3, 1.0f, _abgr); - } - else if (TriangleOrientation::Right == _orientation) - { - const float verts[3 * 2] = - { - (float)_x + 0.5f, (float)_y + 0.5f, - (float)_x + 0.5f + (float)_width * 1.0f, (float)_y + 0.5f + (float)_height / 2.0f - 0.5f, - (float)_x + 0.5f, (float)_y + 0.5f + (float)_height - 1.0f, - }; - - drawPolygon(verts, 3, 1.0f, _abgr); - } - else if (TriangleOrientation::Up == _orientation) - { - const float verts[3 * 2] = - { - (float)_x + 0.5f, (float)_y + 0.5f + (float)_height - 1.0f, - (float)_x + 0.5f + (float)_width / 2.0f - 0.5f, (float)_y + 0.5f, - (float)_x + 0.5f + (float)_width - 1.0f, (float)_y + 0.5f + (float)_height - 1.0f, - }; - - drawPolygon(verts, 3, 1.0f, _abgr); - } - else //if (TriangleOrientation::Down == _orientation). - { - const float verts[3 * 2] = - { - (float)_x + 0.5f, (float)_y + 0.5f, - (float)_x + 0.5f + (float)_width / 2.0f - 0.5f, (float)_y + 0.5f + (float)_height - 1.0f, - (float)_x + 0.5f + (float)_width - 1.0f, (float)_y + 0.5f, - }; - - drawPolygon(verts, 3, 1.0f, _abgr); - } - } - -#if !USE_NANOVG_FONT - void getBakedQuad(stbtt_bakedchar* _chardata, int32_t char_index, float* _xpos, float* _ypos, stbtt_aligned_quad* _quad) - { - stbtt_bakedchar* b = _chardata + char_index; - int32_t round_x = STBTT_ifloor(*_xpos + b->xoff); - int32_t round_y = STBTT_ifloor(*_ypos + b->yoff); - - _quad->x0 = (float)round_x; - _quad->y0 = (float)round_y; - _quad->x1 = (float)round_x + b->x1 - b->x0; - _quad->y1 = (float)round_y + b->y1 - b->y0; - - _quad->s0 = (b->x0 + m_halfTexel) * m_invTextureWidth; - _quad->t0 = (b->y0 + m_halfTexel) * m_invTextureWidth; - _quad->s1 = (b->x1 + m_halfTexel) * m_invTextureHeight; - _quad->t1 = (b->y1 + m_halfTexel) * m_invTextureHeight; - - *_xpos += b->xadvance; - } -#endif // !USE_NANOVG_FONT - - void drawText(int32_t _x, int32_t _y, ImguiTextAlign::Enum _align, const char* _text, uint32_t _abgr) - { - drawText( (float)_x, (float)_y, _text, _align, _abgr); - } - - void drawText(float _x, float _y, const char* _text, ImguiTextAlign::Enum _align, uint32_t _abgr) - { - if (NULL == _text - || '\0' == _text[0]) - { - return; - } - -#if USE_NANOVG_FONT - static uint32_t textAlign[ImguiTextAlign::Count] = - { - NVG_ALIGN_LEFT, - NVG_ALIGN_CENTER, - NVG_ALIGN_RIGHT, - }; - - nvgTextAlign(m_nvg, textAlign[_align]); - - nvgFontBlur(m_nvg, 0.0f); - nvgFillColor(m_nvg, nvgRGBAu(_abgr) ); - nvgText(m_nvg, _x, _y, _text, NULL); -#else - uint32_t numVertices = 0; - if (_align == ImguiTextAlign::Center) - { - _x -= getTextLength(m_fonts[m_currentFontIdx].m_cdata, _text, numVertices) / 2; - } - else if (_align == ImguiTextAlign::Right) - { - _x -= getTextLength(m_fonts[m_currentFontIdx].m_cdata, _text, numVertices); - } - else // just count vertices - { - getTextLength(m_fonts[m_currentFontIdx].m_cdata, _text, numVertices); - } - - if (numVertices == bgfx::getAvailTransientVertexBuffer(numVertices, PosColorUvVertex::ms_decl) ) - { - bgfx::TransientVertexBuffer tvb; - bgfx::allocTransientVertexBuffer(&tvb, numVertices, PosColorUvVertex::ms_decl); - - PosColorUvVertex* vertex = (PosColorUvVertex*)tvb.data; - - const float ox = _x; - - while (*_text) - { - int32_t ch = (uint8_t)*_text; - if (ch == '\t') - { - for (int32_t i = 0; i < 4; ++i) - { - if (_x < s_tabStops[i] + ox) - { - _x = s_tabStops[i] + ox; - break; - } - } - } - else if (ch >= ' ' - && ch < 128) - { - stbtt_aligned_quad quad; - getBakedQuad(m_fonts[m_currentFontIdx].m_cdata, ch - 32, &_x, &_y, &quad); - - vertex->m_x = quad.x0; - vertex->m_y = quad.y0; - vertex->m_u = quad.s0; - vertex->m_v = quad.t0; - vertex->m_abgr = _abgr; - ++vertex; - - vertex->m_x = quad.x1; - vertex->m_y = quad.y1; - vertex->m_u = quad.s1; - vertex->m_v = quad.t1; - vertex->m_abgr = _abgr; - ++vertex; - - vertex->m_x = quad.x1; - vertex->m_y = quad.y0; - vertex->m_u = quad.s1; - vertex->m_v = quad.t0; - vertex->m_abgr = _abgr; - ++vertex; - - vertex->m_x = quad.x0; - vertex->m_y = quad.y0; - vertex->m_u = quad.s0; - vertex->m_v = quad.t0; - vertex->m_abgr = _abgr; - ++vertex; - - vertex->m_x = quad.x0; - vertex->m_y = quad.y1; - vertex->m_u = quad.s0; - vertex->m_v = quad.t1; - vertex->m_abgr = _abgr; - ++vertex; - - vertex->m_x = quad.x1; - vertex->m_y = quad.y1; - vertex->m_u = quad.s1; - vertex->m_v = quad.t1; - vertex->m_abgr = _abgr; - ++vertex; - } - - ++_text; - } - - bgfx::setTexture(0, s_texColor, m_fonts[m_currentFontIdx].m_texture); - bgfx::setVertexBuffer(&tvb); - bgfx::setState(0 - | BGFX_STATE_RGB_WRITE - | BGFX_STATE_ALPHA_WRITE - | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) - ); - setCurrentScissor(); - bgfx::submit(m_view, m_textureProgram); - } -#endif // USE_NANOVG_FONT - } - - bool screenQuad(int32_t _x, int32_t _y, int32_t _width, uint32_t _height, bool _originBottomLeft = false) - { - if (6 == bgfx::getAvailTransientVertexBuffer(6, PosUvVertex::ms_decl) ) - { - bgfx::TransientVertexBuffer vb; - bgfx::allocTransientVertexBuffer(&vb, 6, PosUvVertex::ms_decl); - PosUvVertex* vertex = (PosUvVertex*)vb.data; - - const float widthf = float(_width); - const float heightf = float(_height); - - const float minx = float(_x); - const float miny = float(_y); - const float maxx = minx+widthf; - const float maxy = miny+heightf; - - const float texelHalfW = m_halfTexel/widthf; - const float texelHalfH = m_halfTexel/heightf; - const float minu = texelHalfW; - const float maxu = 1.0f - texelHalfW; - const float minv = _originBottomLeft ? texelHalfH+1.0f : texelHalfH ; - const float maxv = _originBottomLeft ? texelHalfH : texelHalfH+1.0f; - - vertex[0].m_x = minx; - vertex[0].m_y = miny; - vertex[0].m_u = minu; - vertex[0].m_v = minv; - - vertex[1].m_x = maxx; - vertex[1].m_y = miny; - vertex[1].m_u = maxu; - vertex[1].m_v = minv; - - vertex[2].m_x = maxx; - vertex[2].m_y = maxy; - vertex[2].m_u = maxu; - vertex[2].m_v = maxv; - - vertex[3].m_x = maxx; - vertex[3].m_y = maxy; - vertex[3].m_u = maxu; - vertex[3].m_v = maxv; - - vertex[4].m_x = minx; - vertex[4].m_y = maxy; - vertex[4].m_u = minu; - vertex[4].m_v = maxv; - - vertex[5].m_x = minx; - vertex[5].m_y = miny; - vertex[5].m_u = minu; - vertex[5].m_v = minv; - - bgfx::setVertexBuffer(&vb); - - return true; - } - - return false; - } - - void colorWheelWidget(float _rgb[3], bool _respectIndentation, float _size, bool _enabled) - { - const uint32_t wheelId = getId(); - const uint32_t triangleId = getId(); - - Area& area = getCurrentArea(); - - const float areaX = float(_respectIndentation ? area.m_widgetX : area.m_contentX); - const float areaW = float(_respectIndentation ? area.m_widgetW : area.m_contentWidth); - - const float width = areaW*_size; - const float xx = areaX + areaW*0.5f; - const float yy = float(area.m_widgetY) + width*0.5f; - const float center[2] = { xx, yy }; - - area.m_widgetY += int32_t(width) + DEFAULT_SPACING; - - const float ro = width*0.5f - 5.0f; // radiusOuter. - const float rd = _size*25.0f; // radiusDelta. - const float ri = ro - rd; // radiusInner. - const float aeps = 0.5f / ro; // Half a pixel arc length in radians (2pi cancels out). - const float cmx = float(m_mx) - center[0]; - const float cmy = float(m_my) - center[1]; - - const float aa[2] = { ri - 6.0f, 0.0f }; // Hue point. - const float bb[2] = { cosf(-120.0f/180.0f*NVG_PI) * aa[0], sinf(-120.0f/180.0f*NVG_PI) * aa[0] }; // Black point. - const float cc[2] = { cosf( 120.0f/180.0f*NVG_PI) * aa[0], sinf( 120.0f/180.0f*NVG_PI) * aa[0] }; // White point. - - const float ca[2] = { aa[0] - cc[0], aa[1] - cc[1] }; - const float lenCa = sqrtf(ca[0]*ca[0]+ca[1]*ca[1]); - const float invLenCa = 1.0f/lenCa; - const float dirCa[2] = { ca[0]*invLenCa, ca[1]*invLenCa }; - - float sel[2]; - - float hsv[3]; - bx::rgbToHsv(hsv, _rgb); - - const bool enabled = _enabled && isEnabled(m_areaId); - if (enabled) - { - if (m_leftPressed) - { - const float len = sqrtf(cmx*cmx + cmy*cmy); - if (len > ri) - { - if (len < ro) - { - setActive(wheelId); - } - } - else - { - setActive(triangleId); - } - } - - if (m_leftReleased - && (isActive(wheelId) || isActive(triangleId) ) ) - { - clearActive(); - } - - // Set hue. - if (m_left - && isActive(wheelId) ) - { - hsv[0] = atan2f(cmy, cmx)/NVG_PI*0.5f; - if (hsv[0] < 0.0f) - { - hsv[0]+=1.0f; - } - } - - } - - if (enabled - && m_left - && isActive(triangleId) ) - { - float an = -hsv[0]*NVG_PI*2.0f; - float tmx = (cmx*cosf(an)-cmy*sinf(an) ); - float tmy = (cmx*sinf(an)+cmy*cosf(an) ); - - if (pointInTriangle(tmx, tmy, aa[0], aa[1], bb[0], bb[1], cc[0], cc[1]) ) - { - sel[0] = tmx; - sel[1] = tmy; - } - else - { - closestPointOnTriangle(sel[0], sel[1], tmx, tmy, aa[0], aa[1], bb[0], bb[1], cc[0], cc[1]); - } - } - else - { - /* - * bb (black) - * /\ - * / \ - * / \ - * / \ - * / \ - * / .sel \ - * / \ - * cc(white)/____.ss_______\aa (hue) - */ - const float ss[2] = - { - cc[0] + dirCa[0]*lenCa*hsv[1], - cc[1] + dirCa[1]*lenCa*hsv[1], - }; - - const float sb[2] = { bb[0]-ss[0], bb[1]-ss[1] }; - const float lenSb = sqrtf(sb[0]*sb[0]+sb[1]*sb[1]); - const float invLenSb = 1.0f/lenSb; - const float dirSb[2] = { sb[0]*invLenSb, sb[1]*invLenSb }; - - sel[0] = cc[0] + dirCa[0]*lenCa*hsv[1] + dirSb[0]*lenSb*(1.0f - hsv[2]); - sel[1] = cc[1] + dirCa[1]*lenCa*hsv[1] + dirSb[1]*lenSb*(1.0f - hsv[2]); - } - - float uu, vv, ww; - barycentric(uu, vv, ww - , aa[0], aa[1] - , bb[0], bb[1] - , cc[0], cc[1] - , sel[0], sel[1] - ); - - const float val = bx::fclamp(1.0f-vv, 0.0001f, 1.0f); - const float sat = bx::fclamp(uu/val, 0.0001f, 1.0f); - - const float out[3] = { hsv[0], sat, val }; - bx::hsvToRgb(_rgb, out); - - // Draw widget. - nvgSave(m_nvg); - { - float saturation; - uint8_t alpha0; - uint8_t alpha1; - if (enabled) - { - saturation = 1.0f; - alpha0 = 255; - alpha1 = 192; - } - else - { - saturation = 0.0f; - alpha0 = 10; - alpha1 = 10; - } - - // Circle. - for (uint8_t ii = 0; ii < 6; ii++) - { - const float a0 = float(ii)/6.0f * 2.0f*NVG_PI - aeps; - const float a1 = float(ii+1.0f)/6.0f * 2.0f*NVG_PI + aeps; - nvgBeginPath(m_nvg); - nvgArc(m_nvg, center[0], center[1], ri, a0, a1, NVG_CW); - nvgArc(m_nvg, center[0], center[1], ro, a1, a0, NVG_CCW); - nvgClosePath(m_nvg); - - const float ax = center[0] + cosf(a0) * (ri+ro)*0.5f; - const float ay = center[1] + sinf(a0) * (ri+ro)*0.5f; - const float bx = center[0] + cosf(a1) * (ri+ro)*0.5f; - const float by = center[1] + sinf(a1) * (ri+ro)*0.5f; - NVGpaint paint = nvgLinearGradient(m_nvg - , ax, ay - , bx, by - , nvgHSLA(a0/NVG_PI*0.5f,saturation,0.55f,alpha0) - , nvgHSLA(a1/NVG_PI*0.5f,saturation,0.55f,alpha0) - ); - - nvgFillPaint(m_nvg, paint); - nvgFill(m_nvg); - } - - // Circle stroke. - nvgBeginPath(m_nvg); - nvgCircle(m_nvg, center[0], center[1], ri-0.5f); - nvgCircle(m_nvg, center[0], center[1], ro+0.5f); - nvgStrokeColor(m_nvg, nvgRGBA(0,0,0,64) ); - nvgStrokeWidth(m_nvg, 1.0f); - nvgStroke(m_nvg); - - nvgSave(m_nvg); - { - // Hue selector. - nvgTranslate(m_nvg, center[0], center[1]); - nvgRotate(m_nvg, hsv[0]*NVG_PI*2.0f); - nvgStrokeWidth(m_nvg, 2.0f); - nvgBeginPath(m_nvg); - nvgRect(m_nvg, ri-1.0f,-3.0f,rd+2.0f,6.0f); - nvgStrokeColor(m_nvg, nvgRGBA(255,255,255,alpha1) ); - nvgStroke(m_nvg); - - // Hue selector drop shadow. - NVGpaint paint = nvgBoxGradient(m_nvg, ri-3.0f,-5.0f,ro-ri+6.0f,10.0f, 2.0f,4.0f, nvgRGBA(0,0,0,128), nvgRGBA(0,0,0,0) ); - nvgBeginPath(m_nvg); - nvgRect(m_nvg, ri-2.0f-10.0f,-4.0f-10.0f,ro-ri+4.0f+20.0f,8.0f+20.0f); - nvgRect(m_nvg, ri-2.0f,-4.0f,ro-ri+4.0f,8.0f); - nvgPathWinding(m_nvg, NVG_HOLE); - nvgFillPaint(m_nvg, paint); - nvgFill(m_nvg); - - // Center triangle stroke. - nvgBeginPath(m_nvg); - nvgMoveTo(m_nvg, aa[0], aa[1]); - nvgLineTo(m_nvg, bb[0], bb[1]); - nvgLineTo(m_nvg, cc[0], cc[1]); - nvgClosePath(m_nvg); - nvgStrokeColor(m_nvg, nvgRGBA(0,0,0,64) ); - nvgStroke(m_nvg); - - // Center triangle fill. - paint = nvgLinearGradient(m_nvg, aa[0], aa[1], bb[0], bb[1], nvgHSL(hsv[0],saturation,0.5f), nvgRGBA(0,0,0,alpha0) ); - nvgFillPaint(m_nvg, paint); - nvgFill(m_nvg); - paint = nvgLinearGradient(m_nvg, (aa[0]+bb[0])*0.5f, (aa[1]+bb[1])*0.5f, cc[0], cc[1], nvgRGBA(0,0,0,0), nvgRGBA(255,255,255,alpha0) ); - nvgFillPaint(m_nvg, paint); - nvgFill(m_nvg); - - // Color selector. - nvgStrokeWidth(m_nvg, 2.0f); - nvgBeginPath(m_nvg); - nvgCircle(m_nvg, sel[0], sel[1], 5); - nvgStrokeColor(m_nvg, nvgRGBA(255,255,255,alpha1) ); - nvgStroke(m_nvg); - - // Color selector stroke. - paint = nvgRadialGradient(m_nvg, sel[0], sel[1], 7.0f, 9.0f, nvgRGBA(0,0,0,64), nvgRGBA(0,0,0,0) ); - nvgBeginPath(m_nvg); - nvgRect(m_nvg, sel[0]-20.0f, sel[1]-20.0f, 40.0f, 40.0f); - nvgCircle(m_nvg, sel[0], sel[1], 7.0f); - nvgPathWinding(m_nvg, NVG_HOLE); - nvgFillPaint(m_nvg, paint); - nvgFill(m_nvg); - } - nvgRestore(m_nvg); - } - nvgRestore(m_nvg); - } - - struct Area - { - int32_t m_x; - int32_t m_y; - int32_t m_width; - int32_t m_height; - int16_t m_contentX; - int16_t m_contentY; - int16_t m_contentWidth; - int16_t m_contentHeight; - int16_t m_scissorX; - int16_t m_scissorY; - int16_t m_scissorHeight; - int16_t m_scissorWidth; - int32_t m_widgetX; - int32_t m_widgetY; - int32_t m_widgetW; - int32_t* m_scrollVal; - uint32_t m_scrollId; - bool m_inside; - bool m_didScroll; - bool m_scissorEnabled; - }; - - bool visible(int32_t _elemY, int32_t _elemHeight, int32_t _scissorY, int32_t _scissorHeight) - { - return (_elemY+_elemHeight) > _scissorY - && (_elemY) < (_scissorY+_scissorHeight); - } - - inline Area& getCurrentArea() - { - return m_areas[m_areaId]; - } - - inline void setCurrentScissor() - { - const Area& area = getCurrentArea(); - if (area.m_scissorEnabled) - { - const float xscale = float(m_viewWidth) /float(m_surfaceWidth); - const float yscale = float(m_viewHeight)/float(m_surfaceHeight); - const int16_t scissorX = int16_t(float(area.m_scissorX)*xscale); - const int16_t scissorY = int16_t(float(area.m_scissorY)*yscale); - const int16_t scissorWidth = int16_t(float(area.m_scissorWidth)*xscale); - const int16_t scissorHeight = int16_t(float(area.m_scissorHeight)*yscale); - bgfx::setScissor(uint16_t(IMGUI_MAX(0, scissorX) ) - , uint16_t(IMGUI_MAX(0, scissorY-1) ) - , scissorWidth - , scissorHeight+1 - ); - } - else - { - bgfx::setScissor(UINT16_MAX); - } - } - - inline void nvgScissor(NVGcontext* _ctx, const Area& _area) - { - if (_area.m_scissorEnabled) - { - ::nvgScissor(_ctx - , float(IMGUI_MAX(0, _area.m_scissorX) ) - , float(IMGUI_MAX(0, _area.m_scissorY-1) ) - , float(_area.m_scissorWidth) - , float(_area.m_scissorHeight+1) - ); - } - else - { - nvgResetScissor(_ctx); - } - } - - template - struct IdStack - { - IdStack() - { - reset(); - } - - void reset() - { - m_current = 0; - m_idGen = 0; - m_ids[0] = 0; - } - - void next() - { - BX_CHECK(Max > (m_current+1), "Param out of bounds!"); - - m_ids[++m_current] = ++m_idGen; - } - - void pop() - { - m_current = m_current > 0 ? m_current-1 : 0; - } - - Ty current() const - { - BX_CHECK(Max > (m_current), "Param out of bounds!"); - - return m_ids[m_current]; - } - - operator Ty() const - { - BX_CHECK(Max > (m_current), "Param out of bounds!"); - - return m_ids[m_current]; - } - - private: - uint16_t m_current; - Ty m_idGen; - Ty m_ids[Max]; - }; - - bx::AllocatorI* m_allocator; - int32_t m_mx; - int32_t m_my; - int32_t m_scroll; - uint32_t m_active; - uint32_t m_hot; - uint32_t m_hotToBe; - char m_char; - char m_lastChar; - uint32_t m_inputField; - int32_t m_dragX; - int32_t m_dragY; - float m_dragOrig; - bool m_left; - bool m_leftPressed; - bool m_leftReleased; - bool m_isHot; - bool m_wentActive; - bool m_insideArea; - bool m_isActivePresent; - bool m_checkActivePresence; - - IdStack m_areaId; - uint16_t m_widgetId; - uint64_t m_enabledAreaIds; - Area m_areas[64]; - - float m_tempCoords[MAX_TEMP_COORDS * 2]; - float m_tempNormals[MAX_TEMP_COORDS * 2]; - - float m_circleVerts[NUM_CIRCLE_VERTS * 2]; - - uint16_t m_textureWidth; - uint16_t m_textureHeight; - float m_invTextureWidth; - float m_invTextureHeight; - float m_halfTexel; - - NVGcontext* m_nvg; - - uint8_t m_view; - uint16_t m_surfaceWidth; - uint16_t m_surfaceHeight; - uint16_t m_viewWidth; - uint16_t m_viewHeight; - -#if !USE_NANOVG_FONT - struct Font - { - stbtt_bakedchar m_cdata[96]; // ASCII 32..126 is 95 glyphs - bgfx::TextureHandle m_texture; - float m_size; - }; - - uint16_t m_currentFontIdx; - bx::HandleAllocT m_fontHandle; - Font m_fonts[IMGUI_CONFIG_MAX_FONTS]; -#endif // !USE_NANOVG_FONT - - bgfx::UniformHandle u_imageLodEnabled; - bgfx::UniformHandle u_imageSwizzle; - bgfx::UniformHandle s_texColor; - bgfx::ProgramHandle m_colorProgram; - bgfx::ProgramHandle m_textureProgram; - bgfx::ProgramHandle m_cubeMapProgram; - bgfx::ProgramHandle m_latlongProgram; + bx::AllocatorI* m_allocator; + bgfx::VertexDecl m_decl; + bgfx::ProgramHandle m_program; bgfx::ProgramHandle m_imageProgram; - bgfx::ProgramHandle m_imageSwizzProgram; - bgfx::TextureHandle m_missingTexture; + bgfx::TextureHandle m_texture; + bgfx::UniformHandle s_tex; + bgfx::UniformHandle u_imageLodEnabled; + ImFont* m_font[ImGui::Font::Count]; + int64_t m_last; + int32_t m_lastScroll; + bgfx::ViewId m_viewId; }; -static Imgui s_imgui; +static OcornutImguiContext s_ctx; -void* imguiMalloc(size_t _size, void*) +static void* memAlloc(size_t _size) { - return BX_ALLOC(s_imgui.m_allocator, _size); + return BX_ALLOC(s_ctx.m_allocator, _size); } -void imguiFree(void* _ptr, void*) +static void memFree(void* _ptr) { - BX_FREE(s_imgui.m_allocator, _ptr); + BX_FREE(s_ctx.m_allocator, _ptr); } -ImguiFontHandle imguiCreate(const void*, uint32_t, float _fontSize, bx::AllocatorI* _allocator) +void OcornutImguiContext::renderDrawLists(ImDrawData* _drawData) { - return s_imgui.create(_fontSize, _allocator); + s_ctx.render(_drawData); +} + +void imguiCreate(float _fontSize, bx::AllocatorI* _allocator) +{ + s_ctx.create(_fontSize, _allocator); } void imguiDestroy() { - s_imgui.destroy(); + s_ctx.destroy(); } -ImguiFontHandle imguiCreateFont(const void* _data, float _fontSize) +void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar, bgfx::ViewId _viewId) { - return s_imgui.createFont(_data, _fontSize); -} - -void imguiSetFont(ImguiFontHandle _handle) -{ - s_imgui.setFont(_handle); -} - -ImguiFontHandle imguiGetCurrentFont() -{ - const ImguiFontHandle handle = { s_imgui.m_currentFontIdx }; - return handle; -} - -void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, uint16_t _surfaceWidth, uint16_t _surfaceHeight, char _inputChar, uint8_t _view) -{ - s_imgui.beginFrame(_mx, _my, _button, _scroll, _width, _height, _surfaceWidth, _surfaceHeight, _inputChar, _view); -} - -void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar, uint8_t _view) -{ - s_imgui.beginFrame(_mx, _my, _button, _scroll, _width, _height, _width, _height, _inputChar, _view); + s_ctx.beginFrame(_mx, _my, _button, _scroll, _width, _height, _inputChar, _viewId); } void imguiEndFrame() { - s_imgui.endFrame(); + s_ctx.endFrame(); } -void imguiDrawText(int32_t _x, int32_t _y, ImguiTextAlign::Enum _align, const char* _text, uint32_t _argb) +namespace ImGui { - s_imgui.drawText(_x, _y, _align, _text, _argb); -} - -void imguiDrawLine(float _x0, float _y0, float _x1, float _y1, float _r, uint32_t _argb) -{ - s_imgui.drawLine(_x0, _y0, _x1, _y1, _r, _argb); -} - -void imguiDrawRoundedRect(float _x, float _y, float _width, float _height, float _r, uint32_t _argb) -{ - s_imgui.drawRoundedRect(_x, _y, _width, _height, _r, _argb); -} - -void imguiDrawRect(float _x, float _y, float _width, float _height, uint32_t _argb) -{ - s_imgui.drawRect(_x, _y, _width, _height, _argb); -} - -bool imguiBorderButton(ImguiBorder::Enum _border, bool _checked, bool _enabled) -{ - return s_imgui.borderButton(_border, _checked, _enabled); -} - -bool imguiBeginArea(const char* _name, int _x, int _y, int _width, int _height, bool _enabled, int32_t _r) -{ - return s_imgui.beginArea(_name, _x, _y, _width, _height, _enabled, _r); -} - -void imguiEndArea() -{ - return s_imgui.endArea(); -} - -bool imguiBeginScroll(int32_t _height, int32_t* _scroll, bool _enabled) -{ - return s_imgui.beginScroll(_height, _scroll, _enabled); -} - -void imguiEndScroll(int32_t _r) -{ - s_imgui.endScroll(_r); -} - -bool imguiBeginScrollArea(const char* _name, int32_t _x, int32_t _y, int32_t _width, int32_t _height, int32_t* _scroll, bool _enabled, int32_t _r) -{ - const bool result = s_imgui.beginArea(_name, _x, _y, _width, _height, _enabled, _r); - const bool hasTitle = (NULL != _name && '\0' != _name[0]); - const int32_t margins = int32_t(hasTitle)*(AREA_HEADER+2*SCROLL_AREA_PADDING-1); - s_imgui.beginScroll(_height - margins, _scroll, _enabled); - return result; -} - -void imguiEndScrollArea(int32_t _r) -{ - s_imgui.endScroll(_r); - s_imgui.endArea(); -} - -void imguiIndent(uint16_t _width) -{ - s_imgui.indent(_width); -} - -void imguiUnindent(uint16_t _width) -{ - s_imgui.unindent(_width); -} - -void imguiSeparator(uint16_t _height) -{ - s_imgui.separator(_height); -} - -void imguiSeparatorLine(uint16_t _height, ImguiAlign::Enum _align) -{ - s_imgui.separatorLine(_height, _align); -} - -int32_t imguiGetWidgetX() -{ - return s_imgui.getCurrentArea().m_widgetX; -} - -int32_t imguiGetWidgetY() -{ - return s_imgui.getCurrentArea().m_widgetY; -} - -int32_t imguiGetWidgetW() -{ - return s_imgui.getCurrentArea().m_widgetW; -} - -void imguiSetCurrentScissor() -{ - return s_imgui.setCurrentScissor(); -} - -bool imguiButton(const char* _text, bool _enabled, ImguiAlign::Enum _align, uint32_t _rgb0, int32_t _r) -{ - return s_imgui.button(_text, _enabled, _align, _rgb0, _r); -} - -bool imguiItem(const char* _text, bool _enabled) -{ - return s_imgui.item(_text, _enabled); -} - -bool imguiCheck(const char* _text, bool _checked, bool _enabled) -{ - return s_imgui.check(_text, _checked, _enabled); -} - -bool imguiBool(const char* _text, bool& _flag, bool _enabled) -{ - bool result = imguiCheck(_text, _flag, _enabled); - if (result) + void PushFont(Font::Enum _font) { - _flag = !_flag; + PushFont(s_ctx.m_font[_font]); } - return result; -} +} // namespace ImGui -bool imguiCollapse(const char* _text, const char* _subtext, bool _checked, bool _enabled) -{ - return s_imgui.collapse(_text, _subtext, _checked, _enabled); -} - -void imguiLabel(const char* _format, ...) -{ - va_list argList; - va_start(argList, _format); - s_imgui.labelVargs(_format, argList, imguiRGBA(255, 255, 255, 255) ); - va_end(argList); -} - -void imguiLabel(uint32_t _rgba, const char* _format, ...) -{ - va_list argList; - va_start(argList, _format); - s_imgui.labelVargs(_format, argList, _rgba); - va_end(argList); -} - -void imguiValue(const char* _text) -{ - s_imgui.value(_text); -} - -bool imguiSlider(const char* _text, float& _val, float _vmin, float _vmax, float _vinc, bool _enabled, ImguiAlign::Enum _align) -{ - return s_imgui.slider(_text, _val, _vmin, _vmax, _vinc, _enabled, _align); -} - -bool imguiSlider(const char* _text, int32_t& _val, int32_t _vmin, int32_t _vmax, bool _enabled, ImguiAlign::Enum _align) -{ - float val = (float)_val; - bool result = s_imgui.slider(_text, val, (float)_vmin, (float)_vmax, 1.0f, _enabled, _align); - _val = (int32_t)val; - return result; -} - -void imguiInput(const char* _label, char* _str, uint32_t _len, bool _enabled, ImguiAlign::Enum _align, int32_t _r) -{ - s_imgui.input(_label, _str, _len, _enabled, _align, _r); -} - -uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint32_t _nTabs, uint32_t _nEnabled, ...) -{ - va_list argList; - va_start(argList, _nEnabled); - const uint8_t result = s_imgui.tabs(_selected, _enabled, _align, _height, _r, _nTabs, _nEnabled, argList); - va_end(argList); - - return result; -} - -uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint32_t _nTabs, ...) -{ - va_list argList; - va_start(argList, _nTabs); - const uint8_t result = s_imgui.tabs(_selected, _enabled, _align, _height, _r, _nTabs, 0, argList); - va_end(argList); - - return result; -} - -uint32_t imguiChooseUseMacroInstead(uint32_t _selected, ...) -{ - va_list argList; - va_start(argList, _selected); - - const char* str = va_arg(argList, const char*); - for (uint32_t ii = 0; str != NULL; ++ii, str = va_arg(argList, const char*) ) - { - if (imguiCheck(str, ii == _selected) ) - { - _selected = ii; - } - } - - va_end(argList); - - return _selected; -} - -void imguiColorWheel(float _rgb[3], bool _respectIndentation, float _size, bool _enabled) -{ - s_imgui.colorWheelWidget(_rgb, _respectIndentation, _size, _enabled); -} - -void imguiColorWheel(const char* _text, float _rgb[3], bool& _activated, float _size, bool _enabled) -{ - char buf[128]; - bx::snprintf(buf, sizeof(buf), "[RGB %-2.2f %-2.2f %-2.2f]" - , _rgb[0] - , _rgb[1] - , _rgb[2] - ); - - if (imguiCollapse(_text, buf, _activated) ) - { - _activated = !_activated; - } - - if (_activated) - { - imguiColorWheel(_rgb, false, _size, _enabled); - } -} - -bool imguiImage(bgfx::TextureHandle _image, float _lod, int32_t _width, int32_t _height, ImguiAlign::Enum _align, bool _enabled, bool _originBottomLeft) -{ - return s_imgui.image(_image, _lod, _width, _height, _align, _enabled, _originBottomLeft); -} - -bool imguiImage(bgfx::TextureHandle _image, float _lod, float _width, float _aspect, ImguiAlign::Enum _align, bool _enabled, bool _originBottomLeft) -{ - return s_imgui.image(_image, _lod, _width, _aspect, _align, _enabled, _originBottomLeft); -} - -bool imguiImageChannel(bgfx::TextureHandle _image, uint8_t _channel, float _lod, int32_t _width, int32_t _height, ImguiAlign::Enum _align, bool _enabled) -{ - return s_imgui.imageChannel(_image, _channel, _lod, _width, _height, _align, _enabled); -} - -bool imguiImageChannel(bgfx::TextureHandle _image, uint8_t _channel, float _lod, float _width, float _aspect, ImguiAlign::Enum _align, bool _enabled) -{ - return s_imgui.imageChannel(_image, _channel, _lod, _width, _aspect, _align, _enabled); -} - -bool imguiCube(bgfx::TextureHandle _cubemap, float _lod, ImguiCubemap::Enum _display, bool _sameHeight, ImguiAlign::Enum _align, bool _enabled) -{ - return s_imgui.cubeMap(_cubemap, _lod, _display, _sameHeight, _align, _enabled); -} - -float imguiGetTextLength(const char* _text, ImguiFontHandle _handle) -{ -#if !USE_NANOVG_FONT - uint32_t numVertices = 0; //unused - return getTextLength(s_imgui.m_fonts[_handle.idx].m_cdata, _text, numVertices); -#else - return 0.0f; -#endif -} - -bool imguiMouseOverArea() -{ - return s_imgui.m_insideArea - || ImGui::IsAnyItemHovered() - || ImGui::IsMouseHoveringAnyWindow() - ; -} - -bgfx::ProgramHandle imguiGetImageProgram(uint8_t _mip) -{ - const float lodEnabled[4] = { float(_mip), 1.0f, 0.0f, 0.0f }; - bgfx::setUniform(s_imgui.u_imageLodEnabled, lodEnabled); - return s_imgui.m_imageProgram; -} +BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4505); // error C4505: '' : unreferenced local function has been removed +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-function"); // warning: ‘int rect_width_compare(const void*, const void*)’ defined but not used +BX_PRAGMA_DIAGNOSTIC_PUSH(); +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wunknown-pragmas") +//BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-but-set-variable"); // warning: variable ‘L1’ set but not used +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wtype-limits"); // warning: comparison is always true due to limited range of data type +#define STBTT_malloc(_size, _userData) memAlloc(_size) +#define STBTT_free(_ptr, _userData) memFree(_ptr) +#define STB_RECT_PACK_IMPLEMENTATION +#include +#define STB_TRUETYPE_IMPLEMENTATION +#include +BX_PRAGMA_DIAGNOSTIC_POP(); diff --git a/3rdparty/bgfx/examples/common/imgui/imgui.h b/3rdparty/bgfx/examples/common/imgui/imgui.h index 8176b40..42dc27f 100644 --- a/3rdparty/bgfx/examples/common/imgui/imgui.h +++ b/3rdparty/bgfx/examples/common/imgui/imgui.h @@ -1,28 +1,8 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ -// This code is based on: -// -// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// 3. This notice may not be removed or altered from any source distribution. -// -// Source altered and distributed from https://github.com/AdrienHerubel/imgui - #ifndef IMGUI_H_HEADER_GUARD #define IMGUI_H_HEADER_GUARD @@ -35,91 +15,6 @@ #define IMGUI_MBUT_RIGHT 0x02 #define IMGUI_MBUT_MIDDLE 0x04 -/// For custom values, define these macros before including imgui.h - -#ifndef IMGUI_SCROLL_AREA_R -# define IMGUI_SCROLL_AREA_R 6 -#endif //IMGUI_SCROLL_AREA_R - -#ifndef IMGUI_SCROLL_BAR_R -# define IMGUI_SCROLL_BAR_R 5 -#endif //IMGUI_SCROLL_BAR_R - -#ifndef IMGUI_BUTTON_R -# define IMGUI_BUTTON_R 9 -#endif //IMGUI_BUTTON_R - -#ifndef IMGUI_BUTTON_RGB0 -# define IMGUI_BUTTON_RGB0 imguiRGBA(128, 128, 128, 0) -#endif //IMGUI_BUTTON_RGB0 - -#ifndef IMGUI_INPUT_R -# define IMGUI_INPUT_R 4 -#endif //IMGUI_INPUT_R - -#ifndef IMGUI_TABS_HEIGHT -# define IMGUI_TABS_HEIGHT 20 -#endif //IMGUI_TABS_HEIGHT - -#ifndef IMGUI_TABS_R -# define IMGUI_TABS_R 9 -#endif //IMGUI_TABS_R - -#ifndef IMGUI_INDENT_VALUE -# define IMGUI_INDENT_VALUE 16 -#endif //IMGUI_INDENT_VALUE - -#ifndef IMGUI_SEPARATOR_VALUE -# define IMGUI_SEPARATOR_VALUE 12 -#endif //IMGUI_SEPARATOR_VALUE - -struct ImguiTextAlign -{ - enum Enum - { - Left, - Center, - Right, - - Count - }; -}; - -struct ImguiAlign -{ - enum Enum - { - Left, - LeftIndented, - Center, - CenterIndented, - Right, - }; -}; - -struct ImguiCubemap -{ - enum Enum - { - Cross, - Latlong, - Hex, - - Count, - }; -}; - -struct ImguiBorder -{ - enum Enum - { - Left, - Right, - Top, - Bottom - }; -}; - inline uint32_t imguiRGBA(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a = 255) { return 0 @@ -130,82 +25,16 @@ inline uint32_t imguiRGBA(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a = 255) ; } -BGFX_HANDLE(ImguiFontHandle); - -ImguiFontHandle imguiCreateFont(const void* _data, float _fontSize = 18.0f); -void imguiSetFont(ImguiFontHandle _handle); -ImguiFontHandle imguiGetCurrentFont(); - namespace bx { struct AllocatorI; } -ImguiFontHandle imguiCreate(const void* _data = NULL, uint32_t _size = 0, float _fontSize = 18.0f, bx::AllocatorI* _allocator = NULL); +void imguiCreate(float _fontSize = 18.0f, bx::AllocatorI* _allocator = NULL); void imguiDestroy(); -void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar = 0, uint8_t _view = 255); -void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, uint16_t _surfaceWidth, uint16_t _surfaceHeight, char _inputChar = 0, uint8_t _view = 255); +void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar = 0, bgfx::ViewId _view = 255); void imguiEndFrame(); -void imguiDrawText(int _x, int _y, ImguiTextAlign::Enum _align, const char* _text, uint32_t _argb); -void imguiDrawLine(float _x0, float _y0, float _x1, float _y1, float _r, uint32_t _argb); -void imguiDrawRoundedRect(float _x, float _y, float _w, float _h, float _r, uint32_t _argb); -void imguiDrawRect(float _x, float _y, float _w, float _h, uint32_t _argb); - -/// Notice: this function is not to be called between imguiBeginArea() and imguiEndArea(). -bool imguiBorderButton(ImguiBorder::Enum _border, bool _checked, bool _enabled = true); - -bool imguiBeginArea(const char* _name, int _x, int _y, int _width, int _height, bool _enabled = true, int32_t _r = IMGUI_SCROLL_AREA_R); -void imguiEndArea(); -bool imguiBeginScroll(int32_t _height, int32_t* _scroll, bool _enabled = true); -void imguiEndScroll(int32_t _r = IMGUI_SCROLL_BAR_R); - -bool imguiBeginScrollArea(const char* _name, int _x, int _y, int _width, int _height, int* _scroll, bool _enabled = true, int32_t _r = IMGUI_SCROLL_AREA_R); -void imguiEndScrollArea(int32_t _r = IMGUI_SCROLL_BAR_R); - -void imguiIndent(uint16_t _width = IMGUI_INDENT_VALUE); -void imguiUnindent(uint16_t _width = IMGUI_INDENT_VALUE); -void imguiSeparator(uint16_t _height = IMGUI_SEPARATOR_VALUE); -void imguiSeparatorLine(uint16_t _height = IMGUI_SEPARATOR_VALUE, ImguiAlign::Enum = ImguiAlign::LeftIndented); - -int32_t imguiGetWidgetX(); -int32_t imguiGetWidgetY(); -int32_t imguiGetWidgetW(); -void imguiSetCurrentScissor(); // Call before drawing custom widgets over imgui area. - -bool imguiButton(const char* _text, bool _enabled = true, ImguiAlign::Enum _align = ImguiAlign::LeftIndented, uint32_t _rgb0 = IMGUI_BUTTON_RGB0, int32_t _r = IMGUI_BUTTON_R); -bool imguiItem(const char* _text, bool _enabled = true); -bool imguiCheck(const char* _text, bool _checked, bool _enabled = true); -bool imguiBool(const char* _text, bool& _flag, bool _enabled = true); -bool imguiCollapse(const char* _text, const char* _subtext, bool _checked, bool _enabled = true); -void imguiLabel(const char* _format, ...); -void imguiLabel(uint32_t _rgba, const char* _format, ...); -void imguiValue(const char* _text); -bool imguiSlider(const char* _text, float& _val, float _vmin, float _vmax, float _vinc, bool _enabled = true, ImguiAlign::Enum _align = ImguiAlign::LeftIndented); -bool imguiSlider(const char* _text, int32_t& _val, int32_t _vmin, int32_t _vmax, bool _enabled = true, ImguiAlign::Enum _align = ImguiAlign::LeftIndented); -void imguiInput(const char* _label, char* _str, uint32_t _len, bool _enabled = true, ImguiAlign::Enum _align = ImguiAlign::LeftIndented, int32_t _r = IMGUI_INPUT_R); - -/// Usage example: -/// imguiTabs(0, true, ImguiAlign::CenterIndented, 20, 0, 3, 2, "Tab0", "Tab1", "Tab2", true, false); -/// _nTabs - Number of tabs (in the above example, 3, and their labes are 'Tab0', 'Tab1' and 'Tab2'. -/// _nEnabled - Number of specified 'enabled' flags. All other unspecified tabs are considered enabled by default. -/// In the above example, there are 2 enabled flags: 'Tab0' is specified as enabled and 'Tab1' is specified as disabled. -/// Tab2 is unspecified and therefore is treated as enabled. -uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint32_t _nTabs, uint32_t _nEnabled, ...); -uint8_t imguiTabs(uint8_t _selected, bool _enabled, ImguiAlign::Enum _align, int32_t _height, int32_t _r, uint32_t _nTabs, ...); - -uint32_t imguiChooseUseMacroInstead(uint32_t _selected, ...); -#define imguiChoose(...) imguiChooseUseMacroInstead(__VA_ARGS__, NULL) - -void imguiColorWheel(float _rgb[3], bool _respectIndentation = false, float _size = 0.8f, bool _enabled = true); -void imguiColorWheel(const char* _str, float _rgb[3], bool& _activated, float _size = 0.8f, bool _enabled = true); - -bool imguiImage(bgfx::TextureHandle _image, float _lod, int32_t _width, int32_t _height, ImguiAlign::Enum _align = ImguiAlign::LeftIndented, bool _enabled = true, bool _originBottomLeft = false); -bool imguiImage(bgfx::TextureHandle _image, float _lod, float _scale, float _aspect, ImguiAlign::Enum _align = ImguiAlign::LeftIndented, bool _enabled = true, bool _originBottomLeft = false); -bool imguiImageChannel(bgfx::TextureHandle _image, uint8_t _channel, float _lod, int32_t _width, int32_t _height, ImguiAlign::Enum _align = ImguiAlign::LeftIndented, bool _enabled = true); -bool imguiImageChannel(bgfx::TextureHandle _image, uint8_t _channel, float _lod, float _scale, float _aspect, ImguiAlign::Enum _align = ImguiAlign::LeftIndented, bool _enabled = true); -bool imguiCube(bgfx::TextureHandle _cubemap, float _lod = 0.0f, ImguiCubemap::Enum _display = ImguiCubemap::Cross, bool _sameHeight = false, ImguiAlign::Enum _align = ImguiAlign::LeftIndented, bool _enabled = true); - -float imguiGetTextLength(const char* _text, ImguiFontHandle _handle); -bool imguiMouseOverArea(); +namespace entry { class AppI; } +void showExampleDialog(entry::AppI* _app, const char* _errorText = NULL); namespace ImGui { @@ -279,6 +108,35 @@ namespace ImGui SetCursorPosY(GetCursorPosY() + GetTextLineHeightWithSpacing() ); } + inline bool TabButton(const char* _text, float _width, bool _active) + { + int32_t count = 1; + + if (_active) + { + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(1.0f, 0.75f, 0.0f, 0.78f) ); + ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.0f, 0.0f, 0.0f, 1.0f ) ); + count = 2; + } + else + { + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.5f, 0.5f, 0.5f, 0.7f) ); + } + + bool retval = ImGui::Button(_text, ImVec2(_width, 20.0f) ); + ImGui::PopStyleColor(count); + + return retval; + } + + inline bool MouseOverArea() + { + return false + || ImGui::IsAnyItemHovered() + || ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow) + ; + } + } // namespace ImGui #endif // IMGUI_H_HEADER_GUARD diff --git a/3rdparty/bgfx/examples/common/imgui/makefile b/3rdparty/bgfx/examples/common/imgui/makefile index b9648f1..13855bc 100644 --- a/3rdparty/bgfx/examples/common/imgui/makefile +++ b/3rdparty/bgfx/examples/common/imgui/makefile @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # diff --git a/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp b/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp deleted file mode 100644 index 201a543..0000000 --- a/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Copyright 2014-2015 Daniel Collin. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -#include -#include -#include -#include -#include -#include -#include "imgui.h" -#include "ocornut_imgui.h" -#include "../bgfx_utils.h" - -#ifndef USE_ENTRY -# if defined(SCI_NAMESPACE) -# define USE_ENTRY 1 -# else -# define USE_ENTRY 0 -# endif // defined(SCI_NAMESPACE) -#endif // USE_ENTRY - -#if USE_ENTRY -# include "../entry/entry.h" -#endif // USE_ENTRY - -#if defined(SCI_NAMESPACE) -# include "../entry/input.h" -# include "scintilla.h" -#endif // defined(SCI_NAMESPACE) - -#include "vs_ocornut_imgui.bin.h" -#include "fs_ocornut_imgui.bin.h" - -#include "roboto_regular.ttf.h" -#include "robotomono_regular.ttf.h" -#include "icons_kenney.ttf.h" -#include "icons_font_awesome.ttf.h" - -static const bgfx::EmbeddedShader s_embeddedShaders[] = -{ - BGFX_EMBEDDED_SHADER(vs_ocornut_imgui), - BGFX_EMBEDDED_SHADER(fs_ocornut_imgui), - - BGFX_EMBEDDED_SHADER_END() -}; - -struct FontRangeMerge -{ - const void* data; - size_t size; - ImWchar ranges[3]; -}; - -static FontRangeMerge s_fontRangeMerge[] = -{ - { s_iconsKenneyTtf, sizeof(s_iconsKenneyTtf), { ICON_MIN_KI, ICON_MAX_KI, 0 } }, - { s_iconsFontAwesomeTtf, sizeof(s_iconsFontAwesomeTtf), { ICON_MIN_FA, ICON_MAX_FA, 0 } }, -}; - -struct OcornutImguiContext -{ - static void* memAlloc(size_t _size); - static void memFree(void* _ptr); - static void renderDrawLists(ImDrawData* _drawData); - - void render(ImDrawData* _drawData) - { - const ImGuiIO& io = ImGui::GetIO(); - const float width = io.DisplaySize.x; - const float height = io.DisplaySize.y; - - { - float ortho[16]; - bx::mtxOrtho(ortho, 0.0f, width, height, 0.0f, -1.0f, 1.0f); - bgfx::setViewTransform(m_viewId, NULL, ortho); - } - - // Render command lists - for (int32_t ii = 0, num = _drawData->CmdListsCount; ii < num; ++ii) - { - bgfx::TransientVertexBuffer tvb; - bgfx::TransientIndexBuffer tib; - - const ImDrawList* drawList = _drawData->CmdLists[ii]; - uint32_t numVertices = (uint32_t)drawList->VtxBuffer.size(); - uint32_t numIndices = (uint32_t)drawList->IdxBuffer.size(); - - if (!checkAvailTransientBuffers(numVertices, m_decl, numIndices) ) - { - // not enough space in transient buffer just quit drawing the rest... - break; - } - - bgfx::allocTransientVertexBuffer(&tvb, numVertices, m_decl); - bgfx::allocTransientIndexBuffer(&tib, numIndices); - - ImDrawVert* verts = (ImDrawVert*)tvb.data; - bx::memCopy(verts, drawList->VtxBuffer.begin(), numVertices * sizeof(ImDrawVert) ); - - ImDrawIdx* indices = (ImDrawIdx*)tib.data; - bx::memCopy(indices, drawList->IdxBuffer.begin(), numIndices * sizeof(ImDrawIdx) ); - - uint32_t offset = 0; - for (const ImDrawCmd* cmd = drawList->CmdBuffer.begin(), *cmdEnd = drawList->CmdBuffer.end(); cmd != cmdEnd; ++cmd) - { - if (cmd->UserCallback) - { - cmd->UserCallback(drawList, cmd); - } - else if (0 != cmd->ElemCount) - { - uint64_t state = 0 - | BGFX_STATE_RGB_WRITE - | BGFX_STATE_ALPHA_WRITE - | BGFX_STATE_MSAA - ; - - bgfx::TextureHandle th = m_texture; - bgfx::ProgramHandle program = m_program; - - if (NULL != cmd->TextureId) - { - union { ImTextureID ptr; struct { bgfx::TextureHandle handle; uint8_t flags; uint8_t mip; } s; } texture = { cmd->TextureId }; - state |= 0 != (IMGUI_FLAGS_ALPHA_BLEND & texture.s.flags) - ? BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA) - : BGFX_STATE_NONE - ; - th = texture.s.handle; - if (0 != texture.s.mip) - { - extern bgfx::ProgramHandle imguiGetImageProgram(uint8_t _mip); - program = imguiGetImageProgram(texture.s.mip); - } - } - else - { - state |= BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA); - } - - const uint16_t xx = uint16_t(bx::fmax(cmd->ClipRect.x, 0.0f) ); - const uint16_t yy = uint16_t(bx::fmax(cmd->ClipRect.y, 0.0f) ); - bgfx::setScissor(xx, yy - , uint16_t(bx::fmin(cmd->ClipRect.z, 65535.0f)-xx) - , uint16_t(bx::fmin(cmd->ClipRect.w, 65535.0f)-yy) - ); - - bgfx::setState(state); - bgfx::setTexture(0, s_tex, th); - bgfx::setVertexBuffer(&tvb, 0, numVertices); - bgfx::setIndexBuffer(&tib, offset, cmd->ElemCount); - bgfx::submit(cmd->ViewId, program); - } - - offset += cmd->ElemCount; - } - } - } - - void create(float _fontSize, bx::AllocatorI* _allocator) - { - m_viewId = 255; - m_allocator = _allocator; - m_lastScroll = 0; - m_last = bx::getHPCounter(); - - ImGuiIO& io = ImGui::GetIO(); - io.RenderDrawListsFn = renderDrawLists; - if (NULL != m_allocator) - { - io.MemAllocFn = memAlloc; - io.MemFreeFn = memFree; - } - - io.DisplaySize = ImVec2(1280.0f, 720.0f); - io.DeltaTime = 1.0f / 60.0f; - io.IniFilename = NULL; - - setupStyle(true); - -#if defined(SCI_NAMESPACE) - io.KeyMap[ImGuiKey_Tab] = (int)entry::Key::Tab; - io.KeyMap[ImGuiKey_LeftArrow] = (int)entry::Key::Left; - io.KeyMap[ImGuiKey_RightArrow] = (int)entry::Key::Right; - io.KeyMap[ImGuiKey_UpArrow] = (int)entry::Key::Up; - io.KeyMap[ImGuiKey_DownArrow] = (int)entry::Key::Down; - io.KeyMap[ImGuiKey_Home] = (int)entry::Key::Home; - io.KeyMap[ImGuiKey_End] = (int)entry::Key::End; - io.KeyMap[ImGuiKey_Delete] = (int)entry::Key::Delete; - io.KeyMap[ImGuiKey_Backspace] = (int)entry::Key::Backspace; - io.KeyMap[ImGuiKey_Enter] = (int)entry::Key::Return; - io.KeyMap[ImGuiKey_Escape] = (int)entry::Key::Esc; - io.KeyMap[ImGuiKey_A] = (int)entry::Key::KeyA; - io.KeyMap[ImGuiKey_C] = (int)entry::Key::KeyC; - io.KeyMap[ImGuiKey_V] = (int)entry::Key::KeyV; - io.KeyMap[ImGuiKey_X] = (int)entry::Key::KeyX; - io.KeyMap[ImGuiKey_Y] = (int)entry::Key::KeyY; - io.KeyMap[ImGuiKey_Z] = (int)entry::Key::KeyZ; -#endif // defined(SCI_NAMESPACE) - - bgfx::RendererType::Enum type = bgfx::getRendererType(); - m_program = bgfx::createProgram( - bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_ocornut_imgui") - , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_ocornut_imgui") - , true - ); - - m_decl - .begin() - .add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float) - .add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float) - .add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true) - .end(); - - s_tex = bgfx::createUniform("s_tex", bgfx::UniformType::Int1); - - uint8_t* data; - int32_t width; - int32_t height; - { - ImFontConfig config; - config.FontDataOwnedByAtlas = false; - config.MergeMode = false; -// config.MergeGlyphCenterV = true; - - m_font[ImGui::Font::Regular] = io.Fonts->AddFontFromMemoryTTF( (void*)s_robotoRegularTtf, sizeof(s_robotoRegularTtf), _fontSize, &config); - m_font[ImGui::Font::Mono ] = io.Fonts->AddFontFromMemoryTTF( (void*)s_robotoMonoRegularTtf, sizeof(s_robotoMonoRegularTtf), _fontSize-3.0f, &config); - - config.MergeMode = true; - config.DstFont = m_font[ImGui::Font::Regular]; - - for (uint32_t ii = 0; ii < BX_COUNTOF(s_fontRangeMerge); ++ii) - { - const FontRangeMerge& frm = s_fontRangeMerge[ii]; - - io.Fonts->AddFontFromMemoryTTF( (void*)frm.data - , (int)frm.size - , _fontSize-3.0f - , &config - , frm.ranges - ); - } - } - - io.Fonts->GetTexDataAsRGBA32(&data, &width, &height); - - m_texture = bgfx::createTexture2D( - (uint16_t)width - , (uint16_t)height - , false - , 1 - , bgfx::TextureFormat::BGRA8 - , 0 - , bgfx::copy(data, width*height*4) - ); - -// Disabled (martin) to use different docking system -// https://github.com/vassvik/imgui_docking_minimal -// ImGui::InitDockContext(); - } - - void destroy() - { -// Disabled (martin) to use different docking system -// https://github.com/vassvik/imgui_docking_minimal -// ImGui::ShutdownDockContext(); - - ImGui::Shutdown(); - - bgfx::destroyUniform(s_tex); - bgfx::destroyTexture(m_texture); - bgfx::destroyProgram(m_program); - - m_allocator = NULL; - } - - void setupStyle(bool _dark) - { - // Doug Binks' darl color scheme - // https://gist.github.com/dougbinks/8089b4bbaccaaf6fa204236978d165a9 - ImGuiStyle& style = ImGui::GetStyle(); - - style.FrameRounding = 4.0f; - - // light style from Pacome Danhiez (user itamago) - // https://github.com/ocornut/imgui/pull/511#issuecomment-175719267 - style.Colors[ImGuiCol_Text] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f); - style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f); - style.Colors[ImGuiCol_WindowBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f); - style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); - style.Colors[ImGuiCol_Border] = ImVec4(0.00f, 0.00f, 0.00f, 0.39f); - style.Colors[ImGuiCol_BorderShadow] = ImVec4(1.00f, 1.00f, 1.00f, 0.10f); - style.Colors[ImGuiCol_FrameBg] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); - style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f); - style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); - style.Colors[ImGuiCol_TitleBg] = ImVec4(0.96f, 0.96f, 0.96f, 1.00f); - style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 1.00f, 1.00f, 0.51f); - style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.82f, 0.82f, 0.82f, 1.00f); - style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.86f, 0.86f, 0.86f, 1.00f); - style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.98f, 0.98f, 0.98f, 0.53f); - style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.69f, 0.69f, 0.69f, 0.80f); - style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.49f, 0.49f, 0.49f, 0.80f); - style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.49f, 0.49f, 0.49f, 1.00f); - style.Colors[ImGuiCol_ComboBg] = ImVec4(0.86f, 0.86f, 0.86f, 0.99f); - style.Colors[ImGuiCol_CheckMark] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); - style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.26f, 0.59f, 0.98f, 0.78f); - style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); - style.Colors[ImGuiCol_Button] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f); - style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); - style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.06f, 0.53f, 0.98f, 1.00f); - style.Colors[ImGuiCol_Header] = ImVec4(0.26f, 0.59f, 0.98f, 0.31f); - style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f); - style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); - style.Colors[ImGuiCol_Column] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f); - style.Colors[ImGuiCol_ColumnHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.78f); - style.Colors[ImGuiCol_ColumnActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); - style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.50f); - style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); - style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f); - style.Colors[ImGuiCol_CloseButton] = ImVec4(0.59f, 0.59f, 0.59f, 0.50f); - style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.98f, 0.39f, 0.36f, 1.00f); - style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.98f, 0.39f, 0.36f, 1.00f); - style.Colors[ImGuiCol_PlotLines] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f); - style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f); - style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f); - style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f); - style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f); - style.Colors[ImGuiCol_PopupBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.94f); - style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f); - - if (_dark) - { - for (int i = 0; i <= ImGuiCol_COUNT; i++) - { - ImVec4& col = style.Colors[i]; - float H, S, V; - ImGui::ColorConvertRGBtoHSV( col.x, col.y, col.z, H, S, V ); - - if( S < 0.1f ) - { - V = 1.0f - V; - } - ImGui::ColorConvertHSVtoRGB( H, S, V, col.x, col.y, col.z ); - } - } - } - - void beginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, int _width, int _height, char _inputChar, uint8_t _viewId) - { - m_viewId = _viewId; - - ImGuiIO& io = ImGui::GetIO(); - if (_inputChar < 0x7f) - { - io.AddInputCharacter(_inputChar); // ASCII or GTFO! :( - } - - io.DisplaySize = ImVec2( (float)_width, (float)_height); - - const int64_t now = bx::getHPCounter(); - const int64_t frameTime = now - m_last; - m_last = now; - const double freq = double(bx::getHPFrequency() ); - io.DeltaTime = float(frameTime/freq); - - io.MousePos = ImVec2( (float)_mx, (float)_my); - io.MouseDown[0] = 0 != (_button & IMGUI_MBUT_LEFT); - io.MouseDown[1] = 0 != (_button & IMGUI_MBUT_RIGHT); - io.MouseDown[2] = 0 != (_button & IMGUI_MBUT_MIDDLE); - io.MouseWheel = (float)(_scroll - m_lastScroll); - m_lastScroll = _scroll; - -#if defined(SCI_NAMESPACE) - uint8_t modifiers = inputGetModifiersState(); - io.KeyShift = 0 != (modifiers & (entry::Modifier::LeftShift | entry::Modifier::RightShift) ); - io.KeyCtrl = 0 != (modifiers & (entry::Modifier::LeftCtrl | entry::Modifier::RightCtrl ) ); - io.KeyAlt = 0 != (modifiers & (entry::Modifier::LeftAlt | entry::Modifier::RightAlt ) ); - for (int32_t ii = 0; ii < (int32_t)entry::Key::Count; ++ii) - { - io.KeysDown[ii] = inputGetKeyState(entry::Key::Enum(ii) ); - } -#endif // defined(SCI_NAMESPACE) - - ImGui::NewFrame(); - ImGui::PushStyleVar(ImGuiStyleVar_ViewId, (float)_viewId); - - ImGuizmo::BeginFrame(); - } - - void endFrame() - { - ImGui::PopStyleVar(1); - ImGui::Render(); - } - - bx::AllocatorI* m_allocator; - bgfx::VertexDecl m_decl; - bgfx::ProgramHandle m_program; - bgfx::TextureHandle m_texture; - bgfx::UniformHandle s_tex; - ImFont* m_font[ImGui::Font::Count]; - int64_t m_last; - int32_t m_lastScroll; - uint8_t m_viewId; -}; - -static OcornutImguiContext s_ctx; - -void* OcornutImguiContext::memAlloc(size_t _size) -{ - return BX_ALLOC(s_ctx.m_allocator, _size); -} - -void OcornutImguiContext::memFree(void* _ptr) -{ - BX_FREE(s_ctx.m_allocator, _ptr); -} - -void OcornutImguiContext::renderDrawLists(ImDrawData* _drawData) -{ - s_ctx.render(_drawData); -} - -void IMGUI_create(float _fontSize, bx::AllocatorI* _allocator) -{ - s_ctx.create(_fontSize, _allocator); -} - -void IMGUI_destroy() -{ - s_ctx.destroy(); -} - -void IMGUI_beginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, int _width, int _height, char _inputChar, uint8_t _viewId) -{ - s_ctx.beginFrame(_mx, _my, _button, _scroll, _width, _height, _inputChar, _viewId); -} - -void IMGUI_endFrame() -{ - s_ctx.endFrame(); -} - -namespace ImGui -{ - void PushFont(Font::Enum _font) - { - PushFont(s_ctx.m_font[_font]); - } -} // namespace ImGui diff --git a/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.h b/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.h deleted file mode 100644 index f66372c..0000000 --- a/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2014-2015 Daniel Collin. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -#ifndef OCORNUT_IMGUI_H_HEADER_GUARD -#define OCORNUT_IMGUI_H_HEADER_GUARD - -#include - -namespace bx { struct AllocatorI; } - -void IMGUI_create(float _fontSize, bx::AllocatorI* _allocator); -void IMGUI_destroy(); -void IMGUI_beginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, int _width, int _height, char _inputChar, uint8_t _viewId); -void IMGUI_endFrame(); - -#endif // OCORNUT_IMGUI_H_HEADER_GUARD diff --git a/3rdparty/bgfx/examples/common/imgui/scintilla.cpp b/3rdparty/bgfx/examples/common/imgui/scintilla.cpp index b11befe..0ab454a 100644 --- a/3rdparty/bgfx/examples/common/imgui/scintilla.cpp +++ b/3rdparty/bgfx/examples/common/imgui/scintilla.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE */ @@ -104,79 +104,79 @@ public: { } - virtual void Init(Scintilla::WindowID /*_wid*/) BX_OVERRIDE + virtual void Init(Scintilla::WindowID /*_wid*/) override { } - virtual void Init(Scintilla::SurfaceID /*_sid*/, Scintilla::WindowID /*_wid*/) BX_OVERRIDE + virtual void Init(Scintilla::SurfaceID /*_sid*/, Scintilla::WindowID /*_wid*/) override { } - virtual void InitPixMap(int /*_width*/, int /*_height*/, Scintilla::Surface* /*_surface*/, Scintilla::WindowID /*_wid*/) BX_OVERRIDE + virtual void InitPixMap(int /*_width*/, int /*_height*/, Scintilla::Surface* /*_surface*/, Scintilla::WindowID /*_wid*/) override { } - virtual void Release() BX_OVERRIDE + virtual void Release() override { } - virtual bool Initialised() BX_OVERRIDE + virtual bool Initialised() override { return true; } - virtual void PenColour(Scintilla::ColourDesired /*_fore*/) BX_OVERRIDE + virtual void PenColour(Scintilla::ColourDesired /*_fore*/) override { } - virtual int LogPixelsY() BX_OVERRIDE + virtual int LogPixelsY() override { return 72; } - virtual int DeviceHeightFont(int /*points*/) BX_OVERRIDE + virtual int DeviceHeightFont(int /*points*/) override { return 1500; } - virtual void MoveTo(int _x, int _y) BX_OVERRIDE + virtual void MoveTo(int _x, int _y) override { BX_UNUSED(_x, _y); } - virtual void LineTo(int _x, int _y) BX_OVERRIDE + virtual void LineTo(int _x, int _y) override { BX_UNUSED(_x, _y); } - virtual void Polygon(Scintilla::Point *pts, int npts, Scintilla::ColourDesired fore, Scintilla::ColourDesired back) BX_OVERRIDE + virtual void Polygon(Scintilla::Point *pts, int npts, Scintilla::ColourDesired fore, Scintilla::ColourDesired back) override { BX_UNUSED(pts, npts, fore, back); } - virtual void RectangleDraw(Scintilla::PRectangle rc, Scintilla::ColourDesired fore, Scintilla::ColourDesired back) BX_OVERRIDE + virtual void RectangleDraw(Scintilla::PRectangle rc, Scintilla::ColourDesired fore, Scintilla::ColourDesired back) override { BX_UNUSED(fore); FillRectangle(rc, back); } - virtual void FillRectangle(Scintilla::PRectangle rc, Scintilla::ColourDesired back) BX_OVERRIDE + virtual void FillRectangle(Scintilla::PRectangle rc, Scintilla::ColourDesired back) override { fillRectangle(rc, back); } - virtual void FillRectangle(Scintilla::PRectangle rc, Scintilla::Surface& surfacePattern) BX_OVERRIDE + virtual void FillRectangle(Scintilla::PRectangle rc, Scintilla::Surface& surfacePattern) override { BX_UNUSED(rc, surfacePattern); } - virtual void RoundedRectangle(Scintilla::PRectangle rc, Scintilla::ColourDesired fore, Scintilla::ColourDesired back) BX_OVERRIDE + virtual void RoundedRectangle(Scintilla::PRectangle rc, Scintilla::ColourDesired fore, Scintilla::ColourDesired back) override { BX_UNUSED(rc, fore, back); } - virtual void AlphaRectangle(Scintilla::PRectangle _rc, int /*_cornerSize*/, Scintilla::ColourDesired _fill, int _alphaFill, Scintilla::ColourDesired /*_outline*/, int /*_alphaOutline*/, int /*_flags*/) BX_OVERRIDE + virtual void AlphaRectangle(Scintilla::PRectangle _rc, int /*_cornerSize*/, Scintilla::ColourDesired _fill, int _alphaFill, Scintilla::ColourDesired /*_outline*/, int /*_alphaOutline*/, int /*_flags*/) override { unsigned int back = 0 | (uint32_t)( (_fill.AsLong() & 0xffffff) @@ -187,37 +187,37 @@ public: } - virtual void DrawRGBAImage(Scintilla::PRectangle /*_rc*/, int /*_width*/, int /*_height*/, const unsigned char* /*_pixelsImage*/) BX_OVERRIDE + virtual void DrawRGBAImage(Scintilla::PRectangle /*_rc*/, int /*_width*/, int /*_height*/, const unsigned char* /*_pixelsImage*/) override { } - virtual void Ellipse(Scintilla::PRectangle rc, Scintilla::ColourDesired fore, Scintilla::ColourDesired /*back*/) BX_OVERRIDE + virtual void Ellipse(Scintilla::PRectangle rc, Scintilla::ColourDesired fore, Scintilla::ColourDesired /*back*/) override { FillRectangle(rc, fore); } - virtual void Copy(Scintilla::PRectangle /*_rc*/, Scintilla::Point /*_from*/, Scintilla::Surface& /*_surfaceSource*/) BX_OVERRIDE + virtual void Copy(Scintilla::PRectangle /*_rc*/, Scintilla::Point /*_from*/, Scintilla::Surface& /*_surfaceSource*/) override { } - virtual void DrawTextNoClip(Scintilla::PRectangle rc, Scintilla::Font& _font, Scintilla::XYPOSITION ybase, const char *s, int len, Scintilla::ColourDesired fore, Scintilla::ColourDesired back) BX_OVERRIDE + virtual void DrawTextNoClip(Scintilla::PRectangle rc, Scintilla::Font& _font, Scintilla::XYPOSITION ybase, const char *s, int len, Scintilla::ColourDesired fore, Scintilla::ColourDesired back) override { BX_UNUSED(back); DrawTextBase(rc, _font, ybase, s, len, fore); } - virtual void DrawTextClipped(Scintilla::PRectangle rc, Scintilla::Font& _font, Scintilla::XYPOSITION ybase, const char *s, int len, Scintilla::ColourDesired fore, Scintilla::ColourDesired back) BX_OVERRIDE + virtual void DrawTextClipped(Scintilla::PRectangle rc, Scintilla::Font& _font, Scintilla::XYPOSITION ybase, const char *s, int len, Scintilla::ColourDesired fore, Scintilla::ColourDesired back) override { BX_UNUSED(back); DrawTextBase(rc, _font, ybase, s, len, fore); } - virtual void DrawTextTransparent(Scintilla::PRectangle rc, Scintilla::Font& _font, Scintilla::XYPOSITION ybase, const char *s, int len, Scintilla::ColourDesired fore) BX_OVERRIDE + virtual void DrawTextTransparent(Scintilla::PRectangle rc, Scintilla::Font& _font, Scintilla::XYPOSITION ybase, const char *s, int len, Scintilla::ColourDesired fore) override { DrawTextBase(rc, _font, ybase, s, len, fore); } - virtual void MeasureWidths(Scintilla::Font& /*_font*/, const char* _str, int _len, Scintilla::XYPOSITION* _positions) BX_OVERRIDE + virtual void MeasureWidths(Scintilla::Font& /*_font*/, const char* _str, int _len, Scintilla::XYPOSITION* _positions) override { float position = 0; @@ -230,63 +230,63 @@ public: } } - virtual Scintilla::XYPOSITION WidthText(Scintilla::Font& /*_font*/, const char* _str, int _len) BX_OVERRIDE + virtual Scintilla::XYPOSITION WidthText(Scintilla::Font& /*_font*/, const char* _str, int _len) override { ImVec2 t = ImGui::CalcTextSize(_str, _str + _len); return t.x; } - virtual Scintilla::XYPOSITION WidthChar(Scintilla::Font& _font, char ch) BX_OVERRIDE + virtual Scintilla::XYPOSITION WidthChar(Scintilla::Font& _font, char ch) override { FontInt* fi = (FontInt*)_font.GetID(); return fi->m_font->GetCharAdvance( (unsigned int)ch) * fi->m_scale; } - virtual Scintilla::XYPOSITION Ascent(Scintilla::Font& _font) BX_OVERRIDE + virtual Scintilla::XYPOSITION Ascent(Scintilla::Font& _font) override { FontInt* fi = (FontInt*)_font.GetID(); return fi->m_font->Ascent * fi->m_scale; } - virtual Scintilla::XYPOSITION Descent(Scintilla::Font& _font) BX_OVERRIDE + virtual Scintilla::XYPOSITION Descent(Scintilla::Font& _font) override { FontInt* fi = (FontInt*)_font.GetID(); return -fi->m_font->Descent * fi->m_scale; } - virtual Scintilla::XYPOSITION InternalLeading(Scintilla::Font& /*_font*/) BX_OVERRIDE + virtual Scintilla::XYPOSITION InternalLeading(Scintilla::Font& /*_font*/) override { return 0; } - virtual Scintilla::XYPOSITION ExternalLeading(Scintilla::Font& /*_font*/) BX_OVERRIDE + virtual Scintilla::XYPOSITION ExternalLeading(Scintilla::Font& /*_font*/) override { return 0; } - virtual Scintilla::XYPOSITION Height(Scintilla::Font& _font) BX_OVERRIDE + virtual Scintilla::XYPOSITION Height(Scintilla::Font& _font) override { return Ascent(_font) + Descent(_font); } - virtual Scintilla::XYPOSITION AverageCharWidth(Scintilla::Font& _font) BX_OVERRIDE + virtual Scintilla::XYPOSITION AverageCharWidth(Scintilla::Font& _font) override { return WidthChar(_font, 'n'); } - virtual void SetClip(Scintilla::PRectangle /*_rc*/) BX_OVERRIDE + virtual void SetClip(Scintilla::PRectangle /*_rc*/) override { } - virtual void FlushCachedState() BX_OVERRIDE + virtual void FlushCachedState() override { } - virtual void SetUnicodeMode(bool /*_unicodeMode*/) BX_OVERRIDE + virtual void SetUnicodeMode(bool /*_unicodeMode*/) override { } - virtual void SetDBCSMode(int /*_codePage*/) BX_OVERRIDE + virtual void SetDBCSMode(int /*_codePage*/) override { } @@ -350,11 +350,11 @@ public: { } - virtual void SetFont(Scintilla::Font& /*_font*/) BX_OVERRIDE + virtual void SetFont(Scintilla::Font& /*_font*/) override { } - virtual void Create(Scintilla::Window& /*_parent*/, int /*_ctrlID*/, Scintilla::Point _location, int _lineHeight, bool _unicodeMode, int /*_technology*/) BX_OVERRIDE + virtual void Create(Scintilla::Window& /*_parent*/, int /*_ctrlID*/, Scintilla::Point _location, int _lineHeight, bool _unicodeMode, int /*_technology*/) override { m_location = _location; m_lineHeight = _lineHeight; @@ -363,22 +363,22 @@ public: wid = Scintilla::WindowID(4); } - virtual void SetAverageCharWidth(int width) BX_OVERRIDE + virtual void SetAverageCharWidth(int width) override { m_aveCharWidth = width; } - virtual void SetVisibleRows(int rows) BX_OVERRIDE + virtual void SetVisibleRows(int rows) override { m_desiredVisibleRows = rows; } - virtual int GetVisibleRows() const BX_OVERRIDE + virtual int GetVisibleRows() const override { return m_desiredVisibleRows; } - virtual Scintilla::PRectangle GetDesiredRect() BX_OVERRIDE + virtual Scintilla::PRectangle GetDesiredRect() override { Scintilla::PRectangle rc; rc.top = 0; @@ -388,60 +388,60 @@ public: return rc; } - virtual int CaretFromEdge() BX_OVERRIDE + virtual int CaretFromEdge() override { return 4 + 16; } - virtual void Clear() BX_OVERRIDE + virtual void Clear() override { } - virtual void Append(char* /*s*/, int /*type = -1*/) BX_OVERRIDE + virtual void Append(char* /*s*/, int /*type = -1*/) override { } - virtual int Length() BX_OVERRIDE + virtual int Length() override { return 0; } - virtual void Select(int /*n*/) BX_OVERRIDE + virtual void Select(int /*n*/) override { } - virtual int GetSelection() BX_OVERRIDE + virtual int GetSelection() override { return 0; } - virtual int Find(const char* /*prefix*/) BX_OVERRIDE + virtual int Find(const char* /*prefix*/) override { return 0; } - virtual void GetValue(int /*n*/, char* value, int /*len*/) BX_OVERRIDE + virtual void GetValue(int /*n*/, char* value, int /*len*/) override { value[0] = '\0'; } - virtual void RegisterImage(int /*type*/, const char* /*xpm_data*/) BX_OVERRIDE + virtual void RegisterImage(int /*type*/, const char* /*xpm_data*/) override { } - virtual void RegisterRGBAImage(int /*type*/, int /*width*/, int /*height*/, const unsigned char* /*pixelsImage*/) BX_OVERRIDE + virtual void RegisterRGBAImage(int /*type*/, int /*width*/, int /*height*/, const unsigned char* /*pixelsImage*/) override { } - virtual void ClearRegisteredImages() BX_OVERRIDE + virtual void ClearRegisteredImages() override { } - virtual void SetDoubleClickAction(Scintilla::CallBackAction, void*) BX_OVERRIDE + virtual void SetDoubleClickAction(Scintilla::CallBackAction, void*) override { } - virtual void SetList(const char* /*list*/, char /*separator*/, char /*typesep*/) BX_OVERRIDE + virtual void SetList(const char* /*list*/, char /*separator*/, char /*typesep*/) override { } @@ -499,7 +499,7 @@ public: { } - virtual void Initialise() BX_OVERRIDE + virtual void Initialise() override { wMain = AllocateWindowInt(); @@ -560,7 +560,7 @@ public: CaretSetPeriod(0); } - virtual void CreateCallTipWindow(Scintilla::PRectangle /*_rc*/) BX_OVERRIDE + virtual void CreateCallTipWindow(Scintilla::PRectangle /*_rc*/) override { if (!ct.wCallTip.Created() ) { @@ -569,7 +569,7 @@ public: } } - virtual void AddToPopUp(const char* /*_label*/, int /*_cmd*/, bool /*_enabled*/) BX_OVERRIDE + virtual void AddToPopUp(const char* /*_label*/, int /*_cmd*/, bool /*_enabled*/) override { } @@ -581,16 +581,16 @@ public: wMain.SetPosition(Scintilla::PRectangle::FromInts(0, 0, m_width, m_height) ); } - virtual void SetVerticalScrollPos() BX_OVERRIDE + virtual void SetVerticalScrollPos() override { } - virtual void SetHorizontalScrollPos() BX_OVERRIDE + virtual void SetHorizontalScrollPos() override { xOffset = 0; } - virtual bool ModifyScrollBars(int /*nMax*/, int /*nPage*/) BX_OVERRIDE + virtual bool ModifyScrollBars(int /*nMax*/, int /*nPage*/) override { return false; } @@ -599,37 +599,37 @@ public: { } - virtual void Copy() BX_OVERRIDE + virtual void Copy() override { } - virtual void Paste() BX_OVERRIDE + virtual void Paste() override { } - virtual void NotifyChange() BX_OVERRIDE + virtual void NotifyChange() override { } - virtual void NotifyParent(Scintilla::SCNotification /*scn*/) BX_OVERRIDE + virtual void NotifyParent(Scintilla::SCNotification /*scn*/) override { } - virtual void CopyToClipboard(const Scintilla::SelectionText& /*selectedText*/) BX_OVERRIDE + virtual void CopyToClipboard(const Scintilla::SelectionText& /*selectedText*/) override { } - virtual void SetMouseCapture(bool /*on*/) BX_OVERRIDE + virtual void SetMouseCapture(bool /*on*/) override { } - virtual bool HaveMouseCapture() BX_OVERRIDE + virtual bool HaveMouseCapture() override { return false; } - virtual sptr_t DefWndProc(unsigned int /*iMessage*/, uptr_t /*wParam*/, sptr_t /*lParam*/) BX_OVERRIDE + virtual sptr_t DefWndProc(unsigned int /*iMessage*/, uptr_t /*wParam*/, sptr_t /*lParam*/) override { return 0; } diff --git a/3rdparty/bgfx/examples/common/imgui/scintilla.h b/3rdparty/bgfx/examples/common/imgui/scintilla.h index d555d5f..c575a5f 100644 --- a/3rdparty/bgfx/examples/common/imgui/scintilla.h +++ b/3rdparty/bgfx/examples/common/imgui/scintilla.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE */ diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h index 511d842..115cf1d 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_imgui_color_glsl[324] = { - 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie + 0x56, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x24, 0x01, 0x00, 0x00, 0x61, // wProj......$...a 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, // ec4 a_color0;.at @@ -22,240 +22,236 @@ static const uint8_t vs_imgui_color_glsl[324] = 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, // or0 = a_color0;. 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t vs_imgui_color_spv[2782] = +static const uint8_t vs_imgui_color_spv[2716] = { - 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0xc0, 0x0a, 0x03, 0x02, 0x23, // wProj..........# - 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // .........Ta..... - 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ - 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... - 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... - 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, 0x0f, 0x00, // ................ - 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... - 0x00, 0x05, 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, // .....8...Output. - 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, // .....8.......gl_ - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, // Position.....8.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, // .....v_color0... - 0x00, 0x05, 0x00, 0x06, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, // .........@main(v - 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xf5, 0x48, 0x00, // f4;vf3;.......H. - 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .a_color0....... - 0x00, 0x2c, 0x47, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // .,G..a_position. - 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // ........._varyin - 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x24, 0x47, 0x6c, // g_.......;...$Gl - 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, // obal.....;...... - 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, // .u_viewRect..... - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, // .;.......u_viewT - 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, // exel.....;...... - 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, // .u_view......;.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, // .....u_invView.. - 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, // .....;.......u_p - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, // roj......;...... - 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, // .u_invProj...... - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .;.......u_viewP - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, // roj......;...... - 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // .u_invViewProj.. - 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .....;.......u_m - 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // odel.....;...... - 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, // .u_modelView.... - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .;.......u_model - 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, // ViewProj.....;.. - 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, // .....u_alphaRef4 - 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .....B.......... - 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, // ..A..a_color0... - 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // .........a_color - 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, // 0........,?..a_p - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, // osition......... - 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, // .a_position..... - 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, // .....flattenTemp - 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......U..param.. - 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .........param.. - 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, // .........@entryP - 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // ointOutput_gl_Po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf9, 0x03, 0x00, // sition.......... - 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xf9, 0x03, 0x00, // .Output......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, // .....v_color0... - 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, // .........@entryP - 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // ointOutput...G.. - 0x00, 0x94, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .........@...H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .;.......#...... - 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...;.......#.. - 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, // .....H...;...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, // .....H...;...... - 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, // .#... ...H...;.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .;...........H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, // .;.......#...`.. - 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...;.......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H...;...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H...;...... - 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, // .#.......H...;.. - 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .;...........H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, // .;.......#...... - 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...;.......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, // .....H...;...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, // .....H...;...... - 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, // .#... ...H...;.. - 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .;...........H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, // .;.......#...`.. - 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...;.......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H...;...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H...;...... - 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, // .#.......H...;.. - 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .;...........H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, // .;.......#...... - 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...;.......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H...;...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H...;...... - 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, // .#.......H...;.. - 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, // .;.......#... .. - 0x00, 0x47, 0x00, 0x03, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .G...;.......G.. - 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .B...".......G.. - 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. - 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. - 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. - 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, // ................ - 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, // .....!.......... - 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, // ......... ...... - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. - 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, // ................ - 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. - 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, // ................ - 0x00, 0x38, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, // .8...........!.. - 0x00, 0xc6, 0x07, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, // .....8.......... - 0x00, 0x20, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, // . ...........8.. - 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ......... ...... - 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, // .+.............. - 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, // .+.............. - 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // ?+.............. - 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, // .,.............. - 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. - 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, // ................ - 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, // ................ - 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // .e.............. - 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. - 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // .....j... ...... - 0x00, 0x94, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, // .....e...j...... - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .;...........e.. - 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. - 0x00, 0x65, 0x00, 0x00, 0x00, 0x94, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.......e...e.. - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... .......... - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x42, 0x13, 0x00, // .;...;.......B.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, // .....+.......... - 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... .......... - 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, // .e... .......... - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, // .....;.......... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, // ..... .......... - 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, // .....;.......... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ..... .......... - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, // .....;.......... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, // ................ - 0x00, 0x20, 0x00, 0x04, 0x00, 0x76, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf9, 0x03, 0x00, // . ...v.......... - 0x00, 0x3b, 0x00, 0x04, 0x00, 0x76, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, 0x00, // .;...v.......... - 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. - 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, // .........Sa..;.. - 0x00, 0xb5, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. - 0x00, 0x9a, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // ......U......;.. - 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, // .............=.. - 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......A......=.. - 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, // .....,?......>.. - 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, // ..U...A..>...... - 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, // .,?..9...8...I&. - 0x00, 0x0e, 0x0c, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......U......>.. - 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, // .....I&..A...... - 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .T4..........=.. - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, // .........T4..>.. - 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, // .........A...... - 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .'A..........=.. - 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x41, 0x00, 0x05, // .........'A..A.. - 0x00, 0x9c, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0b, 0x0a, 0x00, // ................ - 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, // .>.............. - 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x38, 0x04, 0x00, 0x00, 0x0e, 0x0c, 0x00, // .8...6...8...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // .........7...... - 0x00, 0xf5, 0x48, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2c, 0x47, 0x00, // ..H..7.......,G. - 0x00, 0xf8, 0x00, 0x02, 0x00, 0x51, 0x1d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, // .....Q...;...... - 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, // .........A...... - 0x00, 0x50, 0x24, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, // .P$..........>.. - 0x00, 0x50, 0x24, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .P$......=...... - 0x00, 0x81, 0x29, 0x00, 0x00, 0x2c, 0x47, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, // ..)..,G..O...... - 0x00, 0x2f, 0x40, 0x00, 0x00, 0x81, 0x29, 0x00, 0x00, 0x81, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, // ./@...)...)..... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6e, 0x59, 0x00, // .....Q.......nY. - 0x00, 0x2f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ./@......Q...... - 0x00, 0x4f, 0x5d, 0x00, 0x00, 0x2f, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, // .O]../@......P.. - 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf5, 0x42, 0x00, 0x00, 0x6e, 0x59, 0x00, 0x00, 0x4f, 0x5d, 0x00, // ......B..nY..O]. - 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, // .........A...... - 0x00, 0x61, 0x23, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .a#..B.......=.. - 0x00, 0x65, 0x00, 0x00, 0x00, 0x2b, 0x34, 0x00, 0x00, 0x61, 0x23, 0x00, 0x00, 0x90, 0x00, 0x05, // .e...+4..a#..... - 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd7, 0x32, 0x00, 0x00, 0xf5, 0x42, 0x00, 0x00, 0x2b, 0x34, 0x00, // ......2...B..+4. - 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x97, 0x2f, 0x00, 0x00, 0x0f, 0x12, 0x00, // .A......../..... - 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x2f, 0x00, 0x00, 0xd7, 0x32, 0x00, // .....>..../...2. - 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8e, 0x31, 0x00, 0x00, 0xf5, 0x48, 0x00, // .=........1...H. - 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9e, 0x4c, 0x00, 0x00, 0x0f, 0x12, 0x00, // .A........L..... - 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9e, 0x4c, 0x00, 0x00, 0x8e, 0x31, 0x00, // .....>....L...1. - 0x00, 0x3d, 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x30, 0x19, 0x00, 0x00, 0x0f, 0x12, 0x00, // .=...8...0...... - 0x00, 0xfe, 0x00, 0x02, 0x00, 0x30, 0x19, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .....0...8.... + 0x56, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x7c, 0x0a, 0x00, 0x00, 0x03, // wProj......|.... + 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, // .#.........Ta... + 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, // ................ + 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, // ...GLSL.std.450. + 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, // ...........main. + 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x76, // ...............v + 0x13, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, // ................ + 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, // .......main..... + 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, // ...8...Output... + 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // ...8.......gl_Po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x01, // sition.....8.... + 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, // ...v_color0..... + 0x00, 0x06, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, // .......@main(vf4 + 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x61, // ;vf3;.......H..a + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, // _color0........, + 0x47, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, // G..a_position... + 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, // ......._varying_ + 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, // .......;...$Glob + 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, // al.....;.......u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, // _viewRect......; + 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, // .......u_viewTex + 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, // el.....;.......u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, // _view......;.... + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, // ...u_invView.... + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, // ...;.......u_pro + 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, // j......;.......u + 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, // _invProj.......; + 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // .......u_viewPro + 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, // j......;.......u + 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, // _invViewProj.... + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // ...;.......u_mod + 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, // el.....;.......u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3b, // _modelView.....; + 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // .......u_modelVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0b, // ewProj.....;.... + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, // ...u_alphaRef4.. + 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, // ...B............ + 0x41, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, // A..a_color0..... + 0x00, 0x05, 0x00, 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, // .......a_color0. + 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, // .......,?..a_pos + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, // ition..........a + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, // _position....... + 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, // ...flattenTemp.. + 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, // ....U..param.... + 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, // .......param.... + 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, // .......@entryPoi + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, // ntOutput.gl_Posi + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0x76, 0x13, 0x00, 0x00, 0x40, // tion.......v...@ + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // entryPointOutput + 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x94, // .v_color0..G.... + 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // .......@...H...; + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, // .......#.......H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, // ...;.......#.... + 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, // ...H...;........ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, // ...H...;.......# + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, // ... ...H...;.... + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, // ...........H...; + 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // ...........H...; + 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, // .......#...`...H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ...;............ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, // ...H...;........ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, // ...H...;.......# + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, // .......H...;.... + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, // ...........H...; + 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // ...........H...; + 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, // .......#.......H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ...;............ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, // ...H...;........ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, // ...H...;.......# + 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, // ... ...H...;.... + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, // ...........H...; + 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // ...........H...; + 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, // .......#...`...H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ...;............ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, // ...H...;........ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, // ...H...;.......# + 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, // .......H...;.... + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, // ...........H...; + 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // ...........H...; + 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, // .......#.......H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ...;............ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, // ...H...;........ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, // ...H...;.......# + 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, // .......H...;.... + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // ...........H...; + 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, // .......#... ...G + 0x00, 0x03, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, // ...;.......G...B + 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, // ...".......G.... + 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, // ...........G.... + 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, // ...........G.... + 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x76, // ...........G...v + 0x13, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, // ................ + 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, // ...!............ + 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, // ....... ........ + 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, // ........... .... + 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, // ................ + 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, // ........... .... + 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x38, // ...............8 + 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xc6, // ...........!.... + 0x07, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, // ...8........... + 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x38, 0x04, 0x00, 0x00, 0x15, // ...........8.... + 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, // ....... .......+ + 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, // ...............+ + 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, // ..............?+ + 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, // ..............., + 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x0c, // ................ + 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, // ...........+.... + 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, // ................ + 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, // ...............e + 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, // ................ + 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, // ... .......+.... + 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x94, // ...j... ........ + 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x3b, // ...e...j.......; + 0x06, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // ...........e...e + 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // ...e...e...e...e + 0x00, 0x00, 0x00, 0x94, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, // .......e...e.... + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3b, // ... ...........; + 0x06, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, // ...;.......B.... + 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x06, // ...+............ + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, // ... ...........e + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, // ... ............ + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x01, // ...;............ + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, // ... ............ + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, // ...;............ + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, // ... ............ + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x03, // ...;............ + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x03, // ...;.......v.... + 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, // ...6............ + 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, // ...........Sa..; + 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, // ...............; + 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, // ........U......; + 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, // ...............= + 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x3d, // ........A......= + 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3e, // .......,?......> + 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, // ....U...A..>.... + 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x38, 0x04, 0x00, 0x00, 0x49, // ...,?..9...8...I + 0x26, 0x00, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, // &.......U......> + 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, // .......I&..A.... + 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, // ...T4..........= + 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, // ...........T4..> + 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, // ...........A.... + 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, // ....@..........= + 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x3e, // ........-...@..> + 0x00, 0x03, 0x00, 0x76, 0x13, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, // ...v....-......8 + 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x38, 0x04, 0x00, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0x00, // ...6...8........ + 0x00, 0x00, 0x00, 0xc6, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xf5, // .......7........ + 0x48, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2c, 0x47, 0x00, 0x00, 0xf8, // H..7.......,G... + 0x00, 0x02, 0x00, 0x51, 0x1d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb5, 0x06, 0x00, 0x00, 0x0f, // ...Q...;........ + 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x50, // .......A.......P + 0x24, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x50, // $..........>...P + 0x24, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x81, // $......=........ + 0x29, 0x00, 0x00, 0x2c, 0x47, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x2f, // )..,G..O......./ + 0x40, 0x00, 0x00, 0x81, 0x29, 0x00, 0x00, 0x81, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // @...)...)....... + 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6e, 0x59, 0x00, 0x00, 0x2f, // ...Q.......nY../ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x4f, // @......Q.......O + 0x5d, 0x00, 0x00, 0x2f, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, // ]../@......P.... + 0x00, 0x00, 0x00, 0xf5, 0x42, 0x00, 0x00, 0x6e, 0x59, 0x00, 0x00, 0x4f, 0x5d, 0x00, 0x00, 0x0c, // ....B..nY..O]... + 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x61, // .......A.......a + 0x23, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, // #..B.......=...e + 0x00, 0x00, 0x00, 0x2b, 0x34, 0x00, 0x00, 0x61, 0x23, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, // ...+4..a#....... + 0x00, 0x00, 0x00, 0xd7, 0x32, 0x00, 0x00, 0xf5, 0x42, 0x00, 0x00, 0x2b, 0x34, 0x00, 0x00, 0x41, // ....2...B..+4..A + 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x97, 0x2f, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, // ......../....... + 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x2f, 0x00, 0x00, 0xd7, 0x32, 0x00, 0x00, 0x3d, // ...>..../...2..= + 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8e, 0x31, 0x00, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x41, // ........1...H..A + 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9e, 0x4c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, // ........L....... + 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9e, 0x4c, 0x00, 0x00, 0x8e, 0x31, 0x00, 0x00, 0x3d, // ...>....L...1..= + 0x00, 0x04, 0x00, 0x38, 0x04, 0x00, 0x00, 0x30, 0x19, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, // ...8...0........ + 0x00, 0x02, 0x00, 0x30, 0x19, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ...0...8.... }; -static const uint8_t vs_imgui_color_dx9[282] = +static const uint8_t vs_imgui_color_dx9[284] = { - 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0xfc, 0x00, 0x00, 0x03, 0xfe, // wProj........... - 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ... .CTAB....S.. - 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ - 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP - 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // roj............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // 0.1............. - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, // ...U............ - 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ................ - 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, // ................ - 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... + 0x56, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, // wProj........... + 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, // ..... .CTAB....S + 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, // ...L...0........ + 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...<.......u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, // wProj........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......vs_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, // 10.1........... + 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, // ................ + 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, // ................ + 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, // .....U.......... + 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ + 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............ }; -static const uint8_t vs_imgui_color_dx11[465] = +static const uint8_t vs_imgui_color_dx11[467] = { - 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0xac, 0x01, 0x44, 0x58, 0x42, // wProj........DXB - 0x43, 0xbc, 0xb2, 0x28, 0xa7, 0xd2, 0xab, 0xc3, 0x2f, 0xa4, 0xe4, 0xbc, 0x67, 0xff, 0xa4, 0xcf, // C..(..../...g... - 0x66, 0x01, 0x00, 0x00, 0x00, 0xac, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // f............,.. - 0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x00, 0x00, // .|.......ISGNH.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........8...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, // ................ - 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .>.............. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, // .........COLOR.P - 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, // OSITION..OSGNL.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........8...... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ - 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .D.............. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, // .........SV_POSI - 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, // TION.COLOR...SHD - 0x52, 0xd4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x35, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, // R....@...5...Y.. - 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, // .F. ........._.. - 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, // ........._...2.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....g.... ..... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, // .....e.... ..... - 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, // .h.......8...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .....V.......F. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, // .........2...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....F. ........ - 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, // .........F...... - 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, // ...... ......F.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .....F. ........ - 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, // .6.... ......F.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x05, 0x00, 0x01, 0x00, 0x40, // .....>.........@ - 0x00, // . + 0x56, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0xac, 0x01, 0x00, 0x00, 0x44, // wProj..........D + 0x58, 0x42, 0x43, 0xbc, 0xb2, 0x28, 0xa7, 0xd2, 0xab, 0xc3, 0x2f, 0xa4, 0xe4, 0xbc, 0x67, 0xff, // XBC..(..../...g. + 0xa4, 0xcf, 0x66, 0x01, 0x00, 0x00, 0x00, 0xac, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, // ..f............, + 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x48, // ...|.......ISGNH + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, // ...........8.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x0f, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...>............ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, // ...........COLOR + 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x4c, // .POSITION..OSGNL + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, // ...........8.... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...D............ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, // ...........SV_PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x53, // SITION.COLOR...S + 0x48, 0x44, 0x52, 0xd4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x35, 0x00, 0x00, 0x00, 0x59, // HDR....@...5...Y + 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, // ...F. ........._ + 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, // ..........._...2 + 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......g.... ... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, // .......e.... ... + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, // ...h.......8.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // .......V.......F + 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, // . .........2.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......F. ...... + 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, // ...........F.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ........ ......F + 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // .......F. ...... + 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F + 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x05, 0x00, 0x01, // .......>........ + 0x00, 0x40, 0x00, // .@. }; static const uint8_t vs_imgui_color_mtl[674] = { - 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie + 0x56, 0x53, 0x48, 0x05, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x82, 0x02, 0x00, 0x00, 0x75, // wProj..........u 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, // sing namespace m 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, // etal;.struct xla diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.sc b/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.sc index f5c42aa..9c2eb59 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.sc +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.sc @@ -2,7 +2,7 @@ $input a_position, a_color0 $output v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h index c381c7b..b039656 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_imgui_cubemap_glsl[329] = { - 0x56, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod + 0x56, 0x53, 0x48, 0x05, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x24, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // $...attribute hi 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, // ghp vec4 a_norma @@ -22,246 +22,242 @@ static const uint8_t vs_imgui_cubemap_glsl[329] = 0x72, 0x6d, 0x61, 0x6c, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x2e, // rmal = a_normal. 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // xyz;.}... }; -static const uint8_t vs_imgui_cubemap_spv[2807] = +static const uint8_t vs_imgui_cubemap_spv[2741] = { - 0x56, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod + 0x56, 0x53, 0x48, 0x05, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... - 0xd4, 0x0a, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x54, 0x61, // ....#.........Ta - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ - 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 - 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. - 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x46, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0xd8, 0x0c, // in....F......... - 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x29, 0x04, 0x00, 0x00, 0x4f, 0x75, // in........)...Ou - 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x29, 0x04, 0x00, 0x00, 0x00, 0x00, // tput......)..... - 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, // ..gl_Position... - 0x06, 0x00, 0x29, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, // ..).......v_norm - 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0x40, 0x6d, // al............@m - 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, // ain(vf4;vf3;.... - 0x05, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x61, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, // ...H..a_normal.. - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x47, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ......,G..a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, // tion.........._v - 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x99, 0x02, // arying_......... - 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, // ..$Global....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, // ......u_viewRect - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, // viewTexel....... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, // ......u_view.... - 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV - 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x04, 0x00, // iew............. - 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, // ..u_proj........ - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, // ......u_invProj. - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x99, 0x02, // viewProj........ - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, // ......u_invViewP - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x08, 0x00, // roj............. - 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, // ..u_model....... - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie - 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, // w.............u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, // modelViewProj... - 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, // ..........u_alph - 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, // aRef4.....B..... - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, // .......A..a_norm - 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x46, 0x14, 0x00, 0x00, 0x61, 0x5f, // al........F...a_ - 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, // normal........,? - 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, // ..a_position.... - 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // ......a_position - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, // ..........flatte - 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, // nTemp......U..pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, // ram...........pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, // ram...........@e - 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, // ntryPointOutput_ - 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, // gl_Position..... - 0x04, 0x00, 0xef, 0x03, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, // ......Output.... - 0x06, 0x00, 0xef, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, // ..........v_norm - 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x40, 0x65, // al............@e - 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, // ntryPointOutput. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x37, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, // ..G...7.......@. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x01, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, // ..#.......H..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. - 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, // ..`...H......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, // ......H......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. - 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, // ..`...H......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, // ......H......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, // ..........H..... - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x99, 0x02, 0x00, 0x00, 0x02, 0x00, // .. ...G......... - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G...B..."..... - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x46, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G...F......... - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, // ..G............. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. - 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, // ..........!..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, // .. ............. - 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x29, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x18, 0x00, // ......)......... - 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xa8, 0x07, 0x00, 0x00, 0x29, 0x04, 0x00, 0x00, 0x9a, 0x02, // ..!.......)..... - 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xa6, 0x06, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x29, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, // ..)........... . - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, // ......+......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, // ......+......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, // ......+......... - 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x72, 0x02, // .....?,.......r. - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. - 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, // ................ - 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, // ..e............. - 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. - 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, // ......j... ..... - 0x04, 0x00, 0x37, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, // ..7...e...j..... - 0x0e, 0x00, 0x99, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, // ..............e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x37, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...7...e...e. - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x05, 0x00, 0x00, 0x02, 0x00, // ...... ......... - 0x00, 0x00, 0x99, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x16, 0x05, 0x00, 0x00, 0x42, 0x13, // ......;.......B. - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, // ......+.......). - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, // ...... ......... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, // ..e... ......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x46, 0x14, // ......;.......F. - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, // ......;......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd8, 0x0c, // ......;......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0xef, 0x03, 0x00, 0x00, 0x18, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x6c, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xef, 0x03, // .. ...l......... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x6c, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, // ..;...l......... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, // .. ............. - 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, // ..6............. - 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, // ..........Sa..;. - 0x04, 0x00, 0xa6, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. - 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......U......;. - 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x46, 0x14, 0x00, 0x00, 0x3d, 0x00, // .......A..F...=. - 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3e, 0x00, // ......,?......>. - 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, // ...U...A..>..... - 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x29, 0x04, 0x00, 0x00, 0x49, 0x26, // ..,?..9...)...I& - 0x00, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, // .......U......>. - 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ......I&..A..... - 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..T4..........=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, // ..........T4..>. - 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, // ..........A..... - 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..'A..........=. - 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x41, 0x00, // ..........'A..A. - 0x05, 0x00, 0x97, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0b, 0x0a, // ................ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0xfd, 0x00, // ..>............. - 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x29, 0x04, 0x00, 0x00, 0x0e, 0x0c, // ..8...6...)..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, // ..........7..... - 0x00, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2c, 0x47, // ...H..7.......,G - 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x51, 0x1d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xa6, 0x06, // ......Q...;..... - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, // ..........A..... - 0x00, 0x00, 0x50, 0x24, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ..P$..........>. - 0x03, 0x00, 0x50, 0x24, 0x00, 0x00, 0x72, 0x02, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, // ..P$..r...=..... - 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, 0x2c, 0x47, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..'(..,G..Q..... - 0x00, 0x00, 0xac, 0x4a, 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, // ...J..'(......Q. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x7c, 0x57, 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, 0x01, 0x00, // ......|W..'(.... - 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1d, 0x19, 0x00, 0x00, 0x27, 0x28, // ..Q...........'( - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf5, 0x42, // ......P........B - 0x00, 0x00, 0xac, 0x4a, 0x00, 0x00, 0x7c, 0x57, 0x00, 0x00, 0x1d, 0x19, 0x00, 0x00, 0x8a, 0x00, // ...J..|W........ - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x61, 0x23, 0x00, 0x00, 0x42, 0x13, // ..A.......a#..B. - 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x2b, 0x34, // ..)...=...e...+4 - 0x00, 0x00, 0x61, 0x23, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd7, 0x32, // ..a#...........2 - 0x00, 0x00, 0xf5, 0x42, 0x00, 0x00, 0x2b, 0x34, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ...B..+4..A..... - 0x00, 0x00, 0x97, 0x2f, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, // .../..........>. - 0x03, 0x00, 0x97, 0x2f, 0x00, 0x00, 0xd7, 0x32, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // .../...2..=..... - 0x00, 0x00, 0x51, 0x28, 0x00, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, // ..Q(...H..O..... - 0x00, 0x00, 0x96, 0x49, 0x00, 0x00, 0x51, 0x28, 0x00, 0x00, 0x51, 0x28, 0x00, 0x00, 0x00, 0x00, // ...I..Q(..Q(.... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, // ..........A..... - 0x00, 0x00, 0x73, 0x5b, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ..s[..........>. - 0x03, 0x00, 0x73, 0x5b, 0x00, 0x00, 0x96, 0x49, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x29, 0x04, // ..s[...I..=...). - 0x00, 0x00, 0x30, 0x19, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x30, 0x19, // ..0...........0. - 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..8.... + 0x90, 0x0a, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, // ......#......... + 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // Ta.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x46, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // main....F....... + 0x95, 0x15, 0x00, 0x00, 0x33, 0x13, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, // ....3........... + 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, // ............main + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x29, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, // ........)...Outp + 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x29, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ut......)....... + 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, // gl_Position..... + 0x29, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, // ).......v_normal + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // ............@mai + 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // n(vf4;vf3;...... + 0xf5, 0x48, 0x00, 0x00, 0x61, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, // .H..a_normal.... + 0x05, 0x00, 0x05, 0x00, 0x2c, 0x47, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // ....,G..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, // on.........._var + 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // ying_........... + 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, // $Global......... + 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, // ....u_viewRect.. + 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ewTexel......... + 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_view...... + 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ........u_invVie + 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // w............... + 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, // u_proj.......... + 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // ....u_invProj... + 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x99, 0x02, 0x00, 0x00, // ewProj.......... + 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ....u_invViewPro + 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // j............... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x99, 0x02, 0x00, 0x00, // u_model......... + 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, // ....u_modelView. + 0x06, 0x00, 0x07, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, // delViewProj..... + 0x99, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, // ........u_alphaR + 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ef4.....B....... + 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, // .....A..a_normal + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x46, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x6e, 0x6f, // ........F...a_no + 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, // rmal........,?.. + 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_position...... + 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, // ....a_position.. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x33, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // 3...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x00, 0x00, // utput.v_normal.. + 0x47, 0x00, 0x04, 0x00, 0x37, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // G...7.......@... + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....H........... + 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // #.......H....... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... + 0x99, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // `...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x99, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... + 0x99, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // `...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x99, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, // ........H....... + 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x99, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x05, 0x00, 0x99, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x99, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...G........... + 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...B..."....... + 0x47, 0x00, 0x04, 0x00, 0x46, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...F........... + 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // G............... + 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G............... + 0x47, 0x00, 0x04, 0x00, 0x33, 0x13, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...3........... + 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, // ........!....... + 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... + 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... + 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... + 0x1e, 0x00, 0x04, 0x00, 0x29, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ....)........... + 0x21, 0x00, 0x05, 0x00, 0xa8, 0x07, 0x00, 0x00, 0x29, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, // !.......)....... + 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xa6, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x29, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // )........... ... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x80, 0x3f, 0x2c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x72, 0x02, 0x00, 0x00, // ...?,.......r... + 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ + 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... + 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... + 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... + 0x37, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // 7...e...j....... + 0x99, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x65, 0x00, 0x00, 0x00, 0x37, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...7...e...e... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x99, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x16, 0x05, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // ....;.......B... + 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, // ....+.......)... + 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // e... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x46, 0x14, 0x00, 0x00, // ....;.......F... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0x33, 0x13, 0x00, 0x00, // ....;.......3... + 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. + 0x3b, 0x00, 0x04, 0x00, 0xa6, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... + 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x46, 0x14, 0x00, 0x00, // =........A..F... + 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // =.......,?...... + 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....U...A..>... + 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x29, 0x04, 0x00, 0x00, // ....,?..9...)... + 0x49, 0x26, 0x00, 0x00, 0x0e, 0x0c, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // I&.......U...... + 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >.......I&..A... + 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....T4.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, // =...........T4.. + 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...........A... + 0x95, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // =........-...@.. + 0x3e, 0x00, 0x03, 0x00, 0x33, 0x13, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >...3....-...... + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x29, 0x04, 0x00, 0x00, 0x0e, 0x0c, 0x00, 0x00, // 8...6...)....... + 0x00, 0x00, 0x00, 0x00, 0xa8, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........7....... + 0xf5, 0x48, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2c, 0x47, 0x00, 0x00, // .H..7.......,G.. + 0xf8, 0x00, 0x02, 0x00, 0x51, 0x1d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xa6, 0x06, 0x00, 0x00, // ....Q...;....... + 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, // ........A....... + 0x50, 0x24, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // P$..........>... + 0x50, 0x24, 0x00, 0x00, 0x72, 0x02, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // P$..r...=....... + 0x27, 0x28, 0x00, 0x00, 0x2c, 0x47, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // '(..,G..Q....... + 0xac, 0x4a, 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // .J..'(......Q... + 0x0d, 0x00, 0x00, 0x00, 0x7c, 0x57, 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....|W..'(...... + 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1d, 0x19, 0x00, 0x00, 0x27, 0x28, 0x00, 0x00, // Q...........'(.. + 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf5, 0x42, 0x00, 0x00, // ....P........B.. + 0xac, 0x4a, 0x00, 0x00, 0x7c, 0x57, 0x00, 0x00, 0x1d, 0x19, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // .J..|W.......... + 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x61, 0x23, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A.......a#..B... + 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x2b, 0x34, 0x00, 0x00, // )...=...e...+4.. + 0x61, 0x23, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd7, 0x32, 0x00, 0x00, // a#...........2.. + 0xf5, 0x42, 0x00, 0x00, 0x2b, 0x34, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, // .B..+4..A....... + 0x97, 0x2f, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ./..........>... + 0x97, 0x2f, 0x00, 0x00, 0xd7, 0x32, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ./...2..=....... + 0x51, 0x28, 0x00, 0x00, 0xf5, 0x48, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, // Q(...H..O....... + 0x96, 0x49, 0x00, 0x00, 0x51, 0x28, 0x00, 0x00, 0x51, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .I..Q(..Q(...... + 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, // ........A....... + 0x73, 0x5b, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // s[..........>... + 0x73, 0x5b, 0x00, 0x00, 0x96, 0x49, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x29, 0x04, 0x00, 0x00, // s[...I..=...)... + 0x30, 0x19, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x30, 0x19, 0x00, 0x00, // 0...........0... + 0x38, 0x00, 0x01, 0x00, 0x00, // 8.... }; -static const uint8_t vs_imgui_cubemap_dx9[311] = +static const uint8_t vs_imgui_cubemap_dx9[313] = { - 0x56, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod + 0x56, 0x53, 0x48, 0x05, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x14, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........!.CTAB.. - 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, // modelViewProj... - 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs - 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( - 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, // ompiler 10.1.... - 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x07, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ - 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0xe0, 0x00, 0x00, // ................ - 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... + 0x14, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, // ..........!.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, // Compiler 10.1.. + 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ + 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x07, 0xe0, // ................ + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, // ..............U. + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, // ................ + 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0xe0, // ................ + 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... }; -static const uint8_t vs_imgui_cubemap_dx11[510] = +static const uint8_t vs_imgui_cubemap_dx11[512] = { - 0x56, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod + 0x56, 0x53, 0x48, 0x05, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0xd4, 0x01, 0x44, 0x58, 0x42, 0x43, 0x6e, 0xf2, 0xe5, 0x72, 0xab, 0xb8, 0x0f, 0x91, 0xad, 0x8f, // ..DXBCn..r...... - 0x4c, 0xdf, 0x0e, 0x04, 0x3e, 0x81, 0x01, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x03, 0x00, // L...>........... - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...|.......IS - 0x47, 0x4e, 0x48, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, // GNH...........8. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x07, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......?......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x4e, 0x4f, // ..............NO - 0x52, 0x4d, 0x41, 0x4c, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, // RMAL.POSITION.OS - 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, // GNL...........8. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......D......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x53, 0x56, // ..............SV - 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, // _POSITION.NORMAL - 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0xfc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x3f, 0x00, // ..SHDR....@...?. - 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ..Y...F. ....... - 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, // .._...r......._. - 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, // ..r.......g.... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, // ..........e...r - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, // ......h.......8. - 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, // ..........V..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, // ..F. .........2. - 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..........F. ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, // ..............F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, // ..F. ........... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F......... - 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, // ..F. .........6. - 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x00, 0x00, // ..r ......F..... - 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x00, 0x40, 0x00, // ..>.........@. + 0xd4, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x6e, 0xf2, 0xe5, 0x72, 0xab, 0xb8, 0x0f, 0x91, // ....DXBCn..r.... + 0xad, 0x8f, 0x4c, 0xdf, 0x0e, 0x04, 0x3e, 0x81, 0x01, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, // ..L...>......... + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, // ....,...|....... + 0x49, 0x53, 0x47, 0x4e, 0x48, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNH........... + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // 8............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x07, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........?....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, // ................ + 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // NORMAL.POSITION. + 0x4f, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGNL........... + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // 8............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........D....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, // ................ + 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4e, 0x4f, 0x52, 0x4d, // SV_POSITION.NORM + 0x41, 0x4c, 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0xfc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // AL..SHDR....@... + 0x3f, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // ?...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._...r....... + 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, // _...r.......g... + 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, // . ..........e... + 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, // r ......h....... + 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, // 8...........V... + 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....F. ......... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // F.......2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....F. ......... + 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ..... ......F... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....F. ......... + 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, // 6...r ......F... + 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x02, 0x00, 0x01, 0x00, 0x40, 0x00, // ....>.........@. }; static const uint8_t vs_imgui_cubemap_mtl[677] = { - 0x56, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod + 0x56, 0x53, 0x48, 0x05, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x80, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // ....using namesp 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.sc b/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.sc index 7f68b53..d2cd924 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.sc +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.sc @@ -2,7 +2,7 @@ $input a_position, a_normal $output v_normal /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h index 67418cd..46ab955 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_imgui_image_glsl[336] = { - 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie + 0x56, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x30, 0x01, 0x00, 0x00, 0x61, // wProj......0...a 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, // ec3 a_position;. @@ -22,242 +22,238 @@ static const uint8_t vs_imgui_image_glsl[336] = 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x61, // v_texcoord0 = a 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _texcoord0;.}... }; -static const uint8_t vs_imgui_image_spv[2806] = +static const uint8_t vs_imgui_image_spv[2744] = { - 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd8, 0x0a, 0x03, 0x02, 0x23, // wProj..........# - 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x37, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, // .........7b..... - 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ - 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... - 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... - 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, 0x0f, 0x00, // ................ - 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... - 0x00, 0x05, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, // .........Output. - 0x00, 0x06, 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, // .............gl_ - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, // Position........ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // .....v_texcoord0 - 0x00, 0x05, 0x00, 0x06, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, // .........@main(v - 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa2, 0x3c, 0x00, // f3;vf2;.......<. - 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, // .a_position..... - 0x00, 0xc4, 0x1d, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // .....a_texcoord0 - 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // ........._varyin - 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x24, 0x47, 0x6c, // g_.......;...$Gl - 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, // obal.....;...... - 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, // .u_viewRect..... - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, // .;.......u_viewT - 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, // exel.....;...... - 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, // .u_view......;.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, // .....u_invView.. - 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, // .....;.......u_p - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, // roj......;...... - 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, // .u_invProj...... - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .;.......u_viewP - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, // roj......;...... - 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // .u_invViewProj.. - 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .....;.......u_m - 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // odel.....;...... - 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, // .u_modelView.... - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .;.......u_model - 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, // ViewProj.....;.. - 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, // .....u_alphaRef4 - 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .....B.......... - 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // ..A..a_position. - 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // .........a_posit - 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x74, // ion......,?..a_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, 0x00, // excoord0........ - 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, // .a_texcoord0.... - 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, // .....flattenTemp - 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......U..param.. - 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .........param.. - 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, // .........@entryP - 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // ointOutput_gl_Po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe5, 0x03, 0x00, // sition.......... - 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xe5, 0x03, 0x00, // .Output......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // .....v_texcoord0 - 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, // .........@entryP - 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // ointOutput...G.. - 0x00, 0x94, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .........@...H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .;.......#...... - 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...;.......#.. - 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, // .....H...;...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, // .....H...;...... - 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, // .#... ...H...;.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .;...........H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, // .;.......#...`.. - 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...;.......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H...;...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H...;...... - 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, // .#.......H...;.. - 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .;...........H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, // .;.......#...... - 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...;.......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, // .....H...;...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, // .....H...;...... - 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, // .#... ...H...;.. - 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .;...........H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, // .;.......#...`.. - 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...;.......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H...;...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H...;...... - 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, // .#.......H...;.. - 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .;...........H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, // .;.......#...... - 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...;.......... - 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H...;...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H...;...... - 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, // .#.......H...;.. - 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. - 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, // .;.......#... .. - 0x00, 0x47, 0x00, 0x03, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .G...;.......G.. - 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .B...".......G.. - 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. - 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. - 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. - 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, // ................ - 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, // .....!.......... - 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, // ......... ...... - 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. - 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, // ................ - 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. - 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, // ................ - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, // ................ - 0x00, 0x1a, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, // .............!.. - 0x00, 0x67, 0x07, 0x00, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, // .g.............. - 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1a, 0x04, 0x00, // . .............. - 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ......... ...... - 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, // .+.............. - 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // .+.............. - 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x0c, 0x0a, 0x00, // .,.............. - 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, // .....+.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, // .....+.......... - 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // ....?....e...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .....+.......j.. - 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x94, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, // . ...........e.. - 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x1d, 0x00, 0x00, // .j.......;...... - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .....e...e...e.. - 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x94, 0x02, 0x00, // .e...e...e...... - 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .e...e....... .. - 0x00, 0xb8, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x3b, 0x00, 0x04, // .........;...;.. - 0x00, 0xb8, 0x08, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .....B.......+.. - 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. - 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .........e... .. - 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. - 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. - 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. - 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. - 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. - 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. - 0x00, 0x9b, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, // ................ - 0x00, 0xe5, 0x03, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x62, 0x06, 0x00, // ......... ...b.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0xe5, 0x03, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x62, 0x06, 0x00, // .........;...b.. - 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, // ......... ...... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // .........6...... - 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, // ................ - 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, // .Sa..;.......... - 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, // .....;........U. - 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, // .....;.......... - 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, // .....=........A. - 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, // .....=.......,?. - 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, // .....>....U...A. - 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, // .>.......,?..9.. - 0x00, 0x1a, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0xab, 0x55, 0x00, // .....I&.......U. - 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, // .....>.......I&. - 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, // .A.......T4..... - 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, // .....=.......... - 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, // .T4..>.......... - 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, // .A.......'A..... - 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, // .....=.......... - 0x00, 0x27, 0x41, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x92, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, // .'A..A.......... - 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, // .........>...... - 0x00, 0xdf, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .........8...6.. - 0x00, 0x1a, 0x04, 0x00, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x07, 0x00, // .............g.. - 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xa2, 0x3c, 0x00, 0x00, 0x37, 0x00, 0x03, // .7........<..7.. - 0x00, 0x90, 0x02, 0x00, 0x00, 0xc4, 0x1d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x5f, 0x57, 0x00, // ............._W. - 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.............. - 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0x18, 0x2d, 0x00, 0x00, 0x0f, 0x12, 0x00, // .A........-..... - 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x2d, 0x00, 0x00, 0x1f, 0x07, 0x00, // .....>....-..... - 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x19, 0x00, 0x00, 0xa2, 0x3c, 0x00, // .=............<. - 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0xbe, 0x2f, 0x00, 0x00, 0x10, 0x19, 0x00, // .O......../..... - 0x00, 0x10, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, // .............Q.. - 0x00, 0x0d, 0x00, 0x00, 0x00, 0x36, 0x62, 0x00, 0x00, 0xbe, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, // .....6b.../..... - 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x98, 0x1b, 0x00, 0x00, 0xbe, 0x2f, 0x00, // .Q............/. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, // .....P........2. - 0x00, 0x36, 0x62, 0x00, 0x00, 0x98, 0x1b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, // .6b............. - 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, // .A.......),..B.. - 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, // .....=...e....<. - 0x00, 0x29, 0x2c, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, // .),...........;. - 0x00, 0x84, 0x32, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, // ..2...<..A...... - 0x00, 0x5f, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, // ._8..........>.. - 0x00, 0x5f, 0x38, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, // ._8...;..=...... - 0x00, 0x1d, 0x21, 0x00, 0x00, 0xc4, 0x1d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, // ..!......A...... - 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, // .-<..........>.. - 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, // .-<...!..=...... - 0x00, 0x47, 0x3a, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, // .G:..........G:. - 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .8.... + 0x56, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x98, 0x0a, 0x00, 0x00, 0x03, // wProj........... + 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x37, 0x62, 0x00, 0x00, 0x00, // .#.........7b... + 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, // ................ + 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, // ...GLSL.std.450. + 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, // ...........main. + 0x00, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x8b, // ................ + 0x17, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, // ................ + 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, // .......main..... + 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, // .......Output... + 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // ...........gl_Po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x01, // sition.......... + 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, // ...v_texcoord0.. + 0x00, 0x06, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x33, // .......@main(vf3 + 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa2, 0x3c, 0x00, 0x00, 0x61, // ;vf2;.......<..a + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xc4, // _position....... + 0x1d, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, // ...a_texcoord0.. + 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, // ......._varying_ + 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, // .......;...$Glob + 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, // al.....;.......u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, // _viewRect......; + 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, // .......u_viewTex + 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, // el.....;.......u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, // _view......;.... + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, // ...u_invView.... + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, // ...;.......u_pro + 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, // j......;.......u + 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, // _invProj.......; + 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // .......u_viewPro + 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, // j......;.......u + 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, // _invViewProj.... + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // ...;.......u_mod + 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, // el.....;.......u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3b, // _modelView.....; + 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // .......u_modelVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0b, // ewProj.....;.... + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, // ...u_alphaRef4.. + 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, // ...B............ + 0x41, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, // A..a_position... + 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // .......a_positio + 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, // n......,?..a_tex + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x61, // coord0.........a + 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, // _texcoord0...... + 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, // ...flattenTemp.. + 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, // ....U..param.... + 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, // .......param.... + 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, // .......@entryPoi + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, // ntOutput.gl_Posi + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x40, // tion...........@ + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // entryPointOutput + 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, // .v_texcoord0...G + 0x00, 0x04, 0x00, 0x94, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, // ...........@...H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, // ...;.......#.... + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, // ...H...;.......# + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, // .......H...;.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, // .......H...;.... + 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // ...#... ...H...; + 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H + 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...;...........H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, // ...;.......#...` + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, // ...H...;........ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, // .......H...;.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, // .......H...;.... + 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // ...#.......H...; + 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H + 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...;...........H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, // ...;.......#.... + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, // ...H...;........ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, // .......H...;.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, // .......H...;.... + 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // ...#... ...H...; + 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H + 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...;...........H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, // ...;.......#...` + 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, // ...H...;........ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, // .......H...;.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, // .......H...;.... + 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // ...#.......H...; + 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H + 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...;...........H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, // ...;.......#.... + 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, // ...H...;........ + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, // .......H...;.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, // .......H...;.... + 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, // ...#.......H...; + 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H + 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, // ...;.......#... + 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, // ...G...;.......G + 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...B...".......G + 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...............G + 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, // ...............G + 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, // ...............G + 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, // ................ + 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, // .......!........ + 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, // ........... .... + 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, // ............... + 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, // ................ + 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, // ............... + 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, // ................ + 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, // ................ + 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x21, // ...............! + 0x00, 0x05, 0x00, 0x67, 0x07, 0x00, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x90, // ...g............ + 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1a, // ... ............ + 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, // ........... .... + 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, // ...+............ + 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, // ...+............ + 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x0c, // ...,............ + 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, // .......+........ + 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, // .......+........ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, // ......?....e.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, // ............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, // .......+.......j + 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x94, 0x02, 0x00, 0x00, 0x65, // ... ...........e + 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x1d, // ...j.......;.... + 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // .......e...e...e + 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x94, // ...e...e...e.... + 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, // ...e...e....... + 0x00, 0x04, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x3b, // ...........;...; + 0x00, 0x04, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, // .......B.......+ + 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, // ............... + 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, // ...........e... + 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, // ............... + 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, // ...............; + 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, // ............... + 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, // ...............; + 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, // ............... + 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, // ...............; + 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, // ............... + 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, // ...............; + 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, // ...............6 + 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, // .......Sa..;.... + 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, // ...........;.... + 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, // ....U......;.... + 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, // ...........=.... + 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, // ....A......=.... + 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, // ...,?......>.... + 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, // U...A..>......., + 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0xbc, // ?..9.......I&... + 0x0e, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, // ....U......>.... + 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, // ...I&..A.......T + 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, // 4..........=.... + 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, // .......T4..>.... + 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xee, // .......A........ + 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, // @..........=.... + 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8b, // ....-...@..>.... + 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, // ....-......8...6 + 0x00, 0x05, 0x00, 0x1a, 0x04, 0x00, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, // ...............g + 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xa2, 0x3c, 0x00, 0x00, 0x37, // ...7........<..7 + 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc4, 0x1d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x5f, // ..............._ + 0x57, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, // W..;............ + 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0x18, 0x2d, 0x00, 0x00, 0x0f, // ...A........-... + 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x2d, 0x00, 0x00, 0x1f, // .......>....-... + 0x07, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x19, 0x00, 0x00, 0xa2, // ...=............ + 0x3c, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0xbe, 0x2f, 0x00, 0x00, 0x10, // <..O......../... + 0x19, 0x00, 0x00, 0x10, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, // ...............Q + 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x36, 0x62, 0x00, 0x00, 0xbe, 0x2f, 0x00, 0x00, 0x00, // .......6b.../... + 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x98, 0x1b, 0x00, 0x00, 0xbe, // ...Q............ + 0x2f, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x84, // /......P........ + 0x32, 0x00, 0x00, 0x36, 0x62, 0x00, 0x00, 0x98, 0x1b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, // 2..6b........... + 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x42, // ...A.......),..B + 0x13, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xf3, // .......=...e.... + 0x3c, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9f, // <..),........... + 0x3b, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, // ;...2...<..A.... + 0x02, 0x00, 0x00, 0x5f, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, // ..._8..........> + 0x00, 0x03, 0x00, 0x5f, 0x38, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, // ..._8...;..=.... + 0x00, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0xc4, 0x1d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, // ....!......A.... + 0x02, 0x00, 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, // ...-<..........> + 0x00, 0x03, 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1a, // ...-<...!..=.... + 0x04, 0x00, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x47, // ...G:..........G + 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // :..8.... }; -static const uint8_t vs_imgui_image_dx9[282] = +static const uint8_t vs_imgui_image_dx9[284] = { - 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0xfc, 0x00, 0x00, 0x03, 0xfe, // wProj........... - 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ... .CTAB....S.. - 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ - 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP - 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // roj............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // 0.1............. - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, // ...U............ - 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ................ - 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, // ................ - 0xe0, 0x01, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... + 0x56, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, // wProj........... + 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, // ..... .CTAB....S + 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, // ...L...0........ + 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...<.......u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, // wProj........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......vs_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, // 10.1........... + 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, // ................ + 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, // ................ + 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, // .....U.......... + 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ + 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............ }; -static const uint8_t vs_imgui_image_dx11[473] = +static const uint8_t vs_imgui_image_dx11[475] = { - 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0xb4, 0x01, 0x44, 0x58, 0x42, // wProj........DXB - 0x43, 0x62, 0x0c, 0x7d, 0x32, 0x98, 0x4b, 0xbb, 0x29, 0xce, 0xaa, 0xb2, 0xca, 0x5d, 0xc9, 0x55, // Cb.}2.K.)....].U - 0xf0, 0x01, 0x00, 0x00, 0x00, 0xb4, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .............,.. - 0x00, 0x80, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, // .........ISGNL.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........8...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, // ................ - 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .A.............. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // .........POSITIO - 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, // N.TEXCOORD...OSG - 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, // NP...........8.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....D.......... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, // .............SV_ - 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, // POSITION.TEXCOOR - 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xd4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, // D....SHDR....@.. - 0x00, 0x35, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .5...Y...F. .... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, // ....._...2...... - 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, // ._...2.......g.. - 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .. ..........e.. - 0x03, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, // .2 ......h...... - 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, // .8...........V.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .....F. ........ - 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .2...........F. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, // .F............ . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .....F.......F. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, // .........6...2 . - 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, // .....F.......>.. - 0x01, 0x00, 0x02, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // .......@. + 0x56, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0xb4, 0x01, 0x00, 0x00, 0x44, // wProj..........D + 0x58, 0x42, 0x43, 0x62, 0x0c, 0x7d, 0x32, 0x98, 0x4b, 0xbb, 0x29, 0xce, 0xaa, 0xb2, 0xca, 0x5d, // XBCb.}2.K.)....] + 0xc9, 0x55, 0xf0, 0x01, 0x00, 0x00, 0x00, 0xb4, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, // .U............., + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, // ...........ISGNL + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, // ...........8.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, // ................ + 0x03, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...A............ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, // ...........POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0x4f, // ION.TEXCOORD...O + 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, // SGNP...........8 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......D........ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, // ...............S + 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, // V_POSITION.TEXCO + 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xd4, 0x00, 0x00, 0x00, 0x40, // ORD....SHDR....@ + 0x00, 0x01, 0x00, 0x35, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...5...Y...F. .. + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x00, // ......._...2.... + 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, // ..._...2.......g + 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // .... ..........e + 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, // ...2 ......h.... + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, // ...8...........V + 0x15, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // .......F. ...... + 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...2...........F + 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x00, // . .............. + 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, // ...F............ + 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ......F.......F + 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, // . .........6...2 + 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, // ......F.......> + 0x00, 0x00, 0x01, 0x00, 0x02, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // .........@. }; static const uint8_t vs_imgui_image_mtl[686] = { - 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie + 0x56, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x8e, 0x02, 0x00, 0x00, 0x75, // wProj..........u 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, // sing namespace m 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, // etal;.struct xla diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h index 36d9fd7..a5e155b 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_imgui_latlong_glsl[337] = { - 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod + 0x56, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x2c, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ,...attribute hi 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // ghp vec3 a_posit @@ -23,247 +23,243 @@ static const uint8_t vs_imgui_latlong_glsl[337] = 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, // a_texcoord0;.}.. 0x00, // . }; -static const uint8_t vs_imgui_latlong_spv[2803] = +static const uint8_t vs_imgui_latlong_spv[2741] = { - 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod + 0x56, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... - 0xd0, 0x0a, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x36, 0x62, // ....#.........6b - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, // ................ - 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, // ......GLSL.std.4 - 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // 50.............. - 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0xd8, 0x0c, // in.............. - 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x4f, 0x75, // in............Ou - 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x00, 0x00, // tput............ - 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, // ..gl_Position... - 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ..........v_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x40, 0x6d, // oord0.........@m - 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, // ain(vf3;vf2;.... - 0x05, 0x00, 0xa2, 0x3c, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // ...<..a_position - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xc4, 0x1d, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // ..........a_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, // oord0........._v - 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3b, 0x06, // arying_.......;. - 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, // ..$Global.....;. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, // ......u_viewRect - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......;.......u_ - 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, // viewTexel.....;. - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, // ......u_view.... - 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..;.......u_invV - 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, // iew.......;..... - 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, // ..u_proj......;. - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, // ......u_invProj. - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......;.......u_ - 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3b, 0x06, // viewProj......;. - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, // ......u_invViewP - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, // roj.......;..... - 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, // ..u_model.....;. - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // ......u_modelVie - 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, // w.....;.......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, // modelViewProj... - 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, // ..;.......u_alph - 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, // aRef4.....B..... - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // .......A..a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, // tion..........a_ - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, // position......,? - 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..a_texcoord0... - 0x05, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ......a_texcoord - 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, // 0.........flatte - 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, // nTemp......U..pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, // ram...........pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, // ram...........@e - 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, // ntryPointOutput_ - 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, // gl_Position..... - 0x04, 0x00, 0xe5, 0x03, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, // ......Output.... - 0x06, 0x00, 0xe5, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ..........v_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x40, 0x65, // oord0.........@e - 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, // ntryPointOutput. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x94, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, // ..G...........@. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...;.......#. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x01, 0x00, // ......H...;..... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, // ..#.......H...;. - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, // ..........H...;. - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. - 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..;............. - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...;......... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...;.......#. - 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, // ..`...H...;..... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, // ..........H...;. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, // ..........H...;. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..;............. - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...;......... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...;.......#. - 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, // ......H...;..... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, // ..........H...;. - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, // ..........H...;. - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#... ...H. - 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..;............. - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...;......... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...;.......#. - 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, // ..`...H...;..... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, // ..........H...;. - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, // ..........H...;. - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..;............. - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...;......... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...;.......#. - 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, // ......H...;..... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, // ..........H...;. - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, // ..........H...;. - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..;............. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...;.......#. - 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, // .. ...G...;..... - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G...B..."..... - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, // ..G............. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. - 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, // ..........!..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, // .. ............. - 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, // .. ............. - 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, // ................ - 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x00, // ................ - 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x67, 0x07, 0x00, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x95, 0x02, // ..!...g......... - 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0x07, 0x00, // ...... ......... - 0x00, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, // ......+......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, // ......+......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1f, 0x07, // ......,......... - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..........+..... - 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // .........?....e. - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... - 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x94, 0x02, // ..j... ......... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x3b, 0x06, // ..e...j.......;. - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. - 0x00, 0x00, 0x94, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......e...e..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3b, 0x06, // .. ...........;. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, // ..;.......B..... - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x0a, 0x00, // ..+.......)..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, // .. ...........e. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, // ..;............. - 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0xe5, 0x03, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x04, 0x00, 0x62, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xe5, 0x03, 0x00, 0x00, 0x3b, 0x00, // ..b...........;. - 0x04, 0x00, 0x62, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, // ..b........... . - 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x36, 0x00, // ..............6. - 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, // ................ - 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x06, // ......Sa..;..... - 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, // ..........;..... - 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, // ...U......;..... - 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, // ..........=..... - 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ...A......=..... - 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, // ..,?......>....U - 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, // ...A..>.......,? - 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0xbc, 0x0e, // ..9.......I&.... - 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, // ...U......>..... - 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, // ..I&..A.......T4 - 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..........=..... - 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd8, 0x0c, // ......T4..>..... - 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0x27, 0x41, // ......A.......'A - 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ..........=..... - 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x92, 0x02, // ......'A..A..... - 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ..............>. - 0x03, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, // ..............8. - 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1a, 0x04, 0x00, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x00, 0x00, // ..6............. - 0x00, 0x00, 0x67, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xa2, 0x3c, // ..g...7........< - 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc4, 0x1d, 0x00, 0x00, 0xf8, 0x00, // ..7............. - 0x02, 0x00, 0x5f, 0x57, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0x0f, 0x12, // .._W..;......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0x18, 0x2d, // ......A........- - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x2d, // ..........>....- - 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x35, 0x62, // ......=.......5b - 0x00, 0x00, 0xa2, 0x3c, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x3a, // ...<..Q.......;: - 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..5b......Q..... - 0x00, 0x00, 0x0b, 0x47, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, // ...G..5b......Q. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x53, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x02, 0x00, // ......+S..5b.... - 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0x3b, 0x3a, // ..P........2..;: - 0x00, 0x00, 0x0b, 0x47, 0x00, 0x00, 0x2b, 0x53, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, // ...G..+S......A. - 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, // ......),..B...). - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x29, 0x2c, // ..=...e....<..), - 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x84, 0x32, // ...........;...2 - 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x5f, 0x38, // ...<..A......._8 - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x38, // ..........>..._8 - 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1d, 0x21, // ...;..=........! - 0x00, 0x00, 0xc4, 0x1d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0x2d, 0x3c, // ......A.......-< - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2d, 0x3c, // ..........>...-< - 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x47, 0x3a, // ...!..=.......G: - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x38, 0x00, // ..........G:..8. - 0x01, 0x00, 0x00, // ... + 0x90, 0x0a, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, // ......#......... + 0x36, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // 6b.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // main............ + 0x95, 0x15, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, // ................ + 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, // ............main + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, // ............Outp + 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ut.............. + 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, // gl_Position..... + 0x1a, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ........v_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // rd0.........@mai + 0x6e, 0x28, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // n(vf3;vf2;...... + 0xa2, 0x3c, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, // .<..a_position.. + 0x05, 0x00, 0x05, 0x00, 0xc4, 0x1d, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ........a_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, // rd0........._var + 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, // ying_.......;... + 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, // $Global.....;... + 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, // ....u_viewRect.. + 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....;.......u_vi + 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, // ewTexel.....;... + 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_view...... + 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ;.......u_invVie + 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // w.......;....... + 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, // u_proj......;... + 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // ....u_invProj... + 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....;.......u_vi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3b, 0x06, 0x00, 0x00, // ewProj......;... + 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ....u_invViewPro + 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // j.......;....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3b, 0x06, 0x00, 0x00, // u_model.....;... + 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, // ....u_modelView. + 0x06, 0x00, 0x07, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ....;.......u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, // delViewProj..... + 0x3b, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, // ;.......u_alphaR + 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ef4.....B....... + 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // .....A..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // on..........a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, // sition......,?.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // ....a_texcoord0. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, // _Position....... + 0x8b, 0x17, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // ....@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // utput.v_texcoord + 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x94, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // 0...G........... + 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // @...H...;....... + 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, // #.......H...;... + 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ....#.......H... + 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ;...........H... + 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ;.......#... ... + 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...;........... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....H...;....... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....H...;....... + 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, // #...`...H...;... + 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ;...........H... + 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, // ;.......#....... + 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...;........... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H...;....... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H...;....... + 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, // #.......H...;... + 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ;...........H... + 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, // ;.......#... ... + 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...;........... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....H...;....... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....H...;....... + 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, // #...`...H...;... + 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ;...........H... + 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, // ;.......#....... + 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...;........... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H...;....... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H...;....... + 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, // #.......H...;... + 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ;...........H... + 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, // ;.......#....... + 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H...;........... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3b, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // ....H...;....... + 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x3b, 0x06, 0x00, 0x00, // #... ...G...;... + 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, // ....G...B..."... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G........... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G........... + 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // ....G........... + 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // ....G........... + 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, // ............!... + 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ............... + 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ................ + 0x13, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x67, 0x07, 0x00, 0x00, 0x1a, 0x04, 0x00, 0x00, // ....!...g....... + 0x95, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // .......+....... + 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........+....... + 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, // ........,....... + 0x1f, 0x07, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x18, 0x00, 0x04, 0x00, // ...........?.... + 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... + 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... + 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... + 0x94, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // ....e...j....... + 0x3b, 0x06, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ;...........e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x65, 0x00, 0x00, 0x00, 0x94, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e.......e...e... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x3b, 0x06, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb8, 0x08, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // ;...;.......B... + 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, // ....+.......)... + 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // e... ........... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. + 0x3b, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... + 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // =........A...... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // =.......,?...... + 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....U...A..>... + 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, // ....,?..9....... + 0x49, 0x26, 0x00, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // I&.......U...... + 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >.......I&..A... + 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....T4.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, // =...........T4.. + 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...........A... + 0x90, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // =........-...@.. + 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >........-...... + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1a, 0x04, 0x00, 0x00, 0xbc, 0x0e, 0x00, 0x00, // 8...6........... + 0x00, 0x00, 0x00, 0x00, 0x67, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, // ....g...7....... + 0xa2, 0x3c, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc4, 0x1d, 0x00, 0x00, // .<..7........... + 0xf8, 0x00, 0x02, 0x00, 0x5f, 0x57, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, // ...._W..;....... + 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, // ........A....... + 0x18, 0x2d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .-..........>... + 0x18, 0x2d, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // .-......=....... + 0x35, 0x62, 0x00, 0x00, 0xa2, 0x3c, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // 5b...<..Q....... + 0x3b, 0x3a, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // ;:..5b......Q... + 0x0d, 0x00, 0x00, 0x00, 0x0b, 0x47, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .....G..5b...... + 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x53, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, // Q.......+S..5b.. + 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, // ....P........2.. + 0x3b, 0x3a, 0x00, 0x00, 0x0b, 0x47, 0x00, 0x00, 0x2b, 0x53, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ;:...G..+S...... + 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A.......),..B... + 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, // )...=...e....<.. + 0x29, 0x2c, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, // ),...........;.. + 0x84, 0x32, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, // .2...<..A....... + 0x5f, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // _8..........>... + 0x5f, 0x38, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // _8...;..=....... + 0x1d, 0x21, 0x00, 0x00, 0xc4, 0x1d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, // .!......A....... + 0x2d, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // -<..........>... + 0x2d, 0x3c, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, // -<...!..=....... + 0x47, 0x3a, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, // G:..........G:.. + 0x38, 0x00, 0x01, 0x00, 0x00, // 8.... }; -static const uint8_t vs_imgui_latlong_dx9[311] = +static const uint8_t vs_imgui_latlong_dx9[313] = { - 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod + 0x56, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x14, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........!.CTAB.. - 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, // modelViewProj... - 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs - 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( - 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, // ompiler 10.1.... - 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, // ................ - 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, // ................ - 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... + 0x14, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, // ..........!.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, // Compiler 10.1.. + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ + 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, // ................ + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, // ..............U. + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, // ................ + 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, // ................ + 0x01, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... }; -static const uint8_t vs_imgui_latlong_dx11[518] = +static const uint8_t vs_imgui_latlong_dx11[520] = { - 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod + 0x56, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0xdc, 0x01, 0x44, 0x58, 0x42, 0x43, 0x0b, 0x6a, 0x72, 0xae, 0x8a, 0xf0, 0xc5, 0xba, 0x55, 0x23, // ..DXBC.jr.....U# - 0xc7, 0x67, 0xc5, 0xc7, 0xe9, 0x83, 0x01, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0x03, 0x00, // .g.............. - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x49, 0x53, // ..,...........IS - 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, // GNL...........8. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......A......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, // ..............PO - 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, // SITION.TEXCOORD. - 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, // ..OSGNP......... - 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, // ..8............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........D..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, // ................ - 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, // ..SV_POSITION.TE - 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xfc, 0x00, // XCOORD....SHDR.. - 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, // ..@...?...Y...F. - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, // ........._...r. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, // ......_...2..... - 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..g.... ........ - 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, // ..e...2 ......h. - 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8......... - 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..V.......F. ... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, // ..F. ........... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, // ......F.......2. - 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..........F. ... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, // ..............F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ........... .... - 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..F.......F. ... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, // ......6...2 .... - 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, // ..F.......>..... - 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ....@. + 0xdc, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x0b, 0x6a, 0x72, 0xae, 0x8a, 0xf0, 0xc5, 0xba, // ....DXBC.jr..... + 0x55, 0x23, 0xc7, 0x67, 0xc5, 0xc7, 0xe9, 0x83, 0x01, 0x00, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, // U#.g............ + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, // ....,........... + 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNL........... + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // 8............... + 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........A....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // ................ + 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, // POSITION.TEXCOOR + 0x44, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // D...OSGNP....... + 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....8........... + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, // ............D... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // ....SV_POSITION. + 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, // TEXCOORD....SHDR + 0xfc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, // ....@...?...Y... + 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // F. ........._... + 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, // r......._...2... + 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....g.... ...... + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....e...2 ...... + 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, // h.......8....... + 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....V.......F. . + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ........2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... + 0x06, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, // F............ .. + 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....F.......F. . + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, // ........6...2 .. + 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>... + 0x00, 0x02, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ......@. }; static const uint8_t vs_imgui_latlong_mtl[685] = { - 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod + 0x56, 0x53, 0x48, 0x05, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x88, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // ....using namesp 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h index d3e1829..fae61ec 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_imgui_texture_glsl[419] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x83, 0x01, 0x00, 0x00, 0x61, // wProj..........a 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, // ec4 a_color0;.at @@ -28,278 +28,276 @@ static const uint8_t vs_imgui_texture_glsl[419] = 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, // r0 = a_color0;.} 0x0a, 0x0a, 0x00, // ... }; -static const uint8_t vs_imgui_texture_spv[3250] = +static const uint8_t vs_imgui_texture_spv[3212] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x94, 0x0c, 0x03, 0x02, 0x23, // wProj..........# - 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // .........Ta..... - 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ - 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... - 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0a, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... - 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0xd8, 0x0c, 0x00, // ................ - 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai - 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x64, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, // n........d...Out - 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // put......d...... - 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, // .gl_Position.... - 0x00, 0x64, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // .d.......v_color - 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, // 0........d...... - 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, // .v_texcoord0.... - 0x00, 0xad, 0x11, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, // .....@main(vf4;v - 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xe2, 0x2e, 0x00, // f3;vf2;......... - 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .a_color0....... - 0x00, 0x2f, 0x42, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // ./B..a_position. - 0x00, 0x05, 0x00, 0x05, 0x00, 0x10, 0x46, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ......F..a_texco - 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, // ord0........._va - 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, // rying_.......... - 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, // .$Global........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, // .....u_viewRect. - 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v - 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, // iewTexel........ - 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_view..... - 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // .........u_invVi - 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // ew.............. - 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, // .u_proj......... - 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // .....u_invProj.. - 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xdf, 0x00, 0x00, // iewProj......... - 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, // .....u_invViewPr - 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // oj.............. - 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, // .u_model........ - 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView - 0x00, 0x06, 0x00, 0x07, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .............u_m - 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, // odelViewProj.... - 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, // .........u_alpha - 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // Ref4.....B...... - 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ......A..a_color - 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, // 0............a_c - 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, // olor0.........?. - 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, // .a_position..... - 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // .....a_position. - 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // .....@,..a_texco - 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, // ord0.........a_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, // excoord0........ - 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, // .flattenTemp.... - 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..U..param...... - 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..8..param...... - 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, // .....param...... - 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, // .....@entryPoint - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, // Output_gl_Positi - 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, // on...........Out - 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // put............. - 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, // .v_color0....... - 0x00, 0x1a, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // .........v_texco - 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x40, 0x65, 0x6e, // ord0.........@en - 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, // tryPointOutput.. - 0x00, 0x47, 0x00, 0x04, 0x00, 0x65, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, // .G...e.......@.. - 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .....H.......... - 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, // .#.......H...... - 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, // .........H...... - 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#... ...H.. - 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ - 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. - 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. - 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .`...H.......... - 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, // .........H...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, // .........H...... - 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. - 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ - 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. - 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. - 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... - 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, // .........H...... - 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, // .........H...... - 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#... ...H.. - 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ - 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. - 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. - 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .`...H.......... - 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, // .........H...... - 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, // .........H...... - 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. - 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ - 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. - 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. - 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... - 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, // .........H...... - 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, // .........H...... - 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. - 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ - 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. - 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // . ...G.......... - 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .G...B..."...... - 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .G.............. - 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .G.............. - 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // .G.............. - 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .G.............. - 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .G.............. - 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, // .........!...... - 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. - 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // . .............. - 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // . .............. - 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, // . .............. - 0x00, 0x1e, 0x00, 0x05, 0x00, 0x64, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .....d.......... - 0x00, 0x13, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x03, 0x09, 0x00, 0x00, 0x64, 0x04, 0x00, // .....!.......d.. - 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. - 0x00, 0xe1, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, // .........d...... - 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. - 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. - 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, // ............?+.. - 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, // .............,.. - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, // ................ - 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... - 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, // .........,...... - 0x00, 0x1f, 0x07, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. - 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, // ................ - 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // .e.............. - 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. - 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // .....j... ...... - 0x00, 0x65, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, // .e...e...j...... - 0x00, 0xdf, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .............e.. - 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. - 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x5c, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... .......... - 0x00, 0xdf, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x5c, 0x03, 0x00, 0x00, 0x42, 0x13, 0x00, // .....;.......B.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, // .....+.......... - 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... .......... - 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, // .e... .......... - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, // .....;.......... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, // ..... .......... - 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, // .....;.......... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, // ..... .......... - 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, // .....;.......... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ..... .......... - 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, // .....;.......... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, // ................ - 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, // ..... .......... - 0x00, 0x1a, 0x04, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, // .....;.......... - 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ..... .......... - 0x00, 0x13, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // .....6.......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, // .............Sa. - 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.............. - 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........U..... - 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........8..... - 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.............. - 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, // .=........A..... - 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, // .=........?..... - 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, // .=.......@,..... - 0x00, 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, // .>....U...A..>.. - 0x00, 0x95, 0x38, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, // ..8...?..>...... - 0x00, 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x64, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, // .@,..9...d...I&. - 0x00, 0xad, 0x11, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, // ......U...8..... - 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, // .>.......I&..A.. - 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, // .....T4......... - 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, // .=...........T4. - 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, // .>...........A.. - 0x00, 0x9a, 0x02, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, // .....'A......... - 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, // .=...........'A. - 0x00, 0x41, 0x00, 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xcd, 0x0f, 0x00, // .A........N..... - 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xdf, 0x1c, 0x00, // .....>....N..... - 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x08, 0x10, 0x00, // .A........M..... - 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, // .....=.......... - 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x92, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, // ..M..A.......... - 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, // .........>...... - 0x00, 0xe0, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .........8...6.. - 0x00, 0x64, 0x04, 0x00, 0x00, 0xad, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, // .d.............. - 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, // .7...........7.. - 0x00, 0x95, 0x02, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, // ...../B..7...... - 0x00, 0x10, 0x46, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x70, 0x1e, 0x00, 0x00, 0x3b, 0x00, 0x04, // ..F......p...;.. - 0x00, 0xe1, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, // .............A.. - 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbb, 0x25, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, // ......%......... - 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbb, 0x25, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, // .>....%......A.. - 0x00, 0x90, 0x02, 0x00, 0x00, 0x9b, 0x49, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, // ......I......... - 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9b, 0x49, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>....I......=.. - 0x00, 0x18, 0x00, 0x00, 0x00, 0xa0, 0x2a, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x4f, 0x00, 0x07, // ......*../B..O.. - 0x00, 0x13, 0x00, 0x00, 0x00, 0x4e, 0x41, 0x00, 0x00, 0xa0, 0x2a, 0x00, 0x00, 0xa0, 0x2a, 0x00, // .....NA...*...*. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // .........Q...... - 0x00, 0x8d, 0x5a, 0x00, 0x00, 0x4e, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, // ..Z..NA......Q.. - 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6e, 0x5e, 0x00, 0x00, 0x4e, 0x41, 0x00, 0x00, 0x01, 0x00, 0x00, // .....n^..NA..... - 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x14, 0x44, 0x00, 0x00, 0x8d, 0x5a, 0x00, // .P........D...Z. - 0x00, 0x6e, 0x5e, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, // .n^..........A.. - 0x00, 0xe2, 0x02, 0x00, 0x00, 0x80, 0x24, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x1d, 0x0a, 0x00, // ......$..B...... - 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x4a, 0x35, 0x00, 0x00, 0x80, 0x24, 0x00, // .=...e...J5...$. - 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf6, 0x33, 0x00, 0x00, 0x14, 0x44, 0x00, // ..........3...D. - 0x00, 0x4a, 0x35, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb6, 0x30, 0x00, // .J5..A........0. - 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb6, 0x30, 0x00, // .........>....0. - 0x00, 0xf6, 0x33, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xad, 0x32, 0x00, // ..3..=........2. - 0x00, 0x10, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xbd, 0x4d, 0x00, // ..F..A........M. - 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbd, 0x4d, 0x00, // .........>....M. - 0x00, 0xad, 0x32, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xae, 0x32, 0x00, // ..2..=........2. - 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbe, 0x4d, 0x00, // .....A........M. - 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbe, 0x4d, 0x00, // .........>....M. - 0x00, 0xae, 0x32, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x64, 0x04, 0x00, 0x00, 0xf6, 0x31, 0x00, // ..2..=...d....1. - 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xf6, 0x31, 0x00, 0x00, 0x38, 0x00, 0x01, // ..........1..8.. - 0x00, 0x00, // .. + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x6c, 0x0c, 0x00, 0x00, 0x03, // wProj......l.... + 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, // .#.........Ta... + 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, // ................ + 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, // ...GLSL.std.450. + 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, // ...........main. + 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x95, // ................ + 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, // ...v............ + 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, // ...............m + 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x64, 0x04, 0x00, 0x00, 0x4f, // ain........d...O + 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x00, // utput......d.... + 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, // ...gl_Position.. + 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // ...d.......v_col + 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x02, // or0........d.... + 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, // ...v_texcoord0.. + 0x00, 0x07, 0x00, 0xad, 0x11, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, // .......@main(vf4 + 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xe2, // ;vf3;vf2;....... + 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, // ...a_color0..... + 0x00, 0x05, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // .../B..a_positio + 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x10, 0x46, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, // n.......F..a_tex + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, // coord0........._ + 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xdf, // varying_........ + 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, // ...$Global...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, // .......u_viewRec + 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, // t..............u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xdf, // _viewTexel...... + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, // .......u_view... + 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, // ...........u_inv + 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, // View............ + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, // ...u_proj....... + 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, // .......u_invProj + 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, // ...............u + 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xdf, // _viewProj....... + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, // .......u_invView + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, // Proj............ + 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xdf, // ...u_model...... + 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // .......u_modelVi + 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, // ew.............u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, // _modelViewProj.. + 0x00, 0x06, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, // ...........u_alp + 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, // haRef4.....B.... + 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, // ........A..a_col + 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, 0x00, 0x00, 0x61, // or0............a + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xd9, // _color0......... + 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, // ?..a_position... + 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // .......a_positio + 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, // n......@,..a_tex + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x61, // coord0.........a + 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, // _texcoord0...... + 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, // ...flattenTemp.. + 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, // ....U..param.... + 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, // ....8..param.... + 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, // .......param.... + 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, // .......@entryPoi + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, // ntOutput.gl_Posi + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0x76, 0x13, 0x00, 0x00, 0x40, // tion.......v...@ + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // entryPointOutput + 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x8b, // .v_color0....... + 0x17, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, // ...@entryPointOu + 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // tput.v_texcoord0 + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x65, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, // ...G...e.......@ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, // ...H...........# + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x01, // .......H........ + 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, // ...#.......H.... + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, // ...........H.... + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, // .......#... ...H + 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ................ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, // ...H............ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, // ...H...........# + 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x03, // ...`...H........ + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, // ...........H.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, // ...........H.... + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, // .......#.......H + 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ................ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, // ...H............ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, // ...H...........# + 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x05, // .......H........ + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, // ...........H.... + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, // ...........H.... + 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, // .......#... ...H + 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ................ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, // ...H............ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, // ...H...........# + 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x07, // ...`...H........ + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, // ...........H.... + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, // ...........H.... + 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, // .......#.......H + 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ................ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, // ...H............ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, // ...H...........# + 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x09, // .......H........ + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xdf, // ...........H.... + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, // ...........H.... + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, // .......#.......H + 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, // ................ + 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, // ...H...........# + 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x02, // ... ...G........ + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, // ...G...B...".... + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, // ...G............ + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, // ...G............ + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, // ...G............ + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, // ...G............ + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, // ...G...v........ + 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, // ...G............ + 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, // ...........!.... + 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, // ............... + 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, // ................ + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, // ... ............ + 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, // ... ............ + 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, // ... ............ + 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x64, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, // .......d........ + 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x03, 0x09, 0x00, 0x00, 0x64, // .......!.......d + 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, // ............... + 0x00, 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x04, 0x00, 0x00, 0x15, // ...........d.... + 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, // ....... .......+ + 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, // ...............+ + 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, // ..............?+ + 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, // ..............., + 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x0c, // ................ + 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, // ...........+.... + 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, // ...........,.... + 0x00, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, // ...............+ + 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, // ................ + 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, // ...e............ + 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, // ....... .......+ + 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, // .......j... .... + 0x00, 0x04, 0x00, 0x65, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, // ...e...e...j.... + 0x00, 0x0e, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, // ...............e + 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // ...e...e...e...e + 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // ...e...e...e...e + 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x5c, 0x03, 0x00, 0x00, 0x02, // ....... ........ + 0x00, 0x00, 0x00, 0xdf, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x5c, 0x03, 0x00, 0x00, 0x42, // .......;.......B + 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, // .......+........ + 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, // ....... ........ + 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, // ...e... ........ + 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, // .......;........ + 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, // ....... ........ + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, // .......;........ + 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, // ....... ........ + 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, // .......;........ + 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, // ....... ........ + 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x95, // .......;........ + 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x76, // .......;.......v + 0x13, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x03, // ....... ........ + 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x8b, // .......;........ + 0x17, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, // .......6........ + 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, // ...............S + 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, // a..;............ + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, // ...;........U... + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, // ...;........8... + 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, // ...;............ + 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, // ...=........A... + 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, // ...=........?... + 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, // ...=.......@,... + 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, // ...>....U...A..> + 0x00, 0x03, 0x00, 0x95, 0x38, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, // ....8...?..>.... + 0x16, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x64, 0x04, 0x00, 0x00, 0x49, // ...@,..9...d...I + 0x26, 0x00, 0x00, 0xad, 0x11, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, // &.......U...8... + 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, // ...>.......I&..A + 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, // .......T4....... + 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, // ...=...........T + 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, // 4..>...........A + 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, // ........@....... + 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, // ...=....... .... + 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x76, 0x13, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, // @..>...v... ...A + 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, // ........@....... + 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, // ...=........-... + 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, // @..>........-... + 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x64, 0x04, 0x00, 0x00, 0xad, // ...8...6...d.... + 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, // ...........7.... + 0x02, 0x00, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2f, // .......7......./ + 0x42, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x10, 0x46, 0x00, 0x00, 0xf8, // B..7........F... + 0x00, 0x02, 0x00, 0x70, 0x1e, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, 0x0f, // ...p...;........ + 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbb, // .......A........ + 0x25, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbb, // %..........>.... + 0x25, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9b, // %......A........ + 0x49, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9b, // I..........>.... + 0x49, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xa0, // I......=........ + 0x2a, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x4e, // *../B..O.......N + 0x41, 0x00, 0x00, 0xa0, 0x2a, 0x00, 0x00, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // A...*...*....... + 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8d, 0x5a, 0x00, 0x00, 0x4e, // ...Q........Z..N + 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6e, // A......Q.......n + 0x5e, 0x00, 0x00, 0x4e, 0x41, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, // ^..NA......P.... + 0x00, 0x00, 0x00, 0x14, 0x44, 0x00, 0x00, 0x8d, 0x5a, 0x00, 0x00, 0x6e, 0x5e, 0x00, 0x00, 0x0c, // ....D...Z..n^... + 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x80, // .......A........ + 0x24, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, // $..B.......=...e + 0x00, 0x00, 0x00, 0x4a, 0x35, 0x00, 0x00, 0x80, 0x24, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, // ...J5...$....... + 0x00, 0x00, 0x00, 0xf6, 0x33, 0x00, 0x00, 0x14, 0x44, 0x00, 0x00, 0x4a, 0x35, 0x00, 0x00, 0x41, // ....3...D..J5..A + 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb6, 0x30, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, // ........0....... + 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb6, 0x30, 0x00, 0x00, 0xf6, 0x33, 0x00, 0x00, 0x3d, // ...>....0...3..= + 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xad, 0x32, 0x00, 0x00, 0x10, 0x46, 0x00, 0x00, 0x41, // ........2...F..A + 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xbd, 0x4d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, // ........M....... + 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbd, 0x4d, 0x00, 0x00, 0xad, 0x32, 0x00, 0x00, 0x3d, // ...>....M...2..= + 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xae, 0x32, 0x00, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x41, // ........2......A + 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbe, 0x4d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, // ........M....... + 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbe, 0x4d, 0x00, 0x00, 0xae, 0x32, 0x00, 0x00, 0x3d, // ...>....M...2..= + 0x00, 0x04, 0x00, 0x64, 0x04, 0x00, 0x00, 0xf6, 0x31, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, // ...d....1....... + 0x00, 0x02, 0x00, 0xf6, 0x31, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ....1..8.... }; -static const uint8_t vs_imgui_texture_dx9[318] = +static const uint8_t vs_imgui_texture_dx9[320] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x20, 0x01, 0x00, 0x03, 0xfe, // wProj...... .... - 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ... .CTAB....S.. - 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ - 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP - 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // roj............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // 0.1............. - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, // ................ - 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, // ...........U.... - 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, // ................ - 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, // ................ - 0x02, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .............. + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, // wProj...... .... + 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, // ..... .CTAB....S + 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, // ...L...0........ + 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...<.......u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, // wProj........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......vs_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, // 10.1........... + 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................ + 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, // ................ + 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, // ................ + 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, // ................ + 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, // .............U.. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, // ................ + 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, // ................ + 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, // ................ + 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ................ }; -static const uint8_t vs_imgui_texture_dx11[575] = +static const uint8_t vs_imgui_texture_dx11[577] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x18, 0x02, 0x44, 0x58, 0x42, // wProj........DXB - 0x43, 0x02, 0x1b, 0xea, 0x24, 0x10, 0xd8, 0x6f, 0x23, 0xf5, 0xf6, 0x01, 0x38, 0x5b, 0x08, 0x13, // C...$..o#...8[.. - 0x4d, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // M............,.. - 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, // .........ISGNh.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, // ................ - 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .V.............. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........._...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // .COLOR.POSITION. - 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, // TEXCOORD.OSGNl.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ - 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........b...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, // .SV_POSITION.COL - 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, // OR.TEXCOORD..SHD - 0x52, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, // R....@...@...Y.. - 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, // .F. ........._.. - 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, // ........._...2.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, // ....._...2...... - 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .g.... ......... - 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.... ......e.. - 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, // .2 ......h...... - 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, // .8...........V.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .....F. ........ - 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .2...........F. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, // ................ - 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, // .F............ . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .....F.......F. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, // .........6.... . - 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .....F.......6.. - 0x05, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, // .2 ......F...... - 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // .>...........@. + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x18, 0x02, 0x00, 0x00, 0x44, // wProj..........D + 0x58, 0x42, 0x43, 0x02, 0x1b, 0xea, 0x24, 0x10, 0xd8, 0x6f, 0x23, 0xf5, 0xf6, 0x01, 0x38, 0x5b, // XBC...$..o#...8[ + 0x08, 0x13, 0x4d, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, // ..M............, + 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, // ...........ISGNh + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...V............ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, // ..........._.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, // ................ + 0x03, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ...COLOR.POSITIO + 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x6c, // N.TEXCOORD.OSGNl + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, // ...........b.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, // ................ + 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, // ...SV_POSITION.C + 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x53, // OLOR.TEXCOORD..S + 0x48, 0x44, 0x52, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x59, // HDR....@...@...Y + 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, // ...F. ........._ + 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, // ..........._...2 + 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, // ......._...2.... + 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ...g.... ....... + 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e + 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, // ...2 ......h.... + 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, // ...8...........V + 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // .......F. ...... + 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...2...........F + 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, // . .............. + 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, // ...F............ + 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ......F.......F + 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, // . .........6.... + 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, // ......F.......6 + 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, // ...2 ......F.... + 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, // ...>...........@ + 0x00, // . }; static const uint8_t vs_imgui_texture_mtl[778] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0xea, 0x02, 0x00, 0x00, 0x75, // wProj..........u 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, // sing namespace m 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, // etal;.struct xla diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.sc b/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.sc index b40aa9b..c2e9aa1 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.sc +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.sc @@ -2,7 +2,7 @@ $input a_position, a_texcoord0, a_color0 $output v_texcoord0, v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h index e61852a..295c32a 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_ocornut_imgui_glsl[523] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0xea, 0x01, 0x00, 0x00, // wTexel.......... 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, // attribute highp 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, // vec4 a_color0;.a @@ -34,297 +34,294 @@ static const uint8_t vs_ocornut_imgui_glsl[523] = 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, // v_color0 = a_c 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // olor0;.}... }; -static const uint8_t vs_ocornut_imgui_spv[3459] = +static const uint8_t vs_ocornut_imgui_spv[3421] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x64, 0x0d, 0x03, 0x02, // wTexel......d... - 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x65, 0x61, 0x00, 0x00, 0x00, 0x00, // #.........ea.... - 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ - 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. - 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ - 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. - 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0xd8, 0x0c, // ................ - 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma - 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x64, 0x04, 0x00, 0x00, 0x4f, 0x75, // in........d...Ou - 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x00, 0x00, // tput......d..... - 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, // ..gl_Position... - 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ..d.......v_colo - 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x02, 0x00, // r0........d..... - 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... - 0x07, 0x00, 0xad, 0x11, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, // ......@main(vf4; - 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xe2, 0x2e, // vf3;vf2;........ - 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..a_color0...... - 0x05, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // ../B..a_position - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x10, 0x46, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // .......F..a_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, // oord0........._v - 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xe5, 0x10, // arying_......... - 0x00, 0x00, 0x70, 0x6f, 0x73, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x24, 0x47, // ..pos.........$G - 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, // lobal........... - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, // ..u_viewRect.... - 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, // Texel........... - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, // ..u_view........ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, // ......u_invView. - 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x05, 0x00, // proj............ - 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, // ..u_invProj..... - 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x07, 0x00, // Proj............ - 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // ..u_invViewProj. - 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, // model........... - 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, // ..u_modelView... - 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode - 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, // lViewProj....... - 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, // ......u_alphaRef - 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // 4.....B......... - 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ...A..a_color0.. - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ..........a_colo - 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, // r0.........?..a_ - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, // position........ - 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, // ..a_position.... - 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..@,..a_texcoord - 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // 0.........a_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, // oord0.........fl - 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, // attenTemp......U - 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, // ..param........8 - 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, // ..param......... - 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, // ..param......... - 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, // ..@entryPointOut - 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // put_gl_Position. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // ..........Output - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x5f, // ..............v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x1a, 0x04, // color0.......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ......v_texcoord - 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, // 0.........@entry - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, // PointOutput...G. - 0x04, 0x00, 0x08, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, // ..........@...H. - 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, // ..#... ...H..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, // ..........#...`. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x04, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x04, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, // ..#.......H..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x06, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x06, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, // ..#... ...H..... - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, // ..........#...`. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, // ..#.......H..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0a, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0a, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, // ..#.......H..... - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, // ..........#... . - 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, // ..G...........G. - 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..B...".......G. - 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. - 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. - 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. - 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..............G. - 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, // ................ - 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, // ......!......... - 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, // .......... ..... - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, // ................ - 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, // ................ - 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, // ................ - 0x05, 0x00, 0x64, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x00, // ..d............. - 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x03, 0x09, 0x00, 0x00, 0x64, 0x04, 0x00, 0x00, 0x9a, 0x02, // ..!.......d..... - 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe1, 0x06, // .......... ..... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, // ......d......... - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // .. .......+..... - 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // .........?+..... - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, // ..........,..... - 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, // ................ - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, // ......+......... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1f, 0x07, // ......,......... - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... - 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // .........@....e. - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // .. .......+..... - 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x08, 0x04, // ..j... ......... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x00, 0x09, // ..e...j......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. - 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......e...e..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7d, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x09, // .. ...}......... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x7d, 0x0b, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, // ..;...}...B..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9d, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9d, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, // ..;............. - 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x1a, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x00, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1a, 0x04, // .. ............. - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x97, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, // ..;............. - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, // .. ............. - 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, // ..6............. - 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, // ..........Sa..;. - 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. - 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......U......;. - 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......8......;. - 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x3d, 0x00, // .......A......=. - 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, // .......?......=. - 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, // ......@,......>. - 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x38, // ...U...A..>....8 - 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x40, 0x2c, // ...?..>.......@, - 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x64, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0xad, 0x11, // ..9...d...I&.... - 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, // ...U...8......>. - 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ......I&..A..... - 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..T4..........=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, // ..........T4..>. - 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..........A..... - 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..'A..........=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x41, 0x00, // ..........'A..A. - 0x05, 0x00, 0x9d, 0x02, 0x00, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0b, 0x0a, // .......N........ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x41, 0x00, // ..>....N......A. - 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, // .......M........ - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0xc1, 0x4d, // ..=............M - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x92, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xcd, 0x0f, // ..A............. - 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xe0, 0x1c, // ......>......... - 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x64, 0x04, // ......8...6...d. - 0x00, 0x00, 0xad, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x37, 0x00, // ..............7. - 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, // ..........7..... - 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x10, 0x46, // ../B..7........F - 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xfe, 0x1d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe1, 0x06, // ..........;..... - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, // ..........;..... - 0x00, 0x00, 0xe5, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, // ..........A..... - 0x00, 0x00, 0x24, 0x53, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ..$S..........>. - 0x03, 0x00, 0x24, 0x53, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, // ..$S......A..... - 0x00, 0x00, 0x9b, 0x49, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, // ...I..........>. - 0x03, 0x00, 0x9b, 0x49, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, // ...I......=..... - 0x00, 0x00, 0x27, 0x2f, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, // ..'/../B..O..... - 0x00, 0x00, 0x64, 0x61, 0x00, 0x00, 0x27, 0x2f, 0x00, 0x00, 0x27, 0x2f, 0x00, 0x00, 0x00, 0x00, // ..da..'/..'/.... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x9d, 0x54, // ...............T - 0x00, 0x00, 0x64, 0x61, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, // ..da......A..... - 0x00, 0x00, 0x27, 0x54, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..'T..B.......=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xc1, 0x47, 0x00, 0x00, 0x27, 0x54, 0x00, 0x00, 0x4f, 0x00, // .......G..'T..O. - 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x98, 0x19, 0x00, 0x00, 0xc1, 0x47, 0x00, 0x00, 0xc1, 0x47, // ...........G...G - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x13, 0x00, // ................ - 0x00, 0x00, 0xfd, 0x4c, 0x00, 0x00, 0x9d, 0x54, 0x00, 0x00, 0x98, 0x19, 0x00, 0x00, 0x3e, 0x00, // ...L...T......>. - 0x03, 0x00, 0xe5, 0x10, 0x00, 0x00, 0xfd, 0x4c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // .......L..A..... - 0x00, 0x00, 0xa6, 0x2a, 0x00, 0x00, 0xe5, 0x10, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ...*..........=. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd0, 0x37, 0x00, 0x00, 0xa6, 0x2a, 0x00, 0x00, 0x83, 0x00, // .......7...*.... - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x00, 0x00, 0xd0, 0x37, 0x00, 0x00, 0x8a, 0x00, // ......u_...7.... - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x66, 0x44, 0x00, 0x00, 0xe5, 0x10, // ..A.......fD.... - 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x22, 0x55, // ......=......."U - 0x00, 0x00, 0x66, 0x44, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9e, 0x55, // ..fD...........U - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x22, 0x55, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, // ......"U..P..... - 0x00, 0x00, 0x7e, 0x1b, 0x00, 0x00, 0x75, 0x5f, 0x00, 0x00, 0x9e, 0x55, 0x00, 0x00, 0x0c, 0x0a, // ..~...u_...U.... - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x12, 0x3d, // ......A........= - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x12, 0x3d, // ..........>....= - 0x00, 0x00, 0x7e, 0x1b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xad, 0x32, // ..~...=........2 - 0x00, 0x00, 0x10, 0x46, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xbd, 0x4d, // ...F..A........M - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbd, 0x4d, // ..........>....M - 0x00, 0x00, 0xad, 0x32, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xae, 0x32, // ...2..=........2 - 0x00, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbe, 0x4d, // ......A........M - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbe, 0x4d, // ..........>....M - 0x00, 0x00, 0xae, 0x32, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x64, 0x04, 0x00, 0x00, 0xf6, 0x31, // ...2..=...d....1 - 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xf6, 0x31, 0x00, 0x00, 0x38, 0x00, // ...........1..8. - 0x01, 0x00, 0x00, // ... + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x3c, 0x0d, 0x00, 0x00, // wTexel......<... + 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x65, 0x61, 0x00, 0x00, // ..#.........ea.. + 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, // ................ + 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, // ....GLSL.std.450 + 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, // ............main + 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // ................ + 0x95, 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, // ....v........... + 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x64, 0x04, 0x00, 0x00, // main........d... + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, // Output......d... + 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // ....gl_Position. + 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, // ....d.......v_co + 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, // lor0........d... + 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // ....v_texcoord0. + 0x05, 0x00, 0x07, 0x00, 0xad, 0x11, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, // ........@main(vf + 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // 4;vf3;vf2;...... + 0xe2, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ....a_color0.... + 0x05, 0x00, 0x05, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // ..../B..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x10, 0x46, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, // on.......F..a_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, 0x00, 0x00, // xcoord0......... + 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, // _varying_....... + 0xe5, 0x10, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x00, 0x05, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // ....pos......... + 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // $Global......... + 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, // ....u_viewRect.. + 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ewTexel......... + 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_view...... + 0x00, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ........u_invVie + 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // w............... + 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // u_proj.......... + 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, // ....u_invProj... + 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, // ewProj.......... + 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ....u_invViewPro + 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // j............... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // u_model......... + 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, // ....u_modelView. + 0x06, 0x00, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, // delViewProj..... + 0x00, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, // ........u_alphaR + 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ef4.....B....... + 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // .....A..a_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, // ............a_co + 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, // lor0.........?.. + 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_position...... + 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, // ....a_position.. + 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ....@,..a_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, // rd0.........a_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, // xcoord0......... + 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, // flattenTemp..... + 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .U..param....... + 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .8..param....... + 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, // ....param....... + 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // ....@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // utput.gl_Positio + 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0x76, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // n.......v...@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, // ryPointOutput.v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x8b, 0x17, 0x00, 0x00, // color0.......... + 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, // @entryPointOutpu + 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, // t.v_texcoord0... + 0x47, 0x00, 0x04, 0x00, 0x08, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // G...........@... + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....H........... + 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // #.......H....... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... + 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // `...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x00, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#... ...H... + 0x00, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // `...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x00, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...G........... + 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...B..."....... + 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G............... + 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // G............... + 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // G............... + 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G............... + 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...v........... + 0x47, 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // G............... + 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, // ........!....... + 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... + 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... + 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... + 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, // ............... + 0x1e, 0x00, 0x05, 0x00, 0x64, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....d........... + 0x13, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x03, 0x09, 0x00, 0x00, 0x64, 0x04, 0x00, 0x00, // ....!.......d... + 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... + 0xe1, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // ........d....... + 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... + 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, // ...........?+... + 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, // ............,... + 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ................ + 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... + 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, // ........,....... + 0x1f, 0x07, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0d, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0x04, 0x00, // ...........@.... + 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... + 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... + 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... + 0x08, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // ....e...j....... + 0x00, 0x09, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x65, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e.......e...e... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7d, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ...}....... + 0x00, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x7d, 0x0b, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // ....;...}...B... + 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9d, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9d, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9d, 0x02, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, // ....;.......v... + 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. + 0x3b, 0x00, 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... + 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........8...... + 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // =........A...... + 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // =........?...... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // =.......@,...... + 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....U...A..>... + 0x95, 0x38, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, // .8...?..>....... + 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x64, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, // @,..9...d...I&.. + 0xad, 0x11, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // .....U...8...... + 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >.......I&..A... + 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....T4.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, // =...........T4.. + 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...........A... + 0x9a, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // =....... ....@.. + 0x3e, 0x00, 0x03, 0x00, 0x76, 0x13, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...v... ...A... + 0x90, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, // =........-...@.. + 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >........-...... + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x64, 0x04, 0x00, 0x00, 0xad, 0x11, 0x00, 0x00, // 8...6...d....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........7....... + 0xe2, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, // ....7......./B.. + 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x10, 0x46, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7........F...... + 0xfe, 0x1d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // ....;........... + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xe5, 0x10, 0x00, 0x00, // ....;........... + 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x24, 0x53, 0x00, 0x00, // ....A.......$S.. + 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x24, 0x53, 0x00, 0x00, // ........>...$S.. + 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9b, 0x49, 0x00, 0x00, // ....A........I.. + 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9b, 0x49, 0x00, 0x00, // ........>....I.. + 0x1f, 0x07, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x27, 0x2f, 0x00, 0x00, // ....=.......'/.. + 0x2f, 0x42, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x64, 0x61, 0x00, 0x00, // /B..O.......da.. + 0x27, 0x2f, 0x00, 0x00, 0x27, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // '/..'/.......... + 0x8e, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x9d, 0x54, 0x00, 0x00, 0x64, 0x61, 0x00, 0x00, // .........T..da.. + 0x19, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x27, 0x54, 0x00, 0x00, // ....A.......'T.. + 0x42, 0x13, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // B.......=....... + 0xc1, 0x47, 0x00, 0x00, 0x27, 0x54, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, // .G..'T..O....... + 0x98, 0x19, 0x00, 0x00, 0xc1, 0x47, 0x00, 0x00, 0xc1, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....G...G...... + 0x01, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0xfd, 0x4c, 0x00, 0x00, // .............L.. + 0x9d, 0x54, 0x00, 0x00, 0x98, 0x19, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe5, 0x10, 0x00, 0x00, // .T......>....... + 0xfd, 0x4c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xa6, 0x2a, 0x00, 0x00, // .L..A........*.. + 0xe5, 0x10, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........=....... + 0xd0, 0x37, 0x00, 0x00, 0xa6, 0x2a, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .7...*.......... + 0x75, 0x5f, 0x00, 0x00, 0xd0, 0x37, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // u_...7......A... + 0x8a, 0x02, 0x00, 0x00, 0x66, 0x44, 0x00, 0x00, 0xe5, 0x10, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, // ....fD.......... + 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x22, 0x55, 0x00, 0x00, 0x66, 0x44, 0x00, 0x00, // =......."U..fD.. + 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9e, 0x55, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // .........U...... + 0x22, 0x55, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7e, 0x1b, 0x00, 0x00, // "U..P.......~... + 0x75, 0x5f, 0x00, 0x00, 0x9e, 0x55, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // u_...U.......... + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x12, 0x3d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A........=...... + 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x12, 0x3d, 0x00, 0x00, 0x7e, 0x1b, 0x00, 0x00, // ....>....=..~... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xad, 0x32, 0x00, 0x00, 0x10, 0x46, 0x00, 0x00, // =........2...F.. + 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xbd, 0x4d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A........M...... + 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbd, 0x4d, 0x00, 0x00, 0xad, 0x32, 0x00, 0x00, // ....>....M...2.. + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xae, 0x32, 0x00, 0x00, 0xe2, 0x2e, 0x00, 0x00, // =........2...... + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbe, 0x4d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A........M...... + 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbe, 0x4d, 0x00, 0x00, 0xae, 0x32, 0x00, 0x00, // ....>....M...2.. + 0x3d, 0x00, 0x04, 0x00, 0x64, 0x04, 0x00, 0x00, 0xf6, 0x31, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // =...d....1...... + 0xfe, 0x00, 0x02, 0x00, 0xf6, 0x31, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .....1..8.... }; -static const uint8_t vs_ocornut_imgui_dx9[359] = +static const uint8_t vs_ocornut_imgui_dx9[361] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x48, 0x01, 0x00, 0x03, // wTexel......H... - 0xfe, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, // .... .CTAB....S. - 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ - 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, // ..L...0......... - 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..<.......u_view - 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, // Texel........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......vs_3_0.Mic - 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL - 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler - 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, // 10.1..Q......... - 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, // .@.......?...... - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... - 0x02, 0xe0, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0xa1, 0x01, 0x00, 0xaa, 0xa0, 0x01, 0x00, // ....U........... - 0x00, 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x01, 0x00, 0xb4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, // ................ - 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x48, 0x01, 0x00, 0x00, // wTexel......H... + 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, // ...... .CTAB.... + 0x53, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, // S............... + 0x00, 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....L...0....... + 0x01, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....<.......u_vi + 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, // ewTexel......... + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, // ........vs_3_0.M + 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, // icrosoft (R) HLS + 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, // L Shader Compile + 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, // r 10.1..Q....... + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, // ...@.......?.... + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ + 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, // ................ + 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, // ................ + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, // ..........U..... + 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0xa1, 0x01, 0x00, 0xaa, 0xa0, // ......U......... + 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x01, 0x00, 0xb4, 0xa0, 0x01, 0x00, 0x00, 0x02, // ................ + 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, // ................ + 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... }; -static const uint8_t vs_ocornut_imgui_dx11[612] = +static const uint8_t vs_ocornut_imgui_dx11[614] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3c, 0x02, 0x44, 0x58, // wTexel......<.DX - 0x42, 0x43, 0x22, 0x5c, 0xcc, 0x36, 0x58, 0xb2, 0x23, 0x45, 0x8a, 0x2b, 0xbd, 0x13, 0xac, 0xf2, // BC"..6X.#E.+.... - 0xa4, 0x09, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // ......<.......,. - 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, // ..........ISGNh. - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........P..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, // ................ - 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ..V............. - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, // .........._..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, // ................ - 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, // ..COLOR.POSITION - 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, // .TEXCOORD.OSGNl. - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........P..... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ - 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........b..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x0c, // ................ - 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO - 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, // LOR.TEXCOORD..SH - 0x44, 0x52, 0x24, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x49, 0x00, 0x00, 0x00, 0x59, 0x00, // DR$...@...I...Y. - 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, // ..F. ........._. - 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, // .........._...2. - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, // ......_...2..... - 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..g.... ........ - 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e.... ......e. - 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, // ..2 ......h..... - 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, // ..6.... .......@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x80, 0x3f, 0x38, 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, // .?8...2.......F. - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F. ....... - 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, // ..2.... ........ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x40, // .......@.....@.@ - 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x32, 0x00, 0x00, 0x0a, 0x22, 0x20, 0x10, 0x00, 0x00, 0x00, // ......2..." .... - 0x00, 0x00, 0x1a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, // ......A........@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, // .....@.@.....?6. - 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x10, // ..6...2 ......F. - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, // ......>......... - 0x10, 0x00, 0x10, 0x00, // .... + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3c, 0x02, 0x00, 0x00, // wTexel......<... + 0x44, 0x58, 0x42, 0x43, 0x22, 0x5c, 0xcc, 0x36, 0x58, 0xb2, 0x23, 0x45, 0x8a, 0x2b, 0xbd, 0x13, // DXBC"..6X.#E.+.. + 0xac, 0xf2, 0xa4, 0x09, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ........<....... + 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, // ,...........ISGN + 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, // h...........P... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....V........... + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, // ............_... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x03, 0x03, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // ....COLOR.POSITI + 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, // ON.TEXCOORD.OSGN + 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, // l...........P... + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, // ............b... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // ....SV_POSITION. + 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, // COLOR.TEXCOORD.. + 0x53, 0x48, 0x44, 0x52, 0x24, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x49, 0x00, 0x00, 0x00, // SHDR$...@...I... + 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // Y...F. ......... + 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _..........._... + 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, // 2......._...2... + 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....g.... ...... + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....e.... ...... + 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, // e...2 ......h... + 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....6.... ...... + 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .@.............. + 0x00, 0x00, 0x80, 0x3f, 0x38, 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...?8...2....... + 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // F.......F. ..... + 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....2.... ...... + 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, // .........@.....@ + 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x32, 0x00, 0x00, 0x0a, 0x22, 0x20, 0x10, 0x00, // .@......2..." .. + 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........A....... + 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, // .@.....@.@.....? + 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F... + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....6...2 ...... + 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, // F.......>....... + 0x01, 0x00, 0x10, 0x00, 0x10, 0x00, // ...... }; static const uint8_t vs_ocornut_imgui_mtl[880] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x4f, 0x03, 0x00, 0x00, // wTexel......O... 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, // using namespace 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, // metal;.struct xl diff --git a/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h b/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h index 1a0540f..bd5c74e 100644 --- a/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h +++ b/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_nanovg_fill_glsl[2928] = { - 0x46, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci + 0x46, 0x53, 0x48, 0x05, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x03, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, // ssorMat.......u_ 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x03, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, // paintMat.......u 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, // _innerCol....... @@ -184,9 +184,9 @@ static const uint8_t fs_nanovg_fill_glsl[2928] = 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, // . gl_FragColor 0x3d, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // = result_1;.}... }; -static const uint8_t fs_nanovg_fill_spv[9799] = +static const uint8_t fs_nanovg_fill_spv[9981] = { - 0x46, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x07, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x46, 0x53, 0x48, 0x05, 0xcf, 0xda, 0x1b, 0x94, 0x07, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, // ams.......u_pain 0x74, 0x4d, 0x61, 0x74, 0x13, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, // tMat.......u_ext 0x65, 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, // entRadius....... @@ -194,615 +194,626 @@ static const uint8_t fs_nanovg_fill_spv[9799] = 0x0a, 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x12, 0x01, 0x00, 0x00, 0x01, // .u_outerCol..... 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x13, 0x01, // ..u_scissorMat.. 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, // .....u_scissorEx - 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0xb8, 0x25, 0x03, 0x02, // tScale.......%.. - 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0xab, 0x62, 0x00, 0x00, 0x00, 0x00, // #..........b.... - 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ - 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. - 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ - 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. - 0x00, 0x00, 0xc1, 0x12, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, // ......t......... - 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ - 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, // ..main........a. - 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, // ..BgfxSampler2D. - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, // ......a.......m_ - 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, // sampler.......a. - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, // ......m_texture. - 0x00, 0x00, 0x05, 0x00, 0x0e, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, // ..........bgfxTe - 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, // xture2D(struct-B - 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, // gfxSampler2D-p1- - 0x74, 0x32, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, // t211;vf2;.....'. - 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // .._sampler...... - 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, // ......_coord.... - 0x07, 0x00, 0xd2, 0x0c, 0x00, 0x00, 0x6d, 0x69, 0x78, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, // ......mix(vf4;vf - 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc6, 0x0e, // 4;vf4;.......... - 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x5f, 0x62, // .._a.........._b - 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x5f, 0x74, 0x00, 0x00, 0x05, 0x00, // .........._t.... - 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, // ..5...vec4_splat - 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, // (f1;.........._x - 0x00, 0x00, 0x05, 0x00, 0x08, 0x00, 0x91, 0x0e, 0x00, 0x00, 0x73, 0x64, 0x72, 0x6f, 0x75, 0x6e, // ..........sdroun - 0x64, 0x72, 0x65, 0x63, 0x74, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x66, 0x31, // drect(vf2;vf2;f1 - 0x3b, 0x00, 0x05, 0x00, 0x03, 0x00, 0x08, 0x3e, 0x00, 0x00, 0x70, 0x74, 0x00, 0x00, 0x05, 0x00, // ;......>..pt.... - 0x03, 0x00, 0x40, 0x0d, 0x00, 0x00, 0x65, 0x78, 0x74, 0x00, 0x05, 0x00, 0x03, 0x00, 0x4d, 0x17, // ..@...ext.....M. - 0x00, 0x00, 0x72, 0x61, 0x64, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x73, 0x63, // ..rad.........sc - 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x73, 0x6b, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, // issorMask(vf2;.. - 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc2, 0x10, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x05, 0x00, // ..........p..... - 0x06, 0x00, 0xe2, 0x0b, 0x00, 0x00, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x4d, 0x61, 0x73, 0x6b, // ......strokeMask - 0x28, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x1c, 0x12, 0x00, 0x00, 0x5f, 0x74, // (vf2;........._t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x20, 0x14, // excoord....... . - 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x32, 0x3b, // ..@main(vf2;vf2; - 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xc2, 0x1a, 0x00, 0x00, 0x76, 0x5f, // vf4;..........v_ - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x09, 0x40, // position.......@ - 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... - 0x06, 0x00, 0x46, 0x51, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // ..FQ..gl_FragDat - 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xfe, 0x0e, 0x00, 0x00, 0x73, 0x5f, // a_0_..........s_ - 0x74, 0x65, 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x73, 0x5f, // tex...........s_ - 0x74, 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // texSampler...... - 0x06, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, // ..K...s_texTextu - 0x72, 0x65, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x65, 0x78, // re............ex - 0x74, 0x32, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdf, 0x55, 0x00, 0x00, 0x64, 0x00, // t2.........U..d. - 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x0a, 0x17, 0x00, 0x00, 0x73, 0x63, 0x00, 0x00, 0x05, 0x00, // ..........sc.... - 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, // ......$Global... - 0x06, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x01, 0x00, // Rect............ - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, // ..u_viewTexel... - 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view - 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xff, 0x0a, // invView......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ......u_proj.... - 0x06, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, // ..........u_invP - 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x06, 0x00, // roj............. - 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ..u_viewProj.... - 0x07, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xff, 0x0a, // iewProj......... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, // ......u_model... - 0x06, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode - 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0a, 0x00, // lView........... - 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ..u_modelViewPro - 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, // j.............u_ - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x07, 0x00, 0xff, 0x0a, // alphaRef4....... - 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, // ......u_scissorM - 0x61, 0x74, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0d, 0x00, // at.............. - 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x00, 0x00, 0x06, 0x00, // ..u_paintMat.... - 0x06, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x6e, 0x65, // ..........u_inne - 0x72, 0x43, 0x6f, 0x6c, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0f, 0x00, // rCol............ - 0x00, 0x00, 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x00, 0x00, 0x06, 0x00, // ..u_outerCol.... - 0x08, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, // ..........u_scis - 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x06, 0x00, // sorExtScale..... - 0x07, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, // ..........u_exte - 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xff, 0x0a, // ntRadius........ - 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x00, // ......u_params.. - 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ......B......... - 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, // ......bgfx_VoidF - 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1e, 0x4b, 0x00, 0x00, 0x70, 0x61, // rag........K..pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x60, 0x0d, 0x00, 0x00, 0x73, 0x63, // ram.......`...sc - 0x69, 0x73, 0x73, 0x6f, 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3f, 0x27, 0x00, 0x00, 0x70, 0x61, // issor.....?'..pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x38, 0x17, 0x00, 0x00, 0x73, 0x74, // ram.......8...st - 0x72, 0x6f, 0x6b, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x05, 0x00, 0x04, 0x00, 0x40, 0x27, // rokeAlpha.....@' - 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xeb, 0x21, // ..param........! - 0x00, 0x00, 0x70, 0x74, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xb6, 0x10, 0x00, 0x00, 0x64, 0x00, // ..pt..........d. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x41, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ......A'..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x42, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ......B'..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x43, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ......C'..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x44, 0x27, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // ......D'..color. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x45, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ......E'..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x46, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ......F'..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x47, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, // ......G'..param. - 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, // ..........result - 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x0b, 0x17, 0x00, 0x00, 0x70, 0x74, 0x00, 0x00, 0x05, 0x00, // ..........pt.... - 0x04, 0x00, 0x48, 0x27, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, // ..H'..color..... - 0x04, 0x00, 0x49, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ..I'..param..... - 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, // ......color..... - 0x04, 0x00, 0x12, 0x25, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ...%..param..... - 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // ...A..v_position - 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xc1, 0x12, 0x00, 0x00, 0x76, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ..........v_posi - 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, // tion.......<..v_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, // texcoord0.....t. - 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... - 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // ......gl_FragDat - 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, // a_0_.......G..pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, // ram........U..pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, // ram...........pa - 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, // ram...........gl - 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, // _FragData_0_..G. - 0x04, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......".......G. - 0x04, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ......!.......G. - 0x04, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..K...".......G. - 0x04, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, // ..K...!.......G. - 0x04, 0x00, 0x06, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, // ..........@...H. - 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x02, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x02, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, // ..#... ...H..... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, // ..........#...`. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x04, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x04, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, // ..#.......H..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x06, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x06, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, // ..#... ...H..... - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, // ..........#...`. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x08, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x08, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, // ..#.......H..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0a, 0x00, // ......H......... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0a, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, // ..#.......H..... - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. - 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, // ..........#... . - 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0c, 0x00, // ..0...H......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xff, 0x0a, // ..........H..... - 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, // ..........H..... - 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x0a, 0x00, 0x00, 0x48, 0x00, // ......#...`...H. - 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0x90, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x0f, 0x00, // ......H......... - 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, // ..#.......H..... - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xb0, 0x0a, 0x00, 0x00, 0x48, 0x00, // ......#.......H. - 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xc0, 0x0a, // ..........#..... - 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. - 0x00, 0x00, 0xd0, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x02, 0x00, // ......G......... - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G...B..."..... - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc1, 0x12, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, // ..G...t......... - 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, // ..G............. - 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, // ..........!..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, // ................ - 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, // ...... ......... - 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, // ................ - 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, // ..a........... . - 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, // ..........a..... - 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, // ................ - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. - 0x05, 0x00, 0xc2, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, // ................ - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. - 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9a, 0x02, // ..!............. - 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, // .......... ..... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, // ..........!..... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xc8, 0x0b, // ..........!..... - 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x8a, 0x02, // ................ - 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x90, 0x02, // ..!............. - 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x90, 0x02, // ..!...K......... - 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, // ..........;..... - 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, // .......... ...y. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, // ..........;...y. - 0x00, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, // .......... ..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, // ..........;..... - 0x00, 0x00, 0x4b, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..K............. - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // .. .......+..... - 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..........+..... - 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, // ................ - 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, // ......+......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, // ......+......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, // ......+......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1f, 0x07, // ......,......... - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........+..... - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, // .........?...... - 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, // ..............e. - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // ..........+..... - 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x06, 0x0b, // ..j... ......... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x46, 0x00, // ..e...j.......F. - 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x15, 0x00, 0xff, 0x0a, // ................ - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..........e...e. - 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. - 0x00, 0x00, 0x06, 0x0b, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......e...e..... - 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, // ..F...F......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . - 0x04, 0x00, 0xb9, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x3b, 0x00, // ..............;. - 0x04, 0x00, 0xb9, 0x01, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, // ......B.......+. - 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, // ....../....... . - 0x04, 0x00, 0xc3, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..........F...+. - 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x3b, 0x0a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, // ......;....... . - 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x2c, 0x00, // .............?,. - 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, // ................ - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, // ..+............. - 0x00, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x12, 0x00, // .@+.......A..... - 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. - 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, // ..+............. - 0x00, 0x00, 0x14, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..........+..... - 0x00, 0x00, 0x32, 0x0a, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..2.......+..... - 0x00, 0x00, 0x3e, 0x0a, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, // ..>.......+..... - 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..........+..... - 0x00, 0x00, 0x35, 0x0a, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, // ..5.......+..... - 0x00, 0x00, 0x38, 0x0a, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, // ..8.......,..... - 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, // ................ - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa2, 0x0b, // ......+......... - 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, // ....@@ ......... - 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0xc1, 0x12, // ......;......... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, // ......;.......t. - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... - 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, // ......;......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, // ......6......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, // ..............Sa - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, // ..;........G.... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, // ..;........U.... - 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, // ..;............. - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x0f, 0x0d, // ..=.......!C.... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x4b, 0x0f, // ..=........3..K. - 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, // ..P...a.... ..!C - 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xfe, 0x0e, 0x00, 0x00, 0x12, 0x20, // ...3..>........ - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0xc1, 0x12, // ..=........A.... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, // ..=........<..t. - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, // ..>....G...A..>. - 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, // ...U...<..9..... - 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x20, 0x14, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, // ...&.. ....G...U - 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, // ......=......... - 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, // ......>......... - 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ......8...6..... - 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x03, 0x00, 0x00, 0x37, 0x00, // ..............7. - 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......'...7..... - 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xcd, 0x5b, 0x00, 0x00, 0x41, 0x00, // ...........[..A. - 0x05, 0x00, 0x13, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, // ......i$..'..... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x69, 0x24, // ..=........1..i$ - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x79, 0x04, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x27, 0x0e, // ..A...y...TD..'. - 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x9b, 0x56, // ......=........V - 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xc9, 0x42, // ..TD..V........B - 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ...1...V..=..... - 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, // ..6.......W..... - 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xfe, 0x00, // ...Q...B..6..... - 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ...Q..8...6..... - 0x00, 0x00, 0xd2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x37, 0x00, // ..............7. - 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, // ..........7..... - 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xd9, 0x0e, // ......7......... - 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x4e, 0x50, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ......NP..=..... - 0x00, 0x00, 0x29, 0x1a, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..).......=..... - 0x00, 0x00, 0x3f, 0x3f, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..??......=..... - 0x00, 0x00, 0x46, 0x3e, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x1d, 0x00, // ..F>............ - 0x00, 0x00, 0xcd, 0x42, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x29, 0x1a, // ...B..........). - 0x00, 0x00, 0x3f, 0x3f, 0x00, 0x00, 0x46, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xcd, 0x42, // ..??..F>.......B - 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, // ..8...6.......5. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, // ..........7..... - 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x02, 0x2d, 0x00, 0x00, 0x3d, 0x00, // ...........-..=. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1e, 0x5e, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, // .......^......=. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x63, 0x55, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, // ......cU......=. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xca, 0x26, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, // .......&......=. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xdd, 0x26, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, // .......&......P. - 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2a, 0x29, 0x00, 0x00, 0x1e, 0x5e, 0x00, 0x00, 0x63, 0x55, // ......*)...^..cU - 0x00, 0x00, 0xca, 0x26, 0x00, 0x00, 0xdd, 0x26, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x2a, 0x29, // ...&...&......*) - 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x91, 0x0e, // ..8...6......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ..........7..... - 0x00, 0x00, 0x08, 0x3e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x40, 0x0d, // ...>..7.......@. - 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4d, 0x17, 0x00, 0x00, 0xf8, 0x00, // ..7.......M..... - 0x02, 0x00, 0x16, 0x1c, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xdf, 0x55, // ......;........U - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x93, 0x59, // ......=........Y - 0x00, 0x00, 0x40, 0x0d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xbb, 0x22, // ..@...=........" - 0x00, 0x00, 0x4d, 0x17, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfa, 0x1f, // ..M...=......... - 0x00, 0x00, 0x4d, 0x17, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0xb5, 0x36, // ..M...P........6 - 0x00, 0x00, 0xbb, 0x22, 0x00, 0x00, 0xfa, 0x1f, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x13, 0x00, // ..."............ - 0x00, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x93, 0x59, 0x00, 0x00, 0xb5, 0x36, 0x00, 0x00, 0x3d, 0x00, // .......Y...6..=. - 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xaa, 0x62, 0x00, 0x00, 0x08, 0x3e, 0x00, 0x00, 0x0c, 0x00, // .......b...>.... - 0x06, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd8, 0x5d, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, // .......]........ - 0x00, 0x00, 0xaa, 0x62, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x2a, // ...b.......... * - 0x00, 0x00, 0xd8, 0x5d, 0x00, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xdf, 0x55, // ...]......>....U - 0x00, 0x00, 0x20, 0x2a, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x65, 0x1d, // .. *..A.......e. - 0x00, 0x00, 0xdf, 0x55, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ...U......=..... - 0x00, 0x00, 0x10, 0x62, 0x00, 0x00, 0x65, 0x1d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ...b..e...A..... - 0x00, 0x00, 0xb8, 0x45, 0x00, 0x00, 0xdf, 0x55, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ...E...U......=. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x78, 0x32, 0x00, 0x00, 0xb8, 0x45, 0x00, 0x00, 0x0c, 0x00, // ......x2...E.... - 0x07, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x00, // .......R......(. - 0x00, 0x00, 0x10, 0x62, 0x00, 0x00, 0x78, 0x32, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, // ...b..x2........ - 0x00, 0x00, 0x57, 0x41, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x02, 0x52, // ..WA......%....R - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x91, 0x41, // ......=........A - 0x00, 0x00, 0xdf, 0x55, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x5a, 0x22, // ...U..........Z" - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x91, 0x41, 0x00, 0x00, 0x1f, 0x07, // ......(....A.... - 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb2, 0x4a, 0x00, 0x00, 0x01, 0x00, // ...........J.... - 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x5a, 0x22, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..B...Z"........ - 0x00, 0x00, 0x10, 0x5b, 0x00, 0x00, 0x57, 0x41, 0x00, 0x00, 0xb2, 0x4a, 0x00, 0x00, 0x3d, 0x00, // ...[..WA...J..=. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x53, 0x5a, 0x00, 0x00, 0x4d, 0x17, 0x00, 0x00, 0x83, 0x00, // ......SZ..M..... - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa4, 0x59, 0x00, 0x00, 0x10, 0x5b, 0x00, 0x00, 0x53, 0x5a, // .......Y...[..SZ - 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x59, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // .......Y..8...6. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x00, // ................ - 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc2, 0x10, 0x00, 0x00, 0xf8, 0x00, // ..7............. - 0x02, 0x00, 0x0d, 0x36, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x0a, 0x17, // ...6..;......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x72, 0x57, // ......=.......rW - 0x00, 0x00, 0xc2, 0x10, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x81, 0x3d, // ......Q........= - 0x00, 0x00, 0x72, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..rW......Q..... - 0x00, 0x00, 0xcb, 0x46, 0x00, 0x00, 0x72, 0x57, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, // ...F..rW......P. - 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0xb4, 0x32, 0x00, 0x00, 0x81, 0x3d, 0x00, 0x00, 0xcb, 0x46, // .......2...=...F - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xc3, 0x02, 0x00, 0x00, 0x59, 0x2c, // ......A.......Y, - 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x46, 0x00, // ..B.../...=...F. - 0x00, 0x00, 0xf4, 0x24, 0x00, 0x00, 0x59, 0x2c, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x18, 0x00, // ...$..Y,........ - 0x00, 0x00, 0xa7, 0x2e, 0x00, 0x00, 0xb4, 0x32, 0x00, 0x00, 0xf4, 0x24, 0x00, 0x00, 0x4f, 0x00, // .......2...$..O. - 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0xba, 0x57, 0x00, 0x00, 0xa7, 0x2e, 0x00, 0x00, 0xa7, 0x2e, // .......W........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x13, 0x00, // ................ - 0x00, 0x00, 0x45, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xba, 0x57, // ..ER...........W - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x19, 0x25, 0x00, 0x00, 0x42, 0x13, // ..A........%..B. - 0x00, 0x00, 0x3b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x05, 0x4e, // ..;...=........N - 0x00, 0x00, 0x19, 0x25, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x11, 0x54, // ...%..O........T - 0x00, 0x00, 0x05, 0x4e, 0x00, 0x00, 0x05, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ...N...N........ - 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd4, 0x30, 0x00, 0x00, 0x45, 0x52, // ...........0..ER - 0x00, 0x00, 0x11, 0x54, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0a, 0x17, 0x00, 0x00, 0xd4, 0x30, // ...T..>........0 - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x98, 0x40, 0x00, 0x00, 0x0a, 0x17, // ..=........@.... - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x60, 0x3e, 0x00, 0x00, 0x42, 0x13, // ..A.......`>..B. - 0x00, 0x00, 0x3b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x16, 0x58, // ..;...=........X - 0x00, 0x00, 0x60, 0x3e, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd6, 0x57, // ..`>..O........W - 0x00, 0x00, 0x16, 0x58, 0x00, 0x00, 0x16, 0x58, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, // ...X...X........ - 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x42, 0x57, 0x00, 0x00, 0x98, 0x40, // ..........BW...@ - 0x00, 0x00, 0xd6, 0x57, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0xe5, 0x61, // ...W...........a - 0x00, 0x00, 0x1e, 0x06, 0x00, 0x00, 0x42, 0x57, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0a, 0x17, // ......BW..>..... - 0x00, 0x00, 0xe5, 0x61, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xce, 0x54, // ...a..A........T - 0x00, 0x00, 0x0a, 0x17, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........=..... - 0x00, 0x00, 0xfd, 0x22, 0x00, 0x00, 0xce, 0x54, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x0d, 0x00, // ..."...T........ - 0x00, 0x00, 0x5a, 0x4e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0xfd, 0x22, // ..ZN......+...." - 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ..........A..... - 0x00, 0x00, 0xf7, 0x50, 0x00, 0x00, 0x0a, 0x17, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ...P..........=. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x22, 0x00, 0x00, 0xf7, 0x50, 0x00, 0x00, 0x0c, 0x00, // ......."...P.... - 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb9, 0x2e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. - 0x00, 0x00, 0xb3, 0x22, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x85, 0x00, // ..."............ - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xbd, 0x48, 0x00, 0x00, 0x5a, 0x4e, 0x00, 0x00, 0xb9, 0x2e, // .......H..ZN.... - 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xbd, 0x48, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, // .......H..8...6. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xe2, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x00, // ................ - 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x1c, 0x12, 0x00, 0x00, 0xf8, 0x00, // ..7............. - 0x02, 0x00, 0x8c, 0x31, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xfc, 0x21, // ...1..A........! - 0x00, 0x00, 0x1c, 0x12, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........=..... - 0x00, 0x00, 0x5a, 0x4b, 0x00, 0x00, 0xfc, 0x21, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, // ..ZK...!........ - 0x00, 0x00, 0xb1, 0x42, 0x00, 0x00, 0x5a, 0x4b, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x83, 0x00, // ...B..ZK........ - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1b, 0x37, 0x00, 0x00, 0xb1, 0x42, 0x00, 0x00, 0x8a, 0x00, // .......7...B.... - 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb8, 0x56, 0x00, 0x00, 0x01, 0x00, // ...........V.... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1b, 0x37, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, // .......7........ - 0x00, 0x00, 0xcb, 0x5e, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0xb8, 0x56, 0x00, 0x00, 0x41, 0x00, // ...^.......V..A. - 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x60, 0x2a, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, // ......`*..B...A. - 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd9, 0x57, // ......=........W - 0x00, 0x00, 0x60, 0x2a, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x16, 0x20, // ..`*........... - 0x00, 0x00, 0xcb, 0x5e, 0x00, 0x00, 0xd9, 0x57, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, // ...^...W........ - 0x00, 0x00, 0xa1, 0x54, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x8a, 0x00, // ...T......%..... - 0x00, 0x00, 0x16, 0x20, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x87, 0x55, // ... ..A........U - 0x00, 0x00, 0x1c, 0x12, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........=..... - 0x00, 0x00, 0xa7, 0x42, 0x00, 0x00, 0x87, 0x55, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, // ...B...U........ - 0x00, 0x00, 0xff, 0x42, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x8a, 0x00, // ...B......%..... - 0x00, 0x00, 0xa7, 0x42, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x3f, // ...B...........? - 0x00, 0x00, 0xa1, 0x54, 0x00, 0x00, 0xff, 0x42, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xb3, 0x3f, // ...T...B.......? - 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x14, // ..8...6....... . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......K...7..... - 0x00, 0x00, 0xc2, 0x1a, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x09, 0x40, // ......7........@ - 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x46, 0x51, 0x00, 0x00, 0xf8, 0x00, // ..7.......FQ.... - 0x02, 0x00, 0x7a, 0x5a, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x1e, 0x4b, // ..zZ..;........K - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x60, 0x0d, // ......;.......`. - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x3f, 0x27, // ......;.......?' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x38, 0x17, // ......;.......8. - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x40, 0x27, // ......;.......@' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x41, 0x27, // ......;.......A' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x42, 0x27, // ......;.......B' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x43, 0x27, // ......;.......C' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x44, 0x27, // ......;.......D' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x45, 0x27, // ......;.......E' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x46, 0x27, // ......;.......F' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x47, 0x27, // ......;.......G' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa2, 0x10, // ......;......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x48, 0x27, // ......;.......H' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x49, 0x27, // ......;.......I' - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x18, 0x0e, // ......;......... - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x12, 0x25, // ......;........% - 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x1e, 0x4b, 0x00, 0x00, 0x0c, 0x0a, // ......>....K.... - 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, // ..9...........5. - 0x00, 0x00, 0x1e, 0x4b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x91, 0x47, // ...K..=........G - 0x00, 0x00, 0xc2, 0x1a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3f, 0x27, 0x00, 0x00, 0x91, 0x47, // ......>...?'...G - 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x89, 0x4f, 0x00, 0x00, 0x00, 0x0f, // ..9........O.... - 0x00, 0x00, 0x3f, 0x27, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x60, 0x0d, 0x00, 0x00, 0x89, 0x4f, // ..?'..>...`....O - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x57, 0x26, 0x00, 0x00, 0x09, 0x40, // ..=.......W&...@ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x40, 0x27, 0x00, 0x00, 0x57, 0x26, 0x00, 0x00, 0x39, 0x00, // ..>...@'..W&..9. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd5, 0x4f, 0x00, 0x00, 0xe2, 0x0b, 0x00, 0x00, 0x40, 0x27, // .......O......@' - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x38, 0x17, 0x00, 0x00, 0xd5, 0x4f, 0x00, 0x00, 0x41, 0x00, // ..>...8....O..A. - 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x1f, 0x45, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, // .......E..B...A. - 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb1, 0x60, // ......=........` - 0x00, 0x00, 0x1f, 0x45, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x34, 0x2b, // ...E..........4+ - 0x00, 0x00, 0xb1, 0x60, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0xb4, 0x31, // ...`...........1 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x34, 0x2b, 0x00, 0x00, 0x61, 0x22, // ..........4+..a" - 0x00, 0x00, 0x2d, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x61, 0x22, 0x00, 0x00, 0x3d, 0x00, // ..-Y......a"..=. - 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xdd, 0x2d, 0x00, 0x00, 0xc2, 0x1a, 0x00, 0x00, 0x51, 0x00, // .......-......Q. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf4, 0x5d, 0x00, 0x00, 0xdd, 0x2d, 0x00, 0x00, 0x00, 0x00, // .......]...-.... - 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x28, 0x4a, 0x00, 0x00, 0xdd, 0x2d, // ..Q.......(J...- - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x11, 0x36, // ......P........6 - 0x00, 0x00, 0xf4, 0x5d, 0x00, 0x00, 0x28, 0x4a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, // ...]..(J......A. - 0x05, 0x00, 0xc3, 0x02, 0x00, 0x00, 0xfc, 0x60, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x32, 0x0a, // .......`..B...2. - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00, 0x51, 0x28, 0x00, 0x00, 0xfc, 0x60, // ..=...F...Q(...` - 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x7d, 0x1c, 0x00, 0x00, 0x11, 0x36, // ..........}....6 - 0x00, 0x00, 0x51, 0x28, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0xeb, 0x21, // ..Q(..O........! - 0x00, 0x00, 0x7d, 0x1c, 0x00, 0x00, 0x7d, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..}...}......... - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x41, 0x27, 0x00, 0x00, 0xeb, 0x21, 0x00, 0x00, 0x41, 0x00, // ..>...A'...!..A. - 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x7d, 0x50, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x3e, 0x0a, // ......}P..B...>. - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x4c, 0x00, 0x00, 0x7d, 0x50, // ..=........L..}P - 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0xc9, 0x3b, 0x00, 0x00, 0xb8, 0x4c, // ..O........;...L - 0x00, 0x00, 0xb8, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, // ...L..........>. - 0x03, 0x00, 0x42, 0x27, 0x00, 0x00, 0xc9, 0x3b, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, // ..B'...;..A..... - 0x00, 0x00, 0x3a, 0x4f, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x3e, 0x0a, 0x00, 0x00, 0x10, 0x0a, // ..:O..B...>..... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd7, 0x57, 0x00, 0x00, 0x3a, 0x4f, // ..=........W..:O - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x27, 0x00, 0x00, 0xd7, 0x57, 0x00, 0x00, 0x39, 0x00, // ..>...C'...W..9. - 0x07, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x82, 0x4d, 0x00, 0x00, 0x91, 0x0e, 0x00, 0x00, 0x41, 0x27, // .......M......A' - 0x00, 0x00, 0x42, 0x27, 0x00, 0x00, 0x43, 0x27, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, // ..B'..C'..A..... - 0x00, 0x00, 0x5d, 0x18, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x0a, 0x0a, // ..]...B...A..... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0f, 0x2a, 0x00, 0x00, 0x5d, 0x18, // ..=........*..]. - 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x34, 0x4a, 0x00, 0x00, 0x0f, 0x2a, // ..........4J...* - 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf6, 0x38, // ...............8 - 0x00, 0x00, 0x82, 0x4d, 0x00, 0x00, 0x34, 0x4a, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, // ...M..4J..A..... - 0x00, 0x00, 0x7a, 0x20, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x0a, 0x0a, // ..z ..B...A..... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc9, 0x51, 0x00, 0x00, 0x7a, 0x20, // ..=........Q..z - 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0xf6, 0x38, // ...........1...8 - 0x00, 0x00, 0xc9, 0x51, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb6, 0x10, // ...Q............ - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x0c, 0x0a, // ......+....1.... - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x18, // ......P......... - 0x00, 0x00, 0xb6, 0x10, 0x00, 0x00, 0xb6, 0x10, 0x00, 0x00, 0xb6, 0x10, 0x00, 0x00, 0xb6, 0x10, // ................ - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xc3, 0x58, 0x00, 0x00, 0x42, 0x13, // ..A........X..B. - 0x00, 0x00, 0x35, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb1, 0x5e, // ..5...=........^ - 0x00, 0x00, 0xc3, 0x58, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x45, 0x27, 0x00, 0x00, 0xb1, 0x5e, // ...X..>...E'...^ - 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xbe, 0x2f, 0x00, 0x00, 0x42, 0x13, // ..A......../..B. - 0x00, 0x00, 0x38, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x58, // ..8...=.......5X - 0x00, 0x00, 0xbe, 0x2f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x46, 0x27, 0x00, 0x00, 0x35, 0x58, // .../..>...F'..5X - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x47, 0x27, 0x00, 0x00, 0xa0, 0x18, 0x00, 0x00, 0x39, 0x00, // ..>...G'......9. - 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x4c, 0x5f, 0x00, 0x00, 0xd2, 0x0c, 0x00, 0x00, 0x45, 0x27, // ......L_......E' - 0x00, 0x00, 0x46, 0x27, 0x00, 0x00, 0x47, 0x27, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x44, 0x27, // ..F'..G'..>...D' - 0x00, 0x00, 0x4c, 0x5f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa8, 0x2c, // ..L_..=........, - 0x00, 0x00, 0x38, 0x17, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x44, 0x45, // ..8...=.......DE - 0x00, 0x00, 0x60, 0x0d, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc6, 0x26, // ..`............& - 0x00, 0x00, 0xa8, 0x2c, 0x00, 0x00, 0x44, 0x45, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ...,..DE..=..... - 0x00, 0x00, 0x1a, 0x2e, 0x00, 0x00, 0x44, 0x27, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x1d, 0x00, // ......D'........ - 0x00, 0x00, 0x4e, 0x5c, 0x00, 0x00, 0x1a, 0x2e, 0x00, 0x00, 0xc6, 0x26, 0x00, 0x00, 0x3e, 0x00, // ..N........&..>. - 0x03, 0x00, 0x44, 0x27, 0x00, 0x00, 0x4e, 0x5c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..D'..N...=..... - 0x00, 0x00, 0x7c, 0x1f, 0x00, 0x00, 0x44, 0x27, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa2, 0x10, // ..|...D'..>..... - 0x00, 0x00, 0x7c, 0x1f, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0xb4, 0x31, 0x00, 0x00, 0xf8, 0x00, // ..|........1.... - 0x02, 0x00, 0x2d, 0x59, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xf1, 0x47, // ..-Y..A........G - 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..B...A.......=. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x71, 0x36, 0x00, 0x00, 0xf1, 0x47, 0x00, 0x00, 0xb4, 0x00, // ......q6...G.... - 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x35, 0x2b, 0x00, 0x00, 0x71, 0x36, 0x00, 0x00, 0x8a, 0x00, // ......5+..q6.... - 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0x75, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, // ......uU........ - 0x04, 0x00, 0x35, 0x2b, 0x00, 0x00, 0x62, 0x22, 0x00, 0x00, 0x30, 0x59, 0x00, 0x00, 0xf8, 0x00, // ..5+..b"..0Y.... - 0x02, 0x00, 0x62, 0x22, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xde, 0x2d, // ..b"..=........- - 0x00, 0x00, 0xc2, 0x1a, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf5, 0x5d, // ......Q........] - 0x00, 0x00, 0xde, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ...-......Q..... - 0x00, 0x00, 0x29, 0x4a, 0x00, 0x00, 0xde, 0x2d, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, // ..)J...-......P. - 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x12, 0x36, 0x00, 0x00, 0xf5, 0x5d, 0x00, 0x00, 0x29, 0x4a, // .......6...]..)J - 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xc3, 0x02, 0x00, 0x00, 0xfd, 0x60, // ......A........` - 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x32, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x46, 0x00, // ..B...2...=...F. - 0x00, 0x00, 0x52, 0x28, 0x00, 0x00, 0xfd, 0x60, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x18, 0x00, // ..R(...`........ - 0x00, 0x00, 0xb6, 0x1c, 0x00, 0x00, 0x12, 0x36, 0x00, 0x00, 0x52, 0x28, 0x00, 0x00, 0x4f, 0x00, // .......6..R(..O. - 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x98, 0x1f, 0x00, 0x00, 0xb6, 0x1c, 0x00, 0x00, 0xb6, 0x1c, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, // ..........A..... - 0x00, 0x00, 0x63, 0x4e, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x3e, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ..cN..B...>...=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xef, 0x61, 0x00, 0x00, 0x63, 0x4e, 0x00, 0x00, 0x4f, 0x00, // .......a..cN..O. - 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x54, 0x00, 0x00, 0xef, 0x61, 0x00, 0x00, 0xef, 0x61, // .......T...a...a - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, 0x13, 0x00, // ................ - 0x00, 0x00, 0x0b, 0x17, 0x00, 0x00, 0x98, 0x1f, 0x00, 0x00, 0x0d, 0x54, 0x00, 0x00, 0x3e, 0x00, // ...........T..>. - 0x03, 0x00, 0x49, 0x27, 0x00, 0x00, 0x0b, 0x17, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, // ..I'......9..... - 0x00, 0x00, 0x72, 0x34, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, 0x49, 0x27, // ..r4..........I' - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x48, 0x27, 0x00, 0x00, 0x72, 0x34, 0x00, 0x00, 0x41, 0x00, // ..>...H'..r4..A. - 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x20, 0x45, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, // ...... E..B...A. - 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb2, 0x60, // ......=........` - 0x00, 0x00, 0x20, 0x45, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x36, 0x2b, // .. E..........6+ - 0x00, 0x00, 0xb2, 0x60, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0x2e, 0x59, // ...`...........Y - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x36, 0x2b, 0x00, 0x00, 0x3b, 0x22, // ..........6+..;" - 0x00, 0x00, 0x2e, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x3b, 0x22, 0x00, 0x00, 0x3d, 0x00, // ...Y......;"..=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x07, 0x2e, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, 0x4f, 0x00, // ..........H'..O. - 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xde, 0x5c, 0x00, 0x00, 0x07, 0x2e, 0x00, 0x00, 0x07, 0x2e, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, // ..............A. - 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xf9, 0x23, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, 0x13, 0x0a, // .......#..H'.... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x32, 0x00, 0x00, 0xf9, 0x23, // ..=........2...# - 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x63, 0x1b, 0x00, 0x00, 0xde, 0x5c, // ..........c..... - 0x00, 0x00, 0x17, 0x32, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x40, // ...2..A........@ - 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..H'......=..... - 0x00, 0x00, 0x88, 0x34, 0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ...4...@..Q..... - 0x00, 0x00, 0x9f, 0x3a, 0x00, 0x00, 0x63, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, // ...:..c.......Q. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x98, 0x4a, 0x00, 0x00, 0x63, 0x1b, 0x00, 0x00, 0x01, 0x00, // .......J..c..... - 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x7f, 0x56, 0x00, 0x00, 0x63, 0x1b, // ..Q........V..c. - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0c, 0x46, // ......P........F - 0x00, 0x00, 0x9f, 0x3a, 0x00, 0x00, 0x98, 0x4a, 0x00, 0x00, 0x7f, 0x56, 0x00, 0x00, 0x88, 0x34, // ...:...J...V...4 - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x48, 0x27, 0x00, 0x00, 0x0c, 0x46, 0x00, 0x00, 0xf9, 0x00, // ..>...H'...F.... - 0x02, 0x00, 0x2e, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2e, 0x59, 0x00, 0x00, 0x41, 0x00, // ...Y.......Y..A. - 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xf2, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, // .......G..B...A. - 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x72, 0x36, // ......=.......r6 - 0x00, 0x00, 0xf2, 0x47, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x37, 0x2b, // ...G..........7+ - 0x00, 0x00, 0x72, 0x36, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0x2f, 0x59, // ..r6........../Y - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x37, 0x2b, 0x00, 0x00, 0x3c, 0x22, // ..........7+..<" - 0x00, 0x00, 0x2f, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x3c, 0x22, 0x00, 0x00, 0x3d, 0x00, // ../Y......<"..=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x2d, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, 0x4f, 0x00, // .......-..H'..O. - 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x5b, 0x22, 0x00, 0x00, 0xce, 0x2d, 0x00, 0x00, 0xce, 0x2d, // ......["...-...- - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x48, 0x27, 0x00, 0x00, 0x5b, 0x22, 0x00, 0x00, 0xf9, 0x00, // ..>...H'..[".... - 0x02, 0x00, 0x2f, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2f, 0x59, 0x00, 0x00, 0x41, 0x00, // ../Y....../Y..A. - 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x1c, 0x3f, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x35, 0x0a, // .......?..B...5. - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe7, 0x33, 0x00, 0x00, 0x1c, 0x3f, // ..=........3...? - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2e, 0x42, 0x00, 0x00, 0x48, 0x27, // ..=........B..H' - 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x20, 0x00, 0x00, 0x2e, 0x42, // ........... ...B - 0x00, 0x00, 0xe7, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x48, 0x27, 0x00, 0x00, 0x17, 0x20, // ...3..>...H'... - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x4e, 0x52, 0x00, 0x00, 0x38, 0x17, // ..=.......NR..8. - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x45, 0x45, 0x00, 0x00, 0x60, 0x0d, // ..=.......EE..`. - 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc7, 0x26, 0x00, 0x00, 0x4e, 0x52, // ...........&..NR - 0x00, 0x00, 0x45, 0x45, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x2e, // ..EE..=......... - 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x4f, 0x5c, // ..H'..........O. - 0x00, 0x00, 0x1b, 0x2e, 0x00, 0x00, 0xc7, 0x26, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x48, 0x27, // .......&..>...H' - 0x00, 0x00, 0x4f, 0x5c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7d, 0x1f, // ..O...=.......}. - 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x7d, 0x1f, // ..H'..>.......}. - 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x75, 0x55, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x30, 0x59, // ......uU......0Y - 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xf3, 0x47, 0x00, 0x00, 0x42, 0x13, // ..A........G..B. - 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..A.......=..... - 0x00, 0x00, 0x73, 0x36, 0x00, 0x00, 0xf3, 0x47, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, // ..s6...G........ - 0x00, 0x00, 0x38, 0x2b, 0x00, 0x00, 0x73, 0x36, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0xf7, 0x00, // ..8+..s6........ - 0x03, 0x00, 0x74, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x38, 0x2b, // ..tU..........8+ - 0x00, 0x00, 0x2c, 0x2e, 0x00, 0x00, 0x31, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2c, 0x2e, // ..,...1Y......,. - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0xf9, 0x00, // ..>............. - 0x02, 0x00, 0x74, 0x55, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x31, 0x59, 0x00, 0x00, 0x41, 0x00, // ..tU......1Y..A. - 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xf4, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, // .......G..B...A. - 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x74, 0x36, // ......=.......t6 - 0x00, 0x00, 0xf4, 0x47, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x39, 0x2b, // ...G..........9+ - 0x00, 0x00, 0x74, 0x36, 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0x35, 0x35, // ..t6..........55 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x39, 0x2b, 0x00, 0x00, 0xf8, 0x20, // ..........9+... - 0x00, 0x00, 0x35, 0x35, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xf8, 0x20, 0x00, 0x00, 0x3d, 0x00, // ..55....... ..=. - 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xec, 0x38, 0x00, 0x00, 0x09, 0x40, 0x00, 0x00, 0x3e, 0x00, // .......8...@..>. - 0x03, 0x00, 0x12, 0x25, 0x00, 0x00, 0xec, 0x38, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, // ...%...8..9..... - 0x00, 0x00, 0xd6, 0x4f, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, 0x12, 0x25, // ...O...........% - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, 0xd6, 0x4f, 0x00, 0x00, 0x41, 0x00, // ..>........O..A. - 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x21, 0x45, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, // ......!E..B...A. - 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x60, // ......=........` - 0x00, 0x00, 0x21, 0x45, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3a, 0x2b, // ..!E..........:+ - 0x00, 0x00, 0xb3, 0x60, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0x32, 0x59, // ...`..........2Y - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x3a, 0x2b, 0x00, 0x00, 0x3d, 0x22, // ..........:+..=" - 0x00, 0x00, 0x32, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x3d, 0x22, 0x00, 0x00, 0x3d, 0x00, // ..2Y......="..=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x08, 0x2e, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x4f, 0x00, // ..............O. - 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xdf, 0x5c, 0x00, 0x00, 0x08, 0x2e, 0x00, 0x00, 0x08, 0x2e, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, // ..............A. - 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xfa, 0x23, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x13, 0x0a, // .......#........ - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x32, 0x00, 0x00, 0xfa, 0x23, // ..=........2...# - 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x64, 0x1b, 0x00, 0x00, 0xdf, 0x5c, // ..........d..... - 0x00, 0x00, 0x18, 0x32, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x08, 0x40, // ...2..A........@ - 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........=..... - 0x00, 0x00, 0x89, 0x34, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, // ...4...@..Q..... - 0x00, 0x00, 0xa0, 0x3a, 0x00, 0x00, 0x64, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, // ...:..d.......Q. - 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x99, 0x4a, 0x00, 0x00, 0x64, 0x1b, 0x00, 0x00, 0x01, 0x00, // .......J..d..... - 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x80, 0x56, 0x00, 0x00, 0x64, 0x1b, // ..Q........V..d. - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x46, // ......P........F - 0x00, 0x00, 0xa0, 0x3a, 0x00, 0x00, 0x99, 0x4a, 0x00, 0x00, 0x80, 0x56, 0x00, 0x00, 0x89, 0x34, // ...:...J...V...4 - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x0d, 0x46, 0x00, 0x00, 0xf9, 0x00, // ..>........F.... - 0x02, 0x00, 0x32, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x32, 0x59, 0x00, 0x00, 0x41, 0x00, // ..2Y......2Y..A. - 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xf5, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, // .......G..B...A. - 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x75, 0x36, // ......=.......u6 - 0x00, 0x00, 0xf5, 0x47, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3b, 0x2b, // ...G..........;+ - 0x00, 0x00, 0x75, 0x36, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0xe1, 0x5b, // ..u6...........[ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x3b, 0x2b, 0x00, 0x00, 0x3e, 0x22, // ..........;+..>" - 0x00, 0x00, 0xe1, 0x5b, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x3e, 0x22, 0x00, 0x00, 0x3d, 0x00, // ...[......>"..=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcf, 0x2d, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x4f, 0x00, // .......-......O. - 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x5c, 0x22, 0x00, 0x00, 0xcf, 0x2d, 0x00, 0x00, 0xcf, 0x2d, // ......."...-...- - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x5c, 0x22, 0x00, 0x00, 0xf9, 0x00, // ..>........".... - 0x02, 0x00, 0xe1, 0x5b, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xe1, 0x5b, 0x00, 0x00, 0x3d, 0x00, // ...[.......[..=. - 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x25, 0x30, 0x00, 0x00, 0x60, 0x0d, 0x00, 0x00, 0x3d, 0x00, // ......%0..`...=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x81, 0x5f, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x8e, 0x00, // ......._........ - 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x09, 0x2a, 0x00, 0x00, 0x81, 0x5f, 0x00, 0x00, 0x25, 0x30, // .......*..._..%0 - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x09, 0x2a, 0x00, 0x00, 0x3d, 0x00, // ..>........*..=. - 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x41, 0x00, // .......Z......A. - 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xbf, 0x45, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x35, 0x0a, // .......E..B...5. - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x31, 0x00, 0x00, 0xbf, 0x45, // ..=........1...E - 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa4, 0x3a, 0x00, 0x00, 0x00, 0x5a, // ...........:...Z - 0x00, 0x00, 0xb0, 0x31, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa2, 0x10, 0x00, 0x00, 0xa4, 0x3a, // ...1..>........: - 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x35, 0x35, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x35, 0x35, // ......55......55 - 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x74, 0x55, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x74, 0x55, // ......tU......tU - 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x75, 0x55, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x75, 0x55, // ......uU......uU - 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0xb4, 0x31, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb4, 0x31, // .......1.......1 - 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb5, 0x37, 0x00, 0x00, 0xa2, 0x10, // ..=........7.... - 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x46, 0x51, 0x00, 0x00, 0xb5, 0x37, 0x00, 0x00, 0xfd, 0x00, // ..>...FQ...7.... - 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..8.... + 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x6c, 0x26, 0x00, 0x00, // tScale......l&.. + 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0xab, 0x62, 0x00, 0x00, // ..#..........b.. + 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, // ................ + 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, // ....GLSL.std.450 + 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x0f, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, // ............main + 0x00, 0x00, 0x00, 0x00, 0xc1, 0x12, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ........t....... + 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, // ................ + 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, // main........a... + 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, // BgfxSampler2D... + 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, // ....a.......m_sa + 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, // mpler.......a... + 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, // ....m_texture... + 0x05, 0x00, 0x0e, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, // ........bgfxText + 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, // ure2D(struct-Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, // xSampler2D-p1-t2 + 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, // 11;vf2;.....'... + 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // _sampler........ + 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, // ...._coord...... + 0xd2, 0x0c, 0x00, 0x00, 0x6d, 0x69, 0x78, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, // ....mix(vf4;vf4; + 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc6, 0x0e, 0x00, 0x00, // vf4;............ + 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x5f, 0x62, 0x00, 0x00, // _a.........._b.. + 0x05, 0x00, 0x03, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x5f, 0x74, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ........_t...... + 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, // 5...vec4_splat(f + 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, // 1;.........._x.. + 0x05, 0x00, 0x08, 0x00, 0x91, 0x0e, 0x00, 0x00, 0x73, 0x64, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, // ........sdroundr + 0x65, 0x63, 0x74, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x66, 0x31, 0x3b, 0x00, // ect(vf2;vf2;f1;. + 0x05, 0x00, 0x03, 0x00, 0x08, 0x3e, 0x00, 0x00, 0x70, 0x74, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, // .....>..pt...... + 0x40, 0x0d, 0x00, 0x00, 0x65, 0x78, 0x74, 0x00, 0x05, 0x00, 0x03, 0x00, 0x4d, 0x17, 0x00, 0x00, // @...ext.....M... + 0x72, 0x61, 0x64, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x73, 0x63, 0x69, 0x73, // rad.........scis + 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x73, 0x6b, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x00, 0x00, // sorMask(vf2;.... + 0x05, 0x00, 0x03, 0x00, 0xc2, 0x10, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ........p....... + 0xe2, 0x0b, 0x00, 0x00, 0x73, 0x74, 0x72, 0x6f, 0x6b, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x28, 0x76, // ....strokeMask(v + 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x1c, 0x12, 0x00, 0x00, 0x5f, 0x74, 0x65, 0x78, // f2;........._tex + 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x20, 0x14, 0x00, 0x00, // coord....... ... + 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, // @main(vf2;vf2;vf + 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xc2, 0x1a, 0x00, 0x00, 0x76, 0x5f, 0x70, 0x6f, // 4;..........v_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x09, 0x40, 0x00, 0x00, // sition.......@.. + 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, // v_texcoord0..... + 0x46, 0x51, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // FQ..gl_FragData_ + 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xfe, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // 0_..........s_te + 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x0f, 0x0d, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // x...........s_te + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // xSampler........ + 0x4b, 0x0f, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // K...s_texTexture + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x65, 0x78, 0x74, 0x32, // ............ext2 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdf, 0x55, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, // .........U..d... + 0x05, 0x00, 0x03, 0x00, 0x0a, 0x17, 0x00, 0x00, 0x73, 0x63, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ........sc...... + 0x22, 0x0a, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, // "...$Global..... + 0x22, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, // ".......u_viewRe + 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ct......"....... + 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, // u_viewTexel..... + 0x22, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, // ".......u_view.. + 0x06, 0x00, 0x06, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ....".......u_in + 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, // vView......."... + 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_proj...... + 0x22, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, // ".......u_invPro + 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // j......."....... + 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, // u_viewProj...... + 0x22, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, // ".......u_invVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, // wProj......."... + 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, // ....u_model..... + 0x22, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // ".......u_modelV + 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // iew....."....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x06, 0x00, 0x06, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, // ....".......u_al + 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x07, 0x00, 0x22, 0x0a, 0x00, 0x00, // phaRef4....."... + 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, // ....u_scissorMat + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........"....... + 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // u_paintMat...... + 0x22, 0x0a, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, // ".......u_innerC + 0x6f, 0x6c, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ol......"....... + 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x00, 0x00, 0x06, 0x00, 0x08, 0x00, // u_outerCol...... + 0x22, 0x0a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, // ".......u_scisso + 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, // rExtScale....... + 0x22, 0x0a, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, // ".......u_extent + 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x22, 0x0a, 0x00, 0x00, // Radius......"... + 0x12, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, // ....u_params.... + 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, // ....B........... + 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, // ....bgfx_VoidFra + 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1e, 0x4b, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // g........K..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x60, 0x0d, 0x00, 0x00, 0x73, 0x63, 0x69, 0x73, // m.......`...scis + 0x73, 0x6f, 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3f, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // sor.....?'..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x38, 0x17, 0x00, 0x00, 0x73, 0x74, 0x72, 0x6f, // m.......8...stro + 0x6b, 0x65, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x00, 0x05, 0x00, 0x04, 0x00, 0x40, 0x27, 0x00, 0x00, // keAlpha.....@'.. + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xeb, 0x21, 0x00, 0x00, // param........!.. + 0x70, 0x74, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xb6, 0x10, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, // pt..........d... + 0x05, 0x00, 0x04, 0x00, 0x41, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // ....A'..param... + 0x05, 0x00, 0x04, 0x00, 0x42, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // ....B'..param... + 0x05, 0x00, 0x04, 0x00, 0x43, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // ....C'..param... + 0x05, 0x00, 0x04, 0x00, 0x44, 0x27, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, // ....D'..color... + 0x05, 0x00, 0x04, 0x00, 0x45, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // ....E'..param... + 0x05, 0x00, 0x04, 0x00, 0x46, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // ....F'..param... + 0x05, 0x00, 0x04, 0x00, 0x47, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, // ....G'..param... + 0x05, 0x00, 0x04, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x00, 0x00, // ........result.. + 0x05, 0x00, 0x03, 0x00, 0x0b, 0x17, 0x00, 0x00, 0x70, 0x74, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ........pt...... + 0x48, 0x27, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // H'..color....... + 0x49, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // I'..param....... + 0x4a, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // J'..param....... + 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....color....... + 0x78, 0x27, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // x'..param....... + 0x12, 0x25, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // .%..param....... + 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, // .A..v_position.. + 0x05, 0x00, 0x05, 0x00, 0xc1, 0x12, 0x00, 0x00, 0x76, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // ........v_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, // on.......<..v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, // xcoord0.....t... + 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, // v_texcoord0..... + 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // ....gl_FragData_ + 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // 0_.......G..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m........U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, // m...........gl_F + 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // ragData_0_..G... + 0x0f, 0x0d, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // ....".......G... + 0x0f, 0x0d, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // ....!.......G... + 0x4b, 0x0f, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // K...".......G... + 0x4b, 0x0f, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, // K...!.......G... + 0x5a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // Z.......@...H... + 0x22, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ".......#....... + 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...".......#... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....H..."....... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....H..."....... + 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, // #... ...H..."... + 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0x22, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // "...........H... + 0x22, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, // ".......#...`... + 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H..."........... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H..."....... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H..."....... + 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, // #.......H..."... + 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0x22, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // "...........H... + 0x22, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, // ".......#....... + 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H..."........... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ....H..."....... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ....H..."....... + 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, // #... ...H..."... + 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0x22, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // "...........H... + 0x22, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, // ".......#...`... + 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H..."........... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H..."....... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H..."....... + 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, // #.......H..."... + 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, // ............H... + 0x22, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // "...........H... + 0x22, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, // ".......#....... + 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // H..."........... + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H..."....... + 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H..."....... + 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, // #.......H..."... + 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ............H... + 0x22, 0x0a, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, // ".......#... ... + 0x48, 0x00, 0x04, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H..."........... + 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...".......#... + 0x30, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, // 0...H..."....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x22, 0x0a, 0x00, 0x00, // ........H..."... + 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, // ........H..."... + 0x0d, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0x22, 0x0a, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // "............... + 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...".......#... + 0x90, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ....H..."....... + 0x23, 0x00, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, // #.......H..."... + 0x10, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xb0, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x22, 0x0a, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xc0, 0x0a, 0x00, 0x00, // ".......#....... + 0x48, 0x00, 0x05, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...".......#... + 0xd0, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....G..."....... + 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G...B..."....... + 0x47, 0x00, 0x04, 0x00, 0xc1, 0x12, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G............... + 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // G...t........... + 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // G............... + 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, // ........!....... + 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, // ................ + 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // a........... ... + 0x1b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // ........a....... + 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... + 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, // ................ + 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, // ............!... + 0xc2, 0x03, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, // ................ + 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... + 0x21, 0x00, 0x06, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, // !............... + 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, // ........!....... + 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xc8, 0x0b, 0x00, 0x00, // ........!....... + 0x0d, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, // ................ + 0x21, 0x00, 0x04, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, // !............... + 0x21, 0x00, 0x06, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, // !...K........... + 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, // ........ ....... + 0x06, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, // ....a...;....... + 0xfe, 0x0e, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, // ........ ...y... + 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, // ........;...y... + 0x0f, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, // ........ ....... + 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, // ........;....... + 0x4b, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // K............... + 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // .......+....... + 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... + 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, // ........ ...z... + 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, // ................ + 0x96, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... + 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, // ....,........... + 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........+....... + 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // .......?........ + 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... + 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // ........+....... + 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x5a, 0x00, 0x00, 0x00, // j... .......Z... + 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00, // e...j.......F... + 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x15, 0x00, 0x22, 0x0a, 0x00, 0x00, // ............"... + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ........e...e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x5a, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // Z...e...e....... + 0x46, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // F...F........... + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... + 0xdc, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ........"...;... + 0xdc, 0x00, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ....B.......+... + 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ..../....... ... + 0xc3, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ........F...+... + 0x0c, 0x00, 0x00, 0x00, 0x3b, 0x0a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ....;....... ... + 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0d, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x2c, 0x00, 0x05, 0x00, // ...........?,... + 0x13, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, // ................ + 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, // +..............@ + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, // +.......A....... + 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, // ............... + 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // +............... + 0x14, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... + 0x32, 0x0a, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // 2.......+....... + 0x3e, 0x0a, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // >.......+....... + 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... + 0x35, 0x0a, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // 5.......+....... + 0x38, 0x0a, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // 8.......,....... + 0x04, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ................ + 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa2, 0x0b, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x40, 0x40, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ..@@ ........... + 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0xc1, 0x12, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, // ....;.......t... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. + 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........G...... + 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x0f, 0x0d, 0x00, 0x00, // =.......!C...... + 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x4b, 0x0f, 0x00, 0x00, // =........3..K... + 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, // P...a.... ..!C.. + 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xfe, 0x0e, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, // .3..>........ .. + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0xc1, 0x12, 0x00, 0x00, // =........A...... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, // =........<..t... + 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....G...A..>... + 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, // .U...<..9....... + 0xbd, 0x26, 0x00, 0x00, 0x20, 0x14, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, // .&.. ....G...U.. + 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, // ....=........... + 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, // ....>........... + 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....8...6....... + 0x99, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x03, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // ............7... + 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, // ....'...7....... + 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xcd, 0x5b, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .........[..A... + 0x14, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....i$..'....... + 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, // =........1..i$.. + 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, // A...z...TD..'... + 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, // ....=........V.. + 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, // TD..V........B.. + 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // .1...V..=....... + 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // 6.......W....... + 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, // .Q...B..6....... + 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // .Q..8...6....... + 0xd2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // ............7... + 0x9a, 0x02, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........7....... + 0xc7, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, // ....7........... + 0xf8, 0x00, 0x02, 0x00, 0x4e, 0x50, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....NP..=....... + 0x29, 0x1a, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ).......=....... + 0x3f, 0x3f, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ??......=....... + 0x46, 0x3e, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x1d, 0x00, 0x00, 0x00, // F>.............. + 0xcd, 0x42, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x29, 0x1a, 0x00, 0x00, // .B..........)... + 0x3f, 0x3f, 0x00, 0x00, 0x46, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xcd, 0x42, 0x00, 0x00, // ??..F>.......B.. + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, // 8...6.......5... + 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........7....... + 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x02, 0x2d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .........-..=... + 0x0d, 0x00, 0x00, 0x00, 0x1e, 0x5e, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....^......=... + 0x0d, 0x00, 0x00, 0x00, 0x63, 0x55, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....cU......=... + 0x0d, 0x00, 0x00, 0x00, 0xca, 0x26, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....&......=... + 0x0d, 0x00, 0x00, 0x00, 0xdd, 0x26, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, // .....&......P... + 0x1d, 0x00, 0x00, 0x00, 0x2a, 0x29, 0x00, 0x00, 0x1e, 0x5e, 0x00, 0x00, 0x63, 0x55, 0x00, 0x00, // ....*)...^..cU.. + 0xca, 0x26, 0x00, 0x00, 0xdd, 0x26, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x2a, 0x29, 0x00, 0x00, // .&...&......*).. + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x91, 0x0e, 0x00, 0x00, // 8...6........... + 0x00, 0x00, 0x00, 0x00, 0xc8, 0x0b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, // ........7....... + 0x08, 0x3e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x40, 0x0d, 0x00, 0x00, // .>..7.......@... + 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4d, 0x17, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7.......M....... + 0x16, 0x1c, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xdf, 0x55, 0x00, 0x00, // ....;........U.. + 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x93, 0x59, 0x00, 0x00, // ....=........Y.. + 0x40, 0x0d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xbb, 0x22, 0x00, 0x00, // @...=........".. + 0x4d, 0x17, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfa, 0x1f, 0x00, 0x00, // M...=........... + 0x4d, 0x17, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0xb5, 0x36, 0x00, 0x00, // M...P........6.. + 0xbb, 0x22, 0x00, 0x00, 0xfa, 0x1f, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, // .".............. + 0xbc, 0x0e, 0x00, 0x00, 0x93, 0x59, 0x00, 0x00, 0xb5, 0x36, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....Y...6..=... + 0x13, 0x00, 0x00, 0x00, 0xaa, 0x62, 0x00, 0x00, 0x08, 0x3e, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, // .....b...>...... + 0x13, 0x00, 0x00, 0x00, 0xd8, 0x5d, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // .....].......... + 0xaa, 0x62, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x2a, 0x00, 0x00, // .b.......... *.. + 0xd8, 0x5d, 0x00, 0x00, 0xbc, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xdf, 0x55, 0x00, 0x00, // .]......>....U.. + 0x20, 0x2a, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x65, 0x1d, 0x00, 0x00, // *..A.......e... + 0xdf, 0x55, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // .U......=....... + 0x10, 0x62, 0x00, 0x00, 0x65, 0x1d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, // .b..e...A....... + 0xb8, 0x45, 0x00, 0x00, 0xdf, 0x55, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .E...U......=... + 0x0d, 0x00, 0x00, 0x00, 0x78, 0x32, 0x00, 0x00, 0xb8, 0x45, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, // ....x2...E...... + 0x0d, 0x00, 0x00, 0x00, 0x02, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, // .....R......(... + 0x10, 0x62, 0x00, 0x00, 0x78, 0x32, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, 0x00, // .b..x2.......... + 0x57, 0x41, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x02, 0x52, 0x00, 0x00, // WA......%....R.. + 0x0c, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x91, 0x41, 0x00, 0x00, // ....=........A.. + 0xdf, 0x55, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x5a, 0x22, 0x00, 0x00, // .U..........Z".. + 0x01, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x91, 0x41, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, // ....(....A...... + 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb2, 0x4a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .........J...... + 0x42, 0x00, 0x00, 0x00, 0x5a, 0x22, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // B...Z".......... + 0x10, 0x5b, 0x00, 0x00, 0x57, 0x41, 0x00, 0x00, 0xb2, 0x4a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .[..WA...J..=... + 0x0d, 0x00, 0x00, 0x00, 0x53, 0x5a, 0x00, 0x00, 0x4d, 0x17, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, // ....SZ..M....... + 0x0d, 0x00, 0x00, 0x00, 0xa4, 0x59, 0x00, 0x00, 0x10, 0x5b, 0x00, 0x00, 0x53, 0x5a, 0x00, 0x00, // .....Y...[..SZ.. + 0xfe, 0x00, 0x02, 0x00, 0xa4, 0x59, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, // .....Y..8...6... + 0x0d, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x00, 0x00, 0x00, // ................ + 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc2, 0x10, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7............... + 0x0d, 0x36, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x0a, 0x17, 0x00, 0x00, // .6..;........... + 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x72, 0x57, 0x00, 0x00, // ....=.......rW.. + 0xc2, 0x10, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x81, 0x3d, 0x00, 0x00, // ....Q........=.. + 0x72, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // rW......Q....... + 0xcb, 0x46, 0x00, 0x00, 0x72, 0x57, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, // .F..rW......P... + 0x18, 0x00, 0x00, 0x00, 0xb4, 0x32, 0x00, 0x00, 0x81, 0x3d, 0x00, 0x00, 0xcb, 0x46, 0x00, 0x00, // .....2...=...F.. + 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xc3, 0x02, 0x00, 0x00, 0x59, 0x2c, 0x00, 0x00, // ....A.......Y,.. + 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00, // B.../...=...F... + 0xf4, 0x24, 0x00, 0x00, 0x59, 0x2c, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, // .$..Y,.......... + 0xa7, 0x2e, 0x00, 0x00, 0xb4, 0x32, 0x00, 0x00, 0xf4, 0x24, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, // .....2...$..O... + 0x13, 0x00, 0x00, 0x00, 0xba, 0x57, 0x00, 0x00, 0xa7, 0x2e, 0x00, 0x00, 0xa7, 0x2e, 0x00, 0x00, // .....W.......... + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x13, 0x00, 0x00, 0x00, // ................ + 0x45, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xba, 0x57, 0x00, 0x00, // ER...........W.. + 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x19, 0x25, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A........%..B... + 0x3b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x05, 0x4e, 0x00, 0x00, // ;...=........N.. + 0x19, 0x25, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x11, 0x54, 0x00, 0x00, // .%..O........T.. + 0x05, 0x4e, 0x00, 0x00, 0x05, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .N...N.......... + 0x83, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd4, 0x30, 0x00, 0x00, 0x45, 0x52, 0x00, 0x00, // .........0..ER.. + 0x11, 0x54, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0a, 0x17, 0x00, 0x00, 0xd4, 0x30, 0x00, 0x00, // .T..>........0.. + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x98, 0x40, 0x00, 0x00, 0x0a, 0x17, 0x00, 0x00, // =........@...... + 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x60, 0x3e, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A.......`>..B... + 0x3b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x16, 0x58, 0x00, 0x00, // ;...=........X.. + 0x60, 0x3e, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0xd6, 0x57, 0x00, 0x00, // `>..O........W.. + 0x16, 0x58, 0x00, 0x00, 0x16, 0x58, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .X...X.......... + 0x85, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x42, 0x57, 0x00, 0x00, 0x98, 0x40, 0x00, 0x00, // ........BW...@.. + 0xd6, 0x57, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0xe5, 0x61, 0x00, 0x00, // .W...........a.. + 0x1e, 0x06, 0x00, 0x00, 0x42, 0x57, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0a, 0x17, 0x00, 0x00, // ....BW..>....... + 0xe5, 0x61, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xce, 0x54, 0x00, 0x00, // .a..A........T.. + 0x0a, 0x17, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........=....... + 0xfd, 0x22, 0x00, 0x00, 0xce, 0x54, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, // ."...T.......... + 0x5a, 0x4e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0xfd, 0x22, 0x00, 0x00, // ZN......+....".. + 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........A....... + 0xf7, 0x50, 0x00, 0x00, 0x0a, 0x17, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .P..........=... + 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x22, 0x00, 0x00, 0xf7, 0x50, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, // ....."...P...... + 0x0d, 0x00, 0x00, 0x00, 0xb9, 0x2e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, // ............+... + 0xb3, 0x22, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, // .".............. + 0x0d, 0x00, 0x00, 0x00, 0xbd, 0x48, 0x00, 0x00, 0x5a, 0x4e, 0x00, 0x00, 0xb9, 0x2e, 0x00, 0x00, // .....H..ZN...... + 0xfe, 0x00, 0x02, 0x00, 0xbd, 0x48, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, // .....H..8...6... + 0x0d, 0x00, 0x00, 0x00, 0xe2, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe1, 0x00, 0x00, 0x00, // ................ + 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x1c, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7............... + 0x8c, 0x31, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xfc, 0x21, 0x00, 0x00, // .1..A........!.. + 0x1c, 0x12, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........=....... + 0x5a, 0x4b, 0x00, 0x00, 0xfc, 0x21, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // ZK...!.......... + 0xb1, 0x42, 0x00, 0x00, 0x5a, 0x4b, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, // .B..ZK.......... + 0x0d, 0x00, 0x00, 0x00, 0x1b, 0x37, 0x00, 0x00, 0xb1, 0x42, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // .....7...B...... + 0x0c, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb8, 0x56, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .........V...... + 0x04, 0x00, 0x00, 0x00, 0x1b, 0x37, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .....7.......... + 0xcb, 0x5e, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0xb8, 0x56, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, // .^.......V..A... + 0x8b, 0x02, 0x00, 0x00, 0x60, 0x2a, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, // ....`*..B...A... + 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd9, 0x57, 0x00, 0x00, // ....=........W.. + 0x60, 0x2a, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x16, 0x20, 0x00, 0x00, // `*........... .. + 0xcb, 0x5e, 0x00, 0x00, 0xd9, 0x57, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, 0x00, // .^...W.......... + 0xa1, 0x54, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // .T......%....... + 0x16, 0x20, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x87, 0x55, 0x00, 0x00, // . ..A........U.. + 0x1c, 0x12, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........=....... + 0xa7, 0x42, 0x00, 0x00, 0x87, 0x55, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, 0x00, // .B...U.......... + 0xff, 0x42, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // .B......%....... + 0xa7, 0x42, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x3f, 0x00, 0x00, // .B...........?.. + 0xa1, 0x54, 0x00, 0x00, 0xff, 0x42, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xb3, 0x3f, 0x00, 0x00, // .T...B.......?.. + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x14, 0x00, 0x00, // 8...6....... ... + 0x00, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, // ....K...7....... + 0xc2, 0x1a, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x09, 0x40, 0x00, 0x00, // ....7........@.. + 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x46, 0x51, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7.......FQ...... + 0x7a, 0x5a, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x1e, 0x4b, 0x00, 0x00, // zZ..;........K.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x60, 0x0d, 0x00, 0x00, // ....;.......`... + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x3f, 0x27, 0x00, 0x00, // ....;.......?'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x38, 0x17, 0x00, 0x00, // ....;.......8... + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x40, 0x27, 0x00, 0x00, // ....;.......@'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x41, 0x27, 0x00, 0x00, // ....;.......A'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x42, 0x27, 0x00, 0x00, // ....;.......B'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x43, 0x27, 0x00, 0x00, // ....;.......C'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x44, 0x27, 0x00, 0x00, // ....;.......D'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x45, 0x27, 0x00, 0x00, // ....;.......E'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x46, 0x27, 0x00, 0x00, // ....;.......F'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x47, 0x27, 0x00, 0x00, // ....;.......G'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa2, 0x10, 0x00, 0x00, // ....;........... + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, // ....;.......H'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x49, 0x27, 0x00, 0x00, // ....;.......I'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x4a, 0x27, 0x00, 0x00, // ....;.......J'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, // ....;........... + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x78, 0x27, 0x00, 0x00, // ....;.......x'.. + 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x12, 0x25, 0x00, 0x00, // ....;........%.. + 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x1e, 0x4b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....>....K...... + 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, // 9...........5... + 0x1e, 0x4b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x91, 0x47, 0x00, 0x00, // .K..=........G.. + 0xc2, 0x1a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3f, 0x27, 0x00, 0x00, 0x91, 0x47, 0x00, 0x00, // ....>...?'...G.. + 0x39, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x89, 0x4f, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // 9........O...... + 0x3f, 0x27, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x60, 0x0d, 0x00, 0x00, 0x89, 0x4f, 0x00, 0x00, // ?'..>...`....O.. + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x57, 0x26, 0x00, 0x00, 0x09, 0x40, 0x00, 0x00, // =.......W&...@.. + 0x3e, 0x00, 0x03, 0x00, 0x40, 0x27, 0x00, 0x00, 0x57, 0x26, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, // >...@'..W&..9... + 0x0d, 0x00, 0x00, 0x00, 0xd5, 0x4f, 0x00, 0x00, 0xe2, 0x0b, 0x00, 0x00, 0x40, 0x27, 0x00, 0x00, // .....O......@'.. + 0x3e, 0x00, 0x03, 0x00, 0x38, 0x17, 0x00, 0x00, 0xd5, 0x4f, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, // >...8....O..A... + 0x8b, 0x02, 0x00, 0x00, 0x1f, 0x45, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, // .....E..B...A... + 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb1, 0x60, 0x00, 0x00, // ....=........`.. + 0x1f, 0x45, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x34, 0x2b, 0x00, 0x00, // .E..........4+.. + 0xb1, 0x60, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0xb4, 0x31, 0x00, 0x00, // .`...........1.. + 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x34, 0x2b, 0x00, 0x00, 0x61, 0x22, 0x00, 0x00, // ........4+..a".. + 0x2d, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x61, 0x22, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // -Y......a"..=... + 0x13, 0x00, 0x00, 0x00, 0xdd, 0x2d, 0x00, 0x00, 0xc2, 0x1a, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // .....-......Q... + 0x0d, 0x00, 0x00, 0x00, 0xf4, 0x5d, 0x00, 0x00, 0xdd, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....]...-...... + 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x28, 0x4a, 0x00, 0x00, 0xdd, 0x2d, 0x00, 0x00, // Q.......(J...-.. + 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x11, 0x36, 0x00, 0x00, // ....P........6.. + 0xf4, 0x5d, 0x00, 0x00, 0x28, 0x4a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .]..(J......A... + 0xc3, 0x02, 0x00, 0x00, 0xfc, 0x60, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x32, 0x0a, 0x00, 0x00, // .....`..B...2... + 0x3d, 0x00, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00, 0x51, 0x28, 0x00, 0x00, 0xfc, 0x60, 0x00, 0x00, // =...F...Q(...`.. + 0x90, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x7d, 0x1c, 0x00, 0x00, 0x11, 0x36, 0x00, 0x00, // ........}....6.. + 0x51, 0x28, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0xeb, 0x21, 0x00, 0x00, // Q(..O........!.. + 0x7d, 0x1c, 0x00, 0x00, 0x7d, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // }...}........... + 0x3e, 0x00, 0x03, 0x00, 0x41, 0x27, 0x00, 0x00, 0xeb, 0x21, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...A'...!..A... + 0x9b, 0x02, 0x00, 0x00, 0x7d, 0x50, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x3e, 0x0a, 0x00, 0x00, // ....}P..B...>... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x4c, 0x00, 0x00, 0x7d, 0x50, 0x00, 0x00, // =........L..}P.. + 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0xc9, 0x3b, 0x00, 0x00, 0xb8, 0x4c, 0x00, 0x00, // O........;...L.. + 0xb8, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .L..........>... + 0x42, 0x27, 0x00, 0x00, 0xc9, 0x3b, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, // B'...;..A....... + 0x3a, 0x4f, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x3e, 0x0a, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, // :O..B...>....... + 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd7, 0x57, 0x00, 0x00, 0x3a, 0x4f, 0x00, 0x00, // =........W..:O.. + 0x3e, 0x00, 0x03, 0x00, 0x43, 0x27, 0x00, 0x00, 0xd7, 0x57, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, // >...C'...W..9... + 0x0d, 0x00, 0x00, 0x00, 0x82, 0x4d, 0x00, 0x00, 0x91, 0x0e, 0x00, 0x00, 0x41, 0x27, 0x00, 0x00, // .....M......A'.. + 0x42, 0x27, 0x00, 0x00, 0x43, 0x27, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, // B'..C'..A....... + 0x5d, 0x18, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, // ]...B...A....... + 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0f, 0x2a, 0x00, 0x00, 0x5d, 0x18, 0x00, 0x00, // =........*..]... + 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x34, 0x4a, 0x00, 0x00, 0x0f, 0x2a, 0x00, 0x00, // ........4J...*.. + 0xfc, 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf6, 0x38, 0x00, 0x00, // .............8.. + 0x82, 0x4d, 0x00, 0x00, 0x34, 0x4a, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, // .M..4J..A....... + 0x7a, 0x20, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, // z ..B...A....... + 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc9, 0x51, 0x00, 0x00, 0x7a, 0x20, 0x00, 0x00, // =........Q..z .. + 0x88, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0xf6, 0x38, 0x00, 0x00, // .........1...8.. + 0xc9, 0x51, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb6, 0x10, 0x00, 0x00, // .Q.............. + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ....+....1...... + 0x8a, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x18, 0x00, 0x00, // ....P........... + 0xb6, 0x10, 0x00, 0x00, 0xb6, 0x10, 0x00, 0x00, 0xb6, 0x10, 0x00, 0x00, 0xb6, 0x10, 0x00, 0x00, // ................ + 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xc3, 0x58, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A........X..B... + 0x35, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb1, 0x5e, 0x00, 0x00, // 5...=........^.. + 0xc3, 0x58, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x45, 0x27, 0x00, 0x00, 0xb1, 0x5e, 0x00, 0x00, // .X..>...E'...^.. + 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xbe, 0x2f, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A......../..B... + 0x38, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x58, 0x00, 0x00, // 8...=.......5X.. + 0xbe, 0x2f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x46, 0x27, 0x00, 0x00, 0x35, 0x58, 0x00, 0x00, // ./..>...F'..5X.. + 0x3e, 0x00, 0x03, 0x00, 0x47, 0x27, 0x00, 0x00, 0xa0, 0x18, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, // >...G'......9... + 0x1d, 0x00, 0x00, 0x00, 0x4c, 0x5f, 0x00, 0x00, 0xd2, 0x0c, 0x00, 0x00, 0x45, 0x27, 0x00, 0x00, // ....L_......E'.. + 0x46, 0x27, 0x00, 0x00, 0x47, 0x27, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x44, 0x27, 0x00, 0x00, // F'..G'..>...D'.. + 0x4c, 0x5f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa8, 0x2c, 0x00, 0x00, // L_..=........,.. + 0x38, 0x17, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x44, 0x45, 0x00, 0x00, // 8...=.......DE.. + 0x60, 0x0d, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc6, 0x26, 0x00, 0x00, // `............&.. + 0xa8, 0x2c, 0x00, 0x00, 0x44, 0x45, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .,..DE..=....... + 0x1a, 0x2e, 0x00, 0x00, 0x44, 0x27, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....D'.......... + 0x4e, 0x5c, 0x00, 0x00, 0x1a, 0x2e, 0x00, 0x00, 0xc6, 0x26, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // N........&..>... + 0x44, 0x27, 0x00, 0x00, 0x4e, 0x5c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // D'..N...=....... + 0x7c, 0x1f, 0x00, 0x00, 0x44, 0x27, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa2, 0x10, 0x00, 0x00, // |...D'..>....... + 0x7c, 0x1f, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0xb4, 0x31, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // |........1...... + 0x2d, 0x59, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xf1, 0x47, 0x00, 0x00, // -Y..A........G.. + 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // B...A.......=... + 0x0d, 0x00, 0x00, 0x00, 0x71, 0x36, 0x00, 0x00, 0xf1, 0x47, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, // ....q6...G...... + 0x09, 0x00, 0x00, 0x00, 0x35, 0x2b, 0x00, 0x00, 0x71, 0x36, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....5+..q6...... + 0xf7, 0x00, 0x03, 0x00, 0x75, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, // ....uU.......... + 0x35, 0x2b, 0x00, 0x00, 0x62, 0x22, 0x00, 0x00, 0x30, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 5+..b"..0Y...... + 0x62, 0x22, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xde, 0x2d, 0x00, 0x00, // b"..=........-.. + 0xc2, 0x1a, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf5, 0x5d, 0x00, 0x00, // ....Q........].. + 0xde, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // .-......Q....... + 0x29, 0x4a, 0x00, 0x00, 0xde, 0x2d, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, // )J...-......P... + 0x18, 0x00, 0x00, 0x00, 0x12, 0x36, 0x00, 0x00, 0xf5, 0x5d, 0x00, 0x00, 0x29, 0x4a, 0x00, 0x00, // .....6...]..)J.. + 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xc3, 0x02, 0x00, 0x00, 0xfd, 0x60, 0x00, 0x00, // ....A........`.. + 0x42, 0x13, 0x00, 0x00, 0x32, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x46, 0x00, 0x00, 0x00, // B...2...=...F... + 0x52, 0x28, 0x00, 0x00, 0xfd, 0x60, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, // R(...`.......... + 0xb6, 0x1c, 0x00, 0x00, 0x12, 0x36, 0x00, 0x00, 0x52, 0x28, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, // .....6..R(..O... + 0x13, 0x00, 0x00, 0x00, 0x98, 0x1f, 0x00, 0x00, 0xb6, 0x1c, 0x00, 0x00, 0xb6, 0x1c, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, // ........A....... + 0x63, 0x4e, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x3e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // cN..B...>...=... + 0x1d, 0x00, 0x00, 0x00, 0xef, 0x61, 0x00, 0x00, 0x63, 0x4e, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, // .....a..cN..O... + 0x13, 0x00, 0x00, 0x00, 0xfa, 0x53, 0x00, 0x00, 0xef, 0x61, 0x00, 0x00, 0xef, 0x61, 0x00, 0x00, // .....S...a...a.. + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, // ................ + 0x0b, 0x17, 0x00, 0x00, 0x98, 0x1f, 0x00, 0x00, 0xfa, 0x53, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .........S..=... + 0x61, 0x09, 0x00, 0x00, 0x49, 0x4e, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // a...IN......>... + 0x49, 0x27, 0x00, 0x00, 0x49, 0x4e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x4a, 0x27, 0x00, 0x00, // I'..IN..>...J'.. + 0x0b, 0x17, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x98, 0x5f, 0x00, 0x00, // ....9........_.. + 0x99, 0x0f, 0x00, 0x00, 0x49, 0x27, 0x00, 0x00, 0x4a, 0x27, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ....I'..J'..>... + 0x48, 0x27, 0x00, 0x00, 0x98, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, // H'..._..A....... + 0x20, 0x45, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, // E..B...A....... + 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb2, 0x60, 0x00, 0x00, 0x20, 0x45, 0x00, 0x00, // =........`.. E.. + 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x36, 0x2b, 0x00, 0x00, 0xb2, 0x60, 0x00, 0x00, // ........6+...`.. + 0x8a, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0x2e, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........Y...... + 0xfa, 0x00, 0x04, 0x00, 0x36, 0x2b, 0x00, 0x00, 0x3b, 0x22, 0x00, 0x00, 0x2e, 0x59, 0x00, 0x00, // ....6+..;"...Y.. + 0xf8, 0x00, 0x02, 0x00, 0x3b, 0x22, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....;"..=....... + 0x07, 0x2e, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, // ....H'..O....... + 0xde, 0x5c, 0x00, 0x00, 0x07, 0x2e, 0x00, 0x00, 0x07, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, // ........A....... + 0xf9, 0x23, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .#..H'......=... + 0x0d, 0x00, 0x00, 0x00, 0x17, 0x32, 0x00, 0x00, 0xf9, 0x23, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, // .....2...#...... + 0x18, 0x00, 0x00, 0x00, 0x63, 0x1b, 0x00, 0x00, 0xde, 0x5c, 0x00, 0x00, 0x17, 0x32, 0x00, 0x00, // ....c........2.. + 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, // A........@..H'.. + 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x88, 0x34, 0x00, 0x00, // ....=........4.. + 0x07, 0x40, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9f, 0x3a, 0x00, 0x00, // .@..Q........:.. + 0x63, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // c.......Q....... + 0x98, 0x4a, 0x00, 0x00, 0x63, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // .J..c.......Q... + 0x0d, 0x00, 0x00, 0x00, 0x7f, 0x56, 0x00, 0x00, 0x63, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .....V..c....... + 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0c, 0x46, 0x00, 0x00, 0x9f, 0x3a, 0x00, 0x00, // P........F...:.. + 0x98, 0x4a, 0x00, 0x00, 0x7f, 0x56, 0x00, 0x00, 0x88, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .J...V...4..>... + 0x48, 0x27, 0x00, 0x00, 0x0c, 0x46, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x2e, 0x59, 0x00, 0x00, // H'...F.......Y.. + 0xf8, 0x00, 0x02, 0x00, 0x2e, 0x59, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, // .....Y..A....... + 0xf2, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, // .G..B...A....... + 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x72, 0x36, 0x00, 0x00, 0xf2, 0x47, 0x00, 0x00, // =.......r6...G.. + 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x37, 0x2b, 0x00, 0x00, 0x72, 0x36, 0x00, 0x00, // ........7+..r6.. + 0x19, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0x2f, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......../Y...... + 0xfa, 0x00, 0x04, 0x00, 0x37, 0x2b, 0x00, 0x00, 0x3c, 0x22, 0x00, 0x00, 0x2f, 0x59, 0x00, 0x00, // ....7+..<"../Y.. + 0xf8, 0x00, 0x02, 0x00, 0x3c, 0x22, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....<"..=....... + 0xce, 0x2d, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, 0x4f, 0x00, 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, // .-..H'..O....... + 0x5b, 0x22, 0x00, 0x00, 0xce, 0x2d, 0x00, 0x00, 0xce, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ["...-...-...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ............>... + 0x48, 0x27, 0x00, 0x00, 0x5b, 0x22, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x2f, 0x59, 0x00, 0x00, // H'..["....../Y.. + 0xf8, 0x00, 0x02, 0x00, 0x2f, 0x59, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, // ..../Y..A....... + 0x1c, 0x3f, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x35, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .?..B...5...=... + 0x1d, 0x00, 0x00, 0x00, 0xe7, 0x33, 0x00, 0x00, 0x1c, 0x3f, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....3...?..=... + 0x1d, 0x00, 0x00, 0x00, 0x2e, 0x42, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, // .....B..H'...... + 0x1d, 0x00, 0x00, 0x00, 0x17, 0x20, 0x00, 0x00, 0x2e, 0x42, 0x00, 0x00, 0xe7, 0x33, 0x00, 0x00, // ..... ...B...3.. + 0x3e, 0x00, 0x03, 0x00, 0x48, 0x27, 0x00, 0x00, 0x17, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >...H'... ..=... + 0x0d, 0x00, 0x00, 0x00, 0x4e, 0x52, 0x00, 0x00, 0x38, 0x17, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ....NR..8...=... + 0x0d, 0x00, 0x00, 0x00, 0x45, 0x45, 0x00, 0x00, 0x60, 0x0d, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, // ....EE..`....... + 0x0d, 0x00, 0x00, 0x00, 0xc7, 0x26, 0x00, 0x00, 0x4e, 0x52, 0x00, 0x00, 0x45, 0x45, 0x00, 0x00, // .....&..NR..EE.. + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x2e, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, // =...........H'.. + 0x8e, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x4f, 0x5c, 0x00, 0x00, 0x1b, 0x2e, 0x00, 0x00, // ........O....... + 0xc7, 0x26, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x48, 0x27, 0x00, 0x00, 0x4f, 0x5c, 0x00, 0x00, // .&..>...H'..O... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7d, 0x1f, 0x00, 0x00, 0x48, 0x27, 0x00, 0x00, // =.......}...H'.. + 0x3e, 0x00, 0x03, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x7d, 0x1f, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, // >.......}....... + 0x75, 0x55, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x30, 0x59, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, // uU......0Y..A... + 0x8b, 0x02, 0x00, 0x00, 0xf3, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, // .....G..B...A... + 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x73, 0x36, 0x00, 0x00, // ....=.......s6.. + 0xf3, 0x47, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x38, 0x2b, 0x00, 0x00, // .G..........8+.. + 0x73, 0x36, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0x74, 0x55, 0x00, 0x00, // s6..........tU.. + 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x38, 0x2b, 0x00, 0x00, 0x2c, 0x2e, 0x00, 0x00, // ........8+..,... + 0x31, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2c, 0x2e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // 1Y......,...>... + 0xa2, 0x10, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x74, 0x55, 0x00, 0x00, // ............tU.. + 0xf8, 0x00, 0x02, 0x00, 0x31, 0x59, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, // ....1Y..A....... + 0xf4, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, // .G..B...A....... + 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x74, 0x36, 0x00, 0x00, 0xf4, 0x47, 0x00, 0x00, // =.......t6...G.. + 0xb4, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x39, 0x2b, 0x00, 0x00, 0x74, 0x36, 0x00, 0x00, // ........9+..t6.. + 0xa2, 0x0b, 0x00, 0x00, 0xf7, 0x00, 0x03, 0x00, 0x35, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........55...... + 0xfa, 0x00, 0x04, 0x00, 0x39, 0x2b, 0x00, 0x00, 0xf8, 0x20, 0x00, 0x00, 0x35, 0x35, 0x00, 0x00, // ....9+... ..55.. + 0xf8, 0x00, 0x02, 0x00, 0xf8, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, // ..... ..=...a... + 0x38, 0x39, 0x00, 0x00, 0xfe, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x78, 0x27, 0x00, 0x00, // 89......>...x'.. + 0x38, 0x39, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xb8, 0x19, 0x00, 0x00, // 89..=........... + 0x09, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x12, 0x25, 0x00, 0x00, 0xb8, 0x19, 0x00, 0x00, // .@..>....%...... + 0x39, 0x00, 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd6, 0x4f, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, // 9........O...... + 0x78, 0x27, 0x00, 0x00, 0x12, 0x25, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, // x'...%..>....... + 0xd6, 0x4f, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x21, 0x45, 0x00, 0x00, // .O..A.......!E.. + 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // B...A.......=... + 0x0d, 0x00, 0x00, 0x00, 0xb3, 0x60, 0x00, 0x00, 0x21, 0x45, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, // .....`..!E...... + 0x09, 0x00, 0x00, 0x00, 0x3a, 0x2b, 0x00, 0x00, 0xb3, 0x60, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....:+...`...... + 0xf7, 0x00, 0x03, 0x00, 0x32, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, // ....2Y.......... + 0x3a, 0x2b, 0x00, 0x00, 0x3d, 0x22, 0x00, 0x00, 0x32, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // :+..="..2Y...... + 0x3d, 0x22, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x08, 0x2e, 0x00, 0x00, // ="..=........... + 0x18, 0x0e, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xdf, 0x5c, 0x00, 0x00, // ....O........... + 0x08, 0x2e, 0x00, 0x00, 0x08, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xfa, 0x23, 0x00, 0x00, // ....A........#.. + 0x18, 0x0e, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, // ........=....... + 0x18, 0x32, 0x00, 0x00, 0xfa, 0x23, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, // .2...#.......... + 0x64, 0x1b, 0x00, 0x00, 0xdf, 0x5c, 0x00, 0x00, 0x18, 0x32, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // d........2..A... + 0x8a, 0x02, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x89, 0x34, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, // =........4...@.. + 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa0, 0x3a, 0x00, 0x00, 0x64, 0x1b, 0x00, 0x00, // Q........:..d... + 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x99, 0x4a, 0x00, 0x00, // ....Q........J.. + 0x64, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // d.......Q....... + 0x80, 0x56, 0x00, 0x00, 0x64, 0x1b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, // .V..d.......P... + 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x46, 0x00, 0x00, 0xa0, 0x3a, 0x00, 0x00, 0x99, 0x4a, 0x00, 0x00, // .....F...:...J.. + 0x80, 0x56, 0x00, 0x00, 0x89, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, // .V...4..>....... + 0x0d, 0x46, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x32, 0x59, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // .F......2Y...... + 0x32, 0x59, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xf5, 0x47, 0x00, 0x00, // 2Y..A........G.. + 0x42, 0x13, 0x00, 0x00, 0x41, 0x0a, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // B...A.......=... + 0x0d, 0x00, 0x00, 0x00, 0x75, 0x36, 0x00, 0x00, 0xf5, 0x47, 0x00, 0x00, 0xb4, 0x00, 0x05, 0x00, // ....u6...G...... + 0x09, 0x00, 0x00, 0x00, 0x3b, 0x2b, 0x00, 0x00, 0x75, 0x36, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, // ....;+..u6...... + 0xf7, 0x00, 0x03, 0x00, 0xe1, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, // .....[.......... + 0x3b, 0x2b, 0x00, 0x00, 0x3e, 0x22, 0x00, 0x00, 0xe1, 0x5b, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // ;+..>"...[...... + 0x3e, 0x22, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcf, 0x2d, 0x00, 0x00, // >"..=........-.. + 0x18, 0x0e, 0x00, 0x00, 0x4f, 0x00, 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x5c, 0x22, 0x00, 0x00, // ....O........".. + 0xcf, 0x2d, 0x00, 0x00, 0xcf, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .-...-.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, // ........>....... + 0x5c, 0x22, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0xe1, 0x5b, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // .".......[...... + 0xe1, 0x5b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x25, 0x30, 0x00, 0x00, // .[..=.......%0.. + 0x60, 0x0d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x81, 0x5f, 0x00, 0x00, // `...=........_.. + 0x18, 0x0e, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x09, 0x2a, 0x00, 0x00, // .............*.. + 0x81, 0x5f, 0x00, 0x00, 0x25, 0x30, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, 0x00, 0x00, // ._..%0..>....... + 0x09, 0x2a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, // .*..=........Z.. + 0x18, 0x0e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xbf, 0x45, 0x00, 0x00, // ....A........E.. + 0x42, 0x13, 0x00, 0x00, 0x35, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // B...5...=....... + 0xb0, 0x31, 0x00, 0x00, 0xbf, 0x45, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // .1...E.......... + 0xa4, 0x3a, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0xb0, 0x31, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .:...Z...1..>... + 0xa2, 0x10, 0x00, 0x00, 0xa4, 0x3a, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x35, 0x35, 0x00, 0x00, // .....:......55.. + 0xf8, 0x00, 0x02, 0x00, 0x35, 0x35, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x74, 0x55, 0x00, 0x00, // ....55......tU.. + 0xf8, 0x00, 0x02, 0x00, 0x74, 0x55, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0x75, 0x55, 0x00, 0x00, // ....tU......uU.. + 0xf8, 0x00, 0x02, 0x00, 0x75, 0x55, 0x00, 0x00, 0xf9, 0x00, 0x02, 0x00, 0xb4, 0x31, 0x00, 0x00, // ....uU.......1.. + 0xf8, 0x00, 0x02, 0x00, 0xb4, 0x31, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .....1..=....... + 0xb5, 0x37, 0x00, 0x00, 0xa2, 0x10, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x46, 0x51, 0x00, 0x00, // .7......>...FQ.. + 0xb5, 0x37, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .7......8.... }; -static const uint8_t fs_nanovg_fill_dx9[1583] = +static const uint8_t fs_nanovg_fill_dx9[1585] = { - 0x46, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x46, 0x53, 0x48, 0x05, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x52, // 0......u_extentR 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x01, 0x09, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x69, 0x6e, // adius.......u_in 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x12, 0x01, 0x06, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x6f, // nerCol.......u_o @@ -811,100 +822,101 @@ static const uint8_t fs_nanovg_fill_dx9[1583] = 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x0a, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, // _params.......u_ 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x12, // scissorExtScale. 0x01, 0x08, 0x00, 0x01, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, // ......u_scissorM - 0x61, 0x74, 0x13, 0x01, 0x00, 0x00, 0x03, 0x00, 0x94, 0x05, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, // at.............. - 0x61, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x01, 0x00, 0x00, 0x00, 0x03, // a.CTAB....W..... - 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x01, // ..............P. - 0x00, 0x00, 0xbc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0xc4, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, // ................ - 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, // ................ - 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x01, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x01, 0x00, // ......(......... - 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x01, 0x00, 0x00, 0x02, 0x00, // ..........1..... - 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x01, // ..............C. - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x00, 0xab, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, // ..s_tex......... - 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, // ..........u_exte - 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, // ntRadius........ - 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x6e, 0x65, // ..........u_inne - 0x72, 0x43, 0x6f, 0x6c, 0x00, 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x00, // rCol.u_outerCol. - 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x00, 0xab, 0xab, 0xab, 0x03, 0x00, // u_paintMat...... - 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, // params.u_scissor - 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, // ExtScale.u_sciss - 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // orMat.ps_3_0.Mic - 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL - 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler - 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x0f, 0xa0, 0x00, 0x00, // 10.1..Q......... - 0x00, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, // .?...@.......?Q. - 0x00, 0x05, 0x0c, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, // ............@@.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ - 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x03, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... - 0x03, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0x8b, 0x08, 0x00, 0xe4, 0xa1, 0x01, 0x00, // ................ - 0x00, 0x02, 0x01, 0x00, 0x0b, 0x80, 0x0b, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x13, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0xee, 0xa1, 0x01, 0x00, 0x00, 0x80, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, // ........U....... - 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x01, 0x00, 0x00, 0x90, 0x0b, 0x00, 0x55, 0xa0, 0x0b, 0x00, // ............U... - 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x8c, 0x0b, 0x00, // ............U... - 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0a, 0x00, // ............U... - 0x55, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x01, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0b, 0x00, // U...........U... - 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x01, 0x00, 0x55, 0x90, 0x0b, 0x00, // ............U... - 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, // ............U... - 0xaa, 0x80, 0x23, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x05, 0x00, // ..#............. - 0x00, 0x03, 0x02, 0x00, 0x03, 0x80, 0x04, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x02, 0x00, 0x03, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x03, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x05, 0x00, // ................ - 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0c, 0x80, 0x09, 0x00, 0xaa, 0xa1, 0x09, 0x00, // ................ - 0x44, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0c, 0x80, 0x02, 0x00, 0xe4, 0x81, 0x02, 0x00, // D............... - 0x44, 0x8b, 0x0b, 0x00, 0x00, 0x03, 0x03, 0x00, 0x03, 0x80, 0x02, 0x00, 0xee, 0x80, 0x0c, 0x00, // D............... - 0x00, 0xa0, 0x5a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x03, 0x00, // ..Z............. - 0xe4, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, // ................ - 0xff, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x0b, 0x00, // ................ - 0x00, 0x03, 0x01, 0x00, 0x04, 0x80, 0x02, 0x00, 0xaa, 0x80, 0x02, 0x00, 0xff, 0x80, 0x0a, 0x00, // ................ - 0x00, 0x03, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x02, 0x00, 0xaa, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x09, 0x00, 0xaa, 0xa1, 0x04, 0x00, // ................ - 0x00, 0x04, 0x00, 0x00, 0x08, 0x80, 0x0a, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ - 0xff, 0x80, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x0a, 0x00, 0x00, 0xa0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0x00, 0x80, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x06, 0x00, // ............U... - 0x00, 0x02, 0x03, 0x00, 0x01, 0x80, 0x09, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x03, 0x00, // ................ - 0x02, 0x80, 0x09, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x05, 0x80, 0x02, 0x00, // ....U........... - 0xd4, 0x80, 0x03, 0x00, 0xd4, 0x80, 0x42, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x01, 0x00, // ......B......... - 0xe8, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0d, 0x80, 0x01, 0x00, // ................ - 0x77, 0x81, 0x0a, 0x00, 0xa7, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, 0x07, 0x80, 0x02, 0x00, // w............... - 0xff, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x58, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0x80, 0x01, 0x00, // ......X......... - 0xaa, 0x8c, 0x03, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x58, 0x00, 0x00, 0x04, 0x02, 0x00, // ..........X..... - 0x0e, 0x80, 0x01, 0x00, 0xff, 0x8c, 0x02, 0x00, 0x00, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x05, 0x00, // ................ - 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x29, 0x00, // ........U.....). - 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x01, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0x02, 0x03, 0x00, // ........U....... - 0x0f, 0x80, 0x0b, 0x00, 0xff, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, // ......*......... - 0x02, 0x80, 0x0c, 0x00, 0x55, 0xa0, 0x29, 0x00, 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x01, 0x00, // ....U.)......... - 0x55, 0x80, 0x42, 0x00, 0x00, 0x03, 0x04, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, // U.B............. - 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x05, 0x00, 0x07, 0x80, 0x04, 0x00, 0xff, 0x80, 0x04, 0x00, // ................ - 0xe4, 0x80, 0x58, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0x80, 0x01, 0x00, 0xaa, 0x8c, 0x05, 0x00, // ..X............. - 0xe4, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x58, 0x00, 0x00, 0x04, 0x04, 0x00, 0x0e, 0x80, 0x01, 0x00, // ......X......... - 0xff, 0x8c, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x04, 0x00, // ................ - 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x0f, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, // ..........*..... - 0x00, 0x02, 0x03, 0x00, 0x0f, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x2b, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..........+...+. - 0x00, 0x00, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x8c, 0x02, 0x00, // ..X............. - 0xe4, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0x80, 0x06, 0x00, // ................ - 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x81, 0x07, 0x00, // ................ - 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xff, 0x80, 0x02, 0x00, // ................ - 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x00, 0x00, // ................ - 0x55, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, // U.....X......... - 0xaa, 0x81, 0x02, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x61, 0x74, 0x13, 0x01, 0x00, 0x00, 0x03, 0x00, 0x94, 0x05, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, // at.............. + 0xfe, 0xff, 0x61, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x01, 0x00, 0x00, // ..a.CTAB....W... + 0x00, 0x03, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ + 0x50, 0x01, 0x00, 0x00, 0xbc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // P............... + 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, // ................ + 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, // ................ + 0x02, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0xff, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ + 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x00, // ........(....... + 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x01, 0x00, 0x00, // ............1... + 0x02, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x43, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, // C............... + 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x00, 0xab, 0xab, 0x04, 0x00, 0x0c, 0x00, // ....s_tex....... + 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x65, 0x78, // ............u_ex + 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, // tentRadius...... + 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x00, 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, // nerCol.u_outerCo + 0x6c, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x00, 0xab, 0xab, 0xab, // l.u_paintMat.... + 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, // u_params.u_sciss + 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, // orExtScale.u_sci + 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, // ssorMat.ps_3_0.M + 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, // icrosoft (R) HLS + 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, // L Shader Compile + 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x0f, 0xa0, // r 10.1..Q....... + 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, // ...?...@.......? + 0x51, 0x00, 0x00, 0x05, 0x0c, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, // Q.............@@ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ + 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x03, 0x90, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x03, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, // ..........U..... + 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, // ................ + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0xa0, // ................ + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0x8b, 0x08, 0x00, 0xe4, 0xa1, // ................ + 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0b, 0x80, 0x0b, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, // ................ + 0x00, 0x00, 0x13, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0xee, 0xa1, 0x01, 0x00, 0x00, 0x80, // ................ + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, 0x80, // ..........U..... + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x01, 0x00, 0x00, 0x90, 0x0b, 0x00, 0x55, 0xa0, // ..............U. + 0x0b, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x8c, // ..............U. + 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, // ..............U. + 0x0a, 0x00, 0x55, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x01, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x80, // ..U...........U. + 0x0b, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x01, 0x00, 0x55, 0x90, // ..............U. + 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, // ..............U. + 0x01, 0x00, 0xaa, 0x80, 0x23, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x0a, 0x00, 0xff, 0xa0, // ....#........... + 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x03, 0x80, 0x04, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, // ..............U. + 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x03, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, // ................ + 0x02, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x03, 0x80, 0x02, 0x00, 0xe4, 0x80, // ................ + 0x05, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0c, 0x80, 0x09, 0x00, 0xaa, 0xa1, // ................ + 0x09, 0x00, 0x44, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0c, 0x80, 0x02, 0x00, 0xe4, 0x81, // ..D............. + 0x02, 0x00, 0x44, 0x8b, 0x0b, 0x00, 0x00, 0x03, 0x03, 0x00, 0x03, 0x80, 0x02, 0x00, 0xee, 0x80, // ..D............. + 0x0c, 0x00, 0x00, 0xa0, 0x5a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x80, 0x03, 0x00, 0xe4, 0x80, // ....Z........... + 0x03, 0x00, 0xe4, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, // ................ + 0x00, 0x00, 0xff, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, // ................ + 0x0b, 0x00, 0x00, 0x03, 0x01, 0x00, 0x04, 0x80, 0x02, 0x00, 0xaa, 0x80, 0x02, 0x00, 0xff, 0x80, // ................ + 0x0a, 0x00, 0x00, 0x03, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x0c, 0x00, 0x00, 0xa0, // ................ + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x02, 0x00, 0xaa, 0x80, // ................ + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x09, 0x00, 0xaa, 0xa1, // ................ + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x80, 0x0a, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x80, // ................ + 0x00, 0x00, 0xff, 0x80, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x0a, 0x00, 0x00, 0xa0, // ................ + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0x00, 0x80, // ................ + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, // ..............U. + 0x06, 0x00, 0x00, 0x02, 0x03, 0x00, 0x01, 0x80, 0x09, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, // ................ + 0x03, 0x00, 0x02, 0x80, 0x09, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x05, 0x80, // ......U......... + 0x02, 0x00, 0xd4, 0x80, 0x03, 0x00, 0xd4, 0x80, 0x42, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, // ........B....... + 0x01, 0x00, 0xe8, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0d, 0x80, // ................ + 0x01, 0x00, 0x77, 0x81, 0x0a, 0x00, 0xa7, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, 0x07, 0x80, // ..w............. + 0x02, 0x00, 0xff, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x58, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0x80, // ........X....... + 0x01, 0x00, 0xaa, 0x8c, 0x03, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x58, 0x00, 0x00, 0x04, // ............X... + 0x02, 0x00, 0x0e, 0x80, 0x01, 0x00, 0xff, 0x8c, 0x02, 0x00, 0x00, 0x80, 0x02, 0x00, 0xe4, 0x80, // ................ + 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, // ................ + 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0xe4, 0x80, // ..........U..... + 0x29, 0x00, 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x01, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0x02, // ).........U..... + 0x03, 0x00, 0x0f, 0x80, 0x0b, 0x00, 0xff, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, // ........*....... + 0x01, 0x00, 0x02, 0x80, 0x0c, 0x00, 0x55, 0xa0, 0x29, 0x00, 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, // ......U.)....... + 0x01, 0x00, 0x55, 0x80, 0x42, 0x00, 0x00, 0x03, 0x04, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, // ..U.B........... + 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x05, 0x00, 0x07, 0x80, 0x04, 0x00, 0xff, 0x80, // ................ + 0x04, 0x00, 0xe4, 0x80, 0x58, 0x00, 0x00, 0x04, 0x04, 0x00, 0x07, 0x80, 0x01, 0x00, 0xaa, 0x8c, // ....X........... + 0x05, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x58, 0x00, 0x00, 0x04, 0x04, 0x00, 0x0e, 0x80, // ........X....... + 0x01, 0x00, 0xff, 0x8c, 0x04, 0x00, 0x00, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, // ................ + 0x04, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, // ................ + 0x03, 0x00, 0x0f, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x2a, 0x00, 0x00, 0x00, // ............*... + 0x01, 0x00, 0x00, 0x02, 0x03, 0x00, 0x0f, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x2b, 0x00, 0x00, 0x00, // ............+... + 0x2b, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x8c, // +...X........... + 0x02, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0x80, // ................ + 0x06, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x81, // ................ + 0x07, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xff, 0x80, // ................ + 0x02, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, // ................ + 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x08, 0x0f, 0x80, // ..U.....X....... + 0x00, 0x00, 0xaa, 0x81, 0x02, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, // ................ + 0x00, // . }; -static const uint8_t fs_nanovg_fill_dx11[2362] = +static const uint8_t fs_nanovg_fill_dx11[2364] = { - 0x46, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci + 0x46, 0x53, 0x48, 0x05, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x13, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0a, 0x75, 0x5f, // ssorMat.......u_ 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x13, 0x00, 0x30, 0x00, 0x03, 0x00, 0x0a, 0x75, // paintMat..0....u 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x12, 0x00, 0x60, 0x00, 0x01, 0x00, 0x0a, // _innerCol..`.... @@ -913,149 +925,149 @@ static const uint8_t fs_nanovg_fill_dx11[2362] = 0x6c, 0x65, 0x12, 0x00, 0x80, 0x00, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, // le.......u_exten 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x00, 0x90, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, // tRadius.......u_ 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x00, 0xa0, 0x00, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, // params.......s_t - 0x65, 0x78, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x9c, 0x08, 0x44, 0x58, 0x42, 0x43, 0x21, 0x36, // ex0.......DXBC!6 - 0x2a, 0x19, 0x73, 0x28, 0xce, 0xe0, 0xff, 0xcd, 0x27, 0x27, 0x8e, 0x5c, 0x18, 0x73, 0x01, 0x00, // *.s(....''...s.. - 0x00, 0x00, 0x9c, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, // ..........,..... - 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, // ......ISGNh..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ......P......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ - 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x53, 0x56, // ..............SV - 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // _POSITION.TEXCOO - 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, // RD....OSGN,..... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...... ......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, // ..............SV - 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xc4, 0x07, // _TARGET...SHDR.. - 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xf1, 0x01, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, // ..@.......Y...F. - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, // .........Z....` - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, // ......X....p.... - 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, // ..UU..b...2..... - 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xc2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, // ..b...........e. - 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x03, 0x00, // ... ......h..... - 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, // ..8...2.......V. - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ......F. ....... - 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, // ..2...2.......F. - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, // ............... - 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x32, 0x00, // ..F...........2. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, // ......F.......F. - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x32, 0x00, // .............2. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F......... - 0x00, 0x00, 0x46, 0x80, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, // ..F. .A......... - 0x00, 0x00, 0x32, 0x20, 0x00, 0x0e, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, // ..2 ..2.......F. - 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x8a, 0x20, 0x00, 0x00, 0x00, // ..A......... ... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, // .......@.....?.. - 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x12, 0x00, // .?........8..... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, // ................ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2..."..... - 0x00, 0x00, 0x2a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ..*........@.... - 0x00, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x08, 0x22, 0x00, // .@.@..........". - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x80, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x38, 0x00, 0x00, 0x08, 0x22, 0x00, // ...@.....?8...". - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, // ................ - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x07, 0x22, 0x00, // .........3...". - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, // ...............@ - 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x33, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, // .....?3...B..... - 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ..:........@.... - 0x80, 0x3f, 0x38, 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, // .?8...".......*. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, // ................ - 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, // ..B.......:. ... - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, // .......@........ - 0x04, 0x03, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xc2, 0x00, // ..*.......8..... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x84, // ......V......... - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xc2, 0x00, // .........2..... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ........ ....... - 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, // ................ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ........ ....... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x8a, // ......2......... - 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x46, 0x80, // .A...........F. - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xc2, 0x00, // ............... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x06, 0x04, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x34, 0x00, // ......A.......4. - 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, // ..........:..... - 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x07, 0x12, 0x00, // ..*.......3..... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, // ...............@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x0a, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......4......... - 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, // ...........@.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ - 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x00, 0x00, // ..B............. - 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x05, 0x42, 0x00, // ..........K...B. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......*......... - 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, // ..B.......*..... - 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x42, 0x00, // ..............B. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, // ......*.......*. - 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x32, 0x00, // .A...........2. - 0x00, 0x0a, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, // ..B......... ... - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x2a, 0x00, // .......@.....?*. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x20, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, // ....... ..B..... - 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, // ..*......... ... - 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, // ................ - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, // ..F. .A......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x32, 0x00, // ..F. .........2. - 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..F.......F. ... - 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8...B..... - 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0a, // ..8.... ........ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x12, 0x00, // ......F......... - 0x00, 0x01, 0x18, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, // ......B.......:. - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ..........@.... - 0x80, 0x3f, 0x1f, 0x00, 0x04, 0x03, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, // .?....*.......8. - 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, // ..........V..... - 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x32, 0x00, // .... .........2. - 0x00, 0x0a, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x0e, // ................ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, // ............ ... - 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, // ......E......... - 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, // ..........F~.... - 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0b, 0xc2, 0x00, // ...`............ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, // ........ ....... - 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...@............ - 0x80, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, // .?...@8...r..... - 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, // ..........F..... - 0x00, 0x00, 0x37, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x0a, // ..7...r......... - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, // ......F.......F. - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x09, 0xe2, 0x00, 0x10, 0x00, 0x01, 0x00, // ......7......... - 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x01, 0x00, // ................ - 0x00, 0x00, 0x56, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, // ..V.......8..... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, // ......F.......F. - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x22, 0x00, // .........8...". - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, // ................ - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......8.... .... - 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, // ..V.......F..... - 0x00, 0x00, 0x12, 0x00, 0x00, 0x01, 0x18, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, // .........."..... - 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x40, // ..:. ..........@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1f, 0x00, 0x04, 0x03, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, // .....@.......... - 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, // ..6.... .......@ - 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, // .....?...?...?.. - 0x80, 0x3f, 0x12, 0x00, 0x00, 0x01, 0x18, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, // .?........"..... - 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x40, // ..:. ..........@ - 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x1f, 0x00, 0x04, 0x03, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, // ....@@.......... - 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe6, 0x1a, // ..E............. - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, // ......F~.......` - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0b, 0x62, 0x00, 0x10, 0x00, 0x00, 0x00, // ..........b..... - 0x00, 0x00, 0xa6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x02, 0x40, // .... ..........@ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, // .........?...@.. - 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0xf6, 0x0f, // ..8...r......... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, // ......F.......7. - 0x00, 0x09, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, // ..r.......V..... - 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, // ..F.......F..... - 0x00, 0x00, 0x37, 0x00, 0x00, 0x09, 0xe2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x0a, // ..7............. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x0e, // ..............V. - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8......... - 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, // ..........F..... - 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, // ..8.... ......F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, // ......F. ....... - 0x00, 0x00, 0x15, 0x00, 0x00, 0x01, 0x15, 0x00, 0x00, 0x01, 0x15, 0x00, 0x00, 0x01, 0x15, 0x00, // ................ - 0x00, 0x01, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0xb0, 0x00, // ..>....... + 0x65, 0x78, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x9c, 0x08, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, // ex0.........DXBC + 0x21, 0x36, 0x2a, 0x19, 0x73, 0x28, 0xce, 0xe0, 0xff, 0xcd, 0x27, 0x27, 0x8e, 0x5c, 0x18, 0x73, // !6*.s(....''...s + 0x01, 0x00, 0x00, 0x00, 0x9c, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,... + 0x9c, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, // ........ISGNh... + 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........P....... + 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ + 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, // ................ + 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, // SV_POSITION.TEXC + 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, // OORD....OSGN,... + 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, // SV_TARGET...SHDR + 0xc4, 0x07, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xf1, 0x01, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, // ....@.......Y... + 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, // F. .........Z... + 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, // .`......X....p.. + 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, // ....UU..b...2... + 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xc2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....b........... + 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, // e.... ......h... + 0x03, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....8...2....... + 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // V.......F. ..... + 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....2...2....... + 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, // F. ............. + 0x01, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, // ....F........... + 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // 2.......F....... + 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // F. ............. + 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, // 2.......F....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. .A....... + 0x08, 0x00, 0x00, 0x00, 0x32, 0x20, 0x00, 0x0e, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....2 ..2....... + 0x46, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x8a, 0x20, 0x00, // F...A......... . + 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, // .........@.....? + 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, // ...?........8... + 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0x22, 0x00, 0x10, 0x00, // ........2..."... + 0x00, 0x00, 0x00, 0x00, 0x2a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, // ....*........@.. + 0x00, 0x00, 0x00, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x08, // ...@.@.......... + 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x80, 0xc1, 0x00, 0x00, 0x00, // "............... + 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x38, 0x00, 0x00, 0x08, // .....@.....?8... + 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // "............... + 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x07, // .. .........3... + 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // "............... + 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x33, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, // .@.....?3...B... + 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, // ....:........@.. + 0x00, 0x00, 0x80, 0x3f, 0x38, 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...?8..."....... + 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // *............... + 0x18, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, // ....B.......:. . + 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........@...... + 0x1f, 0x00, 0x04, 0x03, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, // ....*.......8... + 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........V....... + 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, // .. .........2... + 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... + 0x03, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... + 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........2....... + 0xa6, 0x8a, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // .. .A........... + 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, // F. ............. + 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........A....... + 0x34, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, // 4...........:... + 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x07, // ....*.......3... + 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x0a, 0xc2, 0x00, 0x10, 0x00, // .@......4....... + 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, // .............@.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x0f, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, // ....B........... + 0x00, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x05, // ............K... + 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // B.......*....... + 0x00, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, // ....B.......*... + 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, // ................ + 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // B.......*....... + 0x2a, 0x80, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, // *. .A........... + 0x32, 0x00, 0x00, 0x0a, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, // 2...B......... . + 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, // .........@.....? + 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x20, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, // *........ ..B... + 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, // ....*......... . + 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ................ + 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. .A....... + 0x06, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ....F. ......... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, // 2............... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....F.......F. . + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, // ........8...B... + 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....8.... ...... + 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... + 0x12, 0x00, 0x00, 0x01, 0x18, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........B....... + 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, // :. ..........@.. + 0x00, 0x00, 0x80, 0x3f, 0x1f, 0x00, 0x04, 0x03, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...?....*....... + 0x38, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, // 8...........V... + 0x01, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ...... ......... + 0x32, 0x00, 0x00, 0x0a, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, // 2............. . + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, // ........E....... + 0x01, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, // ............F~.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0b, // .....`.......... + 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... + 0x0a, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....@.......... + 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, // ...?...@8...r... + 0x02, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, // ............F... + 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....7...r....... + 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ........F....... + 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x09, 0xe2, 0x00, 0x10, 0x00, // F.......7....... + 0x01, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, // ................ + 0x01, 0x00, 0x00, 0x00, 0x56, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, // ....V.......8... + 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... + 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, // F. .........8... + 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // "............... + 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x20, 0x10, 0x00, // ........8.... .. + 0x00, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ....V.......F... + 0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x01, 0x18, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, // ............"... + 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....:. ......... + 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1f, 0x00, 0x04, 0x03, 0x1a, 0x00, 0x10, 0x00, // .@.....@........ + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....6.... ...... + 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, // .@.....?...?...? + 0x00, 0x00, 0x80, 0x3f, 0x12, 0x00, 0x00, 0x01, 0x18, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, // ...?........"... + 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....:. ......... + 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x1f, 0x00, 0x04, 0x03, 0x1a, 0x00, 0x10, 0x00, // .@....@@........ + 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....E........... + 0xe6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F~...... + 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0b, 0x62, 0x00, 0x10, 0x00, // .`..........b... + 0x00, 0x00, 0x00, 0x00, 0xa6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ...... ......... + 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x40, // .@.........?...@ + 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....8...r....... + 0xf6, 0x0f, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... + 0x37, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, // 7...r.......V... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, // ....F.......F... + 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x09, 0xe2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....7........... + 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x56, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, // V.......8....... + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ............F... + 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....8.... ...... + 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // F.......F. ..... + 0x06, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01, 0x15, 0x00, 0x00, 0x01, 0x15, 0x00, 0x00, 0x01, // ................ + 0x15, 0x00, 0x00, 0x01, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0xb0, 0x00, // ....>....... }; static const uint8_t fs_nanovg_fill_mtl[3462] = { - 0x46, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x07, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci + 0x46, 0x53, 0x48, 0x05, 0xcf, 0xda, 0x1b, 0x94, 0x07, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x03, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, // ssorMat.......u_ 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x03, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, // paintMat.......u 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, // _innerCol....... diff --git a/3rdparty/bgfx/examples/common/nanovg/makefile b/3rdparty/bgfx/examples/common/nanovg/makefile index 928467d..9dd5826 100644 --- a/3rdparty/bgfx/examples/common/nanovg/makefile +++ b/3rdparty/bgfx/examples/common/nanovg/makefile @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp b/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp index c768728..dcd652c 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp @@ -23,10 +23,6 @@ #include "nanovg.h" -#ifndef NANOVG_HAS_STB_IMAGE -# define NANOVG_HAS_STB_IMAGE 0 -#endif // NANOVG_HAS_STB_IMAGE - #include BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4701) // error C4701: potentially uninitialized local variable 'cint' used @@ -41,28 +37,6 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Wunused-result"); #include "fontstash.h" BX_PRAGMA_DIAGNOSTIC_POP(); -#if NANOVG_HAS_STB_IMAGE -#define LODEPNG_NO_COMPILE_ENCODER -#define LODEPNG_NO_COMPILE_DISK -#define LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS -#define LODEPNG_NO_COMPILE_ERROR_TEXT -#define LODEPNG_NO_COMPILE_ALLOCATORS -#define LODEPNG_NO_COMPILE_CPP -#include - -BX_PRAGMA_DIAGNOSTIC_PUSH(); -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wmissing-field-initializers"); -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wshadow"); -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wint-to-pointer-cast") -#if BX_COMPILER_GCC >= 60000 -BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Wmisleading-indentation"); -BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Wshift-negative-value"); -#endif // BX_COMPILER_GCC >= 60000_ - -#include -BX_PRAGMA_DIAGNOSTIC_POP(); -#endif // NANOVG_HAS_STB_IMAGE - #ifdef _MSC_VER #pragma warning(disable: 4100) // unreferenced formal parameter #pragma warning(disable: 4127) // conditional expression is constant @@ -816,45 +790,6 @@ void nvgFillPaint(NVGcontext* ctx, NVGpaint paint) nvgTransformMultiply(state->fill.xform, state->xform); } -int nvgCreateImage(NVGcontext* ctx, const char* filename, int imageFlags) -{ -#if NANOVG_HAS_STB_IMAGE - int w, h, n, image; - unsigned char* img; - stbi_set_unpremultiply_on_load(1); - stbi_convert_iphone_png_to_rgb(1); - img = stbi_load(filename, &w, &h, &n, 4); - if (img == NULL) { -// printf("Failed to load %s - %s\n", filename, stbi_failure_reason()); - return 0; - } - image = nvgCreateImageRGBA(ctx, w, h, imageFlags, img); - stbi_image_free(img); - return image; -#else - BX_UNUSED(ctx, filename, imageFlags); - return 0; -#endif // NANOVG_HAS_STB_IMAGE -} - -int nvgCreateImageMem(NVGcontext* ctx, int imageFlags, unsigned char* data, int ndata) -{ -#if NANOVG_HAS_STB_IMAGE - int w, h, n, image; - unsigned char* img = stbi_load_from_memory(data, ndata, &w, &h, &n, 4); - if (img == NULL) { -// printf("Failed to load %s - %s\n", filename, stbi_failure_reason()); - return 0; - } - image = nvgCreateImageRGBA(ctx, w, h, imageFlags, img); - stbi_image_free(img); - return image; -#else - BX_UNUSED(ctx, imageFlags, data, ndata); - return 0; -#endif // NANOVG_HAS_STB_IMAGE -} - int nvgCreateImageRGBA(NVGcontext* ctx, int w, int h, int imageFlags, const unsigned char* data) { return ctx->params.renderCreateTexture(ctx->params.userPtr, NVG_TEXTURE_RGBA, w, h, imageFlags, data); diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg.h b/3rdparty/bgfx/examples/common/nanovg/nanovg.h index 7881043..a6a952c 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg.h +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg.h @@ -366,14 +366,6 @@ float nvgRadToDeg(float rad); // In addition you can upload your own image. The image loading is provided by stb_image. // The parameter imageFlags is combination of flags defined in NVGimageFlags. -// Creates image by loading it from the disk from specified file name. -// Returns handle to the image. -int nvgCreateImage(NVGcontext* ctx, const char* filename, int imageFlags); - -// Creates image by loading it from the specified chunk of memory. -// Returns handle to the image. -int nvgCreateImageMem(NVGcontext* ctx, int imageFlags, unsigned char* data, int ndata); - // Creates image from specified image data. // Returns handle to the image. int nvgCreateImageRGBA(NVGcontext* ctx, int w, int h, int imageFlags, const unsigned char* data); diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp index 78d854b..f1b49d3 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -31,7 +31,6 @@ #include #include -#include #include BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4244); // warning C4244: '=' : conversion from '' to '', possible loss of data @@ -132,7 +131,7 @@ namespace struct GLNVGcontext { - bx::AllocatorI* m_allocator; + bx::AllocatorI* allocator; bgfx::ProgramHandle prog; bgfx::UniformHandle u_scissorMat; @@ -152,7 +151,7 @@ namespace bgfx::TextureHandle texMissing; bgfx::TransientVertexBuffer tvb; - uint8_t m_viewId; + bgfx::ViewId viewId; struct GLNVGtexture* textures; float view[2]; @@ -185,7 +184,7 @@ namespace for (i = 0; i < gl->ntextures; i++) { - if (gl->textures[i].id.idx == bgfx::invalidHandle) + if (gl->textures[i].id.idx == bgfx::kInvalidHandle) { tex = &gl->textures[i]; break; @@ -198,7 +197,7 @@ namespace { int old = gl->ctextures; gl->ctextures = (gl->ctextures == 0) ? 2 : gl->ctextures*2; - gl->textures = (struct GLNVGtexture*)BX_REALLOC(gl->m_allocator, gl->textures, sizeof(struct GLNVGtexture)*gl->ctextures); + gl->textures = (struct GLNVGtexture*)BX_REALLOC(gl->allocator, gl->textures, sizeof(struct GLNVGtexture)*gl->ctextures); bx::memSet(&gl->textures[old], 0xff, (gl->ctextures-old)*sizeof(struct GLNVGtexture) ); if (gl->textures == NULL) @@ -237,10 +236,10 @@ namespace if (bgfx::isValid(gl->textures[ii].id) && (gl->textures[ii].flags & NVG_IMAGE_NODELETE) == 0) { - bgfx::destroyTexture(gl->textures[ii].id); + bgfx::destroy(gl->textures[ii].id); } bx::memSet(&gl->textures[ii], 0, sizeof(gl->textures[ii]) ); - gl->textures[ii].id.idx = bgfx::invalidHandle; + gl->textures[ii].id.idx = bgfx::kInvalidHandle; return 1; } } @@ -280,7 +279,7 @@ namespace } else { - gl->u_halfTexel.idx = bgfx::invalidHandle; + gl->u_halfTexel.idx = bgfx::kInvalidHandle; } s_nvgDecl @@ -295,7 +294,14 @@ namespace return 1; } - static int nvgRenderCreateTexture(void* _userPtr, int _type, int _width, int _height, int _flags, const unsigned char* _rgba) + static int nvgRenderCreateTexture( + void* _userPtr + , int _type + , int _width + , int _height + , int _flags + , const unsigned char* _rgba + ) { struct GLNVGcontext* gl = (struct GLNVGcontext*)_userPtr; struct GLNVGtexture* tex = glnvg__allocTexture(gl); @@ -386,7 +392,8 @@ namespace struct GLNVGcontext* gl = (struct GLNVGcontext*)_userPtr; struct GLNVGtexture* tex = glnvg__findTexture(gl, image); - if (!bgfx::isValid(tex->id) ) + if (NULL == tex + || !bgfx::isValid(tex->id) ) { return 0; } @@ -399,16 +406,16 @@ namespace static void glnvg__xformToMat3x4(float* m3, float* t) { - m3[0] = t[0]; - m3[1] = t[1]; - m3[2] = 0.0f; - m3[3] = 0.0f; - m3[4] = t[2]; - m3[5] = t[3]; - m3[6] = 0.0f; - m3[7] = 0.0f; - m3[8] = t[4]; - m3[9] = t[5]; + m3[ 0] = t[0]; + m3[ 1] = t[1]; + m3[ 2] = 0.0f; + m3[ 3] = 0.0f; + m3[ 4] = t[2]; + m3[ 5] = t[3]; + m3[ 6] = 0.0f; + m3[ 7] = 0.0f; + m3[ 8] = t[4]; + m3[ 9] = t[5]; m3[10] = 1.0f; m3[11] = 0.0f; } @@ -421,8 +428,14 @@ namespace return c; } - static int glnvg__convertPaint(struct GLNVGcontext* gl, struct GLNVGfragUniforms* frag, struct NVGpaint* paint, - struct NVGscissor* scissor, float width, float fringe) + static int glnvg__convertPaint( + struct GLNVGcontext* gl + , struct GLNVGfragUniforms* frag + , struct NVGpaint* paint + , struct NVGscissor* scissor + , float width + , float fringe + ) { struct GLNVGtexture* tex = NULL; float invxform[6] = {}; @@ -462,10 +475,15 @@ namespace } nvgTransformInverse(invxform, paint->xform); frag->type = NSVG_SHADER_FILLIMG; + if (tex->type == NVG_TEXTURE_RGBA) + { frag->texType = (tex->flags & NVG_IMAGE_PREMULTIPLIED) ? 0.0f : 1.0f; + } else + { frag->texType = 2.0f; + } gl->th = tex->id; } else @@ -483,16 +501,16 @@ namespace static void glnvg__mat3(float* dst, float* src) { - dst[0] = src[0]; - dst[1] = src[1]; - dst[2] = src[2]; + dst[0] = src[ 0]; + dst[1] = src[ 1]; + dst[2] = src[ 2]; - dst[3] = src[4]; - dst[4] = src[5]; - dst[5] = src[6]; + dst[3] = src[ 4]; + dst[4] = src[ 5]; + dst[5] = src[ 6]; - dst[6] = src[8]; - dst[7] = src[9]; + dst[6] = src[ 8]; + dst[7] = src[ 9]; dst[8] = src[10]; } @@ -541,7 +559,7 @@ namespace struct GLNVGcontext* gl = (struct GLNVGcontext*)_userPtr; gl->view[0] = (float)width; gl->view[1] = (float)height; - bgfx::setViewRect(gl->m_viewId, 0, 0, width * devicePixelRatio, height * devicePixelRatio); + bgfx::setViewRect(gl->viewId, 0, 0, width * devicePixelRatio, height * devicePixelRatio); } static void fan(uint32_t _start, uint32_t _count) @@ -586,10 +604,10 @@ namespace | BGFX_STENCIL_OP_FAIL_Z_KEEP | BGFX_STENCIL_OP_PASS_Z_DECR ); - bgfx::setVertexBuffer(&gl->tvb); + bgfx::setVertexBuffer(0, &gl->tvb); bgfx::setTexture(0, gl->s_tex, gl->th); fan(paths[i].fillOffset, paths[i].fillCount); - bgfx::submit(gl->m_viewId, gl->prog); + bgfx::submit(gl->viewId, gl->prog); } } @@ -611,15 +629,15 @@ namespace | BGFX_STENCIL_OP_FAIL_Z_KEEP | BGFX_STENCIL_OP_PASS_Z_KEEP ); - bgfx::setVertexBuffer(&gl->tvb, paths[i].strokeOffset, paths[i].strokeCount); + bgfx::setVertexBuffer(0, &gl->tvb, paths[i].strokeOffset, paths[i].strokeCount); bgfx::setTexture(0, gl->s_tex, gl->th); - bgfx::submit(gl->m_viewId, gl->prog); + bgfx::submit(gl->viewId, gl->prog); } } // Draw fill bgfx::setState(gl->state); - bgfx::setVertexBuffer(&gl->tvb, call->vertexOffset, call->vertexCount); + bgfx::setVertexBuffer(0, &gl->tvb, call->vertexOffset, call->vertexCount); bgfx::setTexture(0, gl->s_tex, gl->th); bgfx::setStencil(0 | BGFX_STENCIL_TEST_NOTEQUAL @@ -628,7 +646,7 @@ namespace | BGFX_STENCIL_OP_FAIL_Z_ZERO | BGFX_STENCIL_OP_PASS_Z_ZERO ); - bgfx::submit(gl->m_viewId, gl->prog); + bgfx::submit(gl->viewId, gl->prog); } static void glnvg__convexFill(struct GLNVGcontext* gl, struct GLNVGcall* call) @@ -642,10 +660,10 @@ namespace { if (paths[i].fillCount == 0) continue; bgfx::setState(gl->state); - bgfx::setVertexBuffer(&gl->tvb); + bgfx::setVertexBuffer(0, &gl->tvb); bgfx::setTexture(0, gl->s_tex, gl->th); fan(paths[i].fillOffset, paths[i].fillCount); - bgfx::submit(gl->m_viewId, gl->prog); + bgfx::submit(gl->viewId, gl->prog); } if (gl->edgeAntiAlias) @@ -656,9 +674,9 @@ namespace bgfx::setState(gl->state | BGFX_STATE_PT_TRISTRIP ); - bgfx::setVertexBuffer(&gl->tvb, paths[i].strokeOffset, paths[i].strokeCount); + bgfx::setVertexBuffer(0, &gl->tvb, paths[i].strokeOffset, paths[i].strokeCount); bgfx::setTexture(0, gl->s_tex, gl->th); - bgfx::submit(gl->m_viewId, gl->prog); + bgfx::submit(gl->viewId, gl->prog); } } } @@ -676,9 +694,9 @@ namespace bgfx::setState(gl->state | BGFX_STATE_PT_TRISTRIP ); - bgfx::setVertexBuffer(&gl->tvb, paths[i].strokeOffset, paths[i].strokeCount); + bgfx::setVertexBuffer(0, &gl->tvb, paths[i].strokeOffset, paths[i].strokeCount); bgfx::setTexture(0, gl->s_tex, gl->th); - bgfx::submit(gl->m_viewId, gl->prog); + bgfx::submit(gl->viewId, gl->prog); } } @@ -689,9 +707,9 @@ namespace nvgRenderSetUniforms(gl, call->uniformOffset, call->image); bgfx::setState(gl->state); - bgfx::setVertexBuffer(&gl->tvb, call->vertexOffset, call->vertexCount); + bgfx::setVertexBuffer(0, &gl->tvb, call->vertexOffset, call->vertexCount); bgfx::setTexture(0, gl->s_tex, gl->th); - bgfx::submit(gl->m_viewId, gl->prog); + bgfx::submit(gl->viewId, gl->prog); } } @@ -809,7 +827,7 @@ namespace if (gl->ncalls+1 > gl->ccalls) { gl->ccalls = gl->ccalls == 0 ? 32 : gl->ccalls * 2; - gl->calls = (struct GLNVGcall*)BX_REALLOC(gl->m_allocator, gl->calls, sizeof(struct GLNVGcall) * gl->ccalls); + gl->calls = (struct GLNVGcall*)BX_REALLOC(gl->allocator, gl->calls, sizeof(struct GLNVGcall) * gl->ccalls); } ret = &gl->calls[gl->ncalls++]; bx::memSet(ret, 0, sizeof(struct GLNVGcall) ); @@ -822,7 +840,7 @@ namespace if (gl->npaths + n > gl->cpaths) { GLNVGpath* paths; int cpaths = glnvg__maxi(gl->npaths + n, 128) + gl->cpaths / 2; // 1.5x Overallocate - paths = (GLNVGpath*)BX_REALLOC(gl->m_allocator, gl->paths, sizeof(GLNVGpath) * cpaths); + paths = (GLNVGpath*)BX_REALLOC(gl->allocator, gl->paths, sizeof(GLNVGpath) * cpaths); if (paths == NULL) return -1; gl->paths = paths; gl->cpaths = cpaths; @@ -839,7 +857,7 @@ namespace { NVGvertex* verts; int cverts = glnvg__maxi(gl->nverts + n, 4096) + gl->cverts/2; // 1.5x Overallocate - verts = (NVGvertex*)BX_REALLOC(gl->m_allocator, gl->verts, sizeof(NVGvertex) * cverts); + verts = (NVGvertex*)BX_REALLOC(gl->allocator, gl->verts, sizeof(NVGvertex) * cverts); if (verts == NULL) return -1; gl->verts = verts; gl->cverts = cverts; @@ -855,7 +873,7 @@ namespace if (gl->nuniforms+n > gl->cuniforms) { gl->cuniforms = gl->cuniforms == 0 ? glnvg__maxi(n, 32) : gl->cuniforms * 2; - gl->uniforms = (unsigned char*)BX_REALLOC(gl->m_allocator, gl->uniforms, gl->cuniforms * structSize); + gl->uniforms = (unsigned char*)BX_REALLOC(gl->allocator, gl->uniforms, gl->cuniforms * structSize); } ret = gl->nuniforms * structSize; gl->nuniforms += n; @@ -870,8 +888,16 @@ namespace vtx->v = v; } - static void nvgRenderFill(void* _userPtr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, - float fringe, const float* bounds, const NVGpath* paths, int npaths) + static void nvgRenderFill( + void* _userPtr + , NVGpaint* paint + , NVGcompositeOperationState compositeOperation + , NVGscissor* scissor + , float fringe + , const float* bounds + , const NVGpath* paths + , int npaths + ) { struct GLNVGcontext* gl = (struct GLNVGcontext*)_userPtr; @@ -948,8 +974,16 @@ namespace } } - static void nvgRenderStroke(void* _userPtr, struct NVGpaint* paint, NVGcompositeOperationState compositeOperation, struct NVGscissor* scissor, float fringe, - float strokeWidth, const struct NVGpath* paths, int npaths) + static void nvgRenderStroke( + void* _userPtr + , struct NVGpaint* paint + , NVGcompositeOperationState compositeOperation + , struct NVGscissor* scissor + , float fringe + , float strokeWidth + , const struct NVGpath* paths + , int npaths + ) { struct GLNVGcontext* gl = (struct GLNVGcontext*)_userPtr; @@ -1017,22 +1051,22 @@ namespace return; } - bgfx::destroyProgram(gl->prog); - bgfx::destroyTexture(gl->texMissing); + bgfx::destroy(gl->prog); + bgfx::destroy(gl->texMissing); - bgfx::destroyUniform(gl->u_scissorMat); - bgfx::destroyUniform(gl->u_paintMat); - bgfx::destroyUniform(gl->u_innerCol); - bgfx::destroyUniform(gl->u_outerCol); - bgfx::destroyUniform(gl->u_viewSize); - bgfx::destroyUniform(gl->u_scissorExtScale); - bgfx::destroyUniform(gl->u_extentRadius); - bgfx::destroyUniform(gl->u_params); - bgfx::destroyUniform(gl->s_tex); + bgfx::destroy(gl->u_scissorMat); + bgfx::destroy(gl->u_paintMat); + bgfx::destroy(gl->u_innerCol); + bgfx::destroy(gl->u_outerCol); + bgfx::destroy(gl->u_viewSize); + bgfx::destroy(gl->u_scissorExtScale); + bgfx::destroy(gl->u_extentRadius); + bgfx::destroy(gl->u_params); + bgfx::destroy(gl->s_tex); if (bgfx::isValid(gl->u_halfTexel) ) { - bgfx::destroyUniform(gl->u_halfTexel); + bgfx::destroy(gl->u_halfTexel); } for (uint32_t ii = 0, num = gl->ntextures; ii < num; ++ii) @@ -1040,37 +1074,36 @@ namespace if (bgfx::isValid(gl->textures[ii].id) && (gl->textures[ii].flags & NVG_IMAGE_NODELETE) == 0) { - bgfx::destroyTexture(gl->textures[ii].id); + bgfx::destroy(gl->textures[ii].id); } } - BX_FREE(gl->m_allocator, gl->uniforms); - BX_FREE(gl->m_allocator, gl->verts); - BX_FREE(gl->m_allocator, gl->paths); - BX_FREE(gl->m_allocator, gl->calls); - BX_FREE(gl->m_allocator, gl->textures); - BX_FREE(gl->m_allocator, gl); + BX_FREE(gl->allocator, gl->uniforms); + BX_FREE(gl->allocator, gl->verts); + BX_FREE(gl->allocator, gl->paths); + BX_FREE(gl->allocator, gl->calls); + BX_FREE(gl->allocator, gl->textures); + BX_FREE(gl->allocator, gl); } } // namespace -NVGcontext* nvgCreate(int edgeaa, unsigned char _viewId, bx::AllocatorI* _allocator) +NVGcontext* nvgCreate(int32_t _edgeaa, bgfx::ViewId _viewId, bx::AllocatorI* _allocator) { if (NULL == _allocator) { -#if BX_CONFIG_ALLOCATOR_CRT - static bx::CrtAllocator allocator; + static bx::DefaultAllocator allocator; _allocator = &allocator; -#else - BX_CHECK(false, "No allocator has been passed to nvgCreate(). Either specify a bx::AllocatorI instance or enable BX_CONFIG_ALLOCATOR_CRT directive."); - return NULL; -#endif // BX_CONFIG_ALLOCATOR_CRT } struct NVGparams params; struct NVGcontext* ctx = NULL; struct GLNVGcontext* gl = (struct GLNVGcontext*)BX_ALLOC(_allocator, sizeof(struct GLNVGcontext) ); - if (gl == NULL) goto error; + if (gl == NULL) + { + goto error; + } + bx::memSet(gl, 0, sizeof(struct GLNVGcontext) ); bx::memSet(¶ms, 0, sizeof(params) ); @@ -1085,12 +1118,12 @@ NVGcontext* nvgCreate(int edgeaa, unsigned char _viewId, bx::AllocatorI* _alloca params.renderStroke = nvgRenderStroke; params.renderTriangles = nvgRenderTriangles; params.renderDelete = nvgRenderDelete; - params.userPtr = gl; - params.edgeAntiAlias = edgeaa; + params.userPtr = gl; + params.edgeAntiAlias = _edgeaa; - gl->m_allocator = _allocator; - gl->edgeAntiAlias = edgeaa; - gl->m_viewId = uint8_t(_viewId); + gl->allocator = _allocator; + gl->edgeAntiAlias = _edgeaa; + gl->viewId = _viewId; ctx = nvgCreateInternal(¶ms); if (ctx == NULL) goto error; @@ -1107,98 +1140,128 @@ error: return NULL; } -NVGcontext* nvgCreate(int edgeaa, unsigned char _viewId) { - return nvgCreate(edgeaa, _viewId, NULL); +NVGcontext* nvgCreate(int32_t _edgeaa, bgfx::ViewId _viewId) { + return nvgCreate(_edgeaa, _viewId, NULL); } -void nvgDelete(struct NVGcontext* ctx) +void nvgDelete(struct NVGcontext* _ctx) { - nvgDeleteInternal(ctx); + nvgDeleteInternal(_ctx); } -uint8_t nvgViewId(struct NVGcontext* ctx) +void nvgSetViewId(struct NVGcontext* _ctx, bgfx::ViewId _viewId) { - struct NVGparams* params = nvgInternalParams(ctx); + struct NVGparams* params = nvgInternalParams(_ctx); struct GLNVGcontext* gl = (struct GLNVGcontext*)params->userPtr; - return gl->m_viewId; + gl->viewId = _viewId; } -void nvgViewId(struct NVGcontext* ctx, unsigned char _viewId) +uint16_t nvgGetViewId(struct NVGcontext* _ctx) { - struct NVGparams* params = nvgInternalParams(ctx); + struct NVGparams* params = nvgInternalParams(_ctx); struct GLNVGcontext* gl = (struct GLNVGcontext*)params->userPtr; - gl->m_viewId = uint8_t(_viewId); + return gl->viewId; } -bgfx::TextureHandle nvglImageHandle(NVGcontext* ctx, int image) +bgfx::TextureHandle nvglImageHandle(NVGcontext* _ctx, int32_t _image) { - GLNVGcontext* gl = (GLNVGcontext*)nvgInternalParams(ctx)->userPtr; - GLNVGtexture* tex = glnvg__findTexture(gl, image); + GLNVGcontext* gl = (GLNVGcontext*)nvgInternalParams(_ctx)->userPtr; + GLNVGtexture* tex = glnvg__findTexture(gl, _image); return tex->id; } -NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int width, int height, int imageFlags, uint8_t viewId) +NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int32_t width, int32_t height, int32_t imageFlags, bgfx::ViewId viewId) { - NVGLUframebuffer* framebuffer = nvgluCreateFramebuffer(ctx, width, height, imageFlags); + NVGLUframebuffer* framebuffer = nvgluCreateFramebuffer(ctx, width, height, imageFlags); + if (framebuffer != NULL) { nvgluSetViewFramebuffer(viewId, framebuffer); } + return framebuffer; } -NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int width, int height, int imageFlags) +NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* _ctx, int32_t _width, int32_t _height, int32_t _imageFlags) { - NVGLUframebuffer* framebuffer = new NVGLUframebuffer; - framebuffer->ctx = ctx; - framebuffer->image = nvgCreateImageRGBA(ctx, width, height, imageFlags | NVG_IMAGE_PREMULTIPLIED, NULL); - bgfx::TextureHandle texture = nvglImageHandle(ctx, framebuffer->image); - if (!bgfx::isValid(texture)) + BX_UNUSED(_imageFlags); + bgfx::TextureHandle textures[] = + { + bgfx::createTexture2D(_width, _height, false, 1, bgfx::TextureFormat::RGBA8, BGFX_TEXTURE_RT), + bgfx::createTexture2D(_width, _height, false, 1, bgfx::TextureFormat::D24S8, BGFX_TEXTURE_RT | BGFX_TEXTURE_RT_WRITE_ONLY) + }; + bgfx::FrameBufferHandle fbh = bgfx::createFrameBuffer( + BX_COUNTOF(textures) + , textures + , true + ); + + if (!bgfx::isValid(fbh) ) { - nvgluDeleteFramebuffer(framebuffer); return NULL; } - framebuffer->handle = bgfx::createFrameBuffer(1, &texture, false); - if (!bgfx::isValid(framebuffer->handle)) + + struct NVGparams* params = nvgInternalParams(_ctx); + struct GLNVGcontext* gl = (struct GLNVGcontext*)params->userPtr; + struct GLNVGtexture* tex = glnvg__allocTexture(gl); + + if (NULL == tex) { - nvgluDeleteFramebuffer(framebuffer); + bgfx::destroy(fbh); return NULL; } + + tex->width = _width; + tex->height = _height; + tex->type = NVG_TEXTURE_RGBA; + tex->flags = _imageFlags | NVG_IMAGE_PREMULTIPLIED; + tex->id = bgfx::getTexture(fbh); + + NVGLUframebuffer* framebuffer = BX_NEW(gl->allocator, NVGLUframebuffer); + framebuffer->ctx = _ctx; + framebuffer->image = tex->id.idx; + framebuffer->handle = fbh; + return framebuffer; } -void nvgluBindFramebuffer(NVGLUframebuffer* framebuffer) +void nvgluBindFramebuffer(NVGLUframebuffer* _framebuffer) { static NVGcontext* s_prevCtx = NULL; - static uint8_t s_prevViewId; - if (framebuffer != NULL) + static bgfx::ViewId s_prevViewId; + if (_framebuffer != NULL) { - s_prevCtx = framebuffer->ctx; - s_prevViewId = nvgViewId(framebuffer->ctx); - nvgViewId(framebuffer->ctx, framebuffer->viewId); - } else if (s_prevCtx != NULL) { - nvgViewId(s_prevCtx, s_prevViewId); + s_prevCtx = _framebuffer->ctx; + s_prevViewId = nvgGetViewId(_framebuffer->ctx); + nvgSetViewId(_framebuffer->ctx, _framebuffer->viewId); + } + else if (s_prevCtx != NULL) + { + nvgSetViewId(s_prevCtx, s_prevViewId); } } -void nvgluDeleteFramebuffer(NVGLUframebuffer* framebuffer) +void nvgluDeleteFramebuffer(NVGLUframebuffer* _framebuffer) { - if (framebuffer == NULL) + if (_framebuffer == NULL) + { return; - if (bgfx::isValid(framebuffer->handle)) - { - bgfx::destroyFrameBuffer(framebuffer->handle); } - if (framebuffer->image > 0) + + if (bgfx::isValid(_framebuffer->handle)) { - nvgDeleteImage(framebuffer->ctx, framebuffer->image); + bgfx::destroy(_framebuffer->handle); } - delete framebuffer; + + struct NVGparams* params = nvgInternalParams(_framebuffer->ctx); + struct GLNVGcontext* gl = (struct GLNVGcontext*)params->userPtr; + glnvg__deleteTexture(gl, _framebuffer->image); + BX_DELETE(gl->allocator, _framebuffer); } -void nvgluSetViewFramebuffer(uint8_t viewId, NVGLUframebuffer* framebuffer) +void nvgluSetViewFramebuffer(bgfx::ViewId _viewId, NVGLUframebuffer* _framebuffer) { - framebuffer->viewId = viewId; - bgfx::setViewFrameBuffer(viewId, framebuffer->handle); - bgfx::setViewSeq(viewId, true); + _framebuffer->viewId = _viewId; + bgfx::setViewFrameBuffer(_viewId, _framebuffer->handle); + bgfx::setViewMode(_viewId, bgfx::ViewMode::Sequential); } diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.h b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.h index 36ba0dd..275a7cd 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.h +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.h @@ -1,30 +1,39 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #ifndef NANOVG_BGFX_H_HEADER_GUARD #define NANOVG_BGFX_H_HEADER_GUARD -#include "bgfx/bgfx.h" +#include namespace bx { struct AllocatorI; } struct NVGcontext; -struct NVGLUframebuffer { +struct NVGLUframebuffer +{ NVGcontext* ctx; bgfx::FrameBufferHandle handle; int image; - uint8_t viewId; + bgfx::ViewId viewId; }; -typedef struct NVGLUframebuffer NVGLUframebuffer; -NVGcontext* nvgCreate(int edgeaa, unsigned char _viewId, bx::AllocatorI* _allocator); -NVGcontext* nvgCreate(int edgeaa, unsigned char _viewId); -void nvgDelete(struct NVGcontext* ctx); -uint8_t nvgViewId(struct NVGcontext* ctx); -void nvgViewId(struct NVGcontext* ctx, unsigned char _viewId); +/// +NVGcontext* nvgCreate(int32_t _edgeaa, bgfx::ViewId _viewId, bx::AllocatorI* _allocator); + +/// +NVGcontext* nvgCreate(int32_t _edgeaa, bgfx::ViewId _viewId); + +/// +void nvgDelete(struct NVGcontext* _ctx); + +/// +void nvgSetViewId(struct NVGcontext* _ctx, bgfx::ViewId _viewId); + +/// +uint16_t nvgGetViewId(struct NVGcontext* _ctx); // Helper functions to create bgfx framebuffer to render to. // Example: @@ -45,10 +54,20 @@ void nvgViewId(struct NVGcontext* ctx, unsigned char _viewId); // nvgFillPaint(ctx, paint); // nvgFill(ctx); // nvgEndFrame(ctx); -NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int width, int height, int imageFlags, uint8_t viewId); -NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* ctx, int width, int height, int imageFlags); -void nvgluBindFramebuffer(NVGLUframebuffer* framebuffer); -void nvgluDeleteFramebuffer(NVGLUframebuffer* framebuffer); -void nvgluSetViewFramebuffer(uint8_t viewId, NVGLUframebuffer* framebuffer); + +/// +NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* _ctx, int32_t _width, int32_t _height, int32_t _imageFlags, bgfx::ViewId _viewId); + +/// +NVGLUframebuffer* nvgluCreateFramebuffer(NVGcontext* _ctx, int32_t _width, int32_t _height, int32_t _imageFlags); + +/// +void nvgluBindFramebuffer(NVGLUframebuffer* _framebuffer); + +/// +void nvgluDeleteFramebuffer(NVGLUframebuffer* _framebuffer); + +/// +void nvgluSetViewFramebuffer(bgfx::ViewId _viewId, NVGLUframebuffer* _framebuffer); #endif // NANOVG_BGFX_H_HEADER_GUARD diff --git a/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h b/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h index dcd5297..e7b2657 100644 --- a/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h +++ b/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_nanovg_fill_glsl[541] = { - 0x56, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x56, 0x53, 0x48, 0x05, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, // wSize.......u_ha 0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0xeb, 0x01, 0x00, // lfTexel......... 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // .attribute highp @@ -35,296 +35,294 @@ static const uint8_t vs_nanovg_fill_glsl[541] = 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, // gl_Position = t 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mpvar_1;.}... }; -static const uint8_t vs_nanovg_fill_spv[3412] = +static const uint8_t vs_nanovg_fill_spv[3378] = { - 0x56, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, 0x6c, // VSH........u_hal + 0x56, 0x53, 0x48, 0x05, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, 0x6c, // VSH........u_hal 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, // fTexel.......u_v - 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x24, 0x0d, 0x03, // iewSize......$.. - 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0xfe, 0x61, 0x00, 0x00, 0x00, // .#..........a... - 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, // ................ - 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, // ...GLSL.std.450. - 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, // ...........main. - 0x00, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, // ................ - 0x0f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, // ...........main. - 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x46, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, // .......F...Outpu - 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, // t......F.......g - 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x46, // l_Position.....F - 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // .......v_positio - 0x6e, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x46, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, // n......F.......v - 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x06, // _texcoord0...... - 0x0f, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x32, // ...@main(vf2;vf2 - 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x48, 0x55, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, // ;......HU..a_pos - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x15, 0x26, 0x00, 0x00, 0x61, // ition.......&..a - 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, // _texcoord0...... - 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, // ..._varying_.... - 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, // .......$Global.. - 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie - 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x01, // wRect........... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, // ...u_viewTexel.. - 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie - 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, // w..............u - 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xd7, // _invView........ - 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, // .......u_proj... - 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, // ...........u_inv - 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x06, // Proj............ - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, // ...u_viewProj... - 0x00, 0x07, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, // ...........u_inv - 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xd7, // ViewProj........ - 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, // .......u_model.. - 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // ...........u_mod - 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0a, // elView.......... - 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, // ...u_modelViewPr - 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, // oj.............u - 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, // _alphaRef4...... - 0x05, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, // .......u_viewSiz - 0x65, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x75, // e..............u - 0x5f, 0x68, 0x61, 0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, // _halfTexel.....B - 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x61, // ............A..a - 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, // _position....... - 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, // ...a_position... - 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // ...,?..a_texcoor - 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, // d0.........a_tex - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, // coord0.........f - 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, // lattenTemp...... - 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, // U..param........ - 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, // ...param........ - 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, // ...@entryPointOu - 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // tput_gl_Position - 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x06, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, // ...........Outpu - 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, // t..............v - 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, // _position....... - 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // .......v_texcoor - 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, // d0.........@entr - 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, // yPointOutput...G - 0x00, 0x04, 0x00, 0x20, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, // ... .......@...H - 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, // ...........#.... - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, // ...H...........# - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x02, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x02, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, // ...#... ...H.... - 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, // ...........#...` - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x04, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x04, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, // ...#.......H.... - 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, // ...........#.... - 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x06, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x06, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, // ...#... ...H.... - 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, // ...........#...` - 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x08, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x08, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, // ...#.......H.... - 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, // ...........#.... - 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, // ...H............ - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0a, // .......H........ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0a, // .......H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, // ...#.......H.... - 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, // ...............H - 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, // ...........#... - 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, // ...H...........# - 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0d, // ...0...H........ - 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xd7, // ...#...@...G.... - 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, // .......G...B..." - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, // .......G........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, // .......G........ - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, // .......G........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, // .......G........ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, // ...............! - 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, // ................ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, // ... ............ - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, // ....... ........ - 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, // ................ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x46, 0x04, 0x00, 0x00, 0x1d, // ...........F.... - 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xb0, // ...........!.... - 0x07, 0x00, 0x00, 0x46, 0x04, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, // ...F........... - 0x00, 0x04, 0x00, 0xc3, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x46, 0x04, 0x00, 0x00, 0x15, // ...........F.... - 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, // ....... .......+ - 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, // ...............+ - 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, // ..............., - 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, // ................ - 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, // ...+............ - 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, // .......e........ - 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // ........... .... - 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, // ...+.......j... - 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x20, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, // ....... ...e...j - 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x10, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, // ................ - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, // ...e...e...e...e - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x65, // ...e...e... ...e - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, // ...e............ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x54, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xd7, // ... ...T........ - 0x05, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x54, 0x08, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, // ...;...T...B.... - 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x32, 0x0a, 0x00, 0x00, 0x0d, // ...+.......2.... - 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, // ... ............ - 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, // ...+............ - 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, // ...+............ - 0x00, 0x00, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, // ..@+............ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, // ... ............ - 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, // ...+......./.... - 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, // ... ............ - 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, // ...+............ - 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, // ..?+............ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, // ... ............ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, // ... ............ - 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, // ...;............ - 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, // ...;............ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, // ... ............ - 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, // ...;............ - 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x06, 0x04, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, // ................ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x83, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, // ... ............ - 0x04, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x83, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, // ...;............ - 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, // ... ............ - 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, // ...6............ - 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, // ...........Sa..; - 0x00, 0x04, 0x00, 0xc3, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, // ...............; - 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, // ........U......; - 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, // ...............= - 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, // ........A......= - 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, // .......,?......> - 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, // ....U...A..>.... - 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x46, 0x04, 0x00, 0x00, 0x49, // ...,?..9...F...I - 0x26, 0x00, 0x00, 0x06, 0x0f, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, // &.......U......> - 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, // .......I&..A.... - 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, // ...T4..........= - 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, // ...........T4..> - 0x00, 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, // ...........A.... - 0x02, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, // ...'A..........= - 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x41, // ...........'A..A - 0x00, 0x05, 0x00, 0x92, 0x02, 0x00, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x0b, // ........N....... - 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x41, // ...>....N......A - 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, // ........M....... - 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0xc1, // ...=............ - 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x92, 0x02, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xcd, // M..A............ - 0x0f, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x5c, 0x00, 0x00, 0xe0, // .......>........ - 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x46, // .......8...6...F - 0x04, 0x00, 0x00, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x07, 0x00, 0x00, 0x37, // ...............7 - 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x48, 0x55, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, // .......HU..7.... - 0x02, 0x00, 0x00, 0x15, 0x26, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x08, 0x5f, 0x00, 0x00, 0x3b, // ....&......._..; - 0x00, 0x04, 0x00, 0xc3, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, // ...............A - 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xd4, 0x1b, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, // ................ - 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd4, 0x1b, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x41, // ...>...........A - 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xb4, 0x3f, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, // ........?....... - 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb4, 0x3f, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x3d, // ...>....?......= - 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xc6, 0x28, 0x00, 0x00, 0x48, 0x55, 0x00, 0x00, 0x41, // ........(..HU..A - 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xd6, 0x43, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, // ........C....... - 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd6, 0x43, 0x00, 0x00, 0xc6, 0x28, 0x00, 0x00, 0x3d, // ...>....C...(..= - 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xb3, 0x28, 0x00, 0x00, 0x15, 0x26, 0x00, 0x00, 0x41, // ........(...&..A - 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xd9, 0x45, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x32, // ........E..B...2 - 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x43, 0x5f, 0x00, 0x00, 0xd9, // ...=.......C_... - 0x45, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1d, 0x5d, 0x00, 0x00, 0x43, // E..O........]..C - 0x5f, 0x00, 0x00, 0x43, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x81, // _..C_........... - 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0xdc, 0x2b, 0x00, 0x00, 0xb3, 0x28, 0x00, 0x00, 0x1d, // ........+...(... - 0x5d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0x5a, 0x56, 0x00, 0x00, 0x0f, // ]..A.......ZV... - 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5a, 0x56, 0x00, 0x00, 0xdc, // .......>...ZV... - 0x2b, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xb9, 0x45, 0x00, 0x00, 0x0f, // +..A........E... - 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, // ...........=.... - 0x00, 0x00, 0x00, 0x8f, 0x2c, 0x00, 0x00, 0xb9, 0x45, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, // ....,...E....... - 0x00, 0x00, 0x00, 0xc5, 0x2e, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x8f, 0x2c, 0x00, 0x00, 0x41, // ............,..A - 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xec, 0x38, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, // ........8..B.../ - 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf0, // .......=........ - 0x51, 0x00, 0x00, 0xec, 0x38, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x72, // Q...8..........r - 0x37, 0x00, 0x00, 0xc5, 0x2e, 0x00, 0x00, 0xf0, 0x51, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, // 7.......Q....... - 0x00, 0x00, 0x00, 0xa4, 0x44, 0x00, 0x00, 0x72, 0x37, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, // ....D..r7......A - 0x00, 0x06, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x42, 0x1f, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, // .......B........ - 0x0a, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, // .......=........ - 0x61, 0x00, 0x00, 0x42, 0x1f, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc6, // a..B............ - 0x2e, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xfd, 0x61, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, // ........a..A.... - 0x02, 0x00, 0x00, 0xed, 0x38, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0d, // ....8..B.../.... - 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x00, 0x00, 0xed, // ...=........Q... - 0x38, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8f, 0x38, 0x00, 0x00, 0xc6, // 8...........8... - 0x2e, 0x00, 0x00, 0xf1, 0x51, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcd, // ....Q........... - 0x3a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8f, 0x38, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, // :.......8..P.... - 0x00, 0x00, 0x00, 0xb3, 0x40, 0x00, 0x00, 0xa4, 0x44, 0x00, 0x00, 0xcd, 0x3a, 0x00, 0x00, 0x0c, // ....@...D...:... - 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x2b, // .......A.......+ - 0x33, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2b, // 3..........>...+ - 0x33, 0x00, 0x00, 0xb3, 0x40, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x46, 0x04, 0x00, 0x00, 0xd1, // 3...@..=...F.... - 0x5b, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xd1, 0x5b, 0x00, 0x00, 0x38, // [...........[..8 - 0x00, 0x01, 0x00, 0x00, // .... + 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x0d, 0x00, // iewSize......... + 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0xfe, 0x61, 0x00, // ...#..........a. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, // ................ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, // .....GLSL.std.45 + 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // 0............... + 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x95, 0x15, 0x00, // n............... + 0x00, 0x87, 0x0c, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x46, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, // n........F...Out + 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // put......F...... + 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, // .gl_Position.... + 0x00, 0x46, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // .F.......v_posit + 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x46, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, // ion......F...... + 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, // .v_texcoord0.... + 0x00, 0x06, 0x0f, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x32, 0x3b, 0x76, // .....@main(vf2;v + 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x48, 0x55, 0x00, 0x00, 0x61, 0x5f, 0x70, // f2;......HU..a_p + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x15, 0x26, 0x00, // osition.......&. + 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, // .a_texcoord0.... + 0x00, 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, // ....._varying_.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, // .........$Global + 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, // iewRect......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, // .....u_viewTexel + 0x00, 0x06, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // iew............. + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // .u_invView...... + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, // .........u_proj. + 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, // nvProj.......... + 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // .....u_viewProj. + 0x00, 0x06, 0x00, 0x07, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // nvViewProj...... + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .............u_m + 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xd7, 0x05, 0x00, // odelView........ + 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, // Proj............ + 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x06, // .u_alphaRef4.... + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x53, // .........u_viewS + 0x69, 0x7a, 0x65, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0d, 0x00, 0x00, // ize............. + 0x00, 0x75, 0x5f, 0x68, 0x61, 0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x05, 0x00, 0x03, // .u_halfTexel.... + 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xcb, 0x41, 0x00, // .B............A. + 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, // .a_position..... + 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, // .....a_position. + 0x00, 0x05, 0x00, 0x05, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // .....,?..a_texco + 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, // ord0.........a_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, // excoord0........ + 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, // .flattenTemp.... + 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..U..param...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, // .....param...... + 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, // .....@entryPoint + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, // Output.gl_Positi + 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x87, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, // on...........@en + 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, // tryPointOutput.v + 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, // _position....... + 0x00, 0x8b, 0x17, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, // .....@entryPoint + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // Output.v_texcoor + 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x20, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, // d0...G... ...... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, // .@...H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, // .#.......H...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, // .#...`...H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, // .#.......H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, // .#...`...H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, // .#.......H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd7, 0x05, 0x00, // .#... ...H...... + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...0...H.. + 0x00, 0xd7, 0x05, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x40, 0x0a, 0x00, // .........#...@.. + 0x00, 0x47, 0x00, 0x03, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .G...........G.. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .B...".......G.. + 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. + 0x00, 0x95, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. + 0x00, 0x95, 0x15, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. + 0x00, 0x87, 0x0c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .............G.. + 0x00, 0x8b, 0x17, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, // ................ + 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, // .....!.......... + 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, // ......... ...... + 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, // ................ + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, // ................ + 0x00, 0x46, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, // .F.............. + 0x00, 0x21, 0x00, 0x05, 0x00, 0xb0, 0x07, 0x00, 0x00, 0x46, 0x04, 0x00, 0x00, 0x90, 0x02, 0x00, // .!.......F...... + 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xc3, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x46, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .F........... .. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, // .....+.......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1f, 0x07, 0x00, // .....,.......... + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, // .............e.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // . .......+...... + 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x20, 0x01, 0x00, // .j... ....... .. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x10, 0x00, 0xd7, 0x05, 0x00, // .e...j.......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .........e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x20, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // . ...e...e...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x54, 0x08, 0x00, // ......... ...T.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0xd7, 0x05, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x54, 0x08, 0x00, // .........;...T.. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .B.......+...... + 0x00, 0x32, 0x0a, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // .2....... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ........@+...... + 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, // ./....... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ........?+...... + 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, // .........;...... + 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, // .........;...... + 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // ......... ...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0x95, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, // ......... ...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, // .........;...... + 0x00, 0x87, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, // .........;...... + 0x00, 0x8b, 0x17, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // .........6...... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, // ................ + 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xc3, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, // .Sa..;.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, // .....;........U. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, // .....;.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xcb, 0x41, 0x00, // .....=........A. + 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x2c, 0x3f, 0x00, // .....=.......,?. + 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0xcb, 0x41, 0x00, // .....>....U...A. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x2c, 0x3f, 0x00, 0x00, 0x39, 0x00, 0x06, // .>.......,?..9.. + 0x00, 0x46, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x06, 0x0f, 0x00, 0x00, 0xab, 0x55, 0x00, // .F...I&.......U. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, // .....>.......I&. + 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, // .A.......T4..... + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, // .....=.......... + 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, // .T4..>.......... + 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, // .A........@..... + 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, // .....=....... .. + 0x00, 0xee, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x87, 0x0c, 0x00, 0x00, 0x20, 0x1f, 0x00, // ..@..>....... .. + 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, // .A........@..... + 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, // .....=........-. + 0x00, 0xef, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, // ..@..>........-. + 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x46, 0x04, 0x00, // .....8...6...F.. + 0x00, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, // .............7.. + 0x00, 0x90, 0x02, 0x00, 0x00, 0x48, 0x55, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, // .....HU..7...... + 0x00, 0x15, 0x26, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x08, 0x5f, 0x00, 0x00, 0x3b, 0x00, 0x04, // ..&......._..;.. + 0x00, 0xc3, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, // .............A.. + 0x00, 0x90, 0x02, 0x00, 0x00, 0xd4, 0x1b, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, // ................ + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd4, 0x1b, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x41, 0x00, 0x05, // .>...........A.. + 0x00, 0x90, 0x02, 0x00, 0x00, 0xb4, 0x3f, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, // ......?......... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb4, 0x3f, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>....?......=.. + 0x00, 0x13, 0x00, 0x00, 0x00, 0xc6, 0x28, 0x00, 0x00, 0x48, 0x55, 0x00, 0x00, 0x41, 0x00, 0x05, // ......(..HU..A.. + 0x00, 0x90, 0x02, 0x00, 0x00, 0xd6, 0x43, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, // ......C......... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd6, 0x43, 0x00, 0x00, 0xc6, 0x28, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>....C...(..=.. + 0x00, 0x13, 0x00, 0x00, 0x00, 0xb3, 0x28, 0x00, 0x00, 0x15, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, // ......(...&..A.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xd9, 0x45, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x32, 0x0a, 0x00, // ......E..B...2.. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x43, 0x5f, 0x00, 0x00, 0xd9, 0x45, 0x00, // .=.......C_...E. + 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1d, 0x5d, 0x00, 0x00, 0x43, 0x5f, 0x00, // .O........]..C_. + 0x00, 0x43, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, // .C_............. + 0x00, 0x13, 0x00, 0x00, 0x00, 0xdc, 0x2b, 0x00, 0x00, 0xb3, 0x28, 0x00, 0x00, 0x1d, 0x5d, 0x00, // ......+...(...]. + 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0x5a, 0x56, 0x00, 0x00, 0x0f, 0x12, 0x00, // .A.......ZV..... + 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5a, 0x56, 0x00, 0x00, 0xdc, 0x2b, 0x00, // .....>...ZV...+. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xb9, 0x45, 0x00, 0x00, 0x0f, 0x12, 0x00, // .A........E..... + 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........=...... + 0x00, 0x8f, 0x2c, 0x00, 0x00, 0xb9, 0x45, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ..,...E......... + 0x00, 0xc5, 0x2e, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x8f, 0x2c, 0x00, 0x00, 0x41, 0x00, 0x06, // ..........,..A.. + 0x00, 0x8b, 0x02, 0x00, 0x00, 0xec, 0x38, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ......8..B.../.. + 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf0, 0x51, 0x00, // .....=........Q. + 0x00, 0xec, 0x38, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x72, 0x37, 0x00, // ..8..........r7. + 0x00, 0xc5, 0x2e, 0x00, 0x00, 0xf0, 0x51, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ......Q......... + 0x00, 0xa4, 0x44, 0x00, 0x00, 0x72, 0x37, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, // ..D..r7......A.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0x42, 0x1f, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, // .....B.......... + 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x61, 0x00, // .....=........a. + 0x00, 0x42, 0x1f, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc6, 0x2e, 0x00, // .B.............. + 0x00, 0x18, 0x00, 0x00, 0x00, 0xfd, 0x61, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, // ......a..A...... + 0x00, 0xed, 0x38, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0d, 0x0a, 0x00, // ..8..B.../...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf1, 0x51, 0x00, 0x00, 0xed, 0x38, 0x00, // .=........Q...8. + 0x00, 0x88, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8f, 0x38, 0x00, 0x00, 0xc6, 0x2e, 0x00, // ..........8..... + 0x00, 0xf1, 0x51, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcd, 0x3a, 0x00, // ..Q...........:. + 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8f, 0x38, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // ......8..P...... + 0x00, 0xb3, 0x40, 0x00, 0x00, 0xa4, 0x44, 0x00, 0x00, 0xcd, 0x3a, 0x00, 0x00, 0x0c, 0x0a, 0x00, // ..@...D...:..... + 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x2b, 0x33, 0x00, // .....A.......+3. + 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2b, 0x33, 0x00, // .........>...+3. + 0x00, 0xb3, 0x40, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x46, 0x04, 0x00, 0x00, 0xd1, 0x5b, 0x00, // ..@..=...F....[. + 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xd1, 0x5b, 0x00, 0x00, 0x38, 0x00, 0x01, // ..........[..8.. + 0x00, 0x00, // .. }; -static const uint8_t vs_nanovg_fill_dx9[424] = +static const uint8_t vs_nanovg_fill_dx9[426] = { - 0x56, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, 0x6c, // VSH........u_hal + 0x56, 0x53, 0x48, 0x05, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, 0x6c, // VSH........u_hal 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x01, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, // fTexel.......u_v 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x78, 0x01, 0x00, // iewSize......x.. - 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x28, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x72, // .....(.CTAB....r - 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ - 0x91, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, // ...k...D........ - 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, // ...P.......`.... - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, // .......P.......u - 0x5f, 0x68, 0x61, 0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, // _halfTexel...... - 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ...........u_vie - 0x77, 0x53, 0x69, 0x7a, 0x65, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // wSize.vs_3_0.Mic - 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL - 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler - 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, // 10.1...Q........ - 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, // ......?......... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, // ................ - 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, // ................ - 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x1f, // ................ - 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0x00, 0x03, 0x02, // ................ - 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, // ................ - 0x00, 0xd0, 0x90, 0x00, 0x00, 0xd0, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, // ................ - 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, // .U.............. - 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0xe0, 0x00, // .....U.......... - 0x00, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x81, 0x02, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, // .........U...... - 0x00, 0x0c, 0xe0, 0x02, 0x00, 0x64, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x00, // .....d.......... - 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ........ + 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x28, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, // .......(.CTAB... + 0x00, 0x72, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, // .r.............. + 0x00, 0x00, 0x91, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, // .....k...D...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, // .....P.......`.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... + 0x00, 0x75, 0x5f, 0x68, 0x61, 0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x01, 0x00, 0x03, // .u_halfTexel.... + 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, // iewSize.vs_3_0.M + 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, // icrosoft (R) HLS + 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, // L Shader Compile + 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, // r 10.1...Q...... + 0xa0, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........?....... + 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, // ................ + 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0x00, // ................ + 0x03, 0x02, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x06, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, // ................ + 0x80, 0x00, 0x00, 0xd0, 0x90, 0x00, 0x00, 0xd0, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // ................ + 0xe0, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, // ...U............ + 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, // .......U........ + 0xe0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x81, 0x02, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, // ...........U.... + 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x02, 0x00, 0x64, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, // .......d........ + 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... }; -static const uint8_t vs_nanovg_fill_dx11[577] = +static const uint8_t vs_nanovg_fill_dx11[579] = { - 0x56, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x02, 0x44, 0x58, 0x42, // wSize........DXB - 0x43, 0x99, 0x64, 0x1c, 0x9f, 0xec, 0x38, 0xd9, 0xd2, 0x91, 0x86, 0xde, 0x66, 0x7d, 0x52, 0x06, // C.d...8.....f}R. - 0xfe, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // .............,.. - 0x00, 0x80, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, // .........ISGNL.. - 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........8...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .A.............. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // .........POSITIO - 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, // N.TEXCOORD...OSG - 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, // Nh...........P.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x5c, 0x00, 0x00, // ................ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................ - 0x00, 0x0c, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, // .....SV_POSITION - 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, 0x48, 0x44, // .TEXCOORD....SHD - 0x52, 0x24, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x49, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, // R$...@...I...Y.. - 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, // .F. ........._.. - 0x03, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, // .2......._...2.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....g.... ..... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, // .....e...2 ..... - 0x00, 0x65, 0x00, 0x00, 0x03, 0xc2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, // .e.... ......h.. - 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .........2...... - 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, // .F.......F...... - 0x00, 0x0e, 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, // .....2.......F.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....F. ........ - 0x00, 0x00, 0x00, 0x00, 0x07, 0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, // ...... ......... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, // ......@......... - 0x08, 0x22, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, // ." ..........A.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, // ......@.....?6.. - 0x08, 0xc2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // .. .......@..... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, // ............?6.. - 0x05, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, // .2 ......F...... - 0x00, 0x36, 0x00, 0x00, 0x05, 0xc2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x14, 0x10, // .6.... ......... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x01, 0x00, 0x10, 0x00, 0x10, // .....>.......... - 0x00, // . + 0x56, 0x53, 0x48, 0x05, 0xcf, 0xda, 0x1b, 0x94, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x02, 0x00, 0x00, 0x44, // wSize..........D + 0x58, 0x42, 0x43, 0x99, 0x64, 0x1c, 0x9f, 0xec, 0x38, 0xd9, 0xd2, 0x91, 0x86, 0xde, 0x66, 0x7d, // XBC.d...8.....f} + 0x52, 0x06, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, // R.............., + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x4c, // ...........ISGNL + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, // ...........8.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ + 0x03, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...A............ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, // ...........POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0x4f, // ION.TEXCOORD...O + 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, // SGNh...........P + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x5c, // ................ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ................ + 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI + 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x53, // ON.TEXCOORD....S + 0x48, 0x44, 0x52, 0x24, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x49, 0x00, 0x00, 0x00, 0x59, // HDR$...@...I...Y + 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, // ...F. ........._ + 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, // ...2......._...2 + 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......g.... ... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x01, // .......e...2 ... + 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xc2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, // ...e.... ......h + 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x32, 0x00, 0x10, 0x00, 0x00, // ...........2.... + 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, // ...F.......F.... + 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // .......2.......F + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......F. ...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x12, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, // ........ ....... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, // ........@....... + 0x00, 0x00, 0x08, 0x22, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x80, 0x41, // ..." ..........A + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, // ........@.....?6 + 0x00, 0x00, 0x08, 0xc2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, // .... .......@... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, // ..............?6 + 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, // ...2 ......F.... + 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xc2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, // ...6.... ....... + 0x14, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x02, 0x01, 0x00, 0x10, // .......>........ + 0x00, 0x10, 0x00, // ... }; static const uint8_t vs_nanovg_fill_mtl[904] = { - 0x56, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie + 0x56, 0x53, 0x48, 0x05, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, // wSize.......u_ha 0x6c, 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x56, 0x03, 0x00, // lfTexel......V.. 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, // .using namespace diff --git a/3rdparty/bgfx/examples/common/packrect.h b/3rdparty/bgfx/examples/common/packrect.h index fa6ebeb..9ec4c4f 100644 --- a/3rdparty/bgfx/examples/common/packrect.h +++ b/3rdparty/bgfx/examples/common/packrect.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/common/ps/fs_particle.bin.h b/3rdparty/bgfx/examples/common/ps/fs_particle.bin.h new file mode 100644 index 0000000..2b46fba --- /dev/null +++ b/3rdparty/bgfx/examples/common/ps/fs_particle.bin.h @@ -0,0 +1,395 @@ +static const uint8_t fs_particle_glsl[403] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x73, 0x01, 0x00, 0x00, 0x76, // Color......s...v + 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec + 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary + 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, // ing highp vec4 v + 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, // _texcoord0;.unif + 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, // orm sampler2D s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, // texColor;.void m + 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, // ain ().{. lowp + 0x76, 0x65, 0x63, 0x34, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x6c, // vec4 rgba_1;. l + 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // owp vec4 tmpvar_ + 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, // 2;. tmpvar_2 = + 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, // texture2D (s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // Color, v_texcoor + 0x64, 0x30, 0x2e, 0x78, 0x79, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, // d0.xy);. rgba_1 + 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // .xyz = ((tmpvar_ + 0x32, 0x2e, 0x78, 0x78, 0x78, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // 2.xxx * v_color0 + 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // .xyz) * (tmpvar_ + 0x32, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, // 2.x * v_color0.w + 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, // ));. rgba_1.w = + 0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x20, 0x2a, 0x20, // ((tmpvar_2.x * + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x29, 0x20, 0x2a, 0x20, 0x28, 0x31, // v_color0.w) * (1 + 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // .0 - v_texcoord0 + 0x2e, 0x7a, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, // .z));. gl_FragC + 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, // olor = rgba_1;.} + 0x0a, 0x0a, 0x00, // ... +}; +static const uint8_t fs_particle_spv[3943] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x58, 0x0f, 0x00, 0x00, 0x03, 0x02, // FSH.......X..... + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0xb1, 0x61, 0x00, 0x00, 0x00, 0x00, // #..........a.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, // ..w...t......... + 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, // ................ + 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, // ..............ma + 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x42, 0x67, // in........a...Bg + 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, // fxSampler2D..... + 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, // ..a.......m_samp + 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x01, 0x00, // ler.......a..... + 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, // ..m_texture..... + 0x0e, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, // ......bgfxTextur + 0x65, 0x32, 0x44, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, // e2D(struct-BgfxS + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, 0x31, 0x31, // ampler2D-p1-t211 + 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, // ;vf2;.....'..._s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, // ampler.......... + 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, // .._coord......5. + 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, // ..vec4_splat(f1; + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, // .........._x.... + 0x07, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, // ......@main(vf4; + 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x42, 0x24, // vf4;vf4;......B$ + 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..v_color0...... + 0x05, 0x00, 0x78, 0x20, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // ..x ..v_texcoord + 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // 0......A..gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, // gData_0_......C. + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, // ..s_texColor.... + 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ......s_texColor + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, // Sampler......... + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, // ..s_texColorText + 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, // ure...........bg + 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, // fx_VoidFrag..... + 0x04, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ...T..param..... + 0x04, 0x00, 0x60, 0x10, 0x00, 0x00, 0x72, 0x67, 0x62, 0x61, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..`...rgba...... + 0x04, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ../1..param..... + 0x04, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ......param..... + 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ...A..v_color0.. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ......w...v_colo + 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, // r0.........<..v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, // texcoord0.....t. + 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... + 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // ......gl_FragDat + 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, // a_0_.......G..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, // ram........U..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, // ram...........pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, // ram...........gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, // _FragData_0_.... + 0x04, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, // ..Z...$Global... + 0x06, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..Z.......u_view + 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x01, 0x00, // Rect......Z..... + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, // ..u_viewTexel... + 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..Z.......u_view + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......Z.......u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x5a, 0x08, // invView.......Z. + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ......u_proj.... + 0x06, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, // ..Z.......u_invP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x06, 0x00, // roj.......Z..... + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ..u_viewProj.... + 0x07, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..Z.......u_invV + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x5a, 0x08, // iewProj.......Z. + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, // ......u_model... + 0x06, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..Z.......u_mode + 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x0a, 0x00, // lView.....Z..... + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ..u_modelViewPro + 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, // j.....Z.......u_ + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, // alphaRef4.G..... + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, // ..".......G..... + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, // ..!.......G..... + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, // ..".......G..... + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, // ..!.......G...w. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, // ..........G...t. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, // ..........G..... + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x06, 0x0b, // ..........G..... + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, // ......@...H...Z. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, // ..Z.......#..... + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...Z......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...Z.......#. + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x02, 0x00, // .. ...H...Z..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5a, 0x08, // ..........H...Z. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, // ..........H...Z. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#...`...H. + 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..Z............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...Z......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...Z.......#. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x04, 0x00, // ......H...Z..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5a, 0x08, // ..........H...Z. + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, // ..........H...Z. + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..Z............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...Z......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...Z.......#. + 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x06, 0x00, // .. ...H...Z..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5a, 0x08, // ..........H...Z. + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, // ..........H...Z. + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#...`...H. + 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..Z............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...Z......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...Z.......#. + 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x08, 0x00, // ......H...Z..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5a, 0x08, // ..........H...Z. + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, // ..........H...Z. + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ..Z............. + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H...Z......... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...Z.......#. + 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x0a, 0x00, // ......H...Z..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5a, 0x08, // ..........H...Z. + 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, // ......#... ...G. + 0x03, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, // ..Z............. + 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, // ..!............. + 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, // ..........a..... + 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, // ..a............. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0xc2, 0x03, 0x00, 0x00, 0x1d, 0x00, // ......!......... + 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, // ..........!..... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, // .......... ..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x91, 0x00, // ..........!..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, 0x09, // .. ...........a. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, // ..;.......C..... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, // .. ...y......... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, // ..;...y......... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, // ..;............. + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, // .. ............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, // .. ...z......... + 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, // ................ + 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x15, 0x00, // ................ + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, // .............?+. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, // ......w.......;. + 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, // ......t....... . + 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, // ................ + 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..e...........+. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, // ......j... ..... + 0x04, 0x00, 0x06, 0x0b, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, // ......e...j..... + 0x0e, 0x00, 0x5a, 0x08, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, // ..Z...........e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x06, 0x0b, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e.......e...e. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, // ......6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, // ..............Sa + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, // ..;........G.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, // ..;........U.... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, // ..;............. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, // ..=.......!C.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, // ..=........3.... + 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, // ..P...a.... ..!C + 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, // ...3..>...C.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, // ..=........A..w. + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, // ..=........<..t. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, // ..>....G...A..>. + 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, // ...U...<..9..... + 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, // ...&.......G...U + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, // ......=......... + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, // ......>......... + 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ......8...6..... + 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x03, 0x00, 0x00, 0x37, 0x00, // ..............7. + 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, // ......'...7..... + 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xcd, 0x5b, 0x00, 0x00, 0x41, 0x00, // ...........[..A. + 0x05, 0x00, 0x14, 0x03, 0x00, 0x00, 0x69, 0x24, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, // ......i$..'..... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x69, 0x24, // ..=........1..i$ + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x27, 0x0e, // ..A...z...TD..'. + 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x9b, 0x56, // ......=........V + 0x00, 0x00, 0x54, 0x44, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xc9, 0x42, // ..TD..V........B + 0x00, 0x00, 0x16, 0x31, 0x00, 0x00, 0x9b, 0x56, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ...1...V..=..... + 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, // ..6.......W..... + 0x00, 0x00, 0xa4, 0x51, 0x00, 0x00, 0xc9, 0x42, 0x00, 0x00, 0x36, 0x1c, 0x00, 0x00, 0xfe, 0x00, // ...Q...B..6..... + 0x02, 0x00, 0xa4, 0x51, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, // ...Q..8...6..... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, // ..5...........7. + 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x17, 0x3e, // ...............> + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x18, 0x53, 0x00, 0x00, 0xdd, 0x0e, // ..=........S.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xdd, 0x0e, // ..=.......]J.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0xdd, 0x0e, // ..=........4.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, 0xdd, 0x0e, // ..=........5.... + 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x18, 0x53, // ..P.......?:...S + 0x00, 0x00, 0x5d, 0x4a, 0x00, 0x00, 0xfd, 0x34, 0x00, 0x00, 0x10, 0x35, 0x00, 0x00, 0xfe, 0x00, // ..]J...4...5.... + 0x02, 0x00, 0x3f, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, // ..?:..8...6..... + 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x00, 0x37, 0x00, // ..............7. + 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, // ......B$..7..... + 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc4, 0x41, // ..x ..7........A + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb2, 0x19, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, // ..........;..... + 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, // ...T......;..... + 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, // ..`.......;..... + 0x00, 0x00, 0x2f, 0x31, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, // ../1......;..... + 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd5, 0x54, // ..........>....T + 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, // ......9......... + 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xd5, 0x54, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x61, 0x09, // ..5....T..=...a. + 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2f, 0x31, // ...Q..C...>.../1 + 0x00, 0x00, 0x94, 0x51, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x51, 0x18, // ...Q..=.......Q. + 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x11, 0x48, // ..x ..O........H + 0x00, 0x00, 0x51, 0x18, 0x00, 0x00, 0x51, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..Q...Q......... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x11, 0x48, 0x00, 0x00, 0x39, 0x00, // ..>........H..9. + 0x06, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x19, 0x54, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x2f, 0x31, // .......T....../1 + 0x00, 0x00, 0xc9, 0x2e, 0x00, 0x00, 0x4f, 0x00, 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfb, 0x1a, // ......O......... + 0x00, 0x00, 0x19, 0x54, 0x00, 0x00, 0x19, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...T...T........ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x60, 0x10, // ..........>...`. + 0x00, 0x00, 0xfb, 0x1a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x81, 0x1e, // ......=......... + 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x4a, // ..`...O.......`J + 0x00, 0x00, 0x81, 0x1e, 0x00, 0x00, 0x81, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x27, 0x3d, // ......=.......'= + 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xad, 0x59, // ..B$..O........Y + 0x00, 0x00, 0x27, 0x3d, 0x00, 0x00, 0x27, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..'=..'=........ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x5e, 0x46, // ..............^F + 0x00, 0x00, 0x60, 0x4a, 0x00, 0x00, 0xad, 0x59, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ..`J...Y..A..... + 0x00, 0x00, 0x3c, 0x45, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ... + 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0xb0, 0x61, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, // ..`....a..A..... + 0x00, 0x00, 0xf1, 0x3f, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ...?..`.......=. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd2, 0x5f, 0x00, 0x00, 0xf1, 0x3f, 0x00, 0x00, 0x41, 0x00, // ......._...?..A. + 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4d, 0x4c, 0x00, 0x00, 0x42, 0x24, 0x00, 0x00, 0x13, 0x0a, // ......ML..B$.... + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa0, 0x3b, 0x00, 0x00, 0x4d, 0x4c, // ..=........;..ML + 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x27, 0x1b, 0x00, 0x00, 0xd2, 0x5f, // ..........'...._ + 0x00, 0x00, 0xa0, 0x3b, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x28, 0x3e, // ...;..A.......(> + 0x00, 0x00, 0x78, 0x20, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..x ......=..... + 0x00, 0x00, 0x12, 0x5b, 0x00, 0x00, 0x28, 0x3e, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, // ...[..(>........ + 0x00, 0x00, 0x81, 0x2d, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x12, 0x5b, 0x00, 0x00, 0x85, 0x00, // ...-.......[.... + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xac, 0x59, 0x00, 0x00, 0x27, 0x1b, 0x00, 0x00, 0x81, 0x2d, // .......Y..'....- + 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x08, 0x4b, 0x00, 0x00, 0x60, 0x10, // ..A........K..`. + 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x4b, 0x00, 0x00, 0xac, 0x59, // ......>....K...Y + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x95, 0x3e, 0x00, 0x00, 0x60, 0x10, // ..=........>..`. + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc4, 0x41, 0x00, 0x00, 0x95, 0x3e, 0x00, 0x00, 0xfd, 0x00, // ..>....A...>.... + 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..8.... +}; +static const uint8_t fs_particle_dx9[328] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x28, 0x01, 0x00, 0x00, 0x00, // Color0.....(.... + 0x03, 0xff, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, // ..... .CTAB....S + 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ...L...0........ + 0x00, 0x02, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...<.......s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, // Color........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......ps_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, // 10.1..Q........ + 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, // ..?............. + 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, // ................ + 0x00, 0x00, 0x80, 0x01, 0x00, 0x07, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, // ................ + 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, // ...B............ + 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, // ................ + 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x54, 0x80, 0x00, // .............T.. + 0x00, 0x93, 0x90, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x00, // ................ + 0x00, 0xff, 0x90, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x01, // ................ + 0x00, 0xaa, 0x91, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, // .............U.. + 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ........ +}; +static const uint8_t fs_particle_dx11[519] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x01, 0x00, 0x00, 0x44, // Color0.........D + 0x58, 0x42, 0x43, 0xdd, 0x04, 0xf1, 0x4a, 0xaa, 0xb0, 0xdf, 0xe0, 0xf5, 0x18, 0x2f, 0x3b, 0x6e, // XBC...J....../;n + 0xa9, 0x0e, 0x0a, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, // ..............., + 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, // ...........ISGNl + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, // ...........b.... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, // ................ + 0x07, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, // ...SV_POSITION.C + 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, // OLOR.TEXCOORD..O + 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, // .......SV_TARGET + 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x08, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x42, // ...SHDR....@...B + 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, // ...Z....`......X + 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, // ....p......UU..b + 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x72, // ...........b...r + 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... + 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, // ...h.......E.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // .......F.......F + 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, // ~.......`......8 + 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, // ..."............ + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, // ...........8.... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, // .......F.......6 + 0x19, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x20, 0x10, 0x00, 0x00, // .......8...r ... + 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x1f, 0x10, 0x00, 0x01, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, // .......".......* + 0x10, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, // ...A........@... + 0x00, 0x80, 0x3f, 0x38, 0x00, 0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, // ..?8.... ....... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, // ...............> + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ....... +}; +static const uint8_t fs_particle_mtl[808] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x19, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us + 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me + 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . float4 v_colo + 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x74, // r0;. float4 v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, // excoord0;.};.str + 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // uct xlatMtlShade + 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // rOutput {. floa + 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, // t4 gl_FragColor; + 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // tlShaderUniform + 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, // {.};.fragment xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, // t xlatMtlMain (x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, // latMtlShaderInpu + 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, // t _mtl_i [[stage + 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, // _in]], constant + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, // xlatMtlShaderUni + 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, // form& _mtl_u [[b + 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x0a, 0x20, 0x20, 0x2c, 0x20, 0x20, // uffer(0)]]. , + 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, // texture2d s_texColor [[t + 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, 0x61, 0x6d, // exture(0)]], sam + 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, // pler _mtlsmp_s_t + 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, // exColor [[sample + 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, // r(0)]]).{. xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // _mtl_o;. float4 + 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, // rgba_1 = 0;. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, // loat4 tmpvar_2 = + 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, // 0;. tmpvar_2 = + 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, // s_texColor.samp + 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, // le(_mtlsmp_s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x29, 0x28, // Color, (float2)( + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // _mtl_i.v_texcoor + 0x64, 0x30, 0x2e, 0x78, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, // d0.xy));. rgba_ + 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // 1.xyz = ((tmpvar + 0x5f, 0x32, 0x2e, 0x78, 0x78, 0x78, 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, // _2.xxx * _mtl_i. + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x20, 0x2a, 0x20, // v_color0.xyz) * + 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x5f, 0x6d, // (tmpvar_2.x * _m + 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x29, // tl_i.v_color0.w) + 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, // );. rgba_1.w = + 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x5f, // ((tmpvar_2.x * _ + 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, // mtl_i.v_color0.w + 0x29, 0x20, 0x2a, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // ) * (1.0 - _mtl_ + 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x7a, 0x29, // i.v_texcoord0.z) + 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // );. _mtl_o.gl_F + 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x72, 0x67, 0x62, 0x61, 0x5f, // ragColor = rgba_ + 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // 1;. return _mtl + 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _o;.}... +}; +extern const uint8_t* fs_particle_pssl; +extern const uint32_t fs_particle_pssl_size; diff --git a/3rdparty/bgfx/examples/common/ps/fs_particle.sc b/3rdparty/bgfx/examples/common/ps/fs_particle.sc new file mode 100644 index 0000000..486a7cd --- /dev/null +++ b/3rdparty/bgfx/examples/common/ps/fs_particle.sc @@ -0,0 +1,19 @@ +$input v_color0, v_texcoord0 + +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include + +SAMPLER2D(s_texColor, 0); + +void main() +{ + vec4 rgba = texture2D(s_texColor, v_texcoord0.xy).xxxx; + + rgba.xyz = rgba.xyz * v_color0.xyz * rgba.w * v_color0.w; + rgba.w = rgba.w * v_color0.w * (1.0f - v_texcoord0.z); + gl_FragColor = rgba; +} diff --git a/3rdparty/bgfx/examples/common/ps/makefile b/3rdparty/bgfx/examples/common/ps/makefile new file mode 100644 index 0000000..72fbea9 --- /dev/null +++ b/3rdparty/bgfx/examples/common/ps/makefile @@ -0,0 +1,9 @@ +# +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. +# License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause +# + +include ../../../../bgfx/scripts/shader-embeded.mk + +rebuild: + @make -s --no-print-directory clean all diff --git a/3rdparty/bgfx/examples/common/ps/particle_system.cpp b/3rdparty/bgfx/examples/common/ps/particle_system.cpp new file mode 100644 index 0000000..54c10b3 --- /dev/null +++ b/3rdparty/bgfx/examples/common/ps/particle_system.cpp @@ -0,0 +1,757 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include +#include + +#include "particle_system.h" +#include "../bgfx_utils.h" +#include "../packrect.h" + +#include +#include + +#include "vs_particle.bin.h" +#include "fs_particle.bin.h" + +static const bgfx::EmbeddedShader s_embeddedShaders[] = +{ + BGFX_EMBEDDED_SHADER(vs_particle), + BGFX_EMBEDDED_SHADER(fs_particle), + + BGFX_EMBEDDED_SHADER_END() +}; + +struct PosColorTexCoord0Vertex +{ + float m_x; + float m_y; + float m_z; + uint32_t m_abgr; + float m_u; + float m_v; + float m_blend; + float m_angle; + + static void init() + { + ms_decl + .begin() + .add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float) + .add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true) + .add(bgfx::Attrib::TexCoord0, 4, bgfx::AttribType::Float) + .end(); + } + + static bgfx::VertexDecl ms_decl; +}; + +bgfx::VertexDecl PosColorTexCoord0Vertex::ms_decl; + +void EmitterUniforms::reset() +{ + m_position[0] = 0.0f; + m_position[1] = 0.0f; + m_position[2] = 0.0f; + + m_angle[0] = 0.0f; + m_angle[1] = 0.0f; + m_angle[2] = 0.0f; + + m_particlesPerSecond = 0; + + m_offsetStart[0] = 0.0f; + m_offsetStart[1] = 1.0f; + m_offsetEnd[0] = 2.0f; + m_offsetEnd[1] = 3.0f; + + m_rgba[0] = 0x00ffffff; + m_rgba[1] = UINT32_MAX; + m_rgba[2] = UINT32_MAX; + m_rgba[3] = UINT32_MAX; + m_rgba[4] = 0x00ffffff; + + m_blendStart[0] = 0.8f; + m_blendStart[1] = 1.0f; + m_blendEnd[0] = 0.0f; + m_blendEnd[1] = 0.2f; + + m_scaleStart[0] = 0.1f; + m_scaleStart[1] = 0.2f; + m_scaleEnd[0] = 0.3f; + m_scaleEnd[1] = 0.4f; + + m_lifeSpan[0] = 1.0f; + m_lifeSpan[1] = 2.0f; + + m_gravityScale = 0.0f; + + m_easePos = bx::Easing::Linear; + m_easeRgba = bx::Easing::Linear; + m_easeBlend = bx::Easing::Linear; + m_easeScale = bx::Easing::Linear; +} + +namespace ps +{ + struct Particle + { + float start[3]; + float end[2][3]; + float blendStart; + float blendEnd; + float scaleStart; + float scaleEnd; + + uint32_t rgba[5]; + + float life; + float lifeSpan; + }; + + struct ParticleSort + { + float dist; + uint32_t idx; + }; + + inline uint32_t toAbgr(const float* _rgba) + { + return 0 + | (uint8_t(_rgba[0]*255.0f)<< 0) + | (uint8_t(_rgba[1]*255.0f)<< 8) + | (uint8_t(_rgba[2]*255.0f)<<16) + | (uint8_t(_rgba[3]*255.0f)<<24) + ; + } + + inline uint32_t toAbgr(float _rr, float _gg, float _bb, float _aa) + { + return 0 + | (uint8_t(_rr*255.0f)<< 0) + | (uint8_t(_gg*255.0f)<< 8) + | (uint8_t(_bb*255.0f)<<16) + | (uint8_t(_aa*255.0f)<<24) + ; + } + +#define SPRITE_TEXTURE_SIZE 1024 + template + struct SpriteT + { + SpriteT() + : m_ra(TextureSizeT, TextureSizeT) + { + } + + EmitterSpriteHandle create(uint16_t _width, uint16_t _height) + { + EmitterSpriteHandle handle = { bx::kInvalidHandle }; + + if (m_handleAlloc.getNumHandles() < m_handleAlloc.getMaxHandles() ) + { + Pack2D pack; + if (m_ra.find(_width, _height, pack) ) + { + handle.idx = m_handleAlloc.alloc(); + m_pack[handle.idx] = pack; + } + } + + return handle; + } + + void destroy(EmitterSpriteHandle _sprite) + { + const Pack2D& pack = m_pack[_sprite.idx]; + m_ra.clear(pack); + m_handleAlloc.free(_sprite.idx); + } + + const Pack2D& get(EmitterSpriteHandle _sprite) const + { + return m_pack[_sprite.idx]; + } + + bx::HandleAllocT m_handleAlloc; + Pack2D m_pack[MaxHandlesT]; + RectPack2DT<256> m_ra; + }; + + struct Emitter + { + void create(EmitterShape::Enum _shape, EmitterDirection::Enum _direction, uint32_t _maxParticles); + void destroy(); + + void reset() + { + m_dt = 0.0f; + m_uniforms.reset(); + m_num = 0; + bx::memSet(&m_aabb, 0, sizeof(Aabb) ); + + m_rng.reset(); + } + + void update(float _dt) + { + uint32_t num = m_num; + for (uint32_t ii = 0; ii < num; ++ii) + { + Particle& particle = m_particles[ii]; + particle.life += _dt * 1.0f/particle.lifeSpan; + + if (particle.life > 1.0f) + { + if (ii != num-1) + { + bx::memCopy(&particle, &m_particles[num-1], sizeof(Particle) ); + --ii; + } + + --num; + } + } + + m_num = num; + + if (0 < m_uniforms.m_particlesPerSecond) + { + spawn(_dt); + } + } + + void spawn(float _dt) + { + float mtx[16]; + bx::mtxSRT(mtx + , 1.0f, 1.0f, 1.0f + , m_uniforms.m_angle[0], m_uniforms.m_angle[1], m_uniforms.m_angle[2] + , m_uniforms.m_position[0], m_uniforms.m_position[1], m_uniforms.m_position[2] + ); + + const float timePerParticle = 1.0f/m_uniforms.m_particlesPerSecond; + m_dt += _dt; + const uint32_t numParticles = uint32_t(m_dt / timePerParticle); + m_dt -= numParticles * timePerParticle; + + float time = 0.0f; + for (uint32_t ii = 0 + ; ii < numParticles && m_num < m_max + ; ++ii + ) + { + Particle& particle = m_particles[m_num]; + m_num++; + + const float up[3] = { 0.0f, 1.0f, 0.0f }; + + float pos[3]; + switch (m_shape) + { + default: + case EmitterShape::Sphere: + bx::randUnitSphere(pos, &m_rng); + break; + + case EmitterShape::Hemisphere: + bx::randUnitHemisphere(pos, &m_rng, up); + break; + + case EmitterShape::Circle: + bx::randUnitCircle(pos, &m_rng); + break; + + case EmitterShape::Disc: + { + float tmp[3]; + bx::randUnitCircle(tmp, &m_rng); + bx::vec3Mul(pos, tmp, bx::frnd(&m_rng) ); + } + break; + + case EmitterShape::Rect: + pos[0] = bx::frndh(&m_rng); + pos[1] = 0.0f; + pos[2] = bx::frndh(&m_rng); + break; + } + + float dir[3]; + switch (m_direction) + { + default: + case EmitterDirection::Up: + bx::vec3Move(dir, up); + break; + + case EmitterDirection::Outward: + bx::vec3Norm(dir, pos); + break; + } + + float start[3]; + float end[3]; + const float startOffset = bx::lerp(m_uniforms.m_offsetStart[0], m_uniforms.m_offsetStart[1], bx::frnd(&m_rng) ); + bx::vec3Mul(start, pos, startOffset); + + const float endOffset = bx::lerp(m_uniforms.m_offsetEnd[0], m_uniforms.m_offsetEnd[1], bx::frnd(&m_rng) ); + float tmp1[3]; + bx::vec3Mul(tmp1, dir, endOffset); + bx::vec3Add(end, tmp1, start); + + particle.life = time; + particle.lifeSpan = bx::lerp(m_uniforms.m_lifeSpan[0], m_uniforms.m_lifeSpan[1], bx::frnd(&m_rng) ); + + float gravity[3] = { 0.0f, -9.81f * m_uniforms.m_gravityScale * bx::square(particle.lifeSpan), 0.0f }; + + bx::vec3MulMtx(particle.start, start, mtx); + bx::vec3MulMtx(particle.end[0], end, mtx); + bx::vec3Add(particle.end[1], particle.end[0], gravity); + + bx::memCopy(particle.rgba, m_uniforms.m_rgba, BX_COUNTOF(m_uniforms.m_rgba)*sizeof(uint32_t) ); + + particle.blendStart = bx::lerp(m_uniforms.m_blendStart[0], m_uniforms.m_blendStart[1], bx::frnd(&m_rng) ); + particle.blendEnd = bx::lerp(m_uniforms.m_blendEnd[0], m_uniforms.m_blendEnd[1], bx::frnd(&m_rng) ); + + particle.scaleStart = bx::lerp(m_uniforms.m_scaleStart[0], m_uniforms.m_scaleStart[1], bx::frnd(&m_rng) ); + particle.scaleEnd = bx::lerp(m_uniforms.m_scaleEnd[0], m_uniforms.m_scaleEnd[1], bx::frnd(&m_rng) ); + + time += timePerParticle; + } + } + + uint32_t render(const float _uv[4], const float* _mtxView, const float* _eye, uint32_t _first, uint32_t _max, ParticleSort* _outSort, PosColorTexCoord0Vertex* _outVertices) + { + bx::EaseFn easeRgba = bx::getEaseFunc(m_uniforms.m_easeRgba); + bx::EaseFn easePos = bx::getEaseFunc(m_uniforms.m_easePos); + bx::EaseFn easeBlend = bx::getEaseFunc(m_uniforms.m_easeBlend); + bx::EaseFn easeScale = bx::getEaseFunc(m_uniforms.m_easeScale); + + Aabb aabb = + { + { bx::kInfinity, bx::kInfinity, bx::kInfinity }, + { -bx::kInfinity, -bx::kInfinity, -bx::kInfinity }, + }; + + for (uint32_t jj = 0, num = m_num, current = _first + ; jj < num && current < _max + ; ++jj, ++current + ) + { + const Particle& particle = m_particles[jj]; + + const float ttPos = easePos(particle.life); + const float ttScale = easeScale(particle.life); + const float ttBlend = bx::clamp(easeBlend(particle.life), 0.0f, 1.0f); + const float ttRgba = bx::clamp(easeRgba(particle.life), 0.0f, 1.0f); + + float p0[3]; + bx::vec3Lerp(p0, particle.start, particle.end[0], ttPos); + + float p1[3]; + bx::vec3Lerp(p1, particle.end[0], particle.end[1], ttPos); + + float pos[3]; + bx::vec3Lerp(pos, p0, p1, ttPos); + + ParticleSort& sort = _outSort[current]; + float tmp[3]; + bx::vec3Sub(tmp, _eye, pos); + sort.dist = bx::sqrt(bx::vec3Dot(tmp, tmp) ); + sort.idx = current; + + uint32_t idx = uint32_t(ttRgba*4); + float ttmod = bx::mod(ttRgba, 0.25f)/0.25f; + uint32_t rgbaStart = particle.rgba[idx]; + uint32_t rgbaEnd = particle.rgba[idx+1]; + + float rr = bx::lerp( ( (uint8_t*)&rgbaStart)[0], ( (uint8_t*)&rgbaEnd)[0], ttmod)/255.0f; + float gg = bx::lerp( ( (uint8_t*)&rgbaStart)[1], ( (uint8_t*)&rgbaEnd)[1], ttmod)/255.0f; + float bb = bx::lerp( ( (uint8_t*)&rgbaStart)[2], ( (uint8_t*)&rgbaEnd)[2], ttmod)/255.0f; + float aa = bx::lerp( ( (uint8_t*)&rgbaStart)[3], ( (uint8_t*)&rgbaEnd)[3], ttmod)/255.0f; + + float blend = bx::lerp(particle.blendStart, particle.blendEnd, ttBlend); + float scale = bx::lerp(particle.scaleStart, particle.scaleEnd, ttScale); + + uint32_t abgr = toAbgr(rr, gg, bb, aa); + + float udir[3] = { _mtxView[0]*scale, _mtxView[4]*scale, _mtxView[8]*scale }; + float vdir[3] = { _mtxView[1]*scale, _mtxView[5]*scale, _mtxView[9]*scale }; + + PosColorTexCoord0Vertex* vertex = &_outVertices[current*4]; + bx::vec3Sub(tmp, pos, udir); + bx::vec3Sub(&vertex->m_x, tmp, vdir); + aabbExpand(aabb, &vertex->m_x); + vertex->m_abgr = abgr; + vertex->m_u = _uv[0]; + vertex->m_v = _uv[1]; + vertex->m_blend = blend; + ++vertex; + + bx::vec3Add(tmp, pos, udir); + bx::vec3Sub(&vertex->m_x, tmp, vdir); + aabbExpand(aabb, &vertex->m_x); + vertex->m_abgr = abgr; + vertex->m_u = _uv[2]; + vertex->m_v = _uv[1]; + vertex->m_blend = blend; + ++vertex; + + bx::vec3Add(tmp, pos, udir); + bx::vec3Add(&vertex->m_x, tmp, vdir); + aabbExpand(aabb, &vertex->m_x); + vertex->m_abgr = abgr; + vertex->m_u = _uv[2]; + vertex->m_v = _uv[3]; + vertex->m_blend = blend; + ++vertex; + + bx::vec3Sub(tmp, pos, udir); + bx::vec3Add(&vertex->m_x, tmp, vdir); + aabbExpand(aabb, &vertex->m_x); + vertex->m_abgr = abgr; + vertex->m_u = _uv[0]; + vertex->m_v = _uv[3]; + vertex->m_blend = blend; + ++vertex; + } + + m_aabb = aabb; + + return m_num; + } + + EmitterShape::Enum m_shape; + EmitterDirection::Enum m_direction; + + float m_dt; + bx::RngMwc m_rng; + EmitterUniforms m_uniforms; + + Aabb m_aabb; + + Particle* m_particles; + uint32_t m_num; + uint32_t m_max; + }; + + static int32_t particleSortFn(const void* _lhs, const void* _rhs) + { + const ParticleSort& lhs = *(const ParticleSort*)_lhs; + const ParticleSort& rhs = *(const ParticleSort*)_rhs; + return lhs.dist > rhs.dist ? -1 : 1; + } + + struct ParticleSystem + { + void init(uint16_t _maxEmitters, bx::AllocatorI* _allocator) + { + m_allocator = _allocator; + + if (NULL == _allocator) + { + static bx::DefaultAllocator allocator; + m_allocator = &allocator; + } + + m_emitterAlloc = bx::createHandleAlloc(m_allocator, _maxEmitters); + m_emitter = (Emitter*)BX_ALLOC(m_allocator, sizeof(Emitter)*_maxEmitters); + + PosColorTexCoord0Vertex::init(); + + m_num = 0; + + s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); + m_texture = bgfx::createTexture2D( + SPRITE_TEXTURE_SIZE + , SPRITE_TEXTURE_SIZE + , false + , 1 + , bgfx::TextureFormat::BGRA8 + ); + + bgfx::RendererType::Enum type = bgfx::getRendererType(); + m_particleProgram = bgfx::createProgram( + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_particle") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_particle") + , true + ); + } + + void shutdown() + { + bgfx::destroy(m_particleProgram); + bgfx::destroy(m_texture); + bgfx::destroy(s_texColor); + + bx::destroyHandleAlloc(m_allocator, m_emitterAlloc); + BX_FREE(m_allocator, m_emitter); + + m_allocator = NULL; + } + + EmitterSpriteHandle createSprite(uint16_t _width, uint16_t _height, const void* _data) + { + EmitterSpriteHandle handle = m_sprite.create(_width, _height); + + if (isValid(handle) ) + { + const Pack2D& pack = m_sprite.get(handle); + bgfx::updateTexture2D( + m_texture + , 0 + , 0 + , pack.m_x + , pack.m_y + , pack.m_width + , pack.m_height + , bgfx::copy(_data, pack.m_width*pack.m_height*4) + ); + } + + return handle; + } + + void destroy(EmitterSpriteHandle _handle) + { + m_sprite.destroy(_handle); + } + + void update(float _dt) + { + uint32_t numParticles = 0; + for (uint16_t ii = 0, num = m_emitterAlloc->getNumHandles(); ii < num; ++ii) + { + const uint16_t idx = m_emitterAlloc->getHandleAt(ii); + Emitter& emitter = m_emitter[idx]; + emitter.update(_dt); + numParticles += emitter.m_num; + } + + m_num = numParticles; + } + + void render(uint8_t _view, const float* _mtxView, const float* _eye) + { + if (0 != m_num) + { + bgfx::TransientVertexBuffer tvb; + bgfx::TransientIndexBuffer tib; + + const uint32_t numVertices = bgfx::getAvailTransientVertexBuffer(m_num*4, PosColorTexCoord0Vertex::ms_decl); + const uint32_t numIndices = bgfx::getAvailTransientIndexBuffer(m_num*6); + const uint32_t max = bx::uint32_min(numVertices/4, numIndices/6); + BX_WARN(m_num == max + , "Truncating transient buffer for particles to maximum available (requested %d, available %d)." + , m_num + , max + ); + + if (0 < max) + { + bgfx::allocTransientBuffers(&tvb + , PosColorTexCoord0Vertex::ms_decl + , max*4 + , &tib + , max*6 + ); + PosColorTexCoord0Vertex* vertices = (PosColorTexCoord0Vertex*)tvb.data; + + ParticleSort* particleSort = (ParticleSort*)BX_ALLOC(m_allocator, max*sizeof(ParticleSort) ); + + uint32_t pos = 0; + for (uint16_t ii = 0, numEmitters = m_emitterAlloc->getNumHandles(); ii < numEmitters; ++ii) + { + const uint16_t idx = m_emitterAlloc->getHandleAt(ii); + Emitter& emitter = m_emitter[idx]; + + const Pack2D& pack = m_sprite.get(emitter.m_uniforms.m_handle); + const float invTextureSize = 1.0f/SPRITE_TEXTURE_SIZE; + const float uv[4] = + { + pack.m_x * invTextureSize, + pack.m_y * invTextureSize, + (pack.m_x + pack.m_width ) * invTextureSize, + (pack.m_y + pack.m_height) * invTextureSize, + }; + + pos += emitter.render(uv, _mtxView, _eye, pos, max, particleSort, vertices); + } + + qsort(particleSort + , max + , sizeof(ParticleSort) + , particleSortFn + ); + + uint16_t* indices = (uint16_t*)tib.data; + for (uint32_t ii = 0; ii < max; ++ii) + { + const ParticleSort& sort = particleSort[ii]; + uint16_t* index = &indices[ii*6]; + uint16_t idx = (uint16_t)sort.idx; + index[0] = idx*4+0; + index[1] = idx*4+1; + index[2] = idx*4+2; + index[3] = idx*4+2; + index[4] = idx*4+3; + index[5] = idx*4+0; + } + + BX_FREE(m_allocator, particleSort); + + bgfx::setState(0 + | BGFX_STATE_RGB_WRITE + | BGFX_STATE_ALPHA_WRITE + | BGFX_STATE_DEPTH_TEST_LESS + | BGFX_STATE_CULL_CW + | BGFX_STATE_BLEND_NORMAL + ); + bgfx::setVertexBuffer(0, &tvb); + bgfx::setIndexBuffer(&tib); + bgfx::setTexture(0, s_texColor, m_texture); + bgfx::submit(_view, m_particleProgram); + } + } + } + + EmitterHandle createEmitter(EmitterShape::Enum _shape, EmitterDirection::Enum _direction, uint32_t _maxParticles) + { + EmitterHandle handle = { m_emitterAlloc->alloc() }; + + if (UINT16_MAX != handle.idx) + { + m_emitter[handle.idx].create(_shape, _direction, _maxParticles); + } + + return handle; + } + + void updateEmitter(EmitterHandle _handle, const EmitterUniforms* _uniforms) + { + BX_CHECK(m_emitterAlloc.isValid(_handle.idx) + , "destroyEmitter handle %d is not valid." + , _handle.idx + ); + + Emitter& emitter = m_emitter[_handle.idx]; + + if (NULL == _uniforms) + { + emitter.reset(); + } + else + { + bx::memCopy(&emitter.m_uniforms, _uniforms, sizeof(EmitterUniforms) ); + } + } + + void getAabb(EmitterHandle _handle, Aabb& _outAabb) + { + BX_CHECK(m_emitterAlloc.isValid(_handle.idx) + , "getAabb handle %d is not valid." + , _handle.idx + ); + _outAabb = m_emitter[_handle.idx].m_aabb; + } + + void destroyEmitter(EmitterHandle _handle) + { + BX_CHECK(m_emitterAlloc.isValid(_handle.idx) + , "destroyEmitter handle %d is not valid." + , _handle.idx + ); + + m_emitter[_handle.idx].destroy(); + m_emitterAlloc->free(_handle.idx); + } + + bx::AllocatorI* m_allocator; + + bx::HandleAlloc* m_emitterAlloc; + Emitter* m_emitter; + + typedef SpriteT<256, SPRITE_TEXTURE_SIZE> Sprite; + Sprite m_sprite; + + bgfx::UniformHandle s_texColor; + bgfx::TextureHandle m_texture; + bgfx::ProgramHandle m_particleProgram; + + uint32_t m_num; + }; + + static ParticleSystem s_ctx; + + void Emitter::create(EmitterShape::Enum _shape, EmitterDirection::Enum _direction, uint32_t _maxParticles) + { + reset(); + + m_shape = _shape; + m_direction = _direction; + m_max = _maxParticles; + m_particles = (Particle*)BX_ALLOC(s_ctx.m_allocator, m_max*sizeof(Particle) ); + } + + void Emitter::destroy() + { + BX_FREE(s_ctx.m_allocator, m_particles); + m_particles = NULL; + } + +} // namespace ps + +using namespace ps; + +void psInit(uint16_t _maxEmitters, bx::AllocatorI* _allocator) +{ + s_ctx.init(_maxEmitters, _allocator); +} + +void psShutdown() +{ + s_ctx.shutdown(); +} + +EmitterSpriteHandle psCreateSprite(uint16_t _width, uint16_t _height, const void* _data) +{ + return s_ctx.createSprite(_width, _height, _data); +} + +void psDestroy(EmitterSpriteHandle _handle) +{ + s_ctx.destroy(_handle); +} + +EmitterHandle psCreateEmitter(EmitterShape::Enum _shape, EmitterDirection::Enum _direction, uint32_t _maxParticles) +{ + return s_ctx.createEmitter(_shape, _direction, _maxParticles); +} + +void psUpdateEmitter(EmitterHandle _handle, const EmitterUniforms* _uniforms) +{ + s_ctx.updateEmitter(_handle, _uniforms); +} + +void psGetAabb(EmitterHandle _handle, Aabb& _outAabb) +{ + s_ctx.getAabb(_handle, _outAabb); +} + +void psDestroyEmitter(EmitterHandle _handle) +{ + s_ctx.destroyEmitter(_handle); +} + +void psUpdate(float _dt) +{ + s_ctx.update(_dt); +} + +void psRender(uint8_t _view, const float* _mtxView, const float* _eye) +{ + s_ctx.render(_view, _mtxView, _eye); +} diff --git a/3rdparty/bgfx/examples/common/ps/particle_system.h b/3rdparty/bgfx/examples/common/ps/particle_system.h new file mode 100644 index 0000000..c43a152 --- /dev/null +++ b/3rdparty/bgfx/examples/common/ps/particle_system.h @@ -0,0 +1,106 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#ifndef PARTICLE_SYSTEM_H_HEADER_GUARD +#define PARTICLE_SYSTEM_H_HEADER_GUARD + +#include +#include +#include + +#include "../bounds.h" + +struct EmitterHandle { uint16_t idx; }; +struct EmitterSpriteHandle { uint16_t idx; }; + +template +inline bool isValid(Ty _handle) +{ + return _handle.idx != UINT16_MAX; +} + +struct EmitterShape +{ + enum Enum + { + Sphere, + Hemisphere, + Circle, + Disc, + Rect, + + Count + }; +}; + +struct EmitterDirection +{ + enum Enum + { + Up, + Outward, + + Count + }; +}; + +struct EmitterUniforms +{ + void reset(); + + float m_position[3]; + float m_angle[3]; + + float m_blendStart[2]; + float m_blendEnd[2]; + float m_offsetStart[2]; + float m_offsetEnd[2]; + float m_scaleStart[2]; + float m_scaleEnd[2]; + float m_lifeSpan[2]; + float m_gravityScale; + + uint32_t m_rgba[5]; + uint32_t m_particlesPerSecond; + + bx::Easing::Enum m_easePos; + bx::Easing::Enum m_easeRgba; + bx::Easing::Enum m_easeBlend; + bx::Easing::Enum m_easeScale; + + EmitterSpriteHandle m_handle; +}; + +/// +void psInit(uint16_t _maxEmitters = 64, bx::AllocatorI* _allocator = NULL); + +/// +void psShutdown(); + +/// +EmitterSpriteHandle psCreateSprite(uint16_t _width, uint16_t _height, const void* _data); + +/// +void psDestroy(EmitterSpriteHandle _handle); + +/// +EmitterHandle psCreateEmitter(EmitterShape::Enum _shape, EmitterDirection::Enum _direction, uint32_t _maxParticles); + +/// +void psUpdateEmitter(EmitterHandle _handle, const EmitterUniforms* _uniforms = NULL); + +/// +void psGetAabb(EmitterHandle _handle, Aabb& _outAabb); + +/// +void psDestroyEmitter(EmitterHandle _handle); + +/// +void psUpdate(float _dt); + +/// +void psRender(uint8_t _view, const float* _mtxView, const float* _eye); + +#endif // PARTICLE_SYSTEM_H_HEADER_GUARD diff --git a/3rdparty/bgfx/examples/common/ps/varying.def.sc b/3rdparty/bgfx/examples/common/ps/varying.def.sc new file mode 100644 index 0000000..2218c4b --- /dev/null +++ b/3rdparty/bgfx/examples/common/ps/varying.def.sc @@ -0,0 +1,6 @@ +vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); +vec4 v_texcoord0 : TEXCOORD0 = vec4(0.0, 0.0, 0.0, 0.0); + +vec3 a_position : POSITION; +vec4 a_color0 : COLOR0; +vec4 a_texcoord0 : TEXCOORD0; diff --git a/3rdparty/bgfx/examples/common/ps/vs_particle.bin.h b/3rdparty/bgfx/examples/common/ps/vs_particle.bin.h new file mode 100644 index 0000000..5a55a62 --- /dev/null +++ b/3rdparty/bgfx/examples/common/ps/vs_particle.bin.h @@ -0,0 +1,352 @@ +static const uint8_t vs_particle_glsl[420] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0x7f, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color + 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig + 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // hp vec3 a_positi + 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // on;.attribute hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ghp vec4 a_texco + 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, // ord0;.varying hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 v_color + 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.varying highp + 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec4 v_texcoord + 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.uniform highp + 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // mat4 u_modelVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // wProj;.void main + 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // ().{. highp ve + 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, // c4 tmpvar_1;. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, // mpvar_1.w = 1.0; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, // . tmpvar_1.xyz + 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, // = a_position;. + 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, // gl_Position = (u + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, // _modelViewProj * + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, // tmpvar_1);. v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // color0 = a_color + 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // 0;. v_texcoord0 + 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, // = a_texcoord0;. + 0x7d, 0x0a, 0x0a, 0x00, // }... +}; +static const uint8_t vs_particle_spv[3153] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0x2c, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, // ,.....#......... + 0x36, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // 6b.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // main............ + 0x95, 0x0e, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........v....... + 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ + 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....main........ + 0x8c, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....Output...... + 0x8c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // ........gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ion............. + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // v_color0........ + 0x8c, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ........v_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // rd0.........@mai + 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // n(vf4;vf3;vf4;.. + 0x05, 0x00, 0x05, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....O...a_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // ........:...a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb9, 0x4d, 0x00, 0x00, // sition.......M.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, // ...._varying_... + 0x05, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ....^...$Global. + 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....^.......u_vi + 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, // ewRect......^... + 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. + 0x06, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....^.......u_vi + 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew......^....... + 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... + 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ^.......u_proj.. + 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ....^.......u_in + 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, // vProj.......^... + 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. + 0x06, 0x00, 0x07, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ....^.......u_in + 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... + 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // ^.......u_model. + 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ....^.......u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x5e, 0x05, 0x00, 0x00, // delView.....^... + 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP + 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj.....^....... + 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, // u_alphaRef4..... + 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, // B............A.. + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_color0........ + 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ....a_color0.... + 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // .....?..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // on..........a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, // sition......@,.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // ....a_texcoord0. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m........8..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x76, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // v...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. + 0x05, 0x00, 0x0a, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // ........@entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // intOutput.v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, // oord0...G....... + 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ....@...H...^... + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x5e, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^.......#....... + 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... + 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... + 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H...^....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... + 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... + 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... + 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H...^....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... + 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... + 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... + 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H...^....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... + 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... + 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... + 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H...^....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... + 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... + 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... + 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H...^....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... + 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ^.......G...B... + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, // ".......G....... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, // ........G....... + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, // ........G...v... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ + 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... + 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, // ................ + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, // ............!... + 0x85, 0x09, 0x00, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, // ................ + 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x8c, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ............ ... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ...?+........... + 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, // ....,........... + 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ................ + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // +............... + 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ,.......z....... + 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, // ................ + 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // e............... + 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... + 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, // ....j... ....... + 0xab, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, // ....e...j....... + 0x5e, 0x05, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ^...........e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x65, 0x00, 0x00, 0x00, 0xab, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e.......e...e... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xdb, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x5e, 0x05, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xdb, 0x07, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // ^...;.......B... + 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, // ....+.......)... + 0x0a, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // .... ........... + 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // e... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // .... ........... + 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // ....;........... + 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, // ....;.......v... + 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ....;........... + 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. + 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... + 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........8...... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // =........A...... + 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // =........?...... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // =.......@,...... + 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....U...A..>... + 0x95, 0x38, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, // .8...?..>....... + 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, // @,..9.......I&.. + 0xcc, 0x0d, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // .....U...8...... + 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >.......I&..A... + 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....T4.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, // =...........T4.. + 0x3e, 0x00, 0x03, 0x00, 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...........A... + 0x9a, 0x02, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, // =....... ....@.. + 0x3e, 0x00, 0x03, 0x00, 0x76, 0x13, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...v... ...A... + 0x9a, 0x02, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // .....@.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, // =........-...@.. + 0x3e, 0x00, 0x03, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, // >........-...... + 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x8c, 0x04, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, // 8...6........... + 0x00, 0x00, 0x00, 0x00, 0x85, 0x09, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........7....... + 0x4f, 0x2e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, // O...7.......:... + 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, // 7........M...... + 0x5f, 0x57, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x09, 0x07, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // _W..;........... + 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x64, 0x2d, 0x00, 0x00, // ....A.......d-.. + 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x64, 0x2d, 0x00, 0x00, // ........>...d-.. + 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x0b, 0x38, 0x00, 0x00, // ....A........8.. + 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0b, 0x38, 0x00, 0x00, // ........>....8.. + 0x7a, 0x0b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, // z...=.......5b.. + 0x3a, 0x19, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x3a, 0x00, 0x00, // :...Q.......;:.. + 0x35, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // 5b......Q....... + 0x0b, 0x47, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // .G..5b......Q... + 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x53, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....+S..5b...... + 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0x3b, 0x3a, 0x00, 0x00, // P........2..;:.. + 0x0b, 0x47, 0x00, 0x00, 0x2b, 0x53, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .G..+S......A... + 0xe2, 0x02, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, // ....),..B...)... + 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, // =...e....<..),.. + 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, // .........;...2.. + 0xf3, 0x3c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x5f, 0x38, 0x00, 0x00, // .<..A......._8.. + 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x38, 0x00, 0x00, // ........>..._8.. + 0x9f, 0x3b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, // .;..=........!.. + 0x4f, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2d, 0x3c, 0x00, 0x00, // O...A.......-<.. + 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2d, 0x3c, 0x00, 0x00, // ........>...-<.. + 0x1d, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, // .!..=........!.. + 0xb9, 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2e, 0x3c, 0x00, 0x00, // .M..A........<.. + 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2e, 0x3c, 0x00, 0x00, // ........>....<.. + 0x1e, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x8c, 0x04, 0x00, 0x00, 0x47, 0x3a, 0x00, 0x00, // .!..=.......G:.. + 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, // ........G:..8... + 0x00, // . +}; +static const uint8_t vs_particle_dx9[349] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... + 0x38, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, // 8.........!.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, // Compiler 10.1.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ + 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ................ + 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ......U......... + 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, // ................ + 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, // ................ + 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, // ................ + 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, // ................ + 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. +}; +static const uint8_t vs_particle_dx11[622] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... + 0x40, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x94, 0x83, 0x4e, 0xd2, 0x28, 0xd5, 0xeb, 0x87, // @...DXBC..N.(... + 0x3e, 0xf5, 0xa1, 0x65, 0x63, 0x87, 0x0e, 0xf7, 0x01, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, // >..ec.......@... + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, // ....,........... + 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNh........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........V....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, // ................ + 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // _............... + 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, // SITION.TEXCOORD. + 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGNl........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // b............... + 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO + 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x28, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // RD..SHDR(...@... + 0x4a, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // J...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._........... + 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _...r......._... + 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // ........g.... .. + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // ........e.... .. + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....e.... ...... + 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, // h.......8....... + 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....V.......F. . + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ........2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... + 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, // F............ .. + 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....F.......F. . + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // ........6.... .. + 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // ....F.......6... + 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // . ......F....... + 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // >...........@. +}; +static const uint8_t vs_particle_mtl[777] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0xe4, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // ....using namesp + 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, // t xlatMtlShaderI + 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // nput {. float4 + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, // a_color0 [[attri + 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // bute(0)]];. flo + 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, // at3 a_position [ + 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, // [attribute(1)]]; + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // . float4 a_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, // oord0 [[attribut + 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // e(2)]];.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, // gl_Position [[p + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // osition]];. flo + 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, // at4 v_color0;. + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // float4 v_texcoor + 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, // d0;.};.struct xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo + 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, // rm {. float4x4 + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, // u_modelViewProj; + 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.vertex xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, // tlShaderOutput x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, // latMtlMain (xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, // MtlShaderInput _ + 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, // mtl_i [[stage_in + 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, // ]], constant xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, // tMtlShaderUnifor + 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, // m& _mtl_u [[buff + 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, // er(0)]]).{. xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // _mtl_o;. float + 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, // 4 tmpvar_1 = 0;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, // tmpvar_1.w = 1 + 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, // .0;. tmpvar_1.x + 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, // yz = _mtl_i.a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // sition;. _mtl_o + 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, // .gl_Position = ( + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // _mtl_u.u_modelVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ewProj * tmpvar_ + 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x63, // 1);. _mtl_o.v_c + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, // olor0 = _mtl_i.a + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // _color0;. _mtl_ + 0x6f, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, // o.v_texcoord0 = + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // _mtl_i.a_texcoor + 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, // d0;. return _mt + 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // l_o;.}... +}; +extern const uint8_t* vs_particle_pssl; +extern const uint32_t vs_particle_pssl_size; diff --git a/3rdparty/bgfx/examples/common/ps/vs_particle.sc b/3rdparty/bgfx/examples/common/ps/vs_particle.sc new file mode 100644 index 0000000..eed38ab --- /dev/null +++ b/3rdparty/bgfx/examples/common/ps/vs_particle.sc @@ -0,0 +1,16 @@ +$input a_position, a_color0, a_texcoord0 +$output v_color0, v_texcoord0 + +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include + +void main() +{ + gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); + v_color0 = a_color0; + v_texcoord0 = a_texcoord0; +} diff --git a/3rdparty/bgfx/examples/common/shaderlib.sh b/3rdparty/bgfx/examples/common/shaderlib.sh index a890edb..2bcd43d 100644 --- a/3rdparty/bgfx/examples/common/shaderlib.sh +++ b/3rdparty/bgfx/examples/common/shaderlib.sh @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/examples/makefile b/3rdparty/bgfx/examples/makefile index 0df96c2..1b502d4 100644 --- a/3rdparty/bgfx/examples/makefile +++ b/3rdparty/bgfx/examples/makefile @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # @@ -34,6 +34,9 @@ rebuild: @make -s --no-print-directory rebuild -C 30-picking @make -s --no-print-directory rebuild -C 31-rsm @make -s --no-print-directory rebuild -C 33-pom +# @make -s --no-print-directory rebuild -C 34-mvs +# @make -s --no-print-directory rebuild -C 35-dynamic + @make -s --no-print-directory rebuild -C 36-sky @make -s --no-print-directory rebuild -C common/debugdraw @make -s --no-print-directory rebuild -C common/font @make -s --no-print-directory rebuild -C common/imgui diff --git a/3rdparty/bgfx/include/bgfx/bgfx.h b/3rdparty/bgfx/include/bgfx/bgfx.h index b39c74b..8140d4c 100644 --- a/3rdparty/bgfx/include/bgfx/bgfx.h +++ b/3rdparty/bgfx/include/bgfx/bgfx.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE */ @@ -13,11 +13,11 @@ #include "defines.h" /// -#define BGFX_HANDLE(_name) \ - struct _name { uint16_t idx; }; \ - inline bool isValid(_name _handle) { return bgfx::invalidHandle != _handle.idx; } +#define BGFX_HANDLE(_name) \ + struct _name { uint16_t idx; }; \ + inline bool isValid(_name _handle) { return bgfx::kInvalidHandle != _handle.idx; } -#define BGFX_INVALID_HANDLE { bgfx::invalidHandle } +#define BGFX_INVALID_HANDLE { bgfx::kInvalidHandle } namespace bx { struct AllocatorI; } @@ -74,9 +74,9 @@ namespace bgfx /// Access: enum Enum { - Read, - Write, - ReadWrite, + Read, //!< Read + Write, //!< Write + ReadWrite, //!< Read and write Count }; @@ -88,7 +88,7 @@ namespace bgfx /// struct Attrib { - /// Corresponds to vertex shader attribute. Attributes: + /// Corresponds to vertex shader attribute. enum Enum { Position, //!< a_position @@ -97,6 +97,8 @@ namespace bgfx Bitangent, //!< a_bitangent Color0, //!< a_color0 Color1, //!< a_color1 + Color2, //!< a_color2 + Color3, //!< a_color3 Indices, //!< a_indices Weight, //!< a_weight TexCoord0, //!< a_texcoord0 @@ -222,7 +224,7 @@ namespace bgfx RGBA4, RGB5A1, RGB10A2, - R11G11B10F, + RG11B10F, UnknownDepth, // Depth formats below. @@ -248,12 +250,12 @@ namespace bgfx /// Uniform types: enum Enum { - Int1, - End, + Int1, //!< Int, used for samplers only. + End, //!< Reserved, do not use. - Vec4, - Mat3, - Mat4, + Vec4, //!< 4 floats vector. + Mat3, //!< 3x3 matrix. + Mat4, //!< 4x4 matrix. Count }; @@ -340,20 +342,38 @@ namespace bgfx }; }; - static const uint16_t invalidHandle = UINT16_MAX; + /// View mode sets draw call sort order. + /// + /// @attention C99 equivalent is `bgfx_view_mode_t`. + /// + struct ViewMode + { + /// View modes: + enum Enum + { + Default, //!< Default sort order. + Sequential, //!< Sort in the same order in which submit calls were called. + DepthAscending, //!< Sort draw call depth in ascending order. + DepthDescending, //!< Sort draw call depth in descending order. - BGFX_HANDLE(DynamicIndexBufferHandle); - BGFX_HANDLE(DynamicVertexBufferHandle); - BGFX_HANDLE(FrameBufferHandle); - BGFX_HANDLE(IndexBufferHandle); - BGFX_HANDLE(IndirectBufferHandle); - BGFX_HANDLE(OcclusionQueryHandle); - BGFX_HANDLE(ProgramHandle); - BGFX_HANDLE(ShaderHandle); - BGFX_HANDLE(TextureHandle); - BGFX_HANDLE(UniformHandle); - BGFX_HANDLE(VertexBufferHandle); - BGFX_HANDLE(VertexDeclHandle); + Count + }; + }; + + static const uint16_t kInvalidHandle = UINT16_MAX; + + BGFX_HANDLE(DynamicIndexBufferHandle) + BGFX_HANDLE(DynamicVertexBufferHandle) + BGFX_HANDLE(FrameBufferHandle) + BGFX_HANDLE(IndexBufferHandle) + BGFX_HANDLE(IndirectBufferHandle) + BGFX_HANDLE(OcclusionQueryHandle) + BGFX_HANDLE(ProgramHandle) + BGFX_HANDLE(ShaderHandle) + BGFX_HANDLE(TextureHandle) + BGFX_HANDLE(UniformHandle) + BGFX_HANDLE(VertexBufferHandle) + BGFX_HANDLE(VertexDeclHandle) /// Callback interface to implement application specific behavior. /// Cached items are currently used for OpenGL and Direct3D 12 binary @@ -369,9 +389,9 @@ namespace bgfx { virtual ~CallbackI() = 0; - /// If fatal code code is not Fatal::DebugCheck this callback is - /// called on unrecoverable error. It's not safe to continue, inform - /// user and terminate application from this call. + /// This callback is called on unrecoverable errors. + /// It's not safe to continue (Exluding _code `Fatal::DebugCheck`), + /// inform the user and terminate the application. /// /// @param[in] _code Fatal error code. /// @param[in] _str More information about error. @@ -403,7 +423,54 @@ namespace bgfx , va_list _argList ) = 0; - /// Return size of for cached item. Return 0 if no cached item was + /// Profiler region begin. + /// + /// @param[in] _name Region name, contains dynamic string. + /// @param[in] _abgr Color of profiler region. + /// @param[in] _filePath File path where `profilerBegin` was called. + /// @param[in] _line Line where `profilerBegin` was called. + /// + /// @remarks + /// Not thread safe and it can be called from any thread. + /// + /// @attention C99 equivalent is `bgfx_callback_vtbl.profiler_begin`. + /// + virtual void profilerBegin( + const char* _name + , uint32_t _abgr + , const char* _filePath + , uint16_t _line + ) = 0; + + /// Profiler region begin with string literal name. + /// + /// @param[in] _name Region name, contains string literal. + /// @param[in] _abgr Color of profiler region. + /// @param[in] _filePath File path where `profilerBeginLiteral` was called. + /// @param[in] _line Line where `profilerBeginLiteral` was called. + /// + /// @remarks + /// Not thread safe and it can be called from any thread. + /// + /// @attention C99 equivalent is `bgfx_callback_vtbl.profiler_begin_literal`. + /// + virtual void profilerBeginLiteral( + const char* _name + , uint32_t _abgr + , const char* _filePath + , uint16_t _line + ) = 0; + + /// Profiler region end. + /// + /// @remarks + /// Not thread safe and it can be called from any thread. + /// + /// @attention C99 equivalent is `bgfx_callback_vtbl.profiler_end`. + /// + virtual void profilerEnd() = 0; + + /// Returns the size of a cached item. Returns 0 if no cached item was /// found. /// /// @param[in] _id Cache id. @@ -440,10 +507,11 @@ namespace bgfx /// @param[in] _filePath File path. /// @param[in] _width Image width. /// @param[in] _height Image height. - /// @param[in] _pitch Number of bytes to skip to next line. + /// @param[in] _pitch Number of bytes to skip between the start of + /// each horizontal line of the image. /// @param[in] _data Image data. /// @param[in] _size Image size. - /// @param[in] _yflip If true image origin is bottom left. + /// @param[in] _yflip If true, image origin is bottom left. /// /// @attention C99 equivalent is `bgfx_callback_vtbl.screen_shot`. /// @@ -457,7 +525,7 @@ namespace bgfx , bool _yflip ) = 0; - /// Called when capture begins. + /// Called when a video capture begins. /// /// @attention C99 equivalent is `bgfx_callback_vtbl.capture_begin`. /// @@ -469,7 +537,7 @@ namespace bgfx , bool _yflip ) = 0; - /// Called when capture ends. + /// Called when a video capture ends. /// /// @attention C99 equivalent is `bgfx_callback_vtbl.capture_end`. /// @@ -491,6 +559,9 @@ namespace bgfx /// Memory release callback. /// + /// param[in] _ptr Pointer to allocated data. + /// param[in] _userData User defined data if needed. + /// /// @attention C99 equivalent is `bgfx_release_fn_t`. /// typedef void (*ReleaseFn)(void* _ptr, void* _userData); @@ -501,8 +572,8 @@ namespace bgfx /// struct Memory { - uint8_t* data; - uint32_t size; + uint8_t* data; //!< Pointer to data. + uint32_t size; //!< Data size. }; /// Renderer capabilities. @@ -522,7 +593,7 @@ namespace bgfx uint16_t vendorId; //!< Selected GPU vendor PCI id. uint16_t deviceId; //!< Selected GPU device id. - bool homogeneousDepth; //!< True when NDC depth is in [-1, 1] range. + bool homogeneousDepth; //!< True when NDC depth is in [-1, 1] range, otherwise its [0, 1]. bool originBottomLeft; //!< True when NDC origin is at bottom left. uint8_t numGPUs; //!< Number of enumerated GPUs. @@ -540,12 +611,12 @@ namespace bgfx struct Limits { - uint32_t maxDrawCalls; //!< Maximum draw calls. + uint32_t maxDrawCalls; //!< Maximum number of draw calls. uint32_t maxBlits; //!< Maximum number of blit calls. uint32_t maxTextureSize; //!< Maximum texture size. - uint32_t maxViews; //!< Maximum views. + uint32_t maxViews; //!< Maximum number of views. uint32_t maxFrameBuffers; //!< Maximum number of frame buffer handles. - uint32_t maxFBAttachments; //!< Maximum frame buffer attachments. + uint32_t maxFBAttachments; //!< Maximum number of frame buffer attachments. uint32_t maxPrograms; //!< Maximum number of program handles. uint32_t maxShaders; //!< Maximum number of shader handles. uint32_t maxTextures; //!< Maximum number of texture handles. @@ -558,6 +629,7 @@ namespace bgfx uint32_t maxDynamicVertexBuffers; //!< Maximum number of dynamic vertex buffer handles. uint32_t maxUniforms; //!< Maximum number of uniform handles. uint32_t maxOcclusionQueries; //!< Maximum number of occlusion query handles. + uint32_t maxEncoders; //!< Maximum number of encoder threads. }; Limits limits; @@ -654,7 +726,7 @@ namespace bgfx uint16_t num; //!< Number of elements in array. }; - /// Frame buffer texture attachemnt info. + /// Frame buffer texture attachment info. /// /// @attention C99 equivalent is `bgfx_attachment_t`. /// @@ -703,32 +775,746 @@ namespace bgfx uint8_t flags; //!< Status flags. }; + /// + typedef uint16_t ViewId; + + /// View stats. + /// + /// @attention C99 equivalent is `bgfx_view_stats_t`. + /// + struct ViewStats + { + char name[256]; //!< View name. + ViewId view; //!< View id. + int64_t cpuTimeElapsed; //!< CPU (submit) time elapsed. + int64_t gpuTimeElapsed; //!< GPU time elapsed. + }; + + /// Encoder stats. + /// + /// @attention C99 equivalent is `bgfx_encoder_stats_t`. + /// + struct EncoderStats + { + int64_t cpuTimeBegin; //!< Encoder thread CPU submit begin time. + int64_t cpuTimeEnd; //!< Encoder thread CPU submit end time. + }; + /// Renderer statistics data. /// /// @attention C99 equivalent is `bgfx_stats_t`. /// + /// @remarks All time values are high-resolution timestamps, while + /// time frequencies define timestamps-per-second for that hardware. struct Stats { - uint64_t cpuTimeBegin; //!< CPU frame begin time. - uint64_t cpuTimeEnd; //!< CPU frame end time. - uint64_t cpuTimerFreq; //!< CPU timer frequency. + int64_t cpuTimeFrame; //!< CPU time between two `bgfx::frame` calls. + int64_t cpuTimeBegin; //!< Render thread CPU submit begin time. + int64_t cpuTimeEnd; //!< Render thread CPU submit end time. + int64_t cpuTimerFreq; //!< CPU timer frequency. Timestamps-per-second - uint64_t gpuTimeBegin; //!< GPU frame begin time. - uint64_t gpuTimeEnd; //!< GPU frame end time. - uint64_t gpuTimerFreq; //!< GPU timer frequency. + int64_t gpuTimeBegin; //!< GPU frame begin time. + int64_t gpuTimeEnd; //!< GPU frame end time. + int64_t gpuTimerFreq; //!< GPU timer frequency. - int64_t waitRender; //!< Time spent waiting for render backend thread to finish issuing - //! draw commands to underlying graphics API. - int64_t waitSubmit; //!< Time spent waiting for submit thread to advance to next frame. + int64_t waitRender; //!< Time spent waiting for render backend thread to finish issuing + //! draw commands to underlying graphics API. + int64_t waitSubmit; //!< Time spent waiting for submit thread to advance to next frame. - uint32_t numDraw; //!< Number of draw calls submitted. - uint32_t numCompute; //!< Number of compute calls submitted. - uint32_t maxGpuLatency; //!< GPU driver latency. + uint32_t numDraw; //!< Number of draw calls submitted. + uint32_t numCompute; //!< Number of compute calls submitted. + uint32_t maxGpuLatency; //!< GPU driver latency. - uint16_t width; //!< Backbuffer width in pixels. - uint16_t height; //!< Backbuffer height in pixels. - uint16_t textWidth; //!< Debug text width in characters. - uint16_t textHeight; //!< Debug text height in characters. + uint16_t numDynamicIndexBuffers; //!< Number of used dynamic index buffers. + uint16_t numDynamicVertexBuffers; //!< Number of used dynamic vertex buffers. + uint16_t numFrameBuffers; //!< Number of used frame buffers. + uint16_t numIndexBuffers; //!< Number of used index buffers. + uint16_t numOcclusionQueries; //!< Number of used occlusion queries. + uint16_t numPrograms; //!< Number of used programs. + uint16_t numShaders; //!< Number of used shaders. + uint16_t numTextures; //!< Number of used textures. + uint16_t numUniforms; //!< Number of used uniforms. + uint16_t numVertexBuffers; //!< Number of used vertex buffers. + uint16_t numVertexDecls; //!< Number of used vertex declarations. + + int64_t gpuMemoryMax; //!< Maximum available GPU memory for application. + int64_t gpuMemoryUsed; //!< Amount of GPU memory used by the application. + + uint16_t width; //!< Backbuffer width in pixels. + uint16_t height; //!< Backbuffer height in pixels. + uint16_t textWidth; //!< Debug text width in characters. + uint16_t textHeight; //!< Debug text height in characters. + + uint16_t numViews; //!< Number of view stats. + ViewStats* viewStats; //!< Array of View stats. + + uint8_t numEncoders; //!< Number of encoders used during frame. + EncoderStats* encoderStats; //!< Array of encoder stats. + }; + + /// Encoders are used for submitting draw calls from multiple threads, so one encoder per thread. + /// Use `bgfx::begin()` to obtain an encoder for a thread. + /// + /// @attention C99 equivalent is `bgfx_encoder`. + /// + struct Encoder + { + /// Sets a debug marker. This allows you to group + /// graphics calls together for easy browsing in + /// graphics debugging tools. + /// + /// @attention C99 equivalent is `bgfx_set_marker`. + /// + void setMarker(const char* _marker); + + /// Set render states for draw primitive. + /// + /// @param[in] _state State flags. Default state for primitive type is + /// triangles. See: `BGFX_STATE_DEFAULT`. + /// - `BGFX_STATE_ALPHA_WRITE` - Enable alpha write. + /// - `BGFX_STATE_DEPTH_WRITE` - Enable depth write. + /// - `BGFX_STATE_DEPTH_TEST_*` - Depth test function. + /// - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC. + /// - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2. + /// - `BGFX_STATE_CULL_*` - Backface culling mode. + /// - `BGFX_STATE_RGB_WRITE` - Enable RGB write. + /// - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing. + /// - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type. + /// + /// @param[in] _rgba Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and + /// `BGFX_STATE_BLEND_INV_FACTOR` blend modes. + /// + /// @remarks + /// 1. To setup more complex states use: + /// `BGFX_STATE_ALPHA_REF(_ref)`, + /// `BGFX_STATE_POINT_SIZE(_size)`, + /// `BGFX_STATE_BLEND_FUNC(_src, _dst)`, + /// `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`, + /// `BGFX_STATE_BLEND_EQUATION(_equation)`, + /// `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)` + /// 2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend + /// equation is specified. + /// + /// @attention C99 equivalent is `bgfx_set_state`. + /// + void setState( + uint64_t _state + , uint32_t _rgba = 0 + ); + + /// Set condition for rendering. + /// + /// @param[in] _handle Occlusion query handle. + /// @param[in] _visible Render if occlusion query is visible. + /// + /// @attention C99 equivalent is `bgfx_set_condition`. + /// + void setCondition( + OcclusionQueryHandle _handle + , bool _visible + ); + + /// Set stencil test state. + /// + /// @param[in] _fstencil Front stencil state. + /// @param[in] _bstencil Back stencil state. If back is set to `BGFX_STENCIL_NONE` + /// _fstencil is applied to both front and back facing primitives. + /// + /// @attention C99 equivalent is `bgfx_set_stencil`. + /// + void setStencil( + uint32_t _fstencil + , uint32_t _bstencil = BGFX_STENCIL_NONE + ); + + /// Set scissor for draw primitive. To scissor for all primitives in + /// view see `bgfx::setViewScissor`. + /// + /// @param[in] _x Position x from the left side of the window. + /// @param[in] _y Position y from the top of the window. + /// @param[in] _width Width of scissor region. + /// @param[in] _height Height of scissor region. + /// @returns Scissor cache index. + /// + /// @attention C99 equivalent is `bgfx_set_scissor`. + /// + uint16_t setScissor( + uint16_t _x + , uint16_t _y + , uint16_t _width + , uint16_t _height + ); + + /// Set scissor from cache for draw primitive. + /// + /// @param[in] _cache Index in scissor cache. + /// Pass UINT16_MAX to have primitive use view scissor instead. + /// + /// @attention C99 equivalent is `bgfx_set_scissor_cached`. + /// + void setScissor(uint16_t _cache = UINT16_MAX); + + /// Set model matrix for draw primitive. If it is not called, model will + /// be rendered with identity model matrix. + /// + /// @param[in] _mtx Pointer to first matrix in array. + /// @param[in] _num Number of matrices in array. + /// @returns Index into matrix cache in case the same model matrix has + /// to be used for other draw primitive call. + /// + /// @attention C99 equivalent is `bgfx_set_transform`. + /// + uint32_t setTransform( + const void* _mtx + , uint16_t _num = 1 + ); + + /// Reserve `_num` matrices in internal matrix cache. + /// + /// @param[in] _transform Pointer to `Transform` structure. + /// @param[in] _num Number of matrices. + /// @returns Index into matrix cache. + /// + /// @attention Pointer returned can be modifed until `bgfx::frame` is called. + /// @attention C99 equivalent is `bgfx_alloc_transform`. + /// + uint32_t allocTransform( + Transform* _transform + , uint16_t _num + ); + + /// Set model matrix from matrix cache for draw primitive. + /// + /// @param[in] _cache Index in matrix cache. + /// @param[in] _num Number of matrices from cache. + /// + /// @attention C99 equivalent is `bgfx_set_transform_cached`. + /// + void setTransform( + uint32_t _cache + , uint16_t _num = 1 + ); + + /// Set shader uniform parameter for draw primitive. + /// + /// @param[in] _handle Uniform. + /// @param[in] _value Pointer to uniform data. + /// @param[in] _num Number of elements. Passing `UINT16_MAX` will + /// use the _num passed on uniform creation. + /// + /// @attention C99 equivalent is `bgfx_set_uniform`. + /// + void setUniform( + UniformHandle _handle + , const void* _value + , uint16_t _num = 1 + ); + + /// Set index buffer for draw primitive. + /// + /// @param[in] _handle Index buffer. + /// + /// @attention C99 equivalent is `bgfx_set_index_buffer`. + /// + void setIndexBuffer(IndexBufferHandle _handle); + + /// Set index buffer for draw primitive. + /// + /// @param[in] _handle Index buffer. + /// @param[in] _firstIndex First index to render. + /// @param[in] _numIndices Number of indices to render. + /// + /// @attention C99 equivalent is `bgfx_set_index_buffer`. + /// + void setIndexBuffer( + IndexBufferHandle _handle + , uint32_t _firstIndex + , uint32_t _numIndices + ); + + /// Set index buffer for draw primitive. + /// + /// @param[in] _handle Dynamic index buffer. + /// + /// @attention C99 equivalent is `bgfx_set_dynamic_index_buffer`. + /// + void setIndexBuffer(DynamicIndexBufferHandle _handle); + + /// Set index buffer for draw primitive. + /// + /// @param[in] _handle Dynamic index buffer. + /// @param[in] _firstIndex First index to render. + /// @param[in] _numIndices Number of indices to render. + /// + /// @attention C99 equivalent is `bgfx_set_dynamic_index_buffer`. + /// + void setIndexBuffer( + DynamicIndexBufferHandle _handle + , uint32_t _firstIndex + , uint32_t _numIndices + ); + + /// Set index buffer for draw primitive. + /// + /// @param[in] _tib Transient index buffer. + /// + /// @remarks + /// _tib pointer after this call is invalid. + /// + /// @attention C99 equivalent is `bgfx_set_transient_index_buffer`. + /// + void setIndexBuffer(const TransientIndexBuffer* _tib); + + /// Set index buffer for draw primitive. + /// + /// @param[in] _tib Transient index buffer. + /// @param[in] _firstIndex First index to render. + /// @param[in] _numIndices Number of indices to render. + /// + /// @remarks + /// _tib pointer after this call is invalid. + /// + /// @attention C99 equivalent is `bgfx_set_transient_index_buffer`. + /// + void setIndexBuffer( + const TransientIndexBuffer* _tib + , uint32_t _firstIndex + , uint32_t _numIndices + ); + + /// Set vertex buffer for draw primitive. + /// + /// @param[in] _stream Vertex stream. + /// @param[in] _handle Vertex buffer. + /// + /// @attention C99 equivalent is `bgfx_set_vertex_buffer`. + /// + void setVertexBuffer( + uint8_t _stream + , VertexBufferHandle _handle + ); + + /// Set vertex buffer for draw primitive. + /// + /// @param[in] _stream Vertex stream. + /// @param[in] _handle Vertex buffer. + /// @param[in] _startVertex First vertex to render. + /// @param[in] _numVertices Number of vertices to render. + /// + /// @attention C99 equivalent is `bgfx_set_vertex_buffer`. + /// + void setVertexBuffer( + uint8_t _stream + , VertexBufferHandle _handle + , uint32_t _startVertex + , uint32_t _numVertices + ); + + /// Set vertex buffer for draw primitive. + /// + /// @param[in] _stream Vertex stream. + /// @param[in] _handle Dynamic vertex buffer. + /// + /// @attention C99 equivalent is `bgfx_set_dynamic_vertex_buffer`. + /// + void setVertexBuffer( + uint8_t _stream + , DynamicVertexBufferHandle _handle + ); + + /// Set vertex buffer for draw primitive. + /// + /// @param[in] _stream Vertex stream. + /// @param[in] _handle Dynamic vertex buffer. + /// @param[in] _startVertex First vertex to render. + /// @param[in] _numVertices Number of vertices to render. + /// + /// @attention C99 equivalent is `bgfx_set_dynamic_vertex_buffer`. + /// + void setVertexBuffer( + uint8_t _stream + , DynamicVertexBufferHandle _handle + , uint32_t _startVertex + , uint32_t _numVertices + ); + + /// Set vertex buffer for draw primitive. + /// + /// @param[in] _stream Vertex stream. + /// @param[in] _tvb Transient vertex buffer. + /// + /// @remarks + /// _tvb pointer after this call is invalid. + /// + /// @attention C99 equivalent is `bgfx_set_transient_vertex_buffer`. + /// + void setVertexBuffer( + uint8_t _stream + , const TransientVertexBuffer* _tvb + ); + + /// Set vertex buffer for draw primitive. + /// + /// @param[in] _stream Vertex stream. + /// @param[in] _tvb Transient vertex buffer. + /// @param[in] _startVertex First vertex to render. + /// @param[in] _numVertices Number of vertices to render. + /// + /// @remarks + /// _tvb pointer after this call is invalid. + /// + /// @attention C99 equivalent is `bgfx_set_transient_vertex_buffer`. + /// + void setVertexBuffer( + uint8_t _stream + , const TransientVertexBuffer* _tvb + , uint32_t _startVertex + , uint32_t _numVertices + ); + + /// Set instance data buffer for draw primitive. + /// + /// @param[in] _idb Transient instance data buffer. + /// @param[in] _num Number of data instances. + /// + /// @remarks + /// _idb pointer after this call is invalid. + /// + /// @attention C99 equivalent is `bgfx_set_instance_data_buffer`. + /// + void setInstanceDataBuffer( + const InstanceDataBuffer* _idb + , uint32_t _num = UINT32_MAX + ); + + /// Set instance data buffer for draw primitive. + /// + /// @param[in] _handle Vertex buffer. + /// @param[in] _start First instance data. + /// @param[in] _num Number of data instances. + /// + /// @attention C99 equivalent is `bgfx_set_instance_data_from_vertex_buffer`. + /// + void setInstanceDataBuffer( + VertexBufferHandle _handle + , uint32_t _start + , uint32_t _num + ); + + /// Set instance data buffer for draw primitive. + /// + /// @param[in] _handle Vertex buffer. + /// @param[in] _start First instance data. + /// @param[in] _num Number of data instances. + /// + /// @attention C99 equivalent is `bgfx_set_instance_data_from_dynamic_vertex_buffer`. + /// + void setInstanceDataBuffer( + DynamicVertexBufferHandle _handle + , uint32_t _start + , uint32_t _num + ); + + /// Set texture stage for draw primitive. + /// + /// @param[in] _stage Texture unit. + /// @param[in] _sampler Program sampler. + /// @param[in] _handle Texture handle. + /// @param[in] _flags Texture sampling mode. Default value UINT32_MAX uses + /// texture sampling settings from the texture. + /// - `BGFX_TEXTURE_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap + /// mode. + /// - `BGFX_TEXTURE_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic + /// sampling. + /// + /// @attention C99 equivalent is `bgfx_set_texture`. + /// + void setTexture( + uint8_t _stage + , UniformHandle _sampler + , TextureHandle _handle + , uint32_t _flags = UINT32_MAX + ); + + /// Submit an empty primitive for rendering. Uniforms and draw state + /// will be applied but no geometry will be submitted. + /// + /// These empty draw calls will sort before ordinary draw calls. + /// + /// @param[in] _id View id. + /// + void touch(ViewId _id); + + /// Submit primitive for rendering. + /// + /// @param[in] _id View id. + /// @param[in] _program Program. + /// @param[in] _depth Depth for sorting. + /// @param[in] _preserveState Preserve internal draw state for next draw + /// call submit. + /// + /// @attention C99 equivalent is `bgfx_submit`. + /// + void submit( + ViewId _id + , ProgramHandle _program + , int32_t _depth = 0 + , bool _preserveState = false + ); + + /// Submit primitive with occlusion query for rendering. + /// + /// @param[in] _id View id. + /// @param[in] _program Program. + /// @param[in] _occlusionQuery Occlusion query. + /// @param[in] _depth Depth for sorting. + /// @param[in] _preserveState Preserve internal draw state for next draw + /// call submit. + /// + /// @attention C99 equivalent is `bgfx_submit_occlusion_query`. + /// + void submit( + ViewId _id + , ProgramHandle _program + , OcclusionQueryHandle _occlusionQuery + , int32_t _depth = 0 + , bool _preserveState = false + ); + + /// Submit primitive for rendering with index and instance data info from + /// indirect buffer. + /// + /// @param[in] _id View id. + /// @param[in] _program Program. + /// @param[in] _indirectHandle Indirect buffer. + /// @param[in] _start First element in indirect buffer. + /// @param[in] _num Number of dispatches. + /// @param[in] _depth Depth for sorting. + /// @param[in] _preserveState Preserve internal draw state for next draw + /// call submit. + /// + /// @attention C99 equivalent is `bgfx_submit_indirect`. + /// + void submit( + ViewId _id + , ProgramHandle _program + , IndirectBufferHandle _indirectHandle + , uint16_t _start = 0 + , uint16_t _num = 1 + , int32_t _depth = 0 + , bool _preserveState = false + ); + + /// Set compute index buffer. + /// + /// @param[in] _stage Compute stage. + /// @param[in] _handle Index buffer handle. + /// @param[in] _access Buffer access. See `Access::Enum`. + /// + /// @attention C99 equivalent is `bgfx_set_compute_index_buffer`. + /// + void setBuffer( + uint8_t _stage + , IndexBufferHandle _handle + , Access::Enum _access + ); + + /// Set compute vertex buffer. + /// + /// @param[in] _stage Compute stage. + /// @param[in] _handle Vertex buffer handle. + /// @param[in] _access Buffer access. See `Access::Enum`. + /// + /// @attention C99 equivalent is `bgfx_set_compute_vertex_buffer`. + /// + void setBuffer( + uint8_t _stage + , VertexBufferHandle _handle + , Access::Enum _access + ); + + /// Set compute dynamic index buffer. + /// + /// @param[in] _stage Compute stage. + /// @param[in] _handle Dynamic index buffer handle. + /// @param[in] _access Buffer access. See `Access::Enum`. + /// + /// @attention C99 equivalent is `bgfx_set_compute_dynamic_index_buffer`. + /// + void setBuffer( + uint8_t _stage + , DynamicIndexBufferHandle _handle + , Access::Enum _access + ); + + /// Set compute dynamic vertex buffer. + /// + /// @param[in] _stage Compute stage. + /// @param[in] _handle Dynamic vertex buffer handle. + /// @param[in] _access Buffer access. See `Access::Enum`. + /// + /// @attention C99 equivalent is `bgfx_set_compute_dynamic_vertex_buffer`. + /// + void setBuffer( + uint8_t _stage + , DynamicVertexBufferHandle _handle + , Access::Enum _access + ); + + /// Set compute indirect buffer. + /// + /// @param[in] _stage Compute stage. + /// @param[in] _handle Indirect buffer handle. + /// @param[in] _access Buffer access. See `Access::Enum`. + /// + /// @attention C99 equivalent is `bgfx_set_compute_indirect_buffer`. + /// + void setBuffer( + uint8_t _stage + , IndirectBufferHandle _handle + , Access::Enum _access + ); + + /// Set compute image from texture. + /// + /// @param[in] _stage Texture unit. + /// @param[in] _handle Texture handle. + /// @param[in] _mip Mip level. + /// @param[in] _access Texture access. See `Access::Enum`. + /// @param[in] _format Texture format. See: `TextureFormat::Enum`. + /// + /// @attention C99 equivalent is `bgfx_set_image`. + /// + void setImage( + uint8_t _stage + , TextureHandle _handle + , uint8_t _mip + , Access::Enum _access + , TextureFormat::Enum _format = TextureFormat::Count + ); + + /// Dispatch compute. + /// + /// @param[in] _id View id. + /// @param[in] _handle Compute program. + /// @param[in] _numX Number of groups X. + /// @param[in] _numY Number of groups Y. + /// @param[in] _numZ Number of groups Z. + /// @param[in] _flags View flags. Use + /// - `BGFX_VIEW_NONE` - View will be rendered only once if stereo mode is enabled. + /// - `BGFX_VIEW_STEREO` - View will be rendered for both eyes if stereo mode is enabled. When + /// stereo mode is disabled this flag doesn't have effect. + /// + /// @attention C99 equivalent is `bgfx_dispatch`. + /// + void dispatch( + ViewId _id + , ProgramHandle _handle + , uint32_t _numX = 1 + , uint32_t _numY = 1 + , uint32_t _numZ = 1 + , uint8_t _flags = BGFX_SUBMIT_EYE_FIRST + ); + + /// Dispatch compute indirect. + /// + /// @param[in] _id View id. + /// @param[in] _handle Compute program. + /// @param[in] _indirectHandle Indirect buffer. + /// @param[in] _start First element in indirect buffer. + /// @param[in] _num Number of dispatches. + /// @param[in] _flags View flags. Use + /// - `BGFX_VIEW_NONE` - View will be rendered only once if stereo mode is enabled. + /// - `BGFX_VIEW_STEREO` - View will be rendered for both eyes if stereo mode is enabled. When + /// stereo mode is disabled this flag doesn't have effect. + /// + /// @attention C99 equivalent is `bgfx_dispatch_indirect`. + /// + void dispatch( + ViewId _id + , ProgramHandle _handle + , IndirectBufferHandle _indirectHandle + , uint16_t _start = 0 + , uint16_t _num = 1 + , uint8_t _flags = BGFX_SUBMIT_EYE_FIRST + ); + + /// Discard all previously set state for draw or compute call. + /// + /// @attention C99 equivalent is `bgfx_discard`. + /// + void discard(); + + /// Blit texture 2D region between two 2D textures. + /// + /// @param[in] _id View id. + /// @param[in] _dst Destination texture handle. + /// @param[in] _dstX Destination texture X position. + /// @param[in] _dstY Destination texture Y position. + /// @param[in] _src Source texture handle. + /// @param[in] _srcX Source texture X position. + /// @param[in] _srcY Source texture Y position. + /// @param[in] _width Width of region. + /// @param[in] _height Height of region. + /// + /// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag. + /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`. + /// @attention C99 equivalent is `bgfx_blit`. + /// + void blit( + ViewId _id + , TextureHandle _dst + , uint16_t _dstX + , uint16_t _dstY + , TextureHandle _src + , uint16_t _srcX = 0 + , uint16_t _srcY = 0 + , uint16_t _width = UINT16_MAX + , uint16_t _height = UINT16_MAX + ); + + /// Blit texture region between two textures. + /// + /// @param[in] _id View id. + /// @param[in] _dst Destination texture handle. + /// @param[in] _dstMip Destination texture mip level. + /// @param[in] _dstX Destination texture X position. + /// @param[in] _dstY Destination texture Y position. + /// @param[in] _dstZ If texture is 2D this argument should be 0. If destination texture is cube + /// this argument represents destination texture cube face. For 3D texture this argument + /// represents destination texture Z position. + /// @param[in] _src Source texture handle. + /// @param[in] _srcMip Source texture mip level. + /// @param[in] _srcX Source texture X position. + /// @param[in] _srcY Source texture Y position. + /// @param[in] _srcZ If texture is 2D this argument should be 0. If source texture is cube + /// this argument represents source texture cube face. For 3D texture this argument + /// represents source texture Z position. + /// @param[in] _width Width of region. + /// @param[in] _height Height of region. + /// @param[in] _depth If texture is 3D this argument represents depth of region, otherwise it's + /// unused. + /// + /// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag. + /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`. + /// @attention C99 equivalent is `bgfx_blit`. + /// + void blit( + ViewId _id + , TextureHandle _dst + , uint8_t _dstMip + , uint16_t _dstX + , uint16_t _dstY + , uint16_t _dstZ + , TextureHandle _src + , uint8_t _srcMip = 0 + , uint16_t _srcX = 0 + , uint16_t _srcY = 0 + , uint16_t _srcZ = 0 + , uint16_t _width = UINT16_MAX + , uint16_t _height = UINT16_MAX + , uint16_t _depth = UINT16_MAX + ); }; /// Vertex declaration. @@ -784,9 +1570,6 @@ namespace bgfx VertexDecl& skip(uint8_t _num); /// Decode attribute. - /// - /// @attention C99 equivalent is ``. - /// void decode( Attrib::Enum _attrib , uint8_t& _num @@ -813,7 +1596,14 @@ namespace bgfx uint16_t m_attributes[Attrib::Count]; }; - /// Pack vec4 into vertex stream format. + /// Pack vertex attribute into vertex stream format. + /// + /// @param[in] _input Value to be packed into vertex stream. + /// @param[in] _inputNormalized True if input value is already normalized. + /// @param[in] _attr Attribute to pack. + /// @param[in] _decl Vertex stream declaration. + /// @param[in] _data Destination vertex stream where data will be packed. + /// @param[in] _index Vertex index that will be modified. /// /// @attention C99 equivalent is `bgfx_vertex_pack`. /// @@ -826,7 +1616,13 @@ namespace bgfx , uint32_t _index = 0 ); - /// Unpack vec4 from vertex stream format. + /// Unpack vertex attribute from vertex stream format. + /// + /// @param[out] _output Result of unpacking. + /// @param[in] _attr Attribute to unpack. + /// @param[in] _decl Vertex stream declaration. + /// @param[in] _data Source vertex stream from where data will be unpacked. + /// @param[in] _index Vertex index that will be unpacked. /// /// @attention C99 equivalent is `bgfx_vertex_unpack`. /// @@ -942,7 +1738,10 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_get_supported_renderers`. /// - uint8_t getSupportedRenderers(uint8_t _max = 0, RendererType::Enum* _enum = NULL); + uint8_t getSupportedRenderers( + uint8_t _max = 0 + , RendererType::Enum* _enum = NULL + ); /// Returns name of renderer. /// @@ -953,7 +1752,7 @@ namespace bgfx /// Initialize bgfx library. /// /// @param[in] _type Select rendering backend. When set to RendererType::Count - /// default rendering backend will be selected. + /// a default rendering backend will be selected appropriate to the platform. /// See: `bgfx::RendererType` /// /// @param[in] _vendorId Vendor PCI id. If set to `BGFX_PCI_ID_NONE` it will select the first @@ -970,8 +1769,8 @@ namespace bgfx /// @param[in] _callback Provide application specific callback interface. /// See: `bgfx::CallbackI` /// - /// @param[in] _allocator Custom allocator. When custom allocator is not - /// specified, library uses default CRT allocator. The library assumes + /// @param[in] _allocator Custom allocator. When a custom allocator is not + /// specified, bgfx uses the CRT allocator. Bgfx assumes /// custom allocator is thread safe. /// /// @returns `true` if initialization was successful. @@ -1017,7 +1816,19 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_reset`. /// - void reset(uint32_t _width, uint32_t _height, uint32_t _flags = BGFX_RESET_NONE); + void reset( + uint32_t _width + , uint32_t _height + , uint32_t _flags = BGFX_RESET_NONE + ); + + /// Begin submitting draw calls from thread. + /// + Encoder* begin(); + + /// End submitting draw calls from thread. + /// + void end(Encoder* _encoder); /// Advance to next frame. When using multithreaded renderer, this call /// just swaps internal buffers, kicks render thread, and returns. In @@ -1061,6 +1872,7 @@ namespace bgfx /// Returns performance counters. /// + /// @attention Pointer returned is valid until `bgfx::frame` is called. /// @attention C99 equivalent is `bgfx_get_stats`. /// const Stats* getStats(); @@ -1073,17 +1885,24 @@ namespace bgfx /// Allocate buffer and copy data into it. Data will be freed inside bgfx. /// + /// @param[in] _data Pointer to data to be copied. + /// @param[in] _size Size of data to be copied. + /// /// @attention C99 equivalent is `bgfx_copy`. /// - const Memory* copy(const void* _data, uint32_t _size); + const Memory* copy( + const void* _data + , uint32_t _size + ); - /// Make reference to data to pass to bgfx. Unlike `bgfx::alloc` this call - /// doesn't allocate memory for data. It just copies pointer to data. You + /// Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call + /// doesn't allocate memory for data. It just copies the _data pointer. You /// can pass `ReleaseFn` function pointer to release this memory after it's - /// consumed, or you must make sure data is available for at least 2 + /// consumed, otherwise you must make sure _data is available for at least 2 /// `bgfx::frame` calls. `ReleaseFn` function must be able to be called /// from any thread. /// + /// @attention Data passed must be available for at least 2 `bgfx::frame` calls. /// @attention C99 equivalent are `bgfx_make_ref`, `bgfx_make_ref_release`. /// const Memory* makeRef( @@ -1097,8 +1916,9 @@ namespace bgfx /// /// @param[in] _debug Available flags: /// - `BGFX_DEBUG_IFH` - Infinitely fast hardware. When this flag is set - /// all rendering calls will be skipped. It's useful when profiling - /// to quickly assess bottleneck between CPU and GPU. + /// all rendering calls will be skipped. This is useful when profiling + /// to quickly assess potential bottlenecks between CPU and GPU. + /// - `BGFX_DEBUG_PROFILER` - Enable profiler. /// - `BGFX_DEBUG_STATS` - Display internal statistics. /// - `BGFX_DEBUG_TEXT` - Display debug text. /// - `BGFX_DEBUG_WIREFRAME` - Wireframe rendering. All rendering @@ -1112,30 +1932,45 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_dbg_text_clear`. /// - void dbgTextClear(uint8_t _attr = 0, bool _small = false); + void dbgTextClear( + uint8_t _attr = 0 + , bool _small = false + ); /// Print into internal debug text character-buffer (VGA-compatible text mode). /// /// @param[in] _x, _y 2D position from top-left. /// @param[in] _attr Color palette. Where top 4-bits represent index of background, and bottom - /// 4-bits represent foreground color from standard VGA text palette. + /// 4-bits represent foreground color from standard VGA text palette (ANSI escape codes). /// @param[in] _format `printf` style format. /// /// @attention C99 equivalent is `bgfx_dbg_text_printf`. /// - void dbgTextPrintf(uint16_t _x, uint16_t _y, uint8_t _attr, const char* _format, ...); + void dbgTextPrintf( + uint16_t _x + , uint16_t _y + , uint8_t _attr + , const char* _format + , ... + ); /// Print into internal debug text character-buffer (VGA-compatible text mode). /// /// @param[in] _x, _y 2D position from top-left. /// @param[in] _attr Color palette. Where top 4-bits represent index of background, and bottom - /// 4-bits represent foreground color from standard VGA text palette. + /// 4-bits represent foreground color from standard VGA text palette (ANSI escape codes). /// @param[in] _format `printf` style format. /// @param[in] _argList additional arguments for format string /// /// @attention C99 equivalent is `bgfx_dbg_text_vprintf`. /// - void dbgTextPrintfVargs(uint16_t _x, uint16_t _y, uint8_t _attr, const char* _format, va_list _argList); + void dbgTextPrintfVargs( + uint16_t _x + , uint16_t _y + , uint8_t _attr + , const char* _format + , va_list _argList + ); /// Draw image into internal debug text buffer. /// @@ -1164,16 +1999,19 @@ namespace bgfx /// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer /// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. /// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of - /// data is passed. If this flag is not specified if more data is passed on update buffer - /// will be trimmed to fit existing buffer size. This flag has effect only on dynamic + /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of + /// data is passed. If this flag is not specified, and more data is passed on update, the buffer + /// will be trimmed to fit the existing buffer size. This flag has effect only on dynamic /// buffers. /// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on /// index buffers. /// /// @attention C99 equivalent is `bgfx_create_index_buffer`. /// - IndexBufferHandle createIndexBuffer(const Memory* _mem, uint16_t _flags = BGFX_BUFFER_NONE); + IndexBufferHandle createIndexBuffer( + const Memory* _mem + , uint16_t _flags = BGFX_BUFFER_NONE + ); /// Destroy static index buffer. /// @@ -1181,7 +2019,7 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_destroy_index_buffer`. /// - void destroyIndexBuffer(IndexBufferHandle _handle); + void destroy(IndexBufferHandle _handle); /// Create static vertex buffer. /// @@ -1193,9 +2031,9 @@ namespace bgfx /// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer /// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. /// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of - /// data is passed. If this flag is not specified if more data is passed on update buffer - /// will be trimmed to fit existing buffer size. This flag has effect only on dynamic + /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of + /// data is passed. If this flag is not specified, and more data is passed on update, the buffer + /// will be trimmed to fit the existing buffer size. This flag has effect only on dynamic /// buffers. /// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on /// index buffers. @@ -1215,7 +2053,7 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_destroy_vertex_buffer`. /// - void destroyVertexBuffer(VertexBufferHandle _handle); + void destroy(VertexBufferHandle _handle); /// Create empty dynamic index buffer. /// @@ -1226,9 +2064,9 @@ namespace bgfx /// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer /// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. /// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of - /// data is passed. If this flag is not specified if more data is passed on update buffer - /// will be trimmed to fit existing buffer size. This flag has effect only on dynamic + /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of + /// data is passed. If this flag is not specified, and more data is passed on update, the buffer + /// will be trimmed to fit the existing buffer size. This flag has effect only on dynamic /// buffers. /// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on /// index buffers. @@ -1250,9 +2088,9 @@ namespace bgfx /// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer /// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. /// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of - /// data is passed. If this flag is not specified if more data is passed on update buffer - /// will be trimmed to fit existing buffer size. This flag has effect only on dynamic + /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of + /// data is passed. If this flag is not specified, and more data is passed on update, the buffer + /// will be trimmed to fit the existing buffer size. This flag has effect only on dynamic /// buffers. /// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on /// index buffers. @@ -1285,7 +2123,7 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_destroy_dynamic_index_buffer`. /// - void destroyDynamicIndexBuffer(DynamicIndexBufferHandle _handle); + void destroy(DynamicIndexBufferHandle _handle); /// Create empty dynamic vertex buffer. /// @@ -1297,9 +2135,9 @@ namespace bgfx /// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer /// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. /// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of - /// data is passed. If this flag is not specified if more data is passed on update buffer - /// will be trimmed to fit existing buffer size. This flag has effect only on dynamic + /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of + /// data is passed. If this flag is not specified, and more data is passed on update, the buffer + /// will be trimmed to fit the existing buffer size. This flag has effect only on dynamic /// buffers. /// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on /// index buffers. @@ -1323,9 +2161,9 @@ namespace bgfx /// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer /// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU. /// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader. - /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of - /// data is passed. If this flag is not specified if more data is passed on update buffer - /// will be trimmed to fit existing buffer size. This flag has effect only on dynamic + /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of + /// data is passed. If this flag is not specified, and more data is passed on update, the buffer + /// will be trimmed to fit the existing buffer size. This flag has effect only on dynamic /// buffers. /// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on /// index buffers. @@ -1359,7 +2197,7 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_destroy_dynamic_vertex_buffer`. /// - void destroyDynamicVertexBuffer(DynamicVertexBufferHandle _handle); + void destroy(DynamicVertexBufferHandle _handle); /// Returns number of available indices. /// @@ -1374,18 +2212,24 @@ namespace bgfx /// @param[in] _num Number of required vertices. /// @param[in] _decl Vertex declaration. /// - /// @attention C99 equivalent is `bgfx_check_avail_transient_vertex_buffer`. + /// @attention C99 equivalent is `bgfx_get_avail_transient_vertex_buffer`. /// - uint32_t getAvailTransientVertexBuffer(uint32_t _num, const VertexDecl& _decl); + uint32_t getAvailTransientVertexBuffer( + uint32_t _num + , const VertexDecl& _decl + ); /// Returns number of available instance buffer slots. /// /// @param[in] _num Number of required instances. /// @param[in] _stride Stride per instance. /// - /// @attention C99 equivalent is `bgfx_check_avail_instance_data_buffer`. + /// @attention C99 equivalent is `bgfx_get_avail_instance_data_buffer`. /// - uint32_t getAvailInstanceDataBuffer(uint32_t _num, uint16_t _stride); + uint32_t getAvailInstanceDataBuffer( + uint32_t _num + , uint16_t _stride + ); /// Allocate transient index buffer. /// @@ -1395,13 +2239,14 @@ namespace bgfx /// @param[in] _num Number of indices to allocate. /// /// @remarks - /// 1. You must call setIndexBuffer after alloc in order to avoid memory - /// leak. - /// 2. Only 16-bit index buffer is supported. + /// Only 16-bit index buffer is supported. /// /// @attention C99 equivalent is `bgfx_alloc_transient_index_buffer`. /// - void allocTransientIndexBuffer(TransientIndexBuffer* _tib, uint32_t _num); + void allocTransientIndexBuffer( + TransientIndexBuffer* _tib + , uint32_t _num + ); /// Allocate transient vertex buffer. /// @@ -1411,13 +2256,10 @@ namespace bgfx /// @param[in] _num Number of vertices to allocate. /// @param[in] _decl Vertex declaration. /// - /// @remarks - /// You must call setVertexBuffer after alloc in order to avoid memory - /// leak. - /// /// @attention C99 equivalent is `bgfx_alloc_transient_vertex_buffer`. /// - void allocTransientVertexBuffer(TransientVertexBuffer* _tvb + void allocTransientVertexBuffer( + TransientVertexBuffer* _tvb , uint32_t _num , const VertexDecl& _decl ); @@ -1431,7 +2273,8 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_alloc_transient_buffers`. /// - bool allocTransientBuffers(TransientVertexBuffer* _tvb + bool allocTransientBuffers( + TransientVertexBuffer* _tvb , const VertexDecl& _decl , uint32_t _numVertices , TransientIndexBuffer* _tib @@ -1440,13 +2283,19 @@ namespace bgfx /// Allocate instance data buffer. /// - /// @remarks - /// You must call setInstanceDataBuffer after alloc in order to avoid - /// memory leak. + /// @param[out] _idb InstanceDataBuffer structure is filled and is valid + /// for duration of frame, and it can be reused for multiple draw + /// calls. + /// @param[in] _num Number of instances. + /// @param[in] _stride Instance stride. Must be multiple of 16. /// /// @attention C99 equivalent is `bgfx_alloc_instance_data_buffer`. /// - const InstanceDataBuffer* allocInstanceDataBuffer(uint32_t _num, uint16_t _stride); + void allocInstanceDataBuffer( + InstanceDataBuffer* _idb + , uint32_t _num + , uint16_t _stride + ); /// Create draw indirect buffer. /// @@ -1463,7 +2312,7 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_destroy_indirect_buffer`. /// - void destroyIndirectBuffer(IndirectBufferHandle _handle); + void destroy(IndirectBufferHandle _handle); /// Create shader from memory buffer. /// @@ -1471,7 +2320,7 @@ namespace bgfx /// ShaderHandle createShader(const Memory* _mem); - /// Returns num of uniforms, and uniform handles used inside shader. + /// Returns the number of uniforms and uniform handles used inside a shader. /// /// @param[in] _handle Shader handle. /// @param[in] _uniforms UniformHandle array where data will be stored. @@ -1489,12 +2338,26 @@ namespace bgfx , uint16_t _max = 0 ); - /// Destroy shader. Once program is created with shader it is safe to - /// destroy shader. + /// Set shader debug name. + /// + /// @param[in] _handle Shader handle. + /// @param[in] _name Shader name. + /// + /// @attention C99 equivalent is `bgfx_set_shader_name`. + /// + void setName( + ShaderHandle _handle + , const char* _name + ); + + /// Destroy shader. Once a shader program is created with _handle, + /// it is safe to destroy that shader. + /// + /// @param[in] _handle Shader handle. /// /// @attention C99 equivalent is `bgfx_destroy_shader`. /// - void destroyShader(ShaderHandle _handle); + void destroy(ShaderHandle _handle); /// Create program with vertex and fragment shaders. /// @@ -1529,9 +2392,11 @@ namespace bgfx /// Destroy program. /// + /// @param[in] _handle Program handle. + /// /// @attention C99 equivalent is `bgfx_destroy_program`. /// - void destroyProgram(ProgramHandle _handle); + void destroy(ProgramHandle _handle); /// Validate texture parameters. /// @@ -1827,7 +2692,39 @@ namespace bgfx /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`. /// @attention C99 equivalent is `bgfx_read_texture`. /// - uint32_t readTexture(TextureHandle _handle, void* _data, uint8_t _mip = 0); + uint32_t readTexture( + TextureHandle _handle + , void* _data + , uint8_t _mip = 0 + ); + + /// Set texture debug name. + /// + /// @param[in] _handle Texture handle. + /// @param[in] _name Texture name. + /// + /// @attention C99 equivalent is `bgfx_set_texture_name`. + /// + void setName( + TextureHandle _handle + , const char* _name + ); + + /// Returns texture direct access pointer. + /// + /// @param[in] _handle Texture handle. + /// + /// @returns Pointer to texture memory. If returned pointer is `NULL` direct access + /// is not available for this texture. If pointer is `UINTPTR_MAX` sentinel value + /// it means texture is pending creation. Pointer returned can be cached and it + /// will be valid until texture is destroyed. + /// + /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_DIRECT_ACCESS`. This feature + /// is available on GPUs that have unified memory architecture (UMA) support. + /// + /// @attention C99 equivalent is `bgfx_get_direct_access_ptr`. + /// + void* getDirectAccessPtr(TextureHandle _handle); /// Destroy texture. /// @@ -1835,7 +2732,7 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_destroy_texture`. /// - void destroyTexture(TextureHandle _handle); + void destroy(TextureHandle _handle); /// Create frame buffer (simple). /// @@ -1947,13 +2844,18 @@ namespace bgfx /// @returns Returns invalid texture handle if attachment index is not /// correct, or frame buffer is created with native window handle. /// - TextureHandle getTexture(FrameBufferHandle _handle, uint8_t _attachment = 0); + TextureHandle getTexture( + FrameBufferHandle _handle + , uint8_t _attachment = 0 + ); /// Destroy frame buffer. /// + /// @param[in] _handle Frame buffer handle. + /// /// @attention C99 equivalent is `bgfx_destroy_frame_buffer`. /// - void destroyFrameBuffer(FrameBufferHandle _handle); + void destroy(FrameBufferHandle _handle); /// Create shader uniform parameter. /// @@ -1972,7 +2874,7 @@ namespace bgfx /// /// 2. Predefined uniforms (declared in `bgfx_shader.sh`): /// - `u_viewRect vec4(x, y, width, height)` - view rectangle for current - /// view. + /// view, in pixels. /// - `u_viewTexel vec4(1.0/width, 1.0/height, undef, undef)` - inverse /// width and height /// - `u_view mat4` - view matrix @@ -1989,7 +2891,11 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_create_uniform`. /// - UniformHandle createUniform(const char* _name, UniformType::Enum _type, uint16_t _num = 1); + UniformHandle createUniform( + const char* _name + , UniformType::Enum _type + , uint16_t _num = 1 + ); /// Retrieve uniform info. /// @@ -1998,7 +2904,10 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_get_uniform_info`. /// - void getUniformInfo(UniformHandle _handle, UniformInfo& _info); + void getUniformInfo( + UniformHandle _handle + , UniformInfo& _info + ); /// Destroy shader uniform parameter. /// @@ -2006,7 +2915,7 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_destroy_uniform`. /// - void destroyUniform(UniformHandle _handle); + void destroy(UniformHandle _handle); /// Create occlusion query. /// @@ -2025,7 +2934,10 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_get_result`. /// - OcclusionQueryResult::Enum getResult(OcclusionQueryHandle _handle, int32_t* _result = NULL); + OcclusionQueryResult::Enum getResult( + OcclusionQueryHandle _handle + , int32_t* _result = NULL + ); /// Destroy occlusion query. /// @@ -2033,7 +2945,7 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_destroy_occlusion_query`. /// - void destroyOcclusionQuery(OcclusionQueryHandle _handle); + void destroy(OcclusionQueryHandle _handle); /// Set palette color value. /// @@ -2042,7 +2954,10 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_palette_color`. /// - void setPaletteColor(uint8_t _index, uint32_t _rgba); + void setPaletteColor( + uint8_t _index + , uint32_t _rgba + ); /// Set palette color value. /// @@ -2051,7 +2966,13 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_palette_color`. /// - void setPaletteColor(uint8_t _index, float _r, float _g, float _b, float _a); + void setPaletteColor( + uint8_t _index + , float _r + , float _g + , float _b + , float _a + ); /// Set palette color value. /// @@ -2060,7 +2981,10 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_palette_color`. /// - void setPaletteColor(uint8_t _index, const float _rgba[4]); + void setPaletteColor( + uint8_t _index + , const float _rgba[4] + ); /// Set view name. /// @@ -2080,7 +3004,10 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_view_name`. /// - void setViewName(uint8_t _id, const char* _name); + void setViewName( + ViewId _id + , const char* _name + ); /// Set view rectangle. Draw primitive outside view will be clipped. /// @@ -2092,11 +3019,30 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_view_rect`. /// - void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); + void setViewRect( + ViewId _id + , uint16_t _x + , uint16_t _y + , uint16_t _width + , uint16_t _height + ); + /// Set view rectangle. Draw primitive outside view will be clipped. + /// + /// @param[in] _id View id. + /// @param[in] _x Position x from the left corner of the window. + /// @param[in] _y Position y from the top corner of the window. + /// @param[in] _ratio Width and height will be set in respect to back-buffer size. See: + /// `BackbufferRatio::Enum`. + /// /// @attention C99 equivalent is `bgfx_set_view_rect_auto`. /// - void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, BackbufferRatio::Enum _ratio); + void setViewRect( + ViewId _id + , uint16_t _x + , uint16_t _y + , BackbufferRatio::Enum _ratio + ); /// Set view scissor. Draw primitive outside view will be clipped. When /// _x, _y, _width and _height are set to 0, scissor will be disabled. @@ -2110,7 +3056,7 @@ namespace bgfx /// @attention C99 equivalent is `bgfx_set_view_scissor`. /// void setViewScissor( - uint8_t _id + ViewId _id , uint16_t _x = 0 , uint16_t _y = 0 , uint16_t _width = 0 @@ -2129,7 +3075,7 @@ namespace bgfx /// @attention C99 equivalent is `bgfx_set_view_clear`. /// void setViewClear( - uint8_t _id + ViewId _id , uint16_t _flags , uint32_t _rgba = 0x000000ff , float _depth = 1.0f @@ -2157,7 +3103,7 @@ namespace bgfx /// @attention C99 equivalent is `bgfx_set_view_clear_mrt`. /// void setViewClear( - uint8_t _id + ViewId _id , uint16_t _flags , float _depth , uint8_t _stencil @@ -2171,12 +3117,20 @@ namespace bgfx , uint8_t _7 = UINT8_MAX ); - /// Set view into sequential mode. Draw calls will be sorted in the same - /// order in which submit calls were called. + /// Set view sorting mode. /// - /// @attention C99 equivalent is `bgfx_set_view_seq`. + /// @param[in] _id View id. + /// @param[in] _mode View sort mode. See `ViewMode::Enum`. /// - void setViewSeq(uint8_t _id, bool _enabled); + /// @remarks + /// View mode must be set prior calling `bgfx::submit` for the view. + /// + /// @attention C99 equivalent is `bgfx_set_view_mode`. + /// + void setViewMode( + ViewId _id + , ViewMode::Enum _mode = ViewMode::Default + ); /// Set view frame buffer. /// @@ -2190,7 +3144,10 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_view_frame_buffer`. /// - void setViewFrameBuffer(uint8_t _id, FrameBufferHandle _handle); + void setViewFrameBuffer( + ViewId _id + , FrameBufferHandle _handle + ); /// Set view view and projection matrices, all draw primitives in this /// view will use these matrices. @@ -2208,7 +3165,7 @@ namespace bgfx /// @attention C99 equivalent are `bgfx_set_view_transform`, `bgfx_set_view_transform_stereo`. /// void setViewTransform( - uint8_t _id + ViewId _id , const void* _view , const void* _projL , uint8_t _flags = BGFX_VIEW_STEREO @@ -2222,9 +3179,13 @@ namespace bgfx /// @param[in] _remap View remap id table. Passing `NULL` will reset view ids /// to default state. /// - /// @attention C99 equivalent is `bgfx_set_view_remap`. + /// @attention C99 equivalent is `bgfx_set_view_order`. /// - void setViewOrder(uint8_t _id = 0, uint8_t _num = UINT8_MAX, const void* _remap = NULL); + void setViewOrder( + ViewId _id = 0 + , uint16_t _num = UINT16_MAX + , const ViewId* _remap = NULL + ); /// Reset all view settings to default. /// @@ -2232,7 +3193,7 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_reset_view`. /// - void resetView(uint8_t _id); + void resetView(ViewId _id); /// Sets debug marker. /// @@ -2258,14 +3219,22 @@ namespace bgfx /// `BGFX_STATE_BLEND_INV_FACTOR` blend modes. /// /// @remarks - /// 1. Use `BGFX_STATE_ALPHA_REF`, `BGFX_STATE_POINT_SIZE` and - /// `BGFX_STATE_BLEND_FUNC` macros to setup more complex states. + /// 1. To setup more complex states use: + /// `BGFX_STATE_ALPHA_REF(_ref)`, + /// `BGFX_STATE_POINT_SIZE(_size)`, + /// `BGFX_STATE_BLEND_FUNC(_src, _dst)`, + /// `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)` + /// `BGFX_STATE_BLEND_EQUATION(_equation)` + /// `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)` /// 2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend /// equation is specified. /// /// @attention C99 equivalent is `bgfx_set_state`. /// - void setState(uint64_t _state, uint32_t _rgba = 0); + void setState( + uint64_t _state + , uint32_t _rgba = 0 + ); /// Set condition for rendering. /// @@ -2274,7 +3243,10 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_condition`. /// - void setCondition(OcclusionQueryHandle _handle, bool _visible); + void setCondition( + OcclusionQueryHandle _handle + , bool _visible + ); /// Set stencil test state. /// @@ -2284,7 +3256,10 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_stencil`. /// - void setStencil(uint32_t _fstencil, uint32_t _bstencil = BGFX_STENCIL_NONE); + void setStencil( + uint32_t _fstencil + , uint32_t _bstencil = BGFX_STENCIL_NONE + ); /// Set scissor for draw primitive. For scissor for all primitives in /// view see `bgfx::setViewScissor`. @@ -2297,7 +3272,12 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_scissor`. /// - uint16_t setScissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); + uint16_t setScissor( + uint16_t _x + , uint16_t _y + , uint16_t _width + , uint16_t _height + ); /// Set scissor from cache for draw primitive. /// @@ -2308,8 +3288,8 @@ namespace bgfx /// void setScissor(uint16_t _cache = UINT16_MAX); - /// Set model matrix for draw primitive. If it is not called model will - /// be rendered with identity model matrix. + /// Set model matrix for draw primitive. If it is not called, + /// the model will be rendered with an identity model matrix. /// /// @param[in] _mtx Pointer to first matrix in array. /// @param[in] _num Number of matrices in array. @@ -2318,18 +3298,24 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_transform`. /// - uint32_t setTransform(const void* _mtx, uint16_t _num = 1); + uint32_t setTransform( + const void* _mtx + , uint16_t _num = 1 + ); - /// Reserve `_num` matrices in internal matrix cache. Pointer returned - /// can be modifed until `bgfx::frame` is called. + /// Reserve `_num` matrices in internal matrix cache. /// /// @param[in] _transform Pointer to `Transform` structure. /// @param[in] _num Number of matrices. /// @returns index into matrix cache. /// + /// @attention Pointer returned can be modifed until `bgfx::frame` is called. /// @attention C99 equivalent is `bgfx_alloc_transform`. /// - uint32_t allocTransform(Transform* _transform, uint16_t _num); + uint32_t allocTransform( + Transform* _transform + , uint16_t _num + ); /// Set model matrix from matrix cache for draw primitive. /// @@ -2338,7 +3324,10 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_transform_cached`. /// - void setTransform(uint32_t _cache, uint16_t _num = 1); + void setTransform( + uint32_t _cache + , uint16_t _num = 1 + ); /// Set shader uniform parameter for draw primitive. /// @@ -2349,7 +3338,11 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_uniform`. /// - void setUniform(UniformHandle _handle, const void* _value, uint16_t _num = 1); + void setUniform( + UniformHandle _handle + , const void* _value + , uint16_t _num = 1 + ); /// Set index buffer for draw primitive. /// @@ -2367,7 +3360,11 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_index_buffer`. /// - void setIndexBuffer(IndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices); + void setIndexBuffer( + IndexBufferHandle _handle + , uint32_t _firstIndex + , uint32_t _numIndices + ); /// Set index buffer for draw primitive. /// @@ -2395,6 +3392,9 @@ namespace bgfx /// /// @param[in] _tib Transient index buffer. /// + /// @remarks + /// _tib pointer after this call is invalid. + /// /// @attention C99 equivalent is `bgfx_set_transient_index_buffer`. /// void setIndexBuffer(const TransientIndexBuffer* _tib); @@ -2405,6 +3405,9 @@ namespace bgfx /// @param[in] _firstIndex First index to render. /// @param[in] _numIndices Number of indices to render. /// + /// @remarks + /// _tib pointer after this call is invalid. + /// /// @attention C99 equivalent is `bgfx_set_transient_index_buffer`. /// void setIndexBuffer( @@ -2415,85 +3418,134 @@ namespace bgfx /// Set vertex buffer for draw primitive. /// + /// @param[in] _stream Vertex stream. /// @param[in] _handle Vertex buffer. /// /// @attention C99 equivalent is `bgfx_set_vertex_buffer`. /// - void setVertexBuffer(VertexBufferHandle _handle); - - /// Set vertex buffer for draw primitive. - /// - /// @param[in] _handle Vertex buffer. - /// @param[in] _startVertex First vertex to render. - /// @param[in] _numVertices Number of vertices to render. - /// - /// @attention C99 equivalent is `bgfx_set_vertex_buffer`. - /// - void setVertexBuffer(VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices); - - /// Set vertex buffer for draw primitive. - /// - /// @param[in] _handle Dynamic vertex buffer. - /// - /// @attention C99 equivalent is `bgfx_set_dynamic_vertex_buffer`. - /// - void setVertexBuffer(DynamicVertexBufferHandle _handle); - - /// Set vertex buffer for draw primitive. - /// - /// @param[in] _handle Dynamic vertex buffer. - /// @param[in] _startVertex First vertex to render. - /// @param[in] _numVertices Number of vertices to render. - /// - /// @attention C99 equivalent is `bgfx_set_dynamic_vertex_buffer`. - /// void setVertexBuffer( - DynamicVertexBufferHandle _handle + uint8_t _stream + , VertexBufferHandle _handle + ); + + /// Set vertex buffer for draw primitive. + /// + /// @param[in] _stream Vertex stream. + /// @param[in] _handle Vertex buffer. + /// @param[in] _startVertex First vertex to render. + /// @param[in] _numVertices Number of vertices to render. + /// + /// @attention C99 equivalent is `bgfx_set_vertex_buffer`. + /// + void setVertexBuffer( + uint8_t _stream + , VertexBufferHandle _handle , uint32_t _startVertex , uint32_t _numVertices ); /// Set vertex buffer for draw primitive. /// - /// @param[in] _tvb Transient vertex buffer. + /// @param[in] _stream Vertex stream. + /// @param[in] _handle Dynamic vertex buffer. /// - /// @attention C99 equivalent is `bgfx_set_transient_vertex_buffer`. + /// @attention C99 equivalent is `bgfx_set_dynamic_vertex_buffer`. /// - void setVertexBuffer(const TransientVertexBuffer* _tvb); + void setVertexBuffer( + uint8_t _stream + , DynamicVertexBufferHandle _handle + ); /// Set vertex buffer for draw primitive. /// - /// @param[in] _tvb Transient vertex buffer. + /// @param[in] _stream Vertex stream. + /// @param[in] _handle Dynamic vertex buffer. /// @param[in] _startVertex First vertex to render. /// @param[in] _numVertices Number of vertices to render. /// + /// @attention C99 equivalent is `bgfx_set_dynamic_vertex_buffer`. + /// + void setVertexBuffer( + uint8_t _stream + , DynamicVertexBufferHandle _handle + , uint32_t _startVertex + , uint32_t _numVertices + ); + + /// Set vertex buffer for draw primitive. + /// + /// @param[in] _stream Vertex stream. + /// @param[in] _tvb Transient vertex buffer. + /// + /// @remarks + /// _tvb pointer after this call is invalid. + /// /// @attention C99 equivalent is `bgfx_set_transient_vertex_buffer`. /// void setVertexBuffer( - const TransientVertexBuffer* _tvb + uint8_t _stream + , const TransientVertexBuffer* _tvb + ); + + /// Set vertex buffer for draw primitive. + /// + /// @param[in] _stream Vertex stream. + /// @param[in] _tvb Transient vertex buffer. + /// @param[in] _startVertex First vertex to render. + /// @param[in] _numVertices Number of vertices to render. + /// + /// @remarks + /// _tvb pointer after this call is invalid. + /// + /// @attention C99 equivalent is `bgfx_set_transient_vertex_buffer`. + /// + void setVertexBuffer( + uint8_t _stream + , const TransientVertexBuffer* _tvb , uint32_t _startVertex , uint32_t _numVertices ); /// Set instance data buffer for draw primitive. /// + /// @param[in] _idb Transient instance data buffer. + /// @param[in] _num Number of data instances. + /// + /// @remarks + /// _idb pointer after this call is invalid. + /// /// @attention C99 equivalent is `bgfx_set_instance_data_buffer`. /// - void setInstanceDataBuffer(const InstanceDataBuffer* _idb, uint32_t _num = UINT32_MAX); + void setInstanceDataBuffer( + const InstanceDataBuffer* _idb + , uint32_t _num = UINT32_MAX + ); /// Set instance data buffer for draw primitive. /// + /// @param[in] _handle Vertex buffer. + /// @param[in] _start First instance data. + /// @param[in] _num Number of data instances. + /// /// @attention C99 equivalent is `bgfx_set_instance_data_from_vertex_buffer`. /// - void setInstanceDataBuffer(VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _num); + void setInstanceDataBuffer( + VertexBufferHandle _handle + , uint32_t _start + , uint32_t _num + ); /// Set instance data buffer for draw primitive. /// + /// @param[in] _handle Vertex buffer. + /// @param[in] _start First instance data. + /// @param[in] _num Number of data instances. + /// /// @attention C99 equivalent is `bgfx_set_instance_data_from_dynamic_vertex_buffer`. /// void setInstanceDataBuffer( DynamicVertexBufferHandle _handle - , uint32_t _startVertex + , uint32_t _start , uint32_t _num ); @@ -2509,9 +3561,6 @@ namespace bgfx /// - `BGFX_TEXTURE_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic /// sampling. /// - /// @param[in] _flags Texture sampler filtering flags. UINT32_MAX use the - /// sampler filtering mode set by texture. - /// /// @attention C99 equivalent is `bgfx_set_texture`. /// void setTexture( @@ -2527,9 +3576,8 @@ namespace bgfx /// These empty draw calls will sort before ordinary draw calls. /// /// @param[in] _id View id. - /// @returns Number of draw calls. /// - uint32_t touch(uint8_t _id); + void touch(ViewId _id); /// Submit primitive for rendering. /// @@ -2538,12 +3586,11 @@ namespace bgfx /// @param[in] _depth Depth for sorting. /// @param[in] _preserveState Preserve internal draw state for next draw /// call submit. - /// @returns Number of draw calls. /// /// @attention C99 equivalent is `bgfx_submit`. /// - uint32_t submit( - uint8_t _id + void submit( + ViewId _id , ProgramHandle _program , int32_t _depth = 0 , bool _preserveState = false @@ -2557,12 +3604,11 @@ namespace bgfx /// @param[in] _depth Depth for sorting. /// @param[in] _preserveState Preserve internal draw state for next draw /// call submit. - /// @returns Number of draw calls. /// /// @attention C99 equivalent is `bgfx_submit_occlusion_query`. /// - uint32_t submit( - uint8_t _id + void submit( + ViewId _id , ProgramHandle _program , OcclusionQueryHandle _occlusionQuery , int32_t _depth = 0 @@ -2580,12 +3626,11 @@ namespace bgfx /// @param[in] _depth Depth for sorting. /// @param[in] _preserveState Preserve internal draw state for next draw /// call submit. - /// @returns Number of draw calls. /// /// @attention C99 equivalent is `bgfx_submit_indirect`. /// - uint32_t submit( - uint8_t _id + void submit( + ViewId _id , ProgramHandle _program , IndirectBufferHandle _indirectHandle , uint16_t _start = 0 @@ -2602,7 +3647,11 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_compute_index_buffer`. /// - void setBuffer(uint8_t _stage, IndexBufferHandle _handle, Access::Enum _access); + void setBuffer( + uint8_t _stage + , IndexBufferHandle _handle + , Access::Enum _access + ); /// Set compute vertex buffer. /// @@ -2612,7 +3661,11 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_compute_vertex_buffer`. /// - void setBuffer(uint8_t _stage, VertexBufferHandle _handle, Access::Enum _access); + void setBuffer( + uint8_t _stage + , VertexBufferHandle _handle + , Access::Enum _access + ); /// Set compute dynamic index buffer. /// @@ -2622,7 +3675,11 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_compute_dynamic_index_buffer`. /// - void setBuffer(uint8_t _stage, DynamicIndexBufferHandle _handle, Access::Enum _access); + void setBuffer( + uint8_t _stage + , DynamicIndexBufferHandle _handle + , Access::Enum _access + ); /// Set compute dynamic vertex buffer. /// @@ -2632,7 +3689,11 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_compute_dynamic_vertex_buffer`. /// - void setBuffer(uint8_t _stage, DynamicVertexBufferHandle _handle, Access::Enum _access); + void setBuffer( + uint8_t _stage + , DynamicVertexBufferHandle _handle + , Access::Enum _access + ); /// Set compute indirect buffer. /// @@ -2642,12 +3703,15 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_compute_indirect_buffer`. /// - void setBuffer(uint8_t _stage, IndirectBufferHandle _handle, Access::Enum _access); + void setBuffer( + uint8_t _stage + , IndirectBufferHandle _handle + , Access::Enum _access + ); /// Set compute image from texture. /// /// @param[in] _stage Texture unit. - /// @param[in] _sampler Program sampler. /// @param[in] _handle Texture handle. /// @param[in] _mip Mip level. /// @param[in] _access Texture access. See `Access::Enum`. @@ -2657,7 +3721,6 @@ namespace bgfx /// void setImage( uint8_t _stage - , UniformHandle _sampler , TextureHandle _handle , uint8_t _mip , Access::Enum _access @@ -2678,12 +3741,12 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_dispatch`. /// - uint32_t dispatch( - uint8_t _id + void dispatch( + ViewId _id , ProgramHandle _handle - , uint16_t _numX = 1 - , uint16_t _numY = 1 - , uint16_t _numZ = 1 + , uint32_t _numX = 1 + , uint32_t _numY = 1 + , uint32_t _numZ = 1 , uint8_t _flags = BGFX_SUBMIT_EYE_FIRST ); @@ -2701,8 +3764,8 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_dispatch_indirect`. /// - uint32_t dispatch( - uint8_t _id + void dispatch( + ViewId _id , ProgramHandle _handle , IndirectBufferHandle _indirectHandle , uint16_t _start = 0 @@ -2716,7 +3779,7 @@ namespace bgfx /// void discard(); - /// Blit texture 2D region between two 2D textures. + /// Blit 2D texture region between two 2D textures. /// /// @param[in] _id View id. /// @param[in] _dst Destination texture handle. @@ -2728,12 +3791,12 @@ namespace bgfx /// @param[in] _width Width of region. /// @param[in] _height Height of region. /// - /// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag. + /// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag. /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`. /// @attention C99 equivalent is `bgfx_blit`. /// void blit( - uint8_t _id + ViewId _id , TextureHandle _dst , uint16_t _dstX , uint16_t _dstY @@ -2752,26 +3815,26 @@ namespace bgfx /// @param[in] _dstX Destination texture X position. /// @param[in] _dstY Destination texture Y position. /// @param[in] _dstZ If texture is 2D this argument should be 0. If destination texture is cube - /// this argument represent destination texture cube face. For 3D texture this argument - /// represent destination texture Z position. + /// this argument represents destination texture cube face. For 3D texture this argument + /// represents destination texture Z position. /// @param[in] _src Source texture handle. /// @param[in] _srcMip Source texture mip level. /// @param[in] _srcX Source texture X position. /// @param[in] _srcY Source texture Y position. /// @param[in] _srcZ If texture is 2D this argument should be 0. If source texture is cube - /// this argument represent source texture cube face. For 3D texture this argument - /// represent source texture Z position. + /// this argument represents source texture cube face. For 3D texture this argument + /// represents source texture Z position. /// @param[in] _width Width of region. /// @param[in] _height Height of region. - /// @param[in] _depth If texture is 3D this argument represent depth of region, otherwise is + /// @param[in] _depth If texture is 3D this argument represents depth of region, otherwise it's /// unused. /// - /// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag. + /// @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag. /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`. /// @attention C99 equivalent is `bgfx_blit`. /// void blit( - uint8_t _id + ViewId _id , TextureHandle _dst , uint8_t _dstMip , uint16_t _dstX @@ -2799,7 +3862,10 @@ namespace bgfx /// @attention Frame buffer handle must be created with OS' target native window handle. /// @attention C99 equivalent is `bgfx_request_screen_shot`. /// - void requestScreenShot(FrameBufferHandle _handle, const char* _filePath); + void requestScreenShot( + FrameBufferHandle _handle + , const char* _filePath + ); } // namespace bgfx diff --git a/3rdparty/bgfx/include/bgfx/c99/bgfx.h b/3rdparty/bgfx/include/bgfx/c99/bgfx.h index 58e109e..f500993 100644 --- a/3rdparty/bgfx/include/bgfx/c99/bgfx.h +++ b/3rdparty/bgfx/include/bgfx/c99/bgfx.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE * * vim: set tabstop=4 expandtab: @@ -13,6 +13,8 @@ #include // uint32_t #include // size_t +#include + #ifndef BGFX_SHARED_LIB_BUILD # define BGFX_SHARED_LIB_BUILD 0 #endif // BGFX_SHARED_LIB_BUILD @@ -21,17 +23,21 @@ # define BGFX_SHARED_LIB_USE 0 #endif // BGFX_SHARED_LIB_USE -#if defined(_MSC_VER) -# if BGFX_SHARED_LIB_BUILD -# define BGFX_SHARED_LIB_API __declspec(dllexport) -# elif BGFX_SHARED_LIB_USE -# define BGFX_SHARED_LIB_API __declspec(dllimport) -# else -# define BGFX_SHARED_LIB_API -# endif // BGFX_SHARED_LIB_* +#if BX_PLATFORM_WINDOWS +# define BGFX_SYMBOL_EXPORT __declspec(dllexport) +# define BGFX_SYMBOL_IMPORT __declspec(dllimport) +#else +# define BGFX_SYMBOL_EXPORT __attribute__((visibility("default"))) +# define BGFX_SYMBOL_IMPORT +#endif // BX_PLATFORM_WINDOWS + +#if BGFX_SHARED_LIB_BUILD +# define BGFX_SHARED_LIB_API BGFX_SYMBOL_EXPORT +#elif BGFX_SHARED_LIB_USE +# define BGFX_SHARED_LIB_API BGFX_SYMBOL_IMPORT #else # define BGFX_SHARED_LIB_API -#endif // defined(_MSC_VER) +#endif // BGFX_SHARED_LIB_* #if defined(__cplusplus) # define BGFX_C_API extern "C" BGFX_SHARED_LIB_API @@ -75,6 +81,8 @@ typedef enum bgfx_attrib BGFX_ATTRIB_BITANGENT, BGFX_ATTRIB_COLOR0, BGFX_ATTRIB_COLOR1, + BGFX_ATTRIB_COLOR2, + BGFX_ATTRIB_COLOR3, BGFX_ATTRIB_INDICES, BGFX_ATTRIB_WEIGHT, BGFX_ATTRIB_TEXCOORD0, @@ -172,7 +180,7 @@ typedef enum bgfx_texture_format BGFX_TEXTURE_FORMAT_RGBA4, BGFX_TEXTURE_FORMAT_RGB5A1, BGFX_TEXTURE_FORMAT_RGB10A2, - BGFX_TEXTURE_FORMAT_R11G11B10F, + BGFX_TEXTURE_FORMAT_RG11B10F, BGFX_TEXTURE_FORMAT_UNKNOWN_DEPTH, @@ -255,6 +263,17 @@ typedef enum bgfx_topology_sort } bgfx_topology_sort_t; +typedef enum bgfx_view_mode +{ + BGFX_VIEW_MODE_DEFAULT, + BGFX_VIEW_MODE_SEQUENTIAL, + BGFX_VIEW_MODE_DEPTH_ASCENDING, + BGFX_VIEW_MODE_DEPTH_DESCENDING, + + BGFX_VIEW_MODE_CCOUNT + +} bgfx_view_mode_t; + #define BGFX_HANDLE_T(_name) \ typedef struct _name { uint16_t idx; } _name##_t @@ -316,16 +335,37 @@ typedef struct bgfx_hmd } bgfx_hmd_t; +/**/ +typedef uint16_t bgfx_view_id_t; + +/**/ +typedef struct bgfx_view_stats +{ + char name[256]; + bgfx_view_id_t view; + int64_t cpuTimeElapsed; + int64_t gpuTimeElapsed; + +} bgfx_view_stats_t; + +typedef struct bgfx_encoder_stats +{ + int64_t cpuTimeBegin; + int64_t cpuTimeEnd; + +} bgfx_encoder_stats_t; + /**/ typedef struct bgfx_stats { - uint64_t cpuTimeBegin; - uint64_t cpuTimeEnd; - uint64_t cpuTimerFreq; + int64_t cpuTimeFrame; + int64_t cpuTimeBegin; + int64_t cpuTimeEnd; + int64_t cpuTimerFreq; - uint64_t gpuTimeBegin; - uint64_t gpuTimeEnd; - uint64_t gpuTimerFreq; + int64_t gpuTimeBegin; + int64_t gpuTimeEnd; + int64_t gpuTimerFreq; int64_t waitRender; int64_t waitSubmit; @@ -334,13 +374,37 @@ typedef struct bgfx_stats uint32_t numCompute; uint32_t maxGpuLatency; + uint16_t numDynamicIndexBuffers; + uint16_t numDynamicVertexBuffers; + uint16_t numFrameBuffers; + uint16_t numIndexBuffers; + uint16_t numOcclusionQueries; + uint16_t numPrograms; + uint16_t numShaders; + uint16_t numTextures; + uint16_t numUniforms; + uint16_t numVertexBuffers; + uint16_t numVertexDecls; + + int64_t gpuMemoryMax; + int64_t gpuMemoryUsed; + uint16_t width; uint16_t height; uint16_t textWidth; uint16_t textHeight; + uint16_t numViews; + bgfx_view_stats_t* viewStats; + + uint8_t numEncoders; + bgfx_encoder_stats_t* encoderStats; + } bgfx_stats_t; +/**/ +struct bgfx_encoder; + /**/ typedef struct bgfx_vertex_decl { @@ -446,6 +510,7 @@ typedef struct bgfx_caps_limits uint32_t maxDynamicVertexBuffers; uint32_t maxUniforms; uint32_t maxOcclusionQueries; + uint32_t maxEncoders; } bgfx_caps_limits_t; @@ -494,6 +559,9 @@ typedef struct bgfx_callback_vtbl { void (*fatal)(bgfx_callback_interface_t* _this, bgfx_fatal_t _code, const char* _str); void (*trace_vargs)(bgfx_callback_interface_t* _this, const char* _filePath, uint16_t _line, const char* _format, va_list _argList); + void (*profiler_begin)(bgfx_callback_interface_t* _this, const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line); + void (*profiler_begin_literal)(bgfx_callback_interface_t* _this, const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line); + void (*profiler_end)(bgfx_callback_interface_t* _this); uint32_t (*cache_read_size)(bgfx_callback_interface_t* _this, uint64_t _id); bool (*cache_read)(bgfx_callback_interface_t* _this, uint64_t _id, void* _data, uint32_t _size); void (*cache_write)(bgfx_callback_interface_t* _this, uint64_t _id, const void* _data, uint32_t _size); @@ -558,25 +626,31 @@ BGFX_C_API const char* bgfx_get_renderer_name(bgfx_renderer_type_t _type); BGFX_C_API bool bgfx_init(bgfx_renderer_type_t _type, uint16_t _vendorId, uint16_t _deviceId, bgfx_callback_interface_t* _callback, bgfx_allocator_interface_t* _allocator); /**/ -BGFX_C_API void bgfx_shutdown(); +BGFX_C_API void bgfx_shutdown(void); /**/ BGFX_C_API void bgfx_reset(uint32_t _width, uint32_t _height, uint32_t _flags); +/**/ +BGFX_C_API struct bgfx_encoder* bgfx_begin(void); + +/**/ +BGFX_C_API void bgfx_end(struct bgfx_encoder* _encoder); + /**/ BGFX_C_API uint32_t bgfx_frame(bool _capture); /**/ -BGFX_C_API bgfx_renderer_type_t bgfx_get_renderer_type(); +BGFX_C_API bgfx_renderer_type_t bgfx_get_renderer_type(void); /**/ -BGFX_C_API const bgfx_caps_t* bgfx_get_caps(); +BGFX_C_API const bgfx_caps_t* bgfx_get_caps(void); /**/ -BGFX_C_API const bgfx_hmd_t* bgfx_get_hmd(); +BGFX_C_API const bgfx_hmd_t* bgfx_get_hmd(void); /**/ -BGFX_C_API const bgfx_stats_t* bgfx_get_stats(); +BGFX_C_API const bgfx_stats_t* bgfx_get_stats(void); /**/ BGFX_C_API const bgfx_memory_t* bgfx_alloc(uint32_t _size); @@ -660,7 +734,7 @@ BGFX_C_API void bgfx_alloc_transient_vertex_buffer(bgfx_transient_vertex_buffer_ BGFX_C_API bool bgfx_alloc_transient_buffers(bgfx_transient_vertex_buffer_t* _tvb, const bgfx_vertex_decl_t* _decl, uint32_t _numVertices, bgfx_transient_index_buffer_t* _tib, uint32_t _numIndices); /**/ -BGFX_C_API const bgfx_instance_data_buffer_t* bgfx_alloc_instance_data_buffer(uint32_t _num, uint16_t _stride); +BGFX_C_API void bgfx_alloc_instance_data_buffer(bgfx_instance_data_buffer_t* _idb, uint32_t _num, uint16_t _stride); /**/ BGFX_C_API bgfx_indirect_buffer_handle_t bgfx_create_indirect_buffer(uint32_t _num); @@ -677,6 +751,9 @@ BGFX_C_API uint16_t bgfx_get_shader_uniforms(bgfx_shader_handle_t _handle, bgfx_ /**/ BGFX_C_API void bgfx_get_uniform_info(bgfx_uniform_handle_t _handle, bgfx_uniform_info_t* _info); +/**/ +BGFX_C_API void bgfx_set_shader_name(bgfx_shader_handle_t _handle, const char* _name); + /**/ BGFX_C_API void bgfx_destroy_shader(bgfx_shader_handle_t _handle); @@ -722,6 +799,9 @@ BGFX_C_API void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, uint16_t /**/ BGFX_C_API uint32_t bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data, uint8_t _mip); +/**/ +BGFX_C_API void bgfx_set_texture_name(bgfx_texture_handle_t _handle, const char* _name); + /**/ BGFX_C_API void bgfx_destroy_texture(bgfx_texture_handle_t _handle); @@ -753,7 +833,7 @@ BGFX_C_API bgfx_uniform_handle_t bgfx_create_uniform(const char* _name, bgfx_uni BGFX_C_API void bgfx_destroy_uniform(bgfx_uniform_handle_t _handle); /**/ -BGFX_C_API bgfx_occlusion_query_handle_t bgfx_create_occlusion_query(); +BGFX_C_API bgfx_occlusion_query_handle_t bgfx_create_occlusion_query(void); /**/ BGFX_C_API bgfx_occlusion_query_result_t bgfx_get_result(bgfx_occlusion_query_handle_t _handle, int32_t* _result); @@ -765,40 +845,40 @@ BGFX_C_API void bgfx_destroy_occlusion_query(bgfx_occlusion_query_handle_t _hand BGFX_C_API void bgfx_set_palette_color(uint8_t _index, const float _rgba[4]); /**/ -BGFX_C_API void bgfx_set_view_name(uint8_t _id, const char* _name); +BGFX_C_API void bgfx_set_view_name(bgfx_view_id_t _id, const char* _name); /**/ -BGFX_C_API void bgfx_set_view_rect(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); +BGFX_C_API void bgfx_set_view_rect(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); /**/ -BGFX_C_API void bgfx_set_view_rect_auto(uint8_t _id, uint16_t _x, uint16_t _y, bgfx_backbuffer_ratio_t _ratio); +BGFX_C_API void bgfx_set_view_rect_auto(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, bgfx_backbuffer_ratio_t _ratio); /**/ -BGFX_C_API void bgfx_set_view_scissor(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); +BGFX_C_API void bgfx_set_view_scissor(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); /**/ -BGFX_C_API void bgfx_set_view_clear(uint8_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil); +BGFX_C_API void bgfx_set_view_clear(bgfx_view_id_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil); /**/ -BGFX_C_API void bgfx_set_view_clear_mrt(uint8_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7); +BGFX_C_API void bgfx_set_view_clear_mrt(bgfx_view_id_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7); /**/ -BGFX_C_API void bgfx_set_view_seq(uint8_t _id, bool _enabled); +BGFX_C_API void bgfx_set_view_mode(bgfx_view_id_t _id, bgfx_view_mode_t _mode); /**/ -BGFX_C_API void bgfx_set_view_frame_buffer(uint8_t _id, bgfx_frame_buffer_handle_t _handle); +BGFX_C_API void bgfx_set_view_frame_buffer(bgfx_view_id_t _id, bgfx_frame_buffer_handle_t _handle); /**/ -BGFX_C_API void bgfx_set_view_transform(uint8_t _id, const void* _view, const void* _proj); +BGFX_C_API void bgfx_set_view_transform(bgfx_view_id_t _id, const void* _view, const void* _proj); /**/ -BGFX_C_API void bgfx_set_view_transform_stereo(uint8_t _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR); +BGFX_C_API void bgfx_set_view_transform_stereo(bgfx_view_id_t _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR); /**/ -BGFX_C_API void bgfx_set_view_order(uint8_t _id, uint8_t _num, const void* _order); +BGFX_C_API void bgfx_set_view_order(bgfx_view_id_t _id, uint16_t _num, const bgfx_view_id_t* _order); /**/ -BGFX_C_API void bgfx_reset_view(uint8_t _id); +BGFX_C_API void bgfx_reset_view(bgfx_view_id_t _id); /**/ BGFX_C_API void bgfx_set_marker(const char* _marker); @@ -840,13 +920,13 @@ BGFX_C_API void bgfx_set_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t BGFX_C_API void bgfx_set_transient_index_buffer(const bgfx_transient_index_buffer_t* _tib, uint32_t _firstIndex, uint32_t _numIndices); /**/ -BGFX_C_API void bgfx_set_vertex_buffer(bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); +BGFX_C_API void bgfx_set_vertex_buffer(uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); /**/ -BGFX_C_API void bgfx_set_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); +BGFX_C_API void bgfx_set_dynamic_vertex_buffer(uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); /**/ -BGFX_C_API void bgfx_set_transient_vertex_buffer(const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices); +BGFX_C_API void bgfx_set_transient_vertex_buffer(uint8_t _stream, const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices); /**/ BGFX_C_API void bgfx_set_instance_data_buffer(const bgfx_instance_data_buffer_t* _idb, uint32_t _num); @@ -861,19 +941,19 @@ BGFX_C_API void bgfx_set_instance_data_from_dynamic_vertex_buffer(bgfx_dynamic_v BGFX_C_API void bgfx_set_texture(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags); /**/ -BGFX_C_API uint32_t bgfx_touch(uint8_t _id); +BGFX_C_API void bgfx_touch(bgfx_view_id_t _id); /**/ -BGFX_C_API uint32_t bgfx_submit(uint8_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState); +BGFX_C_API void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState); /**/ -BGFX_C_API uint32_t bgfx_submit_occlusion_query(uint8_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState); +BGFX_C_API void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState); /**/ -BGFX_C_API uint32_t bgfx_submit_indirect(uint8_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState); +BGFX_C_API void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState); /**/ -BGFX_C_API void bgfx_set_image(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format); +BGFX_C_API void bgfx_set_image(uint8_t _stage, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format); /**/ BGFX_C_API void bgfx_set_compute_index_buffer(uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access); @@ -891,16 +971,118 @@ BGFX_C_API void bgfx_set_compute_dynamic_vertex_buffer(uint8_t _stage, bgfx_dyna BGFX_C_API void bgfx_set_compute_indirect_buffer(uint8_t _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access); /**/ -BGFX_C_API uint32_t bgfx_dispatch(uint8_t _id, bgfx_program_handle_t _handle, uint16_t _numX, uint16_t _numY, uint16_t _numZ, uint8_t _flags); +BGFX_C_API void bgfx_dispatch(bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ, uint8_t _flags); /**/ -BGFX_C_API uint32_t bgfx_dispatch_indirect(uint8_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags); +BGFX_C_API void bgfx_dispatch_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags); /**/ -BGFX_C_API void bgfx_discard(); +BGFX_C_API void bgfx_discard(void); /**/ -BGFX_C_API void bgfx_blit(uint8_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); +BGFX_C_API void bgfx_blit(bgfx_view_id_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); + +/**/ +BGFX_C_API void bgfx_encoder_set_marker(struct bgfx_encoder* _encoder, const char* _marker); + +/**/ +BGFX_C_API void bgfx_encoder_set_state(struct bgfx_encoder* _encoder, uint64_t _state, uint32_t _rgba); + +/**/ +BGFX_C_API void bgfx_encoder_set_condition(struct bgfx_encoder* _encoder, bgfx_occlusion_query_handle_t _handle, bool _visible); + +/**/ +BGFX_C_API void bgfx_encoder_set_stencil(struct bgfx_encoder* _encoder, uint32_t _fstencil, uint32_t _bstencil); + +/**/ +BGFX_C_API uint16_t bgfx_encoder_set_scissor(struct bgfx_encoder* _encoder, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); + +/**/ +BGFX_C_API void bgfx_encoder_set_scissor_cached(struct bgfx_encoder* _encoder, uint16_t _cache); + +/**/ +BGFX_C_API uint32_t bgfx_encoder_set_transform(struct bgfx_encoder* _encoder, const void* _mtx, uint16_t _num); + +/**/ +BGFX_C_API uint32_t bgfx_encoder_alloc_transform(struct bgfx_encoder* _encoder, bgfx_transform_t* _transform, uint16_t _num); + +/**/ +BGFX_C_API void bgfx_encoder_set_transform_cached(struct bgfx_encoder* _encoder, uint32_t _cache, uint16_t _num); + +/**/ +BGFX_C_API void bgfx_encoder_set_uniform(struct bgfx_encoder* _encoder, bgfx_uniform_handle_t _handle, const void* _value, uint16_t _num); + +/**/ +BGFX_C_API void bgfx_encoder_set_index_buffer(struct bgfx_encoder* _encoder, bgfx_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices); + +/**/ +BGFX_C_API void bgfx_encoder_set_dynamic_index_buffer(struct bgfx_encoder* _encoder, bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices); + +/**/ +BGFX_C_API void bgfx_encoder_set_transient_index_buffer(struct bgfx_encoder* _encoder, const bgfx_transient_index_buffer_t* _tib, uint32_t _firstIndex, uint32_t _numIndices); + +/**/ +BGFX_C_API void bgfx_encoder_set_vertex_buffer(struct bgfx_encoder* _encoder, uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); + +/**/ +BGFX_C_API void bgfx_encoder_set_dynamic_vertex_buffer(struct bgfx_encoder* _encoder, uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); + +/**/ +BGFX_C_API void bgfx_encoder_set_transient_vertex_buffer(struct bgfx_encoder* _encoder, uint8_t _stream, const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices); + +/**/ +BGFX_C_API void bgfx_encoder_set_instance_data_buffer(struct bgfx_encoder* _encoder, const bgfx_instance_data_buffer_t* _idb, uint32_t _num); + +/**/ +BGFX_C_API void bgfx_encoder_set_instance_data_from_vertex_buffer(struct bgfx_encoder* _encoder, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num); + +/**/ +BGFX_C_API void bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(struct bgfx_encoder* _encoder, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num); + +/**/ +BGFX_C_API void bgfx_encoder_set_texture(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags); + +/**/ +BGFX_C_API void bgfx_encoder_touch(struct bgfx_encoder* _encoder, bgfx_view_id_t _id); + +/**/ +BGFX_C_API void bgfx_encoder_submit(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState); + +/**/ +BGFX_C_API void bgfx_encoder_submit_occlusion_query(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState); + +/**/ +BGFX_C_API void bgfx_encoder_submit_indirect(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState); + +/**/ +BGFX_C_API void bgfx_encoder_set_image(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format); + +/**/ +BGFX_C_API void bgfx_encoder_set_compute_index_buffer(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access); + +/**/ +BGFX_C_API void bgfx_encoder_set_compute_vertex_buffer(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access); + +/**/ +BGFX_C_API void bgfx_encoder_set_compute_dynamic_index_buffer(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access); + +/**/ +BGFX_C_API void bgfx_encoder_set_compute_dynamic_vertex_buffer(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access); + +/**/ +BGFX_C_API void bgfx_encoder_set_compute_indirect_buffer(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access); + +/**/ +BGFX_C_API void bgfx_encoder_dispatch(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ, uint8_t _flags); + +/**/ +BGFX_C_API void bgfx_encoder_dispatch_indirect(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags); + +/**/ +BGFX_C_API void bgfx_encoder_discard(struct bgfx_encoder* _encoder); + +/**/ +BGFX_C_API void bgfx_encoder_blit(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); /**/ BGFX_C_API void bgfx_request_screen_shot(bgfx_frame_buffer_handle_t _handle, const char* _filePath); diff --git a/3rdparty/bgfx/include/bgfx/c99/platform.h b/3rdparty/bgfx/include/bgfx/c99/platform.h index e734fdf..420ae27 100644 --- a/3rdparty/bgfx/include/bgfx/c99/platform.h +++ b/3rdparty/bgfx/include/bgfx/c99/platform.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE * * vim: set tabstop=4 expandtab: @@ -31,7 +31,7 @@ typedef enum bgfx_render_frame * allow creating separate rendering thread. If it is called before * to bgfx_init, render thread won't be created by bgfx_init call. */ -BGFX_C_API bgfx_render_frame_t bgfx_render_frame(); +BGFX_C_API bgfx_render_frame_t bgfx_render_frame(int32_t _msecs); typedef struct bgfx_platform_data { @@ -47,7 +47,7 @@ typedef struct bgfx_platform_data /**/ BGFX_C_API void bgfx_set_platform_data(const bgfx_platform_data_t* _data); -typedef struct bgfx_internal_data +typedef struct bgfx_internal_datauint8_t { const struct bgfx_caps* caps; void* context; @@ -66,7 +66,7 @@ BGFX_C_API uintptr_t bgfx_override_internal_texture(bgfx_texture_handle_t _handl /**/ typedef struct bgfx_interface_vtbl { - bgfx_render_frame_t (*render_frame)(); + bgfx_render_frame_t (*render_frame)(int32_t _msecs); void (*set_platform_data)(const bgfx_platform_data_t* _data); const bgfx_internal_data_t* (*get_internal_data)(); uintptr_t (*override_internal_texture_ptr)(bgfx_texture_handle_t _handle, uintptr_t _ptr); @@ -118,11 +118,12 @@ typedef struct bgfx_interface_vtbl void (*alloc_transient_index_buffer)(bgfx_transient_index_buffer_t* _tib, uint32_t _num); void (*alloc_transient_vertex_buffer)(bgfx_transient_vertex_buffer_t* _tvb, uint32_t _num, const bgfx_vertex_decl_t* _decl); bool (*alloc_transient_buffers)(bgfx_transient_vertex_buffer_t* _tvb, const bgfx_vertex_decl_t* _decl, uint32_t _numVertices, bgfx_transient_index_buffer_t* _tib, uint32_t _numIndices); - const bgfx_instance_data_buffer_t* (*alloc_instance_data_buffer)(uint32_t _num, uint16_t _stride); + void (*alloc_instance_data_buffer)(bgfx_instance_data_buffer_t* _idb, uint32_t _num, uint16_t _stride); bgfx_indirect_buffer_handle_t (*create_indirect_buffer)(uint32_t _num); void (*destroy_indirect_buffer)(bgfx_indirect_buffer_handle_t _handle); bgfx_shader_handle_t (*create_shader)(const bgfx_memory_t* _mem); uint16_t (*get_shader_uniforms)(bgfx_shader_handle_t _handle, bgfx_uniform_handle_t* _uniforms, uint16_t _max); + void (*set_shader_name)(bgfx_shader_handle_t _handle, const char* _name); void (*destroy_shader)(bgfx_shader_handle_t _handle); bgfx_program_handle_t (*create_program)(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders); bgfx_program_handle_t (*create_compute_program)(bgfx_shader_handle_t _csh, bool _destroyShaders); @@ -138,6 +139,8 @@ typedef struct bgfx_interface_vtbl void (*update_texture_3d)(bgfx_texture_handle_t _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t* _mem); void (*update_texture_cube)(bgfx_texture_handle_t _handle, uint16_t _layer, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t* _mem, uint16_t _pitch); uint32_t (*read_texture)(bgfx_texture_handle_t _handle, void* _data, uint8_t _mip); + void (*set_texture_name)(bgfx_texture_handle_t _handle, const char* _name); + void* (*get_direct_access_ptr)(bgfx_texture_handle_t _handle); void (*destroy_texture)(bgfx_texture_handle_t _handle); bgfx_frame_buffer_handle_t (*create_frame_buffer)(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint32_t _textureFlags); bgfx_frame_buffer_handle_t (*create_frame_buffer_scaled)(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, uint32_t _textureFlags); @@ -152,50 +155,50 @@ typedef struct bgfx_interface_vtbl bgfx_occlusion_query_result_t (*get_result)(bgfx_occlusion_query_handle_t _handle, int32_t* _result); void (*destroy_occlusion_query)(bgfx_occlusion_query_handle_t _handle); void (*set_palette_color)(uint8_t _index, const float _rgba[4]); - void (*set_view_name)(uint8_t _id, const char* _name); - void (*set_view_rect)(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); - void (*set_view_scissor)(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); - void (*set_view_clear)(uint8_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil); - void (*set_view_clear_mrt)(uint8_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7); - void (*set_view_seq)(uint8_t _id, bool _enabled); - void (*set_view_frame_buffer)(uint8_t _id, bgfx_frame_buffer_handle_t _handle); - void (*set_view_transform)(uint8_t _id, const void* _view, const void* _proj); - void (*set_view_transform_stereo)(uint8_t _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR); - void (*set_view_order)(uint8_t _id, uint8_t _num, const void* _order); - void (*set_marker)(const char* _marker); - void (*set_state)(uint64_t _state, uint32_t _rgba); - void (*set_condition)(bgfx_occlusion_query_handle_t _handle, bool _visible); - void (*set_stencil)(uint32_t _fstencil, uint32_t _bstencil); - uint16_t (*set_scissor)(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); - void (*set_scissor_cached)(uint16_t _cache); - uint32_t (*set_transform)(const void* _mtx, uint16_t _num); - uint32_t (*alloc_transform)(bgfx_transform_t* _transform, uint16_t _num); - void (*set_transform_cached)(uint32_t _cache, uint16_t _num); - void (*set_uniform)(bgfx_uniform_handle_t _handle, const void* _value, uint16_t _num); - void (*set_index_buffer)(bgfx_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices); - void (*set_dynamic_index_buffer)(bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices); - void (*set_transient_index_buffer)(const bgfx_transient_index_buffer_t* _tib, uint32_t _firstIndex, uint32_t _numIndices); - void (*set_vertex_buffer)(bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); - void (*set_dynamic_vertex_buffer)(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); - void (*set_transient_vertex_buffer)(const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices); - void (*set_instance_data_buffer)(const bgfx_instance_data_buffer_t* _idb, uint32_t _num); - void (*set_instance_data_from_vertex_buffer)(bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num); - void (*set_instance_data_from_dynamic_vertex_buffer)(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num); - void (*set_texture)(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags); - uint32_t (*touch)(uint8_t _id); - uint32_t (*submit)(uint8_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState); - uint32_t (*submit_occlusion_query)(uint8_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState); - uint32_t (*submit_indirect)(uint8_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState); - void (*set_image)(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format); - void (*set_compute_index_buffer)(uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access); - void (*set_compute_vertex_buffer)(uint8_t _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access); - void (*set_compute_dynamic_index_buffer)(uint8_t _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access); - void (*set_compute_dynamic_vertex_buffer)(uint8_t _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access); - void (*set_compute_indirect_buffer)(uint8_t _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access); - uint32_t (*dispatch)(uint8_t _id, bgfx_program_handle_t _handle, uint16_t _numX, uint16_t _numY, uint16_t _numZ, uint8_t _flags); - uint32_t (*dispatch_indirect)(uint8_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags); - void (*discard)(); - void (*blit)(uint8_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); + void (*set_view_name)(bgfx_view_id_t _id, const char* _name); + void (*set_view_rect)(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); + void (*set_view_scissor)(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); + void (*set_view_clear)(bgfx_view_id_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil); + void (*set_view_clear_mrt)(bgfx_view_id_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7); + void (*set_view_mode)(bgfx_view_id_t _id, bgfx_view_mode_t _mode); + void (*set_view_frame_buffer)(bgfx_view_id_t _id, bgfx_frame_buffer_handle_t _handle); + void (*set_view_transform)(bgfx_view_id_t _id, const void* _view, const void* _proj); + void (*set_view_transform_stereo)(bgfx_view_id_t _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR); + void (*set_view_order)(bgfx_view_id_t _id, uint16_t _num, const bgfx_view_id_t* _order); + void (*encoder_set_marker)(struct bgfx_encoder* _encoder, const char* _marker); + void (*encoder_set_state)(struct bgfx_encoder* _encoder, uint64_t _state, uint32_t _rgba); + void (*encoder_set_condition)(struct bgfx_encoder* _encoder, bgfx_occlusion_query_handle_t _handle, bool _visible); + void (*encoder_set_stencil)(struct bgfx_encoder* _encoder, uint32_t _fstencil, uint32_t _bstencil); + uint16_t (*encoder_set_scissor)(struct bgfx_encoder* _encoder, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); + void (*encoder_set_scissor_cached)(struct bgfx_encoder* _encoder, uint16_t _cache); + uint32_t (*encoder_set_transform)(struct bgfx_encoder* _encoder, const void* _mtx, uint16_t _num); + uint32_t (*encoder_alloc_transform)(struct bgfx_encoder* _encoder, bgfx_transform_t* _transform, uint16_t _num); + void (*encoder_set_transform_cached)(struct bgfx_encoder* _encoder, uint32_t _cache, uint16_t _num); + void (*encoder_set_uniform)(struct bgfx_encoder* _encoder, bgfx_uniform_handle_t _handle, const void* _value, uint16_t _num); + void (*encoder_set_index_buffer)(struct bgfx_encoder* _encoder, bgfx_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices); + void (*encoder_set_dynamic_index_buffer)(struct bgfx_encoder* _encoder, bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices); + void (*encoder_set_transient_index_buffer)(struct bgfx_encoder* _encoder, const bgfx_transient_index_buffer_t* _tib, uint32_t _firstIndex, uint32_t _numIndices); + void (*encoder_set_vertex_buffer)(struct bgfx_encoder* _encoder, uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); + void (*encoder_set_dynamic_vertex_buffer)(struct bgfx_encoder* _encoder, uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); + void (*encoder_set_transient_vertex_buffer)(struct bgfx_encoder* _encoder, uint8_t _stream, const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices); + void (*encoder_set_instance_data_buffer)(struct bgfx_encoder* _encoder, const bgfx_instance_data_buffer_t* _idb, uint32_t _num); + void (*encoder_set_instance_data_from_vertex_buffer)(struct bgfx_encoder* _encoder, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num); + void (*encoder_set_instance_data_from_dynamic_vertex_buffer)(struct bgfx_encoder* _encoder, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num); + void (*encoder_set_texture)(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags); + void (*encoder_touch)(struct bgfx_encoder* _encoder, bgfx_view_id_t _id); + void (*encoder_submit)(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState); + void (*encoder_submit_occlusion_query)(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState); + void (*encoder_submit_indirect)(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState); + void (*encoder_set_image)(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format); + void (*encoder_set_compute_index_buffer)(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access); + void (*encoder_set_compute_vertex_buffer)(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access); + void (*encoder_set_compute_dynamic_index_buffer)(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access); + void (*encoder_set_compute_dynamic_vertex_buffer)(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access); + void (*encoder_set_compute_indirect_buffer)(struct bgfx_encoder* _encoder, uint8_t _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access); + void (*encoder_dispatch)(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ, uint8_t _flags); + void (*encoder_dispatch_indirect)(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags); + void (*encoder_discard)(struct bgfx_encoder* _encoder); + void (*encoder_blit)(struct bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); void (*request_screen_shot)(bgfx_frame_buffer_handle_t _handle, const char* _filePath); } bgfx_interface_vtbl_t; diff --git a/3rdparty/bgfx/include/bgfx/defines.h b/3rdparty/bgfx/include/bgfx/defines.h index ae459cf..0c2306a 100644 --- a/3rdparty/bgfx/include/bgfx/defines.h +++ b/3rdparty/bgfx/include/bgfx/defines.h @@ -1,22 +1,23 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #ifndef BGFX_DEFINES_H_HEADER_GUARD #define BGFX_DEFINES_H_HEADER_GUARD -#define BGFX_API_VERSION UINT32_C(40) +#define BGFX_API_VERSION UINT32_C(60) -/// +/// Color RGB/alpha/depth write. When it's not specified write will be disabled. #define BGFX_STATE_RGB_WRITE UINT64_C(0x0000000000000001) //!< Enable RGB write. #define BGFX_STATE_ALPHA_WRITE UINT64_C(0x0000000000000002) //!< Enable alpha write. #define BGFX_STATE_DEPTH_WRITE UINT64_C(0x0000000000000004) //!< Enable depth write. +/// Depth test state. When `BGFX_STATE_DEPTH_` is not specified depth test will be disabled. #define BGFX_STATE_DEPTH_TEST_LESS UINT64_C(0x0000000000000010) //!< Enable depth test, less. -#define BGFX_STATE_DEPTH_TEST_LEQUAL UINT64_C(0x0000000000000020) //!< Enable depth test, less equal. +#define BGFX_STATE_DEPTH_TEST_LEQUAL UINT64_C(0x0000000000000020) //!< Enable depth test, less or equal. #define BGFX_STATE_DEPTH_TEST_EQUAL UINT64_C(0x0000000000000030) //!< Enable depth test, equal. -#define BGFX_STATE_DEPTH_TEST_GEQUAL UINT64_C(0x0000000000000040) //!< Enable depth test, greater equal. +#define BGFX_STATE_DEPTH_TEST_GEQUAL UINT64_C(0x0000000000000040) //!< Enable depth test, greater or equal. #define BGFX_STATE_DEPTH_TEST_GREATER UINT64_C(0x0000000000000050) //!< Enable depth test, greater. #define BGFX_STATE_DEPTH_TEST_NOTEQUAL UINT64_C(0x0000000000000060) //!< Enable depth test, not equal. #define BGFX_STATE_DEPTH_TEST_NEVER UINT64_C(0x0000000000000070) //!< Enable depth test, never. @@ -24,33 +25,38 @@ #define BGFX_STATE_DEPTH_TEST_SHIFT 4 //!< Depth test state bit shift. #define BGFX_STATE_DEPTH_TEST_MASK UINT64_C(0x00000000000000f0) //!< Depth test state bit mask. -#define BGFX_STATE_BLEND_ZERO UINT64_C(0x0000000000001000) //!< -#define BGFX_STATE_BLEND_ONE UINT64_C(0x0000000000002000) //!< -#define BGFX_STATE_BLEND_SRC_COLOR UINT64_C(0x0000000000003000) //!< -#define BGFX_STATE_BLEND_INV_SRC_COLOR UINT64_C(0x0000000000004000) //!< -#define BGFX_STATE_BLEND_SRC_ALPHA UINT64_C(0x0000000000005000) //!< -#define BGFX_STATE_BLEND_INV_SRC_ALPHA UINT64_C(0x0000000000006000) //!< -#define BGFX_STATE_BLEND_DST_ALPHA UINT64_C(0x0000000000007000) //!< -#define BGFX_STATE_BLEND_INV_DST_ALPHA UINT64_C(0x0000000000008000) //!< -#define BGFX_STATE_BLEND_DST_COLOR UINT64_C(0x0000000000009000) //!< -#define BGFX_STATE_BLEND_INV_DST_COLOR UINT64_C(0x000000000000a000) //!< -#define BGFX_STATE_BLEND_SRC_ALPHA_SAT UINT64_C(0x000000000000b000) //!< -#define BGFX_STATE_BLEND_FACTOR UINT64_C(0x000000000000c000) //!< -#define BGFX_STATE_BLEND_INV_FACTOR UINT64_C(0x000000000000d000) //!< +/// Use BGFX_STATE_BLEND_FUNC(_src, _dst) or BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA) +/// helper macros. +#define BGFX_STATE_BLEND_ZERO UINT64_C(0x0000000000001000) //!< 0, 0, 0, 0 +#define BGFX_STATE_BLEND_ONE UINT64_C(0x0000000000002000) //!< 1, 1, 1, 1 +#define BGFX_STATE_BLEND_SRC_COLOR UINT64_C(0x0000000000003000) //!< Rs, Gs, Bs, As +#define BGFX_STATE_BLEND_INV_SRC_COLOR UINT64_C(0x0000000000004000) //!< 1-Rs, 1-Gs, 1-Bs, 1-As +#define BGFX_STATE_BLEND_SRC_ALPHA UINT64_C(0x0000000000005000) //!< As, As, As, As +#define BGFX_STATE_BLEND_INV_SRC_ALPHA UINT64_C(0x0000000000006000) //!< 1-As, 1-As, 1-As, 1-As +#define BGFX_STATE_BLEND_DST_ALPHA UINT64_C(0x0000000000007000) //!< Ad, Ad, Ad, Ad +#define BGFX_STATE_BLEND_INV_DST_ALPHA UINT64_C(0x0000000000008000) //!< 1-Ad, 1-Ad, 1-Ad ,1-Ad +#define BGFX_STATE_BLEND_DST_COLOR UINT64_C(0x0000000000009000) //!< Rd, Gd, Bd, Ad +#define BGFX_STATE_BLEND_INV_DST_COLOR UINT64_C(0x000000000000a000) //!< 1-Rd, 1-Gd, 1-Bd, 1-Ad +#define BGFX_STATE_BLEND_SRC_ALPHA_SAT UINT64_C(0x000000000000b000) //!< f, f, f, 1; f = min(As, 1-Ad) +#define BGFX_STATE_BLEND_FACTOR UINT64_C(0x000000000000c000) //!< Blend factor +#define BGFX_STATE_BLEND_INV_FACTOR UINT64_C(0x000000000000d000) //!< 1-Blend factor #define BGFX_STATE_BLEND_SHIFT 12 //!< Blend state bit shift. #define BGFX_STATE_BLEND_MASK UINT64_C(0x000000000ffff000) //!< Blend state bit mask. -#define BGFX_STATE_BLEND_EQUATION_ADD UINT64_C(0x0000000000000000) //!< -#define BGFX_STATE_BLEND_EQUATION_SUB UINT64_C(0x0000000010000000) //!< -#define BGFX_STATE_BLEND_EQUATION_REVSUB UINT64_C(0x0000000020000000) //!< -#define BGFX_STATE_BLEND_EQUATION_MIN UINT64_C(0x0000000030000000) //!< -#define BGFX_STATE_BLEND_EQUATION_MAX UINT64_C(0x0000000040000000) //!< +/// Use BGFX_STATE_BLEND_EQUATION(_equation) or BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA) +/// helper macros. +#define BGFX_STATE_BLEND_EQUATION_ADD UINT64_C(0x0000000000000000) //!< Blend add: src + dst. +#define BGFX_STATE_BLEND_EQUATION_SUB UINT64_C(0x0000000010000000) //!< Blend subtract: src - dst. +#define BGFX_STATE_BLEND_EQUATION_REVSUB UINT64_C(0x0000000020000000) //!< Blend reverse subtract: dst - src. +#define BGFX_STATE_BLEND_EQUATION_MIN UINT64_C(0x0000000030000000) //!< Blend min: min(src, dst). +#define BGFX_STATE_BLEND_EQUATION_MAX UINT64_C(0x0000000040000000) //!< Blend max: max(src, dst). #define BGFX_STATE_BLEND_EQUATION_SHIFT 28 //!< Blend equation bit shift. #define BGFX_STATE_BLEND_EQUATION_MASK UINT64_C(0x00000003f0000000) //!< Blend equation bit mask. #define BGFX_STATE_BLEND_INDEPENDENT UINT64_C(0x0000000400000000) //!< Enable blend independent. #define BGFX_STATE_BLEND_ALPHA_TO_COVERAGE UINT64_C(0x0000000800000000) //!< Enable alpha to coverage. +/// Cull state. When `BGFX_STATE_CULL_*` is not specified culling will be disabled. #define BGFX_STATE_CULL_CW UINT64_C(0x0000001000000000) //!< Cull clockwise triangles. #define BGFX_STATE_CULL_CCW UINT64_C(0x0000002000000000) //!< Cull counter-clockwise triangles. #define BGFX_STATE_CULL_SHIFT 36 //!< Culling mode bit shift. @@ -67,11 +73,12 @@ #define BGFX_STATE_PT_SHIFT 48 //!< Primitive type bit shift. #define BGFX_STATE_PT_MASK UINT64_C(0x0007000000000000) //!< Primitive type bit mask. +/// See BGFX_STATE_POINT_SIZE(_size) helper macro. #define BGFX_STATE_POINT_SIZE_SHIFT 52 //!< Point size bit shift. #define BGFX_STATE_POINT_SIZE_MASK UINT64_C(0x00f0000000000000) //!< Point size bit mask. -/// Enable MSAA write when writing into MSAA frame buffer. This flag is ignored when not writing into -/// MSAA frame buffer. +/// Enable MSAA write when writing into MSAA frame buffer. +/// This flag is ignored when not writing into MSAA frame buffer. #define BGFX_STATE_MSAA UINT64_C(0x0100000000000000) //!< Enable MSAA rasterization. #define BGFX_STATE_LINEAA UINT64_C(0x0200000000000000) //!< Enable line AA rasterization. #define BGFX_STATE_CONSERVATIVE_RASTER UINT64_C(0x0400000000000000) //!< Enable conservative rasterization. @@ -80,55 +87,96 @@ #define BGFX_STATE_RESERVED_SHIFT 61 //!< Internal bits shift. #define BGFX_STATE_RESERVED_MASK UINT64_C(0xe000000000000000) //!< Internal bits mask. -/// See BGFX_STATE_POINT_SIZE(_size) helper macro. #define BGFX_STATE_NONE UINT64_C(0x0000000000000000) //!< No state. #define BGFX_STATE_MASK UINT64_C(0xffffffffffffffff) //!< State mask. /// Default state is write to RGB, alpha, and depth with depth test less enabled, with clockwise /// culling and MSAA (when writing into MSAA frame buffer, otherwise this flag is ignored). -#define BGFX_STATE_DEFAULT (0 \ - | BGFX_STATE_RGB_WRITE \ - | BGFX_STATE_ALPHA_WRITE \ - | BGFX_STATE_DEPTH_TEST_LESS \ - | BGFX_STATE_DEPTH_WRITE \ - | BGFX_STATE_CULL_CW \ - | BGFX_STATE_MSAA \ - ) +#define BGFX_STATE_DEFAULT (0 \ + | BGFX_STATE_RGB_WRITE \ + | BGFX_STATE_ALPHA_WRITE \ + | BGFX_STATE_DEPTH_TEST_LESS \ + | BGFX_STATE_DEPTH_WRITE \ + | BGFX_STATE_CULL_CW \ + | BGFX_STATE_MSAA \ + ) +/// Alpha reference value. #define BGFX_STATE_ALPHA_REF(_ref) ( ( (uint64_t)(_ref )<>BGFX_STATE_BLEND_SHIFT) \ - | ( uint32_t( (_dst)>>BGFX_STATE_BLEND_SHIFT)<<4) ) \ - ) +#define BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst) (0 \ + | ( (uint32_t)( (_src)>>BGFX_STATE_BLEND_SHIFT) \ + | ( (uint32_t)( (_dst)>>BGFX_STATE_BLEND_SHIFT)<<4) ) \ + ) -#define BGFX_STATE_BLEND_FUNC_RT_xE(_src, _dst, _equation) (0 \ - | BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst) \ - | ( uint32_t( (_equation)>>BGFX_STATE_BLEND_EQUATION_SHIFT)<<8) \ - ) +#define BGFX_STATE_BLEND_FUNC_RT_xE(_src, _dst, _equation) (0 \ + | BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst) \ + | ( (uint32_t)( (_equation)>>BGFX_STATE_BLEND_EQUATION_SHIFT)<<8) \ + ) #define BGFX_STATE_BLEND_FUNC_RT_1(_src, _dst) (BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst)<< 0) #define BGFX_STATE_BLEND_FUNC_RT_2(_src, _dst) (BGFX_STATE_BLEND_FUNC_RT_x(_src, _dst)<<11) @@ -193,10 +241,10 @@ #define BGFX_STENCIL_DEFAULT UINT32_C(0x00000000) //!< /// Set stencil ref value. -#define BGFX_STENCIL_FUNC_REF(_ref) ( (uint32_t(_ref)< +#include #include "bgfx.h" #define BGFX_EMBEDDED_SHADER_DXBC(...) @@ -19,7 +19,6 @@ #define BGFX_PLATFORM_SUPPORTS_DX9BC (0 \ || BX_PLATFORM_WINDOWS \ - || BX_PLATFORM_XBOX360 \ ) #define BGFX_PLATFORM_SUPPORTS_DXBC (0 \ || BX_PLATFORM_WINDOWS \ @@ -34,9 +33,7 @@ || BX_PLATFORM_EMSCRIPTEN \ || BX_PLATFORM_IOS \ || BX_PLATFORM_LINUX \ - || BX_PLATFORM_NACL \ || BX_PLATFORM_OSX \ - || BX_PLATFORM_QNX \ || BX_PLATFORM_RPI \ || BX_PLATFORM_STEAMLINK \ || BX_PLATFORM_WINDOWS \ @@ -75,22 +72,22 @@ #if BGFX_PLATFORM_SUPPORTS_ESSL # undef BGFX_EMBEDDED_SHADER_ESSL # define BGFX_EMBEDDED_SHADER_ESSL(_renderer, _name) { _renderer, BX_CONCATENATE(_name, _glsl), sizeof(BX_CONCATENATE(_name, _glsl) ) }, -#endif // BGFX_PLATFORM_SUPPORTS_PSSL +#endif // BGFX_PLATFORM_SUPPORTS_ESSL #if BGFX_PLATFORM_SUPPORTS_GLSL # undef BGFX_EMBEDDED_SHADER_GLSL # define BGFX_EMBEDDED_SHADER_GLSL(_renderer, _name) { _renderer, BX_CONCATENATE(_name, _glsl), sizeof(BX_CONCATENATE(_name, _glsl) ) }, -#endif // BGFX_PLATFORM_SUPPORTS_PSSL +#endif // BGFX_PLATFORM_SUPPORTS_GLSL -#if 0 // BGFX_PLATFORM_SUPPORTS_SPIRV +#if BGFX_PLATFORM_SUPPORTS_SPIRV # undef BGFX_EMBEDDED_SHADER_SPIRV # define BGFX_EMBEDDED_SHADER_SPIRV(_renderer, _name) { _renderer, BX_CONCATENATE(_name, _spv), sizeof(BX_CONCATENATE(_name, _spv) ) }, -#endif // BGFX_PLATFORM_SUPPORTS_PSSL +#endif // BGFX_PLATFORM_SUPPORTS_SPIRV #if BGFX_PLATFORM_SUPPORTS_METAL # undef BGFX_EMBEDDED_SHADER_METAL # define BGFX_EMBEDDED_SHADER_METAL(_renderer, _name) { _renderer, BX_CONCATENATE(_name, _mtl), sizeof(BX_CONCATENATE(_name, _mtl) ) }, -#endif // BGFX_PLATFORM_SUPPORTS_PSSL +#endif // BGFX_PLATFORM_SUPPORTS_METAL #define BGFX_EMBEDDED_SHADER(_name) \ { \ @@ -104,7 +101,7 @@ BGFX_EMBEDDED_SHADER_ESSL (bgfx::RendererType::OpenGLES, _name) \ BGFX_EMBEDDED_SHADER_GLSL (bgfx::RendererType::OpenGL, _name) \ BGFX_EMBEDDED_SHADER_SPIRV(bgfx::RendererType::Vulkan, _name) \ - { bgfx::RendererType::Noop, (const uint8_t*)"VSH\x4\x0\x0\x0\x0\x0\x0", 10 }, \ + { bgfx::RendererType::Noop, (const uint8_t*)"VSH\x5\x0\x0\x0\x0\x0\x0", 10 }, \ { bgfx::RendererType::Count, NULL, 0 } \ } \ } diff --git a/3rdparty/bgfx/include/bgfx/platform.h b/3rdparty/bgfx/include/bgfx/platform.h index 7ace99c..5a6686c 100644 --- a/3rdparty/bgfx/include/bgfx/platform.h +++ b/3rdparty/bgfx/include/bgfx/platform.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE */ @@ -34,12 +34,19 @@ namespace bgfx /// Render frame. /// + /// @param _msecs Timeout in milliseconds. + /// /// @returns Current renderer state. See: `bgfx::RenderFrame`. /// + /// @attention `bgfx::renderFrame` is blocking call. It waits for + /// `bgfx::frame` to be called from API thread to process frame. + /// If timeout value is passed call will timeout and return even + /// if `bgfx::frame` is not called. + /// /// @warning This call should be only used on platforms that don't /// allow creating separate rendering thread. If it is called before /// to bgfx::init, render thread won't be created by bgfx::init call. - RenderFrame::Enum renderFrame(); + RenderFrame::Enum renderFrame(int32_t _msecs = -1); /// Platform data. /// @@ -131,19 +138,4 @@ namespace bgfx } // namespace bgfx -#if BX_PLATFORM_NACL -# include -# include - -namespace bgfx -{ - typedef void (*PostSwapBuffersFn)(uint32_t _width, uint32_t _height); - - /// - bool naclSetInterfaces(::PP_Instance, const ::PPB_Instance*, const ::PPB_Graphics3D*, PostSwapBuffersFn); - -} // namespace bgfx - -#endif // BX_PLATFORM_ - #endif // BGFX_PLATFORM_H_HEADER_GUARD diff --git a/3rdparty/bgfx/makefile b/3rdparty/bgfx/makefile index d755a10..a1669eb 100644 --- a/3rdparty/bgfx/makefile +++ b/3rdparty/bgfx/makefile @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # @@ -39,27 +39,24 @@ clean: ## Clean all intermediate files. @mkdir .build projgen: ## Generate project files for all configurations. - $(GENIE) --with-tools --with-examples --with-shared-lib vs2012 - $(GENIE) --with-tools --with-examples --with-shared-lib vs2013 - $(GENIE) --with-tools --with-examples --with-shared-lib vs2015 - $(GENIE) --with-tools --with-examples --with-shared-lib vs2017 - $(GENIE) --with-tools --with-examples --with-shared-lib --gcc=mingw-gcc gmake - $(GENIE) --with-tools --with-examples --with-shared-lib --gcc=linux-gcc gmake - $(GENIE) --with-tools --with-examples --with-shared-lib --gcc=osx gmake - $(GENIE) --with-tools --with-examples --with-shared-lib --xcode=osx xcode4 - $(GENIE) --with-tools --with-examples --with-shared-lib --xcode=ios xcode4 - $(GENIE) --with-examples --with-shared-lib --gcc=freebsd gmake - $(GENIE) --with-examples --gcc=android-arm gmake - $(GENIE) --with-examples --gcc=android-mips gmake - $(GENIE) --with-examples --gcc=android-x86 gmake - $(GENIE) --with-examples --gcc=asmjs gmake - $(GENIE) --with-examples --gcc=ios-arm gmake - $(GENIE) --with-examples --gcc=ios-arm64 gmake - $(GENIE) --with-examples --gcc=ios-simulator gmake - $(GENIE) --with-examples --gcc=nacl gmake - $(GENIE) --with-examples --gcc=nacl-arm gmake - $(GENIE) --with-examples --gcc=pnacl gmake - $(GENIE) --with-examples --gcc=rpi gmake + $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2015 + $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2017 + $(GENIE) --with-tools --with-combined-examples --vs=winstore100 vs2017 + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc gmake + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx gmake + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=osx xcode4 + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=ios xcode4 + $(GENIE) --with-combined-examples --with-shared-lib --gcc=freebsd gmake + $(GENIE) --with-combined-examples --gcc=android-arm gmake + $(GENIE) --with-combined-examples --gcc=android-mips gmake + $(GENIE) --with-combined-examples --gcc=android-x86 gmake + $(GENIE) --with-combined-examples --gcc=asmjs gmake + $(GENIE) --with-combined-examples --gcc=ios-arm gmake + $(GENIE) --with-combined-examples --gcc=ios-arm64 gmake + $(GENIE) --with-combined-examples --gcc=ios-simulator gmake + $(GENIE) --with-combined-examples --gcc=ios-simulator64 gmake + $(GENIE) --with-combined-examples --gcc=rpi gmake .build/projects/gmake-android-arm: $(GENIE) --gcc=android-arm gmake @@ -94,7 +91,7 @@ asmjs-release: .build/projects/gmake-asmjs ## Build - Emscripten Release asmjs: asmjs-debug asmjs-release ## Build - Emscripten Debug and Release .build/projects/gmake-linux: - $(GENIE) --with-tools --with-examples --with-shared-lib --gcc=linux-gcc gmake + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake linux-debug32: .build/projects/gmake-linux ## Build - Linux x86 Debug $(MAKE) -R -C .build/projects/gmake-linux config=debug32 linux-release32: .build/projects/gmake-linux ## Build - Linux x86 Release @@ -106,7 +103,7 @@ linux-release64: .build/projects/gmake-linux ## Build - Linux x64 Release linux: linux-debug32 linux-release32 linux-debug64 linux-release64 ## Build - Linux x86/x64 Debug and Release .build/projects/gmake-freebsd: - $(GENIE) --with-tools --with-examples --with-shared-lib --gcc=freebsd gmake + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=freebsd gmake freebsd-debug32: .build/projects/gmake-freebsd ## Build - FreeBSD x86 Debug $(MAKE) -R -C .build/projects/gmake-freebsd config=debug32 freebsd-release32: .build/projects/gmake-freebsd ## Build - FreeBSD x86 Release @@ -118,7 +115,7 @@ freebsd-release64: .build/projects/gmake-freebsd ## Build - FreeBSD x86 Release freebsd: freebsd-debug32 freebsd-release32 freebsd-debug64 freebsd-release64 ## Build - FreeBSD x86/x64 Debug and Release .build/projects/gmake-mingw-gcc: - $(GENIE) --with-tools --with-examples --with-shared-lib --gcc=mingw-gcc gmake + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc gmake mingw-gcc-debug32: .build/projects/gmake-mingw-gcc ## Build - MinGW GCC x86 Debug $(MAKE) -R -C .build/projects/gmake-mingw-gcc config=debug32 mingw-gcc-release32: .build/projects/gmake-mingw-gcc ## Build - MinGW GCC x86 Release @@ -141,32 +138,8 @@ mingw-clang-release64: .build/projects/gmake-mingw-clang ## Build - MinGW Clang $(MAKE) -R -C .build/projects/gmake-mingw-clang config=release64 mingw-clang: mingw-clang-debug32 mingw-clang-release32 mingw-clang-debug64 mingw-clang-release64 ## Build - MinGW Clang x86/x64 Debug and Release -.build/projects/vs2012: - $(GENIE) --with-tools --with-examples --with-shared-lib vs2012 -vs2012-debug32: .build/projects/vs2012 ## Build - VS2012 x86 Debug - devenv .build/projects/vs2012/bgfx.sln /Build "Debug|Win32" -vs2012-release32: .build/projects/vs2012 ## Build - VS2012 x86 Release - devenv .build/projects/vs2012/bgfx.sln /Build "Release|Win32" -vs2012-debug64: .build/projects/vs2012 ## Build - VS2012 x64 Debug - devenv .build/projects/vs2012/bgfx.sln /Build "Debug|x64" -vs2012-release64: .build/projects/vs2012 ## Build - VS2012 x64 Release - devenv .build/projects/vs2012/bgfx.sln /Build "Release|x64" -vs2012: vs2012-debug32 vs2012-release32 vs2012-debug64 vs2012-release64 ## Build - VS2012 x86/x64 Debug and Release - -.build/projects/vs2013: - $(GENIE) --with-tools --with-examples --with-shared-lib vs2013 -vs2013-debug32: .build/projects/vs2013 ## Build - VS2013 x86 Debug - devenv .build/projects/vs2013/bgfx.sln /Build "Debug|Win32" -vs2013-release32: .build/projects/vs2013 ## Build - VS2013 x86 Release - devenv .build/projects/vs2013/bgfx.sln /Build "Release|Win32" -vs2013-debug64: .build/projects/vs2013 ## Build - VS2013 x64 Debug - devenv .build/projects/vs2013/bgfx.sln /Build "Debug|x64" -vs2013-release64: .build/projects/vs2013 ## Build - VS2013 x64 Release - devenv .build/projects/vs2013/bgfx.sln /Build "Release|x64" -vs2013: vs2013-debug32 vs2013-release32 vs2013-debug64 vs2013-release64 ## Build - VS2013 x86/x64 Debug and Release - .build/projects/vs2015: - $(GENIE) --with-tools --with-examples --with-shared-lib vs2015 + $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2015 vs2015-debug32: .build/projects/vs2015 ## Build - VS2015 x86 Debug devenv .build/projects/vs2015/bgfx.sln /Build "Debug|Win32" vs2015-release32: .build/projects/vs2015 ## Build - VS2015 x86 Release @@ -178,7 +151,7 @@ vs2015-release64: .build/projects/vs2015 ## Build - VS2015 x64 Release vs2015: vs2015-debug32 vs2015-release32 vs2015-debug64 vs2015-release64 ## Build - VS2015 x86/x64 Debug and Release .build/projects/vs2017: - $(GENIE) --with-tools --with-examples --with-shared-lib vs2017 + $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2017 vs2017-debug32: .build/projects/vs2017 ## Build - vs2017 x86 Debug devenv .build/projects/vs2017/bgfx.sln /Build "Debug|Win32" vs2017-release32: .build/projects/vs2017 ## Build - vs2017 x86 Release @@ -189,36 +162,20 @@ vs2017-release64: .build/projects/vs2017 ## Build - vs2017 x64 Release devenv .build/projects/vs2017/bgfx.sln /Build "Release|x64" vs2017: vs2017-debug32 vs2017-release32 vs2017-debug64 vs2017-release64 ## Build - vs2017 x86/x64 Debug and Release -.build/projects/gmake-nacl: - $(GENIE) --gcc=nacl gmake -nacl-debug32: .build/projects/gmake-nacl ## Build - Native Client x86 Debug - $(MAKE) -R -C .build/projects/gmake-nacl config=debug32 -nacl-release32: .build/projects/gmake-nacl ## Build - Native Client x86 Release - $(MAKE) -R -C .build/projects/gmake-nacl config=release32 -nacl-debug64: .build/projects/gmake-nacl ## Build - Native Client x64 Debug - $(MAKE) -R -C .build/projects/gmake-nacl config=debug64 -nacl-release64: .build/projects/gmake-nacl ## Build - Native Client x64 Release - $(MAKE) -R -C .build/projects/gmake-nacl config=release64 -nacl: nacl-debug32 nacl-release32 nacl-debug64 nacl-release64 ## Build - Native Client x86/x64 Debug and Release - -.build/projects/gmake-nacl-arm: - $(GENIE) --gcc=nacl-arm gmake -nacl-arm-debug: .build/projects/gmake-nacl-arm ## Build - Native Client ARM Debug - $(MAKE) -R -C .build/projects/gmake-nacl-arm config=debug -nacl-arm-release: .build/projects/gmake-nacl-arm ## Build - Native Client ARM Release - $(MAKE) -R -C .build/projects/gmake-nacl-arm config=release -nacl-arm: nacl-arm-debug32 nacl-arm-release32 ## Build - Native Client ARM Debug and Release - -.build/projects/gmake-pnacl: - $(GENIE) --gcc=pnacl gmake -pnacl-debug: .build/projects/gmake-pnacl ## Build - Portable Native Client Debug - $(MAKE) -R -C .build/projects/gmake-pnacl config=debug -pnacl-release: .build/projects/gmake-pnacl ## Build - Portable Native Client Release - $(MAKE) -R -C .build/projects/gmake-pnacl config=release -pnacl: pnacl-debug pnacl-release ## Build - Portable Native Client Debug and Release +.build/projects/vs2017-winstore100: + $(GENIE) --with-combined-examples --vs=winstore100 vs2017 +vs2017-winstore100-debug32: .build/projects/vs2017-winstore100 ## Build - vs2017-winstore100 x86 Debug + devenv .build/projects/vs2017-winstore100/bgfx.sln /Build "Debug|Win32" +vs2017-winstore100-release32: .build/projects/vs2017-winstore100 ## Build - vs2017-winstore100 x86 Release + devenv .build/projects/vs2017-winstore100/bgfx.sln /Build "Release|Win32" +vs2017-winstore100-debug64: .build/projects/vs2017-winstore100 ## Build - vs2017-winstore100 x64 Debug + devenv .build/projects/vs2017-winstore100/bgfx.sln /Build "Debug|x64" +vs2017-winstore100-release64: .build/projects/vs2017-winstore100 ## Build - vs2017-winstore100 x64 Release + devenv .build/projects/vs2017-winstore100/bgfx.sln /Build "Release|x64" +vs2017-winstore100: vs2017-winstore100-debug32 vs2017-winstore100-release32 vs2017-winstore100-debug64 vs2017-winstore100-release64 ## Build - vs2017-winstore100 x86/x64 Debug and Release .build/projects/gmake-osx: - $(GENIE) --with-tools --with-examples --with-shared-lib --gcc=osx gmake + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx gmake osx-debug32: .build/projects/gmake-osx ## Build - OSX x86 Debug $(MAKE) -C .build/projects/gmake-osx config=debug32 osx-release32: .build/projects/gmake-osx ## Build - OSX x86 Release @@ -253,6 +210,14 @@ ios-simulator-release: .build/projects/gmake-ios-simulator ## Build - iOS Simula $(MAKE) -R -C .build/projects/gmake-ios-simulator config=release ios-simulator: ios-simulator-debug ios-simulator-release ## Build - iOS Simulator Debug and Release +.build/projects/gmake-ios-simulator64: + $(GENIE) --gcc=ios-simulator64 gmake +ios-simulator64-debug: .build/projects/gmake-ios-simulator64 ## Build - iOS Simulator Debug + $(MAKE) -R -C .build/projects/gmake-ios-simulator64 config=debug +ios-simulator64-release: .build/projects/gmake-ios-simulator64 ## Build - iOS Simulator Release + $(MAKE) -R -C .build/projects/gmake-ios-simulator64 config=release +ios-simulator64: ios-simulator64-debug ios-simulator64-release ## Build - iOS Simulator Debug and Release + .build/projects/gmake-rpi: $(GENIE) --gcc=rpi gmake rpi-debug: .build/projects/gmake-rpi ## Build - RasberryPi Debug diff --git a/3rdparty/bgfx/scripts/bgfx.lua b/3rdparty/bgfx/scripts/bgfx.lua index 3c529d8..2175284 100644 --- a/3rdparty/bgfx/scripts/bgfx.lua +++ b/3rdparty/bgfx/scripts/bgfx.lua @@ -1,5 +1,5 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause -- @@ -36,9 +36,13 @@ function overridefiles(_srcPath, _dstPath, _files) end function bgfxProject(_name, _kind, _defines) - project ("bgfx" .. _name) uuid (os.uuid("bgfx" .. _name)) + bgfxProjectBase(_kind, _defines) + copyLib() +end + +function bgfxProjectBase(_kind, _defines) kind (_kind) if _kind == "SharedLib" then @@ -72,7 +76,6 @@ function bgfxProject(_name, _kind, _defines) includedirs { path.join(BGFX_DIR, "3rdparty"), - path.join(BGFX_DIR, "3rdparty/dxsdk/include"), path.join(BX_DIR, "include"), path.join(BIMG_DIR, "include"), } @@ -117,13 +120,18 @@ function bgfxProject(_name, _kind, _defines) "BGFX_CONFIG_DEBUG=1", } + configuration { "vs* or mingw*", "not durango" } + includedirs { + path.join(BGFX_DIR, "3rdparty/dxsdk/include"), + } + configuration { "android*" } links { "EGL", "GLESv2", } - configuration { "winphone8* or winstore8*" } + configuration { "winstore*" } linkoptions { "/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata } @@ -143,10 +151,10 @@ function bgfxProject(_name, _kind, _defines) "-weak_framework MetalKit", } - configuration { "not nacl", "not linux-steamlink" } + configuration { "not linux-steamlink", "not NX32", "not NX64" } includedirs { - --nacl has GLES2 headers modified... - --steamlink has EGL headers modified... + -- steamlink has EGL headers modified... + -- NX has EGL headers modified... path.join(BGFX_DIR, "3rdparty/khronos"), } @@ -222,6 +230,4 @@ function bgfxProject(_name, _kind, _defines) end configuration {} - - copyLib() end diff --git a/3rdparty/bgfx/scripts/bgfx.pc b/3rdparty/bgfx/scripts/bgfx.pc deleted file mode 100644 index f9cc3a0..0000000 --- a/3rdparty/bgfx/scripts/bgfx.pc +++ /dev/null @@ -1,11 +0,0 @@ -prefix=/usr/local -exec_prefix=${prefix} -includedir=${prefix}/include -libdir=${exec_prefix}/lib - -Cflags: -I${includedir} -Libs: -L${libdir} -lX11 -lGL -pthread -lrt -ldl - -Name: bgfx -Description: Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library. -Version: 1.0.0 diff --git a/3rdparty/bgfx/scripts/common.ninja b/3rdparty/bgfx/scripts/common.ninja deleted file mode 100644 index 0cde35f..0000000 --- a/3rdparty/bgfx/scripts/common.ninja +++ /dev/null @@ -1,26 +0,0 @@ -builddir = ../.build - -rule geometryc_pack_normal - command = geometryc -f $in -o $out --packnormal 1 - description = Converting geometry $in... - -rule texturec_bc1 - command = texturec -f $in -o $out -t bc1 -m - -rule texturec_bc2 - command = texturec -f $in -o $out -t bc2 -m - -rule texturec_bc3 - command = texturec -f $in -o $out -t bc3 -m - -rule texturec_bc4 - command = texturec -f $in -o $out -t bc4 -m - -rule texturec_bc5 - command = texturec -f $in -o $out -t bc5 -m - -rule texturec_etc1 - command = texturec -f $in -o $out -t etc1 -m - -rule texturec_etc2 - command = texturec -f $in -o $out -t etc2 -m diff --git a/3rdparty/bgfx/scripts/example-common.lua b/3rdparty/bgfx/scripts/example-common.lua index 37e0f41..7cb01f1 100644 --- a/3rdparty/bgfx/scripts/example-common.lua +++ b/3rdparty/bgfx/scripts/example-common.lua @@ -1,10 +1,23 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause -- +project ("example-glue") + kind "StaticLib" + + includedirs { + path.join(BX_DIR, "include"), + path.join(BIMG_DIR, "include"), + path.join(BGFX_DIR, "include"), + path.join(BGFX_DIR, "3rdparty"), + } + + files { + path.join(BGFX_DIR, "examples/common/example-glue.cpp"), + } + project ("example-common") - uuid ("21cc0e26-bf62-11e2-a01e-0291bd4c8125") kind "StaticLib" includedirs { @@ -24,6 +37,10 @@ project ("example-common") path.join(BGFX_DIR, "examples/common/**.h"), } + removefiles { + path.join(BGFX_DIR, "examples/common/example-glue.cpp"), + } + if _OPTIONS["with-scintilla"] then defines { "SCI_NAMESPACE", @@ -73,7 +90,7 @@ project ("example-common") path.join(BGFX_DIR, "examples/common/**.mm"), } - configuration { "winphone8* or winstore8* or durango"} + configuration { "winstore* or durango"} files { path.join(BGFX_DIR, "examples/common/**.cx"), } diff --git a/3rdparty/bgfx/scripts/genie.lua b/3rdparty/bgfx/scripts/genie.lua index 84c50db..daae2f8 100644 --- a/3rdparty/bgfx/scripts/genie.lua +++ b/3rdparty/bgfx/scripts/genie.lua @@ -1,5 +1,5 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause -- @@ -43,6 +43,11 @@ newoption { description = "Enable building tools.", } +newoption { + trigger = "with-combined-examples", + description = "Enable building examples (combined as single executable).", +} + newoption { trigger = "with-examples", description = "Enable building examples.", @@ -72,8 +77,8 @@ solution "bgfx" MODULE_DIR = path.getabsolute("../") BGFX_DIR = path.getabsolute("..") -BIMG_DIR = path.getabsolute(path.join(BGFX_DIR, "../bimg")) BX_DIR = os.getenv("BX_DIR") +BIMG_DIR = os.getenv("BIMG_DIR") local BGFX_BUILD_DIR = path.join(BGFX_DIR, ".build") local BGFX_THIRD_PARTY_DIR = path.join(BGFX_DIR, "3rdparty") @@ -81,8 +86,20 @@ if not BX_DIR then BX_DIR = path.getabsolute(path.join(BGFX_DIR, "../bx")) end -if not os.isdir(BX_DIR) then - print("bx not found at " .. BX_DIR) +if not BIMG_DIR then + BIMG_DIR = path.getabsolute(path.join(BGFX_DIR, "../bimg")) +end + +if not os.isdir(BX_DIR) or not os.isdir(BIMG_DIR) then + + if not os.isdir(BX_DIR) then + print("bx not found at " .. BX_DIR) + end + + if not os.isdir(BIMG_DIR) then + print("bimg not found at " .. BIMG_DIR) + end + print("For more info see: https://bkaradzic.github.io/bgfx/build.html") os.exit() end @@ -106,18 +123,11 @@ end if _OPTIONS["with-profiler"] then defines { "ENTRY_CONFIG_PROFILER=1", - "BGFX_CONFIG_PROFILER_REMOTERY=1", - "_WINSOCKAPI_" + "BGFX_CONFIG_PROFILER=1", } end -function exampleProject(_name) - - project ("example-" .. _name) - uuid (os.uuid("example-" .. _name)) - kind "WindowedApp" - - configuration {} +function exampleProjectDefaults() debugdir (path.join(BGFX_DIR, "examples/runtime")) @@ -129,22 +139,13 @@ function exampleProject(_name) path.join(BGFX_DIR, "examples/common"), } - files { - path.join(BGFX_DIR, "examples", _name, "**.c"), - path.join(BGFX_DIR, "examples", _name, "**.cpp"), - path.join(BGFX_DIR, "examples", _name, "**.h"), - } - - removefiles { - path.join(BGFX_DIR, "examples", _name, "**.bin.h"), - } - flags { "FatalWarnings", } links { "example-common", + "example-glue", "bgfx", "bimg_decode", "bimg", @@ -231,7 +232,7 @@ function exampleProject(_name) "kernelx", } - configuration { "winphone8* or winstore8*" } + configuration { "winstore*" } removelinks { "DelayImp", "gdi32", @@ -239,6 +240,7 @@ function exampleProject(_name) } links { "d3d11", + "d3d12", "dxgi" } linkoptions { @@ -246,15 +248,15 @@ function exampleProject(_name) } -- WinRT targets need their own output directories or build files stomp over each other - configuration { "x32", "winphone8* or winstore8*" } + configuration { "x32", "winstore*" } targetdir (path.join(BGFX_BUILD_DIR, "win32_" .. _ACTION, "bin", _name)) objdir (path.join(BGFX_BUILD_DIR, "win32_" .. _ACTION, "obj", _name)) - configuration { "x64", "winphone8* or winstore8*" } + configuration { "x64", "winstore*" } targetdir (path.join(BGFX_BUILD_DIR, "win64_" .. _ACTION, "bin", _name)) objdir (path.join(BGFX_BUILD_DIR, "win64_" .. _ACTION, "obj", _name)) - configuration { "ARM", "winphone8* or winstore8*" } + configuration { "ARM", "winstore*" } targetdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "bin", _name)) objdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "obj", _name)) @@ -272,24 +274,6 @@ function exampleProject(_name) "GLESv2", } - configuration { "nacl*" } - kind "ConsoleApp" - targetextension ".nexe" - links { - "ppapi", - "ppapi_gles2", - "pthread", - } - - configuration { "pnacl" } - kind "ConsoleApp" - targetextension ".pexe" - links { - "ppapi", - "ppapi_gles2", - "pthread", - } - configuration { "asmjs" } kind "ConsoleApp" targetextension ".bc" @@ -312,8 +296,8 @@ function exampleProject(_name) configuration { "rpi" } links { "X11", - "GLESv2", - "EGL", + "brcmGLESv2", + "brcmEGL", "bcm_host", "vcos", "vchiq_arm", @@ -351,6 +335,7 @@ function exampleProject(_name) path.join(BGFX_DIR, "examples/runtime/tvOS-Info.plist"), } + configuration { "qnx*" } targetextension "" links { @@ -363,6 +348,61 @@ function exampleProject(_name) strip() end +function exampleProject(_combined, ...) + + if _combined then + + project ("examples") + uuid (os.uuid("examples")) + kind "WindowedApp" + + for _, name in ipairs({...}) do + + files { + path.join(BGFX_DIR, "examples", name, "**.c"), + path.join(BGFX_DIR, "examples", name, "**.cpp"), + path.join(BGFX_DIR, "examples", name, "**.h"), + } + + removefiles { + path.join(BGFX_DIR, "examples", name, "**.bin.h"), + } + + end + + files { + path.join(BGFX_DIR, "examples/25-c99/helloworld.c"), -- hack for _main_ + } + + exampleProjectDefaults() + + else + + for _, name in ipairs({...}) do + project ("example-" .. name) + uuid (os.uuid("example-" .. name)) + kind "WindowedApp" + + files { + path.join(BGFX_DIR, "examples", name, "**.c"), + path.join(BGFX_DIR, "examples", name, "**.cpp"), + path.join(BGFX_DIR, "examples", name, "**.h"), + } + + removefiles { + path.join(BGFX_DIR, "examples", name, "**.bin.h"), + } + + defines { + "ENTRY_CONFIG_IMPLEMENT_MAIN=1", + } + + exampleProjectDefaults() + end + end + +end + dofile "bgfx.lua" group "libs" @@ -371,52 +411,64 @@ bgfxProject("", "StaticLib", {}) dofile(path.join(BX_DIR, "scripts/bx.lua")) dofile(path.join(BIMG_DIR, "scripts/bimg.lua")) dofile(path.join(BIMG_DIR, "scripts/bimg_decode.lua")) -dofile(path.join(BIMG_DIR, "scripts/bimg_encode.lua")) -if _OPTIONS["with-examples"] or _OPTIONS["with-tools"] then +if _OPTIONS["with-tools"] then + dofile(path.join(BIMG_DIR, "scripts/bimg_encode.lua")) +end + +if _OPTIONS["with-examples"] +or _OPTIONS["with-combined-examples"] +or _OPTIONS["with-tools"] then group "examples" dofile "example-common.lua" end -if _OPTIONS["with-examples"] then +if _OPTIONS["with-examples"] +or _OPTIONS["with-combined-examples"] then group "examples" - exampleProject("00-helloworld") - exampleProject("01-cubes") - exampleProject("02-metaballs") - exampleProject("03-raymarch") - exampleProject("04-mesh") - exampleProject("05-instancing") - exampleProject("06-bump") - exampleProject("07-callback") - exampleProject("08-update") - exampleProject("09-hdr") - exampleProject("10-font") - exampleProject("11-fontsdf") - exampleProject("12-lod") - exampleProject("13-stencil") - exampleProject("14-shadowvolumes") - exampleProject("15-shadowmaps-simple") - exampleProject("16-shadowmaps") - exampleProject("17-drawstress") - exampleProject("18-ibl") - exampleProject("19-oit") - exampleProject("20-nanovg") - exampleProject("21-deferred") - exampleProject("22-windows") - exampleProject("23-vectordisplay") - exampleProject("24-nbody") - exampleProject("26-occlusion") - exampleProject("27-terrain") - exampleProject("28-wireframe") - exampleProject("29-debugdraw") - exampleProject("30-picking") - exampleProject("31-rsm") - exampleProject("32-particles") - exampleProject("33-pom") + + exampleProject(_OPTIONS["with-combined-examples"] + , "00-helloworld" + , "01-cubes" + , "02-metaballs" + , "03-raymarch" + , "04-mesh" + , "05-instancing" + , "06-bump" + , "07-callback" + , "08-update" + , "09-hdr" + , "10-font" + , "11-fontsdf" + , "12-lod" + , "13-stencil" + , "14-shadowvolumes" + , "15-shadowmaps-simple" + , "16-shadowmaps" + , "17-drawstress" + , "18-ibl" + , "19-oit" + , "20-nanovg" + , "21-deferred" + , "22-windows" + , "23-vectordisplay" + , "24-nbody" + , "26-occlusion" + , "27-terrain" + , "28-wireframe" + , "29-debugdraw" + , "30-picking" + , "31-rsm" + , "32-particles" + , "33-pom" + , "34-mvs" + , "35-dynamic" + , "36-sky" + ) -- C99 source doesn't compile under WinRT settings if not premake.vstudio.iswinrt() then - exampleProject("25-c99") + exampleProject(false, "25-c99") end end diff --git a/3rdparty/bgfx/scripts/geometryc.lua b/3rdparty/bgfx/scripts/geometryc.lua index 902b310..566afb1 100644 --- a/3rdparty/bgfx/scripts/geometryc.lua +++ b/3rdparty/bgfx/scripts/geometryc.lua @@ -1,10 +1,10 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause -- project "geometryc" - uuid "8794dc3a-2d57-11e2-ba18-368d09e48fda" + uuid (os.uuid("geometryc")) kind "ConsoleApp" includedirs { @@ -31,12 +31,20 @@ project "geometryc" configuration { "mingw-*" } targetextension ".exe" + links { + "psapi", + } configuration { "osx" } links { "Cocoa.framework", } + configuration { "vs20*" } + links { + "psapi", + } + configuration {} strip() diff --git a/3rdparty/bgfx/scripts/shader-embeded.mk b/3rdparty/bgfx/scripts/shader-embeded.mk index ac9d4d6..1d126f8 100644 --- a/3rdparty/bgfx/scripts/shader-embeded.mk +++ b/3rdparty/bgfx/scripts/shader-embeded.mk @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # diff --git a/3rdparty/bgfx/scripts/shader.mk b/3rdparty/bgfx/scripts/shader.mk index 4a695d0..e8ca61d 100644 --- a/3rdparty/bgfx/scripts/shader.mk +++ b/3rdparty/bgfx/scripts/shader.mk @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # @@ -116,19 +116,9 @@ CS_BIN = $(addprefix $(BUILD_INTERMEDIATE_DIR)/, $(addsuffix .bin, $(basename $( BIN = $(VS_BIN) $(FS_BIN) ASM = $(VS_ASM) $(FS_ASM) -ifeq ($(TARGET), 1) +ifeq ($(TARGET), $(filter $(TARGET),1 3 4 6)) BIN += $(CS_BIN) ASM += $(CS_ASM) -else -ifeq ($(TARGET), 3) -BIN += $(CS_BIN) -ASM += $(CS_ASM) -else -ifeq ($(TARGET), 4) -BIN += $(CS_BIN) -ASM += $(CS_ASM) -endif -endif endif $(BUILD_INTERMEDIATE_DIR)/vs_%.bin : $(SHADERS_DIR)vs_%.sc diff --git a/3rdparty/bgfx/scripts/shaderc.lua b/3rdparty/bgfx/scripts/shaderc.lua index 18d9988..0c98f16 100644 --- a/3rdparty/bgfx/scripts/shaderc.lua +++ b/3rdparty/bgfx/scripts/shaderc.lua @@ -1,5 +1,5 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause -- @@ -23,7 +23,7 @@ project "glslang" configuration { "vs*" } buildoptions { "/wd4005", -- warning C4005: '_CRT_SECURE_NO_WARNINGS': macro redefinition - "/wd4100", -- error C4100: 'inclusionDepth' : unreferenced formal parameter + "/wd4100", -- warning C4100: 'inclusionDepth' : unreferenced formal parameter "/wd4127", -- warning C4127: conditional expression is constant "/wd4244", -- warning C4244: '=': conversion from 'int' to 'char', possible loss of data "/wd4456", -- warning C4456: declaration of 'feature' hides previous local declaration @@ -34,9 +34,9 @@ project "glslang" configuration { "not vs*" } buildoptions { - "-Wno-deprecated-register", +-- "-Wno-deprecated-register", "-Wno-ignored-qualifiers", - "-Wno-inconsistent-missing-override", +-- "-Wno-inconsistent-missing-override", "-Wno-missing-field-initializers", "-Wno-reorder", "-Wno-return-type", @@ -44,6 +44,7 @@ project "glslang" "-Wno-sign-compare", "-Wno-undef", "-Wno-unknown-pragmas", + "-Wno-unused-function", "-Wno-unused-parameter", "-Wno-unused-variable", } @@ -213,6 +214,11 @@ project "fcpp" "/wd4706", -- warning C4706: assignment within conditional expression } + configuration { "not vs*" } + buildoptions { + "-Wno-implicit-fallthrough", + } + configuration {} project "shaderc" diff --git a/3rdparty/bgfx/scripts/texturec.lua b/3rdparty/bgfx/scripts/texturec.lua index 9cff76e..c1c0e7d 100644 --- a/3rdparty/bgfx/scripts/texturec.lua +++ b/3rdparty/bgfx/scripts/texturec.lua @@ -1,10 +1,10 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause -- project "texturec" - uuid "838801ee-7bc3-11e1-9f19-eae7d36e7d26" + uuid (os.uuid("texturec")) kind "ConsoleApp" includedirs { @@ -15,7 +15,7 @@ project "texturec" } files { - path.join(BGFX_DIR, "tools/texturec/texturec.cpp"), + path.join(BIMG_DIR, "tools/texturec/texturec.cpp"), } links { @@ -27,13 +27,16 @@ project "texturec" configuration { "mingw-*" } targetextension ".exe" + links { + "psapi", + } configuration { "osx" } links { "Cocoa.framework", } - configuration { "vs20* or mingw*" } + configuration { "vs20*" } links { "psapi", } diff --git a/3rdparty/bgfx/scripts/texturev.lua b/3rdparty/bgfx/scripts/texturev.lua index 4443391..c242555 100644 --- a/3rdparty/bgfx/scripts/texturev.lua +++ b/3rdparty/bgfx/scripts/texturev.lua @@ -132,7 +132,7 @@ project ("texturev") "psapi", } - configuration { "winphone8*"} + configuration { "winstore*" } removelinks { "DelayImp", "gdi32", @@ -140,6 +140,7 @@ project ("texturev") } links { "d3d11", + "d3d12", "dxgi" } linkoptions { diff --git a/3rdparty/bgfx/scripts/tools.mk b/3rdparty/bgfx/scripts/tools.mk index 0cda8ba..2b034bc 100644 --- a/3rdparty/bgfx/scripts/tools.mk +++ b/3rdparty/bgfx/scripts/tools.mk @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # diff --git a/3rdparty/bgfx/src/amalgamated.cpp b/3rdparty/bgfx/src/amalgamated.cpp index 0ea731d..542436d 100644 --- a/3rdparty/bgfx/src/amalgamated.cpp +++ b/3rdparty/bgfx/src/amalgamated.cpp @@ -1,17 +1,17 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include "bgfx.cpp" +#include "debug_renderdoc.cpp" #include "glcontext_egl.cpp" #include "glcontext_glx.cpp" -#include "glcontext_ppapi.cpp" #include "glcontext_wgl.cpp" #include "hmd.cpp" #include "hmd_ovr.cpp" #include "hmd_openvr.cpp" -#include "debug_renderdoc.cpp" +#include "nvapi.cpp" #include "renderer_d3d9.cpp" #include "renderer_d3d11.cpp" #include "renderer_d3d12.cpp" @@ -19,8 +19,8 @@ #include "renderer_gl.cpp" #include "renderer_vk.cpp" #include "renderer_gnm.cpp" -#include "shader_dxbc.cpp" -#include "shader_dx9bc.cpp" +// #include "shader_dxbc.cpp" +// #include "shader_dx9bc.cpp" #include "shader_spirv.cpp" #include "topology.cpp" #include "vertexdecl.cpp" diff --git a/3rdparty/bgfx/src/amalgamated.mm b/3rdparty/bgfx/src/amalgamated.mm index 7d3cb5b..8d1ce64 100644 --- a/3rdparty/bgfx/src/amalgamated.mm +++ b/3rdparty/bgfx/src/amalgamated.mm @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/bgfx.cpp b/3rdparty/bgfx/src/bgfx.cpp index 0a77f8d..ec8ba15 100644 --- a/3rdparty/bgfx/src/bgfx.cpp +++ b/3rdparty/bgfx/src/bgfx.cpp @@ -1,25 +1,13 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include -#if BX_PLATFORM_WINDOWS -// BK - Remotery needs WinSock, but on VS2015/Win10 build -// fails if WinSock2 is included after Windows.h?! -# include -#endif // BX_PLATFORM_WINDOWS #include "bgfx_p.h" #include - -#if BGFX_CONFIG_PROFILER_REMOTERY_BUILD_LIB -# define RMT_USE_D3D11 BGFX_CONFIG_RENDERER_DIRECT3D11 -# define RMT_USE_OPENGL BGFX_CONFIG_RENDERER_OPENGL -# include -#endif // BGFX_CONFIG_PROFILER_REMOTERY_BUILD_LIB - -#include +#include #include #include "topology.h" @@ -28,15 +16,15 @@ BX_ERROR_RESULT(BGFX_ERROR_TEXTURE_VALIDATION, BX_MAKEFOURCC('b', 'g', 0, 1) ); namespace bgfx { -#define BGFX_MAIN_THREAD_MAGIC UINT32_C(0x78666762) +#define BGFX_API_THREAD_MAGIC UINT32_C(0x78666762) #if BGFX_CONFIG_MULTITHREADED -# define BGFX_CHECK_MAIN_THREAD() \ +# define BGFX_CHECK_API_THREAD() \ BX_CHECK(NULL != s_ctx, "Library is not initialized yet."); \ - BX_CHECK(BGFX_MAIN_THREAD_MAGIC == s_threadIndex, "Must be called from main thread.") -# define BGFX_CHECK_RENDER_THREAD() BX_CHECK(BGFX_MAIN_THREAD_MAGIC != s_threadIndex, "Must be called from render thread.") + BX_CHECK(BGFX_API_THREAD_MAGIC == s_threadIndex, "Must be called from main thread.") +# define BGFX_CHECK_RENDER_THREAD() BX_CHECK(BGFX_API_THREAD_MAGIC != s_threadIndex, "Must be called from render thread.") #else -# define BGFX_CHECK_MAIN_THREAD() +# define BGFX_CHECK_API_THREAD() # define BGFX_CHECK_RENDER_THREAD() #endif // BGFX_CONFIG_MULTITHREADED @@ -66,7 +54,21 @@ namespace bgfx { } - virtual void traceVargs(const char* _filePath, uint16_t _line, const char* _format, va_list _argList) BX_OVERRIDE + virtual void fatal(Fatal::Enum _code, const char* _str) override + { + if (Fatal::DebugCheck == _code) + { + bx::debugBreak(); + } + else + { + BX_TRACE("0x%08x: %s", _code, _str); + BX_UNUSED(_code, _str); + abort(); + } + } + + virtual void traceVargs(const char* _filePath, uint16_t _line, const char* _format, va_list _argList) override { char temp[2048]; char* out = temp; @@ -85,63 +87,59 @@ namespace bgfx bx::debugOutput(out); } - virtual void fatal(Fatal::Enum _code, const char* _str) BX_OVERRIDE + virtual void profilerBegin(const char* /*_name*/, uint32_t /*_abgr*/, const char* /*_filePath*/, uint16_t /*_line*/) override { - if (Fatal::DebugCheck == _code) - { - bx::debugBreak(); - } - else - { - BX_TRACE("0x%08x: %s", _code, _str); - BX_UNUSED(_code, _str); - abort(); - } } - virtual uint32_t cacheReadSize(uint64_t /*_id*/) BX_OVERRIDE + virtual void profilerBeginLiteral(const char* /*_name*/, uint32_t /*_abgr*/, const char* /*_filePath*/, uint16_t /*_line*/) override + { + } + + virtual void profilerEnd() override + { + } + + virtual uint32_t cacheReadSize(uint64_t /*_id*/) override { return 0; } - virtual bool cacheRead(uint64_t /*_id*/, void* /*_data*/, uint32_t /*_size*/) BX_OVERRIDE + virtual bool cacheRead(uint64_t /*_id*/, void* /*_data*/, uint32_t /*_size*/) override { return false; } - virtual void cacheWrite(uint64_t /*_id*/, const void* /*_data*/, uint32_t /*_size*/) BX_OVERRIDE + virtual void cacheWrite(uint64_t /*_id*/, const void* /*_data*/, uint32_t /*_size*/) override { } - virtual void screenShot(const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _data, uint32_t _size, bool _yflip) BX_OVERRIDE + virtual void screenShot(const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _data, uint32_t _size, bool _yflip) override { BX_UNUSED(_filePath, _width, _height, _pitch, _data, _size, _yflip); -#if BX_CONFIG_CRT_FILE_READER_WRITER - const int32_t len = bx::strnlen(_filePath)+5; + const int32_t len = bx::strLen(_filePath)+5; char* filePath = (char*)alloca(len); - bx::strlncpy(filePath, len, _filePath); - bx::strlncat(filePath, len, ".tga"); + bx::strCopy(filePath, len, _filePath); + bx::strCat(filePath, len, ".tga"); - bx::CrtFileWriter writer; + bx::FileWriter writer; if (bx::open(&writer, filePath) ) { bimg::imageWriteTga(&writer, _width, _height, _pitch, _data, false, _yflip); bx::close(&writer); } -#endif // BX_CONFIG_CRT_FILE_READER_WRITER } - virtual void captureBegin(uint32_t /*_width*/, uint32_t /*_height*/, uint32_t /*_pitch*/, TextureFormat::Enum /*_format*/, bool /*_yflip*/) BX_OVERRIDE + virtual void captureBegin(uint32_t /*_width*/, uint32_t /*_height*/, uint32_t /*_pitch*/, TextureFormat::Enum /*_format*/, bool /*_yflip*/) override { BX_TRACE("Warning: using capture without callback (a.k.a. pointless)."); } - virtual void captureEnd() BX_OVERRIDE + virtual void captureEnd() override { } - virtual void captureFrame(const void* /*_data*/, uint32_t /*_size*/) BX_OVERRIDE + virtual void captureFrame(const void* /*_data*/, uint32_t /*_size*/) override { } }; @@ -150,6 +148,8 @@ namespace bgfx # define BGFX_CONFIG_MEMORY_TRACKING (BGFX_CONFIG_DEBUG && BX_CONFIG_SUPPORTS_THREADING) #endif // BGFX_CONFIG_MEMORY_TRACKING + const size_t kNaturalAlignment = 8; + class AllocatorStub : public bx::AllocatorI { public: @@ -161,13 +161,13 @@ namespace bgfx { } - virtual void* realloc(void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line) BX_OVERRIDE + virtual void* realloc(void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line) override { if (0 == _size) { if (NULL != _ptr) { - if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align) + if (kNaturalAlignment >= _align) { #if BGFX_CONFIG_MEMORY_TRACKING { @@ -189,7 +189,7 @@ namespace bgfx } else if (NULL == _ptr) { - if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align) + if (kNaturalAlignment >= _align) { #if BGFX_CONFIG_MEMORY_TRACKING { @@ -205,7 +205,7 @@ namespace bgfx return bx::alignedAlloc(this, _size, _align, _file, _line); } - if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align) + if (kNaturalAlignment >= _align) { #if BGFX_CONFIG_MEMORY_TRACKING if (NULL == _ptr) @@ -465,14 +465,20 @@ namespace bgfx { for (const EmbeddedShader* es = _es; NULL != es->name; ++es) { - if (0 == bx::strncmp(_name, es->name) ) + if (0 == bx::strCmp(_name, es->name) ) { for (const EmbeddedShader::Data* esd = es->data; RendererType::Count != esd->type; ++esd) { if (_type == esd->type && 1 < esd->size) { - return createShader(makeRef(esd->data, esd->size) ); + ShaderHandle handle = createShader(makeRef(esd->data, esd->size) ); + if (isValid(handle) ) + { + setName(handle, _name); + } + + return handle; } } } @@ -504,14 +510,14 @@ namespace bgfx static uint8_t parseAttrTo(char*& _ptr, char _to, uint8_t _default) { - const char* str = bx::strnchr(_ptr, _to); + const char* str = bx::strFind(_ptr, _to); if (NULL != str && 3 > str-_ptr) { char tmp[4]; int32_t len = int32_t(str-_ptr); - bx::strlncpy(tmp, sizeof(tmp), _ptr, len); + bx::strCopy(tmp, sizeof(tmp), _ptr, len); uint8_t attr = uint8_t(atoi(tmp) ); _ptr += len+1; @@ -529,7 +535,7 @@ namespace bgfx return _default; } - if (0 == bx::strncmp(ptr, "0m", 2) ) + if (0 == bx::strCmp(ptr, "0m", 2) ) { _ptr = ptr + 2; return _default; @@ -582,7 +588,7 @@ namespace bgfx void TextVideoMemBlitter::init() { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); m_decl .begin() .add(Attrib::Position, 3, AttribType::Float) @@ -622,14 +628,14 @@ namespace bgfx void TextVideoMemBlitter::shutdown() { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); if (isValid(m_program) ) { - destroyProgram(m_program); + destroy(m_program); } - destroyTexture(m_texture); + destroy(m_texture); s_ctx->destroyTransientVertexBuffer(m_vb); s_ctx->destroyTransientIndexBuffer(m_ib); } @@ -647,25 +653,26 @@ namespace bgfx float m_v; }; - static uint32_t palette[16] = + static uint32_t palette[] = { - 0x0, - 0xff0000cc, - 0xff069a4e, - 0xff00a0c4, - 0xffa46534, - 0xff7b5075, - 0xff9a9806, - 0xffcfd7d3, - 0xff535755, - 0xff2929ef, - 0xff34e28a, - 0xff4fe9fc, - 0xffcf9f72, - 0xffa87fad, - 0xffe2e234, - 0xffeceeee, + 0x0, // Black + 0xffa46534, // Blue + 0xff069a4e, // Green + 0xff9a9806, // Cyan + 0xff0000cc, // Red + 0xff7b5075, // Magenta + 0xff00a0c4, // Brown + 0xffcfd7d3, // Light Gray + 0xff535755, // Dark Gray + 0xffcf9f72, // Light Blue + 0xff34e28a, // Light Green + 0xffe2e234, // Light Cyan + 0xff2929ef, // Light Red + 0xffa87fad, // Light Magenta + 0xff4fe9fc, // Yellow + 0xffeceeee, // White }; + BX_STATIC_ASSERT(BX_COUNTOF(palette) == 16); uint32_t yy = 0; uint32_t xx = 0; @@ -742,7 +749,7 @@ namespace bgfx void ClearQuad::init() { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); if (RendererType::Noop != g_caps.rendererType) { @@ -761,10 +768,10 @@ namespace bgfx m_program[ii] = createProgram(vsh, fsh); BX_CHECK(isValid(m_program[ii]), "Failed to create clear quad program."); - destroyShader(fsh); + destroy(fsh); } - destroyShader(vsh); + destroy(vsh); m_vb = s_ctx->createTransientVertexBuffer(4*m_decl.m_stride, &m_decl); } @@ -772,7 +779,7 @@ namespace bgfx void ClearQuad::shutdown() { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); if (RendererType::Noop != g_caps.rendererType) { @@ -780,8 +787,8 @@ namespace bgfx { if (isValid(m_program[ii]) ) { - destroyProgram(m_program[ii]); - m_program[ii].idx = invalidHandle; + destroy(m_program[ii]); + m_program[ii].idx = kInvalidHandle; } } @@ -810,7 +817,7 @@ namespace bgfx for (uint32_t ii = 0; ii < UniformType::Count; ++ii) { if (NULL != s_uniformTypeName[ii] - && 0 == bx::strncmp(_name, s_uniformTypeName[ii]) ) + && 0 == bx::strCmp(_name, s_uniformTypeName[ii]) ) { return UniformType::Enum(ii); } @@ -844,7 +851,7 @@ namespace bgfx { for (uint32_t ii = 0; ii < PredefinedUniform::Count; ++ii) { - if (0 == bx::strncmp(_name, s_predefinedName[ii]) ) + if (0 == bx::strCmp(_name, s_predefinedName[ii]) ) { return PredefinedUniform::Enum(ii); } @@ -853,41 +860,75 @@ namespace bgfx return PredefinedUniform::Count; } - uint32_t Frame::submit(uint8_t _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, int32_t _depth, bool _preserveState) + void EncoderImpl::submit(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, int32_t _depth, bool _preserveState) { + if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) + && !_preserveState) + { + m_uniformSet.clear(); + } + + if (BX_ENABLED(BGFX_CONFIG_DEBUG_OCCLUSION) + && isValid(_occlusionQuery) ) + { + BX_CHECK(m_occlusionQuerySet.end() == m_occlusionQuerySet.find(_occlusionQuery.idx) + , "OcclusionQuery %d was already used for this frame." + , _occlusionQuery.idx + ); + m_occlusionQuerySet.insert(_occlusionQuery.idx); + } + if (m_discard) { discard(); - return m_num; + return; } - if (BGFX_CONFIG_MAX_DRAW_CALLS-1 <= m_num - || (0 == m_draw.m_numVertices && 0 == m_draw.m_numIndices) ) + if (0 == m_draw.m_numVertices + && 0 == m_draw.m_numIndices) { + discard(); ++m_numDropped; - return m_num; + return; } - m_uniformEnd = m_uniformBuffer->getPos(); + const uint32_t renderItemIdx = bx::atomicFetchAndAddsat(&m_frame->m_numRenderItems, 1, BGFX_CONFIG_MAX_DRAW_CALLS); + if (BGFX_CONFIG_MAX_DRAW_CALLS-1 <= renderItemIdx) + { + discard(); + ++m_numDropped; + return; + } - m_key.m_program = invalidHandle == _program.idx + ++m_numSubmitted; + + UniformBuffer* uniformBuffer = m_frame->m_uniformBuffer[m_uniformIdx]; + m_uniformEnd = uniformBuffer->getPos(); + + m_key.m_program = kInvalidHandle == _program.idx ? 0 : _program.idx ; - m_key.m_depth = (uint32_t)_depth; - m_key.m_view = _id; - m_key.m_seq = s_ctx->m_seq[_id] & s_ctx->m_seqMask[_id]; - s_ctx->m_seq[_id]++; + m_key.m_view = _id; - uint64_t key = m_key.encodeDraw(); - m_sortKeys[m_num] = key; - m_sortValues[m_num] = m_numRenderItems; - ++m_num; + SortKey::Enum type = SortKey::SortProgram; + switch (s_ctx->m_view[_id].m_mode) + { + case ViewMode::Sequential: m_key.m_seq = s_ctx->getSeqIncr(_id); type = SortKey::SortSequence; break; + case ViewMode::DepthAscending: m_key.m_depth = (uint32_t)_depth; type = SortKey::SortDepth; break; + case ViewMode::DepthDescending: m_key.m_depth = (uint32_t)-_depth; type = SortKey::SortDepth; break; + default: break; + } - m_draw.m_constBegin = m_uniformBegin; - m_draw.m_constEnd = m_uniformEnd; - m_draw.m_stateFlags |= m_stateFlags; + uint64_t key = m_key.encodeDraw(type); + + m_frame->m_sortKeys[renderItemIdx] = key; + m_frame->m_sortValues[renderItemIdx] = RenderItemCount(renderItemIdx); + + m_draw.m_uniformIdx = m_uniformIdx; + m_draw.m_uniformBegin = m_uniformBegin; + m_draw.m_uniformEnd = m_uniformEnd; uint32_t numVertices = UINT32_MAX; for (uint32_t idx = 0, streamMask = m_draw.m_streamMask, ntz = bx::uint32_cnttz(streamMask) @@ -903,85 +944,85 @@ namespace bgfx if (isValid(_occlusionQuery) ) { - BX_CHECK(!isValid(m_draw.m_occlusionQuery), ""); - m_draw.m_stateFlags |= BGFX_STATE_INTERNAL_OCCLUSION_QUERY; m_draw.m_occlusionQuery = _occlusionQuery; } - m_renderItem[m_numRenderItems].draw = m_draw; - m_renderItemBind[m_numRenderItems] = m_bind; - ++m_numRenderItems; + m_frame->m_renderItem[renderItemIdx].draw = m_draw; + m_frame->m_renderItemBind[renderItemIdx] = m_bind; if (!_preserveState) { m_draw.clear(); m_bind.clear(); m_uniformBegin = m_uniformEnd; - m_stateFlags = BGFX_STATE_NONE; } - - return m_num; } - uint32_t Frame::dispatch(uint8_t _id, ProgramHandle _handle, uint16_t _numX, uint16_t _numY, uint16_t _numZ, uint8_t _flags) + void EncoderImpl::dispatch(ViewId _id, ProgramHandle _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ, uint8_t _flags) { + if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) + { + m_uniformSet.clear(); + } + if (m_discard) { discard(); - return m_num; + return; } - if (BGFX_CONFIG_MAX_DRAW_CALLS-1 <= m_num) + const uint32_t renderItemIdx = bx::atomicFetchAndAddsat(&m_frame->m_numRenderItems, 1, BGFX_CONFIG_MAX_DRAW_CALLS); + if (BGFX_CONFIG_MAX_DRAW_CALLS-1 <= renderItemIdx) { + discard(); ++m_numDropped; - return m_num; + return; } - m_uniformEnd = m_uniformBuffer->getPos(); + ++m_numSubmitted; - m_compute.m_matrix = m_draw.m_matrix; - m_compute.m_num = m_draw.m_num; - m_compute.m_numX = bx::uint16_max(_numX, 1); - m_compute.m_numY = bx::uint16_max(_numY, 1); - m_compute.m_numZ = bx::uint16_max(_numZ, 1); + UniformBuffer* uniformBuffer = m_frame->m_uniformBuffer[m_uniformIdx]; + m_uniformEnd = uniformBuffer->getPos(); + + m_compute.m_startMatrix = m_draw.m_startMatrix; + m_compute.m_numMatrices = m_draw.m_numMatrices; + m_compute.m_numX = bx::uint32_max(_numX, 1); + m_compute.m_numY = bx::uint32_max(_numY, 1); + m_compute.m_numZ = bx::uint32_max(_numZ, 1); m_compute.m_submitFlags = _flags; m_key.m_program = _handle.idx; m_key.m_depth = 0; m_key.m_view = _id; - m_key.m_seq = s_ctx->m_seq[_id]; - s_ctx->m_seq[_id]++; + m_key.m_seq = s_ctx->getSeqIncr(_id); uint64_t key = m_key.encodeCompute(); - m_sortKeys[m_num] = key; - m_sortValues[m_num] = m_numRenderItems; - ++m_num; + m_frame->m_sortKeys[renderItemIdx] = key; + m_frame->m_sortValues[renderItemIdx] = RenderItemCount(renderItemIdx); - m_compute.m_constBegin = m_uniformBegin; - m_compute.m_constEnd = m_uniformEnd; - m_renderItem[m_numRenderItems].compute = m_compute; - m_renderItemBind[m_numRenderItems] = m_bind; - ++m_numRenderItems; + m_compute.m_uniformIdx = m_uniformIdx; + m_compute.m_uniformBegin = m_uniformBegin; + m_compute.m_uniformEnd = m_uniformEnd; + m_frame->m_renderItem[renderItemIdx].compute = m_compute; + m_frame->m_renderItemBind[renderItemIdx] = m_bind; m_compute.clear(); m_bind.clear(); m_uniformBegin = m_uniformEnd; - - return m_num; } - void Frame::blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) + void EncoderImpl::blit(ViewId _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) { - BX_WARN(m_numBlitItems < BGFX_CONFIG_MAX_BLIT_ITEMS + BX_WARN(m_frame->m_numBlitItems < BGFX_CONFIG_MAX_BLIT_ITEMS , "Exceed number of available blit items per frame. BGFX_CONFIG_MAX_BLIT_ITEMS is %d. Skipping blit." , BGFX_CONFIG_MAX_BLIT_ITEMS ); - if (m_numBlitItems < BGFX_CONFIG_MAX_BLIT_ITEMS) + if (m_frame->m_numBlitItems < BGFX_CONFIG_MAX_BLIT_ITEMS) { - uint16_t item = m_numBlitItems++; + uint16_t item = m_frame->m_numBlitItems++; - BlitItem& bi = m_blitItem[item]; + BlitItem& bi = m_frame->m_blitItem[item]; bi.m_srcX = _srcX; bi.m_srcY = _srcY; bi.m_srcZ = _srcZ; @@ -999,23 +1040,25 @@ namespace bgfx BlitKey key; key.m_view = _id; key.m_item = item; - m_blitKeys[item] = key.encode(); + m_frame->m_blitKeys[item] = key.encode(); } } void Frame::sort() { - uint8_t viewRemap[BGFX_CONFIG_MAX_VIEWS]; + BGFX_PROFILER_SCOPE("bgfx/Sort", 0xff2040ff); + + ViewId viewRemap[BGFX_CONFIG_MAX_VIEWS]; for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) { - viewRemap[m_viewRemap[ii] ] = uint8_t(ii); + viewRemap[m_viewRemap[ii] ] = ViewId(ii); } - for (uint32_t ii = 0, num = m_num; ii < num; ++ii) + for (uint32_t ii = 0, num = m_numRenderItems; ii < num; ++ii) { m_sortKeys[ii] = SortKey::remapView(m_sortKeys[ii], viewRemap); } - bx::radixSort(m_sortKeys, s_ctx->m_tempKeys, m_sortValues, s_ctx->m_tempValues, m_num); + bx::radixSort(m_sortKeys, s_ctx->m_tempKeys, m_sortValues, s_ctx->m_tempValues, m_numRenderItems); for (uint32_t ii = 0, num = m_numBlitItems; ii < num; ++ii) { @@ -1024,19 +1067,23 @@ namespace bgfx bx::radixSort(m_blitKeys, (uint32_t*)&s_ctx->m_tempKeys, m_numBlitItems); } - RenderFrame::Enum renderFrame() + RenderFrame::Enum renderFrame(int32_t _msecs) { if (BX_ENABLED(BGFX_CONFIG_MULTITHREADED) ) { if (NULL == s_ctx) { s_renderFrameCalled = true; - s_threadIndex = ~BGFX_MAIN_THREAD_MAGIC; + s_threadIndex = ~BGFX_API_THREAD_MAGIC; return RenderFrame::NoContext; } BGFX_CHECK_RENDER_THREAD(); - RenderFrame::Enum result = s_ctx->renderFrame(BGFX_CONFIG_API_SEMAPHORE_TIMEOUT); + int32_t msecs = -1 == _msecs + ? BGFX_CONFIG_API_SEMAPHORE_TIMEOUT + : _msecs + ; + RenderFrame::Enum result = s_ctx->renderFrame(msecs); if (RenderFrame::Exiting == result) { Context* ctx = s_ctx; @@ -1078,7 +1125,7 @@ namespace bgfx void UniformBuffer::writeMarker(const char* _marker) { - uint16_t num = (uint16_t)bx::strnlen(_marker)+1; + uint16_t num = (uint16_t)bx::strLen(_marker)+1; uint32_t opcode = encodeOpcode(bgfx::UniformType::Count, 0, num, true); write(opcode); write(_marker, num); @@ -1114,6 +1161,7 @@ namespace bgfx CAPS_FLAGS(BGFX_CAPS_TEXTURE_COMPARE_ALL), CAPS_FLAGS(BGFX_CAPS_TEXTURE_COMPARE_LEQUAL), CAPS_FLAGS(BGFX_CAPS_TEXTURE_CUBE_ARRAY), + CAPS_FLAGS(BGFX_CAPS_TEXTURE_DIRECT_ACCESS), CAPS_FLAGS(BGFX_CAPS_TEXTURE_READ_BACK), CAPS_FLAGS(BGFX_CAPS_VERTEX_ATTRIB_HALF), CAPS_FLAGS(BGFX_CAPS_VERTEX_ATTRIB_UINT10), @@ -1156,13 +1204,30 @@ namespace bgfx BX_TRACE(""); BX_TRACE("Sort key masks:"); - BX_TRACE("\t View %016" PRIx64, SORT_KEY_VIEW_MASK); - BX_TRACE("\t Draw bit %016" PRIx64, SORT_KEY_DRAW_BIT); - BX_TRACE("\t Seq %016" PRIx64, SORT_KEY_SEQ_MASK); - BX_TRACE("\tD Trans %016" PRIx64, SORT_KEY_DRAW_TRANS_MASK); - BX_TRACE("\tD Program %016" PRIx64, SORT_KEY_DRAW_PROGRAM_MASK); - BX_TRACE("\tC Program %016" PRIx64, SORT_KEY_COMPUTE_PROGRAM_MASK); - BX_TRACE("\tD Depth %016" PRIx64, SORT_KEY_DRAW_DEPTH_MASK); + BX_TRACE("\t View %016" PRIx64, SORT_KEY_VIEW_MASK); + BX_TRACE("\t Draw bit %016" PRIx64, SORT_KEY_DRAW_BIT); + + BX_TRACE(""); + BX_TRACE("\tD Type %016" PRIx64, SORT_KEY_DRAW_TYPE_MASK); + + BX_TRACE(""); + BX_TRACE("\tD0 Trans %016" PRIx64, SORT_KEY_DRAW_0_TRANS_MASK); + BX_TRACE("\tD0 Program %016" PRIx64, SORT_KEY_DRAW_0_PROGRAM_MASK); + BX_TRACE("\tD0 Depth %016" PRIx64, SORT_KEY_DRAW_0_DEPTH_MASK); + + BX_TRACE(""); + BX_TRACE("\tD1 Depth %016" PRIx64, SORT_KEY_DRAW_1_DEPTH_MASK); + BX_TRACE("\tD1 Trans %016" PRIx64, SORT_KEY_DRAW_1_TRANS_MASK); + BX_TRACE("\tD1 Program %016" PRIx64, SORT_KEY_DRAW_1_PROGRAM_MASK); + + BX_TRACE(""); + BX_TRACE("\tD2 Seq %016" PRIx64, SORT_KEY_DRAW_2_SEQ_MASK); + BX_TRACE("\tD2 Trans %016" PRIx64, SORT_KEY_DRAW_2_TRANS_MASK); + BX_TRACE("\tD2 Program %016" PRIx64, SORT_KEY_DRAW_2_PROGRAM_MASK); + + BX_TRACE(""); + BX_TRACE("\t C Seq %016" PRIx64, SORT_KEY_COMPUTE_SEQ_MASK); + BX_TRACE("\t C Program %016" PRIx64, SORT_KEY_COMPUTE_PROGRAM_MASK); BX_TRACE(""); BX_TRACE("Supported capabilities (renderer %s, vendor 0x%04x, device 0x%04x):" @@ -1199,6 +1264,7 @@ namespace bgfx LIMITS(maxDynamicVertexBuffers); LIMITS(maxUniforms); LIMITS(maxOcclusionQueries); + LIMITS(maxEncoders); #undef LIMITS BX_TRACE(""); @@ -1287,6 +1353,11 @@ namespace bgfx return bimg::getName(bimg::TextureFormat::Enum(_fmt)); } + const char* getName(UniformHandle _handle) + { + return s_ctx->m_uniformRef[_handle.idx].m_name.getPtr(); + } + static TextureFormat::Enum s_emulatedFormats[] = { TextureFormat::BC1, @@ -1316,6 +1387,7 @@ namespace bgfx m_flipped = true; m_frames = 0; m_debug = BGFX_DEBUG_NONE; + m_frameTimeLast = bx::getHPCounter(); m_submit->create(); @@ -1328,7 +1400,7 @@ namespace bgfx // should not be created. BX_TRACE("Application called bgfx::renderFrame directly, not creating render thread."); m_singleThreaded = true - && ~BGFX_MAIN_THREAD_MAGIC == s_threadIndex + && ~BGFX_API_THREAD_MAGIC == s_threadIndex ; } else @@ -1344,16 +1416,16 @@ namespace bgfx BX_TRACE("Running in %s-threaded mode", m_singleThreaded ? "single" : "multi"); - s_threadIndex = BGFX_MAIN_THREAD_MAGIC; + s_threadIndex = BGFX_API_THREAD_MAGIC; for (uint32_t ii = 0; ii < BX_COUNTOF(m_viewRemap); ++ii) { - m_viewRemap[ii] = uint8_t(ii); + m_viewRemap[ii] = ViewId(ii); } for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) { - resetView(uint8_t(ii) ); + resetView(ViewId(ii) ); } for (uint32_t ii = 0; ii < BX_COUNTOF(m_clearColor); ++ii) @@ -1371,6 +1443,11 @@ namespace bgfx frameNoRenderWait(); + uint16_t idx = m_encoderHandle.alloc(); + BX_CHECK(0 == idx, "Internal encoder handle is not 0 (idx %d).", idx); BX_UNUSED(idx); + m_encoder[0].begin(m_submit, 0); + m_encoder0 = reinterpret_cast(&m_encoder[0]); + // Make sure renderer init is called from render thread. // g_caps is initialized and available after this point. frame(); @@ -1456,6 +1533,8 @@ namespace bgfx getCommandBuffer(CommandBuffer::RendererShutdownEnd); frame(); + m_encoder[0].end(true); + m_dynVertexBufferAllocator.compact(); m_dynIndexBufferAllocator.compact(); @@ -1489,27 +1568,56 @@ namespace bgfx if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) { -#define CHECK_HANDLE_LEAK(_handleAlloc) \ - BX_MACRO_BLOCK_BEGIN \ - BX_WARN(0 == _handleAlloc.getNumHandles() \ - , "LEAK: " #_handleAlloc " %d (max: %d)" \ - , _handleAlloc.getNumHandles() \ - , _handleAlloc.getMaxHandles() \ - ); \ +#define CHECK_HANDLE_LEAK(_handleAlloc) \ + BX_MACRO_BLOCK_BEGIN \ + if (0 != _handleAlloc.getNumHandles() ) \ + { \ + BX_TRACE("LEAK: " #_handleAlloc " %d (max: %d)" \ + , _handleAlloc.getNumHandles() \ + , _handleAlloc.getMaxHandles() \ + ); \ + for (uint16_t ii = 0, num = _handleAlloc.getNumHandles(); ii < num; ++ii) \ + { \ + BX_TRACE("\t%3d: %4d", ii, _handleAlloc.getHandleAt(ii) ); \ + } \ + } \ BX_MACRO_BLOCK_END - CHECK_HANDLE_LEAK(m_dynamicIndexBufferHandle); - CHECK_HANDLE_LEAK(m_dynamicVertexBufferHandle); - CHECK_HANDLE_LEAK(m_indexBufferHandle); - CHECK_HANDLE_LEAK(m_vertexDeclHandle); - CHECK_HANDLE_LEAK(m_vertexBufferHandle); - CHECK_HANDLE_LEAK(m_shaderHandle); - CHECK_HANDLE_LEAK(m_programHandle); - CHECK_HANDLE_LEAK(m_textureHandle); - CHECK_HANDLE_LEAK(m_frameBufferHandle); - CHECK_HANDLE_LEAK(m_uniformHandle); - CHECK_HANDLE_LEAK(m_occlusionQueryHandle); +#define CHECK_HANDLE_LEAK_NAME(_handleAlloc, _type, _ref) \ + BX_MACRO_BLOCK_BEGIN \ + if (0 != _handleAlloc.getNumHandles() ) \ + { \ + BX_TRACE("LEAK: " #_handleAlloc " %d (max: %d)" \ + , _handleAlloc.getNumHandles() \ + , _handleAlloc.getMaxHandles() \ + ); \ + for (uint16_t ii = 0, num = _handleAlloc.getNumHandles(); ii < num; ++ii) \ + { \ + uint16_t idx = _handleAlloc.getHandleAt(ii); \ + const _type& ref = _ref[idx]; BX_UNUSED(ref); \ + BX_TRACE("\t%3d: %4d %s (count %d)" \ + , ii \ + , idx \ + , ref.m_name.getPtr() \ + , ref.m_refCount \ + ); \ + } \ + } \ + BX_MACRO_BLOCK_END + + CHECK_HANDLE_LEAK (m_dynamicIndexBufferHandle ); + CHECK_HANDLE_LEAK (m_dynamicVertexBufferHandle ); + CHECK_HANDLE_LEAK (m_indexBufferHandle ); + CHECK_HANDLE_LEAK (m_vertexDeclHandle ); + CHECK_HANDLE_LEAK (m_vertexBufferHandle ); + CHECK_HANDLE_LEAK_NAME(m_shaderHandle, ShaderRef, m_shaderRef ); + CHECK_HANDLE_LEAK (m_programHandle ); + CHECK_HANDLE_LEAK_NAME(m_textureHandle, TextureRef, m_textureRef); + CHECK_HANDLE_LEAK (m_frameBufferHandle ); + CHECK_HANDLE_LEAK_NAME(m_uniformHandle, UniformRef, m_uniformRef); + CHECK_HANDLE_LEAK (m_occlusionQueryHandle ); #undef CHECK_HANDLE_LEAK +#undef CHECK_HANDLE_LEAK_NAME } } @@ -1577,27 +1685,66 @@ namespace bgfx } } + Encoder* Context::begin() + { + EncoderImpl* encoder = &m_encoder[0]; + +#if BGFX_CONFIG_MULTITHREADED + if (BGFX_API_THREAD_MAGIC != s_threadIndex) + { + bx::MutexScope scopeLock(m_encoderApiLock); + + uint16_t idx = m_encoderHandle.alloc(); + if (kInvalidHandle == idx) + { + return NULL; + } + + encoder = &m_encoder[idx]; + encoder->begin(m_submit, uint8_t(idx) ); + } +#endif // BGFX_CONFIG_MULTITHREADED + + return reinterpret_cast(encoder); + } + + void Context::end(Encoder* _encoder) + { +#if BGFX_CONFIG_MULTITHREADED + if (BGFX_API_THREAD_MAGIC != s_threadIndex) + { + EncoderImpl* encoder = reinterpret_cast(_encoder); + encoder->end(true); + + m_encoderEndSem.post(); + } +#else + BX_UNUSED(_encoder); +#endif // BGFX_CONFIG_MULTITHREADED + } + uint32_t Context::frame(bool _capture) { - BX_CHECK(0 == m_instBufferCount, "Instance buffer allocated, but not used. This is incorrect, and causes memory leak."); + m_encoder[0].end(true); - if (BX_ENABLED(BGFX_CONFIG_DEBUG_OCCLUSION) ) - { - m_occlusionQuerySet.clear(); - } +#if BGFX_CONFIG_MULTITHREADED + bx::MutexScope resourceApiScope(m_resourceApiLock); - if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) - { - m_uniformSet.clear(); - } + encoderApiWait(); + bx::MutexScope encoderApiScope(m_encoderApiLock); +#else + encoderApiWait(); +#endif // BGFX_CONFIG_MULTITHREADED m_submit->m_capture = _capture; - BGFX_PROFILER_SCOPE(bgfx, main_thread_frame, 0xff2040ff); + BGFX_PROFILER_SCOPE("bgfx/API thread frame", 0xff2040ff); // wait for render thread to finish renderSemWait(); frameNoRenderWait(); + m_encoder[0].begin(m_submit, 0); + return m_frames; } @@ -1615,20 +1762,20 @@ namespace bgfx m_submit->m_resolution = m_resolution; m_resolution.m_flags &= ~BGFX_RESET_INTERNAL_FORCE; m_submit->m_debug = m_debug; + m_submit->m_perfStats.numViews = 0; bx::memCopy(m_submit->m_viewRemap, m_viewRemap, sizeof(m_viewRemap) ); - bx::memCopy(m_submit->m_fb, m_fb, sizeof(m_fb) ); - bx::memCopy(m_submit->m_clear, m_clear, sizeof(m_clear) ); - bx::memCopy(m_submit->m_rect, m_rect, sizeof(m_rect) ); - bx::memCopy(m_submit->m_scissor, m_scissor, sizeof(m_scissor) ); bx::memCopy(m_submit->m_view, m_view, sizeof(m_view) ); - bx::memCopy(m_submit->m_proj, m_proj, sizeof(m_proj) ); - bx::memCopy(m_submit->m_viewFlags, m_viewFlags, sizeof(m_viewFlags) ); + if (m_colorPaletteDirty > 0) { --m_colorPaletteDirty; bx::memCopy(m_submit->m_colorPalette, m_clearColor, sizeof(m_clearColor) ); } + + freeAllHandles(m_submit); + m_submit->resetFreeHandles(); + m_submit->finish(); bx::xchg(m_render, m_submit); @@ -1645,21 +1792,21 @@ namespace bgfx m_submit->start(); bx::memSet(m_seq, 0, sizeof(m_seq) ); - freeAllHandles(m_submit); - m_submit->resetFreeHandles(); m_submit->m_textVideoMem->resize(m_render->m_textVideoMem->m_small , m_resolution.m_width , m_resolution.m_height ); + + int64_t now = bx::getHPCounter(); + m_submit->m_perfStats.cpuTimeFrame = now - m_frameTimeLast; + m_frameTimeLast = now; } - const char* Context::getName(UniformHandle _handle) const - { - return m_uniformRef[_handle.idx].m_name.getPtr(); - } + /// + RendererContextI* rendererCreate(RendererType::Enum _type, const Init& _init); - RendererContextI* rendererCreate(RendererType::Enum _type); + /// void rendererDestroy(RendererContextI* _renderCtx); void Context::flip() @@ -1675,7 +1822,8 @@ namespace bgfx // Something horribly went wrong, fallback to noop renderer. rendererDestroy(m_renderCtx); - m_renderCtx = rendererCreate(RendererType::Noop); + Init init; + m_renderCtx = rendererCreate(RendererType::Noop, init); g_caps.rendererType = RendererType::Noop; } } @@ -1683,28 +1831,38 @@ namespace bgfx RenderFrame::Enum Context::renderFrame(int32_t _msecs) { - BGFX_PROFILER_SCOPE(bgfx, render_frame, 0xff2040ff); + BGFX_PROFILER_SCOPE("bgfx::renderFrame", 0xff2040ff); if (!m_flipAfterRender) { + BGFX_PROFILER_SCOPE("bgfx/flip", 0xff2040ff); flip(); } if (apiSemWait(_msecs) ) { - rendererExecCommands(m_render->m_cmdPre); + { + BGFX_PROFILER_SCOPE("bgfx/Exec commands pre", 0xff2040ff); + rendererExecCommands(m_render->m_cmdPre); + } + if (m_rendererInitialized) { - BGFX_PROFILER_SCOPE(bgfx, render_submit, 0xff2040ff); + BGFX_PROFILER_SCOPE("bgfx/Render submit", 0xff2040ff); m_renderCtx->submit(m_render, m_clearQuad, m_textVideoMemBlitter); m_flipped = false; } - rendererExecCommands(m_render->m_cmdPost); + + { + BGFX_PROFILER_SCOPE("bgfx/Exec commands post", 0xff2040ff); + rendererExecCommands(m_render->m_cmdPost); + } renderSemPost(); if (m_flipAfterRender) { + BGFX_PROFILER_SCOPE("bgfx/flip", 0xff2040ff); flip(); } } @@ -1820,14 +1978,14 @@ namespace bgfx } } - typedef RendererContextI* (*RendererCreateFn)(); + typedef RendererContextI* (*RendererCreateFn)(const Init& _init); typedef void (*RendererDestroyFn)(); -#define BGFX_RENDERER_CONTEXT(_namespace) \ - namespace _namespace \ - { \ - extern RendererContextI* rendererCreate(); \ - extern void rendererDestroy(); \ +#define BGFX_RENDERER_CONTEXT(_namespace) \ + namespace _namespace \ + { \ + extern RendererContextI* rendererCreate(const Init& _init); \ + extern void rendererDestroy(); \ } BGFX_RENDERER_CONTEXT(noop); @@ -1909,7 +2067,7 @@ namespace bgfx return *(const int32_t*)_rhs - *(const int32_t*)_lhs; } - RendererContextI* rendererCreate(RendererType::Enum _type) + RendererContextI* rendererCreate(RendererType::Enum _type, const Init& _init) { int32_t scores[RendererType::Count]; uint32_t numScores = 0; @@ -1958,7 +2116,6 @@ namespace bgfx || BX_PLATFORM_ANDROID || BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_IOS - || BX_PLATFORM_NACL || BX_PLATFORM_RPI ) ) { @@ -1986,7 +2143,7 @@ namespace bgfx for (uint32_t ii = 0; ii < numScores; ++ii) { RendererType::Enum renderer = RendererType::Enum(scores[ii] & 0xff); - renderCtx = s_rendererCreator[renderer].createFn(); + renderCtx = s_rendererCreator[renderer].createFn(_init); if (NULL != renderCtx) { break; @@ -2037,7 +2194,8 @@ namespace bgfx RendererType::Enum type; _cmdbuf.read(type); - m_renderCtx = rendererCreate(type); + Init init; + m_renderCtx = rendererCreate(type, init); m_rendererInitialized = NULL != m_renderCtx; @@ -2077,7 +2235,7 @@ namespace bgfx m_exit = true; } - // fall through + BX_FALLTHROUGH; case CommandBuffer::End: end = true; @@ -2308,7 +2466,11 @@ namespace bgfx uint8_t skip; _cmdbuf.read(skip); - m_renderCtx->createTexture(handle, mem, flags, skip); + void* ptr = m_renderCtx->createTexture(handle, mem, flags, skip); + if (NULL != ptr) + { + setDirectAccessPtr(handle, ptr); + } bx::MemoryReader reader(mem->data, mem->size); @@ -2496,7 +2658,7 @@ namespace bgfx case CommandBuffer::UpdateViewName: { - uint8_t id; + ViewId id; _cmdbuf.read(id); uint16_t len; @@ -2517,6 +2679,20 @@ namespace bgfx } break; + case CommandBuffer::SetName: + { + Handle handle; + _cmdbuf.read(handle); + + uint16_t len; + _cmdbuf.read(len); + + const char* name = (const char*)_cmdbuf.skip(len); + + m_renderCtx->setName(handle, name); + } + break; + default: BX_CHECK(false, "Invalid command: %d", command); break; @@ -2597,7 +2773,7 @@ namespace bgfx } else { - bx::CrtAllocator allocator; + bx::DefaultAllocator allocator; g_allocator = s_allocatorStub = BX_NEW(&allocator, AllocatorStub); } @@ -2613,7 +2789,7 @@ namespace bgfx } if (true - && !BX_ENABLED(BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_NACL || BX_PLATFORM_PS4) + && !BX_ENABLED(BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_PS4) && RendererType::Noop != _type && NULL == g_platformData.ndt && NULL == g_platformData.nwh @@ -2636,7 +2812,7 @@ namespace bgfx g_caps.limits.maxTextures = BGFX_CONFIG_MAX_TEXTURES; g_caps.limits.maxTextureSamplers = BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; g_caps.limits.maxVertexDecls = BGFX_CONFIG_MAX_VERTEX_DECLS; - g_caps.limits.maxVertexStreams = BGFX_CONFIG_MAX_VERTEX_STREAMS; + g_caps.limits.maxVertexStreams = 1; g_caps.limits.maxIndexBuffers = BGFX_CONFIG_MAX_INDEX_BUFFERS; g_caps.limits.maxVertexBuffers = BGFX_CONFIG_MAX_VERTEX_BUFFERS; g_caps.limits.maxDynamicIndexBuffers = BGFX_CONFIG_MAX_DYNAMIC_INDEX_BUFFERS; @@ -2644,6 +2820,7 @@ namespace bgfx g_caps.limits.maxUniforms = BGFX_CONFIG_MAX_UNIFORMS; g_caps.limits.maxOcclusionQueries = BGFX_CONFIG_MAX_OCCLUSION_QUERIES; g_caps.limits.maxFBAttachments = 1; + g_caps.limits.maxEncoders = BGFX_CONFIG_MAX_ENCODERS; g_caps.vendorId = _vendorId; g_caps.deviceId = _deviceId; @@ -2667,6 +2844,7 @@ error: case ErrorState::ContextAllocated: BX_ALIGNED_DELETE(g_allocator, s_ctx, 64); s_ctx = NULL; + BX_FALLTHROUGH; case ErrorState::Default: if (NULL != s_callbackStub) @@ -2677,7 +2855,7 @@ error: if (NULL != s_allocatorStub) { - bx::CrtAllocator allocator; + bx::DefaultAllocator allocator; BX_DELETE(&allocator, s_allocatorStub); s_allocatorStub = NULL; } @@ -2695,7 +2873,7 @@ error: { BX_TRACE("Shutdown..."); - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); Context* ctx = s_ctx; // it's going to be NULLd inside shutdown. ctx->shutdown(); BX_CHECK(NULL == s_ctx, "bgfx is should be uninitialized here."); @@ -2717,7 +2895,7 @@ error: if (NULL != s_allocatorStub) { - bx::CrtAllocator allocator; + bx::DefaultAllocator allocator; BX_DELETE(&allocator, s_allocatorStub); s_allocatorStub = NULL; } @@ -2729,14 +2907,310 @@ error: void reset(uint32_t _width, uint32_t _height, uint32_t _flags) { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); BX_CHECK(0 == (_flags&BGFX_RESET_RESERVED_MASK), "Do not set reset reserved flags!"); s_ctx->reset(_width, _height, _flags); } + Encoder* begin() + { + return s_ctx->begin(); + } + +#define BGFX_ENCODER(_func) reinterpret_cast(this)->_func + + void Encoder::setMarker(const char* _marker) + { + BGFX_ENCODER(setMarker(_marker) ); + } + + void Encoder::setState(uint64_t _state, uint32_t _rgba) + { + BX_CHECK(0 == (_state&BGFX_STATE_RESERVED_MASK), "Do not set state reserved flags!"); + BGFX_ENCODER(setState(_state, _rgba) ); + } + + void Encoder::setCondition(OcclusionQueryHandle _handle, bool _visible) + { + BGFX_CHECK_CAPS(BGFX_CAPS_OCCLUSION_QUERY, "Occlusion query is not supported!"); + BGFX_ENCODER(setCondition(_handle, _visible) ); + } + + void Encoder::setStencil(uint32_t _fstencil, uint32_t _bstencil) + { + BGFX_ENCODER(setStencil(_fstencil, _bstencil) ); + } + + uint16_t Encoder::setScissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) + { + return BGFX_ENCODER(setScissor(_x, _y, _width, _height) ); + } + + void Encoder::setScissor(uint16_t _cache) + { + BGFX_ENCODER(setScissor(_cache) ); + } + + uint32_t Encoder::setTransform(const void* _mtx, uint16_t _num) + { + return BGFX_ENCODER(setTransform(_mtx, _num) ); + } + + uint32_t Encoder::allocTransform(Transform* _transform, uint16_t _num) + { + return BGFX_ENCODER(allocTransform(_transform, _num) ); + } + + void Encoder::setTransform(uint32_t _cache, uint16_t _num) + { + BGFX_ENCODER(setTransform(_cache, _num) ); + } + + void Encoder::setUniform(UniformHandle _handle, const void* _value, uint16_t _num) + { + BGFX_CHECK_HANDLE("setUniform", s_ctx->m_uniformHandle, _handle); + const Context::UniformRef& uniform = s_ctx->m_uniformRef[_handle.idx]; + BX_CHECK(isValid(_handle) && 0 < uniform.m_refCount, "Setting invalid uniform (handle %3d)!", _handle.idx); + BX_CHECK(_num == UINT16_MAX || uniform.m_num >= _num, "Truncated uniform update. %d (max: %d)", _num, uniform.m_num); + BGFX_ENCODER(setUniform(uniform.m_type, _handle, _value, UINT16_MAX != _num ? _num : uniform.m_num) ); + } + + void Encoder::setIndexBuffer(IndexBufferHandle _handle) + { + setIndexBuffer(_handle, 0, UINT32_MAX); + } + + void Encoder::setIndexBuffer(IndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices) + { + BGFX_CHECK_HANDLE("setIndexBuffer", s_ctx->m_indexBufferHandle, _handle); + BGFX_ENCODER(setIndexBuffer(_handle, _firstIndex, _numIndices) ); + } + + void Encoder::setIndexBuffer(DynamicIndexBufferHandle _handle) + { + setIndexBuffer(_handle, 0, UINT32_MAX); + } + + void Encoder::setIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices) + { + BGFX_CHECK_HANDLE("setIndexBuffer", s_ctx->m_dynamicIndexBufferHandle, _handle); + const DynamicIndexBuffer& dib = s_ctx->m_dynamicIndexBuffers[_handle.idx]; + BGFX_ENCODER(setIndexBuffer(dib, _firstIndex, _numIndices) ); + } + + void Encoder::setIndexBuffer(const TransientIndexBuffer* _tib) + { + setIndexBuffer(_tib, 0, UINT32_MAX); + } + + void Encoder::setIndexBuffer(const TransientIndexBuffer* _tib, uint32_t _firstIndex, uint32_t _numIndices) + { + BX_CHECK(NULL != _tib, "_tib can't be NULL"); + BGFX_CHECK_HANDLE("setIndexBuffer", s_ctx->m_indexBufferHandle, _tib->handle); + BGFX_ENCODER(setIndexBuffer(_tib, _firstIndex, _numIndices) ); + } + + void Encoder::setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices) + { + BGFX_CHECK_HANDLE("setVertexBuffer", s_ctx->m_vertexBufferHandle, _handle); + BGFX_ENCODER(setVertexBuffer(_stream, _handle, _startVertex, _numVertices) ); + } + + void Encoder::setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle) + { + setVertexBuffer(_stream, _handle, 0, UINT32_MAX); + } + + void Encoder::setVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices) + { + BGFX_CHECK_HANDLE("setVertexBuffer", s_ctx->m_dynamicVertexBufferHandle, _handle); + const DynamicVertexBuffer& dvb = s_ctx->m_dynamicVertexBuffers[_handle.idx]; + BGFX_ENCODER(setVertexBuffer(_stream, dvb, _startVertex, _numVertices) ); + } + + void Encoder::setVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle) + { + setVertexBuffer(_stream, _handle, 0, UINT32_MAX); + } + + void Encoder::setVertexBuffer(uint8_t _stream, const TransientVertexBuffer* _tvb, uint32_t _startVertex, uint32_t _numVertices) + { + BX_CHECK(NULL != _tvb, "_tvb can't be NULL"); + BGFX_CHECK_HANDLE("setVertexBuffer", s_ctx->m_vertexBufferHandle, _tvb->handle); + BGFX_ENCODER(setVertexBuffer(_stream, _tvb, _startVertex, _numVertices) ); + } + + void Encoder::setVertexBuffer(uint8_t _stream, const TransientVertexBuffer* _tvb) + { + setVertexBuffer(_stream, _tvb, 0, UINT32_MAX); + } + + void Encoder::setInstanceDataBuffer(const InstanceDataBuffer* _idb, uint32_t _num) + { + BX_CHECK(NULL != _idb, "_idb can't be NULL"); + BGFX_ENCODER(setInstanceDataBuffer(_idb, _num) ); + } + + void Encoder::setInstanceDataBuffer(VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _num) + { + BGFX_CHECK_HANDLE("setInstanceDataBuffer", s_ctx->m_vertexBufferHandle, _handle); + const VertexBuffer& vb = s_ctx->m_vertexBuffers[_handle.idx]; + BGFX_ENCODER(setInstanceDataBuffer(_handle, _startVertex, _num, vb.m_stride) ); + } + + void Encoder::setInstanceDataBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _num) + { + BGFX_CHECK_HANDLE("setInstanceDataBuffer", s_ctx->m_dynamicVertexBufferHandle, _handle); + const DynamicVertexBuffer& dvb = s_ctx->m_dynamicVertexBuffers[_handle.idx]; + BGFX_ENCODER(setInstanceDataBuffer(dvb.m_handle + , dvb.m_startVertex + _startVertex + , _num + , dvb.m_stride + ) ); + } + + void Encoder::setTexture(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint32_t _flags) + { + BGFX_CHECK_HANDLE("setTexture/UniformHandle", s_ctx->m_uniformHandle, _sampler); + BGFX_CHECK_HANDLE_INVALID_OK("setTexture/TextureHandle", s_ctx->m_textureHandle, _handle); + BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); + BGFX_ENCODER(setTexture(_stage, _sampler, _handle, _flags) ); + } + + void Encoder::touch(ViewId _id) + { + ProgramHandle handle = BGFX_INVALID_HANDLE; + submit(_id, handle); + } + + void Encoder::submit(ViewId _id, ProgramHandle _program, int32_t _depth, bool _preserveState) + { + OcclusionQueryHandle handle = BGFX_INVALID_HANDLE; + submit(_id, _program, handle, _depth, _preserveState); + } + + void Encoder::submit(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, int32_t _depth, bool _preserveState) + { + BX_CHECK(false + || !isValid(_occlusionQuery) + || 0 != (g_caps.supported & BGFX_CAPS_OCCLUSION_QUERY) + , "Occlusion query is not supported! Use bgfx::getCaps to check BGFX_CAPS_OCCLUSION_QUERY backend renderer capabilities." + ); + BGFX_CHECK_HANDLE_INVALID_OK("submit", s_ctx->m_programHandle, _program); + BGFX_CHECK_HANDLE_INVALID_OK("submit", s_ctx->m_occlusionQueryHandle, _occlusionQuery); + BGFX_ENCODER(submit(_id, _program, _occlusionQuery, _depth, _preserveState) ); + } + + void Encoder::submit(ViewId _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState) + { + BGFX_CHECK_HANDLE_INVALID_OK("submit", s_ctx->m_programHandle, _program); + BGFX_CHECK_HANDLE("submit", s_ctx->m_vertexBufferHandle, _indirectHandle); + BGFX_CHECK_CAPS(BGFX_CAPS_DRAW_INDIRECT, "Draw indirect is not supported!"); + BGFX_ENCODER(submit(_id, _program, _indirectHandle, _start, _num, _depth, _preserveState) ); + } + + void Encoder::setBuffer(uint8_t _stage, IndexBufferHandle _handle, Access::Enum _access) + { + BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); + BGFX_CHECK_HANDLE("setBuffer", s_ctx->m_indexBufferHandle, _handle); + BGFX_ENCODER(setBuffer(_stage, _handle, _access) ); + } + + void Encoder::setBuffer(uint8_t _stage, VertexBufferHandle _handle, Access::Enum _access) + { + BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); + BGFX_CHECK_HANDLE("setBuffer", s_ctx->m_vertexBufferHandle, _handle); + BGFX_ENCODER(setBuffer(_stage, _handle, _access) ); + } + + void Encoder::setBuffer(uint8_t _stage, DynamicIndexBufferHandle _handle, Access::Enum _access) + { + BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); + BGFX_CHECK_HANDLE("setBuffer", s_ctx->m_dynamicIndexBufferHandle, _handle); + const DynamicIndexBuffer& dib = s_ctx->m_dynamicIndexBuffers[_handle.idx]; + BGFX_ENCODER(setBuffer(_stage, dib.m_handle, _access) ); + } + + void Encoder::setBuffer(uint8_t _stage, DynamicVertexBufferHandle _handle, Access::Enum _access) + { + BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); + BGFX_CHECK_HANDLE("setBuffer", s_ctx->m_dynamicVertexBufferHandle, _handle); + const DynamicVertexBuffer& dvb = s_ctx->m_dynamicVertexBuffers[_handle.idx]; + BGFX_ENCODER(setBuffer(_stage, dvb.m_handle, _access) ); + } + + void Encoder::setBuffer(uint8_t _stage, IndirectBufferHandle _handle, Access::Enum _access) + { + BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); + BGFX_CHECK_HANDLE("setBuffer", s_ctx->m_vertexBufferHandle, _handle); + VertexBufferHandle handle = { _handle.idx }; + BGFX_ENCODER(setBuffer(_stage, handle, _access) ); + } + + void Encoder::setImage(uint8_t _stage, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format) + { + BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); + BGFX_CHECK_HANDLE_INVALID_OK("setImage/TextureHandle", s_ctx->m_textureHandle, _handle); + _format = TextureFormat::Count == _format + ? TextureFormat::Enum(s_ctx->m_textureRef[_handle.idx].m_format) + : _format + ; + BX_CHECK(_format != TextureFormat::BGRA8 + , "Can't use TextureFormat::BGRA8 with compute, use TextureFormat::RGBA8 instead." + ); + BGFX_ENCODER(setImage(_stage, _handle, _mip, _access, _format) ); + } + + void Encoder::dispatch(ViewId _id, ProgramHandle _program, uint32_t _numX, uint32_t _numY, uint32_t _numZ, uint8_t _flags) + { + BGFX_CHECK_CAPS(BGFX_CAPS_COMPUTE, "Compute is not supported!"); + BGFX_CHECK_HANDLE_INVALID_OK("dispatch", s_ctx->m_programHandle, _program); + BGFX_ENCODER(dispatch(_id, _program, _numX, _numY, _numZ, _flags) ); + } + + void Encoder::dispatch(ViewId _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags) + { + BGFX_CHECK_CAPS(BGFX_CAPS_DRAW_INDIRECT, "Dispatch indirect is not supported!"); + BGFX_CHECK_CAPS(BGFX_CAPS_COMPUTE, "Compute is not supported!"); + BGFX_CHECK_HANDLE_INVALID_OK("dispatch", s_ctx->m_programHandle, _program); + BGFX_CHECK_HANDLE("dispatch", s_ctx->m_vertexBufferHandle, _indirectHandle); + BGFX_ENCODER(dispatch(_id, _program, _indirectHandle, _start, _num, _flags) ); + } + + void Encoder::discard() + { + BGFX_ENCODER(discard() ); + } + + void Encoder::blit(ViewId _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX, uint16_t _srcY, uint16_t _width, uint16_t _height) + { + blit(_id, _dst, 0, _dstX, _dstY, 0, _src, 0, _srcX, _srcY, 0, _width, _height, 0); + } + + void Encoder::blit(ViewId _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) + { + BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_BLIT, "Texture blit is not supported!"); + const Context::TextureRef& src = s_ctx->m_textureRef[_src.idx]; + const Context::TextureRef& dst = s_ctx->m_textureRef[_dst.idx]; + BX_CHECK(src.m_format == dst.m_format + , "Texture format must match (src %s, dst %s)." + , bimg::getName(bimg::TextureFormat::Enum(src.m_format) ) + , bimg::getName(bimg::TextureFormat::Enum(dst.m_format) ) + ); + BX_UNUSED(src, dst); + BGFX_ENCODER(blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth) ); + } + +#undef BGFX_ENCODER + + void end(Encoder* _encoder) + { + s_ctx->end(_encoder); + } + uint32_t frame(bool _capture) { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); return s_ctx->frame(_capture); } @@ -2816,13 +3290,13 @@ error: void setDebug(uint32_t _debug) { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); s_ctx->setDebug(_debug); } void dbgTextClear(uint8_t _attr, bool _small) { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); s_ctx->dbgTextClear(_attr, _small); } @@ -2833,7 +3307,7 @@ error: void dbgTextPrintf(uint16_t _x, uint16_t _y, uint8_t _attr, const char* _format, ...) { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); va_list argList; va_start(argList, _format); s_ctx->dbgTextPrintfVargs(_x, _y, _attr, _format, argList); @@ -2842,116 +3316,100 @@ error: void dbgTextImage(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const void* _data, uint16_t _pitch) { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); s_ctx->dbgTextImage(_x, _y, _width, _height, _data, _pitch); } IndexBufferHandle createIndexBuffer(const Memory* _mem, uint16_t _flags) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); return s_ctx->createIndexBuffer(_mem, _flags); } - void destroyIndexBuffer(IndexBufferHandle _handle) + void destroy(IndexBufferHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->destroyIndexBuffer(_handle); } VertexBufferHandle createVertexBuffer(const Memory* _mem, const VertexDecl& _decl, uint16_t _flags) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); - BX_CHECK(0 != _decl.m_stride, "Invalid VertexDecl."); + BX_CHECK(isValid(_decl), "Invalid VertexDecl."); return s_ctx->createVertexBuffer(_mem, _decl, _flags); } - void destroyVertexBuffer(VertexBufferHandle _handle) + void destroy(VertexBufferHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->destroyVertexBuffer(_handle); } DynamicIndexBufferHandle createDynamicIndexBuffer(uint32_t _num, uint16_t _flags) { - BGFX_CHECK_MAIN_THREAD(); return s_ctx->createDynamicIndexBuffer(_num, _flags); } DynamicIndexBufferHandle createDynamicIndexBuffer(const Memory* _mem, uint16_t _flags) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); return s_ctx->createDynamicIndexBuffer(_mem, _flags); } void updateDynamicIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _startIndex, const Memory* _mem) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); s_ctx->updateDynamicIndexBuffer(_handle, _startIndex, _mem); } - void destroyDynamicIndexBuffer(DynamicIndexBufferHandle _handle) + void destroy(DynamicIndexBufferHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->destroyDynamicIndexBuffer(_handle); } DynamicVertexBufferHandle createDynamicVertexBuffer(uint32_t _num, const VertexDecl& _decl, uint16_t _flags) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(0 != _decl.m_stride, "Invalid VertexDecl."); + BX_CHECK(isValid(_decl), "Invalid VertexDecl."); return s_ctx->createDynamicVertexBuffer(_num, _decl, _flags); } DynamicVertexBufferHandle createDynamicVertexBuffer(const Memory* _mem, const VertexDecl& _decl, uint16_t _flags) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); - BX_CHECK(0 != _decl.m_stride, "Invalid VertexDecl."); + BX_CHECK(isValid(_decl), "Invalid VertexDecl."); return s_ctx->createDynamicVertexBuffer(_mem, _decl, _flags); } void updateDynamicVertexBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, const Memory* _mem) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); s_ctx->updateDynamicVertexBuffer(_handle, _startVertex, _mem); } - void destroyDynamicVertexBuffer(DynamicVertexBufferHandle _handle) + void destroy(DynamicVertexBufferHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->destroyDynamicVertexBuffer(_handle); } uint32_t getAvailTransientIndexBuffer(uint32_t _num) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(0 < _num, "Requesting 0 indices."); return s_ctx->getAvailTransientIndexBuffer(_num); } uint32_t getAvailTransientVertexBuffer(uint32_t _num, const VertexDecl& _decl) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(0 < _num, "Requesting 0 vertices."); - BX_CHECK(0 != _decl.m_stride, "Invalid VertexDecl."); + BX_CHECK(isValid(_decl), "Invalid VertexDecl."); return s_ctx->getAvailTransientVertexBuffer(_num, _decl.m_stride); } uint32_t getAvailInstanceDataBuffer(uint32_t _num, uint16_t _stride) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(0 < _num, "Requesting 0 instances."); return s_ctx->getAvailTransientVertexBuffer(_num, _stride); } void allocTransientIndexBuffer(TransientIndexBuffer* _tib, uint32_t _num) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _tib, "_tib can't be NULL"); BX_CHECK(0 < _num, "Requesting 0 indices."); s_ctx->allocTransientIndexBuffer(_tib, _num); @@ -2963,11 +3421,10 @@ error: void allocTransientVertexBuffer(TransientVertexBuffer* _tvb, uint32_t _num, const VertexDecl& _decl) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _tvb, "_tvb can't be NULL"); BX_CHECK(0 < _num, "Requesting 0 vertices."); BX_CHECK(UINT16_MAX >= _num, "Requesting %d vertices (max: %d).", _num, UINT16_MAX); - BX_CHECK(0 != _decl.m_stride, "Invalid VertexDecl."); + BX_CHECK(isValid(_decl), "Invalid VertexDecl."); s_ctx->allocTransientVertexBuffer(_tvb, _num, _decl); BX_CHECK(_num == _tvb->size / _decl.m_stride, "Failed to allocate transient vertex buffer (requested %d, available %d). Use bgfx::checkAvailTransient* functions to ensure availability." , _num @@ -2977,6 +3434,8 @@ error: bool allocTransientBuffers(bgfx::TransientVertexBuffer* _tvb, const bgfx::VertexDecl& _decl, uint32_t _numVertices, bgfx::TransientIndexBuffer* _tib, uint32_t _numIndices) { + BGFX_MUTEX_SCOPE(s_ctx->m_resourceApiLock); + if (_numVertices == getAvailTransientVertexBuffer(_numVertices, _decl) && _numIndices == getAvailTransientIndexBuffer(_numIndices) ) { @@ -2988,53 +3447,51 @@ error: return false; } - const InstanceDataBuffer* allocInstanceDataBuffer(uint32_t _num, uint16_t _stride) + void allocInstanceDataBuffer(InstanceDataBuffer* _idb, uint32_t _num, uint16_t _stride) { - BGFX_CHECK_MAIN_THREAD(); BGFX_CHECK_CAPS(BGFX_CAPS_INSTANCING, "Instancing is not supported!"); + BX_CHECK(_stride == BX_ALIGN_16(_stride), "Stride must be multiple of 16."); BX_CHECK(0 < _num, "Requesting 0 instanced data vertices."); - const InstanceDataBuffer* idb = s_ctx->allocInstanceDataBuffer(_num, _stride); - BX_CHECK(_num == idb->size / _stride, "Failed to allocate instance data buffer (requested %d, available %d). Use bgfx::checkAvailTransient* functions to ensure availability." + s_ctx->allocInstanceDataBuffer(_idb, _num, _stride); + BX_CHECK(_num == _idb->size / _stride, "Failed to allocate instance data buffer (requested %d, available %d). Use bgfx::checkAvailTransient* functions to ensure availability." , _num - , idb->size / _stride + , _idb->size / _stride ); - return idb; } IndirectBufferHandle createIndirectBuffer(uint32_t _num) { - BGFX_CHECK_MAIN_THREAD(); return s_ctx->createIndirectBuffer(_num); } - void destroyIndirectBuffer(IndirectBufferHandle _handle) + void destroy(IndirectBufferHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->destroyIndirectBuffer(_handle); } ShaderHandle createShader(const Memory* _mem) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); return s_ctx->createShader(_mem); } uint16_t getShaderUniforms(ShaderHandle _handle, UniformHandle* _uniforms, uint16_t _max) { - BGFX_CHECK_MAIN_THREAD(); return s_ctx->getShaderUniforms(_handle, _uniforms, _max); } - void destroyShader(ShaderHandle _handle) + void setName(ShaderHandle _handle, const char* _name) + { + s_ctx->setName(_handle, _name); + } + + void destroy(ShaderHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->destroyShader(_handle); } ProgramHandle createProgram(ShaderHandle _vsh, ShaderHandle _fsh, bool _destroyShaders) { - BGFX_CHECK_MAIN_THREAD(); if (!isValid(_fsh) ) { return createProgram(_vsh, _destroyShaders); @@ -3045,13 +3502,11 @@ error: ProgramHandle createProgram(ShaderHandle _csh, bool _destroyShader) { - BGFX_CHECK_MAIN_THREAD(); return s_ctx->createProgram(_csh, _destroyShader); } - void destroyProgram(ProgramHandle _handle) + void destroy(ProgramHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->destroyProgram(_handle); } @@ -3124,6 +3579,14 @@ error: srgbCaps = BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB; } + if (formatSupported + && 0 != (_flags & BGFX_TEXTURE_RT_MASK) ) + { + formatSupported = 0 != (g_caps.formats[_format] & (0 + | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER + ) ); + } + if (!formatSupported) { _err->setError(BGFX_ERROR_TEXTURE_VALIDATION @@ -3134,7 +3597,7 @@ error: } if (0 != (_flags & BGFX_TEXTURE_MSAA_SAMPLE) - && 0 == (g_caps.supported & BGFX_CAPS_FORMAT_TEXTURE_MSAA) ) + && 0 == (g_caps.formats[_format] & BGFX_CAPS_FORMAT_TEXTURE_MSAA) ) { _err->setError(BGFX_ERROR_TEXTURE_VALIDATION , "MSAA sampling for this texture format is not supported." @@ -3170,7 +3633,6 @@ error: TextureHandle createTexture(const Memory* _mem, uint32_t _flags, uint8_t _skip, TextureInfo* _info) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); return s_ctx->createTexture(_mem, _flags, _skip, _info, BackbufferRatio::Count); } @@ -3195,8 +3657,6 @@ error: static TextureHandle createTexture2D(BackbufferRatio::Enum _ratio, uint16_t _width, uint16_t _height, bool _hasMips, uint16_t _numLayers, TextureFormat::Enum _format, uint32_t _flags, const Memory* _mem) { - BGFX_CHECK_MAIN_THREAD(); - bx::Error err; isTextureValid(0, false, _numLayers, _format, _flags, &err); BX_CHECK(err.isOk(), "%s (layers %d, format %s)" @@ -3262,8 +3722,6 @@ error: TextureHandle createTexture3D(uint16_t _width, uint16_t _height, uint16_t _depth, bool _hasMips, TextureFormat::Enum _format, uint32_t _flags, const Memory* _mem) { - BGFX_CHECK_MAIN_THREAD(); - bx::Error err; isTextureValid(_depth, false, 1, _format, _flags, &err); BX_CHECK(err.isOk(), "%s", err.getMessage().getPtr() ); @@ -3305,8 +3763,6 @@ error: TextureHandle createTextureCube(uint16_t _size, bool _hasMips, uint16_t _numLayers, TextureFormat::Enum _format, uint32_t _flags, const Memory* _mem) { - BGFX_CHECK_MAIN_THREAD(); - bx::Error err; isTextureValid(0, true, _numLayers, _format, _flags, &err); BX_CHECK(err.isOk(), "%s", err.getMessage().getPtr() ); @@ -3347,15 +3803,23 @@ error: return s_ctx->createTexture(mem, _flags, 0, NULL, BackbufferRatio::Count); } - void destroyTexture(TextureHandle _handle) + void setName(TextureHandle _handle, const char* _name) + { + s_ctx->setName(_handle, _name); + } + + void* getDirectAccessPtr(TextureHandle _handle) + { + return s_ctx->getDirectAccessPtr(_handle); + } + + void destroy(TextureHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->destroyTexture(_handle); } void updateTexture2D(TextureHandle _handle, uint16_t _layer, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const Memory* _mem, uint16_t _pitch) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); if (_width == 0 || _height == 0) @@ -3370,7 +3834,6 @@ error: void updateTexture3D(TextureHandle _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const Memory* _mem) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_3D, "Texture3D is not supported!"); @@ -3388,7 +3851,6 @@ error: void updateTextureCube(TextureHandle _handle, uint16_t _layer, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const Memory* _mem, uint16_t _pitch) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _mem, "_mem can't be NULL"); BX_CHECK(_side <= 5, "Invalid side %d.", _side); if (0 == _width @@ -3404,7 +3866,6 @@ error: uint32_t readTexture(TextureHandle _handle, void* _data, uint8_t _mip) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(NULL != _data, "_data can't be NULL"); BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_READ_BACK, "Texture read-back is not supported!"); return s_ctx->readTexture(_handle, _data, _mip); @@ -3440,9 +3901,9 @@ error: FrameBufferHandle createFrameBuffer(uint8_t _num, const Attachment* _attachment, bool _destroyTextures) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(_num != 0, "Number of frame buffer attachments can't be 0."); - BX_CHECK(_num <= BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS, "Number of frame buffer attachments is larger than allowed %d (max: %d)." + BX_CHECK(_num <= BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS + , "Number of frame buffer attachments is larger than allowed %d (max: %d)." , _num , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS ); @@ -3452,117 +3913,113 @@ error: FrameBufferHandle createFrameBuffer(void* _nwh, uint16_t _width, uint16_t _height, TextureFormat::Enum _depthFormat) { - BGFX_CHECK_MAIN_THREAD(); - return s_ctx->createFrameBuffer(_nwh, _width, _height, _depthFormat); + BGFX_CHECK_CAPS(BGFX_CAPS_SWAP_CHAIN, "Swap chain is not supported!"); + BX_WARN(_width > 0 && _height > 0 + , "Invalid frame buffer dimensions (width %d, height %d)." + , _width + , _height + ); + return s_ctx->createFrameBuffer( + _nwh + , bx::uint16_max(_width, 1) + , bx::uint16_max(_height, 1) + , _depthFormat + ); } TextureHandle getTexture(FrameBufferHandle _handle, uint8_t _attachment) { - BGFX_CHECK_MAIN_THREAD(); return s_ctx->getTexture(_handle, _attachment); } - void destroyFrameBuffer(FrameBufferHandle _handle) + void destroy(FrameBufferHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->destroyFrameBuffer(_handle); } UniformHandle createUniform(const char* _name, UniformType::Enum _type, uint16_t _num) { - BGFX_CHECK_MAIN_THREAD(); return s_ctx->createUniform(_name, _type, _num); } void getUniformInfo(UniformHandle _handle, UniformInfo& _info) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->getUniformInfo(_handle, _info); } - void destroyUniform(UniformHandle _handle) + void destroy(UniformHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->destroyUniform(_handle); } OcclusionQueryHandle createOcclusionQuery() { - BGFX_CHECK_MAIN_THREAD(); BGFX_CHECK_CAPS(BGFX_CAPS_OCCLUSION_QUERY, "Occlusion query is not supported!"); return s_ctx->createOcclusionQuery(); } OcclusionQueryResult::Enum getResult(OcclusionQueryHandle _handle, int32_t* _result) { - BGFX_CHECK_MAIN_THREAD(); BGFX_CHECK_CAPS(BGFX_CAPS_OCCLUSION_QUERY, "Occlusion query is not supported!"); return s_ctx->getResult(_handle, _result); } - void destroyOcclusionQuery(OcclusionQueryHandle _handle) + void destroy(OcclusionQueryHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); BGFX_CHECK_CAPS(BGFX_CAPS_OCCLUSION_QUERY, "Occlusion query is not supported!"); s_ctx->destroyOcclusionQuery(_handle); } void setPaletteColor(uint8_t _index, uint32_t _rgba) { - BGFX_CHECK_MAIN_THREAD(); - const uint8_t rr = uint8_t(_rgba>>24); const uint8_t gg = uint8_t(_rgba>>16); const uint8_t bb = uint8_t(_rgba>> 8); const uint8_t aa = uint8_t(_rgba>> 0); - float rgba[4] = + const float rgba[4] = { rr * 1.0f/255.0f, gg * 1.0f/255.0f, bb * 1.0f/255.0f, aa * 1.0f/255.0f, }; + s_ctx->setPaletteColor(_index, rgba); } void setPaletteColor(uint8_t _index, float _r, float _g, float _b, float _a) { - BGFX_CHECK_MAIN_THREAD(); float rgba[4] = { _r, _g, _b, _a }; s_ctx->setPaletteColor(_index, rgba); } void setPaletteColor(uint8_t _index, const float _rgba[4]) { - BGFX_CHECK_MAIN_THREAD(); s_ctx->setPaletteColor(_index, _rgba); } - bool checkView(uint8_t _id) + bool checkView(ViewId _id) { // workaround GCC 4.9 type-limit check. const uint32_t id = _id; return id < BGFX_CONFIG_MAX_VIEWS; } - void setViewName(uint8_t _id, const char* _name) + void setViewName(ViewId _id, const char* _name) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); s_ctx->setViewName(_id, _name); } - void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) + void setViewRect(ViewId _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); s_ctx->setViewRect(_id, _x, _y, _width, _height); } - void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, BackbufferRatio::Enum _ratio) + void setViewRect(ViewId _id, uint16_t _x, uint16_t _y, BackbufferRatio::Enum _ratio) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); uint16_t width = uint16_t(s_ctx->m_resolution.m_width); @@ -3571,122 +4028,112 @@ error: setViewRect(_id, _x, _y, width, height); } - void setViewScissor(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) + void setViewScissor(ViewId _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); s_ctx->setViewScissor(_id, _x, _y, _width, _height); } - void setViewClear(uint8_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) + void setViewClear(ViewId _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); s_ctx->setViewClear(_id, _flags, _rgba, _depth, _stencil); } - void setViewClear(uint8_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) + void setViewClear(ViewId _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); s_ctx->setViewClear(_id, _flags, _depth, _stencil, _0, _1, _2, _3, _4, _5, _6, _7); } - void setViewSeq(uint8_t _id, bool _enabled) + void setViewMode(ViewId _id, ViewMode::Enum _mode) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); - s_ctx->setViewSeq(_id, _enabled); + s_ctx->setViewMode(_id, _mode); } - void setViewFrameBuffer(uint8_t _id, FrameBufferHandle _handle) + void setViewFrameBuffer(ViewId _id, FrameBufferHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); s_ctx->setViewFrameBuffer(_id, _handle); } - void setViewTransform(uint8_t _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR) + void setViewTransform(ViewId _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); s_ctx->setViewTransform(_id, _view, _projL, _flags, _projR); } - void setViewOrder(uint8_t _id, uint8_t _num, const void* _order) + void setViewOrder(ViewId _id, uint16_t _num, const ViewId* _order) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); s_ctx->setViewOrder(_id, _num, _order); } - void resetView(uint8_t _id) + void resetView(ViewId _id) { - BGFX_CHECK_MAIN_THREAD(); BX_CHECK(checkView(_id), "Invalid view id: %d", _id); s_ctx->resetView(_id); } void setMarker(const char* _marker) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setMarker(_marker); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setMarker(_marker); } void setState(uint64_t _state, uint32_t _rgba) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(0 == (_state&BGFX_STATE_RESERVED_MASK), "Do not set state reserved flags!"); - s_ctx->setState(_state, _rgba); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setState(_state, _rgba); } void setCondition(OcclusionQueryHandle _handle, bool _visible) { - BGFX_CHECK_MAIN_THREAD(); - BGFX_CHECK_CAPS(BGFX_CAPS_OCCLUSION_QUERY, "Occlusion query is not supported!"); - s_ctx->setCondition(_handle, _visible); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setCondition(_handle, _visible); } void setStencil(uint32_t _fstencil, uint32_t _bstencil) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setStencil(_fstencil, _bstencil); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setStencil(_fstencil, _bstencil); } uint16_t setScissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) { - BGFX_CHECK_MAIN_THREAD(); - return s_ctx->setScissor(_x, _y, _width, _height); + BGFX_CHECK_API_THREAD(); + return s_ctx->m_encoder0->setScissor(_x, _y, _width, _height); } void setScissor(uint16_t _cache) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setScissor(_cache); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setScissor(_cache); } uint32_t setTransform(const void* _mtx, uint16_t _num) { - BGFX_CHECK_MAIN_THREAD(); - return s_ctx->setTransform(_mtx, _num); + BGFX_CHECK_API_THREAD(); + return s_ctx->m_encoder0->setTransform(_mtx, _num); } uint32_t allocTransform(Transform* _transform, uint16_t _num) { - BGFX_CHECK_MAIN_THREAD(); - return s_ctx->allocTransform(_transform, _num); + BGFX_CHECK_API_THREAD(); + return s_ctx->m_encoder0->allocTransform(_transform, _num); } void setTransform(uint32_t _cache, uint16_t _num) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setTransform(_cache, _num); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setTransform(_cache, _num); } void setUniform(UniformHandle _handle, const void* _value, uint16_t _num) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setUniform(_handle, _value, _num); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setUniform(_handle, _value, _num); } void setIndexBuffer(IndexBufferHandle _handle) @@ -3696,8 +4143,8 @@ error: void setIndexBuffer(IndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setIndexBuffer(_handle, _firstIndex, _numIndices); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setIndexBuffer(_handle, _firstIndex, _numIndices); } void setIndexBuffer(DynamicIndexBufferHandle _handle) @@ -3707,8 +4154,8 @@ error: void setIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setIndexBuffer(_handle, _firstIndex, _numIndices); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setIndexBuffer(_handle, _firstIndex, _numIndices); } void setIndexBuffer(const TransientIndexBuffer* _tib) @@ -3718,184 +4165,177 @@ error: void setIndexBuffer(const TransientIndexBuffer* _tib, uint32_t _firstIndex, uint32_t _numIndices) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(NULL != _tib, "_tib can't be NULL"); - uint32_t numIndices = bx::uint32_min(_numIndices, _tib->size/2); - s_ctx->setIndexBuffer(_tib, _tib->startIndex + _firstIndex, numIndices); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setIndexBuffer(_tib, _firstIndex, _numIndices); } - void setVertexBuffer(VertexBufferHandle _handle) + void setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices) { - setVertexBuffer(_handle, 0, UINT32_MAX); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setVertexBuffer(_stream, _handle, _startVertex, _numVertices); } - void setVertexBuffer(VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices) + void setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setVertexBuffer(0, _handle, _startVertex, _numVertices); + setVertexBuffer(_stream, _handle, 0, UINT32_MAX); } - void setVertexBuffer(DynamicVertexBufferHandle _handle) + void setVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices) { - setVertexBuffer(_handle, 0, UINT32_MAX); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setVertexBuffer(_stream, _handle, _startVertex, _numVertices); } - void setVertexBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices) + void setVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setVertexBuffer(0, _handle, _startVertex, _numVertices); + setVertexBuffer(_stream, _handle, 0, UINT32_MAX); } - void setVertexBuffer(const TransientVertexBuffer* _tvb) + void setVertexBuffer(uint8_t _stream, const TransientVertexBuffer* _tvb, uint32_t _startVertex, uint32_t _numVertices) { - setVertexBuffer(_tvb, 0, UINT32_MAX); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setVertexBuffer(_stream, _tvb, _startVertex, _numVertices); } - void setVertexBuffer(const TransientVertexBuffer* _tvb, uint32_t _startVertex, uint32_t _numVertices) + void setVertexBuffer(uint8_t _stream, const TransientVertexBuffer* _tvb) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(NULL != _tvb, "_tvb can't be NULL"); - s_ctx->setVertexBuffer(0, _tvb, _startVertex, _numVertices); + setVertexBuffer(_stream, _tvb, 0, UINT32_MAX); } void setInstanceDataBuffer(const InstanceDataBuffer* _idb, uint32_t _num) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(NULL != _idb, "_idb can't be NULL"); - s_ctx->setInstanceDataBuffer(_idb, _num); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setInstanceDataBuffer(_idb, _num); } void setInstanceDataBuffer(VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _num) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setInstanceDataBuffer(_handle, _startVertex, _num); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setInstanceDataBuffer(_handle, _startVertex, _num); } void setInstanceDataBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _num) { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->setInstanceDataBuffer(_handle, _startVertex, _num); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setInstanceDataBuffer(_handle, _startVertex, _num); } void setTexture(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint32_t _flags) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); - s_ctx->setTexture(_stage, _sampler, _handle, _flags); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setTexture(_stage, _sampler, _handle, _flags); } - uint32_t touch(uint8_t _id) + void touch(ViewId _id) { ProgramHandle handle = BGFX_INVALID_HANDLE; - return submit(_id, handle); + submit(_id, handle); } - uint32_t submit(uint8_t _id, ProgramHandle _program, int32_t _depth, bool _preserveState) + void submit(ViewId _id, ProgramHandle _program, int32_t _depth, bool _preserveState) { OcclusionQueryHandle handle = BGFX_INVALID_HANDLE; - return submit(_id, _program, handle, _depth, _preserveState); + submit(_id, _program, handle, _depth, _preserveState); } - uint32_t submit(uint8_t _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, int32_t _depth, bool _preserveState) + void submit(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, int32_t _depth, bool _preserveState) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(false - || !isValid(_occlusionQuery) - || 0 != (g_caps.supported & BGFX_CAPS_OCCLUSION_QUERY) - , "Occlusion query is not supported! Use bgfx::getCaps to check BGFX_CAPS_OCCLUSION_QUERY backend renderer capabilities." - ); - return s_ctx->submit(_id, _program, _occlusionQuery, _depth, _preserveState); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->submit(_id, _program, _occlusionQuery, _depth, _preserveState); } - uint32_t submit(uint8_t _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState) + void submit(ViewId _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState) { - BGFX_CHECK_MAIN_THREAD(); - BGFX_CHECK_CAPS(BGFX_CAPS_DRAW_INDIRECT, "Draw indirect is not supported! Use bgfx::getCaps to check BGFX_CAPS_DRAW_INDIRECT backend renderer capabilities."); - return s_ctx->submit(_id, _program, _indirectHandle, _start, _num, _depth, _preserveState); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->submit(_id, _program, _indirectHandle, _start, _num, _depth, _preserveState); } void setBuffer(uint8_t _stage, IndexBufferHandle _handle, Access::Enum _access) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); - s_ctx->setBuffer(_stage, _handle, _access); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setBuffer(_stage, _handle, _access); } void setBuffer(uint8_t _stage, VertexBufferHandle _handle, Access::Enum _access) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); - s_ctx->setBuffer(_stage, _handle, _access); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setBuffer(_stage, _handle, _access); } void setBuffer(uint8_t _stage, DynamicIndexBufferHandle _handle, Access::Enum _access) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); - s_ctx->setBuffer(_stage, _handle, _access); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setBuffer(_stage, _handle, _access); } void setBuffer(uint8_t _stage, DynamicVertexBufferHandle _handle, Access::Enum _access) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); - s_ctx->setBuffer(_stage, _handle, _access); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setBuffer(_stage, _handle, _access); } void setBuffer(uint8_t _stage, IndirectBufferHandle _handle, Access::Enum _access) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); - s_ctx->setBuffer(_stage, _handle, _access); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setBuffer(_stage, _handle, _access); } - void setImage(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format) + void setImage(uint8_t _stage, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format) { - BGFX_CHECK_MAIN_THREAD(); - BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS); - s_ctx->setImage(_stage, _sampler, _handle, _mip, _access, _format); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->setImage(_stage, _handle, _mip, _access, _format); } - uint32_t dispatch(uint8_t _id, ProgramHandle _handle, uint16_t _numX, uint16_t _numY, uint16_t _numZ, uint8_t _flags) + void dispatch(ViewId _id, ProgramHandle _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ, uint8_t _flags) { - BGFX_CHECK_MAIN_THREAD(); - BGFX_CHECK_CAPS(BGFX_CAPS_COMPUTE, "Compute is not supported! Use bgfx::getCaps to check BGFX_CAPS_COMPUTE backend renderer capabilities."); - return s_ctx->dispatch(_id, _handle, _numX, _numY, _numZ, _flags); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->dispatch(_id, _handle, _numX, _numY, _numZ, _flags); } - uint32_t dispatch(uint8_t _id, ProgramHandle _handle, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags) + void dispatch(ViewId _id, ProgramHandle _handle, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags) { - BGFX_CHECK_MAIN_THREAD(); - BGFX_CHECK_CAPS(BGFX_CAPS_DRAW_INDIRECT, "Dispatch indirect is not supported! Use bgfx::getCaps to check BGFX_CAPS_DRAW_INDIRECT backend renderer capabilities."); - BGFX_CHECK_CAPS(BGFX_CAPS_COMPUTE, "Compute is not supported! Use bgfx::getCaps to check BGFX_CAPS_COMPUTE backend renderer capabilities."); - return s_ctx->dispatch(_id, _handle, _indirectHandle, _start, _num, _flags); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->dispatch(_id, _handle, _indirectHandle, _start, _num, _flags); } void discard() { - BGFX_CHECK_MAIN_THREAD(); - s_ctx->discard(); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->discard(); } - void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX, uint16_t _srcY, uint16_t _width, uint16_t _height) + void blit(ViewId _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX, uint16_t _srcY, uint16_t _width, uint16_t _height) { blit(_id, _dst, 0, _dstX, _dstY, 0, _src, 0, _srcX, _srcY, 0, _width, _height, 0); } - void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) + void blit(ViewId _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) { - BGFX_CHECK_MAIN_THREAD(); - BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_BLIT, "Texture blit is not supported!"); - s_ctx->blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth); + BGFX_CHECK_API_THREAD(); + s_ctx->m_encoder0->blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth); } void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) { - BGFX_CHECK_MAIN_THREAD(); + BGFX_CHECK_API_THREAD(); s_ctx->requestScreenShot(_handle, _filePath); } } // namespace bgfx +#if BX_PLATFORM_WINDOWS +extern "C" +{ + // When laptop setup has integrated and discrete GPU, following driver workarounds will + // select discrete GPU: + + // Reference: https://docs.nvidia.com/gameworks/content/technologies/desktop/optimus.htm + __declspec(dllexport) uint32_t NvOptimusEnablement = UINT32_C(1); + + // Reference: http://gpuopen.com/amdpowerxpressrequesthighperformance/ + __declspec(dllexport) uint32_t AmdPowerXpressRequestHighPerformance = UINT32_C(1); +} +#endif // BX_PLATFORM_WINDOWS + #define BGFX_TEXTURE_FORMAT_BIMG(_fmt) \ BX_STATIC_ASSERT(uint32_t(bgfx::TextureFormat::_fmt) == uint32_t(bimg::TextureFormat::_fmt) ) @@ -3965,7 +4405,7 @@ BGFX_TEXTURE_FORMAT_BIMG(R5G6B5); BGFX_TEXTURE_FORMAT_BIMG(RGBA4); BGFX_TEXTURE_FORMAT_BIMG(RGB5A1); BGFX_TEXTURE_FORMAT_BIMG(RGB10A2); -BGFX_TEXTURE_FORMAT_BIMG(R11G11B10F); +BGFX_TEXTURE_FORMAT_BIMG(RG11B10F); BGFX_TEXTURE_FORMAT_BIMG(UnknownDepth); BGFX_TEXTURE_FORMAT_BIMG(D16); BGFX_TEXTURE_FORMAT_BIMG(D24); @@ -4053,47 +4493,62 @@ namespace bgfx { } - virtual void fatal(Fatal::Enum _code, const char* _str) BX_OVERRIDE + virtual void fatal(Fatal::Enum _code, const char* _str) override { m_interface->vtbl->fatal(m_interface, (bgfx_fatal_t)_code, _str); } - virtual void traceVargs(const char* _filePath, uint16_t _line, const char* _format, va_list _argList) BX_OVERRIDE + virtual void traceVargs(const char* _filePath, uint16_t _line, const char* _format, va_list _argList) override { m_interface->vtbl->trace_vargs(m_interface, _filePath, _line, _format, _argList); } - virtual uint32_t cacheReadSize(uint64_t _id) BX_OVERRIDE + virtual void profilerBegin(const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line) override + { + m_interface->vtbl->profiler_begin(m_interface, _name, _abgr, _filePath, _line); + } + + virtual void profilerBeginLiteral(const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line) override + { + m_interface->vtbl->profiler_begin_literal(m_interface, _name, _abgr, _filePath, _line); + } + + virtual void profilerEnd() override + { + m_interface->vtbl->profiler_end(m_interface); + } + + virtual uint32_t cacheReadSize(uint64_t _id) override { return m_interface->vtbl->cache_read_size(m_interface, _id); } - virtual bool cacheRead(uint64_t _id, void* _data, uint32_t _size) BX_OVERRIDE + virtual bool cacheRead(uint64_t _id, void* _data, uint32_t _size) override { return m_interface->vtbl->cache_read(m_interface, _id, _data, _size); } - virtual void cacheWrite(uint64_t _id, const void* _data, uint32_t _size) BX_OVERRIDE + virtual void cacheWrite(uint64_t _id, const void* _data, uint32_t _size) override { m_interface->vtbl->cache_write(m_interface, _id, _data, _size); } - virtual void screenShot(const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _data, uint32_t _size, bool _yflip) BX_OVERRIDE + virtual void screenShot(const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _data, uint32_t _size, bool _yflip) override { m_interface->vtbl->screen_shot(m_interface, _filePath, _width, _height, _pitch, _data, _size, _yflip); } - virtual void captureBegin(uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format, bool _yflip) BX_OVERRIDE + virtual void captureBegin(uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format, bool _yflip) override { m_interface->vtbl->capture_begin(m_interface, _width, _height, _pitch, (bgfx_texture_format_t)_format, _yflip); } - virtual void captureEnd() BX_OVERRIDE + virtual void captureEnd() override { m_interface->vtbl->capture_end(m_interface); } - virtual void captureFrame(const void* _data, uint32_t _size) BX_OVERRIDE + virtual void captureFrame(const void* _data, uint32_t _size) override { m_interface->vtbl->capture_frame(m_interface, _data, _size); } @@ -4108,7 +4563,7 @@ namespace bgfx { } - virtual void* realloc(void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line) BX_OVERRIDE + virtual void* realloc(void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line) override { return m_interface->vtbl->realloc(m_interface, _ptr, _size, _align, _file, _line); } @@ -4208,7 +4663,7 @@ BGFX_C_API bool bgfx_init(bgfx_renderer_type_t _type, uint16_t _vendorId, uint16 ); } -BGFX_C_API void bgfx_shutdown() +BGFX_C_API void bgfx_shutdown(void) { return bgfx::shutdown(); } @@ -4223,22 +4678,22 @@ BGFX_C_API uint32_t bgfx_frame(bool _capture) return bgfx::frame(_capture); } -BGFX_C_API bgfx_renderer_type_t bgfx_get_renderer_type() +BGFX_C_API bgfx_renderer_type_t bgfx_get_renderer_type(void) { return bgfx_renderer_type_t(bgfx::getRendererType() ); } -BGFX_C_API const bgfx_caps_t* bgfx_get_caps() +BGFX_C_API const bgfx_caps_t* bgfx_get_caps(void) { return (const bgfx_caps_t*)bgfx::getCaps(); } -BGFX_C_API const bgfx_hmd_t* bgfx_get_hmd() +BGFX_C_API const bgfx_hmd_t* bgfx_get_hmd(void) { return (const bgfx_hmd_t*)bgfx::getHMD(); } -BGFX_C_API const bgfx_stats_t* bgfx_get_stats() +BGFX_C_API const bgfx_stats_t* bgfx_get_stats(void) { return (const bgfx_stats_t*)bgfx::getStats(); } @@ -4301,7 +4756,7 @@ BGFX_C_API bgfx_index_buffer_handle_t bgfx_create_index_buffer(const bgfx_memory BGFX_C_API void bgfx_destroy_index_buffer(bgfx_index_buffer_handle_t _handle) { union { bgfx_index_buffer_handle_t c; bgfx::IndexBufferHandle cpp; } handle = { _handle }; - bgfx::destroyIndexBuffer(handle.cpp); + bgfx::destroy(handle.cpp); } BGFX_C_API bgfx_vertex_buffer_handle_t bgfx_create_vertex_buffer(const bgfx_memory_t* _mem, const bgfx_vertex_decl_t* _decl, uint16_t _flags) @@ -4315,7 +4770,7 @@ BGFX_C_API bgfx_vertex_buffer_handle_t bgfx_create_vertex_buffer(const bgfx_memo BGFX_C_API void bgfx_destroy_vertex_buffer(bgfx_vertex_buffer_handle_t _handle) { union { bgfx_vertex_buffer_handle_t c; bgfx::VertexBufferHandle cpp; } handle = { _handle }; - bgfx::destroyVertexBuffer(handle.cpp); + bgfx::destroy(handle.cpp); } BGFX_C_API bgfx_dynamic_index_buffer_handle_t bgfx_create_dynamic_index_buffer(uint32_t _num, uint16_t _flags) @@ -4341,7 +4796,7 @@ BGFX_C_API void bgfx_update_dynamic_index_buffer(bgfx_dynamic_index_buffer_handl BGFX_C_API void bgfx_destroy_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle) { union { bgfx_dynamic_index_buffer_handle_t c; bgfx::DynamicIndexBufferHandle cpp; } handle = { _handle }; - bgfx::destroyDynamicIndexBuffer(handle.cpp); + bgfx::destroy(handle.cpp); } BGFX_C_API bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer(uint32_t _num, const bgfx_vertex_decl_t* _decl, uint16_t _flags) @@ -4369,7 +4824,7 @@ BGFX_C_API void bgfx_update_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_han BGFX_C_API void bgfx_destroy_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle) { union { bgfx_dynamic_vertex_buffer_handle_t c; bgfx::DynamicVertexBufferHandle cpp; } handle = { _handle }; - bgfx::destroyDynamicVertexBuffer(handle.cpp); + bgfx::destroy(handle.cpp); } BGFX_C_API uint32_t bgfx_get_avail_transient_index_buffer(uint32_t _num) @@ -4405,9 +4860,9 @@ BGFX_C_API bool bgfx_alloc_transient_buffers(bgfx_transient_vertex_buffer_t* _tv return bgfx::allocTransientBuffers( (bgfx::TransientVertexBuffer*)_tvb, decl, _numVertices, (bgfx::TransientIndexBuffer*)_tib, _numIndices); } -BGFX_C_API const bgfx_instance_data_buffer_t* bgfx_alloc_instance_data_buffer(uint32_t _num, uint16_t _stride) +BGFX_C_API void bgfx_alloc_instance_data_buffer(bgfx_instance_data_buffer_t* _idb, uint32_t _num, uint16_t _stride) { - return (bgfx_instance_data_buffer_t*)bgfx::allocInstanceDataBuffer(_num, _stride); + bgfx::allocInstanceDataBuffer( (bgfx::InstanceDataBuffer*)_idb, _num, _stride); } BGFX_C_API bgfx_indirect_buffer_handle_t bgfx_create_indirect_buffer(uint32_t _num) @@ -4420,7 +4875,7 @@ BGFX_C_API bgfx_indirect_buffer_handle_t bgfx_create_indirect_buffer(uint32_t _n BGFX_C_API void bgfx_destroy_indirect_buffer(bgfx_indirect_buffer_handle_t _handle) { union { bgfx_indirect_buffer_handle_t c; bgfx::IndirectBufferHandle cpp; } handle = { _handle }; - bgfx::destroyIndirectBuffer(handle.cpp); + bgfx::destroy(handle.cpp); } BGFX_C_API bgfx_shader_handle_t bgfx_create_shader(const bgfx_memory_t* _mem) @@ -4436,10 +4891,16 @@ BGFX_C_API uint16_t bgfx_get_shader_uniforms(bgfx_shader_handle_t _handle, bgfx_ return bgfx::getShaderUniforms(handle.cpp, (bgfx::UniformHandle*)_uniforms, _max); } +BGFX_C_API void bgfx_set_shader_name(bgfx_shader_handle_t _handle, const char* _name) +{ + union { bgfx_shader_handle_t c; bgfx::ShaderHandle cpp; } handle = { _handle }; + bgfx::setName(handle.cpp, _name); +} + BGFX_C_API void bgfx_destroy_shader(bgfx_shader_handle_t _handle) { union { bgfx_shader_handle_t c; bgfx::ShaderHandle cpp; } handle = { _handle }; - bgfx::destroyShader(handle.cpp); + bgfx::destroy(handle.cpp); } BGFX_C_API bgfx_program_handle_t bgfx_create_program(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders) @@ -4462,7 +4923,7 @@ BGFX_C_API bgfx_program_handle_t bgfx_create_compute_program(bgfx_shader_handle_ BGFX_C_API void bgfx_destroy_program(bgfx_program_handle_t _handle) { union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } handle = { _handle }; - bgfx::destroyProgram(handle.cpp); + bgfx::destroy(handle.cpp); } BGFX_C_API bool bgfx_is_texture_valid(uint16_t _depth, bool _cubeMap, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags) @@ -4536,10 +4997,22 @@ BGFX_C_API uint32_t bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data return bgfx::readTexture(handle.cpp, _data, _mip); } +BGFX_C_API void bgfx_set_texture_name(bgfx_texture_handle_t _handle, const char* _name) +{ + union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle }; + bgfx::setName(handle.cpp, _name); +} + +BGFX_C_API void* bgfx_get_direct_access_ptr(bgfx_texture_handle_t _handle) +{ + union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle }; + return bgfx::getDirectAccessPtr(handle.cpp); +} + BGFX_C_API void bgfx_destroy_texture(bgfx_texture_handle_t _handle) { union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle }; - bgfx::destroyTexture(handle.cpp); + bgfx::destroy(handle.cpp); } BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint32_t _textureFlags) @@ -4588,7 +5061,7 @@ BGFX_C_API bgfx_texture_handle_t bgfx_get_texture(bgfx_frame_buffer_handle_t _ha BGFX_C_API void bgfx_destroy_frame_buffer(bgfx_frame_buffer_handle_t _handle) { union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle = { _handle }; - bgfx::destroyFrameBuffer(handle.cpp); + bgfx::destroy(handle.cpp); } BGFX_C_API bgfx_uniform_handle_t bgfx_create_uniform(const char* _name, bgfx_uniform_type_t _type, uint16_t _num) @@ -4608,10 +5081,10 @@ BGFX_C_API void bgfx_get_uniform_info(bgfx_uniform_handle_t _handle, bgfx_unifor BGFX_C_API void bgfx_destroy_uniform(bgfx_uniform_handle_t _handle) { union { bgfx_uniform_handle_t c; bgfx::UniformHandle cpp; } handle = { _handle }; - bgfx::destroyUniform(handle.cpp); + bgfx::destroy(handle.cpp); } -BGFX_C_API bgfx_occlusion_query_handle_t bgfx_create_occlusion_query() +BGFX_C_API bgfx_occlusion_query_handle_t bgfx_create_occlusion_query(void) { union { bgfx_occlusion_query_handle_t c; bgfx::OcclusionQueryHandle cpp; } handle; handle.cpp = bgfx::createOcclusionQuery(); @@ -4627,7 +5100,7 @@ BGFX_C_API bgfx_occlusion_query_result_t bgfx_get_result(bgfx_occlusion_query_ha BGFX_C_API void bgfx_destroy_occlusion_query(bgfx_occlusion_query_handle_t _handle) { union { bgfx_occlusion_query_handle_t c; bgfx::OcclusionQueryHandle cpp; } handle = { _handle }; - bgfx::destroyOcclusionQuery(handle.cpp); + bgfx::destroy(handle.cpp); } BGFX_C_API void bgfx_set_palette_color(uint8_t _index, const float _rgba[4]) @@ -4635,63 +5108,63 @@ BGFX_C_API void bgfx_set_palette_color(uint8_t _index, const float _rgba[4]) bgfx::setPaletteColor(_index, _rgba); } -BGFX_C_API void bgfx_set_view_name(uint8_t _id, const char* _name) +BGFX_C_API void bgfx_set_view_name(bgfx_view_id_t _id, const char* _name) { bgfx::setViewName(_id, _name); } -BGFX_C_API void bgfx_set_view_rect(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) +BGFX_C_API void bgfx_set_view_rect(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) { bgfx::setViewRect(_id, _x, _y, _width, _height); } -BGFX_C_API void bgfx_set_view_rect_auto(uint8_t _id, uint16_t _x, uint16_t _y, bgfx_backbuffer_ratio_t _ratio) +BGFX_C_API void bgfx_set_view_rect_auto(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, bgfx_backbuffer_ratio_t _ratio) { bgfx::setViewRect(_id, _x, _y, bgfx::BackbufferRatio::Enum(_ratio)); } -BGFX_C_API void bgfx_set_view_scissor(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) +BGFX_C_API void bgfx_set_view_scissor(bgfx_view_id_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) { bgfx::setViewScissor(_id, _x, _y, _width, _height); } -BGFX_C_API void bgfx_set_view_clear(uint8_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) +BGFX_C_API void bgfx_set_view_clear(bgfx_view_id_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) { bgfx::setViewClear(_id, _flags, _rgba, _depth, _stencil); } -BGFX_C_API void bgfx_set_view_clear_mrt(uint8_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) +BGFX_C_API void bgfx_set_view_clear_mrt(bgfx_view_id_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) { bgfx::setViewClear(_id, _flags, _depth, _stencil, _0, _1, _2, _3, _4, _5, _6, _7); } -BGFX_C_API void bgfx_set_view_seq(uint8_t _id, bool _enabled) +BGFX_C_API void bgfx_set_view_mode(bgfx_view_id_t _id, bgfx_view_mode_t _mode) { - bgfx::setViewSeq(_id, _enabled); + bgfx::setViewMode(_id, bgfx::ViewMode::Enum(_mode) ); } -BGFX_C_API void bgfx_set_view_frame_buffer(uint8_t _id, bgfx_frame_buffer_handle_t _handle) +BGFX_C_API void bgfx_set_view_frame_buffer(bgfx_view_id_t _id, bgfx_frame_buffer_handle_t _handle) { union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle = { _handle }; bgfx::setViewFrameBuffer(_id, handle.cpp); } -BGFX_C_API void bgfx_set_view_transform(uint8_t _id, const void* _view, const void* _proj) +BGFX_C_API void bgfx_set_view_transform(bgfx_view_id_t _id, const void* _view, const void* _proj) { bgfx::setViewTransform(_id, _view, _proj); } -BGFX_C_API void bgfx_set_view_transform_stereo(uint8_t _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR) +BGFX_C_API void bgfx_set_view_transform_stereo(bgfx_view_id_t _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR) { bgfx::setViewTransform(_id, _view, _projL, _flags, _projR); } -BGFX_C_API void bgfx_set_view_order(uint8_t _id, uint8_t _num, const void* _order) +BGFX_C_API void bgfx_set_view_order(bgfx_view_id_t _id, uint16_t _num, const bgfx_view_id_t* _order) { bgfx::setViewOrder(_id, _num, _order); } -BGFX_C_API void bgfx_reset_view(uint8_t _id) +BGFX_C_API void bgfx_reset_view(bgfx_view_id_t _id) { bgfx::resetView(_id); } @@ -4765,21 +5238,21 @@ BGFX_C_API void bgfx_set_transient_index_buffer(const bgfx_transient_index_buffe bgfx::setIndexBuffer( (const bgfx::TransientIndexBuffer*)_tib, _firstIndex, _numIndices); } -BGFX_C_API void bgfx_set_vertex_buffer(bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices) +BGFX_C_API void bgfx_set_vertex_buffer(uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices) { union { bgfx_vertex_buffer_handle_t c; bgfx::VertexBufferHandle cpp; } handle = { _handle }; - bgfx::setVertexBuffer(handle.cpp, _startVertex, _numVertices); + bgfx::setVertexBuffer(_stream, handle.cpp, _startVertex, _numVertices); } -BGFX_C_API void bgfx_set_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices) +BGFX_C_API void bgfx_set_dynamic_vertex_buffer(uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices) { union { bgfx_dynamic_vertex_buffer_handle_t c; bgfx::DynamicVertexBufferHandle cpp; } handle = { _handle }; - bgfx::setVertexBuffer(handle.cpp, _startVertex, _numVertices); + bgfx::setVertexBuffer(_stream, handle.cpp, _startVertex, _numVertices); } -BGFX_C_API void bgfx_set_transient_vertex_buffer(const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices) +BGFX_C_API void bgfx_set_transient_vertex_buffer(uint8_t _stream, const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices) { - bgfx::setVertexBuffer( (const bgfx::TransientVertexBuffer*)_tvb, _startVertex, _numVertices); + bgfx::setVertexBuffer(_stream, (const bgfx::TransientVertexBuffer*)_tvb, _startVertex, _numVertices); } BGFX_C_API void bgfx_set_instance_data_buffer(const bgfx_instance_data_buffer_t* _idb, uint32_t _num) @@ -4806,36 +5279,35 @@ BGFX_C_API void bgfx_set_texture(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx::setTexture(_stage, sampler.cpp, handle.cpp, _flags); } -BGFX_C_API uint32_t bgfx_touch(uint8_t _id) +BGFX_C_API void bgfx_touch(bgfx_view_id_t _id) { return bgfx::touch(_id); } -BGFX_C_API uint32_t bgfx_submit(uint8_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState) +BGFX_C_API void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState) { union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } handle = { _handle }; - return bgfx::submit(_id, handle.cpp, _depth, _preserveState); + bgfx::submit(_id, handle.cpp, _depth, _preserveState); } -BGFX_C_API uint32_t bgfx_submit_occlusion_query(uint8_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState) +BGFX_C_API void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState) { union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } program = { _program }; union { bgfx_occlusion_query_handle c; bgfx::OcclusionQueryHandle cpp; } occlusionQuery = { _occlusionQuery }; - return bgfx::submit(_id, program.cpp, occlusionQuery.cpp, _depth, _preserveState); + bgfx::submit(_id, program.cpp, occlusionQuery.cpp, _depth, _preserveState); } -BGFX_C_API uint32_t bgfx_submit_indirect(uint8_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState) +BGFX_C_API void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState) { union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } handle = { _handle }; union { bgfx_indirect_buffer_handle_t c; bgfx::IndirectBufferHandle cpp; } indirectHandle = { _indirectHandle }; - return bgfx::submit(_id, handle.cpp, indirectHandle.cpp, _start, _num, _depth, _preserveState); + bgfx::submit(_id, handle.cpp, indirectHandle.cpp, _start, _num, _depth, _preserveState); } -BGFX_C_API void bgfx_set_image(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format) +BGFX_C_API void bgfx_set_image(uint8_t _stage, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format) { - union { bgfx_uniform_handle_t c; bgfx::UniformHandle cpp; } sampler = { _sampler }; union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle }; - bgfx::setImage(_stage, sampler.cpp, handle.cpp, _mip, bgfx::Access::Enum(_access), bgfx::TextureFormat::Enum(_format) ); + bgfx::setImage(_stage, handle.cpp, _mip, bgfx::Access::Enum(_access), bgfx::TextureFormat::Enum(_format) ); } BGFX_C_API void bgfx_set_compute_index_buffer(uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access) @@ -4868,40 +5340,240 @@ BGFX_C_API void bgfx_set_compute_indirect_buffer(uint8_t _stage, bgfx_indirect_b bgfx::setBuffer(_stage, handle.cpp, bgfx::Access::Enum(_access) ); } -BGFX_C_API uint32_t bgfx_dispatch(uint8_t _id, bgfx_program_handle_t _handle, uint16_t _numX, uint16_t _numY, uint16_t _numZ, uint8_t _flags) +BGFX_C_API void bgfx_dispatch(bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ, uint8_t _flags) { union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } handle = { _handle }; - return bgfx::dispatch(_id, handle.cpp, _numX, _numY, _numZ, _flags); + bgfx::dispatch(_id, handle.cpp, _numX, _numY, _numZ, _flags); } -BGFX_C_API uint32_t bgfx_dispatch_indirect(uint8_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags) +BGFX_C_API void bgfx_dispatch_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags) { union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } handle = { _handle }; union { bgfx_indirect_buffer_handle_t c; bgfx::IndirectBufferHandle cpp; } indirectHandle = { _indirectHandle }; - return bgfx::dispatch(_id, handle.cpp, indirectHandle.cpp, _start, _num, _flags); + bgfx::dispatch(_id, handle.cpp, indirectHandle.cpp, _start, _num, _flags); } -BGFX_C_API void bgfx_discard() +BGFX_C_API void bgfx_discard(void) { bgfx::discard(); } -BGFX_C_API void bgfx_blit(uint8_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) +BGFX_C_API void bgfx_blit(bgfx_view_id_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) { union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } dst = { _dst }; union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } src = { _src }; bgfx::blit(_id, dst.cpp, _dstMip, _dstX, _dstY, _dstZ, src.cpp, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth); } +#define BGFX_ENCODER(_func) reinterpret_cast(_encoder)->_func + +BGFX_C_API void bgfx_encoder_set_marker(bgfx_encoder* _encoder, const char* _marker) +{ + BGFX_ENCODER(setMarker(_marker) ); +} + +BGFX_C_API void bgfx_encoder_set_state(bgfx_encoder* _encoder, uint64_t _state, uint32_t _rgba) +{ + BGFX_ENCODER(setState(_state, _rgba) ); +} + +BGFX_C_API void bgfx_encoder_set_condition(bgfx_encoder* _encoder, bgfx_occlusion_query_handle_t _handle, bool _visible) +{ + union { bgfx_occlusion_query_handle_t c; bgfx::OcclusionQueryHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setCondition(handle.cpp, _visible) ); +} + +BGFX_C_API void bgfx_encoder_set_stencil(bgfx_encoder* _encoder, uint32_t _fstencil, uint32_t _bstencil) +{ + BGFX_ENCODER(setStencil(_fstencil, _bstencil) ); +} + +BGFX_C_API uint16_t bgfx_encoder_set_scissor(bgfx_encoder* _encoder, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) +{ + return BGFX_ENCODER(setScissor(_x, _y, _width, _height) ); +} + +BGFX_C_API void bgfx_encoder_set_scissor_cached(bgfx_encoder* _encoder, uint16_t _cache) +{ + BGFX_ENCODER(setScissor(_cache) ); +} + +BGFX_C_API uint32_t bgfx_encoder_set_transform(bgfx_encoder* _encoder, const void* _mtx, uint16_t _num) +{ + return BGFX_ENCODER(setTransform(_mtx, _num) ); +} + +BGFX_C_API uint32_t bgfx_encoder_alloc_transform(bgfx_encoder* _encoder, bgfx_transform_t* _transform, uint16_t _num) +{ + return BGFX_ENCODER(allocTransform( (bgfx::Transform*)_transform, _num) ); +} + +BGFX_C_API void bgfx_encoder_set_transform_cached(bgfx_encoder* _encoder, uint32_t _cache, uint16_t _num) +{ + BGFX_ENCODER(setTransform(_cache, _num) ); +} + +BGFX_C_API void bgfx_encoder_set_uniform(bgfx_encoder* _encoder, bgfx_uniform_handle_t _handle, const void* _value, uint16_t _num) +{ + union { bgfx_uniform_handle_t c; bgfx::UniformHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setUniform(handle.cpp, _value, _num) ); +} + +BGFX_C_API void bgfx_encoder_set_index_buffer(bgfx_encoder* _encoder, bgfx_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices) +{ + union { bgfx_index_buffer_handle_t c; bgfx::IndexBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setIndexBuffer(handle.cpp, _firstIndex, _numIndices) ); +} + +BGFX_C_API void bgfx_encoder_set_dynamic_index_buffer(bgfx_encoder* _encoder, bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices) +{ + union { bgfx_dynamic_index_buffer_handle_t c; bgfx::DynamicIndexBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setIndexBuffer(handle.cpp, _firstIndex, _numIndices) ); +} + +BGFX_C_API void bgfx_encoder_set_transient_index_buffer(bgfx_encoder* _encoder, const bgfx_transient_index_buffer_t* _tib, uint32_t _firstIndex, uint32_t _numIndices) +{ + BGFX_ENCODER(setIndexBuffer( (const bgfx::TransientIndexBuffer*)_tib, _firstIndex, _numIndices) ); +} + +BGFX_C_API void bgfx_encoder_set_vertex_buffer(bgfx_encoder* _encoder, uint8_t _stream, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices) +{ + union { bgfx_vertex_buffer_handle_t c; bgfx::VertexBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setVertexBuffer(_stream, handle.cpp, _startVertex, _numVertices) ); +} + +BGFX_C_API void bgfx_encoder_set_dynamic_vertex_buffer(bgfx_encoder* _encoder, uint8_t _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices) +{ + union { bgfx_dynamic_vertex_buffer_handle_t c; bgfx::DynamicVertexBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setVertexBuffer(_stream, handle.cpp, _startVertex, _numVertices) ); +} + +BGFX_C_API void bgfx_encoder_set_transient_vertex_buffer(bgfx_encoder* _encoder, uint8_t _stream, const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices) +{ + BGFX_ENCODER(setVertexBuffer(_stream, (const bgfx::TransientVertexBuffer*)_tvb, _startVertex, _numVertices) ); +} + +BGFX_C_API void bgfx_encoder_set_instance_data_buffer(bgfx_encoder* _encoder, const bgfx_instance_data_buffer_t* _idb, uint32_t _num) +{ + BGFX_ENCODER(setInstanceDataBuffer( (const bgfx::InstanceDataBuffer*)_idb, _num) ); +} + +BGFX_C_API void bgfx_encoder_set_instance_data_from_vertex_buffer(bgfx_encoder* _encoder, bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num) +{ + union { bgfx_vertex_buffer_handle_t c; bgfx::VertexBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setInstanceDataBuffer(handle.cpp, _startVertex, _num) ); +} + +BGFX_C_API void bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(bgfx_encoder* _encoder, bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num) +{ + union { bgfx_dynamic_vertex_buffer_handle_t c; bgfx::DynamicVertexBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setInstanceDataBuffer(handle.cpp, _startVertex, _num) ); +} + +BGFX_C_API void bgfx_encoder_set_texture(bgfx_encoder* _encoder, uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags) +{ + union { bgfx_uniform_handle_t c; bgfx::UniformHandle cpp; } sampler = { _sampler }; + union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setTexture(_stage, sampler.cpp, handle.cpp, _flags) ); +} + +BGFX_C_API void bgfx_encoder_touch(bgfx_encoder* _encoder, bgfx_view_id_t _id) +{ + return BGFX_ENCODER(touch(_id) ); +} + +BGFX_C_API void bgfx_encoder_submit(bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, int32_t _depth, bool _preserveState) +{ + union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } handle = { _handle }; + BGFX_ENCODER(submit(_id, handle.cpp, _depth, _preserveState) ); +} + +BGFX_C_API void bgfx_encoder_submit_occlusion_query(bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth, bool _preserveState) +{ + union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } program = { _program }; + union { bgfx_occlusion_query_handle c; bgfx::OcclusionQueryHandle cpp; } occlusionQuery = { _occlusionQuery }; + BGFX_ENCODER(submit(_id, program.cpp, occlusionQuery.cpp, _depth, _preserveState) ); +} + +BGFX_C_API void bgfx_encoder_submit_indirect(bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState) +{ + union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } handle = { _handle }; + union { bgfx_indirect_buffer_handle_t c; bgfx::IndirectBufferHandle cpp; } indirectHandle = { _indirectHandle }; + BGFX_ENCODER(submit(_id, handle.cpp, indirectHandle.cpp, _start, _num, _depth, _preserveState) ); +} + +BGFX_C_API void bgfx_encoder_set_image(bgfx_encoder* _encoder, uint8_t _stage, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format) +{ + union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setImage(_stage, handle.cpp, _mip, bgfx::Access::Enum(_access), bgfx::TextureFormat::Enum(_format) ) ); +} + +BGFX_C_API void bgfx_encoder_set_compute_index_buffer(bgfx_encoder* _encoder, uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access) +{ + union { bgfx_index_buffer_handle_t c; bgfx::IndexBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setBuffer(_stage, handle.cpp, bgfx::Access::Enum(_access) ) ); +} + +BGFX_C_API void bgfx_encoder_set_compute_vertex_buffer(bgfx_encoder* _encoder, uint8_t _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access) +{ + union { bgfx_vertex_buffer_handle_t c; bgfx::VertexBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setBuffer(_stage, handle.cpp, bgfx::Access::Enum(_access) ) ); +} + +BGFX_C_API void bgfx_encoder_set_compute_dynamic_index_buffer(bgfx_encoder* _encoder, uint8_t _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access) +{ + union { bgfx_dynamic_index_buffer_handle_t c; bgfx::DynamicIndexBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setBuffer(_stage, handle.cpp, bgfx::Access::Enum(_access) ) ); +} + +BGFX_C_API void bgfx_encoder_set_compute_dynamic_vertex_buffer(bgfx_encoder* _encoder, uint8_t _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access) +{ + union { bgfx_dynamic_vertex_buffer_handle_t c; bgfx::DynamicVertexBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setBuffer(_stage, handle.cpp, bgfx::Access::Enum(_access) ) ); +} + +BGFX_C_API void bgfx_encoder_set_compute_indirect_buffer(bgfx_encoder* _encoder, uint8_t _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access) +{ + union { bgfx_indirect_buffer_handle_t c; bgfx::IndirectBufferHandle cpp; } handle = { _handle }; + BGFX_ENCODER(setBuffer(_stage, handle.cpp, bgfx::Access::Enum(_access) ) ); +} + +BGFX_C_API void bgfx_encoder_dispatch(bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, uint32_t _numX, uint32_t _numY, uint32_t _numZ, uint8_t _flags) +{ + union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } handle = { _handle }; + BGFX_ENCODER(dispatch(_id, handle.cpp, _numX, _numY, _numZ, _flags) ); +} + +BGFX_C_API void bgfx_encoder_dispatch_indirect(bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags) +{ + union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } handle = { _handle }; + union { bgfx_indirect_buffer_handle_t c; bgfx::IndirectBufferHandle cpp; } indirectHandle = { _indirectHandle }; + BGFX_ENCODER(dispatch(_id, handle.cpp, indirectHandle.cpp, _start, _num, _flags) ); +} + +BGFX_C_API void bgfx_encoder_discard(bgfx_encoder* _encoder) +{ + BGFX_ENCODER(discard() ); +} + +BGFX_C_API void bgfx_encoder_blit(bgfx_encoder* _encoder, bgfx_view_id_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) +{ + union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } dst = { _dst }; + union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } src = { _src }; + BGFX_ENCODER(blit(_id, dst.cpp, _dstMip, _dstX, _dstY, _dstZ, src.cpp, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth) ); +} + +#undef BGFX_ENCODER + BGFX_C_API void bgfx_request_screen_shot(bgfx_frame_buffer_handle _handle, const char* _filePath) { union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle = { _handle }; bgfx::requestScreenShot(handle.cpp, _filePath); } -BGFX_C_API bgfx_render_frame_t bgfx_render_frame() +BGFX_C_API bgfx_render_frame_t bgfx_render_frame(int32_t _msecs) { - return bgfx_render_frame_t(bgfx::renderFrame() ); + return bgfx_render_frame_t(bgfx::renderFrame(_msecs) ); } BGFX_C_API void bgfx_set_platform_data(const bgfx_platform_data_t* _data) @@ -4930,137 +5602,140 @@ BGFX_C_API bgfx_interface_vtbl_t* bgfx_get_interface(uint32_t _version) { if (_version == BGFX_API_VERSION) { -#define BGFX_IMPORT \ - BGFX_IMPORT_FUNC(render_frame) \ - BGFX_IMPORT_FUNC(set_platform_data) \ - BGFX_IMPORT_FUNC(get_internal_data) \ - BGFX_IMPORT_FUNC(override_internal_texture_ptr) \ - BGFX_IMPORT_FUNC(override_internal_texture) \ - BGFX_IMPORT_FUNC(vertex_decl_begin) \ - BGFX_IMPORT_FUNC(vertex_decl_add) \ - BGFX_IMPORT_FUNC(vertex_decl_skip) \ - BGFX_IMPORT_FUNC(vertex_decl_end) \ - BGFX_IMPORT_FUNC(vertex_pack) \ - BGFX_IMPORT_FUNC(vertex_unpack) \ - BGFX_IMPORT_FUNC(vertex_convert) \ - BGFX_IMPORT_FUNC(weld_vertices) \ - BGFX_IMPORT_FUNC(topology_convert) \ - BGFX_IMPORT_FUNC(topology_sort_tri_list) \ - BGFX_IMPORT_FUNC(get_supported_renderers) \ - BGFX_IMPORT_FUNC(get_renderer_name) \ - BGFX_IMPORT_FUNC(init) \ - BGFX_IMPORT_FUNC(shutdown) \ - BGFX_IMPORT_FUNC(reset) \ - BGFX_IMPORT_FUNC(frame) \ - BGFX_IMPORT_FUNC(get_renderer_type) \ - BGFX_IMPORT_FUNC(get_caps) \ - BGFX_IMPORT_FUNC(get_hmd) \ - BGFX_IMPORT_FUNC(get_stats) \ - BGFX_IMPORT_FUNC(alloc) \ - BGFX_IMPORT_FUNC(copy) \ - BGFX_IMPORT_FUNC(make_ref) \ - BGFX_IMPORT_FUNC(make_ref_release) \ - BGFX_IMPORT_FUNC(set_debug) \ - BGFX_IMPORT_FUNC(dbg_text_clear) \ - BGFX_IMPORT_FUNC(dbg_text_printf) \ - BGFX_IMPORT_FUNC(dbg_text_vprintf) \ - BGFX_IMPORT_FUNC(dbg_text_image) \ - BGFX_IMPORT_FUNC(create_index_buffer) \ - BGFX_IMPORT_FUNC(destroy_index_buffer) \ - BGFX_IMPORT_FUNC(create_vertex_buffer) \ - BGFX_IMPORT_FUNC(destroy_vertex_buffer) \ - BGFX_IMPORT_FUNC(create_dynamic_index_buffer) \ - BGFX_IMPORT_FUNC(create_dynamic_index_buffer_mem) \ - BGFX_IMPORT_FUNC(update_dynamic_index_buffer) \ - BGFX_IMPORT_FUNC(destroy_dynamic_index_buffer) \ - BGFX_IMPORT_FUNC(create_dynamic_vertex_buffer) \ - BGFX_IMPORT_FUNC(create_dynamic_vertex_buffer_mem) \ - BGFX_IMPORT_FUNC(update_dynamic_vertex_buffer) \ - BGFX_IMPORT_FUNC(destroy_dynamic_vertex_buffer) \ - BGFX_IMPORT_FUNC(get_avail_transient_index_buffer) \ - BGFX_IMPORT_FUNC(get_avail_transient_vertex_buffer) \ - BGFX_IMPORT_FUNC(get_avail_instance_data_buffer) \ - BGFX_IMPORT_FUNC(alloc_transient_index_buffer) \ - BGFX_IMPORT_FUNC(alloc_transient_vertex_buffer) \ - BGFX_IMPORT_FUNC(alloc_transient_buffers) \ - BGFX_IMPORT_FUNC(alloc_instance_data_buffer) \ - BGFX_IMPORT_FUNC(create_indirect_buffer) \ - BGFX_IMPORT_FUNC(destroy_indirect_buffer) \ - BGFX_IMPORT_FUNC(create_shader) \ - BGFX_IMPORT_FUNC(get_shader_uniforms) \ - BGFX_IMPORT_FUNC(destroy_shader) \ - BGFX_IMPORT_FUNC(create_program) \ - BGFX_IMPORT_FUNC(create_compute_program) \ - BGFX_IMPORT_FUNC(destroy_program) \ - BGFX_IMPORT_FUNC(is_texture_valid) \ - BGFX_IMPORT_FUNC(calc_texture_size) \ - BGFX_IMPORT_FUNC(create_texture) \ - BGFX_IMPORT_FUNC(create_texture_2d) \ - BGFX_IMPORT_FUNC(create_texture_2d_scaled) \ - BGFX_IMPORT_FUNC(create_texture_3d) \ - BGFX_IMPORT_FUNC(create_texture_cube) \ - BGFX_IMPORT_FUNC(update_texture_2d) \ - BGFX_IMPORT_FUNC(update_texture_3d) \ - BGFX_IMPORT_FUNC(update_texture_cube) \ - BGFX_IMPORT_FUNC(read_texture) \ - BGFX_IMPORT_FUNC(destroy_texture) \ - BGFX_IMPORT_FUNC(create_frame_buffer) \ - BGFX_IMPORT_FUNC(create_frame_buffer_scaled) \ - BGFX_IMPORT_FUNC(create_frame_buffer_from_attachment) \ - BGFX_IMPORT_FUNC(create_frame_buffer_from_nwh) \ - BGFX_IMPORT_FUNC(get_texture) \ - BGFX_IMPORT_FUNC(destroy_frame_buffer) \ - BGFX_IMPORT_FUNC(create_uniform) \ - BGFX_IMPORT_FUNC(get_uniform_info) \ - BGFX_IMPORT_FUNC(destroy_uniform) \ - BGFX_IMPORT_FUNC(create_occlusion_query) \ - BGFX_IMPORT_FUNC(get_result) \ - BGFX_IMPORT_FUNC(destroy_occlusion_query) \ - BGFX_IMPORT_FUNC(set_palette_color) \ - BGFX_IMPORT_FUNC(set_view_name) \ - BGFX_IMPORT_FUNC(set_view_rect) \ - BGFX_IMPORT_FUNC(set_view_scissor) \ - BGFX_IMPORT_FUNC(set_view_clear) \ - BGFX_IMPORT_FUNC(set_view_clear_mrt) \ - BGFX_IMPORT_FUNC(set_view_seq) \ - BGFX_IMPORT_FUNC(set_view_frame_buffer) \ - BGFX_IMPORT_FUNC(set_view_transform) \ - BGFX_IMPORT_FUNC(set_view_transform_stereo) \ - BGFX_IMPORT_FUNC(set_view_order) \ - BGFX_IMPORT_FUNC(set_marker) \ - BGFX_IMPORT_FUNC(set_state) \ - BGFX_IMPORT_FUNC(set_condition) \ - BGFX_IMPORT_FUNC(set_stencil) \ - BGFX_IMPORT_FUNC(set_scissor) \ - BGFX_IMPORT_FUNC(set_scissor_cached) \ - BGFX_IMPORT_FUNC(set_transform) \ - BGFX_IMPORT_FUNC(alloc_transform) \ - BGFX_IMPORT_FUNC(set_transform_cached) \ - BGFX_IMPORT_FUNC(set_uniform) \ - BGFX_IMPORT_FUNC(set_index_buffer) \ - BGFX_IMPORT_FUNC(set_dynamic_index_buffer) \ - BGFX_IMPORT_FUNC(set_transient_index_buffer) \ - BGFX_IMPORT_FUNC(set_vertex_buffer) \ - BGFX_IMPORT_FUNC(set_dynamic_vertex_buffer) \ - BGFX_IMPORT_FUNC(set_transient_vertex_buffer) \ - BGFX_IMPORT_FUNC(set_instance_data_buffer) \ - BGFX_IMPORT_FUNC(set_instance_data_from_vertex_buffer) \ - BGFX_IMPORT_FUNC(set_instance_data_from_dynamic_vertex_buffer) \ - BGFX_IMPORT_FUNC(set_texture) \ - BGFX_IMPORT_FUNC(touch) \ - BGFX_IMPORT_FUNC(submit) \ - BGFX_IMPORT_FUNC(submit_occlusion_query) \ - BGFX_IMPORT_FUNC(submit_indirect) \ - BGFX_IMPORT_FUNC(set_image) \ - BGFX_IMPORT_FUNC(set_compute_index_buffer) \ - BGFX_IMPORT_FUNC(set_compute_vertex_buffer) \ - BGFX_IMPORT_FUNC(set_compute_dynamic_index_buffer) \ - BGFX_IMPORT_FUNC(set_compute_dynamic_vertex_buffer) \ - BGFX_IMPORT_FUNC(set_compute_indirect_buffer) \ - BGFX_IMPORT_FUNC(dispatch) \ - BGFX_IMPORT_FUNC(dispatch_indirect) \ - BGFX_IMPORT_FUNC(discard) \ - BGFX_IMPORT_FUNC(blit) \ +#define BGFX_IMPORT \ + BGFX_IMPORT_FUNC(render_frame) \ + BGFX_IMPORT_FUNC(set_platform_data) \ + BGFX_IMPORT_FUNC(get_internal_data) \ + BGFX_IMPORT_FUNC(override_internal_texture_ptr) \ + BGFX_IMPORT_FUNC(override_internal_texture) \ + BGFX_IMPORT_FUNC(vertex_decl_begin) \ + BGFX_IMPORT_FUNC(vertex_decl_add) \ + BGFX_IMPORT_FUNC(vertex_decl_skip) \ + BGFX_IMPORT_FUNC(vertex_decl_end) \ + BGFX_IMPORT_FUNC(vertex_pack) \ + BGFX_IMPORT_FUNC(vertex_unpack) \ + BGFX_IMPORT_FUNC(vertex_convert) \ + BGFX_IMPORT_FUNC(weld_vertices) \ + BGFX_IMPORT_FUNC(topology_convert) \ + BGFX_IMPORT_FUNC(topology_sort_tri_list) \ + BGFX_IMPORT_FUNC(get_supported_renderers) \ + BGFX_IMPORT_FUNC(get_renderer_name) \ + BGFX_IMPORT_FUNC(init) \ + BGFX_IMPORT_FUNC(shutdown) \ + BGFX_IMPORT_FUNC(reset) \ + BGFX_IMPORT_FUNC(frame) \ + BGFX_IMPORT_FUNC(get_renderer_type) \ + BGFX_IMPORT_FUNC(get_caps) \ + BGFX_IMPORT_FUNC(get_hmd) \ + BGFX_IMPORT_FUNC(get_stats) \ + BGFX_IMPORT_FUNC(alloc) \ + BGFX_IMPORT_FUNC(copy) \ + BGFX_IMPORT_FUNC(make_ref) \ + BGFX_IMPORT_FUNC(make_ref_release) \ + BGFX_IMPORT_FUNC(set_debug) \ + BGFX_IMPORT_FUNC(dbg_text_clear) \ + BGFX_IMPORT_FUNC(dbg_text_printf) \ + BGFX_IMPORT_FUNC(dbg_text_vprintf) \ + BGFX_IMPORT_FUNC(dbg_text_image) \ + BGFX_IMPORT_FUNC(create_index_buffer) \ + BGFX_IMPORT_FUNC(destroy_index_buffer) \ + BGFX_IMPORT_FUNC(create_vertex_buffer) \ + BGFX_IMPORT_FUNC(destroy_vertex_buffer) \ + BGFX_IMPORT_FUNC(create_dynamic_index_buffer) \ + BGFX_IMPORT_FUNC(create_dynamic_index_buffer_mem) \ + BGFX_IMPORT_FUNC(update_dynamic_index_buffer) \ + BGFX_IMPORT_FUNC(destroy_dynamic_index_buffer) \ + BGFX_IMPORT_FUNC(create_dynamic_vertex_buffer) \ + BGFX_IMPORT_FUNC(create_dynamic_vertex_buffer_mem) \ + BGFX_IMPORT_FUNC(update_dynamic_vertex_buffer) \ + BGFX_IMPORT_FUNC(destroy_dynamic_vertex_buffer) \ + BGFX_IMPORT_FUNC(get_avail_transient_index_buffer) \ + BGFX_IMPORT_FUNC(get_avail_transient_vertex_buffer) \ + BGFX_IMPORT_FUNC(get_avail_instance_data_buffer) \ + BGFX_IMPORT_FUNC(alloc_transient_index_buffer) \ + BGFX_IMPORT_FUNC(alloc_transient_vertex_buffer) \ + BGFX_IMPORT_FUNC(alloc_transient_buffers) \ + BGFX_IMPORT_FUNC(alloc_instance_data_buffer) \ + BGFX_IMPORT_FUNC(create_indirect_buffer) \ + BGFX_IMPORT_FUNC(destroy_indirect_buffer) \ + BGFX_IMPORT_FUNC(create_shader) \ + BGFX_IMPORT_FUNC(get_shader_uniforms) \ + BGFX_IMPORT_FUNC(set_shader_name) \ + BGFX_IMPORT_FUNC(destroy_shader) \ + BGFX_IMPORT_FUNC(create_program) \ + BGFX_IMPORT_FUNC(create_compute_program) \ + BGFX_IMPORT_FUNC(destroy_program) \ + BGFX_IMPORT_FUNC(is_texture_valid) \ + BGFX_IMPORT_FUNC(calc_texture_size) \ + BGFX_IMPORT_FUNC(create_texture) \ + BGFX_IMPORT_FUNC(create_texture_2d) \ + BGFX_IMPORT_FUNC(create_texture_2d_scaled) \ + BGFX_IMPORT_FUNC(create_texture_3d) \ + BGFX_IMPORT_FUNC(create_texture_cube) \ + BGFX_IMPORT_FUNC(update_texture_2d) \ + BGFX_IMPORT_FUNC(update_texture_3d) \ + BGFX_IMPORT_FUNC(update_texture_cube) \ + BGFX_IMPORT_FUNC(read_texture) \ + BGFX_IMPORT_FUNC(set_texture_name) \ + BGFX_IMPORT_FUNC(get_direct_access_ptr) \ + BGFX_IMPORT_FUNC(destroy_texture) \ + BGFX_IMPORT_FUNC(create_frame_buffer) \ + BGFX_IMPORT_FUNC(create_frame_buffer_scaled) \ + BGFX_IMPORT_FUNC(create_frame_buffer_from_attachment) \ + BGFX_IMPORT_FUNC(create_frame_buffer_from_nwh) \ + BGFX_IMPORT_FUNC(get_texture) \ + BGFX_IMPORT_FUNC(destroy_frame_buffer) \ + BGFX_IMPORT_FUNC(create_uniform) \ + BGFX_IMPORT_FUNC(get_uniform_info) \ + BGFX_IMPORT_FUNC(destroy_uniform) \ + BGFX_IMPORT_FUNC(create_occlusion_query) \ + BGFX_IMPORT_FUNC(get_result) \ + BGFX_IMPORT_FUNC(destroy_occlusion_query) \ + BGFX_IMPORT_FUNC(set_palette_color) \ + BGFX_IMPORT_FUNC(set_view_name) \ + BGFX_IMPORT_FUNC(set_view_rect) \ + BGFX_IMPORT_FUNC(set_view_scissor) \ + BGFX_IMPORT_FUNC(set_view_clear) \ + BGFX_IMPORT_FUNC(set_view_clear_mrt) \ + BGFX_IMPORT_FUNC(set_view_mode) \ + BGFX_IMPORT_FUNC(set_view_frame_buffer) \ + BGFX_IMPORT_FUNC(set_view_transform) \ + BGFX_IMPORT_FUNC(set_view_transform_stereo) \ + BGFX_IMPORT_FUNC(set_view_order) \ + BGFX_IMPORT_FUNC(encoder_set_marker) \ + BGFX_IMPORT_FUNC(encoder_set_state) \ + BGFX_IMPORT_FUNC(encoder_set_condition) \ + BGFX_IMPORT_FUNC(encoder_set_stencil) \ + BGFX_IMPORT_FUNC(encoder_set_scissor) \ + BGFX_IMPORT_FUNC(encoder_set_scissor_cached) \ + BGFX_IMPORT_FUNC(encoder_set_transform) \ + BGFX_IMPORT_FUNC(encoder_alloc_transform) \ + BGFX_IMPORT_FUNC(encoder_set_transform_cached) \ + BGFX_IMPORT_FUNC(encoder_set_uniform) \ + BGFX_IMPORT_FUNC(encoder_set_index_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_dynamic_index_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_transient_index_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_vertex_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_dynamic_vertex_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_transient_vertex_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_instance_data_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_instance_data_from_vertex_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_instance_data_from_dynamic_vertex_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_texture) \ + BGFX_IMPORT_FUNC(encoder_touch) \ + BGFX_IMPORT_FUNC(encoder_submit) \ + BGFX_IMPORT_FUNC(encoder_submit_occlusion_query) \ + BGFX_IMPORT_FUNC(encoder_submit_indirect) \ + BGFX_IMPORT_FUNC(encoder_set_image) \ + BGFX_IMPORT_FUNC(encoder_set_compute_index_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_compute_vertex_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_compute_dynamic_index_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_compute_dynamic_vertex_buffer) \ + BGFX_IMPORT_FUNC(encoder_set_compute_indirect_buffer) \ + BGFX_IMPORT_FUNC(encoder_dispatch) \ + BGFX_IMPORT_FUNC(encoder_dispatch_indirect) \ + BGFX_IMPORT_FUNC(encoder_discard) \ + BGFX_IMPORT_FUNC(encoder_blit) \ BGFX_IMPORT_FUNC(request_screen_shot) static bgfx_interface_vtbl_t s_bgfx_interface = diff --git a/3rdparty/bgfx/src/bgfx_compute.sh b/3rdparty/bgfx/src/bgfx_compute.sh index a58ae1d..a997fc3 100644 --- a/3rdparty/bgfx/src/bgfx_compute.sh +++ b/3rdparty/bgfx/src/bgfx_compute.sh @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -10,102 +10,253 @@ #ifndef __cplusplus -#if BGFX_SHADER_LANGUAGE_HLSL +#if BGFX_SHADER_LANGUAGE_GLSL + +#define SHARED shared + +#define __IMAGE_XX(_name, _format, _reg, _image, _access) \ + layout(_format, binding=_reg) _access uniform highp _image _name + +#define readwrite +#define IMAGE2D_RO( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image2D, readonly) +#define UIMAGE2D_RO(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage2D, readonly) +#define IMAGE2D_WR( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image2D, writeonly) +#define UIMAGE2D_WR(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage2D, writeonly) +#define IMAGE2D_RW( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image2D, readwrite) +#define UIMAGE2D_RW(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage2D, readwrite) + +#define IMAGE2D_ARRAY_RO( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image2DArray, readonly) +#define UIMAGE2D_ARRAY_RO(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage2DArray, readonly) +#define IMAGE2D_ARRAY_WR( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image2DArray, writeonly) +#define UIMAGE2D_ARRAY_WR(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage2DArray, writeonly) +#define IMAGE2D_ARRAY_RW( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image2DArray, readwrite) +#define UIMAGE2D_ARRAY_RW(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage2DArray, readwrite) + +#define IMAGE3D_RO( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image3D, readonly) +#define UIMAGE3D_RO(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage3D, readonly) +#define IMAGE3D_WR( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image3D, writeonly) +#define UIMAGE3D_WR(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage3D, writeonly) +#define IMAGE3D_RW( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image3D, readwrite) +#define UIMAGE3D_RW(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage3D, readwrite) + +#define __BUFFER_XX(_name, _type, _reg, _access) \ + layout(std430, binding=_reg) _access buffer _name ## Buffer \ + { \ + _type _name[]; \ + } + +#define BUFFER_RO(_name, _type, _reg) __BUFFER_XX(_name, _type, _reg, readonly) +#define BUFFER_RW(_name, _type, _reg) __BUFFER_XX(_name, _type, _reg, readwrite) +#define BUFFER_WR(_name, _type, _reg) __BUFFER_XX(_name, _type, _reg, writeonly) + +#define NUM_THREADS(_x, _y, _z) layout (local_size_x = _x, local_size_y = _y, local_size_z = _z) in; + +#else #define SHARED groupshared -#define r32ui uint -#define r32f float -#define rg16f float2 -#define rgba16f float4 -#define rgba8 float4 -#define rgba32f float4 +#define r32ui uint +#define rg32ui uint2 +#define rgba32ui uint4 +#define r32f float +#define rg16f float2 +#define rgba16f float4 +#if BGFX_SHADER_LANGUAGE_HLSL +# define rgba8 unorm float4 +#else +# define rgba8 float4 +#endif // BGFX_SHADER_LANGUAGE_HLSL +#define rgba32f float4 -#define IMAGE2D_RO( _name, _format, _reg) Texture2D<_format> _name : register(t[_reg]) -#define UIMAGE2D_RO(_name, _format, _reg) Texture2D<_format> _name : register(t[_reg]) -#define IMAGE2D_WR( _name, _format, _reg) RWTexture2D<_format> _name : register(u[_reg]) -#define UIMAGE2D_WR(_name, _format, _reg) RWTexture2D<_format> _name : register(u[_reg]) -#define IMAGE2D_RW( _name, _reg) RWTexture2D _name : register(u[_reg]) -#define UIMAGE2D_RW(_name, _reg) RWTexture2D _name : register(u[_reg]) +#define IMAGE2D_RO( _name, _format, _reg) \ + Texture2D<_format> _name ## Texture : REGISTER(t, _reg); \ + static BgfxROImage2D_ ## _format _name = { _name ## Texture } -#define IMAGE2D_ARRAY_RO( _name, _format, _reg) Texture2DArray<_format> _name : register(t[_reg]) -#define UIMAGE2D_ARRAY_RO(_name, _format, _reg) Texture2DArray<_format> _name : register(t[_reg]) -#define IMAGE2D_ARRAY_WR( _name, _format, _reg) RWTexture2DArray<_format> _name : register(u[_reg]) -#define UIMAGE2D_ARRAY_WR(_name, _format, _reg) RWTexture2DArray<_format> _name : register(u[_reg]) -#define IMAGE2D_ARRAY_RW( _name, _reg) RWTexture2DArray _name : register(u[_reg]) -#define UIMAGE2D_ARRAY_RW(_name, _reg) RWTexture2DArray _name : register(u[_reg]) +#define UIMAGE2D_RO(_name, _format, _reg) IMAGE2D_RO(_name, _format, _reg) -#define IMAGE3D_RO( _name, _format, _reg) Texture3D<_format> _name : register(t[_reg]) -#define UIMAGE3D_RO(_name, _format, _reg) Texture3D<_format> _name : register(t[_reg]) -#define IMAGE3D_WR( _name, _format, _reg) RWTexture3D<_format> _name : register(u[_reg]) -#define UIMAGE3D_WR(_name, _format, _reg) RWTexture3D<_format> _name : register(u[_reg]) -#define IMAGE3D_RW( _name, _reg) RWTexture3D _name : register(u[_reg]) -#define UIMAGE3D_RW(_name, _reg) RWTexture3D _name : register(u[_reg]) +#define IMAGE2D_RW( _name, _format, _reg) \ + RWTexture2D<_format> _name ## Texture : REGISTER(u, _reg); \ + static BgfxRWImage2D_ ## _format _name = { _name ## Texture } -#define BUFFER_RO(_name, _struct, _reg) Buffer<_struct> _name : register(t[_reg]) -#define BUFFER_RW(_name, _struct, _reg) RWBuffer<_struct> _name : register(u[_reg]) +#define IMAGE2D_WR( _name, _format, _reg) IMAGE2D_RW(_name, _format, _reg) +#define UIMAGE2D_WR(_name, _format, _reg) IMAGE2D_RW(_name, _format, _reg) +#define UIMAGE2D_RW(_name, _format, _reg) IMAGE2D_RW(_name, _format, _reg) + +#define IMAGE2D_ARRAY_RO(_name, _format, _reg) \ + Texture2DArray<_format> _name ## Texture : REGISTER(t, _reg); \ + static BgfxROImage2DArray_ ## _format _name = { _name ## Texture } + +#define UIMAGE2D_ARRAY_RO(_name, _format, _reg) IMAGE2D_ARRAY_RO(_name, _format, _reg) + +#define IMAGE2D_ARRAY_RW(_name, _format, _reg) \ + RWTexture2DArray<_format> _name ## Texture : REGISTER(u, _reg); \ + static BgfxRWImage2DArray_ ## _format _name = { _name ## Texture } + +#define UIMAGE2D_ARRAY_RW(_name, _format, _reg) IMAGE2D_ARRAY_RW(_name, _format, _reg) +#define IMAGE2D_ARRAY_WR( _name, _format, _reg) IMAGE2D_ARRAY_RW(_name, _format, _reg) +#define UIMAGE2D_ARRAY_WR(_name, _format, _reg) IMAGE2D_ARRAY_RW(_name, _format, _reg) + +#define IMAGE3D_RO( _name, _format, _reg) \ + Texture3D<_format> _name ## Texture : REGISTER(t, _reg); \ + static BgfxROImage3D_ ## _format _name = { _name ## Texture } + +#define UIMAGE3D_RO(_name, _format, _reg) IMAGE3D_RO(_name, _format, _reg) + +#define IMAGE3D_RW( _name, _format, _reg) \ + RWTexture3D<_format> _name ## Texture : REGISTER(u, _reg); \ + static BgfxRWImage3D_ ## _format _name = { _name ## Texture } + +#define UIMAGE3D_RW(_name, _format, _reg) IMAGE3D_RW(_name, _format, _reg) +#define IMAGE3D_WR( _name, _format, _reg) IMAGE3D_RW(_name, _format, _reg) +#define UIMAGE3D_WR(_name, _format, _reg) IMAGE3D_RW(_name, _format, _reg) + +#define BUFFER_RO(_name, _struct, _reg) Buffer<_struct> _name : REGISTER(t, _reg) +#define BUFFER_RW(_name, _struct, _reg) RWBuffer<_struct> _name : REGISTER(u, _reg) #define BUFFER_WR(_name, _struct, _reg) BUFFER_RW(_name, _struct, _reg) #define NUM_THREADS(_x, _y, _z) [numthreads(_x, _y, _z)] -#define __IMAGE_IMPL(_textureType, _storeComponents, _type, _loadComponents) \ - _type imageLoad( Texture2D<_textureType> _image, ivec2 _uv) { return _image[_uv ]._loadComponents; } \ - _type imageLoad(RWTexture2DArray<_textureType> _image, ivec3 _uvw) { return _image[_uvw ]._loadComponents; } \ - _type imageLoad( Texture3D<_textureType> _image, ivec3 _uvw) { return _image[_uvw]._loadComponents; } \ - _type imageLoad( RWTexture2D<_textureType> _image, ivec2 _uv) { return _image[_uv ]._loadComponents; } \ - _type imageLoad(RWTexture2DArray<_textureType> _image, ivec3 _uvw, _type _value) { return _image[_uvw]._loadComponents; } \ - _type imageLoad( RWTexture3D<_textureType> _image, ivec3 _uvw, _type _value) { return _image[_uvw]._loadComponents; } \ - void imageStore( RWTexture2D<_textureType> _image, ivec2 _uv, _type _value) { _image[_uv ] = _value._storeComponents; } \ - void imageStore(RWTexture2DArray<_textureType> _image, ivec3 _uvw, _type _value) { _image[_uvw] = _value._storeComponents; } \ - void imageStore( RWTexture3D<_textureType> _image, ivec3 _uvw, _type _value) { _image[_uvw] = _value._storeComponents; } +#define __IMAGE_IMPL_S(_format, _storeComponents, _type, _loadComponents) \ + \ + struct BgfxROImage2D_ ## _format \ + { \ + Texture2D<_format> m_texture; \ + }; \ + \ + struct BgfxRWImage2D_ ## _format \ + { \ + RWTexture2D<_format> m_texture; \ + }; \ + \ + struct BgfxROImage2DArray_ ## _format \ + { \ + Texture2DArray<_format> m_texture; \ + }; \ + \ + struct BgfxRWImage2DArray_ ## _format \ + { \ + RWTexture2DArray<_format> m_texture; \ + }; \ + \ + struct BgfxROImage3D_ ## _format \ + { \ + Texture3D<_format> m_texture; \ + }; \ + \ + struct BgfxRWImage3D_ ## _format \ + { \ + RWTexture3D<_format> m_texture; \ + }; \ -__IMAGE_IMPL(float, x, vec4, xxxx) -__IMAGE_IMPL(vec2, xy, vec4, xyyy) -__IMAGE_IMPL(vec3, xyz, vec4, xyzz) -__IMAGE_IMPL(vec4, xyzw, vec4, xyzw) -__IMAGE_IMPL(uint, x, uvec4, xxxx) -__IMAGE_IMPL(uvec2, xy, uvec4, xyyy) -__IMAGE_IMPL(uvec3, xyz, uvec4, xyzz) -__IMAGE_IMPL(uvec4, xyzw, uvec4, xyzw) -__IMAGE_IMPL(int, x, ivec4, xxxx) -__IMAGE_IMPL(ivec2, xy, ivec4, xyyy) -__IMAGE_IMPL(ivec3, xyz, ivec4, xyzz) -__IMAGE_IMPL(ivec4, xyzw, ivec4, xyzw) +#define __IMAGE_IMPL_A(_format, _storeComponents, _type, _loadComponents) \ + __IMAGE_IMPL_S(_format, _storeComponents, _type, _loadComponents) \ + \ + _type imageLoad(BgfxROImage2D_ ## _format _image, ivec2 _uv) \ + { \ + return _image.m_texture[_uv]._loadComponents; \ + } \ + \ + ivec2 imageSize(BgfxROImage2D_ ## _format _image) \ + { \ + uvec2 result; \ + _image.m_texture.GetDimensions(result.x, result.y); \ + return ivec2(result); \ + } \ + \ + _type imageLoad(BgfxRWImage2D_ ## _format _image, ivec2 _uv) \ + { \ + return _image.m_texture[_uv]._loadComponents; \ + } \ + \ + ivec2 imageSize(BgfxRWImage2D_ ## _format _image) \ + { \ + uvec2 result; \ + _image.m_texture.GetDimensions(result.x, result.y); \ + return ivec2(result); \ + } \ + \ + void imageStore(BgfxRWImage2D_ ## _format _image, ivec2 _uv, _type _value) \ + { \ + _image.m_texture[_uv] = _value._storeComponents; \ + } \ + \ + _type imageLoad(BgfxROImage2DArray_ ## _format _image, ivec3 _uvw) \ + { \ + return _image.m_texture[_uvw]._loadComponents; \ + } \ + \ + ivec3 imageSize(BgfxROImage2DArray_ ## _format _image) \ + { \ + uvec3 result; \ + _image.m_texture.GetDimensions(result.x, result.y, result.z); \ + return ivec3(result); \ + } \ + \ + _type imageLoad(BgfxRWImage2DArray_ ## _format _image, ivec3 _uvw) \ + { \ + return _image.m_texture[_uvw]._loadComponents; \ + } \ + \ + void imageStore(BgfxRWImage2DArray_ ## _format _image, ivec3 _uvw, _type _value) \ + { \ + _image.m_texture[_uvw] = _value._storeComponents; \ + } \ + \ + ivec3 imageSize(BgfxRWImage2DArray_ ## _format _image) \ + { \ + uvec3 result; \ + _image.m_texture.GetDimensions(result.x, result.y, result.z); \ + return ivec3(result); \ + } \ + \ + _type imageLoad(BgfxROImage3D_ ## _format _image, ivec3 _uvw) \ + { \ + return _image.m_texture[_uvw]._loadComponents; \ + } \ + \ + ivec3 imageSize(BgfxROImage3D_ ## _format _image) \ + { \ + uvec3 result; \ + _image.m_texture.GetDimensions(result.x, result.y, result.z); \ + return ivec3(result); \ + } \ + \ + _type imageLoad(BgfxRWImage3D_ ## _format _image, ivec3 _uvw) \ + { \ + return _image.m_texture[_uvw]._loadComponents; \ + } \ + \ + ivec3 imageSize(BgfxRWImage3D_ ## _format _image) \ + { \ + uvec3 result; \ + _image.m_texture.GetDimensions(result.x, result.y, result.z); \ + return ivec3(result); \ + } \ + \ + void imageStore(BgfxRWImage3D_ ## _format _image, ivec3 _uvw, _type _value) \ + { \ + _image.m_texture[_uvw] = _value._storeComponents; \ + } -ivec2 imageSize(Texture2D _image) -{ - ivec2 result; - _image.GetDimensions(result.x, result.y); - return result; -} +__IMAGE_IMPL_A(rgba8, xyzw, vec4, xyzw) +__IMAGE_IMPL_A(rg16f, xy, vec4, xyyy) +#if BGFX_SHADER_LANGUAGE_HLSL +__IMAGE_IMPL_S(rgba16f, xyzw, vec4, xyzw) +#else +__IMAGE_IMPL_A(rgba16f, xyzw, vec4, xyzw) +#endif // BGFX_SHADER_LANGUAGE_HLSL +__IMAGE_IMPL_A(r32f, x, vec4, xxxx) +__IMAGE_IMPL_A(rgba32f, xyzw, vec4, xyzw) +__IMAGE_IMPL_A(r32ui, x, uvec4, xxxx) +__IMAGE_IMPL_A(rg32ui, xy, uvec4, xyyy) +__IMAGE_IMPL_A(rgba32ui, xyzw, uvec4, xyzw) -ivec2 imageSize(Texture2D _image) -{ - ivec2 result; - _image.GetDimensions(result.x, result.y); - return result; -} - -ivec2 imageSize(RWTexture2D _image) -{ - ivec2 result; - _image.GetDimensions(result.x, result.y); - return result; -} - -ivec2 imageSize(RWTexture2D _image) -{ - ivec2 result; - _image.GetDimensions(result.x, result.y); - return result; -} - -#define __ATOMIC_IMPL_TYPE(_genType, _glFunc, _dxFunc) \ - _genType _glFunc(_genType _mem, _genType _data) \ - { \ - _genType result; \ - _dxFunc(_mem, _data, result); \ - return result; \ +#define __ATOMIC_IMPL_TYPE(_genType, _glFunc, _dxFunc) \ + _genType _glFunc(inout _genType _mem, _genType _data) \ + { \ + _genType result; \ + _dxFunc(_mem, _data, result); \ + return result; \ } #define __ATOMIC_IMPL(_glFunc, _dxFunc) \ @@ -120,14 +271,14 @@ __ATOMIC_IMPL(atomicMin, InterlockedMin); __ATOMIC_IMPL(atomicOr, InterlockedOr); __ATOMIC_IMPL(atomicXor, InterlockedXor); -int atomicCompSwap(int _mem, int _compare, int _data) +int atomicCompSwap(inout int _mem, int _compare, int _data) { int result; InterlockedCompareExchange(_mem, _compare, _data, result); return result; } -uint atomicCompSwap(uint _mem, uint _compare, uint _data) +uint atomicCompSwap(inout uint _mem, uint _compare, uint _data) { uint result; InterlockedCompareExchange(_mem, _compare, _data, result); @@ -144,48 +295,7 @@ uint atomicCompSwap(uint _mem, uint _compare, uint _data) #define memoryBarrierShared() GroupMemoryBarrierWithGroupSync() #define groupMemoryBarrier() GroupMemoryBarrierWithGroupSync() -#else - -#define SHARED shared - -#define __IMAGE_XX(_name, _format, _reg, _image, _access) \ - layout(_format, binding=_reg) _access uniform highp _image _name - -#define readwrite -#define IMAGE2D_RO( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image2D, readonly) -#define UIMAGE2D_RO(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage2D, readonly) -#define IMAGE2D_WR( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image2D, writeonly) -#define UIMAGE2D_WR(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage2D, writeonly) -#define IMAGE2D_RW( _name, _reg) __IMAGE_XX(_name, r32f, _reg, image2D, readwrite) -#define UIMAGE2D_RW(_name, _reg) __IMAGE_XX(_name, r32ui, _reg, uimage2D, readwrite) - -#define IMAGE2D_ARRAY_RO( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image2DArray, readonly) -#define UIMAGE2D_ARRAY_RO(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage2DArray, readonly) -#define IMAGE2D_ARRAY_WR( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image2DArray, writeonly) -#define UIMAGE2D_ARRAY_WR(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage2DArray, writeonly) -#define IMAGE2D_ARRAY_RW( _name, _reg) __IMAGE_XX(_name, r32f, _reg, image2DArray, readwrite) -#define UIMAGE2D_ARRAY_RW(_name, _reg) __IMAGE_XX(_name, r32ui, _reg, uimage2DArray, readwrite) - -#define IMAGE3D_RO( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image3D, readonly) -#define UIMAGE3D_RO(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage3D, readonly) -#define IMAGE3D_WR( _name, _format, _reg) __IMAGE_XX(_name, _format, _reg, image3D, writeonly) -#define UIMAGE3D_WR(_name, _format, _reg) __IMAGE_XX(_name, _format, _reg, uimage3D, writeonly) -#define IMAGE3D_RW( _name, _reg) __IMAGE_XX(_name, r32f, _reg, image3D, readwrite) -#define UIMAGE3D_RW(_name, _reg) __IMAGE_XX(_name, r32ui, _reg, uimage3D, readwrite) - -#define __BUFFER_XX(_name, _type, _reg, _access) \ - layout(std430, binding=_reg) _access buffer _name ## Buffer \ - { \ - _type _name[]; \ - } - -#define BUFFER_RO(_name, _type, _reg) __BUFFER_XX(_name, _type, _reg, readonly) -#define BUFFER_RW(_name, _type, _reg) __BUFFER_XX(_name, _type, _reg, readwrite) -#define BUFFER_WR(_name, _type, _reg) __BUFFER_XX(_name, _type, _reg, writeonly) - -#define NUM_THREADS(_x, _y, _z) layout (local_size_x = _x, local_size_y = _y, local_size_z = _z) in; - -#endif // BGFX_SHADER_LANGUAGE_HLSL +#endif // BGFX_SHADER_LANGUAGE_GLSL #define dispatchIndirect(_buffer \ , _offset \ diff --git a/3rdparty/bgfx/src/bgfx_p.h b/3rdparty/bgfx/src/bgfx_p.h index 9936cf8..ec0db44 100644 --- a/3rdparty/bgfx/src/bgfx_p.h +++ b/3rdparty/bgfx/src/bgfx_p.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -24,7 +24,7 @@ #include -// Check handle, cannot be bgfx::invalidHandle and must be valid. +// Check handle, cannot be bgfx::kInvalidHandle and must be valid. #define BGFX_CHECK_HANDLE(_desc, _handleAlloc, _handle) \ BX_CHECK(isValid(_handle) \ && _handleAlloc.isValid(_handle.idx) \ @@ -34,7 +34,7 @@ , _handleAlloc.getMaxHandles() \ ) -// Check handle, it's ok to be bgfx::invalidHandle or must be valid. +// Check handle, it's ok to be bgfx::kInvalidHandle or must be valid. #define BGFX_CHECK_HANDLE_INVALID_OK(_desc, _handleAlloc, _handle) \ BX_CHECK(!isValid(_handle) \ || _handleAlloc.isValid(_handle.idx) \ @@ -44,31 +44,22 @@ , _handleAlloc.getMaxHandles() \ ) -#ifndef BGFX_PROFILER_SCOPE -# if BGFX_CONFIG_PROFILER_MICROPROFILE -# include -# define BGFX_PROFILER_SCOPE(_group, _name, _color) MICROPROFILE_SCOPEI(#_group, #_name, _color) -# define BGFX_PROFILER_BEGIN(_group, _name, _color) BX_NOOP() -# define BGFX_PROFILER_BEGIN_DYNAMIC(_namestr) BX_NOOP() -# define BGFX_PROFILER_END() BX_NOOP() -# define BGFX_PROFILER_SET_CURRENT_THREAD_NAME(_name) BX_NOOP() -# elif BGFX_CONFIG_PROFILER_REMOTERY -# define RMT_ENABLED BGFX_CONFIG_PROFILER_REMOTERY -# define RMT_USE_D3D11 BGFX_CONFIG_RENDERER_DIRECT3D11 -# define RMT_USE_OPENGL BGFX_CONFIG_RENDERER_OPENGL -# include -# define BGFX_PROFILER_SCOPE(_group, _name, _color) rmt_ScopedCPUSample(_group##_##_name, RMTSF_None) -# define BGFX_PROFILER_BEGIN(_group, _name, _color) rmt_BeginCPUSample(_group##_##_name, RMTSF_None) -# define BGFX_PROFILER_BEGIN_DYNAMIC(_namestr) rmt_BeginCPUSampleDynamic(_namestr, RMTSF_None) -# define BGFX_PROFILER_END() rmt_EndCPUSample() -# define BGFX_PROFILER_SET_CURRENT_THREAD_NAME(_name) rmt_SetCurrentThreadName(_name) -# else -# define BGFX_PROFILER_SCOPE(_group, _name, _color) BX_NOOP() -# define BGFX_PROFILER_BEGIN(_group, _name, _color) BX_NOOP() -# define BGFX_PROFILER_BEGIN_DYNAMIC(_namestr) BX_NOOP() -# define BGFX_PROFILER_END() BX_NOOP() -# define BGFX_PROFILER_SET_CURRENT_THREAD_NAME(_name) BX_NOOP() -# endif // BGFX_CONFIG_PROFILER_* +#if BGFX_CONFIG_MULTITHREADED +# define BGFX_MUTEX_SCOPE(_mutex) bx::MutexScope BX_CONCATENATE(mutexScope, __LINE__)(_mutex) +#else +# define BGFX_MUTEX_SCOPE(_mutex) BX_NOOP() +#endif // BGFX_CONFIG_MULTITHREADED + +#if BGFX_CONFIG_PROFILER +# define BGFX_PROFILER_SCOPE(_name, _abgr) ProfilerScope BX_CONCATENATE(profilerScope, __LINE__)(_name, _abgr, __FILE__, uint16_t(__LINE__) ) +# define BGFX_PROFILER_BEGIN(_name, _abgr) g_callback->profilerBeginLiteral(_name, _abgr, __FILE__, uint16_t(__LINE__) ) +# define BGFX_PROFILER_END() g_callback->profilerEnd() +# define BGFX_PROFILER_SET_CURRENT_THREAD_NAME(_name) BX_NOOP() +#else +# define BGFX_PROFILER_SCOPE(_name, _abgr) BX_NOOP() +# define BGFX_PROFILER_BEGIN(_name, _abgr) BX_NOOP() +# define BGFX_PROFILER_END() BX_NOOP() +# define BGFX_PROFILER_SET_CURRENT_THREAD_NAME(_name) BX_NOOP() #endif // BGFX_PROFILER_SCOPE namespace bgfx @@ -85,60 +76,65 @@ namespace bgfx inline bool operator==(const UniformHandle& _lhs, const UniformHandle& _rhs) { return _lhs.idx == _rhs.idx; } } -#define _BX_TRACE(_format, ...) \ - BX_MACRO_BLOCK_BEGIN \ +#define _BX_TRACE(_format, ...) \ + BX_MACRO_BLOCK_BEGIN \ bgfx::trace(__FILE__, uint16_t(__LINE__), "BGFX " _format "\n", ##__VA_ARGS__); \ BX_MACRO_BLOCK_END -#define _BX_WARN(_condition, _format, ...) \ - BX_MACRO_BLOCK_BEGIN \ - if (!BX_IGNORE_C4127(_condition) ) \ - { \ +#define _BX_WARN(_condition, _format, ...) \ + BX_MACRO_BLOCK_BEGIN \ + if (!BX_IGNORE_C4127(_condition) ) \ + { \ BX_TRACE("WARN " _format, ##__VA_ARGS__); \ - } \ + } \ BX_MACRO_BLOCK_END -#define _BX_CHECK(_condition, _format, ...) \ - BX_MACRO_BLOCK_BEGIN \ - if (!BX_IGNORE_C4127(_condition) ) \ - { \ - BX_TRACE("CHECK " _format, ##__VA_ARGS__); \ +#define _BX_CHECK(_condition, _format, ...) \ + BX_MACRO_BLOCK_BEGIN \ + if (!BX_IGNORE_C4127(_condition) ) \ + { \ + BX_TRACE("CHECK " _format, ##__VA_ARGS__); \ bgfx::fatal(bgfx::Fatal::DebugCheck, _format, ##__VA_ARGS__); \ - } \ + } \ BX_MACRO_BLOCK_END -#define BGFX_FATAL(_condition, _err, _format, ...) \ - BX_MACRO_BLOCK_BEGIN \ - if (!BX_IGNORE_C4127(_condition) ) \ - { \ +#define BGFX_FATAL(_condition, _err, _format, ...) \ + BX_MACRO_BLOCK_BEGIN \ + if (!BX_IGNORE_C4127(_condition) ) \ + { \ fatal(_err, _format, ##__VA_ARGS__); \ - } \ + } \ BX_MACRO_BLOCK_END +#include #include +#include #include -#include -#include #include +#include #include #include -#include -#include -#include -#include -#include -#include +#include +#include #include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include "shader.h" +#include "vertexdecl.h" -#define BGFX_CHUNK_MAGIC_CSH BX_MAKEFOURCC('C', 'S', 'H', 0x2) -#define BGFX_CHUNK_MAGIC_FSH BX_MAKEFOURCC('F', 'S', 'H', 0x4) #define BGFX_CHUNK_MAGIC_TEX BX_MAKEFOURCC('T', 'E', 'X', 0x0) -#define BGFX_CHUNK_MAGIC_VSH BX_MAKEFOURCC('V', 'S', 'H', 0x4) + +#define BGFX_CHUNK_MAGIC_CSH BX_MAKEFOURCC('C', 'S', 'H', 0x3) +#define BGFX_CHUNK_MAGIC_FSH BX_MAKEFOURCC('F', 'S', 'H', 0x5) +#define BGFX_CHUNK_MAGIC_VSH BX_MAKEFOURCC('V', 'S', 'H', 0x5) #define BGFX_CLEAR_COLOR_USE_PALETTE UINT16_C(0x8000) #define BGFX_CLEAR_MASK (0 \ @@ -177,20 +173,8 @@ namespace stl = std; # include #elif BX_PLATFORM_WINDOWS # include -#elif BX_PLATFORM_XBOX360 -# include -# include #endif // BX_PLATFORM_* -#include -#include -#include - -#include "vertexdecl.h" - -#define BGFX_DEFAULT_WIDTH 1280 -#define BGFX_DEFAULT_HEIGHT 720 - #define BGFX_MAX_COMPUTE_BINDINGS 8 #define BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER UINT32_C(0x10000000) @@ -261,8 +245,67 @@ namespace bgfx typedef uint32_t RenderItemCount; #endif // BGFX_CONFIG_MAX_DRAW_CALLS < (64<<10) + struct Handle + { + enum Enum + { + Shader, + Texture, + + Count + }; + + uint16_t type; + uint16_t idx; + }; + + inline Handle convert(ShaderHandle _handle) + { + Handle handle = { Handle::Shader, _handle.idx }; + return handle; + } + + inline Handle convert(TextureHandle _handle) + { + Handle handle = { Handle::Texture, _handle.idx }; + return handle; + } + + inline bool isValid(const VertexDecl& _decl) + { + return 0 != _decl.m_stride; + } + struct Clear { + void set(uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) + { + m_flags = _flags; + m_index[0] = uint8_t(_rgba>>24); + m_index[1] = uint8_t(_rgba>>16); + m_index[2] = uint8_t(_rgba>> 8); + m_index[3] = uint8_t(_rgba>> 0); + m_depth = _depth; + m_stencil = _stencil; + } + + void set(uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) + { + m_flags = (_flags & ~BGFX_CLEAR_COLOR) + | (0xff != (_0&_1&_2&_3&_4&_5&_6&_7) ? BGFX_CLEAR_COLOR|BGFX_CLEAR_COLOR_USE_PALETTE : 0) + ; + m_index[0] = _0; + m_index[1] = _1; + m_index[2] = _2; + m_index[3] = _3; + m_index[4] = _4; + m_index[5] = _5; + m_index[6] = _6; + m_index[7] = _7; + m_depth = _depth; + m_stencil = _stencil; + } + uint8_t m_index[8]; float m_depth; uint8_t m_stencil; @@ -355,6 +398,19 @@ namespace bgfx typedef bx::StringT<&g_allocator> String; + struct ProfilerScope + { + ProfilerScope(const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line) + { + g_callback->profilerBeginLiteral(_name, _abgr, _filePath, _line); + } + + ~ProfilerScope() + { + g_callback->profilerEnd(); + } + }; + void setGraphicsDebuggerPresent(bool _present); bool isGraphicsDebuggerPresent(); void release(const Memory* _mem); @@ -362,6 +418,7 @@ namespace bgfx void getTextureSizeFromRatio(BackbufferRatio::Enum _ratio, uint16_t& _width, uint16_t& _height); TextureFormat::Enum getViableTextureFormat(const bimg::ImageContainer& _imageContainer); const char* getName(TextureFormat::Enum _fmt); + const char* getName(UniformHandle _handle); inline uint32_t castfu(float _value) { @@ -393,7 +450,7 @@ namespace bgfx if (_hasMips) { const uint32_t max = bx::uint32_max(bx::uint32_max(_width, _height), _depth); - const uint32_t num = 1 + uint32_t(bx::flog2(float(max) ) ); + const uint32_t num = 1 + uint32_t(bx::log2(float(max) ) ); return uint8_t(num); } @@ -412,7 +469,7 @@ namespace bgfx , m_height(0) , m_small(false) { - resize(); + resize(false, 1, 1); clear(); } @@ -421,7 +478,7 @@ namespace bgfx BX_FREE(g_allocator, m_mem); } - void resize(bool _small = false, uint32_t _width = BGFX_DEFAULT_WIDTH, uint32_t _height = BGFX_DEFAULT_HEIGHT) + void resize(bool _small, uint32_t _width, uint32_t _height) { uint32_t width = bx::uint32_imax(1, _width/8); uint32_t height = bx::uint32_imax(1, _height/(_small ? 8 : 16) ); @@ -558,7 +615,7 @@ namespace bgfx { for (uint32_t ii = 0; ii < BX_COUNTOF(m_program); ++ii) { - m_program[ii].idx = invalidHandle; + m_program[ii].idx = kInvalidHandle; } } @@ -634,6 +691,7 @@ namespace bgfx CreateUniform, UpdateViewName, InvalidateOcclusionQuery, + SetName, End, RendererShutdownEnd, DestroyVertexDecl, @@ -725,99 +783,211 @@ namespace bgfx uint8_t m_buffer[BGFX_CONFIG_MAX_COMMAND_BUFFER_SIZE]; }; -#define SORT_KEY_NUM_BITS_TRANS 2 +// +#define SORK_KEY_NUM_BITS_VIEW 10 -#define SORT_KEY_DRAW_BIT (UINT64_C(1)<<0x36) - -#define SORT_KEY_VIEW_SHIFT 0x37 +#define SORT_KEY_VIEW_SHIFT (64-SORK_KEY_NUM_BITS_VIEW) #define SORT_KEY_VIEW_MASK ( (uint64_t(BGFX_CONFIG_MAX_VIEWS-1) )<> SORT_KEY_SEQ_SHIFT); m_view = _viewRemap[(_key & SORT_KEY_VIEW_MASK) >> SORT_KEY_VIEW_SHIFT]; if (_key & SORT_KEY_DRAW_BIT) { - m_depth = uint32_t( (_key & SORT_KEY_DRAW_DEPTH_MASK ) >> SORT_KEY_DRAW_DEPTH_SHIFT); - m_program = uint16_t( (_key & SORT_KEY_DRAW_PROGRAM_MASK) >> SORT_KEY_DRAW_PROGRAM_SHIFT); - m_trans = uint8_t( (_key & SORT_KEY_DRAW_TRANS_MASK ) >> SORT_KEY_DRAW_TRANS_SHIFT); + uint64_t type = _key & SORT_KEY_DRAW_TYPE_MASK; + if (type == SORT_KEY_DRAW_TYPE_DEPTH) + { + m_program = uint16_t( (_key & SORT_KEY_DRAW_1_PROGRAM_MASK) >> SORT_KEY_DRAW_1_PROGRAM_SHIFT); + return false; + } + else if (type == SORT_KEY_DRAW_TYPE_SEQUENCE) + { + m_program = uint16_t( (_key & SORT_KEY_DRAW_2_PROGRAM_MASK) >> SORT_KEY_DRAW_2_PROGRAM_SHIFT); + return false; + } + + m_program = uint16_t( (_key & SORT_KEY_DRAW_0_PROGRAM_MASK) >> SORT_KEY_DRAW_0_PROGRAM_SHIFT); return false; // draw } @@ -841,16 +1020,16 @@ namespace bgfx return true; // compute } - static uint8_t decodeView(uint64_t _key) + static ViewId decodeView(uint64_t _key) { - return uint8_t( (_key & SORT_KEY_VIEW_MASK) >> SORT_KEY_VIEW_SHIFT); + return ViewId( (_key & SORT_KEY_VIEW_MASK) >> SORT_KEY_VIEW_SHIFT); } - static uint64_t remapView(uint64_t _key, uint8_t _viewRemap[BGFX_CONFIG_MAX_VIEWS]) + static uint64_t remapView(uint64_t _key, ViewId _viewRemap[BGFX_CONFIG_MAX_VIEWS]) { - const uint8_t oldView = uint8_t( (_key & SORT_KEY_VIEW_MASK) >> SORT_KEY_VIEW_SHIFT); - const uint64_t view = uint64_t(_viewRemap[oldView]) << SORT_KEY_VIEW_SHIFT; - const uint64_t key = (_key & ~SORT_KEY_VIEW_MASK) | view; + const ViewId oldView = decodeView(_key); + const uint64_t view = uint64_t(_viewRemap[oldView]) << SORT_KEY_VIEW_SHIFT; + const uint64_t key = (_key & ~SORT_KEY_VIEW_MASK) | view; return key; } @@ -866,7 +1045,7 @@ namespace bgfx uint32_t m_depth; uint32_t m_seq; uint16_t m_program; - uint8_t m_view; + ViewId m_view; uint8_t m_trans; }; #undef SORT_KEY_RENDER_DRAW @@ -884,19 +1063,19 @@ namespace bgfx void decode(uint32_t _key) { m_item = uint16_t(_key & UINT16_MAX); - m_view = uint8_t(_key >> 24); + m_view = ViewId(_key >> 24); } - static uint32_t remapView(uint32_t _key, uint8_t _viewRemap[BGFX_CONFIG_MAX_VIEWS]) + static uint32_t remapView(uint32_t _key, ViewId _viewRemap[BGFX_CONFIG_MAX_VIEWS]) { - const uint8_t oldView = uint8_t(_key >> 24); + const ViewId oldView = ViewId(_key >> 24); const uint32_t view = uint32_t(_viewRemap[oldView]) << 24; const uint32_t key = (_key & ~UINT32_C(0xff000000) ) | view; return key; } uint16_t m_item; - uint8_t m_view; + ViewId m_view; }; BX_ALIGN_DECL_16(struct) Matrix4 @@ -930,13 +1109,9 @@ namespace bgfx uint32_t reserve(uint16_t* _num) { uint32_t num = *_num; - BX_WARN(m_num+num < BGFX_CONFIG_MAX_MATRIX_CACHE, "Matrix cache overflow. %d (max: %d)", m_num+num, BGFX_CONFIG_MAX_MATRIX_CACHE); - num = bx::uint32_min(num, BGFX_CONFIG_MAX_MATRIX_CACHE-m_num); - uint32_t first = m_num < BGFX_CONFIG_MAX_MATRIX_CACHE - ? m_num - : BGFX_CONFIG_MAX_MATRIX_CACHE - 1 - ; - m_num += num; + uint32_t first = bx::atomicFetchAndAddsat(&m_num, num, BGFX_CONFIG_MAX_MATRIX_CACHE - 1); + BX_WARN(first+num < BGFX_CONFIG_MAX_MATRIX_CACHE, "Matrix cache overflow. %d (max: %d)", first+num, BGFX_CONFIG_MAX_MATRIX_CACHE); + num = bx::uint32_min(num, BGFX_CONFIG_MAX_MATRIX_CACHE-1-first); *_num = (uint16_t)num; return first; } @@ -985,17 +1160,16 @@ namespace bgfx uint32_t add(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) { - BX_CHECK(m_num+1 < BGFX_CONFIG_MAX_RECT_CACHE, "Rect cache overflow. %d (max: %d)", m_num, BGFX_CONFIG_MAX_RECT_CACHE); + const uint32_t first = bx::atomicFetchAndAddsat(&m_num, 1, BGFX_CONFIG_MAX_RECT_CACHE-1); + BX_CHECK(first+1 < BGFX_CONFIG_MAX_RECT_CACHE, "Rect cache overflow. %d (max: %d)", first, BGFX_CONFIG_MAX_RECT_CACHE); - uint32_t first = m_num; - Rect& rect = m_cache[m_num]; + Rect& rect = m_cache[first]; rect.m_x = _x; rect.m_y = _y; rect.m_width = _width; rect.m_height = _height; - m_num++; return first; } @@ -1021,9 +1195,11 @@ namespace bgfx public: static UniformBuffer* create(uint32_t _size = 1<<20) { - uint32_t size = BX_ALIGN_16(bx::uint32_max(_size, sizeof(UniformBuffer) ) ); - void* data = BX_ALLOC(g_allocator, size); - return ::new(data) UniformBuffer(_size); + const uint32_t structSize = sizeof(UniformBuffer)-sizeof(UniformBuffer::m_buffer); + + uint32_t size = BX_ALIGN_16(_size); + void* data = BX_ALLOC(g_allocator, size+structSize); + return BX_PLACEMENT_NEW(data, UniformBuffer)(size); } static void destroy(UniformBuffer* _uniformBuffer) @@ -1032,14 +1208,18 @@ namespace bgfx BX_FREE(g_allocator, _uniformBuffer); } - static void update(UniformBuffer*& _uniformBuffer, uint32_t _treshold = 64<<10, uint32_t _grow = 1<<20) + static void update(UniformBuffer** _uniformBuffer, uint32_t _treshold = 64<<10, uint32_t _grow = 1<<20) { - if (_treshold >= _uniformBuffer->m_size - _uniformBuffer->m_pos) + UniformBuffer* uniformBuffer = *_uniformBuffer; + if (_treshold >= uniformBuffer->m_size - uniformBuffer->m_pos) { - uint32_t size = BX_ALIGN_16(bx::uint32_max(_uniformBuffer->m_size + _grow, sizeof(UniformBuffer) ) ); - void* data = BX_REALLOC(g_allocator, _uniformBuffer, size); - _uniformBuffer = reinterpret_cast(data); - _uniformBuffer->m_size = size; + const uint32_t structSize = sizeof(UniformBuffer)-sizeof(UniformBuffer::m_buffer); + uint32_t size = BX_ALIGN_16(uniformBuffer->m_size + _grow); + void* data = BX_REALLOC(g_allocator, uniformBuffer, size+structSize); + uniformBuffer = reinterpret_cast(data); + uniformBuffer->m_size = size; + + *_uniformBuffer = uniformBuffer; } } @@ -1123,7 +1303,7 @@ namespace bgfx private: UniformBuffer(uint32_t _size) - : m_size(_size-sizeof(m_buffer) ) + : m_size(_size) , m_pos(0) { finish(); @@ -1135,7 +1315,7 @@ namespace bgfx uint32_t m_size; uint32_t m_pos; - char m_buffer[8]; + char m_buffer[256<<20]; }; struct UniformRegInfo @@ -1157,8 +1337,8 @@ namespace bgfx const UniformRegInfo* find(const char* _name) const { - uint16_t handle = m_uniforms.find(bx::hashMurmur2A(_name) ); - if (UniformHashMap::invalid != handle) + uint16_t handle = m_uniforms.find(bx::hash(_name) ); + if (kInvalidHandle != handle) { return &m_info[handle]; } @@ -1169,7 +1349,7 @@ namespace bgfx const UniformRegInfo& add(UniformHandle _handle, const char* _name, const void* _data) { BX_CHECK(isValid(_handle), "Uniform handle is invalid (name: %s)!", _name); - const uint32_t key = bx::hashMurmur2A(_name); + const uint32_t key = bx::hash(_name); m_uniforms.removeByKey(key); m_uniforms.insert(key, _handle.idx); @@ -1228,8 +1408,8 @@ namespace bgfx void clear() { m_startVertex = 0; - m_handle.idx = invalidHandle; - m_decl.idx = invalidHandle; + m_handle.idx = kInvalidHandle; + m_decl.idx = kInvalidHandle; } uint32_t m_startVertex; @@ -1237,14 +1417,14 @@ namespace bgfx VertexDeclHandle m_decl; }; - struct RenderBind + BX_ALIGN_DECL_CACHE_LINE(struct) RenderBind { void clear() { for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++ii) { Binding& bind = m_bind[ii]; - bind.m_idx = invalidHandle; + bind.m_idx = kInvalidHandle; bind.m_type = 0; bind.m_un.m_draw.m_textureFlags = 0; } @@ -1253,33 +1433,34 @@ namespace bgfx Binding m_bind[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS]; }; - struct RenderDraw + BX_ALIGN_DECL_CACHE_LINE(struct) RenderDraw { void clear() { - m_constBegin = 0; - m_constEnd = 0; - m_stateFlags = BGFX_STATE_DEFAULT; - m_stencil = packStencil(BGFX_STENCIL_DEFAULT, BGFX_STENCIL_DEFAULT); - m_rgba = 0; - m_matrix = 0; - m_startIndex = 0; - m_numIndices = UINT32_MAX; - m_numVertices = UINT32_MAX; + m_uniformBegin = 0; + m_uniformEnd = 0; + m_stateFlags = BGFX_STATE_DEFAULT; + m_stencil = packStencil(BGFX_STENCIL_DEFAULT, BGFX_STENCIL_DEFAULT); + m_rgba = 0; + m_startMatrix = 0; + m_startIndex = 0; + m_numIndices = UINT32_MAX; + m_numVertices = UINT32_MAX; m_instanceDataOffset = 0; m_instanceDataStride = 0; m_numInstances = 1; m_startIndirect = 0; m_numIndirect = UINT16_MAX; - m_num = 1; + m_numMatrices = 1; m_submitFlags = BGFX_SUBMIT_EYE_FIRST; m_scissor = UINT16_MAX; m_streamMask = 0; m_stream[0].clear(); - m_indexBuffer.idx = invalidHandle; - m_instanceDataBuffer.idx = invalidHandle; - m_indirectBuffer.idx = invalidHandle; - m_occlusionQuery.idx = invalidHandle; + m_indexBuffer.idx = kInvalidHandle; + m_instanceDataBuffer.idx = kInvalidHandle; + m_indirectBuffer.idx = kInvalidHandle; + m_occlusionQuery.idx = kInvalidHandle; + m_uniformIdx = UINT8_MAX; } bool setStreamBit(uint8_t _stream, VertexBufferHandle _handle) @@ -1295,9 +1476,9 @@ namespace bgfx uint64_t m_stateFlags; uint64_t m_stencil; uint32_t m_rgba; - uint32_t m_constBegin; - uint32_t m_constEnd; - uint32_t m_matrix; + uint32_t m_uniformBegin; + uint32_t m_uniformEnd; + uint32_t m_startMatrix; uint32_t m_startIndex; uint32_t m_numIndices; uint32_t m_numVertices; @@ -1306,10 +1487,11 @@ namespace bgfx uint16_t m_instanceDataStride; uint16_t m_startIndirect; uint16_t m_numIndirect; - uint16_t m_num; + uint16_t m_numMatrices; uint16_t m_scissor; uint8_t m_submitFlags; uint8_t m_streamMask; + uint8_t m_uniformIdx; IndexBufferHandle m_indexBuffer; VertexBufferHandle m_instanceDataBuffer; @@ -1317,36 +1499,38 @@ namespace bgfx OcclusionQueryHandle m_occlusionQuery; }; - struct RenderCompute + BX_ALIGN_DECL_CACHE_LINE(struct) RenderCompute { void clear() { - m_constBegin = 0; - m_constEnd = 0; - m_matrix = 0; - m_numX = 0; - m_numY = 0; - m_numZ = 0; - m_num = 0; - m_submitFlags = BGFX_SUBMIT_EYE_FIRST; + m_uniformBegin = 0; + m_uniformEnd = 0; + m_startMatrix = 0; + m_numX = 0; + m_numY = 0; + m_numZ = 0; + m_numMatrices = 0; + m_submitFlags = BGFX_SUBMIT_EYE_FIRST; + m_uniformIdx = UINT8_MAX; - m_indirectBuffer.idx = invalidHandle; + m_indirectBuffer.idx = kInvalidHandle; m_startIndirect = 0; m_numIndirect = UINT16_MAX; } - uint32_t m_constBegin; - uint32_t m_constEnd; - uint32_t m_matrix; + uint32_t m_uniformBegin; + uint32_t m_uniformEnd; + uint32_t m_startMatrix; IndirectBufferHandle m_indirectBuffer; - uint16_t m_numX; - uint16_t m_numY; - uint16_t m_numZ; + uint32_t m_numX; + uint32_t m_numY; + uint32_t m_numZ; uint16_t m_startIndirect; uint16_t m_numIndirect; - uint16_t m_num; + uint16_t m_numMatrices; uint8_t m_submitFlags; + uint8_t m_uniformIdx; }; union RenderItem @@ -1355,7 +1539,7 @@ namespace bgfx RenderCompute compute; }; - struct BlitItem + BX_ALIGN_DECL_CACHE_LINE(struct) BlitItem { uint16_t m_srcX; uint16_t m_srcY; @@ -1375,8 +1559,8 @@ namespace bgfx struct Resolution { Resolution() - : m_width(BGFX_DEFAULT_WIDTH) - , m_height(BGFX_DEFAULT_HEIGHT) + : m_width(1280) + , m_height(720) , m_flags(BGFX_RESET_NONE) { } @@ -1386,6 +1570,11 @@ namespace bgfx uint32_t m_flags; }; + struct Init + { + Resolution resolution; + }; + struct VertexBuffer { uint16_t m_stride; @@ -1412,22 +1601,124 @@ namespace bgfx uint16_t m_flags; }; + BX_ALIGN_DECL_CACHE_LINE(struct) View + { + void reset() + { + setRect(0, 0, 1, 1); + setScissor(0, 0, 0, 0); + setClear(BGFX_CLEAR_NONE, 0, 0.0f, 0); + setMode(ViewMode::Default); + setFrameBuffer(BGFX_INVALID_HANDLE); + setTransform(NULL, NULL, BGFX_VIEW_NONE, NULL); + } + + void setRect(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) + { + m_rect.m_x = (uint16_t)bx::uint32_imax(int16_t(_x), 0); + m_rect.m_y = (uint16_t)bx::uint32_imax(int16_t(_y), 0); + m_rect.m_width = bx::uint16_max(_width, 1); + m_rect.m_height = bx::uint16_max(_height, 1); + } + + void setScissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) + { + m_scissor.m_x = _x; + m_scissor.m_y = _y; + m_scissor.m_width = _width; + m_scissor.m_height = _height; + } + + void setClear(uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) + { + m_clear.set(_flags, _rgba, _depth, _stencil); + } + + void setClear(uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) + { + m_clear.set(_flags, _depth, _stencil, _0, _1, _2, _3, _4, _5, _6, _7); + } + + void setMode(ViewMode::Enum _mode) + { + m_mode = uint8_t(_mode); + } + + void setFrameBuffer(FrameBufferHandle _handle) + { + m_fbh = _handle; + } + + void setTransform(const void* _view, const void* _proj, uint8_t _flags, const void* _proj1) + { + m_flags = _flags; + + if (NULL != _view) + { + bx::memCopy(m_view.un.val, _view, sizeof(Matrix4) ); + } + else + { + m_view.setIdentity(); + } + + if (NULL != _proj) + { + bx::memCopy(m_proj[0].un.val, _proj, sizeof(Matrix4) ); + } + else + { + m_proj[0].setIdentity(); + } + + if (NULL != _proj1) + { + bx::memCopy(m_proj[1].un.val, _proj1, sizeof(Matrix4) ); + } + else + { + bx::memCopy(m_proj[1].un.val, m_proj[0].un.val, sizeof(Matrix4) ); + } + } + + Clear m_clear; + Rect m_rect; + Rect m_scissor; + Matrix4 m_view; + Matrix4 m_proj[2]; + FrameBufferHandle m_fbh; + uint8_t m_mode; + uint8_t m_flags; + }; + + struct FrameCache + { + void reset() + { + m_matrixCache.reset(); + m_rectCache.reset(); + } + + MatrixCache m_matrixCache; + RectCache m_rectCache; + }; + BX_ALIGN_DECL_CACHE_LINE(struct) Frame { Frame() - : m_uniformMax(0) - , m_waitSubmit(0) + : m_waitSubmit(0) , m_waitRender(0) , m_hmdInitialized(false) , m_capture(false) - , m_discard(false) { SortKey term; term.reset(); - term.m_program = invalidHandle; - m_sortKeys[BGFX_CONFIG_MAX_DRAW_CALLS] = term.encodeDraw(); + term.m_program = kInvalidHandle; + m_sortKeys[BGFX_CONFIG_MAX_DRAW_CALLS] = term.encodeDraw(SortKey::SortProgram); m_sortValues[BGFX_CONFIG_MAX_DRAW_CALLS] = BGFX_CONFIG_MAX_DRAW_CALLS; bx::memSet(m_occlusion, 0xff, sizeof(m_occlusion) ); + + m_perfStats.viewStats = m_viewStats; } ~Frame() @@ -1436,7 +1727,11 @@ namespace bgfx void create() { - m_uniformBuffer = UniformBuffer::create(); + for (uint32_t ii = 0; ii < BX_COUNTOF(m_uniformBuffer); ++ii) + { + m_uniformBuffer[ii] = UniformBuffer::create(); + } + reset(); start(); m_textVideoMem = BX_NEW(g_allocator, TextVideoMem); @@ -1444,7 +1739,10 @@ namespace bgfx void destroy() { - UniformBuffer::destroy(m_uniformBuffer); + for (uint32_t ii = 0; ii < BX_COUNTOF(m_uniformBuffer); ++ii) + { + UniformBuffer::destroy(m_uniformBuffer[ii]); + } BX_DELETE(g_allocator, m_textVideoMem); } @@ -1457,26 +1755,14 @@ namespace bgfx void start() { - m_stateFlags = BGFX_STATE_NONE; - m_uniformBegin = 0; - m_uniformEnd = 0; - m_draw.clear(); - m_compute.clear(); - m_bind.clear(); - m_matrixCache.reset(); - m_rectCache.reset(); - m_key.reset(); - m_num = 0; + m_frameCache.reset(); m_numRenderItems = 0; - m_numDropped = 0; m_numBlitItems = 0; m_iboffset = 0; m_vboffset = 0; m_cmdPre.start(); m_cmdPost.start(); - m_uniformBuffer->reset(); m_capture = false; - m_discard = false; } void finish() @@ -1484,248 +1770,16 @@ namespace bgfx m_cmdPre.finish(); m_cmdPost.finish(); - m_uniformMax = bx::uint32_max(m_uniformMax, m_uniformBuffer->getPos() ); - m_uniformBuffer->finish(); - - if (0 < m_numDropped) - { - BX_TRACE("Too many draw calls: %d, dropped %d (max: %d)" - , m_num+m_numDropped - , m_numDropped - , BGFX_CONFIG_MAX_DRAW_CALLS - ); - } +// if (0 < m_numDropped) +// { +// BX_TRACE("Too many draw calls: %d, dropped %d (max: %d)" +// , m_numRenderItems+m_numDropped +// , m_numDropped +// , BGFX_CONFIG_MAX_DRAW_CALLS +// ); +// } } - void setMarker(const char* _name) - { - m_uniformBuffer->writeMarker(_name); - } - - void setState(uint64_t _state, uint32_t _rgba) - { - uint8_t blend = ( (_state&BGFX_STATE_BLEND_MASK)>>BGFX_STATE_BLEND_SHIFT)&0xff; - uint8_t alphaRef = ( (_state&BGFX_STATE_ALPHA_REF_MASK)>>BGFX_STATE_ALPHA_REF_SHIFT)&0xff; - // transparency sort order table - m_key.m_trans = "\x0\x2\x2\x3\x3\x2\x3\x2\x3\x2\x2\x2\x2\x2\x2\x2\x2\x2\x2"[( (blend)&0xf) + (!!blend)] + !!alphaRef; - m_draw.m_stateFlags = _state; - m_draw.m_rgba = _rgba; - } - - void setCondition(OcclusionQueryHandle _handle, bool _visible) - { - m_draw.m_occlusionQuery = _handle; - m_draw.m_submitFlags |= _visible ? BGFX_SUBMIT_INTERNAL_OCCLUSION_VISIBLE : 0; - } - - void setStencil(uint32_t _fstencil, uint32_t _bstencil) - { - m_draw.m_stencil = packStencil(_fstencil, _bstencil); - } - - uint16_t setScissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) - { - uint16_t scissor = (uint16_t)m_rectCache.add(_x, _y, _width, _height); - m_draw.m_scissor = scissor; - return scissor; - } - - void setScissor(uint16_t _cache) - { - m_draw.m_scissor = _cache; - } - - uint32_t setTransform(const void* _mtx, uint16_t _num) - { - m_draw.m_matrix = m_matrixCache.add(_mtx, _num); - m_draw.m_num = _num; - - return m_draw.m_matrix; - } - - uint32_t allocTransform(Transform* _transform, uint16_t _num) - { - uint32_t first = m_matrixCache.reserve(&_num); - _transform->data = m_matrixCache.toPtr(first); - _transform->num = _num; - - return first; - } - - void setTransform(uint32_t _cache, uint16_t _num) - { - BX_CHECK(_cache < BGFX_CONFIG_MAX_MATRIX_CACHE, "Matrix cache out of bounds index %d (max: %d)" - , _cache - , BGFX_CONFIG_MAX_MATRIX_CACHE - ); - m_draw.m_matrix = _cache; - m_draw.m_num = uint16_t(bx::uint32_min(_cache+_num, BGFX_CONFIG_MAX_MATRIX_CACHE-1) - _cache); - } - - void setIndexBuffer(IndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices) - { - m_draw.m_startIndex = _firstIndex; - m_draw.m_numIndices = _numIndices; - m_draw.m_indexBuffer = _handle; - } - - void setIndexBuffer(const DynamicIndexBuffer& _dib, uint32_t _firstIndex, uint32_t _numIndices) - { - const uint32_t indexSize = 0 == (_dib.m_flags & BGFX_BUFFER_INDEX32) ? 2 : 4; - m_draw.m_startIndex = _dib.m_startIndex + _firstIndex; - m_draw.m_numIndices = bx::uint32_min(_numIndices, _dib.m_size/indexSize); - m_draw.m_indexBuffer = _dib.m_handle; - } - - void setIndexBuffer(const TransientIndexBuffer* _tib, uint32_t _firstIndex, uint32_t _numIndices) - { - m_draw.m_indexBuffer = _tib->handle; - m_draw.m_startIndex = _firstIndex; - m_draw.m_numIndices = _numIndices; - m_discard = 0 == _numIndices; - } - - void setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices) - { - if (m_draw.setStreamBit(_stream, _handle) ) - { - Stream& stream = m_draw.m_stream[_stream]; - stream.m_startVertex = _startVertex; - stream.m_handle = _handle; - stream.m_decl.idx = invalidHandle; - m_numVertices[_stream] = _numVertices; - } - } - - void setVertexBuffer(uint8_t _stream, const DynamicVertexBuffer& _dvb, uint32_t _startVertex, uint32_t _numVertices) - { - if (m_draw.setStreamBit(_stream, _dvb.m_handle) ) - { - Stream& stream = m_draw.m_stream[_stream]; - stream.m_startVertex = _dvb.m_startVertex + _startVertex; - stream.m_handle = _dvb.m_handle; - stream.m_decl = _dvb.m_decl; - m_numVertices[_stream] = - bx::uint32_min(bx::uint32_imax(0, _dvb.m_numVertices - _startVertex), _numVertices) - ; - } - } - - void setVertexBuffer(uint8_t _stream, const TransientVertexBuffer* _tvb, uint32_t _startVertex, uint32_t _numVertices) - { - if (m_draw.setStreamBit(_stream, _tvb->handle) ) - { - Stream& stream = m_draw.m_stream[_stream]; - stream.m_startVertex = _tvb->startVertex + _startVertex; - stream.m_handle = _tvb->handle; - stream.m_decl = _tvb->decl; - m_numVertices[_stream] = - bx::uint32_min(bx::uint32_imax(0, _tvb->size/_tvb->stride - _startVertex), _numVertices) - ; - } - } - - void setInstanceDataBuffer(const InstanceDataBuffer* _idb, uint32_t _num) - { - m_draw.m_instanceDataOffset = _idb->offset; - m_draw.m_instanceDataStride = _idb->stride; - m_draw.m_numInstances = bx::uint32_min(_idb->num, _num); - m_draw.m_instanceDataBuffer = _idb->handle; - BX_FREE(g_allocator, const_cast(_idb) ); - } - - void setInstanceDataBuffer(VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _num, uint16_t _stride) - { - m_draw.m_instanceDataOffset = _startVertex * _stride; - m_draw.m_instanceDataStride = _stride; - m_draw.m_numInstances = _num; - m_draw.m_instanceDataBuffer = _handle; - } - - void setTexture(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint32_t _flags) - { - Binding& bind = m_bind.m_bind[_stage]; - bind.m_idx = _handle.idx; - bind.m_type = uint8_t(Binding::Texture); - bind.m_un.m_draw.m_textureFlags = (_flags&BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER) - ? BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER - : _flags - ; - - if (isValid(_sampler) ) - { - uint32_t stage = _stage; - setUniform(_sampler, &stage); - } - } - - void setBuffer(uint8_t _stage, IndexBufferHandle _handle, Access::Enum _access) - { - Binding& bind = m_bind.m_bind[_stage]; - bind.m_idx = _handle.idx; - bind.m_type = uint8_t(Binding::IndexBuffer); - bind.m_un.m_compute.m_format = 0; - bind.m_un.m_compute.m_access = uint8_t(_access); - bind.m_un.m_compute.m_mip = 0; - } - - void setBuffer(uint8_t _stage, VertexBufferHandle _handle, Access::Enum _access) - { - Binding& bind = m_bind.m_bind[_stage]; - bind.m_idx = _handle.idx; - bind.m_type = uint8_t(Binding::VertexBuffer); - bind.m_un.m_compute.m_format = 0; - bind.m_un.m_compute.m_access = uint8_t(_access); - bind.m_un.m_compute.m_mip = 0; - } - - void setImage(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format) - { - Binding& bind = m_bind.m_bind[_stage]; - bind.m_idx = _handle.idx; - bind.m_type = uint8_t(Binding::Image); - bind.m_un.m_compute.m_format = uint8_t(_format); - bind.m_un.m_compute.m_access = uint8_t(_access); - bind.m_un.m_compute.m_mip = _mip; - - if (isValid(_sampler) ) - { - uint32_t stage = _stage; - setUniform(_sampler, &stage); - } - } - - void discard() - { - m_discard = false; - m_draw.clear(); - m_compute.clear(); - m_stateFlags = BGFX_STATE_NONE; - } - - uint32_t submit(uint8_t _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, int32_t _depth, bool _preserveState); - - uint32_t submit(uint8_t _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState) - { - m_draw.m_startIndirect = _start; - m_draw.m_numIndirect = _num; - m_draw.m_indirectBuffer = _indirectHandle; - OcclusionQueryHandle handle = BGFX_INVALID_HANDLE; - return submit(_id, _program, handle, _depth, _preserveState); - } - - uint32_t dispatch(uint8_t _id, ProgramHandle _handle, uint16_t _ngx, uint16_t _ngy, uint16_t _ngz, uint8_t _flags); - - uint32_t dispatch(uint8_t _id, ProgramHandle _handle, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags) - { - m_compute.m_indirectBuffer = _indirectHandle; - m_compute.m_startIndirect = _start; - m_compute.m_numIndirect = _num; - return dispatch(_id, _handle, 0, 0, 0, _flags); - } - - void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); - void sort(); uint32_t getAvailTransientIndexBuffer(uint32_t _num) @@ -1766,12 +1820,6 @@ namespace bgfx return offset; } - void writeUniform(UniformType::Enum _type, UniformHandle _handle, const void* _value, uint16_t _num) - { - UniformBuffer::update(m_uniformBuffer); - m_uniformBuffer->writeUniform(_type, _handle.idx, _value, _num); - } - bool free(IndexBufferHandle _handle) { return m_freeIndexBuffer.queue(_handle); @@ -1824,17 +1872,11 @@ namespace bgfx m_freeUniform.reset(); } - SortKey m_key; - - uint8_t m_viewRemap[BGFX_CONFIG_MAX_VIEWS]; - FrameBufferHandle m_fb[BGFX_CONFIG_MAX_VIEWS]; - Clear m_clear[BGFX_CONFIG_MAX_VIEWS]; + ViewId m_viewRemap[BGFX_CONFIG_MAX_VIEWS]; float m_colorPalette[BGFX_CONFIG_MAX_COLOR_PALETTE][4]; - Rect m_rect[BGFX_CONFIG_MAX_VIEWS]; - Rect m_scissor[BGFX_CONFIG_MAX_VIEWS]; - Matrix4 m_view[BGFX_CONFIG_MAX_VIEWS]; - Matrix4 m_proj[2][BGFX_CONFIG_MAX_VIEWS]; - uint8_t m_viewFlags[BGFX_CONFIG_MAX_VIEWS]; + + View m_view[BGFX_CONFIG_MAX_VIEWS]; + int32_t m_occlusion[BGFX_CONFIG_MAX_OCCLUSION_QUERIES]; uint64_t m_sortKeys[BGFX_CONFIG_MAX_DRAW_CALLS+1]; @@ -1842,28 +1884,15 @@ namespace bgfx RenderItem m_renderItem[BGFX_CONFIG_MAX_DRAW_CALLS+1]; RenderBind m_renderItemBind[BGFX_CONFIG_MAX_DRAW_CALLS + 1]; - RenderDraw m_draw; - RenderCompute m_compute; - RenderBind m_bind; - - uint32_t m_numVertices[BGFX_CONFIG_MAX_VERTEX_STREAMS]; uint32_t m_blitKeys[BGFX_CONFIG_MAX_BLIT_ITEMS+1]; BlitItem m_blitItem[BGFX_CONFIG_MAX_BLIT_ITEMS+1]; - uint64_t m_stateFlags; - uint32_t m_uniformBegin; - uint32_t m_uniformEnd; - uint32_t m_uniformMax; - UniformBuffer* m_uniformBuffer; + FrameCache m_frameCache; + UniformBuffer* m_uniformBuffer[BGFX_CONFIG_MAX_ENCODERS]; - RenderItemCount m_num; - RenderItemCount m_numRenderItems; - RenderItemCount m_numDropped; + uint32_t m_numRenderItems; uint16_t m_numBlitItems; - MatrixCache m_matrixCache; - RectCache m_rectCache; - uint32_t m_iboffset; uint32_t m_vboffset; TransientIndexBuffer* m_transientIb; @@ -1942,14 +1971,334 @@ namespace bgfx TextVideoMem* m_textVideoMem; HMD m_hmd; - Stats m_perfStats; + + Stats m_perfStats; + ViewStats m_viewStats[BGFX_CONFIG_MAX_VIEWS]; int64_t m_waitSubmit; int64_t m_waitRender; bool m_hmdInitialized; bool m_capture; - bool m_discard; + }; + + BX_ALIGN_DECL_CACHE_LINE(struct) EncoderImpl + { + EncoderImpl() + { + discard(); + } + + void begin(Frame* _frame, uint8_t _idx) + { + m_frame = _frame; + + m_cpuTimeBegin = bx::getHPCounter(); + + m_uniformIdx = _idx; + m_uniformBegin = 0; + m_uniformEnd = 0; + + UniformBuffer* uniformBuffer = m_frame->m_uniformBuffer[m_uniformIdx]; + uniformBuffer->reset(); + + m_numSubmitted = 0; + m_numDropped = 0; + } + + void end(bool _finalize) + { + if (_finalize) + { + UniformBuffer* uniformBuffer = m_frame->m_uniformBuffer[m_uniformIdx]; + uniformBuffer->finish(); + + m_cpuTimeEnd = bx::getHPCounter(); + } + + if (BX_ENABLED(BGFX_CONFIG_DEBUG_OCCLUSION) ) + { + m_occlusionQuerySet.clear(); + } + + if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) + { + m_uniformSet.clear(); + } + } + + void setMarker(const char* _name) + { + UniformBuffer* uniformBuffer = m_frame->m_uniformBuffer[m_uniformIdx]; + uniformBuffer->writeMarker(_name); + } + + void setUniform(UniformType::Enum _type, UniformHandle _handle, const void* _value, uint16_t _num) + { + if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) + { + BX_CHECK(m_uniformSet.end() == m_uniformSet.find(_handle.idx) + , "Uniform %d (%s) was already set for this draw call." + , _handle.idx + , getName(_handle) + ); + m_uniformSet.insert(_handle.idx); + } + + UniformBuffer::update(&m_frame->m_uniformBuffer[m_uniformIdx]); + UniformBuffer* uniformBuffer = m_frame->m_uniformBuffer[m_uniformIdx]; + uniformBuffer->writeUniform(_type, _handle.idx, _value, _num); + } + + void setState(uint64_t _state, uint32_t _rgba) + { + uint8_t blend = ( (_state&BGFX_STATE_BLEND_MASK)>>BGFX_STATE_BLEND_SHIFT)&0xff; + uint8_t alphaRef = ( (_state&BGFX_STATE_ALPHA_REF_MASK)>>BGFX_STATE_ALPHA_REF_SHIFT)&0xff; + // transparency sort order table + m_key.m_trans = "\x0\x2\x2\x3\x3\x2\x3\x2\x3\x2\x2\x2\x2\x2\x2\x2\x2\x2\x2"[( (blend)&0xf) + (!!blend)] + !!alphaRef; + m_draw.m_stateFlags = _state; + m_draw.m_rgba = _rgba; + } + + void setCondition(OcclusionQueryHandle _handle, bool _visible) + { + m_draw.m_occlusionQuery = _handle; + m_draw.m_submitFlags |= _visible ? BGFX_SUBMIT_INTERNAL_OCCLUSION_VISIBLE : 0; + } + + void setStencil(uint32_t _fstencil, uint32_t _bstencil) + { + m_draw.m_stencil = packStencil(_fstencil, _bstencil); + } + + uint16_t setScissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) + { + uint16_t scissor = (uint16_t)m_frame->m_frameCache.m_rectCache.add(_x, _y, _width, _height); + m_draw.m_scissor = scissor; + return scissor; + } + + void setScissor(uint16_t _cache) + { + m_draw.m_scissor = _cache; + } + + uint32_t setTransform(const void* _mtx, uint16_t _num) + { + m_draw.m_startMatrix = m_frame->m_frameCache.m_matrixCache.add(_mtx, _num); + m_draw.m_numMatrices = _num; + + return m_draw.m_startMatrix; + } + + uint32_t allocTransform(Transform* _transform, uint16_t _num) + { + uint32_t first = m_frame->m_frameCache.m_matrixCache.reserve(&_num); + _transform->data = m_frame->m_frameCache.m_matrixCache.toPtr(first); + _transform->num = _num; + + return first; + } + + void setTransform(uint32_t _cache, uint16_t _num) + { + BX_CHECK(_cache < BGFX_CONFIG_MAX_MATRIX_CACHE, "Matrix cache out of bounds index %d (max: %d)" + , _cache + , BGFX_CONFIG_MAX_MATRIX_CACHE + ); + m_draw.m_startMatrix = _cache; + m_draw.m_numMatrices = uint16_t(bx::uint32_min(_cache+_num, BGFX_CONFIG_MAX_MATRIX_CACHE-1) - _cache); + } + + void setIndexBuffer(IndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices) + { + m_draw.m_startIndex = _firstIndex; + m_draw.m_numIndices = _numIndices; + m_draw.m_indexBuffer = _handle; + } + + void setIndexBuffer(const DynamicIndexBuffer& _dib, uint32_t _firstIndex, uint32_t _numIndices) + { + const uint32_t indexSize = 0 == (_dib.m_flags & BGFX_BUFFER_INDEX32) ? 2 : 4; + m_draw.m_startIndex = _dib.m_startIndex + _firstIndex; + m_draw.m_numIndices = bx::uint32_min(_numIndices, _dib.m_size/indexSize); + m_draw.m_indexBuffer = _dib.m_handle; + } + + void setIndexBuffer(const TransientIndexBuffer* _tib, uint32_t _firstIndex, uint32_t _numIndices) + { + const uint32_t numIndices = bx::uint32_min(_numIndices, _tib->size/2); + m_draw.m_indexBuffer = _tib->handle; + m_draw.m_startIndex = _tib->startIndex + _firstIndex; + m_draw.m_numIndices = numIndices; + m_discard = 0 == numIndices; + } + + void setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices) + { + BX_CHECK(_stream < BGFX_CONFIG_MAX_VERTEX_STREAMS, "Invalid stream %d (max %d).", _stream, BGFX_CONFIG_MAX_VERTEX_STREAMS); + if (m_draw.setStreamBit(_stream, _handle) ) + { + Stream& stream = m_draw.m_stream[_stream]; + stream.m_startVertex = _startVertex; + stream.m_handle = _handle; + stream.m_decl.idx = kInvalidHandle; + m_numVertices[_stream] = _numVertices; + } + } + + void setVertexBuffer(uint8_t _stream, const DynamicVertexBuffer& _dvb, uint32_t _startVertex, uint32_t _numVertices) + { + BX_CHECK(_stream < BGFX_CONFIG_MAX_VERTEX_STREAMS, "Invalid stream %d (max %d).", _stream, BGFX_CONFIG_MAX_VERTEX_STREAMS); + if (m_draw.setStreamBit(_stream, _dvb.m_handle) ) + { + Stream& stream = m_draw.m_stream[_stream]; + stream.m_startVertex = _dvb.m_startVertex + _startVertex; + stream.m_handle = _dvb.m_handle; + stream.m_decl = _dvb.m_decl; + m_numVertices[_stream] = + bx::uint32_min(bx::uint32_imax(0, _dvb.m_numVertices - _startVertex), _numVertices) + ; + } + } + + void setVertexBuffer(uint8_t _stream, const TransientVertexBuffer* _tvb, uint32_t _startVertex, uint32_t _numVertices) + { + BX_CHECK(_stream < BGFX_CONFIG_MAX_VERTEX_STREAMS, "Invalid stream %d (max %d).", _stream, BGFX_CONFIG_MAX_VERTEX_STREAMS); + if (m_draw.setStreamBit(_stream, _tvb->handle) ) + { + Stream& stream = m_draw.m_stream[_stream]; + stream.m_startVertex = _tvb->startVertex + _startVertex; + stream.m_handle = _tvb->handle; + stream.m_decl = _tvb->decl; + m_numVertices[_stream] = + bx::uint32_min(bx::uint32_imax(0, _tvb->size/_tvb->stride - _startVertex), _numVertices) + ; + } + } + + void setInstanceDataBuffer(const InstanceDataBuffer* _idb, uint32_t _num) + { + m_draw.m_instanceDataOffset = _idb->offset; + m_draw.m_instanceDataStride = _idb->stride; + m_draw.m_numInstances = bx::uint32_min(_idb->num, _num); + m_draw.m_instanceDataBuffer = _idb->handle; + } + + void setInstanceDataBuffer(VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _num, uint16_t _stride) + { + m_draw.m_instanceDataOffset = _startVertex * _stride; + m_draw.m_instanceDataStride = _stride; + m_draw.m_numInstances = _num; + m_draw.m_instanceDataBuffer = _handle; + } + + void setTexture(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint32_t _flags) + { + Binding& bind = m_bind.m_bind[_stage]; + bind.m_idx = _handle.idx; + bind.m_type = uint8_t(Binding::Texture); + bind.m_un.m_draw.m_textureFlags = (_flags&BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER) + ? BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER + : _flags + ; + + if (isValid(_sampler) ) + { + uint32_t stage = _stage; + setUniform(UniformType::Int1, _sampler, &stage, 1); + } + } + + void setBuffer(uint8_t _stage, IndexBufferHandle _handle, Access::Enum _access) + { + Binding& bind = m_bind.m_bind[_stage]; + bind.m_idx = _handle.idx; + bind.m_type = uint8_t(Binding::IndexBuffer); + bind.m_un.m_compute.m_format = 0; + bind.m_un.m_compute.m_access = uint8_t(_access); + bind.m_un.m_compute.m_mip = 0; + } + + void setBuffer(uint8_t _stage, VertexBufferHandle _handle, Access::Enum _access) + { + Binding& bind = m_bind.m_bind[_stage]; + bind.m_idx = _handle.idx; + bind.m_type = uint8_t(Binding::VertexBuffer); + bind.m_un.m_compute.m_format = 0; + bind.m_un.m_compute.m_access = uint8_t(_access); + bind.m_un.m_compute.m_mip = 0; + } + + void setImage(uint8_t _stage, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format) + { + Binding& bind = m_bind.m_bind[_stage]; + bind.m_idx = _handle.idx; + bind.m_type = uint8_t(Binding::Image); + bind.m_un.m_compute.m_format = uint8_t(_format); + bind.m_un.m_compute.m_access = uint8_t(_access); + bind.m_un.m_compute.m_mip = _mip; + } + + void discard() + { + if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) + { + m_uniformSet.clear(); + } + + m_discard = false; + m_draw.clear(); + m_compute.clear(); + m_bind.clear(); + } + + void submit(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, int32_t _depth, bool _preserveState); + + void submit(ViewId _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState) + { + m_draw.m_startIndirect = _start; + m_draw.m_numIndirect = _num; + m_draw.m_indirectBuffer = _indirectHandle; + OcclusionQueryHandle handle = BGFX_INVALID_HANDLE; + submit(_id, _program, handle, _depth, _preserveState); + } + + void dispatch(ViewId _id, ProgramHandle _handle, uint32_t _ngx, uint32_t _ngy, uint32_t _ngz, uint8_t _flags); + + void dispatch(ViewId _id, ProgramHandle _handle, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags) + { + m_compute.m_indirectBuffer = _indirectHandle; + m_compute.m_startIndirect = _start; + m_compute.m_numIndirect = _num; + dispatch(_id, _handle, 0, 0, 0, _flags); + } + + void blit(ViewId _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); + + Frame* m_frame; + + SortKey m_key; + + RenderDraw m_draw; + RenderCompute m_compute; + RenderBind m_bind; + + uint32_t m_numSubmitted; + uint32_t m_numDropped; + + uint32_t m_uniformBegin; + uint32_t m_uniformEnd; + uint32_t m_numVertices[BGFX_CONFIG_MAX_VERTEX_STREAMS]; + uint8_t m_uniformIdx; + bool m_discard; + + typedef stl::unordered_set HandleSet; + HandleSet m_uniformSet; + HandleSet m_occlusionQuerySet; + + int64_t m_cpuTimeBegin; + int64_t m_cpuTimeEnd; }; struct VertexDeclRef @@ -1960,9 +2309,9 @@ namespace bgfx void init() { - bx::memSet(m_vertexDeclRef, 0, sizeof(m_vertexDeclRef) ); - bx::memSet(m_vertexBufferRef, 0xff, sizeof(m_vertexBufferRef) ); - bx::memSet(m_dynamicVertexBufferRef, 0xff, sizeof(m_vertexBufferRef) ); + bx::memSet(m_vertexDeclRef, 0, sizeof(m_vertexDeclRef) ); + bx::memSet(m_vertexBufferRef, 0xff, sizeof(m_vertexBufferRef) ); + bx::memSet(m_dynamicVertexBufferRef, 0xff, sizeof(m_dynamicVertexBufferRef) ); } template @@ -1993,7 +2342,7 @@ namespace bgfx void add(VertexBufferHandle _handle, VertexDeclHandle _declHandle, uint32_t _hash) { - BX_CHECK(m_vertexBufferRef[_handle.idx].idx == invalidHandle, ""); + BX_CHECK(m_vertexBufferRef[_handle.idx].idx == kInvalidHandle, ""); m_vertexBufferRef[_handle.idx] = _declHandle; m_vertexDeclRef[_declHandle.idx]++; m_vertexDeclMap.insert(_hash, _declHandle.idx); @@ -2001,7 +2350,7 @@ namespace bgfx void add(DynamicVertexBufferHandle _handle, VertexDeclHandle _declHandle, uint32_t _hash) { - BX_CHECK(m_dynamicVertexBufferRef[_handle.idx].idx == invalidHandle, ""); + BX_CHECK(m_dynamicVertexBufferRef[_handle.idx].idx == kInvalidHandle, ""); m_dynamicVertexBufferRef[_handle.idx] = _declHandle; m_vertexDeclRef[_declHandle.idx]++; m_vertexDeclMap.insert(_hash, _declHandle.idx); @@ -2028,7 +2377,7 @@ namespace bgfx { VertexDeclHandle declHandle = m_vertexBufferRef[_handle.idx]; declHandle = release(declHandle); - m_vertexBufferRef[_handle.idx].idx = invalidHandle; + m_vertexBufferRef[_handle.idx].idx = kInvalidHandle; return declHandle; } @@ -2037,7 +2386,7 @@ namespace bgfx { VertexDeclHandle declHandle = m_dynamicVertexBufferRef[_handle.idx]; declHandle = release(declHandle); - m_dynamicVertexBufferRef[_handle.idx].idx = invalidHandle; + m_dynamicVertexBufferRef[_handle.idx].idx = kInvalidHandle; return declHandle; } @@ -2054,7 +2403,7 @@ namespace bgfx class NonLocalAllocator { public: - static const uint64_t invalidBlock = UINT64_MAX; + static const uint64_t kInvalidBlock = UINT64_MAX; NonLocalAllocator() { @@ -2114,7 +2463,7 @@ namespace bgfx } // there is no block large enough. - return invalidBlock; + return kInvalidBlock; } void free(uint64_t _block) @@ -2196,7 +2545,7 @@ namespace bgfx virtual void destroyShader(ShaderHandle _handle) = 0; virtual void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) = 0; virtual void destroyProgram(ProgramHandle _handle) = 0; - virtual void createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) = 0; + virtual void* createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) = 0; virtual void updateTextureBegin(TextureHandle _handle, uint8_t _side, uint8_t _mip) = 0; virtual void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) = 0; virtual void updateTextureEnd() = 0; @@ -2211,10 +2560,11 @@ namespace bgfx virtual void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) = 0; virtual void destroyUniform(UniformHandle _handle) = 0; virtual void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) = 0; - virtual void updateViewName(uint8_t _id, const char* _name) = 0; + virtual void updateViewName(ViewId _id, const char* _name) = 0; virtual void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) = 0; virtual void setMarker(const char* _marker, uint32_t _size) = 0; virtual void invalidateOcclusionQuery(OcclusionQueryHandle _handle) = 0; + virtual void setName(Handle _handle, const char* _name) = 0; virtual void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) = 0; virtual void blitSetup(TextVideoMemBlitter& _blitter) = 0; virtual void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) = 0; @@ -2241,7 +2591,6 @@ namespace bgfx , m_numFreeDynamicVertexBufferHandles(0) , m_numFreeOcclusionQueryHandles(0) , m_colorPaletteDirty(0) - , m_instBufferCount(0) , m_frames(0) , m_debug(BGFX_DEBUG_NONE) , m_renderCtx(NULL) @@ -2258,13 +2607,13 @@ namespace bgfx { } - static int32_t renderThread(void* /*_userData*/) + static int32_t renderThread(bx::Thread* /*_self*/, void* /*_userData*/) { BX_TRACE("render thread start"); BGFX_PROFILER_SET_CURRENT_THREAD_NAME("bgfx - Render Thread"); while (RenderFrame::Exiting != bgfx::renderFrame() ) {}; BX_TRACE("render thread exit"); - return EXIT_SUCCESS; + return bx::kExitSuccess; } // game thread @@ -2298,7 +2647,10 @@ namespace bgfx m_flipAfterRender = !!(_flags & BGFX_RESET_FLIP_AFTER_RENDER); - bx::memSet(m_fb, 0xff, sizeof(m_fb) ); + for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) + { + m_view[ii].setFrameBuffer(BGFX_INVALID_HANDLE); + } for (uint16_t ii = 0, num = m_textureHandle.getNumHandles(); ii < num; ++ii) { @@ -2324,22 +2676,30 @@ namespace bgfx BGFX_API_FUNC(void dbgTextClear(uint8_t _attr, bool _small) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + m_submit->m_textVideoMem->resize(_small, (uint16_t)m_resolution.m_width, (uint16_t)m_resolution.m_height); m_submit->m_textVideoMem->clear(_attr); } BGFX_API_FUNC(void dbgTextPrintfVargs(uint16_t _x, uint16_t _y, uint8_t _attr, const char* _format, va_list _argList) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + m_submit->m_textVideoMem->printfVargs(_x, _y, _attr, _format, _argList); } BGFX_API_FUNC(void dbgTextImage(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const void* _data, uint16_t _pitch) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + m_submit->m_textVideoMem->image(_x, _y, _width, _height, _data, _pitch); } BGFX_API_FUNC(const HMD* getHMD() ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + if (m_submit->m_hmdInitialized) { return &m_submit->m_hmd; @@ -2350,6 +2710,8 @@ namespace bgfx BGFX_API_FUNC(const Stats* getPerfStats() ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + Stats& stats = m_submit->m_perfStats; const Resolution& resolution = m_submit->m_resolution; stats.width = uint16_t(resolution.m_width); @@ -2357,11 +2719,27 @@ namespace bgfx const TextVideoMem* tvm = m_submit->m_textVideoMem; stats.textWidth = tvm->m_width; stats.textHeight = tvm->m_height; + stats.encoderStats = m_encoderStats; + + stats.numDynamicIndexBuffers = m_dynamicIndexBufferHandle.getNumHandles(); + stats.numDynamicVertexBuffers = m_dynamicVertexBufferHandle.getNumHandles(); + stats.numFrameBuffers = m_frameBufferHandle.getNumHandles(); + stats.numIndexBuffers = m_indexBufferHandle.getNumHandles(); + stats.numOcclusionQueries = m_occlusionQueryHandle.getNumHandles(); + stats.numPrograms = m_programHandle.getNumHandles(); + stats.numShaders = m_shaderHandle.getNumHandles(); + stats.numTextures = m_textureHandle.getNumHandles(); + stats.numUniforms = m_uniformHandle.getNumHandles(); + stats.numVertexBuffers = m_vertexBufferHandle.getNumHandles(); + stats.numVertexDecls = m_vertexDeclHandle.getNumHandles(); + return &stats; } BGFX_API_FUNC(IndexBufferHandle createIndexBuffer(const Memory* _mem, uint16_t _flags) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + IndexBufferHandle handle = { m_indexBufferHandle.alloc() }; BX_WARN(isValid(handle), "Failed to allocate index buffer handle."); @@ -2382,6 +2760,8 @@ namespace bgfx BGFX_API_FUNC(void destroyIndexBuffer(IndexBufferHandle _handle) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("destroyIndexBuffer", m_indexBufferHandle, _handle); bool ok = m_submit->free(_handle); BX_UNUSED(ok); BX_CHECK(ok, "Index buffer handle %d is already destroyed!", _handle.idx); @@ -2396,8 +2776,12 @@ namespace bgfx if (!isValid(declHandle) ) { - VertexDeclHandle temp = { m_vertexDeclHandle.alloc() }; - declHandle = temp; + declHandle.idx = m_vertexDeclHandle.alloc(); + if (!isValid(declHandle) ) + { + return declHandle; + } + CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateVertexDecl); cmdbuf.write(declHandle); cmdbuf.write(_decl); @@ -2408,12 +2792,20 @@ namespace bgfx BGFX_API_FUNC(VertexBufferHandle createVertexBuffer(const Memory* _mem, const VertexDecl& _decl, uint16_t _flags) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + VertexBufferHandle handle = { m_vertexBufferHandle.alloc() }; - BX_WARN(isValid(handle), "Failed to allocate vertex buffer handle."); if (isValid(handle) ) { VertexDeclHandle declHandle = findVertexDecl(_decl); + if (!isValid(declHandle) ) + { + BX_TRACE("WARNING: Failed to allocate vertex decl handle (BGFX_CONFIG_MAX_VERTEX_DECLS, max: %d).", BGFX_CONFIG_MAX_VERTEX_DECLS); + m_vertexBufferHandle.free(handle.idx); + return BGFX_INVALID_HANDLE; + } + m_declRef.add(handle, declHandle, _decl.m_hash); m_vertexBuffers[handle.idx].m_stride = _decl.m_stride; @@ -2423,17 +2815,20 @@ namespace bgfx cmdbuf.write(_mem); cmdbuf.write(declHandle); cmdbuf.write(_flags); - } - else - { - release(_mem); + + return handle; } - return handle; + BX_TRACE("WARNING: Failed to allocate vertex buffer handle (BGFX_CONFIG_MAX_VERTEX_BUFFERS, max: %d).", BGFX_CONFIG_MAX_VERTEX_BUFFERS); + release(_mem); + + return BGFX_INVALID_HANDLE; } BGFX_API_FUNC(void destroyVertexBuffer(VertexBufferHandle _handle) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("destroyVertexBuffer", m_vertexBufferHandle, _handle); bool ok = m_submit->free(_handle); BX_UNUSED(ok); BX_CHECK(ok, "Vertex buffer handle %d is already destroyed!", _handle.idx); @@ -2458,7 +2853,7 @@ namespace bgfx uint64_t allocDynamicIndexBuffer(uint32_t _size, uint16_t _flags) { uint64_t ptr = m_dynIndexBufferAllocator.alloc(_size); - if (ptr == NonLocalAllocator::invalidBlock) + if (ptr == NonLocalAllocator::kInvalidBlock) { IndexBufferHandle indexBufferHandle = { m_indexBufferHandle.alloc() }; BX_WARN(isValid(indexBufferHandle), "Failed to allocate index buffer handle."); @@ -2483,12 +2878,14 @@ namespace bgfx BGFX_API_FUNC(DynamicIndexBufferHandle createDynamicIndexBuffer(uint32_t _num, uint16_t _flags) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + DynamicIndexBufferHandle handle = BGFX_INVALID_HANDLE; const uint32_t indexSize = 0 == (_flags & BGFX_BUFFER_INDEX32) ? 2 : 4; uint32_t size = BX_ALIGN_16(_num*indexSize); uint64_t ptr = 0; - if (0 != (_flags & BGFX_BUFFER_COMPUTE_WRITE) ) + if (0 != (_flags & BGFX_BUFFER_COMPUTE_READ_WRITE) ) { IndexBufferHandle indexBufferHandle = { m_indexBufferHandle.alloc() }; if (!isValid(indexBufferHandle) ) @@ -2506,7 +2903,7 @@ namespace bgfx else { ptr = allocDynamicIndexBuffer(size, _flags); - if (ptr == NonLocalAllocator::invalidBlock) + if (ptr == NonLocalAllocator::kInvalidBlock) { return handle; } @@ -2531,6 +2928,8 @@ namespace bgfx BGFX_API_FUNC(DynamicIndexBufferHandle createDynamicIndexBuffer(const Memory* _mem, uint16_t _flags) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BX_CHECK(0 == (_flags & BGFX_BUFFER_COMPUTE_READ_WRITE), "Cannot initialize compute buffer from CPU."); const uint32_t indexSize = 0 == (_flags & BGFX_BUFFER_INDEX32) ? 2 : 4; DynamicIndexBufferHandle handle = createDynamicIndexBuffer(_mem->size/indexSize, _flags); @@ -2549,10 +2948,12 @@ namespace bgfx BGFX_API_FUNC(void updateDynamicIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _startIndex, const Memory* _mem) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("updateDynamicIndexBuffer", m_dynamicIndexBufferHandle, _handle); DynamicIndexBuffer& dib = m_dynamicIndexBuffers[_handle.idx]; - BX_CHECK(0 == (dib.m_flags & BGFX_BUFFER_COMPUTE_READ_WRITE), "Can't update GPU buffer from CPU."); + BX_CHECK(0 == (dib.m_flags & BGFX_BUFFER_COMPUTE_WRITE), "Can't update GPU buffer from CPU."); const uint32_t indexSize = 0 == (dib.m_flags & BGFX_BUFFER_INDEX32) ? 2 : 4; if (dib.m_size < _mem->size @@ -2586,6 +2987,8 @@ namespace bgfx BGFX_API_FUNC(void destroyDynamicIndexBuffer(DynamicIndexBufferHandle _handle) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("destroyDynamicIndexBuffer", m_dynamicIndexBufferHandle, _handle); m_freeDynamicIndexBufferHandle[m_numFreeDynamicIndexBufferHandles++] = _handle; @@ -2595,7 +2998,7 @@ namespace bgfx { DynamicIndexBuffer& dib = m_dynamicIndexBuffers[_handle.idx]; - if (0 != (dib.m_flags & BGFX_BUFFER_COMPUTE_WRITE) ) + if (0 != (dib.m_flags & BGFX_BUFFER_COMPUTE_READ_WRITE) ) { destroyIndexBuffer(dib.m_handle); } @@ -2618,14 +3021,14 @@ namespace bgfx uint64_t allocDynamicVertexBuffer(uint32_t _size, uint16_t _flags) { uint64_t ptr = m_dynVertexBufferAllocator.alloc(_size); - if (ptr == NonLocalAllocator::invalidBlock) + if (ptr == NonLocalAllocator::kInvalidBlock) { VertexBufferHandle vertexBufferHandle = { m_vertexBufferHandle.alloc() }; BX_WARN(isValid(vertexBufferHandle), "Failed to allocate dynamic vertex buffer handle."); if (!isValid(vertexBufferHandle) ) { - return NonLocalAllocator::invalidBlock; + return NonLocalAllocator::kInvalidBlock; } uint32_t allocSize = bx::uint32_max(BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE, _size); @@ -2644,6 +3047,8 @@ namespace bgfx BGFX_API_FUNC(DynamicVertexBufferHandle createDynamicVertexBuffer(uint32_t _num, const VertexDecl& _decl, uint16_t _flags) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + DynamicVertexBufferHandle handle = BGFX_INVALID_HANDLE; uint32_t size = bx::strideAlign16(_num*_decl.m_stride, _decl.m_stride); @@ -2653,6 +3058,7 @@ namespace bgfx VertexBufferHandle vertexBufferHandle = { m_vertexBufferHandle.alloc() }; if (!isValid(vertexBufferHandle) ) { + BX_TRACE("WARNING: Failed to allocate vertex buffer handle (BGFX_CONFIG_MAX_VERTEX_BUFFERS, max: %d).", BGFX_CONFIG_MAX_VERTEX_BUFFERS); return handle; } @@ -2666,15 +3072,26 @@ namespace bgfx else { ptr = allocDynamicVertexBuffer(size, _flags); - if (ptr == NonLocalAllocator::invalidBlock) + if (ptr == NonLocalAllocator::kInvalidBlock) { return handle; } } VertexDeclHandle declHandle = findVertexDecl(_decl); + if (!isValid(declHandle) ) + { + BX_TRACE("WARNING: Failed to allocate vertex decl handle (BGFX_CONFIG_MAX_VERTEX_DECLS, max: %d).", BGFX_CONFIG_MAX_VERTEX_DECLS); + return handle; + } handle.idx = m_dynamicVertexBufferHandle.alloc(); + if (!isValid(handle) ) + { + BX_TRACE("WARNING: Failed to allocate dynamic vertex buffer handle (BGFX_CONFIG_MAX_DYNAMIC_VERTEX_BUFFERS, max: %d).", BGFX_CONFIG_MAX_DYNAMIC_VERTEX_BUFFERS); + return handle; + } + DynamicVertexBuffer& dvb = m_dynamicVertexBuffers[handle.idx]; dvb.m_handle.idx = uint16_t(ptr>>32); dvb.m_offset = uint32_t(ptr); @@ -2691,6 +3108,8 @@ namespace bgfx BGFX_API_FUNC(DynamicVertexBufferHandle createDynamicVertexBuffer(const Memory* _mem, const VertexDecl& _decl, uint16_t _flags) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + uint32_t numVertices = _mem->size/_decl.m_stride; DynamicVertexBufferHandle handle = createDynamicVertexBuffer(numVertices, _decl, _flags); @@ -2708,6 +3127,8 @@ namespace bgfx BGFX_API_FUNC(void updateDynamicVertexBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, const Memory* _mem) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("updateDynamicVertexBuffer", m_dynamicVertexBufferHandle, _handle); DynamicVertexBuffer& dvb = m_dynamicVertexBuffers[_handle.idx]; @@ -2746,6 +3167,8 @@ namespace bgfx BGFX_API_FUNC(void destroyDynamicVertexBuffer(DynamicVertexBufferHandle _handle) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("destroyDynamicVertexBuffer", m_dynamicVertexBufferHandle, _handle); m_freeDynamicVertexBufferHandle[m_numFreeDynamicVertexBufferHandles++] = _handle; @@ -2765,7 +3188,7 @@ namespace bgfx DynamicVertexBuffer& dvb = m_dynamicVertexBuffers[_handle.idx]; - if (0 != (dvb.m_flags & BGFX_BUFFER_COMPUTE_WRITE) ) + if (0 != (dvb.m_flags & BGFX_BUFFER_COMPUTE_READ_WRITE) ) { destroyVertexBuffer(dvb.m_handle); } @@ -2785,13 +3208,17 @@ namespace bgfx m_dynamicVertexBufferHandle.free(_handle.idx); } - BGFX_API_FUNC(uint32_t getAvailTransientIndexBuffer(uint32_t _num) const) + BGFX_API_FUNC(uint32_t getAvailTransientIndexBuffer(uint32_t _num) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + return m_submit->getAvailTransientIndexBuffer(_num); } - BGFX_API_FUNC(uint32_t getAvailTransientVertexBuffer(uint32_t _num, uint16_t _stride) const) + BGFX_API_FUNC(uint32_t getAvailTransientVertexBuffer(uint32_t _num, uint16_t _stride) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + return m_submit->getAvailTransientVertexBuffer(_num, _stride); } @@ -2830,6 +3257,8 @@ namespace bgfx BGFX_API_FUNC(void allocTransientIndexBuffer(TransientIndexBuffer* _tib, uint32_t _num) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + uint32_t offset = m_submit->allocTransientIndexBuffer(_num); TransientIndexBuffer& tib = *m_submit->m_transientIb; @@ -2890,6 +3319,8 @@ namespace bgfx BGFX_API_FUNC(void allocTransientVertexBuffer(TransientVertexBuffer* _tvb, uint32_t _num, const VertexDecl& _decl) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + VertexDeclHandle declHandle = m_declRef.find(_decl.m_hash); TransientVertexBuffer& dvb = *m_submit->m_transientVb; @@ -2914,23 +3345,18 @@ namespace bgfx _tvb->decl = declHandle; } - BGFX_API_FUNC(const InstanceDataBuffer* allocInstanceDataBuffer(uint32_t _num, uint16_t _stride) ) + BGFX_API_FUNC(void allocInstanceDataBuffer(InstanceDataBuffer* _idb, uint32_t _num, uint16_t _stride) ) { - ++m_instBufferCount; - uint16_t stride = BX_ALIGN_16(_stride); uint32_t offset = m_submit->allocTransientVertexBuffer(_num, stride); TransientVertexBuffer& dvb = *m_submit->m_transientVb; - InstanceDataBuffer* idb = (InstanceDataBuffer*)BX_ALLOC(g_allocator, sizeof(InstanceDataBuffer) ); - idb->data = &dvb.data[offset]; - idb->size = _num * stride; - idb->offset = offset; - idb->num = _num; - idb->stride = stride; - idb->handle = dvb.handle; - - return idb; + _idb->data = &dvb.data[offset]; + _idb->size = _num * stride; + _idb->offset = offset; + _idb->num = _num; + _idb->stride = stride; + _idb->handle = dvb.handle; } IndirectBufferHandle createIndirectBuffer(uint32_t _num) @@ -2965,6 +3391,8 @@ namespace bgfx BGFX_API_FUNC(ShaderHandle createShader(const Memory* _mem) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + bx::MemoryReader reader(_mem->data, _mem->size); bx::Error err; @@ -2994,11 +3422,24 @@ namespace bgfx return invalid; } + const uint32_t shaderHash = bx::hash(_mem->data, _mem->size); + const uint16_t idx = m_shaderHashMap.find(shaderHash); + if (kInvalidHandle != idx) + { + ShaderHandle handle = { idx }; + shaderIncRef(handle); + release(_mem); + return handle; + } + ShaderHandle handle = { m_shaderHandle.alloc() }; BX_WARN(isValid(handle), "Failed to allocate shader handle."); if (isValid(handle) ) { + bool ok = m_shaderHashMap.insert(shaderHash, handle.idx); + BX_CHECK(ok, "Shader already exists!"); BX_UNUSED(ok); + uint32_t iohash; bx::read(&reader, iohash); @@ -3009,7 +3450,6 @@ namespace bgfx sr.m_refCount = 1; sr.m_hash = iohash; sr.m_num = 0; - sr.m_owned = false; sr.m_uniforms = NULL; UniformHandle* uniforms = (UniformHandle*)alloca(count*sizeof(UniformHandle) ); @@ -3065,6 +3505,8 @@ namespace bgfx BGFX_API_FUNC(uint16_t getShaderUniforms(ShaderHandle _handle, UniformHandle* _uniforms, uint16_t _max) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + if (!isValid(_handle) ) { BX_WARN(false, "Passing invalid shader handle to bgfx::getShaderUniforms."); @@ -3080,8 +3522,31 @@ namespace bgfx return sr.m_num; } + void setName(Handle _handle, const char* _name) + { + CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::SetName); + cmdbuf.write(_handle); + uint16_t len = (uint8_t)bx::strLen(_name)+1; + cmdbuf.write(len); + cmdbuf.write(_name, len); + } + + BGFX_API_FUNC(void setName(ShaderHandle _handle, const char* _name) ) + { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + + BGFX_CHECK_HANDLE("setName", m_shaderHandle, _handle); + + ShaderRef& sr = m_shaderRef[_handle.idx]; + sr.m_name.set(_name); + + setName(convert(_handle), _name); + } + BGFX_API_FUNC(void destroyShader(ShaderHandle _handle) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("destroyShader", m_shaderHandle, _handle); if (!isValid(_handle) ) @@ -3095,12 +3560,7 @@ namespace bgfx void shaderTakeOwnership(ShaderHandle _handle) { - ShaderRef& sr = m_shaderRef[_handle.idx]; - if (!sr.m_owned) - { - sr.m_owned = true; - shaderDecRef(_handle); - } + shaderDecRef(_handle); } void shaderIncRef(ShaderHandle _handle) @@ -3132,11 +3592,15 @@ namespace bgfx sr.m_uniforms = NULL; sr.m_num = 0; } + + m_shaderHashMap.removeByHandle(_handle.idx); } } BGFX_API_FUNC(ProgramHandle createProgram(ShaderHandle _vsh, ShaderHandle _fsh, bool _destroyShaders) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + if (!isValid(_vsh) || !isValid(_fsh) ) { @@ -3145,45 +3609,46 @@ namespace bgfx return invalid; } - uint16_t idx = m_programHashMap.find(uint32_t(_fsh.idx<<16)|_vsh.idx); - if (ProgramHashMap::invalid != idx) - { - ProgramHandle handle = { idx }; - ProgramRef& pr = m_programRef[handle.idx]; - ++pr.m_refCount; - return handle; - } - - const ShaderRef& vsr = m_shaderRef[_vsh.idx]; - const ShaderRef& fsr = m_shaderRef[_fsh.idx]; - if (vsr.m_hash != fsr.m_hash) - { - BX_TRACE("Vertex shader output doesn't match fragment shader input."); - ProgramHandle invalid = BGFX_INVALID_HANDLE; - return invalid; - } - - ProgramHandle handle; - handle.idx = m_programHandle.alloc(); - - BX_WARN(isValid(handle), "Failed to allocate program handle."); + ProgramHandle handle = { m_programHashMap.find(uint32_t(_fsh.idx<<16)|_vsh.idx) }; if (isValid(handle) ) { - shaderIncRef(_vsh); - shaderIncRef(_fsh); ProgramRef& pr = m_programRef[handle.idx]; - pr.m_vsh = _vsh; - pr.m_fsh = _fsh; - pr.m_refCount = 1; + ++pr.m_refCount; + shaderIncRef(pr.m_vsh); + shaderIncRef(pr.m_fsh); + } + else + { + const ShaderRef& vsr = m_shaderRef[_vsh.idx]; + const ShaderRef& fsr = m_shaderRef[_fsh.idx]; + if (vsr.m_hash != fsr.m_hash) + { + BX_TRACE("Vertex shader output doesn't match fragment shader input."); + ProgramHandle invalid = BGFX_INVALID_HANDLE; + return invalid; + } - const uint32_t key = uint32_t(_fsh.idx<<16)|_vsh.idx; - bool ok = m_programHashMap.insert(key, handle.idx); - BX_CHECK(ok, "Program already exists (key: %x, handle: %3d)!", key, handle.idx); BX_UNUSED(ok); + handle.idx = m_programHandle.alloc(); - CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateProgram); - cmdbuf.write(handle); - cmdbuf.write(_vsh); - cmdbuf.write(_fsh); + BX_WARN(isValid(handle), "Failed to allocate program handle."); + if (isValid(handle) ) + { + shaderIncRef(_vsh); + shaderIncRef(_fsh); + ProgramRef& pr = m_programRef[handle.idx]; + pr.m_vsh = _vsh; + pr.m_fsh = _fsh; + pr.m_refCount = 1; + + const uint32_t key = uint32_t(_fsh.idx<<16)|_vsh.idx; + bool ok = m_programHashMap.insert(key, handle.idx); + BX_CHECK(ok, "Program already exists (key: %x, handle: %3d)!", key, handle.idx); BX_UNUSED(ok); + + CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateProgram); + cmdbuf.write(handle); + cmdbuf.write(_vsh); + cmdbuf.write(_fsh); + } } if (_destroyShaders) @@ -3197,6 +3662,8 @@ namespace bgfx BGFX_API_FUNC(ProgramHandle createProgram(ShaderHandle _vsh, bool _destroyShader) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + if (!isValid(_vsh) ) { BX_WARN(false, "Compute shader is invalid (vsh %d).", _vsh.idx); @@ -3204,36 +3671,37 @@ namespace bgfx return invalid; } - uint16_t idx = m_programHashMap.find(_vsh.idx); - if (ProgramHashMap::invalid != idx) - { - ProgramHandle handle = { idx }; - ProgramRef& pr = m_programRef[handle.idx]; - ++pr.m_refCount; - return handle; - } + ProgramHandle handle = { m_programHashMap.find(_vsh.idx) }; - ProgramHandle handle; - handle.idx = m_programHandle.alloc(); - - BX_WARN(isValid(handle), "Failed to allocate program handle."); if (isValid(handle) ) { - shaderIncRef(_vsh); ProgramRef& pr = m_programRef[handle.idx]; - pr.m_vsh = _vsh; - ShaderHandle fsh = BGFX_INVALID_HANDLE; - pr.m_fsh = fsh; - pr.m_refCount = 1; + ++pr.m_refCount; + shaderIncRef(pr.m_vsh); + } + else + { + handle.idx = m_programHandle.alloc(); - const uint32_t key = uint32_t(_vsh.idx); - bool ok = m_programHashMap.insert(key, handle.idx); - BX_CHECK(ok, "Program already exists (key: %x, handle: %3d)!", key, handle.idx); BX_UNUSED(ok); + BX_WARN(isValid(handle), "Failed to allocate program handle."); + if (isValid(handle) ) + { + shaderIncRef(_vsh); + ProgramRef& pr = m_programRef[handle.idx]; + pr.m_vsh = _vsh; + ShaderHandle fsh = BGFX_INVALID_HANDLE; + pr.m_fsh = fsh; + pr.m_refCount = 1; - CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateProgram); - cmdbuf.write(handle); - cmdbuf.write(_vsh); - cmdbuf.write(fsh); + const uint32_t key = uint32_t(_vsh.idx); + bool ok = m_programHashMap.insert(key, handle.idx); + BX_CHECK(ok, "Program already exists (key: %x, handle: %3d)!", key, handle.idx); BX_UNUSED(ok); + + CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateProgram); + cmdbuf.write(handle); + cmdbuf.write(_vsh); + cmdbuf.write(fsh); + } } if (_destroyShader) @@ -3246,9 +3714,18 @@ namespace bgfx BGFX_API_FUNC(void destroyProgram(ProgramHandle _handle) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("destroyProgram", m_programHandle, _handle); ProgramRef& pr = m_programRef[_handle.idx]; + shaderDecRef(pr.m_vsh); + + if (isValid(pr.m_fsh) ) + { + shaderDecRef(pr.m_fsh); + } + int32_t refs = --pr.m_refCount; if (0 == refs) { @@ -3258,21 +3735,14 @@ namespace bgfx CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::DestroyProgram); cmdbuf.write(_handle); - shaderDecRef(pr.m_vsh); - uint32_t hash = pr.m_vsh.idx; - - if (isValid(pr.m_fsh) ) - { - shaderDecRef(pr.m_fsh); - hash |= pr.m_fsh.idx << 16; - } - m_programHashMap.removeByHandle(_handle.idx); } } BGFX_API_FUNC(TextureHandle createTexture(const Memory* _mem, uint32_t _flags, uint8_t _skip, TextureInfo* _info, BackbufferRatio::Enum _ratio) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + TextureInfo ti; if (NULL == _info) { @@ -3309,11 +3779,7 @@ namespace bgfx if (isValid(handle) ) { TextureRef& ref = m_textureRef[handle.idx]; - ref.m_refCount = 1; - ref.m_bbRatio = uint8_t(_ratio); - ref.m_format = uint8_t(_info->format); - ref.m_numMips = imageContainer.m_numMips; - ref.m_owned = false; + ref.init(_ratio, _info->format, imageContainer.m_numMips, 0 != (g_caps.supported & BGFX_CAPS_TEXTURE_DIRECT_ACCESS) ); CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateTexture); cmdbuf.write(handle); @@ -3329,8 +3795,36 @@ namespace bgfx return handle; } + BGFX_API_FUNC(void setName(TextureHandle _handle, const char* _name) ) + { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("setName", m_textureHandle, _handle); + + TextureRef& ref = m_textureRef[_handle.idx]; + ref.m_name.set(_name); + + setName(convert(_handle), _name); + } + + void setDirectAccessPtr(TextureHandle _handle, void* _ptr) + { + TextureRef& ref = m_textureRef[_handle.idx]; + ref.m_ptr = _ptr; + } + + BGFX_API_FUNC(void* getDirectAccessPtr(TextureHandle _handle) ) + { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("getDirectAccessPtr", m_textureHandle, _handle); + + TextureRef& ref = m_textureRef[_handle.idx]; + return ref.m_ptr; + } + BGFX_API_FUNC(void destroyTexture(TextureHandle _handle) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("destroyTexture", m_textureHandle, _handle); if (!isValid(_handle) ) @@ -3344,6 +3838,8 @@ namespace bgfx BGFX_API_FUNC(uint32_t readTexture(TextureHandle _handle, void* _data, uint8_t _mip) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("readTexture", m_textureHandle, _handle); const TextureRef& ref = m_textureRef[_handle.idx]; @@ -3400,6 +3896,8 @@ namespace bgfx int32_t refs = --ref.m_refCount; if (0 == refs) { + ref.m_name.clear(); + bool ok = m_submit->free(_handle); BX_UNUSED(ok); BX_CHECK(ok, "Texture handle %d is already destroyed!", _handle.idx); @@ -3422,6 +3920,8 @@ namespace bgfx , const Memory* _mem ) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::UpdateTexture); cmdbuf.write(_handle); cmdbuf.write(_side); @@ -3463,6 +3963,8 @@ namespace bgfx BGFX_API_FUNC(FrameBufferHandle createFrameBuffer(uint8_t _num, const Attachment* _attachment, bool _destroyTextures) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BX_CHECK(checkFrameBuffer(_num, _attachment) , "Too many frame buffer attachments (num attachments: %d, max color attachments %d)!" , _num @@ -3510,6 +4012,8 @@ namespace bgfx BGFX_API_FUNC(FrameBufferHandle createFrameBuffer(void* _nwh, uint16_t _width, uint16_t _height, TextureFormat::Enum _depthFormat) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + FrameBufferHandle handle = { m_frameBufferHandle.alloc() }; BX_WARN(isValid(handle), "Failed to allocate frame buffer handle."); @@ -3533,6 +4037,8 @@ namespace bgfx BGFX_API_FUNC(TextureHandle getTexture(FrameBufferHandle _handle, uint8_t _attachment) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("getTexture", m_frameBufferHandle, _handle); const FrameBufferRef& ref = m_frameBufferRef[_handle.idx]; @@ -3548,6 +4054,8 @@ namespace bgfx BGFX_API_FUNC(void destroyFrameBuffer(FrameBufferHandle _handle) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("destroyFrameBuffer", m_frameBufferHandle, _handle); bool ok = m_submit->free(_handle); BX_UNUSED(ok); BX_CHECK(ok, "Frame buffer handle %d is already destroyed!", _handle.idx); @@ -3571,6 +4079,8 @@ namespace bgfx BGFX_API_FUNC(UniformHandle createUniform(const char* _name, UniformType::Enum _type, uint16_t _num) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BX_WARN(PredefinedUniform::Count == nameToPredefinedUniformEnum(_name), "%s is predefined uniform name.", _name); if (PredefinedUniform::Count != nameToPredefinedUniformEnum(_name) ) { @@ -3580,8 +4090,8 @@ namespace bgfx _num = bx::uint16_max(1, _num); - uint16_t idx = m_uniformHashMap.find(bx::hashMurmur2A(_name) ); - if (UniformHashMap::invalid != idx) + uint16_t idx = m_uniformHashMap.find(bx::hash(_name) ); + if (kInvalidHandle != idx) { UniformHandle handle = { idx }; UniformRef& uniform = m_uniformRef[handle.idx]; @@ -3604,7 +4114,7 @@ namespace bgfx cmdbuf.write(handle); cmdbuf.write(uniform.m_type); cmdbuf.write(uniform.m_num); - uint8_t len = (uint8_t)bx::strnlen(_name)+1; + uint8_t len = (uint8_t)bx::strLen(_name)+1; cmdbuf.write(len); cmdbuf.write(_name, len); } @@ -3625,14 +4135,14 @@ namespace bgfx uniform.m_type = _type; uniform.m_num = _num; - bool ok = m_uniformHashMap.insert(bx::hashMurmur2A(_name), handle.idx); + bool ok = m_uniformHashMap.insert(bx::hash(_name), handle.idx); BX_CHECK(ok, "Uniform already exists (name: %s)!", _name); BX_UNUSED(ok); CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::CreateUniform); cmdbuf.write(handle); cmdbuf.write(_type); cmdbuf.write(_num); - uint8_t len = (uint8_t)bx::strnlen(_name)+1; + uint8_t len = (uint8_t)bx::strLen(_name)+1; cmdbuf.write(len); cmdbuf.write(_name, len); } @@ -3646,16 +4156,20 @@ namespace bgfx BGFX_API_FUNC(void getUniformInfo(UniformHandle _handle, UniformInfo& _info) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("getUniformInfo", m_uniformHandle, _handle); UniformRef& uniform = m_uniformRef[_handle.idx]; - bx::strlcpy(_info.name, uniform.m_name.getPtr(), sizeof(_info.name) ); + bx::strCopy(_info.name, sizeof(_info.name), uniform.m_name.getPtr() ); _info.type = uniform.m_type; _info.num = uniform.m_num; } BGFX_API_FUNC(void destroyUniform(UniformHandle _handle) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("destroyUniform", m_uniformHandle, _handle); UniformRef& uniform = m_uniformRef[_handle.idx]; @@ -3677,6 +4191,8 @@ namespace bgfx BGFX_API_FUNC(OcclusionQueryHandle createOcclusionQuery() ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + OcclusionQueryHandle handle = { m_occlusionQueryHandle.alloc() }; if (isValid(handle) ) { @@ -3691,6 +4207,8 @@ namespace bgfx BGFX_API_FUNC(OcclusionQueryResult::Enum getResult(OcclusionQueryHandle _handle, int32_t* _result) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("getResult", m_occlusionQueryHandle, _handle); switch (m_submit->m_occlusion[_handle.idx]) @@ -3710,6 +4228,8 @@ namespace bgfx BGFX_API_FUNC(void destroyOcclusionQuery(OcclusionQueryHandle _handle) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE("destroyOcclusionQuery", m_occlusionQueryHandle, _handle); m_freeOcclusionQueryHandle[m_numFreeOcclusionQueryHandles++] = _handle; @@ -3717,6 +4237,8 @@ namespace bgfx BGFX_API_FUNC(void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BGFX_CHECK_HANDLE_INVALID_OK("requestScreenShot", m_frameBufferHandle, _handle); if (isValid(_handle) ) @@ -3730,7 +4252,7 @@ namespace bgfx } CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::RequestScreenShot); - uint16_t len = (uint16_t)bx::strnlen(_filePath)+1; + uint16_t len = (uint16_t)bx::strLen(_filePath)+1; cmdbuf.write(_handle); cmdbuf.write(len); cmdbuf.write(_filePath, len); @@ -3738,6 +4260,8 @@ namespace bgfx BGFX_API_FUNC(void setPaletteColor(uint8_t _index, const float _rgba[4]) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + BX_CHECK(_index < BGFX_CONFIG_MAX_COLOR_PALETTE, "Color palette index out of bounds %d (max: %d)." , _index , BGFX_CONFIG_MAX_COLOR_PALETTE @@ -3746,402 +4270,101 @@ namespace bgfx m_colorPaletteDirty = 2; } - BGFX_API_FUNC(void setViewName(uint8_t _id, const char* _name) ) + BGFX_API_FUNC(void setViewName(ViewId _id, const char* _name) ) { + BGFX_MUTEX_SCOPE(m_resourceApiLock); + CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::UpdateViewName); cmdbuf.write(_id); - uint16_t len = (uint16_t)bx::strnlen(_name)+1; + uint16_t len = (uint16_t)bx::strLen(_name)+1; cmdbuf.write(len); cmdbuf.write(_name, len); } - BGFX_API_FUNC(void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) ) + BGFX_API_FUNC(void setViewRect(ViewId _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) ) { - Rect& rect = m_rect[_id]; - rect.m_x = (uint16_t)bx::uint32_imax(int16_t(_x), 0); - rect.m_y = (uint16_t)bx::uint32_imax(int16_t(_y), 0); - rect.m_width = bx::uint16_max(_width, 1); - rect.m_height = bx::uint16_max(_height, 1); + m_view[_id].setRect(_x, _y, _width, _height); } - BGFX_API_FUNC(void setViewScissor(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) ) + BGFX_API_FUNC(void setViewScissor(ViewId _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) ) { - Rect& scissor = m_scissor[_id]; - scissor.m_x = _x; - scissor.m_y = _y; - scissor.m_width = _width; - scissor.m_height = _height; + m_view[_id].setScissor(_x, _y, _width, _height); } - BGFX_API_FUNC(void setViewClear(uint8_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) ) + BGFX_API_FUNC(void setViewClear(ViewId _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) ) { - BX_CHECK(bx::fequal(_depth, bx::fclamp(_depth, 0.0f, 1.0f), 0.0001f) + BX_CHECK(bx::equal(_depth, bx::clamp(_depth, 0.0f, 1.0f), 0.0001f) , "Clear depth value must be between 0.0 and 1.0 (_depth %f)." , _depth ); - Clear& clear = m_clear[_id]; - clear.m_flags = _flags; - clear.m_index[0] = uint8_t(_rgba>>24); - clear.m_index[1] = uint8_t(_rgba>>16); - clear.m_index[2] = uint8_t(_rgba>> 8); - clear.m_index[3] = uint8_t(_rgba>> 0); - clear.m_depth = _depth; - clear.m_stencil = _stencil; + m_view[_id].setClear(_flags, _rgba, _depth, _stencil); } - BGFX_API_FUNC(void setViewClear(uint8_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) ) + BGFX_API_FUNC(void setViewClear(ViewId _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) ) { - BX_CHECK(bx::fequal(_depth, bx::fclamp(_depth, 0.0f, 1.0f), 0.0001f) + BX_CHECK(bx::equal(_depth, bx::clamp(_depth, 0.0f, 1.0f), 0.0001f) , "Clear depth value must be between 0.0 and 1.0 (_depth %f)." , _depth ); - Clear& clear = m_clear[_id]; - clear.m_flags = (_flags & ~BGFX_CLEAR_COLOR) - | (0xff != (_0&_1&_2&_3&_4&_5&_6&_7) ? BGFX_CLEAR_COLOR|BGFX_CLEAR_COLOR_USE_PALETTE : 0) - ; - clear.m_index[0] = _0; - clear.m_index[1] = _1; - clear.m_index[2] = _2; - clear.m_index[3] = _3; - clear.m_index[4] = _4; - clear.m_index[5] = _5; - clear.m_index[6] = _6; - clear.m_index[7] = _7; - clear.m_depth = _depth; - clear.m_stencil = _stencil; + m_view[_id].setClear(_flags, _depth, _stencil, _0, _1, _2, _3, _4, _5, _6, _7); } - BGFX_API_FUNC(void setViewSeq(uint8_t _id, bool _enabled) ) + BGFX_API_FUNC(void setViewMode(ViewId _id, ViewMode::Enum _mode) ) { - m_seqMask[_id] = _enabled ? 0xffff : 0x0; + m_view[_id].setMode(_mode); } - BGFX_API_FUNC(void setViewFrameBuffer(uint8_t _id, FrameBufferHandle _handle) ) + BGFX_API_FUNC(void setViewFrameBuffer(ViewId _id, FrameBufferHandle _handle) ) { BGFX_CHECK_HANDLE_INVALID_OK("setViewFrameBuffer", m_frameBufferHandle, _handle); - m_fb[_id] = _handle; + m_view[_id].setFrameBuffer(_handle); } - BGFX_API_FUNC(void setViewTransform(uint8_t _id, const void* _view, const void* _proj, uint8_t _flags, const void* _proj1) ) + BGFX_API_FUNC(void setViewTransform(ViewId _id, const void* _view, const void* _proj, uint8_t _flags, const void* _proj1) ) { - m_viewFlags[_id] = _flags; - - if (NULL != _view) - { - bx::memCopy(m_view[_id].un.val, _view, sizeof(Matrix4) ); - } - else - { - m_view[_id].setIdentity(); - } - - if (NULL != _proj) - { - bx::memCopy(m_proj[0][_id].un.val, _proj, sizeof(Matrix4) ); - } - else - { - m_proj[0][_id].setIdentity(); - } - - if (NULL != _proj1) - { - bx::memCopy(m_proj[1][_id].un.val, _proj1, sizeof(Matrix4) ); - } - else - { - bx::memCopy(m_proj[1][_id].un.val, m_proj[0][_id].un.val, sizeof(Matrix4) ); - } + m_view[_id].setTransform(_view, _proj, _flags, _proj1); } - BGFX_API_FUNC(void resetView(uint8_t _id) ) + BGFX_API_FUNC(void resetView(ViewId _id) ) { - setViewRect(_id, 0, 0, 1, 1); - setViewScissor(_id, 0, 0, 0, 0); - setViewClear(_id, BGFX_CLEAR_NONE, 0, 0.0f, 0); - setViewSeq(_id, false); - FrameBufferHandle invalid = BGFX_INVALID_HANDLE; - setViewFrameBuffer(_id, invalid); - setViewTransform(_id, NULL, NULL, BGFX_VIEW_NONE, NULL); + m_view[_id].reset(); } - BGFX_API_FUNC(void setViewOrder(uint8_t _id, uint8_t _num, const void* _order) ) + BGFX_API_FUNC(void setViewOrder(ViewId _id, uint16_t _num, const ViewId* _order) ) { const uint32_t num = bx::uint32_min(_id + _num, BGFX_CONFIG_MAX_VIEWS) - _id; if (NULL == _order) { for (uint32_t ii = 0; ii < num; ++ii) { - uint8_t id = uint8_t(ii+_id); + ViewId id = ViewId(ii+_id); m_viewRemap[id] = id; } } else { - bx::memCopy(&m_viewRemap[_id], _order, num); + bx::memCopy(&m_viewRemap[_id], _order, num*sizeof(ViewId) ); } } - BGFX_API_FUNC(void setMarker(const char* _marker) ) - { - m_submit->setMarker(_marker); - } + BGFX_API_FUNC(Encoder* begin() ); - BGFX_API_FUNC(void setState(uint64_t _state, uint32_t _rgba) ) - { - m_submit->setState(_state, _rgba); - } - - BGFX_API_FUNC(void setCondition(OcclusionQueryHandle _handle, bool _visible) ) - { - m_submit->setCondition(_handle, _visible); - } - - BGFX_API_FUNC(void setStencil(uint32_t _fstencil, uint32_t _bstencil) ) - { - m_submit->setStencil(_fstencil, _bstencil); - } - - BGFX_API_FUNC(uint16_t setScissor(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) ) - { - return m_submit->setScissor(_x, _y, _width, _height); - } - - BGFX_API_FUNC(void setScissor(uint16_t _cache) ) - { - m_submit->setScissor(_cache); - } - - BGFX_API_FUNC(uint32_t setTransform(const void* _mtx, uint16_t _num) ) - { - return m_submit->setTransform(_mtx, _num); - } - - BGFX_API_FUNC(uint32_t allocTransform(Transform* _transform, uint16_t _num) ) - { - return m_submit->allocTransform(_transform, _num); - } - - BGFX_API_FUNC(void setTransform(uint32_t _cache, uint16_t _num) ) - { - m_submit->setTransform(_cache, _num); - } - - BGFX_API_FUNC(void setUniform(UniformHandle _handle, const void* _value, uint16_t _num) ) - { - BGFX_CHECK_HANDLE("setUniform", m_uniformHandle, _handle); - UniformRef& uniform = m_uniformRef[_handle.idx]; - BX_CHECK(isValid(_handle) && 0 < uniform.m_refCount, "Setting invalid uniform (handle %3d)!", _handle.idx); - BX_CHECK(_num == UINT16_MAX || uniform.m_num >= _num, "Truncated uniform update. %d (max: %d)", _num, uniform.m_num); - if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) - { - BX_CHECK(m_uniformSet.end() == m_uniformSet.find(_handle.idx) - , "Uniform %d (%s) was already set for this draw call." - , _handle.idx - , getName(_handle) - ); - m_uniformSet.insert(_handle.idx); - } - m_submit->writeUniform(uniform.m_type, _handle, _value, bx::uint16_min(uniform.m_num, _num) ); - } - - BGFX_API_FUNC(void setIndexBuffer(IndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices) ) - { - BGFX_CHECK_HANDLE("setIndexBuffer", m_indexBufferHandle, _handle); - m_submit->setIndexBuffer(_handle, _firstIndex, _numIndices); - } - - BGFX_API_FUNC(void setIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices) ) - { - BGFX_CHECK_HANDLE("setIndexBuffer", m_dynamicIndexBufferHandle, _handle); - m_submit->setIndexBuffer(m_dynamicIndexBuffers[_handle.idx], _firstIndex, _numIndices); - } - - BGFX_API_FUNC(void setIndexBuffer(const TransientIndexBuffer* _tib, uint32_t _firstIndex, uint32_t _numIndices) ) - { - BGFX_CHECK_HANDLE("setIndexBuffer", m_indexBufferHandle, _tib->handle); - m_submit->setIndexBuffer(_tib, _firstIndex, _numIndices); - } - - BGFX_API_FUNC(void setVertexBuffer(uint8_t _stream, VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices) ) - { - BGFX_CHECK_HANDLE("setVertexBuffer", m_vertexBufferHandle, _handle); - BX_CHECK(_stream < BGFX_CONFIG_MAX_VERTEX_STREAMS, "Invalid stream %d (max %d).", _stream, BGFX_CONFIG_MAX_VERTEX_STREAMS); - m_submit->setVertexBuffer(_stream, _handle, _startVertex, _numVertices); - } - - BGFX_API_FUNC(void setVertexBuffer(uint8_t _stream, DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices) ) - { - BGFX_CHECK_HANDLE("setVertexBuffer", m_dynamicVertexBufferHandle, _handle); - BX_CHECK(_stream < BGFX_CONFIG_MAX_VERTEX_STREAMS, "Invalid stream %d (max %d).", _stream, BGFX_CONFIG_MAX_VERTEX_STREAMS); - m_submit->setVertexBuffer(_stream, m_dynamicVertexBuffers[_handle.idx], _startVertex, _numVertices); - } - - BGFX_API_FUNC(void setVertexBuffer(uint8_t _stream, const TransientVertexBuffer* _tvb, uint32_t _startVertex, uint32_t _numVertices) ) - { - BGFX_CHECK_HANDLE("setVertexBuffer", m_vertexBufferHandle, _tvb->handle); - BX_CHECK(_stream < BGFX_CONFIG_MAX_VERTEX_STREAMS, "Invalid stream %d (max %d).", _stream, BGFX_CONFIG_MAX_VERTEX_STREAMS); - m_submit->setVertexBuffer(_stream, _tvb, _startVertex, _numVertices); - } - - BGFX_API_FUNC(void setInstanceDataBuffer(const InstanceDataBuffer* _idb, uint32_t _num) ) - { - --m_instBufferCount; - - m_submit->setInstanceDataBuffer(_idb, _num); - } - - BGFX_API_FUNC(void setInstanceDataBuffer(VertexBufferHandle _handle, uint32_t _startVertex, uint32_t _num) ) - { - BGFX_CHECK_HANDLE("setInstanceDataBuffer", m_vertexBufferHandle, _handle); - const VertexBuffer& vb = m_vertexBuffers[_handle.idx]; - m_submit->setInstanceDataBuffer(_handle, _startVertex, _num, vb.m_stride); - } - - BGFX_API_FUNC(void setInstanceDataBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _num) ) - { - BGFX_CHECK_HANDLE("setInstanceDataBuffer", m_dynamicVertexBufferHandle, _handle); - const DynamicVertexBuffer& dvb = m_dynamicVertexBuffers[_handle.idx]; - m_submit->setInstanceDataBuffer(dvb.m_handle - , dvb.m_startVertex + _startVertex - , _num - , dvb.m_stride - ); - } - - BGFX_API_FUNC(void setTexture(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint32_t _flags) ) - { - BGFX_CHECK_HANDLE_INVALID_OK("setTexture/TextureHandle", m_textureHandle, _handle); - m_submit->setTexture(_stage, _sampler, _handle, _flags); - } - - BGFX_API_FUNC(uint32_t submit(uint8_t _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, int32_t _depth, bool _preserveState) ) - { - BGFX_CHECK_HANDLE_INVALID_OK("submit", m_programHandle, _program); - BGFX_CHECK_HANDLE_INVALID_OK("submit", m_occlusionQueryHandle, _occlusionQuery); - if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) - && !_preserveState) - { - m_uniformSet.clear(); - } - - if (BX_ENABLED(BGFX_CONFIG_DEBUG_OCCLUSION) - && isValid(_occlusionQuery) ) - { - BX_CHECK(m_occlusionQuerySet.end() == m_occlusionQuerySet.find(_occlusionQuery.idx) - , "OcclusionQuery %d was already used for this frame." - , _occlusionQuery.idx - ); - m_occlusionQuerySet.insert(_occlusionQuery.idx); - } - - return m_submit->submit(_id, _program, _occlusionQuery, _depth, _preserveState); - } - - BGFX_API_FUNC(uint32_t submit(uint8_t _id, ProgramHandle _handle, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth, bool _preserveState) ) - { - BGFX_CHECK_HANDLE_INVALID_OK("submit", m_programHandle, _handle); - BGFX_CHECK_HANDLE("submit", m_vertexBufferHandle, _indirectHandle); - if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) - && !_preserveState) - { - m_uniformSet.clear(); - } - return m_submit->submit(_id, _handle, _indirectHandle, _start, _num, _depth, _preserveState); - } - - BGFX_API_FUNC(void setBuffer(uint8_t _stage, IndexBufferHandle _handle, Access::Enum _access) ) - { - BGFX_CHECK_HANDLE("setBuffer", m_indexBufferHandle, _handle); - m_submit->setBuffer(_stage, _handle, _access); - } - - BGFX_API_FUNC(void setBuffer(uint8_t _stage, VertexBufferHandle _handle, Access::Enum _access) ) - { - BGFX_CHECK_HANDLE("setBuffer", m_vertexBufferHandle, _handle); - m_submit->setBuffer(_stage, _handle, _access); - } - - BGFX_API_FUNC(void setBuffer(uint8_t _stage, DynamicIndexBufferHandle _handle, Access::Enum _access) ) - { - BGFX_CHECK_HANDLE("setBuffer", m_dynamicIndexBufferHandle, _handle); - const DynamicIndexBuffer& dib = m_dynamicIndexBuffers[_handle.idx]; - m_submit->setBuffer(_stage, dib.m_handle, _access); - } - - BGFX_API_FUNC(void setBuffer(uint8_t _stage, DynamicVertexBufferHandle _handle, Access::Enum _access) ) - { - BGFX_CHECK_HANDLE("setBuffer", m_dynamicVertexBufferHandle, _handle); - const DynamicVertexBuffer& dvb = m_dynamicVertexBuffers[_handle.idx]; - m_submit->setBuffer(_stage, dvb.m_handle, _access); - } - - BGFX_API_FUNC(void setBuffer(uint8_t _stage, IndirectBufferHandle _handle, Access::Enum _access) ) - { - BGFX_CHECK_HANDLE("setBuffer", m_vertexBufferHandle, _handle); - VertexBufferHandle handle = { _handle.idx }; - m_submit->setBuffer(_stage, handle, _access); - } - - BGFX_API_FUNC(void setImage(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format) ) - { - _format = TextureFormat::Count == _format ? TextureFormat::Enum(m_textureRef[_handle.idx].m_format) : _format; - BX_CHECK(_format != TextureFormat::BGRA8 - , "Can't use TextureFormat::BGRA8 with compute, use TextureFormat::RGBA8 instead." - ); - m_submit->setImage(_stage, _sampler, _handle, _mip, _access, _format); - } - - BGFX_API_FUNC(uint32_t dispatch(uint8_t _id, ProgramHandle _handle, uint16_t _numX, uint16_t _numY, uint16_t _numZ, uint8_t _flags) ) - { - if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) - { - m_uniformSet.clear(); - } - return m_submit->dispatch(_id, _handle, _numX, _numY, _numZ, _flags); - } - - BGFX_API_FUNC(uint32_t dispatch(uint8_t _id, ProgramHandle _handle, IndirectBufferHandle _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags) ) - { - if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) - { - m_uniformSet.clear(); - } - return m_submit->dispatch(_id, _handle, _indirectHandle, _start, _num, _flags); - } - - BGFX_API_FUNC(void discard() ) - { - if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM) ) - { - m_uniformSet.clear(); - } - m_submit->discard(); - } - - BGFX_API_FUNC(void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) ) - { - const TextureRef& src = m_textureRef[_src.idx]; - const TextureRef& dst = m_textureRef[_dst.idx]; - BX_CHECK(src.m_format == dst.m_format - , "Texture format must match (src %s, dst %s)." - , bimg::getName(bimg::TextureFormat::Enum(src.m_format) ) - , bimg::getName(bimg::TextureFormat::Enum(dst.m_format) ) - ); - BX_UNUSED(src, dst); - m_submit->blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth); - } + BGFX_API_FUNC(void end(Encoder* _encoder) ); BGFX_API_FUNC(uint32_t frame(bool _capture = false) ); + uint32_t getSeqIncr(ViewId _id) + { + return bx::atomicFetchAndAdd(&m_seq[_id], 1); + } + void dumpViewStats(); void freeDynamicBuffers(); void freeAllHandles(Frame* _frame); void frameNoRenderWait(); void swap(); - const char* getName(UniformHandle _handle) const; // render thread void flip(); @@ -4165,7 +4388,7 @@ namespace bgfx return true; } - BGFX_PROFILER_SCOPE(bgfx, main_thread_wait, 0xff2040ff); + BGFX_PROFILER_SCOPE("bgfx/API thread wait", 0xff2040ff); int64_t start = bx::getHPCounter(); bool ok = m_apiSem.wait(_msecs); if (ok) @@ -4190,7 +4413,7 @@ namespace bgfx { if (!m_singleThreaded) { - BGFX_PROFILER_SCOPE(bgfx, render_thread_wait, 0xff2040ff); + BGFX_PROFILER_SCOPE("bgfx/Render thread wait", 0xff2040ff); int64_t start = bx::getHPCounter(); bool ok = m_renderSem.wait(); BX_CHECK(ok, "Semaphore wait failed."); BX_UNUSED(ok); @@ -4199,9 +4422,35 @@ namespace bgfx } } + void encoderApiWait() + { + uint16_t numEncoders = m_encoderHandle.getNumHandles(); + + for (uint16_t ii = 1; ii < numEncoders; ++ii) + { + m_encoderEndSem.wait(); + } + + for (uint16_t ii = 0; ii < numEncoders; ++ii) + { + uint16_t idx = m_encoderHandle.getHandleAt(ii); + m_encoderStats[ii].cpuTimeBegin = m_encoder[idx].m_cpuTimeBegin; + m_encoderStats[ii].cpuTimeEnd = m_encoder[idx].m_cpuTimeEnd; + } + + m_submit->m_perfStats.numEncoders = uint8_t(numEncoders); + + m_encoderHandle.reset(); + uint16_t idx = m_encoderHandle.alloc(); + BX_CHECK(0 == idx, "Internal encoder handle is not 0 (idx %d).", idx); BX_UNUSED(idx); + } + bx::Semaphore m_renderSem; bx::Semaphore m_apiSem; - bx::Thread m_thread; + bx::Semaphore m_encoderEndSem; + bx::Mutex m_encoderApiLock; + bx::Mutex m_resourceApiLock; + bx::Thread m_thread; #else void apiSemPost() { @@ -4220,9 +4469,22 @@ namespace bgfx void renderSemWait() { } + + void encoderApiWait() + { + m_encoderStats[0].cpuTimeBegin = m_encoder[0].m_cpuTimeBegin; + m_encoderStats[0].cpuTimeEnd = m_encoder[0].m_cpuTimeEnd; + m_submit->m_perfStats.numEncoders = 1; + } #endif // BGFX_CONFIG_MULTITHREADED - Frame m_frame[1+(BGFX_CONFIG_MULTITHREADED ? 1 : 0)]; + EncoderStats m_encoderStats[BGFX_CONFIG_MAX_ENCODERS]; + Encoder* m_encoder0; + EncoderImpl m_encoder[BGFX_CONFIG_MAX_ENCODERS]; + uint32_t m_numEncoders; + bx::HandleAllocT m_encoderHandle; + + Frame m_frame[1+(BGFX_CONFIG_MULTITHREADED ? 1 : 0)]; Frame* m_render; Frame* m_submit; @@ -4260,10 +4522,10 @@ namespace bgfx struct ShaderRef { UniformHandle* m_uniforms; + String m_name; uint32_t m_hash; int16_t m_refCount; uint16_t m_num; - bool m_owned; }; struct ProgramRef @@ -4283,6 +4545,18 @@ namespace bgfx struct TextureRef { + void init(BackbufferRatio::Enum _ratio, TextureFormat::Enum _format, uint8_t _numMips, bool _ptrPending) + { + m_ptr = _ptrPending ? (void*)UINTPTR_MAX : NULL; + m_refCount = 1; + m_bbRatio = uint8_t(_ratio); + m_format = uint8_t(_format); + m_numMips = _numMips; + m_owned = false; + } + + String m_name; + void* m_ptr; int16_t m_refCount; uint8_t m_bbRatio; uint8_t m_format; @@ -4300,14 +4574,12 @@ namespace bgfx bool m_window; }; - typedef stl::unordered_set HandleSet; - HandleSet m_uniformSet; - HandleSet m_occlusionQuerySet; - typedef bx::HandleHashMapT UniformHashMap; UniformHashMap m_uniformHashMap; UniformRef m_uniformRef[BGFX_CONFIG_MAX_UNIFORMS]; + typedef bx::HandleHashMapT ShaderHashMap; + ShaderHashMap m_shaderHashMap; ShaderRef m_shaderRef[BGFX_CONFIG_MAX_SHADERS]; typedef bx::HandleHashMapT ProgramHashMap; @@ -4318,23 +4590,16 @@ namespace bgfx FrameBufferRef m_frameBufferRef[BGFX_CONFIG_MAX_FRAME_BUFFERS]; VertexDeclRef m_declRef; - uint8_t m_viewRemap[BGFX_CONFIG_MAX_VIEWS]; - FrameBufferHandle m_fb[BGFX_CONFIG_MAX_VIEWS]; - Clear m_clear[BGFX_CONFIG_MAX_VIEWS]; + ViewId m_viewRemap[BGFX_CONFIG_MAX_VIEWS]; + uint32_t m_seq[BGFX_CONFIG_MAX_VIEWS]; + View m_view[BGFX_CONFIG_MAX_VIEWS]; float m_clearColor[BGFX_CONFIG_MAX_COLOR_PALETTE][4]; - Rect m_rect[BGFX_CONFIG_MAX_VIEWS]; - Rect m_scissor[BGFX_CONFIG_MAX_VIEWS]; - Matrix4 m_view[BGFX_CONFIG_MAX_VIEWS]; - Matrix4 m_proj[2][BGFX_CONFIG_MAX_VIEWS]; - uint8_t m_viewFlags[BGFX_CONFIG_MAX_VIEWS]; - uint16_t m_seq[BGFX_CONFIG_MAX_VIEWS]; - uint16_t m_seqMask[BGFX_CONFIG_MAX_VIEWS]; uint8_t m_colorPaletteDirty; Resolution m_resolution; - int32_t m_instBufferCount; + int64_t m_frameTimeLast; uint32_t m_frames; uint32_t m_debug; diff --git a/3rdparty/bgfx/src/bgfx_shader.sh b/3rdparty/bgfx/src/bgfx_shader.sh index 3ee69e8..f5f7916 100644 --- a/3rdparty/bgfx/src/bgfx_shader.sh +++ b/3rdparty/bgfx/src/bgfx_shader.sh @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -28,6 +28,14 @@ # define EARLY_DEPTH_STENCIL #endif // BGFX_SHADER_LANGUAGE_HLSL > 3 && BGFX_SHADER_TYPE_FRAGMENT +#if BGFX_SHADER_LANGUAGE_GLSL +# define ARRAY_BEGIN(_type, _name, _count) _type _name[_count] = _type[]( +# define ARRAY_END() ) +#else +# define ARRAY_BEGIN(_type, _name, _count) _type _name[_count] = { +# define ARRAY_END() } +#endif // BGFX_SHADER_LANGUAGE_GLSL + #if BGFX_SHADER_LANGUAGE_HLSL || BGFX_SHADER_LANGUAGE_PSSL || BGFX_SHADER_LANGUAGE_SPIRV # define CONST(_x) static const _x # define dFdx(_x) ddx(_x) @@ -83,12 +91,12 @@ uint4 bitfieldReverse(uint4 _x) { return reversebits(_x); } # if !BGFX_SHADER_LANGUAGE_SPIRV uint packHalf2x16(vec2 _x) { - return (f32tof16(_x.x)<<16) | f32tof16(_x.y); + return (f32tof16(_x.y)<<16) | f32tof16(_x.x); } vec2 unpackHalf2x16(uint _x) { - return vec2(f16tof32(_x >> 16), f16tof32(_x) ); + return vec2(f16tof32(_x & 0xffff), f16tof32(_x >> 16) ); } # endif // !BGFX_SHADER_LANGUAGE_SPIRV @@ -354,6 +362,10 @@ float bgfxShadow2DProj(sampler2DShadow _sampler, vec4 _coord) # define texture2D(_sampler, _coord) tex2D(_sampler, _coord) # define texture2DProj(_sampler, _coord) bgfxTexture2DProj(_sampler, _coord) +# define SAMPLER2DARRAY(_name, _reg) SAMPLER2D(_name, _reg) +# define texture2DArray(_sampler, _coord) texture2D(_sampler, (_coord).xy) +# define texture2DArrayLod(_sampler, _coord, _lod) texture2DLod(_sampler, _coord, _lod) + # define SAMPLER2DSHADOW(_name, _reg) uniform sampler2DShadow _name : REGISTER(s, _reg) # define shadow2D(_sampler, _coord) bgfxShadow2D(_sampler, _coord) # define shadow2DProj(_sampler, _coord) bgfxShadow2DProj(_sampler, _coord) diff --git a/3rdparty/bgfx/src/charset.h b/3rdparty/bgfx/src/charset.h index e186730..e9233a3 100644 --- a/3rdparty/bgfx/src/charset.h +++ b/3rdparty/bgfx/src/charset.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/config.h b/3rdparty/bgfx/src/config.h index 9f5ca58..4a8d555 100644 --- a/3rdparty/bgfx/src/config.h +++ b/3rdparty/bgfx/src/config.h @@ -1,87 +1,87 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #ifndef BGFX_CONFIG_H_HEADER_GUARD #define BGFX_CONFIG_H_HEADER_GUARD -#include +#include #ifndef BGFX_CONFIG_DEBUG # define BGFX_CONFIG_DEBUG 0 #endif // BGFX_CONFIG_DEBUG -#if !defined(BGFX_CONFIG_RENDERER_DIRECT3D9) \ - && !defined(BGFX_CONFIG_RENDERER_DIRECT3D11) \ - && !defined(BGFX_CONFIG_RENDERER_DIRECT3D12) \ - && !defined(BGFX_CONFIG_RENDERER_METAL) \ - && !defined(BGFX_CONFIG_RENDERER_OPENGL) \ - && !defined(BGFX_CONFIG_RENDERER_OPENGLES) \ - && !defined(BGFX_CONFIG_RENDERER_VULKAN) \ - && !defined(BGFX_CONFIG_RENDERER_GNM) +#if !defined(BGFX_CONFIG_RENDERER_DIRECT3D9) \ + && !defined(BGFX_CONFIG_RENDERER_DIRECT3D11) \ + && !defined(BGFX_CONFIG_RENDERER_DIRECT3D12) \ + && !defined(BGFX_CONFIG_RENDERER_METAL) \ + && !defined(BGFX_CONFIG_RENDERER_OPENGL) \ + && !defined(BGFX_CONFIG_RENDERER_OPENGLES) \ + && !defined(BGFX_CONFIG_RENDERER_VULKAN) \ + && !defined(BGFX_CONFIG_RENDERER_GNM) # ifndef BGFX_CONFIG_RENDERER_DIRECT3D9 # define BGFX_CONFIG_RENDERER_DIRECT3D9 (0 \ - || BX_PLATFORM_WINDOWS \ - || BX_PLATFORM_XBOX360 \ + || BX_PLATFORM_WINDOWS \ ? 1 : 0) # endif // BGFX_CONFIG_RENDERER_DIRECT3D9 # ifndef BGFX_CONFIG_RENDERER_DIRECT3D11 # define BGFX_CONFIG_RENDERER_DIRECT3D11 (0 \ - || BX_PLATFORM_WINDOWS \ - || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_WINRT \ + || BX_PLATFORM_XBOXONE \ ? 1 : 0) # endif // BGFX_CONFIG_RENDERER_DIRECT3D11 # ifndef BGFX_CONFIG_RENDERER_DIRECT3D12 # define BGFX_CONFIG_RENDERER_DIRECT3D12 (0 \ - || BX_PLATFORM_WINDOWS \ - || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_WINRT \ + || BX_PLATFORM_XBOXONE \ ? 1 : 0) # endif // BGFX_CONFIG_RENDERER_DIRECT3D12 # ifndef BGFX_CONFIG_RENDERER_METAL -# define BGFX_CONFIG_RENDERER_METAL (0 \ +# define BGFX_CONFIG_RENDERER_METAL (0 \ || (BX_PLATFORM_IOS && BX_CPU_ARM) \ - || (BX_PLATFORM_OSX >= 101100) \ + || (BX_PLATFORM_OSX >= 101100) \ ? 1 : 0) # endif // BGFX_CONFIG_RENDERER_METAL # ifndef BGFX_CONFIG_RENDERER_OPENGL # define BGFX_CONFIG_RENDERER_OPENGL (0 \ - || BX_PLATFORM_BSD \ - || BX_PLATFORM_LINUX \ - || BX_PLATFORM_OSX \ - || BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_BSD \ + || BX_PLATFORM_LINUX \ + || BX_PLATFORM_OSX \ + || BX_PLATFORM_WINDOWS \ ? 1 : 0) # endif // BGFX_CONFIG_RENDERER_OPENGL # ifndef BGFX_CONFIG_RENDERER_OPENGLES # define BGFX_CONFIG_RENDERER_OPENGLES (0 \ - || BX_PLATFORM_ANDROID \ - || BX_PLATFORM_EMSCRIPTEN \ - || BX_PLATFORM_IOS \ - || BX_PLATFORM_NACL \ - || BX_PLATFORM_QNX \ - || BX_PLATFORM_RPI \ - || BX_PLATFORM_STEAMLINK \ + || BX_PLATFORM_ANDROID \ + || BX_PLATFORM_EMSCRIPTEN \ + || BX_PLATFORM_IOS \ + || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK \ + || BX_PLATFORM_NX \ ? 1 : 0) # endif // BGFX_CONFIG_RENDERER_OPENGLES # ifndef BGFX_CONFIG_RENDERER_VULKAN # define BGFX_CONFIG_RENDERER_VULKAN (0 \ - || BX_PLATFORM_ANDROID \ - || BX_PLATFORM_LINUX \ - || BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_ANDROID \ + || BX_PLATFORM_LINUX \ + || BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_NX \ ? 1 : 0) # endif // BGFX_CONFIG_RENDERER_VULKAN # ifndef BGFX_CONFIG_RENDERER_GNM # define BGFX_CONFIG_RENDERER_GNM (0 \ - || BX_PLATFORM_PS4 \ + || BX_PLATFORM_PS4 \ ? 1 : 0) # endif // BGFX_CONFIG_RENDERER_GNM @@ -203,20 +203,21 @@ #endif // BGFX_CONFIG_SORT_KEY_NUM_BITS_DEPTH #ifndef BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ -# define BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ 11 +# define BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ 20 #endif // BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ #ifndef BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM # define BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM 9 #endif // BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM -// Cannot be configured directly. Must must be power of 2. +// Cannot be configured via compiler options. #define BGFX_CONFIG_MAX_PROGRAMS (1<SetCaptureOptionU32(eRENDERDOC_Option_SaveAllInitials, 1); s_renderDoc->MaskOverlayBits(eRENDERDOC_Overlay_None, eRENDERDOC_Overlay_None); + + s_renderDocDll = renderDocDll; } else { - bx::dlclose(renderdocdll); - renderdocdll = NULL; + bx::dlclose(renderDocDll); + renderDocDll = NULL; } } - return renderdocdll; + return renderDocDll; } void unloadRenderDoc(void* _renderdocdll) { if (NULL != _renderdocdll) { - s_renderDoc->Shutdown(); - bx::dlclose(_renderdocdll); + // BK - Once RenderDoc is loaded there shouldn't be calls + // to Shutdown or unload RenderDoc DLL. + // https://github.com/bkaradzic/bgfx/issues/1192 + // + // s_renderDoc->Shutdown(); + // bx::dlclose(_renderdocdll); } } diff --git a/3rdparty/bgfx/src/debug_renderdoc.h b/3rdparty/bgfx/src/debug_renderdoc.h index b696a7e..0c62e77 100644 --- a/3rdparty/bgfx/src/debug_renderdoc.h +++ b/3rdparty/bgfx/src/debug_renderdoc.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/fs_clear0.bin.h b/3rdparty/bgfx/src/fs_clear0.bin.h index e9e8cc6..f4a9804 100644 --- a/3rdparty/bgfx/src/fs_clear0.bin.h +++ b/3rdparty/bgfx/src/fs_clear0.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_clear0_glsl[128] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... 0x00, 0x5a, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .Z...uniform vec 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col @@ -9,76 +9,216 @@ static const uint8_t fs_clear0_glsl[128] = 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // olor = bgfx_clea 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_color[0];.}... }; -static const uint8_t fs_clear0_dx9[208] = +static const uint8_t fs_clear0_spv[2158] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x01, 0x00, 0x00, 0x01, // clear_color..... + 0x00, 0x48, 0x08, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, // .H.....#........ + 0x00, 0x2e, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, // ..a............. + 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, // .........GLSL.st + 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // d.450........... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, // .main........... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, // n........5...vec + 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, // 4_splat(f1;..... + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x4d, 0x0f, 0x00, // ....._x......M.. + 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x06, // .@main(vf4;..... + 0x00, 0x2c, 0x41, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .,A..gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, // _0_..........bgf + 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // x_VoidFrag...... + 0x00, 0x9d, 0x5e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..^..param...... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....$Global.... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, // .........u_viewR + 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, // ect............. + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, // .u_viewTexel.... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, // .........u_view. + 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // nvView.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_proj..... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, // .........u_invPr + 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, // oj.............. + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, // .u_viewProj..... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // .........u_invVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // ewProj.......... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....u_model.... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, // View............ + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // .u_modelViewProj + 0x00, 0x06, 0x00, 0x06, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, // .............u_a + 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0xd2, 0x01, 0x00, // lphaRef4........ + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // .....bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // color........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x3d, 0x51, 0x00, 0x00, 0x67, 0x6c, 0x5f, // .........=Q..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, // FragData_0_..... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, // .....param...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x7d, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, // _0_..G...}...... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, // .@...G.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#.......H...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#...`...H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#.......H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#...`...H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#.......H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xd2, 0x01, 0x00, // .#... ...H...... + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#...0...G.. + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, // .........G...B.. + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, // .".......G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, // .!.............. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ..... ... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xf5, 0x00, 0x00, // .........!...... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, // .............e.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // . .......+...... + 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x7d, 0x01, 0x00, // .j... .......}.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // .e...j...+...... + 0x00, 0x22, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xb2, 0x04, 0x00, // .".............. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, 0xd2, 0x01, 0x00, // .....".......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .........e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x7d, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .}...e...e...... + 0x00, 0xb2, 0x04, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4f, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... ...O...... + 0x00, 0xd2, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4f, 0x04, 0x00, 0x00, 0x42, 0x13, 0x00, // .....;...O...B.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, // .....+......./.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... .......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ..... .......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, // .....;.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // .....6.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2d, 0x61, 0x00, // .............-a. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.............. + 0x00, 0x39, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xe7, 0x49, 0x00, 0x00, 0x4d, 0x0f, 0x00, // .9........I..M.. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3d, 0x51, 0x00, // .....=.......=Q. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x3d, 0x51, 0x00, // .....>.......=Q. + 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .....8...6...... + 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .5...........7.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, // ................ + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=.......dW..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........N..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=.......I9..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........9..... + 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, // .P........*..dW. + 0x00, 0xa9, 0x4e, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, // ..N..I9...9..... + 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // ..*..8...6...... + 0x00, 0x4d, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .M...........7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2c, 0x41, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x31, 0x27, 0x00, // .....,A......1'. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x9d, 0x5e, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........^..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9d, 0x5e, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....^......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x9d, 0x5e, 0x00, // .........5....^. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x0a, 0x5a, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........Z..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0x6b, 0x2e, 0x00, 0x00, 0x0a, 0x5a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2c, 0x41, 0x00, // .k....Z..>...,A. + 0x00, 0x6b, 0x2e, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .k.......8.... +}; +static const uint8_t fs_clear0_dx9[198] = +{ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x01, // clear_color..... - 0x00, 0xac, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x25, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........%.CTAB. - 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............ - 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0.... - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b - 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color. - 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x01, // 0.10011.16384... - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ................ + 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, // ...........".CTA + 0x42, 0x1c, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, // B....[.......... + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .........T...0.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... + 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo + 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, // 0.1............. + 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... }; -static const uint8_t fs_clear0_dx11[339] = +static const uint8_t fs_clear0_dx11[341] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color..... - 0x00, 0x2c, 0x01, 0x44, 0x58, 0x42, 0x43, 0x01, 0xdc, 0xf8, 0x1e, 0x7d, 0x89, 0xaa, 0x45, 0x4f, // .,.DXBC....}..EO - 0x0c, 0x79, 0x61, 0x5e, 0xe4, 0x72, 0x8d, 0x01, 0x00, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, 0x04, // .ya^.r.....,.... - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0xf8, // ...0...|........ - 0x00, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x44, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, // ...Aon9D...D.... - 0x02, 0xff, 0xff, 0x14, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, // .......0.....$.. - 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .0...0...$...0.. - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0x01, // ................ - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, // ...............S - 0x48, 0x44, 0x52, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x59, // HDR@...@.......Y - 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...F. .........e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // .... ......6.... - 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F. ...... - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ...>...ISGN,.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ....... ........ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S - 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x2c, // V_POSITION.OSGN, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // ........... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x00, // ...SV_TARGET.... - 0x00, 0x80, 0x00, // ... + 0x00, 0x2c, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x01, 0xdc, 0xf8, 0x1e, 0x7d, 0x89, 0xaa, // .,...DXBC....}.. + 0x45, 0x4f, 0x0c, 0x79, 0x61, 0x5e, 0xe4, 0x72, 0x8d, 0x01, 0x00, 0x00, 0x00, 0x2c, 0x01, 0x00, // EO.ya^.r.....,.. + 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, // .....0...|...... + 0x00, 0xf8, 0x00, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x44, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .....Aon9D...D.. + 0x00, 0x00, 0x02, 0xff, 0xff, 0x14, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, // .........0.....$ + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, // ...0...0...$...0 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, // ................ + 0xff, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, // ................ + 0x00, 0x53, 0x48, 0x44, 0x52, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .SHDR@...@...... + 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .Y...F. ........ + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .e.... ......6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, // .....>...ISGN,.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ + 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, // .SV_POSITION.OSG + 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // N,........... .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, // .....SV_TARGET.. + 0xab, 0x00, 0x00, 0x80, 0x00, // ..... }; -static const uint8_t fs_clear0_mtl[426] = +static const uint8_t fs_clear0_mtl[449] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x01, 0x00, 0x00, 0x75, 0x73, // FSH...........us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM - 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra - 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // gColor;.};.struc - 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, // t xlatMtlShaderU - 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // niform {. float - 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col - 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, // or[8];.};.fragme - 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // nt xlatMtlShader - 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, // Output xlatMtlMa - 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // in (xlatMtlShade - 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, // rInput _mtl_i [[ - 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, // stage_in]], cons - 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // tant xlatMtlShad - 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // erUniform& _mtl_ - 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, // u [[buffer(0)]]) - 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // .{. xlatMtlShad - 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // erOutput _mtl_o; - 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . _mtl_o.gl_Fra - 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // gColor = _mtl_u. - 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color - 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, // [0];. return _m - 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tl_o;.}... + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... + 0x00, 0x9b, 0x01, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, // .....using names + 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // pace metal;.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // Input {.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x7d, // gl_FragColor;.} + 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // ;.struct xlatMtl + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, // ShaderUniform {. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // float4 bgfx_cl + 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, // ear_color[8];.}; + 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // .fragment xlatMt + 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, // lShaderOutput xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, // atMtlMain (xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, // tlShaderInput _m + 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, // tl_i [[stage_in] + 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // ], constant xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // MtlShaderUniform + 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, // & _mtl_u [[buffe + 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, // r(0)]]).{. xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // _mtl_o;. _mtl_o + 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, // .gl_FragColor = + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // _mtl_u.bgfx_clea + 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, // r_color[0];. re + 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, // turn _mtl_o;.}.. + 0x00, // . }; extern const uint8_t* fs_clear0_pssl; extern const uint32_t fs_clear0_pssl_size; diff --git a/3rdparty/bgfx/src/fs_clear0.sc b/3rdparty/bgfx/src/fs_clear0.sc index 7f7025d..c3e1572 100644 --- a/3rdparty/bgfx/src/fs_clear0.sc +++ b/3rdparty/bgfx/src/fs_clear0.sc @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/fs_clear1.bin.h b/3rdparty/bgfx/src/fs_clear1.bin.h index 40bb848..1b7159c 100644 --- a/3rdparty/bgfx/src/fs_clear1.bin.h +++ b/3rdparty/bgfx/src/fs_clear1.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_clear1_glsl[170] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... 0x00, 0x84, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .....uniform vec 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col @@ -12,88 +12,244 @@ static const uint8_t fs_clear1_glsl[170] = 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // bgfx_clear_colo 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r[1];.}... }; -static const uint8_t fs_clear1_dx9[220] = +static const uint8_t fs_clear1_spv[2418] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x02, 0x00, 0x00, 0x02, // clear_color..... + 0x00, 0x4c, 0x09, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, // .L.....#........ + 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, // .Ta............. + 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, // .........GLSL.st + 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // d.450........... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xc2, 0x11, 0x00, // .main........... + 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, // ................ + 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, // .main........5.. + 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, // .vec4_splat(f1;. + 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, // ........._x..... + 0x00, 0xff, 0x0f, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, // .....@main(vf4;v + 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x67, 0x6c, 0x5f, // f4;......O0..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0xa2, 0x25, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..%..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, // _1_..........bgf + 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // x_VoidFrag...... + 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .,N..param...... + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....$Global.... + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, // .........u_viewR + 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, // ect............. + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, // .u_viewTexel.... + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, // .........u_view. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, // nvView.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_proj..... + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, // .........u_invPr + 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, // oj.............. + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, // .u_viewProj..... + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // .........u_invVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, // ewProj.......... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....u_model.... + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, // View............ + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // .u_modelViewProj + 0x00, 0x06, 0x00, 0x06, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, // .............u_a + 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0x9a, 0x06, 0x00, // lphaRef4........ + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // .....bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // color........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xbd, 0x43, 0x00, 0x00, 0x67, 0x6c, 0x5f, // ..........C..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0xdf, 0x38, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..8..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xa3, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, // _1_.......G..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, // am...........par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, // am...........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0xc2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xda, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, // _1_..G.......... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc7, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, // .@...G.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, // .#.......H...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, // .#...`...H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, // .#.......H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, // .#...`...H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, // .#.......H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x9a, 0x06, 0x00, // .#... ...H...... + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#...0...G.. + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, // .........G...B.. + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, // .".......G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, // .!.............. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ..... ... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x05, 0x00, 0x3d, 0x0b, 0x00, // .........!...=.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, // ................ + 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // .e.............. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // .....j... ...... + 0x00, 0xda, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, // .....e...j...+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // .....".......... + 0x00, 0xc7, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, // ........."...... + 0x00, 0x9a, 0x06, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .............e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0xda, 0x01, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.......e...e.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xc7, 0x04, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x17, 0x09, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x17, 0x09, 0x00, // .........;...... + 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .B.............. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // . .......+...... + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // ./.......+...... + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // ......... ...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xc2, 0x11, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // .........6...... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, // ................ + 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa3, 0x47, 0x00, // .Sa..;........G. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, // .....;.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x39, 0x00, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbe, 0x2c, 0x00, // .....9........,. + 0x00, 0xff, 0x0f, 0x00, 0x00, 0xa3, 0x47, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......G......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xbd, 0x43, 0x00, 0x00, 0xa3, 0x47, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......C...G..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......8......>.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xbd, 0x43, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc2, 0x11, 0x00, // ......C..>...... + 0x00, 0xdf, 0x38, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // ..8......8...6.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, // .....5.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.............. + 0x00, 0x88, 0x2e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, // .....=.......dW. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, // .....=........N. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, // .....=.......I9. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, // .....=........9. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, // .....P........*. + 0x00, 0x64, 0x57, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, // .dW...N..I9...9. + 0x00, 0xfe, 0x00, 0x02, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // ......*..8...6.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x0b, 0x00, // .............=.. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x4f, 0x30, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......O0..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa2, 0x25, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xee, 0x5f, 0x00, // ......%......._. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......,N..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2c, 0x4e, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...,N......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x2c, 0x4e, 0x00, // .........5...,N. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x53, 0x18, 0x00, 0x00, 0x42, 0x13, 0x00, // .A.......S...B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0x85, 0x5a, 0x00, 0x00, 0x53, 0x18, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x4f, 0x30, 0x00, // ..Z..S...>...O0. + 0x00, 0x85, 0x5a, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xf9, 0x34, 0x00, // ..Z..A........4. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, 0xf9, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......!...4..>.. + 0x00, 0xa2, 0x25, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, // ..%...!......8.. + 0x00, 0x00, // .. +}; +static const uint8_t fs_clear1_dx9[210] = +{ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x02, // clear_color..... - 0x00, 0xb8, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x25, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........%.CTAB. - 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............ - 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0.... - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b - 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color. - 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x01, // 0.10011.16384... - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ - 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ............ + 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, // ...........".CTA + 0x42, 0x1c, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, // B....[.......... + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .........T...0.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... + 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo + 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, // 0.1............. + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, // ................ + 0x00, 0x00, // .. }; -static const uint8_t fs_clear1_dx11[411] = +static const uint8_t fs_clear1_dx11[413] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color..... - 0x00, 0x74, 0x01, 0x44, 0x58, 0x42, 0x43, 0x82, 0xff, 0x8b, 0x5f, 0x53, 0xa0, 0x1f, 0x3b, 0x53, // .t.DXBC..._S..;S - 0xc6, 0x2a, 0x12, 0xcf, 0xc8, 0x7f, 0xb8, 0x01, 0x00, 0x00, 0x00, 0x74, 0x01, 0x00, 0x00, 0x04, // .*.........t.... - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x28, // ...0...........( - 0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...Aon9P...P.... - 0x02, 0xff, 0xff, 0x20, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, // ... ...0.....$.. - 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .0...0...$...0.. - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0x01, // ................ - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ - 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x64, // ...........SHDRd - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, // ...@.......Y...F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // . .........e.... - 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, // ......e.... ... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6.... - 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ......F. ...... - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ...>...ISGN,.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ....... ........ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S - 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x44, // V_POSITION.OSGND - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, // ...........8.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...8............ - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA - 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x00, 0x00, 0x80, 0x00, // RGET....... + 0x00, 0x74, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x82, 0xff, 0x8b, 0x5f, 0x53, 0xa0, 0x1f, // .t...DXBC..._S.. + 0x3b, 0x53, 0xc6, 0x2a, 0x12, 0xcf, 0xc8, 0x7f, 0xb8, 0x01, 0x00, 0x00, 0x00, 0x74, 0x01, 0x00, // ;S.*.........t.. + 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, // .....0.......... + 0x00, 0x28, 0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, // .(...Aon9P...P.. + 0x00, 0x00, 0x02, 0xff, 0xff, 0x20, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, // ..... ...0.....$ + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, // ...0...0...$...0 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, // ................ + 0xff, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, // .............SHD + 0x52, 0x64, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, // Rd...@.......Y.. + 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .F. .........e.. + 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .. ......e.... . + 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....6.... ..... + 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .F. .........6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, // .....>...ISGN,.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ + 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, // .SV_POSITION.OSG + 0x4e, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, // ND...........8.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....8.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, // .............SV_ + 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x00, 0x00, 0x80, 0x00, // TARGET....... }; -static const uint8_t fs_clear1_mtl[531] = +static const uint8_t fs_clear1_mtl[554] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...........us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM - 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra - 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color( - 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c - 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, // olor(1)]];.};.st - 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ruct xlatMtlShad - 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // erUniform {. fl - 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // oat4 bgfx_clear_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, // color[8];.};.fra - 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // gment xlatMtlSha - 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // derOutput xlatMt - 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // lMain (xlatMtlSh - 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // aderInput _mtl_i - 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, // [[stage_in]], c - 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // onstant xlatMtlS - 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, // haderUniform& _m - 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, // tl_u [[buffer(0) - 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // ]]).{. xlatMtlS - 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // haderOutput _mtl - 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, // _o;. _mtl_o.gl_ - 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, // FragData_0 = _mt - 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c - 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // olor[0];. _mtl_ - 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, // o.gl_FragData_1 - 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // = _mtl_u.bgfx_cl - 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[1];. - 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, // return _mtl_o;.} - 0x0a, 0x0a, 0x00, // ... + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... + 0x00, 0x04, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, // .....using names + 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // pace metal;.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // Input {.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, // gl_FragData_0 [ + 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, // [color(0)]];. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // loat4 gl_FragDat + 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, // a_1 [[color(1)]] + 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // ;.};.struct xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // MtlShaderUniform + 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, // {. float4 bgfx + 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, // _clear_color[8]; + 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, // .};.fragment xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, // xlatMtlMain (xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, // atMtlShaderInput + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, // _mtl_i [[stage_ + 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, // in]], constant x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, // latMtlShaderUnif + 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, // orm& _mtl_u [[bu + 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, // ffer(0)]]).{. x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, // latMtlShaderOutp + 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, // ut _mtl_o;. _mt + 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // l_o.gl_FragData_ + 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, // 0 = _mtl_u.bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, // clear_color[0];. + 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // _mtl_o.gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // Data_1 = _mtl_u. + 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color + 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, // [1];. return _m + 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tl_o;.}... }; extern const uint8_t* fs_clear1_pssl; extern const uint32_t fs_clear1_pssl_size; diff --git a/3rdparty/bgfx/src/fs_clear1.sc b/3rdparty/bgfx/src/fs_clear1.sc index 921c19f..81701cd 100644 --- a/3rdparty/bgfx/src/fs_clear1.sc +++ b/3rdparty/bgfx/src/fs_clear1.sc @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/fs_clear2.bin.h b/3rdparty/bgfx/src/fs_clear2.bin.h index 7d19bb3..5ad3d26 100644 --- a/3rdparty/bgfx/src/fs_clear2.bin.h +++ b/3rdparty/bgfx/src/fs_clear2.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_clear2_glsl[210] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... 0x00, 0xac, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .....uniform vec 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col @@ -15,99 +15,271 @@ static const uint8_t fs_clear2_glsl[210] = 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, // ear_color[2];.}. 0x0a, 0x00, // .. }; -static const uint8_t fs_clear2_dx9[232] = +static const uint8_t fs_clear2_spv[2678] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x03, 0x00, 0x00, 0x03, // clear_color..... + 0x00, 0x50, 0x0a, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, // .P.....#........ + 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, // .Ta............. + 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, // .........GLSL.st + 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // d.450........... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xc2, 0x11, 0x00, // .main........... + 0x00, 0xb3, 0x15, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, // ................ + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, // .....main....... + 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, // .5...vec4_splat( + 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, // f1;.........._x. + 0x00, 0x05, 0x00, 0x07, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, // .........@main(v + 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x06, // f4;vf4;vf4;..... + 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _0_....../B..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_1_..... + 0x00, 0x10, 0x46, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..F..gl_FragData + 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, // _2_..........bgf + 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // x_VoidFrag...... + 0x00, 0xf4, 0x56, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..V..param...... + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, // .b...$Global.... + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, // .b.......u_viewR + 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, // ect......b...... + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, // .u_viewTexel.... + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, // .b.......u_view. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .....b.......u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, // nvView.......b.. + 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_proj..... + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, // .b.......u_invPr + 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, // oj.......b...... + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, // .u_viewProj..... + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // .b.......u_invVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, // ewProj.......b.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....u_model.... + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .b.......u_model + 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, // View.....b...... + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // .u_modelViewProj + 0x00, 0x06, 0x00, 0x06, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, // .....b.......u_a + 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0x62, 0x0b, 0x00, // lphaRef4.....b.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // .....bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // color........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xaa, 0x43, 0x00, 0x00, 0x67, 0x6c, 0x5f, // ..........C..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0x8c, 0x39, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..9..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_......@,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, // FragData_2_..... + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..G..param...... + 0x00, 0x5f, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ._U..param...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, // .....param...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _0_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_1_..... + 0x00, 0xb3, 0x15, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x37, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, // _2_..G...7...... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xdc, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, // .@...G.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, // .....H...b...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, // .#.......H...b.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .b...........H.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .b.......#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...b.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H...b...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H...b...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, // .#...`...H...b.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .b...........H.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .b.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...b.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H...b...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H...b...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, // .#.......H...b.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .b...........H.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .b.......#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...b.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H...b...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H...b...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, // .#...`...H...b.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .b...........H.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .b.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...b.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H...b...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H...b...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, // .#.......H...b.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .b...........H.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .b.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...b.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H...b...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x62, 0x0b, 0x00, // .#... ...H...b.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#...0...G.. + 0x00, 0x62, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, // .b.......G...B.. + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, // .".......G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb3, 0x15, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, // .!.............. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ..... ... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x91, 0x00, 0x00, // .........!...... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // .+.............. + 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .....e.......... + 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, // .+.......j... .. + 0x00, 0x1c, 0x00, 0x04, 0x00, 0x37, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .....7...e...j.. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, // .+......."...... + 0x00, 0x1c, 0x00, 0x04, 0x00, 0xdc, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, // .............".. + 0x00, 0x1e, 0x00, 0x0f, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .....b.......... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x37, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...7...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdc, 0x04, 0x00, 0x00, 0x20, 0x00, 0x04, // .e........... .. + 0x00, 0x1c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x62, 0x0b, 0x00, 0x00, 0x3b, 0x00, 0x04, // .........b...;.. + 0x00, 0x1c, 0x02, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // .....B.......... + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ...../.......+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xc2, 0x11, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xb3, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, // .............6.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // .....Sa..;...... + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ..G......;...... + 0x00, 0x5f, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ._U......;...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, // .........9...... + 0x00, 0xbe, 0x2c, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x5f, 0x55, 0x00, // ..,.......G.._U. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xaa, 0x43, 0x00, // .....=........C. + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8c, 0x39, 0x00, // ..G..=........9. + 0x00, 0x5f, 0x55, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, // ._U..=.......@,. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xaa, 0x43, 0x00, // .....>........C. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc2, 0x11, 0x00, 0x00, 0x8c, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x03, // .>........9..>.. + 0x00, 0xb3, 0x15, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, // .....@,......8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......5...... + 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .....7.......... + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........=...... + 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .dW......=...... + 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ..N......=...... + 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .I9......=...... + 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // ..9......P...... + 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0x49, 0x39, 0x00, // ..*..dW...N..I9. + 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x38, 0x00, 0x01, // ..9.......*..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x82, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x91, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xe2, 0x2e, 0x00, // .....7.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x37, 0x00, 0x03, // .7......./B..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x10, 0x46, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x37, 0x1e, 0x00, // ......F......7.. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xf4, 0x56, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........V..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xf4, 0x56, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....V......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xf4, 0x56, 0x00, // .........5....V. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x1b, 0x21, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........!..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0xce, 0x18, 0x00, 0x00, 0x1b, 0x21, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe2, 0x2e, 0x00, // ......!..>...... + 0x00, 0xce, 0x18, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xc1, 0x3d, 0x00, // .....A........=. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf2, 0x1b, 0x00, 0x00, 0xc1, 0x3d, 0x00, 0x00, 0x3e, 0x00, 0x03, // ..........=..>.. + 0x00, 0x2f, 0x42, 0x00, 0x00, 0xf2, 0x1b, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, // ./B......A...... + 0x00, 0xc2, 0x3d, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x11, 0x0a, 0x00, // ..=..B.../...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe6, 0x29, 0x00, 0x00, 0xc2, 0x3d, 0x00, // .=........)...=. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x10, 0x46, 0x00, 0x00, 0xe6, 0x29, 0x00, 0x00, 0xfd, 0x00, 0x01, // .>....F...)..... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .8.... +}; +static const uint8_t fs_clear2_dx9[222] = +{ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x03, // clear_color..... - 0x00, 0xc4, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x25, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........%.CTAB. - 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............ - 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0.... - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b - 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color. - 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x01, // 0.10011.16384... - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ - 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, // ................ - 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ........ + 0x00, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, // ...........".CTA + 0x42, 0x1c, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, // B....[.......... + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .........T...0.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... + 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo + 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, // 0.1............. + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // .............. }; -static const uint8_t fs_clear2_dx11[483] = +static const uint8_t fs_clear2_dx11[485] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color..... - 0x00, 0xbc, 0x01, 0x44, 0x58, 0x42, 0x43, 0x0e, 0x9f, 0x66, 0xdd, 0x1f, 0x67, 0xd6, 0xd1, 0x64, // ...DXBC..f..g..d - 0xb9, 0x94, 0x61, 0x3d, 0x93, 0x51, 0x1a, 0x01, 0x00, 0x00, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, // ..a=.Q.......... - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x24, 0x01, 0x00, 0x00, 0x58, // ...0.......$...X - 0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x5c, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, // ...Aon9......... - 0x02, 0xff, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, // ...,...0.....$.. - 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .0...0...$...0.. - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0x01, // ................ - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ - 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, // ................ - 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x88, 0x00, 0x00, 0x00, 0x40, // .......SHDR....@ - 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // ..."...Y...F. .. - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // .... ......6.... - 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F. ...... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6.... - 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // ......F. ...... - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ...>...ISGN,.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ....... ........ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S - 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x5c, // V_POSITION.OSGN. - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...P............ - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x02, // ...........P.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x00, // ...SV_TARGET.... - 0x00, 0x80, 0x00, // ... + 0x00, 0xbc, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x0e, 0x9f, 0x66, 0xdd, 0x1f, 0x67, 0xd6, // .....DXBC..f..g. + 0xd1, 0x64, 0xb9, 0x94, 0x61, 0x3d, 0x93, 0x51, 0x1a, 0x01, 0x00, 0x00, 0x00, 0xbc, 0x01, 0x00, // .d..a=.Q........ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x24, 0x01, 0x00, // .....0.......$.. + 0x00, 0x58, 0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x5c, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, // .X...Aon9....... + 0x00, 0x00, 0x02, 0xff, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, // .....,...0.....$ + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, // ...0...0...$...0 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, // ................ + 0xff, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, // ................ + 0x80, 0x02, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x88, 0x00, 0x00, // .........SHDR... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, // .@..."...Y...F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .........e.... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, // .....e.... ..... + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .e.... ......6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, // .....6.... ..... + 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .F. .........6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, // .....>...ISGN,.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ + 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, // .SV_POSITION.OSG + 0x4e, 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, // N............P.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....P.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, // .............P.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, // .....SV_TARGET.. + 0xab, 0x00, 0x00, 0x80, 0x00, // ..... }; -static const uint8_t fs_clear2_mtl[621] = +static const uint8_t fs_clear2_mtl[644] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH.......^...us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM - 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra - 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color( - 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c - 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo - 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_ - 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];. - 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // };.struct xlatMt - 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, // lShaderUniform { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, // . float4 bgfx_c - 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, // lear_color[8];.} - 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // ;.fragment xlatM - 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, // tlShaderOutput x - 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, // latMtlMain (xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, // MtlShaderInput _ - 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, // mtl_i [[stage_in - 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, // ]], constant xla - 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, // tMtlShaderUnifor - 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, // m& _mtl_u [[buff - 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, // er(0)]]).{. xla - 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput - 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // _mtl_o;. _mtl_ - 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, // o.gl_FragData_0 - 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // = _mtl_u.bgfx_cl - 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[0];. - 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa - 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, // ta_1 = _mtl_u.bg - 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, // fx_clear_color[1 - 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // ];. _mtl_o.gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ragData_2 = _mtl - 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // _u.bgfx_clear_co - 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, // lor[2];. return - 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _mtl_o;.}... + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... + 0x00, 0x5e, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, // .^...using names + 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // pace metal;.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // Input {.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, // gl_FragData_0 [ + 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, // [color(0)]];. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // loat4 gl_FragDat + 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, // a_1 [[color(1)]] + 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. float4 gl_Fr + 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // agData_2 [[color + 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, // (2)]];.};.struct + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, // xlatMtlShaderUn + 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // iform {. float4 + 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // bgfx_clear_colo + 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, // r[8];.};.fragmen + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, // utput xlatMtlMai + 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // n (xlatMtlShader + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, // Input _mtl_i [[s + 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, // tage_in]], const + 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // ant xlatMtlShade + 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // rUniform& _mtl_u + 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, // [[buffer(0)]]). + 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // {. xlatMtlShade + 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // rOutput _mtl_o;. + 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // _mtl_o.gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // Data_0 = _mtl_u. + 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color + 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, // [0];. _mtl_o.gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, // _FragData_1 = _m + 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // tl_u.bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // color[1];. _mtl + 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, // _o.gl_FragData_2 + 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, // = _mtl_u.bgfx_c + 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, // lear_color[2];. + 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // return _mtl_o;. + 0x7d, 0x0a, 0x0a, 0x00, // }... }; extern const uint8_t* fs_clear2_pssl; extern const uint32_t fs_clear2_pssl_size; diff --git a/3rdparty/bgfx/src/fs_clear2.sc b/3rdparty/bgfx/src/fs_clear2.sc index 163430f..90a9e4b 100644 --- a/3rdparty/bgfx/src/fs_clear2.sc +++ b/3rdparty/bgfx/src/fs_clear2.sc @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/fs_clear3.bin.h b/3rdparty/bgfx/src/fs_clear3.bin.h index 82f60bc..67c7bce 100644 --- a/3rdparty/bgfx/src/fs_clear3.bin.h +++ b/3rdparty/bgfx/src/fs_clear3.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_clear3_glsl[250] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... 0x00, 0xd4, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .....uniform vec 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col @@ -17,110 +17,297 @@ static const uint8_t fs_clear3_glsl[250] = 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // bgfx_clear_colo 0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r[3];.}... }; -static const uint8_t fs_clear3_dx9[244] = +static const uint8_t fs_clear3_spv[2938] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x04, 0x00, 0x00, 0x04, // clear_color..... + 0x00, 0x54, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, // .T.....#........ + 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, // .Ta............. + 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, // .........GLSL.st + 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // d.450........... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xc2, 0x11, 0x00, // .main........... + 0x00, 0xb3, 0x15, 0x00, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, // ................ + 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, // .....5...vec4_sp + 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, // lat(f1;......... + 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x08, 0x00, 0xf4, 0x0c, 0x00, 0x00, 0x40, 0x6d, 0x61, // ._x..........@ma + 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, // in(vf4;vf4;vf4;v + 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x8f, 0x22, 0x00, 0x00, 0x67, 0x6c, 0x5f, // f4;......."..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0xf3, 0x54, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..T..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x4e, 0x4a, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_......NJ..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0xd8, 0x4e, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..N..gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, // _3_..........bgf + 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // x_VoidFrag...... + 0x00, 0x83, 0x46, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..F..param...... + 0x00, 0x67, 0x04, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, // .g...$Global.... + 0x00, 0x67, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, // .g.......u_viewR + 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, // ect......g...... + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, // .u_viewTexel.... + 0x00, 0x67, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, // .g.......u_view. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .....g.......u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, // nvView.......g.. + 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_proj..... + 0x00, 0x67, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, // .g.......u_invPr + 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, // oj.......g...... + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, // .u_viewProj..... + 0x00, 0x67, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // .g.......u_invVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, // ewProj.......g.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....u_model.... + 0x00, 0x67, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .g.......u_model + 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x67, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, // View.....g...... + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // .u_modelViewProj + 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x04, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, // .....g.......u_a + 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0x67, 0x04, 0x00, // lphaRef4.....g.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // .....bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // color........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xaa, 0x43, 0x00, 0x00, 0x67, 0x6c, 0x5f, // ..........C..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0x79, 0x39, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .y9..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xed, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_.......,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0x40, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .@,..gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, // _3_.......G..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, // am........U..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x49, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......I8..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, // am...........par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, // am...........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0xc2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xb3, 0x15, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x94, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, // _3_..G.......... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xf1, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, // .@...G.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // .....H...g...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, // .#.......H...g.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .g...........H.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .g.......#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...g.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x67, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H...g...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H...g...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, // .#...`...H...g.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .g...........H.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .g.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...g.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x67, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H...g...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H...g...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, // .#.......H...g.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .g...........H.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .g.......#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...g.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x67, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H...g...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H...g...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, // .#...`...H...g.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .g...........H.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .g.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...g.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x67, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H...g...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H...g...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, // .#.......H...g.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .g...........H.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .g.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...g.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H...g...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x67, 0x04, 0x00, // .#... ...H...g.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#...0...G.. + 0x00, 0x67, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, // .g.......G...B.. + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, // .".......G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb3, 0x15, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xe1, 0x0d, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, // .!.............. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ..... ... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x07, 0x00, 0x3a, 0x04, 0x00, // .........!...:.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .........e...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .....+.......j.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x94, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, // . ...........e.. + 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, // .j...+.......".. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xf1, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x22, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, 0x67, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, // .".......g...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .....e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x94, 0x02, 0x00, // .e...e...e...... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf1, 0x04, 0x00, // .e...e.......... + 0x00, 0x20, 0x00, 0x04, 0x00, 0xe4, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x04, 0x00, // . ...........g.. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe4, 0x06, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, // .;.......B...... + 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ......... ...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, // .+......./...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // . .............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, // .+.............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, // .+.............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // . .............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xc2, 0x11, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xb3, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, // .........Sa..;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // ......G......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // ......U......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x49, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .....I8......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x39, 0x00, 0x08, // .............9.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0xbe, 0x2c, 0x00, 0x00, 0xf4, 0x0c, 0x00, 0x00, 0xc9, 0x47, 0x00, // ......,.......G. + 0x00, 0x85, 0x55, 0x00, 0x00, 0x49, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, // ..U..I8......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xaa, 0x43, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......C...G..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x79, 0x39, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....y9...U..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xed, 0x2c, 0x00, 0x00, 0x49, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......,..I8..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, // .....@,......>.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xaa, 0x43, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc2, 0x11, 0x00, // ......C..>...... + 0x00, 0x79, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb3, 0x15, 0x00, 0x00, 0xed, 0x2c, 0x00, // .y9..>........,. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0xfd, 0x00, 0x01, // .>.......@,..... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, // .8...6.......5.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, // .........7...... + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .............=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....dW......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......N......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....I9......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, // ......9......P.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xa9, 0x4e, 0x00, // ......*..dW...N. + 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xb0, 0x2a, 0x00, // .I9...9.......*. + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xf4, 0x0c, 0x00, // .8...6.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x04, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // .....:...7...... + 0x00, 0x8f, 0x22, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xf3, 0x54, 0x00, // .."..7........T. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x4e, 0x4a, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......NJ..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xd8, 0x4e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x45, 0x58, 0x00, // ......N......EX. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x83, 0x46, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........F..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x83, 0x46, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....F......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x83, 0x46, 0x00, // .........5....F. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x29, 0x5b, 0x00, 0x00, 0x42, 0x13, 0x00, // .A.......)[..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0x96, 0x21, 0x00, 0x00, 0x29, 0x5b, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8f, 0x22, 0x00, // ..!..)[..>....". + 0x00, 0x96, 0x21, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x46, 0x00, // ..!..A........F. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x89, 0x46, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......V...F..>.. + 0x00, 0xf3, 0x54, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, // ..T...V..A...... + 0x00, 0x8a, 0x46, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x11, 0x0a, 0x00, // ..F..B.../...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x56, 0x00, 0x00, 0x8a, 0x46, 0x00, // .=........V...F. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x4e, 0x4a, 0x00, 0x00, 0x01, 0x56, 0x00, 0x00, 0x41, 0x00, 0x06, // .>...NJ...V..A.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x8b, 0x46, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ......F..B.../.. + 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x75, 0x19, 0x00, // .....=.......u.. + 0x00, 0x8b, 0x46, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd8, 0x4e, 0x00, 0x00, 0x75, 0x19, 0x00, // ..F..>....N..u.. + 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .....8.... +}; +static const uint8_t fs_clear3_dx9[234] = +{ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x04, // clear_color..... - 0x00, 0xd0, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x25, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........%.CTAB. - 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............ - 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0.... - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b - 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color. - 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x01, // 0.10011.16384... - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ - 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, // ................ - 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, // ................ - 0xff, 0x00, 0x00, 0x00, // .... + 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, // ...........".CTA + 0x42, 0x1c, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, // B....[.......... + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .........T...0.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... + 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo + 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, // 0.1............. + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, // ................ + 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... }; -static const uint8_t fs_clear3_dx11[555] = +static const uint8_t fs_clear3_dx11[557] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color..... - 0x00, 0x04, 0x02, 0x44, 0x58, 0x42, 0x43, 0xd5, 0x4f, 0xed, 0x6d, 0x3f, 0x90, 0xd6, 0xbb, 0x53, // ...DXBC.O.m?...S - 0x7b, 0xdc, 0x55, 0x0b, 0xda, 0x6f, 0x86, 0x01, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x04, // {.U..o.......... - 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x54, 0x01, 0x00, 0x00, 0x88, // ...0.......T.... - 0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x68, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, // ...Aon9h...h.... - 0x02, 0xff, 0xff, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, // ...8...0.....$.. - 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .0...0...$...0.. - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0x01, // ................ - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ - 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, // ................ - 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, // ................ - 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0xac, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x2b, // ...SHDR....@...+ - 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ...Y...F. ...... - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e.... - 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, // ......e.... ... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6.... - 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ......F. ...... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6.... - 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ......F. ...... - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ...>...ISGN,.... - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ....... ........ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S - 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x74, // V_POSITION.OSGNt - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, // ...........h.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...h............ - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x02, // ...........h.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...h............ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA - 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x00, 0x00, 0x80, 0x00, // RGET....... + 0x00, 0x04, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xd5, 0x4f, 0xed, 0x6d, 0x3f, 0x90, 0xd6, // .....DXBC.O.m?.. + 0xbb, 0x53, 0x7b, 0xdc, 0x55, 0x0b, 0xda, 0x6f, 0x86, 0x01, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, // .S{.U..o........ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x54, 0x01, 0x00, // .....0.......T.. + 0x00, 0x88, 0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x68, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, // .....Aon9h...h.. + 0x00, 0x00, 0x02, 0xff, 0xff, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, // .....8...0.....$ + 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, // ...0...0...$...0 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, // ................ + 0xff, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, // ................ + 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, // ................ + 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0xac, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, // .....SHDR....@.. + 0x00, 0x2b, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .+...Y...F. .... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....e.... ..... + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.... ......e.. + 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .. ......e.... . + 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....6.... ..... + 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .F. .........6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, // .....6.... ..... + 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .F. .........6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, // .....>...ISGN,.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ + 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, // .SV_POSITION.OSG + 0x4e, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, // Nt...........h.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....h.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, // .............h.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....h.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, // .............SV_ + 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x00, 0x00, 0x80, 0x00, // TARGET....... }; -static const uint8_t fs_clear3_mtl[711] = +static const uint8_t fs_clear3_mtl[734] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...........us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM - 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra - 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color( - 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c - 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo - 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_ - 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];. - 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // float4 gl_Frag - 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, // Data_3 [[color(3 - 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, // )]];.};.struct x - 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, // latMtlShaderUnif - 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, // orm {. float4 b + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... + 0x00, 0xb8, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, // .....using names + 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // pace metal;.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // Input {.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, // gl_FragData_0 [ + 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, // [color(0)]];. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // loat4 gl_FragDat + 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, // a_1 [[color(1)]] + 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. float4 gl_Fr + 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // agData_2 [[color + 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // (2)]];. float4 + 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, // gl_FragData_3 [[ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, // color(3)]];.};.s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // truct xlatMtlSha + 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, // derUniform {. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, // loat4 bgfx_clear + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, // _color[8];.};.fr + 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // agment xlatMtlSh + 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // aderOutput xlatM + 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // tlMain (xlatMtlS + 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // haderInput _mtl_ + 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, // i [[stage_in]], + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // constant xlatMtl + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, // ShaderUniform& _ + 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, // mtl_u [[buffer(0 + 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // )]]).{. xlatMtl + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, // ShaderOutput _mt + 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, // l_o;. _mtl_o.gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, // _FragData_0 = _m + 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // tl_u.bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // color[0];. _mtl + 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, // _o.gl_FragData_1 + 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, // = _mtl_u.bgfx_c + 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, // lear_color[1];. + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // _mtl_o.gl_FragD + 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, // ata_2 = _mtl_u.b 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, // gfx_clear_color[ - 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, // 8];.};.fragment - 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut - 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain - 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, // (xlatMtlShaderIn - 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // put _mtl_i [[sta - 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan - 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, // t xlatMtlShaderU - 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, // niform& _mtl_u [ - 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, // [buffer(0)]]).{. - 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // xlatMtlShaderO - 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, // utput _mtl_o;. - 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa - 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, // ta_0 = _mtl_u.bg - 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, // fx_clear_color[0 - 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // ];. _mtl_o.gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ragData_1 = _mtl - 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // _u.bgfx_clear_co - 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // lor[1];. _mtl_o - 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, // .gl_FragData_2 = - 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // _mtl_u.bgfx_cle - 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // ar_color[2];. _ - 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // mtl_o.gl_FragDat - 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, // a_3 = _mtl_u.bgf - 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, // x_clear_color[3] - 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // ;. return _mtl_ - 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // o;.}... + 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, // 2];. _mtl_o.gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, // FragData_3 = _mt + 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c + 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, // olor[3];. retur + 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // n _mtl_o;.}... }; extern const uint8_t* fs_clear3_pssl; extern const uint32_t fs_clear3_pssl_size; diff --git a/3rdparty/bgfx/src/fs_clear3.sc b/3rdparty/bgfx/src/fs_clear3.sc index 96b8293..3dd4acc 100644 --- a/3rdparty/bgfx/src/fs_clear3.sc +++ b/3rdparty/bgfx/src/fs_clear3.sc @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/fs_clear4.bin.h b/3rdparty/bgfx/src/fs_clear4.bin.h index 8d91172..0fb82b4 100644 --- a/3rdparty/bgfx/src/fs_clear4.bin.h +++ b/3rdparty/bgfx/src/fs_clear4.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_clear4_glsl[290] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... 0x00, 0xfc, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .....uniform vec 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col @@ -20,113 +20,316 @@ static const uint8_t fs_clear4_glsl[290] = 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, // ear_color[4];.}. 0x0a, 0x00, // .. }; -static const uint8_t fs_clear4_dx9[244] = +static const uint8_t fs_clear4_spv[3198] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x05, 0x00, 0x00, 0x05, // clear_color..... + 0x00, 0x58, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, // .X.....#........ + 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, // .Ta............. + 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, // .........GLSL.st + 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // d.450........... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xc2, 0x11, 0x00, // .main........... + 0x00, 0xb3, 0x15, 0x00, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0xd2, 0x11, 0x00, 0x00, 0x10, 0x00, 0x03, // ................ + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, // n........5...vec + 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, // 4_splat(f1;..... + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, 0x66, 0x11, 0x00, // ....._x......f.. + 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, // .@main(vf4;vf4;v + 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x06, // f4;vf4;vf4;..... + 0x00, 0xbb, 0x60, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..`..gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x8b, 0x2b, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _0_.......+..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_1_..... + 0x00, 0xc3, 0x44, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..D..gl_FragData + 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x16, 0x53, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _2_.......S..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_3_..... + 0x00, 0xa0, 0x57, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..W..gl_FragData + 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, // _4_..........bgf + 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // x_VoidFrag...... + 0x00, 0x4b, 0x4f, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .KO..param...... + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, // ./...$Global.... + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, // ./.......u_viewR + 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, // ect....../...... + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, // .u_viewTexel.... + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, // ./.......u_view. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // ...../.......u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, // nvView......./.. + 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_proj..... + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, // ./.......u_invPr + 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, // oj......./...... + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, // .u_viewProj..... + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // ./.......u_invVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, // ewProj......./.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....u_model.... + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // ./.......u_model + 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, // View...../...... + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // .u_modelViewProj + 0x00, 0x06, 0x00, 0x06, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, // ...../.......u_a + 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0x2f, 0x09, 0x00, // lphaRef4...../.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // .....bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // color........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xaa, 0x43, 0x00, 0x00, 0x67, 0x6c, 0x5f, // ..........C..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0x79, 0x39, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .y9..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xda, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_.......,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0xed, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..,..gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _3_......@,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, // FragData_4_..... + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..G..param...... + 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..U..param...... + 0x00, 0x6f, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .o8..param...... + 0x00, 0x49, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .I8..param...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, // .....param...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _0_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_1_..... + 0x00, 0xb3, 0x15, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _2_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_3_..... + 0x00, 0xd2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xf1, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, // _4_..G.......... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x06, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, // .@...G.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, // .....H.../...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, // .#.......H.../.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // ./...........H.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ./.......#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.../.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.../...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.../...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, // .#...`...H.../.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // ./...........H.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // ./.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.../.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.../...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.../...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, // .#.......H.../.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // ./...........H.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // ./.......#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.../.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.../...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.../...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, // .#...`...H.../.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // ./...........H.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // ./.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.../.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.../...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.../...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, // .#.......H.../.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // ./...........H.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // ./.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.../.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H.../...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x2f, 0x09, 0x00, // .#... ...H.../.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#...0...G.. + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, // ./.......G...B.. + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, // .".......G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb3, 0x15, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xe1, 0x0d, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, // .!.............. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ..... ... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x08, 0x00, 0x75, 0x0a, 0x00, // .........!...u.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, // .............e.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // . .......+...... + 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xf1, 0x02, 0x00, // .j... .......... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // .e...j...+...... + 0x00, 0x22, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x06, 0x05, 0x00, // .".............. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, 0x2f, 0x09, 0x00, // ....."......./.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .........e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0xf1, 0x02, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .....e...e...... + 0x00, 0x06, 0x05, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xac, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... .......... + 0x00, 0x2f, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xac, 0x0b, 0x00, 0x00, 0x42, 0x13, 0x00, // ./...;.......B.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, // .....+......./.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... .......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, // .....+.......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, // .....+.......... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, 0x0a, 0x00, // .....+.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x17, 0x0a, 0x00, // .....+.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ..... .......... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, // .....;.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xc2, 0x11, 0x00, // .....;.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xb3, 0x15, 0x00, // .....;.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xe1, 0x0d, 0x00, // .....;.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd2, 0x11, 0x00, // .....;.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // .....6.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, // .............Sa. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........G..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........U..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x6f, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......o8..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x49, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......I8..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.............. + 0x00, 0x39, 0x00, 0x09, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbe, 0x2c, 0x00, 0x00, 0x66, 0x11, 0x00, // .9........,..f.. + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x6f, 0x38, 0x00, 0x00, 0x49, 0x38, 0x00, // ..G...U..o8..I8. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xaa, 0x43, 0x00, // .....=........C. + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x79, 0x39, 0x00, // ..G..=.......y9. + 0x00, 0x85, 0x55, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xda, 0x2c, 0x00, // ..U..=........,. + 0x00, 0x6f, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xed, 0x2c, 0x00, // .o8..=........,. + 0x00, 0x49, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, // .I8..=.......@,. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xaa, 0x43, 0x00, // .....>........C. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc2, 0x11, 0x00, 0x00, 0x79, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x03, // .>.......y9..>.. + 0x00, 0xb3, 0x15, 0x00, 0x00, 0xda, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe1, 0x0d, 0x00, // ......,..>...... + 0x00, 0xed, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd2, 0x11, 0x00, 0x00, 0x40, 0x2c, 0x00, // ..,..>.......@,. + 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .....8...6...... + 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .5...........7.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, // ................ + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=.......dW..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........N..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=.......I9..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........9..... + 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, // .P........*..dW. + 0x00, 0xa9, 0x4e, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, // ..N..I9...9..... + 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // ..*..8...6...... + 0x00, 0x66, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x0a, 0x00, 0x00, 0x37, 0x00, 0x03, // .f.......u...7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbb, 0x60, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // ......`..7...... + 0x00, 0x8b, 0x2b, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc3, 0x44, 0x00, // ..+..7........D. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x16, 0x53, 0x00, 0x00, 0x37, 0x00, 0x03, // .7........S..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa0, 0x57, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x0d, 0x61, 0x00, // ......W.......a. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x4b, 0x4f, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......KO..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x4b, 0x4f, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...KO......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x4b, 0x4f, 0x00, // .........5...KO. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x72, 0x19, 0x00, 0x00, 0x42, 0x13, 0x00, // .A.......r...B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0xa4, 0x5b, 0x00, 0x00, 0x72, 0x19, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbb, 0x60, 0x00, // ..[..r...>....`. + 0x00, 0xa4, 0x5b, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x18, 0x36, 0x00, // ..[..A........6. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xc8, 0x5e, 0x00, 0x00, 0x18, 0x36, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......^...6..>.. + 0x00, 0x8b, 0x2b, 0x00, 0x00, 0xc8, 0x5e, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, // ..+...^..A...... + 0x00, 0x19, 0x36, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x11, 0x0a, 0x00, // ..6..B.../...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xc9, 0x5e, 0x00, 0x00, 0x19, 0x36, 0x00, // .=........^...6. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc3, 0x44, 0x00, 0x00, 0xc9, 0x5e, 0x00, 0x00, 0x41, 0x00, 0x06, // .>....D...^..A.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x1a, 0x36, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ......6..B.../.. + 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xca, 0x5e, 0x00, // .....=........^. + 0x00, 0x1a, 0x36, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x16, 0x53, 0x00, 0x00, 0xca, 0x5e, 0x00, // ..6..>....S...^. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x1b, 0x36, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........6..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x17, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0x3d, 0x22, 0x00, 0x00, 0x1b, 0x36, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa0, 0x57, 0x00, // .="...6..>....W. + 0x00, 0x3d, 0x22, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .="......8.... +}; +static const uint8_t fs_clear4_dx9[234] = +{ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x04, // clear_color..... - 0x00, 0xd0, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x25, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........%.CTAB. - 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............ - 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0.... - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b - 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color. - 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x01, // 0.10011.16384... - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ - 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, // ................ - 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, // ................ - 0xff, 0x00, 0x00, 0x00, // .... + 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, // ...........".CTA + 0x42, 0x1c, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, // B....[.......... + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .........T...0.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... + 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo + 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, // 0.1............. + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, // ................ + 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... }; -static const uint8_t fs_clear4_dx11[499] = +static const uint8_t fs_clear4_dx11[501] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color..... - 0x00, 0xcc, 0x01, 0x44, 0x58, 0x42, 0x43, 0x0e, 0x7a, 0x23, 0x41, 0x2a, 0x54, 0xbd, 0xa3, 0x8b, // ...DXBC.z#A*T... - 0x1e, 0xbd, 0x2e, 0x91, 0x6f, 0x8b, 0x29, 0x01, 0x00, 0x00, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x03, // ....o.)......... - 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x49, // ...,...`.......I - 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI - 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x8c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, // ON.OSGN......... - 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA - 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xd0, 0x00, 0x00, 0x00, 0x40, // RGET...SHDR....@ - 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...4...Y...F. .. - 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e.... - 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x04, // ......e.... ... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6.... - 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ......F. ...... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6.... - 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ......F. ...... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, // . .........>.... - 0x00, 0x80, 0x00, // ... + 0x00, 0xcc, 0x01, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x0e, 0x7a, 0x23, 0x41, 0x2a, 0x54, 0xbd, // .....DXBC.z#A*T. + 0xa3, 0x8b, 0x1e, 0xbd, 0x2e, 0x91, 0x6f, 0x8b, 0x29, 0x01, 0x00, 0x00, 0x00, 0xcc, 0x01, 0x00, // ......o.)....... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, // .....,...`...... + 0x00, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .ISGN,.......... + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // . .............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, // .........SV_POSI + 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x8c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, // TION.OSGN....... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, // .............SV_ + 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xd0, 0x00, 0x00, // TARGET...SHDR... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, // .@...4...Y...F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .........e.... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, // .....e.... ..... + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.... ......e.. + 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .. ......e.... . + 0x00, 0x04, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // .....6.... ..... + 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .F. .........6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, // .....6.... ..... + 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .F. .........6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, // .....6.... ..... + 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, // .F. .........>.. + 0x01, 0x00, 0x00, 0x80, 0x00, // ..... }; -static const uint8_t fs_clear4_mtl[801] = +static const uint8_t fs_clear4_mtl[824] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... + 0x00, 0x12, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, // .....using names + 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // pace metal;.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // Input {.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, // gl_FragData_0 [ + 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, // [color(0)]];. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // loat4 gl_FragDat + 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, // a_1 [[color(1)]] + 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. float4 gl_Fr + 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // agData_2 [[color + 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // (2)]];. float4 + 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, // gl_FragData_3 [[ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // color(3)]];. fl + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // oat4 gl_FragData + 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, // _4 [[color(4)]]; 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM - 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra - 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color( - 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c - 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo - 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_ - 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];. - 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // float4 gl_Frag - 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, // Data_3 [[color(3 - 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, // )]];. float4 gl - 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, // _FragData_4 [[co - 0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, // lor(4)]];.};.str - 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // uct xlatMtlShade - 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // rUniform {. flo - 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // at4 bgfx_clear_c - 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, // olor[8];.};.frag - 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ment xlatMtlShad - 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // erOutput xlatMtl - 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // Main (xlatMtlSha - 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, // derInput _mtl_i - 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, // [[stage_in]], co - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // nstant xlatMtlSh - 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, // aderUniform& _mt - 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, // l_u [[buffer(0)] - 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // ]).{. xlatMtlSh - 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // aderOutput _mtl_ - 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // o;. _mtl_o.gl_F - 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ragData_0 = _mtl - 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // _u.bgfx_clear_co - 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // lor[0];. _mtl_o - 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, // .gl_FragData_1 = - 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // _mtl_u.bgfx_cle - 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // ar_color[1];. _ - 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // mtl_o.gl_FragDat - 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, // a_2 = _mtl_u.bgf - 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, // x_clear_color[2] - 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr - 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // agData_3 = _mtl_ - 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // u.bgfx_clear_col - 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // or[3];. _mtl_o. - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, // gl_FragData_4 = - 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // _mtl_u.bgfx_clea - 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, // r_color[4];. re - 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, // turn _mtl_o;.}.. - 0x00, // . + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // tlShaderUniform + 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, // {. float4 bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, // clear_color[8];. + 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // };.fragment xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, // xlatMtlMain (xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, // tMtlShaderInput + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, // _mtl_i [[stage_i + 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, // n]], constant xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo + 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, // rm& _mtl_u [[buf + 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, // fer(0)]]).{. xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu + 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // t _mtl_o;. _mtl + 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, // _o.gl_FragData_0 + 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, // = _mtl_u.bgfx_c + 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, // lear_color[0];. + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // _mtl_o.gl_FragD + 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, // ata_1 = _mtl_u.b + 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, // gfx_clear_color[ + 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, // 1];. _mtl_o.gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, // FragData_2 = _mt + 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c + 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // olor[2];. _mtl_ + 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, // o.gl_FragData_3 + 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // = _mtl_u.bgfx_cl + 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[3];. + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa + 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, // ta_4 = _mtl_u.bg + 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, // fx_clear_color[4 + 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ];. return _mtl + 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _o;.}... }; extern const uint8_t* fs_clear4_pssl; extern const uint32_t fs_clear4_pssl_size; diff --git a/3rdparty/bgfx/src/fs_clear4.sc b/3rdparty/bgfx/src/fs_clear4.sc index 6e62276..7390a02 100644 --- a/3rdparty/bgfx/src/fs_clear4.sc +++ b/3rdparty/bgfx/src/fs_clear4.sc @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/fs_clear5.bin.h b/3rdparty/bgfx/src/fs_clear5.bin.h index 455fa0b..3765521 100644 --- a/3rdparty/bgfx/src/fs_clear5.bin.h +++ b/3rdparty/bgfx/src/fs_clear5.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_clear5_glsl[330] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... 0x00, 0x24, 0x01, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .$...uniform vec 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col @@ -22,121 +22,343 @@ static const uint8_t fs_clear5_glsl[330] = 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // bgfx_clear_colo 0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r[5];.}... }; -static const uint8_t fs_clear5_dx9[244] = +static const uint8_t fs_clear5_spv[3458] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x06, 0x00, 0x00, 0x06, // clear_color..... + 0x00, 0x5c, 0x0d, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, // .......#........ + 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, // .Ta............. + 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, // .........GLSL.st + 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // d.450........... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xc2, 0x11, 0x00, // .main........... + 0x00, 0xb3, 0x15, 0x00, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0xd2, 0x11, 0x00, 0x00, 0xc3, 0x15, 0x00, // ................ + 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, // ................ + 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, // .main........5.. + 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, // .vec4_splat(f1;. + 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x0a, // ........._x..... + 0x00, 0x44, 0x12, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, // .D...@main(vf4;v + 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, // f4;vf4;vf4;vf4;v + 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x68, 0x54, 0x00, 0x00, 0x67, 0x6c, 0x5f, // f4;......hT..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0xa2, 0x4c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..L..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x52, 0x34, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_......R4..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0x53, 0x34, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .S4..gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa5, 0x42, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _3_.......B..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_4_..... + 0x00, 0x2f, 0x47, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ./G..gl_FragData + 0x5f, 0x35, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, // _5_..........bgf + 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // x_VoidFrag...... + 0x00, 0x13, 0x58, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..X..param...... + 0x00, 0x34, 0x02, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, // .4...$Global.... + 0x00, 0x34, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, // .4.......u_viewR + 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x34, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, // ect......4...... + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, // .u_viewTexel.... + 0x00, 0x34, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, // .4.......u_view. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x34, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .....4.......u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, // nvView.......4.. + 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_proj..... + 0x00, 0x34, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, // .4.......u_invPr + 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x34, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, // oj.......4...... + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, // .u_viewProj..... + 0x00, 0x34, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // .4.......u_invVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, // ewProj.......4.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....u_model.... + 0x00, 0x34, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .4.......u_model + 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x34, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, // View.....4...... + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // .u_modelViewProj + 0x00, 0x06, 0x00, 0x06, 0x00, 0x34, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, // .....4.......u_a + 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0x34, 0x02, 0x00, // lphaRef4.....4.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // .....bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // color........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xaa, 0x43, 0x00, 0x00, 0x67, 0x6c, 0x5f, // ..........C..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0x79, 0x39, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .y9..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xda, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_.......,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0xdb, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..,..gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xed, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _3_.......,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_4_..... + 0x00, 0x40, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .@,..gl_FragData + 0x5f, 0x35, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, // _5_.......G..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, // am........U..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x6f, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......o8..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x70, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......p8..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x49, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......I8..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, // am...........par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, // am...........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0xc2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xb3, 0x15, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _3_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_4_..... + 0x00, 0xc3, 0x15, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x35, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, // _5_..G...N...... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x1b, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, // .@...G.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // .....H...4...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, // .#.......H...4.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .4...........H.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .4.......#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...4.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x34, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H...4...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H...4...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, // .#...`...H...4.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .4...........H.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .4.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...4.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x34, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H...4...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H...4...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, // .#.......H...4.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .4...........H.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .4.......#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...4.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x34, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H...4...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H...4...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, // .#...`...H...4.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .4...........H.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .4.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...4.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x34, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H...4...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H...4...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, // .#.......H...4.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .4...........H.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .4.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...4.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H...4...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x34, 0x02, 0x00, // .#... ...H...4.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#...0...G.. + 0x00, 0x34, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, // .4.......G...B.. + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, // .".......G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb3, 0x15, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xe1, 0x0d, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc3, 0x15, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, // .!.............. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ..... ... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x09, 0x00, 0x7f, 0x07, 0x00, // .........!...... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, // ................ + 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // .e.............. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // .....j... ...... + 0x00, 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, // .N...e...j...+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // .....".......... + 0x00, 0x1b, 0x05, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, // ........."...... + 0x00, 0x34, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .4...........e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x4e, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...N...e...e.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x05, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb1, 0x04, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x34, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb1, 0x04, 0x00, // .....4...;...... + 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .B.............. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // . .......+...... + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // ./.......+...... + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x14, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x17, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x1a, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // ......... ...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xc2, 0x11, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xb3, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xd2, 0x11, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xc3, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // .........6...... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, // ................ + 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, // .Sa..;........G. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, // .....;........U. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x6f, 0x38, 0x00, // .....;.......o8. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x70, 0x38, 0x00, // .....;.......p8. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x49, 0x38, 0x00, // .....;.......I8. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, // .....;.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x39, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbe, 0x2c, 0x00, // .....9........,. + 0x00, 0x44, 0x12, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x6f, 0x38, 0x00, // .D....G...U..o8. + 0x00, 0x70, 0x38, 0x00, 0x00, 0x49, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, // .p8..I8......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xaa, 0x43, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......C...G..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x79, 0x39, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....y9...U..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xda, 0x2c, 0x00, 0x00, 0x6f, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......,..o8..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdb, 0x2c, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......,..p8..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xed, 0x2c, 0x00, 0x00, 0x49, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......,..I8..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, // .....@,......>.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xaa, 0x43, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc2, 0x11, 0x00, // ......C..>...... + 0x00, 0x79, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb3, 0x15, 0x00, 0x00, 0xda, 0x2c, 0x00, // .y9..>........,. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0xdb, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, // .>........,..>.. + 0x00, 0xd2, 0x11, 0x00, 0x00, 0xed, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc3, 0x15, 0x00, // ......,..>...... + 0x00, 0x40, 0x2c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .@,......8...6.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, // .....5.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.............. + 0x00, 0x88, 0x2e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, // .....=.......dW. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, // .....=........N. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, // .....=.......I9. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, // .....=........9. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, // .....P........*. + 0x00, 0x64, 0x57, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, // .dW...N..I9...9. + 0x00, 0xfe, 0x00, 0x02, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // ......*..8...6.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x07, 0x00, // .....D.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x68, 0x54, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......hT..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa2, 0x4c, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // ......L..7...... + 0x00, 0x52, 0x34, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x53, 0x34, 0x00, // .R4..7.......S4. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa5, 0x42, 0x00, 0x00, 0x37, 0x00, 0x03, // .7........B..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2f, 0x47, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x56, 0x1f, 0x00, // ...../G......V.. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x13, 0x58, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........X..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x13, 0x58, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....X......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x13, 0x58, 0x00, // .........5....X. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x3a, 0x22, 0x00, 0x00, 0x42, 0x13, 0x00, // .A.......:"..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0xed, 0x19, 0x00, 0x00, 0x3a, 0x22, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x68, 0x54, 0x00, // .....:"..>...hT. + 0x00, 0xed, 0x19, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xe0, 0x3e, 0x00, // .....A........>. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x11, 0x1d, 0x00, 0x00, 0xe0, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x03, // ..........>..>.. + 0x00, 0xa2, 0x4c, 0x00, 0x00, 0x11, 0x1d, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, // ..L......A...... + 0x00, 0xe1, 0x3e, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x11, 0x0a, 0x00, // ..>..B.../...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x12, 0x1d, 0x00, 0x00, 0xe1, 0x3e, 0x00, // .=............>. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x52, 0x34, 0x00, 0x00, 0x12, 0x1d, 0x00, 0x00, 0x41, 0x00, 0x06, // .>...R4......A.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0xe2, 0x3e, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ......>..B.../.. + 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x1d, 0x00, // .....=.......... + 0x00, 0xe2, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x53, 0x34, 0x00, 0x00, 0x13, 0x1d, 0x00, // ..>..>...S4..... + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xe3, 0x3e, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........>..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x17, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0x14, 0x1d, 0x00, 0x00, 0xe3, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa5, 0x42, 0x00, // ......>..>....B. + 0x00, 0x14, 0x1d, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xe4, 0x3e, 0x00, // .....A........>. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x1a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x05, 0x2b, 0x00, 0x00, 0xe4, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......+...>..>.. + 0x00, 0x2f, 0x47, 0x00, 0x00, 0x05, 0x2b, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, // ./G...+......8.. + 0x00, 0x00, // .. +}; +static const uint8_t fs_clear5_dx9[234] = +{ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x04, // clear_color..... - 0x00, 0xd0, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x25, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........%.CTAB. - 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............ - 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0.... - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b - 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color. - 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x01, // 0.10011.16384... - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ - 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, // ................ - 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, // ................ - 0xff, 0x00, 0x00, 0x00, // .... + 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, // ...........".CTA + 0x42, 0x1c, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, // B....[.......... + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .........T...0.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... + 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo + 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, // 0.1............. + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, // ................ + 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... }; -static const uint8_t fs_clear5_dx11[559] = +static const uint8_t fs_clear5_dx11[561] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color..... - 0x00, 0x08, 0x02, 0x44, 0x58, 0x42, 0x43, 0x60, 0x35, 0x1a, 0x9f, 0xa4, 0xdc, 0x6a, 0x17, 0x97, // ...DXBC`5....j.. - 0x20, 0xbd, 0x81, 0xee, 0x84, 0xd9, 0xac, 0x01, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x03, // ............... - 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x49, // ...,...`.......I - 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI - 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0xa4, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, // ON.OSGN......... - 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x01, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x05, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S - 0x48, 0x44, 0x52, 0xf4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x59, // HDR....@...=...Y - 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x65, // ...F. .........e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e.... - 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, // ......e.... ... - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e.... - 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, // ......6.... ... - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, // ...F. .........6 - 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. .. - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, // .......6.... ... - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, // ...F. .........6 - 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. .. - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x04, // .......6.... ... - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x36, // ...F. .........6 - 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. .. - 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // .......>....... + 0x00, 0x08, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x60, 0x35, 0x1a, 0x9f, 0xa4, 0xdc, 0x6a, // .....DXBC`5....j + 0x17, 0x97, 0x20, 0xbd, 0x81, 0xee, 0x84, 0xd9, 0xac, 0x01, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, // .. ............. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, // .....,...`...... + 0x00, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .ISGN,.......... + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // . .............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, // .........SV_POSI + 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0xa4, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, // TION.OSGN....... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, // ................ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, // ................ + 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, // .....SV_TARGET.. + 0xab, 0x53, 0x48, 0x44, 0x52, 0xf4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, // .SHDR....@...=.. + 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, // .Y...F. ........ + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.... ......e.. + 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .. ......e.... . + 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, // .....e.... ..... + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.... ......e.. + 0x03, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, // .. ......6.... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....F. ........ + 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .6.... ......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, // .........6.... . + 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // .....F. ........ + 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .6.... ......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, // .........6.... . + 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .....F. ........ + 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .6.... ......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, // .........>...... + 0x00, // . }; -static const uint8_t fs_clear5_mtl[891] = +static const uint8_t fs_clear5_mtl[914] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH.......l...us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM - 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput { + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... + 0x00, 0x6c, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, // .l...using names + 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // pace metal;.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // Input {.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, // gl_FragData_0 [ + 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, // [color(0)]];. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // loat4 gl_FragDat + 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, // a_1 [[color(1)]] + 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. float4 gl_Fr + 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // agData_2 [[color + 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // (2)]];. float4 + 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, // gl_FragData_3 [[ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // color(3)]];. fl + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // oat4 gl_FragData + 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, // _4 [[color(4)]]; 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra - 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color( - 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c - 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo - 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_ - 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];. - 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // float4 gl_Frag - 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, // Data_3 [[color(3 - 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, // )]];. float4 gl - 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, // _FragData_4 [[co - 0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // lor(4)]];. floa - 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, // t4 gl_FragData_5 - 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, // [[color(5)]];.} - 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // ;.struct xlatMtl - 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, // ShaderUniform {. - 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // float4 bgfx_cl - 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, // ear_color[8];.}; - 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // .fragment xlatMt - 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, // lShaderOutput xl - 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, // atMtlMain (xlatM - 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, // tlShaderInput _m - 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, // tl_i [[stage_in] - 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // ], constant xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // MtlShaderUniform - 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, // & _mtl_u [[buffe - 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, // r(0)]]).{. xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput - 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // _mtl_o;. _mtl_o - 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, // .gl_FragData_0 = + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_5 [[color( + 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, // 5)]];.};.struct + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, // xlatMtlShaderUni + 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // form {. float4 + 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color + 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, // [8];.};.fragment + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, // xlatMtlShaderOu + 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, // tput xlatMtlMain + 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, // (xlatMtlShaderI + 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, // nput _mtl_i [[st + 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, // age_in]], consta + 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // nt xlatMtlShader + 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, // Uniform& _mtl_u + 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, // [[buffer(0)]]).{ + 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // . xlatMtlShader + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, // Output _mtl_o;. + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // _mtl_o.gl_FragD + 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, // ata_0 = _mtl_u.b + 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, // gfx_clear_color[ + 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, // 0];. _mtl_o.gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, // FragData_1 = _mt + 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c + 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // olor[1];. _mtl_ + 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, // o.gl_FragData_2 + 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // = _mtl_u.bgfx_cl + 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[2];. + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa + 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, // ta_3 = _mtl_u.bg + 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, // fx_clear_color[3 + 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // ];. _mtl_o.gl_F + 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ragData_4 = _mtl + 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // _u.bgfx_clear_co + 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // lor[4];. _mtl_o + 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x3d, // .gl_FragData_5 = 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // _mtl_u.bgfx_cle - 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // ar_color[0];. _ - 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // mtl_o.gl_FragDat - 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, // a_1 = _mtl_u.bgf - 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, // x_clear_color[1] - 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr - 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // agData_2 = _mtl_ - 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // u.bgfx_clear_col - 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // or[2];. _mtl_o. - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, // gl_FragData_3 = - 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // _mtl_u.bgfx_clea - 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, // r_color[3];. _m - 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // tl_o.gl_FragData - 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // _4 = _mtl_u.bgfx - 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, // _clear_color[4]; - 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . _mtl_o.gl_Fra - 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // gData_5 = _mtl_u - 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo - 0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, // r[5];. return _ - 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mtl_o;.}... + 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, // ar_color[5];. r + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, // eturn _mtl_o;.}. + 0x0a, 0x00, // .. }; extern const uint8_t* fs_clear5_pssl; extern const uint32_t fs_clear5_pssl_size; diff --git a/3rdparty/bgfx/src/fs_clear5.sc b/3rdparty/bgfx/src/fs_clear5.sc index b2157bf..0deb9ff 100644 --- a/3rdparty/bgfx/src/fs_clear5.sc +++ b/3rdparty/bgfx/src/fs_clear5.sc @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/fs_clear6.bin.h b/3rdparty/bgfx/src/fs_clear6.bin.h index dd84536..50f560b 100644 --- a/3rdparty/bgfx/src/fs_clear6.bin.h +++ b/3rdparty/bgfx/src/fs_clear6.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_clear6_glsl[370] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... 0x00, 0x4c, 0x01, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .L...uniform vec 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col @@ -25,131 +25,367 @@ static const uint8_t fs_clear6_glsl[370] = 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x36, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, // ear_color[6];.}. 0x0a, 0x00, // .. }; -static const uint8_t fs_clear6_dx9[244] = +static const uint8_t fs_clear6_spv[3718] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x07, 0x00, 0x00, 0x07, // clear_color..... + 0x00, 0x60, 0x0e, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, // .`.....#........ + 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, // .Ta............. + 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, // .........GLSL.st + 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // d.450........... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0c, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xc2, 0x11, 0x00, // .main........... + 0x00, 0xb3, 0x15, 0x00, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0xd2, 0x11, 0x00, 0x00, 0xc3, 0x15, 0x00, // ................ + 0x00, 0xf1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, // ................ + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, // .....main....... + 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, // .5...vec4_splat( + 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, // f1;.........._x. + 0x00, 0x05, 0x00, 0x0b, 0x00, 0x97, 0x0f, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, // .........@main(v + 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, // f4;vf4;vf4;vf4;v + 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x06, // f4;vf4;vf4;..... + 0x00, 0x15, 0x48, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..H..gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x3a, 0x23, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _0_......:#..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_1_..... + 0x00, 0x1a, 0x3d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..=..gl_FragData + 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x1b, 0x3d, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _2_.......=..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_3_..... + 0x00, 0x1c, 0x3d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..=..gl_FragData + 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x6d, 0x4b, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _4_......mK..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_5_..... + 0x00, 0xf7, 0x4f, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..O..gl_FragData + 0x5f, 0x36, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, // _6_..........bgf + 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // x_VoidFrag...... + 0x00, 0xa2, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..G..param...... + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....$Global.... + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, // .........u_viewR + 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, // ect............. + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, // .u_viewTexel.... + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, // .........u_view. + 0x00, 0x06, 0x00, 0x06, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, // nvView.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_proj..... + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, // .........u_invPr + 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, // oj.............. + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, // .u_viewProj..... + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // .........u_invVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, // ewProj.......... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....u_model.... + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, // View............ + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // .u_modelViewProj + 0x00, 0x06, 0x00, 0x06, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, // .............u_a + 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0xfc, 0x06, 0x00, // lphaRef4........ + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // .....bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // color........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xaa, 0x43, 0x00, 0x00, 0x67, 0x6c, 0x5f, // ..........C..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0x79, 0x39, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .y9..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xda, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_.......,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0xdb, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..,..gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xdc, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _3_.......,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_4_..... + 0x00, 0xed, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..,..gl_FragData + 0x5f, 0x35, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _5_......@,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, // FragData_6_..... + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..G..param...... + 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..U..param...... + 0x00, 0x6f, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .o8..param...... + 0x00, 0x70, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .p8..param...... + 0x00, 0x71, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .q8..param...... + 0x00, 0x49, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .I8..param...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, // .....param...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _0_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_1_..... + 0x00, 0xb3, 0x15, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _2_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_3_..... + 0x00, 0xd2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xc3, 0x15, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _4_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_5_..... + 0x00, 0xf1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x36, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, // _6_..G.......... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x30, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, // .@...G...0...... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, // .#.......H...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, // .#...`...H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, // .#.......H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, // .#...`...H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, // .#.......H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xfc, 0x06, 0x00, // .#... ...H...... + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#...0...G.. + 0x00, 0xfc, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, // .........G...B.. + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, // .".......G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb3, 0x15, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xe1, 0x0d, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc3, 0x15, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xf1, 0x0d, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, // .!.............. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ..... ... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x0a, 0x00, 0x1b, 0x07, 0x00, // .........!...... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // .+.............. + 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .....e.......... + 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, // .+.......j... .. + 0x00, 0x1c, 0x00, 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .........e...j.. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, // .+......."...... + 0x00, 0x1c, 0x00, 0x04, 0x00, 0x30, 0x05, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, // .....0.......".. + 0x00, 0x1e, 0x00, 0x0f, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xab, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e.......e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x30, 0x05, 0x00, 0x00, 0x20, 0x00, 0x04, // .e.......0... .. + 0x00, 0x79, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xfc, 0x06, 0x00, 0x00, 0x3b, 0x00, 0x04, // .y...........;.. + 0x00, 0x79, 0x09, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // .y...B.......... + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ...../.......+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x17, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1a, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xc2, 0x11, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xb3, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd2, 0x11, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xc3, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xf1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, // .............6.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // .....Sa..;...... + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ..G......;...... + 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ..U......;...... + 0x00, 0x6f, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // .o8......;...... + 0x00, 0x70, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // .p8......;...... + 0x00, 0x71, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // .q8......;...... + 0x00, 0x49, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // .I8......;...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x39, 0x00, 0x0b, 0x00, 0x08, 0x00, 0x00, // .........9...... + 0x00, 0xbe, 0x2c, 0x00, 0x00, 0x97, 0x0f, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x85, 0x55, 0x00, // ..,.......G...U. + 0x00, 0x6f, 0x38, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0x71, 0x38, 0x00, 0x00, 0x49, 0x38, 0x00, // .o8..p8..q8..I8. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xaa, 0x43, 0x00, // .....=........C. + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x79, 0x39, 0x00, // ..G..=.......y9. + 0x00, 0x85, 0x55, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xda, 0x2c, 0x00, // ..U..=........,. + 0x00, 0x6f, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdb, 0x2c, 0x00, // .o8..=........,. + 0x00, 0x70, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdc, 0x2c, 0x00, // .p8..=........,. + 0x00, 0x71, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xed, 0x2c, 0x00, // .q8..=........,. + 0x00, 0x49, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, // .I8..=.......@,. + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xaa, 0x43, 0x00, // .....>........C. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc2, 0x11, 0x00, 0x00, 0x79, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x03, // .>.......y9..>.. + 0x00, 0xb3, 0x15, 0x00, 0x00, 0xda, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe1, 0x0d, 0x00, // ......,..>...... + 0x00, 0xdb, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd2, 0x11, 0x00, 0x00, 0xdc, 0x2c, 0x00, // ..,..>........,. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc3, 0x15, 0x00, 0x00, 0xed, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, // .>........,..>.. + 0x00, 0xf1, 0x0d, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, // .....@,......8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......5...... + 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .....7.......... + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........=...... + 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .dW......=...... + 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ..N......=...... + 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .I9......=...... + 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // ..9......P...... + 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0x49, 0x39, 0x00, // ..*..dW...N..I9. + 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x38, 0x00, 0x01, // ..9.......*..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x97, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x1b, 0x07, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x15, 0x48, 0x00, // .....7........H. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x3a, 0x23, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......:#..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x1a, 0x3d, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // ......=..7...... + 0x00, 0x1b, 0x3d, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x1c, 0x3d, 0x00, // ..=..7........=. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x6d, 0x4b, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......mK..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xf7, 0x4f, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x64, 0x59, 0x00, // ......O......dY. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xa2, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........G..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xa2, 0x47, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....G......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xa2, 0x47, 0x00, // .........5....G. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x48, 0x5c, 0x00, 0x00, 0x42, 0x13, 0x00, // .A.......H...B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0xfb, 0x53, 0x00, 0x00, 0x48, 0x5c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x15, 0x48, 0x00, // ..S..H...>....H. + 0x00, 0xfb, 0x53, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xa8, 0x47, 0x00, // ..S..A........G. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x57, 0x00, 0x00, 0xa8, 0x47, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......W...G..>.. + 0x00, 0x3a, 0x23, 0x00, 0x00, 0x1f, 0x57, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, // .:#...W..A...... + 0x00, 0xa9, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x11, 0x0a, 0x00, // ..G..B.../...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x57, 0x00, 0x00, 0xa9, 0x47, 0x00, // .=....... W...G. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x1a, 0x3d, 0x00, 0x00, 0x20, 0x57, 0x00, 0x00, 0x41, 0x00, 0x06, // .>....=.. W..A.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0xaa, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ......G..B.../.. + 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x57, 0x00, // .....=.......!W. + 0x00, 0xaa, 0x47, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x1b, 0x3d, 0x00, 0x00, 0x21, 0x57, 0x00, // ..G..>....=..!W. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xab, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........G..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x17, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0x22, 0x57, 0x00, 0x00, 0xab, 0x47, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x1c, 0x3d, 0x00, // ."W...G..>....=. + 0x00, 0x22, 0x57, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xac, 0x47, 0x00, // ."W..A........G. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x1a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x23, 0x57, 0x00, 0x00, 0xac, 0x47, 0x00, 0x00, 0x3e, 0x00, 0x03, // .....#W...G..>.. + 0x00, 0x6d, 0x4b, 0x00, 0x00, 0x23, 0x57, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, // .mK..#W..A...... + 0x00, 0xad, 0x47, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x1d, 0x0a, 0x00, // ..G..B.../...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x94, 0x1a, 0x00, 0x00, 0xad, 0x47, 0x00, // .=............G. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xf7, 0x4f, 0x00, 0x00, 0x94, 0x1a, 0x00, 0x00, 0xfd, 0x00, 0x01, // .>....O......... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .8.... +}; +static const uint8_t fs_clear6_dx9[234] = +{ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x04, // clear_color..... - 0x00, 0xd0, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x25, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........%.CTAB. - 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............ - 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0.... - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b - 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color. - 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x01, // 0.10011.16384... - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ - 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, // ................ - 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, // ................ - 0xff, 0x00, 0x00, 0x00, // .... + 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, // ...........".CTA + 0x42, 0x1c, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, // B....[.......... + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .........T...0.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... + 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo + 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, // 0.1............. + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, // ................ + 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... }; -static const uint8_t fs_clear6_dx11[619] = +static const uint8_t fs_clear6_dx11[621] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color..... - 0x00, 0x44, 0x02, 0x44, 0x58, 0x42, 0x43, 0x68, 0xe2, 0x88, 0x87, 0x2b, 0x8c, 0x92, 0xbc, 0x98, // .D.DXBCh...+.... - 0x11, 0xb6, 0x94, 0x5c, 0x76, 0x9a, 0x47, 0x01, 0x00, 0x00, 0x00, 0x44, 0x02, 0x00, 0x00, 0x03, // ....v.G....D.... - 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x24, 0x01, 0x00, 0x00, 0x49, // ...,...`...$...I - 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI - 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0xbc, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, // ON.OSGN......... - 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x01, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x05, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA - 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x18, 0x01, 0x00, 0x00, 0x40, // RGET...SHDR....@ - 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...F...Y...F. .. - 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ... - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e.... - 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x04, // ......e.... ... - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // .... ......6.... - 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F. ...... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6.... - 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // ......F. ...... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6.... - 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ......F. ...... - 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F - 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6.... - 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, // ......F. ...... - 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // ...>....... + 0x00, 0x44, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x68, 0xe2, 0x88, 0x87, 0x2b, 0x8c, 0x92, // .D...DXBCh...+.. + 0xbc, 0x98, 0x11, 0xb6, 0x94, 0x5c, 0x76, 0x9a, 0x47, 0x01, 0x00, 0x00, 0x00, 0x44, 0x02, 0x00, // ......v.G....D.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x24, 0x01, 0x00, // .....,...`...$.. + 0x00, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .ISGN,.......... + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // . .............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, // .........SV_POSI + 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0xbc, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // TION.OSGN....... + 0x00, 0x08, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, // ................ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, // ................ + 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, // .............SV_ + 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x18, 0x01, 0x00, // TARGET...SHDR... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, // .@...F...Y...F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .........e.... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, // .....e.... ..... + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.... ......e.. + 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .. ......e.... . + 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, // .....e.... ..... + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .e.... ......6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, // .....6.... ..... + 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .F. .........6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, // .....6.... ..... + 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .F. .........6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, // .....6.... ..... + 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .F. .........6.. + 0x06, 0xf2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .. ......F. .... + 0x00, 0x06, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // .....>....... }; -static const uint8_t fs_clear6_mtl[981] = +static const uint8_t fs_clear6_mtl[1004] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM - 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput { + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... + 0x00, 0xc6, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, // .....using names + 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // pace metal;.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // Input {.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, // gl_FragData_0 [ + 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, // [color(0)]];. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // loat4 gl_FragDat + 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, // a_1 [[color(1)]] + 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. float4 gl_Fr + 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // agData_2 [[color + 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // (2)]];. float4 + 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, // gl_FragData_3 [[ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // color(3)]];. fl + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // oat4 gl_FragData + 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, // _4 [[color(4)]]; 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra - 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color( - 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c - 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo - 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_ - 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];. - 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // float4 gl_Frag - 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, // Data_3 [[color(3 - 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, // )]];. float4 gl - 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, // _FragData_4 [[co - 0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // lor(4)]];. floa - 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, // t4 gl_FragData_5 - 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, // [[color(5)]];. - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // float4 gl_FragD - 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x36, 0x29, // ata_6 [[color(6) - 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, // ]];.};.struct xl - 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo - 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, // rm {. float4 bg - 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, // fx_clear_color[8 - 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, // ];.};.fragment x - 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, // latMtlShaderOutp - 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, // ut xlatMtlMain ( - 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, // xlatMtlShaderInp - 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, // ut _mtl_i [[stag - 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, // e_in]], constant - 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, // xlatMtlShaderUn - 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, // iform& _mtl_u [[ - 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, // buffer(0)]]).{. - 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, // xlatMtlShaderOu - 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // tput _mtl_o;. _ + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_5 [[color( + 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 5)]];. float4 g + 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_6 [[c + 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x36, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, // olor(6)]];.};.st + 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ruct xlatMtlShad + 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // erUniform {. fl + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // oat4 bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, // color[8];.};.fra + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // gment xlatMtlSha + 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // derOutput xlatMt + 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // lMain (xlatMtlSh + 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // aderInput _mtl_i + 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, // [[stage_in]], c + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // onstant xlatMtlS + 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, // haderUniform& _m + 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, // tl_u [[buffer(0) + 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // ]]).{. xlatMtlS + 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // haderOutput _mtl + 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, // _o;. _mtl_o.gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, // FragData_0 = _mt + 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c + 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // olor[0];. _mtl_ + 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, // o.gl_FragData_1 + 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // = _mtl_u.bgfx_cl + 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[1];. + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa + 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, // ta_2 = _mtl_u.bg + 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, // fx_clear_color[2 + 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // ];. _mtl_o.gl_F + 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ragData_3 = _mtl + 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // _u.bgfx_clear_co + 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // lor[3];. _mtl_o + 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, // .gl_FragData_4 = + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // _mtl_u.bgfx_cle + 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // ar_color[4];. _ 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // mtl_o.gl_FragDat - 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, // a_0 = _mtl_u.bgf - 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, // x_clear_color[0] + 0x61, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, // a_5 = _mtl_u.bgf + 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x35, 0x5d, // x_clear_color[5] 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr - 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // agData_1 = _mtl_ + 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // agData_6 = _mtl_ 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // u.bgfx_clear_col - 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // or[1];. _mtl_o. - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, // gl_FragData_2 = - 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // _mtl_u.bgfx_clea - 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, // r_color[2];. _m - 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // tl_o.gl_FragData - 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // _3 = _mtl_u.bgfx - 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x3b, // _clear_color[3]; - 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . _mtl_o.gl_Fra - 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // gData_4 = _mtl_u - 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo - 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // r[4];. _mtl_o.g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x5f, // l_FragData_5 = _ - 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, // mtl_u.bgfx_clear - 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, // _color[5];. _mt - 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // l_o.gl_FragData_ - 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, // 6 = _mtl_u.bgfx_ - 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x36, 0x5d, 0x3b, 0x0a, // clear_color[6];. - 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // return _mtl_o; - 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... + 0x6f, 0x72, 0x5b, 0x36, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, // or[6];. return + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _mtl_o;.}... }; extern const uint8_t* fs_clear6_pssl; extern const uint32_t fs_clear6_pssl_size; diff --git a/3rdparty/bgfx/src/fs_clear6.sc b/3rdparty/bgfx/src/fs_clear6.sc index 32bcb0c..971f5b4 100644 --- a/3rdparty/bgfx/src/fs_clear6.sc +++ b/3rdparty/bgfx/src/fs_clear6.sc @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/fs_clear7.bin.h b/3rdparty/bgfx/src/fs_clear7.bin.h index caf3798..c43bccd 100644 --- a/3rdparty/bgfx/src/fs_clear7.bin.h +++ b/3rdparty/bgfx/src/fs_clear7.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_clear7_glsl[410] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... 0x00, 0x74, 0x01, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .t...uniform vec 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col @@ -27,140 +27,393 @@ static const uint8_t fs_clear7_glsl[410] = 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // bgfx_clear_colo 0x72, 0x5b, 0x37, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r[7];.}... }; -static const uint8_t fs_clear7_dx9[244] = +static const uint8_t fs_clear7_spv[3978] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ - 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x04, // clear_color..... - 0x00, 0xd0, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x25, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........%.CTAB. - 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............ - 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0.... - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b - 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color. - 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros - 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. - 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x01, // 0.10011.16384... - 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................ - 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, // ................ - 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, // ................ - 0xff, 0x00, 0x00, 0x00, // .... -}; -static const uint8_t fs_clear7_dx11[679] = -{ - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color..... - 0x00, 0x80, 0x02, 0x44, 0x58, 0x42, 0x43, 0xe7, 0x1e, 0xec, 0x06, 0x0c, 0xd8, 0x43, 0x65, 0x9a, // ...DXBC......Ce. - 0x6f, 0x6f, 0xc7, 0x6f, 0x21, 0xde, 0xa4, 0x01, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, // oo.o!........... - 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x49, // ...,...`...<...I - 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,........... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI - 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0xd4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, // ON.OSGN......... - 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x01, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x05, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x07, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0f, // ................ - 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S - 0x48, 0x44, 0x52, 0x3c, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x59, // HDR<...@...O...Y - 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x65, // ...F. .........e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e.... - 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, // ......e.... ... - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e - 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e.... - 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x06, // ......e.... ... - 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x36, // ...e.... ......6 - 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. .. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, // .......6.... ... - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, // ...F. .........6 - 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. .. - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, // .......6.... ... - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, // ...F. .........6 - 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. .. - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x05, // .......6.... ... - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x36, // ...F. .........6 - 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. .. - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x07, // .......6.... ... - 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, // ...F. .........> - 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // ....... + 0x00, 0x64, 0x0f, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, // .d.....#........ + 0x00, 0x2d, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, // .-b............. + 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, // .........GLSL.st + 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // d.450........... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0d, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xc2, 0x11, 0x00, // .main........... + 0x00, 0xb3, 0x15, 0x00, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0xd2, 0x11, 0x00, 0x00, 0xc3, 0x15, 0x00, // ................ + 0x00, 0xf1, 0x0d, 0x00, 0x00, 0xe2, 0x11, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, // ................ + 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, // ................ + 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, // .....5...vec4_sp + 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, // lat(f1;......... + 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x0c, 0x00, 0xd9, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, // ._x..........@ma + 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, // in(vf4;vf4;vf4;v + 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, // f4;vf4;vf4;vf4;v + 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xfb, 0x54, 0x00, 0x00, 0x67, 0x6c, 0x5f, // f4;.......T..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0x51, 0x44, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .QD..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xe2, 0x45, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_.......E..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0xe3, 0x45, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..E..gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xe4, 0x45, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _3_.......E..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_4_..... + 0x00, 0xe5, 0x45, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..E..gl_FragData + 0x5f, 0x35, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x54, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _5_......5T..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_6_..... + 0x00, 0xbf, 0x58, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..X..gl_FragData + 0x5f, 0x37, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, // _7_..........bgf + 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // x_VoidFrag...... + 0x00, 0x6a, 0x50, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .jP..param...... + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....$Global.... + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, // .........u_viewR + 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x01, 0x00, 0x00, // ect............. + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, // .u_viewTexel.... + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, // .........u_view. + 0x00, 0x06, 0x00, 0x06, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, // nvView.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_proj..... + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, // .........u_invPr + 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, // oj.............. + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, // .u_viewProj..... + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // .........u_invVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, // ewProj.......... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, // .....u_model.... + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, // View............ + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // .u_modelViewProj + 0x00, 0x06, 0x00, 0x06, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, // .............u_a + 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x08, 0x00, 0xc4, 0x0b, 0x00, // lphaRef4........ + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // .....bgfx_clear_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // color........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xaa, 0x43, 0x00, 0x00, 0x67, 0x6c, 0x5f, // ..........C..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0x79, 0x39, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .y9..gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xda, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_.......,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0xdb, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..,..gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xdc, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _3_.......,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_4_..... + 0x00, 0xdd, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..,..gl_FragData + 0x5f, 0x35, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xed, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _5_.......,..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_6_..... + 0x00, 0x40, 0x2c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .@,..gl_FragData + 0x5f, 0x37, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, // _7_.......G..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, // am........U..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x6f, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......o8..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x70, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......p8..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x71, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......q8..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x72, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......r8..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x49, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......I8..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, // am...........par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, // am...........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_0_..... + 0x00, 0xc2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x31, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xb3, 0x15, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _1_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_2_..... + 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x33, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _3_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_4_..... + 0x00, 0xc3, 0x15, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x35, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xf1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, // _5_..........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x06, // FragData_6_..... + 0x00, 0xe2, 0x11, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x37, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x08, 0x04, 0x00, 0x00, 0x06, 0x00, 0x00, // _7_..G.......... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x45, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, // .@...G...E...... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, // .#.......H...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, // .#...`...H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, // .#.......H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, // .#...`...H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, // .#.......H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc4, 0x0b, 0x00, // .#... ...H...... + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#...0...G.. + 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, // .........G...B.. + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, // .".......G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb3, 0x15, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xe1, 0x0d, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc3, 0x15, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xf1, 0x0d, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xe2, 0x11, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, // .!.............. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ..... ... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x0b, 0x00, 0x49, 0x09, 0x00, // .........!...I.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .........e...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .....+.......j.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x08, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, // . ...........e.. + 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x22, 0x0a, 0x00, // .j...+.......".. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x45, 0x05, 0x00, 0x00, 0x1d, 0x00, 0x00, // .........E...... + 0x00, 0x22, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, 0xc4, 0x0b, 0x00, 0x00, 0x1d, 0x00, 0x00, // .".............. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .....e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, // .e...e...e...... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x45, 0x05, 0x00, // .e...e.......E.. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x7e, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xc4, 0x0b, 0x00, // . ...~.......... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x7e, 0x02, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, // .;...~...B...... + 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ......... ...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, // .+......./...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // . .............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, // .+.............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, // .+.............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, // .+.............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x17, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, // .+.............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1a, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, // .+.............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x1d, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, // .+.............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, // .+....... ...... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // . .............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xc2, 0x11, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xb3, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd2, 0x11, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xc3, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xf1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xe2, 0x11, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, // .........Sa..;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // ......G......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // ......U......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x6f, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .....o8......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .....p8......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x71, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .....q8......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x72, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .....r8......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x49, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .....I8......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x39, 0x00, 0x0c, // .............9.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0xbe, 0x2c, 0x00, 0x00, 0xd9, 0x0d, 0x00, 0x00, 0xc9, 0x47, 0x00, // ......,.......G. + 0x00, 0x85, 0x55, 0x00, 0x00, 0x6f, 0x38, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0x71, 0x38, 0x00, // ..U..o8..p8..q8. + 0x00, 0x72, 0x38, 0x00, 0x00, 0x49, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, // .r8..I8......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xaa, 0x43, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......C...G..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x79, 0x39, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....y9...U..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xda, 0x2c, 0x00, 0x00, 0x6f, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......,..o8..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdb, 0x2c, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......,..p8..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdc, 0x2c, 0x00, 0x00, 0x71, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......,..q8..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdd, 0x2c, 0x00, 0x00, 0x72, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......,..r8..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xed, 0x2c, 0x00, 0x00, 0x49, 0x38, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......,..I8..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, // .....@,......>.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xaa, 0x43, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc2, 0x11, 0x00, // ......C..>...... + 0x00, 0x79, 0x39, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb3, 0x15, 0x00, 0x00, 0xda, 0x2c, 0x00, // .y9..>........,. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe1, 0x0d, 0x00, 0x00, 0xdb, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, // .>........,..>.. + 0x00, 0xd2, 0x11, 0x00, 0x00, 0xdc, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc3, 0x15, 0x00, // ......,..>...... + 0x00, 0xdd, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xf1, 0x0d, 0x00, 0x00, 0xed, 0x2c, 0x00, // ..,..>........,. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe2, 0x11, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0xfd, 0x00, 0x01, // .>.......@,..... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, // .8...6.......5.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, // .........7...... + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x88, 0x2e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .............=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....dW......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa9, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......N......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x49, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....I9......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, // ......9......P.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb0, 0x2a, 0x00, 0x00, 0x64, 0x57, 0x00, 0x00, 0xa9, 0x4e, 0x00, // ......*..dW...N. + 0x00, 0x49, 0x39, 0x00, 0x00, 0x5c, 0x39, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xb0, 0x2a, 0x00, // .I9...9.......*. + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xd9, 0x0d, 0x00, // .8...6.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x09, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // .....I...7...... + 0x00, 0xfb, 0x54, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x51, 0x44, 0x00, // ..T..7.......QD. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xe2, 0x45, 0x00, 0x00, 0x37, 0x00, 0x03, // .7........E..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xe3, 0x45, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // ......E..7...... + 0x00, 0xe4, 0x45, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xe5, 0x45, 0x00, // ..E..7........E. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x35, 0x54, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......5T..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbf, 0x58, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x2c, 0x62, 0x00, // ......X......,b. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x6a, 0x50, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......jP..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x6a, 0x50, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...jP......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x6a, 0x50, 0x00, // .........5...jP. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x91, 0x1a, 0x00, 0x00, 0x42, 0x13, 0x00, // .A...........B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0xc3, 0x5c, 0x00, 0x00, 0x91, 0x1a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xfb, 0x54, 0x00, // .........>....T. + 0x00, 0xc3, 0x5c, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x37, 0x37, 0x00, // .....A.......77. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe7, 0x5f, 0x00, 0x00, 0x37, 0x37, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......_..77..>.. + 0x00, 0x51, 0x44, 0x00, 0x00, 0xe7, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, // .QD..._..A...... + 0x00, 0x38, 0x37, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x11, 0x0a, 0x00, // .87..B.../...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe8, 0x5f, 0x00, 0x00, 0x38, 0x37, 0x00, // .=........_..87. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe2, 0x45, 0x00, 0x00, 0xe8, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x06, // .>....E..._..A.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x39, 0x37, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // .....97..B.../.. + 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe9, 0x5f, 0x00, // .....=........_. + 0x00, 0x39, 0x37, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe3, 0x45, 0x00, 0x00, 0xe9, 0x5f, 0x00, // .97..>....E..._. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x3a, 0x37, 0x00, 0x00, 0x42, 0x13, 0x00, // .A.......:7..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x17, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ./.......=...... + 0x00, 0xea, 0x5f, 0x00, 0x00, 0x3a, 0x37, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xe4, 0x45, 0x00, // .._..:7..>....E. + 0x00, 0xea, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x3b, 0x37, 0x00, // .._..A.......;7. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x1a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xeb, 0x5f, 0x00, 0x00, 0x3b, 0x37, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......_..;7..>.. + 0x00, 0xe5, 0x45, 0x00, 0x00, 0xeb, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x9b, 0x02, 0x00, // ..E..._..A...... + 0x00, 0x3c, 0x37, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x1d, 0x0a, 0x00, // .<7..B.../...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xec, 0x5f, 0x00, 0x00, 0x3c, 0x37, 0x00, // .=........_..<7. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x35, 0x54, 0x00, 0x00, 0xec, 0x5f, 0x00, 0x00, 0x41, 0x00, 0x06, // .>...5T..._..A.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x3d, 0x37, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // .....=7..B.../.. + 0x00, 0x20, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x5c, 0x23, 0x00, // . ...=........#. + 0x00, 0x3d, 0x37, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbf, 0x58, 0x00, 0x00, 0x5c, 0x23, 0x00, // .=7..>....X...#. + 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .....8.... }; -static const uint8_t fs_clear7_mtl[1071] = +static const uint8_t fs_clear7_dx9[234] = { - 0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x75, 0x73, // FSH....... ...us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM - 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra - 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color( - 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c - 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo - 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_ - 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];. - 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // float4 gl_Frag - 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, // Data_3 [[color(3 - 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, // )]];. float4 gl - 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, // _FragData_4 [[co - 0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // lor(4)]];. floa - 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, // t4 gl_FragData_5 - 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, // [[color(5)]];. - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // float4 gl_FragD - 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x36, 0x29, // ata_6 [[color(6) - 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, // ]];. float4 gl_ - 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x37, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_7 [[col - 0x6f, 0x72, 0x28, 0x37, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // or(7)]];.};.stru + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x04, // clear_color..... + 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, // ...........".CTA + 0x42, 0x1c, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, // B....[.......... + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .........T...0.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........D...... + 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo + 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, // r............... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr + 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x31, 0x00, 0xab, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, // 0.1............. + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, // ................ + 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... +}; +static const uint8_t fs_clear7_dx11[681] = +{ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color..... + 0x00, 0x80, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xe7, 0x1e, 0xec, 0x06, 0x0c, 0xd8, 0x43, // .....DXBC......C + 0x65, 0x9a, 0x6f, 0x6f, 0xc7, 0x6f, 0x21, 0xde, 0xa4, 0x01, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, // e.oo.o!......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x3c, 0x01, 0x00, // .....,...`...<.. + 0x00, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .ISGN,.......... + 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // . .............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, // .........SV_POSI + 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0xd4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // TION.OSGN....... + 0x00, 0x08, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, // ................ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, // ................ + 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, // ................ + 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // ................ + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, // .....SV_TARGET.. + 0xab, 0x53, 0x48, 0x44, 0x52, 0x3c, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, // .SHDR<...@...O.. + 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .Y...F. ........ + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.... ......e.. + 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .. ......e.... . + 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, // .....e.... ..... + 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.... ......e.. + 0x03, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, // .. ......e.... . + 0x00, 0x06, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x07, 0x00, 0x00, // .....e.... ..... + 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .6.... ......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, // .........6.... . + 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .....F. ........ + 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .6.... ......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, // .........6.... . + 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .....F. ........ + 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .6.... ......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, // .........6.... . + 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, // .....F. ........ + 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .6.... ......F. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, // .........6.... . + 0x00, 0x07, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .....F. ........ + 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // .>....... +}; +static const uint8_t fs_clear7_mtl[1094] = +{ + 0x46, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_ + 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x02, 0x08, 0x00, 0x00, 0x08, // clear_color..... + 0x00, 0x20, 0x04, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, // . ...using names + 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // pace metal;.stru 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader - 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // Uniform {. floa - 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // t4 bgfx_clear_co - 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, // lor[8];.};.fragm - 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // ent xlatMtlShade - 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // rOutput xlatMtlM - 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ain (xlatMtlShad - 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, // erInput _mtl_i [ - 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, // [stage_in]], con - 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // stant xlatMtlSha - 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // derUniform& _mtl - 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, // _u [[buffer(0)]] - 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // ).{. xlatMtlSha - 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // derOutput _mtl_o + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // Input {.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, // gl_FragData_0 [ + 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, // [color(0)]];. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // loat4 gl_FragDat + 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, // a_1 [[color(1)]] + 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. float4 gl_Fr + 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // agData_2 [[color + 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // (2)]];. float4 + 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, // gl_FragData_3 [[ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // color(3)]];. fl + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // oat4 gl_FragData + 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, // _4 [[color(4)]]; + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra + 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_5 [[color( + 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 5)]];. float4 g + 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_6 [[c + 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x36, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(6)]];. flo + 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_ + 0x37, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x37, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 7 [[color(7)]];. + 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // };.struct xlatMt + 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, // lShaderUniform { + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, // . float4 bgfx_c + 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, // lear_color[8];.} + 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // ;.fragment xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, // tlShaderOutput x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, // latMtlMain (xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, // MtlShaderInput _ + 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, // mtl_i [[stage_in + 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, // ]], constant xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, // tMtlShaderUnifor + 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, // m& _mtl_u [[buff + 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, // er(0)]]).{. xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // _mtl_o;. _mtl_ + 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, // o.gl_FragData_0 + 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // = _mtl_u.bgfx_cl + 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[0];. + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa + 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, // ta_1 = _mtl_u.bg + 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, // fx_clear_color[1 + 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // ];. _mtl_o.gl_F + 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ragData_2 = _mtl + 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // _u.bgfx_clear_co + 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // lor[2];. _mtl_o + 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, // .gl_FragData_3 = + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // _mtl_u.bgfx_cle + 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // ar_color[3];. _ + 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // mtl_o.gl_FragDat + 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, // a_4 = _mtl_u.bgf + 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, // x_clear_color[4] 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr - 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // agData_0 = _mtl_ + 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // agData_5 = _mtl_ 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // u.bgfx_clear_col - 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // or[0];. _mtl_o. - 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, // gl_FragData_1 = + 0x6f, 0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // or[5];. _mtl_o. + 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x3d, 0x20, // gl_FragData_6 = 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // _mtl_u.bgfx_clea - 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, // r_color[1];. _m + 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x36, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, // r_color[6];. _m 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // tl_o.gl_FragData - 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // _2 = _mtl_u.bgfx - 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, // _clear_color[2]; - 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . _mtl_o.gl_Fra - 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // gData_3 = _mtl_u - 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo - 0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // r[3];. _mtl_o.g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x5f, // l_FragData_4 = _ - 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, // mtl_u.bgfx_clear - 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, // _color[4];. _mt - 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // l_o.gl_FragData_ - 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, // 5 = _mtl_u.bgfx_ - 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, // clear_color[5];. - 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // _mtl_o.gl_Frag - 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // Data_6 = _mtl_u. - 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color - 0x5b, 0x36, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, // [6];. _mtl_o.gl - 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x6d, // _FragData_7 = _m - 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // tl_u.bgfx_clear_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x37, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // color[7];. retu - 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // rn _mtl_o;.}... + 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // _7 = _mtl_u.bgfx + 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x37, 0x5d, 0x3b, // _clear_color[7]; + 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // . return _mtl_o + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // ;.}... }; extern const uint8_t* fs_clear7_pssl; extern const uint32_t fs_clear7_pssl_size; diff --git a/3rdparty/bgfx/src/fs_clear7.sc b/3rdparty/bgfx/src/fs_clear7.sc index 78ee8d0..946eb2f 100644 --- a/3rdparty/bgfx/src/fs_clear7.sc +++ b/3rdparty/bgfx/src/fs_clear7.sc @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/fs_debugfont.bin.h b/3rdparty/bgfx/src/fs_debugfont.bin.h index eaca9aa..553bc8f 100644 --- a/3rdparty/bgfx/src/fs_debugfont.bin.h +++ b/3rdparty/bgfx/src/fs_debugfont.bin.h @@ -1,6 +1,6 @@ static const uint8_t fs_debugfont_glsl[354] = { - 0x46, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH..."f...s_tex + 0x46, 0x53, 0x48, 0x05, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH..."f...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x42, 0x01, 0x00, 0x00, 0x76, // Color......B...v 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, // arying highp vec 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, // 4 v_color0;.vary @@ -24,88 +24,353 @@ static const uint8_t fs_debugfont_glsl[354] = 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, // r = tmpvar_1;.}. 0x0a, 0x00, // .. }; -static const uint8_t fs_debugfont_dx9[374] = +static const uint8_t fs_debugfont_spv[4195] = { - 0x46, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH..."f...s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x58, 0x01, 0x00, 0x03, 0xff, // Color0.....X.... - 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. - 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ - 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo - 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. - 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x81, 0x80, 0x80, 0xbb, 0x00, 0x00, 0x00, // .Q.............. - 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, // ................ - 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x01, 0x80, 0x01, 0x00, 0x0f, // ................ - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // .........B...... - 0x80, 0x02, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, // ................ - 0x80, 0x01, 0x00, 0xe4, 0x90, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // ................ - 0x81, 0x00, 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, // .........X...... - 0x80, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x41, 0x00, 0x00, // .......U.....A.. - 0x01, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... + 0x46, 0x53, 0x48, 0x05, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0x54, 0x10, 0x00, 0x00, 0x03, 0x02, // FSH..."f..T..... + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x4a, 0x62, 0x00, 0x00, 0x00, 0x00, // #.........Jb.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x78, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, // ..w...x...t..... + 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0e, 0x00, 0x99, 0x0f, // ..main.......... + 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x28, // ..bgfxTexture2D( + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, // struct-BgfxSampl + 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, // er2D-p1-t211;vf2 + 0x3b, 0x00, 0x05, 0x00, 0x05, 0x00, 0xe2, 0x2e, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, // ;.........m_samp + 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x6d, 0x5f, // ler......./B..m_ + 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, // texture......... + 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xd2, 0x0c, // .._coord........ + 0x00, 0x00, 0x6d, 0x69, 0x78, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, // ..mix(vf4;vf4;vf + 0x34, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, // 4;............_a + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, // .........._b.... + 0x03, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x5f, 0x74, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, // ......_t......5. + 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, // ..vec4_splat(f1; + 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, // .........._x.... + 0x08, 0x00, 0xdd, 0x13, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, // ......@main(vf4; + 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, // vf4;vf2;vf4;.... + 0x05, 0x00, 0x62, 0x25, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // ..b%..v_color0.. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x22, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ......'"..v_colo + 0x72, 0x31, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x51, 0x00, 0x00, 0x76, 0x5f, // r1.........Q..v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x92, 0x55, // texcoord0......U + 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, // ..gl_FragData_0_ + 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, // ......a...BgfxSa + 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, // mpler2D.......a. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, // ......m_sampler. + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, // ......a.......m_ + 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, // texture......... + 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, // ..flattenTemp... + 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ......s_texColor + 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, // Sampler......... + 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, // ..s_texColorText + 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x67, 0x12, 0x00, 0x00, 0x6d, 0x5f, // ure.......g...m_ + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa3, 0x14, // sampler......... + 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, // ..m_texture..... + 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, // ......bgfx_VoidF + 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x6a, 0x4f, 0x00, 0x00, 0x70, 0x61, // rag.......jO..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, // ram...........co + 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x8b, 0x2b, 0x00, 0x00, 0x70, 0x61, // lor........+..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x8c, 0x2b, 0x00, 0x00, 0x70, 0x61, // ram........+..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc4, 0x2b, 0x00, 0x00, 0x70, 0x61, // ram........+..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x5e, 0x29, 0x00, 0x00, 0x70, 0x61, // ram.......^)..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xe1, 0x2b, 0x00, 0x00, 0x76, 0x5f, // ram........+..v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, // color0........w. + 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, // ..v_color0...... + 0x05, 0x00, 0xb0, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x00, 0x00, // ...<..v_color1.. + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x78, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ......x...v_colo + 0x72, 0x31, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x76, 0x5f, // r1........@,..v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, // texcoord0.....t. + 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, // ..v_texcoord0... + 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // ......gl_FragDat + 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, // a_0_.......G..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, // ram........U..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, // ram........8..pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, // ram...........pa + 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, // ram...........gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, // _FragData_0_.... + 0x04, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, // ......$Global... + 0x06, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x01, 0x00, // Rect............ + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, // ..u_viewTexel... + 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xa0, 0x06, // invView......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ......u_proj.... + 0x06, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, // ..........u_invP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x06, 0x00, // roj............. + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ..u_viewProj.... + 0x07, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xa0, 0x06, // iewProj......... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, // ......u_model... + 0x06, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode + 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x0a, 0x00, // lView........... + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ..u_modelViewPro + 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, // j.............u_ + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, // alphaRef4.G..... + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, // ..".......G..... + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, // ..!.......G..... + 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, // ..".......G..... + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, // ..!.......G...w. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x78, 0x0e, // ..........G...x. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, // ..........G...t. + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, // ..........G..... + 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x71, 0x01, // ..........G...q. + 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, // ......@...H..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, // .. ...H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa0, 0x06, // ..........H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, // ..........H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#...`...H. + 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x04, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa0, 0x06, // ..........H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, // ..........H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x06, 0x00, // .. ...H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa0, 0x06, // ..........H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, // ..........H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, // ......#...`...H. + 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x08, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa0, 0x06, // ..........H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, // ..........H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, // ................ + 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, // ..H............. + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, // ..H...........#. + 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x0a, 0x00, // ......H......... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa0, 0x06, // ..........H..... + 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, // ......#... ...G. + 0x03, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, // ................ + 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, // ..!............. + 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, // ...... ...y..... + 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, // .............. . + 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, // ...... ......... + 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x0a, 0x08, 0x00, 0x00, 0x1d, 0x00, // ......!......... + 0x00, 0x00, 0x79, 0x04, 0x00, 0x00, 0x13, 0x03, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, // ..y........... . + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x06, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ + 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, // ......!......... + 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x07, 0x00, 0x08, 0x04, 0x00, 0x00, 0x08, 0x00, // ......!......... + 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x02, // ................ + 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x96, 0x00, // ......a......... + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x09, // .. ...........a. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, // ..;............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, // ..;...y......... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, // ..;............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x67, 0x12, 0x00, 0x00, 0x00, 0x00, // ..;...y...g..... + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xa3, 0x14, 0x00, 0x00, 0x00, 0x00, // ..;............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, // ..+............. + 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, // ................ + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, // ...... .......+. + 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..............+. + 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x7a, 0x01, 0x00, 0x00, 0x81, 0x80, 0x80, 0x3b, 0x14, 0x00, // ......z......;.. + 0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, // ......;.......w. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x78, 0x0e, // ......;.......x. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, // ...... ......... + 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x74, 0x14, // ......;.......t. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, // ...... ......... + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, // ......;......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, // ..........e..... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, // ......+.......j. + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x71, 0x01, 0x00, 0x00, 0x65, 0x00, // .. .......q...e. + 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x1d, 0x00, // ..j............. + 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ......e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x71, 0x01, // ..e...e...e...q. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x36, 0x00, // ..e...e.......6. + 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, // ................ + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, // ......Sa..;..... + 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, // ...G......;..... + 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, // ...U......;..... + 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, // ...8......;..... + 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, // ..........=..... + 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, // ..!C......=..... + 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, // ...3......P...a. + 0x00, 0x00, 0x5e, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, // ..^ ..!C...3..>. + 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x5e, 0x20, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x79, 0x04, // ......^ ..A...y. + 0x00, 0x00, 0xf4, 0x56, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ...V..........=. + 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0xf4, 0x56, 0x00, 0x00, 0x3e, 0x00, // ...........V..>. + 0x03, 0x00, 0x67, 0x12, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x13, 0x03, // ..g.......A..... + 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, // ...@..........=. + 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0xd3, 0x1e, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x3e, 0x00, // ...........@..>. + 0x03, 0x00, 0xa3, 0x14, 0x00, 0x00, 0xd3, 0x1e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ..........=..... + 0x00, 0x00, 0xe1, 0x2b, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, // ...+..w...=..... + 0x00, 0x00, 0xb0, 0x3c, 0x00, 0x00, 0x78, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, // ...<..x...=..... + 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, // ..@,..t...>....G + 0x00, 0x00, 0xe1, 0x2b, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb0, 0x3c, // ...+..>....U...< + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x38, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x39, 0x00, // ..>....8..@,..9. + 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0xdd, 0x13, 0x00, 0x00, 0xc9, 0x47, // .......&.......G + 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, // ...U...8......=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, // ..............>. + 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, // ..............8. + 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0x0a, 0x08, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x79, 0x04, 0x00, 0x00, 0xe2, 0x2e, // ......7...y..... + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x13, 0x03, 0x00, 0x00, 0x2f, 0x42, 0x00, 0x00, 0x37, 0x00, // ..7......./B..7. + 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xca, 0x1c, // ................ + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0xc6, 0x19, 0x00, 0x00, 0x2f, 0x42, // ..=.........../B + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xca, 0x48, 0x00, 0x00, 0xe2, 0x2e, // ..=........H.... + 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xf7, 0x3e, 0x00, 0x00, 0xc6, 0x19, // ..V........>.... + 0x00, 0x00, 0xca, 0x48, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xfe, 0x24, // ...H..=........$ + 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x82, 0x59, // ......W........Y + 0x00, 0x00, 0xf7, 0x3e, 0x00, 0x00, 0xfe, 0x24, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x82, 0x59, // ...>...$.......Y + 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd2, 0x0c, // ..8...6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, // ..........7..... + 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc7, 0x0e, // ......7......... + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0xf8, 0x00, // ..7............. + 0x02, 0x00, 0x16, 0x59, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x37, 0x54, // ...Y..=.......7T + 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x07, 0x48, // ......=........H + 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0e, 0x47, // ......=........G + 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x19, // ..............e. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x37, 0x54, 0x00, 0x00, 0x07, 0x48, // ..........7T...H + 0x00, 0x00, 0x0e, 0x47, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x65, 0x19, 0x00, 0x00, 0x38, 0x00, // ...G......e...8. + 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, // ..6.......5..... + 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, // ......7......... + 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x19, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // .......N..=..... + 0x00, 0x00, 0x67, 0x1c, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..g.......=..... + 0x00, 0x00, 0xf2, 0x44, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ...D......=..... + 0x00, 0x00, 0x92, 0x2f, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // .../......=..... + 0x00, 0x00, 0xa5, 0x2f, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, // .../......P..... + 0x00, 0x00, 0x41, 0x4a, 0x00, 0x00, 0x67, 0x1c, 0x00, 0x00, 0xf2, 0x44, 0x00, 0x00, 0x92, 0x2f, // ..AJ..g....D.../ + 0x00, 0x00, 0xa5, 0x2f, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x41, 0x4a, 0x00, 0x00, 0x38, 0x00, // .../......AJ..8. + 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xdd, 0x13, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x62, 0x25, // ......7.......b% + 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x27, 0x22, 0x00, 0x00, 0x37, 0x00, // ..7.......'"..7. + 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0x08, 0x51, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, // .......Q..7..... + 0x00, 0x00, 0x92, 0x55, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xc6, 0x5e, 0x00, 0x00, 0x3b, 0x00, // ...U.......^..;. + 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x6a, 0x4f, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ......jO......;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // ..............;. + 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x8b, 0x2b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......+......;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x8c, 0x2b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......+......;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc4, 0x2b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, // .......+......;. + 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x5e, 0x29, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, // ......^)......>. + 0x03, 0x00, 0x6a, 0x4f, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, // ..jO......9..... + 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x6a, 0x4f, 0x00, 0x00, 0x3d, 0x00, // ......5...jO..=. + 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xdd, 0x4b, 0x00, 0x00, 0x08, 0x51, 0x00, 0x00, 0x3e, 0x00, // .......K...Q..>. + 0x03, 0x00, 0x8b, 0x2b, 0x00, 0x00, 0xdd, 0x4b, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, // ...+...K..9..... + 0x00, 0x00, 0x95, 0x54, 0x00, 0x00, 0x99, 0x0f, 0x00, 0x00, 0x67, 0x12, 0x00, 0x00, 0xa3, 0x14, // ...T......g..... + 0x00, 0x00, 0x8b, 0x2b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x29, 0x4c, // ...+..=.......)L + 0x00, 0x00, 0x27, 0x22, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8c, 0x2b, 0x00, 0x00, 0x29, 0x4c, // ..'"..>....+..)L + 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa6, 0x1f, 0x00, 0x00, 0x62, 0x25, // ..=...........b% + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc4, 0x2b, 0x00, 0x00, 0xa6, 0x1f, 0x00, 0x00, 0x4f, 0x00, // ..>....+......O. + 0x09, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xea, 0x31, 0x00, 0x00, 0x95, 0x54, 0x00, 0x00, 0x95, 0x54, // .......1...T...T + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5e, 0x29, 0x00, 0x00, 0xea, 0x31, 0x00, 0x00, 0x39, 0x00, // ..>...^)...1..9. + 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x29, 0x00, 0x00, 0xd2, 0x0c, 0x00, 0x00, 0x8c, 0x2b, // .......).......+ + 0x00, 0x00, 0xc4, 0x2b, 0x00, 0x00, 0x5e, 0x29, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x18, 0x0e, // ...+..^)..>..... + 0x00, 0x00, 0x1e, 0x29, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xb7, 0x49, // ...)..A........I + 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, // ..........=..... + 0x00, 0x00, 0x49, 0x62, 0x00, 0x00, 0xb7, 0x49, 0x00, 0x00, 0xb8, 0x00, 0x05, 0x00, 0x09, 0x00, // ..Ib...I........ + 0x00, 0x00, 0x7a, 0x44, 0x00, 0x00, 0x49, 0x62, 0x00, 0x00, 0x7a, 0x01, 0x00, 0x00, 0xf7, 0x00, // ..zD..Ib..z..... + 0x03, 0x00, 0xdc, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x00, 0x04, 0x00, 0x7a, 0x44, // ..............zD + 0x00, 0x00, 0xfd, 0x46, 0x00, 0x00, 0xdc, 0x19, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xfd, 0x46, // ...F...........F + 0x00, 0x00, 0xfc, 0x00, 0x01, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xdc, 0x19, 0x00, 0x00, 0x3d, 0x00, // ..............=. + 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd8, 0x38, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x3e, 0x00, // .......8......>. + 0x03, 0x00, 0x92, 0x55, 0x00, 0x00, 0xd8, 0x38, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, // ...U...8......8. + 0x01, 0x00, 0x00, // ... }; -static const uint8_t fs_debugfont_dx11[772] = +static const uint8_t fs_debugfont_dx9[364] = { - 0x46, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0xf4, 0x02, 0x44, 0x58, 0x42, 0x43, // FSH..."f....DXBC - 0x1d, 0xbb, 0xb2, 0xa8, 0xff, 0x65, 0xcd, 0xa5, 0xf7, 0x85, 0xfd, 0xcb, 0xb6, 0xe1, 0x00, 0xc6, // .....e.......... - 0x01, 0x00, 0x00, 0x00, 0xf4, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ............0... - 0x28, 0x01, 0x00, 0x00, 0x34, 0x02, 0x00, 0x00, 0xc0, 0x02, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, // (...4.......Aon9 - 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xc8, 0x00, 0x00, 0x00, // ................ - 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, // (.....(...(...(. - 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, // ..$...(......... - 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x81, 0x80, 0x80, 0xbb, 0x00, 0x00, 0x00, 0x80, // Q............... - 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ - 0x00, 0x00, 0x0f, 0xb0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xb0, // ................ - 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xb0, 0x1f, 0x00, 0x00, 0x02, // ................ - 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ........B....... - 0x02, 0x00, 0xe4, 0xb0, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0x80, // ................ - 0x01, 0x00, 0xe4, 0xb0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x81, // ................ - 0x00, 0x00, 0xe4, 0xb0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, // ................ - 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xb0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, // ................ - 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, // ........X....... - 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x41, 0x00, 0x00, 0x01, // ......U.....A... - 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, // ................ - 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x04, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // ....SHDR....@... - 0x41, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // A...Z....`...... - 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, // X....p......UU.. - 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, // b...........b... - 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, // ........b...2... - 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....e.... ...... - 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, // h.......E....... - 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, // ....F.......F~.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, // .....`.......... - 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F....... - 0x46, 0x1e, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, // F...A.......2... - 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // F.......F....... - 0x31, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, // 1...........:... - 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x81, 0x80, 0x80, 0x3b, 0x0d, 0x00, 0x04, 0x03, // .....@.....;.... - 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // ........6.... .. - 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>... - 0x49, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGN............ - 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // h............... - 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........t....... - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // ................ - 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // t............... - 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........z....... - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // ................ - 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, // SV_POSITION.COLO - 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, // R.TEXCOORD..OSGN - 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET... - 0x00, 0x00, 0x00, 0x00, // .... + 0x46, 0x53, 0x48, 0x05, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH..."f...s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x4c, 0x01, 0x00, 0x00, 0x00, // Color0.....L.... + 0x03, 0xff, 0xff, 0xfe, 0xff, 0x20, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, // ..... .CTAB....S + 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ + 0x91, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ...L...0........ + 0x00, 0x02, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, // ...<.......s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, // Color........... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, // .......ps_3_0.Mi + 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL + 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler + 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x81, // 10.1..Q........ + 0x80, 0x80, 0xbb, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x1f, // ................ + 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x0a, // ................ + 0x00, 0x01, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, // ................ + 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, // ...............B + 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x01, // ................ + 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x02, 0x00, 0x00, 0x03, 0x01, // ................ + 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x81, 0x00, 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, // ................ + 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x02, // ................ + 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x58, // ...............X + 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, // .............U.. + 0x00, 0xaa, 0xa0, 0x41, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, // ...A............ + 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ............ }; -static const uint8_t fs_debugfont_mtl[820] = +static const uint8_t fs_debugfont_dx11[774] = { - 0x46, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0x25, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH..."f..%...us + 0x46, 0x53, 0x48, 0x05, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0xf4, 0x02, 0x00, 0x00, 0x44, 0x58, // FSH..."f......DX + 0x42, 0x43, 0x1d, 0xbb, 0xb2, 0xa8, 0xff, 0x65, 0xcd, 0xa5, 0xf7, 0x85, 0xfd, 0xcb, 0xb6, 0xe1, // BC.....e........ + 0x00, 0xc6, 0x01, 0x00, 0x00, 0x00, 0xf4, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, // ..............0. + 0x00, 0x00, 0x28, 0x01, 0x00, 0x00, 0x34, 0x02, 0x00, 0x00, 0xc0, 0x02, 0x00, 0x00, 0x41, 0x6f, // ..(...4.......Ao + 0x6e, 0x39, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xc8, 0x00, // n9.............. + 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, // ..(.....(...(... + 0x28, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // (...$...(....... + 0xff, 0xff, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x81, 0x80, 0x80, 0xbb, 0x00, 0x00, // ..Q............. + 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0xb0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0xb0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xb0, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, // ..........B..... + 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xb0, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ + 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xb0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ + 0xe4, 0x81, 0x00, 0x00, 0xe4, 0xb0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xb0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, // ................ + 0x01, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, // ..........X..... + 0x0f, 0x80, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x41, 0x00, // ........U.....A. + 0x00, 0x01, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, // ................ + 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x04, 0x01, 0x00, 0x00, 0x40, 0x00, // ......SHDR....@. + 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, // ..A...Z....`.... + 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, // ..X....p......UU + 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, // ..b...........b. + 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, // ..........b...2. + 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......e.... .... + 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, // ..h.......E..... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x7e, // ......F.......F~ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......`........ + 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, // ..........F..... + 0x00, 0x00, 0x46, 0x1e, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, // ..F...A.......2. + 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x02, 0x00, // ..F.......F..... + 0x00, 0x00, 0x31, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, // ..1...........:. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x81, 0x80, 0x80, 0x3b, 0x0d, 0x00, // .......@.....;.. + 0x04, 0x03, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, // ..........6.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, // ......F.......>. + 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, // ..ISGN.......... + 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, // ..h............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........t..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, // ................ + 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ..t............. + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........z..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO + 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, // LOR.TEXCOORD..OS + 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET. + 0xab, 0xab, 0x00, 0x00, 0x00, 0x00, // ...... +}; +static const uint8_t fs_debugfont_mtl[745] = +{ + 0x46, 0x53, 0x48, 0x05, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0xda, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH..."f......us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { @@ -114,49 +379,44 @@ static const uint8_t fs_debugfont_mtl[820] = 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, // olor1;. float2 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, // v_texcoord0;.};. 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // struct xlatMtlSh - 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x68, // aderOutput {. h - 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, // alf4 gl_FragColo - 0x72, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, // r;.};.struct xla - 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, // tMtlShaderUnifor - 0x6d, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, // m {.};.fragment - 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut - 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain - 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, // (xlatMtlShaderIn - 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // put _mtl_i [[sta - 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan - 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, // t xlatMtlShaderU - 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, // niform& _mtl_u [ - 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x0a, 0x20, 0x20, 0x2c, // [buffer(0)]]. , - 0x20, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, // texture2d s_texColor [ - 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, // [texture(0)]], s - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, // ampler _mtlsmp_s - 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, // _texColor [[samp - 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, // ler(0)]]).{. xl - 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu - 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, // t _mtl_o;. half - 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, // 4 tmpvar_1 = 0;. - 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, // tmpvar_1 = hal - 0x66, 0x34, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, // f4(s_texColor.sa - 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, // mple(_mtlsmp_s_t - 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, // exColor, (float2 - 0x29, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // )(_mtl_i.v_texco - 0x6f, 0x72, 0x64, 0x30, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // ord0)));. half4 - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, // tmpvar_2 = 0;. - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x68, 0x61, // tmpvar_2 = ((ha - 0x6c, 0x66, 0x34, 0x29, 0x6d, 0x69, 0x78, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, // lf4)mix (_mtl_i. - 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x2c, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // v_color1, _mtl_i - 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, // .v_color0, (floa - 0x74, 0x34, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x78, 0x78, 0x78, // t4)tmpvar_1.xxxx - 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, // ));. if ((tmpva - 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x20, 0x3c, 0x20, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x28, 0x30, // r_2.w < (half)(0 - 0x2e, 0x30, 0x30, 0x33, 0x39, 0x32, 0x31, 0x35, 0x36, 0x39, 0x29, 0x29, 0x29, 0x20, 0x7b, 0x0a, // .003921569))) {. - 0x20, 0x20, 0x20, 0x20, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x72, 0x61, 0x67, // discard_frag - 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // ment();. };. _ - 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, // mtl_o.gl_FragCol - 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, // or = tmpvar_2;. - 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // return _mtl_o;. - 0x7d, 0x0a, 0x0a, 0x00, // }... + 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, // aderOutput {. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, // loat4 gl_FragCol + 0x6f, 0x72, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, // or;.};.struct xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo + 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, // rm {.};.fragment + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, // xlatMtlShaderOu + 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, // tput xlatMtlMain + 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, // (xlatMtlShaderI + 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, // nput _mtl_i [[st + 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, // age_in]], consta + 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // nt xlatMtlShader + 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, // Uniform& _mtl_u + 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x0a, 0x20, 0x20, // [[buffer(0)]]. + 0x2c, 0x20, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, // , texture2d s_texColor + 0x5b, 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, // [[texture(0)]], + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, // sampler _mtlsmp_ + 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, // s_texColor [[sam + 0x70, 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, // pler(0)]]).{. x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, // latMtlShaderOutp + 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // ut _mtl_o;. flo + 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, // at4 tmpvar_1 = 0 + 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x6d, // ;. tmpvar_1 = m + 0x69, 0x78, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // ix (_mtl_i.v_col + 0x6f, 0x72, 0x31, 0x2c, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, // or1, _mtl_i.v_co + 0x6c, 0x6f, 0x72, 0x30, 0x2c, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // lor0, s_texColor + 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, // .sample(_mtlsmp_ + 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, // s_texColor, (flo + 0x61, 0x74, 0x32, 0x29, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, // at2)(_mtl_i.v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x29, 0x2e, 0x78, 0x78, 0x78, 0x78, 0x29, 0x3b, // xcoord0)).xxxx); + 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // . if ((tmpvar_1 + 0x2e, 0x77, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x30, 0x33, 0x39, 0x32, 0x31, 0x35, 0x36, 0x39, // .w < 0.003921569 + 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, // )) {. discard + 0x5f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x7d, // _fragment();. } + 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr + 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // agColor = tmpvar + 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, // _1;. return _mt + 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // l_o;.}... }; extern const uint8_t* fs_debugfont_pssl; extern const uint32_t fs_debugfont_pssl_size; diff --git a/3rdparty/bgfx/src/fs_debugfont.sc b/3rdparty/bgfx/src/fs_debugfont.sc index bccdd01..8d9c04b 100644 --- a/3rdparty/bgfx/src/fs_debugfont.sc +++ b/3rdparty/bgfx/src/fs_debugfont.sc @@ -1,7 +1,7 @@ $input v_color0, v_color1, v_texcoord0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/glcontext_eagl.h b/3rdparty/bgfx/src/glcontext_eagl.h index 31a1576..5e816b4 100644 --- a/3rdparty/bgfx/src/glcontext_eagl.h +++ b/3rdparty/bgfx/src/glcontext_eagl.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/glcontext_eagl.mm b/3rdparty/bgfx/src/glcontext_eagl.mm index d4e1156..b698314 100644 --- a/3rdparty/bgfx/src/glcontext_eagl.mm +++ b/3rdparty/bgfx/src/glcontext_eagl.mm @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -176,8 +176,17 @@ namespace bgfx { namespace gl , nil ]; - EAGLContext* context = [ [EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; - BX_CHECK(NULL != context, "Failed to create kEAGLRenderingAPIOpenGLES2 context."); + EAGLContext* context = (EAGLContext*)g_platformData.context; + if (NULL == context) + { + context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3]; + if (NULL == context) + { + context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; + } + } + BX_CHECK(NULL != context, "No valid OpenGLES context."); + m_context = (void*)context; [EAGLContext setCurrentContext:context]; diff --git a/3rdparty/bgfx/src/glcontext_egl.cpp b/3rdparty/bgfx/src/glcontext_egl.cpp index ef03ec5..fe7fe2e 100644 --- a/3rdparty/bgfx/src/glcontext_egl.cpp +++ b/3rdparty/bgfx/src/glcontext_egl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/glcontext_egl.h b/3rdparty/bgfx/src/glcontext_egl.h index 79082ec..ac72756 100644 --- a/3rdparty/bgfx/src/glcontext_egl.h +++ b/3rdparty/bgfx/src/glcontext_egl.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/glcontext_glx.cpp b/3rdparty/bgfx/src/glcontext_glx.cpp index 7afd3ec..a2bccea 100644 --- a/3rdparty/bgfx/src/glcontext_glx.cpp +++ b/3rdparty/bgfx/src/glcontext_glx.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/glcontext_glx.h b/3rdparty/bgfx/src/glcontext_glx.h index 6b93cb9..766e156 100644 --- a/3rdparty/bgfx/src/glcontext_glx.h +++ b/3rdparty/bgfx/src/glcontext_glx.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/glcontext_nsgl.h b/3rdparty/bgfx/src/glcontext_nsgl.h index 00e07de..e6a6db9 100644 --- a/3rdparty/bgfx/src/glcontext_nsgl.h +++ b/3rdparty/bgfx/src/glcontext_nsgl.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/glcontext_nsgl.mm b/3rdparty/bgfx/src/glcontext_nsgl.mm index 1bef5ca..af35e9c 100644 --- a/3rdparty/bgfx/src/glcontext_nsgl.mm +++ b/3rdparty/bgfx/src/glcontext_nsgl.mm @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/glcontext_ppapi.cpp b/3rdparty/bgfx/src/glcontext_ppapi.cpp deleted file mode 100644 index b23d92b..0000000 --- a/3rdparty/bgfx/src/glcontext_ppapi.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -#include "bgfx_p.h" - -#if BX_PLATFORM_NACL && (BGFX_CONFIG_RENDERER_OPENGLES || BGFX_CONFIG_RENDERER_OPENGL) -# include -# include "renderer_gl.h" - -namespace bgfx { namespace gl -{ -# define GL_IMPORT(_optional, _proto, _func, _import) _proto _func -# include "glimports.h" - - void naclSwapCompleteCb(void* /*_data*/, int32_t /*_result*/); - - PP_CompletionCallback naclSwapComplete = - { - naclSwapCompleteCb, - NULL, - PP_COMPLETIONCALLBACK_FLAG_NONE - }; - - struct Ppapi - { - Ppapi() - : m_context(0) - , m_instance(0) - , m_instInterface(NULL) - , m_graphicsInterface(NULL) - , m_instancedArrays(NULL) - , m_query(NULL) - , m_postSwapBuffers(NULL) - , m_forceSwap(true) - { - } - - bool setInterfaces(PP_Instance _instance, const PPB_Instance* _instInterface, const PPB_Graphics3D* _graphicsInterface, PostSwapBuffersFn _postSwapBuffers); - - void resize(uint32_t _width, uint32_t _height, uint32_t /*_flags*/) - { - m_graphicsInterface->ResizeBuffers(m_context, _width, _height); - } - - void swap() - { - glSetCurrentContextPPAPI(m_context); - m_graphicsInterface->SwapBuffers(m_context, naclSwapComplete); - } - - bool isValid() const - { - return 0 != m_context; - } - - PP_Resource m_context; - PP_Instance m_instance; - const PPB_Instance* m_instInterface; - const PPB_Graphics3D* m_graphicsInterface; - const PPB_OpenGLES2InstancedArrays* m_instancedArrays; - const PPB_OpenGLES2Query* m_query; - PostSwapBuffersFn m_postSwapBuffers; - bool m_forceSwap; - }; - - static Ppapi s_ppapi; - - void naclSwapCompleteCb(void* /*_data*/, int32_t /*_result*/) - { - // For NaCl bgfx doesn't create render thread, but rendering is always - // multithreaded. Frame rendering is done on main thread, and context - // is initialized when PPAPI interfaces are set. Force swap is there to - // keep calling swap complete callback, so that initialization doesn't - // deadlock on semaphores. - if (s_ppapi.m_forceSwap) - { - s_ppapi.swap(); - } - - renderFrame(); - } - - static void GL_APIENTRY naclVertexAttribDivisor(GLuint _index, GLuint _divisor) - { - s_ppapi.m_instancedArrays->VertexAttribDivisorANGLE(s_ppapi.m_context, _index, _divisor); - } - - static void GL_APIENTRY naclDrawArraysInstanced(GLenum _mode, GLint _first, GLsizei _count, GLsizei _primcount) - { - s_ppapi.m_instancedArrays->DrawArraysInstancedANGLE(s_ppapi.m_context, _mode, _first, _count, _primcount); - } - - static void GL_APIENTRY naclDrawElementsInstanced(GLenum _mode, GLsizei _count, GLenum _type, const GLvoid* _indices, GLsizei _primcount) - { - s_ppapi.m_instancedArrays->DrawElementsInstancedANGLE(s_ppapi.m_context, _mode, _count, _type, _indices, _primcount); - } - - static void GL_APIENTRY naclGenQueries(GLsizei _n, GLuint* _queries) - { - s_ppapi.m_query->GenQueriesEXT(s_ppapi.m_context, _n, _queries); - } - - static void GL_APIENTRY naclDeleteQueries(GLsizei _n, const GLuint* _queries) - { - s_ppapi.m_query->DeleteQueriesEXT(s_ppapi.m_context, _n, _queries); - } - - static void GL_APIENTRY naclBeginQuery(GLenum _target, GLuint _id) - { - BX_UNUSED(_target); - s_ppapi.m_query->BeginQueryEXT(s_ppapi.m_context, GL_ANY_SAMPLES_PASSED_EXT, _id); - } - - static void GL_APIENTRY naclEndQuery(GLenum _target) - { - BX_UNUSED(_target); - s_ppapi.m_query->EndQueryEXT(s_ppapi.m_context, GL_ANY_SAMPLES_PASSED_EXT); - } - - static void GL_APIENTRY naclGetQueryObjectiv(GLuint _id, GLenum _pname, GLint* _params) - { - BX_UNUSED(_id, _pname); - s_ppapi.m_query->GetQueryivEXT(s_ppapi.m_context, GL_ANY_SAMPLES_PASSED_EXT, GL_CURRENT_QUERY_EXT, _params); - } - - static void GL_APIENTRY naclGetQueryObjectui64v(GLuint _id, GLenum _pname, GLuint64* _params) - { - BX_UNUSED(_id, _pname); - GLint params; - s_ppapi.m_query->GetQueryivEXT(s_ppapi.m_context, GL_ANY_SAMPLES_PASSED_EXT, GL_CURRENT_QUERY_EXT, ¶ms); - *_params = params; - } - - bool Ppapi::setInterfaces(PP_Instance _instance, const PPB_Instance* _instInterface, const PPB_Graphics3D* _graphicsInterface, PostSwapBuffersFn _postSwapBuffers) - { - BX_TRACE("PPAPI Interfaces"); - - m_instance = _instance; - m_instInterface = _instInterface; - m_graphicsInterface = _graphicsInterface; - m_instancedArrays = glGetInstancedArraysInterfacePPAPI(); - m_query = glGetQueryInterfacePPAPI(); - m_postSwapBuffers = _postSwapBuffers; - - int32_t attribs[] = - { - PP_GRAPHICS3DATTRIB_ALPHA_SIZE, 8, - PP_GRAPHICS3DATTRIB_DEPTH_SIZE, 24, - PP_GRAPHICS3DATTRIB_STENCIL_SIZE, 8, - PP_GRAPHICS3DATTRIB_SAMPLES, 0, - PP_GRAPHICS3DATTRIB_SAMPLE_BUFFERS, 0, - PP_GRAPHICS3DATTRIB_WIDTH, BGFX_DEFAULT_WIDTH, - PP_GRAPHICS3DATTRIB_HEIGHT, BGFX_DEFAULT_HEIGHT, - PP_GRAPHICS3DATTRIB_NONE - }; - - m_context = m_graphicsInterface->Create(m_instance, 0, attribs); - if (0 == m_context) - { - BX_TRACE("Failed to create context!"); - return false; - } - - m_instInterface->BindGraphics(m_instance, m_context); - glSetCurrentContextPPAPI(m_context); - m_graphicsInterface->SwapBuffers(m_context, naclSwapComplete); - - if (NULL != m_instancedArrays) - { - glVertexAttribDivisor = naclVertexAttribDivisor; - glDrawArraysInstanced = naclDrawArraysInstanced; - glDrawElementsInstanced = naclDrawElementsInstanced; - } - - if (NULL != m_query) - { - glGenQueries = naclGenQueries; - glDeleteQueries = naclDeleteQueries; - glBeginQuery = naclBeginQuery; - glEndQuery = naclEndQuery; - glGetQueryObjectiv = naclGetQueryObjectiv; - glGetQueryObjectui64v = naclGetQueryObjectui64v; - } - - // Prevent render thread creation. - RenderFrame::Enum result = renderFrame(); - return RenderFrame::NoContext == result; - } - - void GlContext::create(uint32_t _width, uint32_t _height) - { - BX_UNUSED(_width, _height); - BX_TRACE("GlContext::create"); - - g_internalData.context = &s_ppapi.m_context; - } - - void GlContext::destroy() - { - } - - void GlContext::resize(uint32_t _width, uint32_t _height, uint32_t _flags) - { - s_ppapi.m_forceSwap = false; - s_ppapi.resize(_width, _height, _flags); - } - - uint64_t GlContext::getCaps() const - { - return 0; - } - - SwapChainGL* GlContext::createSwapChain(void* /*_nwh*/) - { - BX_CHECK(false, "Shouldn't be called!"); - return NULL; - } - - void GlContext::destroySwapChain(SwapChainGL* /*_swapChain*/) - { - BX_CHECK(false, "Shouldn't be called!"); - } - - void GlContext::swap(SwapChainGL* /*_swapChain*/) - { - s_ppapi.swap(); - } - - void GlContext::makeCurrent(SwapChainGL* /*_swapChain*/) - { - } - - void GlContext::import() - { - } - - bool GlContext::isValid() const - { - return s_ppapi.isValid(); - } - -} /* namespace gl */ } // namespace bgfx - -namespace bgfx -{ - bool naclSetInterfaces(PP_Instance _instance, const PPB_Instance* _instInterface, const PPB_Graphics3D* _graphicsInterface, PostSwapBuffersFn _postSwapBuffers) - { - return gl::s_ppapi.setInterfaces( _instance, _instInterface, _graphicsInterface, _postSwapBuffers); - } -} // namespace bgfx - -#endif // BX_PLATFORM_NACL && (BGFX_CONFIG_RENDERER_OPENGLES || BGFX_CONFIG_RENDERER_OPENGL) diff --git a/3rdparty/bgfx/src/glcontext_ppapi.h b/3rdparty/bgfx/src/glcontext_ppapi.h deleted file mode 100644 index 59da455..0000000 --- a/3rdparty/bgfx/src/glcontext_ppapi.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -#ifndef BGFX_GLCONTEXT_PPAPI_H_HEADER_GUARD -#define BGFX_GLCONTEXT_PPAPI_H_HEADER_GUARD - -#if BX_PLATFORM_NACL - -# include -# include -# include -# include - -namespace bgfx { namespace gl -{ - struct SwapChainGL; - - struct GlContext - { - GlContext() - { - } - - void create(uint32_t _width, uint32_t _height); - void destroy(); - void resize(uint32_t _width, uint32_t _height, uint32_t _flags); - - uint64_t getCaps() const; - SwapChainGL* createSwapChain(void* _nwh); - void destroySwapChain(SwapChainGL* _swapChain); - void swap(SwapChainGL* _swapChain = NULL); - void makeCurrent(SwapChainGL* _swapChain = NULL); - - void import(); - bool isValid() const; - }; -} /* namespace gl */ } // namespace bgfx - -#endif // BX_PLATFORM_NACL - -#endif // BGFX_GLCONTEXT_PPAPI_H_HEADER_GUARD diff --git a/3rdparty/bgfx/src/glcontext_wgl.cpp b/3rdparty/bgfx/src/glcontext_wgl.cpp index d20b844..859203d 100644 --- a/3rdparty/bgfx/src/glcontext_wgl.cpp +++ b/3rdparty/bgfx/src/glcontext_wgl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/glcontext_wgl.h b/3rdparty/bgfx/src/glcontext_wgl.h index 0b5f340..275a114 100644 --- a/3rdparty/bgfx/src/glcontext_wgl.h +++ b/3rdparty/bgfx/src/glcontext_wgl.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/glimports.h b/3rdparty/bgfx/src/glimports.h index 2ee0336..1e26af2 100644 --- a/3rdparty/bgfx/src/glimports.h +++ b/3rdparty/bgfx/src/glimports.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/hmd.cpp b/3rdparty/bgfx/src/hmd.cpp index b224a57..056b8cb 100644 --- a/3rdparty/bgfx/src/hmd.cpp +++ b/3rdparty/bgfx/src/hmd.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/hmd.h b/3rdparty/bgfx/src/hmd.h index 6a68819..57beae3 100644 --- a/3rdparty/bgfx/src/hmd.h +++ b/3rdparty/bgfx/src/hmd.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -48,7 +48,7 @@ namespace bgfx virtual void updateInput(HMD& _hmd) = 0; virtual void recenter() = 0; - virtual bool createSwapChain(const VRDesc& _desc, int _msaaSamples, int _mirrorWidth, int _mirrorHeight); + virtual bool createSwapChain(const VRDesc& _desc, int _msaaSamples, int _mirrorWidth, int _mirrorHeight) = 0; virtual void destroySwapChain() = 0; virtual void destroyMirror() = 0; virtual void makeRenderTargetActive(const VRDesc& _desc) = 0; diff --git a/3rdparty/bgfx/src/hmd_openvr.cpp b/3rdparty/bgfx/src/hmd_openvr.cpp index 54d86de..6e6ce49 100644 --- a/3rdparty/bgfx/src/hmd_openvr.cpp +++ b/3rdparty/bgfx/src/hmd_openvr.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/hmd_openvr.h b/3rdparty/bgfx/src/hmd_openvr.h index 897a122..16a1814 100644 --- a/3rdparty/bgfx/src/hmd_openvr.h +++ b/3rdparty/bgfx/src/hmd_openvr.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/hmd_ovr.cpp b/3rdparty/bgfx/src/hmd_ovr.cpp index 0898d9d..f23d679 100644 --- a/3rdparty/bgfx/src/hmd_ovr.cpp +++ b/3rdparty/bgfx/src/hmd_ovr.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/hmd_ovr.h b/3rdparty/bgfx/src/hmd_ovr.h index 7a0f482..f5bae3a 100644 --- a/3rdparty/bgfx/src/hmd_ovr.h +++ b/3rdparty/bgfx/src/hmd_ovr.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -35,25 +35,25 @@ namespace bgfx VRImplOVR(); virtual ~VRImplOVR() = 0; - virtual bool init() BX_OVERRIDE; - virtual void shutdown() BX_OVERRIDE; - virtual void connect(VRDesc* _desc) BX_OVERRIDE; - virtual void disconnect() BX_OVERRIDE; + virtual bool init() override; + virtual void shutdown() override; + virtual void connect(VRDesc* _desc) override; + virtual void disconnect() override; - virtual bool isConnected() const BX_OVERRIDE + virtual bool isConnected() const override { return NULL != m_session; } - virtual bool updateTracking(HMD& _hmd) BX_OVERRIDE; - virtual void updateInput(HMD& _hmd) BX_OVERRIDE; - virtual void recenter() BX_OVERRIDE; + virtual bool updateTracking(HMD& _hmd) override; + virtual void updateInput(HMD& _hmd) override; + virtual void recenter() override; - virtual bool createSwapChain(const VRDesc& _desc, int _msaaSamples, int _mirrorWidth, int _mirrorHeight) BX_OVERRIDE = 0; - virtual void destroySwapChain() BX_OVERRIDE = 0; - virtual void destroyMirror() BX_OVERRIDE = 0; - virtual void makeRenderTargetActive(const VRDesc& _desc) BX_OVERRIDE = 0; - virtual bool submitSwapChain(const VRDesc& _desc) BX_OVERRIDE = 0; + virtual bool createSwapChain(const VRDesc& _desc, int _msaaSamples, int _mirrorWidth, int _mirrorHeight) override = 0; + virtual void destroySwapChain() override = 0; + virtual void destroyMirror() override = 0; + virtual void makeRenderTargetActive(const VRDesc& _desc) override = 0; + virtual bool submitSwapChain(const VRDesc& _desc) override = 0; protected: ovrSession m_session; diff --git a/3rdparty/bgfx/src/makefile b/3rdparty/bgfx/src/makefile index 8f017d2..8dccda6 100644 --- a/3rdparty/bgfx/src/makefile +++ b/3rdparty/bgfx/src/makefile @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # diff --git a/3rdparty/bgfx/src/nvapi.cpp b/3rdparty/bgfx/src/nvapi.cpp new file mode 100644 index 0000000..e9a77e0 --- /dev/null +++ b/3rdparty/bgfx/src/nvapi.cpp @@ -0,0 +1,188 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "bgfx_p.h" +#include "nvapi.h" + +namespace bgfx +{ + /* + * NVAPI + * + * Reference: + * http://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/index.html + * https://github.com/jNizM/AHK_NVIDIA_NvAPI/blob/master/info/NvAPI_IDs.txt + */ + struct NvPhysicalGpuHandle; + +#define NVAPI_MAX_PHYSICAL_GPUS 64 + +#if BX_PLATFORM_WINDOWS +# define NVAPICALL __cdecl +#else +# define NVAPICALL +#endif // BX_PLATFORM_WINDOWS + + enum NvApiStatus + { + NVAPI_OK = 0, + NVAPI_ERROR = -1, + }; + + struct NvMemoryInfoV2 + { + NvMemoryInfoV2() + : version(sizeof(NvMemoryInfoV2) | (2 << 16) ) + { + } + + uint32_t version; + uint32_t dedicatedVideoMemory; + uint32_t availableDedicatedVideoMemory; + uint32_t systemVideoMemory; + uint32_t sharedSystemMemory; + uint32_t curAvailableDedicatedVideoMemory; + }; + + typedef void* (NVAPICALL* PFN_NVAPI_QUERYINTERFACE)(uint32_t _functionOffset); + typedef NvApiStatus (NVAPICALL* PFN_NVAPI_INITIALIZE)(); + typedef NvApiStatus (NVAPICALL* PFN_NVAPI_UNLOAD)(); + typedef NvApiStatus (NVAPICALL* PFN_NVAPI_ENUMPHYSICALGPUS)(NvPhysicalGpuHandle* _handle[NVAPI_MAX_PHYSICAL_GPUS], uint32_t* _gpuCount); + typedef NvApiStatus (NVAPICALL* PFN_NVAPI_GPUGETMEMORYINFO)(NvPhysicalGpuHandle* _handle, NvMemoryInfoV2* _memoryInfo); + typedef NvApiStatus (NVAPICALL* PFN_NVAPI_GPUGETFULLNAME)(NvPhysicalGpuHandle* _physicalGpu, char _name[64]); + +#define NVAPI_INITIALIZE UINT32_C(0x0150e828) +#define NVAPI_UNLOAD UINT32_C(0xd22bdd7e) +#define NVAPI_ENUMPHYSICALGPUS UINT32_C(0xe5ac921f) +#define NVAPI_GPUGETMEMORYINFO UINT32_C(0x07f9b368) +#define NVAPI_GPUGETFULLNAME UINT32_C(0xceee8e9f) +#define NVAPI_MULTIDRAWINSTANCEDINDIRECT UINT32_C(0xd4e26bbf) +#define NVAPI_MULTIDRAWINDEXEDINSTANCEDINDIRECT UINT32_C(0x59e890f9) + + static PFN_NVAPI_QUERYINTERFACE nvApiQueryInterface; + static PFN_NVAPI_INITIALIZE nvApiInitialize; + static PFN_NVAPI_UNLOAD nvApiUnload; + static PFN_NVAPI_ENUMPHYSICALGPUS nvApiEnumPhysicalGPUs; + static PFN_NVAPI_GPUGETMEMORYINFO nvApiGpuGetMemoryInfo; + static PFN_NVAPI_GPUGETFULLNAME nvApiGpuGetFullName; + + NvApi::NvApi() + : m_nvApiDll(NULL) + , m_nvGpu(NULL) + { + } + + void NvApi::init() + { + m_nvGpu = NULL; + m_nvApiDll = bx::dlopen( +#if BX_ARCH_32BIT + "nvapi.dll" +#else + "nvapi64.dll" +#endif // BX_ARCH_32BIT + ); + + if (NULL != m_nvApiDll) + { + nvApiQueryInterface = (PFN_NVAPI_QUERYINTERFACE)bx::dlsym(m_nvApiDll, "nvapi_QueryInterface"); + + bool initialized = NULL != nvApiQueryInterface; + + if (initialized) + { + nvApiInitialize = (PFN_NVAPI_INITIALIZE )nvApiQueryInterface(NVAPI_INITIALIZE); + nvApiUnload = (PFN_NVAPI_UNLOAD )nvApiQueryInterface(NVAPI_UNLOAD); + nvApiEnumPhysicalGPUs = (PFN_NVAPI_ENUMPHYSICALGPUS )nvApiQueryInterface(NVAPI_ENUMPHYSICALGPUS); + nvApiGpuGetMemoryInfo = (PFN_NVAPI_GPUGETMEMORYINFO )nvApiQueryInterface(NVAPI_GPUGETMEMORYINFO); + nvApiGpuGetFullName = (PFN_NVAPI_GPUGETFULLNAME )nvApiQueryInterface(NVAPI_GPUGETFULLNAME); + + nvApiD3D11MultiDrawInstancedIndirect = (NvMultiDrawIndirectFn)nvApiQueryInterface(NVAPI_MULTIDRAWINSTANCEDINDIRECT); + nvApiD3D11MultiDrawIndexedInstancedIndirect = (NvMultiDrawIndirectFn)nvApiQueryInterface(NVAPI_MULTIDRAWINDEXEDINSTANCEDINDIRECT); + + initialized = true + && NULL != nvApiInitialize + && NULL != nvApiUnload + && NULL != nvApiEnumPhysicalGPUs + && NULL != nvApiGpuGetMemoryInfo + && NULL != nvApiGpuGetFullName + && NVAPI_OK == nvApiInitialize() + ; + + if (initialized) + { + NvPhysicalGpuHandle* physicalGpus[NVAPI_MAX_PHYSICAL_GPUS]; + uint32_t numGpus = 0; + nvApiEnumPhysicalGPUs(physicalGpus, &numGpus); + + initialized = 0 < numGpus; + if (initialized) + { + m_nvGpu = physicalGpus[0]; + } + + char name[64]; + nvApiGpuGetFullName(m_nvGpu, name); + BX_TRACE("%s", name); + } + + initialized = NULL != m_nvGpu; + + if (!initialized) + { + nvApiUnload(); + } + } + + if (!initialized) + { + bx::dlclose(m_nvApiDll); + m_nvApiDll = NULL; + } + + BX_WARN(!initialized, "NVAPI supported."); + } + } + + void NvApi::shutdown() + { + if (NULL != m_nvGpu) + { + nvApiUnload(); + m_nvGpu = NULL; + } + + if (NULL != m_nvApiDll) + { + bx::dlclose(m_nvApiDll); + m_nvApiDll = NULL; + } + } + + void NvApi::getMemoryInfo(int64_t& _gpuMemoryUsed, int64_t& _gpuMemoryMax) + { + if (NULL != m_nvGpu) + { + NvMemoryInfoV2 memInfo; + NvApiStatus status = nvApiGpuGetMemoryInfo(m_nvGpu, &memInfo); + if (NVAPI_OK == status) + { + _gpuMemoryMax = 1024 * memInfo.availableDedicatedVideoMemory; + _gpuMemoryUsed = 1024 * (memInfo.availableDedicatedVideoMemory - memInfo.curAvailableDedicatedVideoMemory); +// BX_TRACE(" dedicatedVideoMemory: %d KiB", memInfo.dedicatedVideoMemory); +// BX_TRACE(" availableDedicatedVideoMemory: %d KiB", memInfo.availableDedicatedVideoMemory); +// BX_TRACE(" systemVideoMemory: %d KiB", memInfo.systemVideoMemory); +// BX_TRACE(" sharedSystemMemory: %d KiB", memInfo.sharedSystemMemory); +// BX_TRACE("curAvailableDedicatedVideoMemory: %d KiB", memInfo.curAvailableDedicatedVideoMemory); + } + } + else + { + _gpuMemoryMax = -INT64_MAX; + _gpuMemoryUsed = -INT64_MAX; + } + } + +} // namespace bgfx diff --git a/3rdparty/bgfx/src/nvapi.h b/3rdparty/bgfx/src/nvapi.h new file mode 100644 index 0000000..f6f71c8 --- /dev/null +++ b/3rdparty/bgfx/src/nvapi.h @@ -0,0 +1,46 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#ifndef BGFX_NVAPI_H_HEADER_GUARD +#define BGFX_NVAPI_H_HEADER_GUARD + +struct ID3D11DeviceContext; +struct ID3D11Buffer; + +namespace bgfx +{ + struct NvPhysicalGpuHandle; + + typedef void (* NvMultiDrawIndirectFn)(ID3D11DeviceContext* _deviceCtx, uint32_t _numDrawIndirect, ID3D11Buffer* _ptr, uint32_t _offset, uint32_t _stride); + + /// + struct NvApi + { + /// + NvApi(); + + /// + void init(); + + /// + void shutdown(); + + /// + bool isInitialized() const { return NULL != m_nvGpu; } + + /// + void getMemoryInfo(int64_t& _gpuMemoryUsed, int64_t& _gpuMemoryMax); + + /// + void* m_nvApiDll; + NvPhysicalGpuHandle* m_nvGpu; + + NvMultiDrawIndirectFn nvApiD3D11MultiDrawInstancedIndirect; + NvMultiDrawIndirectFn nvApiD3D11MultiDrawIndexedInstancedIndirect; + }; + +} // namespace bgfx + +#endif // BGFX_NVAPI_H_HEADER_GUARD diff --git a/3rdparty/bgfx/src/renderer.h b/3rdparty/bgfx/src/renderer.h index 1bf8fbb..355469d 100644 --- a/3rdparty/bgfx/src/renderer.h +++ b/3rdparty/bgfx/src/renderer.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -10,6 +10,37 @@ namespace bgfx { + struct BlitState + { + BlitState(const Frame* _frame) + : m_frame(_frame) + , m_item(0) + { + m_key.decode(_frame->m_blitKeys[0]); + } + + bool hasItem(uint16_t _view) const + { + return m_item < m_frame->m_numBlitItems + && m_key.m_view <= _view + ; + } + + const BlitItem& advance() + { + const BlitItem& bi = m_frame->m_blitItem[m_key.m_item]; + + ++m_item; + m_key.decode(m_frame->m_blitKeys[m_item]); + + return bi; + } + + const Frame* m_frame; + BlitKey m_key; + uint16_t m_item; + }; + struct ViewState { ViewState() @@ -28,7 +59,7 @@ namespace bgfx m_invProjCached = UINT16_MAX; m_invViewProjCached = UINT16_MAX; - m_view[0] = _frame->m_view; + m_view[0] = m_viewTmp[0]; m_view[1] = m_viewTmp[1]; if (_hmdEnabled) @@ -48,20 +79,27 @@ namespace bgfx for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) { - if (BGFX_VIEW_STEREO == (_frame->m_viewFlags[ii] & BGFX_VIEW_STEREO) ) + if (BGFX_VIEW_STEREO == (_frame->m_view[ii].m_flags & BGFX_VIEW_STEREO) ) { bx::float4x4_mul(&m_view[eye][ii].un.f4x4 - , &_frame->m_view[ii].un.f4x4 + , &_frame->m_view[ii].m_view.un.f4x4 , &viewAdjust.un.f4x4 ); } else { - bx::memCopy(&m_view[0][ii].un.f4x4, &_frame->m_view[ii].un.f4x4, sizeof(Matrix4) ); + bx::memCopy(&m_view[0][ii].un.f4x4, &_frame->m_view[ii].m_view.un.f4x4, sizeof(Matrix4) ); } } } } + else + { + for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) + { + bx::memCopy(&m_view[0][ii].un.f4x4, &_frame->m_view[ii].m_view.un.f4x4, sizeof(Matrix4) ); + } + } for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) { @@ -69,18 +107,20 @@ namespace bgfx { bx::float4x4_mul(&m_viewProj[eye][ii].un.f4x4 , &m_view[eye][ii].un.f4x4 - , &_frame->m_proj[eye][ii].un.f4x4 + , &_frame->m_view[ii].m_proj[eye].un.f4x4 ); } } } template - void setPredefined(RendererContext* _renderer, uint16_t _view, uint8_t _eye, Program& _program, Frame* _frame, const Draw& _draw) + void setPredefined(RendererContext* _renderer, uint16_t _view, uint8_t _eye, const Program& _program, const Frame* _frame, const Draw& _draw) { + const FrameCache& frameCache = _frame->m_frameCache; + for (uint32_t ii = 0, num = _program.m_numPredefined; ii < num; ++ii) { - PredefinedUniform& predefined = _program.m_predefined[ii]; + const PredefinedUniform& predefined = _program.m_predefined[ii]; uint8_t flags = predefined.m_type&BGFX_UNIFORM_FRAGMENTBIT; switch (predefined.m_type&(~BGFX_UNIFORM_FRAGMENTBIT) ) { @@ -147,7 +187,7 @@ namespace bgfx { _renderer->setShaderUniform4x4f(flags , predefined.m_loc - , _frame->m_proj[_eye][_view].un.val + , _frame->m_view[_view].m_proj[_eye].un.val , bx::uint32_min(mtxRegs, predefined.m_count) ); } @@ -160,7 +200,7 @@ namespace bgfx { m_invProjCached = viewEye; bx::float4x4_inverse(&m_invProj.un.f4x4 - , &_frame->m_proj[_eye][_view].un.f4x4 + , &_frame->m_view[_view].m_proj[_eye].un.f4x4 ); } @@ -203,11 +243,11 @@ namespace bgfx case PredefinedUniform::Model: { - const Matrix4& model = _frame->m_matrixCache.m_cache[_draw.m_matrix]; + const Matrix4& model = frameCache.m_matrixCache.m_cache[_draw.m_startMatrix]; _renderer->setShaderUniform4x4f(flags , predefined.m_loc , model.un.val - , bx::uint32_min(_draw.m_num*mtxRegs, predefined.m_count) + , bx::uint32_min(_draw.m_numMatrices*mtxRegs, predefined.m_count) ); } break; @@ -215,7 +255,7 @@ namespace bgfx case PredefinedUniform::ModelView: { Matrix4 modelView; - const Matrix4& model = _frame->m_matrixCache.m_cache[_draw.m_matrix]; + const Matrix4& model = frameCache.m_matrixCache.m_cache[_draw.m_startMatrix]; bx::float4x4_mul(&modelView.un.f4x4 , &model.un.f4x4 , &m_view[_eye][_view].un.f4x4 @@ -231,7 +271,7 @@ namespace bgfx case PredefinedUniform::ModelViewProj: { Matrix4 modelViewProj; - const Matrix4& model = _frame->m_matrixCache.m_cache[_draw.m_matrix]; + const Matrix4& model = frameCache.m_matrixCache.m_cache[_draw.m_startMatrix]; bx::float4x4_mul(&modelViewProj.un.f4x4 , &model.un.f4x4 , &m_viewProj[_eye][_view].un.f4x4 @@ -436,6 +476,95 @@ namespace bgfx HashMap m_hashMap; }; + inline bool hasVertexStreamChanged(const RenderDraw& _current, const RenderDraw& _new) + { + if (_current.m_streamMask != _new.m_streamMask + || _current.m_instanceDataBuffer.idx != _new.m_instanceDataBuffer.idx + || _current.m_instanceDataOffset != _new.m_instanceDataOffset + || _current.m_instanceDataStride != _new.m_instanceDataStride) + { + return true; + } + + for (uint32_t idx = 0, streamMask = _new.m_streamMask, ntz = bx::uint32_cnttz(streamMask) + ; 0 != streamMask + ; streamMask >>= 1, idx += 1, ntz = bx::uint32_cnttz(streamMask) + ) + { + streamMask >>= ntz; + idx += ntz; + + if (_current.m_stream[idx].m_handle.idx != _new.m_stream[idx].m_handle.idx + || _current.m_stream[idx].m_startVertex != _new.m_stream[idx].m_startVertex) + { + return true; + } + } + + return false; + } + + template + struct Profiler + { + Profiler(Frame* _frame, Ty& _gpuTimer, const char (*_viewName)[BGFX_CONFIG_MAX_VIEW_NAME], bool _enabled = true) + : m_viewName(_viewName) + , m_frame(_frame) + , m_gpuTimer(_gpuTimer) + , m_queryIdx(UINT32_MAX) + , m_numViews(0) + , m_enabled(_enabled && 0 != (_frame->m_debug & BGFX_DEBUG_PROFILER) ) + { + } + + ~Profiler() + { + m_frame->m_perfStats.numViews = m_numViews; + } + + void begin(uint16_t _view) + { + if (m_enabled) + { + ViewStats& viewStats = m_frame->m_perfStats.viewStats[m_numViews]; + viewStats.cpuTimeElapsed = -bx::getHPCounter(); + + m_queryIdx = m_gpuTimer.begin(_view); + + viewStats.view = ViewId(_view); + bx::strCopy(viewStats.name + , BGFX_CONFIG_MAX_VIEW_NAME + , &m_viewName[_view][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] + ); + } + } + + void end() + { + if (m_enabled + && UINT32_MAX != m_queryIdx) + { + m_gpuTimer.end(m_queryIdx); + + ViewStats& viewStats = m_frame->m_perfStats.viewStats[m_numViews]; + const typename Ty::Result& result = m_gpuTimer.m_result[viewStats.view]; + + viewStats.cpuTimeElapsed += bx::getHPCounter(); + viewStats.gpuTimeElapsed = result.m_end - result.m_begin; + + ++m_numViews; + m_queryIdx = UINT32_MAX; + } + } + + const char (*m_viewName)[BGFX_CONFIG_MAX_VIEW_NAME]; + Frame* m_frame; + Ty& m_gpuTimer; + uint32_t m_queryIdx; + uint16_t m_numViews; + bool m_enabled; + }; + } // namespace bgfx #endif // BGFX_RENDERER_H_HEADER_GUARD diff --git a/3rdparty/bgfx/src/renderer_d3d.h b/3rdparty/bgfx/src/renderer_d3d.h index 3b0f48a..7923a16 100644 --- a/3rdparty/bgfx/src/renderer_d3d.h +++ b/3rdparty/bgfx/src/renderer_d3d.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -19,6 +19,14 @@ # define DX_CHECK_EXTRA_ARGS #endif // BGFX_CONFIG_DEBUG && BGFX_CONFIG_RENDERER_DIRECT3D9 +#ifndef D3DCOLOR_ARGB +# define D3DCOLOR_ARGB(_a, _r, _g, _b) ( (DWORD)( ( ( (_a)&0xff)<<24)|( ( (_r)&0xff)<<16)|( ( (_g)&0xff)<<8)|( (_b)&0xff) ) ) +#endif // D3DCOLOR_ARGB + +#ifndef D3DCOLOR_RGBA +# define D3DCOLOR_RGBA(_r, _g, _b, _a) D3DCOLOR_ARGB(_a, _r, _g, _b) +#endif // D3DCOLOR_RGBA + namespace bgfx { #if BX_PLATFORM_XBOXONE @@ -71,10 +79,10 @@ namespace bgfx #define DX_RELEASE(_ptr, _expected) _DX_RELEASE(_ptr, _expected, BX_CHECK) #define DX_RELEASE_WARNONLY(_ptr, _expected) _DX_RELEASE(_ptr, _expected, BX_WARN) - typedef int (WINAPI* PFN_D3DPERF_BEGIN_EVENT)(DWORD _color, LPCWSTR _wszName); + typedef int (WINAPI* PFN_D3DPERF_BEGIN_EVENT)(DWORD _color, LPCWSTR _name); typedef int (WINAPI* PFN_D3DPERF_END_EVENT)(); - typedef void (WINAPI* PFN_D3DPERF_SET_MARKER)(DWORD _color, LPCWSTR _wszName); - typedef void (WINAPI* PFN_D3DPERF_SET_REGION)(DWORD _color, LPCWSTR _wszName); + typedef void (WINAPI* PFN_D3DPERF_SET_MARKER)(DWORD _color, LPCWSTR _name); + typedef void (WINAPI* PFN_D3DPERF_SET_REGION)(DWORD _color, LPCWSTR _name); typedef BOOL (WINAPI* PFN_D3DPERF_QUERY_REPEAT_FRAME)(); typedef void (WINAPI* PFN_D3DPERF_SET_OPTIONS)(DWORD _options); typedef DWORD (WINAPI* PFN_D3DPERF_GET_STATUS)(); @@ -82,14 +90,14 @@ namespace bgfx typedef HRESULT (WINAPI* PFN_GET_DEBUG_INTERFACE)(REFIID _riid, void** _debug); typedef HRESULT (WINAPI* PFN_GET_DEBUG_INTERFACE1)(UINT _flags, REFIID _riid, void** _debug); -#define _PIX_SETMARKER(_col, _name) D3DPERF_SetMarker(_col, _name) +#define _PIX_SETMARKER(_col, _name) D3DPERF_SetMarker(_col, _name) #define _PIX_BEGINEVENT(_col, _name) D3DPERF_BeginEvent(_col, _name) -#define _PIX_ENDEVENT() D3DPERF_EndEvent() +#define _PIX_ENDEVENT() D3DPERF_EndEvent() #if BGFX_CONFIG_DEBUG_PIX # define PIX_SETMARKER(_color, _name) _PIX_SETMARKER(_color, _name) # define PIX_BEGINEVENT(_color, _name) _PIX_BEGINEVENT(_color, _name) -# define PIX_ENDEVENT() _PIX_ENDEVENT() +# define PIX_ENDEVENT() _PIX_ENDEVENT() #else # define PIX_SETMARKER(_color, _name) BX_UNUSED(_name) # define PIX_BEGINEVENT(_color, _name) BX_UNUSED(_name) diff --git a/3rdparty/bgfx/src/renderer_d3d11.cpp b/3rdparty/bgfx/src/renderer_d3d11.cpp index b4b203b..67889db 100644 --- a/3rdparty/bgfx/src/renderer_d3d11.cpp +++ b/3rdparty/bgfx/src/renderer_d3d11.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -15,20 +15,6 @@ # endif // BX_PLATFORM_WINRT #endif // !BX_PLATFORM_WINDOWS -#if BGFX_CONFIG_PROFILER_REMOTERY -# define BGFX_GPU_PROFILER_BIND(_device, _context) rmt_BindD3D11(_device, _context) -# define BGFX_GPU_PROFILER_UNBIND() rmt_UnbindD3D11() -# define BGFX_GPU_PROFILER_BEGIN(_group, _name, _color) rmt_BeginD3D11Sample(_group##_##_name) -# define BGFX_GPU_PROFILER_BEGIN_DYNAMIC(_namestr) rmt_BeginD3D11SampleDynamic(_namestr) -# define BGFX_GPU_PROFILER_END() rmt_EndD3D11Sample() -#else -# define BGFX_GPU_PROFILER_BIND(_device, _context) BX_NOOP() -# define BGFX_GPU_PROFILER_UNBIND() BX_NOOP() -# define BGFX_GPU_PROFILER_BEGIN(_group, _name, _color) BX_NOOP() -# define BGFX_GPU_PROFILER_BEGIN_DYNAMIC(_namestr) BX_NOOP() -# define BGFX_GPU_PROFILER_END() BX_NOOP() -#endif - #if BGFX_CONFIG_USE_OVR # include "hmd_ovr.h" #endif // BGFX_CONFIG_USE_OVR @@ -287,7 +273,7 @@ namespace bgfx { namespace d3d11 { DXGI_FORMAT_B4G4R4A4_UNORM, DXGI_FORMAT_B4G4R4A4_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA4 { DXGI_FORMAT_B5G5R5A1_UNORM, DXGI_FORMAT_B5G5R5A1_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGB5A1 { DXGI_FORMAT_R10G10B10A2_UNORM, DXGI_FORMAT_R10G10B10A2_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGB10A2 - { DXGI_FORMAT_R11G11B10_FLOAT, DXGI_FORMAT_R11G11B10_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R11G11B10F + { DXGI_FORMAT_R11G11B10_FLOAT, DXGI_FORMAT_R11G11B10_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG11B10F { DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // UnknownDepth { DXGI_FORMAT_R16_TYPELESS, DXGI_FORMAT_R16_UNORM, DXGI_FORMAT_D16_UNORM, DXGI_FORMAT_UNKNOWN }, // D16 { DXGI_FORMAT_R24G8_TYPELESS, DXGI_FORMAT_R24_UNORM_X8_TYPELESS, DXGI_FORMAT_D24_UNORM_S8_UINT, DXGI_FORMAT_UNKNOWN }, // D24 @@ -308,6 +294,8 @@ namespace bgfx { namespace d3d11 { "BITANGENT", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "COLOR", 1, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }, + { "COLOR", 2, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }, + { "COLOR", 3, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "BLENDINDICES", 0, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "BLENDWEIGHT", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }, { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0 }, @@ -356,7 +344,7 @@ namespace bgfx { namespace d3d11 }; BX_STATIC_ASSERT(AttribType::Count == BX_COUNTOF(s_attribType) ); - static D3D11_INPUT_ELEMENT_DESC* fillVertexDecl(D3D11_INPUT_ELEMENT_DESC* _out, const VertexDecl& _decl) + static D3D11_INPUT_ELEMENT_DESC* fillVertexDecl(uint8_t _stream, D3D11_INPUT_ELEMENT_DESC* _out, const VertexDecl& _decl) { D3D11_INPUT_ELEMENT_DESC* elem = _out; @@ -366,6 +354,8 @@ namespace bgfx { namespace d3d11 { bx::memCopy(elem, &s_attrib[attr], sizeof(D3D11_INPUT_ELEMENT_DESC) ); + elem->InputSlot = _stream; + if (0 == _decl.m_attributes[attr]) { elem->AlignedByteOffset = 0; @@ -409,19 +399,23 @@ namespace bgfx { namespace d3d11 BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wunused-const-variable"); BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wunneeded-internal-declaration"); - static const GUID WKPDID_D3DDebugObjectName = { 0x429b8c22, 0x9188, 0x4b0c, { 0x87, 0x42, 0xac, 0xb0, 0xbf, 0x85, 0xc2, 0x00 } }; - static const GUID IID_ID3D11Texture2D = { 0x6f15aaf2, 0xd208, 0x4e89, { 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, 0x4f, 0x9c } }; - static const GUID IID_IDXGIFactory = { 0x7b7166ec, 0x21c7, 0x44ae, { 0xb2, 0x1a, 0xc9, 0xae, 0x32, 0x1a, 0xe3, 0x69 } }; - static const GUID IID_IDXGIDevice0 = { 0x54ec77fa, 0x1377, 0x44e6, { 0x8c, 0x32, 0x88, 0xfd, 0x5f, 0x44, 0xc8, 0x4c } }; - static const GUID IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } }; - static const GUID IID_IDXGIDevice2 = { 0x05008617, 0xfbfd, 0x4051, { 0xa7, 0x90, 0x14, 0x48, 0x84, 0xb4, 0xf6, 0xa9 } }; - static const GUID IID_IDXGIDevice3 = { 0x6007896c, 0x3244, 0x4afd, { 0xbf, 0x18, 0xa6, 0xd3, 0xbe, 0xda, 0x50, 0x23 } }; - static const GUID IID_ID3D11Device1 = { 0xa04bfb29, 0x08ef, 0x43d6, { 0xa4, 0x9c, 0xa9, 0xbd, 0xbd, 0xcb, 0xe6, 0x86 } }; - static const GUID IID_ID3D11Device2 = { 0x9d06dffa, 0xd1e5, 0x4d07, { 0x83, 0xa8, 0x1b, 0xb1, 0x23, 0xf2, 0xf8, 0x41 } }; - static const GUID IID_ID3D11Device3 = { 0xa05c8c37, 0xd2c6, 0x4732, { 0xb3, 0xa0, 0x9c, 0xe0, 0xb0, 0xdc, 0x9a, 0xe6 } }; - static const GUID IID_IDXGIAdapter = { 0x2411e7e1, 0x12ac, 0x4ccf, { 0xbd, 0x14, 0x97, 0x98, 0xe8, 0x53, 0x4d, 0xc0 } }; - static const GUID IID_ID3D11InfoQueue = { 0x6543dbb6, 0x1b48, 0x42f5, { 0xab, 0x82, 0xe9, 0x7e, 0xc7, 0x43, 0x26, 0xf6 } }; - static const GUID IID_IDXGIDeviceRenderDoc = { 0xa7aa6116, 0x9c8d, 0x4bba, { 0x90, 0x83, 0xb4, 0xd8, 0x16, 0xb7, 0x1b, 0x78 } }; + static const GUID WKPDID_D3DDebugObjectName = { 0x429b8c22, 0x9188, 0x4b0c, { 0x87, 0x42, 0xac, 0xb0, 0xbf, 0x85, 0xc2, 0x00 } }; + static const GUID IID_ID3D11Texture2D = { 0x6f15aaf2, 0xd208, 0x4e89, { 0x9a, 0xb4, 0x48, 0x95, 0x35, 0xd3, 0x4f, 0x9c } }; + static const GUID IID_IDXGIFactory = { 0x7b7166ec, 0x21c7, 0x44ae, { 0xb2, 0x1a, 0xc9, 0xae, 0x32, 0x1a, 0xe3, 0x69 } }; + static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; + static const GUID IID_IDXGIDevice0 = { 0x54ec77fa, 0x1377, 0x44e6, { 0x8c, 0x32, 0x88, 0xfd, 0x5f, 0x44, 0xc8, 0x4c } }; + static const GUID IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } }; + static const GUID IID_IDXGIDevice2 = { 0x05008617, 0xfbfd, 0x4051, { 0xa7, 0x90, 0x14, 0x48, 0x84, 0xb4, 0xf6, 0xa9 } }; + static const GUID IID_IDXGIDevice3 = { 0x6007896c, 0x3244, 0x4afd, { 0xbf, 0x18, 0xa6, 0xd3, 0xbe, 0xda, 0x50, 0x23 } }; + static const GUID IID_ID3D11Device1 = { 0xa04bfb29, 0x08ef, 0x43d6, { 0xa4, 0x9c, 0xa9, 0xbd, 0xbd, 0xcb, 0xe6, 0x86 } }; + static const GUID IID_ID3D11Device2 = { 0x9d06dffa, 0xd1e5, 0x4d07, { 0x83, 0xa8, 0x1b, 0xb1, 0x23, 0xf2, 0xf8, 0x41 } }; + static const GUID IID_ID3D11Device3 = { 0xa05c8c37, 0xd2c6, 0x4732, { 0xb3, 0xa0, 0x9c, 0xe0, 0xb0, 0xdc, 0x9a, 0xe6 } }; + static const GUID IID_IDXGIAdapter = { 0x2411e7e1, 0x12ac, 0x4ccf, { 0xbd, 0x14, 0x97, 0x98, 0xe8, 0x53, 0x4d, 0xc0 } }; + static const GUID IID_IDXGISwapChain3 = { 0x94d99bdb, 0xf1f8, 0x4ab0, { 0xb2, 0x36, 0x7d, 0xa0, 0x17, 0x0e, 0xda, 0xb1 } }; + static const GUID IID_IDXGISwapChain4 = { 0x3d585d5a, 0xbd4a, 0x489e, { 0xb1, 0xf4, 0x3d, 0xbc, 0xb6, 0x45, 0x2f, 0xfb } }; + static const GUID IID_ID3D11InfoQueue = { 0x6543dbb6, 0x1b48, 0x42f5, { 0xab, 0x82, 0xe9, 0x7e, 0xc7, 0x43, 0x26, 0xf6 } }; + static const GUID IID_IDXGIDeviceRenderDoc = { 0xa7aa6116, 0x9c8d, 0x4bba, { 0x90, 0x83, 0xb4, 0xd8, 0x16, 0xb7, 0x1b, 0x78 } }; + static const GUID IID_ID3DUserDefinedAnnotation = { 0xb2daad8b, 0x03d4, 0x4dbf, { 0x95, 0xeb, 0x32, 0xab, 0x4b, 0x63, 0xd0, 0xab } }; enum D3D11_FORMAT_SUPPORT2 { @@ -429,6 +423,13 @@ namespace bgfx { namespace d3d11 D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80, }; + static const DXGI_COLOR_SPACE_TYPE s_colorSpace[] = + { + DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709, // gamma 2.2, BT.709 + DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709, // gamma 1.0, BT.709 + DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020, // gamma 2084, BT.2020 + }; + static const GUID s_d3dDeviceIIDs[] = { IID_ID3D11Device3, @@ -444,6 +445,12 @@ namespace bgfx { namespace d3d11 IID_IDXGIDevice0, }; + static const GUID s_dxgiSwapChainIIDs[] = + { + IID_IDXGISwapChain4, + IID_IDXGISwapChain3, + }; + inline bool isLost(HRESULT _hr) { return false @@ -502,12 +509,10 @@ namespace bgfx { namespace d3d11 BX_PRAGMA_DIAGNOSTIC_POP(); - static BX_NO_INLINE bool getIntelExtensions(ID3D11Device* _device) + static HRESULT setIntelExtension(ID3D11Device* _device, const void* _data, uint32_t _size) { - uint8_t temp[28]; - D3D11_BUFFER_DESC desc; - desc.ByteWidth = sizeof(temp); + desc.ByteWidth = _size; desc.Usage = D3D11_USAGE_STAGING; desc.BindFlags = 0; desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; @@ -515,23 +520,56 @@ namespace bgfx { namespace d3d11 desc.StructureByteStride = 0; D3D11_SUBRESOURCE_DATA initData; - initData.pSysMem = &temp; - initData.SysMemPitch = sizeof(temp); + initData.pSysMem = _data; + initData.SysMemPitch = _size; initData.SysMemSlicePitch = 0; - bx::StaticMemoryBlockWriter writer(&temp, sizeof(temp) ); - bx::write(&writer, "INTCEXTNCAPSFUNC", 16); - bx::write(&writer, UINT32_C(0x00010000) ); - bx::write(&writer, UINT32_C(0) ); - bx::write(&writer, UINT32_C(0) ); - ID3D11Buffer* buffer; HRESULT hr = _device->CreateBuffer(&desc, &initData, &buffer); if (SUCCEEDED(hr) ) { buffer->Release(); + } + return hr; + }; + + static const uint32_t kIntelExtensionInterfaceVersion = UINT32_C(0x10000); + + struct IntelExtension + { + char key[16]; + uint32_t version; + uint32_t type; + uint32_t data[16]; + }; + + static const IntelExtension s_intelDirectAccessResource = + { + { 'I', 'N', 'T', 'C', 'E', 'X', 'T', 'N', 'R', 'E', 'S', 'O', 'U', 'R', 'C', 'E' }, + kIntelExtensionInterfaceVersion, + 1, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + }; + + static HRESULT setIntelDirectAccessResource(ID3D11Device* _device) + { + return setIntelExtension(_device, &s_intelDirectAccessResource, sizeof(s_intelDirectAccessResource) ); + } + + static BX_NO_INLINE bool getIntelExtensions(ID3D11Device* _device) + { + uint8_t temp[28]; + + bx::StaticMemoryBlockWriter writer(&temp, sizeof(temp) ); + bx::write(&writer, "INTCEXTNCAPSFUNC", 16); + bx::write(&writer, kIntelExtensionInterfaceVersion); + bx::write(&writer, UINT32_C(0) ); + bx::write(&writer, UINT32_C(0) ); + + if (SUCCEEDED(setIntelExtension(_device, temp, sizeof(temp) ) ) ) + { bx::MemoryReader reader(&temp, sizeof(temp) ); bx::skip(&reader, 16); @@ -572,8 +610,12 @@ namespace bgfx { namespace d3d11 #endif // BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT } - // Reference: - // https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK + /* + * AMD GPU Services (AGS) library + * + * Reference: + * https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK + */ enum AGS_RETURN_CODE { AGS_SUCCESS, @@ -632,6 +674,9 @@ namespace bgfx { namespace d3d11 void amdAgsMultiDrawInstancedIndirect(uint32_t _numDrawIndirect, ID3D11Buffer* _ptr, uint32_t _offset, uint32_t _stride); void amdAgsMultiDrawIndexedInstancedIndirect(uint32_t _numDrawIndirect, ID3D11Buffer* _ptr, uint32_t _offset, uint32_t _stride); + void nvapiMultiDrawInstancedIndirect(uint32_t _numDrawIndirect, ID3D11Buffer* _ptr, uint32_t _offset, uint32_t _stride); + void nvapiMultiDrawIndexedInstancedIndirect(uint32_t _numDrawIndirect, ID3D11Buffer* _ptr, uint32_t _offset, uint32_t _stride); + static MultiDrawIndirectFn multiDrawInstancedIndirect; static MultiDrawIndirectFn multiDrawIndexedInstancedIndirect; @@ -645,17 +690,21 @@ namespace bgfx { namespace d3d11 static PFN_GET_DEBUG_INTERFACE1 DXGIGetDebugInterface1; #endif // USE_D3D11_DYNAMIC_LIB + int WINAPI d3d11Annotation_BeginEvent(DWORD _color, LPCWSTR _name); + int WINAPI d3d11Annotation_EndEvent(); + void WINAPI d3d11Annotation_SetMarker(DWORD _color, LPCWSTR _name); + #if BGFX_CONFIG_USE_OVR class VRImplOVRD3D11 : public VRImplOVR { public: VRImplOVRD3D11(); - virtual bool createSwapChain(const VRDesc& _desc, int _msaaSamples, int _mirrorWidth, int _mirrorHeight) BX_OVERRIDE; - virtual void destroySwapChain() BX_OVERRIDE; - virtual void destroyMirror() BX_OVERRIDE; - virtual void makeRenderTargetActive(const VRDesc& _desc) BX_OVERRIDE; - virtual bool submitSwapChain(const VRDesc& _desc) BX_OVERRIDE; + virtual bool createSwapChain(const VRDesc& _desc, int _msaaSamples, int _mirrorWidth, int _mirrorHeight) override; + virtual void destroySwapChain() override; + virtual void destroyMirror() override; + virtual void makeRenderTargetActive(const VRDesc& _desc) override; + virtual bool submitSwapChain(const VRDesc& _desc) override; private: ID3D11DepthStencilView* m_depthBuffer; @@ -681,12 +730,14 @@ namespace bgfx { namespace d3d11 , m_driverType(D3D_DRIVER_TYPE_NULL) , m_featureLevel(D3D_FEATURE_LEVEL(0) ) , m_adapter(NULL) + , m_output(NULL) , m_factory(NULL) , m_swapChain(NULL) , m_lost(false) , m_numWindows(0) , m_device(NULL) , m_deviceCtx(NULL) + , m_annotation(NULL) , m_infoQueue(NULL) , m_backBufferColor(NULL) , m_backBufferDepthStencil(NULL) @@ -702,8 +753,9 @@ namespace bgfx { namespace d3d11 , m_fsChanges(0) , m_rtMsaa(false) , m_timerQuerySupport(false) + , m_directAccessSupport(false) { - m_fbh.idx = invalidHandle; + m_fbh.idx = kInvalidHandle; bx::memSet(&m_adapterDesc, 0, sizeof(m_adapterDesc) ); bx::memSet(&m_scd, 0, sizeof(m_scd) ); bx::memSet(&m_windows, 0xff, sizeof(m_windows) ); @@ -713,7 +765,7 @@ namespace bgfx { namespace d3d11 { } - bool init() + bool init(const Init& _init) { struct ErrorState { @@ -740,18 +792,18 @@ namespace bgfx { namespace d3d11 m_renderdocdll = loadRenderDoc(); } - m_fbh.idx = invalidHandle; + m_fbh.idx = kInvalidHandle; bx::memSet(m_uniforms, 0, sizeof(m_uniforms) ); bx::memSet(&m_resolution, 0, sizeof(m_resolution) ); m_ags = NULL; m_agsdll = bx::dlopen( #if BX_ARCH_32BIT - "amd_ags_x86.dll" + "amd_ags_x86.dll" #else - "amd_ags_x64.dll" + "amd_ags_x64.dll" #endif // BX_ARCH_32BIT - ); + ); if (NULL != m_agsdll) { agsInit = (PFN_AGS_INIT )bx::dlsym(m_agsdll, "agsInit"); @@ -824,12 +876,14 @@ namespace bgfx { namespace d3d11 } } + m_nvapi.init(); + #if USE_D3D11_DYNAMIC_LIB m_d3d11dll = bx::dlopen("d3d11.dll"); if (NULL == m_d3d11dll) { - BX_TRACE("Failed to load d3d11.dll."); + BX_TRACE("Init error: Failed to load d3d11.dll."); goto error; } @@ -858,14 +912,14 @@ namespace bgfx { namespace d3d11 D3D11CreateDevice = (PFN_D3D11_CREATE_DEVICE)bx::dlsym(m_d3d11dll, "D3D11CreateDevice"); if (NULL == D3D11CreateDevice) { - BX_TRACE("Function D3D11CreateDevice not found."); + BX_TRACE("Init error: Function D3D11CreateDevice not found."); goto error; } m_dxgidll = bx::dlopen("dxgi.dll"); if (NULL == m_dxgidll) { - BX_TRACE("Failed to load dxgi.dll."); + BX_TRACE("Init error: Failed to load dxgi.dll."); goto error; } @@ -878,7 +932,7 @@ namespace bgfx { namespace d3d11 } if (NULL == CreateDXGIFactory) { - BX_TRACE("Function CreateDXGIFactory not found."); + BX_TRACE("Init error: Function CreateDXGIFactory not found."); goto error; } @@ -904,7 +958,7 @@ namespace bgfx { namespace d3d11 IDXGIFactory* factory; #if BX_PLATFORM_WINRT // WinRT requires the IDXGIFactory2 interface, which isn't supported on older platforms - hr = CreateDXGIFactory1(__uuidof(IDXGIFactory2), (void**)&factory); + hr = CreateDXGIFactory1(IID_IDXGIFactory2, (void**)&factory); #elif BX_PLATFORM_WINDOWS hr = CreateDXGIFactory(IID_IDXGIFactory, (void**)&factory); #else @@ -913,7 +967,7 @@ namespace bgfx { namespace d3d11 #endif // BX_PLATFORM_* if (FAILED(hr) ) { - BX_TRACE("Unable to create DXGI factory."); + BX_TRACE("Init error: Unable to create DXGI factory."); goto error; } @@ -923,7 +977,13 @@ namespace bgfx { namespace d3d11 if (NULL == m_device) { + if (NULL != m_renderdocdll) + { + setGraphicsDebuggerPresent(true); + } + m_adapter = NULL; + m_output = NULL; m_driverType = BGFX_PCI_ID_SOFTWARE_RASTERIZER == g_caps.vendorId ? D3D_DRIVER_TYPE_WARP : D3D_DRIVER_TYPE_HARDWARE @@ -974,7 +1034,7 @@ namespace bgfx { namespace d3d11 } if (BX_ENABLED(BGFX_CONFIG_DEBUG_PERFHUD) - && 0 != bx::strnstr(description, "PerfHUD") ) + && 0 != bx::strFind(description, "PerfHUD") ) { m_adapter = adapter; m_driverType = D3D_DRIVER_TYPE_REFERENCE; @@ -982,8 +1042,37 @@ namespace bgfx { namespace d3d11 } } + IDXGIOutput* output; + for (uint32_t jj = 0 + ; DXGI_ERROR_NOT_FOUND != adapter->EnumOutputs(jj, &output) + ; ++jj + ) + { + DXGI_OUTPUT_DESC outputDesc; + hr = output->GetDesc(&outputDesc); + if (SUCCEEDED(hr)) + { + BX_TRACE("\tOutput #%d", jj); + + char deviceName[BX_COUNTOF(outputDesc.DeviceName)]; + wcstombs(deviceName, outputDesc.DeviceName, BX_COUNTOF(outputDesc.DeviceName)); + BX_TRACE("\t\tDeviceName: %s", deviceName); + BX_TRACE("\t\tDesktopCoordinates: %d, %d, %d, %d" + , outputDesc.DesktopCoordinates.left + , outputDesc.DesktopCoordinates.top + , outputDesc.DesktopCoordinates.right + , outputDesc.DesktopCoordinates.bottom + ); + BX_TRACE("\t\tAttachedToDesktop: %d", outputDesc.AttachedToDesktop); + BX_TRACE("\t\tRotation: %d", outputDesc.Rotation); + + DX_RELEASE(output, 0); + } + } + DX_RELEASE(adapter, adapter == m_adapter ? 1 : 0); } + DX_RELEASE(factory, NULL != m_adapter ? 1 : 0); } @@ -1055,7 +1144,7 @@ namespace bgfx { namespace d3d11 if (FAILED(hr) ) { - BX_TRACE("Unable to create Direct3D11 device."); + BX_TRACE("Init error: Unable to create Direct3D11 device."); goto error; } @@ -1070,7 +1159,7 @@ namespace bgfx { namespace d3d11 if (NULL == m_deviceCtx) { - BX_TRACE("Unable to retrieve Direct3D11 ImmediateContext."); + BX_TRACE("Init error: Unable to retrieve Direct3D11 ImmediateContext."); goto error; } @@ -1091,13 +1180,6 @@ namespace bgfx { namespace d3d11 } } - if (NULL != m_renderdocdll) - { - // RenderDoc doesn't support ID3D11Device3 yet: - // https://github.com/baldurk/renderdoc/issues/235 - m_deviceInterfaceVersion = bx::uint32_min(m_deviceInterfaceVersion, 1); - } - IDXGIDevice* device = NULL; IDXGIAdapter* adapter = NULL; hr = E_FAIL; @@ -1131,7 +1213,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); if (FAILED(hr) ) { - BX_TRACE("Unable to create Direct3D11 device."); + BX_TRACE("Init error: Unable to create Direct3D11 device."); goto error; } @@ -1163,31 +1245,41 @@ BX_PRAGMA_DIAGNOSTIC_POP(); ; g_caps.deviceId = (uint16_t)m_adapterDesc.DeviceId; + if (BGFX_PCI_ID_NVIDIA != m_adapterDesc.VendorId) + { + m_nvapi.shutdown(); + } + if (NULL == g_platformData.backBuffer) { #if !BX_PLATFORM_WINDOWS - hr = adapter->GetParent(__uuidof(IDXGIFactory2), (void**)&m_factory); + hr = adapter->GetParent(IID_IDXGIFactory2, (void**)&m_factory); DX_RELEASE(adapter, 2); if (FAILED(hr) ) { - BX_TRACE("Unable to create Direct3D11 device."); + BX_TRACE("Init error: Unable to create Direct3D11 device."); goto error; } + m_swapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; + m_swapBufferCount = 2; + bx::memSet(&m_scd, 0, sizeof(m_scd) ); - m_scd.Width = BGFX_DEFAULT_WIDTH; - m_scd.Height = BGFX_DEFAULT_HEIGHT; + m_scd.Width = _init.resolution.m_width; + m_scd.Height = _init.resolution.m_height; m_scd.Format = DXGI_FORMAT_R8G8B8A8_UNORM; m_scd.Stereo = false; m_scd.SampleDesc.Count = 1; m_scd.SampleDesc.Quality = 0; m_scd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - m_scd.BufferCount = 2; + m_scd.BufferCount = m_swapBufferCount; m_scd.Scaling = 0 == g_platformData.ndt ? DXGI_SCALING_NONE - : DXGI_SCALING_STRETCH; - m_scd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; + : DXGI_SCALING_STRETCH + ; + m_scd.SwapEffect = m_swapEffect; m_scd.AlphaMode = DXGI_ALPHA_MODE_IGNORE; + m_scd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; if (NULL == g_platformData.ndt) { @@ -1197,7 +1289,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); , NULL , &m_swapChain ); - BGFX_FATAL(SUCCEEDED(hr), Fatal::UnableToInitialize, "Unable to create Direct3D11 swap chain."); + + if (FAILED(hr) ) + { + BX_TRACE("Init error: Unable to create Direct3D11 swap chain."); + goto error; + } } else { @@ -1230,20 +1327,29 @@ BX_PRAGMA_DIAGNOSTIC_POP(); DX_RELEASE(adapter, 2); if (FAILED(hr) ) { - BX_TRACE("Unable to create Direct3D11 device."); + BX_TRACE("Init error: Unable to create Direct3D11 device."); goto error; } +#if 0 + m_swapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; + m_swapBufferCount = 2; +#else + m_swapEffect = DXGI_SWAP_EFFECT_DISCARD; + m_swapBufferCount = 1; +#endif // 0 + bx::memSet(&m_scd, 0, sizeof(m_scd) ); - m_scd.BufferDesc.Width = BGFX_DEFAULT_WIDTH; - m_scd.BufferDesc.Height = BGFX_DEFAULT_HEIGHT; + m_scd.BufferDesc.Width = _init.resolution.m_width; + m_scd.BufferDesc.Height = _init.resolution.m_height; m_scd.BufferDesc.RefreshRate.Numerator = 60; m_scd.BufferDesc.RefreshRate.Denominator = 1; m_scd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; m_scd.SampleDesc.Count = 1; m_scd.SampleDesc.Quality = 0; m_scd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - m_scd.BufferCount = 1; + m_scd.BufferCount = m_swapBufferCount; + m_scd.SwapEffect = m_swapEffect; m_scd.OutputWindow = (HWND)g_platformData.nwh; m_scd.Windowed = true; @@ -1251,24 +1357,70 @@ BX_PRAGMA_DIAGNOSTIC_POP(); , &m_scd , &m_swapChain ); + if (FAILED(hr) ) + { + // DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL is not available on win7 + // Try again with DXGI_SWAP_EFFECT_DISCARD + m_swapEffect = DXGI_SWAP_EFFECT_DISCARD; + m_swapBufferCount = 1; + + m_scd.BufferCount = m_swapBufferCount; + m_scd.SwapEffect = m_swapEffect; + hr = m_factory->CreateSwapChain(m_device + , &m_scd + , &m_swapChain + ); + } DX_CHECK(m_factory->MakeWindowAssociation( (HWND)g_platformData.nwh, 0 | DXGI_MWA_NO_WINDOW_CHANGES | DXGI_MWA_NO_ALT_ENTER ) ); #endif // BX_PLATFORM_* + if (FAILED(hr) ) { - BX_TRACE("Failed to create swap chain."); + BX_TRACE("Init error: Failed to create swap chain."); goto error; } + +#if BX_PLATFORM_WINDOWS + for (uint32_t ii = 0; ii < BX_COUNTOF(s_dxgiSwapChainIIDs); ++ii) + { + IDXGISwapChain1* swapChain; + hr = m_swapChain->QueryInterface(s_dxgiSwapChainIIDs[ii], (void**)&swapChain); + BX_TRACE("DXGI swap chain %d, hr %x", 4-ii, hr); + + if (SUCCEEDED(hr) ) + { + DX_RELEASE(m_swapChain, 1); + m_swapChain = swapChain; + + BX_TRACE("Color space support:"); + for (uint32_t jj = 0; jj < BX_COUNTOF(s_colorSpace); ++jj) + { + uint32_t colorSpaceSupport; + reinterpret_cast(m_swapChain)->CheckColorSpaceSupport(s_colorSpace[jj], &colorSpaceSupport); + BX_TRACE("\t%2d, 0x%08x, %s" + , s_colorSpace[jj] + , colorSpaceSupport + , 0 != (colorSpaceSupport & DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT) + ? "supported" + : "-" + ); + } + + break; + } + } +#endif // BX_PLATFORM_WINDOWS } else { bx::memSet(&m_scd, 0, sizeof(m_scd) ); m_scd.SampleDesc.Count = 1; m_scd.SampleDesc.Quality = 0; - setBufferSize(BGFX_DEFAULT_WIDTH, BGFX_DEFAULT_HEIGHT); + setBufferSize(_init.resolution.m_width, _init.resolution.m_height); m_backBufferColor = (ID3D11RenderTargetView*)g_platformData.backBuffer; m_backBufferDepthStencil = (ID3D11DepthStencilView*)g_platformData.backBufferDS; } @@ -1276,6 +1428,20 @@ BX_PRAGMA_DIAGNOSTIC_POP(); m_numWindows = 1; +#if USE_D3D11_DYNAMIC_LIB + if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) + { + hr = m_deviceCtx->QueryInterface(IID_ID3DUserDefinedAnnotation, (void**)&m_annotation); + + if (SUCCEEDED(hr) ) + { + D3DPERF_BeginEvent = d3d11Annotation_BeginEvent; + D3DPERF_EndEvent = d3d11Annotation_EndEvent; + D3DPERF_SetMarker = d3d11Annotation_SetMarker; + } + } +#endif // USE_D3D11_DYNAMIC_LIB + if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) { hr = m_device->QueryInterface(IID_ID3D11InfoQueue, (void**)&m_infoQueue); @@ -1293,8 +1459,19 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { D3D11_MESSAGE_CATEGORY_STATE_CREATION, }; + filter.DenyList.NumCategories = BX_COUNTOF(catlist); filter.DenyList.pCategoryList = catlist; + + D3D11_MESSAGE_ID idlist[] = + { + D3D11_MESSAGE_ID_DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET, + D3D11_MESSAGE_ID_QUERY_BEGIN_ABANDONING_PREVIOUS_RESULTS, + }; + + filter.DenyList.NumIDs = BX_COUNTOF(idlist); + filter.DenyList.pIDList = idlist; + m_infoQueue->PushStorageFilter(&filter); DX_RELEASE(m_infoQueue, 3); @@ -1307,36 +1484,67 @@ BX_PRAGMA_DIAGNOSTIC_POP(); | BGFX_CAPS_VERTEX_ATTRIB_HALF | BGFX_CAPS_VERTEX_ATTRIB_UINT10 | BGFX_CAPS_FRAGMENT_DEPTH - | (getIntelExtensions(m_device) ? BGFX_CAPS_FRAGMENT_ORDERING : 0) + | (getIntelExtensions(m_device) + ? BGFX_CAPS_FRAGMENT_ORDERING + | BGFX_CAPS_TEXTURE_DIRECT_ACCESS + : 0) | BGFX_CAPS_SWAP_CHAIN - | (m_ovr.isInitialized() ? BGFX_CAPS_HMD : 0) + | (m_ovr.isInitialized() + ? BGFX_CAPS_HMD + : 0) | BGFX_CAPS_DRAW_INDIRECT | BGFX_CAPS_TEXTURE_BLIT | BGFX_CAPS_TEXTURE_READ_BACK - | ( (m_featureLevel >= D3D_FEATURE_LEVEL_9_2) ? BGFX_CAPS_OCCLUSION_QUERY : 0) + | ( (m_featureLevel >= D3D_FEATURE_LEVEL_9_2) + ? BGFX_CAPS_OCCLUSION_QUERY + : 0) | BGFX_CAPS_ALPHA_TO_COVERAGE - | ( (m_deviceInterfaceVersion >= 3) ? BGFX_CAPS_CONSERVATIVE_RASTER : 0) + | ( (m_deviceInterfaceVersion >= 3) + ? BGFX_CAPS_CONSERVATIVE_RASTER + : 0) | BGFX_CAPS_TEXTURE_2D_ARRAY | BGFX_CAPS_TEXTURE_CUBE_ARRAY ); - m_timerQuerySupport = m_featureLevel >= D3D_FEATURE_LEVEL_10_0; + m_timerQuerySupport = m_featureLevel >= D3D_FEATURE_LEVEL_10_0; + m_directAccessSupport = 0 != (g_caps.supported & BGFX_CAPS_TEXTURE_DIRECT_ACCESS); if (m_featureLevel <= D3D_FEATURE_LEVEL_9_2) { g_caps.limits.maxTextureSize = D3D_FL9_1_REQ_TEXTURE2D_U_OR_V_DIMENSION; - g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) ); + g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min( + D3D_FL9_1_SIMULTANEOUS_RENDER_TARGET_COUNT + , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS + ) ); + g_caps.limits.maxVertexStreams = uint8_t(bx::uint32_min( + 16 + , BGFX_CONFIG_MAX_VERTEX_STREAMS + ) ); } else if (m_featureLevel == D3D_FEATURE_LEVEL_9_3) { g_caps.limits.maxTextureSize = D3D_FL9_3_REQ_TEXTURE2D_U_OR_V_DIMENSION; - g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) ); + g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min( + D3D_FL9_3_SIMULTANEOUS_RENDER_TARGET_COUNT + , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS + ) ); + g_caps.limits.maxVertexStreams = uint8_t(bx::uint32_min( + 16 + , BGFX_CONFIG_MAX_VERTEX_STREAMS + ) ); } else { g_caps.supported |= BGFX_CAPS_TEXTURE_COMPARE_ALL; g_caps.limits.maxTextureSize = D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; - g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) ); + g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min( + D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT + , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS + ) ); + g_caps.limits.maxVertexStreams = uint8_t(bx::uint32_min( + D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT + , BGFX_CONFIG_MAX_VERTEX_STREAMS + ) ); } // 32-bit indices only supported on 9_2+. @@ -1637,6 +1845,13 @@ BX_PRAGMA_DIAGNOSTIC_POP(); m_ags = NULL; } } + else if (m_nvapi.isInitialized() + && NULL != m_nvapi.nvApiD3D11MultiDrawInstancedIndirect + && NULL != m_nvapi.nvApiD3D11MultiDrawIndexedInstancedIndirect) + { + multiDrawInstancedIndirect = nvapiMultiDrawInstancedIndirect; + multiDrawIndexedInstancedIndirect = nvapiMultiDrawIndexedInstancedIndirect; + } } // @@ -1644,8 +1859,6 @@ BX_PRAGMA_DIAGNOSTIC_POP(); postReset(); } - BGFX_GPU_PROFILER_BIND(m_device, m_deviceCtx); - g_internalData.context = m_device; return true; @@ -1657,6 +1870,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); DX_RELEASE(m_deviceCtx, 0); DX_RELEASE(m_device, 0); DX_RELEASE(m_factory, 0); + BX_FALLTHROUGH; #if USE_D3D11_DYNAMIC_LIB case ErrorState::LoadedDXGI: @@ -1674,20 +1888,28 @@ BX_PRAGMA_DIAGNOSTIC_POP(); bx::dlclose(m_dxgidll); m_dxgidll = NULL; + BX_FALLTHROUGH; case ErrorState::LoadedD3D11: bx::dlclose(m_d3d11dll); m_d3d11dll = NULL; + BX_FALLTHROUGH; + #endif // USE_D3D11_DYNAMIC_LIB case ErrorState::Default: default: + m_nvapi.shutdown(); + if (NULL != m_ags) { agsDeInit(m_ags); + m_ags = NULL; } + bx::dlclose(m_agsdll); m_agsdll = NULL; + unloadRenderDoc(m_renderdocdll); m_ovr.shutdown(); break; @@ -1698,11 +1920,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); void shutdown() { - BGFX_GPU_PROFILER_UNBIND(); - preReset(); m_ovr.shutdown(); + m_nvapi.shutdown(); + if (NULL != m_ags) { agsDeInit(m_ags); @@ -1741,6 +1963,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); m_textures[ii].destroy(); } + DX_RELEASE(m_annotation, 1); DX_RELEASE(m_swapChain, 0); DX_RELEASE(m_deviceCtx, 0); DX_RELEASE(m_device, 0); @@ -1769,117 +1992,117 @@ BX_PRAGMA_DIAGNOSTIC_POP(); #endif // USE_D3D11_DYNAMIC_LIB } - RendererType::Enum getRendererType() const BX_OVERRIDE + RendererType::Enum getRendererType() const override { return RendererType::Direct3D11; } - const char* getRendererName() const BX_OVERRIDE + const char* getRendererName() const override { return BGFX_RENDERER_DIRECT3D11_NAME; } - void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) BX_OVERRIDE + void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_mem->size, _mem->data, _flags); } - void destroyIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) BX_OVERRIDE + void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) override { VertexDecl& decl = m_vertexDecls[_handle.idx]; bx::memCopy(&decl, &_decl, sizeof(VertexDecl) ); dump(decl); } - void destroyVertexDecl(VertexDeclHandle /*_handle*/) BX_OVERRIDE + void destroyVertexDecl(VertexDeclHandle /*_handle*/) override { } - void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t _flags) BX_OVERRIDE + void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t _flags) override { m_vertexBuffers[_handle.idx].create(_mem->size, _mem->data, _declHandle, _flags); } - void destroyVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_size, NULL, _flags); } - void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { m_indexBuffers[_handle.idx].update(_offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { VertexDeclHandle decl = BGFX_INVALID_HANDLE; m_vertexBuffers[_handle.idx].create(_size, NULL, decl, _flags); } - void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { m_vertexBuffers[_handle.idx].update(_offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createShader(ShaderHandle _handle, Memory* _mem) BX_OVERRIDE + void createShader(ShaderHandle _handle, Memory* _mem) override { m_shaders[_handle.idx].create(_mem); } - void destroyShader(ShaderHandle _handle) BX_OVERRIDE + void destroyShader(ShaderHandle _handle) override { m_shaders[_handle.idx].destroy(); } - void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) BX_OVERRIDE + void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) override { m_program[_handle.idx].create(&m_shaders[_vsh.idx], isValid(_fsh) ? &m_shaders[_fsh.idx] : NULL); } - void destroyProgram(ProgramHandle _handle) BX_OVERRIDE + void destroyProgram(ProgramHandle _handle) override { m_program[_handle.idx].destroy(); } - void createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) BX_OVERRIDE + void* createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) override { - m_textures[_handle.idx].create(_mem, _flags, _skip); + return m_textures[_handle.idx].create(_mem, _flags, _skip); } - void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) BX_OVERRIDE + void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) override { } - void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) BX_OVERRIDE + void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) override { m_textures[_handle.idx].update(_side, _mip, _rect, _z, _depth, _pitch, _mem); } - void updateTextureEnd() BX_OVERRIDE + void updateTextureEnd() override { } - void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) BX_OVERRIDE + void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) override { const TextureD3D11& texture = m_textures[_handle.idx]; D3D11_MAPPED_SUBRESOURCE mapped; @@ -1907,7 +2130,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); m_deviceCtx->Unmap(texture.m_ptr, _mip); } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) override { TextureD3D11& texture = m_textures[_handle.idx]; @@ -1935,7 +2158,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); release(mem); } - void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE + void overrideInternal(TextureHandle _handle, uintptr_t _ptr) override { // Resource ref. counts might be messed up outside of bgfx. // Disabling ref. count check once texture is overridden. @@ -1943,7 +2166,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); m_textures[_handle.idx].overrideInternal(_ptr); } - uintptr_t getInternal(TextureHandle _handle) BX_OVERRIDE + uintptr_t getInternal(TextureHandle _handle) override { // Resource ref. counts might be messed up outside of bgfx. // Disabling ref. count check once texture is overridden. @@ -1951,24 +2174,24 @@ BX_PRAGMA_DIAGNOSTIC_POP(); return uintptr_t(m_textures[_handle.idx].m_ptr); } - void destroyTexture(TextureHandle _handle) BX_OVERRIDE + void destroyTexture(TextureHandle _handle) override { m_textures[_handle.idx].destroy(); } - void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) override { m_frameBuffers[_handle.idx].create(_num, _attachment); } - void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) override { uint16_t denseIdx = m_numWindows++; m_windows[denseIdx] = _handle; m_frameBuffers[_handle.idx].create(denseIdx, _nwh, _width, _height, _depthFormat); } - void destroyFrameBuffer(FrameBufferHandle _handle) BX_OVERRIDE + void destroyFrameBuffer(FrameBufferHandle _handle) override { uint16_t denseIdx = m_frameBuffers[_handle.idx].destroy(); if (UINT16_MAX != denseIdx) @@ -1983,7 +2206,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } - void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) BX_OVERRIDE + void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) override { if (NULL != m_uniforms[_handle.idx]) { @@ -1997,14 +2220,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); m_uniformReg.add(_handle, _name, data); } - void destroyUniform(UniformHandle _handle) BX_OVERRIDE + void destroyUniform(UniformHandle _handle) override { BX_FREE(g_allocator, m_uniforms[_handle.idx]); m_uniforms[_handle.idx] = NULL; m_uniformReg.remove(_handle); } - void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) BX_OVERRIDE + void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) override { IDXGISwapChain* swapChain = isValid(_handle) ? m_frameBuffers[_handle.idx].m_swapChain @@ -2057,10 +2280,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); DX_CHECK(m_deviceCtx->Map(texture, 0, D3D11_MAP_READ, 0, &mapped) ); bimg::imageSwizzleBgra8( mapped.pData + , mapped.RowPitch , backBufferDesc.Width , backBufferDesc.Height - , mapped.RowPitch , mapped.pData + , mapped.RowPitch ); g_callback->screenShot(_filePath , backBufferDesc.Width @@ -2078,7 +2302,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); DX_RELEASE(backBuffer, 0); } - void updateViewName(uint8_t _id, const char* _name) BX_OVERRIDE + void updateViewName(ViewId _id, const char* _name) override { if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) { @@ -2088,18 +2312,18 @@ BX_PRAGMA_DIAGNOSTIC_POP(); ); } - bx::strlcpy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] - , _name + bx::strCopy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] , BX_COUNTOF(s_viewName[0]) - BGFX_CONFIG_MAX_VIEW_NAME_RESERVED + , _name ); } - void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) BX_OVERRIDE + void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) override { bx::memCopy(m_uniforms[_loc], _data, _size); } - void setMarker(const char* _marker, uint32_t _size) BX_OVERRIDE + void setMarker(const char* _marker, uint32_t _size) override { if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) { @@ -2110,22 +2334,41 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } - void invalidateOcclusionQuery(OcclusionQueryHandle _handle) BX_OVERRIDE + void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override { m_occlusionQuery.invalidate(_handle); } - void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) BX_OVERRIDE; + virtual void setName(Handle _handle, const char* _name) override + { + switch (_handle.type) + { + case Handle::Shader: + setDebugObjectName(m_shaders[_handle.idx].m_ptr, _name); + break; - void blitSetup(TextVideoMemBlitter& _blitter) BX_OVERRIDE + case Handle::Texture: + setDebugObjectName(m_textures[_handle.idx].m_ptr, _name); + break; + + default: + BX_CHECK(false, "Invalid handle type?! %d", _handle.type); + break; + } + } + + void submitBlit(BlitState& _bs, uint16_t _view); + + void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) override; + + void blitSetup(TextVideoMemBlitter& _blitter) override { ID3D11DeviceContext* deviceCtx = m_deviceCtx; uint32_t width = getBufferWidth(); uint32_t height = getBufferHeight(); - FrameBufferHandle fbh = BGFX_INVALID_HANDLE; - setFrameBuffer(fbh, false, false); + setFrameBuffer(BGFX_INVALID_HANDLE, false, false); D3D11_VIEWPORT vp; vp.TopLeftX = 0; @@ -2163,7 +2406,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); deviceCtx->IASetIndexBuffer(ib.m_ptr, DXGI_FORMAT_R16_UINT, 0); float proj[16]; - bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f); + bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f, 0.0f, false); PredefinedUniform& predefined = program.m_predefined[0]; uint8_t flags = predefined.m_type; @@ -2174,7 +2417,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); commitTextureStage(); } - void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) BX_OVERRIDE + void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) override { const uint32_t numVertices = _numIndices*4/6; if (0 < numVertices) @@ -2292,12 +2535,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); capturePostReset(); } - bool isDeviceRemoved() BX_OVERRIDE + bool isDeviceRemoved() override { return m_lost; } - void flip(HMD& _hmd) BX_OVERRIDE + void flip(HMD& _hmd) override { if (NULL != m_swapChain && !m_lost) @@ -2483,7 +2726,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); if (resize) { m_deviceCtx->OMSetRenderTargets(1, s_zero.m_rtv, NULL); - DX_CHECK(m_swapChain->ResizeBuffers(2 + DX_CHECK(m_swapChain->ResizeBuffers( + m_swapBufferCount , getBufferWidth() , getBufferHeight() , getBufferFormat() @@ -2497,6 +2741,17 @@ BX_PRAGMA_DIAGNOSTIC_POP(); DX_RELEASE(m_swapChain, 0); + if (m_scd.SampleDesc.Count != 1) + { + m_scd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; + m_scd.BufferCount = 1; + } + else + { + m_scd.SwapEffect = m_swapEffect; + m_scd.BufferCount = m_swapBufferCount; + } + SwapChainDesc* scd = &m_scd; SwapChainDesc swapChainScd; if (0 != (m_resolution.m_flags & BGFX_RESET_HMD) @@ -2688,34 +2943,58 @@ BX_PRAGMA_DIAGNOSTIC_POP(); && (BGFX_CLEAR_DEPTH|BGFX_CLEAR_STENCIL) & _clear.m_flags) { DWORD flags = 0; - flags |= (_clear.m_flags & BGFX_CLEAR_DEPTH) ? D3D11_CLEAR_DEPTH : 0; + flags |= (_clear.m_flags & BGFX_CLEAR_DEPTH) ? D3D11_CLEAR_DEPTH : 0; flags |= (_clear.m_flags & BGFX_CLEAR_STENCIL) ? D3D11_CLEAR_STENCIL : 0; m_deviceCtx->ClearDepthStencilView(m_currentDepthStencil, flags, _clear.m_depth, _clear.m_stencil); } } } - void setInputLayout(const VertexDecl& _vertexDecl, const ProgramD3D11& _program, uint16_t _numInstanceData) + void setInputLayout(uint8_t _numStreams, const VertexDecl** _vertexDecls, const ProgramD3D11& _program, uint16_t _numInstanceData) { - uint64_t layoutHash = (uint64_t(_vertexDecl.m_hash)<<32) | _program.m_vsh->m_hash; - layoutHash ^= _numInstanceData; + bx::HashMurmur2A murmur; + murmur.begin(); + murmur.add(_numInstanceData); + for (uint8_t stream = 0; stream < _numStreams; ++stream) + { + murmur.add(_vertexDecls[stream]->m_hash); + } + uint64_t layoutHash = (uint64_t(_program.m_vsh->m_hash)<<32) | murmur.end(); + ID3D11InputLayout* layout = m_inputLayoutCache.find(layoutHash); if (NULL == layout) { D3D11_INPUT_ELEMENT_DESC vertexElements[Attrib::Count+1+BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT]; + D3D11_INPUT_ELEMENT_DESC* elem = vertexElements; - VertexDecl decl; - bx::memCopy(&decl, &_vertexDecl, sizeof(VertexDecl) ); - const uint16_t* attrMask = _program.m_vsh->m_attrMask; + uint16_t attrMask[Attrib::Count]; + bx::memCopy(attrMask, _program.m_vsh->m_attrMask, sizeof(attrMask) ); - for (uint32_t ii = 0; ii < Attrib::Count; ++ii) + for (uint8_t stream = 0; stream < _numStreams; ++stream) { - uint16_t mask = attrMask[ii]; - uint16_t attr = (decl.m_attributes[ii] & mask); - decl.m_attributes[ii] = attr == 0 ? UINT16_MAX : attr == UINT16_MAX ? 0 : attr; + VertexDecl decl; + bx::memCopy(&decl, _vertexDecls[stream], sizeof(VertexDecl) ); + + const bool last = stream == _numStreams-1; + + for (uint32_t ii = 0; ii < Attrib::Count; ++ii) + { + uint16_t mask = attrMask[ii]; + uint16_t attr = (decl.m_attributes[ii] & mask); + if (0 == attr + || UINT16_MAX == attr) + { + decl.m_attributes[ii] = last ? ~attr : UINT16_MAX; + } + else + { + attrMask[ii] = 0; + } + } + + elem = fillVertexDecl(stream, elem, decl); } - D3D11_INPUT_ELEMENT_DESC* elem = fillVertexDecl(vertexElements, decl); uint32_t num = uint32_t(elem-vertexElements); const D3D11_INPUT_ELEMENT_DESC inst = { "TEXCOORD", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_INSTANCE_DATA, 1 }; @@ -2729,7 +3008,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); for (jj = 0; jj < num; ++jj) { curr = &vertexElements[jj]; - if (0 == bx::strncmp(curr->SemanticName, "TEXCOORD") + if (0 == bx::strCmp(curr->SemanticName, "TEXCOORD") && curr->SemanticIndex == index) { break; @@ -2743,7 +3022,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } bx::memCopy(curr, &inst, sizeof(D3D11_INPUT_ELEMENT_DESC) ); - curr->InputSlot = 1; + curr->InputSlot = _numStreams; curr->SemanticIndex = index; curr->AlignedByteOffset = ii*16; } @@ -2761,6 +3040,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); m_deviceCtx->IASetInputLayout(layout); } + void setInputLayout(const VertexDecl& _vertexDecl, const ProgramD3D11& _program, uint16_t _numInstanceData) + { + const VertexDecl* decls[1] = { &_vertexDecl }; + setInputLayout(BX_COUNTOF(decls), decls, _program, _numInstanceData); + } + void setBlendState(uint64_t _state, uint32_t _rgba = 0) { _state &= BGFX_D3D11_BLEND_STATE_MASK; @@ -3055,7 +3340,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); sd.AddressU = s_textureAddress[(_flags&BGFX_TEXTURE_U_MASK)>>BGFX_TEXTURE_U_SHIFT]; sd.AddressV = s_textureAddress[(_flags&BGFX_TEXTURE_V_MASK)>>BGFX_TEXTURE_V_SHIFT]; sd.AddressW = s_textureAddress[(_flags&BGFX_TEXTURE_W_MASK)>>BGFX_TEXTURE_W_SHIFT]; - sd.MipLODBias = 0.0f; + sd.MipLODBias = float(BGFX_CONFIG_MIP_LOD_BIAS); sd.MaxAnisotropy = m_maxAnisotropy; sd.ComparisonFunc = 0 == cmpFunc ? D3D11_COMPARISON_NEVER : s_cmpFunc[cmpFunc]; sd.BorderColor[0] = _rgba[0]; @@ -3143,7 +3428,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); murmur.begin(); murmur.add(_handle); murmur.add(_mip); - murmur.add(0); + murmur.add(1); uint32_t hash = murmur.end(); IUnknown** ptr = m_srvUavLru.find(hash); @@ -3153,7 +3438,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); TextureD3D11& texture = m_textures[_handle.idx]; D3D11_UNORDERED_ACCESS_VIEW_DESC desc; - desc.Format = s_textureFormat[texture.m_textureFormat].m_fmtSrv; + desc.Format = texture.getSrvFormat(); switch (texture.m_type) { case TextureD3D11::Texture2D: @@ -3188,13 +3473,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); return uav; } - ID3D11ShaderResourceView* getCachedSrv(TextureHandle _handle, uint8_t _mip) + ID3D11ShaderResourceView* getCachedSrv(TextureHandle _handle, uint8_t _mip, bool _compute = false) { bx::HashMurmur2A murmur; murmur.begin(); murmur.add(_handle); murmur.add(_mip); murmur.add(0); + murmur.add(_compute); uint32_t hash = murmur.end(); IUnknown** ptr = m_srvUavLru.find(hash); @@ -3207,7 +3493,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); const bool msaaSample = 1 < msaa.Count && 0 != (texture.m_flags&BGFX_TEXTURE_MSAA_SAMPLE); D3D11_SHADER_RESOURCE_VIEW_DESC desc; - desc.Format = s_textureFormat[texture.m_textureFormat].m_fmtSrv; + desc.Format = texture.getSrvFormat(); switch (texture.m_type) { case TextureD3D11::Texture2D: @@ -3220,9 +3506,20 @@ BX_PRAGMA_DIAGNOSTIC_POP(); break; case TextureD3D11::TextureCube: - desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE; - desc.TextureCube.MostDetailedMip = _mip; - desc.TextureCube.MipLevels = 1; + if (_compute) + { + desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2DARRAY; + desc.Texture2DArray.MostDetailedMip = _mip; + desc.Texture2DArray.MipLevels = 1; + desc.Texture2DArray.FirstArraySlice = 0; + desc.Texture2DArray.ArraySize = 6; + } + else + { + desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE; + desc.TextureCube.MostDetailedMip = _mip; + desc.TextureCube.MipLevels = 1; + } break; case TextureD3D11::Texture3D: @@ -3330,10 +3627,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); bimg::imageSwizzleBgra8( mapped.pData + , mapped.RowPitch , getBufferWidth() , getBufferHeight() - , mapped.RowPitch , mapped.pData + , mapped.RowPitch ); g_callback->captureFrame(mapped.pData, getBufferHeight()*mapped.RowPitch); @@ -3571,10 +3869,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); void* m_agsdll; AGSContext* m_ags; + NvApi m_nvapi; D3D_DRIVER_TYPE m_driverType; D3D_FEATURE_LEVEL m_featureLevel; IDXGIAdapter* m_adapter; + IDXGIOutput* m_output; DXGI_ADAPTER_DESC m_adapterDesc; #if BX_PLATFORM_WINDOWS IDXGIFactory* m_factory; @@ -3589,11 +3889,13 @@ BX_PRAGMA_DIAGNOSTIC_POP(); uint16_t m_numWindows; FrameBufferHandle m_windows[BGFX_CONFIG_MAX_FRAME_BUFFERS]; - ID3D11Device* m_device; - ID3D11DeviceContext* m_deviceCtx; - ID3D11InfoQueue* m_infoQueue; - TimerQueryD3D11 m_gpuTimer; - OcclusionQueryD3D11 m_occlusionQuery; + ID3D11Device* m_device; + ID3D11DeviceContext* m_deviceCtx; + ID3DUserDefinedAnnotation* m_annotation; + ID3D11InfoQueue* m_infoQueue; + + TimerQueryD3D11 m_gpuTimer; + OcclusionQueryD3D11 m_occlusionQuery; uint32_t m_deviceInterfaceVersion; @@ -3614,6 +3916,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); #endif // BX_PLATFORM_WINDOWS SwapChainDesc m_scd; + DXGI_SWAP_EFFECT m_swapEffect; + uint32_t m_swapBufferCount; uint32_t m_maxAnisotropy; bool m_depthClamp; bool m_wireframe; @@ -3650,6 +3954,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); FrameBufferHandle m_fbh; bool m_rtMsaa; bool m_timerQuerySupport; + bool m_directAccessSupport; VR m_ovr; #if BGFX_CONFIG_USE_OVR @@ -3659,10 +3964,10 @@ BX_PRAGMA_DIAGNOSTIC_POP(); static RendererContextD3D11* s_renderD3D11; - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { s_renderD3D11 = BX_NEW(g_allocator, RendererContextD3D11); - if (!s_renderD3D11->init() ) + if (!s_renderD3D11->init(_init) ) { BX_DELETE(g_allocator, s_renderD3D11); s_renderD3D11 = NULL; @@ -3707,6 +4012,33 @@ BX_PRAGMA_DIAGNOSTIC_POP(); agsDriverExtensions_MultiDrawIndexedInstancedIndirect(s_renderD3D11->m_ags, _numDrawIndirect, _ptr, _offset, _stride); } + void nvapiMultiDrawInstancedIndirect(uint32_t _numDrawIndirect, ID3D11Buffer* _ptr, uint32_t _offset, uint32_t _stride) + { + s_renderD3D11->m_nvapi.nvApiD3D11MultiDrawInstancedIndirect(s_renderD3D11->m_deviceCtx, _numDrawIndirect, _ptr, _offset, _stride); + } + + void nvapiMultiDrawIndexedInstancedIndirect(uint32_t _numDrawIndirect, ID3D11Buffer* _ptr, uint32_t _offset, uint32_t _stride) + { + s_renderD3D11->m_nvapi.nvApiD3D11MultiDrawIndexedInstancedIndirect(s_renderD3D11->m_deviceCtx, _numDrawIndirect, _ptr, _offset, _stride); + } + + int WINAPI d3d11Annotation_BeginEvent(DWORD _color, LPCWSTR _name) + { + BX_UNUSED(_color); + return s_renderD3D11->m_annotation->BeginEvent(_name); + } + + int WINAPI d3d11Annotation_EndEvent() + { + return s_renderD3D11->m_annotation->EndEvent(); + } + + void WINAPI d3d11Annotation_SetMarker(DWORD _color, LPCWSTR _name) + { + BX_UNUSED(_color); + s_renderD3D11->m_annotation->SetMarker(_name); + } + #if BGFX_CONFIG_USE_OVR VRImplOVRD3D11::VRImplOVRD3D11() @@ -3938,7 +4270,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); }; static const UavFormat s_uavFormat[] = - { // BGFX_BUFFER_COMPUTE_TYPE_UINT, BGFX_BUFFER_COMPUTE_TYPE_INT, BGFX_BUFFER_COMPUTE_TYPE_FLOAT + { // BGFX_BUFFER_COMPUTE_TYPE_INT, BGFX_BUFFER_COMPUTE_TYPE_UINT, BGFX_BUFFER_COMPUTE_TYPE_FLOAT { { DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, 0 }, // ignored { { DXGI_FORMAT_R8_SINT, DXGI_FORMAT_R8_UINT, DXGI_FORMAT_UNKNOWN }, 1 }, // BGFX_BUFFER_COMPUTE_FORMAT_8x1 { { DXGI_FORMAT_R8G8_SINT, DXGI_FORMAT_R8G8_UINT, DXGI_FORMAT_UNKNOWN }, 2 }, // BGFX_BUFFER_COMPUTE_FORMAT_8x2 @@ -4016,6 +4348,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); ID3D11Device* device = s_renderD3D11->m_device; + D3D11_SUBRESOURCE_DATA srd; + srd.pSysMem = _data; + srd.SysMemPitch = 0; + srd.SysMemSlicePitch = 0; + if (needUav) { desc.Usage = D3D11_USAGE_DEFAULT; @@ -4023,7 +4360,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); desc.StructureByteStride = _stride; DX_CHECK(device->CreateBuffer(&desc - , NULL + , NULL == _data ? NULL : &srd , &m_ptr ) ); @@ -4040,24 +4377,38 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } else if (m_dynamic) { - desc.Usage = D3D11_USAGE_DYNAMIC; +#if USE_D3D11_STAGING_BUFFER + desc.Usage = D3D11_USAGE_DEFAULT; + desc.CPUAccessFlags = 0; + + DX_CHECK(device->CreateBuffer(&desc + , NULL + , &m_ptr + ) ); + + desc.BindFlags = 0; + desc.Usage = D3D11_USAGE_STAGING; + desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + + DX_CHECK(device->CreateBuffer(&desc + , NULL + , &m_staging + ) ); +#else + desc.Usage = D3D11_USAGE_DYNAMIC; desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; DX_CHECK(device->CreateBuffer(&desc , NULL , &m_ptr ) ); +#endif // USE_D3D11_STAGING_BUFFER } else { desc.Usage = D3D11_USAGE_IMMUTABLE; desc.CPUAccessFlags = 0; - D3D11_SUBRESOURCE_DATA srd; - srd.pSysMem = _data; - srd.SysMemPitch = 0; - srd.SysMemSlicePitch = 0; - DX_CHECK(device->CreateBuffer(&desc , &srd , &m_ptr @@ -4083,54 +4434,79 @@ BX_PRAGMA_DIAGNOSTIC_POP(); ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx; BX_CHECK(m_dynamic, "Must be dynamic!"); -#if 0 +#if USE_D3D11_STAGING_BUFFER BX_UNUSED(_discard); - D3D11_BUFFER_DESC desc; - desc.ByteWidth = _size; - desc.Usage = D3D11_USAGE_STAGING; - desc.BindFlags = 0; - desc.MiscFlags = 0; - desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; - desc.StructureByteStride = 0; - D3D11_SUBRESOURCE_DATA srd; - srd.pSysMem = _data; - srd.SysMemPitch = 0; - srd.SysMemSlicePitch = 0; + D3D11_MAPPED_SUBRESOURCE mapped; + DX_CHECK(deviceCtx->Map(m_staging, 0, D3D11_MAP_WRITE, 0, &mapped) ); + bx::memCopy( (uint8_t*)mapped.pData + _offset, _data, _size); + deviceCtx->Unmap(m_staging, 0); - D3D11_BOX srcBox; - srcBox.left = 0; - srcBox.top = 0; - srcBox.front = 0; - srcBox.right = _size; - srcBox.bottom = 1; - srcBox.back = 1; - - ID3D11Device* device = s_renderD3D11->m_device; - - ID3D11Buffer* ptr; - DX_CHECK(device->CreateBuffer(&desc, &srd, &ptr) ); + D3D11_BOX box; + box.left = _offset; + box.top = 0; + box.front = 0; + box.right = _offset + _size; + box.bottom = 1; + box.back = 1; deviceCtx->CopySubresourceRegion(m_ptr , 0 , _offset , 0 , 0 - , ptr + , m_staging , 0 - , &srcBox + , &box ); - - DX_RELEASE(ptr, 0); #else - D3D11_MAPPED_SUBRESOURCE mapped; - D3D11_MAP type = _discard - ? D3D11_MAP_WRITE_DISCARD - : D3D11_MAP_WRITE_NO_OVERWRITE - ; - DX_CHECK(deviceCtx->Map(m_ptr, 0, type, 0, &mapped) ); - bx::memCopy( (uint8_t*)mapped.pData + _offset, _data, _size); - deviceCtx->Unmap(m_ptr, 0); + if (_discard) + { + D3D11_MAPPED_SUBRESOURCE mapped; + DX_CHECK(deviceCtx->Map(m_ptr, 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped) ); + bx::memCopy( (uint8_t*)mapped.pData + _offset, _data, _size); + deviceCtx->Unmap(m_ptr, 0); + } + else + { + D3D11_BUFFER_DESC desc; + desc.ByteWidth = _size; + desc.Usage = D3D11_USAGE_STAGING; + desc.BindFlags = 0; + desc.MiscFlags = 0; + desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; + desc.StructureByteStride = 0; + + D3D11_SUBRESOURCE_DATA srd; + srd.pSysMem = _data; + srd.SysMemPitch = 0; + srd.SysMemSlicePitch = 0; + + D3D11_BOX srcBox; + srcBox.left = 0; + srcBox.top = 0; + srcBox.front = 0; + srcBox.right = _size; + srcBox.bottom = 1; + srcBox.back = 1; + + ID3D11Device* device = s_renderD3D11->m_device; + + ID3D11Buffer* ptr; + DX_CHECK(device->CreateBuffer(&desc, &srd, &ptr) ); + + deviceCtx->CopySubresourceRegion(m_ptr + , 0 + , _offset + , 0 + , 0 + , ptr + , 0 + , &srcBox + ); + + DX_RELEASE(ptr, 0); + } #endif // 0 } @@ -4291,7 +4667,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } - uint16_t shaderSize; + uint32_t shaderSize; bx::read(&reader, shaderSize); const void* code = reader.getDataPtr(); @@ -4305,7 +4681,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } else if (BGFX_CHUNK_MAGIC_VSH == magic) { - m_hash = bx::hashMurmur2A(code, shaderSize); + m_hash = bx::hash(code, shaderSize); m_code = copy(code, shaderSize); DX_CHECK(s_renderD3D11->m_device->CreateVertexShader(code, shaderSize, NULL, &m_vertexShader) ); @@ -4351,8 +4727,70 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } - void TextureD3D11::create(const Memory* _mem, uint32_t _flags, uint8_t _skip) + void* DirectAccessResourceD3D11::createTexture2D(const D3D11_TEXTURE2D_DESC* _gpuDesc, const D3D11_SUBRESOURCE_DATA* _srd, ID3D11Texture2D** _gpuTexture2d) { + ID3D11Device* device = s_renderD3D11->m_device; + DX_CHECK(setIntelDirectAccessResource(device) ); + DX_CHECK(device->CreateTexture2D(_gpuDesc, _srd, _gpuTexture2d) ); + + D3D11_TEXTURE2D_DESC cpuDesc; + bx::memCopy(&cpuDesc, _gpuDesc, sizeof(cpuDesc) ); + cpuDesc.BindFlags = 0; + cpuDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE; + cpuDesc.Usage = D3D11_USAGE_STAGING; + + DX_CHECK(setIntelDirectAccessResource(s_renderD3D11->m_device) ); + DX_CHECK(device->CreateTexture2D(&cpuDesc, NULL, &m_texture2d) ); + + ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx; + deviceCtx->CopyResource(m_texture2d, *_gpuTexture2d); + + D3D11_MAPPED_SUBRESOURCE mappedResource; + deviceCtx->Map(m_texture2d, 0, D3D11_MAP_WRITE, 0, &mappedResource); + m_descriptor = reinterpret_cast(mappedResource.pData); + + return m_descriptor->ptr; + } + + void* DirectAccessResourceD3D11::createTexture3D(const D3D11_TEXTURE3D_DESC* _gpuDesc, const D3D11_SUBRESOURCE_DATA* _srd, ID3D11Texture3D** _gpuTexture3d) + { + ID3D11Device* device = s_renderD3D11->m_device; + DX_CHECK(setIntelDirectAccessResource(device) ); + DX_CHECK(device->CreateTexture3D(_gpuDesc, _srd, _gpuTexture3d) ); + + D3D11_TEXTURE3D_DESC cpuDesc; + bx::memCopy(&cpuDesc, _gpuDesc, sizeof(cpuDesc) ); + cpuDesc.BindFlags = 0; + cpuDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE; + cpuDesc.Usage = D3D11_USAGE_STAGING; + + DX_CHECK(setIntelDirectAccessResource(s_renderD3D11->m_device) ); + DX_CHECK(device->CreateTexture3D(&cpuDesc, NULL, &m_texture3d) ); + + ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx; + deviceCtx->CopyResource(m_texture3d, *_gpuTexture3d); + + D3D11_MAPPED_SUBRESOURCE mappedResource; + deviceCtx->Map(m_texture3d, 0, D3D11_MAP_WRITE, 0, &mappedResource); + m_descriptor = reinterpret_cast(mappedResource.pData); + + return m_descriptor->ptr; + } + + void DirectAccessResourceD3D11::destroy() + { + if (NULL != m_descriptor) + { + s_renderD3D11->m_deviceCtx->Unmap(m_ptr, 0); + m_descriptor = NULL; + DX_RELEASE(m_ptr, 0); + } + } + + void* TextureD3D11::create(const Memory* _mem, uint32_t _flags, uint8_t _skip) + { + void* directAccessPtr = NULL; + bimg::ImageContainer imageContainer; if (bimg::imageParse(imageContainer, _mem->data, _mem->size) ) @@ -4446,11 +4884,6 @@ BX_PRAGMA_DIAGNOSTIC_POP(); srd[kk].SysMemPitch = mip.m_width*mip.m_bpp/8; } - if (swizzle) - { -// imageSwizzleBgra8(temp, width, height, mip.m_width*4, data); - } - srd[kk].SysMemSlicePitch = mip.m_height*srd[kk].SysMemPitch; ++kk; } @@ -4464,7 +4897,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); const bool writeOnly = 0 != (m_flags&(BGFX_TEXTURE_RT_WRITE_ONLY|BGFX_TEXTURE_READ_BACK) ); const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE); const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK); - const bool srgb = 0 != (m_flags&BGFX_TEXTURE_SRGB) || imageContainer.m_srgb; + const bool srgb = 0 != (m_flags&BGFX_TEXTURE_SRGB); const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST); const bool readBack = 0 != (m_flags&BGFX_TEXTURE_READ_BACK); const uint32_t msaaQuality = bx::uint32_satsub( (m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1); @@ -4500,9 +4933,16 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { // not swizzled and not sRGB, or sRGB unsupported format = s_textureFormat[m_textureFormat].m_fmt; - srvd.Format = s_textureFormat[m_textureFormat].m_fmtSrv; + srvd.Format = getSrvFormat(); } + bool directAccess = s_renderD3D11->m_directAccessSupport + && !renderTarget + && !readBack + && !blit + && !writeOnly + ; + switch (m_type) { case Texture2D: @@ -4599,7 +5039,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); desc.SampleDesc = s_msaa[0]; } - DX_CHECK(s_renderD3D11->m_device->CreateTexture2D(&desc, kk == 0 ? NULL : srd, &m_texture2d) ); + if (directAccess) + { + directAccessPtr = m_dar.createTexture2D(&desc, kk == 0 ? NULL : srd, &m_texture2d); + } + else + { + DX_CHECK(s_renderD3D11->m_device->CreateTexture2D(&desc, kk == 0 ? NULL : srd, &m_texture2d) ); + } } break; @@ -4641,7 +5088,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); srvd.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE3D; srvd.Texture3D.MipLevels = numMips; - DX_CHECK(s_renderD3D11->m_device->CreateTexture3D(&desc, kk == 0 ? NULL : srd, &m_texture3d) ); + if (directAccess) + { + directAccessPtr = m_dar.createTexture3D(&desc, kk == 0 ? NULL : srd, &m_texture3d); + } + else + { + DX_CHECK(s_renderD3D11->m_device->CreateTexture3D(&desc, kk == 0 ? NULL : srd, &m_texture3d) ); + } } break; } @@ -4670,10 +5124,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } } + + return directAccessPtr; } void TextureD3D11::destroy() { + m_dar.destroy(); + s_renderD3D11->m_srvUavLru.invalidateWithParent(getHandle().idx); DX_RELEASE(m_rt, 0); DX_RELEASE(m_srv, 0); @@ -4788,6 +5246,19 @@ BX_PRAGMA_DIAGNOSTIC_POP(); return handle; } + DXGI_FORMAT TextureD3D11::getSrvFormat() const + { + if (bimg::isDepth(bimg::TextureFormat::Enum(m_textureFormat) ) ) + { + return s_textureFormat[m_textureFormat].m_fmtSrv; + } + + return 0 != (m_flags&BGFX_TEXTURE_SRGB) + ? s_textureFormat[m_textureFormat].m_fmtSrgb + : s_textureFormat[m_textureFormat].m_fmt + ; + } + void FrameBufferD3D11::create(uint8_t _num, const Attachment* _attachment) { for (uint32_t ii = 0; ii < BX_COUNTOF(m_rtv); ++ii) @@ -4977,62 +5448,52 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } else { + D3D11_RENDER_TARGET_VIEW_DESC desc; + desc.Format = texture.getSrvFormat(); switch (texture.m_type) { default: case TextureD3D11::Texture2D: + if (1 < msaa.Count) { - D3D11_RENDER_TARGET_VIEW_DESC desc; - desc.Format = s_textureFormat[texture.m_textureFormat].m_fmt; - if (1 < msaa.Count) - { - desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMS; - } - else - { - desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D; - desc.Texture2D.MipSlice = m_attachment[ii].mip; - } - - DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView( - NULL == texture.m_rt ? texture.m_ptr : texture.m_rt - , &desc - , &m_rtv[m_num] - ) ); + desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMS; } + else + { + desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D; + desc.Texture2D.MipSlice = m_attachment[ii].mip; + } + + DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView( + NULL == texture.m_rt ? texture.m_ptr : texture.m_rt + , &desc + , &m_rtv[m_num] + ) ); break; case TextureD3D11::TextureCube: + if (1 < msaa.Count) { - D3D11_RENDER_TARGET_VIEW_DESC desc; - desc.Format = s_textureFormat[texture.m_textureFormat].m_fmt; - if (1 < msaa.Count) - { - desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY; - desc.Texture2DMSArray.ArraySize = 1; - desc.Texture2DMSArray.FirstArraySlice = m_attachment[ii].layer; - } - else - { - desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY; - desc.Texture2DArray.ArraySize = 1; - desc.Texture2DArray.FirstArraySlice = m_attachment[ii].layer; - desc.Texture2DArray.MipSlice = m_attachment[ii].mip; - } - DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) ); + desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY; + desc.Texture2DMSArray.ArraySize = 1; + desc.Texture2DMSArray.FirstArraySlice = m_attachment[ii].layer; } + else + { + desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY; + desc.Texture2DArray.ArraySize = 1; + desc.Texture2DArray.FirstArraySlice = m_attachment[ii].layer; + desc.Texture2DArray.MipSlice = m_attachment[ii].mip; + } + DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) ); break; case TextureD3D11::Texture3D: - { - D3D11_RENDER_TARGET_VIEW_DESC desc; - desc.Format = s_textureFormat[texture.m_textureFormat].m_fmt; - desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D; - desc.Texture3D.MipSlice = m_attachment[ii].mip; - desc.Texture3D.WSize = 1; - desc.Texture3D.FirstWSlice = m_attachment[ii].layer; - DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) ); - } + desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D; + desc.Texture3D.MipSlice = m_attachment[ii].mip; + desc.Texture3D.WSize = 1; + desc.Texture3D.FirstWSlice = m_attachment[ii].layer; + DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) ); break; } @@ -5132,68 +5593,94 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { ID3D11Device* device = s_renderD3D11->m_device; - D3D11_QUERY_DESC query; - query.MiscFlags = 0; - for (uint32_t ii = 0; ii < BX_COUNTOF(m_frame); ++ii) + D3D11_QUERY_DESC qd; + qd.MiscFlags = 0; + for (uint32_t ii = 0; ii < BX_COUNTOF(m_query); ++ii) { - Frame& frame = m_frame[ii]; + Query& query = m_query[ii]; + query.m_ready = false; - query.Query = D3D11_QUERY_TIMESTAMP_DISJOINT; - DX_CHECK(device->CreateQuery(&query, &frame.m_disjoint) ); + qd.Query = D3D11_QUERY_TIMESTAMP_DISJOINT; + DX_CHECK(device->CreateQuery(&qd, &query.m_disjoint) ); - query.Query = D3D11_QUERY_TIMESTAMP; - DX_CHECK(device->CreateQuery(&query, &frame.m_begin) ); - DX_CHECK(device->CreateQuery(&query, &frame.m_end) ); + qd.Query = D3D11_QUERY_TIMESTAMP; + DX_CHECK(device->CreateQuery(&qd, &query.m_begin) ); + DX_CHECK(device->CreateQuery(&qd, &query.m_end) ); + } + + for (uint32_t ii = 0; ii < BX_COUNTOF(m_result); ++ii) + { + Result& result = m_result[ii]; + result.reset(); } - m_elapsed = 0; - m_frequency = 1; m_control.reset(); } void TimerQueryD3D11::preReset() { - for (uint32_t ii = 0; ii < BX_COUNTOF(m_frame); ++ii) + for (uint32_t ii = 0; ii < BX_COUNTOF(m_query); ++ii) { - Frame& frame = m_frame[ii]; - DX_RELEASE(frame.m_disjoint, 0); - DX_RELEASE(frame.m_begin, 0); - DX_RELEASE(frame.m_end, 0); + Query& query = m_query[ii]; + DX_RELEASE(query.m_disjoint, 0); + DX_RELEASE(query.m_begin, 0); + DX_RELEASE(query.m_end, 0); } } - void TimerQueryD3D11::begin() + uint32_t TimerQueryD3D11::begin(uint32_t _resultIdx) { ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx; while (0 == m_control.reserve(1) ) { - get(); + update(); } - Frame& frame = m_frame[m_control.m_current]; - deviceCtx->Begin(frame.m_disjoint); - deviceCtx->End(frame.m_begin); + Result& result = m_result[_resultIdx]; + ++result.m_pending; + + const uint32_t idx = m_control.m_current; + Query& query = m_query[idx]; + query.m_resultIdx = _resultIdx; + query.m_ready = false; + + deviceCtx->Begin(query.m_disjoint); + deviceCtx->End(query.m_begin); + + m_control.commit(1); + + return idx; } - void TimerQueryD3D11::end() + void TimerQueryD3D11::end(uint32_t _idx) { ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx; - Frame& frame = m_frame[m_control.m_current]; - deviceCtx->End(frame.m_end); - deviceCtx->End(frame.m_disjoint); - m_control.commit(1); + Query& query = m_query[_idx]; + query.m_ready = true; + + deviceCtx->End(query.m_end); + deviceCtx->End(query.m_disjoint); + + while (update() ) + { + } } - bool TimerQueryD3D11::get() + bool TimerQueryD3D11::update() { if (0 != m_control.available() ) { - ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx; - Frame& frame = m_frame[m_control.m_read]; + Query& query = m_query[m_control.m_read]; + + if (!query.m_ready) + { + return false; + } uint64_t timeEnd; - HRESULT hr = deviceCtx->GetData(frame.m_end, &timeEnd, sizeof(timeEnd), D3D11_ASYNC_GETDATA_DONOTFLUSH); + ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx; + HRESULT hr = deviceCtx->GetData(query.m_end, &timeEnd, sizeof(timeEnd), D3D11_ASYNC_GETDATA_DONOTFLUSH); if (S_OK == hr || isLost(hr) ) { @@ -5206,15 +5693,17 @@ BX_PRAGMA_DIAGNOSTIC_POP(); }; D3D11_QUERY_DATA_TIMESTAMP_DISJOINT disjoint; - deviceCtx->GetData(frame.m_disjoint, &disjoint, sizeof(disjoint), 0); + DX_CHECK(deviceCtx->GetData(query.m_disjoint, &disjoint, sizeof(disjoint), 0) ); uint64_t timeBegin; - deviceCtx->GetData(frame.m_begin, &timeBegin, sizeof(timeBegin), 0); + DX_CHECK(deviceCtx->GetData(query.m_begin, &timeBegin, sizeof(timeBegin), 0) ); - m_frequency = disjoint.Frequency; - m_begin = timeBegin; - m_end = timeEnd; - m_elapsed = timeEnd - timeBegin; + Result& result = m_result[query.m_resultIdx]; + --result.m_pending; + + result.m_frequency = disjoint.Frequency; + result.m_begin = timeBegin; + result.m_end = timeEnd; return true; } @@ -5300,7 +5789,86 @@ BX_PRAGMA_DIAGNOSTIC_POP(); Query& query = m_query[(m_control.m_read + ii) % size]; if (query.m_handle.idx == _handle.idx) { - query.m_handle.idx = bgfx::invalidHandle; + query.m_handle.idx = bgfx::kInvalidHandle; + } + } + } + + void RendererContextD3D11::submitBlit(BlitState& _bs, uint16_t _view) + { + ID3D11DeviceContext* deviceCtx = m_deviceCtx; + + while (_bs.hasItem(_view) ) + { + const BlitItem& blit = _bs.advance(); + + const TextureD3D11& src = m_textures[blit.m_src.idx]; + const TextureD3D11& dst = m_textures[blit.m_dst.idx]; + + uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; + uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; + uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ; + uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; + uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; + uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ; + uint32_t width = bx::uint32_min(srcWidth, dstWidth); + uint32_t height = bx::uint32_min(srcHeight, dstHeight); + uint32_t depth = bx::uint32_min(srcDepth, dstDepth); + + if (TextureD3D11::Texture3D == src.m_type) + { + D3D11_BOX box; + box.left = blit.m_srcX; + box.top = blit.m_srcY; + box.front = blit.m_srcZ; + box.right = blit.m_srcX + width; + box.bottom = blit.m_srcY + height;; + box.back = blit.m_srcZ + bx::uint32_imax(1, depth); + + deviceCtx->CopySubresourceRegion(dst.m_ptr + , blit.m_dstMip + , blit.m_dstX + , blit.m_dstY + , blit.m_dstZ + , src.m_ptr + , blit.m_srcMip + , &box + ); + } + else + { + bool depthStencil = bimg::isDepth(bimg::TextureFormat::Enum(src.m_textureFormat) ); + BX_CHECK(!depthStencil + || (width == src.m_width && height == src.m_height) + , "When blitting depthstencil surface, source resolution must match destination." + ); + + D3D11_BOX box; + box.left = blit.m_srcX; + box.top = blit.m_srcY; + box.front = 0; + box.right = blit.m_srcX + width; + box.bottom = blit.m_srcY + height; + box.back = 1; + + const uint32_t srcZ = TextureD3D11::TextureCube == src.m_type + ? blit.m_srcZ + : 0 + ; + const uint32_t dstZ = TextureD3D11::TextureCube == dst.m_type + ? blit.m_dstZ + : 0 + ; + + deviceCtx->CopySubresourceRegion(dst.m_ptr + , dstZ*dst.m_numMips+blit.m_dstMip + , blit.m_dstX + , blit.m_dstY + , 0 + , src.m_ptr + , srcZ*src.m_numMips+blit.m_srcMip + , depthStencil ? NULL : &box + ); } } } @@ -5319,16 +5887,17 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } PIX_BEGINEVENT(D3DCOLOR_FRAME, L"rendererSubmit"); - BGFX_GPU_PROFILER_BEGIN_DYNAMIC("rendererSubmit"); ID3D11DeviceContext* deviceCtx = m_deviceCtx; - int64_t elapsed = -bx::getHPCounter(); + int64_t timeBegin = bx::getHPCounter(); int64_t captureElapsed = 0; + uint32_t frameQueryIdx = UINT32_MAX; + if (m_timerQuerySupport) { - m_gpuTimer.begin(); + frameQueryIdx = m_gpuTimer.begin(BGFX_CONFIG_MAX_VIEWS); } if (0 < _render->m_iboffset) @@ -5363,15 +5932,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); bool scissorEnabled = false; setDebugWireframe(wireframe); - uint16_t programIdx = invalidHandle; + uint16_t programIdx = kInvalidHandle; SortKey key; uint16_t view = UINT16_MAX; FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS }; - BlitKey blitKey; - blitKey.decode(_render->m_blitKeys[0]); - uint16_t numBlitItems = _render->m_numBlitItems; - uint16_t blitItem = 0; + BlitState bs(_render); const uint64_t primType = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0; uint8_t primIndex = uint8_t(primType >> BGFX_STATE_PT_SHIFT); @@ -5390,21 +5956,27 @@ BX_PRAGMA_DIAGNOSTIC_POP(); uint32_t statsNumIndices = 0; uint32_t statsKeyType[2] = {}; + Profiler profiler( + _render + , m_gpuTimer + , s_viewName + , m_timerQuerySupport + ); + m_occlusionQuery.resolve(_render); if (0 == (_render->m_debug&BGFX_DEBUG_IFH) ) { // reset the framebuffer to be the backbuffer; depending on the swap effect, // if we don't do this we'll only see one frame of output and then nothing - FrameBufferHandle invalid = BGFX_INVALID_HANDLE; - setFrameBuffer(invalid, true, false); + setFrameBuffer(BGFX_INVALID_HANDLE, true, false); bool viewRestart = false; uint8_t eye = 0; uint8_t restartState = 0; - viewState.m_rect = _render->m_rect[0]; + viewState.m_rect = _render->m_view[0].m_rect; - int32_t numItems = _render->m_num; + int32_t numItems = _render->m_numRenderItems; for (int32_t item = 0, restartItem = numItems; item < numItems || restartItem < numItems;) { const uint64_t encodedKey = _render->m_sortKeys[item]; @@ -5433,15 +6005,15 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } view = key.m_view; - programIdx = invalidHandle; + programIdx = kInvalidHandle; - if (_render->m_fb[view].idx != fbh.idx) + if (_render->m_view[view].m_fbh.idx != fbh.idx) { - fbh = _render->m_fb[view]; + fbh = _render->m_view[view].m_fbh; setFrameBuffer(fbh); } - viewRestart = ( (BGFX_VIEW_STEREO == (_render->m_viewFlags[view] & BGFX_VIEW_STEREO) ) ); + viewRestart = ( (BGFX_VIEW_STEREO == (_render->m_view[view].m_flags & BGFX_VIEW_STEREO) ) ); viewRestart &= hmdEnabled; if (viewRestart) { @@ -5462,13 +6034,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); PIX_ENDEVENT(); if (item > 1) { - BGFX_GPU_PROFILER_END(); - BGFX_PROFILER_END(); + profiler.end(); } - BGFX_PROFILER_BEGIN_DYNAMIC(s_viewName[view]); - BGFX_GPU_PROFILER_BEGIN_DYNAMIC(s_viewName[view]); + profiler.begin(view); - viewState.m_rect = _render->m_rect[view]; + viewState.m_rect = _render->m_view[view].m_rect; if (viewRestart) { if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) @@ -5504,7 +6074,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } - const Rect& scissorRect = _render->m_scissor[view]; + const Rect& scissorRect = _render->m_view[view].m_scissor; viewHasScissor = !scissorRect.isZero(); viewScissorRect = viewHasScissor ? scissorRect : viewState.m_rect; @@ -5516,7 +6086,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); vp.MinDepth = 0.0f; vp.MaxDepth = 1.0f; deviceCtx->RSSetViewports(1, &vp); - Clear& clr = _render->m_clear[view]; + Clear& clr = _render->m_view[view].m_clear; if (BGFX_CLEAR_NONE != (clr.m_flags & BGFX_CLEAR_MASK) ) { @@ -5524,81 +6094,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); prim = s_primInfo[BX_COUNTOF(s_primName)]; // Force primitive type update after clear quad. } - const uint8_t blitView = SortKey::decodeView(encodedKey); - for (; blitItem < numBlitItems && blitKey.m_view <= blitView; blitItem++) - { - const BlitItem& blit = _render->m_blitItem[blitItem]; - blitKey.decode(_render->m_blitKeys[blitItem+1]); - - const TextureD3D11& src = m_textures[blit.m_src.idx]; - const TextureD3D11& dst = m_textures[blit.m_dst.idx]; - - uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; - uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; - uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ; - uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; - uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; - uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ; - uint32_t width = bx::uint32_min(srcWidth, dstWidth); - uint32_t height = bx::uint32_min(srcHeight, dstHeight); - uint32_t depth = bx::uint32_min(srcDepth, dstDepth); - - if (TextureD3D11::Texture3D == src.m_type) - { - D3D11_BOX box; - box.left = blit.m_srcX; - box.top = blit.m_srcY; - box.front = blit.m_srcZ; - box.right = blit.m_srcX + width; - box.bottom = blit.m_srcY + height;; - box.back = blit.m_srcZ + bx::uint32_imax(1, depth); - - deviceCtx->CopySubresourceRegion(dst.m_ptr - , blit.m_dstMip - , blit.m_dstX - , blit.m_dstY - , blit.m_dstZ - , src.m_ptr - , blit.m_srcMip - , &box - ); - } - else - { - bool depthStencil = bimg::isDepth(bimg::TextureFormat::Enum(src.m_textureFormat) ); - BX_CHECK(!depthStencil - || (width == src.m_width && height == src.m_height) - , "When blitting depthstencil surface, source resolution must match destination." - ); - - D3D11_BOX box; - box.left = blit.m_srcX; - box.top = blit.m_srcY; - box.front = 0; - box.right = blit.m_srcX + width; - box.bottom = blit.m_srcY + height; - box.back = 1; - - const uint32_t srcZ = TextureD3D11::TextureCube == src.m_type - ? blit.m_srcZ - : 0 - ; - const uint32_t dstZ = TextureD3D11::TextureCube == dst.m_type - ? blit.m_dstZ - : 0 - ; - - deviceCtx->CopySubresourceRegion(dst.m_ptr - , dstZ*dst.m_numMips+blit.m_dstMip - , blit.m_dstX - , blit.m_dstY - , 0 - , src.m_ptr - , srcZ*src.m_numMips+blit.m_srcMip - , depthStencil ? NULL : &box - ); - } - } + submitBlit(bs, view); } if (isCompute) @@ -5634,8 +6130,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } bool programChanged = false; - bool constantsChanged = compute.m_constBegin < compute.m_constEnd; - rendererUpdateUniforms(this, _render->m_uniformBuffer, compute.m_constBegin, compute.m_constEnd); + bool constantsChanged = compute.m_uniformBegin < compute.m_uniformEnd; + rendererUpdateUniforms(this, _render->m_uniformBuffer[compute.m_uniformIdx], compute.m_uniformBegin, compute.m_uniformEnd); if (key.m_program != programIdx) { @@ -5651,7 +6147,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); constantsChanged = true; } - if (invalidHandle != programIdx) + if (kInvalidHandle != programIdx) { ProgramD3D11& program = m_program[programIdx]; @@ -5680,11 +6176,12 @@ BX_PRAGMA_DIAGNOSTIC_POP(); for (uint32_t ii = 0; ii < BGFX_MAX_COMPUTE_BINDINGS; ++ii) { const Binding& bind = renderBind.m_bind[ii]; - if (invalidHandle != bind.m_idx) + if (kInvalidHandle != bind.m_idx) { switch (bind.m_type) { case Binding::Image: + case Binding::Texture: { TextureD3D11& texture = m_textures[bind.m_idx]; if (Access::Read != bind.m_un.m_compute.m_access) @@ -5696,10 +6193,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } else { - srv[ii] = 0 == bind.m_un.m_compute.m_mip - ? texture.m_srv - : s_renderD3D11->getCachedSrv(texture.getHandle(), bind.m_un.m_compute.m_mip) - ; + srv[ii] = s_renderD3D11->getCachedSrv(texture.getHandle(), bind.m_un.m_compute.m_mip, true); sampler[ii] = s_renderD3D11->getSamplerState(texture.m_flags, NULL); } } @@ -5767,7 +6261,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); PIX_BEGINEVENT(D3DCOLOR_DRAW, viewNameW); } - programIdx = invalidHandle; + programIdx = kInvalidHandle; m_currentProgram = NULL; invalidateCompute(); @@ -5840,7 +6334,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); else { Rect scissorRect; - scissorRect.setIntersect(viewScissorRect, _render->m_rectCache.m_cache[scissor]); + scissorRect.setIntersect(viewScissorRect, _render->m_frameCache.m_rectCache.m_cache[scissor]); if (scissorRect.isZeroArea() ) { continue; @@ -5905,14 +6399,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } bool programChanged = false; - bool constantsChanged = draw.m_constBegin < draw.m_constEnd; - rendererUpdateUniforms(this, _render->m_uniformBuffer, draw.m_constBegin, draw.m_constEnd); + bool constantsChanged = draw.m_uniformBegin < draw.m_uniformEnd; + rendererUpdateUniforms(this, _render->m_uniformBuffer[draw.m_uniformIdx], draw.m_uniformBegin, draw.m_uniformEnd); if (key.m_program != programIdx) { programIdx = key.m_program; - if (invalidHandle == programIdx) + if (kInvalidHandle == programIdx) { m_currentProgram = NULL; @@ -5945,7 +6439,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); constantsChanged = true; } - if (invalidHandle != programIdx) + if (kInvalidHandle != programIdx) { ProgramD3D11& program = m_program[programIdx]; @@ -5984,7 +6478,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); || current.m_un.m_draw.m_textureFlags != bind.m_un.m_draw.m_textureFlags || programChanged) { - if (invalidHandle != bind.m_idx) + if (kInvalidHandle != bind.m_idx) { switch (bind.m_type) { @@ -6026,43 +6520,70 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } + bool vertexStreamChanged = hasVertexStreamChanged(currentState, draw); + if (programChanged - || currentState.m_streamMask != draw.m_streamMask - || currentState.m_stream[0].m_decl.idx != draw.m_stream[0].m_decl.idx - || currentState.m_stream[0].m_handle.idx != draw.m_stream[0].m_handle.idx - || currentState.m_instanceDataBuffer.idx != draw.m_instanceDataBuffer.idx - || currentState.m_instanceDataOffset != draw.m_instanceDataOffset - || currentState.m_instanceDataStride != draw.m_instanceDataStride) + || vertexStreamChanged) { currentState.m_streamMask = draw.m_streamMask; - currentState.m_stream[0].m_decl = draw.m_stream[0].m_decl; - currentState.m_stream[0].m_handle = draw.m_stream[0].m_handle; currentState.m_instanceDataBuffer.idx = draw.m_instanceDataBuffer.idx; currentState.m_instanceDataOffset = draw.m_instanceDataOffset; currentState.m_instanceDataStride = draw.m_instanceDataStride; - uint16_t handle = draw.m_stream[0].m_handle.idx; - if (invalidHandle != handle) - { - const VertexBufferD3D11& vb = m_vertexBuffers[handle]; + ID3D11Buffer* buffers[BGFX_CONFIG_MAX_VERTEX_STREAMS]; + uint32_t strides[BGFX_CONFIG_MAX_VERTEX_STREAMS]; + uint32_t offsets[BGFX_CONFIG_MAX_VERTEX_STREAMS]; + const VertexDecl* decls[BGFX_CONFIG_MAX_VERTEX_STREAMS]; - uint16_t decl = !isValid(vb.m_decl) ? draw.m_stream[0].m_decl.idx : vb.m_decl.idx; + uint32_t numVertices = draw.m_numVertices; + uint8_t numStreams = 0; + for (uint32_t idx = 0, streamMask = draw.m_streamMask, ntz = bx::uint32_cnttz(streamMask) + ; 0 != streamMask + ; streamMask >>= 1, idx += 1, ntz = bx::uint32_cnttz(streamMask), ++numStreams + ) + { + streamMask >>= ntz; + idx += ntz; + + currentState.m_stream[idx].m_decl = draw.m_stream[idx].m_decl; + currentState.m_stream[idx].m_handle = draw.m_stream[idx].m_handle; + currentState.m_stream[idx].m_startVertex = draw.m_stream[idx].m_startVertex; + + uint16_t handle = draw.m_stream[idx].m_handle.idx; + const VertexBufferD3D11& vb = m_vertexBuffers[handle]; + uint16_t decl = !isValid(vb.m_decl) ? draw.m_stream[idx].m_decl.idx : vb.m_decl.idx; const VertexDecl& vertexDecl = m_vertexDecls[decl]; uint32_t stride = vertexDecl.m_stride; - uint32_t offset = 0; - deviceCtx->IASetVertexBuffers(0, 1, &vb.m_ptr, &stride, &offset); + + buffers[numStreams] = vb.m_ptr; + strides[numStreams] = stride; + offsets[numStreams] = draw.m_stream[idx].m_startVertex * stride; + decls[numStreams] = &vertexDecl; + + numVertices = bx::uint32_min(UINT32_MAX == draw.m_numVertices + ? vb.m_size/stride + : draw.m_numVertices + , numVertices + ); + } + + currentState.m_numVertices = numVertices; + + if (0 < numStreams) + { + deviceCtx->IASetVertexBuffers(0, numStreams, buffers, strides, offsets); if (isValid(draw.m_instanceDataBuffer) ) { const VertexBufferD3D11& inst = m_vertexBuffers[draw.m_instanceDataBuffer.idx]; uint32_t instStride = draw.m_instanceDataStride; - deviceCtx->IASetVertexBuffers(1, 1, &inst.m_ptr, &instStride, &draw.m_instanceDataOffset); - setInputLayout(vertexDecl, m_program[programIdx], draw.m_instanceDataStride/16); + deviceCtx->IASetVertexBuffers(numStreams, 1, &inst.m_ptr, &instStride, &draw.m_instanceDataOffset); + setInputLayout(numStreams, decls, m_program[programIdx], draw.m_instanceDataStride/16); } else { - deviceCtx->IASetVertexBuffers(1, 1, s_zero.m_buffer, s_zero.m_zero, s_zero.m_zero); - setInputLayout(vertexDecl, m_program[programIdx], 0); + deviceCtx->IASetVertexBuffers(numStreams, 1, s_zero.m_buffer, s_zero.m_zero, s_zero.m_zero); + setInputLayout(numStreams, decls, m_program[programIdx], 0); } } else @@ -6076,7 +6597,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); currentState.m_indexBuffer = draw.m_indexBuffer; uint16_t handle = draw.m_indexBuffer.idx; - if (invalidHandle != handle) + if (kInvalidHandle != handle) { const IndexBufferD3D11& ib = m_indexBuffers[handle]; deviceCtx->IASetIndexBuffer(ib.m_ptr @@ -6092,15 +6613,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); if (0 != currentState.m_streamMask) { - uint32_t numVertices = draw.m_numVertices; - if (UINT32_MAX == numVertices) - { - const VertexBufferD3D11& vb = m_vertexBuffers[currentState.m_stream[0].m_handle.idx]; - uint16_t decl = !isValid(vb.m_decl) ? draw.m_stream[0].m_decl.idx : vb.m_decl.idx; - const VertexDecl& vertexDecl = m_vertexDecls[decl]; - numVertices = vb.m_size/vertexDecl.m_stride; - } - + uint32_t numVertices = currentState.m_numVertices; uint32_t numIndices = 0; uint32_t numPrimsSubmitted = 0; uint32_t numInstances = 0; @@ -6124,7 +6637,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); : draw.m_numIndirect ; - multiDrawIndexedInstancedIndirect(numDrawIndirect + multiDrawIndexedInstancedIndirect( + numDrawIndirect , ptr , draw.m_startIndirect * BGFX_CONFIG_DRAW_INDIRECT_STRIDE , BGFX_CONFIG_DRAW_INDIRECT_STRIDE @@ -6137,7 +6651,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); : draw.m_numIndirect ; - multiDrawInstancedIndirect(numDrawIndirect + multiDrawInstancedIndirect( + numDrawIndirect , ptr , draw.m_startIndirect * BGFX_CONFIG_DRAW_INDIRECT_STRIDE , BGFX_CONFIG_DRAW_INDIRECT_STRIDE @@ -6162,7 +6677,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); deviceCtx->DrawIndexedInstanced(numIndices , draw.m_numInstances , 0 - , draw.m_stream[0].m_startVertex + , 0 , 0 ); } @@ -6170,7 +6685,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { deviceCtx->DrawIndexed(numIndices , 0 - , draw.m_stream[0].m_startVertex + , 0 ); } } @@ -6186,7 +6701,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); deviceCtx->DrawIndexedInstanced(numIndices , draw.m_numInstances , draw.m_startIndex - , draw.m_stream[0].m_startVertex + , 0 , 0 ); } @@ -6194,7 +6709,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { deviceCtx->DrawIndexed(numIndices , draw.m_startIndex - , draw.m_stream[0].m_startVertex + , 0 ); } } @@ -6209,14 +6724,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { deviceCtx->DrawInstanced(numVertices , draw.m_numInstances - , draw.m_stream[0].m_startVertex + , 0 , 0 ); } else { deviceCtx->Draw(numVertices - , draw.m_stream[0].m_startVertex + , 0 ); } } @@ -6248,7 +6763,9 @@ BX_PRAGMA_DIAGNOSTIC_POP(); invalidateCompute(); } - if (0 < _render->m_num) + submitBlit(bs, BGFX_CONFIG_MAX_VIEWS); + + if (0 < _render->m_numRenderItems) { if (0 != (m_resolution.m_flags & BGFX_RESET_FLUSH_AFTER_RENDER) ) { @@ -6259,24 +6776,14 @@ BX_PRAGMA_DIAGNOSTIC_POP(); capture(); captureElapsed += bx::getHPCounter(); - BGFX_GPU_PROFILER_END(); - BGFX_PROFILER_END(); + profiler.end(); } } PIX_ENDEVENT(); - BGFX_GPU_PROFILER_END(); - int64_t now = bx::getHPCounter(); - elapsed += now; - - static int64_t last = now; - - Stats& perfStats = _render->m_perfStats; - perfStats.cpuTimeBegin = last; - - int64_t frameTime = now - last; - last = now; + int64_t timeEnd = bx::getHPCounter(); + int64_t frameTime = timeEnd - timeBegin; static int64_t min = frameTime; static int64_t max = frameTime; @@ -6287,31 +6794,32 @@ BX_PRAGMA_DIAGNOSTIC_POP(); static double maxGpuElapsed = 0.0f; double elapsedGpuMs = 0.0; - if (m_timerQuerySupport) + if (UINT32_MAX != frameQueryIdx) { - m_gpuTimer.end(); + m_gpuTimer.end(frameQueryIdx); - do - { - double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency); - elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs; - maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; - } - while (m_gpuTimer.get() ); + const TimerQueryD3D11::Result& result = m_gpuTimer.m_result[BGFX_CONFIG_MAX_VIEWS]; + double toGpuMs = 1000.0 / double(result.m_frequency); + elapsedGpuMs = (result.m_end - result.m_begin) * toGpuMs; + maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; - maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); + maxGpuLatency = bx::uint32_imax(maxGpuLatency, result.m_pending-1); } const int64_t timerFreq = bx::getHPFrequency(); - perfStats.cpuTimeEnd = now; + Stats& perfStats = _render->m_perfStats; + perfStats.cpuTimeBegin = timeBegin; + perfStats.cpuTimeEnd = timeEnd; perfStats.cpuTimerFreq = timerFreq; - perfStats.gpuTimeBegin = m_gpuTimer.m_begin; - perfStats.gpuTimeEnd = m_gpuTimer.m_end; - perfStats.gpuTimerFreq = m_gpuTimer.m_frequency; + const TimerQueryD3D11::Result& result = m_gpuTimer.m_result[BGFX_CONFIG_MAX_VIEWS]; + perfStats.gpuTimeBegin = result.m_begin; + perfStats.gpuTimeEnd = result.m_end; + perfStats.gpuTimerFreq = result.m_frequency; perfStats.numDraw = statsKeyType[0]; perfStats.numCompute = statsKeyType[1]; perfStats.maxGpuLatency = maxGpuLatency; + m_nvapi.getMemoryInfo(perfStats.gpuMemoryUsed, perfStats.gpuMemoryMax); if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) { @@ -6320,17 +6828,18 @@ BX_PRAGMA_DIAGNOSTIC_POP(); m_needPresent = true; TextVideoMem& tvm = m_textVideoMem; - static int64_t next = now; + static int64_t next = timeEnd; - if (now >= next) + if (timeEnd >= next) { - next = now + timerFreq; - double freq = double(bx::getHPFrequency() ); + next = timeEnd + timerFreq; + + double freq = double(timerFreq); double toMs = 1000.0/freq; tvm.clear(); uint16_t pos = 0; - tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x89 : 0x8f + tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f , " %s.%d (FL %d.%d) / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " , getRendererName() , m_deviceInterfaceVersion @@ -6363,7 +6872,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); ); pos = 10; - tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " + tvm.printf(10, pos++, 0x8b, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " , double(frameTime)*toMs , double(min)*toMs , double(max)*toMs @@ -6374,7 +6883,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); bx::snprintf(hmd, BX_COUNTOF(hmd), ", [%c] HMD ", hmdEnabled ? '\xfe' : ' '); const uint32_t msaa = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT; - tvm.printf(10, pos++, 0x8e, " Reset flags: [%c] vsync, [%c] MSAAx%d%s, [%c] MaxAnisotropy " + tvm.printf(10, pos++, 0x8b, " Reset flags: [%c] vsync, [%c] MSAAx%d%s, [%c] MaxAnisotropy " , !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? '\xfe' : ' ' , 0 != msaa ? '\xfe' : ' ' , 1<m_num + double elapsedCpuMs = double(frameTime)*toMs; + tvm.printf(10, pos++, 0x8b, " Submitted: %5d (draw %5d, compute %4d) / CPU %7.4f [ms] %c GPU %7.4f [ms] (latency %d) " + , _render->m_numRenderItems , statsKeyType[0] , statsKeyType[1] , elapsedCpuMs @@ -6397,7 +6906,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); for (uint32_t ii = 0; ii < BX_COUNTOF(s_primName); ++ii) { - tvm.printf(10, pos++, 0x8e, " %10s: %7d (#inst: %5d), submitted: %7d, indirect %7d" + tvm.printf(10, pos++, 0x8b, " %10s: %7d (#inst: %5d), submitted: %7d, indirect %7d" , s_primName[ii] , statsNumPrimsRendered[ii] , statsNumInstances[ii] @@ -6411,18 +6920,18 @@ BX_PRAGMA_DIAGNOSTIC_POP(); tvm.printf(tvm.m_width-27, 0, 0x1f, " [F11 - RenderDoc capture] "); } - tvm.printf(10, pos++, 0x8e, " Indices: %7d ", statsNumIndices); - tvm.printf(10, pos++, 0x8e, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); - tvm.printf(10, pos++, 0x8e, " DVB size: %7d ", _render->m_vboffset); - tvm.printf(10, pos++, 0x8e, " DIB size: %7d ", _render->m_iboffset); + tvm.printf(10, pos++, 0x8b, " Indices: %7d ", statsNumIndices); +// tvm.printf(10, pos++, 0x8b, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); + tvm.printf(10, pos++, 0x8b, " DVB size: %7d ", _render->m_vboffset); + tvm.printf(10, pos++, 0x8b, " DIB size: %7d ", _render->m_iboffset); pos++; - tvm.printf(10, pos++, 0x8e, " Occlusion queries: %3d ", m_occlusionQuery.m_control.available() ); + tvm.printf(10, pos++, 0x8b, " Occlusion queries: %3d ", m_occlusionQuery.m_control.available() ); pos++; - tvm.printf(10, pos++, 0x8e, " State cache: "); - tvm.printf(10, pos++, 0x8e, " Blend | DepthS | Input | Raster | Sampler "); - tvm.printf(10, pos++, 0x8e, " %6d | %6d | %6d | %6d | %6d " + tvm.printf(10, pos++, 0x8b, " State cache: "); + tvm.printf(10, pos++, 0x8b, " Blend | DepthS | Input | Raster | Sampler "); + tvm.printf(10, pos++, 0x8b, " %6d | %6d | %6d | %6d | %6d " , m_blendStateCache.getCount() , m_depthStencilStateCache.getCount() , m_inputLayoutCache.getCount() @@ -6432,9 +6941,9 @@ BX_PRAGMA_DIAGNOSTIC_POP(); pos++; double captureMs = double(captureElapsed)*toMs; - tvm.printf(10, pos++, 0x8e, " Capture: %7.4f [ms] ", captureMs); + tvm.printf(10, pos++, 0x8b, " Capture: %7.4f [ms] ", captureMs); - uint8_t attr[2] = { 0x89, 0x8a }; + uint8_t attr[2] = { 0x8c, 0x8a }; uint8_t attrIndex = _render->m_waitSubmit < _render->m_waitRender; tvm.printf(10, pos++, attr[attrIndex&1], " Submit wait: %7.4f [ms] ", _render->m_waitSubmit*toMs); @@ -6456,21 +6965,18 @@ BX_PRAGMA_DIAGNOSTIC_POP(); PIX_ENDEVENT(); } + + m_deviceCtx->OMSetRenderTargets(1, s_zero.m_rtv, NULL); } } /* namespace d3d11 */ } // namespace bgfx -#undef BGFX_GPU_PROFILER_BIND -#undef BGFX_GPU_PROFILER_UNBIND -#undef BGFX_GPU_PROFILER_BEGIN -#undef BGFX_GPU_PROFILER_BEGIN_DYNAMIC -#undef BGFX_GPU_PROFILER_END - #else namespace bgfx { namespace d3d11 { - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { + BX_UNUSED(_init); return NULL; } diff --git a/3rdparty/bgfx/src/renderer_d3d11.h b/3rdparty/bgfx/src/renderer_d3d11.h index 852a69e..ecd6ba3 100644 --- a/3rdparty/bgfx/src/renderer_d3d11.h +++ b/3rdparty/bgfx/src/renderer_d3d11.h @@ -1,16 +1,17 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #ifndef BGFX_RENDERER_D3D11_H_HEADER_GUARD #define BGFX_RENDERER_D3D11_H_HEADER_GUARD -#define USE_D3D11_DYNAMIC_LIB BX_PLATFORM_WINDOWS +#define USE_D3D11_DYNAMIC_LIB BX_PLATFORM_WINDOWS +#define USE_D3D11_STAGING_BUFFER 0 #if !USE_D3D11_DYNAMIC_LIB -# undef BGFX_CONFIG_DEBUG_PIX -# define BGFX_CONFIG_DEBUG_PIX 0 +# undef BGFX_CONFIG_DEBUG_PIX +# define BGFX_CONFIG_DEBUG_PIX 0 #endif // !USE_D3D11_DYNAMIC_LIB BX_PRAGMA_DIAGNOSTIC_PUSH(); @@ -20,12 +21,16 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4005) // warning C4005: '' : macro redefinitio #include #define D3D11_NO_HELPERS #if BX_PLATFORM_WINDOWS -# include -# include +# include +# include #elif BX_PLATFORM_WINRT -# include +# define __D3D10_1SHADER_H__ // BK - not used keep quiet! +# include #else -# include +# if !BGFX_CONFIG_DEBUG +# define D3DCOMPILE_NO_DEBUG_AND_ALL_FAST_SEMANTICS 1 +# endif // !BGFX_CONFIG_DEBUG +# include #endif // BX_PLATFORM_* BX_PRAGMA_DIAGNOSTIC_POP() @@ -35,14 +40,7 @@ BX_PRAGMA_DIAGNOSTIC_POP() #include "hmd.h" #include "hmd_openvr.h" #include "debug_renderdoc.h" - -#ifndef D3DCOLOR_ARGB -# define D3DCOLOR_ARGB(_a, _r, _g, _b) ( (DWORD)( ( ( (_a)&0xff)<<24)|( ( (_r)&0xff)<<16)|( ( (_g)&0xff)<<8)|( (_b)&0xff) ) ) -#endif // D3DCOLOR_ARGB - -#ifndef D3DCOLOR_RGBA -# define D3DCOLOR_RGBA(_r, _g, _b, _a) D3DCOLOR_ARGB(_a, _r, _g, _b) -#endif // D3DCOLOR_RGBA +#include "nvapi.h" #define BGFX_D3D11_BLEND_STATE_MASK (0 \ | BGFX_STATE_BLEND_MASK \ @@ -64,6 +62,9 @@ namespace bgfx { namespace d3d11 { BufferD3D11() : m_ptr(NULL) +#if USE_D3D11_STAGING_BUFFER + , m_staging(NULL) +#endif // USE_D3D11_STAGING_BUFFER , m_srv(NULL) , m_uav(NULL) , m_flags(BGFX_BUFFER_NONE) @@ -82,11 +83,18 @@ namespace bgfx { namespace d3d11 m_dynamic = false; } +#if USE_D3D11_STAGING_BUFFER + DX_RELEASE(m_staging, 0); +#endif // USE_D3D11_STAGING_BUFFER + DX_RELEASE(m_srv, 0); DX_RELEASE(m_uav, 0); } ID3D11Buffer* m_ptr; +#if USE_D3D11_STAGING_BUFFER + ID3D11Buffer* m_staging; +#endif // USE_D3D11_STAGING_BUFFER ID3D11ShaderResourceView* m_srv; ID3D11UnorderedAccessView* m_uav; uint32_t m_size; @@ -154,7 +162,7 @@ namespace bgfx { namespace d3d11 ID3D11ComputeShader* m_computeShader; ID3D11PixelShader* m_pixelShader; ID3D11VertexShader* m_vertexShader; - IUnknown* m_ptr; + ID3D11DeviceChild* m_ptr; }; const Memory* m_code; ID3D11Buffer* m_buffer; @@ -208,6 +216,38 @@ namespace bgfx { namespace d3d11 uint8_t m_numPredefined; }; + struct IntelDirectAccessResourceDescriptor + { + void* ptr; + uint32_t xoffset; + uint32_t yoffset; + uint32_t tileFormat; + uint32_t pitch; + uint32_t size; + }; + + struct DirectAccessResourceD3D11 + { + DirectAccessResourceD3D11() + : m_ptr(NULL) + , m_descriptor(NULL) + { + } + + void* createTexture2D(const D3D11_TEXTURE2D_DESC* _gpuDesc, const D3D11_SUBRESOURCE_DATA* _srd, ID3D11Texture2D** _gpuTexture2d); + void* createTexture3D(const D3D11_TEXTURE3D_DESC* _gpuDesc, const D3D11_SUBRESOURCE_DATA* _srd, ID3D11Texture3D** _gpuTexture3d); + void destroy(); + + union + { + ID3D11Resource* m_ptr; + ID3D11Texture2D* m_texture2d; + ID3D11Texture3D* m_texture3d; + }; + + IntelDirectAccessResourceDescriptor* m_descriptor; + }; + struct TextureD3D11 { enum Enum @@ -226,13 +266,14 @@ namespace bgfx { namespace d3d11 { } - void create(const Memory* _mem, uint32_t _flags, uint8_t _skip); + void* create(const Memory* _mem, uint32_t _flags, uint8_t _skip); void destroy(); void overrideInternal(uintptr_t _ptr); void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem); void commit(uint8_t _stage, uint32_t _flags, const float _palette[][4]); void resolve() const; TextureHandle getHandle() const; + DXGI_FORMAT getSrvFormat() const; union { @@ -241,6 +282,8 @@ namespace bgfx { namespace d3d11 ID3D11Texture3D* m_texture3d; }; + DirectAccessResourceD3D11 m_dar; + union { ID3D11Resource* m_rt; @@ -300,29 +343,44 @@ namespace bgfx { namespace d3d11 struct TimerQueryD3D11 { TimerQueryD3D11() - : m_control(BX_COUNTOF(m_frame) ) + : m_control(BX_COUNTOF(m_query) ) { } void postReset(); void preReset(); - void begin(); - void end(); - bool get(); + uint32_t begin(uint32_t _resultIdx); + void end(uint32_t _idx); + bool update(); - struct Frame + struct Query { ID3D11Query* m_disjoint; ID3D11Query* m_begin; ID3D11Query* m_end; + uint32_t m_resultIdx; + bool m_ready; }; - uint64_t m_begin; - uint64_t m_end; - uint64_t m_elapsed; - uint64_t m_frequency; + struct Result + { + void reset() + { + m_begin = 0; + m_end = 0; + m_frequency = 1; + m_pending = 0; + } - Frame m_frame[4]; + uint64_t m_begin; + uint64_t m_end; + uint64_t m_frequency; + uint32_t m_pending; + }; + + Result m_result[BGFX_CONFIG_MAX_VIEWS+1]; + + Query m_query[BGFX_CONFIG_MAX_VIEWS*4]; bx::RingBufferControl m_control; }; diff --git a/3rdparty/bgfx/src/renderer_d3d12.cpp b/3rdparty/bgfx/src/renderer_d3d12.cpp index c7f7cca..47f6207 100644 --- a/3rdparty/bgfx/src/renderer_d3d12.cpp +++ b/3rdparty/bgfx/src/renderer_d3d12.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -8,9 +8,21 @@ #if BGFX_CONFIG_RENDERER_DIRECT3D12 # include "renderer_d3d12.h" +#if !BX_PLATFORM_WINDOWS +# include +# if BX_PLATFORM_WINRT +# include +# endif // BX_PLATFORM_WINRT +#endif // !BX_PLATFORM_WINDOWS + +#if BGFX_CONFIG_DEBUG_PIX && (BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT) +PFN_PIX_GET_THREAD_INFO bgfx_PIXGetThreadInfo; +PFN_PIX_EVENTS_REPLACE_BLOCK bgfx_PIXEventsReplaceBlock; +#endif // BGFX_CONFIG_DEBUG_PIX && BX_PLATFORM_WINDOWS + namespace bgfx { namespace d3d12 { - static wchar_t s_viewNameW[BGFX_CONFIG_MAX_VIEWS][256]; + static char s_viewName[BGFX_CONFIG_MAX_VIEWS][BGFX_CONFIG_MAX_VIEW_NAME]; struct PrimInfo { @@ -239,7 +251,7 @@ namespace bgfx { namespace d3d12 { DXGI_FORMAT_B4G4R4A4_UNORM, DXGI_FORMAT_B4G4R4A4_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGBA4 { DXGI_FORMAT_B5G5R5A1_UNORM, DXGI_FORMAT_B5G5R5A1_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGB5A1 { DXGI_FORMAT_R10G10B10A2_UNORM, DXGI_FORMAT_R10G10B10A2_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RGB10A2 - { DXGI_FORMAT_R11G11B10_FLOAT, DXGI_FORMAT_R11G11B10_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // R11G11B10F + { DXGI_FORMAT_R11G11B10_FLOAT, DXGI_FORMAT_R11G11B10_FLOAT, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // RG11B10F { DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, // UnknownDepth { DXGI_FORMAT_R16_TYPELESS, DXGI_FORMAT_R16_UNORM, DXGI_FORMAT_D16_UNORM, DXGI_FORMAT_UNKNOWN }, // D16 { DXGI_FORMAT_R24G8_TYPELESS, DXGI_FORMAT_R24_UNORM_X8_TYPELESS, DXGI_FORMAT_D24_UNORM_S8_UINT, DXGI_FORMAT_UNKNOWN }, // D24 @@ -252,6 +264,47 @@ namespace bgfx { namespace d3d12 }; BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_textureFormat) ); + static const char* s_colorSpace[] = + { + // https://msdn.microsoft.com/en-us/library/windows/desktop/dn903661(v=vs.85).aspx + "RGB, 0-255, 2.2, Image, BT.709, n/a", // DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 + "RGB, 0-255, 1.0, Image, BT.709, n/a", // DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 + "RGB, 16-235, 2.2, Image, BT.709, n/a", // DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709 + "RGB, 16-235, 2.2, Image, BT.2020, n/a", // DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020 + "Reserved", // DXGI_COLOR_SPACE_RESERVED + "YCbCr, 0-255, 2.2, Image, BT.709, BT.601", // DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 + "YCbCr, 16-235, 2.2, Video, BT.601, n/a", // DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 + "YCbCr, 0-255, 2.2, Video, BT.601, n/a", // DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601 + "YCbCr, 16-235, 2.2, Video, BT.709, n/a", // DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 + "YCbCr, 0-255, 2.2, Video, BT.709, n/a", // DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709 + "YCbCr, 16-235, 2.2, Video, BT.2020, n/a", // DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 + "YCbCr, 0-255, 2.2, Video, BT.2020, n/a", // DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 + "RGB, 0-255, 2084, Image, BT.2020, n/a", // DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 + "YCbCr, 16-235, 2084, Video, BT.2020, n/a", // DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020 + "RGB, 0-255, 2084, Image, BT.2020, n/a", // DXGI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020 + "YCbCr, 16-235, 2.2, Video, BT.2020, n/a", // DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020 + "YCbCr, 16-235, 2084, Video, BT.2020, n/a", // DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020 +#if BX_PLATFORM_WINDOWS + "RGB, 0-255, 2.2, Image, BT.2020, n/a", // DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020 + "YCbCr, 16-235, HLG, Video, BT.2020, n/a", // DXGI_COLOR_SPACE_YCBCR_STUDIO_GHLG_TOPLEFT_P2020 + "YCbCr, 0-255, HLG, Video, BT.2020, n/a", // DXGI_COLOR_SPACE_YCBCR_FULL_GHLG_TOPLEFT_P2020 +// "RGB, 16-235, 2.4, Image, BT.709, n/a", // DXGI_COLOR_SPACE_RGB_STUDIO_G24_NONE_P709 +// "RGB, 16-235, 2.4, Image, BT.2020, n/a", // DXGI_COLOR_SPACE_RGB_STUDIO_G24_NONE_P2020 +// "YCbCr, 16-235, 2.4, Video, BT.709, n/a", // DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_LEFT_P709 +// "YCbCr, 16-235, 2.4, Video, BT.2020, n/a", // DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_LEFT_P2020 +// "YCbCr, 16-235, 2.4, Video, BT.2020, n/a", // DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_TOPLEFT_P2020 +#endif // BX_PLATFORM_WINDOWS + "Custom", + }; + static const char kDxgiLastColorSpace = +#if BX_PLATFORM_WINDOWS + DXGI_COLOR_SPACE_YCBCR_FULL_GHLG_TOPLEFT_P2020 +#else + DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020 +#endif // BX_PLATFORM_WINDOWS + ; + BX_STATIC_ASSERT(BX_COUNTOF(s_colorSpace) == kDxgiLastColorSpace+2); + static const D3D12_INPUT_ELEMENT_DESC s_attrib[] = { { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, @@ -260,6 +313,8 @@ namespace bgfx { namespace d3d12 { "BITANGENT", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, { "COLOR", 1, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, + { "COLOR", 2, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, + { "COLOR", 3, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, { "BLENDINDICES", 0, DXGI_FORMAT_R8G8B8A8_UINT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, { "BLENDWEIGHT", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, @@ -308,7 +363,7 @@ namespace bgfx { namespace d3d12 }; BX_STATIC_ASSERT(AttribType::Count == BX_COUNTOF(s_attribType) ); - static D3D12_INPUT_ELEMENT_DESC* fillVertexDecl(D3D12_INPUT_ELEMENT_DESC* _out, const VertexDecl& _decl) + static D3D12_INPUT_ELEMENT_DESC* fillVertexDecl(uint8_t _stream, D3D12_INPUT_ELEMENT_DESC* _out, const VertexDecl& _decl) { D3D12_INPUT_ELEMENT_DESC* elem = _out; @@ -318,6 +373,8 @@ namespace bgfx { namespace d3d12 { bx::memCopy(elem, &s_attrib[attr], sizeof(D3D12_INPUT_ELEMENT_DESC) ); + elem->InputSlot = _stream; + if (0 == _decl.m_attributes[attr]) { elem->AlignedByteOffset = 0; @@ -352,11 +409,15 @@ namespace bgfx { namespace d3d12 _commandList->ResourceBarrier(1, &barrier); } -#if USE_D3D12_DYNAMIC_LIB + BX_PRAGMA_DIAGNOSTIC_PUSH(); + BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wunused-const-variable"); + BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wunneeded-internal-declaration"); + static const GUID IID_ID3D12CommandAllocator = { 0x6102dee4, 0xaf59, 0x4b09, { 0xb9, 0x99, 0xb4, 0x4d, 0x73, 0xf0, 0x9b, 0x24 } }; static const GUID IID_ID3D12CommandQueue = { 0x0ec870a6, 0x5d7e, 0x4c22, { 0x8c, 0xfc, 0x5b, 0xaa, 0xe0, 0x76, 0x16, 0xed } }; static const GUID IID_ID3D12CommandSignature = { 0xc36a797c, 0xec80, 0x4f0a, { 0x89, 0x85, 0xa7, 0xb2, 0x47, 0x50, 0x82, 0xd1 } }; static const GUID IID_ID3D12Debug = { 0x344488b7, 0x6846, 0x474b, { 0xb9, 0x89, 0xf0, 0x27, 0x44, 0x82, 0x45, 0xe0 } }; + static const GUID IID_ID3D12Debug1 = { 0xaffaa4ca, 0x63fe, 0x4d8e, { 0xb8, 0xad, 0x15, 0x90, 0x00, 0xaf, 0x43, 0x04 } }; static const GUID IID_ID3D12DescriptorHeap = { 0x8efb471d, 0x616c, 0x4f49, { 0x90, 0xf7, 0x12, 0x7b, 0xb7, 0x63, 0xfa, 0x51 } }; static const GUID IID_ID3D12Device = { 0x189819f1, 0x1db6, 0x4b57, { 0xbe, 0x54, 0x18, 0x21, 0x33, 0x9b, 0x85, 0xf7 } }; static const GUID IID_ID3D12Fence = { 0x0a753dcf, 0xc4d8, 0x4b91, { 0xad, 0xf6, 0xbe, 0x5a, 0x60, 0xd9, 0x5a, 0x76 } }; @@ -366,17 +427,23 @@ namespace bgfx { namespace d3d12 static const GUID IID_ID3D12Resource = { 0x696442be, 0xa72e, 0x4059, { 0xbc, 0x79, 0x5b, 0x5c, 0x98, 0x04, 0x0f, 0xad } }; static const GUID IID_ID3D12RootSignature = { 0xc54a6b66, 0x72df, 0x4ee8, { 0x8b, 0xe5, 0xa9, 0x46, 0xa1, 0x42, 0x92, 0x14 } }; static const GUID IID_ID3D12QueryHeap = { 0x0d9658ae, 0xed45, 0x469e, { 0xa6, 0x1d, 0x97, 0x0e, 0xc5, 0x83, 0xca, 0xb4 } }; + static const GUID IID_IDXGIDevice0 = { 0x54ec77fa, 0x1377, 0x44e6, { 0x8c, 0x32, 0x88, 0xfd, 0x5f, 0x44, 0xc8, 0x4c } }; + static const GUID IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } }; + static const GUID IID_IDXGIDevice2 = { 0x05008617, 0xfbfd, 0x4051, { 0xa7, 0x90, 0x14, 0x48, 0x84, 0xb4, 0xf6, 0xa9 } }; + static const GUID IID_IDXGIDevice3 = { 0x6007896c, 0x3244, 0x4afd, { 0xbf, 0x18, 0xa6, 0xd3, 0xbe, 0xda, 0x50, 0x23 } }; + static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; static const GUID IID_IDXGIFactory4 = { 0x1bc6ea02, 0xef36, 0x464f, { 0xbf, 0x0c, 0x21, 0xca, 0x39, 0xe5, 0x16, 0x8a } }; -#else - static const GUID IID_ID3D12CommandSignature = { 0xc36a797c, 0xec80, 0x4f0a, { 0x89, 0x85, 0xa7, 0xb2, 0x47, 0x50, 0x82, 0xd1 } }; - static const GUID IID_ID3D12QueryHeap = { 0x0d9658ae, 0xed45, 0x469e, { 0xa6, 0x1d, 0x97, 0x0e, 0xc5, 0x83, 0xca, 0xb4 } }; -#endif // USE_D3D12_DYNAMIC_LIB + static const GUID IID_IDXGIOutput6 = { 0x068346e8, 0xaaec, 0x4b84, { 0xad, 0xd7, 0x13, 0x7f, 0x51, 0x3f, 0x77, 0xa1 } }; + + + BX_PRAGMA_DIAGNOSTIC_POP(); struct HeapProperty { enum Enum { Default, + Texture, Upload, ReadBack, @@ -387,26 +454,43 @@ namespace bgfx { namespace d3d12 D3D12_RESOURCE_STATES m_state; }; - static const HeapProperty s_heapProperties[] = + static HeapProperty s_heapProperties[] = { - { { D3D12_HEAP_TYPE_DEFAULT, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, D3D12_MEMORY_POOL_UNKNOWN, 1, 1 }, D3D12_RESOURCE_STATE_COMMON }, - { { D3D12_HEAP_TYPE_UPLOAD, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, D3D12_MEMORY_POOL_UNKNOWN, 1, 1 }, D3D12_RESOURCE_STATE_GENERIC_READ }, - { { D3D12_HEAP_TYPE_READBACK, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, D3D12_MEMORY_POOL_UNKNOWN, 1, 1 }, D3D12_RESOURCE_STATE_COPY_DEST }, + { { D3D12_HEAP_TYPE_DEFAULT, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, D3D12_MEMORY_POOL_UNKNOWN, 0, 0 }, D3D12_RESOURCE_STATE_COMMON }, + { { D3D12_HEAP_TYPE_DEFAULT, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, D3D12_MEMORY_POOL_UNKNOWN, 0, 0 }, D3D12_RESOURCE_STATE_COMMON }, + { { D3D12_HEAP_TYPE_UPLOAD, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, D3D12_MEMORY_POOL_UNKNOWN, 0, 0 }, D3D12_RESOURCE_STATE_GENERIC_READ }, + { { D3D12_HEAP_TYPE_READBACK, D3D12_CPU_PAGE_PROPERTY_UNKNOWN, D3D12_MEMORY_POOL_UNKNOWN, 0, 0 }, D3D12_RESOURCE_STATE_COPY_DEST }, }; BX_STATIC_ASSERT(BX_COUNTOF(s_heapProperties) == HeapProperty::Count); + static void initHeapProperties(ID3D12Device* _device, D3D12_HEAP_PROPERTIES& _properties) + { + if (D3D12_HEAP_TYPE_CUSTOM != _properties.Type) + { + _properties = _device->GetCustomHeapProperties(1, _properties.Type); + } + } + + static void initHeapProperties(ID3D12Device* _device) + { + initHeapProperties(_device, s_heapProperties[HeapProperty::Default ].m_properties); + initHeapProperties(_device, s_heapProperties[HeapProperty::Texture ].m_properties); + initHeapProperties(_device, s_heapProperties[HeapProperty::Upload ].m_properties); + initHeapProperties(_device, s_heapProperties[HeapProperty::ReadBack].m_properties); + } + ID3D12Resource* createCommittedResource(ID3D12Device* _device, HeapProperty::Enum _heapProperty, D3D12_RESOURCE_DESC* _resourceDesc, D3D12_CLEAR_VALUE* _clearValue) { const HeapProperty& heapProperty = s_heapProperties[_heapProperty]; ID3D12Resource* resource; DX_CHECK(_device->CreateCommittedResource(&heapProperty.m_properties - , D3D12_HEAP_FLAG_NONE - , _resourceDesc - , heapProperty.m_state - , _clearValue - , IID_ID3D12Resource - , (void**)&resource - ) ); + , D3D12_HEAP_FLAG_NONE + , _resourceDesc + , heapProperty.m_state + , _clearValue + , IID_ID3D12Resource + , (void**)&resource + ) ); BX_WARN(NULL != resource, "CreateCommittedResource failed (size: %d). Out of memory?" , _resourceDesc->Width ); @@ -499,12 +583,64 @@ namespace bgfx { namespace d3d12 static PFN_CREATE_EVENT_EX_A CreateEventExA; #endif // USE_D3D12_DYNAMIC_LIB + inline D3D12_CPU_DESCRIPTOR_HANDLE getCPUHandleHeapStart(ID3D12DescriptorHeap* _heap) + { +#if BX_COMPILER_MSVC + return _heap->GetCPUDescriptorHandleForHeapStart(); +#else + D3D12_CPU_DESCRIPTOR_HANDLE handle; + typedef void (WINAPI ID3D12DescriptorHeap::*PFN_GET_CPU_DESCRIPTOR_HANDLE_FOR_HEAP_START)(D3D12_CPU_DESCRIPTOR_HANDLE *); + (_heap->*(PFN_GET_CPU_DESCRIPTOR_HANDLE_FOR_HEAP_START)(&ID3D12DescriptorHeap::GetCPUDescriptorHandleForHeapStart) )(&handle); + return handle; +#endif // BX_COMPILER_MSVC + } + + inline D3D12_GPU_DESCRIPTOR_HANDLE getGPUHandleHeapStart(ID3D12DescriptorHeap* _heap) + { +#if BX_COMPILER_MSVC + return _heap->GetGPUDescriptorHandleForHeapStart(); +#else + D3D12_GPU_DESCRIPTOR_HANDLE handle; + typedef void (WINAPI ID3D12DescriptorHeap::*PFN_GET_GPU_DESCRIPTOR_HANDLE_FOR_HEAP_START)(D3D12_GPU_DESCRIPTOR_HANDLE *); + (_heap->*(PFN_GET_GPU_DESCRIPTOR_HANDLE_FOR_HEAP_START)(&ID3D12DescriptorHeap::GetGPUDescriptorHandleForHeapStart) )(&handle); + return handle; +#endif // BX_COMPILER_MSVC + } + + inline D3D12_RESOURCE_DESC getResourceDesc(ID3D12Resource* _resource) + { +#if BX_COMPILER_MSVC + return _resource->GetDesc(); +#else + typedef void (STDMETHODCALLTYPE ID3D12Resource::*PFN_GET_GET_DESC)(D3D12_RESOURCE_DESC*); + D3D12_RESOURCE_DESC desc; + (_resource->*(PFN_GET_GET_DESC)(&ID3D12Resource::GetDesc))(&desc); + return desc; +#endif // BX_COMPILER_MSVC + } + +#if BGFX_CONFIG_DEBUG_PIX && (BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT) + static PIXEventsThreadInfo s_pixEventsThreadInfo; + + PIXEventsThreadInfo* WINAPI stubPIXGetThreadInfo() + { + return &s_pixEventsThreadInfo; + } + + uint64_t WINAPI stubPIXEventsReplaceBlock(bool _getEarliestTime) + { + BX_UNUSED(_getEarliestTime); + return 0; + } +#endif // BGFX_CONFIG_DEBUG_PIX && BX_PLATFORM_WINDOWS + struct RendererContextD3D12 : public RendererContextI { RendererContextD3D12() : m_d3d12dll(NULL) , m_dxgidll(NULL) , m_renderdocdll(NULL) + , m_winPixEvent(NULL) , m_featureLevel(D3D_FEATURE_LEVEL(0) ) , m_wireframe(false) , m_lost(false) @@ -521,7 +657,7 @@ namespace bgfx { namespace d3d12 { } - bool init() + bool init(const Init& _init) { struct ErrorState { @@ -539,33 +675,51 @@ namespace bgfx { namespace d3d12 ErrorState::Enum errorState = ErrorState::Default; LUID luid; - m_renderdocdll = loadRenderDoc(); +#if BGFX_CONFIG_DEBUG_PIX && (BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT) + m_winPixEvent = bx::dlopen("WinPixEventRuntime.dll"); - m_fbh.idx = invalidHandle; + if (NULL != m_winPixEvent) + { + bgfx_PIXGetThreadInfo = (PFN_PIX_GET_THREAD_INFO )bx::dlsym(m_winPixEvent, "PIXGetThreadInfo"); + bgfx_PIXEventsReplaceBlock = (PFN_PIX_EVENTS_REPLACE_BLOCK)bx::dlsym(m_winPixEvent, "PIXEventsReplaceBlock"); + } + + if (NULL == bgfx_PIXGetThreadInfo + || NULL == bgfx_PIXEventsReplaceBlock) + { + bgfx_PIXGetThreadInfo = stubPIXGetThreadInfo; + bgfx_PIXEventsReplaceBlock = stubPIXEventsReplaceBlock; + } +#endif // BGFX_CONFIG_DEBUG_PIX && BX_PLATFORM_WINDOWS + + m_renderdocdll = loadRenderDoc(); + setGraphicsDebuggerPresent(NULL != m_renderdocdll || NULL != m_winPixEvent); + + m_fbh.idx = kInvalidHandle; bx::memSet(m_uniforms, 0, sizeof(m_uniforms) ); bx::memSet(&m_resolution, 0, sizeof(m_resolution) ); #if USE_D3D12_DYNAMIC_LIB m_kernel32dll = bx::dlopen("kernel32.dll"); - BX_WARN(NULL != m_kernel32dll, "Failed to load kernel32.dll."); if (NULL == m_kernel32dll) { + BX_TRACE("Init error: Failed to load kernel32.dll."); goto error; } CreateEventExA = (PFN_CREATE_EVENT_EX_A)bx::dlsym(m_kernel32dll, "CreateEventExA"); - BX_WARN(NULL != CreateEventExA, "Function CreateEventExA not found."); if (NULL == CreateEventExA) { + BX_TRACE("Init error: Function CreateEventExA not found."); goto error; } errorState = ErrorState::LoadedKernel32; m_d3d12dll = bx::dlopen("d3d12.dll"); - BX_WARN(NULL != m_d3d12dll, "Failed to load d3d12.dll."); if (NULL == m_d3d12dll) { + BX_TRACE("Init error: Failed to load d3d12.dll."); goto error; } @@ -584,22 +738,23 @@ namespace bgfx { namespace d3d12 || NULL == D3D12GetDebugInterface || NULL == D3D12SerializeRootSignature) { + BX_TRACE("Init error: Function not found."); goto error; } m_dxgidll = bx::dlopen("dxgi.dll"); - BX_WARN(NULL != m_dxgidll, "Failed to load dxgi.dll."); if (NULL == m_dxgidll) { + BX_TRACE("Init error: Failed to load dxgi.dll."); goto error; } CreateDXGIFactory1 = (PFN_CREATE_DXGI_FACTORY)bx::dlsym(m_dxgidll, "CreateDXGIFactory1"); - BX_WARN(NULL != CreateDXGIFactory1, "Function CreateDXGIFactory1 not found."); if (NULL == CreateDXGIFactory1) { + BX_TRACE("Init error: Function CreateDXGIFactory1 not found."); goto error; } #endif // USE_D3D12_DYNAMIC_LIB @@ -608,16 +763,16 @@ namespace bgfx { namespace d3d12 HRESULT hr; -#if BX_PLATFORM_WINDOWS +#if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT hr = CreateDXGIFactory1(IID_IDXGIFactory4, (void**)&m_factory); #else hr = S_OK; m_factory = NULL; #endif // BX_PLATFORM_* - BX_WARN(SUCCEEDED(hr), "Unable to create DXGI factory."); if (FAILED(hr) ) { + BX_TRACE("Init error: Unable to create DXGI factory."); goto error; } @@ -628,7 +783,7 @@ namespace bgfx { namespace d3d12 if (NULL != m_factory) { -#if BX_PLATFORM_WINDOWS +#if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT IDXGIAdapter3* adapter; #else IDXGIAdapter* adapter; @@ -645,16 +800,16 @@ namespace bgfx { namespace d3d12 wcstombs(description, desc.Description, BX_COUNTOF(desc.Description) ); BX_TRACE("\tDescription: %s", description); BX_TRACE("\tVendorId: 0x%08x, DeviceId: 0x%08x, SubSysId: 0x%08x, Revision: 0x%08x" - , desc.VendorId - , desc.DeviceId - , desc.SubSysId - , desc.Revision - ); + , desc.VendorId + , desc.DeviceId + , desc.SubSysId + , desc.Revision + ); BX_TRACE("\tMemory: %" PRIi64 " (video), %" PRIi64 " (system), %" PRIi64 " (shared)" - , desc.DedicatedVideoMemory - , desc.DedicatedSystemMemory - , desc.SharedSystemMemory - ); + , desc.DedicatedVideoMemory + , desc.DedicatedSystemMemory + , desc.SharedSystemMemory + ); g_caps.gpu[ii].vendorId = (uint16_t)desc.VendorId; g_caps.gpu[ii].deviceId = (uint16_t)desc.DeviceId; @@ -670,7 +825,7 @@ namespace bgfx { namespace d3d12 } if (BX_ENABLED(BGFX_CONFIG_DEBUG_PERFHUD) - && 0 != bx::strnstr(description, "PerfHUD") ) + && 0 != bx::strFind(description, "PerfHUD") ) { m_adapter = adapter; m_driverType = D3D_DRIVER_TYPE_REFERENCE; @@ -683,12 +838,25 @@ namespace bgfx { namespace d3d12 if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) { - ID3D12Debug* debug; - hr = D3D12GetDebugInterface(IID_ID3D12Debug, (void**)&debug); + ID3D12Debug* debug0; + hr = D3D12GetDebugInterface(IID_ID3D12Debug, (void**)&debug0); if (SUCCEEDED(hr) ) { - debug->EnableDebugLayer(); + debug0->EnableDebugLayer(); + +#if BX_PLATFORM_WINDOWS + { + ID3D12Debug1* debug1; + hr = debug0->QueryInterface(IID_ID3D12Debug1, (void**)&debug1); + + if (SUCCEEDED(hr) ) + { +// debug1->SetEnableGPUBasedValidation(true); +// debug1->SetEnableSynchronizedCommandQueueValidation(true); + } + } +#endif // BX_PLATFORM_WINDOWS } } @@ -719,14 +887,53 @@ namespace bgfx { namespace d3d12 if (FAILED(hr) ) { - BX_TRACE("Unable to create Direct3D12 device."); + BX_TRACE("Init error: Unable to create Direct3D12 device."); + if (BX_ENABLED(BX_PLATFORM_WINRT) ) + { + BX_TRACE("Hint: Change UWP app to game?"); + } goto error; } +#if !BX_PLATFORM_WINDOWS + if (NULL == m_factory) + { + IDXGIDevice1* dxgiDevice; + hr = m_device->QueryInterface(IID_IDXGIDevice1, (void**)&dxgiDevice); + + if (FAILED(hr) ) + { + BX_TRACE("Init error: Unable to query IDXGIDevice1 interface 0x%08x.", hr); + goto error; + } + + hr = dxgiDevice->GetAdapter(&m_adapter); + + if (FAILED(hr) ) + { + BX_TRACE("Init error: DXGIDevice1::GetAdapter failed 0x%08x.", hr); + goto error; + } + + hr = m_adapter->GetParent(IID_IDXGIFactory2, (void**)&m_factory); + + if (FAILED(hr) ) + { + BX_TRACE("Init error: IDXGIAdapter::GetParent failed 0x%08x.", hr); + goto error; + } + } +#endif // !BX_PLATFORM_WINDOWS + if (NULL != m_factory) { bx::memSet(&m_adapterDesc, 0, sizeof(m_adapterDesc) ); - luid = m_device->GetAdapterLuid(); +// NOTICE: +// LUID STDMETHODCALLTYPE ID3D12Device::GetAdapterLuid() has a different behaviour in gcc , +// because gcc64 returns small struct in RAX, but the microsoft implemention of ID3D12Device::GetAdapterLuid() in d3d12.dll +// pass the struct LUID's address as the second parameter. + typedef void (STDMETHODCALLTYPE ID3D12Device::*ID3D12Device_GetAdapterLuid_f)(LUID *); + (m_device->*(ID3D12Device_GetAdapterLuid_f)(&ID3D12Device::GetAdapterLuid))(&luid); #if BX_PLATFORM_WINDOWS IDXGIAdapter3* adapter; #else @@ -744,7 +951,11 @@ namespace bgfx { namespace d3d12 } else { +#if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT DX_RELEASE(adapter, 0); +#else + DX_RELEASE(adapter, 2); +#endif // BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT } break; } @@ -764,11 +975,11 @@ namespace bgfx { namespace d3d12 architecture.NodeIndex = ii; DX_CHECK(m_device->CheckFeatureSupport(D3D12_FEATURE_ARCHITECTURE, &architecture, sizeof(architecture) ) ); BX_TRACE("\tNode % 2d: TileBasedRenderer %d, UMA %d, CacheCoherentUMA %d" - , ii - , architecture.TileBasedRenderer - , architecture.UMA - , architecture.CacheCoherentUMA - ); + , ii + , architecture.TileBasedRenderer + , architecture.UMA + , architecture.CacheCoherentUMA + ); if (0 == ii) { bx::memCopy(&m_architecture, &architecture, sizeof(architecture) ); @@ -776,36 +987,6 @@ namespace bgfx { namespace d3d12 } } -#if !BX_PLATFORM_WINDOWS - if (NULL == m_factory) - { - IDXGIDevice1* dxgiDevice; - hr = m_device->QueryInterface(IID_IDXGIDevice1, (void**)&dxgiDevice); - - if (FAILED(hr) ) - { - BX_TRACE("Unable to query IDXGIDevice1 interface 0x%08x.", hr); - goto error; - } - - hr = dxgiDevice->GetAdapter(&m_adapter); - - if (FAILED(hr) ) - { - BX_TRACE("DXGIDevice1::GetAdapter failed 0x%08x.", hr); - goto error; - } - - hr = m_adapter->GetParent(IID_IDXGIFactory2, (void**)&m_factory); - - if (FAILED(hr) ) - { - BX_TRACE("IDXGIAdapter::GetParent failed 0x%08x.", hr); - goto error; - } - } -#endif // !BX_PLATFORM_WINDOWS - DX_CHECK(m_device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, &m_options, sizeof(m_options) ) ); BX_TRACE("D3D12 options:") BX_TRACE("\tTiledResourcesTier %d", m_options.TiledResourcesTier); @@ -815,41 +996,52 @@ namespace bgfx { namespace d3d12 BX_TRACE("\tCrossNodeSharingTier %d", m_options.CrossNodeSharingTier); BX_TRACE("\tResourceHeapTier %d", m_options.ResourceHeapTier); + initHeapProperties(m_device); + m_cmd.init(m_device); errorState = ErrorState::CreatedCommandQueue; if (NULL == g_platformData.backBuffer) { #if !BX_PLATFORM_WINDOWS - hr = m_adapter->GetParent(__uuidof(IDXGIFactory2), (void**)&m_factory); - DX_RELEASE(m_adapter, 1); - if (FAILED(hr) ) - { - BX_TRACE("Unable to create Direct3D11 device."); - goto error; - } - - m_scd.Width = BGFX_DEFAULT_WIDTH; - m_scd.Height = BGFX_DEFAULT_HEIGHT; + bx::memSet(&m_scd, 0, sizeof(m_scd) ); + m_scd.Width = _init.resolution.m_width; + m_scd.Height = _init.resolution.m_height; m_scd.Format = DXGI_FORMAT_R8G8B8A8_UNORM; m_scd.Stereo = false; m_scd.SampleDesc.Count = 1; m_scd.SampleDesc.Quality = 0; - m_scd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - m_scd.BufferCount = bx::uint32_min(BX_COUNTOF(m_backBufferColor), 4); - m_scd.Scaling = DXGI_SCALING_STRETCH; - m_scd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; - m_scd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; + m_scd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + m_scd.BufferCount = bx::uint32_min(BX_COUNTOF(m_backBufferColor), 4); + m_scd.Scaling = 0 == g_platformData.ndt + ? DXGI_SCALING_NONE + : DXGI_SCALING_STRETCH + ; + m_scd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; + m_scd.AlphaMode = DXGI_ALPHA_MODE_IGNORE; + m_scd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; + + m_backBufferColorIdx = m_scd.BufferCount-1; if (NULL == g_platformData.ndt) { - hr = m_factory->CreateSwapChainForCoreWindow(m_device + hr = m_factory->CreateSwapChainForCoreWindow( +#if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT + m_cmd.m_commandQueue +#else + m_device +#endif // BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT , (::IUnknown*)g_platformData.nwh , &m_scd , NULL , &m_swapChain ); - BGFX_FATAL(SUCCEEDED(hr), Fatal::UnableToInitialize, "Unable to create Direct3D11 swap chain."); + + if (FAILED(hr) ) + { + BX_TRACE("Init error: Unable to create Direct3D12 swap chain."); + goto error; + } } else { @@ -878,8 +1070,8 @@ namespace bgfx { namespace d3d12 # endif // BX_PLATFORM_WINRT } #else - m_scd.BufferDesc.Width = BGFX_DEFAULT_WIDTH; - m_scd.BufferDesc.Height = BGFX_DEFAULT_HEIGHT; + m_scd.BufferDesc.Width = _init.resolution.m_width; + m_scd.BufferDesc.Height = _init.resolution.m_height; m_scd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; m_scd.BufferDesc.Scaling = DXGI_MODE_SCALING_STRETCHED; m_scd.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; @@ -895,35 +1087,71 @@ namespace bgfx { namespace d3d12 m_scd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH; BX_CHECK(m_scd.BufferCount <= BX_COUNTOF(m_backBufferColor), "Swap chain buffer count %d (max %d)." - , m_scd.BufferCount - , BX_COUNTOF(m_backBufferColor) - ); + , m_scd.BufferCount + , BX_COUNTOF(m_backBufferColor) + ); hr = m_factory->CreateSwapChain(m_cmd.m_commandQueue - , &m_scd - , reinterpret_cast(&m_swapChain) - ); + , &m_scd + , reinterpret_cast(&m_swapChain) + ); #endif // BX_PLATFORM_* if (FAILED(hr) ) { - BX_TRACE("Failed to create swap chain."); + BX_TRACE("Init error: Failed to create swap chain."); goto error; } } + { + IDXGIOutput* output; + hr = m_swapChain->GetContainingOutput(&output); + if (SUCCEEDED(hr) ) + { +#if BX_PLATFORM_WINDOWS + IDXGIOutput6* output6; + hr = output->QueryInterface(IID_IDXGIOutput6, (void**)&output6); + if (SUCCEEDED(hr) ) + { + DXGI_OUTPUT_DESC1 desc; + hr = output6->GetDesc1(&desc); + if (SUCCEEDED(hr) ) + { + BX_TRACE("Display specs:") + BX_TRACE("\t BitsPerColor: %d", desc.BitsPerColor); + BX_TRACE("\t Color space: %s (colorspace, range, gamma, sitting, primaries, transform)" + , s_colorSpace[bx::min(desc.ColorSpace, kDxgiLastColorSpace+1)] + ); + BX_TRACE("\t RedPrimary: %f, %f", desc.RedPrimary[0], desc.RedPrimary[1]); + BX_TRACE("\t GreenPrimary: %f, %f", desc.GreenPrimary[0], desc.GreenPrimary[1]); + BX_TRACE("\t BluePrimary: %f, %f", desc.BluePrimary[0], desc.BluePrimary[1]); + BX_TRACE("\t WhitePoint: %f, %f", desc.WhitePoint[0], desc.WhitePoint[1]); + BX_TRACE("\t MinLuminance: %f", desc.MinLuminance); + BX_TRACE("\t MaxLuminance: %f", desc.MaxLuminance); + BX_TRACE("\tMaxFullFrameLuminance: %f", desc.MaxFullFrameLuminance); + } + + DX_RELEASE(output6, 1); + } +#endif // BX_PLATFORM_WINDOWS + + DX_RELEASE(output, 0); + } + } + m_presentElapsed = 0; { - m_resolution.m_width = BGFX_DEFAULT_WIDTH; - m_resolution.m_height = BGFX_DEFAULT_HEIGHT; + m_resolution.m_width = _init.resolution.m_width; + m_resolution.m_height = _init.resolution.m_height; m_numWindows = 1; #if BX_PLATFORM_WINDOWS DX_CHECK(m_factory->MakeWindowAssociation( (HWND)g_platformData.nwh - , 0 - | DXGI_MWA_NO_WINDOW_CHANGES - | DXGI_MWA_NO_ALT_ENTER - ) ); + , 0 + | DXGI_MWA_NO_WINDOW_CHANGES + | DXGI_MWA_NO_ALT_ENTER + ) ); if (BX_ENABLED(BGFX_CONFIG_DEBUG) ) { @@ -954,29 +1182,29 @@ namespace bgfx { namespace d3d12 D3D12_DESCRIPTOR_HEAP_DESC rtvDescHeap; rtvDescHeap.NumDescriptors = 0 - + BX_COUNTOF(m_backBufferColor) - + BGFX_CONFIG_MAX_FRAME_BUFFERS*BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS - ; + + BX_COUNTOF(m_backBufferColor) + + BGFX_CONFIG_MAX_FRAME_BUFFERS*BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS + ; rtvDescHeap.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV; rtvDescHeap.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE; rtvDescHeap.NodeMask = 1; DX_CHECK(m_device->CreateDescriptorHeap(&rtvDescHeap - , IID_ID3D12DescriptorHeap - , (void**)&m_rtvDescriptorHeap - ) ); + , IID_ID3D12DescriptorHeap + , (void**)&m_rtvDescriptorHeap + ) ); D3D12_DESCRIPTOR_HEAP_DESC dsvDescHeap; dsvDescHeap.NumDescriptors = 0 - + 1 // reserved for depth backbuffer. - + BGFX_CONFIG_MAX_FRAME_BUFFERS - ; + + 1 // reserved for depth backbuffer. + + BGFX_CONFIG_MAX_FRAME_BUFFERS + ; dsvDescHeap.Type = D3D12_DESCRIPTOR_HEAP_TYPE_DSV; dsvDescHeap.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE; dsvDescHeap.NodeMask = 1; DX_CHECK(m_device->CreateDescriptorHeap(&dsvDescHeap - , IID_ID3D12DescriptorHeap - , (void**)&m_dsvDescriptorHeap - ) ); + , IID_ID3D12DescriptorHeap + , (void**)&m_dsvDescriptorHeap + ) ); for (uint32_t ii = 0; ii < BX_COUNTOF(m_scratchBuffer); ++ii) { @@ -1018,38 +1246,40 @@ namespace bgfx { namespace d3d12 ID3DBlob* outBlob; ID3DBlob* errorBlob; DX_CHECK(D3D12SerializeRootSignature(&descRootSignature - , D3D_ROOT_SIGNATURE_VERSION_1 - , &outBlob - , &errorBlob - ) ); + , D3D_ROOT_SIGNATURE_VERSION_1 + , &outBlob + , &errorBlob + ) ); DX_CHECK(m_device->CreateRootSignature(0 - , outBlob->GetBufferPointer() - , outBlob->GetBufferSize() - , IID_ID3D12RootSignature - , (void**)&m_rootSignature - ) ); + , outBlob->GetBufferPointer() + , outBlob->GetBufferSize() + , IID_ID3D12RootSignature + , (void**)&m_rootSignature + ) ); g_caps.supported |= ( 0 - | BGFX_CAPS_TEXTURE_3D - | BGFX_CAPS_TEXTURE_COMPARE_ALL - | BGFX_CAPS_INSTANCING - | BGFX_CAPS_VERTEX_ATTRIB_HALF - | BGFX_CAPS_VERTEX_ATTRIB_UINT10 - | BGFX_CAPS_FRAGMENT_DEPTH - | BGFX_CAPS_BLEND_INDEPENDENT - | BGFX_CAPS_COMPUTE - | (m_options.ROVsSupported ? BGFX_CAPS_FRAGMENT_ORDERING : 0) -// | BGFX_CAPS_SWAP_CHAIN - | BGFX_CAPS_TEXTURE_BLIT - | BGFX_CAPS_TEXTURE_READ_BACK - | BGFX_CAPS_OCCLUSION_QUERY - | BGFX_CAPS_ALPHA_TO_COVERAGE - | BGFX_CAPS_TEXTURE_2D_ARRAY - | BGFX_CAPS_TEXTURE_CUBE_ARRAY - ); + | BGFX_CAPS_TEXTURE_3D + | BGFX_CAPS_TEXTURE_COMPARE_ALL + | BGFX_CAPS_INSTANCING + | BGFX_CAPS_VERTEX_ATTRIB_HALF + | BGFX_CAPS_VERTEX_ATTRIB_UINT10 + | BGFX_CAPS_FRAGMENT_DEPTH + | BGFX_CAPS_BLEND_INDEPENDENT + | BGFX_CAPS_COMPUTE + | (m_options.ROVsSupported ? BGFX_CAPS_FRAGMENT_ORDERING : 0) +// | (m_architecture.UMA ? BGFX_CAPS_TEXTURE_DIRECT_ACCESS : 0) + | (BX_ENABLED(BX_PLATFORM_WINDOWS) ? BGFX_CAPS_SWAP_CHAIN : 0) + | BGFX_CAPS_TEXTURE_BLIT + | BGFX_CAPS_TEXTURE_READ_BACK + | BGFX_CAPS_OCCLUSION_QUERY + | BGFX_CAPS_ALPHA_TO_COVERAGE + | BGFX_CAPS_TEXTURE_2D_ARRAY + | BGFX_CAPS_TEXTURE_CUBE_ARRAY + ); g_caps.limits.maxTextureSize = 16384; g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(16, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) ); + g_caps.limits.maxVertexStreams = BGFX_CONFIG_MAX_VERTEX_STREAMS; for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { @@ -1195,9 +1425,17 @@ namespace bgfx { namespace d3d12 g_caps.formats[ii] = support; } + // Init reserved part of view name. + for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) + { + bx::snprintf(s_viewName[ii], BGFX_CONFIG_MAX_VIEW_NAME_RESERVED + 1, "%3d ", ii); + } + postReset(); m_batch.create(4<<10); + m_batch.setIndirectMode(BGFX_PCI_ID_NVIDIA != m_adapterDesc.VendorId); + m_gpuTimer.init(); m_occlusionQuery.init(); } @@ -1210,21 +1448,33 @@ namespace bgfx { namespace d3d12 { case ErrorState::CreatedCommandQueue: m_cmd.shutdown(); + BX_FALLTHROUGH; + case ErrorState::CreatedDXGIFactory: DX_RELEASE(m_device, 0); DX_RELEASE(m_adapter, 0); DX_RELEASE(m_factory, 0); + BX_FALLTHROUGH; + #if USE_D3D12_DYNAMIC_LIB case ErrorState::LoadedDXGI: bx::dlclose(m_dxgidll); + BX_FALLTHROUGH; + case ErrorState::LoadedD3D12: bx::dlclose(m_d3d12dll); + BX_FALLTHROUGH; + case ErrorState::LoadedKernel32: bx::dlclose(m_kernel32dll); + BX_FALLTHROUGH; + #endif // USE_D3D12_DYNAMIC_LIB case ErrorState::Default: default: unloadRenderDoc(m_renderdocdll); + bx::dlclose(m_winPixEvent); + m_winPixEvent = NULL; break; } @@ -1233,6 +1483,7 @@ namespace bgfx { namespace d3d12 void shutdown() { + m_cmd.finish(); m_batch.destroy(); preReset(); @@ -1284,6 +1535,9 @@ namespace bgfx { namespace d3d12 unloadRenderDoc(m_renderdocdll); + bx::dlclose(m_winPixEvent); + m_winPixEvent = NULL; + #if USE_D3D12_DYNAMIC_LIB bx::dlclose(m_dxgidll); bx::dlclose(m_d3d12dll); @@ -1291,39 +1545,41 @@ namespace bgfx { namespace d3d12 #endif // USE_D3D12_DYNAMIC_LIB } - RendererType::Enum getRendererType() const BX_OVERRIDE + RendererType::Enum getRendererType() const override { return RendererType::Direct3D12; } - const char* getRendererName() const BX_OVERRIDE + const char* getRendererName() const override { return BGFX_RENDERER_DIRECT3D12_NAME; } - bool isDeviceRemoved() BX_OVERRIDE + bool isDeviceRemoved() override { return m_lost; } - void flip(HMD& /*_hmd*/) BX_OVERRIDE + void flip(HMD& /*_hmd*/) override { if (NULL != m_swapChain && !m_lost) { int64_t start = bx::getHPCounter(); - HRESULT hr = 0; + m_cmd.finish(m_backBufferColorFence[(m_backBufferColorIdx-1) % m_scd.BufferCount]); + + HRESULT hr = S_OK; uint32_t syncInterval = !!(m_resolution.m_flags & BGFX_RESET_VSYNC); uint32_t flags = 0 == syncInterval ? DXGI_PRESENT_RESTART : 0; for (uint32_t ii = 1, num = m_numWindows; ii < num && SUCCEEDED(hr); ++ii) { - hr = m_frameBuffers[m_windows[ii].idx].m_swapChain->Present(syncInterval, flags); + FrameBufferD3D12& frameBuffer = m_frameBuffers[m_windows[ii].idx]; + hr = frameBuffer.present(syncInterval, flags); } if (SUCCEEDED(hr) ) { - m_cmd.finish(m_backBufferColorFence[(m_backBufferColorIdx-1) % m_scd.BufferCount]); hr = m_swapChain->Present(syncInterval, flags); } @@ -1341,111 +1597,111 @@ namespace bgfx { namespace d3d12 } } - void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) BX_OVERRIDE + void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_mem->size, _mem->data, _flags, false); } - void destroyIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) BX_OVERRIDE + void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) override { VertexDecl& decl = m_vertexDecls[_handle.idx]; bx::memCopy(&decl, &_decl, sizeof(VertexDecl) ); dump(decl); } - void destroyVertexDecl(VertexDeclHandle /*_handle*/) BX_OVERRIDE + void destroyVertexDecl(VertexDeclHandle /*_handle*/) override { } - void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t _flags) BX_OVERRIDE + void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t _flags) override { m_vertexBuffers[_handle.idx].create(_mem->size, _mem->data, _declHandle, _flags); } - void destroyVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_size, NULL, _flags, false); } - void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { m_indexBuffers[_handle.idx].update(m_commandList, _offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { VertexDeclHandle decl = BGFX_INVALID_HANDLE; m_vertexBuffers[_handle.idx].create(_size, NULL, decl, _flags); } - void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { m_vertexBuffers[_handle.idx].update(m_commandList, _offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createShader(ShaderHandle _handle, Memory* _mem) BX_OVERRIDE + void createShader(ShaderHandle _handle, Memory* _mem) override { m_shaders[_handle.idx].create(_mem); } - void destroyShader(ShaderHandle _handle) BX_OVERRIDE + void destroyShader(ShaderHandle _handle) override { m_shaders[_handle.idx].destroy(); } - void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) BX_OVERRIDE + void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) override { m_program[_handle.idx].create(&m_shaders[_vsh.idx], isValid(_fsh) ? &m_shaders[_fsh.idx] : NULL); } - void destroyProgram(ProgramHandle _handle) BX_OVERRIDE + void destroyProgram(ProgramHandle _handle) override { m_program[_handle.idx].destroy(); } - void createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) BX_OVERRIDE + void* createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) override { - m_textures[_handle.idx].create(_mem, _flags, _skip); + return m_textures[_handle.idx].create(_mem, _flags, _skip); } - void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) BX_OVERRIDE + void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) override { } - void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) BX_OVERRIDE + void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) override { m_textures[_handle.idx].update(m_commandList, _side, _mip, _rect, _z, _depth, _pitch, _mem); } - void updateTextureEnd() BX_OVERRIDE + void updateTextureEnd() override { } - void readTexture(TextureHandle _handle, void* _data, uint8_t _mip ) BX_OVERRIDE + void readTexture(TextureHandle _handle, void* _data, uint8_t _mip ) override { const TextureD3D12& texture = m_textures[_handle.idx]; - D3D12_RESOURCE_DESC desc = texture.m_ptr->GetDesc(); + D3D12_RESOURCE_DESC desc = getResourceDesc(texture.m_ptr); D3D12_PLACED_SUBRESOURCE_FOOTPRINT layout; uint32_t numRows; @@ -1481,7 +1737,6 @@ namespace bgfx { namespace d3d12 uint32_t srcWidth = bx::uint32_max(1, texture.m_width >>_mip); uint32_t srcHeight = bx::uint32_max(1, texture.m_height>>_mip); uint8_t* src; - readback->Map(0, NULL, (void**)&src); const uint8_t bpp = bimg::getBitsPerPixel(bimg::TextureFormat::Enum(texture.m_textureFormat) ); uint8_t* dst = (uint8_t*)_data; @@ -1489,6 +1744,9 @@ namespace bgfx { namespace d3d12 uint32_t pitch = bx::uint32_min(uint32_t(srcPitch), dstPitch); + D3D12_RANGE readRange = { 0, dstPitch*srcHeight }; + readback->Map(0, &readRange, (void**)&src); + for (uint32_t yy = 0, height = srcHeight; yy < height; ++yy) { bx::memCopy(dst, src, pitch); @@ -1497,12 +1755,13 @@ namespace bgfx { namespace d3d12 dst += dstPitch; } - readback->Unmap(0, NULL); + D3D12_RANGE writeRange = { 0, 0 }; + readback->Unmap(0, &writeRange); DX_RELEASE(readback, 0); } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) override { TextureD3D12& texture = m_textures[_handle.idx]; @@ -1530,35 +1789,35 @@ namespace bgfx { namespace d3d12 release(mem); } - void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE + void overrideInternal(TextureHandle _handle, uintptr_t _ptr) override { BX_UNUSED(_handle, _ptr); } - uintptr_t getInternal(TextureHandle _handle) BX_OVERRIDE + uintptr_t getInternal(TextureHandle _handle) override { BX_UNUSED(_handle); return 0; } - void destroyTexture(TextureHandle _handle) BX_OVERRIDE + void destroyTexture(TextureHandle _handle) override { m_textures[_handle.idx].destroy(); } - void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) override { m_frameBuffers[_handle.idx].create(_num, _attachment); } - void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) override { uint16_t denseIdx = m_numWindows++; m_windows[denseIdx] = _handle; m_frameBuffers[_handle.idx].create(denseIdx, _nwh, _width, _height, _depthFormat); } - void destroyFrameBuffer(FrameBufferHandle _handle) BX_OVERRIDE + void destroyFrameBuffer(FrameBufferHandle _handle) override { uint16_t denseIdx = m_frameBuffers[_handle.idx].destroy(); if (UINT16_MAX != denseIdx) @@ -1573,7 +1832,7 @@ namespace bgfx { namespace d3d12 } } - void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) BX_OVERRIDE + void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) override { if (NULL != m_uniforms[_handle.idx]) { @@ -1587,14 +1846,14 @@ namespace bgfx { namespace d3d12 m_uniformReg.add(_handle, _name, data); } - void destroyUniform(UniformHandle _handle) BX_OVERRIDE + void destroyUniform(UniformHandle _handle) override { BX_FREE(g_allocator, m_uniforms[_handle.idx]); m_uniforms[_handle.idx] = NULL; m_uniformReg.remove(_handle); } - void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) BX_OVERRIDE + void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) override { BX_UNUSED(_handle); @@ -1602,7 +1861,7 @@ namespace bgfx { namespace d3d12 m_cmd.finish(m_backBufferColorFence[idx]); ID3D12Resource* backBuffer = m_backBufferColor[idx]; - D3D12_RESOURCE_DESC desc = backBuffer->GetDesc(); + D3D12_RESOURCE_DESC desc = getResourceDesc(backBuffer); const uint32_t width = (uint32_t)desc.Width; const uint32_t height = (uint32_t)desc.Height; @@ -1643,15 +1902,16 @@ namespace bgfx { namespace d3d12 readback->Map(0, NULL, (void**)&data); bimg::imageSwizzleBgra8( data + , layout.Footprint.RowPitch , width , height - , (uint32_t)pitch , data + , layout.Footprint.RowPitch ); g_callback->screenShot(_filePath , width , height - , (uint32_t)pitch + , layout.Footprint.RowPitch , data , (uint32_t)total , false @@ -1661,33 +1921,60 @@ namespace bgfx { namespace d3d12 DX_RELEASE(readback, 0); } - void updateViewName(uint8_t /*_id*/, const char* /*_name*/) BX_OVERRIDE + void updateViewName(ViewId _id, const char* _name) override { + bx::strCopy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] + , BX_COUNTOF(s_viewName[0]) - BGFX_CONFIG_MAX_VIEW_NAME_RESERVED + , _name + ); } - void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) BX_OVERRIDE + void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) override { bx::memCopy(m_uniforms[_loc], _data, _size); } - void setMarker(const char* /*_marker*/, uint32_t /*_size*/) BX_OVERRIDE + void setMarker(const char* _marker, uint32_t /*_size*/) override { + if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX)) + { + PIX3_SETMARKER(m_commandList, D3DCOLOR_MARKER, _marker); + } } - void invalidateOcclusionQuery(OcclusionQueryHandle _handle) BX_OVERRIDE + void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override { m_occlusionQuery.invalidate(_handle); } - void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) BX_OVERRIDE; + virtual void setName(Handle _handle, const char* _name) override + { + switch (_handle.type) + { + case Handle::Shader: +// setDebugObjectName(m_shaders[_handle.idx].m_ptr, _name); + break; - void blitSetup(TextVideoMemBlitter& _blitter) BX_OVERRIDE + case Handle::Texture: + setDebugObjectName(m_textures[_handle.idx].m_ptr, _name); + break; + + default: + BX_CHECK(false, "Invalid handle type?! %d", _handle.type); + break; + } + } + + void submitBlit(BlitState& _bs, uint16_t _view); + + void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) override; + + void blitSetup(TextVideoMemBlitter& _blitter) override { const uint32_t width = getBufferWidth(); const uint32_t height = getBufferHeight(); - FrameBufferHandle fbh = BGFX_INVALID_HANDLE; - setFrameBuffer(fbh, false); + setFrameBuffer(BGFX_INVALID_HANDLE, false); D3D12_VIEWPORT vp; vp.TopLeftX = 0; @@ -1711,9 +1998,11 @@ namespace bgfx { namespace d3d12 | BGFX_STATE_DEPTH_TEST_ALWAYS ; + const VertexDecl* decls[1] = { &m_vertexDecls[_blitter.m_vb->decl.idx] }; ID3D12PipelineState* pso = getPipelineState(state , packStencil(BGFX_STENCIL_DEFAULT, BGFX_STENCIL_DEFAULT) - , _blitter.m_vb->decl.idx + , 1 + , decls , _blitter.m_program.idx , 0 ); @@ -1721,7 +2010,7 @@ namespace bgfx { namespace d3d12 m_commandList->SetGraphicsRootSignature(m_rootSignature); float proj[16]; - bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f); + bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f, 0.0f, false); PredefinedUniform& predefined = m_program[_blitter.m_program.idx].m_predefined[0]; uint8_t flags = predefined.m_type; @@ -1765,7 +2054,7 @@ namespace bgfx { namespace d3d12 m_commandList->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); } - void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) BX_OVERRIDE + void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) override { const uint32_t numVertices = _numIndices*4/6; if (0 < numVertices) @@ -1788,7 +2077,11 @@ namespace bgfx { namespace d3d12 for (uint32_t ii = 0, num = m_scd.BufferCount; ii < num; ++ii) { +#if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT DX_RELEASE(m_backBufferColor[ii], num-1-ii); +#else + DX_RELEASE(m_backBufferColor[ii], 1); +#endif // BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT } DX_RELEASE(m_backBufferDepthStencil, 0); @@ -1810,12 +2103,12 @@ namespace bgfx { namespace d3d12 for (uint32_t ii = 0, num = m_scd.BufferCount; ii < num; ++ii) { - D3D12_CPU_DESCRIPTOR_HANDLE handle = m_rtvDescriptorHeap->GetCPUDescriptorHandleForHeapStart(); + D3D12_CPU_DESCRIPTOR_HANDLE handle = getCPUHandleHeapStart(m_rtvDescriptorHeap); handle.ptr += ii * rtvDescriptorSize; DX_CHECK(m_swapChain->GetBuffer(ii - , IID_ID3D12Resource - , (void**)&m_backBufferColor[ii] - ) ); + , IID_ID3D12Resource + , (void**)&m_backBufferColor[ii] + ) ); m_device->CreateRenderTargetView(m_backBufferColor[ii], NULL, handle); } @@ -1840,7 +2133,7 @@ namespace bgfx { namespace d3d12 m_backBufferDepthStencil = createCommittedResource(m_device, HeapProperty::Default, &resourceDesc, &clearValue); D3D12_DEPTH_STENCIL_VIEW_DESC dsvDesc; - ZeroMemory(&dsvDesc, sizeof(dsvDesc) ); + bx::memSet(&dsvDesc, 0, sizeof(dsvDesc) ); dsvDesc.Format = resourceDesc.Format; dsvDesc.ViewDimension = D3D12_DSV_DIMENSION_TEXTURE2D; dsvDesc.Flags = D3D12_DSV_FLAGS(0) @@ -1850,7 +2143,7 @@ namespace bgfx { namespace d3d12 m_device->CreateDepthStencilView(m_backBufferDepthStencil , &dsvDesc - , m_dsvDescriptorHeap->GetCPUDescriptorHandleForHeapStart() + , getCPUHandleHeapStart(m_dsvDescriptorHeap) ); for (uint32_t ii = 0; ii < BX_COUNTOF(m_frameBuffers); ++ii) @@ -1931,7 +2224,10 @@ data.NumQualityLevels = 0; { uint32_t flags = _resolution.m_flags & (~BGFX_RESET_INTERNAL_FORCE); - bool resize = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK) == (_resolution.m_flags&BGFX_RESET_MSAA_MASK); + bool resize = true + && BX_ENABLED(BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT) + && (m_resolution.m_flags&BGFX_RESET_MSAA_MASK) == (_resolution.m_flags&BGFX_RESET_MSAA_MASK) + ; m_resolution = _resolution; m_resolution.m_flags = flags; @@ -1944,39 +2240,61 @@ data.NumQualityLevels = 0; preReset(); BX_UNUSED(resize); -#if BX_PLATFORM_WINDOWS if (resize) { +#if BX_PLATFORM_WINDOWS uint32_t nodeMask[] = { 1, 1, 1, 1 }; BX_STATIC_ASSERT(BX_COUNTOF(m_backBufferColor) == BX_COUNTOF(nodeMask) ); IUnknown* presentQueue[] ={ m_cmd.m_commandQueue, m_cmd.m_commandQueue, m_cmd.m_commandQueue, m_cmd.m_commandQueue }; BX_STATIC_ASSERT(BX_COUNTOF(m_backBufferColor) == BX_COUNTOF(presentQueue) ); - DX_CHECK(m_swapChain->ResizeBuffers1(m_scd.BufferCount - , m_scd.BufferDesc.Width - , m_scd.BufferDesc.Height - , m_scd.BufferDesc.Format - , m_scd.Flags - , nodeMask - , presentQueue - ) ); + DX_CHECK(m_swapChain->ResizeBuffers1( + m_scd.BufferCount + , m_scd.BufferDesc.Width + , m_scd.BufferDesc.Height + , m_scd.BufferDesc.Format + , m_scd.Flags + , nodeMask + , presentQueue + ) ); +#elif BX_PLATFORM_WINRT + DX_CHECK(m_swapChain->ResizeBuffers( + m_scd.BufferCount + , m_scd.Width + , m_scd.Height + , m_scd.Format + , m_scd.Flags + ) ); + m_backBufferColorIdx = m_scd.BufferCount-1; +#endif // BX_PLATFORM_WINDOWS } else -#endif // BX_PLATFORM_WINDOWS { updateMsaa(); m_scd.SampleDesc = s_msaa[(m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT]; DX_RELEASE(m_swapChain, 0); -#if BX_PLATFORM_WINDOWS HRESULT hr; +#if BX_PLATFORM_WINDOWS hr = m_factory->CreateSwapChain(m_cmd.m_commandQueue , &m_scd , reinterpret_cast(&m_swapChain) ); - BGFX_FATAL(SUCCEEDED(hr), bgfx::Fatal::UnableToInitialize, "Failed to create swap chain."); +#else + hr = m_factory->CreateSwapChainForCoreWindow( +# if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT + m_cmd.m_commandQueue +# else + m_device +# endif // BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT + , (::IUnknown*)g_platformData.nwh + , &m_scd + , NULL + , &m_swapChain + ); #endif // BX_PLATFORM_WINDOWS + BGFX_FATAL(SUCCEEDED(hr), bgfx::Fatal::UnableToInitialize, "Failed to create swap chain."); } postReset(); @@ -2035,6 +2353,41 @@ data.NumQualityLevels = 0; } } + D3D12_CPU_DESCRIPTOR_HANDLE getRtv(FrameBufferHandle _fbh) + { + FrameBufferD3D12& frameBuffer = m_frameBuffers[_fbh.idx]; + + if (NULL != frameBuffer.m_swapChain) + { +#if BX_PLATFORM_WINDOWS + uint8_t idx = uint8_t(frameBuffer.m_swapChain->GetCurrentBackBufferIndex() ); + frameBuffer.setState(m_commandList, idx, D3D12_RESOURCE_STATE_RENDER_TARGET); + return getRtv(_fbh, idx); +#endif // BX_PLATFORM_WINDOWS + } + + return getRtv(_fbh, 0); + } + + D3D12_CPU_DESCRIPTOR_HANDLE getRtv(FrameBufferHandle _fbh, uint8_t _attachment) + { + D3D12_CPU_DESCRIPTOR_HANDLE rtvDescriptor = getCPUHandleHeapStart(m_rtvDescriptorHeap); + uint32_t rtvDescriptorSize = m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); + D3D12_CPU_DESCRIPTOR_HANDLE result = + { + rtvDescriptor.ptr + (BX_COUNTOF(m_backBufferColor) + _fbh.idx * BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS + _attachment) * rtvDescriptorSize + }; + return result; + } + + D3D12_CPU_DESCRIPTOR_HANDLE getDsv(FrameBufferHandle _fbh) const + { + D3D12_CPU_DESCRIPTOR_HANDLE dsvDescriptor = getCPUHandleHeapStart(m_dsvDescriptorHeap); + uint32_t dsvDescriptorSize = m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_DSV); + D3D12_CPU_DESCRIPTOR_HANDLE result = { dsvDescriptor.ptr + (1 + _fbh.idx) * dsvDescriptorSize }; + return result; + } + void setFrameBuffer(FrameBufferHandle _fbh, bool _msaa = true) { if (isValid(m_fbh) @@ -2042,29 +2395,32 @@ data.NumQualityLevels = 0; { const FrameBufferD3D12& frameBuffer = m_frameBuffers[m_fbh.idx]; - for (uint8_t ii = 0, num = frameBuffer.m_num; ii < num; ++ii) + if (NULL == frameBuffer.m_swapChain) { - TextureD3D12& texture = m_textures[frameBuffer.m_texture[ii].idx]; - texture.setState(m_commandList, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); - } - - if (isValid(frameBuffer.m_depth) ) - { - TextureD3D12& texture = m_textures[frameBuffer.m_depth.idx]; - const bool writeOnly = 0 != (texture.m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); - if (!writeOnly) + for (uint8_t ii = 0, num = frameBuffer.m_num; ii < num; ++ii) { - texture.setState(m_commandList, D3D12_RESOURCE_STATE_DEPTH_READ); + TextureD3D12& texture = m_textures[frameBuffer.m_texture[ii].idx]; + texture.setState(m_commandList, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); + } + + if (isValid(frameBuffer.m_depth) ) + { + TextureD3D12& texture = m_textures[frameBuffer.m_depth.idx]; + const bool writeOnly = 0 != (texture.m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); + if (!writeOnly) + { + texture.setState(m_commandList, D3D12_RESOURCE_STATE_DEPTH_READ); + } } } } if (!isValid(_fbh) ) { - m_rtvHandle = m_rtvDescriptorHeap->GetCPUDescriptorHandleForHeapStart(); + m_rtvHandle = getCPUHandleHeapStart(m_rtvDescriptorHeap); uint32_t rtvDescriptorSize = m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); m_rtvHandle.ptr += m_backBufferColorIdx * rtvDescriptorSize; - m_dsvHandle = m_dsvDescriptorHeap->GetCPUDescriptorHandleForHeapStart(); + m_dsvHandle = getCPUHandleHeapStart(m_dsvDescriptorHeap); m_currentColor = &m_rtvHandle; m_currentDepthStencil = &m_dsvHandle; @@ -2072,14 +2428,12 @@ data.NumQualityLevels = 0; } else { - const FrameBufferD3D12& frameBuffer = m_frameBuffers[_fbh.idx]; + FrameBufferD3D12& frameBuffer = m_frameBuffers[_fbh.idx]; if (0 < frameBuffer.m_num) { - D3D12_CPU_DESCRIPTOR_HANDLE rtvDescriptor = m_rtvDescriptorHeap->GetCPUDescriptorHandleForHeapStart(); - uint32_t rtvDescriptorSize = m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); - m_rtvHandle.ptr = rtvDescriptor.ptr + (BX_COUNTOF(m_backBufferColor) + _fbh.idx * BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) * rtvDescriptorSize; - m_currentColor = &m_rtvHandle; + m_rtvHandle = getRtv(_fbh); + m_currentColor = &m_rtvHandle; } else { @@ -2088,9 +2442,7 @@ data.NumQualityLevels = 0; if (isValid(frameBuffer.m_depth) ) { - D3D12_CPU_DESCRIPTOR_HANDLE dsvDescriptor = m_dsvDescriptorHeap->GetCPUDescriptorHandleForHeapStart(); - uint32_t dsvDescriptorSize = m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_DSV); - m_dsvHandle.ptr = dsvDescriptor.ptr + (1 + _fbh.idx) * dsvDescriptorSize; + m_dsvHandle = getDsv(_fbh); m_currentDepthStencil = &m_dsvHandle; } else @@ -2098,23 +2450,31 @@ data.NumQualityLevels = 0; m_currentDepthStencil = NULL; } - for (uint8_t ii = 0, num = frameBuffer.m_num; ii < num; ++ii) + if (NULL != frameBuffer.m_swapChain) { - TextureD3D12& texture = m_textures[frameBuffer.m_texture[ii].idx]; - texture.setState(m_commandList, D3D12_RESOURCE_STATE_RENDER_TARGET); + frameBuffer.m_needPresent = true; + } + else + { + for (uint8_t ii = 0, num = frameBuffer.m_num; ii < num; ++ii) + { + TextureD3D12& texture = m_textures[frameBuffer.m_texture[ii].idx]; + texture.setState(m_commandList, D3D12_RESOURCE_STATE_RENDER_TARGET); + } + + if (isValid(frameBuffer.m_depth) ) + { + TextureD3D12& texture = m_textures[frameBuffer.m_depth.idx]; + texture.setState(m_commandList, D3D12_RESOURCE_STATE_DEPTH_WRITE); + } } - if (isValid(frameBuffer.m_depth) ) - { - TextureD3D12& texture = m_textures[frameBuffer.m_depth.idx]; - texture.setState(m_commandList, D3D12_RESOURCE_STATE_DEPTH_WRITE); - } - - m_commandList->OMSetRenderTargets(frameBuffer.m_num - , m_currentColor - , true - , m_currentDepthStencil - ); + m_commandList->OMSetRenderTargets( + frameBuffer.m_num + , m_currentColor + , true + , m_currentDepthStencil + ); } m_fbh = _fbh; @@ -2253,20 +2613,38 @@ data.NumQualityLevels = 0; _desc.BackFace.StencilFunc = s_cmpFunc[(bstencil&BGFX_STENCIL_TEST_MASK) >> BGFX_STENCIL_TEST_SHIFT]; } - uint32_t setInputLayout(D3D12_INPUT_ELEMENT_DESC* _vertexElements, const VertexDecl& _vertexDecl, const ProgramD3D12& _program, uint8_t _numInstanceData) + uint32_t setInputLayout(D3D12_INPUT_ELEMENT_DESC* _vertexElements, uint8_t _numStreams, const VertexDecl** _vertexDecls, const ProgramD3D12& _program, uint16_t _numInstanceData) { - VertexDecl decl; - bx::memCopy(&decl, &_vertexDecl, sizeof(VertexDecl) ); - const uint16_t* attrMask = _program.m_vsh->m_attrMask; + uint16_t attrMask[Attrib::Count]; + bx::memCopy(attrMask, _program.m_vsh->m_attrMask, sizeof(attrMask)); - for (uint32_t ii = 0; ii < Attrib::Count; ++ii) + D3D12_INPUT_ELEMENT_DESC* elem = _vertexElements; + + for (uint8_t stream = 0; stream < _numStreams; ++stream) { - uint16_t mask = attrMask[ii]; - uint16_t attr = (decl.m_attributes[ii] & mask); - decl.m_attributes[ii] = attr == 0 ? UINT16_MAX : attr == UINT16_MAX ? 0 : attr; + VertexDecl decl; + bx::memCopy(&decl, _vertexDecls[stream], sizeof(VertexDecl)); + + const bool last = stream == _numStreams-1; + + for (uint32_t ii = 0; ii < Attrib::Count; ++ii) + { + uint16_t mask = attrMask[ii]; + uint16_t attr = (decl.m_attributes[ii] & mask); + if (0 == attr + || UINT16_MAX == attr) + { + decl.m_attributes[ii] = last ? ~attr : UINT16_MAX; + } + else + { + attrMask[ii] = 0; + } + } + + elem = fillVertexDecl(stream, elem, decl); } - D3D12_INPUT_ELEMENT_DESC* elem = fillVertexDecl(_vertexElements, decl); uint32_t num = uint32_t(elem-_vertexElements); const D3D12_INPUT_ELEMENT_DESC inst = { "TEXCOORD", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D12_APPEND_ALIGNED_ELEMENT, D3D12_INPUT_CLASSIFICATION_PER_INSTANCE_DATA, 1 }; @@ -2280,7 +2658,7 @@ data.NumQualityLevels = 0; for (jj = 0; jj < num; ++jj) { curr = &_vertexElements[jj]; - if (0 == bx::strncmp(curr->SemanticName, "TEXCOORD") + if (0 == bx::strCmp(curr->SemanticName, "TEXCOORD") && curr->SemanticIndex == index) { break; @@ -2302,6 +2680,12 @@ data.NumQualityLevels = 0; return uint32_t(elem-_vertexElements); } + uint32_t setInputLayout(D3D12_INPUT_ELEMENT_DESC* _vertexElements, const VertexDecl& _vertexDecl, const ProgramD3D12& _program, uint16_t _numInstanceData) + { + const VertexDecl* decls[1] = { &_vertexDecl }; + return setInputLayout(_vertexElements, BX_COUNTOF(decls), decls, _program, _numInstanceData); + } + static void patchCb0(DxbcInstruction& _instruction, void* _userData) { union { void* ptr; uint32_t offset; } cast = { _userData }; @@ -2317,6 +2701,10 @@ data.NumQualityLevels = 0; { operand.regIndex[1] += cast.offset; } + else if (DxbcOperandAddrMode::RegImm32 == operand.addrMode[1]) + { + operand.regIndex[1] += cast.offset; + } } } } @@ -2351,7 +2739,7 @@ data.NumQualityLevels = 0; return pso; } - ID3D12PipelineState* getPipelineState(uint64_t _state, uint64_t _stencil, uint16_t _declIdx, uint16_t _programIdx, uint8_t _numInstanceData) + ID3D12PipelineState* getPipelineState(uint64_t _state, uint64_t _stencil, uint8_t _numStreams, const VertexDecl** _vertexDecls, uint16_t _programIdx, uint8_t _numInstanceData) { ProgramD3D12& program = m_program[_programIdx]; @@ -2374,7 +2762,7 @@ data.NumQualityLevels = 0; _stencil &= packStencil(~BGFX_STENCIL_FUNC_REF_MASK, BGFX_STENCIL_MASK); VertexDecl decl; - bx::memCopy(&decl, &m_vertexDecls[_declIdx], sizeof(VertexDecl) ); + bx::memCopy(&decl, _vertexDecls[0], sizeof(VertexDecl) ); const uint16_t* attrMask = program.m_vsh->m_attrMask; for (uint32_t ii = 0; ii < Attrib::Count; ++ii) @@ -2391,7 +2779,10 @@ data.NumQualityLevels = 0; murmur.add(program.m_vsh->m_hash); murmur.add(program.m_vsh->m_attrMask, sizeof(program.m_vsh->m_attrMask) ); murmur.add(program.m_fsh->m_hash); - murmur.add(m_vertexDecls[_declIdx].m_hash); + for (uint32_t ii = 0; ii < _numStreams; ++ii) + { + murmur.add(_vertexDecls[ii]->m_hash); + } murmur.add(decl.m_attributes, sizeof(decl.m_attributes) ); murmur.add(m_fbh.idx); murmur.add(_numInstanceData); @@ -2495,7 +2886,7 @@ data.NumQualityLevels = 0; setDepthStencilState(desc.DepthStencilState, _state, _stencil); D3D12_INPUT_ELEMENT_DESC vertexElements[Attrib::Count + 1 + BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT]; - desc.InputLayout.NumElements = setInputLayout(vertexElements, m_vertexDecls[_declIdx], program, _numInstanceData); + desc.InputLayout.NumElements = setInputLayout(vertexElements, _numStreams, _vertexDecls, program, _numInstanceData); desc.InputLayout.pInputElementDescs = vertexElements; uint8_t primIndex = uint8_t( (_state&BGFX_STATE_PT_MASK) >> BGFX_STATE_PT_SHIFT); @@ -2504,20 +2895,29 @@ data.NumQualityLevels = 0; if (isValid(m_fbh) ) { const FrameBufferD3D12& frameBuffer = m_frameBuffers[m_fbh.idx]; - desc.NumRenderTargets = frameBuffer.m_num; - - for (uint8_t ii = 0, num = frameBuffer.m_num; ii < num; ++ii) + if (NULL == frameBuffer.m_swapChain) { - desc.RTVFormats[ii] = m_textures[frameBuffer.m_texture[ii].idx].m_srvd.Format; - } + desc.NumRenderTargets = frameBuffer.m_num; - if (isValid(frameBuffer.m_depth) ) - { - desc.DSVFormat = s_textureFormat[m_textures[frameBuffer.m_depth.idx].m_textureFormat].m_fmtDsv; + for (uint8_t ii = 0, num = frameBuffer.m_num; ii < num; ++ii) + { + desc.RTVFormats[ii] = m_textures[frameBuffer.m_texture[ii].idx].m_srvd.Format; + } + + if (isValid(frameBuffer.m_depth) ) + { + desc.DSVFormat = s_textureFormat[m_textures[frameBuffer.m_depth.idx].m_textureFormat].m_fmtDsv; + } + else + { + desc.DSVFormat = DXGI_FORMAT_UNKNOWN; + } } else { - desc.DSVFormat = DXGI_FORMAT_UNKNOWN; + desc.NumRenderTargets = 1; + desc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM; + desc.DSVFormat = DXGI_FORMAT_UNKNOWN; } } else @@ -2561,10 +2961,13 @@ data.NumQualityLevels = 0; if (NULL == pso) { DX_CHECK(m_device->CreateGraphicsPipelineState(&desc - , IID_ID3D12PipelineState - , (void**)&pso - ) ); + , IID_ID3D12PipelineState + , (void**)&pso + ) ); } + + BGFX_FATAL(NULL != pso, Fatal::InvalidShader, "Failed to create PSO!"); + m_pipelineStateCache.add(hash, pso); release(temp); @@ -2848,6 +3251,7 @@ data.NumQualityLevels = 0; void* m_d3d12dll; void* m_dxgidll; void* m_renderdocdll; + void* m_winPixEvent; D3D_FEATURE_LEVEL m_featureLevel; @@ -2856,15 +3260,12 @@ data.NumQualityLevels = 0; D3D12_FEATURE_DATA_ARCHITECTURE m_architecture; D3D12_FEATURE_DATA_D3D12_OPTIONS m_options; + AdapterI* m_adapter; + FactoryI* m_factory; + SwapChainI* m_swapChain; + #if BX_PLATFORM_WINDOWS - IDXGIAdapter3* m_adapter; - IDXGIFactory4* m_factory; - IDXGISwapChain3* m_swapChain; ID3D12InfoQueue* m_infoQueue; -#else - IDXGIAdapter* m_adapter; - IDXGIFactory2* m_factory; - IDXGISwapChain1* m_swapChain; #endif // BX_PLATFORM_WINDOWS int64_t m_presentElapsed; @@ -2898,11 +3299,7 @@ data.NumQualityLevels = 0; bool m_wireframe; bool m_lost; -#if BX_PLATFORM_WINDOWS DXGI_SWAP_CHAIN_DESC m_scd; -#else - DXGI_SWAP_CHAIN_DESC1 m_scd; -#endif // BX_PLATFORM_WINDOWS uint32_t m_maxAnisotropy; bool m_depthClamp; @@ -2934,10 +3331,10 @@ data.NumQualityLevels = 0; static RendererContextD3D12* s_renderD3D12; - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { s_renderD3D12 = BX_NEW(g_allocator, RendererContextD3D12); - if (!s_renderD3D12->init() ) + if (!s_renderD3D12->init(_init) ) { BX_DELETE(g_allocator, s_renderD3D12); s_renderD3D12 = NULL; @@ -2957,7 +3354,6 @@ data.NumQualityLevels = 0; m_size = _size; ID3D12Device* device = s_renderD3D12->m_device; - m_incrementSize = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); D3D12_DESCRIPTOR_HEAP_DESC desc; @@ -2966,20 +3362,22 @@ data.NumQualityLevels = 0; desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE; desc.NodeMask = 1; DX_CHECK(device->CreateDescriptorHeap(&desc - , IID_ID3D12DescriptorHeap - , (void**)&m_heap - ) ); + , IID_ID3D12DescriptorHeap + , (void**)&m_heap + ) ); m_upload = createCommittedResource(device, HeapProperty::Upload, desc.NumDescriptors * 1024); m_gpuVA = m_upload->GetGPUVirtualAddress(); - m_upload->Map(0, NULL, (void**)&m_data); + D3D12_RANGE readRange = { 0, 0 }; + m_upload->Map(0, &readRange, (void**)&m_data); reset(m_gpuHandle); } void ScratchBufferD3D12::destroy() { - m_upload->Unmap(0, NULL); + D3D12_RANGE writeRange = { 0, 0 }; + m_upload->Unmap(0, &writeRange); DX_RELEASE(m_upload, 0); DX_RELEASE(m_heap, 0); @@ -2988,11 +3386,19 @@ data.NumQualityLevels = 0; void ScratchBufferD3D12::reset(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle) { m_pos = 0; - m_cpuHandle = m_heap->GetCPUDescriptorHandleForHeapStart(); - m_gpuHandle = m_heap->GetGPUDescriptorHandleForHeapStart(); + m_cpuHandle = getCPUHandleHeapStart(m_heap); + m_gpuHandle = getGPUHandleHeapStart(m_heap); _gpuHandle = m_gpuHandle; } + void ScratchBufferD3D12::allocEmpty(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle) + { + m_cpuHandle.ptr += m_incrementSize; + + _gpuHandle = m_gpuHandle; + m_gpuHandle.ptr += m_incrementSize; + } + void* ScratchBufferD3D12::allocCbv(D3D12_GPU_VIRTUAL_ADDRESS& _gpuAddress, uint32_t _size) { _gpuAddress = m_gpuVA + m_pos; @@ -3000,15 +3406,15 @@ data.NumQualityLevels = 0; m_pos += BX_ALIGN_256(_size); -// D3D12_CONSTANT_BUFFER_VIEW_DESC desc; -// desc.BufferLocation = _gpuAddress; -// desc.SizeInBytes = _size; -// ID3D12Device* device = s_renderD3D12->m_device; -// device->CreateConstantBufferView(&desc -// , m_cpuHandle -// ); -// m_cpuHandle.ptr += m_incrementSize; -// m_gpuHandle.ptr += m_incrementSize; +// D3D12_CONSTANT_BUFFER_VIEW_DESC desc; +// desc.BufferLocation = _gpuAddress; +// desc.SizeInBytes = _size; +// ID3D12Device* device = s_renderD3D12->m_device; +// device->CreateConstantBufferView(&desc +// , m_cpuHandle +// ); +// m_cpuHandle.ptr += m_incrementSize; +// m_gpuHandle.ptr += m_incrementSize; return data; } @@ -3141,12 +3547,12 @@ data.NumQualityLevels = 0; desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE; desc.NodeMask = 1; DX_CHECK(device->CreateDescriptorHeap(&desc - , IID_ID3D12DescriptorHeap - , (void**)&m_heap - ) ); + , IID_ID3D12DescriptorHeap + , (void**)&m_heap + ) ); - m_cpuHandle = m_heap->GetCPUDescriptorHandleForHeapStart(); - m_gpuHandle = m_heap->GetGPUDescriptorHandleForHeapStart(); + m_cpuHandle = getCPUHandleHeapStart(m_heap); + m_gpuHandle = getGPUHandleHeapStart(m_heap); } void DescriptorAllocatorD3D12::destroy() @@ -3193,7 +3599,7 @@ data.NumQualityLevels = 0; sd.AddressU = s_textureAddress[(flags&BGFX_TEXTURE_U_MASK)>>BGFX_TEXTURE_U_SHIFT]; sd.AddressV = s_textureAddress[(flags&BGFX_TEXTURE_V_MASK)>>BGFX_TEXTURE_V_SHIFT]; sd.AddressW = s_textureAddress[(flags&BGFX_TEXTURE_W_MASK)>>BGFX_TEXTURE_W_SHIFT]; - sd.MipLODBias = 0.0f; + sd.MipLODBias = float(BGFX_CONFIG_MIP_LOD_BIAS); sd.MaxAnisotropy = maxAnisotropy; sd.ComparisonFunc = 0 == cmpFunc ? D3D12_COMPARISON_FUNC_NEVER : s_cmpFunc[cmpFunc]; @@ -3255,32 +3661,32 @@ data.NumQualityLevels = 0; queueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE; queueDesc.NodeMask = 1; DX_CHECK(_device->CreateCommandQueue(&queueDesc - , IID_ID3D12CommandQueue - , (void**)&m_commandQueue - ) ); + , IID_ID3D12CommandQueue + , (void**)&m_commandQueue + ) ); m_completedFence = 0; m_currentFence = 0; DX_CHECK(_device->CreateFence(0 - , D3D12_FENCE_FLAG_NONE - , IID_ID3D12Fence - , (void**)&m_fence - ) ); + , D3D12_FENCE_FLAG_NONE + , IID_ID3D12Fence + , (void**)&m_fence + ) ); for (uint32_t ii = 0; ii < BX_COUNTOF(m_commandList); ++ii) { DX_CHECK(_device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT - , IID_ID3D12CommandAllocator - , (void**)&m_commandList[ii].m_commandAllocator - ) ); + , IID_ID3D12CommandAllocator + , (void**)&m_commandList[ii].m_commandAllocator + ) ); DX_CHECK(_device->CreateCommandList(0 - , D3D12_COMMAND_LIST_TYPE_DIRECT - , m_commandList[ii].m_commandAllocator - , NULL - , IID_ID3D12GraphicsCommandList - , (void**)&m_commandList[ii].m_commandList - ) ); + , D3D12_COMMAND_LIST_TYPE_DIRECT + , m_commandList[ii].m_commandAllocator + , NULL + , IID_ID3D12GraphicsCommandList + , (void**)&m_commandList[ii].m_commandList + ) ); DX_CHECK(m_commandList[ii].m_commandList->Close() ); } @@ -3375,6 +3781,8 @@ data.NumQualityLevels = 0; CloseHandle(commandList.m_event); commandList.m_event = NULL; m_completedFence = m_fence->GetCompletedValue(); + BX_WARN(UINT64_MAX != m_completedFence, "D3D12: Device lost."); + m_commandQueue->Wait(m_fence, m_completedFence); ResourceArray& ra = m_release[m_control.m_read]; @@ -3403,9 +3811,12 @@ data.NumQualityLevels = 0; D3D12_INDIRECT_ARGUMENT_DESC drawArgDesc[] = { - { D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW, { { Rdt::CBV } } }, { D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 0 } } }, { D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 1 } } }, + { D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 2 } } }, + { D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 3 } } }, + { D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 4 } } }, + { D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW, { { Rdt::CBV } } }, { D3D12_INDIRECT_ARGUMENT_TYPE_DRAW, { { 0 } } }, }; @@ -3418,17 +3829,20 @@ data.NumQualityLevels = 0; }; DX_CHECK(device->CreateCommandSignature(&drawCommandSignature - , rootSignature - , IID_ID3D12CommandSignature - , (void**)&m_commandSignature[Draw] - ) ); + , rootSignature + , IID_ID3D12CommandSignature + , (void**)&m_commandSignature[Draw] + ) ); D3D12_INDIRECT_ARGUMENT_DESC drawIndexedArgDesc[] = { - { D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW, { { Rdt::CBV } } }, { D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 0 } } }, { D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 1 } } }, + { D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 2 } } }, + { D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 3 } } }, + { D3D12_INDIRECT_ARGUMENT_TYPE_VERTEX_BUFFER_VIEW, { { 4 } } }, { D3D12_INDIRECT_ARGUMENT_TYPE_INDEX_BUFFER_VIEW, { { 0 } } }, + { D3D12_INDIRECT_ARGUMENT_TYPE_CONSTANT_BUFFER_VIEW, { { Rdt::CBV } } }, { D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED, { { 0 } } }, }; @@ -3441,21 +3855,22 @@ data.NumQualityLevels = 0; }; DX_CHECK(device->CreateCommandSignature(&drawIndexedCommandSignature - , rootSignature - , IID_ID3D12CommandSignature - , (void**)&m_commandSignature[DrawIndexed] - ) ); + , rootSignature + , IID_ID3D12CommandSignature + , (void**)&m_commandSignature[DrawIndexed] + ) ); m_cmds[Draw ] = BX_ALLOC(g_allocator, m_maxDrawPerBatch*sizeof(DrawIndirectCommand) ); m_cmds[DrawIndexed] = BX_ALLOC(g_allocator, m_maxDrawPerBatch*sizeof(DrawIndexedIndirectCommand) ); + uint32_t cmdSize = bx::max(sizeof(DrawIndirectCommand), sizeof(DrawIndexedIndirectCommand) ); for (uint32_t ii = 0; ii < BX_COUNTOF(m_indirect); ++ii) { - m_indirect[ii].create(m_maxDrawPerBatch*sizeof(DrawIndexedIndirectCommand) + m_indirect[ii].create(m_maxDrawPerBatch*cmdSize , NULL , BGFX_BUFFER_DRAW_INDIRECT , false - , sizeof(DrawIndexedIndirectCommand) + , cmdSize ); } } @@ -3488,40 +3903,64 @@ data.NumQualityLevels = 0; { Enum type = Enum(!!isValid(_draw.m_indexBuffer) ); - VertexBufferD3D12& vb = s_renderD3D12->m_vertexBuffers[_draw.m_stream[0].m_handle.idx]; - vb.setState(_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); - - uint16_t declIdx = !isValid(vb.m_decl) ? _draw.m_stream[0].m_decl.idx : vb.m_decl.idx; - const VertexDecl& vertexDecl = s_renderD3D12->m_vertexDecls[declIdx]; uint32_t numIndices = 0; if (Draw == type) { - const uint32_t numVertices = UINT32_MAX == _draw.m_numVertices - ? vb.m_size / vertexDecl.m_stride - : _draw.m_numVertices - ; - DrawIndirectCommand& cmd = getCmd(Draw); cmd.cbv = _cbv; - cmd.vbv[0].BufferLocation = vb.m_gpuVA; - cmd.vbv[0].StrideInBytes = vertexDecl.m_stride; - cmd.vbv[0].SizeInBytes = vb.m_size; + + uint32_t numVertices = _draw.m_numVertices; + uint8_t numStreams = 0; + for (uint32_t idx = 0, streamMask = _draw.m_streamMask, ntz = bx::uint32_cnttz(streamMask) + ; 0 != streamMask + ; streamMask >>= 1, idx += 1, ntz = bx::uint32_cnttz(streamMask), ++numStreams + ) + { + streamMask >>= ntz; + idx += ntz; + + const Stream& stream = _draw.m_stream[idx]; + + uint16_t handle = stream.m_handle.idx; + VertexBufferD3D12& vb = s_renderD3D12->m_vertexBuffers[handle]; + vb.setState(_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); + + uint16_t decl = !isValid(vb.m_decl) ? stream.m_decl.idx : vb.m_decl.idx; + const VertexDecl& vertexDecl = s_renderD3D12->m_vertexDecls[decl]; + uint32_t stride = vertexDecl.m_stride; + + D3D12_VERTEX_BUFFER_VIEW& vbv = cmd.vbv[numStreams]; + vbv.BufferLocation = vb.m_gpuVA + stream.m_startVertex * stride; + vbv.StrideInBytes = vertexDecl.m_stride; + vbv.SizeInBytes = vb.m_size; + + numVertices = bx::uint32_min(UINT32_MAX == _draw.m_numVertices + ? vb.m_size/stride + : _draw.m_numVertices + , numVertices + ); + } + if (isValid(_draw.m_instanceDataBuffer) ) { VertexBufferD3D12& inst = s_renderD3D12->m_vertexBuffers[_draw.m_instanceDataBuffer.idx]; inst.setState(_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); - cmd.vbv[1].BufferLocation = inst.m_gpuVA + _draw.m_instanceDataOffset; - cmd.vbv[1].StrideInBytes = _draw.m_instanceDataStride; - cmd.vbv[1].SizeInBytes = _draw.m_numInstances * _draw.m_instanceDataStride; + D3D12_VERTEX_BUFFER_VIEW& vbv = cmd.vbv[numStreams++]; + vbv.BufferLocation = inst.m_gpuVA + _draw.m_instanceDataOffset; + vbv.StrideInBytes = _draw.m_instanceDataStride; + vbv.SizeInBytes = _draw.m_numInstances * _draw.m_instanceDataStride; } - else + + for (; numStreams < BX_COUNTOF(cmd.vbv); ++numStreams) { - bx::memSet(&cmd.vbv[1], 0, sizeof(cmd.vbv[1]) ); + D3D12_VERTEX_BUFFER_VIEW* vbv = &cmd.vbv[numStreams]; + bx::memSet(vbv, 0, sizeof(D3D12_VERTEX_BUFFER_VIEW)); } - cmd.draw.InstanceCount = _draw.m_numInstances; + + cmd.draw.InstanceCount = _draw.m_numInstances; cmd.draw.VertexCountPerInstance = numVertices; - cmd.draw.StartVertexLocation = _draw.m_stream[0].m_startVertex; + cmd.draw.StartVertexLocation = 0; cmd.draw.StartInstanceLocation = 0; } else @@ -3545,25 +3984,59 @@ data.NumQualityLevels = 0; ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT ; - cmd.vbv[0].BufferLocation = vb.m_gpuVA; - cmd.vbv[0].StrideInBytes = vertexDecl.m_stride; - cmd.vbv[0].SizeInBytes = vb.m_size; + + uint32_t numVertices = _draw.m_numVertices; + uint8_t numStreams = 0; + for (uint32_t idx = 0, streamMask = _draw.m_streamMask, ntz = bx::uint32_cnttz(streamMask) + ; 0 != streamMask + ; streamMask >>= 1, idx += 1, ntz = bx::uint32_cnttz(streamMask), ++numStreams + ) + { + streamMask >>= ntz; + idx += ntz; + + const Stream& stream = _draw.m_stream[idx]; + + uint16_t handle = stream.m_handle.idx; + VertexBufferD3D12& vb = s_renderD3D12->m_vertexBuffers[handle]; + vb.setState(_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); + + uint16_t decl = !isValid(vb.m_decl) ? stream.m_decl.idx : vb.m_decl.idx; + const VertexDecl& vertexDecl = s_renderD3D12->m_vertexDecls[decl]; + uint32_t stride = vertexDecl.m_stride; + + D3D12_VERTEX_BUFFER_VIEW& vbv = cmd.vbv[numStreams]; + vbv.BufferLocation = vb.m_gpuVA + stream.m_startVertex * stride; + vbv.StrideInBytes = stride; + vbv.SizeInBytes = vb.m_size; + + numVertices = bx::uint32_min(UINT32_MAX == _draw.m_numVertices + ? vb.m_size/stride + : _draw.m_numVertices + , numVertices + ); + } + if (isValid(_draw.m_instanceDataBuffer) ) { VertexBufferD3D12& inst = s_renderD3D12->m_vertexBuffers[_draw.m_instanceDataBuffer.idx]; inst.setState(_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); - cmd.vbv[1].BufferLocation = inst.m_gpuVA + _draw.m_instanceDataOffset; - cmd.vbv[1].StrideInBytes = _draw.m_instanceDataStride; - cmd.vbv[1].SizeInBytes = _draw.m_numInstances * _draw.m_instanceDataStride; + D3D12_VERTEX_BUFFER_VIEW& vbv = cmd.vbv[numStreams++]; + vbv.BufferLocation = inst.m_gpuVA + _draw.m_instanceDataOffset; + vbv.StrideInBytes = _draw.m_instanceDataStride; + vbv.SizeInBytes = _draw.m_numInstances * _draw.m_instanceDataStride; } - else + + for (; numStreams < BX_COUNTOF(cmd.vbv); ++numStreams) { - bx::memSet(&cmd.vbv[1], 0, sizeof(cmd.vbv[1]) ); + D3D12_VERTEX_BUFFER_VIEW* vbv = &cmd.vbv[numStreams]; + bx::memSet(vbv, 0, sizeof(D3D12_VERTEX_BUFFER_VIEW)); } + cmd.drawIndexed.IndexCountPerInstance = numIndices; - cmd.drawIndexed.InstanceCount = _draw.m_numInstances; - cmd.drawIndexed.StartIndexLocation = _draw.m_startIndex; - cmd.drawIndexed.BaseVertexLocation = _draw.m_stream[0].m_startVertex; + cmd.drawIndexed.InstanceCount = _draw.m_numInstances; + cmd.drawIndexed.StartIndexLocation = _draw.m_startIndex; + cmd.drawIndexed.BaseVertexLocation = 0; cmd.drawIndexed.StartInstanceLocation = 0; } @@ -3627,7 +4100,7 @@ data.NumQualityLevels = 0; { bx::memCopy(m_current.vbv, cmd.vbv, sizeof(cmd.vbv) ); _commandList->IASetVertexBuffers(0 - , 0 == cmd.vbv[1].BufferLocation ? 1 : 2 + , BGFX_CONFIG_MAX_VERTEX_STREAMS+1 , cmd.vbv ); } @@ -3657,7 +4130,7 @@ data.NumQualityLevels = 0; { bx::memCopy(m_current.vbv, cmd.vbv, sizeof(cmd.vbv) ); _commandList->IASetVertexBuffers(0 - , 0 == cmd.vbv[1].BufferLocation ? 1 : 2 + , BGFX_CONFIG_MAX_VERTEX_STREAMS+1 , cmd.vbv ); } @@ -3710,7 +4183,7 @@ data.NumQualityLevels = 0; }; static const UavFormat s_uavFormat[] = - { // BGFX_BUFFER_COMPUTE_TYPE_UINT, BGFX_BUFFER_COMPUTE_TYPE_INT, BGFX_BUFFER_COMPUTE_TYPE_FLOAT + { // BGFX_BUFFER_COMPUTE_TYPE_INT, BGFX_BUFFER_COMPUTE_TYPE_UINT, BGFX_BUFFER_COMPUTE_TYPE_FLOAT { { DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_UNKNOWN }, 0 }, // ignored { { DXGI_FORMAT_R8_SINT, DXGI_FORMAT_R8_UINT, DXGI_FORMAT_UNKNOWN }, 1 }, // BGFX_BUFFER_COMPUTE_FORMAT_8x1 { { DXGI_FORMAT_R8G8_SINT, DXGI_FORMAT_R8G8_UINT, DXGI_FORMAT_UNKNOWN }, 2 }, // BGFX_BUFFER_COMPUTE_FORMAT_8x2 @@ -3815,9 +4288,12 @@ data.NumQualityLevels = 0; { ID3D12Resource* staging = createCommittedResource(s_renderD3D12->m_device, HeapProperty::Upload, _size); uint8_t* data; - DX_CHECK(staging->Map(0, NULL, (void**)&data) ); + + D3D12_RANGE readRange = { 0, 0 }; + DX_CHECK(staging->Map(0, &readRange, (void**)&data) ); bx::memCopy(data, _data, _size); - staging->Unmap(0, NULL); + D3D12_RANGE writeRange = { 0, _size }; + staging->Unmap(0, &writeRange); D3D12_RESOURCE_STATES state = setState(_commandList, D3D12_RESOURCE_STATE_COPY_DEST); _commandList->CopyBufferRegion(m_ptr, _offset, staging, 0, _size); @@ -3966,7 +4442,7 @@ data.NumQualityLevels = 0; } } - uint16_t shaderSize; + uint32_t shaderSize; bx::read(&reader, shaderSize); const void* code = reader.getDataPtr(); @@ -4003,7 +4479,7 @@ data.NumQualityLevels = 0; bx::read(&reader, m_size); } - void TextureD3D12::create(const Memory* _mem, uint32_t _flags, uint8_t _skip) + void* TextureD3D12::create(const Memory* _mem, uint32_t _flags, uint8_t _skip) { bimg::ImageContainer imageContainer; @@ -4060,6 +4536,7 @@ data.NumQualityLevels = 0; const bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE); const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK); + const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST); BX_TRACE("Texture %3d: %s (requested: %s), %dx%d%s RT[%c], BO[%c], CW[%c]%s." , this - s_renderD3D12->m_textures @@ -4093,31 +4570,35 @@ data.NumQualityLevels = 0; { if (convert) { - const uint32_t pitch = bx::strideAlign(width*bpp / 8, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); - const uint32_t slice = bx::strideAlign(pitch * height, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT); + const uint32_t pitch = bx::strideAlign(bx::max(width, 4)*bpp/8, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); + const uint32_t slice = bx::strideAlign(bx::max(height, 4)*pitch, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT); + const uint32_t size = slice*depth; - uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, slice); + uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, size); bimg::imageDecodeToBgra8(temp , mip.m_data , mip.m_width , mip.m_height - , pitch, mip.m_format + , pitch + , mip.m_format ); srd[kk].pData = temp; srd[kk].RowPitch = pitch; srd[kk].SlicePitch = slice; - totalSize += slice; + totalSize += size; } else if (compressed) { - uint32_t pitch = bx::strideAlign( (mip.m_width /blockInfo.blockWidth )*mip.m_blockSize, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); - uint32_t slice = bx::strideAlign( (mip.m_height/blockInfo.blockHeight)*pitch, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT); + const uint32_t pitch = bx::strideAlign( (mip.m_width /blockInfo.blockWidth )*mip.m_blockSize, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); + const uint32_t slice = bx::strideAlign( (mip.m_height/blockInfo.blockHeight)*pitch, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT); + const uint32_t size = slice*depth; - uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, slice); + uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, size); bimg::imageCopy(temp - , mip.m_height/blockInfo.blockHeight + , mip.m_height/blockInfo.blockHeight , (mip.m_width /blockInfo.blockWidth )*mip.m_blockSize + , depth , mip.m_data , pitch ); @@ -4125,17 +4606,19 @@ data.NumQualityLevels = 0; srd[kk].pData = temp; srd[kk].RowPitch = pitch; srd[kk].SlicePitch = slice; - totalSize += slice; + totalSize += size; } else { const uint32_t pitch = bx::strideAlign(mip.m_width*mip.m_bpp / 8, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); - const uint32_t slice = bx::strideAlign(pitch * mip.m_height, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT); + const uint32_t slice = bx::strideAlign(mip.m_height*pitch, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT); + const uint32_t size = slice*depth; - uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, slice); + uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, slice*depth); bimg::imageCopy(temp , mip.m_height - , mip.m_width*mip.m_bpp / 8 + , mip.m_width*mip.m_bpp/8 + , depth , mip.m_data , pitch ); @@ -4143,21 +4626,15 @@ data.NumQualityLevels = 0; srd[kk].pData = temp; srd[kk].RowPitch = pitch; srd[kk].SlicePitch = slice; - totalSize += slice; + totalSize += size; } - if (swizzle) - { -// imageSwizzleBgra8(temp, width, height, mip.m_width*4, data); - } - - srd[kk].SlicePitch = mip.m_height*srd[kk].RowPitch; ++kk; } else { const uint32_t pitch = bx::strideAlign(width*bpp / 8, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT); - const uint32_t slice = bx::strideAlign(pitch * height, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT); + const uint32_t slice = bx::strideAlign(height*pitch, D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT); totalSize += slice; } @@ -4197,7 +4674,6 @@ data.NumQualityLevels = 0; resourceDesc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN; resourceDesc.Flags = D3D12_RESOURCE_FLAG_NONE; resourceDesc.DepthOrArraySize = numSides; - D3D12_RESOURCE_STATES state = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE; D3D12_CLEAR_VALUE* clearValue = NULL; @@ -4236,6 +4712,11 @@ data.NumQualityLevels = 0; resourceDesc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS; } + if (blit) + { + state = D3D12_RESOURCE_STATE_COPY_DEST; + } + switch (m_type) { case Texture2D: @@ -4321,7 +4802,13 @@ data.NumQualityLevels = 0; break; } - m_ptr = createCommittedResource(device, HeapProperty::Default, &resourceDesc, clearValue); + m_ptr = createCommittedResource(device, HeapProperty::Texture, &resourceDesc, clearValue); + + if (kk != 0) + { +// void* directAccessPtr; +// DX_CHECK(m_ptr->Map(0, NULL, &directAccessPtr) ); + } { uint64_t uploadBufferSize; @@ -4350,7 +4837,7 @@ data.NumQualityLevels = 0; { ID3D12Resource* staging = createCommittedResource(s_renderD3D12->m_device, HeapProperty::Upload, totalSize); - setState(commandList,D3D12_RESOURCE_STATE_COPY_DEST); + setState(commandList, D3D12_RESOURCE_STATE_COPY_DEST); uint64_t result = UpdateSubresources(commandList , m_ptr @@ -4385,12 +4872,21 @@ data.NumQualityLevels = 0; } } } + + return m_directAccessPtr; } void TextureD3D12::destroy() { if (NULL != m_ptr) { + if (NULL != m_directAccessPtr) + { + D3D12_RANGE writeRange = { 0, 0 }; + m_ptr->Unmap(0, &writeRange); + m_directAccessPtr = NULL; + } + s_renderD3D12->m_cmd.release(m_ptr); m_ptr = NULL; } @@ -4398,14 +4894,14 @@ data.NumQualityLevels = 0; void TextureD3D12::update(ID3D12GraphicsCommandList* _commandList, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) { - setState(_commandList, D3D12_RESOURCE_STATE_COPY_DEST); + D3D12_RESOURCE_STATES state = setState(_commandList, D3D12_RESOURCE_STATE_COPY_DEST); const uint32_t subres = _mip + (_side * m_numMips); const uint32_t bpp = bimg::getBitsPerPixel(bimg::TextureFormat::Enum(m_textureFormat) ); const uint32_t rectpitch = _rect.m_width*bpp/8; const uint32_t srcpitch = UINT16_MAX == _pitch ? rectpitch : _pitch; - D3D12_RESOURCE_DESC desc = m_ptr->GetDesc(); + D3D12_RESOURCE_DESC desc = getResourceDesc(m_ptr); desc.Height = _rect.m_height; @@ -4427,12 +4923,14 @@ data.NumQualityLevels = 0; ID3D12Resource* staging = createCommittedResource(s_renderD3D12->m_device, HeapProperty::Upload, totalBytes); uint8_t* data; - DX_CHECK(staging->Map(0, NULL, (void**)&data) ); + D3D12_RANGE readRange = { 0, 0 }; + DX_CHECK(staging->Map(0, &readRange, (void**)&data) ); for (uint32_t ii = 0, height = _rect.m_height; ii < height; ++ii) { bx::memCopy(&data[ii*rowPitch], &_mem->data[ii*srcpitch], srcpitch); } - staging->Unmap(0, NULL); + D3D12_RANGE writeRange = { 0, _rect.m_height*srcpitch }; + staging->Unmap(0, &writeRange); D3D12_BOX box; box.left = 0; @@ -4447,7 +4945,7 @@ data.NumQualityLevels = 0; D3D12_TEXTURE_COPY_LOCATION src = { staging, D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT, { layout } }; _commandList->CopyTextureRegion(&dst, _rect.m_x, _rect.m_y, 0, &src, &box); - setState(_commandList, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE); + setState(_commandList, state); s_renderD3D12->m_cmd.release(staging); } @@ -4481,8 +4979,77 @@ data.NumQualityLevels = 0; postReset(); } - void FrameBufferD3D12::create(uint16_t /*_denseIdx*/, void* /*_nwh*/, uint32_t /*_width*/, uint32_t /*_height*/, TextureFormat::Enum /*_depthFormat*/) + void FrameBufferD3D12::create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) { + BX_UNUSED(_nwh, _width, _height, _depthFormat); + +#if BX_PLATFORM_WINDOWS + DXGI_SWAP_CHAIN_DESC scd; + bx::memCopy(&scd, &s_renderD3D12->m_scd, sizeof(DXGI_SWAP_CHAIN_DESC) ); + scd.BufferDesc.Width = _width; + scd.BufferDesc.Height = _height; + scd.OutputWindow = (HWND)_nwh; + + HRESULT hr; + hr = s_renderD3D12->m_factory->CreateSwapChain(s_renderD3D12->m_cmd.m_commandQueue + , &scd + , reinterpret_cast(&m_swapChain) + ); + BGFX_FATAL(SUCCEEDED(hr), Fatal::UnableToInitialize, "Failed to create swap chain."); + m_state = D3D12_RESOURCE_STATE_PRESENT; + + ID3D12Device* device = s_renderD3D12->m_device; + FrameBufferHandle fbh = { uint16_t(this - s_renderD3D12->m_frameBuffers) }; + + for (uint32_t ii = 0, num = scd.BufferCount; ii < num; ++ii) + { + D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = s_renderD3D12->getRtv(fbh, uint8_t(ii) ); + + ID3D12Resource* colorBuffer; + DX_CHECK(m_swapChain->GetBuffer(ii + , IID_ID3D12Resource + , (void**)&colorBuffer + ) ); + device->CreateRenderTargetView(colorBuffer, NULL, rtvHandle); + DX_RELEASE(colorBuffer, 0); + } +#endif // BX_PLATFORM_WINDOWS + + m_denseIdx = _denseIdx; + m_num = 1; + } + + uint16_t FrameBufferD3D12::destroy() + { + DX_RELEASE(m_swapChain, 0); + + m_numTh = 0; + m_needPresent = false; + + m_depth.idx = bgfx::kInvalidHandle; + + uint16_t denseIdx = m_denseIdx; + m_denseIdx = UINT16_MAX; + + return denseIdx; + } + + HRESULT FrameBufferD3D12::present(uint32_t _syncInterval, uint32_t _flags) + { + if (m_needPresent) + { +#if 1 + HRESULT hr = m_swapChain->Present(_syncInterval, _flags); + hr = !isLost(hr) ? S_OK : hr; + m_needPresent = false; + return hr; +#else + m_needPresent = false; + return S_OK; +#endif // 0 + } + + return S_OK; } void FrameBufferD3D12::preReset() @@ -4495,14 +5062,14 @@ data.NumQualityLevels = 0; { ID3D12Device* device = s_renderD3D12->m_device; - D3D12_CPU_DESCRIPTOR_HANDLE rtvDescriptor = s_renderD3D12->m_rtvDescriptorHeap->GetCPUDescriptorHandleForHeapStart(); + D3D12_CPU_DESCRIPTOR_HANDLE rtvDescriptor = getCPUHandleHeapStart(s_renderD3D12->m_rtvDescriptorHeap); uint32_t rtvDescriptorSize = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); uint32_t fbhIdx = (uint32_t)(this - s_renderD3D12->m_frameBuffers); rtvDescriptor.ptr += (BX_COUNTOF(s_renderD3D12->m_backBufferColor) + fbhIdx * BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) * rtvDescriptorSize; m_width = 0; m_height = 0; - m_depth.idx = bgfx::invalidHandle; + m_depth.idx = bgfx::kInvalidHandle; m_num = 0; for (uint32_t ii = 0; ii < m_numTh; ++ii) { @@ -4513,7 +5080,7 @@ data.NumQualityLevels = 0; if (0 == m_width) { - D3D12_RESOURCE_DESC desc = texture.m_ptr->GetDesc(); + D3D12_RESOURCE_DESC desc = getResourceDesc(texture.m_ptr); m_width = uint32_t(desc.Width); m_height = uint32_t(desc.Height); } @@ -4522,7 +5089,7 @@ data.NumQualityLevels = 0; { BX_CHECK(!isValid(m_depth), ""); m_depth = handle; - D3D12_CPU_DESCRIPTOR_HANDLE dsvDescriptor = s_renderD3D12->m_dsvDescriptorHeap->GetCPUDescriptorHandleForHeapStart(); + D3D12_CPU_DESCRIPTOR_HANDLE dsvDescriptor = getCPUHandleHeapStart(s_renderD3D12->m_dsvDescriptorHeap); uint32_t dsvDescriptorSize = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_DSV); dsvDescriptor.ptr += (1 + fbhIdx) * dsvDescriptorSize; @@ -4530,7 +5097,7 @@ data.NumQualityLevels = 0; BX_UNUSED(blockInfo); D3D12_DEPTH_STENCIL_VIEW_DESC dsvDesc; - ZeroMemory(&dsvDesc, sizeof(dsvDesc) ); + bx::memSet(&dsvDesc, 0, sizeof(dsvDesc) ); dsvDesc.Format = s_textureFormat[texture.m_textureFormat].m_fmtDsv; dsvDesc.ViewDimension = D3D12_DSV_DIMENSION_TEXTURE2D; dsvDesc.Flags = D3D12_DSV_FLAG_NONE @@ -4547,8 +5114,53 @@ data.NumQualityLevels = 0; { m_texture[m_num] = handle; D3D12_CPU_DESCRIPTOR_HANDLE rtv = { rtvDescriptor.ptr + m_num * rtvDescriptorSize }; + + D3D12_RENDER_TARGET_VIEW_DESC desc; + desc.Format = texture.m_srvd.Format; + + switch (texture.m_type) + { + default: + case TextureD3D12::Texture2D: +// if (1 < msaa.Count) +// { +// desc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DMS; +// } +// else + { + desc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2D; + desc.Texture2D.MipSlice = m_attachment[ii].mip; + desc.Texture2D.PlaneSlice = 0; + } + break; + + case TextureD3D12::TextureCube: +// if (1 < msaa.Count) +// { +// desc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY; +// desc.Texture2DMSArray.ArraySize = 1; +// desc.Texture2DMSArray.FirstArraySlice = m_attachment[ii].layer; +// } +// else + { + desc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE2DARRAY; + desc.Texture2DArray.ArraySize = 1; + desc.Texture2DArray.FirstArraySlice = m_attachment[ii].layer; + desc.Texture2DArray.MipSlice = m_attachment[ii].mip; + desc.Texture2DArray.PlaneSlice = 0; + } + break; + + case TextureD3D12::Texture3D: + desc.ViewDimension = D3D12_RTV_DIMENSION_TEXTURE3D; + desc.Texture3D.MipSlice = m_attachment[ii].mip; + desc.Texture3D.WSize = 1; + desc.Texture3D.FirstWSlice = m_attachment[ii].layer; + break; + } + device->CreateRenderTargetView(texture.m_ptr - , NULL + , &desc , rtv ); m_num++; @@ -4558,18 +5170,6 @@ data.NumQualityLevels = 0; } } - uint16_t FrameBufferD3D12::destroy() - { - m_numTh = 0; - - m_depth.idx = bgfx::invalidHandle; - - uint16_t denseIdx = m_denseIdx; - m_denseIdx = UINT16_MAX; - - return denseIdx; - } - void FrameBufferD3D12::resolve() { } @@ -4577,15 +5177,13 @@ data.NumQualityLevels = 0; void FrameBufferD3D12::clear(ID3D12GraphicsCommandList* _commandList, const Clear& _clear, const float _palette[][4], const D3D12_RECT* _rect, uint32_t _num) { ID3D12Device* device = s_renderD3D12->m_device; - const uint32_t fbhIdx = (uint32_t)(this - s_renderD3D12->m_frameBuffers); + FrameBufferHandle fbh = { (uint16_t)(this - s_renderD3D12->m_frameBuffers) }; + D3D12_CPU_DESCRIPTOR_HANDLE rtv = s_renderD3D12->getRtv(fbh); + uint32_t rtvDescriptorSize = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); if (BGFX_CLEAR_COLOR & _clear.m_flags && 0 != m_num) { - D3D12_CPU_DESCRIPTOR_HANDLE rtvDescriptor = s_renderD3D12->m_rtvDescriptorHeap->GetCPUDescriptorHandleForHeapStart(); - uint32_t rtvDescriptorSize = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); - rtvDescriptor.ptr += (BX_COUNTOF(s_renderD3D12->m_backBufferColor) + fbhIdx * BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) * rtvDescriptorSize; - if (BGFX_CLEAR_COLOR_USE_PALETTE & _clear.m_flags) { for (uint32_t ii = 0, num = m_num; ii < num; ++ii) @@ -4593,12 +5191,12 @@ data.NumQualityLevels = 0; uint8_t index = _clear.m_index[ii]; if (UINT8_MAX != index) { - D3D12_CPU_DESCRIPTOR_HANDLE rtv = { rtvDescriptor.ptr + ii * rtvDescriptorSize }; _commandList->ClearRenderTargetView(rtv , _palette[index] , _num , _rect ); + rtv.ptr += rtvDescriptorSize; } } } @@ -4613,12 +5211,12 @@ data.NumQualityLevels = 0; }; for (uint32_t ii = 0, num = m_num; ii < num; ++ii) { - D3D12_CPU_DESCRIPTOR_HANDLE rtv = { rtvDescriptor.ptr + ii * rtvDescriptorSize }; _commandList->ClearRenderTargetView(rtv , frgba , _num , _rect ); + rtv.ptr += rtvDescriptorSize; } } } @@ -4626,9 +5224,9 @@ data.NumQualityLevels = 0; if (isValid(m_depth) && (BGFX_CLEAR_DEPTH|BGFX_CLEAR_STENCIL) & _clear.m_flags) { - D3D12_CPU_DESCRIPTOR_HANDLE dsvDescriptor = s_renderD3D12->m_dsvDescriptorHeap->GetCPUDescriptorHandleForHeapStart(); + D3D12_CPU_DESCRIPTOR_HANDLE dsvDescriptor = getCPUHandleHeapStart(s_renderD3D12->m_dsvDescriptorHeap); uint32_t dsvDescriptorSize = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_DSV); - dsvDescriptor.ptr += (1 + fbhIdx) * dsvDescriptorSize; + dsvDescriptor.ptr += (1 + fbh.idx) * dsvDescriptorSize; DWORD flags = 0; flags |= (_clear.m_flags & BGFX_CLEAR_DEPTH) ? D3D12_CLEAR_FLAG_DEPTH : 0; @@ -4644,6 +5242,30 @@ data.NumQualityLevels = 0; } } + D3D12_RESOURCE_STATES FrameBufferD3D12::setState(ID3D12GraphicsCommandList* _commandList, uint8_t _idx, D3D12_RESOURCE_STATES _state) + { + if (m_state != _state) + { + ID3D12Resource* colorBuffer; + DX_CHECK(m_swapChain->GetBuffer(_idx + , IID_ID3D12Resource + , (void**)&colorBuffer + ) ); + + setResourceBarrier(_commandList + , colorBuffer + , m_state + , _state + ); + + DX_RELEASE(colorBuffer, 0); + + bx::xchg(m_state, _state); + } + + return _state; + } + void TimerQueryD3D12::init() { D3D12_QUERY_HEAP_DESC queryHeapDesc; @@ -4651,20 +5273,28 @@ data.NumQualityLevels = 0; queryHeapDesc.NodeMask = 1; queryHeapDesc.Type = D3D12_QUERY_HEAP_TYPE_TIMESTAMP; DX_CHECK(s_renderD3D12->m_device->CreateQueryHeap(&queryHeapDesc - , IID_ID3D12QueryHeap - , (void**)&m_queryHeap - ) ); + , IID_ID3D12QueryHeap + , (void**)&m_queryHeap + ) ); const uint32_t size = queryHeapDesc.Count*sizeof(uint64_t); m_readback = createCommittedResource(s_renderD3D12->m_device - , HeapProperty::ReadBack - , size - ); + , HeapProperty::ReadBack + , size + ); DX_CHECK(s_renderD3D12->m_cmd.m_commandQueue->GetTimestampFrequency(&m_frequency) ); D3D12_RANGE range = { 0, size }; - m_readback->Map(0, &range, (void**)&m_result); + m_readback->Map(0, &range, (void**)&m_queryResult); + + for (uint32_t ii = 0; ii < BX_COUNTOF(m_result); ++ii) + { + Result& result = m_result[ii]; + result.reset(); + } + + m_control.reset(); } void TimerQueryD3D12::shutdown() @@ -4676,50 +5306,86 @@ data.NumQualityLevels = 0; DX_RELEASE(m_readback, 0); } - void TimerQueryD3D12::begin(ID3D12GraphicsCommandList* _commandList) + uint32_t TimerQueryD3D12::begin(uint32_t _resultIdx) { - BX_UNUSED(_commandList); while (0 == m_control.reserve(1) ) { m_control.consume(1); } - uint32_t offset = m_control.m_current * 2 + 0; - _commandList->EndQuery(m_queryHeap + Result& result = m_result[_resultIdx]; + ++result.m_pending; + + const uint32_t idx = m_control.m_current; + Query& query = m_query[idx]; + query.m_resultIdx = _resultIdx; + query.m_ready = false; + + ID3D12GraphicsCommandList* commandList = s_renderD3D12->m_commandList; + + uint32_t offset = idx * 2 + 0; + commandList->EndQuery(m_queryHeap , D3D12_QUERY_TYPE_TIMESTAMP , offset ); + + m_control.commit(1); + + return idx; } - void TimerQueryD3D12::end(ID3D12GraphicsCommandList* _commandList) + void TimerQueryD3D12::end(uint32_t _idx) { - BX_UNUSED(_commandList); - uint32_t offset = m_control.m_current * 2; - _commandList->EndQuery(m_queryHeap + Query& query = m_query[_idx]; + query.m_ready = true; + query.m_fence = s_renderD3D12->m_cmd.m_currentFence - 1; + uint32_t offset = _idx * 2; + + ID3D12GraphicsCommandList* commandList = s_renderD3D12->m_commandList; + + commandList->EndQuery(m_queryHeap , D3D12_QUERY_TYPE_TIMESTAMP , offset + 1 ); - _commandList->ResolveQueryData(m_queryHeap + commandList->ResolveQueryData(m_queryHeap , D3D12_QUERY_TYPE_TIMESTAMP , offset , 2 , m_readback , offset * sizeof(uint64_t) ); - m_control.commit(1); + + while (update() ) + { + } } - bool TimerQueryD3D12::get() + bool TimerQueryD3D12::update() { if (0 != m_control.available() ) { - uint32_t offset = m_control.m_read * 2; - m_begin = m_result[offset+0]; - m_end = m_result[offset+1]; - m_elapsed = m_end - m_begin; + uint32_t idx = m_control.m_read; + Query& query = m_query[idx]; + + if (!query.m_ready) + { + return false; + } + + if (query.m_fence > s_renderD3D12->m_cmd.m_completedFence) + { + return false; + } m_control.consume(1); + Result& result = m_result[query.m_resultIdx]; + --result.m_pending; + + uint32_t offset = idx * 2; + result.m_begin = m_queryResult[offset+0]; + result.m_end = m_queryResult[offset+1]; + return true; } @@ -4733,9 +5399,9 @@ data.NumQualityLevels = 0; queryHeapDesc.NodeMask = 1; queryHeapDesc.Type = D3D12_QUERY_HEAP_TYPE_OCCLUSION; DX_CHECK(s_renderD3D12->m_device->CreateQueryHeap(&queryHeapDesc - , IID_ID3D12QueryHeap - , (void**)&m_queryHeap - ) ); + , IID_ID3D12QueryHeap + , (void**)&m_queryHeap + ) ); const uint32_t size = BX_COUNTOF(m_handle)*sizeof(uint64_t); m_readback = createCommittedResource(s_renderD3D12->m_device @@ -4801,7 +5467,7 @@ data.NumQualityLevels = 0; OcclusionQueryHandle& handle = m_handle[(m_control.m_read + ii) % size]; if (handle.idx == _handle.idx) { - handle.idx = bgfx::invalidHandle; + handle.idx = bgfx::kInvalidHandle; } } } @@ -4812,9 +5478,109 @@ data.NumQualityLevels = 0; uint16_t m_samplerStateIdx; }; + void RendererContextD3D12::submitBlit(BlitState& _bs, uint16_t _view) + { + TextureHandle currentSrc = { kInvalidHandle }; + D3D12_RESOURCE_STATES state = D3D12_RESOURCE_STATES(UINT32_MAX); + + while (_bs.hasItem(_view) ) + { + const BlitItem& blit = _bs.advance(); + + TextureD3D12& src = m_textures[blit.m_src.idx]; + const TextureD3D12& dst = m_textures[blit.m_dst.idx]; + + if (currentSrc.idx != blit.m_src.idx) + { + if (D3D12_RESOURCE_STATES(UINT32_MAX) != state) + { + m_textures[currentSrc.idx].setState(m_commandList, state); + } + + currentSrc = blit.m_src; + + state = src.setState(m_commandList, D3D12_RESOURCE_STATE_COPY_SOURCE); + } + + uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; + uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; + uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ; + uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; + uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; + uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ; + uint32_t width = bx::uint32_min(srcWidth, dstWidth); + uint32_t height = bx::uint32_min(srcHeight, dstHeight); + uint32_t depth = bx::uint32_min(srcDepth, dstDepth); + + if (TextureD3D12::Texture3D == src.m_type) + { + D3D12_BOX box; + box.left = blit.m_srcX; + box.top = blit.m_srcY; + box.front = blit.m_srcZ; + box.right = blit.m_srcX + width; + box.bottom = blit.m_srcY + height;; + box.back = blit.m_srcZ + bx::uint32_imax(1, depth); + + D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { { 0, { DXGI_FORMAT_UNKNOWN, 0, 0, 0, 0 } } } }; + D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { { 0, { DXGI_FORMAT_UNKNOWN, 0, 0, 0, 0 } } } }; + m_commandList->CopyTextureRegion(&dstLocation + , blit.m_dstX + , blit.m_dstY + , blit.m_dstZ + , &srcLocation + , &box + ); + } + else + { + D3D12_BOX box; + box.left = blit.m_srcX; + box.top = blit.m_srcY; + box.front = 0; + box.right = blit.m_srcX + width; + box.bottom = blit.m_srcY + height;; + box.back = 1; + + const uint32_t srcZ = TextureD3D12::TextureCube == src.m_type + ? blit.m_srcZ + : 0 + ; + const uint32_t dstZ = TextureD3D12::TextureCube == dst.m_type + ? blit.m_dstZ + : 0 + ; + + D3D12_TEXTURE_COPY_LOCATION dstLocation; + dstLocation.pResource = dst.m_ptr; + dstLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX; + dstLocation.SubresourceIndex = dstZ*dst.m_numMips+blit.m_dstMip; + D3D12_TEXTURE_COPY_LOCATION srcLocation; + srcLocation.pResource = src.m_ptr; + srcLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX; + srcLocation.SubresourceIndex = srcZ*src.m_numMips+blit.m_srcMip; + + bool depthStencil = bimg::isDepth(bimg::TextureFormat::Enum(src.m_textureFormat) ); + m_commandList->CopyTextureRegion(&dstLocation + , blit.m_dstX + , blit.m_dstY + , 0 + , &srcLocation + , depthStencil ? NULL : &box + ); + } + } + + if (isValid(currentSrc) + && D3D12_RESOURCE_STATES(UINT32_MAX) != state) + { + m_textures[currentSrc.idx].setState(m_commandList, state); + } + } + void RendererContextD3D12::submit(Frame* _render, ClearQuad& /*_clearQuad*/, TextVideoMemBlitter& _textVideoMemBlitter) { -// PIX_BEGINEVENT(D3DCOLOR_FRAME, L"rendererSubmit"); + PIX3_BEGINEVENT(m_commandList, D3DCOLOR_FRAME, "rendererSubmit"); if (m_lost || updateResolution(_render->m_resolution) ) @@ -4822,10 +5588,15 @@ data.NumQualityLevels = 0; return; } - int64_t elapsed = -bx::getHPCounter(); + if (_render->m_capture) + { + renderDocTriggerCapture(); + } + + int64_t timeBegin = bx::getHPCounter(); int64_t captureElapsed = 0; - m_gpuTimer.begin(m_commandList); + uint32_t frameQueryIdx = m_gpuTimer.begin(BGFX_CONFIG_MAX_VIEWS); if (0 < _render->m_iboffset) { @@ -4858,8 +5629,8 @@ data.NumQualityLevels = 0; // bool wireframe = !!(_render->m_debug&BGFX_DEBUG_WIREFRAME); // setDebugWireframe(wireframe); - uint16_t currentSamplerStateIdx = invalidHandle; - uint16_t currentProgramIdx = invalidHandle; + uint16_t currentSamplerStateIdx = kInvalidHandle; + uint16_t currentProgramIdx = kInvalidHandle; uint32_t currentBindHash = 0; bool hasPredefined = false; bool commandListChanged = false; @@ -4868,10 +5639,7 @@ data.NumQualityLevels = 0; uint16_t view = UINT16_MAX; FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS }; - BlitKey blitKey; - blitKey.decode(_render->m_blitKeys[0]); - uint16_t numBlitItems = _render->m_numBlitItems; - uint16_t blitItem = 0; + BlitState bs(_render); uint32_t blendFactor = 0; @@ -4891,8 +5659,16 @@ data.NumQualityLevels = 0; uint32_t statsNumIndices = 0; uint32_t statsKeyType[2] = {}; + Profiler profiler( + _render + , m_gpuTimer + , s_viewName + ); + #if BX_PLATFORM_WINDOWS m_backBufferColorIdx = m_swapChain->GetCurrentBackBufferIndex(); +#else + m_backBufferColorIdx = (m_backBufferColorIdx+1) % m_scd.BufferCount; #endif // BX_PLATFORM_WINDOWS const uint64_t f0 = BGFX_STATE_BLEND_FACTOR; @@ -4916,13 +5692,15 @@ data.NumQualityLevels = 0; if (0 == (_render->m_debug&BGFX_DEBUG_IFH) ) { + setFrameBuffer(BGFX_INVALID_HANDLE, true); + m_batch.begin(); // uint8_t eye = 0; // uint8_t restartState = 0; - viewState.m_rect = _render->m_rect[0]; + viewState.m_rect = _render->m_view[0].m_rect; - int32_t numItems = _render->m_num; + int32_t numItems = _render->m_numRenderItems; for (int32_t item = 0, restartItem = numItems; item < numItems || restartItem < numItems;) { const uint64_t encodedKey = _render->m_sortKeys[item]; @@ -4946,16 +5724,23 @@ data.NumQualityLevels = 0; view = key.m_view; currentPso = NULL; - currentSamplerStateIdx = invalidHandle; - currentProgramIdx = invalidHandle; + currentSamplerStateIdx = kInvalidHandle; + currentProgramIdx = kInvalidHandle; hasPredefined = false; - fbh = _render->m_fb[view]; + fbh = _render->m_view[view].m_fbh; setFrameBuffer(fbh); - viewState.m_rect = _render->m_rect[view]; - const Rect& rect = _render->m_rect[view]; - const Rect& scissorRect = _render->m_scissor[view]; + if (item > 1) + { + profiler.end(); + } + + profiler.begin(view); + + viewState.m_rect = _render->m_view[view].m_rect; + const Rect& rect = _render->m_view[view].m_rect; + const Rect& scissorRect = _render->m_view[view].m_scissor; viewHasScissor = !scissorRect.isZero(); viewScissorRect = viewHasScissor ? scissorRect : rect; @@ -4976,7 +5761,7 @@ data.NumQualityLevels = 0; m_commandList->RSSetScissorRects(1, &rc); restoreScissor = false; - Clear& clr = _render->m_clear[view]; + Clear& clr = _render->m_view[view].m_clear; if (BGFX_CLEAR_NONE != clr.m_flags) { Rect clearRect = rect; @@ -4986,83 +5771,7 @@ data.NumQualityLevels = 0; prim = s_primInfo[BX_COUNTOF(s_primName)]; // Force primitive type update. - const uint8_t blitView = SortKey::decodeView(encodedKey); - for (; blitItem < numBlitItems && blitKey.m_view <= blitView; blitItem++) - { - const BlitItem& blit = _render->m_blitItem[blitItem]; - blitKey.decode(_render->m_blitKeys[blitItem+1]); - - const TextureD3D12& src = m_textures[blit.m_src.idx]; - const TextureD3D12& dst = m_textures[blit.m_dst.idx]; - - uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; - uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; - uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ; - uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; - uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; - uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ; - uint32_t width = bx::uint32_min(srcWidth, dstWidth); - uint32_t height = bx::uint32_min(srcHeight, dstHeight); - uint32_t depth = bx::uint32_min(srcDepth, dstDepth); - - if (TextureD3D12::Texture3D == src.m_type) - { - D3D12_BOX box; - box.left = blit.m_srcX; - box.top = blit.m_srcY; - box.front = blit.m_srcZ; - box.right = blit.m_srcX + width; - box.bottom = blit.m_srcY + height;; - box.back = blit.m_srcZ + bx::uint32_imax(1, depth); - - D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{}} }; - D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{}} }; - m_commandList->CopyTextureRegion(&dstLocation - , blit.m_dstX - , blit.m_dstY - , blit.m_dstZ - , &srcLocation - , &box - ); - } - else - { - D3D12_BOX box; - box.left = blit.m_srcX; - box.top = blit.m_srcY; - box.front = 0; - box.right = blit.m_srcX + width; - box.bottom = blit.m_srcY + height;; - box.back = 1; - - const uint32_t srcZ = TextureD3D12::TextureCube == src.m_type - ? blit.m_srcZ - : 0 - ; - const uint32_t dstZ = TextureD3D12::TextureCube == dst.m_type - ? blit.m_dstZ - : 0 - ; - - D3D12_TEXTURE_COPY_LOCATION dstLocation; - dstLocation.pResource = dst.m_ptr; - dstLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX; - dstLocation.SubresourceIndex = dstZ*dst.m_numMips+blit.m_dstMip; - D3D12_TEXTURE_COPY_LOCATION srcLocation; - srcLocation.pResource = src.m_ptr; - srcLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX; - srcLocation.SubresourceIndex = srcZ*src.m_numMips+blit.m_srcMip; - - bool depthStencil = bimg::isDepth(bimg::TextureFormat::Enum(src.m_textureFormat) ); - m_commandList->CopyTextureRegion(&dstLocation - , blit.m_dstX - , blit.m_dstY - , 0 - , &srcLocation - , depthStencil ? NULL : &box - ); - } - } + submitBlit(bs, view); } if (isCompute) @@ -5071,6 +5780,14 @@ data.NumQualityLevels = 0; { wasCompute = true; + if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) + { + char* viewName = s_viewName[view]; + viewName[3] = L'C'; + PIX3_ENDEVENT(m_commandList); + PIX3_BEGINEVENT(m_commandList, D3DCOLOR_COMPUTE, viewName); + } + m_commandList->SetComputeRootSignature(m_rootSignature); ID3D12DescriptorHeap* heaps[] = { m_samplerAllocator.getHeap(), @@ -5089,7 +5806,7 @@ data.NumQualityLevels = 0; currentBindHash = 0; } - uint32_t bindHash = bx::hashMurmur2A(renderBind.m_bind, sizeof(renderBind.m_bind) ); + uint32_t bindHash = bx::hash(renderBind.m_bind, sizeof(renderBind.m_bind) ); if (currentBindHash != bindHash) { currentBindHash = bindHash; @@ -5103,11 +5820,12 @@ data.NumQualityLevels = 0; for (uint32_t ii = 0; ii < BGFX_MAX_COMPUTE_BINDINGS; ++ii) { const Binding& bind = renderBind.m_bind[ii]; - if (invalidHandle != bind.m_idx) + if (kInvalidHandle != bind.m_idx) { switch (bind.m_type) { case Binding::Image: + case Binding::Texture: { TextureD3D12& texture = m_textures[bind.m_idx]; @@ -5178,10 +5896,10 @@ data.NumQualityLevels = 0; } bool constantsChanged = false; - if (compute.m_constBegin < compute.m_constEnd + if (compute.m_uniformBegin < compute.m_uniformEnd || currentProgramIdx != key.m_program) { - rendererUpdateUniforms(this, _render->m_uniformBuffer, compute.m_constBegin, compute.m_constEnd); + rendererUpdateUniforms(this, _render->m_uniformBuffer[compute.m_uniformIdx], compute.m_uniformBegin, compute.m_uniformEnd); currentProgramIdx = key.m_program; ProgramD3D12& program = m_program[currentProgramIdx]; @@ -5257,11 +5975,11 @@ data.NumQualityLevels = 0; if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) { - BX_UNUSED(s_viewNameW); -// wchar_t* viewNameW = s_viewNameW[view]; -// viewNameW[3] = L' '; -// PIX_ENDEVENT(); -// PIX_BEGINEVENT(D3DCOLOR_DRAW, viewNameW); + BX_UNUSED(s_viewName); + char* viewName = s_viewName[view]; + viewName[3] = ' '; + PIX3_ENDEVENT(m_commandList); + PIX3_BEGINEVENT(m_commandList, D3DCOLOR_DRAW, viewName); } commandListChanged = true; @@ -5280,8 +5998,8 @@ data.NumQualityLevels = 0; currentPso = NULL; currentBindHash = 0; - currentSamplerStateIdx = invalidHandle; - currentProgramIdx = invalidHandle; + currentSamplerStateIdx = kInvalidHandle; + currentProgramIdx = kInvalidHandle; currentState.clear(); currentState.m_scissor = !draw.m_scissor; changedFlags = BGFX_STATE_MASK; @@ -5295,10 +6013,16 @@ data.NumQualityLevels = 0; primIndex = uint8_t(pt>>BGFX_STATE_PT_SHIFT); } - rendererUpdateUniforms(this, _render->m_uniformBuffer, draw.m_constBegin, draw.m_constEnd); + bool constantsChanged = draw.m_uniformBegin < draw.m_uniformEnd; + rendererUpdateUniforms(this, _render->m_uniformBuffer[draw.m_uniformIdx], draw.m_uniformBegin, draw.m_uniformEnd); - if (isValid(draw.m_stream[0].m_handle) ) + if (0 != draw.m_streamMask) { + currentState.m_streamMask = draw.m_streamMask; + currentState.m_instanceDataBuffer.idx = draw.m_instanceDataBuffer.idx; + currentState.m_instanceDataOffset = draw.m_instanceDataOffset; + currentState.m_instanceDataStride = draw.m_instanceDataStride; + const uint64_t state = draw.m_stateFlags; bool hasFactor = 0 || f0 == (state & f0) @@ -5307,19 +6031,40 @@ data.NumQualityLevels = 0; || f3 == (state & f3) ; - const VertexBufferD3D12& vb = m_vertexBuffers[draw.m_stream[0].m_handle.idx]; - uint16_t declIdx = !isValid(vb.m_decl) ? draw.m_stream[0].m_decl.idx : vb.m_decl.idx; + const VertexDecl* decls[BGFX_CONFIG_MAX_VERTEX_STREAMS]; + + uint8_t numStreams = 0; + for (uint32_t idx = 0, streamMask = draw.m_streamMask, ntz = bx::uint32_cnttz(streamMask) + ; 0 != streamMask + ; streamMask >>= 1, idx += 1, ntz = bx::uint32_cnttz(streamMask), ++numStreams + ) + { + streamMask >>= ntz; + idx += ntz; + + currentState.m_stream[idx].m_decl = draw.m_stream[idx].m_decl; + currentState.m_stream[idx].m_handle = draw.m_stream[idx].m_handle; + currentState.m_stream[idx].m_startVertex = draw.m_stream[idx].m_startVertex; + + uint16_t handle = draw.m_stream[idx].m_handle.idx; + const VertexBufferD3D12& vb = m_vertexBuffers[handle]; + uint16_t decl = !isValid(vb.m_decl) ? draw.m_stream[idx].m_decl.idx : vb.m_decl.idx; + const VertexDecl& vertexDecl = m_vertexDecls[decl]; + + decls[numStreams] = &vertexDecl; + } ID3D12PipelineState* pso = getPipelineState(state , draw.m_stencil - , declIdx + , numStreams + , decls , key.m_program , uint8_t(draw.m_instanceDataStride/16) ); uint16_t scissor = draw.m_scissor; - uint32_t bindHash = bx::hashMurmur2A(renderBind.m_bind, sizeof(renderBind.m_bind) ); + uint32_t bindHash = bx::hash(renderBind.m_bind, sizeof(renderBind.m_bind) ); if (currentBindHash != bindHash || 0 != changedStencil || (hasFactor && blendFactor != draw.m_rgba) @@ -5339,14 +6084,14 @@ data.NumQualityLevels = 0; Bind* bindCached = bindLru.find(bindHash); if (NULL == bindCached) { + uint32_t numSet = 0; D3D12_GPU_DESCRIPTOR_HANDLE srvHandle[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS]; uint32_t samplerFlags[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS]; { - srvHandle[0].ptr = 0; for (uint32_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage) { const Binding& bind = renderBind.m_bind[stage]; - if (invalidHandle != bind.m_idx) + if (kInvalidHandle != bind.m_idx) { switch (bind.m_type) { @@ -5358,14 +6103,18 @@ data.NumQualityLevels = 0; samplerFlags[stage] = (0 == (BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER & bind.m_un.m_draw.m_textureFlags) ? bind.m_un.m_draw.m_textureFlags : texture.m_flags - ) & (BGFX_TEXTURE_SAMPLER_BITS_MASK | BGFX_TEXTURE_BORDER_COLOR_MASK) + ) & (BGFX_TEXTURE_SAMPLER_BITS_MASK | BGFX_TEXTURE_BORDER_COLOR_MASK | BGFX_TEXTURE_COMPARE_MASK) ; + + ++numSet; } break; case Binding::IndexBuffer: case Binding::VertexBuffer: { + samplerFlags[stage] = 0; + BufferD3D12& buffer = Binding::IndexBuffer == bind.m_type ? m_indexBuffers[bind.m_idx] : m_vertexBuffers[bind.m_idx] @@ -5373,8 +6122,6 @@ data.NumQualityLevels = 0; if (Access::Read != bind.m_un.m_compute.m_access) { - // The api functions prevent binding with Access::Write, - // but might as well allow it in here for future-proofing buffer.setState(m_commandList, D3D12_RESOURCE_STATE_UNORDERED_ACCESS); scratchBuffer.allocUav(srvHandle[stage], buffer); } @@ -5383,19 +6130,21 @@ data.NumQualityLevels = 0; buffer.setState(m_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); scratchBuffer.allocSrv(srvHandle[stage], buffer); } + + ++numSet; } break; } } else { - bx::memCopy(&srvHandle[stage], &srvHandle[0], sizeof(D3D12_GPU_DESCRIPTOR_HANDLE) ); + scratchBuffer.allocEmpty(srvHandle[stage]); samplerFlags[stage] = 0; } } } - if (srvHandle[0].ptr != 0) + if (0 != numSet) { uint16_t samplerStateIdx = getSamplerState(samplerFlags, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, _render->m_colorPalette); if (samplerStateIdx != currentSamplerStateIdx) @@ -5405,6 +6154,7 @@ data.NumQualityLevels = 0; } m_commandList->SetGraphicsRootDescriptorTable(Rdt::SRV, srvHandle[0]); + m_commandList->SetGraphicsRootDescriptorTable(Rdt::UAV, srvHandle[0]); Bind bind; bind.m_srvHandle = srvHandle[0]; @@ -5420,7 +6170,9 @@ data.NumQualityLevels = 0; currentSamplerStateIdx = samplerStateIdx; m_commandList->SetGraphicsRootDescriptorTable(Rdt::Sampler, m_samplerAllocator.get(samplerStateIdx) ); } + m_commandList->SetGraphicsRootDescriptorTable(Rdt::SRV, bindCached->m_srvHandle); + m_commandList->SetGraphicsRootDescriptorTable(Rdt::UAV, bindCached->m_srvHandle); } } @@ -5475,7 +6227,7 @@ data.NumQualityLevels = 0; { restoreScissor = true; Rect scissorRect; - scissorRect.setIntersect(viewScissorRect,_render->m_rectCache.m_cache[scissor]); + scissorRect.setIntersect(viewScissorRect, _render->m_frameCache.m_rectCache.m_cache[scissor]); if (scissorRect.isZeroArea() ) { continue; @@ -5496,8 +6248,7 @@ data.NumQualityLevels = 0; m_commandList->SetPipelineState(pso); } - bool constantsChanged = false; - if (draw.m_constBegin < draw.m_constEnd + if (constantsChanged || currentProgramIdx != key.m_program || BGFX_STATE_ALPHA_REF_MASK & changedFlags) { @@ -5549,18 +6300,40 @@ data.NumQualityLevels = 0; } m_batch.end(m_commandList); + kick(); + + if (wasCompute) + { + if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) + { + char* viewName = s_viewName[view]; + viewName[3] = L'C'; + PIX3_ENDEVENT(m_commandList); + PIX3_BEGINEVENT(m_commandList, D3DCOLOR_DRAW, viewName); + } + } + + submitBlit(bs, BGFX_CONFIG_MAX_VIEWS); + + if (0 < _render->m_numRenderItems) + { + if (0 != (m_resolution.m_flags & BGFX_RESET_FLUSH_AFTER_RENDER) ) + { +// deviceCtx->Flush(); + } + +// captureElapsed = -bx::getHPCounter(); +// capture(); +// captureElapsed += bx::getHPCounter(); + + profiler.end(); + } } - int64_t now = bx::getHPCounter(); - elapsed += now; + PIX3_ENDEVENT(m_commandList); - static int64_t last = now; - - Stats& perfStats = _render->m_perfStats; - perfStats.cpuTimeBegin = last; - - int64_t frameTime = now - last; - last = now; + int64_t timeEnd = bx::getHPCounter(); + int64_t frameTime = timeEnd - timeBegin; static int64_t min = frameTime; static int64_t max = frameTime; @@ -5576,47 +6349,64 @@ data.NumQualityLevels = 0; presentMin = bx::int64_min(presentMin, m_presentElapsed); presentMax = bx::int64_max(presentMax, m_presentElapsed); - m_gpuTimer.end(m_commandList); - - do + if (UINT32_MAX != frameQueryIdx) { + m_gpuTimer.end(frameQueryIdx); + + const TimerQueryD3D12::Result& result = m_gpuTimer.m_result[BGFX_CONFIG_MAX_VIEWS]; double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency); - elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs; + elapsedGpuMs = (result.m_end - result.m_begin) * toGpuMs; maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; + + maxGpuLatency = bx::uint32_imax(maxGpuLatency, result.m_pending-1); } - while (m_gpuTimer.get() ); maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); const int64_t timerFreq = bx::getHPFrequency(); - perfStats.cpuTimeEnd = now; + Stats& perfStats = _render->m_perfStats; + perfStats.cpuTimeBegin = timeBegin; + perfStats.cpuTimeEnd = timeEnd; perfStats.cpuTimerFreq = timerFreq; - perfStats.gpuTimeBegin = m_gpuTimer.m_begin; - perfStats.gpuTimeEnd = m_gpuTimer.m_end; + const TimerQueryD3D12::Result& result = m_gpuTimer.m_result[BGFX_CONFIG_MAX_VIEWS]; + perfStats.gpuTimeBegin = result.m_begin; + perfStats.gpuTimeEnd = result.m_end; perfStats.gpuTimerFreq = m_gpuTimer.m_frequency; perfStats.numDraw = statsKeyType[0]; perfStats.numCompute = statsKeyType[1]; perfStats.maxGpuLatency = maxGpuLatency; + perfStats.gpuMemoryMax = -INT64_MAX; + perfStats.gpuMemoryUsed = -INT64_MAX; + +#if BX_PLATFORM_WINDOWS + DXGI_QUERY_VIDEO_MEMORY_INFO vmi[2]; + DX_CHECK(m_adapter->QueryVideoMemoryInfo(0, DXGI_MEMORY_SEGMENT_GROUP_LOCAL, &vmi[0]) ); + DX_CHECK(m_adapter->QueryVideoMemoryInfo(0, DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL, &vmi[1]) ); + + perfStats.gpuMemoryMax = int64_t(vmi[0].Budget); + perfStats.gpuMemoryUsed = int64_t(vmi[0].CurrentUsage); +#endif // BX_PLATFORM_WINDOWS if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) { -// PIX_BEGINEVENT(D3DCOLOR_FRAME, L"debugstats"); + PIX3_BEGINEVENT(m_commandList, D3DCOLOR_FRAME, "debugstats"); // m_needPresent = true; TextVideoMem& tvm = m_textVideoMem; - static int64_t next = now; + static int64_t next = timeEnd; - if (now >= next) + if (timeEnd >= next) { - next = now + bx::getHPFrequency(); - double freq = double(bx::getHPFrequency() ); + next = timeEnd + timerFreq; + + double freq = double(timerFreq); double toMs = 1000.0 / freq; tvm.clear(); uint16_t pos = 0; - tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x89 : 0x8f + tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f , " %s (FL %d.%d) / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " , getRendererName() , (m_featureLevel >> 12) & 0xf @@ -5648,10 +6438,6 @@ data.NumQualityLevels = 0; ); #if BX_PLATFORM_WINDOWS - DXGI_QUERY_VIDEO_MEMORY_INFO vmi[2]; - DX_CHECK(m_adapter->QueryVideoMemoryInfo(0, DXGI_MEMORY_SEGMENT_GROUP_LOCAL, &vmi[0]) ); - DX_CHECK(m_adapter->QueryVideoMemoryInfo(0, DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL, &vmi[1]) ); - for (uint32_t ii = 0; ii < BX_COUNTOF(vmi); ++ii) { const DXGI_QUERY_VIDEO_MEMORY_INFO& memInfo = vmi[ii]; @@ -5679,13 +6465,13 @@ data.NumQualityLevels = 0; #endif // BX_PLATFORM_WINDOWS pos = 10; - tvm.printf(10, pos++, 0x8e, " Frame: % 7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " + tvm.printf(10, pos++, 0x8b, " Frame: % 7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " , double(frameTime)*toMs , double(min)*toMs , double(max)*toMs , freq/frameTime ); - tvm.printf(10, pos++, 0x8e, " Present: % 7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] " + tvm.printf(10, pos++, 0x8b, " Present: % 7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] " , double(m_presentElapsed)*toMs , double(presentMin)*toMs , double(presentMax)*toMs @@ -5695,7 +6481,7 @@ data.NumQualityLevels = 0; bx::snprintf(hmd, BX_COUNTOF(hmd), ", [%c] HMD ", hmdEnabled ? '\xfe' : ' '); const uint32_t msaa = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT; - tvm.printf(10, pos++, 0x8e, " Reset flags: [%c] vsync, [%c] MSAAx%d%s, [%c] MaxAnisotropy " + tvm.printf(10, pos++, 0x8b, " Reset flags: [%c] vsync, [%c] MSAAx%d%s, [%c] MaxAnisotropy " , !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? '\xfe' : ' ' , 0 != msaa ? '\xfe' : ' ' , 1<m_num + double elapsedCpuMs = double(frameTime)*toMs; + tvm.printf(10, pos++, 0x8b, " Submitted: %5d (draw %5d, compute %4d) / CPU %7.4f [ms] " + , _render->m_numRenderItems , statsKeyType[0] , statsKeyType[1] , elapsedCpuMs @@ -5713,7 +6499,7 @@ data.NumQualityLevels = 0; for (uint32_t ii = 0; ii < BX_COUNTOF(s_primName); ++ii) { - tvm.printf(10, pos++, 0x8e, " %9s: %7d (#inst: %5d), submitted: %7d " + tvm.printf(10, pos++, 0x8b, " %9s: %7d (#inst: %5d), submitted: %7d " , s_primName[ii] , statsNumPrimsRendered[ii] , statsNumInstances[ii] @@ -5721,13 +6507,13 @@ data.NumQualityLevels = 0; ); } - tvm.printf(10, pos++, 0x8e, " Batch: %7dx%d indirect, %7d immediate " + tvm.printf(10, pos++, 0x8b, " Batch: %7dx%d indirect, %7d immediate " , m_batch.m_stats.m_numIndirect[BatchD3D12::Draw] , m_batch.m_maxDrawPerBatch , m_batch.m_stats.m_numImmediate[BatchD3D12::Draw] ); - tvm.printf(10, pos++, 0x8e, " %7dx%d indirect, %7d immediate " + tvm.printf(10, pos++, 0x8b, " %7dx%d indirect, %7d immediate " , m_batch.m_stats.m_numIndirect[BatchD3D12::DrawIndexed] , m_batch.m_maxDrawPerBatch , m_batch.m_stats.m_numImmediate[BatchD3D12::DrawIndexed] @@ -5738,15 +6524,15 @@ data.NumQualityLevels = 0; tvm.printf(tvm.m_width-27, 0, 0x1f, " [F11 - RenderDoc capture] "); } - tvm.printf(10, pos++, 0x8e, " Indices: %7d ", statsNumIndices); - tvm.printf(10, pos++, 0x8e, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); - tvm.printf(10, pos++, 0x8e, " DVB size: %7d ", _render->m_vboffset); - tvm.printf(10, pos++, 0x8e, " DIB size: %7d ", _render->m_iboffset); + tvm.printf(10, pos++, 0x8b, " Indices: %7d ", statsNumIndices); +// tvm.printf(10, pos++, 0x8b, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); + tvm.printf(10, pos++, 0x8b, " DVB size: %7d ", _render->m_vboffset); + tvm.printf(10, pos++, 0x8b, " DIB size: %7d ", _render->m_iboffset); pos++; - tvm.printf(10, pos++, 0x8e, " State cache: "); - tvm.printf(10, pos++, 0x8e, " PSO | Sampler | Bind | Queued "); - tvm.printf(10, pos++, 0x8e, " %6d | %6d | %6d | %6d " + tvm.printf(10, pos++, 0x8b, " State cache: "); + tvm.printf(10, pos++, 0x8b, " PSO | Sampler | Bind | Queued "); + tvm.printf(10, pos++, 0x8b, " %6d | %6d | %6d | %6d " , m_pipelineStateCache.getCount() , m_samplerStateCache.getCount() , bindLru.getCount() @@ -5755,9 +6541,9 @@ data.NumQualityLevels = 0; pos++; double captureMs = double(captureElapsed)*toMs; - tvm.printf(10, pos++, 0x8e, " Capture: %7.4f [ms] ", captureMs); + tvm.printf(10, pos++, 0x8b, " Capture: %7.4f [ms] ", captureMs); - uint8_t attr[2] = { 0x89, 0x8a }; + uint8_t attr[2] = { 0x8c, 0x8a }; uint8_t attrIndex = _render->m_waitSubmit < _render->m_waitRender; tvm.printf(10, pos++, attr[attrIndex&1], " Submit wait: %7.4f [ms] ", _render->m_waitSubmit*toMs); @@ -5771,22 +6557,34 @@ data.NumQualityLevels = 0; blit(this, _textVideoMemBlitter, tvm); -// PIX_ENDEVENT(); + PIX3_ENDEVENT(m_commandList); } else if (_render->m_debug & BGFX_DEBUG_TEXT) { -// PIX_BEGINEVENT(D3DCOLOR_FRAME, L"debugtext"); + PIX3_BEGINEVENT(m_commandList, D3DCOLOR_FRAME, "debugtext"); blit(this, _textVideoMemBlitter, _render->m_textVideoMem); -// PIX_ENDEVENT(); + PIX3_ENDEVENT(m_commandList); } + m_commandList->OMSetRenderTargets(0, NULL, false, NULL); + setResourceBarrier(m_commandList , m_backBufferColor[m_backBufferColorIdx] , D3D12_RESOURCE_STATE_RENDER_TARGET , D3D12_RESOURCE_STATE_PRESENT ); + +#if BX_PLATFORM_WINDOWS + for (uint32_t ii = 1, num = m_numWindows; ii < num; ++ii) + { + FrameBufferD3D12& frameBuffer = m_frameBuffers[m_windows[ii].idx]; + uint8_t idx = uint8_t(frameBuffer.m_swapChain->GetCurrentBackBufferIndex() ); + frameBuffer.setState(m_commandList, idx, D3D12_RESOURCE_STATE_PRESENT); + } +#endif // BX_PLATFORM_WINDOWS + m_backBufferColorFence[m_backBufferColorIdx] = kick(); } @@ -5796,8 +6594,9 @@ data.NumQualityLevels = 0; namespace bgfx { namespace d3d12 { - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { + BX_UNUSED(_init); return NULL; } diff --git a/3rdparty/bgfx/src/renderer_d3d12.h b/3rdparty/bgfx/src/renderer_d3d12.h index 25de46c..92fffc0 100644 --- a/3rdparty/bgfx/src/renderer_d3d12.h +++ b/3rdparty/bgfx/src/renderer_d3d12.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -9,10 +9,14 @@ #define USE_D3D12_DYNAMIC_LIB BX_PLATFORM_WINDOWS #include -#if BX_PLATFORM_XBOXONE -# include +#if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT +# include +# include #else -# include +# if !BGFX_CONFIG_DEBUG +# define D3DCOMPILE_NO_DEBUG 1 +# endif // !BGFX_CONFIG_DEBUG +# include #endif // BX_PLATFORM_XBOXONE #if defined(__MINGW32__) // BK - temp workaround for MinGW until I nuke d3dx12 usage. @@ -39,7 +43,7 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wmissing-field-initializers"); BX_PRAGMA_DIAGNOSTIC_POP(); #if BX_PLATFORM_WINDOWS -# include +# include #endif // BX_PLATFORM_WINDOWS #ifndef D3D12_TEXTURE_DATA_PITCH_ALIGNMENT @@ -51,8 +55,58 @@ BX_PRAGMA_DIAGNOSTIC_POP(); #include "shader_dxbc.h" #include "debug_renderdoc.h" +#if BGFX_CONFIG_DEBUG_PIX +# if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT +typedef struct PIXEventsThreadInfo* (WINAPI* PFN_PIX_GET_THREAD_INFO)(); +typedef uint64_t (WINAPI* PFN_PIX_EVENTS_REPLACE_BLOCK)(bool _getEarliestTime); + +extern PFN_PIX_GET_THREAD_INFO bgfx_PIXGetThreadInfo; +extern PFN_PIX_EVENTS_REPLACE_BLOCK bgfx_PIXEventsReplaceBlock; + +# define PIXGetThreadInfo bgfx_PIXGetThreadInfo +# define PIXEventsReplaceBlock bgfx_PIXEventsReplaceBlock +# else +extern "C" struct PIXEventsThreadInfo* WINAPI bgfx_PIXGetThreadInfo(); +extern "C" uint64_t WINAPI bgfx_PIXEventsReplaceBlock(bool _getEarliestTime); +# endif // BX_PLATFORM_WINDOWS + +# include + +# define _PIX3_BEGINEVENT(_commandList, _color, _name) PIXBeginEvent(_commandList, _color, _name) +# define _PIX3_SETMARKER(_commandList, _color, _name) PIXSetMarker(_commandList, _color, _name) +# define _PIX3_ENDEVENT(_commandList) PIXEndEvent(_commandList) + +# define PIX3_BEGINEVENT(_commandList, _color, _name) _PIX3_BEGINEVENT(_commandList, _color, _name) +# define PIX3_SETMARKER(_commandList, _color, _name) _PIX3_SETMARKER(_commandList, _color, _name) +# define PIX3_ENDEVENT(_commandList) _PIX3_ENDEVENT(_commandList) +#else +# define PIX3_BEGINEVENT(_commandList, _color, _name) BX_UNUSED(_commandList, _color, _name) +# define PIX3_SETMARKER(_commandList, _color, _name) BX_UNUSED(_commandList, _color, _name) +# define PIX3_ENDEVENT(_commandList) BX_UNUSED(_commandList) +#endif // BGFX_CONFIG_DEBUG_PIX + namespace bgfx { namespace d3d12 { +#if BX_PLATFORM_WINDOWS + typedef ::DXGI_SWAP_CHAIN_DESC DXGI_SWAP_CHAIN_DESC; +#else + typedef ::DXGI_SWAP_CHAIN_DESC1 DXGI_SWAP_CHAIN_DESC; +#endif // BX_PLATFORM_WINDOWS + +#if BX_PLATFORM_WINDOWS + typedef ::IDXGIAdapter3 AdapterI; + typedef ::IDXGIFactory4 FactoryI; + typedef ::IDXGISwapChain3 SwapChainI; +#elif BX_PLATFORM_WINRT + typedef ::IDXGIAdapter AdapterI; + typedef ::IDXGIFactory2 FactoryI; + typedef ::IDXGISwapChain1 SwapChainI; +#else + typedef ::IDXGIAdapter AdapterI; + typedef ::IDXGIFactory2 FactoryI; + typedef ::IDXGISwapChain1 SwapChainI; +#endif // BX_PLATFORM_WINDOWS + struct Rdt { enum Enum @@ -81,6 +135,8 @@ namespace bgfx { namespace d3d12 void destroy(); void reset(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle); + void allocEmpty(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle); + void* allocCbv(D3D12_GPU_VIRTUAL_ADDRESS& _gpuAddress, uint32_t _size); void allocSrv(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle, struct TextureD3D12& _texture, uint8_t _mip = 0); @@ -268,6 +324,7 @@ namespace bgfx { namespace d3d12 TextureD3D12() : m_ptr(NULL) + , m_directAccessPtr(NULL) , m_state(D3D12_RESOURCE_STATE_COMMON) , m_numMips(0) { @@ -275,7 +332,7 @@ namespace bgfx { namespace d3d12 bx::memSet(&m_uavd, 0, sizeof(m_uavd) ); } - void create(const Memory* _mem, uint32_t _flags, uint8_t _skip); + void* create(const Memory* _mem, uint32_t _flags, uint8_t _skip); void destroy(); void update(ID3D12GraphicsCommandList* _commandList, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem); void resolve(); @@ -284,6 +341,7 @@ namespace bgfx { namespace d3d12 D3D12_SHADER_RESOURCE_VIEW_DESC m_srvd; D3D12_UNORDERED_ACCESS_VIEW_DESC m_uavd; ID3D12Resource* m_ptr; + void* m_directAccessPtr; D3D12_RESOURCE_STATES m_state; uint32_t m_flags; uint32_t m_width; @@ -305,27 +363,33 @@ namespace bgfx { namespace d3d12 , m_denseIdx(UINT16_MAX) , m_num(0) , m_numTh(0) + , m_state(D3D12_RESOURCE_STATE_PRESENT) + , m_needPresent(false) { - m_depth.idx = bgfx::invalidHandle; + m_depth.idx = bgfx::kInvalidHandle; } void create(uint8_t _num, const Attachment* _attachment); void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat); uint16_t destroy(); + HRESULT present(uint32_t _syncInterval, uint32_t _flags); void preReset(); void postReset(); void resolve(); void clear(ID3D12GraphicsCommandList* _commandList, const Clear& _clear, const float _palette[][4], const D3D12_RECT* _rect = NULL, uint32_t _num = 0); + D3D12_RESOURCE_STATES setState(ID3D12GraphicsCommandList* _commandList, uint8_t _idx, D3D12_RESOURCE_STATES _state); TextureHandle m_texture[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS]; TextureHandle m_depth; - IDXGISwapChain* m_swapChain; + SwapChainI* m_swapChain; uint32_t m_width; uint32_t m_height; uint16_t m_denseIdx; uint8_t m_num; uint8_t m_numTh; Attachment m_attachment[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS]; + D3D12_RESOURCE_STATES m_state; + bool m_needPresent; }; struct CommandQueueD3D12 @@ -417,16 +481,16 @@ namespace bgfx { namespace d3d12 struct DrawIndirectCommand { + D3D12_VERTEX_BUFFER_VIEW vbv[BGFX_CONFIG_MAX_VERTEX_STREAMS+1]; D3D12_GPU_VIRTUAL_ADDRESS cbv; - D3D12_VERTEX_BUFFER_VIEW vbv[2]; D3D12_DRAW_ARGUMENTS draw; }; struct DrawIndexedIndirectCommand { - D3D12_GPU_VIRTUAL_ADDRESS cbv; - D3D12_VERTEX_BUFFER_VIEW vbv[2]; + D3D12_VERTEX_BUFFER_VIEW vbv[BGFX_CONFIG_MAX_VERTEX_STREAMS+1]; D3D12_INDEX_BUFFER_VIEW ibv; + D3D12_GPU_VIRTUAL_ADDRESS cbv; D3D12_DRAW_INDEXED_ARGUMENTS drawIndexed; }; @@ -449,24 +513,45 @@ namespace bgfx { namespace d3d12 struct TimerQueryD3D12 { TimerQueryD3D12() - : m_control(4) + : m_control(BX_COUNTOF(m_query) ) { } void init(); void shutdown(); - void begin(ID3D12GraphicsCommandList* _commandList); - void end(ID3D12GraphicsCommandList* _commandList); - bool get(); + uint32_t begin(uint32_t _resultIdx); + void end(uint32_t _idx); + bool update(); + + struct Query + { + uint32_t m_resultIdx; + bool m_ready; + uint64_t m_fence; + }; + + struct Result + { + void reset() + { + m_begin = 0; + m_end = 0; + m_pending = 0; + } + + uint64_t m_begin; + uint64_t m_end; + uint32_t m_pending; + }; - uint64_t m_begin; - uint64_t m_end; - uint64_t m_elapsed; uint64_t m_frequency; + Result m_result[BGFX_CONFIG_MAX_VIEWS+1]; + Query m_query[BGFX_CONFIG_MAX_VIEWS*4]; + ID3D12Resource* m_readback; ID3D12QueryHeap* m_queryHeap; - uint64_t* m_result; + uint64_t* m_queryResult; bx::RingBufferControl m_control; }; diff --git a/3rdparty/bgfx/src/renderer_d3d9.cpp b/3rdparty/bgfx/src/renderer_d3d9.cpp index 7a1c8c7..9fb3b4c 100644 --- a/3rdparty/bgfx/src/renderer_d3d9.cpp +++ b/3rdparty/bgfx/src/renderer_d3d9.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -238,7 +238,7 @@ namespace bgfx { namespace d3d9 { D3DFMT_A4R4G4B4 }, // RGBA4 { D3DFMT_A1R5G5B5 }, // RGB5A1 { D3DFMT_A2B10G10R10 }, // RGB10A2 - { D3DFMT_UNKNOWN }, // R11G11B10F + { D3DFMT_UNKNOWN }, // RG11B10F { D3DFMT_UNKNOWN }, // UnknownDepth { D3DFMT_D16 }, // D16 { D3DFMT_D24X8 }, // D24 @@ -276,6 +276,91 @@ namespace bgfx { namespace d3d9 static PFN_D3DPERF_BEGIN_EVENT D3DPERF_BeginEvent; static PFN_D3DPERF_END_EVENT D3DPERF_EndEvent; + static const D3DVERTEXELEMENT9 s_attrib[] = + { + { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 }, + { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0 }, + { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, 0 }, + { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, 0 }, + { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0 }, + { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 1 }, + { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 2 }, + { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 3 }, + { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BLENDINDICES, 0 }, + { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BLENDWEIGHT, 0 }, + { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 }, + { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1 }, + { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 2 }, + { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 3 }, + { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 4 }, + { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 5 }, + { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 6 }, + { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 7 }, + D3DDECL_END() + }; + BX_STATIC_ASSERT(Attrib::Count == BX_COUNTOF(s_attrib)-1); + + static const uint8_t s_attribType[][4][2] = + { + { // Uint8 + { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, + { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, + { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, + { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, + }, + { // Uint10 + { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, + { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, + { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, + { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, + }, + { // Int16 + { D3DDECLTYPE_SHORT2, D3DDECLTYPE_SHORT2N }, + { D3DDECLTYPE_SHORT2, D3DDECLTYPE_SHORT2N }, + { D3DDECLTYPE_SHORT4, D3DDECLTYPE_SHORT4N }, + { D3DDECLTYPE_SHORT4, D3DDECLTYPE_SHORT4N }, + }, + { // Half + { D3DDECLTYPE_FLOAT16_2, D3DDECLTYPE_FLOAT16_2 }, + { D3DDECLTYPE_FLOAT16_2, D3DDECLTYPE_FLOAT16_2 }, + { D3DDECLTYPE_FLOAT16_4, D3DDECLTYPE_FLOAT16_4 }, + { D3DDECLTYPE_FLOAT16_4, D3DDECLTYPE_FLOAT16_4 }, + }, + { // Float + { D3DDECLTYPE_FLOAT1, D3DDECLTYPE_FLOAT1 }, + { D3DDECLTYPE_FLOAT2, D3DDECLTYPE_FLOAT2 }, + { D3DDECLTYPE_FLOAT3, D3DDECLTYPE_FLOAT3 }, + { D3DDECLTYPE_FLOAT4, D3DDECLTYPE_FLOAT4 }, + }, + }; + BX_STATIC_ASSERT(AttribType::Count == BX_COUNTOF(s_attribType) ); + + static D3DVERTEXELEMENT9* fillVertexDecl(uint8_t _stream, D3DVERTEXELEMENT9* _out, const VertexDecl& _decl) + { + D3DVERTEXELEMENT9* elem = _out; + + for (uint32_t attr = 0; attr < Attrib::Count; ++attr) + { + if (UINT16_MAX != _decl.m_attributes[attr]) + { + uint8_t num; + AttribType::Enum type; + bool normalized; + bool asInt; + _decl.decode(Attrib::Enum(attr), num, type, normalized, asInt); + + bx::memCopy(elem, &s_attrib[attr], sizeof(D3DVERTEXELEMENT9) ); + + elem->Stream = _stream; + elem->Type = s_attribType[type][num-1][normalized]; + elem->Offset = _decl.m_offset[attr]; + ++elem; + } + } + + return elem; + } + inline bool isLost(HRESULT _hr) { return false @@ -314,7 +399,7 @@ namespace bgfx { namespace d3d9 { } - bool init() + bool init(const Init& _init) { struct ErrorState { @@ -329,7 +414,7 @@ namespace bgfx { namespace d3d9 ErrorState::Enum errorState = ErrorState::Default; - m_fbh.idx = invalidHandle; + m_fbh.idx = kInvalidHandle; bx::memSet(m_uniforms, 0, sizeof(m_uniforms) ); bx::memSet(&m_resolution, 0, sizeof(m_resolution) ); @@ -337,8 +422,8 @@ namespace bgfx { namespace d3d9 // http://msdn.microsoft.com/en-us/library/windows/desktop/bb172588%28v=vs.85%29.aspx bx::memSet(&m_params, 0, sizeof(m_params) ); - m_params.BackBufferWidth = BGFX_DEFAULT_WIDTH; - m_params.BackBufferHeight = BGFX_DEFAULT_HEIGHT; + m_params.BackBufferWidth = _init.resolution.m_width; + m_params.BackBufferHeight = _init.resolution.m_height; m_params.BackBufferFormat = adapterFormat; m_params.BackBufferCount = 1; m_params.MultiSampleType = D3DMULTISAMPLE_NONE; @@ -346,7 +431,7 @@ namespace bgfx { namespace d3d9 m_params.EnableAutoDepthStencil = TRUE; m_params.AutoDepthStencilFormat = D3DFMT_D24S8; m_params.Flags = D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL; -#if BX_PLATFORM_WINDOWS + m_params.FullScreen_RefreshRateInHz = 0; m_params.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; m_params.SwapEffect = D3DSWAPEFFECT_DISCARD; @@ -362,12 +447,14 @@ namespace bgfx { namespace d3d9 if (NULL == m_d3d9dll) { - BX_TRACE("Failed to load d3d9.dll."); + BX_TRACE("Init error: Failed to load d3d9.dll."); goto error; } errorState = ErrorState::LoadedD3D9; + m_nvapi.init(); + if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) { D3DPERF_SetMarker = (PFN_D3DPERF_SET_MARKER )bx::dlsym(m_d3d9dll, "D3DPERF_SetMarker"); @@ -410,7 +497,7 @@ namespace bgfx { namespace d3d9 if (NULL == Direct3DCreate9) { - BX_TRACE("Function Direct3DCreate9 not found."); + BX_TRACE("Init error: Function Direct3DCreate9 not found."); goto error; } @@ -420,7 +507,7 @@ namespace bgfx { namespace d3d9 if (NULL == m_d3d9) { - BX_TRACE("Unable to create Direct3D."); + BX_TRACE("Init error: Unable to create Direct3D."); goto error; } @@ -464,7 +551,7 @@ namespace bgfx { namespace d3d9 } if (BX_ENABLED(BGFX_CONFIG_DEBUG_PERFHUD) - && 0 != bx::strnstr(desc.Description, "PerfHUD") ) + && 0 != bx::strFind(desc.Description, "PerfHUD") ) { m_adapter = ii; m_deviceType = D3DDEVTYPE_REF; @@ -519,7 +606,7 @@ namespace bgfx { namespace d3d9 if (NULL == m_device) { - BX_TRACE("Unable to create Direct3D9 device."); + BX_TRACE("Init error: Unable to create Direct3D9 device."); goto error; } @@ -569,6 +656,7 @@ namespace bgfx { namespace d3d9 || (D3DPTEXTURECAPS_ALPHA & m_caps.TextureCaps) != D3DPTEXTURECAPS_ALPHA || !(m_caps.VertexShaderVersion >= D3DVS_VERSION(2, 0) && m_caps.PixelShaderVersion >= D3DPS_VERSION(2, 1) ) ) { + BX_TRACE("Init error: Min spec not satisfied."); goto error; } @@ -578,6 +666,7 @@ namespace bgfx { namespace d3d9 BX_TRACE("Max fragment shader 3.0 instr. slots: %d", m_caps.MaxPixelShader30InstructionSlots); BX_TRACE("Num simultaneous render targets: %d", m_caps.NumSimultaneousRTs); BX_TRACE("Max vertex index: %d", m_caps.MaxVertexIndex); + BX_TRACE("Max streams: %d", m_caps.MaxStreams); g_caps.supported |= ( 0 | BGFX_CAPS_TEXTURE_3D @@ -591,12 +680,14 @@ namespace bgfx { namespace d3d9 | BGFX_CAPS_TEXTURE_READ_BACK | (m_occlusionQuerySupport ? BGFX_CAPS_OCCLUSION_QUERY : 0) ); - g_caps.limits.maxTextureSize = uint16_t(bx::uint32_min(m_caps.MaxTextureWidth, m_caps.MaxTextureHeight) ); - m_caps.NumSimultaneousRTs = uint8_t(bx::uint32_min(m_caps.NumSimultaneousRTs, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) ); + m_caps.NumSimultaneousRTs = bx::uint32_min(m_caps.NumSimultaneousRTs, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS); + m_caps.MaxStreams = bx::uint32_min(m_caps.MaxStreams, BGFX_CONFIG_MAX_VERTEX_STREAMS); + m_caps.MaxAnisotropy = bx::uint32_max(m_caps.MaxAnisotropy, 1); + + g_caps.limits.maxTextureSize = uint16_t(bx::uint32_min(m_caps.MaxTextureWidth, m_caps.MaxTextureHeight) ); g_caps.limits.maxFBAttachments = uint8_t(m_caps.NumSimultaneousRTs); - - m_caps.MaxAnisotropy = bx::uint32_max(m_caps.MaxAnisotropy, 1); + g_caps.limits.maxVertexStreams = uint8_t(m_caps.MaxStreams); if (BX_ENABLED(BGFX_CONFIG_RENDERER_USE_EXTENSIONS) ) { @@ -727,37 +818,6 @@ namespace bgfx { namespace d3d9 m_fmtDepth = D3DFMT_D24S8; -#elif BX_PLATFORM_XBOX360 - m_params.PresentationInterval = D3DPRESENT_INTERVAL_ONE; - m_params.DisableAutoBackBuffer = FALSE; - m_params.DisableAutoFrontBuffer = FALSE; - m_params.FrontBufferFormat = D3DFMT_X8R8G8B8; - m_params.FrontBufferColorSpace = D3DCOLORSPACE_RGB; - - m_d3d9 = Direct3DCreate9(D3D_SDK_VERSION); - BX_TRACE("Creating D3D9 %p", m_d3d9); - - XVIDEO_MODE videoMode; - XGetVideoMode(&videoMode); - if (!videoMode.fIsWideScreen) - { - m_params.Flags |= D3DPRESENTFLAG_NO_LETTERBOX; - } - - BX_TRACE("Creating device"); - DX_CHECK(m_d3d9->CreateDevice(m_adapter - , m_deviceType - , NULL - , D3DCREATE_HARDWARE_VERTEXPROCESSING|D3DCREATE_BUFFER_2_FRAMES - , &m_params - , &m_device - ) ); - - BX_TRACE("Device %p", m_device); - - m_fmtDepth = D3DFMT_D24FS8; -#endif // BX_PLATFORM_WINDOWS - { IDirect3DSwapChain9* swapChain; DX_CHECK(m_device->GetSwapChain(0, &swapChain) ); @@ -809,6 +869,7 @@ namespace bgfx { namespace d3d9 { DX_RELEASE(m_device, 0); } + BX_FALLTHROUGH; case ErrorState::CreatedD3D9: if (NULL != m_d3d9ex) @@ -820,11 +881,12 @@ namespace bgfx { namespace d3d9 { DX_RELEASE(m_d3d9, 0); } + BX_FALLTHROUGH; -#if BX_PLATFORM_WINDOWS case ErrorState::LoadedD3D9: + m_nvapi.shutdown(); bx::dlclose(m_d3d9dll); -#endif // BX_PLATFORM_WINDOWS + BX_FALLTHROUGH; case ErrorState::Default: break; @@ -857,11 +919,6 @@ namespace bgfx { namespace d3d9 m_textures[ii].destroy(); } - for (uint32_t ii = 0; ii < BX_COUNTOF(m_vertexDecls); ++ii) - { - m_vertexDecls[ii].destroy(); - } - if (NULL != m_d3d9ex) { DX_RELEASE(m_deviceEx, 1); @@ -875,19 +932,18 @@ namespace bgfx { namespace d3d9 DX_RELEASE(m_d3d9, 0); } -#if BX_PLATFORM_WINDOWS + m_nvapi.shutdown(); bx::dlclose(m_d3d9dll); -#endif // BX_PLATFORM_WINDOWS m_initialized = false; } - RendererType::Enum getRendererType() const BX_OVERRIDE + RendererType::Enum getRendererType() const override { return RendererType::Direct3D9; } - const char* getRendererName() const BX_OVERRIDE + const char* getRendererName() const override { if (NULL != m_d3d9ex) { @@ -897,110 +953,112 @@ namespace bgfx { namespace d3d9 return BGFX_RENDERER_DIRECT3D9_NAME; } - void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) BX_OVERRIDE + void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_mem->size, _mem->data, _flags); } - void destroyIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) BX_OVERRIDE + void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) override { - m_vertexDecls[_handle.idx].create(_decl); + VertexDecl& decl = m_vertexDecls[_handle.idx]; + bx::memCopy(&decl, &_decl, sizeof(VertexDecl) ); + dump(decl); } - void destroyVertexDecl(VertexDeclHandle _handle) BX_OVERRIDE + void destroyVertexDecl(VertexDeclHandle /*_handle*/) override { - m_vertexDecls[_handle.idx].destroy(); } - void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t /*_flags*/) BX_OVERRIDE + void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t /*_flags*/) override { m_vertexBuffers[_handle.idx].create(_mem->size, _mem->data, _declHandle); } - void destroyVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_size, NULL, _flags); } - void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { m_indexBuffers[_handle.idx].update(_offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t /*_flags*/) BX_OVERRIDE + void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t /*_flags*/) override { VertexDeclHandle decl = BGFX_INVALID_HANDLE; m_vertexBuffers[_handle.idx].create(_size, NULL, decl); } - void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { m_vertexBuffers[_handle.idx].update(_offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createShader(ShaderHandle _handle, Memory* _mem) BX_OVERRIDE + void createShader(ShaderHandle _handle, Memory* _mem) override { m_shaders[_handle.idx].create(_mem); } - void destroyShader(ShaderHandle _handle) BX_OVERRIDE + void destroyShader(ShaderHandle _handle) override { m_shaders[_handle.idx].destroy(); } - void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) BX_OVERRIDE + void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) override { m_program[_handle.idx].create(m_shaders[_vsh.idx], m_shaders[_fsh.idx]); } - void destroyProgram(ProgramHandle _handle) BX_OVERRIDE + void destroyProgram(ProgramHandle _handle) override { m_program[_handle.idx].destroy(); } - void createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) BX_OVERRIDE + void* createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) override { m_textures[_handle.idx].create(_mem, _flags, _skip); + return NULL; } - void updateTextureBegin(TextureHandle _handle, uint8_t _side, uint8_t _mip) BX_OVERRIDE + void updateTextureBegin(TextureHandle _handle, uint8_t _side, uint8_t _mip) override { m_updateTexture = &m_textures[_handle.idx]; m_updateTexture->updateBegin(_side, _mip); } - void updateTexture(TextureHandle /*_handle*/, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) BX_OVERRIDE + void updateTexture(TextureHandle /*_handle*/, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) override { m_updateTexture->update(_side, _mip, _rect, _z, _depth, _pitch, _mem); } - void updateTextureEnd() BX_OVERRIDE + void updateTextureEnd() override { m_updateTexture->updateEnd(); m_updateTexture = NULL; } - void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) BX_OVERRIDE + void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) override { TextureD3D9& texture = m_textures[_handle.idx]; @@ -1033,7 +1091,7 @@ namespace bgfx { namespace d3d9 DX_CHECK(texture.m_texture2d->UnlockRect(_mip) ); } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) override { TextureD3D9& texture = m_textures[_handle.idx]; @@ -1061,7 +1119,7 @@ namespace bgfx { namespace d3d9 release(mem); } - void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE + void overrideInternal(TextureHandle _handle, uintptr_t _ptr) override { // Resource ref. counts might be messed up outside of bgfx. // Disabling ref. count check once texture is overridden. @@ -1069,7 +1127,7 @@ namespace bgfx { namespace d3d9 m_textures[_handle.idx].overrideInternal(_ptr); } - uintptr_t getInternal(TextureHandle _handle) BX_OVERRIDE + uintptr_t getInternal(TextureHandle _handle) override { // Resource ref. counts might be messed up outside of bgfx. // Disabling ref. count check once texture is overridden. @@ -1077,24 +1135,24 @@ namespace bgfx { namespace d3d9 return uintptr_t(m_textures[_handle.idx].m_ptr); } - void destroyTexture(TextureHandle _handle) BX_OVERRIDE + void destroyTexture(TextureHandle _handle) override { m_textures[_handle.idx].destroy(); } - void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) override { m_frameBuffers[_handle.idx].create(_num, _attachment); } - void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) override { uint16_t denseIdx = m_numWindows++; m_windows[denseIdx] = _handle; m_frameBuffers[_handle.idx].create(denseIdx, _nwh, _width, _height, _depthFormat); } - void destroyFrameBuffer(FrameBufferHandle _handle) BX_OVERRIDE + void destroyFrameBuffer(FrameBufferHandle _handle) override { uint16_t denseIdx = m_frameBuffers[_handle.idx].destroy(); if (UINT16_MAX != denseIdx) @@ -1109,7 +1167,7 @@ namespace bgfx { namespace d3d9 } } - void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) BX_OVERRIDE + void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) override { if (NULL != m_uniforms[_handle.idx]) { @@ -1123,16 +1181,15 @@ namespace bgfx { namespace d3d9 m_uniformReg.add(_handle, _name, data); } - void destroyUniform(UniformHandle _handle) BX_OVERRIDE + void destroyUniform(UniformHandle _handle) override { BX_FREE(g_allocator, m_uniforms[_handle.idx]); m_uniforms[_handle.idx] = NULL; m_uniformReg.remove(_handle); } - void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) BX_OVERRIDE + void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) override { -#if BX_PLATFORM_WINDOWS IDirect3DSwapChain9* swapChain = isValid(_handle) ? m_frameBuffers[_handle.idx].m_swapChain : m_swapChain @@ -1196,12 +1253,9 @@ namespace bgfx { namespace d3d9 DX_CHECK(surface->UnlockRect() ); DX_RELEASE(surface, 0); -#else - BX_UNUSED(_handle, _filePath); -#endif // BX_PLATFORM_WINDOWS } - void updateViewName(uint8_t _id, const char* _name) BX_OVERRIDE + void updateViewName(ViewId _id, const char* _name) override { if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) { @@ -1211,18 +1265,18 @@ namespace bgfx { namespace d3d9 ); } - bx::strlcpy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] - , _name + bx::strCopy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] , BX_COUNTOF(s_viewName[0]) - BGFX_CONFIG_MAX_VIEW_NAME_RESERVED + , _name ); } - void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) BX_OVERRIDE + void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) override { bx::memCopy(m_uniforms[_loc], _data, _size); } - void setMarker(const char* _marker, uint32_t _size) BX_OVERRIDE + void setMarker(const char* _marker, uint32_t _size) override { #if BGFX_CONFIG_DEBUG_PIX uint32_t size = _size*sizeof(wchar_t); @@ -1233,14 +1287,21 @@ namespace bgfx { namespace d3d9 BX_UNUSED(_marker, _size); } - void invalidateOcclusionQuery(OcclusionQueryHandle _handle) BX_OVERRIDE + void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override { m_occlusionQuery.invalidate(_handle); } - void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) BX_OVERRIDE; + virtual void setName(Handle _handle, const char* _name) override + { + BX_UNUSED(_handle, _name) + } - void blitSetup(TextVideoMemBlitter& _blitter) BX_OVERRIDE + void submitBlit(BlitState& _bs, uint16_t _view); + + void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) override; + + void blitSetup(TextVideoMemBlitter& _blitter) override { uint32_t width = m_params.BackBufferWidth; uint32_t height = m_params.BackBufferHeight; @@ -1272,15 +1333,15 @@ namespace bgfx { namespace d3d9 DX_CHECK(device->SetPixelShader(program.m_fsh->m_pixelShader) ); VertexBufferD3D9& vb = m_vertexBuffers[_blitter.m_vb->handle.idx]; - VertexDeclD3D9& vertexDecl = m_vertexDecls[_blitter.m_vb->decl.idx]; - DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, vertexDecl.m_decl.m_stride) ); - DX_CHECK(device->SetVertexDeclaration(vertexDecl.m_ptr) ); + VertexDecl& vertexDecl = m_vertexDecls[_blitter.m_vb->decl.idx]; + DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, vertexDecl.m_stride) ); + setInputLayout(vertexDecl, 0); IndexBufferD3D9& ib = m_indexBuffers[_blitter.m_ib->handle.idx]; DX_CHECK(device->SetIndices(ib.m_ptr) ); float proj[16]; - bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f); + bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f, 0.0f, false); PredefinedUniform& predefined = program.m_predefined[0]; uint8_t flags = predefined.m_type; @@ -1289,7 +1350,7 @@ namespace bgfx { namespace d3d9 m_textures[_blitter.m_texture.idx].commit(0, BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER, NULL); } - void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) BX_OVERRIDE + void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) override { const uint32_t numVertices = _numIndices*4/6; if (0 < numVertices) @@ -1360,7 +1421,6 @@ namespace bgfx { namespace d3d9 m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height); m_textVideoMem.clear(); -#if BX_PLATFORM_WINDOWS D3DDEVICE_CREATION_PARAMETERS dcp; DX_CHECK(m_device->GetCreationParameters(&dcp) ); @@ -1368,7 +1428,6 @@ namespace bgfx { namespace d3d9 DX_CHECK(m_d3d9->GetAdapterDisplayMode(dcp.AdapterOrdinal, &dm) ); m_params.BackBufferFormat = dm.Format; -#endif // BX_PLATFORM_WINDOWS m_params.BackBufferWidth = _resolution.m_width; m_params.BackBufferHeight = _resolution.m_height; @@ -1459,12 +1518,12 @@ namespace bgfx { namespace d3d9 m_flushQuery->GetData(NULL, 0, D3DGETDATA_FLUSH); } - bool isDeviceRemoved() BX_OVERRIDE + bool isDeviceRemoved() override { return false; } - void flip(HMD& /*_hmd*/) BX_OVERRIDE + void flip(HMD& /*_hmd*/) override { if (NULL != m_swapChain) { @@ -1493,7 +1552,6 @@ namespace bgfx { namespace d3d9 hr = m_frameBuffers[m_windows[ii].idx].present(); } -#if BX_PLATFORM_WINDOWS if (isLost(hr) ) { do @@ -1515,7 +1573,6 @@ namespace bgfx { namespace d3d9 { BX_TRACE("Present failed with err 0x%08x.", hr); } -#endif // BX_PLATFORM_ } } } @@ -1525,6 +1582,7 @@ namespace bgfx { namespace d3d9 m_needPresent = false; invalidateSamplerState(); + m_inputLayoutCache.invalidate(); for (uint32_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage) { @@ -1991,7 +2049,7 @@ namespace bgfx { namespace d3d9 } VertexBufferD3D9& vb = m_vertexBuffers[_clearQuad.m_vb->handle.idx]; - VertexDeclD3D9& vertexDecl = m_vertexDecls[_clearQuad.m_vb->decl.idx]; + VertexDecl& vertexDecl = m_vertexDecls[_clearQuad.m_vb->decl.idx]; uint32_t stride = _clearQuad.m_decl.m_stride; { @@ -2061,7 +2119,7 @@ namespace bgfx { namespace d3d9 DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, stride) ); DX_CHECK(device->SetStreamSourceFreq(0, 1) ); DX_CHECK(device->SetStreamSource(1, NULL, 0, 0) ); - DX_CHECK(device->SetVertexDeclaration(vertexDecl.m_ptr) ); + setInputLayout(vertexDecl, 0); DX_CHECK(device->SetIndices(NULL) ); DX_CHECK(device->DrawPrimitive(D3DPT_TRIANGLESTRIP , 0 @@ -2070,9 +2128,55 @@ namespace bgfx { namespace d3d9 } } -#if BX_PLATFORM_WINDOWS + void setInputLayout(uint8_t _numStreams, const VertexDecl** _vertexDecls, uint16_t _numInstanceData) + { + bx::HashMurmur2A murmur; + murmur.begin(); + murmur.add(_numInstanceData); + for (uint8_t stream = 0; stream < _numStreams; ++stream) + { + murmur.add(_vertexDecls[stream]->m_hash); + } + uint64_t layoutHash = murmur.end(); + + IDirect3DVertexDeclaration9* layout = m_inputLayoutCache.find(layoutHash); + if (NULL == layout) + { + D3DVERTEXELEMENT9 vertexElements[Attrib::Count+1+BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT]; + D3DVERTEXELEMENT9* elem = vertexElements; + + for (uint8_t stream = 0; stream < _numStreams; ++stream) + { + elem = fillVertexDecl(stream, elem, *_vertexDecls[stream]); + } + + const D3DVERTEXELEMENT9 inst = { _numStreams, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 }; + + for (uint8_t ii = 0; ii < _numInstanceData; ++ii) + { + bx::memCopy(elem, &inst, sizeof(D3DVERTEXELEMENT9) ); + elem->UsageIndex = uint8_t(7-ii); // TEXCOORD7 = i_data0, TEXCOORD6 = i_data1, etc. + elem->Offset = ii*16; + ++elem; + } + + bx::memCopy(elem, &s_attrib[Attrib::Count], sizeof(D3DVERTEXELEMENT9) ); + + DX_CHECK(m_device->CreateVertexDeclaration(vertexElements, &layout) ); + + m_inputLayoutCache.add(layoutHash, layout); + } + + DX_CHECK(m_device->SetVertexDeclaration(layout) ); + } + + void setInputLayout(const VertexDecl& _vertexDecl, uint16_t _numInstanceData) + { + const VertexDecl* decls[1] = { &_vertexDecl }; + setInputLayout(BX_COUNTOF(decls), decls, _numInstanceData); + } + D3DCAPS9 m_caps; -#endif // BX_PLATFORM_WINDOWS IDirect3D9Ex* m_d3d9ex; IDirect3DDevice9Ex* m_deviceEx; @@ -2100,6 +2204,7 @@ namespace bgfx { namespace d3d9 IDirect3DVertexDeclaration9* m_instanceDataDecls[BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT]; void* m_d3d9dll; + NvApi m_nvapi; uint32_t m_adapter; D3DDEVTYPE m_deviceType; D3DPRESENT_PARAMETERS m_params; @@ -2122,7 +2227,7 @@ namespace bgfx { namespace d3d9 ShaderD3D9 m_shaders[BGFX_CONFIG_MAX_SHADERS]; ProgramD3D9 m_program[BGFX_CONFIG_MAX_PROGRAMS]; TextureD3D9 m_textures[BGFX_CONFIG_MAX_TEXTURES]; - VertexDeclD3D9 m_vertexDecls[BGFX_CONFIG_MAX_VERTEX_DECLS]; + VertexDecl m_vertexDecls[BGFX_CONFIG_MAX_VERTEX_DECLS]; FrameBufferD3D9 m_frameBuffers[BGFX_CONFIG_MAX_FRAME_BUFFERS]; UniformRegistry m_uniformReg; void* m_uniforms[BGFX_CONFIG_MAX_UNIFORMS]; @@ -2135,6 +2240,8 @@ namespace bgfx { namespace d3d9 uint8_t m_updateTextureSide; uint8_t m_updateTextureMip; + StateCacheT m_inputLayoutCache; + TextVideoMem m_textVideoMem; FrameBufferHandle m_fbh; @@ -2143,10 +2250,10 @@ namespace bgfx { namespace d3d9 static RendererContextD3D9* s_renderD3D9; - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { s_renderD3D9 = BX_NEW(g_allocator, RendererContextD3D9); - if (!s_renderD3D9->init() ) + if (!s_renderD3D9->init(_init) ) { BX_DELETE(g_allocator, s_renderD3D9); s_renderD3D9 = NULL; @@ -2165,15 +2272,15 @@ namespace bgfx { namespace d3d9 { m_size = _size; m_flags = _flags; - m_dynamic = NULL == _data; uint32_t usage = D3DUSAGE_WRITEONLY; D3DPOOL pool = s_renderD3D9->m_pool; - if (m_dynamic) + if (NULL == _data) { usage |= D3DUSAGE_DYNAMIC; pool = D3DPOOL_DEFAULT; + m_dynamic = (uint8_t*)BX_ALLOC(g_allocator, _size); } const D3DFORMAT format = 0 == (_flags & BGFX_BUFFER_INDEX32) @@ -2197,7 +2304,7 @@ namespace bgfx { namespace d3d9 void IndexBufferD3D9::preReset() { - if (m_dynamic) + if (NULL != m_dynamic) { DX_RELEASE(m_ptr, 0); } @@ -2205,7 +2312,7 @@ namespace bgfx { namespace d3d9 void IndexBufferD3D9::postReset() { - if (m_dynamic) + if (NULL != m_dynamic) { const D3DFORMAT format = 0 == (m_flags & BGFX_BUFFER_INDEX32) ? D3DFMT_INDEX16 @@ -2219,6 +2326,8 @@ namespace bgfx { namespace d3d9 , &m_ptr , NULL ) ); + + update(0, m_size, m_dynamic); } } @@ -2226,24 +2335,24 @@ namespace bgfx { namespace d3d9 { m_size = _size; m_decl = _declHandle; - m_dynamic = NULL == _data; uint32_t usage = D3DUSAGE_WRITEONLY; D3DPOOL pool = s_renderD3D9->m_pool; - if (m_dynamic) + if (NULL == _data) { usage |= D3DUSAGE_DYNAMIC; pool = D3DPOOL_DEFAULT; + m_dynamic = (uint8_t*)BX_ALLOC(g_allocator, _size); } DX_CHECK(s_renderD3D9->m_device->CreateVertexBuffer(m_size - , usage - , 0 - , pool - , &m_ptr - , NULL - ) ); + , usage + , 0 + , pool + , &m_ptr + , NULL + ) ); if (NULL != _data) { @@ -2253,7 +2362,7 @@ namespace bgfx { namespace d3d9 void VertexBufferD3D9::preReset() { - if (m_dynamic) + if (NULL != m_dynamic) { DX_RELEASE(m_ptr, 0); } @@ -2261,129 +2370,20 @@ namespace bgfx { namespace d3d9 void VertexBufferD3D9::postReset() { - if (m_dynamic) + if (NULL != m_dynamic) { DX_CHECK(s_renderD3D9->m_device->CreateVertexBuffer(m_size - , D3DUSAGE_WRITEONLY|D3DUSAGE_DYNAMIC - , 0 - , D3DPOOL_DEFAULT - , &m_ptr - , NULL - ) ); + , D3DUSAGE_WRITEONLY|D3DUSAGE_DYNAMIC + , 0 + , D3DPOOL_DEFAULT + , &m_ptr + , NULL + ) ); + + update(0, m_size, m_dynamic); } } - static const D3DVERTEXELEMENT9 s_attrib[] = - { - { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, 0 }, - { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0 }, - { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 1 }, - { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BLENDINDICES, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BLENDWEIGHT, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 2 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 3 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 4 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 5 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 6 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 7 }, - D3DDECL_END() - }; - BX_STATIC_ASSERT(Attrib::Count == BX_COUNTOF(s_attrib)-1); - - static const uint8_t s_attribType[][4][2] = - { - { // Uint8 - { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, - { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, - { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, - { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, - }, - { // Uint10 - { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, - { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, - { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, - { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, - }, - { // Int16 - { D3DDECLTYPE_SHORT2, D3DDECLTYPE_SHORT2N }, - { D3DDECLTYPE_SHORT2, D3DDECLTYPE_SHORT2N }, - { D3DDECLTYPE_SHORT4, D3DDECLTYPE_SHORT4N }, - { D3DDECLTYPE_SHORT4, D3DDECLTYPE_SHORT4N }, - }, - { // Half - { D3DDECLTYPE_FLOAT16_2, D3DDECLTYPE_FLOAT16_2 }, - { D3DDECLTYPE_FLOAT16_2, D3DDECLTYPE_FLOAT16_2 }, - { D3DDECLTYPE_FLOAT16_4, D3DDECLTYPE_FLOAT16_4 }, - { D3DDECLTYPE_FLOAT16_4, D3DDECLTYPE_FLOAT16_4 }, - }, - { // Float - { D3DDECLTYPE_FLOAT1, D3DDECLTYPE_FLOAT1 }, - { D3DDECLTYPE_FLOAT2, D3DDECLTYPE_FLOAT2 }, - { D3DDECLTYPE_FLOAT3, D3DDECLTYPE_FLOAT3 }, - { D3DDECLTYPE_FLOAT4, D3DDECLTYPE_FLOAT4 }, - }, - }; - BX_STATIC_ASSERT(AttribType::Count == BX_COUNTOF(s_attribType) ); - - static D3DVERTEXELEMENT9* fillVertexDecl(D3DVERTEXELEMENT9* _out, const VertexDecl& _decl) - { - D3DVERTEXELEMENT9* elem = _out; - - for (uint32_t attr = 0; attr < Attrib::Count; ++attr) - { - if (UINT16_MAX != _decl.m_attributes[attr]) - { - uint8_t num; - AttribType::Enum type; - bool normalized; - bool asInt; - _decl.decode(Attrib::Enum(attr), num, type, normalized, asInt); - - bx::memCopy(elem, &s_attrib[attr], sizeof(D3DVERTEXELEMENT9) ); - - elem->Type = s_attribType[type][num-1][normalized]; - elem->Offset = _decl.m_offset[attr]; - ++elem; - } - } - - return elem; - } - - static IDirect3DVertexDeclaration9* createVertexDeclaration(const VertexDecl& _decl, uint16_t _numInstanceData) - { - D3DVERTEXELEMENT9 vertexElements[Attrib::Count+1+BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT]; - D3DVERTEXELEMENT9* elem = fillVertexDecl(vertexElements, _decl); - - const D3DVERTEXELEMENT9 inst = { 1, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 }; - - for (uint8_t ii = 0; ii < _numInstanceData; ++ii) - { - bx::memCopy(elem, &inst, sizeof(D3DVERTEXELEMENT9) ); - elem->UsageIndex = uint8_t(7-ii); // TEXCOORD7 = i_data0, TEXCOORD6 = i_data1, etc. - elem->Offset = ii*16; - ++elem; - } - - bx::memCopy(elem, &s_attrib[Attrib::Count], sizeof(D3DVERTEXELEMENT9) ); - - IDirect3DVertexDeclaration9* ptr; - DX_CHECK(s_renderD3D9->m_device->CreateVertexDeclaration(vertexElements, &ptr) ); - return ptr; - } - - void VertexDeclD3D9::create(const VertexDecl& _decl) - { - bx::memCopy(&m_decl, &_decl, sizeof(VertexDecl) ); - dump(m_decl); - m_ptr = createVertexDeclaration(_decl, 0); - } - void ShaderD3D9::create(const Memory* _mem) { bx::MemoryReader reader(_mem->data, _mem->size); @@ -2488,7 +2488,7 @@ namespace bgfx { namespace d3d9 } } - uint16_t shaderSize; + uint32_t shaderSize; bx::read(&reader, shaderSize); const DWORD* code = (const DWORD*)reader.getDataPtr(); @@ -2932,11 +2932,6 @@ namespace bgfx { namespace d3d9 createTexture(textureWidth, textureHeight, numMips); } - if (imageContainer.m_srgb) - { - m_flags |= BGFX_TEXTURE_SRGB; - } - BX_TRACE("Texture %3d: %s (requested: %s), %dx%d%s%s." , this - s_renderD3D9->m_textures , getName( (TextureFormat::Enum)m_textureFormat) @@ -3456,25 +3451,29 @@ namespace bgfx { namespace d3d9 { IDirect3DDevice9* device = s_renderD3D9->m_device; - for (uint32_t ii = 0; ii < BX_COUNTOF(m_frame); ++ii) + for (uint32_t ii = 0; ii < BX_COUNTOF(m_query); ++ii) { - Frame& frame = m_frame[ii]; + Query& frame = m_query[ii]; DX_CHECK(device->CreateQuery(D3DQUERYTYPE_TIMESTAMPDISJOINT, &frame.m_disjoint) ); DX_CHECK(device->CreateQuery(D3DQUERYTYPE_TIMESTAMP, &frame.m_begin) ); DX_CHECK(device->CreateQuery(D3DQUERYTYPE_TIMESTAMP, &frame.m_end) ); DX_CHECK(device->CreateQuery(D3DQUERYTYPE_TIMESTAMPFREQ, &frame.m_freq) ); } - m_elapsed = 0; - m_frequency = 1; + for (uint32_t ii = 0; ii < BX_COUNTOF(m_result); ++ii) + { + Result& result = m_result[ii]; + result.reset(); + } + m_control.reset(); } void TimerQueryD3D9::preReset() { - for (uint32_t ii = 0; ii < BX_COUNTOF(m_frame); ++ii) + for (uint32_t ii = 0; ii < BX_COUNTOF(m_query); ++ii) { - Frame& frame = m_frame[ii]; + Query& frame = m_query[ii]; DX_RELEASE(frame.m_disjoint, 0); DX_RELEASE(frame.m_begin, 0); DX_RELEASE(frame.m_end, 0); @@ -3482,51 +3481,74 @@ namespace bgfx { namespace d3d9 } } - void TimerQueryD3D9::begin() + uint32_t TimerQueryD3D9::begin(uint32_t _resultIdx) { while (0 == m_control.reserve(1) ) { - get(); + update(); } - Frame& frame = m_frame[m_control.m_current]; - frame.m_disjoint->Issue(D3DISSUE_BEGIN); - frame.m_begin->Issue(D3DISSUE_END); - } + Result& result = m_result[_resultIdx]; + ++result.m_pending; + + const uint32_t idx = m_control.m_current; + Query& query = m_query[idx]; + query.m_resultIdx = _resultIdx; + query.m_ready = false; + + query.m_disjoint->Issue(D3DISSUE_BEGIN); + query.m_begin->Issue(D3DISSUE_END); - void TimerQueryD3D9::end() - { - Frame& frame = m_frame[m_control.m_current]; - frame.m_disjoint->Issue(D3DISSUE_END); - frame.m_freq->Issue(D3DISSUE_END); - frame.m_end->Issue(D3DISSUE_END); m_control.commit(1); + + return idx; } - bool TimerQueryD3D9::get() + void TimerQueryD3D9::end(uint32_t _idx) + { + Query& query = m_query[_idx]; + query.m_ready = true; + + query.m_disjoint->Issue(D3DISSUE_END); + query.m_freq->Issue(D3DISSUE_END); + query.m_end->Issue(D3DISSUE_END); + + while (update() ) + { + } + } + + bool TimerQueryD3D9::update() { if (0 != m_control.available() ) { - Frame& frame = m_frame[m_control.m_read]; + Query& query = m_query[m_control.m_read]; + + if (!query.m_ready) + { + return false; + } uint64_t timeEnd; - const bool flush = BX_COUNTOF(m_frame)-1 == m_control.available(); - HRESULT hr = frame.m_end->GetData(&timeEnd, sizeof(timeEnd), flush ? D3DGETDATA_FLUSH : 0); + const bool flush = BX_COUNTOF(m_query)-1 == m_control.available(); + HRESULT hr = query.m_end->GetData(&timeEnd, sizeof(timeEnd), flush ? D3DGETDATA_FLUSH : 0); if (S_OK == hr || isLost(hr) ) { m_control.consume(1); uint64_t timeBegin; - DX_CHECK(frame.m_begin->GetData(&timeBegin, sizeof(timeBegin), 0) ); + DX_CHECK(query.m_begin->GetData(&timeBegin, sizeof(timeBegin), 0) ); uint64_t freq; - DX_CHECK(frame.m_freq->GetData(&freq, sizeof(freq), 0) ); + DX_CHECK(query.m_freq->GetData(&freq, sizeof(freq), 0) ); - m_frequency = freq; - m_begin = timeBegin; - m_end = timeEnd; - m_elapsed = timeEnd - timeBegin; + Result& result = m_result[query.m_resultIdx]; + --result.m_pending; + + result.m_frequency = freq; + result.m_begin = timeBegin; + result.m_end = timeEnd; return true; } @@ -3605,11 +3627,65 @@ namespace bgfx { namespace d3d9 Query& query = m_query[(m_control.m_read + ii) % size]; if (query.m_handle.idx == _handle.idx) { - query.m_handle.idx = bgfx::invalidHandle; + query.m_handle.idx = bgfx::kInvalidHandle; } } } + void RendererContextD3D9::submitBlit(BlitState& _bs, uint16_t _view) + { + while (_bs.hasItem(_view) ) + { + const BlitItem& blit = _bs.advance(); + + const TextureD3D9& src = m_textures[blit.m_src.idx]; + const TextureD3D9& dst = m_textures[blit.m_dst.idx]; + + uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; + uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; + uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; + uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; + uint32_t width = bx::uint32_min(srcWidth, dstWidth); + uint32_t height = bx::uint32_min(srcHeight, dstHeight); + + RECT srcRect = { LONG(blit.m_srcX), LONG(blit.m_srcY), LONG(blit.m_srcX + width), LONG(blit.m_srcY + height) }; + RECT dstRect = { LONG(blit.m_dstX), LONG(blit.m_dstY), LONG(blit.m_dstX + width), LONG(blit.m_dstY + height) }; + + IDirect3DSurface9* srcSurface = src.getSurface(uint8_t(blit.m_srcZ), blit.m_srcMip); + IDirect3DSurface9* dstSurface = dst.getSurface(uint8_t(blit.m_dstZ), blit.m_dstMip); + + // UpdateSurface (pool src: SYSTEMMEM, dst: DEFAULT) + // s/d T RTT RT + // T y y y + // RTT - - - + // RT - - - + // + // StretchRect (pool src and dst must be DEFAULT) + // s/d T RTT RT + // T - y y + // RTT - y y + // RT - y y + // + // GetRenderTargetData (dst must be SYSTEMMEM) + + bool depth = bimg::isDepth(bimg::TextureFormat::Enum(src.m_textureFormat) ); + HRESULT hr = m_device->StretchRect(srcSurface + , depth ? NULL : &srcRect + , dstSurface + , depth ? NULL : &dstRect + , D3DTEXF_NONE + ); + if (FAILED(hr) ) + { + hr = m_device->GetRenderTargetData(srcSurface, dstSurface); + BX_WARN(SUCCEEDED(hr), "StretchRect and GetRenderTargetData failed %x.", hr); + } + + srcSurface->Release(); + dstSurface->Release(); + } + } + void RendererContextD3D9::submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) { IDirect3DDevice9* device = m_device; @@ -3618,13 +3694,15 @@ namespace bgfx { namespace d3d9 updateResolution(_render->m_resolution); - int64_t elapsed = -bx::getHPCounter(); + int64_t timeBegin = bx::getHPCounter(); int64_t captureElapsed = 0; + uint32_t frameQueryIdx = UINT32_MAX; + device->BeginScene(); if (m_timerQuerySupport) { - m_gpuTimer.begin(); + frameQueryIdx = m_gpuTimer.begin(BGFX_CONFIG_MAX_VIEWS); } if (0 < _render->m_iboffset) @@ -3652,16 +3730,13 @@ namespace bgfx { namespace d3d9 ViewState viewState(_render, false); DX_CHECK(device->SetRenderState(D3DRS_FILLMODE, _render->m_debug&BGFX_DEBUG_WIREFRAME ? D3DFILL_WIREFRAME : D3DFILL_SOLID) ); - uint16_t programIdx = invalidHandle; + uint16_t programIdx = kInvalidHandle; SortKey key; uint16_t view = UINT16_MAX; FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS }; uint32_t blendFactor = 0; - BlitKey blitKey; - blitKey.decode(_render->m_blitKeys[0]); - uint16_t numBlitItems = _render->m_numBlitItems; - uint16_t blitItem = 0; + BlitState bs(_render); uint8_t primIndex; { @@ -3682,6 +3757,13 @@ namespace bgfx { namespace d3d9 invalidateSamplerState(); + Profiler profiler( + _render + , m_gpuTimer + , s_viewName + , m_timerQuerySupport + ); + if (m_occlusionQuerySupport) { m_occlusionQuery.resolve(_render); @@ -3689,7 +3771,7 @@ namespace bgfx { namespace d3d9 if (0 == (_render->m_debug&BGFX_DEBUG_IFH) ) { - for (uint32_t item = 0, numItems = _render->m_num; item < numItems; ++item) + for (uint32_t item = 0, numItems = _render->m_numRenderItems; item < numItems; ++item) { const uint64_t encodedKey = _render->m_sortKeys[item]; const bool isCompute = key.decode(encodedKey, _render->m_viewRemap); @@ -3730,25 +3812,26 @@ namespace bgfx { namespace d3d9 currentState.m_stateFlags = newFlags; currentState.m_stencil = newStencil; - PIX_ENDEVENT(); - PIX_BEGINEVENT(D3DCOLOR_VIEW, s_viewNameW[key.m_view]); - if (item > 0) - { - BGFX_PROFILER_END(); - } - BGFX_PROFILER_BEGIN_DYNAMIC(s_viewName[key.m_view]); - view = key.m_view; - programIdx = invalidHandle; + programIdx = kInvalidHandle; - if (_render->m_fb[view].idx != fbh.idx) + if (_render->m_view[view].m_fbh.idx != fbh.idx) { - fbh = _render->m_fb[view]; + fbh = _render->m_view[view].m_fbh; setFrameBuffer(fbh); } - viewState.m_rect = _render->m_rect[view]; - const Rect& scissorRect = _render->m_scissor[view]; + PIX_ENDEVENT(); + if (item > 0) + { + profiler.end(); + } + + profiler.begin(view); + PIX_BEGINEVENT(D3DCOLOR_VIEW, s_viewNameW[view]); + + viewState.m_rect = _render->m_view[view].m_rect; + const Rect& scissorRect = _render->m_view[view].m_scissor; viewHasScissor = !scissorRect.isZero(); viewScissorRect = viewHasScissor ? scissorRect : viewState.m_rect; @@ -3761,12 +3844,11 @@ namespace bgfx { namespace d3d9 vp.MaxZ = 1.0f; DX_CHECK(device->SetViewport(&vp) ); - Clear& clear = _render->m_clear[view]; + Clear& clear = _render->m_view[view].m_clear; if (BGFX_CLEAR_NONE != (clear.m_flags & BGFX_CLEAR_MASK) ) { clearQuad(_clearQuad, viewState.m_rect, clear, _render->m_colorPalette); - prim = s_primInfo[BX_COUNTOF(s_primName)]; // Force primitive type update after clear quad. } DX_CHECK(device->SetRenderState(D3DRS_STENCILENABLE, FALSE) ); @@ -3776,58 +3858,7 @@ namespace bgfx { namespace d3d9 DX_CHECK(device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE) ); DX_CHECK(device->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATER) ); - const uint8_t blitView = SortKey::decodeView(encodedKey); - for (; blitItem < numBlitItems && blitKey.m_view <= blitView; blitItem++) - { - const BlitItem& blit = _render->m_blitItem[blitItem]; - blitKey.decode(_render->m_blitKeys[blitItem+1]); - - const TextureD3D9& src = m_textures[blit.m_src.idx]; - const TextureD3D9& dst = m_textures[blit.m_dst.idx]; - - uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; - uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; - uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; - uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; - uint32_t width = bx::uint32_min(srcWidth, dstWidth); - uint32_t height = bx::uint32_min(srcHeight, dstHeight); - - RECT srcRect = { LONG(blit.m_srcX), LONG(blit.m_srcY), LONG(blit.m_srcX + width), LONG(blit.m_srcY + height) }; - RECT dstRect = { LONG(blit.m_dstX), LONG(blit.m_dstY), LONG(blit.m_dstX + width), LONG(blit.m_dstY + height) }; - - IDirect3DSurface9* srcSurface = src.getSurface(uint8_t(blit.m_srcZ), blit.m_srcMip); - IDirect3DSurface9* dstSurface = dst.getSurface(uint8_t(blit.m_dstZ), blit.m_dstMip); - - // UpdateSurface (pool src: SYSTEMMEM, dst: DEFAULT) - // s/d T RTT RT - // T y y y - // RTT - - - - // RT - - - - // - // StretchRect (pool src and dst must be DEFAULT) - // s/d T RTT RT - // T - y y - // RTT - y y - // RT - y y - // - // GetRenderTargetData (dst must be SYSTEMMEM) - - bool depth = bimg::isDepth(bimg::TextureFormat::Enum(src.m_textureFormat) ); - HRESULT hr = m_device->StretchRect(srcSurface - , depth ? NULL : &srcRect - , dstSurface - , depth ? NULL : &dstRect - , D3DTEXF_NONE - ); - if (FAILED(hr) ) - { - hr = m_device->GetRenderTargetData(srcSurface, dstSurface); - BX_WARN(SUCCEEDED(hr), "StretchRect and GetRenderTargetData failed %x.", hr); - } - - srcSurface->Release(); - dstSurface->Release(); - } + submitBlit(bs, view); } uint16_t scissor = draw.m_scissor; @@ -3851,7 +3882,7 @@ namespace bgfx { namespace d3d9 else { Rect scissorRect; - scissorRect.setIntersect(viewScissorRect, _render->m_rectCache.m_cache[scissor]); + scissorRect.setIntersect(viewScissorRect, _render->m_frameCache.m_rectCache.m_cache[scissor]); if (scissorRect.isZeroArea() ) { continue; @@ -4055,14 +4086,14 @@ namespace bgfx { namespace d3d9 } bool programChanged = false; - bool constantsChanged = draw.m_constBegin < draw.m_constEnd; - rendererUpdateUniforms(this, _render->m_uniformBuffer, draw.m_constBegin, draw.m_constEnd); + bool constantsChanged = draw.m_uniformBegin < draw.m_uniformEnd; + rendererUpdateUniforms(this, _render->m_uniformBuffer[draw.m_uniformIdx], draw.m_uniformBegin, draw.m_uniformEnd); if (key.m_program != programIdx) { programIdx = key.m_program; - if (invalidHandle == programIdx) + if (kInvalidHandle == programIdx) { device->SetVertexShader(NULL); device->SetPixelShader(NULL); @@ -4078,7 +4109,7 @@ namespace bgfx { namespace d3d9 constantsChanged = true; } - if (invalidHandle != programIdx) + if (kInvalidHandle != programIdx) { ProgramD3D9& program = m_program[programIdx]; @@ -4110,7 +4141,7 @@ namespace bgfx { namespace d3d9 || current.m_un.m_draw.m_textureFlags != bind.m_un.m_draw.m_textureFlags || programChanged) { - if (invalidHandle != bind.m_idx) + if (kInvalidHandle != bind.m_idx) { m_textures[bind.m_idx].commit(stage, bind.m_un.m_draw.m_textureFlags, _render->m_colorPalette); } @@ -4124,45 +4155,75 @@ namespace bgfx { namespace d3d9 } } + bool vertexStreamChanged = hasVertexStreamChanged(currentState, draw); + if (programChanged - || currentState.m_streamMask != draw.m_streamMask - || currentState.m_stream[0].m_handle.idx != draw.m_stream[0].m_handle.idx - || currentState.m_instanceDataBuffer.idx != draw.m_instanceDataBuffer.idx - || currentState.m_instanceDataOffset != draw.m_instanceDataOffset - || currentState.m_instanceDataStride != draw.m_instanceDataStride) + || vertexStreamChanged) { - currentState.m_streamMask = draw.m_streamMask; - currentState.m_stream[0].m_handle = draw.m_stream[0].m_handle; + currentState.m_streamMask = draw.m_streamMask; currentState.m_instanceDataBuffer.idx = draw.m_instanceDataBuffer.idx; currentState.m_instanceDataOffset = draw.m_instanceDataOffset; currentState.m_instanceDataStride = draw.m_instanceDataStride; - uint16_t handle = draw.m_stream[0].m_handle.idx; - if (invalidHandle != handle) + const VertexDecl* decls[BGFX_CONFIG_MAX_VERTEX_STREAMS]; + + const bool instanced = true + && isValid(draw.m_instanceDataBuffer) + && m_instancingSupport + ; + + const uint32_t freq = instanced + ? D3DSTREAMSOURCE_INDEXEDDATA|draw.m_numInstances + : 1 + ; + + uint32_t numVertices = draw.m_numVertices; + uint8_t numStreams = 0; + for (uint32_t idx = 0, streamMask = draw.m_streamMask, ntz = bx::uint32_cnttz(streamMask) + ; 0 != streamMask + ; streamMask >>= 1, idx += 1, ntz = bx::uint32_cnttz(streamMask), ++numStreams + ) { + streamMask >>= ntz; + idx += ntz; + + currentState.m_stream[idx].m_decl = draw.m_stream[idx].m_decl; + currentState.m_stream[idx].m_handle = draw.m_stream[idx].m_handle; + currentState.m_stream[idx].m_startVertex = draw.m_stream[idx].m_startVertex; + + const uint16_t handle = draw.m_stream[idx].m_handle.idx; const VertexBufferD3D9& vb = m_vertexBuffers[handle]; + const uint16_t decl = !isValid(vb.m_decl) ? draw.m_stream[idx].m_decl.idx : vb.m_decl.idx; + const VertexDecl& vertexDecl = m_vertexDecls[decl]; + const uint32_t stride = vertexDecl.m_stride; - uint16_t decl = !isValid(vb.m_decl) ? draw.m_stream[0].m_decl.idx : vb.m_decl.idx; - const VertexDeclD3D9& vertexDecl = m_vertexDecls[decl]; - DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, vertexDecl.m_decl.m_stride) ); + decls[numStreams] = &vertexDecl; - if (isValid(draw.m_instanceDataBuffer) - && m_instancingSupport) + numVertices = bx::uint32_min(UINT32_MAX == draw.m_numVertices + ? vb.m_size/stride + : draw.m_numVertices + , numVertices + ); + + DX_CHECK(device->SetStreamSourceFreq(0, freq) ); + DX_CHECK(device->SetStreamSource(numStreams, vb.m_ptr, 0, stride) ); + } + + currentState.m_numVertices = numVertices; + + if (0 < numStreams) + { + if (instanced) { const VertexBufferD3D9& inst = m_vertexBuffers[draw.m_instanceDataBuffer.idx]; - DX_CHECK(device->SetStreamSourceFreq(0, D3DSTREAMSOURCE_INDEXEDDATA|draw.m_numInstances) ); - DX_CHECK(device->SetStreamSourceFreq(1, UINT(D3DSTREAMSOURCE_INSTANCEDATA|1) ) ); - DX_CHECK(device->SetStreamSource(1, inst.m_ptr, draw.m_instanceDataOffset, draw.m_instanceDataStride) ); - - IDirect3DVertexDeclaration9* ptr = createVertexDeclaration(vertexDecl.m_decl, draw.m_instanceDataStride/16); - DX_CHECK(device->SetVertexDeclaration(ptr) ); - DX_RELEASE(ptr, 0); + DX_CHECK(device->SetStreamSourceFreq(numStreams, UINT(D3DSTREAMSOURCE_INSTANCEDATA|1) ) ); + DX_CHECK(device->SetStreamSource(numStreams, inst.m_ptr, draw.m_instanceDataOffset, draw.m_instanceDataStride) ); + setInputLayout(numStreams, decls, draw.m_instanceDataStride/16); } else { - DX_CHECK(device->SetStreamSourceFreq(0, 1) ); - DX_CHECK(device->SetStreamSource(1, NULL, 0, 0) ); - DX_CHECK(device->SetVertexDeclaration(vertexDecl.m_ptr) ); + DX_CHECK(device->SetStreamSource(numStreams, NULL, 0, 0) ); + setInputLayout(numStreams, decls, 0); } } else @@ -4177,7 +4238,7 @@ namespace bgfx { namespace d3d9 currentState.m_indexBuffer = draw.m_indexBuffer; uint16_t handle = draw.m_indexBuffer.idx; - if (invalidHandle != handle) + if (kInvalidHandle != handle) { const IndexBufferD3D9& ib = m_indexBuffers[handle]; DX_CHECK(device->SetIndices(ib.m_ptr) ); @@ -4190,15 +4251,7 @@ namespace bgfx { namespace d3d9 if (0 != currentState.m_streamMask) { - uint32_t numVertices = draw.m_numVertices; - if (UINT32_MAX == numVertices) - { - const VertexBufferD3D9& vb = m_vertexBuffers[currentState.m_stream[0].m_handle.idx]; - uint16_t decl = !isValid(vb.m_decl) ? draw.m_stream[0].m_decl.idx : vb.m_decl.idx; - const VertexDeclD3D9& vertexDecl = m_vertexDecls[decl]; - numVertices = vb.m_size/vertexDecl.m_decl.m_stride; - } - + uint32_t numVertices = draw.m_numVertices; uint32_t numIndices = 0; uint32_t numPrimsSubmitted = 0; uint32_t numInstances = 0; @@ -4268,7 +4321,9 @@ namespace bgfx { namespace d3d9 } } - if (0 < _render->m_num) + submitBlit(bs, BGFX_CONFIG_MAX_VIEWS); + + if (0 < _render->m_numRenderItems) { if (0 != (m_resolution.m_flags & BGFX_RESET_FLUSH_AFTER_RENDER) ) { @@ -4279,22 +4334,14 @@ namespace bgfx { namespace d3d9 capture(); captureElapsed += bx::getHPCounter(); - BGFX_PROFILER_END(); + profiler.end(); } } PIX_ENDEVENT(); - int64_t now = bx::getHPCounter(); - elapsed += now; - - static int64_t last = now; - - Stats& perfStats = _render->m_perfStats; - perfStats.cpuTimeBegin = last; - - int64_t frameTime = now - last; - last = now; + int64_t timeEnd = bx::getHPCounter(); + int64_t frameTime = timeEnd - timeBegin; static int64_t min = frameTime; static int64_t max = frameTime; @@ -4305,31 +4352,32 @@ namespace bgfx { namespace d3d9 static double maxGpuElapsed = 0.0f; double elapsedGpuMs = 0.0; - if (m_timerQuerySupport) + if (UINT32_MAX != frameQueryIdx) { - m_gpuTimer.end(); + m_gpuTimer.end(frameQueryIdx); - do - { - double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency); - elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs; - maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; - } - while (m_gpuTimer.get() ); + const TimerQueryD3D9::Result& result = m_gpuTimer.m_result[BGFX_CONFIG_MAX_VIEWS]; + double toGpuMs = 1000.0 / double(result.m_frequency); + elapsedGpuMs = (result.m_end - result.m_begin) * toGpuMs; + maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; - maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); + maxGpuLatency = bx::uint32_imax(maxGpuLatency, result.m_pending-1); } const int64_t timerFreq = bx::getHPFrequency(); - perfStats.cpuTimeEnd = now; + Stats& perfStats = _render->m_perfStats; + perfStats.cpuTimeBegin = timeBegin; + perfStats.cpuTimeEnd = timeEnd; perfStats.cpuTimerFreq = timerFreq; - perfStats.gpuTimeBegin = m_gpuTimer.m_begin; - perfStats.gpuTimeEnd = m_gpuTimer.m_end; - perfStats.gpuTimerFreq = m_gpuTimer.m_frequency; + const TimerQueryD3D9::Result& result = m_gpuTimer.m_result[BGFX_CONFIG_MAX_VIEWS]; + perfStats.gpuTimeBegin = result.m_begin; + perfStats.gpuTimeEnd = result.m_end; + perfStats.gpuTimerFreq = result.m_frequency; perfStats.numDraw = statsKeyType[0]; perfStats.numCompute = statsKeyType[1]; perfStats.maxGpuLatency = maxGpuLatency; + m_nvapi.getMemoryInfo(perfStats.gpuMemoryUsed, perfStats.gpuMemoryMax); if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) { @@ -4338,30 +4386,31 @@ namespace bgfx { namespace d3d9 m_needPresent = true; TextVideoMem& tvm = m_textVideoMem; - static int64_t next = now; + static int64_t next = timeEnd; - if (now >= next) + if (timeEnd >= next) { - next = now + timerFreq; + next = timeEnd + timerFreq; double freq = double(timerFreq); double toMs = 1000.0/freq; tvm.clear(); uint16_t pos = 0; - tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x89 : 0x8f, " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " + tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f + , " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " , getRendererName() ); const D3DADAPTER_IDENTIFIER9& identifier = m_identifier; - tvm.printf(0, pos++, 0x8f, " Device: %s (%s)", identifier.Description, identifier.Driver); + tvm.printf(0, pos++, 0x8b, " Device: %s (%s)", identifier.Description, identifier.Driver); char processMemoryUsed[16]; bx::prettify(processMemoryUsed, BX_COUNTOF(processMemoryUsed), bx::getProcessMemoryUsed() ); - tvm.printf(0, pos++, 0x8f, " Memory: %s (process) ", processMemoryUsed); + tvm.printf(0, pos++, 0x8b, " Memory: %s (process) ", processMemoryUsed); pos = 10; - tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " + tvm.printf(10, pos++, 0x8b, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " , double(frameTime)*toMs , double(min)*toMs , double(max)*toMs @@ -4369,16 +4418,16 @@ namespace bgfx { namespace d3d9 ); const uint32_t msaa = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT; - tvm.printf(10, pos++, 0x8e, " Reset flags: [%c] vsync, [%c] MSAAx%d, [%c] MaxAnisotropy " + tvm.printf(10, pos++, 0x8b, " Reset flags: [%c] vsync, [%c] MSAAx%d, [%c] MaxAnisotropy " , !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? '\xfe' : ' ' , 0 != msaa ? '\xfe' : ' ' , 1<m_num + double elapsedCpuMs = double(frameTime)*toMs; + tvm.printf(10, pos++, 0x8b, " Submitted: %5d (draw %5d, compute %4d) / CPU %7.4f [ms] %c GPU %7.4f [ms] (latency %d)" + , _render->m_numRenderItems , statsKeyType[0] , statsKeyType[1] , elapsedCpuMs @@ -4391,7 +4440,7 @@ namespace bgfx { namespace d3d9 for (uint32_t ii = 0; ii < BX_COUNTOF(s_primName); ++ii) { - tvm.printf(10, pos++, 0x8e, " %10s: %7d (#inst: %5d), submitted: %7d" + tvm.printf(10, pos++, 0x8b, " %10s: %7d (#inst: %5d), submitted: %7d" , s_primName[ii] , statsNumPrimsRendered[ii] , statsNumInstances[ii] @@ -4399,16 +4448,26 @@ namespace bgfx { namespace d3d9 ); } - tvm.printf(10, pos++, 0x8e, " Indices: %7d ", statsNumIndices); - tvm.printf(10, pos++, 0x8e, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); - tvm.printf(10, pos++, 0x8e, " DVB size: %7d ", _render->m_vboffset); - tvm.printf(10, pos++, 0x8e, " DIB size: %7d ", _render->m_iboffset); + tvm.printf(10, pos++, 0x8b, " Indices: %7d ", statsNumIndices); +// tvm.printf(10, pos++, 0x8b, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); + tvm.printf(10, pos++, 0x8b, " DVB size: %7d ", _render->m_vboffset); + tvm.printf(10, pos++, 0x8b, " DIB size: %7d ", _render->m_iboffset); pos++; - double captureMs = double(captureElapsed)*toMs; - tvm.printf(10, pos++, 0x8e, " Capture: %7.4f [ms]", captureMs); + tvm.printf(10, pos++, 0x8b, " Occlusion queries: %3d ", m_occlusionQuery.m_control.available() ); - uint8_t attr[2] = { 0x89, 0x8a }; + pos++; + tvm.printf(10, pos++, 0x8b, " State cache: "); + tvm.printf(10, pos++, 0x8b, " Input "); + tvm.printf(10, pos++, 0x8b, " %6d " + , m_inputLayoutCache.getCount() + ); + pos++; + + double captureMs = double(captureElapsed)*toMs; + tvm.printf(10, pos++, 0x8b, " Capture: %7.4f [ms]", captureMs); + + uint8_t attr[2] = { 0x8c, 0x8a }; uint8_t attrIndex = _render->m_waitSubmit < _render->m_waitRender; tvm.printf(10, pos++, attr[attrIndex&1], " Submit wait: %7.4f [ms]", _render->m_waitSubmit*toMs); @@ -4439,8 +4498,9 @@ namespace bgfx { namespace d3d9 namespace bgfx { namespace d3d9 { - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { + BX_UNUSED(_init); return NULL; } diff --git a/3rdparty/bgfx/src/renderer_d3d9.h b/3rdparty/bgfx/src/renderer_d3d9.h index 2aa9b64..b932140 100644 --- a/3rdparty/bgfx/src/renderer_d3d9.h +++ b/3rdparty/bgfx/src/renderer_d3d9.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -11,21 +11,6 @@ #if BX_PLATFORM_WINDOWS # include # include - -#elif BX_PLATFORM_XBOX360 -# include -# define D3DUSAGE_DYNAMIC 0 // not supported on X360 -# define D3DLOCK_DISCARD 0 // not supported on X360 -# define D3DERR_DEVICEHUNG D3DERR_DEVICELOST // not supported on X360 -# define D3DERR_DEVICEREMOVED D3DERR_DEVICELOST // not supported on X360 -# define D3DMULTISAMPLE_8_SAMPLES D3DMULTISAMPLE_4_SAMPLES -# define D3DMULTISAMPLE_16_SAMPLES D3DMULTISAMPLE_4_SAMPLES - -# define D3DFMT_DF24 D3DFMT_D24FS8 - -# define _PIX_SETMARKER(_col, _name) BX_NOOP() -# define _PIX_BEGINEVENT(_col, _name) BX_NOOP() -# define _PIX_ENDEVENT() BX_NOOP #endif // BX_PLATFORM_ #ifndef D3DSTREAMSOURCE_INDEXEDDATA @@ -38,6 +23,7 @@ #include "renderer.h" #include "renderer_d3d.h" +#include "nvapi.h" namespace bgfx { namespace d3d9 { @@ -128,15 +114,21 @@ namespace bgfx { namespace d3d9 { IndexBufferD3D9() : m_ptr(NULL) + , m_dynamic(NULL) , m_size(0) , m_flags(BGFX_BUFFER_NONE) - , m_dynamic(false) { } void create(uint32_t _size, void* _data, uint16_t _flags); void update(uint32_t _offset, uint32_t _size, void* _data, bool _discard = false) { + if (NULL != m_dynamic + && _data != m_dynamic) + { + bx::memCopy(&m_dynamic[_offset], _data, _size); + } + void* buffer; DX_CHECK(m_ptr->Lock(_offset , _size @@ -154,7 +146,12 @@ namespace bgfx { namespace d3d9 if (NULL != m_ptr) { DX_RELEASE(m_ptr, 0); - m_dynamic = false; + + if (NULL != m_dynamic) + { + BX_FREE(g_allocator, m_dynamic); + m_dynamic = NULL; + } } } @@ -162,22 +159,29 @@ namespace bgfx { namespace d3d9 void postReset(); IDirect3DIndexBuffer9* m_ptr; + uint8_t* m_dynamic; uint32_t m_size; uint16_t m_flags; - bool m_dynamic; }; struct VertexBufferD3D9 { VertexBufferD3D9() : m_ptr(NULL) - , m_dynamic(false) + , m_dynamic(NULL) + , m_size(0) { } void create(uint32_t _size, void* _data, VertexDeclHandle _declHandle); void update(uint32_t _offset, uint32_t _size, void* _data, bool _discard = false) { + if (NULL != m_dynamic + && _data != m_dynamic) + { + bx::memCopy(&m_dynamic[_offset], _data, _size); + } + void* buffer; DX_CHECK(m_ptr->Lock(_offset , _size @@ -195,7 +199,12 @@ namespace bgfx { namespace d3d9 if (NULL != m_ptr) { DX_RELEASE(m_ptr, 0); - m_dynamic = false; + + if (NULL != m_dynamic) + { + BX_FREE(g_allocator, m_dynamic); + m_dynamic = NULL; + } } } @@ -203,27 +212,9 @@ namespace bgfx { namespace d3d9 void postReset(); IDirect3DVertexBuffer9* m_ptr; + uint8_t* m_dynamic; uint32_t m_size; VertexDeclHandle m_decl; - bool m_dynamic; - }; - - struct VertexDeclD3D9 - { - VertexDeclD3D9() - : m_ptr(NULL) - { - } - - void create(const VertexDecl& _decl); - - void destroy() - { - DX_RELEASE(m_ptr, 0); - } - - IDirect3DVertexDeclaration9* m_ptr; - VertexDecl m_decl; }; struct ShaderD3D9 @@ -249,7 +240,7 @@ namespace bgfx { namespace d3d9 switch (m_type) { - case 0: DX_RELEASE(m_vertexShader, 0); + case 0: DX_RELEASE(m_vertexShader, 0); BX_FALLTHROUGH; default: DX_RELEASE(m_pixelShader, 0); } } @@ -429,30 +420,45 @@ namespace bgfx { namespace d3d9 struct TimerQueryD3D9 { TimerQueryD3D9() - : m_control(BX_COUNTOF(m_frame) ) + : m_control(BX_COUNTOF(m_query) ) { } void postReset(); void preReset(); - void begin(); - void end(); - bool get(); + uint32_t begin(uint32_t _resultIdx); + void end(uint32_t _idx); + bool update(); - struct Frame + struct Query { IDirect3DQuery9* m_disjoint; IDirect3DQuery9* m_begin; IDirect3DQuery9* m_end; IDirect3DQuery9* m_freq; + uint32_t m_resultIdx; + bool m_ready; }; - uint64_t m_begin; - uint64_t m_end; - uint64_t m_elapsed; - uint64_t m_frequency; + struct Result + { + void reset() + { + m_begin = 0; + m_end = 0; + m_frequency = 1; + m_pending = 0; + } - Frame m_frame[4]; + uint64_t m_begin; + uint64_t m_end; + uint64_t m_frequency; + uint32_t m_pending; + }; + + Result m_result[BGFX_CONFIG_MAX_VIEWS+1]; + + Query m_query[BGFX_CONFIG_MAX_VIEWS*4]; bx::RingBufferControl m_control; }; diff --git a/3rdparty/bgfx/src/renderer_gl.cpp b/3rdparty/bgfx/src/renderer_gl.cpp index da123ff..5ad896a 100644 --- a/3rdparty/bgfx/src/renderer_gl.cpp +++ b/3rdparty/bgfx/src/renderer_gl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -11,20 +11,6 @@ # include # include "hmd_ovr.h" -#if BGFX_CONFIG_PROFILER_REMOTERY -# define BGFX_GPU_PROFILER_BIND() rmt_BindOpenGL() -# define BGFX_GPU_PROFILER_UNBIND() rmt_UnbindOpenGL() -# define BGFX_GPU_PROFILER_BEGIN(_group, _name, _color) rmt_BeginOpenGLSample(_group##_##_name) -# define BGFX_GPU_PROFILER_BEGIN_DYNAMIC(_namestr) rmt_BeginOpenGLSampleDynamic(_namestr) -# define BGFX_GPU_PROFILER_END() rmt_EndOpenGLSample() -#else -# define BGFX_GPU_PROFILER_BIND() BX_NOOP() -# define BGFX_GPU_PROFILER_UNBIND() BX_NOOP() -# define BGFX_GPU_PROFILER_BEGIN(_group, _name, _color) BX_NOOP() -# define BGFX_GPU_PROFILER_BEGIN_DYNAMIC(_namestr) BX_NOOP() -# define BGFX_GPU_PROFILER_END() BX_NOOP() -#endif // BGFX_CONFIG_PROFILER_REMOTERY - namespace bgfx { namespace gl { static char s_viewName[BGFX_CONFIG_MAX_VIEWS][BGFX_CONFIG_MAX_VIEW_NAME]; @@ -63,6 +49,8 @@ namespace bgfx { namespace gl "a_bitangent", "a_color0", "a_color1", + "a_color2", + "a_color3", "a_indices", "a_weight", "a_texcoord0", @@ -269,7 +257,7 @@ namespace bgfx { namespace gl { GL_RGBA4, GL_ZERO, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4_REV, false }, // RGBA4 { GL_RGB5_A1, GL_ZERO, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, false }, // RGB5A1 { GL_RGB10_A2, GL_ZERO, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, false }, // RGB10A2 - { GL_R11F_G11F_B10F, GL_ZERO, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, false }, // R11G11B10F + { GL_R11F_G11F_B10F, GL_ZERO, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, false }, // RG11B10F { GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // UnknownDepth { GL_DEPTH_COMPONENT16, GL_ZERO, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, false }, // D16 { GL_DEPTH_COMPONENT24, GL_ZERO, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, false }, // D24 @@ -352,7 +340,7 @@ namespace bgfx { namespace gl GL_RGBA4, // RGBA4 GL_RGB5_A1, // RGB5A1 GL_RGB10_A2, // RGB10A2 - GL_R11F_G11F_B10F, // R11G11B10F + GL_R11F_G11F_B10F, // RG11B10F GL_ZERO, // UnknownDepth GL_DEPTH_COMPONENT16, // D16 GL_DEPTH_COMPONENT24, // D24 @@ -433,7 +421,7 @@ namespace bgfx { namespace gl GL_RGBA4, // RGBA4 GL_RGB5_A1, // RGB5A1 GL_RGB10_A2, // RGB10A2 - GL_R11F_G11F_B10F, // R11G11B10F + GL_R11F_G11F_B10F, // RG11B10F GL_ZERO, // UnknownDepth GL_ZERO, // D16 GL_ZERO, // D24 @@ -896,15 +884,6 @@ namespace bgfx { namespace gl NULL }; - static const char* s_OES_texture_3D[] = - { - "texture3D", - "texture3DProj", - "texture3DLod", - "texture3DProjLod", - NULL - }; - static const char* s_uisamplers[] = { "isampler2D", @@ -918,11 +897,23 @@ namespace bgfx { namespace gl static const char* s_texelFetch[] = { + "texture", + "textureLod", + "textureGrad", + "textureProj", + "textureProjLod", "texelFetch", "texelFetchOffset", NULL }; + static const char* s_texture3D[] = + { + "sampler3D", + "sampler3DArray", + NULL + }; + static const char* s_textureArray[] = { "sampler2DArray", @@ -940,6 +931,13 @@ namespace bgfx { namespace gl NULL }; + static const char* s_EXT_gpu_shader4[] = + { + "gl_VertexID", + "gl_InstanceID", + NULL + }; + static const char* s_ARB_gpu_shader5[] = { "bitfieldReverse", @@ -986,7 +984,7 @@ namespace bgfx { namespace gl // // If is 0 then is assumed to be null-terminated. - uint32_t size = (0 == _length ? (uint32_t)bx::strnlen(_marker) : _length) + 1; + uint32_t size = (0 == _length ? (uint32_t)bx::strLen(_marker) : _length) + 1; size *= sizeof(wchar_t); wchar_t* name = (wchar_t*)alloca(size); mbstowcs(name, _marker, size-2); @@ -1045,7 +1043,7 @@ namespace bgfx { namespace gl glGetError(); // ignore error if glGetString returns NULL. if (NULL != str) { - return bx::hashMurmur2A(str, (uint32_t)bx::strnlen(str) ); + return bx::hash(str, (uint32_t)bx::strLen(str) ); } return 0; @@ -1057,21 +1055,21 @@ namespace bgfx { namespace gl { char name[1024]; const char* pos = _extensions; - const char* end = _extensions + bx::strnlen(_extensions); + const char* end = _extensions + bx::strLen(_extensions); while (pos < end) { uint32_t len; - const char* space = bx::strnchr(pos, ' '); + const char* space = bx::strFind(pos, ' '); if (NULL != space) { len = bx::uint32_min(sizeof(name), (uint32_t)(space - pos) ); } else { - len = bx::uint32_min(sizeof(name), (uint32_t)bx::strnlen(pos) ); + len = bx::uint32_min(sizeof(name), (uint32_t)bx::strLen(pos) ); } - bx::strlncpy(name, BX_COUNTOF(name), pos, len); + bx::strCopy(name, BX_COUNTOF(name), pos, len); name[len] = '\0'; BX_TRACE("\t%s", name); @@ -1145,7 +1143,252 @@ namespace bgfx { namespace gl for (GLenum err = glGetError(); err != 0; err = glGetError() ); } - GLenum initTestTexture(TextureFormat::Enum _format, bool _srgb, bool _mipmaps) + static void texSubImage( + GLenum _target + , GLint _level + , GLint _xoffset + , GLint _yoffset + , GLint _zoffset + , GLsizei _width + , GLsizei _height + , GLsizei _depth + , GLenum _format + , GLenum _type + , const GLvoid* _data + ) + { + if (NULL == _data) + { + return; + } + + if (_target == GL_TEXTURE_3D + || _target == GL_TEXTURE_2D_ARRAY + || _target == GL_TEXTURE_CUBE_MAP_ARRAY) + { + glTexSubImage3D( + _target + , _level + , _xoffset + , _yoffset + , _zoffset + , _width + , _height + , _depth + , _format + , _type + , _data + ); + } + else if (_target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) + { + } + else + { + BX_UNUSED(_zoffset, _depth); + glTexSubImage2D( + _target + , _level + , _xoffset + , _yoffset + , _width + , _height + , _format + , _type + , _data + ); + } + } + + static void texImage( + GLenum _target + , uint32_t _msaaQuality + , GLint _level + , GLint _internalFormat + , GLsizei _width + , GLsizei _height + , GLsizei _depth + , GLint _border + , GLenum _format + , GLenum _type + , const GLvoid* _data + ) + { + if (_target == GL_TEXTURE_3D) + { + glTexImage3D( + _target + , _level + , _internalFormat + , _width + , _height + , _depth + , _border + , _format + , _type + , _data + ); + } + else if (_target == GL_TEXTURE_2D_ARRAY + || _target == GL_TEXTURE_CUBE_MAP_ARRAY) + { + texSubImage( + _target + , _level + , 0 + , 0 + , _depth + , _width + , _height + , 1 + , _format + , _type + , _data + ); + } + else if (_target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) + { + } + else if (_target == GL_TEXTURE_2D_MULTISAMPLE) + { + glTexImage2DMultisample( + _target + , _msaaQuality + , _internalFormat + , _width + , _height + , false + ); + } + else + { + glTexImage2D( + _target + , _level + , _internalFormat + , _width + , _height + , _border + , _format + , _type + , _data + ); + } + + BX_UNUSED(_msaaQuality, _depth, _border, _data); + } + + static void compressedTexSubImage( + GLenum _target + , GLint _level + , GLint _xoffset + , GLint _yoffset + , GLint _zoffset + , GLsizei _width + , GLsizei _height + , GLsizei _depth + , GLenum _format + , GLsizei _imageSize + , const GLvoid* _data + ) + { + if (_target == GL_TEXTURE_3D + || _target == GL_TEXTURE_2D_ARRAY) + { + glCompressedTexSubImage3D( + _target + , _level + , _xoffset + , _yoffset + , _zoffset + , _width + , _height + , _depth + , _format + , _imageSize + , _data + ); + } + else + { + BX_UNUSED(_zoffset, _depth); + glCompressedTexSubImage2D( + _target + , _level + , _xoffset + , _yoffset + , _width + , _height + , _format + , _imageSize + , _data + ); + } + } + + static void compressedTexImage( + GLenum _target + , GLint _level + , GLenum _internalformat + , GLsizei _width + , GLsizei _height + , GLsizei _depth + , GLint _border + , GLsizei _imageSize + , const GLvoid* _data + ) + { + if (_target == GL_TEXTURE_3D) + { + glCompressedTexImage3D( + _target + , _level + , _internalformat + , _width + , _height + , _depth + , _border + , _imageSize + , _data + ); + } + else if (_target == GL_TEXTURE_2D_ARRAY + || _target == GL_TEXTURE_CUBE_MAP_ARRAY) + { + compressedTexSubImage( + _target + , _level + , 0 + , 0 + , _depth + , _width + , _height + , 1 + , _internalformat + , _imageSize + , _data + ); + } + else if (_target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) + { + } + else + { + BX_UNUSED(_depth); + glCompressedTexImage2D( + _target + , _level + , _internalformat + , _width + , _height + , _border + , _imageSize + , _data + ); + } + } + + GLenum initTestTexture(TextureFormat::Enum _format, bool _srgb, bool _mipmaps, bool _array, GLsizei _dim) { const TextureFormatInfo& tfi = s_textureFormat[_format]; GLenum internalFmt = _srgb @@ -1153,13 +1396,15 @@ namespace bgfx { namespace gl : tfi.m_internalFmt ; - GLsizei size = (16*16*bimg::getBitsPerPixel(bimg::TextureFormat::Enum(_format) ) )/8; + GLsizei bpp = bimg::getBitsPerPixel(bimg::TextureFormat::Enum(_format) ); + GLsizei size = (_dim*_dim*bpp)/8; void* data = NULL; if (bimg::isDepth(bimg::TextureFormat::Enum(_format) ) ) { _srgb = false; _mipmaps = false; + _array = false; } else { @@ -1169,35 +1414,29 @@ namespace bgfx { namespace gl flushGlError(); GLenum err = 0; + const GLenum target = _array + ? GL_TEXTURE_2D_ARRAY + : GL_TEXTURE_2D + ; + if (bimg::isCompressed(bimg::TextureFormat::Enum(_format) ) ) { - glCompressedTexImage2D(GL_TEXTURE_2D, 0, internalFmt, 16, 16, 0, size, data); - err |= glGetError(); - if (_mipmaps) + for (uint32_t ii = 0, dim = _dim; ii < (_mipmaps ? 5u : 1u) && 0 == err; ++ii, dim >>= 1) { - glCompressedTexImage2D(GL_TEXTURE_2D, 1, internalFmt, 8, 8, 0, size, data); - err |= glGetError(); - glCompressedTexImage2D(GL_TEXTURE_2D, 2, internalFmt, 4, 4, 0, size, data); - err |= glGetError(); - glCompressedTexImage2D(GL_TEXTURE_2D, 3, internalFmt, 2, 2, 0, size, data); - err |= glGetError(); - glCompressedTexImage2D(GL_TEXTURE_2D, 4, internalFmt, 1, 1, 0, size, data); + dim = bx::uint32_max(1, dim); + uint32_t block = bx::uint32_max(4, dim); + size = (block*block*bpp)/8; + compressedTexImage(target, ii, internalFmt, dim, dim, 0, 0, size, data); err |= glGetError(); } } else { - glTexImage2D(GL_TEXTURE_2D, 0, internalFmt, 16, 16, 0, tfi.m_fmt, tfi.m_type, data); - err |= glGetError(); - if (_mipmaps) + for (uint32_t ii = 0, dim = _dim; ii < (_mipmaps ? 5u : 1u) && 0 == err; ++ii, dim >>= 1) { - glTexImage2D(GL_TEXTURE_2D, 1, internalFmt, 8, 8, 0, tfi.m_fmt, tfi.m_type, data); - err |= glGetError(); - glTexImage2D(GL_TEXTURE_2D, 2, internalFmt, 4, 4, 0, tfi.m_fmt, tfi.m_type, data); - err |= glGetError(); - glTexImage2D(GL_TEXTURE_2D, 3, internalFmt, 2, 2, 0, tfi.m_fmt, tfi.m_type, data); - err |= glGetError(); - glTexImage2D(GL_TEXTURE_2D, 4, internalFmt, 1, 1, 0, tfi.m_fmt, tfi.m_type, data); + dim = bx::uint32_max(1, dim); + size = (dim*dim*bpp)/8; + texImage(target, 0, ii, internalFmt, dim, dim, 0, 0, tfi.m_fmt, tfi.m_type, data); err |= glGetError(); } } @@ -1205,7 +1444,7 @@ namespace bgfx { namespace gl return err; } - static bool isTextureFormatValid(TextureFormat::Enum _format, bool _srgb = false, bool _mipAutogen = false) + static bool isTextureFormatValid(TextureFormat::Enum _format, bool _srgb = false, bool _mipAutogen = false, bool _array = false, GLsizei _dim = 16) { const TextureFormatInfo& tfi = s_textureFormat[_format]; GLenum internalFmt = _srgb @@ -1217,26 +1456,54 @@ namespace bgfx { namespace gl return false; } + const GLenum target = _array + ? GL_TEXTURE_2D_ARRAY + : GL_TEXTURE_2D + ; + GLuint id; GL_CHECK(glGenTextures(1, &id) ); - GL_CHECK(glBindTexture(GL_TEXTURE_2D, id) ); + GL_CHECK(glBindTexture(target, id) ); - GLenum err = initTestTexture(_format, _srgb, _mipAutogen); - BX_WARN(0 == err, "TextureFormat::%s is not supported (%x: %s).", getName(_format), err, glEnumName(err) ); - - if (0 == err - && _mipAutogen) + GLenum err = 0; + if (_array) { - glGenerateMipmap(GL_TEXTURE_2D); + glTexStorage3D(target + , 1 + GLsizei(bx::log2(float(_dim) ) ) + , internalFmt + , _dim + , _dim + , _dim + ); err = glGetError(); } + if (0 == err) + { + err = initTestTexture(_format, _srgb, _mipAutogen, _array, _dim); + BX_WARN(0 == err, "TextureFormat::%s %s%s%sis not supported (%x: %s)." + , getName(_format) + , _srgb ? "+sRGB " : "" + , _mipAutogen ? "+mipAutoGen " : "" + , _array ? "+array " : "" + , err + , glEnumName(err) + ); + + if (0 == err + && _mipAutogen) + { + glGenerateMipmap(target); + err = glGetError(); + } + } + GL_CHECK(glDeleteTextures(1, &id) ); return 0 == err; } - static bool isImageFormatValid(TextureFormat::Enum _format) + static bool isImageFormatValid(TextureFormat::Enum _format, GLsizei _dim = 16) { if (GL_ZERO == s_imageFormat[_format]) { @@ -1250,7 +1517,7 @@ namespace bgfx { namespace gl flushGlError(); GLenum err = 0; - glTexStorage2D(GL_TEXTURE_2D, 1, s_imageFormat[_format], 16, 16); + glTexStorage2D(GL_TEXTURE_2D, 1, s_imageFormat[_format], _dim, _dim); err |= glGetError(); if (0 == err) { @@ -1270,7 +1537,12 @@ namespace bgfx { namespace gl return 0 == err; } - static bool isFramebufferFormatValid(TextureFormat::Enum _format, bool _srgb = false) + static bool isFramebufferFormatValid( + TextureFormat::Enum _format + , bool _srgb = false + , bool _writeOnly = false + , GLsizei _dim = 16 + ) { const TextureFormatInfo& tfi = s_textureFormat[_format]; GLenum internalFmt = _srgb @@ -1283,6 +1555,24 @@ namespace bgfx { namespace gl return false; } + if (_writeOnly) + { + GLuint rbo; + glGenRenderbuffers(1, &rbo); + glBindRenderbuffer(GL_RENDERBUFFER, rbo); + + glRenderbufferStorage(GL_RENDERBUFFER + , s_rboFormat[_format] + , _dim + , _dim + ); + glBindRenderbuffer(GL_RENDERBUFFER, 0); + glDeleteRenderbuffers(1, &rbo); + + GLenum err = glGetError(); + return 0 == err; + } + GLuint fbo; GL_CHECK(glGenFramebuffers(1, &fbo) ); GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, fbo) ); @@ -1291,7 +1581,7 @@ namespace bgfx { namespace gl GL_CHECK(glGenTextures(1, &id) ); GL_CHECK(glBindTexture(GL_TEXTURE_2D, id) ); - GLenum err = initTestTexture(_format, _srgb, false); + GLenum err = initTestTexture(_format, _srgb, false, false, _dim); GLenum attachment; if (bimg::isDepth(bimg::TextureFormat::Enum(_format) ) ) @@ -1355,12 +1645,12 @@ namespace bgfx { namespace gl && extension.m_initialize) { const char* ext = _name; - if (0 == bx::strncmp(ext, "GL_", 3) ) // skip GL_ + if (0 == bx::strCmp(ext, "GL_", 3) ) // skip GL_ { ext += 3; } - if (0 == bx::strncmp(ext, extension.m_name) ) + if (0 == bx::strCmp(ext, extension.m_name) ) { extension.m_supported = true; supported = true; @@ -1379,11 +1669,11 @@ namespace bgfx { namespace gl public: VRImplOVRGL(); - virtual bool createSwapChain(const VRDesc& _desc, int _msaaSamples, int _mirrorWidth, int _mirrorHeight) BX_OVERRIDE; - virtual void destroySwapChain() BX_OVERRIDE; - virtual void destroyMirror() BX_OVERRIDE; - virtual void makeRenderTargetActive(const VRDesc& _desc) BX_OVERRIDE; - virtual bool submitSwapChain(const VRDesc& _desc) BX_OVERRIDE; + virtual bool createSwapChain(const VRDesc& _desc, int _msaaSamples, int _mirrorWidth, int _mirrorHeight) override; + virtual void destroySwapChain() override; + virtual void destroyMirror() override; + virtual void makeRenderTargetActive(const VRDesc& _desc) override; + virtual bool submitSwapChain(const VRDesc& _desc) override; private: GLuint m_eyeTarget[4]; @@ -1460,15 +1750,25 @@ namespace bgfx { namespace gl { } - void init() + bool init(const Init& _init) { + struct ErrorState + { + enum Enum + { + Default, + }; + }; + + ErrorState::Enum errorState = ErrorState::Default; + m_renderdocdll = loadRenderDoc(); - m_fbh.idx = invalidHandle; + m_fbh.idx = kInvalidHandle; bx::memSet(m_uniforms, 0, sizeof(m_uniforms) ); bx::memSet(&m_resolution, 0, sizeof(m_resolution) ); - setRenderContextSize(BGFX_DEFAULT_WIDTH, BGFX_DEFAULT_HEIGHT); + setRenderContextSize(_init.resolution.m_width, _init.resolution.m_height); // Must be after context is initialized?! VRImplI* vrImpl = NULL; @@ -1485,7 +1785,7 @@ namespace bgfx { namespace gl for (uint32_t ii = 0; ii < BX_COUNTOF(s_vendorIds); ++ii) { const VendorId& vendorId = s_vendorIds[ii]; - if (0 == bx::strncmp(vendorId.name, m_vendor, bx::strnlen(vendorId.name) ) ) + if (0 == bx::strCmp(vendorId.name, m_vendor, bx::strLen(vendorId.name) ) ) { g_caps.vendorId = vendorId.id; break; @@ -1561,14 +1861,21 @@ namespace bgfx { namespace gl ; if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 31) - && 0 == bx::strncmp(m_vendor, "Imagination Technologies") - && NULL != bx::strnstr(m_version, "(SDK 3.5@3510720)") ) + && 0 == bx::strCmp(m_vendor, "Imagination Technologies") + && NULL != bx::strFind(m_version, "(SDK 3.5@3510720)") ) { // Skip initializing extensions that are broken in emulator. s_extension[Extension::ARB_program_interface_query ].m_initialize = s_extension[Extension::ARB_shader_storage_buffer_object].m_initialize = false; } + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) + && 0 == bx::strCmp(m_vendor, "Imagination Technologies") + && NULL != bx::strFind(m_version, "1.8@905891") ) + { + m_workaround.m_detachShader = false; + } + if (BX_ENABLED(BGFX_CONFIG_RENDERER_USE_EXTENSIONS) ) { const char* extensions = (const char*)glGetString(GL_EXTENSIONS); @@ -1577,22 +1884,22 @@ namespace bgfx { namespace gl { char name[1024]; const char* pos = extensions; - const char* end = extensions + bx::strnlen(extensions); + const char* end = extensions + bx::strLen(extensions); uint32_t index = 0; while (pos < end) { uint32_t len; - const char* space = bx::strnchr(pos, ' '); + const char* space = bx::strFind(pos, ' '); if (NULL != space) { len = bx::uint32_min(sizeof(name), (uint32_t)(space - pos) ); } else { - len = bx::uint32_min(sizeof(name), (uint32_t)bx::strnlen(pos) ); + len = bx::uint32_min(sizeof(name), (uint32_t)bx::strLen(pos) ); } - bx::strlncpy(name, BX_COUNTOF(name), pos, len); + bx::strCopy(name, BX_COUNTOF(name), pos, len); name[len] = '\0'; updateExtension(name); @@ -1624,624 +1931,642 @@ namespace bgfx { namespace gl } } - // Allow all texture filters. - bx::memSet(s_textureFilter, true, BX_COUNTOF(s_textureFilter) ); - - bool bc123Supported = 0 - || s_extension[Extension::EXT_texture_compression_s3tc ].m_supported - || s_extension[Extension::MOZ_WEBGL_compressed_texture_s3tc ].m_supported - || s_extension[Extension::WEBGL_compressed_texture_s3tc ].m_supported - || s_extension[Extension::WEBKIT_WEBGL_compressed_texture_s3tc].m_supported - ; - s_textureFormat[TextureFormat::BC1].m_supported |= bc123Supported - || s_extension[Extension::ANGLE_texture_compression_dxt1].m_supported - || s_extension[Extension::EXT_texture_compression_dxt1 ].m_supported - ; - - if (!s_textureFormat[TextureFormat::BC1].m_supported - && ( s_textureFormat[TextureFormat::BC2].m_supported || s_textureFormat[TextureFormat::BC3].m_supported) ) - { - // If RGBA_S3TC_DXT1 is not supported, maybe RGB_S3TC_DXT1 is? - for (GLint ii = 0; ii < numCmpFormats; ++ii) - { - if (GL_COMPRESSED_RGB_S3TC_DXT1_EXT == cmpFormat[ii]) - { - setTextureFormat(TextureFormat::BC1, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGB_S3TC_DXT1_EXT); - s_textureFormat[TextureFormat::BC1].m_supported = true; - break; - } - } - } - - s_textureFormat[TextureFormat::BC2].m_supported |= bc123Supported - || s_extension[Extension::ANGLE_texture_compression_dxt3 ].m_supported - || s_extension[Extension::CHROMIUM_texture_compression_dxt3].m_supported - ; - - s_textureFormat[TextureFormat::BC3].m_supported |= bc123Supported - || s_extension[Extension::ANGLE_texture_compression_dxt5 ].m_supported - || s_extension[Extension::CHROMIUM_texture_compression_dxt5].m_supported - ; - - if (s_extension[Extension::EXT_texture_compression_latc].m_supported) - { - setTextureFormat(TextureFormat::BC4, GL_COMPRESSED_LUMINANCE_LATC1_EXT, GL_COMPRESSED_LUMINANCE_LATC1_EXT); - setTextureFormat(TextureFormat::BC5, GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT); - } - - if (s_extension[Extension::ARB_texture_compression_rgtc].m_supported - || s_extension[Extension::EXT_texture_compression_rgtc].m_supported) - { - setTextureFormat(TextureFormat::BC4, GL_COMPRESSED_RED_RGTC1, GL_COMPRESSED_RED_RGTC1); - setTextureFormat(TextureFormat::BC5, GL_COMPRESSED_RG_RGTC2, GL_COMPRESSED_RG_RGTC2); - } - - bool etc1Supported = 0 - || s_extension[Extension::OES_compressed_ETC1_RGB8_texture].m_supported - || s_extension[Extension::WEBGL_compressed_texture_etc1 ].m_supported - ; - s_textureFormat[TextureFormat::ETC1].m_supported |= etc1Supported; - - bool etc2Supported = !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::ARB_ES3_compatibility].m_supported - ; - s_textureFormat[TextureFormat::ETC2 ].m_supported |= etc2Supported; - s_textureFormat[TextureFormat::ETC2A ].m_supported |= etc2Supported; - s_textureFormat[TextureFormat::ETC2A1].m_supported |= etc2Supported; - - if (!s_textureFormat[TextureFormat::ETC1].m_supported - && s_textureFormat[TextureFormat::ETC2].m_supported) - { - // When ETC2 is supported override ETC1 texture format settings. - s_textureFormat[TextureFormat::ETC1].m_internalFmt = GL_COMPRESSED_RGB8_ETC2; - s_textureFormat[TextureFormat::ETC1].m_fmt = GL_COMPRESSED_RGB8_ETC2; - s_textureFormat[TextureFormat::ETC1].m_supported = true; - } - - bool ptc1Supported = 0 - || s_extension[Extension::IMG_texture_compression_pvrtc ].m_supported - || s_extension[Extension::WEBGL_compressed_texture_pvrtc].m_supported - ; - s_textureFormat[TextureFormat::PTC12 ].m_supported |= ptc1Supported; - s_textureFormat[TextureFormat::PTC14 ].m_supported |= ptc1Supported; - s_textureFormat[TextureFormat::PTC12A].m_supported |= ptc1Supported; - s_textureFormat[TextureFormat::PTC14A].m_supported |= ptc1Supported; - - bool ptc2Supported = s_extension[Extension::IMG_texture_compression_pvrtc2].m_supported; - s_textureFormat[TextureFormat::PTC22].m_supported |= ptc2Supported; - s_textureFormat[TextureFormat::PTC24].m_supported |= ptc2Supported; - - if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) ) - { - setTextureFormat(TextureFormat::D32, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT); - - if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES < 30) ) - { - setTextureFormat(TextureFormat::RGBA16F, GL_RGBA, GL_RGBA, GL_HALF_FLOAT); - setTextureFormat(TextureFormat::RGBA32F, GL_RGBA, GL_RGBA, GL_FLOAT); - // internalFormat and format must match: - // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml - setTextureFormat(TextureFormat::RGBA8, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE); - setTextureFormat(TextureFormat::R5G6B5, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV); - setTextureFormat(TextureFormat::RGBA4, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4_REV); - setTextureFormat(TextureFormat::RGB5A1, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV); - - if (s_extension[Extension::OES_texture_half_float].m_supported - || s_extension[Extension::OES_texture_float ].m_supported) - { - // https://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt - // When half/float is available via extensions texture will be marked as - // incomplete if it uses anything other than nearest filter. - const bool linear16F = s_extension[Extension::OES_texture_half_float_linear].m_supported; - const bool linear32F = s_extension[Extension::OES_texture_float_linear ].m_supported; - - s_textureFilter[TextureFormat::R16F] = linear16F; - s_textureFilter[TextureFormat::RG16F] = linear16F; - s_textureFilter[TextureFormat::RGBA16F] = linear16F; - s_textureFilter[TextureFormat::R32F] = linear32F; - s_textureFilter[TextureFormat::RG32F] = linear32F; - s_textureFilter[TextureFormat::RGBA32F] = linear32F; - } - - if (BX_ENABLED(BX_PLATFORM_IOS) || BX_ENABLED(BX_PLATFORM_EMSCRIPTEN)) - { - setTextureFormat(TextureFormat::D16, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT); - setTextureFormat(TextureFormat::D24S8, GL_DEPTH_STENCIL, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); - } - } - } - if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) - || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) ) + && !s_extension[Extension::ARB_framebuffer_object].m_supported) { - setTextureFormat(TextureFormat::R8I, GL_R8I, GL_RED_INTEGER, GL_BYTE); - setTextureFormat(TextureFormat::R8U, GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE); - setTextureFormat(TextureFormat::R16I, GL_R16I, GL_RED_INTEGER, GL_SHORT); - setTextureFormat(TextureFormat::R16U, GL_R16UI, GL_RED_INTEGER, GL_UNSIGNED_SHORT); -// setTextureFormat(TextureFormat::RG16, GL_RG16UI, GL_RG_INTEGER, GL_UNSIGNED_SHORT); -// setTextureFormat(TextureFormat::RGBA16, GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT); - setTextureFormat(TextureFormat::R32U, GL_R32UI, GL_RED_INTEGER, GL_UNSIGNED_INT); - setTextureFormat(TextureFormat::RG32U, GL_RG32UI, GL_RG_INTEGER, GL_UNSIGNED_INT); - setTextureFormat(TextureFormat::RGBA32U, GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT); + BX_TRACE("Init error: ARB_framebuffer_object not supported."); + goto error; } - if (s_extension[Extension::EXT_texture_format_BGRA8888 ].m_supported - || s_extension[Extension::EXT_bgra ].m_supported - || s_extension[Extension::IMG_texture_format_BGRA8888 ].m_supported - || s_extension[Extension::APPLE_texture_format_BGRA8888].m_supported) { - if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) ) + // Allow all texture filters. + bx::memSet(s_textureFilter, true, BX_COUNTOF(s_textureFilter) ); + + bool bc123Supported = 0 + || s_extension[Extension::EXT_texture_compression_s3tc ].m_supported + || s_extension[Extension::MOZ_WEBGL_compressed_texture_s3tc ].m_supported + || s_extension[Extension::WEBGL_compressed_texture_s3tc ].m_supported + || s_extension[Extension::WEBKIT_WEBGL_compressed_texture_s3tc].m_supported + ; + s_textureFormat[TextureFormat::BC1].m_supported |= bc123Supported + || s_extension[Extension::ANGLE_texture_compression_dxt1].m_supported + || s_extension[Extension::EXT_texture_compression_dxt1 ].m_supported + ; + + if (!s_textureFormat[TextureFormat::BC1].m_supported + && ( s_textureFormat[TextureFormat::BC2].m_supported || s_textureFormat[TextureFormat::BC3].m_supported) ) + { + // If RGBA_S3TC_DXT1 is not supported, maybe RGB_S3TC_DXT1 is? + for (GLint ii = 0; ii < numCmpFormats; ++ii) + { + if (GL_COMPRESSED_RGB_S3TC_DXT1_EXT == cmpFormat[ii]) + { + setTextureFormat(TextureFormat::BC1, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGB_S3TC_DXT1_EXT); + s_textureFormat[TextureFormat::BC1].m_supported = true; + break; + } + } + } + + s_textureFormat[TextureFormat::BC2].m_supported |= bc123Supported + || s_extension[Extension::ANGLE_texture_compression_dxt3 ].m_supported + || s_extension[Extension::CHROMIUM_texture_compression_dxt3].m_supported + ; + + s_textureFormat[TextureFormat::BC3].m_supported |= bc123Supported + || s_extension[Extension::ANGLE_texture_compression_dxt5 ].m_supported + || s_extension[Extension::CHROMIUM_texture_compression_dxt5].m_supported + ; + + if (s_extension[Extension::EXT_texture_compression_latc].m_supported) + { + setTextureFormat(TextureFormat::BC4, GL_COMPRESSED_LUMINANCE_LATC1_EXT, GL_COMPRESSED_LUMINANCE_LATC1_EXT); + setTextureFormat(TextureFormat::BC5, GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT, GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT); + } + + if (s_extension[Extension::ARB_texture_compression_rgtc].m_supported + || s_extension[Extension::EXT_texture_compression_rgtc].m_supported) + { + setTextureFormat(TextureFormat::BC4, GL_COMPRESSED_RED_RGTC1, GL_COMPRESSED_RED_RGTC1); + setTextureFormat(TextureFormat::BC5, GL_COMPRESSED_RG_RGTC2, GL_COMPRESSED_RG_RGTC2); + } + + bool etc1Supported = 0 + || s_extension[Extension::OES_compressed_ETC1_RGB8_texture].m_supported + || s_extension[Extension::WEBGL_compressed_texture_etc1 ].m_supported + ; + s_textureFormat[TextureFormat::ETC1].m_supported |= etc1Supported; + + bool etc2Supported = !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::ARB_ES3_compatibility].m_supported + ; + s_textureFormat[TextureFormat::ETC2 ].m_supported |= etc2Supported; + s_textureFormat[TextureFormat::ETC2A ].m_supported |= etc2Supported; + s_textureFormat[TextureFormat::ETC2A1].m_supported |= etc2Supported; + + if (!s_textureFormat[TextureFormat::ETC1].m_supported + && s_textureFormat[TextureFormat::ETC2].m_supported) + { + // When ETC2 is supported override ETC1 texture format settings. + s_textureFormat[TextureFormat::ETC1].m_internalFmt = GL_COMPRESSED_RGB8_ETC2; + s_textureFormat[TextureFormat::ETC1].m_fmt = GL_COMPRESSED_RGB8_ETC2; + s_textureFormat[TextureFormat::ETC1].m_supported = true; + } + + bool ptc1Supported = 0 + || s_extension[Extension::IMG_texture_compression_pvrtc ].m_supported + || s_extension[Extension::WEBGL_compressed_texture_pvrtc].m_supported + ; + s_textureFormat[TextureFormat::PTC12 ].m_supported |= ptc1Supported; + s_textureFormat[TextureFormat::PTC14 ].m_supported |= ptc1Supported; + s_textureFormat[TextureFormat::PTC12A].m_supported |= ptc1Supported; + s_textureFormat[TextureFormat::PTC14A].m_supported |= ptc1Supported; + + bool ptc2Supported = s_extension[Extension::IMG_texture_compression_pvrtc2].m_supported; + s_textureFormat[TextureFormat::PTC22].m_supported |= ptc2Supported; + s_textureFormat[TextureFormat::PTC24].m_supported |= ptc2Supported; + + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) ) + { + setTextureFormat(TextureFormat::D32, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT); + + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES < 30) ) + { + setTextureFormat(TextureFormat::RGBA16F, GL_RGBA, GL_RGBA, GL_HALF_FLOAT); + setTextureFormat(TextureFormat::RGBA32F, GL_RGBA, GL_RGBA, GL_FLOAT); + // internalFormat and format must match: + // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml + setTextureFormat(TextureFormat::RGBA8, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE); + setTextureFormat(TextureFormat::R5G6B5, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV); + setTextureFormat(TextureFormat::RGBA4, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4_REV); + setTextureFormat(TextureFormat::RGB5A1, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV); + + if (s_extension[Extension::OES_texture_half_float].m_supported + || s_extension[Extension::OES_texture_float ].m_supported) + { + // https://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt + // When half/float is available via extensions texture will be marked as + // incomplete if it uses anything other than nearest filter. + const bool linear16F = s_extension[Extension::OES_texture_half_float_linear].m_supported; + const bool linear32F = s_extension[Extension::OES_texture_float_linear ].m_supported; + + s_textureFilter[TextureFormat::R16F] = linear16F; + s_textureFilter[TextureFormat::RG16F] = linear16F; + s_textureFilter[TextureFormat::RGBA16F] = linear16F; + s_textureFilter[TextureFormat::R32F] = linear32F; + s_textureFilter[TextureFormat::RG32F] = linear32F; + s_textureFilter[TextureFormat::RGBA32F] = linear32F; + } + + if (BX_ENABLED(BX_PLATFORM_IOS) || BX_ENABLED(BX_PLATFORM_EMSCRIPTEN)) + { + setTextureFormat(TextureFormat::D16, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT); + setTextureFormat(TextureFormat::D24S8, GL_DEPTH_STENCIL, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); + } + } + } + + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) + || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) ) + { + setTextureFormat(TextureFormat::R8I, GL_R8I, GL_RED_INTEGER, GL_BYTE); + setTextureFormat(TextureFormat::R8U, GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE); + setTextureFormat(TextureFormat::R16I, GL_R16I, GL_RED_INTEGER, GL_SHORT); + setTextureFormat(TextureFormat::R16U, GL_R16UI, GL_RED_INTEGER, GL_UNSIGNED_SHORT); + // setTextureFormat(TextureFormat::RG16, GL_RG16UI, GL_RG_INTEGER, GL_UNSIGNED_SHORT); + // setTextureFormat(TextureFormat::RGBA16, GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT); + setTextureFormat(TextureFormat::R32U, GL_R32UI, GL_RED_INTEGER, GL_UNSIGNED_INT); + setTextureFormat(TextureFormat::RG32U, GL_RG32UI, GL_RG_INTEGER, GL_UNSIGNED_INT); + setTextureFormat(TextureFormat::RGBA32U, GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT); + } + + if (s_extension[Extension::EXT_texture_format_BGRA8888 ].m_supported + || s_extension[Extension::EXT_bgra ].m_supported + || s_extension[Extension::IMG_texture_format_BGRA8888 ].m_supported + || s_extension[Extension::APPLE_texture_format_BGRA8888].m_supported) + { + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) ) + { + m_readPixelsFmt = GL_BGRA; + } + + // Mixing GLES and GL extensions here. OpenGL EXT_bgra and + // APPLE_texture_format_BGRA8888 wants + // format to be BGRA but internal format to stay RGBA, but + // EXT_texture_format_BGRA8888 wants both format and internal + // format to be BGRA. + // + // Reference: + // https://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_format_BGRA8888.txt + // https://www.opengl.org/registry/specs/EXT/bgra.txt + // https://www.khronos.org/registry/gles/extensions/APPLE/APPLE_texture_format_BGRA8888.txt + if (!s_extension[Extension::EXT_bgra ].m_supported + && !s_extension[Extension::APPLE_texture_format_BGRA8888].m_supported) + { + s_textureFormat[TextureFormat::BGRA8].m_internalFmt = GL_BGRA; + } + + if (!isTextureFormatValid(TextureFormat::BGRA8) ) + { + // Revert back to RGBA if texture can't be created. + setTextureFormat(TextureFormat::BGRA8, GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE); + } + } + + if (BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) + || !isTextureFormatValid(TextureFormat::R8) ) + { + // GL core has to use GL_R8 Issue#208, GLES2 has to use GL_LUMINANCE issue#226 + s_textureFormat[TextureFormat::R8].m_internalFmt = GL_LUMINANCE; + s_textureFormat[TextureFormat::R8].m_fmt = GL_LUMINANCE; + } + + for (uint32_t ii = BX_ENABLED(BX_PLATFORM_IOS) ? TextureFormat::Unknown : 0 // skip test on iOS! + ; ii < TextureFormat::Count + ; ++ii + ) + { + if (TextureFormat::Unknown != ii + && TextureFormat::UnknownDepth != ii) + { + s_textureFormat[ii].m_supported = isTextureFormatValid(TextureFormat::Enum(ii) ); + } + } + + if (BX_ENABLED(0) ) + { + // Disable all compressed texture formats. For testing only. + for (uint32_t ii = 0; ii < TextureFormat::Unknown; ++ii) + { + s_textureFormat[ii].m_supported = false; + } + } + + const bool computeSupport = false + || !!(BGFX_CONFIG_RENDERER_OPENGLES >= 31) + || s_extension[Extension::ARB_compute_shader].m_supported + ; + + for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) + { + uint16_t supported = BGFX_CAPS_FORMAT_TEXTURE_NONE; + supported |= s_textureFormat[ii].m_supported + ? BGFX_CAPS_FORMAT_TEXTURE_2D + | BGFX_CAPS_FORMAT_TEXTURE_3D + | BGFX_CAPS_FORMAT_TEXTURE_CUBE + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + supported |= isTextureFormatValid(TextureFormat::Enum(ii), true) + ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB + | BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB + | BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + supported |= isTextureFormatValid(TextureFormat::Enum(ii), false, true) + ? BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + supported |= computeSupport + && isImageFormatValid(TextureFormat::Enum(ii) ) + ? BGFX_CAPS_FORMAT_TEXTURE_IMAGE + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + supported |= isFramebufferFormatValid(TextureFormat::Enum(ii) ) + ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + supported |= isFramebufferFormatValid(TextureFormat::Enum(ii), false, true) + ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + if (NULL != glGetInternalformativ) + { + GLint maxSamples; + glGetInternalformativ(GL_RENDERBUFFER + , s_textureFormat[ii].m_internalFmt + , GL_SAMPLES + , 1 + , &maxSamples + ); + GLenum err = glGetError(); + supported |= 0 == err && maxSamples > 0 + ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + + glGetInternalformativ(GL_TEXTURE_2D_MULTISAMPLE + , s_textureFormat[ii].m_internalFmt + , GL_SAMPLES + , 1 + , &maxSamples + ); + err = glGetError(); + supported |= 0 == err && maxSamples > 0 + ? BGFX_CAPS_FORMAT_TEXTURE_MSAA + : BGFX_CAPS_FORMAT_TEXTURE_NONE + ; + } + + g_caps.formats[ii] = supported; + } + + g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::OES_texture_3D].m_supported + ? BGFX_CAPS_TEXTURE_3D + : 0 + ; + g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::EXT_shadow_samplers].m_supported + ? BGFX_CAPS_TEXTURE_COMPARE_ALL + : 0 + ; + g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::OES_vertex_half_float].m_supported + ? BGFX_CAPS_VERTEX_ATTRIB_HALF + : 0 + ; + g_caps.supported |= false + || s_extension[Extension::ARB_vertex_type_2_10_10_10_rev].m_supported + || s_extension[Extension::OES_vertex_type_10_10_10_2].m_supported + ? BGFX_CAPS_VERTEX_ATTRIB_UINT10 + : 0 + ; + g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::EXT_frag_depth].m_supported + ? BGFX_CAPS_FRAGMENT_DEPTH + : 0 + ; + g_caps.supported |= s_extension[Extension::ARB_draw_buffers_blend].m_supported + ? BGFX_CAPS_BLEND_INDEPENDENT + : 0 + ; + g_caps.supported |= s_extension[Extension::INTEL_fragment_shader_ordering].m_supported + ? BGFX_CAPS_FRAGMENT_ORDERING + : 0 + ; + g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::OES_element_index_uint].m_supported + ? BGFX_CAPS_INDEX32 + : 0 + ; + + const bool drawIndirectSupported = false + || s_extension[Extension::AMD_multi_draw_indirect].m_supported + || s_extension[Extension::ARB_draw_indirect ].m_supported + || s_extension[Extension::ARB_multi_draw_indirect].m_supported + || s_extension[Extension::EXT_multi_draw_indirect].m_supported + ; + + if (drawIndirectSupported) + { + if (NULL == glMultiDrawArraysIndirect + || NULL == glMultiDrawElementsIndirect) + { + glMultiDrawArraysIndirect = stubMultiDrawArraysIndirect; + glMultiDrawElementsIndirect = stubMultiDrawElementsIndirect; + } + } + + g_caps.supported |= drawIndirectSupported + ? BGFX_CAPS_DRAW_INDIRECT + : 0 + ; + + if (NULL == glPolygonMode) + { + glPolygonMode = stubPolygonMode; + } + + if (s_extension[Extension::ARB_copy_image].m_supported + || s_extension[Extension::EXT_copy_image].m_supported + || s_extension[Extension:: NV_copy_image].m_supported + || s_extension[Extension::OES_copy_image].m_supported) + { + m_blitSupported = NULL != glCopyImageSubData; + g_caps.supported |= m_blitSupported + ? BGFX_CAPS_TEXTURE_BLIT + : 0 + ; + } + + g_caps.supported |= m_readBackSupported + ? BGFX_CAPS_TEXTURE_READ_BACK + : 0 + ; + + g_caps.supported |= false + || s_extension[Extension::EXT_texture_array].m_supported + || s_extension[Extension::EXT_gpu_shader4].m_supported + || !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30) + ? BGFX_CAPS_TEXTURE_2D_ARRAY + : 0 + ; + + g_caps.supported |= false + || s_extension[Extension::ARB_texture_cube_map_array].m_supported + || s_extension[Extension::EXT_texture_cube_map_array].m_supported + ? BGFX_CAPS_TEXTURE_CUBE_ARRAY + : 0 + ; + + g_caps.limits.maxTextureSize = uint16_t(glGet(GL_MAX_TEXTURE_SIZE) ); + + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) + || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::EXT_draw_buffers ].m_supported + || s_extension[Extension::WEBGL_draw_buffers].m_supported) + { + g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(glGet(GL_MAX_DRAW_BUFFERS) + , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) + ); + } + + // if (s_extension[Extension::ARB_clip_control].m_supported) + // { + // GL_CHECK(glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE) ); + // g_caps.originBottomLeft = true; + // } + // else + { + g_caps.homogeneousDepth = true; + g_caps.originBottomLeft = true; + } + + m_vaoSupport = !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::ARB_vertex_array_object].m_supported + || s_extension[Extension::OES_vertex_array_object].m_supported + ; + + if (m_vaoSupport) + { + GL_CHECK(glGenVertexArrays(1, &m_vao) ); + } + + m_samplerObjectSupport = !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::ARB_sampler_objects].m_supported + ; + + m_shadowSamplersSupport = !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::EXT_shadow_samplers].m_supported + ; + + m_programBinarySupport = !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::ARB_get_program_binary].m_supported + || s_extension[Extension::OES_get_program_binary].m_supported + || s_extension[Extension::IMG_shader_binary ].m_supported + ; + + m_textureSwizzleSupport = false + || s_extension[Extension::ARB_texture_swizzle].m_supported + || s_extension[Extension::EXT_texture_swizzle].m_supported + ; + + m_depthTextureSupport = !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) + || s_extension[Extension::ANGLE_depth_texture ].m_supported + || s_extension[Extension::CHROMIUM_depth_texture ].m_supported + || s_extension[Extension::GOOGLE_depth_texture ].m_supported + || s_extension[Extension::OES_depth_texture ].m_supported + || s_extension[Extension::MOZ_WEBGL_depth_texture ].m_supported + || s_extension[Extension::WEBGL_depth_texture ].m_supported + || s_extension[Extension::WEBKIT_WEBGL_depth_texture].m_supported + ; + + m_timerQuerySupport = false + || s_extension[Extension::ANGLE_timer_query ].m_supported + || s_extension[Extension::ARB_timer_query ].m_supported + || s_extension[Extension::EXT_disjoint_timer_query].m_supported + || s_extension[Extension::EXT_timer_query ].m_supported + ; + + m_timerQuerySupport &= true + && NULL != glQueryCounter + && NULL != glGetQueryObjectiv + && NULL != glGetQueryObjectui64v + ; + + m_occlusionQuerySupport = false + || s_extension[Extension::ARB_occlusion_query ].m_supported + || s_extension[Extension::ARB_occlusion_query2 ].m_supported + || s_extension[Extension::EXT_occlusion_query_boolean].m_supported + || s_extension[Extension::NV_occlusion_query ].m_supported + ; + + m_occlusionQuerySupport &= true + && NULL != glGenQueries + && NULL != glDeleteQueries + && NULL != glBeginQuery + && NULL != glEndQuery + ; + + m_atocSupport = s_extension[Extension::ARB_multisample].m_supported; + m_conservativeRasterSupport = s_extension[Extension::NV_conservative_raster].m_supported; + + g_caps.supported |= 0 + | (m_atocSupport ? BGFX_CAPS_ALPHA_TO_COVERAGE : 0) + | (m_conservativeRasterSupport ? BGFX_CAPS_CONSERVATIVE_RASTER : 0) + | (m_occlusionQuerySupport ? BGFX_CAPS_OCCLUSION_QUERY : 0) + | (m_depthTextureSupport ? BGFX_CAPS_TEXTURE_COMPARE_LEQUAL : 0) + | (computeSupport ? BGFX_CAPS_COMPUTE : 0) + ; + + g_caps.supported |= m_glctx.getCaps(); + + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) ) + { + m_srgbWriteControlSupport = s_extension[Extension::EXT_sRGB_write_control].m_supported; + + m_borderColorSupport = s_extension[Extension::NV_texture_border_clamp].m_supported; + s_textureAddress[BGFX_TEXTURE_U_BORDER>>BGFX_TEXTURE_U_SHIFT] = s_extension[Extension::NV_texture_border_clamp].m_supported + ? GL_CLAMP_TO_BORDER + : GL_CLAMP_TO_EDGE + ; + } + + if (s_extension[Extension::EXT_texture_filter_anisotropic].m_supported) + { + GL_CHECK(glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &m_maxAnisotropyDefault) ); + } + + if (s_extension[Extension::ARB_texture_multisample].m_supported + || s_extension[Extension::ANGLE_framebuffer_multisample].m_supported) + { + GL_CHECK(glGetIntegerv(GL_MAX_SAMPLES, &m_maxMsaa) ); + } + + if (s_extension[Extension::OES_read_format].m_supported + && (s_extension[Extension::IMG_read_format].m_supported || s_extension[Extension::EXT_read_format_bgra].m_supported) ) { m_readPixelsFmt = GL_BGRA; } - - // Mixing GLES and GL extensions here. OpenGL EXT_bgra and - // APPLE_texture_format_BGRA8888 wants - // format to be BGRA but internal format to stay RGBA, but - // EXT_texture_format_BGRA8888 wants both format and internal - // format to be BGRA. - // - // Reference: - // https://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_format_BGRA8888.txt - // https://www.opengl.org/registry/specs/EXT/bgra.txt - // https://www.khronos.org/registry/gles/extensions/APPLE/APPLE_texture_format_BGRA8888.txt - if (!s_extension[Extension::EXT_bgra ].m_supported - && !s_extension[Extension::APPLE_texture_format_BGRA8888].m_supported) + else { - s_textureFormat[TextureFormat::BGRA8].m_internalFmt = GL_BGRA; + m_readPixelsFmt = GL_RGBA; } - if (!isTextureFormatValid(TextureFormat::BGRA8) ) + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) ) { - // Revert back to RGBA if texture can't be created. - setTextureFormat(TextureFormat::BGRA8, GL_RGBA, GL_BGRA, GL_UNSIGNED_BYTE); + g_caps.supported |= BGFX_CAPS_INSTANCING; } - } - - if (BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) - || !isTextureFormatValid(TextureFormat::R8) ) - { - // GL core has to use GL_R8 Issue#208, GLES2 has to use GL_LUMINANCE issue#226 - s_textureFormat[TextureFormat::R8].m_internalFmt = GL_LUMINANCE; - s_textureFormat[TextureFormat::R8].m_fmt = GL_LUMINANCE; - } - - for (uint32_t ii = BX_ENABLED(BX_PLATFORM_IOS) ? TextureFormat::Unknown : 0 // skip test on iOS! - ; ii < TextureFormat::Count - ; ++ii - ) - { - if (TextureFormat::Unknown != ii - && TextureFormat::UnknownDepth != ii) + else { - s_textureFormat[ii].m_supported = isTextureFormatValid(TextureFormat::Enum(ii) ); - } - } - - if (BX_ENABLED(0) ) - { - // Disable all compressed texture formats. For testing only. - for (uint32_t ii = 0; ii < TextureFormat::Unknown; ++ii) - { - s_textureFormat[ii].m_supported = false; - } - } - - const bool computeSupport = false - || !!(BGFX_CONFIG_RENDERER_OPENGLES >= 31) - || s_extension[Extension::ARB_compute_shader].m_supported - ; - - for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) - { - uint16_t supported = BGFX_CAPS_FORMAT_TEXTURE_NONE; - supported |= s_textureFormat[ii].m_supported - ? BGFX_CAPS_FORMAT_TEXTURE_2D - | BGFX_CAPS_FORMAT_TEXTURE_3D - | BGFX_CAPS_FORMAT_TEXTURE_CUBE - : BGFX_CAPS_FORMAT_TEXTURE_NONE - ; - - supported |= isTextureFormatValid(TextureFormat::Enum(ii), true) - ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB - | BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB - | BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB - : BGFX_CAPS_FORMAT_TEXTURE_NONE - ; - - supported |= isTextureFormatValid(TextureFormat::Enum(ii), false, true) - ? BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN - : BGFX_CAPS_FORMAT_TEXTURE_NONE - ; - - supported |= computeSupport - && isImageFormatValid(TextureFormat::Enum(ii) ) - ? BGFX_CAPS_FORMAT_TEXTURE_IMAGE - : BGFX_CAPS_FORMAT_TEXTURE_NONE - ; - - supported |= isFramebufferFormatValid(TextureFormat::Enum(ii) ) - ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER - : BGFX_CAPS_FORMAT_TEXTURE_NONE - ; - - if (NULL != glGetInternalformativ) - { - GLint maxSamples; - glGetInternalformativ(GL_RENDERBUFFER - , s_textureFormat[ii].m_internalFmt - , GL_SAMPLES - , 1 - , &maxSamples - ); - GLenum err = glGetError(); - supported |= 0 == err && maxSamples > 0 - ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA - : BGFX_CAPS_FORMAT_TEXTURE_NONE - ; - - glGetInternalformativ(GL_TEXTURE_2D_MULTISAMPLE - , s_textureFormat[ii].m_internalFmt - , GL_SAMPLES - , 1 - , &maxSamples - ); - err = glGetError(); - supported |= 0 == err && maxSamples > 0 - ? BGFX_CAPS_FORMAT_TEXTURE_MSAA - : BGFX_CAPS_FORMAT_TEXTURE_NONE - ; - } - - g_caps.formats[ii] = supported; - } - - g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::OES_texture_3D].m_supported - ? BGFX_CAPS_TEXTURE_3D - : 0 - ; - g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::EXT_shadow_samplers].m_supported - ? BGFX_CAPS_TEXTURE_COMPARE_ALL - : 0 - ; - g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::OES_vertex_half_float].m_supported - ? BGFX_CAPS_VERTEX_ATTRIB_HALF - : 0 - ; - g_caps.supported |= false - || s_extension[Extension::ARB_vertex_type_2_10_10_10_rev].m_supported - || s_extension[Extension::OES_vertex_type_10_10_10_2].m_supported - ? BGFX_CAPS_VERTEX_ATTRIB_UINT10 - : 0 - ; - g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::EXT_frag_depth].m_supported - ? BGFX_CAPS_FRAGMENT_DEPTH - : 0 - ; - g_caps.supported |= s_extension[Extension::ARB_draw_buffers_blend].m_supported - ? BGFX_CAPS_BLEND_INDEPENDENT - : 0 - ; - g_caps.supported |= s_extension[Extension::INTEL_fragment_shader_ordering].m_supported - ? BGFX_CAPS_FRAGMENT_ORDERING - : 0 - ; - g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::OES_element_index_uint].m_supported - ? BGFX_CAPS_INDEX32 - : 0 - ; - - const bool drawIndirectSupported = false - || s_extension[Extension::AMD_multi_draw_indirect].m_supported - || s_extension[Extension::ARB_draw_indirect ].m_supported - || s_extension[Extension::ARB_multi_draw_indirect].m_supported - || s_extension[Extension::EXT_multi_draw_indirect].m_supported - ; - - if (drawIndirectSupported) - { - if (NULL == glMultiDrawArraysIndirect - || NULL == glMultiDrawElementsIndirect) - { - glMultiDrawArraysIndirect = stubMultiDrawArraysIndirect; - glMultiDrawElementsIndirect = stubMultiDrawElementsIndirect; - } - } - - g_caps.supported |= drawIndirectSupported - ? BGFX_CAPS_DRAW_INDIRECT - : 0 - ; - - if (NULL == glPolygonMode) - { - glPolygonMode = stubPolygonMode; - } - - if (s_extension[Extension::ARB_copy_image].m_supported - || s_extension[Extension::EXT_copy_image].m_supported - || s_extension[Extension:: NV_copy_image].m_supported - || s_extension[Extension::OES_copy_image].m_supported) - { - m_blitSupported = NULL != glCopyImageSubData; - g_caps.supported |= m_blitSupported - ? BGFX_CAPS_TEXTURE_BLIT - : 0 - ; - } - - g_caps.supported |= m_readBackSupported - ? BGFX_CAPS_TEXTURE_READ_BACK - : 0 - ; - - g_caps.supported |= false - || s_extension[Extension::EXT_texture_array].m_supported - || s_extension[Extension::EXT_gpu_shader4].m_supported - || !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30) - ? BGFX_CAPS_TEXTURE_2D_ARRAY - : 0 - ; - - g_caps.supported |= false - || s_extension[Extension::ARB_texture_cube_map_array].m_supported - || s_extension[Extension::EXT_texture_cube_map_array].m_supported - ? BGFX_CAPS_TEXTURE_CUBE_ARRAY - : 0 - ; - - g_caps.limits.maxTextureSize = uint16_t(glGet(GL_MAX_TEXTURE_SIZE) ); - - if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) - || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::EXT_draw_buffers ].m_supported - || s_extension[Extension::WEBGL_draw_buffers].m_supported) - { - g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(glGet(GL_MAX_DRAW_BUFFERS) - , BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) - ); - } - -// if (s_extension[Extension::ARB_clip_control].m_supported) -// { -// GL_CHECK(glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE) ); -// g_caps.originBottomLeft = true; -// } -// else - { - g_caps.homogeneousDepth = true; - g_caps.originBottomLeft = true; - } - - m_vaoSupport = !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::ARB_vertex_array_object].m_supported - || s_extension[Extension::OES_vertex_array_object].m_supported - ; - - if (BX_ENABLED(BX_PLATFORM_NACL) ) - { - m_vaoSupport &= true - && NULL != glGenVertexArrays - && NULL != glDeleteVertexArrays - && NULL != glBindVertexArray - ; - } - - if (m_vaoSupport) - { - GL_CHECK(glGenVertexArrays(1, &m_vao) ); - } - - m_samplerObjectSupport = !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::ARB_sampler_objects].m_supported - ; - - m_shadowSamplersSupport = !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::EXT_shadow_samplers].m_supported - ; - - m_programBinarySupport = !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::ARB_get_program_binary].m_supported - || s_extension[Extension::OES_get_program_binary].m_supported - || s_extension[Extension::IMG_shader_binary ].m_supported - ; - - m_textureSwizzleSupport = false - || s_extension[Extension::ARB_texture_swizzle].m_supported - || s_extension[Extension::EXT_texture_swizzle].m_supported - ; - - m_depthTextureSupport = !!(BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES >= 30) - || s_extension[Extension::ANGLE_depth_texture ].m_supported - || s_extension[Extension::CHROMIUM_depth_texture ].m_supported - || s_extension[Extension::GOOGLE_depth_texture ].m_supported - || s_extension[Extension::OES_depth_texture ].m_supported - || s_extension[Extension::MOZ_WEBGL_depth_texture ].m_supported - || s_extension[Extension::WEBGL_depth_texture ].m_supported - || s_extension[Extension::WEBKIT_WEBGL_depth_texture].m_supported - ; - - m_timerQuerySupport = false - || s_extension[Extension::ANGLE_timer_query ].m_supported - || s_extension[Extension::ARB_timer_query ].m_supported - || s_extension[Extension::EXT_disjoint_timer_query].m_supported - || s_extension[Extension::EXT_timer_query ].m_supported - ; - - m_timerQuerySupport &= true - && NULL != glQueryCounter - && NULL != glGetQueryObjectiv - && NULL != glGetQueryObjectui64v - ; - - m_occlusionQuerySupport = false - || s_extension[Extension::ARB_occlusion_query ].m_supported - || s_extension[Extension::ARB_occlusion_query2 ].m_supported - || s_extension[Extension::EXT_occlusion_query_boolean].m_supported - || s_extension[Extension::NV_occlusion_query ].m_supported - ; - - m_occlusionQuerySupport &= true - && NULL != glGenQueries - && NULL != glDeleteQueries - && NULL != glBeginQuery - && NULL != glEndQuery - ; - - m_atocSupport = s_extension[Extension::ARB_multisample].m_supported; - m_conservativeRasterSupport = s_extension[Extension::NV_conservative_raster].m_supported; - - g_caps.supported |= 0 - | (m_atocSupport ? BGFX_CAPS_ALPHA_TO_COVERAGE : 0) - | (m_conservativeRasterSupport ? BGFX_CAPS_CONSERVATIVE_RASTER : 0) - | (m_occlusionQuerySupport ? BGFX_CAPS_OCCLUSION_QUERY : 0) - | (m_depthTextureSupport ? BGFX_CAPS_TEXTURE_COMPARE_LEQUAL : 0) - | (computeSupport ? BGFX_CAPS_COMPUTE : 0) - ; - - g_caps.supported |= m_glctx.getCaps(); - - if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES) ) - { - m_srgbWriteControlSupport = s_extension[Extension::EXT_sRGB_write_control].m_supported; - - m_borderColorSupport = s_extension[Extension::NV_texture_border_clamp].m_supported; - s_textureAddress[BGFX_TEXTURE_U_BORDER>>BGFX_TEXTURE_U_SHIFT] = s_extension[Extension::NV_texture_border_clamp].m_supported - ? GL_CLAMP_TO_BORDER - : GL_CLAMP_TO_EDGE - ; - } - - if (s_extension[Extension::EXT_texture_filter_anisotropic].m_supported) - { - GL_CHECK(glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &m_maxAnisotropyDefault) ); - } - - if (s_extension[Extension::ARB_texture_multisample].m_supported - || s_extension[Extension::ANGLE_framebuffer_multisample].m_supported) - { - GL_CHECK(glGetIntegerv(GL_MAX_SAMPLES, &m_maxMsaa) ); - } - - if (s_extension[Extension::OES_read_format].m_supported - && (s_extension[Extension::IMG_read_format].m_supported || s_extension[Extension::EXT_read_format_bgra].m_supported) ) - { - m_readPixelsFmt = GL_BGRA; - } - else - { - m_readPixelsFmt = GL_RGBA; - } - - if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) ) - { - g_caps.supported |= BGFX_CAPS_INSTANCING; - } - else - { - if (s_extension[Extension::ANGLE_instanced_arrays].m_supported - || s_extension[Extension::ARB_instanced_arrays].m_supported - || s_extension[Extension::EXT_instanced_arrays].m_supported) - { - if (NULL != glVertexAttribDivisor - && NULL != glDrawArraysInstanced - && NULL != glDrawElementsInstanced) + if (s_extension[Extension::ANGLE_instanced_arrays].m_supported + || s_extension[Extension::ARB_instanced_arrays].m_supported + || s_extension[Extension::EXT_instanced_arrays].m_supported) { - g_caps.supported |= BGFX_CAPS_INSTANCING; + if (NULL != glVertexAttribDivisor + && NULL != glDrawArraysInstanced + && NULL != glDrawElementsInstanced) + { + g_caps.supported |= BGFX_CAPS_INSTANCING; + } + } + + if (0 == (g_caps.supported & BGFX_CAPS_INSTANCING) ) + { + glVertexAttribDivisor = stubVertexAttribDivisor; + glDrawArraysInstanced = stubDrawArraysInstanced; + glDrawElementsInstanced = stubDrawElementsInstanced; } } - if (0 == (g_caps.supported & BGFX_CAPS_INSTANCING) ) + if (s_extension[Extension::ARB_debug_output].m_supported + || s_extension[Extension::KHR_debug].m_supported) { - glVertexAttribDivisor = stubVertexAttribDivisor; - glDrawArraysInstanced = stubDrawArraysInstanced; - glDrawElementsInstanced = stubDrawElementsInstanced; - } - } - - if (s_extension[Extension::ARB_debug_output].m_supported - || s_extension[Extension::KHR_debug].m_supported) - { - if (NULL != glDebugMessageControl - && NULL != glDebugMessageInsert - && NULL != glDebugMessageCallback - && NULL != glGetDebugMessageLog) - { - GL_CHECK(glDebugMessageCallback(debugProcCb, NULL) ); - GL_CHECK(glDebugMessageControl(GL_DONT_CARE + if (NULL != glDebugMessageControl + && NULL != glDebugMessageInsert + && NULL != glDebugMessageCallback + && NULL != glGetDebugMessageLog) + { + GL_CHECK(glDebugMessageCallback(debugProcCb, NULL) ); + GL_CHECK(glDebugMessageControl(GL_DONT_CARE , GL_DONT_CARE , GL_DEBUG_SEVERITY_MEDIUM , 0 , NULL , GL_TRUE ) ); + } } + + if (s_extension[Extension::ARB_seamless_cube_map].m_supported) + { + GL_CHECK(glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS) ); + } + + if (NULL == glFrameTerminatorGREMEDY + || !s_extension[Extension::GREMEDY_frame_terminator].m_supported) + { + glFrameTerminatorGREMEDY = stubFrameTerminatorGREMEDY; + } + + if (NULL == glInsertEventMarker + || !s_extension[Extension::EXT_debug_marker].m_supported) + { + glInsertEventMarker = (NULL != glStringMarkerGREMEDY && s_extension[Extension::GREMEDY_string_marker].m_supported) + ? stubInsertEventMarkerGREMEDY + : stubInsertEventMarker + ; + } + + setGraphicsDebuggerPresent(s_extension[Extension::EXT_debug_tool].m_supported); + + if (NULL == glObjectLabel) + { + glObjectLabel = stubObjectLabel; + } + + if (NULL == glInvalidateFramebuffer) + { + glInvalidateFramebuffer = stubInvalidateFramebuffer; + } + + if (m_timerQuerySupport) + { + m_gpuTimer.create(); + } + + if (m_occlusionQuerySupport) + { + m_occlusionQuery.create(); + } + + // Init reserved part of view name. + for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) + { + bx::snprintf(s_viewName[ii], BGFX_CONFIG_MAX_VIEW_NAME_RESERVED+1, "%3d ", ii); + } + + ovrPostReset(); + + m_needPresent = false; } - if (s_extension[Extension::ARB_seamless_cube_map].m_supported) + return true; + + error: + switch (errorState) { - GL_CHECK(glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS) ); + case ErrorState::Default: + break; } - if (NULL == glFrameTerminatorGREMEDY - || !s_extension[Extension::GREMEDY_frame_terminator].m_supported) - { - glFrameTerminatorGREMEDY = stubFrameTerminatorGREMEDY; - } + ovrPreReset(); + m_ovr.shutdown(); - if (NULL == glInsertEventMarker - || !s_extension[Extension::EXT_debug_marker].m_supported) - { - glInsertEventMarker = (NULL != glStringMarkerGREMEDY && s_extension[Extension::GREMEDY_string_marker].m_supported) - ? stubInsertEventMarkerGREMEDY - : stubInsertEventMarker - ; - } + m_glctx.destroy(); - setGraphicsDebuggerPresent(s_extension[Extension::EXT_debug_tool].m_supported); - - if (NULL == glObjectLabel) - { - glObjectLabel = stubObjectLabel; - } - - if (NULL == glInvalidateFramebuffer) - { - glInvalidateFramebuffer = stubInvalidateFramebuffer; - } - - if (m_timerQuerySupport) - { - m_gpuTimer.create(); - } - - if (m_occlusionQuerySupport) - { - m_occlusionQuery.create(); - } - - // Init reserved part of view name. - for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) - { - bx::snprintf(s_viewName[ii], BGFX_CONFIG_MAX_VIEW_NAME_RESERVED+1, "%3d ", ii); - } - - ovrPostReset(); - - m_needPresent = false; - - BGFX_GPU_PROFILER_BIND(); + unloadRenderDoc(m_renderdocdll); + return false; } void shutdown() { - BGFX_GPU_PROFILER_UNBIND(); - ovrPreReset(); m_ovr.shutdown(); @@ -2274,7 +2599,7 @@ namespace bgfx { namespace gl unloadRenderDoc(m_renderdocdll); } - RendererType::Enum getRendererType() const BX_OVERRIDE + RendererType::Enum getRendererType() const override { if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) ) { @@ -2284,17 +2609,17 @@ namespace bgfx { namespace gl return RendererType::OpenGLES; } - const char* getRendererName() const BX_OVERRIDE + const char* getRendererName() const override { return BGFX_RENDERER_OPENGL_NAME; } - bool isDeviceRemoved() BX_OVERRIDE + bool isDeviceRemoved() override { return false; } - void flip(HMD& _hmd) + void flip(HMD& _hmd) override { if (m_flip) { @@ -2324,108 +2649,109 @@ namespace bgfx { namespace gl } } - void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) BX_OVERRIDE + void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_mem->size, _mem->data, _flags); } - void destroyIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) BX_OVERRIDE + void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) override { VertexDecl& decl = m_vertexDecls[_handle.idx]; bx::memCopy(&decl, &_decl, sizeof(VertexDecl) ); dump(decl); } - void destroyVertexDecl(VertexDeclHandle /*_handle*/) BX_OVERRIDE + void destroyVertexDecl(VertexDeclHandle /*_handle*/) override { } - void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t _flags) BX_OVERRIDE + void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t _flags) override { m_vertexBuffers[_handle.idx].create(_mem->size, _mem->data, _declHandle, _flags); } - void destroyVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_size, NULL, _flags); } - void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { m_indexBuffers[_handle.idx].update(_offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { VertexDeclHandle decl = BGFX_INVALID_HANDLE; m_vertexBuffers[_handle.idx].create(_size, NULL, decl, _flags); } - void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { m_vertexBuffers[_handle.idx].update(_offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createShader(ShaderHandle _handle, Memory* _mem) BX_OVERRIDE + void createShader(ShaderHandle _handle, Memory* _mem) override { m_shaders[_handle.idx].create(_mem); } - void destroyShader(ShaderHandle _handle) BX_OVERRIDE + void destroyShader(ShaderHandle _handle) override { m_shaders[_handle.idx].destroy(); } - void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) BX_OVERRIDE + void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) override { ShaderGL dummyFragmentShader; m_program[_handle.idx].create(m_shaders[_vsh.idx], isValid(_fsh) ? m_shaders[_fsh.idx] : dummyFragmentShader); } - void destroyProgram(ProgramHandle _handle) BX_OVERRIDE + void destroyProgram(ProgramHandle _handle) override { m_program[_handle.idx].destroy(); } - void createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) BX_OVERRIDE + void* createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) override { m_textures[_handle.idx].create(_mem, _flags, _skip); + return NULL; } - void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) BX_OVERRIDE + void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) override { } - void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) BX_OVERRIDE + void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) override { m_textures[_handle.idx].update(_side, _mip, _rect, _z, _depth, _pitch, _mem); } - void updateTextureEnd() BX_OVERRIDE + void updateTextureEnd() override { } - void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) BX_OVERRIDE + void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) override { if (m_readBackSupported) { @@ -2453,9 +2779,54 @@ namespace bgfx { namespace gl GL_CHECK(glBindTexture(texture.m_target, 0) ); } + else + { + const TextureGL& texture = m_textures[_handle.idx]; + const bool compressed = bimg::isCompressed(bimg::TextureFormat::Enum(texture.m_textureFormat) ); + + if(!compressed) + { + Attachment attachment[1]; + attachment[0].handle = _handle; + attachment[0].mip = 0; + attachment[0].layer = 0; + + FrameBufferGL frameBuffer; + frameBuffer.create(1, attachment); + GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer.m_fbo[0]) ); + GL_CHECK(glFramebufferTexture2D( + GL_FRAMEBUFFER + , GL_COLOR_ATTACHMENT0 + , GL_TEXTURE_2D + , texture.m_id + , attachment[0].mip + ) ); + + if (!BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) + && !BX_ENABLED(BX_PLATFORM_IOS)) + { + GL_CHECK(glReadBuffer(GL_COLOR_ATTACHMENT0) ); + } + + if (GL_FRAMEBUFFER_COMPLETE == glCheckFramebufferStatus(GL_FRAMEBUFFER) ) + { + GL_CHECK(glReadPixels( + 0 + , 0 + , texture.m_width + , texture.m_height + , m_readPixelsFmt + , GL_UNSIGNED_BYTE + , _data + ) ); + } + + frameBuffer.destroy(); + } + } } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) override { TextureGL& texture = m_textures[_handle.idx]; @@ -2483,34 +2854,34 @@ namespace bgfx { namespace gl release(mem); } - void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE + void overrideInternal(TextureHandle _handle, uintptr_t _ptr) override { m_textures[_handle.idx].overrideInternal(_ptr); } - uintptr_t getInternal(TextureHandle _handle) BX_OVERRIDE + uintptr_t getInternal(TextureHandle _handle) override { return uintptr_t(m_textures[_handle.idx].m_id); } - void destroyTexture(TextureHandle _handle) BX_OVERRIDE + void destroyTexture(TextureHandle _handle) override { m_textures[_handle.idx].destroy(); } - void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) override { m_frameBuffers[_handle.idx].create(_num, _attachment); } - void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) override { uint16_t denseIdx = m_numWindows++; m_windows[denseIdx] = _handle; m_frameBuffers[_handle.idx].create(denseIdx, _nwh, _width, _height, _depthFormat); } - void destroyFrameBuffer(FrameBufferHandle _handle) BX_OVERRIDE + void destroyFrameBuffer(FrameBufferHandle _handle) override { uint16_t denseIdx = m_frameBuffers[_handle.idx].destroy(); if (UINT16_MAX != denseIdx) @@ -2525,7 +2896,7 @@ namespace bgfx { namespace gl } } - void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) BX_OVERRIDE + void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) override { if (NULL != m_uniforms[_handle.idx]) { @@ -2539,14 +2910,14 @@ namespace bgfx { namespace gl m_uniformReg.add(_handle, _name, m_uniforms[_handle.idx]); } - void destroyUniform(UniformHandle _handle) BX_OVERRIDE + void destroyUniform(UniformHandle _handle) override { BX_FREE(g_allocator, m_uniforms[_handle.idx]); m_uniforms[_handle.idx] = NULL; m_uniformReg.remove(_handle); } - void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) BX_OVERRIDE + void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) override { SwapChainGL* swapChain = NULL; uint32_t width = m_resolution.m_width; @@ -2575,7 +2946,7 @@ namespace bgfx { namespace gl if (GL_RGBA == m_readPixelsFmt) { - bimg::imageSwizzleBgra8(data, width, height, width*4, data); + bimg::imageSwizzleBgra8(data, width*4, width, height, data, width*4); } g_callback->screenShot(_filePath @@ -2589,32 +2960,52 @@ namespace bgfx { namespace gl BX_FREE(g_allocator, data); } - void updateViewName(uint8_t _id, const char* _name) BX_OVERRIDE + void updateViewName(ViewId _id, const char* _name) override { - bx::strlcpy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] - , _name + bx::strCopy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] , BX_COUNTOF(s_viewName[0])-BGFX_CONFIG_MAX_VIEW_NAME_RESERVED + , _name ); } - void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) BX_OVERRIDE + void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) override { bx::memCopy(m_uniforms[_loc], _data, _size); } - void setMarker(const char* _marker, uint32_t _size) BX_OVERRIDE + void setMarker(const char* _marker, uint32_t _size) override { GL_CHECK(glInsertEventMarker(_size, _marker) ); } - void invalidateOcclusionQuery(OcclusionQueryHandle _handle) BX_OVERRIDE + void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override { m_occlusionQuery.invalidate(_handle); } - void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) BX_OVERRIDE; + virtual void setName(Handle _handle, const char* _name) override + { + switch (_handle.type) + { + case Handle::Shader: + GL_CHECK(glObjectLabel(GL_SHADER, m_shaders[_handle.idx].m_id, -1, _name) ); + break; - void blitSetup(TextVideoMemBlitter& _blitter) BX_OVERRIDE + case Handle::Texture: + GL_CHECK(glObjectLabel(GL_TEXTURE, m_textures[_handle.idx].m_id, -1, _name) ); + break; + + default: + BX_CHECK(false, "Invalid handle type?! %d", _handle.type); + break; + } + } + + void submitBlit(BlitState& _bs, uint16_t _view); + + void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) override; + + void blitSetup(TextVideoMemBlitter& _blitter) override { if (0 != m_vao) { @@ -2640,7 +3031,7 @@ namespace bgfx { namespace gl GL_CHECK(glUniform1i(program.m_sampler[0], 0) ); float proj[16]; - bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f); + bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f, 0.0f, true); GL_CHECK(glUniformMatrix4fv(program.m_predefined[0].m_loc , 1 @@ -2664,7 +3055,7 @@ namespace bgfx { namespace gl } } - void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) BX_OVERRIDE + void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) override { const uint32_t numVertices = _numIndices*4/6; if (0 < numVertices) @@ -2972,11 +3363,6 @@ namespace bgfx { namespace gl void invalidateCache() { - if (m_vaoSupport) - { - m_vaoStateCache.invalidate(); - } - if ( (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) ) && m_samplerObjectSupport) { @@ -3051,13 +3437,15 @@ namespace bgfx { namespace gl GL_CHECK(glSamplerParameteri(sampler, GL_TEXTURE_MAG_FILTER, magFilter) ); GL_CHECK(glSamplerParameteri(sampler, GL_TEXTURE_MIN_FILTER, minFilter) ); - if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) - || m_borderColorSupport) + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) ) { - if (hasBorderColor) - { - GL_CHECK(glSamplerParameterfv(sampler, GL_TEXTURE_BORDER_COLOR, _rgba) ); - } + GL_CHECK(glSamplerParameterf(sampler, GL_TEXTURE_LOD_BIAS, float(BGFX_CONFIG_MIP_LOD_BIAS) ) ); + } + + if (m_borderColorSupport + && hasBorderColor) + { + GL_CHECK(glSamplerParameterfv(sampler, GL_TEXTURE_BORDER_COLOR, _rgba) ); } if (0 != (_flags & (BGFX_TEXTURE_MIN_ANISOTROPIC|BGFX_TEXTURE_MAG_ANISOTROPIC) ) @@ -3144,7 +3532,14 @@ namespace bgfx { namespace gl if (GL_RGBA == m_readPixelsFmt) { - bimg::imageSwizzleBgra8(m_capture, m_resolution.m_width, m_resolution.m_height, m_resolution.m_width*4, m_capture); + bimg::imageSwizzleBgra8( + m_capture + , m_resolution.m_width*4 + , m_resolution.m_width + , m_resolution.m_height + , m_capture + , m_resolution.m_width*4 + ); } g_callback->captureFrame(m_capture, m_captureSize); @@ -3491,7 +3886,6 @@ namespace bgfx { namespace gl TimerQueryGL m_gpuTimer; OcclusionQueryGL m_occlusionQuery; - VaoStateCache m_vaoStateCache; SamplerStateCache m_samplerStateCache; TextVideoMem m_textVideoMem; @@ -3549,10 +3943,14 @@ namespace bgfx { namespace gl RendererContextGL* s_renderGL; - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { s_renderGL = BX_NEW(g_allocator, RendererContextGL); - s_renderGL->init(); + if (!s_renderGL->init(_init) ) + { + BX_DELETE(g_allocator, s_renderGL); + s_renderGL = NULL; + } return s_renderGL; } @@ -4066,8 +4464,6 @@ namespace bgfx { namespace gl GL_CHECK(glDeleteProgram(m_id) ); m_id = 0; } - - m_vcref.invalidate(s_renderGL->m_vaoStateCache); } void ProgramGL::init() @@ -4192,13 +4588,13 @@ namespace bgfx { namespace gl num = bx::uint32_max(num, 1); int offset = 0; - char* array = const_cast(bx::strnchr(name, '[') ); + char* array = const_cast(bx::strFind(name, '[') ); if (NULL != array) { BX_TRACE("--- %s", name); *array = '\0'; array++; - char* end = const_cast(bx::strnchr(array, ']') ); + char* end = const_cast(bx::strFind(array, ']') ); if (NULL != end) { // Some devices (Amazon Fire) might not return terminating brace. *end = '\0'; @@ -4404,21 +4800,21 @@ namespace bgfx { namespace gl && !normalized) { GL_CHECK(glVertexAttribIPointer(loc - , num - , s_attribType[type] - , _vertexDecl.m_stride - , (void*)(uintptr_t)baseVertex) - ); + , num + , s_attribType[type] + , _vertexDecl.m_stride + , (void*)(uintptr_t)baseVertex) + ); } else { GL_CHECK(glVertexAttribPointer(loc - , num - , s_attribType[type] - , normalized - , _vertexDecl.m_stride - , (void*)(uintptr_t)baseVertex) - ); + , num + , s_attribType[type] + , normalized + , _vertexDecl.m_stride + , (void*)(uintptr_t)baseVertex) + ); } m_unboundUsedAttrib[ii] = Attrib::Count; @@ -4444,248 +4840,12 @@ namespace bgfx { namespace gl { GL_CHECK(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0) ); GL_CHECK(glDeleteBuffers(1, &m_id) ); - - m_vcref.invalidate(s_renderGL->m_vaoStateCache); } void VertexBufferGL::destroy() { GL_CHECK(glBindBuffer(GL_ARRAY_BUFFER, 0) ); GL_CHECK(glDeleteBuffers(1, &m_id) ); - - m_vcref.invalidate(s_renderGL->m_vaoStateCache); - } - - static void texSubImage( - GLenum _target - , GLint _level - , GLint _xoffset - , GLint _yoffset - , GLint _zoffset - , GLsizei _width - , GLsizei _height - , GLsizei _depth - , GLenum _format - , GLenum _type - , const GLvoid* _data - ) - { - if (NULL == _data) - { - return; - } - - if (_target == GL_TEXTURE_3D - || _target == GL_TEXTURE_2D_ARRAY - || _target == GL_TEXTURE_CUBE_MAP_ARRAY) - { - GL_CHECK(glTexSubImage3D( - _target - , _level - , _xoffset - , _yoffset - , _zoffset - , _width - , _height - , _depth - , _format - , _type - , _data - ) ); - } - else if (_target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) - { - } - else - { - BX_UNUSED(_zoffset, _depth); - GL_CHECK(glTexSubImage2D( - _target - , _level - , _xoffset - , _yoffset - , _width - , _height - , _format - , _type - , _data - ) ); - } - } - - static void texImage( - GLenum _target - , uint32_t _msaaQuality - , GLint _level - , GLint _internalFormat - , GLsizei _width - , GLsizei _height - , GLsizei _depth - , GLint _border - , GLenum _format - , GLenum _type - , const GLvoid* _data - ) - { - if (_target == GL_TEXTURE_3D) - { - GL_CHECK(glTexImage3D( - _target - , _level - , _internalFormat - , _width - , _height - , _depth - , _border - , _format - , _type - , _data - ) ); - } - else if (_target == GL_TEXTURE_2D_ARRAY - || _target == GL_TEXTURE_CUBE_MAP_ARRAY) - { - texSubImage( - _target - , _level - , 0 - , 0 - , _depth - , _width - , _height - , 1 - , _format - , _type - , _data - ); - } - else if (_target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) - { - } - else if (_target == GL_TEXTURE_2D_MULTISAMPLE) - { - GL_CHECK(glTexImage2DMultisample( - _target - , _msaaQuality - , _internalFormat - , _width - , _height - , false - ) ); - } - else - { - GL_CHECK(glTexImage2D( - _target - , _level - , _internalFormat - , _width - , _height - , _border - , _format - , _type - , _data - ) ); - } - - BX_UNUSED(_msaaQuality, _depth, _border, _data); - } - - static void compressedTexSubImage( - GLenum _target - , GLint _level - , GLint _xoffset - , GLint _yoffset - , GLint _zoffset - , GLsizei _width - , GLsizei _height - , GLsizei _depth - , GLenum _format - , GLsizei _imageSize - , const GLvoid* _data - ) - { - if (_target == GL_TEXTURE_3D) - { - GL_CHECK(glCompressedTexSubImage3D( - _target - , _level - , _xoffset - , _yoffset - , _zoffset - , _width - , _height - , _depth - , _format - , _imageSize - , _data - ) ); - } - else - { - BX_UNUSED(_zoffset, _depth); - GL_CHECK(glCompressedTexSubImage2D( - _target - , _level - , _xoffset - , _yoffset - , _width - , _height - , _format - , _imageSize - , _data - ) ); - } - } - - static void compressedTexImage( - GLenum _target - , GLint _level - , GLenum _internalformat - , GLsizei _width - , GLsizei _height - , GLsizei _depth - , GLint _border - , GLsizei _imageSize - , const GLvoid* _data - ) - { - if (_target == GL_TEXTURE_3D) - { - GL_CHECK(glCompressedTexImage3D( - _target - , _level - , _internalformat - , _width - , _height - , _depth - , _border - , _imageSize - , _data - ) ); - } - else if (_target == GL_TEXTURE_2D_ARRAY - || _target == GL_TEXTURE_CUBE_MAP_ARRAY) - { - compressedTexSubImage(_target, _level, 0, 0, _depth, _width, _height, 1, _internalformat, _imageSize, _data); - } - else if (_target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) - { - } - else - { - BX_UNUSED(_depth); - GL_CHECK(glCompressedTexImage2D( - _target - , _level - , _internalformat - , _width - , _height - , _border - , _imageSize - , _data - ) ); - } } bool TextureGL::init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips, uint32_t _flags) @@ -4700,6 +4860,7 @@ namespace bgfx { namespace gl const bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE ); + const bool srgb = 0 != (m_flags&BGFX_TEXTURE_SRGB); const bool textureArray = false || _target == GL_TEXTURE_2D_ARRAY || _target == GL_TEXTURE_CUBE_MAP_ARRAY @@ -4734,11 +4895,16 @@ namespace bgfx { namespace gl m_type = tfiRgba8.m_type; } + const GLenum internalFmt = srgb + ? s_textureFormat[m_textureFormat].m_internalFmtSrgb + : s_textureFormat[m_textureFormat].m_internalFmt + ; + if (textureArray) { GL_CHECK(glTexStorage3D(_target , _numMips - , s_textureFormat[m_textureFormat].m_internalFmt + , internalFmt , m_width , m_height , _depth @@ -4750,21 +4916,21 @@ namespace bgfx { namespace gl if (_target == GL_TEXTURE_3D) { GL_CHECK(glTexStorage3D(_target - , _numMips - , s_textureFormat[m_textureFormat].m_internalFmt - , m_width - , m_height - , _depth - ) ); + , _numMips + , internalFmt + , m_width + , m_height + , _depth + ) ); } else { GL_CHECK(glTexStorage2D(_target - , _numMips - , s_textureFormat[m_textureFormat].m_internalFmt - , m_width - , m_height - ) ); + , _numMips + , internalFmt + , m_width + , m_height + ) ); } } @@ -4876,9 +5042,9 @@ namespace bgfx { namespace gl { switch (target) { - case GL_TEXTURE_CUBE_MAP: target = GL_TEXTURE_CUBE_MAP_ARRAY; - case GL_TEXTURE_2D_MULTISAMPLE: target = GL_TEXTURE_2D_MULTISAMPLE_ARRAY; - default: target = GL_TEXTURE_2D_ARRAY; + case GL_TEXTURE_CUBE_MAP: target = GL_TEXTURE_CUBE_MAP_ARRAY; break; + case GL_TEXTURE_2D_MULTISAMPLE: target = GL_TEXTURE_2D_MULTISAMPLE_ARRAY; break; + default: target = GL_TEXTURE_2D_ARRAY; break; } } @@ -4914,10 +5080,11 @@ namespace bgfx { namespace gl || swizzle ; - BX_TRACE("Texture%-4s %3d: %s (requested: %s), layers %d, %dx%dx%d%s." + BX_TRACE("Texture%-4s %3d: %s %s(requested: %s), layers %d, %dx%dx%d%s." , imageContainer.m_cubeMap ? "Cube" : (1 < imageContainer.m_depth ? "3D" : "2D") , this - s_renderGL->m_textures , getName( (TextureFormat::Enum)m_textureFormat) + , srgb ? "+sRGB " : "" , getName( (TextureFormat::Enum)m_requestedFormat) , numLayers , textureWidth @@ -4927,12 +5094,12 @@ namespace bgfx { namespace gl ); BX_WARN(!convert, "Texture %s%s%s from %s to %s." - , swizzle ? "swizzle" : "" - , swizzle&&convert ? " and " : "" - , convert ? "convert" : "" - , getName( (TextureFormat::Enum)m_requestedFormat) - , getName( (TextureFormat::Enum)m_textureFormat) - ); + , swizzle ? "swizzle" : "" + , swizzle&&convert ? " and " : "" + , convert ? "convert" : "" + , getName( (TextureFormat::Enum)m_requestedFormat) + , getName( (TextureFormat::Enum)m_textureFormat) + ); uint8_t* temp = NULL; if (convert) @@ -4967,7 +5134,7 @@ namespace bgfx { namespace gl if (compressed && !convert) { - compressedTexImage(imageTarget + GL_CHECK(compressedTexImage(imageTarget , lod , internalFmt , width @@ -4976,7 +5143,7 @@ namespace bgfx { namespace gl , 0 , mip.m_size , mip.m_data - ); + ) ); } else { @@ -4985,16 +5152,16 @@ namespace bgfx { namespace gl if (convert) { imageDecodeToRgba8(temp - , mip.m_data - , mip.m_width - , mip.m_height - , mip.m_width*4 - , mip.m_format - ); + , mip.m_data + , mip.m_width + , mip.m_height + , mip.m_width*4 + , mip.m_format + ); data = temp; } - texImage(imageTarget + GL_CHECK(texImage(imageTarget , msaaQuality , lod , internalFmt @@ -5005,7 +5172,7 @@ namespace bgfx { namespace gl , m_fmt , m_type , data - ); + ) ); } } else if (!computeWrite) @@ -5017,7 +5184,7 @@ namespace bgfx { namespace gl * 4*4* bimg::getBitsPerPixel(bimg::TextureFormat::Enum(m_textureFormat) )/8 ; - compressedTexImage(imageTarget + GL_CHECK(compressedTexImage(imageTarget , lod , internalFmt , width @@ -5026,11 +5193,11 @@ namespace bgfx { namespace gl , 0 , size , NULL - ); + ) ); } else { - texImage(imageTarget + GL_CHECK(texImage(imageTarget , msaaQuality , lod , internalFmt @@ -5041,7 +5208,7 @@ namespace bgfx { namespace gl , m_fmt , m_type , NULL - ); + ) ); } } @@ -5103,7 +5270,7 @@ namespace bgfx { namespace gl && !s_textureFormat[m_requestedFormat].m_supported && !s_renderGL->m_textureSwizzleSupport ; - const bool unpackRowLength = BX_IGNORE_C4127(!!BGFX_CONFIG_RENDERER_OPENGL || s_extension[Extension::EXT_unpack_subimage].m_supported); + const bool unpackRowLength = !!BGFX_CONFIG_RENDERER_OPENGL || s_extension[Extension::EXT_unpack_subimage].m_supported; const bool compressed = bimg::isCompressed(bimg::TextureFormat::Enum(m_requestedFormat) ); const bool convert = false || (compressed && m_textureFormat != m_requestedFormat) @@ -5130,7 +5297,7 @@ namespace bgfx { namespace gl if (!unpackRowLength) { - bimg::imageCopy(temp, width, height, bpp, srcpitch, data); + bimg::imageCopy(temp, width, height, 1, bpp, srcpitch, data); data = temp; } @@ -5158,10 +5325,11 @@ namespace bgfx { namespace gl srcpitch = rectpitch; } - if (!unpackRowLength - && !convert) + if (BX_IGNORE_C4127(true + && !unpackRowLength + && !convert) ) { - bimg::imageCopy(temp, width, height, bpp, srcpitch, data); + bimg::imageCopy(temp, width, height, 1, bpp, srcpitch, data); data = temp; } @@ -5253,13 +5421,15 @@ namespace bgfx { namespace gl GL_CHECK(glTexParameteri(target, GL_TEXTURE_MAG_FILTER, magFilter) ); GL_CHECK(glTexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilter) ); - if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) - || s_renderGL->m_borderColorSupport) + if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) ) { - if (hasBorderColor) - { - GL_CHECK(glTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, _rgba) ); - } + GL_CHECK(glTexParameterf(target, GL_TEXTURE_LOD_BIAS, float(BGFX_CONFIG_MIP_LOD_BIAS) ) ); + } + + if (s_renderGL->m_borderColorSupport + && hasBorderColor) + { + GL_CHECK(glTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, _rgba) ); } if (0 != (flags & (BGFX_TEXTURE_MIN_ANISOTROPIC|BGFX_TEXTURE_MAG_ANISOTROPIC) ) @@ -5338,7 +5508,7 @@ namespace bgfx { namespace gl void writeString(bx::WriterI* _writer, const char* _str) { - bx::write(_writer, _str, (int32_t)bx::strnlen(_str) ); + bx::write(_writer, _str, (int32_t)bx::strLen(_str) ); } void writeStringf(bx::WriterI* _writer, const char* _format, ...) @@ -5355,15 +5525,15 @@ namespace bgfx { namespace gl void strins(char* _str, const char* _insert) { - size_t len = bx::strnlen(_insert); - bx::memMove(&_str[len], _str, bx::strnlen(_str)+1); + size_t len = bx::strLen(_insert); + bx::memMove(&_str[len], _str, bx::strLen(_str)+1); bx::memCopy(_str, _insert, len); } void ShaderGL::create(Memory* _mem) { bx::MemoryReader reader(_mem->data, _mem->size); - m_hash = bx::hashMurmur2A(_mem->data, _mem->size); + m_hash = bx::hash(_mem->data, _mem->size); uint32_t magic; bx::read(&reader, magic); @@ -5424,9 +5594,10 @@ namespace bgfx { namespace gl if (0 != m_id) { - if (GL_COMPUTE_SHADER != m_type) + if (GL_COMPUTE_SHADER != m_type + && 0 != bx::strCmp(code, "#version 430", 12) ) { - int32_t codeLen = (int32_t)bx::strnlen(code); + int32_t codeLen = (int32_t)bx::strLen(code); int32_t tempLen = codeLen + (4<<10); char* temp = (char*)alloca(tempLen); bx::StaticMemoryBlockWriter writer(temp, tempLen); @@ -5452,7 +5623,7 @@ namespace bgfx { namespace gl bool usesShadowSamplers = !!bx::findIdentifierMatch(code, s_EXT_shadow_samplers); bool usesTexture3D = s_extension[Extension::OES_texture_3D].m_supported - && bx::findIdentifierMatch(code, s_OES_texture_3D) + && bx::findIdentifierMatch(code, s_texture3D) ; bool usesTextureLod = !!bx::findIdentifierMatch(code, s_EXT_shader_texture_lod); @@ -5526,7 +5697,8 @@ namespace bgfx { namespace gl if (usesTextureLod) { BX_WARN(s_extension[Extension::ARB_shader_texture_lod].m_supported - , "ARB_shader_texture_lod is used but not supported by GLES2 driver." + || s_extension[Extension::EXT_shader_texture_lod].m_supported + , "(ARB|EXT)_shader_texture_lod is used but not supported by GLES2 driver." ); if (s_extension[Extension::ARB_shader_texture_lod].m_supported) @@ -5543,11 +5715,23 @@ namespace bgfx { namespace gl } else { - writeString(&writer - , "#define texture2DLod(_sampler, _coord, _level) texture2D(_sampler, _coord)\n" - "#define texture2DProjLod(_sampler, _coord, _level) texture2DProj(_sampler, _coord)\n" - "#define textureCubeLod(_sampler, _coord, _level) textureCube(_sampler, _coord)\n" + if(s_extension[Extension::EXT_shader_texture_lod].m_supported) + { + writeString(&writer + , "#extension GL_EXT_shader_texture_lod : enable\n" + "#define texture2DLod texture2DLodEXT\n" + "#define texture2DProjLod texture2DProjLodEXT\n" + "#define textureCubeLod textureCubeLodEXT\n" ); + } + else + { + writeString(&writer + , "#define texture2DLod(_sampler, _coord, _level) texture2D(_sampler, _coord)\n" + "#define texture2DProjLod(_sampler, _coord, _level) texture2DProj(_sampler, _coord)\n" + "#define textureCubeLod(_sampler, _coord, _level) textureCube(_sampler, _coord)\n" + ); + } } } @@ -5572,10 +5756,10 @@ namespace bgfx { namespace gl if (insertFragDepth) { - const char* entry = bx::strnstr(temp, "void main ()"); + const char* entry = bx::strFind(temp, "void main ()"); if (NULL != entry) { - char* brace = const_cast(bx::strnstr(entry, "{") ); + char* brace = const_cast(bx::strFind(entry, "{") ); if (NULL != brace) { const char* end = bx::strmb(brace, '{', '}'); @@ -5602,15 +5786,17 @@ namespace bgfx { namespace gl && s_extension[Extension::ARB_shader_texture_lod].m_supported && bx::findIdentifierMatch(code, s_ARB_shader_texture_lod) ; + const bool usesGpuShader4 = !!bx::findIdentifierMatch(code, s_EXT_gpu_shader4); const bool usesGpuShader5 = !!bx::findIdentifierMatch(code, s_ARB_gpu_shader5); const bool usesIUsamplers = !!bx::findIdentifierMatch(code, s_uisamplers); const bool usesTexelFetch = !!bx::findIdentifierMatch(code, s_texelFetch); const bool usesTextureArray = !!bx::findIdentifierMatch(code, s_textureArray); + const bool usesTexture3D = !!bx::findIdentifierMatch(code, s_texture3D); const bool usesTextureMS = !!bx::findIdentifierMatch(code, s_ARB_texture_multisample); const bool usesPacking = !!bx::findIdentifierMatch(code, s_ARB_shading_language_packing); - uint32_t version = - usesIUsamplers || usesTexelFetch || usesGpuShader5 ? 130 + uint32_t version = BX_ENABLED(BX_PLATFORM_OSX) ? 120 + : usesTextureArray || usesTexture3D || usesIUsamplers|| usesTexelFetch || usesGpuShader5 ? 130 : usesTextureLod ? 120 : 120 ; @@ -5633,6 +5819,11 @@ namespace bgfx { namespace gl } } + if (usesGpuShader4) + { + writeString(&writer, "#extension GL_EXT_gpu_shader4 : enable\n"); + } + if (usesGpuShader5) { writeString(&writer, "#extension GL_ARB_gpu_shader5 : enable\n"); @@ -5651,6 +5842,29 @@ namespace bgfx { namespace gl if (usesTextureArray) { writeString(&writer, "#extension GL_EXT_texture_array : enable\n"); + + if (BX_ENABLED(BX_PLATFORM_OSX) ) + { + writeString(&writer, "#define texture2DArrayLodEXT texture2DArray\n"); + } + else + { + writeString(&writer, "#define texture2DArrayLodEXT texture2DArrayLod\n"); + } + } + + if (usesTexture3D) + { + writeString(&writer, "#define texture3DEXT texture3D\n"); + + if (BX_ENABLED(BX_PLATFORM_OSX) ) + { + writeString(&writer, "#define texture3DLodEXT texture3D\n"); + } + else + { + writeString(&writer, "#define texture3DLodEXT texture3DLod\n"); + } } if (130 <= version) @@ -5673,7 +5887,7 @@ namespace bgfx { namespace gl { char tmpFragData[16]; bx::snprintf(tmpFragData, BX_COUNTOF(tmpFragData), "gl_FragData[%d]", ii); - fragData = bx::uint32_max(fragData, NULL == bx::strnstr(code, tmpFragData) ? 0 : ii+1); + fragData = bx::uint32_max(fragData, NULL == bx::strFind(code, tmpFragData) ? 0 : ii+1); } BGFX_FATAL(0 != fragData, Fatal::InvalidShader, "Unable to find and patch gl_FragData!"); @@ -5766,7 +5980,7 @@ namespace bgfx { namespace gl { char tmpFragData[16]; bx::snprintf(tmpFragData, BX_COUNTOF(tmpFragData), "gl_FragData[%d]", ii); - fragData = bx::uint32_max(fragData, NULL == bx::strnstr(code, tmpFragData) ? 0 : ii+1); + fragData = bx::uint32_max(fragData, NULL == bx::strFind(code, tmpFragData) ? 0 : ii+1); } BGFX_FATAL(0 != fragData, Fatal::InvalidShader, "Unable to find and patch gl_FragData!"); @@ -5821,6 +6035,26 @@ namespace bgfx { namespace gl code = temp; } + else if (GL_COMPUTE_SHADER == m_type) + { + int32_t codeLen = (int32_t)bx::strLen(code); + int32_t tempLen = codeLen + (4<<10); + char* temp = (char*)alloca(tempLen); + bx::StaticMemoryBlockWriter writer(temp, tempLen); + + writeString(&writer, "#version 430\n"); + writeString(&writer, "#define texture2DLod textureLod\n"); + writeString(&writer, "#define texture3DLod textureLod\n"); + writeString(&writer, "#define textureCubeLod textureLod\n"); + writeString(&writer, "#define texture2DGrad textureGrad\n"); + writeString(&writer, "#define texture3DGrad textureGrad\n"); + writeString(&writer, "#define textureCubeGrad textureGrad\n"); + + bx::write(&writer, code+bx::strLen("#version 430"), codeLen); + bx::write(&writer, '\0'); + + code = temp; + } GL_CHECK(glShaderSource(m_id, 1, (const GLchar**)&code, NULL) ); GL_CHECK(glCompileShader(m_id) ); @@ -5830,7 +6064,24 @@ namespace bgfx { namespace gl if (0 == compiled) { - BX_TRACE("\n####\n%s\n####", code); + LineReader lineReader(code); + bx::Error err; + for (int32_t line = 1; err.isOk(); ++line) + { + char str[4096]; + int32_t len = bx::read(&lineReader, str, BX_COUNTOF(str)-1, &err); + + if (err.isOk() ) + { + str[len] = '\0'; + const char* eol = bx::streol(str); + if (eol != str) + { + *const_cast(eol) = '\0'; + } + BX_TRACE("%3d %s", line, str); + } + } GLsizei len; char log[1024]; @@ -6201,15 +6452,54 @@ namespace bgfx { namespace gl Query& query = m_query[(m_control.m_read + ii) % size]; if (query.m_handle.idx == _handle.idx) { - query.m_handle.idx = bgfx::invalidHandle; + query.m_handle.idx = bgfx::kInvalidHandle; + } + } + } + + void RendererContextGL::submitBlit(BlitState& _bs, uint16_t _view) + { + if (m_blitSupported) + { + while (_bs.hasItem(_view) ) + { + const BlitItem& bi = _bs.advance(); + + const TextureGL& src = m_textures[bi.m_src.idx]; + const TextureGL& dst = m_textures[bi.m_dst.idx]; + + uint32_t srcWidth = bx::uint32_min(src.m_width, bi.m_srcX + bi.m_width) - bi.m_srcX; + uint32_t srcHeight = bx::uint32_min(src.m_height, bi.m_srcY + bi.m_height) - bi.m_srcY; + uint32_t srcDepth = bx::uint32_min(src.m_depth, bi.m_srcZ + bi.m_depth) - bi.m_srcZ; + uint32_t dstWidth = bx::uint32_min(dst.m_width, bi.m_dstX + bi.m_width) - bi.m_dstX; + uint32_t dstHeight = bx::uint32_min(dst.m_height, bi.m_dstY + bi.m_height) - bi.m_dstY; + uint32_t dstDepth = bx::uint32_min(dst.m_depth, bi.m_dstZ + bi.m_depth) - bi.m_dstZ; + uint32_t width = bx::uint32_min(srcWidth, dstWidth); + uint32_t height = bx::uint32_min(srcHeight, dstHeight); + uint32_t depth = bx::uint32_min(srcDepth, dstDepth); + + GL_CHECK(glCopyImageSubData(src.m_id + , src.m_target + , bi.m_srcMip + , bi.m_srcX + , bi.m_srcY + , bi.m_srcZ + , dst.m_id + , dst.m_target + , bi.m_dstMip + , bi.m_dstX + , bi.m_dstY + , bi.m_dstZ + , width + , height + , bx::uint32_imax(depth, 1) + ) ); } } } void RendererContextGL::submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) { - BGFX_GPU_PROFILER_BEGIN_DYNAMIC("rendererSubmit"); - if (_render->m_capture) { renderDocTriggerCapture(); @@ -6222,7 +6512,6 @@ namespace bgfx { namespace gl GL_CHECK(glBindVertexArray(0) ); GL_CHECK(glDeleteVertexArrays(1, &m_vao) ); m_vao = 0; - m_vaoStateCache.invalidate(); } m_glctx.makeCurrent(NULL); @@ -6237,12 +6526,15 @@ namespace bgfx { namespace gl updateResolution(_render->m_resolution); - int64_t elapsed = -bx::getHPCounter(); + int64_t timeBegin = bx::getHPCounter(); int64_t captureElapsed = 0; - if (m_timerQuerySupport) + uint32_t frameQueryIdx = UINT32_MAX; + + if (m_timerQuerySupport + && !BX_ENABLED(BX_PLATFORM_OSX) ) { - m_gpuTimer.begin(); + frameQueryIdx = m_gpuTimer.begin(BGFX_CONFIG_MAX_VIEWS); } if (0 < _render->m_iboffset) @@ -6273,15 +6565,12 @@ namespace bgfx { namespace gl static ViewState viewState; viewState.reset(_render, hmdEnabled); - uint16_t programIdx = invalidHandle; + uint16_t programIdx = kInvalidHandle; SortKey key; uint16_t view = UINT16_MAX; FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS }; - BlitKey blitKey; - blitKey.decode(_render->m_blitKeys[0]); - uint16_t numBlitItems = _render->m_numBlitItems; - uint16_t blitItem = 0; + BlitState bs(_render); int32_t resolutionHeight = hmdEnabled ? _render->m_hmd.height @@ -6302,7 +6591,6 @@ namespace bgfx { namespace gl : GL_FILL ) ); - GLuint currentVao = 0; bool wasCompute = false; bool viewHasScissor = false; Rect viewScissorRect; @@ -6310,9 +6598,10 @@ namespace bgfx { namespace gl uint16_t discardFlags = BGFX_CLEAR_NONE; const bool blendIndependentSupported = s_extension[Extension::ARB_draw_buffers_blend].m_supported; - const bool computeSupported = (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) && s_extension[Extension::ARB_compute_shader].m_supported) - || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 31) - ; + const bool computeSupported = false + || (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) && s_extension[Extension::ARB_compute_shader].m_supported) + || BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 31) + ; uint32_t statsNumPrimsSubmitted[BX_COUNTOF(s_primInfo)] = {}; uint32_t statsNumPrimsRendered[BX_COUNTOF(s_primInfo)] = {}; @@ -6320,6 +6609,13 @@ namespace bgfx { namespace gl uint32_t statsNumIndices = 0; uint32_t statsKeyType[2] = {}; + Profiler profiler( + _render + , m_gpuTimer + , s_viewName + , m_timerQuerySupport && !BX_ENABLED(BX_PLATFORM_OSX) + ); + if (m_occlusionQuerySupport) { m_occlusionQuery.resolve(_render); @@ -6333,9 +6629,9 @@ namespace bgfx { namespace gl bool viewRestart = false; uint8_t restartState = 0; - viewState.m_rect = _render->m_rect[0]; + viewState.m_rect = _render->m_view[0].m_rect; - int32_t numItems = _render->m_num; + int32_t numItems = _render->m_numRenderItems; for (int32_t item = 0, restartItem = numItems; item < numItems || restartItem < numItems;) { const uint64_t encodedKey = _render->m_sortKeys[item]; @@ -6364,11 +6660,11 @@ namespace bgfx { namespace gl } view = key.m_view; - programIdx = invalidHandle; + programIdx = kInvalidHandle; - if (_render->m_fb[view].idx != fbh.idx) + if (_render->m_view[view].m_fbh.idx != fbh.idx) { - fbh = _render->m_fb[view]; + fbh = _render->m_view[view].m_fbh; resolutionHeight = hmdEnabled ? _render->m_hmd.height : _render->m_resolution.m_height @@ -6376,7 +6672,7 @@ namespace bgfx { namespace gl resolutionHeight = setFrameBuffer(fbh, resolutionHeight, discardFlags); } - viewRestart = ( (BGFX_VIEW_STEREO == (_render->m_viewFlags[view] & BGFX_VIEW_STEREO) ) ); + viewRestart = ( (BGFX_VIEW_STEREO == (_render->m_view[view].m_flags & BGFX_VIEW_STEREO) ) ); viewRestart &= hmdEnabled; if (viewRestart) { @@ -6396,13 +6692,12 @@ namespace bgfx { namespace gl if (item > 1) { - BGFX_GPU_PROFILER_END(); - BGFX_PROFILER_END(); + profiler.end(); } - BGFX_PROFILER_BEGIN_DYNAMIC(s_viewName[view]); - BGFX_GPU_PROFILER_BEGIN_DYNAMIC(s_viewName[view]); - viewState.m_rect = _render->m_rect[view]; + profiler.begin(view); + + viewState.m_rect = _render->m_view[view].m_rect; if (viewRestart) { if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) @@ -6434,7 +6729,7 @@ namespace bgfx { namespace gl } } - const Rect& scissorRect = _render->m_scissor[view]; + const Rect& scissorRect = _render->m_view[view].m_scissor; viewHasScissor = !scissorRect.isZero(); viewScissorRect = viewHasScissor ? scissorRect : viewState.m_rect; @@ -6444,13 +6739,12 @@ namespace bgfx { namespace gl , viewState.m_rect.m_height ) ); - Clear& clear = _render->m_clear[view]; + Clear& clear = _render->m_view[view].m_clear; discardFlags = clear.m_flags & BGFX_CLEAR_DISCARD_MASK; if (BGFX_CLEAR_NONE != (clear.m_flags & BGFX_CLEAR_MASK) ) { clearQuad(_clearQuad, viewState.m_rect, clear, resolutionHeight, _render->m_colorPalette); - currentVao = UINT32_MAX; // clearQuad will mess with VAO, invalidate it. } GL_CHECK(glDisable(GL_STENCIL_TEST) ); @@ -6459,45 +6753,7 @@ namespace bgfx { namespace gl GL_CHECK(glEnable(GL_CULL_FACE) ); GL_CHECK(glDisable(GL_BLEND) ); - if (m_blitSupported) - { - const uint8_t blitView = SortKey::decodeView(encodedKey); - for (; blitItem < numBlitItems && blitKey.m_view <= blitView; blitItem++) - { - const BlitItem& bi = _render->m_blitItem[blitItem]; - blitKey.decode(_render->m_blitKeys[blitItem + 1]); - - const TextureGL& src = m_textures[bi.m_src.idx]; - const TextureGL& dst = m_textures[bi.m_dst.idx]; - - uint32_t srcWidth = bx::uint32_min(src.m_width, bi.m_srcX + bi.m_width) - bi.m_srcX; - uint32_t srcHeight = bx::uint32_min(src.m_height, bi.m_srcY + bi.m_height) - bi.m_srcY; - uint32_t srcDepth = bx::uint32_min(src.m_depth, bi.m_srcZ + bi.m_depth) - bi.m_srcZ; - uint32_t dstWidth = bx::uint32_min(dst.m_width, bi.m_dstX + bi.m_width) - bi.m_dstX; - uint32_t dstHeight = bx::uint32_min(dst.m_height, bi.m_dstY + bi.m_height) - bi.m_dstY; - uint32_t dstDepth = bx::uint32_min(dst.m_depth, bi.m_dstZ + bi.m_depth) - bi.m_dstZ; - uint32_t width = bx::uint32_min(srcWidth, dstWidth); - uint32_t height = bx::uint32_min(srcHeight, dstHeight); - uint32_t depth = bx::uint32_min(srcDepth, dstDepth); - - GL_CHECK(glCopyImageSubData(src.m_id - , src.m_target - , bi.m_srcMip - , bi.m_srcX - , bi.m_srcY - , bi.m_srcZ - , dst.m_id - , dst.m_target - , bi.m_dstMip - , bi.m_dstX - , bi.m_dstY - , bi.m_dstZ - , width - , height - , bx::uint32_imax(depth, 1) - ) ); - } - } + submitBlit(bs, view); } if (isCompute) @@ -6525,17 +6781,24 @@ namespace bgfx { namespace gl for (uint32_t ii = 0; ii < BGFX_MAX_COMPUTE_BINDINGS; ++ii) { const Binding& bind = renderBind.m_bind[ii]; - if (invalidHandle != bind.m_idx) + if (kInvalidHandle != bind.m_idx) { switch (bind.m_type) { + case Binding::Texture: + { + TextureGL& texture = m_textures[bind.m_idx]; + texture.commit(ii, bind.m_un.m_draw.m_textureFlags, _render->m_colorPalette); + } + break; + case Binding::Image: { const TextureGL& texture = m_textures[bind.m_idx]; GL_CHECK(glBindImageTexture(ii , texture.m_id , bind.m_un.m_compute.m_mip - , texture.isCubeMap()?GL_TRUE:GL_FALSE + , texture.isCubeMap() ? GL_TRUE : GL_FALSE , 0 , s_access[bind.m_un.m_compute.m_access] , s_imageFormat[bind.m_un.m_compute.m_format]) @@ -6565,8 +6828,8 @@ namespace bgfx { namespace gl if (0 != barrier) { - bool constantsChanged = compute.m_constBegin < compute.m_constEnd; - rendererUpdateUniforms(this, _render->m_uniformBuffer, compute.m_constBegin, compute.m_constEnd); + bool constantsChanged = compute.m_uniformBegin < compute.m_uniformEnd; + rendererUpdateUniforms(this, _render->m_uniformBuffer[compute.m_uniformIdx], compute.m_uniformBegin, compute.m_uniformEnd); if (constantsChanged && NULL != program.m_constantBuffer) @@ -6601,7 +6864,7 @@ namespace bgfx { namespace gl { if (isValid(currentState.m_indirectBuffer) ) { - currentState.m_indirectBuffer.idx = invalidHandle; + currentState.m_indirectBuffer.idx = kInvalidHandle; GL_CHECK(glBindBuffer(GL_DISPATCH_INDIRECT_BUFFER, 0) ); } @@ -6641,11 +6904,9 @@ namespace bgfx { namespace gl const uint64_t newFlags = draw.m_stateFlags; uint64_t changedFlags = currentState.m_stateFlags ^ draw.m_stateFlags; - currentState.m_stateFlags = newFlags; const uint64_t newStencil = draw.m_stencil; uint64_t changedStencil = currentState.m_stencil ^ draw.m_stencil; - currentState.m_stencil = newStencil; if (resetState) { @@ -6653,8 +6914,6 @@ namespace bgfx { namespace gl currentState.m_scissor = !draw.m_scissor; changedFlags = BGFX_STATE_MASK; changedStencil = packStencil(BGFX_STENCIL_MASK, BGFX_STENCIL_MASK); - currentState.m_stateFlags = newFlags; - currentState.m_stencil = newStencil; currentBind.clear(); } @@ -6683,7 +6942,7 @@ namespace bgfx { namespace gl else { Rect scissorRect; - scissorRect.setIntersect(viewScissorRect, _render->m_rectCache.m_cache[scissor]); + scissorRect.setIntersect(viewScissorRect, _render->m_frameCache.m_rectCache.m_cache[scissor]); if (scissorRect.isZeroArea() ) { continue; @@ -6698,6 +6957,9 @@ namespace bgfx { namespace gl } } + currentState.m_stateFlags = newFlags; + currentState.m_stencil = newStencil; + if (0 != changedStencil) { if (0 != newStencil) @@ -6979,17 +7241,17 @@ namespace bgfx { namespace gl } bool programChanged = false; - bool constantsChanged = draw.m_constBegin < draw.m_constEnd; + bool constantsChanged = draw.m_uniformBegin < draw.m_uniformEnd; bool bindAttribs = false; - rendererUpdateUniforms(this, _render->m_uniformBuffer, draw.m_constBegin, draw.m_constEnd); + rendererUpdateUniforms(this, _render->m_uniformBuffer[draw.m_uniformIdx], draw.m_uniformBegin, draw.m_uniformEnd); if (key.m_program != programIdx) { programIdx = key.m_program; - GLuint id = invalidHandle == programIdx ? 0 : m_program[programIdx].m_id; + GLuint id = kInvalidHandle == programIdx ? 0 : m_program[programIdx].m_id; // Skip rendering if program index is valid, but program is invalid. - programIdx = 0 == id ? invalidHandle : programIdx; + programIdx = 0 == id ? kInvalidHandle : programIdx; GL_CHECK(glUseProgram(id) ); programChanged = @@ -6997,7 +7259,7 @@ namespace bgfx { namespace gl bindAttribs = true; } - if (invalidHandle != programIdx) + if (kInvalidHandle != programIdx) { ProgramGL& program = m_program[programIdx]; @@ -7019,7 +7281,7 @@ namespace bgfx { namespace gl || current.m_un.m_draw.m_textureFlags != bind.m_un.m_draw.m_textureFlags || programChanged) { - if (invalidHandle != bind.m_idx) + if (kInvalidHandle != bind.m_idx) { switch (bind.m_type) { @@ -7034,7 +7296,6 @@ namespace bgfx { namespace gl { const IndexBufferGL& buffer = m_indexBuffers[bind.m_idx]; GL_CHECK(glBindBufferBase(GL_SHADER_STORAGE_BUFFER, stage, buffer.m_id) ); - // TODO: barriers? } break; @@ -7042,7 +7303,6 @@ namespace bgfx { namespace gl { const VertexBufferGL& buffer = m_vertexBuffers[bind.m_idx]; GL_CHECK(glBindBufferBase(GL_SHADER_STORAGE_BUFFER, stage, buffer.m_id) ); - // TODO: barriers? } break; } @@ -7053,153 +7313,7 @@ namespace bgfx { namespace gl } } - if (0 != defaultVao - && 0 == draw.m_stream[0].m_startVertex - && 0 == draw.m_instanceDataOffset) { - bool diffStartVertex = false; - bool diffStreamHandles = false; - for (uint32_t idx = 0, streamMask = draw.m_streamMask, ntz = bx::uint32_cnttz(streamMask) - ; 0 != streamMask - ; streamMask >>= 1, idx += 1, ntz = bx::uint32_cnttz(streamMask) - ) - { - streamMask >>= ntz; - idx += ntz; - - if (currentState.m_stream[idx].m_handle.idx != draw.m_stream[idx].m_handle.idx) - { - diffStreamHandles = true; - break; - } - - if (currentState.m_stream[idx].m_startVertex != draw.m_stream[idx].m_startVertex) - { - diffStartVertex = true; - break; - } - } - - if (programChanged - || currentState.m_streamMask != draw.m_streamMask - || currentState.m_indexBuffer.idx != draw.m_indexBuffer.idx - || currentState.m_instanceDataOffset != draw.m_instanceDataOffset - || currentState.m_instanceDataStride != draw.m_instanceDataStride - || currentState.m_instanceDataBuffer.idx != draw.m_instanceDataBuffer.idx - || diffStartVertex - || diffStreamHandles) - { - bx::HashMurmur2A murmur; - murmur.begin(); - - for (uint32_t idx = 0, streamMask = draw.m_streamMask, ntz = bx::uint32_cnttz(streamMask) - ; 0 != streamMask - ; streamMask >>= 1, idx += 1, ntz = bx::uint32_cnttz(streamMask) - ) - { - streamMask >>= ntz; - idx += ntz; - - const Stream& stream = draw.m_stream[idx]; - murmur.add(stream.m_handle.idx); - - if (isValid(stream.m_handle) ) - { - const VertexBufferGL& vb = m_vertexBuffers[stream.m_handle.idx]; - uint16_t decl = !isValid(vb.m_decl) ? stream.m_decl.idx : vb.m_decl.idx; - murmur.add(decl); - } - - currentState.m_stream[idx].m_handle = stream.m_handle; - currentState.m_stream[idx].m_startVertex = stream.m_startVertex; - } - currentState.m_streamMask = draw.m_streamMask; - - murmur.add(draw.m_indexBuffer.idx); - murmur.add(draw.m_instanceDataBuffer.idx); - murmur.add(draw.m_instanceDataOffset); - murmur.add(draw.m_instanceDataStride); - murmur.add(programIdx); - uint32_t hash = murmur.end(); - - currentState.m_indexBuffer = draw.m_indexBuffer; - currentState.m_instanceDataOffset = draw.m_instanceDataOffset; - currentState.m_instanceDataStride = draw.m_instanceDataStride; - - GLuint id = m_vaoStateCache.find(hash); - if (UINT32_MAX != id) - { - currentVao = id; - GL_CHECK(glBindVertexArray(id) ); - } - else - { - id = m_vaoStateCache.add(hash); - currentVao = id; - GL_CHECK(glBindVertexArray(id) ); - - program.add(hash); - - program.bindAttributesBegin(); - for (uint32_t idx = 0, streamMask = draw.m_streamMask, ntz = bx::uint32_cnttz(streamMask) - ; 0 != streamMask - ; streamMask >>= 1, idx += 1, ntz = bx::uint32_cnttz(streamMask) - ) - { - streamMask >>= ntz; - idx += ntz; - - const Stream& stream = draw.m_stream[idx]; - - if (isValid(stream.m_handle) ) - { - VertexBufferGL& vb = m_vertexBuffers[stream.m_handle.idx]; - vb.add(hash); - - uint16_t decl = !isValid(vb.m_decl) ? stream.m_decl.idx : vb.m_decl.idx; - GL_CHECK(glBindBuffer(GL_ARRAY_BUFFER, vb.m_id) ); - program.bindAttributes(m_vertexDecls[decl], stream.m_startVertex); - } - - if (isValid(draw.m_instanceDataBuffer) ) - { - VertexBufferGL& instanceVb = m_vertexBuffers[draw.m_instanceDataBuffer.idx]; - instanceVb.add(hash); - GL_CHECK(glBindBuffer(GL_ARRAY_BUFFER, instanceVb.m_id) ); - program.bindInstanceData(draw.m_instanceDataStride, draw.m_instanceDataOffset); - } - } - program.bindAttributesEnd(); - - if (isValid(draw.m_indexBuffer) ) - { - IndexBufferGL& ib = m_indexBuffers[draw.m_indexBuffer.idx]; - ib.add(hash); - GL_CHECK(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ib.m_id) ); - } - else - { - GL_CHECK(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0) ); - } - } - } - } - else - { - if (0 != defaultVao - && 0 != currentVao) - { - GL_CHECK(glBindVertexArray(defaultVao) ); - currentState.m_streamMask = 0; - for (size_t ii = 0; ii < BGFX_CONFIG_MAX_VERTEX_STREAMS; ++ii) - { - currentState.m_stream[ii].m_handle.idx = invalidHandle; - } - currentState.m_indexBuffer.idx = invalidHandle; - bindAttribs = true; - currentVao = 0; - } - bool diffStreamHandles = false; for (uint32_t idx = 0, streamMask = draw.m_streamMask, ntz = bx::uint32_cnttz(streamMask) ; 0 != streamMask @@ -7247,7 +7361,7 @@ namespace bgfx { namespace gl currentState.m_indexBuffer = draw.m_indexBuffer; uint16_t handle = draw.m_indexBuffer.idx; - if (invalidHandle != handle) + if (kInvalidHandle != handle) { IndexBufferGL& ib = m_indexBuffers[handle]; GL_CHECK(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ib.m_id) ); @@ -7386,7 +7500,7 @@ namespace bgfx { namespace gl { if (isValid(currentState.m_indirectBuffer) ) { - currentState.m_indirectBuffer.idx = invalidHandle; + currentState.m_indirectBuffer.idx = kInvalidHandle; GL_CHECK(glBindBuffer(GL_DRAW_INDIRECT_BUFFER, 0) ); } @@ -7456,6 +7570,8 @@ namespace bgfx { namespace gl } } + submitBlit(bs, BGFX_CONFIG_MAX_VIEWS); + blitMsaaFbo(); if (m_vaoSupport) @@ -7463,7 +7579,7 @@ namespace bgfx { namespace gl GL_CHECK(glBindVertexArray(m_vao) ); } - if (0 < _render->m_num) + if (0 < _render->m_numRenderItems) { if (0 != (m_resolution.m_flags & BGFX_RESET_FLUSH_AFTER_RENDER) ) { @@ -7474,24 +7590,13 @@ namespace bgfx { namespace gl capture(); captureElapsed += bx::getHPCounter(); - BGFX_GPU_PROFILER_END(); - BGFX_PROFILER_END(); + profiler.end(); } } - BGFX_GPU_PROFILER_END(); - m_glctx.makeCurrent(NULL); - int64_t now = bx::getHPCounter(); - elapsed += now; - - static int64_t last = now; - - Stats& perfStats = _render->m_perfStats; - perfStats.cpuTimeBegin = last; - - int64_t frameTime = now - last; - last = now; + int64_t timeEnd = bx::getHPCounter(); + int64_t frameTime = timeEnd - timeBegin; static int64_t min = frameTime; static int64_t max = frameTime; @@ -7501,49 +7606,52 @@ namespace bgfx { namespace gl static uint32_t maxGpuLatency = 0; static double maxGpuElapsed = 0.0f; double elapsedGpuMs = 0.0; - uint64_t elapsedGl = 0; - if (m_timerQuerySupport) + if (UINT32_MAX != frameQueryIdx) { - m_gpuTimer.end(); - do - { - elapsedGl = m_gpuTimer.m_elapsed; - elapsedGpuMs = double(elapsedGl)/1e6; - maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; - } - while (m_gpuTimer.get() ); + m_gpuTimer.end(frameQueryIdx); - maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); + const TimerQueryGL::Result& result = m_gpuTimer.m_result[BGFX_CONFIG_MAX_VIEWS]; + double toGpuMs = 1000.0 / 1e9; + elapsedGpuMs = (result.m_end - result.m_begin) * toGpuMs; + maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; + + maxGpuLatency = bx::uint32_imax(maxGpuLatency, result.m_pending-1); } const int64_t timerFreq = bx::getHPFrequency(); - perfStats.cpuTimeEnd = now; + Stats& perfStats = _render->m_perfStats; + perfStats.cpuTimeBegin = timeBegin; + perfStats.cpuTimeEnd = timeEnd; perfStats.cpuTimerFreq = timerFreq; - perfStats.gpuTimeBegin = m_gpuTimer.m_begin; - perfStats.gpuTimeEnd = m_gpuTimer.m_end; + const TimerQueryGL::Result& result = m_gpuTimer.m_result[BGFX_CONFIG_MAX_VIEWS]; + perfStats.gpuTimeBegin = result.m_begin; + perfStats.gpuTimeEnd = result.m_end; perfStats.gpuTimerFreq = 1000000000; perfStats.numDraw = statsKeyType[0]; perfStats.numCompute = statsKeyType[1]; perfStats.maxGpuLatency = maxGpuLatency; + perfStats.gpuMemoryMax = -INT64_MAX; + perfStats.gpuMemoryUsed = -INT64_MAX; if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) { m_needPresent = true; TextVideoMem& tvm = m_textVideoMem; - static int64_t next = now; + static int64_t next = timeEnd; - if (now >= next) + if (timeEnd >= next) { - next = now + timerFreq; + next = timeEnd + timerFreq; double freq = double(timerFreq); double toMs = 1000.0/freq; tvm.clear(); uint16_t pos = 0; - tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x89 : 0x8f, " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " + tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f + , " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " , getRendererName() ); tvm.printf(0, pos++, 0x8f, " Vendor: %s ", m_vendor); @@ -7556,7 +7664,7 @@ namespace bgfx { namespace gl tvm.printf(0, pos++, 0x8f, " Memory: %s (process) ", processMemoryUsed); pos = 10; - tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " + tvm.printf(10, pos++, 0x8b, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " , double(frameTime)*toMs , double(min)*toMs , double(max)*toMs @@ -7567,7 +7675,7 @@ namespace bgfx { namespace gl bx::snprintf(hmd, BX_COUNTOF(hmd), ", [%c] HMD ", hmdEnabled ? '\xfe' : ' '); const uint32_t msaa = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT; - tvm.printf(10, pos++, 0x8e, " Reset flags: [%c] vsync, [%c] MSAAx%d%s, [%c] MaxAnisotropy " + tvm.printf(10, pos++, 0x8b, " Reset flags: [%c] vsync, [%c] MSAAx%d%s, [%c] MaxAnisotropy " , !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? '\xfe' : ' ' , 0 != msaa ? '\xfe' : ' ' , 1<m_num + double elapsedCpuMs = double(frameTime)*toMs; + tvm.printf(10, pos++, 0x8b, " Submitted: %5d (draw %5d, compute %4d) / CPU %7.4f [ms] %c GPU %7.4f [ms] (latency %d) " + , _render->m_numRenderItems , statsKeyType[0] , statsKeyType[1] , elapsedCpuMs @@ -7590,7 +7698,7 @@ namespace bgfx { namespace gl for (uint32_t ii = 0; ii < BX_COUNTOF(s_primInfo); ++ii) { - tvm.printf(10, pos++, 0x8e, " %10s: %7d (#inst: %5d), submitted: %7d " + tvm.printf(10, pos++, 0x8b, " %10s: %7d (#inst: %5d), submitted: %7d " , s_primName[ii] , statsNumPrimsRendered[ii] , statsNumInstances[ii] @@ -7603,16 +7711,15 @@ namespace bgfx { namespace gl tvm.printf(tvm.m_width-27, 0, 0x1f, " [F11 - RenderDoc capture] "); } - tvm.printf(10, pos++, 0x8e, " Indices: %7d ", statsNumIndices); - tvm.printf(10, pos++, 0x8e, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); - tvm.printf(10, pos++, 0x8e, " DVB size: %7d ", _render->m_vboffset); - tvm.printf(10, pos++, 0x8e, " DIB size: %7d ", _render->m_iboffset); + tvm.printf(10, pos++, 0x8b, " Indices: %7d ", statsNumIndices); +// tvm.printf(10, pos++, 0x8b, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); + tvm.printf(10, pos++, 0x8b, " DVB size: %7d ", _render->m_vboffset); + tvm.printf(10, pos++, 0x8b, " DIB size: %7d ", _render->m_iboffset); pos++; - tvm.printf(10, pos++, 0x8e, " State cache: "); - tvm.printf(10, pos++, 0x8e, " VAO | Sampler "); - tvm.printf(10, pos++, 0x8e, " %6d | %6d " - , m_vaoStateCache.getCount() + tvm.printf(10, pos++, 0x8b, " State cache: "); + tvm.printf(10, pos++, 0x8b, " Sampler "); + tvm.printf(10, pos++, 0x8b, " %6d " , m_samplerStateCache.getCount() ); @@ -7640,19 +7747,19 @@ namespace bgfx { namespace gl bx::prettify(tmp1, BX_COUNTOF(tmp1), vboFree[1]); bx::prettify(tmp2, BX_COUNTOF(tmp2), vboFree[2]); bx::prettify(tmp3, BX_COUNTOF(tmp3), vboFree[3]); - tvm.printf(10, pos++, 0x8e, " VBO: %10s, %10s, %10s, %10s ", tmp0, tmp1, tmp2, tmp3); + tvm.printf(10, pos++, 0x8b, " VBO: %10s, %10s, %10s, %10s ", tmp0, tmp1, tmp2, tmp3); bx::prettify(tmp0, BX_COUNTOF(tmp0), texFree[0]); bx::prettify(tmp1, BX_COUNTOF(tmp1), texFree[1]); bx::prettify(tmp2, BX_COUNTOF(tmp2), texFree[2]); bx::prettify(tmp3, BX_COUNTOF(tmp3), texFree[3]); - tvm.printf(10, pos++, 0x8e, " Texture: %10s, %10s, %10s, %10s ", tmp0, tmp1, tmp2, tmp3); + tvm.printf(10, pos++, 0x8b, " Texture: %10s, %10s, %10s, %10s ", tmp0, tmp1, tmp2, tmp3); bx::prettify(tmp0, BX_COUNTOF(tmp0), rbfFree[0]); bx::prettify(tmp1, BX_COUNTOF(tmp1), rbfFree[1]); bx::prettify(tmp2, BX_COUNTOF(tmp2), rbfFree[2]); bx::prettify(tmp3, BX_COUNTOF(tmp3), rbfFree[3]); - tvm.printf(10, pos++, 0x8e, " Render Buffer: %10s, %10s, %10s, %10s ", tmp0, tmp1, tmp2, tmp3); + tvm.printf(10, pos++, 0x8b, " Render Buffer: %10s, %10s, %10s, %10s ", tmp0, tmp1, tmp2, tmp3); } else if (s_extension[Extension::NVX_gpu_memory_info].m_supported) { @@ -7676,23 +7783,23 @@ namespace bgfx { namespace gl char tmp1[16]; bx::prettify(tmp0, BX_COUNTOF(tmp0), dedicated); - tvm.printf(10, pos++, 0x8e, " Dedicated: %10s ", tmp0); + tvm.printf(10, pos++, 0x8b, " Dedicated: %10s ", tmp0); bx::prettify(tmp0, BX_COUNTOF(tmp0), currAvail); bx::prettify(tmp1, BX_COUNTOF(tmp1), totalAvail); - tvm.printf(10, pos++, 0x8e, " Available: %10s / %10s ", tmp0, tmp1); + tvm.printf(10, pos++, 0x8b, " Available: %10s / %10s ", tmp0, tmp1); bx::prettify(tmp0, BX_COUNTOF(tmp0), evictedCount); bx::prettify(tmp1, BX_COUNTOF(tmp1), evictedMemory); - tvm.printf(10, pos++, 0x8e, " Eviction: %10s / %10s ", tmp0, tmp1); + tvm.printf(10, pos++, 0x8b, " Eviction: %10s / %10s ", tmp0, tmp1); } #endif // BGFX_CONFIG_RENDERER_OPENGL pos++; double captureMs = double(captureElapsed)*toMs; - tvm.printf(10, pos++, 0x8e, " Capture: %7.4f [ms] ", captureMs); + tvm.printf(10, pos++, 0x8b, " Capture: %7.4f [ms] ", captureMs); - uint8_t attr[2] = { 0x89, 0x8a }; + uint8_t attr[2] = { 0x8c, 0x8a }; uint8_t attrIndex = _render->m_waitSubmit < _render->m_waitRender; tvm.printf(10, pos++, attr[attrIndex&1], " Submit wait: %7.4f [ms] ", double(_render->m_waitSubmit)*toMs); tvm.printf(10, pos++, attr[(attrIndex+1)&1], " Render wait: %7.4f [ms] ", double(_render->m_waitRender)*toMs); @@ -7712,18 +7819,13 @@ namespace bgfx { namespace gl } } } // namespace bgfx -#undef BGFX_GPU_PROFILER_BIND -#undef BGFX_GPU_PROFILER_UNBIND -#undef BGFX_GPU_PROFILER_BEGIN -#undef BGFX_GPU_PROFILER_BEGIN_DYNAMIC -#undef BGFX_GPU_PROFILER_END - #else namespace bgfx { namespace gl { - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { + BX_UNUSED(_init); return NULL; } diff --git a/3rdparty/bgfx/src/renderer_gl.h b/3rdparty/bgfx/src/renderer_gl.h index 4d9778a..5299997 100644 --- a/3rdparty/bgfx/src/renderer_gl.h +++ b/3rdparty/bgfx/src/renderer_gl.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -7,26 +7,26 @@ #define BGFX_RENDERER_GL_H_HEADER_GUARD #define BGFX_USE_EGL (BGFX_CONFIG_RENDERER_OPENGLES && (0 \ - || BX_PLATFORM_ANDROID \ - || BX_PLATFORM_EMSCRIPTEN \ - || BX_PLATFORM_LINUX \ - || BX_PLATFORM_BSD \ - || BX_PLATFORM_QNX \ - || BX_PLATFORM_RPI \ - || BX_PLATFORM_STEAMLINK \ - || BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_ANDROID \ + || BX_PLATFORM_BSD \ + || BX_PLATFORM_EMSCRIPTEN \ + || BX_PLATFORM_LINUX \ + || BX_PLATFORM_NX \ + || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK \ + || BX_PLATFORM_WINDOWS \ ) ) #define BGFX_USE_WGL (BGFX_CONFIG_RENDERER_OPENGL && BX_PLATFORM_WINDOWS) #define BGFX_USE_GLX (BGFX_CONFIG_RENDERER_OPENGL && (0 \ - || BX_PLATFORM_LINUX \ - || BX_PLATFORM_BSD \ + || BX_PLATFORM_BSD \ + || BX_PLATFORM_LINUX \ ) ) #define BGFX_USE_GL_DYNAMIC_LIB (0 \ - || BX_PLATFORM_LINUX \ - || BX_PLATFORM_BSD \ - || BX_PLATFORM_OSX \ + || BX_PLATFORM_BSD \ + || BX_PLATFORM_LINUX \ + || BX_PLATFORM_OSX \ || BX_PLATFORM_WINDOWS \ ) @@ -82,11 +82,17 @@ typedef uint64_t GLuint64; # define GL_HALF_FLOAT GL_HALF_FLOAT_OES # define GL_RGBA8 GL_RGBA8_OES # define GL_UNSIGNED_INT_2_10_10_10_REV GL_UNSIGNED_INT_2_10_10_10_REV_EXT -# define GL_TEXTURE_3D GL_TEXTURE_3D_OES +# ifndef GL_TEXTURE_3D +# define GL_TEXTURE_3D GL_TEXTURE_3D_OES +# endif // GL_TEXTURE_3D # define GL_SAMPLER_3D GL_SAMPLER_3D_OES # define GL_TEXTURE_WRAP_R GL_TEXTURE_WRAP_R_OES -# define GL_MIN GL_MIN_EXT -# define GL_MAX GL_MAX_EXT +# ifndef GL_MIN +# define GL_MIN GL_MIN_EXT +# endif // GL_MIN +# ifndef GL_MAX +# define GL_MAX GL_MAX_EXT +# endif // GL_MAX # define GL_DEPTH_COMPONENT24 GL_DEPTH_COMPONENT24_OES # define GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8_OES # define GL_DEPTH_COMPONENT32 GL_DEPTH_COMPONENT32_OES @@ -840,6 +846,14 @@ typedef uint64_t GLuint64; # define GL_UPPER_LEFT 0x8CA2 #endif // GL_UPPER_LEFT +#ifndef GL_SHADER +# define GL_SHADER 0x82E1 +#endif // GL_SHADER + +#ifndef GL_TEXTURE +# define GL_TEXTURE 0x1702 +#endif // GL_TEXTURE + // _KHR or _ARB... #define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 @@ -935,9 +949,11 @@ typedef uint64_t GLuint64; # define GL_LINE_SMOOTH 0x0B20 #endif // GL_LINE_SMOOTH -#if BX_PLATFORM_NACL -# include "glcontext_ppapi.h" -#elif BX_PLATFORM_WINDOWS +#ifndef GL_TEXTURE_LOD_BIAS +# define GL_TEXTURE_LOD_BIAS 0x8501 +#endif // GL_TEXTURE_LOD_BIAS + +#if BX_PLATFORM_WINDOWS # include #elif BX_PLATFORM_LINUX || BX_PLATFORM_BSD # include "glcontext_glx.h" @@ -997,87 +1013,6 @@ namespace bgfx { namespace gl #define GL_IMPORT(_optional, _proto, _func, _import) extern _proto _func #include "glimports.h" - class VaoStateCache - { - public: - GLuint add(uint32_t _hash) - { - invalidate(_hash); - - GLuint arrayId; - GL_CHECK(glGenVertexArrays(1, &arrayId) ); - - m_hashMap.insert(stl::make_pair(_hash, arrayId) ); - - return arrayId; - } - - GLuint find(uint32_t _hash) - { - HashMap::iterator it = m_hashMap.find(_hash); - if (it != m_hashMap.end() ) - { - return it->second; - } - - return UINT32_MAX; - } - - void invalidate(uint32_t _hash) - { - GL_CHECK(glBindVertexArray(0) ); - - HashMap::iterator it = m_hashMap.find(_hash); - if (it != m_hashMap.end() ) - { - GL_CHECK(glDeleteVertexArrays(1, &it->second) ); - m_hashMap.erase(it); - } - } - - void invalidate() - { - GL_CHECK(glBindVertexArray(0) ); - - for (HashMap::iterator it = m_hashMap.begin(), itEnd = m_hashMap.end(); it != itEnd; ++it) - { - GL_CHECK(glDeleteVertexArrays(1, &it->second) ); - } - m_hashMap.clear(); - } - - uint32_t getCount() const - { - return uint32_t(m_hashMap.size() ); - } - - private: - typedef stl::unordered_map HashMap; - HashMap m_hashMap; - }; - - class VaoCacheRef - { - public: - void add(uint32_t _hash) - { - m_vaoSet.insert(_hash); - } - - void invalidate(VaoStateCache& _vaoCache) - { - for (VaoSet::iterator it = m_vaoSet.begin(), itEnd = m_vaoSet.end(); it != itEnd; ++it) - { - _vaoCache.invalidate(*it); - } - - m_vaoSet.clear(); - } - - typedef stl::unordered_set VaoSet; - VaoSet m_vaoSet; - }; - class SamplerStateCache { public: @@ -1173,14 +1108,8 @@ namespace bgfx { namespace gl void destroy(); - void add(uint32_t _hash) - { - m_vcref.add(_hash); - } - GLuint m_id; uint32_t m_size; - VaoCacheRef m_vcref; uint16_t m_flags; }; @@ -1227,16 +1156,10 @@ namespace bgfx { namespace gl void destroy(); - void add(uint32_t _hash) - { - m_vcref.add(_hash); - } - GLuint m_id; GLenum m_target; uint32_t m_size; VertexDeclHandle m_decl; - VaoCacheRef m_vcref; }; struct TextureGL @@ -1365,11 +1288,6 @@ namespace bgfx { namespace gl } } - void add(uint32_t _hash) - { - m_vcref.add(_hash); - } - GLuint m_id; uint8_t m_unboundUsedAttrib[Attrib::Count]; // For tracking unbound used attributes between begin()/end(). @@ -1384,94 +1302,114 @@ namespace bgfx { namespace gl UniformBuffer* m_constantBuffer; PredefinedUniform m_predefined[PredefinedUniform::Count]; uint8_t m_numPredefined; - VaoCacheRef m_vcref; }; struct TimerQueryGL { TimerQueryGL() - : m_control(BX_COUNTOF(m_frame) ) + : m_control(BX_COUNTOF(m_query) ) { } void create() { - for (uint32_t ii = 0; ii < BX_COUNTOF(m_frame); ++ii) + for (uint32_t ii = 0; ii < BX_COUNTOF(m_query); ++ii) { - Frame& frame = m_frame[ii]; - GL_CHECK(glGenQueries(1, &frame.m_begin) ); - GL_CHECK(glGenQueries(1, &frame.m_elapsed) ); + Query& query = m_query[ii]; + query.m_ready = false; + GL_CHECK(glGenQueries(1, &query.m_begin) ); + GL_CHECK(glGenQueries(1, &query.m_end) ); + } + + for (uint32_t ii = 0; ii < BX_COUNTOF(m_result); ++ii) + { + Result& result = m_result[ii]; + result.reset(); } } void destroy() { - for (uint32_t ii = 0; ii < BX_COUNTOF(m_frame); ++ii) + for (uint32_t ii = 0; ii < BX_COUNTOF(m_query); ++ii) { - Frame& frame = m_frame[ii]; - GL_CHECK(glDeleteQueries(1, &frame.m_begin) ); - GL_CHECK(glDeleteQueries(1, &frame.m_elapsed) ); + Query& query = m_query[ii]; + GL_CHECK(glDeleteQueries(1, &query.m_begin) ); + GL_CHECK(glDeleteQueries(1, &query.m_end) ); } } - void begin() + uint32_t begin(uint32_t _resultIdx) { while (0 == m_control.reserve(1) ) { - get(); + update(); } - Frame& frame = m_frame[m_control.m_current]; - if (!BX_ENABLED(BX_PLATFORM_OSX) ) - { - GL_CHECK(glQueryCounter(frame.m_begin - , GL_TIMESTAMP - ) ); - } + Result& result = m_result[_resultIdx]; + ++result.m_pending; - GL_CHECK(glBeginQuery(GL_TIME_ELAPSED - , frame.m_elapsed - ) ); - } + const uint32_t idx = m_control.m_current; + Query& query = m_query[idx]; + query.m_resultIdx = _resultIdx; + query.m_ready = false; + + GL_CHECK(glQueryCounter(query.m_begin + , GL_TIMESTAMP + ) ); - void end() - { - GL_CHECK(glEndQuery(GL_TIME_ELAPSED) ); m_control.commit(1); + + return idx; } - bool get() + void end(uint32_t _idx) + { + Query& query = m_query[_idx]; + query.m_ready = true; + + GL_CHECK(glQueryCounter(query.m_end + , GL_TIMESTAMP + ) ); + + while (update() ) + { + } + } + + bool update() { if (0 != m_control.available() ) { - Frame& frame = m_frame[m_control.m_read]; + Query& query = m_query[m_control.m_read]; + + if (!query.m_ready) + { + return false; + } GLint available; - GL_CHECK(glGetQueryObjectiv(frame.m_elapsed - , GL_QUERY_RESULT_AVAILABLE - , &available - ) ); + GL_CHECK(glGetQueryObjectiv(query.m_end + , GL_QUERY_RESULT_AVAILABLE + , &available + ) ); if (available) { - if (!BX_ENABLED(BX_PLATFORM_OSX) ) - { - GL_CHECK(glGetQueryObjectui64v(frame.m_begin - , GL_QUERY_RESULT - , &m_begin - ) ); - } - else - { - m_begin = 0; - } - - GL_CHECK(glGetQueryObjectui64v(frame.m_elapsed - , GL_QUERY_RESULT - , &m_elapsed - ) ); - m_end = m_begin + m_elapsed; m_control.consume(1); + + Result& result = m_result[query.m_resultIdx]; + --result.m_pending; + + GL_CHECK(glGetQueryObjectui64v(query.m_begin + , GL_QUERY_RESULT + , &result.m_begin + ) ); + + GL_CHECK(glGetQueryObjectui64v(query.m_end + , GL_QUERY_RESULT + , &result.m_end + ) ); + return true; } } @@ -1479,17 +1417,31 @@ namespace bgfx { namespace gl return false; } - uint64_t m_begin; - uint64_t m_end; - uint64_t m_elapsed; - - struct Frame + struct Result { - GLuint m_begin; - GLuint m_elapsed; + void reset() + { + m_begin = 0; + m_end = 0; + m_pending = 0; + } + + uint64_t m_begin; + uint64_t m_end; + uint32_t m_pending; }; - Frame m_frame[4]; + struct Query + { + GLuint m_begin; + GLuint m_end; + uint32_t m_resultIdx; + bool m_ready; + }; + + Result m_result[BGFX_CONFIG_MAX_VIEWS+1]; + + Query m_query[BGFX_CONFIG_MAX_VIEWS*4]; bx::RingBufferControl m_control; }; @@ -1517,6 +1469,45 @@ namespace bgfx { namespace gl bx::RingBufferControl m_control; }; + class LineReader : public bx::ReaderI + { + public: + LineReader(const void* _str) + : m_str( (const char*)_str) + , m_pos(0) + , m_size(bx::strLen( (const char*)_str) ) + { + } + + virtual int32_t read(void* _data, int32_t _size, bx::Error* _err) override + { + if (m_str[m_pos] == '\0' + || m_pos == m_size) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_EOF, "LineReader: EOF."); + return 0; + } + + uint32_t pos = m_pos; + const char* str = &m_str[pos]; + const char* nl = bx::strnl(str); + pos += (uint32_t)(nl - str); + + const char* eol = &m_str[pos]; + + uint32_t size = bx::uint32_min(uint32_t(eol - str), _size); + + bx::memCopy(_data, str, size); + m_pos += size; + + return size; + } + + const char* m_str; + uint32_t m_pos; + uint32_t m_size; + }; + } /* namespace gl */ } // namespace bgfx #endif // BGFX_RENDERER_GL_H_HEADER_GUARD diff --git a/3rdparty/bgfx/src/renderer_gnm.cpp b/3rdparty/bgfx/src/renderer_gnm.cpp index 5d7b107..cb34386 100644 --- a/3rdparty/bgfx/src/renderer_gnm.cpp +++ b/3rdparty/bgfx/src/renderer_gnm.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -33,8 +33,9 @@ BGFX_DECLARE_EMBEDDED_SHADER(fs_clear7); namespace bgfx { namespace gnm { - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { + BX_UNUSED(_init); return NULL; } diff --git a/3rdparty/bgfx/src/renderer_mtl.h b/3rdparty/bgfx/src/renderer_mtl.h index 86893f7..805fa1e 100644 --- a/3rdparty/bgfx/src/renderer_mtl.h +++ b/3rdparty/bgfx/src/renderer_mtl.h @@ -224,14 +224,8 @@ namespace bgfx { namespace mtl id newLibraryWithSource(const char* _source) { - MTLCompileOptions* options = [MTLCompileOptions new]; - //NOTE: turned of as 'When using the fast variants, math functions execute more quickly, - // but operate over a **LIMITED RANGE** and their behavior when handling NaN values is not defined.' - if (BX_ENABLED(BX_PLATFORM_IOS)) - options.fastMathEnabled = NO; - NSError* error; - id lib = [m_obj newLibraryWithSource:@(_source) options:options error:&error]; + id lib = [m_obj newLibraryWithSource:@(_source) options:nil error:&error]; BX_WARN(NULL == error , "Shader compilation failed: %s" , [error.localizedDescription cStringUsingEncoding:NSASCIIStringEncoding] @@ -332,6 +326,14 @@ namespace bgfx { namespace mtl MTL_CLASS(Function) NSArray* vertexAttributes() { return m_obj.vertexAttributes; } + + void setLabel(const char* _label) + { + if ([m_obj respondsToSelector:@selector(setLabel:)]) + { + [m_obj setLabel:@(_label)]; + } + } MTL_CLASS_END MTL_CLASS(Library) @@ -504,6 +506,11 @@ namespace bgfx { namespace mtl { return m_obj.textureType; } + + void setLabel(const char* _label) + { + [m_obj setLabel:@(_label)]; + } MTL_CLASS_END typedef id ComputePipelineState; @@ -732,8 +739,7 @@ namespace bgfx { namespace mtl , m_vshConstantBufferAlignmentMask(0) , m_fshConstantBufferSize(0) , m_fshConstantBufferAlignmentMask(0) - , m_usedVertexSamplerStages(0) - , m_usedFragmentSamplerStages(0) + , m_samplerCount(0) , m_numPredefined(0) , m_processedUniforms(false) { @@ -759,8 +765,16 @@ namespace bgfx { namespace mtl uint32_t m_vshConstantBufferAlignmentMask; uint32_t m_fshConstantBufferSize; uint32_t m_fshConstantBufferAlignmentMask; - uint32_t m_usedVertexSamplerStages; - uint32_t m_usedFragmentSamplerStages; + + struct SamplerInfo + { + uint32_t m_index; + bgfx::UniformHandle m_uniform; + bool m_fragment; + }; + SamplerInfo m_samplers[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS]; + uint32_t m_samplerCount; + PredefinedUniform m_predefined[PredefinedUniform::Count*2]; uint8_t m_numPredefined; bool m_processedUniforms; @@ -818,7 +832,7 @@ namespace bgfx { namespace mtl , m_pixelFormatHash(0) , m_num(0) { - m_depthHandle.idx = invalidHandle; + m_depthHandle.idx = kInvalidHandle; } void create(uint8_t _num, const Attachment* _attachment); diff --git a/3rdparty/bgfx/src/renderer_mtl.mm b/3rdparty/bgfx/src/renderer_mtl.mm index b822dd9..a7e9399 100644 --- a/3rdparty/bgfx/src/renderer_mtl.mm +++ b/3rdparty/bgfx/src/renderer_mtl.mm @@ -21,33 +21,24 @@ /* // known metal shader generation issues: 03-raymarch: OSX10.11.3 nothing is visible ( depth/color swap in fragment output struct fixed this ) - 14-shadowvolumes: in texture as stencil mode - columns/bunny are dark. in fs_shadowvolume_color_lighting SAMPLER2D(s_texStencil, 1) is - converted to "texture2d s_texStencil [[texture(0)]], sampler _mtlsmp_s_texStencil [[sampler(0)]]". Slot is 1 -> 0. - 15-shadowmaps-simple: shader compilation error - 16-shadowmaps: //problem with essl -> metal: SAMPLER2D(u_shadowMap0, 4); sampler index is lost. Shadowmap is set to slot 4, but - metal shader uses sampler/texture slot 0. this could require changes outside of renderer_mtl? - packFloatToRGBA needs highp. currently it uses half. 24-nbody: no generated compute shaders for metal - 27-terrain: shaderc generates invalid metal shader for vs_terrain_height_texture. vertex output: half4 gl_Position [[position]], should be float4 - 31-rsm: - :6:23: error: type 'half4' (aka 'vector_half4') is not valid for attribute 'position' - half4 gl_Position [[position]]; - Known issues(driver problems??): OSX mac mini(late 2014), OSX10.11.3 : nanovg-rendering: color writemask off causes problem... - 03-raymarch: OSX nothing is visible ( depth/color order should be swapped in fragment output struct) - works fine with newer OSX + 03-raymarch: OSX nothing is visible ( depth/color order should be swapped in fragment output struct) + works fine with newer OSX iPad mini 2, iOS 8.1.1: 21-deferred: scissor not working properly - 26-occlusion: query doesn't work with two rendercommandencoders - Only on this device ( no problem on iPad Air 2 with iOS9.3.1) + 26-occlusion: query doesn't work with two rendercommandencoders + Only on this device ( no problem on iPad Air 2 with iOS9.3.1) TODOs: + - support multiple vertex buffers: 34-mvs + - framebufferMtl and TextureMtl resolve - FrameBufferMtl::postReset recreate framebuffer??? - renderpass load/resolve + renderpass load/resolve - capture with msaa: 07-callback - implement fb discard. problematic with multiple views that has same fb... - msaa color/depth/stencil is not saved. could have problem when we switch back to msaa framebuffer @@ -94,7 +85,7 @@ namespace bgfx { namespace mtl "LineStrip", "Point", }; - BX_STATIC_ASSERT(BX_COUNTOF(s_primInfo) == BX_COUNTOF(s_primName)); + BX_STATIC_ASSERT(BX_COUNTOF(s_primInfo) == BX_COUNTOF(s_primName) ); static const char* s_attribName[] = { @@ -104,6 +95,8 @@ namespace bgfx { namespace mtl "a_bitangent", "a_color0", "a_color1", + "a_color2", + "a_color3", "a_indices", "a_weight", "a_texcoord0", @@ -134,7 +127,7 @@ namespace bgfx { namespace mtl { MTLVertexFormatUChar2, MTLVertexFormatUChar2Normalized }, { MTLVertexFormatUChar2, MTLVertexFormatUChar2Normalized }, { MTLVertexFormatUChar3, MTLVertexFormatUChar3Normalized }, - { MTLVertexFormatUChar4, MTLVertexFormatUChar4Normalized } + { MTLVertexFormatUChar4, MTLVertexFormatUChar4Normalized }, }, //Uint10 @@ -143,7 +136,7 @@ namespace bgfx { namespace mtl { MTLVertexFormatUInt1010102Normalized, MTLVertexFormatUInt1010102Normalized }, { MTLVertexFormatUInt1010102Normalized, MTLVertexFormatUInt1010102Normalized }, { MTLVertexFormatUInt1010102Normalized, MTLVertexFormatUInt1010102Normalized }, - { MTLVertexFormatUInt1010102Normalized, MTLVertexFormatUInt1010102Normalized } + { MTLVertexFormatUInt1010102Normalized, MTLVertexFormatUInt1010102Normalized }, }, //Int16 @@ -151,7 +144,7 @@ namespace bgfx { namespace mtl { MTLVertexFormatShort2, MTLVertexFormatShort2Normalized }, { MTLVertexFormatShort2, MTLVertexFormatShort2Normalized }, { MTLVertexFormatShort3, MTLVertexFormatShort3Normalized }, - { MTLVertexFormatShort4, MTLVertexFormatShort4Normalized } + { MTLVertexFormatShort4, MTLVertexFormatShort4Normalized }, }, //Half @@ -159,7 +152,7 @@ namespace bgfx { namespace mtl { MTLVertexFormatHalf2, MTLVertexFormatHalf2 }, { MTLVertexFormatHalf2, MTLVertexFormatHalf2 }, { MTLVertexFormatHalf3, MTLVertexFormatHalf3 }, - { MTLVertexFormatHalf4, MTLVertexFormatHalf4 } + { MTLVertexFormatHalf4, MTLVertexFormatHalf4 }, }, //Float @@ -167,7 +160,7 @@ namespace bgfx { namespace mtl { MTLVertexFormatFloat, MTLVertexFormatFloat }, { MTLVertexFormatFloat2, MTLVertexFormatFloat2 }, { MTLVertexFormatFloat3, MTLVertexFormatFloat3 }, - { MTLVertexFormatFloat4, MTLVertexFormatFloat4 } + { MTLVertexFormatFloat4, MTLVertexFormatFloat4 }, }, }; BX_STATIC_ASSERT(AttribType::Count == BX_COUNTOF(s_attribType) ); @@ -217,7 +210,7 @@ namespace bgfx { namespace mtl MTLCompareFunctionGreater, MTLCompareFunctionNotEqual, MTLCompareFunctionNever, - MTLCompareFunctionAlways + MTLCompareFunctionAlways, }; static const MTLStencilOperation s_stencilOp[] = @@ -229,7 +222,7 @@ namespace bgfx { namespace mtl MTLStencilOperationIncrementClamp, MTLStencilOperationDecrementWrap, MTLStencilOperationDecrementClamp, - MTLStencilOperationInvert + MTLStencilOperationInvert, }; static const MTLSamplerAddressMode s_textureAddress[] = @@ -327,7 +320,7 @@ namespace bgfx { namespace mtl { MTLPixelFormat(42) /*ABGR4Unorm*/, MTLPixelFormatInvalid }, // RGBA4 { MTLPixelFormat(41) /*A1BGR5Unorm*/, MTLPixelFormatInvalid }, // RGB5A1 { MTLPixelFormatRGB10A2Unorm, MTLPixelFormatInvalid }, // RGB10A2 - { MTLPixelFormatRG11B10Float, MTLPixelFormatInvalid }, // R11G11B10F + { MTLPixelFormatRG11B10Float, MTLPixelFormatInvalid }, // RG11B10F { MTLPixelFormatInvalid, MTLPixelFormatInvalid }, // UnknownDepth { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D16 { MTLPixelFormatDepth32Float, MTLPixelFormatInvalid }, // D24 @@ -342,8 +335,8 @@ namespace bgfx { namespace mtl int s_msaa[5] = { 1,2,4,8,16 }; - #define SHADER_FUNCTION_NAME ("xlatMtlMain") - #define SHADER_UNIFORM_NAME ("_mtl_u") +#define SHADER_FUNCTION_NAME ("xlatMtlMain") +#define SHADER_UNIFORM_NAME ("_mtl_u") struct RendererContextMtl : public RendererContextI { @@ -365,11 +358,12 @@ namespace bgfx { namespace mtl { } - bool init() + bool init(const Init& _init) { + BX_UNUSED(_init); BX_TRACE("Init."); - m_fbh.idx = invalidHandle; + m_fbh.idx = kInvalidHandle; bx::memSet(m_uniforms, 0, sizeof(m_uniforms) ); bx::memSet(&m_resolution, 0, sizeof(m_resolution) ); @@ -384,7 +378,7 @@ namespace bgfx { namespace mtl if (NULL != NSClassFromString(@"CAMetalLayer") ) { - if (NULL == m_metalLayer) + if (NULL == m_metalLayer) #if BX_PLATFORM_IOS { CAMetalLayer* metalLayer = (CAMetalLayer*)g_platformData.nwh; @@ -399,10 +393,19 @@ namespace bgfx { namespace mtl } #elif BX_PLATFORM_OSX { - NSWindow* nsWindow = (NSWindow*)g_platformData.nwh; - [nsWindow.contentView setWantsLayer:YES]; - m_metalLayer = [CAMetalLayer layer]; - [nsWindow.contentView setLayer:m_metalLayer]; + NSObject* nvh = (NSObject*)g_platformData.nwh; + if ([nvh isKindOfClass:[CAMetalLayer class]]) + { + CAMetalLayer* metalLayer = (CAMetalLayer*)g_platformData.nwh; + m_metalLayer = metalLayer; + } + else + { + NSWindow* nsWindow = (NSWindow*)g_platformData.nwh; + [nsWindow.contentView setWantsLayer:YES]; + m_metalLayer = [CAMetalLayer layer]; + [nsWindow.contentView setLayer:m_metalLayer]; + } } #endif // BX_PLATFORM_* @@ -421,6 +424,7 @@ namespace bgfx { namespace mtl return false; } + retain(m_device); m_metalLayer.device = m_device; m_metalLayer.pixelFormat = MTLPixelFormatBGRA8Unorm; @@ -447,29 +451,37 @@ namespace bgfx { namespace mtl "struct xlatMtlShaderOutput { float4 gl_Position [[position]]; float2 v_texcoord0; }; \n" "vertex xlatMtlShaderOutput xlatMtlMain (uint v_id [[ vertex_id ]]) \n" "{\n" - " xlatMtlShaderOutput _mtl_o;\n" + " xlatMtlShaderOutput _mtl_o;\n" " if (v_id==0) { _mtl_o.gl_Position = float4(-1.0,-1.0,0.0,1.0); _mtl_o.v_texcoord0 = float2(0.0,1.0); } \n" " else if (v_id==1) { _mtl_o.gl_Position = float4(3.0,-1.0,0.0,1.0); _mtl_o.v_texcoord0 = float2(2.0,1.0); } \n" " else { _mtl_o.gl_Position = float4(-1.0,3.0,0.0,1.0); _mtl_o.v_texcoord0 = float2(0.0,-1.0); }\n" " return _mtl_o;\n" - "}\n"; + "}\n" + ; - const char* fshSource = "using namespace metal; \n" - " struct xlatMtlShaderInput { float2 v_texcoord0; }; \n" - " fragment half4 xlatMtlMain (xlatMtlShaderInput _mtl_i[[stage_in]], texture2d s_texColor [[texture(0)]], sampler _mtlsmp_s_texColor [[sampler(0)]] ) \n" - " { return half4(s_texColor.sample(_mtlsmp_s_texColor, _mtl_i.v_texcoord0)); } \n"; + const char* fshSource = + "using namespace metal;\n" + "struct xlatMtlShaderInput { float2 v_texcoord0; };\n" + "fragment half4 xlatMtlMain (xlatMtlShaderInput _mtl_i[[stage_in]], texture2d s_texColor [[texture(0)]], sampler _mtlsmp_s_texColor [[sampler(0)]] )\n" + "{\n" + " return half4(s_texColor.sample(_mtlsmp_s_texColor, _mtl_i.v_texcoord0) );\n" + "}\n" + ; Library lib = m_device.newLibraryWithSource(vshSource); if (NULL != lib) { m_screenshotBlitProgramVsh.m_function = lib.newFunctionWithName(SHADER_FUNCTION_NAME); } + lib = m_device.newLibraryWithSource(fshSource); if (NULL != lib) { m_screenshotBlitProgramFsh.m_function = lib.newFunctionWithName(SHADER_FUNCTION_NAME); } + m_screenshotBlitProgram.create(&m_screenshotBlitProgramVsh, &m_screenshotBlitProgramFsh); + release(lib); reset(m_renderPipelineDescriptor); m_renderPipelineDescriptor.colorAttachments[0].pixelFormat = m_metalLayer.pixelFormat; @@ -478,7 +490,7 @@ namespace bgfx { namespace mtl m_screenshotBlitRenderPipelineState = m_device.newRenderPipelineStateWithDescriptor(m_renderPipelineDescriptor); g_caps.supported |= (0 - | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL //NOTE: on IOS Gpu Family 1/2 have to set compare in shader + | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL | BGFX_CAPS_TEXTURE_COMPARE_ALL | BGFX_CAPS_TEXTURE_3D | BGFX_CAPS_VERTEX_ATTRIB_HALF @@ -486,28 +498,26 @@ namespace bgfx { namespace mtl | BGFX_CAPS_INSTANCING | BGFX_CAPS_FRAGMENT_DEPTH | BGFX_CAPS_BLEND_INDEPENDENT -// | BGFX_CAPS_COMPUTE // TODO: api/hw supports it but metal compute shaders are not yet supported | BGFX_CAPS_INDEX32 -// | BGFX_CAPS_DRAW_INDIRECT // TODO: support on iOS9+gpu family3+ and on macOS | BGFX_CAPS_TEXTURE_BLIT | BGFX_CAPS_TEXTURE_READ_BACK | BGFX_CAPS_OCCLUSION_QUERY | BGFX_CAPS_ALPHA_TO_COVERAGE - | BGFX_CAPS_TEXTURE_2D_ARRAY // supported on all platforms + | BGFX_CAPS_TEXTURE_2D_ARRAY ); if (BX_ENABLED(BX_PLATFORM_IOS) ) { if (iOSVersionEqualOrGreater("9.0.0") ) { - g_caps.limits.maxTextureSize = m_device.supportsFeatureSet((MTLFeatureSet)4 /* iOS_GPUFamily3_v1 */) ? 16384 : 8192; + g_caps.limits.maxTextureSize = m_device.supportsFeatureSet( (MTLFeatureSet)4 /* iOS_GPUFamily3_v1 */) ? 16384 : 8192; } else { g_caps.limits.maxTextureSize = 4096; } - g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(m_device.supportsFeatureSet((MTLFeatureSet)1 /* MTLFeatureSet_iOS_GPUFamily2_v1 */) ? 8 : 4, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS)); + g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(m_device.supportsFeatureSet( (MTLFeatureSet)1 /* MTLFeatureSet_iOS_GPUFamily2_v1 */) ? 8 : 4, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) ); } else if (BX_ENABLED(BX_PLATFORM_OSX) ) { @@ -518,7 +528,7 @@ namespace bgfx { namespace mtl //todo: vendor id, device id, gpu enum - m_hasPixelFormatDepth32Float_Stencil8 = false + m_hasPixelFormatDepth32Float_Stencil8 = false || BX_ENABLED(BX_PLATFORM_OSX) || (BX_ENABLED(BX_PLATFORM_IOS) && iOSVersionEqualOrGreater("9.0.0") ) ; @@ -533,7 +543,7 @@ namespace bgfx { namespace mtl if (BX_ENABLED(BX_PLATFORM_OSX) ) { - s_textureFormat[TextureFormat::R8].m_fmtSrgb = MTLPixelFormatInvalid; + s_textureFormat[TextureFormat::R8].m_fmtSrgb = MTLPixelFormatInvalid; s_textureFormat[TextureFormat::RG8].m_fmtSrgb = MTLPixelFormatInvalid; } @@ -559,44 +569,43 @@ namespace bgfx { namespace mtl if (!bimg::isCompressed(bimg::TextureFormat::Enum(ii) ) ) { - support |= BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER - | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA; + support |= 0 + | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER + | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA + ; } - //TODO: additional caps flags -// support |= BGFX_CAPS_FORMAT_TEXTURE_IMAGE : BGFX_CAPS_FORMAT_TEXTURE_NONE; - g_caps.formats[ii] = support; } - g_caps.formats[TextureFormat::A8] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); - g_caps.formats[TextureFormat::RG32I] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); - g_caps.formats[TextureFormat::RG32U] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + g_caps.formats[TextureFormat::A8 ] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER | BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + g_caps.formats[TextureFormat::RG32I ] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + g_caps.formats[TextureFormat::RG32U ] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); g_caps.formats[TextureFormat::RGBA32I] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); g_caps.formats[TextureFormat::RGBA32U] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); - if (BX_ENABLED(BX_PLATFORM_IOS) ) { - s_textureFormat[TextureFormat::D24S8].m_fmt = MTLPixelFormatDepth32Float; + s_textureFormat[TextureFormat::D24S8].m_fmt = MTLPixelFormatDepth32Float_Stencil8; - g_caps.formats[TextureFormat::BC1] = - g_caps.formats[TextureFormat::BC2] = - g_caps.formats[TextureFormat::BC3] = - g_caps.formats[TextureFormat::BC4] = - g_caps.formats[TextureFormat::BC5] = + g_caps.formats[TextureFormat::BC1 ] = + g_caps.formats[TextureFormat::BC2 ] = + g_caps.formats[TextureFormat::BC3 ] = + g_caps.formats[TextureFormat::BC4 ] = + g_caps.formats[TextureFormat::BC5 ] = g_caps.formats[TextureFormat::BC6H] = - g_caps.formats[TextureFormat::BC7] = BGFX_CAPS_FORMAT_TEXTURE_NONE; + g_caps.formats[TextureFormat::BC7 ] = BGFX_CAPS_FORMAT_TEXTURE_NONE; - g_caps.formats[TextureFormat::RG32F] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); + g_caps.formats[TextureFormat::RG32F ] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); g_caps.formats[TextureFormat::RGBA32F] &= ~(BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA); } if (BX_ENABLED(BX_PLATFORM_OSX) ) { - s_textureFormat[TextureFormat::D24S8].m_fmt = (MTLPixelFormat)(m_device.depth24Stencil8PixelFormatSupported() ? - 255 /* Depth24Unorm_Stencil8 */ : - MTLPixelFormatDepth32Float_Stencil8); + s_textureFormat[TextureFormat::D24S8].m_fmt = (MTLPixelFormat)(m_device.depth24Stencil8PixelFormatSupported() + ? 255 /* Depth24Unorm_Stencil8 */ + : MTLPixelFormatDepth32Float_Stencil8) + ; g_caps.formats[TextureFormat::ETC2 ] = g_caps.formats[TextureFormat::ETC2A ] = @@ -621,15 +630,14 @@ namespace bgfx { namespace mtl } } - for(uint32_t ii=1; ii<5; ++ii) + for (uint32_t ii=1; ii<5; ++ii) { - if (!m_device.supportsTextureSampleCount(s_msaa[ii])) + if (!m_device.supportsTextureSampleCount(s_msaa[ii]) ) { s_msaa[ii] = s_msaa[ii-1]; } } - // Init reserved part of view name. for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) { @@ -658,6 +666,11 @@ namespace bgfx { namespace mtl m_textures[ii].destroy(); } + m_screenshotBlitProgramVsh.destroy(); + m_screenshotBlitProgramFsh.destroy(); + m_screenshotBlitProgram.destroy(); + MTL_RELEASE(m_screenshotBlitRenderPipelineState); + captureFinish(); MTL_RELEASE(m_depthStencilDescriptor); @@ -669,10 +682,7 @@ namespace bgfx { namespace mtl MTL_RELEASE(m_samplerDescriptor); MTL_RELEASE(m_backBufferDepth); - if (BX_ENABLED(BX_PLATFORM_IOS) ) - { - MTL_RELEASE(m_backBufferStencil); - } + MTL_RELEASE(m_backBufferStencil); for (uint8_t i=0; i < MTL_MAX_FRAMES_IN_FLIGHT; ++i) { @@ -682,117 +692,118 @@ namespace bgfx { namespace mtl MTL_RELEASE(m_device); } - RendererType::Enum getRendererType() const BX_OVERRIDE + RendererType::Enum getRendererType() const override { return RendererType::Metal; } - const char* getRendererName() const BX_OVERRIDE + const char* getRendererName() const override { return BGFX_RENDERER_METAL_NAME; } - void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) BX_OVERRIDE + void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_mem->size, _mem->data, _flags); } - void destroyIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) BX_OVERRIDE + void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) override { VertexDecl& decl = m_vertexDecls[_handle.idx]; bx::memCopy(&decl, &_decl, sizeof(VertexDecl) ); dump(decl); } - void destroyVertexDecl(VertexDeclHandle /*_handle*/) BX_OVERRIDE + void destroyVertexDecl(VertexDeclHandle /*_handle*/) override { } - void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t _flags) BX_OVERRIDE + void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t _flags) override { m_vertexBuffers[_handle.idx].create(_mem->size, _mem->data, _declHandle, _flags); } - void destroyVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_size, NULL, _flags); } - void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { m_indexBuffers[_handle.idx].update(_offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { VertexDeclHandle decl = BGFX_INVALID_HANDLE; m_vertexBuffers[_handle.idx].create(_size, NULL, decl, _flags); } - void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { m_vertexBuffers[_handle.idx].update(_offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createShader(ShaderHandle _handle, Memory* _mem) BX_OVERRIDE + void createShader(ShaderHandle _handle, Memory* _mem) override { m_shaders[_handle.idx].create(_mem); } - void destroyShader(ShaderHandle _handle) BX_OVERRIDE + void destroyShader(ShaderHandle _handle) override { m_shaders[_handle.idx].destroy(); } - void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) BX_OVERRIDE + void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) override { m_program[_handle.idx].create(&m_shaders[_vsh.idx], &m_shaders[_fsh.idx]); } - void destroyProgram(ProgramHandle _handle) BX_OVERRIDE + void destroyProgram(ProgramHandle _handle) override { m_program[_handle.idx].destroy(); } - void createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) BX_OVERRIDE + void* createTexture(TextureHandle _handle, Memory* _mem, uint32_t _flags, uint8_t _skip) override { m_textures[_handle.idx].create(_mem, _flags, _skip); + return NULL; } - void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) BX_OVERRIDE + void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) override { } - void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) BX_OVERRIDE + void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) override { m_textures[_handle.idx].update(_side, _mip, _rect, _z, _depth, _pitch, _mem); } - void updateTextureEnd() BX_OVERRIDE + void updateTextureEnd() override { } - void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) BX_OVERRIDE + void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) override { m_cmd.kick(false, true); m_commandBuffer = m_cmd.alloc(); @@ -811,7 +822,7 @@ namespace bgfx { namespace mtl } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) override { TextureMtl& texture = m_textures[_handle.idx]; @@ -839,35 +850,35 @@ namespace bgfx { namespace mtl release(mem); } - void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE + void overrideInternal(TextureHandle _handle, uintptr_t _ptr) override { BX_UNUSED(_handle, _ptr); } - uintptr_t getInternal(TextureHandle _handle) BX_OVERRIDE + uintptr_t getInternal(TextureHandle _handle) override { BX_UNUSED(_handle); return 0; } - void destroyTexture(TextureHandle _handle) BX_OVERRIDE + void destroyTexture(TextureHandle _handle) override { m_textures[_handle.idx].destroy(); } - void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) override { m_frameBuffers[_handle.idx].create(_num, _attachment); } - void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) override { uint16_t denseIdx = m_numWindows++; m_windows[denseIdx] = _handle; m_frameBuffers[_handle.idx].create(denseIdx, _nwh, _width, _height, _depthFormat); } - void destroyFrameBuffer(FrameBufferHandle _handle) BX_OVERRIDE + void destroyFrameBuffer(FrameBufferHandle _handle) override { uint16_t denseIdx = m_frameBuffers[_handle.idx].destroy(); if (UINT16_MAX != denseIdx) @@ -882,7 +893,7 @@ namespace bgfx { namespace mtl } } - void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) BX_OVERRIDE + void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) override { if (NULL != m_uniforms[_handle.idx]) { @@ -896,7 +907,7 @@ namespace bgfx { namespace mtl m_uniformReg.add(_handle, _name, data); } - void destroyUniform(UniformHandle _handle) BX_OVERRIDE + void destroyUniform(UniformHandle _handle) override { BX_FREE(g_allocator, m_uniforms[_handle.idx]); m_uniforms[_handle.idx] = NULL; @@ -904,14 +915,14 @@ namespace bgfx { namespace mtl } //cmdPre - void requestScreenShotPre(const char* _filePath) BX_OVERRIDE + void requestScreenShotPre(const char* _filePath) { BX_UNUSED(_filePath); m_saveScreenshot = true; } //cmdPost - void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) BX_OVERRIDE + void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) override { BX_UNUSED(_handle); @@ -946,23 +957,24 @@ namespace bgfx { namespace mtl m_commandBuffer = m_cmd.alloc(); } - void updateViewName(uint8_t _id, const char* _name) BX_OVERRIDE + void updateViewName(ViewId _id, const char* _name) override { if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) ) { - bx::strlcpy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] - , _name - , BX_COUNTOF(s_viewName[0])-BGFX_CONFIG_MAX_VIEW_NAME_RESERVED - ); + bx::strCopy( + &s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] + , BX_COUNTOF(s_viewName[0])-BGFX_CONFIG_MAX_VIEW_NAME_RESERVED + , _name + ); } } - void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) BX_OVERRIDE + void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) override { bx::memCopy(m_uniforms[_loc], _data, _size); } - void setMarker(const char* _marker, uint32_t /*_size*/) BX_OVERRIDE + void setMarker(const char* _marker, uint32_t /*_size*/) override { if (BX_ENABLED(BGFX_CONFIG_DEBUG_MTL) ) { @@ -970,14 +982,34 @@ namespace bgfx { namespace mtl } } - void invalidateOcclusionQuery(OcclusionQueryHandle _handle) BX_OVERRIDE + void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override { m_occlusionQuery.invalidate(_handle); } - void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) BX_OVERRIDE; + virtual void setName(Handle _handle, const char* _name) override + { + switch (_handle.type) + { + case Handle::Shader: + m_shaders[_handle.idx].m_function.setLabel(_name); + break; - void blitSetup(TextVideoMemBlitter& _blitter) BX_OVERRIDE + case Handle::Texture: + m_textures[_handle.idx].m_ptr.setLabel(_name); + break; + + default: + BX_CHECK(false, "Invalid handle type?! %d", _handle.type); + break; + } + } + + void submitBlit(BlitState& _bs, uint16_t _view); + + void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) override; + + void blitSetup(TextVideoMemBlitter& _blitter) override { RenderCommandEncoder rce = m_renderCommandEncoder; @@ -991,9 +1023,10 @@ namespace bgfx { namespace mtl FrameBufferHandle fbh = BGFX_INVALID_HANDLE; - if ( NULL == rce || m_renderCommandEncoderFrameBufferHandle.idx != invalidHandle ) + if (NULL == rce + || m_renderCommandEncoderFrameBufferHandle.idx != kInvalidHandle) { - if ( m_renderCommandEncoder ) + if (m_renderCommandEncoder ) m_renderCommandEncoder.endEncoding(); RenderPassDescriptor renderPassDescriptor = newRenderPassDescriptor(); @@ -1045,7 +1078,7 @@ namespace bgfx { namespace mtl } float proj[16]; - bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f); + bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f, 0.0f, false); PredefinedUniform& predefined = program.m_predefined[0]; uint8_t flags = predefined.m_type; @@ -1054,7 +1087,7 @@ namespace bgfx { namespace mtl m_textures[_blitter.m_texture.idx].commit(0, false, true); } - void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) BX_OVERRIDE + void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) override { const uint32_t numVertices = _numIndices*4/6; if (0 < numVertices) @@ -1069,12 +1102,12 @@ namespace bgfx { namespace mtl } } - bool isDeviceRemoved() BX_OVERRIDE + bool isDeviceRemoved() override { return false; } - void flip(HMD& /*_hmd*/) BX_OVERRIDE + void flip(HMD& /*_hmd*/) override { if (NULL == m_commandBuffer) { @@ -1082,7 +1115,7 @@ namespace bgfx { namespace mtl } // Present and commit the command buffer - if ( NULL != m_drawable) + if (NULL != m_drawable) { m_commandBuffer.presentDrawable(m_drawable); MTL_RELEASE(m_drawable); @@ -1090,22 +1123,6 @@ namespace bgfx { namespace mtl m_cmd.kick(true); m_commandBuffer = 0; - - //TODO: support multiple windows on OSX - /* - if (m_flip) - { - for (uint32_t ii = 1, num = m_numWindows; ii < num; ++ii) - { - m_glctx.swap(m_frameBuffers[m_windows[ii].idx].m_swapChain); - } - - if (!m_ovr.swap(_hmd) ) - { - m_glctx.swap(); - } - } - */ } void updateResolution(const Resolution& _resolution) @@ -1115,17 +1132,16 @@ namespace bgfx { namespace mtl : 1 ; - //TODO: there should be a way to specify if backbuffer needs stencil/depth. const uint32_t maskFlags = ~(0 - | BGFX_RESET_HMD_RECENTER - | BGFX_RESET_MAXANISOTROPY - | BGFX_RESET_DEPTH_CLAMP - | BGFX_RESET_SUSPEND - ); + | BGFX_RESET_HMD_RECENTER + | BGFX_RESET_MAXANISOTROPY + | BGFX_RESET_DEPTH_CLAMP + | BGFX_RESET_SUSPEND + ); - if (m_resolution.m_width != _resolution.m_width - || m_resolution.m_height != _resolution.m_height - || (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) ) + if (m_resolution.m_width != _resolution.m_width + || m_resolution.m_height != _resolution.m_height + || (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) ) { int sampleCount = s_msaa[(_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT]; @@ -1133,9 +1149,9 @@ namespace bgfx { namespace mtl m_metalLayer.drawableSize = CGSizeMake(_resolution.m_width, _resolution.m_height); m_metalLayer.pixelFormat = (m_resolution.m_flags & BGFX_RESET_SRGB_BACKBUFFER) - ? MTLPixelFormatBGRA8Unorm_sRGB - : MTLPixelFormatBGRA8Unorm - ; + ? MTLPixelFormatBGRA8Unorm_sRGB + : MTLPixelFormatBGRA8Unorm + ; m_resolution = _resolution; m_resolution.m_flags &= ~BGFX_RESET_INTERNAL_FORCE; @@ -1153,7 +1169,8 @@ namespace bgfx { namespace mtl m_textureDescriptor.mipmapLevelCount = 1; m_textureDescriptor.sampleCount = sampleCount; m_textureDescriptor.arrayLength = 1; - if ( m_iOS9Runtime || m_macOS11Runtime ) + if (m_iOS9Runtime + || m_macOS11Runtime) { m_textureDescriptor.cpuCacheMode = MTLCPUCacheModeDefaultCache; m_textureDescriptor.storageMode = MTLStorageModePrivate; @@ -1164,18 +1181,26 @@ namespace bgfx { namespace mtl { release(m_backBufferDepth); } + m_backBufferDepth = m_device.newTextureWithDescriptor(m_textureDescriptor); + if (NULL != m_backBufferStencil) + { + release(m_backBufferStencil); + } if (m_hasPixelFormatDepth32Float_Stencil8) + { m_backBufferStencil = m_backBufferDepth; + retain(m_backBufferStencil); + } else { m_textureDescriptor.pixelFormat = MTLPixelFormatStencil8; m_backBufferStencil = m_device.newTextureWithDescriptor(m_textureDescriptor); } - if ( sampleCount > 1 ) + if (sampleCount > 1) { if (NULL != m_backBufferColorMSAA) { @@ -1188,10 +1213,10 @@ namespace bgfx { namespace mtl bx::HashMurmur2A murmur; murmur.begin(); murmur.add(1); - murmur.add((uint32_t)m_metalLayer.pixelFormat); - murmur.add((uint32_t)m_backBufferDepth.pixelFormat()); - murmur.add((uint32_t)m_backBufferStencil.pixelFormat()); - murmur.add((uint32_t)sampleCount); + murmur.add( (uint32_t)m_metalLayer.pixelFormat); + murmur.add( (uint32_t)m_backBufferDepth.pixelFormat() ); + murmur.add( (uint32_t)m_backBufferStencil.pixelFormat() ); + murmur.add( (uint32_t)sampleCount); m_backBufferPixelFormatHash = murmur.end(); for (uint32_t ii = 0; ii < BX_COUNTOF(m_frameBuffers); ++ii) @@ -1204,7 +1229,7 @@ namespace bgfx { namespace mtl m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height); m_textVideoMem.clear(); - if ( prevMetalLayerPixelFormat != m_metalLayer.pixelFormat) + if (prevMetalLayerPixelFormat != m_metalLayer.pixelFormat) { MTL_RELEASE(m_screenshotBlitRenderPipelineState) reset(m_renderPipelineDescriptor); @@ -1247,7 +1272,6 @@ namespace bgfx { namespace mtl MTLRegion region = { { 0, 0, 0 }, { m_resolution.m_width, m_resolution.m_height, 1 } }; - //TODO: enable screenshot target when capturing m_screenshotTarget.getBytes(m_capture, 4*m_resolution.m_width, 0, region, 0, 0); m_commandBuffer = m_cmd.alloc(); @@ -1256,10 +1280,11 @@ namespace bgfx { namespace mtl { bimg::imageSwizzleBgra8( m_capture + , m_resolution.m_width*4 , m_resolution.m_width , m_resolution.m_height - , m_resolution.m_width*4 , m_capture + , m_resolution.m_width*4 ); } @@ -1454,7 +1479,7 @@ namespace bgfx { namespace mtl } ProgramMtl& program = m_program[_clearQuad.m_program[numMrt-1].idx]; - m_renderCommandEncoder.setRenderPipelineState(program.getRenderPipelineState(state, 0, fbh, _clearQuad.m_vb->decl, 0)); + m_renderCommandEncoder.setRenderPipelineState(program.getRenderPipelineState(state, 0, fbh, _clearQuad.m_vb->decl, 0) ); uint32_t fragmentUniformBufferSize = program.m_fshConstantBufferSize; @@ -1474,9 +1499,10 @@ namespace bgfx { namespace mtl bx::memCopy(mrtClear[ii], _palette[index], 16); } - bx::memCopy((uint8_t*)m_uniformBuffer.contents() + m_uniformBufferFragmentOffset, - mrtClear, - bx::uint32_min(fragmentUniformBufferSize, sizeof(mrtClear))); + bx::memCopy( (uint8_t*)m_uniformBuffer.contents() + m_uniformBufferFragmentOffset + , mrtClear + , bx::uint32_min(fragmentUniformBufferSize, sizeof(mrtClear) ) + ); } else { @@ -1488,9 +1514,10 @@ namespace bgfx { namespace mtl _clear.m_index[3]*1.0f/255.0f, }; - bx::memCopy((uint8_t*)m_uniformBuffer.contents() + m_uniformBufferFragmentOffset, - rgba, - bx::uint32_min(fragmentUniformBufferSize, sizeof(rgba))); + bx::memCopy( (uint8_t*)m_uniformBuffer.contents() + m_uniformBufferFragmentOffset + , rgba + , bx::uint32_min(fragmentUniformBufferSize, sizeof(rgba) ) + ); } m_uniformBufferFragmentOffset += fragmentUniformBufferSize; @@ -1546,20 +1573,23 @@ namespace bgfx { namespace mtl { if (!isValid(_fbh) ) { - if ( NULL != m_backBufferColorMSAA ) + if (NULL != m_backBufferColorMSAA) { renderPassDescriptor.colorAttachments[0].texture = m_backBufferColorMSAA; - renderPassDescriptor.colorAttachments[0].resolveTexture = ((NULL != m_screenshotTarget) ? - m_screenshotTarget.m_obj : - currentDrawable().texture); + renderPassDescriptor.colorAttachments[0].resolveTexture = NULL != m_screenshotTarget + ? m_screenshotTarget.m_obj + : currentDrawable().texture + ; } else { - renderPassDescriptor.colorAttachments[0].texture = ((NULL != m_screenshotTarget) ? - m_screenshotTarget.m_obj : - currentDrawable().texture); + renderPassDescriptor.colorAttachments[0].texture = NULL != m_screenshotTarget + ? m_screenshotTarget.m_obj + : currentDrawable().texture + ; } - renderPassDescriptor.depthAttachment.texture = m_backBufferDepth; + + renderPassDescriptor.depthAttachment.texture = m_backBufferDepth; renderPassDescriptor.stencilAttachment.texture = m_backBufferStencil; } else @@ -1569,25 +1599,39 @@ namespace bgfx { namespace mtl for (uint32_t ii = 0; ii < frameBuffer.m_num; ++ii) { const TextureMtl& texture = m_textures[frameBuffer.m_colorHandle[ii].idx]; - renderPassDescriptor.colorAttachments[ii].texture = texture.m_ptrMSAA ? texture.m_ptrMSAA : texture.m_ptr; - renderPassDescriptor.colorAttachments[ii].resolveTexture = texture.m_ptrMSAA ? texture.m_ptr.m_obj : NULL; + renderPassDescriptor.colorAttachments[ii].texture = texture.m_ptrMSAA + ? texture.m_ptrMSAA + : texture.m_ptr + ; + renderPassDescriptor.colorAttachments[ii].resolveTexture = texture.m_ptrMSAA + ? texture.m_ptr.m_obj + : NULL + ; } if (isValid(frameBuffer.m_depthHandle) ) { const TextureMtl& texture = m_textures[frameBuffer.m_depthHandle.idx]; - renderPassDescriptor.depthAttachment.texture = texture.m_ptrMSAA ? texture.m_ptrMSAA : texture.m_ptr; + renderPassDescriptor.depthAttachment.texture = texture.m_ptrMSAA + ? texture.m_ptrMSAA + : texture.m_ptr + ; renderPassDescriptor.stencilAttachment.texture = texture.m_ptrStencil; - if ( texture.m_textureFormat == TextureFormat::D24S8)//TODO: msaa and stencil iOS8 hack + if (texture.m_textureFormat == TextureFormat::D24S8) { - if ( texture.m_ptr.pixelFormat() == 255 /* Depth24Unorm_Stencil8 */|| - texture.m_ptr.pixelFormat() == 260 /* Depth32Float_Stencil8 */ ) + if (texture.m_ptr.pixelFormat() == 255 /* Depth24Unorm_Stencil8 */ + || texture.m_ptr.pixelFormat() == 260 /* Depth32Float_Stencil8 */) { renderPassDescriptor.stencilAttachment.texture = renderPassDescriptor.depthAttachment.texture; } else - renderPassDescriptor.stencilAttachment.texture = texture.m_ptrMSAA ? texture.m_ptrMSAA : texture.m_ptrStencil; + { + renderPassDescriptor.stencilAttachment.texture = texture.m_ptrMSAA + ? texture.m_ptrMSAA + : texture.m_ptrStencil + ; + } } } } @@ -1682,8 +1726,8 @@ namespace bgfx { namespace mtl m_samplerDescriptor.normalizedCoordinates = TRUE; m_samplerDescriptor.maxAnisotropy = (0 != (_flags & (BGFX_TEXTURE_MIN_ANISOTROPIC|BGFX_TEXTURE_MAG_ANISOTROPIC) ) ) ? m_maxAnisotropy : 1; - //NOTE: Comparison function can be specified in shader on all metal hw. - if ( m_macOS11Runtime || [m_device supportsFeatureSet:(MTLFeatureSet)4/*MTLFeatureSet_iOS_GPUFamily3_v1*/]) + if (m_macOS11Runtime + || [m_device supportsFeatureSet:(MTLFeatureSet)4 /*MTLFeatureSet_iOS_GPUFamily3_v1*/]) { const uint32_t cmpFunc = (_flags&BGFX_TEXTURE_COMPARE_MASK)>>BGFX_TEXTURE_COMPARE_SHIFT; m_samplerDescriptor.compareFunction = 0 == cmpFunc ? MTLCompareFunctionNever : s_cmpFunc[cmpFunc]; @@ -1704,9 +1748,9 @@ namespace bgfx { namespace mtl BlitCommandEncoder getBlitCommandEncoder() { - if ( m_blitCommandEncoder == NULL) + if (m_blitCommandEncoder == NULL) { - if ( m_commandBuffer == NULL ) + if (m_commandBuffer == NULL) { m_commandBuffer = m_cmd.alloc(); } @@ -1804,10 +1848,10 @@ namespace bgfx { namespace mtl static RendererContextMtl* s_renderMtl; - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { s_renderMtl = BX_NEW(g_allocator, RendererContextMtl); - if (!s_renderMtl->init()) + if (!s_renderMtl->init(_init) ) { BX_DELETE(g_allocator, s_renderMtl); s_renderMtl = NULL; @@ -1824,7 +1868,7 @@ namespace bgfx { namespace mtl void writeString(bx::WriterI* _writer, const char* _str) { - bx::write(_writer, _str, (int32_t)bx::strnlen(_str) ); + bx::write(_writer, _str, (int32_t)bx::strLen(_str) ); } void ShaderMtl::create(const Memory* _mem) @@ -1890,6 +1934,7 @@ namespace bgfx { namespace mtl if (NULL != lib) { m_function = lib.newFunctionWithName(SHADER_FUNCTION_NAME); + release(lib); } BGFX_FATAL(NULL != m_function @@ -1914,11 +1959,11 @@ namespace bgfx { namespace mtl bx::memSet(m_attributes, 0xff, sizeof(m_attributes) ); uint32_t used = 0; uint32_t instUsed = 0; - if (NULL != _vsh->m_function.m_obj ) + if (NULL != _vsh->m_function.m_obj) { for (MTLVertexAttribute* attrib in _vsh->m_function.m_obj.vertexAttributes) { - if (attrib.active ) + if (attrib.active) { const char* name = utf8String(attrib.name); uint32_t loc = (uint32_t)attrib.attributeIndex; @@ -1926,7 +1971,7 @@ namespace bgfx { namespace mtl for (uint8_t ii = 0; ii < Attrib::Count; ++ii) { - if (0 == bx::strncmp(s_attribName[ii],name)) + if (0 == bx::strCmp(s_attribName[ii],name) ) { m_attributes[ii] = loc; m_used[used++] = ii; @@ -1936,7 +1981,7 @@ namespace bgfx { namespace mtl for (uint32_t ii = 0; ii < BX_COUNTOF(s_instanceDataName); ++ii) { - if (0 == bx::strncmp(s_instanceDataName[ii],name)) + if (0 == bx::strCmp(s_instanceDataName[ii],name) ) { m_instanceData[instUsed++] = loc; } @@ -1971,6 +2016,8 @@ namespace bgfx { namespace mtl m_fshConstantBufferSize = 0; m_fshConstantBufferAlignmentMask = 0; + m_samplerCount = 0; + m_processedUniforms = false; m_numPredefined = 0; @@ -2024,7 +2071,7 @@ namespace bgfx { namespace mtl FrameBufferMtl& frameBuffer = s_renderMtl->m_frameBuffers[_fbHandle.idx]; murmur.add(frameBuffer.m_pixelFormatHash); } - murmur.add(_declHandle.idx); + murmur.add(s_renderMtl->m_vertexDecls[_declHandle.idx].m_hash); murmur.add(_numInstanceData); uint32_t hash = murmur.end(); @@ -2053,11 +2100,14 @@ namespace bgfx { namespace mtl for (uint32_t ii = 0; ii < frameBuffer.m_num; ++ii) { const TextureMtl& texture = s_renderMtl->m_textures[frameBuffer.m_colorHandle[ii].idx]; - pd.sampleCount = NULL != texture.m_ptrMSAA ? texture.m_ptrMSAA.sampleCount() : 1; + pd.sampleCount = NULL != texture.m_ptrMSAA + ? texture.m_ptrMSAA.sampleCount() + : 1 + ; pd.colorAttachments[ii].pixelFormat = texture.m_ptr.m_obj.pixelFormat; } - if (isValid(frameBuffer.m_depthHandle)) + if (isValid(frameBuffer.m_depthHandle) ) { const TextureMtl& texture = s_renderMtl->m_textures[frameBuffer.m_depthHandle.idx]; pd.depthAttachmentPixelFormat = texture.m_ptr.m_obj.pixelFormat; @@ -2067,8 +2117,10 @@ namespace bgfx { namespace mtl } else { - if ( texture.m_textureFormat == TextureFormat::D24S8) + if (texture.m_textureFormat == TextureFormat::D24S8) + { pd.stencilAttachmentPixelFormat = texture.m_ptr.m_obj.pixelFormat; + } } } } @@ -2128,10 +2180,10 @@ namespace bgfx { namespace mtl } } - pd.vertexFunction = m_vsh->m_function; + pd.vertexFunction = m_vsh->m_function; pd.fragmentFunction = m_fsh->m_function; - if (isValid(_declHandle)) + if (isValid(_declHandle) ) { VertexDescriptor vertexDesc = s_renderMtl->m_vertexDescriptor; reset(vertexDesc); @@ -2170,19 +2222,19 @@ namespace bgfx { namespace mtl BX_TRACE("stride: %d", (int)vertexDesc.layouts[1].stride); - if (_numInstanceData > 0) + if (0 < _numInstanceData) { for (uint32_t ii = 0; UINT16_MAX != m_instanceData[ii]; ++ii) { uint32_t loc = m_instanceData[ii]; - vertexDesc.attributes[loc].format = MTLVertexFormatFloat4; + vertexDesc.attributes[loc].format = MTLVertexFormatFloat4; vertexDesc.attributes[loc].bufferIndex = 2; - vertexDesc.attributes[loc].offset = ii*16; + vertexDesc.attributes[loc].offset = ii*16; } - vertexDesc.layouts[2].stride = _numInstanceData * 16; + vertexDesc.layouts[2].stride = _numInstanceData * 16; vertexDesc.layouts[2].stepFunction = MTLVertexStepFunctionPerInstance; - vertexDesc.layouts[2].stepRate = 1; + vertexDesc.layouts[2].stepRate = 1; } pd.vertexDescriptor = vertexDesc; @@ -2205,13 +2257,13 @@ namespace bgfx { namespace mtl UniformBuffer*& constantBuffer = (shaderType == 0 ? m_vshConstantBuffer : m_fshConstantBuffer); uint8_t fragmentBit = (1 == shaderType ? BGFX_UNIFORM_FRAGMENTBIT : 0); - for (MTLArgument* arg in (shaderType == 0 ? reflection.vertexArguments : reflection.fragmentArguments)) + for (MTLArgument* arg in (shaderType == 0 ? reflection.vertexArguments : reflection.fragmentArguments) ) { BX_TRACE("arg: %s type:%d", utf8String(arg.name), arg.type); if (arg.active) { if (arg.type == MTLArgumentTypeBuffer - && 0 == bx::strncmp(utf8String(arg.name), SHADER_UNIFORM_NAME) ) + && 0 == bx::strCmp(utf8String(arg.name), SHADER_UNIFORM_NAME) ) { BX_CHECK( arg.index == 0, "Uniform buffer must be in the buffer slot 0."); BX_CHECK( MTLDataTypeStruct == arg.bufferDataType, "%s's type must be a struct",SHADER_UNIFORM_NAME ); @@ -2244,15 +2296,10 @@ namespace bgfx { namespace mtl } switch (dataType) { - case MTLDataTypeFloat4 : - num *= 1; - break; - case MTLDataTypeFloat4x4: - num *= 4; - break; - case MTLDataTypeFloat3x3: - num *= 3; - break; + case MTLDataTypeFloat4: num *= 1; break; + case MTLDataTypeFloat4x4: num *= 4; break; + case MTLDataTypeFloat3x3: num *= 3; break; + default: BX_WARN(0, "Unsupported uniform MTLDataType: %d", uniform.dataType); break; @@ -2279,8 +2326,8 @@ namespace bgfx { namespace mtl } UniformType::Enum type = convertMtlType(dataType); - constantBuffer->writeUniformHandle((UniformType::Enum)(type|fragmentBit), uint32_t(uniform.offset), info->m_handle, uint16_t(num) ); - BX_TRACE("store %s %d offset:%d", name, info->m_handle, uint32_t(uniform.offset)); + constantBuffer->writeUniformHandle( (UniformType::Enum)(type|fragmentBit), uint32_t(uniform.offset), info->m_handle, uint16_t(num) ); + BX_TRACE("store %s %d offset:%d", name, info->m_handle, uint32_t(uniform.offset) ); } } @@ -2289,10 +2336,25 @@ namespace bgfx { namespace mtl } else if (arg.type == MTLArgumentTypeTexture) { - if ( shaderType == 0 ) m_usedVertexSamplerStages |= 1<m_uniformReg.find(name); + BX_WARN(NULL != info, "User defined uniform '%s' is not found, it won't be set.", name); - BX_TRACE("texture: %s index:%d", utf8String(arg.name), arg.index); + if (NULL != info) + { + if ( m_samplerCount >= BGFX_CONFIG_MAX_TEXTURE_SAMPLERS) + { + BX_WARN(NULL != info, "Too many samplers in shader(only %d is supported). User defined uniform '%s' won't be set.", BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, name); + } + else + { + m_samplers[m_samplerCount].m_index = uint32_t(arg.index); + m_samplers[m_samplerCount].m_uniform = info->m_handle; + m_samplers[m_samplerCount].m_fragment = fragmentBit ? 1 : 0; + ++m_samplerCount; + BX_TRACE("texture %s %d index:%d", name, info->m_handle, uint32_t(arg.index) ); + } + } } else if (arg.type == MTLArgumentTypeSampler) { @@ -2341,18 +2403,21 @@ namespace bgfx { namespace mtl { BX_UNUSED(_discard); - //TODO: cannot call this more than once per frame - if ( m_dynamic && _discard ) + if (m_dynamic + && _discard) { m_bufferIndex = (m_bufferIndex + 1) % MTL_MAX_FRAMES_IN_FLIGHT; bx::memCopy( (uint8_t*)getBuffer().contents() + _offset, _data, _size); } - else if ( NULL != s_renderMtl->m_renderCommandEncoder ) + else if (NULL != s_renderMtl->m_renderCommandEncoder) { s_renderMtl->m_cmd.release(m_buffers[m_bufferIndex]); - if (_offset == 0 && _size == m_size) + if (_offset == 0 + && _size == m_size) + { m_buffers[m_bufferIndex] = s_renderMtl->m_device.newBufferWithBytes(_data, _size, 0); + } else { const void* oldContent = m_buffers[m_bufferIndex].contents(); @@ -2420,8 +2485,6 @@ namespace bgfx { namespace mtl desc.textureType = MTLTextureType2DArray; m_type = Texture2D; } - - desc.arrayLength = numLayers; } else if (imageContainer.m_cubeMap) { @@ -2446,21 +2509,21 @@ namespace bgfx { namespace mtl const bool writeOnly = 0 != (_flags&BGFX_TEXTURE_RT_WRITE_ONLY); const bool computeWrite = 0 != (_flags&BGFX_TEXTURE_COMPUTE_WRITE); const bool renderTarget = 0 != (_flags&BGFX_TEXTURE_RT_MASK); - const bool srgb = 0 != (_flags&BGFX_TEXTURE_SRGB) || imageContainer.m_srgb; + const bool srgb = 0 != (_flags&BGFX_TEXTURE_SRGB); BX_TRACE("Texture %3d: %s (requested: %s), layers %d, %dx%d%s RT[%c], WO[%c], CW[%c], sRGB[%c]" - , this - s_renderMtl->m_textures - , getName( (TextureFormat::Enum)m_textureFormat) - , getName( (TextureFormat::Enum)m_requestedFormat) - , numLayers - , textureWidth - , textureHeight - , imageContainer.m_cubeMap ? "x6" : "" - , renderTarget ? 'x' : '.' - , writeOnly ? 'x' : '.' - , computeWrite ? 'x' : '.' - , srgb ? 'x' : '.' - ); + , this - s_renderMtl->m_textures + , getName( (TextureFormat::Enum)m_textureFormat) + , getName( (TextureFormat::Enum)m_requestedFormat) + , numLayers + , textureWidth + , textureHeight + , imageContainer.m_cubeMap ? "x6" : "" + , renderTarget ? 'x' : '.' + , writeOnly ? 'x' : '.' + , computeWrite ? 'x' : '.' + , srgb ? 'x' : '.' + ); const uint32_t msaaQuality = bx::uint32_satsub( (_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1); int sampleCount = s_msaa[msaaQuality]; @@ -2485,8 +2548,9 @@ namespace bgfx { namespace mtl desc.width = textureWidth; desc.height = textureHeight; desc.depth = bx::uint32_max(1,imageContainer.m_depth); - desc.mipmapLevelCount = imageContainer.m_numMips; + desc.mipmapLevelCount = numMips; desc.sampleCount = 1; + desc.arrayLength = numLayers; if (s_renderMtl->m_iOS9Runtime || s_renderMtl->m_macOS11Runtime) { @@ -2497,8 +2561,8 @@ namespace bgfx { namespace mtl || bimg::isDepth(bimg::TextureFormat::Enum(m_textureFormat) ) ? 2 /*MTLStorageModePrivate*/ : (BX_ENABLED(BX_PLATFORM_IOS) - ? 0 /* MTLStorageModeShared */ - : 1 /*MTLStorageModeManaged*/ + ? 0 /* MTLStorageModeShared */ + : 1 /* MTLStorageModeManaged */ ) ); desc.usage = MTLTextureUsageShaderRead; @@ -2515,12 +2579,15 @@ namespace bgfx { namespace mtl m_ptr = s_renderMtl->m_device.newTextureWithDescriptor(desc); - if ( sampleCount > 1) + if (sampleCount > 1) { desc.textureType = MTLTextureType2DMultisample; desc.sampleCount = sampleCount; - if (s_renderMtl->m_iOS9Runtime || s_renderMtl->m_macOS11Runtime) + if (s_renderMtl->m_iOS9Runtime + || s_renderMtl->m_macOS11Runtime) + { desc.storageMode = (MTLStorageMode)( 2 /*MTLStorageModePrivate*/); + } m_ptrMSAA = s_renderMtl->m_device.newTextureWithDescriptor(desc); } @@ -2618,7 +2685,7 @@ namespace bgfx { namespace mtl const uint32_t bpp = bimg::getBitsPerPixel(bimg::TextureFormat::Enum(m_textureFormat) ); const uint32_t rectpitch = _rect.m_width*bpp/8; const uint32_t srcpitch = UINT16_MAX == _pitch ? rectpitch : _pitch; - const uint32_t slice = ((m_type == Texture3D) ? 0 : _side + _z * (m_type == TextureCube ? 6 : 1)); + const uint32_t slice = ( (m_type == Texture3D) ? 0 : _side + _z * (m_type == TextureCube ? 6 : 1) ); const uint16_t z = (m_type == Texture3D) ? _z : 0 ; const bool convert = m_textureFormat != m_requestedFormat; @@ -2639,13 +2706,13 @@ namespace bgfx { namespace mtl data = temp; } - if ( NULL != s_renderMtl->m_renderCommandEncoder ) + if (NULL != s_renderMtl->m_renderCommandEncoder) { s_renderMtl->m_cmd.finish(true); MTLRegion region = { - { _rect.m_x, _rect.m_y, z }, + { _rect.m_x, _rect.m_y, z }, { _rect.m_width, _rect.m_height, _depth }, }; @@ -2721,7 +2788,7 @@ namespace bgfx { namespace mtl { const TextureMtl& texture = s_renderMtl->m_textures[handle.idx]; - if ( 0 == m_width ) + if (0 == m_width) { m_width = texture.m_width; m_height = texture.m_height; @@ -2746,18 +2813,18 @@ namespace bgfx { namespace mtl for (uint32_t ii = 0; ii < m_num; ++ii) { const TextureMtl& texture = s_renderMtl->m_textures[m_colorHandle[ii].idx]; - murmur.add((uint32_t)texture.m_ptr.pixelFormat()); + murmur.add( (uint32_t)texture.m_ptr.pixelFormat() ); } - if (!isValid(m_depthHandle)) + if (!isValid(m_depthHandle) ) { - murmur.add((uint32_t)MTLPixelFormatInvalid); - murmur.add((uint32_t)MTLPixelFormatInvalid); + murmur.add( (uint32_t)MTLPixelFormatInvalid); + murmur.add( (uint32_t)MTLPixelFormatInvalid); } else { const TextureMtl& depthTexture = s_renderMtl->m_textures[m_depthHandle.idx]; - murmur.add((uint32_t)depthTexture.m_ptr.pixelFormat()); - murmur.add((uint32_t)(NULL != depthTexture.m_ptrStencil ? depthTexture.m_ptrStencil.pixelFormat() : MTLPixelFormatInvalid)); + murmur.add( (uint32_t)depthTexture.m_ptr.pixelFormat() ); + murmur.add( (uint32_t)(NULL != depthTexture.m_ptrStencil ? depthTexture.m_ptrStencil.pixelFormat() : MTLPixelFormatInvalid) ); } murmur.add(1); //SampleCount @@ -2774,13 +2841,12 @@ namespace bgfx { namespace mtl void FrameBufferMtl::postReset() { BX_WARN(false, "FrameBufferMtl::postReset not yet implemented"); - //TODO: what should we do here? } uint16_t FrameBufferMtl::destroy() { m_num = 0; - m_depthHandle.idx = invalidHandle; + m_depthHandle.idx = kInvalidHandle; uint16_t denseIdx = m_denseIdx; m_denseIdx = UINT16_MAX; @@ -2796,6 +2862,7 @@ namespace bgfx { namespace mtl void CommandQueueMtl::shutdown() { + finish(true); MTL_RELEASE(m_commandQueue); } @@ -2809,34 +2876,42 @@ namespace bgfx { namespace mtl static void commandBufferFinishedCallback(void* _data) { CommandQueueMtl* queue = (CommandQueueMtl*)_data; - if ( queue ) + if (queue) + { queue->m_framesSemaphore.post(); + } } void CommandQueueMtl::kick(bool _endFrame, bool _waitForFinish) { - if ( m_activeCommandBuffer ) + if (m_activeCommandBuffer) { - if ( _endFrame ) + if (_endFrame) { m_releaseWriteIndex = (m_releaseWriteIndex + 1) % MTL_MAX_FRAMES_IN_FLIGHT; m_activeCommandBuffer.addCompletedHandler(commandBufferFinishedCallback, this); } m_activeCommandBuffer.commit(); - if ( _waitForFinish ) + if (_waitForFinish) + { m_activeCommandBuffer.waitUntilCompleted(); + } + MTL_RELEASE(m_activeCommandBuffer); } } void CommandQueueMtl::finish(bool _finishAll) { - if ( _finishAll) + if (_finishAll) { - int count = m_activeCommandBuffer != NULL ? 2 : 3; + uint32_t count = m_activeCommandBuffer != NULL + ? 2 + : 3 + ; - for( int i=0; i< count; ++i) + for (uint32_t ii = 0; ii < count; ++ii) { consume(); } @@ -2878,7 +2953,7 @@ namespace bgfx { namespace mtl static void setTimestamp(void* _data) { - *((int64_t*)_data) = bx::getHPCounter(); + *( (int64_t*)_data) = bx::getHPCounter(); } void TimerQueryMtl::addHandlers(CommandBuffer& _commandBuffer) @@ -2969,12 +3044,96 @@ namespace bgfx { namespace mtl Query& query = m_query[(m_control.m_read + ii) % size]; if (query.m_handle.idx == _handle.idx) { - query.m_handle.idx = bgfx::invalidHandle; + query.m_handle.idx = bgfx::kInvalidHandle; } } } - void RendererContextMtl::submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) BX_OVERRIDE + void RendererContextMtl::submitBlit(BlitState& _bs, uint16_t _view) + { + if (!_bs.hasItem(_view)) + return; + + if (0 != m_renderCommandEncoder) + { + m_renderCommandEncoder.endEncoding(); + m_renderCommandEncoder = 0; + } + + m_blitCommandEncoder = getBlitCommandEncoder(); + + while (_bs.hasItem(_view) ) + { + const BlitItem& blit = _bs.advance(); + + const TextureMtl& src = m_textures[blit.m_src.idx]; + const TextureMtl& dst = m_textures[blit.m_dst.idx]; + + uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; + uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; + uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ; + uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; + uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; + uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ; + uint32_t width = bx::uint32_min(srcWidth, dstWidth); + uint32_t height = bx::uint32_min(srcHeight, dstHeight); + uint32_t depth = bx::uint32_min(srcDepth, dstDepth); +#if BX_PLATFORM_OSX + bool readBack = !!(dst.m_flags & BGFX_TEXTURE_READ_BACK); +#endif // BX_PLATFORM_OSX + + if (MTLTextureType3D == src.m_ptr.textureType() ) + { + m_blitCommandEncoder.copyFromTexture( + src.m_ptr + , 0 + , 0 + , MTLOriginMake(blit.m_srcX, blit.m_srcY, blit.m_srcZ) + , MTLSizeMake(width, height, bx::uint32_imax(depth, 1) ) + , dst.m_ptr + , 0 + , 0 + , MTLOriginMake(blit.m_dstX, blit.m_dstY, blit.m_dstZ) + ); +#if BX_PLATFORM_OSX + if (m_macOS11Runtime + && readBack) + { + m_blitCommandEncoder.synchronizeResource(dst.m_ptr); + } +#endif // BX_PLATFORM_OSX + } + else + { + m_blitCommandEncoder.copyFromTexture( + src.m_ptr + , blit.m_srcZ + , blit.m_srcMip + , MTLOriginMake(blit.m_srcX, blit.m_srcY, 0) + , MTLSizeMake(width, height, 1) + , dst.m_ptr + , blit.m_dstZ + , blit.m_dstMip + , MTLOriginMake(blit.m_dstX, blit.m_dstY, 0) + ); +#if BX_PLATFORM_OSX + if (m_macOS11Runtime + && readBack) + { + m_blitCommandEncoder.synchronizeTexture(dst.m_ptr, 0, blit.m_dstMip); + } +#endif // BX_PLATFORM_OSX + } + } + + if (0 != m_blitCommandEncoder) + { + m_blitCommandEncoder.endEncoding(); + m_blitCommandEncoder = 0; + } + } + + void RendererContextMtl::submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) { m_cmd.finish(false); @@ -2983,7 +3142,7 @@ namespace bgfx { namespace mtl m_commandBuffer = m_cmd.alloc(); } - int64_t elapsed = -bx::getHPCounter(); + int64_t timeBegin = bx::getHPCounter(); int64_t captureElapsed = 0; m_gpuTimer.addHandlers(m_commandBuffer); @@ -3018,14 +3177,20 @@ namespace bgfx { namespace mtl m_textureDescriptor.mipmapLevelCount = 1; m_textureDescriptor.sampleCount = 1; m_textureDescriptor.arrayLength = 1; - if ( m_iOS9Runtime || m_macOS11Runtime ) + + if (m_iOS9Runtime + || m_macOS11Runtime) { m_textureDescriptor.cpuCacheMode = MTLCPUCacheModeDefaultCache; - m_textureDescriptor.storageMode = (MTLStorageMode)(BX_ENABLED(BX_PLATFORM_IOS) - ? 0 /* MTLStorageModeShared */ - : 1 /*MTLStorageModeManaged*/ - ); - m_textureDescriptor.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead; + m_textureDescriptor.storageMode = BX_ENABLED(BX_PLATFORM_IOS) + ? (MTLStorageMode)0 // MTLStorageModeShared + : (MTLStorageMode)1 // MTLStorageModeManaged + ; + + m_textureDescriptor.usage = 0 + | MTLTextureUsageRenderTarget + | MTLTextureUsageShaderRead + ; } m_screenshotTarget = m_device.newTextureWithDescriptor(m_textureDescriptor); @@ -3074,15 +3239,12 @@ namespace bgfx { namespace mtl bool wireframe = !!(_render->m_debug&BGFX_DEBUG_WIREFRAME); - uint16_t programIdx = invalidHandle; + uint16_t programIdx = kInvalidHandle; SortKey key; uint16_t view = UINT16_MAX; FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS }; - BlitKey blitKey; - blitKey.decode(_render->m_blitKeys[0]); - uint16_t numBlitItems = _render->m_numBlitItems; - uint16_t blitItem = 0; + BlitState bs(_render); const uint64_t primType = 0; uint8_t primIndex = uint8_t(primType>>BGFX_STATE_PT_SHIFT); @@ -3110,9 +3272,9 @@ namespace bgfx { namespace mtl bool viewRestart = false; uint8_t eye = 0; uint8_t restartState = 0; - viewState.m_rect = _render->m_rect[0]; + viewState.m_rect = _render->m_view[0].m_rect; - int32_t numItems = _render->m_num; + int32_t numItems = _render->m_numRenderItems; for (int32_t item = 0, restartItem = numItems; item < numItems || restartItem < numItems;) { const uint64_t encodedKey = _render->m_sortKeys[item]; @@ -3141,9 +3303,9 @@ namespace bgfx { namespace mtl } view = key.m_view; - programIdx = invalidHandle; + programIdx = kInvalidHandle; - viewRestart = ( (BGFX_VIEW_STEREO == (_render->m_viewFlags[view] & BGFX_VIEW_STEREO) ) ); + viewRestart = BGFX_VIEW_STEREO == (_render->m_view[view].m_flags & BGFX_VIEW_STEREO); viewRestart &= hmdEnabled; if (viewRestart) @@ -3162,7 +3324,7 @@ namespace bgfx { namespace mtl eye = 0; } - viewState.m_rect = _render->m_rect[view]; + viewState.m_rect = _render->m_view[view].m_rect; if (viewRestart) { @@ -3170,72 +3332,18 @@ namespace bgfx { namespace mtl viewState.m_rect.m_width /= 2; } - const uint8_t blitView = SortKey::decodeView(encodedKey); - for (; blitItem < numBlitItems && blitKey.m_view <= blitView; blitItem++) - { - if (0 != m_renderCommandEncoder) - { - m_renderCommandEncoder.endEncoding(); - m_renderCommandEncoder = 0; - } - m_blitCommandEncoder = getBlitCommandEncoder(); + submitBlit(bs, view); - const BlitItem& blit = _render->m_blitItem[blitItem]; - blitKey.decode(_render->m_blitKeys[blitItem+1]); - - const TextureMtl& src = m_textures[blit.m_src.idx]; - const TextureMtl& dst = m_textures[blit.m_dst.idx]; - - uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; - uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; - uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ; - uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; - uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; - uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ; - uint32_t width = bx::uint32_min(srcWidth, dstWidth); - uint32_t height = bx::uint32_min(srcHeight, dstHeight); - uint32_t depth = bx::uint32_min(srcDepth, dstDepth); -#if BX_PLATFORM_OSX - bool readBack = !!(dst.m_flags & BGFX_TEXTURE_READ_BACK); -#endif // BX_PLATFORM_OSX - - if ( MTLTextureType3D == src.m_ptr.textureType()) - { - m_blitCommandEncoder.copyFromTexture(src.m_ptr, 0, 0, MTLOriginMake(blit.m_srcX, blit.m_srcY, blit.m_srcZ), MTLSizeMake(width, height, bx::uint32_imax(depth, 1)), - dst.m_ptr, 0, 0, MTLOriginMake(blit.m_dstX, blit.m_dstY, blit.m_dstZ)); -#if BX_PLATFORM_OSX - if (m_macOS11Runtime &&readBack) { - m_blitCommandEncoder.synchronizeResource(dst.m_ptr); - } -#endif // BX_PLATFORM_OSX - } - else - { - m_blitCommandEncoder.copyFromTexture(src.m_ptr, blit.m_srcZ, blit.m_srcMip, MTLOriginMake(blit.m_srcX, blit.m_srcY, 0), MTLSizeMake(width, height, 1), - dst.m_ptr, blit.m_dstZ, blit.m_dstMip, MTLOriginMake(blit.m_dstX, blit.m_dstY, 0)); -#if BX_PLATFORM_OSX - if (m_macOS11Runtime && readBack) { - m_blitCommandEncoder.synchronizeTexture(dst.m_ptr, 0, blit.m_dstMip); - } -#endif // BX_PLATFORM_OSX - } - } - - if (0 != m_blitCommandEncoder) - { - m_blitCommandEncoder.endEncoding(); - m_blitCommandEncoder = 0; - } - - const Rect& scissorRect = _render->m_scissor[view]; + const Rect& scissorRect = _render->m_view[view].m_scissor; viewHasScissor = !scissorRect.isZero(); viewScissorRect = viewHasScissor ? scissorRect : viewState.m_rect; - Clear& clr = _render->m_clear[view]; + Clear& clr = _render->m_view[view].m_clear; Rect viewRect = viewState.m_rect; bool clearWithRenderPass = false; - if ( NULL == m_renderCommandEncoder || fbh.idx != _render->m_fb[view].idx ) + if (NULL == m_renderCommandEncoder + || fbh.idx != _render->m_view[view].m_fbh.idx) { if (0 != m_renderCommandEncoder) { @@ -3245,15 +3353,15 @@ namespace bgfx { namespace mtl RenderPassDescriptor renderPassDescriptor = newRenderPassDescriptor(); renderPassDescriptor.visibilityResultBuffer = m_occlusionQuery.m_buffer; - fbh = _render->m_fb[view]; + fbh = _render->m_view[view].m_fbh; uint32_t width = m_resolution.m_width; uint32_t height = m_resolution.m_height; - if ( isValid(fbh) ) + if (isValid(fbh) ) { FrameBufferMtl& frameBuffer = m_frameBuffers[fbh.idx]; - width = frameBuffer.m_width; + width = frameBuffer.m_width; height = frameBuffer.m_height; } @@ -3265,14 +3373,13 @@ namespace bgfx { namespace mtl setFrameBuffer(renderPassDescriptor, fbh); - if ( clearWithRenderPass ) + if (clearWithRenderPass) { - - for(uint32_t ii = 0; ii < g_caps.limits.maxFBAttachments; ++ii) + for (uint32_t ii = 0; ii < g_caps.limits.maxFBAttachments; ++ii) { MTLRenderPassColorAttachmentDescriptor* desc = renderPassDescriptor.colorAttachments[ii]; - if ( desc.texture != NULL) + if (desc.texture != NULL) { if (0 != (BGFX_CLEAR_COLOR & clr.m_flags) ) { @@ -3305,16 +3412,18 @@ namespace bgfx { namespace mtl } } - //TODO: optimize store actions use discard flag RenderPassDepthAttachmentDescriptor depthAttachment = renderPassDescriptor.depthAttachment; if (NULL != depthAttachment.texture) { depthAttachment.clearDepth = clr.m_depth; depthAttachment.loadAction = 0 != (BGFX_CLEAR_DEPTH & clr.m_flags) - ? MTLLoadActionClear - : MTLLoadActionLoad - ; - depthAttachment.storeAction = NULL != m_backBufferColorMSAA ? MTLStoreActionDontCare : MTLStoreActionStore; + ? MTLLoadActionClear + : MTLLoadActionLoad + ; + depthAttachment.storeAction = NULL != m_backBufferColorMSAA + ? MTLStoreActionDontCare + : MTLStoreActionStore + ; } RenderPassStencilAttachmentDescriptor stencilAttachment = renderPassDescriptor.stencilAttachment; @@ -3322,22 +3431,26 @@ namespace bgfx { namespace mtl { stencilAttachment.clearStencil = clr.m_stencil; stencilAttachment.loadAction = 0 != (BGFX_CLEAR_STENCIL & clr.m_flags) - ? MTLLoadActionClear - : MTLLoadActionLoad - ; - stencilAttachment.storeAction = NULL != m_backBufferColorMSAA ? MTLStoreActionDontCare : MTLStoreActionStore; + ? MTLLoadActionClear + : MTLLoadActionLoad + ; + stencilAttachment.storeAction = NULL != m_backBufferColorMSAA + ? MTLStoreActionDontCare + : MTLStoreActionStore + ; } } else { - for(uint32_t ii = 0; ii < g_caps.limits.maxFBAttachments; ++ii) + for (uint32_t ii = 0; ii < g_caps.limits.maxFBAttachments; ++ii) { MTLRenderPassColorAttachmentDescriptor* desc = renderPassDescriptor.colorAttachments[ii]; - if ( desc.texture != NULL) + if (desc.texture != NULL) + { desc.loadAction = MTLLoadActionLoad; + } } - //TODO: optimize store actions use discard flag RenderPassDepthAttachmentDescriptor depthAttachment = renderPassDescriptor.depthAttachment; if (NULL != depthAttachment.texture) { @@ -3393,7 +3506,7 @@ namespace bgfx { namespace mtl { wasCompute = false; - programIdx = invalidHandle; + programIdx = kInvalidHandle; currentProgram = NULL; //invalidateCompute(); @@ -3428,8 +3541,8 @@ namespace bgfx { namespace mtl currentBind.clear(); - programIdx = invalidHandle; - setDepthStencilState(newFlags, packStencil(BGFX_STENCIL_DEFAULT, BGFX_STENCIL_DEFAULT)); + programIdx = kInvalidHandle; + setDepthStencilState(newFlags, packStencil(BGFX_STENCIL_DEFAULT, BGFX_STENCIL_DEFAULT) ); const uint64_t pt = newFlags&BGFX_STATE_PT_MASK; primIndex = uint8_t(pt>>BGFX_STATE_PT_SHIFT); @@ -3466,7 +3579,8 @@ namespace bgfx { namespace mtl else { Rect scissorRect; - scissorRect.setIntersect(viewScissorRect, _render->m_rectCache.m_cache[scissor]); + scissorRect.setIntersect(viewScissorRect, _render->m_frameCache.m_rectCache.m_cache[scissor]); + if (scissorRect.isZeroArea() ) { continue; @@ -3528,8 +3642,8 @@ namespace bgfx { namespace mtl } bool programChanged = false; - bool constantsChanged = draw.m_constBegin < draw.m_constEnd; - rendererUpdateUniforms(this, _render->m_uniformBuffer, draw.m_constBegin, draw.m_constEnd); + bool constantsChanged = draw.m_uniformBegin < draw.m_uniformEnd; + rendererUpdateUniforms(this, _render->m_uniformBuffer[draw.m_uniformIdx], draw.m_uniformBegin, draw.m_uniformEnd); if (key.m_program != programIdx || (BGFX_STATE_BLEND_MASK|BGFX_STATE_BLEND_EQUATION_MASK|BGFX_STATE_ALPHA_WRITE|BGFX_STATE_RGB_WRITE|BGFX_STATE_BLEND_INDEPENDENT|BGFX_STATE_MSAA|BGFX_STATE_BLEND_ALPHA_TO_COVERAGE) & changedFlags @@ -3544,7 +3658,7 @@ namespace bgfx { namespace mtl currentState.m_stream[0].m_decl = draw.m_stream[0].m_decl; currentState.m_instanceDataStride = draw.m_instanceDataStride; - if (invalidHandle == programIdx) + if (kInvalidHandle == programIdx) { currentProgram = NULL; continue; @@ -3569,7 +3683,7 @@ namespace bgfx { namespace mtl if (NULL == pipelineState) { currentProgram = NULL; - programIdx = invalidHandle; + programIdx = kInvalidHandle; continue; } @@ -3580,7 +3694,7 @@ namespace bgfx { namespace mtl constantsChanged = true; } - if (invalidHandle != programIdx) + if (kInvalidHandle != programIdx) { ProgramMtl& program = m_program[programIdx]; @@ -3621,19 +3735,17 @@ namespace bgfx { namespace mtl m_uniformBufferVertexOffset = m_uniformBufferFragmentOffset; } + if (kInvalidHandle != programIdx) { - uint32_t usedVertexSamplerStages = 0; - uint32_t usedFragmentSamplerStages = 0; + ProgramMtl& program = m_program[programIdx]; - if (invalidHandle != programIdx) + for (uint32_t sampler = 0; sampler < program.m_samplerCount; ++sampler) { - ProgramMtl& program = m_program[programIdx]; - usedVertexSamplerStages = program.m_usedVertexSamplerStages; - usedFragmentSamplerStages = program.m_usedFragmentSamplerStages; - } + ProgramMtl::SamplerInfo& samplerInfo = program.m_samplers[sampler]; + + UniformHandle handle = samplerInfo.m_uniform; + int stage = *((int*)m_uniforms[handle.idx]); - for (uint8_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage) - { const Binding& bind = renderBind.m_bind[stage]; Binding& current = currentBind.m_bind[stage]; @@ -3641,14 +3753,14 @@ namespace bgfx { namespace mtl || current.m_un.m_draw.m_textureFlags != bind.m_un.m_draw.m_textureFlags || programChanged) { - if (invalidHandle != bind.m_idx) + if (kInvalidHandle != bind.m_idx) { TextureMtl& texture = m_textures[bind.m_idx]; - texture.commit(stage - , 0 != (usedVertexSamplerStages & (1<m_num) + submitBlit(bs, BGFX_CONFIG_MAX_VIEWS); + + if (0 < _render->m_numRenderItems) { captureElapsed = -bx::getHPCounter(); capture(); - rce = m_renderCommandEncoder; //TODO: ugly, can create new encoder + rce = m_renderCommandEncoder; captureElapsed += bx::getHPCounter(); } } if (BX_ENABLED(BGFX_CONFIG_DEBUG_MTL) ) { - if (0 < _render->m_num) + if (0 < _render->m_numRenderItems) { rce.popDebugGroup(); } } - int64_t now = bx::getHPCounter(); - elapsed += now; - - static int64_t last = now; - - Stats& perfStats = _render->m_perfStats; - perfStats.cpuTimeBegin = last; - - int64_t frameTime = now - last; - last = now; + int64_t timeEnd = bx::getHPCounter(); + int64_t frameTime = timeEnd - timeBegin; static int64_t min = frameTime; static int64_t max = frameTime; @@ -3817,7 +3923,9 @@ namespace bgfx { namespace mtl const int64_t timerFreq = bx::getHPFrequency(); - perfStats.cpuTimeEnd = now; + Stats& perfStats = _render->m_perfStats; + perfStats.cpuTimeBegin = timeBegin; + perfStats.cpuTimeEnd = timeEnd; perfStats.cpuTimerFreq = timerFreq; perfStats.gpuTimeBegin = m_gpuTimer.m_begin; perfStats.gpuTimeEnd = m_gpuTimer.m_end; @@ -3825,6 +3933,8 @@ namespace bgfx { namespace mtl perfStats.numDraw = statsKeyType[0]; perfStats.numCompute = statsKeyType[1]; perfStats.maxGpuLatency = maxGpuLatency; + perfStats.gpuMemoryMax = -INT64_MAX; + perfStats.gpuMemoryUsed = -INT64_MAX; rce.setTriangleFillMode(MTLTriangleFillModeFill); if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) @@ -3833,23 +3943,24 @@ namespace bgfx { namespace mtl TextVideoMem& tvm = m_textVideoMem; - static int64_t next = now; + static int64_t next = timeEnd; - if (now >= next) + if (timeEnd >= next) { - next = now + bx::getHPFrequency(); + next = timeEnd + timerFreq; - double freq = double(bx::getHPFrequency() ); + double freq = double(timerFreq); double toMs = 1000.0/freq; tvm.clear(); uint16_t pos = 0; - tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x89 : 0x8f, " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " + tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f + , " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " , getRendererName() ); pos = 10; - tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " + tvm.printf(10, pos++, 0x8b, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " , double(frameTime)*toMs , double(min)*toMs , double(max)*toMs @@ -3857,16 +3968,16 @@ namespace bgfx { namespace mtl ); const uint32_t msaa = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT; - tvm.printf(10, pos++, 0x8e, " Reset flags: [%c] vsync, [%c] MSAAx%d, [%c] MaxAnisotropy " + tvm.printf(10, pos++, 0x8b, " Reset flags: [%c] vsync, [%c] MSAAx%d, [%c] MaxAnisotropy " , !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? '\xfe' : ' ' , 0 != msaa ? '\xfe' : ' ' , 1<m_num + double elapsedCpuMs = double(frameTime)*toMs; + tvm.printf(10, pos++, 0x8b, " Submitted: %4d (draw %4d, compute %4d) / CPU %3.4f [ms] %c GPU %3.4f [ms] (latency %d)" + , _render->m_numRenderItems , statsKeyType[0] , statsKeyType[1] , elapsedCpuMs @@ -3879,7 +3990,7 @@ namespace bgfx { namespace mtl for (uint32_t ii = 0; ii < BX_COUNTOF(s_primName); ++ii) { - tvm.printf(10, pos++, 0x8e, " %10s: %7d (#inst: %5d), submitted: %7d" + tvm.printf(10, pos++, 0x8b, " %10s: %7d (#inst: %5d), submitted: %7d" , s_primName[ii] , statsNumPrimsRendered[ii] , statsNumInstances[ii] @@ -3887,16 +3998,16 @@ namespace bgfx { namespace mtl ); } - tvm.printf(10, pos++, 0x8e, " Indices: %7d ", statsNumIndices); - tvm.printf(10, pos++, 0x8e, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); - tvm.printf(10, pos++, 0x8e, " DVB size: %7d ", _render->m_vboffset); - tvm.printf(10, pos++, 0x8e, " DIB size: %7d ", _render->m_iboffset); + tvm.printf(10, pos++, 0x8b, " Indices: %7d ", statsNumIndices); +// tvm.printf(10, pos++, 0x8b, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); + tvm.printf(10, pos++, 0x8b, " DVB size: %7d ", _render->m_vboffset); + tvm.printf(10, pos++, 0x8b, " DIB size: %7d ", _render->m_iboffset); pos++; double captureMs = double(captureElapsed)*toMs; - tvm.printf(10, pos++, 0x8e, " Capture: %3.4f [ms]", captureMs); + tvm.printf(10, pos++, 0x8b, " Capture: %3.4f [ms]", captureMs); - uint8_t attr[2] = { 0x89, 0x8a }; + uint8_t attr[2] = { 0x8c, 0x8a }; uint8_t attrIndex = _render->m_waitSubmit < _render->m_waitRender; tvm.printf(10, pos++, attr[attrIndex&1], " Submit wait: %3.4f [ms]", _render->m_waitSubmit*toMs); @@ -3907,7 +4018,7 @@ namespace bgfx { namespace mtl } blit(this, _textVideoMemBlitter, tvm); - rce = m_renderCommandEncoder; //TODO: ugly, blit can create encoder + rce = m_renderCommandEncoder; rce.popDebugGroup(); } @@ -3916,17 +4027,16 @@ namespace bgfx { namespace mtl rce.pushDebugGroup("debugtext"); blit(this, _textVideoMemBlitter, _render->m_textVideoMem); - rce = m_renderCommandEncoder; //TODO: ugly, blit can create encoder + rce = m_renderCommandEncoder; rce.popDebugGroup(); } rce.endEncoding(); m_renderCommandEncoder = 0; - m_renderCommandEncoderFrameBufferHandle.idx = invalidHandle; + m_renderCommandEncoderFrameBufferHandle.idx = kInvalidHandle; - - if ( m_screenshotTarget ) + if (m_screenshotTarget) { RenderPassDescriptor renderPassDescriptor = newRenderPassDescriptor(); renderPassDescriptor.colorAttachments[0].texture = currentDrawable().texture; @@ -3944,7 +4054,7 @@ namespace bgfx { namespace mtl rce.drawPrimitives(MTLPrimitiveTypeTriangle, 0, 3, 1); rce.endEncoding(); - } + } } } /* namespace mtl */ } // namespace bgfx @@ -3953,8 +4063,9 @@ namespace bgfx { namespace mtl namespace bgfx { namespace mtl { - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { + BX_UNUSED(_init); return NULL; } diff --git a/3rdparty/bgfx/src/renderer_noop.cpp b/3rdparty/bgfx/src/renderer_noop.cpp index 3f24756..7bf4c2d 100644 --- a/3rdparty/bgfx/src/renderer_noop.cpp +++ b/3rdparty/bgfx/src/renderer_noop.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -44,183 +44,189 @@ namespace bgfx { namespace noop { } - RendererType::Enum getRendererType() const BX_OVERRIDE + RendererType::Enum getRendererType() const override { return RendererType::Noop; } - const char* getRendererName() const BX_OVERRIDE + const char* getRendererName() const override { return BGFX_RENDERER_NOOP_NAME; } - bool isDeviceRemoved() BX_OVERRIDE + bool isDeviceRemoved() override { return false; } - void flip(HMD& /*_hmd*/) BX_OVERRIDE + void flip(HMD& /*_hmd*/) override { } - void createIndexBuffer(IndexBufferHandle /*_handle*/, Memory* /*_mem*/, uint16_t /*_flags*/) BX_OVERRIDE + void createIndexBuffer(IndexBufferHandle /*_handle*/, Memory* /*_mem*/, uint16_t /*_flags*/) override { } - void destroyIndexBuffer(IndexBufferHandle /*_handle*/) BX_OVERRIDE + void destroyIndexBuffer(IndexBufferHandle /*_handle*/) override { } - void createVertexDecl(VertexDeclHandle /*_handle*/, const VertexDecl& /*_decl*/) BX_OVERRIDE + void createVertexDecl(VertexDeclHandle /*_handle*/, const VertexDecl& /*_decl*/) override { } - void destroyVertexDecl(VertexDeclHandle /*_handle*/) BX_OVERRIDE + void destroyVertexDecl(VertexDeclHandle /*_handle*/) override { } - void createVertexBuffer(VertexBufferHandle /*_handle*/, Memory* /*_mem*/, VertexDeclHandle /*_declHandle*/, uint16_t /*_flags*/) BX_OVERRIDE + void createVertexBuffer(VertexBufferHandle /*_handle*/, Memory* /*_mem*/, VertexDeclHandle /*_declHandle*/, uint16_t /*_flags*/) override { } - void destroyVertexBuffer(VertexBufferHandle /*_handle*/) BX_OVERRIDE + void destroyVertexBuffer(VertexBufferHandle /*_handle*/) override { } - void createDynamicIndexBuffer(IndexBufferHandle /*_handle*/, uint32_t /*_size*/, uint16_t /*_flags*/) BX_OVERRIDE + void createDynamicIndexBuffer(IndexBufferHandle /*_handle*/, uint32_t /*_size*/, uint16_t /*_flags*/) override { } - void updateDynamicIndexBuffer(IndexBufferHandle /*_handle*/, uint32_t /*_offset*/, uint32_t /*_size*/, Memory* /*_mem*/) BX_OVERRIDE + void updateDynamicIndexBuffer(IndexBufferHandle /*_handle*/, uint32_t /*_offset*/, uint32_t /*_size*/, Memory* /*_mem*/) override { } - void destroyDynamicIndexBuffer(IndexBufferHandle /*_handle*/) BX_OVERRIDE + void destroyDynamicIndexBuffer(IndexBufferHandle /*_handle*/) override { } - void createDynamicVertexBuffer(VertexBufferHandle /*_handle*/, uint32_t /*_size*/, uint16_t /*_flags*/) BX_OVERRIDE + void createDynamicVertexBuffer(VertexBufferHandle /*_handle*/, uint32_t /*_size*/, uint16_t /*_flags*/) override { } - void updateDynamicVertexBuffer(VertexBufferHandle /*_handle*/, uint32_t /*_offset*/, uint32_t /*_size*/, Memory* /*_mem*/) BX_OVERRIDE + void updateDynamicVertexBuffer(VertexBufferHandle /*_handle*/, uint32_t /*_offset*/, uint32_t /*_size*/, Memory* /*_mem*/) override { } - void destroyDynamicVertexBuffer(VertexBufferHandle /*_handle*/) BX_OVERRIDE + void destroyDynamicVertexBuffer(VertexBufferHandle /*_handle*/) override { } - void createShader(ShaderHandle /*_handle*/, Memory* /*_mem*/) BX_OVERRIDE + void createShader(ShaderHandle /*_handle*/, Memory* /*_mem*/) override { } - void destroyShader(ShaderHandle /*_handle*/) BX_OVERRIDE + void destroyShader(ShaderHandle /*_handle*/) override { } - void createProgram(ProgramHandle /*_handle*/, ShaderHandle /*_vsh*/, ShaderHandle /*_fsh*/) BX_OVERRIDE + void createProgram(ProgramHandle /*_handle*/, ShaderHandle /*_vsh*/, ShaderHandle /*_fsh*/) override { } - void destroyProgram(ProgramHandle /*_handle*/) BX_OVERRIDE + void destroyProgram(ProgramHandle /*_handle*/) override { } - void createTexture(TextureHandle /*_handle*/, Memory* /*_mem*/, uint32_t /*_flags*/, uint8_t /*_skip*/) BX_OVERRIDE + void* createTexture(TextureHandle /*_handle*/, Memory* /*_mem*/, uint32_t /*_flags*/, uint8_t /*_skip*/) override + { + return NULL; + } + + void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) override { } - void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) BX_OVERRIDE + void updateTexture(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/, const Rect& /*_rect*/, uint16_t /*_z*/, uint16_t /*_depth*/, uint16_t /*_pitch*/, const Memory* /*_mem*/) override { } - void updateTexture(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/, const Rect& /*_rect*/, uint16_t /*_z*/, uint16_t /*_depth*/, uint16_t /*_pitch*/, const Memory* /*_mem*/) BX_OVERRIDE + void updateTextureEnd() override { } - void updateTextureEnd() BX_OVERRIDE + void readTexture(TextureHandle /*_handle*/, void* /*_data*/, uint8_t /*_mip*/) override { } - void readTexture(TextureHandle /*_handle*/, void* /*_data*/, uint8_t /*_mip*/) BX_OVERRIDE + void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/, uint8_t /*_numMips*/) override { } - void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/, uint8_t /*_numMips*/) BX_OVERRIDE + void overrideInternal(TextureHandle /*_handle*/, uintptr_t /*_ptr*/) override { } - void overrideInternal(TextureHandle /*_handle*/, uintptr_t /*_ptr*/) BX_OVERRIDE - { - } - - uintptr_t getInternal(TextureHandle /*_handle*/) BX_OVERRIDE + uintptr_t getInternal(TextureHandle /*_handle*/) override { return 0; } - void destroyTexture(TextureHandle /*_handle*/) BX_OVERRIDE + void destroyTexture(TextureHandle /*_handle*/) override { } - void createFrameBuffer(FrameBufferHandle /*_handle*/, uint8_t /*_num*/, const Attachment* /*_attachment*/) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle /*_handle*/, uint8_t /*_num*/, const Attachment* /*_attachment*/) override { } - void createFrameBuffer(FrameBufferHandle /*_handle*/, void* /*_nwh*/, uint32_t /*_width*/, uint32_t /*_height*/, TextureFormat::Enum /*_depthFormat*/) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle /*_handle*/, void* /*_nwh*/, uint32_t /*_width*/, uint32_t /*_height*/, TextureFormat::Enum /*_depthFormat*/) override { } - void destroyFrameBuffer(FrameBufferHandle /*_handle*/) BX_OVERRIDE + void destroyFrameBuffer(FrameBufferHandle /*_handle*/) override { } - void createUniform(UniformHandle /*_handle*/, UniformType::Enum /*_type*/, uint16_t /*_num*/, const char* /*_name*/) BX_OVERRIDE + void createUniform(UniformHandle /*_handle*/, UniformType::Enum /*_type*/, uint16_t /*_num*/, const char* /*_name*/) override { } - void destroyUniform(UniformHandle /*_handle*/) BX_OVERRIDE + void destroyUniform(UniformHandle /*_handle*/) override { } - void requestScreenShot(FrameBufferHandle /*_handle*/, const char* /*_filePath*/) BX_OVERRIDE + void requestScreenShot(FrameBufferHandle /*_handle*/, const char* /*_filePath*/) override { } - void updateViewName(uint8_t /*_id*/, const char* /*_name*/) BX_OVERRIDE + void updateViewName(ViewId /*_id*/, const char* /*_name*/) override { } - void updateUniform(uint16_t /*_loc*/, const void* /*_data*/, uint32_t /*_size*/) BX_OVERRIDE + void updateUniform(uint16_t /*_loc*/, const void* /*_data*/, uint32_t /*_size*/) override { } - void setMarker(const char* /*_marker*/, uint32_t /*_size*/) BX_OVERRIDE + void setMarker(const char* /*_marker*/, uint32_t /*_size*/) override { } - void invalidateOcclusionQuery(OcclusionQueryHandle /*_handle*/) BX_OVERRIDE + void invalidateOcclusionQuery(OcclusionQueryHandle /*_handle*/) override { } - void submit(Frame* /*_render*/, ClearQuad& /*_clearQuad*/, TextVideoMemBlitter& /*_textVideoMemBlitter*/) BX_OVERRIDE + virtual void setName(Handle /*_handle*/, const char* /*_name*/) override { } - void blitSetup(TextVideoMemBlitter& /*_blitter*/) BX_OVERRIDE + void submit(Frame* /*_render*/, ClearQuad& /*_clearQuad*/, TextVideoMemBlitter& /*_textVideoMemBlitter*/) override { } - void blitRender(TextVideoMemBlitter& /*_blitter*/, uint32_t /*_numIndices*/) BX_OVERRIDE + void blitSetup(TextVideoMemBlitter& /*_blitter*/) override + { + } + + void blitRender(TextVideoMemBlitter& /*_blitter*/, uint32_t /*_numIndices*/) override { } }; static RendererContextNOOP* s_renderNOOP; - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { + BX_UNUSED(_init); s_renderNOOP = BX_NEW(g_allocator, RendererContextNOOP); return s_renderNOOP; } diff --git a/3rdparty/bgfx/src/renderer_vk.cpp b/3rdparty/bgfx/src/renderer_vk.cpp index 28e2146..b0de96e 100644 --- a/3rdparty/bgfx/src/renderer_vk.cpp +++ b/3rdparty/bgfx/src/renderer_vk.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -209,7 +209,7 @@ VK_IMPORT_DEVICE { VK_FORMAT_B4G4R4A4_UNORM_PACK16, VK_FORMAT_B4G4R4A4_UNORM_PACK16, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // RGBA4 { VK_FORMAT_B5G5R5A1_UNORM_PACK16, VK_FORMAT_B5G5R5A1_UNORM_PACK16, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // RGB5A1 { VK_FORMAT_A2R10G10B10_UNORM_PACK32, VK_FORMAT_A2R10G10B10_UNORM_PACK32, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // RGB10A2 - { VK_FORMAT_B10G11R11_UFLOAT_PACK32, VK_FORMAT_B10G11R11_UFLOAT_PACK32, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // R11G11B10F + { VK_FORMAT_B10G11R11_UFLOAT_PACK32, VK_FORMAT_B10G11R11_UFLOAT_PACK32, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // RG11B10F { VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED, VK_FORMAT_UNDEFINED }, // UnknownDepth { VK_FORMAT_UNDEFINED, VK_FORMAT_R16_UNORM, VK_FORMAT_D16_UNORM, VK_FORMAT_UNDEFINED }, // D16 { VK_FORMAT_UNDEFINED, VK_FORMAT_X8_D24_UNORM_PACK32, VK_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_UNDEFINED }, // D24 @@ -332,7 +332,7 @@ VK_IMPORT_DEVICE return; } - bx::alignedFree(g_allocator, _memory, BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT); + bx::alignedFree(g_allocator, _memory, 8); } static void VKAPI_PTR internalAllocationNotification(void* _userData, size_t _size, VkInternalAllocationType _allocationType, VkSystemAllocationScope _allocationScope) @@ -703,7 +703,7 @@ VK_IMPORT_DEVICE { } - bool init() + bool init(const Init& _init) { BX_UNUSED(s_checkMsaa, s_textureAddress); @@ -725,7 +725,7 @@ VK_IMPORT_DEVICE ErrorState::Enum errorState = ErrorState::Default; - m_fbh.idx = invalidHandle; + m_fbh.idx = kInvalidHandle; bx::memSet(m_uniforms, 0, sizeof(m_uniforms) ); bx::memSet(&m_resolution, 0, sizeof(m_resolution) ); @@ -747,7 +747,7 @@ VK_IMPORT_DEVICE if (NULL == m_vulkan1dll) { - BX_TRACE("Failed to load vulkan dynamic library."); + BX_TRACE("Init error: Failed to load vulkan dynamic library."); goto error; } @@ -763,7 +763,7 @@ VK_IMPORT if (!imported) { - BX_TRACE("Failed to load shared library functions."); + BX_TRACE("Init error: Failed to load shared library functions."); goto error; } @@ -831,7 +831,7 @@ VK_IMPORT if (VK_SUCCESS != result) { - BX_TRACE("vkCreateInstance failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateInstance failed %d: %s.", result, getName(result) ); goto error; } @@ -847,7 +847,7 @@ VK_IMPORT_INSTANCE if (!imported) { - BX_TRACE("Failed to load instance functions."); + BX_TRACE("Init error: Failed to load instance functions."); goto error; } @@ -882,7 +882,7 @@ VK_IMPORT_INSTANCE if (VK_SUCCESS != result) { - BX_TRACE("vkEnumeratePhysicalDevices failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkEnumeratePhysicalDevices failed %d: %s.", result, getName(result) ); goto error; } @@ -895,7 +895,7 @@ VK_IMPORT_INSTANCE if (VK_SUCCESS != result) { - BX_TRACE("vkEnumeratePhysicalDevices failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkEnumeratePhysicalDevices failed %d: %s.", result, getName(result) ); goto error; } @@ -961,6 +961,8 @@ VK_IMPORT_INSTANCE g_caps.vendorId = uint16_t(m_deviceProperties.vendorID); g_caps.deviceId = uint16_t(m_deviceProperties.deviceID); + g_caps.limits.maxTextureSize = m_deviceProperties.limits.maxImageDimension2D; + g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(m_deviceProperties.limits.maxFragmentOutputAttachments, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) ); { // VkFormatProperties fp; @@ -1086,7 +1088,7 @@ VK_IMPORT_INSTANCE if (UINT32_MAX == m_qfiGraphics) { - BX_TRACE("Unable to find graphics queue."); + BX_TRACE("Init error: Unable to find graphics queue."); goto error; } } @@ -1145,7 +1147,7 @@ VK_IMPORT_INSTANCE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateDevice failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateDevice failed %d: %s.", result, getName(result) ); goto error; } } @@ -1162,7 +1164,7 @@ VK_IMPORT_DEVICE if (!imported) { - BX_TRACE("Failed to load device functions."); + BX_TRACE("Init error: Failed to load device functions."); goto error; } @@ -1171,7 +1173,7 @@ VK_IMPORT_DEVICE m_backBufferDepthStencilFormat = VK_FORMAT_D32_SFLOAT_S8_UINT - // VK_FORMAT_D24_UNORM_S8_UINT +// VK_FORMAT_D24_UNORM_S8_UINT ; { @@ -1236,7 +1238,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateRenderPass failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateRenderPass failed %d: %s.", result, getName(result) ); goto error; } } @@ -1296,7 +1298,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateSurfaceKHR failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateSurfaceKHR failed %d: %s.", result, getName(result) ); goto error; } @@ -1308,7 +1310,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkGetPhysicalDeviceSurfaceSupportKHR failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkGetPhysicalDeviceSurfaceSupportKHR failed %d: %s.", result, getName(result) ); goto error; } @@ -1317,7 +1319,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkGetPhysicalDeviceSurfaceCapabilitiesKHR failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkGetPhysicalDeviceSurfaceCapabilitiesKHR failed %d: %s.", result, getName(result) ); goto error; } @@ -1326,7 +1328,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkGetPhysicalDeviceSurfaceFormatsKHR failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkGetPhysicalDeviceSurfaceFormatsKHR failed %d: %s.", result, getName(result) ); goto error; } @@ -1341,7 +1343,7 @@ VK_IMPORT_DEVICE result = vkGetPhysicalDeviceSurfacePresentModesKHR(m_physicalDevice, m_surface, &numPresentModes, NULL); if (VK_SUCCESS != result) { - BX_TRACE("vkGetPhysicalDeviceSurfacePresentModesKHR failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkGetPhysicalDeviceSurfacePresentModesKHR failed %d: %s.", result, getName(result) ); goto error; } @@ -1359,8 +1361,8 @@ VK_IMPORT_DEVICE m_sci.minImageCount = BX_COUNTOF(m_backBufferColorImage); m_sci.imageFormat = surfaceFormats[surfaceFormatIdx].format; m_sci.imageColorSpace = surfaceFormats[surfaceFormatIdx].colorSpace; - m_sci.imageExtent.width = 1280; - m_sci.imageExtent.height = 720; + m_sci.imageExtent.width = _init.resolution.m_width; + m_sci.imageExtent.height = _init.resolution.m_height; m_sci.imageArrayLayers = 1; m_sci.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; m_sci.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; @@ -1375,7 +1377,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateSwapchainKHR failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateSwapchainKHR failed %d: %s.", result, getName(result) ); goto error; } @@ -1384,13 +1386,13 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkGetSwapchainImagesKHR failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkGetSwapchainImagesKHR failed %d: %s.", result, getName(result) ); goto error; } if (numSwapchainImages < m_sci.minImageCount) { - BX_TRACE("vkGetSwapchainImagesKHR: numSwapchainImages %d, minImageCount %d." + BX_TRACE("Init error: vkGetSwapchainImagesKHR: numSwapchainImages %d, minImageCount %d." , numSwapchainImages , m_sci.minImageCount ); @@ -1402,7 +1404,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkGetSwapchainImagesKHR failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkGetSwapchainImagesKHR failed %d: %s.", result, getName(result) ); goto error; } @@ -1437,7 +1439,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateImage failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateImage failed %d: %s.", result, getName(result) ); goto error; } @@ -1459,7 +1461,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkAllocateMemory failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkAllocateMemory failed %d: %s.", result, getName(result) ); goto error; } @@ -1467,7 +1469,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkBindImageMemory failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkBindImageMemory failed %d: %s.", result, getName(result) ); goto error; } @@ -1494,7 +1496,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateImageView failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateImageView failed %d: %s.", result, getName(result) ); goto error; } @@ -1542,7 +1544,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateImageView failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateImageView failed %d: %s.", result, getName(result) ); goto error; } @@ -1551,7 +1553,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateFramebuffer failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateFramebuffer failed %d: %s.", result, getName(result) ); goto error; } @@ -1559,7 +1561,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateSemaphore failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateSemaphore failed %d: %s.", result, getName(result) ); goto error; } @@ -1578,7 +1580,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateFence failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateFence failed %d: %s.", result, getName(result) ); goto error; } @@ -1592,7 +1594,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { vkDestroy(m_fence); - BX_TRACE("vkCreateCommandPool failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateCommandPool failed %d: %s.", result, getName(result) ); goto error; } @@ -1609,7 +1611,7 @@ VK_IMPORT_DEVICE { vkDestroy(m_commandPool); vkDestroy(m_fence); - BX_TRACE("vkAllocateCommandBuffers failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkAllocateCommandBuffers failed %d: %s.", result, getName(result) ); goto error; } @@ -1695,7 +1697,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateDescriptorPool failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateDescriptorPool failed %d: %s.", result, getName(result) ); goto error; } @@ -1709,7 +1711,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreateDescriptorSetLayout failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreateDescriptorSetLayout failed %d: %s.", result, getName(result) ); goto error; } @@ -1725,7 +1727,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreatePipelineLayout failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreatePipelineLayout failed %d: %s.", result, getName(result) ); goto error; } @@ -1739,7 +1741,7 @@ VK_IMPORT_DEVICE if (VK_SUCCESS != result) { - BX_TRACE("vkCreatePipelineCache failed %d: %s.", result, getName(result) ); + BX_TRACE("Init error: vkCreatePipelineCache failed %d: %s.", result, getName(result) ); goto error; } } @@ -1764,11 +1766,13 @@ VK_IMPORT_DEVICE vkDestroy(m_pipelineLayout); vkDestroy(m_descriptorSetLayout); vkDestroy(m_descriptorPool); + BX_FALLTHROUGH; case ErrorState::CommandBuffersCreated: vkFreeCommandBuffers(m_device, m_commandPool, BX_COUNTOF(m_commandBuffers), m_commandBuffers); vkDestroy(m_commandPool); vkDestroy(m_fence); + BX_FALLTHROUGH; case ErrorState::SwapchainCreated: for (uint32_t ii = 0; ii < BX_COUNTOF(m_backBufferColorImageView); ++ii) @@ -1789,15 +1793,19 @@ VK_IMPORT_DEVICE } } vkDestroy(m_swapchain); + BX_FALLTHROUGH; case ErrorState::SurfaceCreated: vkDestroySurfaceKHR(m_instance, m_surface, m_allocatorCb); + BX_FALLTHROUGH; case ErrorState::RenderPassCreated: vkDestroy(m_renderPass); + BX_FALLTHROUGH; case ErrorState::DeviceCreated: vkDestroyDevice(m_device, m_allocatorCb); + BX_FALLTHROUGH; case ErrorState::InstanceCreated: if (VK_NULL_HANDLE != m_debugReportCallback) @@ -1806,12 +1814,14 @@ VK_IMPORT_DEVICE } vkDestroyInstance(m_instance, m_allocatorCb); + BX_FALLTHROUGH; case ErrorState::LoadedVulkan1: bx::dlclose(m_vulkan1dll); m_vulkan1dll = NULL; m_allocatorCb = NULL; unloadRenderDoc(m_renderdocdll); + BX_FALLTHROUGH; case ErrorState::Default: break; @@ -1909,22 +1919,22 @@ VK_IMPORT_DEVICE unloadRenderDoc(m_renderdocdll); } - RendererType::Enum getRendererType() const BX_OVERRIDE + RendererType::Enum getRendererType() const override { return RendererType::Vulkan; } - const char* getRendererName() const BX_OVERRIDE + const char* getRendererName() const override { return BGFX_RENDERER_VULKAN_NAME; } - bool isDeviceRemoved() BX_OVERRIDE + bool isDeviceRemoved() override { return false; } - void flip(HMD& /*_hmd*/) BX_OVERRIDE + void flip(HMD& /*_hmd*/) override { if (VK_NULL_HANDLE != m_swapchain) { @@ -1941,140 +1951,141 @@ VK_IMPORT_DEVICE } } - void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) BX_OVERRIDE + void createIndexBuffer(IndexBufferHandle _handle, Memory* _mem, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_mem->size, _mem->data, _flags, false); } - void destroyIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) BX_OVERRIDE + void createVertexDecl(VertexDeclHandle _handle, const VertexDecl& _decl) override { VertexDecl& decl = m_vertexDecls[_handle.idx]; bx::memCopy(&decl, &_decl, sizeof(VertexDecl) ); dump(decl); } - void destroyVertexDecl(VertexDeclHandle /*_handle*/) BX_OVERRIDE + void destroyVertexDecl(VertexDeclHandle /*_handle*/) override { } - void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t _flags) BX_OVERRIDE + void createVertexBuffer(VertexBufferHandle _handle, Memory* _mem, VertexDeclHandle _declHandle, uint16_t _flags) override { m_vertexBuffers[_handle.idx].create(_mem->size, _mem->data, _declHandle, _flags); } - void destroyVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { m_indexBuffers[_handle.idx].create(_size, NULL, _flags, false); } - void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { BX_UNUSED(_handle, _offset, _size, _mem); // m_indexBuffers[_handle.idx].update(m_commandBuffer, _offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicIndexBuffer(IndexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicIndexBuffer(IndexBufferHandle _handle) override { m_indexBuffers[_handle.idx].destroy(); } - void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t _flags) BX_OVERRIDE + void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t _flags) override { VertexDeclHandle decl = BGFX_INVALID_HANDLE; m_vertexBuffers[_handle.idx].create(_size, NULL, decl, _flags); } - void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) BX_OVERRIDE + void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, Memory* _mem) override { BX_UNUSED(_handle, _offset, _size, _mem); // m_vertexBuffers[_handle.idx].update(m_commandBuffer, _offset, bx::uint32_min(_size, _mem->size), _mem->data); } - void destroyDynamicVertexBuffer(VertexBufferHandle _handle) BX_OVERRIDE + void destroyDynamicVertexBuffer(VertexBufferHandle _handle) override { m_vertexBuffers[_handle.idx].destroy(); } - void createShader(ShaderHandle _handle, Memory* _mem) BX_OVERRIDE + void createShader(ShaderHandle _handle, Memory* _mem) override { m_shaders[_handle.idx].create(_mem); } - void destroyShader(ShaderHandle _handle) BX_OVERRIDE + void destroyShader(ShaderHandle _handle) override { m_shaders[_handle.idx].destroy(); } - void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) BX_OVERRIDE + void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) override { m_program[_handle.idx].create(&m_shaders[_vsh.idx], isValid(_fsh) ? &m_shaders[_fsh.idx] : NULL); } - void destroyProgram(ProgramHandle _handle) BX_OVERRIDE + void destroyProgram(ProgramHandle _handle) override { m_program[_handle.idx].destroy(); } - void createTexture(TextureHandle /*_handle*/, Memory* /*_mem*/, uint32_t /*_flags*/, uint8_t /*_skip*/) BX_OVERRIDE + void* createTexture(TextureHandle /*_handle*/, Memory* /*_mem*/, uint32_t /*_flags*/, uint8_t /*_skip*/) override + { + return NULL; + } + + void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) override { } - void updateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/) BX_OVERRIDE + void updateTexture(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/, const Rect& /*_rect*/, uint16_t /*_z*/, uint16_t /*_depth*/, uint16_t /*_pitch*/, const Memory* /*_mem*/) override { } - void updateTexture(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/, const Rect& /*_rect*/, uint16_t /*_z*/, uint16_t /*_depth*/, uint16_t /*_pitch*/, const Memory* /*_mem*/) BX_OVERRIDE + void updateTextureEnd() override { } - void updateTextureEnd() BX_OVERRIDE + void readTexture(TextureHandle /*_handle*/, void* /*_data*/, uint8_t /*_mip*/) override { } - void readTexture(TextureHandle /*_handle*/, void* /*_data*/, uint8_t /*_mip*/) BX_OVERRIDE + void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/, uint8_t /*_numMips*/) override { } - void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/, uint8_t /*_numMips*/) BX_OVERRIDE + void overrideInternal(TextureHandle /*_handle*/, uintptr_t /*_ptr*/) override { } - void overrideInternal(TextureHandle /*_handle*/, uintptr_t /*_ptr*/) BX_OVERRIDE - { - } - - uintptr_t getInternal(TextureHandle /*_handle*/) BX_OVERRIDE + uintptr_t getInternal(TextureHandle /*_handle*/) override { return 0; } - void destroyTexture(TextureHandle /*_handle*/) BX_OVERRIDE + void destroyTexture(TextureHandle /*_handle*/) override { } - void createFrameBuffer(FrameBufferHandle /*_handle*/, uint8_t /*_num*/, const Attachment* /*_attachment*/) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle /*_handle*/, uint8_t /*_num*/, const Attachment* /*_attachment*/) override { } - void createFrameBuffer(FrameBufferHandle /*_handle*/, void* /*_nwh*/, uint32_t /*_width*/, uint32_t /*_height*/, TextureFormat::Enum /*_depthFormat*/) BX_OVERRIDE + void createFrameBuffer(FrameBufferHandle /*_handle*/, void* /*_nwh*/, uint32_t /*_width*/, uint32_t /*_height*/, TextureFormat::Enum /*_depthFormat*/) override { } - void destroyFrameBuffer(FrameBufferHandle /*_handle*/) BX_OVERRIDE + void destroyFrameBuffer(FrameBufferHandle /*_handle*/) override { } - void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) BX_OVERRIDE + void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) override { if (NULL != m_uniforms[_handle.idx]) { @@ -2088,45 +2099,52 @@ VK_IMPORT_DEVICE m_uniformReg.add(_handle, _name, data); } - void destroyUniform(UniformHandle _handle) BX_OVERRIDE + void destroyUniform(UniformHandle _handle) override { BX_FREE(g_allocator, m_uniforms[_handle.idx]); m_uniforms[_handle.idx] = NULL; } - void requestScreenShot(FrameBufferHandle /*_handle*/, const char* /*_filePath*/) BX_OVERRIDE + void requestScreenShot(FrameBufferHandle /*_handle*/, const char* /*_filePath*/) override { } - void updateViewName(uint8_t _id, const char* _name) BX_OVERRIDE + void updateViewName(ViewId _id, const char* _name) override { - bx::strlcpy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] - , _name + bx::strCopy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] , BX_COUNTOF(s_viewName[0]) - BGFX_CONFIG_MAX_VIEW_NAME_RESERVED + , _name ); } - void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) BX_OVERRIDE + void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) override { bx::memCopy(m_uniforms[_loc], _data, _size); } - void setMarker(const char* /*_marker*/, uint32_t /*_size*/) BX_OVERRIDE + void setMarker(const char* /*_marker*/, uint32_t /*_size*/) override { } - void invalidateOcclusionQuery(OcclusionQueryHandle _handle) BX_OVERRIDE + void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override { BX_UNUSED(_handle); } - void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) BX_OVERRIDE; + virtual void setName(Handle _handle, const char* _name) override + { + BX_UNUSED(_handle, _name) + } - void blitSetup(TextVideoMemBlitter& /*_blitter*/) BX_OVERRIDE + void submitBlit(BlitState& _bs, uint16_t _view); + + void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) override; + + void blitSetup(TextVideoMemBlitter& /*_blitter*/) override { } - void blitRender(TextVideoMemBlitter& /*_blitter*/, uint32_t /*_numIndices*/) BX_OVERRIDE + void blitRender(TextVideoMemBlitter& /*_blitter*/, uint32_t /*_numIndices*/) override { } @@ -3046,10 +3064,10 @@ VK_IMPORT_DEVICE static RendererContextVK* s_renderVK; - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { s_renderVK = BX_NEW(g_allocator, RendererContextVK); - if (!s_renderVK->init() ) + if (!s_renderVK->init(_init) ) { BX_DELETE(g_allocator, s_renderVK); s_renderVK = NULL; @@ -3497,18 +3515,18 @@ VK_DESTROY } } - uint16_t shaderSize; + uint32_t shaderSize; bx::read(&reader, shaderSize); #if 1 const void* code = reader.getDataPtr(); bx::skip(&reader, shaderSize+1); - m_code = alloc( ( (shaderSize+3)/4)*4); + m_code = alloc( ( ( (shaderSize+3)/4)*4) ); bx::memSet(m_code->data, 0, m_code->size); bx::memCopy(m_code->data , code - , shaderSize+1 + , shaderSize ); #else #include "../examples/runtime/shaders/spv/vert.spv.h" @@ -3533,7 +3551,12 @@ VK_DESTROY smci.flags = 0; smci.codeSize = m_code->size; smci.pCode = (const uint32_t*)m_code->data; - VK_CHECK(vkCreateShaderModule(s_renderVK->m_device, &smci, s_renderVK->m_allocatorCb, &m_module) ); + VK_CHECK(vkCreateShaderModule( + s_renderVK->m_device + , &smci + , s_renderVK->m_allocatorCb + , &m_module + ) ); bx::memSet(m_attrMask, 0, sizeof(m_attrMask) ); m_attrMask[Attrib::Position] = UINT16_MAX; @@ -3610,13 +3633,22 @@ VK_DESTROY { } + void RendererContextVK::submitBlit(BlitState& _bs, uint16_t _view) + { + while (_bs.hasItem(_view) ) + { + const BlitItem& blit = _bs.advance(); + BX_UNUSED(blit); + } + } + void RendererContextVK::submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) { BX_UNUSED(_render, _clearQuad, _textVideoMemBlitter); updateResolution(_render->m_resolution); - int64_t elapsed = -bx::getHPCounter(); + int64_t timeBegin = bx::getHPCounter(); int64_t captureElapsed = 0; // m_gpuTimer.begin(m_commandList); @@ -3649,8 +3681,8 @@ VK_DESTROY // bool wireframe = !!(_render->m_debug&BGFX_DEBUG_WIREFRAME); // setDebugWireframe(wireframe); - uint16_t currentSamplerStateIdx = invalidHandle; - uint16_t currentProgramIdx = invalidHandle; + uint16_t currentSamplerStateIdx = kInvalidHandle; + uint16_t currentProgramIdx = kInvalidHandle; uint32_t currentBindHash = 0; bool hasPredefined = false; bool commandListChanged = false; @@ -3659,10 +3691,7 @@ VK_DESTROY uint16_t view = UINT16_MAX; FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS }; - BlitKey blitKey; - blitKey.decode(_render->m_blitKeys[0]); - uint16_t numBlitItems = _render->m_numBlitItems; - uint16_t blitItem = 0; + BlitState bs(_render); uint32_t blendFactor = 0; @@ -3736,9 +3765,9 @@ VK_DESTROY // uint8_t eye = 0; // uint8_t restartState = 0; - viewState.m_rect = _render->m_rect[0]; + viewState.m_rect = _render->m_view[0].m_rect; - int32_t numItems = _render->m_num; + int32_t numItems = _render->m_numRenderItems; for (int32_t item = 0, restartItem = numItems; item < numItems || restartItem < numItems;) { const uint64_t encodedKey = _render->m_sortKeys[item]; @@ -3772,17 +3801,17 @@ finishAll(); view = key.m_view; currentPipeline = VK_NULL_HANDLE; - currentSamplerStateIdx = invalidHandle; + currentSamplerStateIdx = kInvalidHandle; BX_UNUSED(currentSamplerStateIdx); - currentProgramIdx = invalidHandle; + currentProgramIdx = kInvalidHandle; hasPredefined = false; - fbh = _render->m_fb[view]; + fbh = _render->m_view[view].m_fbh; setFrameBuffer(fbh); - viewState.m_rect = _render->m_rect[view]; - const Rect& rect = _render->m_rect[view]; - const Rect& scissorRect = _render->m_scissor[view]; + viewState.m_rect = _render->m_view[view].m_rect; + const Rect& rect = _render->m_view[view].m_rect; + const Rect& scissorRect = _render->m_view[view].m_scissor; viewHasScissor = !scissorRect.isZero(); viewScissorRect = viewHasScissor ? scissorRect : rect; @@ -3812,7 +3841,7 @@ BX_UNUSED(currentSamplerStateIdx); restoreScissor = false; - Clear& clr = _render->m_clear[view]; + Clear& clr = _render->m_view[view].m_clear; if (BGFX_CLEAR_NONE != clr.m_flags) { Rect clearRect = rect; @@ -3822,77 +3851,7 @@ BX_UNUSED(currentSamplerStateIdx); prim = s_primInfo[BX_COUNTOF(s_primName)]; // Force primitive type update. - const uint8_t blitView = SortKey::decodeView(encodedKey); - for (; blitItem < numBlitItems && blitKey.m_view <= blitView; blitItem++) - { - const BlitItem& blit = _render->m_blitItem[blitItem]; - blitKey.decode(_render->m_blitKeys[blitItem+1]); - BX_UNUSED(blit); - -// const TextureD3D12& src = m_textures[blit.m_src.idx]; -// const TextureD3D12& dst = m_textures[blit.m_dst.idx]; -// -// uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX; -// uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY; -// uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ; -// uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX; -// uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY; -// uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ; -// uint32_t width = bx::uint32_min(srcWidth, dstWidth); -// uint32_t height = bx::uint32_min(srcHeight, dstHeight); -// uint32_t depth = bx::uint32_min(srcDepth, dstDepth); -// -// if (TextureD3D12::Texture3D == src.m_type) -// { -// D3D12_BOX box; -// box.left = blit.m_srcX; -// box.top = blit.m_srcY; -// box.front = blit.m_srcZ; -// box.right = blit.m_srcX + width; -// box.bottom = blit.m_srcY + height;; -// box.back = blit.m_srcZ + bx::uint32_imax(1, depth); -// -// D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ 0 }} }; -// D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ 0 }} }; -// m_commandList->CopyTextureRegion(&dstLocation -// , blit.m_dstX -// , blit.m_dstY -// , blit.m_dstZ -// , &srcLocation -// , &box -// ); -// } -// else -// { -// D3D12_BOX box; -// box.left = blit.m_srcX; -// box.top = blit.m_srcY; -// box.front = 0; -// box.right = blit.m_srcX + width; -// box.bottom = blit.m_srcY + height;; -// box.back = 1; -// -// const uint32_t srcZ = TextureD3D12::TextureCube == src.m_type -// ? blit.m_srcZ -// : 0 -// ; -// const uint32_t dstZ = TextureD3D12::TextureCube == dst.m_type -// ? blit.m_dstZ -// : 0 -// ; -// -// D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ dstZ*dst.m_numMips+blit.m_dstMip }} }; -// D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ srcZ*src.m_numMips+blit.m_srcMip }} }; -// bool depthStencil = isDepth(TextureFormat::Enum(src.m_textureFormat) ); -// m_commandList->CopyTextureRegion(&dstLocation -// , blit.m_dstX -// , blit.m_dstY -// , 0 -// , &srcLocation -// , depthStencil ? NULL : &box -// ); -// } - } + submitBlit(bs, view); } if (isCompute) @@ -3919,7 +3878,7 @@ BX_UNUSED(currentSamplerStateIdx); currentBindHash = 0; } -// uint32_t bindHash = bx::hashMurmur2A(renderBind.m_bind, sizeof(renderBind.m_bind) ); +// uint32_t bindHash = bx::hash(renderBind.m_bind, sizeof(renderBind.m_bind) ); // if (currentBindHash != bindHash) // { // currentBindHash = bindHash; @@ -3933,7 +3892,7 @@ BX_UNUSED(currentSamplerStateIdx); // for (uint32_t ii = 0; ii < BGFX_MAX_COMPUTE_BINDINGS; ++ii) // { // const Binding& bind = renderBind.m_bind[ii]; -// if (invalidHandle != bind.m_idx) +// if (kInvalidHandle != bind.m_idx) // { // switch (bind.m_type) // { @@ -4008,10 +3967,10 @@ BX_UNUSED(currentSamplerStateIdx); // } bool constantsChanged = false; - if (compute.m_constBegin < compute.m_constEnd + if (compute.m_uniformBegin < compute.m_uniformEnd || currentProgramIdx != key.m_program) { - rendererUpdateUniforms(this, _render->m_uniformBuffer, compute.m_constBegin, compute.m_constEnd); + rendererUpdateUniforms(this, _render->m_uniformBuffer[compute.m_uniformIdx], compute.m_uniformBegin, compute.m_uniformEnd); currentProgramIdx = key.m_program; ProgramVK& program = m_program[currentProgramIdx]; @@ -4110,8 +4069,8 @@ BX_UNUSED(currentSamplerStateIdx); currentPipeline = VK_NULL_HANDLE; currentBindHash = 0; - currentSamplerStateIdx = invalidHandle; - currentProgramIdx = invalidHandle; + currentSamplerStateIdx = kInvalidHandle; + currentProgramIdx = kInvalidHandle; currentState.clear(); currentState.m_scissor = !draw.m_scissor; changedFlags = BGFX_STATE_MASK; @@ -4123,7 +4082,7 @@ BX_UNUSED(currentSamplerStateIdx); primIndex = uint8_t(pt>>BGFX_STATE_PT_SHIFT); } - rendererUpdateUniforms(this, _render->m_uniformBuffer, draw.m_constBegin, draw.m_constEnd); + rendererUpdateUniforms(this, _render->m_uniformBuffer[draw.m_uniformIdx], draw.m_uniformBegin, draw.m_uniformEnd); if (isValid(draw.m_stream[0].m_handle) ) { @@ -4145,7 +4104,7 @@ BX_UNUSED(currentSamplerStateIdx); ); uint16_t scissor = draw.m_scissor; - uint32_t bindHash = bx::hashMurmur2A(renderBind.m_bind, sizeof(renderBind.m_bind) ); + uint32_t bindHash = bx::hash(renderBind.m_bind, sizeof(renderBind.m_bind) ); if (currentBindHash != bindHash || 0 != changedStencil || (hasFactor && blendFactor != draw.m_rgba) @@ -4172,7 +4131,7 @@ BX_UNUSED(currentSamplerStateIdx); // for (uint32_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage) // { // const Binding& bind = renderBind.m_bind[stage]; -// if (invalidHandle != bind.m_idx) +// if (kInvalidHandle != bind.m_idx) // { // TextureD3D12& texture = m_textures[bind.m_idx]; // texture.setState(m_commandList, D3D12_RESOURCE_STATE_GENERIC_READ); @@ -4262,7 +4221,7 @@ BX_UNUSED(currentSamplerStateIdx); restoreScissor = false; VkRect2D rc; rc.offset.x = viewScissorRect.m_x; - rc.offset.x = viewScissorRect.m_y; + rc.offset.y = viewScissorRect.m_y; rc.extent.width = viewScissorRect.m_x + viewScissorRect.m_width; rc.extent.height = viewScissorRect.m_y + viewScissorRect.m_height; vkCmdSetScissor(m_commandBuffer, 0, 1, &rc); @@ -4272,7 +4231,7 @@ BX_UNUSED(currentSamplerStateIdx); { restoreScissor = true; Rect scissorRect; - scissorRect.setIntersect(viewScissorRect,_render->m_rectCache.m_cache[scissor]); + scissorRect.setIntersect(viewScissorRect, _render->m_frameCache.m_rectCache.m_cache[scissor]); if (scissorRect.isZeroArea() ) { continue; @@ -4280,7 +4239,7 @@ BX_UNUSED(currentSamplerStateIdx); VkRect2D rc; rc.offset.x = scissorRect.m_x; - rc.offset.x = scissorRect.m_y; + rc.offset.y = scissorRect.m_y; rc.extent.width = scissorRect.m_x + scissorRect.m_width; rc.extent.height = scissorRect.m_y + scissorRect.m_height; vkCmdSetScissor(m_commandBuffer, 0, 1, &rc); @@ -4294,7 +4253,7 @@ BX_UNUSED(currentSamplerStateIdx); } bool constantsChanged = false; - if (draw.m_constBegin < draw.m_constEnd + if (draw.m_uniformBegin < draw.m_uniformEnd || currentProgramIdx != key.m_program || BGFX_STATE_ALPHA_REF_MASK & changedFlags) { @@ -4400,19 +4359,13 @@ BX_UNUSED(currentSamplerStateIdx); } } + submitBlit(bs, BGFX_CONFIG_MAX_VIEWS); + // m_batch.end(m_commandList); } - int64_t now = bx::getHPCounter(); - elapsed += now; - - static int64_t last = now; - - Stats& perfStats = _render->m_perfStats; - perfStats.cpuTimeBegin = last; - - int64_t frameTime = now - last; - last = now; + int64_t timeEnd = bx::getHPCounter(); + int64_t frameTime = timeEnd - timeBegin; static int64_t min = frameTime; static int64_t max = frameTime; @@ -4442,7 +4395,9 @@ BX_UNUSED(presentMin, presentMax); const int64_t timerFreq = bx::getHPFrequency(); - perfStats.cpuTimeEnd = now; + Stats& perfStats = _render->m_perfStats; + perfStats.cpuTimeBegin = timeBegin; + perfStats.cpuTimeEnd = timeEnd; perfStats.cpuTimerFreq = timerFreq; // perfStats.gpuTimeBegin = m_gpuTimer.m_begin; // perfStats.gpuTimeEnd = m_gpuTimer.m_end; @@ -4450,6 +4405,8 @@ BX_UNUSED(presentMin, presentMax); // perfStats.numDraw = statsKeyType[0]; // perfStats.numCompute = statsKeyType[1]; // perfStats.maxGpuLatency = maxGpuLatency; + perfStats.gpuMemoryMax = -INT64_MAX; + perfStats.gpuMemoryUsed = -INT64_MAX; if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) { @@ -4458,17 +4415,18 @@ BX_UNUSED(presentMin, presentMax); // m_needPresent = true; TextVideoMem& tvm = m_textVideoMem; - static int64_t next = now; + static int64_t next = timeEnd; - if (now >= next) + if (timeEnd >= next) { - next = now + bx::getHPFrequency(); - double freq = double(bx::getHPFrequency() ); + next = timeEnd + timerFreq; + + double freq = double(timerFreq); double toMs = 1000.0 / freq; tvm.clear(); uint16_t pos = 0; - tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x89 : 0x8f + tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f , " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " " , getRendererName() ); @@ -4520,13 +4478,13 @@ BX_UNUSED(presentMin, presentMax); // ); pos = 10; - tvm.printf(10, pos++, 0x8e, " Frame: % 7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " + tvm.printf(10, pos++, 0x8b, " Frame: % 7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " , double(frameTime)*toMs , double(min)*toMs , double(max)*toMs , freq/frameTime ); -// tvm.printf(10, pos++, 0x8e, " Present: % 7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] " +// tvm.printf(10, pos++, 0x8b, " Present: % 7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] " // , double(m_presentElapsed)*toMs // , double(presentMin)*toMs // , double(presentMax)*toMs @@ -4536,7 +4494,7 @@ BX_UNUSED(presentMin, presentMax); bx::snprintf(hmd, BX_COUNTOF(hmd), ", [%c] HMD ", hmdEnabled ? '\xfe' : ' '); const uint32_t msaa = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT; - tvm.printf(10, pos++, 0x8e, " Reset flags: [%c] vsync, [%c] MSAAx%d%s, [%c] MaxAnisotropy " + tvm.printf(10, pos++, 0x8b, " Reset flags: [%c] vsync, [%c] MSAAx%d%s, [%c] MaxAnisotropy " , !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? '\xfe' : ' ' , 0 != msaa ? '\xfe' : ' ' , 1<m_num + double elapsedCpuMs = double(frameTime)*toMs; + tvm.printf(10, pos++, 0x8b, " Submitted: %5d (draw %5d, compute %4d) / CPU %7.4f [ms] " + , _render->m_numRenderItems , statsKeyType[0] , statsKeyType[1] , elapsedCpuMs @@ -4554,7 +4512,7 @@ BX_UNUSED(presentMin, presentMax); for (uint32_t ii = 0; ii < BX_COUNTOF(s_primName); ++ii) { - tvm.printf(10, pos++, 0x8e, " %9s: %7d (#inst: %5d), submitted: %7d " + tvm.printf(10, pos++, 0x8b, " %9s: %7d (#inst: %5d), submitted: %7d " , s_primName[ii] , statsNumPrimsRendered[ii] , statsNumInstances[ii] @@ -4562,13 +4520,13 @@ BX_UNUSED(presentMin, presentMax); ); } -// tvm.printf(10, pos++, 0x8e, " Batch: %7dx%d indirect, %7d immediate " +// tvm.printf(10, pos++, 0x8b, " Batch: %7dx%d indirect, %7d immediate " // , m_batch.m_stats.m_numIndirect[BatchD3D12::Draw] // , m_batch.m_maxDrawPerBatch // , m_batch.m_stats.m_numImmediate[BatchD3D12::Draw] // ); -// tvm.printf(10, pos++, 0x8e, " %7dx%d indirect, %7d immediate " +// tvm.printf(10, pos++, 0x8b, " %7dx%d indirect, %7d immediate " // , m_batch.m_stats.m_numIndirect[BatchD3D12::DrawIndexed] // , m_batch.m_maxDrawPerBatch // , m_batch.m_stats.m_numImmediate[BatchD3D12::DrawIndexed] @@ -4579,15 +4537,15 @@ BX_UNUSED(presentMin, presentMax); tvm.printf(tvm.m_width-27, 0, 0x1f, " [F11 - RenderDoc capture] "); } - tvm.printf(10, pos++, 0x8e, " Indices: %7d ", statsNumIndices); - tvm.printf(10, pos++, 0x8e, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); - tvm.printf(10, pos++, 0x8e, " DVB size: %7d ", _render->m_vboffset); - tvm.printf(10, pos++, 0x8e, " DIB size: %7d ", _render->m_iboffset); + tvm.printf(10, pos++, 0x8b, " Indices: %7d ", statsNumIndices); +// tvm.printf(10, pos++, 0x8b, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); + tvm.printf(10, pos++, 0x8b, " DVB size: %7d ", _render->m_vboffset); + tvm.printf(10, pos++, 0x8b, " DIB size: %7d ", _render->m_iboffset); pos++; - tvm.printf(10, pos++, 0x8e, " State cache: "); - tvm.printf(10, pos++, 0x8e, " PSO | Sampler | Bind | Queued "); - tvm.printf(10, pos++, 0x8e, " %6d " //| %6d | %6d | %6d " + tvm.printf(10, pos++, 0x8b, " State cache: "); + tvm.printf(10, pos++, 0x8b, " PSO | Sampler | Bind | Queued "); + tvm.printf(10, pos++, 0x8b, " %6d " //| %6d | %6d | %6d " , m_pipelineStateCache.getCount() // , m_samplerStateCache.getCount() // , bindLru.getCount() @@ -4596,9 +4554,9 @@ BX_UNUSED(presentMin, presentMax); pos++; double captureMs = double(captureElapsed)*toMs; - tvm.printf(10, pos++, 0x8e, " Capture: %7.4f [ms] ", captureMs); + tvm.printf(10, pos++, 0x8b, " Capture: %7.4f [ms] ", captureMs); - uint8_t attr[2] = { 0x89, 0x8a }; + uint8_t attr[2] = { 0x8c, 0x8a }; uint8_t attrIndex = _render->m_waitSubmit < _render->m_waitRender; tvm.printf(10, pos++, attr[attrIndex&1], " Submit wait: %7.4f [ms] ", _render->m_waitSubmit*toMs); @@ -4649,8 +4607,9 @@ BX_UNUSED(presentMin, presentMax); namespace bgfx { namespace vk { - RendererContextI* rendererCreate() + RendererContextI* rendererCreate(const Init& _init) { + BX_UNUSED(_init); return NULL; } diff --git a/3rdparty/bgfx/src/renderer_vk.h b/3rdparty/bgfx/src/renderer_vk.h index 90c352b..2d1649c 100644 --- a/3rdparty/bgfx/src/renderer_vk.h +++ b/3rdparty/bgfx/src/renderer_vk.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/shader.cpp b/3rdparty/bgfx/src/shader.cpp index 7649322..4da6069 100644 --- a/3rdparty/bgfx/src/shader.cpp +++ b/3rdparty/bgfx/src/shader.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -15,7 +15,8 @@ namespace bgfx bx::WriterI* writer = reinterpret_cast(_userData); char temp[512]; toString(temp, sizeof(temp), _instruction); - bx::write(writer, temp, (int32_t)bx::strnlen(temp) ); + bx::write(writer, temp, (int32_t)bx::strLen(temp) ); + bx::write(writer, '\n'); return true; } @@ -24,7 +25,8 @@ namespace bgfx bx::WriterI* writer = reinterpret_cast(_userData); char temp[512]; toString(temp, sizeof(temp), _instruction); - bx::write(writer, temp, (int32_t)bx::strnlen(temp) ); + bx::write(writer, temp, (int32_t)bx::strLen(temp) ); + bx::write(writer, '\n'); return true; } @@ -33,7 +35,8 @@ namespace bgfx bx::WriterI* writer = reinterpret_cast(_userData); char temp[512]; toString(temp, sizeof(temp), _instruction); - bx::write(writer, temp, (int32_t)bx::strnlen(temp) ); + bx::write(writer, temp, (int32_t)bx::strLen(temp) ); + bx::write(writer, '\n'); return true; } @@ -107,7 +110,7 @@ namespace bgfx bx::read(_reader, regCount, _err); } - uint16_t shaderSize; + uint32_t shaderSize; bx::read(_reader, shaderSize, _err); if (!_err->isOk() ) { return; } diff --git a/3rdparty/bgfx/src/shader.h b/3rdparty/bgfx/src/shader.h index 8d1fcc1..bd55dc9 100644 --- a/3rdparty/bgfx/src/shader.h +++ b/3rdparty/bgfx/src/shader.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/shader_dx9bc.cpp b/3rdparty/bgfx/src/shader_dx9bc.cpp index b3f7c43..988bec0 100644 --- a/3rdparty/bgfx/src/shader_dx9bc.cpp +++ b/3rdparty/bgfx/src/shader_dx9bc.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -443,12 +443,12 @@ namespace bgfx switch (_instruction.numOperands) { - case 6: size += read(_reader, _instruction.operand[currOp++], _err); - case 5: size += read(_reader, _instruction.operand[currOp++], _err); - case 4: size += read(_reader, _instruction.operand[currOp++], _err); - case 3: size += read(_reader, _instruction.operand[currOp++], _err); - case 2: size += read(_reader, _instruction.operand[currOp++], _err); - case 1: size += read(_reader, _instruction.operand[currOp++], _err); + case 6: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 5: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 4: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 3: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 2: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 1: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; case 0: if (!valuesBeforeOpcode && 0 < info.numValues) @@ -482,12 +482,12 @@ namespace bgfx uint32_t currOp = 0; switch (_instruction.numOperands) { - case 6: size += write(_writer, _instruction.operand[currOp++], _err); - case 5: size += write(_writer, _instruction.operand[currOp++], _err); - case 4: size += write(_writer, _instruction.operand[currOp++], _err); - case 3: size += write(_writer, _instruction.operand[currOp++], _err); - case 2: size += write(_writer, _instruction.operand[currOp++], _err); - case 1: size += write(_writer, _instruction.operand[currOp++], _err); + case 6: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 5: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 4: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 3: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 2: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 1: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; case 0: break; } diff --git a/3rdparty/bgfx/src/shader_dx9bc.h b/3rdparty/bgfx/src/shader_dx9bc.h index f549c98..618955f 100644 --- a/3rdparty/bgfx/src/shader_dx9bc.h +++ b/3rdparty/bgfx/src/shader_dx9bc.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/shader_dxbc.cpp b/3rdparty/bgfx/src/shader_dxbc.cpp index f0a76bd..5089651 100644 --- a/3rdparty/bgfx/src/shader_dxbc.cpp +++ b/3rdparty/bgfx/src/shader_dxbc.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -977,7 +977,7 @@ namespace bgfx if (_operand.extended) { - size += bx::write(_writer, _operand.extBits); + size += bx::write(_writer, _operand.extBits, _err); } switch (_operand.type) @@ -1072,12 +1072,12 @@ namespace bgfx { case DxbcOpcode::CUSTOMDATA: { -// uint32_t dataClass; + _instruction.numOperands = 0; size += bx::read(_reader, _instruction.length); - for (uint32_t ii = 0, num = (_instruction.length-2)/4; ii < num; ++ii) + for (uint32_t ii = 0, num = (_instruction.length-2); ii < num; ++ii) { - char temp[16]; - size += bx::read(_reader, temp, 16, _err); + char temp[4]; + size += bx::read(_reader, temp, 4, _err); } } @@ -1279,12 +1279,12 @@ namespace bgfx _instruction.numOperands = info.numOperands; switch (info.numOperands) { - case 6: size += read(_reader, _instruction.operand[currOp++], _err); - case 5: size += read(_reader, _instruction.operand[currOp++], _err); - case 4: size += read(_reader, _instruction.operand[currOp++], _err); - case 3: size += read(_reader, _instruction.operand[currOp++], _err); - case 2: size += read(_reader, _instruction.operand[currOp++], _err); - case 1: size += read(_reader, _instruction.operand[currOp++], _err); + case 6: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 5: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 4: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 3: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 2: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; + case 1: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; case 0: if (0 < info.numValues) { @@ -1317,8 +1317,8 @@ namespace bgfx switch (_instruction.opcode) { -// case DxbcOpcode::CUSTOMDATA: -// return size; + case DxbcOpcode::CUSTOMDATA: + return 0; case DxbcOpcode::DCL_CONSTANT_BUFFER: token |= _instruction.allowRefactoring ? UINT32_C(0x00000800) : 0; @@ -1452,7 +1452,7 @@ namespace bgfx , "%s%s%s" , getName(_instruction.opcode) , _instruction.saturate ? "_sat" : "" - , _instruction.testNZ ? "_nz" : "" + , _instruction.testNZ ? "_nz" : "" ); if (DxbcResourceDim::Unknown != _instruction.srv) @@ -1480,10 +1480,24 @@ namespace bgfx || DxbcOperandAddrMode::Imm32 != operand.addrMode[0] ; + const char* preOperand = ""; + const char* postOperand = ""; + + if (operand.extended) + { + switch(DxbcOperandModifier::Enum(operand.extBits & UINT32_C(0x00000003) ) ) + { + case DxbcOperandModifier::Neg: preOperand = "-"; postOperand = ""; break; + case DxbcOperandModifier::Abs: preOperand = "abs("; postOperand = ")"; break; + case DxbcOperandModifier::AbsNeg: preOperand = "-abs("; postOperand = ")"; break; + default: break; + } + } + size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) , "%s%s%s" , 0 == ii ? " " : ", " - , operand.extended ? "*" : "" + , preOperand , s_dxbcOperandType[operand.type] ); @@ -1550,7 +1564,7 @@ namespace bgfx , "%d + %s%d" , operand.regIndex[jj] , s_dxbcOperandType[operand.subOperand[jj].type] - , operand.regIndex[jj] + , operand.subOperand[jj].regIndex ); break; @@ -1604,6 +1618,10 @@ namespace bgfx break; } + size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) + , "%s" + , postOperand + ); } return size; @@ -1767,7 +1785,7 @@ namespace bgfx { case DXBC_CHUNK_SHADER_EX: _dxbc.shader.shex = true; - // fallthrough + BX_FALLTHROUGH; case DXBC_CHUNK_SHADER: size += read(_reader, _dxbc.shader, _err); @@ -1912,6 +1930,8 @@ namespace bgfx bx::MemoryBlock mb(g_allocator); bx::MemoryWriter writer(&mb); + int32_t total = 0; + for (uint32_t token = 0, numTokens = uint32_t(_src.byteCode.size() / sizeof(uint32_t) ); token < numTokens;) { DxbcInstruction instruction; @@ -1920,15 +1940,14 @@ namespace bgfx _fn(instruction, _userData); - write(&writer, instruction, _err); + total += write(&writer, instruction, _err); token += instruction.length; } uint8_t* data = (uint8_t*)mb.more(); - uint32_t size = uint32_t(bx::getSize(&writer) ); - _dst.byteCode.reserve(size); - bx::memCopy(_dst.byteCode.data(), data, size); + _dst.byteCode.resize(total); + bx::memCopy(_dst.byteCode.data(), data, total); } } // namespace bgfx diff --git a/3rdparty/bgfx/src/shader_dxbc.h b/3rdparty/bgfx/src/shader_dxbc.h index 04c9603..ea32e9f 100644 --- a/3rdparty/bgfx/src/shader_dxbc.h +++ b/3rdparty/bgfx/src/shader_dxbc.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -448,9 +448,31 @@ namespace bgfx }; }; + struct DxbcOperandModifier + { + enum Enum + { + None, + Neg, + Abs, + AbsNeg, + + Count + }; + }; + struct DxbcSubOperand { - DxbcSubOperand() { /* not pod */ } + DxbcSubOperand() + : type(DxbcOperandType::Temp) + , mode(0) + , modeBits(0) + , num(0) + , numAddrModes(0) + , addrMode(0) + , regIndex(0) + { + } DxbcOperandType::Enum type; uint8_t mode; @@ -463,7 +485,19 @@ namespace bgfx struct DxbcOperand { - DxbcOperand() { /* not pod */ } + DxbcOperand() + : type(DxbcOperandType::Temp) + , mode(DxbcOperandMode::Mask) + , modeBits(0) + , num(0) + , extended(false) + , extBits(0) + , numAddrModes(0) + { + bx::memSet(addrMode, 0, sizeof(addrMode) ); + bx::memSet(regIndex, 0, sizeof(regIndex) ); + bx::memSet(un.imm64, 0, sizeof(un.imm64) ); + } DxbcOperandType::Enum type; DxbcOperandMode::Enum mode; diff --git a/3rdparty/bgfx/src/shader_spirv.cpp b/3rdparty/bgfx/src/shader_spirv.cpp index b859dbb..83b13c5 100644 --- a/3rdparty/bgfx/src/shader_spirv.cpp +++ b/3rdparty/bgfx/src/shader_spirv.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/shader_spirv.h b/3rdparty/bgfx/src/shader_spirv.h index e0f6807..c5a37ed 100644 --- a/3rdparty/bgfx/src/shader_spirv.h +++ b/3rdparty/bgfx/src/shader_spirv.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/topology.cpp b/3rdparty/bgfx/src/topology.cpp index 2804bc7..ba7683c 100644 --- a/3rdparty/bgfx/src/topology.cpp +++ b/3rdparty/bgfx/src/topology.cpp @@ -1,11 +1,11 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include #include -#include +#include #include #include @@ -52,9 +52,9 @@ namespace bgfx if (i0 > i1) { bx::xchg(i0, i1); } BX_CHECK(i0 < i1 && i1 < i2, ""); - dst[0] = i0; dst[1] = i1; - dst[2] = i1; dst[3] = i2; - dst[4] = i0; dst[5] = i2; + dst[1] = i0; dst[0] = i1; + dst[3] = i1; dst[2] = i2; + dst[5] = i0; dst[4] = i2; dst += 6; } @@ -83,11 +83,19 @@ namespace bgfx dst = (IndexT*)_dst; IndexT* end = &dst[_dstSize/sizeof(IndexT)]; SortT last = sorted[0]; + + { + union Un { SortT key; struct { IndexT i0; IndexT i1; } u16; } un = { sorted[0] }; + dst[0] = un.u16.i0; + dst[1] = un.u16.i1; + dst += 2; + } + for (uint32_t ii = 1; ii < _numIndices && dst < end; ++ii) { if (last != sorted[ii]) { - union Un { SortT key; struct { IndexT i0; IndexT i1; } u16; } un = { last }; + union Un { SortT key; struct { IndexT i0; IndexT i1; } u16; } un = { sorted[ii] }; dst[0] = un.u16.i0; dst[1] = un.u16.i1; dst += 2; @@ -95,14 +103,6 @@ namespace bgfx } } - if (dst < end) - { - union Un { SortT key; struct { IndexT i0; IndexT i1; } u16; } un = { last }; - dst[0] = un.u16.i0; - dst[1] = un.u16.i1; - dst += 2; - } - num = uint32_t(dst - (IndexT*)_dst); } @@ -223,14 +223,14 @@ namespace bgfx return 0; } - inline uint32_t floatFlip(uint32_t _value) + inline float fmin3(float _a, float _b, float _c) { - using namespace bx; - const uint32_t tmp0 = uint32_sra(_value, 31); - const uint32_t tmp1 = uint32_neg(tmp0); - const uint32_t mask = uint32_or(tmp1, 0x80000000); - const uint32_t result = uint32_xor(_value, mask); - return result; + return bx::min(_a, _b, _c); + } + + inline float fmax3(float _a, float _b, float _c) + { + return bx::max(_a, _b, _c); } inline float favg3(float _a, float _b, float _c) @@ -253,7 +253,7 @@ namespace bgfx { float tmp[3]; bx::vec3Sub(tmp, _pos, vertexPos(_vertices, _stride, _index) ); - return bx::fsqrt(bx::vec3Dot(tmp, tmp) ); + return bx::sqrt(bx::vec3Dot(tmp, tmp) ); } typedef float (*KeyFn)(float, float, float); @@ -281,10 +281,8 @@ namespace bgfx float distance1 = dfn(_dirOrPos, _vertices, _stride, idx1); float distance2 = dfn(_dirOrPos, _vertices, _stride, idx2); - union { float fl; uint32_t ui; } un; - un.fl = kfn(distance0, distance1, distance2); - - _keys[ii] = floatFlip(un.ui) ^ xorBits; + uint32_t ui = bx::floatToBits(kfn(distance0, distance1, distance2) ); + _keys[ii] = bx::floatFlip(ui) ^ xorBits; _values[ii] = ii; } } diff --git a/3rdparty/bgfx/src/topology.h b/3rdparty/bgfx/src/topology.h index 156a6ca..896e6e5 100644 --- a/3rdparty/bgfx/src/topology.h +++ b/3rdparty/bgfx/src/topology.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/vertexdecl.cpp b/3rdparty/bgfx/src/vertexdecl.cpp index a2d88a4..a530fcd 100644 --- a/3rdparty/bgfx/src/vertexdecl.cpp +++ b/3rdparty/bgfx/src/vertexdecl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -64,6 +64,7 @@ namespace bgfx } VertexDecl::VertexDecl() + : m_stride(0) { // BK - struct need to have ctor to qualify as non-POD data. // Need this to catch programming errors when serializing struct. @@ -127,6 +128,8 @@ namespace bgfx "Attrib::Bitangent", "Attrib::Color0", "Attrib::Color1", + "Attrib::Color2", + "Attrib::Color3", "Attrib::Indices", "Attrib::Weights", "Attrib::TexCoord0", @@ -151,7 +154,7 @@ namespace bgfx { bx::debugPrintf("vertexdecl %08x (%08x), stride %d\n" , _decl.m_hash - , bx::hashMurmur2A(_decl.m_attributes) + , bx::hash(_decl.m_attributes) , _decl.m_stride ); @@ -196,6 +199,8 @@ namespace bgfx { Attrib::Bitangent, 0x0004 }, { Attrib::Color0, 0x0005 }, { Attrib::Color1, 0x0006 }, + { Attrib::Color2, 0x0018 }, + { Attrib::Color3, 0x0019 }, { Attrib::Indices, 0x000e }, { Attrib::Weight, 0x000f }, { Attrib::TexCoord0, 0x0010 }, @@ -389,9 +394,9 @@ namespace bgfx { switch (num) { - default: *packed++ = uint8_t(*_input++ * 127.0f + 128.0f); - case 3: *packed++ = uint8_t(*_input++ * 127.0f + 128.0f); - case 2: *packed++ = uint8_t(*_input++ * 127.0f + 128.0f); + default: *packed++ = uint8_t(*_input++ * 127.0f + 128.0f); BX_FALLTHROUGH; + case 3: *packed++ = uint8_t(*_input++ * 127.0f + 128.0f); BX_FALLTHROUGH; + case 2: *packed++ = uint8_t(*_input++ * 127.0f + 128.0f); BX_FALLTHROUGH; case 1: *packed++ = uint8_t(*_input++ * 127.0f + 128.0f); } } @@ -399,9 +404,9 @@ namespace bgfx { switch (num) { - default: *packed++ = uint8_t(*_input++ * 255.0f); - case 3: *packed++ = uint8_t(*_input++ * 255.0f); - case 2: *packed++ = uint8_t(*_input++ * 255.0f); + default: *packed++ = uint8_t(*_input++ * 255.0f); BX_FALLTHROUGH; + case 3: *packed++ = uint8_t(*_input++ * 255.0f); BX_FALLTHROUGH; + case 2: *packed++ = uint8_t(*_input++ * 255.0f); BX_FALLTHROUGH; case 1: *packed++ = uint8_t(*_input++ * 255.0f); } } @@ -410,9 +415,9 @@ namespace bgfx { switch (num) { - default: *packed++ = uint8_t(*_input++); - case 3: *packed++ = uint8_t(*_input++); - case 2: *packed++ = uint8_t(*_input++); + default: *packed++ = uint8_t(*_input++); BX_FALLTHROUGH; + case 3: *packed++ = uint8_t(*_input++); BX_FALLTHROUGH; + case 2: *packed++ = uint8_t(*_input++); BX_FALLTHROUGH; case 1: *packed++ = uint8_t(*_input++); } } @@ -428,9 +433,9 @@ namespace bgfx { switch (num) { - default: - case 3: packed |= uint32_t(*_input++ * 511.0f + 512.0f); - case 2: packed <<= 10; packed |= uint32_t(*_input++ * 511.0f + 512.0f); + default: BX_FALLTHROUGH; + case 3: packed |= uint32_t(*_input++ * 511.0f + 512.0f); BX_FALLTHROUGH; + case 2: packed <<= 10; packed |= uint32_t(*_input++ * 511.0f + 512.0f); BX_FALLTHROUGH; case 1: packed <<= 10; packed |= uint32_t(*_input++ * 511.0f + 512.0f); } } @@ -438,9 +443,9 @@ namespace bgfx { switch (num) { - default: - case 3: packed |= uint32_t(*_input++ * 1023.0f); - case 2: packed <<= 10; packed |= uint32_t(*_input++ * 1023.0f); + default: BX_FALLTHROUGH; + case 3: packed |= uint32_t(*_input++ * 1023.0f); BX_FALLTHROUGH; + case 2: packed <<= 10; packed |= uint32_t(*_input++ * 1023.0f); BX_FALLTHROUGH; case 1: packed <<= 10; packed |= uint32_t(*_input++ * 1023.0f); } } @@ -449,9 +454,9 @@ namespace bgfx { switch (num) { - default: - case 3: packed |= uint32_t(*_input++); - case 2: packed <<= 10; packed |= uint32_t(*_input++); + default: BX_FALLTHROUGH; + case 3: packed |= uint32_t(*_input++); BX_FALLTHROUGH; + case 2: packed <<= 10; packed |= uint32_t(*_input++); BX_FALLTHROUGH; case 1: packed <<= 10; packed |= uint32_t(*_input++); } } @@ -468,9 +473,9 @@ namespace bgfx { switch (num) { - default: *packed++ = int16_t(*_input++ * 32767.0f); - case 3: *packed++ = int16_t(*_input++ * 32767.0f); - case 2: *packed++ = int16_t(*_input++ * 32767.0f); + default: *packed++ = int16_t(*_input++ * 32767.0f); BX_FALLTHROUGH; + case 3: *packed++ = int16_t(*_input++ * 32767.0f); BX_FALLTHROUGH; + case 2: *packed++ = int16_t(*_input++ * 32767.0f); BX_FALLTHROUGH; case 1: *packed++ = int16_t(*_input++ * 32767.0f); } } @@ -478,9 +483,9 @@ namespace bgfx { switch (num) { - default: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f); - case 3: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f); - case 2: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f); + default: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f); BX_FALLTHROUGH; + case 3: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f); BX_FALLTHROUGH; + case 2: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f); BX_FALLTHROUGH; case 1: *packed++ = int16_t(*_input++ * 65535.0f - 32768.0f); } } @@ -489,9 +494,9 @@ namespace bgfx { switch (num) { - default: *packed++ = int16_t(*_input++); - case 3: *packed++ = int16_t(*_input++); - case 2: *packed++ = int16_t(*_input++); + default: *packed++ = int16_t(*_input++); BX_FALLTHROUGH; + case 3: *packed++ = int16_t(*_input++); BX_FALLTHROUGH; + case 2: *packed++ = int16_t(*_input++); BX_FALLTHROUGH; case 1: *packed++ = int16_t(*_input++); } } @@ -503,9 +508,9 @@ namespace bgfx uint16_t* packed = (uint16_t*)data; switch (num) { - default: *packed++ = bx::halfFromFloat(*_input++); - case 3: *packed++ = bx::halfFromFloat(*_input++); - case 2: *packed++ = bx::halfFromFloat(*_input++); + default: *packed++ = bx::halfFromFloat(*_input++); BX_FALLTHROUGH; + case 3: *packed++ = bx::halfFromFloat(*_input++); BX_FALLTHROUGH; + case 2: *packed++ = bx::halfFromFloat(*_input++); BX_FALLTHROUGH; case 1: *packed++ = bx::halfFromFloat(*_input++); } } @@ -544,9 +549,9 @@ namespace bgfx { switch (num) { - default: *_output++ = (float(*packed++) - 128.0f)*1.0f/127.0f; - case 3: *_output++ = (float(*packed++) - 128.0f)*1.0f/127.0f; - case 2: *_output++ = (float(*packed++) - 128.0f)*1.0f/127.0f; + default: *_output++ = (float(*packed++) - 128.0f)*1.0f/127.0f; BX_FALLTHROUGH; + case 3: *_output++ = (float(*packed++) - 128.0f)*1.0f/127.0f; BX_FALLTHROUGH; + case 2: *_output++ = (float(*packed++) - 128.0f)*1.0f/127.0f; BX_FALLTHROUGH; case 1: *_output++ = (float(*packed++) - 128.0f)*1.0f/127.0f; } } @@ -554,9 +559,9 @@ namespace bgfx { switch (num) { - default: *_output++ = float(*packed++)*1.0f/255.0f; - case 3: *_output++ = float(*packed++)*1.0f/255.0f; - case 2: *_output++ = float(*packed++)*1.0f/255.0f; + default: *_output++ = float(*packed++)*1.0f/255.0f; BX_FALLTHROUGH; + case 3: *_output++ = float(*packed++)*1.0f/255.0f; BX_FALLTHROUGH; + case 2: *_output++ = float(*packed++)*1.0f/255.0f; BX_FALLTHROUGH; case 1: *_output++ = float(*packed++)*1.0f/255.0f; } } @@ -570,9 +575,9 @@ namespace bgfx { switch (num) { - default: - case 3: *_output++ = (float(packed & 0x3ff) - 512.0f)*1.0f/511.0f; packed >>= 10; - case 2: *_output++ = (float(packed & 0x3ff) - 512.0f)*1.0f/511.0f; packed >>= 10; + default: BX_FALLTHROUGH; + case 3: *_output++ = (float(packed & 0x3ff) - 512.0f)*1.0f/511.0f; packed >>= 10; BX_FALLTHROUGH; + case 2: *_output++ = (float(packed & 0x3ff) - 512.0f)*1.0f/511.0f; packed >>= 10; BX_FALLTHROUGH; case 1: *_output++ = (float(packed & 0x3ff) - 512.0f)*1.0f/511.0f; } } @@ -580,9 +585,9 @@ namespace bgfx { switch (num) { - default: - case 3: *_output++ = float(packed & 0x3ff)*1.0f/1023.0f; packed >>= 10; - case 2: *_output++ = float(packed & 0x3ff)*1.0f/1023.0f; packed >>= 10; + default: BX_FALLTHROUGH; + case 3: *_output++ = float(packed & 0x3ff)*1.0f/1023.0f; packed >>= 10; BX_FALLTHROUGH; + case 2: *_output++ = float(packed & 0x3ff)*1.0f/1023.0f; packed >>= 10; BX_FALLTHROUGH; case 1: *_output++ = float(packed & 0x3ff)*1.0f/1023.0f; } } @@ -596,9 +601,9 @@ namespace bgfx { switch (num) { - default: *_output++ = float(*packed++)*1.0f/32767.0f; - case 3: *_output++ = float(*packed++)*1.0f/32767.0f; - case 2: *_output++ = float(*packed++)*1.0f/32767.0f; + default: *_output++ = float(*packed++)*1.0f/32767.0f; BX_FALLTHROUGH; + case 3: *_output++ = float(*packed++)*1.0f/32767.0f; BX_FALLTHROUGH; + case 2: *_output++ = float(*packed++)*1.0f/32767.0f; BX_FALLTHROUGH; case 1: *_output++ = float(*packed++)*1.0f/32767.0f; } } @@ -606,9 +611,9 @@ namespace bgfx { switch (num) { - default: *_output++ = (float(*packed++) + 32768.0f)*1.0f/65535.0f; - case 3: *_output++ = (float(*packed++) + 32768.0f)*1.0f/65535.0f; - case 2: *_output++ = (float(*packed++) + 32768.0f)*1.0f/65535.0f; + default: *_output++ = (float(*packed++) + 32768.0f)*1.0f/65535.0f; BX_FALLTHROUGH; + case 3: *_output++ = (float(*packed++) + 32768.0f)*1.0f/65535.0f; BX_FALLTHROUGH; + case 2: *_output++ = (float(*packed++) + 32768.0f)*1.0f/65535.0f; BX_FALLTHROUGH; case 1: *_output++ = (float(*packed++) + 32768.0f)*1.0f/65535.0f; } } @@ -620,9 +625,9 @@ namespace bgfx uint16_t* packed = (uint16_t*)data; switch (num) { - default: *_output++ = bx::halfToFloat(*packed++); - case 3: *_output++ = bx::halfToFloat(*packed++); - case 2: *_output++ = bx::halfToFloat(*packed++); + default: *_output++ = bx::halfToFloat(*packed++); BX_FALLTHROUGH; + case 3: *_output++ = bx::halfToFloat(*packed++); BX_FALLTHROUGH; + case 2: *_output++ = bx::halfToFloat(*packed++); BX_FALLTHROUGH; case 1: *_output++ = bx::halfToFloat(*packed++); } } @@ -636,9 +641,9 @@ namespace bgfx switch (num) { - case 1: *_output++ = 0.0f; - case 2: *_output++ = 0.0f; - case 3: *_output++ = 0.0f; + case 1: *_output++ = 0.0f; BX_FALLTHROUGH; + case 2: *_output++ = 0.0f; BX_FALLTHROUGH; + case 3: *_output++ = 0.0f; BX_FALLTHROUGH; default: break; } } @@ -807,7 +812,7 @@ namespace bgfx { float pos[4]; vertexUnpack(pos, Attrib::Position, _decl, _data, ii); - uint32_t hashValue = bx::hashMurmur2A(pos, 3*sizeof(float) ) & hashMask; + uint32_t hashValue = bx::hash(pos, 3*sizeof(float) ) & hashMask; uint16_t offset = hashTable[hashValue]; for (; UINT16_MAX != offset; offset = next[offset]) diff --git a/3rdparty/bgfx/src/vertexdecl.h b/3rdparty/bgfx/src/vertexdecl.h index f046184..ece7799 100644 --- a/3rdparty/bgfx/src/vertexdecl.h +++ b/3rdparty/bgfx/src/vertexdecl.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/vs_clear.bin.h b/3rdparty/bgfx/src/vs_clear.bin.h index 46160b6..628f94f 100644 --- a/3rdparty/bgfx/src/vs_clear.bin.h +++ b/3rdparty/bgfx/src/vs_clear.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_clear_glsl[164] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x61, 0x74, // VSH...........at + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x61, 0x74, // VSH...........at 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // tribute highp ve 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, // c3 a_position;.v 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, // oid main ().{. @@ -12,52 +12,185 @@ static const uint8_t vs_clear_glsl[164] = 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, // ion = tmpvar_1;. 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t vs_clear_dx9[185] = +static const uint8_t vs_clear_spv[2083] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x03, 0xfe, 0xff, // VSH............. - 0xfe, 0xff, 0x17, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... - 0x00, 0x03, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ - 0x1c, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....vs_3_0.Micro - 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 - 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // .0.10011.16384.. - 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, // Q..........?.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ - 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, // ................ - 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x24, 0x90, 0x00, 0x00, 0x40, 0xa0, // ..........$...@. - 0x00, 0x00, 0x15, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x00, 0x03, 0x02, // VSH............. + 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x7a, 0x61, 0x00, 0x00, 0x00, 0x00, // #.........za.... + 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, // ..GLSL.std.450.. + 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, // ..........main.. + 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, // ................ + 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, // ................ + 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xf9, 0x03, // ..main.......... + 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xf9, 0x03, // ..Output........ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // ......gl_Positio + 0x6e, 0x00, 0x05, 0x00, 0x05, 0x00, 0x1f, 0x17, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, // n.........@main( + 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x1b, 0x00, 0x00, 0x61, 0x5f, // vf3;..........a_ + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0f, 0x12, // position........ + 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, 0x05, 0x00, // .._varying_..... + 0x05, 0x00, 0xd5, 0x5d, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // ...]..a_position + 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // ..........a_posi + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, // tion..........@e + 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, // ntryPointOutput_ + 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, // gl_Position..... + 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, // ......param..... + 0x04, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, // ......$Global... + 0x06, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x01, 0x00, // Rect............ + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, // ..u_viewTexel... + 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view + 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ + 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc5, 0x0b, // invView......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ......u_proj.... + 0x06, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, // ..........u_invP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x06, 0x00, // roj............. + 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, // ..u_viewProj.... + 0x07, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, // ..........u_invV + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xc5, 0x0b, // iewProj......... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, // ......u_model... + 0x06, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // ..........u_mode + 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x0a, 0x00, // lView........... + 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // ..u_modelViewPro + 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, // j.............u_ + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x04, 0x00, 0xcf, 0x03, // alphaRef4....... + 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcd, 0x0f, // ..Output........ + 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, // ..@entryPointOut + 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x1e, 0x00, // put...G......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x0b, 0x00, // ......G......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x7c, 0x05, 0x00, 0x00, 0x06, 0x00, // ......G...|..... + 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x00, 0x00, // ..@...H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, // ..#.......H..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ......#.......H. + 0x04, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x03, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x03, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, // ..#...`...H..... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x05, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, // ..#.......H..... + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, // ..........#... . + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x07, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x07, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, // ..#...`...H..... + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x09, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, // ..#.......H..... + 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x04, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, // ..............H. + 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, // ..........#..... + 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, // ..H............. + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x0b, 0x00, // ......H......... + 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xc5, 0x0b, // ..#... ...G..... + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x1e, 0x00, // ......G......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, // ..............!. + 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, // .. ............. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, // ...... ......... + 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, // ................ + 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x1d, 0x00, // ................ + 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xc8, 0x08, 0x00, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x95, 0x02, // ..!............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x76, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xf9, 0x03, // .. ...v......... + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, // .......... ..... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, // ..+............. + 0x80, 0x3f, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, // .? ............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, // ..;............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, // .. ............. + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, // ..;............. + 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, // ......e......... + 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... + 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, // ..+.......j... . + 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x7c, 0x05, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, // ......|...e...j. + 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xc5, 0x0b, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, // ................ + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e...e...e...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x7c, 0x05, 0x00, 0x00, 0x65, 0x00, // ..e...e...|...e. + 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x02, 0x00, 0xcf, 0x03, // ..e............. + 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x4c, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xcf, 0x03, // .. ...L......... + 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x4c, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x03, 0x00, // ..;...L......... + 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, // ..6............. + 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x79, 0x61, 0x00, 0x00, 0x3b, 0x00, // ..........ya..;. + 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..............=. + 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd5, 0x5d, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3e, 0x00, // .......]......>. + 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0xd5, 0x5d, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0xf9, 0x03, // .......]..9..... + 0x00, 0x00, 0xf5, 0x53, 0x00, 0x00, 0x1f, 0x17, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x51, 0x00, // ...S..........Q. + 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf8, 0x21, 0x00, 0x00, 0xf5, 0x53, 0x00, 0x00, 0x00, 0x00, // .......!...S.... + 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xf8, 0x21, 0x00, 0x00, 0xfd, 0x00, // ..>........!.... + 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0xf9, 0x03, 0x00, 0x00, 0x1f, 0x17, // ..8...6......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x08, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, // ..........7..... + 0x00, 0x00, 0xa6, 0x1b, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xd7, 0x58, 0x00, 0x00, 0x3b, 0x00, // ...........X..;. + 0x04, 0x00, 0x76, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, // ..v...........=. + 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x23, 0x56, 0x00, 0x00, 0xa6, 0x1b, 0x00, 0x00, 0x51, 0x00, // ......#V......Q. + 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x45, 0x3c, 0x00, 0x00, 0x23, 0x56, 0x00, 0x00, 0x00, 0x00, // ......E<..#V.... + 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x25, 0x5f, 0x00, 0x00, 0x23, 0x56, // ..Q.......%_..#V + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x52, // ......Q........R + 0x00, 0x00, 0x23, 0x56, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, // ..#V......P..... + 0x00, 0x00, 0x78, 0x31, 0x00, 0x00, 0x45, 0x3c, 0x00, 0x00, 0x25, 0x5f, 0x00, 0x00, 0x0c, 0x52, // ..x1..E<..%_...R + 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x34, 0x24, // ......A.......4$ + 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x34, 0x24, // ..........>...4$ + 0x00, 0x00, 0x78, 0x31, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xf9, 0x03, 0x00, 0x00, 0xba, 0x3a, // ..x1..=........: + 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xba, 0x3a, 0x00, 0x00, 0x38, 0x00, // ...........:..8. + 0x01, 0x00, 0x00, // ... }; -static const uint8_t vs_clear_dx11[386] = +static const uint8_t vs_clear_dx9[175] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x01, 0x44, 0x58, 0x42, 0x43, // VSH.......p.DXBC - 0x35, 0x37, 0xf0, 0x90, 0x23, 0xc6, 0x3b, 0x7a, 0xd4, 0x66, 0x38, 0xf5, 0x51, 0x69, 0x19, 0xa8, // 57..#.;z.f8.Qi.. - 0x01, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ....p.......0... - 0xb0, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, // ........<...Aon9 - 0x78, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, 0x50, 0x00, 0x00, 0x00, // x...x.......P... - 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, // (.....$...$...$. - 0x00, 0x00, 0x24, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, // ..$...$......... - 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, // Q..........?.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ - 0x00, 0x00, 0x0f, 0x90, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0xe4, 0x90, // ................ - 0x00, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0xaa, 0x90, // ................ - 0x01, 0x00, 0x44, 0xa0, 0x01, 0x00, 0x14, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, // ..D.........SHDR - 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // P...@......._... - 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // r.......g.... .. - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, // ........6...r .. - 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // ....F.......6... - 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, // . .......@.....? - 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // >...ISGN,....... - 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ........... - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, // ............POSI - 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, // TION....OSGN,... - 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ....... - 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ - 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x00, 0x01, 0x01, 0x00, // SV_POSITION..... - 0x00, 0x00, // .. + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x03, // VSH............. + 0xfe, 0xff, 0xfe, 0xff, 0x14, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, // ......CTAB....#. + 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ + 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......vs_3_0.Mic + 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler + 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, // 10.1..Q......... + 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, // .?.............. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0x24, 0x90, 0x00, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x15, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // $...@.......... +}; +static const uint8_t vs_clear_dx11[388] = +{ + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x44, 0x58, // VSH.......p...DX + 0x42, 0x43, 0x35, 0x37, 0xf0, 0x90, 0x23, 0xc6, 0x3b, 0x7a, 0xd4, 0x66, 0x38, 0xf5, 0x51, 0x69, // BC57..#.;z.f8.Qi + 0x19, 0xa8, 0x01, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, // ......p.......0. + 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x41, 0x6f, // ..........<...Ao + 0x6e, 0x39, 0x78, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, 0x50, 0x00, // n9x...x.......P. + 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, // ..(.....$...$... + 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // $...$...$....... + 0xfe, 0xff, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, // ..Q..........?.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, // ................ + 0xe4, 0x90, 0x00, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, // ................ + 0xaa, 0x90, 0x01, 0x00, 0x44, 0xa0, 0x01, 0x00, 0x14, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, // ....D.........SH + 0x44, 0x52, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00, 0x5f, 0x00, // DRP...@......._. + 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, // ..r.......g.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, // ..........6...r + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, // ......F.......6. + 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ... .......@.... + 0x80, 0x3f, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, // .?>...ISGN,..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...... ......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x50, 0x4f, // ..............PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, // SITION....OSGN,. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x00, 0x01, // ..SV_POSITION... + 0x01, 0x00, 0x00, 0x00, // .... }; static const uint8_t vs_clear_mtl[504] = { - 0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x01, 0x00, 0x00, 0x75, 0x73, // VSH...........us + 0x56, 0x53, 0x48, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe9, 0x01, 0x00, 0x00, 0x75, 0x73, // VSH...........us 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { diff --git a/3rdparty/bgfx/src/vs_clear.sc b/3rdparty/bgfx/src/vs_clear.sc index 2cd4aef..39abd06 100644 --- a/3rdparty/bgfx/src/vs_clear.sc +++ b/3rdparty/bgfx/src/vs_clear.sc @@ -1,7 +1,7 @@ $input a_position /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/src/vs_debugfont.bin.h b/3rdparty/bgfx/src/vs_debugfont.bin.h index 6d54586..5a6517c 100644 --- a/3rdparty/bgfx/src/vs_debugfont.bin.h +++ b/3rdparty/bgfx/src/vs_debugfont.bin.h @@ -1,6 +1,6 @@ static const uint8_t vs_debugfont_glsl[503] = { - 0x56, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..."f...u_mod + 0x56, 0x53, 0x48, 0x05, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..."f...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0xd2, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color @@ -33,153 +33,389 @@ static const uint8_t vs_debugfont_glsl[503] = 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // color1 = a_color 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 1;.}... }; -static const uint8_t vs_debugfont_dx9[395] = +static const uint8_t vs_debugfont_spv[3689] = { - 0x56, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..."f...u_mod + 0x56, 0x53, 0x48, 0x05, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..."f...u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0x44, 0x0e, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, // D.....#......... + 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // Ta.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x8a, 0x14, 0x00, 0x00, // main............ + 0xa6, 0x14, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, // ................ + 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ + 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....main........ + 0xc3, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // ....Output...... + 0xc3, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // ........gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc3, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ion............. + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // v_color0........ + 0xc3, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, // ........v_color1 + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xc3, 0x04, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ + 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x08, 0x00, // v_texcoord0..... + 0x1f, 0x11, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, // ....@main(vf4;vf + 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // 4;vf3;vf2;...... + 0x8f, 0x22, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ."..a_color0.... + 0x05, 0x00, 0x05, 0x00, 0xf3, 0x54, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, // .....T..a_color1 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x4e, 0x4a, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // ........NJ..a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xd8, 0x4e, 0x00, 0x00, // sition.......N.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, // ...._varying_... + 0x05, 0x00, 0x04, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ........$Global. + 0x06, 0x00, 0x06, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa4, 0x03, 0x00, 0x00, // ewRect.......... + 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. + 0x06, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew.............. + 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... + 0xa4, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ........u_proj.. + 0x06, 0x00, 0x06, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa4, 0x03, 0x00, 0x00, // vProj........... + 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. + 0x06, 0x00, 0x07, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... + 0xa4, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // ........u_model. + 0x06, 0x00, 0x06, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xa4, 0x03, 0x00, 0x00, // delView......... + 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP + 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj............. + 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, // u_alphaRef4..... + 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, // B............A.. + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_color0........ + 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ....a_color0.... + 0x05, 0x00, 0x05, 0x00, 0xc6, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, // .....?..a_color1 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x8a, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, // ............a_co + 0x6c, 0x6f, 0x72, 0x31, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xed, 0x2c, 0x00, 0x00, // lor1.........,.. + 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_position...... + 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, // ....a_position.. + 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // ....@,..a_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, // rd0.........a_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, // xcoord0......... + 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, // flattenTemp..... + 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .U..param....... + 0x6f, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // o8..param....... + 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // .8..param....... + 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, // ....param....... + 0xd8, 0x0c, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // ....@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // utput_gl_Positio + 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x64, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, // n.......d...Outp + 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ut......d....... + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // v_color0........ + 0x64, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, // d.......v_color1 + 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ........d....... + 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, // v_texcoord0..... + 0xcd, 0x0f, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // ....@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd9, 0x05, 0x00, 0x00, // utput...G....... + 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, // ....@...H....... + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xa4, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........#....... + 0x48, 0x00, 0x04, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa4, 0x03, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0xa4, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa4, 0x03, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xa4, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa4, 0x03, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0xa4, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xa4, 0x03, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0xa4, 0x03, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xa4, 0x03, 0x00, 0x00, // ........H....... + 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... + 0xa4, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ........G...B... + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, // ".......G....... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x8a, 0x14, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd8, 0x0c, 0x00, 0x00, // ........G....... + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xcd, 0x0f, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ + 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... + 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x06, 0x00, 0xc3, 0x04, 0x00, 0x00, // ................ + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, // ................ + 0x21, 0x00, 0x07, 0x00, 0x98, 0x01, 0x00, 0x00, 0xc3, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, // !............... + 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, // ............ ... + 0x40, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xc3, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, // @............... + 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // .... .......+... + 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, // ............+... + 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, // ...........?+... + 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, // ............,... + 0x1d, 0x00, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ................ + 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... + 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // ........,....... + 0x74, 0x01, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // t............... + 0x8a, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, // ....+........... + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, // ....,........... + 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... + 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... + 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // .......+....... + 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xd9, 0x05, 0x00, 0x00, // j... ........... + 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0xa4, 0x03, 0x00, 0x00, // e...j........... + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ........e...e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0xd9, 0x05, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....e...e....... + 0x20, 0x00, 0x04, 0x00, 0x21, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa4, 0x03, 0x00, 0x00, // ...!........... + 0x3b, 0x00, 0x04, 0x00, 0x21, 0x06, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ;...!...B....... + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // +.......)....... + 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ...........e... + 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x8a, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... + 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... + 0x20, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x91, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... + 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;............... + 0x1e, 0x00, 0x05, 0x00, 0x64, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....d........... + 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x64, 0x04, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xe1, 0x06, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, // d...;........... + 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x92, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // .... ........... + 0x13, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ....6........... + 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, // ............Sa.. + 0x3b, 0x00, 0x04, 0x00, 0x40, 0x07, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;...@........... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........U...... + 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x6f, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;.......o8...... + 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;........8...... + 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, // =........A...... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xc6, 0x3f, 0x00, 0x00, 0x8a, 0x14, 0x00, 0x00, // =........?...... + 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xed, 0x2c, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // =........,...... + 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, // =.......@,...... + 0x3e, 0x00, 0x03, 0x00, 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // >....U...A..>... + 0x6f, 0x38, 0x00, 0x00, 0xc6, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x38, 0x00, 0x00, // o8...?..>....8.. + 0xed, 0x2c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, // .,..>.......@,.. + 0x39, 0x00, 0x08, 0x00, 0xc3, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x1f, 0x11, 0x00, 0x00, // 9.......I&...... + 0x85, 0x55, 0x00, 0x00, 0x6f, 0x38, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, // .U..o8...8...... + 0x3e, 0x00, 0x03, 0x00, 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >.......I&..A... + 0x9a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....T4.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, // =...........T4.. + 0x3e, 0x00, 0x03, 0x00, 0xd8, 0x0c, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...........A... + 0x9a, 0x02, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....'A.......... + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, 0x27, 0x41, 0x00, 0x00, // =...........'A.. + 0x41, 0x00, 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, // A........N...... + 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0d, 0x4e, 0x00, 0x00, 0xdf, 0x1c, 0x00, 0x00, // ....>....N...... + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc1, 0x4d, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, // A........M...... + 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, // ....=........... + 0xc1, 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x0e, 0x4e, 0x00, 0x00, // .M..A........N.. + 0xcd, 0x0f, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0e, 0x4e, 0x00, 0x00, // ........>....N.. + 0xe0, 0x1c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x90, 0x02, 0x00, 0x00, 0xc2, 0x4d, 0x00, 0x00, // ....A........M.. + 0x08, 0x10, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // ........=....... + 0xe1, 0x1c, 0x00, 0x00, 0xc2, 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x92, 0x02, 0x00, 0x00, // .....M..A....... + 0x01, 0x5c, 0x00, 0x00, 0xcd, 0x0f, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ............>... + 0x01, 0x5c, 0x00, 0x00, 0xe1, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // ............8... + 0x36, 0x00, 0x05, 0x00, 0xc3, 0x04, 0x00, 0x00, 0x1f, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... + 0x98, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x8f, 0x22, 0x00, 0x00, // ....7........".. + 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xf3, 0x54, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7........T..7... + 0x95, 0x02, 0x00, 0x00, 0x4e, 0x4a, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, // ....NJ..7....... + 0xd8, 0x4e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x7e, 0x58, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .N......~X..;... + 0x40, 0x07, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // @...........A... + 0x9a, 0x02, 0x00, 0x00, 0x83, 0x2e, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ................ + 0x3e, 0x00, 0x03, 0x00, 0x83, 0x2e, 0x00, 0x00, 0x88, 0x05, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...........A... + 0x9a, 0x02, 0x00, 0x00, 0x76, 0x39, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // ....v9.......... + 0x3e, 0x00, 0x03, 0x00, 0x76, 0x39, 0x00, 0x00, 0x74, 0x01, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // >...v9..t...A... + 0x90, 0x02, 0x00, 0x00, 0x2a, 0x39, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, // ....*9.......... + 0x3e, 0x00, 0x03, 0x00, 0x2a, 0x39, 0x00, 0x00, 0x1f, 0x07, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >...*9......=... + 0x18, 0x00, 0x00, 0x00, 0xd5, 0x18, 0x00, 0x00, 0x4e, 0x4a, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // ........NJ..Q... + 0x0d, 0x00, 0x00, 0x00, 0x5a, 0x3b, 0x00, 0x00, 0xd5, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....Z;.......... + 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2a, 0x48, 0x00, 0x00, 0xd5, 0x18, 0x00, 0x00, // Q.......*H...... + 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x4a, 0x54, 0x00, 0x00, // ....Q.......JT.. + 0xd5, 0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, // ........P....... + 0xa3, 0x33, 0x00, 0x00, 0x5a, 0x3b, 0x00, 0x00, 0x2a, 0x48, 0x00, 0x00, 0x4a, 0x54, 0x00, 0x00, // .3..Z;..*H..JT.. + 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x48, 0x2d, 0x00, 0x00, // ....A.......H-.. + 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, // B...)...=...e... + 0x12, 0x3e, 0x00, 0x00, 0x48, 0x2d, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, // .>..H-.......... + 0xbe, 0x3c, 0x00, 0x00, 0xa3, 0x33, 0x00, 0x00, 0x12, 0x3e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // .<...3...>..A... + 0x9a, 0x02, 0x00, 0x00, 0x7e, 0x39, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, // ....~9.......... + 0x3e, 0x00, 0x03, 0x00, 0x7e, 0x39, 0x00, 0x00, 0xbe, 0x3c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >...~9...<..=... + 0x13, 0x00, 0x00, 0x00, 0x3c, 0x22, 0x00, 0x00, 0xd8, 0x4e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ....<"...N..A... + 0x90, 0x02, 0x00, 0x00, 0x4c, 0x3d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x14, 0x0a, 0x00, 0x00, // ....L=.......... + 0x3e, 0x00, 0x03, 0x00, 0x4c, 0x3d, 0x00, 0x00, 0x3c, 0x22, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >...L=..<"..=... + 0x1d, 0x00, 0x00, 0x00, 0x3d, 0x22, 0x00, 0x00, 0x8f, 0x22, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ....="..."..A... + 0x9a, 0x02, 0x00, 0x00, 0x4d, 0x3d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....M=.......... + 0x3e, 0x00, 0x03, 0x00, 0x4d, 0x3d, 0x00, 0x00, 0x3d, 0x22, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >...M=..="..=... + 0x1d, 0x00, 0x00, 0x00, 0x3e, 0x22, 0x00, 0x00, 0xf3, 0x54, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, // ....>"...T..A... + 0x9a, 0x02, 0x00, 0x00, 0x4e, 0x3d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, // ....N=.......... + 0x3e, 0x00, 0x03, 0x00, 0x4e, 0x3d, 0x00, 0x00, 0x3e, 0x22, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // >...N=..>"..=... + 0xc3, 0x04, 0x00, 0x00, 0x0d, 0x53, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, // .....S.......... + 0x0d, 0x53, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .S..8.... +}; +static const uint8_t vs_debugfont_dx9[385] = +{ + 0x56, 0x53, 0x48, 0x05, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..."f...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x68, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // h.......$.CTAB.. - 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, // modelViewProj... - 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs - 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( - 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 - 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // 11.16384........ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x01, 0x80, 0x01, 0x00, // ................ - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x03, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x01, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x03, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... - 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, // ................ - 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0xaa, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, // ................ - 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x01, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x03, 0x00, // ................ - 0x03, 0xe0, 0x03, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ........... + 0x5c, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x21, 0x00, 0x43, 0x54, 0x41, 0x42, // ..........!.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, // Compiler 10.1.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x0a, 0x00, 0x01, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ + 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x03, 0x00, 0x0f, 0x90, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x01, 0x80, // ................ + 0x02, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x03, 0x00, 0x03, 0xe0, // ................ + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x55, 0x90, // ..............U. + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x90, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, // ................ + 0x02, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, // ................ + 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x01, 0x00, 0xe4, 0x90, // ................ + 0x01, 0x00, 0x00, 0x02, 0x03, 0x00, 0x03, 0xe0, 0x03, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, // ................ + 0x00, // . }; -static const uint8_t vs_debugfont_dx11[974] = +static const uint8_t vs_debugfont_dx11[976] = { - 0x56, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..."f...u_mod + 0x56, 0x53, 0x48, 0x05, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..."f...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0xa0, 0x03, 0x44, 0x58, 0x42, 0x43, 0x92, 0x16, 0xf8, 0xaa, 0xc4, 0x4c, 0xee, 0x93, 0x22, 0xee, // ..DXBC.....L..". - 0x2e, 0xcd, 0x17, 0x4a, 0xe5, 0x55, 0x01, 0x00, 0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x04, 0x00, // ...J.U.......... - 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, 0x8c, 0x02, 0x00, 0x00, 0x14, 0x03, // ..0...0......... - 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0xf8, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x02, // ..Aon9.......... - 0xfe, 0xff, 0xc4, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, // ......4.....$... - 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, // 0...0...$...0... - 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // ................ - 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x02, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x03, 0x80, 0x03, 0x00, // ................ - 0x0f, 0x90, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0x55, 0x90, 0x02, 0x00, // ............U... - 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x02, 0x00, // ................ - 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x03, 0x00, // ................ - 0xe4, 0xa0, 0x02, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x03, 0xc0, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, // ................ - 0x00, 0x02, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x01, 0x00, // ................ - 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x03, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ - 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x54, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x55, 0x00, // ..SHDRT...@...U. - 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ..Y...F. ....... - 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, // .._..........._. - 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, // .........._...r. - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x03, 0x00, // ......_...2..... - 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..g.... ........ - 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, // ..e.... ......e. - 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, // ... ......e...2 - 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, // ......h.......8. - 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x02, 0x00, // ..........V..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, // ..F. .........2. - 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..........F. ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x0e, // ..............F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, // ..F. ........... - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F......... - 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, // ..F. .........6. - 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, // ... ......F..... - 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x1e, // ..6.... ......F. - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x03, 0x00, // ......6...2 .... - 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, // ..F.......>...IS - 0x47, 0x4e, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, // GN............h. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ......h......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x6e, 0x00, // ..............n. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......w......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x43, 0x4f, // ..............CO - 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, // LOR.POSITION.TEX - 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, // COORD.OSGN...... - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ......h......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, // ..............t. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ......t......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x7a, 0x00, // ..............z. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ - 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO - 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // N.COLOR.TEXCOORD - 0x00, 0xab, 0x00, 0x04, 0x05, 0x00, 0x06, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ............@. + 0xa0, 0x03, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x92, 0x16, 0xf8, 0xaa, 0xc4, 0x4c, 0xee, 0x93, // ....DXBC.....L.. + 0x22, 0xee, 0x2e, 0xcd, 0x17, 0x4a, 0xe5, 0x55, 0x01, 0x00, 0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, // "....J.U........ + 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, 0x8c, 0x02, 0x00, 0x00, // ....0...0....... + 0x14, 0x03, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0xf8, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, // ....Aon9........ + 0x00, 0x02, 0xfe, 0xff, 0xc4, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, // ........4.....$. + 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x01, 0x00, 0x30, 0x00, // ..0...0...$...0. + 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x02, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x05, 0x00, 0x02, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x03, 0x80, // ................ + 0x03, 0x00, 0x0f, 0x90, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0x55, 0x90, // ..............U. + 0x02, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, // ................ + 0x02, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ................ + 0x03, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, // ................ + 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xe4, 0x80, // ................ + 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, // ................ + 0x01, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x03, 0x00, 0xe4, 0x90, // ................ + 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x54, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // ....SHDRT...@... + 0x55, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // U...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._........... + 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _..........._... + 0x72, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, // r......._...2... + 0x03, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....g.... ...... + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....e.... ...... + 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, // e.... ......e... + 0x32, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, // 2 ......h....... + 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, // 8...........V... + 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....F. ......... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // F.......2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....F. ......... + 0xa6, 0x1a, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ..... ......F... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....F. ......... + 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F... + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....6.... ...... + 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, // F.......6...2 .. + 0x03, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>... + 0x49, 0x53, 0x47, 0x4e, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGN............ + 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // h............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........h....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // ................ + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // n............... + 0x02, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........w....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // ................ + 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, // COLOR.POSITION.T + 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, // EXCOORD.OSGN.... + 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........h....... + 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // t............... + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........t....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // z............... + 0x03, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO + 0x52, 0x44, 0x00, 0xab, 0x00, 0x04, 0x05, 0x00, 0x06, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // RD............@. }; -static const uint8_t vs_debugfont_mtl[847] = +static const uint8_t vs_debugfont_mtl[869] = { - 0x56, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0x75, 0x73, // VSH..."f..@...us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . float4 a_colo - 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, // r0 [[attribute(0 - 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x61, 0x5f, // )]];. float4 a_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, // color1 [[attribu - 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // te(1)]];. float - 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, // 3 a_position [[a - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, // ttribute(2)]];. - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // float2 a_texcoo - 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, // rd0 [[attribute( - 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, // 3)]];.};.struct - 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut - 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // put {. float4 g - 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, // l_Position [[pos - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // ition]];. float - 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // 4 v_color0;. fl - 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x20, // oat4 v_color1;. - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // float2 v_texcoo - 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, // rd0;.};.struct x - 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, // latMtlShaderUnif - 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, // orm {. float4x4 - 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // u_modelViewProj - 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, // ;.};.vertex xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput - 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, // xlatMtlMain (xla - 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, // tMtlShaderInput - 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, // _mtl_i [[stage_i - 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, // n]], constant xl - 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo - 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, // rm& _mtl_u [[buf - 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, // fer(0)]]).{. xl - 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu - 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // t _mtl_o;. floa - 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, // t4 tmpvar_1 = 0; - 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, // . tmpvar_1.w = - 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, // 1.0;. tmpvar_1. - 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, // xyz = _mtl_i.a_p - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // osition;. _mtl_ - 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, // o.gl_Position = - 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // (_mtl_u.u_modelV - 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // iewProj * tmpvar - 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, // _1);. _mtl_o.v_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // texcoord0 = _mtl - 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, // _i.a_texcoord0;. - 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // _mtl_o.v_color - 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, // 0 = _mtl_i.a_col - 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, // or0;. _mtl_o.v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, // color1 = _mtl_i. - 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // a_color1;. retu - 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // rn _mtl_o;.}... + 0x56, 0x53, 0x48, 0x05, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..."f...u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0x40, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // @...using namesp + 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, // t xlatMtlShaderI + 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // nput {. float4 + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, // a_color0 [[attri + 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // bute(0)]];. flo + 0x61, 0x74, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x20, 0x5b, 0x5b, 0x61, // at4 a_color1 [[a + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, // ttribute(1)]];. + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // float3 a_positi + 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x32, // on [[attribute(2 + 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, // )]];. float2 a_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, // texcoord0 [[attr + 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, // ibute(3)]];.};.s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // truct xlatMtlSha + 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // derOutput {. fl + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // oat4 gl_Position + 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, // [[position]];. + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // float4 v_color0 + 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // ;. float4 v_col + 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, // or1;. float2 v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, // texcoord0;.};.st + 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ruct xlatMtlShad + 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // erUniform {. fl + 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // oat4x4 u_modelVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, // ewProj;.};.verte + 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // x xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, // utput xlatMtlMai + 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // n (xlatMtlShader + 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, // Input _mtl_i [[s + 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, // tage_in]], const + 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // ant xlatMtlShade + 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // rUniform& _mtl_u + 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, // [[buffer(0)]]). + 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // {. xlatMtlShade + 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // rOutput _mtl_o;. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // float4 tmpvar_ + 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // 1 = 0;. tmpvar_ + 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // 1.w = 1.0;. tmp + 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // var_1.xyz = _mtl + 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, // _i.a_position;. + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // _mtl_o.gl_Posit + 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, // ion = (_mtl_u.u_ + 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, // modelViewProj * + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, // tmpvar_1);. _mt + 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, // l_o.v_texcoord0 + 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // = _mtl_i.a_texco + 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, // ord0;. _mtl_o.v + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // _color0 = _mtl_i + 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, // .a_color0;. _mt + 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x20, 0x3d, 0x20, 0x5f, // l_o.v_color1 = _ + 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, // mtl_i.a_color1;. + 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // return _mtl_o; + 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... }; extern const uint8_t* vs_debugfont_pssl; extern const uint32_t vs_debugfont_pssl_size; diff --git a/3rdparty/bgfx/src/vs_debugfont.sc b/3rdparty/bgfx/src/vs_debugfont.sc index 17ae521..8c09d62 100644 --- a/3rdparty/bgfx/src/vs_debugfont.sc +++ b/3rdparty/bgfx/src/vs_debugfont.sc @@ -2,7 +2,7 @@ $input a_position, a_color0, a_color1, a_texcoord0 $output v_color0, v_color1, v_texcoord0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bgfx/tools/geometryc/geometryc.cpp b/3rdparty/bgfx/tools/geometryc/geometryc.cpp index 14275ba..3e6a2d7 100644 --- a/3rdparty/bgfx/tools/geometryc/geometryc.cpp +++ b/3rdparty/bgfx/tools/geometryc/geometryc.cpp @@ -1,26 +1,29 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ +#include + #include #include -#include -#include -#include -#include +#include #include #include "../../src/vertexdecl.h" #include #include #include +#include namespace stl = tinystl; #include #include +#define BGFX_GEOMETRYC_VERSION_MAJOR 1 +#define BGFX_GEOMETRYC_VERSION_MINOR 0 + #if 0 # define BX_TRACE(_format, ...) \ do { \ @@ -45,23 +48,14 @@ namespace stl = tinystl; } while(0) #endif // 0 -#define EXPECT(_condition) \ - do { \ - if (!(_condition) ) \ - { \ - printf("Error parsing at:\n" BX_FILE_LINE_LITERAL "\nExpected: " #_condition "\n"); \ - exit(EXIT_FAILURE); \ - } \ - } while(0) - #include #include #include #include #include #include -#include -#include +#include +#include #include "bounds.h" @@ -96,8 +90,8 @@ struct Group { uint32_t m_startTriangle; uint32_t m_numTriangles; - std::string m_name; - std::string m_material; + stl::string m_name; + stl::string m_material; }; typedef std::vector GroupArray; @@ -108,7 +102,7 @@ struct Primitive uint32_t m_startIndex; uint32_t m_numVertices; uint32_t m_numIndices; - std::string m_name; + stl::string m_name; }; typedef std::vector PrimitiveArray; @@ -132,8 +126,8 @@ long int fsize(FILE* _file) void triangleReorder(uint16_t* _indices, uint32_t _numIndices, uint32_t _numVertices, uint16_t _cacheSize) { uint16_t* newIndexList = new uint16_t[_numIndices]; - Forsyth::OptimizeFaces(_indices, _numIndices, _numVertices, newIndexList, _cacheSize); - memcpy(_indices, newIndexList, _numIndices*2); + Forsyth::OptimizeFaces(_indices, _numIndices, _numVertices, 0, newIndexList, _cacheSize); + bx::memCopy(_indices, newIndexList, _numIndices*2); delete [] newIndexList; } @@ -156,9 +150,9 @@ void triangleCompress(bx::WriterI* _writer, uint16_t* _indices, uint32_t _numInd { uint32_t remap = vertexRemap[ii]; remap = UINT32_MAX == remap ? ii : remap; - memcpy(&outVertexData[remap*_stride], &_vertexData[ii*_stride], _stride); + bx::memCopy(&outVertexData[remap*_stride], &_vertexData[ii*_stride], _stride); } - memcpy(_vertexData, outVertexData, _numVertices*_stride); + bx::memCopy(_vertexData, outVertexData, _numVertices*_stride); free(outVertexData); free(vertexRemap); @@ -181,7 +175,7 @@ void calcTangents(void* _vertices, uint16_t _numVertices, bgfx::VertexDecl _decl }; float* tangents = new float[6*_numVertices]; - memset(tangents, 0, 6*_numVertices*sizeof(float) ); + bx::memSet(tangents, 0, 6*_numVertices*sizeof(float) ); PosTexcoord v0; PosTexcoord v1; @@ -301,7 +295,7 @@ void write(bx::WriterI* _writer , uint32_t _numIndices , const uint8_t* _compressedIndices , uint32_t _compressedSize - , const std::string& _material + , const stl::string& _material , const PrimitiveArray& _primitives ) { @@ -350,6 +344,23 @@ void write(bx::WriterI* _writer } } +inline uint32_t rgbaToAbgr(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a) +{ + return (uint32_t(_r)<<0) + | (uint32_t(_g)<<8) + | (uint32_t(_b)<<16) + | (uint32_t(_a)<<24) + ; +} + +struct GroupSortByMaterial +{ + bool operator()(const Group& _lhs, const Group& _rhs) + { + return 0 < bx::strCmp(_lhs.m_material.c_str(), _rhs.m_material.c_str() ); + } +}; + void help(const char* _error = NULL) { if (NULL != _error) @@ -358,9 +369,12 @@ void help(const char* _error = NULL) } fprintf(stderr - , "geometryc, bgfx geometry compiler tool\n" - "Copyright 2011-2017 Branimir Karadzic. All rights reserved.\n" + , "geometryc, bgfx geometry compiler tool, version %d.%d.%d.\n" + "Copyright 2011-2018 Branimir Karadzic. All rights reserved.\n" "License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n\n" + , BGFX_GEOMETRYC_VERSION_MAJOR + , BGFX_GEOMETRYC_VERSION_MINOR + , BGFX_API_VERSION ); fprintf(stderr @@ -372,6 +386,8 @@ void help(const char* _error = NULL) "\n" "Options:\n" + " -h, --help Help.\n" + " -v, --version Version information only.\n" " -f Input file path.\n" " -o Output file path.\n" " -s, --scale Scale factor.\n" @@ -395,39 +411,39 @@ void help(const char* _error = NULL) ); } -inline uint32_t rgbaToAbgr(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a) -{ - return (uint32_t(_r)<<0) - | (uint32_t(_g)<<8) - | (uint32_t(_b)<<16) - | (uint32_t(_a)<<24) - ; -} - -struct GroupSortByMaterial -{ - bool operator()(const Group& _lhs, const Group& _rhs) - { - return _lhs.m_material < _rhs.m_material; - } -}; - int main(int _argc, const char* _argv[]) { bx::CommandLine cmdLine(_argc, _argv); + if (cmdLine.hasArg('v', "version") ) + { + fprintf(stderr + , "geometryc, bgfx geometry compiler tool, version %d.%d.%d.\n" + , BGFX_GEOMETRYC_VERSION_MAJOR + , BGFX_GEOMETRYC_VERSION_MINOR + , BGFX_API_VERSION + ); + return bx::kExitSuccess; + } + + if (cmdLine.hasArg('h', "help") ) + { + help(); + return bx::kExitFailure; + } + const char* filePath = cmdLine.findOption('f'); if (NULL == filePath) { help("Input file name must be specified."); - return EXIT_FAILURE; + return bx::kExitFailure; } const char* outFilePath = cmdLine.findOption('o'); if (NULL == outFilePath) { help("Output file name must be specified."); - return EXIT_FAILURE; + return bx::kExitFailure; } float scale = 1.0f; @@ -457,7 +473,7 @@ int main(int _argc, const char* _argv[]) if (NULL == file) { printf("Unable to open input file '%s'.", filePath); - exit(EXIT_FAILURE); + exit(bx::kExitFailure); } int64_t parseElapsed = -bx::getHPCounter(); @@ -494,17 +510,17 @@ int main(int _argc, const char* _argv[]) next = bx::tokenizeCommandLine(next, commandLine, len, argc, argv, BX_COUNTOF(argv), '\n'); if (0 < argc) { - if (0 == strcmp(argv[0], "#") ) + if (0 == bx::strCmp(argv[0], "#") ) { if (2 < argc - && 0 == strcmp(argv[2], "polygons") ) + && 0 == bx::strCmp(argv[2], "polygons") ) { } } - else if (0 == strcmp(argv[0], "f") ) + else if (0 == bx::strCmp(argv[0], "f") ) { Triangle triangle; - memset(&triangle, 0, sizeof(Triangle) ); + bx::memSet(&triangle, 0, sizeof(Triangle) ); const int numNormals = (int)normals.size(); const int numTexcoords = (int)texcoords.size(); @@ -524,29 +540,32 @@ int main(int _argc, const char* _argv[]) index.m_vbc = 0; } - const char* vertex = argv[edge+1]; - char* texcoord = const_cast(bx::strnchr(vertex, '/') ); + const char* vertex = argv[edge+1]; + char* texcoord = const_cast(bx::strFind(vertex, '/') ); if (NULL != texcoord) { *texcoord++ = '\0'; - char* normal = const_cast(bx::strnchr(texcoord, '/') ); + char* normal = const_cast(bx::strFind(texcoord, '/') ); if (NULL != normal) { *normal++ = '\0'; - const int nn = atoi(normal); + int32_t nn; + bx::fromString(&nn, normal); index.m_normal = (nn < 0) ? nn+numNormals : nn-1; } // https://en.wikipedia.org/wiki/Wavefront_.obj_file#Vertex_Normal_Indices_Without_Texture_Coordinate_Indices if(*texcoord != '\0') { - const int tex = atoi(texcoord); + int32_t tex; + bx::fromString(&tex, texcoord); index.m_texcoord = (tex < 0) ? tex+numTexcoords : tex-1; } } - const int pos = atoi(vertex); + int32_t pos; + bx::fromString(&pos, vertex); index.m_position = (pos < 0) ? pos+numPositions : pos-1; uint64_t hash0 = index.m_position; @@ -599,9 +618,8 @@ int main(int _argc, const char* _argv[]) } } } - else if (0 == strcmp(argv[0], "g") ) + else if (0 == bx::strCmp(argv[0], "g") ) { - EXPECT(1 < argc); group.m_name = argv[1]; } else if (*argv[0] == 'v') @@ -614,7 +632,7 @@ int main(int _argc, const char* _argv[]) group.m_numTriangles = 0; } - if (0 == strcmp(argv[0], "vn") ) + if (0 == bx::strCmp(argv[0], "vn") ) { Vector3 normal; normal.x = (float)atof(argv[1]); @@ -623,7 +641,7 @@ int main(int _argc, const char* _argv[]) normals.push_back(normal); } - else if (0 == strcmp(argv[0], "vp") ) + else if (0 == bx::strCmp(argv[0], "vp") ) { static bool once = true; if (once) @@ -632,7 +650,7 @@ int main(int _argc, const char* _argv[]) printf("warning: 'parameter space vertices' are unsupported.\n"); } } - else if (0 == strcmp(argv[0], "vt") ) + else if (0 == bx::strCmp(argv[0], "vt") ) { Vector3 texcoord; texcoord.x = (float)atof(argv[1]); @@ -677,11 +695,11 @@ int main(int _argc, const char* _argv[]) positions.push_back(pos); } } - else if (0 == strcmp(argv[0], "usemtl") ) + else if (0 == bx::strCmp(argv[0], "usemtl") ) { - std::string material(argv[1]); + stl::string material(argv[1]); - if (material != group.m_material) + if (0 != bx::strCmp(material.c_str(), group.m_material.c_str() ) ) { group.m_numTriangles = (uint32_t)(triangles.size() ) - group.m_startTriangle; if (0 < group.m_numTriangles) @@ -695,13 +713,13 @@ int main(int _argc, const char* _argv[]) group.m_material = material; } // unsupported tags -// else if (0 == strcmp(argv[0], "mtllib") ) +// else if (0 == bx::strCmp(argv[0], "mtllib") ) // { // } -// else if (0 == strcmp(argv[0], "o") ) +// else if (0 == bx::strCmp(argv[0], "o") ) // { // } -// else if (0 == strcmp(argv[0], "s") ) +// else if (0 == bx::strCmp(argv[0], "s") ) // { // } } @@ -734,25 +752,35 @@ int main(int _argc, const char* _argv[]) hasNormal = -1 != it->second.m_normal; hasTexcoord = -1 != it->second.m_texcoord; - if (!hasTexcoord - && texcoords.size() == positions.size() ) + if (!hasTexcoord) { - hasTexcoord = true; - - for (Index3Map::iterator jt = indexMap.begin(), jtEnd = indexMap.end(); jt != jtEnd; ++jt) + for (Index3Map::iterator jt = indexMap.begin(), jtEnd = indexMap.end(); jt != jtEnd && !hasTexcoord; ++jt) { - jt->second.m_texcoord = jt->second.m_position; + hasTexcoord |= -1 != jt->second.m_texcoord; + } + + if (hasTexcoord) + { + for (Index3Map::iterator jt = indexMap.begin(), jtEnd = indexMap.end(); jt != jtEnd; ++jt) + { + jt->second.m_texcoord = -1 == jt->second.m_texcoord ? 0 : jt->second.m_texcoord; + } } } - if (!hasNormal - && normals.size() == positions.size() ) + if (!hasNormal) { - hasNormal = true; - - for (Index3Map::iterator jt = indexMap.begin(), jtEnd = indexMap.end(); jt != jtEnd; ++jt) + for (Index3Map::iterator jt = indexMap.begin(), jtEnd = indexMap.end(); jt != jtEnd && !hasNormal; ++jt) { - jt->second.m_normal = jt->second.m_position; + hasNormal |= -1 != jt->second.m_normal; + } + + if (hasNormal) + { + for (Index3Map::iterator jt = indexMap.begin(), jtEnd = indexMap.end(); jt != jtEnd; ++jt) + { + jt->second.m_normal = -1 == jt->second.m_normal ? 0 : jt->second.m_normal; + } } } } @@ -822,15 +850,15 @@ int main(int _argc, const char* _argv[]) uint8_t* vertices = vertexData; uint16_t* indices = indexData; - std::string material = groups.begin()->m_material; + stl::string material = groups.begin()->m_material; PrimitiveArray primitives; - bx::CrtFileWriter writer; + bx::FileWriter writer; if (!bx::open(&writer, outFilePath) ) { printf("Unable to open output file '%s'.", outFilePath); - exit(EXIT_FAILURE); + exit(bx::kExitFailure); } Primitive prim; @@ -840,7 +868,7 @@ int main(int _argc, const char* _argv[]) uint32_t positionOffset = decl.getOffset(bgfx::Attrib::Position); uint32_t color0Offset = decl.getOffset(bgfx::Attrib::Color0); - bx::CrtAllocator crtAllocator; + bx::DefaultAllocator crtAllocator; bx::MemoryBlock memBlock(&crtAllocator); uint32_t ii = 0; @@ -848,7 +876,7 @@ int main(int _argc, const char* _argv[]) { for (uint32_t tri = groupIt->m_startTriangle, end = tri + groupIt->m_numTriangles; tri < end; ++tri) { - if (material != groupIt->m_material + if (0 != bx::strCmp(material.c_str(), groupIt->m_material.c_str() ) || 65533 < numVertices) { prim.m_numVertices = numVertices - prim.m_startVertex; @@ -922,7 +950,7 @@ int main(int _argc, const char* _argv[]) index.m_vertexIndex = numVertices++; float* position = (float*)(vertices + positionOffset); - memcpy(position, &positions[index.m_position], 3*sizeof(float) ); + bx::memCopy(position, &positions[index.m_position], 3*sizeof(float) ); if (hasColor) { @@ -944,7 +972,7 @@ int main(int _argc, const char* _argv[]) if (hasTexcoord) { float uv[2]; - memcpy(uv, &texcoords[index.m_texcoord], 2*sizeof(float) ); + bx::memCopy(uv, &texcoords[index.m_texcoord], 2*sizeof(float) ); if (flipV) { @@ -1047,5 +1075,5 @@ int main(int _argc, const char* _argv[]) , numIndices ); - return EXIT_SUCCESS; + return bx::kExitSuccess; } diff --git a/3rdparty/bgfx/tools/shaderc/shaderc.cpp b/3rdparty/bgfx/tools/shaderc/shaderc.cpp index b444bb3..5f0c56d 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc.cpp +++ b/3rdparty/bgfx/tools/shaderc/shaderc.cpp @@ -1,10 +1,11 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include "shaderc.h" #include +#include #define MAX_TAGS 256 extern "C" @@ -12,14 +13,17 @@ extern "C" #include } // extern "C" +#define BGFX_CHUNK_MAGIC_CSH BX_MAKEFOURCC('C', 'S', 'H', 0x3) +#define BGFX_CHUNK_MAGIC_FSH BX_MAKEFOURCC('F', 'S', 'H', 0x5) +#define BGFX_CHUNK_MAGIC_VSH BX_MAKEFOURCC('V', 'S', 'H', 0x5) + +#define BGFX_SHADERC_VERSION_MAJOR 1 +#define BGFX_SHADERC_VERSION_MINOR 8 + namespace bgfx { bool g_verbose = false; - #define BGFX_CHUNK_MAGIC_CSH BX_MAKEFOURCC('C', 'S', 'H', 0x2) - #define BGFX_CHUNK_MAGIC_FSH BX_MAKEFOURCC('F', 'S', 'H', 0x4) - #define BGFX_CHUNK_MAGIC_VSH BX_MAKEFOURCC('V', 'S', 'H', 0x4) - static const char* s_ARB_shader_texture_lod[] = { "texture2DLod", @@ -78,6 +82,13 @@ namespace bgfx NULL }; + static const char* s_EXT_gpu_shader4[] = + { + "gl_VertexID", + "gl_InstanceID", + NULL + }; + static const char* s_ARB_gpu_shader5[] = { "bitfieldReverse", @@ -139,13 +150,84 @@ namespace bgfx }; BX_STATIC_ASSERT(BX_COUNTOF(s_uniformTypeName) == UniformType::Count*2); + + Options::Options() + : shaderType(' ') + , disasm(false) + , raw(false) + , preprocessOnly(false) + , depends(false) + , debugInformation(false) + , avoidFlowControl(false) + , noPreshader(false) + , partialPrecision(false) + , preferFlowControl(false) + , backwardsCompatibility(false) + , warningsAreErrors(false) + , optimize(false) + , optimizationLevel(3) + { + } + + void Options::dump() + { + BX_TRACE("Options:\n" + "\t shaderType: %c\n" + "\t platform: %s\n" + "\t profile: %s\n" + "\t inputFile: %s\n" + "\t outputFile: %s\n" + "\t disasm: %s\n" + "\t raw: %s\n" + "\t preprocessOnly: %s\n" + "\t depends: %s\n" + "\t debugInformation: %s\n" + "\t avoidFlowControl: %s\n" + "\t noPreshader: %s\n" + "\t partialPrecision: %s\n" + "\t preferFlowControl: %s\n" + "\t backwardsCompatibility: %s\n" + "\t warningsAreErrors: %s\n" + "\t optimize: %s\n" + "\t optimizationLevel: %d\n" + + , shaderType + , platform.c_str() + , profile.c_str() + , inputFilePath.c_str() + , outputFilePath.c_str() + , disasm ? "true" : "false" + , raw ? "true" : "false" + , preprocessOnly ? "true" : "false" + , depends ? "true" : "false" + , debugInformation ? "true" : "false" + , avoidFlowControl ? "true" : "false" + , noPreshader ? "true" : "false" + , partialPrecision ? "true" : "false" + , preferFlowControl ? "true" : "false" + , backwardsCompatibility ? "true" : "false" + , warningsAreErrors ? "true" : "false" + , optimize ? "true" : "false" + , optimizationLevel + ); + + for(size_t i=0; i= bx::strnlen(_replace), ""); - for (const char* ptr = bx::strnstr(_str, _find); NULL != ptr; ptr = bx::strnstr(ptr + len, _find) ) + BX_CHECK(len >= bx::strLen(_replace), ""); + for (const char* ptr = bx::strFind(_str, _find) + ; NULL != ptr + ; ptr = bx::strFind(ptr + len, _find) + ) { bx::memCopy(const_cast(ptr), replace, len); } @@ -398,15 +483,22 @@ namespace bgfx { fprintf(stderr, "Code:\n---\n"); - LineReader lr(_code); - for (int32_t line = 1; !lr.isEof() && line < _end; ++line) + bx::Error err; + LineReader reader(_code); + for (int32_t line = 1; err.isOk() && line < _end; ++line) { - if (line >= _start) + char str[4096]; + int32_t len = bx::read(&reader, str, BX_COUNTOF(str), &err); + + if (err.isOk() + && line >= _start) { + std::string strLine(str, len); + if (_line == line) { fprintf(stderr, "\n"); - fprintf(stderr, ">>> %3d: %s", line, lr.getLine().c_str() ); + fprintf(stderr, ">>> %3d: %s", line, strLine.c_str() ); if (-1 != _column) { fprintf(stderr, ">>> %3d: %*s\n", _column, _column, "^"); @@ -415,13 +507,9 @@ namespace bgfx } else { - fprintf(stderr, " %3d: %s", line, lr.getLine().c_str() ); + fprintf(stderr, " %3d: %s", line, strLine.c_str() ); } } - else - { - lr.skipLine(); - } } fprintf(stderr, "---\n"); @@ -429,7 +517,7 @@ namespace bgfx void writeFile(const char* _filePath, const void* _data, int32_t _size) { - bx::CrtFileWriter out; + bx::FileWriter out; if (bx::open(&out, _filePath) ) { bx::write(&out, _data, _size); @@ -517,9 +605,9 @@ namespace bgfx { char* start = scratch(_includeDir); - for (char* split = const_cast(bx::strnchr(start, ';') ) + for (char* split = const_cast(bx::strFind(start, ';') ) ; NULL != split - ; split = const_cast(bx::strnchr(start, ';') ) + ; split = const_cast(bx::strFind(start, ';') ) ) { *split = '\0'; @@ -548,7 +636,7 @@ namespace bgfx m_input = m_default; m_input += "\n\n"; - int32_t len = bx::strnlen(_input)+1; + int32_t len = bx::strLen(_input)+1; char* temp = new char[len]; bx::eolLF(temp, len, _input); m_input += temp; @@ -609,8 +697,8 @@ namespace bgfx char* scratch(const char* _str) { char* result = &m_scratch[m_scratchPos]; - strcpy(result, _str); - m_scratchPos += (uint32_t)strlen(_str)+1; + bx::strCopy(result, uint32_t(sizeof(m_scratch)-m_scratchPos), _str); + m_scratchPos += (uint32_t)bx::strLen(_str)+1; return result; } @@ -691,6 +779,15 @@ namespace bgfx strReplace(_data, find, "bgfx_VoidFrag"); } + const char* baseName(const char* _filePath) + { + bx::FilePath fp(_filePath); + char tmp[bx::kMaxFilePath]; + bx::strCopy(tmp, BX_COUNTOF(tmp), fp.getFileName() ); + const char* base = bx::strFind(_filePath, tmp); + return base; + } + // c - compute // d - domain // f - fragment @@ -718,9 +815,12 @@ namespace bgfx } fprintf(stderr - , "shaderc, bgfx shader compiler tool\n" - "Copyright 2011-2017 Branimir Karadzic. All rights reserved.\n" + , "shaderc, bgfx shader compiler tool, version %d.%d.%d.\n" + "Copyright 2011-2018 Branimir Karadzic. All rights reserved.\n" "License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n\n" + , BGFX_SHADERC_VERSION_MAJOR + , BGFX_SHADERC_VERSION_MINOR + , BGFX_API_VERSION ); fprintf(stderr @@ -728,6 +828,8 @@ namespace bgfx "\n" "Options:\n" + " -h, --help Help.\n" + " -v, --version Version information only.\n" " -f Input file path.\n" " -i Include path (for multiple paths use use -i multiple times).\n" " -o Output file path.\n" @@ -763,47 +865,9 @@ namespace bgfx ); } - int compileShader(int _argc, const char* _argv[]) + + bool compileShader(const char* _varying, char* _shader, uint32_t _shaderLen, Options& _options, bx::FileWriter* _writer) { - bx::CommandLine cmdLine(_argc, _argv); - - if (cmdLine.hasArg('h', "help") ) - { - help(); - return EXIT_FAILURE; - } - - g_verbose = cmdLine.hasArg("verbose"); - - const char* filePath = cmdLine.findOption('f'); - if (NULL == filePath) - { - help("Shader file name must be specified."); - return EXIT_FAILURE; - } - - const char* outFilePath = cmdLine.findOption('o'); - if (NULL == outFilePath) - { - help("Output file name must be specified."); - return EXIT_FAILURE; - } - - const char* type = cmdLine.findOption('\0', "type"); - if (NULL == type) - { - help("Must specify shader type."); - return EXIT_FAILURE; - } - - const char* platform = cmdLine.findOption('\0', "platform"); - if (NULL == platform) - { - platform = ""; - } - - bool raw = cmdLine.hasArg('\0', "raw"); - uint32_t glsl = 0; uint32_t essl = 0; uint32_t hlsl = 0; @@ -811,35 +875,35 @@ namespace bgfx uint32_t metal = 0; uint32_t pssl = 0; uint32_t spirv = 0; - const char* profile = cmdLine.findOption('p', "profile"); - if (NULL != profile) + const char* profile = _options.profile.c_str(); + if ('\0' != profile[0]) { - if (0 == bx::strncmp(&profile[1], "s_4_0_level", 11) ) + if (0 == bx::strCmp(&profile[1], "s_4_0_level", 11) ) { hlsl = 2; } - else if (0 == bx::strncmp(&profile[1], "s_3", 3) ) + else if (0 == bx::strCmp(&profile[1], "s_3", 3) ) { hlsl = 3; d3d = 9; } - else if (0 == bx::strncmp(&profile[1], "s_4", 3) ) + else if (0 == bx::strCmp(&profile[1], "s_4", 3) ) { hlsl = 4; } - else if (0 == bx::strncmp(&profile[1], "s_5", 3) ) + else if (0 == bx::strCmp(&profile[1], "s_5", 3) ) { hlsl = 5; } - else if (0 == bx::strncmp(profile, "metal") ) + else if (0 == bx::strCmp(profile, "metal") ) { metal = 1; } - else if (0 == bx::strncmp(profile, "pssl") ) + else if (0 == bx::strCmp(profile, "pssl") ) { pssl = 1; } - else if (0 == bx::strncmp(profile, "spirv") ) + else if (0 == bx::strCmp(profile, "spirv") ) { spirv = 1; } @@ -853,84 +917,24 @@ namespace bgfx essl = 2; } - const char* bin2c = NULL; - if (cmdLine.hasArg("bin2c") ) - { - bin2c = cmdLine.findOption("bin2c"); - if (NULL == bin2c) - { - bin2c = bx::baseName(outFilePath); - uint32_t len = (uint32_t)strlen(bin2c); - char* temp = (char*)alloca(len+1); - for (char *out = temp; *bin2c != '\0';) - { - char ch = *bin2c++; - if (isalnum(ch) ) - { - *out++ = ch; - } - else - { - *out++ = '_'; - } - } - temp[len] = '\0'; + Preprocessor preprocessor(_options.inputFilePath.c_str(), 0 != essl); - bin2c = temp; - } - } + for(size_t i=0; i<_options.includeDirs.size(); ++i) + preprocessor.addInclude(_options.includeDirs[i].c_str()); - bool depends = cmdLine.hasArg("depends"); - bool preprocessOnly = cmdLine.hasArg("preprocess"); - const char* includeDir = cmdLine.findOption('i'); + for(size_t i=0; i<_options.defines.size(); ++i) + preprocessor.setDefine(_options.defines[i].c_str()); - BX_TRACE("depends: %d", depends); - BX_TRACE("preprocessOnly: %d", preprocessOnly); - BX_TRACE("includeDir: %s", includeDir); - - Preprocessor preprocessor(filePath, 0 != essl); - - for (int ii = 1; NULL != includeDir; ++ii) - { - preprocessor.addInclude(includeDir); - includeDir = cmdLine.findOption(ii, 'i'); - } - - std::string dir; - { - const char* base = bx::baseName(filePath); - - if (base != filePath) - { - dir.assign(filePath, base-filePath); - preprocessor.addInclude(dir.c_str() ); - } - } - - const char* defines = cmdLine.findOption("define"); - while (NULL != defines - && '\0' != *defines) - { - defines = bx::strws(defines); - const char* eol = bx::strnchr(defines, ';'); - if (NULL == eol) - { - eol = defines + strlen(defines); - } - std::string define(defines, eol); - preprocessor.setDefine(define.c_str() ); - defines = ';' == *eol ? eol+1 : eol; - } + for(size_t i=0; i<_options.dependencies.size(); ++i) + preprocessor.addDependency(_options.dependencies[i].c_str()); preprocessor.setDefaultDefine("BX_PLATFORM_ANDROID"); preprocessor.setDefaultDefine("BX_PLATFORM_EMSCRIPTEN"); preprocessor.setDefaultDefine("BX_PLATFORM_IOS"); preprocessor.setDefaultDefine("BX_PLATFORM_LINUX"); - preprocessor.setDefaultDefine("BX_PLATFORM_NACL"); preprocessor.setDefaultDefine("BX_PLATFORM_OSX"); preprocessor.setDefaultDefine("BX_PLATFORM_PS4"); preprocessor.setDefaultDefine("BX_PLATFORM_WINDOWS"); - preprocessor.setDefaultDefine("BX_PLATFORM_XBOX360"); preprocessor.setDefaultDefine("BX_PLATFORM_XBOXONE"); // preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_ESSL"); @@ -950,22 +954,24 @@ namespace bgfx , essl ? 1 : glsl ); - if (0 == bx::strincmp(platform, "android") ) + const char* platform = _options.platform.c_str(); + + if (0 == bx::strCmpI(platform, "android") ) { preprocessor.setDefine("BX_PLATFORM_ANDROID=1"); preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); } - else if (0 == bx::strincmp(platform, "asm.js") ) + else if (0 == bx::strCmpI(platform, "asm.js") ) { preprocessor.setDefine("BX_PLATFORM_EMSCRIPTEN=1"); preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); } - else if (0 == bx::strincmp(platform, "ios") ) + else if (0 == bx::strCmpI(platform, "ios") ) { preprocessor.setDefine("BX_PLATFORM_IOS=1"); preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); } - else if (0 == bx::strincmp(platform, "linux") ) + else if (0 == bx::strCmpI(platform, "linux") ) { preprocessor.setDefine("BX_PLATFORM_LINUX=1"); if (0 != spirv) @@ -977,12 +983,7 @@ namespace bgfx preprocessor.setDefine(glslDefine); } } - else if (0 == bx::strincmp(platform, "nacl") ) - { - preprocessor.setDefine("BX_PLATFORM_NACL=1"); - preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); - } - else if (0 == bx::strincmp(platform, "osx") ) + else if (0 == bx::strCmpI(platform, "osx") ) { preprocessor.setDefine("BX_PLATFORM_OSX=1"); preprocessor.setDefine(glslDefine); @@ -990,19 +991,14 @@ namespace bgfx bx::snprintf(temp, sizeof(temp), "BGFX_SHADER_LANGUAGE_METAL=%d", metal); preprocessor.setDefine(temp); } - else if (0 == bx::strincmp(platform, "windows") ) + else if (0 == bx::strCmpI(platform, "windows") ) { preprocessor.setDefine("BX_PLATFORM_WINDOWS=1"); char temp[256]; bx::snprintf(temp, sizeof(temp), "BGFX_SHADER_LANGUAGE_HLSL=%d", hlsl); preprocessor.setDefine(temp); } - else if (0 == bx::strincmp(platform, "xbox360") ) - { - preprocessor.setDefine("BX_PLATFORM_XBOX360=1"); - preprocessor.setDefine("BGFX_SHADER_LANGUAGE_HLSL=3"); - } - else if (0 == bx::strincmp(platform, "orbis") ) + else if (0 == bx::strCmpI(platform, "orbis") ) { preprocessor.setDefine("BX_PLATFORM_PS4=1"); preprocessor.setDefine("BGFX_SHADER_LANGUAGE_PSSL=1"); @@ -1011,8 +1007,7 @@ namespace bgfx preprocessor.setDefine("M_PI=3.1415926535897932384626433832795"); - char shaderType = bx::toLower(type[0]); - switch (shaderType) + switch (_options.shaderType) { case 'c': preprocessor.setDefine("BGFX_SHADER_TYPE_COMPUTE=1"); @@ -1027,456 +1022,506 @@ namespace bgfx break; default: - fprintf(stderr, "Unknown type: %s?!", type); - return EXIT_FAILURE; + fprintf(stderr, "Unknown type: %c?!", _options.shaderType); + return false; } bool compiled = false; - bx::CrtFileReader reader; - if (!bx::open(&reader, filePath) ) - { - fprintf(stderr, "Unable to open file '%s'.\n", filePath); - } - else - { - VaryingMap varyingMap; + VaryingMap varyingMap; + const char* parse = _varying; - std::string defaultVarying = dir + "varying.def.sc"; - const char* varyingdef = cmdLine.findOption("varyingdef", defaultVarying.c_str() ); - File attribdef(varyingdef); - const char* parse = attribdef.getData(); - if (NULL != parse + while (NULL != parse && *parse != '\0') + { + parse = bx::strws(parse); + const char* eol = bx::strFind(parse, ';'); + if (NULL == eol) { - preprocessor.addDependency(varyingdef); + eol = bx::streol(parse); + } + + if (NULL != eol) + { + const char* precision = NULL; + const char* interpolation = NULL; + const char* typen = parse; + + if (0 == bx::strCmp(typen, "lowp", 4) + || 0 == bx::strCmp(typen, "mediump", 7) + || 0 == bx::strCmp(typen, "highp", 5) ) + { + precision = typen; + typen = parse = bx::strws(bx::strSkipWord(parse) ); + } + + if (0 == bx::strCmp(typen, "flat", 4) + || 0 == bx::strCmp(typen, "smooth", 6) + || 0 == bx::strCmp(typen, "noperspective", 13) + || 0 == bx::strCmp(typen, "centroid", 8) ) + { + interpolation = typen; + typen = parse = bx::strws(bx::strSkipWord(parse) ); + } + + const char* name = parse = bx::strws(bx::strSkipWord(parse) ); + const char* column = parse = bx::strws(bx::strSkipWord(parse) ); + const char* semantics = parse = bx::strws( (*parse == ':' ? ++parse : parse) ); + const char* assign = parse = bx::strws(bx::strSkipWord(parse) ); + const char* init = parse = bx::strws( (*parse == '=' ? ++parse : parse) ); + + if (typen < eol + && name < eol + && column < eol + && ':' == *column + && semantics < eol) + { + Varying var; + if (NULL != precision) + { + var.m_precision.assign(precision, bx::strSkipWord(precision)-precision); + } + + if (NULL != interpolation) + { + var.m_interpolation.assign(interpolation, bx::strSkipWord(interpolation)-interpolation); + } + + var.m_type.assign(typen, bx::strSkipWord(typen)-typen); + var.m_name.assign(name, bx::strSkipWord(name)-name); + var.m_semantics.assign(semantics, bx::strSkipWord(semantics)-semantics); + + if (d3d == 9 + && var.m_semantics == "BITANGENT") + { + var.m_semantics = "BINORMAL"; + } + + if (assign < eol + && '=' == *assign + && init < eol) + { + var.m_init.assign(init, eol-init); + } + + varyingMap.insert(std::make_pair(var.m_name, var) ); + } + + parse = bx::strws(bx::strnl(eol) ); + } + } + + bool raw = _options.raw; + + InOut shaderInputs; + InOut shaderOutputs; + uint32_t inputHash = 0; + uint32_t outputHash = 0; + + char* data; + char* input; + { + data = _shader; + uint32_t size = _shaderLen; + + const size_t padding = 4096; + + if (!raw) + { + // To avoid commented code being recognized as used feature, + // first preprocess pass is used to strip all comments before + // substituting code. + preprocessor.run(data); + delete [] data; + + size = (uint32_t)preprocessor.m_preprocessed.size(); + data = new char[size+padding+1]; + bx::memCopy(data, preprocessor.m_preprocessed.c_str(), size); + bx::memSet(&data[size], 0, padding+1); + } + + strNormalizeEol(data); + + input = const_cast(bx::strws(data) ); + while (input[0] == '$') + { + const char* str = bx::strws(input+1); + const char* eol = bx::streol(str); + const char* nl = bx::strnl(eol); + input = const_cast(nl); + + if (0 == bx::strCmp(str, "input", 5) ) + { + str += 5; + const char* comment = bx::strFind(str, "//"); + eol = NULL != comment && comment < eol ? comment : eol; + inputHash = parseInOut(shaderInputs, str, eol); + } + else if (0 == bx::strCmp(str, "output", 6) ) + { + str += 6; + const char* comment = bx::strFind(str, "//"); + eol = NULL != comment && comment < eol ? comment : eol; + outputHash = parseInOut(shaderOutputs, str, eol); + } + else if (0 == bx::strCmp(str, "raw", 3) ) + { + raw = true; + str += 3; + } + + input = const_cast(bx::strws(input) ); + } + } + + if (raw) + { + if ('f' == _options.shaderType) + { + bx::write(_writer, BGFX_CHUNK_MAGIC_FSH); + bx::write(_writer, inputHash); + } + else if ('v' == _options.shaderType) + { + bx::write(_writer, BGFX_CHUNK_MAGIC_VSH); + bx::write(_writer, outputHash); } else { - fprintf(stderr, "ERROR: Failed to parse varying def file: \"%s\" No input/output semantics will be generated in the code!\n", varyingdef); + bx::write(_writer, BGFX_CHUNK_MAGIC_CSH); + bx::write(_writer, outputHash); } - while (NULL != parse - && *parse != '\0') + if (0 != glsl) { - parse = bx::strws(parse); - const char* eol = bx::strnchr(parse, ';'); - if (NULL == eol) - { - eol = bx::streol(parse); - } + bx::write(_writer, uint16_t(0) ); - if (NULL != eol) - { - const char* precision = NULL; - const char* interpolation = NULL; - const char* typen = parse; + uint32_t shaderSize = (uint32_t)bx::strLen(input); + bx::write(_writer, shaderSize); + bx::write(_writer, input, shaderSize); + bx::write(_writer, uint8_t(0) ); - if (0 == bx::strncmp(typen, "lowp", 4) - || 0 == bx::strncmp(typen, "mediump", 7) - || 0 == bx::strncmp(typen, "highp", 5) ) - { - precision = typen; - typen = parse = bx::strws(bx::strword(parse) ); - } - - if (0 == bx::strncmp(typen, "flat", 4) - || 0 == bx::strncmp(typen, "smooth", 6) - || 0 == bx::strncmp(typen, "noperspective", 13) - || 0 == bx::strncmp(typen, "centroid", 8) ) - { - interpolation = typen; - typen = parse = bx::strws(bx::strword(parse) ); - } - - const char* name = parse = bx::strws(bx::strword(parse) ); - const char* column = parse = bx::strws(bx::strword(parse) ); - const char* semantics = parse = bx::strws( (*parse == ':' ? ++parse : parse) ); - const char* assign = parse = bx::strws(bx::strword(parse) ); - const char* init = parse = bx::strws( (*parse == '=' ? ++parse : parse) ); - - if (typen < eol - && name < eol - && column < eol - && ':' == *column - && semantics < eol) - { - Varying var; - if (NULL != precision) - { - var.m_precision.assign(precision, bx::strword(precision)-precision); - } - - if (NULL != interpolation) - { - var.m_interpolation.assign(interpolation, bx::strword(interpolation)-interpolation); - } - - var.m_type.assign(typen, bx::strword(typen)-typen); - var.m_name.assign(name, bx::strword(name)-name); - var.m_semantics.assign(semantics, bx::strword(semantics)-semantics); - - if (d3d == 9 - && var.m_semantics == "BITANGENT") - { - var.m_semantics = "BINORMAL"; - } - - if (assign < eol - && '=' == *assign - && init < eol) - { - var.m_init.assign(init, eol-init); - } - - varyingMap.insert(std::make_pair(var.m_name, var) ); - } - - parse = bx::strws(bx::strnl(eol) ); - } + compiled = true; } - - InOut shaderInputs; - InOut shaderOutputs; - uint32_t inputHash = 0; - uint32_t outputHash = 0; - - char* data; - char* input; + else if (0 != pssl) { - const size_t padding = 4096; - uint32_t size = (uint32_t)bx::getSize(&reader); - data = new char[size+padding+1]; - size = (uint32_t)bx::read(&reader, data, size); - - if (data[0] == '\xef' - && data[1] == '\xbb' - && data[2] == '\xbf') - { - memmove(data, &data[3], size-3); - size -= 3; - } - - // Compiler generates "error X3000: syntax error: unexpected end of file" - // if input doesn't have empty line at EOF. - data[size] = '\n'; - memset(&data[size+1], 0, padding); - bx::close(&reader); - - if (!raw) - { - // To avoid commented code being recognized as used feature, - // first preprocess pass is used to strip all comments before - // substituting code. - preprocessor.run(data); - delete [] data; - - size = (uint32_t)preprocessor.m_preprocessed.size(); - data = new char[size+padding+1]; - memcpy(data, preprocessor.m_preprocessed.c_str(), size); - memset(&data[size], 0, padding+1); - } - - strNormalizeEol(data); - - input = const_cast(bx::strws(data) ); - while (input[0] == '$') - { - const char* str = bx::strws(input+1); - const char* eol = bx::streol(str); - const char* nl = bx::strnl(eol); - input = const_cast(nl); - - if (0 == bx::strncmp(str, "input", 5) ) - { - str += 5; - const char* comment = bx::strnstr(str, "//"); - eol = NULL != comment && comment < eol ? comment : eol; - inputHash = parseInOut(shaderInputs, str, eol); - } - else if (0 == bx::strncmp(str, "output", 6) ) - { - str += 6; - const char* comment = bx::strnstr(str, "//"); - eol = NULL != comment && comment < eol ? comment : eol; - outputHash = parseInOut(shaderOutputs, str, eol); - } - else if (0 == bx::strncmp(str, "raw", 3) ) - { - raw = true; - str += 3; - } - - input = const_cast(bx::strws(input) ); - } + compiled = compilePSSLShader(_options, 0, input, _writer); } - - if (raw) + else { - bx::CrtFileWriter* writer = NULL; - - if (NULL != bin2c) + compiled = compileHLSLShader(_options, d3d, input, _writer); + } + } + else if ('c' == _options.shaderType) // Compute + { + char* entry = const_cast(bx::strFind(input, "void main()") ); + if (NULL == entry) + { + fprintf(stderr, "Shader entry point 'void main()' is not found.\n"); + } + else + { + if (0 != glsl + || 0 != essl + || 0 != metal) { - writer = new Bin2cWriter(bin2c); } else { - writer = new bx::CrtFileWriter; - } + preprocessor.writef( + "#define lowp\n" + "#define mediump\n" + "#define highp\n" + "#define ivec2 int2\n" + "#define ivec3 int3\n" + "#define ivec4 int4\n" + "#define uvec2 uint2\n" + "#define uvec3 uint3\n" + "#define uvec4 uint4\n" + "#define vec2 float2\n" + "#define vec3 float3\n" + "#define vec4 float4\n" + "#define mat2 float2x2\n" + "#define mat3 float3x3\n" + "#define mat4 float4x4\n" + ); - if (!bx::open(writer, outFilePath) ) - { - fprintf(stderr, "Unable to open output file '%s'.", outFilePath); - return EXIT_FAILURE; - } + entry[4] = '_'; - if ('f' == shaderType) - { - bx::write(writer, BGFX_CHUNK_MAGIC_FSH); - bx::write(writer, inputHash); - } - else if ('v' == shaderType) - { - bx::write(writer, BGFX_CHUNK_MAGIC_VSH); - bx::write(writer, outputHash); - } - else - { - bx::write(writer, BGFX_CHUNK_MAGIC_CSH); - bx::write(writer, outputHash); - } + preprocessor.writef("#define void_main()"); + preprocessor.writef(" \\\n\tvoid main("); - if (0 != glsl) - { - bx::write(writer, uint16_t(0) ); + uint32_t arg = 0; - uint32_t shaderSize = (uint32_t)strlen(input); - bx::write(writer, shaderSize); - bx::write(writer, input, shaderSize); - bx::write(writer, uint8_t(0) ); + const bool hasLocalInvocationID = NULL != bx::strFind(input, "gl_LocalInvocationID"); + const bool hasLocalInvocationIndex = NULL != bx::strFind(input, "gl_LocalInvocationIndex"); + const bool hasGlobalInvocationID = NULL != bx::strFind(input, "gl_GlobalInvocationID"); + const bool hasWorkGroupID = NULL != bx::strFind(input, "gl_WorkGroupID"); - compiled = true; - } - else if (0 != pssl) - { - compiled = compilePSSLShader(cmdLine, 0, input, writer); - } - else - { - compiled = compileHLSLShader(cmdLine, d3d, input, writer); - } - - bx::close(writer); - delete writer; - } - else if ('c' == shaderType) // Compute - { - char* entry = const_cast(bx::strnstr(input, "void main()") ); - if (NULL == entry) - { - fprintf(stderr, "Shader entry point 'void main()' is not found.\n"); - } - else - { - if (0 != glsl - || 0 != essl - || 0 != metal) - { - } - else + if (hasLocalInvocationID) { preprocessor.writef( - "#define lowp\n" - "#define mediump\n" - "#define highp\n" - "#define ivec2 int2\n" - "#define ivec3 int3\n" - "#define ivec4 int4\n" - "#define uvec2 uint2\n" - "#define uvec3 uint3\n" - "#define uvec4 uint4\n" - "#define vec2 float2\n" - "#define vec3 float3\n" - "#define vec4 float4\n" - "#define mat2 float2x2\n" - "#define mat3 float3x3\n" - "#define mat4 float4x4\n" + " \\\n\t%sint3 gl_LocalInvocationID : SV_GroupThreadID" + , arg++ > 0 ? ", " : " " ); + } - entry[4] = '_'; + if (hasLocalInvocationIndex) + { + preprocessor.writef( + " \\\n\t%sint gl_LocalInvocationIndex : SV_GroupIndex" + , arg++ > 0 ? ", " : " " + ); + } + + if (hasGlobalInvocationID) + { + preprocessor.writef( + " \\\n\t%sint3 gl_GlobalInvocationID : SV_DispatchThreadID" + , arg++ > 0 ? ", " : " " + ); + } + + if (hasWorkGroupID) + { + preprocessor.writef( + " \\\n\t%sint3 gl_WorkGroupID : SV_GroupID" + , arg++ > 0 ? ", " : " " + ); + } + + preprocessor.writef( + " \\\n\t)\n" + ); + } + + if (preprocessor.run(input) ) + { + //BX_TRACE("Input file: %s", filePath); + //BX_TRACE("Output file: %s", outFilePath); + + if (_options.preprocessOnly) + { + bx::write(_writer, preprocessor.m_preprocessed.c_str(), (int32_t)preprocessor.m_preprocessed.size() ); + + return true; + } + + { + bx::write(_writer, BGFX_CHUNK_MAGIC_CSH); + bx::write(_writer, outputHash); + + if (0 != glsl + || 0 != essl) + { + std::string code; + + if (essl) + { + bx::stringPrintf(code, "#version 310 es\n"); + } + else + { + bx::stringPrintf(code, "#version %d\n", glsl == 0 ? 430 : glsl); + } + + code += preprocessor.m_preprocessed; +#if 1 + bx::write(_writer, uint16_t(0) ); + + uint32_t shaderSize = (uint32_t)code.size(); + bx::write(_writer, shaderSize); + bx::write(_writer, code.c_str(), shaderSize); + bx::write(_writer, uint8_t(0) ); + + compiled = true; +#else + compiled = compileGLSLShader(cmdLine, essl, code, writer); +#endif // 0 + } + else if (0 != spirv) + { + compiled = compileSPIRVShader(_options, 0, preprocessor.m_preprocessed, _writer); + } + else if (0 != pssl) + { + compiled = compilePSSLShader(_options, 0, preprocessor.m_preprocessed, _writer); + } + else + { + compiled = compileHLSLShader(_options, d3d, preprocessor.m_preprocessed, _writer); + } + } + + if (compiled) + { + if (_options.depends) + { + std::string ofp = _options.outputFilePath; + ofp += ".d"; + bx::FileWriter writer; + if (bx::open(&writer, ofp.c_str() ) ) + { + writef(&writer, "%s : %s\n", _options.outputFilePath.c_str(), preprocessor.m_depends.c_str() ); + bx::close(&writer); + } + } + } + } + } + } + else // Vertex/Fragment + { + char* entry = const_cast(bx::strFind(input, "void main()") ); + if (NULL == entry) + { + fprintf(stderr, "Shader entry point 'void main()' is not found.\n"); + } + else + { + if (0 != glsl + || 0 != essl + || 0 != metal) + { + if (0 == essl) + { + // bgfx shadow2D/Proj behave like EXT_shadow_samplers + // not as GLSL language 1.2 specs shadow2D/Proj. + preprocessor.writef( + "#define shadow2D(_sampler, _coord) bgfxShadow2D(_sampler, _coord).x\n" + "#define shadow2DProj(_sampler, _coord) bgfxShadow2DProj(_sampler, _coord).x\n" + ); + } + + for (InOut::const_iterator it = shaderInputs.begin(), itEnd = shaderInputs.end(); it != itEnd; ++it) + { + VaryingMap::const_iterator varyingIt = varyingMap.find(*it); + if (varyingIt != varyingMap.end() ) + { + const Varying& var = varyingIt->second; + const char* name = var.m_name.c_str(); + + if (0 == bx::strCmp(name, "a_", 2) + || 0 == bx::strCmp(name, "i_", 2) ) + { + preprocessor.writef("attribute %s %s %s %s;\n" + , var.m_precision.c_str() + , var.m_interpolation.c_str() + , var.m_type.c_str() + , name + ); + } + else + { + preprocessor.writef("%s varying %s %s %s;\n" + , var.m_interpolation.c_str() + , var.m_precision.c_str() + , var.m_type.c_str() + , name + ); + } + } + } + + for (InOut::const_iterator it = shaderOutputs.begin(), itEnd = shaderOutputs.end(); it != itEnd; ++it) + { + VaryingMap::const_iterator varyingIt = varyingMap.find(*it); + if (varyingIt != varyingMap.end() ) + { + const Varying& var = varyingIt->second; + preprocessor.writef("%s varying %s %s;\n" + , var.m_interpolation.c_str() + , var.m_type.c_str() + , var.m_name.c_str() + ); + } + } + } + else + { + preprocessor.writef( + "#define lowp\n" + "#define mediump\n" + "#define highp\n" + "#define ivec2 int2\n" + "#define ivec3 int3\n" + "#define ivec4 int4\n" + "#define uvec2 uint2\n" + "#define uvec3 uint3\n" + "#define uvec4 uint4\n" + "#define vec2 float2\n" + "#define vec3 float3\n" + "#define vec4 float4\n" + "#define mat2 float2x2\n" + "#define mat3 float3x3\n" + "#define mat4 float4x4\n" + ); + + if (hlsl != 0 + && hlsl < 4) + { + preprocessor.writef( + "#define centroid\n" + "#define flat\n" + "#define noperspective\n" + "#define smooth\n" + ); + } + + entry[4] = '_'; + + if ('f' == _options.shaderType) + { + const char* insert = bx::strFind(entry, "{"); + if (NULL != insert) + { + insert = strInsert(const_cast(insert+1), "\nvec4 bgfx_VoidFrag = vec4_splat(0.0);\n"); + } + + const bool hasFragColor = NULL != bx::strFind(input, "gl_FragColor"); + const bool hasFragCoord = NULL != bx::strFind(input, "gl_FragCoord") || hlsl > 3 || hlsl == 2; + const bool hasFragDepth = NULL != bx::strFind(input, "gl_FragDepth"); + const bool hasFrontFacing = NULL != bx::strFind(input, "gl_FrontFacing"); + const bool hasPrimitiveId = NULL != bx::strFind(input, "gl_PrimitiveID"); + + bool hasFragData[8] = {}; + uint32_t numFragData = 0; + for (uint32_t ii = 0; ii < BX_COUNTOF(hasFragData); ++ii) + { + char temp[32]; + bx::snprintf(temp, BX_COUNTOF(temp), "gl_FragData[%d]", ii); + hasFragData[ii] = NULL != bx::strFind(input, temp); + numFragData += hasFragData[ii]; + } + + if (0 == numFragData) + { + // GL errors when both gl_FragColor and gl_FragData is used. + // This will trigger the same error with HLSL compiler too. + preprocessor.writef("#define gl_FragColor gl_FragData_0_\n"); + + // If it has gl_FragData or gl_FragColor, color target at + // index 0 exists, otherwise shader is not modifying color + // targets. + hasFragData[0] |= hasFragColor || d3d < 11; + + if (NULL != insert + && d3d < 11 + && !hasFragColor) + { + insert = strInsert(const_cast(insert+1), "\ngl_FragColor = bgfx_VoidFrag;\n"); + } + } preprocessor.writef("#define void_main()"); preprocessor.writef(" \\\n\tvoid main("); uint32_t arg = 0; - const bool hasLocalInvocationID = NULL != bx::strnstr(input, "gl_LocalInvocationID"); - const bool hasLocalInvocationIndex = NULL != bx::strnstr(input, "gl_LocalInvocationIndex"); - const bool hasGlobalInvocationID = NULL != bx::strnstr(input, "gl_GlobalInvocationID"); - const bool hasWorkGroupID = NULL != bx::strnstr(input, "gl_WorkGroupID"); - - if (hasLocalInvocationID) + if (hasFragCoord) { - preprocessor.writef( - " \\\n\t%sint3 gl_LocalInvocationID : SV_GroupThreadID" - , arg++ > 0 ? ", " : " " - ); - } - - if (hasLocalInvocationIndex) - { - preprocessor.writef( - " \\\n\t%sint gl_LocalInvocationIndex : SV_GroupIndex" - , arg++ > 0 ? ", " : " " - ); - } - - if (hasGlobalInvocationID) - { - preprocessor.writef( - " \\\n\t%sint3 gl_GlobalInvocationID : SV_DispatchThreadID" - , arg++ > 0 ? ", " : " " - ); - } - - if (hasWorkGroupID) - { - preprocessor.writef( - " \\\n\t%sint3 gl_WorkGroupID : SV_GroupID" - , arg++ > 0 ? ", " : " " - ); - } - - preprocessor.writef( - " \\\n\t)\n" - ); - } - - if (preprocessor.run(input) ) - { - BX_TRACE("Input file: %s", filePath); - BX_TRACE("Output file: %s", outFilePath); - - if (preprocessOnly) - { - bx::CrtFileWriter writer; - - if (!bx::open(&writer, outFilePath) ) - { - fprintf(stderr, "Unable to open output file '%s'.", outFilePath); - return EXIT_FAILURE; - } - - bx::write(&writer, preprocessor.m_preprocessed.c_str(), (int32_t)preprocessor.m_preprocessed.size() ); - bx::close(&writer); - - return EXIT_SUCCESS; - } - - { - bx::CrtFileWriter* writer = NULL; - - if (NULL != bin2c) - { - writer = new Bin2cWriter(bin2c); - } - else - { - writer = new bx::CrtFileWriter; - } - - if (!bx::open(writer, outFilePath) ) - { - fprintf(stderr, "Unable to open output file '%s'.", outFilePath); - return EXIT_FAILURE; - } - - bx::write(writer, BGFX_CHUNK_MAGIC_CSH); - bx::write(writer, outputHash); - - if (0 != glsl - || 0 != essl) - { - std::string code; - - if (essl) - { - bx::stringPrintf(code, "#version 310 es\n"); - } - else - { - bx::stringPrintf(code, "#version %d\n", glsl == 0 ? 430 : glsl); - } - - code += preprocessor.m_preprocessed; - #if 1 - bx::write(writer, uint16_t(0) ); - - uint32_t shaderSize = (uint32_t)code.size(); - bx::write(writer, shaderSize); - bx::write(writer, code.c_str(), shaderSize); - bx::write(writer, uint8_t(0) ); - - compiled = true; - #else - compiled = compileGLSLShader(cmdLine, essl, code, writer); - #endif // 0 - } - else if (0 != spirv) - { - compiled = compileSPIRVShader(cmdLine, 0, preprocessor.m_preprocessed, writer); - } - else if (0 != pssl) - { - compiled = compilePSSLShader(cmdLine, 0, preprocessor.m_preprocessed, writer); - } - else - { - compiled = compileHLSLShader(cmdLine, d3d, preprocessor.m_preprocessed, writer); - } - - bx::close(writer); - delete writer; - } - - if (compiled) - { - if (depends) - { - std::string ofp = outFilePath; - ofp += ".d"; - bx::CrtFileWriter writer; - if (bx::open(&writer, ofp.c_str() ) ) - { - writef(&writer, "%s : %s\n", outFilePath, preprocessor.m_depends.c_str() ); - bx::close(&writer); - } - } - } - } - } - } - else // Vertex/Fragment - { - char* entry = const_cast(bx::strnstr(input, "void main()") ); - if (NULL == entry) - { - fprintf(stderr, "Shader entry point 'void main()' is not found.\n"); - } - else - { - if (0 != glsl - || 0 != essl - || 0 != metal) - { - if (0 == essl) - { - // bgfx shadow2D/Proj behave like EXT_shadow_samplers - // not as GLSL language 1.2 specs shadow2D/Proj. - preprocessor.writef( - "#define shadow2D(_sampler, _coord) bgfxShadow2D(_sampler, _coord).x\n" - "#define shadow2DProj(_sampler, _coord) bgfxShadow2DProj(_sampler, _coord).x\n" - ); + preprocessor.writef(" \\\n\tvec4 gl_FragCoord : SV_POSITION"); + ++arg; } for (InOut::const_iterator it = shaderInputs.begin(), itEnd = shaderInputs.end(); it != itEnd; ++it) @@ -1485,378 +1530,281 @@ namespace bgfx if (varyingIt != varyingMap.end() ) { const Varying& var = varyingIt->second; - const char* name = var.m_name.c_str(); - - if (0 == bx::strncmp(name, "a_", 2) - || 0 == bx::strncmp(name, "i_", 2) ) - { - preprocessor.writef("attribute %s %s %s %s;\n" - , var.m_precision.c_str() - , var.m_interpolation.c_str() - , var.m_type.c_str() - , name - ); - } - else - { - preprocessor.writef("%s varying %s %s %s;\n" - , var.m_interpolation.c_str() - , var.m_precision.c_str() - , var.m_type.c_str() - , name - ); - } + preprocessor.writef(" \\\n\t%s%s %s %s : %s" + , arg++ > 0 ? ", " : " " + , interpolationDx11(var.m_interpolation.c_str() ) + , var.m_type.c_str() + , var.m_name.c_str() + , var.m_semantics.c_str() + ); } } + const uint32_t maxRT = d3d > 9 ? BX_COUNTOF(hasFragData) : 4; + + for (uint32_t ii = 0; ii < BX_COUNTOF(hasFragData); ++ii) + { + if (ii < maxRT) + { + if (hasFragData[ii]) + { + addFragData(preprocessor, input, ii, arg++ > 0); + } + } + else + { + voidFragData(input, ii); + } + } + + if (hasFragDepth) + { + preprocessor.writef( + " \\\n\t%sout float gl_FragDepth : SV_DEPTH" + , arg++ > 0 ? ", " : " " + ); + } + + if (hasFrontFacing + && hlsl >= 3) + { + preprocessor.writef( + " \\\n\t%sfloat __vface : VFACE" + , arg++ > 0 ? ", " : " " + ); + } + + if (hasPrimitiveId) + { + if (d3d > 9) + { + preprocessor.writef( + " \\\n\t%suint gl_PrimitiveID : SV_PrimitiveID" + , arg++ > 0 ? ", " : " " + ); + } + else + { + fprintf(stderr, "gl_PrimitiveID builtin is not supported by this D3D9 HLSL.\n"); + return false; + } + } + + preprocessor.writef( + " \\\n\t)\n" + ); + + if (hasFrontFacing) + { + if (hlsl >= 3) + { + preprocessor.writef( + "#define gl_FrontFacing (__vface <= 0.0)\n" + ); + } + else + { + preprocessor.writef( + "#define gl_FrontFacing false\n" + ); + } + } + } + else if ('v' == _options.shaderType) + { + const bool hasVertexId = NULL != bx::strFind(input, "gl_VertexID"); + const bool hasInstanceId = NULL != bx::strFind(input, "gl_InstanceID"); + + const char* brace = bx::strFind(entry, "{"); + if (NULL != brace) + { + const char* end = bx::strmb(brace, '{', '}'); + if (NULL != end) + { + strInsert(const_cast(end), "__RETURN__;\n"); + } + } + + preprocessor.writef( + "struct Output\n" + "{\n" + "\tvec4 gl_Position : SV_POSITION;\n" + "#define gl_Position _varying_.gl_Position\n" + ); + for (InOut::const_iterator it = shaderOutputs.begin(), itEnd = shaderOutputs.end(); it != itEnd; ++it) + { + VaryingMap::const_iterator varyingIt = varyingMap.find(*it); + if (varyingIt != varyingMap.end() ) + { + const Varying& var = varyingIt->second; + preprocessor.writef( + "\t%s %s %s : %s;\n" + , interpolationDx11(var.m_interpolation.c_str() ) + , var.m_type.c_str() + , var.m_name.c_str() + , var.m_semantics.c_str() + ); + preprocessor.writef( + "#define %s _varying_.%s\n" + , var.m_name.c_str() + , var.m_name.c_str() + ); + } + } + preprocessor.writef( + "};\n" + ); + + preprocessor.writef("#define void_main() \\\n"); + preprocessor.writef("Output main("); + uint32_t arg = 0; + for (InOut::const_iterator it = shaderInputs.begin(), itEnd = shaderInputs.end(); it != itEnd; ++it) + { + VaryingMap::const_iterator varyingIt = varyingMap.find(*it); + if (varyingIt != varyingMap.end() ) + { + const Varying& var = varyingIt->second; + preprocessor.writef( + " \\\n\t%s%s %s : %s" + , arg++ > 0 ? ", " : "" + , var.m_type.c_str() + , var.m_name.c_str() + , var.m_semantics.c_str() + ); + } + } + + if (hasVertexId) + { + if (d3d > 9) + { + preprocessor.writef( + " \\\n\t%suint gl_VertexID : SV_VertexID" + , arg++ > 0 ? ", " : " " + ); + } + else + { + fprintf(stderr, "gl_VertexID builtin is not supported by this D3D9 HLSL.\n"); + return false; + } + } + + if (hasInstanceId) + { + if (d3d > 9) + { + preprocessor.writef( + " \\\n\t%suint gl_InstanceID : SV_InstanceID" + , arg++ > 0 ? ", " : " " + ); + } + else + { + fprintf(stderr, "gl_InstanceID builtin is not supported by this D3D9 HLSL.\n"); + return false; + } + } + + preprocessor.writef( + ") \\\n" + "{ \\\n" + "\tOutput _varying_;" + ); + for (InOut::const_iterator it = shaderOutputs.begin(), itEnd = shaderOutputs.end(); it != itEnd; ++it) { VaryingMap::const_iterator varyingIt = varyingMap.find(*it); if (varyingIt != varyingMap.end() ) { const Varying& var = varyingIt->second; - preprocessor.writef("%s varying %s %s;\n" - , var.m_interpolation.c_str() - , var.m_type.c_str() - , var.m_name.c_str() - ); + preprocessor.writef(" \\\n\t%s", var.m_name.c_str() ); + if (!var.m_init.empty() ) + { + preprocessor.writef(" = %s", var.m_init.c_str() ); + } + preprocessor.writef(";"); } } - } - else - { + preprocessor.writef( - "#define lowp\n" - "#define mediump\n" - "#define highp\n" - "#define ivec2 int2\n" - "#define ivec3 int3\n" - "#define ivec4 int4\n" - "#define uvec2 uint2\n" - "#define uvec3 uint3\n" - "#define uvec4 uint4\n" - "#define vec2 float2\n" - "#define vec3 float3\n" - "#define vec4 float4\n" - "#define mat2 float2x2\n" - "#define mat3 float3x3\n" - "#define mat4 float4x4\n" + "\n#define __RETURN__ \\\n" + "\t} \\\n" ); if (hlsl != 0 - && hlsl < 4) + && hlsl <= 3) { - preprocessor.writef( - "#define centroid\n" - "#define flat\n" - "#define noperspective\n" - "#define smooth\n" - ); - } - - entry[4] = '_'; - - if ('f' == shaderType) - { - const char* insert = bx::strnstr(entry, "{"); - if (NULL != insert) - { - insert = strInsert(const_cast(insert+1), "\nvec4 bgfx_VoidFrag = vec4_splat(0.0);\n"); - } - - const bool hasFragColor = NULL != bx::strnstr(input, "gl_FragColor"); - const bool hasFragCoord = NULL != bx::strnstr(input, "gl_FragCoord") || hlsl > 3 || hlsl == 2; - const bool hasFragDepth = NULL != bx::strnstr(input, "gl_FragDepth"); - const bool hasFrontFacing = NULL != bx::strnstr(input, "gl_FrontFacing"); - const bool hasPrimitiveId = NULL != bx::strnstr(input, "gl_PrimitiveID"); - - bool hasFragData[8] = {}; - uint32_t numFragData = 0; - for (uint32_t ii = 0; ii < BX_COUNTOF(hasFragData); ++ii) - { - char temp[32]; - bx::snprintf(temp, BX_COUNTOF(temp), "gl_FragData[%d]", ii); - hasFragData[ii] = NULL != bx::strnstr(input, temp); - numFragData += hasFragData[ii]; - } - - if (0 == numFragData) - { - // GL errors when both gl_FragColor and gl_FragData is used. - // This will trigger the same error with HLSL compiler too. - preprocessor.writef("#define gl_FragColor gl_FragData_0_\n"); - - // If it has gl_FragData or gl_FragColor, color target at - // index 0 exists, otherwise shader is not modifying color - // targets. - hasFragData[0] |= hasFragColor || d3d < 11; - - if (NULL != insert - && d3d < 11 - && !hasFragColor) - { - insert = strInsert(const_cast(insert+1), "\ngl_FragColor = bgfx_VoidFrag;\n"); - } - } - - preprocessor.writef("#define void_main()"); - preprocessor.writef(" \\\n\tvoid main("); - - uint32_t arg = 0; - - if (hasFragCoord) - { - preprocessor.writef(" \\\n\tvec4 gl_FragCoord : SV_POSITION"); - ++arg; - } - - for (InOut::const_iterator it = shaderInputs.begin(), itEnd = shaderInputs.end(); it != itEnd; ++it) - { - VaryingMap::const_iterator varyingIt = varyingMap.find(*it); - if (varyingIt != varyingMap.end() ) - { - const Varying& var = varyingIt->second; - preprocessor.writef(" \\\n\t%s%s %s %s : %s" - , arg++ > 0 ? ", " : " " - , interpolationDx11(var.m_interpolation.c_str() ) - , var.m_type.c_str() - , var.m_name.c_str() - , var.m_semantics.c_str() - ); - } - } - - const uint32_t maxRT = d3d > 9 ? BX_COUNTOF(hasFragData) : 4; - - for (uint32_t ii = 0; ii < BX_COUNTOF(hasFragData); ++ii) - { - if (ii < maxRT) - { - if (hasFragData[ii]) - { - addFragData(preprocessor, input, ii, arg++ > 0); - } - } - else - { - voidFragData(input, ii); - } - } - - if (hasFragDepth) - { - preprocessor.writef( - " \\\n\t%sout float gl_FragDepth : SV_DEPTH" - , arg++ > 0 ? ", " : " " - ); - } - - if (hasFrontFacing - && hlsl >= 3) - { - preprocessor.writef( - " \\\n\t%sfloat __vface : VFACE" - , arg++ > 0 ? ", " : " " - ); - } - - if (hasPrimitiveId) - { - if (d3d > 9) - { - preprocessor.writef( - " \\\n\t%suint gl_PrimitiveID : SV_PrimitiveID" - , arg++ > 0 ? ", " : " " - ); - } - else - { - fprintf(stderr, "PrimitiveID builtin is not supported by this D3D9 HLSL.\n"); - return EXIT_FAILURE; - } - } - - preprocessor.writef( - " \\\n\t)\n" - ); - - if (hasFrontFacing) - { - if (hlsl >= 3) - { - preprocessor.writef( - "#define gl_FrontFacing (__vface <= 0.0)\n" - ); - } - else - { - preprocessor.writef( - "#define gl_FrontFacing false\n" - ); - } - } - } - else if ('v' == shaderType) - { - const char* brace = bx::strnstr(entry, "{"); - if (NULL != brace) - { - const char* end = bx::strmb(brace, '{', '}'); - if (NULL != end) - { - strInsert(const_cast(end), "__RETURN__;\n"); - } - } - - preprocessor.writef( - "struct Output\n" - "{\n" - "\tvec4 gl_Position : SV_POSITION;\n" - "#define gl_Position _varying_.gl_Position\n" - ); - for (InOut::const_iterator it = shaderOutputs.begin(), itEnd = shaderOutputs.end(); it != itEnd; ++it) - { - VaryingMap::const_iterator varyingIt = varyingMap.find(*it); - if (varyingIt != varyingMap.end() ) - { - const Varying& var = varyingIt->second; - preprocessor.writef("\t%s %s : %s;\n", var.m_type.c_str(), var.m_name.c_str(), var.m_semantics.c_str() ); - preprocessor.writef("#define %s _varying_.%s\n", var.m_name.c_str(), var.m_name.c_str() ); - } - } - preprocessor.writef( - "};\n" - ); - - preprocessor.writef("#define void_main() \\\n"); - preprocessor.writef("Output main("); - bool first = true; - for (InOut::const_iterator it = shaderInputs.begin(), itEnd = shaderInputs.end(); it != itEnd; ++it) - { - VaryingMap::const_iterator varyingIt = varyingMap.find(*it); - if (varyingIt != varyingMap.end() ) - { - const Varying& var = varyingIt->second; - preprocessor.writef("%s%s %s : %s\\\n", first ? "" : "\t, ", var.m_type.c_str(), var.m_name.c_str(), var.m_semantics.c_str() ); - first = false; - } - } - preprocessor.writef( - ") \\\n" - "{ \\\n" - "\tOutput _varying_;" - ); - - for (InOut::const_iterator it = shaderOutputs.begin(), itEnd = shaderOutputs.end(); it != itEnd; ++it) - { - VaryingMap::const_iterator varyingIt = varyingMap.find(*it); - if (varyingIt != varyingMap.end() ) - { - const Varying& var = varyingIt->second; - preprocessor.writef(" \\\n\t%s", var.m_name.c_str() ); - if (!var.m_init.empty() ) - { - preprocessor.writef(" = %s", var.m_init.c_str() ); - } - preprocessor.writef(";"); - } - } - - preprocessor.writef( - "\n#define __RETURN__ \\\n" - "\t} \\\n" - ); - - if (hlsl != 0 - && hlsl <= 3) - { // preprocessor.writef( // "\tgl_Position.xy += u_viewTexel.xy * gl_Position.w; \\\n" // ); - } - - preprocessor.writef( - "\treturn _varying_" - ); } + + preprocessor.writef( + "\treturn _varying_" + ); + } + } + + if (preprocessor.run(input) ) + { + //BX_TRACE("Input file: %s", filePath); + //BX_TRACE("Output file: %s", outFilePath); + + if (_options.preprocessOnly) + { + if (0 != glsl) + { + if (essl != 0) + { + writef(_writer + , "#ifdef GL_ES\n" + "precision highp float;\n" + "#endif // GL_ES\n\n" + ); + } + } + bx::write(_writer, preprocessor.m_preprocessed.c_str(), (int32_t)preprocessor.m_preprocessed.size() ); + + return true; } - if (preprocessor.run(input) ) { - BX_TRACE("Input file: %s", filePath); - BX_TRACE("Output file: %s", outFilePath); - - if (preprocessOnly) + if ('f' == _options.shaderType) { - bx::CrtFileWriter writer; - - if (!bx::open(&writer, outFilePath) ) - { - fprintf(stderr, "Unable to open output file '%s'.", outFilePath); - return EXIT_FAILURE; - } - - if (0 != glsl) - { - if (NULL == profile) - { - writef(&writer - , "#ifdef GL_ES\n" - "precision highp float;\n" - "#endif // GL_ES\n\n" - ); - } - } - bx::write(&writer, preprocessor.m_preprocessed.c_str(), (int32_t)preprocessor.m_preprocessed.size() ); - bx::close(&writer); - - return EXIT_SUCCESS; + bx::write(_writer, BGFX_CHUNK_MAGIC_FSH); + bx::write(_writer, inputHash); + } + else if ('v' == _options.shaderType) + { + bx::write(_writer, BGFX_CHUNK_MAGIC_VSH); + bx::write(_writer, outputHash); + } + else + { + bx::write(_writer, BGFX_CHUNK_MAGIC_CSH); + bx::write(_writer, outputHash); } + if (0 != glsl + || 0 != essl + || 0 != metal) { - bx::CrtFileWriter* writer = NULL; + std::string code; - if (NULL != bin2c) + if (NULL != bx::strFind(preprocessor.m_preprocessed.c_str(), "layout(std430") ) { - writer = new Bin2cWriter(bin2c); - } - else - { - writer = new bx::CrtFileWriter; + glsl = 430; } - if (!bx::open(writer, outFilePath) ) + if (glsl < 400) { - fprintf(stderr, "Unable to open output file '%s'.", outFilePath); - return EXIT_FAILURE; - } - - if ('f' == shaderType) - { - bx::write(writer, BGFX_CHUNK_MAGIC_FSH); - bx::write(writer, inputHash); - } - else if ('v' == shaderType) - { - bx::write(writer, BGFX_CHUNK_MAGIC_VSH); - bx::write(writer, outputHash); - } - else - { - bx::write(writer, BGFX_CHUNK_MAGIC_CSH); - bx::write(writer, outputHash); - } - - if (0 != glsl - || 0 != essl - || 0 != metal) - { - std::string code; - const bool usesTextureLod = false || !!bx::findIdentifierMatch(input, s_ARB_shader_texture_lod) || !!bx::findIdentifierMatch(input, s_EXT_shader_texture_lod) ; + const bool usesInstanceID = !!bx::strFind(input, "gl_InstanceID"); + const bool usesGpuShader4 = !!bx::findIdentifierMatch(input, s_EXT_gpu_shader4); const bool usesGpuShader5 = !!bx::findIdentifierMatch(input, s_ARB_gpu_shader5); const bool usesTexelFetch = !!bx::findIdentifierMatch(input, s_texelFetch); const bool usesTextureMS = !!bx::findIdentifierMatch(input, s_ARB_texture_multisample); @@ -1876,10 +1824,24 @@ namespace bgfx } else { - bx::stringPrintf(code, "#version %s\n", need130 ? "130" : profile); + bx::stringPrintf(code, "#version %s\n", need130 ? "130" : _options.profile.c_str()); glsl = 130; } + if (usesInstanceID) + { + bx::stringPrintf(code + , "#extension GL_ARB_draw_instanced : enable\n" + ); + } + + if (usesGpuShader4) + { + bx::stringPrintf(code + , "#extension GL_EXT_gpu_shader4 : enable\n" + ); + } + if (usesGpuShader5) { bx::stringPrintf(code @@ -1899,7 +1861,7 @@ namespace bgfx if (usesTextureLod) { - if ('f' == shaderType) + if ('f' == _options.shaderType) { ARB_shader_texture_lod = true; bx::stringPrintf(code @@ -1957,10 +1919,20 @@ namespace bgfx ); } - bx::stringPrintf(code - , "#define bgfxShadow2D shadow2D\n" - "#define bgfxShadow2DProj shadow2DProj\n" - ); + if (need130) + { + bx::stringPrintf(code + , "#define bgfxShadow2D(_sampler, _coord) vec4_splat(texture(_sampler, _coord))\n" + "#define bgfxShadow2DProj(_sampler, _coord) vec4_splat(textureProj(_sampler, _coord))\n" + ); + } + else + { + bx::stringPrintf(code + , "#define bgfxShadow2D shadow2D\n" + "#define bgfxShadow2DProj shadow2DProj\n" + ); + } } else { @@ -1970,12 +1942,12 @@ namespace bgfx { bx::stringPrintf(code , "#extension GL_EXT_shader_texture_lod : enable\n" - "#define texture2DLod texture2DLodEXT\n" - "#define texture2DGrad texture2DGradEXT\n" - "#define texture2DProjLod texture2DProjLodEXT\n" - "#define texture2DProjGrad texture2DProjGradEXT\n" - "#define textureCubeLod textureCubeLodEXT\n" - "#define textureCubeGrad textureCubeGradEXT\n" + "#define texture2DLod texture2DLodEXT\n" + "#define texture2DGrad texture2DGradEXT\n" + "#define texture2DProjLod texture2DProjLodEXT\n" + "#define texture2DProjGrad texture2DProjGradEXT\n" + "#define textureCubeLod textureCubeLodEXT\n" + "#define textureCubeGrad textureCubeGradEXT\n" ); } @@ -1993,8 +1965,8 @@ namespace bgfx { bx::stringPrintf(code , "#extension GL_EXT_shadow_samplers : enable\n" - "#define shadow2D shadow2DEXT\n" - "#define shadow2DProj shadow2DProjEXT\n" + "#define shadow2D shadow2DEXT\n" + "#define shadow2DProj shadow2DProjEXT\n" ); } @@ -2016,7 +1988,7 @@ namespace bgfx { bx::stringPrintf(code , "#extension GL_EXT_frag_depth : enable\n" - "#define gl_FragDepth gl_FragDepthEXT\n" + "#define gl_FragDepth gl_FragDepthEXT\n" ); } @@ -2033,74 +2005,318 @@ namespace bgfx "#define ivec4 vec4\n" ); } - - code += preprocessor.m_preprocessed; - - compiled = compileGLSLShader(cmdLine - , metal ? BX_MAKEFOURCC('M', 'T', 'L', 0) : essl - , code - , writer - ); - } - else if (0 != spirv) - { - compiled = compileSPIRVShader(cmdLine - , 0 - , preprocessor.m_preprocessed - , writer - ); - } - else if (0 != pssl) - { - compiled = compilePSSLShader(cmdLine - , 0 - , preprocessor.m_preprocessed - , writer - ); } else { - compiled = compileHLSLShader(cmdLine - , d3d - , preprocessor.m_preprocessed - , writer + bx::stringPrintf(code, "#version %d\n", glsl); + + bx::stringPrintf(code + , "#define texture2DLod textureLod\n" + "#define texture2DGrad textureGrad\n" + "#define texture2DProjLod textureProjLod\n" + "#define texture2DProjGrad textureProjGrad\n" + "#define textureCubeLod textureLod\n" + "#define textureCubeGrad textureGrad\n" ); } - bx::close(writer); - delete writer; - } + code += preprocessor.m_preprocessed; - if (compiled) - { - if (depends) + if (glsl > 400) { - std::string ofp = outFilePath; - ofp += ".d"; - bx::CrtFileWriter writer; - if (bx::open(&writer, ofp.c_str() ) ) - { - writef(&writer, "%s : %s\n", outFilePath, preprocessor.m_depends.c_str() ); - bx::close(&writer); - } + bx::write(_writer, uint16_t(0) ); + + uint32_t shaderSize = (uint32_t)code.size(); + bx::write(_writer, shaderSize); + bx::write(_writer, code.c_str(), shaderSize); + bx::write(_writer, uint8_t(0) ); + + compiled = true; + } + else + { + compiled = compileGLSLShader(_options + , metal ? BX_MAKEFOURCC('M', 'T', 'L', 0) : essl + , code + , _writer + ); + } + } + else if (0 != spirv) + { + compiled = compileSPIRVShader(_options + , 0 + , preprocessor.m_preprocessed + , _writer + ); + } + else if (0 != pssl) + { + compiled = compilePSSLShader(_options + , 0 + , preprocessor.m_preprocessed + , _writer + ); + } + else + { + compiled = compileHLSLShader(_options + , d3d + , preprocessor.m_preprocessed + , _writer + ); + } + } + + if (compiled) + { + if (_options.depends) + { + std::string ofp = _options.outputFilePath + ".d"; + bx::FileWriter writer; + if (bx::open(&writer, ofp.c_str() ) ) + { + writef(&writer, "%s : %s\n", _options.outputFilePath.c_str(), preprocessor.m_depends.c_str() ); + bx::close(&writer); } } } } } + } - delete [] data; + delete [] data; + + return compiled; + } + + int compileShader(int _argc, const char* _argv[]) + { + bx::CommandLine cmdLine(_argc, _argv); + + if (cmdLine.hasArg('v', "version") ) + { + fprintf(stderr + , "shaderc, bgfx shader compiler tool, version %d.%d.%d.\n" + , BGFX_SHADERC_VERSION_MAJOR + , BGFX_SHADERC_VERSION_MINOR + , BGFX_API_VERSION + ); + return bx::kExitSuccess; + } + + if (cmdLine.hasArg('h', "help") ) + { + help(); + return bx::kExitFailure; + } + + g_verbose = cmdLine.hasArg("verbose"); + + const char* filePath = cmdLine.findOption('f'); + if (NULL == filePath) + { + help("Shader file name must be specified."); + return bx::kExitFailure; + } + + const char* outFilePath = cmdLine.findOption('o'); + if (NULL == outFilePath) + { + help("Output file name must be specified."); + return bx::kExitFailure; + } + + const char* type = cmdLine.findOption('\0', "type"); + if (NULL == type) + { + help("Must specify shader type."); + return bx::kExitFailure; + } + + Options options; + options.inputFilePath = filePath; + options.outputFilePath = outFilePath; + options.shaderType = bx::toLower(type[0]); + + options.disasm = cmdLine.hasArg('\0', "disasm"); + + const char* platform = cmdLine.findOption('\0', "platform"); + if (NULL == platform) + { + platform = ""; + } + + options.platform = platform; + + options.raw = cmdLine.hasArg('\0', "raw"); + + const char* profile = cmdLine.findOption('p', "profile"); + + if ( NULL != profile) + { + options.profile = profile; + } + + { // hlsl only + options.debugInformation = cmdLine.hasArg('\0', "debug"); + options.avoidFlowControl = cmdLine.hasArg('\0', "avoid-flow-control"); + options.noPreshader = cmdLine.hasArg('\0', "no-preshader"); + options.partialPrecision = cmdLine.hasArg('\0', "partial-precision"); + options.preferFlowControl = cmdLine.hasArg('\0', "prefer-flow-control"); + options.backwardsCompatibility = cmdLine.hasArg('\0', "backwards-compatibility"); + options.warningsAreErrors = cmdLine.hasArg('\0', "Werror"); + + uint32_t optimization = 3; + if (cmdLine.hasArg(optimization, 'O') ) + { + options.optimize = true; + options.optimizationLevel = optimization; + } + } + + const char* bin2c = NULL; + if (cmdLine.hasArg("bin2c") ) + { + bin2c = cmdLine.findOption("bin2c"); + if (NULL == bin2c) + { + bin2c = baseName(outFilePath); + uint32_t len = (uint32_t)bx::strLen(bin2c); + char* temp = (char*)alloca(len+1); + for (char *out = temp; *bin2c != '\0';) + { + char ch = *bin2c++; + if (isalnum(ch) ) + { + *out++ = ch; + } + else + { + *out++ = '_'; + } + } + temp[len] = '\0'; + + bin2c = temp; + } + } + + options.depends = cmdLine.hasArg("depends"); + options.preprocessOnly = cmdLine.hasArg("preprocess"); + const char* includeDir = cmdLine.findOption('i'); + + BX_TRACE("depends: %d", options.depends); + BX_TRACE("preprocessOnly: %d", options.preprocessOnly); + BX_TRACE("includeDir: %s", includeDir); + + for (int ii = 1; NULL != includeDir; ++ii) + { + options.includeDirs.push_back(includeDir); + includeDir = cmdLine.findOption(ii, 'i'); + } + + std::string dir; + { + const char* base = baseName(filePath); + + if (base != filePath) + { + dir.assign(filePath, base-filePath); + options.includeDirs.push_back(dir.c_str()); + } + } + + const char* defines = cmdLine.findOption("define"); + while (NULL != defines + && '\0' != *defines) + { + defines = bx::strws(defines); + const char* eol = bx::strFind(defines, ';'); + if (NULL == eol) + { + eol = defines + bx::strLen(defines); + } + std::string define(defines, eol); + options.defines.push_back(define.c_str() ); + defines = ';' == *eol ? eol+1 : eol; + } + + bool compiled = false; + + bx::FileReader reader; + if (!bx::open(&reader, filePath) ) + { + fprintf(stderr, "Unable to open file '%s'.\n", filePath); + } + else + { + std::string defaultVarying = dir + "varying.def.sc"; + const char* varyingdef = cmdLine.findOption("varyingdef", defaultVarying.c_str() ); + File attribdef(varyingdef); + const char* parse = attribdef.getData(); + if (NULL != parse + && *parse != '\0') + { + options.dependencies.push_back(varyingdef); + } + else + { + fprintf(stderr, "ERROR: Failed to parse varying def file: \"%s\" No input/output semantics will be generated in the code!\n", varyingdef); + } + + const size_t padding = 4096; + uint32_t size = (uint32_t)bx::getSize(&reader); + char* data = new char[size+padding+1]; + size = (uint32_t)bx::read(&reader, data, size); + + if (data[0] == '\xef' + && data[1] == '\xbb' + && data[2] == '\xbf') + { + bx::memMove(data, &data[3], size-3); + size -= 3; + } + + // Compiler generates "error X3000: syntax error: unexpected end of file" + // if input doesn't have empty line at EOF. + data[size] = '\n'; + bx::memSet(&data[size+1], 0, padding); + bx::close(&reader); + + bx::FileWriter* writer = NULL; + + if (NULL != bin2c) + { + writer = new Bin2cWriter(bin2c); + } + else + { + writer = new bx::FileWriter; + } + + if (!bx::open(writer, outFilePath) ) + { + fprintf(stderr, "Unable to open output file '%s'.", outFilePath); + return bx::kExitFailure; + } + + if ( compileShader(attribdef.getData(), data, size, options, writer) ) + compiled = true; + + bx::close(writer); + delete writer; } if (compiled) { - return EXIT_SUCCESS; + return bx::kExitSuccess; } remove(outFilePath); fprintf(stderr, "Failed to build shader.\n"); - return EXIT_FAILURE; + return bx::kExitFailure; } } // namespace bgfx diff --git a/3rdparty/bgfx/tools/shaderc/shaderc.h b/3rdparty/bgfx/tools/shaderc/shaderc.h index f709529..ec471c6 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc.h +++ b/3rdparty/bgfx/tools/shaderc/shaderc.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -61,45 +61,45 @@ namespace bgfx #include #include #include -#include +#include #include "../../src/vertexdecl.h" namespace bgfx { extern bool g_verbose; - class LineReader + class LineReader : public bx::ReaderI { public: LineReader(const char* _str) : m_str(_str) , m_pos(0) - , m_size((uint32_t)strlen(_str)) + , m_size(bx::strLen(_str) ) { } - std::string getLine() + virtual int32_t read(void* _data, int32_t _size, bx::Error* _err) override { - const char* str = &m_str[m_pos]; - skipLine(); + if (m_str[m_pos] == '\0' + || m_pos == m_size) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_EOF, "LineReader: EOF."); + return 0; + } - const char* eol = &m_str[m_pos]; - - std::string tmp; - tmp.assign(str, eol - str); - return tmp; - } - - bool isEof() const - { - return m_str[m_pos] == '\0'; - } - - void skipLine() - { - const char* str = &m_str[m_pos]; + uint32_t pos = m_pos; + const char* str = &m_str[pos]; const char* nl = bx::strnl(str); - m_pos += (uint32_t)(nl - str); + pos += (uint32_t)(nl - str); + + const char* eol = &m_str[pos]; + + uint32_t size = bx::uint32_min(uint32_t(eol - str), _size); + + bx::memCopy(_data, str, size); + m_pos += size; + + return size; } const char* m_str; @@ -122,6 +122,41 @@ namespace bgfx uint16_t regCount; }; + struct Options + { + Options(); + + void dump(); + + char shaderType; + std::string platform; + std::string profile; + + std::string inputFilePath; + std::string outputFilePath; + + std::vector includeDirs; + std::vector defines; + std::vector dependencies; + + bool disasm; + bool raw; + bool preprocessOnly; + bool depends; + + bool debugInformation; + + bool avoidFlowControl; + bool noPreshader; + bool partialPrecision; + bool preferFlowControl; + bool backwardsCompatibility; + bool warningsAreErrors; + + bool optimize; + uint32_t optimizationLevel; + }; + typedef std::vector UniformArray; void printCode(const char* _code, int32_t _line = 0, int32_t _start = 0, int32_t _end = INT32_MAX, int32_t _column = -1); @@ -129,10 +164,10 @@ namespace bgfx int32_t writef(bx::WriterI* _writer, const char* _format, ...); void writeFile(const char* _filePath, const void* _data, int32_t _size); - bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); - bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); - bool compilePSSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); - bool compileSPIRVShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); + bool compileGLSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer); + bool compileHLSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer); + bool compilePSSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer); + bool compileSPIRVShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer); } // namespace bgfx diff --git a/3rdparty/bgfx/tools/shaderc/shaderc_glsl.cpp b/3rdparty/bgfx/tools/shaderc/shaderc_glsl.cpp index 0b42a2f..6a8a1b4 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc_glsl.cpp +++ b/3rdparty/bgfx/tools/shaderc/shaderc_glsl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -8,9 +8,9 @@ namespace bgfx { namespace glsl { - static bool compile(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + static bool compile(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { - char ch = char(tolower(_cmdLine.findOption('\0', "type")[0]) ); + char ch = _options.shaderType; const glslopt_shader_type type = ch == 'f' ? kGlslOptShaderFragment : (ch == 'c' ? kGlslOptShaderCompute : kGlslOptShaderVertex); @@ -62,6 +62,7 @@ namespace bgfx { namespace glsl printCode(_code.c_str(), line, start, end, column); fprintf(stderr, "Error: %s\n", log); + glslopt_shader_delete(shader); glslopt_cleanup(ctx); return false; } @@ -109,16 +110,16 @@ namespace bgfx { namespace glsl && *parse != '\0') { parse = bx::strws(parse); - const char* eol = bx::strnchr(parse, ';'); + const char* eol = bx::strFind(parse, ';'); if (NULL != eol) { const char* qualifier = parse; - parse = bx::strws(bx::strword(parse) ); + parse = bx::strws(bx::strSkipWord(parse) ); - if (0 == bx::strncmp(qualifier, "attribute", 9) - || 0 == bx::strncmp(qualifier, "varying", 7) - || 0 == bx::strncmp(qualifier, "in", 2) - || 0 == bx::strncmp(qualifier, "out", 3) + if (0 == bx::strCmp(qualifier, "attribute", 9) + || 0 == bx::strCmp(qualifier, "varying", 7) + || 0 == bx::strCmp(qualifier, "in", 2) + || 0 == bx::strCmp(qualifier, "out", 3) ) { // skip attributes and varyings. @@ -126,7 +127,14 @@ namespace bgfx { namespace glsl continue; } - if (0 != bx::strncmp(qualifier, "uniform", 7) ) + if (0 == bx::strCmp(parse, "tmpvar", 6) ) + { + // skip temporaries + parse = eol + 1; + continue; + } + + if (0 != bx::strCmp(qualifier, "uniform", 7) ) { // end if there is no uniform keyword. parse = NULL; @@ -136,45 +144,45 @@ namespace bgfx { namespace glsl const char* precision = NULL; const char* typen = parse; - if (0 == bx::strncmp(typen, "lowp", 4) - || 0 == bx::strncmp(typen, "mediump", 7) - || 0 == bx::strncmp(typen, "highp", 5) ) + if (0 == bx::strCmp(typen, "lowp", 4) + || 0 == bx::strCmp(typen, "mediump", 7) + || 0 == bx::strCmp(typen, "highp", 5) ) { precision = typen; - typen = parse = bx::strws(bx::strword(parse) ); + typen = parse = bx::strws(bx::strSkipWord(parse) ); } BX_UNUSED(precision); char uniformType[256]; - parse = bx::strword(parse); + parse = bx::strSkipWord(parse); - if (0 == bx::strncmp(typen, "sampler", 7) ) + if (0 == bx::strCmp(typen, "sampler", 7) ) { - bx::strlncpy(uniformType, BX_COUNTOF(uniformType), "int"); + bx::strCopy(uniformType, BX_COUNTOF(uniformType), "int"); } else { - bx::strlcpy(uniformType, typen, int32_t(parse-typen+1) ); + bx::strCopy(uniformType, int32_t(parse-typen+1), typen); } const char* name = parse = bx::strws(parse); char uniformName[256]; uint8_t num = 1; - const char* array = bx::strnstr(name, "[", int32_t(eol-parse) ); + const char* array = bx::strFind(bx::StringView(name, int32_t(eol-parse) ), "["); if (NULL != array) { - bx::strlcpy(uniformName, name, int32_t(array-name+1) ); + bx::strCopy(uniformName, int32_t(array-name+1), name); char arraySize[32]; - const char* end = bx::strnstr(array, "]", int32_t(eol-array) ); - bx::strlcpy(arraySize, array+1, int32_t(end-array) ); + const char* end = bx::strFind(bx::StringView(array, int32_t(eol-array) ), "]"); + bx::strCopy(arraySize, int32_t(end-array), array+1); num = uint8_t(atoi(arraySize) ); } else { - bx::strlcpy(uniformName, name, int32_t(eol-name+1) ); + bx::strCopy(uniformName, int32_t(eol-name+1), name); } Uniform un; @@ -197,43 +205,43 @@ namespace bgfx { namespace glsl } else { - const char* parse = bx::strnstr(optimizedShader, "struct xlatMtlShaderUniform {"); + const char* parse = bx::strFind(optimizedShader, "struct xlatMtlShaderUniform {"); const char* end = parse; if (NULL != parse) { - parse += bx::strnlen("struct xlatMtlShaderUniform {"); - end = bx::strnstr(parse, "};"); + parse += bx::strLen("struct xlatMtlShaderUniform {"); + end = bx::strFind(parse, "};"); } while ( parse < end && *parse != '\0') { parse = bx::strws(parse); - const char* eol = bx::strnchr(parse, ';'); + const char* eol = bx::strFind(parse, ';'); if (NULL != eol) { const char* typen = parse; char uniformType[256]; - parse = bx::strword(parse); - bx::strlcpy(uniformType, typen, int32_t(parse-typen+1) ); + parse = bx::strSkipWord(parse); + bx::strCopy(uniformType, int32_t(parse-typen+1), typen); const char* name = parse = bx::strws(parse); char uniformName[256]; uint8_t num = 1; - const char* array = bx::strnstr(name, "[", int32_t(eol-parse) ); + const char* array = bx::strFind(bx::StringView(name, int32_t(eol-parse) ), "["); if (NULL != array) { - bx::strlcpy(uniformName, name, int32_t(array-name+1) ); + bx::strCopy(uniformName, int32_t(array-name+1), name); char arraySize[32]; - const char* arrayEnd = bx::strnstr(array, "]", int32_t(eol-array) ); - bx::strlcpy(arraySize, array+1, int32_t(arrayEnd-array) ); + const char* arrayEnd = bx::strFind(bx::StringView(array, int32_t(eol-array) ), "]"); + bx::strCopy(arraySize, int32_t(arrayEnd-array), array+1); num = uint8_t(atoi(arraySize) ); } else { - bx::strlcpy(uniformName, name, int32_t(eol-name+1) ); + bx::strCopy(uniformName, int32_t(eol-name+1), name); } Uniform un; @@ -279,19 +287,19 @@ namespace bgfx { namespace glsl ); } - uint32_t shaderSize = (uint32_t)strlen(optimizedShader); + uint32_t shaderSize = (uint32_t)bx::strLen(optimizedShader); bx::write(_writer, shaderSize); bx::write(_writer, optimizedShader, shaderSize); uint8_t nul = 0; bx::write(_writer, nul); - if (_cmdLine.hasArg('\0', "disasm") ) + if (_options.disasm ) { - std::string disasmfp = _cmdLine.findOption('o'); - disasmfp += ".disasm"; + std::string disasmfp = _options.outputFilePath + ".disasm"; writeFile(disasmfp.c_str(), optimizedShader, shaderSize); } + glslopt_shader_delete(shader); glslopt_cleanup(ctx); return true; @@ -299,9 +307,9 @@ namespace bgfx { namespace glsl } // namespace glsl - bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + bool compileGLSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { - return glsl::compile(_cmdLine, _version, _code, _writer); + return glsl::compile(_options, _version, _code, _writer); } } // namespace bgfx diff --git a/3rdparty/bgfx/tools/shaderc/shaderc_hlsl.cpp b/3rdparty/bgfx/tools/shaderc/shaderc_hlsl.cpp index fe74d58..5433337 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc_hlsl.cpp +++ b/3rdparty/bgfx/tools/shaderc/shaderc_hlsl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -172,6 +172,8 @@ namespace bgfx { namespace hlsl { bgfx::Attrib::Bitangent, "BITANGENT", 0 }, { bgfx::Attrib::Color0, "COLOR", 0 }, { bgfx::Attrib::Color1, "COLOR", 1 }, + { bgfx::Attrib::Color2, "COLOR", 2 }, + { bgfx::Attrib::Color3, "COLOR", 3 }, { bgfx::Attrib::Indices, "BLENDINDICES", 0 }, { bgfx::Attrib::Weight, "BLENDWEIGHT", 0 }, { bgfx::Attrib::TexCoord0, "TEXCOORD", 0 }, @@ -190,7 +192,7 @@ namespace bgfx { namespace hlsl for (uint32_t ii = 0; ii < bgfx::Attrib::Count; ++ii) { const RemapInputSemantic& ris = s_remapInputSemantic[ii]; - if (0 == strcmp(ris.m_name, _name) + if (0 == bx::strCmp(ris.m_name, _name) && ris.m_index == _index) { return ris; @@ -520,7 +522,7 @@ namespace bgfx { namespace hlsl , bindDesc.BindCount ); - const char * end = bx::strnstr(bindDesc.Name, "Sampler"); + const char * end = bx::strFind(bindDesc.Name, "Sampler"); if (NULL != end) { Uniform un; @@ -543,10 +545,11 @@ namespace bgfx { namespace hlsl return true; } - static bool compile(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer, bool _firstPass) + static bool compile(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer, bool _firstPass) { - const char* profile = _cmdLine.findOption('p', "profile"); - if (NULL == profile) + const char* profile = _options.profile.c_str(); + + if (profile[0] == '\0') { fprintf(stderr, "Error: Shader profile must be specified.\n"); return false; @@ -555,27 +558,26 @@ namespace bgfx { namespace hlsl s_compiler = load(); bool result = false; - bool debug = _cmdLine.hasArg('\0', "debug"); + bool debug = _options.debugInformation; uint32_t flags = D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY; flags |= debug ? D3DCOMPILE_DEBUG : 0; - flags |= _cmdLine.hasArg('\0', "avoid-flow-control") ? D3DCOMPILE_AVOID_FLOW_CONTROL : 0; - flags |= _cmdLine.hasArg('\0', "no-preshader") ? D3DCOMPILE_NO_PRESHADER : 0; - flags |= _cmdLine.hasArg('\0', "partial-precision") ? D3DCOMPILE_PARTIAL_PRECISION : 0; - flags |= _cmdLine.hasArg('\0', "prefer-flow-control") ? D3DCOMPILE_PREFER_FLOW_CONTROL : 0; - flags |= _cmdLine.hasArg('\0', "backwards-compatibility") ? D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY : 0; + flags |= _options.avoidFlowControl ? D3DCOMPILE_AVOID_FLOW_CONTROL : 0; + flags |= _options.noPreshader ? D3DCOMPILE_NO_PRESHADER : 0; + flags |= _options.partialPrecision ? D3DCOMPILE_PARTIAL_PRECISION : 0; + flags |= _options.preferFlowControl ? D3DCOMPILE_PREFER_FLOW_CONTROL : 0; + flags |= _options.backwardsCompatibility ? D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY : 0; - bool werror = _cmdLine.hasArg('\0', "Werror"); + bool werror = _options.warningsAreErrors; if (werror) { flags |= D3DCOMPILE_WARNINGS_ARE_ERRORS; } - uint32_t optimization = 3; - if (_cmdLine.hasArg(optimization, 'O') ) + if (_options.optimize ) { - optimization = bx::uint32_min(optimization, BX_COUNTOF(s_optimizationLevelD3D11) - 1); + uint32_t optimization = bx::uint32_min(_options.optimizationLevel, BX_COUNTOF(s_optimizationLevelD3D11) - 1); flags |= s_optimizationLevelD3D11[optimization]; } else @@ -596,8 +598,7 @@ namespace bgfx { namespace hlsl if (debug) { - hlslfp = _cmdLine.findOption('o'); - hlslfp += ".hlsl"; + hlslfp = _options.outputFilePath + ".hlsl"; writeFile(hlslfp.c_str(), _code.c_str(), (int32_t)_code.size() ); } @@ -624,7 +625,7 @@ namespace bgfx { namespace hlsl int32_t end = INT32_MAX; bool found = false - || 2 == sscanf(log, "(%u,%u):", &line, &column) + || 2 == sscanf(log, "(%u,%u):", &line, &column) || 2 == sscanf(log, " :%u:%u: ", &line, &column) ; @@ -666,40 +667,47 @@ namespace bgfx { namespace hlsl if (_firstPass && unusedUniforms.size() > 0) { - const size_t strLength = strlen("uniform"); + const size_t strLength = bx::strLen("uniform"); // first time through, we just find unused uniforms and get rid of them std::string output; + bx::Error err; LineReader reader(_code.c_str() ); - while (!reader.isEof() ) + while (err.isOk() ) { - std::string line = reader.getLine(); - for (UniformNameList::iterator it = unusedUniforms.begin(), itEnd = unusedUniforms.end(); it != itEnd; ++it) + char str[4096]; + int32_t len = bx::read(&reader, str, BX_COUNTOF(str), &err); + if (err.isOk() ) { - size_t index = line.find("uniform "); - if (index == std::string::npos) + std::string strLine(str, len); + + for (UniformNameList::iterator it = unusedUniforms.begin(), itEnd = unusedUniforms.end(); it != itEnd; ++it) { - continue; + size_t index = strLine.find("uniform "); + if (index == std::string::npos) + { + continue; + } + + // matching lines like: uniform u_name; + // we want to replace "uniform" with "static" so that it's no longer + // included in the uniform blob that the application must upload + // we can't just remove them, because unused functions might still reference + // them and cause a compile error when they're gone + if (!!bx::findIdentifierMatch(strLine.c_str(), it->c_str() ) ) + { + strLine = strLine.replace(index, strLength, "static"); + unusedUniforms.erase(it); + break; + } } - // matching lines like: uniform u_name; - // we want to replace "uniform" with "static" so that it's no longer - // included in the uniform blob that the application must upload - // we can't just remove them, because unused functions might still reference - // them and cause a compile error when they're gone - if (!!bx::findIdentifierMatch(line.c_str(), it->c_str() ) ) - { - line = line.replace(index, strLength, "static"); - unusedUniforms.erase(it); - break; - } + output += strLine; } - - output += line; } // recompile with the unused uniforms converted to statics - return compile(_cmdLine, _version, output.c_str(), _writer, false); + return compile(_options, _version, output.c_str(), _writer, false); } } @@ -747,7 +755,7 @@ namespace bgfx { namespace hlsl } { - uint16_t shaderSize = (uint16_t)code->GetBufferSize(); + uint32_t shaderSize = uint32_t(code->GetBufferSize() ); bx::write(_writer, shaderSize); bx::write(_writer, code->GetBufferPointer(), shaderSize); uint8_t nul = 0; @@ -762,7 +770,7 @@ namespace bgfx { namespace hlsl bx::write(_writer, size); } - if (_cmdLine.hasArg('\0', "disasm") ) + if (_options.disasm ) { ID3DBlob* disasm; D3DDisassemble(code->GetBufferPointer() @@ -774,8 +782,7 @@ namespace bgfx { namespace hlsl if (NULL != disasm) { - std::string disasmfp = _cmdLine.findOption('o'); - disasmfp += ".disasm"; + std::string disasmfp = _options.outputFilePath + ".disasm"; writeFile(disasmfp.c_str(), disasm->GetBufferPointer(), (uint32_t)disasm->GetBufferSize() ); disasm->Release(); @@ -797,9 +804,9 @@ namespace bgfx { namespace hlsl } // namespace hlsl - bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + bool compileHLSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { - return hlsl::compile(_cmdLine, _version, _code, _writer, true); + return hlsl::compile(_options, _version, _code, _writer, true); } } // namespace bgfx @@ -808,9 +815,9 @@ namespace bgfx { namespace hlsl namespace bgfx { - bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + bool compileHLSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { - BX_UNUSED(_cmdLine, _version, _code, _writer); + BX_UNUSED(_options, _version, _code, _writer); fprintf(stderr, "HLSL compiler is not supported on this platform.\n"); return false; } diff --git a/3rdparty/bgfx/tools/shaderc/shaderc_pssl.cpp b/3rdparty/bgfx/tools/shaderc/shaderc_pssl.cpp index fbfe492..993a4bc 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc_pssl.cpp +++ b/3rdparty/bgfx/tools/shaderc/shaderc_pssl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -7,9 +7,9 @@ namespace bgfx { - bool compilePSSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + bool compilePSSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { - BX_UNUSED(_cmdLine, _version, _code, _writer); + BX_UNUSED(_options, _version, _code, _writer); fprintf(stderr, "PSSL compiler is not supported.\n"); return false; } diff --git a/3rdparty/bgfx/tools/shaderc/shaderc_spirv.cpp b/3rdparty/bgfx/tools/shaderc/shaderc_spirv.cpp index 97a9029..11cecfb 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc_spirv.cpp +++ b/3rdparty/bgfx/tools/shaderc/shaderc_spirv.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -12,13 +12,12 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wshadow") // warning: declaration of 'u #include #include #include -//#include -//#include +#include BX_PRAGMA_DIAGNOSTIC_POP() namespace bgfx { - static bx::CrtAllocator s_allocator; + static bx::DefaultAllocator s_allocator; bx::AllocatorI* g_allocator = &s_allocator; struct TinyStlAllocator @@ -50,12 +49,6 @@ namespace stl = tinystl; #include "../../src/shader_spirv.h" -namespace glslang -{ - void GlslangToSpv(const glslang::TIntermediate& _intermediate, std::vector& _spirv); - -} // namespace glslang - namespace bgfx { namespace spirv { const TBuiltInResource resourceLimits = @@ -475,6 +468,8 @@ namespace bgfx { namespace spirv return true; } +#define DBG(...) + void disassemble(bx::WriterI* _writer, bx::ReaderSeekerI* _reader, bx::Error* _err) { BX_UNUSED(_writer); @@ -495,26 +490,27 @@ namespace bgfx { namespace spirv const SpvReflection::Id& id = it->second; uint32_t num = uint32_t(id.members.size() ); if (0 < num - && 0 != bx::strncmp(id.var.name.c_str(), "gl_PerVertex") ) + && 0 != bx::strCmp(id.var.name.c_str(), "gl_PerVertex") ) { - printf("%3d: %s %d %s\n" + DBG("%3d: %s %d %s\n" , it->first , id.var.name.c_str() , id.var.location , getName(id.var.storageClass) ); - printf("{\n"); + DBG("{\n"); for (uint32_t ii = 0; ii < num; ++ii) { const SpvReflection::Id::Variable& var = id.members[ii]; - printf("\t\t%s %s %d %s\n" + DBG("\t\t%s %s %d %s\n" , spvx.getTypeName(var.type).c_str() , var.name.c_str() , var.offset , getName(var.storageClass) ); + BX_UNUSED(var); } - printf("}\n"); + DBG("}\n"); } } @@ -523,10 +519,10 @@ namespace bgfx { namespace spirv struct DebugOutputWriter : public bx::WriterI { - virtual int32_t write(const void* _data, int32_t _size, bx::Error*) BX_OVERRIDE + virtual int32_t write(const void* _data, int32_t _size, bx::Error*) override { char* out = (char*)alloca(_size + 1); - memcpy(out, _data, _size); + bx::memCopy(out, _data, _size); out[_size] = '\0'; printf("%s", out); return _size; @@ -549,25 +545,18 @@ namespace bgfx { namespace spirv // fprintf(stderr, "%s\n", _message); // } - static bool compile(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + static bool compile(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { - BX_UNUSED(_cmdLine, _version, _code, _writer); - - const char* type = _cmdLine.findOption('\0', "type"); - if (NULL == type) - { - fprintf(stderr, "Error: Shader type must be specified.\n"); - return false; - } + BX_UNUSED(_version); glslang::InitializeProcess(); glslang::TProgram* program = new glslang::TProgram; - EShLanguage stage = getLang(type[0]); + EShLanguage stage = getLang(_options.shaderType); if (EShLangCount == stage) { - fprintf(stderr, "Error: Unknown shader type %s.\n", type); + fprintf(stderr, "Error: Unknown shader type '%c'.\n", _options.shaderType); return false; } glslang::TShader* shader = new glslang::TShader(stage); @@ -606,7 +595,7 @@ namespace bgfx { namespace spirv int32_t start = 0; int32_t end = INT32_MAX; - const char* err = bx::strnstr(log, "ERROR:"); + const char* err = bx::strFind(log, "ERROR:"); bool found = false; @@ -653,7 +642,7 @@ namespace bgfx { namespace spirv uint16_t count = (uint16_t)program->getNumLiveUniformVariables(); bx::write(_writer, count); - uint32_t fragmentBit = type[0] == 'f' ? BGFX_UNIFORM_FRAGMENTBIT : 0; + uint32_t fragmentBit = _options.shaderType == 'f' ? BGFX_UNIFORM_FRAGMENTBIT : 0; for (uint16_t ii = 0; ii < count; ++ii) { Uniform un; @@ -752,7 +741,7 @@ namespace bgfx { namespace spirv if (optimized) { - uint16_t shaderSize = (uint16_t)spirv.size()*sizeof(uint32_t); + uint32_t shaderSize = (uint32_t)spirv.size()*sizeof(uint32_t); bx::write(_writer, shaderSize); bx::write(_writer, spirv.data(), shaderSize); uint8_t nul = 0; @@ -771,9 +760,9 @@ namespace bgfx { namespace spirv } // namespace spirv - bool compileSPIRVShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + bool compileSPIRVShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { - return spirv::compile(_cmdLine, _version, _code, _writer); + return spirv::compile(_options, _version, _code, _writer); } } // namespace bgfx diff --git a/3rdparty/bgfx/tools/texturec/texturec.cpp b/3rdparty/bgfx/tools/texturec/texturec.cpp deleted file mode 100644 index b7e629f..0000000 --- a/3rdparty/bgfx/tools/texturec/texturec.cpp +++ /dev/null @@ -1,427 +0,0 @@ -/* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -#include -#include -#include -#include - -#include -#include - -#if 0 -# define BX_TRACE(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__) -#endif // DEBUG - -#include -#include -#include -#include - -extern "C" { -#include -} - -void help(const char* _error = NULL) -{ - if (NULL != _error) - { - fprintf(stderr, "Error:\n%s\n\n", _error); - } - - fprintf(stderr - , "texturec, bgfx texture compiler tool\n" - "Copyright 2011-2017 Branimir Karadzic. All rights reserved.\n" - "License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n\n" - ); - - fprintf(stderr - , "Usage: texturec -f -o [-t ]\n" - - "\n" - "Supported input file types:\n" - " *.png Portable Network Graphics\n" - " *.tga Targa\n" - " *.dds Direct Draw Surface\n" - " *.ktx Khronos Texture\n" - " *.pvr PowerVR\n" - - "\n" - "Options:\n" - " -f Input file path.\n" - " -o Output file path (file will be written in KTX format).\n" - " -t Output format type (BC1/2/3/4/5, ETC1, PVR14, etc.).\n" - " -m, --mips Generate mip-maps.\n" - " -n, --normalmap Input texture is normal map.\n" - " --sdf Compute SDF texture.\n" - " --iqa Image Quality Assesment\n" - - "\n" - "For additional information, see https://github.com/bkaradzic/bgfx\n" - ); -} - -int main(int _argc, const char* _argv[]) -{ - bx::CommandLine cmdLine(_argc, _argv); - - if (cmdLine.hasArg('h', "help") ) - { - help(); - return EXIT_FAILURE; - } - - const char* inputFileName = cmdLine.findOption('f'); - if (NULL == inputFileName) - { - help("Input file must be specified."); - return EXIT_FAILURE; - } - - const char* outputFileName = cmdLine.findOption('o'); - if (NULL == outputFileName) - { - help("Output file must be specified."); - return EXIT_FAILURE; - } - - bool sdf = false; - double edge = 16.0; - const char* edgeOpt = cmdLine.findOption("sdf"); - if (NULL != edgeOpt) - { - sdf = true; - edge = atof(edgeOpt); - } - BX_UNUSED(sdf, edge); - - const bool mips = cmdLine.hasArg('m', "mips"); - const bool normalMap = cmdLine.hasArg('n', "normalmap"); - const bool iqa = cmdLine.hasArg('\0', "iqa"); - - bx::CrtFileReader reader; - if (!bx::open(&reader, inputFileName) ) - { - help("Failed to open input file."); - return EXIT_FAILURE; - } - - bx::CrtAllocator allocator; - - uint32_t inputSize = (uint32_t)bx::getSize(&reader); - uint8_t* inputData = (uint8_t*)BX_ALLOC(&allocator, inputSize); - - bx::read(&reader, inputData, inputSize); - bx::close(&reader); - - { - using namespace bimg; - - ImageContainer* input = imageParse(&allocator, inputData, inputSize); - - if (NULL != input) - { - BX_FREE(&allocator, inputData); - - const char* type = cmdLine.findOption('t'); - bimg::TextureFormat::Enum format = input->m_format; - - if (NULL != type) - { - format = bimg::getFormat(type); - - if (!isValid(format) ) - { - help("Invalid format specified."); - return EXIT_FAILURE; - } - } - - ImageContainer* output = NULL; - - ImageMip mip; - if (imageGetRawData(*input, 0, 0, input->m_data, input->m_size, mip) ) - { - uint8_t numMips = mips - ? imageGetNumMips(format, uint16_t(mip.m_width), uint16_t(mip.m_height) ) - : 1 - ; - - void* temp = NULL; - - if (normalMap) - { - output = imageAlloc(&allocator, format, uint16_t(mip.m_width), uint16_t(mip.m_height), 0, 1, false, mips); - - ImageMip dstMip; - imageGetRawData(*output, 0, 0, NULL, 0, dstMip); - - if (mip.m_width != dstMip.m_width - && mip.m_height != dstMip.m_height) - { - printf("Invalid input image size %dx%d, it must be at least %dx%d to be converted to %s format.\n" - , mip.m_width - , mip.m_height - , dstMip.m_width - , dstMip.m_height - , getName(format) - ); - return EXIT_FAILURE; - } - - uint32_t size = imageGetSize( - NULL - , uint16_t(dstMip.m_width) - , uint16_t(dstMip.m_height) - , 0 - , false - , false - , 1 - , TextureFormat::RGBA32F - ); - temp = BX_ALLOC(&allocator, size); - float* rgba = (float*)temp; - float* rgbaDst = (float*)BX_ALLOC(&allocator, size); - - imageDecodeToRgba32f(&allocator - , rgba - , mip.m_data - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 - , mip.m_format - ); - - if (TextureFormat::BC5 != mip.m_format) - { - for (uint32_t yy = 0; yy < mip.m_height; ++yy) - { - for (uint32_t xx = 0; xx < mip.m_width; ++xx) - { - const uint32_t offset = (yy*mip.m_width + xx) * 4; - float* inout = &rgba[offset]; - inout[0] = inout[0] * 2.0f - 1.0f; - inout[1] = inout[1] * 2.0f - 1.0f; - inout[2] = inout[2] * 2.0f - 1.0f; - inout[3] = inout[3] * 2.0f - 1.0f; - } - } - } - - imageRgba32f11to01(rgbaDst, dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba); - imageEncodeFromRgba32f(&allocator, output->m_data, rgbaDst, dstMip.m_width, dstMip.m_height, format); - - for (uint8_t lod = 1; lod < numMips; ++lod) - { - imageRgba32fDownsample2x2NormalMap(rgba, dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba); - imageRgba32f11to01(rgbaDst, dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba); - imageGetRawData(*output, 0, lod, output->m_data, output->m_size, dstMip); - uint8_t* data = const_cast(dstMip.m_data); - imageEncodeFromRgba32f(&allocator, data, rgbaDst, dstMip.m_width, dstMip.m_height, format); - } - - BX_FREE(&allocator, rgbaDst); - } - else if (8 != getBlockInfo(input->m_format).rBits) - { - output = imageAlloc(&allocator, format, uint16_t(mip.m_width), uint16_t(mip.m_height), 0, 1, false, mips); - - ImageMip dstMip; - imageGetRawData(*output, 0, 0, NULL, 0, dstMip); - - if (mip.m_width != dstMip.m_width - && mip.m_height != dstMip.m_height) - { - printf("Invalid input image size %dx%d, it must be at least %dx%d to be converted to %s format.\n" - , mip.m_width - , mip.m_height - , dstMip.m_width - , dstMip.m_height - , getName(format) - ); - return EXIT_FAILURE; - } - - uint32_t size = imageGetSize( - NULL - , uint16_t(dstMip.m_width) - , uint16_t(dstMip.m_height) - , 0 - , false - , false - , 1 - , TextureFormat::RGBA32F - ); - temp = BX_ALLOC(&allocator, size); - float* rgba = (float*)temp; - float* rgbaDst = (float*)BX_ALLOC(&allocator, size); - - imageDecodeToRgba32f(&allocator - , rgba - , mip.m_data - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 - , mip.m_format - ); - imageEncodeFromRgba32f(&allocator, output->m_data, rgba, dstMip.m_width, dstMip.m_height, format); - - imageRgba32fToLinear(rgba - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 - , rgba - ); - - for (uint8_t lod = 1; lod < numMips; ++lod) - { - imageRgba32fLinearDownsample2x2(rgba, dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba); - imageGetRawData(*output, 0, lod, output->m_data, output->m_size, dstMip); - uint8_t* data = const_cast(dstMip.m_data); - - imageRgba32fToGamma(rgbaDst - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 - , rgba - ); - - imageEncodeFromRgba32f(&allocator, data, rgbaDst, dstMip.m_width, dstMip.m_height, format); - } - - BX_FREE(&allocator, rgbaDst); - } - else - { - output = imageAlloc(&allocator, format, uint16_t(mip.m_width), uint16_t(mip.m_height), 0, 1, false, mips); - - ImageMip dstMip; - imageGetRawData(*output, 0, 0, NULL, 0, dstMip); - - if (mip.m_width != dstMip.m_width - && mip.m_height != dstMip.m_height) - { - printf("Invalid input image size %dx%d, it must be at least %dx%d to be converted to %s format.\n" - , mip.m_width - , mip.m_height - , dstMip.m_width - , dstMip.m_height - , getName(format) - ); - return EXIT_FAILURE; - } - - uint32_t size = imageGetSize( - NULL - , uint16_t(dstMip.m_width) - , uint16_t(dstMip.m_height) - , 0 - , false - , false - , 1 - , TextureFormat::RGBA8 - ); - temp = BX_ALLOC(&allocator, size); - bx::memSet(temp, 0, size); - uint8_t* rgba = (uint8_t*)temp; - - imageDecodeToRgba8(rgba - , mip.m_data - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 - , mip.m_format - ); - - void* ref = NULL; - if (iqa) - { - ref = BX_ALLOC(&allocator, size); - bx::memCopy(ref, rgba, size); - } - - imageEncodeFromRgba8(output->m_data, rgba, dstMip.m_width, dstMip.m_height, format); - - for (uint8_t lod = 1; lod < numMips; ++lod) - { - imageRgba8Downsample2x2(rgba, dstMip.m_width, dstMip.m_height, dstMip.m_width*4, rgba); - imageGetRawData(*output, 0, lod, output->m_data, output->m_size, dstMip); - uint8_t* data = const_cast(dstMip.m_data); - imageEncodeFromRgba8(data, rgba, dstMip.m_width, dstMip.m_height, format); - } - - if (NULL != ref) - { - imageDecodeToRgba8(rgba - , output->m_data - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 - , format - ); - - static const iqa_ssim_args args = - { - 0.39f, // alpha - 0.731f, // beta - 1.12f, // gamma - 187, // L - 0.025987f, // K1 - 0.0173f, // K2 - 1 // factor - }; - - float result = iqa_ssim( (uint8_t*)ref - , rgba - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 - , 0 - , &args - ); - printf("%f\n", result); - - BX_FREE(&allocator, ref); - } - } - - BX_FREE(&allocator, temp); - } - - if (NULL != output) - { - bx::CrtFileWriter writer; - if (bx::open(&writer, outputFileName) ) - { - if (NULL != bx::stristr(outputFileName, ".ktx") ) - { - imageWriteKtx(&writer, *output, output->m_data, output->m_size); - } - - bx::close(&writer); - } - else - { - help("Failed to open output file."); - return EXIT_FAILURE; - } - - imageFree(output); - } - else - { - help("No output generated."); - return EXIT_FAILURE; - } - } - else - { - help("Failed to load input file."); - return EXIT_FAILURE; - } - } - - return EXIT_SUCCESS; -} diff --git a/3rdparty/bgfx/tools/texturev/common.sh b/3rdparty/bgfx/tools/texturev/common.sh new file mode 100644 index 0000000..8518cd1 --- /dev/null +++ b/3rdparty/bgfx/tools/texturev/common.sh @@ -0,0 +1,28 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include + +uniform vec4 u_params; +#define u_textureLod u_params.x +#define u_textureLayer u_params.y +#define u_inLinear u_params.z +#define u_ev u_params.w + +vec3 toLinear(vec3 _rgb) +{ + return pow(abs(_rgb), vec3_splat(2.2) ); +} + +vec3 toGamma(vec3 _rgb) +{ + return pow(abs(_rgb), vec3_splat(1.0/2.2) ); +} + +vec4 toEv(vec4 _color) +{ + vec3 rgb = mix(toLinear(_color.xyz), _color.xyz, u_inLinear); + return vec4(toGamma(rgb * pow(2.0, u_ev) ), _color.w); +} diff --git a/3rdparty/bgfx/tools/texturev/fs_texture.bin.h b/3rdparty/bgfx/tools/texturev/fs_texture.bin.h index 7cec18a..976a9bf 100644 --- a/3rdparty/bgfx/tools/texturev/fs_texture.bin.h +++ b/3rdparty/bgfx/tools/texturev/fs_texture.bin.h @@ -1,94 +1,497 @@ -static const uint8_t fs_texture_glsl[315] = +static const uint8_t fs_texture_glsl[597] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, // Color.......u_pa - 0x72, 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x76, 0x61, // rams..........va + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x26, 0x02, 0x00, 0x00, 0x76, 0x61, // olor......&...va 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // v_color0;.varyi - 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, // ng highp vec2 v_ + 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, // ng highp vec3 v_ 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, // texcoord0;.unifo - 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, // rm sampler2D s_t - 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // exColor;.uniform - 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, // highp vec4 u_pa - 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, // rams;.void main - 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // ().{. lowp vec4 - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_1;. tmp - 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, // var_1 = texture2 - 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // DLod (s_texCo - 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // lor, v_texcoord0 - 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, // , u_params.x);. - 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, // gl_FragColor = - 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, // (tmpvar_1 * v_co - 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // lor0);.}... + 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, // rm highp vec4 u_ + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // params;.uniform + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // sampler2D s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, // olor;.void main + 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, // ().{. mediump v + 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, // ec4 tmpvar_1;. + 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // lowp vec4 _color + 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x20, 0x3d, // _2;. _color_2 = + 0x20, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, // (texture2DLod + 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, // (s_texColor, v + 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x75, // _texcoord0.xy, u + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, // _params.x) * v_c + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, // olor0);. lowp v + 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, // ec4 tmpvar_3;. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x70, // tmpvar_3.xyz = p + 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, // ow (abs((. mi + 0x78, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x63, 0x6f, 0x6c, // x (pow (abs(_col + 0x6f, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, // or_2.xyz), vec3( + 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x29, 0x29, 0x2c, // 2.2, 2.2, 2.2)), + 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x75, // _color_2.xyz, u + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x7a, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2a, 0x20, // _params.z). * + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, 0x70, 0x32, 0x28, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // . exp2(u_para + 0x6d, 0x73, 0x2e, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, // ms.w). )), vec3 + 0x28, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, // (0.4545454, 0.45 + 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, // 45454, 0.4545454 + 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2e, 0x77, // ));. tmpvar_3.w + 0x20, 0x3d, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x3b, 0x0a, 0x20, // = _color_2.w;. + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpvar_1 = tmpv + 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, // ar_3;. gl_FragC + 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // olor = tmpvar_1; + 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... }; -static const uint8_t fs_texture_dx9[365] = +static const uint8_t fs_texture_spv[5518] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x70, 0x15, 0x00, 0x00, 0x03, 0x02, 0x23, // ams......p.....# + 0x07, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // .........Ta..... + 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... + 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, // .w...t.......... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, // n........a...Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, // xSampler2D...... + 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, // .a.......m_sampl + 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, // er.......a...... + 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x10, // .m_texture...... + 0x00, 0xce, 0x14, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // .....bgfxTexture + 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, // 2DLod(struct-Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, // xSampler2D-p1-t2 + 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // 11;vf2;f1;...... + 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, // .'..._sampler... + 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, // ........._coord. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, // ........._level. + 0x00, 0x05, 0x00, 0x07, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x6d, 0x69, 0x78, 0x28, 0x76, 0x66, 0x33, // .....0...mix(vf3 + 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, // ;vf3;vf3;....... + 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, // ....._a......... + 0x00, 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x5f, 0x74, 0x00, // ._b.........._t. + 0x00, 0x05, 0x00, 0x06, 0x00, 0x01, 0x14, 0x00, 0x00, 0x76, 0x65, 0x63, 0x33, 0x5f, 0x73, 0x70, // .........vec3_sp + 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x9f, 0x1e, 0x00, // lat(f1;......... + 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, // ._x......5...vec + 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, // 4_splat(f1;..... + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x91, 0x0e, 0x00, // ....._x......... + 0x00, 0x74, 0x6f, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x28, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, // .toLinear(vf3;.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xd2, 0x38, 0x00, 0x00, 0x5f, 0x72, 0x67, 0x62, 0x00, 0x00, 0x00, // ......8.._rgb... + 0x00, 0x05, 0x00, 0x06, 0x00, 0x74, 0x13, 0x00, 0x00, 0x74, 0x6f, 0x47, 0x61, 0x6d, 0x6d, 0x61, // .....t...toGamma + 0x28, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xfd, 0x15, 0x00, // (vf3;........... + 0x00, 0x5f, 0x72, 0x67, 0x62, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x65, 0x0c, 0x00, // ._rgb........e.. + 0x00, 0x74, 0x6f, 0x45, 0x76, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .toEv(vf4;...... + 0x00, 0xa4, 0x11, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, // ....._color..... + 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, // .....@main(vf4;v + 0x66, 0x33, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xdc, 0x40, 0x00, // f3;vf4;.......@. + 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .v_color0....... + 0x00, 0x45, 0x37, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // .E7..v_texcoord0 + 0x00, 0x05, 0x00, 0x06, 0x00, 0xbc, 0x4a, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // ......J..gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, // Data_0_......C.. + 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, // .s_texColor..... + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, // .....s_texColorS + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, // ampler.......... + 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, // .s_texColorTextu + 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xee, 0x42, 0x00, 0x00, 0x70, 0x61, 0x72, // re........B..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x0d, 0x44, 0x00, 0x00, 0x70, 0x61, 0x72, // am........D..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x6b, 0x17, 0x00, 0x00, 0x72, 0x67, 0x62, // am.......k...rgb + 0x00, 0x05, 0x00, 0x04, 0x00, 0x56, 0x42, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .....VB..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x80, 0x09, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, // .........$Global + 0x00, 0x06, 0x00, 0x06, 0x00, 0x80, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x80, 0x09, 0x00, // iewRect......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, // .....u_viewTexel + 0x00, 0x06, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x80, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, // iew............. + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // .u_invView...... + 0x00, 0x80, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, // .........u_proj. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x80, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x80, 0x09, 0x00, // nvProj.......... + 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // .....u_viewProj. + 0x00, 0x06, 0x00, 0x07, 0x00, 0x80, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // nvViewProj...... + 0x00, 0x80, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x00, 0x06, 0x00, 0x06, 0x00, 0x80, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .............u_m + 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x80, 0x09, 0x00, // odelView........ + 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x80, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, // Proj............ + 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x06, // .u_alphaRef4.... + 0x00, 0x80, 0x09, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, // .........u_param + 0x73, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // s........B...... + 0x00, 0x05, 0x00, 0x04, 0x00, 0xc6, 0x54, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......T..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xb0, 0x37, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......7..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xd6, 0x37, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......7..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xd2, 0x37, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......7..param.. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, // .........bgfx_Vo + 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x94, 0x44, 0x00, // idFrag........D. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, // .param.......... + 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x57, 0x00, // .color........W. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xb5, 0x20, 0x00, // .param........ . + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xee, 0x20, 0x00, // .param........ . + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x88, 0x1e, 0x00, // .param.......... + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, // .param........A. + 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .v_color0....... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, // .w...v_color0... + 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ......<..v_texco + 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, // ord0.....t...v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, // excoord0........ + 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, // .gl_FragData_0_. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......G..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......U..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .........param.. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // .........gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, // Data_0_..G...... + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, // .".......G...... + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, // .!.......G...... + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, // .".......G...... + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x06, 0x0b, 0x00, // .!.......G...... + 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, // .....@...H...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x80, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x04, 0x00, 0x80, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, // . ...H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x80, 0x09, 0x00, // .........H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, // .........H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0x80, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0x80, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x80, 0x09, 0x00, // .........H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, // .........H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x80, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0x80, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, // . ...H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x80, 0x09, 0x00, // .........H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, // .........H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0x80, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0x80, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x80, 0x09, 0x00, // .........H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, // .........H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x80, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0x80, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x80, 0x09, 0x00, // .........H...... + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#... ...H.. + 0x00, 0x80, 0x09, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, // .........#...0.. + 0x00, 0x47, 0x00, 0x03, 0x00, 0x80, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .G...........G.. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .B...".......G.. + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .w...........G.. + 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .t...........G.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, // ................ + 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, // .....!.......... + 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // . .............. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, // .............a.. + 0x00, 0xfc, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, // .....a.......... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x89, 0x04, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, // ................ + 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // . .............. + 0x00, 0x21, 0x00, 0x06, 0x00, 0x75, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, // .!...u.......... + 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xe5, 0x00, 0x00, // .........!...... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0x06, 0x01, 0x00, // .........!...... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0x1f, 0x01, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x7d, 0x00, 0x00, // .........!...}.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x20, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, // . ...........a.. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, 0x00, // .;.......C...... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, // . ...y.......... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, // .;...y.......... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, // . .............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, // .;.............. + 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ......... ...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, // . .............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, // . ...z.......... + 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x76, 0x09, 0x00, 0x00, 0xcd, 0xcc, 0x0c, 0x40, 0x2b, 0x00, 0x04, // .....v......@+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x59, 0x05, 0x00, 0x00, 0x2f, 0xba, 0xe8, 0x3e, 0x18, 0x00, 0x04, // .....Y.../..>... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // .e.............. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // .....j... ...... + 0x00, 0x06, 0x0b, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, // .....e...j...... + 0x00, 0x80, 0x09, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .............e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x06, 0x0b, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.......e...e.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x3a, 0x00, 0x00, // ......... ...:.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x3a, 0x00, 0x00, // .........;...:.. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .B.......+...... + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ./.......+...... + 0x00, 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ........@+...... + 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // .........+...... + 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // .........;...... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // .w....... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // .........;...... + 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .t....... ...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // .........6...... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, // ................ + 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, // .Sa..;........G. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, // .....;........U. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, // .....;.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, // .....=.......!C. + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, // .....=........3. + 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, // .....P...a.... . + 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, // .!C...3..>...C.. + 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, // .. ..=........A. + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, // .w...=........<. + 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, // .t...>....G...A. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, // .>....U...<..9.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0xc9, 0x47, 0x00, // ......&.......G. + 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ..U......=...... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, // .........>...... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .........8...6.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x04, 0x00, // ................ + 0x00, 0x37, 0x00, 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......'...7.. + 0x00, 0x90, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, // .........7...... + 0x00, 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, 0x05, // .........$T..A.. + 0x00, 0x14, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, // .........'...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, 0x00, // .=.......m)..... + 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, 0x00, // .A...z....U..'.. + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, 0x00, // .....=........N. + 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, 0x00, // ..U..V.......29. + 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, // .m)...N..=...... + 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........=...... + 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // .=>......X...... + 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, 0x00, // .....29......... + 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x01, // .=>..........8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......0...... + 0x00, 0x75, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc6, 0x0e, 0x00, // .u...7.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, // .7...........7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x6d, 0x51, 0x00, // .............mQ. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x48, 0x1b, 0x00, 0x00, 0xc6, 0x0e, 0x00, // .=.......H...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x5e, 0x40, 0x00, 0x00, 0xc7, 0x0e, 0x00, // .=.......^@..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x65, 0x3f, 0x00, 0x00, 0xd9, 0x0e, 0x00, // .=.......e?..... + 0x00, 0x0c, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x5a, 0x42, 0x00, 0x00, 0x01, 0x00, 0x00, // .........ZB..... + 0x00, 0x2e, 0x00, 0x00, 0x00, 0x48, 0x1b, 0x00, 0x00, 0x5e, 0x40, 0x00, 0x00, 0x65, 0x3f, 0x00, // .....H...^@..e?. + 0x00, 0xfe, 0x00, 0x02, 0x00, 0x5a, 0x42, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .....ZB..8...6.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, // ................ + 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x9f, 0x1e, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.............. + 0x00, 0xb1, 0x24, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x75, 0x56, 0x00, // ..$..=.......uV. + 0x00, 0x9f, 0x1e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x23, 0x4f, 0x00, // .....=.......#O. + 0x00, 0x9f, 0x1e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6d, 0x38, 0x00, // .....=.......m8. + 0x00, 0x9f, 0x1e, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd9, 0x20, 0x00, // .....P........ . + 0x00, 0x75, 0x56, 0x00, 0x00, 0x23, 0x4f, 0x00, 0x00, 0x6d, 0x38, 0x00, 0x00, 0xfe, 0x00, 0x02, // .uV..#O..m8..... + 0x00, 0xd9, 0x20, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .. ..8...6...... + 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .5...........7.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x55, 0x45, 0x00, // .............UE. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5c, 0x60, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........`..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa1, 0x57, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........W..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x08, 0x29, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........)..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1b, 0x29, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........)..... + 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7d, 0x41, 0x00, 0x00, 0x5c, 0x60, 0x00, // .P.......}A...`. + 0x00, 0xa1, 0x57, 0x00, 0x00, 0x08, 0x29, 0x00, 0x00, 0x1b, 0x29, 0x00, 0x00, 0xfe, 0x00, 0x02, // ..W...)...)..... + 0x00, 0x7d, 0x41, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, // .}A..8...6...... + 0x00, 0x91, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, // .............7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xd2, 0x38, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x0d, 0x36, 0x00, // ......8.......6. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xee, 0x42, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........B..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x8d, 0x51, 0x00, 0x00, 0xd2, 0x38, 0x00, // .=........Q...8. + 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3d, 0x19, 0x00, 0x00, 0x01, 0x00, 0x00, // .........=...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x8d, 0x51, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xee, 0x42, 0x00, // ......Q..>....B. + 0x00, 0x76, 0x09, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x17, 0x44, 0x00, // .v...9........D. + 0x00, 0x01, 0x14, 0x00, 0x00, 0xee, 0x42, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, // ......B......... + 0x00, 0x33, 0x35, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x3d, 0x19, 0x00, // .35..........=.. + 0x00, 0x17, 0x44, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x33, 0x35, 0x00, 0x00, 0x38, 0x00, 0x01, // ..D......35..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x74, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......t...... + 0x00, 0x06, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xfd, 0x15, 0x00, // .....7.......... + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x9a, 0x35, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ......5..;...... + 0x00, 0x0d, 0x44, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // ..D......=...... + 0x00, 0x73, 0x39, 0x00, 0x00, 0xfd, 0x15, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // .s9............. + 0x00, 0x5c, 0x1a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x73, 0x39, 0x00, // .............s9. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0d, 0x44, 0x00, 0x00, 0x59, 0x05, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....D..Y...9.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x36, 0x45, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x0d, 0x44, 0x00, // .....6E.......D. + 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0xf9, 0x4d, 0x00, 0x00, 0x01, 0x00, 0x00, // ..........M..... + 0x00, 0x1a, 0x00, 0x00, 0x00, 0x5c, 0x1a, 0x00, 0x00, 0x36, 0x45, 0x00, 0x00, 0xfe, 0x00, 0x02, // .........6E..... + 0x00, 0xf9, 0x4d, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // ..M..8...6...... + 0x00, 0x65, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, // .e...........7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xb0, 0x2c, 0x00, // ..............,. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x56, 0x42, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......VB..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc6, 0x54, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........T..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xb0, 0x37, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........7..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xd6, 0x37, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........7..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xd2, 0x37, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........7..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe2, 0x34, 0x00, 0x00, 0xa4, 0x11, 0x00, // .=........4..... + 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xbb, 0x38, 0x00, 0x00, 0xe2, 0x34, 0x00, // .O........8...4. + 0x00, 0xe2, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // ..4............. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x56, 0x42, 0x00, 0x00, 0xbb, 0x38, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...VB...8..9.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0xb7, 0x19, 0x00, 0x00, 0x91, 0x0e, 0x00, 0x00, 0x56, 0x42, 0x00, // .............VB. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x25, 0x56, 0x00, 0x00, 0x42, 0x13, 0x00, // .A.......%V..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ./.......=...... + 0x00, 0x1f, 0x40, 0x00, 0x00, 0x25, 0x56, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // ..@..%V..P...... + 0x00, 0x33, 0x5d, 0x00, 0x00, 0x1f, 0x40, 0x00, 0x00, 0x1f, 0x40, 0x00, 0x00, 0x1f, 0x40, 0x00, // .3]...@...@...@. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc6, 0x54, 0x00, 0x00, 0xb7, 0x19, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>....T......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd8, 0x1b, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0x4f, 0x00, 0x08, // .............O.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0xf1, 0x35, 0x00, 0x00, 0xd8, 0x1b, 0x00, 0x00, 0xd8, 0x1b, 0x00, // ......5......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, // .............>.. + 0x00, 0xb0, 0x37, 0x00, 0x00, 0xf1, 0x35, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd6, 0x37, 0x00, // ..7...5..>....7. + 0x00, 0x33, 0x5d, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x6b, 0x17, 0x00, // .3]..9.......k.. + 0x00, 0x30, 0x0c, 0x00, 0x00, 0xc6, 0x54, 0x00, 0x00, 0xb0, 0x37, 0x00, 0x00, 0xd6, 0x37, 0x00, // .0....T...7...7. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x33, 0x51, 0x00, 0x00, 0x42, 0x13, 0x00, // .A.......3Q..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ./.......=...... + 0x00, 0xbc, 0x45, 0x00, 0x00, 0x33, 0x51, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, // ..E..3Q......... + 0x00, 0x9c, 0x36, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, // ..6............. + 0x00, 0xbc, 0x45, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x06, 0x27, 0x00, // ..E...........'. + 0x00, 0x6b, 0x17, 0x00, 0x00, 0x9c, 0x36, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd2, 0x37, 0x00, // .k....6..>....7. + 0x00, 0x06, 0x27, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3e, 0x3c, 0x00, // ..'..9.......><. + 0x00, 0x74, 0x13, 0x00, 0x00, 0xd2, 0x37, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, // .t....7..A...... + 0x00, 0x38, 0x56, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .8V..........=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xdb, 0x40, 0x00, 0x00, 0x38, 0x56, 0x00, 0x00, 0x51, 0x00, 0x05, // ......@..8V..Q.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd7, 0x31, 0x00, 0x00, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, // ......1..><..... + 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd0, 0x41, 0x00, 0x00, 0x3e, 0x3c, 0x00, // .Q........A..><. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf7, 0x5b, 0x00, // .....Q........[. + 0x00, 0x3e, 0x3c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // .><......P...... + 0x00, 0x97, 0x52, 0x00, 0x00, 0xd7, 0x31, 0x00, 0x00, 0xd0, 0x41, 0x00, 0x00, 0xf7, 0x5b, 0x00, // ..R...1...A...[. + 0x00, 0xdb, 0x40, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x97, 0x52, 0x00, 0x00, 0x38, 0x00, 0x01, // ..@.......R..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x7d, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xdc, 0x40, 0x00, // .}...7........@. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x45, 0x37, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......E7..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xbc, 0x4a, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xf0, 0x53, 0x00, // ......J.......S. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x94, 0x44, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........D..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x04, 0x57, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........W..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0xb5, 0x20, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........ ..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xee, 0x20, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........ ..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x88, 0x1e, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.............. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x94, 0x44, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....D......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x94, 0x44, 0x00, // .........5....D. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0x53, 0x41, 0x00, 0x00, 0x43, 0x12, 0x00, // .=...a...SA..C.. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x04, 0x57, 0x00, 0x00, 0x53, 0x41, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>....W..SA..=.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x49, 0x21, 0x00, 0x00, 0x45, 0x37, 0x00, 0x00, 0x4f, 0x00, 0x07, // .....I!..E7..O.. + 0x00, 0x13, 0x00, 0x00, 0x00, 0x68, 0x38, 0x00, 0x00, 0x49, 0x21, 0x00, 0x00, 0x49, 0x21, 0x00, // .....h8..I!..I!. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb5, 0x20, 0x00, // .........>.... . + 0x00, 0x68, 0x38, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xb0, 0x48, 0x00, // .h8..A........H. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x4c, 0x51, 0x00, 0x00, 0xb0, 0x48, 0x00, 0x00, 0x3e, 0x00, 0x03, // .....LQ...H..>.. + 0x00, 0xee, 0x20, 0x00, 0x00, 0x4c, 0x51, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // .. ..LQ..9...... + 0x00, 0x18, 0x0e, 0x00, 0x00, 0xce, 0x14, 0x00, 0x00, 0x04, 0x57, 0x00, 0x00, 0xb5, 0x20, 0x00, // ..........W... . + 0x00, 0xee, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xea, 0x5b, 0x00, // .. ..=........[. + 0x00, 0xdc, 0x40, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdf, 0x25, 0x00, // ..@...........%. + 0x00, 0x18, 0x0e, 0x00, 0x00, 0xea, 0x5b, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x88, 0x1e, 0x00, // ......[..>...... + 0x00, 0xdf, 0x25, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x05, 0x3f, 0x00, // ..%..9........?. + 0x00, 0x65, 0x0c, 0x00, 0x00, 0x88, 0x1e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xbc, 0x4a, 0x00, // .e.......>....J. + 0x00, 0x05, 0x3f, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..?......8.... +}; +static const uint8_t fs_texture_dx9[623] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, // Color0......u_pa - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x40, 0x01, 0x00, 0x03, 0xff, 0xff, // rams......@..... - 0xfe, 0xff, 0x2f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x83, 0x00, 0x00, 0x00, // ../.CTAB........ - 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ - 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // |...D........... - 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // P.......`....... - 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // ....l.......s_te - 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, // xColor.......... - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, // ........u_params - 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro - 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 - 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // .0.10011.16384.. - 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, // Q..........?.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, // ................ - 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, // ................ - 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x01, 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, 0x02, // ................ - 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ........_....... - 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x0f, 0x80, // ................ - 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x03, // rams......@..... + 0xff, 0xff, 0xfe, 0xff, 0x2f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x83, 0x00, // ..../.CTAB...... + 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ + 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ..|...D......... + 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, // ..P.......`..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, // ......l.......s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, // texColor........ + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // ..........u_para + 0x6d, 0x73, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, // ms.............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......ps_3_0.Mic + 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler + 0x36, 0x2e, 0x33, 0x2e, 0x39, 0x36, 0x30, 0x30, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // 6.3.9600.16384.. + 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, // ..Q..........?.. + 0x00, 0x00, 0xcd, 0xcc, 0x0c, 0x40, 0x2f, 0xba, 0xe8, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // .....@/..>...... + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x01, 0x00, 0xc4, 0x90, 0x01, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, // .........._..... + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, // ................ + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, // ................ + 0x01, 0x80, 0x01, 0x00, 0x00, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, 0x01, 0x00, // ................ + 0x55, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xaa, 0x8b, 0x01, 0x00, // U............... + 0x00, 0x02, 0x00, 0x08, 0x08, 0x80, 0x01, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, // ................ + 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xaa, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, // ................ + 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, 0x01, 0x00, // ................ + 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x04, 0x00, // U............... + 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x02, 0x00, // ................ + 0xe4, 0x81, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, // ................ + 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x8b, 0x0f, 0x00, // ................ + 0x00, 0x02, 0x01, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, // ........U....... + 0x04, 0x80, 0x00, 0x00, 0xaa, 0x8b, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, // ................ + 0xe4, 0x80, 0x01, 0x00, 0xff, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x01, 0x80, 0x00, 0x00, // ................ + 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0e, 0x00, // ............U... + 0x00, 0x02, 0x00, 0x08, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... }; -static const uint8_t fs_texture_dx11[444] = +static const uint8_t fs_texture_dx11[766] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par 0x61, 0x6d, 0x73, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC - 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x8c, 0x01, 0x44, 0x58, 0x42, 0x43, // olor0.......DXBC - 0xb9, 0x1c, 0x87, 0x4c, 0x82, 0x98, 0xc2, 0x74, 0x81, 0x9e, 0xa8, 0x24, 0xac, 0xbe, 0xee, 0x7b, // ...L...t...$...{ - 0x01, 0x00, 0x00, 0x00, 0x8c, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,... - 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl... - 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........P....... - 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ - 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ - 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........b....... - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // ................ - 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, // SV_POSITION.COLO - 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, // R.TEXCOORD..OSGN - 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET... - 0x53, 0x48, 0x44, 0x52, 0xb0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // SHDR....@...,... - 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // Y...F. ......... - 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, // Z....`......X... - 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, // .p......UU..b... - 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, // ........b...2... - 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....e.... ...... - 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, // h.......H....... - 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, // ....F.......F~.. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, // .....`........ . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x20, 0x10, 0x00, // ........8.... .. - 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // ....F.......F... - 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // ....>....... + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x44, 0x58, // olor0.........DX + 0x42, 0x43, 0xab, 0xa0, 0x24, 0x5b, 0x96, 0x54, 0x64, 0xb7, 0x42, 0xe5, 0xe8, 0xdd, 0xe9, 0x4c, // BC..$[.Td.B....L + 0x84, 0x1c, 0x01, 0x00, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // ..............,. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, // ..........ISGNl. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........P..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........b..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x03, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO + 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, // LOR.TEXCOORD..OS + 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET. + 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xf0, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x7c, 0x00, // ..SHDR....@...|. + 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..Y...F. ....... + 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, // ..Z....`......X. + 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, // ...p......UU..b. + 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, // ..........b...2. + 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......e.... .... + 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, // ..h.......H..... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, // ......F.......F~ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, // .......`........ + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, // .........8..... + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, // ......F.......F. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x06, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, // ....../...r..... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, // ..F...........6. + 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, // ... ......:..... + 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, // ..8...r.......F. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x0c, 0x40, 0xcd, 0xcc, // .......@.....@.. + 0x0c, 0x40, 0xcd, 0xcc, 0x0c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x05, 0x72, 0x00, // .@...@........r. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, // ......F.......2. + 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // ..r.......F..... + 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, // ..F.......F...A. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2...r..... + 0x00, 0x00, 0xa6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // .... .........F. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x19, 0x00, // ......F......... + 0x00, 0x06, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, // ..........:. ... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8...r..... + 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // ..........F..... + 0x00, 0x00, 0x2f, 0x00, 0x00, 0x06, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // ../...r.......F. + 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0x72, 0x00, // ..........8...r. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, // ......F........@ + 0x00, 0x00, 0x2f, 0xba, 0xe8, 0x3e, 0x2f, 0xba, 0xe8, 0x3e, 0x2f, 0xba, 0xe8, 0x3e, 0x00, 0x00, // ../..>/..>/..>.. + 0x00, 0x00, 0x19, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // ......r ......F. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // ......>....... }; -static const uint8_t fs_texture_mtl[699] = +static const uint8_t fs_texture_mtl[949] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xac, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...........us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . float4 v_colo - 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, // r0;. float2 v_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, // excoord0;.};.str - 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // uct xlatMtlShade - 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, // rOutput {. half + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x97, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, // ams..........usi + 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, // ng namespace met + 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // al;.struct xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, // tlShaderInput {. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // float4 v_color + 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, // 0;. float3 v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // xcoord0;.};.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // Output {. float 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, // 4 gl_FragColor;. 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // };.struct xlatMt 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, // lShaderUniform { @@ -109,19 +512,36 @@ static const uint8_t fs_texture_mtl[699] = 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, // _texColor [[samp 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, // ler(0)]]).{. xl 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu - 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, // t _mtl_o;. half - 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // 4 tmpvar_1;. tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x73, // pvar_1 = half4(s + 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // t _mtl_o;. floa + 0x74, 0x34, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, // t4 _color_1 = 0; + 0x0a, 0x20, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x28, 0x73, // . _color_1 = (s 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, // _texColor.sample 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // (_mtlsmp_s_texCo 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x29, 0x28, 0x5f, 0x6d, // lor, (float2)(_m 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // tl_i.v_texcoord0 - 0x29, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // ), level(_mtl_u. - 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, // u_params.x)));. - 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, // _mtl_o.gl_FragC - 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x29, 0x28, // olor = ((half4)( - 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // (float4)tmpvar_1 - 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // * _mtl_i.v_colo - 0x72, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, // r0));. return _ - 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mtl_o;.}... + 0x2e, 0x78, 0x79, 0x29, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x5f, 0x6d, 0x74, 0x6c, // .xy), level(_mtl + 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x29, 0x20, // _u.u_params.x)) + 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // * _mtl_i.v_color + 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, // 0);. float4 tmp + 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // var_2 = 0;. tmp + 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x77, 0x20, // var_2.xyz = pow + 0x28, 0x61, 0x62, 0x73, 0x28, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, 0x78, 0x20, 0x28, // (abs((. mix ( + 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, // pow (abs(_color_ + 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, 0x32, // 1.xyz), float3(2 + 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x29, 0x29, 0x2c, 0x20, // .2, 2.2, 2.2)), + 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x5f, 0x6d, // _color_1.xyz, _m + 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x7a, 0x29, // tl_u.u_params.z) + 0x0a, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, 0x70, 0x32, 0x28, // . * . exp2( + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, // _mtl_u.u_params. + 0x77, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, // w). )), float3( + 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, // 0.4545454, 0.454 + 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x29, // 5454, 0.4545454) + 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x20, // );. tmpvar_2.w + 0x3d, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x3b, 0x0a, 0x20, 0x20, // = _color_1.w;. + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, // _mtl_o.gl_FragCo + 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, // lor = tmpvar_2;. + 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // return _mtl_o; + 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... }; +extern const uint8_t* fs_texture_pssl; +extern const uint32_t fs_texture_pssl_size; diff --git a/3rdparty/bgfx/tools/texturev/fs_texture.sc b/3rdparty/bgfx/tools/texturev/fs_texture.sc index 380888e..07994ca 100644 --- a/3rdparty/bgfx/tools/texturev/fs_texture.sc +++ b/3rdparty/bgfx/tools/texturev/fs_texture.sc @@ -1,19 +1,16 @@ $input v_texcoord0, v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ -#include +#include "common.sh" SAMPLER2D(s_texColor, 0); -uniform vec4 u_params; -#define u_textureLod u_params.x - void main() { - vec4 color = texture2DLod(s_texColor, v_texcoord0, u_textureLod); - gl_FragColor = color * v_color0; + vec4 color = texture2DLod(s_texColor, v_texcoord0.xy, u_textureLod); + gl_FragColor = toEv(color * v_color0); } diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_3d.bin.h b/3rdparty/bgfx/tools/texturev/fs_texture_3d.bin.h new file mode 100644 index 0000000..84c0483 --- /dev/null +++ b/3rdparty/bgfx/tools/texturev/fs_texture_3d.bin.h @@ -0,0 +1,567 @@ +static const uint8_t fs_texture_3d_glsl[678] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x77, 0x02, 0x00, 0x00, 0x76, 0x61, // olor......w...va + 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4 + 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // v_color0;.varyi + 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, // ng highp vec3 v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, // texcoord0;.unifo + 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, // rm highp vec4 u_ + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // params;.uniform + 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x33, 0x44, 0x20, 0x73, // lowp sampler3D s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // _texColor;.void + 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, // main ().{. high + 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // p vec3 tmpvar_1; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, // . tmpvar_1.xy = + 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x3b, // v_texcoord0.xy; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, // . tmpvar_1.z = + 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x6d, 0x65, // u_params.y;. me + 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // diump vec4 tmpva + 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // r_2;. lowp vec4 + 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x63, 0x6f, // _color_3;. _co + 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // lor_3 = (texture + 0x33, 0x44, 0x4c, 0x6f, 0x64, 0x45, 0x58, 0x54, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // 3DLodEXT (s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2c, 0x20, // olor, tmpvar_1, + 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x5f, // u_params.x) * v_ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, // color0);. lowp + 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, // vec4 tmpvar_4;. + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, // tmpvar_4.xyz = + 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, // pow (abs((. m + 0x69, 0x78, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x63, 0x6f, // ix (pow (abs(_co + 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, // lor_3.xyz), vec3 + 0x28, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x29, 0x29, // (2.2, 2.2, 2.2)) + 0x2c, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, // , _color_3.xyz, + 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x7a, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2a, // u_params.z). * + 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, 0x70, 0x32, 0x28, 0x75, 0x5f, 0x70, 0x61, 0x72, // . exp2(u_par + 0x61, 0x6d, 0x73, 0x2e, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, // ams.w). )), vec + 0x33, 0x28, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, // 3(0.4545454, 0.4 + 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, // 545454, 0.454545 + 0x34, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, // 4));. tmpvar_4. + 0x77, 0x20, 0x3d, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x2e, 0x77, 0x3b, 0x0a, // w = _color_3.w;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // tmpvar_2 = tmp + 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // var_4;. gl_Frag + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // Color = tmpvar_2 + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // ;.}... +}; +static const uint8_t fs_texture_3d_spv[5622] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd8, 0x15, 0x00, 0x00, 0x03, 0x02, 0x23, // ams............# + 0x07, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // .........Ta..... + 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... + 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, // .w...t.......... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x64, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, // n........d...Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x33, 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, // xSampler3D...... + 0x00, 0x64, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, // .d.......m_sampl + 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x64, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, // er.......d...... + 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x10, // .m_texture...... + 0x00, 0x53, 0x16, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // .S...bgfxTexture + 0x33, 0x44, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, // 3DLod(struct-Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x33, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x33, // xSampler3D-p1-t3 + 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // 11;vf3;f1;...... + 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, // .'..._sampler... + 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, // ........._coord. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, // ........._level. + 0x00, 0x05, 0x00, 0x07, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x6d, 0x69, 0x78, 0x28, 0x76, 0x66, 0x33, // .....0...mix(vf3 + 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, // ;vf3;vf3;....... + 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, // ....._a......... + 0x00, 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x5f, 0x74, 0x00, // ._b.........._t. + 0x00, 0x05, 0x00, 0x06, 0x00, 0x01, 0x14, 0x00, 0x00, 0x76, 0x65, 0x63, 0x33, 0x5f, 0x73, 0x70, // .........vec3_sp + 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x45, 0x37, 0x00, // lat(f1;......E7. + 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, // ._x......5...vec + 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, // 4_splat(f1;..... + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x91, 0x0e, 0x00, // ....._x......... + 0x00, 0x74, 0x6f, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x28, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, // .toLinear(vf3;.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x3f, 0x38, 0x00, 0x00, 0x5f, 0x72, 0x67, 0x62, 0x00, 0x00, 0x00, // .....?8.._rgb... + 0x00, 0x05, 0x00, 0x06, 0x00, 0x74, 0x13, 0x00, 0x00, 0x74, 0x6f, 0x47, 0x61, 0x6d, 0x6d, 0x61, // .....t...toGamma + 0x28, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xfd, 0x15, 0x00, // (vf3;........... + 0x00, 0x5f, 0x72, 0x67, 0x62, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x65, 0x0c, 0x00, // ._rgb........e.. + 0x00, 0x74, 0x6f, 0x45, 0x76, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .toEv(vf4;...... + 0x00, 0xa4, 0x11, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, // ....._color..... + 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, // .....@main(vf4;v + 0x66, 0x33, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x81, 0x59, 0x00, // f3;vf4;.......Y. + 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .v_color0....... + 0x00, 0xcf, 0x58, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // ..X..v_texcoord0 + 0x00, 0x05, 0x00, 0x06, 0x00, 0x65, 0x52, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // .....eR..gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, // Data_0_......C.. + 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, // .s_texColor..... + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, // .....s_texColorS + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, // ampler.......... + 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, // .s_texColorTextu + 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x4a, 0x00, 0x00, 0x70, 0x61, 0x72, // re........J..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x70, 0x61, 0x72, // am........K..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x6b, 0x17, 0x00, 0x00, 0x72, 0x67, 0x62, // am.......k...rgb + 0x00, 0x05, 0x00, 0x04, 0x00, 0xff, 0x49, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......I..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, // .....<...$Global + 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .....<.......u_v + 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, // iewRect......<.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, // .....u_viewTexel + 0x00, 0x06, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .....<.......u_v + 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // iew......<...... + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // .u_invView...... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, // .<.......u_proj. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .....<.......u_i + 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, // nvProj.......<.. + 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // .....u_viewProj. + 0x00, 0x06, 0x00, 0x07, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .....<.......u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // nvViewProj...... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .<.......u_model + 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .....<.......u_m + 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3c, 0x02, 0x00, // odelView.....<.. + 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, // Proj.....<...... + 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x06, // .u_alphaRef4.... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, // .<.......u_param + 0x73, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // s........B...... + 0x00, 0x05, 0x00, 0x04, 0x00, 0x36, 0x43, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .....6C..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x20, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ..... &..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x46, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .....F&..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x42, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .....B&..param.. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, // .........bgfx_Vo + 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3d, 0x4c, 0x00, // idFrag.......=L. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, // .param.......... + 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x74, 0x45, 0x00, // .color.......tE. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x5e, 0x28, 0x00, // .param.......^(. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x28, 0x00, // .param........(. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x31, 0x26, 0x00, // .param.......1&. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, // .param........A. + 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .v_color0....... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, // .w...v_color0... + 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ......<..v_texco + 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, // ord0.....t...v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, // excoord0........ + 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, // .gl_FragData_0_. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......G..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......U..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .........param.. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // .........gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, // Data_0_..G...... + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, // .".......G...... + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, // .!.......G...... + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, // .".......G...... + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4c, 0x0a, 0x00, // .!.......G...L.. + 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .....@...H...<.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.......#...... + 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...<.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // . ...H...<...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...<.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H...<...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...<.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, // . ...H...<...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...<.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H...<...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...<.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H...<...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#... ...H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, // .<.......#...0.. + 0x00, 0x47, 0x00, 0x03, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .G...<.......G.. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .B...".......G.. + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .w...........G.. + 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .t...........G.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, // ................ + 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, // .....!.......... + 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x97, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // . .............. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x64, 0x09, 0x00, // .............d.. + 0x00, 0xfc, 0x01, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1e, 0x00, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .....d.......... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xa6, 0x04, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, // ................ + 0x00, 0x21, 0x00, 0x06, 0x00, 0x75, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, // .!...u.......... + 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xe5, 0x00, 0x00, // .........!...... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0x06, 0x01, 0x00, // .........!...... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0x1f, 0x01, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x7d, 0x00, 0x00, // .........!...}.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x20, 0x00, 0x04, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x64, 0x09, 0x00, // . ...........d.. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, 0x00, // .;.......C...... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, // . ...y.......... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, // .;...y.......... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x00, 0x00, // . .............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, // .;.............. + 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ......... ...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x97, 0x00, 0x00, // . .............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, // . ...z.......... + 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x76, 0x09, 0x00, 0x00, 0xcd, 0xcc, 0x0c, 0x40, 0x2b, 0x00, 0x04, // .....v......@+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x59, 0x05, 0x00, 0x00, 0x2f, 0xba, 0xe8, 0x3e, 0x18, 0x00, 0x04, // .....Y.../..>... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // .e.............. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // .....j... ...... + 0x00, 0x4c, 0x0a, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, // .L...e...j...... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .<...........e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x4c, 0x0a, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...L...e...e.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb9, 0x04, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb9, 0x04, 0x00, // .....<...;...... + 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .B.......+...... + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ./.......+...... + 0x00, 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ........@+...... + 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // .........+...... + 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // .........+...... + 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // .........;...... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // .w....... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // .........;...... + 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .t....... ...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // .........6...... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, // ................ + 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, // .Sa..;........G. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, // .....;........U. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, // .....;.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, // .....=.......!C. + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x97, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, // .....=........3. + 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x64, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, // .....P...d.... . + 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, // .!C...3..>...C.. + 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, // .. ..=........A. + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, // .w...=........<. + 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, // .t...>....G...A. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, // .>....U...<..9.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0xc9, 0x47, 0x00, // ......&.......G. + 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ..U......=...... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, // .........>...... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .........8...6.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x53, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x04, 0x00, // .....S.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......'...7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, // .........7...... + 0x00, 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, 0x05, // .........$T..A.. + 0x00, 0x15, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, // .........'...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x97, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, 0x00, // .=.......m)..... + 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, 0x00, // .A...z....U..'.. + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, 0x00, // .....=........N. + 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, 0x00, // ..U..V.......29. + 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .m)...N..=...... + 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........=...... + 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // .=>......X...... + 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, 0x00, // .....29......... + 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x01, // .=>..........8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......0...... + 0x00, 0x75, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc6, 0x0e, 0x00, // .u...7.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, // .7...........7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x16, 0x59, 0x00, // ..............Y. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x37, 0x54, 0x00, 0x00, 0xc6, 0x0e, 0x00, // .=.......7T..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x07, 0x48, 0x00, 0x00, 0xc7, 0x0e, 0x00, // .=........H..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0e, 0x47, 0x00, 0x00, 0xd9, 0x0e, 0x00, // .=........G..... + 0x00, 0x0c, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x65, 0x19, 0x00, 0x00, 0x01, 0x00, 0x00, // .........e...... + 0x00, 0x2e, 0x00, 0x00, 0x00, 0x37, 0x54, 0x00, 0x00, 0x07, 0x48, 0x00, 0x00, 0x0e, 0x47, 0x00, // .....7T...H...G. + 0x00, 0xfe, 0x00, 0x02, 0x00, 0x65, 0x19, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .....e...8...6.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, // ................ + 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x45, 0x37, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.......E7..... + 0x00, 0x02, 0x2d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1e, 0x5e, 0x00, // ..-..=........^. + 0x00, 0x45, 0x37, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcc, 0x56, 0x00, // .E7..=........V. + 0x00, 0x45, 0x37, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xdd, 0x26, 0x00, // .E7..=........&. + 0x00, 0x45, 0x37, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2a, 0x29, 0x00, // .E7..P.......*). + 0x00, 0x1e, 0x5e, 0x00, 0x00, 0xcc, 0x56, 0x00, 0x00, 0xdd, 0x26, 0x00, 0x00, 0xfe, 0x00, 0x02, // ..^...V...&..... + 0x00, 0x2a, 0x29, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .*)..8...6...... + 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .5...........7.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xa6, 0x4d, 0x00, // ..............M. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcc, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........N..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x11, 0x46, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........F..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb1, 0x30, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........0..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc4, 0x30, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........0..... + 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x49, 0x00, 0x00, 0xcc, 0x4e, 0x00, // .P........I...N. + 0x00, 0x11, 0x46, 0x00, 0x00, 0xb1, 0x30, 0x00, 0x00, 0xc4, 0x30, 0x00, 0x00, 0xfe, 0x00, 0x02, // ..F...0...0..... + 0x00, 0xce, 0x49, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, // ..I..8...6...... + 0x00, 0x91, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, // .............7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0x3f, 0x38, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x5e, 0x3e, 0x00, // .....?8......^>. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x97, 0x4a, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........J..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xfd, 0x3f, 0x00, 0x00, 0x3f, 0x38, 0x00, // .=........?..?8. + 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, // .........,R..... + 0x00, 0x04, 0x00, 0x00, 0x00, 0xfd, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x4a, 0x00, // ......?..>....J. + 0x00, 0x76, 0x09, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x87, 0x32, 0x00, // .v...9........2. + 0x00, 0x01, 0x14, 0x00, 0x00, 0x97, 0x4a, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, // ......J......... + 0x00, 0x84, 0x3d, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x00, // ..=..........,R. + 0x00, 0x87, 0x32, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x84, 0x3d, 0x00, 0x00, 0x38, 0x00, 0x01, // ..2.......=..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x74, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......t...... + 0x00, 0x06, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xfd, 0x15, 0x00, // .....7.......... + 0x00, 0xf8, 0x00, 0x02, 0x00, 0xeb, 0x3d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ......=..;...... + 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // ..K......=...... + 0x00, 0x1c, 0x41, 0x00, 0x00, 0xfd, 0x15, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // ..A............. + 0x00, 0x4b, 0x53, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, 0x41, 0x00, // .KS...........A. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x59, 0x05, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....K..Y...9.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0xa6, 0x33, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0xb6, 0x4b, 0x00, // ......3.......K. + 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x4a, 0x56, 0x00, 0x00, 0x01, 0x00, 0x00, // .........JV..... + 0x00, 0x1a, 0x00, 0x00, 0x00, 0x4b, 0x53, 0x00, 0x00, 0xa6, 0x33, 0x00, 0x00, 0xfe, 0x00, 0x02, // .....KS...3..... + 0x00, 0x4a, 0x56, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .JV..8...6...... + 0x00, 0x65, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, // .e...........7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x3a, 0x4e, 0x00, // .............:N. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xff, 0x49, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........I..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x36, 0x43, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......6C..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;....... &..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x46, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......F&..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x42, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......B&..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x52, 0x23, 0x00, 0x00, 0xa4, 0x11, 0x00, // .=.......R#..... + 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x64, 0x40, 0x00, 0x00, 0x52, 0x23, 0x00, // .O.......d@..R#. + 0x00, 0x52, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // .R#............. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xff, 0x49, 0x00, 0x00, 0x64, 0x40, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....I..d@..9.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x21, 0x00, 0x00, 0x91, 0x0e, 0x00, 0x00, 0xff, 0x49, 0x00, // .....`!.......I. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xce, 0x5d, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........]..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ./.......=...... + 0x00, 0xc8, 0x47, 0x00, 0x00, 0xce, 0x5d, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // ..G...]..P...... + 0x00, 0x5d, 0x1a, 0x00, 0x00, 0xc8, 0x47, 0x00, 0x00, 0xc8, 0x47, 0x00, 0x00, 0xc8, 0x47, 0x00, // .]....G...G...G. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x36, 0x43, 0x00, 0x00, 0x60, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>...6C..`!..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x81, 0x23, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0x4f, 0x00, 0x08, // ......#......O.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x9a, 0x3d, 0x00, 0x00, 0x81, 0x23, 0x00, 0x00, 0x81, 0x23, 0x00, // ......=...#...#. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, // .............>.. + 0x00, 0x20, 0x26, 0x00, 0x00, 0x9a, 0x3d, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x46, 0x26, 0x00, // . &...=..>...F&. + 0x00, 0x5d, 0x1a, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x6b, 0x17, 0x00, // .]...9.......k.. + 0x00, 0x30, 0x0c, 0x00, 0x00, 0x36, 0x43, 0x00, 0x00, 0x20, 0x26, 0x00, 0x00, 0x46, 0x26, 0x00, // .0...6C.. &..F&. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xdc, 0x58, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........X..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ./.......=...... + 0x00, 0x2c, 0x34, 0x00, 0x00, 0xdc, 0x58, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, // .,4...X......... + 0x00, 0x45, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, // .E>............. + 0x00, 0x2c, 0x34, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xaf, 0x2e, 0x00, // .,4............. + 0x00, 0x6b, 0x17, 0x00, 0x00, 0x45, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x42, 0x26, 0x00, // .k...E>..>...B&. + 0x00, 0xaf, 0x2e, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xe7, 0x43, 0x00, // .....9........C. + 0x00, 0x74, 0x13, 0x00, 0x00, 0x42, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, // .t...B&..A...... + 0x00, 0xe1, 0x5d, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // ..]..........=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x84, 0x48, 0x00, 0x00, 0xe1, 0x5d, 0x00, 0x00, 0x51, 0x00, 0x05, // ......H...]..Q.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0xe7, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, // ......9...C..... + 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x79, 0x49, 0x00, 0x00, 0xe7, 0x43, 0x00, // .Q.......yI...C. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x19, 0x00, // .....Q.......!.. + 0x00, 0xe7, 0x43, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // ..C......P...... + 0x00, 0xe8, 0x5a, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0x79, 0x49, 0x00, 0x00, 0x21, 0x19, 0x00, // ..Z...9..yI..!.. + 0x00, 0x84, 0x48, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xe8, 0x5a, 0x00, 0x00, 0x38, 0x00, 0x01, // ..H.......Z..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x7d, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x81, 0x59, 0x00, // .}...7........Y. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xcf, 0x58, 0x00, 0x00, 0x37, 0x00, 0x03, // .7........X..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x65, 0x52, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x99, 0x5b, 0x00, // .....eR.......[. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x3d, 0x4c, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......=L..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x74, 0x45, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......tE..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x5e, 0x28, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......^(..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x97, 0x28, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........(..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x31, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......1&..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3d, 0x4c, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...=L......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x3d, 0x4c, 0x00, // .........5...=L. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcb, 0x3d, 0x00, 0x00, 0xcf, 0x58, 0x00, // .=........=...X. + 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x9a, 0x3a, 0x00, 0x00, 0xcb, 0x3d, 0x00, // .O........:...=. + 0x00, 0xcb, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, // ..=..........A.. + 0x00, 0x8b, 0x02, 0x00, 0x00, 0x91, 0x20, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ...... ..B.../.. + 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9f, 0x5d, 0x00, // .....=........]. + 0x00, 0x91, 0x20, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xab, 0x3b, 0x00, // .. ..Q........;. + 0x00, 0x9a, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ..:......Q...... + 0x00, 0xfb, 0x4a, 0x00, 0x00, 0x9a, 0x3a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x06, // ..J...:......P.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0xf7, 0x39, 0x00, 0x00, 0xab, 0x3b, 0x00, 0x00, 0xfb, 0x4a, 0x00, // ......9...;...J. + 0x00, 0x9f, 0x5d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x64, 0x09, 0x00, 0x00, 0x5e, 0x46, 0x00, // ..]..=...d...^F. + 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x74, 0x45, 0x00, 0x00, 0x5e, 0x46, 0x00, // .C...>...tE..^F. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5e, 0x28, 0x00, 0x00, 0xf7, 0x39, 0x00, 0x00, 0x41, 0x00, 0x06, // .>...^(...9..A.. + 0x00, 0x8b, 0x02, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ......@..B.../.. + 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf5, 0x58, 0x00, // .....=........X. + 0x00, 0xa0, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x28, 0x00, 0x00, 0xf5, 0x58, 0x00, // ..@..>....(...X. + 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x53, 0x16, 0x00, // .9...........S.. + 0x00, 0x74, 0x45, 0x00, 0x00, 0x5e, 0x28, 0x00, 0x00, 0x97, 0x28, 0x00, 0x00, 0x3d, 0x00, 0x04, // .tE..^(...(..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x14, 0x19, 0x00, 0x00, 0x81, 0x59, 0x00, 0x00, 0x85, 0x00, 0x05, // ..........Y..... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x5e, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x14, 0x19, 0x00, // ......^......... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x31, 0x26, 0x00, 0x00, 0xce, 0x5e, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...1&...^..9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xae, 0x46, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00, 0x31, 0x26, 0x00, // ......F..e...1&. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x65, 0x52, 0x00, 0x00, 0xae, 0x46, 0x00, 0x00, 0xfd, 0x00, 0x01, // .>...eR...F..... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .8.... +}; +static const uint8_t fs_texture_3d_dx9[619] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, // Color0......u_pa + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x03, // rams......<..... + 0xff, 0xff, 0xfe, 0xff, 0x2f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x83, 0x00, // ..../.CTAB...... + 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ + 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ..|...D......... + 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, // ..P.......`..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, // ......l.......s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0d, 0x00, 0x01, 0x00, // texColor........ + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // ..........u_para + 0x6d, 0x73, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, // ms.............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......ps_3_0.Mic + 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler + 0x36, 0x2e, 0x33, 0x2e, 0x39, 0x36, 0x30, 0x30, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // 6.3.9600.16384.. + 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x0c, 0x40, 0x2f, 0xba, // ..Q..........@/. + 0xe8, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // .>.............. + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x0f, 0xa0, 0x01, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x03, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x0c, 0x80, 0x00, 0x00, 0x14, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ......_......... + 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x80, 0x01, 0x00, // ................ + 0x00, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, 0x01, 0x00, 0x55, 0x8b, 0x0f, 0x00, // ............U... + 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xaa, 0x8b, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, // ................ + 0x08, 0x80, 0x01, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, 0x02, 0x00, // ................ + 0xe4, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x80, 0x01, 0x00, // ................ + 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, 0x01, 0x00, 0x55, 0x80, 0x0e, 0x00, // ............U... + 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ + 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x02, 0x00, 0xe4, 0x81, 0x04, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ + 0xe4, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0xa0, 0x05, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x0f, 0x00, // ................ + 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ + 0x02, 0x80, 0x00, 0x00, 0x55, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x04, 0x80, 0x00, 0x00, // ....U........... + 0xaa, 0x8b, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, // ................ + 0x55, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, // U............... + 0x00, 0x02, 0x00, 0x08, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, // ........U....... + 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ........... +}; +static const uint8_t fs_texture_3d_dx11[810] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xf8, 0x02, 0x00, 0x00, 0x44, 0x58, // olor0.........DX + 0x42, 0x43, 0x86, 0x82, 0x66, 0xf4, 0x03, 0xd8, 0x4a, 0x8f, 0x13, 0x90, 0xfc, 0x02, 0x5a, 0xc4, // BC..f...J.....Z. + 0x38, 0x2a, 0x01, 0x00, 0x00, 0x00, 0xf8, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // 8*............,. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, // ..........ISGNl. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........P..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........b..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x03, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO + 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, // LOR.TEXCOORD..OS + 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET. + 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x1c, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x87, 0x00, // ..SHDR....@..... + 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..Y...F. ....... + 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x28, // ..Z....`......X( + 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, // ...p......UU..b. + 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, // ..........b...2. + 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......e.... .... + 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x00, // ..h.......6...2. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, // ......F.......6. + 0x00, 0x06, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, // ..B......... ... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......H......... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, // ..F.......F~.... + 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, // ...`........ ... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, // ......8......... + 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, // ..F.......F..... + 0x00, 0x00, 0x2f, 0x00, 0x00, 0x06, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, // ../...r.......F. + 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, // ..........6.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, // ......:.......8. + 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, // ..r.......F..... + 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x0c, 0x40, 0xcd, 0xcc, 0x0c, 0x40, 0xcd, 0xcc, // ...@.....@...@.. + 0x0c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x05, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, // .@........r..... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, // ..F.......2...r. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, // ......F.......F. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x01, 0x00, // ......F...A..... + 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x8a, // ..2...r......... + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // .........F..... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x06, 0x82, 0x00, // ..F............. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......:. ....... + 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, // ..8...r......... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, // ......F......./. + 0x00, 0x06, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x81, 0x00, // ..r.......F..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8...r..... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x2f, 0xba, // ..F........@../. + 0xe8, 0x3e, 0x2f, 0xba, 0xe8, 0x3e, 0x2f, 0xba, 0xe8, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, // .>/..>/..>...... + 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // ..r ......F..... + 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // ..>....... +}; +static const uint8_t fs_texture_3d_mtl[1032] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0xea, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, // ams..........usi + 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, // ng namespace met + 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // al;.struct xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, // tlShaderInput {. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // float4 v_color + 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, // 0;. float3 v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // xcoord0;.};.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // Output {. float + 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, // 4 gl_FragColor;. + 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // };.struct xlatMt + 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, // lShaderUniform { + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // . float4 u_para + 0x6d, 0x73, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, // ms;.};.fragment + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut + 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain + 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, // (xlatMtlShaderIn + 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // put _mtl_i [[sta + 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, // t xlatMtlShaderU + 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, // niform& _mtl_u [ + 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x0a, 0x20, 0x20, 0x2c, // [buffer(0)]]. , + 0x20, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x33, 0x64, 0x3c, 0x66, 0x6c, 0x6f, // texture3d s_texColor [ + 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, // [texture(0)]], s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, // ampler _mtlsmp_s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, // _texColor [[samp + 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, // ler(0)]]).{. xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu + 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // t _mtl_o;. floa + 0x74, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, // t3 tmpvar_1 = 0; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, // . tmpvar_1.xy = + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // _mtl_i.v_texcoo + 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // rd0.xy;. tmpvar + 0x5f, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, // _1.z = _mtl_u.u_ + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // params.y;. floa + 0x74, 0x34, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x30, 0x3b, // t4 _color_2 = 0; + 0x0a, 0x20, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x73, // . _color_2 = (s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, // _texColor.sample + 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // (_mtlsmp_s_texCo + 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x29, 0x28, 0x74, 0x6d, // lor, (float3)(tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x5f, // pvar_1), level(_ + 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, // mtl_u.u_params.x + 0x29, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, // )) * _mtl_i.v_co + 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // lor0);. float4 + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, // tmpvar_3 = 0;. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x70, // tmpvar_3.xyz = p + 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, // ow (abs((. mi + 0x78, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x63, 0x6f, 0x6c, // x (pow (abs(_col + 0x6f, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // or_2.xyz), float + 0x33, 0x28, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x29, // 3(2.2, 2.2, 2.2) + 0x29, 0x2c, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x2c, // ), _color_2.xyz, + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, // _mtl_u.u_params + 0x2e, 0x7a, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, // .z). * . ex + 0x70, 0x32, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // p2(_mtl_u.u_para + 0x6d, 0x73, 0x2e, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, // ms.w). )), floa + 0x74, 0x33, 0x28, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, // t3(0.4545454, 0. + 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, // 4545454, 0.45454 + 0x35, 0x34, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // 54));. tmpvar_3 + 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x3b, // .w = _color_2.w; + 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . _mtl_o.gl_Fra + 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // gColor = tmpvar_ + 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // 3;. return _mtl + 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _o;.}... +}; +extern const uint8_t* fs_texture_3d_pssl; +extern const uint32_t fs_texture_3d_pssl_size; diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_3d.sc b/3rdparty/bgfx/tools/texturev/fs_texture_3d.sc new file mode 100644 index 0000000..230eaa3 --- /dev/null +++ b/3rdparty/bgfx/tools/texturev/fs_texture_3d.sc @@ -0,0 +1,16 @@ +$input v_texcoord0, v_color0 + +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "common.sh" + +SAMPLER3D(s_texColor, 0); + +void main() +{ + vec4 color = texture3DLod(s_texColor, vec3(v_texcoord0.xy, u_textureLayer), u_textureLod); + gl_FragColor = toEv(color * v_color0); +} diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_array.bin.h b/3rdparty/bgfx/tools/texturev/fs_texture_array.bin.h index ad7cfa7..357a587 100644 --- a/3rdparty/bgfx/tools/texturev/fs_texture_array.bin.h +++ b/3rdparty/bgfx/tools/texturev/fs_texture_array.bin.h @@ -1,80 +1,520 @@ -static const uint8_t fs_texture_array_glsl[329] = +static const uint8_t fs_texture_array_glsl[683] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, // Color.......u_pa - 0x72, 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x1a, 0x01, 0x00, 0x00, 0x76, 0x61, // rams..........va - 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // rying vec4 v_col - 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, // or0;.varying vec - 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, // 2 v_texcoord0;.u - 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, // niform sampler2D - 0x41, 0x72, 0x72, 0x61, 0x79, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // Array s_texColor - 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, // ;.uniform vec4 u - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, // _params;.void ma - 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, // in ().{. vec3 t - 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // mpvar_1;. tmpva - 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // r_1.xy = v_texco - 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // ord0;. tmpvar_1 - 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x79, 0x3b, // .z = u_params.y; - 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, // . gl_FragColor - 0x3d, 0x20, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, // = (texture2DArra - 0x79, 0x4c, 0x6f, 0x64, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // yLod (s_texColor - 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, // , tmpvar_1, u_pa - 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // rams.x) * v_colo - 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r0);.}... + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x7c, 0x02, 0x00, 0x00, 0x76, 0x61, // olor......|...va + 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4 + 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // v_color0;.varyi + 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, // ng highp vec3 v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, // texcoord0;.unifo + 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, // rm highp vec4 u_ + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // params;.uniform + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x20, 0x73, // sampler2DArray s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // _texColor;.void + 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, // main ().{. high + 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // p vec3 tmpvar_1; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, // . tmpvar_1.xy = + 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x3b, // v_texcoord0.xy; + 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, // . tmpvar_1.z = + 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x6d, 0x65, // u_params.y;. me + 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // diump vec4 tmpva + 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // r_2;. lowp vec4 + 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x63, 0x6f, // _color_3;. _co + 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // lor_3 = (texture + 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x4c, 0x6f, 0x64, 0x45, 0x58, 0x54, 0x20, 0x28, 0x73, // 2DArrayLodEXT (s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // _texColor, tmpva + 0x72, 0x5f, 0x31, 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, // r_1, u_params.x) + 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, // * v_color0);. + 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // lowp vec4 tmpvar + 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x78, // _4;. tmpvar_4.x + 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x28, 0x0a, // yz = pow (abs((. + 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, 0x78, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, // mix (pow (ab + 0x73, 0x28, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, // s(_color_3.xyz), + 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, // vec3(2.2, 2.2, + 0x32, 0x2e, 0x32, 0x29, 0x29, 0x2c, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x2e, // 2.2)), _color_3. + 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x7a, 0x29, // xyz, u_params.z) + 0x0a, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, 0x70, 0x32, 0x28, // . * . exp2( + 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, // u_params.w). )) + 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, // , vec3(0.4545454 + 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, // , 0.4545454, 0.4 + 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // 545454));. tmpv + 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, // ar_4.w = _color_ + 0x33, 0x2e, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, // 3.w;. tmpvar_2 + 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, // = tmpvar_4;. gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp + 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_2;.}... }; -static const uint8_t fs_texture_array_dx9[] = { 0 }; -static const uint8_t fs_texture_array_dx11[488] = +static const uint8_t fs_texture_array_spv[5638] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0xe8, 0x15, 0x00, 0x00, 0x03, 0x02, 0x23, // ams............# + 0x07, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // .........Ta..... + 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... + 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, // .w...t.......... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x21, 0x0a, 0x00, 0x00, 0x42, 0x67, 0x66, // n........!...Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x00, // xSampler2DArray. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x21, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, // .....!.......m_s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x21, 0x0a, 0x00, // ampler.......!.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, // .....m_texture.. + 0x00, 0x05, 0x00, 0x13, 0x00, 0xc8, 0x10, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, // .........bgfxTex + 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x4c, 0x6f, 0x64, 0x28, 0x73, // ture2DArrayLod(s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, // truct-BgfxSample + 0x72, 0x32, 0x44, 0x41, 0x72, 0x72, 0x61, 0x79, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x41, 0x32, 0x31, // r2DArray-p1-tA21 + 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // 1;vf3;f1;....... + 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, // .'..._sampler... + 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, // ........._coord. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x7f, 0x15, 0x00, 0x00, 0x5f, 0x6c, 0x6f, 0x64, 0x00, 0x00, 0x00, // ........._lod... + 0x00, 0x05, 0x00, 0x07, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x6d, 0x69, 0x78, 0x28, 0x76, 0x66, 0x33, // .....0...mix(vf3 + 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, // ;vf3;vf3;....... + 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, // ....._a......... + 0x00, 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x5f, 0x74, 0x00, // ._b.........._t. + 0x00, 0x05, 0x00, 0x06, 0x00, 0x01, 0x14, 0x00, 0x00, 0x76, 0x65, 0x63, 0x33, 0x5f, 0x73, 0x70, // .........vec3_sp + 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x45, 0x37, 0x00, // lat(f1;......E7. + 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, // ._x......5...vec + 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, // 4_splat(f1;..... + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x91, 0x0e, 0x00, // ....._x......... + 0x00, 0x74, 0x6f, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x28, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, // .toLinear(vf3;.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x3f, 0x38, 0x00, 0x00, 0x5f, 0x72, 0x67, 0x62, 0x00, 0x00, 0x00, // .....?8.._rgb... + 0x00, 0x05, 0x00, 0x06, 0x00, 0x74, 0x13, 0x00, 0x00, 0x74, 0x6f, 0x47, 0x61, 0x6d, 0x6d, 0x61, // .....t...toGamma + 0x28, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xfd, 0x15, 0x00, // (vf3;........... + 0x00, 0x5f, 0x72, 0x67, 0x62, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x65, 0x0c, 0x00, // ._rgb........e.. + 0x00, 0x74, 0x6f, 0x45, 0x76, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .toEv(vf4;...... + 0x00, 0xa4, 0x11, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, // ....._color..... + 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, // .....@main(vf4;v + 0x66, 0x33, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x81, 0x59, 0x00, // f3;vf4;.......Y. + 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .v_color0....... + 0x00, 0xcf, 0x58, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // ..X..v_texcoord0 + 0x00, 0x05, 0x00, 0x06, 0x00, 0x65, 0x52, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // .....eR..gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, // Data_0_......C.. + 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, // .s_texColor..... + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, // .....s_texColorS + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, // ampler.......... + 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, // .s_texColorTextu + 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x4a, 0x00, 0x00, 0x70, 0x61, 0x72, // re........J..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x70, 0x61, 0x72, // am........K..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x6b, 0x17, 0x00, 0x00, 0x72, 0x67, 0x62, // am.......k...rgb + 0x00, 0x05, 0x00, 0x04, 0x00, 0xff, 0x49, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......I..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, // .....<...$Global + 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .....<.......u_v + 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, // iewRect......<.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, // .....u_viewTexel + 0x00, 0x06, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .....<.......u_v + 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // iew......<...... + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // .u_invView...... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, // .<.......u_proj. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .....<.......u_i + 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, // nvProj.......<.. + 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // .....u_viewProj. + 0x00, 0x06, 0x00, 0x07, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .....<.......u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // nvViewProj...... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .<.......u_model + 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .....<.......u_m + 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3c, 0x02, 0x00, // odelView.....<.. + 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, // Proj.....<...... + 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x06, // .u_alphaRef4.... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, // .<.......u_param + 0x73, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // s........B...... + 0x00, 0x05, 0x00, 0x04, 0x00, 0x36, 0x43, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .....6C..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x20, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ..... &..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x46, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .....F&..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x42, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .....B&..param.. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, // .........bgfx_Vo + 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3d, 0x4c, 0x00, // idFrag.......=L. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, // .param.......... + 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x74, 0x45, 0x00, // .color.......tE. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x5e, 0x28, 0x00, // .param.......^(. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x28, 0x00, // .param........(. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x31, 0x26, 0x00, // .param.......1&. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, // .param........A. + 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .v_color0....... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, // .w...v_color0... + 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ......<..v_texco + 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, // ord0.....t...v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, // excoord0........ + 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, // .gl_FragData_0_. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......G..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......U..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .........param.. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // .........gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, // Data_0_..G...... + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, // .".......G...... + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, // .!.......G...... + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, // .".......G...... + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4c, 0x0a, 0x00, // .!.......G...L.. + 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .....@...H...<.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.......#...... + 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...<.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // . ...H...<...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...<.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H...<...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...<.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, // . ...H...<...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...<.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H...<...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...<.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H...<...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .........H...<.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#... ...H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, // .<.......#...0.. + 0x00, 0x47, 0x00, 0x03, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .G...<.......G.. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .B...".......G.. + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .w...........G.. + 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .t...........G.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, // ................ + 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, // .....!.......... + 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // . .............. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x21, 0x0a, 0x00, // .............!.. + 0x00, 0xfc, 0x01, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xdb, 0x00, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x21, 0x0a, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .....!.......... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0xdd, 0x06, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, // ................ + 0x00, 0x21, 0x00, 0x06, 0x00, 0x75, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, // .!...u.......... + 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xe5, 0x00, 0x00, // .........!...... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0x06, 0x01, 0x00, // .........!...... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0x1f, 0x01, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x7d, 0x00, 0x00, // .........!...}.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x20, 0x00, 0x04, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x21, 0x0a, 0x00, // . ...........!.. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, 0x00, // .;.......C...... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, // . ...y.......... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, // .;...y.......... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x53, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, // . ...S.......... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x53, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, // .;...S.......... + 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ......... ...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x54, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, // . ...T.......... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, // . ...z.......... + 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x76, 0x09, 0x00, 0x00, 0xcd, 0xcc, 0x0c, 0x40, 0x2b, 0x00, 0x04, // .....v......@+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x59, 0x05, 0x00, 0x00, 0x2f, 0xba, 0xe8, 0x3e, 0x18, 0x00, 0x04, // .....Y.../..>... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // .e.............. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, // .....j... ...... + 0x00, 0x4c, 0x0a, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, // .L...e...j...... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .<...........e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x4c, 0x0a, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...L...e...e.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xb9, 0x04, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0xb9, 0x04, 0x00, // .....<...;...... + 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .B.......+...... + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ./.......+...... + 0x00, 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, // ......... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // ........@+...... + 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // .........+...... + 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // .........+...... + 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // .........;...... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // .w....... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // .........;...... + 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .t....... ...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // .........6...... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, // ................ + 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, // .Sa..;........G. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, // .....;........U. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, // .....;.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, // .....=.......!C. + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, // .....=........3. + 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x21, 0x0a, 0x00, 0x00, 0x12, 0x20, 0x00, // .....P...!.... . + 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, // .!C...3..>...C.. + 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, // .. ..=........A. + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, // .w...=........<. + 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, // .t...>....G...A. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, // .>....U...<..9.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0xc9, 0x47, 0x00, // ......&.......G. + 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ..U......=...... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, // .........>...... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .........8...6.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xc8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x06, 0x00, // ................ + 0x00, 0x37, 0x00, 0x03, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......'...7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, // .........7...... + 0x00, 0x7f, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, 0x05, // .........$T..A.. + 0x00, 0x54, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, // .T.......'...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, 0x00, // .=.......m)..... + 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, 0x00, // .A...z....U..'.. + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, 0x00, // .....=........N. + 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, 0x00, // ..U..V.......29. + 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .m)...N..=...... + 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........=...... + 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x7f, 0x15, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // .=>......X...... + 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, 0x00, // .....29......... + 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x01, // .=>..........8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......0...... + 0x00, 0x75, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc6, 0x0e, 0x00, // .u...7.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, // .7...........7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x16, 0x59, 0x00, // ..............Y. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x37, 0x54, 0x00, 0x00, 0xc6, 0x0e, 0x00, // .=.......7T..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x07, 0x48, 0x00, 0x00, 0xc7, 0x0e, 0x00, // .=........H..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0e, 0x47, 0x00, 0x00, 0xd9, 0x0e, 0x00, // .=........G..... + 0x00, 0x0c, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x65, 0x19, 0x00, 0x00, 0x01, 0x00, 0x00, // .........e...... + 0x00, 0x2e, 0x00, 0x00, 0x00, 0x37, 0x54, 0x00, 0x00, 0x07, 0x48, 0x00, 0x00, 0x0e, 0x47, 0x00, // .....7T...H...G. + 0x00, 0xfe, 0x00, 0x02, 0x00, 0x65, 0x19, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .....e...8...6.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, // ................ + 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x45, 0x37, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.......E7..... + 0x00, 0x02, 0x2d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1e, 0x5e, 0x00, // ..-..=........^. + 0x00, 0x45, 0x37, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcc, 0x56, 0x00, // .E7..=........V. + 0x00, 0x45, 0x37, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xdd, 0x26, 0x00, // .E7..=........&. + 0x00, 0x45, 0x37, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2a, 0x29, 0x00, // .E7..P.......*). + 0x00, 0x1e, 0x5e, 0x00, 0x00, 0xcc, 0x56, 0x00, 0x00, 0xdd, 0x26, 0x00, 0x00, 0xfe, 0x00, 0x02, // ..^...V...&..... + 0x00, 0x2a, 0x29, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .*)..8...6...... + 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .5...........7.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xa6, 0x4d, 0x00, // ..............M. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcc, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........N..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x11, 0x46, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........F..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb1, 0x30, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........0..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc4, 0x30, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........0..... + 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x49, 0x00, 0x00, 0xcc, 0x4e, 0x00, // .P........I...N. + 0x00, 0x11, 0x46, 0x00, 0x00, 0xb1, 0x30, 0x00, 0x00, 0xc4, 0x30, 0x00, 0x00, 0xfe, 0x00, 0x02, // ..F...0...0..... + 0x00, 0xce, 0x49, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, // ..I..8...6...... + 0x00, 0x91, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, // .............7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0x3f, 0x38, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x5e, 0x3e, 0x00, // .....?8......^>. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x97, 0x4a, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........J..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xfd, 0x3f, 0x00, 0x00, 0x3f, 0x38, 0x00, // .=........?..?8. + 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, // .........,R..... + 0x00, 0x04, 0x00, 0x00, 0x00, 0xfd, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x4a, 0x00, // ......?..>....J. + 0x00, 0x76, 0x09, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x87, 0x32, 0x00, // .v...9........2. + 0x00, 0x01, 0x14, 0x00, 0x00, 0x97, 0x4a, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, // ......J......... + 0x00, 0x84, 0x3d, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x00, // ..=..........,R. + 0x00, 0x87, 0x32, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x84, 0x3d, 0x00, 0x00, 0x38, 0x00, 0x01, // ..2.......=..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x74, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......t...... + 0x00, 0x06, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xfd, 0x15, 0x00, // .....7.......... + 0x00, 0xf8, 0x00, 0x02, 0x00, 0xeb, 0x3d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ......=..;...... + 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // ..K......=...... + 0x00, 0x1c, 0x41, 0x00, 0x00, 0xfd, 0x15, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // ..A............. + 0x00, 0x4b, 0x53, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, 0x41, 0x00, // .KS...........A. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x59, 0x05, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....K..Y...9.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0xa6, 0x33, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0xb6, 0x4b, 0x00, // ......3.......K. + 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x4a, 0x56, 0x00, 0x00, 0x01, 0x00, 0x00, // .........JV..... + 0x00, 0x1a, 0x00, 0x00, 0x00, 0x4b, 0x53, 0x00, 0x00, 0xa6, 0x33, 0x00, 0x00, 0xfe, 0x00, 0x02, // .....KS...3..... + 0x00, 0x4a, 0x56, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .JV..8...6...... + 0x00, 0x65, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, // .e...........7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x3a, 0x4e, 0x00, // .............:N. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xff, 0x49, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........I..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x36, 0x43, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......6C..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;....... &..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x46, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......F&..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x42, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......B&..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x52, 0x23, 0x00, 0x00, 0xa4, 0x11, 0x00, // .=.......R#..... + 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x64, 0x40, 0x00, 0x00, 0x52, 0x23, 0x00, // .O.......d@..R#. + 0x00, 0x52, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // .R#............. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xff, 0x49, 0x00, 0x00, 0x64, 0x40, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....I..d@..9.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x21, 0x00, 0x00, 0x91, 0x0e, 0x00, 0x00, 0xff, 0x49, 0x00, // .....`!.......I. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xce, 0x5d, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........]..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ./.......=...... + 0x00, 0xc8, 0x47, 0x00, 0x00, 0xce, 0x5d, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // ..G...]..P...... + 0x00, 0x5d, 0x1a, 0x00, 0x00, 0xc8, 0x47, 0x00, 0x00, 0xc8, 0x47, 0x00, 0x00, 0xc8, 0x47, 0x00, // .]....G...G...G. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x36, 0x43, 0x00, 0x00, 0x60, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>...6C..`!..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x81, 0x23, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0x4f, 0x00, 0x08, // ......#......O.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x9a, 0x3d, 0x00, 0x00, 0x81, 0x23, 0x00, 0x00, 0x81, 0x23, 0x00, // ......=...#...#. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, // .............>.. + 0x00, 0x20, 0x26, 0x00, 0x00, 0x9a, 0x3d, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x46, 0x26, 0x00, // . &...=..>...F&. + 0x00, 0x5d, 0x1a, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x6b, 0x17, 0x00, // .]...9.......k.. + 0x00, 0x30, 0x0c, 0x00, 0x00, 0x36, 0x43, 0x00, 0x00, 0x20, 0x26, 0x00, 0x00, 0x46, 0x26, 0x00, // .0...6C.. &..F&. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xdc, 0x58, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........X..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ./.......=...... + 0x00, 0x2c, 0x34, 0x00, 0x00, 0xdc, 0x58, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, // .,4...X......... + 0x00, 0x45, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, // .E>............. + 0x00, 0x2c, 0x34, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xaf, 0x2e, 0x00, // .,4............. + 0x00, 0x6b, 0x17, 0x00, 0x00, 0x45, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x42, 0x26, 0x00, // .k...E>..>...B&. + 0x00, 0xaf, 0x2e, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xe7, 0x43, 0x00, // .....9........C. + 0x00, 0x74, 0x13, 0x00, 0x00, 0x42, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, // .t...B&..A...... + 0x00, 0xe1, 0x5d, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // ..]..........=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x84, 0x48, 0x00, 0x00, 0xe1, 0x5d, 0x00, 0x00, 0x51, 0x00, 0x05, // ......H...]..Q.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0xe7, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, // ......9...C..... + 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x79, 0x49, 0x00, 0x00, 0xe7, 0x43, 0x00, // .Q.......yI...C. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x19, 0x00, // .....Q.......!.. + 0x00, 0xe7, 0x43, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // ..C......P...... + 0x00, 0xe8, 0x5a, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0x79, 0x49, 0x00, 0x00, 0x21, 0x19, 0x00, // ..Z...9..yI..!.. + 0x00, 0x84, 0x48, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xe8, 0x5a, 0x00, 0x00, 0x38, 0x00, 0x01, // ..H.......Z..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x7d, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x81, 0x59, 0x00, // .}...7........Y. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xcf, 0x58, 0x00, 0x00, 0x37, 0x00, 0x03, // .7........X..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x65, 0x52, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x99, 0x5b, 0x00, // .....eR.......[. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x3d, 0x4c, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......=L..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x74, 0x45, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......tE..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x5e, 0x28, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......^(..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x97, 0x28, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........(..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x31, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......1&..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3d, 0x4c, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...=L......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x3d, 0x4c, 0x00, // .........5...=L. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xcb, 0x3d, 0x00, 0x00, 0xcf, 0x58, 0x00, // .=........=...X. + 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x9a, 0x3a, 0x00, 0x00, 0xcb, 0x3d, 0x00, // .O........:...=. + 0x00, 0xcb, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x41, 0x00, 0x06, // ..=..........A.. + 0x00, 0x8b, 0x02, 0x00, 0x00, 0x91, 0x20, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ...... ..B.../.. + 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x9f, 0x5d, 0x00, // .....=........]. + 0x00, 0x91, 0x20, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xab, 0x3b, 0x00, // .. ..Q........;. + 0x00, 0x9a, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ..:......Q...... + 0x00, 0xfb, 0x4a, 0x00, 0x00, 0x9a, 0x3a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x06, // ..J...:......P.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0xf7, 0x39, 0x00, 0x00, 0xab, 0x3b, 0x00, 0x00, 0xfb, 0x4a, 0x00, // ......9...;...J. + 0x00, 0x9f, 0x5d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x21, 0x0a, 0x00, 0x00, 0x5e, 0x46, 0x00, // ..]..=...!...^F. + 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x74, 0x45, 0x00, 0x00, 0x5e, 0x46, 0x00, // .C...>...tE..^F. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5e, 0x28, 0x00, 0x00, 0xf7, 0x39, 0x00, 0x00, 0x41, 0x00, 0x06, // .>...^(...9..A.. + 0x00, 0x8b, 0x02, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ......@..B.../.. + 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf5, 0x58, 0x00, // .....=........X. + 0x00, 0xa0, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x28, 0x00, 0x00, 0xf5, 0x58, 0x00, // ..@..>....(...X. + 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0xc8, 0x10, 0x00, // .9.............. + 0x00, 0x74, 0x45, 0x00, 0x00, 0x5e, 0x28, 0x00, 0x00, 0x97, 0x28, 0x00, 0x00, 0x3d, 0x00, 0x04, // .tE..^(...(..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x14, 0x19, 0x00, 0x00, 0x81, 0x59, 0x00, 0x00, 0x85, 0x00, 0x05, // ..........Y..... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x5e, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x14, 0x19, 0x00, // ......^......... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x31, 0x26, 0x00, 0x00, 0xce, 0x5e, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...1&...^..9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xae, 0x46, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00, 0x31, 0x26, 0x00, // ......F..e...1&. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x65, 0x52, 0x00, 0x00, 0xae, 0x46, 0x00, 0x00, 0xfd, 0x00, 0x01, // .>...eR...F..... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .8.... +}; +static const uint8_t fs_texture_array_dx9[623] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, // Color0......u_pa + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x03, // rams......@..... + 0xff, 0xff, 0xfe, 0xff, 0x2f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x83, 0x00, // ..../.CTAB...... + 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ + 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ..|...D......... + 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, // ..P.......`..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, // ......l.......s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, // texColor........ + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // ..........u_para + 0x6d, 0x73, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, // ms.............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......ps_3_0.Mic + 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler + 0x36, 0x2e, 0x33, 0x2e, 0x39, 0x36, 0x30, 0x30, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // 6.3.9600.16384.. + 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, // ..Q..........?.. + 0x00, 0x00, 0xcd, 0xcc, 0x0c, 0x40, 0x2f, 0xba, 0xe8, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // .....@/..>...... + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x01, 0x00, 0xc4, 0x90, 0x01, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, // .........._..... + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, // ................ + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, // ................ + 0x01, 0x80, 0x01, 0x00, 0x00, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, 0x01, 0x00, // ................ + 0x55, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xaa, 0x8b, 0x01, 0x00, // U............... + 0x00, 0x02, 0x00, 0x08, 0x08, 0x80, 0x01, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, // ................ + 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xaa, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, // ................ + 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, 0x01, 0x00, // ................ + 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x04, 0x00, // U............... + 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x02, 0x00, // ................ + 0xe4, 0x81, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, // ................ + 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x8b, 0x0f, 0x00, // ................ + 0x00, 0x02, 0x01, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, // ........U....... + 0x04, 0x80, 0x00, 0x00, 0xaa, 0x8b, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, // ................ + 0xe4, 0x80, 0x01, 0x00, 0xff, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x01, 0x80, 0x00, 0x00, // ................ + 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0e, 0x00, // ............U... + 0x00, 0x02, 0x00, 0x08, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... +}; +static const uint8_t fs_texture_array_dx11[810] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par 0x61, 0x6d, 0x73, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC - 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xb8, 0x01, 0x44, 0x58, 0x42, 0x43, // olor0.......DXBC - 0x81, 0x20, 0x2f, 0xf0, 0x22, 0x82, 0x15, 0xc5, 0x5c, 0x50, 0xb5, 0xdb, 0x71, 0x0a, 0x7d, 0x9a, // . /."....P..q.}. - 0x01, 0x00, 0x00, 0x00, 0xb8, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,... - 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, // ........ISGNl... - 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........P....... - 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ - 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................ - 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........b....... - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // ................ - 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, // SV_POSITION.COLO - 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, // R.TEXCOORD..OSGN - 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET... - 0x53, 0x48, 0x44, 0x52, 0xdc, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, // SHDR....@...7... - 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // Y...F. ......... - 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x40, 0x00, 0x04, // Z....`......X@.. - 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, // .p......UU..b... - 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, // ........b...2... - 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....e.... ...... - 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x00, 0x10, 0x00, // h.......6...2... - 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, // ....F.......6... - 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // B......... ..... - 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....H........... - 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // F.......F~...... - 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .`........ ..... - 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....8.... ...... - 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // F.......F....... - 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // >....... + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xf8, 0x02, 0x00, 0x00, 0x44, 0x58, // olor0.........DX + 0x42, 0x43, 0x77, 0x19, 0xf0, 0x17, 0xe9, 0x7f, 0x9c, 0x60, 0x64, 0x2e, 0x99, 0x47, 0xa5, 0xb8, // BCw......`d..G.. + 0x85, 0xdb, 0x01, 0x00, 0x00, 0x00, 0xf8, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // ..............,. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, // ..........ISGNl. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........P..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........b..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x03, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO + 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, // LOR.TEXCOORD..OS + 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET. + 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x1c, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x87, 0x00, // ..SHDR....@..... + 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..Y...F. ....... + 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x40, // ..Z....`......X@ + 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, // ...p......UU..b. + 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, // ..........b...2. + 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......e.... .... + 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x00, // ..h.......6...2. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, // ......F.......6. + 0x00, 0x06, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, // ..B......... ... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......H......... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, // ..F.......F~.... + 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, // ...`........ ... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, // ......8......... + 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, // ..F.......F..... + 0x00, 0x00, 0x2f, 0x00, 0x00, 0x06, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, // ../...r.......F. + 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, // ..........6.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, // ......:.......8. + 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, // ..r.......F..... + 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x0c, 0x40, 0xcd, 0xcc, 0x0c, 0x40, 0xcd, 0xcc, // ...@.....@...@.. + 0x0c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x05, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, // .@........r..... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, // ..F.......2...r. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, // ......F.......F. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x01, 0x00, // ......F...A..... + 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x8a, // ..2...r......... + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // .........F..... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x06, 0x82, 0x00, // ..F............. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......:. ....... + 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, // ..8...r......... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, // ......F......./. + 0x00, 0x06, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x81, 0x00, // ..r.......F..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8...r..... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x2f, 0xba, // ..F........@../. + 0xe8, 0x3e, 0x2f, 0xba, 0xe8, 0x3e, 0x2f, 0xba, 0xe8, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, // .>/..>/..>...... + 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // ..r ......F..... + 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // ..>....... }; -static const uint8_t fs_texture_array_mtl[811] = +static const uint8_t fs_texture_array_mtl[1065] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x1c, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . float4 v_colo - 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, // r0;. float2 v_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, // excoord0;.};.str - 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // uct xlatMtlShade - 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, // rOutput {. half + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x75, 0x73, 0x69, // ams..........usi + 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, // ng namespace met + 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // al;.struct xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, // tlShaderInput {. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // float4 v_color + 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, // 0;. float3 v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // xcoord0;.};.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // Output {. float 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, // 4 gl_FragColor;. 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // };.struct xlatMt 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, // lShaderUniform { 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // . float4 u_para - 0x6d, 0x73, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, // ms;.};.fragment + 0x6d, 0x73, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, // ms;.};.fragment 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut - 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain + 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, // (xlatMtlShaderIn 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // put _mtl_i [[sta 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan @@ -85,29 +525,46 @@ static const uint8_t fs_texture_array_mtl[811] = 0x61, 0x79, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ay s_texC 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, // olor [[texture(0 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, // )]], sampler _mt - 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, // lsmp_s_texColor + 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, // lsmp_s_texColor 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, // [[sampler(0)]]). 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // {. xlatMtlShade 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // rOutput _mtl_o;. 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // float3 tmpvar_ - 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, // 1;. tmpvar_1.xy - 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // = _mtl_i.v_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // oord0;. tmpvar_ - 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, // 1.z = _mtl_u.u_p - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // arams.y;. half4 - 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_2;. tmp - 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x73, 0x5f, // var_2 = half4(s_ - 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, // texColor.sample( - 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // _mtlsmp_s_texCol - 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x29, 0x28, 0x28, 0x74, 0x6d, // or, (float2)((tm - 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x2e, 0x78, 0x79, 0x29, 0x2c, 0x20, 0x28, 0x75, 0x69, // pvar_1).xy), (ui - 0x6e, 0x74, 0x29, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x2e, 0x7a, // nt)((tmpvar_1).z - 0x29, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // ), level(_mtl_u. - 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, // u_params.x)));. - 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, // _mtl_o.gl_FragC - 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x29, 0x28, // olor = ((half4)( - 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // (float4)tmpvar_2 - 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // * _mtl_i.v_colo - 0x72, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, // r0));. return _ - 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mtl_o;.}... + 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // 1 = 0;. tmpvar_ + 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, // 1.xy = _mtl_i.v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x3b, 0x0a, 0x20, 0x20, // texcoord0.xy;. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, // tmpvar_1.z = _mt + 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x79, 0x3b, 0x0a, // l_u.u_params.y;. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, // float4 _color_ + 0x32, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, // 2 = 0;. _color_ + 0x32, 0x20, 0x3d, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, // 2 = (s_texColor. + 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, // sample(_mtlsmp_s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, // _texColor, (floa + 0x74, 0x32, 0x29, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x2e, 0x78, // t2)((tmpvar_1).x + 0x79, 0x29, 0x2c, 0x20, 0x28, 0x75, 0x69, 0x6e, 0x74, 0x29, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, // y), (uint)((tmpv + 0x61, 0x72, 0x5f, 0x31, 0x29, 0x2e, 0x7a, 0x29, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, // ar_1).z), level( + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, // _mtl_u.u_params. + 0x78, 0x29, 0x29, 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, // x)) * _mtl_i.v_c + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // olor0);. float4 + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, // tmpvar_3 = 0;. + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, // tmpvar_3.xyz = + 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, // pow (abs((. m + 0x69, 0x78, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x63, 0x6f, // ix (pow (abs(_co + 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, // lor_2.xyz), floa + 0x74, 0x33, 0x28, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, // t3(2.2, 2.2, 2.2 + 0x29, 0x29, 0x2c, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, // )), _color_2.xyz + 0x2c, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, // , _mtl_u.u_param + 0x73, 0x2e, 0x7a, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, // s.z). * . e + 0x78, 0x70, 0x32, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, // xp2(_mtl_u.u_par + 0x61, 0x6d, 0x73, 0x2e, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, // ams.w). )), flo + 0x61, 0x74, 0x33, 0x28, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, // at3(0.4545454, 0 + 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, // .4545454, 0.4545 + 0x34, 0x35, 0x34, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // 454));. tmpvar_ + 0x33, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x2e, 0x77, // 3.w = _color_2.w + 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr + 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // agColor = tmpvar + 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, // _3;. return _mt + 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // l_o;.}... }; +extern const uint8_t* fs_texture_array_pssl; +extern const uint32_t fs_texture_array_pssl_size; diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_array.sc b/3rdparty/bgfx/tools/texturev/fs_texture_array.sc index 4129bed..51d02db 100644 --- a/3rdparty/bgfx/tools/texturev/fs_texture_array.sc +++ b/3rdparty/bgfx/tools/texturev/fs_texture_array.sc @@ -1,20 +1,16 @@ $input v_texcoord0, v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ -#include +#include "common.sh" SAMPLER2DARRAY(s_texColor, 0); -uniform vec4 u_params; -#define u_textureLod u_params.x -#define u_textureLayer u_params.y - void main() { - vec4 color = texture2DArrayLod(s_texColor, vec3(v_texcoord0, u_textureLayer), u_textureLod); - gl_FragColor = color * v_color0; + vec4 color = texture2DArrayLod(s_texColor, vec3(v_texcoord0.xy, u_textureLayer), u_textureLod); + gl_FragColor = toEv(color * v_color0); } diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_cube.bin.h b/3rdparty/bgfx/tools/texturev/fs_texture_cube.bin.h index 9b81cfc..6b49a7c 100644 --- a/3rdparty/bgfx/tools/texturev/fs_texture_cube.bin.h +++ b/3rdparty/bgfx/tools/texturev/fs_texture_cube.bin.h @@ -1,187 +1,644 @@ -static const uint8_t fs_texture_cube_glsl[562] = +static const uint8_t fs_texture_cube_glsl[844] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x03, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x05, 0x75, 0x5f, 0x6d, 0x74, // Color.......u_mt - 0x78, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, // x.......u_params - 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0xf7, 0x01, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // ..........varyin + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x03, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x05, 0x75, 0x5f, 0x6d, 0x74, 0x78, // olor.......u_mtx + 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x03, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // ..........varyin 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, // g highp vec4 v_c 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, // olor0;.varying h - 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec2 v_texc - 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6c, // oord0;.uniform l - 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x20, // owp samplerCube - 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, // s_texColor;.unif - 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, // orm highp mat4 u - 0x5f, 0x6d, 0x74, 0x78, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, // _mtx;.uniform hi - 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, // ghp vec4 u_param - 0x73, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, // s;.void main (). + 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // ighp vec3 v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, // oord0;.uniform h + 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // ighp vec4 u_para + 0x6d, 0x73, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6c, 0x6f, 0x77, 0x70, // ms;.uniform lowp + 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x20, 0x73, 0x5f, 0x74, // samplerCube s_t + 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // exColor;.uniform + 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x74, // highp mat4 u_mt + 0x78, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, // x;.void main (). 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, // {. highp vec3 t 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // mpvar_1;. tmpva 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, // r_1.z = 1.0;. t 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x28, // mpvar_1.xy = ((( - 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x2a, 0x20, 0x32, 0x2e, // v_texcoord0 * 2. - 0x30, 0x29, 0x20, 0x2d, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x76, 0x65, 0x63, 0x32, // 0) - 1.0) * vec2 - 0x28, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, // (1.0, -1.0));. - 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // highp vec4 tmpva - 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, // r_2;. tmpvar_2. - 0x77, 0x20, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // w = 0.0;. tmpva - 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // r_2.xyz = tmpvar - 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, // _1;. lowp vec4 - 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpvar_3;. tmpv - 0x61, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, // ar_3 = textureCu - 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // beLod (s_texC - 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, // olor, normalize( - 0x28, 0x75, 0x5f, 0x6d, 0x74, 0x78, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // (u_mtx * tmpvar_ - 0x32, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, // 2).xyz), u_param - 0x73, 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, // s.x);. gl_FragC - 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // olor = (tmpvar_3 - 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, // * v_color0);.}. - 0x0a, 0x00, // .. + 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x20, 0x2a, // v_texcoord0.xy * + 0x20, 0x32, 0x2e, 0x30, 0x29, 0x20, 0x2d, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x76, // 2.0) - 1.0) * v + 0x65, 0x63, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x3b, // ec2(1.0, -1.0)); + 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, // . highp vec4 tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // pvar_2;. tmpvar + 0x5f, 0x32, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // _2.w = 0.0;. tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // pvar_2.xyz = tmp + 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, // var_1;. mediump + 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, // vec4 tmpvar_3;. + 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x5f, 0x63, 0x6f, 0x6c, // lowp vec4 _col + 0x6f, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x34, // or_4;. _color_4 + 0x20, 0x3d, 0x20, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, 0x4c, // = (textureCubeL + 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, // od (s_texColo + 0x72, 0x2c, 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x28, 0x75, 0x5f, // r, normalize((u_ + 0x6d, 0x74, 0x78, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x2e, // mtx * tmpvar_2). + 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, // xyz), u_params.x + 0x29, 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x20, // ) * v_color0);. + 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // lowp vec4 tmpva + 0x72, 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x2e, // r_5;. tmpvar_5. + 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x28, // xyz = pow (abs(( + 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, 0x78, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, // . mix (pow (a + 0x62, 0x73, 0x28, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x34, 0x2e, 0x78, 0x79, 0x7a, 0x29, // bs(_color_4.xyz) + 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, // , vec3(2.2, 2.2, + 0x20, 0x32, 0x2e, 0x32, 0x29, 0x29, 0x2c, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x34, // 2.2)), _color_4 + 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x7a, // .xyz, u_params.z + 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, 0x70, 0x32, // ). * . exp2 + 0x28, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x29, // (u_params.w). ) + 0x29, 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, // ), vec3(0.454545 + 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, // 4, 0.4545454, 0. + 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // 4545454));. tmp + 0x76, 0x61, 0x72, 0x5f, 0x35, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // var_5.w = _color + 0x5f, 0x34, 0x2e, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // _4.w;. tmpvar_3 + 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x67, // = tmpvar_5;. g + 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, // l_FragColor = tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // pvar_3;.}... }; -static const uint8_t fs_texture_cube_dx9[505] = +static const uint8_t fs_texture_cube_spv[6110] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x03, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x05, 0x75, 0x5f, 0x6d, 0x74, 0x78, // FSH........u_mtx + 0x14, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, // .......u_params. + 0x01, 0x00, 0x00, 0x01, 0x00, 0xb4, 0x17, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, // ...........#.... + 0x00, 0x02, 0x00, 0x08, 0x00, 0x1c, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, // ......b......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, // .............GLS + 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, // L.std.450....... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, // ................ + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x77, 0x0e, 0x00, // .....main....w.. + 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00, 0x1f, 0x16, 0x00, // .t.............. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, // ................ + 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x05, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, // .....g...BgfxSam + 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, // plerCube.....g.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, // .....m_sampler.. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x74, // .....g.......m_t + 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x11, 0x00, 0xf4, 0x10, 0x00, // exture.......... + 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x75, 0x62, 0x65, // .bgfxTextureCube + 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, 0x78, 0x53, // Lod(struct-BgfxS + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x43, // amplerCube-p1-tC + 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // 11;vf3;f1;...... + 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, // .'..._sampler... + 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, // ........._coord. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, // ........._level. + 0x00, 0x05, 0x00, 0x07, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x6d, 0x69, 0x78, 0x28, 0x76, 0x66, 0x33, // .....0...mix(vf3 + 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, // ;vf3;vf3;....... + 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, // ....._a......... + 0x00, 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x5f, 0x74, 0x00, // ._b.........._t. + 0x00, 0x05, 0x00, 0x06, 0x00, 0x01, 0x14, 0x00, 0x00, 0x76, 0x65, 0x63, 0x33, 0x5f, 0x73, 0x70, // .........vec3_sp + 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x45, 0x37, 0x00, // lat(f1;......E7. + 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, // ._x......5...vec + 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, // 4_splat(f1;..... + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x91, 0x0e, 0x00, // ....._x......... + 0x00, 0x74, 0x6f, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x28, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, // .toLinear(vf3;.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x3f, 0x38, 0x00, 0x00, 0x5f, 0x72, 0x67, 0x62, 0x00, 0x00, 0x00, // .....?8.._rgb... + 0x00, 0x05, 0x00, 0x06, 0x00, 0x74, 0x13, 0x00, 0x00, 0x74, 0x6f, 0x47, 0x61, 0x6d, 0x6d, 0x61, // .....t...toGamma + 0x28, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xfd, 0x15, 0x00, // (vf3;........... + 0x00, 0x5f, 0x72, 0x67, 0x62, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x65, 0x0c, 0x00, // ._rgb........e.. + 0x00, 0x74, 0x6f, 0x45, 0x76, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .toEv(vf4;...... + 0x00, 0xa4, 0x11, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, // ....._color..... + 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, // .....@main(vf4;v + 0x66, 0x33, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x81, 0x59, 0x00, // f3;vf4;.......Y. + 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .v_color0....... + 0x00, 0xcf, 0x58, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // ..X..v_texcoord0 + 0x00, 0x05, 0x00, 0x06, 0x00, 0x65, 0x52, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // .....eR..gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, // Data_0_......C.. + 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, // .s_texColor..... + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, // .....s_texColorS + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, // ampler.......... + 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, // .s_texColorTextu + 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x4a, 0x00, 0x00, 0x70, 0x61, 0x72, // re........J..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x70, 0x61, 0x72, // am........K..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x6b, 0x17, 0x00, 0x00, 0x72, 0x67, 0x62, // am.......k...rgb + 0x00, 0x05, 0x00, 0x04, 0x00, 0xff, 0x49, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......I..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, // .........$Global + 0x00, 0x06, 0x00, 0x06, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xaf, 0x07, 0x00, // iewRect......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, // .....u_viewTexel + 0x00, 0x06, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .............u_v + 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, // iew............. + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // .u_invView...... + 0x00, 0xaf, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, // .........u_proj. + 0x00, 0x06, 0x00, 0x06, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xaf, 0x07, 0x00, // nvProj.......... + 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // .....u_viewProj. + 0x00, 0x06, 0x00, 0x07, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, // .............u_i + 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, // nvViewProj...... + 0x00, 0xaf, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x00, 0x06, 0x00, 0x06, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .............u_m + 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0xaf, 0x07, 0x00, // odelView........ + 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView + 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x0b, 0x00, 0x00, // Proj............ + 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x06, // .u_alphaRef4.... + 0x00, 0xaf, 0x07, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, // .........u_param + 0x73, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x0d, 0x00, 0x00, // s............... + 0x00, 0x75, 0x5f, 0x6d, 0x74, 0x78, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // .u_mtx.......B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x36, 0x43, 0x00, 0x00, 0x70, 0x61, 0x72, // .........6C..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x20, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, // am....... &..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x46, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......F&..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x42, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......B&..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, // am...........bgf + 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // x_VoidFrag...... + 0x00, 0x3d, 0x4c, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, // .=L..param...... + 0x00, 0x46, 0x17, 0x00, 0x00, 0x64, 0x69, 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0x18, 0x0e, 0x00, // .F...dir........ + 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x5e, 0x28, 0x00, // .color.......^(. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x5f, 0x28, 0x00, // .param......._(. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x28, 0x00, // .param........(. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x31, 0x26, 0x00, // .param.......1&. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, // .param........A. + 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .v_color0....... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, // .w...v_color0... + 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ......<..v_texco + 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, // ord0.....t...v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, // excoord0........ + 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, // .gl_FragData_0_. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......G..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......U..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .........param.. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // .........gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, // Data_0_..G...... + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, // .".......G...... + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, // .!.......G...... + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, // .".......G...... + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x4c, 0x0a, 0x00, // .!.......G...L.. + 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, // .....@...H...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0xaf, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, // . ...H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, // .........H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, // .........H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0xaf, 0x07, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, // .........H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, // .........H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0xaf, 0x07, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x06, 0x00, 0x00, // . ...H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, // .........H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, // .........H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0xaf, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, // .........H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, // .........H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0xaf, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // ................ + 0x00, 0x48, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, // .........H...... + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#... ...H.. + 0x00, 0xaf, 0x07, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, // .........#...0.. + 0x00, 0x48, 0x00, 0x04, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H.............. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...........#.. + 0x00, 0x40, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x0d, 0x00, 0x00, // .@...H.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0xaf, 0x07, 0x00, // .........G...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, // .....G...B...".. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, // .....G...w...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, // .....G...t...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, // .....G.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, // .............!.. + 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, // ................ + 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, // ......... ...... + 0x00, 0x98, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x1e, 0x00, 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, // .....g.......... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, // . ...!.......g.. + 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // . .............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // . .............. + 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x06, 0x00, 0xaf, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, // .!...........!.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x75, 0x00, 0x00, // .........!...u.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, // ................ + 0x00, 0x21, 0x00, 0x04, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, // .!.............. + 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, // .!.............. + 0x00, 0x21, 0x00, 0x04, 0x00, 0x06, 0x01, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, // .!.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // . .............. + 0x00, 0x21, 0x00, 0x04, 0x00, 0x1f, 0x01, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, // .!.............. + 0x00, 0x21, 0x00, 0x06, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, // .!...}.......... + 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, // ......... ...".. + 0x00, 0x06, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, // .....g...;...".. + 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, // .C....... ...y.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, // .........;...y.. + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, // ......... ...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, // .........;...... + 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // . .......+...... + 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x03, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .........+...... + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, // ......... ...z.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, // ................ + 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x76, 0x09, 0x00, // .....+.......v.. + 0x00, 0xcd, 0xcc, 0x0c, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x59, 0x05, 0x00, // ....@+.......Y.. + 0x00, 0x2f, 0xba, 0xe8, 0x3e, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // ./..>....e...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .....+.......j.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x4c, 0x0a, 0x00, 0x00, 0x65, 0x00, 0x00, // . .......L...e.. + 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x10, 0x00, 0xaf, 0x07, 0x00, 0x00, 0x1d, 0x00, 0x00, // .j.............. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .....e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x4c, 0x0a, 0x00, // .e...e...e...L.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .e...e.......... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, // .e... ...,...... + 0x00, 0xaf, 0x07, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x42, 0x13, 0x00, // .....;...,...B.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, // .....+......./.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, // .....+.......... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // ..... .......... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x00, 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, // ....@+.......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x41, 0x03, 0x00, // ....?+.......A.. + 0x00, 0x00, 0x00, 0x80, 0xbf, 0x2c, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // .....,.......... + 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x03, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, // .....A...+...... + 0x00, 0x32, 0x0a, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, // .2....... ...... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, // .....e...+...... + 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // ......... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, // .........;...... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // .w....... ...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, // .........;...... + 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .t....... ...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, // .........;...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, // .........6...... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, // ................ + 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, // .Sa..;........G. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, // .....;........U. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, // .....;.......... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, // .....=.......!C. + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, // .....=........3. + 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, // .....P...g.... . + 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, // .!C...3..>...C.. + 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, // .. ..=........A. + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, // .w...=........<. + 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, // .t...>....G...A. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, // .>....U...<..9.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0xc9, 0x47, 0x00, // ......&.......G. + 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ..U......=...... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, // .........>...... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .........8...6.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0x04, 0x00, // ................ + 0x00, 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, // .7...!...'...7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, // .........7...... + 0x00, 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, 0x05, // .........$T..A.. + 0x00, 0x16, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, // .........'...... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, 0x00, // .=.......m)..... + 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, 0x00, // .A...z....U..'.. + 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, 0x00, // .....=........N. + 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, 0x00, // ..U..V.......29. + 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .m)...N..=...... + 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........=...... + 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // .=>......X...... + 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, 0x00, // .....29......... + 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x01, // .=>..........8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......0...... + 0x00, 0x75, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc6, 0x0e, 0x00, // .u...7.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, // .7...........7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x16, 0x59, 0x00, // ..............Y. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x37, 0x54, 0x00, 0x00, 0xc6, 0x0e, 0x00, // .=.......7T..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x07, 0x48, 0x00, 0x00, 0xc7, 0x0e, 0x00, // .=........H..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0e, 0x47, 0x00, 0x00, 0xd9, 0x0e, 0x00, // .=........G..... + 0x00, 0x0c, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x65, 0x19, 0x00, 0x00, 0x01, 0x00, 0x00, // .........e...... + 0x00, 0x2e, 0x00, 0x00, 0x00, 0x37, 0x54, 0x00, 0x00, 0x07, 0x48, 0x00, 0x00, 0x0e, 0x47, 0x00, // .....7T...H...G. + 0x00, 0xfe, 0x00, 0x02, 0x00, 0x65, 0x19, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .....e...8...6.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, // ................ + 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x45, 0x37, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.......E7..... + 0x00, 0x02, 0x2d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x1e, 0x5e, 0x00, // ..-..=........^. + 0x00, 0x45, 0x37, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcc, 0x56, 0x00, // .E7..=........V. + 0x00, 0x45, 0x37, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xdd, 0x26, 0x00, // .E7..=........&. + 0x00, 0x45, 0x37, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2a, 0x29, 0x00, // .E7..P.......*). + 0x00, 0x1e, 0x5e, 0x00, 0x00, 0xcc, 0x56, 0x00, 0x00, 0xdd, 0x26, 0x00, 0x00, 0xfe, 0x00, 0x02, // ..^...V...&..... + 0x00, 0x2a, 0x29, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .*)..8...6...... + 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .5...........7.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xa6, 0x4d, 0x00, // ..............M. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcc, 0x4e, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........N..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x11, 0x46, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........F..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb1, 0x30, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........0..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc4, 0x30, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .=........0..... + 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x49, 0x00, 0x00, 0xcc, 0x4e, 0x00, // .P........I...N. + 0x00, 0x11, 0x46, 0x00, 0x00, 0xb1, 0x30, 0x00, 0x00, 0xc4, 0x30, 0x00, 0x00, 0xfe, 0x00, 0x02, // ..F...0...0..... + 0x00, 0xce, 0x49, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, // ..I..8...6...... + 0x00, 0x91, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, // .............7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0x3f, 0x38, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x5e, 0x3e, 0x00, // .....?8......^>. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x97, 0x4a, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........J..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xfd, 0x3f, 0x00, 0x00, 0x3f, 0x38, 0x00, // .=........?..?8. + 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, // .........,R..... + 0x00, 0x04, 0x00, 0x00, 0x00, 0xfd, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x4a, 0x00, // ......?..>....J. + 0x00, 0x76, 0x09, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x87, 0x32, 0x00, // .v...9........2. + 0x00, 0x01, 0x14, 0x00, 0x00, 0x97, 0x4a, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, // ......J......... + 0x00, 0x84, 0x3d, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x00, // ..=..........,R. + 0x00, 0x87, 0x32, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x84, 0x3d, 0x00, 0x00, 0x38, 0x00, 0x01, // ..2.......=..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x74, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......t...... + 0x00, 0x06, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xfd, 0x15, 0x00, // .....7.......... + 0x00, 0xf8, 0x00, 0x02, 0x00, 0xeb, 0x3d, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ......=..;...... + 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // ..K......=...... + 0x00, 0x1c, 0x41, 0x00, 0x00, 0xfd, 0x15, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // ..A............. + 0x00, 0x4b, 0x53, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1c, 0x41, 0x00, // .KS...........A. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x59, 0x05, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....K..Y...9.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0xa6, 0x33, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0xb6, 0x4b, 0x00, // ......3.......K. + 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x4a, 0x56, 0x00, 0x00, 0x01, 0x00, 0x00, // .........JV..... + 0x00, 0x1a, 0x00, 0x00, 0x00, 0x4b, 0x53, 0x00, 0x00, 0xa6, 0x33, 0x00, 0x00, 0xfe, 0x00, 0x02, // .....KS...3..... + 0x00, 0x4a, 0x56, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .JV..8...6...... + 0x00, 0x65, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, // .e...........7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x3a, 0x4e, 0x00, // .............:N. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xff, 0x49, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........I..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x36, 0x43, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......6C..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;....... &..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x46, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......F&..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x42, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......B&..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x52, 0x23, 0x00, 0x00, 0xa4, 0x11, 0x00, // .=.......R#..... + 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x64, 0x40, 0x00, 0x00, 0x52, 0x23, 0x00, // .O.......d@..R#. + 0x00, 0x52, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // .R#............. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xff, 0x49, 0x00, 0x00, 0x64, 0x40, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....I..d@..9.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x21, 0x00, 0x00, 0x91, 0x0e, 0x00, 0x00, 0xff, 0x49, 0x00, // .....`!.......I. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xce, 0x5d, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........]..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ./.......=...... + 0x00, 0xc8, 0x47, 0x00, 0x00, 0xce, 0x5d, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // ..G...]..P...... + 0x00, 0x5d, 0x1a, 0x00, 0x00, 0xc8, 0x47, 0x00, 0x00, 0xc8, 0x47, 0x00, 0x00, 0xc8, 0x47, 0x00, // .]....G...G...G. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x36, 0x43, 0x00, 0x00, 0x60, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>...6C..`!..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x81, 0x23, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0x4f, 0x00, 0x08, // ......#......O.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x9a, 0x3d, 0x00, 0x00, 0x81, 0x23, 0x00, 0x00, 0x81, 0x23, 0x00, // ......=...#...#. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, // .............>.. + 0x00, 0x20, 0x26, 0x00, 0x00, 0x9a, 0x3d, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x46, 0x26, 0x00, // . &...=..>...F&. + 0x00, 0x5d, 0x1a, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x6b, 0x17, 0x00, // .]...9.......k.. + 0x00, 0x30, 0x0c, 0x00, 0x00, 0x36, 0x43, 0x00, 0x00, 0x20, 0x26, 0x00, 0x00, 0x46, 0x26, 0x00, // .0...6C.. &..F&. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xdc, 0x58, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........X..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ./.......=...... + 0x00, 0x2c, 0x34, 0x00, 0x00, 0xdc, 0x58, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, // .,4...X......... + 0x00, 0x45, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, // .E>............. + 0x00, 0x2c, 0x34, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xaf, 0x2e, 0x00, // .,4............. + 0x00, 0x6b, 0x17, 0x00, 0x00, 0x45, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x42, 0x26, 0x00, // .k...E>..>...B&. + 0x00, 0xaf, 0x2e, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xe7, 0x43, 0x00, // .....9........C. + 0x00, 0x74, 0x13, 0x00, 0x00, 0x42, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, // .t...B&..A...... + 0x00, 0xe1, 0x5d, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // ..]..........=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x84, 0x48, 0x00, 0x00, 0xe1, 0x5d, 0x00, 0x00, 0x51, 0x00, 0x05, // ......H...]..Q.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0xe7, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, // ......9...C..... + 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x79, 0x49, 0x00, 0x00, 0xe7, 0x43, 0x00, // .Q.......yI...C. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x21, 0x19, 0x00, // .....Q.......!.. + 0x00, 0xe7, 0x43, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // ..C......P...... + 0x00, 0xe8, 0x5a, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0x79, 0x49, 0x00, 0x00, 0x21, 0x19, 0x00, // ..Z...9..yI..!.. + 0x00, 0x84, 0x48, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xe8, 0x5a, 0x00, 0x00, 0x38, 0x00, 0x01, // ..H.......Z..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x7d, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x81, 0x59, 0x00, // .}...7........Y. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xcf, 0x58, 0x00, 0x00, 0x37, 0x00, 0x03, // .7........X..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x65, 0x52, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x99, 0x5b, 0x00, // .....eR.......[. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x3d, 0x4c, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......=L..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x46, 0x17, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......F...... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x5e, 0x28, 0x00, 0x00, 0x07, 0x00, 0x00, // .;...!...^(..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x5f, 0x28, 0x00, 0x00, 0x07, 0x00, 0x00, // .;......._(..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x97, 0x28, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........(..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x31, 0x26, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......1&..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3d, 0x4c, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...=L......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x3d, 0x4c, 0x00, // .........5...=L. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x82, 0x43, 0x00, 0x00, 0xcf, 0x58, 0x00, // .=........C...X. + 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0x79, 0x52, 0x00, 0x00, 0x82, 0x43, 0x00, // .O.......yR...C. + 0x00, 0x82, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x05, // ..C............. + 0x00, 0x13, 0x00, 0x00, 0x00, 0xc8, 0x42, 0x00, 0x00, 0x79, 0x52, 0x00, 0x00, 0x19, 0x00, 0x00, // ......B..yR..... + 0x00, 0x50, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0x61, 0x45, 0x00, 0x00, 0x8a, 0x00, 0x00, // .P.......aE..... + 0x00, 0x8a, 0x00, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, 0x00, 0xa2, 0x2e, 0x00, // ................ + 0x00, 0xc8, 0x42, 0x00, 0x00, 0x61, 0x45, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x13, 0x00, 0x00, // ..B..aE......... + 0x00, 0xb3, 0x5d, 0x00, 0x00, 0xa2, 0x2e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x51, 0x00, 0x05, // ..]..........Q.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6b, 0x40, 0x00, 0x00, 0xb3, 0x5d, 0x00, 0x00, 0x00, 0x00, 0x00, // .....k@...]..... + 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd4, 0x32, 0x00, 0x00, 0xb3, 0x5d, 0x00, // .Q........2...]. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x37, 0x39, 0x00, // .....P.......79. + 0x00, 0x6b, 0x40, 0x00, 0x00, 0xd4, 0x32, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, // .k@...2......>.. + 0x00, 0x46, 0x17, 0x00, 0x00, 0x37, 0x39, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .F...79..=...... + 0x00, 0xce, 0x25, 0x00, 0x00, 0x46, 0x17, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ..%..F...Q...... + 0x00, 0xe7, 0x3e, 0x00, 0x00, 0xce, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, // ..>...%......Q.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb7, 0x4b, 0x00, 0x00, 0xce, 0x25, 0x00, 0x00, 0x01, 0x00, 0x00, // ......K...%..... + 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xd7, 0x57, 0x00, 0x00, 0xce, 0x25, 0x00, // .Q........W...%. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x30, 0x37, 0x00, // .....P.......07. + 0x00, 0xe7, 0x3e, 0x00, 0x00, 0xb7, 0x4b, 0x00, 0x00, 0xd7, 0x57, 0x00, 0x00, 0x0c, 0x0a, 0x00, // ..>...K...W..... + 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x1b, 0x62, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........b..B.. + 0x00, 0x32, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x70, 0x29, 0x00, // .2...=...e...p). + 0x00, 0x1b, 0x62, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x2b, 0x1a, 0x00, // ..b..........+.. + 0x00, 0x30, 0x37, 0x00, 0x00, 0x70, 0x29, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, // .07..p)..O...... + 0x00, 0x3b, 0x3e, 0x00, 0x00, 0x2b, 0x1a, 0x00, 0x00, 0x2b, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, // .;>..+...+...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // ................ + 0x00, 0xbf, 0x31, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x3b, 0x3e, 0x00, // ..1......E...;>. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x46, 0x17, 0x00, 0x00, 0xbf, 0x31, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>...F....1..=.. + 0x00, 0x67, 0x09, 0x00, 0x00, 0xbc, 0x32, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, // .g....2..C...>.. + 0x00, 0x5e, 0x28, 0x00, 0x00, 0xbc, 0x32, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .^(...2..=...... + 0x00, 0x6f, 0x1b, 0x00, 0x00, 0x46, 0x17, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x28, 0x00, // .o...F...>..._(. + 0x00, 0x6f, 0x1b, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xdd, 0x30, 0x00, // .o...A........0. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf5, 0x58, 0x00, 0x00, 0xdd, 0x30, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......X...0..>.. + 0x00, 0x97, 0x28, 0x00, 0x00, 0xf5, 0x58, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // ..(...X..9...... + 0x00, 0x18, 0x0e, 0x00, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x5e, 0x28, 0x00, 0x00, 0x5f, 0x28, 0x00, // .........^(.._(. + 0x00, 0x97, 0x28, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x14, 0x19, 0x00, // ..(..=.......... + 0x00, 0x81, 0x59, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x5e, 0x00, // ..Y...........^. + 0x00, 0x18, 0x0e, 0x00, 0x00, 0x14, 0x19, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x31, 0x26, 0x00, // .........>...1&. + 0x00, 0xce, 0x5e, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xae, 0x46, 0x00, // ..^..9........F. + 0x00, 0x65, 0x0c, 0x00, 0x00, 0x31, 0x26, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x65, 0x52, 0x00, // .e...1&..>...eR. + 0x00, 0xae, 0x46, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ..F......8.... +}; +static const uint8_t fs_texture_cube_dx9[787] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x03, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x05, 0x75, 0x5f, 0x6d, 0x74, // Color0......u_mt 0x78, 0x14, 0x01, 0x00, 0x00, 0x03, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, // x.......u_params - 0x12, 0x01, 0x03, 0x00, 0x01, 0x00, 0xc0, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x3a, 0x00, // ..............:. - 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, // CTAB............ - 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, // ................ - 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x64, 0x00, 0x00, 0x00, // X...........d... - 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....t........... - 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, // |............... - 0x01, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, // ............s_te - 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, // xColor.......... - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x74, 0x78, 0x00, 0xab, 0xab, // ........u_mtx... - 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, // u_params........ - 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, // ............ps_3 - 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, // _0.Microsoft (R) - 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, // HLSL Shader Com - 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, // piler 10.0.10011 - 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x04, 0x00, 0x0f, 0xa0, // .16384..Q....... - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, // ...@.......?.... - 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ - 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, // ................ - 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x80, 0x01, 0x00, 0xe4, 0x90, // ................ - 0x04, 0x00, 0x00, 0xa0, 0x04, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, // ......U......... - 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe6, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0e, 0x80, // ................ - 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, 0x90, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, // ..U............. - 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x02, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x24, 0x00, 0x00, 0x02, // ............$... - 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x08, 0x80, // ................ - 0x03, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x80, // ...._........... - 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, // ................ - 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... + 0x12, 0x01, 0x03, 0x00, 0x01, 0x00, 0xd8, 0x02, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, // ................ + 0x3a, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x03, // :.CTAB.......... + 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0xa8, 0x00, // ................ + 0x00, 0x00, 0x58, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x64, 0x00, // ..X...........d. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, // ......t......... + 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x02, 0x00, // ..|............. + 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, // ..............s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, // texColor........ + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x74, 0x78, 0x00, // ..........u_mtx. + 0xab, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, // ..u_params...... + 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, // ..............ps + 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( + 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x36, 0x2e, 0x33, 0x2e, 0x39, 0x36, 0x30, 0x30, // ompiler 6.3.9600 + 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x04, 0x00, // .16384....Q..... + 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0xcd, 0xcc, // .....@.......?.. + 0x0c, 0x40, 0x51, 0x00, 0x00, 0x05, 0x05, 0x00, 0x0f, 0xa0, 0x2f, 0xba, 0xe8, 0x3e, 0x00, 0x00, // .@Q......./..>.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x03, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, 0xa0, 0x04, 0x00, // ................ + 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, // U............... + 0xe6, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0e, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, // ............U... + 0x90, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, // ................ + 0x00, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x24, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, // ......$......... + 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x08, 0x80, 0x03, 0x00, 0x00, 0xa0, 0x5f, 0x00, // .............._. + 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, // ................ + 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x0f, 0x00, // ................ + 0x00, 0x02, 0x02, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, // ................ + 0x02, 0x80, 0x01, 0x00, 0x55, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, // ....U........... + 0xaa, 0x8b, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x08, 0x80, 0x01, 0x00, 0xff, 0x80, 0x05, 0x00, // ................ + 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xff, 0xa0, 0x0e, 0x00, // ................ + 0x00, 0x02, 0x02, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, // ................ + 0x02, 0x80, 0x01, 0x00, 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, // ....U........... + 0xaa, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, // ................ + 0xe4, 0x90, 0x02, 0x00, 0xe4, 0x81, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x03, 0x00, // ................ + 0xaa, 0xa0, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x08, 0x80, 0x03, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, // ................ + 0xff, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, // ................ + 0x00, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x8b, 0x0f, 0x00, // ............U... + 0x00, 0x02, 0x01, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x8b, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, // ................ + 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x02, 0x80, 0x00, 0x00, // ................ + 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0xff, 0xff, // U............... + 0x00, 0x00, 0x00, // ... }; -static const uint8_t fs_texture_cube_dx11[736] = +static const uint8_t fs_texture_cube_dx11[1058] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x03, 0x00, 0x05, 0x75, 0x5f, 0x6d, 0x74, 0x78, // FSH........u_mtx - 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, // .......u_params. - 0x00, 0x40, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // .@....s_texColor - 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xa4, 0x02, 0x44, 0x58, 0x42, 0x43, 0x4c, 0x24, 0x47, 0x2e, // 0.......DXBCL$G. - 0x14, 0x8a, 0x1d, 0xd0, 0x5e, 0x4b, 0xf7, 0x6a, 0x90, 0x00, 0xd7, 0x38, 0x01, 0x00, 0x00, 0x00, // ....^K.j...8.... - 0xa4, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, // ........,....... - 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....ISGNl....... - 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....P........... - 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ - 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....b........... - 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, // ............SV_P - 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, // OSITION.COLOR.TE - 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, // XCOORD..OSGN,... - 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ....... - 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ - 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, // SV_TARGET...SHDR - 0xc8, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, // ....@...r...Y... - 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, // F. .........Z... - 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, // .`......X0...p.. - 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, // ....UU..b....... - 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....b...2....... - 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, // e.... ......h... - 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0f, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....2...2....... - 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, // F........@.....@ - 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, // ...@.........@.. - 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x38, 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, // 8...2.......F... - 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0xbf, // .....@.....?.... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xe2, 0x00, 0x10, 0x00, // ........8....... - 0x00, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x89, 0x20, 0x00, // ....V......... . - 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, // ........2...r... - 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... - 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, // ....r.......F... - 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....F. ......... - 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, // ............F... - 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x05, // ....F.......D... - 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........:....... - 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, // 8...r........... - 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, // ....F.......H... - 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... - 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // F~.......`...... - 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, // .. .........8... - 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // . ......F....... - 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x50, 0x00, // F.......>.....P. + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x03, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x75, 0x5f, 0x6d, 0x74, 0x78, 0x14, // ams.......u_mtx. + 0x00, 0x10, 0x00, 0x04, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // ......s_texColor + 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x03, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xb0, 0x62, // 0.........DXBC.b + 0x27, 0x2c, 0xcd, 0x2b, 0x52, 0x62, 0x21, 0x09, 0x5c, 0x97, 0xe9, 0xc6, 0x0d, 0x4f, 0x01, 0x00, // ',.+Rb!......O.. + 0x00, 0x00, 0xe4, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..........,..... + 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, // ......ISGNl..... + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ......P......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......b......... + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, 0x53, 0x56, // ..............SV + 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, // _POSITION.COLOR. + 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, // TEXCOORD..OSGN,. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // .......... ..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, // ..SV_TARGET...SH + 0x44, 0x52, 0x08, 0x03, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x59, 0x00, // DR....@.......Y. + 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5a, 0x00, // ..F. .........Z. + 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, 0x04, 0x00, 0x70, // ...`......X0...p + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, // ......UU..b..... + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, // ......b...2..... + 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, // ..e.... ......h. + 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0f, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2...2..... + 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, // ..F........@.... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, // .@...@.........@ + 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, // ..8...2.......F. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, // .......@.....?.. + 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xe2, 0x00, // ..........8..... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x89, // ......V......... + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, // .........2...r. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ......F. ....... + 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x07, 0x10, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // ......r.......F. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ......F. ....... + 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // ..............F. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, // ......F.......D. + 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, // ..........:..... + 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, // ..8...r......... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, // ......F.......H. + 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // ..........F..... + 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, // ..F~.......`.... + 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, // .... .........8. + 0x00, 0x07, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, // ..........F..... + 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x06, 0x72, 0x00, // ..F......./...r. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x01, 0x00, // ......F......... + 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, // ..6.... ......:. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, // ......8...r..... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xcd, 0xcc, // ..F........@.... + 0x0c, 0x40, 0xcd, 0xcc, 0x0c, 0x40, 0xcd, 0xcc, 0x0c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, // .@...@...@...... + 0x00, 0x05, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, // ..r.......F..... + 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // ..2...r.......F. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, // ......F.......F. + 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, // ..A.......2...r. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ ....... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, // ..F.......F..... + 0x00, 0x00, 0x19, 0x00, 0x00, 0x06, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, // ..............:. + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, // .........8...r. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // ..............F. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x06, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, // ....../...r..... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, // ..F...........8. + 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // ..r.......F..... + 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x2f, 0xba, 0xe8, 0x3e, 0x2f, 0xba, 0xe8, 0x3e, 0x2f, 0xba, // ...@../..>/..>/. + 0xe8, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, // .>........r .... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, // ..F.......>..... + 0x50, 0x00, // P. }; -static const uint8_t fs_texture_cube_mtl[962] = +static const uint8_t fs_texture_cube_mtl[1190] = { - 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xb3, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . float4 v_colo - 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, // r0;. float2 v_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, // excoord0;.};.str - 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // uct xlatMtlShade - 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, // rOutput {. half - 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, // 4 gl_FragColor;. - 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // };.struct xlatMt - 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, // lShaderUniform { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x74, // . float4x4 u_mt - 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, // x;. float4 u_pa - 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, // rams;.};.fragmen - 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO - 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, // utput xlatMtlMai - 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // n (xlatMtlShader - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, // Input _mtl_i [[s - 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, // tage_in]], const - 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // ant xlatMtlShade - 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // rUniform& _mtl_u - 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x0a, 0x20, // [[buffer(0)]]. - 0x20, 0x2c, 0x20, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65, // , texturecube - 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // s_texCol - 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, // or [[texture(0)] - 0x5d, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x73, // ], sampler _mtls - 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, // mp_s_texColor [[ - 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, // sampler(0)]]).{. - 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // xlatMtlShaderO - 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, // utput _mtl_o;. - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // float3 tmpvar_1; + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x05, 0x75, 0x5f, 0x6d, 0x74, 0x78, 0x04, // ams.......u_mtx. + 0x01, 0x00, 0x00, 0x01, 0x00, 0x7c, 0x04, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, // .....|...using n + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, // amespace metal;. + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // struct xlatMtlSh + 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // aderInput {. fl + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, // oat4 v_color0;. + 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // float3 v_texcoo + 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, // rd0;.};.struct x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, // latMtlShaderOutp + 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, // ut {. float4 gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, // _FragColor;.};.s + 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // truct xlatMtlSha + 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, // derUniform {. f + 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x0a, // loat4 u_params;. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x74, 0x78, // float4x4 u_mtx + 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, // ;.};.fragment xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, // t xlatMtlMain (x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, // latMtlShaderInpu + 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, // t _mtl_i [[stage + 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, // _in]], constant + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, // xlatMtlShaderUni + 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, // form& _mtl_u [[b + 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x0a, 0x20, 0x20, 0x2c, 0x20, 0x20, // uffer(0)]]. , + 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65, 0x3c, 0x66, 0x6c, 0x6f, // texturecube s_texColor [ + 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, // [texture(0)]], s + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, // ampler _mtlsmp_s + 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, // _texColor [[samp + 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, // ler(0)]]).{. xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu + 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // t _mtl_o;. floa + 0x74, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, // t3 tmpvar_1 = 0; 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x20, 0x3d, 0x20, // . tmpvar_1.z = 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, // 1.0;. tmpvar_1. 0x78, 0x79, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, // xy = (((_mtl_i.v - 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x2a, 0x20, 0x32, 0x2e, 0x30, // _texcoord0 * 2.0 - 0x29, 0x20, 0x2d, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // ) - 1.0) * float - 0x32, 0x28, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, // 2(1.0, -1.0));. - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // float4 tmpvar_2 - 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x20, 0x3d, // ;. tmpvar_2.w = - 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // 0.0;. tmpvar_2 - 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // .xyz = tmpvar_1; - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // . float3 tmpvar - 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x20, 0x3d, // _3;. tmpvar_3 = - 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x28, 0x5f, 0x6d, 0x74, 0x6c, // normalize((_mtl - 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x74, 0x78, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // _u.u_mtx * tmpva - 0x72, 0x5f, 0x32, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, // r_2).xyz);. hal - 0x66, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x74, // f4 tmpvar_4;. t - 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, // mpvar_4 = half4( - 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, // s_texColor.sampl - 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // e(_mtlsmp_s_texC - 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x29, 0x28, 0x74, // olor, (float3)(t - 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, // mpvar_3), level( - 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, // _mtl_u.u_params. - 0x78, 0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // x)));. _mtl_o.g - 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x28, 0x28, // l_FragColor = (( - 0x68, 0x61, 0x6c, 0x66, 0x34, 0x29, 0x28, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x29, 0x74, // half4)((float4)t - 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // mpvar_4 * _mtl_i - 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, // .v_color0));. r - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, // eturn _mtl_o;.}. - 0x0a, 0x00, // .. + 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x20, 0x2a, 0x20, // _texcoord0.xy * + 0x32, 0x2e, 0x30, 0x29, 0x20, 0x2d, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x66, 0x6c, // 2.0) - 1.0) * fl + 0x6f, 0x61, 0x74, 0x32, 0x28, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x2d, 0x31, 0x2e, 0x30, 0x29, 0x29, // oat2(1.0, -1.0)) + 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ;. float4 tmpva + 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // r_2 = 0;. tmpva + 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, // r_2.w = 0.0;. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x74, 0x6d, // mpvar_2.xyz = tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // pvar_1;. float4 + 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, // _color_3 = 0;. + 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x28, 0x73, 0x5f, 0x74, // _color_3 = (s_t + 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x5f, // exColor.sample(_ + 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, // mtlsmp_s_texColo + 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x29, 0x28, 0x6e, 0x6f, 0x72, 0x6d, // r, (float3)(norm + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x28, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, // alize((_mtl_u.u_ + 0x6d, 0x74, 0x78, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x2e, // mtx * tmpvar_2). + 0x78, 0x79, 0x7a, 0x29, 0x29, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x5f, 0x6d, 0x74, // xyz)), level(_mt + 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x29, // l_u.u_params.x)) + 0x20, 0x2a, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // * _mtl_i.v_colo + 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, // r0);. float4 tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // pvar_4 = 0;. tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x77, // pvar_4.xyz = pow + 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, 0x78, 0x20, // (abs((. mix + 0x28, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // (pow (abs(_color + 0x5f, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, // _3.xyz), float3( + 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x29, 0x29, 0x2c, // 2.2, 2.2, 2.2)), + 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x5f, // _color_3.xyz, _ + 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x7a, // mtl_u.u_params.z + 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, 0x70, 0x32, // ). * . exp2 + 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, // (_mtl_u.u_params + 0x2e, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, // .w). )), float3 + 0x28, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, // (0.4545454, 0.45 + 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, // 45454, 0.4545454 + 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x77, // ));. tmpvar_4.w + 0x20, 0x3d, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x33, 0x2e, 0x77, 0x3b, 0x0a, 0x20, // = _color_3.w;. + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, // _mtl_o.gl_FragC + 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, // olor = tmpvar_4; + 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // . return _mtl_o + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // ;.}... }; +extern const uint8_t* fs_texture_cube_pssl; +extern const uint32_t fs_texture_cube_pssl_size; diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_cube.sc b/3rdparty/bgfx/tools/texturev/fs_texture_cube.sc index 7948e7b..091bffd 100644 --- a/3rdparty/bgfx/tools/texturev/fs_texture_cube.sc +++ b/3rdparty/bgfx/tools/texturev/fs_texture_cube.sc @@ -1,21 +1,20 @@ $input v_texcoord0, v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ -#include +#include "common.sh" SAMPLERCUBE(s_texColor, 0); uniform mat4 u_mtx; -uniform vec4 u_params; -#define u_textureLod u_params.x - void main() { - vec3 dir = vec3( (v_texcoord0*2.0 - 1.0) * vec2(1.0, -1.0), 1.0); + vec3 dir = vec3( (v_texcoord0.xy*2.0 - 1.0) * vec2(1.0, -1.0), 1.0); dir = normalize(mul(u_mtx, vec4(dir, 0.0) ).xyz); - gl_FragColor = textureCubeLod(s_texColor, dir, u_textureLod) * v_color0; + + vec4 color = textureCubeLod(s_texColor, dir, u_textureLod); + gl_FragColor = toEv(color * v_color0); } diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_cube2.bin.h b/3rdparty/bgfx/tools/texturev/fs_texture_cube2.bin.h new file mode 100644 index 0000000..395b63e --- /dev/null +++ b/3rdparty/bgfx/tools/texturev/fs_texture_cube2.bin.h @@ -0,0 +1,544 @@ +static const uint8_t fs_texture_cube2_glsl[603] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x2c, 0x02, 0x00, 0x00, 0x76, 0x61, // olor......,...va + 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // rying highp vec4 + 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, // v_color0;.varyi + 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, // ng highp vec3 v_ + 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, // texcoord0;.unifo + 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, // rm highp vec4 u_ + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // params;.uniform + 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, // lowp samplerCube + 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, // s_texColor;.voi + 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6d, 0x65, // d main ().{. me + 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // diump vec4 tmpva + 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // r_1;. lowp vec4 + 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x63, 0x6f, // _color_2;. _co + 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // lor_2 = (texture + 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, // CubeLod (s_te + 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // xColor, v_texcoo + 0x72, 0x64, 0x30, 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, // rd0, u_params.x) + 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, // * v_color0);. + 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // lowp vec4 tmpvar + 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2e, 0x78, // _3;. tmpvar_3.x + 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x28, 0x0a, // yz = pow (abs((. + 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, 0x78, 0x20, 0x28, 0x70, 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, // mix (pow (ab + 0x73, 0x28, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, // s(_color_2.xyz), + 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, // vec3(2.2, 2.2, + 0x32, 0x2e, 0x32, 0x29, 0x29, 0x2c, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x32, 0x2e, // 2.2)), _color_2. + 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x7a, 0x29, // xyz, u_params.z) + 0x0a, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, 0x70, 0x32, 0x28, // . * . exp2( + 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x77, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, // u_params.w). )) + 0x2c, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, // , vec3(0.4545454 + 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, // , 0.4545454, 0.4 + 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // 545454));. tmpv + 0x61, 0x72, 0x5f, 0x33, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, // ar_3.w = _color_ + 0x32, 0x2e, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, // 2.w;. tmpvar_1 + 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, // = tmpvar_3;. gl + 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp + 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_1;.}... +}; +static const uint8_t fs_texture_cube2_spv[5462] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x38, 0x15, 0x00, 0x00, 0x03, 0x02, 0x23, // ams......8.....# + 0x07, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x54, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // .........Ta..... + 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... + 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, // .w...t.......... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, // n........g...Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x00, 0x06, 0x00, 0x06, // xSamplerCube.... + 0x00, 0x67, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, // .g.......m_sampl + 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x67, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, // er.......g...... + 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x11, // .m_texture...... + 0x00, 0xf4, 0x10, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // .....bgfxTexture + 0x43, 0x75, 0x62, 0x65, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, // CubeLod(struct-B + 0x67, 0x66, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x43, 0x75, 0x62, 0x65, 0x2d, 0x70, // gfxSamplerCube-p + 0x31, 0x2d, 0x74, 0x43, 0x31, 0x31, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, // 1-tC11;vf3;f1;.. + 0x00, 0x05, 0x00, 0x05, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, // .....'..._sample + 0x72, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, // r............_co + 0x6f, 0x72, 0x64, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x5f, 0x6c, 0x65, // ord.........._le + 0x76, 0x65, 0x6c, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x6d, 0x69, 0x78, // vel......0...mix + 0x28, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, // (vf3;vf3;vf3;... + 0x00, 0x05, 0x00, 0x03, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, // ........._a..... + 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd9, 0x0e, 0x00, // ....._b......... + 0x00, 0x5f, 0x74, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x01, 0x14, 0x00, 0x00, 0x76, 0x65, 0x63, // ._t..........vec + 0x33, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, // 3_splat(f1;..... + 0x00, 0x45, 0x37, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, // .E7.._x......5.. + 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, // .vec4_splat(f1;. + 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x06, // ........._x..... + 0x00, 0x91, 0x0e, 0x00, 0x00, 0x74, 0x6f, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x28, 0x76, 0x66, // .....toLinear(vf + 0x33, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3f, 0x38, 0x00, 0x00, 0x5f, 0x72, 0x67, // 3;.......?8.._rg + 0x62, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x74, 0x13, 0x00, 0x00, 0x74, 0x6f, 0x47, // b........t...toG + 0x61, 0x6d, 0x6d, 0x61, 0x28, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // amma(vf3;....... + 0x00, 0xfd, 0x15, 0x00, 0x00, 0x5f, 0x72, 0x67, 0x62, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // ....._rgb....... + 0x00, 0x65, 0x0c, 0x00, 0x00, 0x74, 0x6f, 0x45, 0x76, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, // .e...toEv(vf4;.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xa4, 0x11, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // ........._color. + 0x00, 0x05, 0x00, 0x07, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, // .........@main(v + 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, // f4;vf3;vf4;..... + 0x00, 0x81, 0x59, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, // ..Y..v_color0... + 0x00, 0x05, 0x00, 0x05, 0x00, 0xcf, 0x58, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ......X..v_texco + 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x65, 0x52, 0x00, 0x00, 0x67, 0x6c, 0x5f, // ord0.....eR..gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, // FragData_0_..... + 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // .C...s_texColor. + 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .........s_texCo + 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, // lorSampler...... + 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, // .....s_texColorT + 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x97, 0x4a, 0x00, // exture........J. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xb6, 0x4b, 0x00, // .param........K. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x6b, 0x17, 0x00, // .param.......k.. + 0x00, 0x72, 0x67, 0x62, 0x00, 0x05, 0x00, 0x04, 0x00, 0xff, 0x49, 0x00, 0x00, 0x70, 0x61, 0x72, // .rgb......I..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x24, 0x47, 0x6c, // am.......<...$Gl + 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // obal.....<...... + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, // .u_viewRect..... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, // .<.......u_viewT + 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // exel.....<...... + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, // .u_view......<.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, // .....u_invView.. + 0x00, 0x06, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, // .....<.......u_p + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, // roj......<...... + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, // .u_invProj...... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // roj......<...... + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // .u_invViewProj.. + 0x00, 0x06, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .....<.......u_m + 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, // odel.....<...... + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, // .u_modelView.... + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .<.......u_model + 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, // ViewProj.....<.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, // .....u_alphaRef4 + 0x00, 0x06, 0x00, 0x06, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, // .....<.......u_p + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // arams........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x36, 0x43, 0x00, 0x00, 0x70, 0x61, 0x72, // .........6C..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x20, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, // am....... &..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x46, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......F&..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x42, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......B&..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, // am...........bgf + 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // x_VoidFrag...... + 0x00, 0x3d, 0x4c, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .=L..param...... + 0x00, 0x18, 0x0e, 0x00, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .....color...... + 0x00, 0x74, 0x45, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .tE..param...... + 0x00, 0x5e, 0x28, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // .^(..param...... + 0x00, 0x97, 0x28, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..(..param...... + 0x00, 0x31, 0x26, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .1&..param...... + 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, // ..A..v_color0... + 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // .....w...v_color + 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, // 0.........<..v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, // excoord0.....t.. + 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, // .v_texcoord0.... + 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, // _0_.......G..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, // am........U..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, // am...........par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, // am...........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, // FragData_0_..G.. + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .....".......G.. + 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .....!.......G.. + 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .....".......G.. + 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .....!.......G.. + 0x00, 0x4c, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .L.......@...H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .<.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // .....H...<...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // .....H...<...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .#... ...H...<.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .<...........H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, // .<.......#...`.. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...<.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H...<...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H...<...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .#.......H...<.. + 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .<...........H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, // .<.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...<.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, // .....H...<...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, // .....H...<...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .#... ...H...<.. + 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .<...........H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, // .<.......#...`.. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...<.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H...<...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H...<...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .#.......H...<.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .<...........H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, // .<.......#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H...<.......... + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H...<...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H...<...... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, // .#.......H...<.. + 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, // .<.......#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...<.......#.. + 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, // .0...G...<...... + 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .G...B..."...... + 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .G...w.......... + 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .G...t.......... + 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .G.............. + 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, // .........!...... + 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x98, 0x00, 0x00, // ..... .......... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, // ................ + 0x00, 0x67, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .g........... .. + 0x00, 0x21, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x67, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, // .!.......g...... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, // ................ + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, // .............!.. + 0x00, 0xaf, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, // .........!...... + 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x75, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // .....!...u...... + 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, // .............!.. + 0x00, 0xe5, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, // .............!.. + 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, // .............!.. + 0x00, 0x06, 0x01, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, // .............!.. + 0x00, 0x1f, 0x01, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x06, // .............!.. + 0x00, 0x7d, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, // .}.............. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, // ..... ..."...... + 0x00, 0x67, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, // .g...;..."...C.. + 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, // ..... ...y...... + 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, // .....;...y...... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ..... .......... + 0x00, 0x98, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x15, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, // .....;.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, // .....+.......... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x98, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... ...z...... + 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x98, 0x00, 0x00, // ................ + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x76, 0x09, 0x00, 0x00, 0xcd, 0xcc, 0x0c, // .+.......v...... + 0x40, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x59, 0x05, 0x00, 0x00, 0x2f, 0xba, 0xe8, // @+.......Y.../.. + 0x3e, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // >....e.......... + 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, // .+.......j... .. + 0x00, 0x1c, 0x00, 0x04, 0x00, 0x4c, 0x0a, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .....L...e...j.. + 0x00, 0x1e, 0x00, 0x0f, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .....<.......... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x4c, 0x0a, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...L...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .e........... .. + 0x00, 0xb9, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x3b, 0x00, 0x04, // .........<...;.. + 0x00, 0xb9, 0x04, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .....B.......+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ...../.......+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2b, 0x00, 0x04, // ............@+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .....w....... .. + 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x96, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .....t....... .. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, // .............6.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // .....Sa..;...... + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, // ..G......;...... + 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ..U......;...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, // .........=...... + 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, // .!C......=...... + 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x67, 0x09, 0x00, // ..3......P...g.. + 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, // .. ..!C...3..>.. + 0x00, 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // .C.... ..=...... + 0x00, 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // ..A..w...=...... + 0x00, 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, // ..<..t...>....G. + 0x00, 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, // ..A..>....U...<. + 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0xcc, 0x0d, 0x00, // .9........&..... + 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, // ..G...U......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, // .............>.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, // .............8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xf4, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0xaf, 0x04, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, // .....7...!...'.. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, // .7...........7.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, // .............$T. + 0x00, 0x41, 0x00, 0x05, 0x00, 0x16, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, // .A...........'.. + 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x98, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, // .....=.......m). + 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, // .....A...z....U. + 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, // .'.......=...... + 0x00, 0xf2, 0x4e, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, // ..N...U..V...... + 0x00, 0x32, 0x39, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .29..m)...N..=.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, // .............=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, // .....=>......X.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, // .........29..... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, // .....=>......... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x00, // .8...6.......0.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, // .....u...7...... + 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xc7, 0x0e, 0x00, // .....7.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.............. + 0x00, 0x16, 0x59, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x37, 0x54, 0x00, // ..Y..=.......7T. + 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x07, 0x48, 0x00, // .....=........H. + 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0e, 0x47, 0x00, // .....=........G. + 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x65, 0x19, 0x00, // .............e.. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x37, 0x54, 0x00, 0x00, 0x07, 0x48, 0x00, // .........7T...H. + 0x00, 0x0e, 0x47, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x65, 0x19, 0x00, 0x00, 0x38, 0x00, 0x01, // ..G......e...8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0xe5, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x45, 0x37, 0x00, // .....7.......E7. + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x02, 0x2d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ......-..=...... + 0x00, 0x1e, 0x5e, 0x00, 0x00, 0x45, 0x37, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ..^..E7..=...... + 0x00, 0xcc, 0x56, 0x00, 0x00, 0x45, 0x37, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ..V..E7..=...... + 0x00, 0xdd, 0x26, 0x00, 0x00, 0x45, 0x37, 0x00, 0x00, 0x50, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, // ..&..E7..P...... + 0x00, 0x2a, 0x29, 0x00, 0x00, 0x1e, 0x5e, 0x00, 0x00, 0xcc, 0x56, 0x00, 0x00, 0xdd, 0x26, 0x00, // .*)...^...V...&. + 0x00, 0xfe, 0x00, 0x02, 0x00, 0x2a, 0x29, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .....*)..8...6.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, // .....5.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.............. + 0x00, 0xa6, 0x4d, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xcc, 0x4e, 0x00, // ..M..=........N. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x11, 0x46, 0x00, // .....=........F. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb1, 0x30, 0x00, // .....=........0. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc4, 0x30, 0x00, // .....=........0. + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x49, 0x00, // .....P........I. + 0x00, 0xcc, 0x4e, 0x00, 0x00, 0x11, 0x46, 0x00, 0x00, 0xb1, 0x30, 0x00, 0x00, 0xc4, 0x30, 0x00, // ..N...F...0...0. + 0x00, 0xfe, 0x00, 0x02, 0x00, 0xce, 0x49, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // ......I..8...6.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x91, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, // ................ + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x3f, 0x38, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.......?8..... + 0x00, 0x5e, 0x3e, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x97, 0x4a, 0x00, // .^>..;........J. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0xfd, 0x3f, 0x00, // .....=........?. + 0x00, 0x3f, 0x38, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x52, 0x00, // .?8..........,R. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xfd, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, // ..........?..>.. + 0x00, 0x97, 0x4a, 0x00, 0x00, 0x76, 0x09, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, // ..J..v...9...... + 0x00, 0x87, 0x32, 0x00, 0x00, 0x01, 0x14, 0x00, 0x00, 0x97, 0x4a, 0x00, 0x00, 0x0c, 0x00, 0x07, // ..2.......J..... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x84, 0x3d, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, // ......=......... + 0x00, 0x2c, 0x52, 0x00, 0x00, 0x87, 0x32, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x84, 0x3d, 0x00, // .,R...2.......=. + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x74, 0x13, 0x00, // .8...6.......t.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, // .........7...... + 0x00, 0xfd, 0x15, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0xeb, 0x3d, 0x00, 0x00, 0x3b, 0x00, 0x04, // ..........=..;.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......K......=.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x1c, 0x41, 0x00, 0x00, 0xfd, 0x15, 0x00, 0x00, 0x0c, 0x00, 0x06, // ......A......... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x4b, 0x53, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .....KS......... + 0x00, 0x1c, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x59, 0x05, 0x00, // ..A..>....K..Y.. + 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0xa6, 0x33, 0x00, 0x00, 0x01, 0x14, 0x00, // .9........3..... + 0x00, 0xb6, 0x4b, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, 0x00, 0x4a, 0x56, 0x00, // ..K..........JV. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x4b, 0x53, 0x00, 0x00, 0xa6, 0x33, 0x00, // .........KS...3. + 0x00, 0xfe, 0x00, 0x02, 0x00, 0x4a, 0x56, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // .....JV..8...6.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x01, 0x00, // .....e.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.............. + 0x00, 0x3a, 0x4e, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0xff, 0x49, 0x00, // .:N..;........I. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x36, 0x43, 0x00, // .....;.......6C. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x20, 0x26, 0x00, // .....;....... &. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x46, 0x26, 0x00, // .....;.......F&. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x42, 0x26, 0x00, // .....;.......B&. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x52, 0x23, 0x00, // .....=.......R#. + 0x00, 0xa4, 0x11, 0x00, 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x64, 0x40, 0x00, // .....O.......d@. + 0x00, 0x52, 0x23, 0x00, 0x00, 0x52, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .R#..R#......... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xff, 0x49, 0x00, 0x00, 0x64, 0x40, 0x00, // .....>....I..d@. + 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x21, 0x00, 0x00, 0x91, 0x0e, 0x00, // .9.......`!..... + 0x00, 0xff, 0x49, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xce, 0x5d, 0x00, // ..I..A........]. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc8, 0x47, 0x00, 0x00, 0xce, 0x5d, 0x00, 0x00, 0x50, 0x00, 0x06, // ......G...]..P.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x5d, 0x1a, 0x00, 0x00, 0xc8, 0x47, 0x00, 0x00, 0xc8, 0x47, 0x00, // .....]....G...G. + 0x00, 0xc8, 0x47, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x36, 0x43, 0x00, 0x00, 0x60, 0x21, 0x00, // ..G..>...6C..`!. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x81, 0x23, 0x00, 0x00, 0xa4, 0x11, 0x00, // .=........#..... + 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0x9a, 0x3d, 0x00, 0x00, 0x81, 0x23, 0x00, // .O........=...#. + 0x00, 0x81, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // ..#............. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x20, 0x26, 0x00, 0x00, 0x9a, 0x3d, 0x00, 0x00, 0x3e, 0x00, 0x03, // .>... &...=..>.. + 0x00, 0x46, 0x26, 0x00, 0x00, 0x5d, 0x1a, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x18, 0x00, 0x00, // .F&..]...9...... + 0x00, 0x6b, 0x17, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x36, 0x43, 0x00, 0x00, 0x20, 0x26, 0x00, // .k...0...6C.. &. + 0x00, 0x46, 0x26, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xdc, 0x58, 0x00, // .F&..A........X. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x13, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2c, 0x34, 0x00, 0x00, 0xdc, 0x58, 0x00, 0x00, 0x0c, 0x00, 0x07, // .....,4...X..... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x45, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, // .....E>......... + 0x00, 0x19, 0x00, 0x00, 0x00, 0x2c, 0x34, 0x00, 0x00, 0x8e, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, // .....,4......... + 0x00, 0xaf, 0x2e, 0x00, 0x00, 0x6b, 0x17, 0x00, 0x00, 0x45, 0x3e, 0x00, 0x00, 0x3e, 0x00, 0x03, // .....k...E>..>.. + 0x00, 0x42, 0x26, 0x00, 0x00, 0xaf, 0x2e, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x18, 0x00, 0x00, // .B&......9...... + 0x00, 0xe7, 0x43, 0x00, 0x00, 0x74, 0x13, 0x00, 0x00, 0x42, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, // ..C..t...B&..A.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xe1, 0x5d, 0x00, 0x00, 0xa4, 0x11, 0x00, 0x00, 0x13, 0x0a, 0x00, // ......]......... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x84, 0x48, 0x00, 0x00, 0xe1, 0x5d, 0x00, // .=........H...]. + 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0xe7, 0x43, 0x00, // .Q........9...C. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x79, 0x49, 0x00, // .....Q.......yI. + 0x00, 0xe7, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ..C......Q...... + 0x00, 0x21, 0x19, 0x00, 0x00, 0xe7, 0x43, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, // .!....C......P.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xe8, 0x5a, 0x00, 0x00, 0x80, 0x39, 0x00, 0x00, 0x79, 0x49, 0x00, // ......Z...9..yI. + 0x00, 0x21, 0x19, 0x00, 0x00, 0x84, 0x48, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0xe8, 0x5a, 0x00, // .!....H.......Z. + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xcc, 0x0d, 0x00, // .8...6.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // .....}...7...... + 0x00, 0x81, 0x59, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0xcf, 0x58, 0x00, // ..Y..7........X. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x65, 0x52, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.......eR..... + 0x00, 0x99, 0x5b, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x3d, 0x4c, 0x00, // ..[..;.......=L. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x21, 0x00, 0x00, 0x00, 0x74, 0x45, 0x00, // .....;...!...tE. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x5e, 0x28, 0x00, // .....;.......^(. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x97, 0x28, 0x00, // .....;........(. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x31, 0x26, 0x00, // .....;.......1&. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3d, 0x4c, 0x00, 0x00, 0x0c, 0x0a, 0x00, // .....>...=L..... + 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, // .9...........5.. + 0x00, 0x3d, 0x4c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x67, 0x09, 0x00, 0x00, 0xfc, 0x48, 0x00, // .=L..=...g....H. + 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x74, 0x45, 0x00, 0x00, 0xfc, 0x48, 0x00, // .C...>...tE...H. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x6f, 0x1b, 0x00, 0x00, 0xcf, 0x58, 0x00, // .=.......o....X. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5e, 0x28, 0x00, 0x00, 0x6f, 0x1b, 0x00, 0x00, 0x41, 0x00, 0x06, // .>...^(..o...A.. + 0x00, 0x8b, 0x02, 0x00, 0x00, 0xdd, 0x30, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, // ......0..B.../.. + 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf5, 0x58, 0x00, // .....=........X. + 0x00, 0xdd, 0x30, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x97, 0x28, 0x00, 0x00, 0xf5, 0x58, 0x00, // ..0..>....(...X. + 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0xf4, 0x10, 0x00, // .9.............. + 0x00, 0x74, 0x45, 0x00, 0x00, 0x5e, 0x28, 0x00, 0x00, 0x97, 0x28, 0x00, 0x00, 0x3d, 0x00, 0x04, // .tE..^(...(..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x14, 0x19, 0x00, 0x00, 0x81, 0x59, 0x00, 0x00, 0x85, 0x00, 0x05, // ..........Y..... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x5e, 0x00, 0x00, 0x18, 0x0e, 0x00, 0x00, 0x14, 0x19, 0x00, // ......^......... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x31, 0x26, 0x00, 0x00, 0xce, 0x5e, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...1&...^..9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xae, 0x46, 0x00, 0x00, 0x65, 0x0c, 0x00, 0x00, 0x31, 0x26, 0x00, // ......F..e...1&. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x65, 0x52, 0x00, 0x00, 0xae, 0x46, 0x00, 0x00, 0xfd, 0x00, 0x01, // .>...eR...F..... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .8.... +}; +static const uint8_t fs_texture_cube2_dx9[619] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, // Color0......u_pa + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x03, // rams......<..... + 0xff, 0xff, 0xfe, 0xff, 0x2f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x83, 0x00, // ..../.CTAB...... + 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ + 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ..|...D......... + 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, // ..P.......`..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, // ......l.......s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, // texColor........ + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // ..........u_para + 0x6d, 0x73, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, // ms.............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......ps_3_0.Mic + 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler + 0x36, 0x2e, 0x33, 0x2e, 0x39, 0x36, 0x30, 0x30, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // 6.3.9600.16384.. + 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x0c, 0x40, 0x2f, 0xba, // ..Q..........@/. + 0xe8, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // .>.............. + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x07, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x01, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ......_......... + 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x80, 0x01, 0x00, // ................ + 0x00, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, 0x01, 0x00, 0x55, 0x8b, 0x0f, 0x00, // ............U... + 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xaa, 0x8b, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, // ................ + 0x08, 0x80, 0x01, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x07, 0x80, 0x02, 0x00, // ................ + 0xe4, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x80, 0x01, 0x00, // ................ + 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, 0x01, 0x00, 0x55, 0x80, 0x0e, 0x00, // ............U... + 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ + 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x02, 0x00, 0xe4, 0x81, 0x04, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ + 0xe4, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0xa0, 0x05, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x0f, 0x00, // ................ + 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ + 0x02, 0x80, 0x00, 0x00, 0x55, 0x8b, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x04, 0x80, 0x00, 0x00, // ....U........... + 0xaa, 0x8b, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, // ................ + 0x55, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, // U............... + 0x00, 0x02, 0x00, 0x08, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, // ........U....... + 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ........... +}; +static const uint8_t fs_texture_cube2_dx11[766] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x44, 0x58, // olor0.........DX + 0x42, 0x43, 0x32, 0x0d, 0xe1, 0x0b, 0xad, 0x35, 0x1f, 0xb7, 0x80, 0x3e, 0xa3, 0x13, 0x8a, 0x22, // BC2....5...>..." + 0xfa, 0x7a, 0x01, 0x00, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // .z............,. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, // ..........ISGNl. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........P..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........b..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x07, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO + 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, // LOR.TEXCOORD..OS + 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET. + 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xf0, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x7c, 0x00, // ..SHDR....@...|. + 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..Y...F. ....... + 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, // ..Z....`......X0 + 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, // ...p......UU..b. + 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x72, 0x10, // ..........b...r. + 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......e.... .... + 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x0c, 0xf2, 0x00, // ..h.......H..... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x7e, // ......F.......F~ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, // .......`........ + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0xf2, 0x00, // .........8..... + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, // ......F.......F. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x06, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, // ....../...r..... + 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, // ..F...........6. + 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, // ... ......:..... + 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, // ..8...r.......F. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0xcd, 0xcc, 0x0c, 0x40, 0xcd, 0xcc, // .......@.....@.. + 0x0c, 0x40, 0xcd, 0xcc, 0x0c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x05, 0x72, 0x00, // .@...@........r. + 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, // ......F.......2. + 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // ..r.......F..... + 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x80, 0x41, 0x00, // ..F.......F...A. + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2...r..... + 0x00, 0x00, 0xa6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // .... .........F. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x19, 0x00, // ......F......... + 0x00, 0x06, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, // ..........:. ... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8...r..... + 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, // ..........F..... + 0x00, 0x00, 0x2f, 0x00, 0x00, 0x06, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // ../...r.......F. + 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0a, 0x72, 0x00, // ..........8...r. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, // ......F........@ + 0x00, 0x00, 0x2f, 0xba, 0xe8, 0x3e, 0x2f, 0xba, 0xe8, 0x3e, 0x2f, 0xba, 0xe8, 0x3e, 0x00, 0x00, // ../..>/..>/..>.. + 0x00, 0x00, 0x19, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, // ......r ......F. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // ......>....... +}; +static const uint8_t fs_texture_cube2_mtl[948] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x96, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, // ams..........usi + 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, // ng namespace met + 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // al;.struct xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, // tlShaderInput {. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // float4 v_color + 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, // 0;. float3 v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // xcoord0;.};.stru + 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // Output {. float + 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, // 4 gl_FragColor;. + 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // };.struct xlatMt + 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, // lShaderUniform { + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // . float4 u_para + 0x6d, 0x73, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, // ms;.};.fragment + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut + 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain + 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, // (xlatMtlShaderIn + 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // put _mtl_i [[sta + 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, // t xlatMtlShaderU + 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, // niform& _mtl_u [ + 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x0a, 0x20, 0x20, 0x2c, // [buffer(0)]]. , + 0x20, 0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x63, 0x75, 0x62, 0x65, 0x3c, 0x66, // texturecube s_texColor + 0x20, 0x5b, 0x5b, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, // [[texture(0)]], + 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, // sampler _mtlsmp + 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, // _s_texColor [[sa + 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, // mpler(0)]]).{. + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut + 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // put _mtl_o;. fl + 0x6f, 0x61, 0x74, 0x34, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, // oat4 _color_1 = + 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, // 0;. _color_1 = + 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, // (s_texColor.samp + 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, // le(_mtlsmp_s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x29, 0x28, // Color, (float3)( + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // _mtl_i.v_texcoor + 0x64, 0x30, 0x29, 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // d0), level(_mtl_ + 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x29, 0x20, 0x2a, // u.u_params.x)) * + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // _mtl_i.v_color0 + 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, // );. float4 tmpv + 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // ar_2 = 0;. tmpv + 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x70, 0x6f, 0x77, 0x20, 0x28, // ar_2.xyz = pow ( + 0x61, 0x62, 0x73, 0x28, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, 0x78, 0x20, 0x28, 0x70, // abs((. mix (p + 0x6f, 0x77, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, // ow (abs(_color_1 + 0x2e, 0x78, 0x79, 0x7a, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, 0x32, 0x2e, // .xyz), float3(2. + 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x2c, 0x20, 0x32, 0x2e, 0x32, 0x29, 0x29, 0x2c, 0x20, 0x5f, // 2, 2.2, 2.2)), _ + 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x2c, 0x20, 0x5f, 0x6d, 0x74, // color_1.xyz, _mt + 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x7a, 0x29, 0x0a, // l_u.u_params.z). + 0x20, 0x20, 0x20, 0x2a, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, 0x70, 0x32, 0x28, 0x5f, // * . exp2(_ + 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x77, // mtl_u.u_params.w + 0x29, 0x0a, 0x20, 0x20, 0x29, 0x29, 0x2c, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x28, 0x30, // ). )), float3(0 + 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, // .4545454, 0.4545 + 0x34, 0x35, 0x34, 0x2c, 0x20, 0x30, 0x2e, 0x34, 0x35, 0x34, 0x35, 0x34, 0x35, 0x34, 0x29, 0x29, // 454, 0.4545454)) + 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x20, 0x3d, // ;. tmpvar_2.w = + 0x20, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // _color_1.w;. _ + 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, // mtl_o.gl_FragCol + 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, // or = tmpvar_2;. + 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // return _mtl_o;. + 0x7d, 0x0a, 0x0a, 0x00, // }... +}; +extern const uint8_t* fs_texture_cube2_pssl; +extern const uint32_t fs_texture_cube2_pssl_size; diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_cube2.sc b/3rdparty/bgfx/tools/texturev/fs_texture_cube2.sc new file mode 100644 index 0000000..df1521f --- /dev/null +++ b/3rdparty/bgfx/tools/texturev/fs_texture_cube2.sc @@ -0,0 +1,16 @@ +$input v_texcoord0, v_color0 + +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "common.sh" + +SAMPLERCUBE(s_texColor, 0); + +void main() +{ + vec4 color = textureCubeLod(s_texColor, v_texcoord0, u_textureLod); + gl_FragColor = toEv(color * v_color0); +} diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_msdf.bin.h b/3rdparty/bgfx/tools/texturev/fs_texture_msdf.bin.h new file mode 100644 index 0000000..d138b2a --- /dev/null +++ b/3rdparty/bgfx/tools/texturev/fs_texture_msdf.bin.h @@ -0,0 +1,491 @@ +static const uint8_t fs_texture_msdf_glsl[598] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x27, 0x02, 0x00, 0x00, 0x76, 0x61, // olor......'...va + 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, // rying highp vec3 + 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, // v_texcoord0;.un + 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // iform highp vec4 + 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, // u_params;.unifo + 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, // rm sampler2D s_t + 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, // exColor;.void ma + 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, // in ().{. lowp v + 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, // ec3 tmpvar_1;. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, // tmpvar_1 = textu + 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, // re2DLod (s_te + 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // xColor, v_texcoo + 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, // rd0.xy, u_params + 0x2e, 0x78, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, // .x).xyz;. lowp + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, // float tmpvar_2;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x6d, 0x61, // tmpvar_2 = (ma + 0x78, 0x20, 0x28, 0x6d, 0x69, 0x6e, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // x (min (tmpvar_1 + 0x2e, 0x78, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x79, 0x29, 0x2c, // .x, tmpvar_1.y), + 0x20, 0x6d, 0x69, 0x6e, 0x20, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x78, 0x20, 0x28, // min (. max ( + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpvar_1.x, tmpv + 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, // ar_1.y). , tmpv + 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x29, 0x29, 0x20, 0x2d, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x3b, // ar_1.z)) - 0.5); + 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, // . lowp float tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // pvar_3;. tmpvar + 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x20, 0x28, 0x28, 0x28, 0x74, 0x6d, // _3 = clamp (((tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x2f, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x61, // pvar_2 / . (a + 0x62, 0x73, 0x28, 0x64, 0x46, 0x64, 0x78, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, // bs(dFdx(tmpvar_2 + 0x29, 0x29, 0x20, 0x2b, 0x20, 0x61, 0x62, 0x73, 0x28, 0x64, 0x46, 0x64, 0x79, 0x28, 0x74, 0x6d, // )) + abs(dFdy(tm + 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x20, 0x2b, 0x20, // pvar_2))). ) + + 0x30, 0x2e, 0x35, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, // 0.5), 0.0, 1.0); + 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, // . mediump vec4 + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpvar_4;. tmpv + 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x74, 0x6d, 0x70, 0x76, // ar_4 = vec4(tmpv + 0x61, 0x72, 0x5f, 0x33, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // ar_3);. gl_Frag + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, // Color = tmpvar_4 + 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // ;.}... +}; +static const uint8_t fs_texture_msdf_spv[4894] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x13, 0x00, 0x00, 0x03, 0x02, 0x23, // ams............# + 0x07, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0xdf, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........a..... + 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... + 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, // .w...t.......... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, // n........a...Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, // xSampler2D...... + 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, // .a.......m_sampl + 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, // er.......a...... + 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x10, // .m_texture...... + 0x00, 0xce, 0x14, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // .....bgfxTexture + 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, // 2DLod(struct-Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, // xSampler2D-p1-t2 + 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // 11;vf2;f1;...... + 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, // .'..._sampler... + 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, // ........._coord. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, // ........._level. + 0x00, 0x05, 0x00, 0x07, 0x00, 0xd2, 0x0c, 0x00, 0x00, 0x6d, 0x69, 0x78, 0x28, 0x76, 0x66, 0x34, // .........mix(vf4 + 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, // ;vf4;vf4;....... + 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, // ....._a......... + 0x00, 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x5f, 0x74, 0x00, // ._b.........._t. + 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, // .....5...vec4_sp + 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, // lat(f1;......... + 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xee, 0x0b, 0x00, 0x00, 0x6d, 0x65, 0x64, // ._x..........med + 0x69, 0x61, 0x6e, 0x28, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd0, 0x0f, 0x00, // ian(vf3;........ + 0x00, 0x5f, 0x76, 0x61, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcc, 0x0d, 0x00, // ._val........... + 0x00, 0x40, 0x6d, 0x61, 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, // .@main(vf4;vf3;v + 0x66, 0x34, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x7b, 0x4b, 0x00, 0x00, 0x76, 0x5f, 0x63, // f4;......{K..v_c + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb6, 0x27, 0x00, // olor0.........'. + 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, // .v_texcoord0.... + 0x00, 0x08, 0x4f, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // ..O..gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, // _0_......C...s_t + 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, // exColor......... + 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, // .s_texColorSampl + 0x65, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, // er...........s_t + 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, // exColorTexture.. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, // .........bgfx_Vo + 0x69, 0x64, 0x46, 0x72, 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xe0, 0x48, 0x00, // idFrag........H. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x7a, 0x0b, 0x00, // .param.......z.. + 0x00, 0x62, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x05, 0x00, // .bgColor........ + 0x00, 0x66, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0xb0, 0x16, 0x00, // .fgColor........ + 0x00, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, // .sample......T.. + 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x54, 0x00, 0x00, // .$Global.....T.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, // .....u_viewRect. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .....T.......u_v + 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, // iewTexel.....T.. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, // .....u_view..... + 0x00, 0x54, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, // .T.......u_invVi + 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // ew.......T...... + 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x54, 0x00, 0x00, // .u_proj......T.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // .....u_invProj.. + 0x00, 0x06, 0x00, 0x06, 0x00, 0x54, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, // .....T.......u_v + 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x54, 0x00, 0x00, // iewProj......T.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, // .....u_invViewPr + 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // oj.......T...... + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0x54, 0x00, 0x00, // .u_model.....T.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView + 0x00, 0x06, 0x00, 0x07, 0x00, 0x54, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .....T.......u_m + 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, // odelViewProj.... + 0x00, 0x54, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, // .T.......u_alpha + 0x52, 0x65, 0x66, 0x34, 0x00, 0x06, 0x00, 0x06, 0x00, 0x54, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, // Ref4.....T...... + 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, // .u_params....... + 0x00, 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x50, 0x5b, 0x00, // .B...........P[. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x01, 0x25, 0x00, // .param........%. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x02, 0x25, 0x00, // .param........%. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xbd, 0x0e, 0x00, // .param.......... + 0x00, 0x73, 0x69, 0x67, 0x44, 0x69, 0x73, 0x74, 0x00, 0x05, 0x00, 0x04, 0x00, 0x03, 0x25, 0x00, // .sigDist......%. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x69, 0x0e, 0x00, // .param.......i.. + 0x00, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x25, 0x00, // .opacity......%. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x3a, 0x25, 0x00, // .param.......:%. + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0xd4, 0x22, 0x00, // .param........". + 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, // .param........A. + 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .v_color0....... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, // .w...v_color0... + 0x00, 0x05, 0x00, 0x05, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ......<..v_texco + 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, // ord0.....t...v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, // excoord0........ + 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, // .gl_FragData_0_. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......G..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // ......U..param.. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, // .........param.. + 0x00, 0x05, 0x00, 0x06, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // .........gl_Frag + 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, // Data_0_..G...... + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, // .".......G...... + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, // .!.......G...... + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, // .".......G...... + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xc1, 0x07, 0x00, // .!.......G...... + 0x00, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, // .....@...H...T.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .T.......#...... + 0x00, 0x48, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...T.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...T.......#.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // . ...H...T...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, // .........H...T.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, // .........H...T.. + 0x00, 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0x54, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .T.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...T.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...T.......#.. + 0x00, 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .....H...T...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, // .........H...T.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, // .........H...T.. + 0x00, 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x54, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .T.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...T.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...T.......#.. + 0x00, 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, // . ...H...T...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, // .........H...T.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, // .........H...T.. + 0x00, 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#...`...H.. + 0x00, 0x54, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .T.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...T.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...T.......#.. + 0x00, 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .....H...T...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, // .........H...T.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, // .........H...T.. + 0x00, 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#.......H.. + 0x00, 0x54, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .T.............. + 0x00, 0x48, 0x00, 0x04, 0x00, 0x54, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .H...T.......... + 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, // .H...T.......#.. + 0x00, 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, // .....H...T...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x54, 0x00, 0x00, // .........H...T.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, // .....#... ...H.. + 0x00, 0x54, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, // .T.......#...0.. + 0x00, 0x47, 0x00, 0x03, 0x00, 0x54, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .G...T.......G.. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .B...".......G.. + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .w...........G.. + 0x00, 0x74, 0x14, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, // .t...........G.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, // ................ + 0x00, 0x08, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, // .....!.......... + 0x00, 0x1a, 0x00, 0x02, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x20, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // . .............. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, // .............a.. + 0x00, 0xfc, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, // .....a.......... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x89, 0x04, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, // ................ + 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // . .............. + 0x00, 0x21, 0x00, 0x06, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, // .!.............. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, // .........!...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // ................ + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, // ......... ...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xf0, 0x00, 0x00, // .........!...... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x7d, 0x00, 0x00, // .........!...}.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x20, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, // . ...........a.. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, 0x00, // .;.......C...... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, // . ...y.......... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, // .;...y.......... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, // . .............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, // .;.............. + 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ......... ...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x14, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, // . .............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // .+.............. + 0x00, 0x20, 0x00, 0x04, 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, // . ...z.......... + 0x00, 0x1b, 0x00, 0x03, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // ................ + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, // .............,.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, // .....z.......... + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // ........?,...... + 0x00, 0x04, 0x05, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, // ................ + 0x00, 0x8a, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .........e...... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .....+.......j.. + 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xc1, 0x07, 0x00, 0x00, 0x65, 0x00, 0x00, // . ...........e.. + 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, 0x54, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .j.......T...... + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .....e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0xc1, 0x07, 0x00, // .e...e...e...... + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .e...e.......... + 0x00, 0x20, 0x00, 0x04, 0x00, 0xd1, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, // . ...........T.. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0xd1, 0x02, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, // .;.......B...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, // .+......./...... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // . .............. + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .+.............. + 0x3f, 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // ? .............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, // .;.......w...... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, // . .............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, // .;.......t...... + 0x00, 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // . .............. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, // .;.............. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, // .........Sa..;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // ......G......;.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // ......U......;.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, // .............=.. + 0x00, 0xfc, 0x01, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....!C......=.. + 0x00, 0x96, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, // ......3......P.. + 0x00, 0x61, 0x09, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, // .a.... ..!C...3. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>...C.... ..=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......A..w...=.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, // ......<..t...>.. + 0x00, 0xc9, 0x47, 0x00, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, // ..G...A..>....U. + 0x00, 0x03, 0x3c, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, // ..<..9........&. + 0x00, 0xcc, 0x0d, 0x00, 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, // ......G...U..... + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, // .=.............. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, // .>.............. + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x14, 0x00, // .8...6.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x04, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x1b, 0x00, 0x00, // .........7...... + 0x00, 0x27, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, // .'...7.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.............. + 0x00, 0x24, 0x54, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x14, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, // .$T..A.......... + 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, // .'.......=...... + 0x00, 0x6d, 0x29, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, // .m)......A...z.. + 0x00, 0xe4, 0x55, 0x00, 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // ..U..'.......=.. + 0x00, 0xfc, 0x01, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, // ......N...U..V.. + 0x00, 0xfe, 0x01, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, // .....29..m)...N. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, // .=.............. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, // .=.......=>..... + 0x00, 0x58, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, // .X...........29. + 0x00, 0xcd, 0x19, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, // .........=>..... + 0x00, 0x11, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // .....8...6...... + 0x00, 0xd2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, // .............7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // .........7...... + 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xd9, 0x0e, 0x00, // .....7.......... + 0x00, 0xf8, 0x00, 0x02, 0x00, 0xde, 0x61, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ......a..=...... + 0x00, 0xff, 0x5c, 0x00, 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // .........=...... + 0x00, 0xcf, 0x50, 0x00, 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // ..P......=...... + 0x00, 0x9d, 0x36, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x1d, 0x00, 0x00, // ..6............. + 0x00, 0x43, 0x21, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0xff, 0x5c, 0x00, // .C!............. + 0x00, 0xcf, 0x50, 0x00, 0x00, 0x9d, 0x36, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x43, 0x21, 0x00, // ..P...6......C!. + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, // .8...6.......5.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, // .........7...... + 0x00, 0xdd, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x19, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, // ..........N..=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x67, 0x1c, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....g.......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xf2, 0x44, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // ......D......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x92, 0x2f, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, // ....../......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xa5, 0x2f, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, // ....../......P.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x41, 0x4a, 0x00, 0x00, 0x67, 0x1c, 0x00, 0x00, 0xf2, 0x44, 0x00, // .....AJ..g....D. + 0x00, 0x92, 0x2f, 0x00, 0x00, 0xa5, 0x2f, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x41, 0x4a, 0x00, // ../.../......AJ. + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xee, 0x0b, 0x00, // .8...6.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, // .........7...... + 0x00, 0xd0, 0x0f, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x39, 0x19, 0x00, 0x00, 0x41, 0x00, 0x05, // .........9...A.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0xb2, 0x1a, 0x00, 0x00, 0xd0, 0x0f, 0x00, 0x00, 0x0a, 0x0a, 0x00, // ................ + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x5f, 0x27, 0x00, 0x00, 0xb2, 0x1a, 0x00, // .=......._'..... + 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x44, 0x35, 0x00, 0x00, 0xd0, 0x0f, 0x00, // .A.......D5..... + 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xc0, 0x52, 0x00, // .....=........R. + 0x00, 0x44, 0x35, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x62, 0x60, 0x00, // .D5..........b`. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x5f, 0x27, 0x00, 0x00, 0xc0, 0x52, 0x00, // .....%..._'...R. + 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x3e, 0x00, 0x00, 0xd0, 0x0f, 0x00, // .A........>..... + 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xb2, 0x43, 0x00, // .....=........C. + 0x00, 0x07, 0x3e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x47, 0x35, 0x00, // ..>..A.......G5. + 0x00, 0xd0, 0x0f, 0x00, 0x00, 0x0d, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........=...... + 0x00, 0x0a, 0x3f, 0x00, 0x00, 0x47, 0x35, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, // ..?..G5......... + 0x00, 0x32, 0x4a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0xb2, 0x43, 0x00, // .2J......(....C. + 0x00, 0x0a, 0x3f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xc8, 0x1f, 0x00, // ..?..A.......... + 0x00, 0xd0, 0x0f, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........=...... + 0x00, 0x7e, 0x48, 0x00, 0x00, 0xc8, 0x1f, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, // .~H............. + 0x00, 0x5e, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x32, 0x4a, 0x00, // .^R......%...2J. + 0x00, 0x7e, 0x48, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfd, 0x38, 0x00, // .~H...........8. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x62, 0x60, 0x00, 0x00, 0x5e, 0x52, 0x00, // .....(...b`..^R. + 0x00, 0xfe, 0x00, 0x02, 0x00, 0xfd, 0x38, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, // ......8..8...6.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, // .............}.. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x7b, 0x4b, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......{K..7.. + 0x00, 0x95, 0x02, 0x00, 0x00, 0xb6, 0x27, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // ......'..7...... + 0x00, 0x08, 0x4f, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x3c, 0x58, 0x00, 0x00, 0x3b, 0x00, 0x04, // ..O........ + 0x00, 0xe0, 0x48, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, // ..H......9...... + 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0xe0, 0x48, 0x00, 0x00, 0x3d, 0x00, 0x04, // .....5....H..=.. + 0x00, 0x61, 0x09, 0x00, 0x00, 0x9f, 0x45, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x3e, 0x00, 0x03, // .a....E..C...>.. + 0x00, 0x50, 0x5b, 0x00, 0x00, 0x9f, 0x45, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // .P[...E..=...... + 0x00, 0x95, 0x25, 0x00, 0x00, 0xb6, 0x27, 0x00, 0x00, 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, // ..%...'..O...... + 0x00, 0xb4, 0x3c, 0x00, 0x00, 0x95, 0x25, 0x00, 0x00, 0x95, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, // ..<...%...%..... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x01, 0x25, 0x00, 0x00, 0xb4, 0x3c, 0x00, // .....>....%...<. + 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0xfc, 0x4c, 0x00, 0x00, 0x42, 0x13, 0x00, // .A........L..B.. + 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ./.......=...... + 0x00, 0x98, 0x55, 0x00, 0x00, 0xfc, 0x4c, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x02, 0x25, 0x00, // ..U...L..>....%. + 0x00, 0x98, 0x55, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1a, 0x5b, 0x00, // ..U..9........[. + 0x00, 0xce, 0x14, 0x00, 0x00, 0x50, 0x5b, 0x00, 0x00, 0x01, 0x25, 0x00, 0x00, 0x02, 0x25, 0x00, // .....P[...%...%. + 0x00, 0x4f, 0x00, 0x08, 0x00, 0x18, 0x00, 0x00, 0x00, 0xb0, 0x16, 0x00, 0x00, 0x1a, 0x5b, 0x00, // .O............[. + 0x00, 0x1a, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, // ..[............. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x03, 0x25, 0x00, 0x00, 0xb0, 0x16, 0x00, 0x00, 0x39, 0x00, 0x05, // .>....%......9.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x22, 0x49, 0x00, 0x00, 0xee, 0x0b, 0x00, 0x00, 0x03, 0x25, 0x00, // ....."I.......%. + 0x00, 0x83, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xbd, 0x0e, 0x00, 0x00, 0x22, 0x49, 0x00, // ............."I. + 0x00, 0xfc, 0x00, 0x00, 0x00, 0xd1, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2e, 0x30, 0x00, // ..............0. + 0x00, 0xbd, 0x0e, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x32, 0x46, 0x00, // .............2F. + 0x00, 0xbd, 0x0e, 0x00, 0x00, 0x2e, 0x30, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ......0......... + 0x00, 0xdb, 0x43, 0x00, 0x00, 0x32, 0x46, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x08, // ..C..2F......... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x69, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, // .....i.......+.. + 0x00, 0xdb, 0x43, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, // ..C..........P.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x8a, 0x59, 0x00, 0x00, 0x69, 0x0e, 0x00, 0x00, 0x69, 0x0e, 0x00, // ......Y..i...i.. + 0x00, 0x69, 0x0e, 0x00, 0x00, 0x69, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x04, 0x25, 0x00, // .i...i...>....%. + 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x3a, 0x25, 0x00, 0x00, 0x04, 0x05, 0x00, // .z...>...:%..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0xd4, 0x22, 0x00, 0x00, 0x8a, 0x59, 0x00, 0x00, 0x39, 0x00, 0x07, // .>...."...Y..9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcf, 0x20, 0x00, 0x00, 0xd2, 0x0c, 0x00, 0x00, 0x04, 0x25, 0x00, // ...... .......%. + 0x00, 0x3a, 0x25, 0x00, 0x00, 0xd4, 0x22, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x4f, 0x00, // .:%..."..>....O. + 0x00, 0xcf, 0x20, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // .. ......8.... +}; +static const uint8_t fs_texture_msdf_dx9[507] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, // Color0......u_pa + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0xcc, 0x01, 0x00, 0x00, 0x00, 0x03, // rams............ + 0xff, 0xff, 0xfe, 0xff, 0x2f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x83, 0x00, // ..../.CTAB...... + 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ + 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ..|...D......... + 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, // ..P.......`..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, // ......l.......s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, // texColor........ + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // ..........u_para + 0x6d, 0x73, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, // ms.............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......ps_3_0.Mic + 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler + 0x36, 0x2e, 0x33, 0x2e, 0x39, 0x36, 0x30, 0x30, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // 6.3.9600.16384.. + 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, // ..Q..........?.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // .........?...... + 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, // ................ + 0x0f, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x00, 0x00, // ................ + 0xc4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, // .............._. + 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x02, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, // ........U.....X. + 0x00, 0x04, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xe1, 0x80, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x0a, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, // ................ + 0x55, 0x80, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // U............... + 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0xaa, 0xa0, 0x5b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x5c, 0x00, // ..[............. + 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x02, 0x80, 0x00, 0x00, 0xaa, 0x8b, 0x00, 0x00, 0x55, 0x8b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, // ........U....... + 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, // ....U........... + 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, 0xff, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, // ....U........... + 0x1f, 0x80, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ........... +}; +static const uint8_t fs_texture_msdf_dx11[670] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x6c, 0x02, 0x00, 0x00, 0x44, 0x58, // olor0.....l...DX + 0x42, 0x43, 0xde, 0xd6, 0xcf, 0x5a, 0x51, 0xb1, 0xc9, 0x93, 0x7e, 0x1e, 0x77, 0x4e, 0x30, 0x56, // BC...ZQ...~.wN0V + 0xcd, 0x6a, 0x01, 0x00, 0x00, 0x00, 0x6c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // .j....l.......,. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, // ..........ISGNl. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........P..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........b..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x03, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO + 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, // LOR.TEXCOORD..OS + 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET. + 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x90, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x64, 0x00, // ..SHDR....@...d. + 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..Y...F. ....... + 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, // ..Z....`......X. + 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, // ...p......UU..b. + 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, // ..2.......e.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, // ......h.......H. + 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, // ..........F..... + 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, // ..F~.......`.... + 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, // .... .........4. + 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x07, 0x52, 0x00, // ..........3...R. + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x06, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x03, // ......V......... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, // ......4......... + 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, // ..*............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, // ................ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x0b, 0x00, // .......@........ + 0x00, 0x05, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, // .."............. + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x05, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, // ......B......... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, // .........."..... + 0x00, 0x00, 0x2a, 0x00, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, // ..*............. + 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x07, 0x12, 0x00, // ................ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, // ................ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ...........@.... + 0x00, 0x3f, 0x36, 0x20, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, // .?6 ... ........ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // ......>....... +}; +static const uint8_t fs_texture_msdf_mtl[890] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x5c, 0x03, 0x00, 0x00, 0x75, 0x73, 0x69, // ams..........usi + 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, // ng namespace met + 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // al;.struct xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, // tlShaderInput {. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // float3 v_texco + 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, // ord0;.};.struct + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut + 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // put {. float4 g + 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, // l_FragColor;.};. + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // struct xlatMtlSh + 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, // aderUniform {. + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, // float4 u_params; + 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, // .};.fragment xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, // xlatMtlMain (xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, // atMtlShaderInput + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, // _mtl_i [[stage_ + 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, // in]], constant x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, // latMtlShaderUnif + 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, // orm& _mtl_u [[bu + 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x0a, 0x20, 0x20, 0x2c, 0x20, 0x20, 0x20, // ffer(0)]]. , + 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, // texture2d + 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x74, 0x65, // s_texColor [[te + 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, // xture(0)]], samp + 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, // ler _mtlsmp_s_te + 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // xColor [[sampler + 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // (0)]]).{. xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, // tlShaderOutput _ + 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, // mtl_o;. float3 + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, // tmpvar_1 = 0;. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, // tmpvar_1 = s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, // Color.sample(_mt + 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, // lsmp_s_texColor, + 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x29, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // (float2)(_mtl_i + 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x29, // .v_texcoord0.xy) + 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, // , level(_mtl_u.u + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x29, 0x2e, 0x78, 0x79, 0x7a, 0x3b, // _params.x)).xyz; + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // . float tmpvar_ + 0x32, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // 2 = 0;. tmpvar_ + 0x32, 0x20, 0x3d, 0x20, 0x28, 0x6d, 0x61, 0x78, 0x20, 0x28, 0x6d, 0x69, 0x6e, 0x20, 0x28, 0x74, // 2 = (max (min (t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // mpvar_1.x, tmpva + 0x72, 0x5f, 0x31, 0x2e, 0x79, 0x29, 0x2c, 0x20, 0x6d, 0x69, 0x6e, 0x20, 0x28, 0x0a, 0x20, 0x20, // r_1.y), min (. + 0x20, 0x20, 0x6d, 0x61, 0x78, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, // max (tmpvar_1. + 0x78, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x79, 0x29, 0x0a, 0x20, // x, tmpvar_1.y). + 0x20, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x29, 0x29, 0x20, // , tmpvar_1.z)) + 0x2d, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // - 0.5);. _mtl_o + 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, // .gl_FragColor = + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x20, 0x28, 0x28, 0x28, // float4(clamp ((( + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x2f, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, // tmpvar_2 / . + 0x28, 0x61, 0x62, 0x73, 0x28, 0x64, 0x66, 0x64, 0x78, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // (abs(dfdx(tmpvar + 0x5f, 0x32, 0x29, 0x29, 0x20, 0x2b, 0x20, 0x61, 0x62, 0x73, 0x28, 0x64, 0x66, 0x64, 0x79, 0x28, // _2)) + abs(dfdy( + 0x2d, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x29, // -tmpvar_2))). ) + 0x20, 0x2b, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, // + 0.5), 0.0, 1. + 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, // 0));. return _m + 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tl_o;.}... +}; +extern const uint8_t* fs_texture_msdf_pssl; +extern const uint32_t fs_texture_msdf_pssl_size; diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_msdf.sc b/3rdparty/bgfx/tools/texturev/fs_texture_msdf.sc new file mode 100644 index 0000000..224cca0 --- /dev/null +++ b/3rdparty/bgfx/tools/texturev/fs_texture_msdf.sc @@ -0,0 +1,25 @@ +$input v_texcoord0, v_color0 + +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "common.sh" + +SAMPLER2D(s_texColor, 0); + +float median(vec3 _val) +{ + return max(min(_val.x, _val.y), min(max(_val.x, _val.y), _val.z) ); +} + +void main() { + vec4 bgColor = vec4(0.0, 0.0, 0.0, 0.0); + vec4 fgColor = vec4(1.0, 1.0, 1.0, 1.0); + + vec3 sample = texture2DLod(s_texColor, v_texcoord0.xy, u_textureLod).xyz; + float sigDist = median(sample) - 0.5; + float opacity = clamp(sigDist/fwidth(sigDist) + 0.5, 0.0, 1.0); + gl_FragColor = mix(bgColor, fgColor, opacity); +} diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_sdf.bin.h b/3rdparty/bgfx/tools/texturev/fs_texture_sdf.bin.h new file mode 100644 index 0000000..fb0bd41 --- /dev/null +++ b/3rdparty/bgfx/tools/texturev/fs_texture_sdf.bin.h @@ -0,0 +1,426 @@ +static const uint8_t fs_texture_sdf_glsl[415] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x70, 0x01, 0x00, 0x00, 0x76, 0x61, // olor......p...va + 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, // rying highp vec3 + 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, // v_texcoord0;.un + 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // iform highp vec4 + 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, // u_params;.unifo + 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, // rm sampler2D s_t + 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, // exColor;.void ma + 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, // in ().{. lowp v + 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, // ec4 tmpvar_1;. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, // tmpvar_1 = textu + 0x72, 0x65, 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x20, 0x20, 0x20, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, // re2DLod (s_te + 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // xColor, v_texcoo + 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x2c, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, // rd0.xy, u_params + 0x2e, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, // .x);. lowp vec4 + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_2;. tmp + 0x76, 0x61, 0x72, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x63, 0x6c, 0x61, // var_2 = vec4(cla + 0x6d, 0x70, 0x20, 0x28, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, // mp (((tmpvar_1.x + 0x20, 0x2f, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x64, 0x46, 0x64, // / . (abs(dFd + 0x78, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x29, 0x29, 0x20, 0x2b, // x(tmpvar_1.x)) + + 0x20, 0x61, 0x62, 0x73, 0x28, 0x64, 0x46, 0x64, 0x79, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // abs(dFdy(tmpvar + 0x5f, 0x31, 0x2e, 0x78, 0x29, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, // _1.x))). ) + 0. + 0x35, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x0a, // 5), 0.0, 1.0));. + 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, // gl_FragColor = + 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tmpvar_2;.}... +}; +static const uint8_t fs_texture_sdf_spv[4354] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x10, 0x00, 0x00, 0x03, 0x02, 0x23, // ams............# + 0x07, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0xdf, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........a..... + 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, // .GLSL.std.450... + 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, // .........main... + 0x00, 0x77, 0x0e, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x10, 0x00, 0x03, // .w...t.......... + 0x00, 0x1f, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, // ................ + 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, // .............mai + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x42, 0x67, 0x66, // n........a...Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, // xSampler2D...... + 0x00, 0x61, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, // .a.......m_sampl + 0x65, 0x72, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x61, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, // er.......a...... + 0x00, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x10, // .m_texture...... + 0x00, 0xce, 0x14, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, // .....bgfxTexture + 0x32, 0x44, 0x4c, 0x6f, 0x64, 0x28, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2d, 0x42, 0x67, 0x66, // 2DLod(struct-Bgf + 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x2d, 0x70, 0x31, 0x2d, 0x74, 0x32, // xSampler2D-p1-t2 + 0x31, 0x31, 0x3b, 0x76, 0x66, 0x32, 0x3b, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // 11;vf2;f1;...... + 0x00, 0x27, 0x0e, 0x00, 0x00, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, 0x00, // .'..._sampler... + 0x00, 0x05, 0x00, 0x04, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x5f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x00, // ........._coord. + 0x00, 0x05, 0x00, 0x04, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x00, // ........._level. + 0x00, 0x05, 0x00, 0x07, 0x00, 0xd2, 0x0c, 0x00, 0x00, 0x6d, 0x69, 0x78, 0x28, 0x76, 0x66, 0x34, // .........mix(vf4 + 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, // ;vf4;vf4;....... + 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x5f, 0x61, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xc7, 0x0e, 0x00, // ....._a......... + 0x00, 0x5f, 0x62, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x5f, 0x74, 0x00, // ._b.........._t. + 0x00, 0x05, 0x00, 0x06, 0x00, 0x35, 0x13, 0x00, 0x00, 0x76, 0x65, 0x63, 0x34, 0x5f, 0x73, 0x70, // .....5...vec4_sp + 0x6c, 0x61, 0x74, 0x28, 0x66, 0x31, 0x3b, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0xdd, 0x0e, 0x00, // lat(f1;......... + 0x00, 0x5f, 0x78, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x40, 0x6d, 0x61, // ._x..........@ma + 0x69, 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x34, 0x3b, 0x00, // in(vf4;vf3;vf4;. + 0x00, 0x05, 0x00, 0x05, 0x00, 0x48, 0x32, 0x00, 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // .....H2..v_color + 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x58, 0x38, 0x00, 0x00, 0x76, 0x5f, 0x74, // 0........X8..v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0x21, 0x45, 0x00, // excoord0.....!E. + 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, // .gl_FragData_0_. + 0x00, 0x05, 0x00, 0x05, 0x00, 0x43, 0x12, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .....C...s_texCo + 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x05, 0x00, 0x07, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x73, 0x5f, 0x74, // lor..........s_t + 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x00, // exColorSampler.. + 0x00, 0x05, 0x00, 0x07, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .........s_texCo + 0x6c, 0x6f, 0x72, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, // lorTexture...... + 0x00, 0xa0, 0x11, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x56, 0x6f, 0x69, 0x64, 0x46, 0x72, // .....bgfx_VoidFr + 0x61, 0x67, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x32, 0x58, 0x00, 0x00, 0x70, 0x61, 0x72, // ag.......2X..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x62, 0x67, 0x43, // am.......z...bgC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x05, 0x00, 0x00, 0x66, 0x67, 0x43, // olor.........fgC + 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x05, 0x00, 0x04, 0x00, 0xbd, 0x0e, 0x00, 0x00, 0x73, 0x69, 0x67, // olor.........sig + 0x44, 0x69, 0x73, 0x74, 0x00, 0x05, 0x00, 0x04, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x24, 0x47, 0x6c, // Dist.........$Gl + 0x6f, 0x62, 0x61, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // obal............ + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, // .u_viewRect..... + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, // .........u_viewT + 0x65, 0x78, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, // exel............ + 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xde, 0x0a, 0x00, // .u_view......... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, // .....u_invView.. + 0x00, 0x06, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, // .............u_p + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, // roj............. + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, // .u_invProj...... + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .........u_viewP + 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, // roj............. + 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // .u_invViewProj.. + 0x00, 0x06, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, // .............u_m + 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x06, 0x00, 0x06, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, // odel............ + 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, // .u_modelView.... + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // .........u_model + 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0xde, 0x0a, 0x00, // ViewProj........ + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, // .....u_alphaRef4 + 0x00, 0x06, 0x00, 0x06, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, // .............u_p + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x42, 0x13, 0x00, // arams........B.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x69, 0x51, 0x00, 0x00, 0x70, 0x61, 0x72, // .........iQ..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x53, 0x34, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......S4..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x54, 0x34, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......T4..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x69, 0x0e, 0x00, 0x00, 0x6f, 0x70, 0x61, // am.......i...opa + 0x63, 0x69, 0x74, 0x79, 0x00, 0x05, 0x00, 0x04, 0x00, 0x55, 0x34, 0x00, 0x00, 0x70, 0x61, 0x72, // city.....U4..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x8c, 0x34, 0x00, 0x00, 0x70, 0x61, 0x72, // am........4..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x26, 0x32, 0x00, 0x00, 0x70, 0x61, 0x72, // am.......&2..par + 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xfa, 0x41, 0x00, 0x00, 0x76, 0x5f, 0x63, // am........A..v_c + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x77, 0x0e, 0x00, // olor0........w.. + 0x00, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, // .v_color0....... + 0x00, 0x03, 0x3c, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // ..<..v_texcoord0 + 0x00, 0x05, 0x00, 0x05, 0x00, 0x74, 0x14, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // .....t...v_texco + 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x06, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x67, 0x6c, 0x5f, // ord0.........gl_ + 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x05, 0x00, 0x04, // FragData_0_..... + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..G..param...... + 0x00, 0xab, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, // ..U..param...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, // .....param...... + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // .....gl_FragData + 0x5f, 0x30, 0x5f, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x22, 0x00, 0x00, // _0_..G.......".. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x21, 0x00, 0x00, // .....G.......!.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x22, 0x00, 0x00, // .....G.......".. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x21, 0x00, 0x00, // .....G.......!.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x29, 0x0b, 0x00, 0x00, 0x06, 0x00, 0x00, // .....G...)...... + 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, // .@...H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, // .#.......H...... + 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .....#.......H.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, // .#...`...H...... + 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, // .#.......H...... + 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, // .........#... .. + 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x07, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, // .#...`...H...... + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x09, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, // .#.......H...... + 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, // .............H.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, // .............H.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x09, 0x00, // .........#...... + 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // .H.............. + 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x0b, 0x00, 0x00, // .....H.......... + 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0xde, 0x0a, 0x00, // .#... ...H...... + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, // .....#...0...G.. + 0x00, 0xde, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, // .........G...B.. + 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x77, 0x0e, 0x00, // .".......G...w.. + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x74, 0x14, 0x00, // .........G...t.. + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xd1, 0x0d, 0x00, // .........G...... + 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, // ................ + 0x00, 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x02, // .!.............. + 0x00, 0xfc, 0x01, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, // ............. .. + 0x00, 0x19, 0x00, 0x09, 0x00, 0x96, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xfc, 0x01, 0x00, // .........a...... + 0x00, 0x96, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x61, 0x09, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // .a.............. + 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x89, 0x04, 0x00, 0x00, 0x1d, 0x00, 0x00, // .....!.......... + 0x00, 0x1b, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, // .............!.. + 0x00, 0xbb, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, // ................ + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x21, 0x00, 0x04, 0x00, 0xef, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // .....!.......... + 0x00, 0x8a, 0x02, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, 0x07, 0x00, 0x00, // ..... .......... + 0x00, 0x18, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .....!...}...... + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, 0x09, 0x00, 0x00, 0x3b, 0x00, 0x04, // .........a...;.. + 0x00, 0x1c, 0x00, 0x00, 0x00, 0x43, 0x12, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .....C....... .. + 0x00, 0x79, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x3b, 0x00, 0x04, // .y...........;.. + 0x00, 0x79, 0x04, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .y........... .. + 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x13, 0x03, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, // ................ + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ..... .......+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x14, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x7a, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x1b, 0x00, 0x03, // .z.............. + 0x00, 0xfe, 0x01, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .........+...... + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // .........,...... + 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, // .z.............. + 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, // .....+.......... + 0x00, 0x00, 0x00, 0x80, 0x3f, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, // ....?,.......... + 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, // ................ + 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .....e.......... + 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... ...... + 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, // .+.......j... .. + 0x00, 0x1c, 0x00, 0x04, 0x00, 0x29, 0x0b, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, // .....)...e...j.. + 0x00, 0x1e, 0x00, 0x0f, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, // ................ + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...e...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x29, 0x0b, 0x00, 0x00, 0x65, 0x00, 0x00, // .e...e...)...e.. + 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .e........... .. + 0x00, 0x98, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xde, 0x0a, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x98, 0x01, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .....B.......+.. + 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // ...../.......+.. + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // ............. .. + 0x00, 0x8b, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, // .............+.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x00, 0x04, // ............? .. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9b, 0x02, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .....w....... .. + 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x96, 0x02, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, // .....t....... .. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, // .............;.. + 0x00, 0x9c, 0x02, 0x00, 0x00, 0xd1, 0x0d, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, // .............6.. + 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // .....Sa..;...... + 0x00, 0xc9, 0x47, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, // ..G......;...... + 0x00, 0xab, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, // ..U......;...... + 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, // .........=...... + 0x00, 0x21, 0x43, 0x00, 0x00, 0xb2, 0x0c, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, // .!C......=...... + 0x00, 0x02, 0x33, 0x00, 0x00, 0xee, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x05, 0x00, 0x61, 0x09, 0x00, // ..3......P...a.. + 0x00, 0x12, 0x20, 0x00, 0x00, 0x21, 0x43, 0x00, 0x00, 0x02, 0x33, 0x00, 0x00, 0x3e, 0x00, 0x03, // .. ..!C...3..>.. + 0x00, 0x43, 0x12, 0x00, 0x00, 0x12, 0x20, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, // .C.... ..=...... + 0x00, 0xfa, 0x41, 0x00, 0x00, 0x77, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, // ..A..w...=...... + 0x00, 0x03, 0x3c, 0x00, 0x00, 0x74, 0x14, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xc9, 0x47, 0x00, // ..<..t...>....G. + 0x00, 0xfa, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0xab, 0x55, 0x00, 0x00, 0x03, 0x3c, 0x00, // ..A..>....U...<. + 0x00, 0x39, 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0xbd, 0x26, 0x00, 0x00, 0xcc, 0x0d, 0x00, // .9........&..... + 0x00, 0xc9, 0x47, 0x00, 0x00, 0xab, 0x55, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3d, 0x00, 0x04, // ..G...U......=.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, // .............>.. + 0x00, 0xd1, 0x0d, 0x00, 0x00, 0xce, 0x1c, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, // .............8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xce, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x89, 0x04, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x27, 0x0e, 0x00, // .....7.......'.. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x90, 0x02, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x37, 0x00, 0x03, // .7...........7.. + 0x00, 0x8a, 0x02, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x24, 0x54, 0x00, // .............$T. + 0x00, 0x41, 0x00, 0x05, 0x00, 0x14, 0x03, 0x00, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x27, 0x0e, 0x00, // .A...........'.. + 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x96, 0x00, 0x00, 0x00, 0x6d, 0x29, 0x00, // .....=.......m). + 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x7a, 0x04, 0x00, 0x00, 0xe4, 0x55, 0x00, // .....A...z....U. + 0x00, 0x27, 0x0e, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0xfc, 0x01, 0x00, // .'.......=...... + 0x00, 0xf2, 0x4e, 0x00, 0x00, 0xe4, 0x55, 0x00, 0x00, 0x56, 0x00, 0x05, 0x00, 0xfe, 0x01, 0x00, // ..N...U..V...... + 0x00, 0x32, 0x39, 0x00, 0x00, 0x6d, 0x29, 0x00, 0x00, 0xf2, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, // .29..m)...N..=.. + 0x00, 0x13, 0x00, 0x00, 0x00, 0xcd, 0x19, 0x00, 0x00, 0xe7, 0x15, 0x00, 0x00, 0x3d, 0x00, 0x04, // .............=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0x2e, 0x12, 0x00, 0x00, 0x58, 0x00, 0x07, // .....=>......X.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0x11, 0x1c, 0x00, 0x00, 0x32, 0x39, 0x00, 0x00, 0xcd, 0x19, 0x00, // .........29..... + 0x00, 0x02, 0x00, 0x00, 0x00, 0x3d, 0x3e, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x11, 0x1c, 0x00, // .....=>......... + 0x00, 0x38, 0x00, 0x01, 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xd2, 0x0c, 0x00, // .8...6.......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, // .........7...... + 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xc7, 0x0e, 0x00, // .....7.......... + 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0xd9, 0x0e, 0x00, 0x00, 0xf8, 0x00, 0x02, // .7.............. + 0x00, 0xde, 0x61, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xff, 0x5c, 0x00, // ..a..=.......... + 0x00, 0xc6, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0xcf, 0x50, 0x00, // .....=........P. + 0x00, 0xc7, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9d, 0x36, 0x00, // .....=........6. + 0x00, 0xd9, 0x0e, 0x00, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x43, 0x21, 0x00, // .............C!. + 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0xff, 0x5c, 0x00, 0x00, 0xcf, 0x50, 0x00, // ..............P. + 0x00, 0x9d, 0x36, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x43, 0x21, 0x00, 0x00, 0x38, 0x00, 0x01, // ..6......C!..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.......5...... + 0x00, 0xef, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x8a, 0x02, 0x00, 0x00, 0xdd, 0x0e, 0x00, // .....7.......... + 0x00, 0xf8, 0x00, 0x02, 0x00, 0x19, 0x4e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ......N..=...... + 0x00, 0x67, 0x1c, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // .g.......=...... + 0x00, 0xf2, 0x44, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ..D......=...... + 0x00, 0x92, 0x2f, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ../......=...... + 0x00, 0xa5, 0x2f, 0x00, 0x00, 0xdd, 0x0e, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // ../......P...... + 0x00, 0x41, 0x4a, 0x00, 0x00, 0x67, 0x1c, 0x00, 0x00, 0xf2, 0x44, 0x00, 0x00, 0x92, 0x2f, 0x00, // .AJ..g....D.../. + 0x00, 0xa5, 0x2f, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x41, 0x4a, 0x00, 0x00, 0x38, 0x00, 0x01, // ../......AJ..8.. + 0x00, 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0xcc, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, // .6.............. + 0x00, 0x7d, 0x00, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x48, 0x32, 0x00, // .}...7.......H2. + 0x00, 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x58, 0x38, 0x00, 0x00, 0x37, 0x00, 0x03, // .7.......X8..7.. + 0x00, 0x9a, 0x02, 0x00, 0x00, 0x21, 0x45, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x55, 0x4e, 0x00, // .....!E......UN. + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x32, 0x58, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......2X..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x69, 0x51, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......iQ..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x90, 0x02, 0x00, 0x00, 0x53, 0x34, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......S4..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x8a, 0x02, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......T4..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x55, 0x34, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......U4..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x8c, 0x34, 0x00, 0x00, 0x07, 0x00, 0x00, // .;........4..... + 0x00, 0x3b, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x26, 0x32, 0x00, 0x00, 0x07, 0x00, 0x00, // .;.......&2..... + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x32, 0x58, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x39, 0x00, 0x05, // .>...2X......9.. + 0x00, 0x1d, 0x00, 0x00, 0x00, 0xa0, 0x11, 0x00, 0x00, 0x35, 0x13, 0x00, 0x00, 0x32, 0x58, 0x00, // .........5...2X. + 0x00, 0x3d, 0x00, 0x04, 0x00, 0x61, 0x09, 0x00, 0x00, 0xb8, 0x3b, 0x00, 0x00, 0x43, 0x12, 0x00, // .=...a....;..C.. + 0x00, 0x3e, 0x00, 0x03, 0x00, 0x69, 0x51, 0x00, 0x00, 0xb8, 0x3b, 0x00, 0x00, 0x3d, 0x00, 0x04, // .>...iQ...;..=.. + 0x00, 0x18, 0x00, 0x00, 0x00, 0xae, 0x1b, 0x00, 0x00, 0x58, 0x38, 0x00, 0x00, 0x4f, 0x00, 0x07, // .........X8..O.. + 0x00, 0x13, 0x00, 0x00, 0x00, 0xcd, 0x32, 0x00, 0x00, 0xae, 0x1b, 0x00, 0x00, 0xae, 0x1b, 0x00, // ......2......... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x53, 0x34, 0x00, // .........>...S4. + 0x00, 0xcd, 0x32, 0x00, 0x00, 0x41, 0x00, 0x06, 0x00, 0x8b, 0x02, 0x00, 0x00, 0x15, 0x43, 0x00, // ..2..A........C. + 0x00, 0x42, 0x13, 0x00, 0x00, 0x2f, 0x0a, 0x00, 0x00, 0x0a, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, // .B.../.......=.. + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x6b, 0x1a, 0x00, 0x00, 0x15, 0x43, 0x00, 0x00, 0x3e, 0x00, 0x03, // .....k....C..>.. + 0x00, 0x54, 0x34, 0x00, 0x00, 0x6b, 0x1a, 0x00, 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, // .T4..k...9...... + 0x00, 0xc2, 0x5a, 0x00, 0x00, 0xce, 0x14, 0x00, 0x00, 0x69, 0x51, 0x00, 0x00, 0x53, 0x34, 0x00, // ..Z......iQ..S4. + 0x00, 0x54, 0x34, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xbd, 0x0e, 0x00, // .T4..Q.......... + 0x00, 0xc2, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, // ..Z............. + 0x00, 0x99, 0x5b, 0x00, 0x00, 0xbd, 0x0e, 0x00, 0x00, 0x88, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, // ..[............. + 0x00, 0x1c, 0x36, 0x00, 0x00, 0xbd, 0x0e, 0x00, 0x00, 0x99, 0x5b, 0x00, 0x00, 0x81, 0x00, 0x05, // ..6.......[..... + 0x00, 0x0d, 0x00, 0x00, 0x00, 0x2d, 0x53, 0x00, 0x00, 0x1c, 0x36, 0x00, 0x00, 0xfc, 0x00, 0x00, // .....-S...6..... + 0x00, 0x0c, 0x00, 0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x69, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, // .........i...... + 0x00, 0x2b, 0x00, 0x00, 0x00, 0x2d, 0x53, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, // .+...-S......... + 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x5d, 0x1e, 0x00, 0x00, 0x69, 0x0e, 0x00, // .P.......]...i.. + 0x00, 0x69, 0x0e, 0x00, 0x00, 0x69, 0x0e, 0x00, 0x00, 0x69, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, // .i...i...i...>.. + 0x00, 0x55, 0x34, 0x00, 0x00, 0x7a, 0x0b, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x8c, 0x34, 0x00, // .U4..z...>....4. + 0x00, 0x04, 0x05, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x26, 0x32, 0x00, 0x00, 0x5d, 0x1e, 0x00, // .....>...&2..].. + 0x00, 0x39, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x67, 0x61, 0x00, 0x00, 0xd2, 0x0c, 0x00, // .9.......ga..... + 0x00, 0x55, 0x34, 0x00, 0x00, 0x8c, 0x34, 0x00, 0x00, 0x26, 0x32, 0x00, 0x00, 0x3e, 0x00, 0x03, // .U4...4..&2..>.. + 0x00, 0x21, 0x45, 0x00, 0x00, 0x67, 0x61, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, // .!E..ga......8.. + 0x00, 0x00, // .. +}; +static const uint8_t fs_texture_sdf_dx9[423] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, // Color0......u_pa + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x00, 0x00, 0x01, 0x00, 0x78, 0x01, 0x00, 0x00, 0x00, 0x03, // rams......x..... + 0xff, 0xff, 0xfe, 0xff, 0x2f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x83, 0x00, // ..../.CTAB...... + 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ + 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ..|...D......... + 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, // ..P.......`..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, // ......l.......s_ + 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, // texColor........ + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, // ..........u_para + 0x6d, 0x73, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, // ms.............. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......ps_3_0.Mic + 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL + 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler + 0x36, 0x2e, 0x33, 0x2e, 0x39, 0x36, 0x30, 0x30, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // 6.3.9600.16384.. + 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, // ..Q..........?.. + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // .....?.......... + 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, // ................ + 0x0f, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x00, 0x00, // ................ + 0xc4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, // .............._. + 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x5b, 0x00, // ..............[. + 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x04, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, // ................ + 0xaa, 0x8b, 0x00, 0x00, 0x55, 0x8b, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, // ....U........... + 0x55, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // U............... + 0x55, 0x80, 0x01, 0x00, 0xaa, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x1f, 0x80, 0x00, 0x00, // U............... + 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... +}; +static const uint8_t fs_texture_sdf_dx11[558] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x02, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // ams.......s_texC + 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x44, 0x58, // olor0.........DX + 0x42, 0x43, 0xcc, 0xff, 0xbd, 0x63, 0x8b, 0x9e, 0xee, 0x37, 0x7b, 0x13, 0xc3, 0xb6, 0x5c, 0x48, // BC...c...7{....H + 0xab, 0xbe, 0x01, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, // ..............,. + 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x6c, 0x00, // ..........ISGNl. + 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........P..... + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ + 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ................ + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........b..... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x03, // ................ + 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO + 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, // LOR.TEXCOORD..OS + 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... . + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET. + 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x20, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, // ..SHDR ...@...H. + 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..Y...F. ....... + 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, // ..Z....`......X. + 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, // ...p......UU..b. + 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, // ..2.......e.... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, // ......h.......H. + 0x00, 0x0c, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, // ..........F..... + 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, // ..F~.......`.... + 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, // .... ........... + 0x00, 0x05, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, // .."............. + 0x00, 0x00, 0x0c, 0x00, 0x00, 0x05, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, // ......B......... + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, // .........."..... + 0x00, 0x00, 0x2a, 0x00, 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, // ..*............. + 0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x07, 0x12, 0x00, // ................ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, // ................ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ...........@.... + 0x00, 0x3f, 0x36, 0x20, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, // .?6 ... ........ + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, // ......>....... +}; +static const uint8_t fs_texture_sdf_mtl[757] = +{ + 0x46, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, // FSH........u_par + 0x61, 0x6d, 0x73, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd7, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, // ams..........usi + 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, // ng namespace met + 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // al;.struct xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, // tlShaderInput {. + 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // float3 v_texco + 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, // ord0;.};.struct + 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut + 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // put {. float4 g + 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, // l_FragColor;.};. + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // struct xlatMtlSh + 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, // aderUniform {. + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, // float4 u_params; + 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, // .};.fragment xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput + 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, // xlatMtlMain (xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, // atMtlShaderInput + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, // _mtl_i [[stage_ + 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, // in]], constant x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, // latMtlShaderUnif + 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, // orm& _mtl_u [[bu + 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x0a, 0x20, 0x20, 0x2c, 0x20, 0x20, 0x20, // ffer(0)]]. , + 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x64, 0x3c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3e, // texture2d + 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x74, 0x65, // s_texColor [[te + 0x78, 0x74, 0x75, 0x72, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x2c, 0x20, 0x73, 0x61, 0x6d, 0x70, // xture(0)]], samp + 0x6c, 0x65, 0x72, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, // ler _mtlsmp_s_te + 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x5b, 0x5b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // xColor [[sampler + 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // (0)]]).{. xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, // tlShaderOutput _ + 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // mtl_o;. float4 + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, // tmpvar_1 = 0;. + 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, // tmpvar_1 = s_tex + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x28, 0x5f, 0x6d, 0x74, // Color.sample(_mt + 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, // lsmp_s_texColor, + 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x29, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // (float2)(_mtl_i + 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x29, // .v_texcoord0.xy) + 0x2c, 0x20, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, // , level(_mtl_u.u + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // _params.x));. _ + 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, // mtl_o.gl_FragCol + 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x28, 0x63, 0x6c, 0x61, 0x6d, // or = float4(clam + 0x70, 0x20, 0x28, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x20, // p (((tmpvar_1.x + 0x2f, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x64, 0x66, 0x64, 0x78, // / . (abs(dfdx + 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x29, 0x29, 0x20, 0x2b, 0x20, // (tmpvar_1.x)) + + 0x61, 0x62, 0x73, 0x28, 0x64, 0x66, 0x64, 0x79, 0x28, 0x2d, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // abs(dfdy(-tmpvar + 0x5f, 0x31, 0x2e, 0x78, 0x29, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x29, 0x20, 0x2b, 0x20, 0x30, 0x2e, // _1.x))). ) + 0. + 0x35, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x3b, 0x0a, // 5), 0.0, 1.0));. + 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // return _mtl_o; + 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... +}; +extern const uint8_t* fs_texture_sdf_pssl; +extern const uint32_t fs_texture_sdf_pssl_size; diff --git a/3rdparty/bgfx/tools/texturev/fs_texture_sdf.sc b/3rdparty/bgfx/tools/texturev/fs_texture_sdf.sc new file mode 100644 index 0000000..b4e8510 --- /dev/null +++ b/3rdparty/bgfx/tools/texturev/fs_texture_sdf.sc @@ -0,0 +1,20 @@ +$input v_texcoord0, v_color0 + +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + */ + +#include "common.sh" + +SAMPLER2D(s_texColor, 0); + +void main() +{ + vec4 bgColor = vec4(0.0, 0.0, 0.0, 0.0); + vec4 fgColor = vec4(1.0, 1.0, 1.0, 1.0); + + float sigDist = texture2DLod(s_texColor, v_texcoord0.xy, u_textureLod).x; + float opacity = clamp(sigDist/fwidth(sigDist) + 0.5, 0.0, 1.0); + gl_FragColor = mix(bgColor, fgColor, opacity); +} diff --git a/3rdparty/bgfx/tools/texturev/makefile b/3rdparty/bgfx/tools/texturev/makefile index 733ae65..c5c113b 100644 --- a/3rdparty/bgfx/tools/texturev/makefile +++ b/3rdparty/bgfx/tools/texturev/makefile @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause # diff --git a/3rdparty/bgfx/tools/texturev/texturev.cpp b/3rdparty/bgfx/tools/texturev/texturev.cpp index 182f56f..db821b8 100644 --- a/3rdparty/bgfx/tools/texturev/texturev.cpp +++ b/3rdparty/bgfx/tools/texturev/texturev.cpp @@ -1,14 +1,22 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include "common.h" + #include + #include +#include +#include +#include +#include #include -#include +#include +#include #include + #include #include #include @@ -17,23 +25,35 @@ #include -#include - #include #include -#include namespace stl = tinystl; +#include +#include #include #include #include "vs_texture.bin.h" +#include "vs_texture_cube.bin.h" + #include "fs_texture.bin.h" #include "fs_texture_array.bin.h" -#include "vs_texture_cube.bin.h" #include "fs_texture_cube.bin.h" +#include "fs_texture_cube2.bin.h" #include "fs_texture_sdf.bin.h" +#include "fs_texture_msdf.bin.h" +#include "fs_texture_3d.bin.h" + +#define BACKGROUND_VIEW_ID 0 +#define IMAGE_VIEW_ID 1 + +#define BGFX_TEXTUREV_VERSION_MAJOR 1 +#define BGFX_TEXTUREV_VERSION_MINOR 0 + +const float kEvMin = -10.0f; +const float kEvMax = 20.0f; static const bgfx::EmbeddedShader s_embeddedShaders[] = { @@ -42,7 +62,10 @@ static const bgfx::EmbeddedShader s_embeddedShaders[] = BGFX_EMBEDDED_SHADER(fs_texture_array), BGFX_EMBEDDED_SHADER(vs_texture_cube), BGFX_EMBEDDED_SHADER(fs_texture_cube), + BGFX_EMBEDDED_SHADER(fs_texture_cube2), BGFX_EMBEDDED_SHADER(fs_texture_sdf), + BGFX_EMBEDDED_SHADER(fs_texture_msdf), + BGFX_EMBEDDED_SHADER(fs_texture_3d), BGFX_EMBEDDED_SHADER_END() }; @@ -53,11 +76,14 @@ static const char* s_supportedExt[] = "dds", "exr", "gif", + "gnf", "jpg", "jpeg", "hdr", "ktx", + "pgm", "png", + "ppm", "psd", "pvr", "tga", @@ -69,6 +95,19 @@ struct Binding { App, View, + Help, + + Count + }; +}; + +struct Geometry +{ + enum Enum + { + Quad, + Cross, + Hexagon, Count }; @@ -76,42 +115,76 @@ struct Binding static const InputBinding s_bindingApp[] = { - { entry::Key::Esc, entry::Modifier::None, 1, NULL, "exit" }, + { entry::Key::KeyQ, entry::Modifier::None, 1, NULL, "exit" }, { entry::Key::KeyF, entry::Modifier::None, 1, NULL, "graphics fullscreen" }, INPUT_BINDING_END }; +const char* s_resetCmd = + "view zoom 1.0\n" + "view rotate 0\n" + "view cubemap\n" + "view pan\n" + "view ev\n" + ; + static const InputBinding s_bindingView[] = { - { entry::Key::Comma, entry::Modifier::None, 1, NULL, "view mip prev" }, - { entry::Key::Period, entry::Modifier::None, 1, NULL, "view mip next" }, - { entry::Key::Comma, entry::Modifier::LeftShift, 1, NULL, "view mip" }, - { entry::Key::Comma, entry::Modifier::RightShift, 1, NULL, "view mip" }, + { entry::Key::Esc, entry::Modifier::None, 1, NULL, "exit" }, - { entry::Key::Slash, entry::Modifier::None, 1, NULL, "view filter" }, + { entry::Key::Comma, entry::Modifier::None, 1, NULL, "view mip prev" }, + { entry::Key::Period, entry::Modifier::None, 1, NULL, "view mip next" }, + { entry::Key::Comma, entry::Modifier::LeftShift, 1, NULL, "view mip" }, + { entry::Key::Comma, entry::Modifier::RightShift, 1, NULL, "view mip" }, - { entry::Key::Key0, entry::Modifier::None, 1, NULL, "view zoom 1.0" }, - { entry::Key::Plus, entry::Modifier::None, 1, NULL, "view zoom +0.1" }, - { entry::Key::Minus, entry::Modifier::None, 1, NULL, "view zoom -0.1" }, + { entry::Key::Slash, entry::Modifier::None, 1, NULL, "view filter" }, - { entry::Key::Up, entry::Modifier::None, 1, NULL, "view file-up" }, - { entry::Key::Down, entry::Modifier::None, 1, NULL, "view file-down" }, - { entry::Key::PageUp, entry::Modifier::None, 1, NULL, "view file-pgup" }, - { entry::Key::PageDown, entry::Modifier::None, 1, NULL, "view file-pgdown" }, + { entry::Key::Key1, entry::Modifier::None, 1, NULL, "view zoom 1.0\n" + "view fit\n" }, - { entry::Key::Left, entry::Modifier::None, 1, NULL, "view layer prev" }, - { entry::Key::Right, entry::Modifier::None, 1, NULL, "view layer next" }, + { entry::Key::Key0, entry::Modifier::None, 1, NULL, s_resetCmd }, + { entry::Key::Plus, entry::Modifier::None, 1, NULL, "view zoom +0.1" }, + { entry::Key::Minus, entry::Modifier::None, 1, NULL, "view zoom -0.1" }, - { entry::Key::KeyR, entry::Modifier::None, 1, NULL, "view rgb r" }, - { entry::Key::KeyG, entry::Modifier::None, 1, NULL, "view rgb g" }, - { entry::Key::KeyB, entry::Modifier::None, 1, NULL, "view rgb b" }, - { entry::Key::KeyA, entry::Modifier::None, 1, NULL, "view rgb a" }, + { entry::Key::KeyZ, entry::Modifier::None, 1, NULL, "view rotate -90" }, + { entry::Key::KeyZ, entry::Modifier::LeftShift, 1, NULL, "view rotate +90" }, - { entry::Key::KeyH, entry::Modifier::None, 1, NULL, "view help" }, + { entry::Key::Up, entry::Modifier::None, 1, NULL, "view pan\n" + "view file-up" }, + { entry::Key::Down, entry::Modifier::None, 1, NULL, "view pan\n" + "view file-down" }, + { entry::Key::PageUp, entry::Modifier::None, 1, NULL, "view pan\n" + "view file-pgup" }, + { entry::Key::PageDown, entry::Modifier::None, 1, NULL, "view pan\n" + "view file-pgdown" }, - { entry::Key::KeyS, entry::Modifier::None, 1, NULL, "view sdf" }, + { entry::Key::Left, entry::Modifier::None, 1, NULL, "view layer prev" }, + { entry::Key::Right, entry::Modifier::None, 1, NULL, "view layer next" }, + { entry::Key::KeyR, entry::Modifier::None, 1, NULL, "view rgb r" }, + { entry::Key::KeyG, entry::Modifier::None, 1, NULL, "view rgb g" }, + { entry::Key::KeyB, entry::Modifier::None, 1, NULL, "view rgb b" }, + { entry::Key::KeyA, entry::Modifier::None, 1, NULL, "view rgb a" }, + + { entry::Key::KeyI, entry::Modifier::None, 1, NULL, "view info" }, + + { entry::Key::KeyH, entry::Modifier::None, 1, NULL, "view help" }, + + { entry::Key::Return, entry::Modifier::None, 1, NULL, "view files" }, + + { entry::Key::KeyS, entry::Modifier::None, 1, NULL, "view sdf" }, + + { entry::Key::Space, entry::Modifier::None, 1, NULL, "view geo\n" + "view pan\n" }, + + INPUT_BINDING_END +}; + +static const InputBinding s_bindingHelp[] = +{ + { entry::Key::Esc, entry::Modifier::None, 1, NULL, "view help" }, + { entry::Key::KeyH, entry::Modifier::None, 1, NULL, "view help" }, INPUT_BINDING_END }; @@ -119,6 +192,7 @@ static const char* s_bindingName[] = { "App", "View", + "Help", }; BX_STATIC_ASSERT(Binding::Count == BX_COUNTOF(s_bindingName) ); @@ -126,23 +200,42 @@ static const InputBinding* s_binding[] = { s_bindingApp, s_bindingView, + s_bindingHelp, }; BX_STATIC_ASSERT(Binding::Count == BX_COUNTOF(s_binding) ); struct View { View() - : m_fileIndex(0) + : m_cubeMapGeo(Geometry::Quad) + , m_fileIndex(0) , m_scaleFn(0) , m_mip(0) , m_layer(0) , m_abgr(UINT32_MAX) + , m_ev(0.0f) + , m_evMin(kEvMin) + , m_evMax(kEvMax) + , m_posx(0.0f) + , m_posy(0.0f) + , m_angx(0.0f) + , m_angy(0.0f) , m_zoom(1.0f) + , m_angle(0.0f) + , m_orientation(0.0f) + , m_flipH(0.0f) + , m_flipV(0.0f) + , m_transitionTime(1.0f) , m_filter(true) + , m_fit(true) , m_alpha(false) , m_help(false) + , m_info(false) + , m_files(false) , m_sdf(false) + , m_inLinear(false) { + load(); } ~View() @@ -152,69 +245,158 @@ struct View { if (_argc >= 2) { - if (0 == strcmp(_argv[1], "mip") ) + if (0 == bx::strCmp(_argv[1], "mip") ) { if (_argc >= 3) { uint32_t mip = m_mip; - if (0 == strcmp(_argv[2], "next") ) + if (0 == bx::strCmp(_argv[2], "next") ) { ++mip; } - else if (0 == strcmp(_argv[2], "prev") ) + else if (0 == bx::strCmp(_argv[2], "prev") ) { --mip; } - else if (0 == strcmp(_argv[2], "last") ) + else if (0 == bx::strCmp(_argv[2], "last") ) { mip = INT32_MAX; } else { - mip = atoi(_argv[2]); + bx::fromString(&mip, _argv[2]); } - m_mip = bx::uint32_iclamp(mip, 0, m_info.numMips-1); + m_mip = bx::uint32_iclamp(mip, 0, m_textureInfo.numMips-1); } else { m_mip = 0; } } - if (0 == strcmp(_argv[1], "layer") ) + else if (0 == bx::strCmp(_argv[1], "layer") ) { if (_argc >= 3) { uint32_t layer = m_layer; - if (0 == strcmp(_argv[2], "next") ) + if (0 == bx::strCmp(_argv[2], "next") ) { ++layer; } - else if (0 == strcmp(_argv[2], "prev") ) + else if (0 == bx::strCmp(_argv[2], "prev") ) { --layer; } - else if (0 == strcmp(_argv[2], "last") ) + else if (0 == bx::strCmp(_argv[2], "last") ) { layer = INT32_MAX; } else { - layer = atoi(_argv[2]); + bx::fromString(&layer, _argv[2]); } - m_layer = bx::uint32_iclamp(layer, 0, m_info.numLayers-1); + m_layer = bx::uint32_iclamp(layer, 0, m_textureInfo.numLayers-1); } else { m_layer = 0; } } - else if (0 == strcmp(_argv[1], "zoom") ) + else if (0 == bx::strCmp(_argv[1], "ev") ) { if (_argc >= 3) { - float zoom = (float)atof(_argv[2]); + float ev = m_ev; + bx::fromString(&ev, _argv[2]); + + m_ev = bx::clamp(ev, kEvMin, kEvMax); + } + else + { + m_ev = 0.0f; + } + } + else if (0 == bx::strCmp(_argv[1], "pan") ) + { + if (_argc >= 3) + { + if (_argc >= 4) + { + float yy; + bx::fromString(&yy, _argv[3]); + if (_argv[3][0] == '+' + || _argv[3][0] == '-') + { + m_posy += yy; + } + else + { + m_posy = yy; + } + } + + float xx; + bx::fromString(&xx, _argv[2]); + if (_argv[2][0] == '+' + || _argv[2][0] == '-') + { + m_posx += xx; + } + else + { + m_posx = xx; + } + } + else + { + m_posx = 0.0f; + m_posy = 0.0f; + } + } + else if (0 == bx::strCmp(_argv[1], "cubemap") ) + { + if (_argc >= 3) + { + if (_argc >= 4) + { + float yy; + bx::fromString(&yy, _argv[3]); + if (_argv[3][0] == '+' + || _argv[3][0] == '-') + { + m_angy += bx::toRad(yy); + } + else + { + m_angy = bx::toRad(yy); + } + } + + float xx; + bx::fromString(&xx, _argv[2]); + if (_argv[2][0] == '+' + || _argv[2][0] == '-') + { + m_angx += bx::toRad(xx); + } + else + { + m_angx = bx::toRad(xx); + } + } + else + { + m_angx = 0.0f; + m_angy = 0.0f; + } + } + else if (0 == bx::strCmp(_argv[1], "zoom") ) + { + if (_argc >= 3) + { + float zoom; + bx::fromString(&zoom, _argv[2]); if (_argv[2][0] == '+' || _argv[2][0] == '-') @@ -226,35 +408,118 @@ struct View m_zoom = zoom; } - m_zoom = bx::fclamp(m_zoom, 0.001f, 10.0f); + m_zoom = bx::clamp(m_zoom, 0.01f, 10.0f); } else { m_zoom = 1.0f; } } - else if (0 == strcmp(_argv[1], "filter") ) + else if (0 == bx::strCmp(_argv[1], "rotate") ) { if (_argc >= 3) { - m_filter = bx::toBool(_argv[2]); + float angle; + bx::fromString(&angle, _argv[2]); + + if (_argv[2][0] == '+' + || _argv[2][0] == '-') + { + m_angle += bx::toRad(angle); + } + else + { + m_angle = bx::toRad(angle); + } + + m_angle = bx::wrap(m_angle, bx::kPi*2.0f); + } + else + { + m_angle = 0.0f; + } + } + else if (0 == bx::strCmp(_argv[1], "orientation") ) + { + if (_argc >= 3) + { + float* dst = NULL; + char axis = bx::toLower(_argv[2][0]); + switch (axis) + { + case 'x': dst = &m_flipV; break; + case 'y': dst = &m_flipH; break; + case 'z': dst = &m_orientation; break; + default: break; + } + + if (NULL != dst) + { + if (_argc >= 4) + { + float angle; + bx::fromString(&angle, _argv[3]); + *dst = bx::toRad(angle); + } + else + { + *dst = 0.0f; + } + } + } + else + { + m_flipH = 0.0f; + m_flipV = 0.0f; + m_orientation = 0.0f; + } + } + else if (0 == bx::strCmp(_argv[1], "transition") ) + { + if (_argc >= 3) + { + float time; + bx::fromString(&time, _argv[2]); + m_transitionTime = bx::clamp(time, 0.0f, 5.0f); + } + else + { + m_transitionTime = 1.0f; + } + } + else if (0 == bx::strCmp(_argv[1], "filter") ) + { + if (_argc >= 3) + { + bx::fromString(&m_filter, _argv[2]); } else { m_filter ^= true; } } - else if (0 == strcmp(_argv[1], "file-up") ) + else if (0 == bx::strCmp(_argv[1], "fit") ) + { + if (_argc >= 3) + { + bx::fromString(&m_fit, _argv[2]); + } + else + { + m_fit ^= true; + } + } + else if (0 == bx::strCmp(_argv[1], "file-up") ) { m_fileIndex = bx::uint32_satsub(m_fileIndex, 1); } - else if (0 == strcmp(_argv[1], "file-down") ) + else if (0 == bx::strCmp(_argv[1], "file-down") ) { uint32_t numFiles = bx::uint32_satsub(uint32_t(m_fileList.size() ), 1); ++m_fileIndex; m_fileIndex = bx::uint32_min(m_fileIndex, numFiles); } - else if (0 == strcmp(_argv[1], "rgb") ) + else if (0 == bx::strCmp(_argv[1], "rgb") ) { if (_argc >= 3) { @@ -281,45 +546,86 @@ struct View m_alpha = false; } } - else if (0 == strcmp(_argv[1], "sdf") ) + else if (0 == bx::strCmp(_argv[1], "sdf") ) { m_sdf ^= true; } - else if (0 == strcmp(_argv[1], "help") ) + else if (0 == bx::strCmp(_argv[1], "geo") ) + { + if (_argc >= 3) + { + if (bx::toLower(_argv[2][0]) == 'c') + { + m_cubeMapGeo = Geometry::Cross; + } + else if (bx::toLower(_argv[2][0]) == 'h') + { + m_cubeMapGeo = Geometry::Hexagon; + } + else + { + m_cubeMapGeo = Geometry::Quad; + } + } + else + { + m_cubeMapGeo = Geometry::Enum( (m_cubeMapGeo + 1) % Geometry::Count); + } + } + else if (0 == bx::strCmp(_argv[1], "help") ) { m_help ^= true; } + else if (0 == bx::strCmp(_argv[1], "save") ) + { + save(); + } + else if (0 == bx::strCmp(_argv[1], "info") ) + { + m_info ^= true; + } + else if (0 == bx::strCmp(_argv[1], "files") ) + { + m_files ^= true; + } } return 0; } - void updateFileList(const char* _path, const char* _fileName = "") + static bool sortNameAscending(const std::string& _lhs, const std::string& _rhs) { - std::string path = _path; + return 0 > bx::strCmpV(_lhs.c_str(), _rhs.c_str() ); + } - DIR* dir = opendir(_path); + void updateFileList(const bx::FilePath& _filePath) + { + DIR* dir = opendir(_filePath.get() ); if (NULL == dir) { - path = "."; + m_path = _filePath.getPath(); + dir = opendir(m_path.get() ); + } + else + { + m_path = _filePath; } - dir = opendir(path.c_str() ); if (NULL != dir) { for (dirent* item = readdir(dir); NULL != item; item = readdir(dir) ) { if (0 == (item->d_type & DT_DIR) ) { - const char* ext = bx::strnrchr(item->d_name, '.'); + const char* ext = bx::strRFind(item->d_name, '.'); if (NULL != ext) { ext += 1; bool supported = false; for (uint32_t ii = 0; ii < BX_COUNTOF(s_supportedExt); ++ii) { - if (0 == bx::strincmp(ext, s_supportedExt[ii]) ) + if (0 == bx::strCmpI(ext, s_supportedExt[ii]) ) { supported = true; break; @@ -328,39 +634,111 @@ struct View if (supported) { - if (0 == strcmp(_fileName, item->d_name) ) - { - m_fileIndex = uint32_t(m_fileList.size() ); - } - - std::string name = path; - char ch = name[name.size()-1]; - name += '/' == ch || '\\' == ch ? "" : "/"; - name += item->d_name; - m_fileList.push_back(name); + m_fileList.push_back(item->d_name); } } } } + std::sort(m_fileList.begin(), m_fileList.end(), sortNameAscending); + + m_fileIndex = 0; + uint32_t idx = 0; + for (FileList::const_iterator it = m_fileList.begin(); it != m_fileList.end(); ++it, ++idx) + { + if (0 == bx::strCmpI(it->c_str(), _filePath.getFileName() ) ) + { + // If it is case-insensitive match then might be correct one, but keep + // searching. + m_fileIndex = idx; + + if (0 == bx::strCmp(it->c_str(), _filePath.getFileName() ) ) + { + // If it is exact match we're done. + break; + } + } + } + closedir(dir); } } + void load() + { + bx::FilePath filePath(bx::Dir::Home); + filePath.join(".config/bgfx/texturev.ini"); + + bx::Settings settings(entry::getAllocator() ); + + bx::FileReader reader; + if (bx::open(&reader, filePath) ) + { + bx::read(&reader, settings); + bx::close(&reader); + + if (!bx::fromString(&m_transitionTime, settings.get("view/transition") ) ) + { + m_transitionTime = 1.0f; + } + } + } + + void save() + { + bx::FilePath filePath(bx::Dir::Home); + filePath.join(".config/bgfx/texturev.ini"); + + if (bx::makeAll(filePath.getPath() ) ) + { + bx::Settings settings(entry::getAllocator() ); + + char tmp[256]; + bx::toString(tmp, sizeof(tmp), m_transitionTime); + settings.set("view/transition", tmp); + + bx::FileWriter writer; + if (bx::open(&writer, filePath) ) + { + bx::write(&writer, settings); + bx::close(&writer); + } + } + } + + bx::FilePath m_path; + typedef stl::vector FileList; FileList m_fileList; - bgfx::TextureInfo m_info; + bgfx::TextureInfo m_textureInfo; + Geometry::Enum m_cubeMapGeo; uint32_t m_fileIndex; uint32_t m_scaleFn; uint32_t m_mip; uint32_t m_layer; uint32_t m_abgr; + float m_ev; + float m_evMin; + float m_evMax; + float m_posx; + float m_posy; + float m_angx; + float m_angy; float m_zoom; + float m_angle; + float m_orientation; + float m_flipH; + float m_flipV; + float m_transitionTime; bool m_filter; + bool m_fit; bool m_alpha; bool m_help; + bool m_info; + bool m_files; bool m_sdf; + bool m_inLinear; }; int cmdView(CmdContext* /*_context*/, void* _userData, int _argc, char const* const* _argv) @@ -369,12 +747,13 @@ int cmdView(CmdContext* /*_context*/, void* _userData, int _argc, char const* co return view->cmd(_argc, _argv); } -struct PosUvColorVertex +struct PosUvwColorVertex { float m_x; float m_y; float m_u; float m_v; + float m_w; uint32_t m_abgr; static void init() @@ -382,94 +761,180 @@ struct PosUvColorVertex ms_decl .begin() .add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float) - .add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float) + .add(bgfx::Attrib::TexCoord0, 3, bgfx::AttribType::Float) .add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true) .end(); } + void set(float _x, float _y, float _u, float _v, float _w, uint32_t _abgr) + { + m_x = _x; + m_y = _y; + m_u = _u; + m_v = _v; + m_w = _w; + m_abgr = _abgr; + } + static bgfx::VertexDecl ms_decl; }; -bgfx::VertexDecl PosUvColorVertex::ms_decl; +bgfx::VertexDecl PosUvwColorVertex::ms_decl; -bool screenQuad(int32_t _x, int32_t _y, int32_t _width, uint32_t _height, uint32_t _abgr, bool _originBottomLeft = false) +static uint32_t addQuad(uint16_t* _indices, uint16_t _idx0, uint16_t _idx1, uint16_t _idx2, uint16_t _idx3) { - if (6 == bgfx::getAvailTransientVertexBuffer(6, PosUvColorVertex::ms_decl) ) - { - bgfx::TransientVertexBuffer vb; - bgfx::allocTransientVertexBuffer(&vb, 6, PosUvColorVertex::ms_decl); - PosUvColorVertex* vertex = (PosUvColorVertex*)vb.data; + _indices[0] = _idx0; + _indices[1] = _idx3; + _indices[2] = _idx1; - const float widthf = float(_width); - const float heightf = float(_height); + _indices[3] = _idx1; + _indices[4] = _idx3; + _indices[5] = _idx2; - const float minx = float(_x); - const float miny = float(_y); - const float maxx = minx+widthf; - const float maxy = miny+heightf; - - float m_halfTexel = 0.0f; - - const float texelHalfW = m_halfTexel/widthf; - const float texelHalfH = m_halfTexel/heightf; - const float minu = texelHalfW; - const float maxu = 1.0f - texelHalfW; - const float minv = _originBottomLeft ? texelHalfH+1.0f : texelHalfH ; - const float maxv = _originBottomLeft ? texelHalfH : texelHalfH+1.0f; - - vertex[0].m_x = minx; - vertex[0].m_y = miny; - vertex[0].m_u = minu; - vertex[0].m_v = minv; - - vertex[1].m_x = maxx; - vertex[1].m_y = miny; - vertex[1].m_u = maxu; - vertex[1].m_v = minv; - - vertex[2].m_x = maxx; - vertex[2].m_y = maxy; - vertex[2].m_u = maxu; - vertex[2].m_v = maxv; - - vertex[3].m_x = maxx; - vertex[3].m_y = maxy; - vertex[3].m_u = maxu; - vertex[3].m_v = maxv; - - vertex[4].m_x = minx; - vertex[4].m_y = maxy; - vertex[4].m_u = minu; - vertex[4].m_v = maxv; - - vertex[5].m_x = minx; - vertex[5].m_y = miny; - vertex[5].m_u = minu; - vertex[5].m_v = minv; - - vertex[0].m_abgr = _abgr; - vertex[1].m_abgr = _abgr; - vertex[2].m_abgr = _abgr; - vertex[3].m_abgr = _abgr; - vertex[4].m_abgr = _abgr; - vertex[5].m_abgr = _abgr; - - bgfx::setVertexBuffer(&vb); - - return true; - } - - return false; + return 6; } -struct Interpolator +void setGeometry( + Geometry::Enum _type + , int32_t _x + , int32_t _y + , uint32_t _width + , uint32_t _height + , uint32_t _abgr + , float _maxu = 1.0f + , float _maxv = 1.0f + ) +{ + if (Geometry::Quad == _type) + { + if (6 == bgfx::getAvailTransientVertexBuffer(6, PosUvwColorVertex::ms_decl) ) + { + bgfx::TransientVertexBuffer vb; + bgfx::allocTransientVertexBuffer(&vb, 6, PosUvwColorVertex::ms_decl); + PosUvwColorVertex* vertex = (PosUvwColorVertex*)vb.data; + + const float widthf = float(_width); + const float heightf = float(_height); + + const float minx = float(_x); + const float miny = float(_y); + const float maxx = minx+widthf; + const float maxy = miny+heightf; + + const float minu = 0.0f; + const float maxu = _maxu; + const float minv = 0.0f; + const float maxv = _maxv; + + vertex->set(minx, miny, minu, minv, 0.0f, _abgr); ++vertex; + vertex->set(maxx, miny, maxu, minv, 0.0f, _abgr); ++vertex; + vertex->set(maxx, maxy, maxu, maxv, 0.0f, _abgr); ++vertex; + + vertex->set(maxx, maxy, maxu, maxv, 0.0f, _abgr); ++vertex; + vertex->set(minx, maxy, minu, maxv, 0.0f, _abgr); ++vertex; + vertex->set(minx, miny, minu, minv, 0.0f, _abgr); ++vertex; + + bgfx::setVertexBuffer(0, &vb); + } + } + else + { + const uint32_t numVertices = 14; + const uint32_t numIndices = 36; + if (checkAvailTransientBuffers(numVertices, PosUvwColorVertex::ms_decl, numIndices) ) + { + bgfx::TransientVertexBuffer tvb; + bgfx::allocTransientVertexBuffer(&tvb, numVertices, PosUvwColorVertex::ms_decl); + + bgfx::TransientIndexBuffer tib; + bgfx::allocTransientIndexBuffer(&tib, numIndices); + + PosUvwColorVertex* vertex = (PosUvwColorVertex*)tvb.data; + uint16_t* indices = (uint16_t*)tib.data; + + if (Geometry::Cross == _type) + { + const float sx = _width /1.5f; + const float sy = _height/1.5f; + const float px = float(_x)-sx/4.0f; + const float py = float(_y); + + vertex->set(0.0f*sx+px, 0.5f*sy+py, -1.0f, 1.0f, -1.0f, _abgr); ++vertex; + vertex->set(0.0f*sx+px, 1.0f*sy+py, -1.0f, -1.0f, -1.0f, _abgr); ++vertex; + + vertex->set(0.5f*sx+px, 0.0f*sy+py, -1.0f, 1.0f, -1.0f, _abgr); ++vertex; + vertex->set(0.5f*sx+px, 0.5f*sy+py, -1.0f, 1.0f, 1.0f, _abgr); ++vertex; + vertex->set(0.5f*sx+px, 1.0f*sy+py, -1.0f, -1.0f, 1.0f, _abgr); ++vertex; + vertex->set(0.5f*sx+px, 1.5f*sy+py, -1.0f, -1.0f, -1.0f, _abgr); ++vertex; + + vertex->set(1.0f*sx+px, 0.0f*sy+py, 1.0f, 1.0f, -1.0f, _abgr); ++vertex; + vertex->set(1.0f*sx+px, 0.5f*sy+py, 1.0f, 1.0f, 1.0f, _abgr); ++vertex; + vertex->set(1.0f*sx+px, 1.0f*sy+py, 1.0f, -1.0f, 1.0f, _abgr); ++vertex; + vertex->set(1.0f*sx+px, 1.5f*sy+py, 1.0f, -1.0f, -1.0f, _abgr); ++vertex; + + vertex->set(1.5f*sx+px, 0.5f*sy+py, 1.0f, 1.0f, -1.0f, _abgr); ++vertex; + vertex->set(1.5f*sx+px, 1.0f*sy+py, 1.0f, -1.0f, -1.0f, _abgr); ++vertex; + + vertex->set(2.0f*sx+px, 0.5f*sy+py, -1.0f, 1.0f, -1.0f, _abgr); ++vertex; + vertex->set(2.0f*sx+px, 1.0f*sy+py, -1.0f, -1.0f, -1.0f, _abgr); ++vertex; + + indices += addQuad(indices, 0, 3, 4, 1); + indices += addQuad(indices, 2, 6, 7, 3); + indices += addQuad(indices, 3, 7, 8, 4); + indices += addQuad(indices, 4, 8, 9, 5); + indices += addQuad(indices, 7, 10, 11, 8); + indices += addQuad(indices, 10, 12, 13, 11); + } + else + { + const float sx = float(_width); + const float sy = float(_height); + const float px = float(_x) - sx/2.0f; + const float py = float(_y); + + vertex->set(0.0f*sx+px, 0.25f*sy+py, -1.0f, 1.0f, -1.0f, _abgr); ++vertex; + vertex->set(0.0f*sx+px, 0.75f*sy+py, -1.0f, -1.0f, -1.0f, _abgr); ++vertex; + + vertex->set(0.5f*sx+px, 0.00f*sy+py, -1.0f, 1.0f, 1.0f, _abgr); ++vertex; + vertex->set(0.5f*sx+px, 0.50f*sy+py, -1.0f, -1.0f, 1.0f, _abgr); ++vertex; + vertex->set(0.5f*sx+px, 1.00f*sy+py, 1.0f, -1.0f, -1.0f, _abgr); ++vertex; + + vertex->set(1.0f*sx+px, 0.25f*sy+py, 1.0f, 1.0f, 1.0f, _abgr); ++vertex; + vertex->set(1.0f*sx+px, 0.75f*sy+py, 1.0f, -1.0f, 1.0f, _abgr); ++vertex; + + vertex->set(1.0f*sx+px, 0.25f*sy+py, 1.0f, 1.0f, 1.0f, _abgr); ++vertex; + vertex->set(1.0f*sx+px, 0.75f*sy+py, 1.0f, -1.0f, 1.0f, _abgr); ++vertex; + + vertex->set(1.5f*sx+px, 0.00f*sy+py, -1.0f, 1.0f, 1.0f, _abgr); ++vertex; + vertex->set(1.5f*sx+px, 0.50f*sy+py, 1.0f, 1.0f, -1.0f, _abgr); ++vertex; + vertex->set(1.5f*sx+px, 1.00f*sy+py, 1.0f, -1.0f, -1.0f, _abgr); ++vertex; + + vertex->set(2.0f*sx+px, 0.25f*sy+py, -1.0f, 1.0f, -1.0f, _abgr); ++vertex; + vertex->set(2.0f*sx+px, 0.75f*sy+py, -1.0f, -1.0f, -1.0f, _abgr); ++vertex; + + indices += addQuad(indices, 0, 2, 3, 1); + indices += addQuad(indices, 1, 3, 6, 4); + indices += addQuad(indices, 2, 5, 6, 3); + indices += addQuad(indices, 7, 9, 12, 10); + indices += addQuad(indices, 7, 10, 11, 8); + indices += addQuad(indices, 10, 12, 13, 11); + } + + bgfx::setVertexBuffer(0, &tvb); + bgfx::setIndexBuffer(&tib); + } + } +} + +template +struct InterpolatorT { float from; float to; float duration; int64_t offset; - Interpolator(float _value) + InterpolatorT(float _value) { reset(_value); } @@ -501,45 +966,23 @@ struct Interpolator const double freq = double(bx::getHPFrequency() ); int64_t now = bx::getHPCounter(); float time = (float)(double(now - offset) / freq); - float lerp = bx::fclamp(time, 0.0, duration) / duration; - return bx::flerp(from, to, lerp); + float lerp = bx::clamp(time, 0.0f, duration) / duration; + return lerpT(from, to, easeT(lerp) ); } return to; } }; -void help(const char* _error = NULL) +typedef InterpolatorT Interpolator; +typedef InterpolatorT InterpolatorAngle; +typedef InterpolatorT InterpolatorLinear; + +void keyBindingHelp(const char* _bindings, const char* _description) { - if (NULL != _error) - { - fprintf(stderr, "Error:\n%s\n\n", _error); - } - - fprintf(stderr - , "texturev, bgfx texture viewer tool\n" - "Copyright 2011-2017 Branimir Karadzic. All rights reserved.\n" - "License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n\n" - ); - - fprintf(stderr - , "Usage: texturev \n" - "\n" - "Supported input file types:\n" - ); - - for (uint32_t ii = 0; ii < BX_COUNTOF(s_supportedExt); ++ii) - { - fprintf(stderr, " *.%s\n", s_supportedExt[ii]); - } - - fprintf(stderr - , "\n" - "Options:\n" - " --associate Associate file extensions with texturev.\n" - "\n" - "For additional information, see https://github.com/bkaradzic/bgfx\n" - ); + ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), _bindings); + ImGui::SameLine(100); + ImGui::Text(_description); } void associate() @@ -574,13 +1017,12 @@ void associate() bx::stringPrintf(str, "[HKEY_CURRENT_USER\\Software\\Classes\\.%s]\r\n@=\"texturev\"\r\n\r\n", ext); } - char temp[MAX_PATH]; - GetTempPathA(MAX_PATH, temp); - strcat(temp, "\\texturev.reg"); + bx::FilePath filePath(bx::Dir::Temp); + filePath.join("texture.reg"); - bx::CrtFileWriter writer; + bx::FileWriter writer; bx::Error err; - if (bx::open(&writer, temp, false, &err) ) + if (bx::open(&writer, filePath, false, &err) ) { bx::write(&writer, str.c_str(), uint32_t(str.length()), &err); bx::close(&writer); @@ -588,10 +1030,10 @@ void associate() if (err.isOk() ) { std::string cmd; - bx::stringPrintf(cmd, "regedit.exe /s %s", temp); + bx::stringPrintf(cmd, "/s %s", filePath.get() ); bx::ProcessReader reader; - if (bx::open(&reader, cmd.c_str(), &err) ) + if (bx::open(&reader, "regedit.exe", cmd.c_str(), &err) ) { bx::close(&reader); } @@ -609,7 +1051,7 @@ void associate() str += "\n"; - bx::CrtFileWriter writer; + bx::FileWriter writer; bx::Error err; if (bx::open(&writer, "/tmp/texturev.sh", false, &err) ) { @@ -619,7 +1061,7 @@ void associate() if (err.isOk() ) { bx::ProcessReader reader; - if (bx::open(&reader, "/bin/bash /tmp/texturev.sh", &err) ) + if (bx::open(&reader, "/bin/bash", "/tmp/texturev.sh", &err) ) { bx::close(&reader); } @@ -628,19 +1070,68 @@ void associate() #endif // BX_PLATFORM_WINDOWS } +void help(const char* _error = NULL) +{ + if (NULL != _error) + { + fprintf(stderr, "Error:\n%s\n\n", _error); + } + + fprintf(stderr + , "texturev, bgfx texture viewer tool, version %d.%d.%d.\n" + "Copyright 2011-2018 Branimir Karadzic. All rights reserved.\n" + "License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n\n" + , BGFX_TEXTUREV_VERSION_MAJOR + , BGFX_TEXTUREV_VERSION_MINOR + , BGFX_API_VERSION + ); + + fprintf(stderr + , "Usage: texturev \n" + "\n" + "Supported input file types:\n" + ); + + for (uint32_t ii = 0; ii < BX_COUNTOF(s_supportedExt); ++ii) + { + fprintf(stderr, " *.%s\n", s_supportedExt[ii]); + } + + fprintf(stderr + , "\n" + "Options:\n" + " -h, --help Help.\n" + " -v, --version Version information only.\n" + " --associate Associate file extensions with texturev.\n" + "\n" + "For additional information, see https://github.com/bkaradzic/bgfx\n" + ); +} + int _main_(int _argc, char** _argv) { bx::CommandLine cmdLine(_argc, _argv); + if (cmdLine.hasArg('v', "version") ) + { + fprintf(stderr + , "texturev, bgfx texture viewer tool, version %d.%d.%d.\n" + , BGFX_TEXTUREV_VERSION_MAJOR + , BGFX_TEXTUREV_VERSION_MINOR + , BGFX_API_VERSION + ); + return bx::kExitSuccess; + } + if (cmdLine.hasArg('h', "help") ) { help(); - return EXIT_FAILURE; + return bx::kExitFailure; } else if (cmdLine.hasArg("associate") ) { associate(); - return EXIT_FAILURE; + return bx::kExitFailure; } uint32_t width = 1280; @@ -654,121 +1145,432 @@ int _main_(int _argc, char** _argv) View view; cmdAdd("view", cmdView, &view); + entry::setWindowFlags(entry::WindowHandle{0}, ENTRY_WINDOW_FLAG_ASPECT_RATIO, false); + bgfx::init(); bgfx::reset(width, height, reset); // Set view 0 clear state. - bgfx::setViewClear(0 + bgfx::setViewClear(BACKGROUND_VIEW_ID , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH - , 0x101010ff + , 0x000000ff , 1.0f , 0 ); imguiCreate(); - PosUvColorVertex::init(); + PosUvwColorVertex::init(); - bgfx::RendererType::Enum type = bgfx::getRendererType(); + const bgfx::Caps* caps = bgfx::getCaps(); + bgfx::RendererType::Enum type = caps->rendererType; + + bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); + bgfx::UniformHandle u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Mat4); + bgfx::UniformHandle u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4); bgfx::ShaderHandle vsTexture = bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_texture"); bgfx::ShaderHandle fsTexture = bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_texture"); bgfx::ShaderHandle fsTextureArray = bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_texture_array"); bgfx::ProgramHandle textureProgram = bgfx::createProgram( - vsTexture - , fsTexture - , true - ); + vsTexture + , fsTexture + , true + ); bgfx::ProgramHandle textureArrayProgram = bgfx::createProgram( - vsTexture - , bgfx::isValid(fsTextureArray) - ? fsTextureArray - : fsTexture - , true - ); + vsTexture + , bgfx::isValid(fsTextureArray) + ? fsTextureArray + : fsTexture + , true + ); bgfx::ProgramHandle textureCubeProgram = bgfx::createProgram( - bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_texture_cube") - , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_texture_cube") - , true + bgfx::createEmbeddedShader(s_embeddedShaders, type, "vs_texture_cube") + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_texture_cube") + , true + ); + + bgfx::ProgramHandle textureCube2Program = bgfx::createProgram( + vsTexture + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_texture_cube2") + , true + ); + + bgfx::ProgramHandle textureSdfProgram = bgfx::createProgram( + vsTexture + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_texture_sdf") + , true + ); + + bgfx::ProgramHandle textureMsdfProgram = bgfx::createProgram( + vsTexture + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_texture_msdf") + , true + ); + + bgfx::ProgramHandle texture3DProgram = bgfx::createProgram( + vsTexture + , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_texture_3d") + , true + ); + + const uint32_t checkerBoardSize = 64; + bgfx::TextureHandle checkerBoard; + { + const bgfx::Memory* mem = bgfx::alloc(checkerBoardSize*checkerBoardSize*4); + bimg::imageCheckerboard(mem->data, checkerBoardSize, checkerBoardSize, 8, 0xff8e8e8e, 0xff5d5d5d); + checkerBoard = bgfx::createTexture2D(checkerBoardSize, checkerBoardSize, false, 1 + , bgfx::TextureFormat::BGRA8 + , 0 + | BGFX_TEXTURE_MIN_POINT + | BGFX_TEXTURE_MIP_POINT + | BGFX_TEXTURE_MAG_POINT + , mem ); - - bgfx::ProgramHandle textureSDFProgram = bgfx::createProgram( - vsTexture - , bgfx::createEmbeddedShader(s_embeddedShaders, type, "fs_texture_sdf") - , true); - - bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); - bgfx::UniformHandle u_mtx = bgfx::createUniform("u_mtx", bgfx::UniformType::Mat4); - bgfx::UniformHandle u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4); + } float speed = 0.37f; float time = 0.0f; Interpolator mip(0.0f); Interpolator layer(0.0f); + InterpolatorLinear ev(0.0f); Interpolator zoom(1.0f); Interpolator scale(1.0f); + Interpolator posx(0.0f); + Interpolator posy(0.0f); + InterpolatorAngle angle(0.0f); + InterpolatorAngle angx(0.0f); + InterpolatorAngle angy(0.0f); const char* filePath = _argc < 2 ? "" : _argv[1]; - bool directory = false; - - bx::FileInfo fi; - bx::stat(filePath, fi); - directory = bx::FileInfo::Directory == fi.m_type; std::string path = filePath; - if (!directory) { - const char* fileName = directory ? filePath : bx::baseName(filePath); - path.assign(filePath, fileName); - view.updateFileList(path.c_str(), fileName); - } - else - { - view.updateFileList(path.c_str() ); + bx::FilePath fp(filePath); + view.updateFileList(fp); } - int exitcode = EXIT_SUCCESS; + int exitcode = bx::kExitSuccess; bgfx::TextureHandle texture = BGFX_INVALID_HANDLE; - if (view.m_fileList.empty() ) - { - exitcode = EXIT_FAILURE; - if (2 > _argc) - { - help("File path is not specified."); - } - else - { - fprintf(stderr, "Unable to load '%s' texture.\n", filePath); - } - } - else { uint32_t fileIndex = 0; + bool dragging = false; - entry::MouseState mouseState; - while (!entry::processEvents(width, height, debug, reset, &mouseState) ) + entry::WindowState windowState; + entry::MouseState mouseStatePrev; + while (!entry::processWindowEvents(windowState, debug, reset) ) { + const entry::MouseState& mouseState = windowState.m_mouse; + width = windowState.m_width; + height = windowState.m_height; + + if (!windowState.m_dropFile.isEmpty() ) + { + view.updateFileList(windowState.m_dropFile); + windowState.m_dropFile.clear(); + } + imguiBeginFrame(mouseState.m_mx - , mouseState.m_my + , mouseState.m_my , (mouseState.m_buttons[entry::MouseButton::Left ] ? IMGUI_MBUT_LEFT : 0) | (mouseState.m_buttons[entry::MouseButton::Right ] ? IMGUI_MBUT_RIGHT : 0) | (mouseState.m_buttons[entry::MouseButton::Middle] ? IMGUI_MBUT_MIDDLE : 0) - , mouseState.m_mz - , uint16_t(width) - , uint16_t(height) + , mouseState.m_mz + , uint16_t(width) + , uint16_t(height) ); static bool help = false; - - if (help == false - && help != view.m_help) + static bool mouseDelta = false; + if (!mouseDelta) { - ImGui::OpenPopup("Help"); + mouseStatePrev = mouseState; + mouseDelta = true; + } + + int32_t zoomDelta = mouseState.m_mz - mouseStatePrev.m_mz; + if (zoomDelta != 0) + { + char exec[64]; + bx::snprintf(exec, BX_COUNTOF(exec), "view zoom %+f", -zoomDelta*0.1f); + cmdExec(exec); + } + + const float xDelta = float(mouseStatePrev.m_mx - mouseState.m_mx); + const float yDelta = float(mouseStatePrev.m_my - mouseState.m_my); + + if (!ImGui::MouseOverArea() + && !help + && mouseState.m_buttons[entry::MouseButton::Left] != mouseStatePrev.m_buttons[entry::MouseButton::Left]) + { + dragging = !!mouseState.m_buttons[entry::MouseButton::Left]; + } + + if (dragging) + { + if (view.m_textureInfo.cubeMap + && Geometry::Quad == view.m_cubeMapGeo) + { + char exec[64]; + bx::snprintf(exec, BX_COUNTOF(exec), "view cubemap %+f %+f", -yDelta, -xDelta); + cmdExec(exec); + } + else + { + char exec[64]; + bx::snprintf(exec, BX_COUNTOF(exec), "view pan %+f %+f", xDelta, yDelta); + cmdExec(exec); + } + } + + mouseStatePrev = mouseState; + + if (ImGui::BeginPopupContextVoid("Menu") ) + { + if (ImGui::MenuItem("Files", NULL, view.m_files) ) + { + cmdExec("view files"); + } + + if (ImGui::MenuItem("Info", NULL, view.m_info) ) + { + cmdExec("view info"); + } + +// if (ImGui::MenuItem("Save As") ) + { + } + + if (ImGui::MenuItem("Reset") ) + { + cmdExec(s_resetCmd); + } + + ImGui::Separator(); + if (ImGui::BeginMenu("Options")) + { + bool filter = view.m_filter; + if (ImGui::MenuItem("Filter", NULL, &filter) ) + { + cmdExec("view filter"); + } + + bool animate = 0.0f < view.m_transitionTime; + if (ImGui::MenuItem("Animate", NULL, &animate) ) + { + cmdExec("view transition %f", animate ? 1.0f : 0.0f); + } + + if (ImGui::BeginMenu("Cubemap", view.m_textureInfo.cubeMap) ) + { + if (ImGui::MenuItem("Quad", NULL, Geometry::Quad == view.m_cubeMapGeo) ) + { + cmdExec("view geo quad"); + } + + if (ImGui::MenuItem("Cross", NULL, Geometry::Cross == view.m_cubeMapGeo) ) + { + cmdExec("view geo cross"); + } + + if (ImGui::MenuItem("Hexagon", NULL, Geometry::Hexagon == view.m_cubeMapGeo) ) + { + cmdExec("view geo hexagon"); + } + + ImGui::EndMenu(); + } + + bool sdf = view.m_sdf; + if (ImGui::MenuItem("SDF", NULL, &sdf) ) + { + cmdExec("view sdf"); + } + + bool rr = 0 != (view.m_abgr & 0x000000ff); + if (ImGui::MenuItem("R", NULL, &rr) ) + { + cmdExec("view rgb r"); + } + + bool gg = 0 != (view.m_abgr & 0x0000ff00); + if (ImGui::MenuItem("G", NULL, &gg) ) + { + cmdExec("view rgb g"); + } + + bool bb = 0 != (view.m_abgr & 0x00ff0000); + if (ImGui::MenuItem("B", NULL, &bb) ) + { + cmdExec("view rgb b"); + } + + bool alpha = view.m_alpha; + if (ImGui::MenuItem("Checkerboard", NULL, &alpha) ) + { + cmdExec("view rgb a"); + } + + ImGui::Separator(); + + if (ImGui::MenuItem("Save Options") ) + { + cmdExec("view save"); + } + + ImGui::EndMenu(); + } + + ImGui::Separator(); + if (ImGui::MenuItem("Help") ) + { + cmdExec("view help"); + } + + ImGui::Separator(); + if (ImGui::MenuItem("Exit") ) + { + cmdExec("exit"); + } + + ImGui::EndPopup(); + } + + if (help != view.m_help) + { + if (!help) + { + ImGui::OpenPopup("Help"); + inputRemoveBindings(s_bindingName[Binding::View]); + inputAddBindings(s_bindingName[Binding::Help], s_binding[Binding::Help]); + } + else + { + inputRemoveBindings(s_bindingName[Binding::Help]); + inputAddBindings(s_bindingName[Binding::View], s_binding[Binding::View]); + } + + help = view.m_help; + } + + if (view.m_info) + { + ImGui::SetNextWindowSize( + ImVec2(300.0f, 300.0f) + , ImGuiCond_FirstUseEver + ); + + if (ImGui::Begin("Info", NULL, ImGuiWindowFlags_AlwaysAutoResize) ) + { + if (ImGui::BeginChild("##info", ImVec2(0.0f, 0.0f) ) ) + { + if (!bgfx::isValid(texture) ) + { + ImGui::Text("Texture is not loaded."); + } + else + { + ImGui::Text("Dimensions: %d x %d" + , view.m_textureInfo.width + , view.m_textureInfo.height + ); + + ImGui::Text("Format: %s" + , bimg::getName(bimg::TextureFormat::Enum(view.m_textureInfo.format) ) + ); + + ImGui::SliderInt("Layer", (int32_t*)&view.m_layer, 0, view.m_textureInfo.numLayers - 1); + ImGui::SliderInt("Mip", (int32_t*)&view.m_mip, 0, view.m_textureInfo.numMips - 1); + + ImGui::Separator(); + + ImGui::Checkbox("Input linear", &view.m_inLinear); + ImGui::RangeSliderFloat("EV range", &view.m_evMin, &view.m_evMax, kEvMin, kEvMax); + ImGui::SliderFloat("EV", &view.m_ev, view.m_evMin, view.m_evMax); + + ImGui::Separator(); + + ImGui::Checkbox("Fit to window", &view.m_fit); + ImGui::SliderFloat("Scale", &view.m_zoom, 0.01f, 10.0f); + } + + ImGui::EndChild(); + } + + ImGui::End(); + } + } + + if (view.m_files) + { + char temp[bx::kMaxFilePath]; + bx::snprintf(temp, BX_COUNTOF(temp), "%s##File", view.m_path.get() ); + + ImGui::SetNextWindowSize( + ImVec2(400.0f, 400.0f) + , ImGuiCond_FirstUseEver + ); + + if (ImGui::Begin(temp, NULL) ) + { + if (ImGui::BeginChild("##file_list", ImVec2(0.0f, 0.0f) ) ) + { + ImGui::PushFont(ImGui::Font::Mono); + const float itemHeight = ImGui::GetTextLineHeightWithSpacing(); + const float listHeight = + bx::max(1.0f, bx::floor(ImGui::GetWindowHeight()/itemHeight) ) + * itemHeight + ; + + ImGui::PushItemWidth(-1); + if (ImGui::ListBoxHeader("##empty", ImVec2(0.0f, listHeight) ) ) + { + const int32_t itemCount = int32_t(view.m_fileList.size() ); + + int32_t start, end; + ImGui::CalcListClipping(itemCount, itemHeight, &start, &end); + + const int32_t index = int32_t(view.m_fileIndex); + if (index <= start) + { + ImGui::SetScrollY(ImGui::GetScrollY() - (start-index+1)*itemHeight); + } + else if (index >= end) + { + ImGui::SetScrollY(ImGui::GetScrollY() + (index-end+1)*itemHeight); + } + + ImGuiListClipper clipper(itemCount, itemHeight); + + for (int32_t pos = clipper.DisplayStart; pos < clipper.DisplayEnd; ++pos) + { + ImGui::PushID(pos); + + bool isSelected = uint32_t(pos) == view.m_fileIndex; + if (ImGui::Selectable(view.m_fileList[pos].c_str(), &isSelected) ) + { + view.m_fileIndex = pos; + } + + ImGui::PopID(); + } + + clipper.End(); + + ImGui::ListBoxFooter(); + } + + ImGui::PopFont(); + ImGui::EndChild(); + } + + ImGui::End(); + } } if (ImGui::BeginPopupModal("Help", NULL, ImGuiWindowFlags_AlwaysAutoResize) ) @@ -776,9 +1578,12 @@ int _main_(int _argc, char** _argv) ImGui::SetWindowFontScale(1.0f); ImGui::Text( - "texturev, bgfx texture viewer tool " ICON_KI_WRENCH "\n" - "Copyright 2011-2017 Branimir Karadzic. All rights reserved.\n" + "texturev, bgfx texture viewer tool " ICON_KI_WRENCH ", version %d.%d.%d.\n" + "Copyright 2011-2018 Branimir Karadzic. All rights reserved.\n" "License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n" + , BGFX_TEXTUREV_VERSION_MAJOR + , BGFX_TEXTUREV_VERSION_MINOR + , BGFX_API_VERSION ); ImGui::Separator(); ImGui::NextLine(); @@ -786,38 +1591,41 @@ int _main_(int _argc, char** _argv) ImGui::Text("Key bindings:\n\n"); ImGui::PushFont(ImGui::Font::Mono); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "ESC"); ImGui::SameLine(64); ImGui::Text("Exit."); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "h"); ImGui::SameLine(64); ImGui::Text("Toggle help screen."); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "f"); ImGui::SameLine(64); ImGui::Text("Toggle full-screen."); + keyBindingHelp("ESC", "Exit."); + keyBindingHelp("h", "Toggle help screen."); + keyBindingHelp("f", "Toggle full-screen."); ImGui::NextLine(); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "-"); ImGui::SameLine(64); ImGui::Text("Zoom out."); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "="); ImGui::SameLine(64); ImGui::Text("Zoom in."); + keyBindingHelp("LMB+drag", "Pan."); + keyBindingHelp("=/- or MW", "Zoom in/out."); + keyBindingHelp("z/Z", "Rotate."); + keyBindingHelp("0", "Reset."); + keyBindingHelp("1", "Fit to window."); ImGui::NextLine(); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), ","); ImGui::SameLine(64); ImGui::Text("MIP level up."); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "."); ImGui::SameLine(64); ImGui::Text("MIP level down."); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "/"); ImGui::SameLine(64); ImGui::Text("Toggle linear/point texture sampling."); + keyBindingHelp("<", "Reset MIP level."); + keyBindingHelp(",/,", "MIP level up/down."); + keyBindingHelp("/", "Toggle linear/point texture sampling."); + keyBindingHelp("[space]", "Change cubemap mode."); ImGui::NextLine(); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "left"); ImGui::SameLine(64); ImGui::Text("Previous layer in texture array."); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "right"); ImGui::SameLine(64); ImGui::Text("Next layer in texture array."); + keyBindingHelp("left", "Previous layer in texture array."); + keyBindingHelp("right", "Next layer in texture array."); ImGui::NextLine(); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "up"); ImGui::SameLine(64); ImGui::Text("Previous texture."); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "down"); ImGui::SameLine(64); ImGui::Text("Next texture."); + keyBindingHelp("up", "Previous texture."); + keyBindingHelp("down", "Next texture."); ImGui::NextLine(); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "r/g/b"); ImGui::SameLine(64); ImGui::Text("Toggle R, G, or B color channel."); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "a"); ImGui::SameLine(64); ImGui::Text("Toggle alpha blending."); + keyBindingHelp("r/g/b", "Toggle R, G, or B color channel."); + keyBindingHelp("a", "Toggle alpha blending."); ImGui::NextLine(); - ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "s"); ImGui::SameLine(64); ImGui::Text("Toggle Multi-channel SDF rendering"); + keyBindingHelp("s", "Toggle Multi-channel SDF rendering"); + ImGui::NextLine(); ImGui::PopFont(); - ImGui::NextLine(); - ImGui::Dummy(ImVec2(0.0f, 0.0f) ); ImGui::SameLine(ImGui::GetWindowWidth() - 136.0f); if (ImGui::Button("Close", ImVec2(128.0f, 0.0f) ) @@ -830,40 +1638,73 @@ int _main_(int _argc, char** _argv) ImGui::EndPopup(); } - help = view.m_help; - imguiEndFrame(); - if (!bgfx::isValid(texture) - || view.m_fileIndex != fileIndex) + if ( (!bgfx::isValid(texture) || view.m_fileIndex != fileIndex) + && 0 != view.m_fileList.size() ) { if (bgfx::isValid(texture) ) { - bgfx::destroyTexture(texture); + bgfx::destroy(texture); } fileIndex = view.m_fileIndex; - filePath = view.m_fileList[view.m_fileIndex].c_str(); + bx::FilePath fp = view.m_path; + fp.join(view.m_fileList[view.m_fileIndex].c_str() ); - texture = loadTexture(filePath - , 0 - | BGFX_TEXTURE_U_CLAMP - | BGFX_TEXTURE_V_CLAMP - | BGFX_TEXTURE_W_CLAMP - , 0 - , &view.m_info - ); + bimg::Orientation::Enum orientation; + texture = loadTexture(fp.get() + , 0 + | BGFX_TEXTURE_U_CLAMP + | BGFX_TEXTURE_V_CLAMP + | BGFX_TEXTURE_W_CLAMP + , 0 + , &view.m_textureInfo + , &orientation + ); + + view.m_inLinear = bimg::isFloat(bimg::TextureFormat::Enum(view.m_textureInfo.format) ); + + switch (orientation) + { + default: + case bimg::Orientation::R0: cmdExec("view orientation\nview orientation z 0"); break; + case bimg::Orientation::R90: cmdExec("view orientation\nview orientation z -90"); break; + case bimg::Orientation::R180: cmdExec("view orientation\nview orientation z -180"); break; + case bimg::Orientation::R270: cmdExec("view orientation\nview orientation z -270"); break; + case bimg::Orientation::HFlip: cmdExec("view orientation\nview orientation x -180"); break; + case bimg::Orientation::HFlipR90: cmdExec("view orientation\nview orientation z -90\nview orientation x -180"); break; + case bimg::Orientation::HFlipR270: cmdExec("view orientation\nview orientation z -270\nview orientation x -180"); break; + case bimg::Orientation::VFlip: cmdExec("view orientation\nview orientation y -180"); break; + } std::string title; if (isValid(texture) ) { - bx::stringPrintf(title, "%s (%d x %d%s, %s)" - , filePath - , view.m_info.width - , view.m_info.height - , view.m_info.cubeMap ? " CubeMap" : "" - , bimg::getName(bimg::TextureFormat::Enum(view.m_info.format) ) + const char* name = ""; + if (view.m_textureInfo.cubeMap) + { + name = " CubeMap"; + } + else if (1 < view.m_textureInfo.depth) + { + name = " 3D"; + view.m_textureInfo.numLayers = view.m_textureInfo.depth; + } + else if (1 < view.m_textureInfo.numLayers) + { + name = " 2D Array"; + } + + bx::stringPrintf(title, "%s (%d x %d%s, mips: %d, layers %d, %s)" + , fp.get() + , view.m_textureInfo.width + , view.m_textureInfo.height + , name + , view.m_textureInfo.numMips + , view.m_textureInfo.numLayers + , bimg::getName(bimg::TextureFormat::Enum(view.m_textureInfo.format) ) ); } else @@ -882,62 +1723,180 @@ int _main_(int _argc, char** _argv) time += (float)(frameTime*speed/freq); + float transitionTime = dragging ? 0.0f : 0.25f*view.m_transitionTime; + + posx.set(view.m_posx, transitionTime); + posy.set(view.m_posy, transitionTime); + float ortho[16]; - bx::mtxOrtho(ortho, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f); - bgfx::setViewTransform(0, NULL, ortho); - bgfx::setViewRect(0, 0, 0, uint16_t(width), uint16_t(height) ); - bgfx::touch(0); + + bx::mtxOrtho( + ortho + , 0.0f + , float(width) + , float(height) + , 0.0f + , 0.0f + , 1000.0f + , 0.0f + , caps->homogeneousDepth + ); + bgfx::setViewTransform(BACKGROUND_VIEW_ID, NULL, ortho); + bgfx::setViewRect(BACKGROUND_VIEW_ID, 0, 0, uint16_t(width), uint16_t(height) ); + + setGeometry(Geometry::Quad + , 0 + , 0 + , width + , height + , view.m_alpha || !bgfx::isValid(texture) ? UINT32_MAX : 0 + , float(width )/float(checkerBoardSize) + , float(height)/float(checkerBoardSize) + ); + bgfx::setTexture(0 + , s_texColor + , checkerBoard + ); + bgfx::setState(0 + | BGFX_STATE_RGB_WRITE + | BGFX_STATE_ALPHA_WRITE + ); + bgfx::submit(BACKGROUND_VIEW_ID + , textureProgram + ); + + float px = posx.getValue(); + float py = posy.getValue(); + bx::mtxOrtho( + ortho + , px-width/2.0f + , px+width/2.0f + , py+height/2.0f + , py-height/2.0f + , -10.0f + , 10.0f + , 0.0f + , caps->homogeneousDepth + ); + bgfx::setViewTransform(IMAGE_VIEW_ID, NULL, ortho); + bgfx::setViewRect(IMAGE_VIEW_ID, 0, 0, uint16_t(width), uint16_t(height) ); bgfx::dbgTextClear(); - scale.set( - bx::fmin( float(width) / float(view.m_info.width) - , float(height) / float(view.m_info.height) - ) - , 0.1f - ); - zoom.set(view.m_zoom, 0.25); + float orientation[16]; + bx::mtxRotateXYZ(orientation, view.m_flipH, view.m_flipV, angle.getValue()+view.m_orientation); - float ss = scale.getValue() * zoom.getValue(); + if (view.m_fit) + { + float wh[3] = { float(view.m_textureInfo.width), float(view.m_textureInfo.height), 0.0f }; + float result[3]; + bx::vec3MulMtx(result, wh, orientation); + result[0] = bx::round(bx::abs(result[0]) ); + result[1] = bx::round(bx::abs(result[1]) ); - screenQuad( int(width - view.m_info.width * ss)/2 - , int(height - view.m_info.height * ss)/2 - , int(view.m_info.width * ss) - , int(view.m_info.height * ss) + scale.set(bx::min(float(width) / result[0] + , float(height) / result[1]) + , 0.1f*view.m_transitionTime + ); + } + else + { + scale.set(1.0f, 0.1f*view.m_transitionTime); + } + + zoom.set(view.m_zoom, transitionTime); + angle.set(view.m_angle, transitionTime); + angx.set(view.m_angx, transitionTime); + angy.set(view.m_angy, transitionTime); + + float ss = scale.getValue() + * zoom.getValue() + ; + + setGeometry(view.m_textureInfo.cubeMap ? view.m_cubeMapGeo : Geometry::Quad + , -int(view.m_textureInfo.width * ss)/2 + , -int(view.m_textureInfo.height * ss)/2 + , int(view.m_textureInfo.width * ss) + , int(view.m_textureInfo.height * ss) , view.m_abgr ); + bgfx::setTransform(orientation); + float mtx[16]; - bx::mtxRotateXY(mtx, 0.0f, time); + bx::mtxRotateXY(mtx, angx.getValue(), angy.getValue() ); bgfx::setUniform(u_mtx, mtx); - mip.set(float(view.m_mip), 0.5f); - layer.set(float(view.m_layer), 0.25f); + mip.set(float(view.m_mip), 0.5f*view.m_transitionTime); + layer.set(float(view.m_layer), 0.25f*view.m_transitionTime); + ev.set(view.m_ev, 0.5f*view.m_transitionTime); + + float params[4] = { mip.getValue(), layer.getValue(), view.m_inLinear ? 1.0f : 0.0f, ev.getValue() }; + if (1 < view.m_textureInfo.depth) + { + params[1] = layer.getValue()/view.m_textureInfo.depth; + } - float params[4] = { mip.getValue(), layer.getValue(), 0.0f, 0.0f }; bgfx::setUniform(u_params, params); + const uint32_t textureFlags = 0 + | BGFX_TEXTURE_U_CLAMP + | BGFX_TEXTURE_V_CLAMP + | BGFX_TEXTURE_W_CLAMP + | (view.m_filter ? 0 : 0 + | BGFX_TEXTURE_MIN_POINT + | BGFX_TEXTURE_MIP_POINT + | BGFX_TEXTURE_MAG_POINT + ) + ; + bgfx::setTexture(0 , s_texColor , texture - , view.m_filter - ? BGFX_TEXTURE_NONE - : 0 - | BGFX_TEXTURE_MIN_POINT - | BGFX_TEXTURE_MIP_POINT - | BGFX_TEXTURE_MAG_POINT + , textureFlags ); bgfx::setState(0 | BGFX_STATE_RGB_WRITE | BGFX_STATE_ALPHA_WRITE | (view.m_alpha ? BGFX_STATE_BLEND_ALPHA : BGFX_STATE_NONE) ); - bgfx::submit(0 - , view.m_info.cubeMap ? textureCubeProgram - : 1 < view.m_info.numLayers ? textureArrayProgram - : view.m_sdf ? textureSDFProgram - : textureProgram - ); + + bgfx:: ProgramHandle program = textureProgram; + if (1 < view.m_textureInfo.depth) + { + program = texture3DProgram; + } + else if (view.m_textureInfo.cubeMap) + { + program = Geometry::Quad == view.m_cubeMapGeo + ? textureCubeProgram + : textureCube2Program + ; + } + else if (1 < view.m_textureInfo.numLayers) + { + program = textureArrayProgram; + } + else if (view.m_sdf) + { + if (8 < bimg::getBitsPerPixel(bimg::TextureFormat::Enum(view.m_textureInfo.format) ) ) + { + program = textureMsdfProgram; + } + else + { + program = textureSdfProgram; + } + } + + if (bgfx::isValid(texture) ) + { + bgfx::submit(IMAGE_VIEW_ID, program); + } + else + { + bgfx::discard(); + } bgfx::frame(); } @@ -945,14 +1904,20 @@ int _main_(int _argc, char** _argv) if (bgfx::isValid(texture) ) { - bgfx::destroyTexture(texture); + bgfx::destroy(texture); } - bgfx::destroyUniform(s_texColor); - bgfx::destroyUniform(u_mtx); - bgfx::destroyUniform(u_params); - bgfx::destroyProgram(textureProgram); - bgfx::destroyProgram(textureArrayProgram); - bgfx::destroyProgram(textureCubeProgram); + + bgfx::destroy(checkerBoard); + bgfx::destroy(s_texColor); + bgfx::destroy(u_mtx); + bgfx::destroy(u_params); + bgfx::destroy(textureProgram); + bgfx::destroy(textureArrayProgram); + bgfx::destroy(textureCubeProgram); + bgfx::destroy(textureCube2Program); + bgfx::destroy(textureSdfProgram); + bgfx::destroy(textureMsdfProgram); + bgfx::destroy(texture3DProgram); imguiDestroy(); diff --git a/3rdparty/bgfx/tools/texturev/varying.def.sc b/3rdparty/bgfx/tools/texturev/varying.def.sc index 41b4dbd..aeb964a 100644 --- a/3rdparty/bgfx/tools/texturev/varying.def.sc +++ b/3rdparty/bgfx/tools/texturev/varying.def.sc @@ -1,8 +1,6 @@ -vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); -vec3 v_normal : NORMAL = vec3(0.0, 0.0, 1.0); -vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); +vec4 v_color0 : COLOR0 = vec4(1.0, 1.0, 1.0, 1.0); +vec3 v_texcoord0 : TEXCOORD0 = vec3(0.0, 0.0, 0.0); vec3 a_position : POSITION; -vec4 a_normal : NORMAL; vec4 a_color0 : COLOR0; -vec2 a_texcoord0 : TEXCOORD0; +vec3 a_texcoord0 : TEXCOORD0; diff --git a/3rdparty/bgfx/tools/texturev/vs_texture.bin.h b/3rdparty/bgfx/tools/texturev/vs_texture.bin.h index 8861488..160baf5 100644 --- a/3rdparty/bgfx/tools/texturev/vs_texture.bin.h +++ b/3rdparty/bgfx/tools/texturev/vs_texture.bin.h @@ -1,144 +1,354 @@ -static const uint8_t vs_texture_glsl[419] = +static const uint8_t vs_texture_glsl[434] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, 0x83, 0x01, 0x00, 0x00, 0x61, // wProj..........a - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v - 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, 0x74, // ec4 a_color0;.at - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // tribute highp ve - 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x61, // c3 a_position;.a - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // ttribute highp v - 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, // ec2 a_texcoord0; - 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, // .varying highp v - 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, // ec4 v_color0;.va - 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, // rying highp vec2 - 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, // v_texcoord0;.un - 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x6d, 0x61, 0x74, 0x34, // iform highp mat4 - 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, // u_viewProj;.voi - 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, // d main ().{. hi - 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ghp vec4 tmpvar_ - 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, // 1;. tmpvar_1.zw - 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, // = vec2(0.0, 1.0 - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, // );. tmpvar_1.xy - 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, // = a_position.xy - 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, // ;. gl_Position - 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, // = (u_viewProj * - 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, // tmpvar_1);. v_t - 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, // excoord0 = a_tex - 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // coord0;. v_colo - 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, // r0 = a_color0;.} - 0x0a, 0x0a, 0x00, // ... + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0x8d, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color + 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig + 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // hp vec3 a_positi + 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // on;.attribute hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ghp vec3 a_texco + 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, // ord0;.varying hi + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 v_color + 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.varying highp + 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec3 v_texcoord + 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.uniform highp + 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // mat4 u_modelVie + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // wProj;.void main + 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, // ().{. highp ve + 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, // c4 tmpvar_1;. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, // mpvar_1.zw = vec + 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, // 2(0.0, 1.0);. t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, // mpvar_1.xy = a_p + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, // osition.xy;. gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x6d, // _Position = (u_m + 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, // odelViewProj * t + 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, // mpvar_1);. v_te + 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // xcoord0 = a_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // oord0;. v_color + 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, // 0 = a_color0;.}. + 0x0a, 0x00, // .. }; -static const uint8_t vs_texture_dx9[330] = +static const uint8_t vs_texture_spv[3189] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x2c, 0x01, 0x00, 0x03, 0xfe, // wProj......,.... - 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. - 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ - 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... - 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP - 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // roj............. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr - 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 - 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. - 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ................ - 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ................ - 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // .......U........ - 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ - 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, // ................ - 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0x50, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, // P.....#......... + 0x37, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // 7b.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // main............ + 0x95, 0x0e, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........v....... + 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ + 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....main........ + 0x78, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // x...Output...... + 0x78, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // x.......gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x78, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ion.....x....... + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // v_color0........ + 0x78, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // x.......v_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0x9e, 0x15, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // rd0.........@mai + 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, // n(vf4;vf3;vf3;.. + 0x05, 0x00, 0x05, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....O...a_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // ........:...a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb9, 0x4d, 0x00, 0x00, // sition.......M.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, // ...._varying_... + 0x05, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ........$Global. + 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // ewRect.......... + 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. + 0x06, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ............u_vi + 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew.............. + 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... + 0x00, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ........u_proj.. + 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, // vProj........... + 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. + 0x06, 0x00, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ............u_in + 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... + 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // ........u_model. + 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x00, 0x09, 0x00, 0x00, // delView......... + 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP + 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj............. + 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, // u_alphaRef4..... + 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, // B............A.. + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_color0........ + 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ....a_color0.... + 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // .....?..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // on..........a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, // sition......@,.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // ....a_texcoord0. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m........8..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x76, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // v...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. + 0x05, 0x00, 0x0a, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // ........@entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // intOutput.v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x08, 0x04, 0x00, 0x00, // oord0...G....... + 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ....@...H....... + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........#....... + 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0x00, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x00, 0x09, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0x00, 0x09, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x00, 0x09, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ + 0x48, 0x00, 0x04, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H............... + 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...........#... + 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H........... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, // ........H....... + 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... + 0x00, 0x09, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ........G...B... + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, // ".......G....... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, // ........G....... + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, // ........G...v... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ + 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... + 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x78, 0x04, 0x00, 0x00, // ............x... + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, // ............!... + 0x44, 0x09, 0x00, 0x00, 0x78, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, // D...x........... + 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xf5, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x78, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // x........... ... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x80, 0x3f, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, // ...?,........... + 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ................ + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // +............... + 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... + 0x2c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ,.......,....... + 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... + 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... + 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // .......+....... + 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x08, 0x04, 0x00, 0x00, // j... ........... + 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x00, 0x09, 0x00, 0x00, // e...j........... + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ........e...e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0x08, 0x04, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....e...e....... + 0x20, 0x00, 0x04, 0x00, 0x7d, 0x0b, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, // ...}........... + 0x3b, 0x00, 0x04, 0x00, 0x7d, 0x0b, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ;...}...B....... + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // +.......)....... + 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ...........e... + 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... + 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... + 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;.......v....... + 0x20, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;............... + 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... + 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ........Sa..;... + 0xf5, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... + 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....U......;... + 0x95, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....8......;... + 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ............=... + 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....A......=... + 0x18, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....?......=... + 0x18, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ....@,......>... + 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x38, 0x00, 0x00, // .U...A..>....8.. + 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, // .?..>.......@,.. + 0x39, 0x00, 0x07, 0x00, 0x78, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x9e, 0x15, 0x00, 0x00, // 9...x...I&...... + 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .U...8......>... + 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....I&..A....... + 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // T4..........=... + 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ........T4..>... + 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........A....... + 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .@..........=... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .... ....@..>... + 0x76, 0x13, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, // v... ...A....... + 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .@..........=... + 0x18, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .....-...@..>... + 0x8b, 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // .....-......8... + 0x36, 0x00, 0x05, 0x00, 0x78, 0x04, 0x00, 0x00, 0x9e, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6...x........... + 0x44, 0x09, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, // D...7.......O... + 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7.......:...7... + 0x95, 0x02, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x5f, 0x57, 0x00, 0x00, // .....M......_W.. + 0x3b, 0x00, 0x04, 0x00, 0xf5, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x64, 0x2d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A.......d-...... + 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x64, 0x2d, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, // ....>...d-...... + 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A........8...... + 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, // ....>....8..,... + 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x19, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, // =...........:... + 0x4f, 0x00, 0x07, 0x00, 0x13, 0x00, 0x00, 0x00, 0xbe, 0x2f, 0x00, 0x00, 0x10, 0x19, 0x00, 0x00, // O......../...... + 0x10, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, // ............Q... + 0x0d, 0x00, 0x00, 0x00, 0x36, 0x62, 0x00, 0x00, 0xbe, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....6b.../...... + 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x98, 0x1b, 0x00, 0x00, 0xbe, 0x2f, 0x00, 0x00, // Q............/.. + 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, // ....P........2.. + 0x36, 0x62, 0x00, 0x00, 0x98, 0x1b, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // 6b.............. + 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, // A.......),..B... + 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, // )...=...e....<.. + 0x29, 0x2c, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, // ),...........;.. + 0x84, 0x32, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, // .2...<..A....... + 0x5f, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // _8..........>... + 0x5f, 0x38, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // _8...;..=....... + 0x1d, 0x21, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, // .!...M..A....... + 0x2d, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // -<..........>... + 0x2d, 0x3c, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // -<...!..=....... + 0x1e, 0x21, 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, // .!..O...A....... + 0x2e, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .<..........>... + 0x2e, 0x3c, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x78, 0x04, 0x00, 0x00, // .<...!..=...x... + 0x47, 0x3a, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, // G:..........G:.. + 0x38, 0x00, 0x01, 0x00, 0x00, // 8.... }; -static const uint8_t vs_texture_dx11[575] = +static const uint8_t vs_texture_dx9[341] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x18, 0x02, 0x44, 0x58, 0x42, // wProj........DXB - 0x43, 0x02, 0x1b, 0xea, 0x24, 0x10, 0xd8, 0x6f, 0x23, 0xf5, 0xf6, 0x01, 0x38, 0x5b, 0x08, 0x13, // C...$..o#...8[.. - 0x4d, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, // M............,.. - 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, // .........ISGNh.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, // ................ - 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .V.............. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........._...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // .COLOR.POSITION. - 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, // TEXCOORD.OSGNl.. - 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... - 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, // ................ - 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........b...... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, // ................ - 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, // .SV_POSITION.COL - 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, // OR.TEXCOORD..SHD - 0x52, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, // R....@...@...Y.. - 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, // .F. ........._.. - 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, // ........._...2.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, // ....._...2...... - 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .g.... ......... - 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .e.... ......e.. - 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, // .2 ......h...... - 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, // .8...........V.. - 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .....F. ........ - 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .2...........F. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, // ................ - 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, // .F............ . - 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, // .....F.......F. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, // .........6.... . - 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, // .....F.......6.. - 0x05, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, // .2 ......F...... - 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // .>...........@. + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... + 0x30, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, // 0.........$.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x36, 0x2e, 0x33, 0x2e, 0x39, 0x36, // Compiler 6.3.96 + 0x30, 0x30, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0xab, 0xab, 0x1f, 0x00, 0x00, 0x02, // 00.16384........ + 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ + 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ + 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, // ................ + 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, // ..U............. + 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, // ................ + 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x07, 0xe0, 0x02, 0x00, 0xe4, 0x90, // ................ + 0xff, 0xff, 0x00, 0x00, 0x00, // ..... }; -static const uint8_t vs_texture_mtl[757] = +static const uint8_t vs_texture_dx11[582] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xe6, 0x02, 0x00, 0x00, 0x75, 0x73, // VSH...........us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . float4 a_colo - 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, // r0 [[attribute(0 - 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, // )]];. float3 a_ - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, // position [[attri - 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // bute(1)]];. flo - 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, // at2 a_texcoord0 - 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, // [[attribute(2)]] - 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // ;.};.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput - 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // {. float4 gl_Po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // sition [[positio - 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, // n]];. float4 v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, // color0;. float2 - 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, // v_texcoord0;.}; - 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // .struct xlatMtlS - 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, // haderUniform {. - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // float4x4 u_view - 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, // Proj;.};.vertex - 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut - 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain - 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, // (xlatMtlShaderIn - 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // put _mtl_i [[sta - 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan - 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, // t xlatMtlShaderU - 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, // niform& _mtl_u [ - 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, // [buffer(0)]]).{. - 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // xlatMtlShaderO - 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, // utput _mtl_o;. - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, // float4 tmpvar_1; - 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, // . tmpvar_1.zw = - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, // float2(0.0, 1.0 - 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, // );. tmpvar_1.xy - 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, // = _mtl_i.a_posi - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // tion.xy;. _mtl_ - 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, // o.gl_Position = - 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, // (_mtl_u.u_viewPr - 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, // oj * tmpvar_1);. - 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // _mtl_o.v_texco - 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, // ord0 = _mtl_i.a_ - 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, // texcoord0;. _mt - 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x5f, // l_o.v_color0 = _ - 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, // mtl_i.a_color0;. - 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // return _mtl_o; - 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... + 0x18, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0xa1, 0x0d, 0xa3, 0xb8, 0x34, 0x19, 0x93, 0x74, // ....DXBC....4..t + 0x94, 0x6c, 0x61, 0x11, 0xe8, 0x09, 0x5f, 0x2c, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, // .la..._,........ + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, // ....,........... + 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNh........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........V....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, // ................ + 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // _............... + 0x02, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, // SITION.TEXCOORD. + 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGNl........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // b............... + 0x02, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO + 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // RD..SHDR....@... + 0x40, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // @...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._........... + 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _...2......._... + 0x72, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // r.......g.... .. + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // ........e.... .. + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....e...r ...... + 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, // h.......8....... + 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....V.......F. . + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ........2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... + 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ..... ......F... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ....F. ......... + 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F... + 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....6...r ...... + 0x46, 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, // F.......>....... + 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ....@. }; +static const uint8_t vs_texture_mtl[793] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0xf4, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // ....using namesp + 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, // t xlatMtlShaderI + 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // nput {. float4 + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, // a_color0 [[attri + 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // bute(0)]];. flo + 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, // at3 a_position [ + 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, // [attribute(1)]]; + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // . float3 a_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, // oord0 [[attribut + 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // e(2)]];.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, // gl_Position [[p + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // osition]];. flo + 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, // at4 v_color0;. + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // float3 v_texcoor + 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, // d0;.};.struct xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo + 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, // rm {. float4x4 + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, // u_modelViewProj; + 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.vertex xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, // tlShaderOutput x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, // latMtlMain (xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, // MtlShaderInput _ + 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, // mtl_i [[stage_in + 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, // ]], constant xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, // tMtlShaderUnifor + 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, // m& _mtl_u [[buff + 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, // er(0)]]).{. xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // _mtl_o;. float + 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, // 4 tmpvar_1 = 0;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, // tmpvar_1.zw = + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x28, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, // float2(0.0, 1.0) + 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x20, // ;. tmpvar_1.xy + 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // = _mtl_i.a_posit + 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x79, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // ion.xy;. _mtl_o + 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, // .gl_Position = ( + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // _mtl_u.u_modelVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ewProj * tmpvar_ + 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x74, // 1);. _mtl_o.v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // excoord0 = _mtl_ + 0x69, 0x2e, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, // i.a_texcoord0;. + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // _mtl_o.v_color0 + 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // = _mtl_i.a_colo + 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, // r0;. return _mt + 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // l_o;.}... +}; +extern const uint8_t* vs_texture_pssl; +extern const uint32_t vs_texture_pssl_size; diff --git a/3rdparty/bgfx/tools/texturev/vs_texture.sc b/3rdparty/bgfx/tools/texturev/vs_texture.sc index ccc4946..e5a1df8 100644 --- a/3rdparty/bgfx/tools/texturev/vs_texture.sc +++ b/3rdparty/bgfx/tools/texturev/vs_texture.sc @@ -2,7 +2,7 @@ $input a_position, a_texcoord0, a_color0 $output v_texcoord0, v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -10,7 +10,7 @@ $output v_texcoord0, v_color0 void main() { - gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0) ); + gl_Position = mul(u_modelViewProj, vec4(a_position.xy, 0.0, 1.0) ); v_texcoord0 = a_texcoord0; v_color0 = a_color0; } diff --git a/3rdparty/bgfx/tools/texturev/vs_texture_cube.bin.h b/3rdparty/bgfx/tools/texturev/vs_texture_cube.bin.h index bc752d5..6e2e4a0 100644 --- a/3rdparty/bgfx/tools/texturev/vs_texture_cube.bin.h +++ b/3rdparty/bgfx/tools/texturev/vs_texture_cube.bin.h @@ -1,17 +1,17 @@ static const uint8_t vs_texture_cube_glsl[420] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... 0x7f, 0x01, 0x00, 0x00, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // ....attribute hi 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 a_color 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, 0x67, // 0;.attribute hig 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // hp vec3 a_positi 0x6f, 0x6e, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x68, 0x69, // on;.attribute hi - 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ghp vec2 a_texco + 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ghp vec3 a_texco 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, // ord0;.varying hi 0x67, 0x68, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ghp vec4 v_color 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.varying highp - 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec2 v_texcoord + 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // vec3 v_texcoord 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, // 0;.uniform highp 0x20, 0x6d, 0x61, 0x74, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, // mat4 u_modelVie 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // wProj;.void main @@ -28,121 +28,326 @@ static const uint8_t vs_texture_cube_glsl[420] = 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, // or0 = a_color0;. 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t vs_texture_cube_dx9[359] = +static const uint8_t vs_texture_cube_spv[3165] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0x38, 0x0c, 0x00, 0x00, 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, // 8.....#......... + 0x36, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, // 6b.............. + 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, // ........GLSL.std + 0x2e, 0x34, 0x35, 0x30, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // .450............ + 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, // ................ + 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, // main............ + 0x95, 0x0e, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........v....... + 0x03, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ................ + 0x1f, 0x16, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, // ....main........ + 0x78, 0x04, 0x00, 0x00, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // x...Output...... + 0x78, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // x.......gl_Posit + 0x69, 0x6f, 0x6e, 0x00, 0x06, 0x00, 0x06, 0x00, 0x78, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ion.....x....... + 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, // v_color0........ + 0x78, 0x04, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // x.......v_texcoo + 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x07, 0x00, 0x9e, 0x15, 0x00, 0x00, 0x40, 0x6d, 0x61, 0x69, // rd0.........@mai + 0x6e, 0x28, 0x76, 0x66, 0x34, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x76, 0x66, 0x33, 0x3b, 0x00, 0x00, // n(vf4;vf3;vf3;.. + 0x05, 0x00, 0x05, 0x00, 0x4f, 0x2e, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // ....O...a_color0 + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // ........:...a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb9, 0x4d, 0x00, 0x00, // sition.......M.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x0f, 0x12, 0x00, 0x00, 0x5f, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x00, 0x00, 0x00, // ...._varying_... + 0x05, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x00, // ....^...$Global. + 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....^.......u_vi + 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, // ewRect......^... + 0x01, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x00, // ....u_viewTexel. + 0x06, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, // ....^.......u_vi + 0x65, 0x77, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ew......^....... + 0x75, 0x5f, 0x69, 0x6e, 0x76, 0x56, 0x69, 0x65, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // u_invView....... + 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ^.......u_proj.. + 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ....^.......u_in + 0x76, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, // vProj.......^... + 0x06, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, // ....u_viewProj.. + 0x06, 0x00, 0x07, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x69, 0x6e, // ....^.......u_in + 0x76, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, // vViewProj....... + 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, // ^.......u_model. + 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ....^.......u_mo + 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x06, 0x00, 0x07, 0x00, 0x5e, 0x05, 0x00, 0x00, // delView.....^... + 0x0a, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, // ....u_modelViewP + 0x72, 0x6f, 0x6a, 0x00, 0x06, 0x00, 0x06, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, // roj.....^....... + 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, 0x66, 0x34, 0x00, 0x05, 0x00, 0x03, 0x00, // u_alphaRef4..... + 0x42, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xb8, 0x41, 0x00, 0x00, // B............A.. + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, // a_color0........ + 0x89, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, // ....a_color0.... + 0x05, 0x00, 0x05, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // .....?..a_positi + 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x61, 0x5f, 0x70, 0x6f, // on..........a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x40, 0x2c, 0x00, 0x00, // sition......@,.. + 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x05, 0x00, 0x05, 0x00, // a_texcoord0..... + 0x95, 0x0e, 0x00, 0x00, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, // ....a_texcoord0. + 0x05, 0x00, 0x05, 0x00, 0x08, 0x10, 0x00, 0x00, 0x66, 0x6c, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x54, // ........flattenT + 0x65, 0x6d, 0x70, 0x00, 0x05, 0x00, 0x04, 0x00, 0x85, 0x55, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // emp......U..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x95, 0x38, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m........8..para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x70, 0x61, 0x72, 0x61, // m...........para + 0x6d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0a, 0x00, 0x95, 0x15, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, // m...........@ent + 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x67, 0x6c, // ryPointOutput.gl + 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, 0x00, 0x09, 0x00, // _Position....... + 0x76, 0x13, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x4f, // v...@entryPointO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x00, 0x00, // utput.v_color0.. + 0x05, 0x00, 0x0a, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x40, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x50, 0x6f, // ........@entryPo + 0x69, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // intOutput.v_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, // oord0...G....... + 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ....@...H...^... + 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x5e, 0x05, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^.......#....... + 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... + 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... + 0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ...H...^....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x03, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0x5e, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... + 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... + 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... + 0xa0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ....H...^....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x05, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x5e, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... + 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... + 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... + 0x20, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, // ...H...^....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x07, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#...`...H... + 0x5e, 0x05, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... + 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... + 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... + 0xa0, 0x01, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ....H...^....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x09, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xa0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, // ....#.......H... + 0x5e, 0x05, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ^............... + 0x48, 0x00, 0x04, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // H...^........... + 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // H...^.......#... + 0xe0, 0x09, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // ....H...^....... + 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x5e, 0x05, 0x00, 0x00, // ........H...^... + 0x0b, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x20, 0x0a, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, // ....#... ...G... + 0x5e, 0x05, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x42, 0x13, 0x00, 0x00, // ^.......G...B... + 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x89, 0x14, 0x00, 0x00, // ".......G....... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0xa6, 0x14, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x0e, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x95, 0x15, 0x00, 0x00, // ........G....... + 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x76, 0x13, 0x00, 0x00, // ........G...v... + 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x8b, 0x17, 0x00, 0x00, // ........G....... + 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ + 0x21, 0x00, 0x03, 0x00, 0x02, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00, // !............... + 0x0d, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, // .... ........... + 0x0d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, // ................ + 0x0d, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x95, 0x02, 0x00, 0x00, // ........ ....... + 0x07, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x00, 0x78, 0x04, 0x00, 0x00, // ............x... + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x00, // ............!... + 0x44, 0x09, 0x00, 0x00, 0x78, 0x04, 0x00, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x95, 0x02, 0x00, 0x00, // D...x........... + 0x95, 0x02, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0xf5, 0x06, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // .... ........... + 0x78, 0x04, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // x........... ... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, // ....+........... + 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ....+........... + 0x00, 0x00, 0x80, 0x3f, 0x2c, 0x00, 0x07, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, // ...?,........... + 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, // ................ + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // +............... + 0x2b, 0x00, 0x04, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // +............... + 0x2c, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, // ,.......,....... + 0x0c, 0x0a, 0x00, 0x00, 0x0c, 0x0a, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, // ........+....... + 0x0b, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x65, 0x00, 0x00, 0x00, // ............e... + 0x1d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // ................ + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, // .......+....... + 0x6a, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0xab, 0x03, 0x00, 0x00, // j... ........... + 0x65, 0x00, 0x00, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x5e, 0x05, 0x00, 0x00, // e...j.......^... + 0x1d, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ........e...e... + 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // e...e...e...e... + 0xab, 0x03, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ....e...e....... + 0x20, 0x00, 0x04, 0x00, 0xdb, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5e, 0x05, 0x00, 0x00, // ...........^... + 0x3b, 0x00, 0x04, 0x00, 0xdb, 0x07, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ;.......B....... + 0x2b, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, // +.......)....... + 0x20, 0x00, 0x04, 0x00, 0xe2, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x00, // ...........e... + 0x20, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x9b, 0x02, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... + 0x20, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x96, 0x02, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ;............... + 0x20, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x95, 0x15, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;............... + 0x3b, 0x00, 0x04, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x76, 0x13, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;.......v....... + 0x20, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ............... + 0x3b, 0x00, 0x04, 0x00, 0x97, 0x02, 0x00, 0x00, 0x8b, 0x17, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ;............... + 0x36, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6............... + 0x02, 0x05, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x53, 0x61, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ........Sa..;... + 0xf5, 0x06, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // ............;... + 0x9a, 0x02, 0x00, 0x00, 0x85, 0x55, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....U......;... + 0x95, 0x02, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, // .....8......;... + 0x95, 0x02, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ............=... + 0x1d, 0x00, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x89, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....A......=... + 0x18, 0x00, 0x00, 0x00, 0xd9, 0x3f, 0x00, 0x00, 0xa6, 0x14, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .....?......=... + 0x18, 0x00, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, 0x95, 0x0e, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ....@,......>... + 0x85, 0x55, 0x00, 0x00, 0xb8, 0x41, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x95, 0x38, 0x00, 0x00, // .U...A..>....8.. + 0xd9, 0x3f, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x40, 0x2c, 0x00, 0x00, // .?..>.......@,.. + 0x39, 0x00, 0x07, 0x00, 0x78, 0x04, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x9e, 0x15, 0x00, 0x00, // 9...x...I&...... + 0x85, 0x55, 0x00, 0x00, 0x95, 0x38, 0x00, 0x00, 0x9a, 0x16, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .U...8......>... + 0x08, 0x10, 0x00, 0x00, 0x49, 0x26, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, // ....I&..A....... + 0x54, 0x34, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0b, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // T4..........=... + 0x1d, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x54, 0x34, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // ........T4..>... + 0x95, 0x15, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, // ........A....... + 0xee, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x0e, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .@..........=... + 0x1d, 0x00, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0xee, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .... ....@..>... + 0x76, 0x13, 0x00, 0x00, 0x20, 0x1f, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, // v... ...A....... + 0xef, 0x40, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x11, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // .@..........=... + 0x18, 0x00, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xef, 0x40, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, // .....-...@..>... + 0x8b, 0x17, 0x00, 0x00, 0x13, 0x2d, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, // .....-......8... + 0x36, 0x00, 0x05, 0x00, 0x78, 0x04, 0x00, 0x00, 0x9e, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 6...x........... + 0x44, 0x09, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, // D...7.......O... + 0x37, 0x00, 0x03, 0x00, 0x95, 0x02, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, 0x37, 0x00, 0x03, 0x00, // 7.......:...7... + 0x95, 0x02, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00, 0x5f, 0x57, 0x00, 0x00, // .....M......_W.. + 0x3b, 0x00, 0x04, 0x00, 0xf5, 0x06, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, // ;............... + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x64, 0x2d, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A.......d-...... + 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x64, 0x2d, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, // ....>...d-...... + 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A........8...... + 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x0b, 0x38, 0x00, 0x00, 0x2c, 0x0a, 0x00, 0x00, // ....>....8..,... + 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x3a, 0x19, 0x00, 0x00, // =.......5b..:... + 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x3b, 0x3a, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, // Q.......;:..5b.. + 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x0b, 0x47, 0x00, 0x00, // ....Q........G.. + 0x35, 0x62, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x00, 0x00, // 5b......Q....... + 0x2b, 0x53, 0x00, 0x00, 0x35, 0x62, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, // +S..5b......P... + 0x1d, 0x00, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0x3b, 0x3a, 0x00, 0x00, 0x0b, 0x47, 0x00, 0x00, // .....2..;:...G.. + 0x2b, 0x53, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0xe2, 0x02, 0x00, 0x00, // +S......A....... + 0x29, 0x2c, 0x00, 0x00, 0x42, 0x13, 0x00, 0x00, 0x29, 0x0a, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, // ),..B...)...=... + 0x65, 0x00, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, 0x29, 0x2c, 0x00, 0x00, 0x90, 0x00, 0x05, 0x00, // e....<..),...... + 0x1d, 0x00, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, 0x84, 0x32, 0x00, 0x00, 0xf3, 0x3c, 0x00, 0x00, // .....;...2...<.. + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x5f, 0x38, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A......._8...... + 0x0b, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x5f, 0x38, 0x00, 0x00, 0x9f, 0x3b, 0x00, 0x00, // ....>..._8...;.. + 0x3d, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, 0xb9, 0x4d, 0x00, 0x00, // =........!...M.. + 0x41, 0x00, 0x05, 0x00, 0x95, 0x02, 0x00, 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A.......-<...... + 0x11, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2d, 0x3c, 0x00, 0x00, 0x1d, 0x21, 0x00, 0x00, // ....>...-<...!.. + 0x3d, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, 0x4f, 0x2e, 0x00, 0x00, // =........!..O... + 0x41, 0x00, 0x05, 0x00, 0x9a, 0x02, 0x00, 0x00, 0x2e, 0x3c, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // A........<...... + 0x0e, 0x0a, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x2e, 0x3c, 0x00, 0x00, 0x1e, 0x21, 0x00, 0x00, // ....>....<...!.. + 0x3d, 0x00, 0x04, 0x00, 0x78, 0x04, 0x00, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x0f, 0x12, 0x00, 0x00, // =...x...G:...... + 0xfe, 0x00, 0x02, 0x00, 0x47, 0x3a, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00, 0x00, // ....G:..8.... +}; +static const uint8_t vs_texture_cube_dx9[361] = +{ + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x44, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // D.......$.CTAB.. - 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. - 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... - 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x03, 0x00, // modelViewProj... - 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs - 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( - 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 - 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // 11.16384........ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ - 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ - 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, // U............... - 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, // ................ - 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... + 0x44, 0x01, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, // D.........$.CTAB + 0x1c, 0x00, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, // ....W........... + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ........P...0... + 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, // u_modelViewProj. + 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, // vs_3_0.Microsoft + 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // (R) HLSL Shader + 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x36, 0x2e, 0x33, 0x2e, 0x39, 0x36, // Compiler 6.3.96 + 0x30, 0x30, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0xab, 0xab, 0x1f, 0x00, 0x00, 0x02, // 00.16384........ + 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ + 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................ + 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, // ................ + 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, // ..U............. + 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ................ + 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, // ................ + 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x07, 0xe0, // ................ + 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... }; -static const uint8_t vs_texture_cube_dx11[620] = +static const uint8_t vs_texture_cube_dx11[622] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x40, 0x02, 0x44, 0x58, 0x42, 0x43, 0x25, 0x0b, 0xbc, 0xf2, 0xf1, 0x2f, 0x13, 0x1a, 0x84, 0x83, // @.DXBC%..../.... - 0x08, 0xf9, 0x08, 0xa1, 0x2c, 0x84, 0x01, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x03, 0x00, // ....,.....@..... - 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,...........IS - 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNh...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......V......... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x5f, 0x00, // .............._. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, // ......COLOR.POSI - 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, // TION.TEXCOORD.OS - 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNl...........P. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x62, 0x00, // ..............b. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................ - 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO - 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // N.COLOR.TEXCOORD - 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x28, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x4a, 0x00, // ..SHDR(...@...J. - 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ..Y...F. ....... - 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, // .._..........._. - 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, // ..r......._...2. - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......g.... .... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, // ......e.... .... - 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x68, 0x00, // ..e...2 ......h. - 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......8......... - 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..V.......F. ... - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2......... - 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, // ..F. ........... - 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, // ......F.......2. - 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..........F. ... - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, // ..............F. - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ........... .... - 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..F.......F. ... - 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, // ......6.... .... - 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, // ..F.......6...2 - 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3e, 0x00, // ......F.......>. - 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ..........@. + 0x40, 0x02, 0x00, 0x00, 0x44, 0x58, 0x42, 0x43, 0x52, 0x1b, 0xf0, 0x79, 0x87, 0x20, 0xa0, 0x2d, // @...DXBCR..y. .- + 0xbc, 0x22, 0x0f, 0xb3, 0x05, 0x0c, 0xbf, 0x92, 0x01, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, // ."..........@... + 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, // ....,........... + 0x49, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGNh........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........V....... + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, // ................ + 0x5f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // _............... + 0x02, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO + 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, // SITION.TEXCOORD. + 0x4f, 0x53, 0x47, 0x4e, 0x6c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGNl........... + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // P............... + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ + 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // b............... + 0x02, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT + 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO + 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x28, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, // RD..SHDR(...@... + 0x4a, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // J...Y...F. ..... + 0x04, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ...._........... + 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _...r......._... + 0x72, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // r.......g.... .. + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // ........e.... .. + 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....e...r ...... + 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, // h.......8....... + 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....V.......F. . + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, // ........2....... + 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....F. ......... + 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F....... + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // 2...........F. . + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ + 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, // F............ .. + 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, // ....F.......F. . + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // ........6.... .. + 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // ....F.......6... + 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // r ......F....... + 0x3e, 0x00, 0x00, 0x01, 0x00, 0x03, 0x05, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // >...........@. }; -static const uint8_t vs_texture_cube_mtl[751] = +static const uint8_t vs_texture_cube_mtl[777] = { - 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0xe0, 0x02, 0x00, 0x00, 0x75, 0x73, // VSH...........us - 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me - 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput { - 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . float4 a_colo - 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, // r0 [[attribute(0 - 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, // )]];. float3 a_ - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, // position [[attri - 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // bute(1)]];. flo - 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, // at2 a_texcoord0 - 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, // [[attribute(2)]] - 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // ;.};.struct xlat - 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput - 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, // {. float4 gl_Po - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // sition [[positio - 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, // n]];. float4 v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, // color0;. float2 - 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, // v_texcoord0;.}; - 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // .struct xlatMtlS - 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, // haderUniform {. - 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // float4x4 u_mode - 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, // lViewProj;.};.ve - 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // rtex xlatMtlShad - 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // erOutput xlatMtl - 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // Main (xlatMtlSha - 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, // derInput _mtl_i - 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, // [[stage_in]], co - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // nstant xlatMtlSh - 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, // aderUniform& _mt - 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, // l_u [[buffer(0)] - 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // ]).{. xlatMtlSh - 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // aderOutput _mtl_ - 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, // o;. float4 tmpv - 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // ar_1;. tmpvar_1 - 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // .w = 1.0;. tmpv - 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // ar_1.xyz = _mtl_ - 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, // i.a_position;. - 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, // _mtl_o.gl_Positi - 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, // on = (_mtl_u.u_m - 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, // odelViewProj * t - 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // mpvar_1);. _mtl - 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, // _o.v_texcoord0 = - 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // _mtl_i.a_texcoo - 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, // rd0;. _mtl_o.v_ - 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, // color0 = _mtl_i. - 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // a_color0;. retu - 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // rn _mtl_o;.}... + 0x56, 0x53, 0x48, 0x05, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod + 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x01, 0x00, // elViewProj...... + 0xe4, 0x02, 0x00, 0x00, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, // ....using namesp + 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // ace metal;.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, // t xlatMtlShaderI + 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // nput {. float4 + 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, // a_color0 [[attri + 0x62, 0x75, 0x74, 0x65, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // bute(0)]];. flo + 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, // at3 a_position [ + 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, // [attribute(1)]]; + 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // . float3 a_texc + 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, // oord0 [[attribut + 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // e(2)]];.};.struc + 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO + 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // utput {. float4 + 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, // gl_Position [[p + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // osition]];. flo + 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, // at4 v_color0;. + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // float3 v_texcoor + 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, // d0;.};.struct xl + 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo + 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x20, // rm {. float4x4 + 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x3b, // u_modelViewProj; + 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.vertex xlatM + 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, // tlShaderOutput x + 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, // latMtlMain (xlat + 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, // MtlShaderInput _ + 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, // mtl_i [[stage_in + 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, // ]], constant xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, // tMtlShaderUnifor + 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, // m& _mtl_u [[buff + 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, // er(0)]]).{. xla + 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // _mtl_o;. float + 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, // 4 tmpvar_1 = 0;. + 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, // tmpvar_1.w = 1 + 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, // .0;. tmpvar_1.x + 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, // yz = _mtl_i.a_po + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // sition;. _mtl_o + 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, // .gl_Position = ( + 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, // _mtl_u.u_modelVi + 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // ewProj * tmpvar_ + 0x31, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x74, // 1);. _mtl_o.v_t + 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // excoord0 = _mtl_ + 0x69, 0x2e, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, // i.a_texcoord0;. + 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, // _mtl_o.v_color0 + 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // = _mtl_i.a_colo + 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, // r0;. return _mt + 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // l_o;.}... }; +extern const uint8_t* vs_texture_cube_pssl; +extern const uint32_t vs_texture_cube_pssl_size; diff --git a/3rdparty/bgfx/tools/texturev/vs_texture_cube.sc b/3rdparty/bgfx/tools/texturev/vs_texture_cube.sc index fa08155..e5d82b8 100644 --- a/3rdparty/bgfx/tools/texturev/vs_texture_cube.sc +++ b/3rdparty/bgfx/tools/texturev/vs_texture_cube.sc @@ -2,7 +2,7 @@ $input a_position, a_texcoord0, a_color0 $output v_texcoord0, v_color0 /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ diff --git a/3rdparty/bimg/.appveyor.yml b/3rdparty/bimg/.appveyor.yml new file mode 100644 index 0000000..b72256f --- /dev/null +++ b/3rdparty/bimg/.appveyor.yml @@ -0,0 +1,20 @@ +shallow_clone: true + +os: + - Visual Studio 2017 + +environment: + matrix: + - TOOLSET: vs2015 + - TOOLSET: vs2017 + +configuration: + - Debug + - Release + +install: + - git clone https://github.com/bkaradzic/bx ..\bx + - ..\bx\tools\bin\windows\genie --with-tools %TOOLSET% + +build: + project: .build/projects/$(TOOLSET)/bimg.sln diff --git a/3rdparty/bimg/.editorconfig b/3rdparty/bimg/.editorconfig new file mode 100644 index 0000000..4fa1895 --- /dev/null +++ b/3rdparty/bimg/.editorconfig @@ -0,0 +1,19 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +max_line_length = 100 +insert_final_newline = true +trim_trailing_whitespace = true + +[include/bgfx/c99/*.h] +indent_style = space + +[*.ninja] +indent_style = space + +[*.md] +trim_trailing_whitespace = false +max_line_length = 80 diff --git a/3rdparty/bimg/.gitattributes b/3rdparty/bimg/.gitattributes new file mode 100644 index 0000000..e89cf41 --- /dev/null +++ b/3rdparty/bimg/.gitattributes @@ -0,0 +1,11 @@ +*.c eol=lf +*.cpp eol=lf +*.h eol=lf +*.sc eol=lf +*.sh eol=lf +*.m eol=lf +*.mm eol=lf +*.md eol=lf +*.lua eol=lf +*.mk eol=lf +makefile eol=lf diff --git a/3rdparty/bimg/.gitignore b/3rdparty/bimg/.gitignore new file mode 100644 index 0000000..3f3804e --- /dev/null +++ b/3rdparty/bimg/.gitignore @@ -0,0 +1,7 @@ +.build +.debug +.DS_Store +.git +.svn +tags +.gdb_history diff --git a/3rdparty/bimg/.travis.yml b/3rdparty/bimg/.travis.yml new file mode 100644 index 0000000..c656c72 --- /dev/null +++ b/3rdparty/bimg/.travis.yml @@ -0,0 +1,32 @@ +language: cpp +matrix: + include: + - compiler: gcc + os: linux + - compiler: clang + os: osx + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-5 + - g++-5 + - clang + +before_script: + git clone https://github.com/bkaradzic/bx ../bx + +script: + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then make build CXX="g++-5" CC="gcc-5"; fi + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then make build; fi + +branches: + only: + - master + +notifications: + email: false + +osx_image: xcode9.3 diff --git a/3rdparty/bimg/3rdparty/nvtt/nvcore/nvcore.h b/3rdparty/bimg/3rdparty/nvtt/nvcore/nvcore.h index 689feff..e2458e2 100644 --- a/3rdparty/bimg/3rdparty/nvtt/nvcore/nvcore.h +++ b/3rdparty/bimg/3rdparty/nvtt/nvcore/nvcore.h @@ -139,6 +139,8 @@ # define NV_CPU_ARM 1 #elif defined POSH_CPU_AARCH64 # define NV_CPU_AARCH64 1 +#elif defined POSH_CPU_EMSCRIPTEN +# define NV_CPU_EMSCRIPTEN 1 #else # error "Unsupported CPU" #endif @@ -163,6 +165,10 @@ # define NV_CPU_AARCH64 0 #endif // NV_CPU_AARCH64 +#ifndef NV_CPU_EMSCRIPTEN +# define NV_CPU_EMSCRIPTEN 0 +#endif // NV_CPU_EMSCRIPTEN + // Compiler: #if defined POSH_COMPILER_CLANG diff --git a/3rdparty/bimg/3rdparty/nvtt/nvcore/posh.h b/3rdparty/bimg/3rdparty/nvtt/nvcore/posh.h index 45d2d9e..b597125 100644 --- a/3rdparty/bimg/3rdparty/nvtt/nvcore/posh.h +++ b/3rdparty/bimg/3rdparty/nvtt/nvcore/posh.h @@ -296,7 +296,7 @@ LLVM: ** Determine target operating system ** ---------------------------------------------------------------------------- */ -#if defined linux || defined __linux__ +#if defined linux || defined __linux__ || defined EMSCRIPTEN # define POSH_OS_LINUX 1 # define POSH_OS_STRING "Linux" #endif @@ -536,6 +536,11 @@ LLVM: # define POSH_CPU_STRING "PA-RISC" #endif +#if defined EMSCRIPTEN +# define POSH_CPU_EMSCRIPTEN 1 +# define POSH_CPU_STRING "EMSCRIPTEN" +#endif + #if !defined POSH_CPU_STRING # error POSH cannot determine target CPU # define POSH_CPU_STRING "Unknown" /* this is here for Doxygen's benefit */ @@ -673,7 +678,7 @@ LLVM: ** the MIPS series, so we have to be careful about those. ** ---------------------------------------------------------------------------- */ -#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_CPU_AARCH64 || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__ +#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_CPU_AARCH64 || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__ || defined POSH_CPU_EMSCRIPTEN # define POSH_ENDIAN_STRING "little" # define POSH_LITTLE_ENDIAN 1 #else diff --git a/3rdparty/bimg/3rdparty/nvtt/nvtt.cpp b/3rdparty/bimg/3rdparty/nvtt/nvtt.cpp index 51a2bce..aa1c2d2 100644 --- a/3rdparty/bimg/3rdparty/nvtt/nvtt.cpp +++ b/3rdparty/bimg/3rdparty/nvtt/nvtt.cpp @@ -1,6 +1,6 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause */ #include "nvtt.h" @@ -8,58 +8,62 @@ #include #include +BX_PRAGMA_DIAGNOSTIC_PUSH(); +BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4458) // warning C4458: declaration of 'x' hides class member #include "bc6h/zoh.h" #include "bc7/avpcl.h" #include "nvmath/vector.inl" +BX_PRAGMA_DIAGNOSTIC_POP(); +BX_PRAGMA_DIAGNOSTIC_PUSH(); +BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4702) // warning C4702: unreachable code NVCORE_API int nvAbort(const char *, const char *, int , const char *, const char *, ...) { abort(); return 0; } +BX_PRAGMA_DIAGNOSTIC_POP(); namespace nvtt { - using namespace nv; - - void compressBC6H(const void* _input, uint32_t _width, uint32_t _height, uint32_t _stride, void* _output) + void compressBC6H(const void* _input, uint32_t _width, uint32_t _height, uint32_t _srcStride, void* _output) { const uint8_t* src = (const uint8_t*)_input; char* dst = (char*)_output; - for (uint32_t yy = 0; yy < _height; yy += 4) + for (uint32_t yy = 0; yy < _height; yy += ZOH::Tile::TILE_H) { - for (uint32_t xx = 0; xx < _width; xx += 4) + for (uint32_t xx = 0; xx < _width; xx += ZOH::Tile::TILE_H) { - const Vector4* rgba = (const Vector4*)&src[yy*_stride + xx*sizeof(float)*4]; + const uint32_t bytesPerPixel = sizeof(float)*4; + const nv::Vector4* srcRgba = (const nv::Vector4*)&src[yy*_srcStride + xx*bytesPerPixel]; + const uint32_t srcRgbaStride = _srcStride/bytesPerPixel; - ZOH::Utils::FORMAT = ZOH::UNSIGNED_F16; - ZOH::Tile zohTile(4, 4); + ZOH::Utils::FORMAT = ZOH::SIGNED_F16; + ZOH::Tile zohTile(ZOH::Tile::TILE_H, ZOH::Tile::TILE_H); - memset(zohTile.data, 0, sizeof(zohTile.data) ); - memset(zohTile.importance_map, 0, sizeof(zohTile.importance_map) ); + bx::memSet(zohTile.data, 0, sizeof(zohTile.data) ); + bx::memSet(zohTile.importance_map, 0, sizeof(zohTile.importance_map) ); - for (uint32_t blockY = 0; blockY < 4; ++blockY) + for (uint32_t blockY = 0; blockY < ZOH::Tile::TILE_H; ++blockY) { - for (uint32_t blockX = 0; blockX < 4; ++blockX) + for (uint32_t blockX = 0; blockX < ZOH::Tile::TILE_W; ++blockX) { - Vector4 color = rgba[blockY*4 + blockX]; - uint16 rHalf = bx::halfFromFloat(color.x); - uint16 gHalf = bx::halfFromFloat(color.y); - uint16 bHalf = bx::halfFromFloat(color.z); - zohTile.data[blockY][blockX].x = ZOH::Tile::half2float(rHalf); - zohTile.data[blockY][blockX].y = ZOH::Tile::half2float(gHalf); - zohTile.data[blockY][blockX].z = ZOH::Tile::half2float(bHalf); - zohTile.importance_map[blockY][blockX] = 1.0f; + nv::Vector4 color = srcRgba[blockY*srcRgbaStride + blockX]; + zohTile.data[blockY][blockX].x = float(int16_t(bx::halfFromFloat(color.x) ) ); + zohTile.data[blockY][blockX].y = float(int16_t(bx::halfFromFloat(color.y) ) ); + zohTile.data[blockY][blockX].z = float(int16_t(bx::halfFromFloat(color.z) ) ); } } - ZOH::compress(zohTile, &dst[( (yy*_width) + xx)/4 * 16]); + zohTile.generate_importance_map(); + ZOH::compress(zohTile, dst); + dst += ZOH::BLOCKSIZE; } } } - void compressBC7(const void* _input, uint32_t _width, uint32_t _height, uint32_t _stride, void* _output) + void compressBC7(const void* _input, uint32_t _width, uint32_t _height, uint32_t _srcStride, void* _output) { const uint8_t* src = (const uint8_t*)_input; char* dst = (char*)_output; @@ -68,7 +72,9 @@ namespace nvtt { for (uint32_t xx = 0; xx < _width; xx += 4) { - const Vector4* rgba = (const Vector4*)&src[yy*_stride + xx*sizeof(float)*4]; + const uint32_t bytesPerPixel = sizeof(float) * 4; + const nv::Vector4* srcRgba = (const nv::Vector4*)&src[yy*_srcStride + xx*bytesPerPixel]; + const uint32_t srcRgbaStride = _srcStride / bytesPerPixel; AVPCL::mode_rgb = false; AVPCL::flag_premult = false; @@ -76,18 +82,19 @@ namespace nvtt AVPCL::flag_nonuniform_ati = false; AVPCL::Tile avpclTile(4, 4); - memset(avpclTile.data, 0, sizeof(avpclTile.data) ); + bx::memSet(avpclTile.data, 0, sizeof(avpclTile.data) ); for (uint32_t blockY = 0; blockY < 4; ++blockY) { for (uint32_t blockX = 0; blockX < 4; ++blockX) { - Vector4 color = rgba[blockY*4 + blockX]; + nv::Vector4 color = srcRgba[blockY*srcRgbaStride + blockX]; avpclTile.data[blockY][blockX] = color * 255.0f; avpclTile.importance_map[blockY][blockX] = 1.0f; } } - AVPCL::compress(avpclTile, &dst[( (yy*_width) + xx)/4 * 16]); + AVPCL::compress(avpclTile, dst); + dst += AVPCL::BLOCKSIZE; } } } diff --git a/3rdparty/bimg/3rdparty/stb/stb_image.h b/3rdparty/bimg/3rdparty/stb/stb_image.h index 3ce6d8f..d7d3e1a 100644 --- a/3rdparty/bimg/3rdparty/stb/stb_image.h +++ b/3rdparty/bimg/3rdparty/stb/stb_image.h @@ -1,3 +1,9 @@ +#if defined(__has_warning) +# if __has_warning("-Wcomma") +# pragma GCC diagnostic ignored "-Wcomma" // Possible misuse of comma operator here +# endif +#endif + #if defined(_MSC_VER) # pragma warning(disable:4244) // warning C4244: '=': conversion from 'int' to 'stbi__uint16', possible loss of data # pragma warning(disable:4245) // warning C4245: 'argument': conversion from 'int' to 'char', signed/unsigned mismatch diff --git a/3rdparty/bimg/3rdparty/tinyexr/tinyexr.h b/3rdparty/bimg/3rdparty/tinyexr/tinyexr.h index b0998b6..2d8e2b4 100644 --- a/3rdparty/bimg/3rdparty/tinyexr/tinyexr.h +++ b/3rdparty/bimg/3rdparty/tinyexr/tinyexr.h @@ -1,3 +1,9 @@ +#if defined(__has_warning) +# if __has_warning("-Wcomma") +# pragma GCC diagnostic ignored "-Wcomma" // Possible misuse of comma operator here +# endif +#endif + /* Copyright (c) 2014 - 2016, Syoyo Fujita All rights reserved. diff --git a/3rdparty/bimg/CMakeLists.txt b/3rdparty/bimg/CMakeLists.txt index 27c1f30..4964b24 100644 --- a/3rdparty/bimg/CMakeLists.txt +++ b/3rdparty/bimg/CMakeLists.txt @@ -18,6 +18,7 @@ SET (BIMG_SOURCES # src/image_encode.cpp src/image_decode.cpp src/image.cpp + src/image_gnf.cpp ) ADD_LIBRARY ( bimg SHARED ${BIMG_SOURCES} ) diff --git a/3rdparty/bimg/LICENSE b/3rdparty/bimg/LICENSE index dd17ed4..3df43e3 100644 --- a/3rdparty/bimg/LICENSE +++ b/3rdparty/bimg/LICENSE @@ -1,4 +1,4 @@ -Copyright 2010-2017 Branimir Karadzic. All rights reserved. +Copyright 2010-2018 Branimir Karadzic. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/3rdparty/bimg/README.md b/3rdparty/bimg/README.md index fee386f..f918ab6 100644 --- a/3rdparty/bimg/README.md +++ b/3rdparty/bimg/README.md @@ -19,7 +19,11 @@ https://github.com/bkaradzic/bimg [License (BSD 2-clause)](https://github.com/bkaradzic/bimg/blob/master/LICENSE) ------------------------------------------------------------------------------- - Copyright 2010-2017 Branimir Karadzic. All rights reserved. + + + + + Copyright 2010-2018 Branimir Karadzic. All rights reserved. https://github.com/bkaradzic/bimg diff --git a/3rdparty/bimg/include/bimg/bimg.h b/3rdparty/bimg/include/bimg/bimg.h index 863dc3b..5dc5adf 100644 --- a/3rdparty/bimg/include/bimg/bimg.h +++ b/3rdparty/bimg/include/bimg/bimg.h @@ -1,6 +1,6 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause */ #ifndef BIMG_IMAGE_H_HEADER_GUARD @@ -9,6 +9,8 @@ #include // uint32_t #include // NULL +#define BIMG_API_VERSION UINT32_C(5) + namespace bx { struct AllocatorI; @@ -114,7 +116,7 @@ namespace bimg RGBA4, RGB5A1, RGB10A2, - R11G11B10F, + RG11B10F, UnknownDepth, // Depth formats below. @@ -131,6 +133,23 @@ namespace bimg }; }; + /// + struct Orientation + { + /// + enum Enum + { + R0, + R90, + R180, + R270, + HFlip, + HFlipR90, + HFlipR270, + VFlip, + }; + }; + /// Texture info. /// /// @attention C99 equivalent is `bgfx_texture_info_t`. @@ -154,6 +173,7 @@ namespace bimg void* m_data; TextureFormat::Enum m_format; + Orientation::Enum m_orientation; uint32_t m_size; uint32_t m_offset; @@ -174,6 +194,7 @@ namespace bimg TextureFormat::Enum m_format; uint32_t m_width; uint32_t m_height; + uint32_t m_depth; uint32_t m_blockSize; uint32_t m_size; uint8_t m_bpp; @@ -210,6 +231,9 @@ namespace bimg /// Returns true if texture format is valid. bool isValid(TextureFormat::Enum _format); + /// returns true if texture format encoding is float. + bool isFloat(TextureFormat::Enum _format); + /// Returns bits per pixel. uint8_t getBitsPerPixel(TextureFormat::Enum _format); @@ -265,7 +289,8 @@ namespace bimg void* _dst , uint32_t _width , uint32_t _height - , uint32_t _pitch + , uint32_t _depth + , uint32_t _srcPitch , const void* _src ); @@ -274,7 +299,8 @@ namespace bimg void* _dst , uint32_t _width , uint32_t _height - , uint32_t _pitch + , uint32_t _depth + , uint32_t _srcPitch , const void* _src ); @@ -283,7 +309,8 @@ namespace bimg void* _dst , uint32_t _width , uint32_t _height - , uint32_t _pitch + , uint32_t _depth + , uint32_t _srcPitch , const void* _src ); @@ -292,7 +319,8 @@ namespace bimg void* _dst , uint32_t _width , uint32_t _height - , uint32_t _pitch + , uint32_t _depth + , uint32_t _srcPitch , const void* _src ); @@ -301,17 +329,18 @@ namespace bimg void* _dst , uint32_t _width , uint32_t _height - , uint32_t _pitch + , uint32_t _srcPitch , const void* _src ); /// void imageSwizzleBgra8( void* _dst + , uint32_t _dstPitch , uint32_t _width , uint32_t _height - , uint32_t _pitch , const void* _src + , uint32_t _srcPitch ); /// @@ -319,6 +348,7 @@ namespace bimg void* _dst , uint32_t _height , uint32_t _srcPitch + , uint32_t _depth , const void* _src , uint32_t _dstPitch ); @@ -328,11 +358,18 @@ namespace bimg void* _dst , uint32_t _width , uint32_t _height + , uint32_t _depth , uint32_t _bpp - , uint32_t _pitch + , uint32_t _srcPitch , const void* _src ); + /// + PackFn getPack(TextureFormat::Enum _format); + + /// + UnpackFn getUnpack(TextureFormat::Enum _format); + /// bool imageConvert( TextureFormat::Enum _dstFormat @@ -359,6 +396,7 @@ namespace bimg , UnpackFn _unpack , uint32_t _width , uint32_t _height + , uint32_t _depth , uint32_t _srcPitch ); @@ -370,6 +408,7 @@ namespace bimg , TextureFormat::Enum _srcFormat , uint32_t _width , uint32_t _height + , uint32_t _depth ); /// @@ -406,11 +445,11 @@ namespace bimg ); /// - void imageWriteTga( + int32_t imageWriteTga( bx::WriterI* _writer , uint32_t _width , uint32_t _height - , uint32_t _pitch + , uint32_t _srcPitch , const void* _src , bool _grayscale , bool _yflip @@ -418,7 +457,28 @@ namespace bimg ); /// - void imageWriteKtx( + int32_t imageWritePng( + bx::WriterI* _writer + , uint32_t _width + , uint32_t _height + , uint32_t _srcPitch + , const void* _src + , bool _grayscale + , bool _yflip + , bx::Error* _err = NULL + ); + + /// + int32_t imageWriteDds( + bx::WriterI* _writer + , ImageContainer& _imageContainer + , const void* _data + , uint32_t _size + , bx::Error* _err + ); + + /// + int32_t imageWriteKtx( bx::WriterI* _writer , TextureFormat::Enum _format , bool _cubeMap @@ -426,12 +486,13 @@ namespace bimg , uint32_t _height , uint32_t _depth , uint8_t _numMips + , uint32_t _numLayers , const void* _src , bx::Error* _err = NULL ); /// - void imageWriteKtx( + int32_t imageWriteKtx( bx::WriterI* _writer , ImageContainer& _imageContainer , const void* _data @@ -443,6 +504,7 @@ namespace bimg bool imageParse( ImageContainer& _imageContainer , bx::ReaderSeekerI* _reader + , bx::Error* _err ); /// @@ -450,6 +512,7 @@ namespace bimg ImageContainer& _imageContainer , const void* _data , uint32_t _size + , bx::Error* _err = NULL ); /// @@ -457,6 +520,7 @@ namespace bimg bx::AllocatorI* _allocator , const void* _src , uint32_t _size + , bx::Error* _err ); /// @@ -464,6 +528,7 @@ namespace bimg bx::AllocatorI* _allocator , const void* _src , uint32_t _size + , bx::Error* _err ); /// @@ -471,15 +536,36 @@ namespace bimg bx::AllocatorI* _allocator , const void* _src , uint32_t _size + , bx::Error* _err ); + /// + ImageContainer* imageParseGnf( + bx::AllocatorI* _allocator + , const void* _src + , uint32_t _size + , bx::Error* _err + ); + + /// + void imageDecodeToR8( + bx::AllocatorI* _allocator + , void* _dst + , const void* _src + , uint32_t _width + , uint32_t _height + , uint32_t _depth + , uint32_t _dstPitch + , TextureFormat::Enum _srcFormat + ); + /// void imageDecodeToBgra8( void* _dst , const void* _src , uint32_t _width , uint32_t _height - , uint32_t _pitch + , uint32_t _dstPitch , TextureFormat::Enum _format ); @@ -489,7 +575,7 @@ namespace bimg , const void* _src , uint32_t _width , uint32_t _height - , uint32_t _pitch + , uint32_t _dstPitch , TextureFormat::Enum _format ); @@ -500,7 +586,8 @@ namespace bimg , const void* _src , uint32_t _width , uint32_t _height - , uint32_t _pitch + , uint32_t _depth + , uint32_t _dstPitch , TextureFormat::Enum _format ); @@ -514,6 +601,14 @@ namespace bimg , ImageMip& _mip ); + /// + ImageContainer* imageCubemapFromLatLongRgba32F( + bx::AllocatorI* _allocator + , const ImageContainer& _input + , bool _useBilinearInterpolation + , bx::Error* _err + ); + } // namespace bimg #endif // BIMG_IMAGE_H_HEADER_GUARD diff --git a/3rdparty/bimg/include/bimg/decode.h b/3rdparty/bimg/include/bimg/decode.h index 3b9e53b..d092b2f 100644 --- a/3rdparty/bimg/include/bimg/decode.h +++ b/3rdparty/bimg/include/bimg/decode.h @@ -1,6 +1,6 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause */ #ifndef BIMG_DECODE_H_HEADER_GUARD @@ -16,6 +16,7 @@ namespace bimg , const void* _data , uint32_t _size , TextureFormat::Enum _dstFormat = TextureFormat::Count + , bx::Error* _err = NULL ); } // namespace bimg diff --git a/3rdparty/bimg/include/bimg/encode.h b/3rdparty/bimg/include/bimg/encode.h index db74eb9..bab8de7 100644 --- a/3rdparty/bimg/include/bimg/encode.h +++ b/3rdparty/bimg/include/bimg/encode.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause */ @@ -10,17 +10,121 @@ namespace bimg { - /// - bool imageEncodeFromRgba8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, TextureFormat::Enum _format); + struct Quality + { + enum Enum + { + Default, + Highest, + Fastest, + + Count + }; + }; /// - bool imageEncodeFromRgba32f(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, TextureFormat::Enum _format); + void imageEncodeFromRgba8( + void* _dst + , const void* _src + , uint32_t _width + , uint32_t _height + , uint32_t _depth + , TextureFormat::Enum _format + , Quality::Enum _quality + , bx::Error* _err = NULL + ); /// - void imageRgba32f11to01(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src); + void imageEncodeFromRgba32f( + bx::AllocatorI* _allocator + , void* _dst + , const void* _src + , uint32_t _width + , uint32_t _height + , uint32_t _depth + , TextureFormat::Enum _format + , Quality::Enum _quality + , bx::Error* _err = NULL + ); /// - void imageMakeDist(bx::AllocatorI* _allocator, void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, float _edge, const void* _src); + void imageEncode( + bx::AllocatorI* _allocator + , void* _dst + , const void* _src + , TextureFormat::Enum _srcFormat + , uint32_t _width + , uint32_t _height + , uint32_t _depth + , TextureFormat::Enum _dstFormat + , Quality::Enum _quality + , bx::Error* _err + ); + + /// + ImageContainer* imageEncode( + bx::AllocatorI* _allocator + , TextureFormat::Enum _dstFormat + , Quality::Enum _quality + , const ImageContainer& _input + ); + + /// + void imageRgba32f11to01( + void* _dst + , uint32_t _width + , uint32_t _height + , uint32_t _depth + , uint32_t _pitch + , const void* _src + ); + + /// + void imageMakeDist( + bx::AllocatorI* _allocator + , void* _dst + , uint32_t _width + , uint32_t _height + , uint32_t _srcPitch + , float _edge + , const void* _src + ); + + /// + float imageQualityRgba8( + const void* _reference + , const void* _data + , uint16_t _width + , uint16_t _height + ); + + /// + bool imageResizeRgba32fLinear( + ImageContainer* _dst + , const ImageContainer* _src + ); + + /// + float imageAlphaTestCoverage( + TextureFormat::Enum _format + , uint32_t _width + , uint32_t _height + , uint32_t _srcPitch + , const void* _src + , float _alphaRef + , float _scale = 1.0f + ); + + /// + void imageScaleAlphaToCoverage( + TextureFormat::Enum _format + , uint32_t _width + , uint32_t _height + , uint32_t _srcPitch + , void* _src + , float _coverage + , float _alphaRef + ); } // namespace bimg diff --git a/3rdparty/bimg/makefile b/3rdparty/bimg/makefile index 02593d5..aa73543 100644 --- a/3rdparty/bimg/makefile +++ b/3rdparty/bimg/makefile @@ -1,5 +1,5 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. # License: https://github.com/bkaradzic/bimg#license-bsd-2-clause # @@ -49,17 +49,15 @@ projgen: ## Generate project files for all configurations. $(GENIE) --with-tools --xcode=osx xcode4 $(GENIE) --with-tools --xcode=ios xcode4 $(GENIE) --gcc=freebsd gmake - $(GENIE) --gcc=android-arm gmake - $(GENIE) --gcc=android-mips gmake - $(GENIE) --gcc=android-x86 gmake - $(GENIE) --gcc=asmjs gmake - $(GENIE) --gcc=ios-arm gmake - $(GENIE) --gcc=ios-arm64 gmake - $(GENIE) --gcc=ios-simulator gmake - $(GENIE) --gcc=nacl gmake - $(GENIE) --gcc=nacl-arm gmake - $(GENIE) --gcc=pnacl gmake - $(GENIE) --gcc=rpi gmake + $(GENIE) --gcc=android-arm gmake + $(GENIE) --gcc=android-mips gmake + $(GENIE) --gcc=android-x86 gmake + $(GENIE) --gcc=asmjs gmake + $(GENIE) --gcc=ios-arm gmake + $(GENIE) --gcc=ios-arm64 gmake + $(GENIE) --gcc=ios-simulator gmake + $(GENIE) --gcc=ios-simulator64 gmake + $(GENIE) --gcc=rpi gmake .build/projects/gmake-android-arm: $(GENIE) --gcc=android-arm gmake @@ -189,34 +187,6 @@ vs2017-release64: .build/projects/vs2017 ## Build - vs2017 x64 Release devenv .build/projects/vs2017/bimg.sln /Build "Release|x64" vs2017: vs2017-debug32 vs2017-release32 vs2017-debug64 vs2017-release64 ## Build - vs2017 x86/x64 Debug and Release -.build/projects/gmake-nacl: - $(GENIE) --gcc=nacl gmake -nacl-debug32: .build/projects/gmake-nacl ## Build - Native Client x86 Debug - $(MAKE) -R -C .build/projects/gmake-nacl config=debug32 -nacl-release32: .build/projects/gmake-nacl ## Build - Native Client x86 Release - $(MAKE) -R -C .build/projects/gmake-nacl config=release32 -nacl-debug64: .build/projects/gmake-nacl ## Build - Native Client x64 Debug - $(MAKE) -R -C .build/projects/gmake-nacl config=debug64 -nacl-release64: .build/projects/gmake-nacl ## Build - Native Client x64 Release - $(MAKE) -R -C .build/projects/gmake-nacl config=release64 -nacl: nacl-debug32 nacl-release32 nacl-debug64 nacl-release64 ## Build - Native Client x86/x64 Debug and Release - -.build/projects/gmake-nacl-arm: - $(GENIE) --gcc=nacl-arm gmake -nacl-arm-debug: .build/projects/gmake-nacl-arm ## Build - Native Client ARM Debug - $(MAKE) -R -C .build/projects/gmake-nacl-arm config=debug -nacl-arm-release: .build/projects/gmake-nacl-arm ## Build - Native Client ARM Release - $(MAKE) -R -C .build/projects/gmake-nacl-arm config=release -nacl-arm: nacl-arm-debug32 nacl-arm-release32 ## Build - Native Client ARM Debug and Release - -.build/projects/gmake-pnacl: - $(GENIE) --gcc=pnacl gmake -pnacl-debug: .build/projects/gmake-pnacl ## Build - Portable Native Client Debug - $(MAKE) -R -C .build/projects/gmake-pnacl config=debug -pnacl-release: .build/projects/gmake-pnacl ## Build - Portable Native Client Release - $(MAKE) -R -C .build/projects/gmake-pnacl config=release -pnacl: pnacl-debug pnacl-release ## Build - Portable Native Client Debug and Release - .build/projects/gmake-osx: $(GENIE) --with-tools --gcc=osx gmake osx-debug32: .build/projects/gmake-osx ## Build - OSX x86 Debug @@ -253,6 +223,14 @@ ios-simulator-release: .build/projects/gmake-ios-simulator ## Build - iOS Simula $(MAKE) -R -C .build/projects/gmake-ios-simulator config=release ios-simulator: ios-simulator-debug ios-simulator-release ## Build - iOS Simulator Debug and Release +.build/projects/gmake-ios-simulator64: + $(GENIE) --gcc=ios-simulator64 gmake +ios-simulator64-debug: .build/projects/gmake-ios-simulator64 ## Build - iOS Simulator 64 Debug + $(MAKE) -R -C .build/projects/gmake-ios-simulator64 config=debug +ios-simulator64-release: .build/projects/gmake-ios-simulator64 ## Build - iOS Simulator 64 Release + $(MAKE) -R -C .build/projects/gmake-ios-simulator64 config=release +ios-simulator64: ios-simulator64-debug ios-simulator64-release ## Build - iOS Simulator 64 Debug and Release + .build/projects/gmake-rpi: $(GENIE) --gcc=rpi gmake rpi-debug: .build/projects/gmake-rpi ## Build - RasberryPi Debug diff --git a/3rdparty/bimg/scripts/bimg.lua b/3rdparty/bimg/scripts/bimg.lua index 8bf6e3a..a70460e 100644 --- a/3rdparty/bimg/scripts/bimg.lua +++ b/3rdparty/bimg/scripts/bimg.lua @@ -1,8 +1,18 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bx#license-bsd-2-clause -- +function filesexist(_srcPath, _dstPath, _files) + for _, file in ipairs(_files) do + file = path.getrelative(_srcPath, file) + local filePath = path.join(_dstPath, file) + if not os.isfile(filePath) then return false end + end + + return true +end + project "bimg" kind "StaticLib" @@ -12,7 +22,9 @@ project "bimg" } files { + path.join(BIMG_DIR, "include/**"), path.join(BIMG_DIR, "src/image.*"), + path.join(BIMG_DIR, "src/image_gnf.cpp"), } configuration { "linux-*" } diff --git a/3rdparty/bimg/scripts/bimg_decode.lua b/3rdparty/bimg/scripts/bimg_decode.lua index 934cbec..ca045ed 100644 --- a/3rdparty/bimg/scripts/bimg_decode.lua +++ b/3rdparty/bimg/scripts/bimg_decode.lua @@ -1,5 +1,5 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bx#license-bsd-2-clause -- @@ -15,6 +15,7 @@ project "bimg_decode" } files { + path.join(BIMG_DIR, "include/**"), path.join(BIMG_DIR, "src/image_decode.*"), } diff --git a/3rdparty/bimg/scripts/bimg_encode.lua b/3rdparty/bimg/scripts/bimg_encode.lua index 1b853f6..cb00082 100644 --- a/3rdparty/bimg/scripts/bimg_encode.lua +++ b/3rdparty/bimg/scripts/bimg_encode.lua @@ -1,5 +1,5 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bx#license-bsd-2-clause -- @@ -15,6 +15,7 @@ project "bimg_encode" } files { + path.join(BIMG_DIR, "include/**"), path.join(BIMG_DIR, "src/image_encode.*"), path.join(BIMG_DIR, "3rdparty/libsquish/**.cpp"), path.join(BIMG_DIR, "3rdparty/libsquish/**.h"), diff --git a/3rdparty/bimg/scripts/genie.lua b/3rdparty/bimg/scripts/genie.lua index b22c4dd..93acdfb 100644 --- a/3rdparty/bimg/scripts/genie.lua +++ b/3rdparty/bimg/scripts/genie.lua @@ -1,6 +1,6 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. --- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. +-- License: https://github.com/bkaradzic/bimg#license-bsd-2-clause -- newoption { diff --git a/3rdparty/bimg/scripts/texturec.lua b/3rdparty/bimg/scripts/texturec.lua index 02f6bb6..82af15b 100644 --- a/3rdparty/bimg/scripts/texturec.lua +++ b/3rdparty/bimg/scripts/texturec.lua @@ -1,6 +1,6 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. --- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. +-- License: https://github.com/bkaradzic/bimg#license-bsd-2-clause -- project "texturec" diff --git a/3rdparty/bimg/src/bimg_p.h b/3rdparty/bimg/src/bimg_p.h index 91bd31e..6858ce8 100644 --- a/3rdparty/bimg/src/bimg_p.h +++ b/3rdparty/bimg/src/bimg_p.h @@ -1,6 +1,6 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause */ #include @@ -12,6 +12,9 @@ #include #define BIMG_CHUNK_MAGIC_TEX BX_MAKEFOURCC('T', 'E', 'X', 0x0) +#define BIMG_CHUNK_MAGIC_GNF BX_MAKEFOURCC('G', 'N', 'F', ' ') + +BX_ERROR_RESULT(BIMG_ERROR, BX_MAKEFOURCC('b', 'i', 'm', 'g') ); namespace bimg { @@ -38,7 +41,7 @@ namespace bimg if (_hasMips) { const uint32_t max = bx::uint32_max(bx::uint32_max(_width, _height), _depth); - const uint32_t num = 1 + uint32_t(bx::flog2(float(max) ) ); + const uint32_t num = 1 + uint32_t(bx::log2(float(max) ) ); return uint8_t(num); } @@ -69,4 +72,11 @@ namespace bimg , uint32_t _srcPitch ); + /// + bool imageParseGnf( + ImageContainer& _imageContainer + , bx::ReaderSeekerI* _reader + , bx::Error* _err + ); + } // namespace bimg diff --git a/3rdparty/bimg/src/image.cpp b/3rdparty/bimg/src/image.cpp index 217ac96..17bc831 100644 --- a/3rdparty/bimg/src/image.cpp +++ b/3rdparty/bimg/src/image.cpp @@ -1,9 +1,10 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause */ #include "bimg_p.h" +#include namespace bimg { @@ -25,7 +26,7 @@ namespace bimg { 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // BC3 { 4, 4, 4, 8, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // BC4 { 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // BC5 - { 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // BC6H + { 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Float) }, // BC6H { 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // BC7 { 4, 4, 4, 8, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // ETC1 { 4, 4, 4, 8, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // ETC2 @@ -86,7 +87,7 @@ namespace bimg { 16, 1, 1, 2, 1, 1, 0, 0, 4, 4, 4, 4, uint8_t(bx::EncodingType::Unorm) }, // RGBA4 { 16, 1, 1, 2, 1, 1, 0, 0, 5, 5, 5, 1, uint8_t(bx::EncodingType::Unorm) }, // RGB5A1 { 32, 1, 1, 4, 1, 1, 0, 0, 10, 10, 10, 2, uint8_t(bx::EncodingType::Unorm) }, // RGB10A2 - { 32, 1, 1, 4, 1, 1, 0, 0, 11, 11, 10, 0, uint8_t(bx::EncodingType::Unorm) }, // R11G11B10F + { 32, 1, 1, 4, 1, 1, 0, 0, 11, 11, 10, 0, uint8_t(bx::EncodingType::Unorm) }, // RG11B10F { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Count) }, // UnknownDepth { 16, 1, 1, 2, 1, 1, 16, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // D16 { 24, 1, 1, 3, 1, 1, 24, 0, 0, 0, 0, 0, uint8_t(bx::EncodingType::Unorm) }, // D24 @@ -167,7 +168,7 @@ namespace bimg "RGBA4", // RGBA4 "RGB5A1", // RGB5A1 "RGB10A2", // RGB10A2 - "R11G11B10F", // R11G11B10F + "RG11B10F", // RG11B10F "", // UnknownDepth "D16", // D16 "D24", // D24 @@ -207,6 +208,11 @@ namespace bimg ; } + bool isFloat(TextureFormat::Enum _format) + { + return uint8_t(bx::EncodingType::Float) == s_imageBlockInfo[_format].encoding; + } + uint8_t getBitsPerPixel(TextureFormat::Enum _format) { return s_imageBlockInfo[_format].bitsPerPixel; @@ -234,7 +240,7 @@ namespace bimg const TextureFormat::Enum fmt = TextureFormat::Enum(ii); if (isValid(fmt) ) { - if (0 == bx::strincmp(s_textureFormatName[ii], _name) ) + if (0 == bx::strCmpI(s_textureFormatName[ii], _name) ) { return fmt; } @@ -252,14 +258,13 @@ namespace bimg const uint16_t minBlockX = blockInfo.minBlockX; const uint16_t minBlockY = blockInfo.minBlockY; - _width = bx::uint16_max(blockWidth * minBlockX, ( (_width + blockWidth - 1) / blockWidth)*blockWidth); + _width = bx::uint16_max(blockWidth * minBlockX, ( (_width + blockWidth - 1) / blockWidth )*blockWidth); _height = bx::uint16_max(blockHeight * minBlockY, ( (_height + blockHeight - 1) / blockHeight)*blockHeight); _depth = bx::uint16_max(1, _depth); - uint32_t max = bx::uint32_max(_width, bx::uint32_max(_height, _depth) ); - uint32_t numMips = bx::uint32_max(1, uint8_t(bx::flog2(float(max) ) ) ); + uint8_t numMips = calcNumMips(true, _width, _height, _depth); - return uint8_t(numMips); + return numMips; } uint32_t imageGetSize(TextureInfo* _info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _hasMips, uint16_t _numLayers, TextureFormat::Enum _format) @@ -288,7 +293,7 @@ namespace bimg height = bx::uint32_max(blockHeight * minBlockY, ( (height + blockHeight - 1) / blockHeight)*blockHeight); depth = bx::uint32_max(1, depth); - size += width*height*depth*bpp/8 * sides; + size += uint32_t(uint64_t(width*height*depth)*bpp/8 * sides); width >>= 1; height >>= 1; @@ -335,13 +340,13 @@ namespace bimg } } - void imageRgba8Downsample2x2Ref(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageRgba8Downsample2x2Ref(void* _dst, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _srcPitch, const void* _src) { - const uint32_t dstwidth = _width/2; - const uint32_t dstheight = _height/2; + const uint32_t dstWidth = _width/2; + const uint32_t dstHeight = _height/2; - if (0 == dstwidth - || 0 == dstheight) + if (0 == dstWidth + || 0 == dstHeight) { return; } @@ -349,50 +354,53 @@ namespace bimg uint8_t* dst = (uint8_t*)_dst; const uint8_t* src = (const uint8_t*)_src; - for (uint32_t yy = 0, ystep = _pitch*2; yy < dstheight; ++yy, src += ystep) + for (uint32_t zz = 0; zz < _depth; ++zz) { - const uint8_t* rgba = src; - for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba += 8, dst += 4) + for (uint32_t yy = 0, ystep = _srcPitch*2; yy < dstHeight; ++yy, src += ystep) { - float rr = bx::fpow(rgba[ 0], 2.2f); - float gg = bx::fpow(rgba[ 1], 2.2f); - float bb = bx::fpow(rgba[ 2], 2.2f); - float aa = rgba[ 3]; - rr += bx::fpow(rgba[ 4], 2.2f); - gg += bx::fpow(rgba[ 5], 2.2f); - bb += bx::fpow(rgba[ 6], 2.2f); - aa += rgba[ 7]; - rr += bx::fpow(rgba[_pitch+0], 2.2f); - gg += bx::fpow(rgba[_pitch+1], 2.2f); - bb += bx::fpow(rgba[_pitch+2], 2.2f); - aa += rgba[_pitch+3]; - rr += bx::fpow(rgba[_pitch+4], 2.2f); - gg += bx::fpow(rgba[_pitch+5], 2.2f); - bb += bx::fpow(rgba[_pitch+6], 2.2f); - aa += rgba[_pitch+7]; + const uint8_t* rgba = src; + for (uint32_t xx = 0; xx < dstWidth; ++xx, rgba += 8, dst += 4) + { + float rr = bx::pow(rgba[ 0], 2.2f); + float gg = bx::pow(rgba[ 1], 2.2f); + float bb = bx::pow(rgba[ 2], 2.2f); + float aa = rgba[ 3]; + rr += bx::pow(rgba[ 4], 2.2f); + gg += bx::pow(rgba[ 5], 2.2f); + bb += bx::pow(rgba[ 6], 2.2f); + aa += rgba[ 7]; + rr += bx::pow(rgba[_srcPitch+0], 2.2f); + gg += bx::pow(rgba[_srcPitch+1], 2.2f); + bb += bx::pow(rgba[_srcPitch+2], 2.2f); + aa += rgba[_srcPitch+3]; + rr += bx::pow(rgba[_srcPitch+4], 2.2f); + gg += bx::pow(rgba[_srcPitch+5], 2.2f); + bb += bx::pow(rgba[_srcPitch+6], 2.2f); + aa += rgba[_srcPitch+7]; - rr *= 0.25f; - gg *= 0.25f; - bb *= 0.25f; - aa *= 0.25f; - rr = bx::fpow(rr, 1.0f/2.2f); - gg = bx::fpow(gg, 1.0f/2.2f); - bb = bx::fpow(bb, 1.0f/2.2f); - dst[0] = (uint8_t)rr; - dst[1] = (uint8_t)gg; - dst[2] = (uint8_t)bb; - dst[3] = (uint8_t)aa; + rr *= 0.25f; + gg *= 0.25f; + bb *= 0.25f; + aa *= 0.25f; + rr = bx::pow(rr, 1.0f/2.2f); + gg = bx::pow(gg, 1.0f/2.2f); + bb = bx::pow(bb, 1.0f/2.2f); + dst[0] = (uint8_t)rr; + dst[1] = (uint8_t)gg; + dst[2] = (uint8_t)bb; + dst[3] = (uint8_t)aa; + } } } } - void imageRgba8Downsample2x2(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageRgba8Downsample2x2(void* _dst, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _srcPitch, const void* _src) { - const uint32_t dstwidth = _width/2; - const uint32_t dstheight = _height/2; + const uint32_t dstWidth = _width/2; + const uint32_t dstHeight = _height/2; - if (0 == dstwidth - || 0 == dstheight) + if (0 == dstWidth + || 0 == dstHeight) { return; } @@ -411,109 +419,120 @@ namespace bimg const simd128_t linear = simd_ld(2.2f, 2.2f, 2.2f, 1.0f); const simd128_t quater = simd_splat(0.25f); - for (uint32_t yy = 0, ystep = _pitch*2; yy < dstheight; ++yy, src += ystep) + for (uint32_t zz = 0; zz < _depth; ++zz) { - const uint8_t* rgba = src; - for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba += 8, dst += 4) + for (uint32_t yy = 0, ystep = _srcPitch*2; yy < dstHeight; ++yy, src += ystep) { - const simd128_t abgr0 = simd_splat(rgba); - const simd128_t abgr1 = simd_splat(rgba+4); - const simd128_t abgr2 = simd_splat(rgba+_pitch); - const simd128_t abgr3 = simd_splat(rgba+_pitch+4); + const uint8_t* rgba = src; + for (uint32_t xx = 0; xx < dstWidth; ++xx, rgba += 8, dst += 4) + { + const simd128_t abgr0 = simd_splat(rgba); + const simd128_t abgr1 = simd_splat(rgba+4); + const simd128_t abgr2 = simd_splat(rgba+_srcPitch); + const simd128_t abgr3 = simd_splat(rgba+_srcPitch+4); - const simd128_t abgr0m = simd_and(abgr0, umask); - const simd128_t abgr1m = simd_and(abgr1, umask); - const simd128_t abgr2m = simd_and(abgr2, umask); - const simd128_t abgr3m = simd_and(abgr3, umask); - const simd128_t abgr0x = simd_xor(abgr0m, wflip); - const simd128_t abgr1x = simd_xor(abgr1m, wflip); - const simd128_t abgr2x = simd_xor(abgr2m, wflip); - const simd128_t abgr3x = simd_xor(abgr3m, wflip); - const simd128_t abgr0f = simd_itof(abgr0x); - const simd128_t abgr1f = simd_itof(abgr1x); - const simd128_t abgr2f = simd_itof(abgr2x); - const simd128_t abgr3f = simd_itof(abgr3x); - const simd128_t abgr0c = simd_add(abgr0f, wadd); - const simd128_t abgr1c = simd_add(abgr1f, wadd); - const simd128_t abgr2c = simd_add(abgr2f, wadd); - const simd128_t abgr3c = simd_add(abgr3f, wadd); - const simd128_t abgr0n = simd_mul(abgr0c, unpack); - const simd128_t abgr1n = simd_mul(abgr1c, unpack); - const simd128_t abgr2n = simd_mul(abgr2c, unpack); - const simd128_t abgr3n = simd_mul(abgr3c, unpack); + const simd128_t abgr0m = simd_and(abgr0, umask); + const simd128_t abgr1m = simd_and(abgr1, umask); + const simd128_t abgr2m = simd_and(abgr2, umask); + const simd128_t abgr3m = simd_and(abgr3, umask); + const simd128_t abgr0x = simd_xor(abgr0m, wflip); + const simd128_t abgr1x = simd_xor(abgr1m, wflip); + const simd128_t abgr2x = simd_xor(abgr2m, wflip); + const simd128_t abgr3x = simd_xor(abgr3m, wflip); + const simd128_t abgr0f = simd_itof(abgr0x); + const simd128_t abgr1f = simd_itof(abgr1x); + const simd128_t abgr2f = simd_itof(abgr2x); + const simd128_t abgr3f = simd_itof(abgr3x); + const simd128_t abgr0c = simd_add(abgr0f, wadd); + const simd128_t abgr1c = simd_add(abgr1f, wadd); + const simd128_t abgr2c = simd_add(abgr2f, wadd); + const simd128_t abgr3c = simd_add(abgr3f, wadd); + const simd128_t abgr0n = simd_mul(abgr0c, unpack); + const simd128_t abgr1n = simd_mul(abgr1c, unpack); + const simd128_t abgr2n = simd_mul(abgr2c, unpack); + const simd128_t abgr3n = simd_mul(abgr3c, unpack); - const simd128_t abgr0l = simd_pow(abgr0n, linear); - const simd128_t abgr1l = simd_pow(abgr1n, linear); - const simd128_t abgr2l = simd_pow(abgr2n, linear); - const simd128_t abgr3l = simd_pow(abgr3n, linear); + const simd128_t abgr0l = simd_pow(abgr0n, linear); + const simd128_t abgr1l = simd_pow(abgr1n, linear); + const simd128_t abgr2l = simd_pow(abgr2n, linear); + const simd128_t abgr3l = simd_pow(abgr3n, linear); - const simd128_t sum0 = simd_add(abgr0l, abgr1l); - const simd128_t sum1 = simd_add(abgr2l, abgr3l); - const simd128_t sum2 = simd_add(sum0, sum1); - const simd128_t avg0 = simd_mul(sum2, quater); - const simd128_t avg1 = simd_pow(avg0, gamma); + const simd128_t sum0 = simd_add(abgr0l, abgr1l); + const simd128_t sum1 = simd_add(abgr2l, abgr3l); + const simd128_t sum2 = simd_add(sum0, sum1); + const simd128_t avg0 = simd_mul(sum2, quater); + const simd128_t avg1 = simd_pow(avg0, gamma); - const simd128_t avg2 = simd_mul(avg1, pack); - const simd128_t ftoi0 = simd_ftoi(avg2); - const simd128_t ftoi1 = simd_and(ftoi0, pmask); - const simd128_t zwxy = simd_swiz_zwxy(ftoi1); - const simd128_t tmp0 = simd_or(ftoi1, zwxy); - const simd128_t yyyy = simd_swiz_yyyy(tmp0); - const simd128_t tmp1 = simd_iadd(yyyy, yyyy); - const simd128_t result = simd_or(tmp0, tmp1); + const simd128_t avg2 = simd_mul(avg1, pack); + const simd128_t ftoi0 = simd_ftoi(avg2); + const simd128_t ftoi1 = simd_and(ftoi0, pmask); + const simd128_t zwxy = simd_swiz_zwxy(ftoi1); + const simd128_t tmp0 = simd_or(ftoi1, zwxy); + const simd128_t yyyy = simd_swiz_yyyy(tmp0); + const simd128_t tmp1 = simd_iadd(yyyy, yyyy); + const simd128_t result = simd_or(tmp0, tmp1); - simd_stx(dst, result); + simd_stx(dst, result); + } } } } - void imageRgba32fToLinear(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageRgba32fToLinear(void* _dst, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _srcPitch, const void* _src) { uint8_t* dst = ( uint8_t*)_dst; const uint8_t* src = (const uint8_t*)_src; - for (uint32_t yy = 0; yy < _height; ++yy, src += _pitch) + for (uint32_t zz = 0; zz < _depth; ++zz) { - for (uint32_t xx = 0; xx < _width; ++xx, dst += 16) + for (uint32_t yy = 0; yy < _height; ++yy, src += _srcPitch, dst += _width*16) { - float* fd = ( float*)dst; - const float* fs = (const float*)src; + for (uint32_t xx = 0; xx < _width; ++xx) + { + const uint32_t offset = xx * 16; + float* fd = ( float*)(dst + offset); + const float* fs = (const float*)(src + offset); - fd[0] = bx::fpow(fs[0], 1.0f/2.2f); - fd[1] = bx::fpow(fs[1], 1.0f/2.2f); - fd[2] = bx::fpow(fs[2], 1.0f/2.2f); - fd[3] = fs[3]; + fd[0] = bx::pow(fs[0], 1.0f/2.2f); + fd[1] = bx::pow(fs[1], 1.0f/2.2f); + fd[2] = bx::pow(fs[2], 1.0f/2.2f); + fd[3] = fs[3]; + } } } } - void imageRgba32fToGamma(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageRgba32fToGamma(void* _dst, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _srcPitch, const void* _src) { uint8_t* dst = ( uint8_t*)_dst; const uint8_t* src = (const uint8_t*)_src; - for (uint32_t yy = 0; yy < _height; ++yy, src += _pitch) + for (uint32_t zz = 0; zz < _depth; ++zz) { - for (uint32_t xx = 0; xx < _width; ++xx, dst += 16) + for (uint32_t yy = 0; yy < _height; ++yy, src += _srcPitch, dst += _width*16) { - float* fd = ( float*)dst; - const float* fs = (const float*)src; + for (uint32_t xx = 0; xx < _width; ++xx) + { + const uint32_t offset = xx * 16; + float* fd = ( float*)(dst + offset); + const float* fs = (const float*)(src + offset); - fd[0] = bx::fpow(fs[0], 2.2f); - fd[1] = bx::fpow(fs[1], 2.2f); - fd[2] = bx::fpow(fs[2], 2.2f); - fd[3] = fs[3]; + fd[0] = bx::pow(fs[0], 2.2f); + fd[1] = bx::pow(fs[1], 2.2f); + fd[2] = bx::pow(fs[2], 2.2f); + fd[3] = fs[3]; + } } } } - void imageRgba32fLinearDownsample2x2Ref(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageRgba32fLinearDownsample2x2Ref(void* _dst, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _srcPitch, const void* _src) { - const uint32_t dstwidth = _width/2; - const uint32_t dstheight = _height/2; + const uint32_t dstWidth = _width/2; + const uint32_t dstHeight = _height/2; - if (0 == dstwidth - || 0 == dstheight) + if (0 == dstWidth + || 0 == dstHeight) { return; } @@ -521,53 +540,59 @@ namespace bimg const uint8_t* src = (const uint8_t*)_src; uint8_t* dst = (uint8_t*)_dst; - for (uint32_t yy = 0, ystep = _pitch*2; yy < dstheight; ++yy, src += ystep) + for (uint32_t zz = 0; zz < _depth; ++zz) { - const float* rgba0 = (const float*)&src[0]; - const float* rgba1 = (const float*)&src[_pitch]; - for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba0 += 8, rgba1 += 8, dst += 16) + for (uint32_t yy = 0, ystep = _srcPitch*2; yy < dstHeight; ++yy, src += ystep) { - float xyz[4]; - xyz[0] = rgba0[0]; - xyz[1] = rgba0[1]; - xyz[2] = rgba0[2]; - xyz[3] = rgba0[3]; + const float* rgba0 = (const float*)&src[0]; + const float* rgba1 = (const float*)&src[_srcPitch]; + for (uint32_t xx = 0; xx < dstWidth; ++xx, rgba0 += 8, rgba1 += 8, dst += 16) + { + float xyz[4]; - xyz[0] += rgba0[4]; - xyz[1] += rgba0[5]; - xyz[2] += rgba0[6]; - xyz[3] += rgba0[7]; + xyz[0] = rgba0[0]; + xyz[1] = rgba0[1]; + xyz[2] = rgba0[2]; + xyz[3] = rgba0[3]; - xyz[0] += rgba1[0]; - xyz[1] += rgba1[1]; - xyz[2] += rgba1[2]; - xyz[3] += rgba1[3]; + xyz[0] += rgba0[4]; + xyz[1] += rgba0[5]; + xyz[2] += rgba0[6]; + xyz[3] += rgba0[7]; - xyz[0] += rgba1[4]; - xyz[1] += rgba1[5]; - xyz[2] += rgba1[6]; - xyz[3] += rgba1[7]; + xyz[0] += rgba1[0]; + xyz[1] += rgba1[1]; + xyz[2] += rgba1[2]; + xyz[3] += rgba1[3]; - xyz[0] *= 0.25f; - xyz[1] *= 0.25f; - xyz[2] *= 0.25f; - xyz[3] *= 0.25f; + xyz[0] += rgba1[4]; + xyz[1] += rgba1[5]; + xyz[2] += rgba1[6]; + xyz[3] += rgba1[7]; + + xyz[0] *= 0.25f; + xyz[1] *= 0.25f; + xyz[2] *= 0.25f; + xyz[3] *= 0.25f; + + bx::packRgba32F(dst, xyz); + } } } } - void imageRgba32fLinearDownsample2x2(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageRgba32fLinearDownsample2x2(void* _dst, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _srcPitch, const void* _src) { - imageRgba32fLinearDownsample2x2Ref(_dst, _width, _height, _pitch, _src); + imageRgba32fLinearDownsample2x2Ref(_dst, _width, _height, _depth, _srcPitch, _src); } - void imageRgba32fDownsample2x2NormalMapRef(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageRgba32fDownsample2x2NormalMapRef(void* _dst, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src) { - const uint32_t dstwidth = _width/2; - const uint32_t dstheight = _height/2; + const uint32_t dstWidth = _width/2; + const uint32_t dstHeight = _height/2; - if (0 == dstwidth - || 0 == dstheight) + if (0 == dstWidth + || 0 == dstHeight) { return; } @@ -575,43 +600,50 @@ namespace bimg const uint8_t* src = (const uint8_t*)_src; uint8_t* dst = (uint8_t*)_dst; - for (uint32_t yy = 0, ystep = _pitch*2; yy < dstheight; ++yy, src += ystep) + for (uint32_t yy = 0, ystep = _srcPitch*2; yy < dstHeight; ++yy, src += ystep) { const float* rgba0 = (const float*)&src[0]; - const float* rgba1 = (const float*)&src[_pitch]; - for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba0 += 8, rgba1 += 8, dst += 16) + const float* rgba1 = (const float*)&src[_srcPitch]; + for (uint32_t xx = 0; xx < dstWidth; ++xx, rgba0 += 8, rgba1 += 8, dst += 16) { float xyz[3]; + xyz[0] = rgba0[0]; xyz[1] = rgba0[1]; xyz[2] = rgba0[2]; + xyz[0] += rgba0[4]; xyz[1] += rgba0[5]; xyz[2] += rgba0[6]; + xyz[0] += rgba1[0]; xyz[1] += rgba1[1]; xyz[2] += rgba1[2]; + xyz[0] += rgba1[4]; xyz[1] += rgba1[5]; xyz[2] += rgba1[6]; + bx::vec3Norm( (float*)dst, xyz); } } } - void imageRgba32fDownsample2x2NormalMap(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageRgba32fDownsample2x2NormalMap(void* _dst, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src) { - imageRgba32fDownsample2x2NormalMapRef(_dst, _width, _height, _pitch, _src); + imageRgba32fDownsample2x2NormalMapRef(_dst, _width, _height, _srcPitch, _src); } - void imageSwizzleBgra8Ref(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageSwizzleBgra8Ref(void* _dst, uint32_t _dstPitch, uint32_t _width, uint32_t _height, const void* _src, uint32_t _srcPitch) { - const uint8_t* src = (uint8_t*) _src; - const uint8_t* next = src + _pitch; - uint8_t* dst = (uint8_t*)_dst; + const uint8_t* srcData = (uint8_t*) _src; + uint8_t* dstData = (uint8_t*)_dst; - for (uint32_t yy = 0; yy < _height; ++yy, src = next, next += _pitch) + for (uint32_t yy = 0; yy < _height; ++yy, srcData += _srcPitch, dstData += _dstPitch) { + const uint8_t* src = srcData; + uint8_t* dst = dstData; + for (uint32_t xx = 0; xx < _width; ++xx, src += 4, dst += 4) { uint8_t rr = src[0]; @@ -626,7 +658,7 @@ namespace bimg } } - void imageSwizzleBgra8(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageSwizzleBgra8(void* _dst, uint32_t _dstPitch, uint32_t _width, uint32_t _height, const void* _src, uint32_t _srcPitch) { // Test can we do four 4-byte pixels at the time. if (0 != (_width&0x3) @@ -638,7 +670,7 @@ namespace bimg BX_WARN(bx::isAligned(_src, 16), "Source %p is not 16-byte aligned.", _src); BX_WARN(bx::isAligned(_dst, 16), "Destination %p is not 16-byte aligned.", _dst); BX_WARN(_width < 4, "Image width must be multiple of 4 (width %d).", _width); - imageSwizzleBgra8Ref(_dst, _width, _height, _pitch, _src); + imageSwizzleBgra8Ref(_dst, _dstPitch, _width, _height, _src, _srcPitch); return; } @@ -646,14 +678,16 @@ namespace bimg const simd128_t mf0f0 = simd_isplat(0xff00ff00); const simd128_t m0f0f = simd_isplat(0x00ff00ff); - const uint8_t* src = (uint8_t*) _src; - const uint8_t* next = src + _pitch; - uint8_t* dst = (uint8_t*)_dst; + const uint32_t width = _width/4; - const uint32_t width = _width/4; + const uint8_t* srcData = (uint8_t*) _src; + uint8_t* dstData = (uint8_t*)_dst; - for (uint32_t yy = 0; yy < _height; ++yy, src = next, next += _pitch) + for (uint32_t yy = 0; yy < _height; ++yy, srcData += _srcPitch, dstData += _dstPitch) { + const uint8_t* src = srcData; + uint8_t* dst = dstData; + for (uint32_t xx = 0; xx < width; ++xx, src += 16, dst += 16) { const simd128_t tabgr = simd_ld(src); @@ -668,22 +702,22 @@ namespace bimg } } - void imageCopy(void* _dst, uint32_t _height, uint32_t _srcPitch, const void* _src, uint32_t _dstPitch) + void imageCopy(void* _dst, uint32_t _height, uint32_t _srcPitch, uint32_t _depth, const void* _src, uint32_t _dstPitch) { const uint32_t pitch = bx::uint32_min(_srcPitch, _dstPitch); const uint8_t* src = (uint8_t*)_src; uint8_t* dst = (uint8_t*)_dst; - for (uint32_t yy = 0; yy < _height; ++yy, src += _srcPitch, dst += _dstPitch) + for (uint32_t zz = 0; zz < _depth; ++zz, src += _srcPitch*_height, dst += _dstPitch*_height) { - bx::memCopy(dst, src, pitch); + bx::memCopy(dst, src, pitch, _height, _srcPitch, _dstPitch); } } - void imageCopy(void* _dst, uint32_t _width, uint32_t _height, uint32_t _bpp, uint32_t _pitch, const void* _src) + void imageCopy(void* _dst, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _bpp, uint32_t _srcPitch, const void* _src) { const uint32_t dstPitch = _width*_bpp/8; - imageCopy(_dst, _height, _pitch, _src, dstPitch); + imageCopy(_dst, _height, _srcPitch, _depth, _src, dstPitch); } struct PackUnpack @@ -760,7 +794,7 @@ namespace bimg { bx::packRgba4, bx::unpackRgba4 }, // RGBA4 { bx::packRgb5a1, bx::unpackRgb5a1 }, // RGB5A1 { bx::packRgb10A2, bx::unpackRgb10A2 }, // RGB10A2 - { bx::packR11G11B10F, bx::unpackR11G11B10F }, // R11G11B10F + { bx::packRG11B10F, bx::unpackRG11B10F }, // RG11B10F { NULL, NULL }, // UnknownDepth { bx::packR16, bx::unpackR16 }, // D16 { bx::packR24, bx::unpackR24 }, // D24 @@ -773,6 +807,16 @@ namespace bimg }; BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_packUnpack) ); + PackFn getPack(TextureFormat::Enum _format) + { + return s_packUnpack[_format].pack; + } + + UnpackFn getUnpack(TextureFormat::Enum _format) + { + return s_packUnpack[_format].unpack; + } + bool imageConvert(TextureFormat::Enum _dstFormat, TextureFormat::Enum _srcFormat) { UnpackFn unpack = s_packUnpack[_srcFormat].unpack; @@ -797,25 +841,28 @@ namespace bimg } } - void imageConvert(void* _dst, uint32_t _dstBpp, PackFn _pack, const void* _src, uint32_t _srcBpp, UnpackFn _unpack, uint32_t _width, uint32_t _height, uint32_t _srcPitch) + void imageConvert(void* _dst, uint32_t _dstBpp, PackFn _pack, const void* _src, uint32_t _srcBpp, UnpackFn _unpack, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _srcPitch) { const uint8_t* src = (uint8_t*)_src; uint8_t* dst = (uint8_t*)_dst; const uint32_t dstPitch = _width * _dstBpp / 8; - for (uint32_t yy = 0; yy < _height; ++yy, src += _srcPitch, dst += dstPitch) + for (uint32_t zz = 0; zz < _depth; ++zz) { - for (uint32_t xx = 0; xx < _width; ++xx) + for (uint32_t yy = 0; yy < _height; ++yy, src += _srcPitch, dst += dstPitch) { - float rgba[4]; - _unpack(rgba, &src[xx*_srcBpp/8]); - _pack(&dst[xx*_dstBpp/8], rgba); + for (uint32_t xx = 0; xx < _width; ++xx) + { + float rgba[4]; + _unpack(rgba, &src[xx*_srcBpp/8]); + _pack(&dst[xx*_dstBpp/8], rgba); + } } } } - bool imageConvert(void* _dst, TextureFormat::Enum _dstFormat, const void* _src, TextureFormat::Enum _srcFormat, uint32_t _width, uint32_t _height, uint32_t _srcPitch) + bool imageConvert(void* _dst, TextureFormat::Enum _dstFormat, const void* _src, TextureFormat::Enum _srcFormat, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _srcPitch) { UnpackFn unpack = s_packUnpack[_srcFormat].unpack; PackFn pack = s_packUnpack[_dstFormat].pack; @@ -827,22 +874,22 @@ namespace bimg const uint32_t srcBpp = s_imageBlockInfo[_srcFormat].bitsPerPixel; const uint32_t dstBpp = s_imageBlockInfo[_dstFormat].bitsPerPixel; - imageConvert(_dst, dstBpp, pack, _src, srcBpp, unpack, _width, _height, _srcPitch); + imageConvert(_dst, dstBpp, pack, _src, srcBpp, unpack, _width, _height, _depth, _srcPitch); return true; } - bool imageConvert(void* _dst, TextureFormat::Enum _dstFormat, const void* _src, TextureFormat::Enum _srcFormat, uint32_t _width, uint32_t _height) + bool imageConvert(void* _dst, TextureFormat::Enum _dstFormat, const void* _src, TextureFormat::Enum _srcFormat, uint32_t _width, uint32_t _height, uint32_t _depth) { const uint32_t srcBpp = s_imageBlockInfo[_srcFormat].bitsPerPixel; if (_dstFormat == _srcFormat) { - bx::memCopy(_dst, _src, _width*_height*srcBpp/8); + bx::memCopy(_dst, _src, _width*_height*_depth*srcBpp/8); return true; } - return imageConvert(_dst, _dstFormat, _src, _srcFormat, _width, _height, _width*srcBpp/8); + return imageConvert(_dst, _dstFormat, _src, _srcFormat, _width, _height, _depth, _width*srcBpp/8); } ImageContainer* imageConvert(bx::AllocatorI* _allocator, TextureFormat::Enum _dstFormat, const ImageContainer& _input) @@ -857,10 +904,8 @@ namespace bimg , 1 < _input.m_numMips ); - const uint8_t bpp = getBitsPerPixel(_dstFormat); const uint16_t numSides = _input.m_numLayers * (_input.m_cubeMap ? 6 : 1); - uint8_t* dst = (uint8_t*)output->m_data ; for (uint16_t side = 0; side < numSides; ++side) { for (uint8_t lod = 0, num = _input.m_numMips; lod < num; ++lod) @@ -868,20 +913,23 @@ namespace bimg ImageMip mip; if (imageGetRawData(_input, side, lod, _input.m_data, _input.m_size, mip) ) { - bool ok = imageConvert(dst + ImageMip dstMip; + imageGetRawData(*output, side, lod, output->m_data, output->m_size, dstMip); + uint8_t* dstData = const_cast(dstMip.m_data); + + bool ok = imageConvert(dstData , _dstFormat , mip.m_data , mip.m_format , mip.m_width , mip.m_height + , mip.m_depth ); BX_CHECK(ok, "Conversion from %s to %s failed!" , getName(_input.m_format) , getName(output->m_format) ); BX_UNUSED(ok); - - dst += mip.m_width*mip.m_height*bpp/8; } } } @@ -889,10 +937,10 @@ namespace bimg return output; } - typedef bool (*ParseFn)(ImageContainer&, bx::ReaderSeekerI*); + typedef bool (*ParseFn)(ImageContainer&, bx::ReaderSeekerI*, bx::Error*); template - ImageContainer* imageParseT(bx::AllocatorI* _allocator, const void* _src, uint32_t _size) + ImageContainer* imageParseT(bx::AllocatorI* _allocator, const void* _src, uint32_t _size, bx::Error* _err) { bx::MemoryReader reader(_src, _size); @@ -901,7 +949,7 @@ namespace bimg ImageContainer imageContainer; if (magicT != magic - || !parseFnT(imageContainer, &reader) ) + || !parseFnT(imageContainer, &reader, _err) ) { return NULL; } @@ -917,17 +965,20 @@ namespace bimg ); const uint16_t numSides = imageContainer.m_numLayers * (imageContainer.m_cubeMap ? 6 : 1); - uint8_t* dst = (uint8_t*)output->m_data; for (uint16_t side = 0; side < numSides; ++side) { for (uint8_t lod = 0, num = imageContainer.m_numMips; lod < num; ++lod) { - ImageMip mip; - if (imageGetRawData(imageContainer, side, lod, _src, _size, mip) ) + ImageMip dstMip; + if (imageGetRawData(*output, side, lod, output->m_data, output->m_size, dstMip) ) { - bx::memCopy(dst, mip.m_data, mip.m_size); - dst += mip.m_size; + ImageMip mip; + if (imageGetRawData(imageContainer, side, lod, _src, _size, mip) ) + { + uint8_t* dstData = const_cast(dstMip.m_data); + bx::memCopy(dstData, mip.m_data, mip.m_size); + } } } } @@ -1732,26 +1783,27 @@ namespace bimg _depth = bx::uint16_max(1, _depth); _numLayers = bx::uint16_max(1, _numLayers); - const uint8_t numMips = _hasMips ? imageGetNumMips(_format, _width, _height) : 1; + const uint8_t numMips = _hasMips ? imageGetNumMips(_format, _width, _height, _depth) : 1; uint32_t size = imageGetSize(NULL, _width, _height, _depth, _cubeMap, _hasMips, _numLayers, _format); ImageContainer* imageContainer = (ImageContainer*)BX_ALLOC(_allocator, size + sizeof(ImageContainer) ); - imageContainer->m_allocator = _allocator; - imageContainer->m_data = imageContainer + 1; - imageContainer->m_format = _format; - imageContainer->m_size = size; - imageContainer->m_offset = 0; - imageContainer->m_width = _width; - imageContainer->m_height = _height; - imageContainer->m_depth = _depth; - imageContainer->m_numLayers = _numLayers; - imageContainer->m_numMips = numMips; - imageContainer->m_hasAlpha = false; - imageContainer->m_cubeMap = _cubeMap; - imageContainer->m_ktx = false; - imageContainer->m_ktxLE = false; - imageContainer->m_srgb = false; + imageContainer->m_allocator = _allocator; + imageContainer->m_data = imageContainer + 1; + imageContainer->m_format = _format; + imageContainer->m_orientation = Orientation::R0; + imageContainer->m_size = size; + imageContainer->m_offset = 0; + imageContainer->m_width = _width; + imageContainer->m_height = _height; + imageContainer->m_depth = _depth; + imageContainer->m_numLayers = _numLayers; + imageContainer->m_numMips = numMips; + imageContainer->m_hasAlpha = false; + imageContainer->m_cubeMap = _cubeMap; + imageContainer->m_ktx = false; + imageContainer->m_ktxLE = false; + imageContainer->m_srgb = false; if (NULL != _data) { @@ -1834,40 +1886,49 @@ namespace bimg #define DDS_FORMAT_BC7_UNORM_SRGB 99 #define DDS_FORMAT_B4G4R4A4_UNORM 115 -#define DDSD_CAPS 0x00000001 -#define DDSD_HEIGHT 0x00000002 -#define DDSD_WIDTH 0x00000004 -#define DDSD_PITCH 0x00000008 -#define DDSD_PIXELFORMAT 0x00001000 -#define DDSD_MIPMAPCOUNT 0x00020000 -#define DDSD_LINEARSIZE 0x00080000 -#define DDSD_DEPTH 0x00800000 +#define DDS_DX10_DIMENSION_TEXTURE2D 3 +#define DDS_DX10_DIMENSION_TEXTURE3D 4 +#define DDS_DX10_MISC_TEXTURECUBE 4 -#define DDPF_ALPHAPIXELS 0x00000001 -#define DDPF_ALPHA 0x00000002 -#define DDPF_FOURCC 0x00000004 -#define DDPF_INDEXED 0x00000020 -#define DDPF_RGB 0x00000040 -#define DDPF_YUV 0x00000200 -#define DDPF_LUMINANCE 0x00020000 +#define DDSD_CAPS 0x00000001 +#define DDSD_HEIGHT 0x00000002 +#define DDSD_WIDTH 0x00000004 +#define DDSD_PITCH 0x00000008 +#define DDSD_PIXELFORMAT 0x00001000 +#define DDSD_MIPMAPCOUNT 0x00020000 +#define DDSD_LINEARSIZE 0x00080000 +#define DDSD_DEPTH 0x00800000 -#define DDSCAPS_COMPLEX 0x00000008 -#define DDSCAPS_TEXTURE 0x00001000 -#define DDSCAPS_MIPMAP 0x00400000 +#define DDPF_ALPHAPIXELS 0x00000001 +#define DDPF_ALPHA 0x00000002 +#define DDPF_FOURCC 0x00000004 +#define DDPF_INDEXED 0x00000020 +#define DDPF_RGB 0x00000040 +#define DDPF_YUV 0x00000200 +#define DDPF_LUMINANCE 0x00020000 +#define DDPF_BUMPDUDV 0x00080000 -#define DDSCAPS2_CUBEMAP 0x00000200 -#define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400 -#define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800 -#define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000 -#define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000 -#define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000 -#define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000 +#define DDSCAPS_COMPLEX 0x00000008 +#define DDSCAPS_TEXTURE 0x00001000 +#define DDSCAPS_MIPMAP 0x00400000 -#define DDS_CUBEMAP_ALLFACES (DDSCAPS2_CUBEMAP_POSITIVEX|DDSCAPS2_CUBEMAP_NEGATIVEX \ - |DDSCAPS2_CUBEMAP_POSITIVEY|DDSCAPS2_CUBEMAP_NEGATIVEY \ - |DDSCAPS2_CUBEMAP_POSITIVEZ|DDSCAPS2_CUBEMAP_NEGATIVEZ) +#define DDSCAPS2_VOLUME 0x00200000 +#define DDSCAPS2_CUBEMAP 0x00000200 +#define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400 +#define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800 +#define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000 +#define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000 +#define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000 +#define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000 -#define DDSCAPS2_VOLUME 0x00200000 +#define DSCAPS2_CUBEMAP_ALLSIDES (0 \ + | DDSCAPS2_CUBEMAP_POSITIVEX \ + | DDSCAPS2_CUBEMAP_NEGATIVEX \ + | DDSCAPS2_CUBEMAP_POSITIVEY \ + | DDSCAPS2_CUBEMAP_NEGATIVEY \ + | DDSCAPS2_CUBEMAP_POSITIVEZ \ + | DDSCAPS2_CUBEMAP_NEGATIVEZ \ + ) struct TranslateDdsFormat { @@ -1946,116 +2007,147 @@ namespace bimg { DDS_FORMAT_B4G4R4A4_UNORM, TextureFormat::RGBA4, false }, { DDS_FORMAT_B5G5R5A1_UNORM, TextureFormat::RGB5A1, false }, { DDS_FORMAT_R10G10B10A2_UNORM, TextureFormat::RGB10A2, false }, - { DDS_FORMAT_R11G11B10_FLOAT, TextureFormat::R11G11B10F, false }, + { DDS_FORMAT_R11G11B10_FLOAT, TextureFormat::RG11B10F, false }, }; struct TranslateDdsPixelFormat { uint32_t m_bitCount; + uint32_t m_flags; uint32_t m_bitmask[4]; TextureFormat::Enum m_textureFormat; }; static const TranslateDdsPixelFormat s_translateDdsPixelFormat[] = { - { 8, { 0x000000ff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R8 }, - { 16, { 0x0000ffff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R16U }, - { 16, { 0x00000f00, 0x000000f0, 0x0000000f, 0x0000f000 }, TextureFormat::RGBA4 }, - { 16, { 0x0000f800, 0x000007e0, 0x0000001f, 0x00000000 }, TextureFormat::R5G6B5 }, - { 16, { 0x00007c00, 0x000003e0, 0x0000001f, 0x00008000 }, TextureFormat::RGB5A1 }, - { 24, { 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000 }, TextureFormat::RGB8 }, - { 32, { 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, TextureFormat::BGRA8 }, - { 32, { 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000 }, TextureFormat::BGRA8 }, - { 32, { 0x000003ff, 0x000ffc00, 0x3ff00000, 0xc0000000 }, TextureFormat::RGB10A2 }, - { 32, { 0x0000ffff, 0xffff0000, 0x00000000, 0x00000000 }, TextureFormat::RG16 }, - { 32, { 0xffffffff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R32U }, + { 8, DDPF_LUMINANCE, { 0x000000ff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R8 }, + { 16, DDPF_BUMPDUDV, { 0x000000ff, 0x0000ff00, 0x00000000, 0x00000000 }, TextureFormat::RG8S }, + { 16, DDPF_RGB, { 0x0000ffff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R16U }, + { 16, DDPF_RGB|DDPF_ALPHAPIXELS, { 0x00000f00, 0x000000f0, 0x0000000f, 0x0000f000 }, TextureFormat::RGBA4 }, + { 16, DDPF_RGB, { 0x0000f800, 0x000007e0, 0x0000001f, 0x00000000 }, TextureFormat::R5G6B5 }, + { 16, DDPF_RGB, { 0x00007c00, 0x000003e0, 0x0000001f, 0x00008000 }, TextureFormat::RGB5A1 }, + { 24, DDPF_RGB, { 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000 }, TextureFormat::RGB8 }, + { 32, DDPF_RGB, { 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000 }, TextureFormat::BGRA8 }, + { 32, DDPF_RGB|DDPF_ALPHAPIXELS, { 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 }, TextureFormat::RGBA8 }, + { 32, DDPF_BUMPDUDV, { 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 }, TextureFormat::RGBA8S }, + { 32, DDPF_RGB, { 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, TextureFormat::BGRA8 }, + { 32, DDPF_RGB|DDPF_ALPHAPIXELS, { 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 }, TextureFormat::BGRA8 }, // D3DFMT_A8R8G8B8 + { 32, DDPF_RGB|DDPF_ALPHAPIXELS, { 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000 }, TextureFormat::BGRA8 }, // D3DFMT_X8R8G8B8 + { 32, DDPF_RGB|DDPF_ALPHAPIXELS, { 0x000003ff, 0x000ffc00, 0x3ff00000, 0xc0000000 }, TextureFormat::RGB10A2 }, + { 32, DDPF_RGB, { 0x0000ffff, 0xffff0000, 0x00000000, 0x00000000 }, TextureFormat::RG16 }, + { 32, DDPF_BUMPDUDV, { 0x0000ffff, 0xffff0000, 0x00000000, 0x00000000 }, TextureFormat::RG16S }, + { 32, DDPF_RGB, { 0xffffffff, 0x00000000, 0x00000000, 0x00000000 }, TextureFormat::R32U }, }; - bool imageParseDds(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader) + bool imageParseDds(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader, bx::Error* _err) { - uint32_t headerSize; - bx::read(_reader, headerSize); + BX_ERROR_SCOPE(_err); + int32_t total = 0; - if (headerSize < DDS_HEADER_SIZE) + uint32_t headerSize; + total += bx::read(_reader, headerSize, _err); + + if (!_err->isOk() + || headerSize < DDS_HEADER_SIZE) { return false; } uint32_t flags; - bx::read(_reader, flags); + total += bx::read(_reader, flags, _err); - if ( (flags & (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT) ) != (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT) ) + if (!_err->isOk() ) { return false; } + if ( (flags & (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT) ) != (DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT) ) + { + BX_ERROR_SET(_err, BIMG_ERROR, "DDS: Invalid flags."); + return false; + } + uint32_t height; - bx::read(_reader, height); + total += bx::read(_reader, height, _err); uint32_t width; - bx::read(_reader, width); + total += bx::read(_reader, width, _err); uint32_t pitch; - bx::read(_reader, pitch); + total += bx::read(_reader, pitch, _err); uint32_t depth; - bx::read(_reader, depth); + total += bx::read(_reader, depth, _err); uint32_t mips; - bx::read(_reader, mips); + total += bx::read(_reader, mips, _err); bx::skip(_reader, 44); // reserved + total += 44; uint32_t pixelFormatSize; - bx::read(_reader, pixelFormatSize); + total += bx::read(_reader, pixelFormatSize, _err); uint32_t pixelFlags; - bx::read(_reader, pixelFlags); + total += bx::read(_reader, pixelFlags, _err); uint32_t fourcc; - bx::read(_reader, fourcc); + total += bx::read(_reader, fourcc, _err); uint32_t bitCount; - bx::read(_reader, bitCount); + total += bx::read(_reader, bitCount, _err); uint32_t bitmask[4]; - bx::read(_reader, bitmask, sizeof(bitmask) ); + total += bx::read(_reader, bitmask, sizeof(bitmask), _err); uint32_t caps[4]; - bx::read(_reader, caps); + total += bx::read(_reader, caps, _err); - bx::skip(_reader, 4); // reserved + bx::skip(_reader, 4); + total += 4; // reserved + + if (!_err->isOk() ) + { + return false; + } uint32_t dxgiFormat = 0; uint32_t arraySize = 1; if (DDPF_FOURCC == pixelFlags - && DDS_DX10 == fourcc) + && DDS_DX10 == fourcc) { - bx::read(_reader, dxgiFormat); + total += bx::read(_reader, dxgiFormat, _err); uint32_t dims; - bx::read(_reader, dims); + total += bx::read(_reader, dims, _err); uint32_t miscFlags; - bx::read(_reader, miscFlags); + total += bx::read(_reader, miscFlags, _err); - bx::read(_reader, arraySize); + total += bx::read(_reader, arraySize, _err); uint32_t miscFlags2; - bx::read(_reader, miscFlags2); + total += bx::read(_reader, miscFlags2, _err); + } + + if (!_err->isOk() ) + { + return false; } if ( (caps[0] & DDSCAPS_TEXTURE) == 0) { + BX_ERROR_SET(_err, BIMG_ERROR, "DDS: Unsupported caps."); return false; } bool cubeMap = 0 != (caps[1] & DDSCAPS2_CUBEMAP); if (cubeMap) { - if ( (caps[1] & DDS_CUBEMAP_ALLFACES) != DDS_CUBEMAP_ALLFACES) + if ( (caps[1] & DSCAPS2_CUBEMAP_ALLSIDES) != DSCAPS2_CUBEMAP_ALLSIDES) { // partial cube map is not supported. + BX_ERROR_SET(_err, BIMG_ERROR, "DDS: Incomplete cubemap."); return false; } } @@ -2083,6 +2175,7 @@ namespace bimg { const TranslateDdsPixelFormat& pf = s_translateDdsPixelFormat[ii]; if (pf.m_bitCount == bitCount + && pf.m_flags == pixelFlags && pf.m_bitmask[0] == bitmask[0] && pf.m_bitmask[1] == bitmask[1] && pf.m_bitmask[2] == bitmask[2] @@ -2107,28 +2200,35 @@ namespace bimg } } - _imageContainer.m_allocator = NULL; - _imageContainer.m_data = NULL; - _imageContainer.m_size = 0; - _imageContainer.m_offset = (uint32_t)bx::seek(_reader); - _imageContainer.m_width = width; - _imageContainer.m_height = height; - _imageContainer.m_depth = depth; - _imageContainer.m_format = format; - _imageContainer.m_numLayers = uint16_t(arraySize); - _imageContainer.m_numMips = uint8_t( (caps[0] & DDSCAPS_MIPMAP) ? mips : 1); - _imageContainer.m_hasAlpha = hasAlpha; - _imageContainer.m_cubeMap = cubeMap; - _imageContainer.m_ktx = false; - _imageContainer.m_ktxLE = false; - _imageContainer.m_srgb = srgb; + if (TextureFormat::Unknown == format) + { + BX_ERROR_SET(_err, BIMG_ERROR, "DDS: Unknown texture format."); + return false; + } - return TextureFormat::Unknown != format; + _imageContainer.m_allocator = NULL; + _imageContainer.m_data = NULL; + _imageContainer.m_size = 0; + _imageContainer.m_offset = (uint32_t)bx::seek(_reader); + _imageContainer.m_width = width; + _imageContainer.m_height = height; + _imageContainer.m_depth = depth; + _imageContainer.m_format = format; + _imageContainer.m_orientation = Orientation::R0; + _imageContainer.m_numLayers = uint16_t(arraySize); + _imageContainer.m_numMips = uint8_t( (caps[0] & DDSCAPS_MIPMAP) ? mips : 1); + _imageContainer.m_hasAlpha = hasAlpha; + _imageContainer.m_cubeMap = cubeMap; + _imageContainer.m_ktx = false; + _imageContainer.m_ktxLE = false; + _imageContainer.m_srgb = srgb; + + return true; } - ImageContainer* imageParseDds(bx::AllocatorI* _allocator, const void* _src, uint32_t _size) + ImageContainer* imageParseDds(bx::AllocatorI* _allocator, const void* _src, uint32_t _size, bx::Error* _err) { - return imageParseT(_allocator, _src, _size); + return imageParseT(_allocator, _src, _size, _err); } // KTX @@ -2152,6 +2252,7 @@ namespace bimg #define KTX_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 #define KTX_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137 #define KTX_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138 +#define KTX_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 #define KTX_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 #define KTX_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 #define KTX_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 @@ -2326,7 +2427,7 @@ namespace bimg { KTX_RGBA4, KTX_ZERO, KTX_RGBA, KTX_UNSIGNED_SHORT_4_4_4_4, }, // RGBA4 { KTX_RGB5_A1, KTX_ZERO, KTX_RGBA, KTX_UNSIGNED_SHORT_5_5_5_1, }, // RGB5A1 { KTX_RGB10_A2, KTX_ZERO, KTX_RGBA, KTX_UNSIGNED_INT_2_10_10_10_REV, }, // RGB10A2 - { KTX_R11F_G11F_B10F, KTX_ZERO, KTX_RGB, KTX_UNSIGNED_INT_10F_11F_11F_REV, }, // R11G11B10F + { KTX_R11F_G11F_B10F, KTX_ZERO, KTX_RGB, KTX_UNSIGNED_INT_10F_11F_11F_REV, }, // RG11B10F }; BX_STATIC_ASSERT(TextureFormat::UnknownDepth == BX_COUNTOF(s_translateKtxFormat) ); @@ -2338,13 +2439,17 @@ namespace bimg static const KtxFormatInfo2 s_translateKtxFormat2[] = { - { KTX_A8, TextureFormat::A8 }, - { KTX_RED, TextureFormat::R8 }, - { KTX_RGB, TextureFormat::RGB8 }, + { KTX_A8, TextureFormat::A8 }, + { KTX_RED, TextureFormat::R8 }, + { KTX_RGB, TextureFormat::RGB8 }, + { KTX_RGBA, TextureFormat::RGBA8 }, + { KTX_COMPRESSED_RGB_S3TC_DXT1_EXT, TextureFormat::BC1 }, }; - bool imageParseKtx(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader) + bool imageParseKtx(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader, bx::Error* _err) { + BX_ERROR_SCOPE(_err); + uint8_t identifier[8]; bx::read(_reader, identifier); @@ -2422,28 +2527,35 @@ namespace bimg } } - _imageContainer.m_allocator = NULL; - _imageContainer.m_data = NULL; - _imageContainer.m_size = 0; - _imageContainer.m_offset = (uint32_t)offset; - _imageContainer.m_width = width; - _imageContainer.m_height = height; - _imageContainer.m_depth = depth; - _imageContainer.m_format = format; - _imageContainer.m_numLayers = uint16_t(bx::uint32_max(numberOfArrayElements, 1) ); - _imageContainer.m_numMips = uint8_t(bx::uint32_max(numMips, 1) ); - _imageContainer.m_hasAlpha = hasAlpha; - _imageContainer.m_cubeMap = numFaces > 1; - _imageContainer.m_ktx = true; - _imageContainer.m_ktxLE = fromLittleEndian; - _imageContainer.m_srgb = false; + _imageContainer.m_allocator = NULL; + _imageContainer.m_data = NULL; + _imageContainer.m_size = 0; + _imageContainer.m_offset = (uint32_t)offset; + _imageContainer.m_width = width; + _imageContainer.m_height = height; + _imageContainer.m_depth = depth; + _imageContainer.m_format = format; + _imageContainer.m_orientation = Orientation::R0; + _imageContainer.m_numLayers = uint16_t(bx::uint32_max(numberOfArrayElements, 1) ); + _imageContainer.m_numMips = uint8_t(bx::uint32_max(numMips, 1) ); + _imageContainer.m_hasAlpha = hasAlpha; + _imageContainer.m_cubeMap = numFaces > 1; + _imageContainer.m_ktx = true; + _imageContainer.m_ktxLE = fromLittleEndian; + _imageContainer.m_srgb = false; - return TextureFormat::Unknown != format; + if (TextureFormat::Unknown == format) + { + BX_ERROR_SET(_err, BIMG_ERROR, "Unrecognized image format."); + return false; + } + + return true; } - ImageContainer* imageParseKtx(bx::AllocatorI* _allocator, const void* _src, uint32_t _size) + ImageContainer* imageParseKtx(bx::AllocatorI* _allocator, const void* _src, uint32_t _size, bx::Error* _err) { - return imageParseT(_allocator, _src, _size); + return imageParseT(_allocator, _src, _size, _err); } // PVR3 @@ -2527,8 +2639,10 @@ namespace bimg { PVR3_RGB10A2, PVR3_CHANNEL_TYPE_ANY, TextureFormat::RGB10A2 }, }; - bool imageParsePvr3(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader) + bool imageParsePvr3(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader, bx::Error* _err) { + BX_ERROR_SCOPE(_err); + uint32_t flags; bx::read(_reader, flags); @@ -2578,55 +2692,63 @@ namespace bimg } } - _imageContainer.m_allocator = NULL; - _imageContainer.m_data = NULL; - _imageContainer.m_size = 0; - _imageContainer.m_offset = (uint32_t)offset; - _imageContainer.m_width = width; - _imageContainer.m_height = height; - _imageContainer.m_depth = depth; - _imageContainer.m_format = format; - _imageContainer.m_numLayers = 1; - _imageContainer.m_numMips = uint8_t(bx::uint32_max(numMips, 1) ); - _imageContainer.m_hasAlpha = hasAlpha; - _imageContainer.m_cubeMap = numFaces > 1; - _imageContainer.m_ktx = false; - _imageContainer.m_ktxLE = false; - _imageContainer.m_srgb = colorSpace > 0; + _imageContainer.m_allocator = NULL; + _imageContainer.m_data = NULL; + _imageContainer.m_size = 0; + _imageContainer.m_offset = (uint32_t)offset; + _imageContainer.m_width = width; + _imageContainer.m_height = height; + _imageContainer.m_depth = depth; + _imageContainer.m_format = format; + _imageContainer.m_orientation = Orientation::R0; + _imageContainer.m_numLayers = 1; + _imageContainer.m_numMips = uint8_t(bx::uint32_max(numMips, 1) ); + _imageContainer.m_hasAlpha = hasAlpha; + _imageContainer.m_cubeMap = numFaces > 1; + _imageContainer.m_ktx = false; + _imageContainer.m_ktxLE = false; + _imageContainer.m_srgb = colorSpace > 0; return TextureFormat::Unknown != format; } - ImageContainer* imageParsePvr3(bx::AllocatorI* _allocator, const void* _src, uint32_t _size) + ImageContainer* imageParsePvr3(bx::AllocatorI* _allocator, const void* _src, uint32_t _size, bx::Error* _err) { - return imageParseT(_allocator, _src, _size); + return imageParseT(_allocator, _src, _size, _err); } - bool imageParse(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader) + bool imageParse(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader, bx::Error* _err) { + BX_ERROR_SCOPE(_err); + uint32_t magic; - bx::read(_reader, magic); + bx::read(_reader, magic, _err); if (DDS_MAGIC == magic) { - return imageParseDds(_imageContainer, _reader); + return imageParseDds(_imageContainer, _reader, _err); } else if (KTX_MAGIC == magic) { - return imageParseKtx(_imageContainer, _reader); + return imageParseKtx(_imageContainer, _reader, _err); } else if (PVR3_MAGIC == magic) { - return imageParsePvr3(_imageContainer, _reader); + return imageParsePvr3(_imageContainer, _reader, _err); + } + else if (BIMG_CHUNK_MAGIC_GNF == magic) + { + return imageParseGnf(_imageContainer, _reader, _err); } else if (BIMG_CHUNK_MAGIC_TEX == magic) { TextureCreate tc; bx::read(_reader, tc); - _imageContainer.m_format = tc.m_format; - _imageContainer.m_offset = UINT32_MAX; - _imageContainer.m_allocator = NULL; + _imageContainer.m_format = tc.m_format; + _imageContainer.m_orientation = Orientation::R0; + _imageContainer.m_offset = UINT32_MAX; + _imageContainer.m_allocator = NULL; if (NULL == tc.m_mem) { _imageContainer.m_data = NULL; @@ -2648,20 +2770,49 @@ namespace bimg _imageContainer.m_ktxLE = false; _imageContainer.m_srgb = false; - return true; + return _err->isOk(); } BX_TRACE("Unrecognized image format (magic: 0x%08x)!", magic); + BX_ERROR_SET(_err, BIMG_ERROR, "Unrecognized image format."); + return false; } - bool imageParse(ImageContainer& _imageContainer, const void* _data, uint32_t _size) + bool imageParse(ImageContainer& _imageContainer, const void* _data, uint32_t _size, bx::Error* _err) { + BX_ERROR_SCOPE(_err); + bx::MemoryReader reader(_data, _size); - return imageParse(_imageContainer, &reader); + return imageParse(_imageContainer, &reader, _err); } - void imageDecodeToBgra8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format) + void imageDecodeToR8(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _dstPitch, TextureFormat::Enum _srcFormat) + { + const uint8_t* src = (const uint8_t*)_src; + uint8_t* dst = (uint8_t*)_dst; + + const uint32_t srcBpp = s_imageBlockInfo[_srcFormat].bitsPerPixel; + const uint32_t srcPitch = _width*srcBpp/8; + + for (uint32_t zz = 0; zz < _depth; ++zz, src += _height*srcPitch, dst += _height*_dstPitch) + { + if (isCompressed(_srcFormat)) + { + uint32_t size = imageGetSize(NULL, uint16_t(_width), uint16_t(_height), 0, false, false, 1, TextureFormat::RGBA8); + void* temp = BX_ALLOC(_allocator, size); + imageDecodeToRgba8(temp, _src, _width, _height, _width*4, _srcFormat); + imageConvert(dst, TextureFormat::R8, temp, TextureFormat::RGBA8, _width, _height, 1, _width*4); + BX_FREE(_allocator, temp); + } + else + { + imageConvert(dst, TextureFormat::R8, src, _srcFormat, _width, _height, 1, srcPitch); + } + } + } + + void imageDecodeToBgra8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _dstPitch, TextureFormat::Enum _srcFormat) { const uint8_t* src = (const uint8_t*)_src; uint8_t* dst = (uint8_t*)_dst; @@ -2671,7 +2822,7 @@ namespace bimg uint8_t temp[16*4]; - switch (_format) + switch (_srcFormat) { case TextureFormat::BC1: for (uint32_t yy = 0; yy < height; ++yy) @@ -2681,11 +2832,11 @@ namespace bimg decodeBlockDxt1(temp, src); src += 8; - uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; - bx::memCopy(&block[0*_pitch], &temp[ 0], 16); - bx::memCopy(&block[1*_pitch], &temp[16], 16); - bx::memCopy(&block[2*_pitch], &temp[32], 16); - bx::memCopy(&block[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[yy*_dstPitch*4 + xx*16]; + bx::memCopy(&block[0*_dstPitch], &temp[ 0], 16); + bx::memCopy(&block[1*_dstPitch], &temp[16], 16); + bx::memCopy(&block[2*_dstPitch], &temp[32], 16); + bx::memCopy(&block[3*_dstPitch], &temp[48], 16); } } break; @@ -2700,11 +2851,11 @@ namespace bimg decodeBlockDxt(temp, src); src += 8; - uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; - bx::memCopy(&block[0*_pitch], &temp[ 0], 16); - bx::memCopy(&block[1*_pitch], &temp[16], 16); - bx::memCopy(&block[2*_pitch], &temp[32], 16); - bx::memCopy(&block[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[yy*_dstPitch*4 + xx*16]; + bx::memCopy(&block[0*_dstPitch], &temp[ 0], 16); + bx::memCopy(&block[1*_dstPitch], &temp[16], 16); + bx::memCopy(&block[2*_dstPitch], &temp[32], 16); + bx::memCopy(&block[3*_dstPitch], &temp[48], 16); } } break; @@ -2719,11 +2870,11 @@ namespace bimg decodeBlockDxt(temp, src); src += 8; - uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; - bx::memCopy(&block[0*_pitch], &temp[ 0], 16); - bx::memCopy(&block[1*_pitch], &temp[16], 16); - bx::memCopy(&block[2*_pitch], &temp[32], 16); - bx::memCopy(&block[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[yy*_dstPitch*4 + xx*16]; + bx::memCopy(&block[0*_dstPitch], &temp[ 0], 16); + bx::memCopy(&block[1*_dstPitch], &temp[16], 16); + bx::memCopy(&block[2*_dstPitch], &temp[32], 16); + bx::memCopy(&block[3*_dstPitch], &temp[48], 16); } } break; @@ -2736,11 +2887,11 @@ namespace bimg decodeBlockDxt45A(temp, src); src += 8; - uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; - bx::memCopy(&block[0*_pitch], &temp[ 0], 16); - bx::memCopy(&block[1*_pitch], &temp[16], 16); - bx::memCopy(&block[2*_pitch], &temp[32], 16); - bx::memCopy(&block[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[yy*_dstPitch*4 + xx*16]; + bx::memCopy(&block[0*_dstPitch], &temp[ 0], 16); + bx::memCopy(&block[1*_dstPitch], &temp[16], 16); + bx::memCopy(&block[2*_dstPitch], &temp[32], 16); + bx::memCopy(&block[3*_dstPitch], &temp[48], 16); } } break; @@ -2759,16 +2910,16 @@ namespace bimg { float nx = temp[ii*4+2]*2.0f/255.0f - 1.0f; float ny = temp[ii*4+1]*2.0f/255.0f - 1.0f; - float nz = bx::fsqrt(1.0f - nx*nx - ny*ny); + float nz = bx::sqrt(1.0f - nx*nx - ny*ny); temp[ii*4+0] = uint8_t( (nz + 1.0f)*255.0f/2.0f); temp[ii*4+3] = 0; } - uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; - bx::memCopy(&block[0*_pitch], &temp[ 0], 16); - bx::memCopy(&block[1*_pitch], &temp[16], 16); - bx::memCopy(&block[2*_pitch], &temp[32], 16); - bx::memCopy(&block[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[yy*_dstPitch*4 + xx*16]; + bx::memCopy(&block[0*_dstPitch], &temp[ 0], 16); + bx::memCopy(&block[1*_dstPitch], &temp[16], 16); + bx::memCopy(&block[2*_dstPitch], &temp[32], 16); + bx::memCopy(&block[3*_dstPitch], &temp[48], 16); } } break; @@ -2782,11 +2933,11 @@ namespace bimg decodeBlockEtc12(temp, src); src += 8; - uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; - bx::memCopy(&block[0*_pitch], &temp[ 0], 16); - bx::memCopy(&block[1*_pitch], &temp[16], 16); - bx::memCopy(&block[2*_pitch], &temp[32], 16); - bx::memCopy(&block[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[yy*_dstPitch*4 + xx*16]; + bx::memCopy(&block[0*_dstPitch], &temp[ 0], 16); + bx::memCopy(&block[1*_dstPitch], &temp[16], 16); + bx::memCopy(&block[2*_dstPitch], &temp[32], 16); + bx::memCopy(&block[3*_dstPitch], &temp[48], 16); } } break; @@ -2818,11 +2969,11 @@ namespace bimg { decodeBlockPtc14(temp, src, xx, yy, width, height); - uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; - bx::memCopy(&block[0*_pitch], &temp[ 0], 16); - bx::memCopy(&block[1*_pitch], &temp[16], 16); - bx::memCopy(&block[2*_pitch], &temp[32], 16); - bx::memCopy(&block[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[yy*_dstPitch*4 + xx*16]; + bx::memCopy(&block[0*_dstPitch], &temp[ 0], 16); + bx::memCopy(&block[1*_dstPitch], &temp[16], 16); + bx::memCopy(&block[2*_dstPitch], &temp[32], 16); + bx::memCopy(&block[3*_dstPitch], &temp[48], 16); } } break; @@ -2834,11 +2985,11 @@ namespace bimg { decodeBlockPtc14A(temp, src, xx, yy, width, height); - uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; - bx::memCopy(&block[0*_pitch], &temp[ 0], 16); - bx::memCopy(&block[1*_pitch], &temp[16], 16); - bx::memCopy(&block[2*_pitch], &temp[32], 16); - bx::memCopy(&block[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[yy*_dstPitch*4 + xx*16]; + bx::memCopy(&block[0*_dstPitch], &temp[ 0], 16); + bx::memCopy(&block[1*_dstPitch], &temp[16], 16); + bx::memCopy(&block[2*_dstPitch], &temp[32], 16); + bx::memCopy(&block[3*_dstPitch], &temp[48], 16); } } break; @@ -2854,18 +3005,25 @@ namespace bimg break; case TextureFormat::RGBA8: - imageSwizzleBgra8(_dst, _width, _height, _pitch, _src); + { + const uint32_t srcPitch = _width * 4; + imageSwizzleBgra8(_dst, _dstPitch, _width, _height, _src, srcPitch); + } break; case TextureFormat::BGRA8: - bx::memCopy(_dst, _src, _pitch*_height); + { + const uint32_t srcPitch = _width * 4; + const uint32_t size = bx::uint32_min(srcPitch, _dstPitch); + bx::memCopy(_dst, _src, size, _height, srcPitch, _dstPitch); + } break; default: { - const uint32_t srcBpp = s_imageBlockInfo[_format].bitsPerPixel; + const uint32_t srcBpp = s_imageBlockInfo[_srcFormat].bitsPerPixel; const uint32_t srcPitch = _width * srcBpp / 8; - if (!imageConvert(_dst, TextureFormat::BGRA8, _src, _format, _width, _height, srcPitch) ) + if (!imageConvert(_dst, TextureFormat::BGRA8, _src, _srcFormat, _width, _height, 1, srcPitch) ) { // Failed to convert, just make ugly red-yellow checkerboard texture. imageCheckerboard(_dst, _width, _height, 16, UINT32_C(0xffff0000), UINT32_C(0xffffff00) ); @@ -2875,32 +3033,42 @@ namespace bimg } } - void imageDecodeToRgba8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format) + void imageDecodeToRgba8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _dstPitch, TextureFormat::Enum _srcFormat) { - switch (_format) + switch (_srcFormat) { case TextureFormat::RGBA8: - bx::memCopy(_dst, _src, _pitch*_height); + { + const uint32_t srcPitch = _width * 4; + const uint32_t size = bx::uint32_min(srcPitch, _dstPitch); + bx::memCopy(_dst, _src, size, _height, srcPitch, _dstPitch); + } break; case TextureFormat::BGRA8: - imageSwizzleBgra8(_dst, _width, _height, _pitch, _src); + { + const uint32_t srcPitch = _width * 4; + imageSwizzleBgra8(_dst, _dstPitch, _width, _height, _src, srcPitch); + } break; default: - imageDecodeToBgra8(_dst, _src, _width, _height, _pitch, _format); - imageSwizzleBgra8(_dst, _width, _height, _width*4, _dst); + { + const uint32_t srcPitch = _width * 4; + imageDecodeToBgra8(_dst, _src, _width, _height, _dstPitch, _srcFormat); + imageSwizzleBgra8(_dst, _dstPitch, _width, _height, _dst, srcPitch); + } break; } } - void imageRgba8ToRgba32fRef(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageRgba8ToRgba32fRef(void* _dst, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src) { - const uint32_t dstwidth = _width; - const uint32_t dstheight = _height; + const uint32_t dstWidth = _width; + const uint32_t dstHeight = _height; - if (0 == dstwidth - || 0 == dstheight) + if (0 == dstWidth + || 0 == dstHeight) { return; } @@ -2908,26 +3076,26 @@ namespace bimg float* dst = (float*)_dst; const uint8_t* src = (const uint8_t*)_src; - for (uint32_t yy = 0, ystep = _pitch; yy < dstheight; ++yy, src += ystep) + for (uint32_t yy = 0, ystep = _srcPitch; yy < dstHeight; ++yy, src += ystep) { const uint8_t* rgba = src; - for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba += 4, dst += 4) + for (uint32_t xx = 0; xx < dstWidth; ++xx, rgba += 4, dst += 4) { - dst[0] = bx::fpow(rgba[0], 2.2f); - dst[1] = bx::fpow(rgba[1], 2.2f); - dst[2] = bx::fpow(rgba[2], 2.2f); - dst[3] = rgba[3]; + dst[0] = bx::pow(rgba[0], 2.2f); + dst[1] = bx::pow(rgba[1], 2.2f); + dst[2] = bx::pow(rgba[2], 2.2f); + dst[3] = rgba[3]; } } } - void imageRgba8ToRgba32f(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageRgba8ToRgba32f(void* _dst, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src) { - const uint32_t dstwidth = _width; - const uint32_t dstheight = _height; + const uint32_t dstWidth = _width; + const uint32_t dstHeight = _height; - if (0 == dstwidth - || 0 == dstheight) + if (0 == dstWidth + || 0 == dstHeight) { return; } @@ -2941,10 +3109,10 @@ namespace bimg const simd128_t wflip = simd_ild(0, 0, 0, 0x80000000); const simd128_t wadd = simd_ld(0.0f, 0.0f, 0.0f, 32768.0f*65536.0f); - for (uint32_t yy = 0, ystep = _pitch; yy < dstheight; ++yy, src += ystep) + for (uint32_t yy = 0, ystep = _srcPitch; yy < dstHeight; ++yy, src += ystep) { const uint8_t* rgba = src; - for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba += 4, dst += 4) + for (uint32_t xx = 0; xx < dstWidth; ++xx, rgba += 4, dst += 4) { const simd128_t abgr0 = simd_splat(rgba); const simd128_t abgr0m = simd_and(abgr0, umask); @@ -2958,69 +3126,73 @@ namespace bimg } } - void imageDecodeToRgba32f(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format) + void imageDecodeToRgba32f(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _dstPitch, TextureFormat::Enum _srcFormat) { const uint8_t* src = (const uint8_t*)_src; uint8_t* dst = (uint8_t*)_dst; - switch (_format) + const uint32_t srcBpp = s_imageBlockInfo[_srcFormat].bitsPerPixel; + const uint32_t srcPitch = _width*srcBpp/8; + + for (uint32_t zz = 0; zz < _depth; ++zz, src += _height*srcPitch, dst += _height*_dstPitch) { - case TextureFormat::BC5: + switch (_srcFormat) { - uint32_t width = _width/4; - uint32_t height = _height/4; - - for (uint32_t yy = 0; yy < height; ++yy) + case TextureFormat::BC5: { - for (uint32_t xx = 0; xx < width; ++xx) + uint32_t width = _width/4; + uint32_t height = _height/4; + + const uint8_t* srcData = src; + + for (uint32_t yy = 0; yy < height; ++yy) { - uint8_t temp[16*4]; - - decodeBlockDxt45A(temp+2, src); - src += 8; - decodeBlockDxt45A(temp+1, src); - src += 8; - - for (uint32_t ii = 0; ii < 16; ++ii) + for (uint32_t xx = 0; xx < width; ++xx) { - float nx = temp[ii*4+2]*2.0f/255.0f - 1.0f; - float ny = temp[ii*4+1]*2.0f/255.0f - 1.0f; - float nz = bx::fsqrt(1.0f - nx*nx - ny*ny); + uint8_t temp[16*4]; - const uint32_t offset = (yy*4 + ii/4)*_width*16 + (xx*4 + ii%4)*16; - float* block = (float*)&dst[offset]; - block[0] = nx; - block[1] = ny; - block[2] = nz; - block[3] = 0.0f; + decodeBlockDxt45A(temp+2, srcData); + srcData += 8; + decodeBlockDxt45A(temp+1, srcData); + srcData += 8; + + for (uint32_t ii = 0; ii < 16; ++ii) + { + float nx = temp[ii*4+2]*2.0f/255.0f - 1.0f; + float ny = temp[ii*4+1]*2.0f/255.0f - 1.0f; + float nz = bx::sqrt(1.0f - nx*nx - ny*ny); + + const uint32_t offset = (yy*4 + ii/4)*_width*16 + (xx*4 + ii%4)*16; + float* block = (float*)&dst[offset]; + block[0] = nx; + block[1] = ny; + block[2] = nz; + block[3] = 0.0f; + } } } } - } - break; + break; - case TextureFormat::RGBA32F: - bx::memCopy(_dst, _src, _pitch*_height); - break; + case TextureFormat::RGBA32F: + bx::memCopy(dst, src, _dstPitch*_height); + break; - case TextureFormat::RGBA8: - imageRgba8ToRgba32f(_dst, _width, _height, _pitch, _src); - break; - - default: - if (isCompressed(_format) ) - { - uint32_t size = imageGetSize(NULL, uint16_t(_pitch/4), uint16_t(_height), 0, false, false, 1, _format); - void* temp = BX_ALLOC(_allocator, size); - imageDecodeToRgba8(temp, _src, _width, _height, _pitch, _format); - imageRgba8ToRgba32f(_dst, _width, _height, _pitch, temp); - BX_FREE(_allocator, temp); + default: + if (isCompressed(_srcFormat) ) + { + uint32_t size = imageGetSize(NULL, uint16_t(_width), uint16_t(_height), 0, false, false, 1, TextureFormat::RGBA8); + void* temp = BX_ALLOC(_allocator, size); + imageDecodeToRgba8(temp, src, _width, _height, _width*4, _srcFormat); + imageRgba8ToRgba32f(dst, _width, _height, _width*4, temp); + BX_FREE(_allocator, temp); + } + else + { + imageConvert(dst, TextureFormat::RGBA32F, src, _srcFormat, _width, _height, 1, srcPitch); + } + break; } - else - { - imageConvert(_dst, TextureFormat::RGBA32F, _src, _format, _width, _height, _pitch); - } - break; } } @@ -3061,15 +3233,18 @@ namespace bimg for (uint8_t lod = 0, num = _imageContainer.m_numMips; lod < num; ++lod) { - uint32_t imageSize = bx::toHostEndian(*(const uint32_t*)&data[offset], _imageContainer.m_ktxLE) / _imageContainer.m_numLayers; - offset += sizeof(uint32_t); - width = bx::uint32_max(blockWidth * minBlockX, ( (width + blockWidth - 1) / blockWidth )*blockWidth); height = bx::uint32_max(blockHeight * minBlockY, ( (height + blockHeight - 1) / blockHeight)*blockHeight); depth = bx::uint32_max(1, depth); - uint32_t size = width*height*depth*bpp/8; + const uint32_t mipSize = width*height*depth*bpp/8; + + const uint32_t size = mipSize*numSides; + uint32_t imageSize = bx::toHostEndian(*(const uint32_t*)&data[offset], _imageContainer.m_ktxLE); BX_CHECK(size == imageSize, "KTX: Image size mismatch %d (expected %d).", size, imageSize); + BX_UNUSED(size, imageSize); + + offset += sizeof(uint32_t); for (uint16_t side = 0; side < numSides; ++side) { @@ -3078,8 +3253,9 @@ namespace bimg { _mip.m_width = width; _mip.m_height = height; + _mip.m_depth = depth; _mip.m_blockSize = blockSize; - _mip.m_size = size; + _mip.m_size = mipSize; _mip.m_data = &data[offset]; _mip.m_bpp = bpp; _mip.m_format = format; @@ -3087,7 +3263,7 @@ namespace bimg return true; } - offset += imageSize; + offset += mipSize; BX_CHECK(offset <= _size, "Reading past size of data buffer! (offset %d, size %d)", offset, _size); BX_UNUSED(_size); @@ -3119,6 +3295,7 @@ namespace bimg { _mip.m_width = width; _mip.m_height = height; + _mip.m_depth = depth; _mip.m_blockSize = blockSize; _mip.m_size = size; _mip.m_data = &data[offset]; @@ -3143,7 +3320,7 @@ namespace bimg return false; } - void imageWriteTga(bx::WriterI* _writer, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, bool _grayscale, bool _yflip, bx::Error* _err) + int32_t imageWriteTga(bx::WriterI* _writer, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src, bool _grayscale, bool _yflip, bx::Error* _err) { BX_ERROR_SCOPE(_err); @@ -3159,103 +3336,271 @@ namespace bimg header[16] = bpp; header[17] = 32; - bx::write(_writer, header, sizeof(header), _err); + int32_t total = 0; + total += bx::write(_writer, header, sizeof(header), _err); uint32_t dstPitch = _width*bpp/8; if (_yflip) { - uint8_t* data = (uint8_t*)_src + _pitch*_height - _pitch; - for (uint32_t yy = 0; yy < _height; ++yy) + const uint8_t* data = (const uint8_t*)_src + _srcPitch*_height - _srcPitch; + for (uint32_t yy = 0; yy < _height && _err->isOk(); ++yy) { - bx::write(_writer, data, dstPitch, _err); - data -= _pitch; + total += bx::write(_writer, data, dstPitch, _err); + data -= _srcPitch; } } - else if (_pitch == dstPitch) + else if (_srcPitch == dstPitch) { - bx::write(_writer, _src, _height*_pitch, _err); + total += bx::write(_writer, _src, _height*_srcPitch, _err); } else { - uint8_t* data = (uint8_t*)_src; - for (uint32_t yy = 0; yy < _height; ++yy) + const uint8_t* data = (const uint8_t*)_src; + for (uint32_t yy = 0; yy < _height && _err->isOk(); ++yy) { - bx::write(_writer, data, dstPitch, _err); - data += _pitch; + total += bx::write(_writer, data, dstPitch, _err); + data += _srcPitch; } } + + return total; } - static int32_t imageWriteKtxHeader(bx::WriterI* _writer, TextureFormat::Enum _format, bool _cubeMap, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips, bx::Error* _err) + template + class HashWriter : public bx::WriterI { - BX_ERROR_SCOPE(_err); - - const KtxFormatInfo& tfi = s_translateKtxFormat[_format]; - - int32_t size = 0; - size += bx::write(_writer, "\xabKTX 11\xbb\r\n\x1a\n", 12, _err); - size += bx::write(_writer, uint32_t(0x04030201), _err); - size += bx::write(_writer, uint32_t(0), _err); // glType - size += bx::write(_writer, uint32_t(1), _err); // glTypeSize - size += bx::write(_writer, uint32_t(0), _err); // glFormat - size += bx::write(_writer, tfi.m_internalFmt, _err); // glInternalFormat - size += bx::write(_writer, tfi.m_fmt, _err); // glBaseInternalFormat - size += bx::write(_writer, _width, _err); - size += bx::write(_writer, _height, _err); - size += bx::write(_writer, _depth, _err); - size += bx::write(_writer, uint32_t(0), _err); // numberOfArrayElements - size += bx::write(_writer, _cubeMap ? uint32_t(6) : uint32_t(0), _err); - size += bx::write(_writer, uint32_t(_numMips), _err); - size += bx::write(_writer, uint32_t(0), _err); // Meta-data size. - - BX_WARN(size == 64, "KTX: Failed to write header size %d (expected: %d).", size, 64); - return size; - } - - void imageWriteKtx(bx::WriterI* _writer, TextureFormat::Enum _format, bool _cubeMap, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips, const void* _src, bx::Error* _err) - { - BX_ERROR_SCOPE(_err); - - imageWriteKtxHeader(_writer, _format, _cubeMap, _width, _height, _depth, _numMips, _err); - - const ImageBlockInfo& blockInfo = s_imageBlockInfo[_format]; - const uint8_t bpp = blockInfo.bitsPerPixel; - const uint32_t blockWidth = blockInfo.blockWidth; - const uint32_t blockHeight = blockInfo.blockHeight; - const uint32_t minBlockX = blockInfo.minBlockX; - const uint32_t minBlockY = blockInfo.minBlockY; - - const uint8_t* src = (const uint8_t*)_src; - uint32_t width = _width; - uint32_t height = _height; - uint32_t depth = _depth; - - for (uint8_t lod = 0, num = _numMips; lod < num; ++lod) + public: + HashWriter(bx::WriterI* _writer) + : m_writer(_writer) { - width = bx::uint32_max(blockWidth * minBlockX, ( (width + blockWidth - 1) / blockWidth )*blockWidth); - height = bx::uint32_max(blockHeight * minBlockY, ( (height + blockHeight - 1) / blockHeight)*blockHeight); - depth = bx::uint32_max(1, depth); - - uint32_t size = width*height*depth*bpp/8; - bx::write(_writer, size, _err); - - for (uint8_t side = 0, numSides = _cubeMap ? 6 : 1; side < numSides; ++side) - { - bx::write(_writer, src, size, _err); - src += size; - } - - width >>= 1; - height >>= 1; - depth >>= 1; + begin(); } - } - void imageWriteKtx(bx::WriterI* _writer, ImageContainer& _imageContainer, const void* _data, uint32_t _size, bx::Error* _err) + void begin() + { + m_hash.begin(); + } + + uint32_t end() + { + return m_hash.end(); + } + + virtual int32_t write(const void* _data, int32_t _size, bx::Error* _err) override + { + m_hash.add(_data, _size); + return m_writer->write(_data, _size, _err); + } + + private: + Ty m_hash; + bx::WriterI* m_writer; + }; + + int32_t imageWritePng(bx::WriterI* _writer, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src, bool _grayscale, bool _yflip, bx::Error* _err) { BX_ERROR_SCOPE(_err); - imageWriteKtxHeader(_writer + int32_t total = 0; + total += bx::write(_writer, "\x89PNG\r\n\x1a\n", _err); + total += bx::write(_writer, bx::toBigEndian(13), _err); + + HashWriter writerC(_writer); + total += bx::write(&writerC, "IHDR", _err); + total += bx::write(&writerC, bx::toBigEndian(_width), _err); + total += bx::write(&writerC, bx::toBigEndian(_height), _err); + total += bx::write(&writerC, "\x08\x06", _err); + total += bx::writeRep(&writerC, 0, 3, _err); + total += bx::write(_writer, bx::toBigEndian(writerC.end() ), _err); + + const uint32_t bpp = _grayscale ? 8 : 32; + const uint32_t stride = _width*bpp/8; + const uint16_t zlen = bx::toLittleEndian(uint16_t(stride + 1) ); + const uint16_t zlenC = bx::toLittleEndian(~zlen); + + total += bx::write(_writer, bx::toBigEndian(_height*(stride+6)+6), _err); + + writerC.begin(); + total += bx::write(&writerC, "IDAT", _err); + total += bx::write(&writerC, "\x78\x9c", _err); + + const uint8_t* data = (const uint8_t*)_src; + int32_t step = int32_t(_srcPitch); + if (_yflip) + { + data += _srcPitch*_height - _srcPitch; + step = -step; + } + + HashWriter writerA(&writerC); + + for (uint32_t ii = 0; ii < _height && _err->isOk(); ++ii) + { + total += bx::write(&writerC, uint8_t(ii == _height-1 ? 1 : 0), _err); + total += bx::write(&writerC, zlen, _err); + total += bx::write(&writerC, zlenC, _err); + + total += bx::write(&writerA, uint8_t(0), _err); + + if (_grayscale) + { + total += bx::write(&writerA, data, stride, _err); + } + else + { + for (uint32_t xx = 0; xx < _width; ++xx) + { + const uint8_t* bgra = &data[xx*4]; + const uint8_t bb = bgra[0]; + const uint8_t gg = bgra[1]; + const uint8_t rr = bgra[2]; + const uint8_t aa = bgra[3]; + total += bx::write(&writerA, rr, _err); + total += bx::write(&writerA, gg, _err); + total += bx::write(&writerA, bb, _err); + total += bx::write(&writerA, aa, _err); + } + } + + data += step; + } + total += bx::write(&writerC, bx::toBigEndian(writerA.end() ), _err); + total += bx::write(_writer, bx::toBigEndian(writerC.end() ), _err); + + total += bx::write(&writerC, uint32_t(0), _err); + writerC.begin(); + total += bx::write(&writerC, "IEND", _err); + total += bx::write(_writer, bx::toBigEndian(writerC.end() ), _err); + + return total; + } + + static int32_t imageWriteDdsHeader(bx::WriterI* _writer, TextureFormat::Enum _format, bool _cubeMap, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips, bx::Error* _err) + { + BX_ERROR_SCOPE(_err); + + uint32_t ddspf = UINT32_MAX; + uint32_t dxgiFormat = UINT32_MAX; + + for (uint32_t ii = 0; ii < BX_COUNTOF(s_translateDdsPixelFormat); ++ii) + { + if (s_translateDdsPixelFormat[ii].m_textureFormat == _format) + { + ddspf = ii; + break; + } + } + + if (UINT32_MAX == ddspf) + { + for (uint32_t ii = 0; ii < BX_COUNTOF(s_translateDxgiFormat); ++ii) + { + if (s_translateDxgiFormat[ii].m_textureFormat == _format) + { + dxgiFormat = s_translateDxgiFormat[ii].m_format; + break; + } + } + + if (UINT32_MAX == dxgiFormat) + { + BX_ERROR_SET(_err, BIMG_ERROR, "DDS: DXGI format not supported."); + return 0; + } + } + + const uint32_t bpp = getBitsPerPixel(_format); + + uint32_t total = 0; + total += bx::write(_writer, uint32_t(DDS_MAGIC), _err); + + uint32_t headerStart = total; + total += bx::write(_writer, uint32_t(DDS_HEADER_SIZE), _err); + total += bx::write(_writer, uint32_t(0 + | DDSD_HEIGHT + | DDSD_WIDTH + | DDSD_PIXELFORMAT + | DDSD_CAPS + | (1 < _depth ? DDSD_DEPTH : 0) + | (1 < _numMips ? DDSD_MIPMAPCOUNT : 0) + | (isCompressed(_format) ? DDSD_LINEARSIZE : DDSD_PITCH) + ) + , _err + ); + const uint32_t pitchOrLinearSize = isCompressed(_format) + ? _width*_height*bpp/8 + : _width*bpp/8 + ; + + total += bx::write(_writer, _height, _err); + total += bx::write(_writer, _width, _err); + total += bx::write(_writer, pitchOrLinearSize, _err); + total += bx::write(_writer, _depth, _err); + total += bx::write(_writer, uint32_t(_numMips), _err); + + total += bx::writeRep(_writer, 0, 44, _err); // reserved1 + + if (UINT32_MAX != ddspf) + { + const TranslateDdsPixelFormat& pf = s_translateDdsPixelFormat[ddspf]; + + total += bx::write(_writer, uint32_t(8*sizeof(uint32_t) ), _err); // pixelFormatSize + total += bx::write(_writer, pf.m_flags, _err); + total += bx::write(_writer, uint32_t(0), _err); + total += bx::write(_writer, pf.m_bitCount, _err); + total += bx::write(_writer, pf.m_bitmask, _err); + } + else + { + total += bx::write(_writer, uint32_t(8*sizeof(uint32_t) ), _err); // pixelFormatSize + total += bx::write(_writer, uint32_t(DDPF_FOURCC), _err); + total += bx::write(_writer, uint32_t(DDS_DX10), _err); + total += bx::write(_writer, uint32_t(0), _err); // bitCount + total += bx::writeRep(_writer, 0, 4*sizeof(uint32_t), _err); // bitmask + } + + uint32_t caps[4] = + { + uint32_t(DDSCAPS_TEXTURE | (1 < _numMips ? DDSCAPS_COMPLEX|DDSCAPS_MIPMAP : 0) ), + uint32_t(_cubeMap ? DDSCAPS2_CUBEMAP|DSCAPS2_CUBEMAP_ALLSIDES : 0), + 0, + 0, + }; + total += bx::write(_writer, caps, sizeof(caps) ); + + total += bx::writeRep(_writer, 0, 4, _err); // reserved2 + + BX_WARN(total-headerStart == DDS_HEADER_SIZE + , "DDS: Failed to write header size %d (expected: %d)." + , total-headerStart + , DDS_HEADER_SIZE + ); + + if (UINT32_MAX != dxgiFormat) + { + total += bx::write(_writer, dxgiFormat); + total += bx::write(_writer, uint32_t(1 < _depth ? DDS_DX10_DIMENSION_TEXTURE3D : DDS_DX10_DIMENSION_TEXTURE2D), _err); // dims + total += bx::write(_writer, uint32_t(_cubeMap ? DDS_DX10_MISC_TEXTURECUBE : 0), _err); // miscFlags + total += bx::write(_writer, uint32_t(1), _err); // arraySize + total += bx::write(_writer, uint32_t(0), _err); // miscFlags2 + + BX_WARN(total-headerStart == DDS_HEADER_SIZE+20 + , "DDS: Failed to write header size %d (expected: %d)." + , total-headerStart + , DDS_HEADER_SIZE+20 + ); + BX_UNUSED(headerStart); + } + + return total; + } + + int32_t imageWriteDds(bx::WriterI* _writer, ImageContainer& _imageContainer, const void* _data, uint32_t _size, bx::Error* _err) + { + BX_ERROR_SCOPE(_err); + + int32_t total = 0; + total += imageWriteDdsHeader(_writer , TextureFormat::Enum(_imageContainer.m_format) , _imageContainer.m_cubeMap , _imageContainer.m_width @@ -3265,20 +3610,334 @@ namespace bimg , _err ); - for (uint8_t lod = 0, num = _imageContainer.m_numMips; lod < num; ++lod) + if (!_err->isOk() ) { - ImageMip mip; - imageGetRawData(_imageContainer, 0, lod, _data, _size, mip); - bx::write(_writer, mip.m_size, _err); + return total; + } - for (uint8_t side = 0, numSides = _imageContainer.m_cubeMap ? 6 : 1; side < numSides; ++side) + for (uint8_t side = 0, numSides = _imageContainer.m_cubeMap ? 6 : 1; side < numSides && _err->isOk(); ++side) + { + for (uint8_t lod = 0, num = _imageContainer.m_numMips; lod < num && _err->isOk(); ++lod) { + ImageMip mip; if (imageGetRawData(_imageContainer, side, lod, _data, _size, mip) ) { - bx::write(_writer, mip.m_data, mip.m_size, _err); + total += bx::write(_writer, mip.m_data, mip.m_size, _err); } } } + + return total; + } + + static int32_t imageWriteKtxHeader(bx::WriterI* _writer, TextureFormat::Enum _format, bool _cubeMap, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips, uint32_t _numLayers, bx::Error* _err) + { + BX_ERROR_SCOPE(_err); + + const KtxFormatInfo& tfi = s_translateKtxFormat[_format]; + + int32_t total = 0; + total += bx::write(_writer, "\xabKTX 11\xbb\r\n\x1a\n", 12, _err); + total += bx::write(_writer, uint32_t(0x04030201), _err); + total += bx::write(_writer, uint32_t(0), _err); // glType + total += bx::write(_writer, uint32_t(1), _err); // glTypeSize + total += bx::write(_writer, uint32_t(0), _err); // glFormat + total += bx::write(_writer, tfi.m_internalFmt, _err); // glInternalFormat + total += bx::write(_writer, tfi.m_fmt, _err); // glBaseInternalFormat + total += bx::write(_writer, _width, _err); + total += bx::write(_writer, _height, _err); + total += bx::write(_writer, _depth, _err); + total += bx::write(_writer, _numLayers, _err); // numberOfArrayElements + total += bx::write(_writer, _cubeMap ? uint32_t(6) : uint32_t(0), _err); + total += bx::write(_writer, uint32_t(_numMips), _err); + total += bx::write(_writer, uint32_t(0), _err); // Meta-data size. + + BX_WARN(total == 64, "KTX: Failed to write header size %d (expected: %d).", total, 64); + return total; + } + + int32_t imageWriteKtx(bx::WriterI* _writer, TextureFormat::Enum _format, bool _cubeMap, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips, uint32_t _numLayers, const void* _src, bx::Error* _err) + { + BX_ERROR_SCOPE(_err); + + int32_t total = 0; + total += imageWriteKtxHeader(_writer, _format, _cubeMap, _width, _height, _depth, _numMips, _numLayers, _err); + + if (!_err->isOk() ) + { + return total; + } + + const ImageBlockInfo& blockInfo = s_imageBlockInfo[_format]; + const uint8_t bpp = blockInfo.bitsPerPixel; + const uint32_t blockWidth = blockInfo.blockWidth; + const uint32_t blockHeight = blockInfo.blockHeight; + const uint32_t minBlockX = blockInfo.minBlockX; + const uint32_t minBlockY = blockInfo.minBlockY; + + const uint8_t* src = (const uint8_t*)_src; + + const uint32_t numLayers = bx::uint32_max(_numLayers, 1); + const uint32_t numSides = _cubeMap ? 6 : 1; + + uint32_t width = _width; + uint32_t height = _height; + uint32_t depth = _depth; + + for (uint8_t lod = 0; lod < _numMips && _err->isOk(); ++lod) + { + width = bx::uint32_max(blockWidth * minBlockX, ( (width + blockWidth - 1) / blockWidth )*blockWidth); + height = bx::uint32_max(blockHeight * minBlockY, ( (height + blockHeight - 1) / blockHeight)*blockHeight); + depth = bx::uint32_max(1, depth); + + const uint32_t mipSize = width*height*depth*bpp/8; + const uint32_t size = mipSize*numLayers*numSides; + total += bx::write(_writer, size, _err); + + for (uint32_t layer = 0; layer < numLayers && _err->isOk(); ++layer) + { + for (uint8_t side = 0; side < numSides && _err->isOk(); ++side) + { + total += bx::write(_writer, src, size, _err); + src += size; + } + } + + width >>= 1; + height >>= 1; + depth >>= 1; + } + + return total; + } + + int32_t imageWriteKtx(bx::WriterI* _writer, ImageContainer& _imageContainer, const void* _data, uint32_t _size, bx::Error* _err) + { + BX_ERROR_SCOPE(_err); + + int32_t total = 0; + total += imageWriteKtxHeader(_writer + , TextureFormat::Enum(_imageContainer.m_format) + , _imageContainer.m_cubeMap + , _imageContainer.m_width + , _imageContainer.m_height + , _imageContainer.m_depth + , _imageContainer.m_numMips + , _imageContainer.m_numLayers + , _err + ); + + if (!_err->isOk() ) + { + return total; + } + + const uint32_t numMips = _imageContainer.m_numMips; + const uint32_t numLayers = bx::uint32_max(_imageContainer.m_numLayers, 1); + const uint32_t numSides = _imageContainer.m_cubeMap ? 6 : 1; + + for (uint8_t lod = 0; lod < numMips && _err->isOk(); ++lod) + { + ImageMip mip; + imageGetRawData(_imageContainer, 0, lod, _data, _size, mip); + + const uint32_t size = mip.m_size*numSides*numLayers; + total += bx::write(_writer, size, _err); + + for (uint32_t layer = 0; layer < numLayers && _err->isOk(); ++layer) + { + for (uint8_t side = 0; side < numSides && _err->isOk(); ++side) + { + if (imageGetRawData(_imageContainer, uint16_t(layer*numSides + side), lod, _data, _size, mip) ) + { + total += bx::write(_writer, mip.m_data, mip.m_size, _err); + } + } + } + } + + return total; + } + + // +----------+ + // |-z 2| + // | ^ +y | + // | | | + // | +---->+x | + // +----------+----------+----------+----------+ + // |+y 1|+y 4|+y 0|+y 5| + // | ^ -x | ^ +z | ^ +x | ^ -z | + // | | | | | | | | | + // | +---->+z | +---->+x | +---->-z | +---->-x | + // +----------+----------+----------+----------+ + // |+z 3| + // | ^ -y | + // | | | + // | +---->+x | + // +----------+ + // + struct CubeMapFace + { + float uv[3][3]; + }; + + static const CubeMapFace s_cubeMapFace[] = + { + {{ // +x face + { 0.0f, 0.0f, -1.0f }, // u -> -z + { 0.0f, -1.0f, 0.0f }, // v -> -y + { 1.0f, 0.0f, 0.0f }, // +x face + }}, + {{ // -x face + { 0.0f, 0.0f, 1.0f }, // u -> +z + { 0.0f, -1.0f, 0.0f }, // v -> -y + { -1.0f, 0.0f, 0.0f }, // -x face + }}, + {{ // +y face + { 1.0f, 0.0f, 0.0f }, // u -> +x + { 0.0f, 0.0f, 1.0f }, // v -> +z + { 0.0f, 1.0f, 0.0f }, // +y face + }}, + {{ // -y face + { 1.0f, 0.0f, 0.0f }, // u -> +x + { 0.0f, 0.0f, -1.0f }, // v -> -z + { 0.0f, -1.0f, 0.0f }, // -y face + }}, + {{ // +z face + { 1.0f, 0.0f, 0.0f }, // u -> +x + { 0.0f, -1.0f, 0.0f }, // v -> -y + { 0.0f, 0.0f, 1.0f }, // +z face + }}, + {{ // -z face + { -1.0f, 0.0f, 0.0f }, // u -> -x + { 0.0f, -1.0f, 0.0f }, // v -> -y + { 0.0f, 0.0f, -1.0f }, // -z face + }}, + }; + + /// _u and _v should be center addressing and in [-1.0+invSize..1.0-invSize] range. + void texelUvToDir(float* _result, uint8_t _side, float _u, float _v) + { + const CubeMapFace& face = s_cubeMapFace[_side]; + + float tmp[3]; + tmp[0] = face.uv[0][0] * _u + face.uv[1][0] * _v + face.uv[2][0]; + tmp[1] = face.uv[0][1] * _u + face.uv[1][1] * _v + face.uv[2][1]; + tmp[2] = face.uv[0][2] * _u + face.uv[1][2] * _v + face.uv[2][2]; + bx::vec3Norm(_result, tmp); + } + + ImageContainer* imageCubemapFromLatLongRgba32F(bx::AllocatorI* _allocator, const ImageContainer& _input, bool _useBilinearInterpolation, bx::Error* _err) + { + BX_ERROR_SCOPE(_err); + + if (_input.m_depth != 1 + && _input.m_numLayers != 1 + && _input.m_format != TextureFormat::RGBA32F + && _input.m_width/2 != _input.m_height) + { + BX_ERROR_SET(_err, BIMG_ERROR, "Input image format is not equirectangular projection."); + return NULL; + } + + const uint32_t srcWidthMinusOne = _input.m_width-1; + const uint32_t srcHeightMinusOne = _input.m_height-1; + const uint32_t srcPitch = _input.m_width*16; + const uint32_t dstWidth = _input.m_height/2; + const uint32_t dstPitch = dstWidth*16; + const float invDstWidth = 1.0f / float(dstWidth); + + ImageContainer* output = imageAlloc(_allocator + , _input.m_format + , uint16_t(dstWidth) + , uint16_t(dstWidth) + , uint16_t(1) + , 1 + , true + , false + ); + + const uint8_t* srcData = (const uint8_t*)_input.m_data; + + for (uint8_t side = 0; side < 6 && _err->isOk(); ++side) + { + ImageMip mip; + imageGetRawData(*output, side, 0, output->m_data, output->m_size, mip); + + for (uint32_t yy = 0; yy < dstWidth; ++yy) + { + for (uint32_t xx = 0; xx < dstWidth; ++xx) + { + float* dstData = (float*)&mip.m_data[yy*dstPitch+xx*16]; + + const float uu = 2.0f*xx*invDstWidth - 1.0f; + const float vv = 2.0f*yy*invDstWidth - 1.0f; + + float dir[3]; + texelUvToDir(dir, side, uu, vv); + + float srcU, srcV; + bx::vec3ToLatLong(&srcU, &srcV, dir); + + srcU *= srcWidthMinusOne; + srcV *= srcHeightMinusOne; + + if (_useBilinearInterpolation) + { + const uint32_t x0 = uint32_t(srcU); + const uint32_t y0 = uint32_t(srcV); + const uint32_t x1 = bx::min(x0 + 1, srcWidthMinusOne); + const uint32_t y1 = bx::min(y0 + 1, srcHeightMinusOne); + + const float* src0 = (const float*)&srcData[y0*srcPitch + x0*16]; + const float* src1 = (const float*)&srcData[y0*srcPitch + x1*16]; + const float* src2 = (const float*)&srcData[y1*srcPitch + x0*16]; + const float* src3 = (const float*)&srcData[y1*srcPitch + x1*16]; + + const float tx = srcU - float(int32_t(x0) ); + const float ty = srcV - float(int32_t(y0) ); + const float omtx = 1.0f - tx; + const float omty = 1.0f - ty; + + float p0[4]; + bx::vec4Mul(p0, src0, omtx*omty); + + float p1[4]; + bx::vec4Mul(p1, src1, tx*omty); + + float p2[4]; + bx::vec4Mul(p2, src2, omtx*ty); + + float p3[4]; + bx::vec4Mul(p3, src3, tx*ty); + + const float rr = p0[0] + p1[0] + p2[0] + p3[0]; + const float gg = p0[1] + p1[1] + p2[1] + p3[1]; + const float bb = p0[2] + p1[2] + p2[2] + p3[2]; + const float aa = p0[3] + p1[3] + p2[3] + p3[3]; + + dstData[0] = rr; + dstData[1] = gg; + dstData[2] = bb; + dstData[3] = aa; + } + else + { + const uint32_t x0 = uint32_t(srcU); + const uint32_t y0 = uint32_t(srcV); + const float* src0 = (const float*)&srcData[y0*srcPitch + x0*16]; + + dstData[0] = src0[0]; + dstData[1] = src0[1]; + dstData[2] = src0[2]; + dstData[3] = src0[3]; + } + + } + } + } + + return output; } } // namespace bimg diff --git a/3rdparty/bimg/src/image_decode.cpp b/3rdparty/bimg/src/image_decode.cpp index a231567..e2646ab 100644 --- a/3rdparty/bimg/src/image_decode.cpp +++ b/3rdparty/bimg/src/image_decode.cpp @@ -1,6 +1,6 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause */ #include "bimg_p.h" @@ -28,7 +28,6 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4127) // warning C4127: conditional expression #define LODEPNG_NO_COMPILE_ENCODER #define LODEPNG_NO_COMPILE_DISK #define LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS -#define LODEPNG_NO_COMPILE_ERROR_TEXT #define LODEPNG_NO_COMPILE_ALLOCATORS #define LODEPNG_NO_COMPILE_CPP #include @@ -57,6 +56,9 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Warray-bounds"); #if BX_COMPILER_GCC >= 60000 BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Wmisleading-indentation"); BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Wshift-negative-value"); +# if BX_COMPILER_GCC >= 70000 +BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Wimplicit-fallthrough"); +# endif // BX_COMPILER_GCC >= 70000 #endif // BX_COMPILER_GCC >= 60000_ #define STBI_MALLOC(_size) lodepng_malloc(_size) #define STBI_REALLOC(_ptr, _size) lodepng_realloc(_ptr, _size) @@ -67,8 +69,10 @@ BX_PRAGMA_DIAGNOSTIC_POP(); namespace bimg { - static ImageContainer* imageParseLodePng(bx::AllocatorI* _allocator, const void* _data, uint32_t _size) + static ImageContainer* imageParseLodePng(bx::AllocatorI* _allocator, const void* _data, uint32_t _size, bx::Error* _err) { + BX_ERROR_SCOPE(_err); + static uint8_t pngMagic[] = { 0x89, 0x50, 0x4E, 0x47, 0x0d, 0x0a }; if (0 != bx::memCmp(_data, pngMagic, sizeof(pngMagic) ) ) @@ -89,30 +93,52 @@ namespace bimg uint8_t* data = NULL; error = lodepng_decode(&data, &width, &height, &state, (uint8_t*)_data, _size); - if (0 == error) + if (0 != error) { + _err->setError(BIMG_ERROR, lodepng_error_text(error) ); + } + else + { + bool palette = false; + bool supported = false; + switch (state.info_raw.bitdepth) { + case 1: + case 2: + case 4: + format = bimg::TextureFormat::R8; + palette = false; + supported = true; + break; + case 8: switch (state.info_raw.colortype) { case LCT_GREY: format = bimg::TextureFormat::R8; + supported = true; break; case LCT_GREY_ALPHA: format = bimg::TextureFormat::RG8; + supported = true; break; case LCT_RGB: format = bimg::TextureFormat::RGB8; + supported = true; break; case LCT_RGBA: format = bimg::TextureFormat::RGBA8; + supported = true; break; case LCT_PALETTE: + format = bimg::TextureFormat::RGBA8; + palette = true; + supported = true; break; } break; @@ -127,6 +153,7 @@ namespace bimg rgba[0] = bx::toHostEndian(rgba[0], false); } format = bimg::TextureFormat::R16; + supported = true; break; case LCT_GREY_ALPHA: @@ -137,6 +164,19 @@ namespace bimg rgba[1] = bx::toHostEndian(rgba[1], false); } format = bimg::TextureFormat::RG16; + supported = true; + break; + + case LCT_RGB: + for (uint32_t ii = 0, num = width*height; ii < num; ++ii) + { + uint16_t* rgba = (uint16_t*)data + ii*3; + rgba[0] = bx::toHostEndian(rgba[0], false); + rgba[1] = bx::toHostEndian(rgba[1], false); + rgba[2] = bx::toHostEndian(rgba[2], false); + } + format = bimg::TextureFormat::RGBA16; + supported = true; break; case LCT_RGBA: @@ -149,9 +189,9 @@ namespace bimg rgba[3] = bx::toHostEndian(rgba[3], false); } format = bimg::TextureFormat::RGBA16; + supported = true; break; - case LCT_RGB: case LCT_PALETTE: break; } @@ -161,16 +201,113 @@ namespace bimg break; } - output = imageAlloc(_allocator - , format - , uint16_t(width) - , uint16_t(height) - , 0 - , 1 - , false - , false - , data - ); + if (supported) + { + const uint8_t* copyData = data; + + TextureFormat::Enum dstFormat = format; + if (1 == state.info_raw.bitdepth + || 2 == state.info_raw.bitdepth + || 4 == state.info_raw.bitdepth) + { + copyData = NULL; + } + else if (16 == state.info_raw.bitdepth + && LCT_RGB == state.info_raw.colortype) + { + dstFormat = bimg::TextureFormat::RGBA16; + copyData = NULL; + } + else if (palette) + { + copyData = NULL; + } + + output = imageAlloc(_allocator + , dstFormat + , uint16_t(width) + , uint16_t(height) + , 0 + , 1 + , false + , false + , copyData + ); + + if (1 == state.info_raw.bitdepth) + { + for (uint32_t ii = 0, num = width*height/8; ii < num; ++ii) + { + uint8_t* src = (uint8_t*)data + ii; + uint8_t eightBits = src[0]; + + uint8_t* dst = (uint8_t*)output->m_data + ii*8; + dst[0] = uint8_t( (eightBits>>7)&0x1)*255; + dst[1] = uint8_t( (eightBits>>6)&0x1)*255; + dst[2] = uint8_t( (eightBits>>5)&0x1)*255; + dst[3] = uint8_t( (eightBits>>4)&0x1)*255; + dst[4] = uint8_t( (eightBits>>3)&0x1)*255; + dst[5] = uint8_t( (eightBits>>2)&0x1)*255; + dst[6] = uint8_t( (eightBits>>1)&0x1)*255; + dst[7] = uint8_t( (eightBits )&0x1)*255; + + } + } + else if (2 == state.info_raw.bitdepth) + { + for (uint32_t ii = 0, num = width*height/4; ii < num; ++ii) + { + uint8_t* src = (uint8_t*)data + ii; + uint8_t eightBits = src[0]; + + uint8_t* dst = (uint8_t*)output->m_data + ii*4; + // Note: not exactly precise. + // Correct way: dst[0] = uint8_t(float( (eightBits>>6)&0x3)*(255.0f/4.0f) ); + dst[0] = uint8_t(uint32_t(((eightBits>>6)&0x3)*64)&0xff); + dst[1] = uint8_t(uint32_t(((eightBits>>4)&0x3)*64)&0xff); + dst[2] = uint8_t(uint32_t(((eightBits>>2)&0x3)*64)&0xff); + dst[3] = uint8_t(uint32_t(((eightBits )&0x3)*64)&0xff); + } + } + else if (4 == state.info_raw.bitdepth) + { + for (uint32_t ii = 0, num = width*height/2; ii < num; ++ii) + { + uint8_t* src = (uint8_t*)data + ii; + uint8_t eightBits = src[0]; + + uint8_t* dst = (uint8_t*)output->m_data + ii*2; + // Note: not exactly precise. + // Correct way: dst[0] = uint8_t(float( (eightBits>>4)&0xf)*(255.0f/16.0f) ); + dst[0] = uint8_t(uint32_t(((eightBits>>4)&0xf)*16)&0xff); + dst[1] = uint8_t(uint32_t(((eightBits )&0xf)*16)&0xff); + } + } + else if (16 == state.info_raw.bitdepth + && LCT_RGB == state.info_raw.colortype) + { + for (uint32_t ii = 0, num = width*height; ii < num; ++ii) + { + const uint16_t* src = (uint16_t*)data + ii*3; + uint16_t* dst = (uint16_t*)output->m_data + ii*4; + dst[0] = src[0]; + dst[1] = src[1]; + dst[2] = src[2]; + dst[3] = UINT16_MAX; + } + } + else if (palette) + { + for (uint32_t ii = 0, num = width*height; ii < num; ++ii) + { + bx::memCopy( (uint8_t*)output->m_data + ii*4, state.info_raw.palette + data[ii]*4, 4); + } + } + } + else + { + BX_ERROR_SET(_err, BIMG_ERROR, "PNG: Unsupported format."); + } } lodepng_state_cleanup(&state); @@ -179,8 +316,10 @@ namespace bimg return output; } - static ImageContainer* imageParseTinyExr(bx::AllocatorI* _allocator, const void* _data, uint32_t _size) + static ImageContainer* imageParseTinyExr(bx::AllocatorI* _allocator, const void* _data, uint32_t _size, bx::Error* _err) { + BX_ERROR_SCOPE(_err); + EXRVersion exrVersion; int result = ParseEXRVersionFromMemory(&exrVersion, (uint8_t*)_data, _size); if (TINYEXR_SUCCESS != result) @@ -212,22 +351,22 @@ namespace bimg { const EXRChannelInfo& channel = exrHeader.channels[ii]; if (UINT8_MAX == idxR - && 0 == bx::strncmp(channel.name, "R") ) + && 0 == bx::strCmp(channel.name, "R") ) { idxR = ii; } else if (UINT8_MAX == idxG - && 0 == bx::strncmp(channel.name, "G") ) + && 0 == bx::strCmp(channel.name, "G") ) { idxG = ii; } else if (UINT8_MAX == idxB - && 0 == bx::strncmp(channel.name, "B") ) + && 0 == bx::strCmp(channel.name, "B") ) { idxB = ii; } else if (UINT8_MAX == idxA - && 0 == bx::strncmp(channel.name, "A") ) + && 0 == bx::strCmp(channel.name, "A") ) { idxA = ii; } @@ -268,81 +407,140 @@ namespace bimg stepA = 1; } - data = (uint8_t*)BX_ALLOC(_allocator, exrImage.width * exrImage.height * dstBpp/8); + data = (uint8_t*)BX_ALLOC(_allocator, exrImage.width * exrImage.height * dstBpp/8); + width = exrImage.width; + height = exrImage.height; - const float zero = 0.0f; - const float* srcR = UINT8_MAX == idxR ? &zero : (const float*)(exrImage.images)[idxR]; - const float* srcG = UINT8_MAX == idxG ? &zero : (const float*)(exrImage.images)[idxG]; - const float* srcB = UINT8_MAX == idxB ? &zero : (const float*)(exrImage.images)[idxB]; - const float* srcA = UINT8_MAX == idxA ? &zero : (const float*)(exrImage.images)[idxA]; - - const uint32_t bytesPerPixel = dstBpp/8; - for (uint32_t ii = 0, num = exrImage.width * exrImage.height; ii < num; ++ii) + if (asFloat) { - float rgba[4] = - { - *srcR, - *srcG, - *srcB, - *srcA, - }; - bx::memCopy(&data[ii * bytesPerPixel], rgba, bytesPerPixel); + const float zero = 0.0f; + const float* srcR = UINT8_MAX == idxR ? &zero : (const float*)(exrImage.images)[idxR]; + const float* srcG = UINT8_MAX == idxG ? &zero : (const float*)(exrImage.images)[idxG]; + const float* srcB = UINT8_MAX == idxB ? &zero : (const float*)(exrImage.images)[idxB]; + const float* srcA = UINT8_MAX == idxA ? &zero : (const float*)(exrImage.images)[idxA]; - srcR += stepR; - srcG += stepG; - srcB += stepB; - srcA += stepA; + const uint32_t bytesPerPixel = dstBpp/8; + for (uint32_t ii = 0, num = exrImage.width * exrImage.height; ii < num; ++ii) + { + float rgba[4] = + { + *srcR, + *srcG, + *srcB, + *srcA, + }; + bx::memCopy(&data[ii * bytesPerPixel], rgba, bytesPerPixel); + + srcR += stepR; + srcG += stepG; + srcB += stepB; + srcA += stepA; + } } + else + { + const uint16_t zero = 0; + const uint16_t* srcR = UINT8_MAX == idxR ? &zero : (const uint16_t*)(exrImage.images)[idxR]; + const uint16_t* srcG = UINT8_MAX == idxG ? &zero : (const uint16_t*)(exrImage.images)[idxG]; + const uint16_t* srcB = UINT8_MAX == idxB ? &zero : (const uint16_t*)(exrImage.images)[idxB]; + const uint16_t* srcA = UINT8_MAX == idxA ? &zero : (const uint16_t*)(exrImage.images)[idxA]; + + const uint32_t bytesPerPixel = dstBpp/8; + for (uint32_t ii = 0, num = exrImage.width * exrImage.height; ii < num; ++ii) + { + uint16_t rgba[4] = + { + *srcR, + *srcG, + *srcB, + *srcA, + }; + bx::memCopy(&data[ii * bytesPerPixel], rgba, bytesPerPixel); + + srcR += stepR; + srcG += stepG; + srcB += stepB; + srcA += stepA; + } + } + } + else + { + BX_ERROR_SET(_err, BIMG_ERROR, "EXR: Couldn't find R channel."); } FreeEXRImage(&exrImage); } + else + { + BX_ERROR_SET(_err, BIMG_ERROR, "EXR: Failed to parse image."); + } FreeEXRHeader(&exrHeader); } + else + { + BX_ERROR_SET(_err, BIMG_ERROR, "EXR: Failed to parse header."); + } - ImageContainer* output = imageAlloc(_allocator - , format - , uint16_t(width) - , uint16_t(height) - , 0 - , 1 - , false - , false - , data - ); - BX_FREE(_allocator, data); + ImageContainer* output = NULL; + if (NULL != data) + { + output = imageAlloc(_allocator + , format + , uint16_t(width) + , uint16_t(height) + , 0 + , 1 + , false + , false + , data + ); + BX_FREE(_allocator, data); + } return output; } - static ImageContainer* imageParseStbImage(bx::AllocatorI* _allocator, const void* _data, uint32_t _size) + static ImageContainer* imageParseStbImage(bx::AllocatorI* _allocator, const void* _data, uint32_t _size, bx::Error* _err) { - const int isHdr = stbi_is_hdr_from_memory((const uint8_t*)_data, (int)_size); + BX_ERROR_SCOPE(_err); + + const int isHdr = stbi_is_hdr_from_memory( (const uint8_t*)_data, (int)_size); void* data; uint32_t width = 0; uint32_t height = 0; int comp = 0; - if (isHdr) { data = stbi_loadf_from_memory((const uint8_t*)_data, (int)_size, (int*)&width, (int*)&height, &comp, 4); } - else { data = stbi_load_from_memory ((const uint8_t*)_data, (int)_size, (int*)&width, (int*)&height, &comp, 0); } + if (isHdr) + { + data = stbi_loadf_from_memory( (const uint8_t*)_data, (int)_size, (int*)&width, (int*)&height, &comp, 4); + } + else + { + data = stbi_load_from_memory ( (const uint8_t*)_data, (int)_size, (int*)&width, (int*)&height, &comp, 0); + } if (NULL == data) { return NULL; } - bimg::TextureFormat::Enum format; + bimg::TextureFormat::Enum format = bimg::TextureFormat::RGBA8; + if (isHdr) { format = bimg::TextureFormat::RGBA32F; } else { - if (1 == comp) { format = bimg::TextureFormat::R8; } - else if (2 == comp) { format = bimg::TextureFormat::RG8; } - else if (3 == comp) { format = bimg::TextureFormat::RGB8; } - else/*if (4 == comp)*/ { format = bimg::TextureFormat::RGBA8; } + switch (comp) + { + case 1: format = bimg::TextureFormat::R8; break; + case 2: format = bimg::TextureFormat::RG8; break; + case 3: format = bimg::TextureFormat::RGB8; break; + default: break; + } } ImageContainer* output = imageAlloc(_allocator @@ -360,14 +558,151 @@ namespace bimg return output; } - ImageContainer* imageParse(bx::AllocatorI* _allocator, const void* _data, uint32_t _size, TextureFormat::Enum _dstFormat) + static ImageContainer* imageParseJpeg(bx::AllocatorI* _allocator, const void* _data, uint32_t _size, bx::Error* _err) { - ImageContainer* input = imageParseDds (_allocator, _data, _size) ; - input = NULL == input ? imageParseKtx (_allocator, _data, _size) : input; - input = NULL == input ? imageParsePvr3 (_allocator, _data, _size) : input; - input = NULL == input ? imageParseLodePng (_allocator, _data, _size) : input; - input = NULL == input ? imageParseTinyExr (_allocator, _data, _size) : input; - input = NULL == input ? imageParseStbImage(_allocator, _data, _size) : input; + bx::MemoryReader reader(_data, _size); + + bx::Error err; + + uint16_t magic = 0; + bx::readHE(&reader, magic, false, &err); + + if (!err.isOk() + || 0xffd8 != magic) + { + return NULL; + } + + Orientation::Enum orientation = Orientation::R0; + + while (err.isOk() ) + { + bx::readHE(&reader, magic, false, &err); + + uint16_t size; + bx::readHE(&reader, size, false, &err); + + if (!err.isOk() ) + { + return NULL; + } + + if (0xffe1 != magic) + { + bx::seek(&reader, size-2); + continue; + } + + char exif00[6]; + bx::read(&reader, exif00, 6, &err); + + if (0 == bx::memCmp(exif00, "Exif\0\0", 6) ) + { + uint16_t iimm = 0; + bx::read(&reader, iimm, &err); + + const bool littleEndian = iimm == 0x4949; //II - Intel - little endian + if (!err.isOk() + && !littleEndian + && iimm != 0x4d4d) // MM - Motorola - big endian + { + return NULL; + } + + bx::readHE(&reader, magic, littleEndian, &err); + if (!err.isOk() + || 0x2a != magic) + { + return NULL; + } + + uint32_t ifd0; + bx::readHE(&reader, ifd0, littleEndian, &err); + + if (!err.isOk() + || 8 > ifd0) + { + return NULL; + } + + bx::seek(&reader, ifd0-8); + + uint16_t numEntries; + bx::readHE(&reader, numEntries, littleEndian, &err); + + for (uint32_t ii = 0; err.isOk() && ii < numEntries; ++ii) + { + // https://sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html + uint16_t tag; + bx::readHE(&reader, tag, littleEndian, &err); + + uint16_t format; + bx::readHE(&reader, format, littleEndian, &err); + + uint32_t length; + bx::readHE(&reader, length, littleEndian, &err); + + uint32_t data; + bx::readHE(&reader, data, littleEndian, &err); + + switch (tag) + { + case 0x112: // orientation + if (3 == format) + { + bx::seek(&reader, -4); + + uint16_t u16; + bx::readHE(&reader, u16, littleEndian, &err); + + uint16_t pad; + bx::read(&reader, pad, &err); + + switch (u16) + { + default: + case 1: orientation = Orientation::R0; break; // Horizontal (normal) + case 2: orientation = Orientation::HFlip; break; // Mirror horizontal + case 3: orientation = Orientation::R180; break; // Rotate 180 + case 4: orientation = Orientation::VFlip; break; // Mirror vertical + case 5: orientation = Orientation::HFlipR270; break; // Mirror horizontal and rotate 270 CW + case 6: orientation = Orientation::R90; break; // Rotate 90 CW + case 7: orientation = Orientation::HFlipR90; break; // Mirror horizontal and rotate 90 CW + case 8: orientation = Orientation::R270; break; // Rotate 270 CW + } + } + break; + + default: + break; + } + } + } + + break; + } + + ImageContainer* image = imageParseStbImage(_allocator, _data, _size, _err); + if (NULL != image) + { + image->m_orientation = orientation; + } + + return image; + } + + ImageContainer* imageParse(bx::AllocatorI* _allocator, const void* _data, uint32_t _size, TextureFormat::Enum _dstFormat, bx::Error* _err) + { + BX_ERROR_SCOPE(_err); + + ImageContainer* input = imageParseDds (_allocator, _data, _size, _err) ; + input = NULL == input ? imageParseKtx (_allocator, _data, _size, _err) : input; + input = NULL == input ? imageParsePvr3 (_allocator, _data, _size, _err) : input; + input = NULL == input ? imageParseGnf (_allocator, _data, _size, _err) : input; + input = NULL == input ? imageParseLodePng (_allocator, _data, _size, _err) : input; + input = NULL == input ? imageParseTinyExr (_allocator, _data, _size, _err) : input; + input = NULL == input ? imageParseJpeg (_allocator, _data, _size, _err) : input; + input = NULL == input ? imageParseStbImage(_allocator, _data, _size, _err) : input; if (NULL == input) { diff --git a/3rdparty/bimg/src/image_encode.cpp b/3rdparty/bimg/src/image_encode.cpp index e06e5f9..7f53289 100644 --- a/3rdparty/bimg/src/image_encode.cpp +++ b/3rdparty/bimg/src/image_encode.cpp @@ -1,8 +1,9 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause */ +#include #include "bimg_p.h" #include @@ -12,173 +13,296 @@ #include #include +BX_PRAGMA_DIAGNOSTIC_PUSH(); +BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4100) // warning C4100: 'alloc_context': unreferenced formal parameter +BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4702) // warning C4702: unreachable code +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-parameter") // warning: unused parameter ‘alloc_context’ [-Wunused-parameter] +#define STB_IMAGE_RESIZE_IMPLEMENTATION +#include +BX_PRAGMA_DIAGNOSTIC_POP(); + +extern "C" { +#include +} + namespace bimg { - bool imageEncodeFromRgba8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, TextureFormat::Enum _format) + static uint32_t s_squishQuality[] = { - switch (_format) - { - case TextureFormat::BC1: - case TextureFormat::BC2: - case TextureFormat::BC3: - case TextureFormat::BC4: - case TextureFormat::BC5: - squish::CompressImage( (const uint8_t*)_src, _width, _height, _dst - , _format == TextureFormat::BC2 ? squish::kDxt3 - : _format == TextureFormat::BC3 ? squish::kDxt5 - : _format == TextureFormat::BC4 ? squish::kBc4 - : _format == TextureFormat::BC5 ? squish::kBc5 - : squish::kDxt1 - ); - return true; + squish::kColourClusterFit, // Default + squish::kColourIterativeClusterFit, // Highest + squish::kColourRangeFit, // Fastest + }; + BX_STATIC_ASSERT(Quality::Count == BX_COUNTOF(s_squishQuality) ); - case TextureFormat::BC6H: - nvtt::compressBC6H( (const uint8_t*)_src, _width, _height, 4, _dst); - return true; - - case TextureFormat::BC7: - nvtt::compressBC7( (const uint8_t*)_src, _width, _height, 4, _dst); - return true; - - case TextureFormat::ETC1: - etc1_encode_image( (const uint8_t*)_src, _width, _height, 4, _width*4, (uint8_t*)_dst); - return true; - - case TextureFormat::ETC2: - { - const uint32_t blockWidth = (_width +3)/4; - const uint32_t blockHeight = (_height+3)/4; - const uint32_t pitch = _width*4; - const uint8_t* src = (const uint8_t*)_src; - uint64_t* dst = (uint64_t*)_dst; - for (uint32_t yy = 0; yy < blockHeight; ++yy) - { - for (uint32_t xx = 0; xx < blockWidth; ++xx) - { - uint8_t block[4*4*4]; - const uint8_t* ptr = &src[(yy*pitch+xx*4)*4]; - - for (uint32_t ii = 0; ii < 16; ++ii) - { // BGRx - bx::memCopy(&block[ii*4], &ptr[(ii%4)*pitch + (ii&~3)], 4); - bx::xchg(block[ii*4+0], block[ii*4+2]); - } - - *dst++ = ProcessRGB_ETC2(block); - } - } - } - return true; - - case TextureFormat::PTC14: - { - using namespace Javelin; - RgbaBitmap bmp; - bmp.width = _width; - bmp.height = _height; - bmp.data = (uint8_t*)const_cast(_src); - PvrTcEncoder::EncodeRgb4Bpp(_dst, bmp); - bmp.data = NULL; - } - return true; - - case TextureFormat::PTC14A: - { - using namespace Javelin; - RgbaBitmap bmp; - bmp.width = _width; - bmp.height = _height; - bmp.data = (uint8_t*)const_cast(_src); - PvrTcEncoder::EncodeRgba4Bpp(_dst, bmp); - bmp.data = NULL; - } - return true; - - case TextureFormat::BGRA8: - imageSwizzleBgra8(_dst, _width, _height, _width*4, _src); - return true; - - case TextureFormat::RGBA8: - bx::memCopy(_dst, _src, _width*_height*4); - return true; - - default: - break; - } - - return imageConvert(_dst, _format, _src, TextureFormat::RGBA8, _width, _height); - } - - bool imageEncodeFromRgba32f(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, TextureFormat::Enum _format) - { - const uint8_t* src = (const uint8_t*)_src; - - switch (_format) - { - case TextureFormat::RGBA8: - { - uint8_t* dst = (uint8_t*)_dst; - for (uint32_t yy = 0; yy < _height; ++yy) - { - for (uint32_t xx = 0; xx < _width; ++xx) - { - const uint32_t offset = yy*_width + xx; - const float* input = (const float*)&src[offset * 16]; - uint8_t* output = &dst[offset * 4]; - output[0] = uint8_t(input[0]*255.0f + 0.5f); - output[1] = uint8_t(input[1]*255.0f + 0.5f); - output[2] = uint8_t(input[2]*255.0f + 0.5f); - output[3] = uint8_t(input[3]*255.0f + 0.5f); - } - } - } - return true; - - case TextureFormat::BC5: - { - uint8_t* temp = (uint8_t*)BX_ALLOC(_allocator, _width*_height*4); - for (uint32_t yy = 0; yy < _height; ++yy) - { - for (uint32_t xx = 0; xx < _width; ++xx) - { - const uint32_t offset = yy*_width + xx; - const float* input = (const float*)&src[offset * 16]; - uint8_t* output = &temp[offset * 4]; - output[0] = uint8_t(input[0]*255.0f + 0.5f); - output[1] = uint8_t(input[1]*255.0f + 0.5f); - output[2] = uint8_t(input[2]*255.0f + 0.5f); - output[3] = uint8_t(input[3]*255.0f + 0.5f); - } - } - - imageEncodeFromRgba8(_dst, temp, _width, _height, _format); - BX_FREE(_allocator, temp); - } - return true; - - default: - break; - } - - return imageConvert(_dst, _format, _src, TextureFormat::RGBA32F, _width, _height); - } - - void imageRgba32f11to01(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + void imageEncodeFromRgba8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _depth, TextureFormat::Enum _format, Quality::Enum _quality, bx::Error* _err) { const uint8_t* src = (const uint8_t*)_src; uint8_t* dst = (uint8_t*)_dst; - for (uint32_t yy = 0; yy < _height; ++yy) + const uint32_t srcPitch = _width*4; + const uint32_t srcSlice = _height*srcPitch; + const uint32_t dstBpp = getBitsPerPixel(_format); + const uint32_t dstPitch = _width*dstBpp/8; + const uint32_t dstSlice = _height*dstPitch; + + for (uint32_t zz = 0; zz < _depth && _err->isOk(); ++zz, src += srcSlice, dst += dstSlice) { - for (uint32_t xx = 0; xx < _width; ++xx) + switch (_format) { - const uint32_t offset = yy*_pitch + xx * 16; - const float* input = (const float*)&src[offset]; - float* output = (float*)&dst[offset]; - output[0] = input[0]*0.5f + 0.5f; - output[1] = input[1]*0.5f + 0.5f; - output[2] = input[2]*0.5f + 0.5f; - output[3] = input[3]*0.5f + 0.5f; + case TextureFormat::BC1: + case TextureFormat::BC2: + case TextureFormat::BC3: + case TextureFormat::BC4: + case TextureFormat::BC5: + squish::CompressImage(src, _width, _height, dst + , s_squishQuality[_quality] + | (_format == TextureFormat::BC2 ? squish::kDxt3 + : _format == TextureFormat::BC3 ? squish::kDxt5 + : _format == TextureFormat::BC4 ? squish::kBc4 + : _format == TextureFormat::BC5 ? squish::kBc5 + : squish::kDxt1) + ); + break; + + case TextureFormat::BC6H: + case TextureFormat::BC7: + BX_ERROR_SET(_err, BIMG_ERROR, "Unable to convert between input/output formats!"); + break; + + case TextureFormat::ETC1: + etc1_encode_image(src, _width, _height, 4, _width*4, dst); + break; + + case TextureFormat::ETC2: + { + const uint32_t blockWidth = (_width +3)/4; + const uint32_t blockHeight = (_height+3)/4; + uint64_t* dstBlock = (uint64_t*)dst; + for (uint32_t yy = 0; yy < blockHeight; ++yy) + { + for (uint32_t xx = 0; xx < blockWidth; ++xx) + { + uint8_t block[4*4*4]; + const uint8_t* ptr = &src[(yy*srcPitch+xx*4)*4]; + + for (uint32_t ii = 0; ii < 16; ++ii) + { // BGRx + bx::memCopy(&block[ii*4], &ptr[(ii%4)*srcPitch + (ii&~3)], 4); + bx::xchg(block[ii*4+0], block[ii*4+2]); + } + + *dstBlock++ = ProcessRGB_ETC2(block); + } + } + } + break; + + case TextureFormat::PTC14: + { + using namespace Javelin; + RgbaBitmap bmp; + bmp.width = _width; + bmp.height = _height; + bmp.data = const_cast(src); + PvrTcEncoder::EncodeRgb4Bpp(dst, bmp); + bmp.data = NULL; + } + break; + + case TextureFormat::PTC14A: + { + using namespace Javelin; + RgbaBitmap bmp; + bmp.width = _width; + bmp.height = _height; + bmp.data = const_cast(src); + PvrTcEncoder::EncodeRgba4Bpp(dst, bmp); + bmp.data = NULL; + } + break; + + case TextureFormat::BGRA8: + imageSwizzleBgra8(dst, dstPitch, _width, _height, src, srcPitch); + break; + + case TextureFormat::RGBA8: + bx::memCopy(_dst, _src, srcPitch, _height, srcPitch, dstPitch); + break; + + default: + if (!imageConvert(dst, _format, src, TextureFormat::RGBA8, _width, _height, 1) ) + { + BX_ERROR_SET(_err, BIMG_ERROR, "Unable to convert between input/output formats!"); + } + break; + } + } + } + + void imageEncodeFromRgba32f(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _depth, TextureFormat::Enum _dstFormat, Quality::Enum _quality, bx::Error* _err) + { + BX_ERROR_SCOPE(_err); + + const uint8_t* src = (const uint8_t*)_src; + + switch (_dstFormat) + { + case TextureFormat::BC6H: + nvtt::compressBC6H(src, _width, _height, _width*16, _dst); + break; + + case TextureFormat::BC7: + nvtt::compressBC7(src, _width, _height, _width*16, _dst); + break; + + default: + if (!imageConvert(_dst, _dstFormat, _src, TextureFormat::RGBA32F, _width, _height, _depth) ) + { + uint8_t* temp = (uint8_t*)BX_ALLOC(_allocator, _width*_height*_depth*4); + if (imageConvert(temp, TextureFormat::RGBA8, _src, TextureFormat::RGBA32F, _width, _height, _depth) ) + { + for (uint32_t zz = 0; zz < _depth; ++zz) + { + const uint32_t zoffset = zz*_width*_height; + + for (uint32_t yy = 0; yy < _height; ++yy) + { + const uint32_t yoffset = zoffset + yy*_width; + + for (uint32_t xx = 0; xx < _width; ++xx) + { + const uint32_t offset = yoffset + xx; + const float* input = (const float*)&src[offset * 16]; + uint8_t* output = &temp[offset * 4]; + output[0] = uint8_t(bx::clamp(input[0], 0.0f, 1.0f)*255.0f + 0.5f); + output[1] = uint8_t(bx::clamp(input[1], 0.0f, 1.0f)*255.0f + 0.5f); + output[2] = uint8_t(bx::clamp(input[2], 0.0f, 1.0f)*255.0f + 0.5f); + output[3] = uint8_t(bx::clamp(input[3], 0.0f, 1.0f)*255.0f + 0.5f); + } + } + } + + imageEncodeFromRgba8(_dst, temp, _width, _height, _depth, _dstFormat, _quality, _err); + } + else + { + BX_ERROR_SET(_err, BIMG_ERROR, "Unable to convert between input/output formats!"); + } + + BX_FREE(_allocator, temp); + } + break; + } + } + + void imageEncode(bx::AllocatorI* _allocator, void* _dst, const void* _src, TextureFormat::Enum _srcFormat, uint32_t _width, uint32_t _height, uint32_t _depth, TextureFormat::Enum _dstFormat, Quality::Enum _quality, bx::Error* _err) + { + switch (_dstFormat) + { + case bimg::TextureFormat::BC1: + case bimg::TextureFormat::BC2: + case bimg::TextureFormat::BC3: + case bimg::TextureFormat::BC4: + case bimg::TextureFormat::BC5: + case bimg::TextureFormat::ETC1: + case bimg::TextureFormat::ETC2: + case bimg::TextureFormat::PTC14: + case bimg::TextureFormat::PTC14A: + { + uint8_t* temp = (uint8_t*)BX_ALLOC(_allocator, _width*_height*_depth*4); + imageDecodeToRgba8(temp, _src, _width, _height, _width*4, _srcFormat); + imageEncodeFromRgba8(_dst, temp, _width, _height, _depth, _dstFormat, _quality, _err); + BX_FREE(_allocator, temp); + } + break; + + case bimg::TextureFormat::BC6H: + case bimg::TextureFormat::BC7: + { + uint8_t* temp = (uint8_t*)BX_ALLOC(_allocator, _width*_height*_depth*16); + imageDecodeToRgba32f(_allocator, temp, _src, _width, _height, _depth, _width*16, _srcFormat); + imageEncodeFromRgba32f(_allocator, _dst, temp, _width, _height, _depth, _dstFormat, _quality, _err); + BX_FREE(_allocator, temp); + } + break; + + default: + BX_ERROR_SET(_err, BIMG_ERROR, "Unable to convert between input/output formats!"); + break; + } + } + + ImageContainer* imageEncode(bx::AllocatorI* _allocator, TextureFormat::Enum _dstFormat, Quality::Enum _quality, const ImageContainer& _input) + { + ImageContainer* output = imageAlloc(_allocator + , _dstFormat + , uint16_t(_input.m_width) + , uint16_t(_input.m_height) + , uint16_t(_input.m_depth) + , _input.m_numLayers + , _input.m_cubeMap + , 1 < _input.m_numMips + ); + + const uint16_t numSides = _input.m_numLayers * (_input.m_cubeMap ? 6 : 1); + + bx::Error err; + + for (uint16_t side = 0; side < numSides && err.isOk(); ++side) + { + for (uint8_t lod = 0, num = _input.m_numMips; lod < num && err.isOk(); ++lod) + { + ImageMip mip; + if (imageGetRawData(_input, side, lod, _input.m_data, _input.m_size, mip) ) + { + ImageMip dstMip; + imageGetRawData(*output, side, lod, output->m_data, output->m_size, dstMip); + uint8_t* dstData = const_cast(dstMip.m_data); + + imageEncode(_allocator + , dstData + , mip.m_data + , mip.m_format + , mip.m_width + , mip.m_height + , mip.m_depth + , _dstFormat + , _quality + , &err + ); + } + } + } + + if (err.isOk() ) + { + return output; + } + + imageFree(output); + return NULL; + } + + void imageRgba32f11to01(void* _dst, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _pitch, const void* _src) + { + const uint8_t* src = (const uint8_t*)_src; + uint8_t* dst = (uint8_t*)_dst; + + for (uint32_t zz = 0; zz < _depth; ++zz) + { + for (uint32_t yy = 0; yy < _height; ++yy) + { + for (uint32_t xx = 0; xx < _width; ++xx) + { + const uint32_t offset = yy*_pitch + xx * 16; + const float* input = (const float*)&src[offset]; + float* output = (float*)&dst[offset]; + output[0] = input[0]*0.5f + 0.5f; + output[1] = input[1]*0.5f + 0.5f; + output[2] = input[2]*0.5f + 0.5f; + output[3] = input[3]*0.5f + 0.5f; + } } } } @@ -209,22 +333,7 @@ namespace bimg BX_FREE(_allocator, gy); } - inline double min(double _a, double _b) - { - return _a > _b ? _b : _a; - } - - inline double max(double _a, double _b) - { - return _a > _b ? _a : _b; - } - - inline double clamp(double _val, double _min, double _max) - { - return max(min(_val, _max), _min); - } - - void imageMakeDist(bx::AllocatorI* _allocator, void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, float _edge, const void* _src) + void imageMakeDist(bx::AllocatorI* _allocator, void* _dst, uint32_t _width, uint32_t _height, uint32_t _srcPitch, float _edge, const void* _src) { const uint32_t numPixels = _width*_height; @@ -234,7 +343,7 @@ namespace bimg for (uint32_t yy = 0; yy < _height; ++yy) { - const uint8_t* src = (const uint8_t*)_src + yy*_pitch; + const uint8_t* src = (const uint8_t*)_src + yy*_srcPitch; double* dst = &imgIn[yy*_width]; for (uint32_t xx = 0; xx < _width; ++xx) { @@ -260,7 +369,7 @@ namespace bimg for (uint32_t ii = 0; ii < numPixels; ++ii) { - double dist = clamp( ( (outside[ii] - inside[ii])+edgeOffset) * invEdge, 0.0, 1.0); + double dist = bx::clamp( ( (outside[ii] - inside[ii])+edgeOffset) * invEdge, 0.0, 1.0); dst[ii] = 255-uint8_t(dist * 255.0); } @@ -268,4 +377,178 @@ namespace bimg BX_FREE(_allocator, outside); } + static const iqa_ssim_args s_iqaArgs = + { + 0.39f, // alpha + 0.731f, // beta + 1.12f, // gamma + 187, // L + 0.025987f, // K1 + 0.0173f, // K2 + 1 // factor + }; + + float imageQualityRgba8( + const void* _reference + , const void* _data + , uint16_t _width + , uint16_t _height + ) + { + float result = iqa_ssim( (const uint8_t*)_reference + , (const uint8_t*)_data + , _width + , _height + , _width*4 + , 0 + , &s_iqaArgs + ); + return result; + } + + bool imageResizeRgba32fLinear(ImageContainer* _dst, const ImageContainer* _src) + { + const uint16_t numSides = _src->m_numLayers * (_src->m_cubeMap ? 6 : 1); + + for (uint16_t side = 0; side < numSides; ++side) + { + bimg::ImageMip srcMip; + bimg::imageGetRawData(*_src, side, 0, _src->m_data, _src->m_size, srcMip); + const float* srcData = (const float*)(srcMip.m_data); + + bimg::ImageMip dstMip; + bimg::imageGetRawData(*_dst, side, 0, _dst->m_data, _dst->m_size, dstMip); + float* dstData = (float*)(dstMip.m_data); + + int result = stbir_resize_float_generic( + (const float*)srcData, _src->m_width, _src->m_height, _src->m_width*16 + , ( float*)dstData, _dst->m_width, _dst->m_height, _dst->m_width*16 + , 4, 3 + , STBIR_FLAG_ALPHA_PREMULTIPLIED + , STBIR_EDGE_CLAMP + , STBIR_FILTER_DEFAULT + , STBIR_COLORSPACE_LINEAR + , NULL + ); + + if (1 != result) + { + return false; + } + } + + return true; + } + + static float getAlpha(UnpackFn _unpack, const void* _data) + { + float rgba[4]; + _unpack(rgba, _data); + return rgba[3]; + } + + float imageAlphaTestCoverage(TextureFormat::Enum _format, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src, float _alphaRef, float _scale) + { + UnpackFn unpack = getUnpack(_format); + if (NULL == unpack) + { + return 0.0f; + } + + float coverage = 0.0f; + const uint8_t* src = (const uint8_t*)_src; + const uint32_t xstep = getBitsPerPixel(_format) / 8; + const float numSamples = 8.0f; + + for (uint32_t yy = 0, ystep = _srcPitch; yy < _height-1; ++yy, src += ystep) + { + const uint8_t* data = src; + for (uint32_t xx = 0; xx < _width-1; ++xx, data += xstep) + { + float alpha00 = _scale * getAlpha(unpack, data); + float alpha10 = _scale * getAlpha(unpack, data+xstep); + float alpha01 = _scale * getAlpha(unpack, data+ystep); + float alpha11 = _scale * getAlpha(unpack, data+ystep+xstep); + + for (float fy = 0.5f/numSamples; fy < 1.0f; fy += 1.0f) + { + for (float fx = 0.5f/numSamples; fx < 1.0f; fx += 1.0f) + { + float alpha = 0.0f + + alpha00 * (1.0f - fx) * (1.0f - fy) + + alpha10 * ( fx) * (1.0f - fy) + + alpha01 * (1.0f - fx) * ( fy) + + alpha11 * ( fx) * ( fy) + ; + + if (alpha > _alphaRef) + { + coverage += 1.0f; + } + } + } + } + } + + return coverage / float(_width*_height*numSamples*numSamples); + } + + void imageScaleAlphaToCoverage(TextureFormat::Enum _format, uint32_t _width, uint32_t _height, uint32_t _srcPitch, void* _src, float _desiredCoverage, float _alphaRef) + { + PackFn pack = getPack(_format); + UnpackFn unpack = getUnpack(_format); + if (NULL == pack + || NULL == unpack) + { + return; + } + + float min = 0.0f; + float max = 4.0f; + float scale = 1.0f; + + for (uint32_t ii = 0; ii < 8; ++ii) + { + float coverage = imageAlphaTestCoverage( + _format + , _width + , _height + , _srcPitch + , _src + , _alphaRef + , scale + ); + + if (coverage < _desiredCoverage) + { + min = scale; + } + else if (coverage > _desiredCoverage) + { + max = scale; + } + else + { + break; + } + + scale = (min + max) * 0.5f; + } + + uint8_t* src = (uint8_t*)_src; + const uint32_t xstep = getBitsPerPixel(_format) / 8; + + for (uint32_t yy = 0, ystep = _srcPitch; yy < _height; ++yy, src += ystep) + { + uint8_t* data = src; + for (uint32_t xx = 0; xx < _width; ++xx, data += xstep) + { + float rgba[4]; + unpack(rgba, data); + rgba[3] = bx::clamp(rgba[3]*scale, 0.0f, 1.0f); + pack(data, rgba); + } + } + } + } // namespace bimg diff --git a/3rdparty/bimg/src/image_gnf.cpp b/3rdparty/bimg/src/image_gnf.cpp new file mode 100644 index 0000000..77c6d0a --- /dev/null +++ b/3rdparty/bimg/src/image_gnf.cpp @@ -0,0 +1,37 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause + */ + +#include "bimg_p.h" + +namespace bimg +{ + bool imageParseGnf(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader, bx::Error* _err) + { + BX_UNUSED(_imageContainer, _reader, _err); + BX_ERROR_SET(_err, BIMG_ERROR, "GNF: not supported."); + return false; + } + + ImageContainer* imageParseGnf(bx::AllocatorI* _allocator, const void* _src, uint32_t _size, bx::Error* _err) + { + BX_UNUSED(_allocator); + + bx::MemoryReader reader(_src, _size); + + uint32_t magic; + bx::read(&reader, magic); + + ImageContainer imageContainer; + if (BIMG_CHUNK_MAGIC_GNF != magic + || !imageParseGnf(imageContainer, &reader, _err) ) + { + return NULL; + } + + BX_ERROR_SET(_err, BIMG_ERROR, "GNF: not supported."); + return NULL; + } + +} // namespace bimg diff --git a/3rdparty/bimg/tools/texturec/texturec.cpp b/3rdparty/bimg/tools/texturec/texturec.cpp index e85566c..8beecc2 100644 --- a/3rdparty/bimg/tools/texturec/texturec.cpp +++ b/3rdparty/bimg/tools/texturec/texturec.cpp @@ -1,200 +1,278 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause */ #include #include #include #include +#include #include #include #if 0 -# define BX_TRACE(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__) +# define DBG(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__) +#else +# define DBG(...) BX_NOOP() #endif // DEBUG #include #include -#include +#include #include -extern "C" { -#include -} +#include -void help(const char* _error = NULL) +#define BIMG_TEXTUREC_VERSION_MAJOR 1 +#define BIMG_TEXTUREC_VERSION_MINOR 10 + +struct Options { - if (NULL != _error) + Options() + : maxSize(UINT32_MAX) + , edge(0.0f) + , format(bimg::TextureFormat::Count) + , quality(bimg::Quality::Default) + , mips(false) + , normalMap(false) + , equirect(false) + , iqa(false) + , sdf(false) + , alphaTest(false) { - fprintf(stderr, "Error:\n%s\n\n", _error); } - fprintf(stderr - , "texturec, bgfx texture compiler tool\n" - "Copyright 2011-2017 Branimir Karadzic. All rights reserved.\n" - "License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n\n" - ); + void dump() + { + DBG("Options:\n" + "\t maxSize: %d\n" + "\t edge: %f\n" + "\t format: %s\n" + "\t mips: %s\n" + "\tnormalMap: %s\n" + "\t iqa: %s\n" + "\t sdf: %s\n" + , maxSize + , edge + , bimg::getName(format) + , mips ? "true" : "false" + , normalMap ? "true" : "false" + , iqa ? "true" : "false" + , sdf ? "true" : "false" + ); + } - fprintf(stderr - , "Usage: texturec -f -o [-t ]\n" + uint32_t maxSize; + float edge; + bimg::TextureFormat::Enum format; + bimg::Quality::Enum quality; + bool mips; + bool normalMap; + bool equirect; + bool iqa; + bool sdf; + bool alphaTest; +}; - "\n" - "Supported input file types:\n" - " *.png Portable Network Graphics\n" - " *.tga Targa\n" - " *.dds Direct Draw Surface\n" - " *.ktx Khronos Texture\n" - " *.pvr PowerVR\n" - - "\n" - "Options:\n" - " -f Input file path.\n" - " -o Output file path (file will be written in KTX format).\n" - " -t Output format type (BC1/2/3/4/5, ETC1, PVR14, etc.).\n" - " -m, --mips Generate mip-maps.\n" - " -n, --normalmap Input texture is normal map.\n" - " --sdf Compute SDF texture.\n" - " --iqa Image Quality Assesment\n" - - "\n" - "For additional information, see https://github.com/bkaradzic/bgfx\n" - ); -} - -int main(int _argc, const char* _argv[]) +void imageRgba32fNormalize(void* _dst, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src) { - bx::CommandLine cmdLine(_argc, _argv); + const uint8_t* src = (const uint8_t*)_src; + uint8_t* dst = (uint8_t*)_dst; - if (cmdLine.hasArg('h', "help") ) + for (uint32_t yy = 0, ystep = _srcPitch; yy < _height; ++yy, src += ystep) { - help(); - return EXIT_FAILURE; - } - - const char* inputFileName = cmdLine.findOption('f'); - if (NULL == inputFileName) - { - help("Input file must be specified."); - return EXIT_FAILURE; - } - - const char* outputFileName = cmdLine.findOption('o'); - if (NULL == outputFileName) - { - help("Output file must be specified."); - return EXIT_FAILURE; - } - - bool sdf = false; - double edge = 16.0; - const char* edgeOpt = cmdLine.findOption("sdf"); - if (NULL != edgeOpt) - { - sdf = true; - edge = atof(edgeOpt); - } - BX_UNUSED(sdf, edge); - - const bool mips = cmdLine.hasArg('m', "mips"); - const bool normalMap = cmdLine.hasArg('n', "normalmap"); - const bool iqa = cmdLine.hasArg('\0', "iqa"); - - bx::CrtFileReader reader; - if (!bx::open(&reader, inputFileName) ) - { - help("Failed to open input file."); - return EXIT_FAILURE; - } - - bx::CrtAllocator allocator; - - uint32_t inputSize = (uint32_t)bx::getSize(&reader); - uint8_t* inputData = (uint8_t*)BX_ALLOC(&allocator, inputSize); - - bx::read(&reader, inputData, inputSize); - bx::close(&reader); - - { - using namespace bimg; - - ImageContainer* input = imageParse(&allocator, inputData, inputSize); - - if (NULL != input) + const float* rgba = (const float*)&src[0]; + for (uint32_t xx = 0; xx < _width; ++xx, rgba += 4, dst += 16) { - BX_FREE(&allocator, inputData); + float xyz[3]; - const char* type = cmdLine.findOption('t'); - bimg::TextureFormat::Enum format = input->m_format; + xyz[0] = rgba[0]; + xyz[1] = rgba[1]; + xyz[2] = rgba[2]; + bx::vec3Norm( (float*)dst, xyz); + } + } +} - if (NULL != type) +bimg::ImageContainer* convert(bx::AllocatorI* _allocator, const void* _inputData, uint32_t _inputSize, const Options& _options, bx::Error* _err) +{ + BX_ERROR_SCOPE(_err); + + const uint8_t* inputData = (uint8_t*)_inputData; + + bimg::ImageContainer* output = NULL; + bimg::ImageContainer* input = bimg::imageParse(_allocator, inputData, _inputSize, bimg::TextureFormat::Count, _err); + + if (!_err->isOk() ) + { + return NULL; + } + + if (NULL != input) + { + const bimg::TextureFormat::Enum inputFormat = input->m_format; + bimg::TextureFormat::Enum outputFormat = input->m_format; + + if (bimg::TextureFormat::Count != _options.format) + { + outputFormat = _options.format; + } + + if (_options.sdf) + { + outputFormat = bimg::TextureFormat::R8; + } + + const bimg::ImageBlockInfo& inputBlockInfo = bimg::getBlockInfo(inputFormat); + const bimg::ImageBlockInfo& outputBlockInfo = bimg::getBlockInfo(outputFormat); + const uint32_t blockWidth = outputBlockInfo.blockWidth; + const uint32_t blockHeight = outputBlockInfo.blockHeight; + const uint32_t minBlockX = outputBlockInfo.minBlockX; + const uint32_t minBlockY = outputBlockInfo.minBlockY; + uint32_t outputWidth = bx::uint32_max(blockWidth * minBlockX, ( (input->m_width + blockWidth - 1) / blockWidth )*blockWidth); + uint32_t outputHeight = bx::uint32_max(blockHeight * minBlockY, ( (input->m_height + blockHeight - 1) / blockHeight)*blockHeight); + + if (outputWidth > _options.maxSize + || outputHeight > _options.maxSize) + { + if (outputWidth > outputHeight) { - format = bimg::getFormat(type); + outputHeight = outputHeight * _options.maxSize / outputWidth; + outputWidth = _options.maxSize; + } + else + { + outputWidth = outputWidth * _options.maxSize / outputHeight; + outputHeight = _options.maxSize; + } + } - if (!isValid(format) ) - { - help("Invalid format specified."); - return EXIT_FAILURE; - } + const bool needResize = false + || input->m_width != outputWidth + || input->m_height != outputHeight + ; + + const bool passThru = true + && !needResize + && (1 < input->m_numMips) == _options.mips + && !_options.sdf + && !_options.alphaTest + && !_options.normalMap + && !_options.equirect + && !_options.iqa + ; + + if (needResize) + { + bimg::ImageContainer* src = bimg::imageConvert(_allocator, bimg::TextureFormat::RGBA32F, *input); + + bimg::ImageContainer* dst = bimg::imageAlloc( + _allocator + , bimg::TextureFormat::RGBA32F + , uint16_t(outputWidth) + , uint16_t(outputHeight) + , 1 + , input->m_numLayers + , input->m_cubeMap + , false + ); + + bimg::imageResizeRgba32fLinear(dst, src); + + bimg::imageFree(src); + bimg::imageFree(input); + + input = bimg::imageConvert(_allocator, inputFormat, *dst); + bimg::imageFree(dst); + } + + if (passThru) + { + if (inputFormat != outputFormat + && bimg::isCompressed(outputFormat) ) + { + output = bimg::imageEncode(_allocator, outputFormat, _options.quality, *input); + } + else + { + output = bimg::imageConvert(_allocator, outputFormat, *input); } - ImageContainer* output = NULL; + bimg::imageFree(input); + return output; + } - ImageMip mip; - if (imageGetRawData(*input, 0, 0, input->m_data, input->m_size, mip) ) + if (_options.equirect) + { + bimg::ImageContainer* src = bimg::imageConvert(_allocator, bimg::TextureFormat::RGBA32F, *input); + bimg::imageFree(input); + + bimg::ImageContainer* dst = bimg::imageCubemapFromLatLongRgba32F(_allocator, *src, true, _err); + bimg::imageFree(src); + + if (!_err->isOk() ) { - uint8_t numMips = mips - ? imageGetNumMips(format, mip.m_width, mip.m_height) - : 1 - ; + return NULL; + } + + input = bimg::imageConvert(_allocator, inputFormat, *dst); + bimg::imageFree(dst); + } + + output = bimg::imageAlloc( + _allocator + , outputFormat + , uint16_t(input->m_width) + , uint16_t(input->m_height) + , uint16_t(input->m_depth) + , input->m_numLayers + , input->m_cubeMap + , _options.mips + ); + + const uint8_t numMips = output->m_numMips; + const uint16_t numSides = output->m_numLayers * (output->m_cubeMap ? 6 : 1); + + for (uint16_t side = 0; side < numSides && _err->isOk(); ++side) + { + bimg::ImageMip mip; + if (bimg::imageGetRawData(*input, side, 0, input->m_data, input->m_size, mip) ) + { + bimg::ImageMip dstMip; + bimg::imageGetRawData(*output, side, 0, output->m_data, output->m_size, dstMip); + uint8_t* dstData = const_cast(dstMip.m_data); void* temp = NULL; - if (normalMap) + if (_options.normalMap) { - output = imageAlloc(&allocator, format, mip.m_width, mip.m_height, 0, 1, false, mips); - - ImageMip dstMip; - imageGetRawData(*output, 0, 0, NULL, 0, dstMip); - - if (mip.m_width != dstMip.m_width - && mip.m_height != dstMip.m_height) - { - printf("Invalid input image size %dx%d, it must be at least %dx%d to be converted to %s format.\n" - , mip.m_width - , mip.m_height - , dstMip.m_width - , dstMip.m_height - , getName(format) - ); - return EXIT_FAILURE; - } - - uint32_t size = imageGetSize( + uint32_t size = bimg::imageGetSize( NULL - , dstMip.m_width - , dstMip.m_height + , uint16_t(dstMip.m_width) + , uint16_t(dstMip.m_height) , 0 , false , false , 1 - , TextureFormat::RGBA32F + , bimg::TextureFormat::RGBA32F ); - temp = BX_ALLOC(&allocator, size); + temp = BX_ALLOC(_allocator, size); float* rgba = (float*)temp; - float* rgbaDst = (float*)BX_ALLOC(&allocator, size); + float* rgbaDst = (float*)BX_ALLOC(_allocator, size); - imageDecodeToRgba32f(&allocator + bimg::imageDecodeToRgba32f(_allocator , rgba , mip.m_data - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 + , dstMip.m_width + , dstMip.m_height + , dstMip.m_depth + , dstMip.m_width*16 , mip.m_format ); - if (TextureFormat::BC5 != mip.m_format) + if (bimg::TextureFormat::BC5 != mip.m_format) { for (uint32_t yy = 0; yy < mip.m_height; ++yy) { @@ -210,218 +288,675 @@ int main(int _argc, const char* _argv[]) } } - imageRgba32f11to01(rgbaDst, dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba); - imageEncodeFromRgba32f(&allocator, output->m_data, rgbaDst, dstMip.m_width, dstMip.m_height, format); - - for (uint8_t lod = 1; lod < numMips; ++lod) - { - imageRgba32fDownsample2x2NormalMap(rgba, dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba); - imageRgba32f11to01(rgbaDst, dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba); - imageGetRawData(*output, 0, lod, output->m_data, output->m_size, dstMip); - uint8_t* data = const_cast(dstMip.m_data); - imageEncodeFromRgba32f(&allocator, data, rgbaDst, dstMip.m_width, dstMip.m_height, format); - } - - BX_FREE(&allocator, rgbaDst); - } - else if (8 != getBlockInfo(input->m_format).rBits) - { - output = imageAlloc(&allocator, format, mip.m_width, mip.m_height, 0, 1, false, mips); - - ImageMip dstMip; - imageGetRawData(*output, 0, 0, NULL, 0, dstMip); - - if (mip.m_width != dstMip.m_width - && mip.m_height != dstMip.m_height) - { - printf("Invalid input image size %dx%d, it must be at least %dx%d to be converted to %s format.\n" - , mip.m_width - , mip.m_height - , dstMip.m_width - , dstMip.m_height - , getName(format) - ); - return EXIT_FAILURE; - } - - uint32_t size = imageGetSize( - NULL + imageRgba32fNormalize(rgba , dstMip.m_width , dstMip.m_height - , 0 - , false - , false - , 1 - , TextureFormat::RGBA32F - ); - temp = BX_ALLOC(&allocator, size); - float* rgba = (float*)temp; - float* rgbaDst = (float*)BX_ALLOC(&allocator, size); - - imageDecodeToRgba32f(&allocator - , rgba - , mip.m_data - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 - , mip.m_format - ); - imageEncodeFromRgba32f(&allocator, output->m_data, rgba, dstMip.m_width, dstMip.m_height, format); - - imageRgba32fToLinear(rgba - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 + , dstMip.m_width*16 , rgba ); - for (uint8_t lod = 1; lod < numMips; ++lod) + bimg::imageRgba32f11to01(rgbaDst + , dstMip.m_width + , dstMip.m_height + , dstMip.m_depth + , dstMip.m_width*16 + , rgba + ); + + bimg::imageEncodeFromRgba32f(_allocator + , dstData + , rgbaDst + , dstMip.m_width + , dstMip.m_height + , dstMip.m_depth + , outputFormat + , _options.quality + , _err + ); + + for (uint8_t lod = 1; lod < numMips && _err->isOk(); ++lod) { - imageRgba32fLinearDownsample2x2(rgba, dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba); - imageGetRawData(*output, 0, lod, output->m_data, output->m_size, dstMip); - uint8_t* data = const_cast(dstMip.m_data); - - imageRgba32fToGamma(rgbaDst - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 + bimg::imageRgba32fDownsample2x2NormalMap(rgba + , dstMip.m_width + , dstMip.m_height + , dstMip.m_width*16 , rgba ); - imageEncodeFromRgba32f(&allocator, data, rgbaDst, dstMip.m_width, dstMip.m_height, format); - } - - BX_FREE(&allocator, rgbaDst); - } - else - { - output = imageAlloc(&allocator, format, mip.m_width, mip.m_height, 0, 1, false, mips); - - ImageMip dstMip; - imageGetRawData(*output, 0, 0, NULL, 0, dstMip); - - if (mip.m_width != dstMip.m_width - && mip.m_height != dstMip.m_height) - { - printf("Invalid input image size %dx%d, it must be at least %dx%d to be converted to %s format.\n" - , mip.m_width - , mip.m_height + bimg::imageRgba32f11to01(rgbaDst , dstMip.m_width , dstMip.m_height - , getName(format) + , dstMip.m_depth + , dstMip.m_width*16 + , rgba + ); + + bimg::imageGetRawData(*output, side, lod, output->m_data, output->m_size, dstMip); + dstData = const_cast(dstMip.m_data); + + bimg::imageEncodeFromRgba32f(_allocator + , dstData + , rgbaDst + , dstMip.m_width + , dstMip.m_height + , dstMip.m_depth + , outputFormat + , _options.quality + , _err ); - return EXIT_FAILURE; } - uint32_t size = imageGetSize( + BX_FREE(_allocator, rgbaDst); + } + else if ( (!bimg::isCompressed(input->m_format) && 8 != inputBlockInfo.rBits) + || outputFormat == bimg::TextureFormat::BC6H + || outputFormat == bimg::TextureFormat::BC7 + ) + { + uint32_t size = bimg::imageGetSize( NULL - , dstMip.m_width - , dstMip.m_height - , 0 + , uint16_t(dstMip.m_width) + , uint16_t(dstMip.m_height) + , uint16_t(dstMip.m_depth) , false , false , 1 - , TextureFormat::RGBA8 + , bimg::TextureFormat::RGBA32F ); - temp = BX_ALLOC(&allocator, size); - bx::memSet(temp, 0, size); - uint8_t* rgba = (uint8_t*)temp; + temp = BX_ALLOC(_allocator, size); + float* rgba32f = (float*)temp; + float* rgbaDst = (float*)BX_ALLOC(_allocator, size); - imageDecodeToRgba8(rgba + bimg::imageDecodeToRgba32f(_allocator + , rgba32f , mip.m_data , mip.m_width , mip.m_height - , mip.m_width*mip.m_bpp/8 + , mip.m_depth + , mip.m_width*16 , mip.m_format ); - void* ref = NULL; - if (iqa) + bimg::imageEncodeFromRgba32f(_allocator + , dstData + , rgba32f + , dstMip.m_width + , dstMip.m_height + , dstMip.m_depth + , outputFormat + , _options.quality + , _err + ); + + if (1 < numMips + && _err->isOk() ) { - ref = BX_ALLOC(&allocator, size); + bimg::imageRgba32fToLinear(rgba32f + , mip.m_width + , mip.m_height + , mip.m_depth + , mip.m_width*16 + , rgba32f + ); + + for (uint8_t lod = 1; lod < numMips && _err->isOk(); ++lod) + { + bimg::imageRgba32fLinearDownsample2x2(rgba32f + , dstMip.m_width + , dstMip.m_height + , dstMip.m_depth + , dstMip.m_width*16 + , rgba32f + ); + + bimg::imageGetRawData(*output, side, lod, output->m_data, output->m_size, dstMip); + dstData = const_cast(dstMip.m_data); + + bimg::imageRgba32fToGamma(rgbaDst + , mip.m_width + , mip.m_height + , mip.m_depth + , mip.m_width*16 + , rgba32f + ); + + bimg::imageEncodeFromRgba32f(_allocator + , dstData + , rgbaDst + , dstMip.m_width + , dstMip.m_height + , dstMip.m_depth + , outputFormat + , _options.quality + , _err + ); + } + } + + BX_FREE(_allocator, rgbaDst); + } + else if (_options.sdf) + { + uint32_t size = bimg::imageGetSize( + NULL + , uint16_t(dstMip.m_width) + , uint16_t(dstMip.m_height) + , uint16_t(dstMip.m_depth) + , false + , false + , 1 + , bimg::TextureFormat::R8 + ); + temp = BX_ALLOC(_allocator, size); + uint8_t* rgba = (uint8_t*)temp; + + bimg::imageDecodeToR8(_allocator + , rgba + , mip.m_data + , mip.m_width + , mip.m_height + , mip.m_depth + , mip.m_width + , mip.m_format + ); + + bimg::imageGetRawData(*output, side, 0, output->m_data, output->m_size, dstMip); + dstData = const_cast(dstMip.m_data); + + bimg::imageMakeDist(_allocator + , dstData + , mip.m_width + , mip.m_height + , mip.m_width + , _options.edge + , rgba + ); + } + else + { + uint32_t size = bimg::imageGetSize( + NULL + , uint16_t(dstMip.m_width) + , uint16_t(dstMip.m_height) + , uint16_t(dstMip.m_depth) + , false + , false + , 1 + , bimg::TextureFormat::RGBA8 + ); + temp = BX_ALLOC(_allocator, size); + uint8_t* rgba = (uint8_t*)temp; + + bimg::imageDecodeToRgba8(rgba + , mip.m_data + , mip.m_width + , mip.m_height + , mip.m_width*4 + , mip.m_format + ); + + float coverage = 0.0f; + if (_options.alphaTest) + { + coverage = bimg::imageAlphaTestCoverage(bimg::TextureFormat::RGBA8 + , mip.m_width + , mip.m_height + , mip.m_width*4 + , rgba + , _options.edge + ); + } + + void* ref = NULL; + if (_options.iqa) + { + ref = BX_ALLOC(_allocator, size); bx::memCopy(ref, rgba, size); } - imageEncodeFromRgba8(output->m_data, rgba, dstMip.m_width, dstMip.m_height, format); + bimg::imageGetRawData(*output, side, 0, output->m_data, output->m_size, dstMip); + dstData = const_cast(dstMip.m_data); + bimg::imageEncodeFromRgba8(dstData + , rgba + , dstMip.m_width + , dstMip.m_height + , dstMip.m_depth + , outputFormat + , _options.quality + , _err + ); - for (uint8_t lod = 1; lod < numMips; ++lod) + for (uint8_t lod = 1; lod < numMips && _err->isOk(); ++lod) { - imageRgba8Downsample2x2(rgba, dstMip.m_width, dstMip.m_height, dstMip.m_width*4, rgba); - imageGetRawData(*output, 0, lod, output->m_data, output->m_size, dstMip); - uint8_t* data = const_cast(dstMip.m_data); - imageEncodeFromRgba8(data, rgba, dstMip.m_width, dstMip.m_height, format); + bimg::imageRgba8Downsample2x2(rgba + , dstMip.m_width + , dstMip.m_height + , dstMip.m_depth + , dstMip.m_width*4 + , rgba + ); + + if (_options.alphaTest) + { + bimg::imageScaleAlphaToCoverage(bimg::TextureFormat::RGBA8 + , dstMip.m_width + , dstMip.m_height + , dstMip.m_width*4 + , rgba + , coverage + , _options.edge + ); + } + + bimg::imageGetRawData(*output, side, lod, output->m_data, output->m_size, dstMip); + dstData = const_cast(dstMip.m_data); + + bimg::imageEncodeFromRgba8(dstData + , rgba + , dstMip.m_width + , dstMip.m_height + , dstMip.m_depth + , outputFormat + , _options.quality + , _err + ); } if (NULL != ref) { - imageDecodeToRgba8(rgba + bimg::imageDecodeToRgba8(rgba , output->m_data , mip.m_width , mip.m_height , mip.m_width*mip.m_bpp/8 - , format + , outputFormat ); - static const iqa_ssim_args args = - { - 0.39f, // alpha - 0.731f, // beta - 1.12f, // gamma - 187, // L - 0.025987f, // K1 - 0.0173f, // K2 - 1 // factor - }; + float result = bimg::imageQualityRgba8( + ref + , rgba + , uint16_t(mip.m_width) + , uint16_t(mip.m_height) + ); - float result = iqa_ssim( (uint8_t*)ref - , rgba - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 - , 0 - , &args - ); printf("%f\n", result); - BX_FREE(&allocator, ref); + BX_FREE(_allocator, ref); } } - BX_FREE(&allocator, temp); + BX_FREE(_allocator, temp); + } + } + + bimg::imageFree(input); + } + + if (!_err->isOk() + && NULL != output) + { + bimg::imageFree(output); + output = NULL; + } + + return output; +} + +void help(const char* _error = NULL, bool _showHelp = true) +{ + if (NULL != _error) + { + fprintf(stderr, "Error:\n%s\n\n", _error); + + if (!_showHelp) + { + return; + } + } + + fprintf(stderr + , "texturec, bgfx texture compiler tool, version %d.%d.%d.\n" + "Copyright 2011-2018 Branimir Karadzic. All rights reserved.\n" + "License: https://github.com/bkaradzic/bimg#license-bsd-2-clause\n\n" + , BIMG_TEXTUREC_VERSION_MAJOR + , BIMG_TEXTUREC_VERSION_MINOR + , BIMG_API_VERSION + ); + + fprintf(stderr + , "Usage: texturec -f -o [-t ]\n" + + "\n" + "Supported file formats:\n" + " *.bmp (input) Windows Bitmap.\n" + " *.dds (input, output) Direct Draw Surface.\n" + " *.exr (input) OpenEXR.\n" + " *.gif (input) Graphics Interchange Format.\n" + " *.jpg (input) JPEG Interchange Format.\n" + " *.hdr (input) Radiance RGBE.\n" + " *.ktx (input, output) Khronos Texture.\n" + " *.png (input, output) Portable Network Graphics.\n" + " *.psd (input) Photoshop Document.\n" + " *.pvr (input) PowerVR.\n" + " *.tga (input) Targa.\n" + + "\n" + "Options:\n" + " -h, --help Help.\n" + " -v, --version Version information only.\n" + " -f Input file path.\n" + " -o Output file path.\n" + " -t Output format type (BC1/2/3/4/5, ETC1, PVR14, etc.).\n" + " -q Encoding quality (default, fastest, highest).\n" + " -m, --mips Generate mip-maps.\n" + " -n, --normalmap Input texture is normal map.\n" + " --equirect Input texture equirectangular projection of cubemap.\n" + " --sdf Compute SDF texture.\n" + " --ref Alpha reference value.\n" + " --iqa Image Quality Assessment\n" + " --max Maximum width/height (image will be scaled down and\n" + " aspect ratio will be preserved.\n" + " --as Save as.\n" + " --validate *DEBUG* Validate that output image produced matches after loading.\n" + + "\n" + "For additional information, see https://github.com/bkaradzic/bgfx\n" + ); +} + +void help(const char* _str, const bx::Error& _err) +{ + std::string str; + if (_str != NULL) + { + str.append(_str); + str.append(" "); + } + + const bx::StringView& sv = _err.getMessage(); + str.append(sv.getPtr(), sv.getTerm() - sv.getPtr() ); + + help(str.c_str(), false); +} + +int main(int _argc, const char* _argv[]) +{ + bx::CommandLine cmdLine(_argc, _argv); + + if (cmdLine.hasArg('v', "version") ) + { + fprintf(stderr + , "texturec, bgfx texture compiler tool, version %d.%d.%d.\n" + , BIMG_TEXTUREC_VERSION_MAJOR + , BIMG_TEXTUREC_VERSION_MINOR + , BIMG_API_VERSION + ); + return bx::kExitSuccess; + } + + if (cmdLine.hasArg('h', "help") ) + { + help(); + return bx::kExitFailure; + } + + const char* inputFileName = cmdLine.findOption('f'); + if (NULL == inputFileName) + { + help("Input file must be specified."); + return bx::kExitFailure; + } + + const char* outputFileName = cmdLine.findOption('o'); + if (NULL == outputFileName) + { + help("Output file must be specified."); + return bx::kExitFailure; + } + + const char* saveAs = cmdLine.findOption("as"); + saveAs = NULL == saveAs ? bx::strFindI(outputFileName, ".ktx") : saveAs; + saveAs = NULL == saveAs ? bx::strFindI(outputFileName, ".dds") : saveAs; + saveAs = NULL == saveAs ? bx::strFindI(outputFileName, ".png") : saveAs; + if (NULL == saveAs) + { + help("Output file format must be specified."); + return bx::kExitFailure; + } + + Options options; + + const char* edgeOpt = cmdLine.findOption("sdf"); + if (NULL != edgeOpt) + { + options.sdf = true; + if (!bx::fromString(&options.edge, edgeOpt) ) + { + options.edge = 255.0f; + } + } + else + { + const char* alphaRef = cmdLine.findOption("ref"); + if (NULL != alphaRef) + { + options.alphaTest = true; + if (!bx::fromString(&options.edge, alphaRef)) + { + options.edge = 0.5f; + } + } + } + + options.mips = cmdLine.hasArg('m', "mips"); + options.normalMap = cmdLine.hasArg('n', "normalmap"); + options.equirect = cmdLine.hasArg("equirect"); + options.iqa = cmdLine.hasArg("iqa"); + + const char* maxSize = cmdLine.findOption("max"); + if (NULL != maxSize) + { + options.maxSize = atoi(maxSize); + } + + options.format = bimg::TextureFormat::Count; + const char* type = cmdLine.findOption('t'); + if (NULL != type) + { + options.format = bimg::getFormat(type); + + if (!bimg::isValid(options.format) ) + { + help("Invalid format specified."); + return bx::kExitFailure; + } + } + + if (NULL != bx::strFindI(outputFileName, ".png") ) + { + if (options.format == bimg::TextureFormat::Count) + { + options.format = bimg::TextureFormat::RGBA8; + } + else if (options.format != bimg::TextureFormat::RGBA8) + { + help("Ouput PNG format must be RGBA8."); + return bx::kExitFailure; + } + } + + const char* quality = cmdLine.findOption('q'); + if (NULL != quality) + { + switch (bx::toLower(quality[0]) ) + { + case 'h': options.quality = bimg::Quality::Highest; break; + case 'f': options.quality = bimg::Quality::Fastest; break; + case 'd': options.quality = bimg::Quality::Default; break; + default: + help("Invalid quality specified."); + return bx::kExitFailure; + } + } + + const bool validate = cmdLine.hasArg("validate"); + + bx::Error err; + bx::FileReader reader; + if (!bx::open(&reader, inputFileName, &err) ) + { + help("Failed to open input file.", err); + return bx::kExitFailure; + } + + uint32_t inputSize = (uint32_t)bx::getSize(&reader); + if (0 == inputSize) + { + help("Failed to read input file.", err); + return bx::kExitFailure; + } + + bx::DefaultAllocator allocator; + uint8_t* inputData = (uint8_t*)BX_ALLOC(&allocator, inputSize); + + bx::read(&reader, inputData, inputSize, &err); + bx::close(&reader); + + if (!err.isOk() ) + { + help("Failed to read input file.", err); + return bx::kExitFailure; + } + + bimg::ImageContainer* output = convert(&allocator, inputData, inputSize, options, &err); + + BX_FREE(&allocator, inputData); + + if (NULL != output) + { + bx::FileWriter writer; + if (bx::open(&writer, outputFileName, false, &err) ) + { + if (NULL != bx::strFindI(saveAs, "ktx") ) + { + bimg::imageWriteKtx(&writer, *output, output->m_data, output->m_size, &err); + } + else if (NULL != bx::strFindI(saveAs, "dds") ) + { + bimg::imageWriteDds(&writer, *output, output->m_data, output->m_size, &err); + } + else if (NULL != bx::strFindI(saveAs, "png") ) + { + bimg::ImageMip mip; + bimg::imageGetRawData(*output, 0, 0, output->m_data, output->m_size, mip); + bimg::imageWritePng(&writer + , mip.m_width + , mip.m_height + , mip.m_width*4 + , mip.m_data + , false + , false + , &err); } - if (NULL != output) - { - bx::CrtFileWriter writer; - if (bx::open(&writer, outputFileName) ) - { - if (NULL != bx::stristr(outputFileName, ".ktx") ) - { - imageWriteKtx(&writer, *output, output->m_data, output->m_size); - } + bx::close(&writer); - bx::close(&writer); - } - else - { - help("Failed to open output file."); - return EXIT_FAILURE; - } - - imageFree(output); - } - else + if (!err.isOk() ) { - help("No output generated."); - return EXIT_FAILURE; + help(NULL, err); + return bx::kExitFailure; } } else { - help("Failed to load input file."); - return EXIT_FAILURE; + help("Failed to open output file.", err); + return bx::kExitFailure; } + + if (validate) + { + if (!bx::open(&reader, outputFileName, &err) ) + { + help("Failed to validate file.", err); + return bx::kExitFailure; + } + + inputSize = (uint32_t)bx::getSize(&reader); + if (0 == inputSize) + { + help("Failed to validate file.", err); + return bx::kExitFailure; + } + + inputData = (uint8_t*)BX_ALLOC(&allocator, inputSize); + bx::read(&reader, inputData, inputSize, &err); + bx::close(&reader); + + bimg::ImageContainer* input = bimg::imageParse(&allocator, inputData, inputSize, bimg::TextureFormat::Count, &err); + if (!err.isOk() ) + { + help("Failed to validate file.", err); + return bx::kExitFailure; + } + + if (false + || input->m_format != output->m_format + || input->m_size != output->m_size + || input->m_width != output->m_width + || input->m_height != output->m_height + || input->m_depth != output->m_depth + || input->m_numLayers != output->m_numLayers + || input->m_numMips != output->m_numMips + || input->m_hasAlpha != output->m_hasAlpha + || input->m_cubeMap != output->m_cubeMap + ) + { + help("Validation failed, image headers are different."); + return bx::kExitFailure; + } + + { + const uint8_t numMips = output->m_numMips; + const uint16_t numSides = output->m_numLayers * (output->m_cubeMap ? 6 : 1); + + for (uint8_t lod = 0; lod < numMips; ++lod) + { + for (uint16_t side = 0; side < numSides; ++side) + { + bimg::ImageMip srcMip; + bool hasSrc = bimg::imageGetRawData(*input, side, lod, input->m_data, input->m_size, srcMip); + + bimg::ImageMip dstMip; + bool hasDst = bimg::imageGetRawData(*output, side, lod, output->m_data, output->m_size, dstMip); + + if (false + || hasSrc != hasDst + || srcMip.m_size != dstMip.m_size + ) + { + help("Validation failed, image mip/layer/side are different."); + return bx::kExitFailure; + } + + if (0 != bx::memCmp(srcMip.m_data, dstMip.m_data, srcMip.m_size) ) + { + help("Validation failed, image content are different."); + return bx::kExitFailure; + } + } + } + } + + BX_FREE(&allocator, inputData); + } + + bimg::imageFree(output); + } + else + { + help(NULL, err); + return bx::kExitFailure; } - return EXIT_SUCCESS; + return bx::kExitSuccess; } diff --git a/3rdparty/bx/.appveyor.yml b/3rdparty/bx/.appveyor.yml index 286a3c9..96ec072 100644 --- a/3rdparty/bx/.appveyor.yml +++ b/3rdparty/bx/.appveyor.yml @@ -1,14 +1,12 @@ shallow_clone: true os: - - Visual Studio 2015 + - Visual Studio 2017 environment: matrix: - - TOOLSET: vs2010 - - TOOLSET: vs2012 - - TOOLSET: vs2013 - TOOLSET: vs2015 + - TOOLSET: vs2017 configuration: - Debug diff --git a/3rdparty/bx/.travis.yml b/3rdparty/bx/.travis.yml index 7b8e2d6..5f55380 100644 --- a/3rdparty/bx/.travis.yml +++ b/3rdparty/bx/.travis.yml @@ -6,8 +6,18 @@ matrix: - compiler: clang os: osx +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-5 + - g++-5 + - clang + script: - make test + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then make test CXX="g++-5" CC="gcc-5"; fi + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then make test; fi branches: only: @@ -16,5 +26,4 @@ branches: notifications: email: false -osx_image: - xcode61 +osx_image: xcode9.3 diff --git a/3rdparty/bx/3rdparty/.editorconfig b/3rdparty/bx/3rdparty/.editorconfig new file mode 100644 index 0000000..b419896 --- /dev/null +++ b/3rdparty/bx/3rdparty/.editorconfig @@ -0,0 +1,6 @@ +root = true + +[ini/*] +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true diff --git a/3rdparty/bx/3rdparty/CL/cl.h b/3rdparty/bx/3rdparty/CL/cl.h deleted file mode 100644 index 203c659..0000000 --- a/3rdparty/bx/3rdparty/CL/cl.h +++ /dev/null @@ -1,1214 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 - 2012 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - ******************************************************************************/ - -#ifndef __OPENCL_CL_H -#define __OPENCL_CL_H - -#ifdef __APPLE__ -#include -#else -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/******************************************************************************/ - -typedef struct _cl_platform_id * cl_platform_id; -typedef struct _cl_device_id * cl_device_id; -typedef struct _cl_context * cl_context; -typedef struct _cl_command_queue * cl_command_queue; -typedef struct _cl_mem * cl_mem; -typedef struct _cl_program * cl_program; -typedef struct _cl_kernel * cl_kernel; -typedef struct _cl_event * cl_event; -typedef struct _cl_sampler * cl_sampler; - -typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */ -typedef cl_ulong cl_bitfield; -typedef cl_bitfield cl_device_type; -typedef cl_uint cl_platform_info; -typedef cl_uint cl_device_info; -typedef cl_bitfield cl_device_fp_config; -typedef cl_uint cl_device_mem_cache_type; -typedef cl_uint cl_device_local_mem_type; -typedef cl_bitfield cl_device_exec_capabilities; -typedef cl_bitfield cl_command_queue_properties; -typedef intptr_t cl_device_partition_property; -typedef cl_bitfield cl_device_affinity_domain; - -typedef intptr_t cl_context_properties; -typedef cl_uint cl_context_info; -typedef cl_uint cl_command_queue_info; -typedef cl_uint cl_channel_order; -typedef cl_uint cl_channel_type; -typedef cl_bitfield cl_mem_flags; -typedef cl_uint cl_mem_object_type; -typedef cl_uint cl_mem_info; -typedef cl_bitfield cl_mem_migration_flags; -typedef cl_uint cl_image_info; -typedef cl_uint cl_buffer_create_type; -typedef cl_uint cl_addressing_mode; -typedef cl_uint cl_filter_mode; -typedef cl_uint cl_sampler_info; -typedef cl_bitfield cl_map_flags; -typedef cl_uint cl_program_info; -typedef cl_uint cl_program_build_info; -typedef cl_uint cl_program_binary_type; -typedef cl_int cl_build_status; -typedef cl_uint cl_kernel_info; -typedef cl_uint cl_kernel_arg_info; -typedef cl_uint cl_kernel_arg_address_qualifier; -typedef cl_uint cl_kernel_arg_access_qualifier; -typedef cl_bitfield cl_kernel_arg_type_qualifier; -typedef cl_uint cl_kernel_work_group_info; -typedef cl_uint cl_event_info; -typedef cl_uint cl_command_type; -typedef cl_uint cl_profiling_info; - - -typedef struct _cl_image_format { - cl_channel_order image_channel_order; - cl_channel_type image_channel_data_type; -} cl_image_format; - -typedef struct _cl_image_desc { - cl_mem_object_type image_type; - size_t image_width; - size_t image_height; - size_t image_depth; - size_t image_array_size; - size_t image_row_pitch; - size_t image_slice_pitch; - cl_uint num_mip_levels; - cl_uint num_samples; - cl_mem buffer; -} cl_image_desc; - -typedef struct _cl_buffer_region { - size_t origin; - size_t size; -} cl_buffer_region; - - -/******************************************************************************/ - -/* Error Codes */ -#define CL_SUCCESS 0 -#define CL_DEVICE_NOT_FOUND -1 -#define CL_DEVICE_NOT_AVAILABLE -2 -#define CL_COMPILER_NOT_AVAILABLE -3 -#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 -#define CL_OUT_OF_RESOURCES -5 -#define CL_OUT_OF_HOST_MEMORY -6 -#define CL_PROFILING_INFO_NOT_AVAILABLE -7 -#define CL_MEM_COPY_OVERLAP -8 -#define CL_IMAGE_FORMAT_MISMATCH -9 -#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 -#define CL_BUILD_PROGRAM_FAILURE -11 -#define CL_MAP_FAILURE -12 -#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13 -#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14 -#define CL_COMPILE_PROGRAM_FAILURE -15 -#define CL_LINKER_NOT_AVAILABLE -16 -#define CL_LINK_PROGRAM_FAILURE -17 -#define CL_DEVICE_PARTITION_FAILED -18 -#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19 - -#define CL_INVALID_VALUE -30 -#define CL_INVALID_DEVICE_TYPE -31 -#define CL_INVALID_PLATFORM -32 -#define CL_INVALID_DEVICE -33 -#define CL_INVALID_CONTEXT -34 -#define CL_INVALID_QUEUE_PROPERTIES -35 -#define CL_INVALID_COMMAND_QUEUE -36 -#define CL_INVALID_HOST_PTR -37 -#define CL_INVALID_MEM_OBJECT -38 -#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 -#define CL_INVALID_IMAGE_SIZE -40 -#define CL_INVALID_SAMPLER -41 -#define CL_INVALID_BINARY -42 -#define CL_INVALID_BUILD_OPTIONS -43 -#define CL_INVALID_PROGRAM -44 -#define CL_INVALID_PROGRAM_EXECUTABLE -45 -#define CL_INVALID_KERNEL_NAME -46 -#define CL_INVALID_KERNEL_DEFINITION -47 -#define CL_INVALID_KERNEL -48 -#define CL_INVALID_ARG_INDEX -49 -#define CL_INVALID_ARG_VALUE -50 -#define CL_INVALID_ARG_SIZE -51 -#define CL_INVALID_KERNEL_ARGS -52 -#define CL_INVALID_WORK_DIMENSION -53 -#define CL_INVALID_WORK_GROUP_SIZE -54 -#define CL_INVALID_WORK_ITEM_SIZE -55 -#define CL_INVALID_GLOBAL_OFFSET -56 -#define CL_INVALID_EVENT_WAIT_LIST -57 -#define CL_INVALID_EVENT -58 -#define CL_INVALID_OPERATION -59 -#define CL_INVALID_GL_OBJECT -60 -#define CL_INVALID_BUFFER_SIZE -61 -#define CL_INVALID_MIP_LEVEL -62 -#define CL_INVALID_GLOBAL_WORK_SIZE -63 -#define CL_INVALID_PROPERTY -64 -#define CL_INVALID_IMAGE_DESCRIPTOR -65 -#define CL_INVALID_COMPILER_OPTIONS -66 -#define CL_INVALID_LINKER_OPTIONS -67 -#define CL_INVALID_DEVICE_PARTITION_COUNT -68 - -/* OpenCL Version */ -#define CL_VERSION_1_0 1 -#define CL_VERSION_1_1 1 -#define CL_VERSION_1_2 1 - -/* cl_bool */ -#define CL_FALSE 0 -#define CL_TRUE 1 -#define CL_BLOCKING CL_TRUE -#define CL_NON_BLOCKING CL_FALSE - -/* cl_platform_info */ -#define CL_PLATFORM_PROFILE 0x0900 -#define CL_PLATFORM_VERSION 0x0901 -#define CL_PLATFORM_NAME 0x0902 -#define CL_PLATFORM_VENDOR 0x0903 -#define CL_PLATFORM_EXTENSIONS 0x0904 - -/* cl_device_type - bitfield */ -#define CL_DEVICE_TYPE_DEFAULT (1 << 0) -#define CL_DEVICE_TYPE_CPU (1 << 1) -#define CL_DEVICE_TYPE_GPU (1 << 2) -#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) -#define CL_DEVICE_TYPE_CUSTOM (1 << 4) -#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF - -/* cl_device_info */ -#define CL_DEVICE_TYPE 0x1000 -#define CL_DEVICE_VENDOR_ID 0x1001 -#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 -#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 -#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 -#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B -#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C -#define CL_DEVICE_ADDRESS_BITS 0x100D -#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E -#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F -#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 -#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 -#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 -#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 -#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 -#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 -#define CL_DEVICE_IMAGE_SUPPORT 0x1016 -#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 -#define CL_DEVICE_MAX_SAMPLERS 0x1018 -#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 -#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A -#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B -#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C -#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D -#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E -#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F -#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 -#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 -#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 -#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 -#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 -#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 -#define CL_DEVICE_ENDIAN_LITTLE 0x1026 -#define CL_DEVICE_AVAILABLE 0x1027 -#define CL_DEVICE_COMPILER_AVAILABLE 0x1028 -#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 -#define CL_DEVICE_QUEUE_PROPERTIES 0x102A -#define CL_DEVICE_NAME 0x102B -#define CL_DEVICE_VENDOR 0x102C -#define CL_DRIVER_VERSION 0x102D -#define CL_DEVICE_PROFILE 0x102E -#define CL_DEVICE_VERSION 0x102F -#define CL_DEVICE_EXTENSIONS 0x1030 -#define CL_DEVICE_PLATFORM 0x1031 -#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 -/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */ -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 -#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C -#define CL_DEVICE_OPENCL_C_VERSION 0x103D -#define CL_DEVICE_LINKER_AVAILABLE 0x103E -#define CL_DEVICE_BUILT_IN_KERNELS 0x103F -#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040 -#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041 -#define CL_DEVICE_PARENT_DEVICE 0x1042 -#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043 -#define CL_DEVICE_PARTITION_PROPERTIES 0x1044 -#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045 -#define CL_DEVICE_PARTITION_TYPE 0x1046 -#define CL_DEVICE_REFERENCE_COUNT 0x1047 -#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048 -#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049 -#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A -#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B - -/* cl_device_fp_config - bitfield */ -#define CL_FP_DENORM (1 << 0) -#define CL_FP_INF_NAN (1 << 1) -#define CL_FP_ROUND_TO_NEAREST (1 << 2) -#define CL_FP_ROUND_TO_ZERO (1 << 3) -#define CL_FP_ROUND_TO_INF (1 << 4) -#define CL_FP_FMA (1 << 5) -#define CL_FP_SOFT_FLOAT (1 << 6) -#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7) - -/* cl_device_mem_cache_type */ -#define CL_NONE 0x0 -#define CL_READ_ONLY_CACHE 0x1 -#define CL_READ_WRITE_CACHE 0x2 - -/* cl_device_local_mem_type */ -#define CL_LOCAL 0x1 -#define CL_GLOBAL 0x2 - -/* cl_device_exec_capabilities - bitfield */ -#define CL_EXEC_KERNEL (1 << 0) -#define CL_EXEC_NATIVE_KERNEL (1 << 1) - -/* cl_command_queue_properties - bitfield */ -#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) -#define CL_QUEUE_PROFILING_ENABLE (1 << 1) - -/* cl_context_info */ -#define CL_CONTEXT_REFERENCE_COUNT 0x1080 -#define CL_CONTEXT_DEVICES 0x1081 -#define CL_CONTEXT_PROPERTIES 0x1082 -#define CL_CONTEXT_NUM_DEVICES 0x1083 - -/* cl_context_properties */ -#define CL_CONTEXT_PLATFORM 0x1084 -#define CL_CONTEXT_INTEROP_USER_SYNC 0x1085 - -/* cl_device_partition_property */ -#define CL_DEVICE_PARTITION_EQUALLY 0x1086 -#define CL_DEVICE_PARTITION_BY_COUNTS 0x1087 -#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0 -#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088 - -/* cl_device_affinity_domain */ -#define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0) -#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1) -#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2) -#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3) -#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4) -#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5) - -/* cl_command_queue_info */ -#define CL_QUEUE_CONTEXT 0x1090 -#define CL_QUEUE_DEVICE 0x1091 -#define CL_QUEUE_REFERENCE_COUNT 0x1092 -#define CL_QUEUE_PROPERTIES 0x1093 - -/* cl_mem_flags - bitfield */ -#define CL_MEM_READ_WRITE (1 << 0) -#define CL_MEM_WRITE_ONLY (1 << 1) -#define CL_MEM_READ_ONLY (1 << 2) -#define CL_MEM_USE_HOST_PTR (1 << 3) -#define CL_MEM_ALLOC_HOST_PTR (1 << 4) -#define CL_MEM_COPY_HOST_PTR (1 << 5) -// reserved (1 << 6) -#define CL_MEM_HOST_WRITE_ONLY (1 << 7) -#define CL_MEM_HOST_READ_ONLY (1 << 8) -#define CL_MEM_HOST_NO_ACCESS (1 << 9) - -/* cl_mem_migration_flags - bitfield */ -#define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0) -#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1) - -/* cl_channel_order */ -#define CL_R 0x10B0 -#define CL_A 0x10B1 -#define CL_RG 0x10B2 -#define CL_RA 0x10B3 -#define CL_RGB 0x10B4 -#define CL_RGBA 0x10B5 -#define CL_BGRA 0x10B6 -#define CL_ARGB 0x10B7 -#define CL_INTENSITY 0x10B8 -#define CL_LUMINANCE 0x10B9 -#define CL_Rx 0x10BA -#define CL_RGx 0x10BB -#define CL_RGBx 0x10BC -#define CL_DEPTH 0x10BD -#define CL_DEPTH_STENCIL 0x10BE - -/* cl_channel_type */ -#define CL_SNORM_INT8 0x10D0 -#define CL_SNORM_INT16 0x10D1 -#define CL_UNORM_INT8 0x10D2 -#define CL_UNORM_INT16 0x10D3 -#define CL_UNORM_SHORT_565 0x10D4 -#define CL_UNORM_SHORT_555 0x10D5 -#define CL_UNORM_INT_101010 0x10D6 -#define CL_SIGNED_INT8 0x10D7 -#define CL_SIGNED_INT16 0x10D8 -#define CL_SIGNED_INT32 0x10D9 -#define CL_UNSIGNED_INT8 0x10DA -#define CL_UNSIGNED_INT16 0x10DB -#define CL_UNSIGNED_INT32 0x10DC -#define CL_HALF_FLOAT 0x10DD -#define CL_FLOAT 0x10DE -#define CL_UNORM_INT24 0x10DF - -/* cl_mem_object_type */ -#define CL_MEM_OBJECT_BUFFER 0x10F0 -#define CL_MEM_OBJECT_IMAGE2D 0x10F1 -#define CL_MEM_OBJECT_IMAGE3D 0x10F2 -#define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3 -#define CL_MEM_OBJECT_IMAGE1D 0x10F4 -#define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5 -#define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6 - -/* cl_mem_info */ -#define CL_MEM_TYPE 0x1100 -#define CL_MEM_FLAGS 0x1101 -#define CL_MEM_SIZE 0x1102 -#define CL_MEM_HOST_PTR 0x1103 -#define CL_MEM_MAP_COUNT 0x1104 -#define CL_MEM_REFERENCE_COUNT 0x1105 -#define CL_MEM_CONTEXT 0x1106 -#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107 -#define CL_MEM_OFFSET 0x1108 - -/* cl_image_info */ -#define CL_IMAGE_FORMAT 0x1110 -#define CL_IMAGE_ELEMENT_SIZE 0x1111 -#define CL_IMAGE_ROW_PITCH 0x1112 -#define CL_IMAGE_SLICE_PITCH 0x1113 -#define CL_IMAGE_WIDTH 0x1114 -#define CL_IMAGE_HEIGHT 0x1115 -#define CL_IMAGE_DEPTH 0x1116 -#define CL_IMAGE_ARRAY_SIZE 0x1117 -#define CL_IMAGE_BUFFER 0x1118 -#define CL_IMAGE_NUM_MIP_LEVELS 0x1119 -#define CL_IMAGE_NUM_SAMPLES 0x111A - -/* cl_addressing_mode */ -#define CL_ADDRESS_NONE 0x1130 -#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 -#define CL_ADDRESS_CLAMP 0x1132 -#define CL_ADDRESS_REPEAT 0x1133 -#define CL_ADDRESS_MIRRORED_REPEAT 0x1134 - -/* cl_filter_mode */ -#define CL_FILTER_NEAREST 0x1140 -#define CL_FILTER_LINEAR 0x1141 - -/* cl_sampler_info */ -#define CL_SAMPLER_REFERENCE_COUNT 0x1150 -#define CL_SAMPLER_CONTEXT 0x1151 -#define CL_SAMPLER_NORMALIZED_COORDS 0x1152 -#define CL_SAMPLER_ADDRESSING_MODE 0x1153 -#define CL_SAMPLER_FILTER_MODE 0x1154 - -/* cl_map_flags - bitfield */ -#define CL_MAP_READ (1 << 0) -#define CL_MAP_WRITE (1 << 1) -#define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2) - -/* cl_program_info */ -#define CL_PROGRAM_REFERENCE_COUNT 0x1160 -#define CL_PROGRAM_CONTEXT 0x1161 -#define CL_PROGRAM_NUM_DEVICES 0x1162 -#define CL_PROGRAM_DEVICES 0x1163 -#define CL_PROGRAM_SOURCE 0x1164 -#define CL_PROGRAM_BINARY_SIZES 0x1165 -#define CL_PROGRAM_BINARIES 0x1166 -#define CL_PROGRAM_NUM_KERNELS 0x1167 -#define CL_PROGRAM_KERNEL_NAMES 0x1168 - -/* cl_program_build_info */ -#define CL_PROGRAM_BUILD_STATUS 0x1181 -#define CL_PROGRAM_BUILD_OPTIONS 0x1182 -#define CL_PROGRAM_BUILD_LOG 0x1183 -#define CL_PROGRAM_BINARY_TYPE 0x1184 - -/* cl_program_binary_type */ -#define CL_PROGRAM_BINARY_TYPE_NONE 0x0 -#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1 -#define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2 -#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4 - -/* cl_build_status */ -#define CL_BUILD_SUCCESS 0 -#define CL_BUILD_NONE -1 -#define CL_BUILD_ERROR -2 -#define CL_BUILD_IN_PROGRESS -3 - -/* cl_kernel_info */ -#define CL_KERNEL_FUNCTION_NAME 0x1190 -#define CL_KERNEL_NUM_ARGS 0x1191 -#define CL_KERNEL_REFERENCE_COUNT 0x1192 -#define CL_KERNEL_CONTEXT 0x1193 -#define CL_KERNEL_PROGRAM 0x1194 -#define CL_KERNEL_ATTRIBUTES 0x1195 - -/* cl_kernel_arg_info */ -#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196 -#define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197 -#define CL_KERNEL_ARG_TYPE_NAME 0x1198 -#define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199 -#define CL_KERNEL_ARG_NAME 0x119A - -/* cl_kernel_arg_address_qualifier */ -#define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B -#define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C -#define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D -#define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E - -/* cl_kernel_arg_access_qualifier */ -#define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0 -#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1 -#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2 -#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3 - -/* cl_kernel_arg_type_qualifer */ -#define CL_KERNEL_ARG_TYPE_NONE 0 -#define CL_KERNEL_ARG_TYPE_CONST (1 << 0) -#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1) -#define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2) - -/* cl_kernel_work_group_info */ -#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 -#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 -#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 -#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3 -#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4 -#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5 - -/* cl_event_info */ -#define CL_EVENT_COMMAND_QUEUE 0x11D0 -#define CL_EVENT_COMMAND_TYPE 0x11D1 -#define CL_EVENT_REFERENCE_COUNT 0x11D2 -#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 -#define CL_EVENT_CONTEXT 0x11D4 - -/* cl_command_type */ -#define CL_COMMAND_NDRANGE_KERNEL 0x11F0 -#define CL_COMMAND_TASK 0x11F1 -#define CL_COMMAND_NATIVE_KERNEL 0x11F2 -#define CL_COMMAND_READ_BUFFER 0x11F3 -#define CL_COMMAND_WRITE_BUFFER 0x11F4 -#define CL_COMMAND_COPY_BUFFER 0x11F5 -#define CL_COMMAND_READ_IMAGE 0x11F6 -#define CL_COMMAND_WRITE_IMAGE 0x11F7 -#define CL_COMMAND_COPY_IMAGE 0x11F8 -#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 -#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA -#define CL_COMMAND_MAP_BUFFER 0x11FB -#define CL_COMMAND_MAP_IMAGE 0x11FC -#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD -#define CL_COMMAND_MARKER 0x11FE -#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF -#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 -#define CL_COMMAND_READ_BUFFER_RECT 0x1201 -#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202 -#define CL_COMMAND_COPY_BUFFER_RECT 0x1203 -#define CL_COMMAND_USER 0x1204 -#define CL_COMMAND_BARRIER 0x1205 -#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206 -#define CL_COMMAND_FILL_BUFFER 0x1207 -#define CL_COMMAND_FILL_IMAGE 0x1208 - -/* command execution status */ -#define CL_COMPLETE 0x0 -#define CL_RUNNING 0x1 -#define CL_SUBMITTED 0x2 -#define CL_QUEUED 0x3 - -/* cl_buffer_create_type */ -#define CL_BUFFER_CREATE_TYPE_REGION 0x1220 - -/* cl_profiling_info */ -#define CL_PROFILING_COMMAND_QUEUED 0x1280 -#define CL_PROFILING_COMMAND_SUBMIT 0x1281 -#define CL_PROFILING_COMMAND_START 0x1282 -#define CL_PROFILING_COMMAND_END 0x1283 - -/********************************************************************************************************/ - -/* Platform API */ -extern CL_API_ENTRY cl_int CL_API_CALL -clGetPlatformIDs(cl_uint /* num_entries */, - cl_platform_id * /* platforms */, - cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetPlatformInfo(cl_platform_id /* platform */, - cl_platform_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Device APIs */ -extern CL_API_ENTRY cl_int CL_API_CALL -clGetDeviceIDs(cl_platform_id /* platform */, - cl_device_type /* device_type */, - cl_uint /* num_entries */, - cl_device_id * /* devices */, - cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetDeviceInfo(cl_device_id /* device */, - cl_device_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clCreateSubDevices(cl_device_id /* in_device */, - const cl_device_partition_property * /* properties */, - cl_uint /* num_devices */, - cl_device_id * /* out_devices */, - cl_uint * /* num_devices_ret */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2; - -/* Context APIs */ -extern CL_API_ENTRY cl_context CL_API_CALL -clCreateContext(const cl_context_properties * /* properties */, - cl_uint /* num_devices */, - const cl_device_id * /* devices */, - void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *), - void * /* user_data */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_context CL_API_CALL -clCreateContextFromType(const cl_context_properties * /* properties */, - cl_device_type /* device_type */, - void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *), - void * /* user_data */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetContextInfo(cl_context /* context */, - cl_context_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Command Queue APIs */ -extern CL_API_ENTRY cl_command_queue CL_API_CALL -clCreateCommandQueue(cl_context /* context */, - cl_device_id /* device */, - cl_command_queue_properties /* properties */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetCommandQueueInfo(cl_command_queue /* command_queue */, - cl_command_queue_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Memory Object APIs */ -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateBuffer(cl_context /* context */, - cl_mem_flags /* flags */, - size_t /* size */, - void * /* host_ptr */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateSubBuffer(cl_mem /* buffer */, - cl_mem_flags /* flags */, - cl_buffer_create_type /* buffer_create_type */, - const void * /* buffer_create_info */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateImage(cl_context /* context */, - cl_mem_flags /* flags */, - const cl_image_format * /* image_format */, - const cl_image_desc * /* image_desc */, - void * /* host_ptr */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetSupportedImageFormats(cl_context /* context */, - cl_mem_flags /* flags */, - cl_mem_object_type /* image_type */, - cl_uint /* num_entries */, - cl_image_format * /* image_formats */, - cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetMemObjectInfo(cl_mem /* memobj */, - cl_mem_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetImageInfo(cl_mem /* image */, - cl_image_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetMemObjectDestructorCallback( cl_mem /* memobj */, - void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), - void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1; - -/* Sampler APIs */ -extern CL_API_ENTRY cl_sampler CL_API_CALL -clCreateSampler(cl_context /* context */, - cl_bool /* normalized_coords */, - cl_addressing_mode /* addressing_mode */, - cl_filter_mode /* filter_mode */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetSamplerInfo(cl_sampler /* sampler */, - cl_sampler_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Program Object APIs */ -extern CL_API_ENTRY cl_program CL_API_CALL -clCreateProgramWithSource(cl_context /* context */, - cl_uint /* count */, - const char ** /* strings */, - const size_t * /* lengths */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_program CL_API_CALL -clCreateProgramWithBinary(cl_context /* context */, - cl_uint /* num_devices */, - const cl_device_id * /* device_list */, - const size_t * /* lengths */, - const unsigned char ** /* binaries */, - cl_int * /* binary_status */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_program CL_API_CALL -clCreateProgramWithBuiltInKernels(cl_context /* context */, - cl_uint /* num_devices */, - const cl_device_id * /* device_list */, - const char * /* kernel_names */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clBuildProgram(cl_program /* program */, - cl_uint /* num_devices */, - const cl_device_id * /* device_list */, - const char * /* options */, - void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), - void * /* user_data */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clCompileProgram(cl_program /* program */, - cl_uint /* num_devices */, - const cl_device_id * /* device_list */, - const char * /* options */, - cl_uint /* num_input_headers */, - const cl_program * /* input_headers */, - const char ** /* header_include_names */, - void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), - void * /* user_data */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_program CL_API_CALL -clLinkProgram(cl_context /* context */, - cl_uint /* num_devices */, - const cl_device_id * /* device_list */, - const char * /* options */, - cl_uint /* num_input_programs */, - const cl_program * /* input_programs */, - void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), - void * /* user_data */, - cl_int * /* errcode_ret */ ) CL_API_SUFFIX__VERSION_1_2; - - -extern CL_API_ENTRY cl_int CL_API_CALL -clUnloadPlatformCompiler(cl_platform_id /* platform */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetProgramInfo(cl_program /* program */, - cl_program_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetProgramBuildInfo(cl_program /* program */, - cl_device_id /* device */, - cl_program_build_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Kernel Object APIs */ -extern CL_API_ENTRY cl_kernel CL_API_CALL -clCreateKernel(cl_program /* program */, - const char * /* kernel_name */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clCreateKernelsInProgram(cl_program /* program */, - cl_uint /* num_kernels */, - cl_kernel * /* kernels */, - cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetKernelArg(cl_kernel /* kernel */, - cl_uint /* arg_index */, - size_t /* arg_size */, - const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetKernelInfo(cl_kernel /* kernel */, - cl_kernel_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetKernelArgInfo(cl_kernel /* kernel */, - cl_uint /* arg_indx */, - cl_kernel_arg_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetKernelWorkGroupInfo(cl_kernel /* kernel */, - cl_device_id /* device */, - cl_kernel_work_group_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Event Object APIs */ -extern CL_API_ENTRY cl_int CL_API_CALL -clWaitForEvents(cl_uint /* num_events */, - const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetEventInfo(cl_event /* event */, - cl_event_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_event CL_API_CALL -clCreateUserEvent(cl_context /* context */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetUserEventStatus(cl_event /* event */, - cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetEventCallback( cl_event /* event */, - cl_int /* command_exec_callback_type */, - void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *), - void * /* user_data */) CL_API_SUFFIX__VERSION_1_1; - -/* Profiling APIs */ -extern CL_API_ENTRY cl_int CL_API_CALL -clGetEventProfilingInfo(cl_event /* event */, - cl_profiling_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Flush and Finish APIs */ -extern CL_API_ENTRY cl_int CL_API_CALL -clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; - -/* Enqueued Commands APIs */ -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReadBuffer(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - cl_bool /* blocking_read */, - size_t /* offset */, - size_t /* size */, - void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReadBufferRect(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - cl_bool /* blocking_read */, - const size_t * /* buffer_offset */, - const size_t * /* host_offset */, - const size_t * /* region */, - size_t /* buffer_row_pitch */, - size_t /* buffer_slice_pitch */, - size_t /* host_row_pitch */, - size_t /* host_slice_pitch */, - void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueWriteBuffer(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - cl_bool /* blocking_write */, - size_t /* offset */, - size_t /* size */, - const void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueWriteBufferRect(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - cl_bool /* blocking_write */, - const size_t * /* buffer_offset */, - const size_t * /* host_offset */, - const size_t * /* region */, - size_t /* buffer_row_pitch */, - size_t /* buffer_slice_pitch */, - size_t /* host_row_pitch */, - size_t /* host_slice_pitch */, - const void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueFillBuffer(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - const void * /* pattern */, - size_t /* pattern_size */, - size_t /* offset */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueCopyBuffer(cl_command_queue /* command_queue */, - cl_mem /* src_buffer */, - cl_mem /* dst_buffer */, - size_t /* src_offset */, - size_t /* dst_offset */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueCopyBufferRect(cl_command_queue /* command_queue */, - cl_mem /* src_buffer */, - cl_mem /* dst_buffer */, - const size_t * /* src_origin */, - const size_t * /* dst_origin */, - const size_t * /* region */, - size_t /* src_row_pitch */, - size_t /* src_slice_pitch */, - size_t /* dst_row_pitch */, - size_t /* dst_slice_pitch */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReadImage(cl_command_queue /* command_queue */, - cl_mem /* image */, - cl_bool /* blocking_read */, - const size_t * /* origin[3] */, - const size_t * /* region[3] */, - size_t /* row_pitch */, - size_t /* slice_pitch */, - void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueWriteImage(cl_command_queue /* command_queue */, - cl_mem /* image */, - cl_bool /* blocking_write */, - const size_t * /* origin[3] */, - const size_t * /* region[3] */, - size_t /* input_row_pitch */, - size_t /* input_slice_pitch */, - const void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueFillImage(cl_command_queue /* command_queue */, - cl_mem /* image */, - const void * /* fill_color */, - const size_t * /* origin[3] */, - const size_t * /* region[3] */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueCopyImage(cl_command_queue /* command_queue */, - cl_mem /* src_image */, - cl_mem /* dst_image */, - const size_t * /* src_origin[3] */, - const size_t * /* dst_origin[3] */, - const size_t * /* region[3] */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */, - cl_mem /* src_image */, - cl_mem /* dst_buffer */, - const size_t * /* src_origin[3] */, - const size_t * /* region[3] */, - size_t /* dst_offset */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */, - cl_mem /* src_buffer */, - cl_mem /* dst_image */, - size_t /* src_offset */, - const size_t * /* dst_origin[3] */, - const size_t * /* region[3] */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY void * CL_API_CALL -clEnqueueMapBuffer(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - cl_bool /* blocking_map */, - cl_map_flags /* map_flags */, - size_t /* offset */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY void * CL_API_CALL -clEnqueueMapImage(cl_command_queue /* command_queue */, - cl_mem /* image */, - cl_bool /* blocking_map */, - cl_map_flags /* map_flags */, - const size_t * /* origin[3] */, - const size_t * /* region[3] */, - size_t * /* image_row_pitch */, - size_t * /* image_slice_pitch */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueUnmapMemObject(cl_command_queue /* command_queue */, - cl_mem /* memobj */, - void * /* mapped_ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueMigrateMemObjects(cl_command_queue /* command_queue */, - cl_uint /* num_mem_objects */, - const cl_mem * /* mem_objects */, - cl_mem_migration_flags /* flags */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueNDRangeKernel(cl_command_queue /* command_queue */, - cl_kernel /* kernel */, - cl_uint /* work_dim */, - const size_t * /* global_work_offset */, - const size_t * /* global_work_size */, - const size_t * /* local_work_size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueTask(cl_command_queue /* command_queue */, - cl_kernel /* kernel */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueNativeKernel(cl_command_queue /* command_queue */, - void (CL_CALLBACK * /*user_func*/)(void *), - void * /* args */, - size_t /* cb_args */, - cl_uint /* num_mem_objects */, - const cl_mem * /* mem_list */, - const void ** /* args_mem_loc */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueMarkerWithWaitList(cl_command_queue /* command_queue */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueBarrierWithWaitList(cl_command_queue /* command_queue */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; - - -/* Extension function access - * - * Returns the extension function address for the given function name, - * or NULL if a valid function can not be found. The client must - * check to make sure the address is not NULL, before using or - * calling the returned function address. - */ -extern CL_API_ENTRY void * CL_API_CALL -clGetExtensionFunctionAddressForPlatform(cl_platform_id /* platform */, - const char * /* func_name */) CL_API_SUFFIX__VERSION_1_2; - - -// Deprecated OpenCL 1.1 APIs -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL -clCreateImage2D(cl_context /* context */, - cl_mem_flags /* flags */, - const cl_image_format * /* image_format */, - size_t /* image_width */, - size_t /* image_height */, - size_t /* image_row_pitch */, - void * /* host_ptr */, - cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL -clCreateImage3D(cl_context /* context */, - cl_mem_flags /* flags */, - const cl_image_format * /* image_format */, - size_t /* image_width */, - size_t /* image_height */, - size_t /* image_depth */, - size_t /* image_row_pitch */, - size_t /* image_slice_pitch */, - void * /* host_ptr */, - cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL -clEnqueueMarker(cl_command_queue /* command_queue */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL -clEnqueueWaitForEvents(cl_command_queue /* command_queue */, - cl_uint /* num_events */, - const cl_event * /* event_list */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL -clEnqueueBarrier(cl_command_queue /* command_queue */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL -clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL -clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_H */ - diff --git a/3rdparty/bx/3rdparty/CL/cl_d3d10.h b/3rdparty/bx/3rdparty/CL/cl_d3d10.h deleted file mode 100644 index 81b0d37..0000000 --- a/3rdparty/bx/3rdparty/CL/cl_d3d10.h +++ /dev/null @@ -1,126 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2012 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - **********************************************************************************/ - -/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ - -#ifndef __OPENCL_CL_D3D10_H -#define __OPENCL_CL_D3D10_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/****************************************************************************** - * cl_khr_d3d10_sharing */ -#define cl_khr_d3d10_sharing 1 - -typedef cl_uint cl_d3d10_device_source_khr; -typedef cl_uint cl_d3d10_device_set_khr; - -/******************************************************************************/ - -// Error Codes -#define CL_INVALID_D3D10_DEVICE_KHR -1002 -#define CL_INVALID_D3D10_RESOURCE_KHR -1003 -#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004 -#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005 - -// cl_d3d10_device_source_nv -#define CL_D3D10_DEVICE_KHR 0x4010 -#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011 - -// cl_d3d10_device_set_nv -#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012 -#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013 - -// cl_context_info -#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014 -#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C - -// cl_mem_info -#define CL_MEM_D3D10_RESOURCE_KHR 0x4015 - -// cl_image_info -#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016 - -// cl_command_type -#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017 -#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018 - -/******************************************************************************/ - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)( - cl_platform_id platform, - cl_d3d10_device_source_khr d3d_device_source, - void * d3d_object, - cl_d3d10_device_set_khr d3d_device_set, - cl_uint num_entries, - cl_device_id * devices, - cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D10Buffer * resource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D10Texture2D * resource, - UINT subresource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D10Texture3D * resource, - UINT subresource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_0; - -#ifdef __cplusplus -} -#endif - -#endif // __OPENCL_CL_D3D10_H - diff --git a/3rdparty/bx/3rdparty/CL/cl_d3d11.h b/3rdparty/bx/3rdparty/CL/cl_d3d11.h deleted file mode 100644 index d3c8bdc..0000000 --- a/3rdparty/bx/3rdparty/CL/cl_d3d11.h +++ /dev/null @@ -1,126 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2012 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - **********************************************************************************/ - -/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ - -#ifndef __OPENCL_CL_D3D11_H -#define __OPENCL_CL_D3D11_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/****************************************************************************** - * cl_khr_d3d11_sharing */ -#define cl_khr_d3d11_sharing 1 - -typedef cl_uint cl_d3d11_device_source_khr; -typedef cl_uint cl_d3d11_device_set_khr; - -/******************************************************************************/ - -// Error Codes -#define CL_INVALID_D3D11_DEVICE_KHR -1006 -#define CL_INVALID_D3D11_RESOURCE_KHR -1007 -#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008 -#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009 - -// cl_d3d11_device_source -#define CL_D3D11_DEVICE_KHR 0x4019 -#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A - -// cl_d3d11_device_set -#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B -#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C - -// cl_context_info -#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D -#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D - -// cl_mem_info -#define CL_MEM_D3D11_RESOURCE_KHR 0x401E - -// cl_image_info -#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F - -// cl_command_type -#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020 -#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021 - -/******************************************************************************/ - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)( - cl_platform_id platform, - cl_d3d11_device_source_khr d3d_device_source, - void * d3d_object, - cl_d3d11_device_set_khr d3d_device_set, - cl_uint num_entries, - cl_device_id * devices, - cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D11Buffer * resource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D11Texture2D * resource, - UINT subresource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D11Texture3D * resource, - UINT subresource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_2; - -#ifdef __cplusplus -} -#endif - -#endif // __OPENCL_CL_D3D11_H - diff --git a/3rdparty/bx/3rdparty/CL/cl_dx9_media_sharing.h b/3rdparty/bx/3rdparty/CL/cl_dx9_media_sharing.h deleted file mode 100644 index 1ef543a..0000000 --- a/3rdparty/bx/3rdparty/CL/cl_dx9_media_sharing.h +++ /dev/null @@ -1,127 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2012 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - **********************************************************************************/ - -/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ - -#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H -#define __OPENCL_CL_DX9_MEDIA_SHARING_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/****************************************************************************** -/* cl_khr_dx9_media_sharing */ -#define cl_khr_dx9_media_sharing 1 - -typedef cl_uint cl_dx9_media_adapter_type_khr; -typedef cl_uint cl_dx9_media_adapter_set_khr; - -#if defined(_WIN32) -#include -typedef struct _cl_dx9_surface_info_khr -{ - IDirect3DSurface9 *resource; - HANDLE shared_handle; -} cl_dx9_surface_info_khr; -#endif - - -/******************************************************************************/ - -// Error Codes -#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010 -#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011 -#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012 -#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013 - -// cl_media_adapter_type_khr -#define CL_ADAPTER_D3D9_KHR 0x2020 -#define CL_ADAPTER_D3D9EX_KHR 0x2021 -#define CL_ADAPTER_DXVA_KHR 0x2022 - -// cl_media_adapter_set_khr -#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023 -#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024 - -// cl_context_info -#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025 -#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026 -#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027 - -// cl_mem_info -#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028 -#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029 - -// cl_image_info -#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A - -// cl_command_type -#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B -#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C - -/******************************************************************************/ - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)( - cl_platform_id platform, - cl_uint num_media_adapters, - cl_dx9_media_adapter_type_khr * media_adapter_type, - void * media_adapters, - cl_dx9_media_adapter_set_khr media_adapter_set, - cl_uint num_entries, - cl_device_id * devices, - cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)( - cl_context context, - cl_mem_flags flags, - cl_dx9_media_adapter_type_khr adapter_type, - void * surface_info, - cl_uint plane, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_2; - -#ifdef __cplusplus -} -#endif - -#endif // __OPENCL_CL_DX9_MEDIA_SHARING_H - diff --git a/3rdparty/bx/3rdparty/CL/cl_egl.h b/3rdparty/bx/3rdparty/CL/cl_egl.h deleted file mode 100644 index c1bd4f3..0000000 --- a/3rdparty/bx/3rdparty/CL/cl_egl.h +++ /dev/null @@ -1,131 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008-2010 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - ******************************************************************************/ - -#ifndef __OPENCL_CL_EGL_H -#define __OPENCL_CL_EGL_H - -#ifdef __APPLE__ - -#else -#include -#include -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */ -#define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F -#define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D -#define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E - -/* Error type for clCreateFromEGLImageKHR */ -#define CL_INVALID_EGL_OBJECT_KHR -1093 -#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092 - -/* CLeglImageKHR is an opaque handle to an EGLImage */ -typedef void* CLeglImageKHR; - -/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */ -typedef void* CLeglDisplayKHR; - -/* properties passed to clCreateFromEGLImageKHR */ -typedef intptr_t cl_egl_image_properties_khr; - - -#define cl_khr_egl_image 1 - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateFromEGLImageKHR(cl_context /* context */, - CLeglDisplayKHR /* egldisplay */, - CLeglImageKHR /* eglimage */, - cl_mem_flags /* flags */, - const cl_egl_image_properties_khr * /* properties */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)( - cl_context context, - CLeglDisplayKHR egldisplay, - CLeglImageKHR eglimage, - cl_mem_flags flags, - const cl_egl_image_properties_khr * properties, - cl_int * errcode_ret); - - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueAcquireEGLObjectsKHR(cl_command_queue /* command_queue */, - cl_uint /* num_objects */, - const cl_mem * /* mem_objects */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event); - - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReleaseEGLObjectsKHR(cl_command_queue /* command_queue */, - cl_uint /* num_objects */, - const cl_mem * /* mem_objects */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event); - - -#define cl_khr_egl_event 1 - -extern CL_API_ENTRY cl_event CL_API_CALL -clCreateEventFromEGLSyncKHR(cl_context /* context */, - EGLSyncKHR /* sync */, - EGLDisplay /* display */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)( - cl_context context, - EGLSyncKHR sync, - EGLDisplay display, - cl_int * errcode_ret); - - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_EGL_H */ diff --git a/3rdparty/bx/3rdparty/CL/cl_ext.h b/3rdparty/bx/3rdparty/CL/cl_ext.h deleted file mode 100644 index 6908b7e..0000000 --- a/3rdparty/bx/3rdparty/CL/cl_ext.h +++ /dev/null @@ -1,306 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008-2013 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - ******************************************************************************/ - -/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */ - -/* cl_ext.h contains OpenCL extensions which don't have external */ -/* (OpenGL, D3D) dependencies. */ - -#ifndef __CL_EXT_H -#define __CL_EXT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __APPLE__ - #include - #include -#else - #include -#endif - -/* cl_khr_fp16 extension - no extension #define since it has no functions */ -#define CL_DEVICE_HALF_FP_CONFIG 0x1033 - -/* Memory object destruction - * - * Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR - * - * Registers a user callback function that will be called when the memory object is deleted and its resources - * freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback - * stack associated with memobj. The registered user callback functions are called in the reverse order in - * which they were registered. The user callback functions are called and then the memory object is deleted - * and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be - * notified when the memory referenced by host_ptr, specified when the memory object is created and used as - * the storage bits for the memory object, can be reused or freed. - * - * The application may not call CL api's with the cl_mem object passed to the pfn_notify. - * - * Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS) - * before using. - */ -#define cl_APPLE_SetMemObjectDestructor 1 -cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */, - void (* /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), - void * /*user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; - - -/* Context Logging Functions - * - * The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext(). - * Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS) - * before using. - * - * clLogMessagesToSystemLog fowards on all log messages to the Apple System Logger - */ -#define cl_APPLE_ContextLoggingFunctions 1 -extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * /* errstr */, - const void * /* private_info */, - size_t /* cb */, - void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; - -/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */ -extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * /* errstr */, - const void * /* private_info */, - size_t /* cb */, - void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; - -/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */ -extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * /* errstr */, - const void * /* private_info */, - size_t /* cb */, - void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; - - -/************************ -* cl_khr_icd extension * -************************/ -#define cl_khr_icd 1 - -/* cl_platform_info */ -#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920 - -/* Additional Error Codes */ -#define CL_PLATFORM_NOT_FOUND_KHR -1001 - -extern CL_API_ENTRY cl_int CL_API_CALL -clIcdGetPlatformIDsKHR(cl_uint /* num_entries */, - cl_platform_id * /* platforms */, - cl_uint * /* num_platforms */); - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)( - cl_uint /* num_entries */, - cl_platform_id * /* platforms */, - cl_uint * /* num_platforms */); - - -/* Extension: cl_khr_image2D_buffer - * - * This extension allows a 2D image to be created from a cl_mem buffer without a copy. - * The type associated with a 2D image created from a buffer in an OpenCL program is image2d_t. - * Both the sampler and sampler-less read_image built-in functions are supported for 2D images - * and 2D images created from a buffer. Similarly, the write_image built-ins are also supported - * for 2D images created from a buffer. - * - * When the 2D image from buffer is created, the client must specify the width, - * height, image format (i.e. channel order and channel data type) and optionally the row pitch - * - * The pitch specified must be a multiple of CL_DEVICE_IMAGE_PITCH_ALIGNMENT pixels. - * The base address of the buffer must be aligned to CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT pixels. - */ - -/************************************* - * cl_khr_initalize_memory extension * - *************************************/ - -#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x200E - - -/************************************** - * cl_khr_terminate_context extension * - **************************************/ - -#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x200F -#define CL_CONTEXT_TERMINATE_KHR 0x2010 - -#define cl_khr_terminate_context 1 -extern CL_API_ENTRY cl_int CL_API_CALL clTerminateContextKHR(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2; - - -/* - * Extension: cl_khr_spir - * - * This extension adds support to create an OpenCL program object from a - * Standard Portable Intermediate Representation (SPIR) instance - */ - -/****************************************** -* cl_nv_device_attribute_query extension * -******************************************/ -/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */ -#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000 -#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001 -#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002 -#define CL_DEVICE_WARP_SIZE_NV 0x4003 -#define CL_DEVICE_GPU_OVERLAP_NV 0x4004 -#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005 -#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006 - -/********************************* -* cl_amd_device_attribute_query * -*********************************/ -#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036 - -#ifdef CL_VERSION_1_1 - /*********************************** - * cl_ext_device_fission extension * - ***********************************/ - #define cl_ext_device_fission 1 - - extern CL_API_ENTRY cl_int CL_API_CALL - clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - typedef CL_API_ENTRY cl_int - (CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - extern CL_API_ENTRY cl_int CL_API_CALL - clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - typedef CL_API_ENTRY cl_int - (CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - typedef cl_ulong cl_device_partition_property_ext; - extern CL_API_ENTRY cl_int CL_API_CALL - clCreateSubDevicesEXT( cl_device_id /*in_device*/, - const cl_device_partition_property_ext * /* properties */, - cl_uint /*num_entries*/, - cl_device_id * /*out_devices*/, - cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - typedef CL_API_ENTRY cl_int - ( CL_API_CALL * clCreateSubDevicesEXT_fn)( cl_device_id /*in_device*/, - const cl_device_partition_property_ext * /* properties */, - cl_uint /*num_entries*/, - cl_device_id * /*out_devices*/, - cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - /* cl_device_partition_property_ext */ - #define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050 - #define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051 - #define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052 - #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053 - - /* clDeviceGetInfo selectors */ - #define CL_DEVICE_PARENT_DEVICE_EXT 0x4054 - #define CL_DEVICE_PARTITION_TYPES_EXT 0x4055 - #define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056 - #define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057 - #define CL_DEVICE_PARTITION_STYLE_EXT 0x4058 - - /* error codes */ - #define CL_DEVICE_PARTITION_FAILED_EXT -1057 - #define CL_INVALID_PARTITION_COUNT_EXT -1058 - #define CL_INVALID_PARTITION_NAME_EXT -1059 - - /* CL_AFFINITY_DOMAINs */ - #define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1 - #define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2 - #define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3 - #define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4 - #define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10 - #define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100 - - /* cl_device_partition_property_ext list terminators */ - #define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0) - #define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0) - #define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1) - -/********************************* -* cl_qcom_ext_host_ptr extension -*********************************/ - -#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29) - -#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0 -#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1 -#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2 -#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3 -#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4 -#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5 -#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6 -#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7 - -typedef cl_uint cl_image_pitch_info_qcom; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetDeviceImageInfoQCOM(cl_device_id device, - size_t image_width, - size_t image_height, - const cl_image_format *image_format, - cl_image_pitch_info_qcom param_name, - size_t param_value_size, - void *param_value, - size_t *param_value_size_ret); - -typedef struct _cl_mem_ext_host_ptr -{ - // Type of external memory allocation. - // Legal values will be defined in layered extensions. - cl_uint allocation_type; - - // Host cache policy for this external memory allocation. - cl_uint host_cache_policy; - -} cl_mem_ext_host_ptr; - -/********************************* -* cl_qcom_ion_host_ptr extension -*********************************/ - -#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8 - -typedef struct _cl_mem_ion_host_ptr -{ - // Type of external memory allocation. - // Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. - cl_mem_ext_host_ptr ext_host_ptr; - - // ION file descriptor - int ion_filedesc; - - // Host pointer to the ION allocated memory - void* ion_hostptr; - -} cl_mem_ion_host_ptr; - -#endif /* CL_VERSION_1_1 */ - -#ifdef __cplusplus -} -#endif - - -#endif /* __CL_EXT_H */ diff --git a/3rdparty/bx/3rdparty/CL/cl_gl.h b/3rdparty/bx/3rdparty/CL/cl_gl.h deleted file mode 100644 index af2036c..0000000 --- a/3rdparty/bx/3rdparty/CL/cl_gl.h +++ /dev/null @@ -1,162 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008 - 2012 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - **********************************************************************************/ - -#ifndef __OPENCL_CL_GL_H -#define __OPENCL_CL_GL_H - -#ifdef __APPLE__ -#include -#else -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef cl_uint cl_gl_object_type; -typedef cl_uint cl_gl_texture_info; -typedef cl_uint cl_gl_platform_info; -typedef struct __GLsync *cl_GLsync; - -/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */ -#define CL_GL_OBJECT_BUFFER 0x2000 -#define CL_GL_OBJECT_TEXTURE2D 0x2001 -#define CL_GL_OBJECT_TEXTURE3D 0x2002 -#define CL_GL_OBJECT_RENDERBUFFER 0x2003 -#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E -#define CL_GL_OBJECT_TEXTURE1D 0x200F -#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010 -#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011 - -/* cl_gl_texture_info */ -#define CL_GL_TEXTURE_TARGET 0x2004 -#define CL_GL_MIPMAP_LEVEL 0x2005 -#define CL_GL_NUM_SAMPLES 0x2012 - - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateFromGLBuffer(cl_context /* context */, - cl_mem_flags /* flags */, - cl_GLuint /* bufobj */, - int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateFromGLTexture(cl_context /* context */, - cl_mem_flags /* flags */, - cl_GLenum /* target */, - cl_GLint /* miplevel */, - cl_GLuint /* texture */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateFromGLRenderbuffer(cl_context /* context */, - cl_mem_flags /* flags */, - cl_GLuint /* renderbuffer */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetGLObjectInfo(cl_mem /* memobj */, - cl_gl_object_type * /* gl_object_type */, - cl_GLuint * /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetGLTextureInfo(cl_mem /* memobj */, - cl_gl_texture_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueAcquireGLObjects(cl_command_queue /* command_queue */, - cl_uint /* num_objects */, - const cl_mem * /* mem_objects */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */, - cl_uint /* num_objects */, - const cl_mem * /* mem_objects */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - - -// Deprecated OpenCL 1.1 APIs -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL -clCreateFromGLTexture2D(cl_context /* context */, - cl_mem_flags /* flags */, - cl_GLenum /* target */, - cl_GLint /* miplevel */, - cl_GLuint /* texture */, - cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL -clCreateFromGLTexture3D(cl_context /* context */, - cl_mem_flags /* flags */, - cl_GLenum /* target */, - cl_GLint /* miplevel */, - cl_GLuint /* texture */, - cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -/* cl_khr_gl_sharing extension */ - -#define cl_khr_gl_sharing 1 - -typedef cl_uint cl_gl_context_info; - -/* Additional Error Codes */ -#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000 - -/* cl_gl_context_info */ -#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006 -#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007 - -/* Additional cl_context_properties */ -#define CL_GL_CONTEXT_KHR 0x2008 -#define CL_EGL_DISPLAY_KHR 0x2009 -#define CL_GLX_DISPLAY_KHR 0x200A -#define CL_WGL_HDC_KHR 0x200B -#define CL_CGL_SHAREGROUP_KHR 0x200C - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetGLContextInfoKHR(const cl_context_properties * /* properties */, - cl_gl_context_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)( - const cl_context_properties * properties, - cl_gl_context_info param_name, - size_t param_value_size, - void * param_value, - size_t * param_value_size_ret); - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_GL_H */ diff --git a/3rdparty/bx/3rdparty/CL/cl_gl_ext.h b/3rdparty/bx/3rdparty/CL/cl_gl_ext.h deleted file mode 100644 index 77d5353..0000000 --- a/3rdparty/bx/3rdparty/CL/cl_gl_ext.h +++ /dev/null @@ -1,69 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2012 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - **********************************************************************************/ - -/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ - -/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */ -/* OpenGL dependencies. */ - -#ifndef __OPENCL_CL_GL_EXT_H -#define __OPENCL_CL_GL_EXT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __APPLE__ - #include -#else - #include -#endif - -/* - * For each extension, follow this template - * cl_VEN_extname extension */ -/* #define cl_VEN_extname 1 - * ... define new types, if any - * ... define new tokens, if any - * ... define new APIs, if any - * - * If you need GLtypes here, mirror them with a cl_GLtype, rather than including a GL header - * This allows us to avoid having to decide whether to include GL headers or GLES here. - */ - -/* - * cl_khr_gl_event extension - * See section 9.9 in the OpenCL 1.1 spec for more information - */ -#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D - -extern CL_API_ENTRY cl_event CL_API_CALL -clCreateEventFromGLsyncKHR(cl_context /* context */, - cl_GLsync /* cl_GLsync */, - cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1; - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_GL_EXT_H */ diff --git a/3rdparty/bx/3rdparty/CL/cl_platform.h b/3rdparty/bx/3rdparty/CL/cl_platform.h deleted file mode 100644 index cf7b254..0000000 --- a/3rdparty/bx/3rdparty/CL/cl_platform.h +++ /dev/null @@ -1,1254 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2012 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - **********************************************************************************/ - -/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */ - -#ifndef __CL_PLATFORM_H -#define __CL_PLATFORM_H - -#ifdef __APPLE__ - /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */ - #include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(_WIN32) - #define CL_API_ENTRY - #define CL_API_CALL __stdcall - #define CL_CALLBACK __stdcall -#else - #define CL_API_ENTRY - #define CL_API_CALL - #define CL_CALLBACK -#endif - -#ifdef __APPLE__ - #define CL_EXTENSION_WEAK_LINK __attribute__((weak_import)) - #define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER - #define CL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define GCL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 - - #ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER - #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER - #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 - #else - #warning This path should never happen outside of internal operating system development. AvailabilityMacros do not function correctly here! - #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #endif -#else - #define CL_EXTENSION_WEAK_LINK - #define CL_API_SUFFIX__VERSION_1_0 - #define CL_EXT_SUFFIX__VERSION_1_0 - #define CL_API_SUFFIX__VERSION_1_1 - #define CL_EXT_SUFFIX__VERSION_1_1 - #define CL_API_SUFFIX__VERSION_1_2 - #define CL_EXT_SUFFIX__VERSION_1_2 - - #ifdef __GNUC__ - #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED - #else - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED __attribute__((deprecated)) - #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED - #endif - - #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - #else - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated)) - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - #endif - #elif defined(_WIN32) - #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED - #else - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED __declspec(deprecated) - #endif - - #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - #else - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated) - #endif - #else - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED - - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - #endif -#endif - -#if (defined (_WIN32) && defined(_MSC_VER)) - -/* scalar types */ -typedef signed __int8 cl_char; -typedef unsigned __int8 cl_uchar; -typedef signed __int16 cl_short; -typedef unsigned __int16 cl_ushort; -typedef signed __int32 cl_int; -typedef unsigned __int32 cl_uint; -typedef signed __int64 cl_long; -typedef unsigned __int64 cl_ulong; - -typedef unsigned __int16 cl_half; -typedef float cl_float; -typedef double cl_double; - -/* Macro names and corresponding values defined by OpenCL */ -#define CL_CHAR_BIT 8 -#define CL_SCHAR_MAX 127 -#define CL_SCHAR_MIN (-127-1) -#define CL_CHAR_MAX CL_SCHAR_MAX -#define CL_CHAR_MIN CL_SCHAR_MIN -#define CL_UCHAR_MAX 255 -#define CL_SHRT_MAX 32767 -#define CL_SHRT_MIN (-32767-1) -#define CL_USHRT_MAX 65535 -#define CL_INT_MAX 2147483647 -#define CL_INT_MIN (-2147483647-1) -#define CL_UINT_MAX 0xffffffffU -#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) -#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) -#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) - -#define CL_FLT_DIG 6 -#define CL_FLT_MANT_DIG 24 -#define CL_FLT_MAX_10_EXP +38 -#define CL_FLT_MAX_EXP +128 -#define CL_FLT_MIN_10_EXP -37 -#define CL_FLT_MIN_EXP -125 -#define CL_FLT_RADIX 2 -#define CL_FLT_MAX 340282346638528859811704183484516925440.0f -#define CL_FLT_MIN 1.175494350822287507969e-38f -#define CL_FLT_EPSILON 0x1.0p-23f - -#define CL_DBL_DIG 15 -#define CL_DBL_MANT_DIG 53 -#define CL_DBL_MAX_10_EXP +308 -#define CL_DBL_MAX_EXP +1024 -#define CL_DBL_MIN_10_EXP -307 -#define CL_DBL_MIN_EXP -1021 -#define CL_DBL_RADIX 2 -#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 -#define CL_DBL_MIN 2.225073858507201383090e-308 -#define CL_DBL_EPSILON 2.220446049250313080847e-16 - -#define CL_M_E 2.718281828459045090796 -#define CL_M_LOG2E 1.442695040888963387005 -#define CL_M_LOG10E 0.434294481903251816668 -#define CL_M_LN2 0.693147180559945286227 -#define CL_M_LN10 2.302585092994045901094 -#define CL_M_PI 3.141592653589793115998 -#define CL_M_PI_2 1.570796326794896557999 -#define CL_M_PI_4 0.785398163397448278999 -#define CL_M_1_PI 0.318309886183790691216 -#define CL_M_2_PI 0.636619772367581382433 -#define CL_M_2_SQRTPI 1.128379167095512558561 -#define CL_M_SQRT2 1.414213562373095145475 -#define CL_M_SQRT1_2 0.707106781186547572737 - -#define CL_M_E_F 2.71828174591064f -#define CL_M_LOG2E_F 1.44269502162933f -#define CL_M_LOG10E_F 0.43429449200630f -#define CL_M_LN2_F 0.69314718246460f -#define CL_M_LN10_F 2.30258512496948f -#define CL_M_PI_F 3.14159274101257f -#define CL_M_PI_2_F 1.57079637050629f -#define CL_M_PI_4_F 0.78539818525314f -#define CL_M_1_PI_F 0.31830987334251f -#define CL_M_2_PI_F 0.63661974668503f -#define CL_M_2_SQRTPI_F 1.12837922573090f -#define CL_M_SQRT2_F 1.41421353816986f -#define CL_M_SQRT1_2_F 0.70710676908493f - -#define CL_NAN (CL_INFINITY - CL_INFINITY) -#define CL_HUGE_VALF ((cl_float) 1e50) -#define CL_HUGE_VAL ((cl_double) 1e500) -#define CL_MAXFLOAT CL_FLT_MAX -#define CL_INFINITY CL_HUGE_VALF - -#else - -#include - -/* scalar types */ -typedef int8_t cl_char; -typedef uint8_t cl_uchar; -typedef int16_t cl_short __attribute__((aligned(2))); -typedef uint16_t cl_ushort __attribute__((aligned(2))); -typedef int32_t cl_int __attribute__((aligned(4))); -typedef uint32_t cl_uint __attribute__((aligned(4))); -typedef int64_t cl_long __attribute__((aligned(8))); -typedef uint64_t cl_ulong __attribute__((aligned(8))); - -typedef uint16_t cl_half __attribute__((aligned(2))); -typedef float cl_float __attribute__((aligned(4))); -typedef double cl_double __attribute__((aligned(8))); - -/* Macro names and corresponding values defined by OpenCL */ -#define CL_CHAR_BIT 8 -#define CL_SCHAR_MAX 127 -#define CL_SCHAR_MIN (-127-1) -#define CL_CHAR_MAX CL_SCHAR_MAX -#define CL_CHAR_MIN CL_SCHAR_MIN -#define CL_UCHAR_MAX 255 -#define CL_SHRT_MAX 32767 -#define CL_SHRT_MIN (-32767-1) -#define CL_USHRT_MAX 65535 -#define CL_INT_MAX 2147483647 -#define CL_INT_MIN (-2147483647-1) -#define CL_UINT_MAX 0xffffffffU -#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) -#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) -#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) - -#define CL_FLT_DIG 6 -#define CL_FLT_MANT_DIG 24 -#define CL_FLT_MAX_10_EXP +38 -#define CL_FLT_MAX_EXP +128 -#define CL_FLT_MIN_10_EXP -37 -#define CL_FLT_MIN_EXP -125 -#define CL_FLT_RADIX 2 -#define CL_FLT_MAX 0x1.fffffep127f -#define CL_FLT_MIN 0x1.0p-126f -#define CL_FLT_EPSILON 0x1.0p-23f - -#define CL_DBL_DIG 15 -#define CL_DBL_MANT_DIG 53 -#define CL_DBL_MAX_10_EXP +308 -#define CL_DBL_MAX_EXP +1024 -#define CL_DBL_MIN_10_EXP -307 -#define CL_DBL_MIN_EXP -1021 -#define CL_DBL_RADIX 2 -#define CL_DBL_MAX 0x1.fffffffffffffp1023 -#define CL_DBL_MIN 0x1.0p-1022 -#define CL_DBL_EPSILON 0x1.0p-52 - -#define CL_M_E 2.718281828459045090796 -#define CL_M_LOG2E 1.442695040888963387005 -#define CL_M_LOG10E 0.434294481903251816668 -#define CL_M_LN2 0.693147180559945286227 -#define CL_M_LN10 2.302585092994045901094 -#define CL_M_PI 3.141592653589793115998 -#define CL_M_PI_2 1.570796326794896557999 -#define CL_M_PI_4 0.785398163397448278999 -#define CL_M_1_PI 0.318309886183790691216 -#define CL_M_2_PI 0.636619772367581382433 -#define CL_M_2_SQRTPI 1.128379167095512558561 -#define CL_M_SQRT2 1.414213562373095145475 -#define CL_M_SQRT1_2 0.707106781186547572737 - -#define CL_M_E_F 2.71828174591064f -#define CL_M_LOG2E_F 1.44269502162933f -#define CL_M_LOG10E_F 0.43429449200630f -#define CL_M_LN2_F 0.69314718246460f -#define CL_M_LN10_F 2.30258512496948f -#define CL_M_PI_F 3.14159274101257f -#define CL_M_PI_2_F 1.57079637050629f -#define CL_M_PI_4_F 0.78539818525314f -#define CL_M_1_PI_F 0.31830987334251f -#define CL_M_2_PI_F 0.63661974668503f -#define CL_M_2_SQRTPI_F 1.12837922573090f -#define CL_M_SQRT2_F 1.41421353816986f -#define CL_M_SQRT1_2_F 0.70710676908493f - -#if defined( __GNUC__ ) - #define CL_HUGE_VALF __builtin_huge_valf() - #define CL_HUGE_VAL __builtin_huge_val() - #define CL_NAN __builtin_nanf( "" ) -#else - #define CL_HUGE_VALF ((cl_float) 1e50) - #define CL_HUGE_VAL ((cl_double) 1e500) - float nanf( const char * ); - #define CL_NAN nanf( "" ) -#endif -#define CL_MAXFLOAT CL_FLT_MAX -#define CL_INFINITY CL_HUGE_VALF - -#endif - -#include - -/* Mirror types to GL types. Mirror types allow us to avoid deciding which 87s to load based on whether we are using GL or GLES here. */ -typedef unsigned int cl_GLuint; -typedef int cl_GLint; -typedef unsigned int cl_GLenum; - -/* - * Vector types - * - * Note: OpenCL requires that all types be naturally aligned. - * This means that vector types must be naturally aligned. - * For example, a vector of four floats must be aligned to - * a 16 byte boundary (calculated as 4 * the natural 4-byte - * alignment of the float). The alignment qualifiers here - * will only function properly if your compiler supports them - * and if you don't actively work to defeat them. For example, - * in order for a cl_float4 to be 16 byte aligned in a struct, - * the start of the struct must itself be 16-byte aligned. - * - * Maintaining proper alignment is the user's responsibility. - */ - -/* Define basic vector types */ -#if defined( __VEC__ ) - #include /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */ - typedef vector unsigned char __cl_uchar16; - typedef vector signed char __cl_char16; - typedef vector unsigned short __cl_ushort8; - typedef vector signed short __cl_short8; - typedef vector unsigned int __cl_uint4; - typedef vector signed int __cl_int4; - typedef vector float __cl_float4; - #define __CL_UCHAR16__ 1 - #define __CL_CHAR16__ 1 - #define __CL_USHORT8__ 1 - #define __CL_SHORT8__ 1 - #define __CL_UINT4__ 1 - #define __CL_INT4__ 1 - #define __CL_FLOAT4__ 1 -#endif - -#if defined( __SSE__ ) - #if defined( __MINGW64__ ) - #include - #else - #include - #endif - #if defined( __GNUC__ ) - typedef float __cl_float4 __attribute__((vector_size(16))); - #else - typedef __m128 __cl_float4; - #endif - #define __CL_FLOAT4__ 1 -#endif - -#if defined( __SSE2__ ) - #if defined( __MINGW64__ ) - #include - #else - #include - #endif - #if defined( __GNUC__ ) - typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16))); - typedef cl_char __cl_char16 __attribute__((vector_size(16))); - typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16))); - typedef cl_short __cl_short8 __attribute__((vector_size(16))); - typedef cl_uint __cl_uint4 __attribute__((vector_size(16))); - typedef cl_int __cl_int4 __attribute__((vector_size(16))); - typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16))); - typedef cl_long __cl_long2 __attribute__((vector_size(16))); - typedef cl_double __cl_double2 __attribute__((vector_size(16))); - #else - typedef __m128i __cl_uchar16; - typedef __m128i __cl_char16; - typedef __m128i __cl_ushort8; - typedef __m128i __cl_short8; - typedef __m128i __cl_uint4; - typedef __m128i __cl_int4; - typedef __m128i __cl_ulong2; - typedef __m128i __cl_long2; - typedef __m128d __cl_double2; - #endif - #define __CL_UCHAR16__ 1 - #define __CL_CHAR16__ 1 - #define __CL_USHORT8__ 1 - #define __CL_SHORT8__ 1 - #define __CL_INT4__ 1 - #define __CL_UINT4__ 1 - #define __CL_ULONG2__ 1 - #define __CL_LONG2__ 1 - #define __CL_DOUBLE2__ 1 -#endif - -#if defined( __MMX__ ) - #include - #if defined( __GNUC__ ) - typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8))); - typedef cl_char __cl_char8 __attribute__((vector_size(8))); - typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8))); - typedef cl_short __cl_short4 __attribute__((vector_size(8))); - typedef cl_uint __cl_uint2 __attribute__((vector_size(8))); - typedef cl_int __cl_int2 __attribute__((vector_size(8))); - typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8))); - typedef cl_long __cl_long1 __attribute__((vector_size(8))); - typedef cl_float __cl_float2 __attribute__((vector_size(8))); - #else - typedef __m64 __cl_uchar8; - typedef __m64 __cl_char8; - typedef __m64 __cl_ushort4; - typedef __m64 __cl_short4; - typedef __m64 __cl_uint2; - typedef __m64 __cl_int2; - typedef __m64 __cl_ulong1; - typedef __m64 __cl_long1; - typedef __m64 __cl_float2; - #endif - #define __CL_UCHAR8__ 1 - #define __CL_CHAR8__ 1 - #define __CL_USHORT4__ 1 - #define __CL_SHORT4__ 1 - #define __CL_INT2__ 1 - #define __CL_UINT2__ 1 - #define __CL_ULONG1__ 1 - #define __CL_LONG1__ 1 - #define __CL_FLOAT2__ 1 -#endif - -#if defined( __AVX__ ) - #if defined( __MINGW64__ ) - #include - #else - #include - #endif - #if defined( __GNUC__ ) - typedef cl_float __cl_float8 __attribute__((vector_size(32))); - typedef cl_double __cl_double4 __attribute__((vector_size(32))); - #else - typedef __m256 __cl_float8; - typedef __m256d __cl_double4; - #endif - #define __CL_FLOAT8__ 1 - #define __CL_DOUBLE4__ 1 -#endif - -/* Define alignment keys */ -#if defined( __GNUC__ ) - #define CL_ALIGNED(_x) __attribute__ ((aligned(_x))) -#elif defined( _WIN32 ) && defined( _MSC_VER ) - /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */ - /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */ - /* #include */ - /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */ - #define CL_ALIGNED(_x) -#else - #warning Need to implement some method to align data here - #define CL_ALIGNED(_x) -#endif - -/* Indicate whether .xyzw, .s0123 and .hi.lo are supported */ -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - /* .xyzw and .s0123...{f|F} are supported */ - #define CL_HAS_NAMED_VECTOR_FIELDS 1 - /* .hi and .lo are supported */ - #define CL_HAS_HI_LO_VECTOR_FIELDS 1 -#endif - -/* Define cl_vector types */ - -/* ---- cl_charn ---- */ -typedef union -{ - cl_char CL_ALIGNED(2) s[2]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_char x, y; }; - __extension__ struct{ cl_char s0, s1; }; - __extension__ struct{ cl_char lo, hi; }; -#endif -#if defined( __CL_CHAR2__) - __cl_char2 v2; -#endif -}cl_char2; - -typedef union -{ - cl_char CL_ALIGNED(4) s[4]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_char x, y, z, w; }; - __extension__ struct{ cl_char s0, s1, s2, s3; }; - __extension__ struct{ cl_char2 lo, hi; }; -#endif -#if defined( __CL_CHAR2__) - __cl_char2 v2[2]; -#endif -#if defined( __CL_CHAR4__) - __cl_char4 v4; -#endif -}cl_char4; - -/* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */ -typedef cl_char4 cl_char3; - -typedef union -{ - cl_char CL_ALIGNED(8) s[8]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_char x, y, z, w; }; - __extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; }; - __extension__ struct{ cl_char4 lo, hi; }; -#endif -#if defined( __CL_CHAR2__) - __cl_char2 v2[4]; -#endif -#if defined( __CL_CHAR4__) - __cl_char4 v4[2]; -#endif -#if defined( __CL_CHAR8__ ) - __cl_char8 v8; -#endif -}cl_char8; - -typedef union -{ - cl_char CL_ALIGNED(16) s[16]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __extension__ struct{ cl_char8 lo, hi; }; -#endif -#if defined( __CL_CHAR2__) - __cl_char2 v2[8]; -#endif -#if defined( __CL_CHAR4__) - __cl_char4 v4[4]; -#endif -#if defined( __CL_CHAR8__ ) - __cl_char8 v8[2]; -#endif -#if defined( __CL_CHAR16__ ) - __cl_char16 v16; -#endif -}cl_char16; - - -/* ---- cl_ucharn ---- */ -typedef union -{ - cl_uchar CL_ALIGNED(2) s[2]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_uchar x, y; }; - __extension__ struct{ cl_uchar s0, s1; }; - __extension__ struct{ cl_uchar lo, hi; }; -#endif -#if defined( __cl_uchar2__) - __cl_uchar2 v2; -#endif -}cl_uchar2; - -typedef union -{ - cl_uchar CL_ALIGNED(4) s[4]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_uchar x, y, z, w; }; - __extension__ struct{ cl_uchar s0, s1, s2, s3; }; - __extension__ struct{ cl_uchar2 lo, hi; }; -#endif -#if defined( __CL_UCHAR2__) - __cl_uchar2 v2[2]; -#endif -#if defined( __CL_UCHAR4__) - __cl_uchar4 v4; -#endif -}cl_uchar4; - -/* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */ -typedef cl_uchar4 cl_uchar3; - -typedef union -{ - cl_uchar CL_ALIGNED(8) s[8]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_uchar x, y, z, w; }; - __extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; }; - __extension__ struct{ cl_uchar4 lo, hi; }; -#endif -#if defined( __CL_UCHAR2__) - __cl_uchar2 v2[4]; -#endif -#if defined( __CL_UCHAR4__) - __cl_uchar4 v4[2]; -#endif -#if defined( __CL_UCHAR8__ ) - __cl_uchar8 v8; -#endif -}cl_uchar8; - -typedef union -{ - cl_uchar CL_ALIGNED(16) s[16]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __extension__ struct{ cl_uchar8 lo, hi; }; -#endif -#if defined( __CL_UCHAR2__) - __cl_uchar2 v2[8]; -#endif -#if defined( __CL_UCHAR4__) - __cl_uchar4 v4[4]; -#endif -#if defined( __CL_UCHAR8__ ) - __cl_uchar8 v8[2]; -#endif -#if defined( __CL_UCHAR16__ ) - __cl_uchar16 v16; -#endif -}cl_uchar16; - - -/* ---- cl_shortn ---- */ -typedef union -{ - cl_short CL_ALIGNED(4) s[2]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_short x, y; }; - __extension__ struct{ cl_short s0, s1; }; - __extension__ struct{ cl_short lo, hi; }; -#endif -#if defined( __CL_SHORT2__) - __cl_short2 v2; -#endif -}cl_short2; - -typedef union -{ - cl_short CL_ALIGNED(8) s[4]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_short x, y, z, w; }; - __extension__ struct{ cl_short s0, s1, s2, s3; }; - __extension__ struct{ cl_short2 lo, hi; }; -#endif -#if defined( __CL_SHORT2__) - __cl_short2 v2[2]; -#endif -#if defined( __CL_SHORT4__) - __cl_short4 v4; -#endif -}cl_short4; - -/* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */ -typedef cl_short4 cl_short3; - -typedef union -{ - cl_short CL_ALIGNED(16) s[8]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_short x, y, z, w; }; - __extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; }; - __extension__ struct{ cl_short4 lo, hi; }; -#endif -#if defined( __CL_SHORT2__) - __cl_short2 v2[4]; -#endif -#if defined( __CL_SHORT4__) - __cl_short4 v4[2]; -#endif -#if defined( __CL_SHORT8__ ) - __cl_short8 v8; -#endif -}cl_short8; - -typedef union -{ - cl_short CL_ALIGNED(32) s[16]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __extension__ struct{ cl_short8 lo, hi; }; -#endif -#if defined( __CL_SHORT2__) - __cl_short2 v2[8]; -#endif -#if defined( __CL_SHORT4__) - __cl_short4 v4[4]; -#endif -#if defined( __CL_SHORT8__ ) - __cl_short8 v8[2]; -#endif -#if defined( __CL_SHORT16__ ) - __cl_short16 v16; -#endif -}cl_short16; - - -/* ---- cl_ushortn ---- */ -typedef union -{ - cl_ushort CL_ALIGNED(4) s[2]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_ushort x, y; }; - __extension__ struct{ cl_ushort s0, s1; }; - __extension__ struct{ cl_ushort lo, hi; }; -#endif -#if defined( __CL_USHORT2__) - __cl_ushort2 v2; -#endif -}cl_ushort2; - -typedef union -{ - cl_ushort CL_ALIGNED(8) s[4]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_ushort x, y, z, w; }; - __extension__ struct{ cl_ushort s0, s1, s2, s3; }; - __extension__ struct{ cl_ushort2 lo, hi; }; -#endif -#if defined( __CL_USHORT2__) - __cl_ushort2 v2[2]; -#endif -#if defined( __CL_USHORT4__) - __cl_ushort4 v4; -#endif -}cl_ushort4; - -/* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */ -typedef cl_ushort4 cl_ushort3; - -typedef union -{ - cl_ushort CL_ALIGNED(16) s[8]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_ushort x, y, z, w; }; - __extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; }; - __extension__ struct{ cl_ushort4 lo, hi; }; -#endif -#if defined( __CL_USHORT2__) - __cl_ushort2 v2[4]; -#endif -#if defined( __CL_USHORT4__) - __cl_ushort4 v4[2]; -#endif -#if defined( __CL_USHORT8__ ) - __cl_ushort8 v8; -#endif -}cl_ushort8; - -typedef union -{ - cl_ushort CL_ALIGNED(32) s[16]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __extension__ struct{ cl_ushort8 lo, hi; }; -#endif -#if defined( __CL_USHORT2__) - __cl_ushort2 v2[8]; -#endif -#if defined( __CL_USHORT4__) - __cl_ushort4 v4[4]; -#endif -#if defined( __CL_USHORT8__ ) - __cl_ushort8 v8[2]; -#endif -#if defined( __CL_USHORT16__ ) - __cl_ushort16 v16; -#endif -}cl_ushort16; - -/* ---- cl_intn ---- */ -typedef union -{ - cl_int CL_ALIGNED(8) s[2]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_int x, y; }; - __extension__ struct{ cl_int s0, s1; }; - __extension__ struct{ cl_int lo, hi; }; -#endif -#if defined( __CL_INT2__) - __cl_int2 v2; -#endif -}cl_int2; - -typedef union -{ - cl_int CL_ALIGNED(16) s[4]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_int x, y, z, w; }; - __extension__ struct{ cl_int s0, s1, s2, s3; }; - __extension__ struct{ cl_int2 lo, hi; }; -#endif -#if defined( __CL_INT2__) - __cl_int2 v2[2]; -#endif -#if defined( __CL_INT4__) - __cl_int4 v4; -#endif -}cl_int4; - -/* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */ -typedef cl_int4 cl_int3; - -typedef union -{ - cl_int CL_ALIGNED(32) s[8]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_int x, y, z, w; }; - __extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; }; - __extension__ struct{ cl_int4 lo, hi; }; -#endif -#if defined( __CL_INT2__) - __cl_int2 v2[4]; -#endif -#if defined( __CL_INT4__) - __cl_int4 v4[2]; -#endif -#if defined( __CL_INT8__ ) - __cl_int8 v8; -#endif -}cl_int8; - -typedef union -{ - cl_int CL_ALIGNED(64) s[16]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __extension__ struct{ cl_int8 lo, hi; }; -#endif -#if defined( __CL_INT2__) - __cl_int2 v2[8]; -#endif -#if defined( __CL_INT4__) - __cl_int4 v4[4]; -#endif -#if defined( __CL_INT8__ ) - __cl_int8 v8[2]; -#endif -#if defined( __CL_INT16__ ) - __cl_int16 v16; -#endif -}cl_int16; - - -/* ---- cl_uintn ---- */ -typedef union -{ - cl_uint CL_ALIGNED(8) s[2]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_uint x, y; }; - __extension__ struct{ cl_uint s0, s1; }; - __extension__ struct{ cl_uint lo, hi; }; -#endif -#if defined( __CL_UINT2__) - __cl_uint2 v2; -#endif -}cl_uint2; - -typedef union -{ - cl_uint CL_ALIGNED(16) s[4]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_uint x, y, z, w; }; - __extension__ struct{ cl_uint s0, s1, s2, s3; }; - __extension__ struct{ cl_uint2 lo, hi; }; -#endif -#if defined( __CL_UINT2__) - __cl_uint2 v2[2]; -#endif -#if defined( __CL_UINT4__) - __cl_uint4 v4; -#endif -}cl_uint4; - -/* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */ -typedef cl_uint4 cl_uint3; - -typedef union -{ - cl_uint CL_ALIGNED(32) s[8]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_uint x, y, z, w; }; - __extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; }; - __extension__ struct{ cl_uint4 lo, hi; }; -#endif -#if defined( __CL_UINT2__) - __cl_uint2 v2[4]; -#endif -#if defined( __CL_UINT4__) - __cl_uint4 v4[2]; -#endif -#if defined( __CL_UINT8__ ) - __cl_uint8 v8; -#endif -}cl_uint8; - -typedef union -{ - cl_uint CL_ALIGNED(64) s[16]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __extension__ struct{ cl_uint8 lo, hi; }; -#endif -#if defined( __CL_UINT2__) - __cl_uint2 v2[8]; -#endif -#if defined( __CL_UINT4__) - __cl_uint4 v4[4]; -#endif -#if defined( __CL_UINT8__ ) - __cl_uint8 v8[2]; -#endif -#if defined( __CL_UINT16__ ) - __cl_uint16 v16; -#endif -}cl_uint16; - -/* ---- cl_longn ---- */ -typedef union -{ - cl_long CL_ALIGNED(16) s[2]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_long x, y; }; - __extension__ struct{ cl_long s0, s1; }; - __extension__ struct{ cl_long lo, hi; }; -#endif -#if defined( __CL_LONG2__) - __cl_long2 v2; -#endif -}cl_long2; - -typedef union -{ - cl_long CL_ALIGNED(32) s[4]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_long x, y, z, w; }; - __extension__ struct{ cl_long s0, s1, s2, s3; }; - __extension__ struct{ cl_long2 lo, hi; }; -#endif -#if defined( __CL_LONG2__) - __cl_long2 v2[2]; -#endif -#if defined( __CL_LONG4__) - __cl_long4 v4; -#endif -}cl_long4; - -/* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */ -typedef cl_long4 cl_long3; - -typedef union -{ - cl_long CL_ALIGNED(64) s[8]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_long x, y, z, w; }; - __extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; }; - __extension__ struct{ cl_long4 lo, hi; }; -#endif -#if defined( __CL_LONG2__) - __cl_long2 v2[4]; -#endif -#if defined( __CL_LONG4__) - __cl_long4 v4[2]; -#endif -#if defined( __CL_LONG8__ ) - __cl_long8 v8; -#endif -}cl_long8; - -typedef union -{ - cl_long CL_ALIGNED(128) s[16]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __extension__ struct{ cl_long8 lo, hi; }; -#endif -#if defined( __CL_LONG2__) - __cl_long2 v2[8]; -#endif -#if defined( __CL_LONG4__) - __cl_long4 v4[4]; -#endif -#if defined( __CL_LONG8__ ) - __cl_long8 v8[2]; -#endif -#if defined( __CL_LONG16__ ) - __cl_long16 v16; -#endif -}cl_long16; - - -/* ---- cl_ulongn ---- */ -typedef union -{ - cl_ulong CL_ALIGNED(16) s[2]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_ulong x, y; }; - __extension__ struct{ cl_ulong s0, s1; }; - __extension__ struct{ cl_ulong lo, hi; }; -#endif -#if defined( __CL_ULONG2__) - __cl_ulong2 v2; -#endif -}cl_ulong2; - -typedef union -{ - cl_ulong CL_ALIGNED(32) s[4]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_ulong x, y, z, w; }; - __extension__ struct{ cl_ulong s0, s1, s2, s3; }; - __extension__ struct{ cl_ulong2 lo, hi; }; -#endif -#if defined( __CL_ULONG2__) - __cl_ulong2 v2[2]; -#endif -#if defined( __CL_ULONG4__) - __cl_ulong4 v4; -#endif -}cl_ulong4; - -/* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */ -typedef cl_ulong4 cl_ulong3; - -typedef union -{ - cl_ulong CL_ALIGNED(64) s[8]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_ulong x, y, z, w; }; - __extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; }; - __extension__ struct{ cl_ulong4 lo, hi; }; -#endif -#if defined( __CL_ULONG2__) - __cl_ulong2 v2[4]; -#endif -#if defined( __CL_ULONG4__) - __cl_ulong4 v4[2]; -#endif -#if defined( __CL_ULONG8__ ) - __cl_ulong8 v8; -#endif -}cl_ulong8; - -typedef union -{ - cl_ulong CL_ALIGNED(128) s[16]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __extension__ struct{ cl_ulong8 lo, hi; }; -#endif -#if defined( __CL_ULONG2__) - __cl_ulong2 v2[8]; -#endif -#if defined( __CL_ULONG4__) - __cl_ulong4 v4[4]; -#endif -#if defined( __CL_ULONG8__ ) - __cl_ulong8 v8[2]; -#endif -#if defined( __CL_ULONG16__ ) - __cl_ulong16 v16; -#endif -}cl_ulong16; - - -/* --- cl_floatn ---- */ - -typedef union -{ - cl_float CL_ALIGNED(8) s[2]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_float x, y; }; - __extension__ struct{ cl_float s0, s1; }; - __extension__ struct{ cl_float lo, hi; }; -#endif -#if defined( __CL_FLOAT2__) - __cl_float2 v2; -#endif -}cl_float2; - -typedef union -{ - cl_float CL_ALIGNED(16) s[4]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_float x, y, z, w; }; - __extension__ struct{ cl_float s0, s1, s2, s3; }; - __extension__ struct{ cl_float2 lo, hi; }; -#endif -#if defined( __CL_FLOAT2__) - __cl_float2 v2[2]; -#endif -#if defined( __CL_FLOAT4__) - __cl_float4 v4; -#endif -}cl_float4; - -/* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */ -typedef cl_float4 cl_float3; - -typedef union -{ - cl_float CL_ALIGNED(32) s[8]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_float x, y, z, w; }; - __extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; }; - __extension__ struct{ cl_float4 lo, hi; }; -#endif -#if defined( __CL_FLOAT2__) - __cl_float2 v2[4]; -#endif -#if defined( __CL_FLOAT4__) - __cl_float4 v4[2]; -#endif -#if defined( __CL_FLOAT8__ ) - __cl_float8 v8; -#endif -}cl_float8; - -typedef union -{ - cl_float CL_ALIGNED(64) s[16]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __extension__ struct{ cl_float8 lo, hi; }; -#endif -#if defined( __CL_FLOAT2__) - __cl_float2 v2[8]; -#endif -#if defined( __CL_FLOAT4__) - __cl_float4 v4[4]; -#endif -#if defined( __CL_FLOAT8__ ) - __cl_float8 v8[2]; -#endif -#if defined( __CL_FLOAT16__ ) - __cl_float16 v16; -#endif -}cl_float16; - -/* --- cl_doublen ---- */ - -typedef union -{ - cl_double CL_ALIGNED(16) s[2]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_double x, y; }; - __extension__ struct{ cl_double s0, s1; }; - __extension__ struct{ cl_double lo, hi; }; -#endif -#if defined( __CL_DOUBLE2__) - __cl_double2 v2; -#endif -}cl_double2; - -typedef union -{ - cl_double CL_ALIGNED(32) s[4]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_double x, y, z, w; }; - __extension__ struct{ cl_double s0, s1, s2, s3; }; - __extension__ struct{ cl_double2 lo, hi; }; -#endif -#if defined( __CL_DOUBLE2__) - __cl_double2 v2[2]; -#endif -#if defined( __CL_DOUBLE4__) - __cl_double4 v4; -#endif -}cl_double4; - -/* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */ -typedef cl_double4 cl_double3; - -typedef union -{ - cl_double CL_ALIGNED(64) s[8]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_double x, y, z, w; }; - __extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; }; - __extension__ struct{ cl_double4 lo, hi; }; -#endif -#if defined( __CL_DOUBLE2__) - __cl_double2 v2[4]; -#endif -#if defined( __CL_DOUBLE4__) - __cl_double4 v4[2]; -#endif -#if defined( __CL_DOUBLE8__ ) - __cl_double8 v8; -#endif -}cl_double8; - -typedef union -{ - cl_double CL_ALIGNED(128) s[16]; -#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) - __extension__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __extension__ struct{ cl_double8 lo, hi; }; -#endif -#if defined( __CL_DOUBLE2__) - __cl_double2 v2[8]; -#endif -#if defined( __CL_DOUBLE4__) - __cl_double4 v4[4]; -#endif -#if defined( __CL_DOUBLE8__ ) - __cl_double8 v8[2]; -#endif -#if defined( __CL_DOUBLE16__ ) - __cl_double16 v16; -#endif -}cl_double16; - -/* Macro to facilitate debugging - * Usage: - * Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source. - * The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \" - * Each line thereafter of OpenCL C source must end with: \n\ - * The last line ends in "; - * - * Example: - * - * const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\ - * kernel void foo( int a, float * b ) \n\ - * { \n\ - * // my comment \n\ - * *b[ get_global_id(0)] = a; \n\ - * } \n\ - * "; - * - * This should correctly set up the line, (column) and file information for your source - * string so you can do source level debugging. - */ -#define __CL_STRINGIFY( _x ) # _x -#define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x ) -#define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n" - -#ifdef __cplusplus -} -#endif - -#endif /* __CL_PLATFORM_H */ diff --git a/3rdparty/bx/3rdparty/CL/opencl.h b/3rdparty/bx/3rdparty/CL/opencl.h deleted file mode 100644 index 3f00524..0000000 --- a/3rdparty/bx/3rdparty/CL/opencl.h +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008-2012 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - ******************************************************************************/ - -/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ - -#ifndef __OPENCL_H -#define __OPENCL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __APPLE__ - -#include -#include -#include -#include - -#else - -#include -#include -#include -#include - -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_H */ - diff --git a/3rdparty/bx/3rdparty/ini/README.md b/3rdparty/bx/3rdparty/ini/README.md new file mode 100644 index 0000000..bc4d7c7 --- /dev/null +++ b/3rdparty/bx/3rdparty/ini/README.md @@ -0,0 +1 @@ +https://github.com/mattiasgustavsson/libs/ diff --git a/3rdparty/bx/3rdparty/ini/ini.h b/3rdparty/bx/3rdparty/ini/ini.h new file mode 100644 index 0000000..394c196 --- /dev/null +++ b/3rdparty/bx/3rdparty/ini/ini.h @@ -0,0 +1,1054 @@ +/* +------------------------------------------------------------------------------ + Licensing information can be found at the end of the file. +------------------------------------------------------------------------------ + +ini.h - v1.1 - Simple ini-file reader for C/C++. + +Do this: + #define INI_IMPLEMENTATION +before you include this file in *one* C/C++ file to create the implementation. +*/ + +#ifndef ini_h +#define ini_h + +#define INI_GLOBAL_SECTION ( 0 ) +#define INI_NOT_FOUND ( -1 ) + +typedef struct ini_t ini_t; + +ini_t* ini_create( void* memctx ); +ini_t* ini_load( char const* data, void* memctx ); + +int ini_save( ini_t const* ini, char* data, int size ); +void ini_destroy( ini_t* ini ); + +int ini_section_count( ini_t const* ini ); +char const* ini_section_name( ini_t const* ini, int section ); + +int ini_property_count( ini_t const* ini, int section ); +char const* ini_property_name( ini_t const* ini, int section, int property ); +char const* ini_property_value( ini_t const* ini, int section, int property ); + +int ini_find_section( ini_t const* ini, char const* name, int name_length ); +int ini_find_property( ini_t const* ini, int section, char const* name, int name_length ); + +int ini_section_add( ini_t* ini, char const* name, int length ); +void ini_property_add( ini_t* ini, int section, char const* name, int name_length, char const* value, int value_length ); +void ini_section_remove( ini_t* ini, int section ); +void ini_property_remove( ini_t* ini, int section, int property ); + +void ini_section_name_set( ini_t* ini, int section, char const* name, int length ); +void ini_property_name_set( ini_t* ini, int section, int property, char const* name, int length ); +void ini_property_value_set( ini_t* ini, int section, int property, char const* value, int length ); + +#endif /* ini_h */ + + +/** + +Examples +======== + +Loading an ini file and retrieving values +----------------------------------------- + + #define INI_IMPLEMENTATION + #include "ini.h" + + #include + #include + + int main() + { + FILE* fp = fopen( "test.ini", "r" ); + fseek( fp, 0, SEEK_END ); + int size = ftell( fp ); + fseek( fp, 0, SEEK_SET ); + char* data = (char*) malloc( size + 1 ); + fread( data, 1, size, fp ); + data[ size ] = '\0'; + fclose( fp ); + + ini_t* ini = ini_load( data ); + free( data ); + int second_index = ini_find_property( ini, INI_GLOBAL_SECTION, "SecondSetting" ); + char const* second = ini_property_value( ini, INI_GLOBAL_SECTION, second_index ); + printf( "%s=%s\n", "SecondSetting", second ); + int section = ini_find_section( ini, "MySection" ); + int third_index = ini_find_property( ini, section, "ThirdSetting" ); + char const* third = ini_property_value( ini, section, third_index ); + printf( "%s=%s\n", "ThirdSetting", third ); + ini_destroy( ini ); + + return 0; + } + + +Creating a new ini file +----------------------- + + #define INI_IMPLEMENTATION + #include "ini.h" + + #include + #include + + int main() + { + ini_t* ini = ini_create(); + ini_property_add( ini, INI_GLOBAL_SECTION, "FirstSetting", "Test" ); + ini_property_add( ini, INI_GLOBAL_SECTION, "SecondSetting", "2" ); + int section = ini_section_add( ini, "MySection" ); + ini_property_add( ini, section, "ThirdSetting", "Three" ); + + int size = ini_save( ini, NULL, 0 ); // Find the size needed + char* data = (char*) malloc( size ); + size = ini_save( ini, data, size ); // Actually save the file + ini_destroy( ini ); + + FILE* fp = fopen( "test.ini", "w" ); + fwrite( data, 1, size, fp ); + fclose( fp ); + free( data ); + + return 0; + } + + + +API Documentation +================= + +ini.h is a small library for reading classic .ini files. It is a single-header library, and does not need any .lib files +or other binaries, or any build scripts. To use it, you just include ini.h to get the API declarations. To get the +definitions, you must include ini.h from *one* single C or C++ file, and #define the symbol `INI_IMPLEMENTATION` before +you do. + + +Customization +------------- +There are a few different things in ini.h which are configurable by #defines. The customizations only affect the +implementation, so will only need to be defined in the file where you have the #define INI_IMPLEMENTATION. + +Note that if all customizations are utilized, ini.h will include no external files whatsoever, which might be useful +if you need full control over what code is being built. + + +### Custom memory allocators + +To store the internal data structures, ini.h needs to do dynamic allocation by calling `malloc`. Programs might want to +keep track of allocations done, or use custom defined pools to allocate memory from. ini.h allows for specifying custom +memory allocation functions for `malloc` and `free`. +This is done with the following code: + + #define INI_IMPLEMENTATION + #define INI_MALLOC( ctx, size ) ( my_custom_malloc( ctx, size ) ) + #define INI_FREE( ctx, ptr ) ( my_custom_free( ctx, ptr ) ) + #include "ini.h" + +where `my_custom_malloc` and `my_custom_free` are your own memory allocation/deallocation functions. The `ctx` parameter +is an optional parameter of type `void*`. When `ini_create` or `ini_load` is called, you can pass in a `memctx` +parameter, which can be a pointer to anything you like, and which will be passed through as the `ctx` parameter to every +`INI_MALLOC`/`INI_FREE` call. For example, if you are doing memory tracking, you can pass a pointer to your tracking +data as `memctx`, and in your custom allocation/deallocation function, you can cast the `ctx` param back to the +right type, and access the tracking data. + +If no custom allocator is defined, ini.h will default to `malloc` and `free` from the C runtime library. + + +### Custom C runtime function + +The library makes use of three additional functions from the C runtime library, and for full flexibility, it allows you +to substitute them for your own. Here's an example: + + #define INI_IMPLEMENTATION + #define INI_MEMCPY( dst, src, cnt ) ( my_memcpy_func( dst, src, cnt ) ) + #define INI_STRLEN( s ) ( my_strlen_func( s ) ) + #define INI_STRNICMP( s1, s2, cnt ) ( my_strnicmp_func( s1, s2, cnt ) ) + #include "ini.h" + +If no custom function is defined, ini.h will default to the C runtime library equivalent. + + +ini_create +---------- + + ini_t* ini_create( void* memctx ) + +Instantiates a new, empty ini structure, which can be manipulated with other API calls, to fill it with data. To save it +out to an ini-file string, use `ini_save`. When no longer needed, it can be destroyed by calling `ini_destroy`. +`memctx` is a pointer to user defined data which will be passed through to the custom INI_MALLOC/INI_FREE calls. It can +be NULL if no user defined data is needed. + + +ini_load +-------- + + ini_t* ini_load( char const* data, void* memctx ) + +Parse the zero-terminated string `data` containing an ini-file, and create a new ini_t instance containing the data. +The instance can be manipulated with other API calls to enumerate sections/properties and retrieve values. When no +longer needed, it can be destroyed by calling `ini_destroy`. `memctx` is a pointer to user defined data which will be +passed through to the custom INI_MALLOC/INI_FREE calls. It can be NULL if no user defined data is needed. + + +ini_save +-------- + + int ini_save( ini_t const* ini, char* data, int size ) + +Saves an ini structure as a zero-terminated ini-file string, into the specified buffer. Returns the number of bytes +written, including the zero terminator. If `data` is NULL, nothing is written, but `ini_save` still returns the number +of bytes it would have written. If the size of `data`, as specified in the `size` parameter, is smaller than that +required, only part of the ini-file string will be written. `ini_save` still returns the number of bytes it would have +written had the buffer been large enough. + + +ini_destroy +----------- + + void ini_destroy( ini_t* ini ) + +Destroy an `ini_t` instance created by calling `ini_load` or `ini_create`, releasing the memory allocated by it. No +further API calls are valid on an `ini_t` instance after calling `ini_destroy` on it. + + +ini_section_count +----------------- + + int ini_section_count( ini_t const* ini ) + +Returns the number of sections in an ini file. There's at least one section in an ini file (the global section), but +there can be many more, each specified in the file by the section name wrapped in square brackets [ ]. + + +ini_section_name +---------------- + + char const* ini_section_name( ini_t const* ini, int section ) + +Returns the name of the section with the specified index. `section` must be non-negative and less than the value +returned by `ini_section_count`, or `ini_section_name` will return NULL. The defined constant `INI_GLOBAL_SECTION` can +be used to indicate the global section. + + +ini_property_count +------------------ + + int ini_property_count( ini_t const* ini, int section ) + +Returns the number of properties belonging to the section with the specified index. `section` must be non-negative and +less than the value returned by `ini_section_count`, or `ini_section_name` will return 0. The defined constant +`INI_GLOBAL_SECTION` can be used to indicate the global section. Properties are declared in the ini-file on he format +`name=value`. + + +ini_property_name +----------------- + + char const* ini_property_name( ini_t const* ini, int section, int property ) + +Returns the name of the property with the specified index `property` in the section with the specified index `section`. +`section` must be non-negative and less than the value returned by `ini_section_count`, and `property` must be +non-negative and less than the value returned by `ini_property_count`, or `ini_property_name` will return NULL. The +defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. + + +ini_property_value +------------------ + + char const* ini_property_value( ini_t const* ini, int section, int property ) + +Returns the value of the property with the specified index `property` in the section with the specified index `section`. +`section` must be non-negative and less than the value returned by `ini_section_count`, and `property` must be +non-negative and less than the value returned by `ini_property_count`, or `ini_property_value` will return NULL. The +defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. + + +ini_find_section +---------------- + + int ini_find_section( ini_t const* ini, char const* name, int name_length ) + +Finds the section with the specified name, and returns its index. `name_length` specifies the number of characters in +`name`, which does not have to be zero-terminated. If `name_length` is zero, the length is determined automatically, but +in this case `name` has to be zero-terminated. If no section with the specified name could be found, the value +`INI_NOT_FOUND` is returned. + + +ini_find_property +----------------- + + int ini_find_property( ini_t const* ini, int section, char const* name, int name_length ) + +Finds the property with the specified name, within the section with the specified index, and returns the index of the +property. `name_length` specifies the number of characters in `name`, which does not have to be zero-terminated. If +`name_length` is zero, the length is determined automatically, but in this case `name` has to be zero-terminated. If no +property with the specified name could be found within the specified section, the value `INI_NOT_FOUND` is returned. +`section` must be non-negative and less than the value returned by `ini_section_count`, or `ini_find_property` will +return `INI_NOT_FOUND`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. + + +ini_section_add +--------------- + + int ini_section_add( ini_t* ini, char const* name, int length ) + +Adds a section with the specified name, and returns the index it was added at. There is no check done to see if a +section with the specified name already exists - multiple sections of the same name are allowed. `length` specifies the +number of characters in `name`, which does not have to be zero-terminated. If `length` is zero, the length is determined +automatically, but in this case `name` has to be zero-terminated. + + +ini_property_add +---------------- + + void ini_property_add( ini_t* ini, int section, char const* name, int name_length, char const* value, int value_length ) + +Adds a property with the specified name and value to the specified section, and returns the index it was added at. There +is no check done to see if a property with the specified name already exists - multiple properties of the same name are +allowed. `name_length` and `value_length` specifies the number of characters in `name` and `value`, which does not have +to be zero-terminated. If `name_length` or `value_length` is zero, the length is determined automatically, but in this +case `name`/`value` has to be zero-terminated. `section` must be non-negative and less than the value returned by +`ini_section_count`, or the property will not be added. The defined constant `INI_GLOBAL_SECTION` can be used to +indicate the global section. + + +ini_section_remove +------------------ + + void ini_section_remove( ini_t* ini, int section ) + +Removes the section with the specified index, and all properties within it. `section` must be non-negative and less than +the value returned by `ini_section_count`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global +section. Note that removing a section will shuffle section indices, so that section indices you may have stored will no +longer indicate the same section as it did before the remove. Use the find functions to update your indices. + + +ini_property_remove +------------------- + + void ini_property_remove( ini_t* ini, int section, int property ) + +Removes the property with the specified index from the specified section. `section` must be non-negative and less than +the value returned by `ini_section_count`, and `property` must be non-negative and less than the value returned by +`ini_property_count`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. Note that +removing a property will shuffle property indices within the specified section, so that property indices you may have +stored will no longer indicate the same property as it did before the remove. Use the find functions to update your +indices. + + +ini_section_name_set +-------------------- + + void ini_section_name_set( ini_t* ini, int section, char const* name, int length ) + +Change the name of the section with the specified index. `section` must be non-negative and less than the value returned +by `ini_section_count`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. `length` +specifies the number of characters in `name`, which does not have to be zero-terminated. If `length` is zero, the length +is determined automatically, but in this case `name` has to be zero-terminated. + + +ini_property_name_set +--------------------- + + void ini_property_name_set( ini_t* ini, int section, int property, char const* name, int length ) + +Change the name of the property with the specified index in the specified section. `section` must be non-negative and +less than the value returned by `ini_section_count`, and `property` must be non-negative and less than the value +returned by `ini_property_count`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. +`length` specifies the number of characters in `name`, which does not have to be zero-terminated. If `length` is zero, +the length is determined automatically, but in this case `name` has to be zero-terminated. + + +ini_property_value_set +---------------------- + + void ini_property_value_set( ini_t* ini, int section, int property, char const* value, int length ) + +Change the value of the property with the specified index in the specified section. `section` must be non-negative and +less than the value returned by `ini_section_count`, and `property` must be non-negative and less than the value +returned by `ini_property_count`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. +`length` specifies the number of characters in `value`, which does not have to be zero-terminated. If `length` is zero, +the length is determined automatically, but in this case `value` has to be zero-terminated. + +**/ + + +/* +---------------------- + IMPLEMENTATION +---------------------- +*/ + +#ifdef INI_IMPLEMENTATION +#undef INI_IMPLEMENTATION + +#define INITIAL_CAPACITY ( 256 ) + +#ifndef _CRT_NONSTDC_NO_DEPRECATE + #define _CRT_NONSTDC_NO_DEPRECATE +#endif + +#ifndef _CRT_SECURE_NO_WARNINGS + #define _CRT_SECURE_NO_WARNINGS +#endif + +#include + +#ifndef INI_MALLOC + #include + #define INI_MALLOC( ctx, size ) ( malloc( size ) ) + #define INI_FREE( ctx, ptr ) ( free( ptr ) ) +#endif + +#ifndef INI_MEMCPY + #include + #define INI_MEMCPY( dst, src, cnt ) ( memcpy( dst, src, cnt ) ) +#endif + +#ifndef INI_STRLEN + #include + #define INI_STRLEN( s ) ( strlen( s ) ) +#endif + +#ifndef INI_STRNICMP + #ifdef _WIN32 + #include + #define INI_STRNICMP( s1, s2, cnt ) ( strnicmp( s1, s2, cnt ) ) + #else + #include + #define INI_STRNICMP( s1, s2, cnt ) ( strncasecmp( s1, s2, cnt ) ) + #endif +#endif + + +struct ini_internal_section_t + { + char name[ 32 ]; + char* name_large; + }; + + +struct ini_internal_property_t + { + int section; + char name[ 32 ]; + char* name_large; + char value[ 64 ]; + char* value_large; + }; + + +struct ini_t + { + struct ini_internal_section_t* sections; + int section_capacity; + int section_count; + + struct ini_internal_property_t* properties; + int property_capacity; + int property_count; + + void* memctx; + }; + + +static int ini_internal_property_index( ini_t const* ini, int section, int property ) + { + int i; + int p; + + if( ini && section >= 0 && section < ini->section_count ) + { + p = 0; + for( i = 0; i < ini->property_count; ++i ) + { + if( ini->properties[ i ].section == section ) + { + if( p == property ) return i; + ++p; + } + } + } + + return INI_NOT_FOUND; + } + + +ini_t* ini_create( void* memctx ) + { + ini_t* ini; + + ini = (ini_t*) INI_MALLOC( memctx, sizeof( ini_t ) ); + ini->memctx = memctx; + ini->sections = (struct ini_internal_section_t*) INI_MALLOC( ini->memctx, INITIAL_CAPACITY * sizeof( ini->sections[ 0 ] ) ); + ini->section_capacity = INITIAL_CAPACITY; + ini->section_count = 1; /* global section */ + ini->sections[ 0 ].name[ 0 ] = '\0'; + ini->sections[ 0 ].name_large = 0; + ini->properties = (struct ini_internal_property_t*) INI_MALLOC( ini->memctx, INITIAL_CAPACITY * sizeof( ini->properties[ 0 ] ) ); + ini->property_capacity = INITIAL_CAPACITY; + ini->property_count = 0; + return ini; + } + + +ini_t* ini_load( char const* data, void* memctx ) + { + ini_t* ini; + char const* ptr; + int s; + char const* start; + char const* start2; + int l; + + ini = ini_create( memctx ); + + ptr = data; + if( ptr ) + { + s = 0; + while( *ptr ) + { + /* trim leading whitespace */ + while( *ptr && *ptr <=' ' ) + ++ptr; + + /* done? */ + if( !*ptr ) break; + + /* comment */ + else if( *ptr == ';' ) + { + while( *ptr && *ptr !='\n' ) + ++ptr; + } + /* section */ + else if( *ptr == '[' ) + { + ++ptr; + start = ptr; + while( *ptr && *ptr !=']' && *ptr != '\n' ) + ++ptr; + + if( *ptr == ']' ) + { + s = ini_section_add( ini, start, (int)( ptr - start) ); + ++ptr; + } + } + /* property */ + else + { + start = ptr; + while( *ptr && *ptr !='=' && *ptr != '\n' ) + ++ptr; + + if( *ptr == '=' ) + { + l = (int)( ptr - start); + ++ptr; + while( *ptr && *ptr <= ' ' && *ptr != '\n' ) + ptr++; + start2 = ptr; + while( *ptr && *ptr != '\n' ) + ++ptr; + while( *(--ptr) <= ' ' ) + (void)ptr; + ptr++; + ini_property_add( ini, s, start, l, start2, (int)( ptr - start2) ); + } + } + } + } + + return ini; + } + + +int ini_save( ini_t const* ini, char* data, int size ) + { + int s; + int p; + int i; + int l; + char* n; + int pos; + + if( ini ) + { + pos = 0; + for( s = 0; s < ini->section_count; ++s ) + { + n = ini->sections[ s ].name_large ? ini->sections[ s ].name_large : ini->sections[ s ].name; + l = (int) INI_STRLEN( n ); + if( l > 0 ) + { + if( data && pos < size ) data[ pos ] = '['; + ++pos; + for( i = 0; i < l; ++i ) + { + if( data && pos < size ) data[ pos ] = n[ i ]; + ++pos; + } + if( data && pos < size ) data[ pos ] = ']'; + ++pos; + if( data && pos < size ) data[ pos ] = '\n'; + ++pos; + } + + for( p = 0; p < ini->property_count; ++p ) + { + if( ini->properties[ p ].section == s ) + { + n = ini->properties[ p ].name_large ? ini->properties[ p ].name_large : ini->properties[ p ].name; + l = (int) INI_STRLEN( n ); + for( i = 0; i < l; ++i ) + { + if( data && pos < size ) data[ pos ] = n[ i ]; + ++pos; + } + if( data && pos < size ) data[ pos ] = '='; + ++pos; + n = ini->properties[ p ].value_large ? ini->properties[ p ].value_large : ini->properties[ p ].value; + l = (int) INI_STRLEN( n ); + for( i = 0; i < l; ++i ) + { + if( data && pos < size ) data[ pos ] = n[ i ]; + ++pos; + } + if( data && pos < size ) data[ pos ] = '\n'; + ++pos; + } + } + + if( pos > 0 ) + { + if( data && pos < size ) data[ pos ] = '\n'; + ++pos; + } + } + + if( data && pos < size ) data[ pos ] = '\0'; + ++pos; + + return pos; + } + + return 0; + } + + +void ini_destroy( ini_t* ini ) + { + int i; + + if( ini ) + { + for( i = 0; i < ini->property_count; ++i ) + { + if( ini->properties[ i ].value_large ) INI_FREE( ini->memctx, ini->properties[ i ].value_large ); + if( ini->properties[ i ].name_large ) INI_FREE( ini->memctx, ini->properties[ i ].name_large ); + } + for( i = 0; i < ini->section_count; ++i ) + if( ini->sections[ i ].name_large ) INI_FREE( ini->memctx, ini->sections[ i ].name_large ); + INI_FREE( ini->memctx, ini->properties ); + INI_FREE( ini->memctx, ini->sections ); + INI_FREE( ini->memctx, ini ); + } + } + + +int ini_section_count( ini_t const* ini ) + { + if( ini ) return ini->section_count; + return 0; + } + + +char const* ini_section_name( ini_t const* ini, int section ) + { + if( ini && section >= 0 && section < ini->section_count ) + return ini->sections[ section ].name_large ? ini->sections[ section ].name_large : ini->sections[ section ].name; + + return NULL; + } + + +int ini_property_count( ini_t const* ini, int section ) + { + int i; + int count; + + if( ini ) + { + count = 0; + for( i = 0; i < ini->property_count; ++i ) + { + if( ini->properties[ i ].section == section ) ++count; + } + return count; + } + + return 0; + } + + +char const* ini_property_name( ini_t const* ini, int section, int property ) + { + int p; + + if( ini && section >= 0 && section < ini->section_count ) + { + p = ini_internal_property_index( ini, section, property ); + if( p != INI_NOT_FOUND ) + return ini->properties[ p ].name_large ? ini->properties[ p ].name_large : ini->properties[ p ].name; + } + + return NULL; + } + + +char const* ini_property_value( ini_t const* ini, int section, int property ) + { + int p; + + if( ini && section >= 0 && section < ini->section_count ) + { + p = ini_internal_property_index( ini, section, property ); + if( p != INI_NOT_FOUND ) + return ini->properties[ p ].value_large ? ini->properties[ p ].value_large : ini->properties[ p ].value; + } + + return NULL; + } + + +int ini_find_section( ini_t const* ini, char const* name, int name_length ) + { + int i; + + if( ini && name ) + { + if( name_length <= 0 ) name_length = (int) INI_STRLEN( name ); + for( i = 0; i < ini->section_count; ++i ) + { + char const* const other = + ini->sections[ i ].name_large ? ini->sections[ i ].name_large : ini->sections[ i ].name; + if( (int) INI_STRLEN( other ) == name_length && INI_STRNICMP( name, other, name_length ) == 0 ) + return i; + } + } + + return INI_NOT_FOUND; + } + + +int ini_find_property( ini_t const* ini, int section, char const* name, int name_length ) + { + int i; + int c; + + if( ini && name && section >= 0 && section < ini->section_count) + { + if( name_length <= 0 ) name_length = (int) INI_STRLEN( name ); + c = 0; + for( i = 0; i < ini->property_capacity; ++i ) + { + if( ini->properties[ i ].section == section ) + { + char const* const other = + ini->properties[ i ].name_large ? ini->properties[ i ].name_large : ini->properties[ i ].name; + if( (int) INI_STRLEN( other ) == name_length && INI_STRNICMP( name, other, name_length ) == 0 ) + return c; + ++c; + } + } + } + + return INI_NOT_FOUND; + } + + +int ini_section_add( ini_t* ini, char const* name, int length ) + { + struct ini_internal_section_t* new_sections; + + if( ini && name ) + { + if( length <= 0 ) length = (int) INI_STRLEN( name ); + if( ini->section_count >= ini->section_capacity ) + { + ini->section_capacity *= 2; + new_sections = (struct ini_internal_section_t*) INI_MALLOC( ini->memctx, + ini->section_capacity * sizeof( ini->sections[ 0 ] ) ); + INI_MEMCPY( new_sections, ini->sections, ini->section_count * sizeof( ini->sections[ 0 ] ) ); + INI_FREE( ini->memctx, ini->sections ); + ini->sections = new_sections; + } + + ini->sections[ ini->section_count ].name_large = 0; + if( length + 1 >= sizeof( ini->sections[ 0 ].name ) ) + { + ini->sections[ ini->section_count ].name_large = (char*) INI_MALLOC( ini->memctx, (size_t) length + 1 ); + INI_MEMCPY( ini->sections[ ini->section_count ].name_large, name, (size_t) length ); + ini->sections[ ini->section_count ].name_large[ length ] = '\0'; + } + else + { + INI_MEMCPY( ini->sections[ ini->section_count ].name, name, (size_t) length ); + ini->sections[ ini->section_count ].name[ length ] = '\0'; + } + + return ini->section_count++; + } + return INI_NOT_FOUND; + } + + +void ini_property_add( ini_t* ini, int section, char const* name, int name_length, char const* value, int value_length ) + { + struct ini_internal_property_t* new_properties; + + if( ini && name && section >= 0 && section < ini->section_count ) + { + if( name_length <= 0 ) name_length = (int) INI_STRLEN( name ); + if( value_length <= 0 ) value_length = (int) INI_STRLEN( value ); + + if( ini->property_count >= ini->property_capacity ) + { + + ini->property_capacity *= 2; + new_properties = (struct ini_internal_property_t*) INI_MALLOC( ini->memctx, + ini->property_capacity * sizeof( ini->properties[ 0 ] ) ); + INI_MEMCPY( new_properties, ini->properties, ini->property_count * sizeof( ini->properties[ 0 ] ) ); + INI_FREE( ini->memctx, ini->properties ); + ini->properties = new_properties; + } + + ini->properties[ ini->property_count ].section = section; + ini->properties[ ini->property_count ].name_large = 0; + ini->properties[ ini->property_count ].value_large = 0; + + if( name_length + 1 >= sizeof( ini->properties[ 0 ].name ) ) + { + ini->properties[ ini->property_count ].name_large = (char*) INI_MALLOC( ini->memctx, (size_t) name_length + 1 ); + INI_MEMCPY( ini->properties[ ini->property_count ].name_large, name, (size_t) name_length ); + ini->properties[ ini->property_count ].name_large[ name_length ] = '\0'; + } + else + { + INI_MEMCPY( ini->properties[ ini->property_count ].name, name, (size_t) name_length ); + ini->properties[ ini->property_count ].name[ name_length ] = '\0'; + } + + if( value_length + 1 >= sizeof( ini->properties[ 0 ].value ) ) + { + ini->properties[ ini->property_count ].value_large = (char*) INI_MALLOC( ini->memctx, (size_t) value_length + 1 ); + INI_MEMCPY( ini->properties[ ini->property_count ].value_large, value, (size_t) value_length ); + ini->properties[ ini->property_count ].value_large[ value_length ] = '\0'; + } + else + { + INI_MEMCPY( ini->properties[ ini->property_count ].value, value, (size_t) value_length ); + ini->properties[ ini->property_count ].value[ value_length ] = '\0'; + } + + ++ini->property_count; + } + } + + +void ini_section_remove( ini_t* ini, int section ) + { + int p; + + if( ini && section >= 0 && section < ini->section_count ) + { + if( ini->sections[ section ].name_large ) INI_FREE( ini->memctx, ini->sections[ section ].name_large ); + for( p = ini->property_count - 1; p >= 0; --p ) + { + if( ini->properties[ p ].section == section ) + { + if( ini->properties[ p ].value_large ) INI_FREE( ini->memctx, ini->properties[ p ].value_large ); + if( ini->properties[ p ].name_large ) INI_FREE( ini->memctx, ini->properties[ p ].name_large ); + ini->properties[ p ] = ini->properties[ --ini->property_count ]; + } + } + + ini->sections[ section ] = ini->sections[ --ini->section_count ]; + + for( p = 0; p < ini->property_count; ++p ) + { + if( ini->properties[ p ].section == ini->section_count ) + ini->properties[ p ].section = section; + } + } + } + + +void ini_property_remove( ini_t* ini, int section, int property ) + { + int p; + + if( ini && section >= 0 && section < ini->section_count ) + { + p = ini_internal_property_index( ini, section, property ); + if( p != INI_NOT_FOUND ) + { + if( ini->properties[ p ].value_large ) INI_FREE( ini->memctx, ini->properties[ p ].value_large ); + if( ini->properties[ p ].name_large ) INI_FREE( ini->memctx, ini->properties[ p ].name_large ); + ini->properties[ p ] = ini->properties[ --ini->property_count ]; + return; + } + } + } + + +void ini_section_name_set( ini_t* ini, int section, char const* name, int length ) + { + if( ini && name && section >= 0 && section < ini->section_count ) + { + if( length <= 0 ) length = (int) INI_STRLEN( name ); + if( ini->sections[ section ].name_large ) INI_FREE( ini->memctx, ini->sections[ section ].name_large ); + ini->sections[ section ].name_large = 0; + + if( length + 1 >= sizeof( ini->sections[ 0 ].name ) ) + { + ini->sections[ section ].name_large = (char*) INI_MALLOC( ini->memctx, (size_t) length + 1 ); + INI_MEMCPY( ini->sections[ section ].name_large, name, (size_t) length ); + ini->sections[ section ].name_large[ length ] = '\0'; + } + else + { + INI_MEMCPY( ini->sections[ section ].name, name, (size_t) length ); + ini->sections[ section ].name[ length ] = '\0'; + } + } + } + + +void ini_property_name_set( ini_t* ini, int section, int property, char const* name, int length ) + { + int p; + + if( ini && name && section >= 0 && section < ini->section_count ) + { + if( length <= 0 ) length = (int) INI_STRLEN( name ); + p = ini_internal_property_index( ini, section, property ); + if( p != INI_NOT_FOUND ) + { + if( ini->properties[ p ].name_large ) INI_FREE( ini->memctx, ini->properties[ p ].name_large ); + ini->properties[ ini->property_count ].name_large = 0; + + if( length + 1 >= sizeof( ini->properties[ 0 ].name ) ) + { + ini->properties[ p ].name_large = (char*) INI_MALLOC( ini->memctx, (size_t) length + 1 ); + INI_MEMCPY( ini->properties[ p ].name_large, name, (size_t) length ); + ini->properties[ p ].name_large[ length ] = '\0'; + } + else + { + INI_MEMCPY( ini->properties[ p ].name, name, (size_t) length ); + ini->properties[ p ].name[ length ] = '\0'; + } + } + } + } + + +void ini_property_value_set( ini_t* ini, int section, int property, char const* value, int length ) + { + int p; + + if( ini && value && section >= 0 && section < ini->section_count ) + { + if( length <= 0 ) length = (int) INI_STRLEN( value ); + p = ini_internal_property_index( ini, section, property ); + if( p != INI_NOT_FOUND ) + { + if( ini->properties[ p ].value_large ) INI_FREE( ini->memctx, ini->properties[ p ].value_large ); + ini->properties[ ini->property_count ].value_large = 0; + + if( length + 1 >= sizeof( ini->properties[ 0 ].value ) ) + { + ini->properties[ p ].value_large = (char*) INI_MALLOC( ini->memctx, (size_t) length + 1 ); + INI_MEMCPY( ini->properties[ p ].name_large, value, (size_t) length ); + ini->properties[ p ].value_large[ length ] = '\0'; + } + else + { + INI_MEMCPY( ini->properties[ p ].value, value, (size_t) length ); + ini->properties[ p ].name[ length ] = '\0'; + } + } + } + } + + +#endif /* INI_IMPLEMENTATION */ + +/* +revision history: + 1.1 customization, added documentation, cleanup + 1.0 first publicly released version +*/ + +/* +------------------------------------------------------------------------------ + +This software is available under 2 licenses - you may choose the one you like. + +------------------------------------------------------------------------------ + +ALTERNATIVE A - MIT License + +Copyright (c) 2015 Mattias Gustavsson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +------------------------------------------------------------------------------ + +ALTERNATIVE B - Public Domain (www.unlicense.org) + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------------------ +*/ diff --git a/3rdparty/bx/3rdparty/ini/ini.md b/3rdparty/bx/3rdparty/ini/ini.md new file mode 100644 index 0000000..0b204c0 --- /dev/null +++ b/3rdparty/bx/3rdparty/ini/ini.md @@ -0,0 +1,333 @@ +ini.h +===== + +Library: [ini.h](../ini.h) + + +Examples +======== + +Loading an ini file and retrieving values +----------------------------------------- + +```cpp +#define INI_IMPLEMENTATION +#include "ini.h" + +#include +#include + +int main() + { + FILE* fp = fopen( "test.ini", "r" ); + fseek( fp, 0, SEEK_END ); + int size = ftell( fp ); + fseek( fp, 0, SEEK_SET ); + char* data = (char*) malloc( size + 1 ); + fread( data, 1, size, fp ); + data[ size ] = '\0'; + fclose( fp ); + + ini_t* ini = ini_load( data ); + free( data ); + int second_index = ini_find_property( ini, INI_GLOBAL_SECTION, "SecondSetting" ); + char const* second = ini_property_value( ini, INI_GLOBAL_SECTION, second_index ); + printf( "%s=%s\n", "SecondSetting", second ); + int section = ini_find_section( ini, "MySection" ); + int third_index = ini_find_property( ini, section, "ThirdSetting" ); + char const* third = ini_property_value( ini, section, third_index ); + printf( "%s=%s\n", "ThirdSetting", third ); + ini_destroy( ini ); + + return 0; + } +``` + +Creating a new ini file +----------------------- + +```cpp +#define INI_IMPLEMENTATION +#include "ini.h" + +#include +#include + +int main() + { + ini_t* ini = ini_create(); + ini_property_add( ini, INI_GLOBAL_SECTION, "FirstSetting", "Test" ); + ini_property_add( ini, INI_GLOBAL_SECTION, "SecondSetting", "2" ); + int section = ini_section_add( ini, "MySection" ); + ini_property_add( ini, section, "ThirdSetting", "Three" ); + + int size = ini_save( ini, NULL, 0 ); // Find the size needed + char* data = (char*) malloc( size ); + size = ini_save( ini, data, size ); // Actually save the file + ini_destroy( ini ); + + FILE* fp = fopen( "test.ini", "w" ); + fwrite( data, 1, size, fp ); + fclose( fp ); + free( data ); + + return 0; + } +``` + + +API Documentation +================= + +ini.h is a small library for reading classic .ini files. It is a single-header library, and does not need any .lib files +or other binaries, or any build scripts. To use it, you just include ini.h to get the API declarations. To get the +definitions, you must include ini.h from *one* single C or C++ file, and #define the symbol `INI_IMPLEMENTATION` before +you do. + + +Customization +------------- +There are a few different things in ini.h which are configurable by #defines. The customizations only affect the +implementation, so will only need to be defined in the file where you have the #define INI_IMPLEMENTATION. + +Note that if all customizations are utilized, ini.h will include no external files whatsoever, which might be useful +if you need full control over what code is being built. + + +### Custom memory allocators + +To store the internal data structures, ini.h needs to do dynamic allocation by calling `malloc`. Programs might want to +keep track of allocations done, or use custom defined pools to allocate memory from. ini.h allows for specifying custom +memory allocation functions for `malloc` and `free`. +This is done with the following code: + + #define INI_IMPLEMENTATION + #define INI_MALLOC( ctx, size ) ( my_custom_malloc( ctx, size ) ) + #define INI_FREE( ctx, ptr ) ( my_custom_free( ctx, ptr ) ) + #include "ini.h" + +where `my_custom_malloc` and `my_custom_free` are your own memory allocation/deallocation functions. The `ctx` parameter +is an optional parameter of type `void*`. When `ini_create` or `ini_load` is called, you can pass in a `memctx` +parameter, which can be a pointer to anything you like, and which will be passed through as the `ctx` parameter to every +`INI_MALLOC`/`INI_FREE` call. For example, if you are doing memory tracking, you can pass a pointer to your tracking +data as `memctx`, and in your custom allocation/deallocation function, you can cast the `ctx` param back to the +right type, and access the tracking data. + +If no custom allocator is defined, ini.h will default to `malloc` and `free` from the C runtime library. + + +### Custom C runtime function + +The library makes use of three additional functions from the C runtime library, and for full flexibility, it allows you +to substitute them for your own. Here's an example: + + #define INI_IMPLEMENTATION + #define INI_MEMCPY( dst, src, cnt ) ( my_memcpy_func( dst, src, cnt ) ) + #define INI_STRLEN( s ) ( my_strlen_func( s ) ) + #define INI_STRICMP( s1, s2 ) ( my_stricmp_func( s1, s2 ) ) + #include "ini.h" + +If no custom function is defined, ini.h will default to the C runtime library equivalent. + + +ini_create +---------- + + ini_t* ini_create( void* memctx ) + +Instantiates a new, empty ini structure, which can be manipulated with other API calls, to fill it with data. To save it +out to an ini-file string, use `ini_save`. When no longer needed, it can be destroyed by calling `ini_destroy`. +`memctx` is a pointer to user defined data which will be passed through to the custom INI_MALLOC/INI_FREE calls. It can +be NULL if no user defined data is needed. + + +ini_load +-------- + + ini_t* ini_load( char const* data, void* memctx ) + +Parse the zero-terminated string `data` containing an ini-file, and create a new ini_t instance containing the data. +The instance can be manipulated with other API calls to enumerate sections/properties and retrieve values. When no +longer needed, it can be destroyed by calling `ini_destroy`. `memctx` is a pointer to user defined data which will be +passed through to the custom INI_MALLOC/INI_FREE calls. It can be NULL if no user defined data is needed. + + +ini_save +-------- + + int ini_save( ini_t const* ini, char* data, int size ) + +Saves an ini structure as a zero-terminated ini-file string, into the specified buffer. Returns the number of bytes +written, including the zero terminator. If `data` is NULL, nothing is written, but `ini_save` still returns the number +of bytes it would have written. If the size of `data`, as specified in the `size` parameter, is smaller than that +required, only part of the ini-file string will be written. `ini_save` still returns the number of bytes it would have +written had the buffer been large enough. + + +ini_destroy +----------- + + void ini_destroy( ini_t* ini ) + +Destroy an `ini_t` instance created by calling `ini_load` or `ini_create`, releasing the memory allocated by it. No +further API calls are valid on an `ini_t` instance after calling `ini_destroy` on it. + + +ini_section_count +----------------- + + int ini_section_count( ini_t const* ini ) + +Returns the number of sections in an ini file. There's at least one section in an ini file (the global section), but +there can be many more, each specified in the file by the section name wrapped in square brackets [ ]. + + +ini_section_name +---------------- + + char const* ini_section_name( ini_t const* ini, int section ) + +Returns the name of the section with the specified index. `section` must be non-negative and less than the value +returned by `ini_section_count`, or `ini_section_name` will return NULL. The defined constant `INI_GLOBAL_SECTION` can +be used to indicate the global section. + + +ini_property_count +------------------ + + int ini_property_count( ini_t const* ini, int section ) + +Returns the number of properties belonging to the section with the specified index. `section` must be non-negative and +less than the value returned by `ini_section_count`, or `ini_section_name` will return 0. The defined constant +`INI_GLOBAL_SECTION` can be used to indicate the global section. Properties are declared in the ini-file on he format +`name=value`. + + +ini_property_name +----------------- + + char const* ini_property_name( ini_t const* ini, int section, int property ) + +Returns the name of the property with the specified index `property` in the section with the specified index `section`. +`section` must be non-negative and less than the value returned by `ini_section_count`, and `property` must be +non-negative and less than the value returned by `ini_property_count`, or `ini_property_name` will return NULL. The +defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. + + +ini_property_value +------------------ + + char const* ini_property_value( ini_t const* ini, int section, int property ) + +Returns the value of the property with the specified index `property` in the section with the specified index `section`. +`section` must be non-negative and less than the value returned by `ini_section_count`, and `property` must be +non-negative and less than the value returned by `ini_property_count`, or `ini_property_value` will return NULL. The +defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. + + +ini_find_section +---------------- + + int ini_find_section( ini_t const* ini, char const* name, int name_length ) + +Finds the section with the specified name, and returns its index. `name_length` specifies the number of characters in +`name`, which does not have to be zero-terminated. If `name_length` is zero, the length is determined automatically, but +in this case `name` has to be zero-terminated. If no section with the specified name could be found, the value +`INI_NOT_FOUND` is returned. + + +ini_find_property +----------------- + + int ini_find_property( ini_t const* ini, int section, char const* name, int name_length ) + +Finds the property with the specified name, within the section with the specified index, and returns the index of the +property. `name_length` specifies the number of characters in `name`, which does not have to be zero-terminated. If +`name_length` is zero, the length is determined automatically, but in this case `name` has to be zero-terminated. If no +property with the specified name could be found within the specified section, the value `INI_NOT_FOUND` is returned. +`section` must be non-negative and less than the value returned by `ini_section_count`, or `ini_find_property` will +return `INI_NOT_FOUND`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. + + +ini_section_add +--------------- + + int ini_section_add( ini_t* ini, char const* name, int length ) + +Adds a section with the specified name, and returns the index it was added at. There is no check done to see if a +section with the specified name already exists - multiple sections of the same name are allowed. `length` specifies the +number of characters in `name`, which does not have to be zero-terminated. If `length` is zero, the length is determined +automatically, but in this case `name` has to be zero-terminated. + + +ini_property_add +---------------- + + void ini_property_add( ini_t* ini, int section, char const* name, int name_length, char const* value, int value_length ) + +Adds a property with the specified name and value to the specified section, and returns the index it was added at. There +is no check done to see if a property with the specified name already exists - multiple properties of the same name are +allowed. `name_length` and `value_length` specifies the number of characters in `name` and `value`, which does not have +to be zero-terminated. If `name_length` or `value_length` is zero, the length is determined automatically, but in this +case `name`/`value` has to be zero-terminated. `section` must be non-negative and less than the value returned by +`ini_section_count`, or the property will not be added. The defined constant `INI_GLOBAL_SECTION` can be used to +indicate the global section. + + +ini_section_remove +------------------ + + void ini_section_remove( ini_t* ini, int section ) + +Removes the section with the specified index, and all properties within it. `section` must be non-negative and less than +the value returned by `ini_section_count`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global +section. Note that removing a section will shuffle section indices, so that section indices you may have stored will no +longer indicate the same section as it did before the remove. Use the find functions to update your indices. + + +ini_property_remove +------------------- + + void ini_property_remove( ini_t* ini, int section, int property ) + +Removes the property with the specified index from the specified section. `section` must be non-negative and less than +the value returned by `ini_section_count`, and `property` must be non-negative and less than the value returned by +`ini_property_count`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. Note that +removing a property will shuffle property indices within the specified section, so that property indices you may have +stored will no longer indicate the same property as it did before the remove. Use the find functions to update your +indices. + + +ini_section_name_set +-------------------- + + void ini_section_name_set( ini_t* ini, int section, char const* name, int length ) + +Change the name of the section with the specified index. `section` must be non-negative and less than the value returned +by `ini_section_count`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. `length` +specifies the number of characters in `name`, which does not have to be zero-terminated. If `length` is zero, the length +is determined automatically, but in this case `name` has to be zero-terminated. + + +ini_property_name_set +--------------------- + + void ini_property_name_set( ini_t* ini, int section, int property, char const* name, int length ) + +Change the name of the property with the specified index in the specified section. `section` must be non-negative and +less than the value returned by `ini_section_count`, and `property` must be non-negative and less than the value +returned by `ini_property_count`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. +`length` specifies the number of characters in `name`, which does not have to be zero-terminated. If `length` is zero, +the length is determined automatically, but in this case `name` has to be zero-terminated. + + +ini_property_value_set +---------------------- + + void ini_property_value_set( ini_t* ini, int section, int property, char const* value, int length ) + +Change the value of the property with the specified index in the specified section. `section` must be non-negative and +less than the value returned by `ini_section_count`, and `property` must be non-negative and less than the value +returned by `ini_property_count`. The defined constant `INI_GLOBAL_SECTION` can be used to indicate the global section. +`length` specifies the number of characters in `value`, which does not have to be zero-terminated. If `length` is zero, +the length is determined automatically, but in this case `value` has to be zero-terminated. diff --git a/3rdparty/bx/LICENSE b/3rdparty/bx/LICENSE index dd17ed4..3df43e3 100644 --- a/3rdparty/bx/LICENSE +++ b/3rdparty/bx/LICENSE @@ -1,4 +1,4 @@ -Copyright 2010-2017 Branimir Karadzic. All rights reserved. +Copyright 2010-2018 Branimir Karadzic. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/3rdparty/bx/README.md b/3rdparty/bx/README.md index 3da618f..1d987c3 100644 --- a/3rdparty/bx/README.md +++ b/3rdparty/bx/README.md @@ -19,7 +19,11 @@ https://github.com/bkaradzic/bx [License (BSD 2-clause)](https://github.com/bkaradzic/bx/blob/master/LICENSE) ----------------------------------------------------------------------------- - Copyright 2010-2017 Branimir Karadzic. All rights reserved. + + + + + Copyright 2010-2018 Branimir Karadzic. All rights reserved. https://github.com/bkaradzic/bx diff --git a/3rdparty/bx/include/bx/allocator.h b/3rdparty/bx/include/bx/allocator.h index 77646a5..cfd1475 100644 --- a/3rdparty/bx/include/bx/allocator.h +++ b/3rdparty/bx/include/bx/allocator.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -8,8 +8,6 @@ #include "bx.h" -#include - #if BX_CONFIG_ALLOCATOR_DEBUG # define BX_ALLOC(_allocator, _size) bx::alloc(_allocator, _size, 0, __FILE__, __LINE__) # define BX_REALLOC(_allocator, _ptr, _size) bx::realloc(_allocator, _ptr, _size, 0, __FILE__, __LINE__) @@ -17,9 +15,7 @@ # define BX_ALIGNED_ALLOC(_allocator, _size, _align) bx::alloc(_allocator, _size, _align, __FILE__, __LINE__) # define BX_ALIGNED_REALLOC(_allocator, _ptr, _size, _align) bx::realloc(_allocator, _ptr, _size, _align, __FILE__, __LINE__) # define BX_ALIGNED_FREE(_allocator, _ptr, _align) bx::free(_allocator, _ptr, _align, __FILE__, __LINE__) -# define BX_NEW(_allocator, _type) ::new(BX_ALLOC(_allocator, sizeof(_type) ) ) _type # define BX_DELETE(_allocator, _ptr) bx::deleteObject(_allocator, _ptr, 0, __FILE__, __LINE__) -# define BX_ALIGNED_NEW(_allocator, _type, _align) ::new(BX_ALIGNED_ALLOC(_allocator, sizeof(_type), _align) ) _type # define BX_ALIGNED_DELETE(_allocator, _ptr, _align) bx::deleteObject(_allocator, _ptr, _align, __FILE__, __LINE__) #else # define BX_ALLOC(_allocator, _size) bx::alloc(_allocator, _size, 0) @@ -28,15 +24,18 @@ # define BX_ALIGNED_ALLOC(_allocator, _size, _align) bx::alloc(_allocator, _size, _align) # define BX_ALIGNED_REALLOC(_allocator, _ptr, _size, _align) bx::realloc(_allocator, _ptr, _size, _align) # define BX_ALIGNED_FREE(_allocator, _ptr, _align) bx::free(_allocator, _ptr, _align) -# define BX_NEW(_allocator, _type) ::new(BX_ALLOC(_allocator, sizeof(_type) ) ) _type # define BX_DELETE(_allocator, _ptr) bx::deleteObject(_allocator, _ptr, 0) -# define BX_ALIGNED_NEW(_allocator, _type, _align) ::new(BX_ALIGNED_ALLOC(_allocator, sizeof(_type), _align) ) _type # define BX_ALIGNED_DELETE(_allocator, _ptr, _align) bx::deleteObject(_allocator, _ptr, _align) #endif // BX_CONFIG_DEBUG_ALLOC -#ifndef BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT -# define BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT 8 -#endif // BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT +#define BX_NEW(_allocator, _type) BX_PLACEMENT_NEW(BX_ALLOC(_allocator, sizeof(_type) ), _type) +#define BX_ALIGNED_NEW(_allocator, _type, _align) BX_PLACEMENT_NEW(BX_ALIGNED_ALLOC(_allocator, sizeof(_type), _align), _type) +#define BX_PLACEMENT_NEW(_ptr, _type) ::new(bx::PlacementNewTag(), _ptr) _type + +namespace bx { struct PlacementNewTag {}; } + +void* operator new(size_t, bx::PlacementNewTag, void* _ptr); +void operator delete(void*, bx::PlacementNewTag, void*) throw(); namespace bx { @@ -54,7 +53,33 @@ namespace bx /// @param[in] _align Alignment. /// @param[in] _file Debug file path info. /// @param[in] _line Debug file line info. - virtual void* realloc(void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line) = 0; + virtual void* realloc( + void* _ptr + , size_t _size + , size_t _align + , const char* _file + , uint32_t _line + ) = 0; + }; + + /// + class DefaultAllocator : public AllocatorI + { + public: + /// + DefaultAllocator(); + + /// + virtual ~DefaultAllocator(); + + /// + virtual void* realloc( + void* _ptr + , size_t _size + , size_t _align + , const char* _file + , uint32_t _line + ) override; }; /// Check if pointer is aligned. _align must be power of two. @@ -64,7 +89,7 @@ namespace bx void* alignPtr( void* _ptr , size_t _extra - , size_t _align = BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT + , size_t _align = 0 ); /// Allocate memory. diff --git a/3rdparty/bx/include/bx/bx.h b/3rdparty/bx/include/bx/bx.h index 838c429..a819eca 100644 --- a/3rdparty/bx/include/bx/bx.h +++ b/3rdparty/bx/include/bx/bx.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -15,6 +15,7 @@ #include "platform.h" #include "config.h" #include "macros.h" +#include "debug.h" /// #define BX_COUNTOF(_x) sizeof(bx::COUNTOF_REQUIRES_ARRAY_ARGUMENT(_x) ) @@ -27,20 +28,48 @@ namespace bx { + const int32_t kExitSuccess = 0; + const int32_t kExitFailure = 1; + /// Template for avoiding MSVC: C4127: conditional expression is constant template - bool isEnabled(); + constexpr bool isEnabled(); - /// - bool ignoreC4127(bool _x); - - /// + /// Exchange two values. template void xchg(Ty& _a, Ty& _b); - /// + /// Exchange memory. void xchg(void* _a, void* _b, size_t _numBytes); + /// Returns minimum of two values. + template + constexpr Ty min(const Ty& _a, const Ty& _b); + + /// Returns maximum of two values. + template + constexpr Ty max(const Ty& _a, const Ty& _b); + + /// Returns minimum of three values. + template + constexpr Ty min(const Ty& _a, const Ty& _b, const Ty& _c); + + /// Returns maximum of three values. + template + constexpr Ty max(const Ty& _a, const Ty& _b, const Ty& _c); + + /// Returns middle of three values. + template + constexpr Ty mid(const Ty& _a, const Ty& _b, const Ty& _c); + + /// Returns clamped value between min/max. + template + constexpr Ty clamp(const Ty& _a, const Ty& _min, const Ty& _max); + + /// Returns true if value is power of 2. + template + constexpr bool isPowerOf2(Ty _a); + // http://cnicholson.net/2011/01/stupid-c-tricks-a-better-sizeof_array/ template char (&COUNTOF_REQUIRES_ARRAY_ARGUMENT(const T(&)[N]) )[N]; diff --git a/3rdparty/bx/include/bx/cl.h b/3rdparty/bx/include/bx/cl.h deleted file mode 100644 index 17b7baf..0000000 --- a/3rdparty/bx/include/bx/cl.h +++ /dev/null @@ -1,925 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_CL_H_HEADER_GUARD -#define BX_CL_H_HEADER_GUARD - -/// To implement OpenCL dynamic loading, define BX_CL_IMPLEMENTATION and -/// #include into .cpp file. -/// -/// To use it, just #include without defining BX_CL_IMPLEMENTATION. -/// To load dynamic library call bx::clLoad(), to unload it call bx::clUnload. - -namespace bx -{ - /// Load OpenCL dynamic library. - /// - /// Returns internal reference count. If library is not available - /// returns 0. - /// - int32_t clLoad(); - - /// Unload OpenCL dynamic library. - /// - /// Returns internal reference count. When reference count reaches 0 - /// library is fully unloaded. - /// - int32_t clUnload(); - -} // namespace bx - -#if defined(BX_CL_IMPLEMENTATION) && defined(__OPENCL_CL_H) -# error message("CL/cl.h is already included, it cannot be included before bx/cl.h header when BX_CL_IMPLEMENTATION is defined!") -#endif // defined(BX_CL_IMPLEMENTATION) && defined(__OPENCL_CL_H) - -#ifndef __OPENCL_CL_H -#define __OPENCL_CL_H - -// BK - CL/cl.h header begin ------------------------------------------------->8 - -/******************************************************************************* - * Copyright (c) 2008 - 2012 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. - ******************************************************************************/ - -#ifdef __APPLE__ -#include -#else -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/******************************************************************************/ - -typedef struct _cl_platform_id * cl_platform_id; -typedef struct _cl_device_id * cl_device_id; -typedef struct _cl_context * cl_context; -typedef struct _cl_command_queue * cl_command_queue; -typedef struct _cl_mem * cl_mem; -typedef struct _cl_program * cl_program; -typedef struct _cl_kernel * cl_kernel; -typedef struct _cl_event * cl_event; -typedef struct _cl_sampler * cl_sampler; - -typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */ -typedef cl_ulong cl_bitfield; -typedef cl_bitfield cl_device_type; -typedef cl_uint cl_platform_info; -typedef cl_uint cl_device_info; -typedef cl_bitfield cl_device_fp_config; -typedef cl_uint cl_device_mem_cache_type; -typedef cl_uint cl_device_local_mem_type; -typedef cl_bitfield cl_device_exec_capabilities; -typedef cl_bitfield cl_command_queue_properties; -typedef intptr_t cl_device_partition_property; -typedef cl_bitfield cl_device_affinity_domain; - -typedef intptr_t cl_context_properties; -typedef cl_uint cl_context_info; -typedef cl_uint cl_command_queue_info; -typedef cl_uint cl_channel_order; -typedef cl_uint cl_channel_type; -typedef cl_bitfield cl_mem_flags; -typedef cl_uint cl_mem_object_type; -typedef cl_uint cl_mem_info; -typedef cl_bitfield cl_mem_migration_flags; -typedef cl_uint cl_image_info; -typedef cl_uint cl_buffer_create_type; -typedef cl_uint cl_addressing_mode; -typedef cl_uint cl_filter_mode; -typedef cl_uint cl_sampler_info; -typedef cl_bitfield cl_map_flags; -typedef cl_uint cl_program_info; -typedef cl_uint cl_program_build_info; -typedef cl_uint cl_program_binary_type; -typedef cl_int cl_build_status; -typedef cl_uint cl_kernel_info; -typedef cl_uint cl_kernel_arg_info; -typedef cl_uint cl_kernel_arg_address_qualifier; -typedef cl_uint cl_kernel_arg_access_qualifier; -typedef cl_bitfield cl_kernel_arg_type_qualifier; -typedef cl_uint cl_kernel_work_group_info; -typedef cl_uint cl_event_info; -typedef cl_uint cl_command_type; -typedef cl_uint cl_profiling_info; - - -typedef struct _cl_image_format { - cl_channel_order image_channel_order; - cl_channel_type image_channel_data_type; -} cl_image_format; - -typedef struct _cl_image_desc { - cl_mem_object_type image_type; - size_t image_width; - size_t image_height; - size_t image_depth; - size_t image_array_size; - size_t image_row_pitch; - size_t image_slice_pitch; - cl_uint num_mip_levels; - cl_uint num_samples; - cl_mem buffer; -} cl_image_desc; - -typedef struct _cl_buffer_region { - size_t origin; - size_t size; -} cl_buffer_region; - - -/******************************************************************************/ - -/* Error Codes */ -#define CL_SUCCESS 0 -#define CL_DEVICE_NOT_FOUND -1 -#define CL_DEVICE_NOT_AVAILABLE -2 -#define CL_COMPILER_NOT_AVAILABLE -3 -#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 -#define CL_OUT_OF_RESOURCES -5 -#define CL_OUT_OF_HOST_MEMORY -6 -#define CL_PROFILING_INFO_NOT_AVAILABLE -7 -#define CL_MEM_COPY_OVERLAP -8 -#define CL_IMAGE_FORMAT_MISMATCH -9 -#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 -#define CL_BUILD_PROGRAM_FAILURE -11 -#define CL_MAP_FAILURE -12 -#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13 -#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14 -#define CL_COMPILE_PROGRAM_FAILURE -15 -#define CL_LINKER_NOT_AVAILABLE -16 -#define CL_LINK_PROGRAM_FAILURE -17 -#define CL_DEVICE_PARTITION_FAILED -18 -#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19 - -#define CL_INVALID_VALUE -30 -#define CL_INVALID_DEVICE_TYPE -31 -#define CL_INVALID_PLATFORM -32 -#define CL_INVALID_DEVICE -33 -#define CL_INVALID_CONTEXT -34 -#define CL_INVALID_QUEUE_PROPERTIES -35 -#define CL_INVALID_COMMAND_QUEUE -36 -#define CL_INVALID_HOST_PTR -37 -#define CL_INVALID_MEM_OBJECT -38 -#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 -#define CL_INVALID_IMAGE_SIZE -40 -#define CL_INVALID_SAMPLER -41 -#define CL_INVALID_BINARY -42 -#define CL_INVALID_BUILD_OPTIONS -43 -#define CL_INVALID_PROGRAM -44 -#define CL_INVALID_PROGRAM_EXECUTABLE -45 -#define CL_INVALID_KERNEL_NAME -46 -#define CL_INVALID_KERNEL_DEFINITION -47 -#define CL_INVALID_KERNEL -48 -#define CL_INVALID_ARG_INDEX -49 -#define CL_INVALID_ARG_VALUE -50 -#define CL_INVALID_ARG_SIZE -51 -#define CL_INVALID_KERNEL_ARGS -52 -#define CL_INVALID_WORK_DIMENSION -53 -#define CL_INVALID_WORK_GROUP_SIZE -54 -#define CL_INVALID_WORK_ITEM_SIZE -55 -#define CL_INVALID_GLOBAL_OFFSET -56 -#define CL_INVALID_EVENT_WAIT_LIST -57 -#define CL_INVALID_EVENT -58 -#define CL_INVALID_OPERATION -59 -#define CL_INVALID_GL_OBJECT -60 -#define CL_INVALID_BUFFER_SIZE -61 -#define CL_INVALID_MIP_LEVEL -62 -#define CL_INVALID_GLOBAL_WORK_SIZE -63 -#define CL_INVALID_PROPERTY -64 -#define CL_INVALID_IMAGE_DESCRIPTOR -65 -#define CL_INVALID_COMPILER_OPTIONS -66 -#define CL_INVALID_LINKER_OPTIONS -67 -#define CL_INVALID_DEVICE_PARTITION_COUNT -68 - -/* OpenCL Version */ -#define CL_VERSION_1_0 1 -#define CL_VERSION_1_1 1 -#define CL_VERSION_1_2 1 - -/* cl_bool */ -#define CL_FALSE 0 -#define CL_TRUE 1 -#define CL_BLOCKING CL_TRUE -#define CL_NON_BLOCKING CL_FALSE - -/* cl_platform_info */ -#define CL_PLATFORM_PROFILE 0x0900 -#define CL_PLATFORM_VERSION 0x0901 -#define CL_PLATFORM_NAME 0x0902 -#define CL_PLATFORM_VENDOR 0x0903 -#define CL_PLATFORM_EXTENSIONS 0x0904 - -/* cl_device_type - bitfield */ -#define CL_DEVICE_TYPE_DEFAULT (1 << 0) -#define CL_DEVICE_TYPE_CPU (1 << 1) -#define CL_DEVICE_TYPE_GPU (1 << 2) -#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) -#define CL_DEVICE_TYPE_CUSTOM (1 << 4) -#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF - -/* cl_device_info */ -#define CL_DEVICE_TYPE 0x1000 -#define CL_DEVICE_VENDOR_ID 0x1001 -#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 -#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 -#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 -#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B -#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C -#define CL_DEVICE_ADDRESS_BITS 0x100D -#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E -#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F -#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 -#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 -#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 -#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 -#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 -#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 -#define CL_DEVICE_IMAGE_SUPPORT 0x1016 -#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 -#define CL_DEVICE_MAX_SAMPLERS 0x1018 -#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 -#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A -#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B -#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C -#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D -#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E -#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F -#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 -#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 -#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 -#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 -#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 -#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 -#define CL_DEVICE_ENDIAN_LITTLE 0x1026 -#define CL_DEVICE_AVAILABLE 0x1027 -#define CL_DEVICE_COMPILER_AVAILABLE 0x1028 -#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 -#define CL_DEVICE_QUEUE_PROPERTIES 0x102A -#define CL_DEVICE_NAME 0x102B -#define CL_DEVICE_VENDOR 0x102C -#define CL_DRIVER_VERSION 0x102D -#define CL_DEVICE_PROFILE 0x102E -#define CL_DEVICE_VERSION 0x102F -#define CL_DEVICE_EXTENSIONS 0x1030 -#define CL_DEVICE_PLATFORM 0x1031 -#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 -/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */ -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 -#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C -#define CL_DEVICE_OPENCL_C_VERSION 0x103D -#define CL_DEVICE_LINKER_AVAILABLE 0x103E -#define CL_DEVICE_BUILT_IN_KERNELS 0x103F -#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040 -#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041 -#define CL_DEVICE_PARENT_DEVICE 0x1042 -#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043 -#define CL_DEVICE_PARTITION_PROPERTIES 0x1044 -#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045 -#define CL_DEVICE_PARTITION_TYPE 0x1046 -#define CL_DEVICE_REFERENCE_COUNT 0x1047 -#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048 -#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049 -#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A -#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B - -/* cl_device_fp_config - bitfield */ -#define CL_FP_DENORM (1 << 0) -#define CL_FP_INF_NAN (1 << 1) -#define CL_FP_ROUND_TO_NEAREST (1 << 2) -#define CL_FP_ROUND_TO_ZERO (1 << 3) -#define CL_FP_ROUND_TO_INF (1 << 4) -#define CL_FP_FMA (1 << 5) -#define CL_FP_SOFT_FLOAT (1 << 6) -#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7) - -/* cl_device_mem_cache_type */ -#define CL_NONE 0x0 -#define CL_READ_ONLY_CACHE 0x1 -#define CL_READ_WRITE_CACHE 0x2 - -/* cl_device_local_mem_type */ -#define CL_LOCAL 0x1 -#define CL_GLOBAL 0x2 - -/* cl_device_exec_capabilities - bitfield */ -#define CL_EXEC_KERNEL (1 << 0) -#define CL_EXEC_NATIVE_KERNEL (1 << 1) - -/* cl_command_queue_properties - bitfield */ -#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) -#define CL_QUEUE_PROFILING_ENABLE (1 << 1) - -/* cl_context_info */ -#define CL_CONTEXT_REFERENCE_COUNT 0x1080 -#define CL_CONTEXT_DEVICES 0x1081 -#define CL_CONTEXT_PROPERTIES 0x1082 -#define CL_CONTEXT_NUM_DEVICES 0x1083 - -/* cl_context_properties */ -#define CL_CONTEXT_PLATFORM 0x1084 -#define CL_CONTEXT_INTEROP_USER_SYNC 0x1085 - -/* cl_device_partition_property */ -#define CL_DEVICE_PARTITION_EQUALLY 0x1086 -#define CL_DEVICE_PARTITION_BY_COUNTS 0x1087 -#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0 -#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088 - -/* cl_device_affinity_domain */ -#define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0) -#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1) -#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2) -#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3) -#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4) -#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5) - -/* cl_command_queue_info */ -#define CL_QUEUE_CONTEXT 0x1090 -#define CL_QUEUE_DEVICE 0x1091 -#define CL_QUEUE_REFERENCE_COUNT 0x1092 -#define CL_QUEUE_PROPERTIES 0x1093 - -/* cl_mem_flags - bitfield */ -#define CL_MEM_READ_WRITE (1 << 0) -#define CL_MEM_WRITE_ONLY (1 << 1) -#define CL_MEM_READ_ONLY (1 << 2) -#define CL_MEM_USE_HOST_PTR (1 << 3) -#define CL_MEM_ALLOC_HOST_PTR (1 << 4) -#define CL_MEM_COPY_HOST_PTR (1 << 5) -// reserved (1 << 6) -#define CL_MEM_HOST_WRITE_ONLY (1 << 7) -#define CL_MEM_HOST_READ_ONLY (1 << 8) -#define CL_MEM_HOST_NO_ACCESS (1 << 9) - -/* cl_mem_migration_flags - bitfield */ -#define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0) -#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1) - -/* cl_channel_order */ -#define CL_R 0x10B0 -#define CL_A 0x10B1 -#define CL_RG 0x10B2 -#define CL_RA 0x10B3 -#define CL_RGB 0x10B4 -#define CL_RGBA 0x10B5 -#define CL_BGRA 0x10B6 -#define CL_ARGB 0x10B7 -#define CL_INTENSITY 0x10B8 -#define CL_LUMINANCE 0x10B9 -#define CL_Rx 0x10BA -#define CL_RGx 0x10BB -#define CL_RGBx 0x10BC -#define CL_DEPTH 0x10BD -#define CL_DEPTH_STENCIL 0x10BE - -/* cl_channel_type */ -#define CL_SNORM_INT8 0x10D0 -#define CL_SNORM_INT16 0x10D1 -#define CL_UNORM_INT8 0x10D2 -#define CL_UNORM_INT16 0x10D3 -#define CL_UNORM_SHORT_565 0x10D4 -#define CL_UNORM_SHORT_555 0x10D5 -#define CL_UNORM_INT_101010 0x10D6 -#define CL_SIGNED_INT8 0x10D7 -#define CL_SIGNED_INT16 0x10D8 -#define CL_SIGNED_INT32 0x10D9 -#define CL_UNSIGNED_INT8 0x10DA -#define CL_UNSIGNED_INT16 0x10DB -#define CL_UNSIGNED_INT32 0x10DC -#define CL_HALF_FLOAT 0x10DD -#define CL_FLOAT 0x10DE -#define CL_UNORM_INT24 0x10DF - -/* cl_mem_object_type */ -#define CL_MEM_OBJECT_BUFFER 0x10F0 -#define CL_MEM_OBJECT_IMAGE2D 0x10F1 -#define CL_MEM_OBJECT_IMAGE3D 0x10F2 -#define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3 -#define CL_MEM_OBJECT_IMAGE1D 0x10F4 -#define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5 -#define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6 - -/* cl_mem_info */ -#define CL_MEM_TYPE 0x1100 -#define CL_MEM_FLAGS 0x1101 -#define CL_MEM_SIZE 0x1102 -#define CL_MEM_HOST_PTR 0x1103 -#define CL_MEM_MAP_COUNT 0x1104 -#define CL_MEM_REFERENCE_COUNT 0x1105 -#define CL_MEM_CONTEXT 0x1106 -#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107 -#define CL_MEM_OFFSET 0x1108 - -/* cl_image_info */ -#define CL_IMAGE_FORMAT 0x1110 -#define CL_IMAGE_ELEMENT_SIZE 0x1111 -#define CL_IMAGE_ROW_PITCH 0x1112 -#define CL_IMAGE_SLICE_PITCH 0x1113 -#define CL_IMAGE_WIDTH 0x1114 -#define CL_IMAGE_HEIGHT 0x1115 -#define CL_IMAGE_DEPTH 0x1116 -#define CL_IMAGE_ARRAY_SIZE 0x1117 -#define CL_IMAGE_BUFFER 0x1118 -#define CL_IMAGE_NUM_MIP_LEVELS 0x1119 -#define CL_IMAGE_NUM_SAMPLES 0x111A - -/* cl_addressing_mode */ -#define CL_ADDRESS_NONE 0x1130 -#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 -#define CL_ADDRESS_CLAMP 0x1132 -#define CL_ADDRESS_REPEAT 0x1133 -#define CL_ADDRESS_MIRRORED_REPEAT 0x1134 - -/* cl_filter_mode */ -#define CL_FILTER_NEAREST 0x1140 -#define CL_FILTER_LINEAR 0x1141 - -/* cl_sampler_info */ -#define CL_SAMPLER_REFERENCE_COUNT 0x1150 -#define CL_SAMPLER_CONTEXT 0x1151 -#define CL_SAMPLER_NORMALIZED_COORDS 0x1152 -#define CL_SAMPLER_ADDRESSING_MODE 0x1153 -#define CL_SAMPLER_FILTER_MODE 0x1154 - -/* cl_map_flags - bitfield */ -#define CL_MAP_READ (1 << 0) -#define CL_MAP_WRITE (1 << 1) -#define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2) - -/* cl_program_info */ -#define CL_PROGRAM_REFERENCE_COUNT 0x1160 -#define CL_PROGRAM_CONTEXT 0x1161 -#define CL_PROGRAM_NUM_DEVICES 0x1162 -#define CL_PROGRAM_DEVICES 0x1163 -#define CL_PROGRAM_SOURCE 0x1164 -#define CL_PROGRAM_BINARY_SIZES 0x1165 -#define CL_PROGRAM_BINARIES 0x1166 -#define CL_PROGRAM_NUM_KERNELS 0x1167 -#define CL_PROGRAM_KERNEL_NAMES 0x1168 - -/* cl_program_build_info */ -#define CL_PROGRAM_BUILD_STATUS 0x1181 -#define CL_PROGRAM_BUILD_OPTIONS 0x1182 -#define CL_PROGRAM_BUILD_LOG 0x1183 -#define CL_PROGRAM_BINARY_TYPE 0x1184 - -/* cl_program_binary_type */ -#define CL_PROGRAM_BINARY_TYPE_NONE 0x0 -#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1 -#define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2 -#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4 - -/* cl_build_status */ -#define CL_BUILD_SUCCESS 0 -#define CL_BUILD_NONE -1 -#define CL_BUILD_ERROR -2 -#define CL_BUILD_IN_PROGRESS -3 - -/* cl_kernel_info */ -#define CL_KERNEL_FUNCTION_NAME 0x1190 -#define CL_KERNEL_NUM_ARGS 0x1191 -#define CL_KERNEL_REFERENCE_COUNT 0x1192 -#define CL_KERNEL_CONTEXT 0x1193 -#define CL_KERNEL_PROGRAM 0x1194 -#define CL_KERNEL_ATTRIBUTES 0x1195 - -/* cl_kernel_arg_info */ -#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196 -#define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197 -#define CL_KERNEL_ARG_TYPE_NAME 0x1198 -#define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199 -#define CL_KERNEL_ARG_NAME 0x119A - -/* cl_kernel_arg_address_qualifier */ -#define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B -#define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C -#define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D -#define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E - -/* cl_kernel_arg_access_qualifier */ -#define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0 -#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1 -#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2 -#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3 - -/* cl_kernel_arg_type_qualifer */ -#define CL_KERNEL_ARG_TYPE_NONE 0 -#define CL_KERNEL_ARG_TYPE_CONST (1 << 0) -#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1) -#define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2) - -/* cl_kernel_work_group_info */ -#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 -#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 -#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 -#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3 -#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4 -#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5 - -/* cl_event_info */ -#define CL_EVENT_COMMAND_QUEUE 0x11D0 -#define CL_EVENT_COMMAND_TYPE 0x11D1 -#define CL_EVENT_REFERENCE_COUNT 0x11D2 -#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 -#define CL_EVENT_CONTEXT 0x11D4 - -/* cl_command_type */ -#define CL_COMMAND_NDRANGE_KERNEL 0x11F0 -#define CL_COMMAND_TASK 0x11F1 -#define CL_COMMAND_NATIVE_KERNEL 0x11F2 -#define CL_COMMAND_READ_BUFFER 0x11F3 -#define CL_COMMAND_WRITE_BUFFER 0x11F4 -#define CL_COMMAND_COPY_BUFFER 0x11F5 -#define CL_COMMAND_READ_IMAGE 0x11F6 -#define CL_COMMAND_WRITE_IMAGE 0x11F7 -#define CL_COMMAND_COPY_IMAGE 0x11F8 -#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 -#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA -#define CL_COMMAND_MAP_BUFFER 0x11FB -#define CL_COMMAND_MAP_IMAGE 0x11FC -#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD -#define CL_COMMAND_MARKER 0x11FE -#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF -#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 -#define CL_COMMAND_READ_BUFFER_RECT 0x1201 -#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202 -#define CL_COMMAND_COPY_BUFFER_RECT 0x1203 -#define CL_COMMAND_USER 0x1204 -#define CL_COMMAND_BARRIER 0x1205 -#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206 -#define CL_COMMAND_FILL_BUFFER 0x1207 -#define CL_COMMAND_FILL_IMAGE 0x1208 - -/* command execution status */ -#define CL_COMPLETE 0x0 -#define CL_RUNNING 0x1 -#define CL_SUBMITTED 0x2 -#define CL_QUEUED 0x3 - -/* cl_buffer_create_type */ -#define CL_BUFFER_CREATE_TYPE_REGION 0x1220 - -/* cl_profiling_info */ -#define CL_PROFILING_COMMAND_QUEUED 0x1280 -#define CL_PROFILING_COMMAND_SUBMIT 0x1281 -#define CL_PROFILING_COMMAND_START 0x1282 -#define CL_PROFILING_COMMAND_END 0x1283 - -#ifdef __cplusplus -} //extern "C" -#endif - -// BK - CL/cl.h header end --------------------------------------------------->8 - -// 1.1 -typedef cl_int (CL_API_CALL* PFNCLGETPLATFORMIDSPROC)(cl_uint, cl_platform_id*, cl_uint*); -typedef cl_int (CL_API_CALL* PFNCLGETPLATFORMINFOPROC)(cl_platform_id, cl_platform_info, size_t, void*, size_t*); -typedef cl_int (CL_API_CALL* PFNCLGETDEVICEINFOPROC)(cl_device_id, cl_device_info, size_t, void*, size_t*); -typedef cl_int (CL_API_CALL* PFNCLGETDEVICEIDSPROC)(cl_platform_id, cl_device_type, cl_uint, cl_device_id*, cl_uint*); -typedef cl_context (CL_API_CALL* PFNCLCREATECONTEXTPROC)(const cl_context_properties*, cl_uint, const cl_device_id*, void (CL_CALLBACK*)(const char*, const void*, size_t, void*), void*, cl_int*); -typedef cl_context (CL_API_CALL* PFNCLCREATECONTEXTFROMTYPEPROC)(const cl_context_properties *, cl_device_type, void (CL_CALLBACK*)(const char*, const void*, size_t, void*), void*, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLRETAINCONTEXTPROC)(cl_context); -typedef cl_int (CL_API_CALL* PFNCLRELEASECONTEXTPROC)(cl_context); -typedef cl_int (CL_API_CALL* PFNCLGETCONTEXTINFOPROC)(cl_context, cl_context_info, size_t, void*, size_t*); -typedef cl_command_queue (CL_API_CALL* PFNCLCREATECOMMANDQUEUEPROC)(cl_context, cl_device_id, cl_command_queue_properties, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLRETAINCOMMANDQUEUEPROC)(cl_command_queue); -typedef cl_int (CL_API_CALL* PFNCLRELEASECOMMANDQUEUEPROC)(cl_command_queue); -typedef cl_int (CL_API_CALL* PFNCLGETCOMMANDQUEUEINFOPROC)(cl_command_queue, cl_command_queue_info, size_t, void*, size_t*); -typedef cl_mem (CL_API_CALL* PFNCLCREATEBUFFERPROC)(cl_context, cl_mem_flags, size_t, void*, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLRETAINMEMOBJECTPROC)(cl_mem); -typedef cl_int (CL_API_CALL* PFNCLRELEASEMEMOBJECTPROC)(cl_mem); -typedef cl_int (CL_API_CALL* PFNCLGETSUPPORTEDIMAGEFORMATSPROC)(cl_context, cl_mem_flags, cl_mem_object_type, cl_uint, cl_image_format*, cl_uint*); -typedef cl_int (CL_API_CALL* PFNCLGETMEMOBJECTINFOPROC)(cl_mem, cl_mem_info, size_t, void*, size_t*); -typedef cl_int (CL_API_CALL* PFNCLGETIMAGEINFOPROC)(cl_mem, cl_image_info, size_t, void*, size_t*); -typedef cl_sampler (CL_API_CALL* PFNCLCREATESAMPLERPROC)(cl_context, cl_bool, cl_addressing_mode, cl_filter_mode, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLRETAINSAMPLERPROC)(cl_sampler); -typedef cl_int (CL_API_CALL* PFNCLRELEASESAMPLERPROC)(cl_sampler); -typedef cl_int (CL_API_CALL* PFNCLGETSAMPLERINFOPROC)(cl_sampler, cl_sampler_info, size_t, void*, size_t*); -typedef cl_program (CL_API_CALL* PFNCLCREATEPROGRAMWITHSOURCEPROC)(cl_context, cl_uint, const char**, const size_t*, cl_int*); -typedef cl_program (CL_API_CALL* PFNCLCREATEPROGRAMWITHBINARYPROC)(cl_context, cl_uint, const cl_device_id*, const size_t*, const unsigned char**, cl_int*, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLRETAINPROGRAMPROC)(cl_program); -typedef cl_int (CL_API_CALL* PFNCLRELEASEPROGRAMPROC)(cl_program); -typedef cl_int (CL_API_CALL* PFNCLBUILDPROGRAMPROC)(cl_program, cl_uint, const cl_device_id *, const char *, void (CL_CALLBACK*)(cl_program, void*), void*); -typedef cl_int (CL_API_CALL* PFNCLGETPROGRAMINFOPROC)(cl_program, cl_program_info, size_t, void*, size_t*); -typedef cl_int (CL_API_CALL* PFNCLGETPROGRAMBUILDINFOPROC)(cl_program, cl_device_id, cl_program_build_info, size_t, void*, size_t*); -typedef cl_kernel (CL_API_CALL* PFNCLCREATEKERNELPROC)(cl_program, const char*, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLCREATEKERNELSINPROGRAMPROC)(cl_program, cl_uint, cl_kernel*, cl_uint*); -typedef cl_int (CL_API_CALL* PFNCLRETAINKERNELPROC)(cl_kernel); -typedef cl_int (CL_API_CALL* PFNCLRELEASEKERNELPROC)(cl_kernel); -typedef cl_int (CL_API_CALL* PFNCLSETKERNELARGPROC)(cl_kernel, cl_uint, size_t, const void*); -typedef cl_int (CL_API_CALL* PFNCLGETKERNELINFOPROC)(cl_kernel, cl_kernel_info, size_t, void*, size_t*); -typedef cl_int (CL_API_CALL* PFNCLGETKERNELWORKGROUPINFOPROC)(cl_kernel, cl_device_id, cl_kernel_work_group_info, size_t, void*, size_t*); -typedef cl_int (CL_API_CALL* PFNCLWAITFOREVENTSPROC)(cl_uint, const cl_event*); -typedef cl_int (CL_API_CALL* PFNCLGETEVENTINFOPROC)(cl_event, cl_event_info, size_t, void*, size_t*); -typedef cl_int (CL_API_CALL* PFNCLRETAINEVENTPROC)(cl_event); -typedef cl_int (CL_API_CALL* PFNCLRELEASEEVENTPROC)(cl_event); -typedef cl_int (CL_API_CALL* PFNCLGETEVENTPROFILINGINFOPROC)(cl_event, cl_profiling_info, size_t, void*, size_t*); -typedef cl_int (CL_API_CALL* PFNCLFLUSHPROC)(cl_command_queue); -typedef cl_int (CL_API_CALL* PFNCLFINISHPROC)(cl_command_queue); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEREADBUFFERPROC)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEWRITEBUFFERPROC)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUECOPYBUFFERPROC)(cl_command_queue, cl_mem, cl_mem, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEREADIMAGEPROC)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEWRITEIMAGEPROC)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUECOPYIMAGEPROC)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUECOPYIMAGETOBUFFERPROC)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, size_t, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUECOPYBUFFERTOIMAGEPROC)(cl_command_queue, cl_mem, cl_mem, size_t, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*); -typedef void (CL_API_CALL* PFNCLENQUEUEMAPBUFFERPROC)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, size_t, size_t, cl_uint, const cl_event*, cl_event*, cl_int*); -typedef void (CL_API_CALL* PFNCLENQUEUEMAPIMAGEPROC)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, const size_t *, const size_t *, size_t *, size_t *, cl_uint, const cl_event *, cl_event *, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEUNMAPMEMOBJECTPROC)(cl_command_queue, cl_mem, void*, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUENDRANGEKERNELPROC)(cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUETASKPROC)(cl_command_queue, cl_kernel, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUENATIVEKERNELPROC)(cl_command_queue, void (CL_CALLBACK*)(void*), void*, size_t, cl_uint, const cl_mem*, const void**, cl_uint, const cl_event*, cl_event*); - -// 1.1 -typedef cl_mem (CL_API_CALL* PFNCLCREATEIMAGE2DPROC)(cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, void*, cl_int*); -typedef cl_mem (CL_API_CALL* PFNCLCREATEIMAGE3DPROC)(cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, size_t, size_t, void*, cl_int*); -typedef cl_mem (CL_API_CALL* PFNCLCREATESUBBUFFERPROC)(cl_mem, cl_mem_flags, cl_buffer_create_type, const void*, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLSETMEMOBJECTDESTRUCTORCALLBACKPROC)(cl_mem, void (CL_CALLBACK*)(cl_mem, void*), void*); -typedef cl_event (CL_API_CALL* PFNCLCREATEUSEREVENTPROC)(cl_context, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLSETUSEREVENTSTATUSPROC)(cl_event, cl_int); -typedef cl_int (CL_API_CALL* PFNCLSETEVENTCALLBACKPROC)(cl_event, cl_int, void (CL_CALLBACK*)(cl_event, cl_int, void*), void*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEREADBUFFERRECTPROC)(cl_command_queue, cl_mem, cl_bool, const size_t *, const size_t *, const size_t *, size_t, size_t, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEWRITEBUFFERRECTPROC)(cl_command_queue, cl_mem, cl_bool, const size_t *, const size_t *, const size_t *, size_t, size_t, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUECOPYBUFFERRECTPROC)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*); - -// 1.2 -typedef cl_int (CL_API_CALL* PFNCLCREATESUBDEVICESPROC)(cl_device_id, const cl_device_partition_property*, cl_uint, cl_device_id*, cl_uint*); -typedef cl_int (CL_API_CALL* PFNCLRETAINDEVICEPROC)(cl_device_id); -typedef cl_int (CL_API_CALL* PFNCLRELEASEDEVICEPROC)(cl_device_id); -typedef cl_mem (CL_API_CALL* PFNCLCREATEIMAGEPROC)(cl_context, cl_mem_flags, const cl_image_format*, const cl_image_desc*, void*, cl_int*); -typedef cl_program (CL_API_CALL* PFNCLCREATEPROGRAMWITHBUILTINKERNELSPROC)(cl_context, cl_uint, const cl_device_id*, const char*, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLCOMPILEPROGRAMPROC)(cl_program, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, const char**, void (CL_CALLBACK*)(cl_program, void*), void*); -typedef cl_program (CL_API_CALL* PFNCLLINKPROGRAMPROC)(cl_context, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, void (CL_CALLBACK*)(cl_program, void*), void*, cl_int*); -typedef cl_int (CL_API_CALL* PFNCLUNLOADPLATFORMCOMPILERPROC)(cl_platform_id); -typedef cl_int (CL_API_CALL* PFNCLGETKERNELARGINFOPROC)(cl_kernel, cl_uint, cl_kernel_arg_info, size_t, void*, size_t*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEFILLBUFFERPROC)(cl_command_queue, cl_mem, const void*, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event *); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEFILLIMAGEPROC)(cl_command_queue, cl_mem, const void*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEMIGRATEMEMOBJECTSPROC)(cl_command_queue, cl_uint, const cl_mem*, cl_mem_migration_flags, cl_uint, const cl_event *, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEMARKERWITHWAITLISTPROC)(cl_command_queue, cl_uint, const cl_event*, cl_event*); -typedef cl_int (CL_API_CALL* PFNCLENQUEUEBARRIERWITHWAITLISTPROC)(cl_command_queue, cl_uint, const cl_event *, cl_event*); - -#define BX_CL_IMPORT_ALL_10 \ - /* Platform API */ \ - BX_CL_IMPORT_10(false, PFNCLGETPLATFORMIDSPROC, clGetPlatformIDs); \ - BX_CL_IMPORT_10(false, PFNCLGETPLATFORMINFOPROC, clGetPlatformInfo); \ - /* Device APIs */ \ - BX_CL_IMPORT_10(false, PFNCLGETDEVICEIDSPROC, clGetDeviceIDs); \ - BX_CL_IMPORT_10(false, PFNCLGETDEVICEINFOPROC, clGetDeviceInfo); \ - /* Context APIs */ \ - BX_CL_IMPORT_10(false, PFNCLCREATECONTEXTPROC, clCreateContext); \ - BX_CL_IMPORT_10(false, PFNCLCREATECONTEXTFROMTYPEPROC, clCreateContextFromType); \ - BX_CL_IMPORT_10(false, PFNCLRETAINCONTEXTPROC, clRetainContext); \ - BX_CL_IMPORT_10(false, PFNCLRELEASECONTEXTPROC, clReleaseContext); \ - BX_CL_IMPORT_10(false, PFNCLGETCONTEXTINFOPROC, clGetContextInfo); \ - /* Command Queue APIs */ \ - BX_CL_IMPORT_10(false, PFNCLCREATECOMMANDQUEUEPROC, clCreateCommandQueue); \ - BX_CL_IMPORT_10(false, PFNCLRETAINCOMMANDQUEUEPROC, clRetainCommandQueue); \ - BX_CL_IMPORT_10(false, PFNCLRELEASECOMMANDQUEUEPROC, clReleaseCommandQueue); \ - BX_CL_IMPORT_10(false, PFNCLGETCOMMANDQUEUEINFOPROC, clGetCommandQueueInfo); \ - /* Memory Object APIs */ \ - BX_CL_IMPORT_10(false, PFNCLCREATEBUFFERPROC, clCreateBuffer); \ - BX_CL_IMPORT_10(false, PFNCLRETAINMEMOBJECTPROC, clRetainMemObject); \ - BX_CL_IMPORT_10(false, PFNCLRELEASEMEMOBJECTPROC, clReleaseMemObject); \ - BX_CL_IMPORT_10(false, PFNCLGETSUPPORTEDIMAGEFORMATSPROC, clGetSupportedImageFormats); \ - BX_CL_IMPORT_10(false, PFNCLGETMEMOBJECTINFOPROC, clGetMemObjectInfo); \ - BX_CL_IMPORT_10(false, PFNCLGETIMAGEINFOPROC, clGetImageInfo); \ - /* Sampler APIs */ \ - BX_CL_IMPORT_10(false, PFNCLCREATESAMPLERPROC, clCreateSampler); \ - BX_CL_IMPORT_10(false, PFNCLRETAINSAMPLERPROC, clRetainSampler); \ - BX_CL_IMPORT_10(false, PFNCLRELEASESAMPLERPROC, clReleaseSampler); \ - BX_CL_IMPORT_10(false, PFNCLGETSAMPLERINFOPROC, clGetSamplerInfo); \ - /* Program Object APIs */ \ - BX_CL_IMPORT_10(false, PFNCLCREATEPROGRAMWITHSOURCEPROC, clCreateProgramWithSource); \ - BX_CL_IMPORT_10(false, PFNCLCREATEPROGRAMWITHBINARYPROC, clCreateProgramWithBinary); \ - BX_CL_IMPORT_10(false, PFNCLRETAINPROGRAMPROC, clRetainProgram); \ - BX_CL_IMPORT_10(false, PFNCLRELEASEPROGRAMPROC, clReleaseProgram); \ - BX_CL_IMPORT_10(false, PFNCLBUILDPROGRAMPROC, clBuildProgram); \ - BX_CL_IMPORT_10(false, PFNCLGETPROGRAMINFOPROC, clGetProgramInfo); \ - BX_CL_IMPORT_10(false, PFNCLGETPROGRAMBUILDINFOPROC, clGetProgramBuildInfo); \ - /* Kernel Object APIs */ \ - BX_CL_IMPORT_10(false, PFNCLCREATEKERNELPROC, clCreateKernel); \ - BX_CL_IMPORT_10(false, PFNCLCREATEKERNELSINPROGRAMPROC, clCreateKernelsInProgram); \ - BX_CL_IMPORT_10(false, PFNCLRETAINKERNELPROC, clRetainKernel); \ - BX_CL_IMPORT_10(false, PFNCLRELEASEKERNELPROC, clReleaseKernel); \ - BX_CL_IMPORT_10(false, PFNCLSETKERNELARGPROC, clSetKernelArg); \ - BX_CL_IMPORT_10(false, PFNCLGETKERNELINFOPROC, clGetKernelInfo); \ - BX_CL_IMPORT_10(false, PFNCLGETKERNELWORKGROUPINFOPROC, clGetKernelWorkGroupInfo); \ - /* Event Object APIs */ \ - BX_CL_IMPORT_10(false, PFNCLWAITFOREVENTSPROC, clWaitForEvents); \ - BX_CL_IMPORT_10(false, PFNCLGETEVENTINFOPROC, clGetEventInfo); \ - BX_CL_IMPORT_10(false, PFNCLRETAINEVENTPROC, clRetainEvent); \ - BX_CL_IMPORT_10(false, PFNCLRELEASEEVENTPROC, clReleaseEvent); \ - /* Profiling APIs */ \ - BX_CL_IMPORT_10(false, PFNCLGETEVENTPROFILINGINFOPROC, clGetEventProfilingInfo); \ - /* Flush and Finish APIs */ \ - BX_CL_IMPORT_10(false, PFNCLFLUSHPROC, clFlush); \ - BX_CL_IMPORT_10(false, PFNCLFINISHPROC, clFinish); \ - /* Enqueued Commands APIs */ \ - BX_CL_IMPORT_10(false, PFNCLENQUEUEREADBUFFERPROC, clEnqueueReadBuffer); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUEWRITEBUFFERPROC, clEnqueueWriteBuffer); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUECOPYBUFFERPROC, clEnqueueCopyBuffer); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUEREADIMAGEPROC, clEnqueueReadImage); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUEWRITEIMAGEPROC, clEnqueueWriteImage); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUECOPYIMAGEPROC, clEnqueueCopyImage); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUECOPYIMAGETOBUFFERPROC, clEnqueueCopyImageToBuffer); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUEMAPBUFFERPROC, clEnqueueMapBuffer); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUEMAPIMAGEPROC, clEnqueueMapImage); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUEUNMAPMEMOBJECTPROC, clEnqueueUnmapMemObject); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUENDRANGEKERNELPROC, clEnqueueNDRangeKernel); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUETASKPROC, clEnqueueTask); \ - BX_CL_IMPORT_10(false, PFNCLENQUEUENATIVEKERNELPROC, clEnqueueNativeKernel); \ - \ - BX_CL_IMPORT_END - -#define BX_CL_IMPORT_ALL_11 \ - /* Memory Object APIs */ \ - BX_CL_IMPORT_11(false, PFNCLCREATEIMAGE2DPROC, clCreateImage2D); \ - BX_CL_IMPORT_11(false, PFNCLCREATEIMAGE3DPROC, clCreateImage3D); \ - BX_CL_IMPORT_11(false, PFNCLCREATESUBBUFFERPROC, clCreateSubBuffer); \ - BX_CL_IMPORT_11(false, PFNCLSETMEMOBJECTDESTRUCTORCALLBACKPROC, clSetMemObjectDestructorCallback); \ - /* Event Object APIs */ \ - BX_CL_IMPORT_11(false, PFNCLCREATEUSEREVENTPROC, clCreateUserEvent); \ - BX_CL_IMPORT_11(false, PFNCLSETUSEREVENTSTATUSPROC, clSetUserEventStatus); \ - BX_CL_IMPORT_11(false, PFNCLSETEVENTCALLBACKPROC, clSetEventCallback); \ - /* Enqueued Commands APIs */ \ - BX_CL_IMPORT_11(false, PFNCLENQUEUEREADBUFFERRECTPROC, clEnqueueReadBufferRect); \ - BX_CL_IMPORT_11(false, PFNCLENQUEUEWRITEBUFFERRECTPROC, clEnqueueWriteBufferRect); \ - BX_CL_IMPORT_11(false, PFNCLENQUEUECOPYBUFFERRECTPROC, clEnqueueCopyBufferRect); \ - \ - BX_CL_IMPORT_END - -#define BX_CL_IMPORT_ALL_12 \ - /* Device APIs */ \ - BX_CL_IMPORT_12(false, PFNCLCREATESUBDEVICESPROC, clCreateSubDevices); \ - BX_CL_IMPORT_12(false, PFNCLRETAINDEVICEPROC, clRetainDevice); \ - BX_CL_IMPORT_12(false, PFNCLRELEASEDEVICEPROC, clReleaseDevice); \ - BX_CL_IMPORT_12(false, PFNCLCREATEIMAGEPROC, clCreateImage); \ - /* Program Object APIs */ \ - BX_CL_IMPORT_12(false, PFNCLCREATEPROGRAMWITHBUILTINKERNELSPROC, clCreateProgramWithBuiltInKernels); \ - BX_CL_IMPORT_12(false, PFNCLCOMPILEPROGRAMPROC, clCompileProgram); \ - BX_CL_IMPORT_12(false, PFNCLLINKPROGRAMPROC, clLinkProgram); \ - BX_CL_IMPORT_12(false, PFNCLUNLOADPLATFORMCOMPILERPROC, clUnloadPlatformCompiler); \ - /* Kernel Object APIs */ \ - BX_CL_IMPORT_12(false, PFNCLGETKERNELARGINFOPROC, clGetKernelArgInfo); \ - /* Enqueued Commands APIs */ \ - BX_CL_IMPORT_12(false, PFNCLENQUEUEFILLBUFFERPROC, clEnqueueFillBuffer); \ - BX_CL_IMPORT_12(false, PFNCLENQUEUEFILLIMAGEPROC, clEnqueueFillImage); \ - BX_CL_IMPORT_12(false, PFNCLENQUEUEMIGRATEMEMOBJECTSPROC, clEnqueueMigrateMemObjects); \ - BX_CL_IMPORT_12(false, PFNCLENQUEUEMARKERWITHWAITLISTPROC, clEnqueueMarkerWithWaitList); \ - BX_CL_IMPORT_12(false, PFNCLENQUEUEBARRIERWITHWAITLISTPROC, clEnqueueBarrierWithWaitList); \ - \ - BX_CL_IMPORT_END - -#define BX_CL_IMPORT_ALL \ - BX_CL_IMPORT_ALL_10 \ - BX_CL_IMPORT_ALL_11 \ - BX_CL_IMPORT_ALL_12 \ - \ - BX_CL_IMPORT_END - -#define BX_CL_IMPORT_10(_optional, _proto, _func) BX_CL_IMPORT(10, _optional, _proto, _func) -#define BX_CL_IMPORT_11(_optional, _proto, _func) BX_CL_IMPORT(11, _optional, _proto, _func) -#define BX_CL_IMPORT_12(_optional, _proto, _func) BX_CL_IMPORT(12, _optional, _proto, _func) -#define BX_CL_IMPORT_END - -#define BX_CL_IMPORT(_version, _optional, _proto, _func) extern "C" _proto _func -BX_CL_IMPORT_ALL -#undef BX_CL_IMPORT - -#if defined(BX_CL_IMPLEMENTATION) -extern "C" -{ -#define BX_CL_IMPORT(_version, _optional, _proto, _func) _proto _func -BX_CL_IMPORT_ALL -#undef BX_CL_IMPORT -}; - -#include "os.h" - -namespace bx -{ - struct OpenCLContext - { - OpenCLContext() - : m_handle(NULL) - , m_refCount(0) - { - } - - int32_t load() - { - if (NULL != m_handle) - { - int32_t ref = ++m_refCount; - return ref; - } - - const char* filePath = -#if BX_PLATFORM_LINUX - "libOpenCL.so" -#elif BX_PLATFORM_OSX - "/Library/Frameworks/OpenCL.framework/OpenCL" -#elif BX_PLATFORM_WINDOWS - "opencl.dll" -#else - "??? unknown OpenCL platform ???" -#endif // BX_PLATFORM_ - ; - - m_handle = bx::dlopen(filePath); - if (NULL == m_handle) - { - BX_TRACE("Unable to find OpenCL '%s' dynamic library.", filePath); - return 0; - } - - m_refCount = 1; - -#define BX_CL_IMPORT(_version, _optional, _proto, _func) _func = (_proto)bx::dlsym(m_handle, #_func) - BX_CL_IMPORT_ALL -#undef BX_CL_IMPORT - - return 1; - } - - int32_t unload() - { - BX_CHECK(m_refCount > 0 && NULL != m_handle, "OpenCL is not loaded."); - - int32_t ref = --m_refCount; - if (0 == ref) - { - dlclose(m_handle); - m_handle = NULL; - } - - return ref; - } - - void* m_handle; - int32_t m_refCount; - }; - - static OpenCLContext s_ctx; - - int32_t clLoad() - { - return s_ctx.load(); - } - - int32_t clUnload() - { - return s_ctx.unload(); - } - -} // namespace bx - -#undef BX_CL_IMPORT_ALL -#undef BX_CL_IMPORT_ALL_10 -#undef BX_CL_IMPORT_ALL_11 -#undef BX_CL_IMPORT_ALL_12 -#undef BX_CL_IMPORT_END - -#endif // defined(BX_CL_IMPLEMENTATION) - -#endif // __OPENCL_CL_H - -#endif // BX_CL_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/commandline.h b/3rdparty/bx/include/bx/commandline.h index 9b9a397..6a32f4b 100644 --- a/3rdparty/bx/include/bx/commandline.h +++ b/3rdparty/bx/include/bx/commandline.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -60,6 +60,12 @@ namespace bx /// bool hasArg(bool& _value, const char _short, const char* _long = NULL) const; + /// + int32_t getNum() const; + + /// + char const* get(int32_t _idx) const; + private: /// const char* find(int32_t _skip, const char _short, const char* _long, int32_t _numParams) const; diff --git a/3rdparty/bx/include/bx/config.h b/3rdparty/bx/include/bx/config.h index 2f7264f..740db63 100644 --- a/3rdparty/bx/include/bx/config.h +++ b/3rdparty/bx/include/bx/config.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -12,28 +12,6 @@ # define BX_CONFIG_ALLOCATOR_DEBUG 0 #endif // BX_CONFIG_DEBUG_ALLOC -#ifndef BX_CONFIG_ALLOCATOR_CRT -# define BX_CONFIG_ALLOCATOR_CRT 1 -#endif // BX_CONFIG_ALLOCATOR_CRT - -#ifndef BX_CONFIG_CRT_FILE_READER_WRITER -# define BX_CONFIG_CRT_FILE_READER_WRITER !(0 \ - || BX_PLATFORM_NACL \ - || BX_CRT_NONE \ - ) -#endif // BX_CONFIG_CRT_FILE_READER_WRITER - -#ifndef BX_CONFIG_CRT_PROCESS -# define BX_CONFIG_CRT_PROCESS !(0 \ - || BX_CRT_NONE \ - || BX_PLATFORM_EMSCRIPTEN \ - || BX_PLATFORM_NACL \ - || BX_PLATFORM_PS4 \ - || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOXONE \ - ) -#endif // BX_CONFIG_CRT_PROCESS - #ifndef BX_CONFIG_SUPPORTS_THREADING # define BX_CONFIG_SUPPORTS_THREADING !(0 \ || BX_PLATFORM_EMSCRIPTEN \ diff --git a/3rdparty/bx/include/bx/cpu.h b/3rdparty/bx/include/bx/cpu.h index 91ab437..a2e81a1 100644 --- a/3rdparty/bx/include/bx/cpu.h +++ b/3rdparty/bx/include/bx/cpu.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -8,315 +8,61 @@ #include "bx.h" -#if BX_COMPILER_MSVC -# if BX_PLATFORM_XBOX360 -# include -# include -# else -# include // math.h is included because VS bitches: - // warning C4985: 'ceil': attributes not present on previous declaration. - // must be included before intrin.h. -# include -# include -# endif // !BX_PLATFORM_XBOX360 -# if BX_PLATFORM_WINRT -# define _InterlockedExchangeAdd64 InterlockedExchangeAdd64 -# endif // BX_PLATFORM_WINRT -extern "C" void _ReadBarrier(); -extern "C" void _WriteBarrier(); -extern "C" void _ReadWriteBarrier(); -# pragma intrinsic(_ReadBarrier) -# pragma intrinsic(_WriteBarrier) -# pragma intrinsic(_ReadWriteBarrier) -# pragma intrinsic(_InterlockedExchangeAdd) -# pragma intrinsic(_InterlockedCompareExchange) -#endif // BX_COMPILER_MSVC - namespace bx { /// - inline void readBarrier() - { -#if BX_COMPILER_MSVC - _ReadBarrier(); -#else - asm volatile("":::"memory"); -#endif // BX_COMPILER - } + void readBarrier(); /// - inline void writeBarrier() - { -#if BX_COMPILER_MSVC - _WriteBarrier(); -#else - asm volatile("":::"memory"); -#endif // BX_COMPILER - } + void writeBarrier(); /// - inline void readWriteBarrier() - { -#if BX_COMPILER_MSVC - _ReadWriteBarrier(); -#else - asm volatile("":::"memory"); -#endif // BX_COMPILER - } + void readWriteBarrier(); /// - inline void memoryBarrier() - { -#if BX_PLATFORM_XBOX360 - __lwsync(); -#elif BX_PLATFORM_WINRT - MemoryBarrier(); -#elif BX_COMPILER_MSVC - _mm_mfence(); -#else - __sync_synchronize(); -// asm volatile("mfence":::"memory"); -#endif // BX_COMPILER - } + void memoryBarrier(); + /// template - inline Ty atomicFetchAndAdd(volatile Ty* _ptr, Ty _value); - - template - inline Ty atomicAddAndFetch(volatile Ty* _ptr, Ty _value); - - template - inline Ty atomicFetchAndSub(volatile Ty* _ptr, Ty _value); - - template - inline Ty atomicSubAndFetch(volatile Ty* _ptr, Ty _value); - - template - inline Ty atomicCompareAndSwap(volatile void* _ptr, Ty _old, Ty _new); - - template<> - inline int32_t atomicCompareAndSwap(volatile void* _ptr, int32_t _old, int32_t _new); - - template<> - inline int64_t atomicCompareAndSwap(volatile void* _ptr, int64_t _old, int64_t _new); - - template<> - inline int32_t atomicFetchAndAdd(volatile int32_t* _ptr, int32_t _add) - { -#if BX_COMPILER_MSVC - return _InterlockedExchangeAdd( (volatile long*)_ptr, _add); -#else - return __sync_fetch_and_add(_ptr, _add); -#endif // BX_COMPILER_ - } - - template<> - inline int64_t atomicFetchAndAdd(volatile int64_t* _ptr, int64_t _add) - { -#if BX_COMPILER_MSVC -# if _WIN32_WINNT >= 0x600 - return _InterlockedExchangeAdd64( (volatile int64_t*)_ptr, _add); -# else - int64_t oldVal; - int64_t newVal = *(int64_t volatile*)_ptr; - do - { - oldVal = newVal; - newVal = atomicCompareAndSwap(_ptr, oldVal, newVal + _add); - - } while (oldVal != newVal); - - return oldVal; -# endif -#else - return __sync_fetch_and_add(_ptr, _add); -#endif // BX_COMPILER_ - } - - template<> - inline uint32_t atomicFetchAndAdd(volatile uint32_t* _ptr, uint32_t _add) - { - return uint32_t(atomicFetchAndAdd( (volatile int32_t*)_ptr, int32_t(_add) ) ); - } - - template<> - inline uint64_t atomicFetchAndAdd(volatile uint64_t* _ptr, uint64_t _add) - { - return uint64_t(atomicFetchAndAdd( (volatile int64_t*)_ptr, int64_t(_add) ) ); - } - - template<> - inline int32_t atomicAddAndFetch(volatile int32_t* _ptr, int32_t _add) - { -#if BX_COMPILER_MSVC - return atomicFetchAndAdd(_ptr, _add) + _add; -#else - return __sync_add_and_fetch(_ptr, _add); -#endif // BX_COMPILER_ - } - - template<> - inline int64_t atomicAddAndFetch(volatile int64_t* _ptr, int64_t _add) - { -#if BX_COMPILER_MSVC - return atomicFetchAndAdd(_ptr, _add) + _add; -#else - return __sync_add_and_fetch(_ptr, _add); -#endif // BX_COMPILER_ - } - - template<> - inline uint32_t atomicAddAndFetch(volatile uint32_t* _ptr, uint32_t _add) - { - return uint32_t(atomicAddAndFetch( (volatile int32_t*)_ptr, int32_t(_add) ) ); - } - - template<> - inline uint64_t atomicAddAndFetch(volatile uint64_t* _ptr, uint64_t _add) - { - return uint64_t(atomicAddAndFetch( (volatile int64_t*)_ptr, int64_t(_add) ) ); - } - - template<> - inline int32_t atomicFetchAndSub(volatile int32_t* _ptr, int32_t _sub) - { -#if BX_COMPILER_MSVC - return atomicFetchAndAdd(_ptr, -_sub); -#else - return __sync_fetch_and_sub(_ptr, _sub); -#endif // BX_COMPILER_ - } - - template<> - inline int64_t atomicFetchAndSub(volatile int64_t* _ptr, int64_t _sub) - { -#if BX_COMPILER_MSVC - return atomicFetchAndAdd(_ptr, -_sub); -#else - return __sync_fetch_and_sub(_ptr, _sub); -#endif // BX_COMPILER_ - } - - template<> - inline uint32_t atomicFetchAndSub(volatile uint32_t* _ptr, uint32_t _add) - { - return uint32_t(atomicFetchAndSub( (volatile int32_t*)_ptr, int32_t(_add) ) ); - } - - template<> - inline uint64_t atomicFetchAndSub(volatile uint64_t* _ptr, uint64_t _add) - { - return uint64_t(atomicFetchAndSub( (volatile int64_t*)_ptr, int64_t(_add) ) ); - } - - template<> - inline int32_t atomicSubAndFetch(volatile int32_t* _ptr, int32_t _sub) - { -#if BX_COMPILER_MSVC - return atomicFetchAndAdd(_ptr, -_sub) - _sub; -#else - return __sync_sub_and_fetch(_ptr, _sub); -#endif // BX_COMPILER_ - } - - template<> - inline int64_t atomicSubAndFetch(volatile int64_t* _ptr, int64_t _sub) - { -#if BX_COMPILER_MSVC - return atomicFetchAndAdd(_ptr, -_sub) - _sub; -#else - return __sync_sub_and_fetch(_ptr, _sub); -#endif // BX_COMPILER_ - } - - template<> - inline uint32_t atomicSubAndFetch(volatile uint32_t* _ptr, uint32_t _add) - { - return uint32_t(atomicSubAndFetch( (volatile int32_t*)_ptr, int32_t(_add) ) ); - } - - template<> - inline uint64_t atomicSubAndFetch(volatile uint64_t* _ptr, uint64_t _add) - { - return uint64_t(atomicSubAndFetch( (volatile int64_t*)_ptr, int64_t(_add) ) ); - } - - /// Returns the resulting incremented value. - template - inline Ty atomicInc(volatile Ty* _ptr) - { - return atomicAddAndFetch(_ptr, Ty(1) ); - } - - /// Returns the resulting decremented value. - template - inline Ty atomicDec(volatile Ty* _ptr) - { - return atomicSubAndFetch(_ptr, Ty(1) ); - } + Ty atomicFetchAndAdd(volatile Ty* _ptr, Ty _value); /// - template<> - inline int32_t atomicCompareAndSwap(volatile void* _ptr, int32_t _old, int32_t _new) - { -#if BX_COMPILER_MSVC - return _InterlockedCompareExchange( (volatile LONG*)(_ptr), _new, _old); -#else - return __sync_val_compare_and_swap( (volatile int32_t*)_ptr, _old, _new); -#endif // BX_COMPILER - } + template + Ty atomicAddAndFetch(volatile Ty* _ptr, Ty _value); /// - template<> - inline int64_t atomicCompareAndSwap(volatile void* _ptr, int64_t _old, int64_t _new) - { -#if BX_COMPILER_MSVC - return _InterlockedCompareExchange64( (volatile LONG64*)(_ptr), _new, _old); -#else - return __sync_val_compare_and_swap( (volatile int64_t*)_ptr, _old, _new); -#endif // BX_COMPILER - } + template + Ty atomicFetchAndSub(volatile Ty* _ptr, Ty _value); /// - inline void* atomicExchangePtr(void** _ptr, void* _new) - { -#if BX_COMPILER_MSVC - return InterlockedExchangePointer(_ptr, _new); -#else - return __sync_lock_test_and_set(_ptr, _new); -#endif // BX_COMPILER - } + template + Ty atomicSubAndFetch(volatile Ty* _ptr, Ty _value); /// - inline int32_t atomicTestAndInc(volatile void* _ptr, int32_t _test) - { - int32_t oldVal; - int32_t newVal = *(int32_t volatile*)_ptr; - do - { - oldVal = newVal; - newVal = atomicCompareAndSwap(_ptr, oldVal, newVal >= _test ? _test : newVal+1); - - } while (oldVal != newVal); - - return oldVal; - } + template + Ty atomicCompareAndSwap(volatile Ty* _ptr, Ty _old, Ty _new); /// - inline int32_t atomicTestAndDec(volatile void* _ptr, int32_t _test) - { - int32_t oldVal; - int32_t newVal = *(int32_t volatile*)_ptr; - do - { - oldVal = newVal; - newVal = atomicCompareAndSwap(_ptr, oldVal, newVal <= _test ? _test : newVal-1); + template + Ty atomicFetchTestAndAdd(volatile Ty* _ptr, Ty _test, Ty _value); - } while (oldVal != newVal); + /// + template + Ty atomicFetchTestAndSub(volatile Ty* _ptr, Ty _test, Ty _value); - return oldVal; - } + /// + template + Ty atomicFetchAndAddsat(volatile Ty* _ptr, Ty _value, Ty _max); + + /// + template + Ty atomicFetchAndSubsat(volatile Ty* _ptr, Ty _value, Ty _min); + + /// + void* atomicExchangePtr(void** _ptr, void* _new); } // namespace bx +#include "inline/cpu.inl" + #endif // BX_CPU_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/crtimpl.h b/3rdparty/bx/include/bx/crtimpl.h deleted file mode 100644 index 8176c6b..0000000 --- a/3rdparty/bx/include/bx/crtimpl.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_CRTIMPL_H_HEADER_GUARD -#define BX_CRTIMPL_H_HEADER_GUARD - -#include "bx.h" - -#if BX_CONFIG_ALLOCATOR_CRT -# include "allocator.h" -#endif // BX_CONFIG_ALLOCATOR_CRT - -#if BX_CONFIG_CRT_FILE_READER_WRITER -# include "readerwriter.h" -#endif // BX_CONFIG_CRT_FILE_READER_WRITER - -namespace bx -{ -#if BX_CONFIG_ALLOCATOR_CRT - /// - class CrtAllocator : public AllocatorI - { - public: - /// - CrtAllocator(); - - /// - virtual ~CrtAllocator(); - - /// - virtual void* realloc(void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line) BX_OVERRIDE; - }; -#endif // BX_CONFIG_ALLOCATOR_CRT - -#if BX_CONFIG_CRT_FILE_READER_WRITER - /// - class CrtFileReader : public FileReaderI - { - public: - /// - CrtFileReader(); - - /// - virtual ~CrtFileReader(); - - /// - virtual bool open(const char* _filePath, Error* _err) BX_OVERRIDE; - - /// - virtual void close() BX_OVERRIDE; - - /// - virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) BX_OVERRIDE; - - /// - virtual int32_t read(void* _data, int32_t _size, Error* _err) BX_OVERRIDE; - - private: - void* m_file; - }; - - /// - class CrtFileWriter : public FileWriterI - { - public: - /// - CrtFileWriter(); - - /// - virtual ~CrtFileWriter(); - - /// - virtual bool open(const char* _filePath, bool _append, Error* _err) BX_OVERRIDE; - - /// - virtual void close() BX_OVERRIDE; - - /// - virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) BX_OVERRIDE; - - /// - virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE; - - private: - void* m_file; - }; -#endif // BX_CONFIG_CRT_FILE_READER_WRITER - -#if BX_CONFIG_CRT_PROCESS - /// - class ProcessReader : public ReaderOpenI, public CloserI, public ReaderI - { - public: - /// - ProcessReader(); - - /// - ~ProcessReader(); - - /// - virtual bool open(const char* _command, Error* _err) BX_OVERRIDE; - - /// - virtual void close() BX_OVERRIDE; - - /// - virtual int32_t read(void* _data, int32_t _size, Error* _err) BX_OVERRIDE; - - /// - int32_t getExitCode() const; - - private: - void* m_file; - int32_t m_exitCode; - }; - - /// - class ProcessWriter : public WriterOpenI, public CloserI, public WriterI - { - public: - /// - ProcessWriter(); - - /// - ~ProcessWriter(); - - /// - virtual bool open(const char* _command, bool, Error* _err) BX_OVERRIDE; - - /// - virtual void close() BX_OVERRIDE; - - /// - virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE; - - /// - int32_t getExitCode() const; - - private: - void* m_file; - int32_t m_exitCode; - }; -#endif // BX_CONFIG_CRT_PROCESS - -} // namespace bx - -#endif // BX_CRTIMPL_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/debug.h b/3rdparty/bx/include/bx/debug.h index 7c2ca86..adba3f2 100644 --- a/3rdparty/bx/include/bx/debug.h +++ b/3rdparty/bx/include/bx/debug.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -25,6 +25,9 @@ namespace bx /// void debugPrintfData(const void* _data, uint32_t _size, const char* _format, ...); + /// + struct WriterI* getDebugOut(); + } // namespace bx #endif // BX_DEBUG_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/easing.h b/3rdparty/bx/include/bx/easing.h index 6213157..809d206 100644 --- a/3rdparty/bx/include/bx/easing.h +++ b/3rdparty/bx/include/bx/easing.h @@ -1,12 +1,12 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #ifndef BX_EASING_H_HEADER_GUARD #define BX_EASING_H_HEADER_GUARD -#include "fpumath.h" +#include "math.h" // Reference: // http://easings.net/ @@ -20,6 +20,8 @@ namespace bx enum Enum { Linear, + Step, + SmoothStep, InQuad, OutQuad, InOutQuad, @@ -68,129 +70,1128 @@ namespace bx /// typedef float (*EaseFn)(float _t); + /// + EaseFn getEaseFunc(Easing::Enum _enum); + + /// Linear. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ******* + /// | ******* + /// | ******** + /// | ******* + /// | ******* + /// | ******** + /// | ******* + /// | ******** + /// | ******* + /// +*******---------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeLinear(float _t); + /// Step. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | ******************************** + /// | + /// | + /// | + /// | + /// | + /// | + /// | + /// | + /// | + /// +********************************--------------------------------> + /// | + /// | + /// | + /// | + /// | + /// + float easeStep(float _t); + + /// Smooth step. + /// + /// | + /// | + /// | + /// | + /// | + /// | ************* + /// | ******* + /// | ****** + /// | ***** + /// | ***** + /// | ***** + /// | ***** + /// | ****** + /// | ******* + /// +*************---------------------------------------------------> + /// | + /// | + /// | + /// | + /// | + /// + float easeSmoothStep(float _t); + + /// Quad. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | **** + /// | **** + /// | ***** + /// | ***** + /// | ***** + /// | ****** + /// | ****** + /// | ******** + /// | ********* + /// +*********************-------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInQuad(float _t); + /// Out quad. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ********************* + /// | ********* + /// | ******* + /// | ****** + /// | ****** + /// | ***** + /// | ***** + /// | ***** + /// | **** + /// +****------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutQuad(float _t); + /// In out quad. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | *************** + /// | ******* + /// | ***** + /// | ***** + /// | **** + /// | ***** + /// | ***** + /// | ***** + /// | ******* + /// +***************-------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInOutQuad(float _t); + /// Out in quad. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | **** + /// | ***** + /// | ***** + /// | ******* + /// | *************** + /// | **************** + /// | ******* + /// | ***** + /// | ***** + /// +****------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutInQuad(float _t); + /// In cubic. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | *** + /// | *** + /// | **** + /// | *** + /// | **** + /// | **** + /// | ****** + /// | ****** + /// | ********* + /// +******************************----------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInCubic(float _t); + /// Out cubic. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | * + /// | ****************************** + /// | ********* + /// | ****** + /// | ****** + /// | **** + /// | **** + /// | **** + /// | **** + /// | *** + /// +***-------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutCubic(float _t); + /// In out cubic. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | * + /// | ******************* + /// | ****** + /// | **** + /// | **** + /// | *** + /// | **** + /// | *** + /// | **** + /// | ****** + /// +*******************---------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInOutCubic(float _t); + /// Out in cubic. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | *** + /// | *** + /// | **** + /// | ****** + /// | ******************* + /// | ******************** + /// | ****** + /// | **** + /// | **** + /// +***-------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutInCubic(float _t); + /// In quart. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ** + /// | *** + /// | *** + /// | *** + /// | **** + /// | **** + /// | **** + /// | ****** + /// | ******* + /// +************************************----------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInQuart(float _t); + /// Out quart. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | * + /// | ************************************ + /// | ******** + /// | ****** + /// | **** + /// | **** + /// | **** + /// | *** + /// | *** + /// | *** + /// +**--------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutQuart(float _t); + /// In out quart. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | * + /// | ********************** + /// | ***** + /// | **** + /// | *** + /// | ** + /// | *** + /// | *** + /// | **** + /// | ***** + /// +**********************------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInOutQuart(float _t); + /// Out in quart. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ** + /// | *** + /// | **** + /// | ***** + /// | *********************** + /// | *********************** + /// | ***** + /// | **** + /// | *** + /// +**--------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutInQuart(float _t); + /// In quint. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ** + /// | ** + /// | *** + /// | *** + /// | *** + /// | *** + /// | **** + /// | ***** + /// | ******* + /// +*****************************************-----------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInQuint(float _t); + /// Out quint. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | ** + /// | ***************************************** + /// | ******* + /// | ***** + /// | **** + /// | *** + /// | *** + /// | *** + /// | *** + /// | ** + /// +**--------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutQuint(float _t); + /// In out quint. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | ** + /// | ************************ + /// | **** + /// | *** + /// | *** + /// | ** + /// | *** + /// | *** + /// | *** + /// | **** + /// +************************----------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInOutQuint(float _t); + /// Out in quint. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ** + /// | *** + /// | *** + /// | **** + /// | ************************* + /// | ************************** + /// | **** + /// | *** + /// | *** + /// +**--------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutInQuint(float _t); + /// In sine. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | **** + /// | ***** + /// | ***** + /// | ***** + /// | ****** + /// | ****** + /// | ****** + /// | ******* + /// | ********* + /// +*******************---------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInSine(float _t); + /// Out sine. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ******************* + /// | ********* + /// | ******* + /// | ****** + /// | ****** + /// | ****** + /// | ***** + /// | ***** + /// | ***** + /// +*****-----------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutSine(float _t); + /// In out sine. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ************** + /// | ****** + /// | ****** + /// | ***** + /// | ***** + /// | ****** + /// | ***** + /// | ****** + /// | ****** + /// +**************--------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInOutSine(float _t); + /// Out in sine. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ***** + /// | ***** + /// | ****** + /// | ****** + /// | ************** + /// | *************** + /// | ****** + /// | ****** + /// | ***** + /// +*****-----------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutInSine(float _t); + /// In exponential. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | * + /// | ** + /// | ** + /// | ** + /// | *** + /// | *** + /// | *** + /// | **** + /// | ******** + /// +*******************************************---------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInExpo(float _t); + /// Out exponential. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | * + /// | ******************************************* + /// | ******** + /// | **** + /// | **** + /// | *** + /// | *** + /// | ** + /// | ** + /// | ** + /// +*---------------------------------------------------------------> + /// | + /// | + /// | + /// | + /// | /// float easeOutExpo(float _t); + /// In out exponential. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | * + /// | ************************* + /// | **** + /// | *** + /// | ** + /// | ** + /// | * + /// | ** + /// | *** + /// | **** + /// +*************************---------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInOutExpo(float _t); + /// Out in exponential. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | * + /// | ** + /// | *** + /// | **** + /// | ************************** + /// | ************************** + /// | **** + /// | *** + /// | ** + /// +**--------------------------------------------------------------> + /// | + /// | + /// | + /// | + /// | /// float easeOutInExpo(float _t); + /// In circle. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | * + /// | ** + /// | ** + /// | **** + /// | **** + /// | ***** + /// | ******* + /// | ******** + /// | ************ + /// +****************************------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInCirc(float _t); + /// Out circle. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | **************************** + /// | ************ + /// | ******** + /// | ******* + /// | ***** + /// | **** + /// | *** + /// | ** + /// |** + /// +*---------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutCirc(float _t); + /// In out circle. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ******************** + /// | ******* + /// | ***** + /// | *** + /// | * + /// | ** + /// | *** + /// | ***** + /// | ******* + /// +********************--------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInOutCirc(float _t); + /// Out in circle. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | * + /// | *** + /// | ***** + /// | ******* + /// | ******************** + /// | ********************* + /// | ******* + /// | ***** + /// |*** + /// +*---------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutInCirc(float _t); + /// Out elastic. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | * + /// | ** + /// | * + /// | ** + /// | * + /// | * + /// | * + /// | * + /// | ***** ** + /// +-***********--------***********---------****---***---------*----> + /// |** ********** *********** ** ** + /// | ** * + /// | ** * + /// | ***** + /// | /// float easeOutElastic(float _t); + /// In elastic. + /// + /// ^ + /// | + /// | ***** + /// | * ** + /// | ** ** + /// | ** ** ********** ********** ** + /// | * *** ***** *********** *********** + /// | ** ***** + /// | * + /// | * + /// | ** + /// | * + /// | ** + /// | * + /// |** + /// +*---------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInElastic(float _t); + /// In out elastic. + /// + /// ^ + /// | + /// | + /// | + /// | *** + /// | ** ** ***** ****** * + /// | * ****** ****** ****** + /// | * + /// | * + /// | ** + /// | * + /// | ** + /// | * + /// | * + /// | * + /// +******----******----*****----**---------------------------------> + /// |* ****** ****** *** * + /// | *** + /// | + /// | + /// | /// float easeInOutElastic(float _t); + /// Out in elastic. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | * + /// | * + /// | * + /// | *** * + /// | ** ** ***** ****** ******* ****** ***** ** + /// | * ****** ****** ******* ****** ****** *** * + /// | * *** + /// | * + /// |** + /// +*---------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutInElastic(float _t); + /// In back. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | * + /// | ** + /// | ** + /// | ** + /// | ** + /// | ** + /// | ** + /// | ** + /// | ** + /// +*-------------------------------------------------***-----------> + /// |************* *** + /// | ******* **** + /// | ******* ***** + /// | ****************** + /// | /// float easeInBack(float _t); + /// Out back. + /// + /// ^ + /// | + /// | ****************** + /// | ***** ******* + /// | **** ******* + /// | *** ************* + /// | *** + /// | ** + /// | *** + /// | ** + /// | *** + /// | ** + /// | ** + /// | ** + /// | ** + /// +**--------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutBack(float _t); + /// In out back. + /// + /// ^ + /// | + /// | + /// | + /// | ************** + /// | **** ********** + /// | ** + /// | *** + /// | ** + /// | ** + /// | ** + /// | ** + /// | ** + /// | ** + /// | ** + /// +*------------------------**-------------------------------------> + /// |********** **** + /// | ************** + /// | + /// | + /// | /// float easeInOutBack(float _t); + /// Out in back. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | * + /// | ** + /// | ** + /// | ************** ** + /// | **** *********** ** + /// | ** ********** **** + /// | *** ************** + /// | ** + /// | ** + /// +**--------------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutInBack(float _t); + /// Out bounce. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ******** + /// | **** + /// | *** + /// | *** + /// | *** + /// | ** + /// | ** + /// | ************** ** + /// | **** **** ** + /// +********************------------------****----------------------> + /// |* * + /// | + /// | + /// | + /// | /// float easeOutBounce(float _t); + /// In bounce. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | * + /// | **** ******************** + /// | *** **** **** + /// | ** ************** + /// | ** + /// | *** + /// | *** + /// | *** + /// | *** + /// | **** + /// +********--------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeInBounce(float _t); + /// In out bounce. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | * + /// | ***** ************ + /// | ** ******* + /// | *** + /// | *** + /// | ****** + /// | ******* + /// | *** + /// | ** + /// | ******* ** + /// +************------****------------------------------------------> + /// |* * + /// | + /// | + /// | + /// | /// float easeInOutBounce(float _t); + /// Out in bounce. + /// + /// ^ + /// | + /// | + /// | + /// | + /// | + /// | ****** + /// | *** + /// | ** + /// | ******* ** + /// | * ************ **** + /// | ***** ************* * + /// | ** ******* + /// | *** + /// | *** + /// +******----------------------------------------------------------> + /// |* + /// | + /// | + /// | + /// | /// float easeOutInBounce(float _t); + float easeInOutLinear(float _t); + } // namespace bx #include "inline/easing.inl" diff --git a/3rdparty/bx/include/bx/endian.h b/3rdparty/bx/include/bx/endian.h index fdc1933..22965b5 100644 --- a/3rdparty/bx/include/bx/endian.h +++ b/3rdparty/bx/include/bx/endian.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/error.h b/3rdparty/bx/include/bx/error.h index 47d6d82..6de5fe3 100644 --- a/3rdparty/bx/include/bx/error.h +++ b/3rdparty/bx/include/bx/error.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -11,7 +11,7 @@ #define BX_ERROR_SET(_ptr, _result, _msg) \ BX_MACRO_BLOCK_BEGIN \ BX_TRACE("Error %d: %s", _result.code, "" _msg); \ - _ptr->setError(_result, "" _msg); \ + (_ptr)->setError(_result, "" _msg); \ BX_MACRO_BLOCK_END #define BX_ERROR_USE_TEMP_WHEN_NULL(_ptr) \ diff --git a/3rdparty/bx/include/bx/file.h b/3rdparty/bx/include/bx/file.h new file mode 100644 index 0000000..4c0dd41 --- /dev/null +++ b/3rdparty/bx/include/bx/file.h @@ -0,0 +1,98 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_FILE_H_HEADER_GUARD +#define BX_FILE_H_HEADER_GUARD + +#include "filepath.h" +#include "readerwriter.h" + +namespace bx +{ + /// + ReaderI* getStdIn(); + + /// + WriterI* getStdOut(); + + /// + WriterI* getStdErr(); + + /// + WriterI* getNullOut(); + + /// + class FileReader : public FileReaderI + { + public: + /// + FileReader(); + + /// + virtual ~FileReader(); + + /// + virtual bool open(const FilePath& _filePath, Error* _err) override; + + /// + virtual void close() override; + + /// + virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) override; + + /// + virtual int32_t read(void* _data, int32_t _size, Error* _err) override; + + private: + BX_ALIGN_DECL(16, uint8_t) m_internal[64]; + }; + + /// + class FileWriter : public FileWriterI + { + public: + /// + FileWriter(); + + /// + virtual ~FileWriter(); + + /// + virtual bool open(const FilePath& _filePath, bool _append, Error* _err) override; + + /// + virtual void close() override; + + /// + virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) override; + + /// + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override; + + private: + BX_ALIGN_DECL(16, uint8_t) m_internal[64]; + }; + + /// + struct FileInfo + { + enum Enum + { + Regular, + Directory, + + Count + }; + + uint64_t m_size; + Enum m_type; + }; + + /// + bool stat(const FilePath& _filePath, FileInfo& _outFileInfo); + +} // namespace bx + +#endif // BX_FILE_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/filepath.h b/3rdparty/bx/include/bx/filepath.h new file mode 100644 index 0000000..f4ce83b --- /dev/null +++ b/3rdparty/bx/include/bx/filepath.h @@ -0,0 +1,114 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_FILEPATH_H_HEADER_GUARD +#define BX_FILEPATH_H_HEADER_GUARD + +#include "error.h" +#include "string.h" + +BX_ERROR_RESULT(BX_ERROR_ACCESS, BX_MAKEFOURCC('b', 'x', 0, 0) ); +BX_ERROR_RESULT(BX_ERROR_NOT_DIRECTORY, BX_MAKEFOURCC('b', 'x', 0, 1) ); + +namespace bx +{ + const int32_t kMaxFilePath = 1024; + + /// + struct Dir + { + enum Enum /// + { + Current, + Temp, + Home, + + Count + }; + }; + + /// FilePath parser and helper. + /// + /// /abv/gd/555/333/pod.mac + /// ppppppppppppppppbbbeeee + /// ^ ^ ^ + /// +-path base-+ +-ext + /// ^^^^^^^ + /// +-filename + /// + class FilePath + { + public: + /// + FilePath(); + + /// + FilePath(Dir::Enum _dir); + + /// + FilePath(const char* _str); + + /// + FilePath(const StringView& _str); + + /// + FilePath& operator=(const StringView& _rhs); + + /// + void clear(); + + /// + void set(Dir::Enum _dir); + + /// + void set(const StringView& _str); + + /// + void join(const StringView& _str); + + /// + const char* get() const; + + /// If path is `/abv/gd/555/333/pod.mac` returns `/abv/gd/555/333/`. + /// + const StringView getPath() const; + + /// If path is `/abv/gd/555/333/pod.mac` returns `pod.mac`. + /// + const StringView getFileName() const; + + /// If path is `/abv/gd/555/333/pod.mac` returns `pod`. + /// + const StringView getBaseName() const; + + /// If path is `/abv/gd/555/333/pod.mac` returns `.mac`. + /// + const StringView getExt() const; + + /// + bool isAbsolute() const; + + /// + bool isEmpty() const; + + private: + char m_filePath[kMaxFilePath]; + }; + + /// Creates a directory named `_filePath`. + bool make(const FilePath& _filePath, Error* _err = NULL); + + /// Creates a directory named `_filePath` along with all necessary parents. + bool makeAll(const FilePath& _filePath, Error* _err = NULL); + + /// Removes file or directory. + bool remove(const FilePath& _filePath, Error* _err = NULL); + + /// Removes file or directory recursivelly. + bool removeAll(const FilePath& _filePath, Error* _err = NULL); + +} // namespace bx + +#endif // BX_FILEPATH_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/float4x4_t.h b/3rdparty/bx/include/bx/float4x4_t.h index 44569b9..3250d92 100644 --- a/3rdparty/bx/include/bx/float4x4_t.h +++ b/3rdparty/bx/include/bx/float4x4_t.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -10,149 +10,29 @@ namespace bx { + /// BX_ALIGN_DECL_16(struct) float4x4_t { simd128_t col[4]; }; - BX_SIMD_FORCE_INLINE simd128_t simd_mul_xyz1(simd128_t _a, const float4x4_t* _b) - { - const simd128_t xxxx = simd_swiz_xxxx(_a); - const simd128_t yyyy = simd_swiz_yyyy(_a); - const simd128_t zzzz = simd_swiz_zzzz(_a); - const simd128_t col0 = simd_mul(_b->col[0], xxxx); - const simd128_t col1 = simd_mul(_b->col[1], yyyy); - const simd128_t col2 = simd_madd(_b->col[2], zzzz, col0); - const simd128_t col3 = simd_add(_b->col[3], col1); - const simd128_t result = simd_add(col2, col3); + /// + simd128_t simd_mul_xyz1(simd128_t _a, const float4x4_t* _b); - return result; - } + /// + simd128_t simd_mul(simd128_t _a, const float4x4_t* _b); - BX_SIMD_FORCE_INLINE simd128_t simd_mul(simd128_t _a, const float4x4_t* _b) - { - const simd128_t xxxx = simd_swiz_xxxx(_a); - const simd128_t yyyy = simd_swiz_yyyy(_a); - const simd128_t zzzz = simd_swiz_zzzz(_a); - const simd128_t wwww = simd_swiz_wwww(_a); - const simd128_t col0 = simd_mul(_b->col[0], xxxx); - const simd128_t col1 = simd_mul(_b->col[1], yyyy); - const simd128_t col2 = simd_madd(_b->col[2], zzzz, col0); - const simd128_t col3 = simd_madd(_b->col[3], wwww, col1); - const simd128_t result = simd_add(col2, col3); + /// + void float4x4_mul(float4x4_t* _result, const float4x4_t* _a, const float4x4_t* _b); - return result; - } + /// + void float4x4_transpose(float4x4_t* _result, const float4x4_t* _mtx); - BX_SIMD_INLINE void float4x4_mul(float4x4_t* _result, const float4x4_t* _a, const float4x4_t* _b) - { - _result->col[0] = simd_mul(_a->col[0], _b); - _result->col[1] = simd_mul(_a->col[1], _b); - _result->col[2] = simd_mul(_a->col[2], _b); - _result->col[3] = simd_mul(_a->col[3], _b); - } - - BX_SIMD_FORCE_INLINE void float4x4_transpose(float4x4_t* _result, const float4x4_t* _mtx) - { - const simd128_t aibj = simd_shuf_xAyB(_mtx->col[0], _mtx->col[2]); // aibj - const simd128_t emfn = simd_shuf_xAyB(_mtx->col[1], _mtx->col[3]); // emfn - const simd128_t ckdl = simd_shuf_zCwD(_mtx->col[0], _mtx->col[2]); // ckdl - const simd128_t gohp = simd_shuf_zCwD(_mtx->col[1], _mtx->col[3]); // gohp - _result->col[0] = simd_shuf_xAyB(aibj, emfn); // aeim - _result->col[1] = simd_shuf_zCwD(aibj, emfn); // bfjn - _result->col[2] = simd_shuf_xAyB(ckdl, gohp); // cgko - _result->col[3] = simd_shuf_zCwD(ckdl, gohp); // dhlp - } - - BX_SIMD_INLINE void float4x4_inverse(float4x4_t* _result, const float4x4_t* _a) - { - const simd128_t tmp0 = simd_shuf_xAzC(_a->col[0], _a->col[1]); - const simd128_t tmp1 = simd_shuf_xAzC(_a->col[2], _a->col[3]); - const simd128_t tmp2 = simd_shuf_yBwD(_a->col[0], _a->col[1]); - const simd128_t tmp3 = simd_shuf_yBwD(_a->col[2], _a->col[3]); - const simd128_t t0 = simd_shuf_xyAB(tmp0, tmp1); - const simd128_t t1 = simd_shuf_xyAB(tmp3, tmp2); - const simd128_t t2 = simd_shuf_zwCD(tmp0, tmp1); - const simd128_t t3 = simd_shuf_zwCD(tmp3, tmp2); - - const simd128_t t23 = simd_mul(t2, t3); - const simd128_t t23_yxwz = simd_swiz_yxwz(t23); - const simd128_t t23_wzyx = simd_swiz_wzyx(t23); - - simd128_t cof0, cof1, cof2, cof3; - - const simd128_t zero = simd_zero(); - cof0 = simd_nmsub(t1, t23_yxwz, zero); - cof0 = simd_madd(t1, t23_wzyx, cof0); - - cof1 = simd_nmsub(t0, t23_yxwz, zero); - cof1 = simd_madd(t0, t23_wzyx, cof1); - cof1 = simd_swiz_zwxy(cof1); - - const simd128_t t12 = simd_mul(t1, t2); - const simd128_t t12_yxwz = simd_swiz_yxwz(t12); - const simd128_t t12_wzyx = simd_swiz_wzyx(t12); - - cof0 = simd_madd(t3, t12_yxwz, cof0); - cof0 = simd_nmsub(t3, t12_wzyx, cof0); - - cof3 = simd_mul(t0, t12_yxwz); - cof3 = simd_nmsub(t0, t12_wzyx, cof3); - cof3 = simd_swiz_zwxy(cof3); - - const simd128_t t1_zwxy = simd_swiz_zwxy(t1); - const simd128_t t2_zwxy = simd_swiz_zwxy(t2); - - const simd128_t t13 = simd_mul(t1_zwxy, t3); - const simd128_t t13_yxwz = simd_swiz_yxwz(t13); - const simd128_t t13_wzyx = simd_swiz_wzyx(t13); - - cof0 = simd_madd(t2_zwxy, t13_yxwz, cof0); - cof0 = simd_nmsub(t2_zwxy, t13_wzyx, cof0); - - cof2 = simd_mul(t0, t13_yxwz); - cof2 = simd_nmsub(t0, t13_wzyx, cof2); - cof2 = simd_swiz_zwxy(cof2); - - const simd128_t t01 = simd_mul(t0, t1); - const simd128_t t01_yxwz = simd_swiz_yxwz(t01); - const simd128_t t01_wzyx = simd_swiz_wzyx(t01); - - cof2 = simd_nmsub(t3, t01_yxwz, cof2); - cof2 = simd_madd(t3, t01_wzyx, cof2); - - cof3 = simd_madd(t2_zwxy, t01_yxwz, cof3); - cof3 = simd_nmsub(t2_zwxy, t01_wzyx, cof3); - - const simd128_t t03 = simd_mul(t0, t3); - const simd128_t t03_yxwz = simd_swiz_yxwz(t03); - const simd128_t t03_wzyx = simd_swiz_wzyx(t03); - - cof1 = simd_nmsub(t2_zwxy, t03_yxwz, cof1); - cof1 = simd_madd(t2_zwxy, t03_wzyx, cof1); - - cof2 = simd_madd(t1, t03_yxwz, cof2); - cof2 = simd_nmsub(t1, t03_wzyx, cof2); - - const simd128_t t02 = simd_mul(t0, t2_zwxy); - const simd128_t t02_yxwz = simd_swiz_yxwz(t02); - const simd128_t t02_wzyx = simd_swiz_wzyx(t02); - - cof1 = simd_madd(t3, t02_yxwz, cof1); - cof1 = simd_nmsub(t3, t02_wzyx, cof1); - - cof3 = simd_nmsub(t1, t02_yxwz, cof3); - cof3 = simd_madd(t1, t02_wzyx, cof3); - - const simd128_t det = simd_dot(t0, cof0); - const simd128_t invdet = simd_rcp(det); - - _result->col[0] = simd_mul(cof0, invdet); - _result->col[1] = simd_mul(cof1, invdet); - _result->col[2] = simd_mul(cof2, invdet); - _result->col[3] = simd_mul(cof3, invdet); - } + /// + void float4x4_inverse(float4x4_t* _result, const float4x4_t* _a); } // namespace bx +#include "inline/float4x4_t.inl" + #endif // BX_FLOAT4X4_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/foreach.h b/3rdparty/bx/include/bx/foreach.h deleted file mode 100644 index 43abf62..0000000 --- a/3rdparty/bx/include/bx/foreach.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_FOREACH_H_HEADER_GUARD -#define BX_FOREACH_H_HEADER_GUARD - -#include "bx.h" - -namespace bx -{ - namespace foreach_ns - { - struct ContainerBase - { - }; - - template - class Container : public ContainerBase - { - public: - inline Container(const Ty& _container) - : m_container(_container) - , m_break(0) - , m_it( _container.begin() ) - , m_itEnd( _container.end() ) - { - } - - inline bool condition() const - { - return (!m_break++ && m_it != m_itEnd); - } - - const Ty& m_container; - mutable int m_break; - mutable typename Ty::const_iterator m_it; - mutable typename Ty::const_iterator m_itEnd; - }; - - template - inline Ty* pointer(const Ty&) - { - return 0; - } - - template - inline Container containerNew(const Ty& _container) - { - return Container(_container); - } - - template - inline const Container* container(const ContainerBase* _base, const Ty*) - { - return static_cast*>(_base); - } - } // namespace foreach_ns - -#define foreach(_variable, _container) \ - for (const bx::foreach_ns::ContainerBase &__temp_container__ = bx::foreach_ns::containerNew(_container); \ - bx::foreach_ns::container(&__temp_container__, true ? 0 : bx::foreach_ns::pointer(_container) )->condition(); \ - ++bx::foreach_ns::container(&__temp_container__, true ? 0 : bx::foreach_ns::pointer(_container) )->m_it) \ - for (_variable = *container(&__temp_container__, true ? 0 : bx::foreach_ns::pointer(_container) )->m_it; \ - bx::foreach_ns::container(&__temp_container__, true ? 0 : bx::foreach_ns::pointer(_container) )->m_break; \ - --bx::foreach_ns::container(&__temp_container__, true ? 0 : bx::foreach_ns::pointer(_container) )->m_break) - -} // namespace bx - -#endif // BX_FOREACH_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/handlealloc.h b/3rdparty/bx/include/bx/handlealloc.h index eb98cac..21b07cc 100644 --- a/3rdparty/bx/include/bx/handlealloc.h +++ b/3rdparty/bx/include/bx/handlealloc.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -12,12 +12,12 @@ namespace bx { + static const uint16_t kInvalidHandle = UINT16_MAX; + /// class HandleAlloc { public: - static const uint16_t invalid = UINT16_MAX; - /// HandleAlloc(uint16_t _maxHandles); @@ -87,8 +87,6 @@ namespace bx class HandleListT { public: - static const uint16_t invalid = UINT16_MAX; - /// HandleListT(); @@ -152,8 +150,6 @@ namespace bx class HandleAllocLruT { public: - static const uint16_t invalid = UINT16_MAX; - /// HandleAllocLruT(); @@ -209,8 +205,6 @@ namespace bx class HandleHashMapT { public: - static const uint16_t invalid = UINT16_MAX; - /// HandleHashMapT(); @@ -280,8 +274,6 @@ namespace bx class HandleHashMapAllocT { public: - static const uint16_t invalid = UINT16_MAX; - /// HandleHashMapAllocT(); diff --git a/3rdparty/bx/include/bx/hash.h b/3rdparty/bx/include/bx/hash.h index feade56..9ced694 100644 --- a/3rdparty/bx/include/bx/hash.h +++ b/3rdparty/bx/include/bx/hash.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -23,12 +23,6 @@ namespace bx /// void add(const void* _data, int _len); - /// - void addAligned(const void* _data, int _len); - - /// - void addUnaligned(const void* _data, int _len); - /// template void add(Ty _value); @@ -37,6 +31,12 @@ namespace bx uint32_t end(); private: + /// + void addAligned(const void* _data, int _len); + + /// + void addUnaligned(const void* _data, int _len); + /// static void readUnaligned(const void* _data, uint32_t& _out); @@ -50,17 +50,73 @@ namespace bx }; /// - uint32_t hashMurmur2A(const void* _data, uint32_t _size); + class HashAdler32 + { + public: + /// + void begin(); + + /// + void add(const void* _data, int _len); + + /// + template + void add(Ty _value); + + /// + uint32_t end(); + + private: + uint32_t m_a; + uint32_t m_b; + }; /// - template - uint32_t hashMurmur2A(const Ty& _data); + class HashCrc32 + { + public: + enum Enum + { + Ieee, //!< 0xedb88320 + Castagnoli, //!< 0x82f63b78 + Koopman, //!< 0xeb31d82e + + Count + }; + + /// + void begin(Enum _type = Ieee); + + /// + void add(const void* _data, int _len); + + /// + template + void add(Ty _value); + + /// + uint32_t end(); + + private: + const uint32_t* m_table; + uint32_t m_hash; + }; /// - uint32_t hashMurmur2A(const StringView& _data); + template + uint32_t hash(const void* _data, uint32_t _size); /// - uint32_t hashMurmur2A(const char* _data); + template + uint32_t hash(const Ty& _data); + + /// + template + uint32_t hash(const StringView& _data); + + /// + template + uint32_t hash(const char* _data); } // namespace bx diff --git a/3rdparty/bx/include/bx/inline/allocator.inl b/3rdparty/bx/include/bx/inline/allocator.inl index 8a4898d..2c602b3 100644 --- a/3rdparty/bx/include/bx/inline/allocator.inl +++ b/3rdparty/bx/include/bx/inline/allocator.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -7,6 +7,15 @@ # error "Must be included from bx/allocator.h" #endif // BX_ALLOCATOR_H_HEADER_GUARD +inline void* operator new(size_t, bx::PlacementNewTag, void* _ptr) +{ + return _ptr; +} + +inline void operator delete(void*, bx::PlacementNewTag, void*) throw() +{ +} + namespace bx { inline AllocatorI::~AllocatorI() diff --git a/3rdparty/bx/include/bx/inline/bx.inl b/3rdparty/bx/include/bx/inline/bx.inl index f8e9c63..cdd154d 100644 --- a/3rdparty/bx/include/bx/inline/bx.inl +++ b/3rdparty/bx/include/bx/inline/bx.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -10,18 +10,18 @@ namespace bx { template - inline bool isEnabled() + inline constexpr bool isEnabled() { return true; } template<> - inline bool isEnabled() + inline constexpr bool isEnabled() { return false; } - inline bool ignoreC4127(bool _x) + inline constexpr bool ignoreC4127(bool _x) { return _x; } @@ -32,4 +32,46 @@ namespace bx Ty tmp = _a; _a = _b; _b = tmp; } + template + inline constexpr Ty min(const Ty& _a, const Ty& _b) + { + return _a < _b ? _a : _b; + } + + template + inline constexpr Ty max(const Ty& _a, const Ty& _b) + { + return _a > _b ? _a : _b; + } + + template + inline constexpr Ty min(const Ty& _a, const Ty& _b, const Ty& _c) + { + return min(min(_a, _b), _c); + } + + template + inline constexpr Ty max(const Ty& _a, const Ty& _b, const Ty& _c) + { + return max(max(_a, _b), _c); + } + + template + inline constexpr Ty mid(const Ty& _a, const Ty& _b, const Ty& _c) + { + return max(min(_a, _b), min(max(_a, _b), _c) ); + } + + template + inline constexpr Ty clamp(const Ty& _a, const Ty& _min, const Ty& _max) + { + return max(min(_a, _max), _min); + } + + template + inline constexpr bool isPowerOf2(Ty _a) + { + return _a && !(_a & (_a - 1) ); + } + } // namespace bx diff --git a/3rdparty/bx/include/bx/inline/cpu.inl b/3rdparty/bx/include/bx/inline/cpu.inl new file mode 100644 index 0000000..3ff2a23 --- /dev/null +++ b/3rdparty/bx/include/bx/inline/cpu.inl @@ -0,0 +1,351 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_CPU_H_HEADER_GUARD +# error "Must be included from bx/cpu.h!" +#endif // BX_CPU_H_HEADER_GUARD + +#if BX_COMPILER_MSVC +# if BX_PLATFORM_WINRT +# include +# endif // BX_PLATFORM_WINRT + +# include // _mm_fence + +extern "C" void _ReadBarrier(); +# pragma intrinsic(_ReadBarrier) + +extern "C" void _WriteBarrier(); +# pragma intrinsic(_WriteBarrier) + +extern "C" void _ReadWriteBarrier(); +# pragma intrinsic(_ReadWriteBarrier) + +extern "C" long _InterlockedExchangeAdd(long volatile* _ptr, long _value); +# pragma intrinsic(_InterlockedExchangeAdd) + +extern "C" int64_t __cdecl _InterlockedExchangeAdd64(int64_t volatile* _ptr, int64_t _value); +//# pragma intrinsic(_InterlockedExchangeAdd64) + +extern "C" long _InterlockedCompareExchange(long volatile* _ptr, long _exchange, long _comparand); +# pragma intrinsic(_InterlockedCompareExchange) + +extern "C" int64_t _InterlockedCompareExchange64(int64_t volatile* _ptr, int64_t _exchange, int64_t _comparand); +# pragma intrinsic(_InterlockedCompareExchange64) + +#if (_MSC_VER == 1800) && !defined(FIXED_592562) && defined (_M_IX86) && !defined (_M_CEE_PURE) + +extern "C" long _InterlockedExchange(long volatile* _ptr, long _value); +# pragma intrinsic(_InterlockedExchange) + +__forceinline static void * _InterlockedExchangePointer_impl(void * volatile * _Target, void * _Value) +{ + return (void *)_InterlockedExchange((long volatile *) _Target, (long) _Value); +} +#define _InterlockedExchangePointer(p,v) _InterlockedExchangePointer_impl(p,v) + +#else + +extern "C" void* _InterlockedExchangePointer(void* volatile* _ptr, void* _value); +# pragma intrinsic(_InterlockedExchangePointer) + +#endif + +# if BX_PLATFORM_WINRT +# define _InterlockedExchangeAdd64 InterlockedExchangeAdd64 +# endif // BX_PLATFORM_WINRT +#endif // BX_COMPILER_MSVC + +namespace bx +{ + inline void readBarrier() + { +#if BX_COMPILER_MSVC + _ReadBarrier(); +#else + asm volatile("":::"memory"); +#endif // BX_COMPILER + } + + inline void writeBarrier() + { +#if BX_COMPILER_MSVC + _WriteBarrier(); +#else + asm volatile("":::"memory"); +#endif // BX_COMPILER + } + + inline void readWriteBarrier() + { +#if BX_COMPILER_MSVC + _ReadWriteBarrier(); +#else + asm volatile("":::"memory"); +#endif // BX_COMPILER + } + + inline void memoryBarrier() + { +#if BX_PLATFORM_WINRT + MemoryBarrier(); +#elif BX_COMPILER_MSVC + _mm_mfence(); +#else + __sync_synchronize(); +#endif // BX_COMPILER + } + + template<> + inline int32_t atomicCompareAndSwap(volatile int32_t* _ptr, int32_t _old, int32_t _new) + { +#if BX_COMPILER_MSVC + return int32_t(_InterlockedCompareExchange( (volatile long*)(_ptr), long(_new), long(_old) ) ); +#else + return __sync_val_compare_and_swap( (volatile int32_t*)_ptr, _old, _new); +#endif // BX_COMPILER + } + + template<> + inline uint32_t atomicCompareAndSwap(volatile uint32_t* _ptr, uint32_t _old, uint32_t _new) + { +#if BX_COMPILER_MSVC + return uint32_t(_InterlockedCompareExchange( (volatile long*)(_ptr), long(_new), long(_old) ) ); +#else + return __sync_val_compare_and_swap( (volatile int32_t*)_ptr, _old, _new); +#endif // BX_COMPILER + } + + template<> + inline int64_t atomicCompareAndSwap(volatile int64_t* _ptr, int64_t _old, int64_t _new) + { +#if BX_COMPILER_MSVC + return _InterlockedCompareExchange64(_ptr, _new, _old); +#else + return __sync_val_compare_and_swap( (volatile int64_t*)_ptr, _old, _new); +#endif // BX_COMPILER + } + + template<> + inline uint64_t atomicCompareAndSwap(volatile uint64_t* _ptr, uint64_t _old, uint64_t _new) + { +#if BX_COMPILER_MSVC + return uint64_t(_InterlockedCompareExchange64( (volatile int64_t*)(_ptr), int64_t(_new), int64_t(_old) ) ); +#else + return __sync_val_compare_and_swap( (volatile int64_t*)_ptr, _old, _new); +#endif // BX_COMPILER + } + + template<> + inline int32_t atomicFetchAndAdd(volatile int32_t* _ptr, int32_t _add) + { +#if BX_COMPILER_MSVC + return _InterlockedExchangeAdd( (volatile long*)_ptr, _add); +#else + return __sync_fetch_and_add(_ptr, _add); +#endif // BX_COMPILER_ + } + + template<> + inline uint32_t atomicFetchAndAdd(volatile uint32_t* _ptr, uint32_t _add) + { + return uint32_t(atomicFetchAndAdd( (volatile int32_t*)_ptr, int32_t(_add) ) ); + } + + template<> + inline int64_t atomicFetchAndAdd(volatile int64_t* _ptr, int64_t _add) + { +#if BX_COMPILER_MSVC +# if _WIN32_WINNT >= 0x600 + return _InterlockedExchangeAdd64( (volatile int64_t*)_ptr, _add); +# else + int64_t oldVal; + int64_t newVal = *(int64_t volatile*)_ptr; + do + { + oldVal = newVal; + newVal = atomicCompareAndSwap(_ptr, oldVal, newVal + _add); + + } while (oldVal != newVal); + + return oldVal; +# endif +#else + return __sync_fetch_and_add(_ptr, _add); +#endif // BX_COMPILER_ + } + + template<> + inline uint64_t atomicFetchAndAdd(volatile uint64_t* _ptr, uint64_t _add) + { + return uint64_t(atomicFetchAndAdd( (volatile int64_t*)_ptr, int64_t(_add) ) ); + } + + template<> + inline int32_t atomicAddAndFetch(volatile int32_t* _ptr, int32_t _add) + { +#if BX_COMPILER_MSVC + return atomicFetchAndAdd(_ptr, _add) + _add; +#else + return __sync_add_and_fetch(_ptr, _add); +#endif // BX_COMPILER_ + } + + template<> + inline int64_t atomicAddAndFetch(volatile int64_t* _ptr, int64_t _add) + { +#if BX_COMPILER_MSVC + return atomicFetchAndAdd(_ptr, _add) + _add; +#else + return __sync_add_and_fetch(_ptr, _add); +#endif // BX_COMPILER_ + } + + template<> + inline uint32_t atomicAddAndFetch(volatile uint32_t* _ptr, uint32_t _add) + { + return uint32_t(atomicAddAndFetch( (volatile int32_t*)_ptr, int32_t(_add) ) ); + } + + template<> + inline uint64_t atomicAddAndFetch(volatile uint64_t* _ptr, uint64_t _add) + { + return uint64_t(atomicAddAndFetch( (volatile int64_t*)_ptr, int64_t(_add) ) ); + } + + template<> + inline int32_t atomicFetchAndSub(volatile int32_t* _ptr, int32_t _sub) + { +#if BX_COMPILER_MSVC + return atomicFetchAndAdd(_ptr, -_sub); +#else + return __sync_fetch_and_sub(_ptr, _sub); +#endif // BX_COMPILER_ + } + + template<> + inline int64_t atomicFetchAndSub(volatile int64_t* _ptr, int64_t _sub) + { +#if BX_COMPILER_MSVC + return atomicFetchAndAdd(_ptr, -_sub); +#else + return __sync_fetch_and_sub(_ptr, _sub); +#endif // BX_COMPILER_ + } + + template<> + inline uint32_t atomicFetchAndSub(volatile uint32_t* _ptr, uint32_t _add) + { + return uint32_t(atomicFetchAndSub( (volatile int32_t*)_ptr, int32_t(_add) ) ); + } + + template<> + inline uint64_t atomicFetchAndSub(volatile uint64_t* _ptr, uint64_t _add) + { + return uint64_t(atomicFetchAndSub( (volatile int64_t*)_ptr, int64_t(_add) ) ); + } + + template<> + inline int32_t atomicSubAndFetch(volatile int32_t* _ptr, int32_t _sub) + { +#if BX_COMPILER_MSVC + return atomicFetchAndAdd(_ptr, -_sub) - _sub; +#else + return __sync_sub_and_fetch(_ptr, _sub); +#endif // BX_COMPILER_ + } + + template<> + inline int64_t atomicSubAndFetch(volatile int64_t* _ptr, int64_t _sub) + { +#if BX_COMPILER_MSVC + return atomicFetchAndAdd(_ptr, -_sub) - _sub; +#else + return __sync_sub_and_fetch(_ptr, _sub); +#endif // BX_COMPILER_ + } + + template<> + inline uint32_t atomicSubAndFetch(volatile uint32_t* _ptr, uint32_t _add) + { + return uint32_t(atomicSubAndFetch( (volatile int32_t*)_ptr, int32_t(_add) ) ); + } + + template<> + inline uint64_t atomicSubAndFetch(volatile uint64_t* _ptr, uint64_t _add) + { + return uint64_t(atomicSubAndFetch( (volatile int64_t*)_ptr, int64_t(_add) ) ); + } + + template + inline Ty atomicFetchTestAndAdd(volatile Ty* _ptr, Ty _test, Ty _value) + { + Ty oldVal; + Ty newVal = *_ptr; + do + { + oldVal = newVal; + newVal = atomicCompareAndSwap(_ptr, oldVal, newVal >= _test ? _test : newVal+_value); + + } while (oldVal != newVal); + + return oldVal; + } + + template + inline Ty atomicFetchTestAndSub(volatile Ty* _ptr, Ty _test, Ty _value) + { + Ty oldVal; + Ty newVal = *_ptr; + do + { + oldVal = newVal; + newVal = atomicCompareAndSwap(_ptr, oldVal, newVal <= _test ? _test : newVal-_value); + + } while (oldVal != newVal); + + return oldVal; + } + + template + Ty atomicFetchAndAddsat(volatile Ty* _ptr, Ty _value, Ty _max) + { + Ty oldVal; + Ty newVal = *_ptr; + do + { + oldVal = newVal; + newVal = atomicCompareAndSwap(_ptr, oldVal, newVal >= _max ? _max : min(_max, newVal+_value) ); + + } while (oldVal != newVal && oldVal != _max); + + return oldVal; + } + + template + Ty atomicFetchAndSubsat(volatile Ty* _ptr, Ty _value, Ty _min) + { + Ty oldVal; + Ty newVal = *_ptr; + do + { + oldVal = newVal; + newVal = atomicCompareAndSwap(_ptr, oldVal, newVal <= _min ? _min : max(_min, newVal-_value) ); + + } while (oldVal != newVal && oldVal != _min); + + return oldVal; + } + + inline void* atomicExchangePtr(void** _ptr, void* _new) + { +#if BX_COMPILER_MSVC + return _InterlockedExchangePointer(_ptr, _new); +#else + return __sync_lock_test_and_set(_ptr, _new); +#endif // BX_COMPILER + } + +} // namespace bx diff --git a/3rdparty/bx/include/bx/inline/easing.inl b/3rdparty/bx/include/bx/inline/easing.inl index b23edb1..d105d0b 100644 --- a/3rdparty/bx/include/bx/inline/easing.inl +++ b/3rdparty/bx/include/bx/inline/easing.inl @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -29,9 +29,19 @@ namespace bx return _t; } + inline float easeStep(float _t) + { + return _t < 0.5f ? 0.0f : 1.0f; + } + + inline float easeSmoothStep(float _t) + { + return square(_t)*(3.0f - 2.0f*_t); + } + inline float easeInQuad(float _t) { - return fsq(_t); + return square(_t); } inline float easeOutQuad(float _t) @@ -111,7 +121,7 @@ namespace bx inline float easeInSine(float _t) { - return 1.0f - fcos(_t*piHalf); + return 1.0f - cos(_t*kPiHalf); } inline float easeOutSine(float _t) @@ -131,7 +141,7 @@ namespace bx inline float easeInExpo(float _t) { - return fpow(2.0f, 10.0f * (_t - 1.0f) ) - 0.001f; + return pow(2.0f, 10.0f * (_t - 1.0f) ) - 0.001f; } inline float easeOutExpo(float _t) @@ -151,7 +161,7 @@ namespace bx inline float easeInCirc(float _t) { - return -(fsqrt(1.0f - _t*_t) - 1.0f); + return -(sqrt(1.0f - _t*_t) - 1.0f); } inline float easeOutCirc(float _t) @@ -171,7 +181,7 @@ namespace bx inline float easeOutElastic(float _t) { - return fpow(2.0f, -10.0f*_t)*fsin( (_t-0.3f/4.0f)*(2.0f*pi)/0.3f) + 1.0f; + return pow(2.0f, -10.0f*_t)*sin( (_t-0.3f/4.0f)*(2.0f*kPi)/0.3f) + 1.0f; } inline float easeInElastic(float _t) @@ -191,7 +201,7 @@ namespace bx inline float easeInBack(float _t) { - return easeInCubic(_t) - _t*fsin(_t*pi); + return easeInCubic(_t) - _t*sin(_t*kPi); } inline float easeOutBack(float _t) diff --git a/3rdparty/bx/include/bx/inline/endian.inl b/3rdparty/bx/include/bx/inline/endian.inl index 6ec7572..332e2b6 100644 --- a/3rdparty/bx/include/bx/inline/endian.inl +++ b/3rdparty/bx/include/bx/inline/endian.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/inline/error.inl b/3rdparty/bx/include/bx/inline/error.inl index ac16c6f..af5c31a 100644 --- a/3rdparty/bx/include/bx/inline/error.inl +++ b/3rdparty/bx/include/bx/inline/error.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/inline/float4x4_t.inl b/3rdparty/bx/include/bx/inline/float4x4_t.inl new file mode 100644 index 0000000..222c111 --- /dev/null +++ b/3rdparty/bx/include/bx/inline/float4x4_t.inl @@ -0,0 +1,150 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_FLOAT4X4_H_HEADER_GUARD +# error "Must be included from bx/float4x4.h!" +#endif // BX_FLOAT4X4_H_HEADER_GUARD + +namespace bx +{ + BX_SIMD_FORCE_INLINE simd128_t simd_mul_xyz1(simd128_t _a, const float4x4_t* _b) + { + const simd128_t xxxx = simd_swiz_xxxx(_a); + const simd128_t yyyy = simd_swiz_yyyy(_a); + const simd128_t zzzz = simd_swiz_zzzz(_a); + const simd128_t col0 = simd_mul(_b->col[0], xxxx); + const simd128_t col1 = simd_mul(_b->col[1], yyyy); + const simd128_t col2 = simd_madd(_b->col[2], zzzz, col0); + const simd128_t col3 = simd_add(_b->col[3], col1); + const simd128_t result = simd_add(col2, col3); + + return result; + } + + BX_SIMD_FORCE_INLINE simd128_t simd_mul(simd128_t _a, const float4x4_t* _b) + { + const simd128_t xxxx = simd_swiz_xxxx(_a); + const simd128_t yyyy = simd_swiz_yyyy(_a); + const simd128_t zzzz = simd_swiz_zzzz(_a); + const simd128_t wwww = simd_swiz_wwww(_a); + const simd128_t col0 = simd_mul(_b->col[0], xxxx); + const simd128_t col1 = simd_mul(_b->col[1], yyyy); + const simd128_t col2 = simd_madd(_b->col[2], zzzz, col0); + const simd128_t col3 = simd_madd(_b->col[3], wwww, col1); + const simd128_t result = simd_add(col2, col3); + + return result; + } + + BX_SIMD_INLINE void float4x4_mul(float4x4_t* _result, const float4x4_t* _a, const float4x4_t* _b) + { + _result->col[0] = simd_mul(_a->col[0], _b); + _result->col[1] = simd_mul(_a->col[1], _b); + _result->col[2] = simd_mul(_a->col[2], _b); + _result->col[3] = simd_mul(_a->col[3], _b); + } + + BX_SIMD_FORCE_INLINE void float4x4_transpose(float4x4_t* _result, const float4x4_t* _mtx) + { + const simd128_t aibj = simd_shuf_xAyB(_mtx->col[0], _mtx->col[2]); // aibj + const simd128_t emfn = simd_shuf_xAyB(_mtx->col[1], _mtx->col[3]); // emfn + const simd128_t ckdl = simd_shuf_zCwD(_mtx->col[0], _mtx->col[2]); // ckdl + const simd128_t gohp = simd_shuf_zCwD(_mtx->col[1], _mtx->col[3]); // gohp + _result->col[0] = simd_shuf_xAyB(aibj, emfn); // aeim + _result->col[1] = simd_shuf_zCwD(aibj, emfn); // bfjn + _result->col[2] = simd_shuf_xAyB(ckdl, gohp); // cgko + _result->col[3] = simd_shuf_zCwD(ckdl, gohp); // dhlp + } + + BX_SIMD_INLINE void float4x4_inverse(float4x4_t* _result, const float4x4_t* _a) + { + const simd128_t tmp0 = simd_shuf_xAzC(_a->col[0], _a->col[1]); + const simd128_t tmp1 = simd_shuf_xAzC(_a->col[2], _a->col[3]); + const simd128_t tmp2 = simd_shuf_yBwD(_a->col[0], _a->col[1]); + const simd128_t tmp3 = simd_shuf_yBwD(_a->col[2], _a->col[3]); + const simd128_t t0 = simd_shuf_xyAB(tmp0, tmp1); + const simd128_t t1 = simd_shuf_xyAB(tmp3, tmp2); + const simd128_t t2 = simd_shuf_zwCD(tmp0, tmp1); + const simd128_t t3 = simd_shuf_zwCD(tmp3, tmp2); + + const simd128_t t23 = simd_mul(t2, t3); + const simd128_t t23_yxwz = simd_swiz_yxwz(t23); + const simd128_t t23_wzyx = simd_swiz_wzyx(t23); + + simd128_t cof0, cof1, cof2, cof3; + + const simd128_t zero = simd_zero(); + cof0 = simd_nmsub(t1, t23_yxwz, zero); + cof0 = simd_madd(t1, t23_wzyx, cof0); + + cof1 = simd_nmsub(t0, t23_yxwz, zero); + cof1 = simd_madd(t0, t23_wzyx, cof1); + cof1 = simd_swiz_zwxy(cof1); + + const simd128_t t12 = simd_mul(t1, t2); + const simd128_t t12_yxwz = simd_swiz_yxwz(t12); + const simd128_t t12_wzyx = simd_swiz_wzyx(t12); + + cof0 = simd_madd(t3, t12_yxwz, cof0); + cof0 = simd_nmsub(t3, t12_wzyx, cof0); + + cof3 = simd_mul(t0, t12_yxwz); + cof3 = simd_nmsub(t0, t12_wzyx, cof3); + cof3 = simd_swiz_zwxy(cof3); + + const simd128_t t1_zwxy = simd_swiz_zwxy(t1); + const simd128_t t2_zwxy = simd_swiz_zwxy(t2); + + const simd128_t t13 = simd_mul(t1_zwxy, t3); + const simd128_t t13_yxwz = simd_swiz_yxwz(t13); + const simd128_t t13_wzyx = simd_swiz_wzyx(t13); + + cof0 = simd_madd(t2_zwxy, t13_yxwz, cof0); + cof0 = simd_nmsub(t2_zwxy, t13_wzyx, cof0); + + cof2 = simd_mul(t0, t13_yxwz); + cof2 = simd_nmsub(t0, t13_wzyx, cof2); + cof2 = simd_swiz_zwxy(cof2); + + const simd128_t t01 = simd_mul(t0, t1); + const simd128_t t01_yxwz = simd_swiz_yxwz(t01); + const simd128_t t01_wzyx = simd_swiz_wzyx(t01); + + cof2 = simd_nmsub(t3, t01_yxwz, cof2); + cof2 = simd_madd(t3, t01_wzyx, cof2); + + cof3 = simd_madd(t2_zwxy, t01_yxwz, cof3); + cof3 = simd_nmsub(t2_zwxy, t01_wzyx, cof3); + + const simd128_t t03 = simd_mul(t0, t3); + const simd128_t t03_yxwz = simd_swiz_yxwz(t03); + const simd128_t t03_wzyx = simd_swiz_wzyx(t03); + + cof1 = simd_nmsub(t2_zwxy, t03_yxwz, cof1); + cof1 = simd_madd(t2_zwxy, t03_wzyx, cof1); + + cof2 = simd_madd(t1, t03_yxwz, cof2); + cof2 = simd_nmsub(t1, t03_wzyx, cof2); + + const simd128_t t02 = simd_mul(t0, t2_zwxy); + const simd128_t t02_yxwz = simd_swiz_yxwz(t02); + const simd128_t t02_wzyx = simd_swiz_wzyx(t02); + + cof1 = simd_madd(t3, t02_yxwz, cof1); + cof1 = simd_nmsub(t3, t02_wzyx, cof1); + + cof3 = simd_nmsub(t1, t02_yxwz, cof3); + cof3 = simd_madd(t1, t02_wzyx, cof3); + + const simd128_t det = simd_dot(t0, cof0); + const simd128_t invdet = simd_rcp(det); + + _result->col[0] = simd_mul(cof0, invdet); + _result->col[1] = simd_mul(cof1, invdet); + _result->col[2] = simd_mul(cof2, invdet); + _result->col[3] = simd_mul(cof3, invdet); + } + +} // namespace bx diff --git a/3rdparty/bx/include/bx/inline/fpumath.inl b/3rdparty/bx/include/bx/inline/fpumath.inl deleted file mode 100644 index e87b827..0000000 --- a/3rdparty/bx/include/bx/inline/fpumath.inl +++ /dev/null @@ -1,1352 +0,0 @@ -/* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -// FPU math lib - -#ifndef BX_FPU_MATH_H_HEADER_GUARD -# error "Must be included from bx/fpumath.h!" -#endif // BX_FPU_MATH_H_HEADER_GUARD - -namespace bx -{ - inline float toRad(float _deg) - { - return _deg * pi / 180.0f; - } - - inline float toDeg(float _rad) - { - return _rad * 180.0f / pi; - } - - inline uint32_t floatToBits(float _a) - { - union { float f; uint32_t ui; } u = { _a }; - return u.ui; - } - - inline float bitsToFloat(uint32_t _a) - { - union { uint32_t ui; float f; } u = { _a }; - return u.f; - } - - inline uint64_t doubleToBits(double _a) - { - union { double f; uint64_t ui; } u = { _a }; - return u.ui; - } - - inline double bitsToDouble(uint64_t _a) - { - union { uint64_t ui; double f; } u = { _a }; - return u.f; - } - - inline bool isNan(float _f) - { - const uint32_t tmp = floatToBits(_f) & INT32_MAX; - return tmp > UINT32_C(0x7f800000); - } - - inline bool isNan(double _f) - { - const uint64_t tmp = doubleToBits(_f) & INT64_MAX; - return tmp > UINT64_C(0x7ff0000000000000); - } - - inline bool isFinite(float _f) - { - const uint32_t tmp = floatToBits(_f) & INT32_MAX; - return tmp < UINT32_C(0x7f800000); - } - - inline bool isFinite(double _f) - { - const uint64_t tmp = doubleToBits(_f) & INT64_MAX; - return tmp < UINT64_C(0x7ff0000000000000); - } - - inline bool isInfinite(float _f) - { - const uint32_t tmp = floatToBits(_f) & INT32_MAX; - return tmp == UINT32_C(0x7f800000); - } - - inline bool isInfinite(double _f) - { - const uint64_t tmp = doubleToBits(_f) & INT64_MAX; - return tmp == UINT64_C(0x7ff0000000000000); - } - - inline float fround(float _f) - { - return ffloor(_f + 0.5f); - } - - inline float fmin(float _a, float _b) - { - return _a < _b ? _a : _b; - } - - inline float fmax(float _a, float _b) - { - return _a > _b ? _a : _b; - } - - inline float fmin3(float _a, float _b, float _c) - { - return fmin(_a, fmin(_b, _c) ); - } - - inline float fmax3(float _a, float _b, float _c) - { - return fmax(_a, fmax(_b, _c) ); - } - - inline float fclamp(float _a, float _min, float _max) - { - return fmin(fmax(_a, _min), _max); - } - - inline float fsaturate(float _a) - { - return fclamp(_a, 0.0f, 1.0f); - } - - inline float flerp(float _a, float _b, float _t) - { - return _a + (_b - _a) * _t; - } - - inline float fsign(float _a) - { - return _a < 0.0f ? -1.0f : 1.0f; - } - - inline float fsq(float _a) - { - return _a * _a; - } - - inline float fexp2(float _a) - { - return fpow(2.0f, _a); - } - - inline float flog2(float _a) - { - return flog(_a) * 1.442695041f; - } - - inline float frsqrt(float _a) - { - return 1.0f/fsqrt(_a); - } - - inline float ffract(float _a) - { - return _a - ffloor(_a); - } - - inline bool fequal(float _a, float _b, float _epsilon) - { - // http://realtimecollisiondetection.net/blog/?p=89 - const float lhs = fabsolute(_a - _b); - const float rhs = _epsilon * fmax3(1.0f, fabsolute(_a), fabsolute(_b) ); - return lhs <= rhs; - } - - inline bool fequal(const float* _a, const float* _b, uint32_t _num, float _epsilon) - { - bool equal = fequal(_a[0], _b[0], _epsilon); - for (uint32_t ii = 1; equal && ii < _num; ++ii) - { - equal = fequal(_a[ii], _b[ii], _epsilon); - } - return equal; - } - - inline float fwrap(float _a, float _wrap) - { - const float mod = fmod(_a, _wrap); - const float result = mod < 0.0f ? _wrap + mod : mod; - return result; - } - - inline float fstep(float _edge, float _a) - { - return _a < _edge ? 0.0f : 1.0f; - } - - inline float fpulse(float _a, float _start, float _end) - { - return fstep(_a, _start) - fstep(_a, _end); - } - - inline float fsmoothstep(float _a) - { - return fsq(_a)*(3.0f - 2.0f*_a); - } - - inline float fbias(float _time, float _bias) - { - return _time / ( ( (1.0f/_bias - 2.0f)*(1.0f - _time) ) + 1.0f); - } - - inline float fgain(float _time, float _gain) - { - if (_time < 0.5f) - { - return fbias(_time * 2.0f, _gain) * 0.5f; - } - - return fbias(_time * 2.0f - 1.0f, 1.0f - _gain) * 0.5f + 0.5f; - } - - inline void vec3Move(float* _result, const float* _a) - { - _result[0] = _a[0]; - _result[1] = _a[1]; - _result[2] = _a[2]; - } - - inline void vec3Abs(float* _result, const float* _a) - { - _result[0] = fabsolute(_a[0]); - _result[1] = fabsolute(_a[1]); - _result[2] = fabsolute(_a[2]); - } - - inline void vec3Neg(float* _result, const float* _a) - { - _result[0] = -_a[0]; - _result[1] = -_a[1]; - _result[2] = -_a[2]; - } - - inline void vec3Add(float* _result, const float* _a, const float* _b) - { - _result[0] = _a[0] + _b[0]; - _result[1] = _a[1] + _b[1]; - _result[2] = _a[2] + _b[2]; - } - - inline void vec3Add(float* _result, const float* _a, float _b) - { - _result[0] = _a[0] + _b; - _result[1] = _a[1] + _b; - _result[2] = _a[2] + _b; - } - - inline void vec3Sub(float* _result, const float* _a, const float* _b) - { - _result[0] = _a[0] - _b[0]; - _result[1] = _a[1] - _b[1]; - _result[2] = _a[2] - _b[2]; - } - - inline void vec3Sub(float* _result, const float* _a, float _b) - { - _result[0] = _a[0] - _b; - _result[1] = _a[1] - _b; - _result[2] = _a[2] - _b; - } - - inline void vec3Mul(float* _result, const float* _a, const float* _b) - { - _result[0] = _a[0] * _b[0]; - _result[1] = _a[1] * _b[1]; - _result[2] = _a[2] * _b[2]; - } - - inline void vec3Mul(float* _result, const float* _a, float _b) - { - _result[0] = _a[0] * _b; - _result[1] = _a[1] * _b; - _result[2] = _a[2] * _b; - } - - inline float vec3Dot(const float* _a, const float* _b) - { - return _a[0]*_b[0] + _a[1]*_b[1] + _a[2]*_b[2]; - } - - inline void vec3Cross(float* _result, const float* _a, const float* _b) - { - _result[0] = _a[1]*_b[2] - _a[2]*_b[1]; - _result[1] = _a[2]*_b[0] - _a[0]*_b[2]; - _result[2] = _a[0]*_b[1] - _a[1]*_b[0]; - } - - inline float vec3Length(const float* _a) - { - return fsqrt(vec3Dot(_a, _a) ); - } - - inline void vec3Lerp(float* _result, const float* _a, const float* _b, float _t) - { - _result[0] = flerp(_a[0], _b[0], _t); - _result[1] = flerp(_a[1], _b[1], _t); - _result[2] = flerp(_a[2], _b[2], _t); - } - - inline void vec3Lerp(float* _result, const float* _a, const float* _b, const float* _c) - { - _result[0] = flerp(_a[0], _b[0], _c[0]); - _result[1] = flerp(_a[1], _b[1], _c[1]); - _result[2] = flerp(_a[2], _b[2], _c[2]); - } - - inline float vec3Norm(float* _result, const float* _a) - { - const float len = vec3Length(_a); - const float invLen = 1.0f/len; - _result[0] = _a[0] * invLen; - _result[1] = _a[1] * invLen; - _result[2] = _a[2] * invLen; - return len; - } - - inline void vec3Min(float* _result, const float* _a, const float* _b) - { - _result[0] = fmin(_a[0], _b[0]); - _result[1] = fmin(_a[1], _b[1]); - _result[2] = fmin(_a[2], _b[2]); - } - - inline void vec3Max(float* _result, const float* _a, const float* _b) - { - _result[0] = fmax(_a[0], _b[0]); - _result[1] = fmax(_a[1], _b[1]); - _result[2] = fmax(_a[2], _b[2]); - } - - inline void vec3Rcp(float* _result, const float* _a) - { - _result[0] = 1.0f / _a[0]; - _result[1] = 1.0f / _a[1]; - _result[2] = 1.0f / _a[2]; - } - - inline void vec3TangentFrame(const float* _n, float* _t, float* _b) - { - const float nx = _n[0]; - const float ny = _n[1]; - const float nz = _n[2]; - - if (bx::fabsolute(nx) > bx::fabsolute(nz) ) - { - float invLen = 1.0f / bx::fsqrt(nx*nx + nz*nz); - _t[0] = -nz * invLen; - _t[1] = 0.0f; - _t[2] = nx * invLen; - } - else - { - float invLen = 1.0f / bx::fsqrt(ny*ny + nz*nz); - _t[0] = 0.0f; - _t[1] = nz * invLen; - _t[2] = -ny * invLen; - } - - bx::vec3Cross(_b, _n, _t); - } - - inline void vec3TangentFrame(const float* _n, float* _t, float* _b, float _angle) - { - vec3TangentFrame(_n, _t, _b); - - const float sa = fsin(_angle); - const float ca = fcos(_angle); - - _t[0] = -sa * _b[0] + ca * _t[0]; - _t[1] = -sa * _b[1] + ca * _t[1]; - _t[2] = -sa * _b[2] + ca * _t[2]; - - bx::vec3Cross(_b, _n, _t); - } - - inline void quatIdentity(float* _result) - { - _result[0] = 0.0f; - _result[1] = 0.0f; - _result[2] = 0.0f; - _result[3] = 1.0f; - } - - inline void quatMove(float* _result, const float* _a) - { - _result[0] = _a[0]; - _result[1] = _a[1]; - _result[2] = _a[2]; - _result[3] = _a[3]; - } - - inline void quatMulXYZ(float* _result, const float* _qa, const float* _qb) - { - const float ax = _qa[0]; - const float ay = _qa[1]; - const float az = _qa[2]; - const float aw = _qa[3]; - - const float bx = _qb[0]; - const float by = _qb[1]; - const float bz = _qb[2]; - const float bw = _qb[3]; - - _result[0] = aw * bx + ax * bw + ay * bz - az * by; - _result[1] = aw * by - ax * bz + ay * bw + az * bx; - _result[2] = aw * bz + ax * by - ay * bx + az * bw; - } - - inline void quatMul(float* _result, const float* _qa, const float* _qb) - { - const float ax = _qa[0]; - const float ay = _qa[1]; - const float az = _qa[2]; - const float aw = _qa[3]; - - const float bx = _qb[0]; - const float by = _qb[1]; - const float bz = _qb[2]; - const float bw = _qb[3]; - - _result[0] = aw * bx + ax * bw + ay * bz - az * by; - _result[1] = aw * by - ax * bz + ay * bw + az * bx; - _result[2] = aw * bz + ax * by - ay * bx + az * bw; - _result[3] = aw * bw - ax * bx - ay * by - az * bz; - } - - inline void quatInvert(float* _result, const float* _quat) - { - _result[0] = -_quat[0]; - _result[1] = -_quat[1]; - _result[2] = -_quat[2]; - _result[3] = _quat[3]; - } - - inline float quatDot(const float* _a, const float* _b) - { - return _a[0]*_b[0] - + _a[1]*_b[1] - + _a[2]*_b[2] - + _a[3]*_b[3] - ; - } - - inline void quatNorm(float* _result, const float* _quat) - { - const float norm = quatDot(_quat, _quat); - if (0.0f < norm) - { - const float invNorm = 1.0f / fsqrt(norm); - _result[0] = _quat[0] * invNorm; - _result[1] = _quat[1] * invNorm; - _result[2] = _quat[2] * invNorm; - _result[3] = _quat[3] * invNorm; - } - else - { - quatIdentity(_result); - } - } - - inline void quatToEuler(float* _result, const float* _quat) - { - const float x = _quat[0]; - const float y = _quat[1]; - const float z = _quat[2]; - const float w = _quat[3]; - - const float yy = y * y; - const float zz = z * z; - - const float xx = x * x; - _result[0] = fatan2(2.0f * (x * w - y * z), 1.0f - 2.0f * (xx + zz) ); - _result[1] = fatan2(2.0f * (y * w + x * z), 1.0f - 2.0f * (yy + zz) ); - _result[2] = fasin (2.0f * (x * y + z * w) ); - } - - inline void quatRotateAxis(float* _result, const float* _axis, float _angle) - { - const float ha = _angle * 0.5f; - const float ca = fcos(ha); - const float sa = fsin(ha); - _result[0] = _axis[0] * sa; - _result[1] = _axis[1] * sa; - _result[2] = _axis[2] * sa; - _result[3] = ca; - } - - inline void quatRotateX(float* _result, float _ax) - { - const float hx = _ax * 0.5f; - const float cx = fcos(hx); - const float sx = fsin(hx); - _result[0] = sx; - _result[1] = 0.0f; - _result[2] = 0.0f; - _result[3] = cx; - } - - inline void quatRotateY(float* _result, float _ay) - { - const float hy = _ay * 0.5f; - const float cy = fcos(hy); - const float sy = fsin(hy); - _result[0] = 0.0f; - _result[1] = sy; - _result[2] = 0.0f; - _result[3] = cy; - } - - inline void quatRotateZ(float* _result, float _az) - { - const float hz = _az * 0.5f; - const float cz = fcos(hz); - const float sz = fsin(hz); - _result[0] = 0.0f; - _result[1] = 0.0f; - _result[2] = sz; - _result[3] = cz; - } - - inline void vec3MulQuat(float* _result, const float* _vec, const float* _quat) - { - float tmp0[4]; - quatInvert(tmp0, _quat); - - float qv[4]; - qv[0] = _vec[0]; - qv[1] = _vec[1]; - qv[2] = _vec[2]; - qv[3] = 0.0f; - - float tmp1[4]; - quatMul(tmp1, tmp0, qv); - - quatMulXYZ(_result, tmp1, _quat); - } - - inline void mtxIdentity(float* _result) - { - memSet(_result, 0, sizeof(float)*16); - _result[0] = _result[5] = _result[10] = _result[15] = 1.0f; - } - - inline void mtxTranslate(float* _result, float _tx, float _ty, float _tz) - { - mtxIdentity(_result); - _result[12] = _tx; - _result[13] = _ty; - _result[14] = _tz; - } - - inline void mtxScale(float* _result, float _sx, float _sy, float _sz) - { - memSet(_result, 0, sizeof(float) * 16); - _result[0] = _sx; - _result[5] = _sy; - _result[10] = _sz; - _result[15] = 1.0f; - } - - inline void mtxScale(float* _result, float _scale) - { - mtxScale(_result, _scale, _scale, _scale); - } - - inline void mtxFromNormal(float* _result, const float* _normal, float _scale, const float* _pos) - { - float tangent[3]; - float bitangent[3]; - vec3TangentFrame(_normal, tangent, bitangent); - - vec3Mul(&_result[ 0], bitangent, _scale); - vec3Mul(&_result[ 4], _normal, _scale); - vec3Mul(&_result[ 8], tangent, _scale); - - _result[ 3] = 0.0f; - _result[ 7] = 0.0f; - _result[11] = 0.0f; - _result[12] = _pos[0]; - _result[13] = _pos[1]; - _result[14] = _pos[2]; - _result[15] = 1.0f; - } - - inline void mtxFromNormal(float* _result, const float* _normal, float _scale, const float* _pos, float _angle) - { - float tangent[3]; - float bitangent[3]; - vec3TangentFrame(_normal, tangent, bitangent, _angle); - - vec3Mul(&_result[ 0], bitangent, _scale); - vec3Mul(&_result[ 4], _normal, _scale); - vec3Mul(&_result[ 8], tangent, _scale); - - _result[ 3] = 0.0f; - _result[ 7] = 0.0f; - _result[11] = 0.0f; - _result[12] = _pos[0]; - _result[13] = _pos[1]; - _result[14] = _pos[2]; - _result[15] = 1.0f; - } - - inline void mtxQuat(float* _result, const float* _quat) - { - const float x = _quat[0]; - const float y = _quat[1]; - const float z = _quat[2]; - const float w = _quat[3]; - - const float x2 = x + x; - const float y2 = y + y; - const float z2 = z + z; - const float x2x = x2 * x; - const float x2y = x2 * y; - const float x2z = x2 * z; - const float x2w = x2 * w; - const float y2y = y2 * y; - const float y2z = y2 * z; - const float y2w = y2 * w; - const float z2z = z2 * z; - const float z2w = z2 * w; - - _result[ 0] = 1.0f - (y2y + z2z); - _result[ 1] = x2y - z2w; - _result[ 2] = x2z + y2w; - _result[ 3] = 0.0f; - - _result[ 4] = x2y + z2w; - _result[ 5] = 1.0f - (x2x + z2z); - _result[ 6] = y2z - x2w; - _result[ 7] = 0.0f; - - _result[ 8] = x2z - y2w; - _result[ 9] = y2z + x2w; - _result[10] = 1.0f - (x2x + y2y); - _result[11] = 0.0f; - - _result[12] = 0.0f; - _result[13] = 0.0f; - _result[14] = 0.0f; - _result[15] = 1.0f; - } - - inline void mtxQuatTranslation(float* _result, const float* _quat, const float* _translation) - { - mtxQuat(_result, _quat); - _result[12] = -(_result[0]*_translation[0] + _result[4]*_translation[1] + _result[ 8]*_translation[2]); - _result[13] = -(_result[1]*_translation[0] + _result[5]*_translation[1] + _result[ 9]*_translation[2]); - _result[14] = -(_result[2]*_translation[0] + _result[6]*_translation[1] + _result[10]*_translation[2]); - } - - inline void mtxQuatTranslationHMD(float* _result, const float* _quat, const float* _translation) - { - float quat[4]; - quat[0] = -_quat[0]; - quat[1] = -_quat[1]; - quat[2] = _quat[2]; - quat[3] = _quat[3]; - mtxQuatTranslation(_result, quat, _translation); - } - - inline void mtxLookAt_Impl(float* _result, const float* _eye, const float* _view, const float* _up) - { - float up[3] = { 0.0f, 1.0f, 0.0f }; - if (NULL != _up) - { - up[0] = _up[0]; - up[1] = _up[1]; - up[2] = _up[2]; - } - - float tmp[4]; - vec3Cross(tmp, up, _view); - - float right[4]; - vec3Norm(right, tmp); - - vec3Cross(up, _view, right); - - memSet(_result, 0, sizeof(float)*16); - _result[ 0] = right[0]; - _result[ 1] = up[0]; - _result[ 2] = _view[0]; - - _result[ 4] = right[1]; - _result[ 5] = up[1]; - _result[ 6] = _view[1]; - - _result[ 8] = right[2]; - _result[ 9] = up[2]; - _result[10] = _view[2]; - - _result[12] = -vec3Dot(right, _eye); - _result[13] = -vec3Dot(up, _eye); - _result[14] = -vec3Dot(_view, _eye); - _result[15] = 1.0f; - } - - inline void mtxLookAtLh(float* _result, const float* _eye, const float* _at, const float* _up) - { - float tmp[4]; - vec3Sub(tmp, _at, _eye); - - float view[4]; - vec3Norm(view, tmp); - - mtxLookAt_Impl(_result, _eye, view, _up); - } - - inline void mtxLookAtRh(float* _result, const float* _eye, const float* _at, const float* _up) - { - float tmp[4]; - vec3Sub(tmp, _eye, _at); - - float view[4]; - vec3Norm(view, tmp); - - mtxLookAt_Impl(_result, _eye, view, _up); - } - - inline void mtxLookAt(float* _result, const float* _eye, const float* _at, const float* _up) - { - mtxLookAtLh(_result, _eye, _at, _up); - } - - template - inline void mtxProjXYWH(float* _result, float _x, float _y, float _width, float _height, float _near, float _far, bool _oglNdc) - { - const float diff = _far-_near; - const float aa = _oglNdc ? (_far+_near)/diff : _far/diff; - const float bb = _oglNdc ? (2.0f*_far*_near)/diff : _near*aa; - - memSet(_result, 0, sizeof(float)*16); - _result[ 0] = _width; - _result[ 5] = _height; - _result[ 8] = (Handness::Right == HandnessT) ? _x : -_x; - _result[ 9] = (Handness::Right == HandnessT) ? _y : -_y; - _result[10] = (Handness::Right == HandnessT) ? -aa : aa; - _result[11] = (Handness::Right == HandnessT) ? -1.0f : 1.0f; - _result[14] = -bb; - } - - template - inline void mtxProj_impl(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc) - { - const float invDiffRl = 1.0f/(_rt - _lt); - const float invDiffUd = 1.0f/(_ut - _dt); - const float width = 2.0f*_near * invDiffRl; - const float height = 2.0f*_near * invDiffUd; - const float xx = (_rt + _lt) * invDiffRl; - const float yy = (_ut + _dt) * invDiffUd; - mtxProjXYWH(_result, xx, yy, width, height, _near, _far, _oglNdc); - } - - template - inline void mtxProj_impl(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc) - { - mtxProj_impl(_result, _fov[0], _fov[1], _fov[2], _fov[3], _near, _far, _oglNdc); - } - - template - inline void mtxProj_impl(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc) - { - const float height = 1.0f/ftan(toRad(_fovy)*0.5f); - const float width = height * 1.0f/_aspect; - mtxProjXYWH(_result, 0.0f, 0.0f, width, height, _near, _far, _oglNdc); - } - - inline void mtxProj(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc) - { - mtxProj_impl(_result, _ut, _dt, _lt, _rt, _near, _far, _oglNdc); - } - - inline void mtxProj(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc) - { - mtxProj_impl(_result, _fov, _near, _far, _oglNdc); - } - - inline void mtxProj(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc) - { - mtxProj_impl(_result, _fovy, _aspect, _near, _far, _oglNdc); - } - - inline void mtxProjLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc) - { - mtxProj_impl(_result, _ut, _dt, _lt, _rt, _near, _far, _oglNdc); - } - - inline void mtxProjLh(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc) - { - mtxProj_impl(_result, _fov, _near, _far, _oglNdc); - } - - inline void mtxProjLh(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc) - { - mtxProj_impl(_result, _fovy, _aspect, _near, _far, _oglNdc); - } - - inline void mtxProjRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc) - { - mtxProj_impl(_result, _ut, _dt, _lt, _rt, _near, _far, _oglNdc); - } - - inline void mtxProjRh(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc) - { - mtxProj_impl(_result, _fov, _near, _far, _oglNdc); - } - - inline void mtxProjRh(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc) - { - mtxProj_impl(_result, _fovy, _aspect, _near, _far, _oglNdc); - } - - template - inline void mtxProjInfXYWH(float* _result, float _x, float _y, float _width, float _height, float _near, bool _oglNdc) - { - float aa; - float bb; - if (BX_ENABLED(NearFar::Reverse == NearFarT) ) - { - aa = _oglNdc ? -1.0f : 0.0f; - bb = _oglNdc ? -2.0f*_near : -_near; - } - else - { - aa = 1.0f; - bb = _oglNdc ? 2.0f*_near : _near; - } - - memSet(_result, 0, sizeof(float)*16); - _result[ 0] = _width; - _result[ 5] = _height; - _result[ 8] = (Handness::Right == HandnessT) ? _x : -_x; - _result[ 9] = (Handness::Right == HandnessT) ? _y : -_y; - _result[10] = (Handness::Right == HandnessT) ? -aa : aa; - _result[11] = (Handness::Right == HandnessT) ? -1.0f : 1.0f; - _result[14] = -bb; - } - - template - inline void mtxProjInf_impl(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) - { - const float invDiffRl = 1.0f/(_rt - _lt); - const float invDiffUd = 1.0f/(_ut - _dt); - const float width = 2.0f*_near * invDiffRl; - const float height = 2.0f*_near * invDiffUd; - const float xx = (_rt + _lt) * invDiffRl; - const float yy = (_ut + _dt) * invDiffUd; - mtxProjInfXYWH(_result, xx, yy, width, height, _near, _oglNdc); - } - - template - inline void mtxProjInf_impl(float* _result, const float _fov[4], float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fov[0], _fov[1], _fov[2], _fov[3], _near, _oglNdc); - } - - template - inline void mtxProjInf_impl(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) - { - const float height = 1.0f/ftan(toRad(_fovy)*0.5f); - const float width = height * 1.0f/_aspect; - mtxProjInfXYWH(_result, 0.0f, 0.0f, width, height, _near, _oglNdc); - } - - inline void mtxProjInf(float* _result, const float _fov[4], float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fov, _near, _oglNdc); - } - - inline void mtxProjInf(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _ut, _dt, _lt, _rt, _near, _oglNdc); - } - - inline void mtxProjInf(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fovy, _aspect, _near, _oglNdc); - } - - inline void mtxProjInfLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _ut, _dt, _lt, _rt, _near, _oglNdc); - } - - inline void mtxProjInfLh(float* _result, const float _fov[4], float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fov, _near, _oglNdc); - } - - inline void mtxProjInfLh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fovy, _aspect, _near, _oglNdc); - } - - inline void mtxProjInfRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _ut, _dt, _lt, _rt, _near, _oglNdc); - } - - inline void mtxProjInfRh(float* _result, const float _fov[4], float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fov, _near, _oglNdc); - } - - inline void mtxProjInfRh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fovy, _aspect, _near, _oglNdc); - } - - inline void mtxProjRevInfLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _ut, _dt, _lt, _rt, _near, _oglNdc); - } - - inline void mtxProjRevInfLh(float* _result, const float _fov[4], float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fov, _near, _oglNdc); - } - - inline void mtxProjRevInfLh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fovy, _aspect, _near, _oglNdc); - } - - inline void mtxProjRevInfRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _ut, _dt, _lt, _rt, _near, _oglNdc); - } - - inline void mtxProjRevInfRh(float* _result, const float _fov[4], float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fov, _near, _oglNdc); - } - - inline void mtxProjRevInfRh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) - { - mtxProjInf_impl(_result, _fovy, _aspect, _near, _oglNdc); - } - - template - inline void mtxOrtho_impl(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc) - { - const float aa = 2.0f/(_right - _left); - const float bb = 2.0f/(_top - _bottom); - const float cc = (_oglNdc ? 2.0f : 1.0f) / (_far - _near); - const float dd = (_left + _right)/(_left - _right); - const float ee = (_top + _bottom)/(_bottom - _top); - const float ff = _oglNdc ? (_near + _far)/(_near - _far) : _near/(_near - _far); - - memSet(_result, 0, sizeof(float)*16); - _result[ 0] = aa; - _result[ 5] = bb; - _result[10] = (Handness::Right == HandnessT) ? -cc : cc; - _result[12] = dd + _offset; - _result[13] = ee; - _result[14] = ff; - _result[15] = 1.0f; - } - - inline void mtxOrtho(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc) - { - mtxOrtho_impl(_result, _left, _right, _bottom, _top, _near, _far, _offset, _oglNdc); - } - - inline void mtxOrthoLh(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc) - { - mtxOrtho_impl(_result, _left, _right, _bottom, _top, _near, _far, _offset, _oglNdc); - } - - inline void mtxOrthoRh(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc) - { - mtxOrtho_impl(_result, _left, _right, _bottom, _top, _near, _far, _offset, _oglNdc); - } - - inline void mtxRotateX(float* _result, float _ax) - { - const float sx = fsin(_ax); - const float cx = fcos(_ax); - - memSet(_result, 0, sizeof(float)*16); - _result[ 0] = 1.0f; - _result[ 5] = cx; - _result[ 6] = -sx; - _result[ 9] = sx; - _result[10] = cx; - _result[15] = 1.0f; - } - - inline void mtxRotateY(float* _result, float _ay) - { - const float sy = fsin(_ay); - const float cy = fcos(_ay); - - memSet(_result, 0, sizeof(float)*16); - _result[ 0] = cy; - _result[ 2] = sy; - _result[ 5] = 1.0f; - _result[ 8] = -sy; - _result[10] = cy; - _result[15] = 1.0f; - } - - inline void mtxRotateZ(float* _result, float _az) - { - const float sz = fsin(_az); - const float cz = fcos(_az); - - memSet(_result, 0, sizeof(float)*16); - _result[ 0] = cz; - _result[ 1] = -sz; - _result[ 4] = sz; - _result[ 5] = cz; - _result[10] = 1.0f; - _result[15] = 1.0f; - } - - inline void mtxRotateXY(float* _result, float _ax, float _ay) - { - const float sx = fsin(_ax); - const float cx = fcos(_ax); - const float sy = fsin(_ay); - const float cy = fcos(_ay); - - memSet(_result, 0, sizeof(float)*16); - _result[ 0] = cy; - _result[ 2] = sy; - _result[ 4] = sx*sy; - _result[ 5] = cx; - _result[ 6] = -sx*cy; - _result[ 8] = -cx*sy; - _result[ 9] = sx; - _result[10] = cx*cy; - _result[15] = 1.0f; - } - - inline void mtxRotateXYZ(float* _result, float _ax, float _ay, float _az) - { - const float sx = fsin(_ax); - const float cx = fcos(_ax); - const float sy = fsin(_ay); - const float cy = fcos(_ay); - const float sz = fsin(_az); - const float cz = fcos(_az); - - memSet(_result, 0, sizeof(float)*16); - _result[ 0] = cy*cz; - _result[ 1] = -cy*sz; - _result[ 2] = sy; - _result[ 4] = cz*sx*sy + cx*sz; - _result[ 5] = cx*cz - sx*sy*sz; - _result[ 6] = -cy*sx; - _result[ 8] = -cx*cz*sy + sx*sz; - _result[ 9] = cz*sx + cx*sy*sz; - _result[10] = cx*cy; - _result[15] = 1.0f; - } - - inline void mtxRotateZYX(float* _result, float _ax, float _ay, float _az) - { - const float sx = fsin(_ax); - const float cx = fcos(_ax); - const float sy = fsin(_ay); - const float cy = fcos(_ay); - const float sz = fsin(_az); - const float cz = fcos(_az); - - memSet(_result, 0, sizeof(float)*16); - _result[ 0] = cy*cz; - _result[ 1] = cz*sx*sy-cx*sz; - _result[ 2] = cx*cz*sy+sx*sz; - _result[ 4] = cy*sz; - _result[ 5] = cx*cz + sx*sy*sz; - _result[ 6] = -cz*sx + cx*sy*sz; - _result[ 8] = -sy; - _result[ 9] = cy*sx; - _result[10] = cx*cy; - _result[15] = 1.0f; - }; - - inline void mtxSRT(float* _result, float _sx, float _sy, float _sz, float _ax, float _ay, float _az, float _tx, float _ty, float _tz) - { - const float sx = fsin(_ax); - const float cx = fcos(_ax); - const float sy = fsin(_ay); - const float cy = fcos(_ay); - const float sz = fsin(_az); - const float cz = fcos(_az); - - const float sxsz = sx*sz; - const float cycz = cy*cz; - - _result[ 0] = _sx * (cycz - sxsz*sy); - _result[ 1] = _sx * -cx*sz; - _result[ 2] = _sx * (cz*sy + cy*sxsz); - _result[ 3] = 0.0f; - - _result[ 4] = _sy * (cz*sx*sy + cy*sz); - _result[ 5] = _sy * cx*cz; - _result[ 6] = _sy * (sy*sz -cycz*sx); - _result[ 7] = 0.0f; - - _result[ 8] = _sz * -cx*sy; - _result[ 9] = _sz * sx; - _result[10] = _sz * cx*cy; - _result[11] = 0.0f; - - _result[12] = _tx; - _result[13] = _ty; - _result[14] = _tz; - _result[15] = 1.0f; - } - - inline void vec3MulMtx(float* _result, const float* _vec, const float* _mat) - { - _result[0] = _vec[0] * _mat[ 0] + _vec[1] * _mat[4] + _vec[2] * _mat[ 8] + _mat[12]; - _result[1] = _vec[0] * _mat[ 1] + _vec[1] * _mat[5] + _vec[2] * _mat[ 9] + _mat[13]; - _result[2] = _vec[0] * _mat[ 2] + _vec[1] * _mat[6] + _vec[2] * _mat[10] + _mat[14]; - } - - inline void vec3MulMtxH(float* _result, const float* _vec, const float* _mat) - { - float xx = _vec[0] * _mat[ 0] + _vec[1] * _mat[4] + _vec[2] * _mat[ 8] + _mat[12]; - float yy = _vec[0] * _mat[ 1] + _vec[1] * _mat[5] + _vec[2] * _mat[ 9] + _mat[13]; - float zz = _vec[0] * _mat[ 2] + _vec[1] * _mat[6] + _vec[2] * _mat[10] + _mat[14]; - float ww = _vec[0] * _mat[ 3] + _vec[1] * _mat[7] + _vec[2] * _mat[11] + _mat[15]; - float invW = fsign(ww)/ww; - _result[0] = xx*invW; - _result[1] = yy*invW; - _result[2] = zz*invW; - } - - inline void vec4MulMtx(float* _result, const float* _vec, const float* _mat) - { - _result[0] = _vec[0] * _mat[ 0] + _vec[1] * _mat[4] + _vec[2] * _mat[ 8] + _vec[3] * _mat[12]; - _result[1] = _vec[0] * _mat[ 1] + _vec[1] * _mat[5] + _vec[2] * _mat[ 9] + _vec[3] * _mat[13]; - _result[2] = _vec[0] * _mat[ 2] + _vec[1] * _mat[6] + _vec[2] * _mat[10] + _vec[3] * _mat[14]; - _result[3] = _vec[0] * _mat[ 3] + _vec[1] * _mat[7] + _vec[2] * _mat[11] + _vec[3] * _mat[15]; - } - - inline void mtxMul(float* _result, const float* _a, const float* _b) - { - vec4MulMtx(&_result[ 0], &_a[ 0], _b); - vec4MulMtx(&_result[ 4], &_a[ 4], _b); - vec4MulMtx(&_result[ 8], &_a[ 8], _b); - vec4MulMtx(&_result[12], &_a[12], _b); - } - - inline void mtxTranspose(float* _result, const float* _a) - { - _result[ 0] = _a[ 0]; - _result[ 4] = _a[ 1]; - _result[ 8] = _a[ 2]; - _result[12] = _a[ 3]; - _result[ 1] = _a[ 4]; - _result[ 5] = _a[ 5]; - _result[ 9] = _a[ 6]; - _result[13] = _a[ 7]; - _result[ 2] = _a[ 8]; - _result[ 6] = _a[ 9]; - _result[10] = _a[10]; - _result[14] = _a[11]; - _result[ 3] = _a[12]; - _result[ 7] = _a[13]; - _result[11] = _a[14]; - _result[15] = _a[15]; - } - - /// Convert LH to RH projection matrix and vice versa. - inline void mtxProjFlipHandedness(float* _dst, const float* _src) - { - _dst[ 0] = -_src[ 0]; - _dst[ 1] = -_src[ 1]; - _dst[ 2] = -_src[ 2]; - _dst[ 3] = -_src[ 3]; - _dst[ 4] = _src[ 4]; - _dst[ 5] = _src[ 5]; - _dst[ 6] = _src[ 6]; - _dst[ 7] = _src[ 7]; - _dst[ 8] = -_src[ 8]; - _dst[ 9] = -_src[ 9]; - _dst[10] = -_src[10]; - _dst[11] = -_src[11]; - _dst[12] = _src[12]; - _dst[13] = _src[13]; - _dst[14] = _src[14]; - _dst[15] = _src[15]; - } - - /// Convert LH to RH view matrix and vice versa. - inline void mtxViewFlipHandedness(float* _dst, const float* _src) - { - _dst[ 0] = -_src[ 0]; - _dst[ 1] = _src[ 1]; - _dst[ 2] = -_src[ 2]; - _dst[ 3] = _src[ 3]; - _dst[ 4] = -_src[ 4]; - _dst[ 5] = _src[ 5]; - _dst[ 6] = -_src[ 6]; - _dst[ 7] = _src[ 7]; - _dst[ 8] = -_src[ 8]; - _dst[ 9] = _src[ 9]; - _dst[10] = -_src[10]; - _dst[11] = _src[11]; - _dst[12] = -_src[12]; - _dst[13] = _src[13]; - _dst[14] = -_src[14]; - _dst[15] = _src[15]; - } - - inline void calcNormal(float _result[3], float _va[3], float _vb[3], float _vc[3]) - { - float ba[3]; - vec3Sub(ba, _vb, _va); - - float ca[3]; - vec3Sub(ca, _vc, _va); - - float baxca[3]; - vec3Cross(baxca, ba, ca); - - vec3Norm(_result, baxca); - } - - inline void calcPlane(float _result[4], float _va[3], float _vb[3], float _vc[3]) - { - float normal[3]; - calcNormal(normal, _va, _vb, _vc); - - _result[0] = normal[0]; - _result[1] = normal[1]; - _result[2] = normal[2]; - _result[3] = -vec3Dot(normal, _va); - } - - inline void calcLinearFit2D(float _result[2], const void* _points, uint32_t _stride, uint32_t _numPoints) - { - float sumX = 0.0f; - float sumY = 0.0f; - float sumXX = 0.0f; - float sumXY = 0.0f; - - const uint8_t* ptr = (const uint8_t*)_points; - for (uint32_t ii = 0; ii < _numPoints; ++ii, ptr += _stride) - { - const float* point = (const float*)ptr; - float xx = point[0]; - float yy = point[1]; - sumX += xx; - sumY += yy; - sumXX += xx*xx; - sumXY += xx*yy; - } - - // [ sum(x^2) sum(x) ] [ A ] = [ sum(x*y) ] - // [ sum(x) numPoints ] [ B ] [ sum(y) ] - - float det = (sumXX*_numPoints - sumX*sumX); - float invDet = 1.0f/det; - - _result[0] = (-sumX * sumY + _numPoints * sumXY) * invDet; - _result[1] = (sumXX * sumY - sumX * sumXY) * invDet; - } - - inline void calcLinearFit3D(float _result[3], const void* _points, uint32_t _stride, uint32_t _numPoints) - { - float sumX = 0.0f; - float sumY = 0.0f; - float sumZ = 0.0f; - float sumXX = 0.0f; - float sumXY = 0.0f; - float sumXZ = 0.0f; - float sumYY = 0.0f; - float sumYZ = 0.0f; - - const uint8_t* ptr = (const uint8_t*)_points; - for (uint32_t ii = 0; ii < _numPoints; ++ii, ptr += _stride) - { - const float* point = (const float*)ptr; - float xx = point[0]; - float yy = point[1]; - float zz = point[2]; - - sumX += xx; - sumY += yy; - sumZ += zz; - sumXX += xx*xx; - sumXY += xx*yy; - sumXZ += xx*zz; - sumYY += yy*yy; - sumYZ += yy*zz; - } - - // [ sum(x^2) sum(x*y) sum(x) ] [ A ] [ sum(x*z) ] - // [ sum(x*y) sum(y^2) sum(y) ] [ B ] = [ sum(y*z) ] - // [ sum(x) sum(y) numPoints ] [ C ] [ sum(z) ] - - float mtx[9] = - { - sumXX, sumXY, sumX, - sumXY, sumYY, sumY, - sumX, sumY, float(_numPoints), - }; - float invMtx[9]; - mtx3Inverse(invMtx, mtx); - - _result[0] = invMtx[0]*sumXZ + invMtx[1]*sumYZ + invMtx[2]*sumZ; - _result[1] = invMtx[3]*sumXZ + invMtx[4]*sumYZ + invMtx[5]*sumZ; - _result[2] = invMtx[6]*sumXZ + invMtx[7]*sumYZ + invMtx[8]*sumZ; - } - - inline void rgbToHsv(float _hsv[3], const float _rgb[3]) - { - const float rr = _rgb[0]; - const float gg = _rgb[1]; - const float bb = _rgb[2]; - - const float s0 = fstep(bb, gg); - - const float px = flerp(bb, gg, s0); - const float py = flerp(gg, bb, s0); - const float pz = flerp(-1.0f, 0.0f, s0); - const float pw = flerp(2.0f/3.0f, -1.0f/3.0f, s0); - - const float s1 = fstep(px, rr); - - const float qx = flerp(px, rr, s1); - const float qy = py; - const float qz = flerp(pw, pz, s1); - const float qw = flerp(rr, px, s1); - - const float dd = qx - fmin(qw, qy); - const float ee = 1.0e-10f; - - _hsv[0] = fabsolute(qz + (qw - qy) / (6.0f * dd + ee) ); - _hsv[1] = dd / (qx + ee); - _hsv[2] = qx; - } - - inline void hsvToRgb(float _rgb[3], const float _hsv[3]) - { - const float hh = _hsv[0]; - const float ss = _hsv[1]; - const float vv = _hsv[2]; - - const float px = fabsolute(ffract(hh + 1.0f ) * 6.0f - 3.0f); - const float py = fabsolute(ffract(hh + 2.0f/3.0f) * 6.0f - 3.0f); - const float pz = fabsolute(ffract(hh + 1.0f/3.0f) * 6.0f - 3.0f); - - _rgb[0] = vv * flerp(1.0f, fsaturate(px - 1.0f), ss); - _rgb[1] = vv * flerp(1.0f, fsaturate(py - 1.0f), ss); - _rgb[2] = vv * flerp(1.0f, fsaturate(pz - 1.0f), ss); - } - -} // namespace bx diff --git a/3rdparty/bx/include/bx/inline/handlealloc.inl b/3rdparty/bx/include/bx/inline/handlealloc.inl index 8738c3d..3bb364b 100644 --- a/3rdparty/bx/include/bx/inline/handlealloc.inl +++ b/3rdparty/bx/include/bx/inline/handlealloc.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -54,7 +54,7 @@ namespace bx return handle; } - return invalid; + return kInvalidHandle; } inline bool HandleAlloc::isValid(uint16_t _handle) const @@ -104,7 +104,7 @@ namespace bx inline HandleAlloc* createHandleAlloc(AllocatorI* _allocator, uint16_t _maxHandles) { uint8_t* ptr = (uint8_t*)BX_ALLOC(_allocator, sizeof(HandleAlloc) + 2*_maxHandles*sizeof(uint16_t) ); - return ::new (ptr) HandleAlloc(_maxHandles); + return BX_PLACEMENT_NEW(ptr, HandleAlloc)(_maxHandles); } inline void destroyHandleAlloc(AllocatorI* _allocator, HandleAlloc* _handleAlloc) @@ -139,12 +139,12 @@ namespace bx template inline uint16_t HandleListT::popBack() { - uint16_t last = invalid != m_back + uint16_t last = kInvalidHandle != m_back ? m_back : m_front ; - if (invalid != last) + if (kInvalidHandle != last) { remove(last); } @@ -163,7 +163,7 @@ namespace bx { uint16_t front = m_front; - if (invalid != front) + if (kInvalidHandle != front) { remove(front); } @@ -205,7 +205,7 @@ namespace bx BX_CHECK(isValid(_handle), "Invalid handle %d!", _handle); Link& curr = m_links[_handle]; - if (invalid != curr.m_prev) + if (kInvalidHandle != curr.m_prev) { Link& prev = m_links[curr.m_prev]; prev.m_next = curr.m_next; @@ -215,7 +215,7 @@ namespace bx m_front = curr.m_next; } - if (invalid != curr.m_next) + if (kInvalidHandle != curr.m_next) { Link& next = m_links[curr.m_next]; next.m_prev = curr.m_prev; @@ -225,16 +225,16 @@ namespace bx m_back = curr.m_prev; } - curr.m_prev = invalid; - curr.m_next = invalid; + curr.m_prev = kInvalidHandle; + curr.m_next = kInvalidHandle; } template inline void HandleListT::reset() { memSet(m_links, 0xff, sizeof(m_links) ); - m_front = invalid; - m_back = invalid; + m_front = kInvalidHandle; + m_back = kInvalidHandle; } template @@ -243,10 +243,10 @@ namespace bx Link& curr = m_links[_handle]; curr.m_next = _before; - if (invalid != _before) + if (kInvalidHandle != _before) { Link& link = m_links[_before]; - if (invalid != link.m_prev) + if (kInvalidHandle != link.m_prev) { Link& prev = m_links[link.m_prev]; prev.m_next = _handle; @@ -265,10 +265,10 @@ namespace bx Link& curr = m_links[_handle]; curr.m_prev = _after; - if (invalid != _after) + if (kInvalidHandle != _after) { Link& link = m_links[_after]; - if (invalid != link.m_next) + if (kInvalidHandle != link.m_next) { Link& next = m_links[link.m_next]; next.m_prev = _handle; @@ -292,12 +292,12 @@ namespace bx { Link& curr = m_links[_handle]; - if (invalid == curr.m_prev) + if (kInvalidHandle == curr.m_prev) { m_front = _handle; } - if (invalid == curr.m_next) + if (kInvalidHandle == curr.m_next) { m_back = _handle; } @@ -342,7 +342,7 @@ namespace bx inline uint16_t HandleAllocLruT::alloc() { uint16_t handle = m_alloc.alloc(); - if (invalid != handle) + if (kInvalidHandle != handle) { m_list.pushFront(handle); } @@ -417,7 +417,7 @@ namespace bx template inline bool HandleHashMapT::insert(KeyT _key, uint16_t _handle) { - if (invalid == _handle) + if (kInvalidHandle == _handle) { return false; } @@ -427,7 +427,7 @@ namespace bx uint32_t idx = firstIdx; do { - if (m_handle[idx] == invalid) + if (m_handle[idx] == kInvalidHandle) { m_key[idx] = _key; m_handle[idx] = _handle; @@ -463,7 +463,7 @@ namespace bx template inline bool HandleHashMapT::removeByHandle(uint16_t _handle) { - if (invalid != _handle) + if (kInvalidHandle != _handle) { for (uint32_t idx = 0; idx < MaxCapacityT; ++idx) { @@ -486,7 +486,7 @@ namespace bx return m_handle[idx]; } - return invalid; + return kInvalidHandle; } template @@ -512,7 +512,7 @@ namespace bx inline typename HandleHashMapT::Iterator HandleHashMapT::first() const { Iterator it; - it.handle = invalid; + it.handle = kInvalidHandle; it.pos = 0; it.num = m_numElements; @@ -535,7 +535,7 @@ namespace bx } for ( - ;_it.pos < MaxCapacityT && invalid == m_handle[_it.pos] + ;_it.pos < MaxCapacityT && kInvalidHandle == m_handle[_it.pos] ; ++_it.pos ); _it.handle = m_handle[_it.pos]; @@ -553,7 +553,7 @@ namespace bx uint32_t idx = firstIdx; do { - if (m_handle[idx] == invalid) + if (m_handle[idx] == kInvalidHandle) { return UINT32_MAX; } @@ -573,20 +573,20 @@ namespace bx template inline void HandleHashMapT::removeIndex(uint32_t _idx) { - m_handle[_idx] = invalid; + m_handle[_idx] = kInvalidHandle; --m_numElements; for (uint32_t idx = (_idx + 1) % MaxCapacityT - ; m_handle[idx] != invalid + ; m_handle[idx] != kInvalidHandle ; idx = (idx + 1) % MaxCapacityT) { - if (m_handle[idx] != invalid) + if (m_handle[idx] != kInvalidHandle) { const KeyT key = m_key[idx]; if (idx != findIndex(key) ) { const uint16_t handle = m_handle[idx]; - m_handle[idx] = invalid; + m_handle[idx] = kInvalidHandle; --m_numElements; insert(key, handle); } @@ -627,16 +627,16 @@ namespace bx inline uint16_t HandleHashMapAllocT::alloc(KeyT _key) { uint16_t handle = m_alloc.alloc(); - if (invalid == handle) + if (kInvalidHandle == handle) { - return invalid; + return kInvalidHandle; } bool ok = m_table.insert(_key, handle); if (!ok) { m_alloc.free(handle); - return invalid; + return kInvalidHandle; } return handle; @@ -646,7 +646,7 @@ namespace bx inline void HandleHashMapAllocT::free(KeyT _key) { uint16_t handle = m_table.find(_key); - if (invalid == handle) + if (kInvalidHandle == handle) { return; } diff --git a/3rdparty/bx/include/bx/inline/hash.inl b/3rdparty/bx/include/bx/inline/hash.inl index 50da33f..fdc8e9a 100644 --- a/3rdparty/bx/include/bx/inline/hash.inl +++ b/3rdparty/bx/include/bx/inline/hash.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -136,29 +136,72 @@ namespace bx #undef MURMUR_R #undef mmix - inline uint32_t hashMurmur2A(const void* _data, uint32_t _size) + inline void HashAdler32::begin() { - HashMurmur2A murmur; - murmur.begin(); - murmur.add(_data, (int)_size); - return murmur.end(); + m_a = 1; + m_b = 0; } - template - inline uint32_t hashMurmur2A(const Ty& _data) + inline void HashAdler32::add(const void* _data, int _len) + { + const uint32_t kModAdler = 65521; + const uint8_t* data = (const uint8_t*)_data; + for (; _len != 0; --_len) + { + m_a = (m_a + *data++) % kModAdler; + m_b = (m_b + m_a ) % kModAdler; + } + } + + template + inline void HashAdler32::add(Ty _value) + { + add(&_value, sizeof(Ty) ); + } + + inline uint32_t HashAdler32::end() + { + return m_a | (m_b<<16); + } + + template + inline void HashCrc32::add(Ty _value) + { + add(&_value, sizeof(Ty) ); + } + + inline uint32_t HashCrc32::end() + { + m_hash ^= UINT32_MAX; + return m_hash; + } + + template + inline uint32_t hash(const void* _data, uint32_t _size) + { + HashT hh; + hh.begin(); + hh.add(_data, (int)_size); + return hh.end(); + } + + template + inline uint32_t hash(const Ty& _data) { BX_STATIC_ASSERT(BX_TYPE_IS_POD(Ty) ); - return hashMurmur2A(&_data, sizeof(Ty) ); + return hash(&_data, sizeof(Ty) ); } - inline uint32_t hashMurmur2A(const StringView& _data) + template + inline uint32_t hash(const StringView& _data) { - return hashMurmur2A(_data.getPtr(), _data.getLength() ); + return hash(_data.getPtr(), _data.getLength() ); } - inline uint32_t hashMurmur2A(const char* _data) + template + inline uint32_t hash(const char* _data) { - return hashMurmur2A(StringView(_data) ); + return hash(StringView(_data) ); } } // namespace bx diff --git a/3rdparty/bx/include/bx/inline/math.inl b/3rdparty/bx/include/bx/inline/math.inl new file mode 100644 index 0000000..26c4cd2 --- /dev/null +++ b/3rdparty/bx/include/bx/inline/math.inl @@ -0,0 +1,945 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +// FPU math lib + +#ifndef BX_MATH_H_HEADER_GUARD +# error "Must be included from bx/math.h!" +#endif // BX_MATH_H_HEADER_GUARD + +#include + +namespace bx +{ + inline BX_CONST_FUNC float toRad(float _deg) + { + return _deg * kPi / 180.0f; + } + + inline BX_CONST_FUNC float toDeg(float _rad) + { + return _rad * 180.0f / kPi; + } + + inline BX_CONST_FUNC uint32_t floatToBits(float _a) + { + union { float f; uint32_t ui; } u = { _a }; + return u.ui; + } + + inline BX_CONST_FUNC float bitsToFloat(uint32_t _a) + { + union { uint32_t ui; float f; } u = { _a }; + return u.f; + } + + inline BX_CONST_FUNC uint64_t doubleToBits(double _a) + { + union { double f; uint64_t ui; } u = { _a }; + return u.ui; + } + + inline BX_CONST_FUNC double bitsToDouble(uint64_t _a) + { + union { uint64_t ui; double f; } u = { _a }; + return u.f; + } + + inline BX_CONST_FUNC uint32_t floatFlip(uint32_t _value) + { + // Reference: + // http://archive.fo/2012.12.08-212402/http://stereopsis.com/radix.html + const uint32_t tmp0 = uint32_sra(_value, 31); + const uint32_t tmp1 = uint32_neg(tmp0); + const uint32_t mask = uint32_or(tmp1, 0x80000000); + const uint32_t result = uint32_xor(_value, mask); + return result; + } + + inline BX_CONST_FUNC bool isNan(float _f) + { + const uint32_t tmp = floatToBits(_f) & INT32_MAX; + return tmp > UINT32_C(0x7f800000); + } + + inline BX_CONST_FUNC bool isNan(double _f) + { + const uint64_t tmp = doubleToBits(_f) & INT64_MAX; + return tmp > UINT64_C(0x7ff0000000000000); + } + + inline BX_CONST_FUNC bool isFinite(float _f) + { + const uint32_t tmp = floatToBits(_f) & INT32_MAX; + return tmp < UINT32_C(0x7f800000); + } + + inline BX_CONST_FUNC bool isFinite(double _f) + { + const uint64_t tmp = doubleToBits(_f) & INT64_MAX; + return tmp < UINT64_C(0x7ff0000000000000); + } + + inline BX_CONST_FUNC bool isInfinite(float _f) + { + const uint32_t tmp = floatToBits(_f) & INT32_MAX; + return tmp == UINT32_C(0x7f800000); + } + + inline BX_CONST_FUNC bool isInfinite(double _f) + { + const uint64_t tmp = doubleToBits(_f) & INT64_MAX; + return tmp == UINT64_C(0x7ff0000000000000); + } + + inline BX_CONST_FUNC float round(float _f) + { + return floor(_f + 0.5f); + } + + inline BX_CONST_FUNC float ceil(float _a) + { + return -floor(-_a); + } + + inline BX_CONST_FUNC float lerp(float _a, float _b, float _t) + { + return _a + (_b - _a) * _t; + } + + inline BX_CONST_FUNC float abs(float _a) + { + return _a < 0.0f ? -_a : _a; + } + + inline BX_CONST_FUNC float sign(float _a) + { + return _a < 0.0f ? -1.0f : 1.0f; + } + + inline BX_CONST_FUNC float square(float _a) + { + return _a * _a; + } + + inline BX_CONST_FUNC float sin(float _a) + { + return cos(_a - kPiHalf); + } + + inline BX_CONST_FUNC float sinh(float _a) + { + return 0.5f*(exp(_a) - exp(-_a) ); + } + + inline BX_CONST_FUNC float asin(float _a) + { + return kPiHalf - acos(_a); + } + + inline BX_CONST_FUNC float cosh(float _a) + { + return 0.5f*(exp(_a) + exp(-_a) ); + } + + inline BX_CONST_FUNC float tan(float _a) + { + return sin(_a) / cos(_a); + } + + inline BX_CONST_FUNC float tanh(float _a) + { + const float tmp0 = exp(2.0f*_a); + const float tmp1 = tmp0 - 1.0f; + const float tmp2 = tmp0 + 1.0f; + const float result = tmp1 / tmp2; + + return result; + } + + inline BX_CONST_FUNC float atan(float _a) + { + return atan2(_a, 1.0f); + } + + inline BX_CONST_FUNC float pow(float _a, float _b) + { + return exp(_b * log(_a) ); + } + + inline BX_CONST_FUNC float exp2(float _a) + { + return pow(2.0f, _a); + } + + inline BX_CONST_FUNC float log2(float _a) + { + return log(_a) * kInvLogNat2; + } + + inline BX_CONST_FUNC float sqrtRef(float _a) + { + if (_a < kNearZero) + { + return 0.0f; + } + + return 1.0f/rsqrt(_a); + } + + inline BX_CONST_FUNC float sqrtSimd(float _a) + { + const simd128_t aa = simd_splat(_a); + const simd128_t sqrta = simd_sqrt(aa); + float result; + simd_stx(&result, sqrta); + + return result; + } + + inline BX_CONST_FUNC float sqrt(float _a) + { +#if BX_CONFIG_SUPPORTS_SIMD + return sqrtSimd(_a); +#else + return sqrtRef(_a); +#endif // BX_CONFIG_SUPPORTS_SIMD + } + + inline BX_CONST_FUNC float rsqrtRef(float _a) + { + return pow(_a, -0.5f); + } + + inline BX_CONST_FUNC float rsqrtSimd(float _a) + { + if (_a < kNearZero) + { + return 0.0f; + } + + const simd128_t aa = simd_splat(_a); + const simd128_t rsqrta = simd_rsqrt_nr(aa); + float result; + simd_stx(&result, rsqrta); + + return result; + } + + inline BX_CONST_FUNC float rsqrt(float _a) + { +#if BX_CONFIG_SUPPORTS_SIMD + return rsqrtSimd(_a); +#else + return rsqrtRef(_a); +#endif // BX_CONFIG_SUPPORTS_SIMD + } + + inline BX_CONST_FUNC float trunc(float _a) + { + return float(int(_a) ); + } + + inline BX_CONST_FUNC float fract(float _a) + { + return _a - trunc(_a); + } + + inline BX_CONST_FUNC float mad(float _a, float _b, float _c) + { + return _a * _b + _c; + } + + inline BX_CONST_FUNC float mod(float _a, float _b) + { + return _a - _b * floor(_a / _b); + } + + inline BX_CONST_FUNC bool equal(float _a, float _b, float _epsilon) + { + // http://realtimecollisiondetection.net/blog/?p=89 + const float lhs = abs(_a - _b); + const float rhs = _epsilon * max(1.0f, abs(_a), abs(_b) ); + return lhs <= rhs; + } + + inline BX_CONST_FUNC bool equal(const float* _a, const float* _b, uint32_t _num, float _epsilon) + { + bool result = equal(_a[0], _b[0], _epsilon); + for (uint32_t ii = 1; result && ii < _num; ++ii) + { + result = equal(_a[ii], _b[ii], _epsilon); + } + return result; + } + + inline BX_CONST_FUNC float wrap(float _a, float _wrap) + { + const float tmp0 = mod(_a, _wrap); + const float result = tmp0 < 0.0f ? _wrap + tmp0 : tmp0; + return result; + } + + inline BX_CONST_FUNC float step(float _edge, float _a) + { + return _a < _edge ? 0.0f : 1.0f; + } + + inline BX_CONST_FUNC float pulse(float _a, float _start, float _end) + { + return step(_a, _start) - step(_a, _end); + } + + inline BX_CONST_FUNC float smoothStep(float _a) + { + return square(_a)*(3.0f - 2.0f*_a); + } + + inline BX_CONST_FUNC float bias(float _time, float _bias) + { + return _time / ( ( (1.0f/_bias - 2.0f)*(1.0f - _time) ) + 1.0f); + } + + inline BX_CONST_FUNC float gain(float _time, float _gain) + { + if (_time < 0.5f) + { + return bias(_time * 2.0f, _gain) * 0.5f; + } + + return bias(_time * 2.0f - 1.0f, 1.0f - _gain) * 0.5f + 0.5f; + } + + inline BX_CONST_FUNC float angleDiff(float _a, float _b) + { + const float dist = wrap(_b - _a, kPi2); + return wrap(dist*2.0f, kPi2) - dist; + } + + inline BX_CONST_FUNC float angleLerp(float _a, float _b, float _t) + { + return _a + angleDiff(_a, _b) * _t; + } + + inline void vec3Move(float* _result, const float* _a) + { + _result[0] = _a[0]; + _result[1] = _a[1]; + _result[2] = _a[2]; + } + + inline void vec3Abs(float* _result, const float* _a) + { + _result[0] = abs(_a[0]); + _result[1] = abs(_a[1]); + _result[2] = abs(_a[2]); + } + + inline void vec3Neg(float* _result, const float* _a) + { + _result[0] = -_a[0]; + _result[1] = -_a[1]; + _result[2] = -_a[2]; + } + + inline void vec3Add(float* _result, const float* _a, const float* _b) + { + _result[0] = _a[0] + _b[0]; + _result[1] = _a[1] + _b[1]; + _result[2] = _a[2] + _b[2]; + } + + inline void vec3Add(float* _result, const float* _a, float _b) + { + _result[0] = _a[0] + _b; + _result[1] = _a[1] + _b; + _result[2] = _a[2] + _b; + } + + inline void vec3Sub(float* _result, const float* _a, const float* _b) + { + _result[0] = _a[0] - _b[0]; + _result[1] = _a[1] - _b[1]; + _result[2] = _a[2] - _b[2]; + } + + inline void vec3Sub(float* _result, const float* _a, float _b) + { + _result[0] = _a[0] - _b; + _result[1] = _a[1] - _b; + _result[2] = _a[2] - _b; + } + + inline void vec3Mul(float* _result, const float* _a, const float* _b) + { + _result[0] = _a[0] * _b[0]; + _result[1] = _a[1] * _b[1]; + _result[2] = _a[2] * _b[2]; + } + + inline void vec3Mul(float* _result, const float* _a, float _b) + { + _result[0] = _a[0] * _b; + _result[1] = _a[1] * _b; + _result[2] = _a[2] * _b; + } + + inline float vec3Dot(const float* _a, const float* _b) + { + return _a[0]*_b[0] + _a[1]*_b[1] + _a[2]*_b[2]; + } + + inline void vec3Cross(float* _result, const float* _a, const float* _b) + { + _result[0] = _a[1]*_b[2] - _a[2]*_b[1]; + _result[1] = _a[2]*_b[0] - _a[0]*_b[2]; + _result[2] = _a[0]*_b[1] - _a[1]*_b[0]; + } + + inline float vec3Length(const float* _a) + { + return sqrt(vec3Dot(_a, _a) ); + } + + inline void vec3Lerp(float* _result, const float* _a, const float* _b, float _t) + { + _result[0] = lerp(_a[0], _b[0], _t); + _result[1] = lerp(_a[1], _b[1], _t); + _result[2] = lerp(_a[2], _b[2], _t); + } + + inline void vec3Lerp(float* _result, const float* _a, const float* _b, const float* _c) + { + _result[0] = lerp(_a[0], _b[0], _c[0]); + _result[1] = lerp(_a[1], _b[1], _c[1]); + _result[2] = lerp(_a[2], _b[2], _c[2]); + } + + inline float vec3Norm(float* _result, const float* _a) + { + const float len = vec3Length(_a); + const float invLen = 1.0f/len; + _result[0] = _a[0] * invLen; + _result[1] = _a[1] * invLen; + _result[2] = _a[2] * invLen; + return len; + } + + inline void vec3Min(float* _result, const float* _a, const float* _b) + { + _result[0] = min(_a[0], _b[0]); + _result[1] = min(_a[1], _b[1]); + _result[2] = min(_a[2], _b[2]); + } + + inline void vec3Max(float* _result, const float* _a, const float* _b) + { + _result[0] = max(_a[0], _b[0]); + _result[1] = max(_a[1], _b[1]); + _result[2] = max(_a[2], _b[2]); + } + + inline void vec3Rcp(float* _result, const float* _a) + { + _result[0] = 1.0f / _a[0]; + _result[1] = 1.0f / _a[1]; + _result[2] = 1.0f / _a[2]; + } + + inline void vec3TangentFrame(const float* _n, float* _t, float* _b) + { + const float nx = _n[0]; + const float ny = _n[1]; + const float nz = _n[2]; + + if (abs(nx) > abs(nz) ) + { + float invLen = 1.0f / sqrt(nx*nx + nz*nz); + _t[0] = -nz * invLen; + _t[1] = 0.0f; + _t[2] = nx * invLen; + } + else + { + float invLen = 1.0f / sqrt(ny*ny + nz*nz); + _t[0] = 0.0f; + _t[1] = nz * invLen; + _t[2] = -ny * invLen; + } + + vec3Cross(_b, _n, _t); + } + + inline void vec3TangentFrame(const float* _n, float* _t, float* _b, float _angle) + { + vec3TangentFrame(_n, _t, _b); + + const float sa = sin(_angle); + const float ca = cos(_angle); + + _t[0] = -sa * _b[0] + ca * _t[0]; + _t[1] = -sa * _b[1] + ca * _t[1]; + _t[2] = -sa * _b[2] + ca * _t[2]; + + vec3Cross(_b, _n, _t); + } + + inline void vec3FromLatLong(float* _vec, float _u, float _v) + { + const float phi = _u * kPi2; + const float theta = _v * kPi; + + const float st = sin(theta); + const float sp = sin(phi); + const float ct = cos(theta); + const float cp = cos(phi); + + _vec[0] = -st*sp; + _vec[1] = ct; + _vec[2] = -st*cp; + } + + inline void vec3ToLatLong(float* _outU, float* _outV, const float* _dir) + { + const float phi = atan2(_dir[0], _dir[2]); + const float theta = acos(_dir[1]); + + *_outU = (bx::kPi + phi)/bx::kPi2; + *_outV = theta*bx::kInvPi; + } + + inline void quatIdentity(float* _result) + { + _result[0] = 0.0f; + _result[1] = 0.0f; + _result[2] = 0.0f; + _result[3] = 1.0f; + } + + inline void quatMove(float* _result, const float* _a) + { + _result[0] = _a[0]; + _result[1] = _a[1]; + _result[2] = _a[2]; + _result[3] = _a[3]; + } + + inline void quatMulXYZ(float* _result, const float* _qa, const float* _qb) + { + const float ax = _qa[0]; + const float ay = _qa[1]; + const float az = _qa[2]; + const float aw = _qa[3]; + + const float bx = _qb[0]; + const float by = _qb[1]; + const float bz = _qb[2]; + const float bw = _qb[3]; + + _result[0] = aw * bx + ax * bw + ay * bz - az * by; + _result[1] = aw * by - ax * bz + ay * bw + az * bx; + _result[2] = aw * bz + ax * by - ay * bx + az * bw; + } + + inline void quatMul(float* _result, const float* _qa, const float* _qb) + { + const float ax = _qa[0]; + const float ay = _qa[1]; + const float az = _qa[2]; + const float aw = _qa[3]; + + const float bx = _qb[0]; + const float by = _qb[1]; + const float bz = _qb[2]; + const float bw = _qb[3]; + + _result[0] = aw * bx + ax * bw + ay * bz - az * by; + _result[1] = aw * by - ax * bz + ay * bw + az * bx; + _result[2] = aw * bz + ax * by - ay * bx + az * bw; + _result[3] = aw * bw - ax * bx - ay * by - az * bz; + } + + inline void quatInvert(float* _result, const float* _quat) + { + _result[0] = -_quat[0]; + _result[1] = -_quat[1]; + _result[2] = -_quat[2]; + _result[3] = _quat[3]; + } + + inline float quatDot(const float* _a, const float* _b) + { + return _a[0]*_b[0] + + _a[1]*_b[1] + + _a[2]*_b[2] + + _a[3]*_b[3] + ; + } + + inline void quatNorm(float* _result, const float* _quat) + { + const float norm = quatDot(_quat, _quat); + if (0.0f < norm) + { + const float invNorm = 1.0f / sqrt(norm); + _result[0] = _quat[0] * invNorm; + _result[1] = _quat[1] * invNorm; + _result[2] = _quat[2] * invNorm; + _result[3] = _quat[3] * invNorm; + } + else + { + quatIdentity(_result); + } + } + + inline void quatToEuler(float* _result, const float* _quat) + { + const float x = _quat[0]; + const float y = _quat[1]; + const float z = _quat[2]; + const float w = _quat[3]; + + const float yy = y * y; + const float zz = z * z; + + const float xx = x * x; + _result[0] = atan2(2.0f * (x * w - y * z), 1.0f - 2.0f * (xx + zz) ); + _result[1] = atan2(2.0f * (y * w + x * z), 1.0f - 2.0f * (yy + zz) ); + _result[2] = asin (2.0f * (x * y + z * w) ); + } + + inline void quatRotateAxis(float* _result, const float* _axis, float _angle) + { + const float ha = _angle * 0.5f; + const float ca = cos(ha); + const float sa = sin(ha); + _result[0] = _axis[0] * sa; + _result[1] = _axis[1] * sa; + _result[2] = _axis[2] * sa; + _result[3] = ca; + } + + inline void quatRotateX(float* _result, float _ax) + { + const float hx = _ax * 0.5f; + const float cx = cos(hx); + const float sx = sin(hx); + _result[0] = sx; + _result[1] = 0.0f; + _result[2] = 0.0f; + _result[3] = cx; + } + + inline void quatRotateY(float* _result, float _ay) + { + const float hy = _ay * 0.5f; + const float cy = cos(hy); + const float sy = sin(hy); + _result[0] = 0.0f; + _result[1] = sy; + _result[2] = 0.0f; + _result[3] = cy; + } + + inline void quatRotateZ(float* _result, float _az) + { + const float hz = _az * 0.5f; + const float cz = cos(hz); + const float sz = sin(hz); + _result[0] = 0.0f; + _result[1] = 0.0f; + _result[2] = sz; + _result[3] = cz; + } + + inline void vec3MulQuat(float* _result, const float* _vec, const float* _quat) + { + float tmp0[4]; + quatInvert(tmp0, _quat); + + float qv[4]; + qv[0] = _vec[0]; + qv[1] = _vec[1]; + qv[2] = _vec[2]; + qv[3] = 0.0f; + + float tmp1[4]; + quatMul(tmp1, tmp0, qv); + + quatMulXYZ(_result, tmp1, _quat); + } + + inline void mtxIdentity(float* _result) + { + memSet(_result, 0, sizeof(float)*16); + _result[0] = _result[5] = _result[10] = _result[15] = 1.0f; + } + + inline void mtxTranslate(float* _result, float _tx, float _ty, float _tz) + { + mtxIdentity(_result); + _result[12] = _tx; + _result[13] = _ty; + _result[14] = _tz; + } + + inline void mtxScale(float* _result, float _sx, float _sy, float _sz) + { + memSet(_result, 0, sizeof(float) * 16); + _result[0] = _sx; + _result[5] = _sy; + _result[10] = _sz; + _result[15] = 1.0f; + } + + inline void mtxScale(float* _result, float _scale) + { + mtxScale(_result, _scale, _scale, _scale); + } + + inline void mtxFromNormal(float* _result, const float* _normal, float _scale, const float* _pos) + { + float tangent[3]; + float bitangent[3]; + vec3TangentFrame(_normal, tangent, bitangent); + + vec3Mul(&_result[ 0], bitangent, _scale); + vec3Mul(&_result[ 4], _normal, _scale); + vec3Mul(&_result[ 8], tangent, _scale); + + _result[ 3] = 0.0f; + _result[ 7] = 0.0f; + _result[11] = 0.0f; + _result[12] = _pos[0]; + _result[13] = _pos[1]; + _result[14] = _pos[2]; + _result[15] = 1.0f; + } + + inline void mtxFromNormal(float* _result, const float* _normal, float _scale, const float* _pos, float _angle) + { + float tangent[3]; + float bitangent[3]; + vec3TangentFrame(_normal, tangent, bitangent, _angle); + + vec3Mul(&_result[ 0], bitangent, _scale); + vec3Mul(&_result[ 4], _normal, _scale); + vec3Mul(&_result[ 8], tangent, _scale); + + _result[ 3] = 0.0f; + _result[ 7] = 0.0f; + _result[11] = 0.0f; + _result[12] = _pos[0]; + _result[13] = _pos[1]; + _result[14] = _pos[2]; + _result[15] = 1.0f; + } + + inline void mtxQuat(float* _result, const float* _quat) + { + const float x = _quat[0]; + const float y = _quat[1]; + const float z = _quat[2]; + const float w = _quat[3]; + + const float x2 = x + x; + const float y2 = y + y; + const float z2 = z + z; + const float x2x = x2 * x; + const float x2y = x2 * y; + const float x2z = x2 * z; + const float x2w = x2 * w; + const float y2y = y2 * y; + const float y2z = y2 * z; + const float y2w = y2 * w; + const float z2z = z2 * z; + const float z2w = z2 * w; + + _result[ 0] = 1.0f - (y2y + z2z); + _result[ 1] = x2y - z2w; + _result[ 2] = x2z + y2w; + _result[ 3] = 0.0f; + + _result[ 4] = x2y + z2w; + _result[ 5] = 1.0f - (x2x + z2z); + _result[ 6] = y2z - x2w; + _result[ 7] = 0.0f; + + _result[ 8] = x2z - y2w; + _result[ 9] = y2z + x2w; + _result[10] = 1.0f - (x2x + y2y); + _result[11] = 0.0f; + + _result[12] = 0.0f; + _result[13] = 0.0f; + _result[14] = 0.0f; + _result[15] = 1.0f; + } + + inline void mtxQuatTranslation(float* _result, const float* _quat, const float* _translation) + { + mtxQuat(_result, _quat); + _result[12] = -(_result[0]*_translation[0] + _result[4]*_translation[1] + _result[ 8]*_translation[2]); + _result[13] = -(_result[1]*_translation[0] + _result[5]*_translation[1] + _result[ 9]*_translation[2]); + _result[14] = -(_result[2]*_translation[0] + _result[6]*_translation[1] + _result[10]*_translation[2]); + } + + inline void mtxQuatTranslationHMD(float* _result, const float* _quat, const float* _translation) + { + float quat[4]; + quat[0] = -_quat[0]; + quat[1] = -_quat[1]; + quat[2] = _quat[2]; + quat[3] = _quat[3]; + mtxQuatTranslation(_result, quat, _translation); + } + + inline void vec3MulMtx(float* _result, const float* _vec, const float* _mat) + { + _result[0] = _vec[0] * _mat[ 0] + _vec[1] * _mat[4] + _vec[2] * _mat[ 8] + _mat[12]; + _result[1] = _vec[0] * _mat[ 1] + _vec[1] * _mat[5] + _vec[2] * _mat[ 9] + _mat[13]; + _result[2] = _vec[0] * _mat[ 2] + _vec[1] * _mat[6] + _vec[2] * _mat[10] + _mat[14]; + } + + inline void vec3MulMtxXyz0(float* _result, const float* _vec, const float* _mat) + { + _result[0] = _vec[0] * _mat[ 0] + _vec[1] * _mat[4] + _vec[2] * _mat[ 8]; + _result[1] = _vec[0] * _mat[ 1] + _vec[1] * _mat[5] + _vec[2] * _mat[ 9]; + _result[2] = _vec[0] * _mat[ 2] + _vec[1] * _mat[6] + _vec[2] * _mat[10]; + } + + inline void vec3MulMtxH(float* _result, const float* _vec, const float* _mat) + { + float xx = _vec[0] * _mat[ 0] + _vec[1] * _mat[4] + _vec[2] * _mat[ 8] + _mat[12]; + float yy = _vec[0] * _mat[ 1] + _vec[1] * _mat[5] + _vec[2] * _mat[ 9] + _mat[13]; + float zz = _vec[0] * _mat[ 2] + _vec[1] * _mat[6] + _vec[2] * _mat[10] + _mat[14]; + float ww = _vec[0] * _mat[ 3] + _vec[1] * _mat[7] + _vec[2] * _mat[11] + _mat[15]; + float invW = sign(ww)/ww; + _result[0] = xx*invW; + _result[1] = yy*invW; + _result[2] = zz*invW; + } + + inline void vec4Mul(float* _result, const float* _a, const float* _b) + { + _result[0] = _a[0] * _b[0]; + _result[1] = _a[1] * _b[1]; + _result[2] = _a[2] * _b[2]; + _result[3] = _a[3] * _b[3]; + } + + inline void vec4Mul(float* _result, const float* _a, float _b) + { + _result[0] = _a[0] * _b; + _result[1] = _a[1] * _b; + _result[2] = _a[2] * _b; + _result[3] = _a[3] * _b; + } + + inline void vec4MulMtx(float* _result, const float* _vec, const float* _mat) + { + _result[0] = _vec[0] * _mat[ 0] + _vec[1] * _mat[4] + _vec[2] * _mat[ 8] + _vec[3] * _mat[12]; + _result[1] = _vec[0] * _mat[ 1] + _vec[1] * _mat[5] + _vec[2] * _mat[ 9] + _vec[3] * _mat[13]; + _result[2] = _vec[0] * _mat[ 2] + _vec[1] * _mat[6] + _vec[2] * _mat[10] + _vec[3] * _mat[14]; + _result[3] = _vec[0] * _mat[ 3] + _vec[1] * _mat[7] + _vec[2] * _mat[11] + _vec[3] * _mat[15]; + } + + inline void mtxMul(float* _result, const float* _a, const float* _b) + { + vec4MulMtx(&_result[ 0], &_a[ 0], _b); + vec4MulMtx(&_result[ 4], &_a[ 4], _b); + vec4MulMtx(&_result[ 8], &_a[ 8], _b); + vec4MulMtx(&_result[12], &_a[12], _b); + } + + inline void mtxTranspose(float* _result, const float* _a) + { + _result[ 0] = _a[ 0]; + _result[ 4] = _a[ 1]; + _result[ 8] = _a[ 2]; + _result[12] = _a[ 3]; + _result[ 1] = _a[ 4]; + _result[ 5] = _a[ 5]; + _result[ 9] = _a[ 6]; + _result[13] = _a[ 7]; + _result[ 2] = _a[ 8]; + _result[ 6] = _a[ 9]; + _result[10] = _a[10]; + _result[14] = _a[11]; + _result[ 3] = _a[12]; + _result[ 7] = _a[13]; + _result[11] = _a[14]; + _result[15] = _a[15]; + } + + /// Convert LH to RH projection matrix and vice versa. + inline void mtxProjFlipHandedness(float* _dst, const float* _src) + { + _dst[ 0] = -_src[ 0]; + _dst[ 1] = -_src[ 1]; + _dst[ 2] = -_src[ 2]; + _dst[ 3] = -_src[ 3]; + _dst[ 4] = _src[ 4]; + _dst[ 5] = _src[ 5]; + _dst[ 6] = _src[ 6]; + _dst[ 7] = _src[ 7]; + _dst[ 8] = -_src[ 8]; + _dst[ 9] = -_src[ 9]; + _dst[10] = -_src[10]; + _dst[11] = -_src[11]; + _dst[12] = _src[12]; + _dst[13] = _src[13]; + _dst[14] = _src[14]; + _dst[15] = _src[15]; + } + + /// Convert LH to RH view matrix and vice versa. + inline void mtxViewFlipHandedness(float* _dst, const float* _src) + { + _dst[ 0] = -_src[ 0]; + _dst[ 1] = _src[ 1]; + _dst[ 2] = -_src[ 2]; + _dst[ 3] = _src[ 3]; + _dst[ 4] = -_src[ 4]; + _dst[ 5] = _src[ 5]; + _dst[ 6] = -_src[ 6]; + _dst[ 7] = _src[ 7]; + _dst[ 8] = -_src[ 8]; + _dst[ 9] = _src[ 9]; + _dst[10] = -_src[10]; + _dst[11] = _src[11]; + _dst[12] = -_src[12]; + _dst[13] = _src[13]; + _dst[14] = -_src[14]; + _dst[15] = _src[15]; + } + + inline void calcNormal(float _result[3], float _va[3], float _vb[3], float _vc[3]) + { + float ba[3]; + vec3Sub(ba, _vb, _va); + + float ca[3]; + vec3Sub(ca, _vc, _va); + + float baxca[3]; + vec3Cross(baxca, ba, ca); + + vec3Norm(_result, baxca); + } + + inline void calcPlane(float _result[4], float _va[3], float _vb[3], float _vc[3]) + { + float normal[3]; + calcNormal(normal, _va, _vb, _vc); + + _result[0] = normal[0]; + _result[1] = normal[1]; + _result[2] = normal[2]; + _result[3] = -vec3Dot(normal, _va); + } + +} // namespace bx diff --git a/3rdparty/bx/include/bx/inline/mpscqueue.inl b/3rdparty/bx/include/bx/inline/mpscqueue.inl index 0216b50..a22cf28 100644 --- a/3rdparty/bx/include/bx/inline/mpscqueue.inl +++ b/3rdparty/bx/include/bx/inline/mpscqueue.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -10,7 +10,8 @@ namespace bx { template - inline MpScUnboundedQueueT::MpScUnboundedQueueT() + inline MpScUnboundedQueueT::MpScUnboundedQueueT(AllocatorI* _allocator) + : m_queue(_allocator) { } @@ -39,7 +40,8 @@ namespace bx } template - inline MpScUnboundedBlockingQueue::MpScUnboundedBlockingQueue() + inline MpScUnboundedBlockingQueue::MpScUnboundedBlockingQueue(AllocatorI* _allocator) + : m_queue(_allocator) { } diff --git a/3rdparty/bx/include/bx/inline/mutex.inl b/3rdparty/bx/include/bx/inline/mutex.inl index 0d086bd..971ebca 100644 --- a/3rdparty/bx/include/bx/inline/mutex.inl +++ b/3rdparty/bx/include/bx/inline/mutex.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/inline/pixelformat.inl b/3rdparty/bx/include/bx/inline/pixelformat.inl index cd46892..9bc6109 100644 --- a/3rdparty/bx/include/bx/inline/pixelformat.inl +++ b/3rdparty/bx/include/bx/inline/pixelformat.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -11,7 +11,7 @@ namespace bx { inline uint32_t toUnorm(float _value, float _scale) { - return uint32_t(fround(fsaturate(_value) * _scale) ); + return uint32_t(round(clamp(_value, 0.0f, 1.0f) * _scale) ); } inline float fromUnorm(uint32_t _value, float _scale) @@ -21,14 +21,14 @@ namespace bx inline int32_t toSnorm(float _value, float _scale) { - return int32_t(fround( - fclamp(_value, -1.0f, 1.0f) * _scale) + return int32_t(round( + clamp(_value, -1.0f, 1.0f) * _scale) ); } inline float fromSnorm(int32_t _value, float _scale) { - return fmax(-1.0f, float(_value) / _scale); + return max(-1.0f, float(_value) / _scale); } // R8 @@ -713,24 +713,24 @@ namespace bx const int32_t expBias = (1<<(ExpBits - 1) ) - 1; const float sharedExpMax = float(expMax) / float(expMax + 1) * float(1 << (expMax - expBias) ); - const float rr = fclamp(_src[0], 0.0f, sharedExpMax); - const float gg = fclamp(_src[1], 0.0f, sharedExpMax); - const float bb = fclamp(_src[2], 0.0f, sharedExpMax); - const float max = fmax3(rr, gg, bb); - union { float ff; uint32_t ui; } cast = { max }; + const float rr = clamp(_src[0], 0.0f, sharedExpMax); + const float gg = clamp(_src[1], 0.0f, sharedExpMax); + const float bb = clamp(_src[2], 0.0f, sharedExpMax); + const float mm = max(rr, gg, bb); + union { float ff; uint32_t ui; } cast = { mm }; int32_t expShared = int32_t(uint32_imax(uint32_t(-expBias-1), ( ( (cast.ui>>23) & 0xff) - 127) ) ) + 1 + expBias; - float denom = fpow(2.0f, float(expShared - expBias - MantissaBits) ); + float denom = pow(2.0f, float(expShared - expBias - MantissaBits) ); - if ( (1<>30) & 0x3) ) / 3.0f; } - // R11G11B10F - inline void packR11G11B10F(void* _dst, const float* _src) + // RG11B10F + inline void packRG11B10F(void* _dst, const float* _src) { *( (uint32_t*)_dst) = 0 | ( (halfFromFloat(_src[0])>> 4) & 0x7ff) @@ -934,7 +934,7 @@ namespace bx ; } - inline void unpackR11G11B10F(float* _dst, const void* _src) + inline void unpackRG11B10F(float* _dst, const void* _src) { uint32_t packed = *( (const uint32_t*)_src); _dst[0] = halfToFloat( (packed<< 4) & 0x7ff0); diff --git a/3rdparty/bx/include/bx/inline/readerwriter.inl b/3rdparty/bx/include/bx/inline/readerwriter.inl index c2eb72a..7a8ded1 100644 --- a/3rdparty/bx/include/bx/inline/readerwriter.inl +++ b/3rdparty/bx/include/bx/inline/readerwriter.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -29,6 +29,10 @@ namespace bx { } + inline ProcessOpenI::~ProcessOpenI() + { + } + inline CloserI::~CloserI() { } @@ -196,10 +200,10 @@ namespace bx inline MemoryWriter::MemoryWriter(MemoryBlockI* _memBlock) : m_memBlock(_memBlock) - , m_data(NULL) - , m_pos(0) - , m_top(0) - , m_size(0) + , m_data(NULL) + , m_pos(0) + , m_top(0) + , m_size(0) { } @@ -293,6 +297,16 @@ namespace bx return _writer->write(_data, _size, _err); } + inline int32_t write(WriterI* _writer, const char* _str, Error* _err) + { + return write(_writer, _str, strLen(_str), _err); + } + + inline int32_t write(WriterI* _writer, const StringView& _str, Error* _err) + { + return write(_writer, _str.getPtr(), _str.getLength(), _err); + } + inline int32_t writeRep(WriterI* _writer, uint8_t _byte, int32_t _size, Error* _err) { BX_ERROR_SCOPE(_err); @@ -377,11 +391,19 @@ namespace bx inline int64_t getSize(SeekerI* _seeker) { int64_t offset = _seeker->seek(); - int64_t size = _seeker->seek(0, Whence::End); + int64_t size = _seeker->seek(0, Whence::End); _seeker->seek(offset, Whence::Begin); return size; } + inline int64_t getRemain(SeekerI* _seeker) + { + int64_t offset = _seeker->seek(); + int64_t size = _seeker->seek(0, Whence::End); + _seeker->seek(offset, Whence::Begin); + return size-offset; + } + inline int32_t peek(ReaderSeekerI* _reader, void* _data, int32_t _size, Error* _err) { BX_ERROR_SCOPE(_err); @@ -432,18 +454,24 @@ namespace bx return 0; } - inline bool open(ReaderOpenI* _reader, const char* _filePath, Error* _err) + inline bool open(ReaderOpenI* _reader, const FilePath& _filePath, Error* _err) { BX_ERROR_USE_TEMP_WHEN_NULL(_err); return _reader->open(_filePath, _err); } - inline bool open(WriterOpenI* _writer, const char* _filePath, bool _append, Error* _err) + inline bool open(WriterOpenI* _writer, const FilePath& _filePath, bool _append, Error* _err) { BX_ERROR_USE_TEMP_WHEN_NULL(_err); return _writer->open(_filePath, _append, _err); } + inline bool open(ProcessOpenI* _process, const FilePath& _filePath, const StringView& _args, Error* _err) + { + BX_ERROR_USE_TEMP_WHEN_NULL(_err); + return _process->open(_filePath, _args, _err); + } + inline void close(CloserI* _reader) { _reader->close(); diff --git a/3rdparty/bx/include/bx/inline/ringbuffer.inl b/3rdparty/bx/include/bx/inline/ringbuffer.inl index 9d8ab94..51f3655 100644 --- a/3rdparty/bx/include/bx/inline/ringbuffer.inl +++ b/3rdparty/bx/include/bx/inline/ringbuffer.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/inline/rng.inl b/3rdparty/bx/include/bx/inline/rng.inl index 11b466d..8261a75 100644 --- a/3rdparty/bx/include/bx/inline/rng.inl +++ b/3rdparty/bx/include/bx/inline/rng.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -28,25 +28,6 @@ namespace bx return (m_z<<16)+m_w; } - inline RngFib::RngFib(uint32_t _a, uint32_t _b) - : m_a(_a) - , m_b(_b) - { - } - - inline void RngFib::reset(uint32_t _a, uint32_t _b) - { - m_a = _a; - m_b = _b; - } - - inline uint32_t RngFib::gen() - { - m_b = m_a+m_b; - m_a = m_b-m_a; - return m_a; - } - inline RngShr3::RngShr3(uint32_t _jsr) : m_jsr(_jsr) { @@ -81,22 +62,22 @@ namespace bx template inline void randUnitCircle(float _result[3], Rng* _rng) { - const float angle = frnd(_rng) * pi * 2.0f; + const float angle = frnd(_rng) * kPi2; - _result[0] = fcos(angle); + _result[0] = cos(angle); _result[1] = 0.0f; - _result[2] = fsin(angle); + _result[2] = sin(angle); } template inline void randUnitSphere(float _result[3], Rng* _rng) { const float rand0 = frnd(_rng) * 2.0f - 1.0f; - const float rand1 = frnd(_rng) * pi * 2.0f; - const float sqrtf1 = fsqrt(1.0f - rand0*rand0); + const float rand1 = frnd(_rng) * kPi2; + const float sqrtf1 = sqrt(1.0f - rand0*rand0); - _result[0] = sqrtf1 * fcos(rand1); - _result[1] = sqrtf1 * fsin(rand1); + _result[0] = sqrtf1 * cos(rand1); + _result[1] = sqrtf1 * sin(rand1); _result[2] = rand0; } @@ -140,14 +121,14 @@ namespace bx tt = 2.0f * tt - 1.0f; const float phi = (ii + 0.5f) / _num; - const float phirad = phi * 2.0f * pi; - const float st = fsqrt(1.0f-tt*tt) * _scale; + const float phirad = phi * kPi2; + const float st = sqrt(1.0f-tt*tt) * _scale; float* xyz = (float*)data; data += _stride; - xyz[0] = st * fcos(phirad); - xyz[1] = st * fsin(phirad); + xyz[0] = st * cos(phirad); + xyz[1] = st * sin(phirad); xyz[2] = tt * _scale; } } diff --git a/3rdparty/bx/include/bx/inline/simd128_langext.inl b/3rdparty/bx/include/bx/inline/simd128_langext.inl index c89e612..457b108 100644 --- a/3rdparty/bx/include/bx/inline/simd128_langext.inl +++ b/3rdparty/bx/include/bx/inline/simd128_langext.inl @@ -1,58 +1,27 @@ /* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ -#ifndef BX_SIMD128_LANGEXT_H_HEADER_GUARD -#define BX_SIMD128_LANGEXT_H_HEADER_GUARD - -#define simd_rcp simd_rcp_ni -#define simd_orx simd_orx_ni -#define simd_orc simd_orc_ni -#define simd_neg simd_neg_ni -#define simd_madd simd_madd_ni -#define simd_nmsub simd_nmsub_ni -#define simd_div_nr simd_div_nr_ni -#define simd_selb simd_selb_ni -#define simd_sels simd_sels_ni -#define simd_not simd_not_ni -#define simd_abs simd_abs_ni -#define simd_clamp simd_clamp_ni -#define simd_lerp simd_lerp_ni -#define simd_rcp_est simd_rcp_ni -#define simd_rsqrt simd_rsqrt_ni -#define simd_rsqrt_nr simd_rsqrt_nr_ni -#define simd_rsqrt_carmack simd_rsqrt_carmack_ni -#define simd_sqrt_nr simd_sqrt_nr_ni -#define simd_log2 simd_log2_ni -#define simd_exp2 simd_exp2_ni -#define simd_pow simd_pow_ni -#define simd_cross3 simd_cross3_ni -#define simd_normalize3 simd_normalize3_ni -#define simd_dot3 simd_dot3_ni -#define simd_dot simd_dot_ni -#define simd_ceil simd_ceil_ni -#define simd_floor simd_floor_ni -#define simd_min simd_min_ni -#define simd_max simd_max_ni -#define simd_imin simd_imin_ni -#define simd_imax simd_imax_ni - -#include "simd_ni.inl" +#ifndef BX_SIMD_T_H_HEADER_GUARD +# error "Must be included from bx/simd_t.h!" +#endif // BX_SIMD_T_H_HEADER_GUARD namespace bx { + BX_CONST_FUNC float sqrt(float); + #define ELEMx 0 #define ELEMy 1 #define ELEMz 2 #define ELEMw 3 -#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - template<> \ - BX_SIMD_FORCE_INLINE simd128_langext_t simd_swiz_##_x##_y##_z##_w(simd128_langext_t _a) \ - { \ - simd128_langext_t result; \ +#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ + template<> \ + BX_SIMD_FORCE_INLINE simd128_langext_t simd_swiz_##_x##_y##_z##_w(simd128_langext_t _a) \ + { \ + simd128_langext_t result; \ result.vf = __builtin_shufflevector(_a.vf, _a.vf, ELEM##_x, ELEM##_y, ELEM##_z, ELEM##_w); \ - return result; \ + return result; \ } #include "simd128_swizzle.inl" @@ -63,27 +32,27 @@ namespace bx #undef ELEMy #undef ELEMx -#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ - template<> \ +#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ + template<> \ BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_langext_t _test) \ - { \ - uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ - | ( (_test.uxyzw[2]>>31)<<2) \ - | ( (_test.uxyzw[1]>>31)<<1) \ - | ( _test.uxyzw[0]>>31) \ - ; \ - return 0 != (tmp&(_mask) ); \ - } \ - \ - template<> \ + { \ + uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ + | ( (_test.uxyzw[2]>>31)<<2) \ + | ( (_test.uxyzw[1]>>31)<<1) \ + | ( _test.uxyzw[0]>>31) \ + ; \ + return 0 != (tmp&(_mask) ); \ + } \ + \ + template<> \ BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_langext_t _test) \ - { \ - uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ - | ( (_test.uxyzw[2]>>31)<<2) \ - | ( (_test.uxyzw[1]>>31)<<1) \ - | ( _test.uxyzw[0]>>31) \ - ; \ - return (_mask) == (tmp&(_mask) ); \ + { \ + uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ + | ( (_test.uxyzw[2]>>31)<<2) \ + | ( (_test.uxyzw[1]>>31)<<1) \ + | ( _test.uxyzw[0]>>31) \ + ; \ + return (_mask) == (tmp&(_mask) ); \ } BX_SIMD128_IMPLEMENT_TEST(x , 0x1); @@ -145,7 +114,7 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); } template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_yBxA(simd128_langext_t _a, simd128_langext_t _b) + BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_AxBy(simd128_langext_t _a, simd128_langext_t _b) { simd128_langext_t result; result.vf = __builtin_shufflevector(_a.vf, _b.vf, 1, 5, 0, 4); @@ -351,10 +320,10 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); BX_SIMD_FORCE_INLINE simd128_langext_t simd_sqrt(simd128_langext_t _a) { simd128_langext_t result; - result.vf[0] = sqrtf(_a.vf[0]); - result.vf[1] = sqrtf(_a.vf[1]); - result.vf[2] = sqrtf(_a.vf[2]); - result.vf[3] = sqrtf(_a.vf[3]); + result.vf[0] = sqrt(_a.vf[0]); + result.vf[1] = sqrt(_a.vf[1]); + result.vf[2] = sqrt(_a.vf[2]); + result.vf[3] = sqrt(_a.vf[3]); return result; } @@ -362,10 +331,10 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); BX_SIMD_FORCE_INLINE simd128_langext_t simd_rsqrt_est(simd128_langext_t _a) { simd128_langext_t result; - result.vf[0] = 1.0f / sqrtf(_a.vf[0]); - result.vf[1] = 1.0f / sqrtf(_a.vf[1]); - result.vf[2] = 1.0f / sqrtf(_a.vf[2]); - result.vf[3] = 1.0f / sqrtf(_a.vf[3]); + result.vf[0] = 1.0f / sqrt(_a.vf[0]); + result.vf[1] = 1.0f / sqrt(_a.vf[1]); + result.vf[2] = 1.0f / sqrt(_a.vf[2]); + result.vf[3] = 1.0f / sqrt(_a.vf[3]); return result; } @@ -508,8 +477,192 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); return result; } + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_rcp(simd128_langext_t _a) + { + return simd_rcp_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_orx(simd128_langext_t _a) + { + return simd_orx_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_orc(simd128_langext_t _a, simd128_langext_t _b) + { + return simd_orc_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_neg(simd128_langext_t _a) + { + return simd_neg_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_madd(simd128_langext_t _a, simd128_langext_t _b, simd128_langext_t _c) + { + return simd_madd_ni(_a, _b, _c); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_nmsub(simd128_langext_t _a, simd128_langext_t _b, simd128_langext_t _c) + { + return simd_nmsub_ni(_a, _b, _c); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_div_nr(simd128_langext_t _a, simd128_langext_t _b) + { + return simd_div_nr_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_selb(simd128_langext_t _mask, simd128_langext_t _a, simd128_langext_t _b) + { + return simd_selb_ni(_mask, _a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_sels(simd128_langext_t _test, simd128_langext_t _a, simd128_langext_t _b) + { + return simd_sels_ni(_test, _a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_not(simd128_langext_t _a) + { + return simd_not_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_abs(simd128_langext_t _a) + { + return simd_abs_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_clamp(simd128_langext_t _a, simd128_langext_t _min, simd128_langext_t _max) + { + return simd_clamp_ni(_a, _min, _max); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_lerp(simd128_langext_t _a, simd128_langext_t _b, simd128_langext_t _s) + { + return simd_lerp_ni(_a, _b, _s); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_rcp_est(simd128_langext_t _a) + { + return simd_rcp_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_rsqrt(simd128_langext_t _a) + { + return simd_rsqrt_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_rsqrt_nr(simd128_langext_t _a) + { + return simd_rsqrt_nr_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_rsqrt_carmack(simd128_langext_t _a) + { + return simd_rsqrt_carmack_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_sqrt_nr(simd128_langext_t _a) + { + return simd_sqrt_nr_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_log2(simd128_langext_t _a) + { + return simd_log2_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_exp2(simd128_langext_t _a) + { + return simd_exp2_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_pow(simd128_langext_t _a, simd128_langext_t _b) + { + return simd_pow_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_cross3(simd128_langext_t _a, simd128_langext_t _b) + { + return simd_cross3_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_normalize3(simd128_langext_t _a) + { + return simd_normalize3_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_dot3(simd128_langext_t _a, simd128_langext_t _b) + { + return simd_dot3_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_dot(simd128_langext_t _a, simd128_langext_t _b) + { + return simd_dot_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_ceil(simd128_langext_t _a) + { + return simd_ceil_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_floor(simd128_langext_t _a) + { + return simd_floor_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_min(simd128_langext_t _a, simd128_langext_t _b) + { + return simd_min_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_max(simd128_langext_t _a, simd128_langext_t _b) + { + return simd_max_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_imin(simd128_langext_t _a, simd128_langext_t _b) + { + return simd_imin_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_langext_t simd_imax(simd128_langext_t _a, simd128_langext_t _b) + { + return simd_imax_ni(_a, _b); + } + typedef simd128_langext_t simd128_t; } // namespace bx - -#endif // BX_SIMD128_LANGEXT_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/inline/simd128_neon.inl b/3rdparty/bx/include/bx/inline/simd128_neon.inl index 1dd0d1f..95107ee 100644 --- a/3rdparty/bx/include/bx/inline/simd128_neon.inl +++ b/3rdparty/bx/include/bx/inline/simd128_neon.inl @@ -1,41 +1,11 @@ /* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ -#ifndef BX_SIMD128_NEON_H_HEADER_GUARD -#define BX_SIMD128_NEON_H_HEADER_GUARD - -#define simd_rcp simd_rcp_ni -#define simd_orx simd_orx_ni -#define simd_orc simd_orc_ni -#define simd_neg simd_neg_ni -#define simd_madd simd_madd_ni -#define simd_nmsub simd_nmsub_ni -#define simd_div_nr simd_div_nr_ni -#define simd_div simd_div_nr_ni -#define simd_selb simd_selb_ni -#define simd_sels simd_sels_ni -#define simd_not simd_not_ni -#define simd_abs simd_abs_ni -#define simd_clamp simd_clamp_ni -#define simd_lerp simd_lerp_ni -#define simd_rsqrt simd_rsqrt_ni -#define simd_rsqrt_nr simd_rsqrt_nr_ni -#define simd_rsqrt_carmack simd_rsqrt_carmack_ni -#define simd_sqrt_nr simd_sqrt_nr_ni -#define simd_sqrt simd_sqrt_nr_ni -#define simd_log2 simd_log2_ni -#define simd_exp2 simd_exp2_ni -#define simd_pow simd_pow_ni -#define simd_cross3 simd_cross3_ni -#define simd_normalize3 simd_normalize3_ni -#define simd_dot3 simd_dot3_ni -#define simd_dot simd_dot_ni -#define simd_ceil simd_ceil_ni -#define simd_floor simd_floor_ni - -#include "simd_ni.inl" +#ifndef BX_SIMD_T_H_HEADER_GUARD +# error "Must be included from bx/simd_t.h!" +#endif // BX_SIMD_T_H_HEADER_GUARD namespace bx { @@ -43,10 +13,10 @@ namespace bx #define ELEMy 1 #define ELEMz 2 #define ELEMw 3 -#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - template<> \ - BX_SIMD_FORCE_INLINE simd128_neon_t simd_swiz_##_x##_y##_z##_w(simd128_neon_t _a) \ - { \ +#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ + template<> \ + BX_SIMD_FORCE_INLINE simd128_neon_t simd_swiz_##_x##_y##_z##_w(simd128_neon_t _a) \ + { \ return __builtin_shuffle(_a, (uint32x4_t){ ELEM##_x, ELEM##_y, ELEM##_z, ELEM##_w }); \ } @@ -58,19 +28,19 @@ namespace bx #undef ELEMy #undef ELEMx -#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _swizzle) \ - template<> \ +#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _swizzle) \ + template<> \ BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_neon_t _test) \ - { \ - const simd128_neon_t tmp0 = simd_swiz_##_swizzle(_test); \ - return simd_test_any_ni(tmp0); \ - } \ - \ - template<> \ + { \ + const simd128_neon_t tmp0 = simd_swiz_##_swizzle(_test); \ + return simd_test_any_ni(tmp0); \ + } \ + \ + template<> \ BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_neon_t _test) \ - { \ - const simd128_neon_t tmp0 = simd_swiz_##_swizzle(_test); \ - return simd_test_all_ni(tmp0); \ + { \ + const simd128_neon_t tmp0 = simd_swiz_##_swizzle(_test); \ + return simd_test_all_ni(tmp0); \ } BX_SIMD128_IMPLEMENT_TEST(x, xxxx); @@ -132,7 +102,7 @@ BX_SIMD128_IMPLEMENT_TEST(yzw, yzww); } template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_yBxA(simd128_neon_t _a, simd128_neon_t _b) + BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_AxBy(simd128_neon_t _a, simd128_neon_t _b) { return __builtin_shuffle(_a, _b, (uint32x4_t){ 1, 5, 0, 4 }); } @@ -454,18 +424,6 @@ BX_SIMD128_IMPLEMENT_TEST(yzw, yzww); return result; } - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_madd(simd128_neon_t _a, simd128_neon_t _b, simd128_neon_t _c) - { - return vmlaq_f32(_c, _a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_nmsub(simd128_neon_t _a, simd128_neon_t _b, simd128_neon_t _c) - { - return vmlsq_f32(_c, _a, _b); - } - template<> BX_SIMD_FORCE_INLINE simd128_neon_t simd_icmpeq(simd128_neon_t _a, simd128_neon_t _b) { @@ -555,8 +513,174 @@ BX_SIMD128_IMPLEMENT_TEST(yzw, yzww); return simd_shuf_yBwD_ni(_a, _b); } + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_rcp(simd128_neon_t _a) + { + return simd_rcp_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_orx(simd128_neon_t _a) + { + return simd_orx_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_orc(simd128_neon_t _a, simd128_neon_t _b) + { + return simd_orc_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_neg(simd128_neon_t _a) + { + return simd_neg_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_madd(simd128_neon_t _a, simd128_neon_t _b, simd128_neon_t _c) + { + return simd_madd_ni(_a, _b, _c); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_nmsub(simd128_neon_t _a, simd128_neon_t _b, simd128_neon_t _c) + { + return simd_nmsub_ni(_a, _b, _c); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_div_nr(simd128_neon_t _a, simd128_neon_t _b) + { + return simd_div_nr_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_div(simd128_neon_t _a, simd128_neon_t _b) + { + return simd_div_nr_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_selb(simd128_neon_t _mask, simd128_neon_t _a, simd128_neon_t _b) + { + return simd_selb_ni(_mask, _a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_sels(simd128_neon_t _test, simd128_neon_t _a, simd128_neon_t _b) + { + return simd_sels_ni(_test, _a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_not(simd128_neon_t _a) + { + return simd_not_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_abs(simd128_neon_t _a) + { + return simd_abs_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_clamp(simd128_neon_t _a, simd128_neon_t _min, simd128_neon_t _max) + { + return simd_clamp_ni(_a, _min, _max); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_lerp(simd128_neon_t _a, simd128_neon_t _b, simd128_neon_t _s) + { + return simd_lerp_ni(_a, _b, _s); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_rsqrt(simd128_neon_t _a) + { + return simd_rsqrt_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_rsqrt_nr(simd128_neon_t _a) + { + return simd_rsqrt_nr_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_rsqrt_carmack(simd128_neon_t _a) + { + return simd_rsqrt_carmack_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_sqrt_nr(simd128_neon_t _a) + { + return simd_sqrt_nr_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_sqrt(simd128_neon_t _a) + { + return simd_sqrt_nr_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_log2(simd128_neon_t _a) + { + return simd_log2_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_exp2(simd128_neon_t _a) + { + return simd_exp2_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_pow(simd128_neon_t _a, simd128_neon_t _b) + { + return simd_pow_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_cross3(simd128_neon_t _a, simd128_neon_t _b) + { + return simd_cross3_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_normalize3(simd128_neon_t _a) + { + return simd_normalize3_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_dot3(simd128_neon_t _a, simd128_neon_t _b) + { + return simd_dot3_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_dot(simd128_neon_t _a, simd128_neon_t _b) + { + return simd_dot_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_ceil(simd128_neon_t _a) + { + return simd_ceil_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_neon_t simd_floor(simd128_neon_t _a) + { + return simd_floor_ni(_a); + } + typedef simd128_neon_t simd128_t; } // namespace bx - -#endif // BX_SIMD128_NEON_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/inline/simd128_ref.inl b/3rdparty/bx/include/bx/inline/simd128_ref.inl index e85ae14..6895b24 100644 --- a/3rdparty/bx/include/bx/inline/simd128_ref.inl +++ b/3rdparty/bx/include/bx/inline/simd128_ref.inl @@ -1,58 +1,31 @@ /* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ -#ifndef BX_SIMD128_REF_H_HEADER_GUARD -#define BX_SIMD128_REF_H_HEADER_GUARD - -#define simd_shuf_xAzC simd_shuf_xAzC_ni -#define simd_shuf_yBwD simd_shuf_yBwD_ni -#define simd_rcp simd_rcp_ni -#define simd_orx simd_orx_ni -#define simd_orc simd_orc_ni -#define simd_neg simd_neg_ni -#define simd_madd simd_madd_ni -#define simd_nmsub simd_nmsub_ni -#define simd_div_nr simd_div_nr_ni -#define simd_selb simd_selb_ni -#define simd_sels simd_sels_ni -#define simd_not simd_not_ni -#define simd_abs simd_abs_ni -#define simd_clamp simd_clamp_ni -#define simd_lerp simd_lerp_ni -#define simd_rsqrt simd_rsqrt_ni -#define simd_rsqrt_nr simd_rsqrt_nr_ni -#define simd_rsqrt_carmack simd_rsqrt_carmack_ni -#define simd_sqrt_nr simd_sqrt_nr_ni -#define simd_log2 simd_log2_ni -#define simd_exp2 simd_exp2_ni -#define simd_pow simd_pow_ni -#define simd_cross3 simd_cross3_ni -#define simd_normalize3 simd_normalize3_ni -#define simd_dot3 simd_dot3_ni -#define simd_dot simd_dot_ni -#define simd_ceil simd_ceil_ni -#define simd_floor simd_floor_ni - -#include "simd_ni.inl" +#ifndef BX_SIMD_T_H_HEADER_GUARD +# error "Must be included from bx/simd_t.h!" +#endif // BX_SIMD_T_H_HEADER_GUARD namespace bx { + BX_CONST_FUNC float sqrt(float); + BX_CONST_FUNC float rsqrt(float); + #define ELEMx 0 #define ELEMy 1 #define ELEMz 2 #define ELEMw 3 -#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - template<> \ +#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ + template<> \ BX_SIMD_FORCE_INLINE simd128_ref_t simd_swiz_##_x##_y##_z##_w(simd128_ref_t _a) \ - { \ - simd128_ref_t result; \ - result.ixyzw[0] = _a.ixyzw[ELEM##_x]; \ - result.ixyzw[1] = _a.ixyzw[ELEM##_y]; \ - result.ixyzw[2] = _a.ixyzw[ELEM##_z]; \ - result.ixyzw[3] = _a.ixyzw[ELEM##_w]; \ - return result; \ + { \ + simd128_ref_t result; \ + result.ixyzw[0] = _a.ixyzw[ELEM##_x]; \ + result.ixyzw[1] = _a.ixyzw[ELEM##_y]; \ + result.ixyzw[2] = _a.ixyzw[ELEM##_z]; \ + result.ixyzw[3] = _a.ixyzw[ELEM##_w]; \ + return result; \ } #include "simd128_swizzle.inl" @@ -63,27 +36,27 @@ namespace bx #undef ELEMy #undef ELEMx -#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ - template<> \ +#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ + template<> \ BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_ref_t _test) \ - { \ - uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ - | ( (_test.uxyzw[2]>>31)<<2) \ - | ( (_test.uxyzw[1]>>31)<<1) \ - | ( _test.uxyzw[0]>>31) \ - ; \ - return 0 != (tmp&(_mask) ); \ - } \ - \ - template<> \ + { \ + uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ + | ( (_test.uxyzw[2]>>31)<<2) \ + | ( (_test.uxyzw[1]>>31)<<1) \ + | ( _test.uxyzw[0]>>31) \ + ; \ + return 0 != (tmp&(_mask) ); \ + } \ + \ + template<> \ BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_ref_t _test) \ - { \ - uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ - | ( (_test.uxyzw[2]>>31)<<2) \ - | ( (_test.uxyzw[1]>>31)<<1) \ - | ( _test.uxyzw[0]>>31) \ - ; \ - return (_mask) == (tmp&(_mask) ); \ + { \ + uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ + | ( (_test.uxyzw[2]>>31)<<2) \ + | ( (_test.uxyzw[1]>>31)<<1) \ + | ( _test.uxyzw[0]>>31) \ + ; \ + return (_mask) == (tmp&(_mask) ); \ } BX_SIMD128_IMPLEMENT_TEST(x , 0x1); @@ -160,7 +133,7 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); } template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_yBxA(simd128_ref_t _a, simd128_ref_t _b) + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_AxBy(simd128_ref_t _a, simd128_ref_t _b) { simd128_ref_t result; result.uxyzw[0] = _a.uxyzw[1]; @@ -394,10 +367,10 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); BX_SIMD_FORCE_INLINE simd128_ref_t simd_sqrt(simd128_ref_t _a) { simd128_ref_t result; - result.fxyzw[0] = fsqrt(_a.fxyzw[0]); - result.fxyzw[1] = fsqrt(_a.fxyzw[1]); - result.fxyzw[2] = fsqrt(_a.fxyzw[2]); - result.fxyzw[3] = fsqrt(_a.fxyzw[3]); + result.fxyzw[0] = sqrt(_a.fxyzw[0]); + result.fxyzw[1] = sqrt(_a.fxyzw[1]); + result.fxyzw[2] = sqrt(_a.fxyzw[2]); + result.fxyzw[3] = sqrt(_a.fxyzw[3]); return result; } @@ -405,10 +378,10 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); BX_SIMD_FORCE_INLINE simd128_ref_t simd_rsqrt_est(simd128_ref_t _a) { simd128_ref_t result; - result.fxyzw[0] = 1.0f / fsqrt(_a.fxyzw[0]); - result.fxyzw[1] = 1.0f / fsqrt(_a.fxyzw[1]); - result.fxyzw[2] = 1.0f / fsqrt(_a.fxyzw[2]); - result.fxyzw[3] = 1.0f / fsqrt(_a.fxyzw[3]); + result.fxyzw[0] = rsqrt(_a.fxyzw[0]); + result.fxyzw[1] = rsqrt(_a.fxyzw[1]); + result.fxyzw[2] = rsqrt(_a.fxyzw[2]); + result.fxyzw[3] = rsqrt(_a.fxyzw[3]); return result; } @@ -643,6 +616,207 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); return result; } -} // namespace bx + BX_SIMD_FORCE_INLINE simd128_t simd_zero() + { + return simd_zero(); + } -#endif // BX_SIMD128_REF_H_HEADER_GUARD + BX_SIMD_FORCE_INLINE simd128_t simd_ld(const void* _ptr) + { + return simd_ld(_ptr); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_ld(float _x, float _y, float _z, float _w) + { + return simd_ld(_x, _y, _z, _w); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) + { + return simd_ild(_x, _y, _z, _w); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_splat(const void* _ptr) + { + return simd_splat(_ptr); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_splat(float _a) + { + return simd_splat(_a); + } + + BX_SIMD_FORCE_INLINE simd128_t simd_isplat(uint32_t _a) + { + return simd_isplat(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_xAzC(simd128_ref_t _a, simd128_ref_t _b) + { + return simd_shuf_xAzC_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_yBwD(simd128_ref_t _a, simd128_ref_t _b) + { + return simd_shuf_yBwD_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_rcp(simd128_ref_t _a) + { + return simd_rcp_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_orx(simd128_ref_t _a) + { + return simd_orx_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_orc(simd128_ref_t _a, simd128_ref_t _b) + { + return simd_orc_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_neg(simd128_ref_t _a) + { + return simd_neg_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_madd(simd128_ref_t _a, simd128_ref_t _b, simd128_ref_t _c) + { + return simd_madd_ni(_a, _b, _c); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_nmsub(simd128_ref_t _a, simd128_ref_t _b, simd128_ref_t _c) + { + return simd_nmsub_ni(_a, _b, _c); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_div_nr(simd128_ref_t _a, simd128_ref_t _b) + { + return simd_div_nr_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_selb(simd128_ref_t _mask, simd128_ref_t _a, simd128_ref_t _b) + { + return simd_selb_ni(_mask, _a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_sels(simd128_ref_t _test, simd128_ref_t _a, simd128_ref_t _b) + { + return simd_sels_ni(_test, _a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_not(simd128_ref_t _a) + { + return simd_not_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_abs(simd128_ref_t _a) + { + return simd_abs_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_clamp(simd128_ref_t _a, simd128_ref_t _min, simd128_ref_t _max) + { + return simd_clamp_ni(_a, _min, _max); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_lerp(simd128_ref_t _a, simd128_ref_t _b, simd128_ref_t _s) + { + return simd_lerp_ni(_a, _b, _s); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_rsqrt(simd128_ref_t _a) + { + return simd_rsqrt_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_rsqrt_nr(simd128_ref_t _a) + { + return simd_rsqrt_nr_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_rsqrt_carmack(simd128_ref_t _a) + { + return simd_rsqrt_carmack_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_sqrt_nr(simd128_ref_t _a) + { + return simd_sqrt_nr_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_log2(simd128_ref_t _a) + { + return simd_log2_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_exp2(simd128_ref_t _a) + { + return simd_exp2_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_pow(simd128_ref_t _a, simd128_ref_t _b) + { + return simd_pow_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_cross3(simd128_ref_t _a, simd128_ref_t _b) + { + return simd_cross3_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_normalize3(simd128_ref_t _a) + { + return simd_normalize3_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_dot3(simd128_ref_t _a, simd128_ref_t _b) + { + return simd_dot3_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_dot(simd128_ref_t _a, simd128_ref_t _b) + { + return simd_dot_ni(_a, _b); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_ceil(simd128_ref_t _a) + { + return simd_ceil_ni(_a); + } + + template<> + BX_SIMD_FORCE_INLINE simd128_ref_t simd_floor(simd128_ref_t _a) + { + return simd_floor_ni(_a); + } + +} // namespace bx diff --git a/3rdparty/bx/include/bx/inline/simd128_sse.inl b/3rdparty/bx/include/bx/inline/simd128_sse.inl index b0ed852..229c143 100644 --- a/3rdparty/bx/include/bx/inline/simd128_sse.inl +++ b/3rdparty/bx/include/bx/inline/simd128_sse.inl @@ -1,12 +1,11 @@ /* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ -#ifndef BX_SIMD128_SSE_H_HEADER_GUARD -#define BX_SIMD128_SSE_H_HEADER_GUARD - -#include "simd_ni.inl" +#ifndef BX_SIMD_T_H_HEADER_GUARD +# error "Must be included from bx/simd_t.h!" +#endif // BX_SIMD_T_H_HEADER_GUARD namespace bx { @@ -14,10 +13,10 @@ namespace bx #define ELEMy 1 #define ELEMz 2 #define ELEMw 3 -#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - template<> \ - BX_SIMD_FORCE_INLINE simd128_sse_t simd_swiz_##_x##_y##_z##_w(simd128_sse_t _a) \ - { \ +#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ + template<> \ + BX_SIMD_FORCE_INLINE simd128_sse_t simd_swiz_##_x##_y##_z##_w(simd128_sse_t _a) \ + { \ return _mm_shuffle_ps( _a, _a, _MM_SHUFFLE(ELEM##_w, ELEM##_z, ELEM##_y, ELEM##_x ) ); \ } @@ -29,17 +28,17 @@ namespace bx #undef ELEMy #undef ELEMx -#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ - template<> \ +#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ + template<> \ BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_sse_t _test) \ - { \ - return 0x0 != (_mm_movemask_ps(_test)&(_mask) ); \ - } \ - \ - template<> \ + { \ + return 0x0 != (_mm_movemask_ps(_test)&(_mask) ); \ + } \ + \ + template<> \ BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_sse_t _test) \ - { \ - return (_mask) == (_mm_movemask_ps(_test)&(_mask) ); \ + { \ + return (_mask) == (_mm_movemask_ps(_test)&(_mask) ); \ } BX_SIMD128_IMPLEMENT_TEST(x , 0x1); @@ -91,7 +90,7 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); } template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_yBxA(simd128_sse_t _a, simd128_sse_t _b) + BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_AxBy(simd128_sse_t _a, simd128_sse_t _b) { return _mm_unpacklo_ps(_b, _a); } @@ -643,5 +642,3 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); typedef simd128_sse_t simd128_t; } // namespace bx - -#endif // BX_SIMD128_SSE_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/inline/simd128_swizzle.inl b/3rdparty/bx/include/bx/inline/simd128_swizzle.inl index 4185be8..b1ff9a0 100644 --- a/3rdparty/bx/include/bx/inline/simd128_swizzle.inl +++ b/3rdparty/bx/include/bx/inline/simd128_swizzle.inl @@ -1,6 +1,6 @@ /* * Copyright 2010-2015 Branimir Karadzic. All rights reserved. - * License: http://www.opensource.org/licenses/BSD-2-Clause + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #ifndef BX_SIMD_T_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/inline/simd256_avx.inl b/3rdparty/bx/include/bx/inline/simd256_avx.inl index 5eed77b..4dd9c66 100644 --- a/3rdparty/bx/include/bx/inline/simd256_avx.inl +++ b/3rdparty/bx/include/bx/inline/simd256_avx.inl @@ -1,12 +1,11 @@ /* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ -#ifndef BX_SIMD256_AVX_H_HEADER_GUARD -#define BX_SIMD256_AVX_H_HEADER_GUARD - -#include "simd_ni.inl" +#ifndef BX_SIMD_T_H_HEADER_GUARD +# error "Must be included from bx/simd_t.h!" +#endif // BX_SIMD_T_H_HEADER_GUARD namespace bx { @@ -73,5 +72,3 @@ namespace bx typedef simd256_avx_t simd256_t; } // namespace bx - -#endif // BX_SIMD256_AVX_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/inline/simd256_ref.inl b/3rdparty/bx/include/bx/inline/simd256_ref.inl index 6d9a5a3..0c84d9d 100644 --- a/3rdparty/bx/include/bx/inline/simd256_ref.inl +++ b/3rdparty/bx/include/bx/inline/simd256_ref.inl @@ -1,12 +1,11 @@ /* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ -#ifndef BX_SIMD256_REF_H_HEADER_GUARD -#define BX_SIMD256_REF_H_HEADER_GUARD - -#include "simd_ni.inl" +#ifndef BX_SIMD_T_H_HEADER_GUARD +# error "Must be included from bx/simd_t.h!" +#endif // BX_SIMD_T_H_HEADER_GUARD namespace bx { @@ -83,5 +82,3 @@ namespace bx } } // namespace bx - -#endif // BX_SIMD256_REF_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/inline/simd_ni.inl b/3rdparty/bx/include/bx/inline/simd_ni.inl index 95767f2..eb38851 100644 --- a/3rdparty/bx/include/bx/inline/simd_ni.inl +++ b/3rdparty/bx/include/bx/inline/simd_ni.inl @@ -1,11 +1,8 @@ /* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ -#ifndef BX_SIMD_NI_H_HEADER_GUARD -#define BX_SIMD_NI_H_HEADER_GUARD - namespace bx { template @@ -554,5 +551,3 @@ namespace bx } } // namespace bx - -#endif // BX_SIMD_NI_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/inline/sort.inl b/3rdparty/bx/include/bx/inline/sort.inl index 1f5dcf2..27a0853 100644 --- a/3rdparty/bx/include/bx/inline/sort.inl +++ b/3rdparty/bx/include/bx/inline/sort.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/inline/spscqueue.inl b/3rdparty/bx/include/bx/inline/spscqueue.inl index 7d80f07..e0fae02 100644 --- a/3rdparty/bx/include/bx/inline/spscqueue.inl +++ b/3rdparty/bx/include/bx/inline/spscqueue.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -10,8 +10,9 @@ namespace bx { // http://drdobbs.com/article/print?articleId=210604448&siteSectionName= - inline SpScUnboundedQueue::SpScUnboundedQueue() - : m_first(new Node(NULL) ) + inline SpScUnboundedQueue::SpScUnboundedQueue(AllocatorI* _allocator) + : m_allocator(_allocator) + , m_first(BX_NEW(m_allocator, Node)(NULL) ) , m_divider(m_first) , m_last(m_first) { @@ -23,19 +24,19 @@ namespace bx { Node* node = m_first; m_first = node->m_next; - delete node; + BX_DELETE(m_allocator, node); } } inline void SpScUnboundedQueue::push(void* _ptr) { - m_last->m_next = new Node( (void*)_ptr); + m_last->m_next = BX_NEW(m_allocator, Node)(_ptr); atomicExchangePtr( (void**)&m_last, m_last->m_next); while (m_first != m_divider) { Node* node = m_first; m_first = m_first->m_next; - delete node; + BX_DELETE(m_allocator, node); } } @@ -68,7 +69,8 @@ namespace bx } template - inline SpScUnboundedQueueT::SpScUnboundedQueueT() + inline SpScUnboundedQueueT::SpScUnboundedQueueT(AllocatorI* _allocator) + : m_queue(_allocator) { } @@ -96,7 +98,8 @@ namespace bx } #if BX_CONFIG_SUPPORTS_THREADING - inline SpScBlockingUnboundedQueue::SpScBlockingUnboundedQueue() + inline SpScBlockingUnboundedQueue::SpScBlockingUnboundedQueue(AllocatorI* _allocator) + : m_queue(_allocator) { } @@ -106,7 +109,7 @@ namespace bx inline void SpScBlockingUnboundedQueue::push(void* _ptr) { - m_queue.push( (void*)_ptr); + m_queue.push(_ptr); m_count.post(); } @@ -126,7 +129,8 @@ namespace bx } template - inline SpScBlockingUnboundedQueueT::SpScBlockingUnboundedQueueT() + inline SpScBlockingUnboundedQueueT::SpScBlockingUnboundedQueueT(AllocatorI* _allocator) + : m_queue(_allocator) { } diff --git a/3rdparty/bx/include/bx/inline/string.inl b/3rdparty/bx/include/bx/inline/string.inl index 7b6f650..330f73b 100644 --- a/3rdparty/bx/include/bx/inline/string.inl +++ b/3rdparty/bx/include/bx/inline/string.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -43,8 +43,8 @@ namespace bx { Ty str = _str; typename Ty::size_type startPos = 0; - const typename Ty::size_type fromLen = strnlen(_from); - const typename Ty::size_type toLen = strnlen(_to); + const typename Ty::size_type fromLen = strLen(_from); + const typename Ty::size_type toLen = strLen(_to); while ( (startPos = str.find(_from, startPos) ) != Ty::npos) { str.replace(startPos, fromLen, _to); @@ -64,6 +64,12 @@ namespace bx set(_rhs.m_ptr, _rhs.m_len); } + inline StringView& StringView::operator=(const char* _rhs) + { + set(_rhs); + return *this; + } + inline StringView& StringView::operator=(const StringView& _rhs) { set(_rhs.m_ptr, _rhs.m_len); @@ -75,13 +81,18 @@ namespace bx set(_ptr, _len); } + inline StringView::StringView(const char* _ptr, const char* _term) + { + set(_ptr, _term); + } + inline void StringView::set(const char* _ptr, int32_t _len) { clear(); if (NULL != _ptr) { - int32_t len = strnlen(_ptr, _len); + int32_t len = strLen(_ptr, _len); if (0 != len) { m_len = len; @@ -90,6 +101,16 @@ namespace bx } } + inline void StringView::set(const char* _ptr, const char* _term) + { + set(_ptr, int32_t(_term-_ptr) ); + } + + inline void StringView::set(const StringView& _str) + { + set(_str.m_ptr, _str.m_len); + } + inline void StringView::clear() { m_ptr = ""; @@ -126,26 +147,20 @@ namespace bx inline StringT::StringT(const StringT& _rhs) : StringView() { - set(_rhs.m_ptr, _rhs.m_len); + set(_rhs); } template inline StringT& StringT::operator=(const StringT& _rhs) { - set(_rhs.m_ptr, _rhs.m_len); + set(_rhs); return *this; } - template - inline StringT::StringT(const char* _ptr, int32_t _len) - { - set(_ptr, _len); - } - template inline StringT::StringT(const StringView& _rhs) { - set(_rhs.getPtr(), _rhs.getLength() ); + set(_rhs); } template @@ -155,22 +170,22 @@ namespace bx } template - inline void StringT::set(const char* _ptr, int32_t _len) + inline void StringT::set(const StringView& _str) { clear(); - append(_ptr, _len); + append(_str); } template - inline void StringT::append(const char* _ptr, int32_t _len) + inline void StringT::append(const StringView& _str) { - if (0 != _len) + if (0 != _str.getLength() ) { int32_t old = m_len; - int32_t len = m_len + strnlen(_ptr, _len); + int32_t len = m_len + strLen(_str); char* ptr = (char*)BX_REALLOC(*AllocatorT, 0 != m_len ? const_cast(m_ptr) : NULL, len+1); m_len = len; - strlncpy(ptr + old, len-old+1, _ptr, _len); + strCopy(ptr + old, len-old+1, _str); *const_cast(&m_ptr) = ptr; } diff --git a/3rdparty/bx/include/bx/inline/uint32_t.inl b/3rdparty/bx/include/bx/inline/uint32_t.inl index 8a66a07..8b85bbe 100644 --- a/3rdparty/bx/include/bx/inline/uint32_t.inl +++ b/3rdparty/bx/include/bx/inline/uint32_t.inl @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -119,11 +119,21 @@ namespace bx return _a + _b; } + inline uint32_t uint32_iadd(uint32_t _a, uint32_t _b) + { + return int32_t(_a) + int32_t(_b); + } + inline uint32_t uint32_sub(uint32_t _a, uint32_t _b) { return _a - _b; } + inline uint32_t uint32_isub(uint32_t _a, uint32_t _b) + { + return int32_t(_a) - int32_t(_b); + } + inline uint32_t uint32_mul(uint32_t _a, uint32_t _b) { return _a * _b; diff --git a/3rdparty/bx/include/bx/macros.h b/3rdparty/bx/include/bx/macros.h index 1358507..f52f4d3 100644 --- a/3rdparty/bx/include/bx/macros.h +++ b/3rdparty/bx/include/bx/macros.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -68,18 +68,29 @@ # define BX_FUNCTION __PRETTY_FUNCTION__ # define BX_LIKELY(_x) __builtin_expect(!!(_x), 1) # define BX_UNLIKELY(_x) __builtin_expect(!!(_x), 0) -# define BX_NO_INLINE __attribute__( (noinline) ) -# define BX_NO_RETURN __attribute__( (noreturn) ) +# define BX_NO_INLINE __attribute__( (noinline) ) +# define BX_NO_RETURN __attribute__( (noreturn) ) +# define BX_CONST_FUNC __attribute__( (const) ) + +# if BX_COMPILER_GCC >= 70000 +# define BX_FALLTHROUGH __attribute__( (fallthrough) ) +# else +# define BX_FALLTHROUGH BX_NOOP() +# endif // BX_COMPILER_GCC >= 70000 + # define BX_NO_VTABLE -# define BX_OVERRIDE # define BX_PRINTF_ARGS(_format, _args) __attribute__( (format(__printf__, _format, _args) ) ) + # if BX_CLANG_HAS_FEATURE(cxx_thread_local) # define BX_THREAD_LOCAL __thread # endif // BX_COMPILER_CLANG + # if (!BX_PLATFORM_OSX && (BX_COMPILER_GCC >= 40200)) || (BX_COMPILER_GCC >= 40500) # define BX_THREAD_LOCAL __thread # endif // BX_COMPILER_GCC + # define BX_ATTRIBUTE(_x) __attribute__( (_x) ) + # if BX_CRT_MSVC # define __stdcall # endif // BX_CRT_MSVC @@ -92,8 +103,9 @@ # define BX_UNLIKELY(_x) (_x) # define BX_NO_INLINE __declspec(noinline) # define BX_NO_RETURN +# define BX_CONST_FUNC __declspec(noalias) +# define BX_FALLTHROUGH BX_NOOP() # define BX_NO_VTABLE __declspec(novtable) -# define BX_OVERRIDE override # define BX_PRINTF_ARGS(_format, _args) # define BX_THREAD_LOCAL __declspec(thread) # define BX_ATTRIBUTE(_x) @@ -114,7 +126,14 @@ #define BX_NOOP(...) BX_MACRO_BLOCK_BEGIN BX_MACRO_BLOCK_END /// -#define BX_UNUSED_1(_a1) BX_MACRO_BLOCK_BEGIN (void)(true ? (void)0 : ( (void)(_a1) ) ); BX_MACRO_BLOCK_END +#define BX_UNUSED_1(_a1) \ + BX_MACRO_BLOCK_BEGIN \ + BX_PRAGMA_DIAGNOSTIC_PUSH(); \ + /*BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wuseless-cast");*/ \ + (void)(true ? (void)0 : ( (void)(_a1) ) ); \ + BX_PRAGMA_DIAGNOSTIC_POP(); \ + BX_MACRO_BLOCK_END + #define BX_UNUSED_2(_a1, _a2) BX_UNUSED_1(_a1); BX_UNUSED_1(_a2) #define BX_UNUSED_3(_a1, _a2, _a3) BX_UNUSED_2(_a1, _a2); BX_UNUSED_1(_a3) #define BX_UNUSED_4(_a1, _a2, _a3, _a4) BX_UNUSED_3(_a1, _a2, _a3); BX_UNUSED_1(_a4) diff --git a/3rdparty/bx/include/bx/maputil.h b/3rdparty/bx/include/bx/maputil.h index 4c7e4aa..78ce6b6 100644 --- a/3rdparty/bx/include/bx/maputil.h +++ b/3rdparty/bx/include/bx/maputil.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/fpumath.h b/3rdparty/bx/include/bx/math.h similarity index 51% rename from 3rdparty/bx/include/bx/fpumath.h rename to 3rdparty/bx/include/bx/math.h index b5b319c..07e8a79 100644 --- a/3rdparty/bx/include/bx/fpumath.h +++ b/3rdparty/bx/include/bx/math.h @@ -1,22 +1,36 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ // FPU math lib -#ifndef BX_FPU_MATH_H_HEADER_GUARD -#define BX_FPU_MATH_H_HEADER_GUARD +#ifndef BX_MATH_H_HEADER_GUARD +#define BX_MATH_H_HEADER_GUARD #include "bx.h" +#include "uint32_t.h" namespace bx { - extern const float pi; - extern const float invPi; - extern const float piHalf; - extern const float sqrt2; - extern const float huge; + extern const float kPi; + extern const float kPi2; + extern const float kInvPi; + extern const float kPiHalf; + extern const float kPiQuarter; + extern const float kSqrt2; + extern const float kLogNat10; + extern const float kInvLogNat2; + extern const float kLogNat2Hi; + extern const float kLogNat2Lo; + extern const float kE; + extern const float kNearZero; + extern const float kInfinity; + extern const float kFloatMin; + extern const float kFloatMax; + + /// + typedef float (*LerpFn)(float _a, float _b, float _t); /// struct Handness @@ -38,150 +52,214 @@ namespace bx }; }; + /// Returns converted the argument _deg to radians. /// - float toRad(float _deg); + BX_CONST_FUNC float toRad(float _deg); + + /// Returns converted the argument _rad to degrees. + /// + BX_CONST_FUNC float toDeg(float _rad); + + /// Reinterprets the bit pattern of _a as uint32_t. + /// + BX_CONST_FUNC uint32_t floatToBits(float _a); + + /// Reinterprets the bit pattern of _a as float. + /// + BX_CONST_FUNC float bitsToFloat(uint32_t _a); + + /// Reinterprets the bit pattern of _a as uint64_t. + /// + BX_CONST_FUNC uint64_t doubleToBits(double _a); + + /// Reinterprets the bit pattern of _a as double. + /// + BX_CONST_FUNC double bitsToDouble(uint64_t _a); + + /// Returns sortable floating point value. + /// + BX_CONST_FUNC uint32_t floatFlip(uint32_t _value); + + /// Returns true if _f is a number that is NaN. + /// + BX_CONST_FUNC bool isNan(float _f); + + /// Returns true if _f is a number that is NaN. + /// + BX_CONST_FUNC bool isNan(double _f); + + /// Returns true if _f is not infinite and is not a NaN. + /// + BX_CONST_FUNC bool isFinite(float _f); + + /// Returns true if _f is not infinite and is not a NaN. + /// + BX_CONST_FUNC bool isFinite(double _f); + + /// Returns true if _f is infinite and is not a NaN. + /// + BX_CONST_FUNC bool isInfinite(float _f); + + /// Returns true if _f is infinite and is not a NaN. + /// + BX_CONST_FUNC bool isInfinite(double _f); + + /// Returns the largest integer value not greater than _f. + /// + BX_CONST_FUNC float floor(float _f); + + /// Returns the smallest integer value not less than _f. + /// + BX_CONST_FUNC float ceil(float _f); + + /// Returns the nearest integer value to _f, rounding halfway cases away from zero, + /// + BX_CONST_FUNC float round(float _f); + + /// Returns linear interpolation between two values _a and _b. + /// + BX_CONST_FUNC float lerp(float _a, float _b, float _t); + + /// Returns the sign of _a. + /// + BX_CONST_FUNC float sign(float _a); + + /// Returns the absolute of _a. + /// + BX_CONST_FUNC float abs(float _a); + + /// Returns the square of _a. + /// + BX_CONST_FUNC float square(float _a); + + /// Returns the cosine of the argument _a. + /// + BX_CONST_FUNC float sin(float _a); + + /// Returns hyperbolic sine of the argument _a. + /// + BX_CONST_FUNC float sinh(float _a); + + /// Returns radian angle between -pi/2 and +pi/2 whose sine is _a. + /// + BX_CONST_FUNC float asin(float _a); + + /// Returns the cosine of the argument _a. + /// + BX_CONST_FUNC float cos(float _a); + + /// Returns hyperbolic cosine of the argument _a. + /// + BX_CONST_FUNC float cosh(float _a); + + /// Returns radian angle between 0 and pi whose cosine is _a. + /// + BX_CONST_FUNC float acos(float _a); + + /// Returns the circular tangent of the radian argument _a. + /// + BX_CONST_FUNC float tan(float _a); + + /// Returns hyperbolic tangent of the argument _a. + /// + BX_CONST_FUNC float tanh(float _a); + + /// Returns radian angle between -pi/2 and +pi/2 whose tangent is _a. + /// + BX_CONST_FUNC float atan(float _a); + + /// Retruns the inverse tangent of _y/_x. + /// + BX_CONST_FUNC float atan2(float _y, float _x); + + /// Computes _a raised to the _b power. + /// + BX_CONST_FUNC float pow(float _a, float _b); + + /// Returns the result of multiplying _a by 2 raised to the power of the exponent. + /// + BX_CONST_FUNC float ldexp(float _a, int32_t _b); + + /// Returns decomposed given floating point value _a into a normalized fraction and + /// an integral power of two. + /// + float frexp(float _a, int32_t* _outExp); + + /// Returns e (2.71828...) raised to the _a power. + /// + BX_CONST_FUNC float exp(float _a); + + /// Returns 2 raised to the _a power. + /// + BX_CONST_FUNC float exp2(float _a); + + /// Returns the base e (2.71828...) logarithm of _a. + /// + BX_CONST_FUNC float log(float _a); + + /// Returns the base 2 logarithm of _a. + /// + BX_CONST_FUNC float log2(float _a); + + /// Returns the square root of _a. + /// + BX_CONST_FUNC float sqrt(float _a); + + /// Returns reciprocal square root of _a. + /// + BX_CONST_FUNC float rsqrt(float _a); + + /// Returns the nearest integer not greater in magnitude than _a. + /// + BX_CONST_FUNC float trunc(float _a); + + /// Returns the fractional (or decimal) part of _a, which is greater than or equal to 0 + /// and less than 1. + /// + BX_CONST_FUNC float fract(float _a); + + /// Returns result of multipla and add (_a * _b + _c). + /// + BX_CONST_FUNC float mad(float _a, float _b, float _c); + + /// Returns the floating-point remainder of the division operation _a/_b. + /// + BX_CONST_FUNC float mod(float _a, float _b); /// - float toDeg(float _rad); + BX_CONST_FUNC bool equal(float _a, float _b, float _epsilon); /// - uint32_t floatToBits(float _a); + BX_CONST_FUNC bool equal(const float* _a, const float* _b, uint32_t _num, float _epsilon); /// - float bitsToFloat(uint32_t _a); + BX_CONST_FUNC float wrap(float _a, float _wrap); /// - uint64_t doubleToBits(double _a); + BX_CONST_FUNC float step(float _edge, float _a); /// - double bitsToDouble(uint64_t _a); + BX_CONST_FUNC float pulse(float _a, float _start, float _end); /// - bool isNan(float _f); - - /// - bool isNan(double _f); - - /// - bool isFinite(float _f); - - /// - bool isFinite(double _f); - - /// - bool isInfinite(float _f); - - /// - bool isInfinite(double _f); - - /// - float ffloor(float _f); - - /// - float fceil(float _f); - - /// - float fround(float _f); - - /// - float fmin(float _a, float _b); - - /// - float fmax(float _a, float _b); - - /// - float fmin3(float _a, float _b, float _c); - - /// - float fmax3(float _a, float _b, float _c); - - /// - float fclamp(float _a, float _min, float _max); - - /// - float fsaturate(float _a); - - /// - float flerp(float _a, float _b, float _t); - - /// - float fsign(float _a); - - /// - float fabsolute(float _a); - - /// - float fsq(float _a); - - /// - float fsin(float _a); - - /// - float fasin(float _a); - - /// - float fcos(float _a); - - /// - float ftan(float _a); - - /// - float facos(float _a); - - /// - float fatan2(float _y, float _x); - - /// - float fpow(float _a, float _b); - - /// - float fexp2(float _a); - - /// - float flog(float _a); - - /// - float flog2(float _a); - - /// - float fsqrt(float _a); - - /// - float frsqrt(float _a); - - /// - float ffract(float _a); - - /// - float fmod(float _a, float _b); - - /// - bool fequal(float _a, float _b, float _epsilon); - - /// - bool fequal(const float* _a, const float* _b, uint32_t _num, float _epsilon); - - /// - float fwrap(float _a, float _wrap); - - /// - float fstep(float _edge, float _a); - - /// - float fpulse(float _a, float _start, float _end); - - /// - float fsmoothstep(float _a); + BX_CONST_FUNC float smoothStep(float _a); // References: // - Bias And Gain Are Your Friend // http://blog.demofox.org/2012/09/24/bias-and-gain-are-your-friend/ // - http://demofox.org/biasgain.html /// - float fbias(float _time, float _bias); + BX_CONST_FUNC float bias(float _time, float _bias); /// - float fgain(float _time, float _gain); + BX_CONST_FUNC float gain(float _time, float _gain); + + /// + BX_CONST_FUNC float angleDiff(float _a, float _b); + + /// Returns shortest distance linear interpolation between two angles. + /// + BX_CONST_FUNC float angleLerp(float _a, float _b, float _t); /// void vec3Move(float* _result, const float* _a); @@ -245,6 +323,17 @@ namespace bx /// void vec3TangentFrame(const float* _n, float* _t, float* _b, float _angle); + /// + void vec3FromLatLong(float* _vec, float _u, float _v); + + /// Convert direction to 2D latitude and longitude. + /// + /// @param[out] _outU U-coordinate. + /// @param[out] _outV V-coordinate. + /// @param[in] _dir Normalized direction vector. + /// + void vec3ToLatLong(float* _outU, float* _outV, const float* _dir); + /// void quatIdentity(float* _result); @@ -312,7 +401,7 @@ namespace bx void mtxQuatTranslationHMD(float* _result, const float* _quat, const float* _translation); /// - void mtxLookAtLh(float* _result, const float* _eye, const float* _at, const float* _up = NULL);; + void mtxLookAtLh(float* _result, const float* _eye, const float* _at, const float* _up = NULL); /// void mtxLookAtRh(float* _result, const float* _eye, const float* _at, const float* _up = NULL); @@ -321,85 +410,85 @@ namespace bx void mtxLookAt(float* _result, const float* _eye, const float* _at, const float* _up = NULL); /// - void mtxProj(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc = false); + void mtxProj(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc); /// - void mtxProj(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc = false); + void mtxProj(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc); /// - void mtxProj(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc = false); + void mtxProj(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc); /// - void mtxProjLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc = false); + void mtxProjLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc); /// - void mtxProjLh(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc = false); + void mtxProjLh(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc); /// - void mtxProjLh(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc = false); + void mtxProjLh(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc); /// - void mtxProjRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc = false); + void mtxProjRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc); /// - void mtxProjRh(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc = false); + void mtxProjRh(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc); /// - void mtxProjRh(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc = false); + void mtxProjRh(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc); /// - void mtxProjInf(float* _result, const float _fov[4], float _near, bool _oglNdc = false); + void mtxProjInf(float* _result, const float _fov[4], float _near, bool _oglNdc); /// - void mtxProjInf(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc = false); + void mtxProjInf(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc); /// - void mtxProjInf(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc = false); + void mtxProjInf(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc); /// - void mtxProjInfLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc = false); + void mtxProjInfLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc); /// - void mtxProjInfLh(float* _result, const float _fov[4], float _near, bool _oglNdc = false); + void mtxProjInfLh(float* _result, const float _fov[4], float _near, bool _oglNdc); /// - void mtxProjInfLh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc = false); + void mtxProjInfLh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc); /// - void mtxProjInfRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc = false); + void mtxProjInfRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc); /// - void mtxProjInfRh(float* _result, const float _fov[4], float _near, bool _oglNdc = false); + void mtxProjInfRh(float* _result, const float _fov[4], float _near, bool _oglNdc); /// - void mtxProjInfRh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc = false); + void mtxProjInfRh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc); /// - void mtxProjRevInfLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc = false); + void mtxProjRevInfLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc); /// - void mtxProjRevInfLh(float* _result, const float _fov[4], float _near, bool _oglNdc = false); + void mtxProjRevInfLh(float* _result, const float _fov[4], float _near, bool _oglNdc); /// - void mtxProjRevInfLh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc = false); + void mtxProjRevInfLh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc); /// - void mtxProjRevInfRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc = false); + void mtxProjRevInfRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc); /// - void mtxProjRevInfRh(float* _result, const float _fov[4], float _near, bool _oglNdc = false); + void mtxProjRevInfRh(float* _result, const float _fov[4], float _near, bool _oglNdc); /// - void mtxProjRevInfRh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc = false); + void mtxProjRevInfRh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc); /// - void mtxOrtho(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset = 0.0f, bool _oglNdc = false); + void mtxOrtho(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc); /// - void mtxOrthoLh(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset = 0.0f, bool _oglNdc = false); + void mtxOrthoLh(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc); /// - void mtxOrthoRh(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset = 0.0f, bool _oglNdc = false); + void mtxOrthoRh(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc); /// void mtxRotateX(float* _result, float _ax); @@ -425,9 +514,18 @@ namespace bx /// void vec3MulMtx(float* _result, const float* _vec, const float* _mat); + /// + void vec3MulMtxXyz0(float* _result, const float* _vec, const float* _mat); + /// void vec3MulMtxH(float* _result, const float* _vec, const float* _mat); + /// + void vec4Mul(float* _result, const float* _a, const float* _b); + + /// + void vec4Mul(float* _result, const float* _a, float _b); + /// void vec4MulMtx(float* _result, const float* _vec, const float* _mat); @@ -471,6 +569,6 @@ namespace bx } // namespace bx -#include "inline/fpumath.inl" +#include "inline/math.inl" -#endif // BX_FPU_MATH_H_HEADER_GUARD +#endif // BX_MATH_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/mpscqueue.h b/3rdparty/bx/include/bx/mpscqueue.h index 0ac8f82..003dfe8 100644 --- a/3rdparty/bx/include/bx/mpscqueue.h +++ b/3rdparty/bx/include/bx/mpscqueue.h @@ -1,11 +1,12 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #ifndef BX_MPSCQUEUE_H_HEADER_GUARD #define BX_MPSCQUEUE_H_HEADER_GUARD +#include "allocator.h" #include "mutex.h" #include "spscqueue.h" @@ -22,7 +23,7 @@ namespace bx public: /// - MpScUnboundedQueueT(); + MpScUnboundedQueueT(AllocatorI* _allocator); /// ~MpScUnboundedQueueT(); @@ -52,7 +53,7 @@ namespace bx public: /// - MpScUnboundedBlockingQueue(); + MpScUnboundedBlockingQueue(AllocatorI* _allocator); /// ~MpScUnboundedBlockingQueue(); diff --git a/3rdparty/bx/include/bx/mutex.h b/3rdparty/bx/include/bx/mutex.h index ac8ea7f..213fc68 100644 --- a/3rdparty/bx/include/bx/mutex.h +++ b/3rdparty/bx/include/bx/mutex.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/os.h b/3rdparty/bx/include/bx/os.h index 56781b2..09097a1 100644 --- a/3rdparty/bx/include/bx/os.h +++ b/3rdparty/bx/include/bx/os.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -18,20 +18,6 @@ namespace bx { - struct FileInfo - { - enum Enum - { - Regular, - Directory, - - Count - }; - - uint64_t m_size; - Enum m_type; - }; - /// void sleep(uint32_t _ms); @@ -65,15 +51,6 @@ namespace bx /// int chdir(const char* _path); - /// - char* pwd(char* _buffer, uint32_t _size); - - /// - bool getTempPath(char* _out, uint32_t* _inOutSize); - - /// - bool stat(const char* _filePath, FileInfo& _fileInfo); - /// void* exec(const char* const* _argv); diff --git a/3rdparty/bx/include/bx/pixelformat.h b/3rdparty/bx/include/bx/pixelformat.h index 78354e4..c75b398 100644 --- a/3rdparty/bx/include/bx/pixelformat.h +++ b/3rdparty/bx/include/bx/pixelformat.h @@ -1,19 +1,20 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #ifndef BX_PIXEL_FORMAT_H_HEADER_GUARD #define BX_PIXEL_FORMAT_H_HEADER_GUARD -#include "fpumath.h" +#include "math.h" #include "uint32_t.h" namespace bx { + /// struct EncodingType { - enum Enum + enum Enum /// { Unorm, Int, @@ -228,9 +229,9 @@ namespace bx void packRgb10A2(void* _dst, const float* _src); void unpackRgb10A2(float* _dst, const void* _src); - // R11G11B10F - void packR11G11B10F(void* _dst, const float* _src); - void unpackR11G11B10F(float* _dst, const void* _src); + // RG11B10F + void packRG11B10F(void* _dst, const float* _src); + void unpackRG11B10F(float* _dst, const void* _src); // RG32F void packRg32F(void* _dst, const float* _src); diff --git a/3rdparty/bx/include/bx/platform.h b/3rdparty/bx/include/bx/platform.h index 7e7591d..37a77ad 100644 --- a/3rdparty/bx/include/bx/platform.h +++ b/3rdparty/bx/include/bx/platform.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -46,20 +46,18 @@ // Platform #define BX_PLATFORM_ANDROID 0 -#define BX_PLATFORM_EMSCRIPTEN 0 #define BX_PLATFORM_BSD 0 +#define BX_PLATFORM_EMSCRIPTEN 0 #define BX_PLATFORM_HURD 0 #define BX_PLATFORM_IOS 0 #define BX_PLATFORM_LINUX 0 -#define BX_PLATFORM_NACL 0 +#define BX_PLATFORM_NX 0 #define BX_PLATFORM_OSX 0 #define BX_PLATFORM_PS4 0 -#define BX_PLATFORM_QNX 0 #define BX_PLATFORM_RPI 0 #define BX_PLATFORM_STEAMLINK 0 #define BX_PLATFORM_WINDOWS 0 #define BX_PLATFORM_WINRT 0 -#define BX_PLATFORM_XBOX360 0 #define BX_PLATFORM_XBOXONE 0 // http://sourceforge.net/apps/mediawiki/predef/index.php?title=Compilers @@ -143,10 +141,7 @@ #endif // BX_PLATFORM_ // http://sourceforge.net/apps/mediawiki/predef/index.php?title=Operating_Systems -#if defined(_XBOX_VER) -# undef BX_PLATFORM_XBOX360 -# define BX_PLATFORM_XBOX360 1 -#elif defined(_DURANGO) || defined(_XBOX_ONE) +#if defined(_DURANGO) || defined(_XBOX_ONE) # undef BX_PLATFORM_XBOXONE # define BX_PLATFORM_XBOXONE 1 #elif defined(_WIN32) || defined(_WIN64) @@ -181,11 +176,6 @@ # include // Defines __BIONIC__ and includes android/api-level.h # undef BX_PLATFORM_ANDROID # define BX_PLATFORM_ANDROID __ANDROID_API__ -#elif defined(__native_client__) -// NaCl compiler defines __linux__ -# include -# undef BX_PLATFORM_NACL -# define BX_PLATFORM_NACL PPAPI_RELEASE #elif defined(__STEAMLINK__) // SteamLink compiler defines __linux__ # undef BX_PLATFORM_STEAMLINK @@ -210,9 +200,6 @@ #elif defined(__ORBIS__) # undef BX_PLATFORM_PS4 # define BX_PLATFORM_PS4 1 -#elif defined(__QNX__) -# undef BX_PLATFORM_QNX -# define BX_PLATFORM_QNX 1 #elif defined(__FreeBSD__) \ || defined(__FreeBSD_kernel__) \ || defined(__NetBSD__) \ @@ -223,6 +210,9 @@ #elif defined(__GNU__) # undef BX_PLATFORM_HURD # define BX_PLATFORM_HURD 1 +#elif defined(__NX__) +# undef BX_PLATFORM_NX +# define BX_PLATFORM_NX 1 #endif // #if !BX_CRT_NONE @@ -258,35 +248,32 @@ #define BX_PLATFORM_POSIX (0 \ || BX_PLATFORM_ANDROID \ - || BX_PLATFORM_EMSCRIPTEN \ || BX_PLATFORM_BSD \ + || BX_PLATFORM_EMSCRIPTEN \ || BX_PLATFORM_HURD \ || BX_PLATFORM_IOS \ || BX_PLATFORM_LINUX \ - || BX_PLATFORM_NACL \ + || BX_PLATFORM_NX \ || BX_PLATFORM_OSX \ - || BX_PLATFORM_QNX \ - || BX_PLATFORM_STEAMLINK \ || BX_PLATFORM_PS4 \ || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK \ ) #define BX_PLATFORM_NONE !(0 \ || BX_PLATFORM_ANDROID \ - || BX_PLATFORM_EMSCRIPTEN \ || BX_PLATFORM_BSD \ + || BX_PLATFORM_EMSCRIPTEN \ || BX_PLATFORM_HURD \ || BX_PLATFORM_IOS \ || BX_PLATFORM_LINUX \ - || BX_PLATFORM_NACL \ + || BX_PLATFORM_NX \ || BX_PLATFORM_OSX \ || BX_PLATFORM_PS4 \ - || BX_PLATFORM_QNX \ || BX_PLATFORM_RPI \ || BX_PLATFORM_STEAMLINK \ || BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOX360 \ || BX_PLATFORM_XBOXONE \ ) @@ -321,28 +308,27 @@ #if BX_PLATFORM_ANDROID # define BX_PLATFORM_NAME "Android " \ BX_STRINGIZE(BX_PLATFORM_ANDROID) +#elif BX_PLATFORM_BSD +# define BX_PLATFORM_NAME "BSD" #elif BX_PLATFORM_EMSCRIPTEN # define BX_PLATFORM_NAME "asm.js " \ BX_STRINGIZE(__EMSCRIPTEN_major__) "." \ BX_STRINGIZE(__EMSCRIPTEN_minor__) "." \ BX_STRINGIZE(__EMSCRIPTEN_tiny__) -#elif BX_PLATFORM_BSD -# define BX_PLATFORM_NAME "BSD" #elif BX_PLATFORM_HURD # define BX_PLATFORM_NAME "Hurd" #elif BX_PLATFORM_IOS # define BX_PLATFORM_NAME "iOS" #elif BX_PLATFORM_LINUX # define BX_PLATFORM_NAME "Linux" -#elif BX_PLATFORM_NACL -# define BX_PLATFORM_NAME "NaCl " \ - BX_STRINGIZE(BX_PLATFORM_NACL) +#elif BX_PLATFORM_NONE +# define BX_PLATFORM_NAME "None" +#elif BX_PLATFORM_NX +# define BX_PLATFORM_NAME "NX" #elif BX_PLATFORM_OSX # define BX_PLATFORM_NAME "OSX" #elif BX_PLATFORM_PS4 # define BX_PLATFORM_NAME "PlayStation 4" -#elif BX_PLATFORM_QNX -# define BX_PLATFORM_NAME "QNX" #elif BX_PLATFORM_RPI # define BX_PLATFORM_NAME "RaspberryPi" #elif BX_PLATFORM_STEAMLINK @@ -351,12 +337,8 @@ # define BX_PLATFORM_NAME "Windows" #elif BX_PLATFORM_WINRT # define BX_PLATFORM_NAME "WinRT" -#elif BX_PLATFORM_XBOX360 -# define BX_PLATFORM_NAME "Xbox 360" #elif BX_PLATFORM_XBOXONE # define BX_PLATFORM_NAME "Xbox One" -#elif BX_PLATFORM_NONE -# define BX_PLATFORM_NAME "None" #else # error "Unknown BX_PLATFORM!" #endif // BX_PLATFORM_ diff --git a/3rdparty/bx/include/bx/process.h b/3rdparty/bx/include/bx/process.h index 4e4b151..8369829 100644 --- a/3rdparty/bx/include/bx/process.h +++ b/3rdparty/bx/include/bx/process.h @@ -1,79 +1,74 @@ /* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #ifndef BX_PROCESS_H_HEADER_GUARD #define BX_PROCESS_H_HEADER_GUARD -#include "string.h" -#include "uint32_t.h" - -#if BX_PLATFORM_LINUX || BX_PLATFORM_HURD -# include -#endif // BX_PLATFORM_LINUX || BX_PLATFORM_HURD +#include "readerwriter.h" namespace bx { /// - inline void* exec(const char* const* _argv) + class ProcessReader + : public ProcessOpenI + , public CloserI + , public ReaderI { -#if BX_PLATFORM_LINUX || BX_PLATFORM_HURD - pid_t pid = fork(); + public: + /// + ProcessReader(); - if (0 == pid) - { - int result = execvp(_argv[0], const_cast(&_argv[1]) ); - BX_UNUSED(result); - return NULL; - } + /// + ~ProcessReader(); - return (void*)uintptr_t(pid); -#elif BX_PLATFORM_WINDOWS - STARTUPINFO si; - memset(&si, 0, sizeof(STARTUPINFO) ); - si.cb = sizeof(STARTUPINFO); + /// + virtual bool open(const FilePath& _filePath, const StringView& _args, Error* _err) override; - PROCESS_INFORMATION pi; - memset(&pi, 0, sizeof(PROCESS_INFORMATION) ); + /// + virtual void close() override; - int32_t total = 0; - for (uint32_t ii = 0; NULL != _argv[ii]; ++ii) - { - total += (int32_t)strlen(_argv[ii]) + 1; - } + /// + virtual int32_t read(void* _data, int32_t _size, Error* _err) override; - char* temp = (char*)alloca(total); - int32_t len = 0; - for(uint32_t ii = 0; NULL != _argv[ii]; ++ii) - { - len += snprintf(&temp[len], bx::uint32_imax(0, total-len) - , "%s " - , _argv[ii] - ); - } + /// + int32_t getExitCode() const; - bool ok = CreateProcessA(_argv[0] - , temp - , NULL - , NULL - , false - , 0 - , NULL - , NULL - , &si - , &pi - ); - if (ok) - { - return pi.hProcess; - } + private: + void* m_file; + int32_t m_exitCode; + }; - return NULL; -#else - return NULL; -#endif // BX_PLATFORM_LINUX || BX_PLATFORM_HURD - } + /// + class ProcessWriter + : public ProcessOpenI + , public CloserI + , public WriterI + { + public: + /// + ProcessWriter(); + + /// + ~ProcessWriter(); + + /// + virtual bool open(const FilePath& _filePath, const StringView& _args, Error* _err) override; + + /// + virtual void close() override; + + /// + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override; + + /// + int32_t getExitCode() const; + + private: + void* m_file; + int32_t m_exitCode; + }; } // namespace bx diff --git a/3rdparty/bx/include/bx/radixsort.h b/3rdparty/bx/include/bx/radixsort.h deleted file mode 100644 index d14398c..0000000 --- a/3rdparty/bx/include/bx/radixsort.h +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_RADIXSORT_H_HEADER_GUARD -#define BX_RADIXSORT_H_HEADER_GUARD - -#include "bx.h" - -namespace bx -{ -#define BX_RADIXSORT_BITS 11 -#define BX_RADIXSORT_HISTOGRAM_SIZE (1<>shift)&BX_RADIXSORT_BIT_MASK; - ++histogram[index]; - sorted &= prevKey <= key; - } - } - - if (sorted) - { - goto done; - } - - uint32_t offset = 0; - for (uint32_t ii = 0; ii < BX_RADIXSORT_HISTOGRAM_SIZE; ++ii) - { - uint32_t count = histogram[ii]; - histogram[ii] = offset; - offset += count; - } - - for (uint32_t ii = 0; ii < _size; ++ii) - { - uint32_t key = keys[ii]; - uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; - uint32_t dest = histogram[index]++; - tempKeys[dest] = key; - } - - uint32_t* swapKeys = tempKeys; - tempKeys = keys; - keys = swapKeys; - - shift += BX_RADIXSORT_BITS; - } - -done: - if (0 != (pass&1) ) - { - // Odd number of passes needs to do copy to the destination. - memcpy(_keys, _tempKeys, _size*sizeof(uint32_t) ); - } - } - - template - inline void radixSort(uint32_t* __restrict _keys, uint32_t* __restrict _tempKeys, Ty* __restrict _values, Ty* __restrict _tempValues, uint32_t _size) - { - uint32_t* __restrict keys = _keys; - uint32_t* __restrict tempKeys = _tempKeys; - Ty* __restrict values = _values; - Ty* __restrict tempValues = _tempValues; - - uint32_t histogram[BX_RADIXSORT_HISTOGRAM_SIZE]; - uint16_t shift = 0; - uint32_t pass = 0; - for (; pass < 3; ++pass) - { - memset(histogram, 0, sizeof(uint32_t)*BX_RADIXSORT_HISTOGRAM_SIZE); - - bool sorted = true; - { - uint32_t key = keys[0]; - uint32_t prevKey = key; - for (uint32_t ii = 0; ii < _size; ++ii, prevKey = key) - { - key = keys[ii]; - uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; - ++histogram[index]; - sorted &= prevKey <= key; - } - } - - if (sorted) - { - goto done; - } - - uint32_t offset = 0; - for (uint32_t ii = 0; ii < BX_RADIXSORT_HISTOGRAM_SIZE; ++ii) - { - uint32_t count = histogram[ii]; - histogram[ii] = offset; - offset += count; - } - - for (uint32_t ii = 0; ii < _size; ++ii) - { - uint32_t key = keys[ii]; - uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; - uint32_t dest = histogram[index]++; - tempKeys[dest] = key; - tempValues[dest] = values[ii]; - } - - uint32_t* swapKeys = tempKeys; - tempKeys = keys; - keys = swapKeys; - - Ty* swapValues = tempValues; - tempValues = values; - values = swapValues; - - shift += BX_RADIXSORT_BITS; - } - -done: - if (0 != (pass&1) ) - { - // Odd number of passes needs to do copy to the destination. - memcpy(_keys, _tempKeys, _size*sizeof(uint32_t) ); - for (uint32_t ii = 0; ii < _size; ++ii) - { - _values[ii] = _tempValues[ii]; - } - } - } - - inline void radixSort(uint64_t* __restrict _keys, uint64_t* __restrict _tempKeys, uint32_t _size) - { - uint64_t* __restrict keys = _keys; - uint64_t* __restrict tempKeys = _tempKeys; - - uint32_t histogram[BX_RADIXSORT_HISTOGRAM_SIZE]; - uint16_t shift = 0; - uint32_t pass = 0; - for (; pass < 6; ++pass) - { - memset(histogram, 0, sizeof(uint32_t)*BX_RADIXSORT_HISTOGRAM_SIZE); - - bool sorted = true; - { - uint64_t key = keys[0]; - uint64_t prevKey = key; - for (uint32_t ii = 0; ii < _size; ++ii, prevKey = key) - { - key = keys[ii]; - uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; - ++histogram[index]; - sorted &= prevKey <= key; - } - } - - if (sorted) - { - goto done; - } - - uint32_t offset = 0; - for (uint32_t ii = 0; ii < BX_RADIXSORT_HISTOGRAM_SIZE; ++ii) - { - uint32_t count = histogram[ii]; - histogram[ii] = offset; - offset += count; - } - - for (uint32_t ii = 0; ii < _size; ++ii) - { - uint64_t key = keys[ii]; - uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; - uint32_t dest = histogram[index]++; - tempKeys[dest] = key; - } - - uint64_t* swapKeys = tempKeys; - tempKeys = keys; - keys = swapKeys; - - shift += BX_RADIXSORT_BITS; - } - -done: - if (0 != (pass&1) ) - { - // Odd number of passes needs to do copy to the destination. - memcpy(_keys, _tempKeys, _size*sizeof(uint64_t) ); - } - } - - template - inline void radixSort(uint64_t* __restrict _keys, uint64_t* __restrict _tempKeys, Ty* __restrict _values, Ty* __restrict _tempValues, uint32_t _size) - { - uint64_t* __restrict keys = _keys; - uint64_t* __restrict tempKeys = _tempKeys; - Ty* __restrict values = _values; - Ty* __restrict tempValues = _tempValues; - - uint32_t histogram[BX_RADIXSORT_HISTOGRAM_SIZE]; - uint16_t shift = 0; - uint32_t pass = 0; - for (; pass < 6; ++pass) - { - memset(histogram, 0, sizeof(uint32_t)*BX_RADIXSORT_HISTOGRAM_SIZE); - - bool sorted = true; - { - uint64_t key = keys[0]; - uint64_t prevKey = key; - for (uint32_t ii = 0; ii < _size; ++ii, prevKey = key) - { - key = keys[ii]; - uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; - ++histogram[index]; - sorted &= prevKey <= key; - } - } - - if (sorted) - { - goto done; - } - - uint32_t offset = 0; - for (uint32_t ii = 0; ii < BX_RADIXSORT_HISTOGRAM_SIZE; ++ii) - { - uint32_t count = histogram[ii]; - histogram[ii] = offset; - offset += count; - } - - for (uint32_t ii = 0; ii < _size; ++ii) - { - uint64_t key = keys[ii]; - uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK; - uint32_t dest = histogram[index]++; - tempKeys[dest] = key; - tempValues[dest] = values[ii]; - } - - uint64_t* swapKeys = tempKeys; - tempKeys = keys; - keys = swapKeys; - - Ty* swapValues = tempValues; - tempValues = values; - values = swapValues; - - shift += BX_RADIXSORT_BITS; - } - -done: - if (0 != (pass&1) ) - { - // Odd number of passes needs to do copy to the destination. - memcpy(_keys, _tempKeys, _size*sizeof(uint64_t) ); - for (uint32_t ii = 0; ii < _size; ++ii) - { - _values[ii] = _tempValues[ii]; - } - } - } - -#undef BX_RADIXSORT_BITS -#undef BX_RADIXSORT_HISTOGRAM_SIZE -#undef BX_RADIXSORT_BIT_MASK - -} // namespace bx - -#endif // BX_RADIXSORT_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/readerwriter.h b/3rdparty/bx/include/bx/readerwriter.h index 0866c88..c7b2d63 100644 --- a/3rdparty/bx/include/bx/readerwriter.h +++ b/3rdparty/bx/include/bx/readerwriter.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -7,8 +7,10 @@ #define BX_READERWRITER_H_HEADER_GUARD #include "allocator.h" -#include "error.h" #include "endian.h" +#include "error.h" +#include "filepath.h" +#include "string.h" #include "uint32_t.h" BX_ERROR_RESULT(BX_ERROR_READERWRITER_OPEN, BX_MAKEFOURCC('R', 'W', 0, 1) ); @@ -65,14 +67,21 @@ namespace bx struct BX_NO_VTABLE ReaderOpenI { virtual ~ReaderOpenI() = 0; - virtual bool open(const char* _filePath, Error* _err) = 0; + virtual bool open(const FilePath& _filePath, Error* _err) = 0; }; /// struct BX_NO_VTABLE WriterOpenI { virtual ~WriterOpenI() = 0; - virtual bool open(const char* _filePath, bool _append, Error* _err) = 0; + virtual bool open(const FilePath& _filePath, bool _append, Error* _err) = 0; + }; + + /// + struct BX_NO_VTABLE ProcessOpenI + { + virtual ~ProcessOpenI() = 0; + virtual bool open(const FilePath& _filePath, const StringView& _args, Error* _err) = 0; }; /// @@ -110,10 +119,10 @@ namespace bx virtual ~StaticMemoryBlock(); /// - virtual void* more(uint32_t _size = 0); + virtual void* more(uint32_t _size = 0) override; /// - virtual uint32_t getSize() BX_OVERRIDE; + virtual uint32_t getSize() override; private: void* m_data; @@ -131,10 +140,10 @@ namespace bx virtual ~MemoryBlock(); /// - virtual void* more(uint32_t _size = 0) BX_OVERRIDE; + virtual void* more(uint32_t _size = 0) override; /// - virtual uint32_t getSize() BX_OVERRIDE; + virtual uint32_t getSize() override; private: AllocatorI* m_allocator; @@ -142,7 +151,7 @@ namespace bx uint32_t m_size; }; - /// + /// Sizer writer. Dummy writter that only counts number of bytes written into it. class SizerWriter : public WriterSeekerI { public: @@ -153,10 +162,10 @@ namespace bx virtual ~SizerWriter(); /// - virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) BX_OVERRIDE; + virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) override; /// - virtual int32_t write(const void* /*_data*/, int32_t _size, Error* _err) BX_OVERRIDE; + virtual int32_t write(const void* /*_data*/, int32_t _size, Error* _err) override; private: int64_t m_pos; @@ -174,10 +183,10 @@ namespace bx virtual ~MemoryReader(); /// - virtual int64_t seek(int64_t _offset, Whence::Enum _whence) BX_OVERRIDE; + virtual int64_t seek(int64_t _offset, Whence::Enum _whence) override; /// - virtual int32_t read(void* _data, int32_t _size, Error* _err) BX_OVERRIDE; + virtual int32_t read(void* _data, int32_t _size, Error* _err) override; /// const uint8_t* getDataPtr() const; @@ -205,10 +214,10 @@ namespace bx virtual ~MemoryWriter(); /// - virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) BX_OVERRIDE; + virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) override; /// - virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE; + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override; private: MemoryBlockI* m_memBlock; @@ -218,7 +227,7 @@ namespace bx int64_t m_size; }; - /// + /// Static (fixed size) memory block writer. class StaticMemoryBlockWriter : public MemoryWriter { public: @@ -247,6 +256,15 @@ namespace bx /// Write data. int32_t write(WriterI* _writer, const void* _data, int32_t _size, Error* _err = NULL); + /// Write C string. + int32_t write(WriterI* _writer, const char* _str, Error* _err = NULL); + + /// Write string view. + int32_t write(WriterI* _writer, const StringView& _str, Error* _err = NULL); + + /// + int32_t write(WriterI* _writer, Error* _err, const char* _format, ...); + /// Write repeat the same value. int32_t writeRep(WriterI* _writer, uint8_t _byte, int32_t _size, Error* _err = NULL); @@ -274,6 +292,9 @@ namespace bx /// Returns size of file. int64_t getSize(SeekerI* _seeker); + /// Returns remaining size from current offset of file. + int64_t getRemain(SeekerI* _seeker); + /// Peek data. int32_t peek(ReaderSeekerI* _reader, void* _data, int32_t _size, Error* _err = NULL); @@ -287,13 +308,16 @@ namespace bx /// Align writer stream (pads stream with zeros). int32_t align(WriterSeekerI* _writer, uint32_t _alignment, Error* _err = NULL); - /// - bool open(ReaderOpenI* _reader, const char* _filePath, Error* _err = NULL); + /// Open for read. + bool open(ReaderOpenI* _reader, const FilePath& _filePath, Error* _err = NULL); - /// - bool open(WriterOpenI* _writer, const char* _filePath, bool _append = false, Error* _err = NULL); + /// Open fro write. + bool open(WriterOpenI* _writer, const FilePath& _filePath, bool _append = false, Error* _err = NULL); - /// + /// Open process. + bool open(ProcessOpenI* _process, const FilePath& _filePath, const StringView& _args, Error* _err = NULL); + + /// Close. void close(CloserI* _reader); } // namespace bx diff --git a/3rdparty/bx/include/bx/ringbuffer.h b/3rdparty/bx/include/bx/ringbuffer.h index fd74250..db44da8 100644 --- a/3rdparty/bx/include/bx/ringbuffer.h +++ b/3rdparty/bx/include/bx/ringbuffer.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/rng.h b/3rdparty/bx/include/bx/rng.h index 56d7674..e558615 100644 --- a/3rdparty/bx/include/bx/rng.h +++ b/3rdparty/bx/include/bx/rng.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -7,7 +7,7 @@ #define BX_RNG_H_HEADER_GUARD #include "bx.h" -#include "fpumath.h" +#include "math.h" #include "uint32_t.h" namespace bx @@ -30,24 +30,6 @@ namespace bx uint32_t m_w; }; - /// George Marsaglia's FIB - class RngFib - { - public: - /// - RngFib(uint32_t _a = 9983651, uint32_t _b = 95746118); - - /// - void reset(uint32_t _a = 9983651, uint32_t _b = 95746118); - - /// - uint32_t gen(); - - private: - uint32_t m_a; - uint32_t m_b; - }; - /// George Marsaglia's SHR3 class RngShr3 { diff --git a/3rdparty/bx/include/bx/sem.h b/3rdparty/bx/include/bx/sem.h deleted file mode 100644 index 37141c5..0000000 --- a/3rdparty/bx/include/bx/sem.h +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_SEM_H_HEADER_GUARD -#define BX_SEM_H_HEADER_GUARD - -#include "bx.h" -#include "mutex.h" - -#if BX_CONFIG_SUPPORTS_THREADING - -#if BX_PLATFORM_POSIX -# include -# include -# include -# include -#elif BX_PLATFORM_XBOXONE -# include -#elif BX_PLATFORM_XBOX360 || BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT -# include -# include -#endif // BX_PLATFORM_ - -namespace bx -{ -#if BX_PLATFORM_POSIX - -# if BX_CONFIG_SEMAPHORE_PTHREAD - class Semaphore - { - BX_CLASS(Semaphore - , NO_COPY - , NO_ASSIGNMENT - ); - - public: - Semaphore() - : m_count(0) - { - int result; - result = pthread_mutex_init(&m_mutex, NULL); - BX_CHECK(0 == result, "pthread_mutex_init %d", result); - - result = pthread_cond_init(&m_cond, NULL); - BX_CHECK(0 == result, "pthread_cond_init %d", result); - - BX_UNUSED(result); - } - - ~Semaphore() - { - int result; - result = pthread_cond_destroy(&m_cond); - BX_CHECK(0 == result, "pthread_cond_destroy %d", result); - - result = pthread_mutex_destroy(&m_mutex); - BX_CHECK(0 == result, "pthread_mutex_destroy %d", result); - - BX_UNUSED(result); - } - - void post(uint32_t _count = 1) - { - int result = pthread_mutex_lock(&m_mutex); - BX_CHECK(0 == result, "pthread_mutex_lock %d", result); - - for (uint32_t ii = 0; ii < _count; ++ii) - { - result = pthread_cond_signal(&m_cond); - BX_CHECK(0 == result, "pthread_cond_signal %d", result); - } - - m_count += _count; - - result = pthread_mutex_unlock(&m_mutex); - BX_CHECK(0 == result, "pthread_mutex_unlock %d", result); - - BX_UNUSED(result); - } - - bool wait(int32_t _msecs = -1) - { - int result = pthread_mutex_lock(&m_mutex); - BX_CHECK(0 == result, "pthread_mutex_lock %d", result); - -# if BX_PLATFORM_NACL || BX_PLATFORM_OSX - BX_UNUSED(_msecs); - BX_CHECK(-1 == _msecs, "NaCl and OSX don't support pthread_cond_timedwait at this moment."); - while (0 == result - && 0 >= m_count) - { - result = pthread_cond_wait(&m_cond, &m_mutex); - } -# elif BX_PLATFORM_IOS - if (-1 == _msecs) - { - while (0 == result - && 0 >= m_count) - { - result = pthread_cond_wait(&m_cond, &m_mutex); - } - } - else - { - timespec ts; - ts.tv_sec = _msecs/1000; - ts.tv_nsec = (_msecs%1000)*1000; - - while (0 == result - && 0 >= m_count) - { - result = pthread_cond_timedwait_relative_np(&m_cond, &m_mutex, &ts); - } - } -# else - timespec ts; - clock_gettime(CLOCK_REALTIME, &ts); - ts.tv_sec += _msecs/1000; - ts.tv_nsec += (_msecs%1000)*1000; - - while (0 == result - && 0 >= m_count) - { - result = pthread_cond_timedwait(&m_cond, &m_mutex, &ts); - } -# endif // BX_PLATFORM_NACL || BX_PLATFORM_OSX - bool ok = 0 == result; - - if (ok) - { - --m_count; - } - - result = pthread_mutex_unlock(&m_mutex); - BX_CHECK(0 == result, "pthread_mutex_unlock %d", result); - - BX_UNUSED(result); - - return ok; - } - - private: - pthread_mutex_t m_mutex; - pthread_cond_t m_cond; - int32_t m_count; - }; - -# else - - class Semaphore - { - BX_CLASS(Semaphore - , NO_COPY - , NO_ASSIGNMENT - ); - - public: - Semaphore() - { - int32_t result = sem_init(&m_handle, 0, 0); - BX_CHECK(0 == result, "sem_init failed. errno %d", errno); - BX_UNUSED(result); - } - - ~Semaphore() - { - int32_t result = sem_destroy(&m_handle); - BX_CHECK(0 == result, "sem_destroy failed. errno %d", errno); - BX_UNUSED(result); - } - - void post(uint32_t _count = 1) - { - int32_t result; - for (uint32_t ii = 0; ii < _count; ++ii) - { - result = sem_post(&m_handle); - BX_CHECK(0 == result, "sem_post failed. errno %d", errno); - } - BX_UNUSED(result); - } - - bool wait(int32_t _msecs = -1) - { -# if BX_PLATFORM_NACL || BX_PLATFORM_OSX - BX_CHECK(-1 == _msecs, "NaCl and OSX don't support sem_timedwait at this moment."); BX_UNUSED(_msecs); - return 0 == sem_wait(&m_handle); -# else - if (0 > _msecs) - { - int32_t result; - do - { - result = sem_wait(&m_handle); - } // keep waiting when interrupted by a signal handler... - while (-1 == result && EINTR == errno); - BX_CHECK(0 == result, "sem_wait failed. errno %d", errno); - return 0 == result; - } - - timespec ts; - clock_gettime(CLOCK_REALTIME, &ts); - ts.tv_sec += _msecs/1000; - ts.tv_nsec += (_msecs%1000)*1000; - return 0 == sem_timedwait(&m_handle, &ts); -# endif // BX_PLATFORM_ - } - - private: - sem_t m_handle; - }; -# endif // BX_CONFIG_SEMAPHORE_PTHREAD - -#elif BX_PLATFORM_XBOX360 || BX_PLATFORM_XBOXONE || BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT - - class Semaphore - { - BX_CLASS(Semaphore - , NO_COPY - , NO_ASSIGNMENT - ); - - public: - Semaphore() - { -#if BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT - m_handle = CreateSemaphoreExW(NULL, 0, LONG_MAX, NULL, 0, SEMAPHORE_ALL_ACCESS); -#else - m_handle = CreateSemaphoreA(NULL, 0, LONG_MAX, NULL); -#endif - BX_CHECK(NULL != m_handle, "Failed to create Semaphore!"); - } - - ~Semaphore() - { - CloseHandle(m_handle); - } - - void post(uint32_t _count = 1) const - { - ReleaseSemaphore(m_handle, _count, NULL); - } - - bool wait(int32_t _msecs = -1) const - { - DWORD milliseconds = (0 > _msecs) ? INFINITE : _msecs; -#if BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT - return WAIT_OBJECT_0 == WaitForSingleObjectEx(m_handle, milliseconds, FALSE); -#else - return WAIT_OBJECT_0 == WaitForSingleObject(m_handle, milliseconds); -#endif - } - - private: - HANDLE m_handle; - }; - -#endif // BX_PLATFORM_ - -} // namespace bx - -#endif // BX_CONFIG_SUPPORTS_THREADING - -#endif // BX_SEM_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/semaphore.h b/3rdparty/bx/include/bx/semaphore.h index 867fa9e..6d944ed 100644 --- a/3rdparty/bx/include/bx/semaphore.h +++ b/3rdparty/bx/include/bx/semaphore.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/settings.h b/3rdparty/bx/include/bx/settings.h new file mode 100644 index 0000000..f993a34 --- /dev/null +++ b/3rdparty/bx/include/bx/settings.h @@ -0,0 +1,61 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_SETTINGS_H_HEADER_GUARD +#define BX_SETTINGS_H_HEADER_GUARD + +#include "allocator.h" +#include "readerwriter.h" +#include "string.h" + +namespace bx +{ + /// + class Settings + { + public: + /// + Settings(AllocatorI* _allocator, const void* _data = NULL, uint32_t _len = 0); + + /// + ~Settings(); + + /// + void clear(); + + /// + void load(const void* _data, uint32_t _len); + + /// + const char* get(const StringView& _name) const; + + /// + void set(const StringView& _name, const StringView& _value = ""); + + /// + void remove(const StringView& _name) const; + + /// + int32_t read(ReaderSeekerI* _reader, Error* _err); + + /// + int32_t write(WriterI* _writer, Error* _err) const; + + private: + Settings(); + + AllocatorI* m_allocator; + void* m_ini; + }; + + /// + int32_t read(ReaderSeekerI* _reader, Settings& _settings, Error* _err = NULL); + + /// + int32_t write(WriterI* _writer, const Settings& _settings, Error* _err = NULL); + +} // namespace bx + +#endif // BX_SETTINGS_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd128_langext.inl b/3rdparty/bx/include/bx/simd128_langext.inl deleted file mode 100644 index c89e612..0000000 --- a/3rdparty/bx/include/bx/simd128_langext.inl +++ /dev/null @@ -1,515 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_SIMD128_LANGEXT_H_HEADER_GUARD -#define BX_SIMD128_LANGEXT_H_HEADER_GUARD - -#define simd_rcp simd_rcp_ni -#define simd_orx simd_orx_ni -#define simd_orc simd_orc_ni -#define simd_neg simd_neg_ni -#define simd_madd simd_madd_ni -#define simd_nmsub simd_nmsub_ni -#define simd_div_nr simd_div_nr_ni -#define simd_selb simd_selb_ni -#define simd_sels simd_sels_ni -#define simd_not simd_not_ni -#define simd_abs simd_abs_ni -#define simd_clamp simd_clamp_ni -#define simd_lerp simd_lerp_ni -#define simd_rcp_est simd_rcp_ni -#define simd_rsqrt simd_rsqrt_ni -#define simd_rsqrt_nr simd_rsqrt_nr_ni -#define simd_rsqrt_carmack simd_rsqrt_carmack_ni -#define simd_sqrt_nr simd_sqrt_nr_ni -#define simd_log2 simd_log2_ni -#define simd_exp2 simd_exp2_ni -#define simd_pow simd_pow_ni -#define simd_cross3 simd_cross3_ni -#define simd_normalize3 simd_normalize3_ni -#define simd_dot3 simd_dot3_ni -#define simd_dot simd_dot_ni -#define simd_ceil simd_ceil_ni -#define simd_floor simd_floor_ni -#define simd_min simd_min_ni -#define simd_max simd_max_ni -#define simd_imin simd_imin_ni -#define simd_imax simd_imax_ni - -#include "simd_ni.inl" - -namespace bx -{ -#define ELEMx 0 -#define ELEMy 1 -#define ELEMz 2 -#define ELEMw 3 -#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - template<> \ - BX_SIMD_FORCE_INLINE simd128_langext_t simd_swiz_##_x##_y##_z##_w(simd128_langext_t _a) \ - { \ - simd128_langext_t result; \ - result.vf = __builtin_shufflevector(_a.vf, _a.vf, ELEM##_x, ELEM##_y, ELEM##_z, ELEM##_w); \ - return result; \ - } - -#include "simd128_swizzle.inl" - -#undef BX_SIMD128_IMPLEMENT_SWIZZLE -#undef ELEMw -#undef ELEMz -#undef ELEMy -#undef ELEMx - -#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ - template<> \ - BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_langext_t _test) \ - { \ - uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ - | ( (_test.uxyzw[2]>>31)<<2) \ - | ( (_test.uxyzw[1]>>31)<<1) \ - | ( _test.uxyzw[0]>>31) \ - ; \ - return 0 != (tmp&(_mask) ); \ - } \ - \ - template<> \ - BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_langext_t _test) \ - { \ - uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ - | ( (_test.uxyzw[2]>>31)<<2) \ - | ( (_test.uxyzw[1]>>31)<<1) \ - | ( _test.uxyzw[0]>>31) \ - ; \ - return (_mask) == (tmp&(_mask) ); \ - } - -BX_SIMD128_IMPLEMENT_TEST(x , 0x1); -BX_SIMD128_IMPLEMENT_TEST(y , 0x2); -BX_SIMD128_IMPLEMENT_TEST(xy , 0x3); -BX_SIMD128_IMPLEMENT_TEST(z , 0x4); -BX_SIMD128_IMPLEMENT_TEST(xz , 0x5); -BX_SIMD128_IMPLEMENT_TEST(yz , 0x6); -BX_SIMD128_IMPLEMENT_TEST(xyz , 0x7); -BX_SIMD128_IMPLEMENT_TEST(w , 0x8); -BX_SIMD128_IMPLEMENT_TEST(xw , 0x9); -BX_SIMD128_IMPLEMENT_TEST(yw , 0xa); -BX_SIMD128_IMPLEMENT_TEST(xyw , 0xb); -BX_SIMD128_IMPLEMENT_TEST(zw , 0xc); -BX_SIMD128_IMPLEMENT_TEST(xzw , 0xd); -BX_SIMD128_IMPLEMENT_TEST(yzw , 0xe); -BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); - -#undef BX_SIMD128_IMPLEMENT_TEST - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_xyAB(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 0, 1, 4, 5); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_ABxy(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 4, 5, 0, 1); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_CDzw(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 6, 7, 2, 3); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_zwCD(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 2, 3, 6, 7); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_xAyB(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 0, 4, 1, 5); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_yBxA(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 1, 5, 0, 4); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_zCwD(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 2, 6, 3, 7); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_CzDw(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 6, 2, 7, 3); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_xAzC(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 0, 4, 2, 6); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_shuf_yBwD(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = __builtin_shufflevector(_a.vf, _b.vf, 1, 5, 3, 7); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE float simd_x(simd128_langext_t _a) - { - return _a.fxyzw[0]; - } - - template<> - BX_SIMD_FORCE_INLINE float simd_y(simd128_langext_t _a) - { - return _a.fxyzw[1]; - } - - template<> - BX_SIMD_FORCE_INLINE float simd_z(simd128_langext_t _a) - { - return _a.fxyzw[2]; - } - - template<> - BX_SIMD_FORCE_INLINE float simd_w(simd128_langext_t _a) - { - return _a.fxyzw[3]; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_ld(const void* _ptr) - { - const uint32_t* input = reinterpret_cast(_ptr); - simd128_langext_t result; - result.uxyzw[0] = input[0]; - result.uxyzw[1] = input[1]; - result.uxyzw[2] = input[2]; - result.uxyzw[3] = input[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, simd128_langext_t _a) - { - uint32_t* result = reinterpret_cast(_ptr); - result[0] = _a.uxyzw[0]; - result[1] = _a.uxyzw[1]; - result[2] = _a.uxyzw[2]; - result[3] = _a.uxyzw[3]; - } - - template<> - BX_SIMD_FORCE_INLINE void simd_stx(void* _ptr, simd128_langext_t _a) - { - uint32_t* result = reinterpret_cast(_ptr); - result[0] = _a.uxyzw[0]; - } - - template<> - BX_SIMD_FORCE_INLINE void simd_stream(void* _ptr, simd128_langext_t _a) - { - uint32_t* result = reinterpret_cast(_ptr); - result[0] = _a.uxyzw[0]; - result[1] = _a.uxyzw[1]; - result[2] = _a.uxyzw[2]; - result[3] = _a.uxyzw[3]; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_ld(float _x, float _y, float _z, float _w) - { - simd128_langext_t result; - result.vf = (float __attribute__((vector_size(16)))){ _x, _y, _z, _w }; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) - { - simd128_langext_t result; - result.vu = (uint32_t __attribute__((vector_size(16)))){ _x, _y, _z, _w }; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_splat(const void* _ptr) - { - const uint32_t val = *reinterpret_cast(_ptr); - simd128_langext_t result; - result.vu = (uint32_t __attribute__((vector_size(16)))){ val, val, val, val }; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_splat(float _a) - { - return simd_ld(_a, _a, _a, _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_isplat(uint32_t _a) - { - return simd_ild(_a, _a, _a, _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_zero() - { - return simd_ild(0, 0, 0, 0); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_itof(simd128_langext_t _a) - { - simd128_langext_t result; - result.vf = __builtin_convertvector(_a.vi, float __attribute__((vector_size(16))) ); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_ftoi(simd128_langext_t _a) - { - simd128_langext_t result; - result.vi = __builtin_convertvector(_a.vf, int32_t __attribute__((vector_size(16))) ); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_round(simd128_langext_t _a) - { - const simd128_langext_t tmp = simd_ftoi(_a); - const simd128_langext_t result = simd_itof(tmp); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_add(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = _a.vf + _b.vf; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_sub(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = _a.vf - _b.vf; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_mul(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = _a.vf * _b.vf; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_div(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vf = _a.vf / _b.vf; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_sqrt(simd128_langext_t _a) - { - simd128_langext_t result; - result.vf[0] = sqrtf(_a.vf[0]); - result.vf[1] = sqrtf(_a.vf[1]); - result.vf[2] = sqrtf(_a.vf[2]); - result.vf[3] = sqrtf(_a.vf[3]); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_rsqrt_est(simd128_langext_t _a) - { - simd128_langext_t result; - result.vf[0] = 1.0f / sqrtf(_a.vf[0]); - result.vf[1] = 1.0f / sqrtf(_a.vf[1]); - result.vf[2] = 1.0f / sqrtf(_a.vf[2]); - result.vf[3] = 1.0f / sqrtf(_a.vf[3]); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_cmpeq(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vi = _a.vf == _b.vf; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_cmplt(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vi = _a.vf < _b.vf; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_cmple(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vi = _a.vf <= _b.vf; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_cmpgt(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vi = _a.vf > _b.vf; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_cmpge(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vi = _a.vf >= _b.vf; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_and(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vu = _a.vu & _b.vu; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_andc(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vu = _a.vu & ~_b.vu; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_or(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vu = _a.vu | _b.vu; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_xor(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vu = _a.vu ^ _b.vu; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_sll(simd128_langext_t _a, int _count) - { - simd128_langext_t result; - const simd128_langext_t count = simd_isplat(_count); - result.vu = _a.vu << count.vi; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_srl(simd128_langext_t _a, int _count) - { - simd128_langext_t result; - const simd128_langext_t count = simd_isplat(_count); - result.vu = _a.vu >> count.vi; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_sra(simd128_langext_t _a, int _count) - { - simd128_langext_t result; - const simd128_langext_t count = simd_isplat(_count); - result.vi = _a.vi >> count.vi; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_icmpeq(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vi = _a.vi == _b.vi; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_icmplt(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vi = _a.vi < _b.vi; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_icmpgt(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vi = _a.vi > _b.vi; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_iadd(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vi = _a.vi + _b.vi; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_langext_t simd_isub(simd128_langext_t _a, simd128_langext_t _b) - { - simd128_langext_t result; - result.vi = _a.vi - _b.vi; - return result; - } - - typedef simd128_langext_t simd128_t; - -} // namespace bx - -#endif // BX_SIMD128_LANGEXT_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd128_neon.inl b/3rdparty/bx/include/bx/simd128_neon.inl deleted file mode 100644 index 1dd0d1f..0000000 --- a/3rdparty/bx/include/bx/simd128_neon.inl +++ /dev/null @@ -1,562 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_SIMD128_NEON_H_HEADER_GUARD -#define BX_SIMD128_NEON_H_HEADER_GUARD - -#define simd_rcp simd_rcp_ni -#define simd_orx simd_orx_ni -#define simd_orc simd_orc_ni -#define simd_neg simd_neg_ni -#define simd_madd simd_madd_ni -#define simd_nmsub simd_nmsub_ni -#define simd_div_nr simd_div_nr_ni -#define simd_div simd_div_nr_ni -#define simd_selb simd_selb_ni -#define simd_sels simd_sels_ni -#define simd_not simd_not_ni -#define simd_abs simd_abs_ni -#define simd_clamp simd_clamp_ni -#define simd_lerp simd_lerp_ni -#define simd_rsqrt simd_rsqrt_ni -#define simd_rsqrt_nr simd_rsqrt_nr_ni -#define simd_rsqrt_carmack simd_rsqrt_carmack_ni -#define simd_sqrt_nr simd_sqrt_nr_ni -#define simd_sqrt simd_sqrt_nr_ni -#define simd_log2 simd_log2_ni -#define simd_exp2 simd_exp2_ni -#define simd_pow simd_pow_ni -#define simd_cross3 simd_cross3_ni -#define simd_normalize3 simd_normalize3_ni -#define simd_dot3 simd_dot3_ni -#define simd_dot simd_dot_ni -#define simd_ceil simd_ceil_ni -#define simd_floor simd_floor_ni - -#include "simd_ni.inl" - -namespace bx -{ -#define ELEMx 0 -#define ELEMy 1 -#define ELEMz 2 -#define ELEMw 3 -#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - template<> \ - BX_SIMD_FORCE_INLINE simd128_neon_t simd_swiz_##_x##_y##_z##_w(simd128_neon_t _a) \ - { \ - return __builtin_shuffle(_a, (uint32x4_t){ ELEM##_x, ELEM##_y, ELEM##_z, ELEM##_w }); \ - } - -#include "simd128_swizzle.inl" - -#undef BX_SIMD128_IMPLEMENT_SWIZZLE -#undef ELEMw -#undef ELEMz -#undef ELEMy -#undef ELEMx - -#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _swizzle) \ - template<> \ - BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_neon_t _test) \ - { \ - const simd128_neon_t tmp0 = simd_swiz_##_swizzle(_test); \ - return simd_test_any_ni(tmp0); \ - } \ - \ - template<> \ - BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_neon_t _test) \ - { \ - const simd128_neon_t tmp0 = simd_swiz_##_swizzle(_test); \ - return simd_test_all_ni(tmp0); \ - } - -BX_SIMD128_IMPLEMENT_TEST(x, xxxx); -BX_SIMD128_IMPLEMENT_TEST(y, yyyy); -BX_SIMD128_IMPLEMENT_TEST(xy, xyyy); -BX_SIMD128_IMPLEMENT_TEST(z, zzzz); -BX_SIMD128_IMPLEMENT_TEST(xz, xzzz); -BX_SIMD128_IMPLEMENT_TEST(yz, yzzz); -BX_SIMD128_IMPLEMENT_TEST(xyz, xyzz); -BX_SIMD128_IMPLEMENT_TEST(w, wwww); -BX_SIMD128_IMPLEMENT_TEST(xw, xwww); -BX_SIMD128_IMPLEMENT_TEST(yw, ywww); -BX_SIMD128_IMPLEMENT_TEST(xyw, xyww); -BX_SIMD128_IMPLEMENT_TEST(zw, zwww); -BX_SIMD128_IMPLEMENT_TEST(xzw, xzww); -BX_SIMD128_IMPLEMENT_TEST(yzw, yzww); -#undef BX_SIMD128_IMPLEMENT_TEST - - template<> - BX_SIMD_FORCE_INLINE bool simd_test_any_xyzw(simd128_neon_t _test) - { - return simd_test_any_ni(_test); - } - - template<> - BX_SIMD_FORCE_INLINE bool simd_test_all_xyzw(simd128_neon_t _test) - { - return simd_test_all_ni(_test); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_xyAB(simd128_neon_t _a, simd128_neon_t _b) - { - return __builtin_shuffle(_a, _b, (uint32x4_t){ 0, 1, 4, 5 }); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_ABxy(simd128_neon_t _a, simd128_neon_t _b) - { - return __builtin_shuffle(_a, _b, (uint32x4_t){ 4, 5, 0, 1 }); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_CDzw(simd128_neon_t _a, simd128_neon_t _b) - { - return __builtin_shuffle(_a, _b, (uint32x4_t){ 6, 7, 2, 3 }); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_zwCD(simd128_neon_t _a, simd128_neon_t _b) - { - return __builtin_shuffle(_a, _b, (uint32x4_t){ 2, 3, 6, 7 }); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_xAyB(simd128_neon_t _a, simd128_neon_t _b) - { - return __builtin_shuffle(_a, _b, (uint32x4_t){ 0, 4, 1, 5 }); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_yBxA(simd128_neon_t _a, simd128_neon_t _b) - { - return __builtin_shuffle(_a, _b, (uint32x4_t){ 1, 5, 0, 4 }); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_zCwD(simd128_neon_t _a, simd128_neon_t _b) - { - return __builtin_shuffle(_a, _b, (uint32x4_t){ 2, 6, 3, 7 }); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_shuf_CzDw(simd128_neon_t _a, simd128_neon_t _b) - { - return __builtin_shuffle(_a, _b, (uint32x4_t){ 6, 2, 7, 3 }); - } - - template<> - BX_SIMD_FORCE_INLINE float simd_x(simd128_neon_t _a) - { - return vgetq_lane_f32(_a, 0); - } - - template<> - BX_SIMD_FORCE_INLINE float simd_y(simd128_neon_t _a) - { - return vgetq_lane_f32(_a, 1); - } - - template<> - BX_SIMD_FORCE_INLINE float simd_z(simd128_neon_t _a) - { - return vgetq_lane_f32(_a, 2); - } - - template<> - BX_SIMD_FORCE_INLINE float simd_w(simd128_neon_t _a) - { - return vgetq_lane_f32(_a, 3); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_ld(const void* _ptr) - { - return vld1q_f32( (const float32_t*)_ptr); - } - - template<> - BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, simd128_neon_t _a) - { - vst1q_f32( (float32_t*)_ptr, _a); - } - - template<> - BX_SIMD_FORCE_INLINE void simd_stx(void* _ptr, simd128_neon_t _a) - { - vst1q_lane_f32( (float32_t*)_ptr, _a, 0); - } - - template<> - BX_SIMD_FORCE_INLINE void simd_stream(void* _ptr, simd128_neon_t _a) - { - vst1q_f32( (float32_t*)_ptr, _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_ld(float _x, float _y, float _z, float _w) - { - const float32_t val[4] = {_x, _y, _z, _w}; - return simd_ld(val); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) - { - const uint32_t val[4] = {_x, _y, _z, _w}; - const uint32x4_t tmp = vld1q_u32(val); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_splat(const void* _ptr) - { - const simd128_neon_t tmp0 = vld1q_f32( (const float32_t*)_ptr); - const float32x2_t tmp1 = vget_low_f32(tmp0); - const simd128_neon_t result = vdupq_lane_f32(tmp1, 0); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_splat(float _a) - { - return vdupq_n_f32(_a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_isplat(uint32_t _a) - { - const int32x4_t tmp = vdupq_n_s32(_a); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_zero() - { - return simd_isplat(0); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_itof(simd128_neon_t _a) - { - const int32x4_t itof = vreinterpretq_s32_f32(_a); - const simd128_neon_t result = vcvtq_f32_s32(itof); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_ftoi(simd128_neon_t _a) - { - const int32x4_t ftoi = vcvtq_s32_f32(_a); - const simd128_neon_t result = vreinterpretq_f32_s32(ftoi); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_add(simd128_neon_t _a, simd128_neon_t _b) - { - return vaddq_f32(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_sub(simd128_neon_t _a, simd128_neon_t _b) - { - return vsubq_f32(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_mul(simd128_neon_t _a, simd128_neon_t _b) - { - return vmulq_f32(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_rcp_est(simd128_neon_t _a) - { - return vrecpeq_f32(_a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_rsqrt_est(simd128_neon_t _a) - { - return vrsqrteq_f32(_a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_cmpeq(simd128_neon_t _a, simd128_neon_t _b) - { - const uint32x4_t tmp = vceqq_f32(_a, _b); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_cmplt(simd128_neon_t _a, simd128_neon_t _b) - { - const uint32x4_t tmp = vcltq_f32(_a, _b); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_cmple(simd128_neon_t _a, simd128_neon_t _b) - { - const uint32x4_t tmp = vcleq_f32(_a, _b); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_cmpgt(simd128_neon_t _a, simd128_neon_t _b) - { - const uint32x4_t tmp = vcgtq_f32(_a, _b); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_cmpge(simd128_neon_t _a, simd128_neon_t _b) - { - const uint32x4_t tmp = vcgeq_f32(_a, _b); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_min(simd128_neon_t _a, simd128_neon_t _b) - { - return vminq_f32(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_max(simd128_neon_t _a, simd128_neon_t _b) - { - return vmaxq_f32(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_and(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const int32x4_t tmp2 = vandq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_andc(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const int32x4_t tmp2 = vbicq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_or(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const int32x4_t tmp2 = vorrq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_xor(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const int32x4_t tmp2 = veorq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_sll(simd128_neon_t _a, int _count) - { - if (__builtin_constant_p(_count) ) - { - const uint32x4_t tmp0 = vreinterpretq_u32_f32(_a); - const uint32x4_t tmp1 = vshlq_n_u32(tmp0, _count); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp1); - - return result; - } - - const uint32x4_t tmp0 = vreinterpretq_u32_f32(_a); - const int32x4_t shift = vdupq_n_s32(_count); - const uint32x4_t tmp1 = vshlq_u32(tmp0, shift); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp1); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_srl(simd128_neon_t _a, int _count) - { - if (__builtin_constant_p(_count) ) - { - const uint32x4_t tmp0 = vreinterpretq_u32_f32(_a); - const uint32x4_t tmp1 = vshrq_n_u32(tmp0, _count); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp1); - - return result; - } - - const uint32x4_t tmp0 = vreinterpretq_u32_f32(_a); - const int32x4_t shift = vdupq_n_s32(-_count); - const uint32x4_t tmp1 = vshlq_u32(tmp0, shift); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp1); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_sra(simd128_neon_t _a, int _count) - { - if (__builtin_constant_p(_count) ) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vshrq_n_s32(tmp0, _count); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp1); - - return result; - } - - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t shift = vdupq_n_s32(-_count); - const int32x4_t tmp1 = vshlq_s32(tmp0, shift); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp1); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_madd(simd128_neon_t _a, simd128_neon_t _b, simd128_neon_t _c) - { - return vmlaq_f32(_c, _a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_nmsub(simd128_neon_t _a, simd128_neon_t _b, simd128_neon_t _c) - { - return vmlsq_f32(_c, _a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_icmpeq(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const uint32x4_t tmp2 = vceqq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_icmplt(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const uint32x4_t tmp2 = vcltq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_icmpgt(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const uint32x4_t tmp2 = vcgtq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_u32(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_imin(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const int32x4_t tmp2 = vminq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_imax(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const int32x4_t tmp2 = vmaxq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_iadd(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const int32x4_t tmp2 = vaddq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_neon_t simd_isub(simd128_neon_t _a, simd128_neon_t _b) - { - const int32x4_t tmp0 = vreinterpretq_s32_f32(_a); - const int32x4_t tmp1 = vreinterpretq_s32_f32(_b); - const int32x4_t tmp2 = vsubq_s32(tmp0, tmp1); - const simd128_neon_t result = vreinterpretq_f32_s32(tmp2); - - return result; - } - - template<> - BX_SIMD_INLINE simd128_neon_t simd_shuf_xAzC(simd128_neon_t _a, simd128_neon_t _b) - { - return simd_shuf_xAzC_ni(_a, _b); - } - - template<> - BX_SIMD_INLINE simd128_neon_t simd_shuf_yBwD(simd128_neon_t _a, simd128_neon_t _b) - { - return simd_shuf_yBwD_ni(_a, _b); - } - - typedef simd128_neon_t simd128_t; - -} // namespace bx - -#endif // BX_SIMD128_NEON_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd128_ref.inl b/3rdparty/bx/include/bx/simd128_ref.inl deleted file mode 100644 index da08f50..0000000 --- a/3rdparty/bx/include/bx/simd128_ref.inl +++ /dev/null @@ -1,650 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_SIMD128_REF_H_HEADER_GUARD -#define BX_SIMD128_REF_H_HEADER_GUARD - -#include // sqrtf - -#define simd_shuf_xAzC simd_shuf_xAzC_ni -#define simd_shuf_yBwD simd_shuf_yBwD_ni -#define simd_rcp simd_rcp_ni -#define simd_orx simd_orx_ni -#define simd_orc simd_orc_ni -#define simd_neg simd_neg_ni -#define simd_madd simd_madd_ni -#define simd_nmsub simd_nmsub_ni -#define simd_div_nr simd_div_nr_ni -#define simd_selb simd_selb_ni -#define simd_sels simd_sels_ni -#define simd_not simd_not_ni -#define simd_abs simd_abs_ni -#define simd_clamp simd_clamp_ni -#define simd_lerp simd_lerp_ni -#define simd_rsqrt simd_rsqrt_ni -#define simd_rsqrt_nr simd_rsqrt_nr_ni -#define simd_rsqrt_carmack simd_rsqrt_carmack_ni -#define simd_sqrt_nr simd_sqrt_nr_ni -#define simd_log2 simd_log2_ni -#define simd_exp2 simd_exp2_ni -#define simd_pow simd_pow_ni -#define simd_cross3 simd_cross3_ni -#define simd_normalize3 simd_normalize3_ni -#define simd_dot3 simd_dot3_ni -#define simd_dot simd_dot_ni -#define simd_ceil simd_ceil_ni -#define simd_floor simd_floor_ni - -#include "simd_ni.inl" - -namespace bx -{ -#define ELEMx 0 -#define ELEMy 1 -#define ELEMz 2 -#define ELEMw 3 -#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - template<> \ - BX_SIMD_FORCE_INLINE simd128_ref_t simd_swiz_##_x##_y##_z##_w(simd128_ref_t _a) \ - { \ - simd128_ref_t result; \ - result.ixyzw[0] = _a.ixyzw[ELEM##_x]; \ - result.ixyzw[1] = _a.ixyzw[ELEM##_y]; \ - result.ixyzw[2] = _a.ixyzw[ELEM##_z]; \ - result.ixyzw[3] = _a.ixyzw[ELEM##_w]; \ - return result; \ - } - -#include "simd128_swizzle.inl" - -#undef BX_SIMD128_IMPLEMENT_SWIZZLE -#undef ELEMw -#undef ELEMz -#undef ELEMy -#undef ELEMx - -#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ - template<> \ - BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_ref_t _test) \ - { \ - uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ - | ( (_test.uxyzw[2]>>31)<<2) \ - | ( (_test.uxyzw[1]>>31)<<1) \ - | ( _test.uxyzw[0]>>31) \ - ; \ - return 0 != (tmp&(_mask) ); \ - } \ - \ - template<> \ - BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_ref_t _test) \ - { \ - uint32_t tmp = ( (_test.uxyzw[3]>>31)<<3) \ - | ( (_test.uxyzw[2]>>31)<<2) \ - | ( (_test.uxyzw[1]>>31)<<1) \ - | ( _test.uxyzw[0]>>31) \ - ; \ - return (_mask) == (tmp&(_mask) ); \ - } - -BX_SIMD128_IMPLEMENT_TEST(x , 0x1); -BX_SIMD128_IMPLEMENT_TEST(y , 0x2); -BX_SIMD128_IMPLEMENT_TEST(xy , 0x3); -BX_SIMD128_IMPLEMENT_TEST(z , 0x4); -BX_SIMD128_IMPLEMENT_TEST(xz , 0x5); -BX_SIMD128_IMPLEMENT_TEST(yz , 0x6); -BX_SIMD128_IMPLEMENT_TEST(xyz , 0x7); -BX_SIMD128_IMPLEMENT_TEST(w , 0x8); -BX_SIMD128_IMPLEMENT_TEST(xw , 0x9); -BX_SIMD128_IMPLEMENT_TEST(yw , 0xa); -BX_SIMD128_IMPLEMENT_TEST(xyw , 0xb); -BX_SIMD128_IMPLEMENT_TEST(zw , 0xc); -BX_SIMD128_IMPLEMENT_TEST(xzw , 0xd); -BX_SIMD128_IMPLEMENT_TEST(yzw , 0xe); -BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); - -#undef BX_SIMD128_IMPLEMENT_TEST - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_xyAB(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[0]; - result.uxyzw[1] = _a.uxyzw[1]; - result.uxyzw[2] = _b.uxyzw[0]; - result.uxyzw[3] = _b.uxyzw[1]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_ABxy(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _b.uxyzw[0]; - result.uxyzw[1] = _b.uxyzw[1]; - result.uxyzw[2] = _a.uxyzw[0]; - result.uxyzw[3] = _a.uxyzw[1]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_CDzw(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _b.uxyzw[2]; - result.uxyzw[1] = _b.uxyzw[3]; - result.uxyzw[2] = _a.uxyzw[2]; - result.uxyzw[3] = _a.uxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_zwCD(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[2]; - result.uxyzw[1] = _a.uxyzw[3]; - result.uxyzw[2] = _b.uxyzw[2]; - result.uxyzw[3] = _b.uxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_xAyB(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[0]; - result.uxyzw[1] = _b.uxyzw[0]; - result.uxyzw[2] = _a.uxyzw[1]; - result.uxyzw[3] = _b.uxyzw[1]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_yBxA(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[1]; - result.uxyzw[1] = _b.uxyzw[1]; - result.uxyzw[2] = _a.uxyzw[0]; - result.uxyzw[3] = _b.uxyzw[0]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_zCwD(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[2]; - result.uxyzw[1] = _b.uxyzw[2]; - result.uxyzw[2] = _a.uxyzw[3]; - result.uxyzw[3] = _b.uxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_shuf_CzDw(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _b.uxyzw[2]; - result.uxyzw[1] = _a.uxyzw[2]; - result.uxyzw[2] = _b.uxyzw[3]; - result.uxyzw[3] = _a.uxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE float simd_x(simd128_ref_t _a) - { - return _a.fxyzw[0]; - } - - template<> - BX_SIMD_FORCE_INLINE float simd_y(simd128_ref_t _a) - { - return _a.fxyzw[1]; - } - - template<> - BX_SIMD_FORCE_INLINE float simd_z(simd128_ref_t _a) - { - return _a.fxyzw[2]; - } - - template<> - BX_SIMD_FORCE_INLINE float simd_w(simd128_ref_t _a) - { - return _a.fxyzw[3]; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_ld(const void* _ptr) - { - const uint32_t* input = reinterpret_cast(_ptr); - simd128_ref_t result; - result.uxyzw[0] = input[0]; - result.uxyzw[1] = input[1]; - result.uxyzw[2] = input[2]; - result.uxyzw[3] = input[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, simd128_ref_t _a) - { - uint32_t* result = reinterpret_cast(_ptr); - result[0] = _a.uxyzw[0]; - result[1] = _a.uxyzw[1]; - result[2] = _a.uxyzw[2]; - result[3] = _a.uxyzw[3]; - } - - template<> - BX_SIMD_FORCE_INLINE void simd_stx(void* _ptr, simd128_ref_t _a) - { - uint32_t* result = reinterpret_cast(_ptr); - result[0] = _a.uxyzw[0]; - } - - template<> - BX_SIMD_FORCE_INLINE void simd_stream(void* _ptr, simd128_ref_t _a) - { - uint32_t* result = reinterpret_cast(_ptr); - result[0] = _a.uxyzw[0]; - result[1] = _a.uxyzw[1]; - result[2] = _a.uxyzw[2]; - result[3] = _a.uxyzw[3]; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_ld(float _x, float _y, float _z, float _w) - { - simd128_ref_t result; - result.fxyzw[0] = _x; - result.fxyzw[1] = _y; - result.fxyzw[2] = _z; - result.fxyzw[3] = _w; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) - { - simd128_ref_t result; - result.uxyzw[0] = _x; - result.uxyzw[1] = _y; - result.uxyzw[2] = _z; - result.uxyzw[3] = _w; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_splat(const void* _ptr) - { - const uint32_t val = *reinterpret_cast(_ptr); - simd128_ref_t result; - result.uxyzw[0] = val; - result.uxyzw[1] = val; - result.uxyzw[2] = val; - result.uxyzw[3] = val; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_splat(float _a) - { - return simd_ld(_a, _a, _a, _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_isplat(uint32_t _a) - { - return simd_ild(_a, _a, _a, _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_zero() - { - return simd_ild(0, 0, 0, 0); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_itof(simd128_ref_t _a) - { - simd128_ref_t result; - result.fxyzw[0] = (float)_a.ixyzw[0]; - result.fxyzw[1] = (float)_a.ixyzw[1]; - result.fxyzw[2] = (float)_a.ixyzw[2]; - result.fxyzw[3] = (float)_a.ixyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_ftoi(simd128_ref_t _a) - { - simd128_ref_t result; - result.ixyzw[0] = (int)_a.fxyzw[0]; - result.ixyzw[1] = (int)_a.fxyzw[1]; - result.ixyzw[2] = (int)_a.fxyzw[2]; - result.ixyzw[3] = (int)_a.fxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_round(simd128_ref_t _a) - { - return simd_round_ni(_a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_add(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.fxyzw[0] = _a.fxyzw[0] + _b.fxyzw[0]; - result.fxyzw[1] = _a.fxyzw[1] + _b.fxyzw[1]; - result.fxyzw[2] = _a.fxyzw[2] + _b.fxyzw[2]; - result.fxyzw[3] = _a.fxyzw[3] + _b.fxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_sub(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.fxyzw[0] = _a.fxyzw[0] - _b.fxyzw[0]; - result.fxyzw[1] = _a.fxyzw[1] - _b.fxyzw[1]; - result.fxyzw[2] = _a.fxyzw[2] - _b.fxyzw[2]; - result.fxyzw[3] = _a.fxyzw[3] - _b.fxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_mul(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.fxyzw[0] = _a.fxyzw[0] * _b.fxyzw[0]; - result.fxyzw[1] = _a.fxyzw[1] * _b.fxyzw[1]; - result.fxyzw[2] = _a.fxyzw[2] * _b.fxyzw[2]; - result.fxyzw[3] = _a.fxyzw[3] * _b.fxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_div(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.fxyzw[0] = _a.fxyzw[0] / _b.fxyzw[0]; - result.fxyzw[1] = _a.fxyzw[1] / _b.fxyzw[1]; - result.fxyzw[2] = _a.fxyzw[2] / _b.fxyzw[2]; - result.fxyzw[3] = _a.fxyzw[3] / _b.fxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_rcp_est(simd128_ref_t _a) - { - simd128_ref_t result; - result.fxyzw[0] = 1.0f / _a.fxyzw[0]; - result.fxyzw[1] = 1.0f / _a.fxyzw[1]; - result.fxyzw[2] = 1.0f / _a.fxyzw[2]; - result.fxyzw[3] = 1.0f / _a.fxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_sqrt(simd128_ref_t _a) - { - simd128_ref_t result; - result.fxyzw[0] = sqrtf(_a.fxyzw[0]); - result.fxyzw[1] = sqrtf(_a.fxyzw[1]); - result.fxyzw[2] = sqrtf(_a.fxyzw[2]); - result.fxyzw[3] = sqrtf(_a.fxyzw[3]); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_rsqrt_est(simd128_ref_t _a) - { - simd128_ref_t result; - result.fxyzw[0] = 1.0f / sqrtf(_a.fxyzw[0]); - result.fxyzw[1] = 1.0f / sqrtf(_a.fxyzw[1]); - result.fxyzw[2] = 1.0f / sqrtf(_a.fxyzw[2]); - result.fxyzw[3] = 1.0f / sqrtf(_a.fxyzw[3]); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_cmpeq(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.fxyzw[0] == _b.fxyzw[0] ? 0xffffffff : 0x0; - result.ixyzw[1] = _a.fxyzw[1] == _b.fxyzw[1] ? 0xffffffff : 0x0; - result.ixyzw[2] = _a.fxyzw[2] == _b.fxyzw[2] ? 0xffffffff : 0x0; - result.ixyzw[3] = _a.fxyzw[3] == _b.fxyzw[3] ? 0xffffffff : 0x0; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_cmplt(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.fxyzw[0] < _b.fxyzw[0] ? 0xffffffff : 0x0; - result.ixyzw[1] = _a.fxyzw[1] < _b.fxyzw[1] ? 0xffffffff : 0x0; - result.ixyzw[2] = _a.fxyzw[2] < _b.fxyzw[2] ? 0xffffffff : 0x0; - result.ixyzw[3] = _a.fxyzw[3] < _b.fxyzw[3] ? 0xffffffff : 0x0; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_cmple(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.fxyzw[0] <= _b.fxyzw[0] ? 0xffffffff : 0x0; - result.ixyzw[1] = _a.fxyzw[1] <= _b.fxyzw[1] ? 0xffffffff : 0x0; - result.ixyzw[2] = _a.fxyzw[2] <= _b.fxyzw[2] ? 0xffffffff : 0x0; - result.ixyzw[3] = _a.fxyzw[3] <= _b.fxyzw[3] ? 0xffffffff : 0x0; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_cmpgt(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.fxyzw[0] > _b.fxyzw[0] ? 0xffffffff : 0x0; - result.ixyzw[1] = _a.fxyzw[1] > _b.fxyzw[1] ? 0xffffffff : 0x0; - result.ixyzw[2] = _a.fxyzw[2] > _b.fxyzw[2] ? 0xffffffff : 0x0; - result.ixyzw[3] = _a.fxyzw[3] > _b.fxyzw[3] ? 0xffffffff : 0x0; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_cmpge(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.fxyzw[0] >= _b.fxyzw[0] ? 0xffffffff : 0x0; - result.ixyzw[1] = _a.fxyzw[1] >= _b.fxyzw[1] ? 0xffffffff : 0x0; - result.ixyzw[2] = _a.fxyzw[2] >= _b.fxyzw[2] ? 0xffffffff : 0x0; - result.ixyzw[3] = _a.fxyzw[3] >= _b.fxyzw[3] ? 0xffffffff : 0x0; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_min(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.fxyzw[0] = _a.fxyzw[0] < _b.fxyzw[0] ? _a.fxyzw[0] : _b.fxyzw[0]; - result.fxyzw[1] = _a.fxyzw[1] < _b.fxyzw[1] ? _a.fxyzw[1] : _b.fxyzw[1]; - result.fxyzw[2] = _a.fxyzw[2] < _b.fxyzw[2] ? _a.fxyzw[2] : _b.fxyzw[2]; - result.fxyzw[3] = _a.fxyzw[3] < _b.fxyzw[3] ? _a.fxyzw[3] : _b.fxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_max(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.fxyzw[0] = _a.fxyzw[0] > _b.fxyzw[0] ? _a.fxyzw[0] : _b.fxyzw[0]; - result.fxyzw[1] = _a.fxyzw[1] > _b.fxyzw[1] ? _a.fxyzw[1] : _b.fxyzw[1]; - result.fxyzw[2] = _a.fxyzw[2] > _b.fxyzw[2] ? _a.fxyzw[2] : _b.fxyzw[2]; - result.fxyzw[3] = _a.fxyzw[3] > _b.fxyzw[3] ? _a.fxyzw[3] : _b.fxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_and(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[0] & _b.uxyzw[0]; - result.uxyzw[1] = _a.uxyzw[1] & _b.uxyzw[1]; - result.uxyzw[2] = _a.uxyzw[2] & _b.uxyzw[2]; - result.uxyzw[3] = _a.uxyzw[3] & _b.uxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_andc(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[0] & ~_b.uxyzw[0]; - result.uxyzw[1] = _a.uxyzw[1] & ~_b.uxyzw[1]; - result.uxyzw[2] = _a.uxyzw[2] & ~_b.uxyzw[2]; - result.uxyzw[3] = _a.uxyzw[3] & ~_b.uxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_or(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[0] | _b.uxyzw[0]; - result.uxyzw[1] = _a.uxyzw[1] | _b.uxyzw[1]; - result.uxyzw[2] = _a.uxyzw[2] | _b.uxyzw[2]; - result.uxyzw[3] = _a.uxyzw[3] | _b.uxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_xor(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[0] ^ _b.uxyzw[0]; - result.uxyzw[1] = _a.uxyzw[1] ^ _b.uxyzw[1]; - result.uxyzw[2] = _a.uxyzw[2] ^ _b.uxyzw[2]; - result.uxyzw[3] = _a.uxyzw[3] ^ _b.uxyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_sll(simd128_ref_t _a, int _count) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[0] << _count; - result.uxyzw[1] = _a.uxyzw[1] << _count; - result.uxyzw[2] = _a.uxyzw[2] << _count; - result.uxyzw[3] = _a.uxyzw[3] << _count; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_srl(simd128_ref_t _a, int _count) - { - simd128_ref_t result; - result.uxyzw[0] = _a.uxyzw[0] >> _count; - result.uxyzw[1] = _a.uxyzw[1] >> _count; - result.uxyzw[2] = _a.uxyzw[2] >> _count; - result.uxyzw[3] = _a.uxyzw[3] >> _count; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_sra(simd128_ref_t _a, int _count) - { - simd128_ref_t result; - result.ixyzw[0] = _a.ixyzw[0] >> _count; - result.ixyzw[1] = _a.ixyzw[1] >> _count; - result.ixyzw[2] = _a.ixyzw[2] >> _count; - result.ixyzw[3] = _a.ixyzw[3] >> _count; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_icmpeq(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.ixyzw[0] == _b.ixyzw[0] ? 0xffffffff : 0x0; - result.ixyzw[1] = _a.ixyzw[1] == _b.ixyzw[1] ? 0xffffffff : 0x0; - result.ixyzw[2] = _a.ixyzw[2] == _b.ixyzw[2] ? 0xffffffff : 0x0; - result.ixyzw[3] = _a.ixyzw[3] == _b.ixyzw[3] ? 0xffffffff : 0x0; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_icmplt(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.ixyzw[0] < _b.ixyzw[0] ? 0xffffffff : 0x0; - result.ixyzw[1] = _a.ixyzw[1] < _b.ixyzw[1] ? 0xffffffff : 0x0; - result.ixyzw[2] = _a.ixyzw[2] < _b.ixyzw[2] ? 0xffffffff : 0x0; - result.ixyzw[3] = _a.ixyzw[3] < _b.ixyzw[3] ? 0xffffffff : 0x0; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_icmpgt(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.ixyzw[0] > _b.ixyzw[0] ? 0xffffffff : 0x0; - result.ixyzw[1] = _a.ixyzw[1] > _b.ixyzw[1] ? 0xffffffff : 0x0; - result.ixyzw[2] = _a.ixyzw[2] > _b.ixyzw[2] ? 0xffffffff : 0x0; - result.ixyzw[3] = _a.ixyzw[3] > _b.ixyzw[3] ? 0xffffffff : 0x0; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_imin(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.ixyzw[0] < _b.ixyzw[0] ? _a.ixyzw[0] : _b.ixyzw[0]; - result.ixyzw[1] = _a.ixyzw[1] < _b.ixyzw[1] ? _a.ixyzw[1] : _b.ixyzw[1]; - result.ixyzw[2] = _a.ixyzw[2] < _b.ixyzw[2] ? _a.ixyzw[2] : _b.ixyzw[2]; - result.ixyzw[3] = _a.ixyzw[3] < _b.ixyzw[3] ? _a.ixyzw[3] : _b.ixyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_imax(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.ixyzw[0] > _b.ixyzw[0] ? _a.ixyzw[0] : _b.ixyzw[0]; - result.ixyzw[1] = _a.ixyzw[1] > _b.ixyzw[1] ? _a.ixyzw[1] : _b.ixyzw[1]; - result.ixyzw[2] = _a.ixyzw[2] > _b.ixyzw[2] ? _a.ixyzw[2] : _b.ixyzw[2]; - result.ixyzw[3] = _a.ixyzw[3] > _b.ixyzw[3] ? _a.ixyzw[3] : _b.ixyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_iadd(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.ixyzw[0] + _b.ixyzw[0]; - result.ixyzw[1] = _a.ixyzw[1] + _b.ixyzw[1]; - result.ixyzw[2] = _a.ixyzw[2] + _b.ixyzw[2]; - result.ixyzw[3] = _a.ixyzw[3] + _b.ixyzw[3]; - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_ref_t simd_isub(simd128_ref_t _a, simd128_ref_t _b) - { - simd128_ref_t result; - result.ixyzw[0] = _a.ixyzw[0] - _b.ixyzw[0]; - result.ixyzw[1] = _a.ixyzw[1] - _b.ixyzw[1]; - result.ixyzw[2] = _a.ixyzw[2] - _b.ixyzw[2]; - result.ixyzw[3] = _a.ixyzw[3] - _b.ixyzw[3]; - return result; - } - -} // namespace bx - -#endif // BX_SIMD128_REF_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd128_sse.inl b/3rdparty/bx/include/bx/simd128_sse.inl deleted file mode 100644 index b0ed852..0000000 --- a/3rdparty/bx/include/bx/simd128_sse.inl +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_SIMD128_SSE_H_HEADER_GUARD -#define BX_SIMD128_SSE_H_HEADER_GUARD - -#include "simd_ni.inl" - -namespace bx -{ -#define ELEMx 0 -#define ELEMy 1 -#define ELEMz 2 -#define ELEMw 3 -#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - template<> \ - BX_SIMD_FORCE_INLINE simd128_sse_t simd_swiz_##_x##_y##_z##_w(simd128_sse_t _a) \ - { \ - return _mm_shuffle_ps( _a, _a, _MM_SHUFFLE(ELEM##_w, ELEM##_z, ELEM##_y, ELEM##_x ) ); \ - } - -#include "simd128_swizzle.inl" - -#undef BX_SIMD128_IMPLEMENT_SWIZZLE -#undef ELEMw -#undef ELEMz -#undef ELEMy -#undef ELEMx - -#define BX_SIMD128_IMPLEMENT_TEST(_xyzw, _mask) \ - template<> \ - BX_SIMD_FORCE_INLINE bool simd_test_any_##_xyzw(simd128_sse_t _test) \ - { \ - return 0x0 != (_mm_movemask_ps(_test)&(_mask) ); \ - } \ - \ - template<> \ - BX_SIMD_FORCE_INLINE bool simd_test_all_##_xyzw(simd128_sse_t _test) \ - { \ - return (_mask) == (_mm_movemask_ps(_test)&(_mask) ); \ - } - -BX_SIMD128_IMPLEMENT_TEST(x , 0x1); -BX_SIMD128_IMPLEMENT_TEST(y , 0x2); -BX_SIMD128_IMPLEMENT_TEST(xy , 0x3); -BX_SIMD128_IMPLEMENT_TEST(z , 0x4); -BX_SIMD128_IMPLEMENT_TEST(xz , 0x5); -BX_SIMD128_IMPLEMENT_TEST(yz , 0x6); -BX_SIMD128_IMPLEMENT_TEST(xyz , 0x7); -BX_SIMD128_IMPLEMENT_TEST(w , 0x8); -BX_SIMD128_IMPLEMENT_TEST(xw , 0x9); -BX_SIMD128_IMPLEMENT_TEST(yw , 0xa); -BX_SIMD128_IMPLEMENT_TEST(xyw , 0xb); -BX_SIMD128_IMPLEMENT_TEST(zw , 0xc); -BX_SIMD128_IMPLEMENT_TEST(xzw , 0xd); -BX_SIMD128_IMPLEMENT_TEST(yzw , 0xe); -BX_SIMD128_IMPLEMENT_TEST(xyzw , 0xf); - -#undef BX_SIMD128_IMPLEMENT_TEST - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_xyAB(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_movelh_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_ABxy(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_movelh_ps(_b, _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_CDzw(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_movehl_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_zwCD(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_movehl_ps(_b, _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_xAyB(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_unpacklo_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_yBxA(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_unpacklo_ps(_b, _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_zCwD(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_unpackhi_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_shuf_CzDw(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_unpackhi_ps(_b, _a); - } - - template<> - BX_SIMD_FORCE_INLINE float simd_x(simd128_sse_t _a) - { - return _mm_cvtss_f32(_a); - } - - template<> - BX_SIMD_FORCE_INLINE float simd_y(simd128_sse_t _a) - { - const simd128_sse_t yyyy = simd_swiz_yyyy(_a); - const float result = _mm_cvtss_f32(yyyy); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE float simd_z(simd128_sse_t _a) - { - const simd128_sse_t zzzz = simd_swiz_zzzz(_a); - const float result = _mm_cvtss_f32(zzzz); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE float simd_w(simd128_sse_t _a) - { - const simd128_sse_t wwww = simd_swiz_wwww(_a); - const float result = _mm_cvtss_f32(wwww); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_ld(const void* _ptr) - { - return _mm_load_ps(reinterpret_cast(_ptr) ); - } - - template<> - BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, simd128_sse_t _a) - { - _mm_store_ps(reinterpret_cast(_ptr), _a); - } - - template<> - BX_SIMD_FORCE_INLINE void simd_stx(void* _ptr, simd128_sse_t _a) - { - _mm_store_ss(reinterpret_cast(_ptr), _a); - } - - template<> - BX_SIMD_FORCE_INLINE void simd_stream(void* _ptr, simd128_sse_t _a) - { - _mm_stream_ps(reinterpret_cast(_ptr), _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_ld(float _x, float _y, float _z, float _w) - { - return _mm_set_ps(_w, _z, _y, _x); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) - { - const __m128i set = _mm_set_epi32(_w, _z, _y, _x); - const simd128_sse_t result = _mm_castsi128_ps(set); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_splat(const void* _ptr) - { - const simd128_sse_t x___ = _mm_load_ss(reinterpret_cast(_ptr) ); - const simd128_sse_t result = simd_swiz_xxxx(x___); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_splat(float _a) - { - return _mm_set1_ps(_a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_isplat(uint32_t _a) - { - const __m128i splat = _mm_set1_epi32(_a); - const simd128_sse_t result = _mm_castsi128_ps(splat); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_zero() - { - return _mm_setzero_ps(); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_itof(simd128_sse_t _a) - { - const __m128i itof = _mm_castps_si128(_a); - const simd128_sse_t result = _mm_cvtepi32_ps(itof); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_ftoi(simd128_sse_t _a) - { - const __m128i ftoi = _mm_cvtps_epi32(_a); - const simd128_sse_t result = _mm_castsi128_ps(ftoi); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_round(simd128_sse_t _a) - { -#if defined(__SSE4_1__) - return _mm_round_ps(_a, _MM_FROUND_NINT); -#else - const __m128i round = _mm_cvtps_epi32(_a); - const simd128_sse_t result = _mm_cvtepi32_ps(round); - - return result; -#endif // defined(__SSE4_1__) - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_add(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_add_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_sub(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_sub_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_mul(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_mul_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_div(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_div_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_rcp_est(simd128_sse_t _a) - { - return _mm_rcp_ps(_a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_sqrt(simd128_sse_t _a) - { - return _mm_sqrt_ps(_a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_rsqrt_est(simd128_sse_t _a) - { - return _mm_rsqrt_ps(_a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_dot3(simd128_sse_t _a, simd128_sse_t _b) - { -#if defined(__SSE4_1__) - return _mm_dp_ps(_a, _b, 0x77); -#else - return simd_dot3_ni(_a, _b); -#endif // defined(__SSE4__) - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_dot(simd128_sse_t _a, simd128_sse_t _b) - { -#if defined(__SSE4_1__) - return _mm_dp_ps(_a, _b, 0xFF); -#else - return simd_dot_ni(_a, _b); -#endif // defined(__SSE4__) - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_cmpeq(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_cmpeq_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_cmplt(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_cmplt_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_cmple(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_cmple_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_cmpgt(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_cmpgt_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_cmpge(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_cmpge_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_min(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_min_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_max(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_max_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_and(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_and_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_andc(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_andnot_ps(_b, _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_or(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_or_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_xor(simd128_sse_t _a, simd128_sse_t _b) - { - return _mm_xor_ps(_a, _b); - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_sll(simd128_sse_t _a, int _count) - { - const __m128i a = _mm_castps_si128(_a); - const __m128i shift = _mm_slli_epi32(a, _count); - const simd128_sse_t result = _mm_castsi128_ps(shift); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_srl(simd128_sse_t _a, int _count) - { - const __m128i a = _mm_castps_si128(_a); - const __m128i shift = _mm_srli_epi32(a, _count); - const simd128_sse_t result = _mm_castsi128_ps(shift); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_sra(simd128_sse_t _a, int _count) - { - const __m128i a = _mm_castps_si128(_a); - const __m128i shift = _mm_srai_epi32(a, _count); - const simd128_sse_t result = _mm_castsi128_ps(shift); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_icmpeq(simd128_sse_t _a, simd128_sse_t _b) - { - const __m128i tmp0 = _mm_castps_si128(_a); - const __m128i tmp1 = _mm_castps_si128(_b); - const __m128i tmp2 = _mm_cmpeq_epi32(tmp0, tmp1); - const simd128_sse_t result = _mm_castsi128_ps(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_icmplt(simd128_sse_t _a, simd128_sse_t _b) - { - const __m128i tmp0 = _mm_castps_si128(_a); - const __m128i tmp1 = _mm_castps_si128(_b); - const __m128i tmp2 = _mm_cmplt_epi32(tmp0, tmp1); - const simd128_sse_t result = _mm_castsi128_ps(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_icmpgt(simd128_sse_t _a, simd128_sse_t _b) - { - const __m128i tmp0 = _mm_castps_si128(_a); - const __m128i tmp1 = _mm_castps_si128(_b); - const __m128i tmp2 = _mm_cmpgt_epi32(tmp0, tmp1); - const simd128_sse_t result = _mm_castsi128_ps(tmp2); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_imin(simd128_sse_t _a, simd128_sse_t _b) - { -#if defined(__SSE4_1__) - const __m128i tmp0 = _mm_castps_si128(_a); - const __m128i tmp1 = _mm_castps_si128(_b); - const __m128i tmp2 = _mm_min_epi32(tmp0, tmp1); - const simd128_sse_t result = _mm_castsi128_ps(tmp2); - - return result; -#else - return simd_imin_ni(_a, _b); -#endif // defined(__SSE4_1__) - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_imax(simd128_sse_t _a, simd128_sse_t _b) - { -#if defined(__SSE4_1__) - const __m128i tmp0 = _mm_castps_si128(_a); - const __m128i tmp1 = _mm_castps_si128(_b); - const __m128i tmp2 = _mm_max_epi32(tmp0, tmp1); - const simd128_sse_t result = _mm_castsi128_ps(tmp2); - - return result; -#else - return simd_imax_ni(_a, _b); -#endif // defined(__SSE4_1__) - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_iadd(simd128_sse_t _a, simd128_sse_t _b) - { - const __m128i a = _mm_castps_si128(_a); - const __m128i b = _mm_castps_si128(_b); - const __m128i add = _mm_add_epi32(a, b); - const simd128_sse_t result = _mm_castsi128_ps(add); - - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd128_sse_t simd_isub(simd128_sse_t _a, simd128_sse_t _b) - { - const __m128i a = _mm_castps_si128(_a); - const __m128i b = _mm_castps_si128(_b); - const __m128i sub = _mm_sub_epi32(a, b); - const simd128_sse_t result = _mm_castsi128_ps(sub); - - return result; - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_shuf_xAzC(simd128_sse_t _a, simd128_sse_t _b) - { - return simd_shuf_xAzC_ni(_a, _b); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_shuf_yBwD(simd128_sse_t _a, simd128_sse_t _b) - { - return simd_shuf_yBwD_ni(_a, _b); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_rcp(simd128_sse_t _a) - { - return simd_rcp_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_orx(simd128_sse_t _a) - { - return simd_orx_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_orc(simd128_sse_t _a, simd128_sse_t _b) - { - return simd_orc_ni(_a, _b); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_neg(simd128_sse_t _a) - { - return simd_neg_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_madd(simd128_sse_t _a, simd128_sse_t _b, simd128_sse_t _c) - { - return simd_madd_ni(_a, _b, _c); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_nmsub(simd128_sse_t _a, simd128_sse_t _b, simd128_sse_t _c) - { - return simd_nmsub_ni(_a, _b, _c); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_div_nr(simd128_sse_t _a, simd128_sse_t _b) - { - return simd_div_nr_ni(_a, _b); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_selb(simd128_sse_t _mask, simd128_sse_t _a, simd128_sse_t _b) - { - return simd_selb_ni(_mask, _a, _b); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_sels(simd128_sse_t _test, simd128_sse_t _a, simd128_sse_t _b) - { - return simd_sels_ni(_test, _a, _b); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_not(simd128_sse_t _a) - { - return simd_not_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_abs(simd128_sse_t _a) - { - return simd_abs_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_clamp(simd128_sse_t _a, simd128_sse_t _min, simd128_sse_t _max) - { - return simd_clamp_ni(_a, _min, _max); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_lerp(simd128_sse_t _a, simd128_sse_t _b, simd128_sse_t _s) - { - return simd_lerp_ni(_a, _b, _s); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_rsqrt(simd128_sse_t _a) - { - return simd_rsqrt_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_rsqrt_nr(simd128_sse_t _a) - { - return simd_rsqrt_nr_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_rsqrt_carmack(simd128_sse_t _a) - { - return simd_rsqrt_carmack_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_sqrt_nr(simd128_sse_t _a) - { - return simd_sqrt_nr_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_log2(simd128_sse_t _a) - { - return simd_log2_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_exp2(simd128_sse_t _a) - { - return simd_exp2_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_pow(simd128_sse_t _a, simd128_sse_t _b) - { - return simd_pow_ni(_a, _b); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_cross3(simd128_sse_t _a, simd128_sse_t _b) - { - return simd_cross3_ni(_a, _b); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_normalize3(simd128_sse_t _a) - { - return simd_normalize3_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_ceil(simd128_sse_t _a) - { - return simd_ceil_ni(_a); - } - - template<> - BX_SIMD_INLINE simd128_sse_t simd_floor(simd128_sse_t _a) - { - return simd_floor_ni(_a); - } - - typedef simd128_sse_t simd128_t; - -} // namespace bx - -#endif // BX_SIMD128_SSE_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd128_swizzle.inl b/3rdparty/bx/include/bx/simd128_swizzle.inl deleted file mode 100644 index 4185be8..0000000 --- a/3rdparty/bx/include/bx/simd128_swizzle.inl +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright 2010-2015 Branimir Karadzic. All rights reserved. - * License: http://www.opensource.org/licenses/BSD-2-Clause - */ - -#ifndef BX_SIMD_T_H_HEADER_GUARD -# error "xmacro file, must be included from simd_*.h" -#endif // BX_FLOAT4_T_H_HEADER_GUARD - -// included from float4_t.h -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, x, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, z, z) -// BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, y, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, z, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(x, w, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, x, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, y, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, z, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(y, w, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, x, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, y, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, z, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(z, w, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, x, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, y, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, z, w, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, x, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, x, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, x, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, x, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, y, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, y, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, y, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, y, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, z, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, z, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, z, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, z, w) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, w, x) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, w, y) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, w, z) -BX_SIMD128_IMPLEMENT_SWIZZLE(w, w, w, w) diff --git a/3rdparty/bx/include/bx/simd256_avx.inl b/3rdparty/bx/include/bx/simd256_avx.inl deleted file mode 100644 index 33f5af7..0000000 --- a/3rdparty/bx/include/bx/simd256_avx.inl +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_SIMD256_AVX_H_HEADER_GUARD -#define BX_SIMD256_AVX_H_HEADER_GUARD - -#include "simd_ni.inl" - -namespace bx -{ - - template<> - BX_SIMD_FORCE_INLINE simd256_avx_t simd_ld(const void* _ptr) - { - return _mm256_load_ps(reinterpret_cast(_ptr) ); - } - - template<> - BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, simd256_avx_t _a) - { - _mm256_store_ps(reinterpret_cast(_ptr), _a); - } - - template<> - BX_SIMD_FORCE_INLINE simd256_avx_t simd_ld(float _x, float _y, float _z, float _w, float _A, float _B, float _C, float _D) - { - return _mm256_set_ps(_D, _C, _B, _A, _w, _z, _y, _x); - } - - template<> - BX_SIMD_FORCE_INLINE simd256_avx_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w, uint32_t _A, uint32_t _B, uint32_t _C, uint32_t _D) - { - const __m256i set = _mm256_set_epi32(_D, _C, _B, _A, _w, _z, _y, _x); - const simd256_avx_t result = _mm256_castsi256_ps(set); - - return result; - } - - typedef simd256_avx_t simd256_t; - -} // namespace bx - -#endif // BX_SIMD256_AVX_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd256_ref.inl b/3rdparty/bx/include/bx/simd256_ref.inl deleted file mode 100644 index b1bca3f..0000000 --- a/3rdparty/bx/include/bx/simd256_ref.inl +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_SIMD256_REF_H_HEADER_GUARD -#define BX_SIMD256_REF_H_HEADER_GUARD - -#include "simd_ni.inl" - -namespace bx -{ - template<> - BX_SIMD_FORCE_INLINE simd256_ref_t simd_ld(const void* _ptr) - { - const simd128_t* ptr = reinterpret_cast(_ptr); - simd256_ref_t result; - result.simd128_0 = simd_ld(&ptr[0]); - result.simd128_1 = simd_ld(&ptr[1]); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, simd256_ref_t& _a) - { - simd128_t* result = reinterpret_cast(_ptr); - simd_st(&result[0], _a.simd128_0); - simd_st(&result[1], _a.simd128_1); - } - - template<> - BX_SIMD_FORCE_INLINE simd256_ref_t simd_ld(float _x, float _y, float _z, float _w, float _a, float _b, float _c, float _d) - { - simd256_ref_t result; - result.simd128_0 = simd_ld(_x, _y, _z, _w); - result.simd128_1 = simd_ld(_a, _b, _c, _d); - return result; - } - - template<> - BX_SIMD_FORCE_INLINE simd256_ref_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w, uint32_t _a, uint32_t _b, uint32_t _c, uint32_t _d) - { - simd256_ref_t result; - result.simd128_0 = simd_ild(_x, _y, _z, _w); - result.simd128_1 = simd_ild(_a, _b, _c, _d); - return result; - } - -} // namespace bx - -#endif // BX_SIMD256_REF_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd_ni.inl b/3rdparty/bx/include/bx/simd_ni.inl deleted file mode 100644 index 95767f2..0000000 --- a/3rdparty/bx/include/bx/simd_ni.inl +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_SIMD_NI_H_HEADER_GUARD -#define BX_SIMD_NI_H_HEADER_GUARD - -namespace bx -{ - template - BX_SIMD_INLINE Ty simd_shuf_xAzC_ni(Ty _a, Ty _b) - { - const Ty xAyB = simd_shuf_xAyB(_a, _b); - const Ty zCwD = simd_shuf_zCwD(_a, _b); - const Ty result = simd_shuf_xyAB(xAyB, zCwD); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_shuf_yBwD_ni(Ty _a, Ty _b) - { - const Ty xAyB = simd_shuf_xAyB(_a, _b); - const Ty zCwD = simd_shuf_zCwD(_a, _b); - const Ty result = simd_shuf_zwCD(xAyB, zCwD); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_madd_ni(Ty _a, Ty _b, Ty _c) - { - const Ty mul = simd_mul(_a, _b); - const Ty result = simd_add(mul, _c); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_nmsub_ni(Ty _a, Ty _b, Ty _c) - { - const Ty mul = simd_mul(_a, _b); - const Ty result = simd_sub(_c, mul); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_div_nr_ni(Ty _a, Ty _b) - { - const Ty oneish = simd_isplat(0x3f800001); - const Ty est = simd_rcp_est(_b); - const Ty iter0 = simd_mul(_a, est); - const Ty tmp1 = simd_nmsub(_b, est, oneish); - const Ty result = simd_madd(tmp1, iter0, iter0); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_rcp_ni(Ty _a) - { - const Ty one = simd_splat(1.0f); - const Ty result = simd_div(one, _a); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_orx_ni(Ty _a) - { - const Ty zwxy = simd_swiz_zwxy(_a); - const Ty tmp0 = simd_or(_a, zwxy); - const Ty tmp1 = simd_swiz_yyyy(_a); - const Ty tmp2 = simd_or(tmp0, tmp1); - const Ty mf000 = simd_ild(UINT32_MAX, 0, 0, 0); - const Ty result = simd_and(tmp2, mf000); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_orc_ni(Ty _a, Ty _b) - { - const Ty aorb = simd_or(_a, _b); - const Ty mffff = simd_isplat(UINT32_MAX); - const Ty result = simd_xor(aorb, mffff); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_neg_ni(Ty _a) - { - const Ty zero = simd_zero(); - const Ty result = simd_sub(zero, _a); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_selb_ni(Ty _mask, Ty _a, Ty _b) - { - const Ty sel_a = simd_and(_a, _mask); - const Ty sel_b = simd_andc(_b, _mask); - const Ty result = simd_or(sel_a, sel_b); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_sels_ni(Ty _test, Ty _a, Ty _b) - { - const Ty mask = simd_sra(_test, 31); - const Ty result = simd_selb(mask, _a, _b); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_not_ni(Ty _a) - { - const Ty mffff = simd_isplat(UINT32_MAX); - const Ty result = simd_xor(_a, mffff); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_min_ni(Ty _a, Ty _b) - { - const Ty mask = simd_cmplt(_a, _b); - const Ty result = simd_selb(mask, _a, _b); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_max_ni(Ty _a, Ty _b) - { - const Ty mask = simd_cmpgt(_a, _b); - const Ty result = simd_selb(mask, _a, _b); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_abs_ni(Ty _a) - { - const Ty a_neg = simd_neg(_a); - const Ty result = simd_max(a_neg, _a); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_imin_ni(Ty _a, Ty _b) - { - const Ty mask = simd_icmplt(_a, _b); - const Ty result = simd_selb(mask, _a, _b); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_imax_ni(Ty _a, Ty _b) - { - const Ty mask = simd_icmpgt(_a, _b); - const Ty result = simd_selb(mask, _a, _b); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_clamp_ni(Ty _a, Ty _min, Ty _max) - { - const Ty tmp = simd_min(_a, _max); - const Ty result = simd_max(tmp, _min); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_lerp_ni(Ty _a, Ty _b, Ty _s) - { - const Ty ba = simd_sub(_b, _a); - const Ty result = simd_madd(_s, ba, _a); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_sqrt_nr_ni(Ty _a) - { - const Ty half = simd_splat(0.5f); - const Ty one = simd_splat(1.0f); - const Ty tmp0 = simd_rsqrt_est(_a); - const Ty tmp1 = simd_mul(tmp0, _a); - const Ty tmp2 = simd_mul(tmp1, half); - const Ty tmp3 = simd_nmsub(tmp0, tmp1, one); - const Ty result = simd_madd(tmp3, tmp2, tmp1); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_sqrt_nr1_ni(Ty _a) - { - const Ty half = simd_splat(0.5f); - - Ty result = _a; - for (uint32_t ii = 0; ii < 11; ++ii) - { - const Ty tmp1 = simd_div(_a, result); - const Ty tmp2 = simd_add(tmp1, result); - result = simd_mul(tmp2, half); - } - - return result; - } - - template - BX_SIMD_INLINE Ty simd_rsqrt_ni(Ty _a) - { - const Ty one = simd_splat(1.0f); - const Ty sqrt = simd_sqrt(_a); - const Ty result = simd_div(one, sqrt); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_rsqrt_nr_ni(Ty _a) - { - const Ty rsqrt = simd_rsqrt_est(_a); - const Ty iter0 = simd_mul(_a, rsqrt); - const Ty iter1 = simd_mul(iter0, rsqrt); - const Ty half = simd_splat(0.5f); - const Ty half_rsqrt = simd_mul(half, rsqrt); - const Ty three = simd_splat(3.0f); - const Ty three_sub_iter1 = simd_sub(three, iter1); - const Ty result = simd_mul(half_rsqrt, three_sub_iter1); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_rsqrt_carmack_ni(Ty _a) - { - const Ty half = simd_splat(0.5f); - const Ty ah = simd_mul(half, _a); - const Ty ashift = simd_sra(_a, 1); - const Ty magic = simd_isplat(0x5f3759df); - const Ty msuba = simd_isub(magic, ashift); - const Ty msubasq = simd_mul(msuba, msuba); - const Ty tmp0 = simd_splat(1.5f); - const Ty tmp1 = simd_mul(ah, msubasq); - const Ty tmp2 = simd_sub(tmp0, tmp1); - const Ty result = simd_mul(msuba, tmp2); - - return result; - } - - namespace simd_logexp_detail - { - template - BX_SIMD_INLINE Ty simd_poly1(Ty _a, float _b, float _c) - { - const Ty bbbb = simd_splat(_b); - const Ty cccc = simd_splat(_c); - const Ty result = simd_madd(cccc, _a, bbbb); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_poly2(Ty _a, float _b, float _c, float _d) - { - const Ty bbbb = simd_splat(_b); - const Ty poly = simd_poly1(_a, _c, _d); - const Ty result = simd_madd(poly, _a, bbbb); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_poly3(Ty _a, float _b, float _c, float _d, float _e) - { - const Ty bbbb = simd_splat(_b); - const Ty poly = simd_poly2(_a, _c, _d, _e); - const Ty result = simd_madd(poly, _a, bbbb); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_poly4(Ty _a, float _b, float _c, float _d, float _e, float _f) - { - const Ty bbbb = simd_splat(_b); - const Ty poly = simd_poly3(_a, _c, _d, _e, _f); - const Ty result = simd_madd(poly, _a, bbbb); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_poly5(Ty _a, float _b, float _c, float _d, float _e, float _f, float _g) - { - const Ty bbbb = simd_splat(_b); - const Ty poly = simd_poly4(_a, _c, _d, _e, _f, _g); - const Ty result = simd_madd(poly, _a, bbbb); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_logpoly(Ty _a) - { -#if 1 - const Ty result = simd_poly5(_a - , 3.11578814719469302614f, -3.32419399085241980044f - , 2.59883907202499966007f, -1.23152682416275988241f - , 0.318212422185251071475f, -0.0344359067839062357313f - ); -#elif 0 - const Ty result = simd_poly4(_a - , 2.8882704548164776201f, -2.52074962577807006663f - , 1.48116647521213171641f, -0.465725644288844778798f - , 0.0596515482674574969533f - ); -#elif 0 - const Ty result = simd_poly3(_a - , 2.61761038894603480148f, -1.75647175389045657003f - , 0.688243882994381274313f, -0.107254423828329604454f - ); -#else - const Ty result = simd_poly2(_a - , 2.28330284476918490682f, -1.04913055217340124191f - , 0.204446009836232697516f - ); -#endif - - return result; - } - - template - BX_SIMD_INLINE Ty simd_exppoly(Ty _a) - { -#if 1 - const Ty result = simd_poly5(_a - , 9.9999994e-1f, 6.9315308e-1f - , 2.4015361e-1f, 5.5826318e-2f - , 8.9893397e-3f, 1.8775767e-3f - ); -#elif 0 - const Ty result = simd_poly4(_a - , 1.0000026f, 6.9300383e-1f - , 2.4144275e-1f, 5.2011464e-2f - , 1.3534167e-2f - ); -#elif 0 - const Ty result = simd_poly3(_a - , 9.9992520e-1f, 6.9583356e-1f - , 2.2606716e-1f, 7.8024521e-2f - ); -#else - const Ty result = simd_poly2(_a - , 1.0017247f, 6.5763628e-1f - , 3.3718944e-1f - ); -#endif // 0 - - return result; - } - } // namespace simd_internal - - template - BX_SIMD_INLINE Ty simd_log2_ni(Ty _a) - { - const Ty expmask = simd_isplat(0x7f800000); - const Ty mantmask = simd_isplat(0x007fffff); - const Ty one = simd_splat(1.0f); - - const Ty c127 = simd_isplat(127); - const Ty aexp = simd_and(_a, expmask); - const Ty aexpsr = simd_srl(aexp, 23); - const Ty tmp0 = simd_isub(aexpsr, c127); - const Ty exp = simd_itof(tmp0); - - const Ty amask = simd_and(_a, mantmask); - const Ty mant = simd_or(amask, one); - - const Ty poly = simd_logexp_detail::simd_logpoly(mant); - - const Ty mandiff = simd_sub(mant, one); - const Ty result = simd_madd(poly, mandiff, exp); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_exp2_ni(Ty _a) - { - const Ty min = simd_splat( 129.0f); - const Ty max = simd_splat(-126.99999f); - const Ty tmp0 = simd_min(_a, min); - const Ty aaaa = simd_max(tmp0, max); - - const Ty half = simd_splat(0.5f); - const Ty tmp2 = simd_sub(aaaa, half); - const Ty ipart = simd_ftoi(tmp2); - const Ty iround = simd_itof(ipart); - const Ty fpart = simd_sub(aaaa, iround); - - const Ty c127 = simd_isplat(127); - const Ty tmp5 = simd_iadd(ipart, c127); - const Ty expipart = simd_sll(tmp5, 23); - - const Ty expfpart = simd_logexp_detail::simd_exppoly(fpart); - - const Ty result = simd_mul(expipart, expfpart); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_pow_ni(Ty _a, Ty _b) - { - const Ty alog2 = simd_log2(_a); - const Ty alog2b = simd_mul(alog2, _b); - const Ty result = simd_exp2(alog2b); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_dot3_ni(Ty _a, Ty _b) - { - const Ty xyzw = simd_mul(_a, _b); - const Ty xxxx = simd_swiz_xxxx(xyzw); - const Ty yyyy = simd_swiz_yyyy(xyzw); - const Ty zzzz = simd_swiz_zzzz(xyzw); - const Ty tmp1 = simd_add(xxxx, yyyy); - const Ty result = simd_add(zzzz, tmp1); - return result; - } - - template - BX_SIMD_INLINE Ty simd_cross3_ni(Ty _a, Ty _b) - { - // a.yzx * b.zxy - a.zxy * b.yzx == (a * b.yzx - a.yzx * b).yzx -#if 0 - const Ty a_yzxw = simd_swiz_yzxw(_a); - const Ty a_zxyw = simd_swiz_zxyw(_a); - const Ty b_zxyw = simd_swiz_zxyw(_b); - const Ty b_yzxw = simd_swiz_yzxw(_b); - const Ty tmp = simd_mul(a_yzxw, b_zxyw); - const Ty result = simd_nmsub(a_zxyw, b_yzxw, tmp); -#else - const Ty a_yzxw = simd_swiz_yzxw(_a); - const Ty b_yzxw = simd_swiz_yzxw(_b); - const Ty tmp0 = simd_mul(_a, b_yzxw); - const Ty tmp1 = simd_nmsub(a_yzxw, _b, tmp0); - const Ty result = simd_swiz_yzxw(tmp1); -#endif - - return result; - } - - template - BX_SIMD_INLINE Ty simd_normalize3_ni(Ty _a) - { - const Ty dot3 = simd_dot3(_a, _a); - const Ty invSqrt = simd_rsqrt(dot3); - const Ty result = simd_mul(_a, invSqrt); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_dot_ni(Ty _a, Ty _b) - { - const Ty xyzw = simd_mul(_a, _b); - const Ty yzwx = simd_swiz_yzwx(xyzw); - const Ty tmp0 = simd_add(xyzw, yzwx); - const Ty zwxy = simd_swiz_zwxy(tmp0); - const Ty result = simd_add(tmp0, zwxy); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_ceil_ni(Ty _a) - { - const Ty tmp0 = simd_ftoi(_a); - const Ty tmp1 = simd_itof(tmp0); - const Ty mask = simd_cmplt(tmp1, _a); - const Ty one = simd_splat(1.0f); - const Ty tmp2 = simd_and(one, mask); - const Ty result = simd_add(tmp1, tmp2); - - return result; - } - - template - BX_SIMD_INLINE Ty simd_floor_ni(Ty _a) - { - const Ty tmp0 = simd_ftoi(_a); - const Ty tmp1 = simd_itof(tmp0); - const Ty mask = simd_cmpgt(tmp1, _a); - const Ty one = simd_splat(1.0f); - const Ty tmp2 = simd_and(one, mask); - const Ty result = simd_sub(tmp1, tmp2); - - return result; - } - - template - BX_SIMD_FORCE_INLINE Ty simd_round_ni(Ty _a) - { - const Ty tmp = simd_ftoi(_a); - const Ty result = simd_itof(tmp); - - return result; - } - - template - BX_SIMD_INLINE bool simd_test_any_ni(Ty _a) - { - const Ty mask = simd_sra(_a, 31); - const Ty zwxy = simd_swiz_zwxy(mask); - const Ty tmp0 = simd_or(mask, zwxy); - const Ty tmp1 = simd_swiz_yyyy(tmp0); - const Ty tmp2 = simd_or(tmp0, tmp1); - int res; - simd_stx(&res, tmp2); - return 0 != res; - } - - template - BX_SIMD_INLINE bool simd_test_all_ni(Ty _a) - { - const Ty bits = simd_sra(_a, 31); - const Ty m1248 = simd_ild(1, 2, 4, 8); - const Ty mask = simd_and(bits, m1248); - const Ty zwxy = simd_swiz_zwxy(mask); - const Ty tmp0 = simd_or(mask, zwxy); - const Ty tmp1 = simd_swiz_yyyy(tmp0); - const Ty tmp2 = simd_or(tmp0, tmp1); - int res; - simd_stx(&res, tmp2); - return 0xf == res; - } - -} // namespace bx - -#endif // BX_SIMD_NI_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/simd_t.h b/3rdparty/bx/include/bx/simd_t.h index d3befc4..33c3f48 100644 --- a/3rdparty/bx/include/bx/simd_t.h +++ b/3rdparty/bx/include/bx/simd_t.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -7,7 +7,6 @@ #define BX_SIMD_T_H_HEADER_GUARD #include "bx.h" -#include "fpumath.h" #define BX_SIMD_FORCE_INLINE BX_FORCE_INLINE #define BX_SIMD_INLINE inline @@ -17,6 +16,8 @@ #define BX_SIMD_NEON 0 #define BX_SIMD_SSE 0 +#define BX_CONFIG_SUPPORTS_SIMD 0 + #if defined(__AVX__) || defined(__AVX2__) # include # undef BX_SIMD_AVX @@ -39,7 +40,6 @@ && !BX_PLATFORM_EMSCRIPTEN \ && !BX_PLATFORM_IOS \ && BX_CLANG_HAS_EXTENSION(attribute_ext_vector_type) -# include # undef BX_SIMD_LANGEXT # define BX_SIMD_LANGEXT 1 #endif // @@ -52,7 +52,7 @@ namespace bx #define ELEMw 3 #define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ template \ - BX_SIMD_FORCE_INLINE Ty simd_swiz_##_x##_y##_z##_w(Ty _a); + Ty simd_swiz_##_x##_y##_z##_w(Ty _a); #include "inline/simd128_swizzle.inl" #undef BX_SIMD128_IMPLEMENT_SWIZZLE @@ -86,253 +86,361 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw); #undef BX_SIMD128_IMPLEMENT_TEST template - BX_SIMD_FORCE_INLINE Ty simd_shuf_xyAB(Ty _a, Ty _b); + Ty simd_shuf_xyAB(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_shuf_ABxy(Ty _a, Ty _b); + Ty simd_shuf_ABxy(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_shuf_CDzw(Ty _a, Ty _b); + Ty simd_shuf_CDzw(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_shuf_zwCD(Ty _a, Ty _b); + Ty simd_shuf_zwCD(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_shuf_xAyB(Ty _a, Ty _b); + Ty simd_shuf_xAyB(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_shuf_yBxA(Ty _a, Ty _b); + Ty simd_shuf_AxBy(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_shuf_zCwD(Ty _a, Ty _b); + Ty simd_shuf_zCwD(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_shuf_CzDw(Ty _a, Ty _b); + Ty simd_shuf_CzDw(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE float simd_x(Ty _a); + float simd_x(Ty _a); template - BX_SIMD_FORCE_INLINE float simd_y(Ty _a); + float simd_y(Ty _a); template - BX_SIMD_FORCE_INLINE float simd_z(Ty _a); + float simd_z(Ty _a); template - BX_SIMD_FORCE_INLINE float simd_w(Ty _a); + float simd_w(Ty _a); template - BX_SIMD_FORCE_INLINE Ty simd_ld(const void* _ptr); + Ty simd_ld(const void* _ptr); template - BX_SIMD_FORCE_INLINE void simd_st(void* _ptr, Ty _a); + void simd_st(void* _ptr, Ty _a); template - BX_SIMD_FORCE_INLINE void simd_stx(void* _ptr, Ty _a); + void simd_stx(void* _ptr, Ty _a); template - BX_SIMD_FORCE_INLINE void simd_stream(void* _ptr, Ty _a); + void simd_stream(void* _ptr, Ty _a); template - BX_SIMD_FORCE_INLINE Ty simd_ld(float _x, float _y, float _z, float _w); + Ty simd_ld(float _x, float _y, float _z, float _w); template - BX_SIMD_FORCE_INLINE Ty simd_ld(float _x, float _y, float _z, float _w, float _a, float _b, float _c, float _d); + Ty simd_ld(float _x, float _y, float _z, float _w, float _a, float _b, float _c, float _d); template - BX_SIMD_FORCE_INLINE Ty simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w); + Ty simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w); template - BX_SIMD_FORCE_INLINE Ty simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w, uint32_t _a, uint32_t _b, uint32_t _c, uint32_t _d); + Ty simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w, uint32_t _a, uint32_t _b, uint32_t _c, uint32_t _d); template - BX_SIMD_FORCE_INLINE Ty simd_splat(const void* _ptr); + Ty simd_splat(const void* _ptr); template - BX_SIMD_FORCE_INLINE Ty simd_splat(float _a); + Ty simd_splat(float _a); template - BX_SIMD_FORCE_INLINE Ty simd_isplat(uint32_t _a); + Ty simd_isplat(uint32_t _a); template - BX_SIMD_FORCE_INLINE Ty simd_zero(); + Ty simd_zero(); template - BX_SIMD_FORCE_INLINE Ty simd_itof(Ty _a); + Ty simd_itof(Ty _a); template - BX_SIMD_FORCE_INLINE Ty simd_ftoi(Ty _a); + Ty simd_ftoi(Ty _a); template - BX_SIMD_FORCE_INLINE Ty simd_round(Ty _a); + Ty simd_round(Ty _a); template - BX_SIMD_FORCE_INLINE Ty simd_add(Ty _a, Ty _b); + Ty simd_add(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_sub(Ty _a, Ty _b); + Ty simd_sub(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_mul(Ty _a, Ty _b); + Ty simd_mul(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_div(Ty _a, Ty _b); + Ty simd_div(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_rcp_est(Ty _a); + Ty simd_rcp_est(Ty _a); template - BX_SIMD_FORCE_INLINE Ty simd_sqrt(Ty _a); + Ty simd_sqrt(Ty _a); template - BX_SIMD_FORCE_INLINE Ty simd_rsqrt_est(Ty _a); + Ty simd_rsqrt_est(Ty _a); template - BX_SIMD_FORCE_INLINE Ty simd_dot3(Ty _a, Ty _b); + Ty simd_dot3(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_dot(Ty _a, Ty _b); + Ty simd_dot(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_cmpeq(Ty _a, Ty _b); + Ty simd_cmpeq(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_cmplt(Ty _a, Ty _b); + Ty simd_cmplt(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_cmple(Ty _a, Ty _b); + Ty simd_cmple(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_cmpgt(Ty _a, Ty _b); + Ty simd_cmpgt(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_cmpge(Ty _a, Ty _b); + Ty simd_cmpge(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_min(Ty _a, Ty _b); + Ty simd_min(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_max(Ty _a, Ty _b); + Ty simd_max(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_and(Ty _a, Ty _b); + Ty simd_and(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_andc(Ty _a, Ty _b); + Ty simd_andc(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_or(Ty _a, Ty _b); + Ty simd_or(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_xor(Ty _a, Ty _b); + Ty simd_xor(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_sll(Ty _a, int _count); + Ty simd_sll(Ty _a, int _count); template - BX_SIMD_FORCE_INLINE Ty simd_srl(Ty _a, int _count); + Ty simd_srl(Ty _a, int _count); template - BX_SIMD_FORCE_INLINE Ty simd_sra(Ty _a, int _count); + Ty simd_sra(Ty _a, int _count); template - BX_SIMD_FORCE_INLINE Ty simd_icmpeq(Ty _a, Ty _b); + Ty simd_icmpeq(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_icmplt(Ty _a, Ty _b); + Ty simd_icmplt(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_icmpgt(Ty _a, Ty _b); + Ty simd_icmpgt(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_imin(Ty _a, Ty _b); + Ty simd_imin(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_imax(Ty _a, Ty _b); + Ty simd_imax(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_iadd(Ty _a, Ty _b); + Ty simd_iadd(Ty _a, Ty _b); template - BX_SIMD_FORCE_INLINE Ty simd_isub(Ty _a, Ty _b); + Ty simd_isub(Ty _a, Ty _b); template - BX_SIMD_INLINE Ty simd_shuf_xAzC(Ty _a, Ty _b); + Ty simd_shuf_xAzC(Ty _a, Ty _b); template - BX_SIMD_INLINE Ty simd_shuf_yBwD(Ty _a, Ty _b); + Ty simd_shuf_yBwD(Ty _a, Ty _b); template - BX_SIMD_INLINE Ty simd_rcp(Ty _a); + Ty simd_rcp(Ty _a); template - BX_SIMD_INLINE Ty simd_orx(Ty _a); + Ty simd_orx(Ty _a); template - BX_SIMD_INLINE Ty simd_orc(Ty _a, Ty _b); + Ty simd_orc(Ty _a, Ty _b); template - BX_SIMD_INLINE Ty simd_neg(Ty _a); + Ty simd_neg(Ty _a); template - BX_SIMD_INLINE Ty simd_madd(Ty _a, Ty _b, Ty _c); + Ty simd_madd(Ty _a, Ty _b, Ty _c); template - BX_SIMD_INLINE Ty simd_nmsub(Ty _a, Ty _b, Ty _c); + Ty simd_nmsub(Ty _a, Ty _b, Ty _c); template - BX_SIMD_INLINE Ty simd_div_nr(Ty _a, Ty _b); + Ty simd_div_nr(Ty _a, Ty _b); template - BX_SIMD_INLINE Ty simd_selb(Ty _mask, Ty _a, Ty _b); + Ty simd_selb(Ty _mask, Ty _a, Ty _b); template - BX_SIMD_INLINE Ty simd_sels(Ty _test, Ty _a, Ty _b); + Ty simd_sels(Ty _test, Ty _a, Ty _b); template - BX_SIMD_INLINE Ty simd_not(Ty _a); + Ty simd_not(Ty _a); template - BX_SIMD_INLINE Ty simd_abs(Ty _a); + Ty simd_abs(Ty _a); template - BX_SIMD_INLINE Ty simd_clamp(Ty _a, Ty _min, Ty _max); + Ty simd_clamp(Ty _a, Ty _min, Ty _max); template - BX_SIMD_INLINE Ty simd_lerp(Ty _a, Ty _b, Ty _s); + Ty simd_lerp(Ty _a, Ty _b, Ty _s); template - BX_SIMD_INLINE Ty simd_rsqrt(Ty _a); + Ty simd_rsqrt(Ty _a); template - BX_SIMD_INLINE Ty simd_rsqrt_nr(Ty _a); + Ty simd_rsqrt_nr(Ty _a); template - BX_SIMD_INLINE Ty simd_rsqrt_carmack(Ty _a); + Ty simd_rsqrt_carmack(Ty _a); template - BX_SIMD_INLINE Ty simd_sqrt_nr(Ty _a); + Ty simd_sqrt_nr(Ty _a); template - BX_SIMD_INLINE Ty simd_log2(Ty _a); + Ty simd_log2(Ty _a); template - BX_SIMD_INLINE Ty simd_exp2(Ty _a); + Ty simd_exp2(Ty _a); template - BX_SIMD_INLINE Ty simd_pow(Ty _a, Ty _b); + Ty simd_pow(Ty _a, Ty _b); template - BX_SIMD_INLINE Ty simd_cross3(Ty _a, Ty _b); + Ty simd_cross3(Ty _a, Ty _b); template - BX_SIMD_INLINE Ty simd_normalize3(Ty _a); + Ty simd_normalize3(Ty _a); template - BX_SIMD_INLINE Ty simd_ceil(Ty _a); + Ty simd_ceil(Ty _a); template - BX_SIMD_INLINE Ty simd_floor(Ty _a); + Ty simd_floor(Ty _a); + + template + Ty simd_shuf_xAzC_ni(Ty _a, Ty _b); + + template + Ty simd_shuf_yBwD_ni(Ty _a, Ty _b); + + template + Ty simd_madd_ni(Ty _a, Ty _b, Ty _c); + + template + Ty simd_nmsub_ni(Ty _a, Ty _b, Ty _c); + + template + Ty simd_div_nr_ni(Ty _a, Ty _b); + + template + Ty simd_rcp_ni(Ty _a); + + template + Ty simd_orx_ni(Ty _a); + + template + Ty simd_orc_ni(Ty _a, Ty _b); + + template + Ty simd_neg_ni(Ty _a); + + template + Ty simd_selb_ni(Ty _mask, Ty _a, Ty _b); + + template + Ty simd_sels_ni(Ty _test, Ty _a, Ty _b); + + template + Ty simd_not_ni(Ty _a); + + template + Ty simd_min_ni(Ty _a, Ty _b); + + template + Ty simd_max_ni(Ty _a, Ty _b); + + template + Ty simd_abs_ni(Ty _a); + + template + Ty simd_imin_ni(Ty _a, Ty _b); + + template + Ty simd_imax_ni(Ty _a, Ty _b); + + template + Ty simd_clamp_ni(Ty _a, Ty _min, Ty _max); + + template + Ty simd_lerp_ni(Ty _a, Ty _b, Ty _s); + + template + Ty simd_sqrt_nr_ni(Ty _a); + + template + Ty simd_sqrt_nr1_ni(Ty _a); + + template + Ty simd_rsqrt_ni(Ty _a); + + template + Ty simd_rsqrt_nr_ni(Ty _a); + + template + Ty simd_rsqrt_carmack_ni(Ty _a); + + template + Ty simd_log2_ni(Ty _a); + + template + Ty simd_exp2_ni(Ty _a); + + template + Ty simd_pow_ni(Ty _a, Ty _b); + + template + Ty simd_dot3_ni(Ty _a, Ty _b); + + template + Ty simd_cross3_ni(Ty _a, Ty _b); + + template + Ty simd_normalize3_ni(Ty _a); + + template + Ty simd_dot_ni(Ty _a, Ty _b); + + template + Ty simd_ceil_ni(Ty _a); + + template + Ty simd_floor_ni(Ty _a); + + template + Ty simd_round_ni(Ty _a); + + template + bool simd_test_any_ni(Ty _a); + + template + bool simd_test_all_ni(Ty _a); #if BX_SIMD_AVX typedef __m256 simd256_avx_t; @@ -377,6 +485,15 @@ BX_SIMD128_IMPLEMENT_TEST(xyzw); # include "inline/simd128_sse.inl" #endif // BX_SIMD_SSE +#if ( BX_SIMD_LANGEXT \ + || BX_SIMD_NEON \ + || BX_SIMD_SSE \ + || BX_SIMD_AVX \ + ) +# undef BX_CONFIG_SUPPORTS_SIMD +# define BX_CONFIG_SUPPORTS_SIMD 1 +#endif // BX_SIMD_* + namespace bx { union simd128_ref_t @@ -390,16 +507,13 @@ namespace bx # define BX_SIMD_WARN_REFERENCE_IMPL 0 #endif // BX_SIMD_WARN_REFERENCE_IMPL -#if !( BX_SIMD_LANGEXT \ - || BX_SIMD_NEON \ - || BX_SIMD_SSE \ - ) +#if !BX_CONFIG_SUPPORTS_SIMD # if BX_SIMD_WARN_REFERENCE_IMPL # pragma message("*** Using SIMD128 reference implementation! ***") # endif // BX_SIMD_WARN_REFERENCE_IMPL typedef simd128_ref_t simd128_t; -#endif // +#endif // BX_SIMD_REFERENCE struct simd256_ref_t { @@ -421,47 +535,25 @@ namespace bx typedef simd256_ref_t simd256_t; #endif // !BX_SIMD_AVX + simd128_t simd_zero(); + + simd128_t simd_ld(const void* _ptr); + + simd128_t simd_ld(float _x, float _y, float _z, float _w); + + simd128_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w); + + simd128_t simd_splat(const void* _ptr); + + simd128_t simd_splat(float _a); + + simd128_t simd_isplat(uint32_t _a); + } // namespace bx #include "inline/simd128_ref.inl" #include "inline/simd256_ref.inl" -namespace bx -{ - BX_SIMD_FORCE_INLINE simd128_t simd_zero() - { - return simd_zero(); - } - - BX_SIMD_FORCE_INLINE simd128_t simd_ld(const void* _ptr) - { - return simd_ld(_ptr); - } - - BX_SIMD_FORCE_INLINE simd128_t simd_ld(float _x, float _y, float _z, float _w) - { - return simd_ld(_x, _y, _z, _w); - } - - BX_SIMD_FORCE_INLINE simd128_t simd_ild(uint32_t _x, uint32_t _y, uint32_t _z, uint32_t _w) - { - return simd_ild(_x, _y, _z, _w); - } - - BX_SIMD_FORCE_INLINE simd128_t simd_splat(const void* _ptr) - { - return simd_splat(_ptr); - } - - BX_SIMD_FORCE_INLINE simd128_t simd_splat(float _a) - { - return simd_splat(_a); - } - - BX_SIMD_FORCE_INLINE simd128_t simd_isplat(uint32_t _a) - { - return simd_isplat(_a); - } -} // namespace bx +#include "inline/simd_ni.inl" #endif // BX_SIMD_T_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/sort.h b/3rdparty/bx/include/bx/sort.h index 2f1511b..1506fb8 100644 --- a/3rdparty/bx/include/bx/sort.h +++ b/3rdparty/bx/include/bx/sort.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/spscqueue.h b/3rdparty/bx/include/bx/spscqueue.h index 4d37d63..f34b65d 100644 --- a/3rdparty/bx/include/bx/spscqueue.h +++ b/3rdparty/bx/include/bx/spscqueue.h @@ -1,12 +1,12 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #ifndef BX_SPSCQUEUE_H_HEADER_GUARD #define BX_SPSCQUEUE_H_HEADER_GUARD -#include "bx.h" +#include "allocator.h" #include "cpu.h" #include "semaphore.h" @@ -22,7 +22,7 @@ namespace bx public: /// - SpScUnboundedQueue(); + SpScUnboundedQueue(AllocatorI* _allocator); /// ~SpScUnboundedQueue(); @@ -46,6 +46,7 @@ namespace bx Node* m_next; }; + AllocatorI* m_allocator; Node* m_first; Node* m_divider; Node* m_last; @@ -62,7 +63,7 @@ namespace bx public: /// - SpScUnboundedQueueT(); + SpScUnboundedQueueT(AllocatorI* _allocator); /// ~SpScUnboundedQueueT(); @@ -80,7 +81,6 @@ namespace bx SpScUnboundedQueue m_queue; }; - #if BX_CONFIG_SUPPORTS_THREADING /// class SpScBlockingUnboundedQueue @@ -92,7 +92,7 @@ namespace bx public: /// - SpScBlockingUnboundedQueue(); + SpScBlockingUnboundedQueue(AllocatorI* _allocator); /// ~SpScBlockingUnboundedQueue(); @@ -122,7 +122,7 @@ namespace bx public: /// - SpScBlockingUnboundedQueueT(); + SpScBlockingUnboundedQueueT(AllocatorI* _allocator); /// ~SpScBlockingUnboundedQueueT(); diff --git a/3rdparty/bx/include/bx/string.h b/3rdparty/bx/include/bx/string.h index 440cbe1..6bcbf66 100644 --- a/3rdparty/bx/include/bx/string.h +++ b/3rdparty/bx/include/bx/string.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -8,10 +8,17 @@ #include "allocator.h" -#include // wchar_t - namespace bx { + struct Units + { + enum Enum + { + Kilo, + Kibi, + }; + }; + /// Non-zero-terminated string view. class StringView { @@ -22,15 +29,27 @@ namespace bx /// StringView(const StringView& _rhs); + /// + StringView& operator=(const char* _rhs); + /// StringView& operator=(const StringView& _rhs); /// StringView(const char* _ptr, int32_t _len = INT32_MAX); + /// + StringView(const char* _ptr, const char* _term); + /// void set(const char* _ptr, int32_t _len = INT32_MAX); + /// + void set(const char* _ptr, const char* _term); + + /// + void set(const StringView& _str); + /// void clear(); @@ -65,9 +84,6 @@ namespace bx /// StringT& operator=(const StringT& _rhs); - /// - StringT(const char* _ptr, int32_t _len = INT32_MAX); - /// StringT(const StringView& _rhs); @@ -75,36 +91,63 @@ namespace bx ~StringT(); /// - void set(const char* _ptr, int32_t _len = INT32_MAX); + void set(const StringView& _str); /// - void append(const char* _ptr, int32_t _len = INT32_MAX); + void append(const StringView& _str); /// void clear(); }; - /// + /// Retruns true if character is part of space set. bool isSpace(char _ch); - /// + /// Returns true if string view contains only space characters. + bool isSpace(const StringView& _str); + + /// Retruns true if character is uppercase. bool isUpper(char _ch); - /// + /// Returns true if string view contains only uppercase characters. + bool isUpper(const StringView& _str); + + /// Retruns true if character is lowercase. bool isLower(char _ch); - /// + /// Returns true if string view contains only lowercase characters. + bool isLower(const StringView& _str); + + /// Returns true if character is part of alphabet set. bool isAlpha(char _ch); - /// + /// Retruns true if string view contains only alphabet characters. + bool isAlpha(const StringView& _str); + + /// Returns true if character is part of numeric set. bool isNumeric(char _ch); - /// + /// Retruns true if string view contains only numeric characters. + bool isNumeric(const StringView& _str); + + /// Returns true if character is part of alpha numeric set. bool isAlphaNum(char _ch); - /// + /// Returns true if string view contains only alpha-numeric characters. + bool isAlphaNum(const StringView& _str); + + /// Returns true if character is part of hexadecimal set. + bool isHexNum(char _ch); + + /// Returns true if string view contains only hexadecimal characters. + bool isHexNum(const StringView& _str); + + /// Returns true if character is printable. bool isPrint(char _ch); + /// Returns true if string vieww contains only printable characters. + bool isPrint(const StringView& _str); + /// char toLower(char _ch); @@ -123,36 +166,48 @@ namespace bx /// void toUpper(char* _inOutStr, int32_t _max = INT32_MAX); - /// - bool toBool(const char* _str); - /// String compare. - int32_t strncmp(const char* _lhs, const char* _rhs, int32_t _max = INT32_MAX); + int32_t strCmp(const StringView& _lhs, const StringView& _rhs, int32_t _max = INT32_MAX); /// Case insensitive string compare. - int32_t strincmp(const char* _lhs, const char* _rhs, int32_t _max = INT32_MAX); + int32_t strCmpI(const StringView& _lhs, const StringView& _rhs, int32_t _max = INT32_MAX); - /// - int32_t strnlen(const char* _str, int32_t _max = INT32_MAX); + // Compare as strings holding indices/version numbers. + int32_t strCmpV(const StringView& _lhs, const StringView& _rhs, int32_t _max = INT32_MAX); + + /// Get string length. + int32_t strLen(const char* _str, int32_t _max = INT32_MAX); + + /// Get string length. + int32_t strLen(const StringView& _str, int32_t _max = INT32_MAX); /// Copy _num characters from string _src to _dst buffer of maximum _dstSize capacity /// including zero terminator. Copy will be terminated with '\0'. - int32_t strlncpy(char* _dst, int32_t _dstSize, const char* _src, int32_t _num = INT32_MAX); + int32_t strCopy(char* _dst, int32_t _dstSize, const StringView& _str, int32_t _num = INT32_MAX); + + /// Concatinate string. + int32_t strCat(char* _dst, int32_t _dstSize, const StringView& _str, int32_t _num = INT32_MAX); + + /// Find character in string. Limit search to _max characters. + const char* strFind(const StringView& _str, char _ch); + + /// Find character in string in reverse. Limit search to _max characters. + const char* strRFind(const StringView& _str, char _ch); + + /// Find substring in string. Limit search to _max characters. + const char* strFind(const StringView& _str, const StringView& _find, int32_t _num = INT32_MAX); + + /// Find substring in string. Case insensitive. Limit search to _max characters. + const char* strFindI(const StringView& _str, const StringView& _find, int32_t _num = INT32_MAX); /// - int32_t strlncat(char* _dst, int32_t _dstSize, const char* _src, int32_t _num = INT32_MAX); + StringView strLTrim(const StringView& _str, const StringView& _chars); /// - const char* strnchr(const char* _str, char _ch, int32_t _max = INT32_MAX); + StringView strRTrim(const StringView& _str, const StringView& _chars); /// - const char* strnrchr(const char* _str, char _ch, int32_t _max = INT32_MAX); - - /// Find substring in string. Limit search to _size. - const char* strnstr(const char* _str, const char* _find, int32_t _max = INT32_MAX); - - /// Find substring in string. Case insensitive. Limit search to _max. - const char* stristr(const char* _str, const char* _find, int32_t _max = INT32_MAX); + StringView strTrim(const StringView& _str, const StringView& _chars); /// Find new line. Returns pointer after new line terminator. const char* strnl(const char* _str); @@ -166,8 +221,11 @@ namespace bx /// Skip non-whitespace. const char* strnws(const char* _str); - /// Skip word. - const char* strword(const char* _str); + /// Returns pointer to first character after word. + const char* strSkipWord(const char* _str, int32_t _max = INT32_MAX); + + /// Returns StringView of word or empty. + StringView strWord(const StringView& _str); /// Find matching block. const char* strmb(const char* _str, char _open, char _close); @@ -209,23 +267,11 @@ namespace bx template Ty replaceAll(const Ty& _str, const char* _from, const char* _to); - /// Extract base file name from file path. - const char* baseName(const char* _filePath); + /// Convert size in bytes to human readable string kibi units. + int32_t prettify(char* _out, int32_t _count, uint64_t _value, Units::Enum _units = Units::Kibi); - /// Convert size in bytes to human readable string. - void prettify(char* _out, int32_t _count, uint64_t _size); - - /// Copy src to string dst of size siz. At most siz-1 characters - /// will be copied. Always NUL terminates (unless siz == 0). - /// Returns strlen(src); if retval >= siz, truncation occurred. - int32_t strlcpy(char* _dst, const char* _src, int32_t _max); - - /// Appends src to string dst of size siz (unlike strncat, siz is the - /// full size of dst, not space left). At most siz-1 characters - /// will be copied. Always NUL terminates (unless siz <= strlen(dst)). - /// Returns strlen(src) + MIN(siz, strlen(initial dst)). - /// If retval >= siz, truncation occurred. - int32_t strlcat(char* _dst, const char* _src, int32_t _max); + /// + int32_t toString(char* _out, int32_t _max, bool _value); /// int32_t toString(char* _out, int32_t _max, double _value); @@ -242,6 +288,21 @@ namespace bx /// int32_t toString(char* _out, int32_t _max, uint64_t _value, uint32_t _base = 10); + /// + bool fromString(bool* _out, const StringView& _str); + + /// + bool fromString(float* _out, const StringView& _str); + + /// + bool fromString(double* _out, const StringView& _str); + + /// + bool fromString(int32_t* _out, const StringView& _str); + + /// + bool fromString(uint32_t* _out, const StringView& _str); + } // namespace bx #include "inline/string.inl" diff --git a/3rdparty/bx/include/bx/thread.h b/3rdparty/bx/include/bx/thread.h index 72a072e..087bd3d 100644 --- a/3rdparty/bx/include/bx/thread.h +++ b/3rdparty/bx/include/bx/thread.h @@ -1,18 +1,18 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #ifndef BX_THREAD_H_HEADER_GUARD #define BX_THREAD_H_HEADER_GUARD -#include "bx.h" -#include "semaphore.h" +#include "allocator.h" +#include "mpscqueue.h" namespace bx { /// - typedef int32_t (*ThreadFn)(void* _userData); + typedef int32_t (*ThreadFn)(class Thread* _self, void* _userData); /// class Thread @@ -44,6 +44,12 @@ namespace bx /// void setThreadName(const char* _name); + /// + void push(void* _ptr); + + /// + void* pop(); + private: friend struct ThreadInternal; int32_t entry(); @@ -52,6 +58,7 @@ namespace bx ThreadFn m_fn; void* m_userData; + MpScUnboundedBlockingQueue m_queue; Semaphore m_sem; uint32_t m_stackSize; int32_t m_exitCode; diff --git a/3rdparty/bx/include/bx/timer.h b/3rdparty/bx/include/bx/timer.h index 31a1096..b0b0b40 100644 --- a/3rdparty/bx/include/bx/timer.h +++ b/3rdparty/bx/include/bx/timer.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/tokenizecmd.h b/3rdparty/bx/include/bx/tokenizecmd.h deleted file mode 100644 index 5bb44de..0000000 --- a/3rdparty/bx/include/bx/tokenizecmd.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2012-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#ifndef BX_TOKENIZE_CMD_H_HEADER_GUARD -#define BX_TOKENIZE_CMD_H_HEADER_GUARD - -#include -#include -#include - -namespace bx -{ - // Reference: - // http://msdn.microsoft.com/en-us/library/a1y7w461.aspx - static inline const char* tokenizeCommandLine(const char* _commandLine, char* _buffer, uint32_t& _bufferSize, int& _argc, char* _argv[], int _maxArgvs, char _term = '\0') - { - int argc = 0; - const char* curr = _commandLine; - char* currOut = _buffer; - char term = ' '; - bool sub = false; - - enum ParserState - { - SkipWhitespace, - SetTerm, - Copy, - Escape, - End, - }; - - ParserState state = SkipWhitespace; - - while ('\0' != *curr - && _term != *curr - && argc < _maxArgvs) - { - switch (state) - { - case SkipWhitespace: - for (; isspace(*curr); ++curr) {}; // skip whitespace - state = SetTerm; - break; - - case SetTerm: - if ('"' == *curr) - { - term = '"'; - ++curr; // skip begining quote - } - else - { - term = ' '; - } - - _argv[argc] = currOut; - ++argc; - - state = Copy; - break; - - case Copy: - if ('\\' == *curr) - { - state = Escape; - } - else if ('"' == *curr - && '"' != term) - { - sub = !sub; - } - else if (isspace(*curr) && !sub) - { - state = End; - } - else if (term != *curr || sub) - { - *currOut = *curr; - ++currOut; - } - else - { - state = End; - } - ++curr; - break; - - case Escape: - { - const char* start = --curr; - for (; '\\' == *curr; ++curr) {}; - - if ('"' != *curr) - { - int count = (int)(curr-start); - - curr = start; - for (int ii = 0; ii < count; ++ii) - { - *currOut = *curr; - ++currOut; - ++curr; - } - } - else - { - curr = start+1; - *currOut = *curr; - ++currOut; - ++curr; - } - } - state = Copy; - break; - - case End: - *currOut = '\0'; - ++currOut; - state = SkipWhitespace; - break; - } - } - - *currOut = '\0'; - if (0 < argc - && '\0' == _argv[argc-1][0]) - { - --argc; - } - - _bufferSize = (uint32_t)(currOut - _buffer); - _argc = argc; - - if ('\0' != *curr) - { - ++curr; - } - - return curr; - } - -} // namespace bx - -#endif // TOKENIZE_CMD_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/uint32_t.h b/3rdparty/bx/include/bx/uint32_t.h index 622e49e..238f4da 100644 --- a/3rdparty/bx/include/bx/uint32_t.h +++ b/3rdparty/bx/include/bx/uint32_t.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/include/bx/url.h b/3rdparty/bx/include/bx/url.h new file mode 100644 index 0000000..9e00d83 --- /dev/null +++ b/3rdparty/bx/include/bx/url.h @@ -0,0 +1,52 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_URL_H_HEADER_GUARD +#define BX_URL_H_HEADER_GUARD + +#include "string.h" + +namespace bx +{ + /// + class UrlView + { + public: + enum Enum + { + Scheme, + UserName, + Password, + Host, + Port, + Path, + Query, + Fragment, + + Count + }; + + /// + UrlView(); + + /// + void clear(); + + /// + bool parse(const StringView& _url); + + /// + const StringView& get(Enum _token) const; + + private: + StringView m_tokens[Count]; + }; + + /// + void urlEncode(char* _out, uint32_t _max, const StringView& _str); + +} // namespace bx + +#endif // BX_URL_H_HEADER_GUARD diff --git a/3rdparty/bx/include/compat/mingw/sal.h b/3rdparty/bx/include/compat/mingw/sal.h index 5fe9e5d..6487dfc 100644 --- a/3rdparty/bx/include/compat/mingw/sal.h +++ b/3rdparty/bx/include/compat/mingw/sal.h @@ -1,891 +1 @@ -#pragma once - -#if __GNUC__ >= 3 -# pragma GCC system_header -#endif - -#define __SAL_H_FULL_VER 1 - -//#define __null // << Conflicts with GCC internal type __null -#define __notnull -#define __maybenull -#define __readonly -#define __notreadonly -#define __maybereadonly -#define __valid -#define __notvalid -#define __maybevalid -#define __readableTo(extent) -#define __elem_readableTo(size) -#define __byte_readableTo(size) -#define __writableTo(size) -#define __elem_writableTo(size) -#define __byte_writableTo(size) -#define __deref -#define __pre -#define __post -#define __precond(expr) -#define __postcond(expr) -#define __exceptthat -#define __execeptthat -#define __inner_success(expr) -#define __inner_checkReturn __attribute__((warn_unused_result)) -#define __inner_typefix(ctype) -#define __inner_override -#define __inner_callback -#define __inner_blocksOn(resource) -#define __inner_fallthrough_dec -#define __inner_fallthrough -#define __refparam -#define __inner_control_entrypoint(category) -#define __inner_data_entrypoint(category) - -#define __ecount(size) -#define __bcount(size) -// #define __in // Conflicts with STL. -#define __in_ecount(size) -#define __in_bcount(size) -#define __in_z -#define __in_ecount_z(size) -#define __in_bcount_z(size) -#define __in_nz -#define __in_ecount_nz(size) -#define __in_bcount_nz(size) -#define __in_xcount_opt(size) -// #define __out // Conflicts with STL. -#define __out_ecount(size) -#define __out_bcount(size) -#define __out_ecount_part(size,length) -#define __out_bcount_part(size,length) -#define __out_ecount_full(size) -#define __out_bcount_full(size) -#define __out_z -#define __out_z_opt -#define __out_ecount_z(size) -#define __out_bcount_z(size) -#define __out_ecount_part_z(size,length) -#define __out_bcount_part_z(size,length) -#define __out_ecount_full_z(size) -#define __out_bcount_full_z(size) -#define __out_nz -#define __out_nz_opt -#define __out_ecount_nz(size) -#define __out_bcount_nz(size) -#define __inout -#define __inout_ecount(size) -#define __inout_bcount(size) -#define __inout_ecount_part(size,length) -#define __inout_bcount_part(size,length) -#define __inout_ecount_full(size) -#define __inout_bcount_full(size) -#define __inout_z -#define __inout_ecount_z(size) -#define __inout_bcount_z(size) -#define __inout_nz -#define __inout_ecount_nz(size) -#define __inout_bcount_nz(size) -#define __ecount_opt(size) -#define __bcount_opt(size) -#define __in_opt -#define __in_ecount_opt(size) -#define __in_bcount_opt(size) -#define __in_z_opt -#define __in_ecount_z_opt(size) -#define __in_bcount_z_opt(size) -#define __in_nz_opt -#define __in_ecount_nz_opt(size) -#define __in_bcount_nz_opt(size) -#define __out_opt -#define __out_ecount_opt(size) -#define __out_bcount_opt(size) -#define __out_ecount_part_opt(size,length) -#define __out_bcount_part_opt(size,length) -#define __out_ecount_full_opt(size) -#define __out_bcount_full_opt(size) -#define __out_ecount_z_opt(size) -#define __out_bcount_z_opt(size) -#define __out_ecount_part_z_opt(size,length) -#define __out_bcount_part_z_opt(size,length) -#define __out_ecount_full_z_opt(size) -#define __out_bcount_full_z_opt(size) -#define __out_ecount_nz_opt(size) -#define __out_bcount_nz_opt(size) -#define __inout_opt -#define __inout_ecount_opt(size) -#define __inout_bcount_opt(size) -#define __inout_ecount_part_opt(size,length) -#define __inout_bcount_part_opt(size,length) -#define __inout_ecount_full_opt(size) -#define __inout_bcount_full_opt(size) -#define __inout_z_opt -#define __inout_ecount_z_opt(size) -#define __inout_ecount_z_opt(size) -#define __inout_bcount_z_opt(size) -#define __inout_nz_opt -#define __inout_ecount_nz_opt(size) -#define __inout_bcount_nz_opt(size) -#define __deref_ecount(size) -#define __deref_bcount(size) -#define __deref_out -#define __deref_out_ecount(size) -#define __deref_out_bcount(size) -#define __deref_out_ecount_part(size,length) -#define __deref_out_bcount_part(size,length) -#define __deref_out_ecount_full(size) -#define __deref_out_bcount_full(size) -#define __deref_out_z -#define __deref_out_ecount_z(size) -#define __deref_out_bcount_z(size) -#define __deref_out_nz -#define __deref_out_ecount_nz(size) -#define __deref_out_bcount_nz(size) -#define __deref_inout -#define __deref_inout_z -#define __deref_inout_ecount(size) -#define __deref_inout_bcount(size) -#define __deref_inout_ecount_part(size,length) -#define __deref_inout_bcount_part(size,length) -#define __deref_inout_ecount_full(size) -#define __deref_inout_bcount_full(size) -#define __deref_inout_z -#define __deref_inout_ecount_z(size) -#define __deref_inout_bcount_z(size) -#define __deref_inout_nz -#define __deref_inout_ecount_nz(size) -#define __deref_inout_bcount_nz(size) -#define __deref_ecount_opt(size) -#define __deref_bcount_opt(size) -#define __deref_out_opt -#define __deref_out_ecount_opt(size) -#define __deref_out_bcount_opt(size) -#define __deref_out_ecount_part_opt(size,length) -#define __deref_out_bcount_part_opt(size,length) -#define __deref_out_ecount_full_opt(size) -#define __deref_out_bcount_full_opt(size) -#define __deref_out_z_opt -#define __deref_out_ecount_z_opt(size) -#define __deref_out_bcount_z_opt(size) -#define __deref_out_nz_opt -#define __deref_out_ecount_nz_opt(size) -#define __deref_out_bcount_nz_opt(size) -#define __deref_inout_opt -#define __deref_inout_ecount_opt(size) -#define __deref_inout_bcount_opt(size) -#define __deref_inout_ecount_part_opt(size,length) -#define __deref_inout_bcount_part_opt(size,length) -#define __deref_inout_ecount_full_opt(size) -#define __deref_inout_bcount_full_opt(size) -#define __deref_inout_z_opt -#define __deref_inout_ecount_z_opt(size) -#define __deref_inout_bcount_z_opt(size) -#define __deref_inout_nz_opt -#define __deref_inout_ecount_nz_opt(size) -#define __deref_inout_bcount_nz_opt(size) -#define __deref_opt_ecount(size) -#define __deref_opt_bcount(size) -#define __deref_opt_out -#define __deref_opt_out_z -#define __deref_opt_out_ecount(size) -#define __deref_opt_out_bcount(size) -#define __deref_opt_out_ecount_part(size,length) -#define __deref_opt_out_bcount_part(size,length) -#define __deref_opt_out_ecount_full(size) -#define __deref_opt_out_bcount_full(size) -#define __deref_opt_inout -#define __deref_opt_inout_ecount(size) -#define __deref_opt_inout_bcount(size) -#define __deref_opt_inout_ecount_part(size,length) -#define __deref_opt_inout_bcount_part(size,length) -#define __deref_opt_inout_ecount_full(size) -#define __deref_opt_inout_bcount_full(size) -#define __deref_opt_inout_z -#define __deref_opt_inout_ecount_z(size) -#define __deref_opt_inout_bcount_z(size) -#define __deref_opt_inout_nz -#define __deref_opt_inout_ecount_nz(size) -#define __deref_opt_inout_bcount_nz(size) -#define __deref_opt_ecount_opt(size) -#define __deref_opt_bcount_opt(size) -#define __deref_opt_out_opt -#define __deref_opt_out_ecount_opt(size) -#define __deref_opt_out_bcount_opt(size) -#define __deref_opt_out_ecount_part_opt(size,length) -#define __deref_opt_out_bcount_part_opt(size,length) -#define __deref_opt_out_ecount_full_opt(size) -#define __deref_opt_out_bcount_full_opt(size) -#define __deref_opt_out_z_opt -#define __deref_opt_out_ecount_z_opt(size) -#define __deref_opt_out_bcount_z_opt(size) -#define __deref_opt_out_nz_opt -#define __deref_opt_out_ecount_nz_opt(size) -#define __deref_opt_out_bcount_nz_opt(size) -#define __deref_opt_inout_opt -#define __deref_opt_inout_ecount_opt(size) -#define __deref_opt_inout_bcount_opt(size) -#define __deref_opt_inout_ecount_part_opt(size,length) -#define __deref_opt_inout_bcount_part_opt(size,length) -#define __deref_opt_inout_ecount_full_opt(size) -#define __deref_opt_inout_bcount_full_opt(size) -#define __deref_opt_inout_z_opt -#define __deref_opt_inout_ecount_z_opt(size) -#define __deref_opt_inout_bcount_z_opt(size) -#define __deref_opt_inout_nz_opt -#define __deref_opt_inout_ecount_nz_opt(size) -#define __deref_opt_inout_bcount_nz_opt(size) - -#define __success(expr) -#define __nullterminated -#define __nullnullterminated -#define __reserved -#define __checkReturn __inner_checkReturn -#define __typefix(ctype) -#define __override -#define __callback -#define __format_string -#define __blocksOn(resource) -#define __control_entrypoint(category) -#define __data_entrypoint(category) - -#define _Always_(annos) -#define _Analysis_noreturn_ -#define _Analysis_assume_(expr) -#define _At_(target, annos) -#define _At_buffer_(target, iter, bound, annos) -#define _COM_Outptr_ -#define _COM_Outptr_opt_ -#define _COM_Outptr_opt_result_maybenull_ -#define _COM_Outptr_result_maybenull_ -#define _Check_return_ -#define _Const_ -#define _Deref2_pre_readonly_ -#define _Deref_in_bound_ -#define _Deref_in_range_(lb,ub) -#define _Deref_inout_bound_ -#define _Deref_inout_z_ -#define _Deref_inout_z_bytecap_c_(size) -#define _Deref_inout_z_cap_c_(size) -#define _Deref_opt_out_ -#define _Deref_opt_out_opt_ -#define _Deref_opt_out_opt_z_ -#define _Deref_opt_out_z_ -#define _Deref_out_ -#define _Deref_out_bound_ -#define _Deref_out_opt_ -#define _Deref_out_opt_z_ -#define _Deref_out_range_(lb,ub) -#define _Deref_out_z_ -#define _Deref_out_z_bytecap_c_(size) -#define _Deref_out_z_cap_c_(size) -#define _Deref_post_bytecap_(size) -#define _Deref_post_bytecap_c_(size) -#define _Deref_post_bytecap_x_(size) -#define _Deref_post_bytecount_(size) -#define _Deref_post_bytecount_c_(size) -#define _Deref_post_bytecount_x_(size) -#define _Deref_post_cap_(size) -#define _Deref_post_cap_c_(size) -#define _Deref_post_cap_x_(size) -#define _Deref_post_count_(size) -#define _Deref_post_count_c_(size) -#define _Deref_post_count_x_(size) -#define _Deref_post_maybenull_ -#define _Deref_post_notnull_ -#define _Deref_post_null_ -#define _Deref_post_opt_bytecap_(size) -#define _Deref_post_opt_bytecap_c_(size) -#define _Deref_post_opt_bytecap_x_(size) -#define _Deref_post_opt_bytecount_(size) -#define _Deref_post_opt_bytecount_c_(size) -#define _Deref_post_opt_bytecount_x_(size) -#define _Deref_post_opt_cap_(size) -#define _Deref_post_opt_cap_c_(size) -#define _Deref_post_opt_cap_x_(size) -#define _Deref_post_opt_count_(size) -#define _Deref_post_opt_count_c_(size) -#define _Deref_post_opt_count_x_(size) -#define _Deref_post_opt_valid_ -#define _Deref_post_opt_valid_bytecap_(size) -#define _Deref_post_opt_valid_bytecap_c_(size) -#define _Deref_post_opt_valid_bytecap_x_(size) -#define _Deref_post_opt_valid_cap_(size) -#define _Deref_post_opt_valid_cap_c_(size) -#define _Deref_post_opt_valid_cap_x_(size) -#define _Deref_post_opt_z_ -#define _Deref_post_opt_z_bytecap_(size) -#define _Deref_post_opt_z_bytecap_c_(size) -#define _Deref_post_opt_z_bytecap_x_(size) -#define _Deref_post_opt_z_cap_(size) -#define _Deref_post_opt_z_cap_c_(size) -#define _Deref_post_opt_z_cap_x_(size) -#define _Deref_post_valid_ -#define _Deref_post_valid_bytecap_(size) -#define _Deref_post_valid_bytecap_c_(size) -#define _Deref_post_valid_bytecap_x_(size) -#define _Deref_post_valid_cap_(size) -#define _Deref_post_valid_cap_c_(size) -#define _Deref_post_valid_cap_x_(size) -#define _Deref_post_z_ -#define _Deref_post_z_bytecap_(size) -#define _Deref_post_z_bytecap_c_(size) -#define _Deref_post_z_bytecap_x_(size) -#define _Deref_post_z_cap_(size) -#define _Deref_post_z_cap_c_(size) -#define _Deref_post_z_cap_x_(size) -#define _Deref_pre_bytecap_(size) -#define _Deref_pre_bytecap_c_(size) -#define _Deref_pre_bytecap_x_(size) -#define _Deref_pre_bytecount_(size) -#define _Deref_pre_bytecount_c_(size) -#define _Deref_pre_bytecount_x_(size) -#define _Deref_pre_cap_(size) -#define _Deref_pre_cap_c_(size) -#define _Deref_pre_cap_x_(size) -#define _Deref_pre_count_(size) -#define _Deref_pre_count_c_(size) -#define _Deref_pre_count_x_(size) -#define _Deref_pre_invalid_ -#define _Deref_pre_maybenull_ -#define _Deref_pre_notnull_ -#define _Deref_pre_null_ -#define _Deref_pre_opt_bytecap_(size) -#define _Deref_pre_opt_bytecap_c_(size) -#define _Deref_pre_opt_bytecap_x_(size) -#define _Deref_pre_opt_bytecount_(size) -#define _Deref_pre_opt_bytecount_c_(size) -#define _Deref_pre_opt_bytecount_x_(size) -#define _Deref_pre_opt_cap_(size) -#define _Deref_pre_opt_cap_c_(size) -#define _Deref_pre_opt_cap_x_(size) -#define _Deref_pre_opt_count_(size) -#define _Deref_pre_opt_count_c_(size) -#define _Deref_pre_opt_count_x_(size) -#define _Deref_pre_opt_valid_ -#define _Deref_pre_opt_valid_bytecap_(size) -#define _Deref_pre_opt_valid_bytecap_c_(size) -#define _Deref_pre_opt_valid_bytecap_x_(size) -#define _Deref_pre_opt_valid_cap_(size) -#define _Deref_pre_opt_valid_cap_c_(size) -#define _Deref_pre_opt_valid_cap_x_(size) -#define _Deref_pre_opt_z_ -#define _Deref_pre_opt_z_bytecap_(size) -#define _Deref_pre_opt_z_bytecap_c_(size) -#define _Deref_pre_opt_z_bytecap_x_(size) -#define _Deref_pre_opt_z_cap_(size) -#define _Deref_pre_opt_z_cap_c_(size) -#define _Deref_pre_opt_z_cap_x_(size) -#define _Deref_pre_readonly_ -#define _Deref_pre_valid_ -#define _Deref_pre_valid_bytecap_(size) -#define _Deref_pre_valid_bytecap_c_(size) -#define _Deref_pre_valid_bytecap_x_(size) -#define _Deref_pre_valid_cap_(size) -#define _Deref_pre_valid_cap_c_(size) -#define _Deref_pre_valid_cap_x_(size) -#define _Deref_pre_writeonly_ -#define _Deref_pre_z_ -#define _Deref_pre_z_bytecap_(size) -#define _Deref_pre_z_bytecap_c_(size) -#define _Deref_pre_z_bytecap_x_(size) -#define _Deref_pre_z_cap_(size) -#define _Deref_pre_z_cap_c_(size) -#define _Deref_pre_z_cap_x_(size) -#define _Deref_prepost_bytecap_(size) -#define _Deref_prepost_bytecap_x_(size) -#define _Deref_prepost_bytecount_(size) -#define _Deref_prepost_bytecount_x_(size) -#define _Deref_prepost_cap_(size) -#define _Deref_prepost_cap_x_(size) -#define _Deref_prepost_count_(size) -#define _Deref_prepost_count_x_(size) -#define _Deref_prepost_opt_bytecap_(size) -#define _Deref_prepost_opt_bytecap_x_(size) -#define _Deref_prepost_opt_bytecount_(size) -#define _Deref_prepost_opt_bytecount_x_(size) -#define _Deref_prepost_opt_cap_(size) -#define _Deref_prepost_opt_cap_x_(size) -#define _Deref_prepost_opt_count_(size) -#define _Deref_prepost_opt_count_x_(size) -#define _Deref_prepost_opt_valid_ -#define _Deref_prepost_opt_valid_bytecap_(size) -#define _Deref_prepost_opt_valid_bytecap_x_(size) -#define _Deref_prepost_opt_valid_cap_(size) -#define _Deref_prepost_opt_valid_cap_x_(size) -#define _Deref_prepost_opt_z_ -#define _Deref_prepost_opt_z_bytecap_(size) -#define _Deref_prepost_opt_z_cap_(size) -#define _Deref_prepost_valid_ -#define _Deref_prepost_valid_bytecap_(size) -#define _Deref_prepost_valid_bytecap_x_(size) -#define _Deref_prepost_valid_cap_(size) -#define _Deref_prepost_valid_cap_x_(size) -#define _Deref_prepost_z_ -#define _Deref_prepost_z_bytecap_(size) -#define _Deref_prepost_z_cap_(size) -#define _Deref_ret_bound_ -#define _Deref_ret_opt_z_ -#define _Deref_ret_range_(lb,ub) -#define _Deref_ret_z_ -#define _Field_range_(min,max) -#define _Field_size_(size) -#define _Field_size_bytes_(size) -#define _Field_size_bytes_full_(size) -#define _Field_size_bytes_full_opt_(size) -#define _Field_size_bytes_opt_(size) -#define _Field_size_bytes_part_(size, count) -#define _Field_size_bytes_part_opt_(size, count) -#define _Field_size_full_(size) -#define _Field_size_full_opt_(size) -#define _Field_size_opt_(size) -#define _Field_size_part_(size, count) -#define _Field_size_part_opt_(size, count) -#define _Field_z_ -#define _Function_class_(x) -#define _Group_(annos) -#define _In_ -#define _In_bound_ -#define _In_bytecount_(size) -#define _In_bytecount_c_(size) -#define _In_bytecount_x_(size) -#define _In_count_(size) -#define _In_count_c_(size) -#define _In_count_x_(size) -#define _In_defensive_(annotes) -#define _In_opt_ -#define _In_opt_bytecount_(size) -#define _In_opt_bytecount_c_(size) -#define _In_opt_bytecount_x_(size) -#define _In_opt_count_(size) -#define _In_opt_count_c_(size) -#define _In_opt_count_x_(size) -#define _In_opt_ptrdiff_count_(size) -#define _In_opt_z_ -#define _In_opt_z_bytecount_(size) -#define _In_opt_z_bytecount_c_(size) -#define _In_opt_z_count_(size) -#define _In_opt_z_count_c_(size) -#define _In_ptrdiff_count_(size) -#define _In_range_(lb,ub) -#define _In_reads_(size) -#define _In_reads_bytes_(size) -#define _In_reads_bytes_opt_(size) -#define _In_reads_opt_(size) -#define _In_reads_opt_z_(size) -#define _In_reads_or_z_(size) -#define _In_reads_to_ptr_(ptr) -#define _In_reads_to_ptr_opt_(ptr) -#define _In_reads_to_ptr_opt_z_(ptr) -#define _In_reads_to_ptr_z_(ptr) -#define _In_reads_z_(size) -#define _In_z_ -#define _In_z_bytecount_(size) -#define _In_z_bytecount_c_(size) -#define _In_z_count_(size) -#define _In_z_count_c_(size) -#define _Inout_ -#define _Inout_bytecap_(size) -#define _Inout_bytecap_c_(size) -#define _Inout_bytecap_x_(size) -#define _Inout_bytecount_(size) -#define _Inout_bytecount_c_(size) -#define _Inout_bytecount_x_(size) -#define _Inout_cap_(size) -#define _Inout_cap_c_(size) -#define _Inout_cap_x_(size) -#define _Inout_count_(size) -#define _Inout_count_c_(size) -#define _Inout_count_x_(size) -#define _Inout_defensive_(annotes) -#define _Inout_opt_ -#define _Inout_opt_bytecap_(size) -#define _Inout_opt_bytecap_c_(size) -#define _Inout_opt_bytecap_x_(size) -#define _Inout_opt_bytecount_(size) -#define _Inout_opt_bytecount_c_(size) -#define _Inout_opt_bytecount_x_(size) -#define _Inout_opt_cap_(size) -#define _Inout_opt_cap_c_(size) -#define _Inout_opt_cap_x_(size) -#define _Inout_opt_count_(size) -#define _Inout_opt_count_c_(size) -#define _Inout_opt_count_x_(size) -#define _Inout_opt_ptrdiff_count_(size) -#define _Inout_opt_z_ -#define _Inout_opt_z_bytecap_(size) -#define _Inout_opt_z_bytecap_c_(size) -#define _Inout_opt_z_bytecap_x_(size) -#define _Inout_opt_z_bytecount_(size) -#define _Inout_opt_z_bytecount_c_(size) -#define _Inout_opt_z_cap_(size) -#define _Inout_opt_z_cap_c_(size) -#define _Inout_opt_z_cap_x_(size) -#define _Inout_opt_z_count_(size) -#define _Inout_opt_z_count_c_(size) -#define _Inout_ptrdiff_count_(size) -#define _Inout_updates_(size) -#define _Inout_updates_all_(size) -#define _Inout_updates_all_opt_(size) -#define _Inout_updates_bytes_(size) -#define _Inout_updates_bytes_all_(size) -#define _Inout_updates_bytes_all_opt_(size) -#define _Inout_updates_bytes_opt_(size) -#define _Inout_updates_bytes_to_(size,count) -#define _Inout_updates_bytes_to_opt_(size,count) -#define _Inout_updates_opt_(size) -#define _Inout_updates_opt_z_(size) -#define _Inout_updates_to_(size,count) -#define _Inout_updates_to_opt_(size,count) -#define _Inout_updates_z_(size) -#define _Inout_z_ -#define _Inout_z_bytecap_(size) -#define _Inout_z_bytecap_c_(size) -#define _Inout_z_bytecap_x_(size) -#define _Inout_z_bytecount_(size) -#define _Inout_z_bytecount_c_(size) -#define _Inout_z_cap_(size) -#define _Inout_z_cap_c_(size) -#define _Inout_z_cap_x_(size) -#define _Inout_z_count_(size) -#define _Inout_z_count_c_(size) -#define _Interlocked_operand_ -#define _Literal_ -#define _Maybe_raises_SEH_exception -#define _Maybe_raises_SEH_exception_ -#define _Maybenull_ -#define _Maybevalid_ -#define _Must_inspect_result_ -#define _Notliteral_ -#define _Notnull_ -#define _Notref_ -#define _Notvalid_ -#define _NullNull_terminated_ -#define _Null_ -#define _Null_terminated_ -#define _On_failure_(annos) -#define _Out_ -#define _Out_bound_ -#define _Out_bytecap_(size) -#define _Out_bytecap_c_(size) -#define _Out_bytecap_post_bytecount_(cap,count) -#define _Out_bytecap_x_(size) -#define _Out_bytecapcount_(capcount) -#define _Out_bytecapcount_x_(capcount) -#define _Out_cap_(size) -#define _Out_cap_c_(size) -#define _Out_cap_m_(mult,size) -#define _Out_cap_post_count_(cap,count) -#define _Out_cap_x_(size) -#define _Out_capcount_(capcount) -#define _Out_capcount_x_(capcount) -#define _Out_defensive_(annotes) -#define _Out_opt_ -#define _Out_opt_bytecap_(size) -#define _Out_opt_bytecap_c_(size) -#define _Out_opt_bytecap_post_bytecount_(cap,count) -#define _Out_opt_bytecap_x_(size) -#define _Out_opt_bytecapcount_(capcount) -#define _Out_opt_bytecapcount_x_(capcount) -#define _Out_opt_cap_(size) -#define _Out_opt_cap_c_(size) -#define _Out_opt_cap_m_(mult,size) -#define _Out_opt_cap_post_count_(cap,count) -#define _Out_opt_cap_x_(size) -#define _Out_opt_capcount_(capcount) -#define _Out_opt_capcount_x_(capcount) -#define _Out_opt_ptrdiff_cap_(size) -#define _Out_opt_z_bytecap_(size) -#define _Out_opt_z_bytecap_c_(size) -#define _Out_opt_z_bytecap_post_bytecount_(cap,count) -#define _Out_opt_z_bytecap_x_(size) -#define _Out_opt_z_bytecapcount_(capcount) -#define _Out_opt_z_cap_(size) -#define _Out_opt_z_cap_c_(size) -#define _Out_opt_z_cap_m_(mult,size) -#define _Out_opt_z_cap_post_count_(cap,count) -#define _Out_opt_z_cap_x_(size) -#define _Out_opt_z_capcount_(capcount) -#define _Out_ptrdiff_cap_(size) -#define _Out_range_(lb,ub) -#define _Out_writes_(size) -#define _Out_writes_all_(size) -#define _Out_writes_all_opt_(size) -#define _Out_writes_bytes_(size) -#define _Out_writes_bytes_all_(size) -#define _Out_writes_bytes_all_opt_(size) -#define _Out_writes_bytes_opt_(size) -#define _Out_writes_bytes_to_(size,count) -#define _Out_writes_bytes_to_opt_(size,count) -#define _Out_writes_opt_(size) -#define _Out_writes_opt_z_(size) -#define _Out_writes_to_(size,count) -#define _Out_writes_to_opt_(size,count) -#define _Out_writes_to_ptr_(ptr) -#define _Out_writes_to_ptr_opt_(ptr) -#define _Out_writes_to_ptr_opt_z_(ptr) -#define _Out_writes_to_ptr_z_(ptr) -#define _Out_writes_z_(size) -#define _Out_z_bytecap_(size) -#define _Out_z_bytecap_c_(size) -#define _Out_z_bytecap_post_bytecount_(cap,count) -#define _Out_z_bytecap_x_(size) -#define _Out_z_bytecapcount_(capcount) -#define _Out_z_cap_(size) -#define _Out_z_cap_c_(size) -#define _Out_z_cap_m_(mult,size) -#define _Out_z_cap_post_count_(cap,count) -#define _Out_z_cap_x_(size) -#define _Out_z_capcount_(capcount) -#define _Outptr_ -#define _Outptr_opt_ -#define _Outptr_opt_result_buffer_(size) -#define _Outptr_opt_result_buffer_all_(size) -#define _Outptr_opt_result_buffer_all_maybenull_(size) -#define _Outptr_opt_result_buffer_maybenull_(size) -#define _Outptr_opt_result_buffer_to_(size, count) -#define _Outptr_opt_result_buffer_to_maybenull_(size, count) -#define _Outptr_opt_result_bytebuffer_(size) -#define _Outptr_opt_result_bytebuffer_all_(size) -#define _Outptr_opt_result_bytebuffer_all_maybenull_(size) -#define _Outptr_opt_result_bytebuffer_maybenull_(size) -#define _Outptr_opt_result_bytebuffer_to_(size, count) -#define _Outptr_opt_result_bytebuffer_to_maybenull_(size, count) -#define _Outptr_opt_result_maybenull_ -#define _Outptr_opt_result_maybenull_z_ -#define _Outptr_opt_result_nullonfailure_ -#define _Outptr_opt_result_z_ -#define _Outptr_result_buffer_(size) -#define _Outptr_result_buffer_all_(size) -#define _Outptr_result_buffer_all_maybenull_(size) -#define _Outptr_result_buffer_maybenull_(size) -#define _Outptr_result_buffer_to_(size, count) -#define _Outptr_result_buffer_to_maybenull_(size, count) -#define _Outptr_result_bytebuffer_(size) -#define _Outptr_result_bytebuffer_all_(size) -#define _Outptr_result_bytebuffer_all_maybenull_(size) -#define _Outptr_result_bytebuffer_maybenull_(size) -#define _Outptr_result_bytebuffer_to_(size, count) -#define _Outptr_result_bytebuffer_to_maybenull_(size, count) -#define _Outptr_result_maybenull_ -#define _Outptr_result_maybenull_z_ -#define _Outptr_result_nullonfailure_ -#define _Outptr_result_z_ -#define _Outref_ -#define _Outref_result_buffer_(size) -#define _Outref_result_buffer_all_(size) -#define _Outref_result_buffer_all_maybenull_(size) -#define _Outref_result_buffer_maybenull_(size) -#define _Outref_result_buffer_to_(size, count) -#define _Outref_result_buffer_to_maybenull_(size, count) -#define _Outref_result_bytebuffer_(size) -#define _Outref_result_bytebuffer_all_(size) -#define _Outref_result_bytebuffer_all_maybenull_(size) -#define _Outref_result_bytebuffer_maybenull_(size) -#define _Outref_result_bytebuffer_to_(size, count) -#define _Outref_result_bytebuffer_to_maybenull_(size, count) -#define _Outref_result_maybenull_ -#define _Outref_result_nullonfailure_ -#define _Points_to_data_ -#define _Post_ -#define _Post_bytecap_(size) -#define _Post_bytecount_(size) -#define _Post_bytecount_c_(size) -#define _Post_bytecount_x_(size) -#define _Post_cap_(size) -#define _Post_count_(size) -#define _Post_count_c_(size) -#define _Post_count_x_(size) -#define _Post_defensive_ -#define _Post_equal_to_(expr) -#define _Post_invalid_ -#define _Post_maybenull_ -#define _Post_maybez_ -#define _Post_notnull_ -#define _Post_null_ -#define _Post_ptr_invalid_ -#define _Post_readable_byte_size_(size) -#define _Post_readable_size_(size) -#define _Post_satisfies_(cond) -#define _Post_valid_ -#define _Post_writable_byte_size_(size) -#define _Post_writable_size_(size) -#define _Post_z_ -#define _Post_z_bytecount_(size) -#define _Post_z_bytecount_c_(size) -#define _Post_z_bytecount_x_(size) -#define _Post_z_count_(size) -#define _Post_z_count_c_(size) -#define _Post_z_count_x_(size) -#define _Pre_ -#define _Pre_bytecap_(size) -#define _Pre_bytecap_c_(size) -#define _Pre_bytecap_x_(size) -#define _Pre_bytecount_(size) -#define _Pre_bytecount_c_(size) -#define _Pre_bytecount_x_(size) -#define _Pre_cap_(size) -#define _Pre_cap_c_(size) -#define _Pre_cap_c_one_ -#define _Pre_cap_for_(param) -#define _Pre_cap_m_(mult,size) -#define _Pre_cap_x_(size) -#define _Pre_count_(size) -#define _Pre_count_c_(size) -#define _Pre_count_x_(size) -#define _Pre_defensive_ -#define _Pre_equal_to_(expr) -#define _Pre_invalid_ -#define _Pre_maybenull_ -#define _Pre_notnull_ -#define _Pre_null_ -#define _Pre_opt_bytecap_(size) -#define _Pre_opt_bytecap_c_(size) -#define _Pre_opt_bytecap_x_(size) -#define _Pre_opt_bytecount_(size) -#define _Pre_opt_bytecount_c_(size) -#define _Pre_opt_bytecount_x_(size) -#define _Pre_opt_cap_(size) -#define _Pre_opt_cap_c_(size) -#define _Pre_opt_cap_c_one_ -#define _Pre_opt_cap_for_(param) -#define _Pre_opt_cap_m_(mult,size) -#define _Pre_opt_cap_x_(size) -#define _Pre_opt_count_(size) -#define _Pre_opt_count_c_(size) -#define _Pre_opt_count_x_(size) -#define _Pre_opt_ptrdiff_cap_(ptr) -#define _Pre_opt_ptrdiff_count_(ptr) -#define _Pre_opt_valid_ -#define _Pre_opt_valid_bytecap_(size) -#define _Pre_opt_valid_bytecap_c_(size) -#define _Pre_opt_valid_bytecap_x_(size) -#define _Pre_opt_valid_cap_(size) -#define _Pre_opt_valid_cap_c_(size) -#define _Pre_opt_valid_cap_x_(size) -#define _Pre_opt_z_ -#define _Pre_opt_z_bytecap_(size) -#define _Pre_opt_z_bytecap_c_(size) -#define _Pre_opt_z_bytecap_x_(size) -#define _Pre_opt_z_cap_(size) -#define _Pre_opt_z_cap_c_(size) -#define _Pre_opt_z_cap_x_(size) -#define _Pre_ptrdiff_cap_(ptr) -#define _Pre_ptrdiff_count_(ptr) -#define _Pre_readable_byte_size_(size) -#define _Pre_readable_size_(size) -#define _Pre_readonly_ -#define _Pre_satisfies_(cond) -#define _Pre_valid_ -#define _Pre_valid_bytecap_(size) -#define _Pre_valid_bytecap_c_(size) -#define _Pre_valid_bytecap_x_(size) -#define _Pre_valid_cap_(size) -#define _Pre_valid_cap_c_(size) -#define _Pre_valid_cap_x_(size) -#define _Pre_writable_byte_size_(size) -#define _Pre_writable_size_(size) -#define _Pre_writeonly_ -#define _Pre_z_ -#define _Pre_z_bytecap_(size) -#define _Pre_z_bytecap_c_(size) -#define _Pre_z_bytecap_x_(size) -#define _Pre_z_cap_(size) -#define _Pre_z_cap_c_(size) -#define _Pre_z_cap_x_(size) -#define _Prepost_bytecount_(size) -#define _Prepost_bytecount_c_(size) -#define _Prepost_bytecount_x_(size) -#define _Prepost_count_(size) -#define _Prepost_count_c_(size) -#define _Prepost_count_x_(size) -#define _Prepost_opt_bytecount_(size) -#define _Prepost_opt_bytecount_c_(size) -#define _Prepost_opt_bytecount_x_(size) -#define _Prepost_opt_count_(size) -#define _Prepost_opt_count_c_(size) -#define _Prepost_opt_count_x_(size) -#define _Prepost_opt_valid_ -#define _Prepost_opt_z_ -#define _Prepost_valid_ -#define _Prepost_z_ -#define _Printf_format_string_ -#define _Raises_SEH_exception_ -#define _Readable_bytes_(size) -#define _Readable_elements_(size) -#define _Reserved_ -#define _Result_nullonfailure_ -#define _Result_zeroonfailure_ -#define _Ret_ -#define _Ret_bound_ -#define _Ret_bytecap_(size) -#define _Ret_bytecap_c_(size) -#define _Ret_bytecap_x_(size) -#define _Ret_bytecount_(size) -#define _Ret_bytecount_c_(size) -#define _Ret_bytecount_x_(size) -#define _Ret_cap_(size) -#define _Ret_cap_c_(size) -#define _Ret_cap_x_(size) -#define _Ret_count_(size) -#define _Ret_count_c_(size) -#define _Ret_count_x_(size) -#define _Ret_maybenull_ -#define _Ret_maybenull_z_ -#define _Ret_notnull_ -#define _Ret_null_ -#define _Ret_opt_ -#define _Ret_opt_bytecap_(size) -#define _Ret_opt_bytecap_c_(size) -#define _Ret_opt_bytecap_x_(size) -#define _Ret_opt_bytecount_(size) -#define _Ret_opt_bytecount_c_(size) -#define _Ret_opt_bytecount_x_(size) -#define _Ret_opt_cap_(size) -#define _Ret_opt_cap_c_(size) -#define _Ret_opt_cap_x_(size) -#define _Ret_opt_count_(size) -#define _Ret_opt_count_c_(size) -#define _Ret_opt_count_x_(size) -#define _Ret_opt_valid_ -#define _Ret_opt_z_ -#define _Ret_opt_z_bytecap_(size) -#define _Ret_opt_z_bytecount_(size) -#define _Ret_opt_z_cap_(size) -#define _Ret_opt_z_count_(size) -#define _Ret_range_(lb,ub) -#define _Ret_valid_ -#define _Ret_writes_(size) -#define _Ret_writes_bytes_(size) -#define _Ret_writes_bytes_maybenull_(size) -#define _Ret_writes_bytes_to_(size,count) -#define _Ret_writes_bytes_to_maybenull_(size,count) -#define _Ret_writes_maybenull_(size) -#define _Ret_writes_maybenull_z_(size) -#define _Ret_writes_to_(size,count) -#define _Ret_writes_to_maybenull_(size,count) -#define _Ret_writes_z_(size) -#define _Ret_z_ -#define _Ret_z_bytecap_(size) -#define _Ret_z_bytecount_(size) -#define _Ret_z_cap_(size) -#define _Ret_z_count_(size) -#define _Return_type_success_(expr) -#define _Scanf_format_string_ -#define _Scanf_s_format_string_ -#define _Struct_size_bytes_(size) -#define _Success_(expr) -#define _Unchanged_(e) -#define _Use_decl_annotations_ -#define _Valid_ -#define _When_(expr, annos) -#define _Writable_bytes_(size) -#define _Writable_elements_(size) -#define __inner_callback -#define __inner_exceptthat -#define __inner_typefix(ctype) - -#ifndef __fallthrough -# define __fallthrough __inner_fallthrough -#endif - -#ifndef __analysis_assume -# define __analysis_assume(expr) -#endif +#include "salieri.h" diff --git a/3rdparty/bx/include/compat/mingw/salieri.h b/3rdparty/bx/include/compat/mingw/salieri.h new file mode 100644 index 0000000..06d7207 --- /dev/null +++ b/3rdparty/bx/include/compat/mingw/salieri.h @@ -0,0 +1,1607 @@ +/** + * Salieri + * v1 + * + * Salieri is a header which contains definitions for the Microsoft + * source-code annotation language (SAL). It is *not* an + * implementation of SAL; that's for compilers and static analyzers. + * For the most part we just define macros to nothing. + * + * The goal is to allow projects to use SAL without creating a hard + * dependency on it (i.e., you can still use compilers other than + * MSVC). Simply include `salieri.h`, which you can/should distribute + * with your code, instead of ``. + * + * Multiple copies of Salieri can be included safely, even different + * versions. Including a newer version will simiply replace older + * definitions with newer ones, and including older versions will have + * no effect. + * + * I don't think anything in here is copyrightable, but just in case: + * + * To the extent possible under law, the author(s) have dedicated + * all copyright and related and neighboring rights to this software + * to the public domain worldwide. This software is distributed + * without any warranty. + * + * For details, see . + */ + +#if !defined(SALIERI_VERSION) || (SALIERI_VERSION < 1) + +/* TODO: figure out when first appeared. */ +#if defined(_MSC_VER) +# include +#endif + +/* The main concern for the implementation is that we don't want to + * replace annotations from , but we *do* want to replace + * annotations from older versions of Salieri. To keep track of + * everything, when we (Salieri) define a SAL annotation, we also + * define SALIERI_DEFINED_${annotation} (with the leading and trailing + * '-' stripped). Then, before redefining an annotation macro we + * check to make sure SALIERI_DEFINED_${annontation} is defined. + * + * This means you can safely use Salieri in a public header in your + * project. + */ + +/* Function Parameters & Return Value + * + * https://msdn.microsoft.com/en-us/library/hh916382.aspx + *****/ + +/* Pointer Parameters */ + +#if defined(_In_) && defined(SALIERI_DEFINED_In) +# undef _In_ +#endif +#if !defined(_In_) +# define _In_ +# define SALIERI_DEFINED_In +#endif + +#if defined(__in_bcount) && defined(SALIERI_DEFINED__in_bcount) +# undef __in_bcount +#endif +#if !defined(__in_bcount) +# define __in_bcount(s) +# define SALIERI_DEFINED__in_bcount(s) +#endif + +#if defined(__in_ecount) && defined(SALIERI_DEFINED__in_ecount) +# undef __in_ecount +#endif +#if !defined(__in_ecount) +# define __in_ecount(s) +# define SALIERI_DEFINED__in_ecount(s) +#endif + +#if defined(__in_ecount_opt) && defined(SALIERI_DEFINED__in_ecount_opt) +# undef __in_ecount_opt +#endif +#if !defined(__in_ecount_opt) +# define __in_ecount_opt(s) +# define SALIERI_DEFINED__in_ecount_opt(s) +#endif + +#if defined(_Out_) && defined(SALIERI_DEFINED_Out) +# undef _Out_ +#endif +#if !defined(_Out_) +# define _Out_ +# define SALIERI_DEFINED_Out +#endif + +#if defined(_Inout_) && defined(SALIERI_DEFINED_Inout) +# undef _Inout_ +#endif +#if !defined(_Inout_) +# define _Inout_ +# define SALIERI_DEFINED_Inout +#endif + +#if defined(_In_z_) && defined(SALIERI_DEFINED_In_z) +# undef _In_z_ +#endif +#if !defined(_In_z_) +# define _In_z_ +# define SALIERI_DEFINED_In_z +#endif + +#if defined(_Inout_z_) && defined(SALIERI_DEFINED_Inout_z) +# undef _Inout_z_ +#endif +#if !defined(_Inout_z_) +# define _Inout_z_ +# define SALIERI_DEFINED_Inout_z +#endif + +#if defined(_In_reads_) && defined(SALIERI_DEFINED_In_reads) +# undef _In_reads_ +#endif +#if !defined(_In_reads_) +# define _In_reads_(s) +# define SALIERI_DEFINED_In_reads +#endif + +#if defined(_In_reads_bytes_) && defined(SALIERI_DEFINED_In_reads_bytes) +# undef _In_reads_bytes_ +#endif +#if !defined(_In_reads_bytes_) +# define _In_reads_bytes_(s) +# define SALIERI_DEFINED_In_reads_bytes +#endif + +#if defined(_In_reads_z_) && defined(SALIERI_DEFINED_In_reads_z) +# undef _In_reads_z_ +#endif +#if !defined(_In_reads_z_) +# define _In_reads_z_(s) +# define SALIERI_DEFINED_In_reads_z +#endif + +#if defined(_In_reads_or_z_) && defined(SALIERI_DEFINED_In_reads_or_z) +# undef _In_reads_or_z_ +#endif +#if !defined(_In_reads_or_z_) +# define _In_reads_or_z_(s) +# define SALIERI_DEFINED_In_reads_or_z +#endif + +#if defined(_Out_writes_) && defined(SALIERI_DEFINED_Out_writes) +# undef _Out_writes_ +#endif +#if !defined(_Out_writes_) +# define _Out_writes_(s) +# define SALIERI_DEFINED_Out_writes +#endif + +#if defined(_Out_writes_bytes_) && defined(SALIERI_DEFINED_Out_writes_bytes) +# undef _Out_writes_bytes_ +#endif +#if !defined(_Out_writes_bytes_) +# define _Out_writes_bytes_(s) +# define SALIERI_DEFINED_Out_writes_bytes +#endif + +#if defined(_Out_writes_bytes_opt_) && defined(SALIERI_DEFINED_Out_writes_bytes_opt_) +# undef _Out_writes_bytes_opt_ +#endif +#if !defined(_Out_writes_bytes_opt_) +# define _Out_writes_bytes_opt_(s) +# define SALIERI_DEFINED_Out_writes_bytes_opt_ +#endif + +#if defined(_Out_writes_z_) && defined(SALIERI_DEFINED_Out_writes_z) +# undef _Out_writes_z_ +#endif +#if !defined(_Out_writes_z_) +# define _Out_writes_z_(s) +# define SALIERI_DEFINED_Out_writes_z +#endif + +#if defined(_Inout_updates_) && defined(SALIERI_DEFINED_Inout_updates) +# undef _Inout_updates_ +#endif +#if !defined(_Inout_updates_) +# define _Inout_updates_(s) +# define SALIERI_DEFINED_Inout_updates +#endif + +#if defined(_Inout_updates_bytes_) && defined(SALIERI_DEFINED_Inout_updates_bytes) +# undef _Inout_updates_bytes_ +#endif +#if !defined(_Inout_updates_bytes_) +# define _Inout_updates_bytes_(s) +# define SALIERI_DEFINED_Inout_updates_bytes +#endif + +#if defined(_Inout_updates_z_) && defined(SALIERI_DEFINED_Inout_updates_z) +# undef _Inout_updates_z_ +#endif +#if !defined(_Inout_updates_z_) +# define _Inout_updates_z_(s) +# define SALIERI_DEFINED_Inout_updates_z +#endif + +#if defined(_Out_writes_to_) && defined(SALIERI_DEFINED_Out_writes_to) +# undef _Out_writes_to_ +#endif +#if !defined(_Out_writes_to_) +# define _Out_writes_to_(s,c) +# define SALIERI_DEFINED_Out_writes_to +#endif + +#if defined(_Out_writes_bytes_to_) && defined(SALIERI_DEFINED_Out_writes_bytes_to) +# undef _Out_writes_bytes_to_ +#endif +#if !defined(_Out_writes_bytes_to_) +# define _Out_writes_bytes_to_(s,c) +# define SALIERI_DEFINED_Out_writes_bytes_to +#endif + +#if defined(_Out_writes_all_) && defined(SALIERI_DEFINED_Out_writes_all) +# undef _Out_writes_all_ +#endif +#if !defined(_Out_writes_all_) +# define _Out_writes_all_(s) +# define SALIERI_DEFINED_Out_writes_all +#endif + +#if defined(_Out_writes_bytes_all_) && defined(SALIERI_DEFINED_Out_writes_bytes_all) +# undef _Out_writes_bytes_all_ +#endif +#if !defined(_Out_writes_bytes_all_) +# define _Out_writes_bytes_all_(s) +# define SALIERI_DEFINED_Out_writes_bytes_all +#endif + +#if defined(_In_updates_to_) && defined(SALIERI_DEFINED_In_updates_to) +# undef _In_updates_to_ +#endif +#if !defined(_In_updates_to_) +# define _In_updates_to_(s,c) +# define SALIERI_DEFINED_In_updates_to +#endif + +#if defined(_In_updates_bytes_to_) && defined(SALIERI_DEFINED_In_updates_bytes_to) +# undef _In_updates_bytes_to_ +#endif +#if !defined(_In_updates_bytes_to_) +# define _In_updates_bytes_to_(s,c) +# define SALIERI_DEFINED_In_updates_bytes_to +#endif + +#if defined(_Inout_updates_z_) && defined(SALIERI_DEFINED_Inout_updates_z) +# undef _Inout_updates_z_ +#endif +#if !defined(_Inout_updates_z_) +# define _Inout_updates_z_(s) +# define SALIERI_DEFINED_Inout_updates_z +#endif + +#if defined(_Out_writes_to_) && defined(SALIERI_DEFINED_Out_writes_to) +# undef _Out_writes_to_ +#endif +#if !defined(_Out_writes_to_) +# define _Out_writes_to_(s,c) +# define SALIERI_DEFINED_Out_writes_to +#endif + +#if defined(_Out_writes_bytes_to_) && defined(SALIERI_DEFINED_Out_writes_bytes_to) +# undef _Out_writes_bytes_to_ +#endif +#if !defined(_Out_writes_bytes_to_) +# define _Out_writes_bytes_to_(s,c) +# define SALIERI_DEFINED_Out_writes_bytes_to +#endif + +#if defined(_Out_writes_all_) && defined(SALIERI_DEFINED_Out_writes_all) +# undef _Out_writes_all_ +#endif +#if !defined(_Out_writes_all_) +# define _Out_writes_all_(s) +# define SALIERI_DEFINED_Out_writes_all +#endif + +#if defined(_Out_writes_bytes_all_) && defined(SALIERI_DEFINED_Out_writes_bytes_all) +# undef _Out_writes_bytes_all_ +#endif +#if !defined(_Out_writes_bytes_all_) +# define _Out_writes_bytes_all_(s) +# define SALIERI_DEFINED_Out_writes_bytes_all +#endif + +#if defined(_Inout_updates_to_) && defined(SALIERI_DEFINED_Inout_updates_to) +# undef _Inout_updates_to_ +#endif +#if !defined(_Inout_updates_to_) +# define _Inout_updates_to_(s,c) +# define SALIERI_DEFINED_Inout_updates_to +#endif + +#if defined(_Inout_updates_bytes_to_) && defined(SALIERI_DEFINED_Inout_updates_bytes_to) +# undef _Inout_updates_bytes_to_ +#endif +#if !defined(_Inout_updates_bytes_to_) +# define _Inout_updates_bytes_to_(s,c) +# define SALIERI_DEFINED_Inout_updates_bytes_to +#endif + +#if defined(_Inout_updates_all_) && defined(SALIERI_DEFINED_Inout_updates_all) +# undef _Inout_updates_all_ +#endif +#if !defined(_Inout_updates_all_) +# define _Inout_updates_all_(s) +# define SALIERI_DEFINED_Inout_updates_all +#endif + +#if defined(_Inout_updates_bytes_all_) && defined(SALIERI_DEFINED_Inout_updates_bytes_all) +# undef _Inout_updates_bytes_all_ +#endif +#if !defined(_Inout_updates_bytes_all_) +# define _Inout_updates_bytes_all_(s) +# define SALIERI_DEFINED_Inout_updates_bytes_all +#endif + +#if defined(_In_reads_to_ptr_) && defined(SALIERI_DEFINED_In_reads_to_ptr) +# undef _In_reads_to_ptr_ +#endif +#if !defined(_In_reads_to_ptr_) +# define _In_reads_to_ptr_(p) +# define SALIERI_DEFINED_In_reads_to_ptr +#endif + +#if defined(_In_reads_to_ptr_z_) && defined(SALIERI_DEFINED_In_reads_to_ptr_z) +# undef _In_reads_to_ptr_z_ +#endif +#if !defined(_In_reads_to_ptr_z_) +# define _In_reads_to_ptr_z_(p) +# define SALIERI_DEFINED_In_reads_to_ptr_z +#endif + +#if defined(_Out_writes_to_ptr_) && defined(SALIERI_DEFINED_Out_writes_to_ptr) +# undef _Out_writes_to_ptr_ +#endif +#if !defined(_Out_writes_to_ptr_) +# define _Out_writes_to_ptr_(p) +# define SALIERI_DEFINED_Out_writes_to_ptr +#endif + +#if defined(_Out_writes_to_ptr_z_) && defined(SALIERI_DEFINED_Out_writes_to_ptr_z) +# undef _Out_writes_to_ptr_z_ +#endif +#if !defined(_Out_writes_to_ptr_z_) +# define _Out_writes_to_ptr_z_(p) +# define SALIERI_DEFINED_Out_writes_to_ptr_z +#endif + +/* Optional Pointer Parameters */ + +#if defined(_In_opt_) && defined(SALIERI_DEFINED_In_opt) +# undef _In_opt_ +#endif +#if !defined(_In_opt_) +# define _In_opt_ +# define SALIERI_DEFINED_In_opt +#endif + +#if defined(_Out_opt_) && defined(SALIERI_DEFINED_Out_opt) +# undef _Out_opt_ +#endif +#if !defined(_Out_opt_) +# define _Out_opt_ +# define SALIERI_DEFINED_Out_opt +#endif + +#if defined(_Inout_opt_) && defined(SALIERI_DEFINED_Inout_opt) +# undef _Inout_opt_ +#endif +#if !defined(_Inout_opt_) +# define _Inout_opt_ +# define SALIERI_DEFINED_Inout_opt +#endif + +#if defined(_In_opt_z_) && defined(SALIERI_DEFINED_In_opt_z) +# undef _In_opt_z_ +#endif +#if !defined(_In_opt_z_) +# define _In_opt_z_ +# define SALIERI_DEFINED_In_opt_z +#endif + +#if defined(_Inout_opt_z_) && defined(SALIERI_DEFINED_Inout_opt_z) +# undef _Inout_opt_z_ +#endif +#if !defined(_Inout_opt_z_) +# define _Inout_opt_z_ +# define SALIERI_DEFINED_Inout_opt_z +#endif + +#if defined(_Inout_opt_bytecount_) && defined(SALIERI_DEFINED_Inout_opt_bytecount_) +# undef _Inout_opt_bytecount_ +#endif +#if !defined(_Inout_opt_bytecount_) +# define _Inout_opt_bytecount_(s) +# define SALIERI_DEFINED_Inout_opt_bytecount_(s) +#endif + +#if defined(_In_reads_opt_) && defined(SALIERI_DEFINED_In_reads_opt) +# undef _In_reads_opt_ +#endif +#if !defined(_In_reads_opt_) +# define _In_reads_opt_(s) +# define SALIERI_DEFINED_In_reads_opt +#endif + +#if defined(_In_reads_bytes_opt_) && defined(SALIERI_DEFINED_In_reads_bytes_opt) +# undef _In_reads_bytes_opt_ +#endif +#if !defined(_In_reads_bytes_opt_) +# define _In_reads_bytes_opt_(s) +# define SALIERI_DEFINED_In_reads_bytes_opt +#endif + +#if defined(_In_reads_opt_z_) && defined(SALIERI_DEFINED_In_reads_opt_z) +# undef _In_reads_opt_z_ +#endif +#if !defined(_In_reads_opt_z_) +# define _In_reads_opt_z_(s) +# define SALIERI_DEFINED_In_reads_opt_z +#endif + +#if defined(_Out_writes_opt_) && defined(SALIERI_DEFINED_Out_writes_opt) +# undef _Out_writes_opt_ +#endif +#if !defined(_Out_writes_opt_) +# define _Out_writes_opt_(s) +# define SALIERI_DEFINED_Out_writes_opt +#endif + +#if defined(_Out_writes_bytes_) && defined(SALIERI_DEFINED_Out_writes_bytes) +# undef _Out_writes_bytes_ +#endif +#if !defined(_Out_writes_bytes_) +# define _Out_writes_bytes_(s) +# define SALIERI_DEFINED_Out_writes_bytes +#endif + +#if defined(_Out_writes_opt_z_) && defined(SALIERI_DEFINED_Out_writes_opt_z) +# undef _Out_writes_opt_z_ +#endif +#if !defined(_Out_writes_opt_z_) +# define _Out_writes_opt_z_(s) +# define SALIERI_DEFINED_Out_writes_opt_z +#endif + +#if defined(_Inout_updates_opt_) && defined(SALIERI_DEFINED_Inout_updates_opt) +# undef _Inout_updates_opt_ +#endif +#if !defined(_Inout_updates_opt_) +# define _Inout_updates_opt_(s) +# define SALIERI_DEFINED_Inout_updates_opt +#endif + +#if defined(_Inout_updates_bytes_opt_) && defined(SALIERI_DEFINED_Inout_updates_bytes_opt) +# undef _Inout_updates_bytes_opt_ +#endif +#if !defined(_Inout_updates_bytes_opt_) +# define _Inout_updates_bytes_opt_(s) +# define SALIERI_DEFINED_Inout_updates_bytes_opt +#endif + +#if defined(_Inout_updates_opt_z_) && defined(SALIERI_DEFINED_Inout_updates_opt_z) +# undef _Inout_updates_opt_z_ +#endif +#if !defined(_Inout_updates_opt_z_) +# define _Inout_updates_opt_z_(s) +# define SALIERI_DEFINED_Inout_updates_opt_z +#endif + +#if defined(_Out_writes_to_opt_) && defined(SALIERI_DEFINED_Out_writes_to_opt) +# undef _Out_writes_to_opt_ +#endif +#if !defined(_Out_writes_to_opt_) +# define _Out_writes_to_opt_(s,c) +# define SALIERI_DEFINED_Out_writes_to_opt +#endif + +#if defined(_Out_writes_bytes_to_opt_) && defined(SALIERI_DEFINED_Out_writes_bytes_to_opt) +# undef _Out_writes_bytes_to_opt_ +#endif +#if !defined(_Out_writes_bytes_to_opt_) +# define _Out_writes_bytes_to_opt_(s,c) +# define SALIERI_DEFINED_Out_writes_bytes_to_opt +#endif + +#if defined(_Out_writes_all_opt_) && defined(SALIERI_DEFINED_Out_writes_all_opt) +# undef _Out_writes_all_opt_ +#endif +#if !defined(_Out_writes_all_opt_) +# define _Out_writes_all_opt_(s) +# define SALIERI_DEFINED_Out_writes_all_opt +#endif + +#if defined(_Out_writes_bytes_all_opt_) && defined(SALIERI_DEFINED_Out_writes_bytes_all_opt) +# undef _Out_writes_bytes_all_opt_ +#endif +#if !defined(_Out_writes_bytes_all_opt_) +# define _Out_writes_bytes_all_opt_(s) +# define SALIERI_DEFINED_Out_writes_bytes_all_opt +#endif + +#if defined(_In_updates_to_opt_) && defined(SALIERI_DEFINED_In_updates_to_opt) +# undef _In_updates_to_opt_ +#endif +#if !defined(_In_updates_to_opt_) +# define _In_updates_to_opt_(s,c) +# define SALIERI_DEFINED_In_updates_to_opt +#endif + +#if defined(_In_updates_bytes_to_opt_) && defined(SALIERI_DEFINED_In_updates_bytes_to_opt) +# undef _In_updates_bytes_to_opt_ +#endif +#if !defined(_In_updates_bytes_to_opt_) +# define _In_updates_bytes_to_opt_(s,c) +# define SALIERI_DEFINED_In_updates_bytes_to_opt +#endif + +#if defined(_Inout_updates_all_opt_) && defined(SALIERI_DEFINED_Inout_updates_all_opt) +# undef _Inout_updates_all_opt_ +#endif +#if !defined(_Inout_updates_all_opt_) +# define _Inout_updates_all_opt_(s) +# define SALIERI_DEFINED_Inout_updates_all_opt +#endif + +#if defined(_Inout_updates_bytes_all_opt_) && defined(SALIERI_DEFINED_Inout_updates_bytes_all_opt) +# undef _Inout_updates_bytes_all_opt_ +#endif +#if !defined(_Inout_updates_bytes_all_opt_) +# define _Inout_updates_bytes_all_opt_(s) +# define SALIERI_DEFINED_Inout_updates_bytes_all_opt +#endif + +#if defined(_In_reads_to_ptr_opt_) && defined(SALIERI_DEFINED_In_reads_to_ptr_opt) +# undef _In_reads_to_ptr_opt_ +#endif +#if !defined(_In_reads_to_ptr_opt_) +# define _In_reads_to_ptr_opt_(p) +# define SALIERI_DEFINED_In_reads_to_ptr_opt +#endif + +#if defined(_In_reads_to_ptr_opt_z_) && defined(SALIERI_DEFINED_In_reads_to_ptr_opt_z) +# undef _In_reads_to_ptr_opt_z_ +#endif +#if !defined(_In_reads_to_ptr_opt_z_) +# define _In_reads_to_ptr_opt_z_(p) +# define SALIERI_DEFINED_In_reads_to_ptr_opt_z +#endif + +#if defined(_Out_writes_to_ptr_opt_) && defined(SALIERI_DEFINED_Out_writes_to_ptr_opt) +# undef _Out_writes_to_ptr_opt_ +#endif +#if !defined(_Out_writes_to_ptr_opt_) +# define _Out_writes_to_ptr_opt_(p) +# define SALIERI_DEFINED_Out_writes_to_ptr_opt +#endif + +#if defined(_Out_writes_to_ptr_opt_z_) && defined(SALIERI_DEFINED_Out_writes_to_ptr_opt_z) +# undef _Out_writes_to_ptr_opt_z_ +#endif +#if !defined(_Out_writes_to_ptr_opt_z_) +# define _Out_writes_to_ptr_opt_z_(p) +# define SALIERI_DEFINED_Out_writes_to_ptr_opt_z +#endif + +/* Output Pointer Parameters */ + +#if defined(_Outptr_) && defined(SALIERI_DEFINED_Outptr) +# undef _Outptr_ +#endif +#if !defined(_Outptr_) +# define _Outptr_ +# define SALIERI_DEFINED_Outptr +#endif + +#if defined(_Outptr_opt_) && defined(SALIERI_DEFINED_Outptr_opt) +# undef _Outptr_opt_ +#endif +#if !defined(_Outptr_opt_) +# define _Outptr_opt_ +# define SALIERI_DEFINED_Outptr_opt +#endif + +#if defined(_Outptr_result_maybenull_) && defined(SALIERI_DEFINED_Outptr_result_maybenull) +# undef _Outptr_result_maybenull_ +#endif +#if !defined(_Outptr_result_maybenull_) +# define _Outptr_result_maybenull_ +# define SALIERI_DEFINED_Outptr_result_maybenull +#endif + +#if defined(_Outptr_opt_result_maybenull_) && defined(SALIERI_DEFINED_Outptr_opt_result_maybenull) +# undef _Outptr_opt_result_maybenull_ +#endif +#if !defined(_Outptr_opt_result_maybenull_) +# define _Outptr_opt_result_maybenull_ +# define SALIERI_DEFINED_Outptr_opt_result_maybenull +#endif + +#if defined(_Outptr_result_z_) && defined(SALIERI_DEFINED_Outptr_result_z) +# undef _Outptr_result_z_ +#endif +#if !defined(_Outptr_result_z_) +# define _Outptr_result_z_ +# define SALIERI_DEFINED_Outptr_result_z +#endif + +#if defined(_Outptr_opt_result_z_) && defined(SALIERI_DEFINED_Outptr_opt_result_z) +# undef _Outptr_opt_result_z_ +#endif +#if !defined(_Outptr_opt_result_z_) +# define _Outptr_opt_result_z_ +# define SALIERI_DEFINED_Outptr_opt_result_z +#endif + +#if defined(_Outptr_result_maybenull_z_) && defined(SALIERI_DEFINED_Outptr_result_maybenull_z) +# undef _Outptr_result_maybenull_z_ +#endif +#if !defined(_Outptr_result_maybenull_z_) +# define _Outptr_result_maybenull_z_ +# define SALIERI_DEFINED_Outptr_result_maybenull_z +#endif + +#if defined(_Outptr_opt_result_maybenull_z_) && defined(SALIERI_DEFINED_Outptr_opt_result_maybenull_z) +# undef _Outptr_opt_result_maybenull_z_ +#endif +#if !defined(_Outptr_opt_result_maybenull_z_) +# define _Outptr_opt_result_maybenull_z_ +# define SALIERI_DEFINED_Outptr_opt_result_maybenull_z +#endif + +#if defined(_COM_Outptr_) && defined(SALIERI_DEFINED_COM_Outptr) +# undef _COM_Outptr_ +#endif +#if !defined(_COM_Outptr_) +# define _COM_Outptr_ +# define SALIERI_DEFINED_COM_Outptr +#endif + +#if defined(_COM_Outptr_opt_) && defined(SALIERI_DEFINED_COM_Outptr_opt) +# undef _COM_Outptr_opt_ +#endif +#if !defined(_COM_Outptr_opt_) +# define _COM_Outptr_opt_ +# define SALIERI_DEFINED_COM_Outptr_opt +#endif + +#if defined(_COM_Outptr_result_maybenull_) && defined(SALIERI_DEFINED_COM_Outptr_result_maybenull) +# undef _COM_Outptr_result_maybenull_ +#endif +#if !defined(_COM_Outptr_result_maybenull_) +# define _COM_Outptr_result_maybenull_ +# define SALIERI_DEFINED_COM_Outptr_result_maybenull +#endif + +#if defined(_COM_Outptr_opt_result_maybenull_) && defined(SALIERI_DEFINED_COM_Outptr_opt_result_maybenull) +# undef _COM_Outptr_opt_result_maybenull_ +#endif +#if !defined(_COM_Outptr_opt_result_maybenull_) +# define _COM_Outptr_opt_result_maybenull_ +# define SALIERI_DEFINED_COM_Outptr_opt_result_maybenull +#endif + +#if defined(_Outptr_opt_result_maybenull_) && defined(SALIERI_DEFINED_Outptr_opt_result_maybenull) +# undef _Outptr_opt_result_maybenull_ +#endif +#if !defined(_Outptr_opt_result_maybenull_) +# define _Outptr_opt_result_maybenull_ +# define SALIERI_DEFINED_Outptr_opt_result_maybenull +#endif + +#if defined(_Outptr_result_buffer_) && defined(SALIERI_DEFINED_Outptr_result_buffer) +# undef _Outptr_result_buffer_ +#endif +#if !defined(_Outptr_result_buffer_) +# define _Outptr_result_buffer_(s) +# define SALIERI_DEFINED_Outptr_result_buffer +#endif + +#if defined(_Outptr_result_bytebuffer_) && defined(SALIERI_DEFINED_Outptr_result_bytebuffer) +# undef _Outptr_result_bytebuffer_ +#endif +#if !defined(_Outptr_result_bytebuffer_) +# define _Outptr_result_bytebuffer_(s) +# define SALIERI_DEFINED_Outptr_result_bytebuffer +#endif + +#if defined(_Outptr_opt_result_buffer_) && defined(SALIERI_DEFINED_Outptr_opt_result_buffer) +# undef _Outptr_opt_result_buffer_ +#endif +#if !defined(_Outptr_opt_result_buffer_) +# define _Outptr_opt_result_buffer_(s) +# define SALIERI_DEFINED_Outptr_opt_result_buffer +#endif + +#if defined(_Outptr_opt_result_bytebuffer_) && defined(SALIERI_DEFINED_Outptr_opt_result_bytebuffer) +# undef _Outptr_opt_result_bytebuffer_ +#endif +#if !defined(_Outptr_opt_result_bytebuffer_) +# define _Outptr_opt_result_bytebuffer_(s) +# define SALIERI_DEFINED_Outptr_opt_result_bytebuffer +#endif + +#if defined(_Outptr_result_buffer_to_) && defined(SALIERI_DEFINED_Outptr_result_buffer_to) +# undef _Outptr_result_buffer_to_ +#endif +#if !defined(_Outptr_result_buffer_to_) +# define _Outptr_result_buffer_to_(s,c) +# define SALIERI_DEFINED_Outptr_result_buffer_to +#endif + +#if defined(_Outptr_result_bytebuffer_to_) && defined(SALIERI_DEFINED_Outptr_result_bytebuffer_to) +# undef _Outptr_result_bytebuffer_to_ +#endif +#if !defined(_Outptr_result_bytebuffer_to_) +# define _Outptr_result_bytebuffer_to_(s,c) +# define SALIERI_DEFINED_Outptr_result_bytebuffer_to +#endif + +#if defined(_Outptr_opt_result_buffer_to_) && defined(SALIERI_DEFINED_Outptr_opt_result_buffer_to) +# undef _Outptr_opt_result_buffer_to_ +#endif +#if !defined(_Outptr_opt_result_buffer_to_) +# define _Outptr_opt_result_buffer_to_(s,c) +# define SALIERI_DEFINED_Outptr_opt_result_buffer_to +#endif + +#if defined(_Outptr_opt_result_bytebuffer_to_) && defined(SALIERI_DEFINED_Outptr_opt_result_bytebuffer_to) +# undef _Outptr_opt_result_bytebuffer_to_ +#endif +#if !defined(_Outptr_opt_result_bytebuffer_to_) +# define _Outptr_opt_result_bytebuffer_to_(s,c) +# define SALIERI_DEFINED_Outptr_opt_result_bytebuffer_to +#endif + +#if defined(_Result_nullonfailure_) && defined(SALIERI_DEFINED_Result_nullonfailure) +# undef _Result_nullonfailure_ +#endif +#if !defined(_Result_nullonfailure_) +# define _Result_nullonfailure_ +# define SALIERI_DEFINED_Result_nullonfailure +#endif + +#if defined(_Result_zeroonfailure_) && defined(SALIERI_DEFINED_Result_zeroonfailure) +# undef _Result_zeroonfailure_ +#endif +#if !defined(_Result_zeroonfailure_) +# define _Result_zeroonfailure_ +# define SALIERI_DEFINED_Result_zeroonfailure +#endif + +#if defined(_Outptr_result_nullonfailure_) && defined(SALIERI_DEFINED_Outptr_result_nullonfailure) +# undef _Outptr_result_nullonfailure_ +#endif +#if !defined(_Outptr_result_nullonfailure_) +# define _Outptr_result_nullonfailure_ +# define SALIERI_DEFINED_Outptr_result_nullonfailure +#endif + +#if defined(_Outptr_opt_result_nullonfailure_) && defined(SALIERI_DEFINED_Outptr_opt_result_nullonfailure) +# undef _Outptr_opt_result_nullonfailure_ +#endif +#if !defined(_Outptr_opt_result_nullonfailure_) +# define _Outptr_opt_result_nullonfailure_ +# define SALIERI_DEFINED_Outptr_opt_result_nullonfailure +#endif + +#if defined(_Outref_result_nullonfailure_) && defined(SALIERI_DEFINED_Outref_result_nullonfailure) +# undef _Outref_result_nullonfailure_ +#endif +#if !defined(_Outref_result_nullonfailure_) +# define _Outref_result_nullonfailure_ +# define SALIERI_DEFINED_Outref_result_nullonfailure +#endif + +/* Output Reference Parameters */ + +#if defined(_Outref_) && defined(SALIERI_DEFINED_Outref) +# undef _Outref_ +#endif +#if !defined(_Outref_) +# define _Outref_ +# define SALIERI_DEFINED_Outref +#endif + +#if defined(_Outref_result_maybenull_) && defined(SALIERI_DEFINED_Outref_result_maybenull) +# undef _Outref_result_maybenull_ +#endif +#if !defined(_Outref_result_maybenull_) +# define _Outref_result_maybenull_ +# define SALIERI_DEFINED_Outref_result_maybenull +#endif + +#if defined(_Outref_result_buffer_) && defined(SALIERI_DEFINED_Outref_result_buffer) +# undef _Outref_result_buffer_ +#endif +#if !defined(_Outref_result_buffer_) +# define _Outref_result_buffer_(s) +# define SALIERI_DEFINED_Outref_result_buffer +#endif + +#if defined(_Outref_result_bytebuffer_) && defined(SALIERI_DEFINED_Outref_result_bytebuffer) +# undef _Outref_result_bytebuffer_ +#endif +#if !defined(_Outref_result_bytebuffer_) +# define _Outref_result_bytebuffer_(s) +# define SALIERI_DEFINED_Outref_result_bytebuffer +#endif + +#if defined(_Outref_result_buffer_to_) && defined(SALIERI_DEFINED_Outref_result_buffer_to) +# undef _Outref_result_buffer_to_ +#endif +#if !defined(_Outref_result_buffer_to_) +# define _Outref_result_buffer_to_(s,c) +# define SALIERI_DEFINED_Outref_result_buffer_to +#endif + +#if defined(_Outref_result_bytebuffer_to_) && defined(SALIERI_DEFINED_Outref_result_bytebuffer_to) +# undef _Outref_result_bytebuffer_to_ +#endif +#if !defined(_Outref_result_bytebuffer_to_) +# define _Outref_result_bytebuffer_to_(s,c) +# define SALIERI_DEFINED_Outref_result_bytebuffer_to +#endif + +#if defined(_Outref_result_buffer_all_) && defined(SALIERI_DEFINED_Outref_result_buffer_all) +# undef _Outref_result_buffer_all_ +#endif +#if !defined(_Outref_result_buffer_all_) +# define _Outref_result_buffer_all_(s) +# define SALIERI_DEFINED_Outref_result_buffer_all +#endif + +#if defined(_Outref_result_bytebuffer_all_) && defined(SALIERI_DEFINED_Outref_result_bytebuffer_all) +# undef _Outref_result_bytebuffer_all_ +#endif +#if !defined(_Outref_result_bytebuffer_all_) +# define _Outref_result_bytebuffer_all_(s) +# define SALIERI_DEFINED_Outref_result_bytebuffer_all +#endif + +#if defined(_Outref_result_buffer_maybenull_) && defined(SALIERI_DEFINED_Outref_result_buffer_maybenull) +# undef _Outref_result_buffer_maybenull_ +#endif +#if !defined(_Outref_result_buffer_maybenull_) +# define _Outref_result_buffer_maybenull_(s) +# define SALIERI_DEFINED_Outref_result_buffer_maybenull +#endif + +#if defined(_Outref_result_bytebuffer_maybenull_) && defined(SALIERI_DEFINED_Outref_result_bytebuffer_maybenull) +# undef _Outref_result_bytebuffer_maybenull_ +#endif +#if !defined(_Outref_result_bytebuffer_maybenull_) +# define _Outref_result_bytebuffer_maybenull_(s) +# define SALIERI_DEFINED_Outref_result_bytebuffer_maybenull +#endif + +#if defined(_Outref_result_buffer_to_maybenull_) && defined(SALIERI_DEFINED_Outref_result_buffer_to_maybenull) +# undef _Outref_result_buffer_to_maybenull_ +#endif +#if !defined(_Outref_result_buffer_to_maybenull_) +# define _Outref_result_buffer_to_maybenull_(s,c) +# define SALIERI_DEFINED_Outref_result_buffer_to_maybenull +#endif + +#if defined(_Outref_result_bytebuffer_to_maybenull_) && defined(SALIERI_DEFINED_Outref_result_bytebuffer_to_maybenull) +# undef _Outref_result_bytebuffer_to_maybenull_ +#endif +#if !defined(_Outref_result_bytebuffer_to_maybenull_) +# define _Outref_result_bytebuffer_to_maybenull_(s,c) +# define SALIERI_DEFINED_Outref_result_bytebuffer_to_maybenull +#endif + +#if defined(_Outref_result_buffer_all_maybenull_) && defined(SALIERI_DEFINED_Outref_result_buffer_all_maybenull) +# undef _Outref_result_buffer_all_maybenull_ +#endif +#if !defined(_Outref_result_buffer_all_maybenull_) +# define _Outref_result_buffer_all_maybenull_(s) +# define SALIERI_DEFINED_Outref_result_buffer_all_maybenull +#endif + +#if defined(_Outref_result_bytebuffer_all_maybenull_) && defined(SALIERI_DEFINED_Outref_result_bytebuffer_all_maybenull) +# undef _Outref_result_bytebuffer_all_maybenull_ +#endif +#if !defined(_Outref_result_bytebuffer_all_maybenull_) +# define _Outref_result_bytebuffer_all_maybenull_(s) +# define SALIERI_DEFINED_Outref_result_bytebuffer_all_maybenull +#endif + +/* Return Values */ + +#if defined(_Ret_z_) && defined(SALIERI_DEFINED_Ret_z) +# undef _Ret_z_ +#endif +#if !defined(_Ret_z_) +# define _Ret_z_ +# define SALIERI_DEFINED_Ret_z +#endif + +#if defined(_Ret_writes_) && defined(SALIERI_DEFINED_Ret_writes) +# undef _Ret_writes_ +#endif +#if !defined(_Ret_writes_) +# define _Ret_writes_(s) +# define SALIERI_DEFINED_Ret_writes +#endif + +#if defined(_Ret_writes_bytes_) && defined(SALIERI_DEFINED_Ret_writes_bytes) +# undef _Ret_writes_bytes_ +#endif +#if !defined(_Ret_writes_bytes_) +# define _Ret_writes_bytes_(s) +# define SALIERI_DEFINED_Ret_writes_bytes +#endif + +#if defined(_Ret_writes_z_) && defined(SALIERI_DEFINED_Ret_writes_z) +# undef _Ret_writes_z_ +#endif +#if !defined(_Ret_writes_z_) +# define _Ret_writes_z_(s) +# define SALIERI_DEFINED_Ret_writes_z +#endif + +#if defined(_Ret_writes_to_) && defined(SALIERI_DEFINED_Ret_writes_to) +# undef _Ret_writes_to_ +#endif +#if !defined(_Ret_writes_to_) +# define _Ret_writes_to_(s,c) +# define SALIERI_DEFINED_Ret_writes_to +#endif + +#if defined(_Ret_writes_maybenull_) && defined(SALIERI_DEFINED_Ret_writes_maybenull) +# undef _Ret_writes_maybenull_ +#endif +#if !defined(_Ret_writes_maybenull_) +# define _Ret_writes_maybenull_(s) +# define SALIERI_DEFINED_Ret_writes_maybenull +#endif + +#if defined(_Ret_writes_to_maybenull_) && defined(SALIERI_DEFINED_Ret_writes_to_maybenull) +# undef _Ret_writes_to_maybenull_ +#endif +#if !defined(_Ret_writes_to_maybenull_) +# define _Ret_writes_to_maybenull_(s) +# define SALIERI_DEFINED_Ret_writes_to_maybenull +#endif + +#if defined(_Ret_writes_maybenull_z_) && defined(SALIERI_DEFINED_Ret_writes_maybenull_z) +# undef _Ret_writes_maybenull_z_ +#endif +#if !defined(_Ret_writes_maybenull_z_) +# define _Ret_writes_maybenull_z_(s) +# define SALIERI_DEFINED_Ret_writes_maybenull_z +#endif + +#if defined(_Ret_maybenull_) && defined(SALIERI_DEFINED_Ret_maybenull) +# undef _Ret_maybenull_ +#endif +#if !defined(_Ret_maybenull_) +# define _Ret_maybenull_ +# define SALIERI_DEFINED_Ret_maybenull +#endif + +#if defined(_Ret_maybenull_z_) && defined(SALIERI_DEFINED_Ret_maybenull_z) +# undef _Ret_maybenull_z_ +#endif +#if !defined(_Ret_maybenull_z_) +# define _Ret_maybenull_z_ +# define SALIERI_DEFINED_Ret_maybenull_z +#endif + +#if defined(_Ret_null_) && defined(SALIERI_DEFINED_Ret_null) +# undef _Ret_null_ +#endif +#if !defined(_Ret_null_) +# define _Ret_null_ +# define SALIERI_DEFINED_Ret_null +#endif + +#if defined(_Ret_notnull_) && defined(SALIERI_DEFINED_Ret_notnull) +# undef _Ret_notnull_ +#endif +#if !defined(_Ret_notnull_) +# define _Ret_notnull_ +# define SALIERI_DEFINED_Ret_notnull +#endif + +#if defined(_Ret_writes_bytes_to_) && defined(SALIERI_DEFINED_Ret_writes_bytes_to) +# undef _Ret_writes_bytes_to_ +#endif +#if !defined(_Ret_writes_bytes_to_) +# define _Ret_writes_bytes_to_ +# define SALIERI_DEFINED_Ret_writes_bytes_to +#endif + +#if defined(_Ret_writes_bytes_to_) && defined(SALIERI_DEFINED_Ret_writes_bytes_to) +# undef _Ret_writes_bytes_to_ +#endif +#if !defined(_Ret_writes_bytes_to_) +# define _Ret_writes_bytes_to_ +# define SALIERI_DEFINED_Ret_writes_bytes_to +#endif + +#if defined(_Ret_writes_bytes_maybenull_) && defined(SALIERI_DEFINED_Ret_writes_bytes_maybenull) +# undef _Ret_writes_bytes_maybenull_ +#endif +#if !defined(_Ret_writes_bytes_maybenull_) +# define _Ret_writes_bytes_maybenull_ +# define SALIERI_DEFINED_Ret_writes_bytes_maybenull +#endif + +#if defined(_Ret_writes_bytes_to_maybenull_) && defined(SALIERI_DEFINED_Ret_writes_bytes_to_maybenull) +# undef _Ret_writes_bytes_to_maybenull_ +#endif +#if !defined(_Ret_writes_bytes_to_maybenull_) +# define _Ret_writes_bytes_to_maybenull_ +# define SALIERI_DEFINED_Ret_writes_bytes_to_maybenull +#endif + +/* Other Common Annotations */ + +#if defined(_In_range_) && defined(SALIERI_DEFINED_In_range) +# undef _In_range_ +#endif +#if !defined(_In_range_) +# define _In_range_(low, hi) +# define SALIERI_DEFINED_In_range +#endif + +#if defined(_Out_range_) && defined(SALIERI_DEFINED_Out_range) +# undef _Out_range_ +#endif +#if !defined(_Out_range_) +# define _Out_range_(low, hi) +# define SALIERI_DEFINED_Out_range +#endif + +#if defined(_Ret_range_) && defined(SALIERI_DEFINED_Ret_range) +# undef _Ret_range_ +#endif +#if !defined(_Ret_range_) +# define _Ret_range_(low, hi) +# define SALIERI_DEFINED_Ret_range +#endif + +#if defined(_Deref_in_range_) && defined(SALIERI_DEFINED_Deref_in_range) +# undef _Deref_in_range_ +#endif +#if !defined(_Deref_in_range_) +# define _Deref_in_range_(low, hi) +# define SALIERI_DEFINED_Deref_in_range +#endif + +#if defined(_Deref_out_range_) && defined(SALIERI_DEFINED_Deref_out_range) +# undef _Deref_out_range_ +#endif +#if !defined(_Deref_out_range_) +# define _Deref_out_range_(low, hi) +# define SALIERI_DEFINED_Deref_out_range +#endif + +#if defined(_Deref_inout_range_) && defined(SALIERI_DEFINED_Deref_inout_range) +# undef _Deref_inout_range_ +#endif +#if !defined(_Deref_inout_range_) +# define _Deref_inout_range_(low, hi) +# define SALIERI_DEFINED_Deref_inout_range +#endif + +#if defined(_Field_range_) && defined(SALIERI_DEFINED_Field_range) +# undef _Field_range_ +#endif +#if !defined(_Field_range_) +# define _Field_range_(low, hi) +# define SALIERI_DEFINED_Field_range +#endif + +#if defined(_Pre_equal_to_) && defined(SALIERI_DEFINED_Pre_equal_to) +# undef _Pre_equal_to_ +#endif +#if !defined(_Pre_equal_to_) +# define _Pre_equal_to_(expr) +# define SALIERI_DEFINED_Pre_equal_to +#endif + +#if defined(_Post_equal_to_) && defined(SALIERI_DEFINED_Post_equal_to) +# undef _Post_equal_to_ +#endif +#if !defined(_Post_equal_to_) +# define _Post_equal_to_(expr) +# define SALIERI_DEFINED_Post_equal_to +#endif + +#if defined(_Struct_size_bytes_) && defined(SALIERI_DEFINED_Struct_size_bytes) +# undef _Struct_size_bytes_ +#endif +#if !defined(_Struct_size_bytes_) +# define _Struct_size_bytes_(size) +# define SALIERI_DEFINED_Struct_size_bytes +#endif + +/* Annotating Function Behavior + * + * https://msdn.microsoft.com/en-us/library/jj159529.aspx + *****/ + +#if defined(_Called_from_function_class_) && defined(SALIERI_DEFINED_Called_from_function_class) +# undef _Called_from_function_class_ +#endif +#if !defined(_Called_from_function_class_) +# define _Called_from_function_class_(name) +# define SALIERI_DEFINED_Called_from_function_class +#endif + +#if defined(_Check_return_) && defined(SALIERI_DEFINED_Check_return) +# undef _Check_return_ +#endif +#if !defined(_Check_return_) +# define _Check_return_ +# define SALIERI_DEFINED_Check_return +#endif + +#if defined(_Function_class_) && defined(SALIERI_DEFINED_Function_class) +# undef _Function_class_ +#endif +#if !defined(_Function_class_) +# define _Function_class_(name) +# define SALIERI_DEFINED_Function_class +#endif + +#if defined(_Raises_SEH_exception_) && defined(SALIERI_DEFINED_Raises_SEH_exception) +# undef _Raises_SEH_exception_ +#endif +#if !defined(_Raises_SEH_exception_) +# define _Raises_SEH_exception_ +# define SALIERI_DEFINED_Raises_SEH_exception +#endif + +#if defined(_Must_inspect_result_) && defined(SALIERI_DEFINED_Must_inspect_result) +# undef _Must_inspect_result_ +#endif +#if !defined(_Must_inspect_result_) +# define _Must_inspect_result_ +# define SALIERI_DEFINED_Must_inspect_result +#endif + +#if defined(_Use_decl_annotations_) && defined(SALIERI_DEFINED_Use_decl_annotations) +# undef _Use_decl_annotations_ +#endif +#if !defined(_Use_decl_annotations_) +# define _Use_decl_annotations_ +# define SALIERI_DEFINED_Use_decl_annotations +#endif + +#if defined(_Always_) && defined(SALIERI_DEFINED_Always) +# undef _Always_ +#endif +#if !defined(_Always_) +# define _Always_(anno_list) +# define SALIERI_DEFINED_Always +#endif + +#if defined(_On_failure_) && defined(SALIERI_DEFINED_On_failure) +# undef _On_failure_ +#endif +#if !defined(_On_failure_) +# define _On_failure_(anno_list) +# define SALIERI_DEFINED_On_failure +#endif + +#if defined(_Return_type_success_) && defined(SALIERI_DEFINED_Return_type_success) +# undef _Return_type_success_ +#endif +#if !defined(_Return_type_success_) +# define _Return_type_success_(expr) +# define SALIERI_DEFINED_Return_type_success +#endif + +#if defined(_Success_) && defined(SALIERI_DEFINED_Success) +# undef _Success_ +#endif +#if !defined(_Success_) +# define _Success_(expr) +# define SALIERI_DEFINED_Success +#endif + +/* Annotating Structs and Classes + * + * https://msdn.microsoft.com/en-us/library/jj159528.aspx + *****/ + +#if defined(_Field_range_) && defined(SALIERI_DEFINED_Field_range) +# undef _Field_range_ +#endif +#if !defined(_Field_range_) +# define _Field_range_(low, high) +# define SALIERI_DEFINED_Field_range +#endif + +#if defined(_Field_size_) && defined(SALIERI_DEFINED_Field_size) +# undef _Field_size_ +#endif +#if !defined(_Field_size_) +# define _Field_size_(size) +# define SALIERI_DEFINED_Field_size +#endif + +#if defined(_Field_size_part_) && defined(SALIERI_DEFINED_Field_size_part) +# undef _Field_size_part_ +#endif +#if !defined(_Field_size_part_) +# define _Field_size_part_(size) +# define SALIERI_DEFINED_Field_size_part +#endif + +#if defined(_Field_size_opt_) && defined(SALIERI_DEFINED_Field_size_opt) +# undef _Field_size_opt_ +#endif +#if !defined(_Field_size_opt_) +# define _Field_size_opt_(size) +# define SALIERI_DEFINED_Field_size_opt +#endif + +#if defined(_Field_size_bytes_) && defined(SALIERI_DEFINED_Field_size_bytes) +# undef _Field_size_bytes_ +#endif +#if !defined(_Field_size_bytes_) +# define _Field_size_bytes_(size) +# define SALIERI_DEFINED_Field_size_bytes +#endif + +#if defined(_Field_size_bytes_opt_) && defined(SALIERI_DEFINED_Field_size_bytes_opt) +# undef _Field_size_bytes_opt_ +#endif +#if !defined(_Field_size_bytes_opt_) +# define _Field_size_bytes_opt_(size) +# define SALIERI_DEFINED_Field_size_bytes_opt +#endif + +#if defined(_Field_size_part_) && defined(SALIERI_DEFINED_Field_size_part) +# undef _Field_size_part_ +#endif +#if !defined(_Field_size_part_) +# define _Field_size_part_(size, count) +# define SALIERI_DEFINED_Field_size_part +#endif + +#if defined(_Field_size_part_opt_) && defined(SALIERI_DEFINED_Field_size_part_opt) +# undef _Field_size_part_opt_ +#endif +#if !defined(_Field_size_part_opt_) +# define _Field_size_part_opt_(size, count) +# define SALIERI_DEFINED_Field_size_part_opt +#endif + +#if defined(_Field_size_bytes_part_) && defined(SALIERI_DEFINED_Field_size_bytes_part) +# undef _Field_size_bytes_part_ +#endif +#if !defined(_Field_size_bytes_part_) +# define _Field_size_bytes_part_(size, count) +# define SALIERI_DEFINED_Field_size_bytes_part +#endif + +#if defined(_Field_size_bytes_part_opt_) && defined(SALIERI_DEFINED_Field_size_bytes_part_opt) +# undef _Field_size_bytes_part_opt_ +#endif +#if !defined(_Field_size_bytes_part_opt_) +# define _Field_size_bytes_part_opt_(size, count) +# define SALIERI_DEFINED_Field_size_bytes_part_opt +#endif + +#if defined(_Field_size_full_) && defined(SALIERI_DEFINED_Field_size_full) +# undef _Field_size_full_ +#endif +#if !defined(_Field_size_full_) +# define _Field_size_full_(size) +# define SALIERI_DEFINED_Field_size_full +#endif + +#if defined(_Field_size_full_opt_) && defined(SALIERI_DEFINED_Field_size_full_opt) +# undef _Field_size_full_opt_ +#endif +#if !defined(_Field_size_full_opt_) +# define _Field_size_full_opt_(size) +# define SALIERI_DEFINED_Field_size_full_opt +#endif + +#if defined(_Field_size_bytes_full_) && defined(SALIERI_DEFINED_Field_size_bytes_full) +# undef _Field_size_bytes_full_ +#endif +#if !defined(_Field_size_bytes_full_) +# define _Field_size_bytes_full_(size) +# define SALIERI_DEFINED_Field_size_bytes_full +#endif + +#if defined(_Field_size_bytes_full_opt_) && defined(SALIERI_DEFINED_Field_size_bytes_full_opt) +# undef _Field_size_bytes_full_opt_ +#endif +#if !defined(_Field_size_bytes_full_opt_) +# define _Field_size_bytes_full_opt_(size) +# define SALIERI_DEFINED_Field_size_bytes_full_opt +#endif + +#if defined(_Struct_size_bytes_) && defined(SALIERI_DEFINED_Struct_size_bytes) +# undef _Struct_size_bytes_ +#endif +#if !defined(_Struct_size_bytes_) +# define _Struct_size_bytes_(size) +# define SALIERI_DEFINED_Struct_size_bytes +#endif + +/* Annotating Locking Behavior + * + * https://msdn.microsoft.com/en-us/library/hh916381.aspx + *****/ + +#if defined(_Acquires_exclusive_lock_) && defined(SALIERI_DEFINED_Acquires_exclusive_lock) +# undef _Acquires_exclusive_lock_ +#endif +#if !defined(_Acquires_exclusive_lock_) +# define _Acquires_exclusive_lock_(expr) +# define SALIERI_DEFINED_Acquires_exclusive_lock +#endif + +#if defined(_Acquires_lock_) && defined(SALIERI_DEFINED_Acquires_lock) +# undef _Acquires_lock_ +#endif +#if !defined(_Acquires_lock_) +# define _Acquires_lock_(expr) +# define SALIERI_DEFINED_Acquires_lock +#endif + +#if defined(_Acquires_nonreentrant_lock_) && defined(SALIERI_DEFINED_Acquires_nonreentrant_lock) +# undef _Acquires_nonreentrant_lock_ +#endif +#if !defined(_Acquires_nonreentrant_lock_) +# define _Acquires_nonreentrant_lock_(expr) +# define SALIERI_DEFINED_Acquires_nonreentrant_lock +#endif + +#if defined(_Acquires_shared_lock_) && defined(SALIERI_DEFINED_Acquires_shared_lock) +# undef _Acquires_shared_lock_ +#endif +#if !defined(_Acquires_shared_lock_) +# define _Acquires_shared_lock_(expr) +# define SALIERI_DEFINED_Acquires_shared_lock +#endif + +#if defined(_Create_lock_level_) && defined(SALIERI_DEFINED_Create_lock_level) +# undef _Create_lock_level_ +#endif +#if !defined(_Create_lock_level_) +# define _Create_lock_level_(name) +# define SALIERI_DEFINED_Create_lock_level +#endif + +#if defined(_Has_lock_kind_) && defined(SALIERI_DEFINED_Has_lock_kind) +# undef _Has_lock_kind_ +#endif +#if !defined(_Has_lock_kind_) +# define _Has_lock_kind_(kind) +# define SALIERI_DEFINED_Has_lock_kind +#endif + +#if defined(_Has_lock_level_) && defined(SALIERI_DEFINED_Has_lock_level) +# undef _Has_lock_level_ +#endif +#if !defined(_Has_lock_level_) +# define _Has_lock_level_(name) +# define SALIERI_DEFINED_Has_lock_level +#endif + +#if defined(_Lock_level_order_) && defined(SALIERI_DEFINED_Lock_level_order) +# undef _Lock_level_order_ +#endif +#if !defined(_Lock_level_order_) +# define _Lock_level_order_(name1, name2) +# define SALIERI_DEFINED_Lock_level_order +#endif + +#if defined(_Post_same_lock_) && defined(SALIERI_DEFINED_Post_same_lock) +# undef _Post_same_lock_ +#endif +#if !defined(_Post_same_lock_) +# define _Post_same_lock_(expr1, expr2) +# define SALIERI_DEFINED_Post_same_lock +#endif + +#if defined(_Releases_exclusive_lock_) && defined(SALIERI_DEFINED_Releases_exclusive_lock) +# undef _Releases_exclusive_lock_ +#endif +#if !defined(_Releases_exclusive_lock_) +# define _Releases_exclusive_lock_(expr) +# define SALIERI_DEFINED_Releases_exclusive_lock +#endif + +#if defined(_Releases_lock_) && defined(SALIERI_DEFINED_Releases_lock) +# undef _Releases_lock_ +#endif +#if !defined(_Releases_lock_) +# define _Releases_lock_(expr) +# define SALIERI_DEFINED_Releases_lock +#endif + +#if defined(_Releases_nonreentrant_lock_) && defined(SALIERI_DEFINED_Releases_nonreentrant_lock) +# undef _Releases_nonreentrant_lock_ +#endif +#if !defined(_Releases_nonreentrant_lock_) +# define _Releases_nonreentrant_lock_(expr) +# define SALIERI_DEFINED_Releases_nonreentrant_lock +#endif + +#if defined(_Releases_shared_lock_) && defined(SALIERI_DEFINED_Releases_shared_lock) +# undef _Releases_shared_lock_ +#endif +#if !defined(_Releases_shared_lock_) +# define _Releases_shared_lock_(expr) +# define SALIERI_DEFINED_Releases_shared_lock +#endif + +#if defined(_Requires_lock_held_) && defined(SALIERI_DEFINED_Requires_lock_held) +# undef _Requires_lock_held_ +#endif +#if !defined(_Requires_lock_held_) +# define _Requires_lock_held_(expr) +# define SALIERI_DEFINED_Requires_lock_held +#endif + +#if defined(_Requires_lock_not_held_) && defined(SALIERI_DEFINED_Requires_lock_not_held) +# undef _Requires_lock_not_held_ +#endif +#if !defined(_Requires_lock_not_held_) +# define _Requires_lock_not_held_(expr) +# define SALIERI_DEFINED_Requires_lock_not_held +#endif + +#if defined(_Requires_no_locks_held_) && defined(SALIERI_DEFINED_Requires_no_locks_held) +# undef _Requires_no_locks_held_ +#endif +#if !defined(_Requires_no_locks_held_) +# define _Requires_no_locks_held_ +# define SALIERI_DEFINED_Requires_no_locks_held +#endif + +#if defined(_Requires_shared_lock_held_) && defined(SALIERI_DEFINED_Requires_shared_lock_held) +# undef _Requires_shared_lock_held_ +#endif +#if !defined(_Requires_shared_lock_held_) +# define _Requires_shared_lock_held_(expr) +# define SALIERI_DEFINED_Requires_shared_lock_held +#endif + +#if defined(_Requires_exclusive_lock_held_) && defined(SALIERI_DEFINED_Requires_exclusive_lock_held) +# undef _Requires_exclusive_lock_held_ +#endif +#if !defined(_Requires_exclusive_lock_held_) +# define _Requires_exclusive_lock_held_(expr) +# define SALIERI_DEFINED_Requires_exclusive_lock_held +#endif + +/* Shared Data Access Annotations */ + +#if defined(_Guarded_by_) && defined(SALIERI_DEFINED_Guarded_by) +# undef _Guarded_by_ +#endif +#if !defined(_Guarded_by_) +# define _Guarded_by_(expr) +# define SALIERI_DEFINED_Guarded_by +#endif + +#if defined(_Interlocked_) && defined(SALIERI_DEFINED_Interlocked) +# undef _Interlocked_ +#endif +#if !defined(_Interlocked_) +# define _Interlocked_ +# define SALIERI_DEFINED_Interlocked +#endif + +#if defined(_Interlocked_operand_) && defined(SALIERI_DEFINED_Interlocked_operand) +# undef _Interlocked_operand_ +#endif +#if !defined(_Interlocked_operand_) +# define _Interlocked_operand_ +# define SALIERI_DEFINED_Interlocked_operand +#endif + +#if defined(_Write_guarded_by_) && defined(SALIERI_DEFINED_Write_guarded_by) +# undef _Write_guarded_by_ +#endif +#if !defined(_Write_guarded_by_) +# define _Write_guarded_by_(expr) +# define SALIERI_DEFINED_Write_guarded_by +#endif + +/* Specifying When and Where an Annotation Applies + * + * https://msdn.microsoft.com/en-us/library/jj159526.aspx + *****/ + +#if defined(_At_) && defined(SALIERI_DEFINED_At) +# undef _At_ +#endif +#if !defined(_At_) +# define _At_(expr, anno_list) +# define SALIERI_DEFINED_At +#endif + +#if defined(_At_buffer_) && defined(SALIERI_DEFINED_At_buffer) +# undef _At_buffer_ +#endif +#if !defined(_At_buffer_) +# define _At_buffer_(expr, iter, elem_count, anno_list) +# define SALIERI_DEFINED_At_buffer +#endif + +#if defined(_Group_) && defined(SALIERI_DEFINED_Group) +# undef _Group_ +#endif +#if !defined(_Group_) +# define _Group_(anno_list) +# define SALIERI_DEFINED_Group +#endif + +#if defined(_When_) && defined(SALIERI_DEFINED_When) +# undef _When_ +#endif +#if !defined(_When_) +# define _When_(expr, anno_list) +# define SALIERI_DEFINED_When +#endif + +/* Intrinsic Functions + * + * https://msdn.microsoft.com/en-us/library/jj159527.aspx + *****/ + +/* General Purpose */ + +#if defined(_Curr_) && defined(SALIERI_DEFINED_Curr) +# undef _Curr_ +#endif +#if !defined(_Curr_) +# define _Curr_ +# define SALIERI_DEFINED_Curr +#endif + +#if defined(_Inexpressible_) && defined(SALIERI_DEFINED_Inexpressible) +# undef _Inexpressible_ +#endif +#if !defined(_Inexpressible_) +# define _Inexpressible_(expr) +# define SALIERI_DEFINED_Inexpressible +#endif + +#if defined(_Nullterm_length_) && defined(SALIERI_DEFINED_Nullterm_length) +# undef _Nullterm_length_ +#endif +#if !defined(_Nullterm_length_) +# define _Nullterm_length_(param) +# define SALIERI_DEFINED_Nullterm_length +#endif + +#if defined(_Old_) && defined(SALIERI_DEFINED_Old) +# undef _Old_ +#endif +#if !defined(_Old_) +# define _Old_(expr) +# define SALIERI_DEFINED_Old +#endif + +#if defined(_Param_) && defined(SALIERI_DEFINED_Param) +# undef _Param_ +#endif +#if !defined(_Param_) +# define _Param_(n) +# define SALIERI_DEFINED_Param +#endif + +/* String Specific */ + +#if defined(_String_length_) && defined(SALIERI_DEFINED_String_length) +# undef _String_length_ +#endif +#if !defined(_String_length_) +# define _String_length_(param) +# define SALIERI_DEFINED_String_length +#endif + +#if defined(SALIERI_VERSION) +# undef SALIERI_VERSION +#endif + +#define SALIERI_VERSION 1 + +#endif /* !defined(SALIERI_VERSION) || (SALIERI_VERSION < X) */ diff --git a/3rdparty/bx/include/compat/msvc/dirent.h b/3rdparty/bx/include/compat/msvc/dirent.h index 0652352..a08d0fa 100644 --- a/3rdparty/bx/include/compat/msvc/dirent.h +++ b/3rdparty/bx/include/compat/msvc/dirent.h @@ -27,7 +27,9 @@ #ifndef DIRENT_H #define DIRENT_H -#ifdef _MSC_VER +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wunused-function" +#elif defined(_MSC_VER) # pragma warning(disable:4505) // error C4505: '_wreaddir': unreferenced local function has been removed #else # pragma GCC diagnostic ignored "-Wunused-function" diff --git a/3rdparty/bx/include/compat/nacl/memory.h b/3rdparty/bx/include/compat/nacl/memory.h deleted file mode 100644 index 3b2f590..0000000 --- a/3rdparty/bx/include/compat/nacl/memory.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/3rdparty/bx/makefile b/3rdparty/bx/makefile index bf8d911..b953138 100644 --- a/3rdparty/bx/makefile +++ b/3rdparty/bx/makefile @@ -1,6 +1,6 @@ # -# Copyright 2011-2017 Branimir Karadzic. All rights reserved. -# License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause +# Copyright 2011-2018 Branimir Karadzic. All rights reserved. +# License: https://github.com/bkaradzic/bx#license-bsd-2-clause # GENIE=../bx/tools/bin/$(OS)/genie @@ -11,14 +11,12 @@ all: $(GENIE) --gcc=android-arm gmake $(GENIE) --gcc=android-mips gmake $(GENIE) --gcc=android-x86 gmake - $(GENIE) --gcc=nacl gmake - $(GENIE) --gcc=nacl-arm gmake - $(GENIE) --gcc=pnacl gmake $(GENIE) --gcc=mingw-gcc gmake $(GENIE) --gcc=linux-gcc gmake $(GENIE) --gcc=osx gmake $(GENIE) --gcc=ios-arm gmake $(GENIE) --gcc=ios-simulator gmake + $(GENIE) --gcc=ios-simulator64 gmake $(GENIE) xcode4 .build/projects/gmake-android-arm: @@ -87,34 +85,6 @@ mingw-clang: mingw-clang-debug32 mingw-clang-release32 mingw-clang-debug64 mingw .build/projects/vs2013: $(GENIE) vs2013 -.build/projects/gmake-nacl: - $(GENIE) --gcc=nacl gmake -nacl-debug32: .build/projects/gmake-nacl - make -R -C .build/projects/gmake-nacl config=debug32 -nacl-release32: .build/projects/gmake-nacl - make -R -C .build/projects/gmake-nacl config=release32 -nacl-debug64: .build/projects/gmake-nacl - make -R -C .build/projects/gmake-nacl config=debug64 -nacl-release64: .build/projects/gmake-nacl - make -R -C .build/projects/gmake-nacl config=release64 -nacl: nacl-debug32 nacl-release32 nacl-debug64 nacl-release64 - -.build/projects/gmake-nacl-arm: - $(GENIE) --gcc=nacl-arm gmake -nacl-arm-debug: .build/projects/gmake-nacl-arm - make -R -C .build/projects/gmake-nacl-arm config=debug -nacl-arm-release: .build/projects/gmake-nacl-arm - make -R -C .build/projects/gmake-nacl-arm config=release -nacl-arm: nacl-arm-debug32 nacl-arm-release32 - -.build/projects/gmake-pnacl: - $(GENIE) --gcc=pnacl gmake -pnacl-debug: .build/projects/gmake-pnacl - make -R -C .build/projects/gmake-pnacl config=debug -pnacl-release: .build/projects/gmake-pnacl - make -R -C .build/projects/gmake-pnacl config=release -pnacl: pnacl-debug pnacl-release - .build/projects/gmake-osx: $(GENIE) --gcc=osx gmake osx-debug32: .build/projects/gmake-osx @@ -143,6 +113,14 @@ ios-simulator-release: .build/projects/gmake-ios-simulator make -R -C .build/projects/gmake-ios-simulator config=release ios-simulator: ios-simulator-debug ios-simulator-release +.build/projects/gmake-ios-simulator64: + $(GENIE) --gcc=ios-simulator64 gmake +ios-simulator64-debug: .build/projects/gmake-ios-simulator64 + make -R -C .build/projects/gmake-ios-simulator64 config=debug +ios-simulator64-release: .build/projects/gmake-ios-simulator64 + make -R -C .build/projects/gmake-ios-simulator64 config=release +ios-simulator64: ios-simulator64-debug ios-simulator64-release + rebuild-shaders: make -R -C examples rebuild @@ -182,10 +160,11 @@ else OS=windows BUILD_PROJECT_DIR=gmake-mingw-gcc BUILD_OUTPUT_DIR=win32_mingw-gcc -BUILD_TOOLS_CONFIG=release32 +BUILD_TOOLS_CONFIG=release64 EXE=.exe endif +# bin2c .build/osx64_clang/bin/bin2cRelease: .build/projects/gmake-osx $(SILENT) make -C .build/projects/gmake-osx bin2c config=$(BUILD_TOOLS_CONFIG) @@ -201,10 +180,36 @@ tools/bin/linux/bin2c: .build/linux64_gcc/bin/bin2cRelease .build/win64_mingw-gcc/bin/bin2cRelease.exe: .build/projects/gmake-mingw-gcc $(SILENT) make -C .build/projects/gmake-mingw-gcc bin2c config=$(BUILD_TOOLS_CONFIG) -tools/bin/windows/bin2c.exe: .build/win64_mingw-gcc/bin/bin2cRelease +tools/bin/windows/bin2c.exe: .build/win64_mingw-gcc/bin/bin2cRelease.exe $(SILENT) cp $(<) $(@) -tools: tools/bin/$(OS)/bin2c$(EXE) +bin2c: tools/bin/$(OS)/bin2c$(EXE) + +# lemon +.build/osx64_clang/bin/lemonRelease: .build/projects/gmake-osx + $(SILENT) make -C .build/projects/gmake-osx lemon config=$(BUILD_TOOLS_CONFIG) + +tools/bin/darwin/lemon: .build/osx64_clang/bin/lemonRelease + $(SILENT) cp $(<) $(@) + +.build/linux64_gcc/bin/lemonRelease: .build/projects/gmake-linux + $(SILENT) make -C .build/projects/gmake-linux lemon config=$(BUILD_TOOLS_CONFIG) + +tools/bin/linux/lemon: .build/linux64_gcc/bin/lemonRelease + $(SILENT) cp $(<) $(@) + +.build/win64_mingw-gcc/bin/lemonRelease.exe: .build/projects/gmake-mingw-gcc + $(SILENT) make -C .build/projects/gmake-mingw-gcc lemon config=$(BUILD_TOOLS_CONFIG) + +tools/bin/windows/lemon.exe: .build/win64_mingw-gcc/bin/lemonRelease.exe + $(SILENT) cp $(<) $(@) + +tools/bin/$(OS)/lempar.c: tools/lemon/lempar.c + $(SILENT) cp $(<) $(@) + +lemon: tools/bin/$(OS)/lemon$(EXE) tools/bin/$(OS)/lempar.c + +tools: bin2c lemon dist: tools/bin/darwin/bin2c tools/bin/linux/bin2c tools/bin/windows/bin2c.exe diff --git a/3rdparty/bx/scripts/bin2c.lua b/3rdparty/bx/scripts/bin2c.lua index daa7b09..fc4dec9 100644 --- a/3rdparty/bx/scripts/bin2c.lua +++ b/3rdparty/bx/scripts/bin2c.lua @@ -1,5 +1,5 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bx#license-bsd-2-clause -- @@ -27,6 +27,11 @@ project "bin2c" "pthread", } + configuration { "vs20* or mingw*" } + links { + "psapi", + } + configuration {} strip() diff --git a/3rdparty/bx/scripts/bx.lua b/3rdparty/bx/scripts/bx.lua index a84eec4..dd88ea5 100644 --- a/3rdparty/bx/scripts/bx.lua +++ b/3rdparty/bx/scripts/bx.lua @@ -1,5 +1,5 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bx#license-bsd-2-clause -- @@ -8,6 +8,7 @@ project "bx" includedirs { path.join(BX_DIR, "include"), + path.join(BX_DIR, "3rdparty"), } files { @@ -16,6 +17,11 @@ project "bx" path.join(BX_DIR, "src/**.cpp"), } + configuration { "Debug" } + defines { + "BX_CONFIG_DEBUG=1", + } + configuration { "linux-*" } buildoptions { "-fPIC", @@ -25,19 +31,27 @@ project "bx" if _OPTIONS["with-amalgamated"] then excludes { + path.join(BX_DIR, "src/allocator.cpp"), + path.join(BX_DIR, "src/bx.cpp"), path.join(BX_DIR, "src/commandline.cpp"), - path.join(BX_DIR, "src/crt.cpp"), - path.join(BX_DIR, "src/crtimpl.cpp"), + path.join(BX_DIR, "src/crtnone.cpp"), path.join(BX_DIR, "src/debug.cpp"), path.join(BX_DIR, "src/dtoa.cpp"), - path.join(BX_DIR, "src/fpumath.cpp"), + path.join(BX_DIR, "src/easing.cpp"), + path.join(BX_DIR, "src/file.cpp"), + path.join(BX_DIR, "src/filepath.cpp"), + path.join(BX_DIR, "src/hash.cpp"), + path.join(BX_DIR, "src/math.cpp"), path.join(BX_DIR, "src/mutex.cpp"), path.join(BX_DIR, "src/os.cpp"), - path.join(BX_DIR, "src/sem.cpp"), + path.join(BX_DIR, "src/process.cpp"), + path.join(BX_DIR, "src/semaphore.cpp"), + path.join(BX_DIR, "src/settings.cpp"), path.join(BX_DIR, "src/sort.cpp"), path.join(BX_DIR, "src/string.cpp"), path.join(BX_DIR, "src/thread.cpp"), path.join(BX_DIR, "src/timer.cpp"), + path.join(BX_DIR, "src/url.cpp"), } else excludes { diff --git a/3rdparty/bx/scripts/genie.lua b/3rdparty/bx/scripts/genie.lua index 9919b8c..3cdb23e 100644 --- a/3rdparty/bx/scripts/genie.lua +++ b/3rdparty/bx/scripts/genie.lua @@ -1,5 +1,5 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bx#license-bsd-2-clause -- @@ -28,8 +28,8 @@ solution "bx" language "C++" BX_DIR = path.getabsolute("..") -local BX_BUILD_DIR = path.join(BX_DIR, ".build") -local BX_THIRD_PARTY_DIR = path.join(BX_DIR, "3rdparty") +BX_BUILD_DIR = path.join(BX_DIR, ".build") +BX_THIRD_PARTY_DIR = path.join(BX_DIR, "3rdparty") dofile "toolchain.lua" toolchain(BX_BUILD_DIR, BX_THIRD_PARTY_DIR) @@ -39,6 +39,7 @@ end dofile "bx.lua" dofile "bin2c.lua" +dofile "lemon.lua" project "bx.test" kind "ConsoleApp" @@ -75,20 +76,6 @@ project "bx.test" "-shared", } - configuration { "nacl or nacl-arm" } - targetextension ".nexe" - links { - "ppapi", - "pthread", - } - - configuration { "pnacl" } - targetextension ".pexe" - links { - "ppapi", - "pthread", - } - configuration { "linux-*" } links { "pthread", @@ -134,20 +121,6 @@ project "bx.bench" "-shared", } - configuration { "nacl or nacl-arm" } - targetextension ".nexe" - links { - "ppapi", - "pthread", - } - - configuration { "pnacl" } - targetextension ".pexe" - links { - "ppapi", - "pthread", - } - configuration { "linux-*" } links { "pthread", diff --git a/3rdparty/bx/scripts/lemon.lua b/3rdparty/bx/scripts/lemon.lua new file mode 100644 index 0000000..49e95c8 --- /dev/null +++ b/3rdparty/bx/scripts/lemon.lua @@ -0,0 +1,21 @@ +-- +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. +-- License: https://github.com/bkaradzic/bx#license-bsd-2-clause +-- + +project "lemon" + kind "ConsoleApp" + + files { + path.join(BX_DIR, "tools/lemon/lemon.c") + } + + configuration { "not vs*" } + buildoptions { + "-Wno-sign-compare", + "-Wno-unused-parameter", + } + + configuration {} + + strip() diff --git a/3rdparty/bx/scripts/toolchain.lua b/3rdparty/bx/scripts/toolchain.lua index 0152ce7..9163118 100644 --- a/3rdparty/bx/scripts/toolchain.lua +++ b/3rdparty/bx/scripts/toolchain.lua @@ -1,10 +1,9 @@ -- --- Copyright 2010-2017 Branimir Karadzic. All rights reserved. +-- Copyright 2010-2018 Branimir Karadzic. All rights reserved. -- License: https://github.com/bkaradzic/bx#license-bsd-2-clause -- local bxDir = path.getabsolute("..") -local naclToolchain = "" local function crtNone() @@ -65,17 +64,14 @@ function toolchain(_buildDir, _libDir) { "ios-arm", "iOS - ARM" }, { "ios-arm64", "iOS - ARM64" }, { "ios-simulator", "iOS - Simulator" }, + { "ios-simulator64", "iOS - Simulator 64" }, { "tvos-arm64", "tvOS - ARM64" }, { "tvos-simulator", "tvOS - Simulator" }, { "mingw-gcc", "MinGW" }, { "mingw-clang", "MinGW (clang compiler)" }, - { "nacl", "Native Client" }, - { "nacl-arm", "Native Client - ARM" }, { "netbsd", "NetBSD" }, { "osx", "OSX" }, - { "pnacl", "Native Client - PNaCl" }, { "orbis", "Orbis" }, - { "qnx-arm", "QNX/Blackberry - ARM" }, { "riscv", "RISC-V" }, { "rpi", "RaspberryPi" }, }, @@ -94,10 +90,7 @@ function toolchain(_buildDir, _libDir) { "vs2013-xp", "Visual Studio 2013 targeting XP" }, { "vs2015-xp", "Visual Studio 2015 targeting XP" }, { "vs2017-xp", "Visual Studio 2017 targeting XP" }, - { "winphone8", "Windows Phone 8.0" }, - { "winphone81", "Windows Phone 8.1" }, - { "winstore81", "Windows Store 8.1" }, - { "winstore82", "Universal Windows App" }, + { "winstore100", "Universal Windows App 10.0" }, { "durango", "Durango" }, { "orbis", "Orbis" }, }, @@ -126,6 +119,12 @@ function toolchain(_buildDir, _libDir) description = "Set iOS target version (default: 8.0).", } + newoption { + trigger = "with-macos", + value = "#", + description = "Set macOS target version (default 10.11).", + } + newoption { trigger = "with-tvos", value = "#", @@ -135,7 +134,7 @@ function toolchain(_buildDir, _libDir) newoption { trigger = "with-windows", value = "#", - description = "Set the Windows target platform version (default: 10.0.10240.0).", + description = "Set the Windows target platform version (default: $WindowsSDKVersion or 8.1).", } newoption { @@ -174,12 +173,17 @@ function toolchain(_buildDir, _libDir) iosPlatform = _OPTIONS["with-ios"] end + local macosPlatform = "" + if _OPTIONS["with-macos"] then + macosPlatform = _OPTIONS["with-macos"] + end + local tvosPlatform = "" if _OPTIONS["with-tvos"] then tvosPlatform = _OPTIONS["with-tvos"] end - local windowsPlatform = "10.0.10240.0" + local windowsPlatform = string.gsub(os.getenv("WindowsSDKVersion") or "8.1", "\\", "") if _OPTIONS["with-windows"] then windowsPlatform = _OPTIONS["with-windows"] end @@ -205,7 +209,7 @@ function toolchain(_buildDir, _libDir) if not os.getenv("ANDROID_NDK_ARM") or not os.getenv("ANDROID_NDK_CLANG") or not os.getenv("ANDROID_NDK_ROOT") then - print("Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT envrionment variables.") + print("Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT environment variables.") end premake.gcc.cc = "$(ANDROID_NDK_CLANG)/bin/clang" @@ -220,7 +224,7 @@ function toolchain(_buildDir, _libDir) if not os.getenv("ANDROID_NDK_MIPS") or not os.getenv("ANDROID_NDK_CLANG") or not os.getenv("ANDROID_NDK_ROOT") then - print("Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT envrionment variables.") + print("Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT environment variables.") end premake.gcc.cc = "$(ANDROID_NDK_CLANG)/bin/clang" @@ -233,7 +237,7 @@ function toolchain(_buildDir, _libDir) if not os.getenv("ANDROID_NDK_X86") or not os.getenv("ANDROID_NDK_CLANG") or not os.getenv("ANDROID_NDK_ROOT") then - print("Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT envrionment variables.") + print("Set ANDROID_NDK_CLANG, ANDROID_NDK_ARM, and ANDROID_NDK_ROOT environment variables.") end premake.gcc.cc = "$(ANDROID_NDK_CLANG)/bin/clang" @@ -244,7 +248,7 @@ function toolchain(_buildDir, _libDir) elseif "asmjs" == _OPTIONS["gcc"] then if not os.getenv("EMSCRIPTEN") then - print("Set EMSCRIPTEN enviroment variable.") + print("Set EMSCRIPTEN environment variable.") end premake.gcc.cc = "\"$(EMSCRIPTEN)/emcc\"" @@ -269,6 +273,12 @@ function toolchain(_buildDir, _libDir) premake.gcc.ar = "ar" location (path.join(_buildDir, "projects", _ACTION .. "-ios-simulator")) + elseif "ios-simulator64" == _OPTIONS["gcc"] then + premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" + premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" + premake.gcc.ar = "ar" + location (path.join(_buildDir, "projects", _ACTION .. "-ios-simulator64")) + elseif "tvos-arm64" == _OPTIONS["gcc"] then premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" @@ -316,7 +326,7 @@ function toolchain(_buildDir, _libDir) elseif "linux-steamlink" == _OPTIONS["gcc"] then if not os.getenv("MARVELL_SDK_PATH") then - print("Set MARVELL_SDK_PATH enviroment variable.") + print("Set MARVELL_SDK_PATH environment variable.") end premake.gcc.cc = "$(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-gcc" @@ -325,6 +335,10 @@ function toolchain(_buildDir, _libDir) location (path.join(_buildDir, "projects", _ACTION .. "-linux-steamlink")) elseif "mingw-gcc" == _OPTIONS["gcc"] then + if not os.getenv("MINGW") then + print("Set MINGW environment variable.") + end + local mingwToolchain = "x86_64-w64-mingw32" if compiler32bit then if os.is("linux") then @@ -347,42 +361,6 @@ function toolchain(_buildDir, _libDir) -- premake.gcc.llvm = true location (path.join(_buildDir, "projects", _ACTION .. "-mingw-clang")) - elseif "nacl" == _OPTIONS["gcc"] then - - if not os.getenv("NACL_SDK_ROOT") then - print("Set NACL_SDK_ROOT enviroment variable.") - end - - naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_x86_glibc/bin/x86_64-nacl-" - if os.is("macosx") then - naclToolchain = "$(NACL_SDK_ROOT)/toolchain/mac_x86_glibc/bin/x86_64-nacl-" - elseif os.is("linux") then - naclToolchain = "$(NACL_SDK_ROOT)/toolchain/linux_x86_glibc/bin/x86_64-nacl-" - end - - premake.gcc.cc = naclToolchain .. "gcc" - premake.gcc.cxx = naclToolchain .. "g++" - premake.gcc.ar = naclToolchain .. "ar" - location (path.join(_buildDir, "projects", _ACTION .. "-nacl")) - - elseif "nacl-arm" == _OPTIONS["gcc"] then - - if not os.getenv("NACL_SDK_ROOT") then - print("Set NACL_SDK_ROOT enviroment variable.") - end - - naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_arm_glibc/bin/arm-nacl-" - if os.is("macosx") then - naclToolchain = "$(NACL_SDK_ROOT)/toolchain/mac_arm_glibc/bin/arm-nacl-" - elseif os.is("linux") then - naclToolchain = "$(NACL_SDK_ROOT)/toolchain/linux_arm_glibc/bin/arm-nacl-" - end - - premake.gcc.cc = naclToolchain .. "gcc" - premake.gcc.cxx = naclToolchain .. "g++" - premake.gcc.ar = naclToolchain .. "ar" - location (path.join(_buildDir, "projects", _ACTION .. "-nacl-arm")) - elseif "netbsd" == _OPTIONS["gcc"] then location (path.join(_buildDir, "projects", _ACTION .. "-netbsd")) @@ -390,7 +368,7 @@ function toolchain(_buildDir, _libDir) if os.is("linux") then if not os.getenv("OSXCROSS") then - print("Set OSXCROSS enviroment variable.") + print("Set OSXCROSS environment variable.") end local osxToolchain = "x86_64-apple-darwin15-" @@ -400,28 +378,10 @@ function toolchain(_buildDir, _libDir) end location (path.join(_buildDir, "projects", _ACTION .. "-osx")) - elseif "pnacl" == _OPTIONS["gcc"] then - - if not os.getenv("NACL_SDK_ROOT") then - print("Set NACL_SDK_ROOT enviroment variable.") - end - - naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_pnacl/bin/pnacl-" - if os.is("macosx") then - naclToolchain = "$(NACL_SDK_ROOT)/toolchain/mac_pnacl/bin/pnacl-" - elseif os.is("linux") then - naclToolchain = "$(NACL_SDK_ROOT)/toolchain/linux_pnacl/bin/pnacl-" - end - - premake.gcc.cc = naclToolchain .. "clang" - premake.gcc.cxx = naclToolchain .. "clang++" - premake.gcc.ar = naclToolchain .. "ar" - location (path.join(_buildDir, "projects", _ACTION .. "-pnacl")) - elseif "orbis" == _OPTIONS["gcc"] then if not os.getenv("SCE_ORBIS_SDK_DIR") then - print("Set SCE_ORBIS_SDK_DIR enviroment variable.") + print("Set SCE_ORBIS_SDK_DIR environment variable.") end orbisToolchain = "$(SCE_ORBIS_SDK_DIR)/host_tools/bin/orbis-" @@ -431,17 +391,6 @@ function toolchain(_buildDir, _libDir) premake.gcc.ar = orbisToolchain .. "ar" location (path.join(_buildDir, "projects", _ACTION .. "-orbis")) - elseif "qnx-arm" == _OPTIONS["gcc"] then - - if not os.getenv("QNX_HOST") then - print("Set QNX_HOST enviroment variable.") - end - - premake.gcc.cc = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-gcc" - premake.gcc.cxx = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-g++" - premake.gcc.ar = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-ar" - location (path.join(_buildDir, "projects", _ACTION .. "-qnx-arm")) - elseif "rpi" == _OPTIONS["gcc"] then location (path.join(_buildDir, "projects", _ACTION .. "-rpi")) @@ -458,6 +407,10 @@ function toolchain(_buildDir, _libDir) or _ACTION == "vs2017" then + local action = premake.action.current() + action.vstudio.windowsTargetPlatformVersion = windowsPlatform + action.vstudio.windowsTargetPlatformMinVersion = windowsPlatform + if (_ACTION .. "-clang") == _OPTIONS["vs"] then if "vs2017-clang" == _OPTIONS["vs"] then premake.vstudio.toolset = "v141_clang_c2" @@ -468,32 +421,12 @@ function toolchain(_buildDir, _libDir) end location (path.join(_buildDir, "projects", _ACTION .. "-clang")) - elseif "winphone8" == _OPTIONS["vs"] then - premake.vstudio.toolset = "v110_wp80" - location (path.join(_buildDir, "projects", _ACTION .. "-winphone8")) - - elseif "winphone81" == _OPTIONS["vs"] then - premake.vstudio.toolset = "v120_wp81" - premake.vstudio.storeapp = "8.1" - platforms { "ARM" } - location (path.join(_buildDir, "projects", _ACTION .. "-winphone81")) - - elseif "winstore81" == _OPTIONS["vs"] then - premake.vstudio.toolset = "v120" - premake.vstudio.storeapp = "8.1" - platforms { "ARM" } - location (path.join(_buildDir, "projects", _ACTION .. "-winstore81")) - - elseif "winstore82" == _OPTIONS["vs"] then - premake.vstudio.toolset = "v140" - premake.vstudio.storeapp = "8.2" - - local action = premake.action.current() - action.vstudio.windowsTargetPlatformVersion = windowsPlatform - action.vstudio.windowsTargetPlatformMinVersion = windowsPlatform + elseif "winstore100" == _OPTIONS["vs"] then + premake.vstudio.toolset = "v141" + premake.vstudio.storeapp = "10.0" platforms { "ARM" } - location (path.join(_buildDir, "projects", _ACTION .. "-winstore82")) + location (path.join(_buildDir, "projects", _ACTION .. "-winstore100")) elseif "durango" == _OPTIONS["vs"] then if not os.getenv("DurangoXDK") then @@ -507,14 +440,12 @@ function toolchain(_buildDir, _libDir) elseif "orbis" == _OPTIONS["vs"] then if not os.getenv("SCE_ORBIS_SDK_DIR") then - print("Set SCE_ORBIS_SDK_DIR enviroment variable.") + print("Set SCE_ORBIS_SDK_DIR environment variable.") end platforms { "Orbis" } location (path.join(_buildDir, "projects", _ACTION .. "-orbis")) - end - elseif ("vs2012-xp") == _OPTIONS["vs"] then premake.vstudio.toolset = ("v110_xp") location (path.join(_buildDir, "projects", _ACTION .. "-xp")) @@ -531,17 +462,26 @@ function toolchain(_buildDir, _libDir) premake.vstudio.toolset = ("v141_xp") location (path.join(_buildDir, "projects", _ACTION .. "-xp")) + end + elseif _ACTION == "xcode4" then + local action = premake.action.current() + local str_or = function(str, def) + return #str > 0 and str or def + end if "osx" == _OPTIONS["xcode"] then + action.xcode.macOSTargetPlatformVersion = str_or(macosPlatform, "10.11") premake.xcode.toolset = "macosx" location (path.join(_buildDir, "projects", _ACTION .. "-osx")) elseif "ios" == _OPTIONS["xcode"] then + action.xcode.iOSTargetPlatformVersion = str_or(iosPlatform, "8.0") premake.xcode.toolset = "iphoneos" location (path.join(_buildDir, "projects", _ACTION .. "-ios")) elseif "tvos" == _OPTIONS["xcode"] then + action.xcode.tvOSTargetPlatformVersion = str_or(tvosPlatform, "9.0") premake.xcode.toolset = "appletvos" location (path.join(_buildDir, "projects", _ACTION .. "-tvos")) end @@ -601,7 +541,7 @@ function toolchain(_buildDir, _libDir) "EnableSSE2", } - configuration { "vs*", "not orbis" } + configuration { "vs*", "not orbis", "not NX32", "not NX64" } includedirs { path.join(bxDir, "include/compat/msvc") } defines { "WIN32", @@ -673,10 +613,16 @@ function toolchain(_buildDir, _libDir) targetdir (path.join(_buildDir, "win64_" .. _ACTION .. "-clang/bin")) objdir (path.join(_buildDir, "win64_" .. _ACTION .. "-clang/obj")) - configuration { "winphone8* or winstore8*" } + configuration { "winstore*" } removeflags { "StaticRuntime", - "NoExceptions", + "NoBufferSecurityCheck", + } + buildoptions { + "/wd4530", -- vccorlib.h(1345): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc + } + linkoptions { + "/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata } configuration { "*-gcc* or osx" } @@ -777,8 +723,16 @@ function toolchain(_buildDir, _libDir) configuration { "linux-gcc* or linux-clang*" } buildoptions { "-msse2", +-- "-Wdouble-promotion", +-- "-Wduplicated-branches", +-- "-Wduplicated-cond", +-- "-Wjump-misses-init", + "-Wlogical-op", + "-Wshadow", +-- "-Wnull-dereference", "-Wunused-value", "-Wundef", +-- "-Wuseless-cast", } buildoptions_cpp { "-std=c++11", @@ -1022,10 +976,14 @@ function toolchain(_buildDir, _libDir) libdirs { path.join(_libDir, "lib/asmjs") } buildoptions { "-i\"system$(EMSCRIPTEN)/system/include\"", + "-i\"system$(EMSCRIPTEN)/system/include/libcxx\"", "-i\"system$(EMSCRIPTEN)/system/include/libc\"", "-Wunused-value", "-Wundef", } + buildoptions_cpp { + "-std=c++11", + } configuration { "freebsd" } targetdir (path.join(_buildDir, "freebsd/bin")) @@ -1035,83 +993,6 @@ function toolchain(_buildDir, _libDir) path.join(bxDir, "include/compat/freebsd"), } - configuration { "nacl or nacl-arm or pnacl" } - buildoptions { - "-U__STRICT_ANSI__", -- strcasecmp, setenv, unsetenv,... - "-fno-stack-protector", - "-fdiagnostics-show-option", - "-fdata-sections", - "-ffunction-sections", - "-Wunused-value", - "-Wundef", - } - buildoptions_cpp { - "-std=c++11", - } - includedirs { - "$(NACL_SDK_ROOT)/include", - path.join(bxDir, "include/compat/nacl"), - } - - configuration { "nacl" } - buildoptions { - "-pthread", - "-mfpmath=sse", -- force SSE to get 32-bit and 64-bit builds deterministic. - "-msse2", - } - linkoptions { - "-Wl,--gc-sections", - } - - configuration { "x32", "nacl" } - targetdir (path.join(_buildDir, "nacl-x86/bin")) - objdir (path.join(_buildDir, "nacl-x86/obj")) - libdirs { path.join(_libDir, "lib/nacl-x86") } - linkoptions { "-melf32_nacl" } - - configuration { "x32", "nacl", "Debug" } - libdirs { "$(NACL_SDK_ROOT)/lib/glibc_x86_32/Debug" } - - configuration { "x32", "nacl", "Release" } - libdirs { "$(NACL_SDK_ROOT)/lib/glibc_x86_32/Release" } - - configuration { "x64", "nacl" } - targetdir (path.join(_buildDir, "nacl-x64/bin")) - objdir (path.join(_buildDir, "nacl-x64/obj")) - libdirs { path.join(_libDir, "lib/nacl-x64") } - linkoptions { "-melf64_nacl" } - - configuration { "x64", "nacl", "Debug" } - libdirs { "$(NACL_SDK_ROOT)/lib/glibc_x86_64/Debug" } - - configuration { "x64", "nacl", "Release" } - libdirs { "$(NACL_SDK_ROOT)/lib/glibc_x86_64/Release" } - - configuration { "nacl-arm" } - buildoptions { - "-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0 - } - targetdir (path.join(_buildDir, "nacl-arm/bin")) - objdir (path.join(_buildDir, "nacl-arm/obj")) - libdirs { path.join(_libDir, "lib/nacl-arm") } - - configuration { "nacl-arm", "Debug" } - libdirs { "$(NACL_SDK_ROOT)/lib/glibc_arm/Debug" } - - configuration { "nacl-arm", "Release" } - libdirs { "$(NACL_SDK_ROOT)/lib/glibc_arm/Release" } - - configuration { "pnacl" } - targetdir (path.join(_buildDir, "pnacl/bin")) - objdir (path.join(_buildDir, "pnacl/obj")) - libdirs { path.join(_libDir, "lib/pnacl") } - - configuration { "pnacl", "Debug" } - libdirs { "$(NACL_SDK_ROOT)/lib/pnacl/Debug" } - - configuration { "pnacl", "Release" } - libdirs { "$(NACL_SDK_ROOT)/lib/pnacl/Release" } - configuration { "xbox360" } targetdir (path.join(_buildDir, "xbox360/bin")) objdir (path.join(_buildDir, "xbox360/obj")) @@ -1163,6 +1044,9 @@ function toolchain(_buildDir, _libDir) buildoptions_cpp { "-std=c++11", } + buildoptions_objcpp { + "-std=c++11", + } buildoptions { "-Wfatal-errors", "-msse2", @@ -1178,6 +1062,9 @@ function toolchain(_buildDir, _libDir) buildoptions_cpp { "-std=c++11", } + buildoptions_objcpp { + "-std=c++11", + } buildoptions { "-Wfatal-errors", "-Wunused-value", @@ -1242,6 +1129,24 @@ function toolchain(_buildDir, _libDir) "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk", } + configuration { "ios-simulator64" } + targetdir (path.join(_buildDir, "ios-simulator64/bin")) + objdir (path.join(_buildDir, "ios-simulator64/obj")) + libdirs { path.join(_libDir, "lib/ios-simulator64") } + linkoptions { + "-mios-simulator-version-min=7.0", + "-arch x86_64", + "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk", + "-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk/usr/lib/system", + "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk/System/Library/Frameworks", + "-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk/System/Library/PrivateFrameworks", + } + buildoptions { + "-mios-simulator-version-min=7.0", + "-arch x86_64", + "--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator" ..iosPlatform .. ".sdk", + } + configuration { "tvos*" } linkoptions { "-lc++", @@ -1302,24 +1207,6 @@ function toolchain(_buildDir, _libDir) "$(SCE_ORBIS_SDK_DIR)/target/include", "$(SCE_ORBIS_SDK_DIR)/target/include_common", } - buildoptions { - } - buildoptions_cpp { - "-std=c++11", - } - linkoptions { - } - - configuration { "qnx-arm" } - targetdir (path.join(_buildDir, "qnx-arm/bin")) - objdir (path.join(_buildDir, "qnx-arm/obj")) - libdirs { path.join(_libDir, "lib/qnx-arm") } --- includedirs { path.join(bxDir, "include/compat/qnx") } - buildoptions { - "-Wno-psabi", -- note: the mangling of 'va_list' has changed in GCC 4.4.0 - "-Wunused-value", - "-Wundef", - } buildoptions_cpp { "-std=c++11", } @@ -1418,18 +1305,6 @@ function strip() "$(SILENT) $(MINGW)/bin/strip -s \"$(TARGET)\"" } - configuration { "pnacl" } - postbuildcommands { - "$(SILENT) echo Running pnacl-finalize.", - "$(SILENT) " .. naclToolchain .. "finalize \"$(TARGET)\"" - } - - configuration { "*nacl*", "Release" } - postbuildcommands { - "$(SILENT) echo Stripping symbols.", - "$(SILENT) " .. naclToolchain .. "strip -s \"$(TARGET)\"" - } - configuration { "asmjs" } postbuildcommands { "$(SILENT) echo Running asmjs finalize.", @@ -1441,7 +1316,8 @@ function strip() -- .. "-s USE_WEBGL2=1 " .. "--memory-init-file 1 " .. "\"$(TARGET)\" -o \"$(TARGET)\".html " --- .. "--preload-file ../../../examples/runtime@/" +-- .. "--preload-file ../../../examples/runtime@/ " + .. "-s PRECISE_F32=1" } configuration { "riscv" } diff --git a/3rdparty/bx/scripts/uncrustify.cfg b/3rdparty/bx/scripts/uncrustify.cfg deleted file mode 100644 index 009c44c..0000000 --- a/3rdparty/bx/scripts/uncrustify.cfg +++ /dev/null @@ -1,218 +0,0 @@ -tok_split_gte=false -utf8_byte=false -utf8_force=false -indent_cmt_with_tabs=false -indent_align_string=false -indent_braces=false -indent_braces_no_func=false -indent_braces_no_class=false -indent_braces_no_struct=false -indent_brace_parent=false -indent_namespace=true -indent_extern=false -indent_class=false -indent_class_colon=false -indent_else_if=false -indent_var_def_cont=false -indent_func_call_param=false -indent_func_def_param=false -indent_func_proto_param=false -indent_func_class_param=false -indent_func_ctor_var_param=false -indent_template_param=false -indent_func_param_double=false -indent_relative_single_line_comments=false -indent_col1_comment=false -indent_access_spec_body=false -indent_paren_nl=true -indent_comma_paren=true -indent_bool_paren=true -indent_first_bool_expr=false -indent_square_nl=false -indent_preserve_sql=false -indent_align_assign=true -sp_balance_nested_parens=false -align_keep_tabs=false -align_with_tabs=false -align_on_tabstop=false -align_number_left=true -align_func_params=false -align_same_func_call_params=false -align_var_def_colon=false -align_var_def_attribute=false -align_var_def_inline=false -align_right_cmt_mix=false -align_on_operator=false -align_mix_var_proto=false -align_single_line_func=false -align_single_line_brace=false -align_nl_cont=false -align_left_shift=true -align_oc_decl_colon=false -nl_collapse_empty_body=false -nl_assign_leave_one_liners=true -nl_class_leave_one_liners=false -nl_enum_leave_one_liners=false -nl_getset_leave_one_liners=false -nl_func_leave_one_liners=false -nl_if_leave_one_liners=false -nl_multi_line_cond=false -nl_multi_line_define=false -nl_before_case=true -nl_after_case=false -nl_after_return=false -nl_after_semicolon=false -nl_after_brace_open=false -nl_after_brace_open_cmt=false -nl_after_vbrace_open=false -nl_after_vbrace_open_empty=false -nl_after_brace_close=false -nl_after_vbrace_close=false -nl_define_macro=false -nl_squeeze_ifdef=false -nl_ds_struct_enum_cmt=false -nl_ds_struct_enum_close_brace=false -nl_create_if_one_liner=false -nl_create_for_one_liner=false -nl_create_while_one_liner=false -ls_for_split_full=false -ls_func_split_full=false -nl_after_multiline_comment=false -eat_blanks_after_open_brace=true -eat_blanks_before_close_brace=true -mod_full_brace_if_chain=false -mod_pawn_semicolon=false -mod_full_paren_if_bool=false -mod_remove_extra_semicolon=true -mod_sort_import=false -mod_sort_using=false -mod_sort_include=false -mod_move_case_break=false -mod_remove_empty_return=true -cmt_indent_multi=false -cmt_c_group=false -cmt_c_nl_start=false -cmt_c_nl_end=false -cmt_cpp_group=false -cmt_cpp_nl_start=false -cmt_cpp_nl_end=false -cmt_cpp_to_c=false -cmt_star_cont=false -cmt_multi_check_last=false -cmt_insert_before_preproc=false -pp_indent_at_level=false -pp_region_indent_code=false -pp_if_indent_code=false -pp_define_at_level=false -indent_paren_close=1 -align_struct_init_span=1 -align_pp_define_span=1 -nl_end_of_file_min=1 -nl_max=2 -mod_add_long_ifdef_endif_comment=1 -pp_space_count=3 -newlines=auto -indent_with_tabs=1 -sp_arith=force -sp_assign=force -sp_enum_assign=force -sp_bool=force -sp_compare=force -sp_inside_paren=remove -sp_paren_paren=force -sp_before_ptr_star=remove -sp_before_unnamed_ptr_star=remove -sp_between_ptr_star=remove -sp_after_ptr_star=force -sp_after_ptr_star_func=force -sp_before_ptr_star_func=remove -sp_before_byref=remove -sp_before_unnamed_byref=remove -sp_after_byref=force -sp_after_type=force -sp_template_angle=remove -sp_angle_shift=add -sp_before_sparen=force -sp_inside_sparen=remove -sp_after_sparen=force -sp_special_semi=remove -sp_before_semi=remove -sp_after_semi_for=force -sp_after_semi_for_empty=remove -sp_before_square=remove -sp_before_squares=remove -sp_after_comma=force -sp_before_comma=remove -sp_before_ellipsis=force -sp_after_class_colon=force -sp_before_class_colon=force -sp_before_case_colon=remove -sp_after_operator=remove -sp_after_operator_sym=remove -sp_cpp_cast_paren=remove -sp_sizeof_paren=remove -sp_inside_braces_enum=force -sp_inside_braces_struct=force -sp_inside_braces_empty=remove -sp_type_func=force -sp_func_proto_paren=remove -sp_func_def_paren=remove -sp_inside_fparens=remove -sp_inside_fparen=remove -sp_square_fparen=remove -sp_fparen_brace=force -sp_func_call_paren=remove -sp_func_call_paren_empty=remove -sp_func_call_user_paren=remove -sp_func_class_paren=remove -sp_return_paren=force -sp_attribute_paren=remove -sp_defined_paren=remove -sp_macro=force -sp_macro_func=force -sp_not=remove -sp_inv=remove -sp_addr=remove -sp_member=remove -sp_deref=remove -sp_sign=remove -sp_incdec=remove -sp_before_nl_cont=force -sp_cond_colon=force -sp_cond_question=force -sp_case_label=force -sp_endif_cmt=force -sp_after_new=force -nl_end_of_file=force -nl_assign_brace=force -nl_fcall_brace=force -nl_enum_brace=force -nl_struct_brace=force -nl_union_brace=force -nl_if_brace=force -nl_brace_else=force -nl_elseif_brace=force -nl_else_brace=force -nl_else_if=remove -nl_for_brace=force -nl_while_brace=force -nl_brace_brace=force -nl_do_brace=force -nl_brace_while=force -nl_switch_brace=force -nl_namespace_brace=force -nl_fdef_brace=force -nl_after_if=add -nl_after_for=add -nl_after_while=add -nl_after_switch=add -nl_after_do=add -pos_bool=lead_force -mod_full_brace_do=force -mod_full_brace_for=force -mod_full_brace_function=force -mod_full_brace_if=force -mod_full_brace_while=force -mod_paren_on_return=remove -pp_indent=remove -pp_space=add diff --git a/3rdparty/bx/src/allocator.cpp b/3rdparty/bx/src/allocator.cpp new file mode 100644 index 0000000..c26677e --- /dev/null +++ b/3rdparty/bx/src/allocator.cpp @@ -0,0 +1,75 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "bx_p.h" +#include + +#include + +#ifndef BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT +# define BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT 8 +#endif // BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT + +namespace bx +{ + DefaultAllocator::DefaultAllocator() + { + } + + DefaultAllocator::~DefaultAllocator() + { + } + + void* DefaultAllocator::realloc(void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line) + { + if (0 == _size) + { + if (NULL != _ptr) + { + if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align) + { + ::free(_ptr); + return NULL; + } + +# if BX_COMPILER_MSVC + BX_UNUSED(_file, _line); + _aligned_free(_ptr); +# else + bx::alignedFree(this, _ptr, _align, _file, _line); +# endif // BX_ + } + + return NULL; + } + else if (NULL == _ptr) + { + if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align) + { + return ::malloc(_size); + } + +# if BX_COMPILER_MSVC + BX_UNUSED(_file, _line); + return _aligned_malloc(_size, _align); +# else + return bx::alignedAlloc(this, _size, _align, _file, _line); +# endif // BX_ + } + + if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align) + { + return ::realloc(_ptr, _size); + } + +# if BX_COMPILER_MSVC + BX_UNUSED(_file, _line); + return _aligned_realloc(_ptr, _size, _align); +# else + return bx::alignedRealloc(this, _ptr, _size, _align, _file, _line); +# endif // BX_ + } + +} // namespace bx diff --git a/3rdparty/bx/src/amalgamated.cpp b/3rdparty/bx/src/amalgamated.cpp index 1aeb2bb..d3f896b 100644 --- a/3rdparty/bx/src/amalgamated.cpp +++ b/3rdparty/bx/src/amalgamated.cpp @@ -1,19 +1,26 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "allocator.cpp" #include "bx.cpp" #include "commandline.cpp" -#include "crtimpl.cpp" #include "crtnone.cpp" #include "debug.cpp" #include "dtoa.cpp" -#include "fpumath.cpp" +#include "easing.cpp" +#include "file.cpp" +#include "filepath.cpp" +#include "hash.cpp" +#include "math.cpp" #include "mutex.cpp" #include "os.cpp" +#include "process.cpp" #include "semaphore.cpp" +#include "settings.cpp" #include "sort.cpp" #include "string.cpp" #include "thread.cpp" #include "timer.cpp" +#include "url.cpp" diff --git a/3rdparty/bx/src/bx.cpp b/3rdparty/bx/src/bx.cpp index 8a063c5..16868df 100644 --- a/3rdparty/bx/src/bx.cpp +++ b/3rdparty/bx/src/bx.cpp @@ -1,8 +1,9 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include diff --git a/3rdparty/bx/src/bx_p.h b/3rdparty/bx/src/bx_p.h new file mode 100644 index 0000000..7c38557 --- /dev/null +++ b/3rdparty/bx/src/bx_p.h @@ -0,0 +1,44 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_P_H_HEADER_GUARD +#define BX_P_H_HEADER_GUARD + +#ifndef BX_CONFIG_DEBUG +# define BX_CONFIG_DEBUG 0 +#endif // BX_CONFIG_DEBUG + +#if BX_CONFIG_DEBUG +# define BX_TRACE _BX_TRACE +# define BX_WARN _BX_WARN +# define BX_CHECK _BX_CHECK +# define BX_CONFIG_ALLOCATOR_DEBUG 1 +#endif // BX_CONFIG_DEBUG + +#define _BX_TRACE(_format, ...) \ + BX_MACRO_BLOCK_BEGIN \ + bx::debugPrintf(__FILE__ "(" BX_STRINGIZE(__LINE__) "): BX " _format "\n", ##__VA_ARGS__); \ + BX_MACRO_BLOCK_END + +#define _BX_WARN(_condition, _format, ...) \ + BX_MACRO_BLOCK_BEGIN \ + if (!BX_IGNORE_C4127(_condition) ) \ + { \ + BX_TRACE("WARN " _format, ##__VA_ARGS__); \ + } \ + BX_MACRO_BLOCK_END + +#define _BX_CHECK(_condition, _format, ...) \ + BX_MACRO_BLOCK_BEGIN \ + if (!BX_IGNORE_C4127(_condition) ) \ + { \ + BX_TRACE("CHECK " _format, ##__VA_ARGS__); \ + bx::debugBreak(); \ + } \ + BX_MACRO_BLOCK_END + +#include + +#endif // BX_P_H_HEADER_GUARD diff --git a/3rdparty/bx/src/commandline.cpp b/3rdparty/bx/src/commandline.cpp index 6ec2aad..752b8c1 100644 --- a/3rdparty/bx/src/commandline.cpp +++ b/3rdparty/bx/src/commandline.cpp @@ -1,8 +1,9 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include @@ -197,7 +198,7 @@ namespace bx const char* arg = findOption(_short, _long, 1); if (NULL != arg) { - _value = atoi(arg); + fromString(&_value, arg); return true; } @@ -209,7 +210,7 @@ namespace bx const char* arg = findOption(_short, _long, 1); if (NULL != arg) { - _value = atoi(arg); + fromString(&_value, arg); return true; } @@ -221,7 +222,7 @@ namespace bx const char* arg = findOption(_short, _long, 1); if (NULL != arg) { - _value = float(atof(arg)); + fromString(&_value, arg); return true; } @@ -233,7 +234,7 @@ namespace bx const char* arg = findOption(_short, _long, 1); if (NULL != arg) { - _value = atof(arg); + fromString(&_value, arg); return true; } @@ -245,11 +246,11 @@ namespace bx const char* arg = findOption(_short, _long, 1); if (NULL != arg) { - if ('0' == *arg || (0 == strincmp(arg, "false") ) ) + if ('0' == *arg || (0 == strCmpI(arg, "false") ) ) { _value = false; } - else if ('0' != *arg || (0 == strincmp(arg, "true") ) ) + else if ('0' != *arg || (0 == strCmpI(arg, "true") ) ) { _value = true; } @@ -262,7 +263,7 @@ namespace bx const char* CommandLine::find(int32_t _skip, const char _short, const char* _long, int32_t _numParams) const { - for (int32_t ii = 0; ii < m_argc; ++ii) + for (int32_t ii = 0; ii < m_argc && 0 != strCmp(m_argv[ii], "--"); ++ii) { const char* arg = m_argv[ii]; if ('-' == *arg) @@ -270,7 +271,7 @@ namespace bx ++arg; if (_short == *arg) { - if (1 == strnlen(arg) ) + if (1 == strLen(arg) ) { if (0 == _skip) { @@ -293,7 +294,7 @@ namespace bx } else if (NULL != _long && '-' == *arg - && 0 == strincmp(arg+1, _long) ) + && 0 == strCmpI(arg+1, _long) ) { if (0 == _skip) { @@ -319,4 +320,14 @@ namespace bx return NULL; } + int32_t CommandLine::getNum() const + { + return m_argc; + } + + char const* CommandLine::get(int32_t _idx) const + { + return m_argv[_idx]; + } + } // namespace bx diff --git a/3rdparty/bx/src/crtimpl.cpp b/3rdparty/bx/src/crtimpl.cpp deleted file mode 100644 index 064b9f6..0000000 --- a/3rdparty/bx/src/crtimpl.cpp +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include -#include - -#if BX_CONFIG_ALLOCATOR_CRT -# include -#endif // BX_CONFIG_ALLOCATOR_CRT - -namespace bx -{ -#if BX_CONFIG_ALLOCATOR_CRT - CrtAllocator::CrtAllocator() - { - } - - CrtAllocator::~CrtAllocator() - { - } - - void* CrtAllocator::realloc(void* _ptr, size_t _size, size_t _align, const char* _file, uint32_t _line) - { - if (0 == _size) - { - if (NULL != _ptr) - { - if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align) - { - ::free(_ptr); - return NULL; - } - -# if BX_COMPILER_MSVC - BX_UNUSED(_file, _line); - _aligned_free(_ptr); -# else - bx::alignedFree(this, _ptr, _align, _file, _line); -# endif // BX_ - } - - return NULL; - } - else if (NULL == _ptr) - { - if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align) - { - return ::malloc(_size); - } - -# if BX_COMPILER_MSVC - BX_UNUSED(_file, _line); - return _aligned_malloc(_size, _align); -# else - return bx::alignedAlloc(this, _size, _align, _file, _line); -# endif // BX_ - } - - if (BX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT >= _align) - { - return ::realloc(_ptr, _size); - } - -# if BX_COMPILER_MSVC - BX_UNUSED(_file, _line); - return _aligned_realloc(_ptr, _size, _align); -# else - return bx::alignedRealloc(this, _ptr, _size, _align, _file, _line); -# endif // BX_ - } -#endif // BX_CONFIG_ALLOCATOR_CRT - -#if BX_CONFIG_CRT_FILE_READER_WRITER - -# if BX_CRT_MSVC -# define fseeko64 _fseeki64 -# define ftello64 _ftelli64 -# elif 0 \ - || BX_PLATFORM_ANDROID \ - || BX_PLATFORM_BSD \ - || BX_PLATFORM_IOS \ - || BX_PLATFORM_OSX \ - || BX_PLATFORM_QNX -# define fseeko64 fseeko -# define ftello64 ftello -# elif BX_PLATFORM_PS4 -# define fseeko64 fseek -# define ftello64 ftell -# endif // BX_ - - CrtFileReader::CrtFileReader() - : m_file(NULL) - { - } - - CrtFileReader::~CrtFileReader() - { - } - - bool CrtFileReader::open(const char* _filePath, Error* _err) - { - BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); - - if (NULL != m_file) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_ALREADY_OPEN, "CrtFileReader: File is already open."); - return false; - } - - m_file = fopen(_filePath, "rb"); - if (NULL == m_file) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "CrtFileReader: Failed to open file."); - return false; - } - - return true; - } - - void CrtFileReader::close() - { - BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); - FILE* file = (FILE*)m_file; - fclose(file); - m_file = NULL; - } - - int64_t CrtFileReader::seek(int64_t _offset, Whence::Enum _whence) - { - BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); - FILE* file = (FILE*)m_file; - fseeko64(file, _offset, _whence); - return ftello64(file); - } - - int32_t CrtFileReader::read(void* _data, int32_t _size, Error* _err) - { - BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); - BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); - - FILE* file = (FILE*)m_file; - int32_t size = (int32_t)fread(_data, 1, _size, file); - if (size != _size) - { - if (0 != feof(file) ) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_EOF, "CrtFileReader: EOF."); - } - else if (0 != ferror(file) ) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_READ, "CrtFileReader: read error."); - } - - return size >= 0 ? size : 0; - } - - return size; - } - - CrtFileWriter::CrtFileWriter() - : m_file(NULL) - { - } - - CrtFileWriter::~CrtFileWriter() - { - } - - bool CrtFileWriter::open(const char* _filePath, bool _append, Error* _err) - { - BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); - - if (NULL != m_file) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_ALREADY_OPEN, "CrtFileReader: File is already open."); - return false; - } - - m_file = fopen(_filePath, _append ? "ab" : "wb"); - - if (NULL == m_file) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "CrtFileWriter: Failed to open file."); - return false; - } - - return true; - } - - void CrtFileWriter::close() - { - BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); - FILE* file = (FILE*)m_file; - fclose(file); - m_file = NULL; - } - - int64_t CrtFileWriter::seek(int64_t _offset, Whence::Enum _whence) - { - BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); - FILE* file = (FILE*)m_file; - fseeko64(file, _offset, _whence); - return ftello64(file); - } - - int32_t CrtFileWriter::write(const void* _data, int32_t _size, Error* _err) - { - BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); - BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); - - FILE* file = (FILE*)m_file; - int32_t size = (int32_t)fwrite(_data, 1, _size, file); - if (size != _size) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_WRITE, "CrtFileWriter: write failed."); - return size >= 0 ? size : 0; - } - - return size; - } -#endif // BX_CONFIG_CRT_FILE_READER_WRITER - -#if BX_CONFIG_CRT_PROCESS - -#if BX_CRT_MSVC -# define popen _popen -# define pclose _pclose -#endif // BX_CRT_MSVC - - ProcessReader::ProcessReader() - : m_file(NULL) - { - } - - ProcessReader::~ProcessReader() - { - BX_CHECK(NULL == m_file, "Process not closed!"); - } - - bool ProcessReader::open(const char* _command, Error* _err) - { - BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); - - if (NULL != m_file) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_ALREADY_OPEN, "ProcessReader: File is already open."); - return false; - } - - m_file = popen(_command, "r"); - if (NULL == m_file) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "ProcessReader: Failed to open process."); - return false; - } - - return true; - } - - void ProcessReader::close() - { - BX_CHECK(NULL != m_file, "Process not open!"); - FILE* file = (FILE*)m_file; - m_exitCode = pclose(file); - m_file = NULL; - } - - int32_t ProcessReader::read(void* _data, int32_t _size, Error* _err) - { - BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); BX_UNUSED(_err); - - FILE* file = (FILE*)m_file; - int32_t size = (int32_t)fread(_data, 1, _size, file); - if (size != _size) - { - if (0 != feof(file) ) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_EOF, "ProcessReader: EOF."); - } - else if (0 != ferror(file) ) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_READ, "ProcessReader: read error."); - } - - return size >= 0 ? size : 0; - } - - return size; - } - - int32_t ProcessReader::getExitCode() const - { - return m_exitCode; - } - - ProcessWriter::ProcessWriter() - : m_file(NULL) - { - } - - ProcessWriter::~ProcessWriter() - { - BX_CHECK(NULL == m_file, "Process not closed!"); - } - - bool ProcessWriter::open(const char* _command, bool, Error* _err) - { - BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); - - if (NULL != m_file) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_ALREADY_OPEN, "ProcessWriter: File is already open."); - return false; - } - - m_file = popen(_command, "w"); - if (NULL == m_file) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "ProcessWriter: Failed to open process."); - return false; - } - - return true; - } - - void ProcessWriter::close() - { - BX_CHECK(NULL != m_file, "Process not open!"); - FILE* file = (FILE*)m_file; - m_exitCode = pclose(file); - m_file = NULL; - } - - int32_t ProcessWriter::write(const void* _data, int32_t _size, Error* _err) - { - BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); BX_UNUSED(_err); - - FILE* file = (FILE*)m_file; - int32_t size = (int32_t)fwrite(_data, 1, _size, file); - if (size != _size) - { - if (0 != ferror(file) ) - { - BX_ERROR_SET(_err, BX_ERROR_READERWRITER_WRITE, "ProcessWriter: write error."); - } - - return size >= 0 ? size : 0; - } - - return size; - } - - int32_t ProcessWriter::getExitCode() const - { - return m_exitCode; - } -#endif // BX_CONFIG_CRT_PROCESS - -} // namespace bx diff --git a/3rdparty/bx/src/crtnone.cpp b/3rdparty/bx/src/crtnone.cpp index 0e88551..e482242 100644 --- a/3rdparty/bx/src/crtnone.cpp +++ b/3rdparty/bx/src/crtnone.cpp @@ -1,9 +1,11 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include +#include #include #include @@ -39,50 +41,50 @@ extern "C" int32_t memcmp(const void* _lhs, const void* _rhs, size_t _numBytes) extern "C" size_t strlen(const char* _str) { - return bx::strnlen(_str); + return bx::strLen(_str); } extern "C" size_t strnlen(const char* _str, size_t _max) { - return bx::strnlen(_str, _max); + return bx::strLen(_str, _max); } extern "C" void* strcpy(char* _dst, const char* _src) { - bx::strlncpy(_dst, INT32_MAX, _src, INT32_MAX); + bx::strCopy(_dst, INT32_MAX, _src, INT32_MAX); return _dst; } extern "C" void* strncpy(char* _dst, const char* _src, size_t _num) { - bx::strlncpy(_dst, INT32_MAX, _src, _num); + bx::strCopy(_dst, INT32_MAX, _src, _num); return _dst; } extern "C" char* strcat(char* _dst, const char* _src) { - bx::strlncat(_dst, INT32_MAX, _src, INT32_MAX); + bx::strCat(_dst, INT32_MAX, _src, INT32_MAX); return _dst; } extern "C" const char* strchr(const char* _str, int _ch) { - return bx::strnchr(_str, _ch); + return bx::strFind(_str, _ch); } extern "C" int32_t strcmp(const char* _lhs, const char* _rhs) { - return bx::strncmp(_lhs, _rhs); + return bx::strCmp(_lhs, _rhs); } extern "C" int32_t strncmp(const char* _lhs, const char* _rhs, size_t _max) { - return bx::strncmp(_lhs, _rhs, _max); + return bx::strCmp(_lhs, _rhs, _max); } extern "C" const char* strstr(const char* _str, const char* _find) { - return bx::strnstr(_str, _find); + return bx::strFind(_str, _find); } extern "C" void qsort(void* _base, size_t _num, size_t _size, bx::ComparisonFn _fn) @@ -124,32 +126,29 @@ extern "C" int abs(int _value) return _value >= 0 ? _value : -_value; } -extern "C" float fabsf(float _value) +extern "C" float fabsf(float _x) { - return _value >= 0.0f ? _value : -_value; + return bx::abs(_x); } -extern "C" double fabs(double _value) +extern "C" double fabs(double _x) { - return _value >= 0.0 ? _value : -_value; + return bx::abs(_x); } extern "C" double ldexp(double _x, int _exp) { - BX_UNUSED(_x, _exp); - return 0.0; + return ldexp(float(_x), _exp); } extern "C" float expf(float _x) { - BX_UNUSED(_x); - return 0.0f; + return bx::exp(_x); } extern "C" float logf(float _x) { - BX_UNUSED(_x); - return 0.0f; + return bx::log(_x); } extern "C" float log10f(float _x) @@ -158,100 +157,88 @@ extern "C" float log10f(float _x) return 0.0f; } -extern "C" float powf(float _x) +extern "C" float powf(float _x, float _y) { - BX_UNUSED(_x); - return 0.0f; + return bx::pow(_x, _y); } -extern "C" double pow(double _x) +extern "C" double pow(double _x, float _y) { - BX_UNUSED(_x); - return 0.0; + return bx::pow(_x, _y); } extern "C" float sinf(float _x) { - BX_UNUSED(_x); - return 0.0f; + return bx::sin(_x); } extern "C" float cosf(float _x) { - BX_UNUSED(_x); - return 0.0f; + return bx::cos(_x); } extern "C" float tanf(float _x) { - BX_UNUSED(_x); - return 0.0f; + return bx::tan(_x); } extern "C" float atan2f(float _y, float _x) { - BX_UNUSED(_y, _x); - return 0.0f; + return bx::atan2(_y, _x); } extern "C" float sqrtf(float _x) { - BX_UNUSED(_x); - return 0.0f; + return bx::sqrt(_x); } extern "C" double sqrt(double _x) { - BX_UNUSED(_x); - return 0.0; + return bx::sqrt(_x); } extern "C" float ceilf(float _x) { - BX_UNUSED(_x); - return 0.0f; + return bx::ceil(_x); } extern "C" double ceil(double _x) { - BX_UNUSED(_x); - return 0.0; + return bx::ceil(_x); } extern "C" float floorf(float _x) { - BX_UNUSED(_x); - return 0.0f; + return bx::floor(_x); } extern "C" double floor(double _x) { - BX_UNUSED(_x); - return 0.0; + return bx::floor(_x); } extern "C" float acosf(float _x) { - BX_UNUSED(_x); - return 0.0f; + return bx::acos(_x); } extern "C" float fmodf(float _numer, float _denom) { - BX_UNUSED(_numer, _denom); - return 0.0f; + return bx::mod(_numer, _denom); } extern "C" int atoi(const char* _str) { - BX_UNUSED(_str); - return 0; + int32_t result = 0; + bx::fromString(&result, _str); + return result; } extern "C" double atof(const char* _str) { - BX_UNUSED(_str); - return 0.0; + double result = 0.0; + bx::fromString(&result, _str); + return result; } extern "C" struct DIR* opendir(const char* dirname) @@ -301,6 +288,10 @@ extern "C" int printf(const char* _format, ...) return -1; } +struct FILE +{ +}; + extern "C" int fprintf(FILE* _stream, const char* _format, ...) { BX_UNUSED(_stream, _format); diff --git a/3rdparty/bx/src/debug.cpp b/3rdparty/bx/src/debug.cpp index 5e52be8..f4ba187 100644 --- a/3rdparty/bx/src/debug.cpp +++ b/3rdparty/bx/src/debug.cpp @@ -1,15 +1,19 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include -#include // isPrint -#include // PRIx* +#include // isPrint +#include // WriterI +#include // PRIx* #if BX_PLATFORM_ANDROID # include -#elif BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT || BX_PLATFORM_XBOX360 || BX_PLATFORM_XBOXONE +#elif BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_WINRT \ + || BX_PLATFORM_XBOXONE extern "C" __declspec(dllimport) void __stdcall OutputDebugStringA(const char* _str); #elif BX_PLATFORM_IOS || BX_PLATFORM_OSX # if defined(__OBJC__) @@ -33,7 +37,7 @@ namespace bx #elif BX_CPU_ARM __builtin_trap(); // asm("bkpt 0"); -#elif !BX_PLATFORM_NACL && BX_CPU_X86 && (BX_COMPILER_GCC || BX_COMPILER_CLANG) +#elif BX_CPU_X86 && (BX_COMPILER_GCC || BX_COMPILER_CLANG) // NaCl doesn't like int 3: // NativeClient: NaCl module load failed: Validation failure. File violates Native Client safety rules. __asm__ ("int $3"); @@ -50,7 +54,9 @@ namespace bx # define BX_ANDROID_LOG_TAG "" # endif // BX_ANDROID_LOG_TAG __android_log_write(ANDROID_LOG_DEBUG, BX_ANDROID_LOG_TAG, _out); -#elif BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT || BX_PLATFORM_XBOX360 || BX_PLATFORM_XBOXONE +#elif BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_WINRT \ + || BX_PLATFORM_XBOXONE OutputDebugStringA(_out); #elif BX_PLATFORM_IOS || BX_PLATFORM_OSX # if defined(__OBJC__) @@ -125,7 +131,7 @@ namespace bx ascii[asciiPos] = '\0'; debugPrintf("\t" DBG_ADDRESS "\t" HEX_DUMP_FORMAT "\t%s\n", data, hex, ascii); data += asciiPos; - hexPos = 0; + hexPos = 0; asciiPos = 0; } } @@ -142,4 +148,34 @@ namespace bx #undef HEX_DUMP_FORMAT } + class DebugWriter : public WriterI + { + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override + { + BX_UNUSED(_err); + + int32_t total = 0; + const char* data = (const char*)_data; + + char temp[4096]; + while (total != _size) + { + uint32_t len = bx::uint32_min(sizeof(temp)-1, _size-total); + memCopy(temp, data, len); + temp[len] = '\0'; + data += len; + total += len; + debugOutput(temp); + } + + return total; + } + }; + + WriterI* getDebugOut() + { + static DebugWriter s_debugOut; + return &s_debugOut; + } + } // namespace bx diff --git a/3rdparty/bx/src/dtoa.cpp b/3rdparty/bx/src/dtoa.cpp index 98640ed..d914938 100644 --- a/3rdparty/bx/src/dtoa.cpp +++ b/3rdparty/bx/src/dtoa.cpp @@ -1,10 +1,11 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include -#include +#include #include #include @@ -12,28 +13,31 @@ namespace bx { - // https://github.com/miloyip/dtoa-benchmark - // - // Copyright (C) 2014 Milo Yip - // - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to deal - // in the Software without restriction, including without limitation the rights - // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - // copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - // - // The above copyright notice and this permission notice shall be included in - // all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - // THE SOFTWARE. - // + /* + * https://github.com/miloyip/dtoa-benchmark + * + * Copyright (C) 2014 Milo Yip + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + */ + struct DiyFp { DiyFp() @@ -77,7 +81,7 @@ namespace bx DiyFp operator*(const DiyFp& rhs) const { - const uint64_t M32 = 0xFFFFFFFF; + const uint64_t M32 = UINT32_MAX; const uint64_t a = f >> 32; const uint64_t b = f & M32; const uint64_t c = rhs.f >> 32; @@ -105,23 +109,23 @@ namespace bx void NormalizedBoundaries(DiyFp* minus, DiyFp* plus) const { - DiyFp pl = DiyFp((f << 1) + 1, e - 1).NormalizeBoundary(); - DiyFp mi = (f == kDpHiddenBit) ? DiyFp((f << 2) - 1, e - 2) : DiyFp((f << 1) - 1, e - 1); + DiyFp pl = DiyFp( (f << 1) + 1, e - 1).NormalizeBoundary(); + DiyFp mi = (f == kDpHiddenBit) ? DiyFp( (f << 2) - 1, e - 2) : DiyFp( (f << 1) - 1, e - 1); mi.f <<= mi.e - pl.e; mi.e = pl.e; *plus = pl; *minus = mi; } -#define UINT64_C2(h, l) ((static_cast(h) << 32) | static_cast(l)) +#define UINT64_C2(h, l) ( (static_cast(h) << 32) | static_cast(l) ) - static const int32_t kDiySignificandSize = 64; - static const int32_t kDpSignificandSize = 52; - static const int32_t kDpExponentBias = 0x3FF + kDpSignificandSize; - static const int32_t kDpMinExponent = -kDpExponentBias; - static const uint64_t kDpExponentMask = UINT64_C2(0x7FF00000, 0x00000000); - static const uint64_t kDpSignificandMask = UINT64_C2(0x000FFFFF, 0xFFFFFFFF); - static const uint64_t kDpHiddenBit = UINT64_C2(0x00100000, 0x00000000); + static const int32_t kDiySignificandSize = 64; + static const int32_t kDpSignificandSize = 52; + static const int32_t kDpExponentBias = 0x3FF + kDpSignificandSize; + static const int32_t kDpMinExponent = -kDpExponentBias; + static const uint64_t kDpExponentMask = UINT64_C2(0x7FF00000, 0x00000000); + static const uint64_t kDpSignificandMask = UINT64_C2(0x000FFFFF, 0xFFFFFFFF); + static const uint64_t kDpHiddenBit = UINT64_C2(0x00100000, 0x00000000); uint64_t f; int32_t e; @@ -217,10 +221,10 @@ namespace bx k++; } - uint32_t index = static_cast((k >> 3) + 1); - *K = -(-348 + static_cast(index << 3)); // decimal exponent no need lookup table + uint32_t index = static_cast( (k >> 3) + 1); + *K = -(-348 + static_cast(index << 3) ); // decimal exponent no need lookup table - BX_CHECK(index < sizeof(s_kCachedPowers_F) / sizeof(s_kCachedPowers_F[0])); + BX_CHECK(index < sizeof(s_kCachedPowers_F) / sizeof(s_kCachedPowers_F[0]), ""); return DiyFp(s_kCachedPowers_F[index], s_kCachedPowers_E[index]); } @@ -228,7 +232,7 @@ namespace bx { while (rest < wp_w && delta - rest >= ten_kappa - && (rest + ten_kappa < wp_w || wp_w - rest > rest + ten_kappa - wp_w)) + && (rest + ten_kappa < wp_w || wp_w - rest > rest + ten_kappa - wp_w) ) { buffer[len - 1]--; rest += ten_kappa; @@ -256,7 +260,7 @@ namespace bx const DiyFp wp_w = Mp - W; uint32_t p1 = static_cast(Mp.f >> -one.e); uint64_t p2 = Mp.f & (one.f - 1); - int32_t kappa = static_cast(CountDecimalDigit32(p1)); + int32_t kappa = static_cast(CountDecimalDigit32(p1) ); *len = 0; while (kappa > 0) @@ -436,17 +440,17 @@ namespace bx if (isNan(_value) ) { - return (int32_t)strlncpy(_dst, _max, "nan") + sign; + return (int32_t)strCopy(_dst, _max, "nan") + sign; } else if (isInfinite(_value) ) { - return (int32_t)strlncpy(_dst, _max, "inf") + sign; + return (int32_t)strCopy(_dst, _max, "inf") + sign; } int32_t len; if (0.0 == _value) { - len = (int32_t)strlncpy(_dst, _max, "0.0"); + len = (int32_t)strCopy(_dst, _max, "0.0"); } else { @@ -557,4 +561,584 @@ namespace bx return toStringUnsigned(_dst, _max, _value, _base); } + /* + * https://github.com/grzegorz-kraszewski/stringtofloat/ + * + * MIT License + * + * Copyright (c) 2016 Grzegorz Kraszewski + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + /* + * IMPORTANT + * + * The code works in "round towards zero" mode. This is different from + * GCC standard library strtod(), which uses "round half to even" rule. + * Therefore it cannot be used as a direct drop-in replacement, as in + * some cases results will be different on the least significant bit of + * mantissa. Read more in the README.md file. + */ + +#define DIGITS 18 + +#define DOUBLE_PLUS_ZERO UINT64_C(0x0000000000000000) +#define DOUBLE_MINUS_ZERO UINT64_C(0x8000000000000000) +#define DOUBLE_PLUS_INFINITY UINT64_C(0x7ff0000000000000) +#define DOUBLE_MINUS_INFINITY UINT64_C(0xfff0000000000000) + + union HexDouble + { + double d; + uint64_t u; + }; + +#define lsr96(s2, s1, s0, d2, d1, d0) \ + d0 = ( (s0) >> 1) | ( ( (s1) & 1) << 31); \ + d1 = ( (s1) >> 1) | ( ( (s2) & 1) << 31); \ + d2 = (s2) >> 1; + +#define lsl96(s2, s1, s0, d2, d1, d0) \ + d2 = ( (s2) << 1) | ( ( (s1) & (1 << 31) ) >> 31); \ + d1 = ( (s1) << 1) | ( ( (s0) & (1 << 31) ) >> 31); \ + d0 = (s0) << 1; + + /* + * Undefine the below constant if your processor or compiler is slow + * at 64-bit arithmetic. This is a rare case however. 64-bit macros are + * better for deeply pipelined CPUs (no conditional execution), are + * very efficient for 64-bit processors and also fast on 32-bit processors + * featuring extended precision arithmetic (x86, PowerPC_32, M68k and probably + * more). + */ + +#define USE_64BIT_FOR_ADDSUB_MACROS 0 + +#if USE_64BIT_FOR_ADDSUB_MACROS + +#define add96(s2, s1, s0, d2, d1, d0) { \ + uint64_t w; \ + w = (uint64_t)(s0) + (uint64_t)(d0); \ + (s0) = w; \ + w >>= 32; \ + w += (uint64_t)(s1) + (uint64_t)(d1); \ + (s1) = w; \ + w >>= 32; \ + w += (uint64_t)(s2) + (uint64_t)(d2); \ + (s2) = w; } + +#define sub96(s2, s1, s0, d2, d1, d0) { \ + uint64_t w; \ + w = (uint64_t)(s0) - (uint64_t)(d0); \ + (s0) = w; \ + w >>= 32; \ + w += (uint64_t)(s1) - (uint64_t)(d1); \ + (s1) = w; \ + w >>= 32; \ + w += (uint64_t)(s2) - (uint64_t)(d2); \ + (s2) = w; } + +#else + +#define add96(s2, s1, s0, d2, d1, d0) { \ + uint32_t _x, _c; \ + _x = (s0); (s0) += (d0); \ + if ( (s0) < _x) _c = 1; else _c = 0; \ + _x = (s1); (s1) += (d1) + _c; \ + if ( ( (s1) < _x) || ( ( (s1) == _x) && _c) ) _c = 1; else _c = 0; \ + (s2) += (d2) + _c; } + +#define sub96(s2, s1, s0, d2, d1, d0) { \ + uint32_t _x, _c; \ + _x = (s0); (s0) -= (d0); \ + if ( (s0) > _x) _c = 1; else _c = 0; \ + _x = (s1); (s1) -= (d1) + _c; \ + if ( ( (s1) > _x) || ( ( (s1) == _x) && _c) ) _c = 1; else _c = 0; \ + (s2) -= (d2) + _c; } + +#endif /* USE_64BIT_FOR_ADDSUB_MACROS */ + + /* parser state machine states */ + +#define FSM_A 0 +#define FSM_B 1 +#define FSM_C 2 +#define FSM_D 3 +#define FSM_E 4 +#define FSM_F 5 +#define FSM_G 6 +#define FSM_H 7 +#define FSM_I 8 +#define FSM_STOP 9 + + /* The structure is filled by parser, then given to converter. */ + struct PrepNumber + { + int negative; /* 0 if positive number, 1 if negative */ + int32_t exponent; /* power of 10 exponent */ + uint64_t mantissa; /* integer mantissa */ + }; + + /* Possible parser return values. */ + +#define PARSER_OK 0 // parser finished OK +#define PARSER_PZERO 1 // no digits or number is smaller than +-2^-1022 +#define PARSER_MZERO 2 // number is negative, module smaller +#define PARSER_PINF 3 // number is higher than +HUGE_VAL +#define PARSER_MINF 4 // number is lower than -HUGE_VAL + + inline char next(const char*& _s, const char* _term) + { + return _s != _term + ? *_s++ + : '\0' + ; + } + + static int parser(const char* _s, const char* _term, PrepNumber* _pn) + { + int state = FSM_A; + int digx = 0; + char c = ' '; /* initial value for kicking off the state machine */ + int result = PARSER_OK; + int expneg = 0; + int32_t expexp = 0; + + while (state != FSM_STOP) // && _s != _term) + { + switch (state) + { + case FSM_A: + if (isSpace(c) ) + { + c = next(_s, _term); + } + else + { + state = FSM_B; + } + break; + + case FSM_B: + state = FSM_C; + + if (c == '+') + { + c = next(_s, _term); + } + else if (c == '-') + { + _pn->negative = 1; + c = next(_s, _term); + } + else if (isNumeric(c) ) + { + } + else if (c == '.') + { + } + else + { + state = FSM_STOP; + } + break; + + case FSM_C: + if (c == '0') + { + c = next(_s, _term); + } + else if (c == '.') + { + c = next(_s, _term); + state = FSM_D; + } + else + { + state = FSM_E; + } + break; + + case FSM_D: + if (c == '0') + { + c = next(_s, _term); + if (_pn->exponent > -2147483647) _pn->exponent--; + } + else + { + state = FSM_F; + } + break; + + case FSM_E: + if (isNumeric(c) ) + { + if (digx < DIGITS) + { + _pn->mantissa *= 10; + _pn->mantissa += c - '0'; + digx++; + } + else if (_pn->exponent < 2147483647) + { + _pn->exponent++; + } + + c = next(_s, _term); + } + else if (c == '.') + { + c = next(_s, _term); + state = FSM_F; + } + else + { + state = FSM_F; + } + break; + + case FSM_F: + if (isNumeric(c) ) + { + if (digx < DIGITS) + { + _pn->mantissa *= 10; + _pn->mantissa += c - '0'; + _pn->exponent--; + digx++; + } + + c = next(_s, _term); + } + else if ('e' == toLower(c) ) + { + c = next(_s, _term); + state = FSM_G; + } + else + { + state = FSM_G; + } + break; + + case FSM_G: + if (c == '+') + { + c = next(_s, _term); + } + else if (c == '-') + { + expneg = 1; + c = next(_s, _term); + } + + state = FSM_H; + break; + + case FSM_H: + if (c == '0') + { + c = next(_s, _term); + } + else + { + state = FSM_I; + } + break; + + case FSM_I: + if (isNumeric(c) ) + { + if (expexp < 214748364) + { + expexp *= 10; + expexp += c - '0'; + } + + c = next(_s, _term); + } + else + { + state = FSM_STOP; + } + break; + } + } + + if (expneg) + { + expexp = -expexp; + } + + _pn->exponent += expexp; + + if (_pn->mantissa == 0) + { + if (_pn->negative) + { + result = PARSER_MZERO; + } + else + { + result = PARSER_PZERO; + } + } + else if (_pn->exponent > 309) + { + if (_pn->negative) + { + result = PARSER_MINF; + } + else + { + result = PARSER_PINF; + } + } + else if (_pn->exponent < -328) + { + if (_pn->negative) + { + result = PARSER_MZERO; + } + else + { + result = PARSER_PZERO; + } + } + + return result; + } + + static double converter(PrepNumber* _pn) + { + int binexp = 92; + HexDouble hd; + uint32_t s2, s1, s0; /* 96-bit precision integer */ + uint32_t q2, q1, q0; /* 96-bit precision integer */ + uint32_t r2, r1, r0; /* 96-bit precision integer */ + uint32_t mask28 = UINT32_C(0xf) << 28; + + hd.u = 0; + + s0 = (uint32_t)(_pn->mantissa & UINT32_MAX); + s1 = (uint32_t)(_pn->mantissa >> 32); + s2 = 0; + + while (_pn->exponent > 0) + { + lsl96(s2, s1, s0, q2, q1, q0); // q = p << 1 + lsl96(q2, q1, q0, r2, r1, r0); // r = p << 2 + lsl96(r2, r1, r0, s2, s1, s0); // p = p << 3 + add96(s2, s1, s0, q2, q1, q0); // p = (p << 3) + (p << 1) + + _pn->exponent--; + + while (s2 & mask28) + { + lsr96(s2, s1, s0, q2, q1, q0); + binexp++; + s2 = q2; + s1 = q1; + s0 = q0; + } + } + + while (_pn->exponent < 0) + { + while (!(s2 & (1 << 31) ) ) + { + lsl96(s2, s1, s0, q2, q1, q0); + binexp--; + s2 = q2; + s1 = q1; + s0 = q0; + } + + q2 = s2 / 10; + r1 = s2 % 10; + r2 = (s1 >> 8) | (r1 << 24); + q1 = r2 / 10; + r1 = r2 % 10; + r2 = ( (s1 & 0xFF) << 16) | (s0 >> 16) | (r1 << 24); + r0 = r2 / 10; + r1 = r2 % 10; + q1 = (q1 << 8) | ( (r0 & 0x00FF0000) >> 16); + q0 = r0 << 16; + r2 = (s0 & UINT16_MAX) | (r1 << 16); + q0 |= r2 / 10; + s2 = q2; + s1 = q1; + s0 = q0; + + _pn->exponent++; + } + + if (s2 || s1 || s0) + { + while (!(s2 & mask28) ) + { + lsl96(s2, s1, s0, q2, q1, q0); + binexp--; + s2 = q2; + s1 = q1; + s0 = q0; + } + } + + binexp += 1023; + + if (binexp > 2046) + { + if (_pn->negative) + { + hd.u = DOUBLE_MINUS_INFINITY; + } + else + { + hd.u = DOUBLE_PLUS_INFINITY; + } + } + else if (binexp < 1) + { + if (_pn->negative) + { + hd.u = DOUBLE_MINUS_ZERO; + } + } + else if (s2) + { + uint64_t q; + uint64_t binexs2 = (uint64_t)binexp; + + binexs2 <<= 52; + q = ( (uint64_t)(s2 & ~mask28) << 24) + | ( ( (uint64_t)s1 + 128) >> 8) | binexs2; + + if (_pn->negative) + { + q |= (1ULL << 63); + } + + hd.u = q; + } + + return hd.d; + } + + int32_t toString(char* _out, int32_t _max, bool _value) + { + StringView str(_value ? "true" : "false"); + strCopy(_out, _max, str); + return str.getLength(); + } + + bool fromString(bool* _out, const StringView& _str) + { + char ch = toLower(_str.getPtr()[0]); + *_out = ch == 't' || ch == '1'; + return 0 != _str.getLength(); + } + + bool fromString(float* _out, const StringView& _str) + { + double dbl; + bool result = fromString(&dbl, _str); + *_out = float(dbl); + return result; + } + + bool fromString(double* _out, const StringView& _str) + { + PrepNumber pn; + pn.mantissa = 0; + pn.negative = 0; + pn.exponent = 0; + + HexDouble hd; + hd.u = DOUBLE_PLUS_ZERO; + + switch (parser(_str.getPtr(), _str.getTerm(), &pn) ) + { + case PARSER_OK: + *_out = converter(&pn); + break; + + case PARSER_PZERO: + *_out = hd.d; + break; + + case PARSER_MZERO: + hd.u = DOUBLE_MINUS_ZERO; + *_out = hd.d; + break; + + case PARSER_PINF: + hd.u = DOUBLE_PLUS_INFINITY; + *_out = hd.d; + break; + + case PARSER_MINF: + hd.u = DOUBLE_MINUS_INFINITY; + *_out = hd.d; + break; + } + + return true; + } + + bool fromString(int32_t* _out, const StringView& _str) + { + const char* str = _str.getPtr(); + const char* term = _str.getTerm(); + + str = strws(str); + char ch = *str++; + bool neg = false; + switch (ch) + { + case '-': + case '+': neg = '-' == ch; + break; + + default: + --str; + break; + } + + int32_t result = 0; + + for (ch = *str++; isNumeric(ch) && str <= term; ch = *str++) + { + result = 10*result - (ch - '0'); + } + + *_out = neg ? result : -result; + + return true; + } + + bool fromString(uint32_t* _out, const StringView& _str) + { + fromString( (int32_t*)_out, _str); + return true; + } + } // namespace bx diff --git a/3rdparty/bx/src/easing.cpp b/3rdparty/bx/src/easing.cpp new file mode 100644 index 0000000..e9f82b2 --- /dev/null +++ b/3rdparty/bx/src/easing.cpp @@ -0,0 +1,64 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "bx_p.h" +#include + +namespace bx +{ + static const EaseFn s_easeFunc[] = + { + easeLinear, + easeStep, + easeSmoothStep, + easeInQuad, + easeOutQuad, + easeInOutQuad, + easeOutInQuad, + easeInCubic, + easeOutCubic, + easeInOutCubic, + easeOutInCubic, + easeInQuart, + easeOutQuart, + easeInOutQuart, + easeOutInQuart, + easeInQuint, + easeOutQuint, + easeInOutQuint, + easeOutInQuint, + easeInSine, + easeOutSine, + easeInOutSine, + easeOutInSine, + easeInExpo, + easeOutExpo, + easeInOutExpo, + easeOutInExpo, + easeInCirc, + easeOutCirc, + easeInOutCirc, + easeOutInCirc, + easeInElastic, + easeOutElastic, + easeInOutElastic, + easeOutInElastic, + easeInBack, + easeOutBack, + easeInOutBack, + easeOutInBack, + easeInBounce, + easeOutBounce, + easeInOutBounce, + easeOutInBounce, + }; + BX_STATIC_ASSERT(BX_COUNTOF(s_easeFunc) == Easing::Count); + + EaseFn getEaseFunc(Easing::Enum _enum) + { + return s_easeFunc[_enum]; + } + +} // namespace bx diff --git a/3rdparty/bx/src/file.cpp b/3rdparty/bx/src/file.cpp new file mode 100644 index 0000000..5668757 --- /dev/null +++ b/3rdparty/bx/src/file.cpp @@ -0,0 +1,407 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "bx_p.h" +#include + +#include +#include + +#ifndef BX_CONFIG_CRT_FILE_READER_WRITER +# define BX_CONFIG_CRT_FILE_READER_WRITER !(0 \ + || BX_CRT_NONE \ + ) +#endif // BX_CONFIG_CRT_FILE_READER_WRITER + +namespace bx +{ + class NoopWriterImpl : public FileWriterI + { + public: + NoopWriterImpl(void*) + { + } + + virtual ~NoopWriterImpl() + { + close(); + } + + virtual bool open(const FilePath& _filePath, bool _append, Error* _err) override + { + BX_UNUSED(_filePath, _append, _err); + return false; + } + + virtual void close() override + { + } + + virtual int64_t seek(int64_t _offset, Whence::Enum _whence) override + { + BX_UNUSED(_offset, _whence); + return 0; + } + + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override + { + BX_UNUSED(_data, _size, _err); + return 0; + } + }; + +#if BX_CONFIG_CRT_FILE_READER_WRITER + +# if BX_CRT_MSVC +# define fseeko64 _fseeki64 +# define ftello64 _ftelli64 +# elif 0 \ + || BX_PLATFORM_ANDROID \ + || BX_PLATFORM_BSD \ + || BX_PLATFORM_IOS \ + || BX_PLATFORM_OSX +# define fseeko64 fseeko +# define ftello64 ftello +# elif BX_PLATFORM_PS4 +# define fseeko64 fseek +# define ftello64 ftell +# endif // BX_ + + class FileReaderImpl : public FileReaderI + { + public: + FileReaderImpl(FILE* _file) + : m_file(_file) + , m_open(false) + { + } + + virtual ~FileReaderImpl() + { + close(); + } + + virtual bool open(const FilePath& _filePath, Error* _err) override + { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + + if (NULL != m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_ALREADY_OPEN, "FileReader: File is already open."); + return false; + } + + m_file = fopen(_filePath.get(), "rb"); + if (NULL == m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "FileReader: Failed to open file."); + return false; + } + + m_open = true; + return true; + } + + virtual void close() override + { + if (m_open + && NULL != m_file) + { + fclose(m_file); + m_file = NULL; + } + } + + virtual int64_t seek(int64_t _offset, Whence::Enum _whence) override + { + BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); + fseeko64(m_file, _offset, _whence); + return ftello64(m_file); + } + + virtual int32_t read(void* _data, int32_t _size, Error* _err) override + { + BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + + int32_t size = (int32_t)fread(_data, 1, _size, m_file); + if (size != _size) + { + if (0 != feof(m_file) ) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_EOF, "FileReader: EOF."); + } + else if (0 != ferror(m_file) ) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_READ, "FileReader: read error."); + } + + return size >= 0 ? size : 0; + } + + return size; + } + + private: + FILE* m_file; + bool m_open; + }; + + class FileWriterImpl : public FileWriterI + { + public: + FileWriterImpl(FILE* _file) + : m_file(_file) + , m_open(false) + { + } + + virtual ~FileWriterImpl() + { + close(); + } + + virtual bool open(const FilePath& _filePath, bool _append, Error* _err) override + { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + + if (NULL != m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_ALREADY_OPEN, "FileReader: File is already open."); + return false; + } + + m_file = fopen(_filePath.get(), _append ? "ab" : "wb"); + + if (NULL == m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "FileWriter: Failed to open file."); + return false; + } + + m_open = true; + return true; + } + + virtual void close() override + { + if (m_open + && NULL != m_file) + { + fclose(m_file); + m_file = NULL; + } + } + + virtual int64_t seek(int64_t _offset, Whence::Enum _whence) override + { + BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); + fseeko64(m_file, _offset, _whence); + return ftello64(m_file); + } + + virtual int32_t write(const void* _data, int32_t _size, Error* _err) override + { + BX_CHECK(NULL != m_file, "Reader/Writer file is not open."); + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + + int32_t size = (int32_t)fwrite(_data, 1, _size, m_file); + if (size != _size) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_WRITE, "FileWriter: write failed."); + return size >= 0 ? size : 0; + } + + return size; + } + + private: + FILE* m_file; + bool m_open; + }; + +#else + + class FileReaderImpl : public FileReaderI + { + public: + FileReaderImpl(void*) + { + } + + virtual ~FileReaderImpl() + { + close(); + } + + virtual bool open(const FilePath& _filePath, Error* _err) override + { + BX_UNUSED(_filePath, _err); + return false; + } + + virtual void close() override + { + } + + virtual int64_t seek(int64_t _offset, Whence::Enum _whence) override + { + BX_UNUSED(_offset, _whence); + return 0; + } + + virtual int32_t read(void* _data, int32_t _size, Error* _err) override + { + BX_UNUSED(_data, _size, _err); + return 0; + } + }; + + typedef NoopWriterImpl FileWriterImpl; + +#endif // BX_CONFIG_CRT_FILE_READER_WRITER + + FileReader::FileReader() + { + BX_STATIC_ASSERT(sizeof(FileReaderImpl) <= sizeof(m_internal) ); + BX_PLACEMENT_NEW(m_internal, FileReaderImpl)(NULL); + } + + FileReader::~FileReader() + { + FileReaderImpl* impl = reinterpret_cast(m_internal); + impl->~FileReaderImpl(); + } + + bool FileReader::open(const FilePath& _filePath, Error* _err) + { + FileReaderImpl* impl = reinterpret_cast(m_internal); + return impl->open(_filePath, _err); + } + + void FileReader::close() + { + FileReaderImpl* impl = reinterpret_cast(m_internal); + impl->close(); + } + + int64_t FileReader::seek(int64_t _offset, Whence::Enum _whence) + { + FileReaderImpl* impl = reinterpret_cast(m_internal); + return impl->seek(_offset, _whence); + } + + int32_t FileReader::read(void* _data, int32_t _size, Error* _err) + { + FileReaderImpl* impl = reinterpret_cast(m_internal); + return impl->read(_data, _size, _err); + } + + FileWriter::FileWriter() + { + BX_STATIC_ASSERT(sizeof(FileWriterImpl) <= sizeof(m_internal) ); + BX_PLACEMENT_NEW(m_internal, FileWriterImpl)(NULL); + } + + FileWriter::~FileWriter() + { + FileWriterImpl* impl = reinterpret_cast(m_internal); + impl->~FileWriterImpl(); + } + + bool FileWriter::open(const FilePath& _filePath, bool _append, Error* _err) + { + FileWriterImpl* impl = reinterpret_cast(m_internal); + return impl->open(_filePath, _append, _err); + } + + void FileWriter::close() + { + FileWriterImpl* impl = reinterpret_cast(m_internal); + impl->close(); + } + + int64_t FileWriter::seek(int64_t _offset, Whence::Enum _whence) + { + FileWriterImpl* impl = reinterpret_cast(m_internal); + return impl->seek(_offset, _whence); + } + + int32_t FileWriter::write(const void* _data, int32_t _size, Error* _err) + { + FileWriterImpl* impl = reinterpret_cast(m_internal); + return impl->write(_data, _size, _err); + } + + ReaderI* getStdIn() + { + static FileReaderImpl s_stdIn(stdout); + return &s_stdIn; + } + + WriterI* getStdOut() + { + static FileWriterImpl s_stdOut(stdout); + return &s_stdOut; + } + + WriterI* getStdErr() + { + static FileWriterImpl s_stdOut(stderr); + return &s_stdOut; + } + + WriterI* getNullOut() + { + static NoopWriterImpl s_nullOut(NULL); + return &s_nullOut; + } + + bool stat(const FilePath& _filePath, FileInfo& _outFileInfo) + { + _outFileInfo.m_size = 0; + _outFileInfo.m_type = FileInfo::Count; + +#if BX_COMPILER_MSVC + struct ::_stat64 st; + int32_t result = ::_stat64(_filePath.get(), &st); + + if (0 != result) + { + return false; + } + + if (0 != (st.st_mode & _S_IFREG) ) + { + _outFileInfo.m_type = FileInfo::Regular; + } + else if (0 != (st.st_mode & _S_IFDIR) ) + { + _outFileInfo.m_type = FileInfo::Directory; + } +#else + struct ::stat st; + int32_t result = ::stat(_filePath.get(), &st); + if (0 != result) + { + return false; + } + + if (0 != (st.st_mode & S_IFREG) ) + { + _outFileInfo.m_type = FileInfo::Regular; + } + else if (0 != (st.st_mode & S_IFDIR) ) + { + _outFileInfo.m_type = FileInfo::Directory; + } +#endif // BX_COMPILER_MSVC + + _outFileInfo.m_size = st.st_size; + + return true; + } + +} // namespace bx diff --git a/3rdparty/bx/src/filepath.cpp b/3rdparty/bx/src/filepath.cpp new file mode 100644 index 0000000..215ec4b --- /dev/null +++ b/3rdparty/bx/src/filepath.cpp @@ -0,0 +1,569 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "bx_p.h" +#include +#include +#include + +#if !BX_CRT_NONE +# include // remove +# include // opendir + +# if BX_CRT_MSVC +# include // _getcwd +# else +# include // mkdir +# include // getcwd +# endif // BX_CRT_MSVC +#endif // 0 + +#if BX_PLATFORM_WINDOWS +extern "C" __declspec(dllimport) unsigned long __stdcall GetTempPathA(unsigned long _max, char* _ptr); +#endif // BX_PLATFORM_WINDOWS + +namespace bx +{ + static bool isPathSeparator(char _ch) + { + return false + || '/' == _ch + || '\\' == _ch + ; + } + + static int32_t normalizeFilePath(char* _dst, int32_t _dstSize, const char* _src, int32_t _num) + { + // Reference: Lexical File Names in Plan 9 or Getting Dot-Dot Right + // https://9p.io/sys/doc/lexnames.html + + const int32_t num = strLen(_src, _num); + + if (0 == num) + { + return strCopy(_dst, _dstSize, "."); + } + + int32_t size = 0; + + StaticMemoryBlockWriter writer(_dst, _dstSize); + Error err; + + int32_t idx = 0; + int32_t dotdot = 0; + + if (2 <= num + && ':' == _src[1]) + { + size += write(&writer, toUpper(_src[idx]), &err); + size += write(&writer, ':', &err); + idx += 2; + dotdot = size; + } + + const int32_t slashIdx = idx; + + bool rooted = isPathSeparator(_src[idx]); + if (rooted) + { + size += write(&writer, '/', &err); + ++idx; + dotdot = size; + } + + bool trailingSlash = false; + + while (idx < num && err.isOk() ) + { + switch (_src[idx]) + { + case '/': + case '\\': + ++idx; + trailingSlash = idx == num; + break; + + case '.': + if (idx+1 == num + || isPathSeparator(_src[idx+1]) ) + { + ++idx; + break; + } + + if ('.' == _src[idx+1] + && (idx+2 == num || isPathSeparator(_src[idx+2]) ) ) + { + idx += 2; + + if (dotdot < size) + { + for (--size + ; dotdot < size && !isPathSeparator(_dst[size]) + ; --size) + { + } + seek(&writer, size, Whence::Begin); + } + else if (!rooted) + { + if (0 < size) + { + size += write(&writer, '/', &err); + } + + size += write(&writer, "..", &err); + dotdot = size; + } + + break; + } + BX_FALLTHROUGH; + + default: + if ( ( rooted && slashIdx+1 != size) + || (!rooted && 0 != size) ) + { + size += write(&writer, '/', &err); + } + + for (; idx < num && !isPathSeparator(_src[idx]); ++idx) + { + size += write(&writer, _src[idx], &err); + } + + break; + } + } + + if (0 == size) + { + size += write(&writer, '.', &err); + } + + if (trailingSlash) + { + size += write(&writer, '/', &err); + } + + write(&writer, '\0', &err); + + return size; + } + + static bool getEnv(const char* _name, FileInfo::Enum _type, char* _out, uint32_t* _inOutSize) + { + uint32_t len = *_inOutSize; + *_out = '\0'; + + if (getenv(_name, _out, &len) ) + { + FileInfo fi; + if (stat(_out, fi) + && _type == fi.m_type) + { + *_inOutSize = len; + return true; + } + } + + return false; + } + + static char* pwd(char* _buffer, uint32_t _size) + { +#if BX_PLATFORM_PS4 \ + || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_WINRT \ + || BX_CRT_NONE + BX_UNUSED(_buffer, _size); + return NULL; +#elif BX_CRT_MSVC + return ::_getcwd(_buffer, (int32_t)_size); +#else + return ::getcwd(_buffer, _size); +#endif // BX_COMPILER_ + } + + static bool getCurrentPath(char* _out, uint32_t* _inOutSize) + { + uint32_t len = *_inOutSize; + pwd(_out, len); + *_inOutSize = strLen(_out); + return true; + } + + static bool getHomePath(char* _out, uint32_t* _inOutSize) + { + return false +#if BX_PLATFORM_WINDOWS + || getEnv("USERPROFILE", FileInfo::Directory, _out, _inOutSize) +#endif // BX_PLATFORM_WINDOWS + || getEnv("HOME", FileInfo::Directory, _out, _inOutSize) + ; + } + + static bool getTempPath(char* _out, uint32_t* _inOutSize) + { +#if BX_PLATFORM_WINDOWS + uint32_t len = ::GetTempPathA(*_inOutSize, _out); + bool result = len != 0 && len < *_inOutSize; + *_inOutSize = len; + return result; +#else + static const char* s_tmp[] = + { + "TMPDIR", + "TMP", + "TEMP", + "TEMPDIR", + + NULL + }; + + for (const char** tmp = s_tmp; *tmp != NULL; ++tmp) + { + uint32_t len = *_inOutSize; + *_out = '\0'; + bool ok = getEnv(*tmp, FileInfo::Directory, _out, &len); + + if (ok + && len != 0 + && len < *_inOutSize) + { + *_inOutSize = len; + return ok; + } + } + + FileInfo fi; + if (stat("/tmp", fi) + && FileInfo::Directory == fi.m_type) + { + strCopy(_out, *_inOutSize, "/tmp"); + *_inOutSize = 4; + return true; + } + + return false; +#endif // BX_PLATFORM_* + } + + FilePath::FilePath() + { + set(""); + } + + FilePath::FilePath(Dir::Enum _dir) + { + set(_dir); + } + + FilePath::FilePath(const char* _rhs) + { + set(_rhs); + } + + FilePath::FilePath(const StringView& _filePath) + { + set(_filePath); + } + + FilePath& FilePath::operator=(const StringView& _rhs) + { + set(_rhs); + return *this; + } + + void FilePath::clear() + { + if (!isEmpty() ) + { + set(""); + } + } + + void FilePath::set(Dir::Enum _dir) + { + char tmp[kMaxFilePath]; + uint32_t len = BX_COUNTOF(tmp); + + switch (_dir) + { + case Dir::Current: + getCurrentPath(tmp, &len); + break; + + case Dir::Temp: + getTempPath(tmp, &len); + break; + + case Dir::Home: + getHomePath(tmp, &len); + break; + + default: + len = 0; + break; + } + + set(StringView(tmp, len) ); + } + + void FilePath::set(const StringView& _filePath) + { + normalizeFilePath( + m_filePath + , BX_COUNTOF(m_filePath) + , _filePath.getPtr() + , _filePath.getLength() + ); + } + + void FilePath::join(const StringView& _str) + { + char tmp[kMaxFilePath]; + strCopy(tmp, BX_COUNTOF(tmp), m_filePath); + strCat(tmp, BX_COUNTOF(tmp), "/"); + strCat(tmp, BX_COUNTOF(tmp), _str); + set(tmp); + } + + const char* FilePath::get() const + { + return m_filePath; + } + + const StringView FilePath::getPath() const + { + const char* end = strRFind(m_filePath, '/'); + if (NULL != end) + { + return StringView(m_filePath, end+1); + } + + return StringView(); + } + + const StringView FilePath::getFileName() const + { + const char* fileName = strRFind(m_filePath, '/'); + if (NULL != fileName) + { + return StringView(fileName+1); + } + + return get(); + } + + const StringView FilePath::getBaseName() const + { + const StringView fileName = getFileName(); + if (!fileName.isEmpty() ) + { + const char* ext = strFind(fileName, '.'); + if (ext != NULL) + { + return StringView(fileName.getPtr(), ext); + } + + return fileName; + } + + return StringView(); + } + + const StringView FilePath::getExt() const + { + const StringView fileName = getFileName(); + if (!fileName.isEmpty() ) + { + const char* ext = strFind(fileName, '.'); + return StringView(ext); + } + + return StringView(); + } + + bool FilePath::isAbsolute() const + { + return '/' == m_filePath[0] // no drive letter + || (':' == m_filePath[1] && '/' == m_filePath[2]) // with drive letter + ; + } + + bool FilePath::isEmpty() const + { + return 0 == strCmp(m_filePath, "."); + } + + bool make(const FilePath& _filePath, Error* _err) + { + BX_ERROR_SCOPE(_err); + + if (!_err->isOk() ) + { + return false; + } + +#if BX_CRT_MSVC + int32_t result = ::_mkdir(_filePath.get() ); +#elif BX_CRT_MINGW + int32_t result = ::mkdir(_filePath.get()); +#elif BX_CRT_NONE + BX_UNUSED(_filePath); + int32_t result = -1; +#else + int32_t result = ::mkdir(_filePath.get(), 0700); +#endif // BX_CRT_MSVC + + if (0 != result) + { + BX_ERROR_SET(_err, BX_ERROR_ACCESS, "The parent directory does not allow write permission to the process."); + return false; + } + + return true; + } + + bool makeAll(const FilePath& _filePath, Error* _err) + { + BX_ERROR_SCOPE(_err); + + if (!_err->isOk() ) + { + return false; + } + + FileInfo fi; + + if (stat(_filePath, fi) ) + { + if (FileInfo::Directory == fi.m_type) + { + return true; + } + + BX_ERROR_SET(_err, BX_ERROR_NOT_DIRECTORY, "File already exist, and is not directory."); + return false; + } + + const StringView dir = strRTrim(_filePath.get(), "/"); + const char* slash = strRFind(dir, '/'); + + if (NULL != slash + && slash - dir.getPtr() > 1) + { + if (!makeAll(StringView(dir.getPtr(), slash), _err) ) + { + return false; + } + } + + FilePath path(dir); + return make(path, _err); + } + + bool remove(const FilePath& _filePath, Error* _err) + { + BX_ERROR_SCOPE(_err); + + if (!_err->isOk() ) + { + return false; + } + +#if BX_CRT_MSVC + int32_t result = -1; + FileInfo fi; + if (stat(_filePath, fi) ) + { + if (FileInfo::Directory == fi.m_type) + { + result = ::_rmdir(_filePath.get() ); + } + else + { + result = ::remove(_filePath.get() ); + } + } +#elif BX_CRT_NONE + BX_UNUSED(_filePath); + int32_t result = -1; +#else + int32_t result = ::remove(_filePath.get() ); +#endif // BX_CRT_MSVC + + if (0 != result) + { + BX_ERROR_SET(_err, BX_ERROR_ACCESS, "The parent directory does not allow write permission to the process."); + return false; + } + + return true; + } + + bool removeAll(const FilePath& _filePath, Error* _err) + { + BX_ERROR_SCOPE(_err); + + if (remove(_filePath, _err) ) + { + return true; + } + + _err->reset(); + + FileInfo fi; + + if (!stat(_filePath, fi) ) + { + BX_ERROR_SET(_err, BX_ERROR_ACCESS, "The parent directory does not allow write permission to the process."); + return false; + } + + if (FileInfo::Directory != fi.m_type) + { + BX_ERROR_SET(_err, BX_ERROR_NOT_DIRECTORY, "File already exist, and is not directory."); + return false; + } + +#if BX_CRT_NONE + BX_UNUSED(_filePath); + return false; +#elif BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_LINUX \ + || BX_PLATFORM_OSX + DIR* dir = opendir(_filePath.get() ); + if (NULL == dir) + { + BX_ERROR_SET(_err, BX_ERROR_NOT_DIRECTORY, "File already exist, and is not directory."); + return false; + } + + for (dirent* item = readdir(dir); NULL != item; item = readdir(dir) ) + { + if (0 == strCmp(item->d_name, ".") + || 0 == strCmp(item->d_name, "..") ) + { + continue; + } + + FilePath path(_filePath); + path.join(item->d_name); + if (!removeAll(path, _err) ) + { + _err->reset(); + break; + } + } + + closedir(dir); +#endif // !BX_CRT_NONE + + return remove(_filePath, _err); + } + +} // namespace bx diff --git a/3rdparty/bx/src/fpumath.cpp b/3rdparty/bx/src/fpumath.cpp deleted file mode 100644 index e957ef9..0000000 --- a/3rdparty/bx/src/fpumath.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include -#include - -namespace bx -{ - const float pi = 3.14159265358979323846f; - const float invPi = 1.0f/3.14159265358979323846f; - const float piHalf = 1.57079632679489661923f; - const float sqrt2 = 1.41421356237309504880f; -#if BX_COMPILER_MSVC - const float huge = float(HUGE_VAL); -#else - const float huge = HUGE_VALF; -#endif // BX_COMPILER_MSVC - - float fabsolute(float _a) - { - return ::fabsf(_a); - } - - float fsin(float _a) - { - return ::sinf(_a); - } - - float fasin(float _a) - { - return ::asinf(_a); - } - - float fcos(float _a) - { - return ::cosf(_a); - } - - float ftan(float _a) - { - return ::tanf(_a); - } - - float facos(float _a) - { - return ::acosf(_a); - } - - float fatan2(float _y, float _x) - { - return ::atan2f(_y, _x); - } - - float fpow(float _a, float _b) - { - return ::powf(_a, _b); - } - - float flog(float _a) - { - return ::logf(_a); - } - - float fsqrt(float _a) - { - return ::sqrtf(_a); - } - - float ffloor(float _f) - { - return ::floorf(_f); - } - - float fceil(float _f) - { - return ::ceilf(_f); - } - - float fmod(float _a, float _b) - { - return ::fmodf(_a, _b); - } - - void mtx3Inverse(float* _result, const float* _a) - { - float xx = _a[0]; - float xy = _a[1]; - float xz = _a[2]; - float yx = _a[3]; - float yy = _a[4]; - float yz = _a[5]; - float zx = _a[6]; - float zy = _a[7]; - float zz = _a[8]; - - float det = 0.0f; - det += xx * (yy*zz - yz*zy); - det -= xy * (yx*zz - yz*zx); - det += xz * (yx*zy - yy*zx); - - float invDet = 1.0f/det; - - _result[0] = +(yy*zz - yz*zy) * invDet; - _result[1] = -(xy*zz - xz*zy) * invDet; - _result[2] = +(xy*yz - xz*yy) * invDet; - - _result[3] = -(yx*zz - yz*zx) * invDet; - _result[4] = +(xx*zz - xz*zx) * invDet; - _result[5] = -(xx*yz - xz*yx) * invDet; - - _result[6] = +(yx*zy - yy*zx) * invDet; - _result[7] = -(xx*zy - xy*zx) * invDet; - _result[8] = +(xx*yy - xy*yx) * invDet; - } - - void mtxInverse(float* _result, const float* _a) - { - float xx = _a[ 0]; - float xy = _a[ 1]; - float xz = _a[ 2]; - float xw = _a[ 3]; - float yx = _a[ 4]; - float yy = _a[ 5]; - float yz = _a[ 6]; - float yw = _a[ 7]; - float zx = _a[ 8]; - float zy = _a[ 9]; - float zz = _a[10]; - float zw = _a[11]; - float wx = _a[12]; - float wy = _a[13]; - float wz = _a[14]; - float ww = _a[15]; - - float det = 0.0f; - det += xx * (yy*(zz*ww - zw*wz) - yz*(zy*ww - zw*wy) + yw*(zy*wz - zz*wy) ); - det -= xy * (yx*(zz*ww - zw*wz) - yz*(zx*ww - zw*wx) + yw*(zx*wz - zz*wx) ); - det += xz * (yx*(zy*ww - zw*wy) - yy*(zx*ww - zw*wx) + yw*(zx*wy - zy*wx) ); - det -= xw * (yx*(zy*wz - zz*wy) - yy*(zx*wz - zz*wx) + yz*(zx*wy - zy*wx) ); - - float invDet = 1.0f/det; - - _result[ 0] = +(yy*(zz*ww - wz*zw) - yz*(zy*ww - wy*zw) + yw*(zy*wz - wy*zz) ) * invDet; - _result[ 1] = -(xy*(zz*ww - wz*zw) - xz*(zy*ww - wy*zw) + xw*(zy*wz - wy*zz) ) * invDet; - _result[ 2] = +(xy*(yz*ww - wz*yw) - xz*(yy*ww - wy*yw) + xw*(yy*wz - wy*yz) ) * invDet; - _result[ 3] = -(xy*(yz*zw - zz*yw) - xz*(yy*zw - zy*yw) + xw*(yy*zz - zy*yz) ) * invDet; - - _result[ 4] = -(yx*(zz*ww - wz*zw) - yz*(zx*ww - wx*zw) + yw*(zx*wz - wx*zz) ) * invDet; - _result[ 5] = +(xx*(zz*ww - wz*zw) - xz*(zx*ww - wx*zw) + xw*(zx*wz - wx*zz) ) * invDet; - _result[ 6] = -(xx*(yz*ww - wz*yw) - xz*(yx*ww - wx*yw) + xw*(yx*wz - wx*yz) ) * invDet; - _result[ 7] = +(xx*(yz*zw - zz*yw) - xz*(yx*zw - zx*yw) + xw*(yx*zz - zx*yz) ) * invDet; - - _result[ 8] = +(yx*(zy*ww - wy*zw) - yy*(zx*ww - wx*zw) + yw*(zx*wy - wx*zy) ) * invDet; - _result[ 9] = -(xx*(zy*ww - wy*zw) - xy*(zx*ww - wx*zw) + xw*(zx*wy - wx*zy) ) * invDet; - _result[10] = +(xx*(yy*ww - wy*yw) - xy*(yx*ww - wx*yw) + xw*(yx*wy - wx*yy) ) * invDet; - _result[11] = -(xx*(yy*zw - zy*yw) - xy*(yx*zw - zx*yw) + xw*(yx*zy - zx*yy) ) * invDet; - - _result[12] = -(yx*(zy*wz - wy*zz) - yy*(zx*wz - wx*zz) + yz*(zx*wy - wx*zy) ) * invDet; - _result[13] = +(xx*(zy*wz - wy*zz) - xy*(zx*wz - wx*zz) + xz*(zx*wy - wx*zy) ) * invDet; - _result[14] = -(xx*(yy*wz - wy*yz) - xy*(yx*wz - wx*yz) + xz*(yx*wy - wx*yy) ) * invDet; - _result[15] = +(xx*(yy*zz - zy*yz) - xy*(yx*zz - zx*yz) + xz*(yx*zy - zx*yy) ) * invDet; - } - -} // namespace bx diff --git a/3rdparty/bx/src/hash.cpp b/3rdparty/bx/src/hash.cpp new file mode 100644 index 0000000..7ae5e39 --- /dev/null +++ b/3rdparty/bx/src/hash.cpp @@ -0,0 +1,151 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "bx_p.h" +#include + +namespace bx +{ + +static const uint32_t s_crcTableIeee[] = +{ + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, + 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, + 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, + 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, + 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, + 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, + 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, + 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, + 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, + 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, + 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, + 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, + 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, + 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, + 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, + 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, + 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, + 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, +}; +BX_STATIC_ASSERT(BX_COUNTOF(s_crcTableIeee) == 256); + +static const uint32_t s_crcTableCastagnoli[] = +{ + 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb, + 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b, 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, + 0x105ec76f, 0xe235446c, 0xf165b798, 0x030e349b, 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384, + 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54, 0x5d1d08bf, 0xaf768bbc, 0xbc267848, 0x4e4dfb4b, + 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a, 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35, + 0xaa64d611, 0x580f5512, 0x4b5fa6e6, 0xb93425e5, 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa, + 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45, 0xf779deae, 0x05125dad, 0x1642ae59, 0xe4292d5a, + 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a, 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595, + 0x417b1dbc, 0xb3109ebf, 0xa0406d4b, 0x522bee48, 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957, + 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687, 0x0c38d26c, 0xfe53516f, 0xed03a29b, 0x1f682198, + 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927, 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38, + 0xdbfc821c, 0x2997011f, 0x3ac7f2eb, 0xc8ac71e8, 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7, + 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096, 0xa65c047d, 0x5437877e, 0x4767748a, 0xb50cf789, + 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859, 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46, + 0x7198540d, 0x83f3d70e, 0x90a324fa, 0x62c8a7f9, 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6, + 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36, 0x3cdb9bdd, 0xceb018de, 0xdde0eb2a, 0x2f8b6829, + 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c, 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93, + 0x082f63b7, 0xfa44e0b4, 0xe9141340, 0x1b7f9043, 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c, + 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3, 0x55326b08, 0xa759e80b, 0xb4091bff, 0x466298fc, + 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c, 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033, + 0xa24bb5a6, 0x502036a5, 0x4370c551, 0xb11b4652, 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d, + 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d, 0xef087a76, 0x1d63f975, 0x0e330a81, 0xfc588982, + 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d, 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622, + 0x38cc2a06, 0xcaa7a905, 0xd9f75af1, 0x2b9cd9f2, 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed, + 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530, 0x0417b1db, 0xf67c32d8, 0xe52cc12c, 0x1747422f, + 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff, 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0, + 0xd3d3e1ab, 0x21b862a8, 0x32e8915c, 0xc083125f, 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540, + 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90, 0x9e902e7b, 0x6cfbad78, 0x7fab5e8c, 0x8dc0dd8f, + 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee, 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1, + 0x69e9f0d5, 0x9b8273d6, 0x88d28022, 0x7ab90321, 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e, + 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81, 0x34f4f86a, 0xc69f7b69, 0xd5cf889d, 0x27a40b9e, + 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e, 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351, +}; +BX_STATIC_ASSERT(BX_COUNTOF(s_crcTableCastagnoli) == 256); + +static const uint32_t s_crcTableKoopman[] = +{ + 0x00000000, 0x9695c4ca, 0xfb4839c9, 0x6dddfd03, 0x20f3c3cf, 0xb6660705, 0xdbbbfa06, 0x4d2e3ecc, + 0x41e7879e, 0xd7724354, 0xbaafbe57, 0x2c3a7a9d, 0x61144451, 0xf781809b, 0x9a5c7d98, 0x0cc9b952, + 0x83cf0f3c, 0x155acbf6, 0x788736f5, 0xee12f23f, 0xa33cccf3, 0x35a90839, 0x5874f53a, 0xcee131f0, + 0xc22888a2, 0x54bd4c68, 0x3960b16b, 0xaff575a1, 0xe2db4b6d, 0x744e8fa7, 0x199372a4, 0x8f06b66e, + 0xd1fdae25, 0x47686aef, 0x2ab597ec, 0xbc205326, 0xf10e6dea, 0x679ba920, 0x0a465423, 0x9cd390e9, + 0x901a29bb, 0x068fed71, 0x6b521072, 0xfdc7d4b8, 0xb0e9ea74, 0x267c2ebe, 0x4ba1d3bd, 0xdd341777, + 0x5232a119, 0xc4a765d3, 0xa97a98d0, 0x3fef5c1a, 0x72c162d6, 0xe454a61c, 0x89895b1f, 0x1f1c9fd5, + 0x13d52687, 0x8540e24d, 0xe89d1f4e, 0x7e08db84, 0x3326e548, 0xa5b32182, 0xc86edc81, 0x5efb184b, + 0x7598ec17, 0xe30d28dd, 0x8ed0d5de, 0x18451114, 0x556b2fd8, 0xc3feeb12, 0xae231611, 0x38b6d2db, + 0x347f6b89, 0xa2eaaf43, 0xcf375240, 0x59a2968a, 0x148ca846, 0x82196c8c, 0xefc4918f, 0x79515545, + 0xf657e32b, 0x60c227e1, 0x0d1fdae2, 0x9b8a1e28, 0xd6a420e4, 0x4031e42e, 0x2dec192d, 0xbb79dde7, + 0xb7b064b5, 0x2125a07f, 0x4cf85d7c, 0xda6d99b6, 0x9743a77a, 0x01d663b0, 0x6c0b9eb3, 0xfa9e5a79, + 0xa4654232, 0x32f086f8, 0x5f2d7bfb, 0xc9b8bf31, 0x849681fd, 0x12034537, 0x7fdeb834, 0xe94b7cfe, + 0xe582c5ac, 0x73170166, 0x1ecafc65, 0x885f38af, 0xc5710663, 0x53e4c2a9, 0x3e393faa, 0xa8acfb60, + 0x27aa4d0e, 0xb13f89c4, 0xdce274c7, 0x4a77b00d, 0x07598ec1, 0x91cc4a0b, 0xfc11b708, 0x6a8473c2, + 0x664dca90, 0xf0d80e5a, 0x9d05f359, 0x0b903793, 0x46be095f, 0xd02bcd95, 0xbdf63096, 0x2b63f45c, + 0xeb31d82e, 0x7da41ce4, 0x1079e1e7, 0x86ec252d, 0xcbc21be1, 0x5d57df2b, 0x308a2228, 0xa61fe6e2, + 0xaad65fb0, 0x3c439b7a, 0x519e6679, 0xc70ba2b3, 0x8a259c7f, 0x1cb058b5, 0x716da5b6, 0xe7f8617c, + 0x68fed712, 0xfe6b13d8, 0x93b6eedb, 0x05232a11, 0x480d14dd, 0xde98d017, 0xb3452d14, 0x25d0e9de, + 0x2919508c, 0xbf8c9446, 0xd2516945, 0x44c4ad8f, 0x09ea9343, 0x9f7f5789, 0xf2a2aa8a, 0x64376e40, + 0x3acc760b, 0xac59b2c1, 0xc1844fc2, 0x57118b08, 0x1a3fb5c4, 0x8caa710e, 0xe1778c0d, 0x77e248c7, + 0x7b2bf195, 0xedbe355f, 0x8063c85c, 0x16f60c96, 0x5bd8325a, 0xcd4df690, 0xa0900b93, 0x3605cf59, + 0xb9037937, 0x2f96bdfd, 0x424b40fe, 0xd4de8434, 0x99f0baf8, 0x0f657e32, 0x62b88331, 0xf42d47fb, + 0xf8e4fea9, 0x6e713a63, 0x03acc760, 0x953903aa, 0xd8173d66, 0x4e82f9ac, 0x235f04af, 0xb5cac065, + 0x9ea93439, 0x083cf0f3, 0x65e10df0, 0xf374c93a, 0xbe5af7f6, 0x28cf333c, 0x4512ce3f, 0xd3870af5, + 0xdf4eb3a7, 0x49db776d, 0x24068a6e, 0xb2934ea4, 0xffbd7068, 0x6928b4a2, 0x04f549a1, 0x92608d6b, + 0x1d663b05, 0x8bf3ffcf, 0xe62e02cc, 0x70bbc606, 0x3d95f8ca, 0xab003c00, 0xc6ddc103, 0x504805c9, + 0x5c81bc9b, 0xca147851, 0xa7c98552, 0x315c4198, 0x7c727f54, 0xeae7bb9e, 0x873a469d, 0x11af8257, + 0x4f549a1c, 0xd9c15ed6, 0xb41ca3d5, 0x2289671f, 0x6fa759d3, 0xf9329d19, 0x94ef601a, 0x027aa4d0, + 0x0eb31d82, 0x9826d948, 0xf5fb244b, 0x636ee081, 0x2e40de4d, 0xb8d51a87, 0xd508e784, 0x439d234e, + 0xcc9b9520, 0x5a0e51ea, 0x37d3ace9, 0xa1466823, 0xec6856ef, 0x7afd9225, 0x17206f26, 0x81b5abec, + 0x8d7c12be, 0x1be9d674, 0x76342b77, 0xe0a1efbd, 0xad8fd171, 0x3b1a15bb, 0x56c7e8b8, 0xc0522c72, +}; +BX_STATIC_ASSERT(BX_COUNTOF(s_crcTableKoopman) == 256); + +static const uint32_t* s_crcTable[] = +{ + s_crcTableIeee, + s_crcTableCastagnoli, + s_crcTableKoopman, +}; +BX_STATIC_ASSERT(BX_COUNTOF(s_crcTable) == HashCrc32::Count); + +void HashCrc32::begin(Enum _type) +{ + m_hash = UINT32_MAX; + m_table = s_crcTable[_type]; +} + +void HashCrc32::add(const void* _data, int _len) +{ + const uint8_t* data = (const uint8_t*)_data; + + uint32_t hash = m_hash; + + while (_len--) + { + hash = m_table[(hash ^ (*data++) ) & UINT8_MAX] ^ (hash >> 8); + } + + m_hash = hash; +} + +} // namespace bx diff --git a/3rdparty/bx/src/math.cpp b/3rdparty/bx/src/math.cpp new file mode 100644 index 0000000..2be642d --- /dev/null +++ b/3rdparty/bx/src/math.cpp @@ -0,0 +1,920 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "bx_p.h" +#include +#include + +namespace bx +{ + const float kPi = 3.1415926535897932384626433832795f; + const float kPi2 = 6.2831853071795864769252867665590f; + const float kInvPi = 1.0f/kPi; + const float kPiHalf = 1.5707963267948966192313216916398f; + const float kPiQuarter = 0.7853981633974483096156608458199f; + const float kSqrt2 = 1.4142135623730950488016887242097f; + const float kLogNat10 = 2.3025850929940456840179914546844f; + const float kInvLogNat2 = 1.4426950408889634073599246810019f; + const float kLogNat2Hi = 0.6931471805599453094172321214582f; + const float kLogNat2Lo = 1.90821492927058770002e-10f; + const float kE = 2.7182818284590452353602874713527f; + const float kNearZero = 1.0f/float(1 << 28); + const float kFloatMin = 1.175494e-38f; + const float kFloatMax = 3.402823e+38f; + const float kInfinity = bitsToFloat(UINT32_C(0x7f800000) ); + + namespace + { + static const float kSinC2 = -0.16666667163372039794921875f; + static const float kSinC4 = 8.333347737789154052734375e-3f; + static const float kSinC6 = -1.9842604524455964565277099609375e-4f; + static const float kSinC8 = 2.760012648650445044040679931640625e-6f; + static const float kSinC10 = -2.50293279435709337121807038784027099609375e-8f; + + static const float kCosC2 = -0.5f; + static const float kCosC4 = 4.166664183139801025390625e-2f; + static const float kCosC6 = -1.388833043165504932403564453125e-3f; + static const float kCosC8 = 2.47562347794882953166961669921875e-5f; + static const float kCosC10 = -2.59630184018533327616751194000244140625e-7f; + + } // namespace + + BX_CONST_FUNC float cos(float _a) + { + const float scaled = _a * 2.0f*kInvPi; + const float real = floor(scaled); + const float xx = _a - real * kPiHalf; + const int32_t bits = int32_t(real) & 3; + + float c0, c2, c4, c6, c8, c10; + + if (bits == 0 + || bits == 2) + { + c0 = 1.0f; + c2 = kCosC2; + c4 = kCosC4; + c6 = kCosC6; + c8 = kCosC8; + c10 = kCosC10; + } + else + { + c0 = xx; + c2 = kSinC2; + c4 = kSinC4; + c6 = kSinC6; + c8 = kSinC8; + c10 = kSinC10; + } + + const float xsq = square(xx); + const float tmp0 = mad(c10, xsq, c8 ); + const float tmp1 = mad(tmp0, xsq, c6 ); + const float tmp2 = mad(tmp1, xsq, c4 ); + const float tmp3 = mad(tmp2, xsq, c2 ); + const float tmp4 = mad(tmp3, xsq, 1.0); + const float result = tmp4 * c0; + + return bits == 1 || bits == 2 + ? -result + : result + ; + } + + namespace + { + static const float kAcosC0 = 1.5707288f; + static const float kAcosC1 = -0.2121144f; + static const float kAcosC2 = 0.0742610f; + static const float kAcosC3 = -0.0187293f; + + } // namespace + + BX_CONST_FUNC float acos(float _a) + { + const float absa = abs(_a); + const float tmp0 = mad(kAcosC3, absa, kAcosC2); + const float tmp1 = mad(tmp0, absa, kAcosC1); + const float tmp2 = mad(tmp1, absa, kAcosC0); + const float tmp3 = tmp2 * sqrt(1.0f - absa); + const float negate = float(_a < 0.0f); + const float tmp4 = tmp3 - 2.0f*negate*tmp3; + const float result = negate*kPi + tmp4; + + return result; + } + + namespace + { + static const float kAtan2C0 = -0.013480470f; + static const float kAtan2C1 = 0.057477314f; + static const float kAtan2C2 = -0.121239071f; + static const float kAtan2C3 = 0.195635925f; + static const float kAtan2C4 = -0.332994597f; + static const float kAtan2C5 = 0.999995630f; + + } // namespace + + BX_CONST_FUNC float atan2(float _y, float _x) + { + const float ax = abs(_x); + const float ay = abs(_y); + const float maxaxy = max(ax, ay); + const float minaxy = min(ax, ay); + const float mxy = minaxy / maxaxy; + const float mxysq = square(mxy); + const float tmp0 = mad(kAtan2C0, mxysq, kAtan2C1); + const float tmp1 = mad(tmp0, mxysq, kAtan2C2); + const float tmp2 = mad(tmp1, mxysq, kAtan2C3); + const float tmp3 = mad(tmp2, mxysq, kAtan2C4); + const float tmp4 = mad(tmp3, mxysq, kAtan2C5); + const float tmp5 = tmp4 * mxy; + const float tmp6 = ay > ax ? kPiHalf - tmp5 : tmp5; + const float tmp7 = _x < 0.0f ? kPi - tmp6 : tmp6; + const float result = sign(_y)*tmp7; + + return result; + } + + BX_CONST_FUNC float ldexp(float _a, int32_t _b) + { + const uint32_t ftob = floatToBits(_a); + const uint32_t masked = uint32_and(ftob, UINT32_C(0xff800000) ); + const uint32_t expsign0 = uint32_sra(masked, 23); + const uint32_t tmp = uint32_iadd(expsign0, _b); + const uint32_t expsign1 = uint32_sll(tmp, 23); + const uint32_t mantissa = uint32_and(ftob, UINT32_C(0x007fffff) ); + const uint32_t bits = uint32_or(mantissa, expsign1); + const float result = bitsToFloat(bits); + + return result; + } + + float frexp(float _a, int32_t* _outExp) + { + const uint32_t ftob = floatToBits(_a); + const uint32_t masked0 = uint32_and(ftob, UINT32_C(0x7f800000) ); + const uint32_t exp0 = uint32_srl(masked0, 23); + const uint32_t masked1 = uint32_and(ftob, UINT32_C(0x807fffff) ); + const uint32_t bits = uint32_or(masked1, UINT32_C(0x3f000000) ); + const float result = bitsToFloat(bits); + + *_outExp = int32_t(exp0 - 0x7e); + + return result; + } + + namespace + { + static const float kExpC0 = 1.66666666666666019037e-01f; + static const float kExpC1 = -2.77777777770155933842e-03f; + static const float kExpC2 = 6.61375632143793436117e-05f; + static const float kExpC3 = -1.65339022054652515390e-06f; + static const float kExpC4 = 4.13813679705723846039e-08f; + + } // namespace + + BX_CONST_FUNC float exp(float _a) + { + if (abs(_a) <= kNearZero) + { + return _a + 1.0f; + } + + const float kk = round(_a*kInvLogNat2); + const float hi = _a - kk*kLogNat2Hi; + const float lo = kk*kLogNat2Lo; + const float hml = hi - lo; + const float hmlsq = square(hml); + const float tmp0 = mad(kExpC4, hmlsq, kExpC3); + const float tmp1 = mad(tmp0, hmlsq, kExpC2); + const float tmp2 = mad(tmp1, hmlsq, kExpC1); + const float tmp3 = mad(tmp2, hmlsq, kExpC0); + const float tmp4 = hml - hmlsq * tmp3; + const float tmp5 = hml*tmp4/(2.0f-tmp4); + const float tmp6 = 1.0f - ( (lo - tmp5) - hi); + const float result = ldexp(tmp6, int32_t(kk) ); + + return result; + } + + namespace + { + static const float kLogC0 = 6.666666666666735130e-01f; + static const float kLogC1 = 3.999999999940941908e-01f; + static const float kLogC2 = 2.857142874366239149e-01f; + static const float kLogC3 = 2.222219843214978396e-01f; + static const float kLogC4 = 1.818357216161805012e-01f; + static const float kLogC5 = 1.531383769920937332e-01f; + static const float kLogC6 = 1.479819860511658591e-01f; + + } // namespace + + BX_CONST_FUNC float log(float _a) + { + int32_t exp; + float ff = frexp(_a, &exp); + if (ff < kSqrt2*0.5f) + { + ff *= 2.0f; + --exp; + } + + ff -= 1.0f; + const float kk = float(exp); + const float hi = kk*kLogNat2Hi; + const float lo = kk*kLogNat2Lo; + const float ss = ff / (2.0f + ff); + const float s2 = square(ss); + const float s4 = square(s2); + + const float tmp0 = mad(kLogC6, s4, kLogC4); + const float tmp1 = mad(tmp0, s4, kLogC2); + const float tmp2 = mad(tmp1, s4, kLogC0); + const float t1 = s2*tmp2; + + const float tmp3 = mad(kLogC5, s4, kLogC3); + const float tmp4 = mad(tmp3, s4, kLogC1); + const float t2 = s4*tmp4; + + const float t12 = t1 + t2; + const float hfsq = 0.5f*square(ff); + const float result = hi - ( (hfsq - (ss*(hfsq+t12) + lo) ) - ff); + + return result; + } + + BX_CONST_FUNC float floor(float _a) + { + if (_a < 0.0f) + { + const float fr = fract(-_a); + const float result = -_a - fr; + + return -(0.0f != fr + ? result + 1.0f + : result) + ; + } + + return _a - fract(_a); + } + + void mtxLookAtImpl(float* _result, const float* _eye, const float* _view, const float* _up) + { + float up[3] = { 0.0f, 1.0f, 0.0f }; + if (NULL != _up) + { + up[0] = _up[0]; + up[1] = _up[1]; + up[2] = _up[2]; + } + + float tmp[4]; + vec3Cross(tmp, up, _view); + + float right[4]; + vec3Norm(right, tmp); + + vec3Cross(up, _view, right); + + memSet(_result, 0, sizeof(float)*16); + _result[ 0] = right[0]; + _result[ 1] = up[0]; + _result[ 2] = _view[0]; + + _result[ 4] = right[1]; + _result[ 5] = up[1]; + _result[ 6] = _view[1]; + + _result[ 8] = right[2]; + _result[ 9] = up[2]; + _result[10] = _view[2]; + + _result[12] = -vec3Dot(right, _eye); + _result[13] = -vec3Dot(up, _eye); + _result[14] = -vec3Dot(_view, _eye); + _result[15] = 1.0f; + } + + void mtxLookAtLh(float* _result, const float* _eye, const float* _at, const float* _up) + { + float tmp[4]; + vec3Sub(tmp, _at, _eye); + + float view[4]; + vec3Norm(view, tmp); + + mtxLookAtImpl(_result, _eye, view, _up); + } + + void mtxLookAtRh(float* _result, const float* _eye, const float* _at, const float* _up) + { + float tmp[4]; + vec3Sub(tmp, _eye, _at); + + float view[4]; + vec3Norm(view, tmp); + + mtxLookAtImpl(_result, _eye, view, _up); + } + + void mtxLookAt(float* _result, const float* _eye, const float* _at, const float* _up) + { + mtxLookAtLh(_result, _eye, _at, _up); + } + + template + void mtxProjXYWH(float* _result, float _x, float _y, float _width, float _height, float _near, float _far, bool _oglNdc) + { + const float diff = _far-_near; + const float aa = _oglNdc ? ( _far+_near)/diff : _far/diff; + const float bb = _oglNdc ? (2.0f*_far*_near)/diff : _near*aa; + + memSet(_result, 0, sizeof(float)*16); + _result[ 0] = _width; + _result[ 5] = _height; + _result[ 8] = (Handness::Right == HandnessT) ? _x : -_x; + _result[ 9] = (Handness::Right == HandnessT) ? _y : -_y; + _result[10] = (Handness::Right == HandnessT) ? -aa : aa; + _result[11] = (Handness::Right == HandnessT) ? -1.0f : 1.0f; + _result[14] = -bb; + } + + template + void mtxProjImpl(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc) + { + const float invDiffRl = 1.0f/(_rt - _lt); + const float invDiffUd = 1.0f/(_ut - _dt); + const float width = 2.0f*_near * invDiffRl; + const float height = 2.0f*_near * invDiffUd; + const float xx = (_rt + _lt) * invDiffRl; + const float yy = (_ut + _dt) * invDiffUd; + mtxProjXYWH(_result, xx, yy, width, height, _near, _far, _oglNdc); + } + + template + void mtxProjImpl(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc) + { + mtxProjImpl(_result, _fov[0], _fov[1], _fov[2], _fov[3], _near, _far, _oglNdc); + } + + template + void mtxProjImpl(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc) + { + const float height = 1.0f/tan(toRad(_fovy)*0.5f); + const float width = height * 1.0f/_aspect; + mtxProjXYWH(_result, 0.0f, 0.0f, width, height, _near, _far, _oglNdc); + } + + void mtxProj(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc) + { + mtxProjImpl(_result, _ut, _dt, _lt, _rt, _near, _far, _oglNdc); + } + + void mtxProj(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc) + { + mtxProjImpl(_result, _fov, _near, _far, _oglNdc); + } + + void mtxProj(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc) + { + mtxProjImpl(_result, _fovy, _aspect, _near, _far, _oglNdc); + } + + void mtxProjLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc) + { + mtxProjImpl(_result, _ut, _dt, _lt, _rt, _near, _far, _oglNdc); + } + + void mtxProjLh(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc) + { + mtxProjImpl(_result, _fov, _near, _far, _oglNdc); + } + + void mtxProjLh(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc) + { + mtxProjImpl(_result, _fovy, _aspect, _near, _far, _oglNdc); + } + + void mtxProjRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, float _far, bool _oglNdc) + { + mtxProjImpl(_result, _ut, _dt, _lt, _rt, _near, _far, _oglNdc); + } + + void mtxProjRh(float* _result, const float _fov[4], float _near, float _far, bool _oglNdc) + { + mtxProjImpl(_result, _fov, _near, _far, _oglNdc); + } + + void mtxProjRh(float* _result, float _fovy, float _aspect, float _near, float _far, bool _oglNdc) + { + mtxProjImpl(_result, _fovy, _aspect, _near, _far, _oglNdc); + } + + template + void mtxProjInfXYWH(float* _result, float _x, float _y, float _width, float _height, float _near, bool _oglNdc) + { + float aa; + float bb; + if (BX_ENABLED(NearFar::Reverse == NearFarT) ) + { + aa = _oglNdc ? -1.0f : 0.0f; + bb = _oglNdc ? -2.0f*_near : -_near; + } + else + { + aa = 1.0f; + bb = _oglNdc ? 2.0f*_near : _near; + } + + memSet(_result, 0, sizeof(float)*16); + _result[ 0] = _width; + _result[ 5] = _height; + _result[ 8] = (Handness::Right == HandnessT) ? _x : -_x; + _result[ 9] = (Handness::Right == HandnessT) ? _y : -_y; + _result[10] = (Handness::Right == HandnessT) ? -aa : aa; + _result[11] = (Handness::Right == HandnessT) ? -1.0f : 1.0f; + _result[14] = -bb; + } + + template + void mtxProjInfImpl(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) + { + const float invDiffRl = 1.0f/(_rt - _lt); + const float invDiffUd = 1.0f/(_ut - _dt); + const float width = 2.0f*_near * invDiffRl; + const float height = 2.0f*_near * invDiffUd; + const float xx = (_rt + _lt) * invDiffRl; + const float yy = (_ut + _dt) * invDiffUd; + mtxProjInfXYWH(_result, xx, yy, width, height, _near, _oglNdc); + } + + template + void mtxProjInfImpl(float* _result, const float _fov[4], float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fov[0], _fov[1], _fov[2], _fov[3], _near, _oglNdc); + } + + template + void mtxProjInfImpl(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) + { + const float height = 1.0f/tan(toRad(_fovy)*0.5f); + const float width = height * 1.0f/_aspect; + mtxProjInfXYWH(_result, 0.0f, 0.0f, width, height, _near, _oglNdc); + } + + void mtxProjInf(float* _result, const float _fov[4], float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fov, _near, _oglNdc); + } + + void mtxProjInf(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _ut, _dt, _lt, _rt, _near, _oglNdc); + } + + void mtxProjInf(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fovy, _aspect, _near, _oglNdc); + } + + void mtxProjInfLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _ut, _dt, _lt, _rt, _near, _oglNdc); + } + + void mtxProjInfLh(float* _result, const float _fov[4], float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fov, _near, _oglNdc); + } + + void mtxProjInfLh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fovy, _aspect, _near, _oglNdc); + } + + void mtxProjInfRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _ut, _dt, _lt, _rt, _near, _oglNdc); + } + + void mtxProjInfRh(float* _result, const float _fov[4], float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fov, _near, _oglNdc); + } + + void mtxProjInfRh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fovy, _aspect, _near, _oglNdc); + } + + void mtxProjRevInfLh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _ut, _dt, _lt, _rt, _near, _oglNdc); + } + + void mtxProjRevInfLh(float* _result, const float _fov[4], float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fov, _near, _oglNdc); + } + + void mtxProjRevInfLh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fovy, _aspect, _near, _oglNdc); + } + + void mtxProjRevInfRh(float* _result, float _ut, float _dt, float _lt, float _rt, float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _ut, _dt, _lt, _rt, _near, _oglNdc); + } + + void mtxProjRevInfRh(float* _result, const float _fov[4], float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fov, _near, _oglNdc); + } + + void mtxProjRevInfRh(float* _result, float _fovy, float _aspect, float _near, bool _oglNdc) + { + mtxProjInfImpl(_result, _fovy, _aspect, _near, _oglNdc); + } + + template + void mtxOrthoImpl(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc) + { + const float aa = 2.0f/(_right - _left); + const float bb = 2.0f/(_top - _bottom); + const float cc = (_oglNdc ? 2.0f : 1.0f) / (_far - _near); + const float dd = (_left + _right )/(_left - _right); + const float ee = (_top + _bottom)/(_bottom - _top ); + const float ff = _oglNdc + ? (_near + _far)/(_near - _far) + : _near /(_near - _far) + ; + + memSet(_result, 0, sizeof(float)*16); + _result[ 0] = aa; + _result[ 5] = bb; + _result[10] = (Handness::Right == HandnessT) ? -cc : cc; + _result[12] = dd + _offset; + _result[13] = ee; + _result[14] = ff; + _result[15] = 1.0f; + } + + void mtxOrtho(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc) + { + mtxOrthoImpl(_result, _left, _right, _bottom, _top, _near, _far, _offset, _oglNdc); + } + + void mtxOrthoLh(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc) + { + mtxOrthoImpl(_result, _left, _right, _bottom, _top, _near, _far, _offset, _oglNdc); + } + + void mtxOrthoRh(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset, bool _oglNdc) + { + mtxOrthoImpl(_result, _left, _right, _bottom, _top, _near, _far, _offset, _oglNdc); + } + + void mtxRotateX(float* _result, float _ax) + { + const float sx = sin(_ax); + const float cx = cos(_ax); + + memSet(_result, 0, sizeof(float)*16); + _result[ 0] = 1.0f; + _result[ 5] = cx; + _result[ 6] = -sx; + _result[ 9] = sx; + _result[10] = cx; + _result[15] = 1.0f; + } + + void mtxRotateY(float* _result, float _ay) + { + const float sy = sin(_ay); + const float cy = cos(_ay); + + memSet(_result, 0, sizeof(float)*16); + _result[ 0] = cy; + _result[ 2] = sy; + _result[ 5] = 1.0f; + _result[ 8] = -sy; + _result[10] = cy; + _result[15] = 1.0f; + } + + void mtxRotateZ(float* _result, float _az) + { + const float sz = sin(_az); + const float cz = cos(_az); + + memSet(_result, 0, sizeof(float)*16); + _result[ 0] = cz; + _result[ 1] = -sz; + _result[ 4] = sz; + _result[ 5] = cz; + _result[10] = 1.0f; + _result[15] = 1.0f; + } + + void mtxRotateXY(float* _result, float _ax, float _ay) + { + const float sx = sin(_ax); + const float cx = cos(_ax); + const float sy = sin(_ay); + const float cy = cos(_ay); + + memSet(_result, 0, sizeof(float)*16); + _result[ 0] = cy; + _result[ 2] = sy; + _result[ 4] = sx*sy; + _result[ 5] = cx; + _result[ 6] = -sx*cy; + _result[ 8] = -cx*sy; + _result[ 9] = sx; + _result[10] = cx*cy; + _result[15] = 1.0f; + } + + void mtxRotateXYZ(float* _result, float _ax, float _ay, float _az) + { + const float sx = sin(_ax); + const float cx = cos(_ax); + const float sy = sin(_ay); + const float cy = cos(_ay); + const float sz = sin(_az); + const float cz = cos(_az); + + memSet(_result, 0, sizeof(float)*16); + _result[ 0] = cy*cz; + _result[ 1] = -cy*sz; + _result[ 2] = sy; + _result[ 4] = cz*sx*sy + cx*sz; + _result[ 5] = cx*cz - sx*sy*sz; + _result[ 6] = -cy*sx; + _result[ 8] = -cx*cz*sy + sx*sz; + _result[ 9] = cz*sx + cx*sy*sz; + _result[10] = cx*cy; + _result[15] = 1.0f; + } + + void mtxRotateZYX(float* _result, float _ax, float _ay, float _az) + { + const float sx = sin(_ax); + const float cx = cos(_ax); + const float sy = sin(_ay); + const float cy = cos(_ay); + const float sz = sin(_az); + const float cz = cos(_az); + + memSet(_result, 0, sizeof(float)*16); + _result[ 0] = cy*cz; + _result[ 1] = cz*sx*sy-cx*sz; + _result[ 2] = cx*cz*sy+sx*sz; + _result[ 4] = cy*sz; + _result[ 5] = cx*cz + sx*sy*sz; + _result[ 6] = -cz*sx + cx*sy*sz; + _result[ 8] = -sy; + _result[ 9] = cy*sx; + _result[10] = cx*cy; + _result[15] = 1.0f; + }; + + void mtxSRT(float* _result, float _sx, float _sy, float _sz, float _ax, float _ay, float _az, float _tx, float _ty, float _tz) + { + const float sx = sin(_ax); + const float cx = cos(_ax); + const float sy = sin(_ay); + const float cy = cos(_ay); + const float sz = sin(_az); + const float cz = cos(_az); + + const float sxsz = sx*sz; + const float cycz = cy*cz; + + _result[ 0] = _sx * (cycz - sxsz*sy); + _result[ 1] = _sx * -cx*sz; + _result[ 2] = _sx * (cz*sy + cy*sxsz); + _result[ 3] = 0.0f; + + _result[ 4] = _sy * (cz*sx*sy + cy*sz); + _result[ 5] = _sy * cx*cz; + _result[ 6] = _sy * (sy*sz -cycz*sx); + _result[ 7] = 0.0f; + + _result[ 8] = _sz * -cx*sy; + _result[ 9] = _sz * sx; + _result[10] = _sz * cx*cy; + _result[11] = 0.0f; + + _result[12] = _tx; + _result[13] = _ty; + _result[14] = _tz; + _result[15] = 1.0f; + } + + void mtx3Inverse(float* _result, const float* _a) + { + float xx = _a[0]; + float xy = _a[1]; + float xz = _a[2]; + float yx = _a[3]; + float yy = _a[4]; + float yz = _a[5]; + float zx = _a[6]; + float zy = _a[7]; + float zz = _a[8]; + + float det = 0.0f; + det += xx * (yy*zz - yz*zy); + det -= xy * (yx*zz - yz*zx); + det += xz * (yx*zy - yy*zx); + + float invDet = 1.0f/det; + + _result[0] = +(yy*zz - yz*zy) * invDet; + _result[1] = -(xy*zz - xz*zy) * invDet; + _result[2] = +(xy*yz - xz*yy) * invDet; + + _result[3] = -(yx*zz - yz*zx) * invDet; + _result[4] = +(xx*zz - xz*zx) * invDet; + _result[5] = -(xx*yz - xz*yx) * invDet; + + _result[6] = +(yx*zy - yy*zx) * invDet; + _result[7] = -(xx*zy - xy*zx) * invDet; + _result[8] = +(xx*yy - xy*yx) * invDet; + } + + void mtxInverse(float* _result, const float* _a) + { + float xx = _a[ 0]; + float xy = _a[ 1]; + float xz = _a[ 2]; + float xw = _a[ 3]; + float yx = _a[ 4]; + float yy = _a[ 5]; + float yz = _a[ 6]; + float yw = _a[ 7]; + float zx = _a[ 8]; + float zy = _a[ 9]; + float zz = _a[10]; + float zw = _a[11]; + float wx = _a[12]; + float wy = _a[13]; + float wz = _a[14]; + float ww = _a[15]; + + float det = 0.0f; + det += xx * (yy*(zz*ww - zw*wz) - yz*(zy*ww - zw*wy) + yw*(zy*wz - zz*wy) ); + det -= xy * (yx*(zz*ww - zw*wz) - yz*(zx*ww - zw*wx) + yw*(zx*wz - zz*wx) ); + det += xz * (yx*(zy*ww - zw*wy) - yy*(zx*ww - zw*wx) + yw*(zx*wy - zy*wx) ); + det -= xw * (yx*(zy*wz - zz*wy) - yy*(zx*wz - zz*wx) + yz*(zx*wy - zy*wx) ); + + float invDet = 1.0f/det; + + _result[ 0] = +(yy*(zz*ww - wz*zw) - yz*(zy*ww - wy*zw) + yw*(zy*wz - wy*zz) ) * invDet; + _result[ 1] = -(xy*(zz*ww - wz*zw) - xz*(zy*ww - wy*zw) + xw*(zy*wz - wy*zz) ) * invDet; + _result[ 2] = +(xy*(yz*ww - wz*yw) - xz*(yy*ww - wy*yw) + xw*(yy*wz - wy*yz) ) * invDet; + _result[ 3] = -(xy*(yz*zw - zz*yw) - xz*(yy*zw - zy*yw) + xw*(yy*zz - zy*yz) ) * invDet; + + _result[ 4] = -(yx*(zz*ww - wz*zw) - yz*(zx*ww - wx*zw) + yw*(zx*wz - wx*zz) ) * invDet; + _result[ 5] = +(xx*(zz*ww - wz*zw) - xz*(zx*ww - wx*zw) + xw*(zx*wz - wx*zz) ) * invDet; + _result[ 6] = -(xx*(yz*ww - wz*yw) - xz*(yx*ww - wx*yw) + xw*(yx*wz - wx*yz) ) * invDet; + _result[ 7] = +(xx*(yz*zw - zz*yw) - xz*(yx*zw - zx*yw) + xw*(yx*zz - zx*yz) ) * invDet; + + _result[ 8] = +(yx*(zy*ww - wy*zw) - yy*(zx*ww - wx*zw) + yw*(zx*wy - wx*zy) ) * invDet; + _result[ 9] = -(xx*(zy*ww - wy*zw) - xy*(zx*ww - wx*zw) + xw*(zx*wy - wx*zy) ) * invDet; + _result[10] = +(xx*(yy*ww - wy*yw) - xy*(yx*ww - wx*yw) + xw*(yx*wy - wx*yy) ) * invDet; + _result[11] = -(xx*(yy*zw - zy*yw) - xy*(yx*zw - zx*yw) + xw*(yx*zy - zx*yy) ) * invDet; + + _result[12] = -(yx*(zy*wz - wy*zz) - yy*(zx*wz - wx*zz) + yz*(zx*wy - wx*zy) ) * invDet; + _result[13] = +(xx*(zy*wz - wy*zz) - xy*(zx*wz - wx*zz) + xz*(zx*wy - wx*zy) ) * invDet; + _result[14] = -(xx*(yy*wz - wy*yz) - xy*(yx*wz - wx*yz) + xz*(yx*wy - wx*yy) ) * invDet; + _result[15] = +(xx*(yy*zz - zy*yz) - xy*(yx*zz - zx*yz) + xz*(yx*zy - zx*yy) ) * invDet; + } + + void calcLinearFit2D(float _result[2], const void* _points, uint32_t _stride, uint32_t _numPoints) + { + float sumX = 0.0f; + float sumY = 0.0f; + float sumXX = 0.0f; + float sumXY = 0.0f; + + const uint8_t* ptr = (const uint8_t*)_points; + for (uint32_t ii = 0; ii < _numPoints; ++ii, ptr += _stride) + { + const float* point = (const float*)ptr; + float xx = point[0]; + float yy = point[1]; + sumX += xx; + sumY += yy; + sumXX += xx*xx; + sumXY += xx*yy; + } + + // [ sum(x^2) sum(x) ] [ A ] = [ sum(x*y) ] + // [ sum(x) numPoints ] [ B ] [ sum(y) ] + + float det = (sumXX*_numPoints - sumX*sumX); + float invDet = 1.0f/det; + + _result[0] = (-sumX * sumY + _numPoints * sumXY) * invDet; + _result[1] = (sumXX * sumY - sumX * sumXY) * invDet; + } + + void calcLinearFit3D(float _result[3], const void* _points, uint32_t _stride, uint32_t _numPoints) + { + float sumX = 0.0f; + float sumY = 0.0f; + float sumZ = 0.0f; + float sumXX = 0.0f; + float sumXY = 0.0f; + float sumXZ = 0.0f; + float sumYY = 0.0f; + float sumYZ = 0.0f; + + const uint8_t* ptr = (const uint8_t*)_points; + for (uint32_t ii = 0; ii < _numPoints; ++ii, ptr += _stride) + { + const float* point = (const float*)ptr; + float xx = point[0]; + float yy = point[1]; + float zz = point[2]; + + sumX += xx; + sumY += yy; + sumZ += zz; + sumXX += xx*xx; + sumXY += xx*yy; + sumXZ += xx*zz; + sumYY += yy*yy; + sumYZ += yy*zz; + } + + // [ sum(x^2) sum(x*y) sum(x) ] [ A ] [ sum(x*z) ] + // [ sum(x*y) sum(y^2) sum(y) ] [ B ] = [ sum(y*z) ] + // [ sum(x) sum(y) numPoints ] [ C ] [ sum(z) ] + + float mtx[9] = + { + sumXX, sumXY, sumX, + sumXY, sumYY, sumY, + sumX, sumY, float(_numPoints), + }; + float invMtx[9]; + mtx3Inverse(invMtx, mtx); + + _result[0] = invMtx[0]*sumXZ + invMtx[1]*sumYZ + invMtx[2]*sumZ; + _result[1] = invMtx[3]*sumXZ + invMtx[4]*sumYZ + invMtx[5]*sumZ; + _result[2] = invMtx[6]*sumXZ + invMtx[7]*sumYZ + invMtx[8]*sumZ; + } + + void rgbToHsv(float _hsv[3], const float _rgb[3]) + { + const float rr = _rgb[0]; + const float gg = _rgb[1]; + const float bb = _rgb[2]; + + const float s0 = step(bb, gg); + + const float px = lerp(bb, gg, s0); + const float py = lerp(gg, bb, s0); + const float pz = lerp(-1.0f, 0.0f, s0); + const float pw = lerp(2.0f/3.0f, -1.0f/3.0f, s0); + + const float s1 = step(px, rr); + + const float qx = lerp(px, rr, s1); + const float qy = py; + const float qz = lerp(pw, pz, s1); + const float qw = lerp(rr, px, s1); + + const float dd = qx - min(qw, qy); + const float ee = 1.0e-10f; + + _hsv[0] = abs(qz + (qw - qy) / (6.0f * dd + ee) ); + _hsv[1] = dd / (qx + ee); + _hsv[2] = qx; + } + + void hsvToRgb(float _rgb[3], const float _hsv[3]) + { + const float hh = _hsv[0]; + const float ss = _hsv[1]; + const float vv = _hsv[2]; + + const float px = abs(fract(hh + 1.0f ) * 6.0f - 3.0f); + const float py = abs(fract(hh + 2.0f/3.0f) * 6.0f - 3.0f); + const float pz = abs(fract(hh + 1.0f/3.0f) * 6.0f - 3.0f); + + _rgb[0] = vv * lerp(1.0f, clamp(px - 1.0f, 0.0f, 1.0f), ss); + _rgb[1] = vv * lerp(1.0f, clamp(py - 1.0f, 0.0f, 1.0f), ss); + _rgb[2] = vv * lerp(1.0f, clamp(pz - 1.0f, 0.0f, 1.0f), ss); + } + +} // namespace bx diff --git a/3rdparty/bx/src/mutex.cpp b/3rdparty/bx/src/mutex.cpp index 988084b..e144985 100644 --- a/3rdparty/bx/src/mutex.cpp +++ b/3rdparty/bx/src/mutex.cpp @@ -1,15 +1,15 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #if BX_CONFIG_SUPPORTS_THREADING #if BX_PLATFORM_ANDROID \ || BX_PLATFORM_LINUX \ - || BX_PLATFORM_NACL \ || BX_PLATFORM_IOS \ || BX_PLATFORM_OSX \ || BX_PLATFORM_PS4 \ @@ -17,7 +17,6 @@ # include #elif BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOX360 \ || BX_PLATFORM_XBOXONE # include # include @@ -25,7 +24,9 @@ namespace bx { -#if BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360 || BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT +#if BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_WINRT typedef CRITICAL_SECTION pthread_mutex_t; typedef unsigned pthread_mutexattr_t; @@ -69,7 +70,9 @@ namespace bx pthread_mutexattr_t attr; -#if BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360 || BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT +#if BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_WINRT #else pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); diff --git a/3rdparty/bx/src/os.cpp b/3rdparty/bx/src/os.cpp index 0c7e9dc..7846ecb 100644 --- a/3rdparty/bx/src/os.cpp +++ b/3rdparty/bx/src/os.cpp @@ -1,50 +1,55 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" +#include #include #include -#include #if !BX_PLATFORM_NONE #include -#include + +#if BX_CRT_MSVC +# include +#else +# include +#endif // BX_CRT_MSVC #if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT # include # include -#elif BX_PLATFORM_ANDROID \ +#elif BX_PLATFORM_ANDROID \ || BX_PLATFORM_EMSCRIPTEN \ - || BX_PLATFORM_BSD \ - || BX_PLATFORM_HURD \ - || BX_PLATFORM_IOS \ - || BX_PLATFORM_LINUX \ - || BX_PLATFORM_NACL \ - || BX_PLATFORM_OSX \ - || BX_PLATFORM_PS4 \ - || BX_PLATFORM_RPI \ - || BX_PLATFORM_STEAMLINK + || BX_PLATFORM_BSD \ + || BX_PLATFORM_HURD \ + || BX_PLATFORM_IOS \ + || BX_PLATFORM_LINUX \ + || BX_PLATFORM_OSX \ + || BX_PLATFORM_PS4 \ + || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK \ + || BX_PLATFORM_NX # include // sched_yield -# if BX_PLATFORM_BSD \ - || BX_PLATFORM_IOS \ - || BX_PLATFORM_NACL \ - || BX_PLATFORM_OSX \ - || BX_PLATFORM_PS4 \ +# if BX_PLATFORM_BSD \ + || BX_PLATFORM_IOS \ + || BX_PLATFORM_OSX \ + || BX_PLATFORM_PS4 \ || BX_PLATFORM_STEAMLINK # include // mach_port_t # endif // BX_PLATFORM_* # include // nanosleep -# if !BX_PLATFORM_PS4 && !BX_PLATFORM_NACL +# if !BX_PLATFORM_PS4 # include // dlopen, dlclose, dlsym -# endif // !BX_PLATFORM_PS4 && !BX_PLATFORM_NACL +# endif // !BX_PLATFORM_PS4 # if BX_PLATFORM_ANDROID # include // mallinfo -# elif BX_PLATFORM_LINUX \ - || BX_PLATFORM_RPI \ +# elif BX_PLATFORM_LINUX \ + || BX_PLATFORM_RPI \ || BX_PLATFORM_STEAMLINK # include // syscall # include @@ -57,25 +62,20 @@ # endif // BX_PLATFORM_ANDROID #endif // BX_PLATFORM_ -#if BX_CRT_MSVC -# include // _getcwd -#else -# include // getcwd -#endif // BX_CRT_MSVC - namespace bx { void sleep(uint32_t _ms) { -#if BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360 +#if BX_PLATFORM_WINDOWS ::Sleep(_ms); -#elif BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT +#elif BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_WINRT BX_UNUSED(_ms); debugOutput("sleep is not implemented"); debugBreak(); #else - timespec req = {(time_t)_ms/1000, (long)((_ms%1000)*1000000)}; - timespec rem = {0, 0}; + timespec req = { (time_t)_ms/1000, (long)( (_ms%1000)*1000000) }; + timespec rem = { 0, 0 }; ::nanosleep(&req, &rem); #endif // BX_PLATFORM_ } @@ -84,9 +84,8 @@ namespace bx { #if BX_PLATFORM_WINDOWS ::SwitchToThread(); -#elif BX_PLATFORM_XBOX360 - ::Sleep(0); -#elif BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT +#elif BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_WINRT debugOutput("yield is not implemented"); debugBreak(); #else ::sched_yield(); @@ -97,20 +96,21 @@ namespace bx { #if BX_PLATFORM_WINDOWS return ::GetCurrentThreadId(); -#elif BX_PLATFORM_LINUX || BX_PLATFORM_RPI || BX_PLATFORM_STEAMLINK +#elif BX_PLATFORM_LINUX \ + || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK return (pid_t)::syscall(SYS_gettid); -#elif BX_PLATFORM_IOS || BX_PLATFORM_OSX +#elif BX_PLATFORM_IOS \ + || BX_PLATFORM_OSX return (mach_port_t)::pthread_mach_thread_np(pthread_self() ); -#elif BX_PLATFORM_BSD || BX_PLATFORM_NACL - // Casting __nc_basic_thread_data*... need better way to do this. +#elif BX_PLATFORM_BSD return *(uint32_t*)::pthread_self(); #elif BX_PLATFORM_HURD return (pthread_t)::pthread_self(); #else -//# pragma message "not implemented." debugOutput("getTid is not implemented"); debugBreak(); return 0; -#endif // +#endif // BX_PLATFORM_ } size_t getProcessMemoryUsed() @@ -118,7 +118,8 @@ namespace bx #if BX_PLATFORM_ANDROID struct mallinfo mi = mallinfo(); return mi.uordblks; -#elif BX_PLATFORM_LINUX || BX_PLATFORM_HURD +#elif BX_PLATFORM_LINUX \ + || BX_PLATFORM_HURD FILE* file = fopen("/proc/self/statm", "r"); if (NULL == file) { @@ -142,7 +143,7 @@ namespace bx , (task_info_t)&info , &infoCount ); -# else // MACH_TASK_BASIC_INFO +# else task_basic_info info; mach_msg_type_number_t infoCount = TASK_BASIC_INFO_COUNT; @@ -151,7 +152,7 @@ namespace bx , (task_info_t)&info , &infoCount ); -# endif // MACH_TASK_BASIC_INFO +# endif // defined(MACH_TASK_BASIC_INFO) if (KERN_SUCCESS != result) { return 0; @@ -175,9 +176,8 @@ namespace bx #if BX_PLATFORM_WINDOWS return (void*)::LoadLibraryA(_filePath); #elif BX_PLATFORM_EMSCRIPTEN \ - || BX_PLATFORM_NACL \ - || BX_PLATFORM_PS4 \ - || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_PS4 \ + || BX_PLATFORM_XBOXONE \ || BX_PLATFORM_WINRT BX_UNUSED(_filePath); return NULL; @@ -191,9 +191,8 @@ namespace bx #if BX_PLATFORM_WINDOWS ::FreeLibrary( (HMODULE)_handle); #elif BX_PLATFORM_EMSCRIPTEN \ - || BX_PLATFORM_NACL \ - || BX_PLATFORM_PS4 \ - || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_PS4 \ + || BX_PLATFORM_XBOXONE \ || BX_PLATFORM_WINRT BX_UNUSED(_handle); #else @@ -206,9 +205,8 @@ namespace bx #if BX_PLATFORM_WINDOWS return (void*)::GetProcAddress( (HMODULE)_handle, _symbol); #elif BX_PLATFORM_EMSCRIPTEN \ - || BX_PLATFORM_NACL \ - || BX_PLATFORM_PS4 \ - || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_PS4 \ + || BX_PLATFORM_XBOXONE \ || BX_PLATFORM_WINRT BX_UNUSED(_handle, _symbol); return NULL; @@ -224,7 +222,7 @@ namespace bx bool result = len != 0 && len < *_inOutSize; *_inOutSize = len; return result; -#elif BX_PLATFORM_PS4 \ +#elif BX_PLATFORM_PS4 \ || BX_PLATFORM_XBOXONE \ || BX_PLATFORM_WINRT BX_UNUSED(_name, _out, _inOutSize); @@ -235,12 +233,12 @@ namespace bx bool result = false; if (NULL != ptr) { - len = (uint32_t)strnlen(ptr); + len = (uint32_t)strLen(ptr); result = len != 0 && len < *_inOutSize; if (len < *_inOutSize) { - strlncpy(_out, len, ptr); + strCopy(_out, *_inOutSize, ptr); } } @@ -253,7 +251,7 @@ namespace bx { #if BX_PLATFORM_WINDOWS ::SetEnvironmentVariableA(_name, _value); -#elif BX_PLATFORM_PS4 \ +#elif BX_PLATFORM_PS4 \ || BX_PLATFORM_XBOXONE \ || BX_PLATFORM_WINRT BX_UNUSED(_name, _value); @@ -266,7 +264,7 @@ namespace bx { #if BX_PLATFORM_WINDOWS ::SetEnvironmentVariableA(_name, NULL); -#elif BX_PLATFORM_PS4 \ +#elif BX_PLATFORM_PS4 \ || BX_PLATFORM_XBOXONE \ || BX_PLATFORM_WINRT BX_UNUSED(_name); @@ -277,7 +275,7 @@ namespace bx int chdir(const char* _path) { -#if BX_PLATFORM_PS4 \ +#if BX_PLATFORM_PS4 \ || BX_PLATFORM_XBOXONE \ || BX_PLATFORM_WINRT BX_UNUSED(_path); @@ -289,114 +287,10 @@ namespace bx #endif // BX_COMPILER_ } - char* pwd(char* _buffer, uint32_t _size) - { -#if BX_PLATFORM_PS4 \ - || BX_PLATFORM_XBOXONE \ - || BX_PLATFORM_WINRT - BX_UNUSED(_buffer, _size); - return NULL; -#elif BX_CRT_MSVC - return ::_getcwd(_buffer, (int)_size); -#else - return ::getcwd(_buffer, _size); -#endif // BX_COMPILER_ - } - - bool getTempPath(char* _out, uint32_t* _inOutSize) - { -#if BX_PLATFORM_WINDOWS - uint32_t len = ::GetTempPathA(*_inOutSize, _out); - bool result = len != 0 && len < *_inOutSize; - *_inOutSize = len; - return result; -#else - static const char* s_tmp[] = - { - "TMPDIR", - "TMP", - "TEMP", - "TEMPDIR", - - NULL - }; - - for (const char** tmp = s_tmp; *tmp != NULL; ++tmp) - { - uint32_t len = *_inOutSize; - *_out = '\0'; - bool result = getenv(*tmp, _out, &len); - - if (result - && len != 0 - && len < *_inOutSize) - { - *_inOutSize = len; - return result; - } - } - - FileInfo fi; - if (stat("/tmp", fi) - && FileInfo::Directory == fi.m_type) - { - strlncpy(_out, *_inOutSize, "/tmp"); - *_inOutSize = 4; - return true; - } - - return false; -#endif // BX_PLATFORM_* - } - - bool stat(const char* _filePath, FileInfo& _fileInfo) - { - _fileInfo.m_size = 0; - _fileInfo.m_type = FileInfo::Count; - -#if BX_COMPILER_MSVC - struct ::_stat64 st; - int32_t result = ::_stat64(_filePath, &st); - - if (0 != result) - { - return false; - } - - if (0 != (st.st_mode & _S_IFREG) ) - { - _fileInfo.m_type = FileInfo::Regular; - } - else if (0 != (st.st_mode & _S_IFDIR) ) - { - _fileInfo.m_type = FileInfo::Directory; - } -#else - struct ::stat st; - int32_t result = ::stat(_filePath, &st); - if (0 != result) - { - return false; - } - - if (0 != (st.st_mode & S_IFREG) ) - { - _fileInfo.m_type = FileInfo::Regular; - } - else if (0 != (st.st_mode & S_IFDIR) ) - { - _fileInfo.m_type = FileInfo::Directory; - } -#endif // BX_COMPILER_MSVC - - _fileInfo.m_size = st.st_size; - - return true; - } - void* exec(const char* const* _argv) { -#if BX_PLATFORM_LINUX || BX_PLATFORM_HURD +#if BX_PLATFORM_LINUX \ + || BX_PLATFORM_HURD pid_t pid = fork(); if (0 == pid) @@ -408,9 +302,9 @@ namespace bx return (void*)uintptr_t(pid); #elif BX_PLATFORM_WINDOWS - STARTUPINFO si; - memSet(&si, 0, sizeof(STARTUPINFO) ); - si.cb = sizeof(STARTUPINFO); + STARTUPINFOA si; + memSet(&si, 0, sizeof(STARTUPINFOA) ); + si.cb = sizeof(STARTUPINFOA); PROCESS_INFORMATION pi; memSet(&pi, 0, sizeof(PROCESS_INFORMATION) ); @@ -418,7 +312,7 @@ namespace bx int32_t total = 0; for (uint32_t ii = 0; NULL != _argv[ii]; ++ii) { - total += (int32_t)strnlen(_argv[ii]) + 1; + total += (int32_t)strLen(_argv[ii]) + 1; } char* temp = (char*)alloca(total); @@ -426,22 +320,22 @@ namespace bx for(uint32_t ii = 0; NULL != _argv[ii]; ++ii) { len += snprintf(&temp[len], bx::uint32_imax(0, total-len) - , "%s " - , _argv[ii] - ); + , "%s " + , _argv[ii] + ); } bool ok = !!CreateProcessA(_argv[0] - , temp - , NULL - , NULL - , false - , 0 - , NULL - , NULL - , &si - , &pi - ); + , temp + , NULL + , NULL + , false + , 0 + , NULL + , NULL + , &si + , &pi + ); if (ok) { return pi.hProcess; diff --git a/3rdparty/bx/src/process.cpp b/3rdparty/bx/src/process.cpp new file mode 100644 index 0000000..90d663b --- /dev/null +++ b/3rdparty/bx/src/process.cpp @@ -0,0 +1,169 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "bx_p.h" +#include + +#include + +#ifndef BX_CONFIG_CRT_PROCESS +# define BX_CONFIG_CRT_PROCESS !(0 \ + || BX_CRT_NONE \ + || BX_PLATFORM_EMSCRIPTEN \ + || BX_PLATFORM_PS4 \ + || BX_PLATFORM_WINRT \ + || BX_PLATFORM_XBOXONE \ + ) +#endif // BX_CONFIG_CRT_PROCESS + +namespace bx +{ +#if BX_CONFIG_CRT_PROCESS + +#if BX_CRT_MSVC +# define popen _popen +# define pclose _pclose +#endif // BX_CRT_MSVC + + ProcessReader::ProcessReader() + : m_file(NULL) + { + } + + ProcessReader::~ProcessReader() + { + BX_CHECK(NULL == m_file, "Process not closed!"); + } + + bool ProcessReader::open(const FilePath& _filePath, const StringView& _args, Error* _err) + { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + + if (NULL != m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_ALREADY_OPEN, "ProcessReader: File is already open."); + return false; + } + + char tmp[kMaxFilePath*2] = "\""; + strCat(tmp, BX_COUNTOF(tmp), _filePath.get() ); + strCat(tmp, BX_COUNTOF(tmp), "\" "); + strCat(tmp, BX_COUNTOF(tmp), _args); + + m_file = popen(tmp, "r"); + if (NULL == m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "ProcessReader: Failed to open process."); + return false; + } + + return true; + } + + void ProcessReader::close() + { + BX_CHECK(NULL != m_file, "Process not open!"); + FILE* file = (FILE*)m_file; + m_exitCode = pclose(file); + m_file = NULL; + } + + int32_t ProcessReader::read(void* _data, int32_t _size, Error* _err) + { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); BX_UNUSED(_err); + + FILE* file = (FILE*)m_file; + int32_t size = (int32_t)fread(_data, 1, _size, file); + if (size != _size) + { + if (0 != feof(file) ) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_EOF, "ProcessReader: EOF."); + } + else if (0 != ferror(file) ) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_READ, "ProcessReader: read error."); + } + + return size >= 0 ? size : 0; + } + + return size; + } + + int32_t ProcessReader::getExitCode() const + { + return m_exitCode; + } + + ProcessWriter::ProcessWriter() + : m_file(NULL) + { + } + + ProcessWriter::~ProcessWriter() + { + BX_CHECK(NULL == m_file, "Process not closed!"); + } + + bool ProcessWriter::open(const FilePath& _filePath, const StringView& _args, Error* _err) + { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + + if (NULL != m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_ALREADY_OPEN, "ProcessWriter: File is already open."); + return false; + } + + char tmp[kMaxFilePath*2] = "\""; + strCat(tmp, BX_COUNTOF(tmp), _filePath.get() ); + strCat(tmp, BX_COUNTOF(tmp), "\" "); + strCat(tmp, BX_COUNTOF(tmp), _args); + + m_file = popen(tmp, "w"); + if (NULL == m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "ProcessWriter: Failed to open process."); + return false; + } + + return true; + } + + void ProcessWriter::close() + { + BX_CHECK(NULL != m_file, "Process not open!"); + FILE* file = (FILE*)m_file; + m_exitCode = pclose(file); + m_file = NULL; + } + + int32_t ProcessWriter::write(const void* _data, int32_t _size, Error* _err) + { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); BX_UNUSED(_err); + + FILE* file = (FILE*)m_file; + int32_t size = (int32_t)fwrite(_data, 1, _size, file); + if (size != _size) + { + if (0 != ferror(file) ) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_WRITE, "ProcessWriter: write error."); + } + + return size >= 0 ? size : 0; + } + + return size; + } + + int32_t ProcessWriter::getExitCode() const + { + return m_exitCode; + } +#endif // BX_CONFIG_CRT_PROCESS + +} // namespace bx diff --git a/3rdparty/bx/src/semaphore.cpp b/3rdparty/bx/src/semaphore.cpp index b4369ff..756f41e 100644 --- a/3rdparty/bx/src/semaphore.cpp +++ b/3rdparty/bx/src/semaphore.cpp @@ -1,20 +1,23 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #if BX_CONFIG_SUPPORTS_THREADING -#if BX_PLATFORM_POSIX +#if BX_PLATFORM_OSX \ +|| BX_PLATFORM_IOS +# include +#elif BX_PLATFORM_POSIX # include # include # include # include #elif BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOX360 \ || BX_PLATFORM_XBOXONE # include # include @@ -23,36 +26,87 @@ # endif // BX_PLATFORM_XBOXONE #endif // BX_PLATFORM_ -#ifndef BX_CONFIG_SEMAPHORE_PTHREAD -# define BX_CONFIG_SEMAPHORE_PTHREAD (0 \ - || BX_PLATFORM_OSX \ - || BX_PLATFORM_IOS \ - ) -#endif // BX_CONFIG_SEMAPHORE_PTHREAD - namespace bx { struct SemaphoreInternal { -#if BX_PLATFORM_POSIX -# if BX_CONFIG_SEMAPHORE_PTHREAD +#if BX_PLATFORM_OSX \ +|| BX_PLATFORM_IOS + dispatch_semaphore_t m_handle; +#elif BX_PLATFORM_POSIX pthread_mutex_t m_mutex; pthread_cond_t m_cond; int32_t m_count; -# else - sem_t m_handle; -# endif // BX_CONFIG_SEMAPHORE_PTHREAD #elif BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOX360 \ || BX_PLATFORM_XBOXONE HANDLE m_handle; #endif // BX_PLATFORM_ }; -#if BX_PLATFORM_POSIX +#if BX_PLATFORM_OSX \ +|| BX_PLATFORM_IOS + + Semaphore::Semaphore() + { + BX_STATIC_ASSERT(sizeof(SemaphoreInternal) <= sizeof(m_internal) ); + + SemaphoreInternal* si = (SemaphoreInternal*)m_internal; + si->m_handle = dispatch_semaphore_create(0); + BX_CHECK(NULL != si->m_handle, "dispatch_semaphore_create failed."); + } + + Semaphore::~Semaphore() + { + SemaphoreInternal* si = (SemaphoreInternal*)m_internal; + dispatch_release(si->m_handle); + } + + void Semaphore::post(uint32_t _count) + { + SemaphoreInternal* si = (SemaphoreInternal*)m_internal; + + for (uint32_t ii = 0; ii < _count; ++ii) + { + dispatch_semaphore_signal(si->m_handle); + } + } + + bool Semaphore::wait(int32_t _msecs) + { + SemaphoreInternal* si = (SemaphoreInternal*)m_internal; + + dispatch_time_t dt = 0 > _msecs + ? DISPATCH_TIME_FOREVER + : dispatch_time(DISPATCH_TIME_NOW, int64_t(_msecs)*1000000) + ; + return !dispatch_semaphore_wait(si->m_handle, dt); + } + +#elif BX_PLATFORM_POSIX + + uint64_t toNs(const timespec& _ts) + { + return _ts.tv_sec*UINT64_C(1000000000) + _ts.tv_nsec; + } + + void toTimespecNs(timespec& _ts, uint64_t _nsecs) + { + _ts.tv_sec = _nsecs/UINT64_C(1000000000); + _ts.tv_nsec = _nsecs%UINT64_C(1000000000); + } + + void toTimespecMs(timespec& _ts, int32_t _msecs) + { + toTimespecNs(_ts, uint64_t(_msecs)*1000000); + } + + void add(timespec& _ts, int32_t _msecs) + { + uint64_t ns = toNs(_ts); + toTimespecNs(_ts, ns + uint64_t(_msecs)*1000000); + } -# if BX_CONFIG_SEMAPHORE_PTHREAD Semaphore::Semaphore() { BX_STATIC_ASSERT(sizeof(SemaphoreInternal) <= sizeof(m_internal) ); @@ -113,15 +167,6 @@ namespace bx int result = pthread_mutex_lock(&si->m_mutex); BX_CHECK(0 == result, "pthread_mutex_lock %d", result); -# if BX_PLATFORM_NACL || BX_PLATFORM_OSX - BX_UNUSED(_msecs); - BX_CHECK(-1 == _msecs, "NaCl and OSX don't support pthread_cond_timedwait at this moment."); - while (0 == result - && 0 >= si->m_count) - { - result = pthread_cond_wait(&si->m_cond, &si->m_mutex); - } -# elif BX_PLATFORM_IOS if (-1 == _msecs) { while (0 == result @@ -133,27 +178,16 @@ namespace bx else { timespec ts; - ts.tv_sec = _msecs/1000; - ts.tv_nsec = (_msecs%1000)*1000; + clock_gettime(CLOCK_REALTIME, &ts); + add(ts, _msecs); while (0 == result && 0 >= si->m_count) { - result = pthread_cond_timedwait_relative_np(&si->m_cond, &si->m_mutex, &ts); + result = pthread_cond_timedwait(&si->m_cond, &si->m_mutex, &ts); } } -# else - timespec ts; - clock_gettime(CLOCK_REALTIME, &ts); - ts.tv_sec += _msecs/1000; - ts.tv_nsec += (_msecs%1000)*1000; - while (0 == result - && 0 >= si->m_count) - { - result = pthread_cond_timedwait(&si->m_cond, &si->m_mutex, &ts); - } -# endif // BX_PLATFORM_ bool ok = 0 == result; if (ok) @@ -169,80 +203,16 @@ namespace bx return ok; } -# else - - Semaphore::Semaphore() - { - BX_STATIC_ASSERT(sizeof(SemaphoreInternal) <= sizeof(m_internal) ); - - SemaphoreInternal* si = (SemaphoreInternal*)m_internal; - - int32_t result = sem_init(&si->m_handle, 0, 0); - BX_CHECK(0 == result, "sem_init failed. errno %d", errno); - BX_UNUSED(result); - } - - Semaphore::~Semaphore() - { - SemaphoreInternal* si = (SemaphoreInternal*)m_internal; - - int32_t result = sem_destroy(&si->m_handle); - BX_CHECK(0 == result, "sem_destroy failed. errno %d", errno); - BX_UNUSED(result); - } - - void Semaphore::post(uint32_t _count) - { - SemaphoreInternal* si = (SemaphoreInternal*)m_internal; - - int32_t result; - for (uint32_t ii = 0; ii < _count; ++ii) - { - result = sem_post(&si->m_handle); - BX_CHECK(0 == result, "sem_post failed. errno %d", errno); - } - BX_UNUSED(result); - } - - bool Semaphore::wait(int32_t _msecs) - { - SemaphoreInternal* si = (SemaphoreInternal*)m_internal; - -# if BX_PLATFORM_NACL || BX_PLATFORM_OSX - BX_CHECK(-1 == _msecs, "NaCl and OSX don't support sem_timedwait at this moment."); BX_UNUSED(_msecs); - return 0 == sem_wait(&si->m_handle); -# else - if (0 > _msecs) - { - int32_t result; - do - { - result = sem_wait(&si->m_handle); - } // keep waiting when interrupted by a signal handler... - while (-1 == result && EINTR == errno); - BX_CHECK(0 == result, "sem_wait failed. errno %d", errno); - return 0 == result; - } - - timespec ts; - clock_gettime(CLOCK_REALTIME, &ts); - ts.tv_sec += _msecs/1000; - ts.tv_nsec += (_msecs%1000)*1000; - return 0 == sem_timedwait(&si->m_handle, &ts); -# endif // BX_PLATFORM_ - } -# endif // BX_CONFIG_SEMAPHORE_PTHREAD - #elif BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOX360 \ || BX_PLATFORM_XBOXONE Semaphore::Semaphore() { SemaphoreInternal* si = (SemaphoreInternal*)m_internal; -#if BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT +#if BX_PLATFORM_WINRT \ +|| BX_PLATFORM_XBOXONE si->m_handle = CreateSemaphoreExW(NULL, 0, LONG_MAX, NULL, 0, SEMAPHORE_ALL_ACCESS); #else si->m_handle = CreateSemaphoreA(NULL, 0, LONG_MAX, NULL); @@ -269,7 +239,8 @@ namespace bx SemaphoreInternal* si = (SemaphoreInternal*)m_internal; DWORD milliseconds = (0 > _msecs) ? INFINITE : _msecs; -#if BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT +#if BX_PLATFORM_WINRT \ +|| BX_PLATFORM_XBOXONE return WAIT_OBJECT_0 == WaitForSingleObjectEx(si->m_handle, milliseconds, FALSE); #else return WAIT_OBJECT_0 == WaitForSingleObject(si->m_handle, milliseconds); diff --git a/3rdparty/bx/src/settings.cpp b/3rdparty/bx/src/settings.cpp new file mode 100644 index 0000000..71f86a3 --- /dev/null +++ b/3rdparty/bx/src/settings.cpp @@ -0,0 +1,214 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "bx_p.h" +#include + +namespace +{ +#define INI_MALLOC(_ctx, _size) (BX_ALLOC(reinterpret_cast(_ctx), _size) ) +#define INI_FREE(_ctx, _ptr) (BX_FREE(reinterpret_cast(_ctx), _ptr) ) +#define INI_MEMCPY(_dst, _src, _count) (bx::memCopy(_dst, _src, _count) ) +#define INI_STRLEN(_str) (bx::strLen(_str) ) +#define INI_STRNICMP(_s1, _s2, _len) (bx::strCmpI(_s1, _s2, _len) ) + +#define INI_IMPLEMENTATION + +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-function"); + +BX_PRAGMA_DIAGNOSTIC_PUSH(); +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wsign-compare"); +#include +BX_PRAGMA_DIAGNOSTIC_POP(); +} + +namespace bx +{ + +Settings::Settings(AllocatorI* _allocator, const void* _data, uint32_t _len) + : m_allocator(_allocator) + , m_ini(NULL) +{ + load(_data, _len); +} + +#define INI_T(_ptr) reinterpret_cast(_ptr) + +Settings::~Settings() +{ + ini_destroy(INI_T(m_ini) ); +} + +void Settings::clear() +{ + load(NULL, 0); +} + +void Settings::load(const void* _data, uint32_t _len) +{ + if (NULL != m_ini) + { + ini_destroy(INI_T(m_ini) ); + } + + if (NULL == _data) + { + m_ini = ini_create(m_allocator); + } + else + { + BX_UNUSED(_len); + m_ini = ini_load( (const char*)_data, m_allocator); + } +} + +const char* Settings::get(const StringView& _name) const +{ + ini_t* ini = INI_T(m_ini); + + FilePath uri(_name); + const StringView path(strTrim(uri.getPath(), "/") ); + const StringView& fileName(uri.getFileName() ); + int32_t section = INI_GLOBAL_SECTION; + + if (!path.isEmpty() ) + { + section = ini_find_section(ini, path.getPtr(), path.getLength() ); + if (INI_NOT_FOUND == section) + { + section = INI_GLOBAL_SECTION; + } + } + + int32_t property = ini_find_property(ini, section, fileName.getPtr(), fileName.getLength() ); + if (INI_NOT_FOUND == property) + { + return NULL; + } + + return ini_property_value(ini, section, property); +} + +void Settings::set(const StringView& _name, const StringView& _value) +{ + ini_t* ini = INI_T(m_ini); + + FilePath uri(_name); + const StringView path(strTrim(uri.getPath(), "/") ); + const StringView& fileName(uri.getFileName() ); + + int32_t section = INI_GLOBAL_SECTION; + + if (!path.isEmpty() ) + { + section = ini_find_section(ini, path.getPtr(), path.getLength() ); + if (INI_NOT_FOUND == section) + { + section = ini_section_add(ini, path.getPtr(), path.getLength() ); + } + } + + int32_t property = ini_find_property(ini, section, fileName.getPtr(), fileName.getLength() ); + if (INI_NOT_FOUND == property) + { + ini_property_add( + ini + , section + , fileName.getPtr() + , fileName.getLength() + , _value.getPtr() + , _value.getLength() + ); + } + else + { + ini_property_value_set( + ini + , section + , property + , _value.getPtr() + , _value.getLength() + ); + } +} + +void Settings::remove(const StringView& _name) const +{ + ini_t* ini = INI_T(m_ini); + + FilePath uri(_name); + const StringView path = strTrim(uri.getPath(), "/"); + const StringView& fileName = uri.getFileName(); + + int32_t section = INI_GLOBAL_SECTION; + + if (!path.isEmpty() ) + { + section = ini_find_section(ini, path.getPtr(), path.getLength() ); + if (INI_NOT_FOUND == section) + { + section = INI_GLOBAL_SECTION; + } + } + + int32_t property = ini_find_property(ini, section, fileName.getPtr(), fileName.getLength() ); + if (INI_NOT_FOUND == property) + { + return; + } + + ini_property_remove(ini, section, property); + + if (INI_GLOBAL_SECTION != section + && 0 == ini_property_count(ini, section) ) + { + ini_section_remove(ini, section); + } +} + +int32_t Settings::read(ReaderSeekerI* _reader, Error* _err) +{ + int32_t size = int32_t(getRemain(_reader) ); + + void* data = BX_ALLOC(m_allocator, size); + + int32_t total = bx::read(_reader, data, size, _err); + load(data, size); + + BX_FREE(m_allocator, data); + + return total; +} + +int32_t Settings::write(WriterI* _writer, Error* _err) const +{ + ini_t* ini = INI_T(m_ini); + + int32_t size = ini_save(ini, NULL, 0); + void* data = BX_ALLOC(m_allocator, size); + + ini_save(ini, (char*)data, size); + int32_t total = bx::write(_writer, data, size-1, _err); + + BX_FREE(m_allocator, data); + + return total; +} + +#undef INI_T + +int32_t read(ReaderSeekerI* _reader, Settings& _settings, Error* _err) +{ + BX_ERROR_SCOPE(_err); + return _settings.read(_reader, _err); +} + +int32_t write(WriterI* _writer, const Settings& _settings, Error* _err) +{ + BX_ERROR_SCOPE(_err); + return _settings.write(_writer, _err); +} + +} // namespace bx diff --git a/3rdparty/bx/src/sort.cpp b/3rdparty/bx/src/sort.cpp index 3b7485f..2dd3fa6 100644 --- a/3rdparty/bx/src/sort.cpp +++ b/3rdparty/bx/src/sort.cpp @@ -1,8 +1,9 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include namespace bx diff --git a/3rdparty/bx/src/string.cpp b/3rdparty/bx/src/string.cpp index dbb59e5..b2bf621 100644 --- a/3rdparty/bx/src/string.cpp +++ b/3rdparty/bx/src/string.cpp @@ -1,8 +1,9 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #include #include @@ -10,10 +11,16 @@ #if !BX_CRT_NONE # include // vsnprintf, vsnwprintf +# include // vswprintf #endif // !BX_CRT_NONE namespace bx { + inline bool isInRange(char _ch, char _from, char _to) + { + return unsigned(_ch - _from) <= unsigned(_to-_from); + } + bool isSpace(char _ch) { return ' ' == _ch @@ -27,12 +34,12 @@ namespace bx bool isUpper(char _ch) { - return _ch >= 'A' && _ch <= 'Z'; + return isInRange(_ch, 'A', 'Z'); } bool isLower(char _ch) { - return _ch >= 'a' && _ch <= 'z'; + return isInRange(_ch, 'a', 'z'); } bool isAlpha(char _ch) @@ -42,17 +49,86 @@ namespace bx bool isNumeric(char _ch) { - return _ch >= '0' && _ch <= '9'; + return isInRange(_ch, '0', '9'); } bool isAlphaNum(char _ch) { - return isAlpha(_ch) || isNumeric(_ch); + return false + || isAlpha(_ch) + || isNumeric(_ch) + ; + } + + bool isHexNum(char _ch) + { + return false + || isInRange(toLower(_ch), 'a', 'f') + || isNumeric(_ch) + ; } bool isPrint(char _ch) { - return isAlphaNum(_ch) || isSpace(_ch); + return isInRange(_ch, ' ', '~'); + } + + typedef bool (*CharTestFn)(char _ch); + + template + inline bool isCharTest(const StringView& _str) + { + bool result = true; + + for (const char* ptr = _str.getPtr(), *term = _str.getTerm() + ; ptr != term && result + ; ++ptr + ) + { + result &= fn(*ptr); + } + + return result; + } + + bool isSpace(const StringView& _str) + { + return isCharTest(_str); + } + + bool isUpper(const StringView& _str) + { + return isCharTest(_str); + } + + bool isLower(const StringView& _str) + { + return isCharTest(_str); + } + + bool isAlpha(const StringView& _str) + { + return isCharTest(_str); + } + + bool isNumeric(const StringView& _str) + { + return isCharTest(_str); + } + + bool isAlphaNum(const StringView& _str) + { + return isCharTest(_str); + } + + bool isHexNum(const StringView& _str) + { + return isCharTest(_str); + } + + bool isPrint(const StringView& _str) + { + return isCharTest(_str); } char toLower(char _ch) @@ -70,7 +146,7 @@ namespace bx void toLower(char* _inOutStr, int32_t _max) { - const int32_t len = strnlen(_inOutStr, _max); + const int32_t len = strLen(_inOutStr, _max); toLowerUnsafe(_inOutStr, len); } @@ -89,16 +165,10 @@ namespace bx void toUpper(char* _inOutStr, int32_t _max) { - const int32_t len = strnlen(_inOutStr, _max); + const int32_t len = strLen(_inOutStr, _max); toUpperUnsafe(_inOutStr, len); } - bool toBool(const char* _str) - { - char ch = toLower(_str[0]); - return ch == 't' || ch == '1'; - } - typedef char (*CharFn)(char _ch); inline char toNoop(char _ch) @@ -107,11 +177,13 @@ namespace bx } template - int32_t strCmp(const char* _lhs, const char* _rhs, int32_t _max) + inline int32_t strCmp(const char* _lhs, int32_t _lhsMax, const char* _rhs, int32_t _rhsMax) { + int32_t max = min(_lhsMax, _rhsMax); + for ( - ; 0 < _max && fn(*_lhs) == fn(*_rhs) - ; ++_lhs, ++_rhs, --_max + ; 0 < max && fn(*_lhs) == fn(*_rhs) + ; ++_lhs, ++_rhs, --max ) { if (*_lhs == '\0' @@ -121,20 +193,105 @@ namespace bx } } - return 0 == _max ? 0 : fn(*_lhs) - fn(*_rhs); + return 0 == max && _lhsMax == _rhsMax ? 0 : fn(*_lhs) - fn(*_rhs); } - int32_t strncmp(const char* _lhs, const char* _rhs, int32_t _max) + int32_t strCmp(const StringView& _lhs, const StringView& _rhs, int32_t _max) { - return strCmp(_lhs, _rhs, _max); + return strCmp( + _lhs.getPtr() + , min(_lhs.getLength(), _max) + , _rhs.getPtr() + , min(_rhs.getLength(), _max) + ); } - int32_t strincmp(const char* _lhs, const char* _rhs, int32_t _max) + int32_t strCmpI(const StringView& _lhs, const StringView& _rhs, int32_t _max) { - return strCmp(_lhs, _rhs, _max); + return strCmp( + _lhs.getPtr() + , min(_lhs.getLength(), _max) + , _rhs.getPtr() + , min(_rhs.getLength(), _max) + ); } - int32_t strnlen(const char* _str, int32_t _max) + inline int32_t strCmpV(const char* _lhs, int32_t _lhsMax, const char* _rhs, int32_t _rhsMax) + { + int32_t max = min(_lhsMax, _rhsMax); + int32_t ii = 0; + int32_t idx = 0; + bool zero = true; + + for ( + ; 0 < max && _lhs[ii] == _rhs[ii] + ; ++ii, --max + ) + { + const uint8_t ch = _lhs[ii]; + if ('\0' == ch + || '\0' == _rhs[ii]) + { + break; + } + + if (!isNumeric(ch) ) + { + idx = ii+1; + zero = true; + } + else if ('0' != ch) + { + zero = false; + } + } + + if (0 == max) + { + return _lhsMax == _rhsMax ? 0 : _lhs[ii] - _rhs[ii]; + } + + if ('0' != _lhs[idx] + && '0' != _rhs[idx]) + { + int32_t jj = 0; + for (jj = ii + ; 0 < max && isNumeric(_lhs[jj]) + ; ++jj, --max + ) + { + if (!isNumeric(_rhs[jj]) ) + { + return 1; + } + } + + if (isNumeric(_rhs[jj])) + { + return -1; + } + } + else if (zero + && idx < ii + && (isNumeric(_lhs[ii]) || isNumeric(_rhs[ii]) ) ) + { + return (_lhs[ii] - '0') - (_rhs[ii] - '0'); + } + + return 0 == max && _lhsMax == _rhsMax ? 0 : _lhs[ii] - _rhs[ii]; + } + + int32_t strCmpV(const StringView& _lhs, const StringView& _rhs, int32_t _max) + { + return strCmpV( + _lhs.getPtr() + , min(_lhs.getLength(), _max) + , _rhs.getPtr() + , min(_rhs.getLength(), _max) + ); + } + + int32_t strLen(const char* _str, int32_t _max) { if (NULL == _str) { @@ -146,13 +303,18 @@ namespace bx return int32_t(ptr - _str); } - int32_t strlncpy(char* _dst, int32_t _dstSize, const char* _src, int32_t _num) + int32_t strLen(const StringView& _str, int32_t _max) + { + return strLen(_str.getPtr(), min(_str.getLength(), _max) ); + } + + inline int32_t strCopy(char* _dst, int32_t _dstSize, const char* _src, int32_t _num) { BX_CHECK(NULL != _dst, "_dst can't be NULL!"); BX_CHECK(NULL != _src, "_src can't be NULL!"); BX_CHECK(0 < _dstSize, "_dstSize can't be 0!"); - const int32_t len = strnlen(_src, _num); + const int32_t len = strLen(_src, _num); const int32_t max = _dstSize-1; const int32_t num = (len < max ? len : max); memCopy(_dst, _src, num); @@ -161,20 +323,30 @@ namespace bx return num; } - int32_t strlncat(char* _dst, int32_t _dstSize, const char* _src, int32_t _num) + int32_t strCopy(char* _dst, int32_t _dstSize, const StringView& _str, int32_t _num) + { + return strCopy(_dst, _dstSize, _str.getPtr(), min(_str.getLength(), _num) ); + } + + inline int32_t strCat(char* _dst, int32_t _dstSize, const char* _src, int32_t _num) { BX_CHECK(NULL != _dst, "_dst can't be NULL!"); BX_CHECK(NULL != _src, "_src can't be NULL!"); BX_CHECK(0 < _dstSize, "_dstSize can't be 0!"); const int32_t max = _dstSize; - const int32_t len = strnlen(_dst, max); - return strlncpy(&_dst[len], max-len, _src, _num); + const int32_t len = strLen(_dst, max); + return strCopy(&_dst[len], max-len, _src, _num); } - const char* strnchr(const char* _str, char _ch, int32_t _max) + int32_t strCat(char* _dst, int32_t _dstSize, const StringView& _str, int32_t _num) { - for (int32_t ii = 0, len = strnlen(_str, _max); ii < len; ++ii) + return strCat(_dst, _dstSize, _str.getPtr(), min(_str.getLength(), _num) ); + } + + inline const char* strFindUnsafe(const char* _str, int32_t _len, char _ch) + { + for (int32_t ii = 0; ii < _len; ++ii) { if (_str[ii] == _ch) { @@ -185,9 +357,19 @@ namespace bx return NULL; } - const char* strnrchr(const char* _str, char _ch, int32_t _max) + inline const char* strFind(const char* _str, int32_t _max, char _ch) { - for (int32_t ii = strnlen(_str, _max); 0 < ii; --ii) + return strFindUnsafe(_str, strLen(_str, _max), _ch); + } + + const char* strFind(const StringView& _str, char _ch) + { + return strFind(_str.getPtr(), _str.getLength(), _ch); + } + + inline const char* strRFindUnsafe(const char* _str, int32_t _len, char _ch) + { + for (int32_t ii = _len; 0 <= ii; --ii) { if (_str[ii] == _ch) { @@ -198,13 +380,23 @@ namespace bx return NULL; } + inline const char* strRFind(const char* _str, int32_t _max, char _ch) + { + return strRFindUnsafe(_str, strLen(_str, _max), _ch); + } + + const char* strRFind(const StringView& _str, char _ch) + { + return strRFind(_str.getPtr(), _str.getLength(), _ch); + } + template - static const char* strStr(const char* _str, int32_t _strMax, const char* _find, int32_t _findMax) + inline const char* strFind(const char* _str, int32_t _strMax, const char* _find, int32_t _findMax) { const char* ptr = _str; - int32_t stringLen = strnlen(_str, _strMax); - const int32_t findLen = strnlen(_find, _findMax); + int32_t stringLen = strLen(_str, _strMax); + const int32_t findLen = strLen(_find, _findMax); for (; stringLen >= findLen; ++ptr, --stringLen) { @@ -239,27 +431,81 @@ namespace bx return NULL; } - const char* strnstr(const char* _str, const char* _find, int32_t _max) + const char* strFind(const StringView& _str, const StringView& _find, int32_t _num) { - return strStr(_str, _max, _find, INT32_MAX); + return strFind( + _str.getPtr() + , _str.getLength() + , _find.getPtr() + , min(_find.getLength(), _num) + ); } - const char* stristr(const char* _str, const char* _find, int32_t _max) + const char* strFindI(const StringView& _str, const StringView& _find, int32_t _num) { - return strStr(_str, _max, _find, INT32_MAX); + return strFind( + _str.getPtr() + , _str.getLength() + , _find.getPtr() + , min(_find.getLength(), _num) + ); + } + + StringView strLTrim(const StringView& _str, const StringView& _chars) + { + const char* ptr = _str.getPtr(); + const char* chars = _chars.getPtr(); + const uint32_t charsLen = _chars.getLength(); + + for (uint32_t ii = 0, len = _str.getLength(); ii < len; ++ii) + { + if (NULL == strFindUnsafe(chars, charsLen, ptr[ii]) ) + { + return StringView(ptr + ii, len-ii); + } + } + + return StringView(); + } + + StringView strRTrim(const StringView& _str, const StringView& _chars) + { + if (_str.isEmpty() ) + { + return StringView(); + } + + const char* ptr = _str.getPtr(); + const char* chars = _chars.getPtr(); + const uint32_t charsLen = _chars.getLength(); + + for (int32_t len = _str.getLength(), ii = len-1; 0 <= ii; --ii) + { + if (NULL == strFindUnsafe(chars, charsLen, ptr[ii]) ) + { + return StringView(ptr, ii+1); + } + } + + return StringView(); + } + + StringView strTrim(const StringView& _str, const StringView& _chars) + { + return strLTrim(strRTrim(_str, _chars), _chars); } const char* strnl(const char* _str) { - for (; '\0' != *_str; _str += strnlen(_str, 1024) ) + for (; '\0' != *_str; _str += strLen(_str, 1024) ) { - const char* eol = strnstr(_str, "\r\n", 1024); + const char* eol = strFind(StringView(_str, 1024), "\r\n"); if (NULL != eol) { return eol + 2; } - eol = strnstr(_str, "\n", 1024); + eol = strFind(StringView(_str, 1024), "\n"); if (NULL != eol) { return eol + 1; @@ -271,15 +517,15 @@ namespace bx const char* streol(const char* _str) { - for (; '\0' != *_str; _str += strnlen(_str, 1024) ) + for (; '\0' != *_str; _str += strLen(_str, 1024) ) { - const char* eol = strnstr(_str, "\r\n", 1024); + const char* eol = strFind(StringView(_str, 1024), "\r\n"); if (NULL != eol) { return eol; } - eol = strnstr(_str, "\n", 1024); + eol = strFind(StringView(_str, 1024), "\n"); if (NULL != eol) { return eol; @@ -301,12 +547,19 @@ namespace bx return _str; } - const char* strword(const char* _str) + const char* strSkipWord(const char* _str, int32_t _max) { - for (char ch = *_str++; isAlphaNum(ch) || '_' == ch; ch = *_str++) {}; + for (char ch = *_str++; 0 < _max && (isAlphaNum(ch) || '_' == ch); ch = *_str++, --_max) {}; return _str-1; } + StringView strWord(const StringView& _str) + { + const char* ptr = _str.getPtr(); + const char* term = strSkipWord(ptr, _str.getLength() ); + return StringView(ptr, term); + } + const char* strmb(const char* _str, char _open, char _close) { int count = 0; @@ -348,9 +601,9 @@ namespace bx const char* findIdentifierMatch(const char* _str, const char* _word) { - int32_t len = strnlen(_word); - const char* ptr = strnstr(_str, _word); - for (; NULL != ptr; ptr = strnstr(ptr + len, _word) ) + int32_t len = strLen(_word); + const char* ptr = strFind(_str, _word); + for (; NULL != ptr; ptr = strFind(ptr + len, _word) ) { if (ptr != _str) { @@ -418,7 +671,7 @@ namespace bx static int32_t write(WriterI* _writer, const char* _str, int32_t _len, const Param& _param, Error* _err) { int32_t size = 0; - int32_t len = (int32_t)strnlen(_str, _len); + int32_t len = (int32_t)strLen(_str, _len); int32_t padding = _param.width > len ? _param.width - len : 0; bool sign = _param.sign && len > 1 && _str[0] != '-'; padding = padding > 0 ? padding - sign : 0; @@ -534,7 +787,7 @@ namespace bx toUpperUnsafe(str, len); } - const char* dot = strnchr(str, '.'); + const char* dot = strFind(str, INT32_MAX, '.'); if (NULL != dot) { const int32_t precLen = int32_t( @@ -574,7 +827,7 @@ namespace bx int32_t write(WriterI* _writer, const char* _format, va_list _argList, Error* _err) { - MemoryReader reader(_format, uint32_t(strnlen(_format) ) ); + MemoryReader reader(_format, uint32_t(strLen(_format) ) ); int32_t size = 0; @@ -793,9 +1046,9 @@ namespace bx { va_list argList; va_start(argList, _format); - int32_t size = write(_writer, _format, argList, _err); + int32_t total = write(_writer, _format, argList, _err); va_end(argList); - return size; + return total; } int32_t vsnprintfRef(char* _out, int32_t _max, const char* _format, va_list _argList) @@ -829,8 +1082,11 @@ namespace bx int32_t vsnprintf(char* _out, int32_t _max, const char* _format, va_list _argList) { + va_list argList; + va_copy(argList, _argList); + int32_t total = 0; #if BX_CRT_NONE - return vsnprintfRef(_out, _max, _format, _argList); + total = vsnprintfRef(_out, _max, _format, argList); #elif BX_CRT_MSVC int32_t len = -1; if (NULL != _out) @@ -840,26 +1096,30 @@ namespace bx len = ::vsnprintf_s(_out, _max, size_t(-1), _format, argListCopy); va_end(argListCopy); } - return -1 == len ? ::_vscprintf(_format, _argList) : len; + total = -1 == len ? ::_vscprintf(_format, argList) : len; #else - return ::vsnprintf(_out, _max, _format, _argList); + total = ::vsnprintf(_out, _max, _format, argList); #endif // BX_COMPILER_MSVC + va_end(argList); + return total; } int32_t snprintf(char* _out, int32_t _max, const char* _format, ...) { va_list argList; va_start(argList, _format); - int32_t len = vsnprintf(_out, _max, _format, argList); + int32_t total = vsnprintf(_out, _max, _format, argList); va_end(argList); - return len; + return total; } int32_t vsnwprintf(wchar_t* _out, int32_t _max, const wchar_t* _format, va_list _argList) { + va_list argList; + va_copy(argList, _argList); + int32_t total = 0; #if BX_CRT_NONE - BX_UNUSED(_out, _max, _format, _argList); - return 0; + BX_UNUSED(_out, _max, _format, argList); #elif BX_CRT_MSVC int32_t len = -1; if (NULL != _out) @@ -869,12 +1129,14 @@ namespace bx len = ::_vsnwprintf_s(_out, _max, size_t(-1), _format, argListCopy); va_end(argListCopy); } - return -1 == len ? ::_vscwprintf(_format, _argList) : len; + total = -1 == len ? ::_vscwprintf(_format, _argList) : len; #elif BX_CRT_MINGW - return ::vsnwprintf(_out, _max, _format, _argList); + total = ::vsnwprintf(_out, _max, _format, argList); #else - return ::vswprintf(_out, _max, _format, _argList); + total = ::vswprintf(_out, _max, _format, argList); #endif // BX_COMPILER_MSVC + va_end(argList); + return total; } int32_t swnprintf(wchar_t* _out, int32_t _max, const wchar_t* _format, ...) @@ -886,44 +1148,36 @@ namespace bx return len; } - const char* baseName(const char* _filePath) - { - const char* bs = strnrchr(_filePath, '\\'); - const char* fs = strnrchr(_filePath, '/'); - const char* slash = (bs > fs ? bs : fs); - const char* colon = strnrchr(_filePath, ':'); - const char* basename = slash > colon ? slash : colon; - if (NULL != basename) - { - return basename+1; - } + static const char s_units[] = { 'B', 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y' }; - return _filePath; - } - - void prettify(char* _out, int32_t _count, uint64_t _size) + template + inline int32_t prettify(char* _out, int32_t _count, uint64_t _value) { uint8_t idx = 0; - double size = double(_size); - while (_size != (_size&0x7ff) - && idx < 9) + double value = double(_value); + while (_value != (_value&0x7ff) + && idx < BX_COUNTOF(s_units) ) { - _size >>= 10; - size *= 1.0/1024.0; + _value /= Kilo; + value *= 1.0/double(Kilo); ++idx; } - snprintf(_out, _count, "%0.2f %c%c", size, "BkMGTPEZY"[idx], idx > 0 ? 'B' : '\0'); + return snprintf(_out, _count, "%0.2f %c%c%c", value + , s_units[idx] + , idx > 0 ? KiloCh0 : '\0' + , KiloCh1 + ); } - int32_t strlcpy(char* _dst, const char* _src, int32_t _max) + int32_t prettify(char* _out, int32_t _count, uint64_t _value, Units::Enum _units) { - return strlncpy(_dst, _max, _src); - } + if (Units::Kilo == _units) + { + return prettify<1000, 'B', '\0'>(_out, _count, _value); + } - int32_t strlcat(char* _dst, const char* _src, int32_t _max) - { - return strlncat(_dst, _max, _src); + return prettify<1024, 'i', 'B'>(_out, _count, _value); } } // namespace bx diff --git a/3rdparty/bx/src/thread.cpp b/3rdparty/bx/src/thread.cpp index 70ea4a0..8607fe4 100644 --- a/3rdparty/bx/src/thread.cpp +++ b/3rdparty/bx/src/thread.cpp @@ -1,13 +1,13 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #if BX_PLATFORM_ANDROID \ || BX_PLATFORM_LINUX \ - || BX_PLATFORM_NACL \ || BX_PLATFORM_IOS \ || BX_PLATFORM_OSX \ || BX_PLATFORM_PS4 \ @@ -21,7 +21,6 @@ # endif // BX_PLATFORM_ #elif BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOX360 \ || BX_PLATFORM_XBOXONE # include # include @@ -37,11 +36,16 @@ using namespace Windows::System::Threading; namespace bx { + static AllocatorI* getAllocator() + { + static DefaultAllocator s_allocator; + return &s_allocator; + } + struct ThreadInternal { #if BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOX360 \ || BX_PLATFORM_XBOXONE static DWORD WINAPI threadFunc(LPVOID _arg); HANDLE m_handle; @@ -52,7 +56,9 @@ namespace bx #endif // BX_PLATFORM_ }; -#if BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360 || BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT +#if BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_WINRT DWORD WINAPI ThreadInternal::threadFunc(LPVOID _arg) { Thread* thread = (Thread*)_arg; @@ -76,8 +82,9 @@ namespace bx Thread::Thread() : m_fn(NULL) , m_userData(NULL) + , m_queue(getAllocator() ) , m_stackSize(0) - , m_exitCode(0 /*EXIT_SUCCESS*/) + , m_exitCode(kExitSuccess) , m_running(false) { BX_STATIC_ASSERT(sizeof(ThreadInternal) <= sizeof(m_internal) ); @@ -85,7 +92,6 @@ namespace bx ThreadInternal* ti = (ThreadInternal*)m_internal; #if BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOX360 \ || BX_PLATFORM_XBOXONE ti->m_handle = INVALID_HANDLE_VALUE; ti->m_threadId = UINT32_MAX; @@ -112,7 +118,8 @@ namespace bx m_running = true; ThreadInternal* ti = (ThreadInternal*)m_internal; -#if BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360 || BX_PLATFORM_XBOXONE +#if BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_XBOXONE ti->m_handle = ::CreateThread(NULL , m_stackSize , (LPTHREAD_START_ROUTINE)ti->threadFunc @@ -163,7 +170,7 @@ namespace bx { BX_CHECK(m_running, "Not running!"); ThreadInternal* ti = (ThreadInternal*)m_internal; -#if BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360 +#if BX_PLATFORM_WINDOWS WaitForSingleObject(ti->m_handle, INFINITE); GetExitCodeThread(ti->m_handle, (DWORD*)&m_exitCode); CloseHandle(ti->m_handle); @@ -244,6 +251,17 @@ namespace bx #endif // BX_PLATFORM_ } + void Thread::push(void* _ptr) + { + m_queue.push(_ptr); + } + + void* Thread::pop() + { + void* ptr = m_queue.pop(); + return ptr; + } + int32_t Thread::entry() { #if BX_PLATFORM_WINDOWS @@ -252,7 +270,8 @@ namespace bx #endif // BX_PLATFORM_WINDOWS m_sem.post(); - return m_fn(m_userData); + int32_t result = m_fn(this, m_userData); + return result; } struct TlsDataInternal diff --git a/3rdparty/bx/src/timer.cpp b/3rdparty/bx/src/timer.cpp index 7f54037..6fda9d8 100644 --- a/3rdparty/bx/src/timer.cpp +++ b/3rdparty/bx/src/timer.cpp @@ -1,8 +1,9 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ +#include "bx_p.h" #include #if BX_PLATFORM_ANDROID @@ -19,7 +20,9 @@ namespace bx { int64_t getHPCounter() { -#if BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360 || BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT +#if BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_WINRT LARGE_INTEGER li; // Performance counter value may unexpectedly leap forward // http://support.microsoft.com/kb/274323 @@ -44,7 +47,9 @@ namespace bx int64_t getHPFrequency() { -#if BX_PLATFORM_WINDOWS || BX_PLATFORM_XBOX360 || BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT +#if BX_PLATFORM_WINDOWS \ + || BX_PLATFORM_XBOXONE \ + || BX_PLATFORM_WINRT LARGE_INTEGER li; QueryPerformanceFrequency(&li); return li.QuadPart; diff --git a/3rdparty/bx/src/url.cpp b/3rdparty/bx/src/url.cpp new file mode 100644 index 0000000..bed1083 --- /dev/null +++ b/3rdparty/bx/src/url.cpp @@ -0,0 +1,158 @@ +/* + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bnet#license-bsd-2-clause + */ + +#include "bx_p.h" +#include + +namespace bx +{ + UrlView::UrlView() + { + } + + void UrlView::clear() + { + for (uint32_t ii = 0; ii < Count; ++ii) + { + m_tokens[ii].clear(); + } + } + + bool UrlView::parse(const StringView& _url) + { + clear(); + + const char* start = _url.getPtr(); + const char* term = _url.getTerm(); + const char* schemeEnd = strFind(StringView(start, term), "://"); + const char* hostStart = NULL != schemeEnd ? schemeEnd+3 : start; + const char* pathStart = strFind(StringView(hostStart, term), '/'); + + if (NULL == schemeEnd + && NULL == pathStart) + { + return false; + } + + if (NULL != schemeEnd + && (NULL == pathStart || pathStart > schemeEnd) ) + { + StringView scheme(start, schemeEnd); + + if (!isAlpha(scheme) ) + { + return false; + } + + m_tokens[Scheme].set(scheme); + } + + if (NULL != pathStart) + { + const char* queryStart = strFind(StringView(pathStart, term), '?'); + const char* fragmentStart = strFind(StringView(pathStart, term), '#'); + + if (NULL != fragmentStart + && fragmentStart < queryStart) + { + return false; + } + + m_tokens[Path].set(pathStart + , NULL != queryStart ? queryStart + : NULL != fragmentStart ? fragmentStart + : term + ); + + if (NULL != queryStart) + { + m_tokens[Query].set(queryStart+1 + , NULL != fragmentStart ? fragmentStart + : term + ); + } + + if (NULL != fragmentStart) + { + m_tokens[Fragment].set(fragmentStart+1, term); + } + + term = pathStart; + } + + const char* userPassEnd = strFind(StringView(hostStart, term), '@'); + const char* userPassStart = NULL != userPassEnd ? hostStart : NULL; + hostStart = NULL != userPassEnd ? userPassEnd+1 : hostStart; + const char* portStart = strFind(StringView(hostStart, term), ':'); + + m_tokens[Host].set(hostStart, NULL != portStart ? portStart : term); + + if (NULL != portStart) + { + m_tokens[Port].set(portStart+1, term); + } + + if (NULL != userPassStart) + { + const char* passStart = strFind(StringView(userPassStart, userPassEnd), ':'); + + m_tokens[UserName].set(userPassStart + , NULL != passStart ? passStart + : userPassEnd + ); + + if (NULL != passStart) + { + m_tokens[Password].set(passStart+1, userPassEnd); + } + } + + return true; + } + + const StringView& UrlView::get(Enum _token) const + { + return m_tokens[_token]; + } + + static char toHex(char _nible) + { + return "0123456789ABCDEF"[_nible&0xf]; + } + + // https://secure.wikimedia.org/wikipedia/en/wiki/URL_encoding + void urlEncode(char* _out, uint32_t _max, const StringView& _str) + { + _max--; // need space for zero terminator + + const char* str = _str.getPtr(); + const char* term = _str.getTerm(); + + uint32_t ii = 0; + for (char ch = *str++ + ; str <= term && ii < _max + ; ch = *str++ + ) + { + if (isAlphaNum(ch) + || ch == '-' + || ch == '_' + || ch == '.' + || ch == '~') + { + _out[ii++] = ch; + } + else if (ii+3 < _max) + { + _out[ii++] = '%'; + _out[ii++] = toHex(ch>>4); + _out[ii++] = toHex(ch); + } + } + + _out[ii] = '\0'; + } + +} // namespace bx diff --git a/3rdparty/bx/tests/atomic_test.cpp b/3rdparty/bx/tests/atomic_test.cpp new file mode 100644 index 0000000..04a6236 --- /dev/null +++ b/3rdparty/bx/tests/atomic_test.cpp @@ -0,0 +1,46 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include + +TEST_CASE("atomic", "") +{ + uint32_t test = 1337; + uint32_t fetched; + + fetched = bx::atomicFetchAndAdd(&test, 52u); + REQUIRE(fetched == 1337); + REQUIRE(test == 1389); + + fetched = bx::atomicAddAndFetch(&test, 64u); + REQUIRE(fetched == 1453); + REQUIRE(test == 1453); + + fetched = bx::atomicFetchAndSub(&test, 64u); + REQUIRE(fetched == 1453); + REQUIRE(test == 1389); + + fetched = bx::atomicSubAndFetch(&test, 52u); + REQUIRE(fetched == 1337); + REQUIRE(test == 1337); + + fetched = bx::atomicFetchAndAddsat(&test, 52u, 1453u); + REQUIRE(fetched == 1337); + REQUIRE(test == 1389); + + fetched = bx::atomicFetchAndAddsat(&test, 1000u, 1453u); + REQUIRE(fetched == 1389); + REQUIRE(test == 1453); + + fetched = bx::atomicFetchAndSubsat(&test, 64u, 1337u); + REQUIRE(fetched == 1453); + REQUIRE(test == 1389); + + fetched = bx::atomicFetchAndSubsat(&test, 1000u, 1337u); + REQUIRE(fetched == 1389); + REQUIRE(test == 1337); + +} diff --git a/3rdparty/bx/tests/crt_test.cpp b/3rdparty/bx/tests/crt_test.cpp new file mode 100644 index 0000000..bda0790 --- /dev/null +++ b/3rdparty/bx/tests/crt_test.cpp @@ -0,0 +1,43 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" + +TEST_CASE("memSet", "") +{ + char temp[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 }; + + bx::memSet(temp, 0, 0); + REQUIRE(temp[0] == 1); + + bx::memSet(temp, 0, 5); + REQUIRE(temp[0] == 0); + REQUIRE(temp[1] == 0); + REQUIRE(temp[2] == 0); + REQUIRE(temp[3] == 0); + REQUIRE(temp[4] == 0); + REQUIRE(temp[5] == 6); +} + +TEST_CASE("memMove", "") +{ + const char* orignal = "xxxxabvgd"; + char str[] = { 'x', 'x', 'x', 'x', 'a', 'b', 'v', 'g', 'd' }; + + bx::memMove(&str[4], &str[4], 0); + REQUIRE(0 == bx::memCmp(str, orignal, 9) ); + + bx::memMove(&str[4], &str[4], 5); + REQUIRE(0 == bx::memCmp(str, orignal, 9) ); + + bx::memMove(str, &str[4], 5); + REQUIRE(0 == bx::memCmp(str, "abvgd", 5) ); + + bx::memMove(&str[4], str, 5); + REQUIRE(str[4] == 'a' ); + + bx::memSet(str, 'x', 4); + REQUIRE(0 == bx::memCmp(str, orignal, 9) ); +} diff --git a/3rdparty/bx/tests/dbg.cpp b/3rdparty/bx/tests/dbg.cpp deleted file mode 100644 index efbfad6..0000000 --- a/3rdparty/bx/tests/dbg.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2011-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include -#include -#include -#include // isprint - -#include "dbg.h" -#include -#include - -void dbgPrintfVargs(const char* _format, va_list _argList) -{ - char temp[8192]; - char* out = temp; - int32_t len = bx::vsnprintf(out, sizeof(temp), _format, _argList); - if ( (int32_t)sizeof(temp) < len) - { - out = (char*)alloca(len+1); - len = bx::vsnprintf(out, len, _format, _argList); - } - out[len] = '\0'; - bx::debugOutput(out); -} - -void dbgPrintf(const char* _format, ...) -{ - va_list argList; - va_start(argList, _format); - dbgPrintfVargs(_format, argList); - va_end(argList); -} - -#define DBG_ADDRESS "%" PRIxPTR - -void dbgPrintfData(const void* _data, uint32_t _size, const char* _format, ...) -{ -#define HEX_DUMP_WIDTH 16 -#define HEX_DUMP_SPACE_WIDTH 48 -#define HEX_DUMP_FORMAT "%-" DBG_STRINGIZE(HEX_DUMP_SPACE_WIDTH) "." DBG_STRINGIZE(HEX_DUMP_SPACE_WIDTH) "s" - - va_list argList; - va_start(argList, _format); - dbgPrintfVargs(_format, argList); - va_end(argList); - - dbgPrintf("\ndata: " DBG_ADDRESS ", size: %d\n", _data, _size); - - if (NULL != _data) - { - const uint8_t* data = reinterpret_cast(_data); - char hex[HEX_DUMP_WIDTH*3+1]; - char ascii[HEX_DUMP_WIDTH+1]; - uint32_t hexPos = 0; - uint32_t asciiPos = 0; - for (uint32_t ii = 0; ii < _size; ++ii) - { - bx::snprintf(&hex[hexPos], sizeof(hex)-hexPos, "%02x ", data[asciiPos]); - hexPos += 3; - - ascii[asciiPos] = isprint(data[asciiPos]) ? data[asciiPos] : '.'; - asciiPos++; - - if (HEX_DUMP_WIDTH == asciiPos) - { - ascii[asciiPos] = '\0'; - dbgPrintf("\t" DBG_ADDRESS "\t" HEX_DUMP_FORMAT "\t%s\n", data, hex, ascii); - data += asciiPos; - hexPos = 0; - asciiPos = 0; - } - } - - if (0 != asciiPos) - { - ascii[asciiPos] = '\0'; - dbgPrintf("\t" DBG_ADDRESS "\t" HEX_DUMP_FORMAT "\t%s\n", data, hex, ascii); - } - } - -#undef HEX_DUMP_WIDTH -#undef HEX_DUMP_SPACE_WIDTH -#undef HEX_DUMP_FORMAT -} diff --git a/3rdparty/bx/tests/dbg.h b/3rdparty/bx/tests/dbg.h index 9ae46b3..243dc23 100644 --- a/3rdparty/bx/tests/dbg.h +++ b/3rdparty/bx/tests/dbg.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/tests/easing_test.cpp b/3rdparty/bx/tests/easing_test.cpp new file mode 100644 index 0000000..2107b71 --- /dev/null +++ b/3rdparty/bx/tests/easing_test.cpp @@ -0,0 +1,58 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" + +#include +#include + +TEST_CASE("easing", "") +{ + bx::WriterI* writer = bx::getNullOut(); + + for (uint32_t ee = 0; ee < bx::Easing::Count; ++ee) + { + bx::writePrintf(writer, "\n\n%d\n", ee); + + const bx::EaseFn easing = bx::getEaseFunc(bx::Easing::Enum(ee) ); + + const int32_t nx = 64; + const int32_t ny = 10; + + bx::writePrintf(writer, "\t/// ^\n"); + + for (int32_t yy = ny+4; yy >= -5; --yy) + { + const float ys = float(yy )/float(ny); + const float ye = float(yy+1.0)/float(ny); + + bx::writePrintf(writer, "\t/// %c", yy != 0 ? '|' : '+'); + + for (int32_t xx = 0; xx < nx; ++xx) + { + int32_t jj = 0; + for (; jj < 10; ++jj) + { + const float tt = float(xx*10+jj)/10.0f/float(nx); + const float vv = easing(tt); + + if (vv >= ys + && vv < ye) + { + bx::writePrintf(writer, "*"); + break; + } + } + + if (jj == 10) + { + bx::writePrintf(writer, "%c", yy != 0 ? ' ' : '-'); + } + } + + bx::writePrintf(writer, "%s\n", yy != 0 ? "" : ">"); + } + } +} diff --git a/3rdparty/bx/tests/filepath_test.cpp b/3rdparty/bx/tests/filepath_test.cpp new file mode 100644 index 0000000..2662ade --- /dev/null +++ b/3rdparty/bx/tests/filepath_test.cpp @@ -0,0 +1,136 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include + +struct FilePathTest +{ + const char* filePath; + const char* expected; +}; + +FilePathTest s_filePathTest[] = +{ + // Already clean + {"", "."}, + {"abc", "abc"}, + {"abc/def", "abc/def"}, + {"a/b/c", "a/b/c"}, + {".", "."}, + {"..", ".."}, + {"../..", "../.."}, + {"../../abc", "../../abc"}, + {"/abc", "/abc"}, + {"/", "/"}, + + // Do not remove trailing slash + {"abc/", "abc/"}, + {"abc/def/", "abc/def/"}, + {"a/b/c/", "a/b/c/"}, + {"./", "./"}, + {"../", "../"}, + {"../../", "../../"}, + {"/abc/", "/abc/"}, + + // Remove doubled slash + {"abc//def//ghi", "abc/def/ghi"}, + {"//abc", "/abc"}, + {"///abc", "/abc"}, + {"//abc//", "/abc/"}, + {"abc//", "abc/"}, + + // Remove . elements + {"abc/./def", "abc/def"}, + {"/./abc/def", "/abc/def"}, + {"abc/.", "abc"}, + + // Remove .. elements + {"abc/def/ghi/../jkl", "abc/def/jkl"}, + {"abc/def/../ghi/../jkl", "abc/jkl"}, + {"abc/def/..", "abc"}, + {"abc/def/../..", "."}, + {"/abc/def/../..", "/"}, + {"abc/def/../../..", ".."}, + {"/abc/def/../../..", "/"}, + {"abc/def/../../../ghi/jkl/../../../mno", "../../mno"}, + + // Combinations + {"abc/./../def", "def"}, + {"abc//./../def", "def"}, + {"abc/../../././../def", "../../def"}, + + {"abc\\/../..\\/././../def", "../../def"}, + {"\\abc/def\\../..\\..", "/"}, +}; + +struct FilePathSplit +{ + const char* filePath; + bool absolute; + const char* path; + const char* fileName; + const char* baseName; + const char* extension; +}; + +static const FilePathSplit s_filePathSplit[] = +{ + { "\\abc/def\\../..\\../test.txt", true, "/", "test.txt", "test", ".txt" }, + { "/abv/gd/555/333/pod.mac", true, "/abv/gd/555/333/", "pod.mac", "pod", ".mac" }, + { "archive.tar.gz", false, "", "archive.tar.gz", "archive", ".tar.gz" }, + { "tmp/archive.tar.gz", false, "tmp/", "archive.tar.gz", "archive", ".tar.gz" }, + { "/tmp/archive.tar.gz", true, "/tmp/", "archive.tar.gz", "archive", ".tar.gz" }, + { "d:/tmp/archive.tar.gz", true, "D:/tmp/", "archive.tar.gz", "archive", ".tar.gz" }, + { "/tmp/abv/gd", true, "/tmp/abv/", "gd", "gd", "" }, + { "/tmp/abv/gd/", true, "/tmp/abv/gd/", "", "", "" }, +}; + +TEST_CASE("FilePath", "") +{ + bx::FilePath fp; + for (uint32_t ii = 0; ii < BX_COUNTOF(s_filePathTest); ++ii) + { + const FilePathTest& test = s_filePathTest[ii]; + + fp.set(test.filePath); + const bx::StringView result = fp.get(); + + REQUIRE(0 == bx::strCmp(test.expected, result) ); + } + + for (uint32_t ii = 0; ii < BX_COUNTOF(s_filePathSplit); ++ii) + { + const FilePathSplit& test = s_filePathSplit[ii]; + + fp.set(test.filePath); + const bx::StringView path = fp.getPath(); + const bx::StringView fileName = fp.getFileName(); + const bx::StringView baseName = fp.getBaseName(); + const bx::StringView ext = fp.getExt(); + + REQUIRE(0 == bx::strCmp(test.path, path) ); + REQUIRE(0 == bx::strCmp(test.fileName, fileName) ); + REQUIRE(0 == bx::strCmp(test.baseName, baseName) ); + REQUIRE(0 == bx::strCmp(test.extension, ext) ); + REQUIRE(test.absolute == fp.isAbsolute() ); + }; +} + +TEST_CASE("FilePath temp", "") +{ + bx::FilePath tmp(bx::Dir::Temp); + REQUIRE(0 != bx::strCmp(".", tmp.getPath().getPtr() ) ); + + bx::Error err; + tmp.join("test/abvgd/555333/test"); + REQUIRE(bx::makeAll(tmp, &err) ); + REQUIRE(err.isOk() ); + + tmp.set(bx::Dir::Temp); + tmp.join("test"); + REQUIRE(bx::removeAll(tmp, &err) ); + REQUIRE(err.isOk() ); +} diff --git a/3rdparty/bx/tests/fpumath.cpp b/3rdparty/bx/tests/fpumath.cpp deleted file mode 100644 index 8f98ea2..0000000 --- a/3rdparty/bx/tests/fpumath.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include "test.h" -#include - -void mtxCheck(const float* _a, const float* _b) -{ - if (!bx::fequal(_a, _b, 16, 0.01f) ) - { - DBG("\n" - "A:\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "B:\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - , _a[ 0], _a[ 1], _a[ 2], _a[ 3] - , _a[ 4], _a[ 5], _a[ 6], _a[ 7] - , _a[ 8], _a[ 9], _a[10], _a[11] - , _a[12], _a[13], _a[14], _a[15] - , _b[ 0], _b[ 1], _b[ 2], _b[ 3] - , _b[ 4], _b[ 5], _b[ 6], _b[ 7] - , _b[ 8], _b[ 9], _b[10], _b[11] - , _b[12], _b[13], _b[14], _b[15] - ); - - CHECK(false); - } -} - -TEST(Quaternion) -{ - float mtxQ[16]; - float mtx[16]; - - float quat[4] = { 0.0f, 0.0f, 0.0f, 1.0f }; - bx::mtxQuat(mtxQ, quat); - bx::mtxIdentity(mtx); - mtxCheck(mtxQ, mtx); - - float ax = bx::pi/27.0f; - float ay = bx::pi/13.0f; - float az = bx::pi/7.0f; - - bx::quatRotateX(quat, ax); - bx::mtxQuat(mtxQ, quat); - bx::mtxRotateX(mtx, ax); - mtxCheck(mtxQ, mtx); - - float euler[3]; - bx::quatToEuler(euler, quat); - CHECK(bx::fequal(euler[0], ax, 0.001f) ); - - bx::quatRotateY(quat, ay); - bx::mtxQuat(mtxQ, quat); - bx::mtxRotateY(mtx, ay); - mtxCheck(mtxQ, mtx); - - bx::quatToEuler(euler, quat); - CHECK(bx::fequal(euler[1], ay, 0.001f) ); - - bx::quatRotateZ(quat, az); - bx::mtxQuat(mtxQ, quat); - bx::mtxRotateZ(mtx, az); - mtxCheck(mtxQ, mtx); - - bx::quatToEuler(euler, quat); - CHECK(bx::fequal(euler[2], az, 0.001f) ); -} diff --git a/3rdparty/bx/tests/fpumath_test.cpp b/3rdparty/bx/tests/fpumath_test.cpp deleted file mode 100644 index ae84387..0000000 --- a/3rdparty/bx/tests/fpumath_test.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include "test.h" -#include - -#if !BX_COMPILER_MSVC || BX_COMPILER_MSVC >= 1800 -#include -TEST_CASE("isFinite, isInfinite, isNan", "") -{ - for (uint64_t ii = 0; ii < UINT32_MAX; ii += rand()%(1<<13)+1) - { - union { uint32_t ui; float f; } u = { uint32_t(ii) }; - REQUIRE(std::isnan(u.f) == bx::isNan(u.f) ); - REQUIRE(std::isfinite(u.f) == bx::isFinite(u.f) ); - REQUIRE(std::isinf(u.f) == bx::isInfinite(u.f) ); - } -} -#endif // !BX_COMPILER_MSVC || BX_COMPILER_MSVC >= 1800 - -TEST_CASE("ToBits", "") -{ - REQUIRE(UINT32_C(0x12345678) == bx::floatToBits( bx::bitsToFloat( UINT32_C(0x12345678) ) ) ); - REQUIRE(UINT64_C(0x123456789abcdef0) == bx::doubleToBits(bx::bitsToDouble(UINT32_C(0x123456789abcdef0) ) ) ); -} - -void mtxCheck(const float* _a, const float* _b) -{ - if (!bx::fequal(_a, _b, 16, 0.01f) ) - { - DBG("\n" - "A:\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "B:\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - "%10.4f %10.4f %10.4f %10.4f\n" - , _a[ 0], _a[ 1], _a[ 2], _a[ 3] - , _a[ 4], _a[ 5], _a[ 6], _a[ 7] - , _a[ 8], _a[ 9], _a[10], _a[11] - , _a[12], _a[13], _a[14], _a[15] - , _b[ 0], _b[ 1], _b[ 2], _b[ 3] - , _b[ 4], _b[ 5], _b[ 6], _b[ 7] - , _b[ 8], _b[ 9], _b[10], _b[11] - , _b[12], _b[13], _b[14], _b[15] - ); - - CHECK(false); - } -} - -TEST_CASE("quaternion", "") -{ - float mtxQ[16]; - float mtx[16]; - - float quat[4] = { 0.0f, 0.0f, 0.0f, 1.0f }; - bx::mtxQuat(mtxQ, quat); - bx::mtxIdentity(mtx); - mtxCheck(mtxQ, mtx); - - float ax = bx::pi/27.0f; - float ay = bx::pi/13.0f; - float az = bx::pi/7.0f; - - bx::quatRotateX(quat, ax); - bx::mtxQuat(mtxQ, quat); - bx::mtxRotateX(mtx, ax); - mtxCheck(mtxQ, mtx); - - float euler[3]; - bx::quatToEuler(euler, quat); - CHECK(bx::fequal(euler[0], ax, 0.001f) ); - - bx::quatRotateY(quat, ay); - bx::mtxQuat(mtxQ, quat); - bx::mtxRotateY(mtx, ay); - mtxCheck(mtxQ, mtx); - - bx::quatToEuler(euler, quat); - CHECK(bx::fequal(euler[1], ay, 0.001f) ); - - bx::quatRotateZ(quat, az); - bx::mtxQuat(mtxQ, quat); - bx::mtxRotateZ(mtx, az); - mtxCheck(mtxQ, mtx); - - bx::quatToEuler(euler, quat); - CHECK(bx::fequal(euler[2], az, 0.001f) ); -} diff --git a/3rdparty/bx/tests/handle.cpp b/3rdparty/bx/tests/handle.cpp deleted file mode 100644 index b5b7c18..0000000 --- a/3rdparty/bx/tests/handle.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include "test.h" -#include - -TEST(HandleListT) -{ - bx::HandleListT<32> list; - - list.pushBack(16); - CHECK(list.getFront() == 16); - CHECK(list.getBack() == 16); - - list.pushFront(7); - CHECK(list.getFront() == 7); - CHECK(list.getBack() == 16); - - uint16_t expected0[] = { 15, 31, 7, 16, 17, 11, 13 }; - list.pushBack(17); - list.pushBack(11); - list.pushBack(13); - list.pushFront(31); - list.pushFront(15); - uint16_t count = 0; - for (uint16_t it = list.getFront(); it != UINT16_MAX; it = list.getNext(it), ++count) - { - CHECK(it == expected0[count]); - } - CHECK(count == BX_COUNTOF(expected0) ); - - list.remove(17); - list.remove(31); - list.remove(16); - list.pushBack(16); - uint16_t expected1[] = { 15, 7, 11, 13, 16 }; - count = 0; - for (uint16_t it = list.getFront(); it != UINT16_MAX; it = list.getNext(it), ++count) - { - CHECK(it == expected1[count]); - } - CHECK(count == BX_COUNTOF(expected1) ); - - list.popBack(); - list.popFront(); - list.popBack(); - list.popBack(); - - CHECK(list.getFront() == 7); - CHECK(list.getBack() == 7); - - list.popBack(); - CHECK(list.getFront() == UINT16_MAX); - CHECK(list.getBack() == UINT16_MAX); -} - -TEST(HandleAllocLruT) -{ - bx::HandleAllocLruT<16> lru; - - uint16_t handle[4] = - { - lru.alloc(), - lru.alloc(), - lru.alloc(), - lru.alloc(), - }; - - lru.touch(handle[1]); - - uint16_t expected0[] = { handle[1], handle[3], handle[2], handle[0] }; - uint16_t count = 0; - for (uint16_t it = lru.getFront(); it != UINT16_MAX; it = lru.getNext(it), ++count) - { - CHECK(it == expected0[count]); - } -} diff --git a/3rdparty/bx/tests/handle_bench.cpp b/3rdparty/bx/tests/handle_bench.cpp index e8d8bee..4effb59 100644 --- a/3rdparty/bx/tests/handle_bench.cpp +++ b/3rdparty/bx/tests/handle_bench.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -106,5 +106,8 @@ int main() extern void simd_bench(); simd_bench(); - return EXIT_SUCCESS; + extern void math_bench(); + math_bench(); + + return bx::kExitSuccess; } diff --git a/3rdparty/bx/tests/handle_test.cpp b/3rdparty/bx/tests/handle_test.cpp index b82e1da..eb89b1f 100644 --- a/3rdparty/bx/tests/handle_test.cpp +++ b/3rdparty/bx/tests/handle_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -89,26 +89,26 @@ TEST_CASE("HandleHashTable", "") bx::StringView sv0("test0"); - bool ok = hm.insert(bx::hashMurmur2A(sv0), 0); + bool ok = hm.insert(bx::hash(sv0), 0); REQUIRE(ok); - ok = hm.insert(bx::hashMurmur2A(sv0), 0); + ok = hm.insert(bx::hash(sv0), 0); REQUIRE(!ok); REQUIRE(1 == hm.getNumElements() ); bx::StringView sv1("test1"); - ok = hm.insert(bx::hashMurmur2A(sv1), 0); + ok = hm.insert(bx::hash(sv1), 0); REQUIRE(ok); REQUIRE(2 == hm.getNumElements() ); hm.removeByHandle(0); REQUIRE(0 == hm.getNumElements() ); - ok = hm.insert(bx::hashMurmur2A(sv0), 0); + ok = hm.insert(bx::hash(sv0), 0); REQUIRE(ok); - hm.removeByKey(bx::hashMurmur2A(sv0) ); + hm.removeByKey(bx::hash(sv0) ); REQUIRE(0 == hm.getNumElements() ); for (uint32_t ii = 0, num = hm.getMaxCapacity(); ii < num; ++ii) diff --git a/3rdparty/bx/tests/hash_test.cpp b/3rdparty/bx/tests/hash_test.cpp new file mode 100644 index 0000000..1ec6702 --- /dev/null +++ b/3rdparty/bx/tests/hash_test.cpp @@ -0,0 +1,79 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include + +void makeCrcTable(uint32_t _poly) +{ + for (uint32_t ii = 0; ii < 256; ++ii) + { + uint32_t crc = ii; + for (uint32_t jj = 0; jj < 8; ++jj) + { + if (1 == (crc & 1) ) + { + crc = (crc >> 1) ^ _poly; + } + else + { + crc >>= 1; + } + } + + printf("0x%08x,%c", crc, 7 == (ii & 7) ? '\n' : ' '); + } +} + +struct HashTest +{ + uint32_t crc32; + uint32_t adler32; + const char* input; +}; + +const HashTest s_hashTest[] = +{ + { 0, 1, "" }, + { 0xe8b7be43, 0x00620062, "a" }, + { 0x9e83486d, 0x012600c4, "ab" }, + { 0xc340daab, 0x06060205, "abvgd" }, + { 0x07642fe2, 0x020a00d6, "1389" }, + { 0x26d75737, 0x04530139, "555333" }, +}; + +TEST_CASE("HashCrc32", "") +{ +#if 0 + makeCrcTable(0xedb88320); + printf("\n"); + makeCrcTable(0x82f63b78); + printf("\n"); + makeCrcTable(0xeb31d82e); +#endif // 0 + + for (uint32_t ii = 0; ii < BX_COUNTOF(s_hashTest); ++ii) + { + const HashTest& test = s_hashTest[ii]; + + bx::HashCrc32 hash; + hash.begin(); + hash.add(test.input, bx::strLen(test.input) ); + REQUIRE(test.crc32 == hash.end() ); + } +} + +TEST_CASE("HashAdler32", "") +{ + for (uint32_t ii = 0; ii < BX_COUNTOF(s_hashTest); ++ii) + { + const HashTest& test = s_hashTest[ii]; + + bx::HashAdler32 hash; + hash.begin(); + hash.add(test.input, bx::strLen(test.input) ); + REQUIRE(test.adler32 == hash.end() ); + } +} diff --git a/3rdparty/bx/tests/macros.cpp b/3rdparty/bx/tests/macros.cpp deleted file mode 100644 index 321bc67..0000000 --- a/3rdparty/bx/tests/macros.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include "test.h" -#include -#include - -BX_STATIC_ASSERT(1 == BX_VA_ARGS_COUNT(1) ); -BX_STATIC_ASSERT(2 == BX_VA_ARGS_COUNT(1, 2) ); -BX_STATIC_ASSERT(3 == BX_VA_ARGS_COUNT(1, 2, 3) ); -BX_STATIC_ASSERT(4 == BX_VA_ARGS_COUNT(1, 2, 3, 4) ); -BX_STATIC_ASSERT(5 == BX_VA_ARGS_COUNT(1, 2, 3, 4, 5) ); -BX_STATIC_ASSERT(6 == BX_VA_ARGS_COUNT(1, 2, 3, 4, 5, 6) ); - -BX_STATIC_ASSERT( 0 == BX_ALIGN_16( 0) ); -BX_STATIC_ASSERT( 16 == BX_ALIGN_16( 1) ); -BX_STATIC_ASSERT( 16 == BX_ALIGN_16( 15) ); -BX_STATIC_ASSERT( 16 == BX_ALIGN_16( 16) ); -BX_STATIC_ASSERT(256 == BX_ALIGN_16(255) ); - -BX_STATIC_ASSERT( 0 == BX_ALIGN_256( 0) ); -BX_STATIC_ASSERT(256 == BX_ALIGN_256( 1) ); -BX_STATIC_ASSERT(256 == BX_ALIGN_256( 15) ); -BX_STATIC_ASSERT(256 == BX_ALIGN_256(255) ); -BX_STATIC_ASSERT(256 == BX_ALIGN_256(256) ); -BX_STATIC_ASSERT(256 == BX_ALIGN_256(256) ); -BX_STATIC_ASSERT(512 == BX_ALIGN_256(511) ); - -BX_NO_INLINE void unusedFunction() -{ - CHECK(false); -} - -TEST(macros) -{ - uint32_t unused0; - BX_UNUSED(unused0); - - uint32_t unused1; - BX_UNUSED(unused0, unused1); - - uint32_t unused2; - BX_UNUSED(unused0, unused1, unused2, unusedFunction() ); - - CHECK_EQUAL(1, BX_VA_ARGS_COUNT(1) ); - CHECK_EQUAL(2, BX_VA_ARGS_COUNT(1, 2) ); - CHECK_EQUAL(3, BX_VA_ARGS_COUNT(1, 2, 3) ); - CHECK_EQUAL(4, BX_VA_ARGS_COUNT(1, 2, 3, 4) ); - CHECK_EQUAL(5, BX_VA_ARGS_COUNT(1, 2, 3, 4, 5) ); - CHECK_EQUAL(6, BX_VA_ARGS_COUNT(1, 2, 3, 4, 5, 6) ); - - CHECK_EQUAL(0, strcmp(BX_STRINGIZE(TEST 1234 %^&*), "TEST 1234 %^&*") ); -} diff --git a/3rdparty/bx/tests/macros_test.cpp b/3rdparty/bx/tests/macros_test.cpp index bae4bb8..e0d5ffa 100644 --- a/3rdparty/bx/tests/macros_test.cpp +++ b/3rdparty/bx/tests/macros_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -61,5 +61,5 @@ TEST(macros) CHECK_EQUAL(5, BX_VA_ARGS_COUNT(1, 2, 3, 4, 5) ); CHECK_EQUAL(6, BX_VA_ARGS_COUNT(1, 2, 3, 4, 5, 6) ); - CHECK_EQUAL(0, bx::strncmp(BX_STRINGIZE(TEST 1234 %^&*), "TEST 1234 %^&*") ); + CHECK_EQUAL(0, bx::strCmp(BX_STRINGIZE(TEST 1234 %^&*), "TEST 1234 %^&*") ); } diff --git a/3rdparty/bx/tests/main.cpp b/3rdparty/bx/tests/main.cpp deleted file mode 100644 index f6aaa90..0000000 --- a/3rdparty/bx/tests/main.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#define CATCH_CONFIG_RUNNER -#include "test.h" - -static const char* s_argv[] = { "bx.test" }; - -int runAllTests(int _argc, const char* _argv[]) -{ - DBG(BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME); - return Catch::Session().run(_argc, _argv); -} - -#if BX_PLATFORM_ANDROID -# include - -void ANativeActivity_onCreate(ANativeActivity*, void*, size_t) -{ - exit(runAllTests(BX_COUNTOF(s_argv), s_argv) ); -} -#elif BX_PLATFORM_NACL -# include -# include - -PP_EXPORT const void* PPP_GetInterface(const char* /*_name*/) -{ - return NULL; -} - -PP_EXPORT int32_t PPP_InitializeModule(PP_Module /*_module*/, PPB_GetInterface /*_interface*/) -{ - DBG("PPAPI version: %d", PPAPI_RELEASE); - runAllTests(BX_COUNTOF(s_argv), s_argv); - return PP_ERROR_NOINTERFACE; -} - -PP_EXPORT void PPP_ShutdownModule() -{ -} -#else -int main(int _argc, const char* _argv[]) -{ - return runAllTests(_argc, _argv); -} -#endif // BX_PLATFORM diff --git a/3rdparty/bx/tests/main_test.cpp b/3rdparty/bx/tests/main_test.cpp index b9d66db..b9e9074 100644 --- a/3rdparty/bx/tests/main_test.cpp +++ b/3rdparty/bx/tests/main_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -16,25 +16,6 @@ void ANativeActivity_onCreate(ANativeActivity*, void*, size_t) { exit(runAllTests(BX_COUNTOF(s_argv), s_argv) ); } -#elif BX_PLATFORM_NACL -# include -# include - -PP_EXPORT const void* PPP_GetInterface(const char* /*_name*/) -{ - return NULL; -} - -PP_EXPORT int32_t PPP_InitializeModule(PP_Module /*_module*/, PPB_GetInterface /*_interface*/) -{ - DBG("PPAPI version: %d", PPAPI_RELEASE); - runAllTests(BX_COUNTOF(s_argv), s_argv); - return PP_ERROR_NOINTERFACE; -} - -PP_EXPORT void PPP_ShutdownModule() -{ -} #else int main(int _argc, const char* _argv[]) { diff --git a/3rdparty/bx/tests/math_bench.cpp b/3rdparty/bx/tests/math_bench.cpp new file mode 100644 index 0000000..195b5f5 --- /dev/null +++ b/3rdparty/bx/tests/math_bench.cpp @@ -0,0 +1,78 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include +#include +#include + +#include + +typedef float (*MathFn)(float); + +template +float mathTest(const char* _name) +{ + bx::WriterI* writer = bx::getStdOut(); + int64_t elapsed = -bx::getHPCounter(); + + float result = 0.0f; + const float max = 1389.0f; + + for (float xx = 0.0f; xx < max; xx += 0.1f) + { + result += mfn(xx); + } + + elapsed += bx::getHPCounter(); + bx::writePrintf(writer, "%-20s: %15f\n", _name, double(elapsed) ); + + return result; +} + +float rsqrt(float _a) +{ + return 1.0f/::sqrtf(_a); +} + +void math_bench() +{ + bx::WriterI* writer = bx::getStdOut(); + bx::writePrintf(writer, "Math bench\n\n"); + + mathTest< ::sqrtf >(" ::sqrtf"); + mathTest("bx::sqrtRef"); + mathTest("bx::sqrtSimd"); + mathTest("bx::sqrt"); + + bx::writePrintf(writer, "\n"); + mathTest< ::rsqrt >(" ::rsqrtf"); + mathTest("bx::rsqrtRef"); + mathTest("bx::rsqrtSimd"); + mathTest("bx::rsqrt"); + + bx::writePrintf(writer, "\n"); + mathTest< ::sinf >(" ::sinf"); + mathTest("bx::sin"); + + bx::writePrintf(writer, "\n"); + mathTest< ::asinf>(" ::asinf"); + mathTest("bx::asin"); + + bx::writePrintf(writer, "\n"); + mathTest< ::cosf >(" ::cosf"); + mathTest("bx::cos"); + + bx::writePrintf(writer, "\n"); + mathTest< ::acosf>(" ::acosf"); + mathTest("bx::acos"); + + bx::writePrintf(writer, "\n"); + mathTest< ::tanf >(" ::tanf"); + mathTest("bx::tan"); + + bx::writePrintf(writer, "\n"); + mathTest< ::atanf>(" ::atanf"); + mathTest("bx::atan"); +} diff --git a/3rdparty/bx/tests/math_test.cpp b/3rdparty/bx/tests/math_test.cpp new file mode 100644 index 0000000..decca45 --- /dev/null +++ b/3rdparty/bx/tests/math_test.cpp @@ -0,0 +1,222 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include +#include + +#include + +#if !BX_COMPILER_MSVC || BX_COMPILER_MSVC >= 1800 +TEST_CASE("isFinite, isInfinite, isNan", "") +{ + for (uint64_t ii = 0; ii < UINT32_MAX; ii += rand()%(1<<13)+1) + { + union { uint32_t ui; float f; } u = { uint32_t(ii) }; + REQUIRE(std::isnan(u.f) == bx::isNan(u.f) ); + REQUIRE(std::isfinite(u.f) == bx::isFinite(u.f) ); + REQUIRE(std::isinf(u.f) == bx::isInfinite(u.f) ); + } +} +#endif // !BX_COMPILER_MSVC || BX_COMPILER_MSVC >= 1800 + +bool log2_test(float _a) +{ + return bx::log2(_a) == bx::log(_a) * (1.0f / bx::log(2.0f) ); +} + +TEST_CASE("log2", "") +{ + log2_test(0.0f); + log2_test(256.0f); +} + +TEST_CASE("libm", "") +{ + bx::WriterI* writer = bx::getNullOut(); + + REQUIRE(1389.0f == bx::abs(-1389.0f) ); + REQUIRE(1389.0f == bx::abs( 1389.0f) ); + REQUIRE( 0.0f == bx::abs(-0.0f) ); + REQUIRE( 0.0f == bx::abs( 0.0f) ); + + REQUIRE(389.0f == bx::mod(1389.0f, 1000.0f) ); + REQUIRE(bx::isNan(bx::mod(0.0f, 0.0f) ) ); + + REQUIRE( 13.0f == bx::floor( 13.89f) ); + REQUIRE(-14.0f == bx::floor(-13.89f) ); + REQUIRE( 14.0f == bx::ceil( 13.89f) ); + REQUIRE(-13.0f == bx::ceil( -13.89f) ); + + REQUIRE( 13.0f == bx::trunc( 13.89f) ); + REQUIRE(-13.0f == bx::trunc(-13.89f) ); + REQUIRE(bx::equal( 0.89f, bx::fract( 13.89f), 0.000001f) ); + REQUIRE(bx::equal(-0.89f, bx::fract(-13.89f), 0.000001f) ); + + for (int32_t yy = -10; yy < 10; ++yy) + { + for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) + { + bx::writePrintf(writer, "ldexp(%f, %d) == %f (expected: %f)\n", xx, yy, bx::ldexp(xx, yy), ::ldexpf(xx, yy) ); + REQUIRE(bx::equal(bx::ldexp(xx, yy), ::ldexpf(xx, yy), 0.00001f) ); + } + } + + for (float xx = -80.0f; xx < 80.0f; xx += 0.1f) + { + bx::writePrintf(writer, "exp(%f) == %f (expected: %f)\n", xx, bx::exp(xx), ::expf(xx) ); + REQUIRE(bx::equal(bx::exp(xx), ::expf(xx), 0.00001f) ); + } + + for (float xx = 0.0f; xx < 100.0f; xx += 0.1f) + { + bx::writePrintf(writer, "rsqrt(%f) == %f (expected: %f)\n", xx, bx::rsqrt(xx), 1.0f/::sqrtf(xx) ); + REQUIRE(bx::equal(bx::rsqrt(xx), 1.0f/::sqrtf(xx), 0.00001f) ); + } + + for (float xx = 0.0f; xx < 100.0f; xx += 0.1f) + { + bx::writePrintf(writer, "sqrt(%f) == %f (expected: %f)\n", xx, bx::sqrt(xx), ::sqrtf(xx) ); + REQUIRE(bx::equal(bx::sqrt(xx), ::sqrtf(xx), 0.00001f) ); + } + + for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) + { + bx::writePrintf(writer, "pow(1.389f, %f) == %f (expected: %f)\n", xx, bx::pow(1.389f, xx), ::powf(1.389f, xx) ); + REQUIRE(bx::equal(bx::pow(1.389f, xx), ::powf(1.389f, xx), 0.00001f) ); + } + + for (float xx = -1.0f; xx < 1.0f; xx += 0.001f) + { + bx::writePrintf(writer, "asin(%f) == %f (expected: %f)\n", xx, bx::asin(xx), ::asinf(xx) ); + REQUIRE(bx::equal(bx::asin(xx), ::asinf(xx), 0.0001f) ); + } + + for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) + { + bx::writePrintf(writer, "sin(%f) == %f (expected: %f)\n", xx, bx::sin(xx), ::sinf(xx) ); + REQUIRE(bx::equal(bx::sin(xx), ::sinf(xx), 0.00001f) ); + } + + for (float xx = -1.0f; xx < 1.0f; xx += 0.1f) + { + bx::writePrintf(writer, "sinh(%f) == %f (expected: %f)\n", xx, bx::sinh(xx), ::sinhf(xx) ); + REQUIRE(bx::equal(bx::sinh(xx), ::sinhf(xx), 0.00001f) ); + } + + for (float xx = -1.0f; xx < 1.0f; xx += 0.001f) + { + bx::writePrintf(writer, "acos(%f) == %f (expected: %f\n)", xx, bx::acos(xx), ::acosf(xx) ); + REQUIRE(bx::equal(bx::acos(xx), ::acosf(xx), 0.0001f) ); + } + + for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) + { + bx::writePrintf(writer, "cos(%f) == %f (expected: %f)\n", xx, bx::cos(xx), ::cosf(xx) ); + REQUIRE(bx::equal(bx::cos(xx), ::cosf(xx), 0.00001f) ); + } + + for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) + { + bx::writePrintf(writer, "tan(%f) == %f (expected: %f)\n", xx, bx::tan(xx), ::tanf(xx) ); + REQUIRE(bx::equal(bx::tan(xx), ::tanf(xx), 0.001f) ); + } + + for (float xx = -1.0f; xx < 1.0f; xx += 0.1f) + { + bx::writePrintf(writer, "tanh(%f) == %f (expected: %f\n", xx, bx::tanh(xx), ::tanhf(xx) ); + REQUIRE(bx::equal(bx::tanh(xx), ::tanhf(xx), 0.00001f) ); + } + + for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) + { + bx::writePrintf(writer, "atan(%f) == %f (expected: %f)\n", xx, bx::atan(xx), ::atanf(xx) ); + REQUIRE(bx::equal(bx::atan(xx), ::atanf(xx), 0.00001f) ); + } + + for (float yy = -100.0f; yy < 100.0f; yy += 0.1f) + { + for (float xx = -100.0f; xx < 100.0f; xx += 0.1f) + { + bx::writePrintf(writer, "atan2(%f, %f) == %f (expected: %f)\n", yy, xx, bx::atan2(yy, xx), ::atan2f(yy, xx) ); + REQUIRE(bx::equal(bx::atan2(yy, xx), ::atan2f(yy, xx), 0.00001f) ); + } + } +} + +TEST_CASE("ToBits", "") +{ + REQUIRE(UINT32_C(0x12345678) == bx::floatToBits( bx::bitsToFloat( UINT32_C(0x12345678) ) ) ); + REQUIRE(UINT64_C(0x123456789abcdef0) == bx::doubleToBits(bx::bitsToDouble(UINT32_C(0x123456789abcdef0) ) ) ); +} + +void mtxCheck(const float* _a, const float* _b) +{ + if (!bx::equal(_a, _b, 16, 0.01f) ) + { + DBG("\n" + "A:\n" + "%10.4f %10.4f %10.4f %10.4f\n" + "%10.4f %10.4f %10.4f %10.4f\n" + "%10.4f %10.4f %10.4f %10.4f\n" + "%10.4f %10.4f %10.4f %10.4f\n" + "B:\n" + "%10.4f %10.4f %10.4f %10.4f\n" + "%10.4f %10.4f %10.4f %10.4f\n" + "%10.4f %10.4f %10.4f %10.4f\n" + "%10.4f %10.4f %10.4f %10.4f\n" + , _a[ 0], _a[ 1], _a[ 2], _a[ 3] + , _a[ 4], _a[ 5], _a[ 6], _a[ 7] + , _a[ 8], _a[ 9], _a[10], _a[11] + , _a[12], _a[13], _a[14], _a[15] + , _b[ 0], _b[ 1], _b[ 2], _b[ 3] + , _b[ 4], _b[ 5], _b[ 6], _b[ 7] + , _b[ 8], _b[ 9], _b[10], _b[11] + , _b[12], _b[13], _b[14], _b[15] + ); + + CHECK(false); + } +} + +TEST_CASE("quaternion", "") +{ + float mtxQ[16]; + float mtx[16]; + + float quat[4] = { 0.0f, 0.0f, 0.0f, 1.0f }; + bx::mtxQuat(mtxQ, quat); + bx::mtxIdentity(mtx); + mtxCheck(mtxQ, mtx); + + float ax = bx::kPi/27.0f; + float ay = bx::kPi/13.0f; + float az = bx::kPi/7.0f; + + bx::quatRotateX(quat, ax); + bx::mtxQuat(mtxQ, quat); + bx::mtxRotateX(mtx, ax); + mtxCheck(mtxQ, mtx); + + float euler[3]; + bx::quatToEuler(euler, quat); + CHECK(bx::equal(euler[0], ax, 0.001f) ); + + bx::quatRotateY(quat, ay); + bx::mtxQuat(mtxQ, quat); + bx::mtxRotateY(mtx, ay); + mtxCheck(mtxQ, mtx); + + bx::quatToEuler(euler, quat); + CHECK(bx::equal(euler[1], ay, 0.001f) ); + + bx::quatRotateZ(quat, az); + bx::mtxQuat(mtxQ, quat); + bx::mtxRotateZ(mtx, az); + mtxCheck(mtxQ, mtx); + + bx::quatToEuler(euler, quat); + CHECK(bx::equal(euler[2], az, 0.001f) ); +} diff --git a/3rdparty/bx/tests/misc.cpp b/3rdparty/bx/tests/misc.cpp deleted file mode 100644 index aec1067..0000000 --- a/3rdparty/bx/tests/misc.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "test.h" -#include - -TEST(getProcessMemoryUsed) -{ - CHECK(0 != bx::getProcessMemoryUsed() ); -// DBG("bx::getProcessMemoryUsed %d", bx::getProcessMemoryUsed() ); -} diff --git a/3rdparty/bx/tests/misc_test.cpp b/3rdparty/bx/tests/misc_test.cpp deleted file mode 100644 index aec1067..0000000 --- a/3rdparty/bx/tests/misc_test.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "test.h" -#include - -TEST(getProcessMemoryUsed) -{ - CHECK(0 != bx::getProcessMemoryUsed() ); -// DBG("bx::getProcessMemoryUsed %d", bx::getProcessMemoryUsed() ); -} diff --git a/3rdparty/bx/tests/os_test.cpp b/3rdparty/bx/tests/os_test.cpp new file mode 100644 index 0000000..bf51c72 --- /dev/null +++ b/3rdparty/bx/tests/os_test.cpp @@ -0,0 +1,28 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include +#include +#include + +TEST_CASE("getProcessMemoryUsed", "") +{ + REQUIRE(0 != bx::getProcessMemoryUsed() ); +// DBG("bx::getProcessMemoryUsed %d", bx::getProcessMemoryUsed() ); +} + +TEST_CASE("semaphore_timeout", "") +{ + bx::Semaphore sem; + + int64_t start = bx::getHPCounter(); + bool ok = sem.wait(900); + int64_t elapsed = bx::getHPCounter() - start; + int64_t frequency = bx::getHPFrequency(); + double ms = double(elapsed) / double(frequency) * 1000; + printf("%f\n", ms); + REQUIRE(!ok); +} diff --git a/3rdparty/bx/tests/queue_test.cpp b/3rdparty/bx/tests/queue_test.cpp new file mode 100644 index 0000000..4a4d5c9 --- /dev/null +++ b/3rdparty/bx/tests/queue_test.cpp @@ -0,0 +1,36 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include +#include + +void* bitsToPtr(uintptr_t _ui) +{ + union { uintptr_t ui; void* ptr; } cast = { _ui }; + return cast.ptr; +} + +uintptr_t ptrToBits(void* _ptr) +{ + union { void* ptr; uintptr_t ui; } cast = { _ptr }; + return cast.ui; +} + +TEST_CASE("SpSc", "") +{ + bx::DefaultAllocator allocator; + bx::SpScUnboundedQueue queue(&allocator); + queue.push(bitsToPtr(0xdeadbeef) ); + REQUIRE(0xdeadbeef == ptrToBits(queue.pop() ) ); +} + +TEST_CASE("MpSc", "") +{ + bx::DefaultAllocator allocator; + bx::MpScUnboundedQueueT queue(&allocator); + queue.push(bitsToPtr(0xdeadbeef) ); + REQUIRE(0xdeadbeef == ptrToBits(queue.pop() ) ); +} diff --git a/3rdparty/bx/tests/ringbuffer_test.cpp b/3rdparty/bx/tests/ringbuffer_test.cpp new file mode 100644 index 0000000..d0d2a42 --- /dev/null +++ b/3rdparty/bx/tests/ringbuffer_test.cpp @@ -0,0 +1,20 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include + +TEST_CASE("RingBufferControl", "") +{ + bx::RingBufferControl control(16); + + REQUIRE(1 == control.reserve(1) ); + REQUIRE(0 == control.reserve(16, true) ); + REQUIRE(14 == control.reserve(16) ); + REQUIRE(15 == control.commit(15) ); + REQUIRE(15 == control.available() ); + REQUIRE(15 == control.consume(15) ); + REQUIRE(0 == control.available() ); +} diff --git a/3rdparty/bx/tests/rng_test.cpp b/3rdparty/bx/tests/rng_test.cpp new file mode 100644 index 0000000..d8bb85f --- /dev/null +++ b/3rdparty/bx/tests/rng_test.cpp @@ -0,0 +1,88 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" + +#include +#include + +const uint32_t kMax = 10<<20; + +template +void testRng(const char* _name, Ty* _rng) +{ + uint32_t histBits[32]; + uint32_t histUint8[256]; + + bx::memSet(histBits, 0, sizeof(histBits) ); + bx::memSet(histUint8, 0, sizeof(histUint8) ); + + for (uint32_t ii = 0; ii < kMax; ++ii) + { + uint32_t val = _rng->gen(); + + for (uint32_t shift = 0; shift < 32; ++shift) + { + const uint32_t mask = 1<>24; + const uint32_t m0f00 = (val & 0x00ff0000)>>16; + const uint32_t m00f0 = (val & 0x0000ff00)>> 8; + const uint32_t m000f = (val & 0x000000ff)>> 0; + + histUint8[mf000]++; + histUint8[m0f00]++; + histUint8[m00f0]++; + histUint8[m000f]++; + } + + bx::WriterI* writer = bx::getNullOut(); + bx::writePrintf(writer, "%s\n", _name); + + { + bx::writePrintf(writer, "\tbits histogram:\n"); + uint32_t min = UINT32_MAX; + uint32_t max = 0; + + for (uint32_t ii = 0; ii < BX_COUNTOF(histBits); ++ii) + { + bx::writePrintf(writer, "\t\t%3d: %d\n", ii, histBits[ii]); + min = bx::min(min, histBits[ii]); + max = bx::max(max, histBits[ii]); + } + + bx::writePrintf(writer, "\tmin: %d, max: %d (diff: %d)\n", min, max, max-min); + + REQUIRE(max-min < 8000); + } + + { + bx::writePrintf(writer, "\tuint8_t histogram:\n"); + uint32_t min = UINT32_MAX; + uint32_t max = 0; + + for (uint32_t ii = 0; ii < BX_COUNTOF(histUint8); ++ii) + { + bx::writePrintf(writer, "\t\t%3d: %d\n", ii, histUint8[ii]); + min = bx::min(min, histUint8[ii]); + max = bx::max(max, histUint8[ii]); + } + + bx::writePrintf(writer, "\tmin: %d, max: %d (diff: %d)\n", min, max, max-min); + + REQUIRE(max-min < 8000); + } +} + +TEST_CASE("Rng", "") +{ + bx::RngMwc mwc; + testRng("RngMwc", &mwc); + + bx::RngShr3 shr3; + testRng("RngShr3", &shr3); +} diff --git a/3rdparty/bx/tests/run_test.cpp b/3rdparty/bx/tests/run_test.cpp new file mode 100644 index 0000000..090c118 --- /dev/null +++ b/3rdparty/bx/tests/run_test.cpp @@ -0,0 +1,20 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#define CATCH_CONFIG_RUNNER +#include "test.h" + +int runAllTests(int _argc, const char* _argv[]) +{ + DBG("Compiler: " BX_COMPILER_NAME + ", CPU: " BX_CPU_NAME + ", Architecture: " BX_ARCH_NAME + ", OS: " BX_PLATFORM_NAME + ", CRT: " BX_CRT_NAME + ", Date: " __DATE__ + ", Time: " __TIME__ + ); + return Catch::Session().run(_argc, _argv); +} diff --git a/3rdparty/bx/tests/settings_test.cpp b/3rdparty/bx/tests/settings_test.cpp new file mode 100644 index 0000000..b66fa85 --- /dev/null +++ b/3rdparty/bx/tests/settings_test.cpp @@ -0,0 +1,49 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include +#include + +TEST_CASE("Settings", "") +{ + bx::FilePath filePath; + filePath.set(bx::Dir::Temp); + filePath.join("settings.ini"); + + bx::DefaultAllocator allocator; + + bx::Settings settings(&allocator); + + settings.set("meh/podmac", "true"); + settings.set("test/foo/bar/abvgd", "1389"); + + bx::FileWriter writer; + if (bx::open(&writer, filePath) ) + { + bx::write(&writer, settings); + bx::close(&writer); + } + + REQUIRE(NULL == settings.get("meh") ); + REQUIRE(0 == bx::strCmp(settings.get("meh/podmac"), "true") ); + REQUIRE(0 == bx::strCmp(settings.get("test/foo/bar/abvgd"), "1389") ); + + settings.remove("meh/podmac"); + REQUIRE(NULL == settings.get("meh/podmac") ); + + settings.clear(); + + bx::FileReader reader; + if (bx::open(&reader, filePath) ) + { + bx::read(&reader, settings); + bx::close(&reader); + } + + REQUIRE(NULL == settings.get("meh") ); + REQUIRE(0 == bx::strCmp(settings.get("meh/podmac"), "true") ); + REQUIRE(0 == bx::strCmp(settings.get("test/foo/bar/abvgd"), "1389") ); +} diff --git a/3rdparty/bx/tests/simd_bench.cpp b/3rdparty/bx/tests/simd_bench.cpp new file mode 100644 index 0000000..38ba407 --- /dev/null +++ b/3rdparty/bx/tests/simd_bench.cpp @@ -0,0 +1,133 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include +#include +#include +#include + +#include + +static void flushCache() +{ + static uint32_t length = 1 << 26; + static uint8_t* input = new uint8_t[length]; + static uint8_t* output = new uint8_t[length]; + bx::memCopy(output, input, length); +} + +typedef bx::simd128_t (*SimdRsqrtFn)(bx::simd128_t _a); + +template +void simd_rsqrt_bench(bx::simd128_t* _dst, bx::simd128_t* _src, uint32_t _numVertices) +{ + for (uint32_t ii = 0, num = _numVertices/4; ii < num; ++ii) + { + bx::simd128_t* ptr = &_src[ii*4]; + bx::simd128_t tmp0 = bx::simd_ld(ptr + 0); + bx::simd128_t tmp1 = bx::simd_ld(ptr + 1); + bx::simd128_t tmp2 = bx::simd_ld(ptr + 2); + bx::simd128_t tmp3 = bx::simd_ld(ptr + 3); + bx::simd128_t rsqrt0 = simdRsqrtFn(tmp0); + bx::simd128_t rsqrt1 = simdRsqrtFn(tmp1); + bx::simd128_t rsqrt2 = simdRsqrtFn(tmp2); + bx::simd128_t rsqrt3 = simdRsqrtFn(tmp3); + + ptr = &_dst[ii*4]; + bx::simd_st(ptr + 0, rsqrt0); + bx::simd_st(ptr + 1, rsqrt1); + bx::simd_st(ptr + 2, rsqrt2); + bx::simd_st(ptr + 3, rsqrt3); + } +} + +void simd_bench_pass(bx::simd128_t* _dst, bx::simd128_t* _src, uint32_t _numVertices) +{ + const uint32_t numIterations = 10; + + { + int64_t elapsed = 0; + for (uint32_t test = 0; test < numIterations; ++test) + { + flushCache(); + elapsed += -bx::getHPCounter(); + simd_rsqrt_bench(_dst, _src, _numVertices); + elapsed += bx::getHPCounter(); + } + printf(" simd_rsqrt_est: %15f\n", double(elapsed) ); + } + + { + int64_t elapsed = 0; + for (uint32_t test = 0; test < numIterations; ++test) + { + flushCache(); + elapsed += -bx::getHPCounter(); + simd_rsqrt_bench(_dst, _src, _numVertices); + elapsed += bx::getHPCounter(); + } + printf(" simd_rsqrt_nr: %15f\n", double(elapsed) ); + } + + { + int64_t elapsed = 0; + for (uint32_t test = 0; test < numIterations; ++test) + { + flushCache(); + elapsed += -bx::getHPCounter(); + simd_rsqrt_bench(_dst, _src, _numVertices); + elapsed += bx::getHPCounter(); + } + printf("simd_rsqrt_carmack: %15f\n", double(elapsed) ); + } + + { + int64_t elapsed = 0; + for (uint32_t test = 0; test < numIterations; ++test) + { + flushCache(); + elapsed += -bx::getHPCounter(); + simd_rsqrt_bench(_dst, _src, _numVertices); + elapsed += bx::getHPCounter(); + } + printf(" simd_rsqrt: %15f\n", double(elapsed) ); + } +} + +void simd_bench() +{ + bx::DefaultAllocator allocator; + bx::RngMwc rng; + + const uint32_t numVertices = 1024*1024; + + uint8_t* data = (uint8_t*)BX_ALIGNED_ALLOC(&allocator, 2*numVertices*sizeof(bx::simd128_t), 16); + bx::simd128_t* src = (bx::simd128_t*)data; + bx::simd128_t* dst = &src[numVertices]; + + printf("\n -- positive & negative --\n"); + for (uint32_t ii = 0; ii < numVertices; ++ii) + { + float* ptr = (float*)&src[ii]; + randUnitSphere(ptr, &rng); + ptr[3] = 1.0f; + } + + simd_bench_pass(dst, src, numVertices); + + printf("\n -- positive only --\n"); + for (uint32_t ii = 0; ii < numVertices; ++ii) + { + float* ptr = (float*)&src[ii]; + ptr[0] = bx::abs(ptr[0]); + ptr[1] = bx::abs(ptr[1]); + ptr[2] = bx::abs(ptr[2]); + ptr[3] = bx::abs(ptr[3]); + } + + simd_bench_pass(dst, src, numVertices); + + BX_ALIGNED_FREE(&allocator, data, 16); +} diff --git a/3rdparty/bx/tests/simd_t.cpp b/3rdparty/bx/tests/simd_t.cpp deleted file mode 100644 index 0edf303..0000000 --- a/3rdparty/bx/tests/simd_t.cpp +++ /dev/null @@ -1,439 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include "test.h" -#include -#include -#include - -using namespace bx; - -union simd_cast -{ - bx::simd256_t simd256; - bx::simd128_t simd128; - float f[8]; - uint32_t ui[8]; - int32_t i[8]; - char c[32]; -}; - -void simd_check_bool(const char* _str, bool _a, bool _0) -{ - DBG("%s %d == %d" - , _str - , _a - , _0 - ); - - CHECK_EQUAL(_a, _0); -} - -void simd_check_int32( - const char* _str - , bx::simd128_t _a - , int32_t _0 - , int32_t _1 - , int32_t _2 - , int32_t _3 - ) -{ - simd_cast c; c.simd128 = _a; - DBG("%s (%d, %d, %d, %d) == (%d, %d, %d, %d)" - , _str - , c.i[0], c.i[1], c.i[2], c.i[3] - , _0, _1, _2, _3 - ); - - CHECK_EQUAL(c.i[0], _0); - CHECK_EQUAL(c.i[1], _1); - CHECK_EQUAL(c.i[2], _2); - CHECK_EQUAL(c.i[3], _3); -} - -#if 0 -void simd_check_int32( - const char* _str - , bx::simd256_t _a - , int32_t _0 - , int32_t _1 - , int32_t _2 - , int32_t _3 - , int32_t _4 - , int32_t _5 - , int32_t _6 - , int32_t _7 - ) -{ - simd_cast c; c.simd256 = _a; - DBG("%s (%d, %d, %d, %d, %d, %d, %d, %d) == (%d, %d, %d, %d, %d, %d, %d, %d)" - , _str - , c.i[0], c.i[1], c.i[2], c.i[3], c.i[4], c.i[5], c.i[6], c.i[7] - , _0, _1, _2, _3, _4, _5, _6, _7 - ); - - CHECK_EQUAL(c.i[0], _0); - CHECK_EQUAL(c.i[1], _1); - CHECK_EQUAL(c.i[2], _2); - CHECK_EQUAL(c.i[3], _3); - CHECK_EQUAL(c.i[4], _4); - CHECK_EQUAL(c.i[5], _5); - CHECK_EQUAL(c.i[6], _6); - CHECK_EQUAL(c.i[7], _7); -} -#endif // 0 - -void simd_check_uint32( - const char* _str - , bx::simd128_t _a - , uint32_t _0 - , uint32_t _1 - , uint32_t _2 - , uint32_t _3 - ) -{ - simd_cast c; c.simd128 = _a; - - DBG("%s (0x%08x, 0x%08x, 0x%08x, 0x%08x) == (0x%08x, 0x%08x, 0x%08x, 0x%08x)" - , _str - , c.ui[0], c.ui[1], c.ui[2], c.ui[3] - , _0, _1, _2, _3 - ); - - CHECK_EQUAL(c.ui[0], _0); - CHECK_EQUAL(c.ui[1], _1); - CHECK_EQUAL(c.ui[2], _2); - CHECK_EQUAL(c.ui[3], _3); -} - -#if 0 -void simd_check_uint32( - const char* _str - , bx::simd256_t _a - , uint32_t _0 - , uint32_t _1 - , uint32_t _2 - , uint32_t _3 - , uint32_t _4 - , uint32_t _5 - , uint32_t _6 - , uint32_t _7 - ) -{ - simd_cast c; c.simd256 = _a; - - DBG("%s (0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x) == (0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x, 0x%08x)" - , _str - , c.ui[0], c.ui[1], c.ui[2], c.ui[3], c.ui[4], c.ui[5], c.ui[6], c.ui[7] - , _0, _1, _2, _3, _4, _5, _6, _7 - ); - - CHECK_EQUAL(c.ui[0], _0); - CHECK_EQUAL(c.ui[1], _1); - CHECK_EQUAL(c.ui[2], _2); - CHECK_EQUAL(c.ui[3], _3); - CHECK_EQUAL(c.ui[4], _4); - CHECK_EQUAL(c.ui[5], _5); - CHECK_EQUAL(c.ui[6], _6); - CHECK_EQUAL(c.ui[7], _7); -} -#endif // 0 - -void simd_check_float( - const char* _str - , bx::simd128_t _a - , float _0 - , float _1 - , float _2 - , float _3 - ) -{ - simd_cast c; c.simd128 = _a; - - DBG("%s (%f, %f, %f, %f) == (%f, %f, %f, %f)" - , _str - , c.f[0], c.f[1], c.f[2], c.f[3] - , _0, _1, _2, _3 - ); - - CHECK(bx::fequal(c.f[0], _0, 0.0001f) ); - CHECK(bx::fequal(c.f[1], _1, 0.0001f) ); - CHECK(bx::fequal(c.f[2], _2, 0.0001f) ); - CHECK(bx::fequal(c.f[3], _3, 0.0001f) ); -} - -#if 0 -void simd_check_float( - const char* _str - , bx::simd256_t _a - , float _0 - , float _1 - , float _2 - , float _3 - , float _4 - , float _5 - , float _6 - , float _7 - ) -{ - simd_cast c; c.simd256 = _a; - - DBG("%s (%f, %f, %f, %f, %f, %f, %f, %f) == (%f, %f, %f, %f, %f, %f, %f, %f)" - , _str - , c.f[0], c.f[1], c.f[2], c.f[3], c.f[4], c.f[5], c.f[6], c.f[7] - , _0, _1, _2, _3, _4, _5, _6, _7 - ); - - CHECK(bx::fequal(c.f[0], _0, 0.0001f) ); - CHECK(bx::fequal(c.f[1], _1, 0.0001f) ); - CHECK(bx::fequal(c.f[2], _2, 0.0001f) ); - CHECK(bx::fequal(c.f[3], _3, 0.0001f) ); - CHECK(bx::fequal(c.f[4], _4, 0.0001f) ); - CHECK(bx::fequal(c.f[5], _5, 0.0001f) ); - CHECK(bx::fequal(c.f[6], _6, 0.0001f) ); - CHECK(bx::fequal(c.f[7], _7, 0.0001f) ); -} -#endif // 0 - -void simd_check_string(const char* _str, bx::simd128_t _a) -{ - simd_cast c; c.simd128 = _a; - const char test[5] = { c.c[0], c.c[4], c.c[8], c.c[12], '\0' }; - - DBG("%s %s", _str, test); - - CHECK(0 == strcmp(_str, test) ); -} - -TEST(simd_swizzle) -{ - const simd128_t xyzw = simd_ild(0x78787878, 0x79797979, 0x7a7a7a7a, 0x77777777); - -#define ELEMx 0 -#define ELEMy 1 -#define ELEMz 2 -#define ELEMw 3 -#define BX_SIMD128_IMPLEMENT_SWIZZLE(_x, _y, _z, _w) \ - simd_check_string("" #_x #_y #_z #_w "", simd_swiz_##_x##_y##_z##_w(xyzw) ); \ - -#include - -#undef BX_SIMD128_IMPLEMENT_SWIZZLE -#undef ELEMw -#undef ELEMz -#undef ELEMy -#undef ELEMx -} - -TEST(simd_shuffle) -{ - const simd128_t xyzw = simd_ild(0x78787878, 0x79797979, 0x7a7a7a7a, 0x77777777); - const simd128_t ABCD = simd_ild(0x41414141, 0x42424242, 0x43434343, 0x44444444); - simd_check_string("xyAB", simd_shuf_xyAB(xyzw, ABCD) ); - simd_check_string("ABxy", simd_shuf_ABxy(xyzw, ABCD) ); - simd_check_string("zwCD", simd_shuf_zwCD(xyzw, ABCD) ); - simd_check_string("CDzw", simd_shuf_CDzw(xyzw, ABCD) ); - simd_check_string("xAyB", simd_shuf_xAyB(xyzw, ABCD) ); - simd_check_string("zCwD", simd_shuf_zCwD(xyzw, ABCD) ); - simd_check_string("xAzC", simd_shuf_xAzC(xyzw, ABCD) ); - simd_check_string("yBwD", simd_shuf_yBwD(xyzw, ABCD) ); - simd_check_string("CzDw", simd_shuf_CzDw(xyzw, ABCD) ); -} - -TEST(simd_compare) -{ - simd_check_uint32("cmpeq" - , simd_cmpeq(simd_ld(1.0f, 2.0f, 3.0f, 4.0f), simd_ld(0.0f, 2.0f, 0.0f, 3.0f) ) - , 0, 0xffffffff, 0, 0 - ); - - simd_check_uint32("cmplt" - , simd_cmplt(simd_ld(1.0f, 2.0f, 3.0f, 4.0f), simd_ld(0.0f, 2.0f, 0.0f, 3.0f) ) - , 0, 0, 0, 0 - ); - - simd_check_uint32("cmple" - , simd_cmple(simd_ld(1.0f, 2.0f, 3.0f, 4.0f), simd_ld(0.0f, 2.0f, 0.0f, 3.0f) ) - , 0, 0xffffffff, 0, 0 - ); - - simd_check_uint32("cmpgt" - , simd_cmpgt(simd_ld(1.0f, 2.0f, 3.0f, 4.0f), simd_ld(0.0f, 2.0f, 0.0f, 3.0f) ) - , 0xffffffff, 0, 0xffffffff, 0xffffffff - ); - - simd_check_uint32("cmpge" - , simd_cmpge(simd_ld(1.0f, 2.0f, 3.0f, 4.0f), simd_ld(0.0f, 2.0f, 0.0f, 3.0f) ) - , 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff - ); - - simd_check_uint32("icmpeq" - , simd_icmpeq(simd_ild(0, 1, 2, 3), simd_ild(0, uint32_t(-2), 1, 3) ) - , 0xffffffff, 0, 0, 0xffffffff - ); - - simd_check_uint32("icmplt" - , simd_icmplt(simd_ild(0, 1, 2, 3), simd_ild(0, uint32_t(-2), 1, 3) ) - , 0, 0, 0, 0 - ); - - simd_check_uint32("icmpgt" - , simd_icmpgt(simd_ild(0, 1, 2, 3), simd_ild(0, uint32_t(-2), 1, 3) ) - , 0, 0xffffffff, 0xffffffff, 0 - ); -} - -TEST(simd_test) -{ - simd_check_bool("test_any_xyzw" - , simd_test_any_xyzw(simd_ild(0xffffffff, 0, 0, 0) ) - , true - ); - - simd_check_bool("test_all_xyzw" - , simd_test_all_xyzw(simd_ild(0xffffffff, 0, 0xffffffff, 0) ) - , false - ); - - simd_check_bool("test_all_xyzw" - , simd_test_all_xyzw(simd_ild(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff) ) - , true - ); - - simd_check_bool("test_all_xw" - , simd_test_all_xw(simd_ild(0xffffffff, 0, 0, 0xffffffff) ) - , true - ); - - simd_check_bool("test_all_xzw" - , simd_test_all_xzw(simd_ild(0xffffffff, 0, 0, 0xffffffff) ) - , false - ); -} - -TEST(simd_load) -{ - simd_check_float("ld" - , simd_ld(0.0f, 1.0f, 2.0f, 3.0f) - , 0.0f, 1.0f, 2.0f, 3.0f - ); - -// simd_check_float("ld" -// , simd_ld(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f) -// , 0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f -// ); - - simd_check_int32("ild" - , simd_ild(uint32_t(-1), 0, 1, 2) - , uint32_t(-1), 0, 1, 2 - ); - -// simd_check_int32("ild" -// , simd_ild(uint32_t(-1), 0, 1, 2, 3, 4, 5, 6) -// , uint32_t(-1), 0, 1, 2, 3, 4, 5, 6 -// ); - - simd_check_int32("ild" - , simd_ild(uint32_t(-1), uint32_t(-2), uint32_t(-3), uint32_t(-4) ) - , uint32_t(-1), uint32_t(-2), uint32_t(-3), uint32_t(-4) - ); - - simd_check_uint32("zero", simd_zero() - , 0, 0, 0, 0 - ); - - simd_check_uint32("isplat", simd_isplat(0x80000001) - , 0x80000001, 0x80000001, 0x80000001, 0x80000001 - ); - - simd_check_float("isplat", simd_splat(1.0f) - , 1.0f, 1.0f, 1.0f, 1.0f - ); -} - -TEST(simd_arithmetic) -{ - simd_check_float("madd" - , simd_madd(simd_ld(0.0f, 1.0f, 2.0f, 3.0f), simd_ld(4.0f, 5.0f, 6.0f, 7.0f), simd_ld(8.0f, 9.0f, 10.0f, 11.0f) ) - , 8.0f, 14.0f, 22.0f, 32.0f - ); - - simd_check_float("cross3" - , simd_cross3(simd_ld(1.0f, 0.0f, 0.0f, 0.0f), simd_ld(0.0f, 1.0f, 0.0f, 0.0f) ) - , 0.0f, 0.0f, 1.0f, 0.0f - ); -} - -TEST(simd_sqrt) -{ - simd_check_float("simd_sqrt" - , simd_sqrt(simd_ld(1.0f, 16.0f, 65536.0f, 123456.0f) ) - , 1.0f, 4.0f, 256.0f, 351.363060096f - ); - - simd_check_float("simd_sqrt_nr_ni" - , simd_sqrt_nr_ni(simd_ld(1.0f, 16.0f, 65536.0f, 123456.0f) ) - , 1.0f, 4.0f, 256.0f, 351.363060096f - ); - - simd_check_float("simd_sqrt_nr1_ni" - , simd_sqrt_nr1_ni(simd_ld(1.0f, 16.0f, 65536.0f, 123456.0f) ) - , 1.0f, 4.0f, 256.0f, 351.363060096f - ); -} - -TEST(float4) -{ - const simd128_t isplat = simd_isplat(0x80000001); - simd_check_uint32("sll" - , simd_sll(isplat, 1) - , 0x00000002, 0x00000002, 0x00000002, 0x00000002 - ); - - simd_check_uint32("srl" - , simd_srl(isplat, 1) - , 0x40000000, 0x40000000, 0x40000000, 0x40000000 - ); - - simd_check_uint32("sra" - , simd_sra(isplat, 1) - , 0xc0000000, 0xc0000000, 0xc0000000, 0xc0000000 - ); - - simd_check_uint32("and" - , simd_and(simd_isplat(0x55555555), simd_isplat(0xaaaaaaaa) ) - , 0, 0, 0, 0 - ); - - simd_check_uint32("or " - , simd_or(simd_isplat(0x55555555), simd_isplat(0xaaaaaaaa) ) - , uint32_t(-1), uint32_t(-1), uint32_t(-1), uint32_t(-1) - ); - - simd_check_uint32("xor" - , simd_or(simd_isplat(0x55555555), simd_isplat(0xaaaaaaaa) ) - , uint32_t(-1), uint32_t(-1), uint32_t(-1), uint32_t(-1) - ); - - simd_check_int32("imin" - , simd_imin(simd_ild(0, 1, 2, 3), simd_ild(uint32_t(-1), 2, uint32_t(-2), 1) ) - , uint32_t(-1), 1, uint32_t(-2), 1 - ); - - simd_check_float("min" - , simd_min(simd_ld(0.0f, 1.0f, 2.0f, 3.0f), simd_ld(-1.0f, 2.0f, -2.0f, 1.0f) ) - , -1.0f, 1.0f, -2.0f, 1.0f - ); - - simd_check_int32("imax" - , simd_imax(simd_ild(0, 1, 2, 3), simd_ild(uint32_t(-1), 2, uint32_t(-2), 1) ) - , 0, 2, 2, 3 - ); - - simd_check_float("max" - , simd_max(simd_ld(0.0f, 1.0f, 2.0f, 3.0f), simd_ld(-1.0f, 2.0f, -2.0f, 1.0f) ) - , 0.0f, 2.0f, 2.0f, 3.0f - ); -} diff --git a/3rdparty/bx/tests/simd_test.cpp b/3rdparty/bx/tests/simd_test.cpp index ca46fd0..3a211ca 100644 --- a/3rdparty/bx/tests/simd_test.cpp +++ b/3rdparty/bx/tests/simd_test.cpp @@ -1,11 +1,11 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #include "test.h" #include -#include +#include #include #if 0 @@ -162,10 +162,10 @@ void simd_check_float( , _0, _1, _2, _3 ); - CHECK(bx::fequal(c.f[0], _0, 0.0001f) ); - CHECK(bx::fequal(c.f[1], _1, 0.0001f) ); - CHECK(bx::fequal(c.f[2], _2, 0.0001f) ); - CHECK(bx::fequal(c.f[3], _3, 0.0001f) ); + CHECK(bx::equal(c.f[0], _0, 0.0001f) ); + CHECK(bx::equal(c.f[1], _1, 0.0001f) ); + CHECK(bx::equal(c.f[2], _2, 0.0001f) ); + CHECK(bx::equal(c.f[3], _3, 0.0001f) ); } void simd_check_float( @@ -189,14 +189,14 @@ void simd_check_float( , _0, _1, _2, _3, _4, _5, _6, _7 ); - CHECK(bx::fequal(c.f[0], _0, 0.0001f) ); - CHECK(bx::fequal(c.f[1], _1, 0.0001f) ); - CHECK(bx::fequal(c.f[2], _2, 0.0001f) ); - CHECK(bx::fequal(c.f[3], _3, 0.0001f) ); - CHECK(bx::fequal(c.f[4], _4, 0.0001f) ); - CHECK(bx::fequal(c.f[5], _5, 0.0001f) ); - CHECK(bx::fequal(c.f[6], _6, 0.0001f) ); - CHECK(bx::fequal(c.f[7], _7, 0.0001f) ); + CHECK(bx::equal(c.f[0], _0, 0.0001f) ); + CHECK(bx::equal(c.f[1], _1, 0.0001f) ); + CHECK(bx::equal(c.f[2], _2, 0.0001f) ); + CHECK(bx::equal(c.f[3], _3, 0.0001f) ); + CHECK(bx::equal(c.f[4], _4, 0.0001f) ); + CHECK(bx::equal(c.f[5], _5, 0.0001f) ); + CHECK(bx::equal(c.f[6], _6, 0.0001f) ); + CHECK(bx::equal(c.f[7], _7, 0.0001f) ); } void simd_check_string(const char* _str, bx::simd128_t _a) @@ -206,7 +206,7 @@ void simd_check_string(const char* _str, bx::simd128_t _a) SIMD_DBG("%s %s", _str, test); - CHECK(0 == bx::strncmp(_str, test) ); + CHECK(0 == bx::strCmp(_str, test) ); } TEST_CASE("simd_swizzle", "") @@ -235,13 +235,14 @@ TEST_CASE("simd_shuffle", "") const simd128_t ABCD = simd_ild(0x41414141, 0x42424242, 0x43434343, 0x44444444); simd_check_string("xyAB", simd_shuf_xyAB(xyzw, ABCD) ); simd_check_string("ABxy", simd_shuf_ABxy(xyzw, ABCD) ); - simd_check_string("zwCD", simd_shuf_zwCD(xyzw, ABCD) ); simd_check_string("CDzw", simd_shuf_CDzw(xyzw, ABCD) ); + simd_check_string("zwCD", simd_shuf_zwCD(xyzw, ABCD) ); simd_check_string("xAyB", simd_shuf_xAyB(xyzw, ABCD) ); + simd_check_string("AxBy", simd_shuf_AxBy(xyzw, ABCD) ); simd_check_string("zCwD", simd_shuf_zCwD(xyzw, ABCD) ); + simd_check_string("CzDw", simd_shuf_CzDw(xyzw, ABCD) ); simd_check_string("xAzC", simd_shuf_xAzC(xyzw, ABCD) ); simd_check_string("yBwD", simd_shuf_yBwD(xyzw, ABCD) ); - simd_check_string("CzDw", simd_shuf_CzDw(xyzw, ABCD) ); } TEST_CASE("simd_compare", "") diff --git a/3rdparty/bx/tests/sort_test.cpp b/3rdparty/bx/tests/sort_test.cpp new file mode 100644 index 0000000..e2a5a25 --- /dev/null +++ b/3rdparty/bx/tests/sort_test.cpp @@ -0,0 +1,53 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include +#include +#include + +TEST_CASE("quickSort", "") +{ + const char* str[] = + { + "jabuka", + "kruska", + "malina", + "jagoda", + }; + + bx::quickSort(str, BX_COUNTOF(str), sizeof(void*) + , [](const void* _lhs, const void* _rhs) + { + const char* lhs = *(const char**)_lhs; + const char* rhs = *(const char**)_rhs; + return bx::strCmp(lhs, rhs); + }); + + REQUIRE(0 == bx::strCmp(str[0], "jabuka") ); + REQUIRE(0 == bx::strCmp(str[1], "jagoda") ); + REQUIRE(0 == bx::strCmp(str[2], "kruska") ); + REQUIRE(0 == bx::strCmp(str[3], "malina") ); + + int8_t byte[128]; + bx::RngMwc rng; + for (uint32_t ii = 0; ii < BX_COUNTOF(byte); ++ii) + { + byte[ii] = rng.gen()&0xff; + } + + bx::quickSort(byte, BX_COUNTOF(byte), 1 + , [](const void* _lhs, const void* _rhs) + { + int8_t lhs = *(const int8_t*)_lhs; + int8_t rhs = *(const int8_t*)_rhs; + return lhs - rhs; + }); + + for (uint32_t ii = 1; ii < BX_COUNTOF(byte); ++ii) + { + REQUIRE(byte[ii-1] <= byte[ii]); + } +} diff --git a/3rdparty/bx/tests/string_test.cpp b/3rdparty/bx/tests/string_test.cpp index 35e1dac..cc96acf 100644 --- a/3rdparty/bx/tests/string_test.cpp +++ b/3rdparty/bx/tests/string_test.cpp @@ -1,12 +1,13 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #include "test.h" +#include #include -#include #include +#include bx::AllocatorI* g_allocator; @@ -23,110 +24,185 @@ TEST_CASE("chars", "") } } -TEST_CASE("strnlen", "") +TEST_CASE("strLen", "") { const char* test = "test"; - REQUIRE(0 == bx::strnlen(test, 0) ); - REQUIRE(2 == bx::strnlen(test, 2) ); - REQUIRE(4 == bx::strnlen(test, INT32_MAX) ); + REQUIRE(0 == bx::strLen(test, 0) ); + REQUIRE(2 == bx::strLen(test, 2) ); + REQUIRE(4 == bx::strLen(test, INT32_MAX) ); } -TEST_CASE("strlncpy", "") +TEST_CASE("strCopy", "") { char dst[128]; size_t num; - num = bx::strlncpy(dst, 1, "blah"); + num = bx::strCopy(dst, 1, "blah"); REQUIRE(num == 0); - num = bx::strlncpy(dst, 3, "blah", 3); - REQUIRE(0 == bx::strncmp(dst, "bl") ); + num = bx::strCopy(dst, 3, "blah", 3); + REQUIRE(0 == bx::strCmp(dst, "bl") ); REQUIRE(num == 2); - num = bx::strlncpy(dst, sizeof(dst), "blah", 3); - REQUIRE(0 == bx::strncmp(dst, "bla") ); + num = bx::strCopy(dst, sizeof(dst), "blah", 3); + REQUIRE(0 == bx::strCmp(dst, "bla") ); REQUIRE(num == 3); - num = bx::strlncpy(dst, sizeof(dst), "blah"); - REQUIRE(0 == bx::strncmp(dst, "blah") ); + num = bx::strCopy(dst, sizeof(dst), "blah"); + REQUIRE(0 == bx::strCmp(dst, "bl", 2) ); + REQUIRE(0 == bx::strCmp(dst, "blah") ); REQUIRE(num == 4); } -TEST_CASE("strlncat", "") +TEST_CASE("strCat", "") { char dst[128] = { '\0' }; - REQUIRE(0 == bx::strlncat(dst, 1, "cat") ); + REQUIRE(0 == bx::strCat(dst, 1, "cat") ); - REQUIRE(4 == bx::strlncpy(dst, 5, "copy") ); - REQUIRE(3 == bx::strlncat(dst, 8, "cat") ); - REQUIRE(0 == bx::strncmp(dst, "copycat") ); + REQUIRE(4 == bx::strCopy(dst, 5, "copy") ); + REQUIRE(3 == bx::strCat(dst, 8, "cat") ); + REQUIRE(0 == bx::strCmp(dst, "copycat") ); + REQUIRE(0 == bx::strCmp(dst, "copy", 4) ); - REQUIRE(1 == bx::strlncat(dst, BX_COUNTOF(dst), "------", 1) ); - REQUIRE(3 == bx::strlncat(dst, BX_COUNTOF(dst), "cat") ); - REQUIRE(0 == bx::strncmp(dst, "copycat-cat") ); + REQUIRE(1 == bx::strCat(dst, BX_COUNTOF(dst), "------", 1) ); + REQUIRE(3 == bx::strCat(dst, BX_COUNTOF(dst), "cat") ); + REQUIRE(0 == bx::strCmp(dst, "copycat-cat") ); } -TEST_CASE("strincmp", "") +TEST_CASE("strCmp", "") { - REQUIRE(0 == bx::strincmp("test", "test") ); - REQUIRE(0 == bx::strincmp("test", "testestes", 4) ); - REQUIRE(0 == bx::strincmp("testestes", "test", 4) ); - REQUIRE(0 != bx::strincmp("preprocess", "platform") ); + REQUIRE(0 != bx::strCmp("meh", "meh/") ); +} + +TEST_CASE("strCmpI", "") +{ + REQUIRE(0 == bx::strCmpI("test", "test") ); + REQUIRE(0 == bx::strCmpI("test", "testestes", 4) ); + REQUIRE(0 == bx::strCmpI("testestes", "test", 4) ); + REQUIRE(0 != bx::strCmpI("preprocess", "platform") ); const char* abvgd = "abvgd"; const char* abvgx = "abvgx"; const char* empty = ""; - REQUIRE(0 == bx::strincmp(abvgd, abvgd) ); - REQUIRE(0 == bx::strincmp(abvgd, abvgx, 4) ); + REQUIRE(0 == bx::strCmpI(abvgd, abvgd) ); + REQUIRE(0 == bx::strCmpI(abvgd, abvgx, 4) ); + REQUIRE(0 == bx::strCmpI(empty, empty) ); - REQUIRE(0 > bx::strincmp(abvgd, abvgx) ); - REQUIRE(0 > bx::strincmp(empty, abvgd) ); + REQUIRE(0 > bx::strCmpI(abvgd, abvgx) ); + REQUIRE(0 > bx::strCmpI(empty, abvgd) ); - REQUIRE(0 < bx::strincmp(abvgx, abvgd) ); - REQUIRE(0 < bx::strincmp(abvgd, empty) ); + REQUIRE(0 < bx::strCmpI(abvgx, abvgd) ); + REQUIRE(0 < bx::strCmpI(abvgd, empty) ); } -TEST_CASE("strnchr", "") +TEST_CASE("strCmpV", "") +{ + REQUIRE(0 == bx::strCmpV("test", "test") ); + REQUIRE(0 == bx::strCmpV("test", "testestes", 4) ); + REQUIRE(0 == bx::strCmpV("testestes", "test", 4) ); + REQUIRE(0 != bx::strCmpV("preprocess", "platform") ); + + const char* abvgd = "abvgd"; + const char* abvgx = "abvgx"; + const char* empty = ""; + REQUIRE(0 == bx::strCmpV(abvgd, abvgd) ); + REQUIRE(0 == bx::strCmpV(abvgd, abvgx, 4) ); + REQUIRE(0 == bx::strCmpV(empty, empty) ); + + REQUIRE(0 > bx::strCmpV(abvgd, abvgx) ); + REQUIRE(0 > bx::strCmpV(empty, abvgd) ); + + REQUIRE(0 < bx::strCmpV(abvgx, abvgd) ); + REQUIRE(0 < bx::strCmpV(abvgd, empty) ); +} + +static int32_t strCmpV(const void* _lhs, const void* _rhs) +{ + const char* lhs = *(const char**)_lhs; + const char* rhs = *(const char**)_rhs; + int32_t result = bx::strCmpV(lhs, rhs); + return result; +} + +TEST_CASE("strCmpV sort", "") +{ + const char* test[] = + { + "test_1.txt", + "test_10.txt", + "test_100.txt", + "test_15.txt", + "test_11.txt", + "test_23.txt", + "test_3.txt", + }; + + const char* expected[] = + { + "test_1.txt", + "test_3.txt", + "test_10.txt", + "test_11.txt", + "test_15.txt", + "test_23.txt", + "test_100.txt", + }; + + BX_STATIC_ASSERT(BX_COUNTOF(test) == BX_COUNTOF(expected) ); + + bx::quickSort(test, BX_COUNTOF(test), sizeof(const char*), strCmpV); + + for (uint32_t ii = 0; ii < BX_COUNTOF(test); ++ii) + { + REQUIRE(0 == bx::strCmp(test[ii], expected[ii]) ); + } +} + +TEST_CASE("strRFind", "") { const char* test = "test"; - REQUIRE(NULL == bx::strnchr(test, 's', 0) ); - REQUIRE(NULL == bx::strnchr(test, 's', 2) ); - REQUIRE(&test[2] == bx::strnchr(test, 's') ); + REQUIRE(NULL == bx::strRFind(bx::StringView(test, 0), 's') ); + REQUIRE(NULL == bx::strRFind(bx::StringView(test, 1), 's') ); + REQUIRE(&test[2] == bx::strRFind(test, 's') ); } -TEST_CASE("strnrchr", "") -{ - const char* test = "test"; - REQUIRE(NULL == bx::strnrchr(test, 's', 0) ); - REQUIRE(NULL == bx::strnrchr(test, 's', 1) ); - REQUIRE(&test[2] == bx::strnrchr(test, 's') ); -} - -TEST_CASE("stristr", "") +TEST_CASE("strFindI", "") { const char* test = "The Quick Brown Fox Jumps Over The Lazy Dog."; - REQUIRE(NULL == bx::stristr(test, "quick", 8) ); - REQUIRE(NULL == bx::stristr(test, "quick1") ); - REQUIRE(&test[4] == bx::stristr(test, "quick", 9) ); - REQUIRE(&test[4] == bx::stristr(test, "quick") ); + REQUIRE(NULL == bx::strFindI(bx::StringView(test, 8), "quick") ); + REQUIRE(NULL == bx::strFindI(test, "quick1") ); + REQUIRE(&test[4] == bx::strFindI(bx::StringView(test, 9), "quick") ); + REQUIRE(&test[4] == bx::strFindI(test, "quick") ); } -TEST_CASE("strnstr", "") +TEST_CASE("strFind", "") { - const char* test = "The Quick Brown Fox Jumps Over The Lazy Dog."; + { + const char* test = "test"; - REQUIRE(NULL == bx::strnstr(test, "quick", 8) ); - REQUIRE(NULL == bx::strnstr(test, "quick1") ); - REQUIRE(NULL == bx::strnstr(test, "quick", 9) ); - REQUIRE(NULL == bx::strnstr(test, "quick") ); + REQUIRE(NULL == bx::strFind(bx::StringView(test, 0), 's') ); + REQUIRE(NULL == bx::strFind(bx::StringView(test, 2), 's') ); + REQUIRE(&test[2] == bx::strFind(test, 's') ); + } - REQUIRE(NULL == bx::strnstr(test, "Quick", 8) ); - REQUIRE(NULL == bx::strnstr(test, "Quick1") ); - REQUIRE(&test[4] == bx::strnstr(test, "Quick", 9) ); - REQUIRE(&test[4] == bx::strnstr(test, "Quick") ); + { + const char* test = "The Quick Brown Fox Jumps Over The Lazy Dog."; + + REQUIRE(NULL == bx::strFind(bx::StringView(test, 8), "quick") ); + REQUIRE(NULL == bx::strFind(test, "quick1") ); + REQUIRE(NULL == bx::strFind(bx::StringView(test, 9), "quick") ); + REQUIRE(NULL == bx::strFind(test, "quick") ); + + REQUIRE(NULL == bx::strFind(bx::StringView(test, 8), "Quick") ); + REQUIRE(NULL == bx::strFind(test, "Quick1") ); + REQUIRE(&test[4] == bx::strFind(bx::StringView(test, 9), "Quick") ); + REQUIRE(&test[4] == bx::strFind(test, "Quick") ); + + REQUIRE(NULL == bx::strFind("vgd", 'a') ); + } } template @@ -134,8 +210,8 @@ static bool testToString(Ty _value, const char* _expected) { char tmp[1024]; int32_t num = bx::toString(tmp, BX_COUNTOF(tmp), _value); - int32_t len = (int32_t)bx::strnlen(_expected); - if (0 == bx::strncmp(tmp, _expected) + int32_t len = (int32_t)bx::strLen(_expected); + if (0 == bx::strCmp(tmp, _expected) && num == len) { return true; @@ -178,6 +254,88 @@ TEST_CASE("toString double", "") REQUIRE(testToString(1231231.23, "1231231.23") ); REQUIRE(testToString(0.000000000123123, "1.23123e-10") ); REQUIRE(testToString(0.0000000001, "1e-10") ); + REQUIRE(testToString(-270.000000, "-270.0") ); + REQUIRE(testToString(2.225073858507201e-308, "2.225073858507201e-308") ); +} + +static bool testFromString(double _value, const char* _input) +{ + char tmp[1024]; + bx::toString(tmp, BX_COUNTOF(tmp), _value); + + double lhs; + bx::fromString(&lhs, tmp); + + double rhs; + bx::fromString(&rhs, _input); + + if (lhs == rhs) + { + return true; + } + + printf("result '%f', input '%s'\n", _value, _input); + return false; +} + +TEST_CASE("fromString double", "") +{ + REQUIRE(testFromString(0.0, "0.0") ); + REQUIRE(testFromString(-0.0, "-0.0") ); + REQUIRE(testFromString(1.0, "1.0") ); + REQUIRE(testFromString(-1.0, "-1.0") ); + REQUIRE(testFromString(1.2345, "1.2345") ); + REQUIRE(testFromString(1.2345678, "1.2345678") ); + REQUIRE(testFromString(0.123456789012, "0.123456789012") ); + REQUIRE(testFromString(1234567.8, "1234567.8") ); + REQUIRE(testFromString(-79.39773355813419, "-79.39773355813419") ); + REQUIRE(testFromString(0.000001, "0.000001") ); + REQUIRE(testFromString(0.0000001, "1e-7") ); + REQUIRE(testFromString(1e30, "1e30") ); + REQUIRE(testFromString(1.234567890123456e30, "1.234567890123456e30") ); + REQUIRE(testFromString(-5e-324, "-5e-324") ); + REQUIRE(testFromString(2.225073858507201e-308, "2.225073858507201e-308") ); + REQUIRE(testFromString(2.2250738585072014e-308, "2.2250738585072014e-308") ); + REQUIRE(testFromString(1.7976931348623157e308, "1.7976931348623157e308") ); + REQUIRE(testFromString(0.00000123123123, "0.00000123123123") ); + REQUIRE(testFromString(0.000000123123123, "1.23123123e-7") ); + REQUIRE(testFromString(123123.123, "123123.123") ); + REQUIRE(testFromString(1231231.23, "1231231.23") ); + REQUIRE(testFromString(0.000000000123123, "1.23123e-10") ); + REQUIRE(testFromString(0.0000000001, "1e-10") ); + REQUIRE(testFromString(-270.000000, "-270.0") ); + REQUIRE(testFromString(2.2250738585072011e-308, "2.2250738585072011e-308") ); +} + +static bool testFromString(int32_t _value, const char* _input) +{ + char tmp[1024]; + bx::toString(tmp, BX_COUNTOF(tmp), _value); + + double lhs; + bx::fromString(&lhs, tmp); + + double rhs; + bx::fromString(&rhs, _input); + + if (lhs == rhs) + { + return true; + } + + printf("result '%d', input '%s'\n", _value, _input); + return false; +} + +TEST_CASE("fromString int32_t", "") +{ + REQUIRE(testFromString(1389, "1389") ); + REQUIRE(testFromString(1389, " 1389") ); + REQUIRE(testFromString(1389, "+1389") ); + REQUIRE(testFromString(-1389, "-1389") ); + REQUIRE(testFromString(-1389, " -1389") ); + REQUIRE(testFromString(555333, "555333") ); + REQUIRE(testFromString(-21, "-021") ); } TEST_CASE("StringView", "") @@ -185,7 +343,7 @@ TEST_CASE("StringView", "") bx::StringView sv("test"); REQUIRE(4 == sv.getLength() ); - bx::CrtAllocator crt; + bx::DefaultAllocator crt; g_allocator = &crt; typedef bx::StringT<&g_allocator> String; @@ -196,10 +354,10 @@ TEST_CASE("StringView", "") st.append("test"); REQUIRE(8 == st.getLength() ); - st.append("test", 2); + st.append(bx::StringView("test", 2) ); REQUIRE(10 == st.getLength() ); - REQUIRE(0 == bx::strncmp(st.getPtr(), "testtestte") ); + REQUIRE(0 == bx::strCmp(st.getPtr(), "testtestte") ); st.clear(); REQUIRE(0 == st.getLength() ); @@ -211,3 +369,31 @@ TEST_CASE("StringView", "") sv.clear(); REQUIRE(0 == sv.getLength() ); } + +TEST_CASE("Trim", "") +{ + REQUIRE(0 == bx::strCmp(bx::strLTrim("abvgd", "ab"), "vgd") ); + REQUIRE(0 == bx::strCmp(bx::strLTrim("abvgd", "vagbd"), "") ); + REQUIRE(0 == bx::strCmp(bx::strLTrim("abvgd", "vgd"), "abvgd") ); + REQUIRE(0 == bx::strCmp(bx::strLTrim("/555333/podmac/", "/"), "555333/podmac/") ); + + REQUIRE(0 == bx::strCmp(bx::strRTrim("abvgd", "vagbd"), "") ); + REQUIRE(0 == bx::strCmp(bx::strRTrim("abvgd", "abv"), "abvgd") ); + REQUIRE(0 == bx::strCmp(bx::strRTrim("/555333/podmac/", "/"), "/555333/podmac") ); + + REQUIRE(0 == bx::strCmp(bx::strTrim("abvgd", "da"), "bvg") ); + REQUIRE(0 == bx::strCmp(bx::strTrim("<1389>", "<>"), "1389") ); + REQUIRE(0 == bx::strCmp(bx::strTrim("/555333/podmac/", "/"), "555333/podmac") ); + + REQUIRE(0 == bx::strCmp(bx::strTrim("abvgd", ""), "abvgd") ); + REQUIRE(0 == bx::strCmp(bx::strTrim(" \t a b\tv g d \t ", " \t"), "a b\tv g d") ); + + bx::FilePath uri("/555333/podmac/"); + REQUIRE(0 == bx::strCmp(bx::strTrim(uri.getPath(), "/"), "555333/podmac") ); +} + +TEST_CASE("strWord", "") +{ + REQUIRE(bx::strWord(" abvgd-1389.0").isEmpty() ); + REQUIRE(0 == bx::strCmp(bx::strWord("abvgd-1389.0"), "abvgd") ); +} diff --git a/3rdparty/bx/tests/test.h b/3rdparty/bx/tests/test.h index c4f0dce..43da95a 100644 --- a/3rdparty/bx/tests/test.h +++ b/3rdparty/bx/tests/test.h @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/tests/thread.cpp b/3rdparty/bx/tests/thread.cpp deleted file mode 100644 index f0ee772..0000000 --- a/3rdparty/bx/tests/thread.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include "test.h" -#include - -int32_t threadExit0(void*) -{ - return 0; -} - -int32_t threadExit1(void*) -{ - return 1; -} - -TEST(thread) -{ - bx::Thread th; - - CHECK_EQUAL(th.isRunning(), false); - - th.init(threadExit0); - CHECK_EQUAL(th.isRunning(), true); - th.shutdown(); - - CHECK_EQUAL(th.isRunning(), false); - CHECK_EQUAL(th.getExitCode(), 0); - - th.init(threadExit1); - CHECK_EQUAL(th.isRunning(), true); - th.shutdown(); - - CHECK_EQUAL(th.isRunning(), false); - CHECK_EQUAL(th.getExitCode(), 1); -} diff --git a/3rdparty/bx/tests/thread_test.cpp b/3rdparty/bx/tests/thread_test.cpp index 8d09931..80db9b5 100644 --- a/3rdparty/bx/tests/thread_test.cpp +++ b/3rdparty/bx/tests/thread_test.cpp @@ -1,22 +1,42 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #include "test.h" #include -int32_t threadExit0(void*) +bx::DefaultAllocator s_allocator; +bx::MpScUnboundedBlockingQueue s_mpsc(&s_allocator); + +int32_t threadExit0(bx::Thread* _thread, void*) { - return 0; + _thread->pop(); + + s_mpsc.push(reinterpret_cast(uintptr_t(0x1300) ) ); + + return bx::kExitSuccess; } -int32_t threadExit1(void*) +int32_t threadExit1(bx::Thread* _thread, void*) { - return 1; + BX_UNUSED(_thread); + + s_mpsc.push(reinterpret_cast(uintptr_t(0x89) ) ); + + return bx::kExitFailure; } -TEST_CASE("thread", "") +TEST_CASE("Semaphore", "") +{ + bx::Semaphore sem; + REQUIRE(!sem.wait(10) ); + + sem.post(1); + REQUIRE(sem.wait() ); +} + +TEST_CASE("Thread", "") { bx::Thread th; @@ -24,6 +44,7 @@ TEST_CASE("thread", "") th.init(threadExit0); REQUIRE(th.isRunning() ); + th.push(NULL); th.shutdown(); REQUIRE(!th.isRunning() ); @@ -36,3 +57,13 @@ TEST_CASE("thread", "") REQUIRE(!th.isRunning() ); REQUIRE(th.getExitCode() == 1); } + +TEST_CASE("MpScUnboundedBlockingQueue", "") +{ + void* p0 = s_mpsc.pop(); + void* p1 = s_mpsc.pop(); + + uintptr_t result = uintptr_t(p0) | uintptr_t(p1); + + REQUIRE(result == 0x1389); +} diff --git a/3rdparty/bx/tests/tokenizecmd.cpp b/3rdparty/bx/tests/tokenizecmd.cpp deleted file mode 100644 index 32e927b..0000000 --- a/3rdparty/bx/tests/tokenizecmd.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2012-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include "test.h" -#include -#include -#include - -TEST(commandLine) -{ - const char* args[] = - { - "-s", - "--long", - }; - - bx::CommandLine cmdLine(BX_COUNTOF(args), args); - - CHECK(cmdLine.hasArg("long") ); - CHECK(cmdLine.hasArg('s') ); - - // non-existing argument - CHECK(!cmdLine.hasArg('x') ); -} - -TEST(tokenizeCommandLine) -{ -#if 0 - const char* input[] = - { - " ", - "\\", -// "\"a b c\" d e", - "\"ab\\\"c\" \"\\\\\" d", - "a\\\\\\b d\"e f\"g h", - "a\\\\\\\"b c d", - "a\\\\\\\\\"b c\" d e", - }; - - const int expected_argc[] = - { - 0, - 0, -// 3, - 3, - 3, - 3, - 3 - }; - - const char* expected_results[] = - { - "a b c", "d", "e", - "ab\"c", "\\", "d", - "a\\\\\\b", "de fg", "h", - "a\\\"b", "c", "d", - "a\\\\b c", "d", "e", - }; - - const char** expected_argv[] = - { - NULL, - NULL, -// &expected_results[0], - &expected_results[3], - &expected_results[6], - &expected_results[9], - &expected_results[12], - }; - - for (uint32_t ii = 0; ii < BX_COUNTOF(exptected_argv); ++ii) - { - printf("x\n"); - char commandLine[1024]; - uint32_t size = BX_COUNTOF(commandLine); - char* argv[50]; - int32_t argc; - bx::tokenizeCommandLine(input[ii], commandLine, size, argc, argv, BX_COUNTOF(argv) ); - printf("\n%d (%d): %s %s\n", ii, argc, input[ii], expected_argc[ii] == argc ? "" : "FAILED!"); - for (uint32_t jj = 0; jj < argc; ++jj) - { - printf("\t%d: {%s} %s\n" - , jj - , argv[jj] - , jj < argc ? (0==strcmp(argv[jj], expected_argv[ii][jj]) ? "" : "FAILED!") : "FAILED!" - ); - } - } -#endif // 0 -} diff --git a/3rdparty/bx/tests/tokenizecmd_test.cpp b/3rdparty/bx/tests/tokenizecmd_test.cpp index d1495b2..e0910fe 100644 --- a/3rdparty/bx/tests/tokenizecmd_test.cpp +++ b/3rdparty/bx/tests/tokenizecmd_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 Branimir Karadzic. All rights reserved. + * Copyright 2012-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -15,12 +15,24 @@ TEST_CASE("commandLine", "") "--long", "--platform", "x", + "--num", "1389", + "--foo", + "--", // it should not parse arguments after argument terminator + "--bar", }; bx::CommandLine cmdLine(BX_COUNTOF(args), args); - REQUIRE(cmdLine.hasArg("long") ); - REQUIRE(cmdLine.hasArg('s') ); + REQUIRE( cmdLine.hasArg("long") ); + REQUIRE( cmdLine.hasArg('s') ); + + int32_t num; + REQUIRE(cmdLine.hasArg(num, '\0', "num") ); + REQUIRE(1389 == num); + + // test argument terminator + REQUIRE( cmdLine.hasArg("foo") ); + REQUIRE(!cmdLine.hasArg("bar") ); // non-existing argument REQUIRE(!cmdLine.hasArg('x') ); @@ -46,7 +58,7 @@ static bool test(const char* _input, int32_t _argc, ...) for (int32_t ii = 0; ii < _argc; ++ii) { const char* arg = va_arg(argList, const char*); - if (0 != bx::strncmp(argv[ii], arg) ) + if (0 != bx::strCmp(argv[ii], arg) ) { return false; } diff --git a/3rdparty/bx/tests/uint32_t.cpp b/3rdparty/bx/tests/uint32_t.cpp deleted file mode 100644 index 3fe0044..0000000 --- a/3rdparty/bx/tests/uint32_t.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2010-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bx#license-bsd-2-clause - */ - -#include "test.h" -#include - -TEST(StrideAlign) -{ - CHECK(0 == bx::strideAlign(0, 12) ); - for (uint32_t ii = 0; ii < 12; ++ii) - { - CHECK(12 == bx::strideAlign(ii+1, 12) ); - } - - CHECK(0 == bx::strideAlign16(0, 12) ); - for (uint32_t ii = 0; ii < 12; ++ii) - { - CHECK(48 == bx::strideAlign16(ii+1, 12) ); - } -} - -TEST(uint32_cnt) -{ - CHECK( 0 == bx::uint32_cnttz(UINT32_C(1) ) ); - CHECK( 0 == bx::uint32_cnttz_ref(UINT32_C(1) ) ); - - CHECK(31 == bx::uint32_cntlz(UINT32_C(1) ) ); - CHECK(31 == bx::uint32_cntlz_ref(UINT32_C(1) ) ); - - CHECK( 0 == bx::uint64_cnttz(UINT64_C(1) ) ); - CHECK( 0 == bx::uint64_cnttz_ref(UINT64_C(1) ) ); - - CHECK(63 == bx::uint64_cntlz(UINT64_C(1) ) ); - CHECK(63 == bx::uint64_cntlz_ref(UINT64_C(1) ) ); - - CHECK( 1 == bx::uint32_cntbits(1) ); - CHECK( 1 == bx::uint32_cntbits_ref(1) ); - - CHECK(16 == bx::uint32_cntbits(UINT16_MAX) ); - CHECK(16 == bx::uint32_cntbits_ref(UINT16_MAX) ); - - CHECK(32 == bx::uint32_cntbits(UINT32_MAX) ); - CHECK(32 == bx::uint32_cntbits_ref(UINT32_MAX) ); -} - -TEST(uint32_part) -{ - CHECK(UINT32_C(0x55555555) == bx::uint32_part1by1(UINT16_MAX) ); - CHECK(UINT32_C(0x09249249) == bx::uint32_part1by2(0x3ff) ); -} diff --git a/3rdparty/bx/tests/uint32_test.cpp b/3rdparty/bx/tests/uint32_test.cpp index ae214b8..ee0e53b 100644 --- a/3rdparty/bx/tests/uint32_test.cpp +++ b/3rdparty/bx/tests/uint32_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ diff --git a/3rdparty/bx/tests/unordered_map_nonpod.cpp b/3rdparty/bx/tests/unordered_map_nonpod.cpp deleted file mode 100644 index 96aa55e..0000000 --- a/3rdparty/bx/tests/unordered_map_nonpod.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * Copyright 2012-2015 Matthew Endsley - * All rights reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted providing that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "test.h" - -#include -#include - -namespace { - struct Foo { int bar; }; -} - -TEST(uomap_nonpod_compiles) { - - // verify this compiles - typedef tinystl::unordered_map map; - map m; -} diff --git a/3rdparty/bx/tests/unordered_set_copyctor.cpp b/3rdparty/bx/tests/unordered_set_copyctor.cpp deleted file mode 100644 index 3e88304..0000000 --- a/3rdparty/bx/tests/unordered_set_copyctor.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/*- -* Copyright 2012-2015 Matthew Endsley -* All rights reserved -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted providing that the following conditions -* are met: -* 1. Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* 2. Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -* POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "test.h" - -#include -#include - -TEST(uoset_copyctor) { - - // verify this compiles - typedef tinystl::unordered_set set; - set s; - s.insert(32); - set other = s; - CHECK(other.find(32) != other.end()); - other.clear(); - CHECK(other.empty()); -} diff --git a/3rdparty/bx/tests/unordered_set_pod.cpp b/3rdparty/bx/tests/unordered_set_pod.cpp deleted file mode 100644 index a9d8867..0000000 --- a/3rdparty/bx/tests/unordered_set_pod.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/*- -* Copyright 2012-2015 Matthew Endsley -* All rights reserved -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted providing that the following conditions -* are met: -* 1. Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* 2. Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* -* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -* POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "test.h" - -#include -#include - -TEST(uoset_pod_compiles) { - - // verify this compiles - tinystl::unordered_set s; - s.insert(32); - s.clear(); -} diff --git a/3rdparty/bx/tests/url_test.cpp b/3rdparty/bx/tests/url_test.cpp new file mode 100644 index 0000000..50d2c39 --- /dev/null +++ b/3rdparty/bx/tests/url_test.cpp @@ -0,0 +1,69 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include +#include + +struct UrlTest +{ + bool result; + const char* url; + const char* tokens[bx::UrlView::Count]; +}; + +static const UrlTest s_urlTest[] = +{ + { true + , "scheme://username:password@host.rs:80/this/is/path/index.php?query=\"value\"#fragment", + { "scheme", "username", "password", "host.rs", "80", "/this/is/path/index.php", "query=\"value\"", "fragment" } + }, + { true + , "scheme://host.rs/", + { "scheme", "", "", "host.rs", "", "/", "", "" }, + }, + { true + , "scheme://host.rs:1389/", + { "scheme", "", "", "host.rs", "1389", "/", "", "" }, + }, + { true + , "host.rs/abvgd.html", + { "", "", "", "host.rs", "", "/abvgd.html", "", "" }, + }, + { true + , "https://192.168.0.1:8080/", + { "https", "", "", "192.168.0.1", "8080", "/", "", "" }, + }, + + { true + , "file:///d:/tmp/archive.tar.gz", + { "file", "", "", "", "", "/d:/tmp/archive.tar.gz", "", "" }, + }, +}; + +TEST_CASE("tokenizeUrl", "") +{ + bx::UrlView url; + + for (uint32_t ii = 0; ii < BX_COUNTOF(s_urlTest); ++ii) + { + const UrlTest& urlTest = s_urlTest[ii]; + + bool result = url.parse(urlTest.url); + REQUIRE(urlTest.result == result); + + if (result) + { + for (uint32_t token = 0; token < bx::UrlView::Count; ++token) + { +// char tmp[1024]; +// strCopy(tmp, BX_COUNTOF(tmp), url.get(bx::UrlView::Enum(token)) ); +// printf("`%s`, expected: `%s`\n", tmp, urlTest.tokens[token]); + + REQUIRE(0 == bx::strCmp(urlTest.tokens[token], url.get(bx::UrlView::Enum(token)) ) ); + } + } + } +} diff --git a/3rdparty/bx/tests/vector_complex.cpp b/3rdparty/bx/tests/vector_complex.cpp deleted file mode 100644 index 8deaa3f..0000000 --- a/3rdparty/bx/tests/vector_complex.cpp +++ /dev/null @@ -1,266 +0,0 @@ -/*- - * Copyright 2012-1015 Matthew Endsley - * All rights reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted providing that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "test.h" - -#include -#include - -#include -#include -#include - -struct complex { - complex() {data = 0;} - complex(const char* s) { data = strdup(s); } - ~complex() { free(data); } - complex(const complex& other) { data = 0; if (other.data) data = strdup(other.data); } - complex& operator=(const complex& other) { complex(other).swap(*this); return *this; } - void swap(complex& other) { std::swap(data, other.data); } - - char* data; -}; - -static inline bool operator==(const complex& lhs, const complex& rhs) { - if (lhs.data == 0 && rhs.data == 0) - return true; - if (lhs.data != 0 && rhs.data != 0) - return 0 == strcmp(lhs.data, rhs.data); - return false; -} - -TEST(vector_complex_constructor) { - typedef tinystl::vector vector; - - { - vector v; - CHECK( v.empty() ); - CHECK( v.size() == 0 ); - } - { - const complex array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - vector v(array, array + 10); - - CHECK( v.size() == 10 ); - CHECK( std::equal(v.begin(), v.end(), array) ); - } - { - const complex value = "127"; - const size_t count = 24; - vector v(count, value); - - CHECK( v.size() == count ); - - vector::iterator it = v.begin(), end = v.end(); - for (; it != end; ++it) - CHECK(*it == value); - } - { - const size_t count = 24; - vector v(count); - - CHECK(v.size() == count); - vector::iterator it = v.begin(), end = v.end(); - for (; it != end; ++it) - CHECK(*it == complex()); - } - { - const complex array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - vector other(array, array + 10); - vector v = other; - - CHECK( v.size() == other.size() ); - CHECK( std::equal(v.begin(), v.end(), other.begin()) ); - } -} - -TEST(vector_complex_assignment) { - typedef tinystl::vector vector; - - { - const complex array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - vector other(array, array + 10); - - vector v; - v = other; - - CHECK( v.size() == 10 ); - CHECK( std::equal(v.begin(), v.end(), array) ); - CHECK( other.size() == 10 ); - CHECK( std::equal(v.begin(), v.end(), other.begin()) ); - } -} - -TEST(vector_complex_pushback) { - tinystl::vector v; - v.push_back("42"); - - CHECK(v.size() == 1); - CHECK(v[0] == "42"); -} - -TEST(vector_complex_vector) { - tinystl::vector< tinystl::vector > v(10, tinystl::vector()); - - tinystl::vector< tinystl::vector >::iterator it = v.begin(), end = v.end(); - for (; it != end; ++it) { - CHECK( (*it).empty() ); - CHECK( (*it).size() == 0 ); - CHECK( (*it).begin() == (*it).end() ); - } -} - -TEST(vector_complex_swap) { - tinystl::vector v1; - v1.push_back("12"); - v1.push_back("20"); - - tinystl::vector v2; - v2.push_back("54"); - - v1.swap(v2); - - CHECK(v1.size() == 1); - CHECK(v2.size() == 2); - CHECK(v1[0] == "54"); - CHECK(v2[0] == "12"); - CHECK(v2[1] == "20"); -} - -TEST(vector_complex_popback) { - tinystl::vector v; - v.push_back("12"); - v.push_back("24"); - - CHECK(v.back() == "24"); - - v.pop_back(); - - CHECK(v.back() == "12"); - CHECK(v.size() == 1); -} - -TEST(vector_complex_assign) { - tinystl::vector v; - - CHECK(v.size() == 0); - - const complex array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - v.assign(array, array + 10); - CHECK(v.size() == 10); - CHECK( std::equal(v.begin(), v.end(), array) ); -} - -TEST(vector_complex_erase) { - const complex array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - tinystl::vector v(array, array + 10); - - tinystl::vector::iterator it = v.erase(v.begin()); - CHECK(*it == "2"); - CHECK(v.size() == 9); - CHECK( std::equal(v.begin(), v.end(), array + 1) ); - - it = v.erase(v.end() - 1); - CHECK(it == v.end()); - CHECK(v.size() == 8); - CHECK( std::equal(v.begin(), v.end(), array + 1) ); - - v.erase(v.begin() + 1, v.end() - 1); - CHECK(v.size() == 2); - CHECK(v[0] == "2"); - CHECK(v[1] == "9"); -} - -TEST(vector_complex_erase_unordered) { - const complex array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - typedef tinystl::vector vector; - vector v(array, array + 10); - - complex first = *(v.begin()); - vector::iterator it = v.erase_unordered(v.begin()); - CHECK(it == v.begin()); - CHECK(v.size() == 9); - CHECK( std::count(v.begin(), v.end(), first) == 0 ); - for (it = v.begin(); it != v.end(); ++it) { - CHECK( std::count(v.begin(), v.end(), *it) == 1 ); - } - - complex last = *(v.end() - 1); - it = v.erase_unordered(v.end() - 1); - CHECK(it == v.end()); - CHECK(v.size() == 8); - CHECK( std::count(v.begin(), v.end(), last) == 0 ); - for (it = v.begin(); it != v.end(); ++it) { - CHECK( std::count(v.begin(), v.end(), *it) == 1 ); - } - - first = *(v.begin()); - last = *(v.end() - 1); - v.erase_unordered(v.begin() + 1, v.end() - 1); - CHECK(v.size() == 2); - CHECK( std::count(v.begin(), v.end(), first) == 1 ); - CHECK( std::count(v.begin(), v.end(), last) == 1 ); -} - -TEST(vector_complex_insert) { - const complex array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - tinystl::vector v(array, array + 10); - - v.insert(v.begin(), "0"); - CHECK(v.size() == 11); - CHECK(v[0] == "0"); - CHECK( std::equal(v.begin() + 1, v.end(), array) ); - - v.insert(v.end(), "11"); - CHECK(v.size() == 12); - CHECK(v[0] == "0"); - CHECK( std::equal(array, array + 10, v.begin() + 1) ); - CHECK(v.back() == "11"); - - const complex array2[3] = {"11", "12", "13"}; - const complex finalarray[] = {"0", "1", "2", "3", "11", "12", "13", "4", "5", "6", "7", "8", "9", "10", "11"}; - v.insert(v.begin() + 4, array2, array2 + 3); - CHECK( v.size() == 15 ); - CHECK( std::equal(v.begin(), v.end(), finalarray) ); -} - -TEST(vector_complex_iterator) { - const complex array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - - tinystl::vector v(array, array + 10); - const tinystl::vector& cv = v; - - CHECK(v.data() == &*v.begin()); - CHECK(v.data() == &v[0]); - CHECK(v.data() + v.size() == &*v.end()); - CHECK(v.begin() == cv.begin()); - CHECK(v.end() == cv.end()); - CHECK(v.data() == cv.data()); - - tinystl::vector w = v; - CHECK(v.begin() != w.begin()); - CHECK(v.end() != w.end()); -} diff --git a/3rdparty/bx/tests/vector_header.cpp b/3rdparty/bx/tests/vector_header.cpp deleted file mode 100644 index 4822104..0000000 --- a/3rdparty/bx/tests/vector_header.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/*- - * Copyright 2012-1015 Matthew Endsley - * All rights reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted providing that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -// Test that header is standalone -#include -#include diff --git a/3rdparty/bx/tests/vector_nocopy.cpp b/3rdparty/bx/tests/vector_nocopy.cpp deleted file mode 100644 index 960762f..0000000 --- a/3rdparty/bx/tests/vector_nocopy.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/*- - * Copyright 2012-1015 Matthew Endsley - * All rights reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted providing that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "test.h" - -#include -#include - -#include -#include -#include - -struct nocopy { - nocopy() { data = 0; } - explicit nocopy(const char* s) { data = s; } - ~nocopy() { } - void swap(nocopy& other) { std::swap(data, other.data); } - void reset(const char* s) { data = s; } - const char* release() { const char* ret = data; data = 0; return ret; } - - const char* data; - -private: - nocopy(const nocopy& other); - nocopy& operator=(const nocopy& other); -}; - -static inline bool operator==(const nocopy& lhs, const char* rhs) { - if (lhs.data == 0 && rhs == 0) - return true; - if (lhs.data != 0 && rhs != 0) - return 0 == strcmp(lhs.data, rhs); - return false; -} - -static inline bool operator==(const nocopy& lhs, const nocopy& rhs) { - if (lhs.data == 0 && rhs.data == 0) - return true; - if (lhs.data != 0 && rhs.data != 0) - return 0 == strcmp(lhs.data, rhs.data); - return false; -} - -TEST(vector_nocopy_constructor) { - typedef tinystl::vector vector; - - { - vector v; - CHECK( v.empty() ); - CHECK( v.size() == 0 ); - } - { - vector v(10); - CHECK( v.size() == 10 ); - for (tinystl::vector::iterator it = v.begin(); it != v.end(); ++it) { - CHECK( it->data == 0 ); - } - } -} - -TEST(vector_nocopy_pushback) { - tinystl::vector v; - v.emplace_back("42"); - v.emplace_back(); - v.back().reset("24"); - - CHECK( v.size() == 2 ); - CHECK( v[0] == "42" ); - CHECK( v[1] == "24" ); -} - -TEST(vector_nocopy_vector) { - tinystl::vector< tinystl::vector > v(10); - - tinystl::vector< tinystl::vector >::iterator it = v.begin(), end = v.end(); - for (; it != end; ++it) { - CHECK( (*it).empty() ); - CHECK( (*it).size() == 0 ); - CHECK( (*it).begin() == (*it).end() ); - } -} - -TEST(vector_nocopy_swap) { - tinystl::vector v1; - v1.emplace_back("12"); - v1.emplace_back("20"); - - tinystl::vector v2; - v2.emplace_back("54"); - - v1.swap(v2); - - CHECK(v1.size() == 1); - CHECK(v2.size() == 2); - CHECK(v1[0] == "54"); - CHECK(v2[0] == "12"); - CHECK(v2[1] == "20"); -} - -TEST(vector_nocopy_popback) { - tinystl::vector v; - v.emplace_back("12"); - v.emplace_back("24"); - - CHECK(v.back() == "24"); - - v.pop_back(); - - CHECK(v.back() == "12"); - CHECK(v.size() == 1); -} - -TEST(vector_nocopy_erase) { - tinystl::vector v; - v.emplace_back("1"); - v.emplace_back("2"); - v.emplace_back("3"); - v.emplace_back("4"); - v.emplace_back("5"); - - tinystl::vector::iterator it = v.erase(v.begin()); - CHECK(*it == "2"); - CHECK(v.size() == 4); - - it = v.erase(v.end() - 1); - CHECK(it == v.end()); - CHECK(v.size() == 3); - - v.erase(v.begin() + 1, v.end() - 1); - CHECK(v.size() == 2); - CHECK(v[0] == "2"); - CHECK(v[1] == "4"); -} - -TEST(vector_nocopy_erase_unordered) { - typedef tinystl::vector vector; - vector v; - v.emplace_back("1"); - v.emplace_back("2"); - v.emplace_back("3"); - v.emplace_back("4"); - v.emplace_back("5"); - - const char* first = v.front().release(); - vector::iterator it = v.erase_unordered(v.begin()); - CHECK( it == v.begin() ); - CHECK( v.size() == 4 ); - CHECK( std::count(v.begin(), v.end(), first) == 0 ); - for (it = v.begin(); it != v.end(); ++it) { - CHECK( std::count(v.begin(), v.end(), *it) == 1 ); - } - - const char* last = v.back().release(); - it = v.erase_unordered(v.end() - 1); - CHECK( it == v.end() ); - CHECK( v.size() == 3 ); - CHECK( std::count(v.begin(), v.end(), last) == 0 ); - for (it = v.begin(); it != v.end(); ++it) { - CHECK( std::count(v.begin(), v.end(), *it) == 1 ); - } - - first = v.begin()->data; - last = (v.end() - 1)->data; - v.erase_unordered(v.begin() + 1, v.end() - 1); - CHECK( v.size() == 2 ); - CHECK( std::count(v.begin(), v.end(), first) == 1 ); - CHECK( std::count(v.begin(), v.end(), last) == 1 ); -} - -TEST(vector_nocopy_insert) { - tinystl::vector v; - v.emplace_back("1"); - v.emplace_back("2"); - v.emplace_back("3"); - v.emplace_back("4"); - v.emplace_back("5"); - - v.emplace(v.begin(), "0"); - CHECK( v.size() == 6 ); - CHECK( v[0] == "0" ); - CHECK( v[1] == "1" ); - CHECK( v[5] == "5" ); - - v.emplace(v.end(), "6"); - CHECK( v.size() == 7 ); - CHECK( v.front() == "0" ); - CHECK( v.back() == "6" ); -} - -TEST(vector_nocopy_iterator) { - tinystl::vector v(5); - v[0].reset("1"); - v[1].reset("2"); - v[2].reset("3"); - v[3].reset("4"); - v[4].reset("5"); - - const tinystl::vector& cv = v; - - //CHECK(v.data() == &*v.begin()); - //CHECK(v.data() == &v[0]); - //CHECK(v.data() + v.size() == &*v.end()); - CHECK(v.begin() == cv.begin()); - CHECK(v.end() == cv.end()); - //CHECK(v.data() == cv.data()); -} diff --git a/3rdparty/bx/tests/vector_nodefault.cpp b/3rdparty/bx/tests/vector_nodefault.cpp deleted file mode 100644 index 1340b0c..0000000 --- a/3rdparty/bx/tests/vector_nodefault.cpp +++ /dev/null @@ -1,262 +0,0 @@ -/*- - * Copyright 2012-1015 Matthew Endsley - * All rights reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted providing that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "test.h" - -#include -#include - -#include -#include -#include - -#if !BX_CRT_MSVC -# define _strdup strdup -#endif // !BX_CRT_MSVC - -struct nodefault { - nodefault(const char* s) { data = _strdup(s); } - ~nodefault() { free(data); } - nodefault(const nodefault& other) { data = 0; if (other.data) data = _strdup(other.data); } - nodefault& operator=(const nodefault& other) { nodefault(other).swap(*this); return *this; } - void swap(nodefault& other) { std::swap(data, other.data); } - - char* data; - - struct tinystl_nomove_construct; -}; - -static inline bool operator==(const nodefault& lhs, const nodefault& rhs) { - if (lhs.data == 0 && rhs.data == 0) - return true; - if (lhs.data != 0 && rhs.data != 0) - return 0 == strcmp(lhs.data, rhs.data); - return false; -} - -TEST(vector_nodefault_constructor) { - typedef tinystl::vector vector; - - { - vector v; - CHECK( v.empty() ); - CHECK( v.size() == 0 ); - } - { - const nodefault array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - vector v(array, array + 10); - - CHECK( v.size() == 10 ); - CHECK( std::equal(v.begin(), v.end(), array) ); - } - { - const nodefault value = "127"; - const size_t count = 24; - vector v(count, value); - - CHECK( v.size() == count ); - - vector::iterator it = v.begin(), end = v.end(); - for (; it != end; ++it) - CHECK(*it == value); - } - { - const nodefault array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - vector other(array, array + 10); - vector v = other; - - CHECK( v.size() == other.size() ); - CHECK( std::equal(v.begin(), v.end(), other.begin()) ); - } -} - -TEST(vector_nodefault_assignment) { - typedef tinystl::vector vector; - - { - const nodefault array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - vector other(array, array + 10); - - vector v; - v = other; - - CHECK( v.size() == 10 ); - CHECK( std::equal(v.begin(), v.end(), array) ); - CHECK( other.size() == 10 ); - CHECK( std::equal(v.begin(), v.end(), other.begin()) ); - } -} - -TEST(vector_nodefault_pushback) { - tinystl::vector v; - v.push_back("42"); - - CHECK(v.size() == 1); - CHECK(v[0] == "42"); -} - -TEST(vector_nodefault_vector) { - tinystl::vector< tinystl::vector > v(10, tinystl::vector()); - - tinystl::vector< tinystl::vector >::iterator it = v.begin(), end = v.end(); - for (; it != end; ++it) { - CHECK( (*it).empty() ); - CHECK( (*it).size() == 0 ); - CHECK( (*it).begin() == (*it).end() ); - } -} - -TEST(vector_nodefault_swap) { - tinystl::vector v1; - v1.push_back("12"); - v1.push_back("20"); - - tinystl::vector v2; - v2.push_back("54"); - - v1.swap(v2); - - CHECK(v1.size() == 1); - CHECK(v2.size() == 2); - CHECK(v1[0] == "54"); - CHECK(v2[0] == "12"); - CHECK(v2[1] == "20"); -} - -TEST(vector_nodefault_popback) { - tinystl::vector v; - v.push_back("12"); - v.push_back("24"); - - CHECK(v.back() == "24"); - - v.pop_back(); - - CHECK(v.back() == "12"); - CHECK(v.size() == 1); -} - -TEST(vector_nodefault_assign) { - tinystl::vector v; - - CHECK(v.size() == 0); - - const nodefault array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - v.assign(array, array + 10); - CHECK(v.size() == 10); - CHECK( std::equal(v.begin(), v.end(), array) ); -} - -TEST(vector_nodefault_erase) { - const nodefault array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - tinystl::vector v(array, array + 10); - - tinystl::vector::iterator it = v.erase(v.begin()); - CHECK(*it == "2"); - CHECK(v.size() == 9); - CHECK( std::equal(v.begin(), v.end(), array + 1) ); - - it = v.erase(v.end() - 1); - CHECK(it == v.end()); - CHECK(v.size() == 8); - CHECK( std::equal(v.begin(), v.end(), array + 1) ); - - v.erase(v.begin() + 1, v.end() - 1); - CHECK(v.size() == 2); - CHECK(v[0] == "2"); - CHECK(v[1] == "9"); -} - -TEST(vector_nodefault_erase_unordered) { - const nodefault array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - typedef tinystl::vector vector; - vector v(array, array + 10); - - nodefault first = *(v.begin()); - vector::iterator it = v.erase_unordered(v.begin()); - CHECK(it == v.begin()); - CHECK(v.size() == 9); - CHECK( std::count(v.begin(), v.end(), first) == 0 ); - for (it = v.begin(); it != v.end(); ++it) { - CHECK( std::count(v.begin(), v.end(), *it) == 1 ); - } - - nodefault last = *(v.end() - 1); - it = v.erase_unordered(v.end() - 1); - CHECK(it == v.end()); - CHECK(v.size() == 8); - CHECK( std::count(v.begin(), v.end(), last) == 0 ); - for (it = v.begin(); it != v.end(); ++it) { - CHECK( std::count(v.begin(), v.end(), *it) == 1 ); - } - - first = *(v.begin()); - last = *(v.end() - 1); - v.erase_unordered(v.begin() + 1, v.end() - 1); - CHECK(v.size() == 2); - CHECK( std::count(v.begin(), v.end(), first) == 1 ); - CHECK( std::count(v.begin(), v.end(), last) == 1 ); -} - -TEST(vector_nodefault_insert) { - const nodefault array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - tinystl::vector v(array, array + 10); - - v.insert(v.begin(), "0"); - CHECK(v.size() == 11); - CHECK(v[0] == "0"); - CHECK( std::equal(v.begin() + 1, v.end(), array) ); - - v.insert(v.end(), "11"); - CHECK(v.size() == 12); - CHECK(v[0] == "0"); - CHECK( std::equal(array, array + 10, v.begin() + 1) ); - CHECK(v.back() == "11"); - - const nodefault array2[3] = {"11", "12", "13"}; - const nodefault finalarray[] = {"0", "1", "2", "3", "11", "12", "13", "4", "5", "6", "7", "8", "9", "10", "11"}; - v.insert(v.begin() + 4, array2, array2 + 3); - CHECK( v.size() == 15 ); - CHECK( std::equal(v.begin(), v.end(), finalarray) ); -} - -TEST(vector_nodefault_iterator) { - const nodefault array[10] = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}; - - tinystl::vector v(array, array + 10); - const tinystl::vector& cv = v; - - //CHECK(v.data() == &*v.begin()); - //CHECK(v.data() == &v[0]); - //CHECK(v.data() + v.size() == &*v.end()); - CHECK(v.begin() == cv.begin()); - CHECK(v.end() == cv.end()); - //CHECK(v.data() == cv.data()); - - tinystl::vector w = v; - CHECK(v.begin() != w.begin()); - CHECK(v.end() != w.end()); -} diff --git a/3rdparty/bx/tests/vector_primitive.cpp b/3rdparty/bx/tests/vector_primitive.cpp deleted file mode 100644 index 06fd8fd..0000000 --- a/3rdparty/bx/tests/vector_primitive.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/*- - * Copyright 2012 Matthew Endsley - * All rights reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted providing that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "test.h" - -#include -#include - -#include - -TEST(vector_constructor) { - typedef tinystl::vector vector; - - { - vector v; - CHECK( v.empty() ); - CHECK( v.size() == 0 ); - } - { - const int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - vector v(array, array + 10); - - CHECK( v.size() == 10 ); - CHECK( std::equal(v.begin(), v.end(), array) ); - } - { - const int value = 127; - const size_t count = 24; - vector v(count, value); - - CHECK( v.size() == count ); - - vector::iterator it = v.begin(), end = v.end(); - for (; it != end; ++it) - CHECK(*it == value); - } - { - const size_t count = 24; - vector v(count); - - CHECK(v.size() == count); - vector::iterator it = v.begin(), end = v.end(); - for (; it != end; ++it) - CHECK(*it == 0); - } - { - const int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - vector other(array, array + 10); - vector v = other; - - CHECK( v.size() == other.size() ); - CHECK( std::equal(v.begin(), v.end(), other.begin()) ); - } -} - -TEST(vector_assignment) { - typedef tinystl::vector vector; - - { - const int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - vector other(array, array + 10); - - vector v; - v = other; - - CHECK( v.size() == 10 ); - CHECK( std::equal(v.begin(), v.end(), array) ); - CHECK( other.size() == 10 ); - CHECK( std::equal(v.begin(), v.end(), other.begin()) ); - } -} - -TEST(vector_pushback) { - tinystl::vector v; - v.push_back(42); - - CHECK(v.size() == 1); - CHECK(v[0] == 42); -} - -TEST(vector_vector) { - tinystl::vector< tinystl::vector > v(10, tinystl::vector()); - - tinystl::vector< tinystl::vector >::iterator it = v.begin(), end = v.end(); - for (; it != end; ++it) { - CHECK( (*it).empty() ); - CHECK( (*it).size() == 0 ); - CHECK( (*it).begin() == (*it).end() ); - } -} - -TEST(vector_swap) { - tinystl::vector v1; - v1.push_back(12); - v1.push_back(20); - - tinystl::vector v2; - v2.push_back(54); - - v1.swap(v2); - - CHECK(v1.size() == 1); - CHECK(v2.size() == 2); - CHECK(v1[0] == 54); - CHECK(v2[0] == 12); - CHECK(v2[1] == 20); -} - -TEST(vector_popback) { - tinystl::vector v; - v.push_back(12); - v.push_back(24); - - CHECK(v.back() == 24); - - v.pop_back(); - - CHECK(v.back() == 12); - CHECK(v.size() == 1); -} - -TEST(vector_assign) { - tinystl::vector v; - - CHECK(v.size() == 0); - - const int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - v.assign(array, array + 10); - CHECK(v.size() == 10); - CHECK( std::equal(v.begin(), v.end(), array) ); -} - -TEST(vector_erase) { - const int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - tinystl::vector v(array, array + 10); - - tinystl::vector::iterator it = v.erase(v.begin()); - CHECK(*it == 2); - CHECK(v.size() == 9); - CHECK( std::equal(v.begin(), v.end(), array + 1) ); - - it = v.erase(v.end() - 1); - CHECK(it == v.end()); - CHECK(v.size() == 8); - CHECK( std::equal(v.begin(), v.end(), array + 1) ); - - v.erase(v.begin() + 1, v.end() - 1); - CHECK(v.size() == 2); - CHECK(v[0] == 2); - CHECK(v[1] == 9); -} - -TEST(vector_erase_unordered) { - const int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - typedef tinystl::vector vector; - vector v(array, array + 10); - - int first = *(v.begin()); - vector::iterator it = v.erase_unordered(v.begin()); - CHECK(it == v.begin()); - CHECK(v.size() == 9); - CHECK( std::count(v.begin(), v.end(), first) == 0 ); - for (it = v.begin(); it != v.end(); ++it) { - CHECK( std::count(v.begin(), v.end(), *it) == 1 ); - } - - int last = *(v.end() - 1); - it = v.erase_unordered(v.end() - 1); - CHECK(it == v.end()); - CHECK(v.size() == 8); - CHECK( std::count(v.begin(), v.end(), last) == 0 ); - for (it = v.begin(); it != v.end(); ++it) { - CHECK( std::count(v.begin(), v.end(), *it) == 1 ); - } - - first = *(v.begin()); - last = *(v.end() - 1); - v.erase_unordered(v.begin() + 1, v.end() - 1); - CHECK(v.size() == 2); - CHECK( std::count(v.begin(), v.end(), first) == 1 ); - CHECK( std::count(v.begin(), v.end(), last) == 1 ); -} - -TEST(vector_insert) { - const int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - tinystl::vector v(array, array + 10); - - v.insert(v.begin(), 0); - CHECK(v.size() == 11); - CHECK(v[0] == 0); - CHECK( std::equal(v.begin() + 1, v.end(), array) ); - - v.insert(v.end(), 11); - CHECK(v.size() == 12); - CHECK(v[0] == 0); - CHECK( std::equal(array, array + 10, v.begin() + 1) ); - CHECK(v.back() == 11); - - const int array2[3] = {11, 12, 13}; - const int finalarray[] = {0, 1, 2, 3, 11, 12, 13, 4, 5, 6, 7, 8, 9, 10, 11}; - v.insert(v.begin() + 4, array2, array2 + 3); - CHECK( v.size() == 15 ); - CHECK( std::equal(v.begin(), v.end(), finalarray) ); -} - -TEST(vector_iterator) { - const int array[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; - - tinystl::vector v(array, array + 10); - const tinystl::vector& cv = v; - - CHECK(v.data() == &*v.begin()); - CHECK(v.data() == &v[0]); - CHECK(v.data() + v.size() == &*v.end()); - CHECK(v.begin() == cv.begin()); - CHECK(v.end() == cv.end()); - CHECK(v.data() == cv.data()); - - tinystl::vector w = v; - CHECK(v.begin() != w.begin()); - CHECK(v.end() != w.end()); -} diff --git a/3rdparty/bx/tests/vector_shrinktofit.cpp b/3rdparty/bx/tests/vector_shrinktofit.cpp deleted file mode 100644 index cac2a0d..0000000 --- a/3rdparty/bx/tests/vector_shrinktofit.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/*- - * Copyright 2012-2014 Matthew Endsley - * All rights reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted providing that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#include "test.h" - -#include -#include - -TEST(vector_shrinktofit) { - typedef tinystl::vector vector; - - { - vector v; - CHECK(v.capacity() == 0); - v.clear(); - v.shrink_to_fit(); - CHECK(v.capacity() == 0); - } - - { - vector v(10, 0); - CHECK(v.capacity() >= 10); - v.shrink_to_fit(); - CHECK(v.capacity() == 10); - } - - { - vector v(10, 0); - CHECK(v.capacity() >= 10); - v.erase(v.end() - 1, v.end()); - CHECK(v.size() == 9); - CHECK(v.capacity() >= 10); - v.shrink_to_fit(); - CHECK(v.capacity() == 9); - } - - { - vector v(10, 0); - CHECK(v.capacity() >= 10); - const int* ptr = v.data(); - v.shrink_to_fit(); - CHECK(v.capacity() >= 10); - CHECK(v.data() == ptr); - } -} diff --git a/3rdparty/bx/tests/vsnprintf_test.cpp b/3rdparty/bx/tests/vsnprintf_test.cpp new file mode 100644 index 0000000..ad73887 --- /dev/null +++ b/3rdparty/bx/tests/vsnprintf_test.cpp @@ -0,0 +1,167 @@ +/* + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#include "test.h" +#include +#include +#include + +TEST_CASE("vsnprintf NULL buffer", "No output buffer provided.") +{ + REQUIRE(4 == bx::snprintf(NULL, 0, "test") ); + + REQUIRE(1 == bx::snprintf(NULL, 0, "%d", 1) ); +} + +TEST_CASE("vsnprintf truncated", "Truncated output buffer.") +{ + char buffer[7]; + + REQUIRE(10 == bx::snprintf(buffer, BX_COUNTOF(buffer), "Ten chars!") ); + REQUIRE(0 == bx::strCmp(buffer, "Ten ch") ); +} + +static bool test(const char* _expected, const char* _format, ...) +{ + int32_t max = (int32_t)bx::strLen(_expected) + 1; + char* temp = (char*)alloca(max); + + va_list argList; + va_start(argList, _format); + int32_t len = bx::vsnprintf(temp, max, _format, argList); + va_end(argList); + + bool result = true + && len == max-1 + && 0 == bx::strCmp(_expected, temp) + ; + + if (!result) + { + printf("result (%d) '%s', expected (%d) '%s'\n", len, temp, max-1, _expected); + } + + return result; +} + +TEST_CASE("vsnprintf f", "") +{ + REQUIRE(test("1.337", "%0.3f", 1.337) ); + REQUIRE(test(" 13.370", "%8.3f", 13.37) ); + REQUIRE(test(" 13.370", "%*.*f", 8, 3, 13.37) ); + REQUIRE(test("13.370 ", "%-8.3f", 13.37) ); + REQUIRE(test("13.370 ", "%*.*f", -8, 3, 13.37) ); + + REQUIRE(test("nan ", "%-8f", std::numeric_limits::quiet_NaN() ) ); + REQUIRE(test(" nan", "%8f", std::numeric_limits::quiet_NaN() ) ); + +#if !BX_CRT_MSVC + // BK - VS2015 CRT vsnprintf returns '-NAN(IND'. +# if BX_CRT_LIBCXX + // BK - Clang LibC vsnprintf returns 'NAN '. + REQUIRE(test("NAN ", "%-8F", -std::numeric_limits::quiet_NaN() ) ); +# else + REQUIRE(test("-NAN ", "%-8F", -std::numeric_limits::quiet_NaN() ) ); +# endif // BX_CRT_LIBCXX +#endif // !BX_CRT_MSVC + + REQUIRE(test(" inf", "%8f", std::numeric_limits::infinity() ) ); + REQUIRE(test("inf ", "%-8f", std::numeric_limits::infinity() ) ); + REQUIRE(test(" -INF", "%8F", -std::numeric_limits::infinity() ) ); +} + +TEST_CASE("vsnprintf d/i/o/u/x", "") +{ + REQUIRE(test("1337", "%d", 1337) ); + REQUIRE(test("1337 ", "%-20d", 1337) ); + REQUIRE(test("-1337 ", "%-20d", -1337) ); + + REQUIRE(test("1337", "%i", 1337) ); + REQUIRE(test("1337 ", "%-20i", 1337) ); + REQUIRE(test("-1337 ", "%-20i", -1337) ); + + REQUIRE(test("1337", "%o", 01337) ); + REQUIRE(test("2471", "%o", 1337) ); + REQUIRE(test("1337 ", "%-20o", 01337) ); + REQUIRE(test("37777776441 ", "%-20o", -01337) ); + + REQUIRE(test("1337", "%u", 1337) ); + REQUIRE(test("1337 ", "%-20u", 1337) ); + REQUIRE(test("4294965959 ", "%-20u", -1337) ); + + REQUIRE(test("1337", "%x", 0x1337) ); + REQUIRE(test("1234abcd ", "%-20x", 0x1234abcd) ); + REQUIRE(test("1234ABCD ", "%-20X", 0x1234abcd) ); + REQUIRE(test("edcb5433 ", "%-20x", -0x1234abcd) ); + REQUIRE(test("EDCB5433 ", "%-20X", -0x1234abcd) ); + REQUIRE(test("0000000000001234abcd", "%020x", 0x1234abcd) ); + REQUIRE(test("0000000000001234ABCD", "%020X", 0x1234abcd) ); + REQUIRE(test("000000000000edcb5433", "%020x", -0x1234abcd) ); + REQUIRE(test("000000000000EDCB5433", "%020X", -0x1234abcd) ); + +#if !BX_CRT_MSVC + // BK - VS2015 CRT vsnprintf doesn't support 'j' length sub-specifier? + if (BX_ENABLED(BX_ARCH_32BIT) ) + { + REQUIRE(test("2147483647", "%jd", INTMAX_MAX) ); + } + else + { + REQUIRE(test("9223372036854775807", "%jd", INTMAX_MAX) ); + } +#endif // !BX_CRT_MSVC + + REQUIRE(test("18446744073709551615", "%" PRIu64, UINT64_MAX) ); + REQUIRE(test("ffffffffffffffff", "%016" PRIx64, UINT64_MAX) ); +} + +TEST_CASE("vsnprintf modifiers", "") +{ + REQUIRE(test("| 1.000000|", "|%10f|", 1.0f) ); + REQUIRE(test("|1.000000 |", "|%-10f|", 1.0f) ); + REQUIRE(test("|001.000000|", "|%010f|", 1.0f) ); + REQUIRE(test("|0000000001|", "|%010.0f|", 1.0f) ); + REQUIRE(test("|000000001.|", "|%#010.0f|", 1.0f) ); + REQUIRE(test("| 1|", "|%10.0f|", 1.0f) ); + REQUIRE(test("| 1.|", "|%#10.0f|", 1.0f) ); + REQUIRE(test("| +1.|", "|%#+10.0f|", 1.0f) ); + REQUIRE(test("|1 |", "|%-10.0f|", 1.0f) ); + REQUIRE(test("|1. |", "|%#-10.0f|", 1.0f) ); + REQUIRE(test("|+1. |", "|%+#-10.0f|", 1.0f) ); +} + +TEST_CASE("vsnprintf p", "") +{ +#if BX_CRT_MSVC + // BK - VS2015 CRT vsnprintf has different output for 'p' pointer specifier. + REQUIRE(test("0BADC0DE", "%p", (void*)0xbadc0de)); + REQUIRE(test("0BADC0DE ", "%-20p", (void*)0xbadc0de)); +#else + REQUIRE(test("0xbadc0de", "%p", (void*)0xbadc0de) ); + REQUIRE(test("0xbadc0de ", "%-20p", (void*)0xbadc0de) ); +#endif // BX_CRT_MSVC +} + +TEST_CASE("vsnprintf s", "") +{ + REQUIRE(test("(null)", "%s", NULL) ); +} + +TEST_CASE("vsnprintf g", "") +{ + REQUIRE(test(" 0.01", "%7.3g", .01) ); + REQUIRE(test(" 0.0123", "%7.3G", .0123) ); + REQUIRE(test("1.23e+05", "%.3g", 123000.25) ); + REQUIRE(test("1e+05", "%.0g", 123000.25) ); +} + +TEST_CASE("vsnprintf", "") +{ + REQUIRE(test("x", "%c", 'x') ); + REQUIRE(test("x ", "%-20c", 'x') ); + + REQUIRE(test("hello ", "%-20s", "hello") ); + REQUIRE(test("hello, world!", "%s, %s!", "hello", "world") ); +} diff --git a/3rdparty/bx/tools/bin/darwin/bin2c b/3rdparty/bx/tools/bin/darwin/bin2c index eb1fa8e034cf42f0fe5b86e3b9ef11c8529b15e4..cb1acca8021a68ae3dda8dea57b996adae6d22ad 100755 GIT binary patch literal 113544 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 literal 25572 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 diff --git a/3rdparty/bx/tools/bin/darwin/genie b/3rdparty/bx/tools/bin/darwin/genie index 3a2544bce09f28b30298e6aa64b1ba40b99c988a..71f2eaf98ed97e2995780900c59dc8bf0abf5a74 100755 GIT binary patch delta 48484 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 literal 0 HcmV?d00001 diff --git a/3rdparty/bx/tools/bin/darwin/lempar.c b/3rdparty/bx/tools/bin/darwin/lempar.c new file mode 100644 index 0000000..da81ddd --- /dev/null +++ b/3rdparty/bx/tools/bin/darwin/lempar.c @@ -0,0 +1,981 @@ +/* +** 2000-05-29 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** Driver template for the LEMON parser generator. +** +** The "lemon" program processes an LALR(1) input grammar file, then uses +** this template to construct a parser. The "lemon" program inserts text +** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the +** interstitial "-" characters) contained in this template is changed into +** the value of the %name directive from the grammar. Otherwise, the content +** of this template is copied straight through into the generate parser +** source file. +** +** The following is the concatenation of all %include directives from the +** input grammar file: +*/ +#include +/************ Begin %include sections from the grammar ************************/ +%% +/**************** End of %include directives **********************************/ +/* These constants specify the various numeric values for terminal symbols +** in a format understandable to "makeheaders". This section is blank unless +** "lemon" is run with the "-m" command-line option. +***************** Begin makeheaders token definitions *************************/ +%% +/**************** End makeheaders token definitions ***************************/ + +/* The next sections is a series of control #defines. +** various aspects of the generated parser. +** YYCODETYPE is the data type used to store the integer codes +** that represent terminal and non-terminal symbols. +** "unsigned char" is used if there are fewer than +** 256 symbols. Larger types otherwise. +** YYNOCODE is a number of type YYCODETYPE that is not used for +** any terminal or nonterminal symbol. +** YYFALLBACK If defined, this indicates that one or more tokens +** (also known as: "terminal symbols") have fall-back +** values which should be used if the original symbol +** would not parse. This permits keywords to sometimes +** be used as identifiers, for example. +** YYACTIONTYPE is the data type used for "action codes" - numbers +** that indicate what to do in response to the next +** token. +** ParseTOKENTYPE is the data type used for minor type for terminal +** symbols. Background: A "minor type" is a semantic +** value associated with a terminal or non-terminal +** symbols. For example, for an "ID" terminal symbol, +** the minor type might be the name of the identifier. +** Each non-terminal can have a different minor type. +** Terminal symbols all have the same minor type, though. +** This macros defines the minor type for terminal +** symbols. +** YYMINORTYPE is the data type used for all minor types. +** This is typically a union of many types, one of +** which is ParseTOKENTYPE. The entry in the union +** for terminal symbols is called "yy0". +** YYSTACKDEPTH is the maximum depth of the parser's stack. If +** zero the stack is dynamically sized using realloc() +** ParseARG_SDECL A static variable declaration for the %extra_argument +** ParseARG_PDECL A parameter declaration for the %extra_argument +** ParseARG_STORE Code to store %extra_argument into yypParser +** ParseARG_FETCH Code to extract %extra_argument from yypParser +** YYERRORSYMBOL is the code number of the error symbol. If not +** defined, then do no error processing. +** YYNSTATE the combined number of states. +** YYNRULE the number of rules in the grammar +** YY_MAX_SHIFT Maximum value for shift actions +** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions +** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions +** YY_MIN_REDUCE Minimum value for reduce actions +** YY_MAX_REDUCE Maximum value for reduce actions +** YY_ERROR_ACTION The yy_action[] code for syntax error +** YY_ACCEPT_ACTION The yy_action[] code for accept +** YY_NO_ACTION The yy_action[] code for no-op +*/ +#ifndef INTERFACE +# define INTERFACE 1 +#endif +/************* Begin control #defines *****************************************/ +%% +/************* End control #defines *******************************************/ + +/* Define the yytestcase() macro to be a no-op if is not already defined +** otherwise. +** +** Applications can choose to define yytestcase() in the %include section +** to a macro that can assist in verifying code coverage. For production +** code the yytestcase() macro should be turned off. But it is useful +** for testing. +*/ +#ifndef yytestcase +# define yytestcase(X) +#endif + + +/* Next are the tables used to determine what action to take based on the +** current state and lookahead token. These tables are used to implement +** functions that take a state number and lookahead value and return an +** action integer. +** +** Suppose the action integer is N. Then the action is determined as +** follows +** +** 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead +** token onto the stack and goto state N. +** +** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then +** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE. +** +** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE +** and YY_MAX_REDUCE +** +** N == YY_ERROR_ACTION A syntax error has occurred. +** +** N == YY_ACCEPT_ACTION The parser accepts its input. +** +** N == YY_NO_ACTION No such action. Denotes unused +** slots in the yy_action[] table. +** +** The action table is constructed as a single large table named yy_action[]. +** Given state S and lookahead X, the action is computed as either: +** +** (A) N = yy_action[ yy_shift_ofst[S] + X ] +** (B) N = yy_default[S] +** +** The (A) formula is preferred. The B formula is used instead if: +** (1) The yy_shift_ofst[S]+X value is out of range, or +** (2) yy_lookahead[yy_shift_ofst[S]+X] is not equal to X, or +** (3) yy_shift_ofst[S] equal YY_SHIFT_USE_DFLT. +** (Implementation note: YY_SHIFT_USE_DFLT is chosen so that +** YY_SHIFT_USE_DFLT+X will be out of range for all possible lookaheads X. +** Hence only tests (1) and (2) need to be evaluated.) +** +** The formulas above are for computing the action when the lookahead is +** a terminal symbol. If the lookahead is a non-terminal (as occurs after +** a reduce action) then the yy_reduce_ofst[] array is used in place of +** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of +** YY_SHIFT_USE_DFLT. +** +** The following are the tables generated in this section: +** +** yy_action[] A single table containing all actions. +** yy_lookahead[] A table containing the lookahead for each entry in +** yy_action. Used to detect hash collisions. +** yy_shift_ofst[] For each state, the offset into yy_action for +** shifting terminals. +** yy_reduce_ofst[] For each state, the offset into yy_action for +** shifting non-terminals after a reduce. +** yy_default[] Default action for each state. +** +*********** Begin parsing tables **********************************************/ +%% +/********** End of lemon-generated parsing tables *****************************/ + +/* The next table maps tokens (terminal symbols) into fallback tokens. +** If a construct like the following: +** +** %fallback ID X Y Z. +** +** appears in the grammar, then ID becomes a fallback token for X, Y, +** and Z. Whenever one of the tokens X, Y, or Z is input to the parser +** but it does not parse, the type of the token is changed to ID and +** the parse is retried before an error is thrown. +** +** This feature can be used, for example, to cause some keywords in a language +** to revert to identifiers if they keyword does not apply in the context where +** it appears. +*/ +#ifdef YYFALLBACK +static const YYCODETYPE yyFallback[] = { +%% +}; +#endif /* YYFALLBACK */ + +/* The following structure represents a single element of the +** parser's stack. Information stored includes: +** +** + The state number for the parser at this level of the stack. +** +** + The value of the token stored at this level of the stack. +** (In other words, the "major" token.) +** +** + The semantic value stored at this level of the stack. This is +** the information used by the action routines in the grammar. +** It is sometimes called the "minor" token. +** +** After the "shift" half of a SHIFTREDUCE action, the stateno field +** actually contains the reduce action for the second half of the +** SHIFTREDUCE. +*/ +struct yyStackEntry { + YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */ + YYCODETYPE major; /* The major token value. This is the code + ** number for the token at this stack level */ + YYMINORTYPE minor; /* The user-supplied minor token value. This + ** is the value of the token */ +}; +typedef struct yyStackEntry yyStackEntry; + +/* The state of the parser is completely contained in an instance of +** the following structure */ +struct yyParser { + yyStackEntry *yytos; /* Pointer to top element of the stack */ +#ifdef YYTRACKMAXSTACKDEPTH + int yyhwm; /* High-water mark of the stack */ +#endif +#ifndef YYNOERRORRECOVERY + int yyerrcnt; /* Shifts left before out of the error */ +#endif + ParseARG_SDECL /* A place to hold %extra_argument */ +#if YYSTACKDEPTH<=0 + int yystksz; /* Current side of the stack */ + yyStackEntry *yystack; /* The parser's stack */ + yyStackEntry yystk0; /* First stack entry */ +#else + yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */ + yyStackEntry *yystackEnd; /* Last entry in the stack */ +#endif +}; +typedef struct yyParser yyParser; + +#ifndef NDEBUG +#include +static FILE *yyTraceFILE = 0; +static char *yyTracePrompt = 0; +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* +** Turn parser tracing on by giving a stream to which to write the trace +** and a prompt to preface each trace message. Tracing is turned off +** by making either argument NULL +** +** Inputs: +**
    +**
  • A FILE* to which trace output should be written. +** If NULL, then tracing is turned off. +**
  • A prefix string written at the beginning of every +** line of trace output. If NULL, then tracing is +** turned off. +**
+** +** Outputs: +** None. +*/ +void ParseTrace(FILE *TraceFILE, char *zTracePrompt){ + yyTraceFILE = TraceFILE; + yyTracePrompt = zTracePrompt; + if( yyTraceFILE==0 ) yyTracePrompt = 0; + else if( yyTracePrompt==0 ) yyTraceFILE = 0; +} +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* For tracing shifts, the names of all terminals and nonterminals +** are required. The following table supplies these names */ +static const char *const yyTokenName[] = { +%% +}; +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* For tracing reduce actions, the names of all rules are required. +*/ +static const char *const yyRuleName[] = { +%% +}; +#endif /* NDEBUG */ + + +#if YYSTACKDEPTH<=0 +/* +** Try to increase the size of the parser stack. Return the number +** of errors. Return 0 on success. +*/ +static int yyGrowStack(yyParser *p){ + int newSize; + int idx; + yyStackEntry *pNew; + + newSize = p->yystksz*2 + 100; + idx = p->yytos ? (int)(p->yytos - p->yystack) : 0; + if( p->yystack==&p->yystk0 ){ + pNew = malloc(newSize*sizeof(pNew[0])); + if( pNew ) pNew[0] = p->yystk0; + }else{ + pNew = realloc(p->yystack, newSize*sizeof(pNew[0])); + } + if( pNew ){ + p->yystack = pNew; + p->yytos = &p->yystack[idx]; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n", + yyTracePrompt, p->yystksz, newSize); + } +#endif + p->yystksz = newSize; + } + return pNew==0; +} +#endif + +/* Datatype of the argument to the memory allocated passed as the +** second argument to ParseAlloc() below. This can be changed by +** putting an appropriate #define in the %include section of the input +** grammar. +*/ +#ifndef YYMALLOCARGTYPE +# define YYMALLOCARGTYPE size_t +#endif + +/* Initialize a new parser that has already been allocated. +*/ +void ParseInit(void *yypParser){ + yyParser *pParser = (yyParser*)yypParser; +#ifdef YYTRACKMAXSTACKDEPTH + pParser->yyhwm = 0; +#endif +#if YYSTACKDEPTH<=0 + pParser->yytos = NULL; + pParser->yystack = NULL; + pParser->yystksz = 0; + if( yyGrowStack(pParser) ){ + pParser->yystack = &pParser->yystk0; + pParser->yystksz = 1; + } +#endif +#ifndef YYNOERRORRECOVERY + pParser->yyerrcnt = -1; +#endif + pParser->yytos = pParser->yystack; + pParser->yystack[0].stateno = 0; + pParser->yystack[0].major = 0; +#if YYSTACKDEPTH>0 + pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1]; +#endif +} + +#ifndef Parse_ENGINEALWAYSONSTACK +/* +** This function allocates a new parser. +** The only argument is a pointer to a function which works like +** malloc. +** +** Inputs: +** A pointer to the function used to allocate memory. +** +** Outputs: +** A pointer to a parser. This pointer is used in subsequent calls +** to Parse and ParseFree. +*/ +void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){ + yyParser *pParser; + pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) ); + if( pParser ) ParseInit(pParser); + return pParser; +} +#endif /* Parse_ENGINEALWAYSONSTACK */ + + +/* The following function deletes the "minor type" or semantic value +** associated with a symbol. The symbol can be either a terminal +** or nonterminal. "yymajor" is the symbol code, and "yypminor" is +** a pointer to the value to be deleted. The code used to do the +** deletions is derived from the %destructor and/or %token_destructor +** directives of the input grammar. +*/ +static void yy_destructor( + yyParser *yypParser, /* The parser */ + YYCODETYPE yymajor, /* Type code for object to destroy */ + YYMINORTYPE *yypminor /* The object to be destroyed */ +){ + ParseARG_FETCH; + switch( yymajor ){ + /* Here is inserted the actions which take place when a + ** terminal or non-terminal is destroyed. This can happen + ** when the symbol is popped from the stack during a + ** reduce or during error processing or when a parser is + ** being destroyed before it is finished parsing. + ** + ** Note: during a reduce, the only symbols destroyed are those + ** which appear on the RHS of the rule, but which are *not* used + ** inside the C code. + */ +/********* Begin destructor definitions ***************************************/ +%% +/********* End destructor definitions *****************************************/ + default: break; /* If no destructor action specified: do nothing */ + } +} + +/* +** Pop the parser's stack once. +** +** If there is a destructor routine associated with the token which +** is popped from the stack, then call it. +*/ +static void yy_pop_parser_stack(yyParser *pParser){ + yyStackEntry *yytos; + assert( pParser->yytos!=0 ); + assert( pParser->yytos > pParser->yystack ); + yytos = pParser->yytos--; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sPopping %s\n", + yyTracePrompt, + yyTokenName[yytos->major]); + } +#endif + yy_destructor(pParser, yytos->major, &yytos->minor); +} + +/* +** Clear all secondary memory allocations from the parser +*/ +void ParseFinalize(void *p){ + yyParser *pParser = (yyParser*)p; + while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser); +#if YYSTACKDEPTH<=0 + if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack); +#endif +} + +#ifndef Parse_ENGINEALWAYSONSTACK +/* +** Deallocate and destroy a parser. Destructors are called for +** all stack elements before shutting the parser down. +** +** If the YYPARSEFREENEVERNULL macro exists (for example because it +** is defined in a %include section of the input grammar) then it is +** assumed that the input pointer is never NULL. +*/ +void ParseFree( + void *p, /* The parser to be deleted */ + void (*freeProc)(void*) /* Function used to reclaim memory */ +){ +#ifndef YYPARSEFREENEVERNULL + if( p==0 ) return; +#endif + ParseFinalize(p); + (*freeProc)(p); +} +#endif /* Parse_ENGINEALWAYSONSTACK */ + +/* +** Return the peak depth of the stack for a parser. +*/ +#ifdef YYTRACKMAXSTACKDEPTH +int ParseStackPeak(void *p){ + yyParser *pParser = (yyParser*)p; + return pParser->yyhwm; +} +#endif + +/* +** Find the appropriate action for a parser given the terminal +** look-ahead token iLookAhead. +*/ +static unsigned int yy_find_shift_action( + yyParser *pParser, /* The parser */ + YYCODETYPE iLookAhead /* The look-ahead token */ +){ + int i; + int stateno = pParser->yytos->stateno; + + if( stateno>=YY_MIN_REDUCE ) return stateno; + assert( stateno <= YY_SHIFT_COUNT ); + do{ + i = yy_shift_ofst[stateno]; + assert( iLookAhead!=YYNOCODE ); + i += iLookAhead; + if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ +#ifdef YYFALLBACK + YYCODETYPE iFallback; /* Fallback token */ + if( iLookAhead %s\n", + yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]); + } +#endif + assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */ + iLookAhead = iFallback; + continue; + } +#endif +#ifdef YYWILDCARD + { + int j = i - iLookAhead + YYWILDCARD; + if( +#if YY_SHIFT_MIN+YYWILDCARD<0 + j>=0 && +#endif +#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT + j0 + ){ +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", + yyTracePrompt, yyTokenName[iLookAhead], + yyTokenName[YYWILDCARD]); + } +#endif /* NDEBUG */ + return yy_action[j]; + } + } +#endif /* YYWILDCARD */ + return yy_default[stateno]; + }else{ + return yy_action[i]; + } + }while(1); +} + +/* +** Find the appropriate action for a parser given the non-terminal +** look-ahead token iLookAhead. +*/ +static int yy_find_reduce_action( + int stateno, /* Current state number */ + YYCODETYPE iLookAhead /* The look-ahead token */ +){ + int i; +#ifdef YYERRORSYMBOL + if( stateno>YY_REDUCE_COUNT ){ + return yy_default[stateno]; + } +#else + assert( stateno<=YY_REDUCE_COUNT ); +#endif + i = yy_reduce_ofst[stateno]; + assert( i!=YY_REDUCE_USE_DFLT ); + assert( iLookAhead!=YYNOCODE ); + i += iLookAhead; +#ifdef YYERRORSYMBOL + if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ + return yy_default[stateno]; + } +#else + assert( i>=0 && iyytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); + /* Here code is inserted which will execute if the parser + ** stack every overflows */ +/******** Begin %stack_overflow code ******************************************/ +%% +/******** End %stack_overflow code ********************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument var */ +} + +/* +** Print tracing information for a SHIFT action +*/ +#ifndef NDEBUG +static void yyTraceShift(yyParser *yypParser, int yyNewState){ + if( yyTraceFILE ){ + if( yyNewStateyytos->major], + yyNewState); + }else{ + fprintf(yyTraceFILE,"%sShift '%s'\n", + yyTracePrompt,yyTokenName[yypParser->yytos->major]); + } + } +} +#else +# define yyTraceShift(X,Y) +#endif + +/* +** Perform a shift action. +*/ +static void yy_shift( + yyParser *yypParser, /* The parser to be shifted */ + int yyNewState, /* The new state to shift in */ + int yyMajor, /* The major token to shift in */ + ParseTOKENTYPE yyMinor /* The minor token to shift in */ +){ + yyStackEntry *yytos; + yypParser->yytos++; +#ifdef YYTRACKMAXSTACKDEPTH + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) ); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>yypParser->yystackEnd ){ + yypParser->yytos--; + yyStackOverflow(yypParser); + return; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){ + if( yyGrowStack(yypParser) ){ + yypParser->yytos--; + yyStackOverflow(yypParser); + return; + } + } +#endif + if( yyNewState > YY_MAX_SHIFT ){ + yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; + } + yytos = yypParser->yytos; + yytos->stateno = (YYACTIONTYPE)yyNewState; + yytos->major = (YYCODETYPE)yyMajor; + yytos->minor.yy0 = yyMinor; + yyTraceShift(yypParser, yyNewState); +} + +/* The following table contains information about every rule that +** is used during the reduce. +*/ +static const struct { + YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ + signed char nrhs; /* Negative of the number of RHS symbols in the rule */ +} yyRuleInfo[] = { +%% +}; + +static void yy_accept(yyParser*); /* Forward Declaration */ + +/* +** Perform a reduce action and the shift that must immediately +** follow the reduce. +** +** The yyLookahead and yyLookaheadToken parameters provide reduce actions +** access to the lookahead token (if any). The yyLookahead will be YYNOCODE +** if the lookahead token has already been consumed. As this procedure is +** only called from one place, optimizing compilers will in-line it, which +** means that the extra parameters have no performance impact. +*/ +static void yy_reduce( + yyParser *yypParser, /* The parser */ + unsigned int yyruleno, /* Number of the rule by which to reduce */ + int yyLookahead, /* Lookahead token, or YYNOCODE if none */ + ParseTOKENTYPE yyLookaheadToken /* Value of the lookahead token */ +){ + int yygoto; /* The next state */ + int yyact; /* The next action */ + yyStackEntry *yymsp; /* The top of the parser's stack */ + int yysize; /* Amount to pop the stack */ + ParseARG_FETCH; + yymsp = yypParser->yytos; +#ifndef NDEBUG + if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ + yysize = yyRuleInfo[yyruleno].nrhs; + fprintf(yyTraceFILE, "%sReduce [%s], go to state %d.\n", yyTracePrompt, + yyRuleName[yyruleno], yymsp[yysize].stateno); + } +#endif /* NDEBUG */ + + /* Check that the stack is large enough to grow by a single entry + ** if the RHS of the rule is empty. This ensures that there is room + ** enough on the stack to push the LHS value */ + if( yyRuleInfo[yyruleno].nrhs==0 ){ +#ifdef YYTRACKMAXSTACKDEPTH + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>=yypParser->yystackEnd ){ + yyStackOverflow(yypParser); + return; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ + if( yyGrowStack(yypParser) ){ + yyStackOverflow(yypParser); + return; + } + yymsp = yypParser->yytos; + } +#endif + } + + switch( yyruleno ){ + /* Beginning here are the reduction cases. A typical example + ** follows: + ** case 0: + ** #line + ** { ... } // User supplied code + ** #line + ** break; + */ +/********** Begin reduce actions **********************************************/ +%% +/********** End reduce actions ************************************************/ + }; + assert( yyrulenoYY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) ); + + /* It is not possible for a REDUCE to be followed by an error */ + assert( yyact!=YY_ERROR_ACTION ); + + if( yyact==YY_ACCEPT_ACTION ){ + yypParser->yytos += yysize; + yy_accept(yypParser); + }else{ + yymsp += yysize+1; + yypParser->yytos = yymsp; + yymsp->stateno = (YYACTIONTYPE)yyact; + yymsp->major = (YYCODETYPE)yygoto; + yyTraceShift(yypParser, yyact); + } +} + +/* +** The following code executes when the parse fails +*/ +#ifndef YYNOERRORRECOVERY +static void yy_parse_failed( + yyParser *yypParser /* The parser */ +){ + ParseARG_FETCH; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt); + } +#endif + while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); + /* Here code is inserted which will be executed whenever the + ** parser fails */ +/************ Begin %parse_failure code ***************************************/ +%% +/************ End %parse_failure code *****************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} +#endif /* YYNOERRORRECOVERY */ + +/* +** The following code executes when a syntax error first occurs. +*/ +static void yy_syntax_error( + yyParser *yypParser, /* The parser */ + int yymajor, /* The major type of the error token */ + ParseTOKENTYPE yyminor /* The minor type of the error token */ +){ + ParseARG_FETCH; +#define TOKEN yyminor +/************ Begin %syntax_error code ****************************************/ +%% +/************ End %syntax_error code ******************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} + +/* +** The following is executed when the parser accepts +*/ +static void yy_accept( + yyParser *yypParser /* The parser */ +){ + ParseARG_FETCH; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt); + } +#endif +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + assert( yypParser->yytos==yypParser->yystack ); + /* Here code is inserted which will be executed whenever the + ** parser accepts */ +/*********** Begin %parse_accept code *****************************************/ +%% +/*********** End %parse_accept code *******************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} + +/* The main parser program. +** The first argument is a pointer to a structure obtained from +** "ParseAlloc" which describes the current state of the parser. +** The second argument is the major token number. The third is +** the minor token. The fourth optional argument is whatever the +** user wants (and specified in the grammar) and is available for +** use by the action routines. +** +** Inputs: +**
    +**
  • A pointer to the parser (an opaque structure.) +**
  • The major token number. +**
  • The minor token number. +**
  • An option argument of a grammar-specified type. +**
+** +** Outputs: +** None. +*/ +void Parse( + void *yyp, /* The parser */ + int yymajor, /* The major token code number */ + ParseTOKENTYPE yyminor /* The value for the token */ + ParseARG_PDECL /* Optional %extra_argument parameter */ +){ + YYMINORTYPE yyminorunion; + unsigned int yyact; /* The parser action. */ +#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) + int yyendofinput; /* True if we are at the end of input */ +#endif +#ifdef YYERRORSYMBOL + int yyerrorhit = 0; /* True if yymajor has invoked an error */ +#endif + yyParser *yypParser; /* The parser */ + + yypParser = (yyParser*)yyp; + assert( yypParser->yytos!=0 ); +#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) + yyendofinput = (yymajor==0); +#endif + ParseARG_STORE; + +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sInput '%s'\n",yyTracePrompt,yyTokenName[yymajor]); + } +#endif + + do{ + yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor); + if( yyact <= YY_MAX_SHIFTREDUCE ){ + yy_shift(yypParser,yyact,yymajor,yyminor); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt--; +#endif + yymajor = YYNOCODE; + }else if( yyact <= YY_MAX_REDUCE ){ + yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor); + }else{ + assert( yyact == YY_ERROR_ACTION ); + yyminorunion.yy0 = yyminor; +#ifdef YYERRORSYMBOL + int yymx; +#endif +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt); + } +#endif +#ifdef YYERRORSYMBOL + /* A syntax error has occurred. + ** The response to an error depends upon whether or not the + ** grammar defines an error token "ERROR". + ** + ** This is what we do if the grammar does define ERROR: + ** + ** * Call the %syntax_error function. + ** + ** * Begin popping the stack until we enter a state where + ** it is legal to shift the error symbol, then shift + ** the error symbol. + ** + ** * Set the error count to three. + ** + ** * Begin accepting and shifting new tokens. No new error + ** processing will occur until three tokens have been + ** shifted successfully. + ** + */ + if( yypParser->yyerrcnt<0 ){ + yy_syntax_error(yypParser,yymajor,yyminor); + } + yymx = yypParser->yytos->major; + if( yymx==YYERRORSYMBOL || yyerrorhit ){ +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sDiscard input token %s\n", + yyTracePrompt,yyTokenName[yymajor]); + } +#endif + yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); + yymajor = YYNOCODE; + }else{ + while( yypParser->yytos >= yypParser->yystack + && yymx != YYERRORSYMBOL + && (yyact = yy_find_reduce_action( + yypParser->yytos->stateno, + YYERRORSYMBOL)) >= YY_MIN_REDUCE + ){ + yy_pop_parser_stack(yypParser); + } + if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + yy_parse_failed(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + yymajor = YYNOCODE; + }else if( yymx!=YYERRORSYMBOL ){ + yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor); + } + } + yypParser->yyerrcnt = 3; + yyerrorhit = 1; +#elif defined(YYNOERRORRECOVERY) + /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to + ** do any kind of error recovery. Instead, simply invoke the syntax + ** error routine and continue going as if nothing had happened. + ** + ** Applications can set this macro (for example inside %include) if + ** they intend to abandon the parse upon the first syntax error seen. + */ + yy_syntax_error(yypParser,yymajor, yyminor); + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + yymajor = YYNOCODE; + +#else /* YYERRORSYMBOL is not defined */ + /* This is what we do if the grammar does not define ERROR: + ** + ** * Report an error message, and throw away the input token. + ** + ** * If the input token is $, then fail the parse. + ** + ** As before, subsequent error messages are suppressed until + ** three input tokens have been successfully shifted. + */ + if( yypParser->yyerrcnt<=0 ){ + yy_syntax_error(yypParser,yymajor, yyminor); + } + yypParser->yyerrcnt = 3; + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + if( yyendofinput ){ + yy_parse_failed(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + } + yymajor = YYNOCODE; +#endif + } + }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack ); +#ifndef NDEBUG + if( yyTraceFILE ){ + yyStackEntry *i; + char cDiv = '['; + fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt); + for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){ + fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]); + cDiv = ' '; + } + fprintf(yyTraceFILE,"]\n"); + } +#endif + return; +} diff --git a/3rdparty/bx/tools/bin/linux/bin2c b/3rdparty/bx/tools/bin/linux/bin2c index b862dae33a5e5a6fbd04a7db2d75c1b6c70d9189..ca595d9f82a16c4ef5057cf0c35fedab6348f069 100755 GIT binary patch literal 68272 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 delta 125951 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 z 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 diff --git a/3rdparty/bx/tools/bin/linux/lemon b/3rdparty/bx/tools/bin/linux/lemon new file mode 100755 index 0000000000000000000000000000000000000000..64d24ce47abab4862148f5a658e5c1f1e4f7b4f8 GIT binary patch literal 80952 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 L-BhHZPeuJdY->?5 literal 0 HcmV?d00001 diff --git a/3rdparty/bx/tools/bin/linux/lempar.c b/3rdparty/bx/tools/bin/linux/lempar.c new file mode 100644 index 0000000..da81ddd --- /dev/null +++ b/3rdparty/bx/tools/bin/linux/lempar.c @@ -0,0 +1,981 @@ +/* +** 2000-05-29 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** Driver template for the LEMON parser generator. +** +** The "lemon" program processes an LALR(1) input grammar file, then uses +** this template to construct a parser. The "lemon" program inserts text +** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the +** interstitial "-" characters) contained in this template is changed into +** the value of the %name directive from the grammar. Otherwise, the content +** of this template is copied straight through into the generate parser +** source file. +** +** The following is the concatenation of all %include directives from the +** input grammar file: +*/ +#include +/************ Begin %include sections from the grammar ************************/ +%% +/**************** End of %include directives **********************************/ +/* These constants specify the various numeric values for terminal symbols +** in a format understandable to "makeheaders". This section is blank unless +** "lemon" is run with the "-m" command-line option. +***************** Begin makeheaders token definitions *************************/ +%% +/**************** End makeheaders token definitions ***************************/ + +/* The next sections is a series of control #defines. +** various aspects of the generated parser. +** YYCODETYPE is the data type used to store the integer codes +** that represent terminal and non-terminal symbols. +** "unsigned char" is used if there are fewer than +** 256 symbols. Larger types otherwise. +** YYNOCODE is a number of type YYCODETYPE that is not used for +** any terminal or nonterminal symbol. +** YYFALLBACK If defined, this indicates that one or more tokens +** (also known as: "terminal symbols") have fall-back +** values which should be used if the original symbol +** would not parse. This permits keywords to sometimes +** be used as identifiers, for example. +** YYACTIONTYPE is the data type used for "action codes" - numbers +** that indicate what to do in response to the next +** token. +** ParseTOKENTYPE is the data type used for minor type for terminal +** symbols. Background: A "minor type" is a semantic +** value associated with a terminal or non-terminal +** symbols. For example, for an "ID" terminal symbol, +** the minor type might be the name of the identifier. +** Each non-terminal can have a different minor type. +** Terminal symbols all have the same minor type, though. +** This macros defines the minor type for terminal +** symbols. +** YYMINORTYPE is the data type used for all minor types. +** This is typically a union of many types, one of +** which is ParseTOKENTYPE. The entry in the union +** for terminal symbols is called "yy0". +** YYSTACKDEPTH is the maximum depth of the parser's stack. If +** zero the stack is dynamically sized using realloc() +** ParseARG_SDECL A static variable declaration for the %extra_argument +** ParseARG_PDECL A parameter declaration for the %extra_argument +** ParseARG_STORE Code to store %extra_argument into yypParser +** ParseARG_FETCH Code to extract %extra_argument from yypParser +** YYERRORSYMBOL is the code number of the error symbol. If not +** defined, then do no error processing. +** YYNSTATE the combined number of states. +** YYNRULE the number of rules in the grammar +** YY_MAX_SHIFT Maximum value for shift actions +** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions +** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions +** YY_MIN_REDUCE Minimum value for reduce actions +** YY_MAX_REDUCE Maximum value for reduce actions +** YY_ERROR_ACTION The yy_action[] code for syntax error +** YY_ACCEPT_ACTION The yy_action[] code for accept +** YY_NO_ACTION The yy_action[] code for no-op +*/ +#ifndef INTERFACE +# define INTERFACE 1 +#endif +/************* Begin control #defines *****************************************/ +%% +/************* End control #defines *******************************************/ + +/* Define the yytestcase() macro to be a no-op if is not already defined +** otherwise. +** +** Applications can choose to define yytestcase() in the %include section +** to a macro that can assist in verifying code coverage. For production +** code the yytestcase() macro should be turned off. But it is useful +** for testing. +*/ +#ifndef yytestcase +# define yytestcase(X) +#endif + + +/* Next are the tables used to determine what action to take based on the +** current state and lookahead token. These tables are used to implement +** functions that take a state number and lookahead value and return an +** action integer. +** +** Suppose the action integer is N. Then the action is determined as +** follows +** +** 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead +** token onto the stack and goto state N. +** +** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then +** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE. +** +** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE +** and YY_MAX_REDUCE +** +** N == YY_ERROR_ACTION A syntax error has occurred. +** +** N == YY_ACCEPT_ACTION The parser accepts its input. +** +** N == YY_NO_ACTION No such action. Denotes unused +** slots in the yy_action[] table. +** +** The action table is constructed as a single large table named yy_action[]. +** Given state S and lookahead X, the action is computed as either: +** +** (A) N = yy_action[ yy_shift_ofst[S] + X ] +** (B) N = yy_default[S] +** +** The (A) formula is preferred. The B formula is used instead if: +** (1) The yy_shift_ofst[S]+X value is out of range, or +** (2) yy_lookahead[yy_shift_ofst[S]+X] is not equal to X, or +** (3) yy_shift_ofst[S] equal YY_SHIFT_USE_DFLT. +** (Implementation note: YY_SHIFT_USE_DFLT is chosen so that +** YY_SHIFT_USE_DFLT+X will be out of range for all possible lookaheads X. +** Hence only tests (1) and (2) need to be evaluated.) +** +** The formulas above are for computing the action when the lookahead is +** a terminal symbol. If the lookahead is a non-terminal (as occurs after +** a reduce action) then the yy_reduce_ofst[] array is used in place of +** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of +** YY_SHIFT_USE_DFLT. +** +** The following are the tables generated in this section: +** +** yy_action[] A single table containing all actions. +** yy_lookahead[] A table containing the lookahead for each entry in +** yy_action. Used to detect hash collisions. +** yy_shift_ofst[] For each state, the offset into yy_action for +** shifting terminals. +** yy_reduce_ofst[] For each state, the offset into yy_action for +** shifting non-terminals after a reduce. +** yy_default[] Default action for each state. +** +*********** Begin parsing tables **********************************************/ +%% +/********** End of lemon-generated parsing tables *****************************/ + +/* The next table maps tokens (terminal symbols) into fallback tokens. +** If a construct like the following: +** +** %fallback ID X Y Z. +** +** appears in the grammar, then ID becomes a fallback token for X, Y, +** and Z. Whenever one of the tokens X, Y, or Z is input to the parser +** but it does not parse, the type of the token is changed to ID and +** the parse is retried before an error is thrown. +** +** This feature can be used, for example, to cause some keywords in a language +** to revert to identifiers if they keyword does not apply in the context where +** it appears. +*/ +#ifdef YYFALLBACK +static const YYCODETYPE yyFallback[] = { +%% +}; +#endif /* YYFALLBACK */ + +/* The following structure represents a single element of the +** parser's stack. Information stored includes: +** +** + The state number for the parser at this level of the stack. +** +** + The value of the token stored at this level of the stack. +** (In other words, the "major" token.) +** +** + The semantic value stored at this level of the stack. This is +** the information used by the action routines in the grammar. +** It is sometimes called the "minor" token. +** +** After the "shift" half of a SHIFTREDUCE action, the stateno field +** actually contains the reduce action for the second half of the +** SHIFTREDUCE. +*/ +struct yyStackEntry { + YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */ + YYCODETYPE major; /* The major token value. This is the code + ** number for the token at this stack level */ + YYMINORTYPE minor; /* The user-supplied minor token value. This + ** is the value of the token */ +}; +typedef struct yyStackEntry yyStackEntry; + +/* The state of the parser is completely contained in an instance of +** the following structure */ +struct yyParser { + yyStackEntry *yytos; /* Pointer to top element of the stack */ +#ifdef YYTRACKMAXSTACKDEPTH + int yyhwm; /* High-water mark of the stack */ +#endif +#ifndef YYNOERRORRECOVERY + int yyerrcnt; /* Shifts left before out of the error */ +#endif + ParseARG_SDECL /* A place to hold %extra_argument */ +#if YYSTACKDEPTH<=0 + int yystksz; /* Current side of the stack */ + yyStackEntry *yystack; /* The parser's stack */ + yyStackEntry yystk0; /* First stack entry */ +#else + yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */ + yyStackEntry *yystackEnd; /* Last entry in the stack */ +#endif +}; +typedef struct yyParser yyParser; + +#ifndef NDEBUG +#include +static FILE *yyTraceFILE = 0; +static char *yyTracePrompt = 0; +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* +** Turn parser tracing on by giving a stream to which to write the trace +** and a prompt to preface each trace message. Tracing is turned off +** by making either argument NULL +** +** Inputs: +**
      +**
    • A FILE* to which trace output should be written. +** If NULL, then tracing is turned off. +**
    • A prefix string written at the beginning of every +** line of trace output. If NULL, then tracing is +** turned off. +**
    +** +** Outputs: +** None. +*/ +void ParseTrace(FILE *TraceFILE, char *zTracePrompt){ + yyTraceFILE = TraceFILE; + yyTracePrompt = zTracePrompt; + if( yyTraceFILE==0 ) yyTracePrompt = 0; + else if( yyTracePrompt==0 ) yyTraceFILE = 0; +} +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* For tracing shifts, the names of all terminals and nonterminals +** are required. The following table supplies these names */ +static const char *const yyTokenName[] = { +%% +}; +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* For tracing reduce actions, the names of all rules are required. +*/ +static const char *const yyRuleName[] = { +%% +}; +#endif /* NDEBUG */ + + +#if YYSTACKDEPTH<=0 +/* +** Try to increase the size of the parser stack. Return the number +** of errors. Return 0 on success. +*/ +static int yyGrowStack(yyParser *p){ + int newSize; + int idx; + yyStackEntry *pNew; + + newSize = p->yystksz*2 + 100; + idx = p->yytos ? (int)(p->yytos - p->yystack) : 0; + if( p->yystack==&p->yystk0 ){ + pNew = malloc(newSize*sizeof(pNew[0])); + if( pNew ) pNew[0] = p->yystk0; + }else{ + pNew = realloc(p->yystack, newSize*sizeof(pNew[0])); + } + if( pNew ){ + p->yystack = pNew; + p->yytos = &p->yystack[idx]; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n", + yyTracePrompt, p->yystksz, newSize); + } +#endif + p->yystksz = newSize; + } + return pNew==0; +} +#endif + +/* Datatype of the argument to the memory allocated passed as the +** second argument to ParseAlloc() below. This can be changed by +** putting an appropriate #define in the %include section of the input +** grammar. +*/ +#ifndef YYMALLOCARGTYPE +# define YYMALLOCARGTYPE size_t +#endif + +/* Initialize a new parser that has already been allocated. +*/ +void ParseInit(void *yypParser){ + yyParser *pParser = (yyParser*)yypParser; +#ifdef YYTRACKMAXSTACKDEPTH + pParser->yyhwm = 0; +#endif +#if YYSTACKDEPTH<=0 + pParser->yytos = NULL; + pParser->yystack = NULL; + pParser->yystksz = 0; + if( yyGrowStack(pParser) ){ + pParser->yystack = &pParser->yystk0; + pParser->yystksz = 1; + } +#endif +#ifndef YYNOERRORRECOVERY + pParser->yyerrcnt = -1; +#endif + pParser->yytos = pParser->yystack; + pParser->yystack[0].stateno = 0; + pParser->yystack[0].major = 0; +#if YYSTACKDEPTH>0 + pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1]; +#endif +} + +#ifndef Parse_ENGINEALWAYSONSTACK +/* +** This function allocates a new parser. +** The only argument is a pointer to a function which works like +** malloc. +** +** Inputs: +** A pointer to the function used to allocate memory. +** +** Outputs: +** A pointer to a parser. This pointer is used in subsequent calls +** to Parse and ParseFree. +*/ +void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){ + yyParser *pParser; + pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) ); + if( pParser ) ParseInit(pParser); + return pParser; +} +#endif /* Parse_ENGINEALWAYSONSTACK */ + + +/* The following function deletes the "minor type" or semantic value +** associated with a symbol. The symbol can be either a terminal +** or nonterminal. "yymajor" is the symbol code, and "yypminor" is +** a pointer to the value to be deleted. The code used to do the +** deletions is derived from the %destructor and/or %token_destructor +** directives of the input grammar. +*/ +static void yy_destructor( + yyParser *yypParser, /* The parser */ + YYCODETYPE yymajor, /* Type code for object to destroy */ + YYMINORTYPE *yypminor /* The object to be destroyed */ +){ + ParseARG_FETCH; + switch( yymajor ){ + /* Here is inserted the actions which take place when a + ** terminal or non-terminal is destroyed. This can happen + ** when the symbol is popped from the stack during a + ** reduce or during error processing or when a parser is + ** being destroyed before it is finished parsing. + ** + ** Note: during a reduce, the only symbols destroyed are those + ** which appear on the RHS of the rule, but which are *not* used + ** inside the C code. + */ +/********* Begin destructor definitions ***************************************/ +%% +/********* End destructor definitions *****************************************/ + default: break; /* If no destructor action specified: do nothing */ + } +} + +/* +** Pop the parser's stack once. +** +** If there is a destructor routine associated with the token which +** is popped from the stack, then call it. +*/ +static void yy_pop_parser_stack(yyParser *pParser){ + yyStackEntry *yytos; + assert( pParser->yytos!=0 ); + assert( pParser->yytos > pParser->yystack ); + yytos = pParser->yytos--; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sPopping %s\n", + yyTracePrompt, + yyTokenName[yytos->major]); + } +#endif + yy_destructor(pParser, yytos->major, &yytos->minor); +} + +/* +** Clear all secondary memory allocations from the parser +*/ +void ParseFinalize(void *p){ + yyParser *pParser = (yyParser*)p; + while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser); +#if YYSTACKDEPTH<=0 + if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack); +#endif +} + +#ifndef Parse_ENGINEALWAYSONSTACK +/* +** Deallocate and destroy a parser. Destructors are called for +** all stack elements before shutting the parser down. +** +** If the YYPARSEFREENEVERNULL macro exists (for example because it +** is defined in a %include section of the input grammar) then it is +** assumed that the input pointer is never NULL. +*/ +void ParseFree( + void *p, /* The parser to be deleted */ + void (*freeProc)(void*) /* Function used to reclaim memory */ +){ +#ifndef YYPARSEFREENEVERNULL + if( p==0 ) return; +#endif + ParseFinalize(p); + (*freeProc)(p); +} +#endif /* Parse_ENGINEALWAYSONSTACK */ + +/* +** Return the peak depth of the stack for a parser. +*/ +#ifdef YYTRACKMAXSTACKDEPTH +int ParseStackPeak(void *p){ + yyParser *pParser = (yyParser*)p; + return pParser->yyhwm; +} +#endif + +/* +** Find the appropriate action for a parser given the terminal +** look-ahead token iLookAhead. +*/ +static unsigned int yy_find_shift_action( + yyParser *pParser, /* The parser */ + YYCODETYPE iLookAhead /* The look-ahead token */ +){ + int i; + int stateno = pParser->yytos->stateno; + + if( stateno>=YY_MIN_REDUCE ) return stateno; + assert( stateno <= YY_SHIFT_COUNT ); + do{ + i = yy_shift_ofst[stateno]; + assert( iLookAhead!=YYNOCODE ); + i += iLookAhead; + if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ +#ifdef YYFALLBACK + YYCODETYPE iFallback; /* Fallback token */ + if( iLookAhead %s\n", + yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]); + } +#endif + assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */ + iLookAhead = iFallback; + continue; + } +#endif +#ifdef YYWILDCARD + { + int j = i - iLookAhead + YYWILDCARD; + if( +#if YY_SHIFT_MIN+YYWILDCARD<0 + j>=0 && +#endif +#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT + j0 + ){ +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", + yyTracePrompt, yyTokenName[iLookAhead], + yyTokenName[YYWILDCARD]); + } +#endif /* NDEBUG */ + return yy_action[j]; + } + } +#endif /* YYWILDCARD */ + return yy_default[stateno]; + }else{ + return yy_action[i]; + } + }while(1); +} + +/* +** Find the appropriate action for a parser given the non-terminal +** look-ahead token iLookAhead. +*/ +static int yy_find_reduce_action( + int stateno, /* Current state number */ + YYCODETYPE iLookAhead /* The look-ahead token */ +){ + int i; +#ifdef YYERRORSYMBOL + if( stateno>YY_REDUCE_COUNT ){ + return yy_default[stateno]; + } +#else + assert( stateno<=YY_REDUCE_COUNT ); +#endif + i = yy_reduce_ofst[stateno]; + assert( i!=YY_REDUCE_USE_DFLT ); + assert( iLookAhead!=YYNOCODE ); + i += iLookAhead; +#ifdef YYERRORSYMBOL + if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ + return yy_default[stateno]; + } +#else + assert( i>=0 && iyytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); + /* Here code is inserted which will execute if the parser + ** stack every overflows */ +/******** Begin %stack_overflow code ******************************************/ +%% +/******** End %stack_overflow code ********************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument var */ +} + +/* +** Print tracing information for a SHIFT action +*/ +#ifndef NDEBUG +static void yyTraceShift(yyParser *yypParser, int yyNewState){ + if( yyTraceFILE ){ + if( yyNewStateyytos->major], + yyNewState); + }else{ + fprintf(yyTraceFILE,"%sShift '%s'\n", + yyTracePrompt,yyTokenName[yypParser->yytos->major]); + } + } +} +#else +# define yyTraceShift(X,Y) +#endif + +/* +** Perform a shift action. +*/ +static void yy_shift( + yyParser *yypParser, /* The parser to be shifted */ + int yyNewState, /* The new state to shift in */ + int yyMajor, /* The major token to shift in */ + ParseTOKENTYPE yyMinor /* The minor token to shift in */ +){ + yyStackEntry *yytos; + yypParser->yytos++; +#ifdef YYTRACKMAXSTACKDEPTH + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) ); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>yypParser->yystackEnd ){ + yypParser->yytos--; + yyStackOverflow(yypParser); + return; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){ + if( yyGrowStack(yypParser) ){ + yypParser->yytos--; + yyStackOverflow(yypParser); + return; + } + } +#endif + if( yyNewState > YY_MAX_SHIFT ){ + yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; + } + yytos = yypParser->yytos; + yytos->stateno = (YYACTIONTYPE)yyNewState; + yytos->major = (YYCODETYPE)yyMajor; + yytos->minor.yy0 = yyMinor; + yyTraceShift(yypParser, yyNewState); +} + +/* The following table contains information about every rule that +** is used during the reduce. +*/ +static const struct { + YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ + signed char nrhs; /* Negative of the number of RHS symbols in the rule */ +} yyRuleInfo[] = { +%% +}; + +static void yy_accept(yyParser*); /* Forward Declaration */ + +/* +** Perform a reduce action and the shift that must immediately +** follow the reduce. +** +** The yyLookahead and yyLookaheadToken parameters provide reduce actions +** access to the lookahead token (if any). The yyLookahead will be YYNOCODE +** if the lookahead token has already been consumed. As this procedure is +** only called from one place, optimizing compilers will in-line it, which +** means that the extra parameters have no performance impact. +*/ +static void yy_reduce( + yyParser *yypParser, /* The parser */ + unsigned int yyruleno, /* Number of the rule by which to reduce */ + int yyLookahead, /* Lookahead token, or YYNOCODE if none */ + ParseTOKENTYPE yyLookaheadToken /* Value of the lookahead token */ +){ + int yygoto; /* The next state */ + int yyact; /* The next action */ + yyStackEntry *yymsp; /* The top of the parser's stack */ + int yysize; /* Amount to pop the stack */ + ParseARG_FETCH; + yymsp = yypParser->yytos; +#ifndef NDEBUG + if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ + yysize = yyRuleInfo[yyruleno].nrhs; + fprintf(yyTraceFILE, "%sReduce [%s], go to state %d.\n", yyTracePrompt, + yyRuleName[yyruleno], yymsp[yysize].stateno); + } +#endif /* NDEBUG */ + + /* Check that the stack is large enough to grow by a single entry + ** if the RHS of the rule is empty. This ensures that there is room + ** enough on the stack to push the LHS value */ + if( yyRuleInfo[yyruleno].nrhs==0 ){ +#ifdef YYTRACKMAXSTACKDEPTH + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>=yypParser->yystackEnd ){ + yyStackOverflow(yypParser); + return; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ + if( yyGrowStack(yypParser) ){ + yyStackOverflow(yypParser); + return; + } + yymsp = yypParser->yytos; + } +#endif + } + + switch( yyruleno ){ + /* Beginning here are the reduction cases. A typical example + ** follows: + ** case 0: + ** #line + ** { ... } // User supplied code + ** #line + ** break; + */ +/********** Begin reduce actions **********************************************/ +%% +/********** End reduce actions ************************************************/ + }; + assert( yyrulenoYY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) ); + + /* It is not possible for a REDUCE to be followed by an error */ + assert( yyact!=YY_ERROR_ACTION ); + + if( yyact==YY_ACCEPT_ACTION ){ + yypParser->yytos += yysize; + yy_accept(yypParser); + }else{ + yymsp += yysize+1; + yypParser->yytos = yymsp; + yymsp->stateno = (YYACTIONTYPE)yyact; + yymsp->major = (YYCODETYPE)yygoto; + yyTraceShift(yypParser, yyact); + } +} + +/* +** The following code executes when the parse fails +*/ +#ifndef YYNOERRORRECOVERY +static void yy_parse_failed( + yyParser *yypParser /* The parser */ +){ + ParseARG_FETCH; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt); + } +#endif + while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); + /* Here code is inserted which will be executed whenever the + ** parser fails */ +/************ Begin %parse_failure code ***************************************/ +%% +/************ End %parse_failure code *****************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} +#endif /* YYNOERRORRECOVERY */ + +/* +** The following code executes when a syntax error first occurs. +*/ +static void yy_syntax_error( + yyParser *yypParser, /* The parser */ + int yymajor, /* The major type of the error token */ + ParseTOKENTYPE yyminor /* The minor type of the error token */ +){ + ParseARG_FETCH; +#define TOKEN yyminor +/************ Begin %syntax_error code ****************************************/ +%% +/************ End %syntax_error code ******************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} + +/* +** The following is executed when the parser accepts +*/ +static void yy_accept( + yyParser *yypParser /* The parser */ +){ + ParseARG_FETCH; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt); + } +#endif +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + assert( yypParser->yytos==yypParser->yystack ); + /* Here code is inserted which will be executed whenever the + ** parser accepts */ +/*********** Begin %parse_accept code *****************************************/ +%% +/*********** End %parse_accept code *******************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} + +/* The main parser program. +** The first argument is a pointer to a structure obtained from +** "ParseAlloc" which describes the current state of the parser. +** The second argument is the major token number. The third is +** the minor token. The fourth optional argument is whatever the +** user wants (and specified in the grammar) and is available for +** use by the action routines. +** +** Inputs: +**
      +**
    • A pointer to the parser (an opaque structure.) +**
    • The major token number. +**
    • The minor token number. +**
    • An option argument of a grammar-specified type. +**
    +** +** Outputs: +** None. +*/ +void Parse( + void *yyp, /* The parser */ + int yymajor, /* The major token code number */ + ParseTOKENTYPE yyminor /* The value for the token */ + ParseARG_PDECL /* Optional %extra_argument parameter */ +){ + YYMINORTYPE yyminorunion; + unsigned int yyact; /* The parser action. */ +#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) + int yyendofinput; /* True if we are at the end of input */ +#endif +#ifdef YYERRORSYMBOL + int yyerrorhit = 0; /* True if yymajor has invoked an error */ +#endif + yyParser *yypParser; /* The parser */ + + yypParser = (yyParser*)yyp; + assert( yypParser->yytos!=0 ); +#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) + yyendofinput = (yymajor==0); +#endif + ParseARG_STORE; + +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sInput '%s'\n",yyTracePrompt,yyTokenName[yymajor]); + } +#endif + + do{ + yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor); + if( yyact <= YY_MAX_SHIFTREDUCE ){ + yy_shift(yypParser,yyact,yymajor,yyminor); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt--; +#endif + yymajor = YYNOCODE; + }else if( yyact <= YY_MAX_REDUCE ){ + yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor); + }else{ + assert( yyact == YY_ERROR_ACTION ); + yyminorunion.yy0 = yyminor; +#ifdef YYERRORSYMBOL + int yymx; +#endif +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt); + } +#endif +#ifdef YYERRORSYMBOL + /* A syntax error has occurred. + ** The response to an error depends upon whether or not the + ** grammar defines an error token "ERROR". + ** + ** This is what we do if the grammar does define ERROR: + ** + ** * Call the %syntax_error function. + ** + ** * Begin popping the stack until we enter a state where + ** it is legal to shift the error symbol, then shift + ** the error symbol. + ** + ** * Set the error count to three. + ** + ** * Begin accepting and shifting new tokens. No new error + ** processing will occur until three tokens have been + ** shifted successfully. + ** + */ + if( yypParser->yyerrcnt<0 ){ + yy_syntax_error(yypParser,yymajor,yyminor); + } + yymx = yypParser->yytos->major; + if( yymx==YYERRORSYMBOL || yyerrorhit ){ +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sDiscard input token %s\n", + yyTracePrompt,yyTokenName[yymajor]); + } +#endif + yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); + yymajor = YYNOCODE; + }else{ + while( yypParser->yytos >= yypParser->yystack + && yymx != YYERRORSYMBOL + && (yyact = yy_find_reduce_action( + yypParser->yytos->stateno, + YYERRORSYMBOL)) >= YY_MIN_REDUCE + ){ + yy_pop_parser_stack(yypParser); + } + if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + yy_parse_failed(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + yymajor = YYNOCODE; + }else if( yymx!=YYERRORSYMBOL ){ + yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor); + } + } + yypParser->yyerrcnt = 3; + yyerrorhit = 1; +#elif defined(YYNOERRORRECOVERY) + /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to + ** do any kind of error recovery. Instead, simply invoke the syntax + ** error routine and continue going as if nothing had happened. + ** + ** Applications can set this macro (for example inside %include) if + ** they intend to abandon the parse upon the first syntax error seen. + */ + yy_syntax_error(yypParser,yymajor, yyminor); + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + yymajor = YYNOCODE; + +#else /* YYERRORSYMBOL is not defined */ + /* This is what we do if the grammar does not define ERROR: + ** + ** * Report an error message, and throw away the input token. + ** + ** * If the input token is $, then fail the parse. + ** + ** As before, subsequent error messages are suppressed until + ** three input tokens have been successfully shifted. + */ + if( yypParser->yyerrcnt<=0 ){ + yy_syntax_error(yypParser,yymajor, yyminor); + } + yypParser->yyerrcnt = 3; + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + if( yyendofinput ){ + yy_parse_failed(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + } + yymajor = YYNOCODE; +#endif + } + }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack ); +#ifndef NDEBUG + if( yyTraceFILE ){ + yyStackEntry *i; + char cDiv = '['; + fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt); + for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){ + fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]); + cDiv = ' '; + } + fprintf(yyTraceFILE,"]\n"); + } +#endif + return; +} diff --git a/3rdparty/bx/tools/bin/windows/bin2c.exe b/3rdparty/bx/tools/bin/windows/bin2c.exe index 143fffd09dd3ae2115336e051589ad79caaf0c50..2c01cdd806575bcd013b28211aa2f74a39ea97f6 100755 GIT binary patch literal 859136 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�lwB&HHEjSZ_ifG{c~sfu5UDz0FU}s(vy2 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≶VpS&4GEXuR`C#w{2f&Z#VPzVEAGMM5=x4Xbo&? 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 DkjyvT diff --git a/3rdparty/bx/tools/bin/windows/genie.exe b/3rdparty/bx/tools/bin/windows/genie.exe index 701de893737b1ef2545e677ba6a52466b8336696..8ba68d5d8d91b9fb5bb5f6c26ac0b15000d533cd 100644 GIT binary patch delta 24259 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 I5x(UAAGLn2?*IS* delta 10507 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 +/************ Begin %include sections from the grammar ************************/ +%% +/**************** End of %include directives **********************************/ +/* These constants specify the various numeric values for terminal symbols +** in a format understandable to "makeheaders". This section is blank unless +** "lemon" is run with the "-m" command-line option. +***************** Begin makeheaders token definitions *************************/ +%% +/**************** End makeheaders token definitions ***************************/ + +/* The next sections is a series of control #defines. +** various aspects of the generated parser. +** YYCODETYPE is the data type used to store the integer codes +** that represent terminal and non-terminal symbols. +** "unsigned char" is used if there are fewer than +** 256 symbols. Larger types otherwise. +** YYNOCODE is a number of type YYCODETYPE that is not used for +** any terminal or nonterminal symbol. +** YYFALLBACK If defined, this indicates that one or more tokens +** (also known as: "terminal symbols") have fall-back +** values which should be used if the original symbol +** would not parse. This permits keywords to sometimes +** be used as identifiers, for example. +** YYACTIONTYPE is the data type used for "action codes" - numbers +** that indicate what to do in response to the next +** token. +** ParseTOKENTYPE is the data type used for minor type for terminal +** symbols. Background: A "minor type" is a semantic +** value associated with a terminal or non-terminal +** symbols. For example, for an "ID" terminal symbol, +** the minor type might be the name of the identifier. +** Each non-terminal can have a different minor type. +** Terminal symbols all have the same minor type, though. +** This macros defines the minor type for terminal +** symbols. +** YYMINORTYPE is the data type used for all minor types. +** This is typically a union of many types, one of +** which is ParseTOKENTYPE. The entry in the union +** for terminal symbols is called "yy0". +** YYSTACKDEPTH is the maximum depth of the parser's stack. If +** zero the stack is dynamically sized using realloc() +** ParseARG_SDECL A static variable declaration for the %extra_argument +** ParseARG_PDECL A parameter declaration for the %extra_argument +** ParseARG_STORE Code to store %extra_argument into yypParser +** ParseARG_FETCH Code to extract %extra_argument from yypParser +** YYERRORSYMBOL is the code number of the error symbol. If not +** defined, then do no error processing. +** YYNSTATE the combined number of states. +** YYNRULE the number of rules in the grammar +** YY_MAX_SHIFT Maximum value for shift actions +** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions +** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions +** YY_MIN_REDUCE Minimum value for reduce actions +** YY_MAX_REDUCE Maximum value for reduce actions +** YY_ERROR_ACTION The yy_action[] code for syntax error +** YY_ACCEPT_ACTION The yy_action[] code for accept +** YY_NO_ACTION The yy_action[] code for no-op +*/ +#ifndef INTERFACE +# define INTERFACE 1 +#endif +/************* Begin control #defines *****************************************/ +%% +/************* End control #defines *******************************************/ + +/* Define the yytestcase() macro to be a no-op if is not already defined +** otherwise. +** +** Applications can choose to define yytestcase() in the %include section +** to a macro that can assist in verifying code coverage. For production +** code the yytestcase() macro should be turned off. But it is useful +** for testing. +*/ +#ifndef yytestcase +# define yytestcase(X) +#endif + + +/* Next are the tables used to determine what action to take based on the +** current state and lookahead token. These tables are used to implement +** functions that take a state number and lookahead value and return an +** action integer. +** +** Suppose the action integer is N. Then the action is determined as +** follows +** +** 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead +** token onto the stack and goto state N. +** +** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then +** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE. +** +** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE +** and YY_MAX_REDUCE +** +** N == YY_ERROR_ACTION A syntax error has occurred. +** +** N == YY_ACCEPT_ACTION The parser accepts its input. +** +** N == YY_NO_ACTION No such action. Denotes unused +** slots in the yy_action[] table. +** +** The action table is constructed as a single large table named yy_action[]. +** Given state S and lookahead X, the action is computed as either: +** +** (A) N = yy_action[ yy_shift_ofst[S] + X ] +** (B) N = yy_default[S] +** +** The (A) formula is preferred. The B formula is used instead if: +** (1) The yy_shift_ofst[S]+X value is out of range, or +** (2) yy_lookahead[yy_shift_ofst[S]+X] is not equal to X, or +** (3) yy_shift_ofst[S] equal YY_SHIFT_USE_DFLT. +** (Implementation note: YY_SHIFT_USE_DFLT is chosen so that +** YY_SHIFT_USE_DFLT+X will be out of range for all possible lookaheads X. +** Hence only tests (1) and (2) need to be evaluated.) +** +** The formulas above are for computing the action when the lookahead is +** a terminal symbol. If the lookahead is a non-terminal (as occurs after +** a reduce action) then the yy_reduce_ofst[] array is used in place of +** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of +** YY_SHIFT_USE_DFLT. +** +** The following are the tables generated in this section: +** +** yy_action[] A single table containing all actions. +** yy_lookahead[] A table containing the lookahead for each entry in +** yy_action. Used to detect hash collisions. +** yy_shift_ofst[] For each state, the offset into yy_action for +** shifting terminals. +** yy_reduce_ofst[] For each state, the offset into yy_action for +** shifting non-terminals after a reduce. +** yy_default[] Default action for each state. +** +*********** Begin parsing tables **********************************************/ +%% +/********** End of lemon-generated parsing tables *****************************/ + +/* The next table maps tokens (terminal symbols) into fallback tokens. +** If a construct like the following: +** +** %fallback ID X Y Z. +** +** appears in the grammar, then ID becomes a fallback token for X, Y, +** and Z. Whenever one of the tokens X, Y, or Z is input to the parser +** but it does not parse, the type of the token is changed to ID and +** the parse is retried before an error is thrown. +** +** This feature can be used, for example, to cause some keywords in a language +** to revert to identifiers if they keyword does not apply in the context where +** it appears. +*/ +#ifdef YYFALLBACK +static const YYCODETYPE yyFallback[] = { +%% +}; +#endif /* YYFALLBACK */ + +/* The following structure represents a single element of the +** parser's stack. Information stored includes: +** +** + The state number for the parser at this level of the stack. +** +** + The value of the token stored at this level of the stack. +** (In other words, the "major" token.) +** +** + The semantic value stored at this level of the stack. This is +** the information used by the action routines in the grammar. +** It is sometimes called the "minor" token. +** +** After the "shift" half of a SHIFTREDUCE action, the stateno field +** actually contains the reduce action for the second half of the +** SHIFTREDUCE. +*/ +struct yyStackEntry { + YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */ + YYCODETYPE major; /* The major token value. This is the code + ** number for the token at this stack level */ + YYMINORTYPE minor; /* The user-supplied minor token value. This + ** is the value of the token */ +}; +typedef struct yyStackEntry yyStackEntry; + +/* The state of the parser is completely contained in an instance of +** the following structure */ +struct yyParser { + yyStackEntry *yytos; /* Pointer to top element of the stack */ +#ifdef YYTRACKMAXSTACKDEPTH + int yyhwm; /* High-water mark of the stack */ +#endif +#ifndef YYNOERRORRECOVERY + int yyerrcnt; /* Shifts left before out of the error */ +#endif + ParseARG_SDECL /* A place to hold %extra_argument */ +#if YYSTACKDEPTH<=0 + int yystksz; /* Current side of the stack */ + yyStackEntry *yystack; /* The parser's stack */ + yyStackEntry yystk0; /* First stack entry */ +#else + yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */ + yyStackEntry *yystackEnd; /* Last entry in the stack */ +#endif +}; +typedef struct yyParser yyParser; + +#ifndef NDEBUG +#include +static FILE *yyTraceFILE = 0; +static char *yyTracePrompt = 0; +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* +** Turn parser tracing on by giving a stream to which to write the trace +** and a prompt to preface each trace message. Tracing is turned off +** by making either argument NULL +** +** Inputs: +**

    +** +** Outputs: +** None. +*/ +void ParseTrace(FILE *TraceFILE, char *zTracePrompt){ + yyTraceFILE = TraceFILE; + yyTracePrompt = zTracePrompt; + if( yyTraceFILE==0 ) yyTracePrompt = 0; + else if( yyTracePrompt==0 ) yyTraceFILE = 0; +} +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* For tracing shifts, the names of all terminals and nonterminals +** are required. The following table supplies these names */ +static const char *const yyTokenName[] = { +%% +}; +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* For tracing reduce actions, the names of all rules are required. +*/ +static const char *const yyRuleName[] = { +%% +}; +#endif /* NDEBUG */ + + +#if YYSTACKDEPTH<=0 +/* +** Try to increase the size of the parser stack. Return the number +** of errors. Return 0 on success. +*/ +static int yyGrowStack(yyParser *p){ + int newSize; + int idx; + yyStackEntry *pNew; + + newSize = p->yystksz*2 + 100; + idx = p->yytos ? (int)(p->yytos - p->yystack) : 0; + if( p->yystack==&p->yystk0 ){ + pNew = malloc(newSize*sizeof(pNew[0])); + if( pNew ) pNew[0] = p->yystk0; + }else{ + pNew = realloc(p->yystack, newSize*sizeof(pNew[0])); + } + if( pNew ){ + p->yystack = pNew; + p->yytos = &p->yystack[idx]; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n", + yyTracePrompt, p->yystksz, newSize); + } +#endif + p->yystksz = newSize; + } + return pNew==0; +} +#endif + +/* Datatype of the argument to the memory allocated passed as the +** second argument to ParseAlloc() below. This can be changed by +** putting an appropriate #define in the %include section of the input +** grammar. +*/ +#ifndef YYMALLOCARGTYPE +# define YYMALLOCARGTYPE size_t +#endif + +/* Initialize a new parser that has already been allocated. +*/ +void ParseInit(void *yypParser){ + yyParser *pParser = (yyParser*)yypParser; +#ifdef YYTRACKMAXSTACKDEPTH + pParser->yyhwm = 0; +#endif +#if YYSTACKDEPTH<=0 + pParser->yytos = NULL; + pParser->yystack = NULL; + pParser->yystksz = 0; + if( yyGrowStack(pParser) ){ + pParser->yystack = &pParser->yystk0; + pParser->yystksz = 1; + } +#endif +#ifndef YYNOERRORRECOVERY + pParser->yyerrcnt = -1; +#endif + pParser->yytos = pParser->yystack; + pParser->yystack[0].stateno = 0; + pParser->yystack[0].major = 0; +#if YYSTACKDEPTH>0 + pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1]; +#endif +} + +#ifndef Parse_ENGINEALWAYSONSTACK +/* +** This function allocates a new parser. +** The only argument is a pointer to a function which works like +** malloc. +** +** Inputs: +** A pointer to the function used to allocate memory. +** +** Outputs: +** A pointer to a parser. This pointer is used in subsequent calls +** to Parse and ParseFree. +*/ +void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){ + yyParser *pParser; + pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) ); + if( pParser ) ParseInit(pParser); + return pParser; +} +#endif /* Parse_ENGINEALWAYSONSTACK */ + + +/* The following function deletes the "minor type" or semantic value +** associated with a symbol. The symbol can be either a terminal +** or nonterminal. "yymajor" is the symbol code, and "yypminor" is +** a pointer to the value to be deleted. The code used to do the +** deletions is derived from the %destructor and/or %token_destructor +** directives of the input grammar. +*/ +static void yy_destructor( + yyParser *yypParser, /* The parser */ + YYCODETYPE yymajor, /* Type code for object to destroy */ + YYMINORTYPE *yypminor /* The object to be destroyed */ +){ + ParseARG_FETCH; + switch( yymajor ){ + /* Here is inserted the actions which take place when a + ** terminal or non-terminal is destroyed. This can happen + ** when the symbol is popped from the stack during a + ** reduce or during error processing or when a parser is + ** being destroyed before it is finished parsing. + ** + ** Note: during a reduce, the only symbols destroyed are those + ** which appear on the RHS of the rule, but which are *not* used + ** inside the C code. + */ +/********* Begin destructor definitions ***************************************/ +%% +/********* End destructor definitions *****************************************/ + default: break; /* If no destructor action specified: do nothing */ + } +} + +/* +** Pop the parser's stack once. +** +** If there is a destructor routine associated with the token which +** is popped from the stack, then call it. +*/ +static void yy_pop_parser_stack(yyParser *pParser){ + yyStackEntry *yytos; + assert( pParser->yytos!=0 ); + assert( pParser->yytos > pParser->yystack ); + yytos = pParser->yytos--; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sPopping %s\n", + yyTracePrompt, + yyTokenName[yytos->major]); + } +#endif + yy_destructor(pParser, yytos->major, &yytos->minor); +} + +/* +** Clear all secondary memory allocations from the parser +*/ +void ParseFinalize(void *p){ + yyParser *pParser = (yyParser*)p; + while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser); +#if YYSTACKDEPTH<=0 + if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack); +#endif +} + +#ifndef Parse_ENGINEALWAYSONSTACK +/* +** Deallocate and destroy a parser. Destructors are called for +** all stack elements before shutting the parser down. +** +** If the YYPARSEFREENEVERNULL macro exists (for example because it +** is defined in a %include section of the input grammar) then it is +** assumed that the input pointer is never NULL. +*/ +void ParseFree( + void *p, /* The parser to be deleted */ + void (*freeProc)(void*) /* Function used to reclaim memory */ +){ +#ifndef YYPARSEFREENEVERNULL + if( p==0 ) return; +#endif + ParseFinalize(p); + (*freeProc)(p); +} +#endif /* Parse_ENGINEALWAYSONSTACK */ + +/* +** Return the peak depth of the stack for a parser. +*/ +#ifdef YYTRACKMAXSTACKDEPTH +int ParseStackPeak(void *p){ + yyParser *pParser = (yyParser*)p; + return pParser->yyhwm; +} +#endif + +/* +** Find the appropriate action for a parser given the terminal +** look-ahead token iLookAhead. +*/ +static unsigned int yy_find_shift_action( + yyParser *pParser, /* The parser */ + YYCODETYPE iLookAhead /* The look-ahead token */ +){ + int i; + int stateno = pParser->yytos->stateno; + + if( stateno>=YY_MIN_REDUCE ) return stateno; + assert( stateno <= YY_SHIFT_COUNT ); + do{ + i = yy_shift_ofst[stateno]; + assert( iLookAhead!=YYNOCODE ); + i += iLookAhead; + if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ +#ifdef YYFALLBACK + YYCODETYPE iFallback; /* Fallback token */ + if( iLookAhead %s\n", + yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]); + } +#endif + assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */ + iLookAhead = iFallback; + continue; + } +#endif +#ifdef YYWILDCARD + { + int j = i - iLookAhead + YYWILDCARD; + if( +#if YY_SHIFT_MIN+YYWILDCARD<0 + j>=0 && +#endif +#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT + j0 + ){ +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", + yyTracePrompt, yyTokenName[iLookAhead], + yyTokenName[YYWILDCARD]); + } +#endif /* NDEBUG */ + return yy_action[j]; + } + } +#endif /* YYWILDCARD */ + return yy_default[stateno]; + }else{ + return yy_action[i]; + } + }while(1); +} + +/* +** Find the appropriate action for a parser given the non-terminal +** look-ahead token iLookAhead. +*/ +static int yy_find_reduce_action( + int stateno, /* Current state number */ + YYCODETYPE iLookAhead /* The look-ahead token */ +){ + int i; +#ifdef YYERRORSYMBOL + if( stateno>YY_REDUCE_COUNT ){ + return yy_default[stateno]; + } +#else + assert( stateno<=YY_REDUCE_COUNT ); +#endif + i = yy_reduce_ofst[stateno]; + assert( i!=YY_REDUCE_USE_DFLT ); + assert( iLookAhead!=YYNOCODE ); + i += iLookAhead; +#ifdef YYERRORSYMBOL + if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ + return yy_default[stateno]; + } +#else + assert( i>=0 && iyytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); + /* Here code is inserted which will execute if the parser + ** stack every overflows */ +/******** Begin %stack_overflow code ******************************************/ +%% +/******** End %stack_overflow code ********************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument var */ +} + +/* +** Print tracing information for a SHIFT action +*/ +#ifndef NDEBUG +static void yyTraceShift(yyParser *yypParser, int yyNewState){ + if( yyTraceFILE ){ + if( yyNewStateyytos->major], + yyNewState); + }else{ + fprintf(yyTraceFILE,"%sShift '%s'\n", + yyTracePrompt,yyTokenName[yypParser->yytos->major]); + } + } +} +#else +# define yyTraceShift(X,Y) +#endif + +/* +** Perform a shift action. +*/ +static void yy_shift( + yyParser *yypParser, /* The parser to be shifted */ + int yyNewState, /* The new state to shift in */ + int yyMajor, /* The major token to shift in */ + ParseTOKENTYPE yyMinor /* The minor token to shift in */ +){ + yyStackEntry *yytos; + yypParser->yytos++; +#ifdef YYTRACKMAXSTACKDEPTH + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) ); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>yypParser->yystackEnd ){ + yypParser->yytos--; + yyStackOverflow(yypParser); + return; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){ + if( yyGrowStack(yypParser) ){ + yypParser->yytos--; + yyStackOverflow(yypParser); + return; + } + } +#endif + if( yyNewState > YY_MAX_SHIFT ){ + yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; + } + yytos = yypParser->yytos; + yytos->stateno = (YYACTIONTYPE)yyNewState; + yytos->major = (YYCODETYPE)yyMajor; + yytos->minor.yy0 = yyMinor; + yyTraceShift(yypParser, yyNewState); +} + +/* The following table contains information about every rule that +** is used during the reduce. +*/ +static const struct { + YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ + signed char nrhs; /* Negative of the number of RHS symbols in the rule */ +} yyRuleInfo[] = { +%% +}; + +static void yy_accept(yyParser*); /* Forward Declaration */ + +/* +** Perform a reduce action and the shift that must immediately +** follow the reduce. +** +** The yyLookahead and yyLookaheadToken parameters provide reduce actions +** access to the lookahead token (if any). The yyLookahead will be YYNOCODE +** if the lookahead token has already been consumed. As this procedure is +** only called from one place, optimizing compilers will in-line it, which +** means that the extra parameters have no performance impact. +*/ +static void yy_reduce( + yyParser *yypParser, /* The parser */ + unsigned int yyruleno, /* Number of the rule by which to reduce */ + int yyLookahead, /* Lookahead token, or YYNOCODE if none */ + ParseTOKENTYPE yyLookaheadToken /* Value of the lookahead token */ +){ + int yygoto; /* The next state */ + int yyact; /* The next action */ + yyStackEntry *yymsp; /* The top of the parser's stack */ + int yysize; /* Amount to pop the stack */ + ParseARG_FETCH; + yymsp = yypParser->yytos; +#ifndef NDEBUG + if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ + yysize = yyRuleInfo[yyruleno].nrhs; + fprintf(yyTraceFILE, "%sReduce [%s], go to state %d.\n", yyTracePrompt, + yyRuleName[yyruleno], yymsp[yysize].stateno); + } +#endif /* NDEBUG */ + + /* Check that the stack is large enough to grow by a single entry + ** if the RHS of the rule is empty. This ensures that there is room + ** enough on the stack to push the LHS value */ + if( yyRuleInfo[yyruleno].nrhs==0 ){ +#ifdef YYTRACKMAXSTACKDEPTH + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>=yypParser->yystackEnd ){ + yyStackOverflow(yypParser); + return; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ + if( yyGrowStack(yypParser) ){ + yyStackOverflow(yypParser); + return; + } + yymsp = yypParser->yytos; + } +#endif + } + + switch( yyruleno ){ + /* Beginning here are the reduction cases. A typical example + ** follows: + ** case 0: + ** #line + ** { ... } // User supplied code + ** #line + ** break; + */ +/********** Begin reduce actions **********************************************/ +%% +/********** End reduce actions ************************************************/ + }; + assert( yyrulenoYY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) ); + + /* It is not possible for a REDUCE to be followed by an error */ + assert( yyact!=YY_ERROR_ACTION ); + + if( yyact==YY_ACCEPT_ACTION ){ + yypParser->yytos += yysize; + yy_accept(yypParser); + }else{ + yymsp += yysize+1; + yypParser->yytos = yymsp; + yymsp->stateno = (YYACTIONTYPE)yyact; + yymsp->major = (YYCODETYPE)yygoto; + yyTraceShift(yypParser, yyact); + } +} + +/* +** The following code executes when the parse fails +*/ +#ifndef YYNOERRORRECOVERY +static void yy_parse_failed( + yyParser *yypParser /* The parser */ +){ + ParseARG_FETCH; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt); + } +#endif + while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); + /* Here code is inserted which will be executed whenever the + ** parser fails */ +/************ Begin %parse_failure code ***************************************/ +%% +/************ End %parse_failure code *****************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} +#endif /* YYNOERRORRECOVERY */ + +/* +** The following code executes when a syntax error first occurs. +*/ +static void yy_syntax_error( + yyParser *yypParser, /* The parser */ + int yymajor, /* The major type of the error token */ + ParseTOKENTYPE yyminor /* The minor type of the error token */ +){ + ParseARG_FETCH; +#define TOKEN yyminor +/************ Begin %syntax_error code ****************************************/ +%% +/************ End %syntax_error code ******************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} + +/* +** The following is executed when the parser accepts +*/ +static void yy_accept( + yyParser *yypParser /* The parser */ +){ + ParseARG_FETCH; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt); + } +#endif +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + assert( yypParser->yytos==yypParser->yystack ); + /* Here code is inserted which will be executed whenever the + ** parser accepts */ +/*********** Begin %parse_accept code *****************************************/ +%% +/*********** End %parse_accept code *******************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} + +/* The main parser program. +** The first argument is a pointer to a structure obtained from +** "ParseAlloc" which describes the current state of the parser. +** The second argument is the major token number. The third is +** the minor token. The fourth optional argument is whatever the +** user wants (and specified in the grammar) and is available for +** use by the action routines. +** +** Inputs: +**
      +**
    • A pointer to the parser (an opaque structure.) +**
    • The major token number. +**
    • The minor token number. +**
    • An option argument of a grammar-specified type. +**
    +** +** Outputs: +** None. +*/ +void Parse( + void *yyp, /* The parser */ + int yymajor, /* The major token code number */ + ParseTOKENTYPE yyminor /* The value for the token */ + ParseARG_PDECL /* Optional %extra_argument parameter */ +){ + YYMINORTYPE yyminorunion; + unsigned int yyact; /* The parser action. */ +#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) + int yyendofinput; /* True if we are at the end of input */ +#endif +#ifdef YYERRORSYMBOL + int yyerrorhit = 0; /* True if yymajor has invoked an error */ +#endif + yyParser *yypParser; /* The parser */ + + yypParser = (yyParser*)yyp; + assert( yypParser->yytos!=0 ); +#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) + yyendofinput = (yymajor==0); +#endif + ParseARG_STORE; + +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sInput '%s'\n",yyTracePrompt,yyTokenName[yymajor]); + } +#endif + + do{ + yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor); + if( yyact <= YY_MAX_SHIFTREDUCE ){ + yy_shift(yypParser,yyact,yymajor,yyminor); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt--; +#endif + yymajor = YYNOCODE; + }else if( yyact <= YY_MAX_REDUCE ){ + yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor); + }else{ + assert( yyact == YY_ERROR_ACTION ); + yyminorunion.yy0 = yyminor; +#ifdef YYERRORSYMBOL + int yymx; +#endif +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt); + } +#endif +#ifdef YYERRORSYMBOL + /* A syntax error has occurred. + ** The response to an error depends upon whether or not the + ** grammar defines an error token "ERROR". + ** + ** This is what we do if the grammar does define ERROR: + ** + ** * Call the %syntax_error function. + ** + ** * Begin popping the stack until we enter a state where + ** it is legal to shift the error symbol, then shift + ** the error symbol. + ** + ** * Set the error count to three. + ** + ** * Begin accepting and shifting new tokens. No new error + ** processing will occur until three tokens have been + ** shifted successfully. + ** + */ + if( yypParser->yyerrcnt<0 ){ + yy_syntax_error(yypParser,yymajor,yyminor); + } + yymx = yypParser->yytos->major; + if( yymx==YYERRORSYMBOL || yyerrorhit ){ +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sDiscard input token %s\n", + yyTracePrompt,yyTokenName[yymajor]); + } +#endif + yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); + yymajor = YYNOCODE; + }else{ + while( yypParser->yytos >= yypParser->yystack + && yymx != YYERRORSYMBOL + && (yyact = yy_find_reduce_action( + yypParser->yytos->stateno, + YYERRORSYMBOL)) >= YY_MIN_REDUCE + ){ + yy_pop_parser_stack(yypParser); + } + if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + yy_parse_failed(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + yymajor = YYNOCODE; + }else if( yymx!=YYERRORSYMBOL ){ + yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor); + } + } + yypParser->yyerrcnt = 3; + yyerrorhit = 1; +#elif defined(YYNOERRORRECOVERY) + /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to + ** do any kind of error recovery. Instead, simply invoke the syntax + ** error routine and continue going as if nothing had happened. + ** + ** Applications can set this macro (for example inside %include) if + ** they intend to abandon the parse upon the first syntax error seen. + */ + yy_syntax_error(yypParser,yymajor, yyminor); + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + yymajor = YYNOCODE; + +#else /* YYERRORSYMBOL is not defined */ + /* This is what we do if the grammar does not define ERROR: + ** + ** * Report an error message, and throw away the input token. + ** + ** * If the input token is $, then fail the parse. + ** + ** As before, subsequent error messages are suppressed until + ** three input tokens have been successfully shifted. + */ + if( yypParser->yyerrcnt<=0 ){ + yy_syntax_error(yypParser,yymajor, yyminor); + } + yypParser->yyerrcnt = 3; + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + if( yyendofinput ){ + yy_parse_failed(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + } + yymajor = YYNOCODE; +#endif + } + }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack ); +#ifndef NDEBUG + if( yyTraceFILE ){ + yyStackEntry *i; + char cDiv = '['; + fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt); + for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){ + fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]); + cDiv = ' '; + } + fprintf(yyTraceFILE,"]\n"); + } +#endif + return; +} diff --git a/3rdparty/bx/tools/bin2c/bin2c.cpp b/3rdparty/bx/tools/bin2c/bin2c.cpp index d33d920..6bf8cbf 100644 --- a/3rdparty/bx/tools/bin2c/bin2c.cpp +++ b/3rdparty/bx/tools/bin2c/bin2c.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2017 Branimir Karadzic. All rights reserved. + * Copyright 2011-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ @@ -7,7 +7,7 @@ #include #include -#include +#include #include class Bin2cWriter : public bx::WriterI @@ -23,7 +23,7 @@ public: { } - virtual int32_t write(const void* _data, int32_t _size, bx::Error* /*_err*/ = NULL) BX_OVERRIDE + virtual int32_t write(const void* _data, int32_t _size, bx::Error* /*_err*/ = NULL) override { const char* data = (const char*)_data; m_buffer.insert(m_buffer.end(), data, data+_size); @@ -59,7 +59,7 @@ public: ascii[asciiPos] = '\0'; bx::writePrintf(m_writer, "\t" HEX_DUMP_FORMAT "// %s\n", hex, ascii); data += asciiPos; - hexPos = 0; + hexPos = 0; asciiPos = 0; } } @@ -80,7 +80,6 @@ public: } bx::WriterI* m_writer; - std::string m_filePath; std::string m_name; typedef std::vector Buffer; Buffer m_buffer; @@ -88,18 +87,20 @@ public: void help(const char* _error = NULL) { + bx::WriterI* stdOut = bx::getStdOut(); + if (NULL != _error) { - fprintf(stderr, "Error:\n%s\n\n", _error); + bx::writePrintf(stdOut, "Error:\n%s\n\n", _error); } - fprintf(stderr + bx::writePrintf(stdOut , "bin2c, binary to C\n" - "Copyright 2011-2017 Branimir Karadzic. All rights reserved.\n" + "Copyright 2011-2018 Branimir Karadzic. All rights reserved.\n" "License: https://github.com/bkaradzic/bx#license-bsd-2-clause\n\n" ); - fprintf(stderr + bx::writePrintf(stdOut , "Usage: bin2c -f -o -n \n" "\n" @@ -121,21 +122,21 @@ int main(int _argc, const char* _argv[]) if (cmdLine.hasArg('h', "help") ) { help(); - return EXIT_FAILURE; + return bx::kExitFailure; } const char* filePath = cmdLine.findOption('f'); if (NULL == filePath) { help("Input file name must be specified."); - return EXIT_FAILURE; + return bx::kExitFailure; } const char* outFilePath = cmdLine.findOption('o'); if (NULL == outFilePath) { help("Output file name must be specified."); - return EXIT_FAILURE; + return bx::kExitFailure; } const char* name = cmdLine.findOption('n'); @@ -147,14 +148,16 @@ int main(int _argc, const char* _argv[]) void* data = NULL; uint32_t size = 0; - bx::CrtFileReader fr; + bx::FileReader fr; if (bx::open(&fr, filePath) ) { size = uint32_t(bx::getSize(&fr) ); - data = malloc(size); + + bx::DefaultAllocator allocator; + data = BX_ALLOC(&allocator, size); bx::read(&fr, data, size); - bx::CrtFileWriter fw; + bx::FileWriter fw; if (bx::open(&fw, outFilePath) ) { Bin2cWriter writer(&fw, name); @@ -163,7 +166,7 @@ int main(int _argc, const char* _argv[]) bx::close(&fw); } - free(data); + BX_FREE(&allocator, data); } return 0; diff --git a/3rdparty/bx/tools/lemon/lemon.c b/3rdparty/bx/tools/lemon/lemon.c new file mode 100644 index 0000000..acc5450 --- /dev/null +++ b/3rdparty/bx/tools/lemon/lemon.c @@ -0,0 +1,5466 @@ +/* +** This file contains all sources (including headers) to the LEMON +** LALR(1) parser generator. The sources have been combined into a +** single file to make it easy to include LEMON in the source tree +** and Makefile of another program. +** +** The author of this program disclaims copyright. +*/ +#include +#include +#include +#include +#include +#include + +#define ISSPACE(X) isspace((unsigned char)(X)) +#define ISDIGIT(X) isdigit((unsigned char)(X)) +#define ISALNUM(X) isalnum((unsigned char)(X)) +#define ISALPHA(X) isalpha((unsigned char)(X)) +#define ISUPPER(X) isupper((unsigned char)(X)) +#define ISLOWER(X) islower((unsigned char)(X)) + + +#ifndef __WIN32__ +# if defined(_WIN32) || defined(WIN32) +# define __WIN32__ +# endif +#endif + +#ifdef __WIN32__ +#ifdef __cplusplus +extern "C" { +#endif +extern int access(const char *path, int mode); +#ifdef __cplusplus +} +#endif +#else +#include +#endif + +/* #define PRIVATE static */ +#define PRIVATE + +#ifdef TEST +#define MAXRHS 5 /* Set low to exercise exception code */ +#else +#define MAXRHS 1000 +#endif + +static int showPrecedenceConflict = 0; +static char *msort(char*,char**,int(*)(const char*,const char*)); + +/* +** Compilers are getting increasingly pedantic about type conversions +** as C evolves ever closer to Ada.... To work around the latest problems +** we have to define the following variant of strlen(). +*/ +#define lemonStrlen(X) ((int)strlen(X)) + +/* +** Compilers are starting to complain about the use of sprintf() and strcpy(), +** saying they are unsafe. So we define our own versions of those routines too. +** +** There are three routines here: lemon_sprintf(), lemon_vsprintf(), and +** lemon_addtext(). The first two are replacements for sprintf() and vsprintf(). +** The third is a helper routine for vsnprintf() that adds texts to the end of a +** buffer, making sure the buffer is always zero-terminated. +** +** The string formatter is a minimal subset of stdlib sprintf() supporting only +** a few simply conversions: +** +** %d +** %s +** %.*s +** +*/ +static void lemon_addtext( + char *zBuf, /* The buffer to which text is added */ + int *pnUsed, /* Slots of the buffer used so far */ + const char *zIn, /* Text to add */ + int nIn, /* Bytes of text to add. -1 to use strlen() */ + int iWidth /* Field width. Negative to left justify */ +){ + if( nIn<0 ) for(nIn=0; zIn[nIn]; nIn++){} + while( iWidth>nIn ){ zBuf[(*pnUsed)++] = ' '; iWidth--; } + if( nIn==0 ) return; + memcpy(&zBuf[*pnUsed], zIn, nIn); + *pnUsed += nIn; + while( (-iWidth)>nIn ){ zBuf[(*pnUsed)++] = ' '; iWidth++; } + zBuf[*pnUsed] = 0; +} +static int lemon_vsprintf(char *str, const char *zFormat, va_list ap){ + int i, j, k, c; + int nUsed = 0; + const char *z; + char zTemp[50]; + str[0] = 0; + for(i=j=0; (c = zFormat[i])!=0; i++){ + if( c=='%' ){ + int iWidth = 0; + lemon_addtext(str, &nUsed, &zFormat[j], i-j, 0); + c = zFormat[++i]; + if( ISDIGIT(c) || (c=='-' && ISDIGIT(zFormat[i+1])) ){ + if( c=='-' ) i++; + while( ISDIGIT(zFormat[i]) ) iWidth = iWidth*10 + zFormat[i++] - '0'; + if( c=='-' ) iWidth = -iWidth; + c = zFormat[i]; + } + if( c=='d' ){ + int v = va_arg(ap, int); + if( v<0 ){ + lemon_addtext(str, &nUsed, "-", 1, iWidth); + v = -v; + }else if( v==0 ){ + lemon_addtext(str, &nUsed, "0", 1, iWidth); + } + k = 0; + while( v>0 ){ + k++; + zTemp[sizeof(zTemp)-k] = (v%10) + '0'; + v /= 10; + } + lemon_addtext(str, &nUsed, &zTemp[sizeof(zTemp)-k], k, iWidth); + }else if( c=='s' ){ + z = va_arg(ap, const char*); + lemon_addtext(str, &nUsed, z, -1, iWidth); + }else if( c=='.' && memcmp(&zFormat[i], ".*s", 3)==0 ){ + i += 2; + k = va_arg(ap, int); + z = va_arg(ap, const char*); + lemon_addtext(str, &nUsed, z, k, iWidth); + }else if( c=='%' ){ + lemon_addtext(str, &nUsed, "%", 1, 0); + }else{ + fprintf(stderr, "illegal format\n"); + exit(1); + } + j = i+1; + } + } + lemon_addtext(str, &nUsed, &zFormat[j], i-j, 0); + return nUsed; +} +static int lemon_sprintf(char *str, const char *format, ...){ + va_list ap; + int rc; + va_start(ap, format); + rc = lemon_vsprintf(str, format, ap); + va_end(ap); + return rc; +} +static void lemon_strcpy(char *dest, const char *src){ + while( (*(dest++) = *(src++))!=0 ){} +} +static void lemon_strcat(char *dest, const char *src){ + while( *dest ) dest++; + lemon_strcpy(dest, src); +} + + +/* a few forward declarations... */ +struct rule; +struct lemon; +struct action; + +static struct action *Action_new(void); +static struct action *Action_sort(struct action *); + +/********** From the file "build.h" ************************************/ +void FindRulePrecedences(struct lemon*); +void FindFirstSets(struct lemon*); +void FindStates(struct lemon*); +void FindLinks(struct lemon*); +void FindFollowSets(struct lemon*); +void FindActions(struct lemon*); + +/********* From the file "configlist.h" *********************************/ +void Configlist_init(void); +struct config *Configlist_add(struct rule *, int); +struct config *Configlist_addbasis(struct rule *, int); +void Configlist_closure(struct lemon *); +void Configlist_sort(void); +void Configlist_sortbasis(void); +struct config *Configlist_return(void); +struct config *Configlist_basis(void); +void Configlist_eat(struct config *); +void Configlist_reset(void); + +/********* From the file "error.h" ***************************************/ +void ErrorMsg(const char *, int,const char *, ...); + +/****** From the file "option.h" ******************************************/ +enum option_type { OPT_FLAG=1, OPT_INT, OPT_DBL, OPT_STR, + OPT_FFLAG, OPT_FINT, OPT_FDBL, OPT_FSTR}; +struct s_options { + enum option_type type; + const char *label; + char *arg; + const char *message; +}; +int OptInit(char**,struct s_options*,FILE*); +int OptNArgs(void); +char *OptArg(int); +void OptErr(int); +void OptPrint(void); + +/******** From the file "parse.h" *****************************************/ +void Parse(struct lemon *lemp); + +/********* From the file "plink.h" ***************************************/ +struct plink *Plink_new(void); +void Plink_add(struct plink **, struct config *); +void Plink_copy(struct plink **, struct plink *); +void Plink_delete(struct plink *); + +/********** From the file "report.h" *************************************/ +void Reprint(struct lemon *); +void ReportOutput(struct lemon *); +void ReportTable(struct lemon *, int); +void ReportHeader(struct lemon *); +void CompressTables(struct lemon *); +void ResortStates(struct lemon *); + +/********** From the file "set.h" ****************************************/ +void SetSize(int); /* All sets will be of size N */ +char *SetNew(void); /* A new set for element 0..N */ +void SetFree(char*); /* Deallocate a set */ +int SetAdd(char*,int); /* Add element to a set */ +int SetUnion(char *,char *); /* A <- A U B, thru element N */ +#define SetFind(X,Y) (X[Y]) /* True if Y is in set X */ + +/********** From the file "struct.h" *************************************/ +/* +** Principal data structures for the LEMON parser generator. +*/ + +typedef enum {LEMON_FALSE=0, LEMON_TRUE} Boolean; + +/* Symbols (terminals and nonterminals) of the grammar are stored +** in the following: */ +enum symbol_type { + TERMINAL, + NONTERMINAL, + MULTITERMINAL +}; +enum e_assoc { + LEFT, + RIGHT, + NONE, + UNK +}; +struct symbol { + const char *name; /* Name of the symbol */ + int index; /* Index number for this symbol */ + enum symbol_type type; /* Symbols are all either TERMINALS or NTs */ + struct rule *rule; /* Linked list of rules of this (if an NT) */ + struct symbol *fallback; /* fallback token in case this token doesn't parse */ + int prec; /* Precedence if defined (-1 otherwise) */ + enum e_assoc assoc; /* Associativity if precedence is defined */ + char *firstset; /* First-set for all rules of this symbol */ + Boolean lambda; /* True if NT and can generate an empty string */ + int useCnt; /* Number of times used */ + char *destructor; /* Code which executes whenever this symbol is + ** popped from the stack during error processing */ + int destLineno; /* Line number for start of destructor. Set to + ** -1 for duplicate destructors. */ + char *datatype; /* The data type of information held by this + ** object. Only used if type==NONTERMINAL */ + int dtnum; /* The data type number. In the parser, the value + ** stack is a union. The .yy%d element of this + ** union is the correct data type for this object */ + /* The following fields are used by MULTITERMINALs only */ + int nsubsym; /* Number of constituent symbols in the MULTI */ + struct symbol **subsym; /* Array of constituent symbols */ +}; + +/* Each production rule in the grammar is stored in the following +** structure. */ +struct rule { + struct symbol *lhs; /* Left-hand side of the rule */ + const char *lhsalias; /* Alias for the LHS (NULL if none) */ + int lhsStart; /* True if left-hand side is the start symbol */ + int ruleline; /* Line number for the rule */ + int nrhs; /* Number of RHS symbols */ + struct symbol **rhs; /* The RHS symbols */ + const char **rhsalias; /* An alias for each RHS symbol (NULL if none) */ + int line; /* Line number at which code begins */ + const char *code; /* The code executed when this rule is reduced */ + const char *codePrefix; /* Setup code before code[] above */ + const char *codeSuffix; /* Breakdown code after code[] above */ + int noCode; /* True if this rule has no associated C code */ + int codeEmitted; /* True if the code has been emitted already */ + struct symbol *precsym; /* Precedence symbol for this rule */ + int index; /* An index number for this rule */ + int iRule; /* Rule number as used in the generated tables */ + Boolean canReduce; /* True if this rule is ever reduced */ + Boolean doesReduce; /* Reduce actions occur after optimization */ + struct rule *nextlhs; /* Next rule with the same LHS */ + struct rule *next; /* Next rule in the global list */ +}; + +/* A configuration is a production rule of the grammar together with +** a mark (dot) showing how much of that rule has been processed so far. +** Configurations also contain a follow-set which is a list of terminal +** symbols which are allowed to immediately follow the end of the rule. +** Every configuration is recorded as an instance of the following: */ +enum cfgstatus { + COMPLETE, + INCOMPLETE +}; +struct config { + struct rule *rp; /* The rule upon which the configuration is based */ + int dot; /* The parse point */ + char *fws; /* Follow-set for this configuration only */ + struct plink *fplp; /* Follow-set forward propagation links */ + struct plink *bplp; /* Follow-set backwards propagation links */ + struct state *stp; /* Pointer to state which contains this */ + enum cfgstatus status; /* used during followset and shift computations */ + struct config *next; /* Next configuration in the state */ + struct config *bp; /* The next basis configuration */ +}; + +enum e_action { + SHIFT, + ACCEPT, + REDUCE, + ERROR, + SSCONFLICT, /* A shift/shift conflict */ + SRCONFLICT, /* Was a reduce, but part of a conflict */ + RRCONFLICT, /* Was a reduce, but part of a conflict */ + SH_RESOLVED, /* Was a shift. Precedence resolved conflict */ + RD_RESOLVED, /* Was reduce. Precedence resolved conflict */ + NOT_USED, /* Deleted by compression */ + SHIFTREDUCE /* Shift first, then reduce */ +}; + +/* Every shift or reduce operation is stored as one of the following */ +struct action { + struct symbol *sp; /* The look-ahead symbol */ + enum e_action type; + union { + struct state *stp; /* The new state, if a shift */ + struct rule *rp; /* The rule, if a reduce */ + } x; + struct symbol *spOpt; /* SHIFTREDUCE optimization to this symbol */ + struct action *next; /* Next action for this state */ + struct action *collide; /* Next action with the same hash */ +}; + +/* Each state of the generated parser's finite state machine +** is encoded as an instance of the following structure. */ +struct state { + struct config *bp; /* The basis configurations for this state */ + struct config *cfp; /* All configurations in this set */ + int statenum; /* Sequential number for this state */ + struct action *ap; /* List of actions for this state */ + int nTknAct, nNtAct; /* Number of actions on terminals and nonterminals */ + int iTknOfst, iNtOfst; /* yy_action[] offset for terminals and nonterms */ + int iDfltReduce; /* Default action is to REDUCE by this rule */ + struct rule *pDfltReduce;/* The default REDUCE rule. */ + int autoReduce; /* True if this is an auto-reduce state */ +}; +#define NO_OFFSET (-2147483647) + +/* A followset propagation link indicates that the contents of one +** configuration followset should be propagated to another whenever +** the first changes. */ +struct plink { + struct config *cfp; /* The configuration to which linked */ + struct plink *next; /* The next propagate link */ +}; + +/* The state vector for the entire parser generator is recorded as +** follows. (LEMON uses no global variables and makes little use of +** static variables. Fields in the following structure can be thought +** of as begin global variables in the program.) */ +struct lemon { + struct state **sorted; /* Table of states sorted by state number */ + struct rule *rule; /* List of all rules */ + struct rule *startRule; /* First rule */ + int nstate; /* Number of states */ + int nxstate; /* nstate with tail degenerate states removed */ + int nrule; /* Number of rules */ + int nsymbol; /* Number of terminal and nonterminal symbols */ + int nterminal; /* Number of terminal symbols */ + struct symbol **symbols; /* Sorted array of pointers to symbols */ + int errorcnt; /* Number of errors */ + struct symbol *errsym; /* The error symbol */ + struct symbol *wildcard; /* Token that matches anything */ + char *name; /* Name of the generated parser */ + char *arg; /* Declaration of the 3th argument to parser */ + char *tokentype; /* Type of terminal symbols in the parser stack */ + char *vartype; /* The default type of non-terminal symbols */ + char *start; /* Name of the start symbol for the grammar */ + char *stacksize; /* Size of the parser stack */ + char *include; /* Code to put at the start of the C file */ + char *error; /* Code to execute when an error is seen */ + char *overflow; /* Code to execute on a stack overflow */ + char *failure; /* Code to execute on parser failure */ + char *accept; /* Code to execute when the parser excepts */ + char *extracode; /* Code appended to the generated file */ + char *tokendest; /* Code to execute to destroy token data */ + char *vardest; /* Code for the default non-terminal destructor */ + char *filename; /* Name of the input file */ + char *outname; /* Name of the current output file */ + char *tokenprefix; /* A prefix added to token names in the .h file */ + int nconflict; /* Number of parsing conflicts */ + int nactiontab; /* Number of entries in the yy_action[] table */ + int tablesize; /* Total table size of all tables in bytes */ + int basisflag; /* Print only basis configurations */ + int has_fallback; /* True if any %fallback is seen in the grammar */ + int nolinenosflag; /* True if #line statements should not be printed */ + char *argv0; /* Name of the program */ +}; + +#define MemoryCheck(X) if((X)==0){ \ + extern void memory_error(); \ + memory_error(); \ +} + +/**************** From the file "table.h" *********************************/ +/* +** All code in this file has been automatically generated +** from a specification in the file +** "table.q" +** by the associative array code building program "aagen". +** Do not edit this file! Instead, edit the specification +** file, then rerun aagen. +*/ +/* +** Code for processing tables in the LEMON parser generator. +*/ +/* Routines for handling a strings */ + +const char *Strsafe(const char *); + +void Strsafe_init(void); +int Strsafe_insert(const char *); +const char *Strsafe_find(const char *); + +/* Routines for handling symbols of the grammar */ + +struct symbol *Symbol_new(const char *); +int Symbolcmpp(const void *, const void *); +void Symbol_init(void); +int Symbol_insert(struct symbol *, const char *); +struct symbol *Symbol_find(const char *); +struct symbol *Symbol_Nth(int); +int Symbol_count(void); +struct symbol **Symbol_arrayof(void); + +/* Routines to manage the state table */ + +int Configcmp(const char *, const char *); +struct state *State_new(void); +void State_init(void); +int State_insert(struct state *, struct config *); +struct state *State_find(struct config *); +struct state **State_arrayof(void); + +/* Routines used for efficiency in Configlist_add */ + +void Configtable_init(void); +int Configtable_insert(struct config *); +struct config *Configtable_find(struct config *); +void Configtable_clear(int(*)(struct config *)); + +/****************** From the file "action.c" *******************************/ +/* +** Routines processing parser actions in the LEMON parser generator. +*/ + +/* Allocate a new parser action */ +static struct action *Action_new(void){ + static struct action *freelist = 0; + struct action *newaction; + + if( freelist==0 ){ + int i; + int amt = 100; + freelist = (struct action *)calloc(amt, sizeof(struct action)); + if( freelist==0 ){ + fprintf(stderr,"Unable to allocate memory for a new parser action."); + exit(1); + } + for(i=0; inext; + return newaction; +} + +/* Compare two actions for sorting purposes. Return negative, zero, or +** positive if the first action is less than, equal to, or greater than +** the first +*/ +static int actioncmp( + struct action *ap1, + struct action *ap2 +){ + int rc; + rc = ap1->sp->index - ap2->sp->index; + if( rc==0 ){ + rc = (int)ap1->type - (int)ap2->type; + } + if( rc==0 && (ap1->type==REDUCE || ap1->type==SHIFTREDUCE) ){ + rc = ap1->x.rp->index - ap2->x.rp->index; + } + if( rc==0 ){ + rc = (int) (ap2 - ap1); + } + return rc; +} + +/* Sort parser actions */ +static struct action *Action_sort( + struct action *ap +){ + ap = (struct action *)msort((char *)ap,(char **)&ap->next, + (int(*)(const char*,const char*))actioncmp); + return ap; +} + +void Action_add( + struct action **app, + enum e_action type, + struct symbol *sp, + char *arg +){ + struct action *newaction; + newaction = Action_new(); + newaction->next = *app; + *app = newaction; + newaction->type = type; + newaction->sp = sp; + newaction->spOpt = 0; + if( type==SHIFT ){ + newaction->x.stp = (struct state *)arg; + }else{ + newaction->x.rp = (struct rule *)arg; + } +} +/********************** New code to implement the "acttab" module ***********/ +/* +** This module implements routines use to construct the yy_action[] table. +*/ + +/* +** The state of the yy_action table under construction is an instance of +** the following structure. +** +** The yy_action table maps the pair (state_number, lookahead) into an +** action_number. The table is an array of integers pairs. The state_number +** determines an initial offset into the yy_action array. The lookahead +** value is then added to this initial offset to get an index X into the +** yy_action array. If the aAction[X].lookahead equals the value of the +** of the lookahead input, then the value of the action_number output is +** aAction[X].action. If the lookaheads do not match then the +** default action for the state_number is returned. +** +** All actions associated with a single state_number are first entered +** into aLookahead[] using multiple calls to acttab_action(). Then the +** actions for that single state_number are placed into the aAction[] +** array with a single call to acttab_insert(). The acttab_insert() call +** also resets the aLookahead[] array in preparation for the next +** state number. +*/ +struct lookahead_action { + int lookahead; /* Value of the lookahead token */ + int action; /* Action to take on the given lookahead */ +}; +typedef struct acttab acttab; +struct acttab { + int nAction; /* Number of used slots in aAction[] */ + int nActionAlloc; /* Slots allocated for aAction[] */ + struct lookahead_action + *aAction, /* The yy_action[] table under construction */ + *aLookahead; /* A single new transaction set */ + int mnLookahead; /* Minimum aLookahead[].lookahead */ + int mnAction; /* Action associated with mnLookahead */ + int mxLookahead; /* Maximum aLookahead[].lookahead */ + int nLookahead; /* Used slots in aLookahead[] */ + int nLookaheadAlloc; /* Slots allocated in aLookahead[] */ +}; + +/* Return the number of entries in the yy_action table */ +#define acttab_size(X) ((X)->nAction) + +/* The value for the N-th entry in yy_action */ +#define acttab_yyaction(X,N) ((X)->aAction[N].action) + +/* The value for the N-th entry in yy_lookahead */ +#define acttab_yylookahead(X,N) ((X)->aAction[N].lookahead) + +/* Free all memory associated with the given acttab */ +void acttab_free(acttab *p){ + free( p->aAction ); + free( p->aLookahead ); + free( p ); +} + +/* Allocate a new acttab structure */ +acttab *acttab_alloc(void){ + acttab *p = (acttab *) calloc( 1, sizeof(*p) ); + if( p==0 ){ + fprintf(stderr,"Unable to allocate memory for a new acttab."); + exit(1); + } + memset(p, 0, sizeof(*p)); + return p; +} + +/* Add a new action to the current transaction set. +** +** This routine is called once for each lookahead for a particular +** state. +*/ +void acttab_action(acttab *p, int lookahead, int action){ + if( p->nLookahead>=p->nLookaheadAlloc ){ + p->nLookaheadAlloc += 25; + p->aLookahead = (struct lookahead_action *) realloc( p->aLookahead, + sizeof(p->aLookahead[0])*p->nLookaheadAlloc ); + if( p->aLookahead==0 ){ + fprintf(stderr,"malloc failed\n"); + exit(1); + } + } + if( p->nLookahead==0 ){ + p->mxLookahead = lookahead; + p->mnLookahead = lookahead; + p->mnAction = action; + }else{ + if( p->mxLookaheadmxLookahead = lookahead; + if( p->mnLookahead>lookahead ){ + p->mnLookahead = lookahead; + p->mnAction = action; + } + } + p->aLookahead[p->nLookahead].lookahead = lookahead; + p->aLookahead[p->nLookahead].action = action; + p->nLookahead++; +} + +/* +** Add the transaction set built up with prior calls to acttab_action() +** into the current action table. Then reset the transaction set back +** to an empty set in preparation for a new round of acttab_action() calls. +** +** Return the offset into the action table of the new transaction. +*/ +int acttab_insert(acttab *p){ + int i, j, k, n; + assert( p->nLookahead>0 ); + + /* Make sure we have enough space to hold the expanded action table + ** in the worst case. The worst case occurs if the transaction set + ** must be appended to the current action table + */ + n = p->mxLookahead + 1; + if( p->nAction + n >= p->nActionAlloc ){ + int oldAlloc = p->nActionAlloc; + p->nActionAlloc = p->nAction + n + p->nActionAlloc + 20; + p->aAction = (struct lookahead_action *) realloc( p->aAction, + sizeof(p->aAction[0])*p->nActionAlloc); + if( p->aAction==0 ){ + fprintf(stderr,"malloc failed\n"); + exit(1); + } + for(i=oldAlloc; inActionAlloc; i++){ + p->aAction[i].lookahead = -1; + p->aAction[i].action = -1; + } + } + + /* Scan the existing action table looking for an offset that is a + ** duplicate of the current transaction set. Fall out of the loop + ** if and when the duplicate is found. + ** + ** i is the index in p->aAction[] where p->mnLookahead is inserted. + */ + for(i=p->nAction-1; i>=0; i--){ + if( p->aAction[i].lookahead==p->mnLookahead ){ + /* All lookaheads and actions in the aLookahead[] transaction + ** must match against the candidate aAction[i] entry. */ + if( p->aAction[i].action!=p->mnAction ) continue; + for(j=0; jnLookahead; j++){ + k = p->aLookahead[j].lookahead - p->mnLookahead + i; + if( k<0 || k>=p->nAction ) break; + if( p->aLookahead[j].lookahead!=p->aAction[k].lookahead ) break; + if( p->aLookahead[j].action!=p->aAction[k].action ) break; + } + if( jnLookahead ) continue; + + /* No possible lookahead value that is not in the aLookahead[] + ** transaction is allowed to match aAction[i] */ + n = 0; + for(j=0; jnAction; j++){ + if( p->aAction[j].lookahead<0 ) continue; + if( p->aAction[j].lookahead==j+p->mnLookahead-i ) n++; + } + if( n==p->nLookahead ){ + break; /* An exact match is found at offset i */ + } + } + } + + /* If no existing offsets exactly match the current transaction, find an + ** an empty offset in the aAction[] table in which we can add the + ** aLookahead[] transaction. + */ + if( i<0 ){ + /* Look for holes in the aAction[] table that fit the current + ** aLookahead[] transaction. Leave i set to the offset of the hole. + ** If no holes are found, i is left at p->nAction, which means the + ** transaction will be appended. */ + for(i=0; inActionAlloc - p->mxLookahead; i++){ + if( p->aAction[i].lookahead<0 ){ + for(j=0; jnLookahead; j++){ + k = p->aLookahead[j].lookahead - p->mnLookahead + i; + if( k<0 ) break; + if( p->aAction[k].lookahead>=0 ) break; + } + if( jnLookahead ) continue; + for(j=0; jnAction; j++){ + if( p->aAction[j].lookahead==j+p->mnLookahead-i ) break; + } + if( j==p->nAction ){ + break; /* Fits in empty slots */ + } + } + } + } + /* Insert transaction set at index i. */ + for(j=0; jnLookahead; j++){ + k = p->aLookahead[j].lookahead - p->mnLookahead + i; + p->aAction[k] = p->aLookahead[j]; + if( k>=p->nAction ) p->nAction = k+1; + } + p->nLookahead = 0; + + /* Return the offset that is added to the lookahead in order to get the + ** index into yy_action of the action */ + return i - p->mnLookahead; +} + +/********************** From the file "build.c" *****************************/ +/* +** Routines to construction the finite state machine for the LEMON +** parser generator. +*/ + +/* Find a precedence symbol of every rule in the grammar. +** +** Those rules which have a precedence symbol coded in the input +** grammar using the "[symbol]" construct will already have the +** rp->precsym field filled. Other rules take as their precedence +** symbol the first RHS symbol with a defined precedence. If there +** are not RHS symbols with a defined precedence, the precedence +** symbol field is left blank. +*/ +void FindRulePrecedences(struct lemon *xp) +{ + struct rule *rp; + for(rp=xp->rule; rp; rp=rp->next){ + if( rp->precsym==0 ){ + int i, j; + for(i=0; inrhs && rp->precsym==0; i++){ + struct symbol *sp = rp->rhs[i]; + if( sp->type==MULTITERMINAL ){ + for(j=0; jnsubsym; j++){ + if( sp->subsym[j]->prec>=0 ){ + rp->precsym = sp->subsym[j]; + break; + } + } + }else if( sp->prec>=0 ){ + rp->precsym = rp->rhs[i]; + } + } + } + } + return; +} + +/* Find all nonterminals which will generate the empty string. +** Then go back and compute the first sets of every nonterminal. +** The first set is the set of all terminal symbols which can begin +** a string generated by that nonterminal. +*/ +void FindFirstSets(struct lemon *lemp) +{ + int i, j; + struct rule *rp; + int progress; + + for(i=0; insymbol; i++){ + lemp->symbols[i]->lambda = LEMON_FALSE; + } + for(i=lemp->nterminal; insymbol; i++){ + lemp->symbols[i]->firstset = SetNew(); + } + + /* First compute all lambdas */ + do{ + progress = 0; + for(rp=lemp->rule; rp; rp=rp->next){ + if( rp->lhs->lambda ) continue; + for(i=0; inrhs; i++){ + struct symbol *sp = rp->rhs[i]; + assert( sp->type==NONTERMINAL || sp->lambda==LEMON_FALSE ); + if( sp->lambda==LEMON_FALSE ) break; + } + if( i==rp->nrhs ){ + rp->lhs->lambda = LEMON_TRUE; + progress = 1; + } + } + }while( progress ); + + /* Now compute all first sets */ + do{ + struct symbol *s1, *s2; + progress = 0; + for(rp=lemp->rule; rp; rp=rp->next){ + s1 = rp->lhs; + for(i=0; inrhs; i++){ + s2 = rp->rhs[i]; + if( s2->type==TERMINAL ){ + progress += SetAdd(s1->firstset,s2->index); + break; + }else if( s2->type==MULTITERMINAL ){ + for(j=0; jnsubsym; j++){ + progress += SetAdd(s1->firstset,s2->subsym[j]->index); + } + break; + }else if( s1==s2 ){ + if( s1->lambda==LEMON_FALSE ) break; + }else{ + progress += SetUnion(s1->firstset,s2->firstset); + if( s2->lambda==LEMON_FALSE ) break; + } + } + } + }while( progress ); + return; +} + +/* Compute all LR(0) states for the grammar. Links +** are added to between some states so that the LR(1) follow sets +** can be computed later. +*/ +PRIVATE struct state *getstate(struct lemon *); /* forward reference */ +void FindStates(struct lemon *lemp) +{ + struct symbol *sp; + struct rule *rp; + + Configlist_init(); + + /* Find the start symbol */ + if( lemp->start ){ + sp = Symbol_find(lemp->start); + if( sp==0 ){ + ErrorMsg(lemp->filename,0, +"The specified start symbol \"%s\" is not \ +in a nonterminal of the grammar. \"%s\" will be used as the start \ +symbol instead.",lemp->start,lemp->startRule->lhs->name); + lemp->errorcnt++; + sp = lemp->startRule->lhs; + } + }else{ + sp = lemp->startRule->lhs; + } + + /* Make sure the start symbol doesn't occur on the right-hand side of + ** any rule. Report an error if it does. (YACC would generate a new + ** start symbol in this case.) */ + for(rp=lemp->rule; rp; rp=rp->next){ + int i; + for(i=0; inrhs; i++){ + if( rp->rhs[i]==sp ){ /* FIX ME: Deal with multiterminals */ + ErrorMsg(lemp->filename,0, +"The start symbol \"%s\" occurs on the \ +right-hand side of a rule. This will result in a parser which \ +does not work properly.",sp->name); + lemp->errorcnt++; + } + } + } + + /* The basis configuration set for the first state + ** is all rules which have the start symbol as their + ** left-hand side */ + for(rp=sp->rule; rp; rp=rp->nextlhs){ + struct config *newcfp; + rp->lhsStart = 1; + newcfp = Configlist_addbasis(rp,0); + SetAdd(newcfp->fws,0); + } + + /* Compute the first state. All other states will be + ** computed automatically during the computation of the first one. + ** The returned pointer to the first state is not used. */ + (void)getstate(lemp); + return; +} + +/* Return a pointer to a state which is described by the configuration +** list which has been built from calls to Configlist_add. +*/ +PRIVATE void buildshifts(struct lemon *, struct state *); /* Forwd ref */ +PRIVATE struct state *getstate(struct lemon *lemp) +{ + struct config *cfp, *bp; + struct state *stp; + + /* Extract the sorted basis of the new state. The basis was constructed + ** by prior calls to "Configlist_addbasis()". */ + Configlist_sortbasis(); + bp = Configlist_basis(); + + /* Get a state with the same basis */ + stp = State_find(bp); + if( stp ){ + /* A state with the same basis already exists! Copy all the follow-set + ** propagation links from the state under construction into the + ** preexisting state, then return a pointer to the preexisting state */ + struct config *x, *y; + for(x=bp, y=stp->bp; x && y; x=x->bp, y=y->bp){ + Plink_copy(&y->bplp,x->bplp); + Plink_delete(x->fplp); + x->fplp = x->bplp = 0; + } + cfp = Configlist_return(); + Configlist_eat(cfp); + }else{ + /* This really is a new state. Construct all the details */ + Configlist_closure(lemp); /* Compute the configuration closure */ + Configlist_sort(); /* Sort the configuration closure */ + cfp = Configlist_return(); /* Get a pointer to the config list */ + stp = State_new(); /* A new state structure */ + MemoryCheck(stp); + stp->bp = bp; /* Remember the configuration basis */ + stp->cfp = cfp; /* Remember the configuration closure */ + stp->statenum = lemp->nstate++; /* Every state gets a sequence number */ + stp->ap = 0; /* No actions, yet. */ + State_insert(stp,stp->bp); /* Add to the state table */ + buildshifts(lemp,stp); /* Recursively compute successor states */ + } + return stp; +} + +/* +** Return true if two symbols are the same. +*/ +int same_symbol(struct symbol *a, struct symbol *b) +{ + int i; + if( a==b ) return 1; + if( a->type!=MULTITERMINAL ) return 0; + if( b->type!=MULTITERMINAL ) return 0; + if( a->nsubsym!=b->nsubsym ) return 0; + for(i=0; insubsym; i++){ + if( a->subsym[i]!=b->subsym[i] ) return 0; + } + return 1; +} + +/* Construct all successor states to the given state. A "successor" +** state is any state which can be reached by a shift action. +*/ +PRIVATE void buildshifts(struct lemon *lemp, struct state *stp) +{ + struct config *cfp; /* For looping thru the config closure of "stp" */ + struct config *bcfp; /* For the inner loop on config closure of "stp" */ + struct config *newcfg; /* */ + struct symbol *sp; /* Symbol following the dot in configuration "cfp" */ + struct symbol *bsp; /* Symbol following the dot in configuration "bcfp" */ + struct state *newstp; /* A pointer to a successor state */ + + /* Each configuration becomes complete after it contibutes to a successor + ** state. Initially, all configurations are incomplete */ + for(cfp=stp->cfp; cfp; cfp=cfp->next) cfp->status = INCOMPLETE; + + /* Loop through all configurations of the state "stp" */ + for(cfp=stp->cfp; cfp; cfp=cfp->next){ + if( cfp->status==COMPLETE ) continue; /* Already used by inner loop */ + if( cfp->dot>=cfp->rp->nrhs ) continue; /* Can't shift this config */ + Configlist_reset(); /* Reset the new config set */ + sp = cfp->rp->rhs[cfp->dot]; /* Symbol after the dot */ + + /* For every configuration in the state "stp" which has the symbol "sp" + ** following its dot, add the same configuration to the basis set under + ** construction but with the dot shifted one symbol to the right. */ + for(bcfp=cfp; bcfp; bcfp=bcfp->next){ + if( bcfp->status==COMPLETE ) continue; /* Already used */ + if( bcfp->dot>=bcfp->rp->nrhs ) continue; /* Can't shift this one */ + bsp = bcfp->rp->rhs[bcfp->dot]; /* Get symbol after dot */ + if( !same_symbol(bsp,sp) ) continue; /* Must be same as for "cfp" */ + bcfp->status = COMPLETE; /* Mark this config as used */ + newcfg = Configlist_addbasis(bcfp->rp,bcfp->dot+1); + Plink_add(&newcfg->bplp,bcfp); + } + + /* Get a pointer to the state described by the basis configuration set + ** constructed in the preceding loop */ + newstp = getstate(lemp); + + /* The state "newstp" is reached from the state "stp" by a shift action + ** on the symbol "sp" */ + if( sp->type==MULTITERMINAL ){ + int i; + for(i=0; insubsym; i++){ + Action_add(&stp->ap,SHIFT,sp->subsym[i],(char*)newstp); + } + }else{ + Action_add(&stp->ap,SHIFT,sp,(char *)newstp); + } + } +} + +/* +** Construct the propagation links +*/ +void FindLinks(struct lemon *lemp) +{ + int i; + struct config *cfp, *other; + struct state *stp; + struct plink *plp; + + /* Housekeeping detail: + ** Add to every propagate link a pointer back to the state to + ** which the link is attached. */ + for(i=0; instate; i++){ + stp = lemp->sorted[i]; + for(cfp=stp->cfp; cfp; cfp=cfp->next){ + cfp->stp = stp; + } + } + + /* Convert all backlinks into forward links. Only the forward + ** links are used in the follow-set computation. */ + for(i=0; instate; i++){ + stp = lemp->sorted[i]; + for(cfp=stp->cfp; cfp; cfp=cfp->next){ + for(plp=cfp->bplp; plp; plp=plp->next){ + other = plp->cfp; + Plink_add(&other->fplp,cfp); + } + } + } +} + +/* Compute all followsets. +** +** A followset is the set of all symbols which can come immediately +** after a configuration. +*/ +void FindFollowSets(struct lemon *lemp) +{ + int i; + struct config *cfp; + struct plink *plp; + int progress; + int change; + + for(i=0; instate; i++){ + for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){ + cfp->status = INCOMPLETE; + } + } + + do{ + progress = 0; + for(i=0; instate; i++){ + for(cfp=lemp->sorted[i]->cfp; cfp; cfp=cfp->next){ + if( cfp->status==COMPLETE ) continue; + for(plp=cfp->fplp; plp; plp=plp->next){ + change = SetUnion(plp->cfp->fws,cfp->fws); + if( change ){ + plp->cfp->status = INCOMPLETE; + progress = 1; + } + } + cfp->status = COMPLETE; + } + } + }while( progress ); +} + +static int resolve_conflict(struct action *,struct action *); + +/* Compute the reduce actions, and resolve conflicts. +*/ +void FindActions(struct lemon *lemp) +{ + int i,j; + struct config *cfp; + struct state *stp; + struct symbol *sp; + struct rule *rp; + + /* Add all of the reduce actions + ** A reduce action is added for each element of the followset of + ** a configuration which has its dot at the extreme right. + */ + for(i=0; instate; i++){ /* Loop over all states */ + stp = lemp->sorted[i]; + for(cfp=stp->cfp; cfp; cfp=cfp->next){ /* Loop over all configurations */ + if( cfp->rp->nrhs==cfp->dot ){ /* Is dot at extreme right? */ + for(j=0; jnterminal; j++){ + if( SetFind(cfp->fws,j) ){ + /* Add a reduce action to the state "stp" which will reduce by the + ** rule "cfp->rp" if the lookahead symbol is "lemp->symbols[j]" */ + Action_add(&stp->ap,REDUCE,lemp->symbols[j],(char *)cfp->rp); + } + } + } + } + } + + /* Add the accepting token */ + if( lemp->start ){ + sp = Symbol_find(lemp->start); + if( sp==0 ) sp = lemp->startRule->lhs; + }else{ + sp = lemp->startRule->lhs; + } + /* Add to the first state (which is always the starting state of the + ** finite state machine) an action to ACCEPT if the lookahead is the + ** start nonterminal. */ + Action_add(&lemp->sorted[0]->ap,ACCEPT,sp,0); + + /* Resolve conflicts */ + for(i=0; instate; i++){ + struct action *ap, *nap; + stp = lemp->sorted[i]; + /* assert( stp->ap ); */ + stp->ap = Action_sort(stp->ap); + for(ap=stp->ap; ap && ap->next; ap=ap->next){ + for(nap=ap->next; nap && nap->sp==ap->sp; nap=nap->next){ + /* The two actions "ap" and "nap" have the same lookahead. + ** Figure out which one should be used */ + lemp->nconflict += resolve_conflict(ap,nap); + } + } + } + + /* Report an error for each rule that can never be reduced. */ + for(rp=lemp->rule; rp; rp=rp->next) rp->canReduce = LEMON_FALSE; + for(i=0; instate; i++){ + struct action *ap; + for(ap=lemp->sorted[i]->ap; ap; ap=ap->next){ + if( ap->type==REDUCE ) ap->x.rp->canReduce = LEMON_TRUE; + } + } + for(rp=lemp->rule; rp; rp=rp->next){ + if( rp->canReduce ) continue; + ErrorMsg(lemp->filename,rp->ruleline,"This rule can not be reduced.\n"); + lemp->errorcnt++; + } +} + +/* Resolve a conflict between the two given actions. If the +** conflict can't be resolved, return non-zero. +** +** NO LONGER TRUE: +** To resolve a conflict, first look to see if either action +** is on an error rule. In that case, take the action which +** is not associated with the error rule. If neither or both +** actions are associated with an error rule, then try to +** use precedence to resolve the conflict. +** +** If either action is a SHIFT, then it must be apx. This +** function won't work if apx->type==REDUCE and apy->type==SHIFT. +*/ +static int resolve_conflict( + struct action *apx, + struct action *apy +){ + struct symbol *spx, *spy; + int errcnt = 0; + assert( apx->sp==apy->sp ); /* Otherwise there would be no conflict */ + if( apx->type==SHIFT && apy->type==SHIFT ){ + apy->type = SSCONFLICT; + errcnt++; + } + if( apx->type==SHIFT && apy->type==REDUCE ){ + spx = apx->sp; + spy = apy->x.rp->precsym; + if( spy==0 || spx->prec<0 || spy->prec<0 ){ + /* Not enough precedence information. */ + apy->type = SRCONFLICT; + errcnt++; + }else if( spx->prec>spy->prec ){ /* higher precedence wins */ + apy->type = RD_RESOLVED; + }else if( spx->precprec ){ + apx->type = SH_RESOLVED; + }else if( spx->prec==spy->prec && spx->assoc==RIGHT ){ /* Use operator */ + apy->type = RD_RESOLVED; /* associativity */ + }else if( spx->prec==spy->prec && spx->assoc==LEFT ){ /* to break tie */ + apx->type = SH_RESOLVED; + }else{ + assert( spx->prec==spy->prec && spx->assoc==NONE ); + apx->type = ERROR; + } + }else if( apx->type==REDUCE && apy->type==REDUCE ){ + spx = apx->x.rp->precsym; + spy = apy->x.rp->precsym; + if( spx==0 || spy==0 || spx->prec<0 || + spy->prec<0 || spx->prec==spy->prec ){ + apy->type = RRCONFLICT; + errcnt++; + }else if( spx->prec>spy->prec ){ + apy->type = RD_RESOLVED; + }else if( spx->precprec ){ + apx->type = RD_RESOLVED; + } + }else{ + assert( + apx->type==SH_RESOLVED || + apx->type==RD_RESOLVED || + apx->type==SSCONFLICT || + apx->type==SRCONFLICT || + apx->type==RRCONFLICT || + apy->type==SH_RESOLVED || + apy->type==RD_RESOLVED || + apy->type==SSCONFLICT || + apy->type==SRCONFLICT || + apy->type==RRCONFLICT + ); + /* The REDUCE/SHIFT case cannot happen because SHIFTs come before + ** REDUCEs on the list. If we reach this point it must be because + ** the parser conflict had already been resolved. */ + } + return errcnt; +} +/********************* From the file "configlist.c" *************************/ +/* +** Routines to processing a configuration list and building a state +** in the LEMON parser generator. +*/ + +static struct config *freelist = 0; /* List of free configurations */ +static struct config *current = 0; /* Top of list of configurations */ +static struct config **currentend = 0; /* Last on list of configs */ +static struct config *basis = 0; /* Top of list of basis configs */ +static struct config **basisend = 0; /* End of list of basis configs */ + +/* Return a pointer to a new configuration */ +PRIVATE struct config *newconfig(void){ + struct config *newcfg; + if( freelist==0 ){ + int i; + int amt = 3; + freelist = (struct config *)calloc( amt, sizeof(struct config) ); + if( freelist==0 ){ + fprintf(stderr,"Unable to allocate memory for a new configuration."); + exit(1); + } + for(i=0; inext; + return newcfg; +} + +/* The configuration "old" is no longer used */ +PRIVATE void deleteconfig(struct config *old) +{ + old->next = freelist; + freelist = old; +} + +/* Initialized the configuration list builder */ +void Configlist_init(void){ + current = 0; + currentend = ¤t; + basis = 0; + basisend = &basis; + Configtable_init(); + return; +} + +/* Initialized the configuration list builder */ +void Configlist_reset(void){ + current = 0; + currentend = ¤t; + basis = 0; + basisend = &basis; + Configtable_clear(0); + return; +} + +/* Add another configuration to the configuration list */ +struct config *Configlist_add( + struct rule *rp, /* The rule */ + int dot /* Index into the RHS of the rule where the dot goes */ +){ + struct config *cfp, model; + + assert( currentend!=0 ); + model.rp = rp; + model.dot = dot; + cfp = Configtable_find(&model); + if( cfp==0 ){ + cfp = newconfig(); + cfp->rp = rp; + cfp->dot = dot; + cfp->fws = SetNew(); + cfp->stp = 0; + cfp->fplp = cfp->bplp = 0; + cfp->next = 0; + cfp->bp = 0; + *currentend = cfp; + currentend = &cfp->next; + Configtable_insert(cfp); + } + return cfp; +} + +/* Add a basis configuration to the configuration list */ +struct config *Configlist_addbasis(struct rule *rp, int dot) +{ + struct config *cfp, model; + + assert( basisend!=0 ); + assert( currentend!=0 ); + model.rp = rp; + model.dot = dot; + cfp = Configtable_find(&model); + if( cfp==0 ){ + cfp = newconfig(); + cfp->rp = rp; + cfp->dot = dot; + cfp->fws = SetNew(); + cfp->stp = 0; + cfp->fplp = cfp->bplp = 0; + cfp->next = 0; + cfp->bp = 0; + *currentend = cfp; + currentend = &cfp->next; + *basisend = cfp; + basisend = &cfp->bp; + Configtable_insert(cfp); + } + return cfp; +} + +/* Compute the closure of the configuration list */ +void Configlist_closure(struct lemon *lemp) +{ + struct config *cfp, *newcfp; + struct rule *rp, *newrp; + struct symbol *sp, *xsp; + int i, dot; + + assert( currentend!=0 ); + for(cfp=current; cfp; cfp=cfp->next){ + rp = cfp->rp; + dot = cfp->dot; + if( dot>=rp->nrhs ) continue; + sp = rp->rhs[dot]; + if( sp->type==NONTERMINAL ){ + if( sp->rule==0 && sp!=lemp->errsym ){ + ErrorMsg(lemp->filename,rp->line,"Nonterminal \"%s\" has no rules.", + sp->name); + lemp->errorcnt++; + } + for(newrp=sp->rule; newrp; newrp=newrp->nextlhs){ + newcfp = Configlist_add(newrp,0); + for(i=dot+1; inrhs; i++){ + xsp = rp->rhs[i]; + if( xsp->type==TERMINAL ){ + SetAdd(newcfp->fws,xsp->index); + break; + }else if( xsp->type==MULTITERMINAL ){ + int k; + for(k=0; knsubsym; k++){ + SetAdd(newcfp->fws, xsp->subsym[k]->index); + } + break; + }else{ + SetUnion(newcfp->fws,xsp->firstset); + if( xsp->lambda==LEMON_FALSE ) break; + } + } + if( i==rp->nrhs ) Plink_add(&cfp->fplp,newcfp); + } + } + } + return; +} + +/* Sort the configuration list */ +void Configlist_sort(void){ + current = (struct config*)msort((char*)current,(char**)&(current->next), + Configcmp); + currentend = 0; + return; +} + +/* Sort the basis configuration list */ +void Configlist_sortbasis(void){ + basis = (struct config*)msort((char*)current,(char**)&(current->bp), + Configcmp); + basisend = 0; + return; +} + +/* Return a pointer to the head of the configuration list and +** reset the list */ +struct config *Configlist_return(void){ + struct config *old; + old = current; + current = 0; + currentend = 0; + return old; +} + +/* Return a pointer to the head of the configuration list and +** reset the list */ +struct config *Configlist_basis(void){ + struct config *old; + old = basis; + basis = 0; + basisend = 0; + return old; +} + +/* Free all elements of the given configuration list */ +void Configlist_eat(struct config *cfp) +{ + struct config *nextcfp; + for(; cfp; cfp=nextcfp){ + nextcfp = cfp->next; + assert( cfp->fplp==0 ); + assert( cfp->bplp==0 ); + if( cfp->fws ) SetFree(cfp->fws); + deleteconfig(cfp); + } + return; +} +/***************** From the file "error.c" *********************************/ +/* +** Code for printing error message. +*/ + +void ErrorMsg(const char *filename, int lineno, const char *format, ...){ + va_list ap; + fprintf(stderr, "%s:%d: ", filename, lineno); + va_start(ap, format); + vfprintf(stderr,format,ap); + va_end(ap); + fprintf(stderr, "\n"); +} +/**************** From the file "main.c" ************************************/ +/* +** Main program file for the LEMON parser generator. +*/ + +/* Report an out-of-memory condition and abort. This function +** is used mostly by the "MemoryCheck" macro in struct.h +*/ +void memory_error(void){ + fprintf(stderr,"Out of memory. Aborting...\n"); + exit(1); +} + +static int nDefine = 0; /* Number of -D options on the command line */ +static char **azDefine = 0; /* Name of the -D macros */ + +/* This routine is called with the argument to each -D command-line option. +** Add the macro defined to the azDefine array. +*/ +static void handle_D_option(char *z){ + char **paz; + nDefine++; + azDefine = (char **) realloc(azDefine, sizeof(azDefine[0])*nDefine); + if( azDefine==0 ){ + fprintf(stderr,"out of memory\n"); + exit(1); + } + paz = &azDefine[nDefine-1]; + *paz = (char *) malloc( lemonStrlen(z)+1 ); + if( *paz==0 ){ + fprintf(stderr,"out of memory\n"); + exit(1); + } + lemon_strcpy(*paz, z); + for(z=*paz; *z && *z!='='; z++){} + *z = 0; +} + +static char *user_templatename = NULL; +static void handle_T_option(char *z){ + user_templatename = (char *) malloc( lemonStrlen(z)+1 ); + if( user_templatename==0 ){ + memory_error(); + } + lemon_strcpy(user_templatename, z); +} + +/* Merge together to lists of rules ordered by rule.iRule */ +static struct rule *Rule_merge(struct rule *pA, struct rule *pB){ + struct rule *pFirst = 0; + struct rule **ppPrev = &pFirst; + while( pA && pB ){ + if( pA->iRuleiRule ){ + *ppPrev = pA; + ppPrev = &pA->next; + pA = pA->next; + }else{ + *ppPrev = pB; + ppPrev = &pB->next; + pB = pB->next; + } + } + if( pA ){ + *ppPrev = pA; + }else{ + *ppPrev = pB; + } + return pFirst; +} + +/* +** Sort a list of rules in order of increasing iRule value +*/ +static struct rule *Rule_sort(struct rule *rp){ + int i; + struct rule *pNext; + struct rule *x[32]; + memset(x, 0, sizeof(x)); + while( rp ){ + pNext = rp->next; + rp->next = 0; + for(i=0; iuseCnt = 0; + + /* Parse the input file */ + Parse(&lem); + if( lem.errorcnt ) exit(lem.errorcnt); + if( lem.nrule==0 ){ + fprintf(stderr,"Empty grammar.\n"); + exit(1); + } + + /* Count and index the symbols of the grammar */ + Symbol_new("{default}"); + lem.nsymbol = Symbol_count(); + lem.symbols = Symbol_arrayof(); + for(i=0; iindex = i; + qsort(lem.symbols,lem.nsymbol,sizeof(struct symbol*), Symbolcmpp); + for(i=0; iindex = i; + while( lem.symbols[i-1]->type==MULTITERMINAL ){ i--; } + assert( strcmp(lem.symbols[i-1]->name,"{default}")==0 ); + lem.nsymbol = i - 1; + for(i=1; ISUPPER(lem.symbols[i]->name[0]); i++); + lem.nterminal = i; + + /* Assign sequential rule numbers. Start with 0. Put rules that have no + ** reduce action C-code associated with them last, so that the switch() + ** statement that selects reduction actions will have a smaller jump table. + */ + for(i=0, rp=lem.rule; rp; rp=rp->next){ + rp->iRule = rp->code ? i++ : -1; + } + for(rp=lem.rule; rp; rp=rp->next){ + if( rp->iRule<0 ) rp->iRule = i++; + } + lem.startRule = lem.rule; + lem.rule = Rule_sort(lem.rule); + + /* Generate a reprint of the grammar, if requested on the command line */ + if( rpflag ){ + Reprint(&lem); + }else{ + /* Initialize the size for all follow and first sets */ + SetSize(lem.nterminal+1); + + /* Find the precedence for every production rule (that has one) */ + FindRulePrecedences(&lem); + + /* Compute the lambda-nonterminals and the first-sets for every + ** nonterminal */ + FindFirstSets(&lem); + + /* Compute all LR(0) states. Also record follow-set propagation + ** links so that the follow-set can be computed later */ + lem.nstate = 0; + FindStates(&lem); + lem.sorted = State_arrayof(); + + /* Tie up loose ends on the propagation links */ + FindLinks(&lem); + + /* Compute the follow set of every reducible configuration */ + FindFollowSets(&lem); + + /* Compute the action tables */ + FindActions(&lem); + + /* Compress the action tables */ + if( compress==0 ) CompressTables(&lem); + + /* Reorder and renumber the states so that states with fewer choices + ** occur at the end. This is an optimization that helps make the + ** generated parser tables smaller. */ + if( noResort==0 ) ResortStates(&lem); + + /* Generate a report of the parser generated. (the "y.output" file) */ + if( !quiet ) ReportOutput(&lem); + + /* Generate the source code for the parser */ + ReportTable(&lem, mhflag); + + /* Produce a header file for use by the scanner. (This step is + ** omitted if the "-m" option is used because makeheaders will + ** generate the file for us.) */ + if( !mhflag ) ReportHeader(&lem); + } + if( statistics ){ + printf("Parser statistics:\n"); + stats_line("terminal symbols", lem.nterminal); + stats_line("non-terminal symbols", lem.nsymbol - lem.nterminal); + stats_line("total symbols", lem.nsymbol); + stats_line("rules", lem.nrule); + stats_line("states", lem.nxstate); + stats_line("conflicts", lem.nconflict); + stats_line("action table entries", lem.nactiontab); + stats_line("total table size (bytes)", lem.tablesize); + } + if( lem.nconflict > 0 ){ + fprintf(stderr,"%d parsing conflicts.\n",lem.nconflict); + } + + /* return 0 on success, 1 on failure. */ + exitcode = ((lem.errorcnt > 0) || (lem.nconflict > 0)) ? 1 : 0; + exit(exitcode); + return (exitcode); +} +/******************** From the file "msort.c" *******************************/ +/* +** A generic merge-sort program. +** +** USAGE: +** Let "ptr" be a pointer to some structure which is at the head of +** a null-terminated list. Then to sort the list call: +** +** ptr = msort(ptr,&(ptr->next),cmpfnc); +** +** In the above, "cmpfnc" is a pointer to a function which compares +** two instances of the structure and returns an integer, as in +** strcmp. The second argument is a pointer to the pointer to the +** second element of the linked list. This address is used to compute +** the offset to the "next" field within the structure. The offset to +** the "next" field must be constant for all structures in the list. +** +** The function returns a new pointer which is the head of the list +** after sorting. +** +** ALGORITHM: +** Merge-sort. +*/ + +/* +** Return a pointer to the next structure in the linked list. +*/ +#define NEXT(A) (*(char**)(((char*)A)+offset)) + +/* +** Inputs: +** a: A sorted, null-terminated linked list. (May be null). +** b: A sorted, null-terminated linked list. (May be null). +** cmp: A pointer to the comparison function. +** offset: Offset in the structure to the "next" field. +** +** Return Value: +** A pointer to the head of a sorted list containing the elements +** of both a and b. +** +** Side effects: +** The "next" pointers for elements in the lists a and b are +** changed. +*/ +static char *merge( + char *a, + char *b, + int (*cmp)(const char*,const char*), + int offset +){ + char *ptr, *head; + + if( a==0 ){ + head = b; + }else if( b==0 ){ + head = a; + }else{ + if( (*cmp)(a,b)<=0 ){ + ptr = a; + a = NEXT(a); + }else{ + ptr = b; + b = NEXT(b); + } + head = ptr; + while( a && b ){ + if( (*cmp)(a,b)<=0 ){ + NEXT(ptr) = a; + ptr = a; + a = NEXT(a); + }else{ + NEXT(ptr) = b; + ptr = b; + b = NEXT(b); + } + } + if( a ) NEXT(ptr) = a; + else NEXT(ptr) = b; + } + return head; +} + +/* +** Inputs: +** list: Pointer to a singly-linked list of structures. +** next: Pointer to pointer to the second element of the list. +** cmp: A comparison function. +** +** Return Value: +** A pointer to the head of a sorted list containing the elements +** orginally in list. +** +** Side effects: +** The "next" pointers for elements in list are changed. +*/ +#define LISTSIZE 30 +static char *msort( + char *list, + char **next, + int (*cmp)(const char*,const char*) +){ + unsigned long offset; + char *ep; + char *set[LISTSIZE]; + int i; + offset = (unsigned long)((char*)next - (char*)list); + for(i=0; istate = WAITING_FOR_DECL_KEYWORD; + }else if( ISLOWER(x[0]) ){ + psp->lhs = Symbol_new(x); + psp->nrhs = 0; + psp->lhsalias = 0; + psp->state = WAITING_FOR_ARROW; + }else if( x[0]=='{' ){ + if( psp->prevrule==0 ){ + ErrorMsg(psp->filename,psp->tokenlineno, +"There is no prior rule upon which to attach the code \ +fragment which begins on this line."); + psp->errorcnt++; + }else if( psp->prevrule->code!=0 ){ + ErrorMsg(psp->filename,psp->tokenlineno, +"Code fragment beginning on this line is not the first \ +to follow the previous rule."); + psp->errorcnt++; + }else{ + psp->prevrule->line = psp->tokenlineno; + psp->prevrule->code = &x[1]; + psp->prevrule->noCode = 0; + } + }else if( x[0]=='[' ){ + psp->state = PRECEDENCE_MARK_1; + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "Token \"%s\" should be either \"%%\" or a nonterminal name.", + x); + psp->errorcnt++; + } + break; + case PRECEDENCE_MARK_1: + if( !ISUPPER(x[0]) ){ + ErrorMsg(psp->filename,psp->tokenlineno, + "The precedence symbol must be a terminal."); + psp->errorcnt++; + }else if( psp->prevrule==0 ){ + ErrorMsg(psp->filename,psp->tokenlineno, + "There is no prior rule to assign precedence \"[%s]\".",x); + psp->errorcnt++; + }else if( psp->prevrule->precsym!=0 ){ + ErrorMsg(psp->filename,psp->tokenlineno, +"Precedence mark on this line is not the first \ +to follow the previous rule."); + psp->errorcnt++; + }else{ + psp->prevrule->precsym = Symbol_new(x); + } + psp->state = PRECEDENCE_MARK_2; + break; + case PRECEDENCE_MARK_2: + if( x[0]!=']' ){ + ErrorMsg(psp->filename,psp->tokenlineno, + "Missing \"]\" on precedence mark."); + psp->errorcnt++; + } + psp->state = WAITING_FOR_DECL_OR_RULE; + break; + case WAITING_FOR_ARROW: + if( x[0]==':' && x[1]==':' && x[2]=='=' ){ + psp->state = IN_RHS; + }else if( x[0]=='(' ){ + psp->state = LHS_ALIAS_1; + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "Expected to see a \":\" following the LHS symbol \"%s\".", + psp->lhs->name); + psp->errorcnt++; + psp->state = RESYNC_AFTER_RULE_ERROR; + } + break; + case LHS_ALIAS_1: + if( ISALPHA(x[0]) ){ + psp->lhsalias = x; + psp->state = LHS_ALIAS_2; + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "\"%s\" is not a valid alias for the LHS \"%s\"\n", + x,psp->lhs->name); + psp->errorcnt++; + psp->state = RESYNC_AFTER_RULE_ERROR; + } + break; + case LHS_ALIAS_2: + if( x[0]==')' ){ + psp->state = LHS_ALIAS_3; + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "Missing \")\" following LHS alias name \"%s\".",psp->lhsalias); + psp->errorcnt++; + psp->state = RESYNC_AFTER_RULE_ERROR; + } + break; + case LHS_ALIAS_3: + if( x[0]==':' && x[1]==':' && x[2]=='=' ){ + psp->state = IN_RHS; + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "Missing \"->\" following: \"%s(%s)\".", + psp->lhs->name,psp->lhsalias); + psp->errorcnt++; + psp->state = RESYNC_AFTER_RULE_ERROR; + } + break; + case IN_RHS: + if( x[0]=='.' ){ + struct rule *rp; + rp = (struct rule *)calloc( sizeof(struct rule) + + sizeof(struct symbol*)*psp->nrhs + sizeof(char*)*psp->nrhs, 1); + if( rp==0 ){ + ErrorMsg(psp->filename,psp->tokenlineno, + "Can't allocate enough memory for this rule."); + psp->errorcnt++; + psp->prevrule = 0; + }else{ + int i; + rp->ruleline = psp->tokenlineno; + rp->rhs = (struct symbol**)&rp[1]; + rp->rhsalias = (const char**)&(rp->rhs[psp->nrhs]); + for(i=0; inrhs; i++){ + rp->rhs[i] = psp->rhs[i]; + rp->rhsalias[i] = psp->alias[i]; + } + rp->lhs = psp->lhs; + rp->lhsalias = psp->lhsalias; + rp->nrhs = psp->nrhs; + rp->code = 0; + rp->noCode = 1; + rp->precsym = 0; + rp->index = psp->gp->nrule++; + rp->nextlhs = rp->lhs->rule; + rp->lhs->rule = rp; + rp->next = 0; + if( psp->firstrule==0 ){ + psp->firstrule = psp->lastrule = rp; + }else{ + psp->lastrule->next = rp; + psp->lastrule = rp; + } + psp->prevrule = rp; + } + psp->state = WAITING_FOR_DECL_OR_RULE; + }else if( ISALPHA(x[0]) ){ + if( psp->nrhs>=MAXRHS ){ + ErrorMsg(psp->filename,psp->tokenlineno, + "Too many symbols on RHS of rule beginning at \"%s\".", + x); + psp->errorcnt++; + psp->state = RESYNC_AFTER_RULE_ERROR; + }else{ + psp->rhs[psp->nrhs] = Symbol_new(x); + psp->alias[psp->nrhs] = 0; + psp->nrhs++; + } + }else if( (x[0]=='|' || x[0]=='/') && psp->nrhs>0 ){ + struct symbol *msp = psp->rhs[psp->nrhs-1]; + if( msp->type!=MULTITERMINAL ){ + struct symbol *origsp = msp; + msp = (struct symbol *) calloc(1,sizeof(*msp)); + memset(msp, 0, sizeof(*msp)); + msp->type = MULTITERMINAL; + msp->nsubsym = 1; + msp->subsym = (struct symbol **) calloc(1,sizeof(struct symbol*)); + msp->subsym[0] = origsp; + msp->name = origsp->name; + psp->rhs[psp->nrhs-1] = msp; + } + msp->nsubsym++; + msp->subsym = (struct symbol **) realloc(msp->subsym, + sizeof(struct symbol*)*msp->nsubsym); + msp->subsym[msp->nsubsym-1] = Symbol_new(&x[1]); + if( ISLOWER(x[1]) || ISLOWER(msp->subsym[0]->name[0]) ){ + ErrorMsg(psp->filename,psp->tokenlineno, + "Cannot form a compound containing a non-terminal"); + psp->errorcnt++; + } + }else if( x[0]=='(' && psp->nrhs>0 ){ + psp->state = RHS_ALIAS_1; + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "Illegal character on RHS of rule: \"%s\".",x); + psp->errorcnt++; + psp->state = RESYNC_AFTER_RULE_ERROR; + } + break; + case RHS_ALIAS_1: + if( ISALPHA(x[0]) ){ + psp->alias[psp->nrhs-1] = x; + psp->state = RHS_ALIAS_2; + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "\"%s\" is not a valid alias for the RHS symbol \"%s\"\n", + x,psp->rhs[psp->nrhs-1]->name); + psp->errorcnt++; + psp->state = RESYNC_AFTER_RULE_ERROR; + } + break; + case RHS_ALIAS_2: + if( x[0]==')' ){ + psp->state = IN_RHS; + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "Missing \")\" following LHS alias name \"%s\".",psp->lhsalias); + psp->errorcnt++; + psp->state = RESYNC_AFTER_RULE_ERROR; + } + break; + case WAITING_FOR_DECL_KEYWORD: + if( ISALPHA(x[0]) ){ + psp->declkeyword = x; + psp->declargslot = 0; + psp->decllinenoslot = 0; + psp->insertLineMacro = 1; + psp->state = WAITING_FOR_DECL_ARG; + if( strcmp(x,"name")==0 ){ + psp->declargslot = &(psp->gp->name); + psp->insertLineMacro = 0; + }else if( strcmp(x,"include")==0 ){ + psp->declargslot = &(psp->gp->include); + }else if( strcmp(x,"code")==0 ){ + psp->declargslot = &(psp->gp->extracode); + }else if( strcmp(x,"token_destructor")==0 ){ + psp->declargslot = &psp->gp->tokendest; + }else if( strcmp(x,"default_destructor")==0 ){ + psp->declargslot = &psp->gp->vardest; + }else if( strcmp(x,"token_prefix")==0 ){ + psp->declargslot = &psp->gp->tokenprefix; + psp->insertLineMacro = 0; + }else if( strcmp(x,"syntax_error")==0 ){ + psp->declargslot = &(psp->gp->error); + }else if( strcmp(x,"parse_accept")==0 ){ + psp->declargslot = &(psp->gp->accept); + }else if( strcmp(x,"parse_failure")==0 ){ + psp->declargslot = &(psp->gp->failure); + }else if( strcmp(x,"stack_overflow")==0 ){ + psp->declargslot = &(psp->gp->overflow); + }else if( strcmp(x,"extra_argument")==0 ){ + psp->declargslot = &(psp->gp->arg); + psp->insertLineMacro = 0; + }else if( strcmp(x,"token_type")==0 ){ + psp->declargslot = &(psp->gp->tokentype); + psp->insertLineMacro = 0; + }else if( strcmp(x,"default_type")==0 ){ + psp->declargslot = &(psp->gp->vartype); + psp->insertLineMacro = 0; + }else if( strcmp(x,"stack_size")==0 ){ + psp->declargslot = &(psp->gp->stacksize); + psp->insertLineMacro = 0; + }else if( strcmp(x,"start_symbol")==0 ){ + psp->declargslot = &(psp->gp->start); + psp->insertLineMacro = 0; + }else if( strcmp(x,"left")==0 ){ + psp->preccounter++; + psp->declassoc = LEFT; + psp->state = WAITING_FOR_PRECEDENCE_SYMBOL; + }else if( strcmp(x,"right")==0 ){ + psp->preccounter++; + psp->declassoc = RIGHT; + psp->state = WAITING_FOR_PRECEDENCE_SYMBOL; + }else if( strcmp(x,"nonassoc")==0 ){ + psp->preccounter++; + psp->declassoc = NONE; + psp->state = WAITING_FOR_PRECEDENCE_SYMBOL; + }else if( strcmp(x,"destructor")==0 ){ + psp->state = WAITING_FOR_DESTRUCTOR_SYMBOL; + }else if( strcmp(x,"type")==0 ){ + psp->state = WAITING_FOR_DATATYPE_SYMBOL; + }else if( strcmp(x,"fallback")==0 ){ + psp->fallback = 0; + psp->state = WAITING_FOR_FALLBACK_ID; + }else if( strcmp(x,"token")==0 ){ + psp->state = WAITING_FOR_TOKEN_NAME; + }else if( strcmp(x,"wildcard")==0 ){ + psp->state = WAITING_FOR_WILDCARD_ID; + }else if( strcmp(x,"token_class")==0 ){ + psp->state = WAITING_FOR_CLASS_ID; + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "Unknown declaration keyword: \"%%%s\".",x); + psp->errorcnt++; + psp->state = RESYNC_AFTER_DECL_ERROR; + } + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "Illegal declaration keyword: \"%s\".",x); + psp->errorcnt++; + psp->state = RESYNC_AFTER_DECL_ERROR; + } + break; + case WAITING_FOR_DESTRUCTOR_SYMBOL: + if( !ISALPHA(x[0]) ){ + ErrorMsg(psp->filename,psp->tokenlineno, + "Symbol name missing after %%destructor keyword"); + psp->errorcnt++; + psp->state = RESYNC_AFTER_DECL_ERROR; + }else{ + struct symbol *sp = Symbol_new(x); + psp->declargslot = &sp->destructor; + psp->decllinenoslot = &sp->destLineno; + psp->insertLineMacro = 1; + psp->state = WAITING_FOR_DECL_ARG; + } + break; + case WAITING_FOR_DATATYPE_SYMBOL: + if( !ISALPHA(x[0]) ){ + ErrorMsg(psp->filename,psp->tokenlineno, + "Symbol name missing after %%type keyword"); + psp->errorcnt++; + psp->state = RESYNC_AFTER_DECL_ERROR; + }else{ + struct symbol *sp = Symbol_find(x); + if((sp) && (sp->datatype)){ + ErrorMsg(psp->filename,psp->tokenlineno, + "Symbol %%type \"%s\" already defined", x); + psp->errorcnt++; + psp->state = RESYNC_AFTER_DECL_ERROR; + }else{ + if (!sp){ + sp = Symbol_new(x); + } + psp->declargslot = &sp->datatype; + psp->insertLineMacro = 0; + psp->state = WAITING_FOR_DECL_ARG; + } + } + break; + case WAITING_FOR_PRECEDENCE_SYMBOL: + if( x[0]=='.' ){ + psp->state = WAITING_FOR_DECL_OR_RULE; + }else if( ISUPPER(x[0]) ){ + struct symbol *sp; + sp = Symbol_new(x); + if( sp->prec>=0 ){ + ErrorMsg(psp->filename,psp->tokenlineno, + "Symbol \"%s\" has already be given a precedence.",x); + psp->errorcnt++; + }else{ + sp->prec = psp->preccounter; + sp->assoc = psp->declassoc; + } + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "Can't assign a precedence to \"%s\".",x); + psp->errorcnt++; + } + break; + case WAITING_FOR_DECL_ARG: + if( x[0]=='{' || x[0]=='\"' || ISALNUM(x[0]) ){ + const char *zOld, *zNew; + char *zBuf, *z; + int nOld, n, nLine = 0, nNew, nBack; + int addLineMacro; + char zLine[50]; + zNew = x; + if( zNew[0]=='"' || zNew[0]=='{' ) zNew++; + nNew = lemonStrlen(zNew); + if( *psp->declargslot ){ + zOld = *psp->declargslot; + }else{ + zOld = ""; + } + nOld = lemonStrlen(zOld); + n = nOld + nNew + 20; + addLineMacro = !psp->gp->nolinenosflag && psp->insertLineMacro && + (psp->decllinenoslot==0 || psp->decllinenoslot[0]!=0); + if( addLineMacro ){ + for(z=psp->filename, nBack=0; *z; z++){ + if( *z=='\\' ) nBack++; + } + lemon_sprintf(zLine, "#line %d ", psp->tokenlineno); + nLine = lemonStrlen(zLine); + n += nLine + lemonStrlen(psp->filename) + nBack; + } + *psp->declargslot = (char *) realloc(*psp->declargslot, n); + zBuf = *psp->declargslot + nOld; + if( addLineMacro ){ + if( nOld && zBuf[-1]!='\n' ){ + *(zBuf++) = '\n'; + } + memcpy(zBuf, zLine, nLine); + zBuf += nLine; + *(zBuf++) = '"'; + for(z=psp->filename; *z; z++){ + if( *z=='\\' ){ + *(zBuf++) = '\\'; + } + *(zBuf++) = *z; + } + *(zBuf++) = '"'; + *(zBuf++) = '\n'; + } + if( psp->decllinenoslot && psp->decllinenoslot[0]==0 ){ + psp->decllinenoslot[0] = psp->tokenlineno; + } + memcpy(zBuf, zNew, nNew); + zBuf += nNew; + *zBuf = 0; + psp->state = WAITING_FOR_DECL_OR_RULE; + }else{ + ErrorMsg(psp->filename,psp->tokenlineno, + "Illegal argument to %%%s: %s",psp->declkeyword,x); + psp->errorcnt++; + psp->state = RESYNC_AFTER_DECL_ERROR; + } + break; + case WAITING_FOR_FALLBACK_ID: + if( x[0]=='.' ){ + psp->state = WAITING_FOR_DECL_OR_RULE; + }else if( !ISUPPER(x[0]) ){ + ErrorMsg(psp->filename, psp->tokenlineno, + "%%fallback argument \"%s\" should be a token", x); + psp->errorcnt++; + }else{ + struct symbol *sp = Symbol_new(x); + if( psp->fallback==0 ){ + psp->fallback = sp; + }else if( sp->fallback ){ + ErrorMsg(psp->filename, psp->tokenlineno, + "More than one fallback assigned to token %s", x); + psp->errorcnt++; + }else{ + sp->fallback = psp->fallback; + psp->gp->has_fallback = 1; + } + } + break; + case WAITING_FOR_TOKEN_NAME: + /* Tokens do not have to be declared before use. But they can be + ** in order to control their assigned integer number. The number for + ** each token is assigned when it is first seen. So by including + ** + ** %token ONE TWO THREE + ** + ** early in the grammar file, that assigns small consecutive values + ** to each of the tokens ONE TWO and THREE. + */ + if( x[0]=='.' ){ + psp->state = WAITING_FOR_DECL_OR_RULE; + }else if( !ISUPPER(x[0]) ){ + ErrorMsg(psp->filename, psp->tokenlineno, + "%%token argument \"%s\" should be a token", x); + psp->errorcnt++; + }else{ + (void)Symbol_new(x); + } + break; + case WAITING_FOR_WILDCARD_ID: + if( x[0]=='.' ){ + psp->state = WAITING_FOR_DECL_OR_RULE; + }else if( !ISUPPER(x[0]) ){ + ErrorMsg(psp->filename, psp->tokenlineno, + "%%wildcard argument \"%s\" should be a token", x); + psp->errorcnt++; + }else{ + struct symbol *sp = Symbol_new(x); + if( psp->gp->wildcard==0 ){ + psp->gp->wildcard = sp; + }else{ + ErrorMsg(psp->filename, psp->tokenlineno, + "Extra wildcard to token: %s", x); + psp->errorcnt++; + } + } + break; + case WAITING_FOR_CLASS_ID: + if( !ISLOWER(x[0]) ){ + ErrorMsg(psp->filename, psp->tokenlineno, + "%%token_class must be followed by an identifier: ", x); + psp->errorcnt++; + psp->state = RESYNC_AFTER_DECL_ERROR; + }else if( Symbol_find(x) ){ + ErrorMsg(psp->filename, psp->tokenlineno, + "Symbol \"%s\" already used", x); + psp->errorcnt++; + psp->state = RESYNC_AFTER_DECL_ERROR; + }else{ + psp->tkclass = Symbol_new(x); + psp->tkclass->type = MULTITERMINAL; + psp->state = WAITING_FOR_CLASS_TOKEN; + } + break; + case WAITING_FOR_CLASS_TOKEN: + if( x[0]=='.' ){ + psp->state = WAITING_FOR_DECL_OR_RULE; + }else if( ISUPPER(x[0]) || ((x[0]=='|' || x[0]=='/') && ISUPPER(x[1])) ){ + struct symbol *msp = psp->tkclass; + msp->nsubsym++; + msp->subsym = (struct symbol **) realloc(msp->subsym, + sizeof(struct symbol*)*msp->nsubsym); + if( !ISUPPER(x[0]) ) x++; + msp->subsym[msp->nsubsym-1] = Symbol_new(x); + }else{ + ErrorMsg(psp->filename, psp->tokenlineno, + "%%token_class argument \"%s\" should be a token", x); + psp->errorcnt++; + psp->state = RESYNC_AFTER_DECL_ERROR; + } + break; + case RESYNC_AFTER_RULE_ERROR: +/* if( x[0]=='.' ) psp->state = WAITING_FOR_DECL_OR_RULE; +** break; */ + case RESYNC_AFTER_DECL_ERROR: + if( x[0]=='.' ) psp->state = WAITING_FOR_DECL_OR_RULE; + if( x[0]=='%' ) psp->state = WAITING_FOR_DECL_KEYWORD; + break; + } +} + +/* Run the preprocessor over the input file text. The global variables +** azDefine[0] through azDefine[nDefine-1] contains the names of all defined +** macros. This routine looks for "%ifdef" and "%ifndef" and "%endif" and +** comments them out. Text in between is also commented out as appropriate. +*/ +static void preprocess_input(char *z){ + int i, j, k, n; + int exclude = 0; + int start = 0; + int lineno = 1; + int start_lineno = 1; + for(i=0; z[i]; i++){ + if( z[i]=='\n' ) lineno++; + if( z[i]!='%' || (i>0 && z[i-1]!='\n') ) continue; + if( strncmp(&z[i],"%endif",6)==0 && ISSPACE(z[i+6]) ){ + if( exclude ){ + exclude--; + if( exclude==0 ){ + for(j=start; jfilename; + ps.errorcnt = 0; + ps.state = INITIALIZE; + + /* Begin by reading the input file */ + fp = fopen(ps.filename,"rb"); + if( fp==0 ){ + ErrorMsg(ps.filename,0,"Can't open this file for reading."); + gp->errorcnt++; + return; + } + fseek(fp,0,2); + filesize = ftell(fp); + rewind(fp); + filebuf = (char *)malloc( filesize+1 ); + if( filesize>100000000 || filebuf==0 ){ + ErrorMsg(ps.filename,0,"Input file too large."); + gp->errorcnt++; + fclose(fp); + return; + } + if( fread(filebuf,1,filesize,fp)!=filesize ){ + ErrorMsg(ps.filename,0,"Can't read in all %d bytes of this file.", + filesize); + free(filebuf); + gp->errorcnt++; + fclose(fp); + return; + } + fclose(fp); + filebuf[filesize] = 0; + + /* Make an initial pass through the file to handle %ifdef and %ifndef */ + preprocess_input(filebuf); + + /* Now scan the text of the input file */ + lineno = 1; + for(cp=filebuf; (c= *cp)!=0; ){ + if( c=='\n' ) lineno++; /* Keep track of the line number */ + if( ISSPACE(c) ){ cp++; continue; } /* Skip all white space */ + if( c=='/' && cp[1]=='/' ){ /* Skip C++ style comments */ + cp+=2; + while( (c= *cp)!=0 && c!='\n' ) cp++; + continue; + } + if( c=='/' && cp[1]=='*' ){ /* Skip C style comments */ + cp+=2; + while( (c= *cp)!=0 && (c!='/' || cp[-1]!='*') ){ + if( c=='\n' ) lineno++; + cp++; + } + if( c ) cp++; + continue; + } + ps.tokenstart = cp; /* Mark the beginning of the token */ + ps.tokenlineno = lineno; /* Linenumber on which token begins */ + if( c=='\"' ){ /* String literals */ + cp++; + while( (c= *cp)!=0 && c!='\"' ){ + if( c=='\n' ) lineno++; + cp++; + } + if( c==0 ){ + ErrorMsg(ps.filename,startline, +"String starting on this line is not terminated before the end of the file."); + ps.errorcnt++; + nextcp = cp; + }else{ + nextcp = cp+1; + } + }else if( c=='{' ){ /* A block of C code */ + int level; + cp++; + for(level=1; (c= *cp)!=0 && (level>1 || c!='}'); cp++){ + if( c=='\n' ) lineno++; + else if( c=='{' ) level++; + else if( c=='}' ) level--; + else if( c=='/' && cp[1]=='*' ){ /* Skip comments */ + int prevc; + cp = &cp[2]; + prevc = 0; + while( (c= *cp)!=0 && (c!='/' || prevc!='*') ){ + if( c=='\n' ) lineno++; + prevc = c; + cp++; + } + }else if( c=='/' && cp[1]=='/' ){ /* Skip C++ style comments too */ + cp = &cp[2]; + while( (c= *cp)!=0 && c!='\n' ) cp++; + if( c ) lineno++; + }else if( c=='\'' || c=='\"' ){ /* String a character literals */ + int startchar, prevc; + startchar = c; + prevc = 0; + for(cp++; (c= *cp)!=0 && (c!=startchar || prevc=='\\'); cp++){ + if( c=='\n' ) lineno++; + if( prevc=='\\' ) prevc = 0; + else prevc = c; + } + } + } + if( c==0 ){ + ErrorMsg(ps.filename,ps.tokenlineno, +"C code starting on this line is not terminated before the end of the file."); + ps.errorcnt++; + nextcp = cp; + }else{ + nextcp = cp+1; + } + }else if( ISALNUM(c) ){ /* Identifiers */ + while( (c= *cp)!=0 && (ISALNUM(c) || c=='_') ) cp++; + nextcp = cp; + }else if( c==':' && cp[1]==':' && cp[2]=='=' ){ /* The operator "::=" */ + cp += 3; + nextcp = cp; + }else if( (c=='/' || c=='|') && ISALPHA(cp[1]) ){ + cp += 2; + while( (c = *cp)!=0 && (ISALNUM(c) || c=='_') ) cp++; + nextcp = cp; + }else{ /* All other (one character) operators */ + cp++; + nextcp = cp; + } + c = *cp; + *cp = 0; /* Null terminate the token */ + parseonetoken(&ps); /* Parse the token */ + *cp = (char)c; /* Restore the buffer */ + cp = nextcp; + } + free(filebuf); /* Release the buffer after parsing */ + gp->rule = ps.firstrule; + gp->errorcnt = ps.errorcnt; +} +/*************************** From the file "plink.c" *********************/ +/* +** Routines processing configuration follow-set propagation links +** in the LEMON parser generator. +*/ +static struct plink *plink_freelist = 0; + +/* Allocate a new plink */ +struct plink *Plink_new(void){ + struct plink *newlink; + + if( plink_freelist==0 ){ + int i; + int amt = 100; + plink_freelist = (struct plink *)calloc( amt, sizeof(struct plink) ); + if( plink_freelist==0 ){ + fprintf(stderr, + "Unable to allocate memory for a new follow-set propagation link.\n"); + exit(1); + } + for(i=0; inext; + return newlink; +} + +/* Add a plink to a plink list */ +void Plink_add(struct plink **plpp, struct config *cfp) +{ + struct plink *newlink; + newlink = Plink_new(); + newlink->next = *plpp; + *plpp = newlink; + newlink->cfp = cfp; +} + +/* Transfer every plink on the list "from" to the list "to" */ +void Plink_copy(struct plink **to, struct plink *from) +{ + struct plink *nextpl; + while( from ){ + nextpl = from->next; + from->next = *to; + *to = from; + from = nextpl; + } +} + +/* Delete every plink on the list */ +void Plink_delete(struct plink *plp) +{ + struct plink *nextpl; + + while( plp ){ + nextpl = plp->next; + plp->next = plink_freelist; + plink_freelist = plp; + plp = nextpl; + } +} +/*********************** From the file "report.c" **************************/ +/* +** Procedures for generating reports and tables in the LEMON parser generator. +*/ + +/* Generate a filename with the given suffix. Space to hold the +** name comes from malloc() and must be freed by the calling +** function. +*/ +PRIVATE char *file_makename(struct lemon *lemp, const char *suffix) +{ + char *name; + char *cp; + + name = (char*)malloc( lemonStrlen(lemp->filename) + lemonStrlen(suffix) + 5 ); + if( name==0 ){ + fprintf(stderr,"Can't allocate space for a filename.\n"); + exit(1); + } + lemon_strcpy(name,lemp->filename); + cp = strrchr(name,'.'); + if( cp ) *cp = 0; + lemon_strcat(name,suffix); + return name; +} + +/* Open a file with a name based on the name of the input file, +** but with a different (specified) suffix, and return a pointer +** to the stream */ +PRIVATE FILE *file_open( + struct lemon *lemp, + const char *suffix, + const char *mode +){ + FILE *fp; + + if( lemp->outname ) free(lemp->outname); + lemp->outname = file_makename(lemp, suffix); + fp = fopen(lemp->outname,mode); + if( fp==0 && *mode=='w' ){ + fprintf(stderr,"Can't open file \"%s\".\n",lemp->outname); + lemp->errorcnt++; + return 0; + } + return fp; +} + +/* Duplicate the input file without comments and without actions +** on rules */ +void Reprint(struct lemon *lemp) +{ + struct rule *rp; + struct symbol *sp; + int i, j, maxlen, len, ncolumns, skip; + printf("// Reprint of input file \"%s\".\n// Symbols:\n",lemp->filename); + maxlen = 10; + for(i=0; insymbol; i++){ + sp = lemp->symbols[i]; + len = lemonStrlen(sp->name); + if( len>maxlen ) maxlen = len; + } + ncolumns = 76/(maxlen+5); + if( ncolumns<1 ) ncolumns = 1; + skip = (lemp->nsymbol + ncolumns - 1)/ncolumns; + for(i=0; insymbol; j+=skip){ + sp = lemp->symbols[j]; + assert( sp->index==j ); + printf(" %3d %-*.*s",j,maxlen,maxlen,sp->name); + } + printf("\n"); + } + for(rp=lemp->rule; rp; rp=rp->next){ + printf("%s",rp->lhs->name); + /* if( rp->lhsalias ) printf("(%s)",rp->lhsalias); */ + printf(" ::="); + for(i=0; inrhs; i++){ + sp = rp->rhs[i]; + if( sp->type==MULTITERMINAL ){ + printf(" %s", sp->subsym[0]->name); + for(j=1; jnsubsym; j++){ + printf("|%s", sp->subsym[j]->name); + } + }else{ + printf(" %s", sp->name); + } + /* if( rp->rhsalias[i] ) printf("(%s)",rp->rhsalias[i]); */ + } + printf("."); + if( rp->precsym ) printf(" [%s]",rp->precsym->name); + /* if( rp->code ) printf("\n %s",rp->code); */ + printf("\n"); + } +} + +/* Print a single rule. +*/ +void RulePrint(FILE *fp, struct rule *rp, int iCursor){ + struct symbol *sp; + int i, j; + fprintf(fp,"%s ::=",rp->lhs->name); + for(i=0; i<=rp->nrhs; i++){ + if( i==iCursor ) fprintf(fp," *"); + if( i==rp->nrhs ) break; + sp = rp->rhs[i]; + if( sp->type==MULTITERMINAL ){ + fprintf(fp," %s", sp->subsym[0]->name); + for(j=1; jnsubsym; j++){ + fprintf(fp,"|%s",sp->subsym[j]->name); + } + }else{ + fprintf(fp," %s", sp->name); + } + } +} + +/* Print the rule for a configuration. +*/ +void ConfigPrint(FILE *fp, struct config *cfp){ + RulePrint(fp, cfp->rp, cfp->dot); +} + +/* #define TEST */ +#if 0 +/* Print a set */ +PRIVATE void SetPrint(out,set,lemp) +FILE *out; +char *set; +struct lemon *lemp; +{ + int i; + char *spacer; + spacer = ""; + fprintf(out,"%12s[",""); + for(i=0; interminal; i++){ + if( SetFind(set,i) ){ + fprintf(out,"%s%s",spacer,lemp->symbols[i]->name); + spacer = " "; + } + } + fprintf(out,"]\n"); +} + +/* Print a plink chain */ +PRIVATE void PlinkPrint(out,plp,tag) +FILE *out; +struct plink *plp; +char *tag; +{ + while( plp ){ + fprintf(out,"%12s%s (state %2d) ","",tag,plp->cfp->stp->statenum); + ConfigPrint(out,plp->cfp); + fprintf(out,"\n"); + plp = plp->next; + } +} +#endif + +/* Print an action to the given file descriptor. Return FALSE if +** nothing was actually printed. +*/ +int PrintAction( + struct action *ap, /* The action to print */ + FILE *fp, /* Print the action here */ + int indent /* Indent by this amount */ +){ + int result = 1; + switch( ap->type ){ + case SHIFT: { + struct state *stp = ap->x.stp; + fprintf(fp,"%*s shift %-7d",indent,ap->sp->name,stp->statenum); + break; + } + case REDUCE: { + struct rule *rp = ap->x.rp; + fprintf(fp,"%*s reduce %-7d",indent,ap->sp->name,rp->iRule); + RulePrint(fp, rp, -1); + break; + } + case SHIFTREDUCE: { + struct rule *rp = ap->x.rp; + fprintf(fp,"%*s shift-reduce %-7d",indent,ap->sp->name,rp->iRule); + RulePrint(fp, rp, -1); + break; + } + case ACCEPT: + fprintf(fp,"%*s accept",indent,ap->sp->name); + break; + case ERROR: + fprintf(fp,"%*s error",indent,ap->sp->name); + break; + case SRCONFLICT: + case RRCONFLICT: + fprintf(fp,"%*s reduce %-7d ** Parsing conflict **", + indent,ap->sp->name,ap->x.rp->iRule); + break; + case SSCONFLICT: + fprintf(fp,"%*s shift %-7d ** Parsing conflict **", + indent,ap->sp->name,ap->x.stp->statenum); + break; + case SH_RESOLVED: + if( showPrecedenceConflict ){ + fprintf(fp,"%*s shift %-7d -- dropped by precedence", + indent,ap->sp->name,ap->x.stp->statenum); + }else{ + result = 0; + } + break; + case RD_RESOLVED: + if( showPrecedenceConflict ){ + fprintf(fp,"%*s reduce %-7d -- dropped by precedence", + indent,ap->sp->name,ap->x.rp->iRule); + }else{ + result = 0; + } + break; + case NOT_USED: + result = 0; + break; + } + if( result && ap->spOpt ){ + fprintf(fp," /* because %s==%s */", ap->sp->name, ap->spOpt->name); + } + return result; +} + +/* Generate the "*.out" log file */ +void ReportOutput(struct lemon *lemp) +{ + int i; + struct state *stp; + struct config *cfp; + struct action *ap; + FILE *fp; + + fp = file_open(lemp,".out","wb"); + if( fp==0 ) return; + for(i=0; inxstate; i++){ + stp = lemp->sorted[i]; + fprintf(fp,"State %d:\n",stp->statenum); + if( lemp->basisflag ) cfp=stp->bp; + else cfp=stp->cfp; + while( cfp ){ + char buf[20]; + if( cfp->dot==cfp->rp->nrhs ){ + lemon_sprintf(buf,"(%d)",cfp->rp->iRule); + fprintf(fp," %5s ",buf); + }else{ + fprintf(fp," "); + } + ConfigPrint(fp,cfp); + fprintf(fp,"\n"); +#if 0 + SetPrint(fp,cfp->fws,lemp); + PlinkPrint(fp,cfp->fplp,"To "); + PlinkPrint(fp,cfp->bplp,"From"); +#endif + if( lemp->basisflag ) cfp=cfp->bp; + else cfp=cfp->next; + } + fprintf(fp,"\n"); + for(ap=stp->ap; ap; ap=ap->next){ + if( PrintAction(ap,fp,30) ) fprintf(fp,"\n"); + } + fprintf(fp,"\n"); + } + fprintf(fp, "----------------------------------------------------\n"); + fprintf(fp, "Symbols:\n"); + for(i=0; insymbol; i++){ + int j; + struct symbol *sp; + + sp = lemp->symbols[i]; + fprintf(fp, " %3d: %s", i, sp->name); + if( sp->type==NONTERMINAL ){ + fprintf(fp, ":"); + if( sp->lambda ){ + fprintf(fp, " "); + } + for(j=0; jnterminal; j++){ + if( sp->firstset && SetFind(sp->firstset, j) ){ + fprintf(fp, " %s", lemp->symbols[j]->name); + } + } + } + fprintf(fp, "\n"); + } + fclose(fp); + return; +} + +/* Search for the file "name" which is in the same directory as +** the exacutable */ +PRIVATE char *pathsearch(char *argv0, char *name, int modemask) +{ + const char *pathlist; + char *pathbufptr; + char *pathbuf; + char *path,*cp; + char c; + +#ifdef __WIN32__ + cp = strrchr(argv0,'\\'); +#else + cp = strrchr(argv0,'/'); +#endif + if( cp ){ + c = *cp; + *cp = 0; + path = (char *)malloc( lemonStrlen(argv0) + lemonStrlen(name) + 2 ); + if( path ) lemon_sprintf(path,"%s/%s",argv0,name); + *cp = c; + }else{ + pathlist = getenv("PATH"); + if( pathlist==0 ) pathlist = ".:/bin:/usr/bin"; + pathbuf = (char *) malloc( lemonStrlen(pathlist) + 1 ); + path = (char *)malloc( lemonStrlen(pathlist)+lemonStrlen(name)+2 ); + if( (pathbuf != 0) && (path!=0) ){ + pathbufptr = pathbuf; + lemon_strcpy(pathbuf, pathlist); + while( *pathbuf ){ + cp = strchr(pathbuf,':'); + if( cp==0 ) cp = &pathbuf[lemonStrlen(pathbuf)]; + c = *cp; + *cp = 0; + lemon_sprintf(path,"%s/%s",pathbuf,name); + *cp = c; + if( c==0 ) pathbuf[0] = 0; + else pathbuf = &cp[1]; + if( access(path,modemask)==0 ) break; + } + free(pathbufptr); + } + } + return path; +} + +/* Given an action, compute the integer value for that action +** which is to be put in the action table of the generated machine. +** Return negative if no action should be generated. +*/ +PRIVATE int compute_action(struct lemon *lemp, struct action *ap) +{ + int act; + switch( ap->type ){ + case SHIFT: act = ap->x.stp->statenum; break; + case SHIFTREDUCE: { + act = ap->x.rp->iRule + lemp->nstate; + /* Since a SHIFT is inherient after a prior REDUCE, convert any + ** SHIFTREDUCE action with a nonterminal on the LHS into a simple + ** REDUCE action: */ + if( ap->sp->index>=lemp->nterminal ) act += lemp->nrule; + break; + } + case REDUCE: act = ap->x.rp->iRule + lemp->nstate+lemp->nrule; break; + case ERROR: act = lemp->nstate + lemp->nrule*2; break; + case ACCEPT: act = lemp->nstate + lemp->nrule*2 + 1; break; + default: act = -1; break; + } + return act; +} + +#define LINESIZE 1000 +/* The next cluster of routines are for reading the template file +** and writing the results to the generated parser */ +/* The first function transfers data from "in" to "out" until +** a line is seen which begins with "%%". The line number is +** tracked. +** +** if name!=0, then any word that begin with "Parse" is changed to +** begin with *name instead. +*/ +PRIVATE void tplt_xfer(char *name, FILE *in, FILE *out, int *lineno) +{ + int i, iStart; + char line[LINESIZE]; + while( fgets(line,LINESIZE,in) && (line[0]!='%' || line[1]!='%') ){ + (*lineno)++; + iStart = 0; + if( name ){ + for(i=0; line[i]; i++){ + if( line[i]=='P' && strncmp(&line[i],"Parse",5)==0 + && (i==0 || !ISALPHA(line[i-1])) + ){ + if( i>iStart ) fprintf(out,"%.*s",i-iStart,&line[iStart]); + fprintf(out,"%s",name); + i += 4; + iStart = i+1; + } + } + } + fprintf(out,"%s",&line[iStart]); + } +} + +/* The next function finds the template file and opens it, returning +** a pointer to the opened file. */ +PRIVATE FILE *tplt_open(struct lemon *lemp) +{ + static char templatename[] = "lempar.c"; + char buf[1000]; + FILE *in; + char *tpltname; + char *cp; + + /* first, see if user specified a template filename on the command line. */ + if (user_templatename != 0) { + if( access(user_templatename,004)==-1 ){ + fprintf(stderr,"Can't find the parser driver template file \"%s\".\n", + user_templatename); + lemp->errorcnt++; + return 0; + } + in = fopen(user_templatename,"rb"); + if( in==0 ){ + fprintf(stderr,"Can't open the template file \"%s\".\n", + user_templatename); + lemp->errorcnt++; + return 0; + } + return in; + } + + cp = strrchr(lemp->filename,'.'); + if( cp ){ + lemon_sprintf(buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename); + }else{ + lemon_sprintf(buf,"%s.lt",lemp->filename); + } + if( access(buf,004)==0 ){ + tpltname = buf; + }else if( access(templatename,004)==0 ){ + tpltname = templatename; + }else{ + tpltname = pathsearch(lemp->argv0,templatename,0); + } + if( tpltname==0 ){ + fprintf(stderr,"Can't find the parser driver template file \"%s\".\n", + templatename); + lemp->errorcnt++; + return 0; + } + in = fopen(tpltname,"rb"); + if( in==0 ){ + fprintf(stderr,"Can't open the template file \"%s\".\n",templatename); + lemp->errorcnt++; + return 0; + } + return in; +} + +/* Print a #line directive line to the output file. */ +PRIVATE void tplt_linedir(FILE *out, int lineno, char *filename) +{ + fprintf(out,"#line %d \"",lineno); + while( *filename ){ + if( *filename == '\\' ) putc('\\',out); + putc(*filename,out); + filename++; + } + fprintf(out,"\"\n"); +} + +/* Print a string to the file and keep the linenumber up to date */ +PRIVATE void tplt_print(FILE *out, struct lemon *lemp, char *str, int *lineno) +{ + if( str==0 ) return; + while( *str ){ + putc(*str,out); + if( *str=='\n' ) (*lineno)++; + str++; + } + if( str[-1]!='\n' ){ + putc('\n',out); + (*lineno)++; + } + if (!lemp->nolinenosflag) { + (*lineno)++; tplt_linedir(out,*lineno,lemp->outname); + } + return; +} + +/* +** The following routine emits code for the destructor for the +** symbol sp +*/ +void emit_destructor_code( + FILE *out, + struct symbol *sp, + struct lemon *lemp, + int *lineno +){ + char *cp = 0; + + if( sp->type==TERMINAL ){ + cp = lemp->tokendest; + if( cp==0 ) return; + fprintf(out,"{\n"); (*lineno)++; + }else if( sp->destructor ){ + cp = sp->destructor; + fprintf(out,"{\n"); (*lineno)++; + if( !lemp->nolinenosflag ){ + (*lineno)++; + tplt_linedir(out,sp->destLineno,lemp->filename); + } + }else if( lemp->vardest ){ + cp = lemp->vardest; + if( cp==0 ) return; + fprintf(out,"{\n"); (*lineno)++; + }else{ + assert( 0 ); /* Cannot happen */ + } + for(; *cp; cp++){ + if( *cp=='$' && cp[1]=='$' ){ + fprintf(out,"(yypminor->yy%d)",sp->dtnum); + cp++; + continue; + } + if( *cp=='\n' ) (*lineno)++; + fputc(*cp,out); + } + fprintf(out,"\n"); (*lineno)++; + if (!lemp->nolinenosflag) { + (*lineno)++; tplt_linedir(out,*lineno,lemp->outname); + } + fprintf(out,"}\n"); (*lineno)++; + return; +} + +/* +** Return TRUE (non-zero) if the given symbol has a destructor. +*/ +int has_destructor(struct symbol *sp, struct lemon *lemp) +{ + int ret; + if( sp->type==TERMINAL ){ + ret = lemp->tokendest!=0; + }else{ + ret = lemp->vardest!=0 || sp->destructor!=0; + } + return ret; +} + +/* +** Append text to a dynamically allocated string. If zText is 0 then +** reset the string to be empty again. Always return the complete text +** of the string (which is overwritten with each call). +** +** n bytes of zText are stored. If n==0 then all of zText up to the first +** \000 terminator is stored. zText can contain up to two instances of +** %d. The values of p1 and p2 are written into the first and second +** %d. +** +** If n==-1, then the previous character is overwritten. +*/ +PRIVATE char *append_str(const char *zText, int n, int p1, int p2){ + static char empty[1] = { 0 }; + static char *z = 0; + static int alloced = 0; + static int used = 0; + int c; + char zInt[40]; + if( zText==0 ){ + if( used==0 && z!=0 ) z[0] = 0; + used = 0; + return z; + } + if( n<=0 ){ + if( n<0 ){ + used += n; + assert( used>=0 ); + } + n = lemonStrlen(zText); + } + if( (int) (n+sizeof(zInt)*2+used) >= alloced ){ + alloced = n + sizeof(zInt)*2 + used + 200; + z = (char *) realloc(z, alloced); + } + if( z==0 ) return empty; + while( n-- > 0 ){ + c = *(zText++); + if( c=='%' && n>0 && zText[0]=='d' ){ + lemon_sprintf(zInt, "%d", p1); + p1 = p2; + lemon_strcpy(&z[used], zInt); + used += lemonStrlen(&z[used]); + zText++; + n--; + }else{ + z[used++] = (char)c; + } + } + z[used] = 0; + return z; +} + +/* +** Write and transform the rp->code string so that symbols are expanded. +** Populate the rp->codePrefix and rp->codeSuffix strings, as appropriate. +** +** Return 1 if the expanded code requires that "yylhsminor" local variable +** to be defined. +*/ +PRIVATE int translate_code(struct lemon *lemp, struct rule *rp){ + char *cp, *xp; + int i; + int rc = 0; /* True if yylhsminor is used */ + int dontUseRhs0 = 0; /* If true, use of left-most RHS label is illegal */ + const char *zSkip = 0; /* The zOvwrt comment within rp->code, or NULL */ + char lhsused = 0; /* True if the LHS element has been used */ + char lhsdirect; /* True if LHS writes directly into stack */ + char used[MAXRHS]; /* True for each RHS element which is used */ + char zLhs[50]; /* Convert the LHS symbol into this string */ + char zOvwrt[900]; /* Comment that to allow LHS to overwrite RHS */ + + for(i=0; inrhs; i++) used[i] = 0; + lhsused = 0; + + if( rp->code==0 ){ + static char newlinestr[2] = { '\n', '\0' }; + rp->code = newlinestr; + rp->line = rp->ruleline; + rp->noCode = 1; + }else{ + rp->noCode = 0; + } + + + if( rp->nrhs==0 ){ + /* If there are no RHS symbols, then writing directly to the LHS is ok */ + lhsdirect = 1; + }else if( rp->rhsalias[0]==0 ){ + /* The left-most RHS symbol has no value. LHS direct is ok. But + ** we have to call the distructor on the RHS symbol first. */ + lhsdirect = 1; + if( has_destructor(rp->rhs[0],lemp) ){ + append_str(0,0,0,0); + append_str(" yy_destructor(yypParser,%d,&yymsp[%d].minor);\n", 0, + rp->rhs[0]->index,1-rp->nrhs); + rp->codePrefix = Strsafe(append_str(0,0,0,0)); + rp->noCode = 0; + } + }else if( rp->lhsalias==0 ){ + /* There is no LHS value symbol. */ + lhsdirect = 1; + }else if( strcmp(rp->lhsalias,rp->rhsalias[0])==0 ){ + /* The LHS symbol and the left-most RHS symbol are the same, so + ** direct writing is allowed */ + lhsdirect = 1; + lhsused = 1; + used[0] = 1; + if( rp->lhs->dtnum!=rp->rhs[0]->dtnum ){ + ErrorMsg(lemp->filename,rp->ruleline, + "%s(%s) and %s(%s) share the same label but have " + "different datatypes.", + rp->lhs->name, rp->lhsalias, rp->rhs[0]->name, rp->rhsalias[0]); + lemp->errorcnt++; + } + }else{ + lemon_sprintf(zOvwrt, "/*%s-overwrites-%s*/", + rp->lhsalias, rp->rhsalias[0]); + zSkip = strstr(rp->code, zOvwrt); + if( zSkip!=0 ){ + /* The code contains a special comment that indicates that it is safe + ** for the LHS label to overwrite left-most RHS label. */ + lhsdirect = 1; + }else{ + lhsdirect = 0; + } + } + if( lhsdirect ){ + sprintf(zLhs, "yymsp[%d].minor.yy%d",1-rp->nrhs,rp->lhs->dtnum); + }else{ + rc = 1; + sprintf(zLhs, "yylhsminor.yy%d",rp->lhs->dtnum); + } + + append_str(0,0,0,0); + + /* This const cast is wrong but harmless, if we're careful. */ + for(cp=(char *)rp->code; *cp; cp++){ + if( cp==zSkip ){ + append_str(zOvwrt,0,0,0); + cp += lemonStrlen(zOvwrt)-1; + dontUseRhs0 = 1; + continue; + } + if( ISALPHA(*cp) && (cp==rp->code || (!ISALNUM(cp[-1]) && cp[-1]!='_')) ){ + char saved; + for(xp= &cp[1]; ISALNUM(*xp) || *xp=='_'; xp++); + saved = *xp; + *xp = 0; + if( rp->lhsalias && strcmp(cp,rp->lhsalias)==0 ){ + append_str(zLhs,0,0,0); + cp = xp; + lhsused = 1; + }else{ + for(i=0; inrhs; i++){ + if( rp->rhsalias[i] && strcmp(cp,rp->rhsalias[i])==0 ){ + if( i==0 && dontUseRhs0 ){ + ErrorMsg(lemp->filename,rp->ruleline, + "Label %s used after '%s'.", + rp->rhsalias[0], zOvwrt); + lemp->errorcnt++; + }else if( cp!=rp->code && cp[-1]=='@' ){ + /* If the argument is of the form @X then substituted + ** the token number of X, not the value of X */ + append_str("yymsp[%d].major",-1,i-rp->nrhs+1,0); + }else{ + struct symbol *sp = rp->rhs[i]; + int dtnum; + if( sp->type==MULTITERMINAL ){ + dtnum = sp->subsym[0]->dtnum; + }else{ + dtnum = sp->dtnum; + } + append_str("yymsp[%d].minor.yy%d",0,i-rp->nrhs+1, dtnum); + } + cp = xp; + used[i] = 1; + break; + } + } + } + *xp = saved; + } + append_str(cp, 1, 0, 0); + } /* End loop */ + + /* Main code generation completed */ + cp = append_str(0,0,0,0); + if( cp && cp[0] ) rp->code = Strsafe(cp); + append_str(0,0,0,0); + + /* Check to make sure the LHS has been used */ + if( rp->lhsalias && !lhsused ){ + ErrorMsg(lemp->filename,rp->ruleline, + "Label \"%s\" for \"%s(%s)\" is never used.", + rp->lhsalias,rp->lhs->name,rp->lhsalias); + lemp->errorcnt++; + } + + /* Generate destructor code for RHS minor values which are not referenced. + ** Generate error messages for unused labels and duplicate labels. + */ + for(i=0; inrhs; i++){ + if( rp->rhsalias[i] ){ + if( i>0 ){ + int j; + if( rp->lhsalias && strcmp(rp->lhsalias,rp->rhsalias[i])==0 ){ + ErrorMsg(lemp->filename,rp->ruleline, + "%s(%s) has the same label as the LHS but is not the left-most " + "symbol on the RHS.", + rp->rhs[i]->name, rp->rhsalias); + lemp->errorcnt++; + } + for(j=0; jrhsalias[j] && strcmp(rp->rhsalias[j],rp->rhsalias[i])==0 ){ + ErrorMsg(lemp->filename,rp->ruleline, + "Label %s used for multiple symbols on the RHS of a rule.", + rp->rhsalias[i]); + lemp->errorcnt++; + break; + } + } + } + if( !used[i] ){ + ErrorMsg(lemp->filename,rp->ruleline, + "Label %s for \"%s(%s)\" is never used.", + rp->rhsalias[i],rp->rhs[i]->name,rp->rhsalias[i]); + lemp->errorcnt++; + } + }else if( i>0 && has_destructor(rp->rhs[i],lemp) ){ + append_str(" yy_destructor(yypParser,%d,&yymsp[%d].minor);\n", 0, + rp->rhs[i]->index,i-rp->nrhs+1); + } + } + + /* If unable to write LHS values directly into the stack, write the + ** saved LHS value now. */ + if( lhsdirect==0 ){ + append_str(" yymsp[%d].minor.yy%d = ", 0, 1-rp->nrhs, rp->lhs->dtnum); + append_str(zLhs, 0, 0, 0); + append_str(";\n", 0, 0, 0); + } + + /* Suffix code generation complete */ + cp = append_str(0,0,0,0); + if( cp && cp[0] ){ + rp->codeSuffix = Strsafe(cp); + rp->noCode = 0; + } + + return rc; +} + +/* +** Generate code which executes when the rule "rp" is reduced. Write +** the code to "out". Make sure lineno stays up-to-date. +*/ +PRIVATE void emit_code( + FILE *out, + struct rule *rp, + struct lemon *lemp, + int *lineno +){ + const char *cp; + + /* Setup code prior to the #line directive */ + if( rp->codePrefix && rp->codePrefix[0] ){ + fprintf(out, "{%s", rp->codePrefix); + for(cp=rp->codePrefix; *cp; cp++){ if( *cp=='\n' ) (*lineno)++; } + } + + /* Generate code to do the reduce action */ + if( rp->code ){ + if( !lemp->nolinenosflag ){ + (*lineno)++; + tplt_linedir(out,rp->line,lemp->filename); + } + fprintf(out,"{%s",rp->code); + for(cp=rp->code; *cp; cp++){ if( *cp=='\n' ) (*lineno)++; } + fprintf(out,"}\n"); (*lineno)++; + if( !lemp->nolinenosflag ){ + (*lineno)++; + tplt_linedir(out,*lineno,lemp->outname); + } + } + + /* Generate breakdown code that occurs after the #line directive */ + if( rp->codeSuffix && rp->codeSuffix[0] ){ + fprintf(out, "%s", rp->codeSuffix); + for(cp=rp->codeSuffix; *cp; cp++){ if( *cp=='\n' ) (*lineno)++; } + } + + if( rp->codePrefix ){ + fprintf(out, "}\n"); (*lineno)++; + } + + return; +} + +/* +** Print the definition of the union used for the parser's data stack. +** This union contains fields for every possible data type for tokens +** and nonterminals. In the process of computing and printing this +** union, also set the ".dtnum" field of every terminal and nonterminal +** symbol. +*/ +void print_stack_union( + FILE *out, /* The output stream */ + struct lemon *lemp, /* The main info structure for this parser */ + int *plineno, /* Pointer to the line number */ + int mhflag /* True if generating makeheaders output */ +){ + int lineno = *plineno; /* The line number of the output */ + char **types; /* A hash table of datatypes */ + int arraysize; /* Size of the "types" array */ + int maxdtlength; /* Maximum length of any ".datatype" field. */ + char *stddt; /* Standardized name for a datatype */ + int i,j; /* Loop counters */ + unsigned hash; /* For hashing the name of a type */ + const char *name; /* Name of the parser */ + + /* Allocate and initialize types[] and allocate stddt[] */ + arraysize = lemp->nsymbol * 2; + types = (char**)calloc( arraysize, sizeof(char*) ); + if( types==0 ){ + fprintf(stderr,"Out of memory.\n"); + exit(1); + } + for(i=0; ivartype ){ + maxdtlength = lemonStrlen(lemp->vartype); + } + for(i=0; insymbol; i++){ + int len; + struct symbol *sp = lemp->symbols[i]; + if( sp->datatype==0 ) continue; + len = lemonStrlen(sp->datatype); + if( len>maxdtlength ) maxdtlength = len; + } + stddt = (char*)malloc( maxdtlength*2 + 1 ); + if( stddt==0 ){ + fprintf(stderr,"Out of memory.\n"); + exit(1); + } + + /* Build a hash table of datatypes. The ".dtnum" field of each symbol + ** is filled in with the hash index plus 1. A ".dtnum" value of 0 is + ** used for terminal symbols. If there is no %default_type defined then + ** 0 is also used as the .dtnum value for nonterminals which do not specify + ** a datatype using the %type directive. + */ + for(i=0; insymbol; i++){ + struct symbol *sp = lemp->symbols[i]; + char *cp; + if( sp==lemp->errsym ){ + sp->dtnum = arraysize+1; + continue; + } + if( sp->type!=NONTERMINAL || (sp->datatype==0 && lemp->vartype==0) ){ + sp->dtnum = 0; + continue; + } + cp = sp->datatype; + if( cp==0 ) cp = lemp->vartype; + j = 0; + while( ISSPACE(*cp) ) cp++; + while( *cp ) stddt[j++] = *cp++; + while( j>0 && ISSPACE(stddt[j-1]) ) j--; + stddt[j] = 0; + if( lemp->tokentype && strcmp(stddt, lemp->tokentype)==0 ){ + sp->dtnum = 0; + continue; + } + hash = 0; + for(j=0; stddt[j]; j++){ + hash = hash*53 + stddt[j]; + } + hash = (hash & 0x7fffffff)%arraysize; + while( types[hash] ){ + if( strcmp(types[hash],stddt)==0 ){ + sp->dtnum = hash + 1; + break; + } + hash++; + if( hash>=(unsigned)arraysize ) hash = 0; + } + if( types[hash]==0 ){ + sp->dtnum = hash + 1; + types[hash] = (char*)malloc( lemonStrlen(stddt)+1 ); + if( types[hash]==0 ){ + fprintf(stderr,"Out of memory.\n"); + exit(1); + } + lemon_strcpy(types[hash],stddt); + } + } + + /* Print out the definition of YYTOKENTYPE and YYMINORTYPE */ + name = lemp->name ? lemp->name : "Parse"; + lineno = *plineno; + if( mhflag ){ fprintf(out,"#if INTERFACE\n"); lineno++; } + fprintf(out,"#define %sTOKENTYPE %s\n",name, + lemp->tokentype?lemp->tokentype:"void*"); lineno++; + if( mhflag ){ fprintf(out,"#endif\n"); lineno++; } + fprintf(out,"typedef union {\n"); lineno++; + fprintf(out," int yyinit;\n"); lineno++; + fprintf(out," %sTOKENTYPE yy0;\n",name); lineno++; + for(i=0; ierrsym->useCnt ){ + fprintf(out," int yy%d;\n",lemp->errsym->dtnum); lineno++; + } + free(stddt); + free(types); + fprintf(out,"} YYMINORTYPE;\n"); lineno++; + *plineno = lineno; +} + +/* +** Return the name of a C datatype able to represent values between +** lwr and upr, inclusive. If pnByte!=NULL then also write the sizeof +** for that type (1, 2, or 4) into *pnByte. +*/ +static const char *minimum_size_type(int lwr, int upr, int *pnByte){ + const char *zType = "int"; + int nByte = 4; + if( lwr>=0 ){ + if( upr<=255 ){ + zType = "unsigned char"; + nByte = 1; + }else if( upr<65535 ){ + zType = "unsigned short int"; + nByte = 2; + }else{ + zType = "unsigned int"; + nByte = 4; + } + }else if( lwr>=-127 && upr<=127 ){ + zType = "signed char"; + nByte = 1; + }else if( lwr>=-32767 && upr<32767 ){ + zType = "short"; + nByte = 2; + } + if( pnByte ) *pnByte = nByte; + return zType; +} + +/* +** Each state contains a set of token transaction and a set of +** nonterminal transactions. Each of these sets makes an instance +** of the following structure. An array of these structures is used +** to order the creation of entries in the yy_action[] table. +*/ +struct axset { + struct state *stp; /* A pointer to a state */ + int isTkn; /* True to use tokens. False for non-terminals */ + int nAction; /* Number of actions */ + int iOrder; /* Original order of action sets */ +}; + +/* +** Compare to axset structures for sorting purposes +*/ +static int axset_compare(const void *a, const void *b){ + struct axset *p1 = (struct axset*)a; + struct axset *p2 = (struct axset*)b; + int c; + c = p2->nAction - p1->nAction; + if( c==0 ){ + c = p1->iOrder - p2->iOrder; + } + assert( c!=0 || p1==p2 ); + return c; +} + +/* +** Write text on "out" that describes the rule "rp". +*/ +static void writeRuleText(FILE *out, struct rule *rp){ + int j; + fprintf(out,"%s ::=", rp->lhs->name); + for(j=0; jnrhs; j++){ + struct symbol *sp = rp->rhs[j]; + if( sp->type!=MULTITERMINAL ){ + fprintf(out," %s", sp->name); + }else{ + int k; + fprintf(out," %s", sp->subsym[0]->name); + for(k=1; knsubsym; k++){ + fprintf(out,"|%s",sp->subsym[k]->name); + } + } + } +} + + +/* Generate C source code for the parser */ +void ReportTable( + struct lemon *lemp, + int mhflag /* Output in makeheaders format if true */ +){ + FILE *out, *in; + char line[LINESIZE]; + int lineno; + struct state *stp; + struct action *ap; + struct rule *rp; + struct acttab *pActtab; + int i, j, n, sz; + int szActionType; /* sizeof(YYACTIONTYPE) */ + int szCodeType; /* sizeof(YYCODETYPE) */ + const char *name; + int mnTknOfst, mxTknOfst; + int mnNtOfst, mxNtOfst; + struct axset *ax; + + in = tplt_open(lemp); + if( in==0 ) return; + out = file_open(lemp,".c","wb"); + if( out==0 ){ + fclose(in); + return; + } + lineno = 1; + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate the include code, if any */ + tplt_print(out,lemp,lemp->include,&lineno); + if( mhflag ){ + char *incName = file_makename(lemp, ".h"); + fprintf(out,"#include \"%s\"\n", incName); lineno++; + free(incName); + } + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate #defines for all tokens */ + if( mhflag ){ + const char *prefix; + fprintf(out,"#if INTERFACE\n"); lineno++; + if( lemp->tokenprefix ) prefix = lemp->tokenprefix; + else prefix = ""; + for(i=1; interminal; i++){ + fprintf(out,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i); + lineno++; + } + fprintf(out,"#endif\n"); lineno++; + } + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate the defines */ + fprintf(out,"#define YYCODETYPE %s\n", + minimum_size_type(0, lemp->nsymbol+1, &szCodeType)); lineno++; + fprintf(out,"#define YYNOCODE %d\n",lemp->nsymbol+1); lineno++; + fprintf(out,"#define YYACTIONTYPE %s\n", + minimum_size_type(0,lemp->nstate+lemp->nrule*2+5,&szActionType)); lineno++; + if( lemp->wildcard ){ + fprintf(out,"#define YYWILDCARD %d\n", + lemp->wildcard->index); lineno++; + } + print_stack_union(out,lemp,&lineno,mhflag); + fprintf(out, "#ifndef YYSTACKDEPTH\n"); lineno++; + if( lemp->stacksize ){ + fprintf(out,"#define YYSTACKDEPTH %s\n",lemp->stacksize); lineno++; + }else{ + fprintf(out,"#define YYSTACKDEPTH 100\n"); lineno++; + } + fprintf(out, "#endif\n"); lineno++; + if( mhflag ){ + fprintf(out,"#if INTERFACE\n"); lineno++; + } + name = lemp->name ? lemp->name : "Parse"; + if( lemp->arg && lemp->arg[0] ){ + i = lemonStrlen(lemp->arg); + while( i>=1 && ISSPACE(lemp->arg[i-1]) ) i--; + while( i>=1 && (ISALNUM(lemp->arg[i-1]) || lemp->arg[i-1]=='_') ) i--; + fprintf(out,"#define %sARG_SDECL %s;\n",name,lemp->arg); lineno++; + fprintf(out,"#define %sARG_PDECL ,%s\n",name,lemp->arg); lineno++; + fprintf(out,"#define %sARG_FETCH %s = yypParser->%s\n", + name,lemp->arg,&lemp->arg[i]); lineno++; + fprintf(out,"#define %sARG_STORE yypParser->%s = %s\n", + name,&lemp->arg[i],&lemp->arg[i]); lineno++; + }else{ + fprintf(out,"#define %sARG_SDECL\n",name); lineno++; + fprintf(out,"#define %sARG_PDECL\n",name); lineno++; + fprintf(out,"#define %sARG_FETCH\n",name); lineno++; + fprintf(out,"#define %sARG_STORE\n",name); lineno++; + } + if( mhflag ){ + fprintf(out,"#endif\n"); lineno++; + } + if( lemp->errsym->useCnt ){ + fprintf(out,"#define YYERRORSYMBOL %d\n",lemp->errsym->index); lineno++; + fprintf(out,"#define YYERRSYMDT yy%d\n",lemp->errsym->dtnum); lineno++; + } + if( lemp->has_fallback ){ + fprintf(out,"#define YYFALLBACK 1\n"); lineno++; + } + + /* Compute the action table, but do not output it yet. The action + ** table must be computed before generating the YYNSTATE macro because + ** we need to know how many states can be eliminated. + */ + ax = (struct axset *) calloc(lemp->nxstate*2, sizeof(ax[0])); + if( ax==0 ){ + fprintf(stderr,"malloc failed\n"); + exit(1); + } + for(i=0; inxstate; i++){ + stp = lemp->sorted[i]; + ax[i*2].stp = stp; + ax[i*2].isTkn = 1; + ax[i*2].nAction = stp->nTknAct; + ax[i*2+1].stp = stp; + ax[i*2+1].isTkn = 0; + ax[i*2+1].nAction = stp->nNtAct; + } + mxTknOfst = mnTknOfst = 0; + mxNtOfst = mnNtOfst = 0; + /* In an effort to minimize the action table size, use the heuristic + ** of placing the largest action sets first */ + for(i=0; inxstate*2; i++) ax[i].iOrder = i; + qsort(ax, lemp->nxstate*2, sizeof(ax[0]), axset_compare); + pActtab = acttab_alloc(); + for(i=0; inxstate*2 && ax[i].nAction>0; i++){ + stp = ax[i].stp; + if( ax[i].isTkn ){ + for(ap=stp->ap; ap; ap=ap->next){ + int action; + if( ap->sp->index>=lemp->nterminal ) continue; + action = compute_action(lemp, ap); + if( action<0 ) continue; + acttab_action(pActtab, ap->sp->index, action); + } + stp->iTknOfst = acttab_insert(pActtab); + if( stp->iTknOfstiTknOfst; + if( stp->iTknOfst>mxTknOfst ) mxTknOfst = stp->iTknOfst; + }else{ + for(ap=stp->ap; ap; ap=ap->next){ + int action; + if( ap->sp->indexnterminal ) continue; + if( ap->sp->index==lemp->nsymbol ) continue; + action = compute_action(lemp, ap); + if( action<0 ) continue; + acttab_action(pActtab, ap->sp->index, action); + } + stp->iNtOfst = acttab_insert(pActtab); + if( stp->iNtOfstiNtOfst; + if( stp->iNtOfst>mxNtOfst ) mxNtOfst = stp->iNtOfst; + } +#if 0 /* Uncomment for a trace of how the yy_action[] table fills out */ + { int jj, nn; + for(jj=nn=0; jjnAction; jj++){ + if( pActtab->aAction[jj].action<0 ) nn++; + } + printf("%4d: State %3d %s n: %2d size: %5d freespace: %d\n", + i, stp->statenum, ax[i].isTkn ? "Token" : "Var ", + ax[i].nAction, pActtab->nAction, nn); + } +#endif + } + free(ax); + + /* Mark rules that are actually used for reduce actions after all + ** optimizations have been applied + */ + for(rp=lemp->rule; rp; rp=rp->next) rp->doesReduce = LEMON_FALSE; + for(i=0; inxstate; i++){ + for(ap=lemp->sorted[i]->ap; ap; ap=ap->next){ + if( ap->type==REDUCE || ap->type==SHIFTREDUCE ){ + ap->x.rp->doesReduce = 1; + } + } + } + + /* Finish rendering the constants now that the action table has + ** been computed */ + fprintf(out,"#define YYNSTATE %d\n",lemp->nxstate); lineno++; + fprintf(out,"#define YYNRULE %d\n",lemp->nrule); lineno++; + fprintf(out,"#define YY_MAX_SHIFT %d\n",lemp->nxstate-1); lineno++; + fprintf(out,"#define YY_MIN_SHIFTREDUCE %d\n",lemp->nstate); lineno++; + i = lemp->nstate + lemp->nrule; + fprintf(out,"#define YY_MAX_SHIFTREDUCE %d\n", i-1); lineno++; + fprintf(out,"#define YY_MIN_REDUCE %d\n", i); lineno++; + i = lemp->nstate + lemp->nrule*2; + fprintf(out,"#define YY_MAX_REDUCE %d\n", i-1); lineno++; + fprintf(out,"#define YY_ERROR_ACTION %d\n", i); lineno++; + fprintf(out,"#define YY_ACCEPT_ACTION %d\n", i+1); lineno++; + fprintf(out,"#define YY_NO_ACTION %d\n", i+2); lineno++; + tplt_xfer(lemp->name,in,out,&lineno); + + /* Now output the action table and its associates: + ** + ** yy_action[] A single table containing all actions. + ** yy_lookahead[] A table containing the lookahead for each entry in + ** yy_action. Used to detect hash collisions. + ** yy_shift_ofst[] For each state, the offset into yy_action for + ** shifting terminals. + ** yy_reduce_ofst[] For each state, the offset into yy_action for + ** shifting non-terminals after a reduce. + ** yy_default[] Default action for each state. + */ + + /* Output the yy_action table */ + lemp->nactiontab = n = acttab_size(pActtab); + lemp->tablesize += n*szActionType; + fprintf(out,"#define YY_ACTTAB_COUNT (%d)\n", n); lineno++; + fprintf(out,"static const YYACTIONTYPE yy_action[] = {\n"); lineno++; + for(i=j=0; instate + lemp->nrule + 2; + if( j==0 ) fprintf(out," /* %5d */ ", i); + fprintf(out, " %4d,", action); + if( j==9 || i==n-1 ){ + fprintf(out, "\n"); lineno++; + j = 0; + }else{ + j++; + } + } + fprintf(out, "};\n"); lineno++; + + /* Output the yy_lookahead table */ + lemp->tablesize += n*szCodeType; + fprintf(out,"static const YYCODETYPE yy_lookahead[] = {\n"); lineno++; + for(i=j=0; insymbol; + if( j==0 ) fprintf(out," /* %5d */ ", i); + fprintf(out, " %4d,", la); + if( j==9 || i==n-1 ){ + fprintf(out, "\n"); lineno++; + j = 0; + }else{ + j++; + } + } + fprintf(out, "};\n"); lineno++; + + /* Output the yy_shift_ofst[] table */ + n = lemp->nxstate; + while( n>0 && lemp->sorted[n-1]->iTknOfst==NO_OFFSET ) n--; + fprintf(out, "#define YY_SHIFT_USE_DFLT (%d)\n", lemp->nactiontab); lineno++; + fprintf(out, "#define YY_SHIFT_COUNT (%d)\n", n-1); lineno++; + fprintf(out, "#define YY_SHIFT_MIN (%d)\n", mnTknOfst); lineno++; + fprintf(out, "#define YY_SHIFT_MAX (%d)\n", mxTknOfst); lineno++; + fprintf(out, "static const %s yy_shift_ofst[] = {\n", + minimum_size_type(mnTknOfst, lemp->nterminal+lemp->nactiontab, &sz)); + lineno++; + lemp->tablesize += n*sz; + for(i=j=0; isorted[i]; + ofst = stp->iTknOfst; + if( ofst==NO_OFFSET ) ofst = lemp->nactiontab; + if( j==0 ) fprintf(out," /* %5d */ ", i); + fprintf(out, " %4d,", ofst); + if( j==9 || i==n-1 ){ + fprintf(out, "\n"); lineno++; + j = 0; + }else{ + j++; + } + } + fprintf(out, "};\n"); lineno++; + + /* Output the yy_reduce_ofst[] table */ + fprintf(out, "#define YY_REDUCE_USE_DFLT (%d)\n", mnNtOfst-1); lineno++; + n = lemp->nxstate; + while( n>0 && lemp->sorted[n-1]->iNtOfst==NO_OFFSET ) n--; + fprintf(out, "#define YY_REDUCE_COUNT (%d)\n", n-1); lineno++; + fprintf(out, "#define YY_REDUCE_MIN (%d)\n", mnNtOfst); lineno++; + fprintf(out, "#define YY_REDUCE_MAX (%d)\n", mxNtOfst); lineno++; + fprintf(out, "static const %s yy_reduce_ofst[] = {\n", + minimum_size_type(mnNtOfst-1, mxNtOfst, &sz)); lineno++; + lemp->tablesize += n*sz; + for(i=j=0; isorted[i]; + ofst = stp->iNtOfst; + if( ofst==NO_OFFSET ) ofst = mnNtOfst - 1; + if( j==0 ) fprintf(out," /* %5d */ ", i); + fprintf(out, " %4d,", ofst); + if( j==9 || i==n-1 ){ + fprintf(out, "\n"); lineno++; + j = 0; + }else{ + j++; + } + } + fprintf(out, "};\n"); lineno++; + + /* Output the default action table */ + fprintf(out, "static const YYACTIONTYPE yy_default[] = {\n"); lineno++; + n = lemp->nxstate; + lemp->tablesize += n*szActionType; + for(i=j=0; isorted[i]; + if( j==0 ) fprintf(out," /* %5d */ ", i); + fprintf(out, " %4d,", stp->iDfltReduce+lemp->nstate+lemp->nrule); + if( j==9 || i==n-1 ){ + fprintf(out, "\n"); lineno++; + j = 0; + }else{ + j++; + } + } + fprintf(out, "};\n"); lineno++; + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate the table of fallback tokens. + */ + if( lemp->has_fallback ){ + int mx = lemp->nterminal - 1; + while( mx>0 && lemp->symbols[mx]->fallback==0 ){ mx--; } + lemp->tablesize += (mx+1)*szCodeType; + for(i=0; i<=mx; i++){ + struct symbol *p = lemp->symbols[i]; + if( p->fallback==0 ){ + fprintf(out, " 0, /* %10s => nothing */\n", p->name); + }else{ + fprintf(out, " %3d, /* %10s => %s */\n", p->fallback->index, + p->name, p->fallback->name); + } + lineno++; + } + } + tplt_xfer(lemp->name, in, out, &lineno); + + /* Generate a table containing the symbolic name of every symbol + */ + for(i=0; insymbol; i++){ + lemon_sprintf(line,"\"%s\",",lemp->symbols[i]->name); + fprintf(out," %-15s",line); + if( (i&3)==3 ){ fprintf(out,"\n"); lineno++; } + } + if( (i&3)!=0 ){ fprintf(out,"\n"); lineno++; } + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate a table containing a text string that describes every + ** rule in the rule set of the grammar. This information is used + ** when tracing REDUCE actions. + */ + for(i=0, rp=lemp->rule; rp; rp=rp->next, i++){ + assert( rp->iRule==i ); + fprintf(out," /* %3d */ \"", i); + writeRuleText(out, rp); + fprintf(out,"\",\n"); lineno++; + } + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate code which executes every time a symbol is popped from + ** the stack while processing errors or while destroying the parser. + ** (In other words, generate the %destructor actions) + */ + if( lemp->tokendest ){ + int once = 1; + for(i=0; insymbol; i++){ + struct symbol *sp = lemp->symbols[i]; + if( sp==0 || sp->type!=TERMINAL ) continue; + if( once ){ + fprintf(out, " /* TERMINAL Destructor */\n"); lineno++; + once = 0; + } + fprintf(out," case %d: /* %s */\n", sp->index, sp->name); lineno++; + } + for(i=0; insymbol && lemp->symbols[i]->type!=TERMINAL; i++); + if( insymbol ){ + emit_destructor_code(out,lemp->symbols[i],lemp,&lineno); + fprintf(out," break;\n"); lineno++; + } + } + if( lemp->vardest ){ + struct symbol *dflt_sp = 0; + int once = 1; + for(i=0; insymbol; i++){ + struct symbol *sp = lemp->symbols[i]; + if( sp==0 || sp->type==TERMINAL || + sp->index<=0 || sp->destructor!=0 ) continue; + if( once ){ + fprintf(out, " /* Default NON-TERMINAL Destructor */\n"); lineno++; + once = 0; + } + fprintf(out," case %d: /* %s */\n", sp->index, sp->name); lineno++; + dflt_sp = sp; + } + if( dflt_sp!=0 ){ + emit_destructor_code(out,dflt_sp,lemp,&lineno); + } + fprintf(out," break;\n"); lineno++; + } + for(i=0; insymbol; i++){ + struct symbol *sp = lemp->symbols[i]; + if( sp==0 || sp->type==TERMINAL || sp->destructor==0 ) continue; + if( sp->destLineno<0 ) continue; /* Already emitted */ + fprintf(out," case %d: /* %s */\n", sp->index, sp->name); lineno++; + + /* Combine duplicate destructors into a single case */ + for(j=i+1; jnsymbol; j++){ + struct symbol *sp2 = lemp->symbols[j]; + if( sp2 && sp2->type!=TERMINAL && sp2->destructor + && sp2->dtnum==sp->dtnum + && strcmp(sp->destructor,sp2->destructor)==0 ){ + fprintf(out," case %d: /* %s */\n", + sp2->index, sp2->name); lineno++; + sp2->destLineno = -1; /* Avoid emitting this destructor again */ + } + } + + emit_destructor_code(out,lemp->symbols[i],lemp,&lineno); + fprintf(out," break;\n"); lineno++; + } + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate code which executes whenever the parser stack overflows */ + tplt_print(out,lemp,lemp->overflow,&lineno); + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate the table of rule information + ** + ** Note: This code depends on the fact that rules are number + ** sequentually beginning with 0. + */ + for(rp=lemp->rule; rp; rp=rp->next){ + fprintf(out," { %d, %d },\n",rp->lhs->index,-rp->nrhs); lineno++; + } + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate code which execution during each REDUCE action */ + i = 0; + for(rp=lemp->rule; rp; rp=rp->next){ + i += translate_code(lemp, rp); + } + if( i ){ + fprintf(out," YYMINORTYPE yylhsminor;\n"); lineno++; + } + /* First output rules other than the default: rule */ + for(rp=lemp->rule; rp; rp=rp->next){ + struct rule *rp2; /* Other rules with the same action */ + if( rp->codeEmitted ) continue; + if( rp->noCode ){ + /* No C code actions, so this will be part of the "default:" rule */ + continue; + } + fprintf(out," case %d: /* ", rp->iRule); + writeRuleText(out, rp); + fprintf(out, " */\n"); lineno++; + for(rp2=rp->next; rp2; rp2=rp2->next){ + if( rp2->code==rp->code && rp2->codePrefix==rp->codePrefix + && rp2->codeSuffix==rp->codeSuffix ){ + fprintf(out," case %d: /* ", rp2->iRule); + writeRuleText(out, rp2); + fprintf(out," */ yytestcase(yyruleno==%d);\n", rp2->iRule); lineno++; + rp2->codeEmitted = 1; + } + } + emit_code(out,rp,lemp,&lineno); + fprintf(out," break;\n"); lineno++; + rp->codeEmitted = 1; + } + /* Finally, output the default: rule. We choose as the default: all + ** empty actions. */ + fprintf(out," default:\n"); lineno++; + for(rp=lemp->rule; rp; rp=rp->next){ + if( rp->codeEmitted ) continue; + assert( rp->noCode ); + fprintf(out," /* (%d) ", rp->iRule); + writeRuleText(out, rp); + if( rp->doesReduce ){ + fprintf(out, " */ yytestcase(yyruleno==%d);\n", rp->iRule); lineno++; + }else{ + fprintf(out, " (OPTIMIZED OUT) */ assert(yyruleno!=%d);\n", + rp->iRule); lineno++; + } + } + fprintf(out," break;\n"); lineno++; + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate code which executes if a parse fails */ + tplt_print(out,lemp,lemp->failure,&lineno); + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate code which executes when a syntax error occurs */ + tplt_print(out,lemp,lemp->error,&lineno); + tplt_xfer(lemp->name,in,out,&lineno); + + /* Generate code which executes when the parser accepts its input */ + tplt_print(out,lemp,lemp->accept,&lineno); + tplt_xfer(lemp->name,in,out,&lineno); + + /* Append any addition code the user desires */ + tplt_print(out,lemp,lemp->extracode,&lineno); + + fclose(in); + fclose(out); + return; +} + +/* Generate a header file for the parser */ +void ReportHeader(struct lemon *lemp) +{ + FILE *out, *in; + const char *prefix; + char line[LINESIZE]; + char pattern[LINESIZE]; + int i; + + if( lemp->tokenprefix ) prefix = lemp->tokenprefix; + else prefix = ""; + in = file_open(lemp,".h","rb"); + if( in ){ + int nextChar; + for(i=1; interminal && fgets(line,LINESIZE,in); i++){ + lemon_sprintf(pattern,"#define %s%-30s %3d\n", + prefix,lemp->symbols[i]->name,i); + if( strcmp(line,pattern) ) break; + } + nextChar = fgetc(in); + fclose(in); + if( i==lemp->nterminal && nextChar==EOF ){ + /* No change in the file. Don't rewrite it. */ + return; + } + } + out = file_open(lemp,".h","wb"); + if( out ){ + for(i=1; interminal; i++){ + fprintf(out,"#define %s%-30s %3d\n",prefix,lemp->symbols[i]->name,i); + } + fclose(out); + } + return; +} + +/* Reduce the size of the action tables, if possible, by making use +** of defaults. +** +** In this version, we take the most frequent REDUCE action and make +** it the default. Except, there is no default if the wildcard token +** is a possible look-ahead. +*/ +void CompressTables(struct lemon *lemp) +{ + struct state *stp; + struct action *ap, *ap2, *nextap; + struct rule *rp, *rp2, *rbest; + int nbest, n; + int i; + int usesWildcard; + + for(i=0; instate; i++){ + stp = lemp->sorted[i]; + nbest = 0; + rbest = 0; + usesWildcard = 0; + + for(ap=stp->ap; ap; ap=ap->next){ + if( ap->type==SHIFT && ap->sp==lemp->wildcard ){ + usesWildcard = 1; + } + if( ap->type!=REDUCE ) continue; + rp = ap->x.rp; + if( rp->lhsStart ) continue; + if( rp==rbest ) continue; + n = 1; + for(ap2=ap->next; ap2; ap2=ap2->next){ + if( ap2->type!=REDUCE ) continue; + rp2 = ap2->x.rp; + if( rp2==rbest ) continue; + if( rp2==rp ) n++; + } + if( n>nbest ){ + nbest = n; + rbest = rp; + } + } + + /* Do not make a default if the number of rules to default + ** is not at least 1 or if the wildcard token is a possible + ** lookahead. + */ + if( nbest<1 || usesWildcard ) continue; + + + /* Combine matching REDUCE actions into a single default */ + for(ap=stp->ap; ap; ap=ap->next){ + if( ap->type==REDUCE && ap->x.rp==rbest ) break; + } + assert( ap ); + ap->sp = Symbol_new("{default}"); + for(ap=ap->next; ap; ap=ap->next){ + if( ap->type==REDUCE && ap->x.rp==rbest ) ap->type = NOT_USED; + } + stp->ap = Action_sort(stp->ap); + + for(ap=stp->ap; ap; ap=ap->next){ + if( ap->type==SHIFT ) break; + if( ap->type==REDUCE && ap->x.rp!=rbest ) break; + } + if( ap==0 ){ + stp->autoReduce = 1; + stp->pDfltReduce = rbest; + } + } + + /* Make a second pass over all states and actions. Convert + ** every action that is a SHIFT to an autoReduce state into + ** a SHIFTREDUCE action. + */ + for(i=0; instate; i++){ + stp = lemp->sorted[i]; + for(ap=stp->ap; ap; ap=ap->next){ + struct state *pNextState; + if( ap->type!=SHIFT ) continue; + pNextState = ap->x.stp; + if( pNextState->autoReduce && pNextState->pDfltReduce!=0 ){ + ap->type = SHIFTREDUCE; + ap->x.rp = pNextState->pDfltReduce; + } + } + } + + /* If a SHIFTREDUCE action specifies a rule that has a single RHS term + ** (meaning that the SHIFTREDUCE will land back in the state where it + ** started) and if there is no C-code associated with the reduce action, + ** then we can go ahead and convert the action to be the same as the + ** action for the RHS of the rule. + */ + for(i=0; instate; i++){ + stp = lemp->sorted[i]; + for(ap=stp->ap; ap; ap=nextap){ + nextap = ap->next; + if( ap->type!=SHIFTREDUCE ) continue; + rp = ap->x.rp; + if( rp->noCode==0 ) continue; + if( rp->nrhs!=1 ) continue; +#if 1 + /* Only apply this optimization to non-terminals. It would be OK to + ** apply it to terminal symbols too, but that makes the parser tables + ** larger. */ + if( ap->sp->indexnterminal ) continue; +#endif + /* If we reach this point, it means the optimization can be applied */ + nextap = ap; + for(ap2=stp->ap; ap2 && (ap2==ap || ap2->sp!=rp->lhs); ap2=ap2->next){} + assert( ap2!=0 ); + ap->spOpt = ap2->sp; + ap->type = ap2->type; + ap->x = ap2->x; + } + } +} + + +/* +** Compare two states for sorting purposes. The smaller state is the +** one with the most non-terminal actions. If they have the same number +** of non-terminal actions, then the smaller is the one with the most +** token actions. +*/ +static int stateResortCompare(const void *a, const void *b){ + const struct state *pA = *(const struct state**)a; + const struct state *pB = *(const struct state**)b; + int n; + + n = pB->nNtAct - pA->nNtAct; + if( n==0 ){ + n = pB->nTknAct - pA->nTknAct; + if( n==0 ){ + n = pB->statenum - pA->statenum; + } + } + assert( n!=0 ); + return n; +} + + +/* +** Renumber and resort states so that states with fewer choices +** occur at the end. Except, keep state 0 as the first state. +*/ +void ResortStates(struct lemon *lemp) +{ + int i; + struct state *stp; + struct action *ap; + + for(i=0; instate; i++){ + stp = lemp->sorted[i]; + stp->nTknAct = stp->nNtAct = 0; + stp->iDfltReduce = lemp->nrule; /* Init dflt action to "syntax error" */ + stp->iTknOfst = NO_OFFSET; + stp->iNtOfst = NO_OFFSET; + for(ap=stp->ap; ap; ap=ap->next){ + int iAction = compute_action(lemp,ap); + if( iAction>=0 ){ + if( ap->sp->indexnterminal ){ + stp->nTknAct++; + }else if( ap->sp->indexnsymbol ){ + stp->nNtAct++; + }else{ + assert( stp->autoReduce==0 || stp->pDfltReduce==ap->x.rp ); + stp->iDfltReduce = iAction - lemp->nstate - lemp->nrule; + } + } + } + } + qsort(&lemp->sorted[1], lemp->nstate-1, sizeof(lemp->sorted[0]), + stateResortCompare); + for(i=0; instate; i++){ + lemp->sorted[i]->statenum = i; + } + lemp->nxstate = lemp->nstate; + while( lemp->nxstate>1 && lemp->sorted[lemp->nxstate-1]->autoReduce ){ + lemp->nxstate--; + } +} + + +/***************** From the file "set.c" ************************************/ +/* +** Set manipulation routines for the LEMON parser generator. +*/ + +static int size = 0; + +/* Set the set size */ +void SetSize(int n) +{ + size = n+1; +} + +/* Allocate a new set */ +char *SetNew(void){ + char *s; + s = (char*)calloc( size, 1); + if( s==0 ){ + extern void memory_error(); + memory_error(); + } + return s; +} + +/* Deallocate a set */ +void SetFree(char *s) +{ + free(s); +} + +/* Add a new element to the set. Return TRUE if the element was added +** and FALSE if it was already there. */ +int SetAdd(char *s, int e) +{ + int rv; + assert( e>=0 && esize = 1024; + x1a->count = 0; + x1a->tbl = (x1node*)calloc(1024, sizeof(x1node) + sizeof(x1node*)); + if( x1a->tbl==0 ){ + free(x1a); + x1a = 0; + }else{ + int i; + x1a->ht = (x1node**)&(x1a->tbl[1024]); + for(i=0; i<1024; i++) x1a->ht[i] = 0; + } + } +} +/* Insert a new record into the array. Return TRUE if successful. +** Prior data with the same key is NOT overwritten */ +int Strsafe_insert(const char *data) +{ + x1node *np; + unsigned h; + unsigned ph; + + if( x1a==0 ) return 0; + ph = strhash(data); + h = ph & (x1a->size-1); + np = x1a->ht[h]; + while( np ){ + if( strcmp(np->data,data)==0 ){ + /* An existing entry with the same key is found. */ + /* Fail because overwrite is not allows. */ + return 0; + } + np = np->next; + } + if( x1a->count>=x1a->size ){ + /* Need to make the hash table bigger */ + int i,arrSize; + struct s_x1 array; + array.size = arrSize = x1a->size*2; + array.count = x1a->count; + array.tbl = (x1node*)calloc(arrSize, sizeof(x1node) + sizeof(x1node*)); + if( array.tbl==0 ) return 0; /* Fail due to malloc failure */ + array.ht = (x1node**)&(array.tbl[arrSize]); + for(i=0; icount; i++){ + x1node *oldnp, *newnp; + oldnp = &(x1a->tbl[i]); + h = strhash(oldnp->data) & (arrSize-1); + newnp = &(array.tbl[i]); + if( array.ht[h] ) array.ht[h]->from = &(newnp->next); + newnp->next = array.ht[h]; + newnp->data = oldnp->data; + newnp->from = &(array.ht[h]); + array.ht[h] = newnp; + } + free(x1a->tbl); + *x1a = array; + } + /* Insert the new data */ + h = ph & (x1a->size-1); + np = &(x1a->tbl[x1a->count++]); + np->data = data; + if( x1a->ht[h] ) x1a->ht[h]->from = &(np->next); + np->next = x1a->ht[h]; + x1a->ht[h] = np; + np->from = &(x1a->ht[h]); + return 1; +} + +/* Return a pointer to data assigned to the given key. Return NULL +** if no such key. */ +const char *Strsafe_find(const char *key) +{ + unsigned h; + x1node *np; + + if( x1a==0 ) return 0; + h = strhash(key) & (x1a->size-1); + np = x1a->ht[h]; + while( np ){ + if( strcmp(np->data,key)==0 ) break; + np = np->next; + } + return np ? np->data : 0; +} + +/* Return a pointer to the (terminal or nonterminal) symbol "x". +** Create a new symbol if this is the first time "x" has been seen. +*/ +struct symbol *Symbol_new(const char *x) +{ + struct symbol *sp; + + sp = Symbol_find(x); + if( sp==0 ){ + sp = (struct symbol *)calloc(1, sizeof(struct symbol) ); + MemoryCheck(sp); + sp->name = Strsafe(x); + sp->type = ISUPPER(*x) ? TERMINAL : NONTERMINAL; + sp->rule = 0; + sp->fallback = 0; + sp->prec = -1; + sp->assoc = UNK; + sp->firstset = 0; + sp->lambda = LEMON_FALSE; + sp->destructor = 0; + sp->destLineno = 0; + sp->datatype = 0; + sp->useCnt = 0; + Symbol_insert(sp,sp->name); + } + sp->useCnt++; + return sp; +} + +/* Compare two symbols for sorting purposes. Return negative, +** zero, or positive if a is less then, equal to, or greater +** than b. +** +** Symbols that begin with upper case letters (terminals or tokens) +** must sort before symbols that begin with lower case letters +** (non-terminals). And MULTITERMINAL symbols (created using the +** %token_class directive) must sort at the very end. Other than +** that, the order does not matter. +** +** We find experimentally that leaving the symbols in their original +** order (the order they appeared in the grammar file) gives the +** smallest parser tables in SQLite. +*/ +int Symbolcmpp(const void *_a, const void *_b) +{ + const struct symbol *a = *(const struct symbol **) _a; + const struct symbol *b = *(const struct symbol **) _b; + int i1 = a->type==MULTITERMINAL ? 3 : a->name[0]>'Z' ? 2 : 1; + int i2 = b->type==MULTITERMINAL ? 3 : b->name[0]>'Z' ? 2 : 1; + return i1==i2 ? a->index - b->index : i1 - i2; +} + +/* There is one instance of the following structure for each +** associative array of type "x2". +*/ +struct s_x2 { + int size; /* The number of available slots. */ + /* Must be a power of 2 greater than or */ + /* equal to 1 */ + int count; /* Number of currently slots filled */ + struct s_x2node *tbl; /* The data stored here */ + struct s_x2node **ht; /* Hash table for lookups */ +}; + +/* There is one instance of this structure for every data element +** in an associative array of type "x2". +*/ +typedef struct s_x2node { + struct symbol *data; /* The data */ + const char *key; /* The key */ + struct s_x2node *next; /* Next entry with the same hash */ + struct s_x2node **from; /* Previous link */ +} x2node; + +/* There is only one instance of the array, which is the following */ +static struct s_x2 *x2a; + +/* Allocate a new associative array */ +void Symbol_init(void){ + if( x2a ) return; + x2a = (struct s_x2*)malloc( sizeof(struct s_x2) ); + if( x2a ){ + x2a->size = 128; + x2a->count = 0; + x2a->tbl = (x2node*)calloc(128, sizeof(x2node) + sizeof(x2node*)); + if( x2a->tbl==0 ){ + free(x2a); + x2a = 0; + }else{ + int i; + x2a->ht = (x2node**)&(x2a->tbl[128]); + for(i=0; i<128; i++) x2a->ht[i] = 0; + } + } +} +/* Insert a new record into the array. Return TRUE if successful. +** Prior data with the same key is NOT overwritten */ +int Symbol_insert(struct symbol *data, const char *key) +{ + x2node *np; + unsigned h; + unsigned ph; + + if( x2a==0 ) return 0; + ph = strhash(key); + h = ph & (x2a->size-1); + np = x2a->ht[h]; + while( np ){ + if( strcmp(np->key,key)==0 ){ + /* An existing entry with the same key is found. */ + /* Fail because overwrite is not allows. */ + return 0; + } + np = np->next; + } + if( x2a->count>=x2a->size ){ + /* Need to make the hash table bigger */ + int i,arrSize; + struct s_x2 array; + array.size = arrSize = x2a->size*2; + array.count = x2a->count; + array.tbl = (x2node*)calloc(arrSize, sizeof(x2node) + sizeof(x2node*)); + if( array.tbl==0 ) return 0; /* Fail due to malloc failure */ + array.ht = (x2node**)&(array.tbl[arrSize]); + for(i=0; icount; i++){ + x2node *oldnp, *newnp; + oldnp = &(x2a->tbl[i]); + h = strhash(oldnp->key) & (arrSize-1); + newnp = &(array.tbl[i]); + if( array.ht[h] ) array.ht[h]->from = &(newnp->next); + newnp->next = array.ht[h]; + newnp->key = oldnp->key; + newnp->data = oldnp->data; + newnp->from = &(array.ht[h]); + array.ht[h] = newnp; + } + free(x2a->tbl); + *x2a = array; + } + /* Insert the new data */ + h = ph & (x2a->size-1); + np = &(x2a->tbl[x2a->count++]); + np->key = key; + np->data = data; + if( x2a->ht[h] ) x2a->ht[h]->from = &(np->next); + np->next = x2a->ht[h]; + x2a->ht[h] = np; + np->from = &(x2a->ht[h]); + return 1; +} + +/* Return a pointer to data assigned to the given key. Return NULL +** if no such key. */ +struct symbol *Symbol_find(const char *key) +{ + unsigned h; + x2node *np; + + if( x2a==0 ) return 0; + h = strhash(key) & (x2a->size-1); + np = x2a->ht[h]; + while( np ){ + if( strcmp(np->key,key)==0 ) break; + np = np->next; + } + return np ? np->data : 0; +} + +/* Return the n-th data. Return NULL if n is out of range. */ +struct symbol *Symbol_Nth(int n) +{ + struct symbol *data; + if( x2a && n>0 && n<=x2a->count ){ + data = x2a->tbl[n-1].data; + }else{ + data = 0; + } + return data; +} + +/* Return the size of the array */ +int Symbol_count() +{ + return x2a ? x2a->count : 0; +} + +/* Return an array of pointers to all data in the table. +** The array is obtained from malloc. Return NULL if memory allocation +** problems, or if the array is empty. */ +struct symbol **Symbol_arrayof() +{ + struct symbol **array; + int i,arrSize; + if( x2a==0 ) return 0; + arrSize = x2a->count; + array = (struct symbol **)calloc(arrSize, sizeof(struct symbol *)); + if( array ){ + for(i=0; itbl[i].data; + } + return array; +} + +/* Compare two configurations */ +int Configcmp(const char *_a,const char *_b) +{ + const struct config *a = (struct config *) _a; + const struct config *b = (struct config *) _b; + int x; + x = a->rp->index - b->rp->index; + if( x==0 ) x = a->dot - b->dot; + return x; +} + +/* Compare two states */ +PRIVATE int statecmp(struct config *a, struct config *b) +{ + int rc; + for(rc=0; rc==0 && a && b; a=a->bp, b=b->bp){ + rc = a->rp->index - b->rp->index; + if( rc==0 ) rc = a->dot - b->dot; + } + if( rc==0 ){ + if( a ) rc = 1; + if( b ) rc = -1; + } + return rc; +} + +/* Hash a state */ +PRIVATE unsigned statehash(struct config *a) +{ + unsigned h=0; + while( a ){ + h = h*571 + a->rp->index*37 + a->dot; + a = a->bp; + } + return h; +} + +/* Allocate a new state structure */ +struct state *State_new() +{ + struct state *newstate; + newstate = (struct state *)calloc(1, sizeof(struct state) ); + MemoryCheck(newstate); + return newstate; +} + +/* There is one instance of the following structure for each +** associative array of type "x3". +*/ +struct s_x3 { + int size; /* The number of available slots. */ + /* Must be a power of 2 greater than or */ + /* equal to 1 */ + int count; /* Number of currently slots filled */ + struct s_x3node *tbl; /* The data stored here */ + struct s_x3node **ht; /* Hash table for lookups */ +}; + +/* There is one instance of this structure for every data element +** in an associative array of type "x3". +*/ +typedef struct s_x3node { + struct state *data; /* The data */ + struct config *key; /* The key */ + struct s_x3node *next; /* Next entry with the same hash */ + struct s_x3node **from; /* Previous link */ +} x3node; + +/* There is only one instance of the array, which is the following */ +static struct s_x3 *x3a; + +/* Allocate a new associative array */ +void State_init(void){ + if( x3a ) return; + x3a = (struct s_x3*)malloc( sizeof(struct s_x3) ); + if( x3a ){ + x3a->size = 128; + x3a->count = 0; + x3a->tbl = (x3node*)calloc(128, sizeof(x3node) + sizeof(x3node*)); + if( x3a->tbl==0 ){ + free(x3a); + x3a = 0; + }else{ + int i; + x3a->ht = (x3node**)&(x3a->tbl[128]); + for(i=0; i<128; i++) x3a->ht[i] = 0; + } + } +} +/* Insert a new record into the array. Return TRUE if successful. +** Prior data with the same key is NOT overwritten */ +int State_insert(struct state *data, struct config *key) +{ + x3node *np; + unsigned h; + unsigned ph; + + if( x3a==0 ) return 0; + ph = statehash(key); + h = ph & (x3a->size-1); + np = x3a->ht[h]; + while( np ){ + if( statecmp(np->key,key)==0 ){ + /* An existing entry with the same key is found. */ + /* Fail because overwrite is not allows. */ + return 0; + } + np = np->next; + } + if( x3a->count>=x3a->size ){ + /* Need to make the hash table bigger */ + int i,arrSize; + struct s_x3 array; + array.size = arrSize = x3a->size*2; + array.count = x3a->count; + array.tbl = (x3node*)calloc(arrSize, sizeof(x3node) + sizeof(x3node*)); + if( array.tbl==0 ) return 0; /* Fail due to malloc failure */ + array.ht = (x3node**)&(array.tbl[arrSize]); + for(i=0; icount; i++){ + x3node *oldnp, *newnp; + oldnp = &(x3a->tbl[i]); + h = statehash(oldnp->key) & (arrSize-1); + newnp = &(array.tbl[i]); + if( array.ht[h] ) array.ht[h]->from = &(newnp->next); + newnp->next = array.ht[h]; + newnp->key = oldnp->key; + newnp->data = oldnp->data; + newnp->from = &(array.ht[h]); + array.ht[h] = newnp; + } + free(x3a->tbl); + *x3a = array; + } + /* Insert the new data */ + h = ph & (x3a->size-1); + np = &(x3a->tbl[x3a->count++]); + np->key = key; + np->data = data; + if( x3a->ht[h] ) x3a->ht[h]->from = &(np->next); + np->next = x3a->ht[h]; + x3a->ht[h] = np; + np->from = &(x3a->ht[h]); + return 1; +} + +/* Return a pointer to data assigned to the given key. Return NULL +** if no such key. */ +struct state *State_find(struct config *key) +{ + unsigned h; + x3node *np; + + if( x3a==0 ) return 0; + h = statehash(key) & (x3a->size-1); + np = x3a->ht[h]; + while( np ){ + if( statecmp(np->key,key)==0 ) break; + np = np->next; + } + return np ? np->data : 0; +} + +/* Return an array of pointers to all data in the table. +** The array is obtained from malloc. Return NULL if memory allocation +** problems, or if the array is empty. */ +struct state **State_arrayof(void) +{ + struct state **array; + int i,arrSize; + if( x3a==0 ) return 0; + arrSize = x3a->count; + array = (struct state **)calloc(arrSize, sizeof(struct state *)); + if( array ){ + for(i=0; itbl[i].data; + } + return array; +} + +/* Hash a configuration */ +PRIVATE unsigned confighash(struct config *a) +{ + unsigned h=0; + h = h*571 + a->rp->index*37 + a->dot; + return h; +} + +/* There is one instance of the following structure for each +** associative array of type "x4". +*/ +struct s_x4 { + int size; /* The number of available slots. */ + /* Must be a power of 2 greater than or */ + /* equal to 1 */ + int count; /* Number of currently slots filled */ + struct s_x4node *tbl; /* The data stored here */ + struct s_x4node **ht; /* Hash table for lookups */ +}; + +/* There is one instance of this structure for every data element +** in an associative array of type "x4". +*/ +typedef struct s_x4node { + struct config *data; /* The data */ + struct s_x4node *next; /* Next entry with the same hash */ + struct s_x4node **from; /* Previous link */ +} x4node; + +/* There is only one instance of the array, which is the following */ +static struct s_x4 *x4a; + +/* Allocate a new associative array */ +void Configtable_init(void){ + if( x4a ) return; + x4a = (struct s_x4*)malloc( sizeof(struct s_x4) ); + if( x4a ){ + x4a->size = 64; + x4a->count = 0; + x4a->tbl = (x4node*)calloc(64, sizeof(x4node) + sizeof(x4node*)); + if( x4a->tbl==0 ){ + free(x4a); + x4a = 0; + }else{ + int i; + x4a->ht = (x4node**)&(x4a->tbl[64]); + for(i=0; i<64; i++) x4a->ht[i] = 0; + } + } +} +/* Insert a new record into the array. Return TRUE if successful. +** Prior data with the same key is NOT overwritten */ +int Configtable_insert(struct config *data) +{ + x4node *np; + unsigned h; + unsigned ph; + + if( x4a==0 ) return 0; + ph = confighash(data); + h = ph & (x4a->size-1); + np = x4a->ht[h]; + while( np ){ + if( Configcmp((const char *) np->data,(const char *) data)==0 ){ + /* An existing entry with the same key is found. */ + /* Fail because overwrite is not allows. */ + return 0; + } + np = np->next; + } + if( x4a->count>=x4a->size ){ + /* Need to make the hash table bigger */ + int i,arrSize; + struct s_x4 array; + array.size = arrSize = x4a->size*2; + array.count = x4a->count; + array.tbl = (x4node*)calloc(arrSize, sizeof(x4node) + sizeof(x4node*)); + if( array.tbl==0 ) return 0; /* Fail due to malloc failure */ + array.ht = (x4node**)&(array.tbl[arrSize]); + for(i=0; icount; i++){ + x4node *oldnp, *newnp; + oldnp = &(x4a->tbl[i]); + h = confighash(oldnp->data) & (arrSize-1); + newnp = &(array.tbl[i]); + if( array.ht[h] ) array.ht[h]->from = &(newnp->next); + newnp->next = array.ht[h]; + newnp->data = oldnp->data; + newnp->from = &(array.ht[h]); + array.ht[h] = newnp; + } + free(x4a->tbl); + *x4a = array; + } + /* Insert the new data */ + h = ph & (x4a->size-1); + np = &(x4a->tbl[x4a->count++]); + np->data = data; + if( x4a->ht[h] ) x4a->ht[h]->from = &(np->next); + np->next = x4a->ht[h]; + x4a->ht[h] = np; + np->from = &(x4a->ht[h]); + return 1; +} + +/* Return a pointer to data assigned to the given key. Return NULL +** if no such key. */ +struct config *Configtable_find(struct config *key) +{ + int h; + x4node *np; + + if( x4a==0 ) return 0; + h = confighash(key) & (x4a->size-1); + np = x4a->ht[h]; + while( np ){ + if( Configcmp((const char *) np->data,(const char *) key)==0 ) break; + np = np->next; + } + return np ? np->data : 0; +} + +/* Remove all data from the table. Pass each data to the function "f" +** as it is removed. ("f" may be null to avoid this step.) */ +void Configtable_clear(int(*f)(struct config *)) +{ + int i; + if( x4a==0 || x4a->count==0 ) return; + if( f ) for(i=0; icount; i++) (*f)(x4a->tbl[i].data); + for(i=0; isize; i++) x4a->ht[i] = 0; + x4a->count = 0; + return; +} diff --git a/3rdparty/bx/tools/lemon/lempar.c b/3rdparty/bx/tools/lemon/lempar.c new file mode 100644 index 0000000..da81ddd --- /dev/null +++ b/3rdparty/bx/tools/lemon/lempar.c @@ -0,0 +1,981 @@ +/* +** 2000-05-29 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** Driver template for the LEMON parser generator. +** +** The "lemon" program processes an LALR(1) input grammar file, then uses +** this template to construct a parser. The "lemon" program inserts text +** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the +** interstitial "-" characters) contained in this template is changed into +** the value of the %name directive from the grammar. Otherwise, the content +** of this template is copied straight through into the generate parser +** source file. +** +** The following is the concatenation of all %include directives from the +** input grammar file: +*/ +#include +/************ Begin %include sections from the grammar ************************/ +%% +/**************** End of %include directives **********************************/ +/* These constants specify the various numeric values for terminal symbols +** in a format understandable to "makeheaders". This section is blank unless +** "lemon" is run with the "-m" command-line option. +***************** Begin makeheaders token definitions *************************/ +%% +/**************** End makeheaders token definitions ***************************/ + +/* The next sections is a series of control #defines. +** various aspects of the generated parser. +** YYCODETYPE is the data type used to store the integer codes +** that represent terminal and non-terminal symbols. +** "unsigned char" is used if there are fewer than +** 256 symbols. Larger types otherwise. +** YYNOCODE is a number of type YYCODETYPE that is not used for +** any terminal or nonterminal symbol. +** YYFALLBACK If defined, this indicates that one or more tokens +** (also known as: "terminal symbols") have fall-back +** values which should be used if the original symbol +** would not parse. This permits keywords to sometimes +** be used as identifiers, for example. +** YYACTIONTYPE is the data type used for "action codes" - numbers +** that indicate what to do in response to the next +** token. +** ParseTOKENTYPE is the data type used for minor type for terminal +** symbols. Background: A "minor type" is a semantic +** value associated with a terminal or non-terminal +** symbols. For example, for an "ID" terminal symbol, +** the minor type might be the name of the identifier. +** Each non-terminal can have a different minor type. +** Terminal symbols all have the same minor type, though. +** This macros defines the minor type for terminal +** symbols. +** YYMINORTYPE is the data type used for all minor types. +** This is typically a union of many types, one of +** which is ParseTOKENTYPE. The entry in the union +** for terminal symbols is called "yy0". +** YYSTACKDEPTH is the maximum depth of the parser's stack. If +** zero the stack is dynamically sized using realloc() +** ParseARG_SDECL A static variable declaration for the %extra_argument +** ParseARG_PDECL A parameter declaration for the %extra_argument +** ParseARG_STORE Code to store %extra_argument into yypParser +** ParseARG_FETCH Code to extract %extra_argument from yypParser +** YYERRORSYMBOL is the code number of the error symbol. If not +** defined, then do no error processing. +** YYNSTATE the combined number of states. +** YYNRULE the number of rules in the grammar +** YY_MAX_SHIFT Maximum value for shift actions +** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions +** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions +** YY_MIN_REDUCE Minimum value for reduce actions +** YY_MAX_REDUCE Maximum value for reduce actions +** YY_ERROR_ACTION The yy_action[] code for syntax error +** YY_ACCEPT_ACTION The yy_action[] code for accept +** YY_NO_ACTION The yy_action[] code for no-op +*/ +#ifndef INTERFACE +# define INTERFACE 1 +#endif +/************* Begin control #defines *****************************************/ +%% +/************* End control #defines *******************************************/ + +/* Define the yytestcase() macro to be a no-op if is not already defined +** otherwise. +** +** Applications can choose to define yytestcase() in the %include section +** to a macro that can assist in verifying code coverage. For production +** code the yytestcase() macro should be turned off. But it is useful +** for testing. +*/ +#ifndef yytestcase +# define yytestcase(X) +#endif + + +/* Next are the tables used to determine what action to take based on the +** current state and lookahead token. These tables are used to implement +** functions that take a state number and lookahead value and return an +** action integer. +** +** Suppose the action integer is N. Then the action is determined as +** follows +** +** 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead +** token onto the stack and goto state N. +** +** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then +** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE. +** +** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE +** and YY_MAX_REDUCE +** +** N == YY_ERROR_ACTION A syntax error has occurred. +** +** N == YY_ACCEPT_ACTION The parser accepts its input. +** +** N == YY_NO_ACTION No such action. Denotes unused +** slots in the yy_action[] table. +** +** The action table is constructed as a single large table named yy_action[]. +** Given state S and lookahead X, the action is computed as either: +** +** (A) N = yy_action[ yy_shift_ofst[S] + X ] +** (B) N = yy_default[S] +** +** The (A) formula is preferred. The B formula is used instead if: +** (1) The yy_shift_ofst[S]+X value is out of range, or +** (2) yy_lookahead[yy_shift_ofst[S]+X] is not equal to X, or +** (3) yy_shift_ofst[S] equal YY_SHIFT_USE_DFLT. +** (Implementation note: YY_SHIFT_USE_DFLT is chosen so that +** YY_SHIFT_USE_DFLT+X will be out of range for all possible lookaheads X. +** Hence only tests (1) and (2) need to be evaluated.) +** +** The formulas above are for computing the action when the lookahead is +** a terminal symbol. If the lookahead is a non-terminal (as occurs after +** a reduce action) then the yy_reduce_ofst[] array is used in place of +** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of +** YY_SHIFT_USE_DFLT. +** +** The following are the tables generated in this section: +** +** yy_action[] A single table containing all actions. +** yy_lookahead[] A table containing the lookahead for each entry in +** yy_action. Used to detect hash collisions. +** yy_shift_ofst[] For each state, the offset into yy_action for +** shifting terminals. +** yy_reduce_ofst[] For each state, the offset into yy_action for +** shifting non-terminals after a reduce. +** yy_default[] Default action for each state. +** +*********** Begin parsing tables **********************************************/ +%% +/********** End of lemon-generated parsing tables *****************************/ + +/* The next table maps tokens (terminal symbols) into fallback tokens. +** If a construct like the following: +** +** %fallback ID X Y Z. +** +** appears in the grammar, then ID becomes a fallback token for X, Y, +** and Z. Whenever one of the tokens X, Y, or Z is input to the parser +** but it does not parse, the type of the token is changed to ID and +** the parse is retried before an error is thrown. +** +** This feature can be used, for example, to cause some keywords in a language +** to revert to identifiers if they keyword does not apply in the context where +** it appears. +*/ +#ifdef YYFALLBACK +static const YYCODETYPE yyFallback[] = { +%% +}; +#endif /* YYFALLBACK */ + +/* The following structure represents a single element of the +** parser's stack. Information stored includes: +** +** + The state number for the parser at this level of the stack. +** +** + The value of the token stored at this level of the stack. +** (In other words, the "major" token.) +** +** + The semantic value stored at this level of the stack. This is +** the information used by the action routines in the grammar. +** It is sometimes called the "minor" token. +** +** After the "shift" half of a SHIFTREDUCE action, the stateno field +** actually contains the reduce action for the second half of the +** SHIFTREDUCE. +*/ +struct yyStackEntry { + YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */ + YYCODETYPE major; /* The major token value. This is the code + ** number for the token at this stack level */ + YYMINORTYPE minor; /* The user-supplied minor token value. This + ** is the value of the token */ +}; +typedef struct yyStackEntry yyStackEntry; + +/* The state of the parser is completely contained in an instance of +** the following structure */ +struct yyParser { + yyStackEntry *yytos; /* Pointer to top element of the stack */ +#ifdef YYTRACKMAXSTACKDEPTH + int yyhwm; /* High-water mark of the stack */ +#endif +#ifndef YYNOERRORRECOVERY + int yyerrcnt; /* Shifts left before out of the error */ +#endif + ParseARG_SDECL /* A place to hold %extra_argument */ +#if YYSTACKDEPTH<=0 + int yystksz; /* Current side of the stack */ + yyStackEntry *yystack; /* The parser's stack */ + yyStackEntry yystk0; /* First stack entry */ +#else + yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */ + yyStackEntry *yystackEnd; /* Last entry in the stack */ +#endif +}; +typedef struct yyParser yyParser; + +#ifndef NDEBUG +#include +static FILE *yyTraceFILE = 0; +static char *yyTracePrompt = 0; +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* +** Turn parser tracing on by giving a stream to which to write the trace +** and a prompt to preface each trace message. Tracing is turned off +** by making either argument NULL +** +** Inputs: +**
      +**
    • A FILE* to which trace output should be written. +** If NULL, then tracing is turned off. +**
    • A prefix string written at the beginning of every +** line of trace output. If NULL, then tracing is +** turned off. +**
    +** +** Outputs: +** None. +*/ +void ParseTrace(FILE *TraceFILE, char *zTracePrompt){ + yyTraceFILE = TraceFILE; + yyTracePrompt = zTracePrompt; + if( yyTraceFILE==0 ) yyTracePrompt = 0; + else if( yyTracePrompt==0 ) yyTraceFILE = 0; +} +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* For tracing shifts, the names of all terminals and nonterminals +** are required. The following table supplies these names */ +static const char *const yyTokenName[] = { +%% +}; +#endif /* NDEBUG */ + +#ifndef NDEBUG +/* For tracing reduce actions, the names of all rules are required. +*/ +static const char *const yyRuleName[] = { +%% +}; +#endif /* NDEBUG */ + + +#if YYSTACKDEPTH<=0 +/* +** Try to increase the size of the parser stack. Return the number +** of errors. Return 0 on success. +*/ +static int yyGrowStack(yyParser *p){ + int newSize; + int idx; + yyStackEntry *pNew; + + newSize = p->yystksz*2 + 100; + idx = p->yytos ? (int)(p->yytos - p->yystack) : 0; + if( p->yystack==&p->yystk0 ){ + pNew = malloc(newSize*sizeof(pNew[0])); + if( pNew ) pNew[0] = p->yystk0; + }else{ + pNew = realloc(p->yystack, newSize*sizeof(pNew[0])); + } + if( pNew ){ + p->yystack = pNew; + p->yytos = &p->yystack[idx]; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n", + yyTracePrompt, p->yystksz, newSize); + } +#endif + p->yystksz = newSize; + } + return pNew==0; +} +#endif + +/* Datatype of the argument to the memory allocated passed as the +** second argument to ParseAlloc() below. This can be changed by +** putting an appropriate #define in the %include section of the input +** grammar. +*/ +#ifndef YYMALLOCARGTYPE +# define YYMALLOCARGTYPE size_t +#endif + +/* Initialize a new parser that has already been allocated. +*/ +void ParseInit(void *yypParser){ + yyParser *pParser = (yyParser*)yypParser; +#ifdef YYTRACKMAXSTACKDEPTH + pParser->yyhwm = 0; +#endif +#if YYSTACKDEPTH<=0 + pParser->yytos = NULL; + pParser->yystack = NULL; + pParser->yystksz = 0; + if( yyGrowStack(pParser) ){ + pParser->yystack = &pParser->yystk0; + pParser->yystksz = 1; + } +#endif +#ifndef YYNOERRORRECOVERY + pParser->yyerrcnt = -1; +#endif + pParser->yytos = pParser->yystack; + pParser->yystack[0].stateno = 0; + pParser->yystack[0].major = 0; +#if YYSTACKDEPTH>0 + pParser->yystackEnd = &pParser->yystack[YYSTACKDEPTH-1]; +#endif +} + +#ifndef Parse_ENGINEALWAYSONSTACK +/* +** This function allocates a new parser. +** The only argument is a pointer to a function which works like +** malloc. +** +** Inputs: +** A pointer to the function used to allocate memory. +** +** Outputs: +** A pointer to a parser. This pointer is used in subsequent calls +** to Parse and ParseFree. +*/ +void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){ + yyParser *pParser; + pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) ); + if( pParser ) ParseInit(pParser); + return pParser; +} +#endif /* Parse_ENGINEALWAYSONSTACK */ + + +/* The following function deletes the "minor type" or semantic value +** associated with a symbol. The symbol can be either a terminal +** or nonterminal. "yymajor" is the symbol code, and "yypminor" is +** a pointer to the value to be deleted. The code used to do the +** deletions is derived from the %destructor and/or %token_destructor +** directives of the input grammar. +*/ +static void yy_destructor( + yyParser *yypParser, /* The parser */ + YYCODETYPE yymajor, /* Type code for object to destroy */ + YYMINORTYPE *yypminor /* The object to be destroyed */ +){ + ParseARG_FETCH; + switch( yymajor ){ + /* Here is inserted the actions which take place when a + ** terminal or non-terminal is destroyed. This can happen + ** when the symbol is popped from the stack during a + ** reduce or during error processing or when a parser is + ** being destroyed before it is finished parsing. + ** + ** Note: during a reduce, the only symbols destroyed are those + ** which appear on the RHS of the rule, but which are *not* used + ** inside the C code. + */ +/********* Begin destructor definitions ***************************************/ +%% +/********* End destructor definitions *****************************************/ + default: break; /* If no destructor action specified: do nothing */ + } +} + +/* +** Pop the parser's stack once. +** +** If there is a destructor routine associated with the token which +** is popped from the stack, then call it. +*/ +static void yy_pop_parser_stack(yyParser *pParser){ + yyStackEntry *yytos; + assert( pParser->yytos!=0 ); + assert( pParser->yytos > pParser->yystack ); + yytos = pParser->yytos--; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sPopping %s\n", + yyTracePrompt, + yyTokenName[yytos->major]); + } +#endif + yy_destructor(pParser, yytos->major, &yytos->minor); +} + +/* +** Clear all secondary memory allocations from the parser +*/ +void ParseFinalize(void *p){ + yyParser *pParser = (yyParser*)p; + while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser); +#if YYSTACKDEPTH<=0 + if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack); +#endif +} + +#ifndef Parse_ENGINEALWAYSONSTACK +/* +** Deallocate and destroy a parser. Destructors are called for +** all stack elements before shutting the parser down. +** +** If the YYPARSEFREENEVERNULL macro exists (for example because it +** is defined in a %include section of the input grammar) then it is +** assumed that the input pointer is never NULL. +*/ +void ParseFree( + void *p, /* The parser to be deleted */ + void (*freeProc)(void*) /* Function used to reclaim memory */ +){ +#ifndef YYPARSEFREENEVERNULL + if( p==0 ) return; +#endif + ParseFinalize(p); + (*freeProc)(p); +} +#endif /* Parse_ENGINEALWAYSONSTACK */ + +/* +** Return the peak depth of the stack for a parser. +*/ +#ifdef YYTRACKMAXSTACKDEPTH +int ParseStackPeak(void *p){ + yyParser *pParser = (yyParser*)p; + return pParser->yyhwm; +} +#endif + +/* +** Find the appropriate action for a parser given the terminal +** look-ahead token iLookAhead. +*/ +static unsigned int yy_find_shift_action( + yyParser *pParser, /* The parser */ + YYCODETYPE iLookAhead /* The look-ahead token */ +){ + int i; + int stateno = pParser->yytos->stateno; + + if( stateno>=YY_MIN_REDUCE ) return stateno; + assert( stateno <= YY_SHIFT_COUNT ); + do{ + i = yy_shift_ofst[stateno]; + assert( iLookAhead!=YYNOCODE ); + i += iLookAhead; + if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ +#ifdef YYFALLBACK + YYCODETYPE iFallback; /* Fallback token */ + if( iLookAhead %s\n", + yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]); + } +#endif + assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */ + iLookAhead = iFallback; + continue; + } +#endif +#ifdef YYWILDCARD + { + int j = i - iLookAhead + YYWILDCARD; + if( +#if YY_SHIFT_MIN+YYWILDCARD<0 + j>=0 && +#endif +#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT + j0 + ){ +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", + yyTracePrompt, yyTokenName[iLookAhead], + yyTokenName[YYWILDCARD]); + } +#endif /* NDEBUG */ + return yy_action[j]; + } + } +#endif /* YYWILDCARD */ + return yy_default[stateno]; + }else{ + return yy_action[i]; + } + }while(1); +} + +/* +** Find the appropriate action for a parser given the non-terminal +** look-ahead token iLookAhead. +*/ +static int yy_find_reduce_action( + int stateno, /* Current state number */ + YYCODETYPE iLookAhead /* The look-ahead token */ +){ + int i; +#ifdef YYERRORSYMBOL + if( stateno>YY_REDUCE_COUNT ){ + return yy_default[stateno]; + } +#else + assert( stateno<=YY_REDUCE_COUNT ); +#endif + i = yy_reduce_ofst[stateno]; + assert( i!=YY_REDUCE_USE_DFLT ); + assert( iLookAhead!=YYNOCODE ); + i += iLookAhead; +#ifdef YYERRORSYMBOL + if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ + return yy_default[stateno]; + } +#else + assert( i>=0 && iyytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); + /* Here code is inserted which will execute if the parser + ** stack every overflows */ +/******** Begin %stack_overflow code ******************************************/ +%% +/******** End %stack_overflow code ********************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument var */ +} + +/* +** Print tracing information for a SHIFT action +*/ +#ifndef NDEBUG +static void yyTraceShift(yyParser *yypParser, int yyNewState){ + if( yyTraceFILE ){ + if( yyNewStateyytos->major], + yyNewState); + }else{ + fprintf(yyTraceFILE,"%sShift '%s'\n", + yyTracePrompt,yyTokenName[yypParser->yytos->major]); + } + } +} +#else +# define yyTraceShift(X,Y) +#endif + +/* +** Perform a shift action. +*/ +static void yy_shift( + yyParser *yypParser, /* The parser to be shifted */ + int yyNewState, /* The new state to shift in */ + int yyMajor, /* The major token to shift in */ + ParseTOKENTYPE yyMinor /* The minor token to shift in */ +){ + yyStackEntry *yytos; + yypParser->yytos++; +#ifdef YYTRACKMAXSTACKDEPTH + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) ); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>yypParser->yystackEnd ){ + yypParser->yytos--; + yyStackOverflow(yypParser); + return; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){ + if( yyGrowStack(yypParser) ){ + yypParser->yytos--; + yyStackOverflow(yypParser); + return; + } + } +#endif + if( yyNewState > YY_MAX_SHIFT ){ + yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; + } + yytos = yypParser->yytos; + yytos->stateno = (YYACTIONTYPE)yyNewState; + yytos->major = (YYCODETYPE)yyMajor; + yytos->minor.yy0 = yyMinor; + yyTraceShift(yypParser, yyNewState); +} + +/* The following table contains information about every rule that +** is used during the reduce. +*/ +static const struct { + YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ + signed char nrhs; /* Negative of the number of RHS symbols in the rule */ +} yyRuleInfo[] = { +%% +}; + +static void yy_accept(yyParser*); /* Forward Declaration */ + +/* +** Perform a reduce action and the shift that must immediately +** follow the reduce. +** +** The yyLookahead and yyLookaheadToken parameters provide reduce actions +** access to the lookahead token (if any). The yyLookahead will be YYNOCODE +** if the lookahead token has already been consumed. As this procedure is +** only called from one place, optimizing compilers will in-line it, which +** means that the extra parameters have no performance impact. +*/ +static void yy_reduce( + yyParser *yypParser, /* The parser */ + unsigned int yyruleno, /* Number of the rule by which to reduce */ + int yyLookahead, /* Lookahead token, or YYNOCODE if none */ + ParseTOKENTYPE yyLookaheadToken /* Value of the lookahead token */ +){ + int yygoto; /* The next state */ + int yyact; /* The next action */ + yyStackEntry *yymsp; /* The top of the parser's stack */ + int yysize; /* Amount to pop the stack */ + ParseARG_FETCH; + yymsp = yypParser->yytos; +#ifndef NDEBUG + if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ + yysize = yyRuleInfo[yyruleno].nrhs; + fprintf(yyTraceFILE, "%sReduce [%s], go to state %d.\n", yyTracePrompt, + yyRuleName[yyruleno], yymsp[yysize].stateno); + } +#endif /* NDEBUG */ + + /* Check that the stack is large enough to grow by a single entry + ** if the RHS of the rule is empty. This ensures that there is room + ** enough on the stack to push the LHS value */ + if( yyRuleInfo[yyruleno].nrhs==0 ){ +#ifdef YYTRACKMAXSTACKDEPTH + if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ + yypParser->yyhwm++; + assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); + } +#endif +#if YYSTACKDEPTH>0 + if( yypParser->yytos>=yypParser->yystackEnd ){ + yyStackOverflow(yypParser); + return; + } +#else + if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ + if( yyGrowStack(yypParser) ){ + yyStackOverflow(yypParser); + return; + } + yymsp = yypParser->yytos; + } +#endif + } + + switch( yyruleno ){ + /* Beginning here are the reduction cases. A typical example + ** follows: + ** case 0: + ** #line + ** { ... } // User supplied code + ** #line + ** break; + */ +/********** Begin reduce actions **********************************************/ +%% +/********** End reduce actions ************************************************/ + }; + assert( yyrulenoYY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) ); + + /* It is not possible for a REDUCE to be followed by an error */ + assert( yyact!=YY_ERROR_ACTION ); + + if( yyact==YY_ACCEPT_ACTION ){ + yypParser->yytos += yysize; + yy_accept(yypParser); + }else{ + yymsp += yysize+1; + yypParser->yytos = yymsp; + yymsp->stateno = (YYACTIONTYPE)yyact; + yymsp->major = (YYCODETYPE)yygoto; + yyTraceShift(yypParser, yyact); + } +} + +/* +** The following code executes when the parse fails +*/ +#ifndef YYNOERRORRECOVERY +static void yy_parse_failed( + yyParser *yypParser /* The parser */ +){ + ParseARG_FETCH; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt); + } +#endif + while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); + /* Here code is inserted which will be executed whenever the + ** parser fails */ +/************ Begin %parse_failure code ***************************************/ +%% +/************ End %parse_failure code *****************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} +#endif /* YYNOERRORRECOVERY */ + +/* +** The following code executes when a syntax error first occurs. +*/ +static void yy_syntax_error( + yyParser *yypParser, /* The parser */ + int yymajor, /* The major type of the error token */ + ParseTOKENTYPE yyminor /* The minor type of the error token */ +){ + ParseARG_FETCH; +#define TOKEN yyminor +/************ Begin %syntax_error code ****************************************/ +%% +/************ End %syntax_error code ******************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} + +/* +** The following is executed when the parser accepts +*/ +static void yy_accept( + yyParser *yypParser /* The parser */ +){ + ParseARG_FETCH; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt); + } +#endif +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + assert( yypParser->yytos==yypParser->yystack ); + /* Here code is inserted which will be executed whenever the + ** parser accepts */ +/*********** Begin %parse_accept code *****************************************/ +%% +/*********** End %parse_accept code *******************************************/ + ParseARG_STORE; /* Suppress warning about unused %extra_argument variable */ +} + +/* The main parser program. +** The first argument is a pointer to a structure obtained from +** "ParseAlloc" which describes the current state of the parser. +** The second argument is the major token number. The third is +** the minor token. The fourth optional argument is whatever the +** user wants (and specified in the grammar) and is available for +** use by the action routines. +** +** Inputs: +**
      +**
    • A pointer to the parser (an opaque structure.) +**
    • The major token number. +**
    • The minor token number. +**
    • An option argument of a grammar-specified type. +**
    +** +** Outputs: +** None. +*/ +void Parse( + void *yyp, /* The parser */ + int yymajor, /* The major token code number */ + ParseTOKENTYPE yyminor /* The value for the token */ + ParseARG_PDECL /* Optional %extra_argument parameter */ +){ + YYMINORTYPE yyminorunion; + unsigned int yyact; /* The parser action. */ +#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) + int yyendofinput; /* True if we are at the end of input */ +#endif +#ifdef YYERRORSYMBOL + int yyerrorhit = 0; /* True if yymajor has invoked an error */ +#endif + yyParser *yypParser; /* The parser */ + + yypParser = (yyParser*)yyp; + assert( yypParser->yytos!=0 ); +#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) + yyendofinput = (yymajor==0); +#endif + ParseARG_STORE; + +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sInput '%s'\n",yyTracePrompt,yyTokenName[yymajor]); + } +#endif + + do{ + yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor); + if( yyact <= YY_MAX_SHIFTREDUCE ){ + yy_shift(yypParser,yyact,yymajor,yyminor); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt--; +#endif + yymajor = YYNOCODE; + }else if( yyact <= YY_MAX_REDUCE ){ + yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,yyminor); + }else{ + assert( yyact == YY_ERROR_ACTION ); + yyminorunion.yy0 = yyminor; +#ifdef YYERRORSYMBOL + int yymx; +#endif +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt); + } +#endif +#ifdef YYERRORSYMBOL + /* A syntax error has occurred. + ** The response to an error depends upon whether or not the + ** grammar defines an error token "ERROR". + ** + ** This is what we do if the grammar does define ERROR: + ** + ** * Call the %syntax_error function. + ** + ** * Begin popping the stack until we enter a state where + ** it is legal to shift the error symbol, then shift + ** the error symbol. + ** + ** * Set the error count to three. + ** + ** * Begin accepting and shifting new tokens. No new error + ** processing will occur until three tokens have been + ** shifted successfully. + ** + */ + if( yypParser->yyerrcnt<0 ){ + yy_syntax_error(yypParser,yymajor,yyminor); + } + yymx = yypParser->yytos->major; + if( yymx==YYERRORSYMBOL || yyerrorhit ){ +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sDiscard input token %s\n", + yyTracePrompt,yyTokenName[yymajor]); + } +#endif + yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); + yymajor = YYNOCODE; + }else{ + while( yypParser->yytos >= yypParser->yystack + && yymx != YYERRORSYMBOL + && (yyact = yy_find_reduce_action( + yypParser->yytos->stateno, + YYERRORSYMBOL)) >= YY_MIN_REDUCE + ){ + yy_pop_parser_stack(yypParser); + } + if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + yy_parse_failed(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + yymajor = YYNOCODE; + }else if( yymx!=YYERRORSYMBOL ){ + yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor); + } + } + yypParser->yyerrcnt = 3; + yyerrorhit = 1; +#elif defined(YYNOERRORRECOVERY) + /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to + ** do any kind of error recovery. Instead, simply invoke the syntax + ** error routine and continue going as if nothing had happened. + ** + ** Applications can set this macro (for example inside %include) if + ** they intend to abandon the parse upon the first syntax error seen. + */ + yy_syntax_error(yypParser,yymajor, yyminor); + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + yymajor = YYNOCODE; + +#else /* YYERRORSYMBOL is not defined */ + /* This is what we do if the grammar does not define ERROR: + ** + ** * Report an error message, and throw away the input token. + ** + ** * If the input token is $, then fail the parse. + ** + ** As before, subsequent error messages are suppressed until + ** three input tokens have been successfully shifted. + */ + if( yypParser->yyerrcnt<=0 ){ + yy_syntax_error(yypParser,yymajor, yyminor); + } + yypParser->yyerrcnt = 3; + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + if( yyendofinput ){ + yy_parse_failed(yypParser); +#ifndef YYNOERRORRECOVERY + yypParser->yyerrcnt = -1; +#endif + } + yymajor = YYNOCODE; +#endif + } + }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack ); +#ifndef NDEBUG + if( yyTraceFILE ){ + yyStackEntry *i; + char cDiv = '['; + fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt); + for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){ + fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]); + cDiv = ' '; + } + fprintf(yyTraceFILE,"]\n"); + } +#endif + return; +} diff --git a/3rdparty/imgui_dock/imgui_dock.cpp b/3rdparty/imgui_dock/imgui_dock.cpp new file mode 100644 index 0000000..3974844 --- /dev/null +++ b/3rdparty/imgui_dock/imgui_dock.cpp @@ -0,0 +1,1150 @@ +// based on https://github.com/nem0/LumixEngine/blob/master/external/imgui/imgui_dock.inl +// modified from https://bitbucket.org/duangle/liminal/src/tip/src/liminal/imgui_dock.cpp + +#include "imgui.h" +#define IMGUI_DEFINE_PLACEMENT_NEW +#define IMGUI_DEFINE_MATH_OPERATORS +#include "imgui_internal.h" +#include "imgui_dock.h" + +using namespace ImGui; + +#define nullptr NULL + +struct DockContext +{ + enum EndAction_ + { + EndAction_None, + EndAction_Panel, + EndAction_End, + EndAction_EndChild + }; + + + enum Status_ + { + Status_Docked, + Status_Float, + Status_Dragged + }; + + + struct Dock + { + Dock() + : id(0) + , next_tab(nullptr) + , prev_tab(nullptr) + , parent(nullptr) + , pos(0, 0) + , size(-1, -1) + , active(true) + , movable(true) + , status(Status_Float) + , split_ratio(0.5, 0.5) + , label(nullptr) + , opened(false) + + { + location[0] = 0; + children[0] = children[1] = nullptr; + } + + + ~Dock() { MemFree(label); } + + + ImVec2 getMinSize() const + { + if (!children[0]) return ImVec2(16, 16 + GetTextLineHeightWithSpacing()); + + ImVec2 s0 = children[0]->getMinSize(); + ImVec2 s1 = children[1]->getMinSize(); + return isHorizontal() ? ImVec2(s0.x + s1.x, ImMax(s0.y, s1.y)) + : ImVec2(ImMax(s0.x, s1.x), s0.y + s1.y); + } + + + bool isHorizontal() const { return children[0]->pos.x < children[1]->pos.x; } + + + void setParent(Dock* dock) + { + parent = dock; + for (Dock* tmp = prev_tab; tmp; tmp = tmp->prev_tab) tmp->parent = dock; + for (Dock* tmp = next_tab; tmp; tmp = tmp->next_tab) tmp->parent = dock; + } + + Dock& getRoot() + { + Dock *dock = this; + while (dock->parent) + dock = dock->parent; + return *dock; + } + + + Dock& getSibling() + { + IM_ASSERT(parent); + if (parent->children[0] == &getFirstTab()) return *parent->children[1]; + return *parent->children[0]; + } + + + Dock& getFirstTab() + { + Dock* tmp = this; + while (tmp->prev_tab) tmp = tmp->prev_tab; + return *tmp; + } + + + void setActive() + { + active = true; + for (Dock* tmp = prev_tab; tmp; tmp = tmp->prev_tab) tmp->active = false; + for (Dock* tmp = next_tab; tmp; tmp = tmp->next_tab) tmp->active = false; + } + + + bool isContainer() const { return children[0] != nullptr; } + + + void setChildrenPosSize(const ImVec2& _pos, const ImVec2& _size) + { + ImVec2 s = children[0]->size; + if (isHorizontal()) + { + s.y = _size.y; + s.x = (float)int( + _size.x * children[0]->size.x / (children[0]->size.x + children[1]->size.x)); + if (s.x < children[0]->getMinSize().x) + { + s.x = children[0]->getMinSize().x; + } + else if (_size.x - s.x < children[1]->getMinSize().x) + { + s.x = _size.x - children[1]->getMinSize().x; + } + children[0]->setPosSize(_pos, s); + + s.x = _size.x - children[0]->size.x; + ImVec2 p = _pos; + p.x += children[0]->size.x; + children[1]->setPosSize(p, s); + } + else + { + s.x = _size.x; + s.y = (float)int( + _size.y * children[0]->size.y / (children[0]->size.y + children[1]->size.y)); + if (s.y < children[0]->getMinSize().y) + { + s.y = children[0]->getMinSize().y; + } + else if (_size.y - s.y < children[1]->getMinSize().y) + { + s.y = _size.y - children[1]->getMinSize().y; + } + children[0]->setPosSize(_pos, s); + + s.y = _size.y - children[0]->size.y; + ImVec2 p = _pos; + p.y += children[0]->size.y; + children[1]->setPosSize(p, s); + } + } + + + void setPosSize(const ImVec2& _pos, const ImVec2& _size) + { + size = _size; + pos = _pos; + for (Dock* tmp = prev_tab; tmp; tmp = tmp->prev_tab) + { + tmp->size = _size; + tmp->pos = _pos; + } + for (Dock* tmp = next_tab; tmp; tmp = tmp->next_tab) + { + tmp->size = _size; + tmp->pos = _pos; + } + + if (!isContainer()) return; + setChildrenPosSize(_pos, _size); + } + + + char* label; + ImU32 id; + Dock* next_tab; + Dock* prev_tab; + Dock* children[2]; + Dock* parent; + bool active; + bool movable; + ImVec2 pos; + ImVec2 size; + Status_ status; + ImVec2 split_ratio; + int last_frame; + int invalid_frames; + char location[16]; + bool opened; + bool first; + }; + + + ImVector m_docks; + ImVec2 m_drag_offset; + Dock* m_current; + Dock *m_next_parent; + int m_last_frame; + EndAction_ m_end_action; + ImVec2 m_workspace_pos; + ImVec2 m_workspace_size; + ImGuiDockSlot m_next_dock_slot; + ImVec2 m_next_split_ratio; + ImVec2 m_next_floating_size; + + DockContext() + : m_current(nullptr) + , m_next_parent(nullptr) + , m_last_frame(0) + , m_next_dock_slot(ImGuiDockSlot_Tab) + , m_next_split_ratio(0.5, 0.5) + , m_next_floating_size(-1, -1) + { + } + + ~DockContext() {} + + Dock& getDock(const char* label, bool opened) + { + ImU32 id = ImHash(label, 0); + for (int i = 0; i < m_docks.size(); ++i) + { + if (m_docks[i]->id == id) return *m_docks[i]; + } + + Dock* new_dock = (Dock*)MemAlloc(sizeof(Dock)); + IM_PLACEMENT_NEW(new_dock) Dock(); + m_docks.push_back(new_dock); + new_dock->label = ImStrdup(label); + IM_ASSERT(new_dock->label); + new_dock->id = id; + new_dock->setActive(); + new_dock->status = (m_docks.size() == 1)?Status_Docked:Status_Float; + new_dock->pos = ImVec2(0, 0); + if (m_next_floating_size.x >= 0 && m_next_floating_size.y >= 0) + { + new_dock->size.x = m_next_floating_size.x < 0 ? GetIO().DisplaySize.x : m_next_floating_size.x; + new_dock->size.y = m_next_floating_size.y < 0 ? GetIO().DisplaySize.y : m_next_floating_size.y; + } + else + { + new_dock->size.x = new_dock->size.x < 0 ? GetIO().DisplaySize.x : m_next_floating_size.x; + new_dock->size.y = new_dock->size.y < 0 ? GetIO().DisplaySize.y : m_next_floating_size.y; + } + new_dock->split_ratio = m_next_split_ratio; + new_dock->opened = opened; + new_dock->first = true; + new_dock->last_frame = 0; + new_dock->invalid_frames = 0; + new_dock->location[0] = 0; + return *new_dock; + } + + + void putInBackground() + { + ImGuiWindow* win = GetCurrentWindow(); + ImGuiContext& g = *GImGui; + if (g.Windows[0] == win) return; + + for (int i = 0; i < g.Windows.Size; i++) + { + if (g.Windows[i] == win) + { + for (int j = i - 1; j >= 0; --j) + { + g.Windows[j + 1] = g.Windows[j]; + } + g.Windows[0] = win; + break; + } + } + } + + + void splits() + { + if (GetFrameCount() == m_last_frame) return; + m_last_frame = GetFrameCount(); + + putInBackground(); + + for (int i = 0; i < m_docks.size(); ++i) { + Dock& dock = *m_docks[i]; + if (!dock.parent && (dock.status == Status_Docked)) { + dock.setPosSize(m_workspace_pos, m_workspace_size); + } + } + + ImU32 color = GetColorU32(ImGuiCol_Button); + ImU32 color_hovered = GetColorU32(ImGuiCol_ButtonHovered); + ImDrawList* draw_list = GetWindowDrawList(); + ImGuiIO& io = GetIO(); + for (int i = 0; i < m_docks.size(); ++i) + { + Dock& dock = *m_docks[i]; + if (!dock.isContainer()) continue; + + PushID(i); + if (!IsMouseDown(0)) dock.status = Status_Docked; + + ImVec2 pos0 = dock.children[0]->pos; + ImVec2 pos1 = dock.children[1]->pos; + ImVec2 size0 = dock.children[0]->size; + ImVec2 size1 = dock.children[1]->size; + + ImGuiMouseCursor cursor; + + ImVec2 dsize(0, 0); + ImVec2 min_size0 = dock.children[0]->getMinSize(); + ImVec2 min_size1 = dock.children[1]->getMinSize(); + if (dock.isHorizontal()) + { + cursor = ImGuiMouseCursor_ResizeEW; + SetCursorScreenPos(ImVec2(dock.pos.x + size0.x, dock.pos.y)); + InvisibleButton("split", ImVec2(3, dock.size.y)); + if (dock.status == Status_Dragged) dsize.x = io.MouseDelta.x; + dsize.x = -ImMin(-dsize.x, dock.children[0]->size.x - min_size0.x); + dsize.x = ImMin(dsize.x, dock.children[1]->size.x - min_size1.x); + size0 += dsize; + size1 -= dsize; + pos0 = dock.pos; + pos1.x = pos0.x + size0.x; + pos1.y = dock.pos.y; + size0.y = size1.y = dock.size.y; + size1.x = ImMax(min_size1.x, dock.size.x - size0.x); + size0.x = ImMax(min_size0.x, dock.size.x - size1.x); + } + else + { + cursor = ImGuiMouseCursor_ResizeNS; + SetCursorScreenPos(ImVec2(dock.pos.x, dock.pos.y + size0.y)); + InvisibleButton("split", ImVec2(dock.size.x, 3)); + if (dock.status == Status_Dragged) dsize.y = io.MouseDelta.y; + dsize.y = -ImMin(-dsize.y, dock.children[0]->size.y - min_size0.y); + dsize.y = ImMin(dsize.y, dock.children[1]->size.y - min_size1.y); + size0 += dsize; + size1 -= dsize; + pos0 = dock.pos; + pos1.x = dock.pos.x; + pos1.y = pos0.y + size0.y; + size0.x = size1.x = dock.size.x; + size1.y = ImMax(min_size1.y, dock.size.y - size0.y); + size0.y = ImMax(min_size0.y, dock.size.y - size1.y); + } + dock.children[0]->setPosSize(pos0, size0); + dock.children[1]->setPosSize(pos1, size1); + + if (IsItemHovered()) { + SetMouseCursor(cursor); + } + + if (IsItemHovered() && IsMouseClicked(0) && dock.movable) + { + dock.status = Status_Dragged; + } + + draw_list->AddRectFilled( + GetItemRectMin(), GetItemRectMax(), IsItemHovered() ? color_hovered : color); + PopID(); + } + } + + + void checkNonexistent() + { + int frame_limit = ImMax(0, ImGui::GetFrameCount() - 2); + for (int i = 0; i < m_docks.size(); ++i) + { + Dock *dock = m_docks[i]; + if (dock->isContainer()) continue; + if (dock->status == Status_Float) continue; + if (dock->last_frame < frame_limit) + { + ++dock->invalid_frames; + if (dock->invalid_frames > 2) + { + doUndock(*dock); + dock->status = Status_Float; + } + return; + } + dock->invalid_frames = 0; + } + } + + + Dock* getDockAt(const ImVec2& pos) const + { + for (int i = 0; i < m_docks.size(); ++i) + { + Dock& dock = *m_docks[i]; + if (dock.isContainer()) continue; + if (dock.status != Status_Docked) continue; + if (IsMouseHoveringRect(dock.pos, dock.pos + dock.size, false)) + { + return &dock; + } + } + + return nullptr; + } + + + static ImRect getDockedRect(const ImRect& rect, ImGuiDockSlot dock_slot) + { + ImVec2 half_size = rect.GetSize() * 0.5f; + switch (dock_slot) + { + default: return rect; + case ImGuiDockSlot_Top: return ImRect(rect.Min, ImVec2(rect.Max.x, rect.Min.y + half_size.y)); + case ImGuiDockSlot_Right: return ImRect(rect.Min + ImVec2(half_size.x, 0), rect.Max); + case ImGuiDockSlot_Bottom: return ImRect(rect.Min + ImVec2(0, half_size.y), rect.Max); + case ImGuiDockSlot_Left: return ImRect(rect.Min, ImVec2(rect.Min.x + half_size.x, rect.Max.y)); + } + } + + + static ImRect getSlotRect(ImRect parent_rect, ImGuiDockSlot dock_slot) + { + ImVec2 size = parent_rect.Max - parent_rect.Min; + ImVec2 center = parent_rect.Min + size * 0.5f; + switch (dock_slot) + { + default: return ImRect(center - ImVec2(20, 20), center + ImVec2(20, 20)); + case ImGuiDockSlot_Top: return ImRect(center + ImVec2(-20, -50), center + ImVec2(20, -30)); + case ImGuiDockSlot_Right: return ImRect(center + ImVec2(30, -20), center + ImVec2(50, 20)); + case ImGuiDockSlot_Bottom: return ImRect(center + ImVec2(-20, +30), center + ImVec2(20, 50)); + case ImGuiDockSlot_Left: return ImRect(center + ImVec2(-50, -20), center + ImVec2(-30, 20)); + } + } + + + static ImRect getSlotRectOnBorder(ImRect parent_rect, ImGuiDockSlot dock_slot) + { + ImVec2 size = parent_rect.Max - parent_rect.Min; + ImVec2 center = parent_rect.Min + size * 0.5f; + switch (dock_slot) + { + case ImGuiDockSlot_Top: + return ImRect(ImVec2(center.x - 20, parent_rect.Min.y + 10), + ImVec2(center.x + 20, parent_rect.Min.y + 30)); + case ImGuiDockSlot_Left: + return ImRect(ImVec2(parent_rect.Min.x + 10, center.y - 20), + ImVec2(parent_rect.Min.x + 30, center.y + 20)); + case ImGuiDockSlot_Bottom: + return ImRect(ImVec2(center.x - 20, parent_rect.Max.y - 30), + ImVec2(center.x + 20, parent_rect.Max.y - 10)); + case ImGuiDockSlot_Right: + return ImRect(ImVec2(parent_rect.Max.x - 30, center.y - 20), + ImVec2(parent_rect.Max.x - 10, center.y + 20)); + default: IM_ASSERT(false); + } + IM_ASSERT(false); + return ImRect(); + } + + + Dock* getRootDock() + { + for (int i = 0; i < m_docks.size(); ++i) + { + if (!m_docks[i]->parent && + (m_docks[i]->status == Status_Docked || m_docks[i]->children[0])) + { + return m_docks[i]; + } + } + return nullptr; + } + + + bool dockSlots(Dock& dock, Dock* dest_dock, const ImRect& rect, bool on_border) + { + ImDrawList* canvas = GetWindowDrawList(); + ImU32 color = GetColorU32(ImGuiCol_Button); + ImU32 color_hovered = GetColorU32(ImGuiCol_ButtonHovered); + ImVec2 mouse_pos = GetIO().MousePos; + for (int i = 0; i < (on_border ? 4 : 5); ++i) + { + ImRect r = + on_border ? getSlotRectOnBorder(rect, (ImGuiDockSlot)i) : getSlotRect(rect, (ImGuiDockSlot)i); + bool hovered = r.Contains(mouse_pos); + canvas->AddRectFilled(r.Min, r.Max, hovered ? color_hovered : color); + if (!hovered) continue; + + if (!IsMouseDown(0)) + { + doDock(dock, dest_dock ? dest_dock : getRootDock(), (ImGuiDockSlot)i); + return true; + } + ImRect docked_rect = getDockedRect(rect, (ImGuiDockSlot)i); + canvas->AddRectFilled(docked_rect.Min, docked_rect.Max, GetColorU32(ImGuiCol_Button)); + } + return false; + } + + + void handleDrag(Dock& dock) + { + Dock* dest_dock = getDockAt(GetIO().MousePos); + + Begin("##Overlay", + NULL, + ImGuiWindowFlags_Tooltip | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | + ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | + ImGuiWindowFlags_AlwaysAutoResize); + ImDrawList* canvas = GetWindowDrawList(); + + canvas->PushClipRectFullScreen(); + + ImU32 docked_color = GetColorU32(ImGuiCol_FrameBg); + docked_color = (docked_color & 0x00ffFFFF) | 0x80000000; + dock.pos = GetIO().MousePos - m_drag_offset; + if (dest_dock) + { + if (dockSlots(dock, + dest_dock, + ImRect(dest_dock->pos, dest_dock->pos + dest_dock->size), + false)) + { + canvas->PopClipRect(); + End(); + return; + } + } + if (dockSlots(dock, nullptr, ImRect(m_workspace_pos, m_workspace_pos + m_workspace_size), true)) + { + canvas->PopClipRect(); + End(); + return; + } + canvas->AddRectFilled(dock.pos, dock.pos + dock.size, docked_color); + canvas->PopClipRect(); + + if (!IsMouseDown(0)) + { + dock.status = Status_Float; + dock.location[0] = 0; + dock.setActive(); + } + + End(); + } + + + void fillLocation(Dock& dock) + { + if (dock.status == Status_Float) return; + char* c = dock.location; + Dock* tmp = &dock; + while (tmp->parent) + { + *c = getLocationCode(tmp); + tmp = tmp->parent; + ++c; + } + *c = 0; + } + + + void doUndock(Dock& dock) + { + if (dock.prev_tab) + dock.prev_tab->setActive(); + else if (dock.next_tab) + dock.next_tab->setActive(); + else + dock.active = false; + Dock* container = dock.parent; + + if (container) + { + Dock& sibling = dock.getSibling(); + if (container->children[0] == &dock) + { + container->children[0] = dock.next_tab; + } + else if (container->children[1] == &dock) + { + container->children[1] = dock.next_tab; + } + + bool remove_container = !container->children[0] || !container->children[1]; + if (remove_container) + { + if (container->parent) + { + Dock*& child = container->parent->children[0] == container + ? container->parent->children[0] + : container->parent->children[1]; + child = &sibling; + child->setPosSize(container->pos, container->size); + child->setParent(container->parent); + } + else + { + if (container->children[0]) + { + container->children[0]->setParent(nullptr); + container->children[0]->setPosSize(container->pos, container->size); + } + if (container->children[1]) + { + container->children[1]->setParent(nullptr); + container->children[1]->setPosSize(container->pos, container->size); + } + } + for (int i = 0; i < m_docks.size(); ++i) + { + if (m_docks[i] == container) + { + m_docks.erase(m_docks.begin() + i); + break; + } + } + if (container == m_next_parent) + m_next_parent = nullptr; + container->~Dock(); + MemFree(container); + } + } + if (dock.prev_tab) dock.prev_tab->next_tab = dock.next_tab; + if (dock.next_tab) dock.next_tab->prev_tab = dock.prev_tab; + dock.parent = nullptr; + dock.prev_tab = dock.next_tab = nullptr; + } + + + void drawTabbarListButton(Dock& dock) + { + if (!dock.next_tab) return; + + ImDrawList* draw_list = GetWindowDrawList(); + if (InvisibleButton("list", ImVec2(16, 16))) + { + OpenPopup("tab_list_popup"); + } + if (BeginPopup("tab_list_popup")) + { + Dock* tmp = &dock; + while (tmp) + { + bool dummy = false; + if (Selectable(tmp->label, &dummy)) + { + tmp->setActive(); + m_next_parent = tmp; + } + tmp = tmp->next_tab; + } + EndPopup(); + } + + bool hovered = IsItemHovered(); + ImVec2 min = GetItemRectMin(); + ImVec2 max = GetItemRectMax(); + ImVec2 center = (min + max) * 0.5f; + ImU32 text_color = GetColorU32(ImGuiCol_Text); + ImU32 color_active = GetColorU32(ImGuiCol_FrameBgActive); + draw_list->AddRectFilled(ImVec2(center.x - 4, min.y + 3), + ImVec2(center.x + 4, min.y + 5), + hovered ? color_active : text_color); + draw_list->AddTriangleFilled(ImVec2(center.x - 4, min.y + 7), + ImVec2(center.x + 4, min.y + 7), + ImVec2(center.x, min.y + 12), + hovered ? color_active : text_color); + } + + + bool tabbar(Dock& dock, bool close_button) + { + float tabbar_height = 2 * GetTextLineHeightWithSpacing(); + ImVec2 size(dock.size.x, tabbar_height); + bool tab_closed = false; + + SetCursorScreenPos(dock.pos); + char tmp[20]; + ImFormatString(tmp, IM_ARRAYSIZE(tmp), "tabs%d", (int)dock.id); + if (BeginChild(tmp, size, true)) + { + Dock* dock_tab = &dock; + + ImDrawList* draw_list = GetWindowDrawList(); + ImU32 color = GetColorU32(ImGuiCol_FrameBg); + ImU32 color_active = GetColorU32(ImGuiCol_FrameBgActive); + ImU32 color_hovered = GetColorU32(ImGuiCol_FrameBgHovered); + ImU32 text_color = GetColorU32(ImGuiCol_Text); + float line_height = GetTextLineHeightWithSpacing(); + float tab_base; + + drawTabbarListButton(dock); + + while (dock_tab) + { + SameLine(0, 15); + + const char* text_end = FindRenderedTextEnd(dock_tab->label); + ImVec2 size(CalcTextSize(dock_tab->label, text_end).x, line_height); + if (InvisibleButton(dock_tab->label, size)) + { + dock_tab->setActive(); + m_next_parent = dock_tab; + } + + if (IsItemActive() && IsMouseDragging() && dock_tab->movable) + { + m_drag_offset = GetMousePos() - dock_tab->pos; + doUndock(*dock_tab); + dock_tab->status = Status_Dragged; + } + + bool hovered = IsItemHovered(); + ImVec2 pos = GetItemRectMin(); + if (dock_tab->active && close_button) + { + size.x += 16 + GetStyle().ItemSpacing.x; + SameLine(); + tab_closed = InvisibleButton("close", ImVec2(16, 16)); + ImVec2 center = (GetItemRectMin() + GetItemRectMax()) * 0.5f; + draw_list->AddLine( + center + ImVec2(-3.5f, -3.5f), center + ImVec2(3.5f, 3.5f), text_color); + draw_list->AddLine( + center + ImVec2(3.5f, -3.5f), center + ImVec2(-3.5f, 3.5f), text_color); + } + tab_base = pos.y; + draw_list->PathClear(); + draw_list->PathLineTo(pos + ImVec2(-15, size.y)); + draw_list->PathBezierCurveTo( + pos + ImVec2(-10, size.y), pos + ImVec2(-5, 0), pos + ImVec2(0, 0), 10); + draw_list->PathLineTo(pos + ImVec2(size.x, 0)); + draw_list->PathBezierCurveTo(pos + ImVec2(size.x + 5, 0), + pos + ImVec2(size.x + 10, size.y), + pos + ImVec2(size.x + 15, size.y), + 10); + draw_list->PathFillConvex( + hovered ? color_hovered : (dock_tab->active ? color_active : color)); + draw_list->AddText(pos + ImVec2(0, 1), text_color, dock_tab->label, text_end); + + dock_tab = dock_tab->next_tab; + } + ImVec2 cp(dock.pos.x, tab_base + line_height); + draw_list->AddLine(cp, cp + ImVec2(dock.size.x, 0), color); + } + EndChild(); + return tab_closed; + } + + + static void setDockPosSize(Dock& dest, Dock& dock, ImGuiDockSlot dock_slot, Dock& container) + { + IM_ASSERT(!dock.prev_tab && !dock.next_tab && !dock.children[0] && !dock.children[1]); + + dest.pos = container.pos; + dest.size = container.size; + dock.pos = container.pos; + dock.size = container.size; + + switch (dock_slot) + { + case ImGuiDockSlot_Bottom: + dest.size.y *= 1.-dock.split_ratio.y; + dock.size.y *= dock.split_ratio.y; + dock.pos.y += dest.size.y; + break; + case ImGuiDockSlot_Right: + dest.size.x *= 1.-dock.split_ratio.x; + dock.size.x *= dock.split_ratio.x; + dock.pos.x += dest.size.x; + break; + case ImGuiDockSlot_Left: + dest.size.x *= 1.-dock.split_ratio.x; + dock.size.x *= dock.split_ratio.x; + dest.pos.x += dock.size.x; + break; + case ImGuiDockSlot_Top: + dest.size.y *= 1.-dock.split_ratio.y; + dock.size.y *= dock.split_ratio.y; + dest.pos.y += dock.size.y; + break; + default: IM_ASSERT(false); break; + } + dest.setPosSize(dest.pos, dest.size); + + if (container.children[1]->pos.x < container.children[0]->pos.x || + container.children[1]->pos.y < container.children[0]->pos.y) + { + Dock* tmp = container.children[0]; + container.children[0] = container.children[1]; + container.children[1] = tmp; + } + } + + + void doDock(Dock& dock, Dock* dest, ImGuiDockSlot dock_slot) + { + IM_ASSERT(!dock.parent); + if (!dest) + { + dock.status = Status_Docked; + dock.setPosSize(m_workspace_pos, m_workspace_size); + } + else if (dock_slot == ImGuiDockSlot_Tab) + { + Dock* tmp = dest; + while (tmp->next_tab) + { + tmp = tmp->next_tab; + } + + tmp->next_tab = &dock; + dock.prev_tab = tmp; + dock.size = tmp->size; + dock.pos = tmp->pos; + dock.parent = dest->parent; + dock.status = Status_Docked; + } + else if (dock_slot == ImGuiDockSlot_None) + { + dock.status = Status_Float; + } + else + { + Dock* container = (Dock*)MemAlloc(sizeof(Dock)); + IM_PLACEMENT_NEW(container) Dock(); + m_docks.push_back(container); + container->children[0] = &dest->getFirstTab(); + container->children[1] = &dock; + container->next_tab = nullptr; + container->prev_tab = nullptr; + container->parent = dest->parent; + container->size = dest->size; + container->pos = dest->pos; + container->status = Status_Docked; + container->label = ImStrdup(""); + + if (!dest->parent) + { + } + else if (&dest->getFirstTab() == dest->parent->children[0]) + { + dest->parent->children[0] = container; + } + else + { + dest->parent->children[1] = container; + } + + dest->setParent(container); + dock.parent = container; + dock.status = Status_Docked; + + setDockPosSize(*dest, dock, dock_slot, *container); + } + dock.setActive(); + } + + + void rootDock(const ImVec2& pos, const ImVec2& size) + { + Dock* root = getRootDock(); + if (!root) return; + + ImVec2 min_size = root->getMinSize(); + ImVec2 requested_size = size; + root->setPosSize(pos, ImMax(min_size, requested_size)); + } + + + void setDockActive() + { + IM_ASSERT(m_current); + if (m_current) m_current->setActive(); + } + + + static ImGuiDockSlot getSlotFromLocationCode(char code) + { + switch (code) + { + case '1': return ImGuiDockSlot_Left; + case '2': return ImGuiDockSlot_Top; + case '3': return ImGuiDockSlot_Bottom; + default: return ImGuiDockSlot_Right; + } + } + + + static char getLocationCode(Dock* dock) + { + if (!dock) return '0'; + + if (dock->parent->isHorizontal()) + { + if (dock->pos.x < dock->parent->children[0]->pos.x) return '1'; + if (dock->pos.x < dock->parent->children[1]->pos.x) return '1'; + return '0'; + } + else + { + if (dock->pos.y < dock->parent->children[0]->pos.y) return '2'; + if (dock->pos.y < dock->parent->children[1]->pos.y) return '2'; + return '3'; + } + } + + + void tryDockToStoredLocation(Dock& dock) + { + if (dock.status == Status_Docked) return; + if (dock.location[0] == 0) return; + + Dock* tmp = getRootDock(); + if (!tmp) return; + + Dock* prev = nullptr; + char* c = dock.location + strlen(dock.location) - 1; + while (c >= dock.location && tmp) + { + prev = tmp; + tmp = *c == getLocationCode(tmp->children[0]) ? tmp->children[0] : tmp->children[1]; + if(tmp) --c; + } + doDock(dock, tmp ? tmp : prev, tmp ? ImGuiDockSlot_Tab : getSlotFromLocationCode(*c)); + } + + + bool begin(const char* label, bool* opened, ImGuiWindowFlags extra_flags) + { + ImGuiDockSlot next_slot = m_next_dock_slot; + m_next_dock_slot = ImGuiDockSlot_Tab; + Dock& dock = getDock(label, !opened || *opened); + if (!dock.opened && (!opened || *opened)) tryDockToStoredLocation(dock); + dock.last_frame = ImGui::GetFrameCount(); + if (strcmp(dock.label, label) != 0) + { + MemFree(dock.label); + dock.label = ImStrdup(label); + } + + dock.movable = (extra_flags & ImGuiWindowFlags_NoMove) != ImGuiWindowFlags_NoMove; + + m_end_action = EndAction_None; + + bool prev_opened = dock.opened; + bool first = dock.first; + if (dock.first && opened) *opened = dock.opened; + dock.first = false; + if (opened && !*opened) + { + if (dock.status != Status_Float) + { + fillLocation(dock); + doUndock(dock); + dock.status = Status_Float; + } + dock.opened = false; + return false; + } + dock.opened = true; + + checkNonexistent(); + + if (first || (prev_opened != dock.opened)) { + Dock* root = m_next_parent ? m_next_parent : getRootDock(); + if (root && (&dock != root) && !dock.parent) { + doDock(dock, root, next_slot); + } + m_next_parent = &dock; + } + + m_current = &dock; + if (dock.status == Status_Dragged) handleDrag(dock); + + bool is_float = dock.status == Status_Float; + + if (is_float) + { + SetNextWindowPos(dock.pos); + SetNextWindowSize(dock.size); + bool ret = Begin(label, + opened, + ImGuiWindowFlags_NoCollapse | extra_flags); + // TODO(martin): + // //ImGuiWindowFlags_ShowBorders = 1 << 7, // Show borders around windows and items (OBSOLETE! Use e.g. style.FrameBorderSize=1.0f to enable borders). + + m_end_action = EndAction_End; + dock.pos = GetWindowPos(); + dock.size = GetWindowSize(); + + ImGuiContext& g = *GImGui; + + if (g.ActiveId == GetCurrentWindow()->MoveId && g.IO.MouseDown[0]) + { + m_drag_offset = GetMousePos() - dock.pos; + doUndock(dock); + dock.status = Status_Dragged; + } + return ret; + } + + if (!dock.active && dock.status != Status_Dragged) return false; + + m_end_action = EndAction_EndChild; + + splits(); + + PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0)); + float tabbar_height = GetTextLineHeightWithSpacing(); + if (tabbar(dock.getFirstTab(), opened != nullptr)) + { + fillLocation(dock); + *opened = false; + } + ImVec2 pos = dock.pos; + ImVec2 size = dock.size; + pos.y += tabbar_height + GetStyle().WindowPadding.y; + size.y -= tabbar_height + GetStyle().WindowPadding.y; + + SetCursorScreenPos(pos); + ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | + ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse | + ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoBringToFrontOnFocus | + extra_flags; + bool ret = BeginChild(label, size, true, flags); + PopStyleColor(); + + return ret; + } + + + void end() + { + m_current = nullptr; + if (m_end_action != EndAction_None) { + if (m_end_action == EndAction_End) + { + End(); + } + else if (m_end_action == EndAction_EndChild) + { + PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0)); + EndChild(); + PopStyleColor(); + } + } + } + + void debugWindow() { + if (Begin("Dock Debug Info")) { + for (int i = 0; i < m_docks.size(); ++i) { + if (TreeNode((void*)&i, "Dock %d (%p)", i, m_docks[i])) { + Dock &dock = *m_docks[i]; + Text("pos=(%.1f %.1f) size=(%.1f %.1f)", + dock.pos.x, dock.pos.y, + dock.size.x, dock.size.y); + Text("parent = %p\n", + dock.parent); + Text("isContainer() == %s\n", + dock.isContainer()?"true":"false"); + Text("status = %s\n", + (dock.status == Status_Docked)?"Docked": + ((dock.status == Status_Dragged)?"Dragged": + ((dock.status == Status_Float)?"Float": "?"))); + TreePop(); + } + } + + } + End(); + } + + int getDockIndex(Dock* dock) + { + if (!dock) return -1; + + for (int i = 0; i < m_docks.size(); ++i) + { + if (dock == m_docks[i]) return i; + } + + IM_ASSERT(false); + return -1; + } +}; + + +static DockContext g_dock; + +void ImGui::ShutdownDock() +{ + for (int i = 0; i < g_dock.m_docks.size(); ++i) + { + g_dock.m_docks[i]->~Dock(); + MemFree(g_dock.m_docks[i]); + } + g_dock.m_docks.clear(); +} + +void ImGui::SetNextDock(ImGuiDockSlot slot) { + g_dock.m_next_dock_slot = slot; +} + +void ImGui::BeginDockspace() { + ImGuiWindowFlags flags = ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar; + BeginChild("###workspace", ImVec2(0,0), false, flags); + g_dock.m_workspace_pos = GetWindowPos(); + g_dock.m_workspace_size = GetWindowSize(); +} + +void ImGui::EndDockspace() { + EndChild(); +} + +void ImGui::SetDockActive() +{ + g_dock.setDockActive(); +} + +bool ImGui::BeginDock(const char* label, bool* opened, ImGuiWindowFlags extra_flags) +{ + return g_dock.begin(label, opened, extra_flags); +} + +void ImGui::SetNextDockSplitRatio(const ImVec2& split_ratio) +{ + g_dock.m_next_split_ratio = split_ratio; +} + +void ImGui::SetNextDockFloatingSize(const ImVec2& floating_size) +{ + g_dock.m_next_floating_size = floating_size; +} + +void ImGui::EndDock() +{ + g_dock.end(); +} + +void ImGui::DockDebugWindow() +{ + g_dock.debugWindow(); +} diff --git a/3rdparty/imgui_dock/imgui_dock.h b/3rdparty/imgui_dock/imgui_dock.h new file mode 100644 index 0000000..f719b72 --- /dev/null +++ b/3rdparty/imgui_dock/imgui_dock.h @@ -0,0 +1,33 @@ +// based on https://github.com/nem0/LumixEngine/blob/master/external/imgui/imgui_dock.h +// modified from https://bitbucket.org/duangle/liminal/src/tip/src/liminal/imgui_dock.h + +#pragma once + +// Forward declarations +typedef int ImGuiWindowFlags; + +typedef enum ImGuiDockSlot { + ImGuiDockSlot_Left, + ImGuiDockSlot_Right, + ImGuiDockSlot_Top, + ImGuiDockSlot_Bottom, + ImGuiDockSlot_Tab, + + ImGuiDockSlot_Float, + ImGuiDockSlot_None +} ImGuiDockSlot; + +namespace ImGui{ + +IMGUI_API void BeginDockspace(); +IMGUI_API void EndDockspace(); +IMGUI_API void ShutdownDock(); +IMGUI_API void SetNextDock(ImGuiDockSlot slot); +IMGUI_API bool BeginDock(const char* label, bool* opened = NULL, ImGuiWindowFlags extra_flags = 0); +IMGUI_API void SetNextDockSplitRatio(const ImVec2& split_ratio = ImVec2(0.5, 0.5)); +IMGUI_API void SetNextDockFloatingSize(const ImVec2& floating_size = ImVec2(0.5, 0.5)); +IMGUI_API void EndDock(); +IMGUI_API void SetDockActive(); +IMGUI_API void DockDebugWindow(); + +}; diff --git a/CMakeLists.txt b/CMakeLists.txt index f23c6b8..7612011 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,7 @@ INCLUDE_DIRECTORIES ( 3rdparty/bgfx/3rdparty/glsl-optimizer/include/ 3rdparty/bgfx/3rdparty/glsl-optimizer/src/ 3rdparty/bgfx/3rdparty/glsl-optimizer/src/mesa/ - ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/imgui_docking_minimal/include + 3rdparty/imgui_dock/ ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/bgfx/3rdparty/ocornut-imgui ${CMAKE_CURRENT_BINARY_DIR}/src ) @@ -80,14 +80,10 @@ SUBDIRS ( ) SET ( protot_SRCS - src/shaderc_compile.cpp - src/shaderc_glsl.cpp - src/shaderc_hlsl.cpp - src/RuntimeModuleManager.cc 3rdparty/glfw/deps/glad.c - 3rdparty/imgui_docking_minimal/src/imgui_dock.cpp + 3rdparty/imgui_dock/imgui_dock.cpp ) SET (PROTOT_SOURCE_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/main.cc b/src/main.cc index 021bc44..4bcf67c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -144,7 +144,6 @@ int main(void) imguiCreate(); GuiInputState gui_input_state; gGuiInputState = &gui_input_state; - ImGui::LoadDock(); // Timer Timer timer; @@ -230,7 +229,6 @@ int main(void) gRenderer = nullptr; - ImGui::SaveDock(); ImGui::ShutdownDock(); imguiDestroy(); diff --git a/src/modules/CharacterModule.cc b/src/modules/CharacterModule.cc index e42845d..e68a476 100644 --- a/src/modules/CharacterModule.cc +++ b/src/modules/CharacterModule.cc @@ -6,7 +6,7 @@ #include "3rdparty/ocornut-imgui/imgui.h" #include "imgui/imgui.h" -#include +#include #include "RuntimeModule.h" #include "Globals.h" @@ -566,118 +566,118 @@ void CharacterEntity::UpdateBoneMatrices() { void ShowCharacterPropertiesWindow (CharacterEntity* character) { assert (character != nullptr); - ImGui::SetNextWindowSize (ImVec2(600.f, 300.0f), ImGuiSetCond_Once); - ImGui::SetNextWindowPos (ImVec2(400.f, 16.0f), ImGuiSetCond_Once); + ImGui::SetNextWindowSize (ImVec2(600.f, 300.0f), ImGuiCond_Once); + ImGui::SetNextWindowPos (ImVec2(400.f, 16.0f), ImGuiCond_Once); - if (ImGui::BeginDock("Character", &sCharacterDock)) { - - if (ImGui::Button ("Reset")) { - character->Reset(); - } - - ImGui::Checkbox("Render", &character->mEntity->mDrawEntity); - - ImGui::Protot::DragFloat4Normalized ("Offset Quat", offset_quat.data(), - 0.01f, -1.0f, 1.0f); - - ImGui::DragFloat3 ("Position", character->mPosition.data(), 0.01, -10.0f, 10.0f); - ImGui::DragFloat3 ("Velocity", character->mVelocity.data(), 0.01, -10.0f, 10.0f); - float angle = atan2 (-character->mVelocity[2], character->mVelocity[0]); - ImGui::LabelText ("", "Angle %f", angle * 180.f / M_PI); - - ImGui::LabelText("", - "Skeleton Bones %d", - character->mEntity->mSkeleton.mLocalTransforms.size()); - - ImGui::LabelText("", - "Rig Frames %d", - character->mRigModel->mBodies.size()); - - bool node_open = ImGui::TreeNodeEx( - "DOFs", - 0); - if (node_open) { - bool dof_modified = false; - for (int i = 0; i < character->mRigModel->q_size; ++i) { - char buf[32]; - snprintf (buf, 32, "DOF %d", i); - - if (ImGui::DragFloat (buf, &character->mRigState.q[i], 0.01, -10.0f, 10.0f)) { - dof_modified = true; - } - } - - if (dof_modified) { - VectorNd q = character->mRigState.q; - } - - ImGui::TreePop(); - } - - node_open = ImGui::TreeNodeEx( - "Meshes", - 0); - - if (node_open) { - for (int i = 0; i < character->mEntity->mSkeleton.Length(); ++i) { - char buf[32]; - snprintf (buf, 32, "Mesh %d", i); - - ImGuiTreeNodeFlags node_flags = 0; - - bool node_open = ImGui::TreeNodeEx( - buf, - node_flags); - - if (node_open) { - Transform &transform = character->mEntity->mSkeleton.mLocalTransforms[i]; - - ImGui::DragFloat3 ("Position", transform.translation.data(), 0.01, -10.0f, 10.0f); - if (ImGui::Protot::DragFloat4Normalized ("Rotation", transform.rotation.data(), 0.001, -1.0f, 1.0f)) { - if (isnan(transform.rotation.squaredNorm())) { - std::cout << "nan! " << transform.rotation.transpose() << std::endl; - abort(); - } - } - ImGui::DragFloat3 ("Scale", transform.scale.data(), 0.01, 0.001f, 10.0f); - - ImGui::TreePop(); - } - } - ImGui::TreePop(); - } - - node_open = ImGui::TreeNodeEx( - "IK Effectors", - 0); - - if (node_open) { - for (int i = 0; i < character->mIKConstraints.size(); ++i) { - IKConstraint& constraint = character->mIKConstraints[i]; - - char buf[32]; - snprintf (buf, 32, "Constraint %d", i); - - ImGuiTreeNodeFlags node_flags = 0; - - bool node_open = ImGui::TreeNodeEx( - buf, - node_flags); - - if (node_open) { - Transform &transform = character->mEntity->mSkeleton.mLocalTransforms[i]; - - ImGui::DragFloat3 ("Local Offset", constraint.mEffectorLocalOffset.data(), 0.01, 0.001f, 10.0f); - ImGui::DragFloat3 ("Target", constraint.mEffectorWorldTarget.data(), 0.01, -10.0f, 10.0f); - - ImGui::TreePop(); - } - } - ImGui::TreePop(); - } - } - - ImGui::EndDock(); +// if (ImGui::BeginDock("Character", &sCharacterDock)) { +// +// if (ImGui::Button ("Reset")) { +// character->Reset(); +// } +// +// ImGui::Checkbox("Render", &character->mEntity->mDrawEntity); +// +// ImGui::Protot::DragFloat4Normalized ("Offset Quat", offset_quat.data(), +// 0.01f, -1.0f, 1.0f); +// +// ImGui::DragFloat3 ("Position", character->mPosition.data(), 0.01, -10.0f, 10.0f); +// ImGui::DragFloat3 ("Velocity", character->mVelocity.data(), 0.01, -10.0f, 10.0f); +// float angle = atan2 (-character->mVelocity[2], character->mVelocity[0]); +// ImGui::LabelText ("", "Angle %f", angle * 180.f / M_PI); +// +// ImGui::LabelText("", +// "Skeleton Bones %d", +// character->mEntity->mSkeleton.mLocalTransforms.size()); +// +// ImGui::LabelText("", +// "Rig Frames %d", +// character->mRigModel->mBodies.size()); +// +// bool node_open = ImGui::TreeNodeEx( +// "DOFs", +// 0); +// if (node_open) { +// bool dof_modified = false; +// for (int i = 0; i < character->mRigModel->q_size; ++i) { +// char buf[32]; +// snprintf (buf, 32, "DOF %d", i); +// +// if (ImGui::DragFloat (buf, &character->mRigState.q[i], 0.01, -10.0f, 10.0f)) { +// dof_modified = true; +// } +// } +// +// if (dof_modified) { +// VectorNd q = character->mRigState.q; +// } +// +// ImGui::TreePop(); +// } +// +// node_open = ImGui::TreeNodeEx( +// "Meshes", +// 0); +// +// if (node_open) { +// for (int i = 0; i < character->mEntity->mSkeleton.Length(); ++i) { +// char buf[32]; +// snprintf (buf, 32, "Mesh %d", i); +// +// ImGuiTreeNodeFlags node_flags = 0; +// +// bool node_open = ImGui::TreeNodeEx( +// buf, +// node_flags); +// +// if (node_open) { +// Transform &transform = character->mEntity->mSkeleton.mLocalTransforms[i]; +// +// ImGui::DragFloat3 ("Position", transform.translation.data(), 0.01, -10.0f, 10.0f); +// if (ImGui::Protot::DragFloat4Normalized ("Rotation", transform.rotation.data(), 0.001, -1.0f, 1.0f)) { +// if (isnan(transform.rotation.squaredNorm())) { +// std::cout << "nan! " << transform.rotation.transpose() << std::endl; +// abort(); +// } +// } +// ImGui::DragFloat3 ("Scale", transform.scale.data(), 0.01, 0.001f, 10.0f); +// +// ImGui::TreePop(); +// } +// } +// ImGui::TreePop(); +// } +// +// node_open = ImGui::TreeNodeEx( +// "IK Effectors", +// 0); +// +// if (node_open) { +// for (int i = 0; i < character->mIKConstraints.size(); ++i) { +// IKConstraint& constraint = character->mIKConstraints[i]; +// +// char buf[32]; +// snprintf (buf, 32, "Constraint %d", i); +// +// ImGuiTreeNodeFlags node_flags = 0; +// +// bool node_open = ImGui::TreeNodeEx( +// buf, +// node_flags); +// +// if (node_open) { +// Transform &transform = character->mEntity->mSkeleton.mLocalTransforms[i]; +// +// ImGui::DragFloat3 ("Local Offset", constraint.mEffectorLocalOffset.data(), 0.01, 0.001f, 10.0f); +// ImGui::DragFloat3 ("Target", constraint.mEffectorWorldTarget.data(), 0.01, -10.0f, 10.0f); +// +// ImGui::TreePop(); +// } +// } +// ImGui::TreePop(); +// } +// } +// +// ImGui::EndDock(); } static struct module_state *module_init() { diff --git a/src/modules/RenderModule.cc b/src/modules/RenderModule.cc index 93ed61f..d4211dc 100644 --- a/src/modules/RenderModule.cc +++ b/src/modules/RenderModule.cc @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -203,7 +203,7 @@ namespace IBL { void destroy() { - bgfx::destroyUniform(u_params); + bgfx::destroy(u_params); } union @@ -267,7 +267,6 @@ namespace IBL { m_showSpecColorWheel = true; m_metalOrSpec = 0; m_meshSelection = 0; - m_crossCubemapPreview = ImguiCubemap::Latlong; } float m_envRotCurr; @@ -291,7 +290,6 @@ namespace IBL { bool m_showSpecColorWheel; uint8_t m_metalOrSpec; uint8_t m_meshSelection; - ImguiCubemap::Enum m_crossCubemapPreview; }; Settings settings; @@ -388,7 +386,7 @@ bool RenderProgram::reload() { if (bgfx::isValid(new_handle)) { if (bgfx::isValid(program)) { - bgfx::destroyProgram(program); + bgfx::destroy(program); } gLog ("Reload of shaders %s and %s success!", @@ -741,7 +739,7 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, bool _originBott vertex[2].m_u = maxu; vertex[2].m_v = maxv; - bgfx::setVertexBuffer(&vb); + bgfx::setVertexBuffer(0, &vb); } } @@ -756,11 +754,15 @@ void Camera::updateMatrices() { bx::mtxOrthoRh(mtxProj, -width * 0.5f, width * 0.5f, -height * 0.5f, height * 0.5f, - near, far); + near, far, + 0.0f, + bgfx::getCaps()->homogeneousDepth); } else { float aspect = static_cast(width) / height; float mtx_proj[16]; - bx::mtxProjRh(mtxProj, fov, aspect, near, far); + bx::mtxProjRh(mtxProj, fov, aspect, + near, far, + bgfx::getCaps()->homogeneousDepth); } // environment matrix @@ -885,10 +887,10 @@ void Renderer::createGeometries() { Path::~Path() { if (bgfx::isValid(mVertexBufferHandle)) - bgfx::destroyDynamicVertexBuffer(mVertexBufferHandle); + bgfx::destroy(mVertexBufferHandle); if (bgfx::isValid(mIndexBufferHandle)) - bgfx::destroyDynamicIndexBuffer(mIndexBufferHandle); + bgfx::destroy(mIndexBufferHandle); } void Path::UpdateBuffers() { @@ -1269,28 +1271,28 @@ void Renderer::initialize(int width, int height) { } void Renderer::shutdown() { - bgfx::destroyIndexBuffer(cube_ibh); - bgfx::destroyIndexBuffer(cube_edges_ibh); - bgfx::destroyVertexBuffer(cube_vbh); - bgfx::destroyIndexBuffer(plane_ibh); - bgfx::destroyVertexBuffer(plane_vbh); + bgfx::destroy(cube_ibh); + bgfx::destroy(cube_edges_ibh); + bgfx::destroy(cube_vbh); + bgfx::destroy(plane_ibh); + bgfx::destroy(plane_vbh); - bgfx::destroyUniform(u_camPos); - bgfx::destroyUniform(u_flags); - bgfx::destroyUniform(u_mtx); + bgfx::destroy(u_camPos); + bgfx::destroy(u_flags); + bgfx::destroy(u_mtx); IBL::uniforms.destroy(); - bgfx::destroyUniform(s_texCube); - bgfx::destroyUniform(s_texCubeIrr); + bgfx::destroy(s_texCube); + bgfx::destroy(s_texCubeIrr); - bgfx::destroyUniform(u_time); - bgfx::destroyUniform(u_color); - bgfx::destroyUniform(u_line_params); + bgfx::destroy(u_time); + bgfx::destroy(u_color); + bgfx::destroy(u_line_params); for (uint8_t ii = 0; ii < RenderState::Count; ++ii) { if (bgfx::isValid(s_renderStates[ii].m_program.program)) { - bgfx::destroyProgram(s_renderStates[ii].m_program.program); + bgfx::destroy(s_renderStates[ii].m_program.program); } } @@ -1305,12 +1307,12 @@ void Renderer::shutdown() { for (size_t i = 0; i < lights.size(); i++) { gLog ("Destroying light uniforms for light %d", i); - bgfx::destroyFrameBuffer(lights[i].shadowMapFB); + bgfx::destroy(lights[i].shadowMapFB); - bgfx::destroyUniform(lights[i].u_shadowMap); - bgfx::destroyUniform(lights[i].u_shadowMapParams); - bgfx::destroyUniform(lights[i].u_lightPos); - bgfx::destroyUniform(lights[i].u_lightMtx); + bgfx::destroy(lights[i].u_shadowMap); + bgfx::destroy(lights[i].u_shadowMapParams); + bgfx::destroy(lights[i].u_lightPos); + bgfx::destroy(lights[i].u_lightMtx); } lights.clear(); @@ -1398,7 +1400,10 @@ void Renderer::paintGL() { bx::mtxOrthoRh(lights[i].mtxProj, lights[i].area, -lights[i].area, lights[i].area, -lights[i].area, - lights[i].near, lights[i].far); + lights[i].near, lights[i].far, + 0.0, + bgfx::getCaps()->homogeneousDepth + ); // lights: shadow matrix const float sy = flipV ? 0.5f : -0.5f; @@ -1420,7 +1425,8 @@ void Renderer::paintGL() { float view[16]; float proj[16]; bx::mtxIdentity(view); - bx::mtxOrthoRh(proj, 0.f, 1.f, 1.f, 0.f, 0.f, 100.0f); + bx::mtxOrthoRh(proj, 0.f, 1.f, 1.f, 0.f, 0.f, 100.0f, 0.0, bgfx::getCaps()->homogeneousDepth +); bgfx::setViewRect(RenderState::Skybox, view_offset_x, view_offset_y, view_width, view_height); bgfx::setViewTransform(RenderState::Skybox, view, proj); @@ -1489,8 +1495,8 @@ void Renderer::paintGL() { // Skybox pass memcpy (IBL::uniforms.m_cameraPos, cameras[activeCameraIndex].eye.data(), 3 * sizeof(float)); - const float amount = bx::fmin(0.012/0.12f, 1.0f); - IBL::settings.m_envRotCurr = bx::flerp(IBL::settings.m_envRotCurr, IBL::settings.m_envRotDest, amount); + const float amount = bx::min(0.012f/0.12f, 1.0f); + IBL::settings.m_envRotCurr = bx::lerp(IBL::settings.m_envRotCurr, IBL::settings.m_envRotDest, amount); float mtxEnvRot[16]; @@ -1540,7 +1546,7 @@ void Renderer::paintGL() { bgfx::setUniform(lights[0].u_lightMtx, lightMtx); bgfx::setUniform(u_color, Vector4f(1.f, 1.f, 1.f, 1.f).data(), 4); bgfx::setIndexBuffer(plane_ibh); - bgfx::setVertexBuffer(plane_vbh); + bgfx::setVertexBuffer(0, plane_vbh); bgfx::setState(st.m_state); bgfx::submit(st.m_viewId, st.m_program.program); } @@ -1607,7 +1613,7 @@ void Renderer::paintGL() { bgfx::setTransform(mtxLightViewProjInv); bgfx::setIndexBuffer(cube_edges_ibh); - bgfx::setVertexBuffer(cube_vbh); + bgfx::setVertexBuffer(0, cube_vbh); bgfx::setState(st.m_state); bgfx::submit(st.m_viewId, st.m_program.program); } @@ -1624,7 +1630,7 @@ void Renderer::paintGL() { bgfx::setTransform(mtxCameraViewProjInv); bgfx::setIndexBuffer(cube_edges_ibh); - bgfx::setVertexBuffer(cube_vbh); + bgfx::setVertexBuffer(0, cube_vbh); bgfx::setState(st.m_state); bgfx::submit(st.m_viewId, st.m_program.program); } @@ -1694,7 +1700,7 @@ void Renderer::paintGL() { bgfx::setUniform(u_line_params, params.data(), 1); bgfx::setIndexBuffer(line.mIndexBufferHandle); - bgfx::setVertexBuffer(line.mVertexBufferHandle); + bgfx::setVertexBuffer(0, line.mVertexBufferHandle); bgfx::setState(st.m_state); bgfx::submit(st.m_viewId, st.m_program.program); @@ -1702,7 +1708,7 @@ void Renderer::paintGL() { bgfx::setState(s_renderStates[RenderState::LinesOccluded].m_state); bgfx::setUniform(u_line_params, params.data(), 1); bgfx::setIndexBuffer(line.mIndexBufferHandle); - bgfx::setVertexBuffer(line.mVertexBufferHandle); + bgfx::setVertexBuffer(0, line.mVertexBufferHandle); bgfx::submit( s_renderStates[RenderState::LinesOccluded].m_viewId, s_renderStates[RenderState::LinesOccluded].m_program.program @@ -1710,40 +1716,40 @@ void Renderer::paintGL() { } } - if (ImGui::BeginDock("Render Settings"), &sRenderDock) { - if(ImGui::DragFloat3 ("Light0 Pos", lights[0].pos.data(), 1.0f, -10.0f, 10.0f)) { - } +// if (ImGui::BeginDock("Render Settings"), &sRenderDock) { +// if(ImGui::DragFloat3 ("Light0 Pos", lights[0].pos.data(), 1.0f, -10.0f, 10.0f)) { +// } +// +// if(ImGui::DragFloat3 ("Light0 Dir", lights[0].dir.data(), 1.0f, -10.0f, 10.0f)) { +// } +// +// float light_at[3]; +// light_at[0] = lights[0].dir[0] - lights[0].pos[0]; +// light_at[1] = lights[0].dir[1] - lights[0].pos[1]; +// light_at[2] = lights[0].dir[2] - lights[0].pos[2]; +// +// if(ImGui::DragFloat3 ("Light0 At", light_at, 1.0f, -10.0f, 10.0f)) { +// lights[0].dir[0] = lights[0].pos[0]- light_at[0]; +// lights[0].dir[1] = lights[0].pos[1]- light_at[1]; +// lights[0].dir[2] = lights[0].pos[2]- light_at[2]; +// } +// +// assert (lights.size() == 1); +// +// ImGui::Checkbox("Draw Floor", &drawFloor); +// ImGui::Checkbox("Draw Skybox", &drawSkybox); +// ImGui::Checkbox("Draw Debug", &drawDebug); +// +// for (int i = 0; i < lights.size(); i++) { +// ImGui::SliderFloat("Bias", +// &lights[i].shadowMapBias, +// 0.0001f, +// 0.10f +// ); +// } +// } - if(ImGui::DragFloat3 ("Light0 Dir", lights[0].dir.data(), 1.0f, -10.0f, 10.0f)) { - } - - float light_at[3]; - light_at[0] = lights[0].dir[0] - lights[0].pos[0]; - light_at[1] = lights[0].dir[1] - lights[0].pos[1]; - light_at[2] = lights[0].dir[2] - lights[0].pos[2]; - - if(ImGui::DragFloat3 ("Light0 At", light_at, 1.0f, -10.0f, 10.0f)) { - lights[0].dir[0] = lights[0].pos[0]- light_at[0]; - lights[0].dir[1] = lights[0].pos[1]- light_at[1]; - lights[0].dir[2] = lights[0].pos[2]- light_at[2]; - } - - assert (lights.size() == 1); - - ImGui::Checkbox("Draw Floor", &drawFloor); - ImGui::Checkbox("Draw Skybox", &drawSkybox); - ImGui::Checkbox("Draw Debug", &drawDebug); - - for (int i = 0; i < lights.size(); i++) { - ImGui::SliderFloat("Bias", - &lights[i].shadowMapBias, - 0.0001f, - 0.10f - ); - } - } - - ImGui::EndDock(); +// ImGui::EndDock(); // Advance to next frame. Rendering thread will be kicked to // process submitted rendering primitives. @@ -1762,77 +1768,77 @@ void Renderer::DrawGui() { ImVec2 size = ImGui::GetIO().DisplaySize; size.x -= pos.x; size.y -= pos.y; - ImGui::RootDock(pos, ImVec2(size.x, size.y - 25.0f)); + // TODO(martin): init dock // Draw status bar (no docking) - ImGui::SetNextWindowSize(ImVec2(size.x, 25.0f), ImGuiSetCond_Always); - ImGui::SetNextWindowPos(ImVec2(0, size.y - 32.0f), ImGuiSetCond_Always); + ImGui::SetNextWindowSize(ImVec2(size.x, 25.0f), ImGuiCond_Always); + ImGui::SetNextWindowPos(ImVec2(0, size.y - 32.0f), ImGuiCond_Always); ImGui::Begin("statusbar", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoResize); ImGui::Text("FPS: %f", ImGui::GetIO().Framerate); ImGui::End(); } - if (ImGui::BeginDock("Dock Info", &sDockInfoDock)) { - ImGui::Print(); - } - ImGui::EndDock(); +// if (ImGui::BeginDock("Dock Info", &sDockInfoDock)) { +// ImGui::Print(); +// } +// ImGui::EndDock(); - if (ImGui::BeginDock("Scene", &sSceneDock)) { - ImVec2 size = ImGui::GetContentRegionAvail(); - ImVec2 pos = ImGui::GetWindowPos(); - - if ((size.x > 0 && size.y > 0) && - (view_texture_width != size.x || view_texture_height != size.y)) { - if (bgfx::isValid(sceneViewBuffer)) { - gLog("Destroying old view frame buffer of size %f, %f", - view_texture_width, view_texture_height); - bgfx::destroyFrameBuffer(sceneViewBuffer); - } - - sceneViewTexture = bgfx::createTexture2D( - size.x, size.y, - false, 1, - bgfx::TextureFormat::RGBA8 - ); - sceneDepthTexture = bgfx::createTexture2D( - size.x, size.y, - false, 1, - bgfx::TextureFormat::D16 - ); - - view_texture_width = size.x; - view_texture_height = size.y; - view_offset_x = pos.x; - view_offset_y = pos.y; - view_width = size.x; - view_height = size.y; - - assert(view_texture_width > 0.0f); - assert(view_texture_height > 0.0f); - - gLog("Creating view frame buffer of size %f, %f", - view_texture_width, view_texture_height); - - bgfx::TextureHandle fbtextures[] = { sceneViewTexture, sceneDepthTexture }; - - sceneViewBuffer = bgfx::createFrameBuffer( - BX_COUNTOF(fbtextures), fbtextures, true - ); - - ImGuizmo::SetRect( - view_offset_x, view_offset_y, - view_texture_width, view_texture_height - ); - } else { - - ImGui::Image(sceneViewTexture, - size, - ImVec2(0.0f, 1.0f), - ImVec2(1.0f, 0.0f) - ); - } - } - ImGui::EndDock(); +// if (ImGui::BeginDock("Scene", &sSceneDock)) { +// ImVec2 size = ImGui::GetContentRegionAvail(); +// ImVec2 pos = ImGui::GetWindowPos(); +// +// if ((size.x > 0 && size.y > 0) && +// (view_texture_width != size.x || view_texture_height != size.y)) { +// if (bgfx::isValid(sceneViewBuffer)) { +// gLog("Destroying old view frame buffer of size %f, %f", +// view_texture_width, view_texture_height); +// bgfx::destroy(sceneViewBuffer); +// } +// +// sceneViewTexture = bgfx::createTexture2D( +// size.x, size.y, +// false, 1, +// bgfx::TextureFormat::RGBA8 +// ); +// sceneDepthTexture = bgfx::createTexture2D( +// size.x, size.y, +// false, 1, +// bgfx::TextureFormat::D16 +// ); +// +// view_texture_width = size.x; +// view_texture_height = size.y; +// view_offset_x = pos.x; +// view_offset_y = pos.y; +// view_width = size.x; +// view_height = size.y; +// +// assert(view_texture_width > 0.0f); +// assert(view_texture_height > 0.0f); +// +// gLog("Creating view frame buffer of size %f, %f", +// view_texture_width, view_texture_height); +// +// bgfx::TextureHandle fbtextures[] = { sceneViewTexture, sceneDepthTexture }; +// +// sceneViewBuffer = bgfx::createFrameBuffer( +// BX_COUNTOF(fbtextures), fbtextures, true +// ); +// +// ImGuizmo::SetRect( +// view_offset_x, view_offset_y, +// view_texture_width, view_texture_height +// ); +// } else { +// +// ImGui::Image(sceneViewTexture, +// size, +// ImVec2(0.0f, 1.0f), +// ImVec2(1.0f, 0.0f) +// ); +// } +// } +// ImGui::EndDock(); } bool Renderer::updateShaders() { diff --git a/src/modules/RenderModule.h b/src/modules/RenderModule.h index 7439313..41ed60b 100644 --- a/src/modules/RenderModule.h +++ b/src/modules/RenderModule.h @@ -335,8 +335,8 @@ struct LightProbe void destroy() { - bgfx::destroyTexture(m_tex); - bgfx::destroyTexture(m_texIrr); + bgfx::destroy(m_tex); + bgfx::destroy(m_texIrr); } bgfx::TextureHandle m_tex; diff --git a/src/modules/RenderUtils.cc b/src/modules/RenderUtils.cc index 6558fa3..931c029 100644 --- a/src/modules/RenderUtils.cc +++ b/src/modules/RenderUtils.cc @@ -11,15 +11,15 @@ #include namespace stl = tinystl; +#include +#include +#include #include -#include +#include #include -#include #include "entry/dbg.h" #include -#include "shaderc.h" - #include "RenderModule.h" #include "RenderUtils.h" #include "Globals.h" @@ -48,7 +48,7 @@ namespace entry { BX_PRAGMA_DIAGNOSTIC_PUSH(); BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4459); // warning C4459: declaration of 's_allocator' hides global declaration BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wshadow"); - static bx::CrtAllocator s_allocator; + static bx::DefaultAllocator s_allocator; return &s_allocator; BX_PRAGMA_DIAGNOSTIC_POP(); } @@ -57,7 +57,7 @@ namespace entry { bx::FileReaderI* getFileReader() { if (s_fileReader == NULL) { - s_fileReader = new bx::CrtFileReader; + s_fileReader = new bx::FileReader; } return s_fileReader; } @@ -65,7 +65,7 @@ namespace entry { bx::FileWriterI* getFileWriter() { if (s_fileWriter == NULL) { - s_fileWriter = new bx::CrtFileWriter; + s_fileWriter = new bx::FileWriter; } return s_fileWriter; } @@ -154,6 +154,12 @@ static void* loadMem(bx::FileReaderI* _reader, bx::AllocatorI* _allocator, const return NULL; } +int compileShader(bx::CommandLine& _cmdLine, bx::ReaderSeekerI* _reader, bx::WriterI* _writer) { + assert(false); + return -1; +} + + static bgfx::ShaderHandle loadShader(bx::FileReaderI* _reader, const char* _name) { char filePath[512]; @@ -307,9 +313,9 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _name, uin gLog ("Loading texture %s", filePath); - if (NULL != bx::stristr(_name, ".dds") - || NULL != bx::stristr(_name, ".pvr") - || NULL != bx::stristr(_name, ".ktx") ) + if (NULL != bx::strFindI(_name, ".dds") + || NULL != bx::strFindI(_name, ".pvr") + || NULL != bx::strFindI(_name, ".ktx") ) { const bgfx::Memory* mem = loadMem(_reader, filePath); if (NULL != mem) @@ -417,8 +423,8 @@ struct Group void reset() { - m_vbh.idx = bgfx::invalidHandle; - m_ibh.idx = bgfx::invalidHandle; + m_vbh.idx = BGFX_INVALID_HANDLE; + m_ibh.idx = BGFX_INVALID_HANDLE; m_prims.clear(); } @@ -455,10 +461,10 @@ struct Mesh case BGFX_CHUNK_MAGIC_VB: { read(_reader, group.m_sphere); - read(_reader, group.m_aabb); - read(_reader, group.m_obb); + read(_reader, &group.m_aabb, sizeof(Aabb)); + read(_reader, &group.m_obb, sizeof(Obb)); - read(_reader, m_decl); + read(_reader, &m_decl, sizeof(bgfx::VertexDecl)); uint16_t stride = m_decl.getStride(); @@ -553,11 +559,11 @@ struct Mesh for (GroupArray::const_iterator it = m_groups.begin(), itEnd = m_groups.end(); it != itEnd; ++it) { const Group& group = *it; - bgfx::destroyVertexBuffer(group.m_vbh); + bgfx::destroy(group.m_vbh); if (bgfx::isValid(group.m_ibh) ) { - bgfx::destroyIndexBuffer(group.m_ibh); + bgfx::destroy(group.m_ibh); } } m_groups.clear(); @@ -585,7 +591,7 @@ struct Mesh bgfx::setTransform(cached); bgfx::setIndexBuffer(group.m_ibh); - bgfx::setVertexBuffer(group.m_vbh); + bgfx::setVertexBuffer(0, group.m_vbh); bgfx::setState(_state); bgfx::submit(_id, _program); } @@ -614,7 +620,7 @@ struct Mesh ); } bgfx::setIndexBuffer(group.m_ibh); - bgfx::setVertexBuffer(group.m_vbh); + bgfx::setVertexBuffer(0, group.m_vbh); bgfx::setState(state.m_state); bgfx::submit(state.m_viewId, state.m_program.program); } diff --git a/src/modules/TestModule.cc b/src/modules/TestModule.cc index b1d572b..37f0676 100644 --- a/src/modules/TestModule.cc +++ b/src/modules/TestModule.cc @@ -2,7 +2,7 @@ #include "Globals.h" #include "3rdparty/ocornut-imgui/imgui.h" #include "imgui/imgui.h" -#include +#include #include #include "SimpleMath/SimpleMath.h" #include "SimpleMath/SimpleMathMap.h" @@ -313,7 +313,7 @@ static bool module_step(struct module_state *state, float dt) { } if (state->imgui_demo_window_visible) { - ImGui::ShowTestWindow(); + ImGui::ShowDemoWindow(); } handle_mouse(state); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 05b90a1..9eef5e6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,7 +10,8 @@ include_directories ( set (TEST_SRCS RenderModuleTests.cc ${GOOGLETEST_DIR}/src/gtest_main.cc - ${CMAKE_SOURCE_DIR}/3rdparty/bx/src/fpumath.cpp + ${CMAKE_SOURCE_DIR}/3rdparty/bx/src/math.cpp + ${CMAKE_SOURCE_DIR}/3rdparty/bx/src/bx.cpp ) add_executable ( runtests ${TEST_SRCS} ) diff --git a/tests/RenderModuleTests.cc b/tests/RenderModuleTests.cc index e8bd01f..1987f2d 100644 --- a/tests/RenderModuleTests.cc +++ b/tests/RenderModuleTests.cc @@ -2,7 +2,7 @@ #include "gtest/gtest.h" #include "TestUtils.h" -#include "bx/fpumath.h" +#include "bx/math.h" #include "src/math_types.h" #include "src/modules/RenderModule.h" diff --git a/tests/TestUtils.h b/tests/TestUtils.h index 6e40093..f2c46f0 100644 --- a/tests/TestUtils.h +++ b/tests/TestUtils.h @@ -1,4 +1,5 @@ #include +#include template ::testing::AssertionResult MatrixClose( @@ -19,12 +20,12 @@ template bool failed = false; for (size_t i = 0; i < expected.rows(); ++i) { for (size_t j = 0; j < expected.cols(); ++j) { - float diff = fabs(expected(i,j) - actual(i,j)); + float diff = std::fabs(expected(i,j) - actual(i,j)); // special case: expected is 0. In that we cannot normalize if ( (expected(i,j) == 0.0f && diff > relative_error_precision) - || (diff / fabs(expected(i,j)) > relative_error_precision) + || (diff / std::fabs(expected(i,j)) > relative_error_precision) ) { failed = true; fail_j = j;

    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%0Dl;{rpa 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 WWg!pQKl!^Pk>vk71^xe7lK%y;KRuKH literal 818437 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